@featherk/composables 0.12.1 → 0.12.3

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,40 +1,40 @@
1
- import { ref as Y, onBeforeUnmount as Ve, nextTick as H, computed as h, watchEffect as Re, toValue as oe, reactive as Ne, watch as se, useId as Oe, unref as Ke, onUnmounted as Fe, shallowRef as Se, shallowReactive as qe, readonly as Q, onMounted as Ce } from "vue";
1
+ import { ref as Y, onBeforeUnmount as Ve, nextTick as H, computed as h, watchEffect as Fe, toValue as re, reactive as Ne, watch as se, useId as Oe, unref as Ke, onUnmounted as Ce, shallowRef as Ae, shallowReactive as qe, readonly as Q, onMounted as Te } from "vue";
2
2
  import { useFocusTrap as Ue } from "@vueuse/integrations/useFocusTrap";
3
3
  const vt = (e, t) => {
4
4
  const r = Y(null);
5
- let g = !1, c = null, f = null;
6
- const k = [], I = ".k-table-row[data-grid-row-index] [tabindex]", F = () => {
5
+ let g = !1, s = null, f = null;
6
+ const A = [], I = ".k-table-row[data-grid-row-index] [tabindex]", F = () => {
7
7
  const u = e?.value?.$el;
8
8
  return u ? u.closest(".k-grid") : null;
9
- }, V = (u) => {
10
- const A = F();
11
- if (!A) return !1;
12
- const v = u.closest(".k-grid-aria-root");
13
- if (v)
14
- return A.contains(v);
15
- const l = u.closest(
9
+ }, N = (u) => {
10
+ const k = F();
11
+ if (!k) return !1;
12
+ const y = u.closest(".k-grid-aria-root");
13
+ if (y)
14
+ return k.contains(y);
15
+ const w = u.closest(
16
16
  ".k-grid-header, .k-grid-content, .k-grid-content-locked"
17
17
  );
18
- return l ? A.contains(l) : !1;
18
+ return w ? k.contains(w) : !1;
19
19
  }, E = (u) => u.key === "Enter" || u.code === "Enter" || u.code === "NumpadEnter", $ = () => e?.value?.columns, x = (u) => {
20
- const A = u.key || u.code;
21
- ([" ", "Spacebar", "Space"].includes(A) || E(u)) && (u.preventDefault(), u.stopPropagation(), r.value = u.target, u.target.click());
20
+ const k = u.key || u.code;
21
+ ([" ", "Spacebar", "Space"].includes(k) || E(u)) && (u.preventDefault(), u.stopPropagation(), r.value = u.target, u.target.click());
22
22
  }, D = (u) => {
23
23
  if (!r.value) return;
24
24
  if (u.code === "Escape") {
25
25
  u.stopPropagation(), r.value && r.value.focus();
26
26
  return;
27
27
  }
28
- const A = Array.from(
28
+ const k = Array.from(
29
29
  document.querySelectorAll(
30
30
  ".k-animation-container .k-popup .k-column-menu .k-columnmenu-item-wrapper .k-columnmenu-item"
31
31
  )
32
- ), v = document.querySelector(
32
+ ), y = document.querySelector(
33
33
  ".k-animation-container .k-popup .k-column-menu .k-filter-menu-container"
34
34
  );
35
- if (v) {
35
+ if (y) {
36
36
  if (u.code === "Tab") {
37
- const l = [
37
+ const w = [
38
38
  // ".k-filter-menu-container .k-dropdownlist[tabindex='0']",
39
39
  // ".k-filter-menu-container input.k-input-inner:not([tabindex='-1']):not([disabled])",
40
40
  // ".k-filter-menu-container button:not([tabindex='-1']):not([disabled])",
@@ -43,86 +43,86 @@ const vt = (e, t) => {
43
43
  "input.k-input-inner:not([tabindex='-1']):not([disabled])",
44
44
  "button:not([tabindex='-1']):not([disabled])",
45
45
  ".k-checkbox"
46
- ], y = t?.focusableMenuSelectors ?? l, S = Array.from(
47
- v.querySelectorAll(y.join(","))
46
+ ], T = t?.focusableMenuSelectors ?? w, l = Array.from(
47
+ y.querySelectorAll(T.join(","))
48
48
  );
49
- if (S.length === 0) return;
50
- const M = S.findIndex(
51
- (K) => K === document.activeElement
49
+ if (l.length === 0) return;
50
+ const p = l.findIndex(
51
+ (U) => U === document.activeElement
52
52
  );
53
- let O;
54
- M === -1 ? O = 0 : u.shiftKey ? O = (M - 1 + S.length) % S.length : O = (M + 1) % S.length, u.preventDefault(), u.stopPropagation(), S[O]?.focus();
53
+ let V;
54
+ p === -1 ? V = 0 : u.shiftKey ? V = (p - 1 + l.length) % l.length : V = (p + 1) % l.length, u.preventDefault(), u.stopPropagation(), l[V]?.focus();
55
55
  }
56
56
  } else if (u.code === "ArrowUp" || u.code === "ArrowDown") {
57
57
  u.preventDefault(), u.stopPropagation();
58
- const l = A.findIndex(
59
- (S) => S === document.activeElement
58
+ const w = k.findIndex(
59
+ (l) => l === document.activeElement
60
60
  );
61
- let y = l;
62
- u.code === "ArrowUp" ? y = l > 0 ? l - 1 : A.length - 1 : u.code === "ArrowDown" && (y = l < A.length - 1 ? l + 1 : 0), A[y]?.focus();
61
+ let T = w;
62
+ u.code === "ArrowUp" ? T = w > 0 ? w - 1 : k.length - 1 : u.code === "ArrowDown" && (T = w < k.length - 1 ? w + 1 : 0), k[T]?.focus();
63
63
  return;
64
64
  }
65
65
  if (u.code === "Tab") {
66
66
  u.preventDefault(), u.stopPropagation();
67
- const l = r.value?.parentElement;
68
- (u.shiftKey ? l?.previousElementSibling : l?.nextElementSibling)?.querySelector(
67
+ const w = r.value?.parentElement;
68
+ (u.shiftKey ? w?.previousElementSibling : w?.nextElementSibling)?.querySelector(
69
69
  "button, [role='button'], .k-link"
70
70
  )?.focus();
71
71
  }
72
- }, T = () => {
73
- c = new MutationObserver((u) => {
74
- u.forEach((A) => {
75
- A.addedNodes.forEach((v) => {
76
- if (v.nodeType === Node.ELEMENT_NODE) {
77
- const l = v;
78
- if (l.classList.contains("k-animation-container")) {
79
- const S = r.value;
80
- S && (S.dataset.featherKSortable === "true" || H(() => {
81
- l.querySelectorAll(
72
+ }, C = () => {
73
+ s = new MutationObserver((u) => {
74
+ u.forEach((k) => {
75
+ k.addedNodes.forEach((y) => {
76
+ if (y.nodeType === Node.ELEMENT_NODE) {
77
+ const w = y;
78
+ if (w.classList.contains("k-animation-container")) {
79
+ const l = r.value;
80
+ l && (l.dataset.featherKSortable === "true" || H(() => {
81
+ w.querySelectorAll(
82
82
  ".k-columnmenu-item-wrapper"
83
- ).forEach((K) => {
84
- K.textContent?.toLowerCase().includes("sort") && K.remove();
83
+ ).forEach((U) => {
84
+ U.textContent?.toLowerCase().includes("sort") && U.remove();
85
85
  });
86
- })), l.addEventListener(
86
+ })), w.addEventListener(
87
87
  "keydown",
88
88
  D
89
89
  ), H(() => {
90
- const M = () => {
91
- const O = Array.from(
92
- l.querySelectorAll(
90
+ const p = () => {
91
+ const V = Array.from(
92
+ w.querySelectorAll(
93
93
  ".k-animation-container .k-popup .k-column-menu .k-columnmenu-item-wrapper .k-columnmenu-item"
94
94
  )
95
95
  );
96
- if (O.length === 1)
97
- O[0].focus(), O[0].click(), M.attempts = 0;
98
- else if (O.length > 1) {
99
- M.attempts = 0;
96
+ if (V.length === 1)
97
+ V[0].focus(), V[0].click(), p.attempts = 0;
98
+ else if (V.length > 1) {
99
+ p.attempts = 0;
100
100
  return;
101
101
  } else
102
- M.attempts === void 0 && (M.attempts = 0), M.attempts++ < 3 && setTimeout(M, 200);
102
+ p.attempts === void 0 && (p.attempts = 0), p.attempts++ < 3 && setTimeout(p, 200);
103
103
  };
104
- M();
104
+ p();
105
105
  });
106
106
  }
107
- l.querySelectorAll(
107
+ w.querySelectorAll(
108
108
  ".k-animation-container"
109
- ).forEach((S) => {
110
- S.addEventListener(
109
+ ).forEach((l) => {
110
+ l.addEventListener(
111
111
  "keydown",
112
112
  D
113
113
  );
114
114
  });
115
115
  }
116
- }), A.removedNodes.forEach((v) => {
117
- if (v.nodeType === Node.ELEMENT_NODE) {
118
- const l = v;
119
- l.classList.contains("k-animation-container") && l.removeEventListener(
116
+ }), k.removedNodes.forEach((y) => {
117
+ if (y.nodeType === Node.ELEMENT_NODE) {
118
+ const w = y;
119
+ w.classList.contains("k-animation-container") && w.removeEventListener(
120
120
  "keydown",
121
121
  D
122
- ), l.querySelectorAll(
122
+ ), w.querySelectorAll(
123
123
  ".k-animation-container"
124
- ).forEach((S) => {
125
- S.removeEventListener(
124
+ ).forEach((l) => {
125
+ l.removeEventListener(
126
126
  "keydown",
127
127
  D
128
128
  );
@@ -130,42 +130,42 @@ const vt = (e, t) => {
130
130
  }
131
131
  });
132
132
  });
133
- }), c.observe(document.body, {
133
+ }), s.observe(document.body, {
134
134
  childList: !0,
135
135
  subtree: !0
136
136
  });
137
- }, s = (u) => {
138
- const A = u.tagName.toLowerCase();
139
- return !!(["input", "textarea", "select", "button"].includes(A) || u.closest(
137
+ }, c = (u) => {
138
+ const k = u.tagName.toLowerCase();
139
+ return !!(["input", "textarea", "select", "button"].includes(k) || u.closest(
140
140
  '.k-picker-wrap, .k-input-inner, .k-textbox, [role="combobox"]'
141
141
  ));
142
142
  }, i = (u) => {
143
143
  if (!u.type || !u)
144
144
  return;
145
- const A = u.target;
146
- if (!A) return;
147
- const v = A.closest(
145
+ const k = u.target;
146
+ if (!k) return;
147
+ const y = k.closest(
148
148
  ".k-table-row[data-grid-row-index]"
149
149
  );
150
- if (!V(A))
150
+ if (!N(k))
151
151
  return;
152
- const l = ["ArrowLeft", "ArrowRight"].includes(
152
+ const w = ["ArrowLeft", "ArrowRight"].includes(
153
153
  u.code
154
154
  );
155
- if (!(s(A) && !(v && l))) {
155
+ if (!(c(k) && !(y && w))) {
156
156
  if (u.code === "Escape") {
157
- const y = document.activeElement?.closest(".k-table-row[data-grid-row-index]");
158
- if (y) {
157
+ const T = document.activeElement?.closest(".k-table-row[data-grid-row-index]");
158
+ if (T) {
159
159
  u.preventDefault(), u.stopPropagation();
160
160
  try {
161
161
  Array.from(
162
162
  e?.value.$el.querySelectorAll(
163
163
  ".k-table-row[data-grid-row-index]"
164
164
  )
165
- ).forEach((M) => M.setAttribute("tabindex", "-1"));
165
+ ).forEach((p) => p.setAttribute("tabindex", "-1"));
166
166
  } catch {
167
167
  }
168
- y.setAttribute("tabindex", "0"), y.focus();
168
+ T.setAttribute("tabindex", "0"), T.focus();
169
169
  return;
170
170
  }
171
171
  }
@@ -178,209 +178,209 @@ const vt = (e, t) => {
178
178
  "NumpadEnter",
179
179
  "Space"
180
180
  ].includes(u.code)) {
181
- if (A.classList.contains("k-grid-header-menu") && A.classList.contains("k-grid-column-menu")) {
182
- r.value = A;
181
+ if (k.classList.contains("k-grid-header-menu") && k.classList.contains("k-grid-column-menu")) {
182
+ r.value = k;
183
183
  return;
184
184
  }
185
- if (v) {
185
+ if (y) {
186
186
  if (["ArrowDown", "ArrowUp"].includes(u.code)) {
187
187
  u.preventDefault(), u.stopPropagation();
188
- const y = (M, O) => {
189
- let K = O === "next" ? M.nextElementSibling : M.previousElementSibling;
190
- for (; K; ) {
191
- const ne = K;
188
+ const T = (p, V) => {
189
+ let U = V === "next" ? p.nextElementSibling : p.previousElementSibling;
190
+ for (; U; ) {
191
+ const ae = U;
192
192
  try {
193
- if (ne.classList.contains("k-table-row"))
194
- return ne;
193
+ if (ae.classList.contains("k-table-row"))
194
+ return ae;
195
195
  } catch {
196
196
  }
197
- K = O === "next" ? K.nextElementSibling : K.previousElementSibling;
197
+ U = V === "next" ? U.nextElementSibling : U.previousElementSibling;
198
198
  }
199
199
  return null;
200
- }, S = u.code === "ArrowDown" ? y(v, "next") : y(v, "previous");
201
- S && (v.setAttribute("tabindex", "-1"), S.setAttribute("tabindex", "0"), S.focus());
200
+ }, l = u.code === "ArrowDown" ? T(y, "next") : T(y, "previous");
201
+ l && (y.setAttribute("tabindex", "-1"), l.setAttribute("tabindex", "0"), l.focus());
202
202
  return;
203
203
  }
204
204
  if (["ArrowLeft", "ArrowRight"].includes(u.code)) {
205
205
  u.preventDefault(), u.stopPropagation();
206
- const y = v.querySelectorAll(
206
+ const T = y.querySelectorAll(
207
207
  I
208
208
  );
209
- if (y.length === 0) return;
210
- let S = Array.from(y).findIndex(
211
- (M) => M === document.activeElement
209
+ if (T.length === 0) return;
210
+ let l = Array.from(T).findIndex(
211
+ (p) => p === document.activeElement
212
212
  );
213
- if (S === -1 && document.activeElement === v) {
214
- y[0].focus();
213
+ if (l === -1 && document.activeElement === y) {
214
+ T[0].focus();
215
215
  return;
216
216
  }
217
- u.code === "ArrowRight" ? S = S === y.length - 1 ? 0 : S + 1 : u.code === "ArrowLeft" && (S = S === 0 ? y.length - 1 : S - 1), y[S].focus();
217
+ u.code === "ArrowRight" ? l = l === T.length - 1 ? 0 : l + 1 : u.code === "ArrowLeft" && (l = l === 0 ? T.length - 1 : l - 1), T[l].focus();
218
218
  return;
219
219
  }
220
220
  }
221
221
  }
222
222
  }
223
- }, p = () => {
223
+ }, m = () => {
224
224
  H(() => {
225
225
  const u = e.value?.$el;
226
226
  if (!u || typeof u.closest != "function") return;
227
- const A = u.closest(".k-grid");
228
- A && A.classList.add("fk-grid");
227
+ const k = u.closest(".k-grid");
228
+ k && k.classList.add("fk-grid");
229
229
  });
230
- }, w = () => {
230
+ }, S = () => {
231
231
  if (!f)
232
232
  try {
233
233
  const u = () => {
234
234
  try {
235
- const l = Array.from(
235
+ const w = Array.from(
236
236
  e.value.$el.querySelectorAll(
237
237
  ".k-table-row[data-grid-row-index]"
238
238
  )
239
239
  );
240
- if (!l || l.length === 0 || l.filter(
241
- (M) => M.getAttribute("tabindex") === "0"
240
+ if (!w || w.length === 0 || w.filter(
241
+ (p) => p.getAttribute("tabindex") === "0"
242
242
  ).length === 1) return;
243
- const S = l.find(
244
- (M) => M === document.activeElement || M.contains(document.activeElement)
243
+ const l = w.find(
244
+ (p) => p === document.activeElement || p.contains(document.activeElement)
245
245
  );
246
- if (l.forEach((M) => M.setAttribute("tabindex", "-1")), S) {
247
- S.setAttribute("tabindex", "0");
246
+ if (w.forEach((p) => p.setAttribute("tabindex", "-1")), l) {
247
+ l.setAttribute("tabindex", "0");
248
248
  return;
249
249
  }
250
- l[0].setAttribute("tabindex", "0");
251
- } catch (l) {
252
- console.error("ensureSingleTabindex error:", l);
250
+ w[0].setAttribute("tabindex", "0");
251
+ } catch (w) {
252
+ console.error("ensureSingleTabindex error:", w);
253
253
  }
254
- }, A = Array.from(
254
+ }, k = Array.from(
255
255
  e.value.$el.querySelectorAll(
256
256
  ".k-table-row[data-grid-row-index]"
257
257
  )
258
258
  );
259
- A.length > 0 && A.forEach((l, y) => {
260
- l.setAttribute("tabindex", y === 0 ? "0" : "-1");
259
+ k.length > 0 && k.forEach((w, T) => {
260
+ w.setAttribute("tabindex", T === 0 ? "0" : "-1");
261
261
  });
262
- const v = e.value.$el.querySelector(".k-table-tbody");
263
- v && (f = new MutationObserver(() => {
262
+ const y = e.value.$el.querySelector(".k-table-tbody");
263
+ y && (f = new MutationObserver(() => {
264
264
  u();
265
- }), f.observe(v, { childList: !0, subtree: !0 }));
265
+ }), f.observe(y, { childList: !0, subtree: !0 }));
266
266
  } catch (u) {
267
267
  console.error("Error setting up row navigation:", u);
268
268
  }
269
269
  }, R = () => {
270
270
  H(() => {
271
- const A = document.querySelectorAll(".k-grid-header .k-grid-header-menu.k-grid-column-menu");
272
- A && A.forEach((v) => {
273
- v.setAttribute("role", "button"), v.addEventListener(
271
+ const k = document.querySelectorAll(".k-grid-header .k-grid-header-menu.k-grid-column-menu");
272
+ k && k.forEach((y) => {
273
+ y.setAttribute("role", "button"), y.addEventListener(
274
274
  "keydown",
275
275
  x
276
276
  );
277
- }), T(), U();
277
+ }), C(), q();
278
278
  });
279
- }, q = () => {
280
- const A = document.querySelectorAll(".k-grid-header .k-grid-header-menu.k-grid-column-menu");
281
- A && A.forEach((v) => {
282
- v.removeEventListener(
279
+ }, K = () => {
280
+ const k = document.querySelectorAll(".k-grid-header .k-grid-header-menu.k-grid-column-menu");
281
+ k && k.forEach((y) => {
282
+ y.removeEventListener(
283
283
  "keydown",
284
284
  x
285
285
  );
286
- }), c && (c.disconnect(), c = null), f && (f.disconnect(), f = null), k.forEach((v) => v()), k.length = 0;
287
- }, U = () => {
286
+ }), s && (s.disconnect(), s = null), f && (f.disconnect(), f = null), A.forEach((y) => y()), A.length = 0;
287
+ }, q = () => {
288
288
  document.querySelectorAll(
289
289
  ".k-grid-header .k-table-thead th"
290
- ).forEach((v, l) => {
291
- if (v.dataset.featherKHeaderBound === "true")
290
+ ).forEach((y, w) => {
291
+ if (y.dataset.featherKHeaderBound === "true")
292
292
  return;
293
- const y = v.querySelector(
293
+ const T = y.querySelector(
294
294
  ".k-grid-header-menu.k-grid-column-menu"
295
295
  );
296
- if (!y) return;
297
- const S = $();
298
- if (S && S[l]) {
299
- const a = S[l].field ?? "";
300
- v.setAttribute("data-feather-k-field", a), v.setAttribute(
296
+ if (!T) return;
297
+ const l = $();
298
+ if (l && l[w]) {
299
+ const a = l[w].field ?? "";
300
+ y.setAttribute("data-feather-k-field", a), y.setAttribute(
301
301
  "data-feather-k-filterable",
302
- S[l].filterable === !1 ? "false" : "true"
303
- ), v.setAttribute(
302
+ l[w].filterable === !1 ? "false" : "true"
303
+ ), y.setAttribute(
304
304
  "data-feather-k-sortable",
305
- S[l].sortable === !1 ? "false" : "true"
305
+ l[w].sortable === !1 ? "false" : "true"
306
306
  );
307
307
  }
308
- const M = v.dataset.featherKFilterable !== "false", O = v.dataset.featherKSortable !== "false";
309
- y.setAttribute("tabindex", "-1"), M || O ? v.style.cursor = "pointer" : v.style.cursor = "default", M ? (v.setAttribute("tabindex", "0"), v.setAttribute("role", "button"), v.setAttribute("aria-haspopup", "menu")) : (v.setAttribute("tabindex", "0"), v.setAttribute("role", "columnheader"), v.removeAttribute("aria-haspopup"));
310
- const K = (a) => {
311
- a.target?.closest(".k-column-resizer") || (r.value = v, y.click());
312
- }, ne = (a) => {
313
- if (M)
314
- r.value = v, a.preventDefault(), a.stopPropagation(), K(a);
315
- else if (O) {
316
- r.value = v;
317
- const b = v.querySelector(".k-link");
308
+ const p = y.dataset.featherKFilterable !== "false", V = y.dataset.featherKSortable !== "false";
309
+ T.setAttribute("tabindex", "-1"), p || V ? y.style.cursor = "pointer" : y.style.cursor = "default", p ? (y.setAttribute("tabindex", "0"), y.setAttribute("role", "button"), y.setAttribute("aria-haspopup", "menu")) : (y.setAttribute("tabindex", "0"), y.setAttribute("role", "columnheader"), y.removeAttribute("aria-haspopup"));
310
+ const U = (a) => {
311
+ a.target?.closest(".k-column-resizer") || (r.value = y, T.click());
312
+ }, ae = (a) => {
313
+ if (p)
314
+ r.value = y, a.preventDefault(), a.stopPropagation(), U(a);
315
+ else if (V) {
316
+ r.value = y;
317
+ const b = y.querySelector(".k-link");
318
318
  b && b.click();
319
319
  }
320
320
  };
321
- v.addEventListener("click", ne), k.push(() => {
322
- v.removeEventListener("click", ne);
321
+ y.addEventListener("click", ae), A.push(() => {
322
+ y.removeEventListener("click", ae);
323
323
  });
324
- const ue = (a) => {
325
- if ((E(a) || a.code === "Space") && (M || O)) {
326
- if (a.preventDefault(), a.stopPropagation(), r.value = v, r.value.focus(), M)
327
- K(a);
328
- else if (O) {
329
- const b = v.querySelector(".k-link");
324
+ const ne = (a) => {
325
+ if ((E(a) || a.code === "Space") && (p || V)) {
326
+ if (a.preventDefault(), a.stopPropagation(), r.value = y, r.value.focus(), p)
327
+ U(a);
328
+ else if (V) {
329
+ const b = y.querySelector(".k-link");
330
330
  b && b.click();
331
331
  }
332
332
  }
333
333
  };
334
- v.addEventListener("keydown", ue, !0), k.push(() => {
335
- v.removeEventListener("keydown", ue, !0);
336
- }), v.dataset.featherKHeaderBound = "true";
334
+ y.addEventListener("keydown", ne, !0), A.push(() => {
335
+ y.removeEventListener("keydown", ne, !0);
336
+ }), y.dataset.featherKHeaderBound = "true";
337
337
  });
338
- const A = document.querySelector(".k-grid-header .k-table-thead");
339
- if (A && A.dataset.featherKHeaderBound !== "true") {
340
- const v = (l) => {
341
- const y = l.target.closest("th");
342
- y && (E(l) || l.code === "Space") && y.dataset.featherKFilterable === "false" && y.dataset.featherKSortable === "false" && (l.preventDefault(), l.stopImmediatePropagation());
338
+ const k = document.querySelector(".k-grid-header .k-table-thead");
339
+ if (k && k.dataset.featherKHeaderBound !== "true") {
340
+ const y = (w) => {
341
+ const T = w.target.closest("th");
342
+ T && (E(w) || w.code === "Space") && T.dataset.featherKFilterable === "false" && T.dataset.featherKSortable === "false" && (w.preventDefault(), w.stopImmediatePropagation());
343
343
  };
344
- A.addEventListener(
344
+ k.addEventListener(
345
345
  "keydown",
346
- v,
346
+ y,
347
347
  !0
348
348
  // NOTE: capture phase
349
- ), k.push(() => {
350
- A.removeEventListener(
349
+ ), A.push(() => {
350
+ k.removeEventListener(
351
351
  "keydown",
352
- v,
352
+ y,
353
353
  !0
354
354
  );
355
- }), A.dataset.featherKHeaderBound = "true";
355
+ }), k.dataset.featherKHeaderBound = "true";
356
356
  }
357
- }, X = function(u, A) {
358
- const v = u?.event?.event.target, l = $();
359
- if (!v || !l) return;
360
- const y = v.classList.contains("k-grid-header-menu"), S = v.classList.contains("k-columnmenu-item"), M = l.find((O) => O.field === u?.event?.field)?.sortable && !0;
361
- if (!y) {
362
- if (S && !M) {
357
+ }, X = function(u, k) {
358
+ const y = u?.event?.event.target, w = $();
359
+ if (!y || !w) return;
360
+ const T = y.classList.contains("k-grid-header-menu"), l = y.classList.contains("k-columnmenu-item"), p = w.find((V) => V.field === u?.event?.field)?.sortable && !0;
361
+ if (!T) {
362
+ if (l && !p) {
363
363
  u?.event?.sort?.filter(
364
- (K) => K.field !== u?.event?.field
364
+ (U) => U.field !== u?.event?.field
365
365
  );
366
366
  return;
367
367
  }
368
- typeof A == "function" && H(() => {
369
- r.value && r.value.focus(), A(u), H(() => {
370
- U();
368
+ typeof k == "function" && H(() => {
369
+ r.value && r.value.focus(), k(u), H(() => {
370
+ q();
371
371
  });
372
372
  });
373
373
  }
374
374
  }, ee = () => {
375
375
  if (!g)
376
376
  try {
377
- p(), w(), R(), g = !0;
377
+ m(), S(), R(), g = !0;
378
378
  } catch (u) {
379
- console.error("initA11y failed:", u), q();
379
+ console.error("initA11y failed:", u), K();
380
380
  }
381
381
  };
382
382
  return Ve(() => {
383
- q();
383
+ K();
384
384
  }), {
385
385
  activeFilterButton: r,
386
386
  handleGridKeyDown: i,
@@ -414,129 +414,129 @@ const vt = (e, t) => {
414
414
  onRowAction: t,
415
415
  gridRef: r,
416
416
  dataItems: g,
417
- ignoreSelectors: c = [],
417
+ ignoreSelectors: s = [],
418
418
  shouldIgnoreTarget: f,
419
- enableKeyboardAction: k = !0
419
+ enableKeyboardAction: A = !0
420
420
  } = e, I = [
421
421
  ...ze,
422
- ...c
423
- ], F = (s, i) => {
424
- if (!s) return !1;
425
- const p = I.join(",");
426
- return s.closest && s.closest(p) ? !0 : f && i ? f(s, i) : !1;
427
- }, V = (s) => {
428
- const p = s?.closest?.(
422
+ ...s
423
+ ], F = (c, i) => {
424
+ if (!c) return !1;
425
+ const m = I.join(",");
426
+ return c.closest && c.closest(m) ? !0 : f && i ? f(c, i) : !1;
427
+ }, N = (c) => {
428
+ const m = c?.closest?.(
429
429
  ".k-table-row[data-grid-row-index]"
430
430
  )?.getAttribute("data-grid-row-index");
431
- if (p == null) return;
432
- const w = parseInt(p, 10);
433
- return Number.isNaN(w) ? void 0 : w;
434
- }, E = (s) => {
435
- if (!s || typeof s.clientX != "number")
431
+ if (m == null) return;
432
+ const S = parseInt(m, 10);
433
+ return Number.isNaN(S) ? void 0 : S;
434
+ }, E = (c) => {
435
+ if (!c || typeof c.clientX != "number")
436
436
  return;
437
- const i = typeof window < "u" && window.scrollX || 0, p = typeof window < "u" && window.scrollY || 0, w = typeof window < "u" && window.screenX || 0, R = typeof window < "u" && window.screenY || 0;
437
+ const i = typeof window < "u" && window.scrollX || 0, m = typeof window < "u" && window.scrollY || 0, S = typeof window < "u" && window.screenX || 0, R = typeof window < "u" && window.screenY || 0;
438
438
  return {
439
- clientX: s.clientX,
440
- clientY: s.clientY,
441
- pageX: typeof s.pageX == "number" ? s.pageX : s.clientX + i,
442
- pageY: typeof s.pageY == "number" ? s.pageY : s.clientY + p,
443
- screenX: typeof s.screenX == "number" ? s.screenX : s.clientX + w,
444
- screenY: typeof s.screenY == "number" ? s.screenY : s.clientY + R
439
+ clientX: c.clientX,
440
+ clientY: c.clientY,
441
+ pageX: typeof c.pageX == "number" ? c.pageX : c.clientX + i,
442
+ pageY: typeof c.pageY == "number" ? c.pageY : c.clientY + m,
443
+ screenX: typeof c.screenX == "number" ? c.screenX : c.clientX + S,
444
+ screenY: typeof c.screenY == "number" ? c.screenY : c.clientY + R
445
445
  };
446
- }, $ = (s) => {
447
- if (!s || typeof s.getBoundingClientRect != "function")
446
+ }, $ = (c) => {
447
+ if (!c || typeof c.getBoundingClientRect != "function")
448
448
  return;
449
- const i = s.getBoundingClientRect();
449
+ const i = c.getBoundingClientRect();
450
450
  if (!i) return;
451
- const p = i.left, w = i.bottom, R = typeof window < "u" && window.scrollX || 0, q = typeof window < "u" && window.scrollY || 0;
451
+ const m = i.left, S = i.bottom, R = typeof window < "u" && window.scrollX || 0, K = typeof window < "u" && window.scrollY || 0;
452
452
  return {
453
- clientX: p,
454
- clientY: w,
455
- pageX: p + R,
456
- pageY: w + q,
457
- screenX: p,
458
- screenY: w
453
+ clientX: m,
454
+ clientY: S,
455
+ pageX: m + R,
456
+ pageY: S + K,
457
+ screenX: m,
458
+ screenY: S
459
459
  };
460
- }, x = (s) => {
460
+ }, x = (c) => {
461
461
  if (typeof window > "u") return !1;
462
462
  const i = window.getSelection();
463
463
  if (!i || i.isCollapsed || !i.toString().trim())
464
464
  return !1;
465
- if (s && i.anchorNode && i.focusNode) {
466
- const p = s.closest(".k-table-row") || s.closest(".k-grid") || s, w = i.anchorNode.nodeType === Node.ELEMENT_NODE ? i.anchorNode : i.anchorNode.parentElement, R = i.focusNode.nodeType === Node.ELEMENT_NODE ? i.focusNode : i.focusNode.parentElement, q = !!(w && p.contains(w)), U = !!(R && p.contains(R));
467
- return q || U;
465
+ if (c && i.anchorNode && i.focusNode) {
466
+ const m = c.closest(".k-table-row") || c.closest(".k-grid") || c, S = i.anchorNode.nodeType === Node.ELEMENT_NODE ? i.anchorNode : i.anchorNode.parentElement, R = i.focusNode.nodeType === Node.ELEMENT_NODE ? i.focusNode : i.focusNode.parentElement, K = !!(S && m.contains(S)), q = !!(R && m.contains(R));
467
+ return K || q;
468
468
  }
469
469
  return !0;
470
470
  };
471
471
  return {
472
- handleRowClick: (s) => {
473
- const i = s?.htmlEvent || s?.event || s?.nativeEvent || (s instanceof Event ? s : void 0);
472
+ handleRowClick: (c) => {
473
+ const i = c?.htmlEvent || c?.event || c?.nativeEvent || (c instanceof Event ? c : void 0);
474
474
  if (i && i.button !== void 0 && i.button !== 0)
475
475
  return;
476
- const p = i?.target || s?.target;
477
- if (p && F(p, i || s) || x(p))
476
+ const m = i?.target || c?.target;
477
+ if (m && F(m, i || c) || x(m))
478
478
  return;
479
- const w = {
480
- dataItem: s.dataItem,
481
- rowIndex: s.rowIndex ?? V(p),
482
- field: s.field,
483
- event: i || s,
479
+ const S = {
480
+ dataItem: c.dataItem,
481
+ rowIndex: c.rowIndex ?? N(m),
482
+ field: c.field,
483
+ event: i || c,
484
484
  triggerType: "click",
485
485
  ctrlKey: !!i?.ctrlKey,
486
486
  shiftKey: !!i?.shiftKey,
487
487
  metaKey: !!i?.metaKey,
488
488
  altKey: !!i?.altKey,
489
- coordinates: E(i) ?? $(p)
489
+ coordinates: E(i) ?? $(m)
490
490
  };
491
- t(s.dataItem, w);
491
+ t(c.dataItem, S);
492
492
  },
493
- handleRowKeyDown: (s, i) => {
494
- if (!k) return;
495
- const p = s.key || s.code;
496
- if (!(p === "Enter" || p === "NumpadEnter" || p === " " || p === "Space" || s.code === "Enter" || s.code === "NumpadEnter" || s.code === "Space")) return;
497
- const R = s.target;
493
+ handleRowKeyDown: (c, i) => {
494
+ if (!A) return;
495
+ const m = c.key || c.code;
496
+ if (!(m === "Enter" || m === "NumpadEnter" || m === " " || m === "Space" || c.code === "Enter" || c.code === "NumpadEnter" || c.code === "Space")) return;
497
+ const R = c.target;
498
498
  if (!R) return;
499
- const q = R.closest(
499
+ const K = R.closest(
500
500
  ".k-table-row[data-grid-row-index], .k-table-row"
501
501
  );
502
- if (!q || F(R, s))
502
+ if (!K || F(R, c))
503
503
  return;
504
- s.preventDefault(), s.stopPropagation();
505
- const U = q.getAttribute("data-grid-row-index"), X = U !== null ? parseInt(U, 10) : void 0;
504
+ c.preventDefault(), c.stopPropagation();
505
+ const q = K.getAttribute("data-grid-row-index"), X = q !== null ? parseInt(q, 10) : void 0;
506
506
  let ee = i;
507
507
  if (ee === void 0) {
508
- const A = (Array.isArray(g) ? g : g?.value) || r?.value?.props?.dataItems || r?.value?.dataItems;
509
- A && X !== void 0 && X >= 0 && X < A.length && (ee = A[X]);
508
+ const k = (Array.isArray(g) ? g : g?.value) || r?.value?.props?.dataItems || r?.value?.dataItems;
509
+ k && X !== void 0 && X >= 0 && X < k.length && (ee = k[X]);
510
510
  }
511
511
  if (ee === void 0) return;
512
512
  const u = {
513
513
  dataItem: ee,
514
514
  rowIndex: X,
515
- event: s,
515
+ event: c,
516
516
  triggerType: "keyboard",
517
- ctrlKey: !!s.ctrlKey,
518
- shiftKey: !!s.shiftKey,
519
- metaKey: !!s.metaKey,
520
- altKey: !!s.altKey,
521
- coordinates: $(q)
517
+ ctrlKey: !!c.ctrlKey,
518
+ shiftKey: !!c.shiftKey,
519
+ metaKey: !!c.metaKey,
520
+ altKey: !!c.altKey,
521
+ coordinates: $(K)
522
522
  };
523
523
  t(ee, u);
524
524
  },
525
525
  isIgnoredTarget: F
526
526
  };
527
- }, He = "Enter a valid ZIP code with exactly 5 or 9 digits.", Te = (e) => {
527
+ }, He = "Enter a valid ZIP code with exactly 5 or 9 digits.", Re = (e) => {
528
528
  const t = e.replace(/\D/g, "").slice(0, 9);
529
529
  return t.length > 5 ? `${t.slice(0, 5)}-${t.slice(5)}` : t;
530
530
  }, Xe = (e, t) => e.slice(0, Math.max(0, t)).replace(/\D/g, "").length, Ze = (e) => e <= 5 ? e : Math.min(e + 1, 10), We = (e) => {
531
- const t = Y(Te(e.initialValue ?? "")), r = Y(!1), g = Y(
531
+ const t = Y(Re(e.initialValue ?? "")), r = Y(!1), g = Y(
532
532
  e.errorMessage?.trim() || He
533
- ), c = h(() => t.value.replace(/\D/g, "")), f = h(() => {
534
- const D = c.value.length;
533
+ ), s = h(() => t.value.replace(/\D/g, "")), f = h(() => {
534
+ const D = s.value.length;
535
535
  return D === 5 || D === 9;
536
- }), k = h(() => r.value && !f.value), I = h(() => !r.value || f.value), F = h(() => r.value), V = (D, T) => {
537
- const s = Ze(T);
536
+ }), A = h(() => r.value && !f.value), I = h(() => !r.value || f.value), F = h(() => r.value), N = (D, C) => {
537
+ const c = Ze(C);
538
538
  H(() => {
539
- D.isConnected && D.setSelectionRange(s, s);
539
+ D.isConnected && D.setSelectionRange(c, c);
540
540
  });
541
541
  };
542
542
  return {
@@ -547,64 +547,64 @@ const vt = (e, t) => {
547
547
  // bindings
548
548
  wrapperClass: "fk-zip-textbox",
549
549
  // derived state
550
- zipRaw: c,
550
+ zipRaw: s,
551
551
  isZipValid: f,
552
- showZipError: k,
552
+ showZipError: A,
553
553
  textBoxValid: I,
554
554
  textBoxValidate: F,
555
555
  // actions
556
556
  handleZipInput: (...D) => {
557
- const T = D[0], i = T?.event?.target, p = T?.value, w = Array.isArray(p) ? p.join("") : String(p ?? ""), R = i?.selectionStart !== void 0 && i.selectionStart !== null ? Xe(
557
+ const C = D[0], i = C?.event?.target, m = C?.value, S = Array.isArray(m) ? m.join("") : String(m ?? ""), R = i?.selectionStart !== void 0 && i.selectionStart !== null ? Xe(
558
558
  i.value,
559
559
  i.selectionStart
560
- ) : w.replace(/\D/g, "").length;
561
- t.value = Te(w), i && V(i, R);
560
+ ) : S.replace(/\D/g, "").length;
561
+ t.value = Re(S), i && N(i, R);
562
562
  },
563
563
  submitAndValidate: (D) => {
564
564
  r.value = !0;
565
- const T = f.value;
566
- return !T && D?.focus && H(() => {
565
+ const C = f.value;
566
+ return !C && D?.focus && H(() => {
567
567
  document.getElementById(
568
568
  e.id
569
569
  )?.focus();
570
- }), T;
570
+ }), C;
571
571
  },
572
- buildPayload: () => ({ zip: c.value })
572
+ buildPayload: () => ({ zip: s.value })
573
573
  };
574
574
  };
575
575
  function _e(e, t) {
576
576
  const r = Y(!1);
577
- Re(() => {
577
+ Fe(() => {
578
578
  e.value?.setAttribute("aria-invalid", String(!t.isValid()));
579
579
  });
580
580
  function g(f) {
581
- const k = e.value ?? f.currentTarget, I = f.relatedTarget;
582
- (!k || !k.contains(I)) && (r.value = !0);
581
+ const A = e.value ?? f.currentTarget, I = f.relatedTarget;
582
+ (!A || !A.contains(I)) && (r.value = !0);
583
583
  }
584
- function c() {
584
+ function s() {
585
585
  r.value = !1;
586
586
  }
587
- return { touched: r, onFocusout: g, reset: c };
587
+ return { touched: r, onFocusout: g, reset: s };
588
588
  }
589
589
  function je(e, t) {
590
- const r = Y(!1), g = Y(!1), c = h(
591
- () => oe(t.submitted) || r.value
592
- ), f = h(() => !c.value || t.isValid()), k = _e(e, {
590
+ const r = Y(!1), g = Y(!1), s = h(
591
+ () => re(t.submitted) || r.value
592
+ ), f = h(() => !s.value || t.isValid()), A = _e(e, {
593
593
  isValid: () => f.value
594
594
  });
595
595
  function I(x) {
596
- return h(() => !c.value || oe(x));
596
+ return h(() => !s.value || re(x));
597
597
  }
598
598
  function F(x) {
599
599
  return Object.fromEntries(
600
- Object.entries(x).map(([D, T]) => [
600
+ Object.entries(x).map(([D, C]) => [
601
601
  D,
602
- I(T)
602
+ I(C)
603
603
  ])
604
604
  );
605
605
  }
606
- function V(x) {
607
- const D = oe(x);
606
+ function N(x) {
607
+ const D = re(x);
608
608
  if (!D) return;
609
609
  D.querySelector(
610
610
  '.k-invalid input, .k-invalid[tabindex="0"]'
@@ -615,19 +615,19 @@ function je(e, t) {
615
615
  g.value = !1;
616
616
  return;
617
617
  }
618
- k.onFocusout(x), k.touched.value && (r.value = !0);
618
+ A.onFocusout(x), A.touched.value && (r.value = !0);
619
619
  }
620
620
  function $() {
621
- r.value = !1, g.value = !0, k.reset();
621
+ r.value = !1, g.value = !0, A.reset();
622
622
  }
623
623
  return {
624
624
  touched: r,
625
- fieldsetValidate: c,
625
+ fieldsetValidate: s,
626
626
  onFocusout: E,
627
627
  reset: $,
628
628
  createFieldValidity: I,
629
629
  createFieldValidationsMap: F,
630
- focusFirstInvalidField: V
630
+ focusFirstInvalidField: N
631
631
  };
632
632
  }
633
633
  const Ge = [
@@ -682,7 +682,7 @@ const Ge = [
682
682
  { label: "Wisconsin", value: "WI" },
683
683
  { label: "Wyoming", value: "WY" }
684
684
  ];
685
- function Ee(e) {
685
+ function Ie(e) {
686
686
  if (e && typeof e == "object" && "value" in e) {
687
687
  const t = e.value;
688
688
  return typeof t == "string" ? t : String(t ?? "");
@@ -699,17 +699,17 @@ function Je() {
699
699
  });
700
700
  return {
701
701
  formData: e,
702
- onAddress1Input: (...k) => {
703
- e.address1 = Ee(k[0]);
702
+ onAddress1Input: (...A) => {
703
+ e.address1 = Ie(A[0]);
704
704
  },
705
- onAddress2Input: (...k) => {
706
- e.address2 = Ee(k[0]);
705
+ onAddress2Input: (...A) => {
706
+ e.address2 = Ie(A[0]);
707
707
  },
708
- onCityInput: (...k) => {
709
- e.city = Ee(k[0]);
708
+ onCityInput: (...A) => {
709
+ e.city = Ie(A[0]);
710
710
  },
711
- onStateChange: (k) => {
712
- e.state = k.value;
711
+ onStateChange: (A) => {
712
+ e.state = A.value;
713
713
  },
714
714
  resetFormData: () => {
715
715
  e.address1 = "", e.address2 = "", e.city = "", e.state = null, e.zip = "";
@@ -719,17 +719,17 @@ function Je() {
719
719
  function Qe(e, t = "zip") {
720
720
  const r = We({ id: t }), {
721
721
  zipDisplay: g,
722
- zipRaw: c,
722
+ zipRaw: s,
723
723
  isZipValid: f,
724
- wrapperClass: k,
724
+ wrapperClass: A,
725
725
  handleZipInput: I
726
726
  } = r;
727
- return se(c, (V) => {
728
- e.zip = V;
727
+ return se(s, (N) => {
728
+ e.zip = N;
729
729
  }), {
730
730
  zipDisplay: g,
731
731
  isZipValid: f,
732
- zipWrapperClass: k,
732
+ zipWrapperClass: A,
733
733
  onZipInput: I,
734
734
  resetZip: () => {
735
735
  g.value = "", e.zip = "";
@@ -739,14 +739,14 @@ function Qe(e, t = "zip") {
739
739
  function et(e) {
740
740
  const t = h(
741
741
  () => e.formData.address1.trim() !== ""
742
- ), r = h(() => e.formData.city.trim() !== ""), g = h(() => !!e.formData.state), c = h(() => oe(e.isZipValid)), f = h(
743
- () => t.value && r.value && g.value && c.value
742
+ ), r = h(() => e.formData.city.trim() !== ""), g = h(() => !!e.formData.state), s = h(() => re(e.isZipValid)), f = h(
743
+ () => t.value && r.value && g.value && s.value
744
744
  );
745
745
  return {
746
746
  strictAddress1Valid: t,
747
747
  strictCityValid: r,
748
748
  strictStateValid: g,
749
- strictZipValid: c,
749
+ strictZipValid: s,
750
750
  strictAddressValid: f
751
751
  };
752
752
  }
@@ -762,77 +762,77 @@ function nt(e, t) {
762
762
  }
763
763
  function ht(e) {
764
764
  const t = Y(
765
- oe(e.fieldsetRef)
765
+ re(e.fieldsetRef)
766
766
  );
767
- Re(() => {
768
- t.value = oe(e.fieldsetRef);
767
+ Fe(() => {
768
+ t.value = re(e.fieldsetRef);
769
769
  });
770
- const r = Y(!1), g = Y(!1), c = h(() => oe(e.required) ?? !0), {
770
+ const r = Y(!1), g = Y(!1), s = h(() => re(e.required) ?? !0), {
771
771
  formData: f,
772
- onAddress1Input: k,
772
+ onAddress1Input: A,
773
773
  onAddress2Input: I,
774
774
  onCityInput: F,
775
- onStateChange: V,
775
+ onStateChange: N,
776
776
  resetFormData: E
777
- } = Je(), $ = `${e.addressId}-zip`, { zipDisplay: x, isZipValid: D, zipWrapperClass: T, onZipInput: s, resetZip: i } = Qe(f, $), {
778
- strictAddress1Valid: p,
779
- strictCityValid: w,
777
+ } = Je(), $ = `${e.addressId}-zip`, { zipDisplay: x, isZipValid: D, zipWrapperClass: C, onZipInput: c, resetZip: i } = Qe(f, $), {
778
+ strictAddress1Valid: m,
779
+ strictCityValid: S,
780
780
  strictStateValid: R,
781
- strictZipValid: q,
782
- strictAddressValid: U
781
+ strictZipValid: K,
782
+ strictAddressValid: q
783
783
  } = et({
784
784
  formData: f,
785
785
  isZipValid: D
786
786
  }), X = je(t, {
787
787
  submitted: r,
788
- isValid: () => U.value
789
- }), { touched: ee, fieldsetValidate: u, onFocusout: A, reset: v } = X, l = X.createFieldValidationsMap({
790
- address1: p,
791
- city: w,
788
+ isValid: () => q.value
789
+ }), { touched: ee, fieldsetValidate: u, onFocusout: k, reset: y } = X, w = X.createFieldValidationsMap({
790
+ address1: m,
791
+ city: S,
792
792
  state: R,
793
- zip: q,
794
- address: U
793
+ zip: K,
794
+ address: q
795
795
  }), {
796
- address1: y,
797
- city: S,
798
- state: M,
799
- zip: O,
800
- address: K
801
- } = l, ne = h(
802
- () => c.value ? u.value : !1
803
- ), ue = h(
804
- () => c.value ? y.value : !0
796
+ address1: T,
797
+ city: l,
798
+ state: p,
799
+ zip: V,
800
+ address: U
801
+ } = w, ae = h(
802
+ () => s.value ? u.value : !1
803
+ ), ne = h(
804
+ () => s.value ? T.value : !0
805
805
  ), a = h(
806
- () => c.value ? S.value : !0
806
+ () => s.value ? l.value : !0
807
807
  ), b = h(
808
- () => c.value ? M.value : !0
808
+ () => s.value ? p.value : !0
809
809
  ), L = h(
810
- () => c.value ? O.value : !0
810
+ () => s.value ? V.value : !0
811
811
  ), Z = h(
812
- () => c.value ? K.value : !0
813
- ), W = { value: null, label: "State" }, j = Ge.map(({ label: m, value: C }) => ({
814
- label: m,
815
- value: C
812
+ () => s.value ? U.value : !0
813
+ ), W = { value: null, label: "State" }, j = Ge.map(({ label: v, value: M }) => ({
814
+ label: v,
815
+ value: M
816
816
  })), n = h(() => ({
817
817
  address1: f.address1.trim(),
818
818
  address2: f.address2.trim(),
819
819
  city: f.city.trim(),
820
820
  state: (f.state ?? "").trim().toUpperCase(),
821
821
  zip: f.zip.replace(/\D/g, "")
822
- })), d = h(() => f.address1.trim() === "" && f.address2.trim() === "" && f.city.trim() === "" && (f.state ?? "").trim() === "" && f.zip.replace(/\D/g, "") === ""), P = h(() => !d.value), B = h(() => !c.value && P.value && (!p.value || !w.value || !R.value)), G = h(() => {
823
- const m = f.zip.replace(/\D/g, "");
824
- return !c.value && P.value && m.length !== 5 && m.length !== 9;
825
- }), te = h(() => !c.value && P.value && !U.value), z = h(() => !c.value && te.value && (g.value || r.value));
822
+ })), d = h(() => f.address1.trim() === "" && f.address2.trim() === "" && f.city.trim() === "" && (f.state ?? "").trim() === "" && f.zip.replace(/\D/g, "") === ""), P = h(() => !d.value), B = h(() => !s.value && P.value && (!m.value || !S.value || !R.value)), G = h(() => {
823
+ const v = f.zip.replace(/\D/g, "");
824
+ return !s.value && P.value && v.length !== 5 && v.length !== 9;
825
+ }), te = h(() => !s.value && P.value && !q.value), z = h(() => !s.value && te.value && (g.value || r.value));
826
826
  return se(n, () => {
827
- c.value || (g.value = !1);
828
- }), se(c, (m) => {
829
- m || (r.value = !1, g.value = !1, v());
827
+ s.value || (g.value = !1);
828
+ }), se(s, (v) => {
829
+ v || (r.value = !1, g.value = !1, y());
830
830
  }), {
831
831
  formData: f,
832
832
  submitted: r,
833
833
  touched: ee,
834
- addressValidate: ne,
835
- address1Valid: ue,
834
+ addressValidate: ae,
835
+ address1Valid: ne,
836
836
  cityValid: a,
837
837
  stateValid: b,
838
838
  zipValid: L,
@@ -844,37 +844,37 @@ function ht(e) {
844
844
  stateDefaultItem: W,
845
845
  stateOptions: j,
846
846
  zipDisplay: x,
847
- zipWrapperClass: T,
848
- onAddress1Input: k,
847
+ zipWrapperClass: C,
848
+ onAddress1Input: A,
849
849
  onAddress2Input: I,
850
850
  onCityInput: F,
851
- onStateChange: V,
852
- onZipInput: s,
853
- onFieldsetFocusout: (m) => {
854
- const C = nt(t.value, m);
855
- A(m), !c.value && C && (g.value = !0);
851
+ onStateChange: N,
852
+ onZipInput: c,
853
+ onFieldsetFocusout: (v) => {
854
+ const M = nt(t.value, v);
855
+ k(v), !s.value && M && (g.value = !0);
856
856
  },
857
857
  normalizedPayload: n,
858
- validateForSubmit: async () => c.value ? (r.value = !0, U.value ? {
858
+ validateForSubmit: async () => s.value ? (r.value = !0, q.value ? {
859
859
  isValid: !0,
860
860
  payload: n.value
861
- } : (await H(), tt(t.value), { isValid: !1, payload: null })) : d.value || U.value ? (r.value = !1, {
861
+ } : (await H(), tt(t.value), { isValid: !1, payload: null })) : d.value || q.value ? (r.value = !1, {
862
862
  isValid: !0,
863
863
  payload: n.value
864
864
  }) : (r.value = !0, { isValid: !1, payload: null }),
865
865
  reset: () => {
866
- r.value = !1, g.value = !1, v(), E(), i();
866
+ r.value = !1, g.value = !1, y(), E(), i();
867
867
  }
868
868
  };
869
869
  }
870
870
  const bt = (e = "fkid") => {
871
871
  const t = `${e}-${Oe()}`;
872
- return { instanceId: t, compose: (...g) => [t, ...g].filter((c) => c != null).map(String).join("-") };
872
+ return { instanceId: t, compose: (...g) => [t, ...g].filter((s) => s != null).map(String).join("-") };
873
873
  }, rt = typeof window < "u" && typeof document < "u";
874
874
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
875
875
  const at = Object.prototype.toString, ot = (e) => at.call(e) === "[object Object]", we = () => {
876
876
  };
877
- function Ie(e) {
877
+ function xe(e) {
878
878
  return Array.isArray(e) ? e : [e];
879
879
  }
880
880
  function lt(e, t, r) {
@@ -886,57 +886,57 @@ function lt(e, t, r) {
886
886
  const Pe = rt ? window : void 0;
887
887
  function he(e) {
888
888
  var t;
889
- const r = oe(e);
889
+ const r = re(e);
890
890
  return (t = r?.$el) !== null && t !== void 0 ? t : r;
891
891
  }
892
- function xe(...e) {
893
- const t = (g, c, f, k) => (g.addEventListener(c, f, k), () => g.removeEventListener(c, f, k)), r = h(() => {
894
- const g = Ie(oe(e[0])).filter((c) => c != null);
895
- return g.every((c) => typeof c != "string") ? g : void 0;
892
+ function Me(...e) {
893
+ const t = (g, s, f, A) => (g.addEventListener(s, f, A), () => g.removeEventListener(s, f, A)), r = h(() => {
894
+ const g = xe(re(e[0])).filter((s) => s != null);
895
+ return g.every((s) => typeof s != "string") ? g : void 0;
896
896
  });
897
897
  return lt(() => {
898
- var g, c;
898
+ var g, s;
899
899
  return [
900
- (g = (c = r.value) === null || c === void 0 ? void 0 : c.map((f) => he(f))) !== null && g !== void 0 ? g : [Pe].filter((f) => f != null),
901
- Ie(oe(r.value ? e[1] : e[0])),
902
- Ie(Ke(r.value ? e[2] : e[1])),
903
- oe(r.value ? e[3] : e[2])
900
+ (g = (s = r.value) === null || s === void 0 ? void 0 : s.map((f) => he(f))) !== null && g !== void 0 ? g : [Pe].filter((f) => f != null),
901
+ xe(re(r.value ? e[1] : e[0])),
902
+ xe(Ke(r.value ? e[2] : e[1])),
903
+ re(r.value ? e[3] : e[2])
904
904
  ];
905
- }, ([g, c, f, k], I, F) => {
906
- if (!g?.length || !c?.length || !f?.length) return;
907
- const V = ot(k) ? { ...k } : k, E = g.flatMap(($) => c.flatMap((x) => f.map((D) => t($, x, D, V))));
905
+ }, ([g, s, f, A], I, F) => {
906
+ if (!g?.length || !s?.length || !f?.length) return;
907
+ const N = ot(A) ? { ...A } : A, E = g.flatMap(($) => s.flatMap((x) => f.map((D) => t($, x, D, N))));
908
908
  F(() => {
909
909
  E.forEach(($) => $());
910
910
  });
911
911
  }, { flush: "post" });
912
912
  }
913
913
  function Le(e, t, r = {}) {
914
- const { window: g = Pe, ignore: c = [], capture: f = !0, detectIframe: k = !1, controls: I = !1 } = r;
914
+ const { window: g = Pe, ignore: s = [], capture: f = !0, detectIframe: A = !1, controls: I = !1 } = r;
915
915
  if (!g) return I ? {
916
916
  stop: we,
917
917
  cancel: we,
918
918
  trigger: we
919
919
  } : we;
920
920
  let F = !0;
921
- const V = (i) => oe(c).some((p) => {
922
- if (typeof p == "string") return Array.from(g.document.querySelectorAll(p)).some((w) => w === i.target || i.composedPath().includes(w));
921
+ const N = (i) => re(s).some((m) => {
922
+ if (typeof m == "string") return Array.from(g.document.querySelectorAll(m)).some((S) => S === i.target || i.composedPath().includes(S));
923
923
  {
924
- const w = he(p);
925
- return w && (i.target === w || i.composedPath().includes(w));
924
+ const S = he(m);
925
+ return S && (i.target === S || i.composedPath().includes(S));
926
926
  }
927
927
  });
928
928
  function E(i) {
929
- const p = oe(i);
930
- return p && p.$.subTree.shapeFlag === 16;
929
+ const m = re(i);
930
+ return m && m.$.subTree.shapeFlag === 16;
931
931
  }
932
- function $(i, p) {
933
- const w = oe(i), R = w.$.subTree && w.$.subTree.children;
934
- return R == null || !Array.isArray(R) ? !1 : R.some((q) => q.el === p.target || p.composedPath().includes(q.el));
932
+ function $(i, m) {
933
+ const S = re(i), R = S.$.subTree && S.$.subTree.children;
934
+ return R == null || !Array.isArray(R) ? !1 : R.some((K) => K.el === m.target || m.composedPath().includes(K.el));
935
935
  }
936
936
  const x = (i) => {
937
- const p = he(e);
938
- if (i.target != null && !(!(p instanceof Element) && E(e) && $(e, i)) && !(!p || p === i.target || i.composedPath().includes(p))) {
939
- if ("detail" in i && i.detail === 0 && (F = !V(i)), !F) {
937
+ const m = he(e);
938
+ if (i.target != null && !(!(m instanceof Element) && E(e) && $(e, i)) && !(!m || m === i.target || i.composedPath().includes(m))) {
939
+ if ("detail" in i && i.detail === 0 && (F = !N(i)), !F) {
940
940
  F = !0;
941
941
  return;
942
942
  }
@@ -944,8 +944,8 @@ function Le(e, t, r = {}) {
944
944
  }
945
945
  };
946
946
  let D = !1;
947
- const T = [
948
- xe(g, "click", (i) => {
947
+ const C = [
948
+ Me(g, "click", (i) => {
949
949
  D || (D = !0, setTimeout(() => {
950
950
  D = !1;
951
951
  }, 0), x(i));
@@ -953,28 +953,28 @@ function Le(e, t, r = {}) {
953
953
  passive: !0,
954
954
  capture: f
955
955
  }),
956
- xe(g, "pointerdown", (i) => {
957
- const p = he(e);
958
- F = !V(i) && !!(p && !i.composedPath().includes(p));
956
+ Me(g, "pointerdown", (i) => {
957
+ const m = he(e);
958
+ F = !N(i) && !!(m && !i.composedPath().includes(m));
959
959
  }, { passive: !0 }),
960
- k && xe(g, "blur", (i) => {
960
+ A && Me(g, "blur", (i) => {
961
961
  setTimeout(() => {
962
- const p = he(e);
963
- let w = g.document.activeElement;
964
- for (; w?.shadowRoot; ) w = w.shadowRoot.activeElement;
965
- w?.tagName === "IFRAME" && !p?.contains(g.document.activeElement) && t(i);
962
+ const m = he(e);
963
+ let S = g.document.activeElement;
964
+ for (; S?.shadowRoot; ) S = S.shadowRoot.activeElement;
965
+ S?.tagName === "IFRAME" && !m?.contains(g.document.activeElement) && t(i);
966
966
  }, 0);
967
967
  }, { passive: !0 })
968
- ].filter(Boolean), s = () => T.forEach((i) => i());
968
+ ].filter(Boolean), c = () => C.forEach((i) => i());
969
969
  return I ? {
970
- stop: s,
970
+ stop: c,
971
971
  cancel: () => {
972
972
  F = !1;
973
973
  },
974
974
  trigger: (i) => {
975
975
  F = !0, x(i), F = !1;
976
976
  }
977
- } : s;
977
+ } : c;
978
978
  }
979
979
  const it = (e) => {
980
980
  let t = null;
@@ -983,17 +983,17 @@ const it = (e) => {
983
983
  };
984
984
  return typeof window < "u" && typeof window.IntersectionObserver == "function" && se(
985
985
  [e.target, () => e.root()],
986
- ([c, f]) => {
987
- r(), c && (t = new IntersectionObserver(
988
- ([k]) => {
989
- k && e.onChange(k);
986
+ ([s, f]) => {
987
+ r(), s && (t = new IntersectionObserver(
988
+ ([A]) => {
989
+ A && e.onChange(A);
990
990
  },
991
991
  { root: f, threshold: e.threshold ?? 1 }
992
- ), t.observe(c));
992
+ ), t.observe(s));
993
993
  },
994
994
  { immediate: !0 }
995
- ), Fe(r), { disconnect: r };
996
- }, st = ".k-table-row", Me = (e) => {
995
+ ), Ce(r), { disconnect: r };
996
+ }, st = ".k-table-row", Se = (e) => {
997
997
  if (e instanceof HTMLElement) return e;
998
998
  const t = e?.$el;
999
999
  return t instanceof HTMLElement ? t : null;
@@ -1004,8 +1004,8 @@ const it = (e) => {
1004
1004
  }, dt = (e) => {
1005
1005
  let t = e.parentElement;
1006
1006
  for (; t; ) {
1007
- const { overflow: r, overflowX: g, overflowY: c } = window.getComputedStyle(t);
1008
- if ([r, g, c].some(
1007
+ const { overflow: r, overflowX: g, overflowY: s } = window.getComputedStyle(t);
1008
+ if ([r, g, s].some(
1009
1009
  (f) => /auto|scroll|overlay/.test(f)
1010
1010
  ))
1011
1011
  return t;
@@ -1013,116 +1013,125 @@ const it = (e) => {
1013
1013
  }
1014
1014
  return null;
1015
1015
  }, wt = (e) => {
1016
- const t = Y(null), r = e.menuItemSelector ?? ".k-menu-item:not(.k-disabled)", g = e.triggerMode, c = e.anchor === !0 ? {} : e.anchor, f = Se(null), k = () => Me(e.triggerRef.value), I = h(() => k()), F = h(
1017
- () => c && c.hideWhenAnchorClipped !== !1 ? I.value : null
1018
- ), V = h(() => {
1016
+ const t = Y(null), r = e.menuItemSelector ?? ".k-menu-item:not(.k-disabled)", g = e.triggerMode, s = e.anchor === !0 ? {} : e.anchor, f = Ae(null), A = () => Se(e.triggerRef.value), I = h(() => A()), F = h(
1017
+ () => s && s.hideWhenAnchorClipped !== !1 ? I.value : null
1018
+ ), N = h(() => {
1019
1019
  const l = f.value;
1020
1020
  return !e.isOpen.value || !l ? { left: 0, top: 0 } : {
1021
1021
  left: l.left + window.scrollX,
1022
1022
  top: l.bottom + window.scrollY
1023
1023
  };
1024
- }), E = () => e.resolveFocusTarget?.() ?? Me(e.focusTargetRef?.value), $ = () => {
1024
+ }), E = () => e.resolveFocusTarget?.() ?? Se(e.focusTargetRef?.value), $ = () => {
1025
1025
  if (g !== "button") return null;
1026
1026
  if (e.escapeFocusTarget) return e.escapeFocusTarget();
1027
1027
  const l = e.escapeFocusContainerSelector ?? st;
1028
- return (k() ?? document.activeElement)?.closest(l) ?? null;
1028
+ return (A() ?? document.activeElement)?.closest(l) ?? null;
1029
1029
  }, x = () => {
1030
1030
  const l = E() ?? $();
1031
1031
  if (l)
1032
1032
  return l.focus(), !0;
1033
- const y = k();
1034
- return y?.focus(), !!y;
1033
+ const p = A();
1034
+ return p?.focus(), !!p;
1035
1035
  }, D = () => {
1036
- Me(e.menuRef.value)?.querySelector(r)?.focus({ preventScroll: !0 });
1037
- }, T = Se(null), s = Se(null);
1036
+ Se(e.menuRef.value)?.querySelector(r)?.focus({ preventScroll: !0 });
1037
+ }, C = Ae(null), c = Ae(null);
1038
1038
  let i = !1;
1039
- const p = () => {
1039
+ const m = () => {
1040
1040
  const l = t.value;
1041
1041
  if (l === "keyboard" || l === "escape") {
1042
- const y = T.value ?? s.value;
1043
- y?.focus(), l === "keyboard" && y && y === s.value && (i = !0);
1044
- } else t.value === "mouse-selection" && s.value?.focus();
1045
- t.value = null, T.value = null, s.value = null;
1046
- }, w = (l) => {
1047
- e.isOpen.value && (t.value = l, T.value = E() ?? (l === "escape" ? $() : null), s.value = k(), U(!1), e.requestHide(), H(p));
1042
+ const p = C.value ?? c.value;
1043
+ p?.focus(), l === "keyboard" && p && p === c.value && (i = !0);
1044
+ } else t.value === "mouse-selection" && c.value?.focus();
1045
+ t.value = null, C.value = null, c.value = null;
1046
+ }, S = (l) => {
1047
+ e.isOpen.value && (t.value = l, C.value = E() ?? (l === "escape" ? $() : null), c.value = A(), X(!1), e.requestHide(), H(m));
1048
1048
  };
1049
1049
  se(
1050
1050
  I,
1051
- (l, y, S) => {
1052
- if (!c || !l) {
1051
+ (l, p, V) => {
1052
+ if (!s || !l) {
1053
1053
  f.value = null;
1054
1054
  return;
1055
1055
  }
1056
- let M = null;
1057
- const O = () => {
1058
- M = null, f.value = c.getRect?.() ?? l.getBoundingClientRect();
1059
- }, K = () => {
1060
- M === null && (M = window.requestAnimationFrame(O));
1061
- }, ne = typeof window.ResizeObserver == "function" ? new window.ResizeObserver(K) : null;
1062
- ne?.observe(l), window.addEventListener("scroll", K, {
1056
+ let U = null;
1057
+ const ae = () => {
1058
+ U = null, f.value = s.getRect?.() ?? l.getBoundingClientRect();
1059
+ }, ne = () => {
1060
+ U === null && (U = window.requestAnimationFrame(ae));
1061
+ }, a = typeof window.ResizeObserver == "function" ? new window.ResizeObserver(ne) : null;
1062
+ a?.observe(l), window.addEventListener("scroll", ne, {
1063
1063
  capture: !0,
1064
1064
  passive: !0
1065
- }), window.addEventListener("resize", K, { passive: !0 }), K(), S(() => {
1066
- M !== null && window.cancelAnimationFrame(M), ne?.disconnect(), window.removeEventListener("scroll", K, !0), window.removeEventListener("resize", K);
1065
+ }), window.addEventListener("resize", ne, { passive: !0 }), ne(), V(() => {
1066
+ U !== null && window.cancelAnimationFrame(U), a?.disconnect(), window.removeEventListener("scroll", ne, !0), window.removeEventListener("resize", ne);
1067
1067
  });
1068
1068
  },
1069
1069
  { immediate: !0, flush: "post" }
1070
1070
  ), it({
1071
1071
  target: F,
1072
- root: () => c?.clipRoot ? oe(c.clipRoot) : I.value ? dt(I.value) : null,
1073
- threshold: 1,
1072
+ root: () => s?.clipRoot ? re(s.clipRoot) : I.value ? dt(I.value) : null,
1073
+ threshold: s?.intersectionThreshold ?? 0.5,
1074
1074
  onChange: (l) => {
1075
- l.isIntersecting || w("anchor-hidden");
1075
+ l.isIntersecting || S("anchor-hidden");
1076
1076
  }
1077
- }), Le(e.menuRef, () => w("outside-click"), {
1077
+ }), Le(e.menuRef, () => S("outside-click"), {
1078
1078
  ignore: [I]
1079
1079
  });
1080
- let R = null;
1080
+ let R = null, K = null;
1081
1081
  const q = () => {
1082
1082
  R?.isConnected && R.setAttribute("aria-expanded", "false"), R = null;
1083
- }, U = (l) => {
1083
+ }, X = (l) => {
1084
1084
  if (e.manageMenuTriggerAria === !1) return;
1085
- const y = I.value;
1086
- if (!y) {
1085
+ const p = I.value;
1086
+ if (!p) {
1087
1087
  R?.isConnected && R.setAttribute("aria-expanded", l ? "true" : "false");
1088
1088
  return;
1089
1089
  }
1090
- if (!ut(y, g)) {
1091
- ct(y, g), q();
1090
+ if (!ut(p, g)) {
1091
+ ct(p, g), q();
1092
1092
  return;
1093
1093
  }
1094
- R && R !== y && q(), y.setAttribute("aria-expanded", l ? "true" : "false"), R = y;
1094
+ R && R !== p && q(), p.setAttribute("aria-expanded", l ? "true" : "false"), R = p;
1095
+ }, ee = () => {
1096
+ const l = Se(e.menuRef.value), p = l?.matches('[role="menubar"]') ? l : l?.querySelector('[role="menubar"]'), V = re(e.menuLabel)?.trim();
1097
+ K && K !== p && K.removeAttribute("aria-label"), p && (V ? p.setAttribute("aria-label", V) : p.removeAttribute("aria-label")), K = p ?? null;
1095
1098
  };
1096
1099
  se(
1097
1100
  [e.isOpen, e.triggerRef],
1098
- ([l]) => U(l),
1101
+ ([l]) => X(l),
1102
+ { immediate: !0, flush: "post" }
1103
+ ), se(
1104
+ [e.isOpen, e.menuRef, () => re(e.menuLabel)],
1105
+ ee,
1099
1106
  { immediate: !0, flush: "post" }
1100
- ), Fe(q), se(
1107
+ ), Ce(() => {
1108
+ q(), K?.removeAttribute("aria-label");
1109
+ }), se(
1101
1110
  e.isOpen,
1102
1111
  (l) => {
1103
1112
  l && D();
1104
1113
  },
1105
1114
  { flush: "post" }
1106
1115
  );
1107
- const X = (...l) => {
1108
- const y = l[0];
1116
+ const u = (...l) => {
1117
+ const p = l[0];
1109
1118
  if (i) {
1110
1119
  i = !1;
1111
1120
  return;
1112
1121
  }
1113
1122
  if (e.isOpen.value) {
1114
- w("trigger-click");
1123
+ S("trigger-click");
1115
1124
  return;
1116
1125
  }
1117
- e.requestShow(y);
1126
+ e.requestShow(p);
1118
1127
  };
1119
1128
  return {
1120
1129
  /**
1121
1130
  * Handles Kendo Menu selection: records keyboard or mouse modality,
1122
1131
  * requests popup close, then runs the optional caller-owned action.
1123
1132
  */
1124
- handleMenuSelect: (l, y) => {
1125
- y?.(l), w(
1133
+ handleMenuSelect: (l, p) => {
1134
+ p?.(l), S(
1126
1135
  l.event?.type?.startsWith("key") ? "keyboard" : "mouse-selection"
1127
1136
  );
1128
1137
  },
@@ -1130,20 +1139,20 @@ const it = (e) => {
1130
1139
  * Toggles the action menu. When opening, focuses the first enabled Kendo
1131
1140
  * Menu item after Vue renders the popup.
1132
1141
  */
1133
- handleActionButtonClick: X,
1142
+ handleActionButtonClick: u,
1134
1143
  /**
1135
1144
  * Handles trigger keyboard input: Enter and Space toggle the menu; Escape
1136
1145
  * closes an open menu or focuses the configured target when already closed.
1137
1146
  */
1138
1147
  handleActionButtonKeydown: (...l) => {
1139
- const y = l[0], S = l[1];
1140
- if (y.key === "Enter" || y.code === "Space") {
1141
- y.preventDefault(), X(S);
1148
+ const p = l[0], V = l[1];
1149
+ if (p.key === "Enter" || p.code === "Space") {
1150
+ p.preventDefault(), u(V);
1142
1151
  return;
1143
1152
  }
1144
- if (y.key === "Escape") {
1145
- if (y.preventDefault(), y.stopPropagation(), e.isOpen.value) {
1146
- w("escape");
1153
+ if (p.key === "Escape") {
1154
+ if (p.preventDefault(), p.stopPropagation(), e.isOpen.value) {
1155
+ S("escape");
1147
1156
  return;
1148
1157
  }
1149
1158
  x();
@@ -1151,7 +1160,7 @@ const it = (e) => {
1151
1160
  },
1152
1161
  /** Closes the open menu through the keyboard path when Escape is pressed inside it. */
1153
1162
  handleActionMenuEscape: (l) => {
1154
- l.preventDefault(), l.stopPropagation(), w("escape");
1163
+ l.preventDefault(), l.stopPropagation(), S("escape");
1155
1164
  },
1156
1165
  /**
1157
1166
  * Restores focus after Kendo Popup closes: keyboard menu selection and
@@ -1160,23 +1169,34 @@ const it = (e) => {
1160
1169
  * outside clicks do not move focus.
1161
1170
  */
1162
1171
  handlePopupClose: () => {
1163
- H(p);
1172
+ H(m);
1164
1173
  },
1165
- offset: V
1174
+ offset: N
1166
1175
  };
1176
+ }, St = () => {
1177
+ const e = /* @__PURE__ */ new Set();
1178
+ return { register: (s) => {
1179
+ e.add(s), Ce(() => e.delete(s));
1180
+ }, deactivateOthers: (s) => {
1181
+ e.forEach((f) => {
1182
+ f !== s && f.deactivate();
1183
+ });
1184
+ }, deactivateAll: () => {
1185
+ e.forEach((s) => s.deactivate());
1186
+ } };
1167
1187
  }, ft = (e) => {
1168
1188
  if (e instanceof HTMLElement) return e;
1169
1189
  const t = e && "$el" in e ? e.$el : null;
1170
1190
  return t instanceof HTMLElement ? t : null;
1171
- }, St = () => {
1191
+ }, At = () => {
1172
1192
  const e = qe(/* @__PURE__ */ new Map()), t = Y(null), r = (I, F) => {
1173
- const V = ft(F);
1174
- V ? e.set(I, V) : e.delete(I);
1175
- }, g = (I) => e.get(I) ?? null, c = (I) => {
1193
+ const N = ft(F);
1194
+ N ? e.set(I, N) : e.delete(I);
1195
+ }, g = (I) => e.get(I) ?? null, s = (I) => {
1176
1196
  t.value = I;
1177
1197
  }, f = () => {
1178
1198
  t.value = null;
1179
- }, k = (I) => t.value === I;
1199
+ }, A = (I) => t.value === I;
1180
1200
  return {
1181
1201
  activeId: Q(t),
1182
1202
  isActive: h(() => t.value !== null),
@@ -1185,22 +1205,22 @@ const it = (e) => {
1185
1205
  ),
1186
1206
  register: r,
1187
1207
  resolve: g,
1188
- activate: c,
1208
+ activate: s,
1189
1209
  deactivate: f,
1190
- isIdActive: k
1210
+ isIdActive: A
1191
1211
  };
1192
1212
  };
1193
1213
  function kt(e) {
1194
- const t = Y(""), r = Y(void 0), g = Y(!!e.debug), c = Y(e.dateFormat ?? "mm/dd/yyyy"), f = h(() => !!e.required), k = 1e3, I = Y(!1), F = ["ArrowUp", "ArrowDown"], V = ["ArrowLeft", "ArrowRight"], E = h(() => (t.value ?? "").replace(/\D/g, "")), $ = (a) => a <= 2 ? "mm" : a <= 5 ? "dd" : E.value.length <= 10 ? "yyyy" : "mm", x = h(() => {
1214
+ const t = Y(""), r = Y(void 0), g = Y(!!e.debug), s = Y(e.dateFormat ?? "mm/dd/yyyy"), f = h(() => !!e.required), A = 1e3, I = Y(!1), F = ["ArrowUp", "ArrowDown"], N = ["ArrowLeft", "ArrowRight"], E = h(() => (t.value ?? "").replace(/\D/g, "")), $ = (a) => a <= 2 ? "mm" : a <= 5 ? "dd" : E.value.length <= 10 ? "yyyy" : "mm", x = h(() => {
1195
1215
  const a = t.value && t.value.substring(0, 2).replace(/\D/g, "0") || "0";
1196
1216
  return parseInt(a).toString().padStart(2, "0");
1197
1217
  }), D = h(() => {
1198
1218
  const a = t.value && t.value.substring(3, 5).replace(/\D/g, "0") || "0";
1199
1219
  return parseInt(a).toString().padStart(2, "0");
1200
- }), T = h(() => {
1220
+ }), C = h(() => {
1201
1221
  const a = t.value && t.value.substring(6, 10).replace(/\D/g, "0") || "0";
1202
1222
  return parseInt(a).toString().padStart(4, "0");
1203
- }), s = (a) => {
1223
+ }), c = (a) => {
1204
1224
  if (E.value.length === 0) {
1205
1225
  e.onChange({ value: null, event: a });
1206
1226
  return;
@@ -1211,7 +1231,7 @@ function kt(e) {
1211
1231
  }
1212
1232
  if ((t.value ?? "").length === 10 && E.value.length === 8) {
1213
1233
  const [b, L, Z] = t.value.split("/"), W = parseInt(b), j = parseInt(L), n = parseInt(Z);
1214
- if (U(n, W, j)) {
1234
+ if (q(n, W, j)) {
1215
1235
  const d = R(n, W, j);
1216
1236
  i(d) ? e.onChange({ value: d, event: a }) : e.onChange({ value: null, event: a });
1217
1237
  } else
@@ -1220,34 +1240,34 @@ function kt(e) {
1220
1240
  }, i = (a) => {
1221
1241
  const b = e.min ?? void 0, L = e.max ?? void 0;
1222
1242
  return !(b && a < b || L && a > L);
1223
- }, p = h(() => {
1243
+ }, m = h(() => {
1224
1244
  if ((t.value ?? "").length === 10 && E.value.length === 8) {
1225
1245
  const [a, b, L] = (t.value ?? "").split("/"), Z = parseInt(a), W = parseInt(b), j = parseInt(L);
1226
- if (U(j, Z, W))
1246
+ if (q(j, Z, W))
1227
1247
  return R(j, Z, W);
1228
1248
  }
1229
1249
  return null;
1230
- }), w = h(() => (t.value ?? "").length === 10 && E.value.length === 8), R = (a, b, L) => {
1250
+ }), S = h(() => (t.value ?? "").length === 10 && E.value.length === 8), R = (a, b, L) => {
1231
1251
  const Z = /* @__PURE__ */ new Date(0);
1232
1252
  return Z.setFullYear(a, b - 1, L), Z.setHours(0, 0, 0, 0), Z;
1233
- }, q = (a, b) => R(a, b + 1, 0).getDate(), U = (a, b, L) => b >= 1 && b <= 12 && a >= k && L >= 1 && L <= q(a, b), X = (a) => {
1253
+ }, K = (a, b) => R(a, b + 1, 0).getDate(), q = (a, b, L) => b >= 1 && b <= 12 && a >= A && L >= 1 && L <= K(a, b), X = (a) => {
1234
1254
  t.value = a.value;
1235
1255
  const b = a.event?.target;
1236
- r.value = b?.selectionStart ?? 0, s(a);
1256
+ r.value = b?.selectionStart ?? 0, c(a);
1237
1257
  }, ee = (a) => {
1238
1258
  r.value = a.target.selectionStart ?? 0;
1239
1259
  }, u = (a, b, L) => {
1240
1260
  const Z = b?.selectionStart ?? r.value ?? 0;
1241
1261
  r.value = Z;
1242
- let W = parseInt(x.value), j = parseInt(D.value), n = parseInt(T.value);
1243
- if (!(E.value.length >= 8) || !U(n, W, j)) {
1262
+ let W = parseInt(x.value), j = parseInt(D.value), n = parseInt(C.value);
1263
+ if (!(E.value.length >= 8) || !q(n, W, j)) {
1244
1264
  const _ = e.defaultValue ?? /* @__PURE__ */ new Date();
1245
1265
  W = _.getMonth() + 1, j = _.getDate(), n = _.getFullYear(), t.value = `${String(W).padStart(2, "0")}/${String(j).padStart(
1246
1266
  2,
1247
1267
  "0"
1248
1268
  )}/${String(n)}`;
1249
1269
  const ce = R(n, W, j);
1250
- e.onChange({ value: i(ce) ? ce : null, event: L }), S({ useRAF: !0 });
1270
+ e.onChange({ value: i(ce) ? ce : null, event: L }), l({ useRAF: !0 });
1251
1271
  return;
1252
1272
  }
1253
1273
  const P = $(Z);
@@ -1269,8 +1289,8 @@ function kt(e) {
1269
1289
  z.toString() !== "Invalid Date" && parseInt(te) >= 1e3 ? e.onChange({
1270
1290
  value: i(z) ? z : null,
1271
1291
  event: L
1272
- }) : e.onChange({ value: null, event: L }), S({ useRAF: !0 });
1273
- }, A = (a) => {
1292
+ }) : e.onChange({ value: null, event: L }), l({ useRAF: !0 });
1293
+ }, k = (a) => {
1274
1294
  if (a.code === "Space" || a.key === " ") {
1275
1295
  a.preventDefault(), a.stopPropagation(), e.onShowCalendar(a);
1276
1296
  return;
@@ -1286,13 +1306,13 @@ function kt(e) {
1286
1306
  u(a.key, b, a);
1287
1307
  return;
1288
1308
  }
1289
- }, v = (a) => {
1309
+ }, y = (a) => {
1290
1310
  a.preventDefault();
1291
1311
  const b = a.deltaY < 0 ? "ArrowUp" : "ArrowDown";
1292
1312
  u(b, a.target, a);
1293
- }, l = (a) => {
1313
+ }, w = (a) => {
1294
1314
  const b = a.target;
1295
- if (V.includes(a.key)) {
1315
+ if (N.includes(a.key)) {
1296
1316
  r.value = b?.selectionStart ?? 0;
1297
1317
  return;
1298
1318
  }
@@ -1300,11 +1320,11 @@ function kt(e) {
1300
1320
  if (a.altKey) return;
1301
1321
  r.value = b?.selectionStart ?? 0;
1302
1322
  }
1303
- }, y = (a) => {
1323
+ }, T = (a) => {
1304
1324
  I.value = !0, f.value && !e.defaultValue && e.externalValue && e.externalValue.value === void 0 && E.value.length === 0 && (e.externalValue.value = "");
1305
1325
  const b = a.target;
1306
1326
  b && (r.value = b.selectionStart ?? 0);
1307
- }, S = (a) => {
1327
+ }, l = (a) => {
1308
1328
  const b = () => {
1309
1329
  const L = document.getElementById(
1310
1330
  e.id
@@ -1335,15 +1355,15 @@ function kt(e) {
1335
1355
  const b = new Date(a);
1336
1356
  if (b.toString() !== "Invalid Date") {
1337
1357
  const L = (b.getMonth() + 1).toString().padStart(2, "0"), Z = b.getDate().toString().padStart(2, "0"), W = b.getFullYear().toString();
1338
- t.value = `${L}/${Z}/${W}`, S({ delay: 50 });
1358
+ t.value = `${L}/${Z}/${W}`, l({ delay: 50 });
1339
1359
  return;
1340
1360
  }
1341
1361
  }
1342
1362
  },
1343
1363
  { immediate: !0 }
1344
1364
  );
1345
- const M = h(() => [
1346
- ["Date", `${x.value} / ${D.value} / ${T.value}`],
1365
+ const p = h(() => [
1366
+ ["Date", `${x.value} / ${D.value} / ${C.value}`],
1347
1367
  ["Digits only", E.value],
1348
1368
  [
1349
1369
  "min",
@@ -1361,33 +1381,33 @@ function kt(e) {
1361
1381
  day: "2-digit"
1362
1382
  }) ?? null
1363
1383
  ]
1364
- ]), O = h(() => {
1384
+ ]), V = h(() => {
1365
1385
  if (!f.value) {
1366
- if (!w.value) return !0;
1367
- const b = p.value;
1386
+ if (!S.value) return !0;
1387
+ const b = m.value;
1368
1388
  return b ? i(b) : !1;
1369
1389
  }
1370
1390
  if (!I.value) return !0;
1371
- const a = p.value;
1372
- return !w.value || !a ? !1 : i(a);
1373
- }), K = h(() => {
1391
+ const a = m.value;
1392
+ return !S.value || !a ? !1 : i(a);
1393
+ }), U = h(() => {
1374
1394
  if (!f.value) {
1375
- if (!w.value) return;
1376
- const b = p.value;
1395
+ if (!S.value) return;
1396
+ const b = m.value;
1377
1397
  return b ? i(b) ? "valid" : "out-of-bounds" : "invalid-date";
1378
1398
  }
1379
1399
  if (!I.value) return;
1380
- if (E.value.length === 0 || !w.value)
1400
+ if (E.value.length === 0 || !S.value)
1381
1401
  return "incomplete";
1382
- const a = p.value;
1402
+ const a = m.value;
1383
1403
  return a ? i(a) ? "valid" : "out-of-bounds" : "invalid-date";
1384
- }), ne = h(() => {
1385
- const a = K.value;
1404
+ }), ae = h(() => {
1405
+ const a = U.value;
1386
1406
  if (!a || a === "valid") return "";
1387
1407
  if (a === "incomplete")
1388
1408
  return "Required";
1389
1409
  if (a === "invalid-date")
1390
- return `Must be in ${c.value} format.`;
1410
+ return `Must be in ${s.value} format.`;
1391
1411
  const b = e.min ? e.min.toLocaleDateString("en-US", {
1392
1412
  year: "numeric",
1393
1413
  month: "2-digit",
@@ -1403,7 +1423,7 @@ function kt(e) {
1403
1423
  if (L) return `Must be on or before ${L}.`;
1404
1424
  }
1405
1425
  return "";
1406
- }), ue = () => {
1426
+ }), ne = () => {
1407
1427
  H(() => {
1408
1428
  const a = document.getElementById(
1409
1429
  e.id
@@ -1428,68 +1448,68 @@ function kt(e) {
1428
1448
  );
1429
1449
  });
1430
1450
  };
1431
- return Ce(() => {
1432
- ue();
1451
+ return Te(() => {
1452
+ ne();
1433
1453
  }), {
1434
1454
  raw: t,
1435
1455
  cursorPos: r,
1436
1456
  debugEnabled: g,
1437
- debugLines: M,
1438
- placeholder: c,
1439
- isValid: O,
1440
- reason: Q(K),
1441
- validationMessage: ne,
1457
+ debugLines: p,
1458
+ placeholder: s,
1459
+ isValid: V,
1460
+ reason: Q(U),
1461
+ validationMessage: ae,
1442
1462
  digitsOnly: E,
1443
1463
  month: Q(x),
1444
1464
  day: Q(D),
1445
- year: Q(T),
1465
+ year: Q(C),
1446
1466
  datePart: $,
1447
1467
  handleChange: X,
1448
- handleKeyDown: A,
1449
- handleWheel: v,
1450
- handleKeyUp: l,
1468
+ handleKeyDown: k,
1469
+ handleWheel: y,
1470
+ handleKeyUp: w,
1451
1471
  handleClick: ee,
1452
- handleBlur: y,
1472
+ handleBlur: T,
1453
1473
  // Expose so consumers can re-run styling when needed
1454
- initStyling: ue
1474
+ initStyling: ne
1455
1475
  };
1456
1476
  }
1457
- function At(e) {
1458
- const t = Y(""), r = Y(void 0), g = Y(!!e.debug), c = Y(!1), f = 1440 * 60 * 1e3, k = 365 * f, I = /* @__PURE__ */ new Date(), F = new Date(I.getTime() - k), V = new Date(I.getTime() + k);
1459
- e.min = e.min ?? F, e.max = e.max ?? V;
1460
- const E = h(() => (t.value ?? "").replace(/\D/g, "")), $ = (o, m) => new Date(o, m, 0).getDate(), x = (o, m, C) => m >= 1 && m <= 12 && o >= 1e3 && C >= 1 && C <= $(o, m), D = (o) => Date.UTC(o.getFullYear(), o.getMonth(), o.getDate()), T = (o) => {
1477
+ function Dt(e) {
1478
+ const t = Y(""), r = Y(void 0), g = Y(!!e.debug), s = Y(!1), f = 1440 * 60 * 1e3, A = 365 * f, I = /* @__PURE__ */ new Date(), F = new Date(I.getTime() - A), N = new Date(I.getTime() + A);
1479
+ e.min = e.min ?? F, e.max = e.max ?? N;
1480
+ const E = h(() => (t.value ?? "").replace(/\D/g, "")), $ = (o, v) => new Date(o, v, 0).getDate(), x = (o, v, M) => v >= 1 && v <= 12 && o >= 1e3 && M >= 1 && M <= $(o, v), D = (o) => Date.UTC(o.getFullYear(), o.getMonth(), o.getDate()), C = (o) => {
1461
1481
  if (!o) return null;
1462
- const m = e.min ?? new Date(Date.now() - 90 * f), C = e.max ?? /* @__PURE__ */ new Date(), N = D(o);
1463
- return N < D(m) || N > D(C) ? null : o;
1464
- }, s = (o, m) => e.allowReverse ?? !1 ? !0 : o <= m, i = h(() => (t.value?.length ?? 0) >= 23 && E.value.length >= 16), p = (o) => {
1482
+ const v = e.min ?? new Date(Date.now() - 90 * f), M = e.max ?? /* @__PURE__ */ new Date(), O = D(o);
1483
+ return O < D(v) || O > D(M) ? null : o;
1484
+ }, c = (o, v) => e.allowReverse ?? !1 ? !0 : o <= v, i = h(() => (t.value?.length ?? 0) >= 23 && E.value.length >= 16), m = (o) => {
1465
1485
  if ((o ?? "").length < 23 || E.value.length < 16)
1466
1486
  return { start: null, end: null };
1467
- const m = o.substring(0, 10), C = o.substring(13, 23), [N, re, ae] = m.split("/").map((pe) => parseInt(pe || "0", 10)), [fe, me, ve] = C.split("/").map((pe) => parseInt(pe || "0", 10)), ge = new Date(ae, N - 1, re), ye = new Date(ve, fe - 1, me), ke = x(ae, N, re) && ge.toString() !== "Invalid Date", Ae = x(ve, fe, me) && ye.toString() !== "Invalid Date";
1468
- return { start: ke ? ge : null, end: Ae ? ye : null };
1469
- }, w = e.externalValid ?? Y(!0), R = h(() => p(t.value)), q = h(() => {
1470
- const o = T(R.value.start), m = T(R.value.end);
1471
- return { start: o, end: m };
1472
- }), U = h(() => {
1487
+ const v = o.substring(0, 10), M = o.substring(13, 23), [O, oe, le] = v.split("/").map((pe) => parseInt(pe || "0", 10)), [fe, me, ve] = M.split("/").map((pe) => parseInt(pe || "0", 10)), ge = new Date(le, O - 1, oe), ye = new Date(ve, fe - 1, me), ke = x(le, O, oe) && ge.toString() !== "Invalid Date", De = x(ve, fe, me) && ye.toString() !== "Invalid Date";
1488
+ return { start: ke ? ge : null, end: De ? ye : null };
1489
+ }, S = e.externalValid ?? Y(!0), R = h(() => m(t.value)), K = h(() => {
1490
+ const o = C(R.value.start), v = C(R.value.end);
1491
+ return { start: o, end: v };
1492
+ }), q = h(() => {
1473
1493
  if (!i.value) return;
1474
- const o = q.value.start, m = q.value.end;
1475
- if (!o || !m) return;
1476
- const C = Math.abs(D(m) - D(o));
1477
- return Math.round(C / 864e5 + 1);
1494
+ const o = K.value.start, v = K.value.end;
1495
+ if (!o || !v) return;
1496
+ const M = Math.abs(D(v) - D(o));
1497
+ return Math.round(M / 864e5 + 1);
1478
1498
  }), X = Y(!1), ee = h(() => {
1479
1499
  if (!X.value) return;
1480
- const { start: o, end: m } = R.value;
1500
+ const { start: o, end: v } = R.value;
1481
1501
  if (!i.value) return "incomplete";
1482
- if (!o || !m) return "invalid-date";
1483
- if (!q.value.start || !q.value.end) return "out-of-bounds";
1484
- const C = q.value.start, N = q.value.end;
1485
- return s(C, N) ? typeof e.maxSpanDays == "number" && U.value !== void 0 && U.value > e.maxSpanDays ? "span-exceeds-limit" : "valid" : "reversed-range";
1502
+ if (!o || !v) return "invalid-date";
1503
+ if (!K.value.start || !K.value.end) return "out-of-bounds";
1504
+ const M = K.value.start, O = K.value.end;
1505
+ return c(M, O) ? typeof e.maxSpanDays == "number" && q.value !== void 0 && q.value > e.maxSpanDays ? "span-exceeds-limit" : "valid" : "reversed-range";
1486
1506
  }), u = h(() => {
1487
1507
  const o = ee.value;
1488
1508
  return o === void 0 || o === "valid";
1489
- }), A = h(() => {
1490
- const { min: o, max: m } = e, C = ee.value;
1491
- if (!C) return "";
1492
- switch (C) {
1509
+ }), k = h(() => {
1510
+ const { min: o, max: v } = e, M = ee.value;
1511
+ if (!M) return "";
1512
+ switch (M) {
1493
1513
  case "incomplete":
1494
1514
  return "Required";
1495
1515
  case "invalid-date":
@@ -1497,54 +1517,54 @@ function At(e) {
1497
1517
  case "reversed-range":
1498
1518
  return "End Date must be on or after Start Date.";
1499
1519
  case "out-of-bounds":
1500
- return o && m ? `Dates must be between ${S(o)} and ${S(m)}.` : "Dates must be within the allowed range.";
1520
+ return o && v ? `Dates must be between ${l(o)} and ${l(v)}.` : "Dates must be within the allowed range.";
1501
1521
  case "span-exceeds-limit":
1502
1522
  return typeof e.maxSpanDays == "number" ? `Date range exceeds ${e.maxSpanDays} days.` : "Date range exceeds maximum allowed span.";
1503
1523
  default:
1504
1524
  return "";
1505
1525
  }
1506
- }), v = ["ArrowUp", "ArrowDown"], l = ["ArrowLeft", "ArrowRight"], y = (o, m) => String(o).padStart(m, "0"), S = (o) => `${y(o.getMonth() + 1, 2)}/${y(o.getDate(), 2)}/${y(
1526
+ }), y = ["ArrowUp", "ArrowDown"], w = ["ArrowLeft", "ArrowRight"], T = (o, v) => String(o).padStart(v, "0"), l = (o) => `${T(o.getMonth() + 1, 2)}/${T(o.getDate(), 2)}/${T(
1507
1527
  o.getFullYear(),
1508
1528
  4
1509
- )}`, M = (o) => o <= 2 ? { side: "start", part: "mm" } : o <= 5 ? { side: "start", part: (o <= 3, "dd") } : o <= 11 ? { side: "start", part: "yyyy" } : o <= 15 ? { side: "end", part: "mm" } : o <= 18 ? { side: "end", part: "dd" } : { side: "end", part: "yyyy" }, O = (o, m, C) => {
1510
- const N = m?.selectionStart ?? r.value ?? 0;
1511
- r.value = N;
1512
- const { start: re, end: ae } = p(t.value);
1513
- if (!re && !ae) {
1514
- const J = /* @__PURE__ */ new Date(), de = S(J);
1515
- t.value = `${de} - ${de}`, e.onChange({ value: { start: J, end: J }, event: C }), H(() => {
1529
+ )}`, p = (o) => o <= 2 ? { side: "start", part: "mm" } : o <= 5 ? { side: "start", part: (o <= 3, "dd") } : o <= 11 ? { side: "start", part: "yyyy" } : o <= 15 ? { side: "end", part: "mm" } : o <= 18 ? { side: "end", part: "dd" } : { side: "end", part: "yyyy" }, V = (o, v, M) => {
1530
+ const O = v?.selectionStart ?? r.value ?? 0;
1531
+ r.value = O;
1532
+ const { start: oe, end: le } = m(t.value);
1533
+ if (!oe && !le) {
1534
+ const J = /* @__PURE__ */ new Date(), de = l(J);
1535
+ t.value = `${de} - ${de}`, e.onChange({ value: { start: J, end: J }, event: M }), H(() => {
1516
1536
  requestAnimationFrame(() => {
1517
- const le = document.getElementById(
1537
+ const ie = document.getElementById(
1518
1538
  e.id
1519
- ), ie = r.value ?? 0;
1520
- le && (le.focus(), le.setSelectionRange(ie, ie));
1539
+ ), ue = r.value ?? 0;
1540
+ ie && (ie.focus(), ie.setSelectionRange(ue, ue));
1521
1541
  });
1522
1542
  });
1523
1543
  return;
1524
1544
  }
1525
- const fe = /* @__PURE__ */ new Date(), me = M(N);
1526
- let ve = re ? new Date(re) : new Date(fe), ge = ae ? new Date(ae) : new Date(fe);
1545
+ const fe = /* @__PURE__ */ new Date(), me = p(O);
1546
+ let ve = oe ? new Date(oe) : new Date(fe), ge = le ? new Date(le) : new Date(fe);
1527
1547
  const ye = (J, de) => {
1528
1548
  if (de === "mm") {
1529
- const le = J.getMonth() + 1, ie = o === "ArrowUp" ? le < 12 ? le + 1 : 1 : le > 1 ? le - 1 : 12;
1530
- J.setMonth(ie - 1);
1531
- const be = $(J.getFullYear(), ie);
1549
+ const ie = J.getMonth() + 1, ue = o === "ArrowUp" ? ie < 12 ? ie + 1 : 1 : ie > 1 ? ie - 1 : 12;
1550
+ J.setMonth(ue - 1);
1551
+ const be = $(J.getFullYear(), ue);
1532
1552
  J.getDate() > be && J.setDate(be);
1533
1553
  } else if (de === "dd") {
1534
- const le = $(J.getFullYear(), J.getMonth() + 1), ie = J.getDate(), be = o === "ArrowUp" ? ie < le ? ie + 1 : 1 : ie > 1 ? ie - 1 : le;
1554
+ const ie = $(J.getFullYear(), J.getMonth() + 1), ue = J.getDate(), be = o === "ArrowUp" ? ue < ie ? ue + 1 : 1 : ue > 1 ? ue - 1 : ie;
1535
1555
  J.setDate(be);
1536
1556
  } else if (de === "yyyy") {
1537
- const le = J.getFullYear();
1538
- J.setFullYear(o === "ArrowUp" ? le + 1 : Math.max(1, le - 1));
1539
- const ie = $(J.getFullYear(), J.getMonth() + 1);
1540
- J.getDate() > ie && J.setDate(ie);
1557
+ const ie = J.getFullYear();
1558
+ J.setFullYear(o === "ArrowUp" ? ie + 1 : Math.max(1, ie - 1));
1559
+ const ue = $(J.getFullYear(), J.getMonth() + 1);
1560
+ J.getDate() > ue && J.setDate(ue);
1541
1561
  }
1542
1562
  };
1543
1563
  me.side === "start" ? ye(ve, me.part) : ye(ge, me.part);
1544
- const ke = S(ve), Ae = S(ge);
1545
- t.value = `${ke} - ${Ae}`;
1546
- const pe = T(ve), De = T(ge);
1547
- pe && De && s(pe, De) ? e.onChange({ value: { start: pe, end: De }, event: C }) : e.onChange({ value: null, event: C }), H(() => {
1564
+ const ke = l(ve), De = l(ge);
1565
+ t.value = `${ke} - ${De}`;
1566
+ const pe = C(ve), Ee = C(ge);
1567
+ pe && Ee && c(pe, Ee) ? e.onChange({ value: { start: pe, end: Ee }, event: M }) : e.onChange({ value: null, event: M }), H(() => {
1548
1568
  requestAnimationFrame(() => {
1549
1569
  const J = document.getElementById(
1550
1570
  e.id
@@ -1552,32 +1572,32 @@ function At(e) {
1552
1572
  J && (J.focus(), J.setSelectionRange(de, de));
1553
1573
  });
1554
1574
  });
1555
- }, K = (o) => {
1556
- const { start: m, end: C } = p(t.value);
1557
- if (!m || !C) {
1575
+ }, U = (o) => {
1576
+ const { start: v, end: M } = m(t.value);
1577
+ if (!v || !M) {
1558
1578
  e.onChange({ value: null, event: o });
1559
1579
  return;
1560
1580
  }
1561
- const N = T(m), re = T(C);
1562
- if (!N || !re) {
1581
+ const O = C(v), oe = C(M);
1582
+ if (!O || !oe) {
1563
1583
  e.onChange({ value: null, event: o });
1564
1584
  return;
1565
1585
  }
1566
- if (!s(N, re)) {
1586
+ if (!c(O, oe)) {
1567
1587
  e.onChange({ value: null, event: o });
1568
1588
  return;
1569
1589
  }
1570
- e.onChange({ value: { start: N, end: re }, event: o });
1571
- }, ne = (o) => {
1572
- const m = o.value ?? "", C = o.event;
1573
- if (!m && C && C.type === "click") {
1574
- j(C);
1590
+ e.onChange({ value: { start: O, end: oe }, event: o });
1591
+ }, ae = (o) => {
1592
+ const v = o.value ?? "", M = o.event;
1593
+ if (!v && M && M.type === "click") {
1594
+ j(M);
1575
1595
  return;
1576
1596
  }
1577
- t.value = m;
1578
- const N = C?.target;
1579
- r.value = N?.selectionStart ?? 0, K(o);
1580
- }, ue = (o) => {
1597
+ t.value = v;
1598
+ const O = M?.target;
1599
+ r.value = O?.selectionStart ?? 0, U(o);
1600
+ }, ne = (o) => {
1581
1601
  r.value = o.target.selectionStart ?? 0;
1582
1602
  }, a = (o) => {
1583
1603
  if (o.code === "Space" || o.key === " ") {
@@ -1588,43 +1608,43 @@ function At(e) {
1588
1608
  o.preventDefault(), o.stopPropagation(), e.onShowCalendar(o);
1589
1609
  return;
1590
1610
  }
1591
- if (v.includes(o.key)) {
1611
+ if (y.includes(o.key)) {
1592
1612
  o.preventDefault(), o.stopPropagation();
1593
- const m = o.target;
1594
- O(o.key, m, o);
1613
+ const v = o.target;
1614
+ V(o.key, v, o);
1595
1615
  return;
1596
1616
  }
1597
1617
  }, b = (o) => {
1598
1618
  o.preventDefault();
1599
- const m = o.deltaY < 0 ? "ArrowUp" : "ArrowDown";
1600
- O(m, o.target, o);
1619
+ const v = o.deltaY < 0 ? "ArrowUp" : "ArrowDown";
1620
+ V(v, o.target, o);
1601
1621
  }, L = (o) => {
1602
- if (l.includes(o.key) || v.includes(o.key)) {
1603
- const m = o.target;
1604
- r.value = m?.selectionStart ?? 0;
1622
+ if (w.includes(o.key) || y.includes(o.key)) {
1623
+ const v = o.target;
1624
+ r.value = v?.selectionStart ?? 0;
1605
1625
  }
1606
1626
  }, Z = () => {
1607
- X.value = !0, (e.manageValid ?? !0) && (w.value = u.value);
1627
+ X.value = !0, (e.manageValid ?? !0) && (S.value = u.value);
1608
1628
  }, W = (o) => {
1609
1629
  Z();
1610
1630
  }, j = (o) => {
1611
1631
  t.value = "", r.value = 0, e.onChange({ value: null, event: o }), Z(), H(() => {
1612
- const m = document.getElementById(
1632
+ const v = document.getElementById(
1613
1633
  e.id
1614
1634
  );
1615
- m && (m.focus(), m.setSelectionRange(0, 0));
1635
+ v && (v.focus(), v.setSelectionRange(0, 0));
1616
1636
  });
1617
1637
  };
1618
1638
  e.externalValue && se(
1619
1639
  e.externalValue,
1620
1640
  (o) => {
1621
- const m = o?.start ?? null, C = o?.end ?? null;
1622
- if (m && C) {
1623
- if (t.value = `${S(m)} - ${S(C)}`, e.isOpen?.value && c.value && e.onRequestClose) {
1624
- const N = typeof e.closeDelay == "number" ? e.closeDelay : e.closeDelay?.value ?? 0;
1641
+ const v = o?.start ?? null, M = o?.end ?? null;
1642
+ if (v && M) {
1643
+ if (t.value = `${l(v)} - ${l(M)}`, e.isOpen?.value && s.value && e.onRequestClose) {
1644
+ const O = typeof e.closeDelay == "number" ? e.closeDelay : e.closeDelay?.value ?? 0;
1625
1645
  setTimeout(() => {
1626
- e.onRequestClose?.(), c.value = !1, Z();
1627
- }, N);
1646
+ e.onRequestClose?.(), s.value = !1, Z();
1647
+ }, O);
1628
1648
  }
1629
1649
  return;
1630
1650
  }
@@ -1644,7 +1664,7 @@ function At(e) {
1644
1664
  ), te = h(
1645
1665
  () => t.value && t.value.substring(19, 23).replace(/\D/g, "0") || "0"
1646
1666
  ), z = h(() => {
1647
- const { start: o, end: m } = p(t.value);
1667
+ const { start: o, end: v } = m(t.value);
1648
1668
  return [
1649
1669
  {
1650
1670
  label: "Raw",
@@ -1674,13 +1694,13 @@ function At(e) {
1674
1694
  { label: "Mask complete", value: `${i.value}` },
1675
1695
  {
1676
1696
  label: "Parsed",
1677
- value: `${o ? o.toDateString() : "-"} | ${m ? m.toDateString() : "-"}`
1697
+ value: `${o ? o.toDateString() : "-"} | ${v ? v.toDateString() : "-"}`
1678
1698
  },
1679
1699
  {
1680
1700
  label: "Valid (managed)",
1681
- value: `${w.value ?? "-"}`
1701
+ value: `${S.value ?? "-"}`
1682
1702
  },
1683
- { label: "Span (days)", value: `${U.value ?? "-"}` },
1703
+ { label: "Span (days)", value: `${q.value ?? "-"}` },
1684
1704
  {
1685
1705
  label: "Reason",
1686
1706
  value: `${ee.value ?? "-"}`
@@ -1688,8 +1708,8 @@ function At(e) {
1688
1708
  {
1689
1709
  label: "Cursor in",
1690
1710
  value: `${r.value ?? "-"} (${(() => {
1691
- const C = r.value ?? 0, N = M(C);
1692
- return `${N.side}.${N.part}`;
1711
+ const M = r.value ?? 0, O = p(M);
1712
+ return `${O.side}.${O.part}`;
1693
1713
  })()})`
1694
1714
  }
1695
1715
  ];
@@ -1700,15 +1720,15 @@ function At(e) {
1700
1720
  console.warn(`#${e.id} not found for styling.`);
1701
1721
  return;
1702
1722
  }
1703
- const m = o.closest("div");
1704
- if (!m) {
1723
+ const v = o.closest("div");
1724
+ if (!v) {
1705
1725
  console.warn(`Parent div of #${e.id} not found for styling.`);
1706
1726
  return;
1707
1727
  }
1708
- m.classList.contains("fk-daterangepicker") || m.classList.add("fk-daterangepicker");
1728
+ v.classList.contains("fk-daterangepicker") || v.classList.add("fk-daterangepicker");
1709
1729
  });
1710
1730
  };
1711
- Ce(() => {
1731
+ Te(() => {
1712
1732
  _();
1713
1733
  });
1714
1734
  const ce = () => {
@@ -1718,16 +1738,16 @@ function At(e) {
1718
1738
  document.querySelectorAll(".k-animation-container")
1719
1739
  );
1720
1740
  if (!o.length) return;
1721
- const C = [...o].reverse().find((ae) => ae.querySelector(".k-calendar"))?.querySelector(
1741
+ const M = [...o].reverse().find((le) => le.querySelector(".k-calendar"))?.querySelector(
1722
1742
  ".k-calendar"
1723
1743
  );
1724
- if (!C) return;
1725
- const N = C.querySelectorAll(
1744
+ if (!M) return;
1745
+ const O = M.querySelectorAll(
1726
1746
  ".k-calendar-table"
1727
1747
  );
1728
- let re = !1;
1729
- N.forEach((ae) => {
1730
- ae.tabIndex === 0 && (re ? ae.tabIndex = -1 : re = !0);
1748
+ let oe = !1;
1749
+ O.forEach((le) => {
1750
+ le.tabIndex === 0 && (oe ? le.tabIndex = -1 : oe = !0);
1731
1751
  });
1732
1752
  } catch (o) {
1733
1753
  console.warn(o);
@@ -1746,32 +1766,32 @@ function At(e) {
1746
1766
  debugEnabled: g,
1747
1767
  debugLines: z,
1748
1768
  digitsOnly: E,
1749
- valid: w,
1769
+ valid: S,
1750
1770
  validComputed: Q(u),
1751
1771
  reason: Q(ee),
1752
- validationMessage: Q(A),
1753
- spanDays: Q(U),
1772
+ validationMessage: Q(k),
1773
+ spanDays: Q(q),
1754
1774
  month1: Q(n),
1755
1775
  day1: Q(d),
1756
1776
  year1: Q(P),
1757
1777
  month2: Q(B),
1758
1778
  day2: Q(G),
1759
1779
  year2: Q(te),
1760
- handleChange: ne,
1780
+ handleChange: ae,
1761
1781
  handleKeyDown: a,
1762
1782
  handleWheel: b,
1763
1783
  handleKeyUp: L,
1764
- handleClick: ue,
1784
+ handleClick: ne,
1765
1785
  handleBlur: W,
1766
1786
  handleClear: j,
1767
1787
  onCalendarChange: () => {
1768
- c.value = !0;
1788
+ s.value = !0;
1769
1789
  },
1770
1790
  initStyling: _
1771
1791
  };
1772
1792
  }
1773
- function Dt(e) {
1774
- const t = Y(""), r = Y(void 0), g = Y(!!e.debug), c = Y(e.timeFormat ?? "hh:mm AM"), f = h(() => !!e.required), k = Y(!1), I = ["ArrowUp", "ArrowDown"], F = ["ArrowLeft", "ArrowRight"], V = h(() => (t.value ?? "").replace(/\D/g, "")), E = {
1793
+ function Et(e) {
1794
+ const t = Y(""), r = Y(void 0), g = Y(!!e.debug), s = Y(e.timeFormat ?? "hh:mm AM"), f = h(() => !!e.required), A = Y(!1), I = ["ArrowUp", "ArrowDown"], F = ["ArrowLeft", "ArrowRight"], N = h(() => (t.value ?? "").replace(/\D/g, "")), E = {
1775
1795
  H: /[0-9]/,
1776
1796
  h: /[0-9]/,
1777
1797
  M: /[0-9]/,
@@ -1784,12 +1804,12 @@ function Dt(e) {
1784
1804
  }), D = h(() => {
1785
1805
  const n = t.value && t.value.substring(3, 5).replace(/\D/g, "0") || "0", d = parseInt(n);
1786
1806
  return Math.min(Math.max(d, 0), 59);
1787
- }), T = h(() => (t.value?.substring(6, 8) || "AM").toUpperCase().startsWith("P") ? "PM" : "AM"), s = h(() => {
1788
- const n = parseInt(t.value?.substring(0, 2).replace(/\D/g, "0") || "0"), d = T.value;
1807
+ }), C = h(() => (t.value?.substring(6, 8) || "AM").toUpperCase().startsWith("P") ? "PM" : "AM"), c = h(() => {
1808
+ const n = parseInt(t.value?.substring(0, 2).replace(/\D/g, "0") || "0"), d = C.value;
1789
1809
  return n === 12 ? d === "AM" ? 0 : 12 : d === "PM" ? n + 12 : n;
1790
- }), i = h(() => p.value ? `${String(s.value).padStart(2, "0")}:${String(D.value).padStart(2, "0")}:00` : null), p = h(
1810
+ }), i = h(() => m.value ? `${String(c.value).padStart(2, "0")}:${String(D.value).padStart(2, "0")}:00` : null), m = h(
1791
1811
  () => /^(\d{2}):(\d{2})\s([AP]M)$/i.test(t.value ?? "")
1792
- ), w = (n, d, P) => {
1812
+ ), S = (n, d, P) => {
1793
1813
  let B = n % 12;
1794
1814
  return B === 0 && (B = 12), `${String(B).padStart(2, "0")}:${String(d).padStart(
1795
1815
  2,
@@ -1804,34 +1824,34 @@ function Dt(e) {
1804
1824
  G === "PM" && (te += 12);
1805
1825
  const z = /* @__PURE__ */ new Date();
1806
1826
  return z.setSeconds(0, 0), z.setHours(te), z.setMinutes(B), z;
1807
- }, q = (n) => {
1808
- if (V.value.length === 0) {
1827
+ }, K = (n) => {
1828
+ if (N.value.length === 0) {
1809
1829
  e.onChange({ value: null, event: n });
1810
1830
  return;
1811
1831
  }
1812
- if (!p.value) {
1832
+ if (!m.value) {
1813
1833
  e.onChange({ value: null, event: n });
1814
1834
  return;
1815
1835
  }
1816
1836
  const d = R(t.value);
1817
1837
  d && X(d) ? e.onChange({ value: d, event: n }) : e.onChange({ value: null, event: n });
1818
- }, U = (n) => n.getHours() * 60 + n.getMinutes(), X = (n) => {
1819
- const d = e.min ?? void 0, P = e.max ?? void 0, B = U(n);
1838
+ }, q = (n) => n.getHours() * 60 + n.getMinutes(), X = (n) => {
1839
+ const d = e.min ?? void 0, P = e.max ?? void 0, B = q(n);
1820
1840
  if (d) {
1821
- const G = U(d);
1841
+ const G = q(d);
1822
1842
  if (B < G) return !1;
1823
1843
  }
1824
1844
  if (P) {
1825
- const G = U(P);
1845
+ const G = q(P);
1826
1846
  if (B > G) return !1;
1827
1847
  }
1828
1848
  return !0;
1829
1849
  }, ee = (n) => {
1830
1850
  const d = n.getHours(), P = d >= 12 ? "PM" : "AM";
1831
- t.value = w(d, n.getMinutes(), P);
1851
+ t.value = S(d, n.getMinutes(), P);
1832
1852
  }, u = (n, d) => {
1833
1853
  e.onChange({ value: n, event: d });
1834
- }, A = () => {
1854
+ }, k = () => {
1835
1855
  H(() => {
1836
1856
  requestAnimationFrame(() => {
1837
1857
  requestAnimationFrame(() => {
@@ -1846,23 +1866,23 @@ function Dt(e) {
1846
1866
  });
1847
1867
  });
1848
1868
  });
1849
- }, v = (n) => {
1869
+ }, y = (n) => {
1850
1870
  const d = n?.event?.target;
1851
1871
  return d ? d.closest(".k-time-now") ? "now" : d.closest(".k-time-accept") ? "set" : null : null;
1852
- }, l = (n, d) => {
1872
+ }, w = (n, d) => {
1853
1873
  n && X(n) ? u(n, d) : u(null, d);
1854
- }, y = (...n) => {
1874
+ }, T = (...n) => {
1855
1875
  const d = n[0];
1856
1876
  if (!d) return;
1857
- const P = v(d);
1877
+ const P = y(d);
1858
1878
  if (P === "now") {
1859
1879
  const G = /* @__PURE__ */ new Date();
1860
- ee(G), l(G, d), A();
1880
+ ee(G), w(G, d), k();
1861
1881
  return;
1862
1882
  }
1863
1883
  if (d?.value instanceof Date) {
1864
1884
  const G = new Date(d.value);
1865
- ee(G), l(G, d), P === "set" && A();
1885
+ ee(G), w(G, d), P === "set" && k();
1866
1886
  return;
1867
1887
  }
1868
1888
  if (d?.value === null) {
@@ -1894,24 +1914,24 @@ function Dt(e) {
1894
1914
  }
1895
1915
  } catch {
1896
1916
  }
1897
- q(d);
1898
- }, S = (n) => {
1917
+ K(d);
1918
+ }, l = (n) => {
1899
1919
  r.value = n.target.selectionStart ?? 0;
1900
- }, M = (n, d, P) => {
1920
+ }, p = (n, d, P) => {
1901
1921
  const B = d?.selectionStart ?? r.value ?? 0;
1902
1922
  r.value = B;
1903
1923
  const G = $(B), te = (t.value ?? "").match(/^(\d{2}):(\d{2})\s([AP]M)$/i);
1904
1924
  if (!te) {
1905
- if ((t.value ?? "").length === 0 || V.value.length === 0) {
1906
- const m = /* @__PURE__ */ new Date(), C = m.getHours(), N = C >= 12 ? "PM" : "AM";
1907
- t.value = w(C, m.getMinutes(), N);
1908
- const re = R(t.value);
1909
- l(re, P), H(() => {
1925
+ if ((t.value ?? "").length === 0 || N.value.length === 0) {
1926
+ const v = /* @__PURE__ */ new Date(), M = v.getHours(), O = M >= 12 ? "PM" : "AM";
1927
+ t.value = S(M, v.getMinutes(), O);
1928
+ const oe = R(t.value);
1929
+ w(oe, P), H(() => {
1910
1930
  requestAnimationFrame(() => {
1911
- const ae = document.getElementById(
1931
+ const le = document.getElementById(
1912
1932
  e.id
1913
1933
  ), fe = r.value ?? 0;
1914
- ae && (ae.focus(), ae.setSelectionRange(fe, fe));
1934
+ le && (le.focus(), le.setSelectionRange(fe, fe));
1915
1935
  });
1916
1936
  });
1917
1937
  }
@@ -1921,17 +1941,17 @@ function Dt(e) {
1921
1941
  if (G === "hh")
1922
1942
  n === "ArrowUp" ? z = z < 12 ? z + 1 : 1 : z = z > 1 ? z - 1 : 12;
1923
1943
  else if (G === "mm") {
1924
- const m = e.minuteStepRef?.value ?? e.minuteStep ?? 1;
1925
- if (m === 1)
1944
+ const v = e.minuteStepRef?.value ?? e.minuteStep ?? 1;
1945
+ if (v === 1)
1926
1946
  n === "ArrowUp" ? _ = _ < 59 ? _ + 1 : 0 : _ = _ > 0 ? _ - 1 : 59;
1927
1947
  else if (n === "ArrowUp") {
1928
- const C = _ % m;
1929
- let N = C === 0 ? _ + m : _ + (m - C);
1930
- N >= 60 && (N = 0), _ = N;
1948
+ const M = _ % v;
1949
+ let O = M === 0 ? _ + v : _ + (v - M);
1950
+ O >= 60 && (O = 0), _ = O;
1931
1951
  } else {
1932
- const C = _ % m;
1933
- let N = C === 0 ? _ - m : _ - C;
1934
- N < 0 && (N = 60 - m), _ = N;
1952
+ const M = _ % v;
1953
+ let O = M === 0 ? _ - v : _ - M;
1954
+ O < 0 && (O = 60 - v), _ = O;
1935
1955
  }
1936
1956
  } else G === "ampm" && (ce = ce === "AM" ? "PM" : "AM");
1937
1957
  t.value = `${String(z).padStart(2, "0")}:${String(_).padStart(
@@ -1939,15 +1959,15 @@ function Dt(e) {
1939
1959
  "0"
1940
1960
  )} ${ce}`;
1941
1961
  const o = R(t.value);
1942
- l(o, P), H(() => {
1962
+ w(o, P), H(() => {
1943
1963
  requestAnimationFrame(() => {
1944
- const m = document.getElementById(
1964
+ const v = document.getElementById(
1945
1965
  e.id
1946
- ), C = r.value ?? 0;
1947
- m && (m.focus(), m.setSelectionRange(C, C));
1966
+ ), M = r.value ?? 0;
1967
+ v && (v.focus(), v.setSelectionRange(M, M));
1948
1968
  });
1949
1969
  });
1950
- }, O = (n) => {
1970
+ }, V = (n) => {
1951
1971
  if (n.code === "Space" || n.key === " ") {
1952
1972
  n.preventDefault(), n.stopPropagation(), e.onShowPicker(n);
1953
1973
  return;
@@ -1960,14 +1980,14 @@ function Dt(e) {
1960
1980
  if (n.altKey) return;
1961
1981
  n.preventDefault(), n.stopPropagation();
1962
1982
  const d = n.target;
1963
- M(n.key, d, n);
1983
+ p(n.key, d, n);
1964
1984
  return;
1965
1985
  }
1966
- }, K = (n) => {
1986
+ }, U = (n) => {
1967
1987
  n.preventDefault();
1968
1988
  const d = n.deltaY < 0 ? "ArrowUp" : "ArrowDown";
1969
- M(d, n.target, n);
1970
- }, ne = (n) => {
1989
+ p(d, n.target, n);
1990
+ }, ae = (n) => {
1971
1991
  const d = n.target;
1972
1992
  if (F.includes(n.key)) {
1973
1993
  r.value = d?.selectionStart ?? 0;
@@ -1977,8 +1997,8 @@ function Dt(e) {
1977
1997
  if (n.altKey) return;
1978
1998
  r.value = d?.selectionStart ?? 0;
1979
1999
  }
1980
- }, ue = (n) => {
1981
- k.value = !0, f.value && e.externalValue && e.externalValue.value === void 0 && V.value.length === 0 && (e.externalValue.value = "");
2000
+ }, ne = (n) => {
2001
+ A.value = !0, f.value && e.externalValue && e.externalValue.value === void 0 && N.value.length === 0 && (e.externalValue.value = "");
1982
2002
  const d = n.target;
1983
2003
  d && (r.value = d.selectionStart ?? 0);
1984
2004
  };
@@ -1989,7 +2009,7 @@ function Dt(e) {
1989
2009
  const d = new Date(n);
1990
2010
  if (d.toString() !== "Invalid Date") {
1991
2011
  const P = d.getHours(), B = P >= 12 ? "PM" : "AM";
1992
- t.value = w(P, d.getMinutes(), B);
2012
+ t.value = S(P, d.getMinutes(), B);
1993
2013
  return;
1994
2014
  }
1995
2015
  }
@@ -1999,11 +2019,11 @@ function Dt(e) {
1999
2019
  const a = h(() => [
2000
2020
  ["Time", t.value || "--:-- --"],
2001
2021
  ["Hour (12h)", x.value],
2002
- ["Hour (24h)", s.value],
2022
+ ["Hour (24h)", c.value],
2003
2023
  ["Minute", D.value],
2004
- ["Period", T.value],
2024
+ ["Period", C.value],
2005
2025
  ["Time (24h)", i.value ?? "--:--:--"],
2006
- ["Digits only", V.value],
2026
+ ["Digits only", N.value],
2007
2027
  [
2008
2028
  "Parsed Date",
2009
2029
  b.value?.toLocaleDateString("en-US", {
@@ -2032,21 +2052,21 @@ function Dt(e) {
2032
2052
  () => R(t.value) ?? null
2033
2053
  ), L = h(() => {
2034
2054
  if (!f.value) {
2035
- if (!p.value) return !0;
2055
+ if (!m.value) return !0;
2036
2056
  const d = b.value;
2037
2057
  return d ? X(d) : !1;
2038
2058
  }
2039
- if (!k.value) return !0;
2059
+ if (!A.value) return !0;
2040
2060
  const n = b.value;
2041
- return !p.value || !n ? !1 : X(n);
2061
+ return !m.value || !n ? !1 : X(n);
2042
2062
  }), Z = h(() => {
2043
2063
  if (!f.value) {
2044
- if (!p.value) return;
2064
+ if (!m.value) return;
2045
2065
  const d = b.value;
2046
2066
  return d ? X(d) ? "valid" : "out-of-bounds" : "invalid-time";
2047
2067
  }
2048
- if (!k.value) return;
2049
- if (V.value.length === 0 || !p.value)
2068
+ if (!A.value) return;
2069
+ if (N.value.length === 0 || !m.value)
2050
2070
  return "incomplete";
2051
2071
  const n = b.value;
2052
2072
  return n ? X(n) ? "valid" : "out-of-bounds" : "invalid-time";
@@ -2056,7 +2076,7 @@ function Dt(e) {
2056
2076
  if (n === "incomplete")
2057
2077
  return "Required";
2058
2078
  if (n === "invalid-time")
2059
- return `Must be in ${c.value} format.`;
2079
+ return `Must be in ${s.value} format.`;
2060
2080
  const d = {
2061
2081
  hour: "2-digit",
2062
2082
  minute: "2-digit"
@@ -2091,61 +2111,61 @@ function Dt(e) {
2091
2111
  P.classList.contains("fk-timepicker") || P.classList.add("fk-timepicker");
2092
2112
  });
2093
2113
  };
2094
- return Ce(() => {
2114
+ return Te(() => {
2095
2115
  j();
2096
2116
  }), {
2097
2117
  raw: t,
2098
2118
  rules: E,
2099
2119
  debugEnabled: g,
2100
2120
  debugLines: a,
2101
- placeholder: c,
2121
+ placeholder: s,
2102
2122
  isValid: L,
2103
2123
  reason: Q(Z),
2104
2124
  validationMessage: W,
2105
- isComplete: p,
2125
+ isComplete: m,
2106
2126
  inRangeTime: X,
2107
2127
  cursorPos: r,
2108
2128
  hour: Q(x),
2109
- hour24: Q(s),
2129
+ hour24: Q(c),
2110
2130
  minute: Q(D),
2111
- period: Q(T),
2131
+ period: Q(C),
2112
2132
  time24: Q(i),
2113
2133
  parsedRawTime: Q(b),
2114
- handleChange: y,
2115
- handleKeyDown: O,
2116
- handleKeyUp: ne,
2117
- handleClick: S,
2118
- handleWheel: K,
2119
- handleBlur: ue,
2134
+ handleChange: T,
2135
+ handleKeyDown: V,
2136
+ handleKeyUp: ae,
2137
+ handleClick: l,
2138
+ handleWheel: U,
2139
+ handleBlur: ne,
2120
2140
  // Expose so consumers can reapply theming when Kendo updates DOM
2121
2141
  initStyling: j
2122
2142
  };
2123
2143
  }
2124
- function Et(e) {
2125
- const t = Se(null), r = [
2144
+ function It(e) {
2145
+ const t = Ae(null), r = [
2126
2146
  ".k-animation-container .k-popup",
2127
2147
  ".k-popup",
2128
2148
  ".k-timepicker-popup",
2129
2149
  ".k-menu-popup"
2130
- ], g = Array.isArray(e.popupSelector) ? e.popupSelector : [e.popupSelector ?? r].flat(), c = (E) => E ? typeof e.initialFocus == "string" ? E.querySelector(e.initialFocus) ?? E : typeof e.initialFocus == "function" ? e.initialFocus(E) ?? E : E.querySelector(
2150
+ ], g = Array.isArray(e.popupSelector) ? e.popupSelector : [e.popupSelector ?? r].flat(), s = (E) => E ? typeof e.initialFocus == "string" ? E.querySelector(e.initialFocus) ?? E : typeof e.initialFocus == "function" ? e.initialFocus(E) ?? E : E.querySelector(
2131
2151
  'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
2132
- ) ?? E : null, { activate: f, deactivate: k } = Ue(t, {
2152
+ ) ?? E : null, { activate: f, deactivate: A } = Ue(t, {
2133
2153
  escapeDeactivates: !1,
2134
2154
  clickOutsideDeactivates: !1,
2135
2155
  fallbackFocus: () => t.value,
2136
- initialFocus: () => c(t.value),
2156
+ initialFocus: () => s(t.value),
2137
2157
  ...e.focusTrapOptions ?? {}
2138
2158
  });
2139
2159
  let I = null, F = Y(null);
2140
- const V = () => {
2160
+ const N = () => {
2141
2161
  if (e.resolvePopupEl) return e.resolvePopupEl();
2142
2162
  const E = (x, D) => {
2143
- const T = Array.from(x.querySelectorAll(D));
2144
- if (!T.length) return null;
2145
- const s = T.filter(
2163
+ const C = Array.from(x.querySelectorAll(D));
2164
+ if (!C.length) return null;
2165
+ const c = C.filter(
2146
2166
  (i) => i.offsetParent !== null || i.getClientRects().length > 0
2147
2167
  );
2148
- return s[s.length - 1] ?? T[T.length - 1] ?? null;
2168
+ return c[c.length - 1] ?? C[C.length - 1] ?? null;
2149
2169
  }, $ = e.triggerEl?.value?.closest?.(".k-animation-container") ?? document.body;
2150
2170
  for (const x of g) {
2151
2171
  const D = E($, x);
@@ -2163,14 +2183,14 @@ function Et(e) {
2163
2183
  () => e.isOpen.value,
2164
2184
  (E) => {
2165
2185
  E ? (F.value = null, H(() => {
2166
- const $ = V();
2186
+ const $ = N();
2167
2187
  $ && (t.value = $, setTimeout(() => f(), 0), I || (I = (x) => {
2168
2188
  x.key === "Escape" && (F.value = "escape", e.isOpen.value && e.onRequestClose?.("escape", x));
2169
2189
  }, document.addEventListener("keydown", I, !0)));
2170
- })) : (k(), I && (document.removeEventListener("keydown", I, !0), I = null), t.value = null, F.value === "outside" && H(() => {
2190
+ })) : (A(), I && (document.removeEventListener("keydown", I, !0), I = null), t.value = null, F.value === "outside" && H(() => {
2171
2191
  const $ = () => {
2172
- const x = e.triggerEl?.value, D = x?.querySelector("input"), T = document.activeElement;
2173
- T && (T === D || x && x.contains(T)) && (D ?? x)?.blur?.();
2192
+ const x = e.triggerEl?.value, D = x?.querySelector("input"), C = document.activeElement;
2193
+ C && (C === D || x && x.contains(C)) && (D ?? x)?.blur?.();
2174
2194
  };
2175
2195
  requestAnimationFrame(() => setTimeout($, 0));
2176
2196
  }), e.returnFocusToTrigger !== !1 && F.value === "escape" && e.triggerEl?.value && H(() => {
@@ -2185,14 +2205,15 @@ function Et(e) {
2185
2205
  ), {
2186
2206
  popupRef: t,
2187
2207
  activate: f,
2188
- deactivate: k,
2208
+ deactivate: A,
2189
2209
  lastCloseReason: Q(F),
2190
2210
  setPopupEl: (E) => t.value = E
2191
2211
  };
2192
2212
  }
2193
2213
  export {
2194
- St as useActiveIdRegistry,
2214
+ At as useActiveIdRegistry,
2195
2215
  bt as useCompositeId,
2216
+ St as useExclusiveGroup,
2196
2217
  _e as useFieldsetTouchTracker,
2197
2218
  je as useFieldsetValidationKit,
2198
2219
  vt as useGridA11y,
@@ -2200,10 +2221,10 @@ export {
2200
2221
  yt as useGridRowAction,
2201
2222
  it as useIntersectionObserver,
2202
2223
  kt as useMaskedDateInput,
2203
- At as useMaskedDateRangeInput,
2204
- Dt as useMaskedTimeInput,
2224
+ Dt as useMaskedDateRangeInput,
2225
+ Et as useMaskedTimeInput,
2205
2226
  wt as usePopupMenu,
2206
- Et as usePopupTrap,
2227
+ It as usePopupTrap,
2207
2228
  ht as useUSAddress,
2208
2229
  We as useZipTextBox
2209
2230
  };