treege 3.0.0-beta.26 → 3.0.0-beta.27

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 (54) hide show
  1. package/README.md +188 -24
  2. package/dist/ThemeContext-Cc71SvqK.js +410 -0
  3. package/dist/{TreegeEditor-WqTXkYl3.js → TreegeEditor-PuRxHufZ.js} +198 -197
  4. package/dist/TreegeRenderer-COBf5Nh3.js +1047 -0
  5. package/dist/editor.js +2 -2
  6. package/dist/main.js +54 -52
  7. package/dist/node-gfy3ym4p.js +340 -0
  8. package/dist/renderer/features/TreegeRenderer/native/TreegeRenderer.d.ts +20 -11
  9. package/dist/renderer/features/TreegeRenderer/native/components/DefaultFormWrapper.d.ts +7 -7
  10. package/dist/renderer/features/TreegeRenderer/native/components/DefaultGroup.d.ts +7 -7
  11. package/dist/renderer/features/TreegeRenderer/native/components/DefaultInputs.d.ts +26 -15
  12. package/dist/renderer/features/TreegeRenderer/native/components/DefaultSubmitButton.d.ts +9 -7
  13. package/dist/renderer/features/TreegeRenderer/native/components/DefaultSubmitButtonWrapper.d.ts +11 -0
  14. package/dist/renderer/features/TreegeRenderer/native/components/DefaultUI.d.ts +8 -7
  15. package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultAddressInput.d.ts +3 -0
  16. package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultAutocompleteInput.d.ts +3 -0
  17. package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultCheckboxInput.d.ts +3 -0
  18. package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultDateInput.d.ts +3 -0
  19. package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultDateRangeInput.d.ts +3 -0
  20. package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultFileInput.d.ts +3 -0
  21. package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultHiddenInput.d.ts +3 -0
  22. package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultHttpInput.d.ts +3 -0
  23. package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultNumberInput.d.ts +3 -0
  24. package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultPasswordInput.d.ts +3 -0
  25. package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultRadioInput.d.ts +3 -0
  26. package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultSelectInput.d.ts +3 -0
  27. package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultSwitchInput.d.ts +3 -0
  28. package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultTextInput.d.ts +3 -0
  29. package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultTextareaInput.d.ts +3 -0
  30. package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultTimeInput.d.ts +3 -0
  31. package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultTimeRangeInput.d.ts +3 -0
  32. package/dist/renderer/features/TreegeRenderer/useTreegeRenderer.d.ts +81 -23
  33. package/dist/renderer/features/TreegeRenderer/web/TreegeRenderer.d.ts +1 -1
  34. package/dist/renderer/hooks/useRenderNode.d.ts +55 -0
  35. package/dist/renderer/index.d.ts +1 -0
  36. package/dist/renderer/index.native.d.ts +19 -0
  37. package/dist/renderer/types/renderer.d.ts +20 -4
  38. package/dist/renderer/utils/sanitize.native.d.ts +69 -0
  39. package/dist/renderer/utils/submit.d.ts +1 -1
  40. package/dist/renderer-native.d.ts +2 -0
  41. package/dist/renderer-native.js +2979 -0
  42. package/dist/renderer.js +49 -47
  43. package/dist/shared/locales/ar.json.d.ts +13 -5
  44. package/dist/shared/locales/de.json.d.ts +13 -5
  45. package/dist/shared/locales/en.json.d.ts +13 -5
  46. package/dist/shared/locales/es.json.d.ts +13 -5
  47. package/dist/shared/locales/fr.json.d.ts +13 -5
  48. package/dist/shared/locales/it.json.d.ts +13 -5
  49. package/dist/shared/locales/pt.json.d.ts +13 -5
  50. package/dist/shared/types/node.d.ts +2 -2
  51. package/dist/useRenderNode-B9cpomOv.js +863 -0
  52. package/package.json +24 -1
  53. package/dist/ThemeContext-BIT4DHqC.js +0 -764
  54. package/dist/TreegeRenderer-BSR_ez96.js +0 -1812
@@ -0,0 +1,2979 @@
1
+ import { q as ne, r as He, k as $e, t as _e, a as Ye, v as Ge, w as Ue } from "./useRenderNode-B9cpomOv.js";
2
+ import { T as Rt, l as Wt, n as Ht, j as Lt, e as Mt, b as qt, f as Vt, c as Nt, d as $t, g as _t, h as Yt, i as Gt, m as Ut, s as Jt, u as Kt } from "./useRenderNode-B9cpomOv.js";
3
+ import { j as e } from "./node-gfy3ym4p.js";
4
+ import { g as Xt } from "./node-gfy3ym4p.js";
5
+ import { StyleSheet as $, View as l, Text as t, TouchableOpacity as h, Modal as ae, TextInput as ge, ActivityIndicator as be, FlatList as Fe, Alert as Je, ScrollView as je, Switch as Ke } from "react-native";
6
+ import { useState as A, useCallback as he, useEffect as de, useMemo as ue, useRef as le } from "react";
7
+ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container, children: r }), Xe = $.create({
8
+ container: {
9
+ padding: 16
10
+ }
11
+ }), Ze = ({ children: r, node: o }) => {
12
+ const n = ne()(o.data.label);
13
+ return /* @__PURE__ */ e.jsxs(l, { style: Ie.container, children: [
14
+ n && /* @__PURE__ */ e.jsx(t, { style: Ie.label, children: n }),
15
+ /* @__PURE__ */ e.jsx(l, { style: Ie.content, children: r })
16
+ ] });
17
+ }, Ie = $.create({
18
+ container: {
19
+ marginBottom: 16
20
+ },
21
+ content: {
22
+ gap: 8
23
+ },
24
+ label: {
25
+ color: "#111827",
26
+ fontSize: 16,
27
+ fontWeight: "600",
28
+ marginBottom: 12
29
+ }
30
+ }), et = async (r, o) => {
31
+ if (!r || r.trim().length < 3)
32
+ return [];
33
+ try {
34
+ const s = await fetch(
35
+ `https://nominatim.openstreetmap.org/search?q=${encodeURIComponent(r)}&format=jsonv2&addressdetails=1&limit=5`,
36
+ {
37
+ headers: {
38
+ Accept: "application/json",
39
+ "User-Agent": "Treege Renderer",
40
+ ...o && { "Accept-Language": o }
41
+ }
42
+ }
43
+ );
44
+ return s.ok ? (await s.json()).map((a) => ({
45
+ label: a.display_name,
46
+ value: a.display_name
47
+ })) : [];
48
+ } catch (s) {
49
+ return console.error("Nominatim fetch error:", s), [];
50
+ }
51
+ }, tt = async (r, o) => {
52
+ if (!r || r.trim().length < 3)
53
+ return [];
54
+ try {
55
+ const s = await fetch(
56
+ `https://maps.googleapis.com/maps/api/place/autocomplete/json?input=${encodeURIComponent(r)}&key=${o}`
57
+ );
58
+ if (!s.ok)
59
+ return console.warn("Google Places API request failed:", s.status), [];
60
+ const n = await s.json();
61
+ return n.status !== "OK" && n.status !== "ZERO_RESULTS" ? (console.warn("Google Places API status:", n.status), []) : (n.predictions || []).map((a) => ({
62
+ label: a.description,
63
+ value: a.description
64
+ }));
65
+ } catch (s) {
66
+ return console.error("Google Places fetch error:", s), [];
67
+ }
68
+ }, rt = ({
69
+ node: r,
70
+ value: o,
71
+ setValue: s,
72
+ error: n,
73
+ label: a,
74
+ placeholder: f,
75
+ helperText: m,
76
+ id: B,
77
+ name: y
78
+ }) => {
79
+ const [S, u] = A(""), [x, i] = A([]), [c, z] = A(!1), [C, g] = A(!1), { language: b, googleApiKey: j } = He(), T = ne(), q = he(
80
+ (k) => {
81
+ s(k.value), u(""), z(!1), i([]);
82
+ },
83
+ [s]
84
+ ), R = () => {
85
+ z(!1);
86
+ };
87
+ return de(() => {
88
+ if (!S || S.trim().length < 3) {
89
+ i([]), g(!1);
90
+ return;
91
+ }
92
+ g(!0);
93
+ const k = setTimeout(async () => {
94
+ const _ = j ? await tt(S, j) : await et(S, b);
95
+ i(_), g(!1);
96
+ }, 300);
97
+ return () => {
98
+ clearTimeout(k), g(!1);
99
+ };
100
+ }, [S, b, j]), /* @__PURE__ */ e.jsxs(l, { style: P.container, children: [
101
+ /* @__PURE__ */ e.jsxs(t, { style: P.label, children: [
102
+ a || r.data.name,
103
+ r.data.required && /* @__PURE__ */ e.jsx(t, { style: P.required, children: "*" })
104
+ ] }),
105
+ /* @__PURE__ */ e.jsxs(h, { style: [P.trigger, n && P.triggerError], onPress: () => z(!0), activeOpacity: 0.7, children: [
106
+ /* @__PURE__ */ e.jsx(t, { style: [P.triggerText, !o && P.triggerPlaceholder], numberOfLines: 1, children: o || f || T("renderer.defaultAddressInput.enterAddress") }),
107
+ /* @__PURE__ */ e.jsx(t, { style: P.icon, children: "📍" })
108
+ ] }),
109
+ /* @__PURE__ */ e.jsx(ae, { visible: c, transparent: !0, animationType: "fade", onRequestClose: R, children: /* @__PURE__ */ e.jsx(h, { style: P.modalOverlay, activeOpacity: 1, onPress: R, children: /* @__PURE__ */ e.jsxs(h, { style: P.modalContent, activeOpacity: 1, onPress: () => {
110
+ }, children: [
111
+ /* @__PURE__ */ e.jsxs(l, { style: P.modalHeader, children: [
112
+ /* @__PURE__ */ e.jsx(t, { style: P.modalTitle, children: a || r.data.name }),
113
+ /* @__PURE__ */ e.jsx(h, { onPress: R, children: /* @__PURE__ */ e.jsx(t, { style: P.closeButton, children: "✕" }) })
114
+ ] }),
115
+ /* @__PURE__ */ e.jsxs(l, { style: P.searchContainer, children: [
116
+ /* @__PURE__ */ e.jsx(
117
+ ge,
118
+ {
119
+ style: P.searchInput,
120
+ placeholder: f || T("renderer.defaultAddressInput.enterAddress"),
121
+ placeholderTextColor: "#9CA3AF",
122
+ value: S,
123
+ onChangeText: u,
124
+ autoFocus: !0,
125
+ autoCapitalize: "none",
126
+ autoCorrect: !1
127
+ }
128
+ ),
129
+ C && /* @__PURE__ */ e.jsx(be, { size: "small", color: "#3B82F6", style: P.searchLoader })
130
+ ] }),
131
+ C ? /* @__PURE__ */ e.jsxs(l, { style: P.loadingContainer, children: [
132
+ /* @__PURE__ */ e.jsx(be, { size: "small", color: "#3B82F6" }),
133
+ /* @__PURE__ */ e.jsx(t, { style: P.loadingText, children: T("renderer.defaultAddressInput.searching") })
134
+ ] }) : /* @__PURE__ */ e.jsx(
135
+ Fe,
136
+ {
137
+ data: x,
138
+ keyExtractor: (k, _) => _.toString(),
139
+ style: P.suggestionsList,
140
+ contentContainerStyle: P.suggestionsListContent,
141
+ keyboardShouldPersistTaps: "handled",
142
+ ListEmptyComponent: S.length >= 3 ? /* @__PURE__ */ e.jsx(l, { style: P.emptyContainer, children: /* @__PURE__ */ e.jsx(t, { style: P.emptyText, children: T("renderer.defaultAddressInput.noAddressesFound") }) }) : /* @__PURE__ */ e.jsx(l, { style: P.emptyContainer, children: /* @__PURE__ */ e.jsx(t, { style: P.emptyText, children: T("renderer.defaultAddressInput.typeMinChars") }) }),
143
+ renderItem: ({ item: k }) => /* @__PURE__ */ e.jsxs(h, { style: P.suggestionItem, onPress: () => q(k), activeOpacity: 0.7, children: [
144
+ /* @__PURE__ */ e.jsx(t, { style: P.suggestionIcon, children: "📍" }),
145
+ /* @__PURE__ */ e.jsx(t, { style: P.suggestionText, numberOfLines: 2, children: k.label })
146
+ ] })
147
+ }
148
+ )
149
+ ] }) }) }),
150
+ n && /* @__PURE__ */ e.jsx(t, { style: P.error, children: n }),
151
+ m && !n && /* @__PURE__ */ e.jsx(t, { style: P.helperText, children: m })
152
+ ] });
153
+ }, P = $.create({
154
+ closeButton: {
155
+ color: "#6B7280",
156
+ fontSize: 24,
157
+ fontWeight: "300"
158
+ },
159
+ container: {
160
+ marginBottom: 16
161
+ },
162
+ emptyContainer: {
163
+ alignItems: "center",
164
+ paddingVertical: 24
165
+ },
166
+ emptyText: {
167
+ color: "#9CA3AF",
168
+ fontSize: 14
169
+ },
170
+ error: {
171
+ color: "#EF4444",
172
+ fontSize: 12,
173
+ marginTop: 4
174
+ },
175
+ helperText: {
176
+ color: "#6B7280",
177
+ fontSize: 12,
178
+ marginTop: 4
179
+ },
180
+ icon: {
181
+ fontSize: 16
182
+ },
183
+ label: {
184
+ color: "#374151",
185
+ fontSize: 14,
186
+ fontWeight: "500",
187
+ marginBottom: 8
188
+ },
189
+ loadingContainer: {
190
+ alignItems: "center",
191
+ flexDirection: "row",
192
+ justifyContent: "center",
193
+ paddingVertical: 24
194
+ },
195
+ loadingText: {
196
+ color: "#6B7280",
197
+ fontSize: 14,
198
+ marginLeft: 8
199
+ },
200
+ modalContent: {
201
+ backgroundColor: "#FFFFFF",
202
+ borderRadius: 12,
203
+ maxHeight: "80%",
204
+ padding: 16,
205
+ width: "90%"
206
+ },
207
+ modalHeader: {
208
+ alignItems: "center",
209
+ borderBottomColor: "#E5E7EB",
210
+ borderBottomWidth: 1,
211
+ flexDirection: "row",
212
+ justifyContent: "space-between",
213
+ marginBottom: 12,
214
+ paddingBottom: 12
215
+ },
216
+ modalOverlay: {
217
+ alignItems: "center",
218
+ backgroundColor: "rgba(0, 0, 0, 0.5)",
219
+ flex: 1,
220
+ justifyContent: "center"
221
+ },
222
+ modalTitle: {
223
+ color: "#111827",
224
+ fontSize: 18,
225
+ fontWeight: "600"
226
+ },
227
+ required: {
228
+ color: "#EF4444"
229
+ },
230
+ searchContainer: {
231
+ marginBottom: 12,
232
+ position: "relative"
233
+ },
234
+ searchInput: {
235
+ backgroundColor: "#F9FAFB",
236
+ borderColor: "#D1D5DB",
237
+ borderRadius: 6,
238
+ borderWidth: 1,
239
+ color: "#374151",
240
+ fontSize: 14,
241
+ paddingHorizontal: 12,
242
+ paddingRight: 40,
243
+ paddingVertical: 10
244
+ },
245
+ searchLoader: {
246
+ position: "absolute",
247
+ right: 12,
248
+ top: "50%",
249
+ transform: [{ translateY: -10 }]
250
+ },
251
+ suggestionIcon: {
252
+ fontSize: 16,
253
+ marginRight: 8
254
+ },
255
+ suggestionItem: {
256
+ alignItems: "center",
257
+ borderRadius: 6,
258
+ flexDirection: "row",
259
+ paddingHorizontal: 12,
260
+ paddingVertical: 12
261
+ },
262
+ suggestionsList: {
263
+ flexGrow: 0,
264
+ flexShrink: 1
265
+ },
266
+ suggestionsListContent: {
267
+ flexGrow: 0
268
+ },
269
+ suggestionText: {
270
+ color: "#374151",
271
+ flex: 1,
272
+ fontSize: 14
273
+ },
274
+ trigger: {
275
+ alignItems: "center",
276
+ backgroundColor: "#FFFFFF",
277
+ borderColor: "#D1D5DB",
278
+ borderRadius: 6,
279
+ borderWidth: 1,
280
+ flexDirection: "row",
281
+ justifyContent: "space-between",
282
+ paddingHorizontal: 12,
283
+ paddingVertical: 10
284
+ },
285
+ triggerError: {
286
+ borderColor: "#EF4444"
287
+ },
288
+ triggerPlaceholder: {
289
+ color: "#9CA3AF"
290
+ },
291
+ triggerText: {
292
+ color: "#374151",
293
+ flex: 1,
294
+ fontSize: 14
295
+ }
296
+ }), nt = ({ node: r, value: o, setValue: s, error: n, label: a, placeholder: f, helperText: m }) => {
297
+ const [B, y] = A(!1), [S, u] = A(""), x = ne(), i = r.data.options || [], c = i.find((j) => j.value === o), z = ue(() => {
298
+ if (!S.trim())
299
+ return i;
300
+ const j = S.toLowerCase();
301
+ return i.filter((T) => x(T.label).toLowerCase().includes(j) || T.value.toLowerCase().includes(j));
302
+ }, [i, S, x]), C = (j) => {
303
+ s(j === o ? "" : j), y(!1), u("");
304
+ }, g = () => {
305
+ y(!1), u("");
306
+ }, b = () => o && c ? x(c.label) : f || x("renderer.defaultAutocompleteInput.selectOption");
307
+ return /* @__PURE__ */ e.jsxs(l, { style: W.container, children: [
308
+ /* @__PURE__ */ e.jsxs(t, { style: W.label, children: [
309
+ a || r.data.name,
310
+ r.data.required && /* @__PURE__ */ e.jsx(t, { style: W.required, children: "*" })
311
+ ] }),
312
+ /* @__PURE__ */ e.jsxs(h, { style: [W.trigger, n && W.triggerError], onPress: () => y(!0), activeOpacity: 0.7, children: [
313
+ /* @__PURE__ */ e.jsx(t, { style: [W.triggerText, !o && W.triggerPlaceholder], numberOfLines: 1, children: b() }),
314
+ /* @__PURE__ */ e.jsx(t, { style: W.arrow, children: "▼" })
315
+ ] }),
316
+ /* @__PURE__ */ e.jsx(ae, { visible: B, transparent: !0, animationType: "fade", onRequestClose: g, children: /* @__PURE__ */ e.jsx(h, { style: W.modalOverlay, activeOpacity: 1, onPress: g, children: /* @__PURE__ */ e.jsxs(h, { style: W.modalContent, activeOpacity: 1, onPress: () => {
317
+ }, children: [
318
+ /* @__PURE__ */ e.jsxs(l, { style: W.modalHeader, children: [
319
+ /* @__PURE__ */ e.jsx(t, { style: W.modalTitle, children: a || r.data.name }),
320
+ /* @__PURE__ */ e.jsx(h, { onPress: g, children: /* @__PURE__ */ e.jsx(t, { style: W.closeButton, children: "✕" }) })
321
+ ] }),
322
+ /* @__PURE__ */ e.jsx(l, { style: W.searchContainer, children: /* @__PURE__ */ e.jsx(
323
+ ge,
324
+ {
325
+ style: W.searchInput,
326
+ placeholder: f || x("renderer.defaultAutocompleteInput.search"),
327
+ placeholderTextColor: "#9CA3AF",
328
+ value: S,
329
+ onChangeText: u,
330
+ autoFocus: !0,
331
+ autoCapitalize: "none",
332
+ autoCorrect: !1
333
+ }
334
+ ) }),
335
+ /* @__PURE__ */ e.jsx(
336
+ Fe,
337
+ {
338
+ data: z,
339
+ keyExtractor: (j) => j.value,
340
+ style: W.optionsList,
341
+ contentContainerStyle: W.optionsListContent,
342
+ ListEmptyComponent: /* @__PURE__ */ e.jsx(l, { style: W.emptyContainer, children: /* @__PURE__ */ e.jsx(t, { style: W.emptyText, children: x("renderer.defaultAutocompleteInput.noResults") }) }),
343
+ renderItem: ({ item: j }) => {
344
+ const T = j.value === o;
345
+ return /* @__PURE__ */ e.jsxs(
346
+ h,
347
+ {
348
+ style: [W.option, T && W.optionSelected],
349
+ onPress: () => C(j.value),
350
+ disabled: j.disabled,
351
+ activeOpacity: 0.7,
352
+ children: [
353
+ /* @__PURE__ */ e.jsx(t, { style: [W.optionText, j.disabled && W.optionTextDisabled], children: x(j.label) }),
354
+ T && /* @__PURE__ */ e.jsx(t, { style: W.checkmark, children: "✓" })
355
+ ]
356
+ }
357
+ );
358
+ }
359
+ }
360
+ )
361
+ ] }) }) }),
362
+ n && /* @__PURE__ */ e.jsx(t, { style: W.error, children: n }),
363
+ m && !n && /* @__PURE__ */ e.jsx(t, { style: W.helperText, children: m })
364
+ ] });
365
+ }, W = $.create({
366
+ arrow: {
367
+ color: "#6B7280",
368
+ fontSize: 12
369
+ },
370
+ checkmark: {
371
+ color: "#3B82F6",
372
+ fontSize: 18,
373
+ fontWeight: "700"
374
+ },
375
+ closeButton: {
376
+ color: "#6B7280",
377
+ fontSize: 24,
378
+ fontWeight: "300"
379
+ },
380
+ container: {
381
+ marginBottom: 16
382
+ },
383
+ emptyContainer: {
384
+ alignItems: "center",
385
+ paddingVertical: 24
386
+ },
387
+ emptyText: {
388
+ color: "#9CA3AF",
389
+ fontSize: 14
390
+ },
391
+ error: {
392
+ color: "#EF4444",
393
+ fontSize: 12,
394
+ marginTop: 4
395
+ },
396
+ helperText: {
397
+ color: "#6B7280",
398
+ fontSize: 12,
399
+ marginTop: 4
400
+ },
401
+ label: {
402
+ color: "#374151",
403
+ fontSize: 14,
404
+ fontWeight: "500",
405
+ marginBottom: 8
406
+ },
407
+ modalContent: {
408
+ backgroundColor: "#FFFFFF",
409
+ borderRadius: 12,
410
+ maxHeight: "80%",
411
+ padding: 16,
412
+ width: "90%"
413
+ },
414
+ modalHeader: {
415
+ alignItems: "center",
416
+ borderBottomColor: "#E5E7EB",
417
+ borderBottomWidth: 1,
418
+ flexDirection: "row",
419
+ justifyContent: "space-between",
420
+ marginBottom: 12,
421
+ paddingBottom: 12
422
+ },
423
+ modalOverlay: {
424
+ alignItems: "center",
425
+ backgroundColor: "rgba(0, 0, 0, 0.5)",
426
+ flex: 1,
427
+ justifyContent: "center"
428
+ },
429
+ modalTitle: {
430
+ color: "#111827",
431
+ fontSize: 18,
432
+ fontWeight: "600"
433
+ },
434
+ option: {
435
+ alignItems: "center",
436
+ borderRadius: 6,
437
+ flexDirection: "row",
438
+ justifyContent: "space-between",
439
+ paddingHorizontal: 12,
440
+ paddingVertical: 12
441
+ },
442
+ optionSelected: {
443
+ backgroundColor: "#EFF6FF"
444
+ },
445
+ optionsList: {
446
+ flexGrow: 0,
447
+ flexShrink: 1
448
+ },
449
+ optionsListContent: {
450
+ flexGrow: 0
451
+ },
452
+ optionText: {
453
+ color: "#374151",
454
+ flex: 1,
455
+ fontSize: 14
456
+ },
457
+ optionTextDisabled: {
458
+ color: "#9CA3AF"
459
+ },
460
+ required: {
461
+ color: "#EF4444"
462
+ },
463
+ searchContainer: {
464
+ marginBottom: 12
465
+ },
466
+ searchInput: {
467
+ backgroundColor: "#F9FAFB",
468
+ borderColor: "#D1D5DB",
469
+ borderRadius: 6,
470
+ borderWidth: 1,
471
+ color: "#374151",
472
+ fontSize: 14,
473
+ paddingHorizontal: 12,
474
+ paddingVertical: 10
475
+ },
476
+ trigger: {
477
+ alignItems: "center",
478
+ backgroundColor: "#FFFFFF",
479
+ borderColor: "#D1D5DB",
480
+ borderRadius: 6,
481
+ borderWidth: 1,
482
+ flexDirection: "row",
483
+ justifyContent: "space-between",
484
+ paddingHorizontal: 12,
485
+ paddingVertical: 10
486
+ },
487
+ triggerError: {
488
+ borderColor: "#EF4444"
489
+ },
490
+ triggerPlaceholder: {
491
+ color: "#9CA3AF"
492
+ },
493
+ triggerText: {
494
+ color: "#374151",
495
+ flex: 1,
496
+ fontSize: 14
497
+ }
498
+ }), ot = ({ node: r, value: o, setValue: s, error: n, label: a, helperText: f }) => {
499
+ const m = ne(), B = r.data.options || [], y = B.length > 0, S = Array.isArray(o) ? o : [], u = typeof o == "boolean" ? o : !1, x = (c) => {
500
+ if (y) {
501
+ const z = S.includes(c) ? S.filter((C) => C !== c) : [...S, c];
502
+ s(z);
503
+ } else
504
+ s(!u);
505
+ }, i = (c) => y ? S.includes(c) : u;
506
+ return /* @__PURE__ */ e.jsxs(l, { style: Z.container, children: [
507
+ /* @__PURE__ */ e.jsxs(t, { style: Z.label, children: [
508
+ a || r.data.name,
509
+ r.data.required && /* @__PURE__ */ e.jsx(t, { style: Z.required, children: "*" })
510
+ ] }),
511
+ B.length > 0 ? B.map((c) => /* @__PURE__ */ e.jsxs(
512
+ h,
513
+ {
514
+ style: Z.option,
515
+ onPress: () => x(c.value),
516
+ disabled: c.disabled,
517
+ activeOpacity: 0.7,
518
+ accessible: !0,
519
+ accessibilityRole: "checkbox",
520
+ accessibilityState: { checked: i(c.value), disabled: c.disabled },
521
+ accessibilityLabel: m(c.label) || c.value,
522
+ children: [
523
+ /* @__PURE__ */ e.jsx(l, { style: [Z.checkbox, i(c.value) && Z.checkboxChecked], children: i(c.value) && /* @__PURE__ */ e.jsx(t, { style: Z.checkmark, children: "✓" }) }),
524
+ /* @__PURE__ */ e.jsx(t, { style: [Z.optionLabel, c.disabled && Z.optionLabelDisabled], children: m(c.label) || c.value })
525
+ ]
526
+ },
527
+ c.value
528
+ )) : (
529
+ // Single checkbox without options
530
+ /* @__PURE__ */ e.jsxs(
531
+ h,
532
+ {
533
+ style: Z.option,
534
+ onPress: () => x(""),
535
+ activeOpacity: 0.7,
536
+ accessible: !0,
537
+ accessibilityRole: "checkbox",
538
+ accessibilityState: { checked: u },
539
+ accessibilityLabel: a || r.data.name,
540
+ children: [
541
+ /* @__PURE__ */ e.jsx(l, { style: [Z.checkbox, u && Z.checkboxChecked], children: u && /* @__PURE__ */ e.jsx(t, { style: Z.checkmark, children: "✓" }) }),
542
+ /* @__PURE__ */ e.jsx(t, { style: Z.optionLabel, children: a || r.data.name })
543
+ ]
544
+ }
545
+ )
546
+ ),
547
+ n && /* @__PURE__ */ e.jsx(t, { style: Z.error, children: n }),
548
+ f && !n && /* @__PURE__ */ e.jsx(t, { style: Z.helperText, children: f })
549
+ ] });
550
+ }, Z = $.create({
551
+ checkbox: {
552
+ alignItems: "center",
553
+ backgroundColor: "#FFFFFF",
554
+ borderColor: "#D1D5DB",
555
+ borderRadius: 4,
556
+ borderWidth: 2,
557
+ height: 20,
558
+ justifyContent: "center",
559
+ marginRight: 12,
560
+ width: 20
561
+ },
562
+ checkboxChecked: {
563
+ backgroundColor: "#3B82F6",
564
+ borderColor: "#3B82F6"
565
+ },
566
+ checkmark: {
567
+ color: "#FFFFFF",
568
+ fontSize: 14,
569
+ fontWeight: "700"
570
+ },
571
+ container: {
572
+ marginBottom: 16
573
+ },
574
+ error: {
575
+ color: "#EF4444",
576
+ fontSize: 12,
577
+ marginTop: 4
578
+ },
579
+ helperText: {
580
+ color: "#6B7280",
581
+ fontSize: 12,
582
+ marginTop: 4
583
+ },
584
+ label: {
585
+ color: "#374151",
586
+ fontSize: 14,
587
+ fontWeight: "500",
588
+ marginBottom: 8
589
+ },
590
+ option: {
591
+ alignItems: "center",
592
+ flexDirection: "row",
593
+ marginBottom: 8
594
+ },
595
+ optionLabel: {
596
+ color: "#374151",
597
+ flex: 1,
598
+ fontSize: 14
599
+ },
600
+ optionLabelDisabled: {
601
+ color: "#9CA3AF"
602
+ },
603
+ required: {
604
+ color: "#EF4444"
605
+ }
606
+ }), st = ({ node: r, value: o, setValue: s, error: n, label: a, placeholder: f, helperText: m }) => {
607
+ const [B, y] = A(!1), S = ne(), u = o ? new Date(o) : void 0, { year: x, month: i, today: c } = ue(() => {
608
+ const p = u || /* @__PURE__ */ new Date(), H = p.getFullYear(), Q = p.getMonth(), U = /* @__PURE__ */ new Date();
609
+ return U.setHours(0, 0, 0, 0), { month: Q, today: U, year: H };
610
+ }, [u]), [z, C] = A(x), [g, b] = A(i), j = [
611
+ "January",
612
+ "February",
613
+ "March",
614
+ "April",
615
+ "May",
616
+ "June",
617
+ "July",
618
+ "August",
619
+ "September",
620
+ "October",
621
+ "November",
622
+ "December"
623
+ ], T = ue(() => {
624
+ const p = new Date(z, g, 1).getDay(), H = new Date(z, g + 1, 0).getDate(), Q = new Date(z, g, 0).getDate(), U = [];
625
+ for (let v = p - 1; v >= 0; v--)
626
+ U.push({
627
+ date: new Date(z, g - 1, Q - v),
628
+ day: Q - v,
629
+ isCurrentMonth: !1
630
+ });
631
+ for (let v = 1; v <= H; v++)
632
+ U.push({
633
+ date: new Date(z, g, v),
634
+ day: v,
635
+ isCurrentMonth: !0
636
+ });
637
+ const F = 42 - U.length;
638
+ for (let v = 1; v <= F; v++)
639
+ U.push({
640
+ date: new Date(z, g + 1, v),
641
+ day: v,
642
+ isCurrentMonth: !1
643
+ });
644
+ return U;
645
+ }, [z, g]), q = he(
646
+ (p) => {
647
+ r.data.disablePast && p < c || (s(p.toISOString()), y(!1));
648
+ },
649
+ [r.data.disablePast, c, s]
650
+ ), R = () => {
651
+ g === 0 ? (b(11), C(z - 1)) : b(g - 1);
652
+ }, k = () => {
653
+ g === 11 ? (b(0), C(z + 1)) : b(g + 1);
654
+ }, _ = () => u ? u.toLocaleDateString() : f || S("renderer.defaultInputs.selectDate"), K = (p) => r.data.disablePast ? p < c : !1, ee = (p) => u ? p.getDate() === u.getDate() && p.getMonth() === u.getMonth() && p.getFullYear() === u.getFullYear() : !1;
655
+ return /* @__PURE__ */ e.jsxs(l, { style: E.container, children: [
656
+ /* @__PURE__ */ e.jsxs(t, { style: E.label, children: [
657
+ a || r.data.name,
658
+ r.data.required && /* @__PURE__ */ e.jsx(t, { style: E.required, children: "*" })
659
+ ] }),
660
+ /* @__PURE__ */ e.jsxs(h, { style: [E.trigger, n && E.triggerError], onPress: () => y(!0), activeOpacity: 0.7, children: [
661
+ /* @__PURE__ */ e.jsx(t, { style: [E.triggerText, !o && E.triggerPlaceholder], numberOfLines: 1, children: _() }),
662
+ /* @__PURE__ */ e.jsx(t, { style: E.icon, children: "📅" })
663
+ ] }),
664
+ /* @__PURE__ */ e.jsx(ae, { visible: B, transparent: !0, animationType: "fade", onRequestClose: () => y(!1), children: /* @__PURE__ */ e.jsx(h, { style: E.modalOverlay, activeOpacity: 1, onPress: () => y(!1), children: /* @__PURE__ */ e.jsxs(h, { style: E.modalContent, activeOpacity: 1, onPress: () => {
665
+ }, children: [
666
+ /* @__PURE__ */ e.jsxs(l, { style: E.modalHeader, children: [
667
+ /* @__PURE__ */ e.jsx(t, { style: E.modalTitle, children: a || r.data.name }),
668
+ /* @__PURE__ */ e.jsx(h, { onPress: () => y(!1), children: /* @__PURE__ */ e.jsx(t, { style: E.closeButton, children: "✕" }) })
669
+ ] }),
670
+ /* @__PURE__ */ e.jsxs(l, { style: E.calendarHeader, children: [
671
+ /* @__PURE__ */ e.jsx(h, { onPress: R, style: E.navButton, children: /* @__PURE__ */ e.jsx(t, { style: E.navButtonText, children: "‹" }) }),
672
+ /* @__PURE__ */ e.jsxs(t, { style: E.monthYear, children: [
673
+ j[g],
674
+ " ",
675
+ z
676
+ ] }),
677
+ /* @__PURE__ */ e.jsx(h, { onPress: k, style: E.navButton, children: /* @__PURE__ */ e.jsx(t, { style: E.navButtonText, children: "›" }) })
678
+ ] }),
679
+ /* @__PURE__ */ e.jsx(l, { style: E.weekDays, children: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"].map((p) => /* @__PURE__ */ e.jsx(t, { style: E.weekDay, children: p }, p)) }),
680
+ /* @__PURE__ */ e.jsx(
681
+ Fe,
682
+ {
683
+ data: T,
684
+ keyExtractor: (p, H) => `${p.date.getTime()}-${H}`,
685
+ numColumns: 7,
686
+ scrollEnabled: !1,
687
+ style: E.calendar,
688
+ contentContainerStyle: E.calendarContent,
689
+ renderItem: ({ item: p }) => {
690
+ const H = K(p.date), Q = ee(p.date);
691
+ return /* @__PURE__ */ e.jsx(
692
+ h,
693
+ {
694
+ style: [
695
+ E.dayCell,
696
+ !p.isCurrentMonth && E.dayCellOtherMonth,
697
+ Q && E.dayCellSelected,
698
+ H && E.dayCellDisabled
699
+ ],
700
+ onPress: () => q(p.date),
701
+ disabled: H,
702
+ activeOpacity: 0.7,
703
+ children: /* @__PURE__ */ e.jsx(
704
+ t,
705
+ {
706
+ style: [
707
+ E.dayText,
708
+ !p.isCurrentMonth && E.dayTextOtherMonth,
709
+ Q && E.dayTextSelected,
710
+ H && E.dayTextDisabled
711
+ ],
712
+ children: p.day
713
+ }
714
+ )
715
+ }
716
+ );
717
+ }
718
+ }
719
+ )
720
+ ] }) }) }),
721
+ n && /* @__PURE__ */ e.jsx(t, { style: E.error, children: n }),
722
+ m && !n && /* @__PURE__ */ e.jsx(t, { style: E.helperText, children: m })
723
+ ] });
724
+ }, E = $.create({
725
+ calendar: {
726
+ flexGrow: 0,
727
+ flexShrink: 1
728
+ },
729
+ calendarContent: {
730
+ flexGrow: 0
731
+ },
732
+ calendarHeader: {
733
+ alignItems: "center",
734
+ flexDirection: "row",
735
+ justifyContent: "space-between",
736
+ marginBottom: 16,
737
+ paddingHorizontal: 8
738
+ },
739
+ closeButton: {
740
+ color: "#6B7280",
741
+ fontSize: 24,
742
+ fontWeight: "300"
743
+ },
744
+ container: {
745
+ marginBottom: 16
746
+ },
747
+ dayCell: {
748
+ alignItems: "center",
749
+ aspectRatio: 1,
750
+ flex: 1,
751
+ justifyContent: "center",
752
+ margin: 2,
753
+ maxWidth: "14.28%"
754
+ },
755
+ dayCellDisabled: {
756
+ opacity: 0.3
757
+ },
758
+ dayCellOtherMonth: {
759
+ opacity: 0.3
760
+ },
761
+ dayCellSelected: {
762
+ backgroundColor: "#3B82F6",
763
+ borderRadius: 20
764
+ },
765
+ dayText: {
766
+ color: "#374151",
767
+ fontSize: 14
768
+ },
769
+ dayTextDisabled: {
770
+ color: "#9CA3AF"
771
+ },
772
+ dayTextOtherMonth: {
773
+ color: "#9CA3AF"
774
+ },
775
+ dayTextSelected: {
776
+ color: "#FFFFFF",
777
+ fontWeight: "600"
778
+ },
779
+ error: {
780
+ color: "#EF4444",
781
+ fontSize: 12,
782
+ marginTop: 4
783
+ },
784
+ helperText: {
785
+ color: "#6B7280",
786
+ fontSize: 12,
787
+ marginTop: 4
788
+ },
789
+ icon: {
790
+ fontSize: 16
791
+ },
792
+ label: {
793
+ color: "#374151",
794
+ fontSize: 14,
795
+ fontWeight: "500",
796
+ marginBottom: 8
797
+ },
798
+ modalContent: {
799
+ backgroundColor: "#FFFFFF",
800
+ borderRadius: 12,
801
+ maxHeight: "80%",
802
+ padding: 16,
803
+ width: "90%"
804
+ },
805
+ modalHeader: {
806
+ alignItems: "center",
807
+ borderBottomColor: "#E5E7EB",
808
+ borderBottomWidth: 1,
809
+ flexDirection: "row",
810
+ justifyContent: "space-between",
811
+ marginBottom: 16,
812
+ paddingBottom: 12
813
+ },
814
+ modalOverlay: {
815
+ alignItems: "center",
816
+ backgroundColor: "rgba(0, 0, 0, 0.5)",
817
+ flex: 1,
818
+ justifyContent: "center"
819
+ },
820
+ modalTitle: {
821
+ color: "#111827",
822
+ fontSize: 18,
823
+ fontWeight: "600"
824
+ },
825
+ monthYear: {
826
+ color: "#111827",
827
+ fontSize: 16,
828
+ fontWeight: "600"
829
+ },
830
+ navButton: {
831
+ padding: 8
832
+ },
833
+ navButtonText: {
834
+ color: "#3B82F6",
835
+ fontSize: 24,
836
+ fontWeight: "600"
837
+ },
838
+ required: {
839
+ color: "#EF4444"
840
+ },
841
+ trigger: {
842
+ alignItems: "center",
843
+ backgroundColor: "#FFFFFF",
844
+ borderColor: "#D1D5DB",
845
+ borderRadius: 6,
846
+ borderWidth: 1,
847
+ flexDirection: "row",
848
+ justifyContent: "space-between",
849
+ paddingHorizontal: 12,
850
+ paddingVertical: 10
851
+ },
852
+ triggerError: {
853
+ borderColor: "#EF4444"
854
+ },
855
+ triggerPlaceholder: {
856
+ color: "#9CA3AF"
857
+ },
858
+ triggerText: {
859
+ color: "#374151",
860
+ flex: 1,
861
+ fontSize: 14
862
+ },
863
+ weekDay: {
864
+ color: "#6B7280",
865
+ flex: 1,
866
+ fontSize: 12,
867
+ fontWeight: "600",
868
+ maxWidth: "14.28%",
869
+ textAlign: "center"
870
+ },
871
+ weekDays: {
872
+ flexDirection: "row",
873
+ marginBottom: 8
874
+ }
875
+ }), it = ({ node: r, value: o, setValue: s, error: n, label: a, helperText: f }) => {
876
+ const [m, B] = A(!1), [y, S] = A(!0), u = ne(), x = Array.isArray(o) ? o : [], i = x[0] ? new Date(x[0]) : void 0, c = x[1] ? new Date(x[1]) : void 0, { year: z, month: C, today: g } = ue(() => {
877
+ const F = i || /* @__PURE__ */ new Date(), v = F.getFullYear(), X = F.getMonth(), O = /* @__PURE__ */ new Date();
878
+ return O.setHours(0, 0, 0, 0), { month: X, today: O, year: v };
879
+ }, [i]), [b, j] = A(z), [T, q] = A(C), R = [
880
+ "January",
881
+ "February",
882
+ "March",
883
+ "April",
884
+ "May",
885
+ "June",
886
+ "July",
887
+ "August",
888
+ "September",
889
+ "October",
890
+ "November",
891
+ "December"
892
+ ], k = ue(() => {
893
+ const F = new Date(b, T, 1).getDay(), v = new Date(b, T + 1, 0).getDate(), X = new Date(b, T, 0).getDate(), O = [];
894
+ for (let V = F - 1; V >= 0; V--)
895
+ O.push({
896
+ date: new Date(b, T - 1, X - V),
897
+ day: X - V,
898
+ isCurrentMonth: !1
899
+ });
900
+ for (let V = 1; V <= v; V++)
901
+ O.push({
902
+ date: new Date(b, T, V),
903
+ day: V,
904
+ isCurrentMonth: !0
905
+ });
906
+ const ce = 42 - O.length;
907
+ for (let V = 1; V <= ce; V++)
908
+ O.push({
909
+ date: new Date(b, T + 1, V),
910
+ day: V,
911
+ isCurrentMonth: !1
912
+ });
913
+ return O;
914
+ }, [b, T]), _ = he(
915
+ (F) => {
916
+ r.data.disablePast && F < g || (y ? (s([F.toISOString(), c?.toISOString()]), S(!1)) : (i && F < i ? s([F.toISOString(), i.toISOString()]) : s([i?.toISOString(), F.toISOString()]), B(!1), S(!0)));
917
+ },
918
+ [r.data.disablePast, g, y, i, c, s]
919
+ ), K = () => {
920
+ T === 0 ? (q(11), j(b - 1)) : q(T - 1);
921
+ }, ee = () => {
922
+ T === 11 ? (q(0), j(b + 1)) : q(T + 1);
923
+ }, p = () => i && c ? `${i.toLocaleDateString()} - ${c.toLocaleDateString()}` : i ? i.toLocaleDateString() : u("renderer.defaultInputs.selectDateRange"), H = (F) => r.data.disablePast ? F < g : !1, Q = (F) => i && c ? F >= i && F <= c : !1, U = (F) => {
924
+ if (!(i || c))
925
+ return !1;
926
+ const v = i && F.getDate() === i.getDate() && F.getMonth() === i.getMonth() && F.getFullYear() === i.getFullYear(), X = c && F.getDate() === c.getDate() && F.getMonth() === c.getMonth() && F.getFullYear() === c.getFullYear();
927
+ return v || X;
928
+ };
929
+ return /* @__PURE__ */ e.jsxs(l, { style: D.container, children: [
930
+ /* @__PURE__ */ e.jsxs(t, { style: D.label, children: [
931
+ a || r.data.name,
932
+ r.data.required && /* @__PURE__ */ e.jsx(t, { style: D.required, children: "*" })
933
+ ] }),
934
+ /* @__PURE__ */ e.jsxs(h, { style: [D.trigger, n && D.triggerError], onPress: () => B(!0), activeOpacity: 0.7, children: [
935
+ /* @__PURE__ */ e.jsx(t, { style: [D.triggerText, !i && D.triggerPlaceholder], numberOfLines: 1, children: p() }),
936
+ /* @__PURE__ */ e.jsx(t, { style: D.icon, children: "📅" })
937
+ ] }),
938
+ /* @__PURE__ */ e.jsx(ae, { visible: m, transparent: !0, animationType: "fade", onRequestClose: () => B(!1), children: /* @__PURE__ */ e.jsx(h, { style: D.modalOverlay, activeOpacity: 1, onPress: () => B(!1), children: /* @__PURE__ */ e.jsxs(h, { style: D.modalContent, activeOpacity: 1, onPress: () => {
939
+ }, children: [
940
+ /* @__PURE__ */ e.jsxs(l, { style: D.modalHeader, children: [
941
+ /* @__PURE__ */ e.jsx(t, { style: D.modalTitle, children: a || r.data.name }),
942
+ /* @__PURE__ */ e.jsx(h, { onPress: () => B(!1), children: /* @__PURE__ */ e.jsx(t, { style: D.closeButton, children: "✕" }) })
943
+ ] }),
944
+ /* @__PURE__ */ e.jsx(l, { style: D.rangeIndicator, children: /* @__PURE__ */ e.jsx(t, { style: D.rangeIndicatorText, children: u(y ? "renderer.defaultInputs.startDate" : "renderer.defaultInputs.endDate") }) }),
945
+ /* @__PURE__ */ e.jsxs(l, { style: D.calendarHeader, children: [
946
+ /* @__PURE__ */ e.jsx(h, { onPress: K, style: D.navButton, children: /* @__PURE__ */ e.jsx(t, { style: D.navButtonText, children: "‹" }) }),
947
+ /* @__PURE__ */ e.jsxs(t, { style: D.monthYear, children: [
948
+ R[T],
949
+ " ",
950
+ b
951
+ ] }),
952
+ /* @__PURE__ */ e.jsx(h, { onPress: ee, style: D.navButton, children: /* @__PURE__ */ e.jsx(t, { style: D.navButtonText, children: "›" }) })
953
+ ] }),
954
+ /* @__PURE__ */ e.jsx(l, { style: D.weekDays, children: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"].map((F) => /* @__PURE__ */ e.jsx(t, { style: D.weekDay, children: F }, F)) }),
955
+ /* @__PURE__ */ e.jsx(
956
+ Fe,
957
+ {
958
+ data: k,
959
+ keyExtractor: (F, v) => `${F.date.getTime()}-${v}`,
960
+ numColumns: 7,
961
+ scrollEnabled: !1,
962
+ style: D.calendar,
963
+ contentContainerStyle: D.calendarContent,
964
+ renderItem: ({ item: F }) => {
965
+ const v = H(F.date), X = Q(F.date), O = U(F.date);
966
+ return /* @__PURE__ */ e.jsx(
967
+ h,
968
+ {
969
+ style: [
970
+ D.dayCell,
971
+ !F.isCurrentMonth && D.dayCellOtherMonth,
972
+ X && D.dayCellInRange,
973
+ O && D.dayCellSelected,
974
+ v && D.dayCellDisabled
975
+ ],
976
+ onPress: () => _(F.date),
977
+ disabled: v,
978
+ activeOpacity: 0.7,
979
+ children: /* @__PURE__ */ e.jsx(
980
+ t,
981
+ {
982
+ style: [
983
+ D.dayText,
984
+ !F.isCurrentMonth && D.dayTextOtherMonth,
985
+ X && D.dayTextInRange,
986
+ O && D.dayTextSelected,
987
+ v && D.dayTextDisabled
988
+ ],
989
+ children: F.day
990
+ }
991
+ )
992
+ }
993
+ );
994
+ }
995
+ }
996
+ )
997
+ ] }) }) }),
998
+ n && /* @__PURE__ */ e.jsx(t, { style: D.error, children: n }),
999
+ f && !n && /* @__PURE__ */ e.jsx(t, { style: D.helperText, children: f })
1000
+ ] });
1001
+ }, D = $.create({
1002
+ calendar: {
1003
+ flexGrow: 0,
1004
+ flexShrink: 1
1005
+ },
1006
+ calendarContent: {
1007
+ flexGrow: 0
1008
+ },
1009
+ calendarHeader: {
1010
+ alignItems: "center",
1011
+ flexDirection: "row",
1012
+ justifyContent: "space-between",
1013
+ marginBottom: 16,
1014
+ paddingHorizontal: 8
1015
+ },
1016
+ closeButton: {
1017
+ color: "#6B7280",
1018
+ fontSize: 24,
1019
+ fontWeight: "300"
1020
+ },
1021
+ container: {
1022
+ marginBottom: 16
1023
+ },
1024
+ dayCell: {
1025
+ alignItems: "center",
1026
+ aspectRatio: 1,
1027
+ flex: 1,
1028
+ justifyContent: "center",
1029
+ margin: 2,
1030
+ maxWidth: "14.28%"
1031
+ },
1032
+ dayCellDisabled: {
1033
+ opacity: 0.3
1034
+ },
1035
+ dayCellInRange: {
1036
+ backgroundColor: "#DBEAFE"
1037
+ },
1038
+ dayCellOtherMonth: {
1039
+ opacity: 0.3
1040
+ },
1041
+ dayCellSelected: {
1042
+ backgroundColor: "#3B82F6",
1043
+ borderRadius: 20
1044
+ },
1045
+ dayText: {
1046
+ color: "#374151",
1047
+ fontSize: 14
1048
+ },
1049
+ dayTextDisabled: {
1050
+ color: "#9CA3AF"
1051
+ },
1052
+ dayTextInRange: {
1053
+ color: "#1E40AF"
1054
+ },
1055
+ dayTextOtherMonth: {
1056
+ color: "#9CA3AF"
1057
+ },
1058
+ dayTextSelected: {
1059
+ color: "#FFFFFF",
1060
+ fontWeight: "600"
1061
+ },
1062
+ error: {
1063
+ color: "#EF4444",
1064
+ fontSize: 12,
1065
+ marginTop: 4
1066
+ },
1067
+ helperText: {
1068
+ color: "#6B7280",
1069
+ fontSize: 12,
1070
+ marginTop: 4
1071
+ },
1072
+ icon: {
1073
+ fontSize: 16
1074
+ },
1075
+ label: {
1076
+ color: "#374151",
1077
+ fontSize: 14,
1078
+ fontWeight: "500",
1079
+ marginBottom: 8
1080
+ },
1081
+ modalContent: {
1082
+ backgroundColor: "#FFFFFF",
1083
+ borderRadius: 12,
1084
+ maxHeight: "80%",
1085
+ padding: 16,
1086
+ width: "90%"
1087
+ },
1088
+ modalHeader: {
1089
+ alignItems: "center",
1090
+ borderBottomColor: "#E5E7EB",
1091
+ borderBottomWidth: 1,
1092
+ flexDirection: "row",
1093
+ justifyContent: "space-between",
1094
+ marginBottom: 12,
1095
+ paddingBottom: 12
1096
+ },
1097
+ modalOverlay: {
1098
+ alignItems: "center",
1099
+ backgroundColor: "rgba(0, 0, 0, 0.5)",
1100
+ flex: 1,
1101
+ justifyContent: "center"
1102
+ },
1103
+ modalTitle: {
1104
+ color: "#111827",
1105
+ fontSize: 18,
1106
+ fontWeight: "600"
1107
+ },
1108
+ monthYear: {
1109
+ color: "#111827",
1110
+ fontSize: 16,
1111
+ fontWeight: "600"
1112
+ },
1113
+ navButton: {
1114
+ padding: 8
1115
+ },
1116
+ navButtonText: {
1117
+ color: "#3B82F6",
1118
+ fontSize: 24,
1119
+ fontWeight: "600"
1120
+ },
1121
+ rangeIndicator: {
1122
+ alignItems: "center",
1123
+ backgroundColor: "#EFF6FF",
1124
+ borderRadius: 6,
1125
+ marginBottom: 12,
1126
+ paddingVertical: 8
1127
+ },
1128
+ rangeIndicatorText: {
1129
+ color: "#3B82F6",
1130
+ fontSize: 14,
1131
+ fontWeight: "600"
1132
+ },
1133
+ required: {
1134
+ color: "#EF4444"
1135
+ },
1136
+ trigger: {
1137
+ alignItems: "center",
1138
+ backgroundColor: "#FFFFFF",
1139
+ borderColor: "#D1D5DB",
1140
+ borderRadius: 6,
1141
+ borderWidth: 1,
1142
+ flexDirection: "row",
1143
+ justifyContent: "space-between",
1144
+ paddingHorizontal: 12,
1145
+ paddingVertical: 10
1146
+ },
1147
+ triggerError: {
1148
+ borderColor: "#EF4444"
1149
+ },
1150
+ triggerPlaceholder: {
1151
+ color: "#9CA3AF"
1152
+ },
1153
+ triggerText: {
1154
+ color: "#374151",
1155
+ flex: 1,
1156
+ fontSize: 14
1157
+ },
1158
+ weekDay: {
1159
+ color: "#6B7280",
1160
+ flex: 1,
1161
+ fontSize: 12,
1162
+ fontWeight: "600",
1163
+ maxWidth: "14.28%",
1164
+ textAlign: "center"
1165
+ },
1166
+ weekDays: {
1167
+ flexDirection: "row",
1168
+ marginBottom: 8
1169
+ }
1170
+ }), lt = ({ node: r, value: o, setValue: s, error: n, label: a, helperText: f }) => {
1171
+ const [m, B] = A(null), [y, S] = A(!0), u = ne(), x = Array.isArray(o) ? o : o ? [o] : [], i = r.data.multiple, c = he(async () => {
1172
+ if (m)
1173
+ try {
1174
+ const b = (await m({
1175
+ allowMultiSelection: i
1176
+ })).map((j) => ({
1177
+ data: j.uri,
1178
+ lastModified: Date.now(),
1179
+ name: j.name,
1180
+ size: j.size,
1181
+ type: j.type || "application/octet-stream"
1182
+ }));
1183
+ s(i ? [...x, ...b] : b[0] || null);
1184
+ } catch (g) {
1185
+ g.code !== "DOCUMENT_PICKER_CANCELED" && Je.alert("Error", u("renderer.defaultInputs.filePickerError"));
1186
+ }
1187
+ }, [m, x, i, s, u]), z = he(
1188
+ (g) => {
1189
+ const b = x.filter((j, T) => T !== g);
1190
+ s(b.length > 0 ? b : null);
1191
+ },
1192
+ [x, s]
1193
+ ), C = (g) => g < 1024 ? `${g} B` : g < 1024 * 1024 ? `${(g / 1024).toFixed(1)} KB` : `${(g / (1024 * 1024)).toFixed(1)} MB`;
1194
+ return de(() => {
1195
+ (async () => {
1196
+ try {
1197
+ const { pick: b } = await import("react-native-document-picker");
1198
+ B(() => b);
1199
+ } catch {
1200
+ B(null);
1201
+ } finally {
1202
+ S(!1);
1203
+ }
1204
+ })();
1205
+ }, []), y ? null : m ? /* @__PURE__ */ e.jsxs(l, { style: N.container, children: [
1206
+ /* @__PURE__ */ e.jsxs(t, { style: N.label, children: [
1207
+ a || r.data.name,
1208
+ r.data.required && /* @__PURE__ */ e.jsx(t, { style: N.required, children: "*" })
1209
+ ] }),
1210
+ x.length > 0 && /* @__PURE__ */ e.jsx(l, { style: N.filesList, children: x.map((g, b) => /* @__PURE__ */ e.jsxs(l, { style: N.fileItem, children: [
1211
+ /* @__PURE__ */ e.jsx(l, { style: N.fileIcon, children: /* @__PURE__ */ e.jsx(t, { style: N.fileIconText, children: "📄" }) }),
1212
+ /* @__PURE__ */ e.jsxs(l, { style: N.fileInfo, children: [
1213
+ /* @__PURE__ */ e.jsx(t, { style: N.fileName, numberOfLines: 1, children: g.name }),
1214
+ g.size > 0 && /* @__PURE__ */ e.jsx(t, { style: N.fileSize, children: C(g.size) })
1215
+ ] }),
1216
+ /* @__PURE__ */ e.jsx(h, { style: N.removeButton, onPress: () => z(b), activeOpacity: 0.7, children: /* @__PURE__ */ e.jsx(t, { style: N.removeButtonText, children: "✕" }) })
1217
+ ] }, `${g.name}-${b}`)) }),
1218
+ /* @__PURE__ */ e.jsx(h, { style: N.pickButton, onPress: c, activeOpacity: 0.7, children: /* @__PURE__ */ e.jsx(t, { style: N.pickButtonText, children: x.length === 0 ? u(i ? "renderer.defaultInputs.selectFiles" : "renderer.defaultInputs.selectFile") : u(i ? "renderer.defaultInputs.addMoreFiles" : "renderer.defaultInputs.replaceFile") }) }),
1219
+ n && /* @__PURE__ */ e.jsx(t, { style: N.error, children: n }),
1220
+ f && !n && /* @__PURE__ */ e.jsx(t, { style: N.helperText, children: f })
1221
+ ] }) : /* @__PURE__ */ e.jsxs(l, { style: N.container, children: [
1222
+ /* @__PURE__ */ e.jsxs(t, { style: N.label, children: [
1223
+ a || r.data.name,
1224
+ r.data.required && /* @__PURE__ */ e.jsx(t, { style: N.required, children: "*" })
1225
+ ] }),
1226
+ /* @__PURE__ */ e.jsx(l, { style: N.unavailableContainer, children: /* @__PURE__ */ e.jsx(t, { style: N.unavailableText, children: u("renderer.defaultInputs.filePickerUnavailable") }) }),
1227
+ f && /* @__PURE__ */ e.jsx(t, { style: N.helperText, children: f })
1228
+ ] });
1229
+ }, N = $.create({
1230
+ container: {
1231
+ marginBottom: 16
1232
+ },
1233
+ error: {
1234
+ color: "#EF4444",
1235
+ fontSize: 12,
1236
+ marginTop: 4
1237
+ },
1238
+ fileIcon: {
1239
+ alignItems: "center",
1240
+ backgroundColor: "#F3F4F6",
1241
+ borderRadius: 6,
1242
+ height: 40,
1243
+ justifyContent: "center",
1244
+ width: 40
1245
+ },
1246
+ fileIconText: {
1247
+ fontSize: 20
1248
+ },
1249
+ fileInfo: {
1250
+ flex: 1,
1251
+ marginLeft: 12
1252
+ },
1253
+ fileItem: {
1254
+ alignItems: "center",
1255
+ backgroundColor: "#F9FAFB",
1256
+ borderColor: "#E5E7EB",
1257
+ borderRadius: 6,
1258
+ borderWidth: 1,
1259
+ flexDirection: "row",
1260
+ marginBottom: 8,
1261
+ padding: 12
1262
+ },
1263
+ fileName: {
1264
+ color: "#111827",
1265
+ fontSize: 14,
1266
+ fontWeight: "500"
1267
+ },
1268
+ fileSize: {
1269
+ color: "#6B7280",
1270
+ fontSize: 12,
1271
+ marginTop: 2
1272
+ },
1273
+ filesList: {
1274
+ marginBottom: 12
1275
+ },
1276
+ helperText: {
1277
+ color: "#6B7280",
1278
+ fontSize: 12,
1279
+ marginTop: 4
1280
+ },
1281
+ label: {
1282
+ color: "#374151",
1283
+ fontSize: 14,
1284
+ fontWeight: "500",
1285
+ marginBottom: 8
1286
+ },
1287
+ pickButton: {
1288
+ alignItems: "center",
1289
+ backgroundColor: "#FFFFFF",
1290
+ borderColor: "#D1D5DB",
1291
+ borderRadius: 6,
1292
+ borderStyle: "dashed",
1293
+ borderWidth: 2,
1294
+ justifyContent: "center",
1295
+ paddingVertical: 16
1296
+ },
1297
+ pickButtonText: {
1298
+ color: "#6B7280",
1299
+ fontSize: 14,
1300
+ fontWeight: "500"
1301
+ },
1302
+ removeButton: {
1303
+ padding: 4
1304
+ },
1305
+ removeButtonText: {
1306
+ color: "#6B7280",
1307
+ fontSize: 18
1308
+ },
1309
+ required: {
1310
+ color: "#EF4444"
1311
+ },
1312
+ unavailableContainer: {
1313
+ alignItems: "center",
1314
+ backgroundColor: "#FEF2F2",
1315
+ borderColor: "#FCA5A5",
1316
+ borderRadius: 6,
1317
+ borderWidth: 1,
1318
+ justifyContent: "center",
1319
+ paddingVertical: 16
1320
+ },
1321
+ unavailableText: {
1322
+ color: "#991B1B",
1323
+ fontSize: 12,
1324
+ textAlign: "center"
1325
+ }
1326
+ }), at = (r) => null, ct = (r) => r.replace(/<[^>]*>/g, ""), dt = (r) => r.replace(/&amp;/g, "&").replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&quot;/g, '"').replace(/&#x27;/g, "'").replace(/&#x2F;/g, "/"), Re = (r, o = {}) => {
1327
+ if (r == null || r === "")
1328
+ return "";
1329
+ const s = String(r), n = ct(s);
1330
+ return dt(n);
1331
+ }, We = 100, Ee = (r, o = {}, s = 0, n = /* @__PURE__ */ new WeakSet()) => {
1332
+ if (s > We)
1333
+ return console.warn(`sanitizeHttpResponse: Maximum depth (${We}) exceeded.`), typeof r == "string" ? Re(r, o) : "[Max Depth Exceeded]";
1334
+ if (r == null)
1335
+ return r;
1336
+ if (typeof r == "string")
1337
+ return Re(r, o);
1338
+ if (Array.isArray(r))
1339
+ return r.map((a) => Ee(a, o, s + 1, n));
1340
+ if (typeof r == "object") {
1341
+ if (n.has(r))
1342
+ return console.warn("sanitizeHttpResponse: Circular reference detected. Breaking cycle to prevent infinite recursion."), "[Circular Reference]";
1343
+ n.add(r);
1344
+ const a = {};
1345
+ for (const [f, m] of Object.entries(r))
1346
+ a[f] = Ee(m, o, s + 1, n);
1347
+ return n.delete(r), a;
1348
+ }
1349
+ return r;
1350
+ }, ke = (r, o) => o ? o.split(".").reduce((n, a) => {
1351
+ if (n == null)
1352
+ return;
1353
+ const f = a.match(/^(\w+)\[(\d+)]$/);
1354
+ if (f) {
1355
+ const [, m, B] = f, y = n[m];
1356
+ return Array.isArray(y) ? y[Number.parseInt(B, 10)] : y;
1357
+ }
1358
+ return n[a];
1359
+ }, r) : r, Oe = (r) => {
1360
+ const o = r.matchAll(/{{([\w-]+)}}/g);
1361
+ return Array.from(o, (s) => s[1]);
1362
+ }, ze = (r, o) => Oe(r).every((n) => {
1363
+ const a = o[n];
1364
+ return a != null && a !== "";
1365
+ }), we = (r, o, s = !1) => r.replace(/{{([\w-]+)}}/g, (n, a) => {
1366
+ const f = o[a], m = f == null ? "" : String(f);
1367
+ return s ? encodeURIComponent(m) : m;
1368
+ }), ut = ({
1369
+ node: r,
1370
+ value: o,
1371
+ setValue: s,
1372
+ error: n,
1373
+ label: a,
1374
+ placeholder: f,
1375
+ helperText: m,
1376
+ id: B,
1377
+ name: y
1378
+ }) => {
1379
+ const [S, u] = A(!1), [x, i] = A(null), [c, z] = A([]), [C, g] = A(""), [b, j] = A(!1), { formValues: T, inputNodes: q } = He(), R = ne(), { httpConfig: k } = r.data, _ = le(!1), K = le(""), ee = le(k), p = le(T), H = le(q), Q = le(s), U = le(null), F = le(null), v = ue(() => k?.url ? Oe(k.url) : [], [k?.url]), X = v.length > 0, O = ue(() => v.map((Y) => `${Y}:${String(T[Y] ?? "")}`).join("|"), [v, T]), ce = ue(() => k?.url ? X ? ze(k.url, T) : !0 : !1, [k?.url, X, T]), V = he(
1380
+ async (Y) => {
1381
+ F.current && F.current.abort();
1382
+ const re = new AbortController();
1383
+ F.current = re;
1384
+ const L = ee.current, se = p.current, Ce = Q.current;
1385
+ if (!L?.url) {
1386
+ i(R("renderer.defaultHttpInput.noUrlConfigured")), F.current = null;
1387
+ return;
1388
+ }
1389
+ if (L.url && !ze(L.url, se)) {
1390
+ F.current = null;
1391
+ return;
1392
+ }
1393
+ u(!0), i(null);
1394
+ try {
1395
+ const te = we(L.url, se, !0), G = L.searchParam && Y ? `${te}${te.includes("?") ? "&" : "?"}${L.searchParam}=${encodeURIComponent(Y)}` : te, J = {};
1396
+ L.headers?.forEach((De) => {
1397
+ J[De.key] = we(De.value, se);
1398
+ });
1399
+ const Te = ["POST", "PUT", "PATCH"].includes(L.method || "") ? L.sendAllFormValues ? JSON.stringify($e(se, H.current)) : L.body ? we(L.body, se) : void 0 : void 0, Me = setTimeout(() => re.abort(), 3e4), Be = await fetch(G, {
1400
+ body: Te || void 0,
1401
+ headers: {
1402
+ "Content-Type": "application/json",
1403
+ ...J
1404
+ },
1405
+ method: L.method || "GET",
1406
+ signal: re.signal
1407
+ });
1408
+ if (clearTimeout(Me), !Be.ok) {
1409
+ i(`HTTP Error ${Be.status}: ${Be.statusText}`), u(!1);
1410
+ return;
1411
+ }
1412
+ const qe = await Be.json(), Ae = Ee(qe), Se = L.responsePath ? ke(Ae, L.responsePath) : Ae;
1413
+ if (L.responseMapping && Array.isArray(Se)) {
1414
+ const { valueField: De = "value", labelField: Ve = "label" } = L.responseMapping, Ne = Se.map((Pe) => ({
1415
+ label: String(ke(Pe, Ve) || ""),
1416
+ value: String(ke(Pe, De) || "")
1417
+ }));
1418
+ z(Ne);
1419
+ } else
1420
+ Ce(typeof Se == "string" ? Se : JSON.stringify(Se));
1421
+ } catch (te) {
1422
+ if (te instanceof Error && te.name === "AbortError")
1423
+ return;
1424
+ const G = te instanceof Error ? te.message : R("renderer.defaultHttpInput.fetchFailed");
1425
+ i(G), console.error("HTTP Input fetch error:", te);
1426
+ } finally {
1427
+ u(!1), F.current = null;
1428
+ }
1429
+ },
1430
+ [R]
1431
+ );
1432
+ if (de(() => {
1433
+ ee.current = k, p.current = T, H.current = q, Q.current = s, U.current = V;
1434
+ }, [k, T, q, s, V]), de(() => () => {
1435
+ F.current && F.current.abort();
1436
+ }, []), de(() => {
1437
+ if (_.current)
1438
+ return;
1439
+ _.current = !0;
1440
+ const Y = ee.current, re = p.current, L = U.current, se = Y?.url && ze(Y.url, re);
1441
+ if (Y?.fetchOnMount && se && L && (L(), Y.url)) {
1442
+ const Ce = Oe(Y.url);
1443
+ K.current = Ce.map((te) => `${te}:${String(re[te] ?? "")}`).join("|");
1444
+ }
1445
+ }, []), de(() => {
1446
+ if (!_.current || !X || K.current === O || !ce)
1447
+ return;
1448
+ const Y = setTimeout(() => {
1449
+ V(), K.current = O;
1450
+ }, 500);
1451
+ return () => clearTimeout(Y);
1452
+ }, [O, X, ce, V]), de(() => {
1453
+ if (!(k?.searchParam && C))
1454
+ return;
1455
+ const Y = setTimeout(() => {
1456
+ V(C);
1457
+ }, 300);
1458
+ return () => clearTimeout(Y);
1459
+ }, [C, k?.searchParam, V]), k?.responseMapping) {
1460
+ const Y = Array.isArray(o) ? o[0] : o, re = c.find((G) => G.value === Y);
1461
+ if (k.searchParam) {
1462
+ const G = S && k?.showLoading;
1463
+ return /* @__PURE__ */ e.jsxs(l, { style: d.container, children: [
1464
+ /* @__PURE__ */ e.jsxs(t, { style: d.label, children: [
1465
+ a || r.data.name,
1466
+ r.data.required && /* @__PURE__ */ e.jsx(t, { style: d.required, children: "*" })
1467
+ ] }),
1468
+ /* @__PURE__ */ e.jsxs(h, { style: [d.trigger, n && d.triggerError], onPress: () => j(!0), activeOpacity: 0.7, children: [
1469
+ G ? /* @__PURE__ */ e.jsxs(l, { style: d.loadingTrigger, children: [
1470
+ /* @__PURE__ */ e.jsx(be, { size: "small", color: "#3B82F6" }),
1471
+ /* @__PURE__ */ e.jsx(t, { style: d.triggerPlaceholder, numberOfLines: 1, children: re?.label || f || R("renderer.defaultHttpInput.search") })
1472
+ ] }) : /* @__PURE__ */ e.jsx(t, { style: [d.triggerText, !re && d.triggerPlaceholder], numberOfLines: 1, children: re?.label || f || R("renderer.defaultHttpInput.search") }),
1473
+ /* @__PURE__ */ e.jsx(t, { style: d.arrow, children: "▼" })
1474
+ ] }),
1475
+ /* @__PURE__ */ e.jsx(ae, { visible: b, transparent: !0, animationType: "fade", onRequestClose: () => j(!1), children: /* @__PURE__ */ e.jsx(h, { style: d.modalOverlay, activeOpacity: 1, onPress: () => j(!1), children: /* @__PURE__ */ e.jsxs(h, { style: d.modalContent, activeOpacity: 1, onPress: () => {
1476
+ }, children: [
1477
+ /* @__PURE__ */ e.jsxs(l, { style: d.modalHeader, children: [
1478
+ /* @__PURE__ */ e.jsx(t, { style: d.modalTitle, children: a || r.data.name }),
1479
+ /* @__PURE__ */ e.jsx(h, { onPress: () => j(!1), children: /* @__PURE__ */ e.jsx(t, { style: d.closeButton, children: "✕" }) })
1480
+ ] }),
1481
+ /* @__PURE__ */ e.jsx(l, { style: d.searchContainer, children: /* @__PURE__ */ e.jsx(
1482
+ ge,
1483
+ {
1484
+ style: d.searchInput,
1485
+ placeholder: R("renderer.defaultHttpInput.search"),
1486
+ placeholderTextColor: "#9CA3AF",
1487
+ value: C,
1488
+ onChangeText: (J) => {
1489
+ g(J), i(null);
1490
+ },
1491
+ autoFocus: !0,
1492
+ autoCapitalize: "none",
1493
+ autoCorrect: !1
1494
+ }
1495
+ ) }),
1496
+ S ? /* @__PURE__ */ e.jsx(l, { style: d.loadingContainer, children: /* @__PURE__ */ e.jsx(be, { size: "small", color: "#3B82F6" }) }) : x ? /* @__PURE__ */ e.jsxs(l, { style: d.errorContainer, children: [
1497
+ /* @__PURE__ */ e.jsx(t, { style: d.errorText, children: x }),
1498
+ /* @__PURE__ */ e.jsx(h, { onPress: () => V(C), style: d.retryButton, children: /* @__PURE__ */ e.jsx(t, { style: d.retryButtonText, children: R("renderer.defaultHttpInput.retry") }) })
1499
+ ] }) : /* @__PURE__ */ e.jsx(
1500
+ Fe,
1501
+ {
1502
+ data: c,
1503
+ keyExtractor: (J) => J.value,
1504
+ style: d.optionsList,
1505
+ contentContainerStyle: d.optionsListContent,
1506
+ ListEmptyComponent: /* @__PURE__ */ e.jsx(l, { style: d.emptyContainer, children: /* @__PURE__ */ e.jsx(t, { style: d.emptyText, children: R("renderer.defaultHttpInput.noResults") }) }),
1507
+ renderItem: ({ item: J }) => {
1508
+ const Te = J.value === Y;
1509
+ return /* @__PURE__ */ e.jsxs(
1510
+ h,
1511
+ {
1512
+ style: [d.option, Te && d.optionSelected],
1513
+ onPress: () => {
1514
+ s(J.value), j(!1);
1515
+ },
1516
+ activeOpacity: 0.7,
1517
+ children: [
1518
+ /* @__PURE__ */ e.jsx(t, { style: d.optionText, children: J.label }),
1519
+ Te && /* @__PURE__ */ e.jsx(t, { style: d.checkmark, children: "✓" })
1520
+ ]
1521
+ }
1522
+ );
1523
+ }
1524
+ }
1525
+ )
1526
+ ] }) }) }),
1527
+ n && /* @__PURE__ */ e.jsx(t, { style: d.error, children: n }),
1528
+ m && !n && /* @__PURE__ */ e.jsx(t, { style: d.helperText, children: m })
1529
+ ] });
1530
+ }
1531
+ const L = S && k?.showLoading, se = v.filter((G) => {
1532
+ const J = T[G];
1533
+ return J == null || J === "";
1534
+ }), Ce = se.map((G) => _e(G, q) || G), te = c.length === 0 && !L ? x || (se.length > 0 ? `${R("renderer.defaultHttpInput.waitingForRequiredFields")}: ${Ce.join(", ")}` : R("renderer.defaultHttpInput.noDataAvailable")) : void 0;
1535
+ return /* @__PURE__ */ e.jsxs(l, { style: d.container, children: [
1536
+ /* @__PURE__ */ e.jsxs(t, { style: d.label, children: [
1537
+ a || r.data.name,
1538
+ r.data.required && /* @__PURE__ */ e.jsx(t, { style: d.required, children: "*" })
1539
+ ] }),
1540
+ /* @__PURE__ */ e.jsxs(
1541
+ h,
1542
+ {
1543
+ style: [d.trigger, n && d.triggerError, (L || c.length === 0) && d.triggerDisabled],
1544
+ onPress: () => j(!0),
1545
+ disabled: L || c.length === 0,
1546
+ activeOpacity: 0.7,
1547
+ children: [
1548
+ L && /* @__PURE__ */ e.jsx(be, { size: "small", color: "#3B82F6", style: d.triggerLoader }),
1549
+ /* @__PURE__ */ e.jsx(t, { style: [d.triggerText, !re && d.triggerPlaceholder], numberOfLines: 1, children: re?.label || f || R("renderer.defaultHttpInput.selectOption") }),
1550
+ /* @__PURE__ */ e.jsx(t, { style: d.arrow, children: "▼" })
1551
+ ]
1552
+ }
1553
+ ),
1554
+ te && /* @__PURE__ */ e.jsx(t, { style: d.disabledMessage, children: te }),
1555
+ /* @__PURE__ */ e.jsx(ae, { visible: b, transparent: !0, animationType: "fade", onRequestClose: () => j(!1), children: /* @__PURE__ */ e.jsx(h, { style: d.modalOverlay, activeOpacity: 1, onPress: () => j(!1), children: /* @__PURE__ */ e.jsxs(h, { style: d.modalContent, activeOpacity: 1, onPress: () => {
1556
+ }, children: [
1557
+ /* @__PURE__ */ e.jsxs(l, { style: d.modalHeader, children: [
1558
+ /* @__PURE__ */ e.jsx(t, { style: d.modalTitle, children: a || r.data.name }),
1559
+ /* @__PURE__ */ e.jsx(h, { onPress: () => j(!1), children: /* @__PURE__ */ e.jsx(t, { style: d.closeButton, children: "✕" }) })
1560
+ ] }),
1561
+ /* @__PURE__ */ e.jsx(
1562
+ Fe,
1563
+ {
1564
+ data: c,
1565
+ keyExtractor: (G) => G.value,
1566
+ style: d.optionsList,
1567
+ contentContainerStyle: d.optionsListContent,
1568
+ renderItem: ({ item: G }) => {
1569
+ const J = G.value === Y;
1570
+ return /* @__PURE__ */ e.jsxs(
1571
+ h,
1572
+ {
1573
+ style: [d.option, J && d.optionSelected],
1574
+ onPress: () => {
1575
+ s(G.value), j(!1);
1576
+ },
1577
+ activeOpacity: 0.7,
1578
+ children: [
1579
+ /* @__PURE__ */ e.jsx(t, { style: d.optionText, children: G.label }),
1580
+ J && /* @__PURE__ */ e.jsx(t, { style: d.checkmark, children: "✓" })
1581
+ ]
1582
+ }
1583
+ );
1584
+ }
1585
+ }
1586
+ )
1587
+ ] }) }) }),
1588
+ n && /* @__PURE__ */ e.jsx(t, { style: d.error, children: n }),
1589
+ m && !n && /* @__PURE__ */ e.jsx(t, { style: d.helperText, children: m })
1590
+ ] });
1591
+ }
1592
+ return /* @__PURE__ */ e.jsxs(l, { style: d.container, children: [
1593
+ /* @__PURE__ */ e.jsxs(t, { style: d.label, children: [
1594
+ a || r.data.name,
1595
+ r.data.required && /* @__PURE__ */ e.jsx(t, { style: d.required, children: "*" })
1596
+ ] }),
1597
+ /* @__PURE__ */ e.jsx(
1598
+ ge,
1599
+ {
1600
+ style: [d.input, d.inputDisabled],
1601
+ value: typeof o == "string" ? o : JSON.stringify(o),
1602
+ editable: !1
1603
+ }
1604
+ ),
1605
+ n && /* @__PURE__ */ e.jsx(t, { style: d.error, children: n }),
1606
+ m && !n && /* @__PURE__ */ e.jsx(t, { style: d.helperText, children: m })
1607
+ ] });
1608
+ }, d = $.create({
1609
+ arrow: {
1610
+ color: "#6B7280",
1611
+ fontSize: 12
1612
+ },
1613
+ checkmark: {
1614
+ color: "#3B82F6",
1615
+ fontSize: 18,
1616
+ fontWeight: "700"
1617
+ },
1618
+ closeButton: {
1619
+ color: "#6B7280",
1620
+ fontSize: 24,
1621
+ fontWeight: "300"
1622
+ },
1623
+ container: {
1624
+ marginBottom: 16
1625
+ },
1626
+ disabledMessage: {
1627
+ color: "#EF4444",
1628
+ fontSize: 12,
1629
+ marginTop: 4
1630
+ },
1631
+ emptyContainer: {
1632
+ alignItems: "center",
1633
+ paddingVertical: 24
1634
+ },
1635
+ emptyText: {
1636
+ color: "#9CA3AF",
1637
+ fontSize: 14
1638
+ },
1639
+ error: {
1640
+ color: "#EF4444",
1641
+ fontSize: 12,
1642
+ marginTop: 4
1643
+ },
1644
+ errorContainer: {
1645
+ alignItems: "center",
1646
+ paddingVertical: 16
1647
+ },
1648
+ errorText: {
1649
+ color: "#EF4444",
1650
+ fontSize: 14,
1651
+ textAlign: "center"
1652
+ },
1653
+ helperText: {
1654
+ color: "#6B7280",
1655
+ fontSize: 12,
1656
+ marginTop: 4
1657
+ },
1658
+ input: {
1659
+ backgroundColor: "#FFFFFF",
1660
+ borderColor: "#D1D5DB",
1661
+ borderRadius: 6,
1662
+ borderWidth: 1,
1663
+ color: "#374151",
1664
+ fontSize: 14,
1665
+ paddingHorizontal: 12,
1666
+ paddingVertical: 10
1667
+ },
1668
+ inputDisabled: {
1669
+ backgroundColor: "#F9FAFB",
1670
+ color: "#9CA3AF"
1671
+ },
1672
+ label: {
1673
+ color: "#374151",
1674
+ fontSize: 14,
1675
+ fontWeight: "500",
1676
+ marginBottom: 8
1677
+ },
1678
+ loadingContainer: {
1679
+ alignItems: "center",
1680
+ paddingVertical: 24
1681
+ },
1682
+ loadingTrigger: {
1683
+ alignItems: "center",
1684
+ flex: 1,
1685
+ flexDirection: "row",
1686
+ gap: 8
1687
+ },
1688
+ modalContent: {
1689
+ backgroundColor: "#FFFFFF",
1690
+ borderRadius: 12,
1691
+ maxHeight: "80%",
1692
+ padding: 16,
1693
+ width: "90%"
1694
+ },
1695
+ modalHeader: {
1696
+ alignItems: "center",
1697
+ borderBottomColor: "#E5E7EB",
1698
+ borderBottomWidth: 1,
1699
+ flexDirection: "row",
1700
+ justifyContent: "space-between",
1701
+ marginBottom: 12,
1702
+ paddingBottom: 12
1703
+ },
1704
+ modalOverlay: {
1705
+ alignItems: "center",
1706
+ backgroundColor: "rgba(0, 0, 0, 0.5)",
1707
+ flex: 1,
1708
+ justifyContent: "center"
1709
+ },
1710
+ modalTitle: {
1711
+ color: "#111827",
1712
+ fontSize: 18,
1713
+ fontWeight: "600"
1714
+ },
1715
+ option: {
1716
+ alignItems: "center",
1717
+ borderRadius: 6,
1718
+ flexDirection: "row",
1719
+ justifyContent: "space-between",
1720
+ paddingHorizontal: 12,
1721
+ paddingVertical: 12
1722
+ },
1723
+ optionSelected: {
1724
+ backgroundColor: "#EFF6FF"
1725
+ },
1726
+ optionsList: {
1727
+ flexGrow: 0,
1728
+ flexShrink: 1
1729
+ },
1730
+ optionsListContent: {
1731
+ flexGrow: 0
1732
+ },
1733
+ optionText: {
1734
+ color: "#374151",
1735
+ flex: 1,
1736
+ fontSize: 14
1737
+ },
1738
+ required: {
1739
+ color: "#EF4444"
1740
+ },
1741
+ retryButton: {
1742
+ marginTop: 12
1743
+ },
1744
+ retryButtonText: {
1745
+ color: "#3B82F6",
1746
+ fontSize: 14,
1747
+ textDecorationLine: "underline"
1748
+ },
1749
+ searchContainer: {
1750
+ marginBottom: 12
1751
+ },
1752
+ searchInput: {
1753
+ backgroundColor: "#F9FAFB",
1754
+ borderColor: "#D1D5DB",
1755
+ borderRadius: 6,
1756
+ borderWidth: 1,
1757
+ color: "#374151",
1758
+ fontSize: 14,
1759
+ paddingHorizontal: 12,
1760
+ paddingVertical: 10
1761
+ },
1762
+ trigger: {
1763
+ alignItems: "center",
1764
+ backgroundColor: "#FFFFFF",
1765
+ borderColor: "#D1D5DB",
1766
+ borderRadius: 6,
1767
+ borderWidth: 1,
1768
+ flexDirection: "row",
1769
+ justifyContent: "space-between",
1770
+ paddingHorizontal: 12,
1771
+ paddingVertical: 10
1772
+ },
1773
+ triggerDisabled: {
1774
+ backgroundColor: "#F9FAFB"
1775
+ },
1776
+ triggerError: {
1777
+ borderColor: "#EF4444"
1778
+ },
1779
+ triggerLoader: {
1780
+ marginRight: 8
1781
+ },
1782
+ triggerPlaceholder: {
1783
+ color: "#9CA3AF"
1784
+ },
1785
+ triggerText: {
1786
+ color: "#374151",
1787
+ flex: 1,
1788
+ fontSize: 14
1789
+ }
1790
+ }), gt = ({ node: r, value: o, setValue: s, error: n, label: a, placeholder: f, helperText: m, name: B }) => {
1791
+ const [y, S] = A(o?.toString() ?? "");
1792
+ return de(() => {
1793
+ S(o?.toString() ?? "");
1794
+ }, [o]), /* @__PURE__ */ e.jsxs(l, { style: me.container, children: [
1795
+ /* @__PURE__ */ e.jsxs(t, { style: me.label, children: [
1796
+ a || r.data.name,
1797
+ r.data.required && /* @__PURE__ */ e.jsx(t, { style: me.required, children: "*" })
1798
+ ] }),
1799
+ /* @__PURE__ */ e.jsx(
1800
+ ge,
1801
+ {
1802
+ style: [me.input, n && me.inputError],
1803
+ value: y,
1804
+ onChangeText: (u) => {
1805
+ if (S(u), u.trim() === "") {
1806
+ s(null);
1807
+ return;
1808
+ }
1809
+ const x = Number(u);
1810
+ Number.isNaN(x) || s(x);
1811
+ },
1812
+ placeholder: f,
1813
+ keyboardType: "numeric",
1814
+ accessibilityLabel: B
1815
+ }
1816
+ ),
1817
+ n && /* @__PURE__ */ e.jsx(t, { style: me.error, children: n }),
1818
+ m && !n && /* @__PURE__ */ e.jsx(t, { style: me.helperText, children: m })
1819
+ ] });
1820
+ }, me = $.create({
1821
+ container: {
1822
+ marginBottom: 16
1823
+ },
1824
+ error: {
1825
+ color: "#EF4444",
1826
+ fontSize: 12,
1827
+ marginTop: 4
1828
+ },
1829
+ helperText: {
1830
+ color: "#6B7280",
1831
+ fontSize: 12,
1832
+ marginTop: 4
1833
+ },
1834
+ input: {
1835
+ backgroundColor: "#FFFFFF",
1836
+ borderColor: "#D1D5DB",
1837
+ borderRadius: 6,
1838
+ borderWidth: 1,
1839
+ fontSize: 14,
1840
+ paddingHorizontal: 12,
1841
+ paddingVertical: 8
1842
+ },
1843
+ inputError: {
1844
+ borderColor: "#EF4444"
1845
+ },
1846
+ label: {
1847
+ color: "#374151",
1848
+ fontSize: 14,
1849
+ fontWeight: "500",
1850
+ marginBottom: 8
1851
+ },
1852
+ required: {
1853
+ color: "#EF4444"
1854
+ }
1855
+ }), ht = ({ node: r, value: o, setValue: s, error: n, label: a, placeholder: f, helperText: m, name: B }) => {
1856
+ const [y, S] = A(!1);
1857
+ return /* @__PURE__ */ e.jsxs(l, { style: ie.container, children: [
1858
+ /* @__PURE__ */ e.jsxs(t, { style: ie.label, children: [
1859
+ a || r.data.name,
1860
+ r.data.required && /* @__PURE__ */ e.jsx(t, { style: ie.required, children: "*" })
1861
+ ] }),
1862
+ /* @__PURE__ */ e.jsxs(l, { style: ie.inputWrapper, children: [
1863
+ /* @__PURE__ */ e.jsx(
1864
+ ge,
1865
+ {
1866
+ style: [ie.input, n && ie.inputError],
1867
+ value: o ?? "",
1868
+ onChangeText: s,
1869
+ placeholder: f,
1870
+ secureTextEntry: !y,
1871
+ accessibilityLabel: B
1872
+ }
1873
+ ),
1874
+ /* @__PURE__ */ e.jsx(h, { style: ie.toggleButton, onPress: () => S(!y), activeOpacity: 0.7, children: /* @__PURE__ */ e.jsx(t, { style: ie.toggleText, children: y ? "Hide" : "Show" }) })
1875
+ ] }),
1876
+ n && /* @__PURE__ */ e.jsx(t, { style: ie.error, children: n }),
1877
+ m && !n && /* @__PURE__ */ e.jsx(t, { style: ie.helperText, children: m })
1878
+ ] });
1879
+ }, ie = $.create({
1880
+ container: {
1881
+ marginBottom: 16
1882
+ },
1883
+ error: {
1884
+ color: "#EF4444",
1885
+ fontSize: 12,
1886
+ marginTop: 4
1887
+ },
1888
+ helperText: {
1889
+ color: "#6B7280",
1890
+ fontSize: 12,
1891
+ marginTop: 4
1892
+ },
1893
+ input: {
1894
+ backgroundColor: "#FFFFFF",
1895
+ borderColor: "#D1D5DB",
1896
+ borderRadius: 6,
1897
+ borderWidth: 1,
1898
+ flex: 1,
1899
+ fontSize: 14,
1900
+ paddingHorizontal: 12,
1901
+ paddingVertical: 8
1902
+ },
1903
+ inputError: {
1904
+ borderColor: "#EF4444"
1905
+ },
1906
+ inputWrapper: {
1907
+ alignItems: "center",
1908
+ flexDirection: "row",
1909
+ position: "relative"
1910
+ },
1911
+ label: {
1912
+ color: "#374151",
1913
+ fontSize: 14,
1914
+ fontWeight: "500",
1915
+ marginBottom: 8
1916
+ },
1917
+ required: {
1918
+ color: "#EF4444"
1919
+ },
1920
+ toggleButton: {
1921
+ paddingHorizontal: 12,
1922
+ paddingVertical: 8,
1923
+ position: "absolute",
1924
+ right: 0
1925
+ },
1926
+ toggleText: {
1927
+ color: "#3B82F6",
1928
+ fontSize: 12,
1929
+ fontWeight: "600"
1930
+ }
1931
+ }), mt = ({ node: r, value: o, setValue: s, error: n, label: a, helperText: f }) => {
1932
+ const m = ne(), B = r.data.options || [], y = o || "", S = (u) => {
1933
+ s(u);
1934
+ };
1935
+ return /* @__PURE__ */ e.jsxs(l, { style: oe.container, children: [
1936
+ /* @__PURE__ */ e.jsxs(t, { style: oe.label, children: [
1937
+ a || r.data.name,
1938
+ r.data.required && /* @__PURE__ */ e.jsx(t, { style: oe.required, children: "*" })
1939
+ ] }),
1940
+ B.map((u) => {
1941
+ const x = y === u.value;
1942
+ return /* @__PURE__ */ e.jsxs(
1943
+ h,
1944
+ {
1945
+ style: oe.option,
1946
+ onPress: () => S(u.value),
1947
+ disabled: u.disabled,
1948
+ activeOpacity: 0.7,
1949
+ children: [
1950
+ /* @__PURE__ */ e.jsx(l, { style: [oe.radio, x && oe.radioSelected], children: x && /* @__PURE__ */ e.jsx(l, { style: oe.radioInner }) }),
1951
+ /* @__PURE__ */ e.jsx(t, { style: [oe.optionLabel, u.disabled && oe.optionLabelDisabled], children: m(u.label) || u.value })
1952
+ ]
1953
+ },
1954
+ u.value
1955
+ );
1956
+ }),
1957
+ n && /* @__PURE__ */ e.jsx(t, { style: oe.error, children: n }),
1958
+ f && !n && /* @__PURE__ */ e.jsx(t, { style: oe.helperText, children: f })
1959
+ ] });
1960
+ }, oe = $.create({
1961
+ container: {
1962
+ marginBottom: 16
1963
+ },
1964
+ error: {
1965
+ color: "#EF4444",
1966
+ fontSize: 12,
1967
+ marginTop: 4
1968
+ },
1969
+ helperText: {
1970
+ color: "#6B7280",
1971
+ fontSize: 12,
1972
+ marginTop: 4
1973
+ },
1974
+ label: {
1975
+ color: "#374151",
1976
+ fontSize: 14,
1977
+ fontWeight: "500",
1978
+ marginBottom: 8
1979
+ },
1980
+ option: {
1981
+ alignItems: "center",
1982
+ flexDirection: "row",
1983
+ marginBottom: 8
1984
+ },
1985
+ optionLabel: {
1986
+ color: "#374151",
1987
+ fontSize: 14
1988
+ },
1989
+ optionLabelDisabled: {
1990
+ color: "#9CA3AF"
1991
+ },
1992
+ radio: {
1993
+ alignItems: "center",
1994
+ backgroundColor: "#FFFFFF",
1995
+ borderColor: "#D1D5DB",
1996
+ borderRadius: 10,
1997
+ borderWidth: 2,
1998
+ height: 20,
1999
+ justifyContent: "center",
2000
+ marginRight: 12,
2001
+ width: 20
2002
+ },
2003
+ radioInner: {
2004
+ backgroundColor: "#3B82F6",
2005
+ borderRadius: 5,
2006
+ height: 10,
2007
+ width: 10
2008
+ },
2009
+ radioSelected: {
2010
+ borderColor: "#3B82F6"
2011
+ },
2012
+ required: {
2013
+ color: "#EF4444"
2014
+ }
2015
+ }), ft = ({ node: r, value: o, setValue: s, error: n, label: a, placeholder: f, helperText: m }) => {
2016
+ const [B, y] = A(!1), S = ne(), u = r.data.options || [], x = r.data.multiple, i = Array.isArray(o) ? o : o ? [o] : [], c = (C) => {
2017
+ if (x) {
2018
+ const g = i.includes(C) ? i.filter((b) => b !== C) : [...i, C];
2019
+ s(g);
2020
+ } else
2021
+ s(C), y(!1);
2022
+ }, z = () => {
2023
+ if (i.length === 0)
2024
+ return f || "Select...";
2025
+ if (x)
2026
+ return u.filter((b) => i.includes(b.value)).map((b) => S(b.label) || b.value).join(", ");
2027
+ const C = u.find((g) => g.value === i[0]);
2028
+ return C ? S(C.label) || C.value : f || "Select...";
2029
+ };
2030
+ return /* @__PURE__ */ e.jsxs(l, { style: M.container, children: [
2031
+ /* @__PURE__ */ e.jsxs(t, { style: M.label, children: [
2032
+ a || r.data.name,
2033
+ r.data.required && /* @__PURE__ */ e.jsx(t, { style: M.required, children: "*" })
2034
+ ] }),
2035
+ /* @__PURE__ */ e.jsxs(h, { style: [M.trigger, n && M.triggerError], onPress: () => y(!0), activeOpacity: 0.7, children: [
2036
+ /* @__PURE__ */ e.jsx(t, { style: [M.triggerText, i.length === 0 && M.triggerPlaceholder], children: z() }),
2037
+ /* @__PURE__ */ e.jsx(t, { style: M.arrow, children: "▼" })
2038
+ ] }),
2039
+ /* @__PURE__ */ e.jsx(ae, { visible: B, transparent: !0, animationType: "fade", onRequestClose: () => y(!1), children: /* @__PURE__ */ e.jsx(h, { style: M.modalOverlay, activeOpacity: 1, onPress: () => y(!1), children: /* @__PURE__ */ e.jsxs(l, { style: M.modalContent, onStartShouldSetResponder: () => !0, children: [
2040
+ /* @__PURE__ */ e.jsxs(l, { style: M.modalHeader, children: [
2041
+ /* @__PURE__ */ e.jsx(t, { style: M.modalTitle, children: a || r.data.name }),
2042
+ /* @__PURE__ */ e.jsx(h, { onPress: () => y(!1), children: /* @__PURE__ */ e.jsx(t, { style: M.closeButton, children: "✕" }) })
2043
+ ] }),
2044
+ /* @__PURE__ */ e.jsx(je, { style: M.optionsList, children: u.map((C) => {
2045
+ const g = i.includes(C.value);
2046
+ return /* @__PURE__ */ e.jsxs(
2047
+ h,
2048
+ {
2049
+ style: [M.option, g && M.optionSelected],
2050
+ onPress: () => c(C.value),
2051
+ disabled: C.disabled,
2052
+ activeOpacity: 0.7,
2053
+ children: [
2054
+ /* @__PURE__ */ e.jsx(t, { style: [M.optionText, C.disabled && M.optionTextDisabled], children: S(C.label) || C.value }),
2055
+ g && /* @__PURE__ */ e.jsx(t, { style: M.checkmark, children: "✓" })
2056
+ ]
2057
+ },
2058
+ C.value
2059
+ );
2060
+ }) }),
2061
+ x && /* @__PURE__ */ e.jsx(h, { style: M.doneButton, onPress: () => y(!1), children: /* @__PURE__ */ e.jsx(t, { style: M.doneButtonText, children: "Done" }) })
2062
+ ] }) }) }),
2063
+ n && /* @__PURE__ */ e.jsx(t, { style: M.error, children: n }),
2064
+ m && !n && /* @__PURE__ */ e.jsx(t, { style: M.helperText, children: m })
2065
+ ] });
2066
+ }, M = $.create({
2067
+ arrow: {
2068
+ color: "#6B7280",
2069
+ fontSize: 12
2070
+ },
2071
+ checkmark: {
2072
+ color: "#3B82F6",
2073
+ fontSize: 18,
2074
+ fontWeight: "700"
2075
+ },
2076
+ closeButton: {
2077
+ color: "#6B7280",
2078
+ fontSize: 24,
2079
+ fontWeight: "300"
2080
+ },
2081
+ container: {
2082
+ marginBottom: 16
2083
+ },
2084
+ doneButton: {
2085
+ alignItems: "center",
2086
+ backgroundColor: "#3B82F6",
2087
+ borderRadius: 6,
2088
+ marginTop: 12,
2089
+ paddingVertical: 12
2090
+ },
2091
+ doneButtonText: {
2092
+ color: "#FFFFFF",
2093
+ fontSize: 16,
2094
+ fontWeight: "600"
2095
+ },
2096
+ error: {
2097
+ color: "#EF4444",
2098
+ fontSize: 12,
2099
+ marginTop: 4
2100
+ },
2101
+ helperText: {
2102
+ color: "#6B7280",
2103
+ fontSize: 12,
2104
+ marginTop: 4
2105
+ },
2106
+ label: {
2107
+ color: "#374151",
2108
+ fontSize: 14,
2109
+ fontWeight: "500",
2110
+ marginBottom: 8
2111
+ },
2112
+ modalContent: {
2113
+ backgroundColor: "#FFFFFF",
2114
+ borderRadius: 12,
2115
+ maxHeight: "80%",
2116
+ padding: 16,
2117
+ width: "90%"
2118
+ },
2119
+ modalHeader: {
2120
+ alignItems: "center",
2121
+ borderBottomColor: "#E5E7EB",
2122
+ borderBottomWidth: 1,
2123
+ flexDirection: "row",
2124
+ justifyContent: "space-between",
2125
+ marginBottom: 12,
2126
+ paddingBottom: 12
2127
+ },
2128
+ modalOverlay: {
2129
+ alignItems: "center",
2130
+ backgroundColor: "rgba(0, 0, 0, 0.5)",
2131
+ flex: 1,
2132
+ justifyContent: "center"
2133
+ },
2134
+ modalTitle: {
2135
+ color: "#111827",
2136
+ fontSize: 18,
2137
+ fontWeight: "600"
2138
+ },
2139
+ option: {
2140
+ alignItems: "center",
2141
+ borderRadius: 6,
2142
+ flexDirection: "row",
2143
+ justifyContent: "space-between",
2144
+ paddingHorizontal: 12,
2145
+ paddingVertical: 12
2146
+ },
2147
+ optionSelected: {
2148
+ backgroundColor: "#EFF6FF"
2149
+ },
2150
+ optionsList: {
2151
+ maxHeight: 300
2152
+ },
2153
+ optionText: {
2154
+ color: "#374151",
2155
+ fontSize: 14
2156
+ },
2157
+ optionTextDisabled: {
2158
+ color: "#9CA3AF"
2159
+ },
2160
+ required: {
2161
+ color: "#EF4444"
2162
+ },
2163
+ trigger: {
2164
+ alignItems: "center",
2165
+ backgroundColor: "#FFFFFF",
2166
+ borderColor: "#D1D5DB",
2167
+ borderRadius: 6,
2168
+ borderWidth: 1,
2169
+ flexDirection: "row",
2170
+ justifyContent: "space-between",
2171
+ paddingHorizontal: 12,
2172
+ paddingVertical: 10
2173
+ },
2174
+ triggerError: {
2175
+ borderColor: "#EF4444"
2176
+ },
2177
+ triggerPlaceholder: {
2178
+ color: "#9CA3AF"
2179
+ },
2180
+ triggerText: {
2181
+ color: "#374151",
2182
+ flex: 1,
2183
+ fontSize: 14
2184
+ }
2185
+ }), pt = ({ node: r, value: o, setValue: s, error: n, label: a, helperText: f }) => {
2186
+ const m = !!o;
2187
+ return /* @__PURE__ */ e.jsxs(l, { style: fe.container, children: [
2188
+ /* @__PURE__ */ e.jsxs(l, { style: fe.row, children: [
2189
+ /* @__PURE__ */ e.jsx(l, { style: fe.labelContainer, children: /* @__PURE__ */ e.jsxs(t, { style: fe.label, children: [
2190
+ a || r.data.name,
2191
+ r.data.required && /* @__PURE__ */ e.jsx(t, { style: fe.required, children: "*" })
2192
+ ] }) }),
2193
+ /* @__PURE__ */ e.jsx(
2194
+ Ke,
2195
+ {
2196
+ trackColor: { false: "#D1D5DB", true: "#93C5FD" },
2197
+ thumbColor: m ? "#3B82F6" : "#F3F4F6",
2198
+ ios_backgroundColor: "#D1D5DB",
2199
+ onValueChange: s,
2200
+ value: m
2201
+ }
2202
+ )
2203
+ ] }),
2204
+ n && /* @__PURE__ */ e.jsx(t, { style: fe.error, children: n }),
2205
+ f && !n && /* @__PURE__ */ e.jsx(t, { style: fe.helperText, children: f })
2206
+ ] });
2207
+ }, fe = $.create({
2208
+ container: {
2209
+ marginBottom: 16
2210
+ },
2211
+ error: {
2212
+ color: "#EF4444",
2213
+ fontSize: 12,
2214
+ marginTop: 4
2215
+ },
2216
+ helperText: {
2217
+ color: "#6B7280",
2218
+ fontSize: 12,
2219
+ marginTop: 4
2220
+ },
2221
+ label: {
2222
+ color: "#374151",
2223
+ fontSize: 14,
2224
+ fontWeight: "500"
2225
+ },
2226
+ labelContainer: {
2227
+ flex: 1
2228
+ },
2229
+ required: {
2230
+ color: "#EF4444"
2231
+ },
2232
+ row: {
2233
+ alignItems: "center",
2234
+ flexDirection: "row",
2235
+ justifyContent: "space-between"
2236
+ }
2237
+ }), yt = ({ node: r, value: o, setValue: s, error: n, label: a, placeholder: f, helperText: m, name: B }) => /* @__PURE__ */ e.jsxs(l, { style: pe.container, children: [
2238
+ /* @__PURE__ */ e.jsxs(t, { style: pe.label, children: [
2239
+ a || r.data.name,
2240
+ r.data.required && /* @__PURE__ */ e.jsx(t, { style: pe.required, children: "*" })
2241
+ ] }),
2242
+ /* @__PURE__ */ e.jsx(
2243
+ ge,
2244
+ {
2245
+ style: [pe.textarea, n && pe.textareaError],
2246
+ value: o ?? "",
2247
+ onChangeText: s,
2248
+ placeholder: f,
2249
+ multiline: !0,
2250
+ numberOfLines: 4,
2251
+ textAlignVertical: "top",
2252
+ accessibilityLabel: B
2253
+ }
2254
+ ),
2255
+ n && /* @__PURE__ */ e.jsx(t, { style: pe.error, children: n }),
2256
+ m && !n && /* @__PURE__ */ e.jsx(t, { style: pe.helperText, children: m })
2257
+ ] }), pe = $.create({
2258
+ container: {
2259
+ marginBottom: 16
2260
+ },
2261
+ error: {
2262
+ color: "#EF4444",
2263
+ fontSize: 12,
2264
+ marginTop: 4
2265
+ },
2266
+ helperText: {
2267
+ color: "#6B7280",
2268
+ fontSize: 12,
2269
+ marginTop: 4
2270
+ },
2271
+ label: {
2272
+ color: "#374151",
2273
+ fontSize: 14,
2274
+ fontWeight: "500",
2275
+ marginBottom: 8
2276
+ },
2277
+ required: {
2278
+ color: "#EF4444"
2279
+ },
2280
+ textarea: {
2281
+ backgroundColor: "#FFFFFF",
2282
+ borderColor: "#D1D5DB",
2283
+ borderRadius: 6,
2284
+ borderWidth: 1,
2285
+ fontSize: 14,
2286
+ minHeight: 100,
2287
+ paddingHorizontal: 12,
2288
+ paddingVertical: 8
2289
+ },
2290
+ textareaError: {
2291
+ borderColor: "#EF4444"
2292
+ }
2293
+ }), xt = ({ node: r, value: o, setValue: s, error: n, label: a, placeholder: f, helperText: m, name: B }) => /* @__PURE__ */ e.jsxs(l, { style: ye.container, children: [
2294
+ /* @__PURE__ */ e.jsxs(t, { style: ye.label, children: [
2295
+ a || r.data.name,
2296
+ r.data.required && /* @__PURE__ */ e.jsx(t, { style: ye.required, children: "*" })
2297
+ ] }),
2298
+ /* @__PURE__ */ e.jsx(
2299
+ ge,
2300
+ {
2301
+ style: [ye.input, n && ye.inputError],
2302
+ value: o ?? "",
2303
+ onChangeText: s,
2304
+ placeholder: f,
2305
+ accessibilityLabel: B
2306
+ }
2307
+ ),
2308
+ n && /* @__PURE__ */ e.jsx(t, { style: ye.error, children: n }),
2309
+ m && !n && /* @__PURE__ */ e.jsx(t, { style: ye.helperText, children: m })
2310
+ ] }), ye = $.create({
2311
+ container: {
2312
+ marginBottom: 16
2313
+ },
2314
+ error: {
2315
+ color: "#EF4444",
2316
+ fontSize: 12,
2317
+ marginTop: 4
2318
+ },
2319
+ helperText: {
2320
+ color: "#6B7280",
2321
+ fontSize: 12,
2322
+ marginTop: 4
2323
+ },
2324
+ input: {
2325
+ backgroundColor: "#FFFFFF",
2326
+ borderColor: "#D1D5DB",
2327
+ borderRadius: 6,
2328
+ borderWidth: 1,
2329
+ fontSize: 14,
2330
+ paddingHorizontal: 12,
2331
+ paddingVertical: 8
2332
+ },
2333
+ inputError: {
2334
+ borderColor: "#EF4444"
2335
+ },
2336
+ label: {
2337
+ color: "#374151",
2338
+ fontSize: 14,
2339
+ fontWeight: "500",
2340
+ marginBottom: 8
2341
+ },
2342
+ required: {
2343
+ color: "#EF4444"
2344
+ }
2345
+ }), bt = ({ node: r, value: o, setValue: s, error: n, label: a, placeholder: f, helperText: m }) => {
2346
+ const [B, y] = A(!1), u = (o || "").split(":"), x = Number.parseInt(u[0], 10), i = Number.parseInt(u[1], 10), c = Number.isNaN(x) ? 0 : x, z = Number.isNaN(i) ? 0 : i, [C, g] = A(c || 0), [b, j] = A(z || 0), T = le(null), q = le(null), R = Array.from({ length: 24 }, (p, H) => H), k = Array.from({ length: 60 }, (p, H) => H), _ = () => o || f || "Select time", K = he(() => {
2347
+ const p = `${String(C).padStart(2, "0")}:${String(b).padStart(2, "0")}`;
2348
+ s(p), y(!1);
2349
+ }, [C, b, s]), ee = () => {
2350
+ g(c || 0), j(z || 0), y(!0);
2351
+ };
2352
+ return /* @__PURE__ */ e.jsxs(l, { style: w.container, children: [
2353
+ /* @__PURE__ */ e.jsxs(t, { style: w.label, children: [
2354
+ a || r.data.name,
2355
+ r.data.required && /* @__PURE__ */ e.jsx(t, { style: w.required, children: "*" })
2356
+ ] }),
2357
+ /* @__PURE__ */ e.jsxs(h, { style: [w.trigger, n && w.triggerError], onPress: ee, activeOpacity: 0.7, children: [
2358
+ /* @__PURE__ */ e.jsx(t, { style: [w.triggerText, !o && w.triggerPlaceholder], numberOfLines: 1, children: _() }),
2359
+ /* @__PURE__ */ e.jsx(t, { style: w.icon, children: "🕐" })
2360
+ ] }),
2361
+ /* @__PURE__ */ e.jsx(ae, { visible: B, transparent: !0, animationType: "fade", onRequestClose: () => y(!1), children: /* @__PURE__ */ e.jsx(h, { style: w.modalOverlay, activeOpacity: 1, onPress: () => y(!1), children: /* @__PURE__ */ e.jsxs(h, { style: w.modalContent, activeOpacity: 1, onPress: () => {
2362
+ }, children: [
2363
+ /* @__PURE__ */ e.jsxs(l, { style: w.modalHeader, children: [
2364
+ /* @__PURE__ */ e.jsx(t, { style: w.modalTitle, children: a || r.data.name }),
2365
+ /* @__PURE__ */ e.jsx(h, { onPress: () => y(!1), children: /* @__PURE__ */ e.jsx(t, { style: w.closeButton, children: "✕" }) })
2366
+ ] }),
2367
+ /* @__PURE__ */ e.jsxs(l, { style: w.pickerContainer, children: [
2368
+ /* @__PURE__ */ e.jsxs(l, { style: w.pickerColumn, children: [
2369
+ /* @__PURE__ */ e.jsx(t, { style: w.pickerLabel, children: "Hour" }),
2370
+ /* @__PURE__ */ e.jsx(
2371
+ je,
2372
+ {
2373
+ ref: T,
2374
+ style: w.picker,
2375
+ contentContainerStyle: w.pickerContent,
2376
+ showsVerticalScrollIndicator: !1,
2377
+ children: R.map((p) => /* @__PURE__ */ e.jsx(
2378
+ h,
2379
+ {
2380
+ style: [w.pickerItem, C === p && w.pickerItemSelected],
2381
+ onPress: () => g(p),
2382
+ activeOpacity: 0.7,
2383
+ children: /* @__PURE__ */ e.jsx(t, { style: [w.pickerItemText, C === p && w.pickerItemTextSelected], children: String(p).padStart(2, "0") })
2384
+ },
2385
+ p
2386
+ ))
2387
+ }
2388
+ )
2389
+ ] }),
2390
+ /* @__PURE__ */ e.jsx(t, { style: w.pickerSeparator, children: ":" }),
2391
+ /* @__PURE__ */ e.jsxs(l, { style: w.pickerColumn, children: [
2392
+ /* @__PURE__ */ e.jsx(t, { style: w.pickerLabel, children: "Minute" }),
2393
+ /* @__PURE__ */ e.jsx(
2394
+ je,
2395
+ {
2396
+ ref: q,
2397
+ style: w.picker,
2398
+ contentContainerStyle: w.pickerContent,
2399
+ showsVerticalScrollIndicator: !1,
2400
+ children: k.map((p) => /* @__PURE__ */ e.jsx(
2401
+ h,
2402
+ {
2403
+ style: [w.pickerItem, b === p && w.pickerItemSelected],
2404
+ onPress: () => j(p),
2405
+ activeOpacity: 0.7,
2406
+ children: /* @__PURE__ */ e.jsx(t, { style: [w.pickerItemText, b === p && w.pickerItemTextSelected], children: String(p).padStart(2, "0") })
2407
+ },
2408
+ p
2409
+ ))
2410
+ }
2411
+ )
2412
+ ] })
2413
+ ] }),
2414
+ /* @__PURE__ */ e.jsx(h, { style: w.confirmButton, onPress: K, activeOpacity: 0.7, children: /* @__PURE__ */ e.jsx(t, { style: w.confirmButtonText, children: "Confirm" }) })
2415
+ ] }) }) }),
2416
+ n && /* @__PURE__ */ e.jsx(t, { style: w.error, children: n }),
2417
+ m && !n && /* @__PURE__ */ e.jsx(t, { style: w.helperText, children: m })
2418
+ ] });
2419
+ }, w = $.create({
2420
+ closeButton: {
2421
+ color: "#6B7280",
2422
+ fontSize: 24,
2423
+ fontWeight: "300"
2424
+ },
2425
+ confirmButton: {
2426
+ alignItems: "center",
2427
+ backgroundColor: "#3B82F6",
2428
+ borderRadius: 6,
2429
+ marginTop: 16,
2430
+ paddingVertical: 12
2431
+ },
2432
+ confirmButtonText: {
2433
+ color: "#FFFFFF",
2434
+ fontSize: 16,
2435
+ fontWeight: "600"
2436
+ },
2437
+ container: {
2438
+ marginBottom: 16
2439
+ },
2440
+ error: {
2441
+ color: "#EF4444",
2442
+ fontSize: 12,
2443
+ marginTop: 4
2444
+ },
2445
+ helperText: {
2446
+ color: "#6B7280",
2447
+ fontSize: 12,
2448
+ marginTop: 4
2449
+ },
2450
+ icon: {
2451
+ fontSize: 16
2452
+ },
2453
+ label: {
2454
+ color: "#374151",
2455
+ fontSize: 14,
2456
+ fontWeight: "500",
2457
+ marginBottom: 8
2458
+ },
2459
+ modalContent: {
2460
+ backgroundColor: "#FFFFFF",
2461
+ borderRadius: 12,
2462
+ padding: 16,
2463
+ width: "80%"
2464
+ },
2465
+ modalHeader: {
2466
+ alignItems: "center",
2467
+ borderBottomColor: "#E5E7EB",
2468
+ borderBottomWidth: 1,
2469
+ flexDirection: "row",
2470
+ justifyContent: "space-between",
2471
+ marginBottom: 16,
2472
+ paddingBottom: 12
2473
+ },
2474
+ modalOverlay: {
2475
+ alignItems: "center",
2476
+ backgroundColor: "rgba(0, 0, 0, 0.5)",
2477
+ flex: 1,
2478
+ justifyContent: "center"
2479
+ },
2480
+ modalTitle: {
2481
+ color: "#111827",
2482
+ fontSize: 18,
2483
+ fontWeight: "600"
2484
+ },
2485
+ picker: {
2486
+ maxHeight: 200
2487
+ },
2488
+ pickerColumn: {
2489
+ flex: 1
2490
+ },
2491
+ pickerContainer: {
2492
+ alignItems: "center",
2493
+ flexDirection: "row",
2494
+ gap: 8
2495
+ },
2496
+ pickerContent: {
2497
+ paddingVertical: 8
2498
+ },
2499
+ pickerItem: {
2500
+ alignItems: "center",
2501
+ borderRadius: 6,
2502
+ marginVertical: 2,
2503
+ paddingVertical: 10
2504
+ },
2505
+ pickerItemSelected: {
2506
+ backgroundColor: "#3B82F6"
2507
+ },
2508
+ pickerItemText: {
2509
+ color: "#374151",
2510
+ fontSize: 18
2511
+ },
2512
+ pickerItemTextSelected: {
2513
+ color: "#FFFFFF",
2514
+ fontWeight: "600"
2515
+ },
2516
+ pickerLabel: {
2517
+ color: "#6B7280",
2518
+ fontSize: 12,
2519
+ fontWeight: "600",
2520
+ marginBottom: 8,
2521
+ textAlign: "center"
2522
+ },
2523
+ pickerSeparator: {
2524
+ color: "#374151",
2525
+ fontSize: 24,
2526
+ fontWeight: "600"
2527
+ },
2528
+ required: {
2529
+ color: "#EF4444"
2530
+ },
2531
+ trigger: {
2532
+ alignItems: "center",
2533
+ backgroundColor: "#FFFFFF",
2534
+ borderColor: "#D1D5DB",
2535
+ borderRadius: 6,
2536
+ borderWidth: 1,
2537
+ flexDirection: "row",
2538
+ justifyContent: "space-between",
2539
+ paddingHorizontal: 12,
2540
+ paddingVertical: 10
2541
+ },
2542
+ triggerError: {
2543
+ borderColor: "#EF4444"
2544
+ },
2545
+ triggerPlaceholder: {
2546
+ color: "#9CA3AF"
2547
+ },
2548
+ triggerText: {
2549
+ color: "#374151",
2550
+ flex: 1,
2551
+ fontSize: 14
2552
+ }
2553
+ }), Ft = ({ node: r, value: o, setValue: s, error: n, label: a, helperText: f }) => {
2554
+ const [m, B] = A(!1), [y, S] = A(!0), u = ne(), x = Array.isArray(o) ? o : [], i = x[0] || "", c = x[1] || "", z = i.split(":"), C = Number.parseInt(z[0], 10), g = Number.parseInt(z[1], 10), b = Number.isNaN(C) ? 0 : C, j = Number.isNaN(g) ? 0 : g, T = c.split(":"), q = Number.parseInt(T[0], 10), R = Number.parseInt(T[1], 10), k = Number.isNaN(q) ? 0 : q, _ = Number.isNaN(R) ? 0 : R, [K, ee] = A(0), [p, H] = A(0), Q = Array.from({ length: 24 }, (O, ce) => ce), U = Array.from({ length: 60 }, (O, ce) => ce), F = () => i && c ? `${i} - ${c}` : i || u("renderer.defaultInputs.selectDateRange"), v = he(() => {
2555
+ const O = `${String(K).padStart(2, "0")}:${String(p).padStart(2, "0")}`;
2556
+ y ? (s([O, c]), S(!1), ee(k || 0), H(_ || 0)) : (s([i, O]), B(!1), S(!0));
2557
+ }, [y, K, p, i, c, k, _, s]), X = () => {
2558
+ ee(b || 0), H(j || 0), S(!0), B(!0);
2559
+ };
2560
+ return /* @__PURE__ */ e.jsxs(l, { style: I.container, children: [
2561
+ /* @__PURE__ */ e.jsxs(t, { style: I.label, children: [
2562
+ a || r.data.name,
2563
+ r.data.required && /* @__PURE__ */ e.jsx(t, { style: I.required, children: "*" })
2564
+ ] }),
2565
+ /* @__PURE__ */ e.jsxs(h, { style: [I.trigger, n && I.triggerError], onPress: X, activeOpacity: 0.7, children: [
2566
+ /* @__PURE__ */ e.jsx(t, { style: [I.triggerText, !i && I.triggerPlaceholder], numberOfLines: 1, children: F() }),
2567
+ /* @__PURE__ */ e.jsx(t, { style: I.icon, children: "🕐" })
2568
+ ] }),
2569
+ /* @__PURE__ */ e.jsx(ae, { visible: m, transparent: !0, animationType: "fade", onRequestClose: () => B(!1), children: /* @__PURE__ */ e.jsx(h, { style: I.modalOverlay, activeOpacity: 1, onPress: () => B(!1), children: /* @__PURE__ */ e.jsxs(h, { style: I.modalContent, activeOpacity: 1, onPress: () => {
2570
+ }, children: [
2571
+ /* @__PURE__ */ e.jsxs(l, { style: I.modalHeader, children: [
2572
+ /* @__PURE__ */ e.jsx(t, { style: I.modalTitle, children: a || r.data.name }),
2573
+ /* @__PURE__ */ e.jsx(h, { onPress: () => B(!1), children: /* @__PURE__ */ e.jsx(t, { style: I.closeButton, children: "✕" }) })
2574
+ ] }),
2575
+ /* @__PURE__ */ e.jsx(l, { style: I.rangeIndicator, children: /* @__PURE__ */ e.jsx(t, { style: I.rangeIndicatorText, children: u(y ? "renderer.defaultInputs.startTime" : "renderer.defaultInputs.endTime") }) }),
2576
+ /* @__PURE__ */ e.jsxs(l, { style: I.pickerContainer, children: [
2577
+ /* @__PURE__ */ e.jsxs(l, { style: I.pickerColumn, children: [
2578
+ /* @__PURE__ */ e.jsx(t, { style: I.pickerLabel, children: "Hour" }),
2579
+ /* @__PURE__ */ e.jsx(je, { style: I.picker, contentContainerStyle: I.pickerContent, showsVerticalScrollIndicator: !1, children: Q.map((O) => /* @__PURE__ */ e.jsx(
2580
+ h,
2581
+ {
2582
+ style: [I.pickerItem, K === O && I.pickerItemSelected],
2583
+ onPress: () => ee(O),
2584
+ activeOpacity: 0.7,
2585
+ children: /* @__PURE__ */ e.jsx(t, { style: [I.pickerItemText, K === O && I.pickerItemTextSelected], children: String(O).padStart(2, "0") })
2586
+ },
2587
+ O
2588
+ )) })
2589
+ ] }),
2590
+ /* @__PURE__ */ e.jsx(t, { style: I.pickerSeparator, children: ":" }),
2591
+ /* @__PURE__ */ e.jsxs(l, { style: I.pickerColumn, children: [
2592
+ /* @__PURE__ */ e.jsx(t, { style: I.pickerLabel, children: "Minute" }),
2593
+ /* @__PURE__ */ e.jsx(je, { style: I.picker, contentContainerStyle: I.pickerContent, showsVerticalScrollIndicator: !1, children: U.map((O) => /* @__PURE__ */ e.jsx(
2594
+ h,
2595
+ {
2596
+ style: [I.pickerItem, p === O && I.pickerItemSelected],
2597
+ onPress: () => H(O),
2598
+ activeOpacity: 0.7,
2599
+ children: /* @__PURE__ */ e.jsx(t, { style: [I.pickerItemText, p === O && I.pickerItemTextSelected], children: String(O).padStart(2, "0") })
2600
+ },
2601
+ O
2602
+ )) })
2603
+ ] })
2604
+ ] }),
2605
+ /* @__PURE__ */ e.jsx(h, { style: I.confirmButton, onPress: v, activeOpacity: 0.7, children: /* @__PURE__ */ e.jsx(t, { style: I.confirmButtonText, children: y ? "Next" : "Confirm" }) })
2606
+ ] }) }) }),
2607
+ n && /* @__PURE__ */ e.jsx(t, { style: I.error, children: n }),
2608
+ f && !n && /* @__PURE__ */ e.jsx(t, { style: I.helperText, children: f })
2609
+ ] });
2610
+ }, I = $.create({
2611
+ closeButton: {
2612
+ color: "#6B7280",
2613
+ fontSize: 24,
2614
+ fontWeight: "300"
2615
+ },
2616
+ confirmButton: {
2617
+ alignItems: "center",
2618
+ backgroundColor: "#3B82F6",
2619
+ borderRadius: 6,
2620
+ marginTop: 16,
2621
+ paddingVertical: 12
2622
+ },
2623
+ confirmButtonText: {
2624
+ color: "#FFFFFF",
2625
+ fontSize: 16,
2626
+ fontWeight: "600"
2627
+ },
2628
+ container: {
2629
+ marginBottom: 16
2630
+ },
2631
+ error: {
2632
+ color: "#EF4444",
2633
+ fontSize: 12,
2634
+ marginTop: 4
2635
+ },
2636
+ helperText: {
2637
+ color: "#6B7280",
2638
+ fontSize: 12,
2639
+ marginTop: 4
2640
+ },
2641
+ icon: {
2642
+ fontSize: 16
2643
+ },
2644
+ label: {
2645
+ color: "#374151",
2646
+ fontSize: 14,
2647
+ fontWeight: "500",
2648
+ marginBottom: 8
2649
+ },
2650
+ modalContent: {
2651
+ backgroundColor: "#FFFFFF",
2652
+ borderRadius: 12,
2653
+ padding: 16,
2654
+ width: "80%"
2655
+ },
2656
+ modalHeader: {
2657
+ alignItems: "center",
2658
+ borderBottomColor: "#E5E7EB",
2659
+ borderBottomWidth: 1,
2660
+ flexDirection: "row",
2661
+ justifyContent: "space-between",
2662
+ marginBottom: 12,
2663
+ paddingBottom: 12
2664
+ },
2665
+ modalOverlay: {
2666
+ alignItems: "center",
2667
+ backgroundColor: "rgba(0, 0, 0, 0.5)",
2668
+ flex: 1,
2669
+ justifyContent: "center"
2670
+ },
2671
+ modalTitle: {
2672
+ color: "#111827",
2673
+ fontSize: 18,
2674
+ fontWeight: "600"
2675
+ },
2676
+ picker: {
2677
+ maxHeight: 200
2678
+ },
2679
+ pickerColumn: {
2680
+ flex: 1
2681
+ },
2682
+ pickerContainer: {
2683
+ alignItems: "center",
2684
+ flexDirection: "row",
2685
+ gap: 8
2686
+ },
2687
+ pickerContent: {
2688
+ paddingVertical: 8
2689
+ },
2690
+ pickerItem: {
2691
+ alignItems: "center",
2692
+ borderRadius: 6,
2693
+ marginVertical: 2,
2694
+ paddingVertical: 10
2695
+ },
2696
+ pickerItemSelected: {
2697
+ backgroundColor: "#3B82F6"
2698
+ },
2699
+ pickerItemText: {
2700
+ color: "#374151",
2701
+ fontSize: 18
2702
+ },
2703
+ pickerItemTextSelected: {
2704
+ color: "#FFFFFF",
2705
+ fontWeight: "600"
2706
+ },
2707
+ pickerLabel: {
2708
+ color: "#6B7280",
2709
+ fontSize: 12,
2710
+ fontWeight: "600",
2711
+ marginBottom: 8,
2712
+ textAlign: "center"
2713
+ },
2714
+ pickerSeparator: {
2715
+ color: "#374151",
2716
+ fontSize: 24,
2717
+ fontWeight: "600"
2718
+ },
2719
+ rangeIndicator: {
2720
+ alignItems: "center",
2721
+ backgroundColor: "#EFF6FF",
2722
+ borderRadius: 6,
2723
+ marginBottom: 12,
2724
+ paddingVertical: 8
2725
+ },
2726
+ rangeIndicatorText: {
2727
+ color: "#3B82F6",
2728
+ fontSize: 14,
2729
+ fontWeight: "600"
2730
+ },
2731
+ required: {
2732
+ color: "#EF4444"
2733
+ },
2734
+ trigger: {
2735
+ alignItems: "center",
2736
+ backgroundColor: "#FFFFFF",
2737
+ borderColor: "#D1D5DB",
2738
+ borderRadius: 6,
2739
+ borderWidth: 1,
2740
+ flexDirection: "row",
2741
+ justifyContent: "space-between",
2742
+ paddingHorizontal: 12,
2743
+ paddingVertical: 10
2744
+ },
2745
+ triggerError: {
2746
+ borderColor: "#EF4444"
2747
+ },
2748
+ triggerPlaceholder: {
2749
+ color: "#9CA3AF"
2750
+ },
2751
+ triggerText: {
2752
+ color: "#374151",
2753
+ flex: 1,
2754
+ fontSize: 14
2755
+ }
2756
+ }), jt = ({ node: r }) => /* @__PURE__ */ e.jsxs(t, { children: [
2757
+ "TODO: Implement ",
2758
+ r.data.type,
2759
+ " input for React Native"
2760
+ ] }), Ct = jt, St = {
2761
+ address: rt,
2762
+ autocomplete: nt,
2763
+ checkbox: ot,
2764
+ date: st,
2765
+ daterange: it,
2766
+ file: lt,
2767
+ hidden: at,
2768
+ http: ut,
2769
+ number: gt,
2770
+ password: ht,
2771
+ radio: mt,
2772
+ select: ft,
2773
+ submit: Ct,
2774
+ switch: pt,
2775
+ text: xt,
2776
+ textarea: yt,
2777
+ time: bt,
2778
+ timerange: Ft
2779
+ }, Tt = ({ children: r = "Submit", disabled: o, isSubmitting: s, onPress: n }) => /* @__PURE__ */ e.jsx(
2780
+ h,
2781
+ {
2782
+ style: [ve.button, (o || s) && ve.buttonDisabled],
2783
+ disabled: o || s,
2784
+ onPress: n,
2785
+ activeOpacity: 0.7,
2786
+ children: s ? /* @__PURE__ */ e.jsx(be, { color: "#FFFFFF" }) : /* @__PURE__ */ e.jsx(t, { style: ve.buttonText, children: r })
2787
+ }
2788
+ ), ve = $.create({
2789
+ button: {
2790
+ alignItems: "center",
2791
+ backgroundColor: "#3B82F6",
2792
+ borderRadius: 6,
2793
+ justifyContent: "center",
2794
+ marginTop: 16,
2795
+ paddingHorizontal: 24,
2796
+ paddingVertical: 12
2797
+ },
2798
+ buttonDisabled: {
2799
+ backgroundColor: "#9CA3AF",
2800
+ opacity: 0.6
2801
+ },
2802
+ buttonText: {
2803
+ color: "#FFFFFF",
2804
+ fontSize: 16,
2805
+ fontWeight: "600"
2806
+ }
2807
+ }), Bt = ({ children: r }) => r, Dt = ({ node: r }) => {
2808
+ const s = ne()(r.data?.label);
2809
+ return /* @__PURE__ */ e.jsx(t, { style: Le.title, children: s });
2810
+ }, It = () => /* @__PURE__ */ e.jsx(l, { style: Le.divider }), Le = $.create({
2811
+ divider: {
2812
+ backgroundColor: "#E5E7EB",
2813
+ height: 1,
2814
+ marginBottom: 16,
2815
+ marginTop: 0
2816
+ },
2817
+ title: {
2818
+ color: "#111827",
2819
+ fontSize: 20,
2820
+ fontWeight: "700",
2821
+ marginBottom: 16
2822
+ }
2823
+ }), kt = {
2824
+ divider: It,
2825
+ title: Dt
2826
+ }, Ot = ({
2827
+ components: r,
2828
+ contentContainerStyle: o,
2829
+ flows: s,
2830
+ googleApiKey: n,
2831
+ language: a,
2832
+ onChange: f,
2833
+ onSubmit: m,
2834
+ style: B,
2835
+ validate: y,
2836
+ validationMode: S,
2837
+ initialValues: u = {}
2838
+ }) => {
2839
+ const {
2840
+ canSubmit: x,
2841
+ clearSubmitMessage: i,
2842
+ config: c,
2843
+ formErrors: z,
2844
+ formValues: C,
2845
+ handleSubmit: g,
2846
+ inputNodes: b,
2847
+ isSubmitting: j,
2848
+ mergedFlow: T,
2849
+ missingRequiredFields: q,
2850
+ setFieldValue: R,
2851
+ submitMessage: k,
2852
+ t: _,
2853
+ visibleNodes: K,
2854
+ visibleRootNodes: ee
2855
+ } = Ye({
2856
+ components: r,
2857
+ flows: s,
2858
+ googleApiKey: n,
2859
+ initialValues: u,
2860
+ language: a,
2861
+ onChange: f,
2862
+ onSubmit: m,
2863
+ validate: y,
2864
+ validationMode: S
2865
+ }), { FormWrapper: p, SubmitButton: H, SubmitButtonWrapper: Q, renderNode: U } = Ge({
2866
+ config: c,
2867
+ DefaultFormWrapper: Qe,
2868
+ DefaultGroup: Ze,
2869
+ DefaultSubmitButton: Tt,
2870
+ DefaultSubmitButtonWrapper: Bt,
2871
+ defaultInputRenderers: St,
2872
+ defaultUI: kt,
2873
+ formErrors: z,
2874
+ formValues: C,
2875
+ missingRequiredFields: q,
2876
+ setFieldValue: R,
2877
+ visibleNodes: K
2878
+ });
2879
+ return /* @__PURE__ */ e.jsx(je, { nestedScrollEnabled: !0, style: [xe.container, B], contentContainerStyle: o, children: /* @__PURE__ */ e.jsxs(
2880
+ Ue,
2881
+ {
2882
+ value: {
2883
+ flows: T,
2884
+ formErrors: z,
2885
+ formValues: C,
2886
+ googleApiKey: c.googleApiKey,
2887
+ inputNodes: b,
2888
+ language: c.language,
2889
+ setFieldValue: R
2890
+ },
2891
+ children: [
2892
+ /* @__PURE__ */ e.jsxs(p, { onSubmit: g, children: [
2893
+ ee.map((F) => U(F)),
2894
+ x && /* @__PURE__ */ e.jsx(Q, { missingFields: q, children: /* @__PURE__ */ e.jsx(H, { onPress: g, disabled: j, isSubmitting: j, children: _("renderer.defaultSubmitButton.submit") }) })
2895
+ ] }),
2896
+ /* @__PURE__ */ e.jsx(t, { style: xe.poweredBy, children: "Powered by Treege" }),
2897
+ k && /* @__PURE__ */ e.jsxs(l, { style: [xe.message, k.type === "success" ? xe.messageSuccess : xe.messageError], children: [
2898
+ /* @__PURE__ */ e.jsx(t, { style: xe.messageText, children: k.message }),
2899
+ /* @__PURE__ */ e.jsx(t, { style: xe.messageClose, onPress: i, children: _("common.close") })
2900
+ ] })
2901
+ ]
2902
+ }
2903
+ ) });
2904
+ }, xe = $.create({
2905
+ container: {
2906
+ flex: 1
2907
+ },
2908
+ message: {
2909
+ borderRadius: 6,
2910
+ marginVertical: 16,
2911
+ padding: 16
2912
+ },
2913
+ messageClose: {
2914
+ fontSize: 14,
2915
+ marginTop: 8,
2916
+ textDecorationLine: "underline"
2917
+ },
2918
+ messageError: {
2919
+ backgroundColor: "#FEE2E2"
2920
+ },
2921
+ messageSuccess: {
2922
+ backgroundColor: "#D1FAE5"
2923
+ },
2924
+ messageText: {
2925
+ fontSize: 14,
2926
+ fontWeight: "500"
2927
+ },
2928
+ poweredBy: {
2929
+ color: "#9CA3AF",
2930
+ fontSize: 12,
2931
+ paddingVertical: 8,
2932
+ textAlign: "center"
2933
+ }
2934
+ });
2935
+ export {
2936
+ rt as DefaultAddressInput,
2937
+ nt as DefaultAutocompleteInput,
2938
+ ot as DefaultCheckboxInput,
2939
+ st as DefaultDateInput,
2940
+ it as DefaultDateRangeInput,
2941
+ It as DefaultDividerUI,
2942
+ lt as DefaultFileInput,
2943
+ at as DefaultHiddenInput,
2944
+ ut as DefaultHttpInput,
2945
+ gt as DefaultNumberInput,
2946
+ ht as DefaultPasswordInput,
2947
+ mt as DefaultRadioInput,
2948
+ ft as DefaultSelectInput,
2949
+ Ct as DefaultSubmitInput,
2950
+ pt as DefaultSwitchInput,
2951
+ xt as DefaultTextInput,
2952
+ yt as DefaultTextareaInput,
2953
+ bt as DefaultTimeInput,
2954
+ Ft as DefaultTimeRangeInput,
2955
+ Dt as DefaultTitleUI,
2956
+ Rt as TreegeConfigProvider,
2957
+ Ot as TreegeRenderer,
2958
+ Wt as applyReferenceTransformation,
2959
+ Ht as calculateReferenceFieldUpdates,
2960
+ Lt as checkFormFieldHasValue,
2961
+ $e as convertFormValuesToNamedFormat,
2962
+ St as defaultInputRenderers,
2963
+ kt as defaultUI,
2964
+ Mt as evaluateCondition,
2965
+ qt as evaluateConditions,
2966
+ Vt as fileToSerializable,
2967
+ Nt as filesToSerializable,
2968
+ $t as findStartNode,
2969
+ _t as getFlowRenderState,
2970
+ Xt as getTranslatedText,
2971
+ Yt as isFieldEmpty,
2972
+ Gt as isStartNode,
2973
+ Ut as mergeFlows,
2974
+ Re as sanitize,
2975
+ Ee as sanitizeHttpResponse,
2976
+ Jt as serializableToFile,
2977
+ Kt as useTreegeConfig,
2978
+ Ye as useTreegeRenderer
2979
+ };