cronli5 0.1.2 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -6,6 +6,95 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.1.5]
10
+
11
+ ### Changed
12
+
13
+ - **A regular step reads as a bounded cadence instead of an enumerated list.** A
14
+ step like `3/2` (every other minute starting at :03) listed out all 29 of its
15
+ fires; it now reads "every two minutes from 3 through 59 minutes past the hour".
16
+ Offset steps (`5/6` → "every six minutes from five minutes past the hour"),
17
+ uneven steps (`*/7` → "every seven minutes from 0 through 56 minutes past the
18
+ hour"), and a stepped hour composed with a fixed time (`30 0 */2` → "at 30
19
+ seconds past the hour, every two hours", was twelve clock times) are all
20
+ covered, in every context — standalone and composed. So `3/2 1/2` reads "every
21
+ two minutes from 3 through 59 minutes past the hour, every two hours from 1
22
+ a.m." with no enumeration. Clean strides (`*/2` → "every two minutes") and
23
+ irregular lists (`5,10,30`) are unchanged. All languages. Spanish, German,
24
+ Finnish, and Chinese gain the idiom (Chinese and German previously enumerated
25
+ even uniform offset steps).
26
+ - **`* */2` under seconds binds its two cadences** in Spanish, German, Finnish,
27
+ and Chinese (English shipped this in 0.1.4): "cada segundo de cada dos minutos",
28
+ "jede Sekunde jeder zweiten Minute", "joka sekunti joka toisena minuuttina",
29
+ "每偶数分钟的每一秒" — no longer the juxtaposed "every second, every two minutes".
30
+ - **Chinese drops the redundant "0分" for noon** in the per-second confinement
31
+ form: `* 0 12` reads "每天正午的每一秒" (正午 already denotes 12:00); midnight keeps
32
+ "凌晨0点0分".
33
+
34
+ ## [0.1.4]
35
+
36
+ ### Fixed
37
+
38
+ - **A pinned minute 0 under sub-minute seconds no longer loses its one-minute
39
+ confinement.** `* 0 0` runs every second of the single minute 00:00 — sixty
40
+ fires, then nothing until the next midnight — but read "every second … at
41
+ midnight", which a reader takes for the whole midnight hour (3,600 fires). It
42
+ now names the bounded minute: English "every second for one minute at
43
+ midnight", Spanish "cada segundo durante un minuto a medianoche", German "jede
44
+ Sekunde der Minute 0:00", Finnish "joka sekunti minuutin 0.00 aikana", Chinese
45
+ "凌晨0点0分的每一秒". Hour lists, ranges, and steps too (`* 0 9-17`, `* 0 */2`).
46
+ Every non-zero pinned minute under seconds now reads compactly as "every second
47
+ of 9:05 a.m." / "de las 09:05". All languages.
48
+ - **Chinese keeps the start of an offset step in every context.** An offset step
49
+ such as `2/6` (hours 2, 8, 14, 20) or `5/15` (minutes :05, :20, …) could render
50
+ as the bare "每6小时" / "每15分钟" cadence — silently dropping the start — under a
51
+ minute frequency, composed with seconds, or across an hour step. Each now
52
+ enumerates its fires.
53
+
54
+ ### Changed
55
+
56
+ - **A single hour with a wildcard minute reads as that hour, not a synthesized
57
+ range.** `0 * 9` reads "every minute of the 9 a.m. hour" rather than "every
58
+ minute from 9 a.m. through 9:59 a.m." — the source has no range. Spanish "cada
59
+ minuto de la hora de las 09:00", German "jede Minute der 9-Uhr-Stunde", Finnish
60
+ "joka minuutti kello 9 aikana", Chinese "9点的每一分钟". Genuine hour ranges
61
+ (`9-17`) and partial-minute single hours (`0-30 9`) are unchanged. All
62
+ languages.
63
+ - **English `* */2` under seconds** reads "every second of every other minute"
64
+ (was "every second, every two minutes", which juxtaposed two cadences that read
65
+ as contradictory).
66
+ - **Chinese idiom polish:** an every-other-hour minute (`0 * */2` → "在偶数小时,
67
+ 每分钟"), single-hour minutes, and a restricted-hour second list ("凌晨0点5、20、
68
+ 35、50分的每一秒" instead of the misleading "每小时…").
69
+
70
+ ## [0.1.3]
71
+
72
+ ### Changed
73
+
74
+ - **Full-span ranges now read as no restriction**, matching their `*` form. A
75
+ plain range covering an entire field imposes no restriction, so `0 0 * * 0-6`
76
+ reads "every day at midnight" (was "every Sunday through Saturday at
77
+ midnight"), `0-59` is "every minute", `0 0-23 * * *` "every hour",
78
+ `1-31`/`1-12` add nothing, and every seven-day weekday range (`0-6`, `1-7`,
79
+ `0-7`, `SUN-SAT`) collapses to every day. A step whose range covers the field
80
+ does the same: `0-59/2` reads "every two minutes" instead of listing 30 fires,
81
+ `0-23/2` "every two hours". Partial ranges and steps (`9-17`, `9-17/2`,
82
+ `MON-FRI`) and the year field are unchanged. All languages.
83
+ - **Chinese now composes the clock time in second-level patterns.**
84
+ `* 2 0 * * *` read "在凌晨0点,每小时2分,每秒" — three floating clauses, with the
85
+ minute mis-stated as "minute 2 of every hour" and the hour split off — and now
86
+ reads "每天0点2分每秒". The other languages already composed these; Chinese
87
+ reused its list path for single-minute patterns instead of the clock time the
88
+ core had already assembled.
89
+
90
+ ### Fixed
91
+
92
+ - **English** no longer doubles the period when a sentence ends in an
93
+ abbreviation: `0 9 * * *` reads "Runs every day at 9 a.m." (was "…9 a.m..").
94
+ The terminator guard German gained in 0.1.2 now covers English's `a.m.`/`p.m.`.
95
+ - The **CLI reports an unknown option clearly**: `--land` (a typo for `--lang`)
96
+ now reports "Unknown option: --land" instead of mis-blaming the minute field.
97
+
9
98
  ## [0.1.2]
10
99
 
11
100
  ### Changed
package/cli.js CHANGED
@@ -52,6 +52,10 @@ if (flag !== -1) {
52
52
  }
53
53
  }
54
54
 
55
+ // After the recognized flags are consumed, any remaining `--flag` is a typo or
56
+ // an unsupported option (e.g. `--land` for `--lang`); naming it beats letting
57
+ // it fall through and surface as a confusing "invalid field value" error.
58
+ const unknownFlag = args.find((a) => a.startsWith('--'));
55
59
  const pattern = args.length === 1 ? args[0] : args;
56
60
  const requested = code || 'en';
57
61
 
@@ -59,6 +63,11 @@ if (missingLang) {
59
63
  console.error('Missing language value for --lang');
60
64
  process.exitCode = 1;
61
65
  }
66
+ else if (unknownFlag) {
67
+ console.error('Unknown option: ' + unknownFlag +
68
+ ' (valid options: --lang, --fragment)');
69
+ process.exitCode = 1;
70
+ }
62
71
  else if (availableLanguages().includes(requested)) {
63
72
  emit(pattern, (await import('./dist/lang/' + requested + '.js')).default);
64
73
  }
package/cronli5.min.js CHANGED
@@ -1,3 +1,3 @@
1
- "use strict";(()=>{var qn={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6},Vn={JAN:1,FEB:2,MAR:3,APR:4,MAY:5,JUN:6,JUL:7,AUG:8,SEP:9,OCT:10,NOV:11,DEC:12},p={second:{cyclic:!0,max:59,min:0,top:59},minute:{cyclic:!0,max:59,min:0,top:59},hour:{cyclic:!0,max:23,min:0,top:23},date:{aliases:{"?":"*"},cyclic:!0,max:31,min:1,top:31},month:{cyclic:!0,max:12,min:1,numbers:Vn,top:12},weekday:{aliases:{"?":"*",L:"6"},cyclic:!0,max:7,min:0,numbers:qn,top:6},year:{max:9999,min:1970}},O=["second","minute","hour","date","month","weekday","year"],U={"@annually":"0 0 1 1 *","@yearly":"0 0 1 1 *","@monthly":"0 0 1 * *","@weekly":"0 0 * * 0","@daily":"0 0 * * *","@midnight":"0 0 * * *","@hourly":"0 * * * *"},Q=6;function s(n,e){return(""+n).indexOf(e)!==-1}function T(n){return Array.from(new Set(n))}function I(n){return/^\d+$/.test(n)}function d(n,e){return I(n)?+n:e[n.toUpperCase()]}function sn(n){return O.forEach(function(r){Jn(n[r],p[r],r)}),n}function Jn(n,e,r){typeof n!="string"&&typeof n!="number"&&un(n,r);let t=""+n;t!=="*"&&(r==="date"&&v(t)||r==="weekday"&&w(t,e)||t.split(",").forEach(function(o){$n(o,e)||un(o,r)}))}function v(n){if(n==="L"||n==="LW"||n==="WL")return!0;let e=/^L-(\d{1,2})$/.exec(n);if(e)return+e[1]>=1&&+e[1]<=30;let r=/^(\d{1,2})W$|^W(\d{1,2})$/.exec(n);if(r){let t=+(r[1]||r[2]);return t>=1&&t<=31}return!1}function w(n,e){if(/L$/.test(n))return C(n.slice(0,-1),e);let r=n.split("#");return r.length===2?C(r[0],e)&&/^[1-5]$/.test(r[1]):!1}function $n(n,e){return s(n,"/")?Yn(n,e):s(n,"-")?an(n,e):C(n,e)}function Yn(n,e){let r=n.split("/");return r.length!==2||!I(r[1])||+r[1]<1?!1:r[0]==="*"||C(r[0],e)||an(r[0],e,!0)}function an(n,e,r){let t=n.split("-");return t.length!==2||!C(t[0],e)||!C(t[1],e)?!1:e.cyclic&&!r?!0:d(t[0],e.numbers)<=d(t[1],e.numbers)}function C(n,e){return n==="*"?!1:I(n)?+n>=e.min&&+n<=e.max:e.numbers?n.toUpperCase()in e.numbers:!1}function un(n,e){throw new Error('`cronli5` was passed an invalid field value "'+n+'" for the '+e+" field.")}var Bn={hour:24,minute:60,second:60};function cn(n){O.forEach(function(r){let t=p[r].aliases,i=t&&t[""+n[r]];i&&(n[r]=i)})}function mn(n){return O.forEach(function(r){let t=""+n[r];if(r==="date"&&v(t)||r==="weekday"&&w(t,p[r])){n[r]=t;return}n[r]=Gn(t,r,p[r])}),n}function Gn(n,e,r){let t=""+n;if(t==="*")return t;let i=Bn[e],o=t.split(",").map(function(a){return Xn(_n(Zn(Kn(a,r),r),r),r,i)}).join(",").split(",");return o.indexOf("*")!==-1?"*":T(o).sort(function(a,c){return ln(a,r)-ln(c,r)}).join(",")}function Kn(n,e){let r=n.split("/");if(!e.cyclic||r.length!==2||+r[1]!=1)return n;let t=r[0];return s(t,"-")?t:t==="*"||d(t,e.numbers)===e.min?"*":t+"-"+e.top}function Zn(n,e){let r=n.split("/");if(!e.cyclic||typeof e.top!="number"||r.length!==2||s(r[0],"-"))return n;let t=r[0];return(t==="*"?e.min:d(t,e.numbers))+ +r[1]<=e.top?n:t==="*"?""+e.min:t}function Xn(n,e,r){let t=n.split("/");if(typeof r!="number"||t.length!==2||s(t[0],"-"))return n;let i=+t[1],o=t[0]==="*"?e.min:d(t[0]);if(r%i===0&&o<i)return n;let u=[];for(let a=o;a<=e.top;a+=i)u.push(a);return u.join(",")}function _n(n,e){let r=n.split("/")[0];if(!s(r,"-"))return n;let t=r.split("-");return d(t[0],e.numbers)!==d(t[1],e.numbers)?n:t[0]}function ln(n,e){let r=n.split("/")[0].split("-")[0];return r==="*"?e.min:d(r,e.numbers)}function dn(n,e){let r=n instanceof Array;if(n===null||typeof n>"u"||n===""||r&&n.length===0)throw new Error("`cronli5` expects a non-empty cron pattern as the first argument.");if(r)return fn(n,e);if(typeof n=="object")return ne(n);if(typeof n=="string")return ee(n,e);throw new Error("`cronli5` was passed an unexpected type.")}function fn(n,e){if(n.length>7)throw new Error("`cronli5` was passed a cron pattern with more than seven fields.");return!e.seconds&&n.length<(e.years?7:6)&&n.unshift("0"),{second:n[0]||"0",minute:n[1]||"*",hour:n[2]||"*",date:n[3]||"*",month:n[4]||"*",weekday:n[5]||"*",year:n[6]||"*"}}function ne(n){if(!n.second&&!n.minute&&!n.hour)throw new Error("`cronli5` expects that any object being interpreted as a cron pattern have at least one of the following properties: `second`, `minute`, or `hour`");let e=typeof n.second<"u",r=typeof n.minute<"u",t=e?"*":"0",i=e||r?"*":"0";return{second:k(n.second,"0"),minute:k(n.minute,t),hour:k(n.hour,i),date:k(n.date,"*"),month:k(n.month,"*"),weekday:k(n.weekday,"*"),year:k(n.year,"*")}}function k(n,e){return typeof n>"u"?e:n}function ee(n,e){let r=re(n).split(/\s+/);return fn(r,e)}function re(n){let e=n.trim();if(e.charAt(0)!=="@")return n;let r=e.toLowerCase();if(Object.hasOwn(U,r))return U[r];throw new Error("`cronli5` does not recognize the macro `"+e+"`.")}function gn(n){return n!=="*"&&!s(n,",")&&!s(n,"-")&&!s(n,"/")}function q(n){return s(n,"-")&&!s(n,",")&&!s(n,"/")}function te(n){return s(n,"/")&&!s(n,",")}function V(n){return n!=="*"&&!s(n,"-")&&!s(n,"/")}function J(n){return n!=="*"&&!q(n)&&!te(n)}function R(n,e,r){let t=[],i=n;for(;i<=r;)t.push(i),i+=e;return t}function pn(n,e,r,t){let i=n.split("/"),o=+i[1];if(s(i[0],"-")){let a=i[0].split("-");return R(d(a[0],t),o,d(a[1],t))}let u=i[0]==="*"?e:d(i[0],t);return R(u,o,r)}function $(n,e,r){let t=[];return n.split(",").forEach(function(o){if(s(o,"/"))t.push(...pn(o,e,r));else if(s(o,"-")){let u=o.split("-");+u[0]<=+u[1]?t.push(...R(+u[0],1,+u[1])):(t.push(...R(+u[0],1,r)),t.push(...R(e,1,+u[1])))}else t.push(+o)}),T(t)}function ie(n){return V(n)?n.split(",").map(Number):[0]}function oe(n){if(n==="*")return[0,59];if(q(n)){let e=n.split("-");if(+e[0]<=+e[1])return[+e[0],+e[1]]}return null}function ue(n){return n==="*"?59:Math.max(...$(n,0,59))}function se(n){if(gn(n)&&n!=="0")return+n}function ae(n,e){return n==="*"?"wildcard":e==="date"&&v(n)||e==="weekday"&&w(n,p.weekday)?"quartz":s(n,",")?"list":s(n,"/")?"step":s(n,"-")?"range":"single"}function le(n,e,r){return e==="wildcard"||e==="quartz"?null:n.split(",").map(function(i){if(s(i,"/")){let o=i.split("/");return{fires:pn(i,r.min,r.top,r.numbers),interval:+o[1],kind:"step",startToken:o[0]}}return s(i,"-")?{bounds:i.split("-"),kind:"range"}:{kind:"single",value:i}})}function hn(n){let e={},r={};O.forEach(function(u){e[u]=ae(n[u],u),r[u]=le(n[u],e[u],p[u])});let i={analyses:{clockSecond:se(n.second),lastMinuteFire:ue(n.minute),minuteSpan:oe(n.minute),segments:r},pattern:n,shapes:e};return{...i,plan:ce(i)}}function ce(n){let{analyses:e,pattern:r,shapes:t}=n;if(r.second!=="0"){let i=me(r,t,e);if(i)return i}return yn(r,t,e)||Sn(r,t,e)}function me(n,e,r){let t=de(n,e);return t||(n.hour==="*"&&e.minute==="single"&&n.second!=="*"?{kind:"secondsWithinMinute",singleSecond:e.second==="single"}:e.second==="single"&&V(n.minute)&&J(n.hour)?null:{kind:"composeSeconds",rest:yn(n,e,r,!0)||Sn(n,e,r,!0)})}function de(n,e){return n.minute!=="*"||n.hour!=="*"?null:n.second==="*"?{kind:"everySecond"}:e.second==="single"?{kind:"secondPastMinute"}:{kind:"standaloneSeconds"}}function yn(n,e,r,t=!1){if(e.minute==="step")return{hours:ge(n,e,r),kind:"minuteFrequency"};if(e.hour==="single"&&r.minuteSpan)return{hour:+n.hour,kind:"minuteSpanInHour",span:r.minuteSpan};let i=pe(n,e);if(i)return i;let o=fe(n,e);if(o)return o;if(n.hour==="*")return he(n,e,t)}function bn(n){let[e,r]=n.split("/"),t=e==="*"?0:+e;return e.indexOf("-")===-1&&24%+r===0&&t<+r}function fe(n,e){return e.hour!=="step"?null:n.minute==="*"?bn(n.hour)?{form:"wildcard",kind:"minuteSpanAcrossHourStep"}:{form:"wildcard",kind:"minutesAcrossHours",times:M(n.hour)}:e.minute==="range"?{form:"range",kind:"minuteSpanAcrossHourStep"}:null}function ge(n,e,r){if(e.hour==="list")return{kind:"during",times:M(n.hour)};if(e.hour==="range"){let t=n.hour.split("-");return{from:+t[0],kind:"window",last:r.lastMinuteFire,to:+t[1]}}return e.hour==="single"?{from:+n.hour,kind:"window",last:r.lastMinuteFire,to:+n.hour}:e.hour==="step"?bn(n.hour)?{kind:"step"}:{kind:"during",times:M(n.hour)}:{kind:"none"}}function pe(n,e){return J(n.hour)?n.minute==="*"?{form:"wildcard",kind:"minutesAcrossHours",times:M(n.hour)}:e.minute==="range"||e.minute==="list"&&s(n.minute,"-")&&!s(n.minute,"/")?{form:e.minute==="range"?"range":"list",kind:"minutesAcrossHours",times:M(n.hour)}:null:null}function he(n,e,r){if(e.minute==="range")return{kind:"rangeOfMinutes"};if(e.minute==="list")return{kind:"multipleMinutes"};if(n.minute==="*")return{kind:"everyMinute"};if(n.minute!=="0"||r)return{kind:"singleMinute"}}function Sn(n,e,r,t=!1){let i=t&&n.minute==="0";return e.hour==="range"&&!i?ye(n,e,r):e.hour==="step"&&n.minute==="0"&&!t?{kind:"hourStep"}:n.hour==="*"&&!i?{kind:"everyHour"}:be(n,r,i)}function ye(n,e,r){let t=n.hour.split("-"),i="lead";return n.minute==="*"?i="wildcard":e.minute==="range"&&(i="range"),{boundMinute:e.minute==="range"||e.minute==="list"?null:r.lastMinuteFire,from:+t[0],kind:"hourRange",last:r.lastMinuteFire,minuteForm:i,to:+t[1]}}function be(n,e,r=!1){let t=$(n.hour,0,23),i=ie(n.minute);if(!r&&t.length*i.length>Q)return{fold:i.length===1,kind:"compactClockTimes",minute:i[0]};let o=[];return t.forEach(function(a){i.forEach(function(j){o.push({hour:a,minute:j,second:e.clockSecond})})}),{kind:"clockTimes",times:o}}function M(n){let e=$(n,0,23);return e.length<=Q?{fires:e,kind:"fires"}:{kind:"segments"}}function On(n,e){let r=dn(n,e);return cn(r),sn(r),mn(r)}function Y(n){return n=""+n,n.length<2?"0"+n:n}function kn(n,e,r){return r.short?n:e[n]||n}function B(n,{sep:e,pad:r,lean:t}){let i=r?Y(n.hour):""+n.hour;return t&&!n.minute&&!n.second?i:i+e+Y(n.minute)+(n.second?e+Y(n.second):"")}var G={gb:{am:"am",closeUp:!0,dayFirst:!0,midday:"midday",midnight:"midnight",ordinals:!1,pm:"pm",sep:".",serialComma:!1,through:" to "},us:{am:"a.m.",closeUp:!1,dayFirst:!1,midday:"noon",midnight:"midnight",ordinals:!1,pm:"p.m.",sep:":",serialComma:!0,through:" through "},house:{am:"AM",closeUp:!1,dayFirst:!1,midday:"noon",midnight:"midnight",ordinals:!0,pm:"PM",sep:":",serialComma:!0,through:" - "}};function Nn(n){return typeof n=="object"&&n!==null?{...G.us,...n}:G[n==="uk"?"gb":n]||G.us}var Se=["zero","one","two","three","four","five","six","seven","eight","nine","ten"],K=["th","st","nd","rd"],f=[null,["January","Jan"],["February","Feb"],["March","Mar"],["April","Apr"],["May","May"],["June","Jun"],["July","Jul"],["August","Aug"],["September","Sep"],["October","Oct"],["November","Nov"],["December","Dec"]],y=[["Sunday","Sun"],["Monday","Mon"],["Tuesday","Tue"],["Wednesday","Wed"],["Thursday","Thu"],["Friday","Fri"],["Saturday","Sat"]],Oe={JAN:f[1],FEB:f[2],MAR:f[3],APR:f[4],MAY:f[5],JUN:f[6],JUL:f[7],AUG:f[8],SEP:f[9],OCT:f[10],NOV:f[11],DEC:f[12]},ke={SUN:y[0],MON:y[1],TUE:y[2],WED:y[3],THU:y[4],FRI:y[5],SAT:y[6]},Ne=[null,"first","second","third","fourth","fifth"];function ze(n){return n=n||{},{ampm:typeof n.ampm=="boolean"?n.ampm:!0,lenient:!!n.lenient,seconds:!!n.seconds,short:!!n.short,style:Nn(n.dialect),years:!!n.years}}function Pe(n,e){return er(Pn(n,n.plan,e),n,e)}function Pn(n,e,r){let t=$e[e.kind];return t(n,e,r)}function Ce(n,e,r){return"every second"+l(n,r)}function ve(n,e,r){return H(n,r)+l(n,r)}function we(n,e,r){let t=n.pattern.second;return g(t,r)+" "+P(t,"second")+" past the minute, every minute"+l(n,r)}function Re(n,e,r){let t=n.pattern.minute,i=g(t,r),o=P(t,"minute");if(e.singleSecond){let u=n.pattern.second;return i+" "+o+" and "+g(u,r)+" "+P(u,"second")+" past the hour, every hour"+l(n,r)}return H(n,r)+", "+i+" "+o+" past the hour, every hour"+l(n,r)}function Me(n,e,r){return H(n,r)+", "+Pn(n,e.rest,r)}function H(n,e){let r=n.pattern.second,t=n.shapes.second;if(r==="*")return"every second";if(t==="step")return Rn(n.analyses.segments.second[0],"second","minute",e);if(t==="range"){let i=r.split("-"),o=A(i,e);return"every second from "+o(i[0])+S(e)+o(i[1])+" past the minute"}return t==="single"?"at "+g(r,e)+" "+P(r,"second")+" past the minute":z(F(n.analyses.segments.second,e),"second","minute",e)}function xe(n,e,r){return"every minute"+l(n,r)}function Fe(n,e,r){let t=n.pattern.minute;return g(t,r)+" "+P(t,"minute")+" past the hour, every hour"+l(n,r)}function Te(n,e,r){return L(n.pattern.minute,r)+l(n,r)}function Ie(n,e,r){return z(F(n.analyses.segments.minute,r),"minute","hour",r)+l(n,r)}function He(n,e,r){let t=Rn(n.analyses.segments.minute[0],"minute","hour",r);return e.hours.kind==="during"?t+=" during the "+X(n,e.hours.times,!1,r)+" hours":e.hours.kind==="window"?t+=" "+wn(e.hours,r):e.hours.kind==="step"&&(t+=" "+Cn(n.analyses.segments.hour[0],r)),t+l(n,r)}function Le(n,e,r){return"every minute from "+m({hour:e.hour,minute:e.span[0]},r)+S(r)+m({hour:e.hour,minute:e.span[1]},r)+l(n,r)}function Ae(n,e,r){if(e.form==="wildcard")return"every minute during the "+X(n,e.times,!1,r)+" hours"+l(n,r);let t=X(n,e.times,!0,r);return(e.form==="range"?L(n.pattern.minute,r):z(F(n.analyses.segments.minute,r),"minute","hour",r))+", at "+t+l(n,r)}var Ee={2:"other",3:"third",4:"fourth",6:"sixth",8:"eighth",12:"twelfth"};function Cn(n,e){let r="during every "+Ee[n.interval]+" hour",t=n.startToken==="*"?0:+n.startToken;return t===0?r:r+" starting at "+m({hour:t,minute:0},e)}function We(n,e,r){let t=n.analyses.segments.hour[0];return e.form==="wildcard"?"every minute "+Cn(t,r)+l(n,r):L(n.pattern.minute,r)+", "+Mn(t,r)+l(n,r)}function L(n,e){let r=n.split("-"),t=A(r,e);return"every minute from "+t(r[0])+S(e)+t(r[1])+" past the hour"}function je(n,e,r){return"every hour"+l(n,r)}function De(n,e,r){let t=wn(Qe(e),r);return e.minuteForm==="wildcard"?"every minute "+t+l(n,r):e.minuteForm==="range"?L(n.pattern.minute,r)+", "+t+l(n,r):vn(n,r)+" "+t+l(n,r)}function vn(n,e){return n.pattern.minute==="0"?"every hour":z(F(n.analyses.segments.minute,e),"minute","hour",e)}function Ue(n,e,r){return Mn(n.analyses.segments.hour[0],r)+l(n,r)}function Qe(n){return{from:n.from,last:n.boundMinute??0,to:n.to}}function wn(n,e){return"from "+m({hour:n.from,minute:0},e)+S(e)+m({hour:n.to,minute:n.last},e)}function qe(n,e,r){let t=rn(e.times),i=e.times.map(function(u){return m({hour:u.hour,minute:u.minute,second:u.second,plain:t},r)});return xn(n,r)+"at "+b(i,r)}function Ve(n,e,r){if(e.fold){if(n.analyses.segments.hour.some(function(a){return a.kind==="range"})&&!n.analyses.clockSecond)return Je(n,e,r)+l(n,r);let o={minute:e.minute,second:n.analyses.clockSecond};return xn(n,r)+"at "+_(n,o,!0,r)}let t=z(F(n.analyses.segments.minute,r),"minute","hour",r)+", at "+_(n,{minute:0,second:null},!0,r)+l(n,r);return n.analyses.clockSecond?H(n,r)+", "+t:t}function Je(n,e,r){let t=e.minute,i=[],o=[];n.analyses.segments.hour.forEach(function(c){c.kind==="range"?i.push("from "+m({hour:c.bounds[0],minute:0},r)+S(r)+m({hour:c.bounds[1],minute:t},r)):c.kind==="step"?o.push(...c.fires):o.push(+c.value)});let u=vn(n,r)+" "+b(i,r);return o.length&&(u+=" and at "+b(o.map(function(c){return m({hour:c,minute:t},r)}),r)),u}var $e={clockTimes:qe,compactClockTimes:Ve,composeSeconds:Me,everyHour:je,everyMinute:xe,everySecond:Ce,hourRange:De,hourStep:Ue,minuteFrequency:He,minuteSpanAcrossHourStep:We,minuteSpanInHour:Le,minutesAcrossHours:Ae,multipleMinutes:Ie,rangeOfMinutes:Te,secondPastMinute:we,secondsWithinMinute:Re,singleMinute:Fe,standaloneSeconds:ve};function Rn(n,e,r,t){if(n.startToken.indexOf("-")!==-1)return z(zn(n.fires,t),e,r,t);let i=n.startToken==="*"?0:+n.startToken,o=n.interval;return i!==0?n.fires.length<=3?z(zn(n.fires,t),e,r,t):"every "+g(o,t)+" "+e+"s from "+g(i,t)+" "+P(i,e)+" past the "+r:"every "+g(o,t)+" "+e+"s"}function Mn(n,e){if(n.startToken.indexOf("-")!==-1)return"at "+Z(n.fires,e);let r=n.startToken==="*"?0:+n.startToken,t=n.interval;return r===0?"every "+g(t,e)+" hours":n.fires.length<=3?"at "+Z(n.fires,e):"every "+g(t,e)+" hours from "+m({hour:r,minute:0},e)}function A(n,e){let r=n.some(function(i){return+i>10});return function(i){return r?""+i:g(i,e)}}function zn(n,e){return n.map(A(n,e))}function F(n,e){let r=n.flatMap(function(o){return o.kind==="range"?o.bounds:o.kind==="step"?o.fires:[o.value]}),t=A(r,e);return n.flatMap(function(o){return o.kind==="range"?[t(o.bounds[0])+S(e)+t(o.bounds[1])]:o.kind==="step"?o.fires.map(t):[t(o.value)]})}function z(n,e,r,t){return"at "+b(n,t)+" "+e+"s past the "+r}function Ye(n,e,r){return(+n==0||+n==12)&&+e==0&&!(typeof r=="number"&&r>0)}function rn(n){let e=n.filter(function(t){return Ye(t.hour,t.minute,t.second)});return e.length>0&&e.length<n.length}function Z(n,e){let r=rn(n.map(function(o){return{hour:o,minute:0}})),t=n.map(function(o){return m({hour:o,minute:0,plain:r},e)});return b(t,e)}function X(n,e,r,t){return e.kind==="fires"?Z(e.fires,t):_(n,{minute:0,second:null},r,t)}function Be(n){return n.kind==="range"?n.bounds:n.kind==="step"?n.fires:[n.value]}function _(n,e,r,t){let{minute:i,second:o}=e,u=n.analyses.segments.hour,a=rn(u.flatMap(function(h){return Be(h).map(function(D){return{hour:+D,minute:i,second:o}})})),c=[];return u.forEach(function(h){h.kind==="step"?c.push(...h.fires.map(function(D){return m({hour:D,minute:i,second:o,plain:a},t)})):h.kind==="range"?c.push(m({hour:h.bounds[0],minute:i,second:o,plain:a},t)+S(t)+m({hour:h.bounds[1],minute:i,second:o,plain:a},t)):c.push(m({hour:h.value,minute:i,second:o,plain:a},t))}),b(Ge(c,u,r),t)}function Ge(n,e,r){let t=e.some(function(o){return o.kind==="range"});return!r||!t?n:n.map(function(o,u){return u===0?o:"at "+o})}function b(n,e){if(n.length<=1)return n.join("");if(n.length===2)return n[0]+" and "+n[1];let r=e.style.serialComma?", and ":" and ";return n.slice(0,-1).join(", ")+r+n[n.length-1]}var Ke={all:"",month:"in ",stepDate:"on ",weekday:"on "},Ze={all:"every day",month:"every day in ",stepDate:"",weekday:"every "};function l(n,e){let r=Fn(n,Ke,e);return r&&" "+r}function xn(n,e){return Fn(n,Ze,e)+" "}function Fn(n,e,r){let t=n.pattern;return t.date!=="*"&&t.weekday!=="*"?_e(n,r):t.date!=="*"?Xe(n,e,r):t.weekday!=="*"?(Hn(t.weekday,r)||e.weekday+Wn(n,r))+N(n,r):t.month!=="*"?e.month+E(n,r):e.all}function Xe(n,e,r){let t=n.pattern,i=In(t.date,r);return i?i+N(n,r):tn(t.date)?e.stepDate+An(t.date)+N(n,r):t.month!=="*"&&!Tn(n)?"on the "+nn(n,r)+N(n,r):t.month!=="*"?"on "+Ln(n,r):"on the "+nn(n,r)}function Tn(n){return!En(n.pattern.month)&&n.analyses.segments.month.every(function(r){return r.kind!=="range"})}function _e(n,e){let r=n.pattern,t=Hn(r.weekday,e)||"on "+Wn(n,e),i=In(r.date,e);return i?i+N(n,e)+" or "+t:tn(r.date)?An(r.date)+N(n,e)+" or "+t:r.month!=="*"&&Tn(n)?"on "+Ln(n,e)+" or "+t+" in "+E(n,e):"on the "+nn(n,e)+" or "+t+N(n,e)}function In(n,e){if(n==="L")return"on the last day of the month";if(n==="LW"||n==="WL")return"on the last weekday of the month";let r=/^L-(\d{1,2})$/.exec(n);if(r)return g(+r[1],e)+" "+P(r[1],"day")+" before the last day of the month";let t=/^(\d{1,2})W$|^W(\d{1,2})$/.exec(n);if(t)return"on the weekday nearest the "+x(t[1]||t[2])}function Hn(n,e){let r=n.split("#");if(r.length===2)return"on the "+Ne[+r[1]]+" "+en(r[0],e)+" of the month";if(/L$/.test(n))return"on the last "+en(n.slice(0,-1),e)+" of the month"}function Ln(n,e){let r=E(n,e),t=W(n.analyses.segments.date,e.style.ordinals?x:nr,e);return e.style.dayFirst?t+" "+r:r+" "+t}function nr(n){return""+n}function N(n,e){return n.pattern.month==="*"?"":" in "+E(n,e)}function An(n){let e=n.split("/"),r=+e[1],t=e[0],o=(r===2?"every other":"every "+x(r))+" day of the month";return t!=="*"&&t!=="1"&&(o+=" from the "+x(t)),o}function nn(n,e){return W(n.analyses.segments.date,x,e)}function E(n,e){let r=En(n.pattern.month);return r||W(n.analyses.segments.month,function(i){return or(i,e)},e)}function En(n){if(!tn(n))return null;let[e,r]=n.split("/");return+r!=2?null:e==="*"||e==="1"?"every odd-numbered month":e==="2"?"every even-numbered month":null}function Wn(n,e){return W(n.analyses.segments.weekday,function(t){return en(t,e)},e)}function W(n,e,r){let t=[];return n.forEach(function(o){o.kind==="step"?t.push(...o.fires.map(e)):o.kind==="range"?t.push(o.bounds.map(e).join(S(r))):t.push(e(o.value))}),b(t,r)}function tn(n){return n.indexOf("/")!==-1&&n.indexOf("-")===-1&&n.indexOf(",")===-1}function er(n,e,r){let t=e.pattern.year;if(t==="*")return n;if(t.indexOf("/")!==-1)return n+" "+tr(t,r);let i=rr(t,r);if(t.indexOf("-")===-1&&t.indexOf(",")===-1&&e.pattern.date!=="*"&&n.indexOf(" at ")!==-1){let o=r.style.dayFirst?" ":", ";return n.replace(" at ",o+i+" at ")}return n+" in "+i}function rr(n,e){return n.indexOf(",")!==-1?b(n.split(","),e):n}function tr(n,e){let r=n.split("/"),t=+r[1],i=r[0];if(t<=1)return"every year";let o="every "+g(t,e)+" years";return i!=="*"&&i!=="0"&&(o+=" from "+i),o}function m(n,e){let{hour:r,minute:t,plain:i}=n,o=typeof n.second=="number"&&n.second>0?n.second:0;return e.ampm?ir({hour:r,minute:t,second:o,plain:i},e):B({hour:r,minute:t,second:o},{pad:!0,sep:e.style.sep})}function ir(n,e){let{hour:r,minute:t,second:i,plain:o}=n,u=e.style;if(!o&&+t==0&&!i){if(+r==0)return u.midnight;if(+r==12)return u.midday}return B({hour:r%12||12,minute:t,second:i},{lean:!0,sep:u.sep})+(u.closeUp?"":" ")+(r<12?u.am:u.pm)}function g(n,e){return kn(n,Se,e)}function P(n,e){return+n==1?e:e+"s"}function S(n){return n.short?"-":n.style.through}function x(n){let e=Math.abs(n),r=K[e];return r||(e=(e%100-20)%10,r=K[e]||K[0]),n+r}function or(n,e){let r=f[n]||Oe[n];return r&&r[e.short?1:0]}function en(n,e){let r=n===7||n==="7"?0:n,t=y[r]||ke[r];return t&&t[e.short?1:0]}var ur={describe:Pe,fallback:"an unrecognizable cron pattern",options:ze,reboot:"at system startup",sentence:n=>"Runs "+n+"."},jn=ur;/**
1
+ "use strict";(()=>{var Xn={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6},_n={JAN:1,FEB:2,MAR:3,APR:4,MAY:5,JUN:6,JUL:7,AUG:8,SEP:9,OCT:10,NOV:11,DEC:12},y={second:{cyclic:!0,max:59,min:0,top:59},minute:{cyclic:!0,max:59,min:0,top:59},hour:{cyclic:!0,max:23,min:0,top:23},date:{aliases:{"?":"*"},cyclic:!0,max:31,min:1,top:31},month:{cyclic:!0,max:12,min:1,numbers:_n,top:12},weekday:{aliases:{"?":"*",L:"6"},cyclic:!0,max:7,min:0,numbers:Xn,top:6},year:{max:9999,min:1970}},k=["second","minute","hour","date","month","weekday","year"],V={"@annually":"0 0 1 1 *","@yearly":"0 0 1 1 *","@monthly":"0 0 1 * *","@weekly":"0 0 * * 0","@daily":"0 0 * * *","@midnight":"0 0 * * *","@hourly":"0 * * * *"},x=6;function a(n,e){return(""+n).indexOf(e)!==-1}function j(n){return Array.from(new Set(n))}function E(n){return/^\d+$/.test(n)}function $(n){if(n.length<5)return null;let e=n[1]-n[0];if(e<2)return null;for(let t=2;t<n.length;t+=1)if(n[t]-n[t-1]!==e)return null;return{start:n[0],interval:e,last:n[n.length-1]}}function f(n,e){return E(n)?+n:e[n.toUpperCase()]}function gn(n){return k.forEach(function(t){ne(n[t],y[t],t)}),n}function ne(n,e,t){typeof n!="string"&&typeof n!="number"&&dn(n,t);let r=""+n;r!=="*"&&(t==="date"&&T(r)||t==="weekday"&&F(r,e)||r.split(",").forEach(function(o){ee(o,e)||dn(o,t)}))}function T(n){if(n==="L"||n==="LW"||n==="WL")return!0;let e=/^L-(\d{1,2})$/.exec(n);if(e)return+e[1]>=1&&+e[1]<=30;let t=/^(\d{1,2})W$|^W(\d{1,2})$/.exec(n);if(t){let r=+(t[1]||t[2]);return r>=1&&r<=31}return!1}function F(n,e){if(/L$/.test(n))return v(n.slice(0,-1),e);let t=n.split("#");return t.length===2?v(t[0],e)&&/^[1-5]$/.test(t[1]):!1}function ee(n,e){return a(n,"/")?te(n,e):a(n,"-")?hn(n,e):v(n,e)}function te(n,e){let t=n.split("/");return t.length!==2||!E(t[1])||+t[1]<1?!1:t[0]==="*"||v(t[0],e)||hn(t[0],e,!0)}function hn(n,e,t){let r=n.split("-");return r.length!==2||!v(r[0],e)||!v(r[1],e)?!1:e.cyclic&&!t?!0:f(r[0],e.numbers)<=f(r[1],e.numbers)}function v(n,e){return n==="*"?!1:E(n)?+n>=e.min&&+n<=e.max:e.numbers?n.toUpperCase()in e.numbers:!1}function dn(n,e){throw new Error('`cronli5` was passed an invalid field value "'+n+'" for the '+e+" field.")}var re={hour:24,minute:60,second:60};function yn(n){k.forEach(function(t){let r=y[t].aliases,i=r&&r[""+n[t]];i&&(n[t]=i)})}function bn(n){return k.forEach(function(t){let r=""+n[t];if(t==="date"&&T(r)||t==="weekday"&&F(r,y[t])){n[t]=r;return}n[t]=ie(r,t,y[t])}),n}function ie(n,e,t){let r=""+n;if(r==="*")return r;let i=re[e],o=r.split(",").map(function(s){return oe(Sn(le(ce(me(ae(se(s,t),t),t),t),t,i),t),t)}).join(",").split(",");return o.indexOf("*")!==-1?"*":j(o).sort(function(s,c){return pn(s,t)-pn(c,t)}).join(",")}function oe(n,e){if(!e.numbers)return n;let t=n.split("/"),r=t[0].split("-").map(function(o){return ue(o,e)}).join("-");return t.length===2?r+"/"+t[1]:r}function ue(n,e){if(n==="*")return n;let t=f(n,e.numbers);return""+(t>e.top?e.min:t)}function se(n,e){let t=n.split("/");if(!e.cyclic||t.length!==2||+t[1]!=1)return n;let r=t[0];return a(r,"-")?r:r==="*"||f(r,e.numbers)===e.min?"*":r+"-"+e.top}function ae(n,e){let t=n.split("/");if(!e.cyclic||typeof e.top!="number"||t.length!==2||a(t[0],"-"))return n;let r=t[0];return(r==="*"?e.min:f(r,e.numbers))+ +t[1]<=e.top?n:r==="*"?""+e.min:r}function le(n,e,t){let r=n.split("/");if(typeof t!="number"||r.length!==2||a(r[0],"-"))return n;let i=+r[1],o=r[0]==="*"?e.min:f(r[0]);if(t%i===0&&o<i)return n;let u=[];for(let s=o;s<=e.top;s+=i)u.push(s);return u.join(",")}function ce(n,e){let t=n.split("/");return t.length!==2||!a(t[0],"-")?n:Sn(t[0],e)==="*"?"*/"+t[1]:n}function Sn(n,e){if(typeof e.top!="number"||a(n,"/")||!a(n,"-"))return n;let t=n.split("-"),r=f(t[0],e.numbers),i=f(t[1],e.numbers);if(r>i)return n;let o=e.top,u={};for(let s=r;s<=i;s+=1)u[s>o?e.min:s]=!0;for(let s=e.min;s<=o;s+=1)if(!u[s])return n;return"*"}function me(n,e){let t=n.split("/")[0];if(!a(t,"-"))return n;let r=t.split("-");return f(r[0],e.numbers)!==f(r[1],e.numbers)?n:r[0]}function pn(n,e){let t=n.split("/")[0].split("-")[0];return t==="*"?e.min:f(t,e.numbers)}function On(n,e){let t=n instanceof Array;if(n===null||typeof n>"u"||n===""||t&&n.length===0)throw new Error("`cronli5` expects a non-empty cron pattern as the first argument.");if(t)return kn(n,e);if(typeof n=="object")return fe(n);if(typeof n=="string")return de(n,e);throw new Error("`cronli5` was passed an unexpected type.")}function kn(n,e){if(n.length>7)throw new Error("`cronli5` was passed a cron pattern with more than seven fields.");return!e.seconds&&n.length<(e.years?7:6)&&n.unshift("0"),{second:n[0]||"0",minute:n[1]||"*",hour:n[2]||"*",date:n[3]||"*",month:n[4]||"*",weekday:n[5]||"*",year:n[6]||"*"}}function fe(n){if(!n.second&&!n.minute&&!n.hour)throw new Error("`cronli5` expects that any object being interpreted as a cron pattern have at least one of the following properties: `second`, `minute`, or `hour`");let e=typeof n.second<"u",t=typeof n.minute<"u",r=e?"*":"0",i=e||t?"*":"0";return{second:N(n.second,"0"),minute:N(n.minute,r),hour:N(n.hour,i),date:N(n.date,"*"),month:N(n.month,"*"),weekday:N(n.weekday,"*"),year:N(n.year,"*")}}function N(n,e){return typeof n>"u"?e:n}function de(n,e){let t=ge(n).split(/\s+/);return kn(t,e)}function ge(n){let e=n.trim();if(e.charAt(0)!=="@")return n;let t=e.toLowerCase();if(Object.hasOwn(V,t))return V[t];throw new Error("`cronli5` does not recognize the macro `"+e+"`.")}function Nn(n){return n!=="*"&&!a(n,",")&&!a(n,"-")&&!a(n,"/")}function J(n){return a(n,"-")&&!a(n,",")&&!a(n,"/")}function he(n){return a(n,"/")&&!a(n,",")}function Y(n){return n!=="*"&&!a(n,"-")&&!a(n,"/")}function B(n){return n!=="*"&&!J(n)&&!he(n)}function M(n,e,t){let r=[],i=n;for(;i<=t;)r.push(i),i+=e;return r}function zn(n,e,t,r){let i=n.split("/"),o=+i[1];if(a(i[0],"-")){let s=i[0].split("-");return M(f(s[0],r),o,f(s[1],r))}let u=i[0]==="*"?e:f(i[0],r);return M(u,o,t)}function K(n,e,t){let r=[];return n.split(",").forEach(function(o){if(a(o,"/"))r.push(...zn(o,e,t));else if(a(o,"-")){let u=o.split("-");+u[0]<=+u[1]?r.push(...M(+u[0],1,+u[1])):(r.push(...M(+u[0],1,t)),r.push(...M(e,1,+u[1])))}else r.push(+o)}),j(r)}function pe(n){return Y(n)?n.split(",").map(Number):[0]}function ye(n){if(n==="*")return[0,59];if(J(n)){let e=n.split("-");if(+e[0]<=+e[1])return[+e[0],+e[1]]}return null}function be(n){return n==="*"?59:Math.max(...K(n,0,59))}function Se(n){if(Nn(n)&&n!=="0")return+n}function Oe(n,e){return n==="*"?"wildcard":e==="date"&&T(n)||e==="weekday"&&F(n,y.weekday)?"quartz":a(n,",")?"list":a(n,"/")?"step":a(n,"-")?"range":"single"}function ke(n,e,t){return e==="wildcard"||e==="quartz"?null:n.split(",").map(function(i){if(a(i,"/")){let o=i.split("/");return{fires:zn(i,t.min,t.top,t.numbers),interval:+o[1],kind:"step",startToken:o[0]}}return a(i,"-")?{bounds:i.split("-"),kind:"range"}:{kind:"single",value:i}})}function Pn(n){let e={},t={};k.forEach(function(u){e[u]=Oe(n[u],u),t[u]=ke(n[u],e[u],y[u])});let i={analyses:{clockSecond:Se(n.second),lastMinuteFire:be(n.minute),minuteSpan:ye(n.minute),segments:t},pattern:n,shapes:e};return{...i,plan:Ne(i)}}function Ne(n){let{analyses:e,pattern:t,shapes:r}=n;if(t.second!=="0"){let i=ze(t,r,e);if(i)return i}return vn(t,r,e)||Rn(t,r,e)}function ze(n,e,t){let r=Pe(n,e);return r||(n.hour==="*"&&e.minute==="single"&&n.second!=="*"?{kind:"secondsWithinMinute",singleSecond:e.second==="single"}:e.second==="single"&&Y(n.minute)&&B(n.hour)?null:{kind:"composeSeconds",rest:vn(n,e,t,!0)||Rn(n,e,t,!0)})}function Pe(n,e){return n.minute!=="*"||n.hour!=="*"?null:n.second==="*"?{kind:"everySecond"}:e.second==="single"?{kind:"secondPastMinute"}:{kind:"standaloneSeconds"}}function vn(n,e,t,r=!1){if(e.minute==="step")return{hours:Re(n,e,t),kind:"minuteFrequency"};if(e.hour==="single"&&t.minuteSpan)return{hour:+n.hour,kind:"minuteSpanInHour",span:t.minuteSpan};let i=Ce(n,e);if(i)return i;let o=ve(n,e);if(o)return o;if(n.hour==="*")return we(n,e,r)}function G(n){let[e,t]=n.split("/"),r=e==="*"?0:+e;return e.indexOf("-")===-1&&24%+t===0&&r<+t}function ve(n,e){return e.hour!=="step"?null:n.minute==="*"?G(n.hour)?{form:"wildcard",kind:"minuteSpanAcrossHourStep"}:{form:"wildcard",kind:"minutesAcrossHours",times:I(n.hour)}:e.minute==="range"?{form:"range",kind:"minuteSpanAcrossHourStep"}:e.minute==="list"&&G(n.hour)?{form:"list",kind:"minuteSpanAcrossHourStep"}:null}function Re(n,e,t){if(e.hour==="list")return{kind:"during",times:I(n.hour)};if(e.hour==="range"){let r=n.hour.split("-");return{from:+r[0],kind:"window",last:t.lastMinuteFire,to:+r[1]}}return e.hour==="single"?{from:+n.hour,kind:"window",last:t.lastMinuteFire,to:+n.hour}:e.hour==="step"?G(n.hour)?{kind:"step"}:{kind:"during",times:I(n.hour)}:{kind:"none"}}function Ce(n,e){return B(n.hour)?n.minute==="*"?{form:"wildcard",kind:"minutesAcrossHours",times:I(n.hour)}:e.minute==="range"||e.minute==="list"&&a(n.minute,"-")&&!a(n.minute,"/")?{form:e.minute==="range"?"range":"list",kind:"minutesAcrossHours",times:I(n.hour)}:null:null}function we(n,e,t){if(e.minute==="range")return{kind:"rangeOfMinutes"};if(e.minute==="list")return{kind:"multipleMinutes"};if(n.minute==="*")return{kind:"everyMinute"};if(n.minute!=="0"||t)return{kind:"singleMinute"}}function Rn(n,e,t,r=!1){let i=r&&n.minute==="0";return e.hour==="range"&&!i?xe(n,e,t):e.hour==="step"&&n.minute==="0"&&!r?{kind:"hourStep"}:n.hour==="*"&&!i?{kind:"everyHour"}:Te(n,t,i)}function xe(n,e,t){let r=n.hour.split("-"),i="lead";return n.minute==="*"?i="wildcard":e.minute==="range"&&(i="range"),{boundMinute:e.minute==="range"||e.minute==="list"?null:t.lastMinuteFire,from:+r[0],kind:"hourRange",last:t.lastMinuteFire,minuteForm:i,to:+r[1]}}function Te(n,e,t=!1){let r=K(n.hour,0,23),i=pe(n.minute);if(!t&&r.length*i.length>x)return{fold:i.length===1,kind:"compactClockTimes",minute:i[0]};let o=[];return r.forEach(function(s){i.forEach(function(P){o.push({hour:s,minute:P,second:e.clockSecond})})}),{kind:"clockTimes",times:o}}function I(n){let e=K(n,0,23);return e.length<=x?{fires:e,kind:"fires"}:{kind:"segments"}}function Cn(n,e){let t=On(n,e);return yn(t),gn(t),bn(t)}function Z(n){return n=""+n,n.length<2?"0"+n:n}function wn(n,e,t){return t.short?n:e[n]||n}function X(n,{sep:e,pad:t,lean:r}){let i=t?Z(n.hour):""+n.hour;return r&&!n.minute&&!n.second?i:i+e+Z(n.minute)+(n.second?e+Z(n.second):"")}var _={gb:{am:"am",closeUp:!0,dayFirst:!0,midday:"midday",midnight:"midnight",ordinals:!1,pm:"pm",sep:".",serialComma:!1,through:" to "},us:{am:"a.m.",closeUp:!1,dayFirst:!1,midday:"noon",midnight:"midnight",ordinals:!1,pm:"p.m.",sep:":",serialComma:!0,through:" through "},house:{am:"AM",closeUp:!1,dayFirst:!1,midday:"noon",midnight:"midnight",ordinals:!0,pm:"PM",sep:":",serialComma:!0,through:" - "}};function xn(n){return typeof n=="object"&&n!==null?{..._.us,...n}:_[n==="uk"?"gb":n]||_.us}var Fe=["zero","one","two","three","four","five","six","seven","eight","nine","ten"],nn=["th","st","nd","rd"],Me=[null,["January","Jan"],["February","Feb"],["March","Mar"],["April","Apr"],["May","May"],["June","Jun"],["July","Jul"],["August","Aug"],["September","Sep"],["October","Oct"],["November","Nov"],["December","Dec"]],S=[["Sunday","Sun"],["Monday","Mon"],["Tuesday","Tue"],["Wednesday","Wed"],["Thursday","Thu"],["Friday","Fri"],["Saturday","Sat"]],Ie={SUN:S[0],MON:S[1],TUE:S[2],WED:S[3],THU:S[4],FRI:S[5],SAT:S[6]},He=[null,"first","second","third","fourth","fifth"];function Le(n){return n=n||{},{ampm:typeof n.ampm=="boolean"?n.ampm:!0,lenient:!!n.lenient,seconds:!!n.seconds,short:!!n.short,style:xn(n.dialect),years:!!n.years}}function We(n,e){return bt(Fn(n,n.plan,e),n,e)}function Fn(n,e,t){let r=ut[e.kind];return r(n,e,t)}function je(n,e,t){return"every second"+l(n,t)}function Ee(n,e,t){return R(n,t)+l(n,t)}function Ae(n,e,t){let r=n.pattern.second;return d(r,t)+" "+b(r,"second")+" past the minute, every minute"+l(n,t)}function De(n,e,t){let r=n.pattern.minute,i=d(r,t),o=b(r,"minute");if(e.singleSecond){let u=n.pattern.second;return i+" "+o+" and "+d(u,t)+" "+b(u,"second")+" past the hour, every hour"+l(n,t)}return R(n,t)+", "+i+" "+o+" past the hour, every hour"+l(n,t)}function Ue(n,e,t){return(e.rest.kind==="clockTimes"||e.rest.kind==="compactClockTimes")&&n.shapes.minute==="single"?an(n,+n.pattern.minute,t):null}function Qe(n,e,t){let r=Ue(n,e,t);return r!==null?r:e.rest.kind==="clockTimes"&&(n.shapes.second==="wildcard"||n.shapes.second==="step")?+e.rest.times[0].minute==0?R(n,t)+" for one minute at "+qe(n,e.rest,t):R(n,t)+" of "+Ve(n,e.rest,t):n.shapes.second==="wildcard"&&e.rest.kind==="minuteFrequency"&&e.rest.hours.kind==="none"&&n.pattern.minute==="*/2"?"every second of every other minute"+l(n,t):R(n,t)+", "+Fn(n,e.rest,t)}function qe(n,e,t){let r=e.times.map(function(u){return m({hour:u.hour,minute:0},t)}),i=D(n,cn,t);return h(r,t)+(i&&", "+i)}function Ve(n,e,t){let r=e.times.map(function(u){return m({hour:u.hour,minute:u.minute,second:u.second,explicit:!0},t)}),i=D(n,cn,t);return h(r,t)+(i&&", "+i)}function R(n,e){return H(n,"minute",e)}function H(n,e,t){let r=n.pattern.second,i=n.shapes.second;if(r==="*")return"every second";if(i==="step")return jn(n.analyses.segments.second[0],"second",e,t);if(i==="range"){let o=r.split("-"),u=W(o,t);return"every second from "+u(o[0])+p(t)+u(o[1])+" past the "+e}return i==="single"?"at "+d(r,t)+" "+b(r,"second")+" past the "+e:C(n.analyses.segments.second,"second",e,t)??O(w(n.analyses.segments.second,t),"second",e,t)}function $e(n,e,t){return"every minute"+l(n,t)}function Je(n,e,t){let r=n.pattern.minute;return d(r,t)+" "+b(r,"minute")+" past the hour, every hour"+l(n,t)}function Ye(n,e,t){return A(n.pattern.minute,t)+l(n,t)}function Be(n,e,t){return(C(n.analyses.segments.minute,"minute","hour",t)??O(w(n.analyses.segments.minute,t),"minute","hour",t))+l(n,t)}function Ge(n,e,t){let r=jn(n.analyses.segments.minute[0],"minute","hour",t);return e.hours.kind==="during"?r+=" during the "+tn(n,e.hours.times,!1,t)+" hours":e.hours.kind==="window"?r+=" "+Hn(e.hours,t):e.hours.kind==="step"&&(r+=" "+sn(n.analyses.segments.hour[0],t)),r+l(n,t)}function Ke(n,e,t){return n.pattern.minute==="*"?"every minute of the "+m({hour:e.hour,minute:0},t)+" hour"+l(n,t):"every minute from "+m({hour:e.hour,minute:e.span[0]},t)+p(t)+m({hour:e.hour,minute:e.span[1]},t)+l(n,t)}function Ze(n,e,t){if(e.form==="wildcard")return"every minute during the "+tn(n,e.times,!1,t)+" hours"+l(n,t);let r=tn(n,e.times,!0,t);return(e.form==="range"?A(n.pattern.minute,t):C(n.analyses.segments.minute,"minute","hour",t)??O(w(n.analyses.segments.minute,t),"minute","hour",t))+", at "+r+l(n,t)}var Mn={2:"other",3:"third",4:"fourth",6:"sixth",8:"eighth",12:"twelfth"};function sn(n,e){let t="during every "+Mn[n.interval]+" hour",r=n.startToken==="*"?0:+n.startToken;return r===0?t:t+" starting at "+m({hour:r,minute:0},e)}function Xe(n,e,t){let r=n.analyses.segments.hour[0];return e.form==="wildcard"?"every minute "+sn(r,t)+l(n,t):(e.form==="list"?C(n.analyses.segments.minute,"minute","hour",t)??O(w(n.analyses.segments.minute,t),"minute","hour",t):A(n.pattern.minute,t))+", "+En(r,t)+l(n,t)}function A(n,e){let t=n.split("-"),r=W(t,e);return"every minute from "+r(t[0])+p(e)+r(t[1])+" past the hour"}function _e(n,e,t){return"every hour"+l(n,t)}function nt(n,e,t){let r=Hn(tt(e),t);return e.minuteForm==="wildcard"?"every minute "+r+l(n,t):e.minuteForm==="range"?A(n.pattern.minute,t)+", "+r+l(n,t):In(n,t)+" "+r+l(n,t)}function In(n,e){return n.pattern.minute==="0"?"every hour":C(n.analyses.segments.minute,"minute","hour",e)??O(w(n.analyses.segments.minute,e),"minute","hour",e)}function et(n,e,t){return En(n.analyses.segments.hour[0],t)+l(n,t)}function tt(n){return{from:n.from,last:n.boundMinute??0,to:n.to}}function Hn(n,e){return"from "+m({hour:n.from,minute:0},e)+p(e)+m({hour:n.to,minute:n.last},e)}function rt(n,e,t){if(n.shapes.minute==="single"){let o=an(n,+n.pattern.minute,t);if(o!==null)return o}let r=ln(e.times),i=e.times.map(function(u){return m({hour:u.hour,minute:u.minute,second:u.second,plain:r},t)});return Dn(n,t)+"at "+h(i,t)}function it(n,e,t){if(e.fold){let i=an(n,+e.minute,t);if(i!==null)return i;if(n.analyses.segments.hour.some(function(c){return c.kind==="range"})&&!n.analyses.clockSecond)return ot(n,e,t)+l(n,t);let u={minute:e.minute,second:n.analyses.clockSecond};return Dn(n,t)+"at "+rn(n,u,!0,t)}let r=(C(n.analyses.segments.minute,"minute","hour",t)??O(w(n.analyses.segments.minute,t),"minute","hour",t))+", at "+rn(n,{minute:0,second:null},!0,t)+l(n,t);return n.analyses.clockSecond?R(n,t)+", "+r:r}function ot(n,e,t){let r=e.minute,i=[],o=[];n.analyses.segments.hour.forEach(function(c){c.kind==="range"?i.push("from "+m({hour:c.bounds[0],minute:0},t)+p(t)+m({hour:c.bounds[1],minute:r},t)):c.kind==="step"?o.push(...c.fires):o.push(+c.value)});let u=In(n,t)+" "+h(i,t);return o.length&&(u+=" and at "+h(o.map(function(c){return m({hour:c,minute:r},t)}),t)),u}var ut={clockTimes:rt,compactClockTimes:it,composeSeconds:Qe,everyHour:_e,everyMinute:$e,everySecond:je,hourRange:nt,hourStep:et,minuteFrequency:Ge,minuteSpanAcrossHourStep:Xe,minuteSpanInHour:Ke,minutesAcrossHours:Ze,multipleMinutes:Be,rangeOfMinutes:Ye,secondPastMinute:Ae,secondsWithinMinute:De,singleMinute:Je,standaloneSeconds:Ee};function Ln(n,e){let{interval:t,start:r,last:i,cycle:o,unit:u,anchor:s}=n,c="every "+d(t,e)+" "+u+"s",P=o%t===0;if(r===0&&P)return c;if(r<t&&P)return c+" from "+d(r,e)+" "+b(r,u)+" past the "+s;let g=W([r,i],e);return c+" from "+g(r)+p(e)+g(i)+" "+b(i,u)+" past the "+s}function Wn(n){let e=[];for(let t of n){if(t.kind!=="single")return null;e.push(+t.value)}return e}function C(n,e,t,r){let i=Wn(n),o=i&&$(i);return o?Ln({...o,cycle:60,unit:e,anchor:t},r):null}function jn(n,e,t,r){if(n.startToken.indexOf("-")!==-1)return O(Tn(n.fires,r),e,t,r);let i=n.startToken==="*"?0:+n.startToken;return i!==0&&n.fires.length<=3?O(Tn(n.fires,r),e,t,r):Ln({interval:n.interval,start:i,last:n.fires[n.fires.length-1],cycle:60,unit:e,anchor:t},r)}function En(n,e){if(n.startToken.indexOf("-")!==-1)return"at "+en(n.fires,e);let t=n.startToken==="*"?0:+n.startToken,r=n.interval;return t===0?"every "+d(r,e)+" hours":n.fires.length<=3?"at "+en(n.fires,e):"every "+d(r,e)+" hours from "+m({hour:t,minute:0},e)}function st(n,e){let{start:t,interval:r,last:i}=n,o="every "+d(r,e)+" hours",u=24%r===0;return t===0&&u?o:t<r&&u?o+" from "+m({hour:t,minute:0},e):o+" from "+m({hour:t,minute:0},e)+p(e)+m({hour:i,minute:0},e)}function at(n){let e=n.analyses.segments.hour;if(e.length===1&&e[0].kind==="step"){let i=e[0],o=i.startToken==="*"?0:+i.startToken.split("-")[0];return{interval:i.interval,last:i.fires[i.fires.length-1],start:o}}let t=Wn(e);return t&&$(t)||null}function An(n){return n.pattern.second==="*"||n.shapes.second==="step"}function lt(n,e,t){if(e===0)return An(n)?H(n,"minute",t)+" for one minute":H(n,"hour",t);let r=d(e,t)+" "+b(e,"minute")+" past the hour";return n.pattern.second==="0"?r:H(n,"minute",t)+", "+r}function an(n,e,t){let r=at(n);if(!r)return null;let i=(r.last-r.start)/r.interval+1;if(n.pattern.second==="0"&&i<=x)return null;let o=e===0&&An(n)&&ct(n);return o?H(n,"minute",t)+" for one minute "+sn(o,t)+l(n,t):lt(n,e,t)+", "+st(r,t)+l(n,t)}function ct(n){let e=n.analyses.segments.hour,t=e.length===1&&e[0];return!t||t.kind!=="step"||t.startToken.indexOf("-")!==-1||!(t.interval in Mn)?null:t}function W(n,e){let t=n.some(function(i){return+i>10});return function(i){return t?""+i:d(i,e)}}function Tn(n,e){return n.map(W(n,e))}function w(n,e){let t=n.flatMap(function(o){return o.kind==="range"?o.bounds:o.kind==="step"?o.fires:[o.value]}),r=W(t,e);return n.flatMap(function(o){return o.kind==="range"?[r(o.bounds[0])+p(e)+r(o.bounds[1])]:o.kind==="step"?o.fires.map(r):[r(o.value)]})}function O(n,e,t,r){return"at "+h(n,r)+" "+e+"s past the "+t}function mt(n,e,t){return(+n==0||+n==12)&&+e==0&&!(typeof t=="number"&&t>0)}function ln(n){let e=n.filter(function(r){return mt(r.hour,r.minute,r.second)});return e.length>0&&e.length<n.length}function en(n,e){let t=ln(n.map(function(o){return{hour:o,minute:0}})),r=n.map(function(o){return m({hour:o,minute:0,plain:t},e)});return h(r,e)}function tn(n,e,t,r){return e.kind==="fires"?en(e.fires,r):rn(n,{minute:0,second:null},t,r)}function ft(n){return n.kind==="range"?n.bounds:n.kind==="step"?n.fires:[n.value]}function rn(n,e,t,r){let{minute:i,second:o}=e,u=n.analyses.segments.hour,s=ln(u.flatMap(function(g){return ft(g).map(function(q){return{hour:+q,minute:i,second:o}})})),c=[];return u.forEach(function(g){g.kind==="step"?c.push(...g.fires.map(function(q){return m({hour:q,minute:i,second:o,plain:s},r)})):g.kind==="range"?c.push(m({hour:g.bounds[0],minute:i,second:o,plain:s},r)+p(r)+m({hour:g.bounds[1],minute:i,second:o,plain:s},r)):c.push(m({hour:g.value,minute:i,second:o,plain:s},r))}),h(dt(c,u,t),r)}function dt(n,e,t){let r=e.some(function(o){return o.kind==="range"});return!t||!r?n:n.map(function(o,u){return u===0?o:"at "+o})}function h(n,e){if(n.length<=1)return n.join("");if(n.length===2)return n[0]+" and "+n[1];let t=e.style.serialComma?", and ":" and ";return n.slice(0,-1).join(", ")+t+n[n.length-1]}var gt={all:"",month:"in ",stepDate:"on ",weekday:"on "},cn={all:"every day",month:"every day in ",stepDate:"",weekday:"every "};function l(n,e){let t=D(n,gt,e);return t&&" "+t}function Dn(n,e){return D(n,cn,e)+" "}function D(n,e,t){let r=n.pattern;return r.date!=="*"&&r.weekday!=="*"?pt(n,t):r.date!=="*"?ht(n,e,t):r.weekday!=="*"?(qn(r.weekday,t)||e.weekday+Yn(n,t))+z(n,t):r.month!=="*"?e.month+U(n,t):e.all}function ht(n,e,t){let r=n.pattern,i=Qn(r.date,t);return i?i+z(n,t):mn(r.date)?e.stepDate+$n(r.date)+z(n,t):r.month!=="*"&&!Un(n)?"on the "+on(n,t)+z(n,t):r.month!=="*"?"on "+Vn(n,t):"on the "+on(n,t)}function Un(n){return!Jn(n.pattern.month)&&n.analyses.segments.month.every(function(t){return t.kind!=="range"})}function pt(n,e){let t=n.pattern,r=qn(t.weekday,e)||"on "+Yn(n,e),i=Qn(t.date,e);return i?i+z(n,e)+" or "+r:mn(t.date)?$n(t.date)+z(n,e)+" or "+r:t.month!=="*"&&Un(n)?"on "+Vn(n,e)+" or "+r+" in "+U(n,e):"on the "+on(n,e)+" or "+r+z(n,e)}function Qn(n,e){if(n==="L")return"on the last day of the month";if(n==="LW"||n==="WL")return"on the last weekday of the month";let t=/^L-(\d{1,2})$/.exec(n);if(t)return d(+t[1],e)+" "+b(t[1],"day")+" before the last day of the month";let r=/^(\d{1,2})W$|^W(\d{1,2})$/.exec(n);if(r)return"on the weekday nearest the "+L(r[1]||r[2])}function qn(n,e){let t=n.split("#");if(t.length===2)return"on the "+He[+t[1]]+" "+un(t[0],e)+" of the month";if(/L$/.test(n))return"on the last "+un(n.slice(0,-1),e)+" of the month"}function Vn(n,e){let t=U(n,e),r=Q(n.analyses.segments.date,e.style.ordinals?L:yt,e);return e.style.dayFirst?r+" "+t:t+" "+r}function yt(n){return""+n}function z(n,e){return n.pattern.month==="*"?"":" in "+U(n,e)}function $n(n){let e=n.split("/"),t=+e[1],r=e[0],o=(t===2?"every other":"every "+L(t))+" day of the month";return r!=="*"&&r!=="1"&&(o+=" from the "+L(r)),o}function on(n,e){return Q(n.analyses.segments.date,L,e)}function U(n,e){let t=Jn(n.pattern.month);return t||Q(n.analyses.segments.month,function(i){return Nt(i,e)},e)}function Jn(n){if(!mn(n))return null;let[e,t]=n.split("/");return+t!=2?null:e==="*"||e==="1"?"every odd-numbered month":e==="2"?"every even-numbered month":null}function Yn(n,e){return Q(n.analyses.segments.weekday,function(r){return un(r,e)},e)}function Q(n,e,t){let r=[];return n.forEach(function(o){o.kind==="step"?r.push(...o.fires.map(e)):o.kind==="range"?r.push(o.bounds.map(e).join(p(t))):r.push(e(o.value))}),h(r,t)}function mn(n){return n.indexOf("/")!==-1&&n.indexOf("-")===-1&&n.indexOf(",")===-1}function bt(n,e,t){let r=e.pattern.year;if(r==="*")return n;if(r.indexOf("/")!==-1)return n+" "+Ot(r,t);let i=St(r,t);if(r.indexOf("-")===-1&&r.indexOf(",")===-1&&e.pattern.date!=="*"&&n.indexOf(" at ")!==-1){let o=t.style.dayFirst?" ":", ";return n.replace(" at ",o+i+" at ")}return n+" in "+i}function St(n,e){return n.indexOf(",")!==-1?h(n.split(","),e):n}function Ot(n,e){let t=n.split("/"),r=+t[1],i=t[0];if(r<=1)return"every year";let o="every "+d(r,e)+" years";return i!=="*"&&i!=="0"&&(o+=" from "+i),o}function m(n,e){let{hour:t,minute:r,plain:i,explicit:o}=n,u=typeof n.second=="number"&&n.second>0?n.second:0;return e.ampm?kt({hour:t,minute:r,second:u,plain:i,explicit:o},e):X({hour:t,minute:r,second:u},{pad:!0,sep:e.style.sep})}function kt(n,e){let{hour:t,minute:r,second:i,plain:o,explicit:u}=n,s=e.style;if(!o&&!u&&+r==0&&!i){if(+t==0)return s.midnight;if(+t==12)return s.midday}return X({hour:t%12||12,minute:r,second:i},{lean:!u,sep:s.sep})+(s.closeUp?"":" ")+(t<12?s.am:s.pm)}function d(n,e){return wn(n,Fe,e)}function b(n,e){return+n==1?e:e+"s"}function p(n){return n.short?"-":n.style.through}function L(n){let e=Math.abs(n),t=nn[e];return t||(e=(e%100-20)%10,t=nn[e]||nn[0]),n+t}function Nt(n,e){let t=Me[+n];return t&&t[e.short?1:0]}function un(n,e){let t=n===7||n==="7"?0:n,r=S[t]||Ie[t];return r&&r[e.short?1:0]}var zt={describe:We,fallback:"an unrecognizable cron pattern",options:Le,reboot:"at system startup",sentence:n=>"Runs "+n+(n.endsWith(".")?"":".")},Bn=zt;/**
2
2
  * @license MIT, Copyright (c) 2026 Andrew Brož
3
- */function sr(n,e){let r=e&&e.lang||jn,t=r.options(e);if(!t.lenient)return Dn(Un(n,r,t),r,e);try{return Dn(Un(n,r,t),r,e)}catch{return r.fallback}}function Dn(n,e,r){return r&&r.sentence?e.sentence(n):n}function Un(n,e,r){if(typeof n=="string"&&n.trim().toLowerCase()==="@reboot")return e.reboot;let t=hn(On(n,r)),i=e.strategy?e.strategy(t,t.plan):t.plan;return e.describe({...t,plan:i},r)}var on=sr;typeof globalThis<"u"&&Object.assign(globalThis,{cronli5:on});var qr=on;})();
3
+ */function Pt(n,e){let t=e&&e.lang||Bn,r=t.options(e);if(!r.lenient)return Gn(Kn(n,t,r),t,e);try{return Gn(Kn(n,t,r),t,e)}catch{return t.fallback}}function Gn(n,e,t){return t&&t.sentence?e.sentence(n):n}function Kn(n,e,t){if(typeof n=="string"&&n.trim().toLowerCase()==="@reboot")return e.reboot;let r=Pn(Cn(n,t)),i=e.strategy?e.strategy(r,r.plan):r.plan;return e.describe({...r,plan:i},t)}var fn=Pt;typeof globalThis<"u"&&Object.assign(globalThis,{cronli5:fn});var ar=fn;})();