@rpcbase/ui 0.261.0 → 0.263.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (261) hide show
  1. package/dist/assets/sha256.worker-BEf4_Y9w.js.map +1 -0
  2. package/dist/components/FilesUploadField/index.d.ts +19 -6
  3. package/dist/components/FilesUploadField/index.d.ts.map +1 -1
  4. package/dist/components/FilesUploadField/sha256.d.ts +5 -0
  5. package/dist/components/FilesUploadField/sha256.d.ts.map +1 -0
  6. package/dist/components/FilesUploadField/sha256.worker.d.ts +4 -0
  7. package/dist/components/FilesUploadField/sha256.worker.d.ts.map +1 -0
  8. package/dist/components/ImagesField/index.d.ts +4 -2
  9. package/dist/components/ImagesField/index.d.ts.map +1 -1
  10. package/dist/index.js +10 -10
  11. package/dist/index298.js +11 -803
  12. package/dist/index298.js.map +1 -1
  13. package/dist/index299.js +865 -28
  14. package/dist/index299.js.map +1 -1
  15. package/dist/index300.js +26 -510
  16. package/dist/index300.js.map +1 -1
  17. package/dist/index301.js +481 -755
  18. package/dist/index301.js.map +1 -1
  19. package/dist/index302.js +786 -7428
  20. package/dist/index302.js.map +1 -1
  21. package/dist/index303.js +7429 -7
  22. package/dist/index303.js.map +1 -1
  23. package/dist/index304.js +6 -12
  24. package/dist/index304.js.map +1 -1
  25. package/dist/index305.js +12 -5
  26. package/dist/index305.js.map +1 -1
  27. package/dist/index306.js +3 -3
  28. package/dist/index306.js.map +1 -1
  29. package/dist/index307.js +5 -469
  30. package/dist/index307.js.map +1 -1
  31. package/dist/index308.js +464 -32
  32. package/dist/index308.js.map +1 -1
  33. package/dist/index309.js +36 -18
  34. package/dist/index309.js.map +1 -1
  35. package/dist/index310.js +17 -28
  36. package/dist/index310.js.map +1 -1
  37. package/dist/index311.js +30 -4
  38. package/dist/index311.js.map +1 -1
  39. package/dist/index312.js +4 -59
  40. package/dist/index312.js.map +1 -1
  41. package/dist/index313.js +59 -9
  42. package/dist/index313.js.map +1 -1
  43. package/dist/index314.js +9 -5
  44. package/dist/index314.js.map +1 -1
  45. package/dist/index315.js +5 -9
  46. package/dist/index315.js.map +1 -1
  47. package/dist/index316.js +9 -12
  48. package/dist/index316.js.map +1 -1
  49. package/dist/index317.js +13 -3
  50. package/dist/index317.js.map +1 -1
  51. package/dist/index318.js +3 -17
  52. package/dist/index318.js.map +1 -1
  53. package/dist/index319.js +14 -23
  54. package/dist/index319.js.map +1 -1
  55. package/dist/index320.js +23 -39
  56. package/dist/index320.js.map +1 -1
  57. package/dist/index321.js +41 -5
  58. package/dist/index321.js.map +1 -1
  59. package/dist/index322.js +5 -25
  60. package/dist/index322.js.map +1 -1
  61. package/dist/index323.js +24 -18
  62. package/dist/index323.js.map +1 -1
  63. package/dist/index324.js +17 -32
  64. package/dist/index324.js.map +1 -1
  65. package/dist/index325.js +34 -5
  66. package/dist/index325.js.map +1 -1
  67. package/dist/index326.js +5 -9
  68. package/dist/index326.js.map +1 -1
  69. package/dist/index327.js +8 -7
  70. package/dist/index327.js.map +1 -1
  71. package/dist/index328.js +8 -9
  72. package/dist/index328.js.map +1 -1
  73. package/dist/index329.js +9 -10
  74. package/dist/index329.js.map +1 -1
  75. package/dist/index330.js +10 -7
  76. package/dist/index330.js.map +1 -1
  77. package/dist/index331.js +7 -75
  78. package/dist/index331.js.map +1 -1
  79. package/dist/index332.js +66 -153
  80. package/dist/index332.js.map +1 -1
  81. package/dist/index333.js +147 -99
  82. package/dist/index333.js.map +1 -1
  83. package/dist/index334.js +113 -13
  84. package/dist/index334.js.map +1 -1
  85. package/dist/index335.js +12 -78
  86. package/dist/index335.js.map +1 -1
  87. package/dist/index336.js +57 -23
  88. package/dist/index336.js.map +1 -1
  89. package/dist/index337.js +45 -12
  90. package/dist/index337.js.map +1 -1
  91. package/dist/index338.js +13 -16
  92. package/dist/index338.js.map +1 -1
  93. package/dist/index339.js +15 -100
  94. package/dist/index339.js.map +1 -1
  95. package/dist/index340.js +95 -50
  96. package/dist/index340.js.map +1 -1
  97. package/dist/index341.js +5 -57
  98. package/dist/index341.js.map +1 -1
  99. package/dist/index342.js +78 -41
  100. package/dist/index342.js.map +1 -1
  101. package/dist/index343.js +58 -100
  102. package/dist/index343.js.map +1 -1
  103. package/dist/index344.js +104 -46
  104. package/dist/index344.js.map +1 -1
  105. package/dist/index345.js +51 -39
  106. package/dist/index345.js.map +1 -1
  107. package/dist/index346.js +42 -142
  108. package/dist/index346.js.map +1 -1
  109. package/dist/index347.js +123 -120
  110. package/dist/index347.js.map +1 -1
  111. package/dist/index348.js +108 -224
  112. package/dist/index348.js.map +1 -1
  113. package/dist/index349.js +174 -158
  114. package/dist/index349.js.map +1 -1
  115. package/dist/index350.js +144 -213
  116. package/dist/index350.js.map +1 -1
  117. package/dist/index351.js +309 -5
  118. package/dist/index351.js.map +1 -1
  119. package/dist/index352.js +5 -6
  120. package/dist/index352.js.map +1 -1
  121. package/dist/index353.js +6 -7
  122. package/dist/index353.js.map +1 -1
  123. package/dist/index354.js +5 -4
  124. package/dist/index354.js.map +1 -1
  125. package/dist/index355.js +4 -4
  126. package/dist/index355.js.map +1 -1
  127. package/dist/index356.js +6 -21
  128. package/dist/index356.js.map +1 -1
  129. package/dist/index357.js +21 -10
  130. package/dist/index357.js.map +1 -1
  131. package/dist/index358.js +10 -128
  132. package/dist/index358.js.map +1 -1
  133. package/dist/index359.js +122 -36
  134. package/dist/index359.js.map +1 -1
  135. package/dist/index360.js +38 -64
  136. package/dist/index360.js.map +1 -1
  137. package/dist/index361.js +66 -115
  138. package/dist/index361.js.map +1 -1
  139. package/dist/index362.js +112 -485
  140. package/dist/index362.js.map +1 -1
  141. package/dist/index363.js +490 -13
  142. package/dist/index363.js.map +1 -1
  143. package/dist/index364.js +13 -4
  144. package/dist/index364.js.map +1 -1
  145. package/dist/index365.js +4 -47
  146. package/dist/index365.js.map +1 -1
  147. package/dist/index366.js +44 -15
  148. package/dist/index366.js.map +1 -1
  149. package/dist/index367.js +19 -5
  150. package/dist/index367.js.map +1 -1
  151. package/dist/index368.js +5 -27
  152. package/dist/index368.js.map +1 -1
  153. package/dist/index369.js +27 -48
  154. package/dist/index369.js.map +1 -1
  155. package/dist/index370.js +46 -27
  156. package/dist/index370.js.map +1 -1
  157. package/dist/index371.js +27 -16
  158. package/dist/index371.js.map +1 -1
  159. package/dist/index372.js +16 -41
  160. package/dist/index372.js.map +1 -1
  161. package/dist/index373.js +42 -14
  162. package/dist/index373.js.map +1 -1
  163. package/dist/index374.js +14 -10
  164. package/dist/index374.js.map +1 -1
  165. package/dist/index375.js +9 -51
  166. package/dist/index375.js.map +1 -1
  167. package/dist/index376.js +53 -43
  168. package/dist/index376.js.map +1 -1
  169. package/dist/index377.js +43 -16
  170. package/dist/index377.js.map +1 -1
  171. package/dist/index378.js +15 -4
  172. package/dist/index378.js.map +1 -1
  173. package/dist/index379.js +4 -4
  174. package/dist/index379.js.map +1 -1
  175. package/dist/index380.js +4 -9
  176. package/dist/index380.js.map +1 -1
  177. package/dist/index381.js +9 -340
  178. package/dist/index381.js.map +1 -1
  179. package/dist/index382.js +339 -4
  180. package/dist/index382.js.map +1 -1
  181. package/dist/index383.js +5 -16
  182. package/dist/index383.js.map +1 -1
  183. package/dist/index384.js +16 -111
  184. package/dist/index384.js.map +1 -1
  185. package/dist/index385.js +109 -19
  186. package/dist/index385.js.map +1 -1
  187. package/dist/index386.js +18 -18
  188. package/dist/index386.js.map +1 -1
  189. package/dist/index387.js +21 -5
  190. package/dist/index387.js.map +1 -1
  191. package/dist/index388.js +5 -20
  192. package/dist/index388.js.map +1 -1
  193. package/dist/index389.js +19 -13
  194. package/dist/index389.js.map +1 -1
  195. package/dist/index390.js +13 -84
  196. package/dist/index390.js.map +1 -1
  197. package/dist/index391.js +84 -7
  198. package/dist/index391.js.map +1 -1
  199. package/dist/index392.js +9 -29
  200. package/dist/index392.js.map +1 -1
  201. package/dist/index393.js +28 -9
  202. package/dist/index393.js.map +1 -1
  203. package/dist/index394.js +9 -5
  204. package/dist/index394.js.map +1 -1
  205. package/dist/index395.js +6 -252
  206. package/dist/index395.js.map +1 -1
  207. package/dist/index396.js +250 -10
  208. package/dist/index396.js.map +1 -1
  209. package/dist/index397.js +11 -10
  210. package/dist/index397.js.map +1 -1
  211. package/dist/index398.js +10 -6
  212. package/dist/index398.js.map +1 -1
  213. package/dist/index399.js +6 -22
  214. package/dist/index399.js.map +1 -1
  215. package/dist/index400.js +21 -21
  216. package/dist/index400.js.map +1 -1
  217. package/dist/index401.js +21 -107
  218. package/dist/index401.js.map +1 -1
  219. package/dist/index402.js +109 -15
  220. package/dist/index402.js.map +1 -1
  221. package/dist/index403.js +15 -12
  222. package/dist/index403.js.map +1 -1
  223. package/dist/index404.js +10 -8
  224. package/dist/index404.js.map +1 -1
  225. package/dist/index405.js +8 -242
  226. package/dist/index405.js.map +1 -1
  227. package/dist/index406.js +238 -25
  228. package/dist/index406.js.map +1 -1
  229. package/dist/index407.js +29 -51
  230. package/dist/index407.js.map +1 -1
  231. package/dist/index408.js +51 -10
  232. package/dist/index408.js.map +1 -1
  233. package/dist/index409.js +11 -128
  234. package/dist/index409.js.map +1 -1
  235. package/dist/index410.js +124 -35
  236. package/dist/index410.js.map +1 -1
  237. package/dist/index411.js +36 -23
  238. package/dist/index411.js.map +1 -1
  239. package/dist/index412.js +26 -11
  240. package/dist/index412.js.map +1 -1
  241. package/dist/index413.js +11 -23
  242. package/dist/index413.js.map +1 -1
  243. package/dist/index414.js +19 -13
  244. package/dist/index414.js.map +1 -1
  245. package/dist/index415.js +14 -13
  246. package/dist/index415.js.map +1 -1
  247. package/dist/index416.js +14 -322
  248. package/dist/index416.js.map +1 -1
  249. package/dist/index417.js +323 -61
  250. package/dist/index417.js.map +1 -1
  251. package/dist/index418.js +63 -4
  252. package/dist/index418.js.map +1 -1
  253. package/dist/index419.js +4 -28
  254. package/dist/index419.js.map +1 -1
  255. package/dist/index420.js +25 -468
  256. package/dist/index420.js.map +1 -1
  257. package/dist/index421.js +452 -250
  258. package/dist/index421.js.map +1 -1
  259. package/dist/index422.js +272 -0
  260. package/dist/index422.js.map +1 -0
  261. package/package.json +2 -1
package/dist/index301.js CHANGED
@@ -1,790 +1,516 @@
1
- import { useIsTouchDevice as e } from "./index4.js";
2
- import { cn as t } from "./index12.js";
3
- import { c as n } from "react/compiler-runtime";
4
- import * as r from "react";
5
- import { Check as i, ChevronDown as a, ChevronUp as o } from "lucide-react";
6
- import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
7
- import { createPortal as u } from "react-dom";
8
- import { IMaskInput as d } from "react-imask";
9
- import f, { InputMask as p } from "imask";
10
- //#region src/components/HourPickerField/index.tsx
11
- var m = f;
12
- typeof m.InputMask != "function" && (m.InputMask = p);
13
- function h(e) {
14
- return String(e).padStart(2, "0");
1
+ import { cn as e } from "./index12.js";
2
+ import { c as t } from "react/compiler-runtime";
3
+ import * as n from "react";
4
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
+ import a, { components as o } from "react-select";
6
+ //#region src/components/I18nField/index.tsx
7
+ var ee = n.createContext(null);
8
+ function s(e) {
9
+ let i = t(17), { children: a, value: o, defaultValue: s, onChange: c, locales: l } = e, u = o !== void 0, m;
10
+ i[0] !== s || i[1] !== l ? (m = p([s, ...f()], l), i[0] = s, i[1] = l, i[2] = m) : m = i[2];
11
+ let h = m, [te, g] = n.useState(h), ne = o ?? te, _;
12
+ i[3] !== u || i[4] !== c ? (_ = (e) => {
13
+ u || g(e), c?.(e);
14
+ }, i[3] = u, i[4] = c, i[5] = _) : _ = i[5];
15
+ let v = _, re, ie;
16
+ i[6] !== h || i[7] !== u || i[8] !== l ? (re = () => {
17
+ u || g((e) => d(e, l) ? e : h);
18
+ }, ie = [
19
+ h,
20
+ u,
21
+ l
22
+ ], i[6] = h, i[7] = u, i[8] = l, i[9] = re, i[10] = ie) : (re = i[9], ie = i[10]), n.useEffect(re, ie);
23
+ let ae;
24
+ i[11] !== ne || i[12] !== v ? (ae = {
25
+ locale: ne,
26
+ setLocale: v
27
+ }, i[11] = ne, i[12] = v, i[13] = ae) : ae = i[13];
28
+ let y = ae, b;
29
+ return i[14] !== a || i[15] !== y ? (b = /* @__PURE__ */ r(ee.Provider, {
30
+ value: y,
31
+ children: a
32
+ }), i[14] = a, i[15] = y, i[16] = b) : b = i[16], b;
33
+ }
34
+ var c = "en";
35
+ function l(e) {
36
+ return e.trim().replace(/_/g, "-").toLowerCase();
15
37
  }
16
- function g(e) {
17
- let t = e.trim();
18
- if (!t) return null;
19
- let n = /^(\d{1,2}):(\d{2})$/.exec(t);
38
+ function u(e) {
39
+ return l(e).split("-")[0] ?? "";
40
+ }
41
+ function d(e, t) {
42
+ let n = typeof e == "string" ? l(e) : "";
20
43
  if (!n) return null;
21
- let r = Number(n[1]), i = Number(n[2]);
22
- return !Number.isFinite(r) || !Number.isFinite(i) || r < 0 || r > 23 || i < 0 || i > 59 ? null : `${h(r)}:${h(i)}`;
44
+ let r = (t ?? []).filter((e) => typeof e == "string" && e.length > 0);
45
+ return r.length === 0 ? e?.trim() ?? n : r.find((e) => l(e) === n) ?? r.find((e) => u(e) === u(n)) ?? null;
23
46
  }
24
- function _(e) {
25
- let t = g(e);
26
- if (t) return `parsed:${t}`;
27
- let n = e.replace(/\D/g, "");
28
- if (!n) return "empty";
29
- if (n.length <= 2) return `hour:${Number(n)}`;
30
- let r = n.slice(-2), i = n.slice(0, -2);
31
- return `hour-minute:${Number(i)}:${r}`;
47
+ function f() {
48
+ let e = [];
49
+ return typeof document < "u" && e.push(document.documentElement.lang), typeof navigator < "u" && e.push(...Array.from(navigator.languages ?? []), navigator.language), e;
32
50
  }
33
- function v(e, t) {
34
- let n = g(e);
35
- return n ? y(t.find((e) => e.value === n)) ? {
36
- parsed: n,
37
- selectableValue: n
38
- } : {
39
- parsed: n,
40
- selectableValue: null
41
- } : null;
51
+ function p(e, t) {
52
+ for (let n of e) {
53
+ let e = d(n, t);
54
+ if (e) return e;
55
+ }
56
+ return d(c, t) || (t?.[0] ?? c);
57
+ }
58
+ function m(e) {
59
+ let t = (e.split("-")[0] ?? "").replace(/[^A-Za-z]/g, "");
60
+ return t ? t.slice(0, 3).toUpperCase() : "?";
42
61
  }
43
- function ee(e) {
44
- let t = /^(\d{2}):(\d{2})$/.exec(e);
45
- if (!t) return null;
46
- let n = Number(t[1]), r = Number(t[2]);
47
- return !Number.isFinite(n) || !Number.isFinite(r) ? null : n * 60 + r;
62
+ function h(e) {
63
+ return e.normalize("NFD").replace(/[\u0300-\u036f]/g, "");
48
64
  }
49
- function y(e) {
50
- return e ? !e.disabled : !1;
65
+ function te(e) {
66
+ return h(e).toLowerCase();
51
67
  }
52
- function te(e, t) {
53
- let n = null, r = Infinity, i = -Infinity;
54
- for (let a of t) {
55
- if (!y(a)) continue;
56
- let t = ee(a.value);
57
- if (t == null) continue;
58
- let o = Math.abs(t - e);
59
- (o < r || o === r && t > i) && (n = a, r = o, i = t);
68
+ function g(e, t) {
69
+ if (Object.prototype.hasOwnProperty.call(e, t)) return e[t];
70
+ let n = t.split("-").filter(Boolean);
71
+ for (; n.length > 1;) {
72
+ n.pop();
73
+ let t = n.join("-");
74
+ if (Object.prototype.hasOwnProperty.call(e, t)) return e[t];
60
75
  }
61
- return n;
62
76
  }
63
- function b({ direction: e, viewportRef: n, speed: i = 400, className: s }) {
64
- let [l, u] = r.useState(!0), d = r.useRef(void 0), f = r.useRef(void 0), p = r.useRef(!1), m = r.useCallback(() => {
65
- let t = n.current;
66
- if (!t) {
67
- u(!0);
68
- return;
69
- }
70
- let { scrollTop: r, scrollHeight: i, clientHeight: a } = t, o = r > 2, s = r < i - a - 2;
71
- if (!(i > a + 2)) {
72
- u(!0);
73
- return;
74
- }
75
- u(e === "up" ? !o : !s);
76
- }, [e, n]);
77
- r.useEffect(() => {
78
- let e = n.current;
79
- if (!e) return;
80
- m();
81
- let t = () => m(), r = () => m();
82
- e.addEventListener("scroll", t, { passive: !0 });
83
- let i = new ResizeObserver(r);
84
- i.observe(e);
85
- let a = new MutationObserver(r);
86
- return a.observe(e, {
87
- childList: !0,
88
- subtree: !0
89
- }), () => {
90
- e.removeEventListener("scroll", t), i.disconnect(), a.disconnect();
77
+ function ne(e, t) {
78
+ return g(e, t)?.value ?? "";
79
+ }
80
+ function _(e, t) {
81
+ if (typeof Intl > "u" || Intl.DisplayNames === void 0) return null;
82
+ try {
83
+ let n = Array.isArray(e) ? e : e ? [e] : void 0;
84
+ return new Intl.DisplayNames(n, { type: t });
85
+ } catch {
86
+ return null;
87
+ }
88
+ }
89
+ function v(e, t) {
90
+ if (e) try {
91
+ return e.of(t) ?? void 0;
92
+ } catch {
93
+ return;
94
+ }
95
+ }
96
+ function re(e, t) {
97
+ let n = _(e, "language"), r = _("en", "language");
98
+ return (t ?? []).filter((e) => typeof e == "string" && e.length > 0).map((e) => {
99
+ let t = v(n, e) ?? v(r, e) ?? e;
100
+ return {
101
+ value: e,
102
+ name: t,
103
+ code: e,
104
+ searchable: Array.from(/* @__PURE__ */ new Set([
105
+ t,
106
+ v(r, e) ?? e,
107
+ e.toLowerCase(),
108
+ e.toUpperCase()
109
+ ])).map((e) => te(e))
91
110
  };
92
- }, [n, m]);
93
- let h = r.useCallback(() => {
94
- d.current &&= (cancelAnimationFrame(d.current), void 0), p.current = !1, f.current = void 0;
95
- }, []), g = r.useCallback((t) => {
96
- let r = n.current;
97
- if (!r || l || !p.current) {
98
- h();
99
- return;
100
- }
101
- f.current ||= t;
102
- let a = i * (t - f.current) / 1e3;
103
- if (a < .1) {
104
- d.current = requestAnimationFrame(g);
105
- return;
106
- }
107
- let o = r.scrollTop, s = r.scrollHeight - r.clientHeight, c;
108
- c = e === "up" ? Math.max(0, o - a) : Math.min(s, o + a), r.scrollTo({ top: c }), f.current = t, (e === "up" ? c > 1 : c < s - 1) && Math.abs(c - o) > .01 ? d.current = requestAnimationFrame(g) : (h(), setTimeout(m, 16));
109
- }, [
110
- m,
111
- e,
112
- l,
113
- i,
114
- h,
115
- n
116
- ]), _ = r.useCallback(() => {
117
- l || !n.current || p.current || (p.current = !0, f.current = void 0, d.current = requestAnimationFrame(g));
118
- }, [
119
- l,
120
- g,
121
- n
122
- ]);
123
- return r.useEffect(() => h, [h]), /* @__PURE__ */ c("div", {
124
- className: t("flex items-center justify-center py-1 select-none", l ? "cursor-default opacity-40" : "cursor-pointer opacity-100 hover:bg-accent/20", s),
125
- onPointerEnter: () => {
126
- l || _();
127
- },
128
- onPointerMove: () => {
129
- !l && !p.current && _();
130
- },
131
- onPointerLeave: () => {
132
- h();
133
- },
134
- children: c(e === "up" ? o : a, {
135
- "aria-hidden": !0,
136
- className: "h-4 w-4 opacity-50"
137
- })
111
+ }).sort((e, t) => e.name.localeCompare(t.name));
112
+ }
113
+ var ie = {
114
+ control: () => ({ display: "none" }),
115
+ menu: (e) => ({
116
+ ...e,
117
+ marginTop: 4,
118
+ borderRadius: "var(--radius)",
119
+ boxShadow: "0 18px 36px rgba(15, 23, 42, 0.18)",
120
+ backgroundColor: "hsl(var(--popover))",
121
+ overflow: "hidden",
122
+ zIndex: 30
123
+ }),
124
+ menuList: (e) => ({
125
+ ...e,
126
+ maxHeight: 280,
127
+ padding: 0,
128
+ display: "flex",
129
+ flexDirection: "column",
130
+ overflow: "hidden"
131
+ }),
132
+ option: (e, t) => ({
133
+ ...e,
134
+ fontSize: "0.875rem",
135
+ backgroundColor: t.isFocused ? "hsl(var(--muted))" : t.isSelected ? "hsl(var(--accent))" : "transparent",
136
+ color: t.isSelected ? "hsl(var(--accent-foreground))" : "hsl(var(--foreground))",
137
+ cursor: "pointer"
138
+ }),
139
+ noOptionsMessage: (e) => ({
140
+ ...e,
141
+ fontSize: "0.875rem",
142
+ color: "hsl(var(--muted-foreground))"
143
+ })
144
+ }, ae = () => {
145
+ let e = t(1), n;
146
+ return e[0] === Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */ r("div", { style: { display: "none" } }), e[0] = n) : n = e[0], n;
147
+ }, y = () => null, b = n.createContext(null);
148
+ function oe(e) {
149
+ let t = n.useContext(b), { children: a } = e;
150
+ return /* @__PURE__ */ i(o.MenuList, {
151
+ ...e,
152
+ className: "!p-0 flex flex-col overflow-hidden",
153
+ children: [
154
+ t ? /* @__PURE__ */ r("div", {
155
+ className: "border-b border-muted px-2 pb-2 pt-2",
156
+ children: /* @__PURE__ */ r("input", {
157
+ ref: t.searchInputRef,
158
+ value: t.searchTerm,
159
+ onChange: (e) => t.setSearchTerm(e.target.value),
160
+ onKeyDown: t.onSearchKeyDown,
161
+ className: "w-full rounded-md border border-input bg-background px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-ring",
162
+ placeholder: "Search language…"
163
+ })
164
+ }) : null,
165
+ /* @__PURE__ */ r("div", {
166
+ className: "max-h-60 overflow-y-auto",
167
+ children: a
168
+ }),
169
+ t?.selectFooter ? /* @__PURE__ */ r("div", {
170
+ className: "border-t border-muted bg-muted/60 px-3 py-2 text-xs text-muted-foreground",
171
+ children: t.selectFooter
172
+ }) : null
173
+ ]
138
174
  });
139
175
  }
140
- function x({ id: e, value: n, onChange: a, onValueUpdate: o, options: d, placeholder: f = "Select time", className: p, inputClassName: m, disabled: h, readOnly: g, open: _, onOpenChange: v, triggerTestId: ee, contentTestId: te, isHydrated: x }) {
141
- let S = r.useId(), C = e ?? `hours-picker-${S}`, T = r.useRef(null), E = r.useRef(null), D = r.useCallback((e) => {
142
- E.current = e;
143
- }, []), O = r.useRef(null), k = r.useRef(!1), [A, j] = r.useState(null), M = r.useRef(null), N = r.useRef(null), P = r.useRef(null), [F, ne] = r.useState(() => ({
176
+ function se(n) {
177
+ let a = t(12), { data: o, innerRef: ee, innerProps: s, isFocused: c, isSelected: l } = n, u = l ? "bg-accent text-accent-foreground" : c ? "bg-muted text-foreground" : "text-foreground", d;
178
+ a[0] === u ? d = a[1] : (d = e("flex cursor-pointer items-center justify-between gap-3 px-3 py-2 text-sm", u), a[0] = u, a[1] = d);
179
+ let f;
180
+ a[2] === o.name ? f = a[3] : (f = /* @__PURE__ */ r("span", {
181
+ className: "flex min-w-0 items-center gap-2",
182
+ children: /* @__PURE__ */ r("span", {
183
+ className: "truncate",
184
+ children: o.name
185
+ })
186
+ }), a[2] = o.name, a[3] = f);
187
+ let p;
188
+ a[4] === o.code ? p = a[5] : (p = /* @__PURE__ */ r("span", {
189
+ className: "text-xs text-muted-foreground uppercase",
190
+ children: o.code
191
+ }), a[4] = o.code, a[5] = p);
192
+ let m;
193
+ return a[6] !== s || a[7] !== ee || a[8] !== d || a[9] !== f || a[10] !== p ? (m = /* @__PURE__ */ i("div", {
194
+ ref: ee,
195
+ ...s,
196
+ className: d,
197
+ children: [f, p]
198
+ }), a[6] = s, a[7] = ee, a[8] = d, a[9] = f, a[10] = p, a[11] = m) : m = a[11], m;
199
+ }
200
+ var x = n.forwardRef(function(o, s) {
201
+ let c = t(190), l, u, d, h, g, _, v, x, S, de, fe, pe, C, me, w;
202
+ c[0] === o ? (l = c[1], u = c[2], d = c[3], h = c[4], g = c[5], _ = c[6], v = c[7], x = c[8], S = c[9], de = c[10], fe = c[11], pe = c[12], C = c[13], me = c[14], w = c[15]) : ({value: w, defaultValue: d, locale: _, defaultLocale: u, onChange: S, onLocaleChange: de, locales: v, multiline: x, className: l, inputClassName: g, selectProps: C, selectFooter: pe, languageSelectTabIndex: me, disabled: h, ...fe} = o, c[0] = o, c[1] = l, c[2] = u, c[3] = d, c[4] = h, c[5] = g, c[6] = _, c[7] = v, c[8] = x, c[9] = S, c[10] = de, c[11] = fe, c[12] = pe, c[13] = C, c[14] = me, c[15] = w);
203
+ let he = me === void 0 ? -1 : me, ge = fe, T, E;
204
+ c[16] === ge ? (T = c[17], E = c[18]) : ({rows: E, ...T} = ge, c[16] = ge, c[17] = T, c[18] = E);
205
+ let _e;
206
+ c[19] !== d || c[20] !== w ? (_e = w ?? d ?? {}, c[19] = d, c[20] = w, c[21] = _e) : _e = c[21];
207
+ let ve = _e, [ye, be] = n.useState(ve), D = w !== void 0, xe;
208
+ c[22] !== ye || c[23] !== D || c[24] !== w ? (xe = D ? w ?? {} : ye, c[22] = ye, c[23] = D, c[24] = w, c[25] = xe) : xe = c[25];
209
+ let O = xe, [k, Se] = n.useState(""), A = n.useContext(ee), Ce;
210
+ c[26] !== O || c[27] !== v ? (Ce = re(void 0, Array.from(/* @__PURE__ */ new Set([...v ?? [], ...Object.keys(O)]))), c[26] = O, c[27] = v, c[28] = Ce) : Ce = c[28];
211
+ let j = Ce, M;
212
+ c[29] !== O || c[30] !== u || c[31] !== A?.locale || c[32] !== j || c[33] !== _ ? (M = () => {
213
+ let e = j.map(ce);
214
+ return _ ?? A?.locale ?? p([
215
+ u,
216
+ ...f(),
217
+ Object.keys(O)[0]
218
+ ], e);
219
+ }, c[29] = O, c[30] = u, c[31] = A?.locale, c[32] = j, c[33] = _, c[34] = M) : M = c[34], A?.locale;
220
+ let we;
221
+ c[35] === M ? we = c[36] : (we = M(), c[35] = M, c[36] = we);
222
+ let Te = we, [N, Ee] = n.useState(Te), P = _ ?? A?.locale ?? N, De, Oe;
223
+ c[37] !== ve || c[38] !== D ? (De = () => {
224
+ D || be(ve);
225
+ }, Oe = [ve, D], c[37] = ve, c[38] = D, c[39] = De, c[40] = Oe) : (De = c[39], Oe = c[40]), n.useEffect(De, Oe);
226
+ let ke, Ae;
227
+ c[41] !== N || c[42] !== _ ? (Ae = () => {
228
+ _ && _ !== N && Ee(_);
229
+ }, ke = [N, _], c[41] = N, c[42] = _, c[43] = ke, c[44] = Ae) : (ke = c[43], Ae = c[44]), n.useEffect(Ae, ke);
230
+ let je;
231
+ c[45] !== N || c[46] !== A || c[47] !== _ ? (je = () => {
232
+ !_ && A?.locale && A.locale !== N && Ee(A.locale);
233
+ }, c[45] = N, c[46] = A, c[47] = _, c[48] = je) : je = c[48];
234
+ let Me = A?.locale, Ne;
235
+ c[49] !== N || c[50] !== _ || c[51] !== Me ? (Ne = [
236
+ N,
237
+ Me,
238
+ _
239
+ ], c[49] = N, c[50] = _, c[51] = Me, c[52] = Ne) : Ne = c[52], n.useEffect(je, Ne);
240
+ let Pe;
241
+ c[53] !== P || c[54] !== j ? (Pe = j.find((e) => e.value === P) ?? j.find(le) ?? j[0] ?? null, c[53] = P, c[54] = j, c[55] = Pe) : Pe = c[55];
242
+ let F = Pe, [I, Fe] = n.useState(!1), Ie = n.useRef(null), Le = n.useRef(null), Re = n.useRef(null), ze = n.useRef(null), Be = n.useRef(null), Ve = n.useRef(null), He = n.useRef(null), Ue;
243
+ c[56] === Symbol.for("react.memo_cache_sentinel") ? (Ue = {
144
244
  left: 0,
145
- top: 0,
146
- width: 0
147
- })), [I, re] = r.useState(!1), L = _ ?? I, R = v ?? re, z = r.useRef(!1);
148
- z.current = L, r.useEffect(() => {
149
- if (!L || h || g) return;
150
- let e = T.current;
151
- e instanceof HTMLInputElement && (typeof document < "u" && document.activeElement === e || e.focus({ preventScroll: !0 }));
152
- }, [
153
- h,
154
- L,
155
- g
156
- ]);
157
- let B = r.useCallback((e) => {
158
- O.current = e, j(e);
159
- }, []), ie = r.useCallback(() => {
160
- k.current = !0;
161
- }, []);
162
- r.useEffect(() => {
163
- if (!L) return;
164
- let e = d.find((e) => e.value === n);
165
- if (e && y(e)) {
166
- B(e.value);
167
- return;
168
- }
169
- let t = d.find((e) => y(e));
170
- B(t?.value ?? null);
171
- }, [
172
- L,
173
- d,
174
- B,
175
- n
176
- ]);
177
- let ae = r.useCallback((e) => {
178
- if (e === null) {
179
- o && o(null);
180
- return;
181
- }
182
- y(d.find((t) => t.value === e)) && o && o(e);
183
- }, [o, d]), V = r.useCallback((e) => {
184
- if (e === null) {
185
- o && o(null), a(null);
186
- return;
187
- }
188
- y(d.find((t) => t.value === e)) && (o && o(e), a(e));
189
- }, [
190
- a,
191
- o,
192
- d
193
- ]);
194
- r.useEffect(() => {
195
- if (!L) return;
196
- let e = M.current?.ownerDocument ?? document, t = e.defaultView ?? window, n = (e) => {
197
- let t = e.target;
198
- if (!(t instanceof Node)) return;
199
- let n = M.current;
200
- n && (n.contains(t) || N.current?.contains(t) || R(!1));
201
- }, r = (e) => {
202
- if (e.key !== "Escape" || !z.current) return;
203
- let t = e.target;
204
- if (!(t instanceof Node)) return;
205
- let n = M.current, r = N.current;
206
- !n?.contains(t) && !r?.contains(t) || (e.preventDefault(), e.stopPropagation(), R(!1));
207
- };
208
- return e.addEventListener("pointerdown", n, !0), t.addEventListener("keydown", r, !0), () => {
209
- e.removeEventListener("pointerdown", n, !0), t.removeEventListener("keydown", r, !0);
210
- };
211
- }, [L, R]), r.useEffect(() => {
212
- if (!L) return;
213
- let e = N.current;
245
+ top: 0
246
+ }, c[56] = Ue) : Ue = c[56];
247
+ let [L, We] = n.useState(Ue), Ge, Ke;
248
+ c[57] === Symbol.for("react.memo_cache_sentinel") ? (Ge = () => Le.current, Ke = [], c[57] = Ge, c[58] = Ke) : (Ge = c[57], Ke = c[58]), n.useImperativeHandle(s, Ge, Ke);
249
+ let R = (e) => {
214
250
  if (!e) return;
215
- let t = (e) => {
216
- let t = P.current;
217
- if (!t) return;
218
- let n = e.deltaY;
219
- if (n === 0) return;
220
- let r = Math.max(0, t.scrollHeight - t.clientHeight), i = t.scrollTop <= 0, a = t.scrollTop >= r, o = e.target;
221
- if (o instanceof Node && t.contains(o)) {
222
- (n < 0 && i || n > 0 && a) && e.preventDefault();
223
- return;
251
+ let t = e.value;
252
+ D || Ee(t), de?.(t, e), A?.setLocale(t), V(!0);
253
+ }, qe;
254
+ c[59] !== P || c[60] !== O || c[61] !== D || c[62] !== S ? (qe = (e) => {
255
+ let t = O[P], n = {
256
+ ...O,
257
+ [P]: {
258
+ ...t ?? {},
259
+ value: e.target.value,
260
+ updatedAt: /* @__PURE__ */ new Date(),
261
+ autoTranslated: !1
224
262
  }
225
- e.preventDefault(), t.scrollTop = Math.min(r, Math.max(0, t.scrollTop + n));
226
- };
227
- return e.addEventListener("wheel", t, { passive: !1 }), () => {
228
- e.removeEventListener("wheel", t);
229
263
  };
230
- }, [L]), r.useEffect(() => {
231
- if (!L || _ !== void 0 && !v || typeof window > "u" || !("IntersectionObserver" in window)) return;
232
- let e = T.current;
233
- if (!(e instanceof HTMLElement)) return;
234
- let t = !0, n = new IntersectionObserver((e) => {
235
- if (!t) return;
236
- let n = e[0];
237
- n && !n.isIntersecting && R(!1);
264
+ D || be(n), S?.(n);
265
+ }, c[59] = P, c[60] = O, c[61] = D, c[62] = S, c[63] = qe) : qe = c[63];
266
+ let Je = qe, Ye;
267
+ c[64] !== P || c[65] !== O ? (Ye = ne(O, P), c[64] = P, c[65] = O, c[66] = Ye) : Ye = c[66];
268
+ let Xe = Ye, Ze;
269
+ c[67] === k ? Ze = c[68] : (Ze = (e) => {
270
+ if (!k) return !0;
271
+ let t = te(k);
272
+ return e.data.searchable.some((e) => e.includes(t));
273
+ }, c[67] = k, c[68] = Ze);
274
+ let z = Ze, Qe = x ? "left-2 top-2 -translate-y-0" : "left-3 top-1/2 -translate-y-1/2", $e;
275
+ c[69] === Symbol.for("react.memo_cache_sentinel") ? ($e = () => {
276
+ let e = Re.current, t = ze.current;
277
+ if (!e || !t) return;
278
+ let n = e.getBoundingClientRect(), r = t.getBoundingClientRect();
279
+ We({
280
+ left: n.left - r.left,
281
+ top: n.bottom - r.top + 4
238
282
  });
239
- return n.observe(e), () => {
240
- t = !1, n.disconnect();
241
- };
242
- }, [
243
- v,
244
- L,
245
- _,
246
- R
247
- ]);
248
- let H = r.useCallback(() => {
249
- if (typeof window > "u") return;
250
- let e = T.current, t = N.current;
251
- if (!(e instanceof HTMLElement) || !t) return;
252
- let n = e.getBoundingClientRect(), r = t.offsetHeight, i = window.innerWidth ?? 0, a = window.innerHeight ?? 0, o = n.width, s = n.left;
253
- s + o > i - 8 && (s = Math.max(8, i - o - 8)), s < 8 && (s = 8);
254
- let c = n.bottom + 8, l = c + r > a - 8, u = n.top - r - 8;
255
- l && u >= 8 && (c = u), c < 8 && (c = 8), c + r > a - 8 && (c = Math.max(8, a - r - 8)), ne({
256
- left: s,
257
- top: c,
258
- width: o
259
- });
260
- }, []);
261
- return r.useLayoutEffect(() => {
262
- if (!L || h || typeof window > "u") return;
263
- H();
264
- let e = window.requestAnimationFrame(H);
265
- return window.addEventListener("scroll", H, !0), window.addEventListener("resize", H), () => {
266
- window.cancelAnimationFrame(e), window.removeEventListener("scroll", H, !0), window.removeEventListener("resize", H);
267
- };
268
- }, [
269
- h,
270
- L,
271
- H
272
- ]), r.useEffect(() => {
273
- if (!L) return;
274
- let e = P.current;
283
+ }, c[69] = $e) : $e = c[69];
284
+ let et = $e, tt;
285
+ c[70] === Symbol.for("react.memo_cache_sentinel") ? (tt = (e) => !e || !(e instanceof Node) ? !1 : !!Ie.current?.contains(e), c[70] = tt) : tt = c[70];
286
+ let B = tt, nt;
287
+ c[71] === Symbol.for("react.memo_cache_sentinel") ? (nt = () => {
288
+ let e = Le.current;
275
289
  if (!e) return;
276
- let t = requestAnimationFrame(() => {
277
- let t = e.querySelector("[role=\"option\"][data-state=\"checked\"]");
278
- if (t instanceof HTMLElement) {
279
- let n = t.offsetTop - 8, r = t.offsetTop + t.offsetHeight + 8;
280
- if (n < e.scrollTop) {
281
- e.scrollTop = Math.max(0, n);
282
- return;
283
- }
284
- r > e.scrollTop + e.clientHeight && (e.scrollTop = Math.max(0, r - e.clientHeight));
285
- return;
286
- }
287
- let n = Array.from(e.querySelectorAll("[role=\"option\"]"));
288
- if (!n.length) return;
289
- let r, i;
290
- for (let e of n) {
291
- if (!e.hasAttribute("data-disabled")) {
292
- r = e;
293
- break;
294
- }
295
- i = e;
296
- }
297
- if (!r) return;
298
- let a = Math.max(0, (i || r).offsetTop - 8);
299
- e.scrollTop = a;
290
+ e.focus();
291
+ let t = He.current;
292
+ t && t.start != null && t.end != null && e.setSelectionRange(t.start, t.end);
293
+ }, c[71] = nt) : nt = c[71];
294
+ let rt = nt, it;
295
+ c[72] === I ? it = c[73] : (it = () => {
296
+ if (!I) return;
297
+ let e = Ve.current;
298
+ e && requestAnimationFrame(() => {
299
+ if (document.activeElement === e) return;
300
+ e.focus();
301
+ let t = e.value.length;
302
+ try {
303
+ e.setSelectionRange(t, t);
304
+ } catch {}
300
305
  });
301
- return () => cancelAnimationFrame(t);
302
- }, [L, d]), r.useEffect(() => {
303
- if (!L || !A || !k.current) return;
304
- let e = P.current;
305
- if (!e) return;
306
- let t = e.querySelector(`[role="option"][data-value="${A}"]`);
307
- if (!(t instanceof HTMLElement)) return;
308
- let n = t.offsetTop - 8, r = t.offsetTop + t.offsetHeight + 8;
309
- if (n < e.scrollTop) {
310
- e.scrollTop = Math.max(0, n);
311
- return;
312
- }
313
- r > e.scrollTop + e.clientHeight && (e.scrollTop = Math.max(0, r - e.clientHeight));
314
- }, [A, L]), /* @__PURE__ */ c("div", {
315
- "data-slot": "hours-picker-input",
316
- className: t("w-[150px]", p),
317
- ref: M,
318
- children: /* @__PURE__ */ l("div", {
319
- className: "relative",
320
- children: [/* @__PURE__ */ c(w, {
321
- id: C,
322
- placeholder: f,
323
- value: n,
324
- onValueUpdate: ae,
325
- onCommit: V,
326
- options: d,
327
- disabled: h,
328
- readOnly: g,
329
- open: L,
330
- setOpen: R,
331
- inputClassName: m,
332
- triggerTestId: ee,
333
- isHydrated: x,
334
- highlightedValueRef: O,
335
- setHighlightedValue: B,
336
- markKeyboardNavigation: ie,
337
- inputRef: (e) => {
338
- T.current = e;
339
- },
340
- onDraftValueHandlerChange: D
341
- }), L ? (() => {
342
- let e = /* @__PURE__ */ c(s, { children: /* @__PURE__ */ l("div", {
343
- ref: N,
344
- "data-testid": te,
345
- "data-state": "open",
346
- className: t("pointer-events-auto fixed z-[60] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md", "data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95"),
347
- style: {
348
- left: F.left,
349
- top: F.top,
350
- width: F.width
351
- },
352
- children: [
353
- /* @__PURE__ */ c(b, {
354
- direction: "up",
355
- viewportRef: P
356
- }),
357
- /* @__PURE__ */ c("div", {
358
- ref: P,
359
- role: "listbox",
360
- className: "max-h-64 overflow-y-auto p-1 [overscroll-behavior:contain] [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden",
361
- children: d.map((e) => {
362
- let r = e.value === n;
363
- return /* @__PURE__ */ l("div", {
364
- role: "option",
365
- "aria-selected": r,
366
- "data-value": e.value,
367
- "data-state": r ? "checked" : "unchecked",
368
- "data-disabled": e.disabled ? "" : void 0,
369
- className: t("relative flex w-full select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none cursor-pointer", e.disabled && "pointer-events-none opacity-50", A === e.value && "bg-accent text-accent-foreground"),
370
- onMouseDown: (e) => {
371
- e.preventDefault();
372
- },
373
- onClick: () => {
374
- e.disabled || (E.current?.(e.value), B(e.value), T.current?.focus({ preventScroll: !0 }), V(e.value), R(!1));
375
- },
376
- onPointerEnter: () => {
377
- k.current || (k.current = !1, B(e.value));
378
- },
379
- onPointerMove: (t) => {
380
- k.current && t.movementX === 0 && t.movementY === 0 || (k.current = !1, B(e.value));
381
- },
382
- children: [/* @__PURE__ */ c("span", {
383
- className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center",
384
- children: r ? /* @__PURE__ */ c(i, {
385
- "aria-hidden": !0,
386
- className: "h-4 w-4"
387
- }) : null
388
- }), /* @__PURE__ */ l("div", {
389
- className: "flex flex-col",
390
- children: [/* @__PURE__ */ c("span", { children: e.label }), e.description == null ? null : /* @__PURE__ */ c("span", {
391
- "data-slot": "description",
392
- className: "text-xs text-muted-foreground",
393
- children: e.description
394
- })]
395
- })]
396
- }, e.value);
397
- })
398
- }),
399
- /* @__PURE__ */ c(b, {
400
- direction: "down",
401
- viewportRef: P
402
- })
403
- ]
404
- }) });
405
- return typeof document > "u" ? e : u(e, document.body);
406
- })() : null]
407
- })
408
- });
409
- }
410
- x.displayName = "HourPickerInput";
411
- function S({ id: e, value: n, onChange: o, onValueUpdate: d, options: f, placeholder: p = "Select time", className: m, inputClassName: h, disabled: g, readOnly: _, open: v, onOpenChange: ee, triggerTestId: te, contentTestId: x, isHydrated: S }) {
412
- let C = r.useId(), w = e ?? `hours-picker-${C}`, T = r.useRef(null), E = r.useRef(null), D = r.useRef(null), O = r.useRef(null), [k, A] = r.useState(() => ({
413
- left: 0,
414
- top: 0,
415
- width: 0
416
- })), [j, M] = r.useState(!1), N = v ?? j, P = ee ?? M, F = r.useRef(!1);
417
- F.current = N;
418
- let ne = r.useCallback((e) => {
419
- y(f.find((t) => t.value === e)) && (d && d(e), o(e));
420
- }, [
421
- o,
422
- d,
423
- f
424
- ]), I = r.useCallback(() => {
425
- if (typeof window > "u") return;
426
- let e = T.current, t = D.current;
427
- if (!(e instanceof HTMLElement) || !t) return;
428
- let n = e.getBoundingClientRect(), r = t.offsetHeight, i = window.innerWidth ?? 0, a = window.innerHeight ?? 0, o = n.width, s = n.left;
429
- s + o > i - 8 && (s = Math.max(8, i - o - 8)), s < 8 && (s = 8);
430
- let c = n.bottom + 8, l = c + r > a - 8, u = n.top - r - 8;
431
- l && u >= 8 && (c = u), c < 8 && (c = 8), c + r > a - 8 && (c = Math.max(8, a - r - 8)), A({
432
- left: s,
433
- top: c,
434
- width: o
306
+ }, c[72] = I, c[73] = it);
307
+ let at;
308
+ c[74] !== I || c[75] !== k ? (at = [I, k], c[74] = I, c[75] = k, c[76] = at) : at = c[76], n.useEffect(it, at);
309
+ let ot;
310
+ c[77] === Symbol.for("react.memo_cache_sentinel") ? (ot = (e) => {
311
+ let t = e === void 0 || e;
312
+ Fe(!1), Se(""), t && requestAnimationFrame(() => {
313
+ rt();
435
314
  });
436
- }, []);
437
- r.useLayoutEffect(() => {
438
- if (!N || g || typeof window > "u") return;
439
- I();
440
- let e = window.requestAnimationFrame(I);
441
- return window.addEventListener("scroll", I, !0), window.addEventListener("resize", I), () => {
442
- window.cancelAnimationFrame(e), window.removeEventListener("scroll", I, !0), window.removeEventListener("resize", I);
443
- };
444
- }, [
445
- g,
446
- N,
447
- I
448
- ]), r.useEffect(() => {
449
- if (!N) return;
450
- let e = E.current?.ownerDocument ?? document, t = e.defaultView ?? window, n = (e) => {
451
- let t = e.target;
452
- t instanceof Node && (E.current?.contains(t) || D.current?.contains(t) || P(!1));
453
- }, r = (e) => {
454
- if (e.key !== "Escape" || !F.current) return;
455
- let t = e.target;
456
- if (!(t instanceof Node)) return;
457
- let n = E.current, r = D.current;
458
- !n?.contains(t) && !r?.contains(t) || (e.preventDefault(), e.stopPropagation(), P(!1), T.current?.focus({ preventScroll: !0 }));
459
- };
460
- return e.addEventListener("pointerdown", n, !0), t.addEventListener("keydown", r, !0), () => {
461
- e.removeEventListener("pointerdown", n, !0), t.removeEventListener("keydown", r, !0);
462
- };
463
- }, [N, P]);
464
- let re = f.find((e) => e.value === n);
465
- return /* @__PURE__ */ l("div", {
466
- "data-slot": "hours-picker-field",
467
- className: t("w-[150px]", m),
468
- ref: E,
469
- children: [/* @__PURE__ */ l("button", {
470
- ref: T,
471
- id: w,
472
- type: "button",
473
- role: "combobox",
474
- "aria-expanded": N,
475
- "aria-controls": `${w}-content`,
476
- disabled: g,
477
- "data-testid": te,
478
- "data-hydrated": S ? "true" : void 0,
479
- className: t("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50", "hover:bg-accent hover:text-accent-foreground", !n && "text-muted-foreground", N && "ring-2 ring-primary ring-offset-2", h),
480
- onClick: () => {
481
- g || _ || P(!N);
482
- },
483
- children: [/* @__PURE__ */ c("span", {
484
- className: "line-clamp-1 text-left",
485
- children: re ? re.label : p
486
- }), /* @__PURE__ */ c(a, {
487
- "aria-hidden": !0,
488
- className: "h-4 w-4 shrink-0 opacity-50"
489
- })]
490
- }), N ? (() => {
491
- let e = /* @__PURE__ */ c(s, { children: /* @__PURE__ */ l("div", {
492
- ref: D,
493
- id: `${w}-content`,
494
- "data-testid": x,
495
- "data-state": "open",
496
- className: t("fixed z-[60] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md", "data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95"),
497
- style: {
498
- left: k.left,
499
- top: k.top,
500
- width: k.width
501
- },
502
- children: [
503
- /* @__PURE__ */ c(b, {
504
- direction: "up",
505
- viewportRef: O
506
- }),
507
- /* @__PURE__ */ c("div", {
508
- ref: O,
509
- role: "listbox",
510
- className: "max-h-64 overflow-y-auto p-1 [overscroll-behavior:contain] [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden",
511
- children: f.map((e) => {
512
- let r = e.value === n;
513
- return /* @__PURE__ */ l("div", {
514
- role: "option",
515
- "aria-selected": r,
516
- "data-value": e.value,
517
- "data-state": r ? "checked" : "unchecked",
518
- "data-disabled": e.disabled ? "" : void 0,
519
- className: t("relative flex w-full select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none cursor-pointer", e.disabled && "pointer-events-none opacity-50", r && "bg-accent text-accent-foreground"),
520
- onMouseDown: (e) => {
521
- e.preventDefault();
522
- },
523
- onClick: () => {
524
- e.disabled || _ || (ne(e.value), P(!1), T.current?.focus({ preventScroll: !0 }));
525
- },
526
- children: [/* @__PURE__ */ c("span", {
527
- className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center",
528
- children: r ? /* @__PURE__ */ c(i, {
529
- "aria-hidden": !0,
530
- className: "h-4 w-4"
531
- }) : null
532
- }), /* @__PURE__ */ l("div", {
533
- className: "flex flex-col",
534
- children: [/* @__PURE__ */ c("span", { children: e.label }), e.description == null ? null : /* @__PURE__ */ c("span", {
535
- "data-slot": "description",
536
- className: "text-xs text-muted-foreground",
537
- children: e.description
538
- })]
539
- })]
540
- }, e.value);
541
- })
542
- }),
543
- /* @__PURE__ */ c(b, {
544
- direction: "down",
545
- viewportRef: O
546
- })
547
- ]
548
- }) });
549
- return typeof document > "u" ? e : u(e, document.body);
550
- })() : null]
551
- });
552
- }
553
- function C(t) {
554
- let r = n(4);
555
- if (e()) {
556
- let e;
557
- return r[0] === t ? e = r[1] : (e = /* @__PURE__ */ c(S, { ...t }), r[0] = t, r[1] = e), e;
558
- }
559
- let i;
560
- return r[2] === t ? i = r[3] : (i = /* @__PURE__ */ c(x, { ...t }), r[2] = t, r[3] = i), i;
561
- }
562
- C.displayName = "HourPickerField";
563
- function w(e) {
564
- let i = n(93), { id: o, placeholder: s, value: u, onValueUpdate: f, onCommit: p, options: m, disabled: g, readOnly: b, open: x, setOpen: S, inputClassName: C, triggerTestId: w, isHydrated: O, highlightedValueRef: k, setHighlightedValue: A, markKeyboardNavigation: j, inputRef: M, onDraftValueHandlerChange: N } = e, P = r.useRef(!1), F = r.useRef(!1), ne = r.useRef(!1), I = r.useRef(null), re = r.useRef(null), L = r.useRef(!1), R;
565
- i[0] === u ? R = i[1] : (R = () => u || "", i[0] = u, i[1] = R);
566
- let [z, B] = r.useState(R), ie, ae;
567
- i[2] === N ? (ie = i[3], ae = i[4]) : (ie = () => (N((e) => {
568
- B(e);
569
- }), () => {
570
- N(null);
571
- }), ae = [N], i[2] = N, i[3] = ie, i[4] = ae), r.useEffect(ie, ae);
572
- let V;
573
- i[5] !== k || i[6] !== f || i[7] !== m || i[8] !== A || i[9] !== u ? (V = (e) => {
574
- let t = k.current ?? u ?? "", n = m.findIndex((e) => e.value === t);
575
- n === -1 && (n = e === 1 ? -1 : m.length);
576
- for (let t = n + e; t >= 0 && t < m.length; t += e) {
577
- let e = m[t];
578
- if (y(e)) {
579
- A(e.value), I.current = e.value, B(e.value), f(e.value);
580
- return;
581
- }
582
- }
583
- }, i[5] = k, i[6] = f, i[7] = m, i[8] = A, i[9] = u, i[10] = V) : V = i[10];
584
- let H = V, oe, se;
585
- i[11] === u ? (oe = i[12], se = i[13]) : (oe = () => {
586
- P.current || B(u || "");
587
- }, se = [u], i[11] = u, i[12] = oe, i[13] = se), r.useEffect(oe, se);
588
- let ce, le;
589
- i[14] === z ? (ce = i[15], le = i[16]) : (ce = () => {
590
- re.current = _(z);
591
- }, le = [z], i[14] = z, i[15] = ce, i[16] = le), r.useEffect(ce, le);
592
- let ue, de;
593
- i[17] === u ? (ue = i[18], de = i[19]) : (de = () => {
594
- u === null && (L.current = !1);
595
- }, ue = [u], i[17] = u, i[18] = ue, i[19] = de), r.useEffect(de, ue);
596
- let fe = !z && "text-muted-foreground", pe = x && "ring-2 ring-primary ring-offset-2", me;
597
- i[20] !== C || i[21] !== fe || i[22] !== pe ? (me = t("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 pr-10 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", "transition-colors group-hover:bg-accent group-hover:text-accent-foreground", fe, pe, "[&_[data-slot='description']]:hidden", C), i[20] = C, i[21] = fe, i[22] = pe, i[23] = me) : me = i[23];
598
- let he = me, ge = O ? "true" : void 0, _e;
599
- i[24] === Symbol.for("react.memo_cache_sentinel") ? (_e = [{
600
- mask: "00:00",
601
- lazy: !0
602
- }, {
603
- mask: "0:00",
604
- lazy: !0
605
- }], i[24] = _e) : _e = i[24];
606
- let U;
607
- i[25] === m ? U = i[26] : (U = (e, t) => {
608
- let n = (t.value + e).replace(/\D/g, "");
609
- if (n.length <= 2 || n.length >= 4) return t.compiledMasks[0];
610
- let r = h(Number(n.slice(0, 2)));
611
- return m.some((e) => e.value.startsWith(`${r}:`)) ? t.compiledMasks[0] : t.compiledMasks[1];
612
- }, i[25] = m, i[26] = U);
613
- let W;
614
- i[27] !== p || i[28] !== u ? (W = (e, t, n) => {
615
- if (!n) return;
616
- let r = typeof e == "string" ? e : String(e ?? ""), i = r.replace(/\D/g, ""), a = _(r);
617
- if (re.current !== a) {
618
- if (re.current = a, B(r), i.length !== 0) {
619
- L.current = !1;
620
- return;
621
- }
622
- u && !L.current && (L.current = !0, p(null));
623
- }
624
- }, i[27] = p, i[28] = u, i[29] = W) : W = i[29];
625
- let G;
626
- i[30] !== p || i[31] !== m || i[32] !== A || i[33] !== u ? (G = (e, t, n) => {
627
- if (!n) return;
628
- let r = typeof e == "string" ? e : String(e ?? "");
629
- if (I.current === r) {
630
- I.current = null;
315
+ }, c[77] = ot) : ot = c[77];
316
+ let V = ot, H;
317
+ c[78] === C ? H = c[79] : (H = C ?? {}, c[78] = C, c[79] = H);
318
+ let U, W, st, ct, G, lt;
319
+ c[80] === H ? (U = c[81], W = c[82], st = c[83], ct = c[84], G = c[85], lt = c[86]) : ({components: G, styles: lt, classNamePrefix: ct, placeholder: st, noOptionsMessage: W, ...U} = H, c[80] = H, c[81] = U, c[82] = W, c[83] = st, c[84] = ct, c[85] = G, c[86] = lt);
320
+ let ut;
321
+ if (c[87] !== z || c[88] !== j || c[89] !== k) {
322
+ let e = te(k), t = (t) => {
323
+ let n = t.code.toLowerCase();
324
+ return e && n === e ? 0 : e && n.startsWith(e) ? 1 : e && t.searchable.some((t) => t.startsWith(e)) ? 2 : e && t.searchable.some((t) => t.includes(e)) ? 3 : 4;
325
+ }, n;
326
+ c[91] === z ? n = c[92] : (n = (e) => z({ data: e }), c[91] = z, c[92] = n), ut = j.filter(n).sort((e, n) => {
327
+ let r = t(e) - t(n);
328
+ return r === 0 ? e.name.localeCompare(n.name) : r;
329
+ }), c[87] = z, c[88] = j, c[89] = k, c[90] = ut;
330
+ } else ut = c[90];
331
+ let K = ut, dt;
332
+ c[93] !== V || c[94] !== K || c[95] !== R ? (dt = (e) => {
333
+ if (e.key === "Escape") {
334
+ e.preventDefault(), V(!0);
631
335
  return;
632
336
  }
633
- let i = v(r, m);
634
- if (!i) return;
635
- if (i.selectableValue) {
636
- if (A(i.selectableValue), B(i.selectableValue), u === i.selectableValue) return;
637
- p(i.selectableValue);
337
+ if (e.key === "Enter") {
338
+ e.preventDefault();
339
+ let t = K[0];
340
+ t && R(t);
638
341
  return;
639
342
  }
640
- let a = ee(i.parsed);
641
- if (a == null) return;
642
- let o = te(a, m);
643
- o && A(o.value);
644
- }, i[30] = p, i[31] = m, i[32] = A, i[33] = u, i[34] = G) : G = i[34];
645
- let K, q, J;
646
- i[35] !== g || i[36] !== x || i[37] !== S ? (K = () => {
647
- F.current = !0, !g && (x || S(!0));
648
- }, q = (e) => {
649
- F.current = !0, ne.current = typeof document < "u" && document.activeElement === e.currentTarget, !g && (x || S(!0));
650
- }, J = () => {
651
- g || x || S(!0);
652
- }, i[35] = g, i[36] = x, i[37] = S, i[38] = K, i[39] = q, i[40] = J) : (K = i[38], q = i[39], J = i[40]);
343
+ (e.key === "ArrowDown" || e.key === "ArrowUp") && (e.preventDefault(), Be.current?.focus());
344
+ }, c[93] = V, c[94] = K, c[95] = R, c[96] = dt) : dt = c[96];
345
+ let ft = dt, pt;
346
+ c[97] !== ft || c[98] !== k || c[99] !== pe ? (pt = {
347
+ searchTerm: k,
348
+ setSearchTerm: Se,
349
+ onSearchKeyDown: ft,
350
+ searchInputRef: Ve,
351
+ selectFooter: pe
352
+ }, c[97] = ft, c[98] = k, c[99] = pe, c[100] = pt) : pt = c[100];
353
+ let mt = pt, q;
354
+ c[101] === G ? q = c[102] : (q = G ?? {}, c[101] = G, c[102] = q);
355
+ let ht;
356
+ c[103] === q ? ht = c[104] : (ht = {
357
+ Control: ae,
358
+ IndicatorsContainer: y,
359
+ DropdownIndicator: y,
360
+ IndicatorSeparator: y,
361
+ ValueContainer: y,
362
+ MenuList: oe,
363
+ ...q,
364
+ Option: se
365
+ }, c[103] = q, c[104] = ht);
366
+ let gt = ht, J;
367
+ c[105] === lt ? J = c[106] : (J = lt ?? {}, c[105] = lt, c[106] = J);
368
+ let _t;
369
+ c[107] === J ? _t = c[108] : (_t = {
370
+ ...ie,
371
+ ...J
372
+ }, c[107] = J, c[108] = _t);
373
+ let vt = _t, yt, bt;
374
+ c[109] !== I || c[110] !== et ? (yt = () => {
375
+ if (!I) return;
376
+ et();
377
+ let e = () => et();
378
+ return window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
379
+ }, bt = [I, et], c[109] = I, c[110] = et, c[111] = yt, c[112] = bt) : (yt = c[111], bt = c[112]), n.useLayoutEffect(yt, bt);
653
380
  let Y;
654
- i[41] !== g || i[42] !== z || i[43] !== k || i[44] !== j || i[45] !== H || i[46] !== p || i[47] !== x || i[48] !== m || i[49] !== A || i[50] !== S ? (Y = (e) => {
655
- if (!g) {
656
- if (e.key === "Tab" && x && !e.defaultPrevented) {
657
- S(!1);
658
- return;
659
- }
660
- if (e.key === "Escape") {
661
- if (!x) return;
662
- e.preventDefault(), S(!1);
663
- return;
664
- }
665
- if (!x && !e.defaultPrevented && (e.key.length === 1 || e.key === "Backspace" || e.key === "Delete") && !e.ctrlKey && !e.metaKey && !e.altKey && S(!0), e.key === "ArrowDown" || e.key === "ArrowUp") {
666
- if (j(), e.preventDefault(), !x) {
667
- S(!0);
668
- return;
669
- }
670
- H(e.key === "ArrowDown" ? 1 : -1);
671
- return;
672
- }
673
- if (e.key === "Enter") {
674
- j();
675
- let t = v(z, m);
676
- if (!t) {
677
- if (!x || z.trim() !== "") return;
678
- let t = m.find((e) => e.value === k.current), n = (y(t) ? t?.value : void 0) ?? m.find(D)?.value;
679
- if (!n) return;
680
- e.preventDefault(), A(n), B(n), p(n), S(!1);
681
- return;
682
- }
683
- if (t.selectableValue) {
684
- e.preventDefault(), A(t.selectableValue), B(t.selectableValue), p(t.selectableValue), S(!1);
685
- return;
686
- }
687
- let n = ee(t.parsed);
688
- if (n == null) return;
689
- let r = te(n, m);
690
- if (!r) return;
691
- e.preventDefault(), A(r.value), B(r.value), p(r.value), S(!1);
692
- return;
693
- }
694
- }
695
- }, i[41] = g, i[42] = z, i[43] = k, i[44] = j, i[45] = H, i[46] = p, i[47] = x, i[48] = m, i[49] = A, i[50] = S, i[51] = Y) : Y = i[51];
381
+ c[113] !== V || c[114] !== I || c[115] !== T ? (Y = (e) => {
382
+ I && V(!1), T.onFocus?.(e);
383
+ }, c[113] = V, c[114] = I, c[115] = T, c[116] = Y) : Y = c[116];
696
384
  let X;
697
- i[52] !== g || i[53] !== x || i[54] !== S ? (X = (e) => {
698
- let t = !F.current || !ne.current;
699
- if (F.current = !1, ne.current = !1, P.current = !0, t) {
700
- let t = e.currentTarget;
701
- requestAnimationFrame(() => t.select());
702
- }
703
- g || x || S(!0);
704
- }, i[52] = g, i[53] = x, i[54] = S, i[55] = X) : X = i[55];
705
- let Z;
706
- i[56] !== z || i[57] !== p || i[58] !== m || i[59] !== u ? (Z = () => {
707
- P.current = !1;
708
- let e = z.trim();
709
- if (!e) {
710
- B(u || "");
711
- return;
712
- }
713
- let t = v(e, m);
714
- if (!t) {
715
- B(u || "");
716
- return;
717
- }
718
- if (!t.selectableValue) {
719
- B(u || "");
720
- return;
721
- }
722
- B(t.selectableValue), u !== t.selectableValue && p(t.selectableValue);
723
- }, i[56] = z, i[57] = p, i[58] = m, i[59] = u, i[60] = Z) : Z = i[60];
724
- let Q;
725
- i[61] !== g || i[62] !== z || i[63] !== o || i[64] !== M || i[65] !== s || i[66] !== b || i[67] !== ge || i[68] !== U || i[69] !== W || i[70] !== G || i[71] !== K || i[72] !== q || i[73] !== J || i[74] !== Y || i[75] !== X || i[76] !== Z || i[77] !== he || i[78] !== w ? (Q = /* @__PURE__ */ c(d, {
726
- id: o,
727
- "data-testid": w,
728
- "data-hydrated": ge,
385
+ c[117] !== V || c[118] !== B || c[119] !== T ? (X = (e) => {
386
+ B(e.relatedTarget) || V(!1), T.onBlur?.(e);
387
+ }, c[117] = V, c[118] = B, c[119] = T, c[120] = X) : X = c[120];
388
+ let xt = x ? "min-h-24 py-2" : "h-10 py-2", Z;
389
+ c[121] !== g || c[122] !== xt ? (Z = e("w-full rounded-md border border-input bg-background text-base ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", xt, "pl-10 pr-3", g), c[121] = g, c[122] = xt, c[123] = Z) : Z = c[123];
390
+ let St;
391
+ c[124] !== Xe || c[125] !== h || c[126] !== Je || c[127] !== T || c[128] !== Y || c[129] !== X || c[130] !== Z ? (St = {
392
+ ...T,
393
+ ref: Le,
394
+ disabled: h,
395
+ value: Xe,
396
+ onChange: Je,
397
+ onFocus: Y,
398
+ onBlur: X,
399
+ className: Z,
400
+ placeholder: T.placeholder
401
+ }, c[124] = Xe, c[125] = h, c[126] = Je, c[127] = T, c[128] = Y, c[129] = X, c[130] = Z, c[131] = St) : St = c[131];
402
+ let Ct = St, Q;
403
+ c[132] === l ? Q = c[133] : (Q = e("relative flex flex-col", l), c[132] = l, c[133] = Q);
404
+ let wt;
405
+ c[134] !== V || c[135] !== B ? (wt = (e) => {
406
+ B(e.relatedTarget) || V(!1);
407
+ }, c[134] = V, c[135] = B, c[136] = wt) : wt = c[136];
408
+ let Tt;
409
+ c[137] !== x || c[138] !== E || c[139] !== Ct ? (Tt = x ? /* @__PURE__ */ r("textarea", {
410
+ rows: E,
411
+ ...Ct
412
+ }) : /* @__PURE__ */ r("input", {
729
413
  type: "text",
730
- disabled: g,
731
- readOnly: b,
732
- inputRef: M,
733
- autoComplete: "off",
734
- mask: _e,
735
- dispatch: U,
736
- placeholder: s,
737
- value: z,
738
- className: he,
739
- onAccept: W,
740
- onComplete: G,
741
- onPointerDown: K,
742
- onMouseDown: q,
743
- onClick: J,
744
- onKeyDown: Y,
745
- onFocus: X,
746
- onBlur: Z
747
- }), i[61] = g, i[62] = z, i[63] = o, i[64] = M, i[65] = s, i[66] = b, i[67] = ge, i[68] = U, i[69] = W, i[70] = G, i[71] = K, i[72] = q, i[73] = J, i[74] = Y, i[75] = X, i[76] = Z, i[77] = he, i[78] = w, i[79] = Q) : Q = i[79];
748
- let ve;
749
- i[80] === Symbol.for("react.memo_cache_sentinel") ? (ve = t("absolute right-1 top-1/2 inline-flex size-8 -translate-y-1/2 items-center justify-center rounded-md text-muted-foreground transition-colors hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"), i[80] = ve) : ve = i[80];
750
- let ye = x ? "Close time picker" : "Open time picker", $;
751
- i[81] !== g || i[82] !== x || i[83] !== S ? ($ = () => {
752
- g || S(!x);
753
- }, i[81] = g, i[82] = x, i[83] = S, i[84] = $) : $ = i[84];
754
- let be;
755
- i[85] === Symbol.for("react.memo_cache_sentinel") ? (be = /* @__PURE__ */ c(a, {
756
- "aria-hidden": !0,
757
- className: "size-4"
758
- }), i[85] = be) : be = i[85];
759
- let xe;
760
- i[86] !== g || i[87] !== ye || i[88] !== $ ? (xe = /* @__PURE__ */ c("button", {
414
+ ...Ct
415
+ }), c[137] = x, c[138] = E, c[139] = Ct, c[140] = Tt) : Tt = c[140];
416
+ let Et = h ? "cursor-not-allowed opacity-50 pointer-events-none" : "cursor-pointer hover:bg-muted", Dt = F ? "border-transparent" : "border-dashed border-border text-muted-foreground", Ot;
417
+ c[141] !== Qe || c[142] !== Et || c[143] !== Dt ? (Ot = e("absolute flex h-6 w-6 items-center justify-center rounded border text-xs font-semibold leading-none transition focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2", Qe, Et, Dt), c[141] = Qe, c[142] = Et, c[143] = Dt, c[144] = Ot) : Ot = c[144];
418
+ let kt = F ? `Select language (${F.code})` : "Select language", $;
419
+ c[145] === h ? $ = c[146] : ($ = () => {
420
+ if (h) return;
421
+ let e = Le.current;
422
+ e && (He.current = {
423
+ start: e.selectionStart,
424
+ end: e.selectionEnd
425
+ }), Se(""), Fe(!0), requestAnimationFrame(() => {
426
+ Ve.current ? (Ve.current.focus(), Ve.current.select()) : Be.current?.focus();
427
+ });
428
+ }, c[145] = h, c[146] = $);
429
+ let At;
430
+ c[147] === F ? At = c[148] : (At = F ? m(F.code) : "?", c[147] = F, c[148] = At);
431
+ let jt;
432
+ c[149] === At ? jt = c[150] : (jt = /* @__PURE__ */ r("span", {
433
+ "aria-hidden": "true",
434
+ children: At
435
+ }), c[149] = At, c[150] = jt);
436
+ let Mt;
437
+ c[151] !== h || c[152] !== he || c[153] !== Ot || c[154] !== kt || c[155] !== $ || c[156] !== jt ? (Mt = /* @__PURE__ */ r("button", {
761
438
  type: "button",
762
- tabIndex: -1,
763
- disabled: g,
764
- "data-slot": "hours-picker-input-toggle",
765
- className: ve,
766
- "aria-label": ye,
767
- onPointerDown: E,
768
- onMouseDown: T,
439
+ className: Ot,
440
+ "aria-label": kt,
441
+ onMouseDown: ue,
769
442
  onClick: $,
770
- children: be
771
- }), i[86] = g, i[87] = ye, i[88] = $, i[89] = xe) : xe = i[89];
772
- let Se;
773
- return i[90] !== Q || i[91] !== xe ? (Se = /* @__PURE__ */ l("div", {
774
- className: "relative group",
775
- children: [Q, xe]
776
- }), i[90] = Q, i[91] = xe, i[92] = Se) : Se = i[92], Se;
777
- }
778
- function T(e) {
779
- e.preventDefault();
443
+ tabIndex: he,
444
+ disabled: h,
445
+ ref: Re,
446
+ children: jt
447
+ }), c[151] = h, c[152] = he, c[153] = Ot, c[154] = kt, c[155] = $, c[156] = jt, c[157] = Mt) : Mt = c[157];
448
+ let Nt;
449
+ c[158] !== Tt || c[159] !== Mt ? (Nt = /* @__PURE__ */ i("div", {
450
+ ref: ze,
451
+ className: "relative",
452
+ children: [Tt, Mt]
453
+ }), c[158] = Tt, c[159] = Mt, c[160] = Nt) : Nt = c[160];
454
+ let Pt = I ? "auto" : "none", Ft;
455
+ c[161] !== L.left || c[162] !== L.top || c[163] !== Pt ? (Ft = {
456
+ pointerEvents: Pt,
457
+ width: "min(260px, 100%)",
458
+ left: L.left,
459
+ top: L.top
460
+ }, c[161] = L.left, c[162] = L.top, c[163] = Pt, c[164] = Ft) : Ft = c[164];
461
+ let It = ct ?? "i18n-language-select", Lt = st ?? "", Rt;
462
+ c[165] === V ? Rt = c[166] : (Rt = () => V(!0), c[165] = V, c[166] = Rt);
463
+ let zt;
464
+ c[167] !== z || c[168] !== K || c[169] !== U || c[170] !== R || c[171] !== I || c[172] !== gt || c[173] !== vt || c[174] !== W || c[175] !== It || c[176] !== Lt || c[177] !== Rt ? (zt = /* @__PURE__ */ r(a, {
465
+ ...U,
466
+ menuIsOpen: I,
467
+ options: K,
468
+ value: null,
469
+ onChange: R,
470
+ classNamePrefix: It,
471
+ components: gt,
472
+ styles: vt,
473
+ isClearable: !1,
474
+ isSearchable: !1,
475
+ backspaceRemovesValue: !1,
476
+ tabSelectsValue: !0,
477
+ menuShouldScrollIntoView: !1,
478
+ placeholder: Lt,
479
+ filterOption: z,
480
+ noOptionsMessage: W,
481
+ onMenuClose: Rt,
482
+ ref: Be
483
+ }), c[167] = z, c[168] = K, c[169] = U, c[170] = R, c[171] = I, c[172] = gt, c[173] = vt, c[174] = W, c[175] = It, c[176] = Lt, c[177] = Rt, c[178] = zt) : zt = c[178];
484
+ let Bt;
485
+ c[179] !== mt || c[180] !== zt ? (Bt = /* @__PURE__ */ r(b.Provider, {
486
+ value: mt,
487
+ children: zt
488
+ }), c[179] = mt, c[180] = zt, c[181] = Bt) : Bt = c[181];
489
+ let Vt;
490
+ c[182] !== Ft || c[183] !== Bt ? (Vt = /* @__PURE__ */ r("div", {
491
+ className: "absolute left-0 top-full z-30 mt-1",
492
+ style: Ft,
493
+ children: Bt
494
+ }), c[182] = Ft, c[183] = Bt, c[184] = Vt) : Vt = c[184];
495
+ let Ht;
496
+ return c[185] !== Q || c[186] !== wt || c[187] !== Nt || c[188] !== Vt ? (Ht = /* @__PURE__ */ i("div", {
497
+ ref: Ie,
498
+ className: Q,
499
+ onBlur: wt,
500
+ children: [Nt, Vt]
501
+ }), c[185] = Q, c[186] = wt, c[187] = Nt, c[188] = Vt, c[189] = Ht) : Ht = c[189], Ht;
502
+ });
503
+ x.displayName = "I18nField";
504
+ function ce(e) {
505
+ return e.value;
780
506
  }
781
- function E(e) {
782
- e.preventDefault();
507
+ function le(e) {
508
+ return e.value === c;
783
509
  }
784
- function D(e) {
785
- return y(e);
510
+ function ue(e) {
511
+ return e.preventDefault();
786
512
  }
787
513
  //#endregion
788
- export { C as HourPickerField, x as HourPickerInput };
514
+ export { x as I18nField, s as I18nFieldLocaleProvider };
789
515
 
790
516
  //# sourceMappingURL=index301.js.map