bs-ad-calendar-react 1.2.2 → 1.3.1
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/README.md +135 -85
- package/dist/bs-ad-calendar.css +1 -1
- package/dist/bs-ad-calendar.js +652 -766
- package/dist/bs-ad-calendar.umd.cjs +1 -1
- package/dist/components/CalendarInput/CalendarInput.d.ts +1 -0
- package/dist/components/CalendarInputTab.d.ts +1 -0
- package/dist/components/ExampleCard.d.ts +0 -1
- package/dist/components/RangeTab.d.ts +3 -3
- package/dist/index.d.ts +2 -1
- package/dist/types/index.d.ts +5 -4
- package/package.json +26 -4
package/dist/bs-ad-calendar.js
CHANGED
|
@@ -1,255 +1,255 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useMemo as
|
|
3
|
-
const
|
|
4
|
-
let
|
|
1
|
+
import { jsx as g, jsxs as S, Fragment as pe } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as $t, useState as B, useEffect as Yt, useRef as xt } from "react";
|
|
3
|
+
const Q = [1943, 4, 14], Lt = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], be = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], W = [[[30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31], 365], [[31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 365], [[31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30], 365], [[31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], 366], [[30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31], 365], [[31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 365], [[31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30], 365], [[31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], 366], [[31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 29, 31], 365], [[31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 365], [[31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30], 365], [[31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], 366], [[31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 30, 30], 365], [[31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 365], [[31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30], 365], [[31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], 366], [[31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 30, 30], 365], [[31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 365], [[31, 32, 31, 32, 31, 30, 30, 29, 30, 29, 30, 30], 365], [[31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31], 366], [[31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30], 365], [[31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 365], [[31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 30], 365], [[31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31], 366], [[31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30], 365], [[31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 365], [[31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], 366], [[30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31], 365], [[31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 365], [[31, 31, 32, 31, 32, 30, 30, 29, 30, 29, 30, 30], 365], [[31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], 366], [[30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31], 365], [[31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 365], [[31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30], 365], [[31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], 366], [[30, 32, 31, 32, 31, 31, 29, 30, 30, 29, 29, 31], 365], [[31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 365], [[31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30], 365], [[31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], 366], [[31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 30, 30], 365], [[31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 365], [[31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30], 365], [[31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], 366], [[31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 30, 30], 365], [[31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 365], [[31, 32, 31, 32, 31, 30, 30, 29, 30, 29, 30, 30], 365], [[31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], 366], [[31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30], 365], [[31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 365], [[31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 30], 365], [[31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31], 366], [[31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30], 365], [[31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 365], [[31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 30], 365], [[31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31], 366], [[31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 365], [[31, 31, 32, 31, 32, 30, 30, 29, 30, 29, 30, 30], 365], [[31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], 366], [[30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31], 365], [[31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 365], [[31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30], 365], [[31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], 366], [[30, 32, 31, 32, 31, 31, 29, 30, 29, 30, 29, 31], 365], [[31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 365], [[31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30], 365], [[31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], 366], [[31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 29, 31], 365], [[31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 365], [[31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30], 365], [[31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], 366], [[31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 30, 30], 365], [[31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 365], [[31, 32, 31, 32, 31, 30, 30, 29, 30, 29, 30, 30], 365], [[31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], 366], [[31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30], 365], [[31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 365], [[31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 30], 365], [[31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31], 366], [[31, 31, 31, 32, 31, 31, 30, 29, 30, 29, 30, 30], 365], [[31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 365], [[31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 30], 365], [[31, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31], 366], [[31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 365], [[31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 365], [[31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], 366], [[30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31], 365], [[31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 365], [[31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30], 365], [[31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], 366], [[30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31], 365], [[31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 365], [[31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30], 365], [[31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], 366], [[31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 29, 31], 365], [[31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 365], [[31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30], 365], [[31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31], 366], [[31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 30, 30], 365], [[31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30], 365], [[31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30], 365]];
|
|
4
|
+
let Rt = class extends Error {
|
|
5
5
|
constructor(t) {
|
|
6
6
|
super(t), this.name = "DateOutOfRangeError";
|
|
7
7
|
}
|
|
8
8
|
};
|
|
9
|
-
const
|
|
10
|
-
let
|
|
11
|
-
for (let
|
|
12
|
-
return t <= 2 && (e -= 1),
|
|
9
|
+
const _t = () => Q[0] + 1, jt = () => Q[0] + W.length - 1, Pt = () => 2e3, Wt = () => 2e3 + W.length - 1, yt = (e) => e % 400 === 0 || e % 4 === 0 && e % 100 !== 0, kt = (e) => yt(e) ? be : Lt, Se = (e, t, n) => !(e < _t() || e > jt() || t < 1 || t > 12 || n < 1 || n > kt(e)[t - 1]), Ft = (e, t, n) => {
|
|
10
|
+
let a = e * 365 + n;
|
|
11
|
+
for (let s = 0; s < t - 1; s++) a += Lt[s];
|
|
12
|
+
return t <= 2 && (e -= 1), a += Math.floor(e / 4) - Math.floor(e / 100) + Math.floor(e / 400), a;
|
|
13
13
|
};
|
|
14
|
-
function Ee(e, t,
|
|
15
|
-
const
|
|
16
|
-
if (!
|
|
17
|
-
let
|
|
18
|
-
for (; u >=
|
|
19
|
-
let
|
|
20
|
-
for (; u >=
|
|
21
|
-
return o += u, [
|
|
14
|
+
function Ee(e, t, n) {
|
|
15
|
+
const a = t + 1;
|
|
16
|
+
if (!Se(e, a, n)) throw new Rt("Date out of range");
|
|
17
|
+
let s = 2e3, r = 1, o = 1, u = Math.abs(Ft(e, a, n) - Ft(...Q)), i = 0;
|
|
18
|
+
for (; u >= W[i][1]; ) u -= W[i][1], s += 1, i += 1;
|
|
19
|
+
let h = 0;
|
|
20
|
+
for (; u >= W[i][0][h]; ) u -= W[i][0][h], r += 1, h += 1;
|
|
21
|
+
return o += u, [s, r - 1, o];
|
|
22
22
|
}
|
|
23
|
-
const
|
|
24
|
-
let
|
|
25
|
-
const
|
|
26
|
-
for (let r = 0; r < t - 1; r++)
|
|
27
|
-
for (let r = 0; r <
|
|
28
|
-
return
|
|
29
|
-
},
|
|
30
|
-
const
|
|
31
|
-
if (!
|
|
32
|
-
let [
|
|
33
|
-
const u =
|
|
34
|
-
let i = Math.abs(Ye(e,
|
|
35
|
-
for (; i >= 366 &&
|
|
36
|
-
const
|
|
37
|
-
let
|
|
38
|
-
for (; i >= c
|
|
39
|
-
return o += i, [
|
|
40
|
-
},
|
|
41
|
-
const t = e.getTime(),
|
|
42
|
-
return { year:
|
|
43
|
-
},
|
|
44
|
-
const u = new Date(e, t, a, s,
|
|
45
|
-
let i = u <
|
|
46
|
-
const
|
|
47
|
-
return new Date(u.getTime() - i +
|
|
23
|
+
const we = (e, t, n) => !(e < Pt() || e > Wt() || t < 1 || t > 12 || n < 1 || n > W[e - 2e3][0][t - 1]), Ye = (e, t, n) => {
|
|
24
|
+
let a = n - 1;
|
|
25
|
+
const s = e - 2e3;
|
|
26
|
+
for (let r = 0; r < t - 1; r++) a += W[s][0][r];
|
|
27
|
+
for (let r = 0; r < s; r++) a += W[r][1];
|
|
28
|
+
return a;
|
|
29
|
+
}, ke = (e, t, n) => {
|
|
30
|
+
const a = t + 1;
|
|
31
|
+
if (!we(e, a, n)) throw new Rt("Date out of range");
|
|
32
|
+
let [s, r, o] = [Q[0], 1, 1];
|
|
33
|
+
const u = kt(s).slice(0, Q[1] - 1).reduce((D, d) => D + d, 0) + Q[2] - 1;
|
|
34
|
+
let i = Math.abs(Ye(e, a, n) + u);
|
|
35
|
+
for (; i >= 366 && yt(s) || i >= 365 && !yt(s); ) i -= yt(s) ? 366 : 365, s += 1;
|
|
36
|
+
const h = kt(s);
|
|
37
|
+
let c = 0;
|
|
38
|
+
for (; i >= h[c]; ) i -= h[c], r += 1, c += 1;
|
|
39
|
+
return o += i, [s, r - 1, o];
|
|
40
|
+
}, J = { enMinYear: _t, enMaxYear: jt, npMinYear: Pt, npMaxYear: Wt, englishToNepali: Ee, nepaliToEnglish: ke }, Ut = "en", L = "ne", Jt = 207e5, Vt = 198e5, Ce = 5049018e5, Ae = new Date(1986, 0, 1, 0, 15), Mt = ["Baisakh", "Jestha", "Asar", "Shrawan", "Bhadra", "Aswin", "Kartik", "Mangsir", "Poush", "Magh", "Falgun", "Chaitra"], Ct = ["Bai", "Jes", "Asa", "Shr", "Bhd", "Asw", "Kar", "Man", "Pou", "Mag", "Fal", "Cha"], Kt = ["बैशाख", "जेठ", "असार", "श्रावण", "भाद्र", "आश्विन", "कार्तिक", "मंसिर", "पौष", "माघ", "फाल्गुण", "चैत्र"], ve = ["बै", "जे", "अ", "श्रा", "भा", "आ", "का", "मं", "पौ", "मा", "फा", "चै"], At = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], vt = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], $e = ["जनवरी", "फेब्रुअरी", "मार्च", "अप्रिल", "मे", "जुन", "जुलाई", "अगस्ट", "सेप्टेम्बर", "अक्टोबर", "नोभेम्बर", "डिसेम्बर"], xe = ["जन", "फेब", "मार", "अप्रि", "मे", "जुन", "जुला", "अग", "सेप", "अक्टो", "नोभे", "डिसे"], Gt = ["०", "१", "२", "३", "४", "५", "६", "७", "८", "९"], tt = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], pt = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], zt = ["आइत", "सोम", "मंगल", "बुध", "बिहि", "शुक्र", "शनि"], qt = ["आइतबार", "सोमबार", "मंगलबार", "बुधबार", "बिहिबार", "शुक्रबार", "शनिबार"], Fe = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DD?|ddd?d?|do?|YYYY|YY|y{2,4}|yo?|a|A|hh?|HH?|mm?|ss?|SSS|x|X|.)/g, Oe = (e) => {
|
|
41
|
+
const t = e.getTime(), n = t < Ce ? Vt : Jt, a = new Date(t + n), s = a.getUTCFullYear(), r = a.getUTCMonth(), o = a.getUTCDate(), u = a.getUTCHours(), i = a.getUTCMinutes(), h = a.getUTCSeconds(), c = a.getUTCMilliseconds(), D = a.getUTCDay();
|
|
42
|
+
return { year: s, month0: r, day: o, hour: u, minute: i, second: h, ms: c, weekDay: D };
|
|
43
|
+
}, Ot = (e, t, n, a, s, r, o) => {
|
|
44
|
+
const u = new Date(e, t, n, a, s, r, o);
|
|
45
|
+
let i = u < Ae ? Vt : Jt;
|
|
46
|
+
const h = -1 * u.getTimezoneOffset() * 60 * 1e3;
|
|
47
|
+
return new Date(u.getTime() - i + h);
|
|
48
48
|
}, bt = (e) => {
|
|
49
|
-
const t = e.match(
|
|
50
|
-
return t ? t.map((
|
|
51
|
-
},
|
|
49
|
+
const t = e.match(Fe);
|
|
50
|
+
return t ? t.map((n) => n.startsWith("[") && n.endsWith("]") ? n.slice(1, -1) : n) : [];
|
|
51
|
+
}, P = (e) => {
|
|
52
52
|
if (e.length === 0) return new RegExp("");
|
|
53
53
|
let t = [...e];
|
|
54
|
-
if (t = t.sort((
|
|
55
|
-
const
|
|
56
|
-
return new RegExp(
|
|
57
|
-
},
|
|
58
|
-
const
|
|
59
|
-
return t !== L ?
|
|
60
|
-
},
|
|
61
|
-
const
|
|
62
|
-
return
|
|
63
|
-
},
|
|
64
|
-
const
|
|
65
|
-
return
|
|
66
|
-
}, ae = (e, t) =>
|
|
67
|
-
const
|
|
68
|
-
return
|
|
69
|
-
},
|
|
70
|
-
const t =
|
|
71
|
-
return `${t}-${
|
|
72
|
-
},
|
|
73
|
-
const
|
|
74
|
-
return
|
|
75
|
-
}, Qe = (e, t) =>
|
|
54
|
+
if (t = t.sort((a, s) => s.length - a.length), t[0] === "") return new RegExp("");
|
|
55
|
+
const n = `(${t.join("|")})`;
|
|
56
|
+
return new RegExp(n);
|
|
57
|
+
}, F = (e) => e.toString().padStart(2, "0"), Xt = (e) => e.toString().padStart(3, "0"), Ne = (e) => e.split("").map((t) => Gt[t.charCodeAt(0) - 48]).join(""), b = (e, t) => {
|
|
58
|
+
const n = typeof e == "string" ? e : String(e);
|
|
59
|
+
return t !== L ? n : Ne(n);
|
|
60
|
+
}, Te = (e, t) => b(e.getYear(), t).substring(2), He = (e, t) => b(e.getYear(), t), Be = (e, t) => b(e.getEnglishYear(), t).substring(2), Ie = (e, t) => b(e.getEnglishYear(), t), Le = (e, t) => b(e.getMonth() + 1, t), Re = (e, t) => b(F(e.getMonth() + 1), t), _e = (e, t) => t === L ? ve[e.getMonth()] : Ct[e.getMonth()], je = (e, t) => t === L ? Kt[e.getMonth()] : Mt[e.getMonth()], Pe = (e, t) => b(e.getEnglishMonth() + 1, t), We = (e, t) => b(F(e.getEnglishMonth() + 1), t), Ue = (e, t) => t === L ? xe[e.getEnglishMonth()] : vt[e.getEnglishMonth()], Je = (e, t) => t === L ? $e[e.getEnglishMonth()] : At[e.getEnglishMonth()], Ve = (e, t) => b(e.getDate(), t), Ke = (e, t) => b(F(e.getDate()), t), Ge = (e, t) => b(e.getEnglishDate(), t), ze = (e, t) => b(F(e.getEnglishDate()), t), Zt = (e, t) => b(e.getDay(), t), ft = (e, t) => t === L ? zt[e.getDay()] : tt[e.getDay()], Qt = (e, t) => t === L ? qt[e.getDay()] : pt[e.getDay()], te = (e, t) => b(e.getHours(), t), ee = (e, t) => b(F(e.getHours()), t), ne = (e, t) => {
|
|
61
|
+
const n = e.getHours(), a = n > 12 ? n - 12 : n;
|
|
62
|
+
return b(a, t);
|
|
63
|
+
}, se = (e, t) => {
|
|
64
|
+
const n = e.getHours(), a = n > 12 ? n - 12 : n;
|
|
65
|
+
return b(F(a), t);
|
|
66
|
+
}, ae = (e, t) => b(e.getMinutes(), t), re = (e, t) => b(F(e.getMinutes()), t), oe = (e, t) => b(e.getSeconds(), t), ie = (e, t) => b(F(e.getSeconds()), t), ue = (e, t) => b(Xt(e.getMilliseconds()), t), ce = (e, t) => t === L ? e.getHours() >= 12 ? "पिम" : "एम" : e.getHours() >= 12 ? "PM" : "AM", he = (e, t) => t === L ? e.getHours() >= 12 ? "पिम" : "एम" : e.getHours() >= 12 ? "pm" : "am", Nt = { YY: Te, YYYY: He, M: Le, MM: Re, MMM: _e, MMMM: je, D: Ve, DD: Ke, d: Zt, dd: ft, ddd: ft, dddd: Qt, H: te, HH: ee, h: ne, hh: se, m: ae, mm: re, s: oe, ss: ie, SSS: ue, A: ce, a: he }, le = (e, t, n) => {
|
|
67
|
+
const a = bt(t), s = (r) => r in Nt ? Nt[r](e, n) : r;
|
|
68
|
+
return a.map(s).join("");
|
|
69
|
+
}, qe = (e, t) => le(e, t, Ut), Xe = (e, t) => le(e, t, L), Ze = (e) => {
|
|
70
|
+
const t = F(e.getYear()), n = F(e.getMonth() + 1), a = F(e.getDate()), s = F(e.getHours()), r = F(e.getMinutes()), o = F(e.getSeconds()), u = e.getMilliseconds(), i = u === 0 ? "" : `.${Xt(u)}`;
|
|
71
|
+
return `${t}-${n}-${a} ${s}:${r}:${o}${i}`;
|
|
72
|
+
}, Tt = { YY: Be, YYYY: Ie, M: Pe, MM: We, MMM: Ue, MMMM: Je, D: Ge, DD: ze, d: Zt, dd: ft, ddd: ft, dddd: Qt, H: te, HH: ee, h: ne, hh: se, m: ae, mm: re, s: oe, ss: ie, SSS: ue, A: ce, a: he }, de = (e, t, n) => {
|
|
73
|
+
const a = bt(t), s = (r) => r in Tt ? Tt[r](e, n) : r;
|
|
74
|
+
return a.map(s).join("");
|
|
75
|
+
}, Qe = (e, t) => de(e, t, Ut), t3 = (e, t) => de(e, t, L);
|
|
76
76
|
function e3(e) {
|
|
77
|
-
const t = e.split(/[-./]/, 3), [
|
|
77
|
+
const t = e.split(/[-./]/, 3), [n, a = 1, s = 1] = t.map((r) => {
|
|
78
78
|
const o = parseInt(r, 10);
|
|
79
79
|
if (Number.isNaN(o)) throw new Error("Invalid date");
|
|
80
80
|
return o;
|
|
81
81
|
});
|
|
82
|
-
return [
|
|
82
|
+
return [n, a - 1, s];
|
|
83
83
|
}
|
|
84
84
|
function n3(e) {
|
|
85
85
|
if (!e) return [0, 0, 0, 0];
|
|
86
|
-
const [t,
|
|
87
|
-
const
|
|
88
|
-
if (Number.isNaN(
|
|
89
|
-
return
|
|
86
|
+
const [t, n = "0"] = e.split(".", 2), a = t.split(":", 3), [s, r = 0, o = 0] = a.map((i) => {
|
|
87
|
+
const h = parseInt(i, 10);
|
|
88
|
+
if (Number.isNaN(h)) throw new Error("Invalid time");
|
|
89
|
+
return h;
|
|
90
90
|
});
|
|
91
|
-
let u = parseInt(
|
|
92
|
-
return Number.isNaN(u) && (u = 0), [
|
|
93
|
-
}
|
|
94
|
-
function a3(e) {
|
|
95
|
-
const [t, a] = e.split(" ", 2), [s, n, r] = e3(t), [o, u, i, c] = n3(a);
|
|
96
|
-
return [s, n, r, o, u, i, c];
|
|
91
|
+
let u = parseInt(n, 10);
|
|
92
|
+
return Number.isNaN(u) && (u = 0), [s, r, o, u];
|
|
97
93
|
}
|
|
98
|
-
const Bt = { YY: /(\d\d)/, YYYY: /(\d\d\d\d)/, M: /(1[0-2]|0[1-9]|[1-9])/, MM: /(1[0-2]|0[1-9]|[1-9])/, D: /(3[0-2]|[1-2]\d|0[1-9]|[1-9]| [1-9])/, DD: /(3[0-2]|[1-2]\d|0[1-9]|[1-9]| [1-9])/, H: /(2[0-3]|[0-1]\d|\d)/, HH: /(2[0-3]|[0-1]\d|\d)/, hh: /(1[0-2]|0[1-9]|[1-9])/, mm: /([0-5]\d|\d)/, ss: /([0-5]\d|\d)/, SSS: /(\d\d\d)/, A: /(AM|PM)/, a: /(am|pm)/, MMMM: R(pt), MMM: R(wt), dddd: R(St), ddd: R(z), dd: R(z), d: /([0-6])/ };
|
|
99
94
|
function s3(e) {
|
|
100
|
-
const t =
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
95
|
+
const [t, n] = e.split(" ", 2), [a, s, r] = e3(t), [o, u, i, h] = n3(n);
|
|
96
|
+
return [a, s, r, o, u, i, h];
|
|
97
|
+
}
|
|
98
|
+
const Ht = { YY: /(\d\d)/, YYYY: /(\d\d\d\d)/, M: /(1[0-2]|0[1-9]|[1-9])/, MM: /(1[0-2]|0[1-9]|[1-9])/, D: /(3[0-2]|[1-2]\d|0[1-9]|[1-9]| [1-9])/, DD: /(3[0-2]|[1-2]\d|0[1-9]|[1-9]| [1-9])/, H: /(2[0-3]|[0-1]\d|\d)/, HH: /(2[0-3]|[0-1]\d|\d)/, hh: /(1[0-2]|0[1-9]|[1-9])/, mm: /([0-5]\d|\d)/, ss: /([0-5]\d|\d)/, SSS: /(\d\d\d)/, A: /(AM|PM)/, a: /(am|pm)/, MMMM: P(Mt), MMM: P(Ct), dddd: P(pt), ddd: P(tt), dd: P(tt), d: /([0-6])/ };
|
|
99
|
+
function a3(e) {
|
|
100
|
+
const t = [], n = [];
|
|
101
|
+
for (const s of e) s in Ht ? (t.push(s), n.push(Ht[s].source)) : n.push(s.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&"));
|
|
102
|
+
const a = n.join("");
|
|
103
|
+
return { dateTokens: t, regex: new RegExp(`^${a}$`) };
|
|
104
104
|
}
|
|
105
105
|
function r3(e, t) {
|
|
106
|
-
let [a, s,
|
|
106
|
+
let [n, a, s, r, o, u, i, h] = [0, 1, 1, 0, 0, 0, 0, 0], c = !1, D = !1;
|
|
107
107
|
for (let d = 0; d < e.length; d++) {
|
|
108
|
-
const k = e[d],
|
|
108
|
+
const k = e[d], m = parseInt(t[d + 1]);
|
|
109
109
|
switch (k) {
|
|
110
110
|
case "YYYY":
|
|
111
|
-
|
|
111
|
+
n = m;
|
|
112
112
|
break;
|
|
113
113
|
case "YY":
|
|
114
|
-
|
|
114
|
+
n = 2e3 + parseInt(t[d]);
|
|
115
115
|
break;
|
|
116
116
|
case "MM":
|
|
117
117
|
case "M":
|
|
118
|
-
|
|
118
|
+
a = m;
|
|
119
119
|
break;
|
|
120
120
|
case "MMMM":
|
|
121
|
-
|
|
121
|
+
a = Mt.indexOf(t[d + 1]) + 1;
|
|
122
122
|
break;
|
|
123
123
|
case "MMM":
|
|
124
|
-
|
|
124
|
+
a = Ct.indexOf(t[d + 1]) + 1;
|
|
125
125
|
break;
|
|
126
126
|
case "DD":
|
|
127
127
|
case "D":
|
|
128
|
-
|
|
128
|
+
s = m;
|
|
129
129
|
break;
|
|
130
130
|
case "HH":
|
|
131
131
|
case "H":
|
|
132
|
-
r =
|
|
132
|
+
r = m;
|
|
133
133
|
break;
|
|
134
134
|
case "hh":
|
|
135
135
|
case "h":
|
|
136
|
-
o =
|
|
136
|
+
o = m, D = !0;
|
|
137
137
|
break;
|
|
138
138
|
case "mm":
|
|
139
139
|
case "m":
|
|
140
|
-
u =
|
|
140
|
+
u = m;
|
|
141
141
|
break;
|
|
142
142
|
case "ss":
|
|
143
143
|
case "s":
|
|
144
|
-
i =
|
|
144
|
+
i = m;
|
|
145
145
|
break;
|
|
146
146
|
case "SSS":
|
|
147
|
-
|
|
147
|
+
h = m;
|
|
148
148
|
break;
|
|
149
149
|
case "A":
|
|
150
150
|
case "a":
|
|
151
|
-
|
|
151
|
+
c = t[d + 1].toLowerCase() === "pm";
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
|
-
return
|
|
154
|
+
return D && (r = o + (c ? 12 : 0)), { year: n, month0: a - 1, day: s, hour: r, minute: u, second: i, ms: h };
|
|
155
155
|
}
|
|
156
|
-
function
|
|
157
|
-
const
|
|
156
|
+
function ge(e, t) {
|
|
157
|
+
const n = bt(t), { dateTokens: a, regex: s } = a3(n), r = RegExp(s).exec(e);
|
|
158
158
|
if (!r) throw new Error("Invalid date format");
|
|
159
|
-
const { year: o, month0: u, day: i, hour:
|
|
160
|
-
return [o, u, i,
|
|
159
|
+
const { year: o, month0: u, day: i, hour: h, minute: c, second: D, ms: d } = r3(a, r);
|
|
160
|
+
return [o, u, i, h, c, D, d];
|
|
161
161
|
}
|
|
162
|
-
const
|
|
162
|
+
const Bt = { YY: /(\d\d)/, YYYY: /(\d\d\d\d)/, M: /(1[0-2]|0[1-9]|[1-9])/, MM: /(1[0-2]|0[1-9]|[1-9])/, D: /(3[0-2]|[1-2]\d|0[1-9]|[1-9]| [1-9])/, DD: /(3[0-2]|[1-2]\d|0[1-9]|[1-9]| [1-9])/, H: /(2[0-3]|[0-1]\d|\d)/, HH: /(2[0-3]|[0-1]\d|\d)/, hh: /(1[0-2]|0[1-9]|[1-9])/, mm: /([0-5]\d|\d)/, ss: /([0-5]\d|\d)/, SSS: /(\d\d\d)/, A: /(AM|PM)/, a: /(am|pm)/, MMMM: P(At), MMM: P(vt), dddd: P(pt), ddd: P(tt), dd: P(tt), d: /([0-6])/ };
|
|
163
163
|
function o3(e) {
|
|
164
|
-
const t = [],
|
|
165
|
-
for (const
|
|
166
|
-
const
|
|
167
|
-
return { dateTokens: t, regex: new RegExp(`^${
|
|
164
|
+
const t = [], n = [];
|
|
165
|
+
for (const s of e) s in Bt ? (t.push(s), n.push(Bt[s].source)) : n.push(s.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&"));
|
|
166
|
+
const a = n.join("");
|
|
167
|
+
return { dateTokens: t, regex: new RegExp(`^${a}$`) };
|
|
168
168
|
}
|
|
169
169
|
function i3(e, t) {
|
|
170
|
-
let [a, s,
|
|
170
|
+
let [n, a, s, r, o, u, i, h] = [0, 1, 1, 0, 0, 0, 0, 0], c = !1, D = !1;
|
|
171
171
|
for (let d = 0; d < e.length; d++) {
|
|
172
|
-
const k = e[d],
|
|
172
|
+
const k = e[d], m = parseInt(t[d + 1]);
|
|
173
173
|
switch (k) {
|
|
174
174
|
case "YYYY":
|
|
175
|
-
|
|
175
|
+
n = m;
|
|
176
176
|
break;
|
|
177
177
|
case "YY":
|
|
178
|
-
|
|
178
|
+
n = 2e3 + parseInt(t[d]);
|
|
179
179
|
break;
|
|
180
180
|
case "MM":
|
|
181
181
|
case "M":
|
|
182
|
-
|
|
182
|
+
a = m;
|
|
183
183
|
break;
|
|
184
184
|
case "MMMM":
|
|
185
|
-
|
|
185
|
+
a = At.indexOf(t[d + 1]) + 1;
|
|
186
186
|
break;
|
|
187
187
|
case "MMM":
|
|
188
|
-
|
|
188
|
+
a = vt.indexOf(t[d + 1]) + 1;
|
|
189
189
|
break;
|
|
190
190
|
case "DD":
|
|
191
191
|
case "D":
|
|
192
|
-
|
|
192
|
+
s = m;
|
|
193
193
|
break;
|
|
194
194
|
case "HH":
|
|
195
195
|
case "H":
|
|
196
|
-
r =
|
|
196
|
+
r = m;
|
|
197
197
|
break;
|
|
198
198
|
case "hh":
|
|
199
199
|
case "h":
|
|
200
|
-
o =
|
|
200
|
+
o = m, D = !0;
|
|
201
201
|
break;
|
|
202
202
|
case "mm":
|
|
203
203
|
case "m":
|
|
204
|
-
u =
|
|
204
|
+
u = m;
|
|
205
205
|
break;
|
|
206
206
|
case "ss":
|
|
207
207
|
case "s":
|
|
208
|
-
i =
|
|
208
|
+
i = m;
|
|
209
209
|
break;
|
|
210
210
|
case "SSS":
|
|
211
|
-
|
|
211
|
+
h = m;
|
|
212
212
|
break;
|
|
213
213
|
case "A":
|
|
214
214
|
case "a":
|
|
215
|
-
|
|
215
|
+
c = t[d + 1].toLowerCase() === "pm";
|
|
216
216
|
}
|
|
217
217
|
}
|
|
218
|
-
return
|
|
218
|
+
return D && (r = o + (c ? 12 : 0)), { year: n, month0: a - 1, day: s, hour: r, minute: u, second: i, ms: h };
|
|
219
219
|
}
|
|
220
220
|
function u3(e, t) {
|
|
221
|
-
const
|
|
221
|
+
const n = bt(t), { dateTokens: a, regex: s } = o3(n), r = RegExp(s).exec(e);
|
|
222
222
|
if (!r) throw new Error("Invalid date format");
|
|
223
|
-
const { year: o, month0: u, day: i, hour:
|
|
224
|
-
return [o, u, i,
|
|
223
|
+
const { year: o, month0: u, day: i, hour: h, minute: c, second: D, ms: d } = i3(a, r);
|
|
224
|
+
return [o, u, i, h, c, D, d];
|
|
225
225
|
}
|
|
226
226
|
function c3(e) {
|
|
227
227
|
const t = { एम: "AM", पिम: "PM" };
|
|
228
|
-
|
|
229
|
-
const
|
|
230
|
-
return e.replace(
|
|
228
|
+
Kt.forEach((a, s) => t[a] = Mt[s]), qt.forEach((a, s) => t[a] = pt[s]), zt.forEach((a, s) => t[a] = tt[s]), Gt.forEach((a, s) => t[a] = String(s));
|
|
229
|
+
const n = new RegExp(Object.keys(t).join("|"), "g");
|
|
230
|
+
return e.replace(n, (a) => t[a]);
|
|
231
231
|
}
|
|
232
|
-
function
|
|
233
|
-
const
|
|
234
|
-
return
|
|
232
|
+
function h3(e, t) {
|
|
233
|
+
const n = c3(e);
|
|
234
|
+
return ge(n, t);
|
|
235
235
|
}
|
|
236
|
-
class
|
|
236
|
+
class St extends Error {
|
|
237
237
|
constructor(t) {
|
|
238
238
|
super(t), this.name = "ValidationError";
|
|
239
239
|
}
|
|
240
240
|
}
|
|
241
|
-
const
|
|
242
|
-
if (e < 0 || e > 23) throw new
|
|
241
|
+
const l3 = (e) => {
|
|
242
|
+
if (e < 0 || e > 23) throw new St("Hour should be in the range 0-23");
|
|
243
243
|
}, d3 = (e) => {
|
|
244
|
-
if (e < 0 || e > 59) throw new
|
|
244
|
+
if (e < 0 || e > 59) throw new St("Minute should be in the range 0-59");
|
|
245
245
|
}, g3 = (e) => {
|
|
246
|
-
if (e < 0 || e > 59) throw new
|
|
246
|
+
if (e < 0 || e > 59) throw new St("Second should be in the range 0-59");
|
|
247
247
|
}, m3 = (e) => {
|
|
248
|
-
if (e < 0 || e > 999) throw new
|
|
249
|
-
},
|
|
250
|
-
|
|
248
|
+
if (e < 0 || e > 999) throw new St("Millisecond should be in the range 0-999");
|
|
249
|
+
}, D3 = (e, t, n, a) => {
|
|
250
|
+
l3(e), d3(t), g3(n), m3(a);
|
|
251
251
|
};
|
|
252
|
-
class
|
|
252
|
+
class Y {
|
|
253
253
|
timestamp;
|
|
254
254
|
year;
|
|
255
255
|
yearEn;
|
|
@@ -263,11 +263,11 @@ class E {
|
|
|
263
263
|
constructor(...t) {
|
|
264
264
|
if (t.length === 0) this.initFromCurrentDate();
|
|
265
265
|
else if (t.length === 1 && t[0] instanceof Date) this.initFromEnglishDate(t[0]);
|
|
266
|
-
else if (t.length === 1 && t[0] instanceof
|
|
266
|
+
else if (t.length === 1 && t[0] instanceof Y) this.initFromNepaliDate(t[0]);
|
|
267
267
|
else if (t.length === 1 && typeof t[0] == "string") this.parseFromString(t[0]);
|
|
268
268
|
else if (t.length === 1 && typeof t[0] == "number") this.initFromTimestamp(t[0]);
|
|
269
269
|
else if (t.length === 2 && typeof t[0] == "string" && typeof t[1] == "string") this.parseFromStringWithFormat(t[0], t[1]);
|
|
270
|
-
else if (t.length >= 2 && t.length <= 8 && t.every((
|
|
270
|
+
else if (t.length >= 2 && t.length <= 8 && t.every((n) => typeof n == "number")) this.initFromComponents(t);
|
|
271
271
|
else throw new Error("Invalid date argument");
|
|
272
272
|
}
|
|
273
273
|
initFromCurrentDate() {
|
|
@@ -280,25 +280,25 @@ class E {
|
|
|
280
280
|
this.set(t.year, t.month, t.day, t.hour, t.minute, t.getSeconds(), t.getMilliseconds());
|
|
281
281
|
}
|
|
282
282
|
parseFromString(t) {
|
|
283
|
-
const
|
|
284
|
-
this.set(
|
|
283
|
+
const n = s3(t);
|
|
284
|
+
this.set(n[0], n[1], n[2], n[3], n[4], n[5], n[6]);
|
|
285
285
|
}
|
|
286
286
|
initFromTimestamp(t) {
|
|
287
287
|
this._setDateObject(new Date(t));
|
|
288
288
|
}
|
|
289
|
-
parseFromStringWithFormat(t,
|
|
290
|
-
const
|
|
291
|
-
this.set(
|
|
289
|
+
parseFromStringWithFormat(t, n) {
|
|
290
|
+
const a = ge(t, n);
|
|
291
|
+
this.set(a[0], a[1], a[2], a[3], a[4], a[5], a[6]);
|
|
292
292
|
}
|
|
293
293
|
initFromComponents(t) {
|
|
294
294
|
this.set(t[0], t[1], t[2] ?? 1, t[3] ?? 0, t[4] ?? 0, t[5] ?? 0, t[6] ?? 0);
|
|
295
295
|
}
|
|
296
|
-
_setDateObject(t,
|
|
296
|
+
_setDateObject(t, n = !0) {
|
|
297
297
|
this.timestamp = t;
|
|
298
|
-
const { year:
|
|
299
|
-
if (this.yearEn =
|
|
300
|
-
const [
|
|
301
|
-
this.year =
|
|
298
|
+
const { year: a, month0: s, day: r, hour: o, minute: u, weekDay: i } = Oe(t);
|
|
299
|
+
if (this.yearEn = a, this.monthEn = s, this.dayEn = r, this.hour = o, this.minute = u, this.weekDay = i, n) {
|
|
300
|
+
const [h, c, D] = J.englishToNepali(a, s, r);
|
|
301
|
+
this.year = h, this.month = c, this.day = D;
|
|
302
302
|
}
|
|
303
303
|
}
|
|
304
304
|
getDateObject() {
|
|
@@ -364,22 +364,22 @@ class E {
|
|
|
364
364
|
setTime(t) {
|
|
365
365
|
this._setDateObject(new Date(t));
|
|
366
366
|
}
|
|
367
|
-
set(t, a, s,
|
|
368
|
-
|
|
369
|
-
const [i,
|
|
370
|
-
this.year = t, this.month =
|
|
367
|
+
set(t, n, a, s, r, o, u) {
|
|
368
|
+
D3(s, r, o, u);
|
|
369
|
+
const [i, h, c] = J.nepaliToEnglish(t, n, a);
|
|
370
|
+
this.year = t, this.month = n, this.day = a, this._setDateObject(Ot(i, h, c, s, r, o, u), !1);
|
|
371
371
|
}
|
|
372
372
|
setDateObject(t) {
|
|
373
373
|
this._setDateObject(t, !0);
|
|
374
374
|
}
|
|
375
375
|
format(t) {
|
|
376
|
-
return
|
|
376
|
+
return qe(this, t);
|
|
377
377
|
}
|
|
378
378
|
formatNepali(t) {
|
|
379
|
-
return
|
|
379
|
+
return Xe(this, t);
|
|
380
380
|
}
|
|
381
381
|
toString() {
|
|
382
|
-
return
|
|
382
|
+
return Ze(this);
|
|
383
383
|
}
|
|
384
384
|
formatEnglishDate(t) {
|
|
385
385
|
return Qe(this, t);
|
|
@@ -387,35 +387,35 @@ class E {
|
|
|
387
387
|
formatEnglishDateInNepali(t) {
|
|
388
388
|
return t3(this, t);
|
|
389
389
|
}
|
|
390
|
-
static fromEnglishDate(t, a, s
|
|
391
|
-
const i =
|
|
392
|
-
return new
|
|
390
|
+
static fromEnglishDate(t, n, a, s = 0, r = 0, o = 0, u = 0) {
|
|
391
|
+
const i = Ot(t, n, a, s, r, o, u);
|
|
392
|
+
return new Y(i);
|
|
393
393
|
}
|
|
394
|
-
static parseNepaliFormat(t,
|
|
395
|
-
const [
|
|
396
|
-
return new
|
|
394
|
+
static parseNepaliFormat(t, n) {
|
|
395
|
+
const [a, s, r, o, u, i, h] = h3(t, n);
|
|
396
|
+
return new Y(a, s, r, o, u, i, h);
|
|
397
397
|
}
|
|
398
|
-
static parseEnglishDate(t,
|
|
399
|
-
const [
|
|
400
|
-
return
|
|
398
|
+
static parseEnglishDate(t, n) {
|
|
399
|
+
const [a, s, r, o, u, i, h] = u3(t, n);
|
|
400
|
+
return Y.fromEnglishDate(a, s, r, o, u, i, h);
|
|
401
401
|
}
|
|
402
|
-
static getDaysOfMonth(t,
|
|
403
|
-
if (t <
|
|
404
|
-
if (
|
|
405
|
-
return
|
|
402
|
+
static getDaysOfMonth(t, n) {
|
|
403
|
+
if (t < J.npMinYear() || t > J.npMaxYear()) throw new Error("Year out of range");
|
|
404
|
+
if (n < 0 || n > 11) throw new Error("Month out of range");
|
|
405
|
+
return W[t - J.npMinYear()][0][n];
|
|
406
406
|
}
|
|
407
407
|
static minSupportedDate() {
|
|
408
|
-
return
|
|
408
|
+
return Y.fromEnglishDate(J.enMinYear(), 0, 1).getDateObject();
|
|
409
409
|
}
|
|
410
410
|
static maxSupportedDate() {
|
|
411
|
-
return
|
|
411
|
+
return Y.fromEnglishDate(J.enMaxYear(), 11, 31).getDateObject();
|
|
412
412
|
}
|
|
413
413
|
static minSupportedNepaliDate() {
|
|
414
|
-
return new
|
|
414
|
+
return new Y(J.npMinYear(), 0, 1);
|
|
415
415
|
}
|
|
416
416
|
static maxSupportedNepaliDate() {
|
|
417
|
-
const t =
|
|
418
|
-
return new
|
|
417
|
+
const t = J.npMaxYear();
|
|
418
|
+
return new Y(t, 11, this.getDaysOfMonth(t, 11));
|
|
419
419
|
}
|
|
420
420
|
static minimum() {
|
|
421
421
|
return console.warn("`NepaliDate.minimum()` is deprecated and will be removed in a future version. Please use `NepaliDate.minSupportedDate()` instead."), this.minSupportedDate();
|
|
@@ -424,7 +424,7 @@ class E {
|
|
|
424
424
|
return console.warn("`NepaliDate.maximum()` is deprecated and will be removed in a future version. Please use `NepaliDate.maxSupportedDate()` instead."), this.maxSupportedDate();
|
|
425
425
|
}
|
|
426
426
|
}
|
|
427
|
-
const
|
|
427
|
+
const y3 = [
|
|
428
428
|
"बैशाख",
|
|
429
429
|
"जेठ",
|
|
430
430
|
"आषाढ",
|
|
@@ -437,7 +437,7 @@ const f3 = [
|
|
|
437
437
|
"माघ",
|
|
438
438
|
"फाल्गुन",
|
|
439
439
|
"चैत्र"
|
|
440
|
-
],
|
|
440
|
+
], me = [
|
|
441
441
|
"Baishakh",
|
|
442
442
|
"Jestha",
|
|
443
443
|
"Ashadh",
|
|
@@ -450,7 +450,7 @@ const f3 = [
|
|
|
450
450
|
"Magh",
|
|
451
451
|
"Falgun",
|
|
452
452
|
"Chaitra"
|
|
453
|
-
],
|
|
453
|
+
], f3 = [
|
|
454
454
|
"January",
|
|
455
455
|
"February",
|
|
456
456
|
"March",
|
|
@@ -463,7 +463,7 @@ const f3 = [
|
|
|
463
463
|
"October",
|
|
464
464
|
"November",
|
|
465
465
|
"December"
|
|
466
|
-
], M3 = ["आइत", "सोम", "मंगल", "बुध", "बिहि", "शुक्र", "शनि"], p3 = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
466
|
+
], M3 = ["आइत", "सोम", "मंगल", "बुध", "बिहि", "शुक्र", "शनि"], p3 = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], b3 = ["०", "१", "२", "३", "४", "५", "६", "७", "८", "९"], O3 = {
|
|
467
467
|
light: {
|
|
468
468
|
primary: "#3b82f6",
|
|
469
469
|
background: "#ffffff",
|
|
@@ -484,46 +484,46 @@ const f3 = [
|
|
|
484
484
|
today: "#1e40af",
|
|
485
485
|
disabled: "#6b7280"
|
|
486
486
|
}
|
|
487
|
-
},
|
|
487
|
+
}, V = (e) => e.toString().split("").map((t) => b3[parseInt(t)]).join(""), De = (e, t, n) => {
|
|
488
488
|
if (e === "BS")
|
|
489
489
|
try {
|
|
490
|
-
const
|
|
491
|
-
return new
|
|
490
|
+
const a = n === 11 ? new Y(t + 1, 0, 1) : new Y(t, n + 1, 1);
|
|
491
|
+
return new Y(a.getTime() - 1440 * 60 * 1e3).getDate();
|
|
492
492
|
} catch {
|
|
493
493
|
return 30;
|
|
494
494
|
}
|
|
495
|
-
return new Date(t,
|
|
496
|
-
},
|
|
495
|
+
return new Date(t, n + 1, 0).getDate();
|
|
496
|
+
}, S3 = (e, t, n) => {
|
|
497
497
|
if (e === "BS")
|
|
498
498
|
try {
|
|
499
|
-
return new
|
|
499
|
+
return new Y(t, n, 1).getDay() || 0;
|
|
500
500
|
} catch {
|
|
501
501
|
return 0;
|
|
502
502
|
}
|
|
503
|
-
return new Date(t,
|
|
504
|
-
},
|
|
503
|
+
return new Date(t, n, 1).getDay();
|
|
504
|
+
}, N = (e) => {
|
|
505
505
|
const t = /* @__PURE__ */ new Date();
|
|
506
506
|
if (e === "BS")
|
|
507
507
|
try {
|
|
508
|
-
const
|
|
509
|
-
return { year:
|
|
508
|
+
const n = Y.fromEnglishDate(t.getFullYear(), t.getMonth(), t.getDate());
|
|
509
|
+
return { year: n.getYear(), month: n.getMonth(), day: n.getDate() };
|
|
510
510
|
} catch {
|
|
511
511
|
return { year: 2081, month: 0, day: 1 };
|
|
512
512
|
}
|
|
513
513
|
return { year: t.getFullYear(), month: t.getMonth(), day: t.getDate() };
|
|
514
|
-
},
|
|
514
|
+
}, wt = (e, t, n, a, s) => {
|
|
515
515
|
if (e === "BS")
|
|
516
516
|
try {
|
|
517
|
-
const r = new
|
|
517
|
+
const r = new Y(t, n, a), u = new Date(
|
|
518
518
|
r.getEnglishYear(),
|
|
519
519
|
r.getEnglishMonth(),
|
|
520
520
|
r.getEnglishDate()
|
|
521
521
|
).toISOString().split("T")[0];
|
|
522
522
|
return {
|
|
523
|
-
bs: `${t}-${String(
|
|
523
|
+
bs: `${t}-${String(n + 1).padStart(2, "0")}-${String(a).padStart(2, "0")}`,
|
|
524
524
|
ad: u,
|
|
525
525
|
formatted: {
|
|
526
|
-
bs: `${n
|
|
526
|
+
bs: `${s[n]} ${a}, ${t}`,
|
|
527
527
|
ad: new Date(
|
|
528
528
|
r.getEnglishYear(),
|
|
529
529
|
r.getEnglishMonth(),
|
|
@@ -532,20 +532,20 @@ const f3 = [
|
|
|
532
532
|
}
|
|
533
533
|
};
|
|
534
534
|
} catch {
|
|
535
|
-
const r = `${t}-${String(
|
|
535
|
+
const r = `${t}-${String(n + 1).padStart(2, "0")}-${String(a).padStart(2, "0")}`;
|
|
536
536
|
return {
|
|
537
537
|
bs: r,
|
|
538
538
|
ad: r,
|
|
539
539
|
formatted: {
|
|
540
|
-
bs: `${n
|
|
541
|
-
ad: `${n
|
|
540
|
+
bs: `${s[n]} ${a}, ${t}`,
|
|
541
|
+
ad: `${s[n]} ${a}, ${t}`
|
|
542
542
|
}
|
|
543
543
|
};
|
|
544
544
|
}
|
|
545
545
|
else {
|
|
546
|
-
const r = new Date(t,
|
|
546
|
+
const r = new Date(t, n, a), o = r.toISOString().split("T")[0];
|
|
547
547
|
try {
|
|
548
|
-
const u =
|
|
548
|
+
const u = Y.fromEnglishDate(t, n, a), i = `${u.getYear()}-${String(u.getMonth() + 1).padStart(2, "0")}-${String(u.getDate()).padStart(2, "0")}`;
|
|
549
549
|
return {
|
|
550
550
|
ad: o,
|
|
551
551
|
bs: i,
|
|
@@ -555,7 +555,7 @@ const f3 = [
|
|
|
555
555
|
month: "long",
|
|
556
556
|
day: "numeric"
|
|
557
557
|
}),
|
|
558
|
-
bs: `${
|
|
558
|
+
bs: `${me[u.getMonth()]} ${u.getDate()}, ${u.getYear()}`
|
|
559
559
|
}
|
|
560
560
|
};
|
|
561
561
|
} catch {
|
|
@@ -573,131 +573,131 @@ const f3 = [
|
|
|
573
573
|
};
|
|
574
574
|
}
|
|
575
575
|
}
|
|
576
|
-
},
|
|
577
|
-
const
|
|
578
|
-
return
|
|
579
|
-
},
|
|
576
|
+
}, N3 = (e, t, n) => {
|
|
577
|
+
const a = new Date(e.year, e.month, e.day).getTime(), s = new Date(t.year, t.month, t.day).getTime(), r = new Date(n.year, n.month, n.day).getTime();
|
|
578
|
+
return a >= s && a <= r;
|
|
579
|
+
}, It = (e) => {
|
|
580
580
|
try {
|
|
581
|
-
const [t,
|
|
582
|
-
return !t || !
|
|
581
|
+
const [t, n, a] = e.split("-").map(Number);
|
|
582
|
+
return !t || !n || !a ? null : { year: t, month: n - 1, day: a };
|
|
583
583
|
} catch {
|
|
584
584
|
return null;
|
|
585
585
|
}
|
|
586
|
-
},
|
|
587
|
-
if (!t && !
|
|
588
|
-
const
|
|
586
|
+
}, et = (e, t, n) => {
|
|
587
|
+
if (!t && !n) return !1;
|
|
588
|
+
const a = new Date(e.year, e.month, e.day).getTime();
|
|
589
589
|
if (t) {
|
|
590
|
-
const
|
|
591
|
-
if (
|
|
592
|
-
const r = new Date(
|
|
593
|
-
if (
|
|
590
|
+
const s = It(t);
|
|
591
|
+
if (s) {
|
|
592
|
+
const r = new Date(s.year, s.month, s.day).getTime();
|
|
593
|
+
if (a < r) return !0;
|
|
594
594
|
}
|
|
595
595
|
}
|
|
596
|
-
if (
|
|
597
|
-
const
|
|
598
|
-
if (
|
|
599
|
-
const r = new Date(
|
|
600
|
-
if (
|
|
596
|
+
if (n) {
|
|
597
|
+
const s = It(n);
|
|
598
|
+
if (s) {
|
|
599
|
+
const r = new Date(s.year, s.month, s.day).getTime();
|
|
600
|
+
if (a > r) return !0;
|
|
601
601
|
}
|
|
602
602
|
}
|
|
603
603
|
return !1;
|
|
604
|
-
},
|
|
605
|
-
const t =
|
|
606
|
-
|
|
607
|
-
|
|
604
|
+
}, E3 = (e = "AD") => {
|
|
605
|
+
const t = $t(() => N(e), [e]), [n, a] = B(t.year), [s, r] = B(t.month), [o, u] = B(null), [i, h] = B(null), [c, D] = B(null);
|
|
606
|
+
Yt(() => {
|
|
607
|
+
a(t.year), r(t.month);
|
|
608
608
|
}, [t.year, t.month]);
|
|
609
|
-
const d =
|
|
610
|
-
const
|
|
611
|
-
for (let
|
|
609
|
+
const d = $t(() => {
|
|
610
|
+
const E = De(e, n, s), v = S3(e, n, s), p = [];
|
|
611
|
+
for (let C = 0; C < v; C++)
|
|
612
612
|
p.push(null);
|
|
613
|
-
for (let
|
|
614
|
-
p.push(
|
|
613
|
+
for (let C = 1; C <= E; C++)
|
|
614
|
+
p.push(C);
|
|
615
615
|
return p;
|
|
616
|
-
}, [
|
|
616
|
+
}, [n, s, e]);
|
|
617
617
|
return {
|
|
618
618
|
// State
|
|
619
|
-
currentYear:
|
|
620
|
-
currentMonth:
|
|
619
|
+
currentYear: n,
|
|
620
|
+
currentMonth: s,
|
|
621
621
|
selectedDate: o,
|
|
622
622
|
rangeStart: i,
|
|
623
|
-
rangeEnd:
|
|
623
|
+
rangeEnd: c,
|
|
624
624
|
today: t,
|
|
625
625
|
calendarDays: d,
|
|
626
626
|
// Actions
|
|
627
|
-
setCurrentYear:
|
|
627
|
+
setCurrentYear: a,
|
|
628
628
|
setCurrentMonth: r,
|
|
629
629
|
setSelectedDate: u,
|
|
630
|
-
setRangeStart:
|
|
631
|
-
setRangeEnd:
|
|
632
|
-
navigateMonth: (
|
|
633
|
-
let p =
|
|
630
|
+
setRangeStart: h,
|
|
631
|
+
setRangeEnd: D,
|
|
632
|
+
navigateMonth: (E) => {
|
|
633
|
+
let p = s + E, C = n;
|
|
634
634
|
for (; p > 11; )
|
|
635
|
-
p -= 12,
|
|
635
|
+
p -= 12, C += 1;
|
|
636
636
|
for (; p < 0; )
|
|
637
|
-
p += 12,
|
|
638
|
-
r(p),
|
|
637
|
+
p += 12, C -= 1;
|
|
638
|
+
r(p), a(C);
|
|
639
639
|
},
|
|
640
640
|
// Helpers
|
|
641
|
-
isToday: (
|
|
642
|
-
isSelected: (
|
|
643
|
-
isInRange: (
|
|
644
|
-
if (!i || !
|
|
645
|
-
const
|
|
646
|
-
return
|
|
641
|
+
isToday: (E) => n === t.year && s === t.month && E === t.day,
|
|
642
|
+
isSelected: (E, v = "single") => v === "range" ? !!(i && i.year === n && i.month === s && i.day === E) || !!(c && c.year === n && c.month === s && c.day === E) : !!(o && o.year === n && o.month === s && o.day === E),
|
|
643
|
+
isInRange: (E) => {
|
|
644
|
+
if (!i || !c) return !1;
|
|
645
|
+
const v = new Date(n, s, E).getTime(), p = new Date(i.year, i.month, i.day).getTime(), C = new Date(c.year, c.month, c.day).getTime();
|
|
646
|
+
return v >= p && v <= C;
|
|
647
647
|
}
|
|
648
648
|
};
|
|
649
|
-
},
|
|
650
|
-
if (
|
|
649
|
+
}, Z = (e, t, n) => {
|
|
650
|
+
if (n === "BS")
|
|
651
651
|
try {
|
|
652
|
-
const
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
652
|
+
const a = new Y(e.year, e.month, e.day), s = new Date(
|
|
653
|
+
a.getEnglishYear(),
|
|
654
|
+
a.getEnglishMonth(),
|
|
655
|
+
a.getEnglishDate()
|
|
656
656
|
);
|
|
657
|
-
|
|
658
|
-
const r =
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
657
|
+
s.setDate(s.getDate() + t);
|
|
658
|
+
const r = Y.fromEnglishDate(
|
|
659
|
+
s.getFullYear(),
|
|
660
|
+
s.getMonth(),
|
|
661
|
+
s.getDate()
|
|
662
662
|
);
|
|
663
663
|
return { year: r.getYear(), month: r.getMonth(), day: r.getDate() };
|
|
664
664
|
} catch {
|
|
665
665
|
return e;
|
|
666
666
|
}
|
|
667
667
|
else {
|
|
668
|
-
const
|
|
669
|
-
return
|
|
668
|
+
const a = new Date(e.year, e.month, e.day);
|
|
669
|
+
return a.setDate(a.getDate() + t), { year: a.getFullYear(), month: a.getMonth(), day: a.getDate() };
|
|
670
670
|
}
|
|
671
|
-
}, dt = (e, t,
|
|
672
|
-
if (
|
|
671
|
+
}, dt = (e, t, n) => {
|
|
672
|
+
if (n === "BS")
|
|
673
673
|
try {
|
|
674
|
-
let
|
|
675
|
-
for (;
|
|
676
|
-
|
|
677
|
-
for (;
|
|
678
|
-
|
|
679
|
-
const r =
|
|
680
|
-
return { year:
|
|
674
|
+
let a = e.year, s = e.month + t;
|
|
675
|
+
for (; s < 0; )
|
|
676
|
+
a -= 1, s += 12;
|
|
677
|
+
for (; s >= 12; )
|
|
678
|
+
a += 1, s -= 12;
|
|
679
|
+
const r = De("BS", a, s), o = Math.min(e.day, r);
|
|
680
|
+
return { year: a, month: s, day: o };
|
|
681
681
|
} catch {
|
|
682
682
|
return e;
|
|
683
683
|
}
|
|
684
684
|
else {
|
|
685
|
-
const
|
|
686
|
-
return
|
|
685
|
+
const a = new Date(e.year, e.month, e.day);
|
|
686
|
+
return a.setMonth(a.getMonth() + t), { year: a.getFullYear(), month: a.getMonth(), day: a.getDate() };
|
|
687
687
|
}
|
|
688
|
-
},
|
|
688
|
+
}, z = (e) => ({ year: e.year, month: e.month, day: 1 }), w3 = (e, t) => {
|
|
689
689
|
if (t === "BS")
|
|
690
690
|
try {
|
|
691
|
-
const
|
|
692
|
-
return
|
|
691
|
+
const a = new Y(e.year, e.month, e.day).getDay();
|
|
692
|
+
return Z(e, -a, "BS");
|
|
693
693
|
} catch {
|
|
694
694
|
return e;
|
|
695
695
|
}
|
|
696
696
|
else {
|
|
697
|
-
const
|
|
698
|
-
return
|
|
697
|
+
const n = new Date(e.year, e.month, e.day), a = n.getDay();
|
|
698
|
+
return n.setDate(n.getDate() - a), { year: n.getFullYear(), month: n.getMonth(), day: n.getDate() };
|
|
699
699
|
}
|
|
700
|
-
},
|
|
700
|
+
}, T3 = {
|
|
701
701
|
TODAY: "today",
|
|
702
702
|
YESTERDAY: "yesterday",
|
|
703
703
|
THIS_WEEK: "thisWeek",
|
|
@@ -710,201 +710,162 @@ const f3 = [
|
|
|
710
710
|
LAST_180_DAYS: "last180days",
|
|
711
711
|
LAST_9_MONTHS: "last9months",
|
|
712
712
|
LAST_YEAR: "lastYear"
|
|
713
|
-
},
|
|
714
|
-
const
|
|
713
|
+
}, Y3 = (e, t) => {
|
|
714
|
+
const n = [
|
|
715
715
|
{
|
|
716
716
|
key: "today",
|
|
717
717
|
label: "Today",
|
|
718
|
-
getValue: (
|
|
719
|
-
const r =
|
|
718
|
+
getValue: (s) => {
|
|
719
|
+
const r = N(s);
|
|
720
720
|
return { start: r, end: r };
|
|
721
721
|
}
|
|
722
722
|
},
|
|
723
723
|
{
|
|
724
724
|
key: "yesterday",
|
|
725
725
|
label: "Yesterday",
|
|
726
|
-
getValue: (
|
|
727
|
-
const r =
|
|
726
|
+
getValue: (s) => {
|
|
727
|
+
const r = N(s), o = Z(r, -1, s);
|
|
728
728
|
return { start: o, end: o };
|
|
729
729
|
}
|
|
730
730
|
},
|
|
731
731
|
{
|
|
732
732
|
key: "thisWeek",
|
|
733
733
|
label: "This Week",
|
|
734
|
-
getValue: (
|
|
735
|
-
const r =
|
|
736
|
-
return { start:
|
|
734
|
+
getValue: (s) => {
|
|
735
|
+
const r = N(s);
|
|
736
|
+
return { start: w3(r, s), end: r };
|
|
737
737
|
}
|
|
738
738
|
},
|
|
739
739
|
{
|
|
740
740
|
key: "last7days",
|
|
741
741
|
label: "Last 7 Days",
|
|
742
|
-
getValue: (
|
|
743
|
-
const r =
|
|
744
|
-
return { start:
|
|
742
|
+
getValue: (s) => {
|
|
743
|
+
const r = N(s);
|
|
744
|
+
return { start: Z(r, -6, s), end: r };
|
|
745
745
|
}
|
|
746
746
|
},
|
|
747
747
|
{
|
|
748
748
|
key: "last30days",
|
|
749
749
|
label: "Last 30 Days",
|
|
750
|
-
getValue: (
|
|
751
|
-
const r =
|
|
752
|
-
return { start:
|
|
750
|
+
getValue: (s) => {
|
|
751
|
+
const r = N(s);
|
|
752
|
+
return { start: Z(r, -29, s), end: r };
|
|
753
753
|
}
|
|
754
754
|
},
|
|
755
755
|
{
|
|
756
756
|
key: "thisMonth",
|
|
757
757
|
label: "This Month",
|
|
758
|
-
getValue: (
|
|
759
|
-
const r =
|
|
760
|
-
return { start:
|
|
758
|
+
getValue: (s) => {
|
|
759
|
+
const r = N(s);
|
|
760
|
+
return { start: z(r), end: r };
|
|
761
761
|
}
|
|
762
762
|
},
|
|
763
763
|
{
|
|
764
764
|
key: "lastMonth",
|
|
765
765
|
label: "Last Month",
|
|
766
|
-
getValue: (
|
|
767
|
-
const r =
|
|
768
|
-
return { start:
|
|
766
|
+
getValue: (s) => {
|
|
767
|
+
const r = N(s), o = Z(z(r), -1, s);
|
|
768
|
+
return { start: z(o), end: o };
|
|
769
769
|
}
|
|
770
770
|
},
|
|
771
771
|
{
|
|
772
772
|
key: "last3months",
|
|
773
773
|
label: "Last 3 Months",
|
|
774
|
-
getValue: (
|
|
775
|
-
const r =
|
|
776
|
-
return { start:
|
|
774
|
+
getValue: (s) => {
|
|
775
|
+
const r = N(s), o = dt(r, -2, s);
|
|
776
|
+
return { start: z(o), end: r };
|
|
777
777
|
}
|
|
778
778
|
},
|
|
779
779
|
{
|
|
780
780
|
key: "last6months",
|
|
781
781
|
label: "Last 6 Months",
|
|
782
|
-
getValue: (
|
|
783
|
-
const r =
|
|
784
|
-
return { start:
|
|
782
|
+
getValue: (s) => {
|
|
783
|
+
const r = N(s), o = dt(r, -5, s);
|
|
784
|
+
return { start: z(o), end: r };
|
|
785
785
|
}
|
|
786
786
|
},
|
|
787
787
|
{
|
|
788
788
|
key: "last180days",
|
|
789
789
|
label: "Last 180 Days",
|
|
790
|
-
getValue: (
|
|
791
|
-
const r =
|
|
792
|
-
return { start:
|
|
790
|
+
getValue: (s) => {
|
|
791
|
+
const r = N(s);
|
|
792
|
+
return { start: Z(r, -179, s), end: r };
|
|
793
793
|
}
|
|
794
794
|
},
|
|
795
795
|
{
|
|
796
796
|
key: "last9months",
|
|
797
797
|
label: "Last 9 Months",
|
|
798
|
-
getValue: (
|
|
799
|
-
const r =
|
|
800
|
-
return { start:
|
|
798
|
+
getValue: (s) => {
|
|
799
|
+
const r = N(s), o = dt(r, -8, s);
|
|
800
|
+
return { start: z(o), end: r };
|
|
801
801
|
}
|
|
802
802
|
},
|
|
803
803
|
{
|
|
804
804
|
key: "lastYear",
|
|
805
805
|
label: "Last Year",
|
|
806
|
-
getValue: (
|
|
807
|
-
const r =
|
|
808
|
-
return { start:
|
|
806
|
+
getValue: (s) => {
|
|
807
|
+
const r = N(s), o = dt(r, -11, s);
|
|
808
|
+
return { start: z(o), end: r };
|
|
809
809
|
}
|
|
810
810
|
}
|
|
811
|
-
],
|
|
812
|
-
return t ?
|
|
813
|
-
},
|
|
814
|
-
calendar: _3,
|
|
815
|
-
grid: v3,
|
|
816
|
-
header: C3,
|
|
817
|
-
navButton: x3,
|
|
818
|
-
monthYear: A3,
|
|
819
|
-
pickerOverlay: $3,
|
|
820
|
-
pickerContent: F3,
|
|
821
|
-
pickerHeader: B3,
|
|
822
|
-
closeButton: H3,
|
|
823
|
-
pickerBody: O3,
|
|
824
|
-
pickerSection: T3,
|
|
825
|
-
pickerSectionHeader: N3,
|
|
826
|
-
yearNav: I3,
|
|
827
|
-
yearGrid: L3,
|
|
828
|
-
selected: R3,
|
|
829
|
-
monthGrid: j3,
|
|
830
|
-
dayHeader: P3,
|
|
831
|
-
day: W3,
|
|
832
|
-
dayDisabled: V3,
|
|
833
|
-
dayOtherMonth: U3,
|
|
834
|
-
daySelected: J3,
|
|
835
|
-
dayToday: G3,
|
|
836
|
-
dayInRange: K3
|
|
837
|
-
}, z3 = ({
|
|
811
|
+
], a = e ? n.filter((s) => e.includes(s.key)) : n;
|
|
812
|
+
return t ? a.map((s) => ({ ...s, label: t[s.key] || s.label })) : a;
|
|
813
|
+
}, k3 = ({
|
|
838
814
|
currentYear: e,
|
|
839
815
|
currentMonth: t,
|
|
840
|
-
months:
|
|
841
|
-
onYearChange:
|
|
842
|
-
onMonthChange:
|
|
816
|
+
months: n,
|
|
817
|
+
onYearChange: a,
|
|
818
|
+
onMonthChange: s,
|
|
843
819
|
onClose: r,
|
|
844
820
|
showNepaliNumbers: o = !1,
|
|
845
|
-
convertToNepaliNumber: u = (
|
|
821
|
+
convertToNepaliNumber: u = (h) => h.toString(),
|
|
846
822
|
calendarType: i
|
|
847
823
|
}) => {
|
|
848
|
-
const [
|
|
849
|
-
return /* @__PURE__ */
|
|
850
|
-
/* @__PURE__ */
|
|
851
|
-
/* @__PURE__ */
|
|
852
|
-
/* @__PURE__ */
|
|
824
|
+
const [h, c] = B(Math.floor(e / 12) * 12), D = i === "BS" ? 2e3 : 1944, d = i === "BS" ? 2100 : 2043;
|
|
825
|
+
return /* @__PURE__ */ g("div", { className: "bsac-picker-overlay", onClick: r, children: /* @__PURE__ */ S("div", { className: "bsac-picker-content", onClick: (k) => k.stopPropagation(), children: [
|
|
826
|
+
/* @__PURE__ */ S("div", { className: "bsac-picker-header", children: [
|
|
827
|
+
/* @__PURE__ */ g("h3", { children: "Select Month & Year" }),
|
|
828
|
+
/* @__PURE__ */ g("button", { className: "bsac-close-btn", onClick: r, children: "×" })
|
|
853
829
|
] }),
|
|
854
|
-
/* @__PURE__ */
|
|
855
|
-
/* @__PURE__ */
|
|
856
|
-
/* @__PURE__ */
|
|
857
|
-
/* @__PURE__ */
|
|
858
|
-
/* @__PURE__ */
|
|
859
|
-
/* @__PURE__ */ h
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
children: "«"
|
|
865
|
-
}
|
|
866
|
-
),
|
|
867
|
-
/* @__PURE__ */ b("span", { children: [
|
|
868
|
-
o ? u(c) : c,
|
|
869
|
-
" -",
|
|
870
|
-
" ",
|
|
871
|
-
o ? u(c + 11) : c + 11
|
|
830
|
+
/* @__PURE__ */ S("div", { className: "bsac-picker-body", children: [
|
|
831
|
+
/* @__PURE__ */ S("div", { className: "bsac-picker-section", children: [
|
|
832
|
+
/* @__PURE__ */ S("div", { className: "bsac-picker-section-header", children: [
|
|
833
|
+
/* @__PURE__ */ g("label", { children: "Year" }),
|
|
834
|
+
/* @__PURE__ */ S("div", { className: "bsac-year-nav", children: [
|
|
835
|
+
/* @__PURE__ */ g("button", { onClick: () => c(Math.max(D, h - 12)), disabled: h <= D, children: "«" }),
|
|
836
|
+
/* @__PURE__ */ S("span", { children: [
|
|
837
|
+
o ? u(h) : h,
|
|
838
|
+
" – ",
|
|
839
|
+
o ? u(h + 11) : h + 11
|
|
872
840
|
] }),
|
|
873
|
-
/* @__PURE__ */ h
|
|
874
|
-
"button",
|
|
875
|
-
{
|
|
876
|
-
onClick: () => l(Math.min(d - 11, c + 12)),
|
|
877
|
-
disabled: c + 11 >= d,
|
|
878
|
-
children: "»"
|
|
879
|
-
}
|
|
880
|
-
)
|
|
841
|
+
/* @__PURE__ */ g("button", { onClick: () => c(Math.min(d - 11, h + 12)), disabled: h + 11 >= d, children: "»" })
|
|
881
842
|
] })
|
|
882
843
|
] }),
|
|
883
|
-
/* @__PURE__ */
|
|
884
|
-
const
|
|
885
|
-
return
|
|
844
|
+
/* @__PURE__ */ g("div", { className: "bsac-year-grid", children: Array.from({ length: 12 }, (k, m) => {
|
|
845
|
+
const A = h + m;
|
|
846
|
+
return A > d ? null : /* @__PURE__ */ g(
|
|
886
847
|
"button",
|
|
887
848
|
{
|
|
888
|
-
onClick: () =>
|
|
889
|
-
className:
|
|
890
|
-
children: o ? u(
|
|
849
|
+
onClick: () => a(A),
|
|
850
|
+
className: A === e ? "bsac-selected" : "",
|
|
851
|
+
children: o ? u(A) : A
|
|
891
852
|
},
|
|
892
|
-
|
|
853
|
+
A
|
|
893
854
|
);
|
|
894
855
|
}) })
|
|
895
856
|
] }),
|
|
896
|
-
/* @__PURE__ */
|
|
897
|
-
/* @__PURE__ */
|
|
898
|
-
/* @__PURE__ */
|
|
857
|
+
/* @__PURE__ */ S("div", { className: "bsac-picker-section", children: [
|
|
858
|
+
/* @__PURE__ */ g("label", { children: "Month" }),
|
|
859
|
+
/* @__PURE__ */ g("div", { className: "bsac-month-grid", children: n.map((k, m) => /* @__PURE__ */ g(
|
|
899
860
|
"button",
|
|
900
861
|
{
|
|
901
862
|
onClick: () => {
|
|
902
|
-
|
|
863
|
+
s(m), r();
|
|
903
864
|
},
|
|
904
|
-
className:
|
|
865
|
+
className: m === t ? "bsac-selected" : "",
|
|
905
866
|
children: k
|
|
906
867
|
},
|
|
907
|
-
|
|
868
|
+
m
|
|
908
869
|
)) })
|
|
909
870
|
] })
|
|
910
871
|
] })
|
|
@@ -912,442 +873,381 @@ const f3 = [
|
|
|
912
873
|
}, gt = ({
|
|
913
874
|
currentMonth: e,
|
|
914
875
|
currentYear: t,
|
|
915
|
-
months:
|
|
916
|
-
onNavigateMonth:
|
|
917
|
-
onYearChange:
|
|
876
|
+
months: n,
|
|
877
|
+
onNavigateMonth: a,
|
|
878
|
+
onYearChange: s,
|
|
918
879
|
onMonthChange: r,
|
|
919
880
|
disabled: o = !1,
|
|
920
881
|
showNepaliNumbers: u = !1,
|
|
921
882
|
convertToNepaliNumber: i,
|
|
922
|
-
calendarType:
|
|
883
|
+
calendarType: h
|
|
923
884
|
}) => {
|
|
924
|
-
const [
|
|
925
|
-
return /* @__PURE__ */
|
|
926
|
-
/* @__PURE__ */
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
onClick: () => s(-12),
|
|
931
|
-
disabled: o,
|
|
932
|
-
"aria-label": "Previous year",
|
|
933
|
-
title: "Previous year",
|
|
934
|
-
children: "«"
|
|
935
|
-
}
|
|
936
|
-
),
|
|
937
|
-
/* @__PURE__ */ h(
|
|
938
|
-
"button",
|
|
939
|
-
{
|
|
940
|
-
className: f.navButton,
|
|
941
|
-
onClick: () => s(-1),
|
|
942
|
-
disabled: o,
|
|
943
|
-
"aria-label": "Previous month",
|
|
944
|
-
children: "‹"
|
|
945
|
-
}
|
|
946
|
-
),
|
|
947
|
-
/* @__PURE__ */ b("button", { className: f.monthYear, onClick: () => m(!0), disabled: o, children: [
|
|
948
|
-
a[e],
|
|
885
|
+
const [c, D] = B(!1);
|
|
886
|
+
return /* @__PURE__ */ S("div", { className: "bsac-header", children: [
|
|
887
|
+
/* @__PURE__ */ g("button", { className: "bsac-nav-btn", onClick: () => a(-12), disabled: o, "aria-label": "Previous year", children: "«" }),
|
|
888
|
+
/* @__PURE__ */ g("button", { className: "bsac-nav-btn", onClick: () => a(-1), disabled: o, "aria-label": "Previous month", children: "‹" }),
|
|
889
|
+
/* @__PURE__ */ S("button", { className: "bsac-month-year-btn", onClick: () => D(!0), disabled: o, children: [
|
|
890
|
+
n[e],
|
|
949
891
|
" ",
|
|
950
892
|
u ? i(t) : t
|
|
951
893
|
] }),
|
|
952
|
-
/* @__PURE__ */
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
onClick: () => s(1),
|
|
957
|
-
disabled: o,
|
|
958
|
-
"aria-label": "Next month",
|
|
959
|
-
children: "›"
|
|
960
|
-
}
|
|
961
|
-
),
|
|
962
|
-
/* @__PURE__ */ h(
|
|
963
|
-
"button",
|
|
964
|
-
{
|
|
965
|
-
className: f.navButton,
|
|
966
|
-
onClick: () => s(12),
|
|
967
|
-
disabled: o,
|
|
968
|
-
"aria-label": "Next year",
|
|
969
|
-
title: "Next year",
|
|
970
|
-
children: "»"
|
|
971
|
-
}
|
|
972
|
-
),
|
|
973
|
-
l && /* @__PURE__ */ h(
|
|
974
|
-
z3,
|
|
894
|
+
/* @__PURE__ */ g("button", { className: "bsac-nav-btn", onClick: () => a(1), disabled: o, "aria-label": "Next month", children: "›" }),
|
|
895
|
+
/* @__PURE__ */ g("button", { className: "bsac-nav-btn", onClick: () => a(12), disabled: o, "aria-label": "Next year", children: "»" }),
|
|
896
|
+
c && /* @__PURE__ */ g(
|
|
897
|
+
k3,
|
|
975
898
|
{
|
|
976
899
|
currentYear: t,
|
|
977
900
|
currentMonth: e,
|
|
978
|
-
months:
|
|
979
|
-
onYearChange:
|
|
901
|
+
months: n,
|
|
902
|
+
onYearChange: s,
|
|
980
903
|
onMonthChange: r,
|
|
981
|
-
onClose: () =>
|
|
904
|
+
onClose: () => D(!1),
|
|
982
905
|
showNepaliNumbers: u,
|
|
983
906
|
convertToNepaliNumber: i,
|
|
984
|
-
calendarType:
|
|
907
|
+
calendarType: h
|
|
985
908
|
}
|
|
986
909
|
)
|
|
987
910
|
] });
|
|
988
911
|
}, mt = ({
|
|
989
912
|
calendarDays: e,
|
|
990
913
|
days: t,
|
|
991
|
-
onDateSelect:
|
|
992
|
-
isSelected:
|
|
993
|
-
isInRange:
|
|
914
|
+
onDateSelect: n,
|
|
915
|
+
isSelected: a,
|
|
916
|
+
isInRange: s,
|
|
994
917
|
isToday: r,
|
|
995
918
|
isDisabled: o,
|
|
996
919
|
disabled: u = !1,
|
|
997
920
|
showNepaliNumbers: i = !1,
|
|
998
|
-
convertToNepaliNumber:
|
|
999
|
-
}) => /* @__PURE__ */
|
|
1000
|
-
t.map((
|
|
1001
|
-
e.map((
|
|
1002
|
-
const d =
|
|
1003
|
-
|
|
921
|
+
convertToNepaliNumber: h
|
|
922
|
+
}) => /* @__PURE__ */ S("div", { className: "bsac-grid", children: [
|
|
923
|
+
t.map((c) => /* @__PURE__ */ g("div", { className: "bsac-day-header", children: c }, c)),
|
|
924
|
+
e.map((c, D) => {
|
|
925
|
+
const d = c ? o?.(c) || u : !1, k = c ? a(c) : !1, m = c ? s(c) : !1, A = c ? r(c) : !1, T = [
|
|
926
|
+
"bsac-day",
|
|
927
|
+
c ? d ? "bsac-day-disabled" : k ? "bsac-day-selected" : m ? "bsac-day-in-range" : A ? "bsac-day-today" : "" : "bsac-day-empty"
|
|
928
|
+
].filter(Boolean).join(" ");
|
|
929
|
+
return /* @__PURE__ */ g(
|
|
1004
930
|
"div",
|
|
1005
931
|
{
|
|
1006
|
-
className:
|
|
1007
|
-
onClick: () =>
|
|
1008
|
-
children:
|
|
932
|
+
className: T,
|
|
933
|
+
onClick: () => c && !d && n(c),
|
|
934
|
+
children: c ? i ? h(c) : c : ""
|
|
1009
935
|
},
|
|
1010
|
-
|
|
936
|
+
D
|
|
1011
937
|
);
|
|
1012
938
|
})
|
|
1013
|
-
] }),
|
|
939
|
+
] }), Dt = ({
|
|
1014
940
|
presets: e,
|
|
1015
941
|
calendarType: t,
|
|
1016
|
-
onPresetSelect:
|
|
1017
|
-
activePreset:
|
|
1018
|
-
position:
|
|
942
|
+
onPresetSelect: n,
|
|
943
|
+
activePreset: a,
|
|
944
|
+
position: s = "top"
|
|
1019
945
|
}) => {
|
|
1020
946
|
const r = (o) => {
|
|
1021
947
|
const u = o.getValue(t);
|
|
1022
|
-
|
|
948
|
+
n(o, u);
|
|
1023
949
|
};
|
|
1024
|
-
return /* @__PURE__ */
|
|
1025
|
-
"
|
|
950
|
+
return /* @__PURE__ */ g("div", { className: `bsac-presets bsac-presets--${s}`, children: e.map((o) => /* @__PURE__ */ g(
|
|
951
|
+
"button",
|
|
1026
952
|
{
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
padding: "12px",
|
|
1035
|
-
backgroundColor: "#f8f9fa",
|
|
1036
|
-
borderRadius: "6px",
|
|
1037
|
-
border: "1px solid #e9ecef",
|
|
1038
|
-
minWidth: n === "left" || n === "right" ? "150px" : "auto",
|
|
1039
|
-
maxWidth: n === "left" || n === "right" ? "180px" : "none",
|
|
1040
|
-
flexShrink: 0
|
|
1041
|
-
},
|
|
1042
|
-
children: e.map((o) => /* @__PURE__ */ h(
|
|
1043
|
-
"button",
|
|
1044
|
-
{
|
|
1045
|
-
onClick: () => r(o),
|
|
1046
|
-
style: {
|
|
1047
|
-
padding: "6px 12px",
|
|
1048
|
-
fontSize: "12px",
|
|
1049
|
-
border: "1px solid #dee2e6",
|
|
1050
|
-
borderRadius: "4px",
|
|
1051
|
-
backgroundColor: s === o.key ? "#007bff" : "#ffffff",
|
|
1052
|
-
color: s === o.key ? "#ffffff" : "#495057",
|
|
1053
|
-
cursor: "pointer",
|
|
1054
|
-
transition: "all 0.2s"
|
|
1055
|
-
},
|
|
1056
|
-
children: o.label
|
|
1057
|
-
},
|
|
1058
|
-
o.key
|
|
1059
|
-
))
|
|
1060
|
-
}
|
|
1061
|
-
);
|
|
1062
|
-
}, X3 = ({
|
|
953
|
+
onClick: () => r(o),
|
|
954
|
+
className: `bsac-preset-btn${a === o.key ? " bsac-preset-btn--active" : ""}`,
|
|
955
|
+
children: o.label
|
|
956
|
+
},
|
|
957
|
+
o.key
|
|
958
|
+
)) });
|
|
959
|
+
}, C3 = ({
|
|
1063
960
|
calendarType: e = "AD",
|
|
1064
961
|
value: t,
|
|
1065
|
-
onChange:
|
|
1066
|
-
className:
|
|
1067
|
-
showToday:
|
|
962
|
+
onChange: n,
|
|
963
|
+
className: a = "",
|
|
964
|
+
showToday: s = !0,
|
|
1068
965
|
disabled: r = !1,
|
|
1069
966
|
outputFormat: o = "both",
|
|
1070
967
|
onDateSelect: u,
|
|
1071
968
|
mode: i = "single",
|
|
1072
|
-
onRangeSelect:
|
|
1073
|
-
showRangePresets:
|
|
1074
|
-
rangePresetsPosition:
|
|
969
|
+
onRangeSelect: h,
|
|
970
|
+
showRangePresets: c = !1,
|
|
971
|
+
rangePresetsPosition: D = "top",
|
|
1075
972
|
predefinedRanges: d,
|
|
1076
973
|
presetKeys: k,
|
|
1077
|
-
presetLabels:
|
|
1078
|
-
onPresetSelect:
|
|
1079
|
-
renderPresets:
|
|
1080
|
-
showNepaliMonths:
|
|
1081
|
-
showNepaliDays:
|
|
974
|
+
presetLabels: m,
|
|
975
|
+
onPresetSelect: A,
|
|
976
|
+
renderPresets: T,
|
|
977
|
+
showNepaliMonths: E = !1,
|
|
978
|
+
showNepaliDays: v = !1,
|
|
1082
979
|
showNepaliNumbers: p = !1,
|
|
1083
|
-
theme:
|
|
1084
|
-
colors:
|
|
1085
|
-
minDate:
|
|
1086
|
-
maxDate:
|
|
980
|
+
theme: C = "light",
|
|
981
|
+
colors: nt,
|
|
982
|
+
minDate: I,
|
|
983
|
+
maxDate: K
|
|
1087
984
|
}) => {
|
|
1088
985
|
const {
|
|
1089
|
-
currentYear:
|
|
1090
|
-
currentMonth:
|
|
1091
|
-
rangeStart:
|
|
1092
|
-
rangeEnd:
|
|
1093
|
-
calendarDays:
|
|
1094
|
-
setSelectedDate:
|
|
1095
|
-
setRangeStart:
|
|
1096
|
-
setRangeEnd:
|
|
1097
|
-
setCurrentYear:
|
|
1098
|
-
setCurrentMonth:
|
|
1099
|
-
navigateMonth:
|
|
986
|
+
currentYear: H,
|
|
987
|
+
currentMonth: O,
|
|
988
|
+
rangeStart: U,
|
|
989
|
+
rangeEnd: y,
|
|
990
|
+
calendarDays: w,
|
|
991
|
+
setSelectedDate: R,
|
|
992
|
+
setRangeStart: M,
|
|
993
|
+
setRangeEnd: $,
|
|
994
|
+
setCurrentYear: _,
|
|
995
|
+
setCurrentMonth: j,
|
|
996
|
+
navigateMonth: x,
|
|
1100
997
|
isToday: st,
|
|
1101
|
-
isSelected:
|
|
1102
|
-
isInRange:
|
|
1103
|
-
} =
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
998
|
+
isSelected: at,
|
|
999
|
+
isInRange: rt
|
|
1000
|
+
} = E3(e), [ot, Et] = B(), it = d || Y3(k, m), ut = (l, f) => ({
|
|
1001
|
+
start: wt(e, l.year, l.month, l.day, G),
|
|
1002
|
+
end: wt(e, f.year, f.month, f.day, G)
|
|
1003
|
+
}), G = e === "BS" && E ? y3 : e === "BS" ? me : f3, ct = e === "BS" && v ? M3 : p3, ht = (l, f) => {
|
|
1004
|
+
f.start && f.end && (M(f.start), $(f.end), _(f.start.year), j(f.start.month), Et(l.key), A?.(l, f), h?.(ut(f.start, f.end)));
|
|
1005
|
+
}, ye = (l, f) => {
|
|
1006
|
+
M(l), $(f), Et(void 0), h?.(ut(l, f));
|
|
1007
|
+
}, lt = (l) => {
|
|
1108
1008
|
if (r) return;
|
|
1109
|
-
const
|
|
1110
|
-
if (
|
|
1009
|
+
const f = { year: H, month: O, day: l };
|
|
1010
|
+
if (et(f, I, K)) return;
|
|
1111
1011
|
if (i === "range") {
|
|
1112
|
-
if (
|
|
1113
|
-
|
|
1012
|
+
if (Et(void 0), !U || U && y)
|
|
1013
|
+
M(f), $(null);
|
|
1114
1014
|
else {
|
|
1115
|
-
const
|
|
1116
|
-
new Date(
|
|
1015
|
+
const X = new Date(U.year, U.month, U.day).getTime();
|
|
1016
|
+
new Date(f.year, f.month, f.day).getTime() < X ? (M(f), $(U), h?.(ut(f, U))) : ($(f), h?.(ut(U, f)));
|
|
1117
1017
|
}
|
|
1118
1018
|
return;
|
|
1119
1019
|
}
|
|
1120
|
-
|
|
1121
|
-
const
|
|
1122
|
-
if (u?.(
|
|
1123
|
-
let
|
|
1020
|
+
R(f);
|
|
1021
|
+
const q = wt(e, H, O, l, G);
|
|
1022
|
+
if (u?.(q), n) {
|
|
1023
|
+
let X;
|
|
1124
1024
|
switch (o) {
|
|
1125
1025
|
case "iso":
|
|
1126
|
-
|
|
1026
|
+
X = q.ad;
|
|
1127
1027
|
break;
|
|
1128
1028
|
case "object":
|
|
1129
|
-
|
|
1029
|
+
X = JSON.stringify(q);
|
|
1130
1030
|
break;
|
|
1131
1031
|
default:
|
|
1132
|
-
|
|
1032
|
+
X = JSON.stringify(q);
|
|
1133
1033
|
break;
|
|
1134
1034
|
}
|
|
1135
|
-
|
|
1035
|
+
n(X);
|
|
1136
1036
|
}
|
|
1137
|
-
}, fe = (
|
|
1037
|
+
}, fe = (l) => {
|
|
1138
1038
|
if (!r) {
|
|
1139
|
-
switch (
|
|
1039
|
+
switch (l.key) {
|
|
1140
1040
|
case "ArrowLeft":
|
|
1141
|
-
|
|
1041
|
+
x(-1);
|
|
1142
1042
|
break;
|
|
1143
1043
|
case "ArrowRight":
|
|
1144
|
-
|
|
1044
|
+
x(1);
|
|
1145
1045
|
break;
|
|
1146
1046
|
case "ArrowUp":
|
|
1147
|
-
|
|
1047
|
+
x(-12);
|
|
1148
1048
|
break;
|
|
1149
1049
|
case "ArrowDown":
|
|
1150
|
-
|
|
1050
|
+
x(12);
|
|
1151
1051
|
break;
|
|
1152
1052
|
case "PageUp":
|
|
1153
|
-
|
|
1053
|
+
l.shiftKey ? x(-12) : x(-1);
|
|
1154
1054
|
break;
|
|
1155
1055
|
case "PageDown":
|
|
1156
|
-
|
|
1056
|
+
l.shiftKey ? x(12) : x(1);
|
|
1157
1057
|
break;
|
|
1158
1058
|
default:
|
|
1159
1059
|
return;
|
|
1160
1060
|
}
|
|
1161
|
-
|
|
1061
|
+
l.preventDefault();
|
|
1162
1062
|
}
|
|
1163
|
-
},
|
|
1164
|
-
...
|
|
1165
|
-
(
|
|
1063
|
+
}, Me = {
|
|
1064
|
+
...nt ? Object.entries(nt).reduce(
|
|
1065
|
+
(l, [f, q]) => (l[`--calendar-${f}`] = q, l),
|
|
1166
1066
|
{}
|
|
1167
1067
|
) : {}
|
|
1168
1068
|
};
|
|
1169
|
-
return /* @__PURE__ */
|
|
1069
|
+
return /* @__PURE__ */ S(
|
|
1170
1070
|
"div",
|
|
1171
1071
|
{
|
|
1172
|
-
className:
|
|
1173
|
-
style:
|
|
1174
|
-
"data-theme":
|
|
1072
|
+
className: `bsac-calendar ${a}`,
|
|
1073
|
+
style: Me,
|
|
1074
|
+
"data-theme": C,
|
|
1175
1075
|
onKeyDown: fe,
|
|
1176
1076
|
tabIndex: 0,
|
|
1177
1077
|
role: "application",
|
|
1178
1078
|
"aria-label": "Calendar",
|
|
1179
1079
|
children: [
|
|
1180
|
-
i === "range" &&
|
|
1181
|
-
/* @__PURE__ */
|
|
1182
|
-
/* @__PURE__ */
|
|
1183
|
-
/* @__PURE__ */
|
|
1080
|
+
i === "range" && T && /* @__PURE__ */ S("div", { style: { display: "flex", gap: "16px" }, children: [
|
|
1081
|
+
/* @__PURE__ */ g("div", { children: T({ onRangeChange: ye }) }),
|
|
1082
|
+
/* @__PURE__ */ S("div", { style: { flex: 1 }, children: [
|
|
1083
|
+
/* @__PURE__ */ g(
|
|
1184
1084
|
gt,
|
|
1185
1085
|
{
|
|
1186
|
-
currentMonth:
|
|
1187
|
-
currentYear:
|
|
1188
|
-
months:
|
|
1189
|
-
onNavigateMonth:
|
|
1190
|
-
onYearChange:
|
|
1191
|
-
onMonthChange:
|
|
1086
|
+
currentMonth: O,
|
|
1087
|
+
currentYear: H,
|
|
1088
|
+
months: G,
|
|
1089
|
+
onNavigateMonth: x,
|
|
1090
|
+
onYearChange: _,
|
|
1091
|
+
onMonthChange: j,
|
|
1192
1092
|
disabled: r,
|
|
1193
1093
|
showNepaliNumbers: p,
|
|
1194
|
-
convertToNepaliNumber:
|
|
1094
|
+
convertToNepaliNumber: V,
|
|
1195
1095
|
calendarType: e
|
|
1196
1096
|
}
|
|
1197
1097
|
),
|
|
1198
|
-
/* @__PURE__ */
|
|
1098
|
+
/* @__PURE__ */ g(
|
|
1199
1099
|
mt,
|
|
1200
1100
|
{
|
|
1201
|
-
calendarDays:
|
|
1101
|
+
calendarDays: w,
|
|
1202
1102
|
days: ct,
|
|
1203
|
-
onDateSelect:
|
|
1204
|
-
isSelected: (
|
|
1205
|
-
isInRange:
|
|
1206
|
-
isToday: (
|
|
1207
|
-
isDisabled: (
|
|
1103
|
+
onDateSelect: lt,
|
|
1104
|
+
isSelected: (l) => at(l, i),
|
|
1105
|
+
isInRange: rt,
|
|
1106
|
+
isToday: (l) => s && st(l),
|
|
1107
|
+
isDisabled: (l) => et({ year: H, month: O, day: l }, I, K),
|
|
1208
1108
|
disabled: r,
|
|
1209
1109
|
showNepaliNumbers: p,
|
|
1210
|
-
convertToNepaliNumber:
|
|
1110
|
+
convertToNepaliNumber: V
|
|
1211
1111
|
}
|
|
1212
1112
|
)
|
|
1213
1113
|
] })
|
|
1214
1114
|
] }),
|
|
1215
|
-
i === "range" &&
|
|
1216
|
-
/* @__PURE__ */
|
|
1217
|
-
|
|
1115
|
+
i === "range" && c && D === "left" && !T && /* @__PURE__ */ S("div", { style: { display: "flex", gap: "16px", flexWrap: "nowrap" }, children: [
|
|
1116
|
+
/* @__PURE__ */ g(
|
|
1117
|
+
Dt,
|
|
1218
1118
|
{
|
|
1219
|
-
presets:
|
|
1119
|
+
presets: it,
|
|
1220
1120
|
calendarType: e,
|
|
1221
|
-
onPresetSelect:
|
|
1222
|
-
activePreset:
|
|
1121
|
+
onPresetSelect: ht,
|
|
1122
|
+
activePreset: ot,
|
|
1223
1123
|
position: "left"
|
|
1224
1124
|
}
|
|
1225
1125
|
),
|
|
1226
|
-
/* @__PURE__ */
|
|
1227
|
-
/* @__PURE__ */
|
|
1126
|
+
/* @__PURE__ */ S("div", { children: [
|
|
1127
|
+
/* @__PURE__ */ g(
|
|
1228
1128
|
gt,
|
|
1229
1129
|
{
|
|
1230
|
-
currentMonth:
|
|
1231
|
-
currentYear:
|
|
1232
|
-
months:
|
|
1233
|
-
onNavigateMonth:
|
|
1234
|
-
onYearChange:
|
|
1235
|
-
onMonthChange:
|
|
1130
|
+
currentMonth: O,
|
|
1131
|
+
currentYear: H,
|
|
1132
|
+
months: G,
|
|
1133
|
+
onNavigateMonth: x,
|
|
1134
|
+
onYearChange: _,
|
|
1135
|
+
onMonthChange: j,
|
|
1236
1136
|
disabled: r,
|
|
1237
1137
|
showNepaliNumbers: p,
|
|
1238
|
-
convertToNepaliNumber:
|
|
1138
|
+
convertToNepaliNumber: V,
|
|
1239
1139
|
calendarType: e
|
|
1240
1140
|
}
|
|
1241
1141
|
),
|
|
1242
|
-
/* @__PURE__ */
|
|
1142
|
+
/* @__PURE__ */ g(
|
|
1243
1143
|
mt,
|
|
1244
1144
|
{
|
|
1245
|
-
calendarDays:
|
|
1145
|
+
calendarDays: w,
|
|
1246
1146
|
days: ct,
|
|
1247
|
-
onDateSelect:
|
|
1248
|
-
isSelected: (
|
|
1249
|
-
isInRange:
|
|
1250
|
-
isToday: (
|
|
1251
|
-
isDisabled: (
|
|
1147
|
+
onDateSelect: lt,
|
|
1148
|
+
isSelected: (l) => at(l, i),
|
|
1149
|
+
isInRange: rt,
|
|
1150
|
+
isToday: (l) => s && st(l),
|
|
1151
|
+
isDisabled: (l) => et({ year: H, month: O, day: l }, I, K),
|
|
1252
1152
|
disabled: r,
|
|
1253
1153
|
showNepaliNumbers: p,
|
|
1254
|
-
convertToNepaliNumber:
|
|
1154
|
+
convertToNepaliNumber: V
|
|
1255
1155
|
}
|
|
1256
1156
|
)
|
|
1257
1157
|
] })
|
|
1258
1158
|
] }),
|
|
1259
|
-
i === "range" &&
|
|
1260
|
-
/* @__PURE__ */
|
|
1261
|
-
/* @__PURE__ */
|
|
1159
|
+
i === "range" && c && D === "right" && !T && /* @__PURE__ */ S("div", { style: { display: "flex", gap: "16px", flexWrap: "nowrap" }, children: [
|
|
1160
|
+
/* @__PURE__ */ S("div", { children: [
|
|
1161
|
+
/* @__PURE__ */ g(
|
|
1262
1162
|
gt,
|
|
1263
1163
|
{
|
|
1264
|
-
currentMonth:
|
|
1265
|
-
currentYear:
|
|
1266
|
-
months:
|
|
1267
|
-
onNavigateMonth:
|
|
1268
|
-
onYearChange:
|
|
1269
|
-
onMonthChange:
|
|
1164
|
+
currentMonth: O,
|
|
1165
|
+
currentYear: H,
|
|
1166
|
+
months: G,
|
|
1167
|
+
onNavigateMonth: x,
|
|
1168
|
+
onYearChange: _,
|
|
1169
|
+
onMonthChange: j,
|
|
1270
1170
|
disabled: r,
|
|
1271
1171
|
showNepaliNumbers: p,
|
|
1272
|
-
convertToNepaliNumber:
|
|
1172
|
+
convertToNepaliNumber: V,
|
|
1273
1173
|
calendarType: e
|
|
1274
1174
|
}
|
|
1275
1175
|
),
|
|
1276
|
-
/* @__PURE__ */
|
|
1176
|
+
/* @__PURE__ */ g(
|
|
1277
1177
|
mt,
|
|
1278
1178
|
{
|
|
1279
|
-
calendarDays:
|
|
1179
|
+
calendarDays: w,
|
|
1280
1180
|
days: ct,
|
|
1281
|
-
onDateSelect:
|
|
1282
|
-
isSelected: (
|
|
1283
|
-
isInRange:
|
|
1284
|
-
isToday: (
|
|
1285
|
-
isDisabled: (
|
|
1181
|
+
onDateSelect: lt,
|
|
1182
|
+
isSelected: (l) => at(l, i),
|
|
1183
|
+
isInRange: rt,
|
|
1184
|
+
isToday: (l) => s && st(l),
|
|
1185
|
+
isDisabled: (l) => et({ year: H, month: O, day: l }, I, K),
|
|
1286
1186
|
disabled: r,
|
|
1287
1187
|
showNepaliNumbers: p,
|
|
1288
|
-
convertToNepaliNumber:
|
|
1188
|
+
convertToNepaliNumber: V
|
|
1289
1189
|
}
|
|
1290
1190
|
)
|
|
1291
1191
|
] }),
|
|
1292
|
-
/* @__PURE__ */
|
|
1293
|
-
|
|
1192
|
+
/* @__PURE__ */ g(
|
|
1193
|
+
Dt,
|
|
1294
1194
|
{
|
|
1295
|
-
presets:
|
|
1195
|
+
presets: it,
|
|
1296
1196
|
calendarType: e,
|
|
1297
|
-
onPresetSelect:
|
|
1298
|
-
activePreset:
|
|
1197
|
+
onPresetSelect: ht,
|
|
1198
|
+
activePreset: ot,
|
|
1299
1199
|
position: "right"
|
|
1300
1200
|
}
|
|
1301
1201
|
)
|
|
1302
1202
|
] }),
|
|
1303
|
-
(!i || i === "single" || !
|
|
1304
|
-
i === "range" &&
|
|
1305
|
-
|
|
1203
|
+
(!i || i === "single" || !c && !T || D === "top" || D === "bottom") && /* @__PURE__ */ S(pe, { children: [
|
|
1204
|
+
i === "range" && c && D === "top" && /* @__PURE__ */ g(
|
|
1205
|
+
Dt,
|
|
1306
1206
|
{
|
|
1307
|
-
presets:
|
|
1207
|
+
presets: it,
|
|
1308
1208
|
calendarType: e,
|
|
1309
|
-
onPresetSelect:
|
|
1310
|
-
activePreset:
|
|
1209
|
+
onPresetSelect: ht,
|
|
1210
|
+
activePreset: ot,
|
|
1311
1211
|
position: "top"
|
|
1312
1212
|
}
|
|
1313
1213
|
),
|
|
1314
|
-
/* @__PURE__ */
|
|
1214
|
+
/* @__PURE__ */ g(
|
|
1315
1215
|
gt,
|
|
1316
1216
|
{
|
|
1317
|
-
currentMonth:
|
|
1318
|
-
currentYear:
|
|
1319
|
-
months:
|
|
1320
|
-
onNavigateMonth:
|
|
1321
|
-
onYearChange:
|
|
1322
|
-
onMonthChange:
|
|
1217
|
+
currentMonth: O,
|
|
1218
|
+
currentYear: H,
|
|
1219
|
+
months: G,
|
|
1220
|
+
onNavigateMonth: x,
|
|
1221
|
+
onYearChange: _,
|
|
1222
|
+
onMonthChange: j,
|
|
1323
1223
|
disabled: r,
|
|
1324
1224
|
showNepaliNumbers: p,
|
|
1325
|
-
convertToNepaliNumber:
|
|
1225
|
+
convertToNepaliNumber: V,
|
|
1326
1226
|
calendarType: e
|
|
1327
1227
|
}
|
|
1328
1228
|
),
|
|
1329
|
-
/* @__PURE__ */
|
|
1229
|
+
/* @__PURE__ */ g(
|
|
1330
1230
|
mt,
|
|
1331
1231
|
{
|
|
1332
|
-
calendarDays:
|
|
1232
|
+
calendarDays: w,
|
|
1333
1233
|
days: ct,
|
|
1334
|
-
onDateSelect:
|
|
1335
|
-
isSelected: (
|
|
1336
|
-
isInRange:
|
|
1337
|
-
isToday: (
|
|
1338
|
-
isDisabled: (
|
|
1234
|
+
onDateSelect: lt,
|
|
1235
|
+
isSelected: (l) => at(l, i),
|
|
1236
|
+
isInRange: rt,
|
|
1237
|
+
isToday: (l) => s && st(l),
|
|
1238
|
+
isDisabled: (l) => et({ year: H, month: O, day: l }, I, K),
|
|
1339
1239
|
disabled: r,
|
|
1340
1240
|
showNepaliNumbers: p,
|
|
1341
|
-
convertToNepaliNumber:
|
|
1241
|
+
convertToNepaliNumber: V
|
|
1342
1242
|
}
|
|
1343
1243
|
),
|
|
1344
|
-
i === "range" &&
|
|
1345
|
-
|
|
1244
|
+
i === "range" && c && D === "bottom" && /* @__PURE__ */ g(
|
|
1245
|
+
Dt,
|
|
1346
1246
|
{
|
|
1347
|
-
presets:
|
|
1247
|
+
presets: it,
|
|
1348
1248
|
calendarType: e,
|
|
1349
|
-
onPresetSelect:
|
|
1350
|
-
activePreset:
|
|
1249
|
+
onPresetSelect: ht,
|
|
1250
|
+
activePreset: ot,
|
|
1351
1251
|
position: "bottom"
|
|
1352
1252
|
}
|
|
1353
1253
|
)
|
|
@@ -1355,154 +1255,140 @@ const f3 = [
|
|
|
1355
1255
|
]
|
|
1356
1256
|
}
|
|
1357
1257
|
);
|
|
1358
|
-
},
|
|
1359
|
-
datePicker: Z3,
|
|
1360
|
-
input: q3,
|
|
1361
|
-
iconButton: Q3,
|
|
1362
|
-
popup: tn
|
|
1363
|
-
}, ln = ({
|
|
1258
|
+
}, H3 = ({
|
|
1364
1259
|
placeholder: e = "Select date",
|
|
1365
1260
|
format: t = "YYYY-MM-DD",
|
|
1261
|
+
defaultValue: n,
|
|
1366
1262
|
onDateSelect: a,
|
|
1367
1263
|
inputClassName: s = "",
|
|
1368
|
-
popupClassName:
|
|
1369
|
-
style:
|
|
1370
|
-
inputStyle:
|
|
1371
|
-
icon:
|
|
1372
|
-
showIcon:
|
|
1264
|
+
popupClassName: r = "",
|
|
1265
|
+
style: o,
|
|
1266
|
+
inputStyle: u,
|
|
1267
|
+
icon: i,
|
|
1268
|
+
showIcon: h = !0,
|
|
1373
1269
|
calendarType: c = "AD",
|
|
1374
|
-
...
|
|
1270
|
+
...D
|
|
1375
1271
|
}) => {
|
|
1376
|
-
const [
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1272
|
+
const [d, k] = B(!1), [m, A] = B(null), [T, E] = B(() => {
|
|
1273
|
+
if (!n) return "";
|
|
1274
|
+
if (c === "BS")
|
|
1275
|
+
try {
|
|
1276
|
+
const [y, w, R] = n.split("-").map(Number), M = Y.fromEnglishDate(y, w - 1, R);
|
|
1277
|
+
return `${M.getYear()}-${String(M.getMonth() + 1).padStart(2, "0")}-${String(M.getDate()).padStart(2, "0")}`;
|
|
1278
|
+
} catch {
|
|
1279
|
+
return n;
|
|
1280
|
+
}
|
|
1281
|
+
return n;
|
|
1282
|
+
}), v = xt(null), p = xt(null), [C, nt] = B({ visibility: "hidden" }), I = () => {
|
|
1283
|
+
if (!v.current) return;
|
|
1284
|
+
const y = v.current.getBoundingClientRect(), w = p.current?.offsetHeight || 360, R = p.current?.offsetWidth || 280, M = window.innerHeight - y.bottom, $ = window.innerWidth - y.left, _ = M >= w + 8 ? y.bottom + 8 : Math.max(8, y.top - w - 8), j = $ >= R ? y.left : Math.max(8, y.right - R);
|
|
1285
|
+
nt({ top: _, left: j, visibility: "visible" });
|
|
1286
|
+
};
|
|
1287
|
+
Yt(() => (d && (requestAnimationFrame(I), window.addEventListener("scroll", I, !0), window.addEventListener("resize", I)), () => {
|
|
1288
|
+
window.removeEventListener("scroll", I, !0), window.removeEventListener("resize", I);
|
|
1289
|
+
}), [d]), Yt(() => {
|
|
1290
|
+
const y = (w) => {
|
|
1291
|
+
v.current && !v.current.contains(w.target) && k(!1);
|
|
1383
1292
|
};
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
F("");
|
|
1293
|
+
return d && document.addEventListener("mousedown", y), () => document.removeEventListener("mousedown", y);
|
|
1294
|
+
}, [d]);
|
|
1295
|
+
const K = (y) => {
|
|
1296
|
+
A(y), E(c === "BS" ? y.bs : y.ad), k(!1), a?.(y);
|
|
1297
|
+
}, H = (y) => {
|
|
1298
|
+
const w = y.target.value;
|
|
1299
|
+
if (w === "") {
|
|
1300
|
+
E("");
|
|
1393
1301
|
return;
|
|
1394
1302
|
}
|
|
1395
|
-
if (
|
|
1396
|
-
const
|
|
1397
|
-
let
|
|
1398
|
-
|
|
1303
|
+
if ((y.target.selectionStart || 0) === w.length && w.length > T.length) {
|
|
1304
|
+
const M = w.replace(/[^0-9]/g, "");
|
|
1305
|
+
let $ = M;
|
|
1306
|
+
M.length > 4 && M.length <= 6 ? $ = M.slice(0, 4) + "-" + M.slice(4) : M.length > 6 && ($ = M.slice(0, 4) + "-" + M.slice(4, 6) + "-" + M.slice(6, 8)), E($);
|
|
1399
1307
|
} else {
|
|
1400
|
-
const
|
|
1401
|
-
|
|
1308
|
+
const M = w.replace(/[^0-9-]/g, "");
|
|
1309
|
+
M.length <= 10 && E(M);
|
|
1402
1310
|
}
|
|
1403
|
-
},
|
|
1404
|
-
const
|
|
1405
|
-
if (!
|
|
1406
|
-
|
|
1311
|
+
}, O = () => {
|
|
1312
|
+
const y = T.trim();
|
|
1313
|
+
if (!y) {
|
|
1314
|
+
A(null);
|
|
1407
1315
|
return;
|
|
1408
1316
|
}
|
|
1409
|
-
const
|
|
1410
|
-
if (
|
|
1411
|
-
const [,
|
|
1412
|
-
if (
|
|
1413
|
-
|
|
1414
|
-
k ? c === "BS" ? k.formatted.bs : k.formatted.ad : ""
|
|
1415
|
-
);
|
|
1317
|
+
const w = y.match(/^(\d{4})-(\d{2})-(\d{2})$/);
|
|
1318
|
+
if (w) {
|
|
1319
|
+
const [, R, M, $] = w, _ = parseInt(M), j = parseInt($);
|
|
1320
|
+
if (_ < 1 || _ > 12 || j < 1 || j > 32) {
|
|
1321
|
+
E(m ? c === "BS" ? m.bs : m.ad : "");
|
|
1416
1322
|
return;
|
|
1417
1323
|
}
|
|
1418
|
-
const
|
|
1419
|
-
bs: c === "BS" ? `${
|
|
1420
|
-
ad: c === "AD" ? `${
|
|
1324
|
+
const x = {
|
|
1325
|
+
bs: c === "BS" ? `${R}-${M}-${$}` : "",
|
|
1326
|
+
ad: c === "AD" ? `${R}-${M}-${$}` : "",
|
|
1421
1327
|
formatted: {
|
|
1422
|
-
bs: c === "BS" ?
|
|
1423
|
-
ad: c === "AD" ?
|
|
1328
|
+
bs: c === "BS" ? y : "",
|
|
1329
|
+
ad: c === "AD" ? y : ""
|
|
1424
1330
|
}
|
|
1425
1331
|
};
|
|
1426
|
-
|
|
1427
|
-
} else
|
|
1428
|
-
k ? c === "BS" ? k.formatted.bs : k.formatted.ad : ""
|
|
1429
|
-
);
|
|
1430
|
-
}, et = (D) => {
|
|
1431
|
-
D.key === "Enter" ? (_(), d(!1)) : D.key === "Escape" && d(!1);
|
|
1332
|
+
A(x), a?.(x);
|
|
1333
|
+
} else y.length < 10 && E(m ? c === "BS" ? m.bs : m.ad : "");
|
|
1432
1334
|
};
|
|
1433
|
-
return /* @__PURE__ */
|
|
1434
|
-
/* @__PURE__ */
|
|
1335
|
+
return /* @__PURE__ */ S("div", { className: "bsac-datepicker", ref: v, style: o, children: [
|
|
1336
|
+
/* @__PURE__ */ g(
|
|
1435
1337
|
"input",
|
|
1436
1338
|
{
|
|
1437
1339
|
type: "text",
|
|
1438
|
-
value:
|
|
1439
|
-
placeholder: e
|
|
1440
|
-
onChange:
|
|
1441
|
-
onBlur:
|
|
1442
|
-
onKeyDown:
|
|
1443
|
-
|
|
1444
|
-
|
|
1340
|
+
value: T,
|
|
1341
|
+
placeholder: e,
|
|
1342
|
+
onChange: H,
|
|
1343
|
+
onBlur: O,
|
|
1344
|
+
onKeyDown: (y) => {
|
|
1345
|
+
y.key === "Enter" ? (O(), k(!1)) : y.key === "Escape" && k(!1);
|
|
1346
|
+
},
|
|
1347
|
+
className: `bsac-input ${s}`,
|
|
1348
|
+
style: u,
|
|
1445
1349
|
"aria-label": "Date picker input",
|
|
1446
1350
|
"aria-haspopup": "dialog",
|
|
1447
|
-
"aria-expanded":
|
|
1351
|
+
"aria-expanded": d,
|
|
1448
1352
|
maxLength: 10
|
|
1449
1353
|
}
|
|
1450
1354
|
),
|
|
1451
|
-
/* @__PURE__ */
|
|
1355
|
+
/* @__PURE__ */ g(
|
|
1452
1356
|
"button",
|
|
1453
1357
|
{
|
|
1454
1358
|
type: "button",
|
|
1455
|
-
className:
|
|
1456
|
-
onClick: () =>
|
|
1359
|
+
className: "bsac-icon-btn",
|
|
1360
|
+
onClick: () => k(!d),
|
|
1457
1361
|
"aria-label": "Toggle calendar",
|
|
1458
|
-
style: { display:
|
|
1459
|
-
children:
|
|
1460
|
-
"
|
|
1461
|
-
{
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
fill: "none",
|
|
1466
|
-
stroke: "currentColor",
|
|
1467
|
-
strokeWidth: "2",
|
|
1468
|
-
children: [
|
|
1469
|
-
/* @__PURE__ */ h("rect", { x: "3", y: "4", width: "18", height: "18", rx: "2", ry: "2" }),
|
|
1470
|
-
/* @__PURE__ */ h("line", { x1: "16", y1: "2", x2: "16", y2: "6" }),
|
|
1471
|
-
/* @__PURE__ */ h("line", { x1: "8", y1: "2", x2: "8", y2: "6" }),
|
|
1472
|
-
/* @__PURE__ */ h("line", { x1: "3", y1: "10", x2: "21", y2: "10" })
|
|
1473
|
-
]
|
|
1474
|
-
}
|
|
1475
|
-
)
|
|
1362
|
+
style: { display: h ? "flex" : "none" },
|
|
1363
|
+
children: i || /* @__PURE__ */ S("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
|
|
1364
|
+
/* @__PURE__ */ g("rect", { x: "3", y: "4", width: "18", height: "18", rx: "2", ry: "2" }),
|
|
1365
|
+
/* @__PURE__ */ g("line", { x1: "16", y1: "2", x2: "16", y2: "6" }),
|
|
1366
|
+
/* @__PURE__ */ g("line", { x1: "8", y1: "2", x2: "8", y2: "6" }),
|
|
1367
|
+
/* @__PURE__ */ g("line", { x1: "3", y1: "10", x2: "21", y2: "10" })
|
|
1368
|
+
] })
|
|
1476
1369
|
}
|
|
1477
1370
|
),
|
|
1478
|
-
|
|
1479
|
-
X3,
|
|
1480
|
-
{
|
|
1481
|
-
calendarType: c,
|
|
1482
|
-
onDateSelect: T,
|
|
1483
|
-
...l
|
|
1484
|
-
}
|
|
1485
|
-
) })
|
|
1371
|
+
d && /* @__PURE__ */ g("div", { ref: p, className: `bsac-popup ${r}`, style: C, children: /* @__PURE__ */ g(C3, { calendarType: c, onDateSelect: K, ...D }) })
|
|
1486
1372
|
] });
|
|
1487
1373
|
};
|
|
1488
1374
|
export {
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1375
|
+
C3 as Calendar,
|
|
1376
|
+
H3 as CalendarInput,
|
|
1377
|
+
O3 as DEFAULT_COLORS,
|
|
1378
|
+
H3 as DatePicker,
|
|
1493
1379
|
p3 as ENGLISH_DAYS,
|
|
1494
|
-
|
|
1495
|
-
|
|
1380
|
+
f3 as ENGLISH_MONTHS_AD,
|
|
1381
|
+
me as ENGLISH_MONTHS_BS,
|
|
1496
1382
|
M3 as NEPALI_DAYS,
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1383
|
+
b3 as NEPALI_DIGITS,
|
|
1384
|
+
y3 as NEPALI_MONTHS,
|
|
1385
|
+
T3 as PRESET_KEYS,
|
|
1386
|
+
V as convertToNepaliNumber,
|
|
1387
|
+
wt as createDateOutput,
|
|
1388
|
+
Y3 as createPredefinedRanges,
|
|
1389
|
+
De as getDaysInMonth,
|
|
1390
|
+
S3 as getFirstDayOfMonth,
|
|
1391
|
+
N as getTodayDate,
|
|
1392
|
+
N3 as isDateInRange,
|
|
1393
|
+
E3 as useCalendar
|
|
1508
1394
|
};
|