@caipira/tamandua 0.0.55 → 0.0.58

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