@turndown/library 0.1.28 → 0.1.29

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.
@@ -1,78 +1,464 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __commonJS = (cb, mod) => function __require() {
8
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
19
+ // If the importer is in node compatibility mode or this is not an ESM
20
+ // file that has been converted to a CommonJS file using a Babel-
21
+ // compatible transform (i.e. "__esModule" has not been set), then set
22
+ // "default" to the CommonJS "module.exports" for node compatibility.
23
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
24
+ mod
25
+ ));
26
+
27
+ // node_modules/dayjs/dayjs.min.js
28
+ var require_dayjs_min = __commonJS({
29
+ "node_modules/dayjs/dayjs.min.js"(exports, module) {
30
+ "use strict";
31
+ !(function(t, e) {
32
+ "object" == typeof exports && "undefined" != typeof module ? module.exports = e() : "function" == typeof define && define.amd ? define(e) : (t = "undefined" != typeof globalThis ? globalThis : t || self).dayjs = e();
33
+ })(exports, (function() {
34
+ "use strict";
35
+ var t = 1e3, e = 6e4, n = 36e5, r = "millisecond", i = "second", s = "minute", u = "hour", a = "day", o = "week", c = "month", f = "quarter", h = "year", d = "date", l = "Invalid Date", $ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y = /\[([^\]]+)]|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, M = { 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(t2) {
36
+ var e2 = ["th", "st", "nd", "rd"], n2 = t2 % 100;
37
+ return "[" + t2 + (e2[(n2 - 20) % 10] || e2[n2] || e2[0]) + "]";
38
+ } }, m = function(t2, e2, n2) {
39
+ var r2 = String(t2);
40
+ return !r2 || r2.length >= e2 ? t2 : "" + Array(e2 + 1 - r2.length).join(n2) + t2;
41
+ }, v = { s: m, z: function(t2) {
42
+ var e2 = -t2.utcOffset(), n2 = Math.abs(e2), r2 = Math.floor(n2 / 60), i2 = n2 % 60;
43
+ return (e2 <= 0 ? "+" : "-") + m(r2, 2, "0") + ":" + m(i2, 2, "0");
44
+ }, m: function t2(e2, n2) {
45
+ if (e2.date() < n2.date()) return -t2(n2, e2);
46
+ var r2 = 12 * (n2.year() - e2.year()) + (n2.month() - e2.month()), i2 = e2.clone().add(r2, c), s2 = n2 - i2 < 0, u2 = e2.clone().add(r2 + (s2 ? -1 : 1), c);
47
+ return +(-(r2 + (n2 - i2) / (s2 ? i2 - u2 : u2 - i2)) || 0);
48
+ }, a: function(t2) {
49
+ return t2 < 0 ? Math.ceil(t2) || 0 : Math.floor(t2);
50
+ }, p: function(t2) {
51
+ return { M: c, y: h, w: o, d: a, D: d, h: u, m: s, s: i, ms: r, Q: f }[t2] || String(t2 || "").toLowerCase().replace(/s$/, "");
52
+ }, u: function(t2) {
53
+ return void 0 === t2;
54
+ } }, g = "en", D = {};
55
+ D[g] = M;
56
+ var p = "$isDayjsObject", S = function(t2) {
57
+ return t2 instanceof _ || !(!t2 || !t2[p]);
58
+ }, w = function t2(e2, n2, r2) {
59
+ var i2;
60
+ if (!e2) return g;
61
+ if ("string" == typeof e2) {
62
+ var s2 = e2.toLowerCase();
63
+ D[s2] && (i2 = s2), n2 && (D[s2] = n2, i2 = s2);
64
+ var u2 = e2.split("-");
65
+ if (!i2 && u2.length > 1) return t2(u2[0]);
66
+ } else {
67
+ var a2 = e2.name;
68
+ D[a2] = e2, i2 = a2;
69
+ }
70
+ return !r2 && i2 && (g = i2), i2 || !r2 && g;
71
+ }, O = function(t2, e2) {
72
+ if (S(t2)) return t2.clone();
73
+ var n2 = "object" == typeof e2 ? e2 : {};
74
+ return n2.date = t2, n2.args = arguments, new _(n2);
75
+ }, b = v;
76
+ b.l = w, b.i = S, b.w = function(t2, e2) {
77
+ return O(t2, { locale: e2.$L, utc: e2.$u, x: e2.$x, $offset: e2.$offset });
78
+ };
79
+ var _ = (function() {
80
+ function M2(t2) {
81
+ this.$L = w(t2.locale, null, true), this.parse(t2), this.$x = this.$x || t2.x || {}, this[p] = true;
82
+ }
83
+ var m2 = M2.prototype;
84
+ return m2.parse = function(t2) {
85
+ this.$d = (function(t3) {
86
+ var e2 = t3.date, n2 = t3.utc;
87
+ if (null === e2) return /* @__PURE__ */ new Date(NaN);
88
+ if (b.u(e2)) return /* @__PURE__ */ new Date();
89
+ if (e2 instanceof Date) return new Date(e2);
90
+ if ("string" == typeof e2 && !/Z$/i.test(e2)) {
91
+ var r2 = e2.match($);
92
+ if (r2) {
93
+ var i2 = r2[2] - 1 || 0, s2 = (r2[7] || "0").substring(0, 3);
94
+ return n2 ? new Date(Date.UTC(r2[1], i2, r2[3] || 1, r2[4] || 0, r2[5] || 0, r2[6] || 0, s2)) : new Date(r2[1], i2, r2[3] || 1, r2[4] || 0, r2[5] || 0, r2[6] || 0, s2);
95
+ }
96
+ }
97
+ return new Date(e2);
98
+ })(t2), this.init();
99
+ }, m2.init = function() {
100
+ var t2 = this.$d;
101
+ this.$y = t2.getFullYear(), this.$M = t2.getMonth(), this.$D = t2.getDate(), this.$W = t2.getDay(), this.$H = t2.getHours(), this.$m = t2.getMinutes(), this.$s = t2.getSeconds(), this.$ms = t2.getMilliseconds();
102
+ }, m2.$utils = function() {
103
+ return b;
104
+ }, m2.isValid = function() {
105
+ return !(this.$d.toString() === l);
106
+ }, m2.isSame = function(t2, e2) {
107
+ var n2 = O(t2);
108
+ return this.startOf(e2) <= n2 && n2 <= this.endOf(e2);
109
+ }, m2.isAfter = function(t2, e2) {
110
+ return O(t2) < this.startOf(e2);
111
+ }, m2.isBefore = function(t2, e2) {
112
+ return this.endOf(e2) < O(t2);
113
+ }, m2.$g = function(t2, e2, n2) {
114
+ return b.u(t2) ? this[e2] : this.set(n2, t2);
115
+ }, m2.unix = function() {
116
+ return Math.floor(this.valueOf() / 1e3);
117
+ }, m2.valueOf = function() {
118
+ return this.$d.getTime();
119
+ }, m2.startOf = function(t2, e2) {
120
+ var n2 = this, r2 = !!b.u(e2) || e2, f2 = b.p(t2), l2 = function(t3, e3) {
121
+ var i2 = b.w(n2.$u ? Date.UTC(n2.$y, e3, t3) : new Date(n2.$y, e3, t3), n2);
122
+ return r2 ? i2 : i2.endOf(a);
123
+ }, $2 = function(t3, e3) {
124
+ return b.w(n2.toDate()[t3].apply(n2.toDate("s"), (r2 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e3)), n2);
125
+ }, y2 = this.$W, M3 = this.$M, m3 = this.$D, v2 = "set" + (this.$u ? "UTC" : "");
126
+ switch (f2) {
127
+ case h:
128
+ return r2 ? l2(1, 0) : l2(31, 11);
129
+ case c:
130
+ return r2 ? l2(1, M3) : l2(0, M3 + 1);
131
+ case o:
132
+ var g2 = this.$locale().weekStart || 0, D2 = (y2 < g2 ? y2 + 7 : y2) - g2;
133
+ return l2(r2 ? m3 - D2 : m3 + (6 - D2), M3);
134
+ case a:
135
+ case d:
136
+ return $2(v2 + "Hours", 0);
137
+ case u:
138
+ return $2(v2 + "Minutes", 1);
139
+ case s:
140
+ return $2(v2 + "Seconds", 2);
141
+ case i:
142
+ return $2(v2 + "Milliseconds", 3);
143
+ default:
144
+ return this.clone();
145
+ }
146
+ }, m2.endOf = function(t2) {
147
+ return this.startOf(t2, false);
148
+ }, m2.$set = function(t2, e2) {
149
+ var n2, o2 = b.p(t2), f2 = "set" + (this.$u ? "UTC" : ""), l2 = (n2 = {}, n2[a] = f2 + "Date", n2[d] = f2 + "Date", n2[c] = f2 + "Month", n2[h] = f2 + "FullYear", n2[u] = f2 + "Hours", n2[s] = f2 + "Minutes", n2[i] = f2 + "Seconds", n2[r] = f2 + "Milliseconds", n2)[o2], $2 = o2 === a ? this.$D + (e2 - this.$W) : e2;
150
+ if (o2 === c || o2 === h) {
151
+ var y2 = this.clone().set(d, 1);
152
+ y2.$d[l2]($2), y2.init(), this.$d = y2.set(d, Math.min(this.$D, y2.daysInMonth())).$d;
153
+ } else l2 && this.$d[l2]($2);
154
+ return this.init(), this;
155
+ }, m2.set = function(t2, e2) {
156
+ return this.clone().$set(t2, e2);
157
+ }, m2.get = function(t2) {
158
+ return this[b.p(t2)]();
159
+ }, m2.add = function(r2, f2) {
160
+ var d2, l2 = this;
161
+ r2 = Number(r2);
162
+ var $2 = b.p(f2), y2 = function(t2) {
163
+ var e2 = O(l2);
164
+ return b.w(e2.date(e2.date() + Math.round(t2 * r2)), l2);
165
+ };
166
+ if ($2 === c) return this.set(c, this.$M + r2);
167
+ if ($2 === h) return this.set(h, this.$y + r2);
168
+ if ($2 === a) return y2(1);
169
+ if ($2 === o) return y2(7);
170
+ var M3 = (d2 = {}, d2[s] = e, d2[u] = n, d2[i] = t, d2)[$2] || 1, m3 = this.$d.getTime() + r2 * M3;
171
+ return b.w(m3, this);
172
+ }, m2.subtract = function(t2, e2) {
173
+ return this.add(-1 * t2, e2);
174
+ }, m2.format = function(t2) {
175
+ var e2 = this, n2 = this.$locale();
176
+ if (!this.isValid()) return n2.invalidDate || l;
177
+ var r2 = t2 || "YYYY-MM-DDTHH:mm:ssZ", i2 = b.z(this), s2 = this.$H, u2 = this.$m, a2 = this.$M, o2 = n2.weekdays, c2 = n2.months, f2 = n2.meridiem, h2 = function(t3, n3, i3, s3) {
178
+ return t3 && (t3[n3] || t3(e2, r2)) || i3[n3].slice(0, s3);
179
+ }, d2 = function(t3) {
180
+ return b.s(s2 % 12 || 12, t3, "0");
181
+ }, $2 = f2 || function(t3, e3, n3) {
182
+ var r3 = t3 < 12 ? "AM" : "PM";
183
+ return n3 ? r3.toLowerCase() : r3;
184
+ };
185
+ return r2.replace(y, (function(t3, r3) {
186
+ return r3 || (function(t4) {
187
+ switch (t4) {
188
+ case "YY":
189
+ return String(e2.$y).slice(-2);
190
+ case "YYYY":
191
+ return b.s(e2.$y, 4, "0");
192
+ case "M":
193
+ return a2 + 1;
194
+ case "MM":
195
+ return b.s(a2 + 1, 2, "0");
196
+ case "MMM":
197
+ return h2(n2.monthsShort, a2, c2, 3);
198
+ case "MMMM":
199
+ return h2(c2, a2);
200
+ case "D":
201
+ return e2.$D;
202
+ case "DD":
203
+ return b.s(e2.$D, 2, "0");
204
+ case "d":
205
+ return String(e2.$W);
206
+ case "dd":
207
+ return h2(n2.weekdaysMin, e2.$W, o2, 2);
208
+ case "ddd":
209
+ return h2(n2.weekdaysShort, e2.$W, o2, 3);
210
+ case "dddd":
211
+ return o2[e2.$W];
212
+ case "H":
213
+ return String(s2);
214
+ case "HH":
215
+ return b.s(s2, 2, "0");
216
+ case "h":
217
+ return d2(1);
218
+ case "hh":
219
+ return d2(2);
220
+ case "a":
221
+ return $2(s2, u2, true);
222
+ case "A":
223
+ return $2(s2, u2, false);
224
+ case "m":
225
+ return String(u2);
226
+ case "mm":
227
+ return b.s(u2, 2, "0");
228
+ case "s":
229
+ return String(e2.$s);
230
+ case "ss":
231
+ return b.s(e2.$s, 2, "0");
232
+ case "SSS":
233
+ return b.s(e2.$ms, 3, "0");
234
+ case "Z":
235
+ return i2;
236
+ }
237
+ return null;
238
+ })(t3) || i2.replace(":", "");
239
+ }));
240
+ }, m2.utcOffset = function() {
241
+ return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
242
+ }, m2.diff = function(r2, d2, l2) {
243
+ var $2, y2 = this, M3 = b.p(d2), m3 = O(r2), v2 = (m3.utcOffset() - this.utcOffset()) * e, g2 = this - m3, D2 = function() {
244
+ return b.m(y2, m3);
245
+ };
246
+ switch (M3) {
247
+ case h:
248
+ $2 = D2() / 12;
249
+ break;
250
+ case c:
251
+ $2 = D2();
252
+ break;
253
+ case f:
254
+ $2 = D2() / 3;
255
+ break;
256
+ case o:
257
+ $2 = (g2 - v2) / 6048e5;
258
+ break;
259
+ case a:
260
+ $2 = (g2 - v2) / 864e5;
261
+ break;
262
+ case u:
263
+ $2 = g2 / n;
264
+ break;
265
+ case s:
266
+ $2 = g2 / e;
267
+ break;
268
+ case i:
269
+ $2 = g2 / t;
270
+ break;
271
+ default:
272
+ $2 = g2;
273
+ }
274
+ return l2 ? $2 : b.a($2);
275
+ }, m2.daysInMonth = function() {
276
+ return this.endOf(c).$D;
277
+ }, m2.$locale = function() {
278
+ return D[this.$L];
279
+ }, m2.locale = function(t2, e2) {
280
+ if (!t2) return this.$L;
281
+ var n2 = this.clone(), r2 = w(t2, e2, true);
282
+ return r2 && (n2.$L = r2), n2;
283
+ }, m2.clone = function() {
284
+ return b.w(this.$d, this);
285
+ }, m2.toDate = function() {
286
+ return new Date(this.valueOf());
287
+ }, m2.toJSON = function() {
288
+ return this.isValid() ? this.toISOString() : null;
289
+ }, m2.toISOString = function() {
290
+ return this.$d.toISOString();
291
+ }, m2.toString = function() {
292
+ return this.$d.toUTCString();
293
+ }, M2;
294
+ })(), k = _.prototype;
295
+ return O.prototype = k, [["$ms", r], ["$s", i], ["$m", s], ["$H", u], ["$W", a], ["$M", c], ["$y", h], ["$D", d]].forEach((function(t2) {
296
+ k[t2[1]] = function(e2) {
297
+ return this.$g(e2, t2[0], t2[1]);
298
+ };
299
+ })), O.extend = function(t2, e2) {
300
+ return t2.$i || (t2(e2, _, O), t2.$i = true), O;
301
+ }, O.locale = w, O.isDayjs = S, O.unix = function(t2) {
302
+ return O(1e3 * t2);
303
+ }, O.en = D[g], O.Ls = D, O.p = {}, O;
304
+ }));
305
+ }
306
+ });
307
+
308
+ // node_modules/dayjs/plugin/isoWeek.js
309
+ var require_isoWeek = __commonJS({
310
+ "node_modules/dayjs/plugin/isoWeek.js"(exports, module) {
311
+ "use strict";
312
+ !(function(e, t) {
313
+ "object" == typeof exports && "undefined" != typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define(t) : (e = "undefined" != typeof globalThis ? globalThis : e || self).dayjs_plugin_isoWeek = t();
314
+ })(exports, (function() {
315
+ "use strict";
316
+ var e = "day";
317
+ return function(t, i, s) {
318
+ var a = function(t2) {
319
+ return t2.add(4 - t2.isoWeekday(), e);
320
+ }, d = i.prototype;
321
+ d.isoWeekYear = function() {
322
+ return a(this).year();
323
+ }, d.isoWeek = function(t2) {
324
+ if (!this.$utils().u(t2)) return this.add(7 * (t2 - this.isoWeek()), e);
325
+ var i2, d2, n2, o, r = a(this), u = (i2 = this.isoWeekYear(), d2 = this.$u, n2 = (d2 ? s.utc : s)().year(i2).startOf("year"), o = 4 - n2.isoWeekday(), n2.isoWeekday() > 4 && (o += 7), n2.add(o, e));
326
+ return r.diff(u, "week") + 1;
327
+ }, d.isoWeekday = function(e2) {
328
+ return this.$utils().u(e2) ? this.day() || 7 : this.day(this.day() % 7 ? e2 : e2 - 7);
329
+ };
330
+ var n = d.startOf;
331
+ d.startOf = function(e2, t2) {
332
+ var i2 = this.$utils(), s2 = !!i2.u(t2) || t2;
333
+ return "isoweek" === i2.p(e2) ? s2 ? this.date(this.date() - (this.isoWeekday() - 1)).startOf("day") : this.date(this.date() - 1 - (this.isoWeekday() - 1) + 7).endOf("day") : n.bind(this)(e2, t2);
334
+ };
335
+ };
336
+ }));
337
+ }
338
+ });
339
+
340
+ // node_modules/dayjs/plugin/relativeTime.js
341
+ var require_relativeTime = __commonJS({
342
+ "node_modules/dayjs/plugin/relativeTime.js"(exports, module) {
343
+ "use strict";
344
+ !(function(r, e) {
345
+ "object" == typeof exports && "undefined" != typeof module ? module.exports = e() : "function" == typeof define && define.amd ? define(e) : (r = "undefined" != typeof globalThis ? globalThis : r || self).dayjs_plugin_relativeTime = e();
346
+ })(exports, (function() {
347
+ "use strict";
348
+ return function(r, e, t) {
349
+ r = r || {};
350
+ var n = e.prototype, o = { future: "in %s", past: "%s ago", s: "a few seconds", m: "a minute", mm: "%d minutes", h: "an hour", hh: "%d hours", d: "a day", dd: "%d days", M: "a month", MM: "%d months", y: "a year", yy: "%d years" };
351
+ function i(r2, e2, t2, o2) {
352
+ return n.fromToBase(r2, e2, t2, o2);
353
+ }
354
+ t.en.relativeTime = o, n.fromToBase = function(e2, n2, i2, d2, u) {
355
+ for (var f, a, s, l = i2.$locale().relativeTime || o, h = r.thresholds || [{ l: "s", r: 44, d: "second" }, { l: "m", r: 89 }, { l: "mm", r: 44, d: "minute" }, { l: "h", r: 89 }, { l: "hh", r: 21, d: "hour" }, { l: "d", r: 35 }, { l: "dd", r: 25, d: "day" }, { l: "M", r: 45 }, { l: "MM", r: 10, d: "month" }, { l: "y", r: 17 }, { l: "yy", d: "year" }], m = h.length, c = 0; c < m; c += 1) {
356
+ var y = h[c];
357
+ y.d && (f = d2 ? t(e2).diff(i2, y.d, true) : i2.diff(e2, y.d, true));
358
+ var p = (r.rounding || Math.round)(Math.abs(f));
359
+ if (s = f > 0, p <= y.r || !y.r) {
360
+ p <= 1 && c > 0 && (y = h[c - 1]);
361
+ var v = l[y.l];
362
+ u && (p = u("" + p)), a = "string" == typeof v ? v.replace("%d", p) : v(p, n2, y.l, s);
363
+ break;
364
+ }
365
+ }
366
+ if (n2) return a;
367
+ var M = s ? l.future : l.past;
368
+ return "function" == typeof M ? M(a) : M.replace("%s", a);
369
+ }, n.to = function(r2, e2) {
370
+ return i(r2, e2, this, true);
371
+ }, n.from = function(r2, e2) {
372
+ return i(r2, e2, this);
373
+ };
374
+ var d = function(r2) {
375
+ return r2.$u ? t.utc() : t();
376
+ };
377
+ n.toNow = function(r2) {
378
+ return this.to(d(this), r2);
379
+ }, n.fromNow = function(r2) {
380
+ return this.from(d(this), r2);
381
+ };
382
+ };
383
+ }));
384
+ }
385
+ });
386
+
1
387
  // src/helpers/date/index.ts
2
- import dayjs from "dayjs";
3
- import isoWeek from "dayjs/plugin/isoWeek";
4
- import relativeTime from "dayjs/plugin/relativeTime";
5
- dayjs.extend(relativeTime);
6
- dayjs.extend(isoWeek);
388
+ var import_dayjs = __toESM(require_dayjs_min(), 1);
389
+ var import_isoWeek = __toESM(require_isoWeek(), 1);
390
+ var import_relativeTime = __toESM(require_relativeTime(), 1);
391
+ import_dayjs.default.extend(import_relativeTime.default);
392
+ import_dayjs.default.extend(import_isoWeek.default);
7
393
  var defaultDateFallback = "--";
8
394
  var isValidDateInput = (date) => {
9
- return date !== null && date !== void 0 && dayjs(date).isValid();
395
+ return date !== null && date !== void 0 && (0, import_dayjs.default)(date).isValid();
10
396
  };
11
397
  var formatDate = (date, format = "MM/DD/YYYY") => {
12
398
  if (!isValidDateInput(date)) {
13
399
  return defaultDateFallback;
14
400
  }
15
- return dayjs(date).format(format);
401
+ return (0, import_dayjs.default)(date).format(format);
16
402
  };
17
403
  var timeAgo = (date) => {
18
404
  if (!isValidDateInput(date)) {
19
405
  return defaultDateFallback;
20
406
  }
21
- return dayjs(date).fromNow();
407
+ return (0, import_dayjs.default)(date).fromNow();
22
408
  };
23
409
  var addDays = (date, days) => {
24
- return dayjs(date).add(days, "day").toDate();
410
+ return (0, import_dayjs.default)(date).add(days, "day").toDate();
25
411
  };
26
412
  var subtractDays = (date, days) => {
27
- return dayjs(date).subtract(days, "day").toDate();
413
+ return (0, import_dayjs.default)(date).subtract(days, "day").toDate();
28
414
  };
29
415
  var daysBetween = (dateA, dateB) => {
30
416
  if (!isValidDateInput(dateA) || !isValidDateInput(dateB)) {
31
417
  return 0;
32
418
  }
33
- return Math.abs(dayjs(dateA).diff(dayjs(dateB), "day"));
419
+ return Math.abs((0, import_dayjs.default)(dateA).diff((0, import_dayjs.default)(dateB), "day"));
34
420
  };
35
421
  var isToday = (date) => {
36
422
  if (!isValidDateInput(date)) {
37
423
  return false;
38
424
  }
39
- return dayjs(date).isSame(dayjs(), "day");
425
+ return (0, import_dayjs.default)(date).isSame((0, import_dayjs.default)(), "day");
40
426
  };
41
427
  var isPast = (date) => {
42
428
  if (!isValidDateInput(date)) {
43
429
  return false;
44
430
  }
45
- return dayjs(date).isBefore(dayjs());
431
+ return (0, import_dayjs.default)(date).isBefore((0, import_dayjs.default)());
46
432
  };
47
433
  var isFuture = (date) => {
48
434
  if (!isValidDateInput(date)) {
49
435
  return false;
50
436
  }
51
- return dayjs(date).isAfter(dayjs());
437
+ return (0, import_dayjs.default)(date).isAfter((0, import_dayjs.default)());
52
438
  };
53
439
  var startOfDay = (date) => {
54
- return dayjs(date).startOf("day").toDate();
440
+ return (0, import_dayjs.default)(date).startOf("day").toDate();
55
441
  };
56
442
  var endOfDay = (date) => {
57
- return dayjs(date).endOf("day").toDate();
443
+ return (0, import_dayjs.default)(date).endOf("day").toDate();
58
444
  };
59
445
  var startOfWeek = (date) => {
60
- return dayjs(date).startOf("isoWeek").toDate();
446
+ return (0, import_dayjs.default)(date).startOf("isoWeek").toDate();
61
447
  };
62
448
  var endOfWeek = (date) => {
63
- return dayjs(date).endOf("isoWeek").toDate();
449
+ return (0, import_dayjs.default)(date).endOf("isoWeek").toDate();
64
450
  };
65
451
  var getWeekDays = (date) => {
66
- const weekStart = dayjs(date).startOf("isoWeek");
452
+ const weekStart = (0, import_dayjs.default)(date).startOf("isoWeek");
67
453
  return Array.from({ length: 7 }, (_value, index) => {
68
454
  return weekStart.add(index, "day").startOf("day").toDate();
69
455
  });
70
456
  };
71
457
  var addWeeks = (date, weeks) => {
72
- return dayjs(date).add(weeks, "week").toDate();
458
+ return (0, import_dayjs.default)(date).add(weeks, "week").toDate();
73
459
  };
74
460
  var subtractWeeks = (date, weeks) => {
75
- return dayjs(date).subtract(weeks, "week").toDate();
461
+ return (0, import_dayjs.default)(date).subtract(weeks, "week").toDate();
76
462
  };
77
463
 
78
464
  // src/helpers/object/index.ts
@@ -1188,3 +1574,4 @@ export {
1188
1574
  validPath,
1189
1575
  wordCount
1190
1576
  };
1577
+ //# sourceMappingURL=index.mjs.map