treege 3.0.0-beta.3 → 3.0.0-beta.30

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