calkit 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- class ce extends HTMLElement {
1
+ class ge extends HTMLElement {
2
2
  constructor() {
3
3
  super(), this.attachShadow({ mode: "open" }), this._initialized = !1;
4
4
  }
@@ -27,6 +27,9 @@ class ce extends HTMLElement {
27
27
  /** Subclasses override to update Shadow DOM. */
28
28
  render() {
29
29
  }
30
+ /** Reset selection state. Subclasses should override with specific logic. */
31
+ clear() {
32
+ }
30
33
  /** Dispatch a composed, bubbling custom event. */
31
34
  emit(e, a = {}) {
32
35
  this.dispatchEvent(
@@ -36,8 +39,8 @@ class ce extends HTMLElement {
36
39
  /** Show an inline status banner. */
37
40
  showStatus(e, a, t = {}) {
38
41
  if (!this._store) return;
39
- const { autoDismiss: n, dismissible: i = !0 } = t;
40
- clearTimeout(this._statusTimer), this._store.set({ statusType: e, statusMessage: a, statusDismissible: i }), this.emit("cal:status", { type: e, message: a }), n && n > 0 && (this._statusTimer = setTimeout(() => this.clearStatus(), n));
42
+ const { autoDismiss: n, dismissible: r = !0 } = t;
43
+ clearTimeout(this._statusTimer), this._store.set({ statusType: e, statusMessage: a, statusDismissible: r }), this.emit("cal:status", { type: e, message: a }), n && n > 0 && (this._statusTimer = setTimeout(() => this.clearStatus(), n));
41
44
  }
42
45
  /** Clear the status banner. */
43
46
  clearStatus() {
@@ -51,7 +54,7 @@ class ce extends HTMLElement {
51
54
  return this.shadowRoot.querySelectorAll(e);
52
55
  }
53
56
  }
54
- function de(s) {
57
+ function he(s) {
55
58
  let e = { ...s };
56
59
  const a = /* @__PURE__ */ new Set();
57
60
  return {
@@ -61,14 +64,14 @@ function de(s) {
61
64
  set(t) {
62
65
  const n = e;
63
66
  e = { ...e, ...t };
64
- let i = !1;
65
- for (const r of Object.keys(t))
66
- if (n[r] !== e[r]) {
67
- i = !0;
67
+ let r = !1;
68
+ for (const i of Object.keys(t))
69
+ if (n[i] !== e[i]) {
70
+ r = !0;
68
71
  break;
69
72
  }
70
- if (i)
71
- for (const r of a) r(e, n);
73
+ if (r)
74
+ for (const i of a) i(e, n);
72
75
  },
73
76
  getState() {
74
77
  return e;
@@ -78,7 +81,7 @@ function de(s) {
78
81
  }
79
82
  };
80
83
  }
81
- const J = [
84
+ const Q = [
82
85
  "January",
83
86
  "February",
84
87
  "March",
@@ -91,17 +94,78 @@ const J = [
91
94
  "October",
92
95
  "November",
93
96
  "December"
94
- ], ue = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];
95
- function ge(s = 0) {
96
- const e = [];
97
- for (let a = 0; a < 7; a++)
98
- e.push(ue[(s + a) % 7]);
99
- return e;
97
+ ], be = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];
98
+ function me(s) {
99
+ if (!s) return Q;
100
+ try {
101
+ const e = new Intl.DateTimeFormat(s, { month: "long" });
102
+ return Array.from({ length: 12 }, (a, t) => {
103
+ const n = e.format(new Date(2024, t, 1));
104
+ return n.charAt(0).toUpperCase() + n.slice(1);
105
+ });
106
+ } catch {
107
+ return Q;
108
+ }
109
+ }
110
+ function se(s) {
111
+ if (!s)
112
+ return [
113
+ "Jan",
114
+ "Feb",
115
+ "Mar",
116
+ "Apr",
117
+ "May",
118
+ "Jun",
119
+ "Jul",
120
+ "Aug",
121
+ "Sep",
122
+ "Oct",
123
+ "Nov",
124
+ "Dec"
125
+ ];
126
+ try {
127
+ const e = new Intl.DateTimeFormat(s, { month: "short" });
128
+ return Array.from({ length: 12 }, (a, t) => {
129
+ const n = e.format(new Date(2024, t, 1));
130
+ return n.charAt(0).toUpperCase() + n.slice(1);
131
+ });
132
+ } catch {
133
+ return [
134
+ "Jan",
135
+ "Feb",
136
+ "Mar",
137
+ "Apr",
138
+ "May",
139
+ "Jun",
140
+ "Jul",
141
+ "Aug",
142
+ "Sep",
143
+ "Oct",
144
+ "Nov",
145
+ "Dec"
146
+ ];
147
+ }
100
148
  }
101
- function V(s, e) {
149
+ function fe(s = 0, e) {
150
+ if (e)
151
+ try {
152
+ const t = new Intl.DateTimeFormat(e, { weekday: "short" }), n = [];
153
+ for (let r = 0; r < 7; r++) {
154
+ const i = new Date(2024, 0, 7 + (s + r) % 7), o = t.format(i);
155
+ n.push(o.charAt(0).toUpperCase() + o.slice(1));
156
+ }
157
+ return n;
158
+ } catch {
159
+ }
160
+ const a = [];
161
+ for (let t = 0; t < 7; t++)
162
+ a.push(be[(s + t) % 7]);
163
+ return a;
164
+ }
165
+ function Z(s, e) {
102
166
  return new Date(s, e + 1, 0).getDate();
103
167
  }
104
- function he(s, e) {
168
+ function pe(s, e) {
105
169
  return new Date(s, e, 1).getDay();
106
170
  }
107
171
  function T(s) {
@@ -109,7 +173,7 @@ function T(s) {
109
173
  const e = s instanceof Date ? s : new Date(s.year, s.month, s.day), a = e.getFullYear(), t = String(e.getMonth() + 1).padStart(2, "0"), n = String(e.getDate()).padStart(2, "0");
110
174
  return `${a}-${t}-${n}`;
111
175
  }
112
- function M(s) {
176
+ function D(s) {
113
177
  if (!s) return null;
114
178
  if (s instanceof Date) return s;
115
179
  if (typeof s == "string") {
@@ -118,55 +182,55 @@ function M(s) {
118
182
  }
119
183
  return null;
120
184
  }
121
- function Y(s, e) {
185
+ function z(s, e) {
122
186
  if (!s || !e) return !1;
123
- const a = M(s), t = M(e);
187
+ const a = D(s), t = D(e);
124
188
  return !a || !t ? !1 : a.getFullYear() === t.getFullYear() && a.getMonth() === t.getMonth() && a.getDate() === t.getDate();
125
189
  }
126
- function be(s, e, a) {
190
+ function ve(s, e, a) {
127
191
  if (!s || !e || !a) return !1;
128
- const t = M(s), n = M(e), i = M(a);
129
- if (!t || !n || !i) return !1;
130
- const r = t.getTime(), o = Math.min(n.getTime(), i.getTime()), l = Math.max(n.getTime(), i.getTime());
131
- return r >= o && r <= l;
192
+ const t = D(s), n = D(e), r = D(a);
193
+ if (!t || !n || !r) return !1;
194
+ const i = t.getTime(), o = Math.min(n.getTime(), r.getTime()), l = Math.max(n.getTime(), r.getTime());
195
+ return i >= o && i <= l;
132
196
  }
133
- function ae() {
197
+ function re() {
134
198
  return T(/* @__PURE__ */ new Date());
135
199
  }
136
- function B(s, e, a) {
200
+ function O(s, e, a) {
137
201
  const t = new Date(s, e + a, 1);
138
202
  return { year: t.getFullYear(), month: t.getMonth() };
139
203
  }
140
- function me(s, e, a = 0) {
141
- const t = V(s, e), i = (he(s, e) - a + 7) % 7, r = [], o = ae(), l = B(s, e, -1), u = V(l.year, l.month);
142
- for (let c = i - 1; c >= 0; c--) {
143
- const d = u - c, b = T({ year: l.year, month: l.month, day: d });
144
- r.push({ year: l.year, month: l.month, day: d, dateString: b, isCurrentMonth: !1, isToday: b === o });
204
+ function ye(s, e, a = 0) {
205
+ const t = Z(s, e), r = (pe(s, e) - a + 7) % 7, i = [], o = re(), l = O(s, e, -1), g = Z(l.year, l.month);
206
+ for (let c = r - 1; c >= 0; c--) {
207
+ const u = g - c, m = T({ year: l.year, month: l.month, day: u });
208
+ i.push({ year: l.year, month: l.month, day: u, dateString: m, isCurrentMonth: !1, isToday: m === o });
145
209
  }
146
210
  for (let c = 1; c <= t; c++) {
147
- const d = T({ year: s, month: e, day: c });
148
- r.push({ year: s, month: e, day: c, dateString: d, isCurrentMonth: !0, isToday: d === o });
211
+ const u = T({ year: s, month: e, day: c });
212
+ i.push({ year: s, month: e, day: c, dateString: u, isCurrentMonth: !0, isToday: u === o });
149
213
  }
150
- const m = B(s, e, 1);
151
- let g = 1;
152
- for (; r.length < 42; ) {
153
- const c = T({ year: m.year, month: m.month, day: g });
154
- r.push({ year: m.year, month: m.month, day: g, dateString: c, isCurrentMonth: !1, isToday: c === o }), g++;
214
+ const h = O(s, e, 1);
215
+ let d = 1;
216
+ for (; i.length < 42; ) {
217
+ const c = T({ year: h.year, month: h.month, day: d });
218
+ i.push({ year: h.year, month: h.month, day: d, dateString: c, isCurrentMonth: !1, isToday: c === o }), d++;
155
219
  }
156
- return r;
220
+ return i;
157
221
  }
158
- function N(s) {
222
+ function U(s) {
159
223
  if (!s || typeof s != "string") return null;
160
224
  const e = s.trim().toUpperCase(), a = e.match(/^(\d{1,2}):(\d{2})\s*(AM|PM)$/);
161
225
  if (a) {
162
226
  let n = parseInt(a[1], 10);
163
- const i = parseInt(a[2], 10), r = a[3];
164
- return r === "AM" && n === 12 && (n = 0), r === "PM" && n !== 12 && (n += 12), { hours: n, minutes: i };
227
+ const r = parseInt(a[2], 10), i = a[3];
228
+ return i === "AM" && n === 12 && (n = 0), i === "PM" && n !== 12 && (n += 12), { hours: n, minutes: r };
165
229
  }
166
230
  const t = e.match(/^(\d{1,2}):(\d{2})$/);
167
231
  return t ? { hours: parseInt(t[1], 10), minutes: parseInt(t[2], 10) } : null;
168
232
  }
169
- function K(s, e, a = "24h") {
233
+ function X(s, e, a = "24h") {
170
234
  const t = String(e).padStart(2, "0");
171
235
  if (a === "12h") {
172
236
  const n = s >= 12 ? "PM" : "AM";
@@ -175,32 +239,36 @@ function K(s, e, a = "24h") {
175
239
  return `${String(s).padStart(2, "0")}:${t}`;
176
240
  }
177
241
  function A(s) {
178
- const e = N(s);
242
+ const e = U(s);
179
243
  return e ? e.hours * 60 + e.minutes : 0;
180
244
  }
181
- function X(s) {
245
+ function q(s) {
182
246
  const e = Math.floor(s / 60) % 24, a = s % 60;
183
247
  return `${String(e).padStart(2, "0")}:${String(a).padStart(2, "0")}`;
184
248
  }
185
- function pe(s, e, a) {
186
- const t = [], n = A(s), i = A(e);
187
- for (let r = n; r <= i; r += a)
188
- t.push(X(r));
249
+ function ke(s, e, a) {
250
+ const t = [], n = A(s);
251
+ let r = A(e);
252
+ r <= n && (r += 1440);
253
+ for (let i = n; i <= r; i += a)
254
+ t.push(q(i % 1440));
189
255
  return t;
190
256
  }
191
- function fe(s, e, a, t = "24h") {
192
- const n = [], i = A(s), r = A(e);
193
- for (let o = i; o <= r; o += a) {
194
- const l = X(o), u = o + a, m = X(Math.min(u, r + a)), g = N(l), c = N(m), d = g ? K(g.hours, g.minutes, t) : l, b = c ? K(c.hours, c.minutes, t) : m;
195
- n.push({ time: l, displayText: `${d}–${b}` });
257
+ function _e(s, e, a, t = "24h") {
258
+ const n = [], r = A(s);
259
+ let i = A(e);
260
+ i <= r && (i += 1440);
261
+ for (let o = r; o <= i; o += a) {
262
+ const l = q(o % 1440), g = o + a, h = q(Math.min(g, i + a) % 1440), d = U(l), c = U(h), u = d ? X(d.hours, d.minutes, t) : l, m = c ? X(c.hours, c.minutes, t) : h;
263
+ n.push({ time: l, displayText: `${u}–${m}` });
196
264
  }
197
265
  return n;
198
266
  }
199
- function Q(s, e, a) {
200
- const t = A(s), n = A(e), i = A(a), r = Math.min(n, i), o = Math.max(n, i);
201
- return t >= r && t <= o;
267
+ function ee(s, e, a) {
268
+ const t = A(s), n = A(e), r = A(a);
269
+ return r >= n ? t >= n && t <= r : t >= n || t <= r;
202
270
  }
203
- const ve = `
271
+ const we = `
204
272
  :host {
205
273
  /* Light theme (default) */
206
274
  --cal-bg: 0 0% 100%;
@@ -368,7 +436,7 @@ const ve = `
368
436
  --cal-status-success-border: 152 40% 28%;
369
437
  }
370
438
  }
371
- `, ye = `
439
+ `, xe = `
372
440
  :host {
373
441
  display: inline-block;
374
442
  font-family: inherit;
@@ -409,7 +477,7 @@ const ve = `
409
477
  [hidden] {
410
478
  display: none !important;
411
479
  }
412
- `, ke = `
480
+ `, Se = `
413
481
  @keyframes cal-fade-in {
414
482
  from { opacity: 0; }
415
483
  to { opacity: 1; }
@@ -473,18 +541,18 @@ const ve = `
473
541
  .cal-skeleton--rect {
474
542
  border-radius: var(--cal-radius-sm);
475
543
  }
476
- `, ne = '<svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M10 12L6 8l4-4"/></svg>', se = '<svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M6 4l4 4-4 4"/></svg>';
477
- function Z({ year: s, month: e, onPrev: a, onNext: t, onTitleClick: n }) {
544
+ `, ie = '<svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M10 12L6 8l4-4"/></svg>', oe = '<svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M6 4l4 4-4 4"/></svg>';
545
+ function te({ year: s, month: e, onPrev: a, onNext: t, onTitleClick: n, locale: r }) {
478
546
  const i = document.createElement("div");
479
547
  i.classList.add("cal-nav");
480
- const r = document.createElement("button");
481
- r.classList.add("cal-nav__btn", "cal-nav__btn--prev"), r.innerHTML = ne, r.setAttribute("aria-label", "Previous month"), r.addEventListener("click", a);
482
- const o = n ? "button" : "div", l = document.createElement(o);
483
- l.classList.add("cal-nav__title"), n && (l.classList.add("cal-nav__title--interactive"), l.setAttribute("aria-label", `Select month and year, currently ${J[e]} ${s}`), l.addEventListener("click", n)), l.setAttribute("aria-live", "polite"), l.textContent = `${J[e]} ${s}`;
484
- const u = document.createElement("button");
485
- return u.classList.add("cal-nav__btn", "cal-nav__btn--next"), u.innerHTML = se, u.setAttribute("aria-label", "Next month"), u.addEventListener("click", t), i.appendChild(r), i.appendChild(l), i.appendChild(u), i;
548
+ const o = document.createElement("button");
549
+ o.classList.add("cal-nav__btn", "cal-nav__btn--prev"), o.innerHTML = ie, o.setAttribute("aria-label", "Previous month"), o.addEventListener("click", a);
550
+ const l = me(r), g = n ? "button" : "div", h = document.createElement(g);
551
+ h.classList.add("cal-nav__title"), n && (h.classList.add("cal-nav__title--interactive"), h.setAttribute("aria-label", `Select month and year, currently ${l[e]} ${s}`), h.addEventListener("click", n)), h.setAttribute("aria-live", "polite"), h.textContent = `${l[e]} ${s}`;
552
+ const d = document.createElement("button");
553
+ return d.classList.add("cal-nav__btn", "cal-nav__btn--next"), d.innerHTML = oe, d.setAttribute("aria-label", "Next month"), d.addEventListener("click", t), i.appendChild(o), i.appendChild(h), i.appendChild(d), i;
486
554
  }
487
- const _e = `
555
+ const Le = `
488
556
  .cal-nav {
489
557
  display: flex;
490
558
  align-items: center;
@@ -525,51 +593,39 @@ const _e = `
525
593
  .cal-nav__title--interactive:hover {
526
594
  background: hsl(var(--cal-hover));
527
595
  }
528
- `, xe = [
529
- "Jan",
530
- "Feb",
531
- "Mar",
532
- "Apr",
533
- "May",
534
- "Jun",
535
- "Jul",
536
- "Aug",
537
- "Sep",
538
- "Oct",
539
- "Nov",
540
- "Dec"
541
- ];
542
- function we({
596
+ `;
597
+ function De({
543
598
  pickerYear: s,
544
599
  viewMonth: e,
545
600
  viewYear: a,
546
601
  onMonthSelect: t,
547
602
  onYearPrev: n,
548
- onYearNext: i,
549
- onClose: r
603
+ onYearNext: r,
604
+ onClose: i,
605
+ locale: o
550
606
  }) {
551
- const o = document.createElement("div");
552
- o.classList.add("cal-myp", "cal-animate-fade");
553
607
  const l = document.createElement("div");
554
- l.classList.add("cal-myp__year-nav");
555
- const u = document.createElement("button");
556
- u.classList.add("cal-nav__btn"), u.innerHTML = ne, u.setAttribute("aria-label", "Previous year"), u.addEventListener("click", n);
557
- const m = document.createElement("div");
558
- m.classList.add("cal-myp__year-label"), m.textContent = s;
559
- const g = document.createElement("button");
560
- g.classList.add("cal-nav__btn"), g.innerHTML = se, g.setAttribute("aria-label", "Next year"), g.addEventListener("click", i), l.appendChild(u), l.appendChild(m), l.appendChild(g), o.appendChild(l);
561
- const c = document.createElement("div");
562
- c.classList.add("cal-myp__grid");
563
- const d = /* @__PURE__ */ new Date(), b = d.getMonth(), E = d.getFullYear();
564
- for (let v = 0; v < 12; v++) {
565
- const x = document.createElement("button");
566
- x.classList.add("cal-myp__cell"), x.textContent = xe[v], v === e && s === a && x.classList.add("cal-myp__cell--active"), v === b && s === E && x.classList.add("cal-myp__cell--today"), x.addEventListener("click", () => t(v, s)), c.appendChild(x);
567
- }
568
- return o.appendChild(c), o.addEventListener("keydown", (v) => {
569
- v.key === "Escape" && (v.stopPropagation(), r());
570
- }), o;
608
+ l.classList.add("cal-myp", "cal-animate-fade");
609
+ const g = document.createElement("div");
610
+ g.classList.add("cal-myp__year-nav");
611
+ const h = document.createElement("button");
612
+ h.classList.add("cal-nav__btn"), h.innerHTML = ie, h.setAttribute("aria-label", "Previous year"), h.addEventListener("click", n);
613
+ const d = document.createElement("div");
614
+ d.classList.add("cal-myp__year-label"), d.textContent = s;
615
+ const c = document.createElement("button");
616
+ c.classList.add("cal-nav__btn"), c.innerHTML = oe, c.setAttribute("aria-label", "Next year"), c.addEventListener("click", r), g.appendChild(h), g.appendChild(d), g.appendChild(c), l.appendChild(g);
617
+ const u = document.createElement("div");
618
+ u.classList.add("cal-myp__grid");
619
+ const m = se(o), f = /* @__PURE__ */ new Date(), E = f.getMonth(), P = f.getFullYear();
620
+ for (let w = 0; w < 12; w++) {
621
+ const v = document.createElement("button");
622
+ v.classList.add("cal-myp__cell"), v.textContent = m[w], w === e && s === a && v.classList.add("cal-myp__cell--active"), w === E && s === P && v.classList.add("cal-myp__cell--today"), v.addEventListener("click", () => t(w, s)), u.appendChild(v);
623
+ }
624
+ return l.appendChild(u), l.addEventListener("keydown", (w) => {
625
+ w.key === "Escape" && (w.stopPropagation(), i());
626
+ }), l;
571
627
  }
572
- const Se = `
628
+ const Ee = `
573
629
  .cal-myp {
574
630
  width: calc(7 * var(--cal-cell-size));
575
631
  }
@@ -628,37 +684,37 @@ const Se = `
628
684
  font-weight: 600;
629
685
  }
630
686
  `;
631
- function Le({ trigger: s, content: e, onClose: a }) {
687
+ function Me({ trigger: s, content: e, onClose: a }) {
632
688
  const t = document.createElement("div");
633
689
  t.classList.add("cal-popover"), t.setAttribute("role", "dialog"), t.setAttribute("aria-modal", "false"), t.style.display = "none", t.appendChild(e);
634
690
  let n = !1;
635
- function i() {
691
+ function r() {
636
692
  t.classList.remove("cal-popover--above");
637
- const g = s.getBoundingClientRect(), c = t.offsetHeight, d = window.innerHeight - g.bottom, b = g.top;
638
- d < c + 8 && b > d ? (t.classList.add("cal-popover--above"), t.style.top = "auto", t.style.bottom = "100%", t.style.marginBottom = "4px", t.style.marginTop = "0") : (t.style.top = "100%", t.style.bottom = "auto", t.style.marginTop = "4px", t.style.marginBottom = "0");
693
+ const d = s.getBoundingClientRect(), c = t.offsetHeight, u = window.innerHeight - d.bottom, m = d.top;
694
+ u < c + 8 && m > u ? (t.classList.add("cal-popover--above"), t.style.top = "auto", t.style.bottom = "100%", t.style.marginBottom = "4px", t.style.marginTop = "0") : (t.style.top = "100%", t.style.bottom = "auto", t.style.marginTop = "4px", t.style.marginBottom = "0");
639
695
  }
640
- function r() {
641
- n || (n = !0, t.style.display = "", t.classList.add("cal-animate-slide-up"), requestAnimationFrame(() => i()), document.addEventListener("click", l, !0), document.addEventListener("keydown", u, !0));
696
+ function i() {
697
+ n || (n = !0, t.style.display = "", t.classList.add("cal-animate-slide-up"), requestAnimationFrame(() => r()), document.addEventListener("click", l, !0), document.addEventListener("keydown", g, !0));
642
698
  }
643
699
  function o() {
644
- n && (n = !1, t.style.display = "none", t.classList.remove("cal-animate-slide-up"), document.removeEventListener("click", l, !0), document.removeEventListener("keydown", u, !0), a == null || a());
700
+ n && (n = !1, t.style.display = "none", t.classList.remove("cal-animate-slide-up"), document.removeEventListener("click", l, !0), document.removeEventListener("keydown", g, !0), a == null || a());
645
701
  }
646
- function l(g) {
647
- var d;
648
- const c = (d = s.getRootNode()) == null ? void 0 : d.host;
649
- c && !c.contains(g.target) && g.target !== c && o();
702
+ function l(d) {
703
+ var u;
704
+ const c = (u = s.getRootNode()) == null ? void 0 : u.host;
705
+ c && !c.contains(d.target) && d.target !== c && o();
650
706
  }
651
- function u(g) {
652
- g.key === "Escape" && (g.stopPropagation(), o());
707
+ function g(d) {
708
+ d.key === "Escape" && (d.stopPropagation(), o());
653
709
  }
654
- function m() {
655
- n && (n = !1, t.style.display = "none", t.classList.remove("cal-animate-slide-up")), document.removeEventListener("click", l, !0), document.removeEventListener("keydown", u, !0);
710
+ function h() {
711
+ n && (n = !1, t.style.display = "none", t.classList.remove("cal-animate-slide-up")), document.removeEventListener("click", l, !0), document.removeEventListener("keydown", g, !0);
656
712
  }
657
- return { panel: t, open: r, close: o, destroy: m, get isOpen() {
713
+ return { panel: t, open: i, close: o, destroy: h, get isOpen() {
658
714
  return n;
659
715
  } };
660
716
  }
661
- const Ee = `
717
+ const Ce = `
662
718
  .cal-popover-wrapper {
663
719
  position: relative;
664
720
  display: inline-block;
@@ -703,124 +759,137 @@ const Ee = `
703
759
  display: flex;
704
760
  color: hsl(var(--cal-fg-muted));
705
761
  }
706
- `, ee = {
762
+ `, ae = {
707
763
  blue: { bg: "var(--cal-booking-blue-bg)", fg: "var(--cal-booking-blue-fg)", hover: "var(--cal-booking-blue-hover)" },
708
764
  green: { bg: "var(--cal-booking-green-bg)", fg: "var(--cal-booking-green-fg)", hover: "var(--cal-booking-green-hover)" },
709
765
  red: { bg: "var(--cal-booking-red-bg)", fg: "var(--cal-booking-red-fg)", hover: "var(--cal-booking-red-hover)" },
710
766
  orange: { bg: "var(--cal-booking-orange-bg)", fg: "var(--cal-booking-orange-fg)", hover: "var(--cal-booking-orange-hover)" },
711
767
  gray: { bg: "var(--cal-booking-gray-bg)", fg: "var(--cal-booking-gray-fg)", hover: "var(--cal-booking-gray-hover)" }
712
- }, z = "blue";
713
- function P(s) {
714
- return ee[s] || ee[z];
768
+ }, Y = "blue";
769
+ function F(s, e) {
770
+ return e && e[s] ? e[s] : ae[s] || ae[Y];
715
771
  }
716
- function De(s, e = [], a = {}, t = null) {
717
- const n = e.find((b) => b.end === s), i = e.find((b) => b.start === s), r = e.find(
718
- (b) => b.start < s && b.end > s
772
+ function Te(s) {
773
+ if (!Array.isArray(s) || !s.length) return null;
774
+ const e = {};
775
+ for (const a of s)
776
+ !a.name || !a.bg || !a.fg || (e[a.name] = {
777
+ bg: a.bg,
778
+ fg: a.fg,
779
+ hover: a.hover || a.bg
780
+ });
781
+ return Object.keys(e).length ? e : null;
782
+ }
783
+ function Ae(s, e = [], a = {}, t = null, n = null) {
784
+ const r = e.find((f) => f.end === s), i = e.find((f) => f.start === s), o = e.find(
785
+ (f) => f.start < s && f.end > s
719
786
  );
720
- let o = "available", l = null, u = !1, m = null, g = null, c = null;
721
- n && i ? (o = "half-day", u = !0, m = P(n.color || z), g = P(i.color || z)) : r ? (o = "booked", c = P(r.color || z)) : i && !n ? (o = "checkin-only", g = P(i.color || z)) : n && !i && (o = "checkout-only", m = P(n.color || z));
722
- const d = a[s];
723
- if (d && (d.status && (o = d.status), d.label !== void 0 && (l = d.label)), t) {
724
- const b = t(s);
725
- b && (b.status && (o = b.status), b.label !== void 0 && (l = b.label));
726
- }
727
- return { status: o, label: l, checkoutBooking: n, checkinBooking: i, halfDay: u, colorOut: m, colorIn: g, colorFull: c };
787
+ let l = "available", g = null, h = !1, d = null, c = null, u = null;
788
+ r && i ? (l = "half-day", h = !0, d = F(r.color || Y, n), c = F(i.color || Y, n)) : o ? (l = "booked", u = F(o.color || Y, n)) : i && !r ? (l = "checkin-only", c = F(i.color || Y, n)) : r && !i && (l = "checkout-only", d = F(r.color || Y, n));
789
+ const m = a[s];
790
+ if (m && (m.status && (l = m.status), m.label !== void 0 && (g = m.label)), t) {
791
+ const f = t(s);
792
+ f && (f.status && (l = f.status), f.label !== void 0 && (g = f.label));
793
+ }
794
+ return { status: l, label: g, checkoutBooking: r, checkinBooking: i, halfDay: h, colorOut: d, colorIn: c, colorFull: u };
728
795
  }
729
- function ie(s, e, a = []) {
796
+ function le(s, e, a = []) {
730
797
  if (!s || !e) return !0;
731
798
  const t = s < e ? s : e, n = s < e ? e : s;
732
- for (const i of a)
733
- if (t < i.end && n > i.start)
799
+ for (const r of a)
800
+ if (t < r.end && n > r.start)
734
801
  return !1;
735
802
  return !0;
736
803
  }
737
- function Me(s, e, a = []) {
738
- return !s || !e ? !1 : !ie(s, e, a);
804
+ function Pe(s, e, a = []) {
805
+ return !s || !e ? !1 : !le(s, e, a);
739
806
  }
740
- function Ce(s) {
807
+ function $e(s) {
741
808
  const {
742
809
  year: e,
743
810
  month: a,
744
811
  firstDay: t = 0,
745
812
  selectedDates: n = [],
746
- rangeStart: i,
747
- rangeEnd: r,
813
+ rangeStart: r,
814
+ rangeEnd: i,
748
815
  hoverDate: o,
749
816
  minDate: l,
750
- maxDate: u,
751
- disabledDates: m = [],
752
- mode: g = "single",
817
+ maxDate: g,
818
+ disabledDates: h = [],
819
+ mode: d = "single",
753
820
  focusedDate: c,
754
- onSelect: d,
755
- onHover: b,
821
+ onSelect: u,
822
+ onHover: m,
756
823
  // Booking-specific params
757
- bookings: E = null,
758
- dayData: v = null,
759
- labelFormula: x = null,
760
- showLabelsOnHover: q = !1
761
- } = s, y = E !== null, _ = document.createElement("div");
762
- _.setAttribute("role", "grid"), _.classList.add("cal-grid");
763
- const S = document.createElement("div");
764
- S.setAttribute("role", "row"), S.classList.add("cal-weekdays");
765
- for (const w of ge(t)) {
824
+ bookings: f = null,
825
+ dayData: E = null,
826
+ labelFormula: P = null,
827
+ showLabelsOnHover: w = !1,
828
+ locale: v,
829
+ customColors: M = null
830
+ } = s, k = f !== null, $ = document.createElement("div");
831
+ $.setAttribute("role", "grid"), $.classList.add("cal-grid");
832
+ const I = document.createElement("div");
833
+ I.setAttribute("role", "row"), I.classList.add("cal-weekdays");
834
+ for (const x of fe(t, v)) {
766
835
  const C = document.createElement("div");
767
- C.setAttribute("role", "columnheader"), C.setAttribute("aria-label", w), C.classList.add("cal-weekday"), C.textContent = w, S.appendChild(C);
768
- }
769
- _.appendChild(S);
770
- const re = me(e, a, t), G = g === "range" && i && !r && o || y && i && !r && o ? o : r, oe = y ? Me(i, o, E) : !1;
771
- let $;
772
- return re.forEach((w, C) => {
773
- C % 7 === 0 && ($ = document.createElement("div"), $.setAttribute("role", "row"), $.classList.add("cal-row"), _.appendChild($));
774
- const h = document.createElement("button");
775
- h.setAttribute("role", "gridcell"), h.setAttribute("part", "day"), h.classList.add("cal-day");
776
- const p = w.dateString;
777
- h.dataset.date = p;
778
- const le = new Date(w.year, w.month, w.day);
779
- h.setAttribute("aria-label", le.toLocaleDateString("en-US", {
836
+ C.setAttribute("role", "columnheader"), C.setAttribute("aria-label", x), C.classList.add("cal-weekday"), C.textContent = x, I.appendChild(C);
837
+ }
838
+ $.appendChild(I);
839
+ const ce = ye(e, a, t), K = d === "range" && r && !i && o || k && r && !i && o ? o : i, de = k ? Pe(r, o, f) : !1;
840
+ let B;
841
+ return ce.forEach((x, C) => {
842
+ C % 7 === 0 && (B = document.createElement("div"), B.setAttribute("role", "row"), B.classList.add("cal-row"), $.appendChild(B));
843
+ const b = document.createElement("button");
844
+ b.setAttribute("role", "gridcell"), b.setAttribute("part", "day"), b.classList.add("cal-day");
845
+ const p = x.dateString;
846
+ b.dataset.date = p;
847
+ const ue = new Date(x.year, x.month, x.day);
848
+ b.setAttribute("aria-label", ue.toLocaleDateString("en-US", {
780
849
  weekday: "long",
781
850
  year: "numeric",
782
851
  month: "long",
783
852
  day: "numeric"
784
- })), w.isCurrentMonth || h.classList.add("cal-day--outside"), w.isToday && h.classList.add("cal-day--today");
785
- let k = null, O = !1;
786
- if (y) {
787
- k = De(p, E, v || {}, x);
788
- const { status: f, label: L, halfDay: F, colorOut: R, colorIn: I, colorFull: H } = k;
789
- if (f === "booked" && (h.classList.add("cal-day--booked"), H && (h.style.setProperty("--booking-bg", `hsl(${H.bg})`), h.style.setProperty("--booking-fg", `hsl(${H.fg})`), h.style.setProperty("--booking-hover", `hsl(${H.hover})`)), O = !0), f === "blocked" && (h.classList.add("cal-day--blocked"), O = !0), F && (h.classList.add("cal-day--half-day"), R && h.style.setProperty("--half-day-color-out", `hsl(${R.bg})`), I && h.style.setProperty("--half-day-color-in", `hsl(${I.bg})`), O = !0), f === "checkout-only" && (h.classList.add("cal-day--checkout-only"), R && h.style.setProperty("--half-day-color-out", `hsl(${R.bg})`)), f === "checkin-only" && (h.classList.add("cal-day--checkin-only"), I && h.style.setProperty("--half-day-color-in", `hsl(${I.bg})`)), q) {
790
- let D = null;
791
- if (F && k.checkoutBooking && k.checkinBooking)
792
- D = `${k.checkoutBooking.label || ""} / ${k.checkinBooking.label || ""}`;
793
- else if (f === "booked") {
794
- const j = E.find((W) => W.start <= p && W.end > p);
795
- j && (D = j.label);
796
- } else f === "checkout-only" && k.checkoutBooking ? D = k.checkoutBooking.label : f === "checkin-only" && k.checkinBooking && (D = k.checkinBooking.label);
797
- D && h.setAttribute("data-booking-label", D);
853
+ })), x.isCurrentMonth || b.classList.add("cal-day--outside"), x.isToday && b.classList.add("cal-day--today");
854
+ let _ = null, R = !1;
855
+ if (k) {
856
+ _ = Ae(p, f, E || {}, P, M);
857
+ const { status: y, label: S, halfDay: j, colorOut: H, colorIn: N, colorFull: G } = _;
858
+ if (y === "booked" && (b.classList.add("cal-day--booked"), G && (b.style.setProperty("--booking-bg", `hsl(${G.bg})`), b.style.setProperty("--booking-fg", `hsl(${G.fg})`), b.style.setProperty("--booking-hover", `hsl(${G.hover})`)), R = !0), y === "blocked" && (b.classList.add("cal-day--blocked"), R = !0), j && (b.classList.add("cal-day--half-day"), H && b.style.setProperty("--half-day-color-out", `hsl(${H.bg})`), N && b.style.setProperty("--half-day-color-in", `hsl(${N.bg})`), R = !0), y === "checkout-only" && (b.classList.add("cal-day--checkout-only"), H && b.style.setProperty("--half-day-color-out", `hsl(${H.bg})`)), y === "checkin-only" && (b.classList.add("cal-day--checkin-only"), N && b.style.setProperty("--half-day-color-in", `hsl(${N.bg})`)), w) {
859
+ let L = null;
860
+ if (j && _.checkoutBooking && _.checkinBooking)
861
+ L = `${_.checkoutBooking.label || ""} / ${_.checkinBooking.label || ""}`;
862
+ else if (y === "booked") {
863
+ const J = f.find((V) => V.start <= p && V.end > p);
864
+ J && (L = J.label);
865
+ } else y === "checkout-only" && _.checkoutBooking ? L = _.checkoutBooking.label : y === "checkin-only" && _.checkinBooking && (L = _.checkinBooking.label);
866
+ L && b.setAttribute("data-booking-label", L);
798
867
  }
799
- if (oe && i && !r && o) {
800
- const D = i < o ? i : o, j = i < o ? o : i;
801
- p >= D && p <= j && h.classList.add("cal-day--invalid-range");
868
+ if (de && r && !i && o) {
869
+ const L = r < o ? r : o, J = r < o ? o : r;
870
+ p >= L && p <= J && b.classList.add("cal-day--invalid-range");
802
871
  }
803
872
  }
804
- if (y ? i && r && (Y(p, i) || Y(p, r)) ? (h.classList.add("cal-day--selected"), h.setAttribute("aria-selected", "true")) : h.setAttribute("aria-selected", "false") : n.some((L) => Y(L, p)) ? (h.classList.add("cal-day--selected"), h.setAttribute("aria-selected", "true")) : h.setAttribute("aria-selected", "false"), (g === "range" || y) && i && G) {
805
- const f = Y(p, i), L = Y(p, G), F = be(p, i, G);
806
- f && h.classList.add("cal-day--range-start"), L && h.classList.add("cal-day--range-end"), F && !f && !L && h.classList.add("cal-day--in-range");
873
+ if (k ? r && i && (z(p, r) || z(p, i)) ? (b.classList.add("cal-day--selected"), b.setAttribute("aria-selected", "true")) : b.setAttribute("aria-selected", "false") : n.some((S) => z(S, p)) ? (b.classList.add("cal-day--selected"), b.setAttribute("aria-selected", "true")) : b.setAttribute("aria-selected", "false"), (d === "range" || k) && r && K) {
874
+ const y = z(p, r), S = z(p, K), j = ve(p, r, K);
875
+ y && b.classList.add("cal-day--range-start"), S && b.classList.add("cal-day--range-end"), j && !y && !S && b.classList.add("cal-day--in-range");
807
876
  }
808
- const U = Te(p, l, u, m) || O;
809
- if (U && (h.classList.add("cal-day--disabled"), h.disabled = !0, h.setAttribute("aria-disabled", "true")), c && Y(p, c) ? h.setAttribute("tabindex", "0") : h.setAttribute("tabindex", "-1"), y && k && k.label != null) {
810
- h.classList.add("cal-day--with-label");
811
- const f = document.createElement("span");
812
- f.classList.add("cal-day__number"), f.textContent = w.day, h.appendChild(f);
813
- const L = document.createElement("span");
814
- L.classList.add("cal-day__label"), L.textContent = k.label, h.appendChild(L);
877
+ const W = ze(p, l, g, h) || R;
878
+ if (W && (b.classList.add("cal-day--disabled"), b.disabled = !0, b.setAttribute("aria-disabled", "true")), c && z(p, c) ? b.setAttribute("tabindex", "0") : b.setAttribute("tabindex", "-1"), k && _ && _.label != null) {
879
+ b.classList.add("cal-day--with-label");
880
+ const y = document.createElement("span");
881
+ y.classList.add("cal-day__number"), y.textContent = x.day, b.appendChild(y);
882
+ const S = document.createElement("span");
883
+ S.classList.add("cal-day__label"), S.textContent = _.label, b.appendChild(S);
815
884
  } else
816
- h.textContent = w.day;
817
- U ? y && h.addEventListener("mouseenter", () => b == null ? void 0 : b(p)) : (h.addEventListener("click", () => d == null ? void 0 : d(p)), h.addEventListener("mouseenter", () => b == null ? void 0 : b(p))), $.appendChild(h);
818
- }), _.addEventListener("mouseleave", () => b == null ? void 0 : b(null)), _;
885
+ b.textContent = x.day;
886
+ W ? k && b.addEventListener("mouseenter", () => m == null ? void 0 : m(p)) : (b.addEventListener("click", () => u == null ? void 0 : u(p)), b.addEventListener("mouseenter", () => m == null ? void 0 : m(p))), B.appendChild(b);
887
+ }), $.addEventListener("mouseleave", () => m == null ? void 0 : m(null)), $;
819
888
  }
820
- function Te(s, e, a, t) {
889
+ function ze(s, e, a, t) {
821
890
  return !!(t.includes(s) || e && s < e || a && s > a);
822
891
  }
823
- const Ae = `
892
+ const Ye = `
824
893
  .cal-grid {
825
894
  display: flex;
826
895
  flex-direction: column;
@@ -1079,47 +1148,47 @@ const Ae = `
1079
1148
  z-index: 10;
1080
1149
  }
1081
1150
  `;
1082
- function Ye(s) {
1151
+ function Be(s) {
1083
1152
  const {
1084
1153
  slots: e = [],
1085
1154
  mode: a = "single",
1086
1155
  format: t = "24h",
1087
1156
  selected: n,
1088
- hoverTime: i,
1089
- rangeStart: r,
1157
+ hoverTime: r,
1158
+ rangeStart: i,
1090
1159
  unavailableTimes: o = [],
1091
1160
  onSelect: l,
1092
- onHover: u,
1093
- durationLabels: m = !1
1094
- } = s, g = document.createElement("div");
1095
- g.classList.add("cal-time-grid"), m && g.classList.add("cal-time-grid--duration"), g.setAttribute("role", "listbox"), a === "multi" && g.setAttribute("aria-multiselectable", "true");
1161
+ onHover: g,
1162
+ durationLabels: h = !1
1163
+ } = s, d = document.createElement("div");
1164
+ d.classList.add("cal-time-grid"), h && d.classList.add("cal-time-grid--duration"), d.setAttribute("role", "listbox"), a === "multi" && d.setAttribute("aria-multiselectable", "true");
1096
1165
  for (const c of e) {
1097
- const d = document.createElement("button");
1098
- d.classList.add("cal-time-slot"), d.setAttribute("role", "option"), d.dataset.time = c.time;
1099
- const b = N(c.time), E = c.displayText ? c.displayText : b ? K(b.hours, b.minutes, t) : c.time, v = document.createElement("span");
1100
- if (v.classList.add("cal-time-slot__time"), v.textContent = E, d.appendChild(v), c.label) {
1101
- const y = document.createElement("span");
1102
- y.classList.add("cal-time-slot__label"), y.textContent = c.label, d.appendChild(y);
1166
+ const u = document.createElement("button");
1167
+ u.classList.add("cal-time-slot"), u.setAttribute("role", "option"), u.dataset.time = c.time;
1168
+ const m = U(c.time), f = c.displayText ? c.displayText : m ? X(m.hours, m.minutes, t) : c.time, E = document.createElement("span");
1169
+ if (E.classList.add("cal-time-slot__time"), E.textContent = f, u.appendChild(E), c.label) {
1170
+ const v = document.createElement("span");
1171
+ v.classList.add("cal-time-slot__label"), v.textContent = c.label, u.appendChild(v);
1103
1172
  }
1104
- const x = c.available === !1 || o.includes(c.time);
1105
- if (x && (d.classList.add("cal-time-slot--unavailable"), d.disabled = !0, d.setAttribute("aria-disabled", "true")), ze(c.time, n, a) ? (d.classList.add("cal-time-slot--selected"), d.setAttribute("aria-selected", "true")) : d.setAttribute("aria-selected", "false"), a === "range" && r && !$e(n) && i) {
1106
- const y = Q(c.time, r, i), _ = c.time === r, S = c.time === i;
1107
- y && !_ && !S && d.classList.add("cal-time-slot--in-range"), _ && d.classList.add("cal-time-slot--range-start"), S && d.classList.add("cal-time-slot--range-end");
1173
+ const P = c.available === !1 || o.includes(c.time);
1174
+ if (P && (u.classList.add("cal-time-slot--unavailable"), u.disabled = !0, u.setAttribute("aria-disabled", "true")), Fe(c.time, n, a) ? (u.classList.add("cal-time-slot--selected"), u.setAttribute("aria-selected", "true")) : u.setAttribute("aria-selected", "false"), a === "range" && i && !Oe(n) && r) {
1175
+ const v = ee(c.time, i, r), M = c.time === i, k = c.time === r;
1176
+ v && !M && !k && u.classList.add("cal-time-slot--in-range"), M && u.classList.add("cal-time-slot--range-start"), k && u.classList.add("cal-time-slot--range-end");
1108
1177
  } else if (a === "range" && n && typeof n == "object" && n.start && n.end) {
1109
- const y = Q(c.time, n.start, n.end), _ = c.time === n.start, S = c.time === n.end;
1110
- _ && d.classList.add("cal-time-slot--range-start", "cal-time-slot--selected"), S && d.classList.add("cal-time-slot--range-end", "cal-time-slot--selected"), y && !_ && !S && d.classList.add("cal-time-slot--in-range");
1178
+ const v = ee(c.time, n.start, n.end), M = c.time === n.start, k = c.time === n.end;
1179
+ M && u.classList.add("cal-time-slot--range-start", "cal-time-slot--selected"), k && u.classList.add("cal-time-slot--range-end", "cal-time-slot--selected"), v && !M && !k && u.classList.add("cal-time-slot--in-range");
1111
1180
  }
1112
- x || (d.addEventListener("click", () => l == null ? void 0 : l(c.time)), d.addEventListener("mouseenter", () => u == null ? void 0 : u(c.time))), g.appendChild(d);
1181
+ P || (u.addEventListener("click", () => l == null ? void 0 : l(c.time)), u.addEventListener("mouseenter", () => g == null ? void 0 : g(c.time))), d.appendChild(u);
1113
1182
  }
1114
- return g.addEventListener("mouseleave", () => u == null ? void 0 : u(null)), g;
1183
+ return d.addEventListener("mouseleave", () => g == null ? void 0 : g(null)), d;
1115
1184
  }
1116
- function ze(s, e, a) {
1185
+ function Fe(s, e, a) {
1117
1186
  return e ? a === "single" ? e === s : a === "multi" ? Array.isArray(e) && e.includes(s) : a === "range" && typeof e == "object" && e.start && e.end ? e.start === s || e.end === s : !1 : !1;
1118
1187
  }
1119
- function $e(s) {
1188
+ function Oe(s) {
1120
1189
  return s && typeof s == "object" && s.start && s.end;
1121
1190
  }
1122
- const Pe = `
1191
+ const Ie = `
1123
1192
  .cal-time-grid {
1124
1193
  display: grid;
1125
1194
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
@@ -1202,17 +1271,17 @@ const Pe = `
1202
1271
  font-size: 12px;
1203
1272
  }
1204
1273
  `;
1205
- function Be({ columns: s = 3, rows: e = 4, durationLabels: a = !1 } = {}) {
1274
+ function Re({ columns: s = 3, rows: e = 4, durationLabels: a = !1 } = {}) {
1206
1275
  const t = document.createElement("div");
1207
1276
  t.setAttribute("role", "status"), t.setAttribute("aria-label", "Loading..."), t.classList.add("cal-skeleton-time-grid"), a && t.classList.add("cal-skeleton-time-grid--duration");
1208
1277
  const n = s * e;
1209
- for (let i = 0; i < n; i++) {
1210
- const r = document.createElement("div");
1211
- r.classList.add("cal-skeleton"), t.appendChild(r);
1278
+ for (let r = 0; r < n; r++) {
1279
+ const i = document.createElement("div");
1280
+ i.classList.add("cal-skeleton"), t.appendChild(i);
1212
1281
  }
1213
1282
  return t;
1214
1283
  }
1215
- function Oe({ rows: s = 5 } = {}) {
1284
+ function je({ rows: s = 5 } = {}) {
1216
1285
  const e = document.createElement("div");
1217
1286
  e.setAttribute("role", "status"), e.setAttribute("aria-label", "Loading..."), e.classList.add("cal-skeleton-calendar-grid");
1218
1287
  for (let t = 0; t < 7; t++) {
@@ -1226,7 +1295,7 @@ function Oe({ rows: s = 5 } = {}) {
1226
1295
  }
1227
1296
  return e;
1228
1297
  }
1229
- const Fe = `
1298
+ const He = `
1230
1299
  .cal-skeleton-time-grid {
1231
1300
  display: grid;
1232
1301
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
@@ -1259,25 +1328,25 @@ const Fe = `
1259
1328
  aspect-ratio: 1;
1260
1329
  border-radius: var(--cal-radius-sm) !important;
1261
1330
  }
1262
- `, te = {
1331
+ `, ne = {
1263
1332
  error: '<svg width="14" height="14" viewBox="0 0 14 14" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"><circle cx="7" cy="7" r="6"/><path d="M7 4v3M7 9.5v.01"/></svg>',
1264
1333
  warning: '<svg width="14" height="14" viewBox="0 0 14 14" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"><path d="M7 1.5L1 12.5h12L7 1.5zM7 6v2.5M7 10.5v.01"/></svg>',
1265
1334
  info: '<svg width="14" height="14" viewBox="0 0 14 14" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"><circle cx="7" cy="7" r="6"/><path d="M7 6.5V10M7 4.5v.01"/></svg>',
1266
1335
  success: '<svg width="14" height="14" viewBox="0 0 14 14" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"><circle cx="7" cy="7" r="6"/><path d="M4.5 7l2 2L9.5 5"/></svg>'
1267
1336
  };
1268
- function Re({ type: s = "info", message: e, dismissible: a = !0, onDismiss: t }) {
1337
+ function Ne({ type: s = "info", message: e, dismissible: a = !0, onDismiss: t }) {
1269
1338
  const n = document.createElement("div");
1270
1339
  n.classList.add("cal-status", `cal-status--${s}`, "cal-animate-slide-up"), n.setAttribute("role", s === "error" ? "alert" : "status"), n.setAttribute("aria-live", s === "error" ? "assertive" : "polite");
1271
- const i = document.createElement("span");
1272
- i.classList.add("cal-status__icon"), i.innerHTML = te[s] || te.info, n.appendChild(i);
1273
1340
  const r = document.createElement("span");
1274
- if (r.classList.add("cal-status__text"), r.textContent = e, n.appendChild(r), a) {
1341
+ r.classList.add("cal-status__icon"), r.innerHTML = ne[s] || ne.info, n.appendChild(r);
1342
+ const i = document.createElement("span");
1343
+ if (i.classList.add("cal-status__text"), i.textContent = e, n.appendChild(i), a) {
1275
1344
  const o = document.createElement("button");
1276
1345
  o.classList.add("cal-status__close"), o.setAttribute("aria-label", "Dismiss"), o.innerHTML = '<svg width="12" height="12" viewBox="0 0 12 12" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"><path d="M3 3l6 6M9 3l-6 6"/></svg>', o.addEventListener("click", () => t == null ? void 0 : t()), n.appendChild(o);
1277
1346
  }
1278
1347
  return n;
1279
1348
  }
1280
- const Ie = `
1349
+ const Ge = `
1281
1350
  .cal-status {
1282
1351
  display: flex;
1283
1352
  align-items: center;
@@ -1339,7 +1408,7 @@ const Ie = `
1339
1408
  color: hsl(var(--cal-status-success-fg));
1340
1409
  border: 1px solid hsl(var(--cal-status-success-border));
1341
1410
  }
1342
- `, He = '<svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="2" y="3" width="12" height="11" rx="2"/><path d="M5 1v3M11 1v3M2 7h12"/></svg>', je = `
1411
+ `, Je = '<svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="2" y="3" width="12" height="11" rx="2"/><path d="M5 1v3M11 1v3M2 7h12"/></svg>', Ue = `
1343
1412
  .cal-picker {
1344
1413
  background: hsl(var(--cal-bg));
1345
1414
  border-radius: var(--cal-radius);
@@ -1374,9 +1443,9 @@ const Ie = `
1374
1443
  margin-bottom: 8px;
1375
1444
  }
1376
1445
  `;
1377
- class Ne extends ce {
1446
+ class Ke extends ge {
1378
1447
  static get styles() {
1379
- return [ve, ye, ke, Ae, Pe, _e, Se, Ee, Fe, Ie, je];
1448
+ return [we, xe, Se, Ye, Ie, Le, Ee, Ce, He, Ge, Ue];
1380
1449
  }
1381
1450
  static get observedAttributes() {
1382
1451
  return [
@@ -1385,6 +1454,7 @@ class Ne extends ce {
1385
1454
  "min-date",
1386
1455
  "max-date",
1387
1456
  "first-day",
1457
+ "locale",
1388
1458
  "placeholder",
1389
1459
  "dual",
1390
1460
  "show-labels-on-hover",
@@ -1400,14 +1470,14 @@ class Ne extends ce {
1400
1470
  constructor() {
1401
1471
  super();
1402
1472
  const e = /* @__PURE__ */ new Date();
1403
- this._store = de({
1473
+ this._store = he({
1404
1474
  viewYear: e.getFullYear(),
1405
1475
  viewMonth: e.getMonth(),
1406
1476
  rangeStart: null,
1407
1477
  rangeEnd: null,
1408
1478
  hoverDate: null,
1409
1479
  isOpen: !1,
1410
- focusedDate: ae(),
1480
+ focusedDate: re(),
1411
1481
  navDirection: null,
1412
1482
  pickingMonth: !1,
1413
1483
  pickerYear: e.getFullYear(),
@@ -1420,7 +1490,7 @@ class Ne extends ce {
1420
1490
  statusType: null,
1421
1491
  statusMessage: null,
1422
1492
  statusDismissible: !0
1423
- }), this._bookings = [], this._dayData = {}, this._labelFormula = null, this._timeSlots = null, this._popover = null, this._unsubscribe = null, this._rendering = !1;
1493
+ }), this._bookings = [], this._dayData = {}, this._labelFormula = null, this._colors = null, this._customColorMap = null, this._timeSlots = null, this._popover = null, this._unsubscribe = null, this._rendering = !1;
1424
1494
  }
1425
1495
  // -- Attribute getters --
1426
1496
  get display() {
@@ -1438,6 +1508,9 @@ class Ne extends ce {
1438
1508
  get maxDate() {
1439
1509
  return this.getAttribute("max-date") || null;
1440
1510
  }
1511
+ get locale() {
1512
+ return this.getAttribute("locale") || void 0;
1513
+ }
1441
1514
  get showLabelsOnHover() {
1442
1515
  return this.hasAttribute("show-labels-on-hover");
1443
1516
  }
@@ -1490,6 +1563,15 @@ class Ne extends ce {
1490
1563
  set timeSlots(e) {
1491
1564
  this._timeSlots = Array.isArray(e) ? e : null, this._initialized && this.render();
1492
1565
  }
1566
+ get colors() {
1567
+ return this._colors;
1568
+ }
1569
+ set colors(e) {
1570
+ if (this._colors = Array.isArray(e) ? e : null, this._customColorMap = Te(this._colors), this._customColorMap)
1571
+ for (const [a, t] of Object.entries(this._customColorMap))
1572
+ this.style.setProperty(`--cal-booking-${a}-bg`, t.bg), this.style.setProperty(`--cal-booking-${a}-fg`, t.fg), this.style.setProperty(`--cal-booking-${a}-hover`, t.hover);
1573
+ this._initialized && this.render();
1574
+ }
1493
1575
  get value() {
1494
1576
  const e = this._store.getState();
1495
1577
  if (!e.rangeStart || !e.rangeEnd) return null;
@@ -1510,7 +1592,7 @@ class Ne extends ce {
1510
1592
  });
1511
1593
  }
1512
1594
  _navigateToDate(e) {
1513
- const a = M(e);
1595
+ const a = D(e);
1514
1596
  a && this._store.set({ viewYear: a.getFullYear(), viewMonth: a.getMonth() });
1515
1597
  }
1516
1598
  connectedCallback() {
@@ -1547,7 +1629,7 @@ class Ne extends ce {
1547
1629
  });
1548
1630
  else {
1549
1631
  let t = a.rangeStart, n = e;
1550
- if (t > n && ([t, n] = [n, t]), !ie(t, n, this._bookings)) {
1632
+ if (t > n && ([t, n] = [n, t]), !le(t, n, this._bookings)) {
1551
1633
  this.emit("cal:selection-invalid", { start: t, end: n }), this._store.set({
1552
1634
  rangeStart: null,
1553
1635
  rangeEnd: null,
@@ -1592,39 +1674,39 @@ class Ne extends ce {
1592
1674
  }
1593
1675
  // -- Lightweight hover highlight --
1594
1676
  _updateGridHighlight(e) {
1595
- const a = this.$$(".cal-day"), { rangeStart: t, hoverDate: n } = e, i = t && !e.rangeEnd && n ? n : e.rangeEnd;
1596
- let r = !1;
1677
+ const a = this.$$(".cal-day"), { rangeStart: t, hoverDate: n } = e, r = t && !e.rangeEnd && n ? n : e.rangeEnd;
1678
+ let i = !1;
1597
1679
  if (t && !e.rangeEnd && n) {
1598
1680
  const o = t < n ? t : n, l = t < n ? n : t;
1599
- for (const u of this._bookings)
1600
- if (o < u.end && l > u.start) {
1601
- r = !0;
1681
+ for (const g of this._bookings)
1682
+ if (o < g.end && l > g.start) {
1683
+ i = !0;
1602
1684
  break;
1603
1685
  }
1604
1686
  }
1605
1687
  for (const o of a) {
1606
1688
  const l = o.dataset.date;
1607
1689
  if (!l) continue;
1608
- const u = l === t && !!i, m = l === i && !!i;
1609
- let g = !1;
1610
- if (t && i) {
1611
- const d = t < i ? t : i, b = t < i ? i : t;
1612
- g = l >= d && l <= b && !u && !m;
1690
+ const g = l === t && !!r, h = l === r && !!r;
1691
+ let d = !1;
1692
+ if (t && r) {
1693
+ const u = t < r ? t : r, m = t < r ? r : t;
1694
+ d = l >= u && l <= m && !g && !h;
1613
1695
  }
1614
- const c = r && t && !e.rangeEnd && n && (() => {
1615
- const d = t < n ? t : n, b = t < n ? n : t;
1616
- return l >= d && l <= b;
1696
+ const c = i && t && !e.rangeEnd && n && (() => {
1697
+ const u = t < n ? t : n, m = t < n ? n : t;
1698
+ return l >= u && l <= m;
1617
1699
  })();
1618
- o.classList.toggle("cal-day--range-start", u), o.classList.toggle("cal-day--range-end", m), o.classList.toggle("cal-day--in-range", g), o.classList.toggle("cal-day--invalid-range", !!c);
1700
+ o.classList.toggle("cal-day--range-start", g), o.classList.toggle("cal-day--range-end", h), o.classList.toggle("cal-day--in-range", d), o.classList.toggle("cal-day--invalid-range", !!c);
1619
1701
  }
1620
1702
  }
1621
1703
  // -- Navigation --
1622
1704
  _prevMonth() {
1623
- const { viewYear: e, viewMonth: a } = this._store.getState(), { year: t, month: n } = B(e, a, -1);
1705
+ const { viewYear: e, viewMonth: a } = this._store.getState(), { year: t, month: n } = O(e, a, -1);
1624
1706
  this._store.set({ viewYear: t, viewMonth: n, navDirection: "prev" }), this.emit("cal:month-change", { year: t, month: n });
1625
1707
  }
1626
1708
  _nextMonth() {
1627
- const { viewYear: e, viewMonth: a } = this._store.getState(), { year: t, month: n } = B(e, a, 1);
1709
+ const { viewYear: e, viewMonth: a } = this._store.getState(), { year: t, month: n } = O(e, a, 1);
1628
1710
  this._store.set({ viewYear: t, viewMonth: n, navDirection: "next" }), this.emit("cal:month-change", { year: t, month: n });
1629
1711
  }
1630
1712
  // -- Month picker --
@@ -1648,7 +1730,7 @@ class Ne extends ce {
1648
1730
  e.stopPropagation(), this._store.set({ pickingMonth: !1 });
1649
1731
  return;
1650
1732
  }
1651
- const a = this._store.getState(), t = M(a.focusedDate);
1733
+ const a = this._store.getState(), t = D(a.focusedDate);
1652
1734
  if (!t) return;
1653
1735
  let n = null;
1654
1736
  switch (e.key) {
@@ -1676,15 +1758,15 @@ class Ne extends ce {
1676
1758
  }
1677
1759
  if (n) {
1678
1760
  e.preventDefault();
1679
- const i = T(n);
1761
+ const r = T(n);
1680
1762
  n.getMonth() !== a.viewMonth || n.getFullYear() !== a.viewYear ? this._store.set({
1681
1763
  viewYear: n.getFullYear(),
1682
1764
  viewMonth: n.getMonth(),
1683
- focusedDate: i,
1765
+ focusedDate: r,
1684
1766
  navDirection: n > t ? "next" : "prev"
1685
- }) : this._store.set({ focusedDate: i }), requestAnimationFrame(() => {
1686
- const r = this.$(`[data-date="${i}"]`);
1687
- r == null || r.focus();
1767
+ }) : this._store.set({ focusedDate: r }), requestAnimationFrame(() => {
1768
+ const i = this.$(`[data-date="${r}"]`);
1769
+ i == null || i.focus();
1688
1770
  });
1689
1771
  }
1690
1772
  }
@@ -1698,34 +1780,44 @@ class Ne extends ce {
1698
1780
  goToMonth(e, a) {
1699
1781
  this._store.set({ viewYear: a, viewMonth: e });
1700
1782
  }
1783
+ clear() {
1784
+ this._store.set({
1785
+ rangeStart: null,
1786
+ rangeEnd: null,
1787
+ hoverDate: null,
1788
+ startTime: null,
1789
+ endTime: null,
1790
+ timeSelectPhase: null
1791
+ }), this.emit("cal:change", { value: null });
1792
+ }
1701
1793
  // -- Time slots generation --
1702
1794
  _getTimeSlotArray() {
1703
- return this._timeSlots ? this._timeSlots : this.durationLabels ? fe(this.timeStartTime, this.timeEndTime, this.timeInterval, this.timeFormat).map((a) => ({ ...a, available: !0 })) : pe(this.timeStartTime, this.timeEndTime, this.timeInterval).map((a) => ({ time: a, available: !0 }));
1795
+ return this._timeSlots ? this._timeSlots : this.durationLabels ? _e(this.timeStartTime, this.timeEndTime, this.timeInterval, this.timeFormat).map((a) => ({ ...a, available: !0 })) : ke(this.timeStartTime, this.timeEndTime, this.timeInterval).map((a) => ({ time: a, available: !0 }));
1704
1796
  }
1705
1797
  // -- Render --
1706
1798
  _renderCalendarContent() {
1707
1799
  const e = this._store.getState(), a = document.createElement("div");
1708
- if (a.classList.add("cal-picker"), e.statusType && e.statusMessage && a.appendChild(Re({
1800
+ if (a.classList.add("cal-picker"), e.statusType && e.statusMessage && a.appendChild(Ne({
1709
1801
  type: e.statusType,
1710
1802
  message: e.statusMessage,
1711
1803
  dismissible: e.statusDismissible,
1712
1804
  onDismiss: () => this.clearStatus()
1713
1805
  })), this.loading) {
1714
- const r = document.createElement("div");
1715
- r.classList.add("cal-months");
1806
+ const i = document.createElement("div");
1807
+ i.classList.add("cal-months");
1716
1808
  const o = document.createElement("div");
1717
- if (o.classList.add("cal-month"), o.appendChild(Oe()), r.appendChild(o), a.appendChild(r), this.timeSlotsEnabled) {
1809
+ if (o.classList.add("cal-month"), o.appendChild(je()), i.appendChild(o), a.appendChild(i), this.timeSlotsEnabled) {
1718
1810
  const l = document.createElement("div");
1719
- l.classList.add("cal-booking-time-section"), l.appendChild(Be({ durationLabels: this.durationLabels })), a.appendChild(l);
1811
+ l.classList.add("cal-booking-time-section"), l.appendChild(Re({ durationLabels: this.durationLabels })), a.appendChild(l);
1720
1812
  }
1721
1813
  return a.addEventListener("keydown", (l) => this._handleKeydown(l)), a;
1722
1814
  }
1723
1815
  const t = document.createElement("div");
1724
1816
  t.classList.add("cal-months");
1725
- const n = this.hasAttribute("dual"), i = n ? 2 : 1;
1726
- for (let r = 0; r < i; r++) {
1727
- const { year: o, month: l } = r === 0 ? { year: e.viewYear, month: e.viewMonth } : B(e.viewYear, e.viewMonth, 1), u = document.createElement("div");
1728
- if (u.classList.add("cal-month"), r === 0 && u.appendChild(Z({
1817
+ const n = this.hasAttribute("dual"), r = n ? 2 : 1;
1818
+ for (let i = 0; i < r; i++) {
1819
+ const { year: o, month: l } = i === 0 ? { year: e.viewYear, month: e.viewMonth } : O(e.viewYear, e.viewMonth, 1), g = document.createElement("div");
1820
+ if (g.classList.add("cal-month"), i === 0 && g.appendChild(te({
1729
1821
  year: o,
1730
1822
  month: l,
1731
1823
  onPrev: e.pickingMonth ? () => {
@@ -1734,26 +1826,29 @@ class Ne extends ce {
1734
1826
  } : () => {
1735
1827
  n || this._nextMonth();
1736
1828
  },
1737
- onTitleClick: () => this._toggleMonthPicker()
1738
- })), r === 1 && u.appendChild(Z({
1829
+ onTitleClick: () => this._toggleMonthPicker(),
1830
+ locale: this.locale
1831
+ })), i === 1 && g.appendChild(te({
1739
1832
  year: o,
1740
1833
  month: l,
1741
1834
  onPrev: () => {
1742
1835
  },
1743
- onNext: () => this._nextMonth()
1744
- })), e.pickingMonth && r === 0) {
1745
- const m = we({
1836
+ onNext: () => this._nextMonth(),
1837
+ locale: this.locale
1838
+ })), e.pickingMonth && i === 0) {
1839
+ const h = De({
1746
1840
  pickerYear: e.pickerYear,
1747
1841
  viewMonth: e.viewMonth,
1748
1842
  viewYear: e.viewYear,
1749
- onMonthSelect: (g, c) => this._selectMonthFromPicker(g, c),
1843
+ onMonthSelect: (d, c) => this._selectMonthFromPicker(d, c),
1750
1844
  onYearPrev: () => this._store.set({ pickerYear: e.pickerYear - 1 }),
1751
1845
  onYearNext: () => this._store.set({ pickerYear: e.pickerYear + 1 }),
1752
- onClose: () => this._store.set({ pickingMonth: !1 })
1846
+ onClose: () => this._store.set({ pickingMonth: !1 }),
1847
+ locale: this.locale
1753
1848
  });
1754
- u.appendChild(m);
1849
+ g.appendChild(h);
1755
1850
  } else {
1756
- const m = e.navDirection === "next" ? "cal-animate-slide-left" : e.navDirection === "prev" ? "cal-animate-slide-right" : "", g = Ce({
1851
+ const h = e.navDirection === "next" ? "cal-animate-slide-left" : e.navDirection === "prev" ? "cal-animate-slide-right" : "", d = $e({
1757
1852
  year: o,
1758
1853
  month: l,
1759
1854
  firstDay: this.firstDay,
@@ -1770,30 +1865,32 @@ class Ne extends ce {
1770
1865
  bookings: this._bookings,
1771
1866
  dayData: this._dayData,
1772
1867
  labelFormula: this._labelFormula,
1773
- showLabelsOnHover: this.showLabelsOnHover
1868
+ showLabelsOnHover: this.showLabelsOnHover,
1869
+ locale: this.locale,
1870
+ customColors: this._customColorMap
1774
1871
  });
1775
- m && g.classList.add(m), u.appendChild(g);
1872
+ h && d.classList.add(h), g.appendChild(d);
1776
1873
  }
1777
- t.appendChild(u);
1874
+ t.appendChild(g);
1778
1875
  }
1779
1876
  if (a.appendChild(t), this.timeSlotsEnabled && e.timeSelectPhase && !e.pickingMonth) {
1780
- const r = document.createElement("div");
1781
- r.classList.add("cal-booking-time-section");
1877
+ const i = document.createElement("div");
1878
+ i.classList.add("cal-booking-time-section");
1782
1879
  const o = document.createElement("div");
1783
- o.classList.add("cal-booking-time-header"), o.textContent = e.timeSelectPhase === "start" ? "Select check-in time" : "Select check-out time", r.appendChild(o);
1784
- const l = this._getTimeSlotArray(), u = Ye({
1880
+ o.classList.add("cal-booking-time-header"), o.textContent = e.timeSelectPhase === "start" ? "Select check-in time" : "Select check-out time", i.appendChild(o);
1881
+ const l = this._getTimeSlotArray(), g = Be({
1785
1882
  slots: l,
1786
1883
  mode: "single",
1787
1884
  format: this.timeFormat,
1788
1885
  selected: e.timeSelectPhase === "end" ? e.startTime : null,
1789
- onSelect: (m) => this._handleTimeSelect(m),
1886
+ onSelect: (h) => this._handleTimeSelect(h),
1790
1887
  onHover: () => {
1791
1888
  },
1792
1889
  durationLabels: this.durationLabels
1793
1890
  });
1794
- r.appendChild(u), a.appendChild(r);
1891
+ i.appendChild(g), a.appendChild(i);
1795
1892
  }
1796
- return a.addEventListener("keydown", (r) => this._handleKeydown(r)), a;
1893
+ return a.addEventListener("keydown", (i) => this._handleKeydown(i)), a;
1797
1894
  }
1798
1895
  _formatTriggerText() {
1799
1896
  const e = this._store.getState();
@@ -1804,8 +1901,14 @@ class Ne extends ce {
1804
1901
  return null;
1805
1902
  }
1806
1903
  _formatShortDate(e) {
1807
- const a = M(e);
1808
- return a ? `${J[a.getMonth()].slice(0, 3)} ${a.getDate()}, ${a.getFullYear()}` : e;
1904
+ const a = D(e);
1905
+ if (!a) return e;
1906
+ if (this.locale)
1907
+ try {
1908
+ return new Intl.DateTimeFormat(this.locale, { month: "short", day: "numeric", year: "numeric" }).format(a);
1909
+ } catch {
1910
+ }
1911
+ return `${se(this.locale)[a.getMonth()]} ${a.getDate()}, ${a.getFullYear()}`;
1809
1912
  }
1810
1913
  render() {
1811
1914
  var t;
@@ -1817,29 +1920,29 @@ class Ne extends ce {
1817
1920
  if ((t = this._popover) == null || t.destroy(), this._popover = null, this.display === "popover") {
1818
1921
  const n = document.createElement("div");
1819
1922
  n.classList.add("cal-popover-wrapper");
1820
- const i = document.createElement("button");
1821
- i.classList.add("cal-trigger");
1822
- const r = document.createElement("span");
1823
- r.classList.add("cal-trigger__icon"), r.innerHTML = He, i.appendChild(r);
1923
+ const r = document.createElement("button");
1924
+ r.classList.add("cal-trigger");
1925
+ const i = document.createElement("span");
1926
+ i.classList.add("cal-trigger__icon"), i.innerHTML = Je, r.appendChild(i);
1824
1927
  const o = this._formatTriggerText(), l = document.createElement("span");
1825
- o ? l.textContent = o : (l.textContent = this.placeholder, l.classList.add("cal-trigger--placeholder")), i.appendChild(l), n.appendChild(i);
1826
- const u = this._renderCalendarContent(), m = Le({
1827
- trigger: i,
1828
- content: u,
1928
+ o ? l.textContent = o : (l.textContent = this.placeholder, l.classList.add("cal-trigger--placeholder")), r.appendChild(l), n.appendChild(r);
1929
+ const g = this._renderCalendarContent(), h = Me({
1930
+ trigger: r,
1931
+ content: g,
1829
1932
  onClose: () => {
1830
1933
  this._store.set({ isOpen: !1 }), this.emit("cal:close");
1831
1934
  }
1832
1935
  });
1833
- n.appendChild(m.panel), e.appendChild(n), i.addEventListener("click", (g) => {
1834
- g.stopPropagation(), m.isOpen ? this.close() : this.open();
1835
- }), this._popover = m, this._store.get("isOpen") && m.open();
1936
+ n.appendChild(h.panel), e.appendChild(n), r.addEventListener("click", (d) => {
1937
+ d.stopPropagation(), h.isOpen ? this.close() : this.open();
1938
+ }), this._popover = h, this._store.get("isOpen") && h.open();
1836
1939
  } else
1837
1940
  e.appendChild(this._renderCalendarContent());
1838
1941
  this._store.set({ navDirection: null }), this._rendering = !1;
1839
1942
  }
1840
1943
  }
1841
- customElements.get("cal-booking") || customElements.define("cal-booking", Ne);
1944
+ customElements.get("cal-booking") || customElements.define("cal-booking", Ke);
1842
1945
  export {
1843
- Ne as CalBooking
1946
+ Ke as CalBooking
1844
1947
  };
1845
1948
  //# sourceMappingURL=booking.es.js.map