@manik02/vue3-timepicker 0.4.2 → 0.4.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,159 +1,159 @@
1
- import { defineComponent as be, ref as N, onMounted as me, onBeforeUnmount as fe, createElementBlock as Z, openBlock as U, normalizeClass as ve, createElementVNode as X, Fragment as Ae, renderList as Pe, toDisplayString as De, nextTick as ye, computed as p, watch as R, createCommentVNode as te, createVNode as pe, createBlock as he, normalizeStyle as oe, unref as W } from "vue";
2
- const Ee = ["tabindex", "onClick", "onMousemove"], re = /* @__PURE__ */ be({
1
+ import { defineComponent as Se, ref as L, onMounted as ge, onBeforeUnmount as be, createElementBlock as X, openBlock as G, normalizeClass as oe, createElementVNode as ae, Fragment as we, renderList as Ne, toDisplayString as He, nextTick as xe, computed as c, watch as F, createCommentVNode as ne, createVNode as ye, createBlock as ke, normalizeStyle as ue, unref as O } from "vue";
2
+ const Le = ["tabindex", "onClick", "onMousemove"], de = /* @__PURE__ */ Se({
3
3
  __name: "TimeColumn",
4
4
  props: {
5
5
  items: {},
6
6
  activeIndex: {}
7
7
  },
8
8
  emits: ["update:activeIndex", "select"],
9
- setup(t, { emit: o }) {
10
- const s = t, n = o, h = N(null), b = N(!1);
9
+ setup(e, { emit: n }) {
10
+ const s = e, t = n, p = L(null), b = L(!1);
11
11
  let l = null;
12
- function D(f) {
13
- const x = Array.from(f.querySelectorAll(".timepicker-option"));
14
- if (!x.length) return 0;
12
+ function E(f) {
13
+ const A = Array.from(f.querySelectorAll(".timepicker-option"));
14
+ if (!A.length) return 0;
15
15
  const S = f.scrollTop + f.clientHeight / 2;
16
- let w = 0, P = Number.POSITIVE_INFINITY;
17
- for (let A = 0; A < x.length; A++) {
18
- const B = x[A], r = B.offsetTop + B.offsetHeight / 2, u = Math.abs(r - S);
19
- u < P && (P = u, w = A);
16
+ let D = 0, $ = Number.POSITIVE_INFINITY;
17
+ for (let I = 0; I < A.length; I++) {
18
+ const K = A[I], r = K.offsetTop + K.offsetHeight / 2, u = Math.abs(r - S);
19
+ u < $ && ($ = u, D = I);
20
20
  }
21
- return w;
21
+ return D;
22
22
  }
23
- function E(f) {
23
+ function N(f) {
24
24
  if (!s.items.length) return 0;
25
25
  if (!s.items[f]?.disabled) return f;
26
- for (let x = 1; x < s.items.length; x++) {
27
- const S = f - x, w = f + x;
26
+ for (let A = 1; A < s.items.length; A++) {
27
+ const S = f - A, D = f + A;
28
28
  if (S >= 0 && !s.items[S]?.disabled) return S;
29
- if (w < s.items.length && !s.items[w]?.disabled) return w;
29
+ if (D < s.items.length && !s.items[D]?.disabled) return D;
30
30
  }
31
31
  return f;
32
32
  }
33
- function V() {
34
- ye(() => {
35
- const f = h.value;
33
+ function w() {
34
+ xe(() => {
35
+ const f = p.value;
36
36
  if (!f) return;
37
- const x = f.querySelector(
37
+ const A = f.querySelector(
38
38
  ".timepicker-option--active"
39
39
  );
40
- if (x) {
41
- const S = f.clientHeight, w = x.offsetTop, P = x.offsetHeight, A = w - S / 2 + P / 2;
42
- b.value = !0, f.scrollTo({ top: A, behavior: "auto" }), l && clearTimeout(l), l = setTimeout(() => {
40
+ if (A) {
41
+ const S = f.clientHeight, D = A.offsetTop, $ = A.offsetHeight, I = D - S / 2 + $ / 2;
42
+ b.value = !0, f.scrollTo({ top: I, behavior: "auto" }), l && clearTimeout(l), l = setTimeout(() => {
43
43
  b.value = !1;
44
44
  }, 70);
45
45
  }
46
46
  });
47
47
  }
48
- function C() {
49
- const f = h.value;
48
+ function _() {
49
+ const f = p.value;
50
50
  if (!f || b.value) return;
51
- const x = D(f), S = E(x);
51
+ const A = E(f), S = N(A);
52
52
  s.items[S]?.disabled || (H.value = S);
53
53
  }
54
- me(V), fe(() => {
54
+ ge(w), be(() => {
55
55
  l && clearTimeout(l);
56
56
  });
57
57
  function k(f) {
58
- n("update:activeIndex", f), n("select", s.items[f]?.value);
58
+ t("update:activeIndex", f), t("select", s.items[f]?.value);
59
59
  }
60
60
  function M(f) {
61
61
  k(f);
62
62
  }
63
- const H = N(s.activeIndex ?? 0);
64
- return (f, x) => (U(), Z("div", {
65
- class: ve(["timepicker-dropdown", {
63
+ const H = L(s.activeIndex ?? 0);
64
+ return (f, A) => (G(), X("div", {
65
+ class: oe(["timepicker-dropdown", {
66
66
  "timepicker-dropdown--short": f.items.length <= 3
67
67
  }])
68
68
  }, [
69
- X("div", {
69
+ ae("div", {
70
70
  ref_key: "menu",
71
- ref: h,
71
+ ref: p,
72
72
  class: "timepicker-dropdown__panel",
73
73
  role: "listbox",
74
74
  tabindex: "-1",
75
- onScroll: C
75
+ onScroll: _
76
76
  }, [
77
- (U(!0), Z(Ae, null, Pe(f.items, (S, w) => (U(), Z("div", {
77
+ (G(!0), X(we, null, Ne(f.items, (S, D) => (G(), X("div", {
78
78
  key: S.key,
79
- class: ve(["timepicker-option", {
80
- "timepicker-option--active": w === f.activeIndex,
79
+ class: oe(["timepicker-option", {
80
+ "timepicker-option--active": D === f.activeIndex,
81
81
  "timepicker-option--disabled": S.disabled,
82
- "timepicker-option--focused": w === H.value
82
+ "timepicker-option--focused": D === H.value
83
83
  }]),
84
84
  role: "option",
85
85
  tabindex: S.disabled ? -1 : 0,
86
- onClick: (P) => !S.disabled && M(w),
87
- onMousemove: (P) => !S.disabled && (H.value = w)
88
- }, De(S.text), 43, Ee))), 128))
86
+ onClick: ($) => !S.disabled && M(D),
87
+ onMousemove: ($) => !S.disabled && (H.value = D)
88
+ }, He(S.text), 43, Le))), 128))
89
89
  ], 544)
90
90
  ], 2));
91
91
  }
92
92
  });
93
- function ke(t) {
94
- return t.h * 3600 + t.m * 60 + t.s;
93
+ function Ae(e) {
94
+ return e.h * 3600 + e.m * 60 + e.s;
95
95
  }
96
- function Me(t) {
97
- return /(a|A|p|P)/.test(t);
96
+ function Pe(e) {
97
+ return /(a|A|p|P)/.test(e);
98
98
  }
99
- function He(t) {
100
- return /(p|P)/.test(t);
99
+ function Re(e) {
100
+ return /(p|P)/.test(e);
101
101
  }
102
- function ge(t) {
103
- return /k{1,2}/.test(t);
102
+ function Te(e) {
103
+ return /k{1,2}/.test(e);
104
104
  }
105
- function q(t, o) {
106
- if (!t || typeof t != "string") return { h: 0, m: 0, s: 0 };
107
- const s = t.match(/\d+/g) || [];
108
- let n = s[0] !== void 0 ? +s[0] : 0;
109
- const h = +s[1] || 0, b = +s[2] || 0;
110
- return { h: n, m: h, s: b };
105
+ function Y(e, n) {
106
+ if (!e || typeof e != "string") return { h: 0, m: 0, s: 0 };
107
+ const s = e.match(/\d+/g) || [];
108
+ let t = s[0] !== void 0 ? +s[0] : 0;
109
+ const p = +s[1] || 0, b = +s[2] || 0;
110
+ return { h: t, m: p, s: b };
111
111
  }
112
- function Ne(t) {
113
- const o = t % 12;
114
- return o === 0 ? 12 : o;
112
+ function Ce(e) {
113
+ const n = e % 12;
114
+ return n === 0 ? 12 : n;
115
115
  }
116
- function Se(t, o) {
117
- return o ? t % 12 + 12 : t % 12;
116
+ function Ie(e, n) {
117
+ return n ? e % 12 + 12 : e % 12;
118
118
  }
119
- function $e(t) {
120
- return /(s|ss)/.test(t);
119
+ function Fe(e) {
120
+ return /(s|ss)/.test(e);
121
121
  }
122
- function se(t, o) {
123
- let { h: s, m: n, s: h } = o;
124
- const b = Me(t), l = s >= 12 ? "PM" : "AM";
125
- b && (s = Ne(s));
126
- const D = s === 0 ? 24 : s, E = {
122
+ function ce(e, n) {
123
+ let { h: s, m: t, s: p } = n;
124
+ const b = Pe(e), l = s >= 12 ? "PM" : "AM";
125
+ b && (s = Ce(s));
126
+ const E = s === 0 ? 24 : s, N = {
127
127
  HH: String(s).padStart(2, "0"),
128
128
  H: String(s),
129
129
  hh: String(s).padStart(2, "0"),
130
130
  h: String(s),
131
- kk: String(D).padStart(2, "0"),
132
- k: String(D),
133
- mm: String(n).padStart(2, "0"),
134
- m: String(n),
135
- ss: String(h).padStart(2, "0"),
136
- s: String(h),
131
+ kk: String(E).padStart(2, "0"),
132
+ k: String(E),
133
+ mm: String(t).padStart(2, "0"),
134
+ m: String(t),
135
+ ss: String(p).padStart(2, "0"),
136
+ s: String(p),
137
137
  A: l,
138
138
  a: l.toLowerCase(),
139
139
  P: l,
140
140
  p: l.toLowerCase()
141
141
  };
142
- return t.replace(/HH|hh|kk|mm|ss|H|h|k|m|s|A|a|P|p/g, (V) => E[V] ?? V);
142
+ return e.replace(/HH|hh|kk|mm|ss|H|h|k|m|s|A|a|P|p/g, (w) => N[w] ?? w);
143
143
  }
144
- function O(t, o) {
145
- return ke(t) - ke(o);
144
+ function q(e, n) {
145
+ return Ae(e) - Ae(n);
146
146
  }
147
- function Le(t, o, s) {
148
- return o && O(t, o) < 0 ? { ...o } : s && O(t, s) > 0 ? { ...s } : { ...t };
147
+ function Be(e, n, s) {
148
+ return n && q(e, n) < 0 ? { ...n } : s && q(e, s) > 0 ? { ...s } : { ...e };
149
149
  }
150
- function Ie(t, o, s) {
151
- return !(o && O(t, o) < 0 || s && O(t, s) > 0);
150
+ function De(e, n, s) {
151
+ return !(n && q(e, n) < 0 || s && q(e, s) > 0);
152
152
  }
153
- function Ve(t, o) {
154
- return o.some(([s, n]) => O(t, s) >= 0 && O(t, n) <= 0);
153
+ function $e(e, n) {
154
+ return n.some(([s, t]) => q(e, s) >= 0 && q(e, t) <= 0);
155
155
  }
156
- const Te = /* @__PURE__ */ be({
156
+ const Me = /* @__PURE__ */ Se({
157
157
  __name: "TimeSelection",
158
158
  props: {
159
159
  open: { type: Boolean },
@@ -168,235 +168,238 @@ const Te = /* @__PURE__ */ be({
168
168
  secondStep: {}
169
169
  },
170
170
  emits: ["update:initTime", "open", "close", "update:open"],
171
- setup(t, { emit: o }) {
171
+ setup(e, { emit: n }) {
172
172
  function s(a) {
173
173
  return Math.max(1, a ?? 1);
174
174
  }
175
- const n = p(() => Me(l.format)), h = p(() => $e(l.format)), b = p(() => ge(l.format)), l = t, D = o, E = p({
175
+ const t = c(() => Pe(l.format)), p = c(() => Fe(l.format)), b = c(() => Te(l.format)), l = e, E = n, N = c({
176
176
  get: () => l.open ?? !1,
177
177
  set: (a) => {
178
178
  const d = l.open ?? !1;
179
- a !== d && (D("update:open", a), D(a ? "open" : "close"));
179
+ a !== d && (E("update:open", a), E(a ? "open" : "close"));
180
180
  }
181
- }), V = N(null);
182
- function C(a) {
183
- if (!E.value) return;
181
+ }), w = L(null);
182
+ function _(a) {
183
+ if (!N.value) return;
184
184
  const d = a.target;
185
- V.value && !V.value.contains(d) && (E.value = !1);
185
+ w.value && !w.value.contains(d) && (N.value = !1);
186
186
  }
187
- me(() => document.addEventListener("mousedown", C)), fe(
188
- () => document.removeEventListener("mousedown", C)
187
+ ge(() => document.addEventListener("mousedown", _)), be(
188
+ () => document.removeEventListener("mousedown", _)
189
189
  );
190
190
  function k(a) {
191
- a.key === "Escape" && E.value && (E.value = !1);
191
+ a.key === "Escape" && N.value && (N.value = !1);
192
192
  }
193
- me(() => document.addEventListener("keydown", k)), fe(() => document.removeEventListener("keydown", k));
194
- const M = N(Math.floor(l.initTime.h / l.hourStep) || 0), H = N(Math.floor(l.initTime.m / l.minuteStep) || 0), f = N(Math.floor(l.initTime.s / l.secondStep) || 0);
195
- R(
193
+ ge(() => document.addEventListener("keydown", k)), be(() => document.removeEventListener("keydown", k));
194
+ const M = L(Math.floor(l.initTime.h / l.hourStep) || 0), H = L(Math.floor(l.initTime.m / l.minuteStep) || 0), f = L(Math.floor(l.initTime.s / l.secondStep) || 0);
195
+ F(
196
196
  () => l.initTime,
197
197
  (a) => {
198
- const d = s(l.hourStep), v = s(l.minuteStep), e = s(l.secondStep);
199
- let i = a.h;
200
- n.value ? (P.value = a.h >= 12 ? 1 : 0, i = a.h % 12) : b.value && a.h === 0 && (i = 24), M.value = Math.floor(i / d), H.value = Math.floor(a.m / v), f.value = Math.floor(a.s / e);
198
+ const d = s(l.hourStep), h = s(l.minuteStep), T = s(l.secondStep);
199
+ let V = a.h;
200
+ t.value ? ($.value = a.h >= 12 ? 1 : 0, V = a.h % 12) : b.value && a.h === 0 && (V = 24), M.value = Math.floor(V / d), H.value = Math.floor(a.m / h), f.value = Math.floor(a.s / T);
201
201
  }
202
202
  );
203
- function x(a, d) {
204
- const v = [];
205
- for (let e = 0; e < a; e += s(d))
206
- v.push({ key: e, value: e, text: String(e).padStart(2, "0") });
207
- return v;
203
+ function A(a, d) {
204
+ const h = [];
205
+ for (let T = 0; T < a; T += s(d))
206
+ h.push({ key: T, value: T, text: String(T).padStart(2, "0") });
207
+ return h;
208
208
  }
209
209
  function S(a, d) {
210
- const v = s(d), e = [];
211
- for (let i = 0; i < 12; i += v) {
212
- const m = i === 0 ? 12 : i, F = a ? i === 0 ? 12 : i + 12 : i;
213
- e.push({ key: F, value: F, text: String(m).padStart(2, "0") });
210
+ const h = s(d), T = [];
211
+ for (let V = 0; V < 12; V += h) {
212
+ const ie = V === 0 ? 12 : V, j = a ? V === 0 ? 12 : V + 12 : V;
213
+ T.push({ key: j, value: j, text: String(ie).padStart(2, "0") });
214
214
  }
215
- return e;
215
+ return T;
216
216
  }
217
- function w(a) {
218
- const d = s(a), v = [];
219
- for (let e = 0; e < 24; e += d) {
220
- const i = e === 0 ? 24 : e;
221
- v.push({ key: e, value: e, text: String(i).padStart(2, "0") });
217
+ function D(a) {
218
+ const d = s(a), h = [];
219
+ for (let T = 0; T < 24; T += d) {
220
+ const V = T === 0 ? 24 : T;
221
+ h.push({ key: T, value: T, text: String(V).padStart(2, "0") });
222
222
  }
223
- return v;
223
+ return h;
224
224
  }
225
- const P = N(He(l.format) ? 1 : 0), A = p(() => {
226
- if (!n.value)
227
- return b.value ? w(l.hourStep) : x(24, l.hourStep);
228
- const a = P.value === 1;
225
+ const $ = L(Re(l.format) ? 1 : 0), I = c(() => {
226
+ if (!t.value)
227
+ return b.value ? D(l.hourStep) : A(24, l.hourStep);
228
+ const a = $.value === 1;
229
229
  return S(a, l.hourStep);
230
- }), B = p(() => x(60, l.minuteStep)), r = p(() => x(60, l.secondStep)), u = p(() => /\s[ap]$/.test(l.format)), c = p(() => {
230
+ }), K = c(() => A(60, l.minuteStep)), r = c(() => A(60, l.secondStep)), u = c(() => /\s[ap]$/.test(l.format)), m = c(() => {
231
231
  const a = u.value ? "am" : "AM", d = u.value ? "pm" : "PM";
232
232
  return [
233
233
  { key: "AM", value: "AM", text: a },
234
234
  { key: "PM", value: "PM", text: d }
235
235
  ];
236
- }), y = p(
237
- () => B.value.map((a) => Number(a.value ?? 0))
238
- ), g = p(() => h.value ? r.value.map((a) => Number(a.value ?? 0)) : [0]);
239
- function T(a) {
236
+ }), y = c(
237
+ () => K.value.map((a) => Number(a.value ?? 0))
238
+ ), v = c(() => p.value ? r.value.map((a) => Number(a.value ?? 0)) : [0]);
239
+ function x(a) {
240
240
  return Number(a.value ?? 0);
241
241
  }
242
- function G(a) {
243
- const d = a.findIndex((v) => !v.disabled);
242
+ function z(a) {
243
+ const d = a.findIndex((h) => !h.disabled);
244
244
  return d >= 0 ? d : 0;
245
245
  }
246
- function z(a) {
247
- return !(!Ie(a, l.minTime, l.maxTime) || Ve(a, l.disabledRanges ?? []) || l.isTimeDisabled?.(a));
246
+ function J(a) {
247
+ return !(!De(a, l.minTime, l.maxTime) || $e(a, l.disabledRanges ?? []) || l.isTimeDisabled?.(a));
248
248
  }
249
- const _ = p(() => A.value.map((a) => {
250
- const d = T(a), v = y.value.some(
251
- (e) => g.value.some(
252
- (i) => z({ h: d, m: e, s: i })
249
+ const U = c(() => I.value.map((a) => {
250
+ const d = x(a), h = y.value.some(
251
+ (T) => v.value.some(
252
+ (V) => J({ h: d, m: T, s: V })
253
253
  )
254
254
  );
255
255
  return {
256
256
  ...a,
257
- disabled: !v
257
+ disabled: !h
258
258
  };
259
- })), Y = p(() => {
260
- const a = Number(A.value[M.value]?.value ?? 0);
261
- return B.value.map((d) => {
262
- const v = Number(d.value ?? 0), e = g.value.some(
263
- (i) => z({ h: a, m: v, s: i })
259
+ })), Z = c(() => {
260
+ const a = Number(I.value[M.value]?.value ?? 0);
261
+ return K.value.map((d) => {
262
+ const h = Number(d.value ?? 0), T = v.value.some(
263
+ (V) => J({ h: a, m: h, s: V })
264
264
  );
265
265
  return {
266
266
  ...d,
267
- disabled: !e
267
+ disabled: !T
268
268
  };
269
269
  });
270
- }), j = p(() => {
271
- const a = Number(A.value[M.value]?.value ?? 0), d = Number(
272
- B.value[H.value]?.value ?? 0
270
+ }), re = c(() => {
271
+ const a = Number(I.value[M.value]?.value ?? 0), d = Number(
272
+ K.value[H.value]?.value ?? 0
273
273
  );
274
- return r.value.map((v) => {
275
- const e = Number(v.value ?? 0);
274
+ return r.value.map((h) => {
275
+ const T = Number(h.value ?? 0);
276
276
  return {
277
- ...v,
278
- disabled: !z({
277
+ ...h,
278
+ disabled: !J({
279
279
  h: a,
280
280
  m: d,
281
- s: e
281
+ s: T
282
282
  })
283
283
  };
284
284
  });
285
- }), ne = p(() => {
286
- if (!n.value) return c.value;
287
- const a = Number(B.value[H.value]?.value ?? 0), d = h.value ? Number(r.value[f.value]?.value ?? 0) : 0;
288
- return c.value.map((v) => {
289
- const e = v.value === "PM", i = S(e, l.hourStep).some(
290
- (m) => z({
291
- h: Number(m.value ?? 0),
285
+ }), se = c(() => {
286
+ if (!t.value) return m.value;
287
+ const a = Number(K.value[H.value]?.value ?? 0), d = p.value ? Number(r.value[f.value]?.value ?? 0) : 0;
288
+ return m.value.map((h) => {
289
+ const T = h.value === "PM", V = S(T, l.hourStep).some(
290
+ (ie) => J({
291
+ h: Number(ie.value ?? 0),
292
292
  m: a,
293
293
  s: d
294
294
  })
295
295
  );
296
296
  return {
297
- ...v,
298
- disabled: !i
297
+ ...h,
298
+ disabled: !V
299
299
  };
300
300
  });
301
- }), ue = p(() => P.value === 1 ? "PM" : "AM"), ie = p(() => {
302
- const a = Number(A.value[M.value]?.value ?? 0);
303
- return n.value ? ue.value === "PM" ? Se(a, !0) : Se(a, !1) : b.value && a === 24 ? 0 : a;
304
- }), L = p(
305
- () => Number(B.value[H.value]?.value ?? 0)
306
- ), de = p(
301
+ }), fe = c(() => $.value === 1 ? "PM" : "AM"), pe = c(() => {
302
+ const a = Number(I.value[M.value]?.value ?? 0);
303
+ return t.value ? fe.value === "PM" ? Ie(a, !0) : Ie(a, !1) : b.value && a === 24 ? 0 : a;
304
+ }), ee = c(
305
+ () => Number(K.value[H.value]?.value ?? 0)
306
+ ), ve = c(
307
307
  () => Number(r.value[f.value]?.value ?? 0)
308
308
  );
309
- function $(a, d, v) {
310
- a.length && (!a[d] || a[d].disabled) && v(G(a));
309
+ function te(a, d, h) {
310
+ a.length && (!a[d] || a[d].disabled) && h(z(a));
311
311
  }
312
- R(_, (a) => {
313
- $(a, M.value, (d) => {
312
+ F(U, (a) => {
313
+ te(a, M.value, (d) => {
314
314
  M.value = d;
315
315
  });
316
- }), R(Y, (a) => {
317
- $(a, H.value, (d) => {
316
+ }), F(Z, (a) => {
317
+ te(a, H.value, (d) => {
318
318
  H.value = d;
319
319
  });
320
- }), R(j, (a) => {
321
- !h.value || !a.length || $(a, f.value, (d) => {
320
+ }), F(re, (a) => {
321
+ !p.value || !a.length || te(a, f.value, (d) => {
322
322
  f.value = d;
323
323
  });
324
- }), R(ne, (a) => {
325
- !n.value || !a.length || $(a, P.value, (d) => {
326
- P.value = d;
324
+ }), F(se, (a) => {
325
+ !t.value || !a.length || te(a, $.value, (d) => {
326
+ $.value = d;
327
327
  });
328
328
  });
329
- function ce(a) {
330
- !h.value && !n.value && ee();
329
+ function le(a) {
330
+ !p.value && !t.value && C();
331
331
  }
332
- function ae(a) {
333
- n.value || ee();
332
+ function R(a) {
333
+ t.value || C();
334
334
  }
335
- function Q(a) {
336
- ee();
335
+ function he(a) {
336
+ C();
337
337
  }
338
- function ee() {
339
- E.value = !1;
338
+ function C() {
339
+ N.value = !1;
340
340
  }
341
- return R(
342
- [ie, L, de],
343
- ([a, d, v]) => {
344
- D("update:initTime", { h: a, m: d, s: v });
341
+ return F(
342
+ [pe, ee, ve],
343
+ ([a, d, h]) => {
344
+ E("update:initTime", { h: a, m: d, s: h });
345
345
  },
346
346
  { immediate: !0 }
347
- ), (a, d) => E.value ? (U(), Z("div", {
347
+ ), (a, d) => N.value ? (G(), X("div", {
348
348
  key: 0,
349
349
  class: "vtp-cols",
350
350
  ref_key: "root",
351
- ref: V
351
+ ref: w
352
352
  }, [
353
- pe(re, {
353
+ ye(de, {
354
354
  activeIndex: M.value,
355
- "onUpdate:activeIndex": d[0] || (d[0] = (v) => M.value = v),
356
- items: _.value,
355
+ "onUpdate:activeIndex": d[0] || (d[0] = (h) => M.value = h),
356
+ items: U.value,
357
357
  label: "Hours"
358
358
  }, null, 8, ["activeIndex", "items"]),
359
- pe(re, {
359
+ ye(de, {
360
360
  activeIndex: H.value,
361
- "onUpdate:activeIndex": d[1] || (d[1] = (v) => H.value = v),
362
- items: Y.value,
361
+ "onUpdate:activeIndex": d[1] || (d[1] = (h) => H.value = h),
362
+ items: Z.value,
363
363
  label: "Minutes",
364
- onSelect: ce
364
+ onSelect: le
365
365
  }, null, 8, ["activeIndex", "items"]),
366
- h.value ? (U(), he(re, {
366
+ p.value ? (G(), ke(de, {
367
367
  key: 0,
368
368
  activeIndex: f.value,
369
- "onUpdate:activeIndex": d[2] || (d[2] = (v) => f.value = v),
370
- items: j.value,
369
+ "onUpdate:activeIndex": d[2] || (d[2] = (h) => f.value = h),
370
+ items: re.value,
371
371
  label: "Seconds",
372
- onSelect: ae
373
- }, null, 8, ["activeIndex", "items"])) : te("", !0),
374
- n.value ? (U(), he(re, {
372
+ onSelect: R
373
+ }, null, 8, ["activeIndex", "items"])) : ne("", !0),
374
+ t.value ? (G(), ke(de, {
375
375
  key: 1,
376
- activeIndex: P.value,
377
- "onUpdate:activeIndex": d[3] || (d[3] = (v) => P.value = v),
378
- items: ne.value,
376
+ activeIndex: $.value,
377
+ "onUpdate:activeIndex": d[3] || (d[3] = (h) => $.value = h),
378
+ items: se.value,
379
379
  label: "AM/PM",
380
- onSelect: Q
381
- }, null, 8, ["activeIndex", "items"])) : te("", !0)
382
- ], 512)) : te("", !0);
380
+ onSelect: he
381
+ }, null, 8, ["activeIndex", "items"])) : ne("", !0)
382
+ ], 512)) : ne("", !0);
383
383
  }
384
384
  });
385
- function Fe(t) {
386
- return typeof t == "string" ? J.test(t) : Array.isArray(t) ? t.length === 2 && J.test(t[0] ?? "") && J.test(t[1] ?? "") : !1;
385
+ function _e(e) {
386
+ return typeof e == "string" ? Q.test(e) : Array.isArray(e) ? e.length === 2 && Q.test(e[0] ?? "") && Q.test(e[1] ?? "") : !1;
387
+ }
388
+ function me(e) {
389
+ return e == null || typeof e == "string" || typeof e == "number";
387
390
  }
388
- function le(t) {
389
- return t == null || typeof t == "string" || typeof t == "number";
391
+ function We(e) {
392
+ return e == null || typeof e == "string" || Array.isArray(e) || typeof e == "object" && e !== null;
390
393
  }
391
- const we = /^(HH|H|hh|h|kk|k):(mm|m)(?::(ss|s))?(?:\s*(A|a|P|p))?$/, J = /^([01]\d|2[0-3]):([0-5]\d)(:([0-5]\d))?$/, K = typeof __DEV__ < "u" ? __DEV__ : typeof process < "u" && process.env && process.env.NODE_ENV !== "production", Re = {
394
+ const Ee = /^(HH|H|hh|h|kk|k):(mm|m)(?::(ss|s))?(?:\s*(A|a|P|p))?$/, Q = /^([01]\d|2[0-3]):([0-5]\d)(:([0-5]\d))?$/, B = typeof __DEV__ < "u" ? __DEV__ : typeof process < "u" && process.env && process.env.NODE_ENV !== "production", Ke = {
392
395
  modelValue: {
393
396
  type: [String, Array],
394
397
  default: void 0,
395
- validator: (t) => {
396
- let o;
397
- return Array.isArray(t) ? o = t.length === 2 && t.every((s) => J.test(s)) : o = t == null || J.test(t), !o && K && console.error(
398
- `[VueTimepicker] \`modelValue\` is wrong. Received: ${t}`
399
- ), o;
398
+ validator: (e) => {
399
+ let n;
400
+ return Array.isArray(e) ? n = e.length === 2 && e.every((s) => Q.test(s)) : n = e == null || Q.test(e), !n && B && console.error(
401
+ `[VueTimepicker] \`modelValue\` is wrong. Received: ${e}`
402
+ ), n;
400
403
  }
401
404
  },
402
405
  range: {
@@ -407,33 +410,37 @@ const we = /^(HH|H|hh|h|kk|k):(mm|m)(?::(ss|s))?(?:\s*(A|a|P|p))?$/, J = /^([01]
407
410
  type: Boolean,
408
411
  default: !1
409
412
  },
413
+ hideDropdown: {
414
+ type: Boolean,
415
+ default: !1
416
+ },
410
417
  hourStep: { type: Number, default: 1 },
411
418
  minuteStep: { type: Number, default: 1 },
412
419
  secondStep: { type: Number, default: 1 },
413
420
  minTime: {
414
421
  type: String,
415
422
  default: void 0,
416
- validator: (t) => {
417
- const o = t == null || J.test(t);
418
- return !o && K && console.error(`[VueTimepicker] \`minTime\` is wrong. Received: ${t}`), o;
423
+ validator: (e) => {
424
+ const n = e == null || Q.test(e);
425
+ return !n && B && console.error(`[VueTimepicker] \`minTime\` is wrong. Received: ${e}`), n;
419
426
  }
420
427
  },
421
428
  maxTime: {
422
429
  type: String,
423
430
  default: void 0,
424
- validator: (t) => {
425
- const o = t == null || J.test(t);
426
- return !o && K && console.error(`[VueTimepicker] \`maxTime\` is wrong. Received: ${t}`), o;
431
+ validator: (e) => {
432
+ const n = e == null || Q.test(e);
433
+ return !n && B && console.error(`[VueTimepicker] \`maxTime\` is wrong. Received: ${e}`), n;
427
434
  }
428
435
  },
429
436
  disabledTimes: {
430
437
  type: Array,
431
438
  default: void 0,
432
- validator: (t) => {
433
- const o = t == null || t.every(Fe);
434
- return !o && K && console.error(
435
- `[VueTimepicker] \`disabledTimes\` is wrong. Received: ${JSON.stringify(t)}`
436
- ), o;
439
+ validator: (e) => {
440
+ const n = e == null || e.every(_e);
441
+ return !n && B && console.error(
442
+ `[VueTimepicker] \`disabledTimes\` is wrong. Received: ${JSON.stringify(e)}`
443
+ ), n;
437
444
  }
438
445
  },
439
446
  isTimeDisabled: {
@@ -443,535 +450,603 @@ const we = /^(HH|H|hh|h|kk|k):(mm|m)(?::(ss|s))?(?:\s*(A|a|P|p))?$/, J = /^([01]
443
450
  format: {
444
451
  type: String,
445
452
  default: "HH:mm",
446
- validator: (t) => {
447
- const o = we.test(t);
448
- return !o && K && console.error(
449
- `[VueTimepicker] \`format\` format is wrong. Received: ${t}`
450
- ), o;
453
+ validator: (e) => {
454
+ const n = Ee.test(e);
455
+ return !n && B && console.error(
456
+ `[VueTimepicker] \`format\` format is wrong. Received: ${e}`
457
+ ), n;
451
458
  }
452
459
  },
453
460
  placeholder: {
454
461
  type: String,
455
462
  default: "Select time"
456
463
  },
464
+ id: {
465
+ type: String,
466
+ default: void 0,
467
+ validator: (e) => {
468
+ const n = e == null || typeof e == "string";
469
+ return !n && B && console.error(
470
+ `[VueTimepicker] \`id\` must be a string. Received: ${e}`
471
+ ), n;
472
+ }
473
+ },
474
+ name: {
475
+ type: String,
476
+ default: void 0,
477
+ validator: (e) => {
478
+ const n = e == null || typeof e == "string";
479
+ return !n && B && console.error(
480
+ `[VueTimepicker] \`name\` must be a string. Received: ${e}`
481
+ ), n;
482
+ }
483
+ },
484
+ tabindex: {
485
+ type: Number,
486
+ default: 0,
487
+ validator: (e) => {
488
+ const n = Number.isInteger(e);
489
+ return !n && B && console.error(
490
+ `[VueTimepicker] \`tabindex\` must be an integer. Received: ${e}`
491
+ ), n;
492
+ }
493
+ },
494
+ autocomplete: {
495
+ type: String,
496
+ default: "off",
497
+ validator: (e) => {
498
+ const n = typeof e == "string";
499
+ return !n && B && console.error(
500
+ `[VueTimepicker] \`autocomplete\` must be a string. Received: ${e}`
501
+ ), n;
502
+ }
503
+ },
504
+ inputClass: {
505
+ type: [String, Array, Object],
506
+ default: void 0,
507
+ validator: (e) => {
508
+ const n = We(e);
509
+ return !n && B && console.error(
510
+ `[VueTimepicker] \`inputClass\` must be a string, array, or object. Received: ${e}`
511
+ ), n;
512
+ }
513
+ },
457
514
  inputWidth: {
458
515
  type: [String, Number],
459
516
  default: void 0,
460
- validator: (t) => {
461
- const o = le(t);
462
- return !o && K && console.error(
463
- `[VueTimepicker] \`inputWidth\` must be a string or number. Received: ${t}`
464
- ), o;
517
+ validator: (e) => {
518
+ const n = me(e);
519
+ return !n && B && console.error(
520
+ `[VueTimepicker] \`inputWidth\` must be a string or number. Received: ${e}`
521
+ ), n;
465
522
  }
466
523
  },
467
524
  componentWidth: {
468
525
  type: [String, Number],
469
526
  default: void 0,
470
- validator: (t) => {
471
- const o = le(t);
472
- return !o && K && console.error(
473
- `[VueTimepicker] \`componentWidth\` must be a string or number. Received: ${t}`
474
- ), o;
527
+ validator: (e) => {
528
+ const n = me(e);
529
+ return !n && B && console.error(
530
+ `[VueTimepicker] \`componentWidth\` must be a string or number. Received: ${e}`
531
+ ), n;
475
532
  }
476
533
  },
477
534
  minInputWidth: {
478
535
  type: [String, Number],
479
536
  default: void 0,
480
- validator: (t) => {
481
- const o = le(t);
482
- return !o && K && console.error(
483
- `[VueTimepicker] \`minInputWidth\` must be a string or number. Received: ${t}`
484
- ), o;
537
+ validator: (e) => {
538
+ const n = me(e);
539
+ return !n && B && console.error(
540
+ `[VueTimepicker] \`minInputWidth\` must be a string or number. Received: ${e}`
541
+ ), n;
485
542
  }
486
543
  },
487
544
  maxInputWidth: {
488
545
  type: [String, Number],
489
546
  default: void 0,
490
- validator: (t) => {
491
- const o = le(t);
492
- return !o && K && console.error(
493
- `[VueTimepicker] \`maxInputWidth\` must be a string or number. Received: ${t}`
494
- ), o;
547
+ validator: (e) => {
548
+ const n = me(e);
549
+ return !n && B && console.error(
550
+ `[VueTimepicker] \`maxInputWidth\` must be a string or number. Received: ${e}`
551
+ ), n;
495
552
  }
496
553
  },
497
554
  size: {
498
555
  type: String,
499
556
  default: "md",
500
- validator: (t) => {
501
- const o = t === "xs" || t === "sm" || t === "md" || t === "lg" || t === "xl";
502
- return !o && K && console.error(`[VueTimepicker] \`size\` is wrong. Received: ${t}`), o;
557
+ validator: (e) => {
558
+ const n = e === "xs" || e === "sm" || e === "md" || e === "lg" || e === "xl";
559
+ return !n && B && console.error(`[VueTimepicker] \`size\` is wrong. Received: ${e}`), n;
503
560
  }
504
561
  }
505
562
  };
506
- function Ce(t) {
507
- const o = we.exec(t);
508
- if (!o) throw new Error(`[useTimeMask] Invalid format: ${t}`);
509
- const [, s, n, h, b] = o, l = [], D = !!b, E = /^k{1,2}$/.test(s);
510
- let V = 0, C = 23;
511
- return D ? (V = 1, C = 12) : E && (V = 1, C = 24), l.push({ token: s, min: V, max: C }), l.push({ token: n, min: 0, max: 59 }), h && l.push({ token: h, min: 0, max: 59 }), {
563
+ function Ue(e) {
564
+ const n = Ee.exec(e);
565
+ if (!n) throw new Error(`[useTimeMask] Invalid format: ${e}`);
566
+ const [, s, t, p, b] = n, l = [], E = !!b, N = /^k{1,2}$/.test(s);
567
+ let w = 0, _ = 23;
568
+ return E ? (w = 1, _ = 12) : N && (w = 1, _ = 24), l.push({ token: s, min: w, max: _ }), l.push({ token: t, min: 0, max: 59 }), p && l.push({ token: p, min: 0, max: 59 }), {
512
569
  digitGroups: l,
513
570
  hasAmPm: !!b,
514
571
  ampmLowercase: b === "a" || b === "p"
515
572
  };
516
573
  }
517
- function xe(t) {
518
- const o = p(() => Ce(t.value)), s = p(() => o.value.digitGroups.length * 2), n = N([]), h = N("AM"), b = N("");
574
+ function Ve(e) {
575
+ const n = c(() => Ue(e.value)), s = c(() => n.value.digitGroups.length * 2), t = L([]), p = L("AM"), b = L("");
519
576
  function l() {
520
- const { digitGroups: r, hasAmPm: u } = o.value;
521
- let c = "", y = 0;
522
- for (let g = 0; g < r.length; g++) {
523
- for (let T = 0; T < 2; T++)
524
- y < n.value.length && (c += String(n.value[y]), y++);
525
- y === (g + 1) * 2 && g < r.length - 1 && (c += ":");
577
+ const { digitGroups: r, hasAmPm: u } = n.value;
578
+ let m = "", y = 0;
579
+ for (let v = 0; v < r.length; v++) {
580
+ for (let x = 0; x < 2; x++)
581
+ y < t.value.length && (m += String(t.value[y]), y++);
582
+ y === (v + 1) * 2 && v < r.length - 1 && (m += ":");
526
583
  }
527
584
  if (u && y >= s.value) {
528
- const g = o.value.ampmLowercase ? h.value.toLowerCase() : h.value;
529
- c += " " + g;
585
+ const v = n.value.ampmLowercase ? p.value.toLowerCase() : p.value;
586
+ m += " " + v;
530
587
  }
531
- return c;
588
+ return m;
532
589
  }
533
- function D(r) {
590
+ function E(r) {
534
591
  const u = r * 2;
535
- if (n.value.length < u + 2) return;
536
- const c = n.value[u] * 10 + n.value[u + 1], { min: y, max: g } = o.value.digitGroups[r], T = Math.max(y, Math.min(g, c));
537
- T !== c && (n.value[u] = Math.floor(T / 10), n.value[u + 1] = T % 10);
592
+ if (t.value.length < u + 2) return;
593
+ const m = t.value[u] * 10 + t.value[u + 1], { min: y, max: v } = n.value.digitGroups[r], x = Math.max(y, Math.min(v, m));
594
+ x !== m && (t.value[u] = Math.floor(x / 10), t.value[u + 1] = x % 10);
538
595
  }
539
- function E() {
540
- for (let r = 0; r < o.value.digitGroups.length; r++)
541
- D(r);
596
+ function N() {
597
+ for (let r = 0; r < n.value.digitGroups.length; r++)
598
+ E(r);
542
599
  }
543
- function V(r) {
600
+ function w(r) {
544
601
  const u = l();
545
- let c = 0;
602
+ let m = 0;
546
603
  for (let y = 0; y < Math.min(r, u.length); y++)
547
- /\d/.test(u[y]) && c++;
548
- return c;
604
+ /\d/.test(u[y]) && m++;
605
+ return m;
549
606
  }
550
- function C(r) {
607
+ function _(r) {
551
608
  return r + Math.floor(r / 2);
552
609
  }
553
610
  function k(r, u) {
554
611
  if (r >= s.value) return s.value;
555
- const c = [...n.value];
556
- c[r] = u, n.value = c;
612
+ const m = [...t.value];
613
+ m[r] = u, t.value = m;
557
614
  const y = Math.floor(r / 2);
558
- return D(y), Math.min(r + 1, s.value);
615
+ return E(y), Math.min(r + 1, s.value);
559
616
  }
560
617
  function M(r, u) {
561
- const c = l();
562
- b.value = c, r.value = c;
563
- const y = u !== void 0 ? Math.min(C(u), c.length) : c.length;
564
- r.selectionStart = r.selectionEnd = y, ye(() => {
618
+ const m = l();
619
+ b.value = m, r.value = m;
620
+ const y = u !== void 0 ? Math.min(_(u), m.length) : m.length;
621
+ r.selectionStart = r.selectionEnd = y, xe(() => {
565
622
  document.activeElement === r && (r.selectionStart = r.selectionEnd = y);
566
623
  });
567
624
  }
568
625
  function H(r) {
569
- const u = r.key, c = r.target;
626
+ const u = r.key, m = r.target;
570
627
  if (["Tab", "Escape", "ArrowLeft", "ArrowRight", "Home", "End"].includes(
571
628
  u
572
629
  ) || r.metaKey || r.ctrlKey)
573
630
  return;
574
631
  r.preventDefault();
575
- const y = c.selectionStart ?? 0, g = V(y);
632
+ const y = m.selectionStart ?? 0, v = w(y);
576
633
  if (u === "Backspace") {
577
- g > 0 && M(c, g - 1);
634
+ v > 0 && M(m, v - 1);
578
635
  return;
579
636
  }
580
637
  if (u !== "Delete") {
581
- if (o.value.hasAmPm) {
582
- const T = u.toLowerCase();
583
- if (T === "a") {
584
- h.value = "AM", M(c, g);
638
+ if (n.value.hasAmPm) {
639
+ const x = u.toLowerCase();
640
+ if (x === "a") {
641
+ p.value = "AM", M(m, v);
585
642
  return;
586
643
  }
587
- if (T === "p") {
588
- h.value = "PM", M(c, g);
644
+ if (x === "p") {
645
+ p.value = "PM", M(m, v);
589
646
  return;
590
647
  }
591
648
  }
592
649
  if (/^\d$/.test(u)) {
593
- const T = k(g, +u);
594
- M(c, T);
650
+ const x = k(v, +u);
651
+ M(m, x);
595
652
  return;
596
653
  }
597
654
  }
598
655
  }
599
656
  function f(r) {
600
- const u = r.target, c = u.value.replace(/\D/g, "").split("").map(Number).slice(0, s.value);
601
- n.value = c, E(), o.value.hasAmPm && (/p/i.test(u.value) ? h.value = "PM" : /a/i.test(u.value) && (h.value = "AM")), M(u);
657
+ const u = r.target, m = u.value.replace(/\D/g, "").split("").map(Number).slice(0, s.value);
658
+ t.value = m, N(), n.value.hasAmPm && (/p/i.test(u.value) ? p.value = "PM" : /a/i.test(u.value) && (p.value = "AM")), M(u);
602
659
  }
603
- function x(r) {
660
+ function A(r) {
604
661
  r.preventDefault();
605
- const u = r.clipboardData?.getData("text") ?? "", c = r.target, y = c.selectionStart ?? 0, g = u.replace(/\D/g, "").split("").map(Number);
606
- let T = V(y);
607
- for (const G of g) {
608
- if (T >= s.value) break;
609
- T = k(T, G);
662
+ const u = r.clipboardData?.getData("text") ?? "", m = r.target, y = m.selectionStart ?? 0, v = u.replace(/\D/g, "").split("").map(Number);
663
+ let x = w(y);
664
+ for (const z of v) {
665
+ if (x >= s.value) break;
666
+ x = k(x, z);
610
667
  }
611
- o.value.hasAmPm && (/p\.?m\.?/i.test(u) ? h.value = "PM" : /a\.?m\.?/i.test(u) && (h.value = "AM")), M(c, T);
668
+ n.value.hasAmPm && (/p\.?m\.?/i.test(u) ? p.value = "PM" : /a\.?m\.?/i.test(u) && (p.value = "AM")), M(m, x);
612
669
  }
613
670
  function S(r) {
614
- const { digitGroups: u, hasAmPm: c } = o.value, y = [];
615
- let g = r.h;
616
- c ? (h.value = r.h >= 12 ? "PM" : "AM", g = r.h % 12, g === 0 && (g = 12)) : ge(t.value) && (g = r.h === 0 ? 24 : r.h), y.push(Math.floor(g / 10), g % 10), y.push(Math.floor(r.m / 10), r.m % 10), u.length > 2 && y.push(Math.floor(r.s / 10), r.s % 10), n.value = y, b.value = l();
671
+ const { digitGroups: u, hasAmPm: m } = n.value, y = [];
672
+ let v = r.h;
673
+ m ? (p.value = r.h >= 12 ? "PM" : "AM", v = r.h % 12, v === 0 && (v = 12)) : Te(e.value) && (v = r.h === 0 ? 24 : r.h), y.push(Math.floor(v / 10), v % 10), y.push(Math.floor(r.m / 10), r.m % 10), u.length > 2 && y.push(Math.floor(r.s / 10), r.s % 10), t.value = y, b.value = l();
617
674
  }
618
- function w() {
619
- n.value = [], b.value = "", h.value = "AM";
675
+ function D() {
676
+ t.value = [], b.value = "", p.value = "AM";
620
677
  }
621
- function P() {
622
- if (n.value.length < s.value) return null;
678
+ function $() {
679
+ if (t.value.length < s.value) return null;
623
680
  const r = [];
624
- for (let g = 0; g < o.value.digitGroups.length; g++) {
625
- const T = g * 2;
626
- r.push(n.value[T] * 10 + n.value[T + 1]);
681
+ for (let v = 0; v < n.value.digitGroups.length; v++) {
682
+ const x = v * 2;
683
+ r.push(t.value[x] * 10 + t.value[x + 1]);
627
684
  }
628
685
  let u = r[0];
629
- const c = r[1], y = r[2] ?? 0;
630
- return o.value.hasAmPm && (u = h.value === "PM" ? u === 12 ? 12 : u + 12 : u === 12 ? 0 : u), ge(t.value) && u === 24 && (u = 0), { h: u, m: c, s: y };
686
+ const m = r[1], y = r[2] ?? 0;
687
+ return n.value.hasAmPm && (u = p.value === "PM" ? u === 12 ? 12 : u + 12 : u === 12 ? 0 : u), Te(e.value) && u === 24 && (u = 0), { h: u, m, s: y };
631
688
  }
632
- const A = p(
633
- () => n.value.length >= s.value
634
- ), B = p(() => o.value.ampmLowercase);
689
+ const I = c(
690
+ () => t.value.length >= s.value
691
+ ), K = c(() => n.value.ampmLowercase);
635
692
  return {
636
693
  inputValue: b,
637
694
  handleKeydown: H,
638
695
  handleInput: f,
639
- handlePaste: x,
696
+ handlePaste: A,
640
697
  setFromTime: S,
641
- clear: w,
642
- getParsedTime: P,
643
- isComplete: A,
698
+ clear: D,
699
+ getParsedTime: $,
700
+ isComplete: I,
644
701
  totalDigits: s,
645
- displayPosToDigitIndex: V,
646
- ampm: h,
647
- ampmLowercase: B
702
+ displayPosToDigitIndex: w,
703
+ ampm: p,
704
+ ampmLowercase: K
648
705
  };
649
706
  }
650
- const Be = ["data-size", "data-validation", "data-disabled"], _e = ["value", "placeholder", "disabled"], We = ["value", "placeholder", "disabled"], Ue = /* @__PURE__ */ be({
707
+ const Oe = ["data-size", "data-validation", "data-disabled"], Ge = ["id", "name", "tabindex", "autocomplete", "value", "placeholder", "disabled"], ze = ["id", "name", "tabindex", "autocomplete", "value", "placeholder", "disabled"], qe = /* @__PURE__ */ Se({
651
708
  __name: "TimePicker",
652
- props: Re,
709
+ props: Ke,
653
710
  emits: ["update:modelValue", "update:validationState", "validate", "open", "close", "error"],
654
- setup(t, { emit: o }) {
655
- const s = N(null), n = t, h = o, b = N(!1), l = N(!1), D = N("valid"), E = N("valid");
656
- function V() {
711
+ setup(e, { emit: n }) {
712
+ const s = L(null), t = e, p = n, b = L(!1), l = L(!1), E = L("valid"), N = L("valid");
713
+ function w() {
657
714
  b.value = !1, l.value = !1;
658
715
  }
659
- function C(e, i) {
660
- if (n.disabled && i) {
661
- V();
716
+ function _(i, o) {
717
+ if (t.disabled && o) {
718
+ w();
662
719
  return;
663
720
  }
664
- i && (e === "first" ? l.value = !1 : b.value = !1);
665
- }
666
- R(b, (e) => {
667
- C("first", e);
668
- }), R(l, (e) => {
669
- C("second", e);
670
- }), R(
671
- () => n.disabled,
672
- (e) => {
673
- e && V();
721
+ o && (i === "first" ? l.value = !1 : b.value = !1);
722
+ }
723
+ F(b, (i) => {
724
+ _("first", i);
725
+ }), F(l, (i) => {
726
+ _("second", i);
727
+ }), F(
728
+ () => t.disabled,
729
+ (i) => {
730
+ i && w();
731
+ }
732
+ ), F(
733
+ () => t.hideDropdown,
734
+ (i) => {
735
+ i && w();
674
736
  }
675
737
  );
676
- const k = p({
738
+ const k = c({
677
739
  get() {
678
- if (Array.isArray(n.modelValue)) {
679
- const [e, i] = n.modelValue;
680
- return [q(e, n.format), q(i, n.format)];
740
+ if (Array.isArray(t.modelValue)) {
741
+ const [i, o] = t.modelValue;
742
+ return [Y(i, t.format), Y(o, t.format)];
681
743
  } else
682
- return q(n.modelValue, n.format);
744
+ return Y(t.modelValue, t.format);
683
745
  },
684
- set(e) {
685
- Array.isArray(e) ? h("update:modelValue", [
686
- se("HH:mm:ss", e[0]),
687
- se("HH:mm:ss", e[1])
688
- ]) : h("update:modelValue", se("HH:mm:ss", e));
746
+ set(i) {
747
+ Array.isArray(i) ? p("update:modelValue", [
748
+ ce("HH:mm:ss", i[0]),
749
+ ce("HH:mm:ss", i[1])
750
+ ]) : p("update:modelValue", ce("HH:mm:ss", i));
689
751
  }
690
- }), M = p(
691
- () => n.minTime ? q(n.minTime) : null
692
- ), H = p(
693
- () => n.maxTime ? q(n.maxTime) : null
694
- ), f = p(() => !M.value || !H.value ? !0 : O(M.value, H.value) <= 0), x = p(() => D.value === "out-of-range" || n.range && E.value === "out-of-range" ? "out-of-range" : D.value === "invalid" || n.range && E.value === "invalid" ? "invalid" : "valid"), S = p(() => (n.disabledTimes ?? []).map((i) => {
695
- const m = Array.isArray(i) ? i : [i, i], F = q(m[0]), I = q(m[1]);
696
- return O(F, I) <= 0 ? [F, I] : [I, F];
752
+ }), M = c(
753
+ () => t.minTime ? Y(t.minTime) : null
754
+ ), H = c(
755
+ () => t.maxTime ? Y(t.maxTime) : null
756
+ ), f = c(() => !M.value || !H.value ? !0 : q(M.value, H.value) <= 0), A = c(() => E.value === "out-of-range" || t.range && N.value === "out-of-range" ? "out-of-range" : E.value === "invalid" || t.range && N.value === "invalid" ? "invalid" : "valid"), S = c(() => (t.disabledTimes ?? []).map((o) => {
757
+ const g = Array.isArray(o) ? o : [o, o], W = Y(g[0]), P = Y(g[1]);
758
+ return q(W, P) <= 0 ? [W, P] : [P, W];
697
759
  }));
698
- function w(e) {
699
- return !!(Ve(e, S.value) || n.isTimeDisabled?.(e));
760
+ function D(i) {
761
+ return !!($e(i, S.value) || t.isTimeDisabled?.(i));
700
762
  }
701
- function P(e) {
702
- return e === "first" ? Array.isArray(k.value) ? k.value[0] : k.value : Array.isArray(k.value) ? k.value[1] : k.value;
763
+ function $(i) {
764
+ return i === "first" ? Array.isArray(k.value) ? k.value[0] : k.value : Array.isArray(k.value) ? k.value[1] : k.value;
703
765
  }
704
- function A(e) {
705
- const i = n.modelValue;
706
- return Array.isArray(i) ? e === "first" ? !!i[0] : !!i[1] : e === "second" ? !1 : typeof i == "string" && i.length > 0;
766
+ function I(i) {
767
+ const o = t.modelValue;
768
+ return Array.isArray(o) ? i === "first" ? !!o[0] : !!o[1] : i === "second" ? !1 : typeof o == "string" && o.length > 0;
707
769
  }
708
- function B(e, i) {
709
- if (e === "first") {
710
- Array.isArray(k.value) ? k.value = [i, k.value[1]] : k.value = i;
770
+ function K(i, o) {
771
+ if (i === "first") {
772
+ Array.isArray(k.value) ? k.value = [o, k.value[1]] : k.value = o;
711
773
  return;
712
774
  }
713
- Array.isArray(k.value) && (k.value = [k.value[0], i]);
714
- }
715
- function r(e, i, m, F) {
716
- if (e === "first" ? D.value = i : E.value = i, h("validate", {
717
- target: e,
718
- state: i,
719
- reason: m,
720
- value: F ? se("HH:mm:ss", F) : null
721
- }), i === "valid") {
775
+ Array.isArray(k.value) && (k.value = [k.value[0], o]);
776
+ }
777
+ function r(i, o, g, W) {
778
+ if (i === "first" ? E.value = o : N.value = o, p("validate", {
779
+ target: i,
780
+ state: o,
781
+ reason: g,
782
+ value: W ? ce("HH:mm:ss", W) : null
783
+ }), o === "valid") {
722
784
  s.value = null;
723
785
  return;
724
786
  }
725
- if (i === "out-of-range") {
726
- s.value = "OUT_OF_RANGE", h("error", {
787
+ if (o === "out-of-range") {
788
+ s.value = "OUT_OF_RANGE", p("error", {
727
789
  code: "OUT_OF_RANGE",
728
790
  message: "Time is outside min/max bounds and was clamped."
729
791
  });
730
792
  return;
731
793
  }
732
- s.value = m ?? "BAD_TIME", h("error", {
733
- code: m ?? "BAD_TIME",
734
- message: m === "DISABLED" ? "Time is disabled by disabledTimes or isTimeDisabled." : "Time is invalid."
794
+ s.value = g ?? "BAD_TIME", p("error", {
795
+ code: g ?? "BAD_TIME",
796
+ message: g === "DISABLED" ? "Time is disabled by disabledTimes or isTimeDisabled." : "Time is invalid."
735
797
  });
736
798
  }
737
- R(
738
- x,
739
- (e) => {
740
- h("update:validationState", e);
799
+ F(
800
+ A,
801
+ (i) => {
802
+ p("update:validationState", i);
741
803
  },
742
804
  { immediate: !0 }
743
805
  );
744
- const u = p(
806
+ const u = c(
745
807
  () => f.value ? M.value : null
746
- ), c = p(
808
+ ), m = c(
747
809
  () => f.value ? H.value : null
748
810
  );
749
- function y(e) {
750
- return Le(
751
- e,
811
+ function y(i) {
812
+ return Be(
813
+ i,
752
814
  u.value,
753
- c.value
815
+ m.value
754
816
  );
755
817
  }
756
- function g(e, i, m) {
757
- const F = !Ie(
758
- i,
818
+ function v(i, o, g) {
819
+ const W = !De(
820
+ o,
759
821
  u.value,
760
- c.value
761
- ), I = y(i);
762
- return w(I) ? (m.emitValidation && r(e, "invalid", "DISABLED", I), !1) : (B(e, I), m.emitValidation && (F ? r(e, "out-of-range", "OUT_OF_RANGE", I) : r(e, "valid", void 0, I)), !0);
822
+ m.value
823
+ ), P = y(o);
824
+ return D(P) ? (g.emitValidation && r(i, "invalid", "DISABLED", P), !1) : (K(i, P), g.emitValidation && (W ? r(i, "out-of-range", "OUT_OF_RANGE", P) : r(i, "valid", void 0, P)), !0);
763
825
  }
764
- const T = p({
826
+ const x = c({
765
827
  get() {
766
828
  return Array.isArray(k.value) ? k.value[0] : k.value;
767
829
  },
768
- set(e) {
769
- !A("first") && !b.value || g("first", e, { emitValidation: !0 });
830
+ set(i) {
831
+ !I("first") && !b.value || v("first", i, { emitValidation: !0 });
770
832
  }
771
- }), G = p({
833
+ }), z = c({
772
834
  get() {
773
835
  return Array.isArray(k.value) ? k.value[1] : k.value;
774
836
  },
775
- set(e) {
776
- !A("second") && !l.value || Array.isArray(k.value) && g("second", e, { emitValidation: !0 });
837
+ set(i) {
838
+ !I("second") && !l.value || Array.isArray(k.value) && v("second", i, { emitValidation: !0 });
777
839
  }
778
840
  });
779
- R(
780
- () => n.range,
781
- (e) => {
782
- if (e) {
783
- if (n.modelValue != null && !Array.isArray(n.modelValue))
841
+ F(
842
+ () => t.range,
843
+ (i) => {
844
+ if (i) {
845
+ if (t.modelValue != null && !Array.isArray(t.modelValue))
784
846
  throw new RangeError(
785
- `Model value must be an array for range selection: ${n.modelValue}`
847
+ `Model value must be an array for range selection: ${t.modelValue}`
786
848
  );
787
- } else if (Array.isArray(n.modelValue))
849
+ } else if (Array.isArray(t.modelValue))
788
850
  throw new RangeError(
789
- `Model value must be a single string for single time selection: ${n.modelValue}`
851
+ `Model value must be a single string for single time selection: ${t.modelValue}`
790
852
  );
791
853
  },
792
854
  { immediate: !0 }
793
855
  );
794
- function z() {
795
- A("first") && g("first", P("first"), {
856
+ function J() {
857
+ I("first") && v("first", $("first"), {
796
858
  emitValidation: !0
797
- }), n.range && A("second") && g("second", P("second"), {
859
+ }), t.range && I("second") && v("second", $("second"), {
798
860
  emitValidation: !0
799
861
  });
800
862
  }
801
- R(
802
- () => [u.value, c.value, n.range],
803
- z,
863
+ F(
864
+ () => [u.value, m.value, t.range],
865
+ J,
804
866
  { immediate: !0 }
805
- ), R(
806
- () => [S.value, n.isTimeDisabled, n.range],
807
- z,
867
+ ), F(
868
+ () => [S.value, t.isTimeDisabled, t.range],
869
+ J,
808
870
  { immediate: !0 }
809
871
  );
810
- const _ = p(() => n.format ?? "HH:mm:ss"), Y = p(() => n.placeholder ?? "Select time");
811
- function j(e) {
812
- if (e == null) return;
813
- if (typeof e == "number") return `${e}px`;
814
- const i = e.trim();
815
- return i.length > 0 ? i : void 0;
816
- }
817
- const ne = p(() => {
818
- let e = Math.max(
819
- _.value.length,
820
- Y.value.length
872
+ const U = c(() => t.format ?? "HH:mm:ss"), Z = c(() => t.placeholder ?? "Select time"), re = c(() => t.id), se = c(
873
+ () => t.range && t.id ? `${t.id}-end` : void 0
874
+ ), fe = c(() => t.name), pe = c(
875
+ () => t.range && t.name ? `${t.name}-end` : void 0
876
+ );
877
+ function ee(i) {
878
+ if (i == null) return;
879
+ if (typeof i == "number") return `${i}px`;
880
+ const o = i.trim();
881
+ return o.length > 0 ? o : void 0;
882
+ }
883
+ const ve = c(() => {
884
+ let i = Math.max(
885
+ U.value.length,
886
+ Z.value.length
821
887
  );
822
- return /[AaPp]$/.test(_.value) && (e = Math.max(e, _.value.length + 1)), `${Math.min(20, Math.max(6, e))}ch`;
823
- }), ue = p(() => {
824
- const e = {}, i = j(n.componentWidth), m = j(n.inputWidth), F = j(n.minInputWidth), I = j(n.maxInputWidth);
825
- return i && (e["--vtp-component-width"] = i), m && (e["--vtp-input-width"] = m), F && (e["--vtp-input-min-width"] = F), I && (e["--vtp-input-max-width"] = I), e;
826
- }), ie = p(() => ({
827
- width: `var(--vtp-input-width, ${ne.value})`,
888
+ return /[AaPp]$/.test(U.value) && (i = Math.max(i, U.value.length + 1)), `${Math.min(20, Math.max(6, i))}ch`;
889
+ }), te = c(() => {
890
+ const i = {}, o = ee(t.componentWidth), g = ee(t.inputWidth), W = ee(t.minInputWidth), P = ee(t.maxInputWidth);
891
+ return o && (i["--vtp-component-width"] = o), g && (i["--vtp-input-width"] = g), W && (i["--vtp-input-min-width"] = W), P && (i["--vtp-input-max-width"] = P), i;
892
+ }), le = c(() => ({
893
+ width: `var(--vtp-input-width, ${ve.value})`,
828
894
  minWidth: "var(--vtp-input-min-width, 0)",
829
895
  maxWidth: "var(--vtp-input-max-width, none)"
830
- })), L = xe(_), de = L.inputValue, $ = xe(_), ce = $.inputValue, ae = N(null), Q = N(null), ee = p(() => ({
831
- left: `${(n.range && l.value ? Q.value : ae.value)?.offsetLeft ?? 0}px`
896
+ })), R = Ve(U), he = R.inputValue, C = Ve(U), a = C.inputValue, d = L(null), h = L(null), T = c(() => ({
897
+ left: `${(t.range && l.value ? h.value : d.value)?.offsetLeft ?? 0}px`
832
898
  }));
833
- R(
834
- () => [T.value, _.value],
835
- ([e]) => {
836
- if (!A("first")) {
837
- L.clear();
899
+ F(
900
+ () => [x.value, U.value],
901
+ ([i]) => {
902
+ if (!I("first")) {
903
+ R.clear();
838
904
  return;
839
905
  }
840
- L.setFromTime(e);
906
+ R.setFromTime(i);
841
907
  },
842
908
  { immediate: !0 }
843
- ), R(
844
- () => [G.value, _.value, n.range],
845
- ([e, , i]) => {
846
- if (!i || !A("second")) {
847
- $.clear();
909
+ ), F(
910
+ () => [z.value, U.value, t.range],
911
+ ([i, , o]) => {
912
+ if (!o || !I("second")) {
913
+ C.clear();
848
914
  return;
849
915
  }
850
- $.setFromTime(e);
916
+ C.setFromTime(i);
851
917
  },
852
918
  { immediate: !0 }
853
919
  );
854
- function a(e) {
855
- if (n.disabled) return;
856
- if (e.key === "Enter") {
857
- e.preventDefault(), v("first");
920
+ function V(i) {
921
+ if (t.disabled) return;
922
+ if (i.key === "Enter") {
923
+ i.preventDefault(), j("first");
858
924
  return;
859
925
  }
860
- /^\d$/.test(e.key) && (b.value = !1, l.value = !1);
861
- const i = e.target, m = L.displayPosToDigitIndex(i.selectionStart ?? 0), F = /^\d$/.test(e.key) && m >= L.totalDigits.value - 1;
862
- if (L.handleKeydown(e), /^\d$/.test(e.key)) {
863
- const I = L.getParsedTime();
864
- I && g("first", I, { emitValidation: !1 });
926
+ /^\d$/.test(i.key) && (b.value = !1, l.value = !1);
927
+ const o = i.target, g = R.displayPosToDigitIndex(o.selectionStart ?? 0), W = /^\d$/.test(i.key) && g >= R.totalDigits.value - 1;
928
+ if (R.handleKeydown(i), /^\d$/.test(i.key)) {
929
+ const P = R.getParsedTime();
930
+ P && v("first", P, { emitValidation: !1 });
865
931
  }
866
- n.range && F && Q.value && (v("first"), ye(() => {
867
- const I = Q.value;
868
- I && (I.focus(), I.selectionStart = I.selectionEnd = 0);
932
+ t.range && W && h.value && (j("first"), xe(() => {
933
+ const P = h.value;
934
+ P && (P.focus(), P.selectionStart = P.selectionEnd = 0);
869
935
  }));
870
936
  }
871
- function d(e) {
872
- if (!n.disabled) {
873
- if (e.key === "Enter") {
874
- e.preventDefault(), v("second");
937
+ function ie(i) {
938
+ if (!t.disabled) {
939
+ if (i.key === "Enter") {
940
+ i.preventDefault(), j("second");
875
941
  return;
876
942
  }
877
- if (/^\d$/.test(e.key) && (b.value = !1, l.value = !1), $.handleKeydown(e), /^\d$/.test(e.key)) {
878
- const i = $.getParsedTime();
879
- i && g("second", i, { emitValidation: !1 });
943
+ if (/^\d$/.test(i.key) && (b.value = !1, l.value = !1), C.handleKeydown(i), /^\d$/.test(i.key)) {
944
+ const o = C.getParsedTime();
945
+ o && v("second", o, { emitValidation: !1 });
880
946
  }
881
947
  }
882
948
  }
883
- function v(e) {
884
- const i = e === "first" ? L : $, m = i.getParsedTime();
885
- m ? g(e, m, { emitValidation: !0 }) : i.inputValue.value.trim() ? r(e, "invalid", "BAD_TIME") : !n.range && e === "first" && (h("update:modelValue", null), r("first", "valid")), e === "first" ? A("first") ? L.setFromTime(T.value) : L.clear() : n.range && (A("second") ? $.setFromTime(G.value) : $.clear());
949
+ function j(i) {
950
+ const o = i === "first" ? R : C, g = o.getParsedTime();
951
+ g ? v(i, g, { emitValidation: !0 }) : o.inputValue.value.trim() ? r(i, "invalid", "BAD_TIME") : !t.range && i === "first" && (p("update:modelValue", null), r("first", "valid")), i === "first" ? I("first") ? R.setFromTime(x.value) : R.clear() : t.range && (I("second") ? C.setFromTime(z.value) : C.clear());
886
952
  }
887
- return (e, i) => (U(), Z("div", {
953
+ return (i, o) => (G(), X("div", {
888
954
  class: "timepicker-shell",
889
- "data-size": n.size,
890
- "data-validation": x.value,
891
- "data-disabled": n.disabled ? "true" : "false",
892
- style: oe(ue.value)
955
+ "data-size": t.size,
956
+ "data-validation": A.value,
957
+ "data-disabled": t.disabled ? "true" : "false",
958
+ style: ue(te.value)
893
959
  }, [
894
- X("div", {
895
- class: ve(["timepicker-shell__input", {
960
+ ae("div", {
961
+ class: oe(["timepicker-shell__input", {
896
962
  "timepicker-shell__input--error": s.value,
897
- "timepicker-shell__input--disabled": n.disabled
963
+ "timepicker-shell__input--disabled": t.disabled
898
964
  }])
899
965
  }, [
900
- X("input", {
966
+ ae("input", {
901
967
  ref_key: "firstInputRef",
902
- ref: ae,
968
+ ref: d,
903
969
  type: "text",
904
- class: "timepicker-field",
905
- value: W(de),
906
- placeholder: Y.value,
907
- style: oe(ie.value),
908
- disabled: n.disabled,
909
- onFocus: i[0] || (i[0] = (m) => !n.disabled && (b.value = !0)),
910
- onKeydown: a,
911
- onInput: i[1] || (i[1] = //@ts-ignore
912
- (...m) => W(L).handleInput && W(L).handleInput(...m)),
913
- onPaste: i[2] || (i[2] = //@ts-ignore
914
- (...m) => W(L).handlePaste && W(L).handlePaste(...m)),
915
- onBlur: i[3] || (i[3] = (m) => !n.disabled && v("first"))
916
- }, null, 44, _e),
917
- n.range ? (U(), Z(Ae, { key: 0 }, [
918
- i[12] || (i[12] = X("span", { class: "timepicker-separator" }, "–", -1)),
919
- X("input", {
970
+ class: oe(["timepicker-field", t.inputClass]),
971
+ id: re.value,
972
+ name: fe.value,
973
+ tabindex: t.tabindex,
974
+ autocomplete: t.autocomplete,
975
+ value: O(he),
976
+ placeholder: Z.value,
977
+ style: ue(le.value),
978
+ disabled: t.disabled,
979
+ onFocus: o[0] || (o[0] = (g) => !t.disabled && !t.hideDropdown && (b.value = !0)),
980
+ onKeydown: V,
981
+ onInput: o[1] || (o[1] = //@ts-ignore
982
+ (...g) => O(R).handleInput && O(R).handleInput(...g)),
983
+ onPaste: o[2] || (o[2] = //@ts-ignore
984
+ (...g) => O(R).handlePaste && O(R).handlePaste(...g)),
985
+ onBlur: o[3] || (o[3] = (g) => !t.disabled && j("first"))
986
+ }, null, 46, Ge),
987
+ t.range ? (G(), X(we, { key: 0 }, [
988
+ o[12] || (o[12] = ae("span", { class: "timepicker-separator" }, "–", -1)),
989
+ ae("input", {
920
990
  ref_key: "secondInputRef",
921
- ref: Q,
991
+ ref: h,
922
992
  type: "text",
923
- class: "timepicker-field",
924
- value: W(ce),
925
- placeholder: Y.value,
926
- style: oe(ie.value),
927
- disabled: n.disabled,
928
- onFocus: i[4] || (i[4] = (m) => !n.disabled && (l.value = !0)),
929
- onKeydown: d,
930
- onInput: i[5] || (i[5] = //@ts-ignore
931
- (...m) => W($).handleInput && W($).handleInput(...m)),
932
- onPaste: i[6] || (i[6] = //@ts-ignore
933
- (...m) => W($).handlePaste && W($).handlePaste(...m)),
934
- onBlur: i[7] || (i[7] = (m) => !n.disabled && v("second"))
935
- }, null, 44, We)
936
- ], 64)) : te("", !0)
993
+ class: oe(["timepicker-field", t.inputClass]),
994
+ id: se.value,
995
+ name: pe.value,
996
+ tabindex: t.tabindex,
997
+ autocomplete: t.autocomplete,
998
+ value: O(a),
999
+ placeholder: Z.value,
1000
+ style: ue(le.value),
1001
+ disabled: t.disabled,
1002
+ onFocus: o[4] || (o[4] = (g) => !t.disabled && !t.hideDropdown && (l.value = !0)),
1003
+ onKeydown: ie,
1004
+ onInput: o[5] || (o[5] = //@ts-ignore
1005
+ (...g) => O(C).handleInput && O(C).handleInput(...g)),
1006
+ onPaste: o[6] || (o[6] = //@ts-ignore
1007
+ (...g) => O(C).handlePaste && O(C).handlePaste(...g)),
1008
+ onBlur: o[7] || (o[7] = (g) => !t.disabled && j("second"))
1009
+ }, null, 46, ze)
1010
+ ], 64)) : ne("", !0)
937
1011
  ], 2),
938
- X("div", {
1012
+ t.hideDropdown ? ne("", !0) : (G(), X("div", {
1013
+ key: 0,
939
1014
  class: "timepicker-popovers",
940
- style: oe(ee.value)
1015
+ style: ue(T.value)
941
1016
  }, [
942
- pe(Te, {
1017
+ ye(Me, {
943
1018
  open: b.value,
944
- "onUpdate:open": i[8] || (i[8] = (m) => b.value = m),
945
- initTime: T.value,
946
- "onUpdate:initTime": i[9] || (i[9] = (m) => T.value = m),
947
- format: n.format,
948
- "hour-step": n.hourStep,
949
- "minute-step": n.minuteStep,
950
- "second-step": n.secondStep,
1019
+ "onUpdate:open": o[8] || (o[8] = (g) => b.value = g),
1020
+ initTime: x.value,
1021
+ "onUpdate:initTime": o[9] || (o[9] = (g) => x.value = g),
1022
+ format: t.format,
1023
+ "hour-step": t.hourStep,
1024
+ "minute-step": t.minuteStep,
1025
+ "second-step": t.secondStep,
951
1026
  "min-time": u.value,
952
- "max-time": c.value,
1027
+ "max-time": m.value,
953
1028
  "disabled-ranges": S.value,
954
- "is-time-disabled": n.isTimeDisabled
1029
+ "is-time-disabled": t.isTimeDisabled
955
1030
  }, null, 8, ["open", "initTime", "format", "hour-step", "minute-step", "second-step", "min-time", "max-time", "disabled-ranges", "is-time-disabled"]),
956
- n.range ? (U(), he(Te, {
1031
+ t.range ? (G(), ke(Me, {
957
1032
  key: 0,
958
1033
  open: l.value,
959
- "onUpdate:open": i[10] || (i[10] = (m) => l.value = m),
960
- initTime: G.value,
961
- "onUpdate:initTime": i[11] || (i[11] = (m) => G.value = m),
962
- format: n.format,
963
- "hour-step": n.hourStep,
964
- "minute-step": n.minuteStep,
965
- "second-step": n.secondStep,
1034
+ "onUpdate:open": o[10] || (o[10] = (g) => l.value = g),
1035
+ initTime: z.value,
1036
+ "onUpdate:initTime": o[11] || (o[11] = (g) => z.value = g),
1037
+ format: t.format,
1038
+ "hour-step": t.hourStep,
1039
+ "minute-step": t.minuteStep,
1040
+ "second-step": t.secondStep,
966
1041
  "min-time": u.value,
967
- "max-time": c.value,
1042
+ "max-time": m.value,
968
1043
  "disabled-ranges": S.value,
969
- "is-time-disabled": n.isTimeDisabled
970
- }, null, 8, ["open", "initTime", "format", "hour-step", "minute-step", "second-step", "min-time", "max-time", "disabled-ranges", "is-time-disabled"])) : te("", !0)
971
- ], 4)
972
- ], 12, Be));
1044
+ "is-time-disabled": t.isTimeDisabled
1045
+ }, null, 8, ["open", "initTime", "format", "hour-step", "minute-step", "second-step", "min-time", "max-time", "disabled-ranges", "is-time-disabled"])) : ne("", !0)
1046
+ ], 4))
1047
+ ], 12, Oe));
973
1048
  }
974
1049
  });
975
1050
  export {
976
- Ue as TimePicker
1051
+ qe as TimePicker
977
1052
  };