@caipira/tamandua 0.0.55 → 0.0.57

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/date.js CHANGED
@@ -1,155 +1,449 @@
1
- import { r as i, t as s, b as E, a as R, d as Y, g as I, c as H } from "./index-CjvqeRf7.js";
2
- import { f as re } from "./index-CjvqeRf7.js";
3
- import { b as ae, g as se, c as oe, a as ie, s as ue } from "./index-CuyePt3m.js";
4
- function O(e) {
5
- i(1, arguments);
6
- var t = s(e);
7
- return t.setHours(0, 0, 0, 0), t;
8
- }
9
- var L = 6e4;
10
- function Q(e, t) {
11
- i(2, arguments);
12
- var r = R(t);
13
- return E(e, r * L);
14
- }
15
- function M(e, t) {
16
- i(2, arguments);
17
- var r = s(e), o = s(t), f = r.getTime() - o.getTime();
18
- return f < 0 ? -1 : f > 0 ? 1 : f;
19
- }
20
- function p(e, t) {
21
- i(2, arguments);
22
- var r = O(e), o = O(t);
23
- return r.getTime() === o.getTime();
24
- }
25
- function A(e, t) {
26
- i(2, arguments);
27
- var r = s(e), o = s(t), f = r.getFullYear() - o.getFullYear(), l = r.getMonth() - o.getMonth();
28
- return f * 12 + l;
29
- }
30
- function U(e, t) {
31
- return i(2, arguments), s(e).getTime() - s(t).getTime();
32
- }
33
- var S = {
34
- ceil: Math.ceil,
35
- round: Math.round,
36
- floor: Math.floor,
37
- trunc: function(t) {
38
- return t < 0 ? Math.ceil(t) : Math.floor(t);
39
- }
40
- // Math.trunc is not supported by IE
41
- }, y = "trunc";
42
- function F(e) {
43
- return e ? S[e] : S[y];
1
+ import { t as D, m as X, c as z, n as N, s as O, e as P, g as y, a as H, b as h, d as j } from "./format-BZx-8XXc.js";
2
+ import { f as _e } from "./format-BZx-8XXc.js";
3
+ import { b as Se, g as be, c as $e, a as Ae, s as Le } from "./subMonths-XOke808J.js";
4
+ function we(e, t, n) {
5
+ const r = D(e, n?.in);
6
+ return r.setTime(r.getTime() + t * X), r;
7
+ }
8
+ function T(e, t) {
9
+ const n = +D(e) - +D(t);
10
+ return n < 0 ? -1 : n > 0 ? 1 : n;
11
+ }
12
+ function Z(e) {
13
+ return z(e, Date.now());
14
+ }
15
+ function R(e, t, n) {
16
+ const [r, s] = N(
17
+ n?.in,
18
+ e,
19
+ t
20
+ );
21
+ return +O(r) == +O(s);
22
+ }
23
+ function G(e, t, n) {
24
+ const [r, s] = N(
25
+ n?.in,
26
+ e,
27
+ t
28
+ ), a = r.getFullYear() - s.getFullYear(), i = r.getMonth() - s.getMonth();
29
+ return a * 12 + i;
44
30
  }
45
31
  function q(e) {
46
- i(1, arguments);
47
- var t = s(e);
48
- return t.setHours(23, 59, 59, 999), t;
49
- }
50
- function z(e) {
51
- i(1, arguments);
52
- var t = s(e), r = t.getMonth();
53
- return t.setFullYear(t.getFullYear(), r + 1, 0), t.setHours(23, 59, 59, 999), t;
54
- }
55
- function C(e) {
56
- i(1, arguments);
57
- var t = s(e);
58
- return q(t).getTime() === z(t).getTime();
59
- }
60
- function W(e, t) {
61
- i(2, arguments);
62
- var r = s(e), o = s(t), f = M(r, o), l = Math.abs(A(r, o)), n;
63
- if (l < 1)
64
- n = 0;
65
- else {
66
- r.getMonth() === 1 && r.getDate() > 27 && r.setDate(30), r.setMonth(r.getMonth() - f * l);
67
- var c = M(r, o) === -f;
68
- C(s(e)) && l === 1 && M(e, o) === 1 && (c = !1), n = f * (l - Number(c));
69
- }
70
- return n === 0 ? 0 : n;
32
+ return (t) => {
33
+ const r = (e ? Math[e] : Math.trunc)(t);
34
+ return r === 0 ? 0 : r;
35
+ };
71
36
  }
72
- function P(e, t, r) {
73
- i(2, arguments);
74
- var o = U(e, t) / 1e3;
75
- return F(r?.roundingMethod)(o);
37
+ function J(e, t) {
38
+ return +D(e) - +D(t);
76
39
  }
77
- function _(e, t) {
78
- if (e == null)
79
- throw new TypeError("assign requires that input parameter not be null or undefined");
80
- for (var r in t)
81
- Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]);
82
- return e;
83
- }
84
- function $(e) {
85
- return _({}, e);
86
- }
87
- var N = 1440, j = 2520, D = 43200, k = 86400;
88
- function G(e, t, r) {
89
- var o, f;
90
- i(2, arguments);
91
- var l = H(), n = (o = (f = r?.locale) !== null && f !== void 0 ? f : l.locale) !== null && o !== void 0 ? o : Y;
92
- if (!n.formatDistance)
93
- throw new RangeError("locale must contain formatDistance property");
94
- var c = M(e, t);
95
- if (isNaN(c))
40
+ function V(e, t) {
41
+ const n = D(e, t?.in);
42
+ return n.setHours(23, 59, 59, 999), n;
43
+ }
44
+ function B(e, t) {
45
+ const n = D(e, t?.in), r = n.getMonth();
46
+ return n.setFullYear(n.getFullYear(), r + 1, 0), n.setHours(23, 59, 59, 999), n;
47
+ }
48
+ function K(e, t) {
49
+ const n = D(e, t?.in);
50
+ return +V(n, t) == +B(n, t);
51
+ }
52
+ function Q(e, t, n) {
53
+ const [r, s, a] = N(
54
+ n?.in,
55
+ e,
56
+ e,
57
+ t
58
+ ), i = T(s, a), o = Math.abs(
59
+ G(s, a)
60
+ );
61
+ if (o < 1)
62
+ return 0;
63
+ s.getMonth() === 1 && s.getDate() > 27 && s.setDate(30), s.setMonth(s.getMonth() - i * o);
64
+ let u = T(s, a) === -i;
65
+ K(r) && o === 1 && T(r, a) === 1 && (u = !1);
66
+ const l = i * (o - +u);
67
+ return l === 0 ? 0 : l;
68
+ }
69
+ function ee(e, t, n) {
70
+ const r = J(e, t) / 1e3;
71
+ return q(n?.roundingMethod)(r);
72
+ }
73
+ function te(e, t, n) {
74
+ const r = j(), s = n?.locale ?? r.locale ?? P, a = 2520, i = T(e, t);
75
+ if (isNaN(i))
96
76
  throw new RangeError("Invalid time value");
97
- var a = _($(r), {
98
- addSuffix: !!r?.addSuffix,
99
- comparison: c
100
- }), v, g;
101
- c > 0 ? (v = s(t), g = s(e)) : (v = s(e), g = s(t));
102
- var d = P(g, v), x = (I(g) - I(v)) / 1e3, u = Math.round((d - x) / 60), m;
103
- if (u < 2)
104
- return r != null && r.includeSeconds ? d < 5 ? n.formatDistance("lessThanXSeconds", 5, a) : d < 10 ? n.formatDistance("lessThanXSeconds", 10, a) : d < 20 ? n.formatDistance("lessThanXSeconds", 20, a) : d < 40 ? n.formatDistance("halfAMinute", 0, a) : d < 60 ? n.formatDistance("lessThanXMinutes", 1, a) : n.formatDistance("xMinutes", 1, a) : u === 0 ? n.formatDistance("lessThanXMinutes", 1, a) : n.formatDistance("xMinutes", u, a);
105
- if (u < 45)
106
- return n.formatDistance("xMinutes", u, a);
107
- if (u < 90)
108
- return n.formatDistance("aboutXHours", 1, a);
109
- if (u < N) {
110
- var X = Math.round(u / 60);
111
- return n.formatDistance("aboutXHours", X, a);
77
+ const o = Object.assign({}, n, {
78
+ addSuffix: n?.addSuffix,
79
+ comparison: i
80
+ }), [u, l] = N(
81
+ n?.in,
82
+ ...i > 0 ? [t, e] : [e, t]
83
+ ), m = ee(l, u), W = (y(l) - y(u)) / 1e3, f = Math.round((m - W) / 60);
84
+ let M;
85
+ if (f < 2)
86
+ return n?.includeSeconds ? m < 5 ? s.formatDistance("lessThanXSeconds", 5, o) : m < 10 ? s.formatDistance("lessThanXSeconds", 10, o) : m < 20 ? s.formatDistance("lessThanXSeconds", 20, o) : m < 40 ? s.formatDistance("halfAMinute", 0, o) : m < 60 ? s.formatDistance("lessThanXMinutes", 1, o) : s.formatDistance("xMinutes", 1, o) : f === 0 ? s.formatDistance("lessThanXMinutes", 1, o) : s.formatDistance("xMinutes", f, o);
87
+ if (f < 45)
88
+ return s.formatDistance("xMinutes", f, o);
89
+ if (f < 90)
90
+ return s.formatDistance("aboutXHours", 1, o);
91
+ if (f < H) {
92
+ const d = Math.round(f / 60);
93
+ return s.formatDistance("aboutXHours", d, o);
112
94
  } else {
113
- if (u < j)
114
- return n.formatDistance("xDays", 1, a);
115
- if (u < D) {
116
- var b = Math.round(u / N);
117
- return n.formatDistance("xDays", b, a);
118
- } else if (u < k)
119
- return m = Math.round(u / D), n.formatDistance("aboutXMonths", m, a);
95
+ if (f < a)
96
+ return s.formatDistance("xDays", 1, o);
97
+ if (f < h) {
98
+ const d = Math.round(f / H);
99
+ return s.formatDistance("xDays", d, o);
100
+ } else if (f < h * 2)
101
+ return M = Math.round(f / h), s.formatDistance("aboutXMonths", M, o);
120
102
  }
121
- if (m = W(g, v), m < 12) {
122
- var w = Math.round(u / D);
123
- return n.formatDistance("xMonths", w, a);
103
+ if (M = Q(l, u), M < 12) {
104
+ const d = Math.round(f / h);
105
+ return s.formatDistance("xMonths", d, o);
124
106
  } else {
125
- var T = m % 12, h = Math.floor(m / 12);
126
- return T < 3 ? n.formatDistance("aboutXYears", h, a) : T < 9 ? n.formatDistance("overXYears", h, a) : n.formatDistance("almostXYears", h + 1, a);
107
+ const d = M % 12, Y = Math.trunc(M / 12);
108
+ return d < 3 ? s.formatDistance("aboutXYears", Y, o) : d < 9 ? s.formatDistance("overXYears", Y, o) : s.formatDistance("almostXYears", Y + 1, o);
127
109
  }
128
110
  }
129
- function V(e, t) {
130
- return i(1, arguments), G(e, Date.now(), t);
111
+ function xe(e, t) {
112
+ return te(e, Z(e), t);
131
113
  }
132
- function J(e) {
133
- i(1, arguments);
134
- var t = s(e), r = t.getTime();
135
- return r;
114
+ function Oe(e) {
115
+ return Math.trunc(+D(e) / 1e3);
136
116
  }
137
- function Z(e) {
138
- return i(1, arguments), Math.floor(J(e) / 1e3);
117
+ function ye(e, t) {
118
+ return R(
119
+ z(t?.in || e, e),
120
+ Z(t?.in || e)
121
+ );
122
+ }
123
+ function ne(e, t) {
124
+ const n = ie(t);
125
+ return "formatToParts" in n ? se(n, e) : ae(n, e);
126
+ }
127
+ const re = {
128
+ year: 0,
129
+ month: 1,
130
+ day: 2,
131
+ hour: 3,
132
+ minute: 4,
133
+ second: 5
134
+ };
135
+ function se(e, t) {
136
+ try {
137
+ const n = e.formatToParts(t), r = [];
138
+ for (let s = 0; s < n.length; s++) {
139
+ const a = re[n[s].type];
140
+ a !== void 0 && (r[a] = parseInt(n[s].value, 10));
141
+ }
142
+ return r;
143
+ } catch (n) {
144
+ if (n instanceof RangeError)
145
+ return [NaN];
146
+ throw n;
147
+ }
148
+ }
149
+ function ae(e, t) {
150
+ const n = e.format(t), r = /(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n);
151
+ return [
152
+ parseInt(r[3], 10),
153
+ parseInt(r[1], 10),
154
+ parseInt(r[2], 10),
155
+ parseInt(r[4], 10),
156
+ parseInt(r[5], 10),
157
+ parseInt(r[6], 10)
158
+ ];
159
+ }
160
+ const g = {}, C = new Intl.DateTimeFormat("en-US", {
161
+ hourCycle: "h23",
162
+ timeZone: "America/New_York",
163
+ year: "numeric",
164
+ month: "2-digit",
165
+ day: "2-digit",
166
+ hour: "2-digit",
167
+ minute: "2-digit",
168
+ second: "2-digit"
169
+ }).format(/* @__PURE__ */ new Date("2014-06-25T04:00:00.123Z")), oe = C === "06/25/2014, 00:00:00" || C === "‎06‎/‎25‎/‎2014‎ ‎00‎:‎00‎:‎00";
170
+ function ie(e) {
171
+ return g[e] || (g[e] = oe ? new Intl.DateTimeFormat("en-US", {
172
+ hourCycle: "h23",
173
+ timeZone: e,
174
+ year: "numeric",
175
+ month: "numeric",
176
+ day: "2-digit",
177
+ hour: "2-digit",
178
+ minute: "2-digit",
179
+ second: "2-digit"
180
+ }) : new Intl.DateTimeFormat("en-US", {
181
+ hour12: !1,
182
+ timeZone: e,
183
+ year: "numeric",
184
+ month: "numeric",
185
+ day: "2-digit",
186
+ hour: "2-digit",
187
+ minute: "2-digit",
188
+ second: "2-digit"
189
+ })), g[e];
190
+ }
191
+ function E(e, t, n, r, s, a, i) {
192
+ const o = /* @__PURE__ */ new Date(0);
193
+ return o.setUTCFullYear(e, t, n), o.setUTCHours(r, s, a, i), o;
194
+ }
195
+ const U = 36e5, ue = 6e4, I = {
196
+ timezone: /([Z+-].*)$/,
197
+ timezoneZ: /^(Z)$/,
198
+ timezoneHH: /^([+-]\d{2})$/,
199
+ timezoneHHMM: /^([+-])(\d{2}):?(\d{2})$/
200
+ };
201
+ function k(e, t, n) {
202
+ if (!e)
203
+ return 0;
204
+ let r = I.timezoneZ.exec(e);
205
+ if (r)
206
+ return 0;
207
+ let s, a;
208
+ if (r = I.timezoneHH.exec(e), r)
209
+ return s = parseInt(r[1], 10), _(s) ? -(s * U) : NaN;
210
+ if (r = I.timezoneHHMM.exec(e), r) {
211
+ s = parseInt(r[2], 10);
212
+ const i = parseInt(r[3], 10);
213
+ return _(s, i) ? (a = Math.abs(s) * U + i * ue, r[1] === "+" ? -a : a) : NaN;
214
+ }
215
+ if (le(e)) {
216
+ t = new Date(t || Date.now());
217
+ const i = n ? t : ce(t), o = x(i, e);
218
+ return -(n ? o : fe(t, o, e));
219
+ }
220
+ return NaN;
221
+ }
222
+ function ce(e) {
223
+ return E(e.getFullYear(), e.getMonth(), e.getDate(), e.getHours(), e.getMinutes(), e.getSeconds(), e.getMilliseconds());
224
+ }
225
+ function x(e, t) {
226
+ const n = ne(e, t), r = E(n[0], n[1] - 1, n[2], n[3] % 24, n[4], n[5], 0).getTime();
227
+ let s = e.getTime();
228
+ const a = s % 1e3;
229
+ return s -= a >= 0 ? a : 1e3 + a, r - s;
230
+ }
231
+ function fe(e, t, n) {
232
+ let s = e.getTime() - t;
233
+ const a = x(new Date(s), n);
234
+ if (t === a)
235
+ return t;
236
+ s -= a - t;
237
+ const i = x(new Date(s), n);
238
+ return a === i ? a : Math.max(a, i);
239
+ }
240
+ function _(e, t) {
241
+ return -23 <= e && e <= 23 && (t == null || 0 <= t && t <= 59);
242
+ }
243
+ const F = {};
244
+ function le(e) {
245
+ if (F[e])
246
+ return !0;
247
+ try {
248
+ return new Intl.DateTimeFormat(void 0, { timeZone: e }), F[e] = !0, !0;
249
+ } catch {
250
+ return !1;
251
+ }
252
+ }
253
+ function S(e) {
254
+ const t = new Date(Date.UTC(e.getFullYear(), e.getMonth(), e.getDate(), e.getHours(), e.getMinutes(), e.getSeconds(), e.getMilliseconds()));
255
+ return t.setUTCFullYear(e.getFullYear()), +e - +t;
256
+ }
257
+ const De = /(Z|[+-]\d{2}(?::?\d{2})?| UTC| [a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?)$/, p = 36e5, b = 6e4, de = 2, c = {
258
+ dateTimePattern: /^([0-9W+-]+)(T| )(.*)/,
259
+ datePattern: /^([0-9W+-]+)(.*)/,
260
+ plainTime: /:/,
261
+ // year tokens
262
+ YY: /^(\d{2})$/,
263
+ YYY: [
264
+ /^([+-]\d{2})$/,
265
+ // 0 additional digits
266
+ /^([+-]\d{3})$/,
267
+ // 1 additional digit
268
+ /^([+-]\d{4})$/
269
+ // 2 additional digits
270
+ ],
271
+ YYYY: /^(\d{4})/,
272
+ YYYYY: [
273
+ /^([+-]\d{4})/,
274
+ // 0 additional digits
275
+ /^([+-]\d{5})/,
276
+ // 1 additional digit
277
+ /^([+-]\d{6})/
278
+ // 2 additional digits
279
+ ],
280
+ // date tokens
281
+ MM: /^-(\d{2})$/,
282
+ DDD: /^-?(\d{3})$/,
283
+ MMDD: /^-?(\d{2})-?(\d{2})$/,
284
+ Www: /^-?W(\d{2})$/,
285
+ WwwD: /^-?W(\d{2})-?(\d{1})$/,
286
+ HH: /^(\d{2}([.,]\d*)?)$/,
287
+ HHMM: /^(\d{2}):?(\d{2}([.,]\d*)?)$/,
288
+ HHMMSS: /^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,
289
+ // time zone tokens (to identify the presence of a tz)
290
+ timeZone: De
291
+ };
292
+ function me(e, t = {}) {
293
+ if (arguments.length < 1)
294
+ throw new TypeError("1 argument required, but only " + arguments.length + " present");
295
+ if (e === null)
296
+ return /* @__PURE__ */ new Date(NaN);
297
+ const n = t.additionalDigits == null ? de : Number(t.additionalDigits);
298
+ if (n !== 2 && n !== 1 && n !== 0)
299
+ throw new RangeError("additionalDigits must be 0, 1 or 2");
300
+ if (e instanceof Date || typeof e == "object" && Object.prototype.toString.call(e) === "[object Date]")
301
+ return new Date(e.getTime());
302
+ if (typeof e == "number" || Object.prototype.toString.call(e) === "[object Number]")
303
+ return new Date(e);
304
+ if (Object.prototype.toString.call(e) !== "[object String]")
305
+ return /* @__PURE__ */ new Date(NaN);
306
+ const r = Me(e), { year: s, restDateString: a } = he(r.date, n), i = Te(a, s);
307
+ if (i === null || isNaN(i.getTime()))
308
+ return /* @__PURE__ */ new Date(NaN);
309
+ if (i) {
310
+ const o = i.getTime();
311
+ let u = 0, l;
312
+ if (r.time && (u = Ne(r.time), u === null || isNaN(u)))
313
+ return /* @__PURE__ */ new Date(NaN);
314
+ if (r.timeZone || t.timeZone) {
315
+ if (l = k(r.timeZone || t.timeZone, new Date(o + u)), isNaN(l))
316
+ return /* @__PURE__ */ new Date(NaN);
317
+ } else
318
+ l = S(new Date(o + u)), l = S(new Date(o + u + l));
319
+ return new Date(o + u + l);
320
+ } else
321
+ return /* @__PURE__ */ new Date(NaN);
322
+ }
323
+ function Me(e) {
324
+ const t = {};
325
+ let n = c.dateTimePattern.exec(e), r;
326
+ if (n ? (t.date = n[1], r = n[3]) : (n = c.datePattern.exec(e), n ? (t.date = n[1], r = n[2]) : (t.date = null, r = e)), r) {
327
+ const s = c.timeZone.exec(r);
328
+ s ? (t.time = r.replace(s[1], ""), t.timeZone = s[1].trim()) : t.time = r;
329
+ }
330
+ return t;
331
+ }
332
+ function he(e, t) {
333
+ if (e) {
334
+ const n = c.YYY[t], r = c.YYYYY[t];
335
+ let s = c.YYYY.exec(e) || r.exec(e);
336
+ if (s) {
337
+ const a = s[1];
338
+ return {
339
+ year: parseInt(a, 10),
340
+ restDateString: e.slice(a.length)
341
+ };
342
+ }
343
+ if (s = c.YY.exec(e) || n.exec(e), s) {
344
+ const a = s[1];
345
+ return {
346
+ year: parseInt(a, 10) * 100,
347
+ restDateString: e.slice(a.length)
348
+ };
349
+ }
350
+ }
351
+ return {
352
+ year: null
353
+ };
354
+ }
355
+ function Te(e, t) {
356
+ if (t === null)
357
+ return null;
358
+ let n, r, s;
359
+ if (!e || !e.length)
360
+ return n = /* @__PURE__ */ new Date(0), n.setUTCFullYear(t), n;
361
+ let a = c.MM.exec(e);
362
+ if (a)
363
+ return n = /* @__PURE__ */ new Date(0), r = parseInt(a[1], 10) - 1, A(t, r) ? (n.setUTCFullYear(t, r), n) : /* @__PURE__ */ new Date(NaN);
364
+ if (a = c.DDD.exec(e), a) {
365
+ n = /* @__PURE__ */ new Date(0);
366
+ const i = parseInt(a[1], 10);
367
+ return Ie(t, i) ? (n.setUTCFullYear(t, 0, i), n) : /* @__PURE__ */ new Date(NaN);
368
+ }
369
+ if (a = c.MMDD.exec(e), a) {
370
+ n = /* @__PURE__ */ new Date(0), r = parseInt(a[1], 10) - 1;
371
+ const i = parseInt(a[2], 10);
372
+ return A(t, r, i) ? (n.setUTCFullYear(t, r, i), n) : /* @__PURE__ */ new Date(NaN);
373
+ }
374
+ if (a = c.Www.exec(e), a)
375
+ return s = parseInt(a[1], 10) - 1, L(s) ? $(t, s) : /* @__PURE__ */ new Date(NaN);
376
+ if (a = c.WwwD.exec(e), a) {
377
+ s = parseInt(a[1], 10) - 1;
378
+ const i = parseInt(a[2], 10) - 1;
379
+ return L(s, i) ? $(t, s, i) : /* @__PURE__ */ new Date(NaN);
380
+ }
381
+ return null;
382
+ }
383
+ function Ne(e) {
384
+ let t, n, r = c.HH.exec(e);
385
+ if (r)
386
+ return t = parseFloat(r[1].replace(",", ".")), w(t) ? t % 24 * p : NaN;
387
+ if (r = c.HHMM.exec(e), r)
388
+ return t = parseInt(r[1], 10), n = parseFloat(r[2].replace(",", ".")), w(t, n) ? t % 24 * p + n * b : NaN;
389
+ if (r = c.HHMMSS.exec(e), r) {
390
+ t = parseInt(r[1], 10), n = parseInt(r[2], 10);
391
+ const s = parseFloat(r[3].replace(",", "."));
392
+ return w(t, n, s) ? t % 24 * p + n * b + s * 1e3 : NaN;
393
+ }
394
+ return null;
395
+ }
396
+ function $(e, t, n) {
397
+ t = t || 0, n = n || 0;
398
+ const r = /* @__PURE__ */ new Date(0);
399
+ r.setUTCFullYear(e, 0, 4);
400
+ const s = r.getUTCDay() || 7, a = t * 7 + n + 1 - s;
401
+ return r.setUTCDate(r.getUTCDate() + a), r;
402
+ }
403
+ const Ye = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], ge = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
404
+ function v(e) {
405
+ return e % 400 === 0 || e % 4 === 0 && e % 100 !== 0;
406
+ }
407
+ function A(e, t, n) {
408
+ if (t < 0 || t > 11)
409
+ return !1;
410
+ if (n != null) {
411
+ if (n < 1)
412
+ return !1;
413
+ const r = v(e);
414
+ if (r && n > ge[t] || !r && n > Ye[t])
415
+ return !1;
416
+ }
417
+ return !0;
418
+ }
419
+ function Ie(e, t) {
420
+ if (t < 1)
421
+ return !1;
422
+ const n = v(e);
423
+ return !(n && t > 366 || !n && t > 365);
424
+ }
425
+ function L(e, t) {
426
+ return !(e < 0 || e > 52 || t != null && (t < 0 || t > 6));
427
+ }
428
+ function w(e, t, n) {
429
+ return !(e < 0 || e >= 25 || t != null && (t < 0 || t >= 60) || n != null && (n < 0 || n >= 60));
139
430
  }
140
- function B(e) {
141
- return i(1, arguments), p(e, Date.now());
431
+ function He(e, t, n) {
432
+ e = me(e, n);
433
+ const r = k(t, e, !0), s = new Date(e.getTime() - r), a = /* @__PURE__ */ new Date(0);
434
+ return a.setFullYear(s.getUTCFullYear(), s.getUTCMonth(), s.getUTCDate()), a.setHours(s.getUTCHours(), s.getUTCMinutes(), s.getUTCSeconds(), s.getUTCMilliseconds()), a;
142
435
  }
143
436
  export {
144
- Q as addMinutes,
145
- ae as addMonths,
146
- re as format,
147
- G as formatDistance,
148
- V as formatDistanceToNow,
149
- se as getDaysInMonth,
150
- Z as getUnixTime,
151
- B as isToday,
152
- oe as setDate,
153
- ie as setYear,
154
- ue as subMonths
437
+ we as addMinutes,
438
+ Se as addMonths,
439
+ _e as format,
440
+ te as formatDistance,
441
+ xe as formatDistanceToNow,
442
+ be as getDaysInMonth,
443
+ Oe as getUnixTime,
444
+ ye as isToday,
445
+ $e as setDate,
446
+ Ae as setYear,
447
+ Le as subMonths,
448
+ He as toZonedTime
155
449
  };
package/dist/form2.js CHANGED
@@ -1,4 +1,4 @@
1
- import { t as s } from "./transformers-DLw_G6c6.js";
1
+ import { t as s } from "./transformers-DowKEH_9.js";
2
2
  import { C as m } from "./crud-n73o4CzO.js";
3
3
  const e = (r) => {
4
4
  const a = new FormData();