@leancodepl/api-date-dayjs 9.7.4 → 10.0.0

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
@@ -3,6 +3,18 @@
3
3
  All notable changes to this project will be documented in this file. See
4
4
  [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [10.0.0](https://github.com/leancodepl/js_corelibrary/compare/v9.7.4...v10.0.0) (2026-02-11)
7
+
8
+ ### Bug Fixes
9
+
10
+ - exclude external packages from build output
11
+ ([4c2be7a](https://github.com/leancodepl/js_corelibrary/commit/4c2be7ac64eb6ed5603ba61b9aeef75a454dffb3))
12
+
13
+ # Change Log
14
+
15
+ All notable changes to this project will be documented in this file. See
16
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
17
+
6
18
  ## [9.7.4](https://github.com/leancodepl/js_corelibrary/compare/v9.7.3...v9.7.4) (2026-02-10)
7
19
 
8
20
  **Note:** Version bump only for package @leancodepl/api-date-dayjs
package/dist/index.js CHANGED
@@ -1,689 +1,399 @@
1
- function st(l) {
2
- return l && l.__esModule && Object.prototype.hasOwnProperty.call(l, "default") ? l.default : l;
1
+ export * from "@leancodepl/api-date";
2
+ import H from "dayjs";
3
+ import { parseApiTimeSpan as dt } from "@leancodepl/api-date-utils";
4
+ function K(i) {
5
+ return i && i.__esModule && Object.prototype.hasOwnProperty.call(i, "default") ? i.default : i;
3
6
  }
4
- var tt = { exports: {} }, $t = tt.exports, ct;
5
- function vt() {
6
- return ct || (ct = 1, (function(l, Z) {
7
- (function(k, y) {
8
- l.exports = y();
9
- })($t, (function() {
10
- var k = 1e3, y = 6e4, P = 36e5, W = "millisecond", O = "second", H = "minute", D = "hour", A = "day", w = "week", L = "month", I = "quarter", _ = "year", U = "date", c = "Invalid Date", u = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, m = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, g = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(s) {
11
- var n = ["th", "st", "nd", "rd"], t = s % 100;
12
- return "[" + s + (n[(t - 20) % 10] || n[t] || n[0]) + "]";
13
- } }, v = function(s, n, t) {
14
- var o = String(s);
15
- return !o || o.length >= n ? s : "" + Array(n + 1 - o.length).join(t) + s;
16
- }, j = { s: v, z: function(s) {
17
- var n = -s.utcOffset(), t = Math.abs(n), o = Math.floor(t / 60), r = t % 60;
18
- return (n <= 0 ? "+" : "-") + v(o, 2, "0") + ":" + v(r, 2, "0");
19
- }, m: function s(n, t) {
20
- if (n.date() < t.date()) return -s(t, n);
21
- var o = 12 * (t.year() - n.year()) + (t.month() - n.month()), r = n.clone().add(o, L), f = t - r < 0, h = n.clone().add(o + (f ? -1 : 1), L);
22
- return +(-(o + (t - r) / (f ? r - h : h - r)) || 0);
23
- }, a: function(s) {
24
- return s < 0 ? Math.ceil(s) || 0 : Math.floor(s);
25
- }, p: function(s) {
26
- return { M: L, y: _, w, d: A, D: U, h: D, m: H, s: O, ms: W, Q: I }[s] || String(s || "").toLowerCase().replace(/s$/, "");
27
- }, u: function(s) {
28
- return s === void 0;
29
- } }, b = "en", M = {};
30
- M[b] = g;
31
- var i = "$isDayjsObject", e = function(s) {
32
- return s instanceof S || !(!s || !s[i]);
33
- }, $ = function s(n, t, o) {
34
- var r;
35
- if (!n) return b;
36
- if (typeof n == "string") {
37
- var f = n.toLowerCase();
38
- M[f] && (r = f), t && (M[f] = t, r = f);
39
- var h = n.split("-");
40
- if (!r && h.length > 1) return s(h[0]);
41
- } else {
42
- var p = n.name;
43
- M[p] = n, r = p;
44
- }
45
- return !o && r && (b = r), r || !o && b;
46
- }, d = function(s, n) {
47
- if (e(s)) return s.clone();
48
- var t = typeof n == "object" ? n : {};
49
- return t.date = s, t.args = arguments, new S(t);
50
- }, a = j;
51
- a.l = $, a.i = e, a.w = function(s, n) {
52
- return d(s, { locale: n.$L, utc: n.$u, x: n.$x, $offset: n.$offset });
53
- };
54
- var S = (function() {
55
- function s(t) {
56
- this.$L = $(t.locale, null, !0), this.parse(t), this.$x = this.$x || t.x || {}, this[i] = !0;
57
- }
58
- var n = s.prototype;
59
- return n.parse = function(t) {
60
- this.$d = (function(o) {
61
- var r = o.date, f = o.utc;
62
- if (r === null) return /* @__PURE__ */ new Date(NaN);
63
- if (a.u(r)) return /* @__PURE__ */ new Date();
64
- if (r instanceof Date) return new Date(r);
65
- if (typeof r == "string" && !/Z$/i.test(r)) {
66
- var h = r.match(u);
67
- if (h) {
68
- var p = h[2] - 1 || 0, x = (h[7] || "0").substring(0, 3);
69
- return f ? new Date(Date.UTC(h[1], p, h[3] || 1, h[4] || 0, h[5] || 0, h[6] || 0, x)) : new Date(h[1], p, h[3] || 1, h[4] || 0, h[5] || 0, h[6] || 0, x);
70
- }
71
- }
72
- return new Date(r);
73
- })(t), this.init();
74
- }, n.init = function() {
75
- var t = this.$d;
76
- this.$y = t.getFullYear(), this.$M = t.getMonth(), this.$D = t.getDate(), this.$W = t.getDay(), this.$H = t.getHours(), this.$m = t.getMinutes(), this.$s = t.getSeconds(), this.$ms = t.getMilliseconds();
77
- }, n.$utils = function() {
78
- return a;
79
- }, n.isValid = function() {
80
- return this.$d.toString() !== c;
81
- }, n.isSame = function(t, o) {
82
- var r = d(t);
83
- return this.startOf(o) <= r && r <= this.endOf(o);
84
- }, n.isAfter = function(t, o) {
85
- return d(t) < this.startOf(o);
86
- }, n.isBefore = function(t, o) {
87
- return this.endOf(o) < d(t);
88
- }, n.$g = function(t, o, r) {
89
- return a.u(t) ? this[o] : this.set(r, t);
90
- }, n.unix = function() {
91
- return Math.floor(this.valueOf() / 1e3);
92
- }, n.valueOf = function() {
93
- return this.$d.getTime();
94
- }, n.startOf = function(t, o) {
95
- var r = this, f = !!a.u(o) || o, h = a.p(t), p = function(E, F) {
96
- var z = a.w(r.$u ? Date.UTC(r.$y, F, E) : new Date(r.$y, F, E), r);
97
- return f ? z : z.endOf(A);
98
- }, x = function(E, F) {
99
- return a.w(r.toDate()[E].apply(r.toDate("s"), (f ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(F)), r);
100
- }, T = this.$W, C = this.$M, N = this.$D, V = "set" + (this.$u ? "UTC" : "");
101
- switch (h) {
102
- case _:
103
- return f ? p(1, 0) : p(31, 11);
104
- case L:
105
- return f ? p(1, C) : p(0, C + 1);
106
- case w:
107
- var J = this.$locale().weekStart || 0, X = (T < J ? T + 7 : T) - J;
108
- return p(f ? N - X : N + (6 - X), C);
109
- case A:
110
- case U:
111
- return x(V + "Hours", 0);
112
- case D:
113
- return x(V + "Minutes", 1);
114
- case H:
115
- return x(V + "Seconds", 2);
116
- case O:
117
- return x(V + "Milliseconds", 3);
118
- default:
119
- return this.clone();
120
- }
121
- }, n.endOf = function(t) {
122
- return this.startOf(t, !1);
123
- }, n.$set = function(t, o) {
124
- var r, f = a.p(t), h = "set" + (this.$u ? "UTC" : ""), p = (r = {}, r[A] = h + "Date", r[U] = h + "Date", r[L] = h + "Month", r[_] = h + "FullYear", r[D] = h + "Hours", r[H] = h + "Minutes", r[O] = h + "Seconds", r[W] = h + "Milliseconds", r)[f], x = f === A ? this.$D + (o - this.$W) : o;
125
- if (f === L || f === _) {
126
- var T = this.clone().set(U, 1);
127
- T.$d[p](x), T.init(), this.$d = T.set(U, Math.min(this.$D, T.daysInMonth())).$d;
128
- } else p && this.$d[p](x);
129
- return this.init(), this;
130
- }, n.set = function(t, o) {
131
- return this.clone().$set(t, o);
132
- }, n.get = function(t) {
133
- return this[a.p(t)]();
134
- }, n.add = function(t, o) {
135
- var r, f = this;
136
- t = Number(t);
137
- var h = a.p(o), p = function(C) {
138
- var N = d(f);
139
- return a.w(N.date(N.date() + Math.round(C * t)), f);
140
- };
141
- if (h === L) return this.set(L, this.$M + t);
142
- if (h === _) return this.set(_, this.$y + t);
143
- if (h === A) return p(1);
144
- if (h === w) return p(7);
145
- var x = (r = {}, r[H] = y, r[D] = P, r[O] = k, r)[h] || 1, T = this.$d.getTime() + t * x;
146
- return a.w(T, this);
147
- }, n.subtract = function(t, o) {
148
- return this.add(-1 * t, o);
149
- }, n.format = function(t) {
150
- var o = this, r = this.$locale();
151
- if (!this.isValid()) return r.invalidDate || c;
152
- var f = t || "YYYY-MM-DDTHH:mm:ssZ", h = a.z(this), p = this.$H, x = this.$m, T = this.$M, C = r.weekdays, N = r.months, V = r.meridiem, J = function(F, z, R, Q) {
153
- return F && (F[z] || F(o, f)) || R[z].slice(0, Q);
154
- }, X = function(F) {
155
- return a.s(p % 12 || 12, F, "0");
156
- }, E = V || function(F, z, R) {
157
- var Q = F < 12 ? "AM" : "PM";
158
- return R ? Q.toLowerCase() : Q;
159
- };
160
- return f.replace(m, (function(F, z) {
161
- return z || (function(R) {
162
- switch (R) {
163
- case "YY":
164
- return String(o.$y).slice(-2);
165
- case "YYYY":
166
- return a.s(o.$y, 4, "0");
167
- case "M":
168
- return T + 1;
169
- case "MM":
170
- return a.s(T + 1, 2, "0");
171
- case "MMM":
172
- return J(r.monthsShort, T, N, 3);
173
- case "MMMM":
174
- return J(N, T);
175
- case "D":
176
- return o.$D;
177
- case "DD":
178
- return a.s(o.$D, 2, "0");
179
- case "d":
180
- return String(o.$W);
181
- case "dd":
182
- return J(r.weekdaysMin, o.$W, C, 2);
183
- case "ddd":
184
- return J(r.weekdaysShort, o.$W, C, 3);
185
- case "dddd":
186
- return C[o.$W];
187
- case "H":
188
- return String(p);
189
- case "HH":
190
- return a.s(p, 2, "0");
191
- case "h":
192
- return X(1);
193
- case "hh":
194
- return X(2);
195
- case "a":
196
- return E(p, x, !0);
197
- case "A":
198
- return E(p, x, !1);
199
- case "m":
200
- return String(x);
201
- case "mm":
202
- return a.s(x, 2, "0");
203
- case "s":
204
- return String(o.$s);
205
- case "ss":
206
- return a.s(o.$s, 2, "0");
207
- case "SSS":
208
- return a.s(o.$ms, 3, "0");
209
- case "Z":
210
- return h;
211
- }
212
- return null;
213
- })(F) || h.replace(":", "");
214
- }));
215
- }, n.utcOffset = function() {
216
- return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
217
- }, n.diff = function(t, o, r) {
218
- var f, h = this, p = a.p(o), x = d(t), T = (x.utcOffset() - this.utcOffset()) * y, C = this - x, N = function() {
219
- return a.m(h, x);
220
- };
221
- switch (p) {
222
- case _:
223
- f = N() / 12;
224
- break;
225
- case L:
226
- f = N();
227
- break;
228
- case I:
229
- f = N() / 3;
230
- break;
231
- case w:
232
- f = (C - T) / 6048e5;
233
- break;
234
- case A:
235
- f = (C - T) / 864e5;
236
- break;
237
- case D:
238
- f = C / P;
239
- break;
240
- case H:
241
- f = C / y;
242
- break;
243
- case O:
244
- f = C / k;
245
- break;
246
- default:
247
- f = C;
248
- }
249
- return r ? f : a.a(f);
250
- }, n.daysInMonth = function() {
251
- return this.endOf(L).$D;
252
- }, n.$locale = function() {
253
- return M[this.$L];
254
- }, n.locale = function(t, o) {
255
- if (!t) return this.$L;
256
- var r = this.clone(), f = $(t, o, !0);
257
- return f && (r.$L = f), r;
258
- }, n.clone = function() {
259
- return a.w(this.$d, this);
260
- }, n.toDate = function() {
261
- return new Date(this.valueOf());
262
- }, n.toJSON = function() {
263
- return this.isValid() ? this.toISOString() : null;
264
- }, n.toISOString = function() {
265
- return this.$d.toISOString();
266
- }, n.toString = function() {
267
- return this.$d.toUTCString();
268
- }, s;
269
- })(), Y = S.prototype;
270
- return d.prototype = Y, [["$ms", W], ["$s", O], ["$m", H], ["$H", D], ["$W", A], ["$M", L], ["$y", _], ["$D", U]].forEach((function(s) {
271
- Y[s[1]] = function(n) {
272
- return this.$g(n, s[0], s[1]);
7
+ var N = { exports: {} }, lt = N.exports, rt;
8
+ function mt() {
9
+ return rt || (rt = 1, (function(i, U) {
10
+ (function(Y, d) {
11
+ i.exports = d();
12
+ })(lt, (function() {
13
+ var Y = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, d = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, S = /\d/, O = /\d\d/, M = /\d\d?/, g = /\d*[^-_:/,()\s\d]+/, c = {}, C = function(r) {
14
+ return (r = +r) + (r > 68 ? 1900 : 2e3);
15
+ }, v = function(r) {
16
+ return function(e) {
17
+ this[r] = +e;
273
18
  };
274
- })), d.extend = function(s, n) {
275
- return s.$i || (s(n, S, d), s.$i = !0), d;
276
- }, d.locale = $, d.isDayjs = e, d.unix = function(s) {
277
- return d(1e3 * s);
278
- }, d.en = M[b], d.Ls = M, d.p = {}, d;
279
- }));
280
- })(tt)), tt.exports;
281
- }
282
- var Mt = vt();
283
- const q = /* @__PURE__ */ st(Mt);
284
- var et = { exports: {} }, pt = et.exports, ft;
285
- function Dt() {
286
- return ft || (ft = 1, (function(l, Z) {
287
- (function(k, y) {
288
- l.exports = y();
289
- })(pt, (function() {
290
- var k = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, y = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, P = /\d/, W = /\d\d/, O = /\d\d?/, H = /\d*[^-_:/,()\s\d]+/, D = {}, A = function(u) {
291
- return (u = +u) + (u > 68 ? 1900 : 2e3);
292
- }, w = function(u) {
293
- return function(m) {
294
- this[u] = +m;
295
- };
296
- }, L = [/[+-]\d\d:?(\d\d)?|Z/, function(u) {
297
- (this.zone || (this.zone = {})).offset = (function(m) {
298
- if (!m || m === "Z") return 0;
299
- var g = m.match(/([+-]|\d\d)/g), v = 60 * g[1] + (+g[2] || 0);
300
- return v === 0 ? 0 : g[0] === "+" ? -v : v;
301
- })(u);
302
- }], I = function(u) {
303
- var m = D[u];
304
- return m && (m.indexOf ? m : m.s.concat(m.f));
305
- }, _ = function(u, m) {
306
- var g, v = D.meridiem;
307
- if (v) {
308
- for (var j = 1; j <= 24; j += 1) if (u.indexOf(v(j, 0, m)) > -1) {
309
- g = j > 12;
19
+ }, F = [/[+-]\d\d:?(\d\d)?|Z/, function(r) {
20
+ (this.zone || (this.zone = {})).offset = (function(e) {
21
+ if (!e || e === "Z") return 0;
22
+ var f = e.match(/([+-]|\d\d)/g), o = 60 * f[1] + (+f[2] || 0);
23
+ return o === 0 ? 0 : f[0] === "+" ? -o : o;
24
+ })(r);
25
+ }], T = function(r) {
26
+ var e = c[r];
27
+ return e && (e.indexOf ? e : e.s.concat(e.f));
28
+ }, k = function(r, e) {
29
+ var f, o = c.meridiem;
30
+ if (o) {
31
+ for (var y = 1; y <= 24; y += 1) if (r.indexOf(o(y, 0, e)) > -1) {
32
+ f = y > 12;
310
33
  break;
311
34
  }
312
- } else g = u === (m ? "pm" : "PM");
313
- return g;
314
- }, U = { A: [H, function(u) {
315
- this.afternoon = _(u, !1);
316
- }], a: [H, function(u) {
317
- this.afternoon = _(u, !0);
318
- }], Q: [P, function(u) {
319
- this.month = 3 * (u - 1) + 1;
320
- }], S: [P, function(u) {
321
- this.milliseconds = 100 * +u;
322
- }], SS: [W, function(u) {
323
- this.milliseconds = 10 * +u;
324
- }], SSS: [/\d{3}/, function(u) {
325
- this.milliseconds = +u;
326
- }], s: [O, w("seconds")], ss: [O, w("seconds")], m: [O, w("minutes")], mm: [O, w("minutes")], H: [O, w("hours")], h: [O, w("hours")], HH: [O, w("hours")], hh: [O, w("hours")], D: [O, w("day")], DD: [W, w("day")], Do: [H, function(u) {
327
- var m = D.ordinal, g = u.match(/\d+/);
328
- if (this.day = g[0], m) for (var v = 1; v <= 31; v += 1) m(v).replace(/\[|\]/g, "") === u && (this.day = v);
329
- }], w: [O, w("week")], ww: [W, w("week")], M: [O, w("month")], MM: [W, w("month")], MMM: [H, function(u) {
330
- var m = I("months"), g = (I("monthsShort") || m.map((function(v) {
331
- return v.slice(0, 3);
332
- }))).indexOf(u) + 1;
333
- if (g < 1) throw new Error();
334
- this.month = g % 12 || g;
335
- }], MMMM: [H, function(u) {
336
- var m = I("months").indexOf(u) + 1;
337
- if (m < 1) throw new Error();
338
- this.month = m % 12 || m;
339
- }], Y: [/[+-]?\d+/, w("year")], YY: [W, function(u) {
340
- this.year = A(u);
341
- }], YYYY: [/\d{4}/, w("year")], Z: L, ZZ: L };
342
- function c(u) {
343
- var m, g;
344
- m = u, g = D && D.formats;
345
- for (var v = (u = m.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, (function(d, a, S) {
346
- var Y = S && S.toUpperCase();
347
- return a || g[S] || k[S] || g[Y].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, (function(s, n, t) {
348
- return n || t.slice(1);
35
+ } else f = r === (e ? "pm" : "PM");
36
+ return f;
37
+ }, L = { A: [g, function(r) {
38
+ this.afternoon = k(r, !1);
39
+ }], a: [g, function(r) {
40
+ this.afternoon = k(r, !0);
41
+ }], Q: [S, function(r) {
42
+ this.month = 3 * (r - 1) + 1;
43
+ }], S: [S, function(r) {
44
+ this.milliseconds = 100 * +r;
45
+ }], SS: [O, function(r) {
46
+ this.milliseconds = 10 * +r;
47
+ }], SSS: [/\d{3}/, function(r) {
48
+ this.milliseconds = +r;
49
+ }], s: [M, v("seconds")], ss: [M, v("seconds")], m: [M, v("minutes")], mm: [M, v("minutes")], H: [M, v("hours")], h: [M, v("hours")], HH: [M, v("hours")], hh: [M, v("hours")], D: [M, v("day")], DD: [O, v("day")], Do: [g, function(r) {
50
+ var e = c.ordinal, f = r.match(/\d+/);
51
+ if (this.day = f[0], e) for (var o = 1; o <= 31; o += 1) e(o).replace(/\[|\]/g, "") === r && (this.day = o);
52
+ }], w: [M, v("week")], ww: [O, v("week")], M: [M, v("month")], MM: [O, v("month")], MMM: [g, function(r) {
53
+ var e = T("months"), f = (T("monthsShort") || e.map((function(o) {
54
+ return o.slice(0, 3);
55
+ }))).indexOf(r) + 1;
56
+ if (f < 1) throw new Error();
57
+ this.month = f % 12 || f;
58
+ }], MMMM: [g, function(r) {
59
+ var e = T("months").indexOf(r) + 1;
60
+ if (e < 1) throw new Error();
61
+ this.month = e % 12 || e;
62
+ }], Y: [/[+-]?\d+/, v("year")], YY: [O, function(r) {
63
+ this.year = C(r);
64
+ }], YYYY: [/\d{4}/, v("year")], Z: F, ZZ: F };
65
+ function n(r) {
66
+ var e, f;
67
+ e = r, f = c && c.formats;
68
+ for (var o = (r = e.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, (function(l, h, m) {
69
+ var $ = m && m.toUpperCase();
70
+ return h || f[m] || Y[m] || f[$].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, (function(p, x, A) {
71
+ return x || A.slice(1);
349
72
  }));
350
- }))).match(y), j = v.length, b = 0; b < j; b += 1) {
351
- var M = v[b], i = U[M], e = i && i[0], $ = i && i[1];
352
- v[b] = $ ? { regex: e, parser: $ } : M.replace(/^\[|\]$/g, "");
73
+ }))).match(d), y = o.length, D = 0; D < y; D += 1) {
74
+ var u = o[D], s = L[u], t = s && s[0], a = s && s[1];
75
+ o[D] = a ? { regex: t, parser: a } : u.replace(/^\[|\]$/g, "");
353
76
  }
354
- return function(d) {
355
- for (var a = {}, S = 0, Y = 0; S < j; S += 1) {
356
- var s = v[S];
357
- if (typeof s == "string") Y += s.length;
77
+ return function(l) {
78
+ for (var h = {}, m = 0, $ = 0; m < y; m += 1) {
79
+ var p = o[m];
80
+ if (typeof p == "string") $ += p.length;
358
81
  else {
359
- var n = s.regex, t = s.parser, o = d.slice(Y), r = n.exec(o)[0];
360
- t.call(a, r), d = d.replace(r, "");
82
+ var x = p.regex, A = p.parser, Z = l.slice($), b = x.exec(Z)[0];
83
+ A.call(h, b), l = l.replace(b, "");
361
84
  }
362
85
  }
363
- return (function(f) {
364
- var h = f.afternoon;
365
- if (h !== void 0) {
366
- var p = f.hours;
367
- h ? p < 12 && (f.hours += 12) : p === 12 && (f.hours = 0), delete f.afternoon;
86
+ return (function(P) {
87
+ var j = P.afternoon;
88
+ if (j !== void 0) {
89
+ var w = P.hours;
90
+ j ? w < 12 && (P.hours += 12) : w === 12 && (P.hours = 0), delete P.afternoon;
368
91
  }
369
- })(a), a;
92
+ })(h), h;
370
93
  };
371
94
  }
372
- return function(u, m, g) {
373
- g.p.customParseFormat = !0, u && u.parseTwoDigitYear && (A = u.parseTwoDigitYear);
374
- var v = m.prototype, j = v.parse;
375
- v.parse = function(b) {
376
- var M = b.date, i = b.utc, e = b.args;
377
- this.$u = i;
378
- var $ = e[1];
379
- if (typeof $ == "string") {
380
- var d = e[2] === !0, a = e[3] === !0, S = d || a, Y = e[2];
381
- a && (Y = e[2]), D = this.$locale(), !d && Y && (D = g.Ls[Y]), this.$d = (function(o, r, f, h) {
95
+ return function(r, e, f) {
96
+ f.p.customParseFormat = !0, r && r.parseTwoDigitYear && (C = r.parseTwoDigitYear);
97
+ var o = e.prototype, y = o.parse;
98
+ o.parse = function(D) {
99
+ var u = D.date, s = D.utc, t = D.args;
100
+ this.$u = s;
101
+ var a = t[1];
102
+ if (typeof a == "string") {
103
+ var l = t[2] === !0, h = t[3] === !0, m = l || h, $ = t[2];
104
+ h && ($ = t[2]), c = this.$locale(), !l && $ && (c = f.Ls[$]), this.$d = (function(Z, b, P, j) {
382
105
  try {
383
- if (["x", "X"].indexOf(r) > -1) return new Date((r === "X" ? 1e3 : 1) * o);
384
- var p = c(r)(o), x = p.year, T = p.month, C = p.day, N = p.hours, V = p.minutes, J = p.seconds, X = p.milliseconds, E = p.zone, F = p.week, z = /* @__PURE__ */ new Date(), R = C || (x || T ? 1 : z.getDate()), Q = x || z.getFullYear(), G = 0;
385
- x && !T || (G = T > 0 ? T - 1 : z.getMonth());
386
- var K, it = N || 0, ot = V || 0, ut = J || 0, at = X || 0;
387
- return E ? new Date(Date.UTC(Q, G, R, it, ot, ut, at + 60 * E.offset * 1e3)) : f ? new Date(Date.UTC(Q, G, R, it, ot, ut, at)) : (K = new Date(Q, G, R, it, ot, ut, at), F && (K = h(K).week(F).toDate()), K);
106
+ if (["x", "X"].indexOf(b) > -1) return new Date((b === "X" ? 1e3 : 1) * Z);
107
+ var w = n(b)(Z), R = w.year, z = w.month, at = w.day, ut = w.hours, ft = w.minutes, ct = w.seconds, ht = w.milliseconds, tt = w.zone, st = w.week, W = /* @__PURE__ */ new Date(), Q = at || (R || z ? 1 : W.getDate()), X = R || W.getFullYear(), E = 0;
108
+ R && !z || (E = z > 0 ? z - 1 : W.getMonth());
109
+ var q, J = ut || 0, V = ft || 0, B = ct || 0, G = ht || 0;
110
+ return tt ? new Date(Date.UTC(X, E, Q, J, V, B, G + 60 * tt.offset * 1e3)) : P ? new Date(Date.UTC(X, E, Q, J, V, B, G)) : (q = new Date(X, E, Q, J, V, B, G), st && (q = j(q).week(st).toDate()), q);
388
111
  } catch {
389
112
  return /* @__PURE__ */ new Date("");
390
113
  }
391
- })(M, $, i, g), this.init(), Y && Y !== !0 && (this.$L = this.locale(Y).$L), S && M != this.format($) && (this.$d = /* @__PURE__ */ new Date("")), D = {};
392
- } else if ($ instanceof Array) for (var s = $.length, n = 1; n <= s; n += 1) {
393
- e[1] = $[n - 1];
394
- var t = g.apply(this, e);
395
- if (t.isValid()) {
396
- this.$d = t.$d, this.$L = t.$L, this.init();
114
+ })(u, a, s, f), this.init(), $ && $ !== !0 && (this.$L = this.locale($).$L), m && u != this.format(a) && (this.$d = /* @__PURE__ */ new Date("")), c = {};
115
+ } else if (a instanceof Array) for (var p = a.length, x = 1; x <= p; x += 1) {
116
+ t[1] = a[x - 1];
117
+ var A = f.apply(this, t);
118
+ if (A.isValid()) {
119
+ this.$d = A.$d, this.$L = A.$L, this.init();
397
120
  break;
398
121
  }
399
- n === s && (this.$d = /* @__PURE__ */ new Date(""));
122
+ x === p && (this.$d = /* @__PURE__ */ new Date(""));
400
123
  }
401
- else j.call(this, b);
124
+ else y.call(this, D);
402
125
  };
403
126
  };
404
127
  }));
405
- })(et)), et.exports;
128
+ })(N)), N.exports;
406
129
  }
407
- var yt = Dt();
408
- const lt = /* @__PURE__ */ st(yt);
409
- q.extend(lt);
410
- function Lt(l) {
411
- if (l)
412
- return q(l, "HH:mm:ss.SSS");
130
+ var $t = mt();
131
+ const it = /* @__PURE__ */ K($t);
132
+ H.extend(it);
133
+ function Ht(i) {
134
+ if (i)
135
+ return H(i, "HH:mm:ss.SSS");
413
136
  }
414
- function _t(l) {
415
- if (l)
416
- return l.format("HH:mm:ss.SSS");
137
+ function Ot(i) {
138
+ if (i)
139
+ return i.format("HH:mm:ss.SSS");
417
140
  }
418
- function Ct(l) {
419
- if (l)
420
- return q(l);
141
+ function Lt(i) {
142
+ if (i)
143
+ return H(i);
421
144
  }
422
- var nt = { exports: {} }, gt = nt.exports, ht;
423
- function St() {
424
- return ht || (ht = 1, (function(l, Z) {
425
- (function(k, y) {
426
- l.exports = y();
427
- })(gt, (function() {
428
- var k = "minute", y = /[+-]\d\d(?::?\d\d)?/g, P = /([+-]|\d\d)/g;
429
- return function(W, O, H) {
430
- var D = O.prototype;
431
- H.utc = function(c) {
432
- var u = { date: c, utc: !0, args: arguments };
433
- return new O(u);
434
- }, D.utc = function(c) {
435
- var u = H(this.toDate(), { locale: this.$L, utc: !0 });
436
- return c ? u.add(this.utcOffset(), k) : u;
437
- }, D.local = function() {
438
- return H(this.toDate(), { locale: this.$L, utc: !1 });
145
+ var I = { exports: {} }, vt = I.exports, nt;
146
+ function pt() {
147
+ return nt || (nt = 1, (function(i, U) {
148
+ (function(Y, d) {
149
+ i.exports = d();
150
+ })(vt, (function() {
151
+ var Y = "minute", d = /[+-]\d\d(?::?\d\d)?/g, S = /([+-]|\d\d)/g;
152
+ return function(O, M, g) {
153
+ var c = M.prototype;
154
+ g.utc = function(n) {
155
+ var r = { date: n, utc: !0, args: arguments };
156
+ return new M(r);
157
+ }, c.utc = function(n) {
158
+ var r = g(this.toDate(), { locale: this.$L, utc: !0 });
159
+ return n ? r.add(this.utcOffset(), Y) : r;
160
+ }, c.local = function() {
161
+ return g(this.toDate(), { locale: this.$L, utc: !1 });
439
162
  };
440
- var A = D.parse;
441
- D.parse = function(c) {
442
- c.utc && (this.$u = !0), this.$utils().u(c.$offset) || (this.$offset = c.$offset), A.call(this, c);
163
+ var C = c.parse;
164
+ c.parse = function(n) {
165
+ n.utc && (this.$u = !0), this.$utils().u(n.$offset) || (this.$offset = n.$offset), C.call(this, n);
443
166
  };
444
- var w = D.init;
445
- D.init = function() {
167
+ var v = c.init;
168
+ c.init = function() {
446
169
  if (this.$u) {
447
- var c = this.$d;
448
- this.$y = c.getUTCFullYear(), this.$M = c.getUTCMonth(), this.$D = c.getUTCDate(), this.$W = c.getUTCDay(), this.$H = c.getUTCHours(), this.$m = c.getUTCMinutes(), this.$s = c.getUTCSeconds(), this.$ms = c.getUTCMilliseconds();
449
- } else w.call(this);
170
+ var n = this.$d;
171
+ this.$y = n.getUTCFullYear(), this.$M = n.getUTCMonth(), this.$D = n.getUTCDate(), this.$W = n.getUTCDay(), this.$H = n.getUTCHours(), this.$m = n.getUTCMinutes(), this.$s = n.getUTCSeconds(), this.$ms = n.getUTCMilliseconds();
172
+ } else v.call(this);
450
173
  };
451
- var L = D.utcOffset;
452
- D.utcOffset = function(c, u) {
453
- var m = this.$utils().u;
454
- if (m(c)) return this.$u ? 0 : m(this.$offset) ? L.call(this) : this.$offset;
455
- if (typeof c == "string" && (c = (function(b) {
456
- b === void 0 && (b = "");
457
- var M = b.match(y);
458
- if (!M) return null;
459
- var i = ("" + M[0]).match(P) || ["-", 0, 0], e = i[0], $ = 60 * +i[1] + +i[2];
460
- return $ === 0 ? 0 : e === "+" ? $ : -$;
461
- })(c), c === null)) return this;
462
- var g = Math.abs(c) <= 16 ? 60 * c : c, v = this;
463
- if (u) return v.$offset = g, v.$u = c === 0, v;
464
- if (c !== 0) {
465
- var j = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
466
- (v = this.local().add(g + j, k)).$offset = g, v.$x.$localOffset = j;
467
- } else v = this.utc();
468
- return v;
174
+ var F = c.utcOffset;
175
+ c.utcOffset = function(n, r) {
176
+ var e = this.$utils().u;
177
+ if (e(n)) return this.$u ? 0 : e(this.$offset) ? F.call(this) : this.$offset;
178
+ if (typeof n == "string" && (n = (function(D) {
179
+ D === void 0 && (D = "");
180
+ var u = D.match(d);
181
+ if (!u) return null;
182
+ var s = ("" + u[0]).match(S) || ["-", 0, 0], t = s[0], a = 60 * +s[1] + +s[2];
183
+ return a === 0 ? 0 : t === "+" ? a : -a;
184
+ })(n), n === null)) return this;
185
+ var f = Math.abs(n) <= 16 ? 60 * n : n, o = this;
186
+ if (r) return o.$offset = f, o.$u = n === 0, o;
187
+ if (n !== 0) {
188
+ var y = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
189
+ (o = this.local().add(f + y, Y)).$offset = f, o.$x.$localOffset = y;
190
+ } else o = this.utc();
191
+ return o;
469
192
  };
470
- var I = D.format;
471
- D.format = function(c) {
472
- var u = c || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
473
- return I.call(this, u);
474
- }, D.valueOf = function() {
475
- var c = this.$utils().u(this.$offset) ? 0 : this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset());
476
- return this.$d.valueOf() - 6e4 * c;
477
- }, D.isUTC = function() {
193
+ var T = c.format;
194
+ c.format = function(n) {
195
+ var r = n || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
196
+ return T.call(this, r);
197
+ }, c.valueOf = function() {
198
+ var n = this.$utils().u(this.$offset) ? 0 : this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset());
199
+ return this.$d.valueOf() - 6e4 * n;
200
+ }, c.isUTC = function() {
478
201
  return !!this.$u;
479
- }, D.toISOString = function() {
202
+ }, c.toISOString = function() {
480
203
  return this.toDate().toISOString();
481
- }, D.toString = function() {
204
+ }, c.toString = function() {
482
205
  return this.toDate().toUTCString();
483
206
  };
484
- var _ = D.toDate;
485
- D.toDate = function(c) {
486
- return c === "s" && this.$offset ? H(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : _.call(this);
207
+ var k = c.toDate;
208
+ c.toDate = function(n) {
209
+ return n === "s" && this.$offset ? g(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : k.call(this);
487
210
  };
488
- var U = D.diff;
489
- D.diff = function(c, u, m) {
490
- if (c && this.$u === c.$u) return U.call(this, c, u, m);
491
- var g = this.local(), v = H(c).local();
492
- return U.call(g, v, u, m);
211
+ var L = c.diff;
212
+ c.diff = function(n, r, e) {
213
+ if (n && this.$u === n.$u) return L.call(this, n, r, e);
214
+ var f = this.local(), o = g(n).local();
215
+ return L.call(f, o, r, e);
493
216
  };
494
217
  };
495
218
  }));
496
- })(nt)), nt.exports;
219
+ })(I)), I.exports;
497
220
  }
498
- var Yt = St();
499
- const wt = /* @__PURE__ */ st(Yt);
500
- q.extend(wt);
501
- function Ot(l) {
502
- return l.clone().utc(!0);
221
+ var Mt = pt();
222
+ const Dt = /* @__PURE__ */ K(Mt);
223
+ H.extend(Dt);
224
+ function Yt(i) {
225
+ return i.clone().utc(!0);
503
226
  }
504
- function At(l) {
505
- if (l)
506
- return Ot(l).startOf("day").format("YYYY-MM-DD");
227
+ function bt(i) {
228
+ if (i)
229
+ return Yt(i).startOf("day").format("YYYY-MM-DD");
507
230
  }
508
- q.extend(lt);
509
- function Ut(l) {
510
- if (l)
511
- return q(l, "YYYY-MM-DDTHH:mm:ss.SSSZ");
231
+ H.extend(it);
232
+ function kt(i) {
233
+ if (i)
234
+ return H(i, "YYYY-MM-DDTHH:mm:ss.SSSZ");
512
235
  }
513
- function jt(l) {
514
- if (l)
515
- return l.format("YYYY-MM-DDTHH:mm:ss.SSSZ");
236
+ function At(i) {
237
+ if (i)
238
+ return i.format("YYYY-MM-DDTHH:mm:ss.SSSZ");
516
239
  }
517
- var rt = { exports: {} }, xt = rt.exports, dt;
518
- function Tt() {
519
- return dt || (dt = 1, (function(l, Z) {
520
- (function(k, y) {
521
- l.exports = y();
522
- })(xt, (function() {
523
- var k, y, P = 1e3, W = 6e4, O = 36e5, H = 864e5, D = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, A = 31536e6, w = 2628e6, L = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/, I = { years: A, months: w, days: H, hours: O, minutes: W, seconds: P, milliseconds: 1, weeks: 6048e5 }, _ = function(M) {
524
- return M instanceof j;
525
- }, U = function(M, i, e) {
526
- return new j(M, e, i.$l);
527
- }, c = function(M) {
528
- return y.p(M) + "s";
529
- }, u = function(M) {
530
- return M < 0;
531
- }, m = function(M) {
532
- return u(M) ? Math.ceil(M) : Math.floor(M);
533
- }, g = function(M) {
534
- return Math.abs(M);
535
- }, v = function(M, i) {
536
- return M ? u(M) ? { negative: !0, format: "" + g(M) + i } : { negative: !1, format: "" + M + i } : { negative: !1, format: "" };
537
- }, j = (function() {
538
- function M(e, $, d) {
539
- var a = this;
540
- if (this.$d = {}, this.$l = d, e === void 0 && (this.$ms = 0, this.parseFromMilliseconds()), $) return U(e * I[c($)], this);
541
- if (typeof e == "number") return this.$ms = e, this.parseFromMilliseconds(), this;
542
- if (typeof e == "object") return Object.keys(e).forEach((function(s) {
543
- a.$d[c(s)] = e[s];
240
+ var _ = { exports: {} }, gt = _.exports, et;
241
+ function yt() {
242
+ return et || (et = 1, (function(i, U) {
243
+ (function(Y, d) {
244
+ i.exports = d();
245
+ })(gt, (function() {
246
+ var Y, d, S = 1e3, O = 6e4, M = 36e5, g = 864e5, c = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, C = 31536e6, v = 2628e6, F = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/, T = { years: C, months: v, days: g, hours: M, minutes: O, seconds: S, milliseconds: 1, weeks: 6048e5 }, k = function(u) {
247
+ return u instanceof y;
248
+ }, L = function(u, s, t) {
249
+ return new y(u, t, s.$l);
250
+ }, n = function(u) {
251
+ return d.p(u) + "s";
252
+ }, r = function(u) {
253
+ return u < 0;
254
+ }, e = function(u) {
255
+ return r(u) ? Math.ceil(u) : Math.floor(u);
256
+ }, f = function(u) {
257
+ return Math.abs(u);
258
+ }, o = function(u, s) {
259
+ return u ? r(u) ? { negative: !0, format: "" + f(u) + s } : { negative: !1, format: "" + u + s } : { negative: !1, format: "" };
260
+ }, y = (function() {
261
+ function u(t, a, l) {
262
+ var h = this;
263
+ if (this.$d = {}, this.$l = l, t === void 0 && (this.$ms = 0, this.parseFromMilliseconds()), a) return L(t * T[n(a)], this);
264
+ if (typeof t == "number") return this.$ms = t, this.parseFromMilliseconds(), this;
265
+ if (typeof t == "object") return Object.keys(t).forEach((function(p) {
266
+ h.$d[n(p)] = t[p];
544
267
  })), this.calMilliseconds(), this;
545
- if (typeof e == "string") {
546
- var S = e.match(L);
547
- if (S) {
548
- var Y = S.slice(2).map((function(s) {
549
- return s != null ? Number(s) : 0;
268
+ if (typeof t == "string") {
269
+ var m = t.match(F);
270
+ if (m) {
271
+ var $ = m.slice(2).map((function(p) {
272
+ return p != null ? Number(p) : 0;
550
273
  }));
551
- return this.$d.years = Y[0], this.$d.months = Y[1], this.$d.weeks = Y[2], this.$d.days = Y[3], this.$d.hours = Y[4], this.$d.minutes = Y[5], this.$d.seconds = Y[6], this.calMilliseconds(), this;
274
+ return this.$d.years = $[0], this.$d.months = $[1], this.$d.weeks = $[2], this.$d.days = $[3], this.$d.hours = $[4], this.$d.minutes = $[5], this.$d.seconds = $[6], this.calMilliseconds(), this;
552
275
  }
553
276
  }
554
277
  return this;
555
278
  }
556
- var i = M.prototype;
557
- return i.calMilliseconds = function() {
558
- var e = this;
559
- this.$ms = Object.keys(this.$d).reduce((function($, d) {
560
- return $ + (e.$d[d] || 0) * I[d];
279
+ var s = u.prototype;
280
+ return s.calMilliseconds = function() {
281
+ var t = this;
282
+ this.$ms = Object.keys(this.$d).reduce((function(a, l) {
283
+ return a + (t.$d[l] || 0) * T[l];
561
284
  }), 0);
562
- }, i.parseFromMilliseconds = function() {
563
- var e = this.$ms;
564
- this.$d.years = m(e / A), e %= A, this.$d.months = m(e / w), e %= w, this.$d.days = m(e / H), e %= H, this.$d.hours = m(e / O), e %= O, this.$d.minutes = m(e / W), e %= W, this.$d.seconds = m(e / P), e %= P, this.$d.milliseconds = e;
565
- }, i.toISOString = function() {
566
- var e = v(this.$d.years, "Y"), $ = v(this.$d.months, "M"), d = +this.$d.days || 0;
567
- this.$d.weeks && (d += 7 * this.$d.weeks);
568
- var a = v(d, "D"), S = v(this.$d.hours, "H"), Y = v(this.$d.minutes, "M"), s = this.$d.seconds || 0;
569
- this.$d.milliseconds && (s += this.$d.milliseconds / 1e3, s = Math.round(1e3 * s) / 1e3);
570
- var n = v(s, "S"), t = e.negative || $.negative || a.negative || S.negative || Y.negative || n.negative, o = S.format || Y.format || n.format ? "T" : "", r = (t ? "-" : "") + "P" + e.format + $.format + a.format + o + S.format + Y.format + n.format;
571
- return r === "P" || r === "-P" ? "P0D" : r;
572
- }, i.toJSON = function() {
285
+ }, s.parseFromMilliseconds = function() {
286
+ var t = this.$ms;
287
+ this.$d.years = e(t / C), t %= C, this.$d.months = e(t / v), t %= v, this.$d.days = e(t / g), t %= g, this.$d.hours = e(t / M), t %= M, this.$d.minutes = e(t / O), t %= O, this.$d.seconds = e(t / S), t %= S, this.$d.milliseconds = t;
288
+ }, s.toISOString = function() {
289
+ var t = o(this.$d.years, "Y"), a = o(this.$d.months, "M"), l = +this.$d.days || 0;
290
+ this.$d.weeks && (l += 7 * this.$d.weeks);
291
+ var h = o(l, "D"), m = o(this.$d.hours, "H"), $ = o(this.$d.minutes, "M"), p = this.$d.seconds || 0;
292
+ this.$d.milliseconds && (p += this.$d.milliseconds / 1e3, p = Math.round(1e3 * p) / 1e3);
293
+ var x = o(p, "S"), A = t.negative || a.negative || h.negative || m.negative || $.negative || x.negative, Z = m.format || $.format || x.format ? "T" : "", b = (A ? "-" : "") + "P" + t.format + a.format + h.format + Z + m.format + $.format + x.format;
294
+ return b === "P" || b === "-P" ? "P0D" : b;
295
+ }, s.toJSON = function() {
573
296
  return this.toISOString();
574
- }, i.format = function(e) {
575
- var $ = e || "YYYY-MM-DDTHH:mm:ss", d = { Y: this.$d.years, YY: y.s(this.$d.years, 2, "0"), YYYY: y.s(this.$d.years, 4, "0"), M: this.$d.months, MM: y.s(this.$d.months, 2, "0"), D: this.$d.days, DD: y.s(this.$d.days, 2, "0"), H: this.$d.hours, HH: y.s(this.$d.hours, 2, "0"), m: this.$d.minutes, mm: y.s(this.$d.minutes, 2, "0"), s: this.$d.seconds, ss: y.s(this.$d.seconds, 2, "0"), SSS: y.s(this.$d.milliseconds, 3, "0") };
576
- return $.replace(D, (function(a, S) {
577
- return S || String(d[a]);
297
+ }, s.format = function(t) {
298
+ var a = t || "YYYY-MM-DDTHH:mm:ss", l = { Y: this.$d.years, YY: d.s(this.$d.years, 2, "0"), YYYY: d.s(this.$d.years, 4, "0"), M: this.$d.months, MM: d.s(this.$d.months, 2, "0"), D: this.$d.days, DD: d.s(this.$d.days, 2, "0"), H: this.$d.hours, HH: d.s(this.$d.hours, 2, "0"), m: this.$d.minutes, mm: d.s(this.$d.minutes, 2, "0"), s: this.$d.seconds, ss: d.s(this.$d.seconds, 2, "0"), SSS: d.s(this.$d.milliseconds, 3, "0") };
299
+ return a.replace(c, (function(h, m) {
300
+ return m || String(l[h]);
578
301
  }));
579
- }, i.as = function(e) {
580
- return this.$ms / I[c(e)];
581
- }, i.get = function(e) {
582
- var $ = this.$ms, d = c(e);
583
- return d === "milliseconds" ? $ %= 1e3 : $ = d === "weeks" ? m($ / I[d]) : this.$d[d], $ || 0;
584
- }, i.add = function(e, $, d) {
585
- var a;
586
- return a = $ ? e * I[c($)] : _(e) ? e.$ms : U(e, this).$ms, U(this.$ms + a * (d ? -1 : 1), this);
587
- }, i.subtract = function(e, $) {
588
- return this.add(e, $, !0);
589
- }, i.locale = function(e) {
590
- var $ = this.clone();
591
- return $.$l = e, $;
592
- }, i.clone = function() {
593
- return U(this.$ms, this);
594
- }, i.humanize = function(e) {
595
- return k().add(this.$ms, "ms").locale(this.$l).fromNow(!e);
596
- }, i.valueOf = function() {
302
+ }, s.as = function(t) {
303
+ return this.$ms / T[n(t)];
304
+ }, s.get = function(t) {
305
+ var a = this.$ms, l = n(t);
306
+ return l === "milliseconds" ? a %= 1e3 : a = l === "weeks" ? e(a / T[l]) : this.$d[l], a || 0;
307
+ }, s.add = function(t, a, l) {
308
+ var h;
309
+ return h = a ? t * T[n(a)] : k(t) ? t.$ms : L(t, this).$ms, L(this.$ms + h * (l ? -1 : 1), this);
310
+ }, s.subtract = function(t, a) {
311
+ return this.add(t, a, !0);
312
+ }, s.locale = function(t) {
313
+ var a = this.clone();
314
+ return a.$l = t, a;
315
+ }, s.clone = function() {
316
+ return L(this.$ms, this);
317
+ }, s.humanize = function(t) {
318
+ return Y().add(this.$ms, "ms").locale(this.$l).fromNow(!t);
319
+ }, s.valueOf = function() {
597
320
  return this.asMilliseconds();
598
- }, i.milliseconds = function() {
321
+ }, s.milliseconds = function() {
599
322
  return this.get("milliseconds");
600
- }, i.asMilliseconds = function() {
323
+ }, s.asMilliseconds = function() {
601
324
  return this.as("milliseconds");
602
- }, i.seconds = function() {
325
+ }, s.seconds = function() {
603
326
  return this.get("seconds");
604
- }, i.asSeconds = function() {
327
+ }, s.asSeconds = function() {
605
328
  return this.as("seconds");
606
- }, i.minutes = function() {
329
+ }, s.minutes = function() {
607
330
  return this.get("minutes");
608
- }, i.asMinutes = function() {
331
+ }, s.asMinutes = function() {
609
332
  return this.as("minutes");
610
- }, i.hours = function() {
333
+ }, s.hours = function() {
611
334
  return this.get("hours");
612
- }, i.asHours = function() {
335
+ }, s.asHours = function() {
613
336
  return this.as("hours");
614
- }, i.days = function() {
337
+ }, s.days = function() {
615
338
  return this.get("days");
616
- }, i.asDays = function() {
339
+ }, s.asDays = function() {
617
340
  return this.as("days");
618
- }, i.weeks = function() {
341
+ }, s.weeks = function() {
619
342
  return this.get("weeks");
620
- }, i.asWeeks = function() {
343
+ }, s.asWeeks = function() {
621
344
  return this.as("weeks");
622
- }, i.months = function() {
345
+ }, s.months = function() {
623
346
  return this.get("months");
624
- }, i.asMonths = function() {
347
+ }, s.asMonths = function() {
625
348
  return this.as("months");
626
- }, i.years = function() {
349
+ }, s.years = function() {
627
350
  return this.get("years");
628
- }, i.asYears = function() {
351
+ }, s.asYears = function() {
629
352
  return this.as("years");
630
- }, M;
631
- })(), b = function(M, i, e) {
632
- return M.add(i.years() * e, "y").add(i.months() * e, "M").add(i.days() * e, "d").add(i.hours() * e, "h").add(i.minutes() * e, "m").add(i.seconds() * e, "s").add(i.milliseconds() * e, "ms");
353
+ }, u;
354
+ })(), D = function(u, s, t) {
355
+ return u.add(s.years() * t, "y").add(s.months() * t, "M").add(s.days() * t, "d").add(s.hours() * t, "h").add(s.minutes() * t, "m").add(s.seconds() * t, "s").add(s.milliseconds() * t, "ms");
633
356
  };
634
- return function(M, i, e) {
635
- k = e, y = e().$utils(), e.duration = function(a, S) {
636
- var Y = e.locale();
637
- return U(a, { $l: Y }, S);
638
- }, e.isDuration = _;
639
- var $ = i.prototype.add, d = i.prototype.subtract;
640
- i.prototype.add = function(a, S) {
641
- return _(a) ? b(this, a, 1) : $.bind(this)(a, S);
642
- }, i.prototype.subtract = function(a, S) {
643
- return _(a) ? b(this, a, -1) : d.bind(this)(a, S);
357
+ return function(u, s, t) {
358
+ Y = t, d = t().$utils(), t.duration = function(h, m) {
359
+ var $ = t.locale();
360
+ return L(h, { $l: $ }, m);
361
+ }, t.isDuration = k;
362
+ var a = s.prototype.add, l = s.prototype.subtract;
363
+ s.prototype.add = function(h, m) {
364
+ return k(h) ? D(this, h, 1) : a.bind(this)(h, m);
365
+ }, s.prototype.subtract = function(h, m) {
366
+ return k(h) ? D(this, h, -1) : l.bind(this)(h, m);
644
367
  };
645
368
  };
646
369
  }));
647
- })(rt)), rt.exports;
648
- }
649
- var Ht = Tt();
650
- const mt = /* @__PURE__ */ st(Ht), B = (l) => Number.parseInt(l ?? "0");
651
- function bt(l) {
652
- const Z = l.match(/^(-)?(\d+)?\.?(\d{2}):(\d{2}):(\d{2})\.?(\d{3})?$/);
653
- return {
654
- sign: Z?.[1],
655
- values: {
656
- days: B(Z?.[2]),
657
- hours: B(Z?.[3]),
658
- minutes: B(Z?.[4]),
659
- seconds: B(Z?.[5]),
660
- milliseconds: B(Z?.[6])
661
- }
662
- };
370
+ })(_)), _.exports;
663
371
  }
664
- q.extend(mt);
665
- function Ft(l) {
666
- if (!l)
372
+ var St = yt();
373
+ const ot = /* @__PURE__ */ K(St);
374
+ H.extend(ot);
375
+ function Ct(i) {
376
+ if (!i)
667
377
  return;
668
- const Z = bt(l), k = Z.sign === "-", y = q.duration(Z.values);
669
- return k ? q.duration(-y.asMilliseconds()) : y;
378
+ const U = dt(i), Y = U.sign === "-", d = H.duration(U.values);
379
+ return Y ? H.duration(-d.asMilliseconds()) : d;
670
380
  }
671
- q.extend(mt);
672
- function Pt(l) {
673
- if (!l)
381
+ H.extend(ot);
382
+ function Ut(i) {
383
+ if (!i)
674
384
  return;
675
- const Z = l.asMilliseconds() < 0, k = q.duration(Math.abs(l.asMilliseconds())), y = Math.floor(k.asDays());
676
- let P = "";
677
- return Z && (P += "-"), y > 0 && (P += `${y}.`), P += k.format("HH:mm:ss.SSS"), P;
385
+ const U = i.asMilliseconds() < 0, Y = H.duration(Math.abs(i.asMilliseconds())), d = Math.floor(Y.asDays());
386
+ let S = "";
387
+ return U && (S += "-"), d > 0 && (S += `${d}.`), S += Y.format("HH:mm:ss.SSS"), S;
678
388
  }
679
389
  export {
680
- Ot as dropLocalOffset,
681
- Ct as fromApiDate,
682
- Ut as fromApiDateTimeOffset,
683
- Lt as fromApiTime,
684
- Ft as fromApiTimeSpan,
685
- At as toApiDate,
686
- jt as toApiDateTimeOffset,
687
- _t as toApiTime,
688
- Pt as toApiTimeSpan
390
+ Yt as dropLocalOffset,
391
+ Lt as fromApiDate,
392
+ kt as fromApiDateTimeOffset,
393
+ Ht as fromApiTime,
394
+ Ct as fromApiTimeSpan,
395
+ bt as toApiDate,
396
+ At as toApiDateTimeOffset,
397
+ Ot as toApiTime,
398
+ Ut as toApiTimeSpan
689
399
  };
@@ -1 +1 @@
1
- (function(W,Q){typeof exports=="object"&&typeof module<"u"?Q(exports):typeof define=="function"&&define.amd?define(["exports"],Q):(W=typeof globalThis<"u"?globalThis:W||self,Q(W["@leancodepl/api-date-dayjs"]={}))})(this,(function(W){"use strict";function Q(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}var tt={exports:{}},pt=tt.exports,ft;function Mt(){return ft||(ft=1,(function(l,Z){(function(k,y){l.exports=y()})(pt,(function(){var k=1e3,y=6e4,P=36e5,I="millisecond",O="second",H="minute",D="hour",C="day",w="week",A="month",N="quarter",L="year",j="date",c="Invalid Date",u=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(s){var n=["th","st","nd","rd"],t=s%100;return"["+s+(n[(t-20)%10]||n[t]||n[0])+"]"}},v=function(s,n,t){var o=String(s);return!o||o.length>=n?s:""+Array(n+1-o.length).join(t)+s},U={s:v,z:function(s){var n=-s.utcOffset(),t=Math.abs(n),o=Math.floor(t/60),r=t%60;return(n<=0?"+":"-")+v(o,2,"0")+":"+v(r,2,"0")},m:function s(n,t){if(n.date()<t.date())return-s(t,n);var o=12*(t.year()-n.year())+(t.month()-n.month()),r=n.clone().add(o,A),f=t-r<0,h=n.clone().add(o+(f?-1:1),A);return+(-(o+(t-r)/(f?r-h:h-r))||0)},a:function(s){return s<0?Math.ceil(s)||0:Math.floor(s)},p:function(s){return{M:A,y:L,w,d:C,D:j,h:D,m:H,s:O,ms:I,Q:N}[s]||String(s||"").toLowerCase().replace(/s$/,"")},u:function(s){return s===void 0}},b="en",p={};p[b]=g;var i="$isDayjsObject",e=function(s){return s instanceof S||!(!s||!s[i])},$=function s(n,t,o){var r;if(!n)return b;if(typeof n=="string"){var f=n.toLowerCase();p[f]&&(r=f),t&&(p[f]=t,r=f);var h=n.split("-");if(!r&&h.length>1)return s(h[0])}else{var M=n.name;p[M]=n,r=M}return!o&&r&&(b=r),r||!o&&b},d=function(s,n){if(e(s))return s.clone();var t=typeof n=="object"?n:{};return t.date=s,t.args=arguments,new S(t)},a=U;a.l=$,a.i=e,a.w=function(s,n){return d(s,{locale:n.$L,utc:n.$u,x:n.$x,$offset:n.$offset})};var S=(function(){function s(t){this.$L=$(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[i]=!0}var n=s.prototype;return n.parse=function(t){this.$d=(function(o){var r=o.date,f=o.utc;if(r===null)return new Date(NaN);if(a.u(r))return new Date;if(r instanceof Date)return new Date(r);if(typeof r=="string"&&!/Z$/i.test(r)){var h=r.match(u);if(h){var M=h[2]-1||0,T=(h[7]||"0").substring(0,3);return f?new Date(Date.UTC(h[1],M,h[3]||1,h[4]||0,h[5]||0,h[6]||0,T)):new Date(h[1],M,h[3]||1,h[4]||0,h[5]||0,h[6]||0,T)}}return new Date(r)})(t),this.init()},n.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},n.$utils=function(){return a},n.isValid=function(){return this.$d.toString()!==c},n.isSame=function(t,o){var r=d(t);return this.startOf(o)<=r&&r<=this.endOf(o)},n.isAfter=function(t,o){return d(t)<this.startOf(o)},n.isBefore=function(t,o){return this.endOf(o)<d(t)},n.$g=function(t,o,r){return a.u(t)?this[o]:this.set(r,t)},n.unix=function(){return Math.floor(this.valueOf()/1e3)},n.valueOf=function(){return this.$d.getTime()},n.startOf=function(t,o){var r=this,f=!!a.u(o)||o,h=a.p(t),M=function(J,F){var q=a.w(r.$u?Date.UTC(r.$y,F,J):new Date(r.$y,F,J),r);return f?q:q.endOf(C)},T=function(J,F){return a.w(r.toDate()[J].apply(r.toDate("s"),(f?[0,0,0,0]:[23,59,59,999]).slice(F)),r)},x=this.$W,_=this.$M,z=this.$D,X="set"+(this.$u?"UTC":"");switch(h){case L:return f?M(1,0):M(31,11);case A:return f?M(1,_):M(0,_+1);case w:var R=this.$locale().weekStart||0,G=(x<R?x+7:x)-R;return M(f?z-G:z+(6-G),_);case C:case j:return T(X+"Hours",0);case D:return T(X+"Minutes",1);case H:return T(X+"Seconds",2);case O:return T(X+"Milliseconds",3);default:return this.clone()}},n.endOf=function(t){return this.startOf(t,!1)},n.$set=function(t,o){var r,f=a.p(t),h="set"+(this.$u?"UTC":""),M=(r={},r[C]=h+"Date",r[j]=h+"Date",r[A]=h+"Month",r[L]=h+"FullYear",r[D]=h+"Hours",r[H]=h+"Minutes",r[O]=h+"Seconds",r[I]=h+"Milliseconds",r)[f],T=f===C?this.$D+(o-this.$W):o;if(f===A||f===L){var x=this.clone().set(j,1);x.$d[M](T),x.init(),this.$d=x.set(j,Math.min(this.$D,x.daysInMonth())).$d}else M&&this.$d[M](T);return this.init(),this},n.set=function(t,o){return this.clone().$set(t,o)},n.get=function(t){return this[a.p(t)]()},n.add=function(t,o){var r,f=this;t=Number(t);var h=a.p(o),M=function(_){var z=d(f);return a.w(z.date(z.date()+Math.round(_*t)),f)};if(h===A)return this.set(A,this.$M+t);if(h===L)return this.set(L,this.$y+t);if(h===C)return M(1);if(h===w)return M(7);var T=(r={},r[H]=y,r[D]=P,r[O]=k,r)[h]||1,x=this.$d.getTime()+t*T;return a.w(x,this)},n.subtract=function(t,o){return this.add(-1*t,o)},n.format=function(t){var o=this,r=this.$locale();if(!this.isValid())return r.invalidDate||c;var f=t||"YYYY-MM-DDTHH:mm:ssZ",h=a.z(this),M=this.$H,T=this.$m,x=this.$M,_=r.weekdays,z=r.months,X=r.meridiem,R=function(F,q,V,B){return F&&(F[q]||F(o,f))||V[q].slice(0,B)},G=function(F){return a.s(M%12||12,F,"0")},J=X||function(F,q,V){var B=F<12?"AM":"PM";return V?B.toLowerCase():B};return f.replace(m,(function(F,q){return q||(function(V){switch(V){case"YY":return String(o.$y).slice(-2);case"YYYY":return a.s(o.$y,4,"0");case"M":return x+1;case"MM":return a.s(x+1,2,"0");case"MMM":return R(r.monthsShort,x,z,3);case"MMMM":return R(z,x);case"D":return o.$D;case"DD":return a.s(o.$D,2,"0");case"d":return String(o.$W);case"dd":return R(r.weekdaysMin,o.$W,_,2);case"ddd":return R(r.weekdaysShort,o.$W,_,3);case"dddd":return _[o.$W];case"H":return String(M);case"HH":return a.s(M,2,"0");case"h":return G(1);case"hh":return G(2);case"a":return J(M,T,!0);case"A":return J(M,T,!1);case"m":return String(T);case"mm":return a.s(T,2,"0");case"s":return String(o.$s);case"ss":return a.s(o.$s,2,"0");case"SSS":return a.s(o.$ms,3,"0");case"Z":return h}return null})(F)||h.replace(":","")}))},n.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},n.diff=function(t,o,r){var f,h=this,M=a.p(o),T=d(t),x=(T.utcOffset()-this.utcOffset())*y,_=this-T,z=function(){return a.m(h,T)};switch(M){case L:f=z()/12;break;case A:f=z();break;case N:f=z()/3;break;case w:f=(_-x)/6048e5;break;case C:f=(_-x)/864e5;break;case D:f=_/P;break;case H:f=_/y;break;case O:f=_/k;break;default:f=_}return r?f:a.a(f)},n.daysInMonth=function(){return this.endOf(A).$D},n.$locale=function(){return p[this.$L]},n.locale=function(t,o){if(!t)return this.$L;var r=this.clone(),f=$(t,o,!0);return f&&(r.$L=f),r},n.clone=function(){return a.w(this.$d,this)},n.toDate=function(){return new Date(this.valueOf())},n.toJSON=function(){return this.isValid()?this.toISOString():null},n.toISOString=function(){return this.$d.toISOString()},n.toString=function(){return this.$d.toUTCString()},s})(),Y=S.prototype;return d.prototype=Y,[["$ms",I],["$s",O],["$m",H],["$H",D],["$W",C],["$M",A],["$y",L],["$D",j]].forEach((function(s){Y[s[1]]=function(n){return this.$g(n,s[0],s[1])}})),d.extend=function(s,n){return s.$i||(s(n,S,d),s.$i=!0),d},d.locale=$,d.isDayjs=e,d.unix=function(s){return d(1e3*s)},d.en=p[b],d.Ls=p,d.p={},d}))})(tt)),tt.exports}var Dt=Mt();const E=Q(Dt);var et={exports:{}},yt=et.exports,ht;function gt(){return ht||(ht=1,(function(l,Z){(function(k,y){l.exports=y()})(yt,(function(){var k={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},y=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,P=/\d/,I=/\d\d/,O=/\d\d?/,H=/\d*[^-_:/,()\s\d]+/,D={},C=function(u){return(u=+u)+(u>68?1900:2e3)},w=function(u){return function(m){this[u]=+m}},A=[/[+-]\d\d:?(\d\d)?|Z/,function(u){(this.zone||(this.zone={})).offset=(function(m){if(!m||m==="Z")return 0;var g=m.match(/([+-]|\d\d)/g),v=60*g[1]+(+g[2]||0);return v===0?0:g[0]==="+"?-v:v})(u)}],N=function(u){var m=D[u];return m&&(m.indexOf?m:m.s.concat(m.f))},L=function(u,m){var g,v=D.meridiem;if(v){for(var U=1;U<=24;U+=1)if(u.indexOf(v(U,0,m))>-1){g=U>12;break}}else g=u===(m?"pm":"PM");return g},j={A:[H,function(u){this.afternoon=L(u,!1)}],a:[H,function(u){this.afternoon=L(u,!0)}],Q:[P,function(u){this.month=3*(u-1)+1}],S:[P,function(u){this.milliseconds=100*+u}],SS:[I,function(u){this.milliseconds=10*+u}],SSS:[/\d{3}/,function(u){this.milliseconds=+u}],s:[O,w("seconds")],ss:[O,w("seconds")],m:[O,w("minutes")],mm:[O,w("minutes")],H:[O,w("hours")],h:[O,w("hours")],HH:[O,w("hours")],hh:[O,w("hours")],D:[O,w("day")],DD:[I,w("day")],Do:[H,function(u){var m=D.ordinal,g=u.match(/\d+/);if(this.day=g[0],m)for(var v=1;v<=31;v+=1)m(v).replace(/\[|\]/g,"")===u&&(this.day=v)}],w:[O,w("week")],ww:[I,w("week")],M:[O,w("month")],MM:[I,w("month")],MMM:[H,function(u){var m=N("months"),g=(N("monthsShort")||m.map((function(v){return v.slice(0,3)}))).indexOf(u)+1;if(g<1)throw new Error;this.month=g%12||g}],MMMM:[H,function(u){var m=N("months").indexOf(u)+1;if(m<1)throw new Error;this.month=m%12||m}],Y:[/[+-]?\d+/,w("year")],YY:[I,function(u){this.year=C(u)}],YYYY:[/\d{4}/,w("year")],Z:A,ZZ:A};function c(u){var m,g;m=u,g=D&&D.formats;for(var v=(u=m.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(d,a,S){var Y=S&&S.toUpperCase();return a||g[S]||k[S]||g[Y].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(s,n,t){return n||t.slice(1)}))}))).match(y),U=v.length,b=0;b<U;b+=1){var p=v[b],i=j[p],e=i&&i[0],$=i&&i[1];v[b]=$?{regex:e,parser:$}:p.replace(/^\[|\]$/g,"")}return function(d){for(var a={},S=0,Y=0;S<U;S+=1){var s=v[S];if(typeof s=="string")Y+=s.length;else{var n=s.regex,t=s.parser,o=d.slice(Y),r=n.exec(o)[0];t.call(a,r),d=d.replace(r,"")}}return(function(f){var h=f.afternoon;if(h!==void 0){var M=f.hours;h?M<12&&(f.hours+=12):M===12&&(f.hours=0),delete f.afternoon}})(a),a}}return function(u,m,g){g.p.customParseFormat=!0,u&&u.parseTwoDigitYear&&(C=u.parseTwoDigitYear);var v=m.prototype,U=v.parse;v.parse=function(b){var p=b.date,i=b.utc,e=b.args;this.$u=i;var $=e[1];if(typeof $=="string"){var d=e[2]===!0,a=e[3]===!0,S=d||a,Y=e[2];a&&(Y=e[2]),D=this.$locale(),!d&&Y&&(D=g.Ls[Y]),this.$d=(function(o,r,f,h){try{if(["x","X"].indexOf(r)>-1)return new Date((r==="X"?1e3:1)*o);var M=c(r)(o),T=M.year,x=M.month,_=M.day,z=M.hours,X=M.minutes,R=M.seconds,G=M.milliseconds,J=M.zone,F=M.week,q=new Date,V=_||(T||x?1:q.getDate()),B=T||q.getFullYear(),st=0;T&&!x||(st=x>0?x-1:q.getMonth());var it,ot=z||0,ut=X||0,at=R||0,ct=G||0;return J?new Date(Date.UTC(B,st,V,ot,ut,at,ct+60*J.offset*1e3)):f?new Date(Date.UTC(B,st,V,ot,ut,at,ct)):(it=new Date(B,st,V,ot,ut,at,ct),F&&(it=h(it).week(F).toDate()),it)}catch{return new Date("")}})(p,$,i,g),this.init(),Y&&Y!==!0&&(this.$L=this.locale(Y).$L),S&&p!=this.format($)&&(this.$d=new Date("")),D={}}else if($ instanceof Array)for(var s=$.length,n=1;n<=s;n+=1){e[1]=$[n-1];var t=g.apply(this,e);if(t.isValid()){this.$d=t.$d,this.$L=t.$L,this.init();break}n===s&&(this.$d=new Date(""))}else U.call(this,b)}}}))})(et)),et.exports}var St=gt();const dt=Q(St);E.extend(dt);function Yt(l){if(l)return E(l,"HH:mm:ss.SSS")}function wt(l){if(l)return l.format("HH:mm:ss.SSS")}function Ot(l){if(l)return E(l)}var nt={exports:{}},Tt=nt.exports,lt;function xt(){return lt||(lt=1,(function(l,Z){(function(k,y){l.exports=y()})(Tt,(function(){var k="minute",y=/[+-]\d\d(?::?\d\d)?/g,P=/([+-]|\d\d)/g;return function(I,O,H){var D=O.prototype;H.utc=function(c){var u={date:c,utc:!0,args:arguments};return new O(u)},D.utc=function(c){var u=H(this.toDate(),{locale:this.$L,utc:!0});return c?u.add(this.utcOffset(),k):u},D.local=function(){return H(this.toDate(),{locale:this.$L,utc:!1})};var C=D.parse;D.parse=function(c){c.utc&&(this.$u=!0),this.$utils().u(c.$offset)||(this.$offset=c.$offset),C.call(this,c)};var w=D.init;D.init=function(){if(this.$u){var c=this.$d;this.$y=c.getUTCFullYear(),this.$M=c.getUTCMonth(),this.$D=c.getUTCDate(),this.$W=c.getUTCDay(),this.$H=c.getUTCHours(),this.$m=c.getUTCMinutes(),this.$s=c.getUTCSeconds(),this.$ms=c.getUTCMilliseconds()}else w.call(this)};var A=D.utcOffset;D.utcOffset=function(c,u){var m=this.$utils().u;if(m(c))return this.$u?0:m(this.$offset)?A.call(this):this.$offset;if(typeof c=="string"&&(c=(function(b){b===void 0&&(b="");var p=b.match(y);if(!p)return null;var i=(""+p[0]).match(P)||["-",0,0],e=i[0],$=60*+i[1]+ +i[2];return $===0?0:e==="+"?$:-$})(c),c===null))return this;var g=Math.abs(c)<=16?60*c:c,v=this;if(u)return v.$offset=g,v.$u=c===0,v;if(c!==0){var U=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(v=this.local().add(g+U,k)).$offset=g,v.$x.$localOffset=U}else v=this.utc();return v};var N=D.format;D.format=function(c){var u=c||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return N.call(this,u)},D.valueOf=function(){var c=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*c},D.isUTC=function(){return!!this.$u},D.toISOString=function(){return this.toDate().toISOString()},D.toString=function(){return this.toDate().toUTCString()};var L=D.toDate;D.toDate=function(c){return c==="s"&&this.$offset?H(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():L.call(this)};var j=D.diff;D.diff=function(c,u,m){if(c&&this.$u===c.$u)return j.call(this,c,u,m);var g=this.local(),v=H(c).local();return j.call(g,v,u,m)}}}))})(nt)),nt.exports}var Ht=xt();const bt=Q(Ht);E.extend(bt);function mt(l){return l.clone().utc(!0)}function kt(l){if(l)return mt(l).startOf("day").format("YYYY-MM-DD")}E.extend(dt);function At(l){if(l)return E(l,"YYYY-MM-DDTHH:mm:ss.SSSZ")}function Lt(l){if(l)return l.format("YYYY-MM-DDTHH:mm:ss.SSSZ")}var rt={exports:{}},_t=rt.exports,$t;function Ct(){return $t||($t=1,(function(l,Z){(function(k,y){l.exports=y()})(_t,(function(){var k,y,P=1e3,I=6e4,O=36e5,H=864e5,D=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,C=31536e6,w=2628e6,A=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,N={years:C,months:w,days:H,hours:O,minutes:I,seconds:P,milliseconds:1,weeks:6048e5},L=function(p){return p instanceof U},j=function(p,i,e){return new U(p,e,i.$l)},c=function(p){return y.p(p)+"s"},u=function(p){return p<0},m=function(p){return u(p)?Math.ceil(p):Math.floor(p)},g=function(p){return Math.abs(p)},v=function(p,i){return p?u(p)?{negative:!0,format:""+g(p)+i}:{negative:!1,format:""+p+i}:{negative:!1,format:""}},U=(function(){function p(e,$,d){var a=this;if(this.$d={},this.$l=d,e===void 0&&(this.$ms=0,this.parseFromMilliseconds()),$)return j(e*N[c($)],this);if(typeof e=="number")return this.$ms=e,this.parseFromMilliseconds(),this;if(typeof e=="object")return Object.keys(e).forEach((function(s){a.$d[c(s)]=e[s]})),this.calMilliseconds(),this;if(typeof e=="string"){var S=e.match(A);if(S){var Y=S.slice(2).map((function(s){return s!=null?Number(s):0}));return this.$d.years=Y[0],this.$d.months=Y[1],this.$d.weeks=Y[2],this.$d.days=Y[3],this.$d.hours=Y[4],this.$d.minutes=Y[5],this.$d.seconds=Y[6],this.calMilliseconds(),this}}return this}var i=p.prototype;return i.calMilliseconds=function(){var e=this;this.$ms=Object.keys(this.$d).reduce((function($,d){return $+(e.$d[d]||0)*N[d]}),0)},i.parseFromMilliseconds=function(){var e=this.$ms;this.$d.years=m(e/C),e%=C,this.$d.months=m(e/w),e%=w,this.$d.days=m(e/H),e%=H,this.$d.hours=m(e/O),e%=O,this.$d.minutes=m(e/I),e%=I,this.$d.seconds=m(e/P),e%=P,this.$d.milliseconds=e},i.toISOString=function(){var e=v(this.$d.years,"Y"),$=v(this.$d.months,"M"),d=+this.$d.days||0;this.$d.weeks&&(d+=7*this.$d.weeks);var a=v(d,"D"),S=v(this.$d.hours,"H"),Y=v(this.$d.minutes,"M"),s=this.$d.seconds||0;this.$d.milliseconds&&(s+=this.$d.milliseconds/1e3,s=Math.round(1e3*s)/1e3);var n=v(s,"S"),t=e.negative||$.negative||a.negative||S.negative||Y.negative||n.negative,o=S.format||Y.format||n.format?"T":"",r=(t?"-":"")+"P"+e.format+$.format+a.format+o+S.format+Y.format+n.format;return r==="P"||r==="-P"?"P0D":r},i.toJSON=function(){return this.toISOString()},i.format=function(e){var $=e||"YYYY-MM-DDTHH:mm:ss",d={Y:this.$d.years,YY:y.s(this.$d.years,2,"0"),YYYY:y.s(this.$d.years,4,"0"),M:this.$d.months,MM:y.s(this.$d.months,2,"0"),D:this.$d.days,DD:y.s(this.$d.days,2,"0"),H:this.$d.hours,HH:y.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:y.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:y.s(this.$d.seconds,2,"0"),SSS:y.s(this.$d.milliseconds,3,"0")};return $.replace(D,(function(a,S){return S||String(d[a])}))},i.as=function(e){return this.$ms/N[c(e)]},i.get=function(e){var $=this.$ms,d=c(e);return d==="milliseconds"?$%=1e3:$=d==="weeks"?m($/N[d]):this.$d[d],$||0},i.add=function(e,$,d){var a;return a=$?e*N[c($)]:L(e)?e.$ms:j(e,this).$ms,j(this.$ms+a*(d?-1:1),this)},i.subtract=function(e,$){return this.add(e,$,!0)},i.locale=function(e){var $=this.clone();return $.$l=e,$},i.clone=function(){return j(this.$ms,this)},i.humanize=function(e){return k().add(this.$ms,"ms").locale(this.$l).fromNow(!e)},i.valueOf=function(){return this.asMilliseconds()},i.milliseconds=function(){return this.get("milliseconds")},i.asMilliseconds=function(){return this.as("milliseconds")},i.seconds=function(){return this.get("seconds")},i.asSeconds=function(){return this.as("seconds")},i.minutes=function(){return this.get("minutes")},i.asMinutes=function(){return this.as("minutes")},i.hours=function(){return this.get("hours")},i.asHours=function(){return this.as("hours")},i.days=function(){return this.get("days")},i.asDays=function(){return this.as("days")},i.weeks=function(){return this.get("weeks")},i.asWeeks=function(){return this.as("weeks")},i.months=function(){return this.get("months")},i.asMonths=function(){return this.as("months")},i.years=function(){return this.get("years")},i.asYears=function(){return this.as("years")},p})(),b=function(p,i,e){return p.add(i.years()*e,"y").add(i.months()*e,"M").add(i.days()*e,"d").add(i.hours()*e,"h").add(i.minutes()*e,"m").add(i.seconds()*e,"s").add(i.milliseconds()*e,"ms")};return function(p,i,e){k=e,y=e().$utils(),e.duration=function(a,S){var Y=e.locale();return j(a,{$l:Y},S)},e.isDuration=L;var $=i.prototype.add,d=i.prototype.subtract;i.prototype.add=function(a,S){return L(a)?b(this,a,1):$.bind(this)(a,S)},i.prototype.subtract=function(a,S){return L(a)?b(this,a,-1):d.bind(this)(a,S)}}}))})(rt)),rt.exports}var jt=Ct();const vt=Q(jt),K=l=>Number.parseInt(l??"0");function Ut(l){const Z=l.match(/^(-)?(\d+)?\.?(\d{2}):(\d{2}):(\d{2})\.?(\d{3})?$/);return{sign:Z?.[1],values:{days:K(Z?.[2]),hours:K(Z?.[3]),minutes:K(Z?.[4]),seconds:K(Z?.[5]),milliseconds:K(Z?.[6])}}}E.extend(vt);function Ft(l){if(!l)return;const Z=Ut(l),k=Z.sign==="-",y=E.duration(Z.values);return k?E.duration(-y.asMilliseconds()):y}E.extend(vt);function Pt(l){if(!l)return;const Z=l.asMilliseconds()<0,k=E.duration(Math.abs(l.asMilliseconds())),y=Math.floor(k.asDays());let P="";return Z&&(P+="-"),y>0&&(P+=`${y}.`),P+=k.format("HH:mm:ss.SSS"),P}W.dropLocalOffset=mt,W.fromApiDate=Ot,W.fromApiDateTimeOffset=At,W.fromApiTime=Yt,W.fromApiTimeSpan=Ft,W.toApiDate=kt,W.toApiDateTimeOffset=Lt,W.toApiTime=wt,W.toApiTimeSpan=Pt,Object.defineProperty(W,Symbol.toStringTag,{value:"Module"})}));
1
+ (function(v,Z){typeof exports=="object"&&typeof module<"u"?Z(exports,require("@leancodepl/api-date"),require("dayjs"),require("@leancodepl/api-date-utils")):typeof define=="function"&&define.amd?define(["exports","@leancodepl/api-date","dayjs","@leancodepl/api-date-utils"],Z):(v=typeof globalThis<"u"?globalThis:v||self,Z(v["@leancodepl/api-date-dayjs"]={},v.apiDate,v.dayjs,v.apiDateUtils))})(this,(function(v,Z,H,ct){"use strict";function Q(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var z={exports:{}},ht=z.exports,nt;function dt(){return nt||(nt=1,(function(i,k){(function(g,d){i.exports=d()})(ht,(function(){var g={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},d=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,T=/\d/,A=/\d\d/,D=/\d\d?/,y=/\d*[^-_:/,()\s\d]+/,c={},U=function(n){return(n=+n)+(n>68?1900:2e3)},p=function(n){return function(r){this[n]=+r}},q=[/[+-]\d\d:?(\d\d)?|Z/,function(n){(this.zone||(this.zone={})).offset=(function(r){if(!r||r==="Z")return 0;var f=r.match(/([+-]|\d\d)/g),o=60*f[1]+(+f[2]||0);return o===0?0:f[0]==="+"?-o:o})(n)}],x=function(n){var r=c[n];return r&&(r.indexOf?r:r.s.concat(r.f))},P=function(n,r){var f,o=c.meridiem;if(o){for(var S=1;S<=24;S+=1)if(n.indexOf(o(S,0,r))>-1){f=S>12;break}}else f=n===(r?"pm":"PM");return f},b={A:[y,function(n){this.afternoon=P(n,!1)}],a:[y,function(n){this.afternoon=P(n,!0)}],Q:[T,function(n){this.month=3*(n-1)+1}],S:[T,function(n){this.milliseconds=100*+n}],SS:[A,function(n){this.milliseconds=10*+n}],SSS:[/\d{3}/,function(n){this.milliseconds=+n}],s:[D,p("seconds")],ss:[D,p("seconds")],m:[D,p("minutes")],mm:[D,p("minutes")],H:[D,p("hours")],h:[D,p("hours")],HH:[D,p("hours")],hh:[D,p("hours")],D:[D,p("day")],DD:[A,p("day")],Do:[y,function(n){var r=c.ordinal,f=n.match(/\d+/);if(this.day=f[0],r)for(var o=1;o<=31;o+=1)r(o).replace(/\[|\]/g,"")===n&&(this.day=o)}],w:[D,p("week")],ww:[A,p("week")],M:[D,p("month")],MM:[A,p("month")],MMM:[y,function(n){var r=x("months"),f=(x("monthsShort")||r.map((function(o){return o.slice(0,3)}))).indexOf(n)+1;if(f<1)throw new Error;this.month=f%12||f}],MMMM:[y,function(n){var r=x("months").indexOf(n)+1;if(r<1)throw new Error;this.month=r%12||r}],Y:[/[+-]?\d+/,p("year")],YY:[A,function(n){this.year=U(n)}],YYYY:[/\d{4}/,p("year")],Z:q,ZZ:q};function s(n){var r,f;r=n,f=c&&c.formats;for(var o=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(l,h,m){var $=m&&m.toUpperCase();return h||f[m]||g[m]||f[$].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(M,O,C){return O||C.slice(1)}))}))).match(d),S=o.length,Y=0;Y<S;Y+=1){var u=o[Y],e=b[u],t=e&&e[0],a=e&&e[1];o[Y]=a?{regex:t,parser:a}:u.replace(/^\[|\]$/g,"")}return function(l){for(var h={},m=0,$=0;m<S;m+=1){var M=o[m];if(typeof M=="string")$+=M.length;else{var O=M.regex,C=M.parser,E=l.slice($),L=O.exec(E)[0];C.call(h,L),l=l.replace(L,"")}}return(function(F){var I=F.afternoon;if(I!==void 0){var w=F.hours;I?w<12&&(F.hours+=12):w===12&&(F.hours=0),delete F.afternoon}})(h),h}}return function(n,r,f){f.p.customParseFormat=!0,n&&n.parseTwoDigitYear&&(U=n.parseTwoDigitYear);var o=r.prototype,S=o.parse;o.parse=function(Y){var u=Y.date,e=Y.utc,t=Y.args;this.$u=e;var a=t[1];if(typeof a=="string"){var l=t[2]===!0,h=t[3]===!0,m=l||h,$=t[2];h&&($=t[2]),c=this.$locale(),!l&&$&&(c=f.Ls[$]),this.$d=(function(E,L,F,I){try{if(["x","X"].indexOf(L)>-1)return new Date((L==="X"?1e3:1)*E);var w=s(L)(E),X=w.year,_=w.month,At=w.day,bt=w.hours,Lt=w.minutes,Pt=w.seconds,Ct=w.milliseconds,ut=w.zone,ft=w.week,J=new Date,V=At||(X||_?1:J.getDate()),B=X||J.getFullYear(),R=0;X&&!_||(R=_>0?_-1:J.getMonth());var W,G=bt||0,K=Lt||0,tt=Pt||0,et=Ct||0;return ut?new Date(Date.UTC(B,R,V,G,K,tt,et+60*ut.offset*1e3)):F?new Date(Date.UTC(B,R,V,G,K,tt,et)):(W=new Date(B,R,V,G,K,tt,et),ft&&(W=I(W).week(ft).toDate()),W)}catch{return new Date("")}})(u,a,e,f),this.init(),$&&$!==!0&&(this.$L=this.locale($).$L),m&&u!=this.format(a)&&(this.$d=new Date("")),c={}}else if(a instanceof Array)for(var M=a.length,O=1;O<=M;O+=1){t[1]=a[O-1];var C=f.apply(this,t);if(C.isValid()){this.$d=C.$d,this.$L=C.$L,this.init();break}O===M&&(this.$d=new Date(""))}else S.call(this,Y)}}}))})(z)),z.exports}var lt=dt();const st=Q(lt);H.extend(st);function mt(i){if(i)return H(i,"HH:mm:ss.SSS")}function $t(i){if(i)return i.format("HH:mm:ss.SSS")}function pt(i){if(i)return H(i)}var j={exports:{}},vt=j.exports,it;function Mt(){return it||(it=1,(function(i,k){(function(g,d){i.exports=d()})(vt,(function(){var g="minute",d=/[+-]\d\d(?::?\d\d)?/g,T=/([+-]|\d\d)/g;return function(A,D,y){var c=D.prototype;y.utc=function(s){var n={date:s,utc:!0,args:arguments};return new D(n)},c.utc=function(s){var n=y(this.toDate(),{locale:this.$L,utc:!0});return s?n.add(this.utcOffset(),g):n},c.local=function(){return y(this.toDate(),{locale:this.$L,utc:!1})};var U=c.parse;c.parse=function(s){s.utc&&(this.$u=!0),this.$utils().u(s.$offset)||(this.$offset=s.$offset),U.call(this,s)};var p=c.init;c.init=function(){if(this.$u){var s=this.$d;this.$y=s.getUTCFullYear(),this.$M=s.getUTCMonth(),this.$D=s.getUTCDate(),this.$W=s.getUTCDay(),this.$H=s.getUTCHours(),this.$m=s.getUTCMinutes(),this.$s=s.getUTCSeconds(),this.$ms=s.getUTCMilliseconds()}else p.call(this)};var q=c.utcOffset;c.utcOffset=function(s,n){var r=this.$utils().u;if(r(s))return this.$u?0:r(this.$offset)?q.call(this):this.$offset;if(typeof s=="string"&&(s=(function(Y){Y===void 0&&(Y="");var u=Y.match(d);if(!u)return null;var e=(""+u[0]).match(T)||["-",0,0],t=e[0],a=60*+e[1]+ +e[2];return a===0?0:t==="+"?a:-a})(s),s===null))return this;var f=Math.abs(s)<=16?60*s:s,o=this;if(n)return o.$offset=f,o.$u=s===0,o;if(s!==0){var S=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(o=this.local().add(f+S,g)).$offset=f,o.$x.$localOffset=S}else o=this.utc();return o};var x=c.format;c.format=function(s){var n=s||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return x.call(this,n)},c.valueOf=function(){var s=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*s},c.isUTC=function(){return!!this.$u},c.toISOString=function(){return this.toDate().toISOString()},c.toString=function(){return this.toDate().toUTCString()};var P=c.toDate;c.toDate=function(s){return s==="s"&&this.$offset?y(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():P.call(this)};var b=c.diff;c.diff=function(s,n,r){if(s&&this.$u===s.$u)return b.call(this,s,n,r);var f=this.local(),o=y(s).local();return b.call(f,o,n,r)}}}))})(j)),j.exports}var Dt=Mt();const Yt=Q(Dt);H.extend(Yt);function rt(i){return i.clone().utc(!0)}function gt(i){if(i)return rt(i).startOf("day").format("YYYY-MM-DD")}H.extend(st);function yt(i){if(i)return H(i,"YYYY-MM-DDTHH:mm:ss.SSSZ")}function St(i){if(i)return i.format("YYYY-MM-DDTHH:mm:ss.SSSZ")}var N={exports:{}},Tt=N.exports,ot;function Ot(){return ot||(ot=1,(function(i,k){(function(g,d){i.exports=d()})(Tt,(function(){var g,d,T=1e3,A=6e4,D=36e5,y=864e5,c=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,U=31536e6,p=2628e6,q=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,x={years:U,months:p,days:y,hours:D,minutes:A,seconds:T,milliseconds:1,weeks:6048e5},P=function(u){return u instanceof S},b=function(u,e,t){return new S(u,t,e.$l)},s=function(u){return d.p(u)+"s"},n=function(u){return u<0},r=function(u){return n(u)?Math.ceil(u):Math.floor(u)},f=function(u){return Math.abs(u)},o=function(u,e){return u?n(u)?{negative:!0,format:""+f(u)+e}:{negative:!1,format:""+u+e}:{negative:!1,format:""}},S=(function(){function u(t,a,l){var h=this;if(this.$d={},this.$l=l,t===void 0&&(this.$ms=0,this.parseFromMilliseconds()),a)return b(t*x[s(a)],this);if(typeof t=="number")return this.$ms=t,this.parseFromMilliseconds(),this;if(typeof t=="object")return Object.keys(t).forEach((function(M){h.$d[s(M)]=t[M]})),this.calMilliseconds(),this;if(typeof t=="string"){var m=t.match(q);if(m){var $=m.slice(2).map((function(M){return M!=null?Number(M):0}));return this.$d.years=$[0],this.$d.months=$[1],this.$d.weeks=$[2],this.$d.days=$[3],this.$d.hours=$[4],this.$d.minutes=$[5],this.$d.seconds=$[6],this.calMilliseconds(),this}}return this}var e=u.prototype;return e.calMilliseconds=function(){var t=this;this.$ms=Object.keys(this.$d).reduce((function(a,l){return a+(t.$d[l]||0)*x[l]}),0)},e.parseFromMilliseconds=function(){var t=this.$ms;this.$d.years=r(t/U),t%=U,this.$d.months=r(t/p),t%=p,this.$d.days=r(t/y),t%=y,this.$d.hours=r(t/D),t%=D,this.$d.minutes=r(t/A),t%=A,this.$d.seconds=r(t/T),t%=T,this.$d.milliseconds=t},e.toISOString=function(){var t=o(this.$d.years,"Y"),a=o(this.$d.months,"M"),l=+this.$d.days||0;this.$d.weeks&&(l+=7*this.$d.weeks);var h=o(l,"D"),m=o(this.$d.hours,"H"),$=o(this.$d.minutes,"M"),M=this.$d.seconds||0;this.$d.milliseconds&&(M+=this.$d.milliseconds/1e3,M=Math.round(1e3*M)/1e3);var O=o(M,"S"),C=t.negative||a.negative||h.negative||m.negative||$.negative||O.negative,E=m.format||$.format||O.format?"T":"",L=(C?"-":"")+"P"+t.format+a.format+h.format+E+m.format+$.format+O.format;return L==="P"||L==="-P"?"P0D":L},e.toJSON=function(){return this.toISOString()},e.format=function(t){var a=t||"YYYY-MM-DDTHH:mm:ss",l={Y:this.$d.years,YY:d.s(this.$d.years,2,"0"),YYYY:d.s(this.$d.years,4,"0"),M:this.$d.months,MM:d.s(this.$d.months,2,"0"),D:this.$d.days,DD:d.s(this.$d.days,2,"0"),H:this.$d.hours,HH:d.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:d.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:d.s(this.$d.seconds,2,"0"),SSS:d.s(this.$d.milliseconds,3,"0")};return a.replace(c,(function(h,m){return m||String(l[h])}))},e.as=function(t){return this.$ms/x[s(t)]},e.get=function(t){var a=this.$ms,l=s(t);return l==="milliseconds"?a%=1e3:a=l==="weeks"?r(a/x[l]):this.$d[l],a||0},e.add=function(t,a,l){var h;return h=a?t*x[s(a)]:P(t)?t.$ms:b(t,this).$ms,b(this.$ms+h*(l?-1:1),this)},e.subtract=function(t,a){return this.add(t,a,!0)},e.locale=function(t){var a=this.clone();return a.$l=t,a},e.clone=function(){return b(this.$ms,this)},e.humanize=function(t){return g().add(this.$ms,"ms").locale(this.$l).fromNow(!t)},e.valueOf=function(){return this.asMilliseconds()},e.milliseconds=function(){return this.get("milliseconds")},e.asMilliseconds=function(){return this.as("milliseconds")},e.seconds=function(){return this.get("seconds")},e.asSeconds=function(){return this.as("seconds")},e.minutes=function(){return this.get("minutes")},e.asMinutes=function(){return this.as("minutes")},e.hours=function(){return this.get("hours")},e.asHours=function(){return this.as("hours")},e.days=function(){return this.get("days")},e.asDays=function(){return this.as("days")},e.weeks=function(){return this.get("weeks")},e.asWeeks=function(){return this.as("weeks")},e.months=function(){return this.get("months")},e.asMonths=function(){return this.as("months")},e.years=function(){return this.get("years")},e.asYears=function(){return this.as("years")},u})(),Y=function(u,e,t){return u.add(e.years()*t,"y").add(e.months()*t,"M").add(e.days()*t,"d").add(e.hours()*t,"h").add(e.minutes()*t,"m").add(e.seconds()*t,"s").add(e.milliseconds()*t,"ms")};return function(u,e,t){g=t,d=t().$utils(),t.duration=function(h,m){var $=t.locale();return b(h,{$l:$},m)},t.isDuration=P;var a=e.prototype.add,l=e.prototype.subtract;e.prototype.add=function(h,m){return P(h)?Y(this,h,1):a.bind(this)(h,m)},e.prototype.subtract=function(h,m){return P(h)?Y(this,h,-1):l.bind(this)(h,m)}}}))})(N)),N.exports}var wt=Ot();const at=Q(wt);H.extend(at);function Ht(i){if(!i)return;const k=ct.parseApiTimeSpan(i),g=k.sign==="-",d=H.duration(k.values);return g?H.duration(-d.asMilliseconds()):d}H.extend(at);function xt(i){if(!i)return;const k=i.asMilliseconds()<0,g=H.duration(Math.abs(i.asMilliseconds())),d=Math.floor(g.asDays());let T="";return k&&(T+="-"),d>0&&(T+=`${d}.`),T+=g.format("HH:mm:ss.SSS"),T}v.dropLocalOffset=rt,v.fromApiDate=pt,v.fromApiDateTimeOffset=yt,v.fromApiTime=mt,v.fromApiTimeSpan=Ht,v.toApiDate=gt,v.toApiDateTimeOffset=St,v.toApiTime=$t,v.toApiTimeSpan=xt,Object.keys(Z).forEach(i=>{i!=="default"&&!Object.prototype.hasOwnProperty.call(v,i)&&Object.defineProperty(v,i,{enumerable:!0,get:()=>Z[i]})}),Object.defineProperty(v,Symbol.toStringTag,{value:"Module"})}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leancodepl/api-date-dayjs",
3
- "version": "9.7.4",
3
+ "version": "10.0.0",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -15,8 +15,8 @@
15
15
  }
16
16
  },
17
17
  "dependencies": {
18
- "@leancodepl/api-date": "9.7.4",
19
- "@leancodepl/api-date-utils": "9.7.4",
18
+ "@leancodepl/api-date": "10.0.0",
19
+ "@leancodepl/api-date-utils": "10.0.0",
20
20
  "dayjs": ">=1.9.0"
21
21
  },
22
22
  "devDependencies": {