@golemui/gui-lit 0.16.2 → 1.0.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/{abstract-calendar-YDgwwbqe.js → abstract-calendar-BoqKPRmS.js} +51 -34
  3. package/{accordion.element-ChLmV6QT.js → accordion.element-BIgxl5e9.js} +0 -1
  4. package/{alert.element-9QFlqjj9.js → alert.element-DPWq9-0F.js} +3 -4
  5. package/{button.element-DxwYDdu6.js → button.element-3a7rRHbA.js} +42 -38
  6. package/{calendar-P9DzVryu.js → calendar-DTYKVYc3.js} +2 -2
  7. package/{calendar.element-O2of7VBr.js → calendar.element-MubSE1bx.js} +11 -12
  8. package/{checkbox.element-DMmer4Jw.js → checkbox.element-CVskoXEc.js} +0 -1
  9. package/{currency.element-ybKzwXEh.js → currency.element-YyL4TeL0.js} +0 -1
  10. package/{date-CG1562vW.js → date-DTYg8sog.js} +12 -13
  11. package/{date-input-D_Swskk4.js → date-input-BeQvyfln.js} +5 -3
  12. package/{date-picker.element-CP2_u_ZE.js → date-picker.element-DabW_-0-.js} +14 -9
  13. package/{date.element-p6aB6OGd.js → date.element-BtVJSIRk.js} +1 -2
  14. package/{dropdown.element-sbd3T145.js → dropdown.element-DqzC6aXR.js} +1 -2
  15. package/{flex.element-B0sG0YT1.js → flex.element-DG4Uaj_X.js} +0 -1
  16. package/{grid.element-Bf5aEjkj.js → grid.element-DCZsh-3J.js} +0 -1
  17. package/index.js +1243 -1210
  18. package/index.umd.cjs +136 -116
  19. package/lib/components/accordion.element.d.ts +1 -1
  20. package/lib/components/alert.element.d.ts +1 -1
  21. package/lib/components/button.element.d.ts +1 -1
  22. package/lib/components/calendar.element.d.ts +1 -1
  23. package/lib/components/checkbox.element.d.ts +1 -1
  24. package/lib/components/currency.element.d.ts +1 -1
  25. package/lib/components/date-picker.element.d.ts +2 -1
  26. package/lib/components/date.element.d.ts +1 -1
  27. package/lib/components/dropdown.element.d.ts +1 -1
  28. package/lib/components/flex.element.d.ts +1 -1
  29. package/lib/components/grid.element.d.ts +1 -1
  30. package/lib/components/list.element.d.ts +1 -1
  31. package/lib/components/markdown-text.element.d.ts +1 -1
  32. package/lib/components/markdown.element.d.ts +1 -1
  33. package/lib/components/number.element.d.ts +1 -1
  34. package/lib/components/password.element.d.ts +1 -1
  35. package/lib/components/radiogroup.element.d.ts +1 -1
  36. package/lib/components/range-calendar.element.d.ts +1 -1
  37. package/lib/components/range-date-input.element.d.ts +1 -1
  38. package/lib/components/range-date-picker.element.d.ts +1 -1
  39. package/lib/components/renderer.element.d.ts +1 -1
  40. package/lib/components/repeater.element.d.ts +1 -1
  41. package/lib/components/select.element.d.ts +1 -1
  42. package/lib/components/tabs.element.d.ts +1 -1
  43. package/lib/components/tags.element.d.ts +1 -1
  44. package/lib/components/textarea.element.d.ts +1 -1
  45. package/lib/components/textinput.element.d.ts +1 -1
  46. package/lib/components/toggle.element.d.ts +1 -1
  47. package/lib/widget.loaders.d.ts +1 -1
  48. package/{list-CVDHuXKS.js → list-D1oKnH89.js} +2 -3
  49. package/{list.element-Bgnx2CN_.js → list.element-Co3V3Cn5.js} +9 -10
  50. package/{markdown-text.element-C_1OqrGa.js → markdown-text.element-B8TfVLIO.js} +0 -1
  51. package/{markdown.element-1IF3G5KX.js → markdown.element-CNp4wbg9.js} +109 -106
  52. package/{number.element-zgd4L5hn.js → number.element-B6TsvHMK.js} +31 -40
  53. package/{one-of-DifUsEYY.js → one-of-C0ur6b_n.js} +13 -11
  54. package/package.json +6 -6
  55. package/{password.element-BT65mDsp.js → password.element-n-R9RbkB.js} +0 -1
  56. package/{pills-D0yyi-op.js → pills-B66qz_KX.js} +6 -6
  57. package/{radiogroup.element-DzHLgRh1.js → radiogroup.element-CeQn623u.js} +6 -7
  58. package/{range-calendar-CZGBBOzO.js → range-calendar-9skwbwlB.js} +4 -7
  59. package/{range-calendar.element-DQZXvd-L.js → range-calendar.element-QTE6vGNP.js} +1 -2
  60. package/{range-date-input-CcPYH7P3.js → range-date-input-Uy8134vi.js} +3 -6
  61. package/{range-date-input.element-v71P-oUp.js → range-date-input.element-Dj29D_OQ.js} +1 -2
  62. package/{range-date-picker.element-CA-KcQhA.js → range-date-picker.element-BUUKtKkz.js} +2 -3
  63. package/{renderer.element-DMsheQGi.js → renderer.element-CNyMn2Lu.js} +0 -1
  64. package/{repeater.element-Ry8HyMfW.js → repeater.element-CtNgB4F5.js} +0 -1
  65. package/{select.element-CjWqp9dd.js → select.element-jcDF1h-g.js} +10 -11
  66. package/{tabs.element-VLrtF1j5.js → tabs.element-BvAyI71N.js} +0 -1
  67. package/{tags.element-ed1_51GA.js → tags.element-CX3vQL8L.js} +2 -5
  68. package/{textarea.element-BTJLqnnI.js → textarea.element-Cu9ZW3K4.js} +0 -1
  69. package/{textinput.element-zI0iG-Cq.js → textinput.element-CkXNzMUg.js} +0 -1
  70. package/{toggle.element-NXRrhALB.js → toggle.element-C1kCw5H8.js} +9 -10
package/index.js CHANGED
@@ -7,7 +7,7 @@ const He = {
7
7
  LAYOUTS: "LAYOUTS",
8
8
  DISPLAYS: "DISPLAYS"
9
9
  };
10
- function Mt(e) {
10
+ function Lt(e) {
11
11
  return function(t, n = () => !0) {
12
12
  return {
13
13
  kind: "leaf",
@@ -17,7 +17,15 @@ function Mt(e) {
17
17
  };
18
18
  };
19
19
  }
20
- const q = /* @__PURE__ */ new Map();
20
+ function T(e, t) {
21
+ return typeof e == "function" ? e : { type: t, ...e ?? {} };
22
+ }
23
+ const Mt = (e, t) => ({
24
+ type: "ITEMS",
25
+ itemType: He.DISPLAYS,
26
+ items: [{ render: e }],
27
+ tags: t ?? []
28
+ }), q = /* @__PURE__ */ new Map();
21
29
  function Qe(e, t) {
22
30
  if (q.has(e))
23
31
  throw new Error(`Item type "${e}" is already registered.`);
@@ -34,7 +42,7 @@ function H(e) {
34
42
  function et(e) {
35
43
  return q.has(e);
36
44
  }
37
- function g(e) {
45
+ function y(e) {
38
46
  const t = (a) => {
39
47
  if (!e.sensibleDefaults)
40
48
  return {};
@@ -70,622 +78,557 @@ function g(e) {
70
78
  ...e.getChildren ? { getChildren: e.getChildren } : {}
71
79
  };
72
80
  Qe(e.itemType, o);
73
- const s = Mt(e.itemType);
81
+ const s = Lt(e.itemType);
74
82
  return { gsl: s, gslByUid: (a, u) => s(u, ((c) => c.uid === a)) };
75
83
  }
76
- function Lt(e) {
84
+ function _(e) {
85
+ const {
86
+ uid: t,
87
+ path: n,
88
+ label: r,
89
+ disabled: o,
90
+ readonly: s,
91
+ defaultValue: i,
92
+ tags: a,
93
+ type: u,
94
+ size: c,
95
+ onLoad: p,
96
+ onChange: d,
97
+ onFilter: m,
98
+ on: h,
99
+ states: P,
100
+ include: k,
101
+ exclude: ke,
102
+ validator: Te,
103
+ ...L
104
+ } = e;
105
+ return L;
106
+ }
107
+ function Dt(e) {
77
108
  return e ? e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").replace(/\s+/g, " ").trim().replace(/\b\w/g, (t) => t.toUpperCase()) : "";
78
109
  }
79
- function S(e, t) {
80
- return e.label != null || t.suppressAutomaticLabels || !e.path ? e : { ...e, label: Lt(e.path) };
110
+ function w(e, t) {
111
+ return e.label != null || t.suppressAutomaticLabels || !e.path ? e : { ...e, label: Dt(e.path) };
81
112
  }
82
113
  function N(e, t) {
83
114
  return e.placeholder != null || t.suppressAutomaticPlaceholders || !e.path ? e : { ...e, placeholder: e.path };
84
115
  }
85
- const Dt = (e, t) => ({
86
- type: "ITEMS",
87
- itemType: He.DISPLAYS,
88
- items: [{ render: e }],
89
- tags: []
90
- }), tt = {
91
- INPUTS: /* @__PURE__ */ new Set([
92
- "INPUTS",
93
- "TEXTAREA",
94
- "PASSWORD",
95
- "SELECT",
96
- "DROPDOWN",
97
- "RADIOGROUP",
98
- "CHECKBOX",
99
- "CALENDAR",
100
- "DATE_INPUT",
101
- "DATE_PICKER",
102
- "RANGE_CALENDAR",
103
- "RANGE_DATE_INPUT",
104
- "RANGE_DATE_PICKER",
105
- "CURRENCY",
106
- "MARKDOWN",
107
- "LIST",
108
- "CUSTOM_INPUT",
109
- "REPEATER",
110
- "TAGS"
111
- ]),
112
- ACTIONS: /* @__PURE__ */ new Set(["ACTIONS", "CUSTOM_ACTION"]),
113
- DISPLAYS: /* @__PURE__ */ new Set(["DISPLAYS", "ALERTS", "MARKDOWN_TEXTS", "CUSTOM_DISPLAY"]),
114
- LAYOUTS: /* @__PURE__ */ new Set(["LAYOUTS", "TABS", "ACCORDION", "CUSTOM_LAYOUT"])
115
- };
116
- function Rt(e, t) {
117
- const n = tt[e];
118
- return n ? n.has(t) : e === t;
119
- }
120
- class Ft {
121
- resolve(t, n) {
122
- const r = [];
123
- for (const s of n)
124
- s.kind === "aggregated" ? this.collectFromAggregated(s, t, r) : this.collectFromLeaf(s, t, r);
125
- const o = this.rollUpSensibleDefaults(r);
126
- return {
127
- leafSelectors: r,
128
- sensibleDefaults: o
129
- };
130
- }
131
- collectFromAggregated(t, n, r) {
132
- if (t.matcher(n))
133
- for (const o of t.children)
134
- this.collectFromLeaf(o, n, r);
135
- }
136
- collectFromLeaf(t, n, r) {
137
- Rt(t.selectorType, n.itemType ?? "") && t.matcher(n) && r.push(t);
138
- }
139
- rollUpSensibleDefaults(t) {
140
- const n = /* @__PURE__ */ new Map(), r = (s, i) => {
141
- const a = n.get(s) ?? [];
142
- a.push(i), n.set(s, a);
143
- };
144
- for (const s of t) {
145
- const i = tt[s.selectorType];
146
- if (i)
147
- for (const a of i) r(a, s);
148
- else
149
- r(s.selectorType, s);
150
- }
151
- const o = {};
152
- for (const [s, i] of n)
153
- et(s) && (o[s] = H(s).rollUpSensibleDefaults(i));
154
- return o;
116
+ function Rt(e) {
117
+ switch (e.type) {
118
+ case "text":
119
+ return jt(e);
120
+ case "number":
121
+ return Wt(e);
122
+ case "boolean":
123
+ return Ft(e);
124
+ default:
125
+ throw new Error(`Unsupported field type "${e.type}"`);
155
126
  }
156
127
  }
157
- const jt = new Ft();
158
- class Wt {
159
- /**
160
- * Deep merges two objects, with right taking precedence over left when properties conflict.
161
- * Arrays are replaced, not merged.
162
- * @param left - The base object
163
- * @param right - The object whose properties take precedence
164
- * @returns A new merged object
165
- */
166
- deepMerge(t, n) {
167
- if (n == null)
168
- return t;
169
- if (t == null || typeof t != "object" || typeof n != "object" || Array.isArray(t) || Array.isArray(n))
170
- return n;
171
- const r = { ...t };
172
- for (const o in n)
173
- Object.prototype.hasOwnProperty.call(n, o) && (typeof n[o] == "object" && !Array.isArray(n[o]) && n[o] !== null && typeof t[o] == "object" && !Array.isArray(t[o]) && t[o] !== null ? r[o] = this.deepMerge(t[o], n[o]) : r[o] = n[o]);
174
- return r;
175
- }
128
+ function Ft(e) {
129
+ const t = _(e);
130
+ return {
131
+ uid: e.uid ?? "",
132
+ kind: "input",
133
+ type: "toggle",
134
+ path: e.path ?? "",
135
+ ...e.label != null ? { label: e.label } : {},
136
+ ...e.disabled != null ? { disabled: e.disabled } : {},
137
+ ...e.readonly != null ? { readonly: e.readonly } : {},
138
+ ...e.validator != null ? { validator: T(e.validator, "boolean") } : {},
139
+ props: t
140
+ };
176
141
  }
177
- const xt = new Wt();
178
- class Ut {
179
- constructor(t) {
180
- this.objectUtils = t;
181
- }
182
- merge(t, n, r) {
183
- let o = {}, s = null;
184
- typeof t == "function" && (s = t);
185
- const i = this.collectDecorators(r);
186
- for (const c of i) {
187
- if (s != null) {
188
- s = this.composeRuntimeFunctions(s, c);
189
- continue;
190
- }
191
- if (typeof c == "function") {
192
- const p = c({
193
- ...o,
194
- ...typeof t == "function" ? {} : t
195
- });
196
- if (typeof p == "function") {
197
- s = this.createPromotedFunction(
198
- o,
199
- t,
200
- p,
201
- n,
202
- r
203
- );
204
- continue;
205
- }
206
- o = this.objectUtils.deepMerge(o, p);
207
- } else
208
- o = this.objectUtils.deepMerge(o, c);
209
- }
210
- if (s != null)
211
- return {
212
- kind: "dynamic",
213
- fn: this.wrapWithSensibleDefaults(s, o, n, r)
214
- };
215
- const a = this.objectUtils.deepMerge(t, o);
216
- return { kind: "static", def: this.applySensibleDefaults({ ...a }, n, r) };
217
- }
218
- // ── Collect all decorators in priority order ──
219
- collectDecorators(t) {
220
- const n = [];
221
- for (const r of t.leafSelectors) {
222
- const o = r.config;
223
- o.override != null && n.push(o.override);
224
- }
225
- return n;
226
- }
227
- // ── Apply sensible defaults via registry ──
228
- applySensibleDefaults(t, n, r) {
229
- if (!et(n)) return t;
230
- const o = r.sensibleDefaults[n] ?? {};
231
- return H(n).applySensibleDefaults(t, o);
232
- }
233
- // ── Create promoted FunctionWidget ──
234
- createPromotedFunction(t, n, r, o, s) {
235
- return (i) => {
236
- const a = r(i);
237
- let u = this.objectUtils.deepMerge(t, a);
238
- return u = this.objectUtils.deepMerge(u, n), this.applySensibleDefaults(u, o, s);
239
- };
240
- }
241
- // ── Wrap runtime function with accumulated static decorators and sensible defaults ──
242
- wrapWithSensibleDefaults(t, n, r, o) {
243
- return (s) => {
244
- let i = t(s);
245
- return Object.keys(n).length > 0 && (i = this.objectUtils.deepMerge(n, i)), this.applySensibleDefaults(i, r, o);
246
- };
247
- }
248
- // ── Compose two runtime functions ──
249
- composeRuntimeFunctions(t, n) {
250
- return typeof n == "function" ? (r) => {
251
- const o = t(r), s = n(o);
252
- return typeof s == "function" ? s(r) : this.objectUtils.deepMerge(s, o);
253
- } : (r) => {
254
- const o = t(r);
255
- return this.objectUtils.deepMerge(o, n);
256
- };
257
- }
142
+ function jt(e) {
143
+ const t = _(e);
144
+ return {
145
+ uid: e.uid ?? "",
146
+ kind: "input",
147
+ type: "textinput",
148
+ path: e.path ?? "",
149
+ ...e.label != null ? { label: e.label } : {},
150
+ ...e.disabled != null ? { disabled: e.disabled } : {},
151
+ ...e.readonly != null ? { readonly: e.readonly } : {},
152
+ props: {
153
+ placeholder: t.placeholder ?? "",
154
+ ...t
155
+ },
156
+ validator: T(e.validator, "string")
157
+ };
258
158
  }
259
- const Vt = new Ut(xt);
260
- class Jt {
261
- mapToWidget(t, n) {
262
- if (t.kind === "dynamic") {
263
- const r = t.fn;
264
- return ((o) => {
265
- const s = r(o);
266
- return this.mapStaticDef(s, n);
267
- });
268
- }
269
- return this.mapStaticDef(t.def, n);
270
- }
271
- mapStaticDef(t, n) {
272
- const r = H(n).mapToWidget(t);
273
- return this.applyBaseWidgetFields(r, t);
274
- }
275
- /**
276
- * Injects BaseWidget-level fields that all widget types share.
277
- * Centralized here so individual mappers don't need to repeat the pattern.
278
- */
279
- applyBaseWidgetFields(t, n) {
280
- return n.size != null && (t.size = n.size), n.defaultValue != null && t.kind === "input" && (t.defaultValue = n.defaultValue), n.on != null && (t.on = n.on), n.include != null && (t.include = n.include), n.exclude != null && (t.exclude = n.exclude), t;
281
- }
159
+ function Wt(e) {
160
+ const t = _(e);
161
+ return {
162
+ uid: e.uid ?? "",
163
+ kind: "input",
164
+ type: "number",
165
+ path: e.path ?? "",
166
+ ...e.label != null ? { label: e.label } : {},
167
+ ...e.disabled != null ? { disabled: e.disabled } : {},
168
+ ...e.readonly != null ? { readonly: e.readonly } : {},
169
+ props: {
170
+ placeholder: t.placeholder ?? "",
171
+ ...t
172
+ },
173
+ validator: T(e.validator, "number")
174
+ };
282
175
  }
283
- const Bt = new Jt();
284
- class Yt {
285
- /**
286
- * Ensures the output is always a uniform GslSelector[] of aggregated selectors.
287
- *
288
- * Callers can pass flat leaf selectors (single styling rules) or pre-grouped
289
- * aggregated selectors. This method separates them into two buckets, then wraps
290
- * any bare leaves into a catch-all aggregated selector so downstream code only
291
- * deals with one shape.
292
- */
293
- normalizeSelectors(t) {
294
- const n = Array.isArray(t) ? t : [t], r = [], o = [];
295
- for (const s of n)
296
- s.kind === "leaf" ? o.push(s) : r.push(s);
297
- return o.length > 0 && r.unshift({
298
- kind: "aggregated",
299
- matcher: () => !0,
300
- children: o
301
- }), r;
302
- }
303
- extractFormConfig() {
304
- return {
305
- suppressAutomaticStack: !1
306
- };
307
- }
308
- }
309
- const Gt = new Yt(), nt = {
310
- onLoad: "load",
311
- onChange: "change",
312
- onFilter: "filter",
313
- onBlur: "blur"
314
- }, Kt = Object.keys(nt);
315
- class qt {
316
- // ── Action-specific: onClick ───────────────────────────────────
317
- extractOnClickFromMergeResult(t, n, r) {
318
- if (t.kind === "dynamic") {
319
- const i = t.fn;
320
- return { kind: "dynamic", fn: (u) => {
321
- const c = i(u);
322
- return this.wireOnClick(c, n, r);
323
- } };
324
- }
325
- const o = t.def;
326
- return { kind: "static", def: this.wireOnClick(o, n, r) };
327
- }
328
- wireOnClick(t, n, r) {
329
- const o = r.next(), s = t.onClick;
330
- if (typeof s == "function") {
331
- const { onClick: i, ...a } = t, u = s(void 0);
332
- return typeof u == "string" ? { ...a, uid: o, on: { click: u } } : (n.set(o, (c) => s(c.data)), { ...a, uid: o, on: { click: o } });
333
- }
334
- return { ...t, uid: o };
335
- }
336
- // ── Universal: onLoad, onChange, onFilter ──────────────────────
337
- wireInputLayoutEvents(t, n, r) {
338
- if (t.kind === "dynamic") {
339
- const s = t.fn;
340
- return { kind: "dynamic", fn: (a) => {
341
- const u = s(a);
342
- return this.wireEventProperties(u, n, r);
343
- } };
344
- }
345
- return { kind: "static", def: this.wireEventProperties(t.def, n, r) };
346
- }
347
- wireEventProperties(t, n, r) {
348
- const o = { ...t.on || {} };
349
- let s = !1;
350
- const i = { ...t };
351
- for (const a of Kt) {
352
- const u = t[a];
353
- if (u == null) continue;
354
- const c = nt[a];
355
- if (typeof u == "function") {
356
- const p = r.next();
357
- n.set(p, u), o[c] = p, s = !0;
358
- } else typeof u == "string" && (o[c] = u, s = !0);
359
- delete i[a];
360
- }
361
- return s && (i.on = o), i;
362
- }
363
- }
364
- const ye = new qt(), Xt = {
365
- input: /* @__PURE__ */ new Set(["disabled", "readonly", "label", "validator", "size"]),
366
- action: /* @__PURE__ */ new Set(["disabled", "label", "size"]),
367
- layout: /* @__PURE__ */ new Set(["size"]),
368
- display: /* @__PURE__ */ new Set([])
369
- }, Ae = {
370
- onChange: "change",
371
- onLoad: "load",
372
- onFilter: "filter",
373
- onClick: "click"
374
- };
375
- class Ht {
376
- /**
377
- * Extracts `states` from a merge result, combining with state-targeted
378
- * GSL leaf selectors from `_gslStates`.
379
- *
380
- * Returns a cleaned merge result (no states) and accumulated state data.
381
- */
382
- extractFromMergeResult(t, n) {
383
- const r = {};
384
- for (const a of n) {
385
- const u = a.targetState, c = a.config, p = c.override && typeof c.override != "function" ? c.override : c;
386
- r[u] = {
387
- ...r[u] || {},
388
- ...p
389
- };
390
- }
391
- if (t.kind === "dynamic") {
392
- const a = t.fn;
393
- return {
394
- cleanedResult: { kind: "dynamic", fn: (c) => {
395
- const p = a(c), { states: d, ...m } = p;
396
- return m;
397
- } },
398
- stateData: { stateOverrides: r }
399
- };
400
- }
401
- const { states: o, ...s } = t.def, i = {};
402
- for (const [a, u] of Object.entries(r))
403
- i[a] = { ...u };
404
- if (o)
405
- for (const [a, u] of Object.entries(
406
- o
407
- ))
408
- i[a] = { ...i[a] || {}, ...u };
409
- return {
410
- cleanedResult: { kind: "static", def: s },
411
- stateData: { stateOverrides: i }
412
- };
413
- }
414
- /**
415
- * Applies state overrides to a core widget. Each override produces:
416
- * - `visible: true/false` → `include: { in }` / `exclude: { from }`
417
- * - Core suffixable props → `'prop.stateName': value` at widget root
418
- * - Event handlers → `on: { 'eventType.stateName': eventId }` with registry wiring
419
- * - Custom props → `props: { 'prop.stateName': value }`
420
- */
421
- applyToWidget(t, n, r, o) {
422
- const { stateOverrides: s } = n;
423
- if (Object.keys(s).length === 0)
424
- return t;
425
- const i = { ...t }, a = t.kind, u = Xt[a] || /* @__PURE__ */ new Set();
426
- t.props && (i.props = { ...t.props }), t.on && (i.on = { ...t.on });
427
- for (const [c, p] of Object.entries(s))
428
- for (const [d, m] of Object.entries(p))
429
- d === "visible" ? this.applyVisibility(i, c, m) : Ae[d] ? this.applyStateEvent(i, c, d, m, r, o) : u.has(d) ? i[`${d}.${c}`] = m : (i.props || (i.props = {}), i.props[`${d}.${c}`] = m);
430
- return i;
431
- }
432
- hasStateData(t) {
433
- return Object.keys(t.stateOverrides).length > 0;
434
- }
435
- // ── Visibility helpers ──
436
- applyVisibility(t, n, r) {
437
- if (r) {
438
- const o = t.include?.in || [];
439
- t.include = { ...t.include || {}, in: [...o, n] };
440
- } else {
441
- const o = t.exclude?.from || [];
442
- t.exclude = { ...t.exclude || {}, from: [...o, n] };
443
- }
444
- }
445
- // ── State-suffixed event helpers ──
446
- applyStateEvent(t, n, r, o, s, i) {
447
- const a = Ae[r];
448
- if (t.on || (t.on = {}), typeof o == "function") {
449
- const u = i.next();
450
- s.set(u, o), t.on[`${a}.${n}`] = u;
451
- } else typeof o == "string" && (t.on[`${a}.${n}`] = o);
452
- }
453
- }
454
- const Qt = new Ht();
455
- function en() {
456
- let e = 0;
457
- return { next: () => `event_${e++}` };
458
- }
459
- class tn {
460
- constructor(t, n, r, o, s) {
461
- this.resolver = t, this.merger = n, this.mapper = r, this.eventWiring = o, this.stateExpansion = s;
462
- }
463
- walkAndMap(t, n, r) {
464
- const o = /* @__PURE__ */ new Map(), s = en(), i = { value: 0 }, a = /* @__PURE__ */ new Set();
465
- return { widgets: this.walkItems(
466
- t,
467
- n,
468
- o,
469
- r,
470
- s,
471
- i,
472
- a
473
- ), eventRegistry: o };
474
- }
475
- walkItems(t, n, r, o, s, i, a) {
476
- return t.flatMap((u) => {
477
- if (u.type !== "ITEMS")
478
- throw new Error("Unexpected gui shortcut type");
479
- return u.items.map((c) => this.processItem(
480
- c,
481
- u.itemType,
482
- u.tags,
483
- n,
484
- r,
485
- o,
486
- s,
487
- i,
488
- a
489
- ));
490
- });
491
- }
492
- processItem(t, n, r, o, s, i, a, u, c) {
493
- const p = n, d = H(n), m = d.parseEntry(t), h = this.buildBaseDef(m), P = this.buildDecoratorForMatching(h, p, r), k = this.resolver.resolve(P, o), ke = k.leafSelectors.filter((T) => T.targetState != null), Te = {
494
- leafSelectors: k.leafSelectors.filter((T) => T.targetState == null),
495
- sensibleDefaults: k.sensibleDefaults
496
- };
497
- let M = this.merger.merge(h, p, Te);
498
- d.afterMerge && (M = d.afterMerge(M, {
499
- eventRegistry: s,
500
- formConfig: i,
501
- eventIdGenerator: a
502
- })), M = this.eventWiring.wireInputLayoutEvents(
503
- M,
504
- s,
505
- a
506
- );
507
- const { cleanedResult: ze, stateData: ue } = this.stateExpansion.extractFromMergeResult(
508
- M,
509
- ke
510
- );
511
- let C;
512
- if (d.buildCustomWidget) {
513
- const T = this.buildCustomWidgetContext(
514
- m.children,
515
- o,
516
- s,
517
- i,
518
- a,
519
- u,
520
- c
521
- );
522
- C = this.buildCustomWidget(d, ze, T);
523
- } else
524
- C = this.mapper.mapToWidget(ze, p);
525
- if (typeof C != "function") {
526
- const T = C;
527
- T.uid || (T.path && !c.has(T.path) ? (T.uid = T.path, c.add(T.path)) : T.uid = `dx_${u.value++}`);
528
- }
529
- if (this.stateExpansion.hasStateData(ue))
530
- if (typeof C == "function") {
531
- const T = C;
532
- C = ((Et) => {
533
- const $t = T(Et);
534
- return this.stateExpansion.applyToWidget(
535
- $t,
536
- ue,
537
- s,
538
- a
539
- );
540
- });
541
- } else
542
- C = this.stateExpansion.applyToWidget(
543
- C,
544
- ue,
545
- s,
546
- a
547
- );
548
- return C;
549
- }
550
- buildCustomWidgetContext(t, n, r, o, s, i, a) {
551
- return {
552
- children: t,
553
- mapStaticDef: (u, c) => this.mapper.mapStaticDef(u, c),
554
- walkChildren: (u) => this.walkItems(
555
- u,
556
- n,
557
- r,
558
- o,
559
- s,
560
- i,
561
- a
562
- )
563
- };
564
- }
565
- buildCustomWidget(t, n, r) {
566
- return t.buildCustomWidget(n, r);
567
- }
568
- /**
569
- * Resolves the base definition from a parsed entry, injecting the path for keyed entries.
570
- * For runtime (function) providers, wraps them to inject the path at evaluation time.
571
- */
572
- buildBaseDef(t) {
573
- const n = t.baseDef;
574
- return typeof n == "function" ? (r) => {
575
- const s = n(r ?? {});
576
- return t.path != null ? { ...s, path: t.path } : s;
577
- } : t.path != null ? { ...n, path: t.path } : n;
578
- }
579
- buildDecoratorForMatching(t, n, r) {
580
- if (typeof t == "function")
581
- return { itemType: n, tags: [...r] };
582
- const o = [...r, ..."tags" in t && t.tags ? t.tags : []], s = "uid" in t ? t.uid : void 0, i = "type" in t ? t.type : void 0;
583
- return { itemType: n, tags: o, uid: s, type: i };
584
- }
585
- }
586
- function v(e) {
587
- const {
588
- uid: t,
589
- path: n,
590
- label: r,
591
- disabled: o,
592
- readonly: s,
593
- defaultValue: i,
594
- tags: a,
595
- type: u,
596
- size: c,
597
- onLoad: p,
598
- onChange: d,
599
- onFilter: m,
600
- on: h,
601
- states: P,
602
- include: k,
603
- exclude: ke,
604
- validator: Te,
605
- ...M
606
- } = e;
607
- return M;
608
- }
609
- function O(e, t) {
610
- return typeof e == "function" ? e : { type: t, ...e ?? {} };
611
- }
612
- function nn(e) {
613
- switch (e.type) {
614
- case "text":
615
- return on(e);
616
- case "number":
617
- return sn(e);
618
- case "boolean":
619
- return rn(e);
620
- default:
621
- throw new Error(`Unsupported field type "${e.type}"`);
622
- }
623
- }
624
- function rn(e) {
625
- const t = v(e);
626
- return {
176
+ y({
177
+ itemType: "INPUTS",
178
+ entryShape: "keyed",
179
+ sensibleDefaults: {
180
+ base: {
181
+ suppressAutomaticLabels: !1,
182
+ suppressAutomaticPlaceholders: !1
183
+ },
184
+ fields: ["suppressAutomaticLabels", "suppressAutomaticPlaceholders"],
185
+ apply: (e, t) => {
186
+ let n = w(e, t);
187
+ return n = N(n, t), n;
188
+ }
189
+ },
190
+ mapToWidget: Rt
191
+ });
192
+ y({
193
+ itemType: "SELECT",
194
+ entryShape: "keyed",
195
+ sensibleDefaults: {
196
+ base: { suppressAutomaticLabels: !1, suppressAutomaticPlaceholders: !1 },
197
+ fields: ["suppressAutomaticLabels", "suppressAutomaticPlaceholders"],
198
+ apply: (e, t) => N(w(e, t), t)
199
+ },
200
+ mapToWidget: (e) => ({
627
201
  uid: e.uid ?? "",
628
202
  kind: "input",
629
- type: "toggle",
203
+ type: "select",
630
204
  path: e.path ?? "",
631
205
  ...e.label != null ? { label: e.label } : {},
632
206
  ...e.disabled != null ? { disabled: e.disabled } : {},
633
207
  ...e.readonly != null ? { readonly: e.readonly } : {},
634
- ...e.validator != null ? { validator: O(e.validator, "boolean") } : {},
635
- props: t
636
- };
637
- }
638
- function on(e) {
639
- const t = v(e);
640
- return {
208
+ ...e.validator != null ? { validator: e.validator } : {},
209
+ props: _(e)
210
+ })
211
+ });
212
+ y({
213
+ itemType: "DROPDOWN",
214
+ entryShape: "keyed",
215
+ sensibleDefaults: {
216
+ base: {
217
+ suppressAutomaticLabels: !1,
218
+ suppressAutomaticPlaceholders: !1
219
+ },
220
+ fields: ["suppressAutomaticLabels", "suppressAutomaticPlaceholders"],
221
+ apply: (e, t) => N(w(e, t), t)
222
+ },
223
+ mapToWidget: (e) => ({
224
+ uid: e.uid ?? "",
225
+ kind: "input",
226
+ type: "dropdown",
227
+ path: e.path ?? "",
228
+ ...e.label != null ? { label: e.label } : {},
229
+ ...e.disabled != null ? { disabled: e.disabled } : {},
230
+ ...e.readonly != null ? { readonly: e.readonly } : {},
231
+ ...e.validator != null ? { validator: e.validator } : {},
232
+ props: _(e)
233
+ })
234
+ });
235
+ y({
236
+ itemType: "RADIOGROUP",
237
+ entryShape: "keyed",
238
+ sensibleDefaults: {
239
+ base: { suppressAutomaticLabels: !1 },
240
+ fields: ["suppressAutomaticLabels"],
241
+ apply: (e, t) => w(e, t)
242
+ },
243
+ mapToWidget: (e) => ({
244
+ uid: e.uid ?? "",
245
+ kind: "input",
246
+ type: "radiogroup",
247
+ path: e.path ?? "",
248
+ ...e.label != null ? { label: e.label } : {},
249
+ ...e.disabled != null ? { disabled: e.disabled } : {},
250
+ ...e.readonly != null ? { readonly: e.readonly } : {},
251
+ ...e.validator != null ? { validator: e.validator } : {},
252
+ props: _(e)
253
+ })
254
+ });
255
+ y({
256
+ itemType: "CHECKBOX",
257
+ entryShape: "keyed",
258
+ sensibleDefaults: {
259
+ base: { suppressAutomaticLabels: !1 },
260
+ fields: ["suppressAutomaticLabels"],
261
+ apply: (e, t) => w(e, t)
262
+ },
263
+ mapToWidget: (e) => ({
264
+ uid: e.uid ?? "",
265
+ kind: "input",
266
+ type: "checkbox",
267
+ path: e.path ?? "",
268
+ ...e.label != null ? { label: e.label } : {},
269
+ ...e.disabled != null ? { disabled: e.disabled } : {},
270
+ ...e.readonly != null ? { readonly: e.readonly } : {},
271
+ ...e.validator != null ? { validator: T(e.validator, "boolean") } : {},
272
+ props: _(e)
273
+ })
274
+ });
275
+ y({
276
+ itemType: "TEXTAREA",
277
+ entryShape: "keyed",
278
+ sensibleDefaults: {
279
+ base: { suppressAutomaticLabels: !1, suppressAutomaticPlaceholders: !1 },
280
+ fields: ["suppressAutomaticLabels", "suppressAutomaticPlaceholders"],
281
+ apply: (e, t) => N(w(e, t), t)
282
+ },
283
+ mapToWidget: (e) => ({
284
+ uid: e.uid ?? "",
285
+ kind: "input",
286
+ type: "textarea",
287
+ path: e.path ?? "",
288
+ ...e.label != null ? { label: e.label } : {},
289
+ ...e.disabled != null ? { disabled: e.disabled } : {},
290
+ ...e.readonly != null ? { readonly: e.readonly } : {},
291
+ ...e.validator != null ? { validator: T(e.validator, "string") } : {},
292
+ props: _(e)
293
+ })
294
+ });
295
+ y({
296
+ itemType: "PASSWORD",
297
+ entryShape: "keyed",
298
+ sensibleDefaults: {
299
+ base: { suppressAutomaticLabels: !1, suppressAutomaticPlaceholders: !1 },
300
+ fields: ["suppressAutomaticLabels", "suppressAutomaticPlaceholders"],
301
+ apply: (e, t) => N(w(e, t), t)
302
+ },
303
+ mapToWidget: (e) => ({
304
+ uid: e.uid ?? "",
305
+ kind: "input",
306
+ type: "password",
307
+ path: e.path ?? "",
308
+ ...e.label != null ? { label: e.label } : {},
309
+ ...e.disabled != null ? { disabled: e.disabled } : {},
310
+ ...e.readonly != null ? { readonly: e.readonly } : {},
311
+ ...e.validator != null ? { validator: T(e.validator, "string") } : {},
312
+ props: _(e)
313
+ })
314
+ });
315
+ y({
316
+ itemType: "CURRENCY",
317
+ entryShape: "keyed",
318
+ sensibleDefaults: {
319
+ base: { suppressAutomaticLabels: !1, suppressAutomaticPlaceholders: !1 },
320
+ fields: ["suppressAutomaticLabels", "suppressAutomaticPlaceholders"],
321
+ apply: (e, t) => N(w(e, t), t)
322
+ },
323
+ mapToWidget: (e) => ({
324
+ uid: e.uid ?? "",
325
+ kind: "input",
326
+ type: "currency",
327
+ path: e.path ?? "",
328
+ ...e.label != null ? { label: e.label } : {},
329
+ ...e.disabled != null ? { disabled: e.disabled } : {},
330
+ ...e.readonly != null ? { readonly: e.readonly } : {},
331
+ ...e.validator != null ? { validator: T(e.validator, "number") } : {},
332
+ props: _(e)
333
+ })
334
+ });
335
+ y({
336
+ itemType: "MARKDOWN",
337
+ entryShape: "keyed",
338
+ sensibleDefaults: {
339
+ base: { suppressAutomaticLabels: !1, suppressAutomaticPlaceholders: !1 },
340
+ fields: ["suppressAutomaticLabels", "suppressAutomaticPlaceholders"],
341
+ apply: (e, t) => N(w(e, t), t)
342
+ },
343
+ mapToWidget: (e) => ({
344
+ uid: e.uid ?? "",
345
+ kind: "input",
346
+ type: "markdown",
347
+ path: e.path ?? "",
348
+ ...e.label != null ? { label: e.label } : {},
349
+ ...e.disabled != null ? { disabled: e.disabled } : {},
350
+ ...e.readonly != null ? { readonly: e.readonly } : {},
351
+ ...e.validator != null ? { validator: T(e.validator, "string") } : {},
352
+ props: _(e)
353
+ })
354
+ });
355
+ y({
356
+ itemType: "LIST",
357
+ entryShape: "keyed",
358
+ sensibleDefaults: {
359
+ base: { suppressAutomaticLabels: !1 },
360
+ fields: ["suppressAutomaticLabels"],
361
+ apply: (e, t) => w(e, t)
362
+ },
363
+ mapToWidget: (e) => ({
364
+ uid: e.uid ?? "",
365
+ kind: "input",
366
+ type: "list",
367
+ path: e.path ?? "",
368
+ ...e.label != null ? { label: e.label } : {},
369
+ ...e.disabled != null ? { disabled: e.disabled } : {},
370
+ ...e.readonly != null ? { readonly: e.readonly } : {},
371
+ ...e.validator != null ? { validator: e.validator } : {},
372
+ props: _(e)
373
+ })
374
+ });
375
+ y({
376
+ itemType: "CALENDAR",
377
+ entryShape: "bare",
378
+ sensibleDefaults: {
379
+ base: { suppressAutomaticLabels: !1 },
380
+ fields: ["suppressAutomaticLabels"],
381
+ apply: (e, t) => w(e, t)
382
+ },
383
+ mapToWidget: (e) => ({
384
+ uid: e.uid ?? "",
385
+ kind: "input",
386
+ type: "calendar",
387
+ path: e.path ?? "",
388
+ ...e.label != null ? { label: e.label } : {},
389
+ ...e.disabled != null ? { disabled: e.disabled } : {},
390
+ ...e.readonly != null ? { readonly: e.readonly } : {},
391
+ ...e.validator != null ? { validator: T(e.validator, "string") } : {},
392
+ props: _(e)
393
+ })
394
+ });
395
+ y({
396
+ itemType: "DATE_INPUT",
397
+ entryShape: "keyed",
398
+ sensibleDefaults: {
399
+ base: { suppressAutomaticLabels: !1 },
400
+ fields: ["suppressAutomaticLabels"],
401
+ apply: (e, t) => w(e, t)
402
+ },
403
+ mapToWidget: (e) => ({
404
+ uid: e.uid ?? "",
405
+ kind: "input",
406
+ type: "dateInput",
407
+ path: e.path ?? "",
408
+ ...e.label != null ? { label: e.label } : {},
409
+ ...e.disabled != null ? { disabled: e.disabled } : {},
410
+ ...e.readonly != null ? { readonly: e.readonly } : {},
411
+ ...e.validator != null ? { validator: T(e.validator, "string") } : {},
412
+ props: _(e)
413
+ })
414
+ });
415
+ y({
416
+ itemType: "DATE_PICKER",
417
+ entryShape: "keyed",
418
+ sensibleDefaults: {
419
+ base: {
420
+ suppressAutomaticLabels: !1,
421
+ suppressAutomaticPlaceholders: !1
422
+ },
423
+ fields: ["suppressAutomaticLabels", "suppressAutomaticPlaceholders"],
424
+ apply: (e, t) => N(w(e, t), t)
425
+ },
426
+ mapToWidget: (e) => ({
427
+ uid: e.uid ?? "",
428
+ kind: "input",
429
+ type: "datePicker",
430
+ path: e.path ?? "",
431
+ ...e.label != null ? { label: e.label } : {},
432
+ ...e.disabled != null ? { disabled: e.disabled } : {},
433
+ ...e.readonly != null ? { readonly: e.readonly } : {},
434
+ ...e.validator != null ? { validator: T(e.validator, "string") } : {},
435
+ props: _(e)
436
+ })
437
+ });
438
+ y({
439
+ itemType: "RANGE_CALENDAR",
440
+ entryShape: "keyed",
441
+ sensibleDefaults: {
442
+ base: { suppressAutomaticLabels: !1 },
443
+ fields: ["suppressAutomaticLabels"],
444
+ apply: (e, t) => w(e, t)
445
+ },
446
+ mapToWidget: (e) => ({
447
+ uid: e.uid ?? "",
448
+ kind: "input",
449
+ type: "rangeCalendar",
450
+ path: e.path ?? "",
451
+ ...e.label != null ? { label: e.label } : {},
452
+ ...e.disabled != null ? { disabled: e.disabled } : {},
453
+ ...e.readonly != null ? { readonly: e.readonly } : {},
454
+ ...e.validator != null ? { validator: T(e.validator, "array") } : {},
455
+ props: _(e)
456
+ })
457
+ });
458
+ y({
459
+ itemType: "RANGE_DATE_INPUT",
460
+ entryShape: "keyed",
461
+ sensibleDefaults: {
462
+ base: { suppressAutomaticLabels: !1 },
463
+ fields: ["suppressAutomaticLabels"],
464
+ apply: (e, t) => w(e, t)
465
+ },
466
+ mapToWidget: (e) => ({
467
+ uid: e.uid ?? "",
468
+ kind: "input",
469
+ type: "rangeDateInput",
470
+ path: e.path ?? "",
471
+ ...e.label != null ? { label: e.label } : {},
472
+ ...e.disabled != null ? { disabled: e.disabled } : {},
473
+ ...e.readonly != null ? { readonly: e.readonly } : {},
474
+ ...e.validator != null ? { validator: T(e.validator, "array") } : {},
475
+ props: _(e)
476
+ })
477
+ });
478
+ y({
479
+ itemType: "RANGE_DATE_PICKER",
480
+ entryShape: "keyed",
481
+ sensibleDefaults: {
482
+ base: {
483
+ suppressAutomaticLabels: !1,
484
+ suppressAutomaticPlaceholders: !1
485
+ },
486
+ fields: ["suppressAutomaticLabels", "suppressAutomaticPlaceholders"],
487
+ apply: (e, t) => N(w(e, t), t)
488
+ },
489
+ mapToWidget: (e) => ({
641
490
  uid: e.uid ?? "",
642
491
  kind: "input",
643
- type: "textinput",
492
+ type: "rangeDatePicker",
644
493
  path: e.path ?? "",
645
494
  ...e.label != null ? { label: e.label } : {},
646
495
  ...e.disabled != null ? { disabled: e.disabled } : {},
647
496
  ...e.readonly != null ? { readonly: e.readonly } : {},
648
- props: {
649
- placeholder: t.placeholder ?? "",
650
- ...t
651
- },
652
- validator: O(e.validator, "string")
653
- };
497
+ ...e.validator != null ? { validator: T(e.validator, "array") } : {},
498
+ props: _(e)
499
+ })
500
+ });
501
+ function xt(e) {
502
+ const t = {};
503
+ return e.addLabel != null && (t.addLabel = e.addLabel), e.removeLabel != null && (t.removeLabel = e.removeLabel), e.limit != null && (t.limit = e.limit), e.title != null && (t.title = e.title), e.addButtonIcon != null && (t.addButtonIcon = e.addButtonIcon), e.removeButtonIcon != null && (t.removeButtonIcon = e.removeButtonIcon), t;
654
504
  }
655
- function sn(e) {
656
- const t = v(e);
505
+ function Ut(e) {
657
506
  return {
658
507
  uid: e.uid ?? "",
659
508
  kind: "input",
660
- type: "number",
509
+ type: "repeater",
661
510
  path: e.path ?? "",
662
511
  ...e.label != null ? { label: e.label } : {},
663
512
  ...e.disabled != null ? { disabled: e.disabled } : {},
664
513
  ...e.readonly != null ? { readonly: e.readonly } : {},
514
+ ...e.validator != null ? { validator: T(e.validator, "array") } : {},
665
515
  props: {
666
- placeholder: t.placeholder ?? "",
667
- ...t
668
- },
669
- validator: O(e.validator, "number")
516
+ ...xt(e),
517
+ template: { kind: "layout", type: "flex", children: [], props: { direction: "column" } }
518
+ }
670
519
  };
671
520
  }
672
- g({
673
- itemType: "INPUTS",
674
- entryShape: "keyed",
675
- sensibleDefaults: {
676
- base: {
677
- suppressAutomaticLabels: !1,
678
- suppressAutomaticPlaceholders: !1
679
- },
680
- fields: ["suppressAutomaticLabels", "suppressAutomaticPlaceholders"],
681
- apply: (e, t) => {
682
- let n = S(e, t);
683
- return n = N(n, t), n;
521
+ function le(e, t) {
522
+ for (const n of e) {
523
+ if (typeof n == "function") continue;
524
+ const r = n;
525
+ typeof r.path == "string" && r.path && (r.path = t + r.path), "children" in r && Array.isArray(r.children) && le(r.children, t);
526
+ const o = r.props;
527
+ o?.template?.children && Array.isArray(o.template.children) && le(o.template.children, t);
528
+ }
529
+ }
530
+ function Vt(e, t) {
531
+ const n = t.walkChildren(t.children ?? []), r = e.kind === "static" ? e.def.path ?? "" : e.fn({})?.path ?? "";
532
+ r && le(n, r + ".items.");
533
+ const o = {
534
+ kind: "layout",
535
+ type: "flex",
536
+ uid: "",
537
+ children: n,
538
+ props: { direction: "column" }
539
+ };
540
+ if (e.kind === "static") {
541
+ const i = t.mapStaticDef(e.def, "REPEATER");
542
+ return {
543
+ ...i,
544
+ props: { ...i.props, template: o }
545
+ };
546
+ }
547
+ const s = e.fn;
548
+ return ((i) => {
549
+ const a = s(i), u = t.mapStaticDef(a, "REPEATER");
550
+ return {
551
+ ...u,
552
+ props: { ...u.props, template: o }
553
+ };
554
+ });
555
+ }
556
+ function Jt(e) {
557
+ return {
558
+ baseDef: e.def,
559
+ path: e.key,
560
+ children: e.children
561
+ };
562
+ }
563
+ function Bt(e) {
564
+ return e.children;
565
+ }
566
+ const Yt = {
567
+ parseEntry: Jt,
568
+ rollUpSensibleDefaults: () => ({}),
569
+ applySensibleDefaults: (e) => e,
570
+ mapToWidget: Ut,
571
+ buildCustomWidget: Vt,
572
+ getChildren: Bt
573
+ };
574
+ Qe("REPEATER", Yt);
575
+ const tt = {
576
+ onLoad: "load",
577
+ onChange: "change",
578
+ onFilter: "filter",
579
+ onBlur: "blur"
580
+ }, Gt = Object.keys(tt);
581
+ class Kt {
582
+ // ── Action-specific: onClick ───────────────────────────────────
583
+ extractOnClickFromMergeResult(t, n, r) {
584
+ if (t.kind === "dynamic") {
585
+ const i = t.fn;
586
+ return { kind: "dynamic", fn: (u) => {
587
+ const c = i(u);
588
+ return this.wireOnClick(c, n, r);
589
+ } };
684
590
  }
685
- },
686
- mapToWidget: nn
687
- });
688
- function an(e) {
591
+ const o = t.def;
592
+ return { kind: "static", def: this.wireOnClick(o, n, r) };
593
+ }
594
+ wireOnClick(t, n, r) {
595
+ const o = r.next(), s = t.onClick;
596
+ if (typeof s == "function") {
597
+ const { onClick: i, ...a } = t, u = s(void 0);
598
+ return typeof u == "string" ? { ...a, uid: o, on: { click: u } } : (n.set(o, (c) => s(c.data)), { ...a, uid: o, on: { click: o } });
599
+ }
600
+ return { ...t, uid: o };
601
+ }
602
+ // ── Universal: onLoad, onChange, onFilter ──────────────────────
603
+ wireInputLayoutEvents(t, n, r) {
604
+ if (t.kind === "dynamic") {
605
+ const s = t.fn;
606
+ return { kind: "dynamic", fn: (a) => {
607
+ const u = s(a);
608
+ return this.wireEventProperties(u, n, r);
609
+ } };
610
+ }
611
+ return { kind: "static", def: this.wireEventProperties(t.def, n, r) };
612
+ }
613
+ wireEventProperties(t, n, r) {
614
+ const o = { ...t.on || {} };
615
+ let s = !1;
616
+ const i = { ...t };
617
+ for (const a of Gt) {
618
+ const u = t[a];
619
+ if (u == null) continue;
620
+ const c = tt[a];
621
+ if (typeof u == "function") {
622
+ const p = r.next();
623
+ n.set(p, u), o[c] = p, s = !0;
624
+ } else typeof u == "string" && (o[c] = u, s = !0);
625
+ delete i[a];
626
+ }
627
+ return s && (i.on = o), i;
628
+ }
629
+ }
630
+ const ye = new Kt();
631
+ function qt(e) {
689
632
  const {
690
633
  uid: t,
691
634
  label: n,
@@ -713,17 +656,17 @@ function an(e) {
713
656
  props: P
714
657
  };
715
658
  }
716
- g({
659
+ y({
717
660
  itemType: "ACTIONS",
718
661
  entryShape: "bare",
719
- mapToWidget: an,
662
+ mapToWidget: qt,
720
663
  afterMerge: (e, t) => ye.extractOnClickFromMergeResult(
721
664
  e,
722
665
  t.eventRegistry,
723
666
  t.eventIdGenerator
724
667
  )
725
668
  });
726
- function un(e) {
669
+ function Xt(e) {
727
670
  const {
728
671
  uid: t,
729
672
  widgetName: n,
@@ -745,7 +688,7 @@ function un(e) {
745
688
  children: []
746
689
  };
747
690
  }
748
- function cn(e, t) {
691
+ function Ht(e, t) {
749
692
  const n = t.walkChildren(t.children ?? []);
750
693
  if (e.kind === "static")
751
694
  return { ...t.mapStaticDef(e.def, "LAYOUTS"), children: n };
@@ -755,17 +698,17 @@ function cn(e, t) {
755
698
  return { ...t.mapStaticDef(s, "LAYOUTS"), children: n };
756
699
  });
757
700
  }
758
- function ln(e) {
701
+ function Qt(e) {
759
702
  return e.children;
760
703
  }
761
- g({
704
+ y({
762
705
  itemType: "LAYOUTS",
763
706
  entryShape: "compound",
764
- mapToWidget: un,
765
- buildCustomWidget: cn,
766
- getChildren: ln
707
+ mapToWidget: Xt,
708
+ buildCustomWidget: Ht,
709
+ getChildren: Qt
767
710
  });
768
- function pn(e) {
711
+ function en(e) {
769
712
  return {
770
713
  uid: "",
771
714
  kind: "display",
@@ -773,7 +716,7 @@ function pn(e) {
773
716
  props: { render: e.render }
774
717
  };
775
718
  }
776
- function dn(e, t) {
719
+ function tn(e, t) {
777
720
  if (e.kind === "static") {
778
721
  const r = e.def;
779
722
  return ((o) => ({
@@ -798,193 +741,38 @@ function dn(e, t) {
798
741
  };
799
742
  });
800
743
  }
801
- g({
744
+ y({
802
745
  itemType: "DISPLAYS",
803
746
  entryShape: "bare",
804
- mapToWidget: pn,
805
- buildCustomWidget: dn
747
+ mapToWidget: en,
748
+ buildCustomWidget: tn
806
749
  });
807
- g({
808
- itemType: "CALENDAR",
750
+ y({
751
+ itemType: "ALERTS",
809
752
  entryShape: "bare",
810
- sensibleDefaults: {
811
- base: { suppressAutomaticLabels: !1 },
812
- fields: ["suppressAutomaticLabels"],
813
- apply: (e, t) => S(e, t)
814
- },
815
- mapToWidget: (e) => ({
816
- uid: e.uid ?? "",
817
- kind: "input",
818
- type: "calendar",
819
- path: e.path ?? "",
820
- ...e.label != null ? { label: e.label } : {},
821
- ...e.disabled != null ? { disabled: e.disabled } : {},
822
- ...e.readonly != null ? { readonly: e.readonly } : {},
823
- ...e.validator != null ? { validator: O(e.validator, "string") } : {},
824
- props: v(e)
825
- })
826
- });
827
- g({
828
- itemType: "TEXTAREA",
829
- entryShape: "keyed",
830
- sensibleDefaults: {
831
- base: { suppressAutomaticLabels: !1, suppressAutomaticPlaceholders: !1 },
832
- fields: ["suppressAutomaticLabels", "suppressAutomaticPlaceholders"],
833
- apply: (e, t) => N(S(e, t), t)
834
- },
835
- mapToWidget: (e) => ({
836
- uid: e.uid ?? "",
837
- kind: "input",
838
- type: "textarea",
839
- path: e.path ?? "",
840
- ...e.label != null ? { label: e.label } : {},
841
- ...e.disabled != null ? { disabled: e.disabled } : {},
842
- ...e.readonly != null ? { readonly: e.readonly } : {},
843
- ...e.validator != null ? { validator: O(e.validator, "string") } : {},
844
- props: v(e)
845
- })
846
- });
847
- g({
848
- itemType: "PASSWORD",
849
- entryShape: "keyed",
850
- sensibleDefaults: {
851
- base: { suppressAutomaticLabels: !1, suppressAutomaticPlaceholders: !1 },
852
- fields: ["suppressAutomaticLabels", "suppressAutomaticPlaceholders"],
853
- apply: (e, t) => N(S(e, t), t)
854
- },
855
- mapToWidget: (e) => ({
856
- uid: e.uid ?? "",
857
- kind: "input",
858
- type: "password",
859
- path: e.path ?? "",
860
- ...e.label != null ? { label: e.label } : {},
861
- ...e.disabled != null ? { disabled: e.disabled } : {},
862
- ...e.readonly != null ? { readonly: e.readonly } : {},
863
- ...e.validator != null ? { validator: O(e.validator, "string") } : {},
864
- props: v(e)
865
- })
866
- });
867
- g({
868
- itemType: "CHECKBOX",
869
- entryShape: "keyed",
870
- sensibleDefaults: {
871
- base: { suppressAutomaticLabels: !1 },
872
- fields: ["suppressAutomaticLabels"],
873
- apply: (e, t) => S(e, t)
874
- },
875
- mapToWidget: (e) => ({
876
- uid: e.uid ?? "",
877
- kind: "input",
878
- type: "checkbox",
879
- path: e.path ?? "",
880
- ...e.label != null ? { label: e.label } : {},
881
- ...e.disabled != null ? { disabled: e.disabled } : {},
882
- ...e.readonly != null ? { readonly: e.readonly } : {},
883
- ...e.validator != null ? { validator: O(e.validator, "boolean") } : {},
884
- props: v(e)
885
- })
886
- });
887
- g({
888
- itemType: "DATE_INPUT",
889
- entryShape: "keyed",
890
- sensibleDefaults: {
891
- base: { suppressAutomaticLabels: !1 },
892
- fields: ["suppressAutomaticLabels"],
893
- apply: (e, t) => S(e, t)
894
- },
895
- mapToWidget: (e) => ({
896
- uid: e.uid ?? "",
897
- kind: "input",
898
- type: "dateInput",
899
- path: e.path ?? "",
900
- ...e.label != null ? { label: e.label } : {},
901
- ...e.disabled != null ? { disabled: e.disabled } : {},
902
- ...e.readonly != null ? { readonly: e.readonly } : {},
903
- ...e.validator != null ? { validator: O(e.validator, "string") } : {},
904
- props: v(e)
905
- })
906
- });
907
- g({
908
- itemType: "CURRENCY",
909
- entryShape: "keyed",
910
- sensibleDefaults: {
911
- base: { suppressAutomaticLabels: !1, suppressAutomaticPlaceholders: !1 },
912
- fields: ["suppressAutomaticLabels", "suppressAutomaticPlaceholders"],
913
- apply: (e, t) => N(S(e, t), t)
914
- },
915
- mapToWidget: (e) => ({
916
- uid: e.uid ?? "",
917
- kind: "input",
918
- type: "currency",
919
- path: e.path ?? "",
920
- ...e.label != null ? { label: e.label } : {},
921
- ...e.disabled != null ? { disabled: e.disabled } : {},
922
- ...e.readonly != null ? { readonly: e.readonly } : {},
923
- ...e.validator != null ? { validator: O(e.validator, "number") } : {},
924
- props: v(e)
925
- })
926
- });
927
- g({
928
- itemType: "RANGE_CALENDAR",
929
- entryShape: "keyed",
930
- sensibleDefaults: {
931
- base: { suppressAutomaticLabels: !1 },
932
- fields: ["suppressAutomaticLabels"],
933
- apply: (e, t) => S(e, t)
934
- },
935
- mapToWidget: (e) => ({
936
- uid: e.uid ?? "",
937
- kind: "input",
938
- type: "rangeCalendar",
939
- path: e.path ?? "",
940
- ...e.label != null ? { label: e.label } : {},
941
- ...e.disabled != null ? { disabled: e.disabled } : {},
942
- ...e.readonly != null ? { readonly: e.readonly } : {},
943
- ...e.validator != null ? { validator: O(e.validator, "array") } : {},
944
- props: v(e)
945
- })
946
- });
947
- g({
948
- itemType: "SELECT",
949
- entryShape: "keyed",
950
- sensibleDefaults: {
951
- base: { suppressAutomaticLabels: !1, suppressAutomaticPlaceholders: !1 },
952
- fields: ["suppressAutomaticLabels", "suppressAutomaticPlaceholders"],
953
- apply: (e, t) => N(S(e, t), t)
954
- },
955
753
  mapToWidget: (e) => ({
956
754
  uid: e.uid ?? "",
957
- kind: "input",
958
- type: "select",
959
- path: e.path ?? "",
960
- ...e.label != null ? { label: e.label } : {},
961
- ...e.disabled != null ? { disabled: e.disabled } : {},
962
- ...e.readonly != null ? { readonly: e.readonly } : {},
963
- ...e.validator != null ? { validator: e.validator } : {},
964
- props: v(e)
755
+ kind: "display",
756
+ type: "alert",
757
+ props: {
758
+ text: e.text,
759
+ ...e.level != null ? { level: e.level } : {}
760
+ }
965
761
  })
966
762
  });
967
- g({
968
- itemType: "RADIOGROUP",
969
- entryShape: "keyed",
970
- sensibleDefaults: {
971
- base: { suppressAutomaticLabels: !1 },
972
- fields: ["suppressAutomaticLabels"],
973
- apply: (e, t) => S(e, t)
974
- },
763
+ y({
764
+ itemType: "MARKDOWN_TEXTS",
765
+ entryShape: "bare",
975
766
  mapToWidget: (e) => ({
976
767
  uid: e.uid ?? "",
977
- kind: "input",
978
- type: "radiogroup",
979
- path: e.path ?? "",
980
- ...e.label != null ? { label: e.label } : {},
981
- ...e.disabled != null ? { disabled: e.disabled } : {},
982
- ...e.readonly != null ? { readonly: e.readonly } : {},
983
- ...e.validator != null ? { validator: e.validator } : {},
984
- props: v(e)
768
+ kind: "display",
769
+ type: "markdownText",
770
+ props: {
771
+ md: e.md
772
+ }
985
773
  })
986
774
  });
987
- function mn(e) {
775
+ function nn(e) {
988
776
  return {
989
777
  uid: e.uid ?? "",
990
778
  kind: "layout",
@@ -997,7 +785,7 @@ function mn(e) {
997
785
  children: []
998
786
  };
999
787
  }
1000
- function fn(e, t) {
788
+ function rn(e, t) {
1001
789
  const n = t.walkChildren(t.children ?? []);
1002
790
  if (e.kind === "static")
1003
791
  return { ...t.mapStaticDef(e.def, "TABS"), children: n };
@@ -1007,364 +795,609 @@ function fn(e, t) {
1007
795
  return { ...t.mapStaticDef(s, "TABS"), children: n };
1008
796
  });
1009
797
  }
1010
- function hn(e) {
798
+ function on(e) {
1011
799
  return e.children;
1012
800
  }
1013
- g({
801
+ y({
1014
802
  itemType: "TABS",
1015
803
  entryShape: "compound",
1016
- mapToWidget: mn,
1017
- buildCustomWidget: fn,
1018
- getChildren: hn
804
+ mapToWidget: nn,
805
+ buildCustomWidget: rn,
806
+ getChildren: on
1019
807
  });
1020
- g({
1021
- itemType: "LIST",
808
+ function sn(e) {
809
+ return {
810
+ uid: e.uid ?? "",
811
+ kind: "layout",
812
+ type: "accordion",
813
+ props: {
814
+ sections: e.sections,
815
+ renderMode: e.renderMode ?? "all",
816
+ ...e.singleOpen != null ? { singleOpen: e.singleOpen } : {},
817
+ ...e.defaultOpen != null ? { defaultOpen: e.defaultOpen } : {}
818
+ },
819
+ children: []
820
+ };
821
+ }
822
+ function an(e, t) {
823
+ const n = t.walkChildren(t.children ?? []);
824
+ if (e.kind === "static")
825
+ return { ...t.mapStaticDef(e.def, "ACCORDION"), children: n };
826
+ const r = e.fn;
827
+ return ((o) => {
828
+ const s = r(o);
829
+ return { ...t.mapStaticDef(s, "ACCORDION"), children: n };
830
+ });
831
+ }
832
+ function un(e) {
833
+ return e.children;
834
+ }
835
+ y({
836
+ itemType: "ACCORDION",
837
+ entryShape: "compound",
838
+ mapToWidget: sn,
839
+ buildCustomWidget: an,
840
+ getChildren: un
841
+ });
842
+ y({
843
+ itemType: "CUSTOM_INPUT",
1022
844
  entryShape: "keyed",
1023
845
  sensibleDefaults: {
1024
- base: { suppressAutomaticLabels: !1 },
846
+ base: {
847
+ suppressAutomaticLabels: !1
848
+ },
1025
849
  fields: ["suppressAutomaticLabels"],
1026
- apply: (e, t) => S(e, t)
850
+ apply: (e, t) => w(e, t)
1027
851
  },
1028
852
  mapToWidget: (e) => ({
1029
853
  uid: e.uid ?? "",
1030
854
  kind: "input",
1031
- type: "list",
855
+ type: e.customType,
1032
856
  path: e.path ?? "",
1033
857
  ...e.label != null ? { label: e.label } : {},
1034
858
  ...e.disabled != null ? { disabled: e.disabled } : {},
1035
859
  ...e.readonly != null ? { readonly: e.readonly } : {},
860
+ ...e.defaultValue != null ? { defaultValue: e.defaultValue } : {},
1036
861
  ...e.validator != null ? { validator: e.validator } : {},
1037
- props: v(e)
862
+ props: e.props ?? {}
1038
863
  })
1039
864
  });
1040
- g({
1041
- itemType: "ALERTS",
865
+ y({
866
+ itemType: "CUSTOM_ACTION",
867
+ entryShape: "bare",
868
+ mapToWidget: (e) => {
869
+ const {
870
+ uid: t,
871
+ label: n,
872
+ disabled: r,
873
+ on: o,
874
+ onClick: s,
875
+ data: i,
876
+ customType: a,
877
+ tags: u,
878
+ size: c,
879
+ include: p,
880
+ exclude: d,
881
+ states: m,
882
+ props: h,
883
+ ...P
884
+ } = e;
885
+ return {
886
+ uid: t ?? "",
887
+ kind: "action",
888
+ type: e.customType,
889
+ label: n,
890
+ disabled: r,
891
+ ...o != null ? { on: o } : {},
892
+ props: { ...h, ...P }
893
+ };
894
+ },
895
+ afterMerge: (e, t) => ye.extractOnClickFromMergeResult(
896
+ e,
897
+ t.eventRegistry,
898
+ t.eventIdGenerator
899
+ )
900
+ });
901
+ y({
902
+ itemType: "CUSTOM_DISPLAY",
1042
903
  entryShape: "bare",
1043
904
  mapToWidget: (e) => ({
1044
905
  uid: e.uid ?? "",
1045
906
  kind: "display",
1046
- type: "alert",
1047
- props: {
1048
- text: e.text,
1049
- ...e.level != null ? { level: e.level } : {}
1050
- }
907
+ type: e.customType,
908
+ props: e.props ?? {}
1051
909
  })
1052
910
  });
1053
- g({
1054
- itemType: "DATE_PICKER",
1055
- entryShape: "keyed",
1056
- sensibleDefaults: {
1057
- base: {
1058
- suppressAutomaticLabels: !1,
1059
- suppressAutomaticPlaceholders: !1
1060
- },
1061
- fields: ["suppressAutomaticLabels", "suppressAutomaticPlaceholders"],
1062
- apply: (e, t) => N(S(e, t), t)
1063
- },
1064
- mapToWidget: (e) => ({
911
+ function cn(e) {
912
+ return {
1065
913
  uid: e.uid ?? "",
1066
- kind: "input",
1067
- type: "datePicker",
1068
- path: e.path ?? "",
1069
- ...e.label != null ? { label: e.label } : {},
1070
- ...e.disabled != null ? { disabled: e.disabled } : {},
1071
- ...e.readonly != null ? { readonly: e.readonly } : {},
1072
- ...e.validator != null ? { validator: O(e.validator, "string") } : {},
1073
- props: v(e)
1074
- })
914
+ kind: "layout",
915
+ type: e.customType,
916
+ props: e.props ?? {},
917
+ children: []
918
+ };
919
+ }
920
+ function ln(e, t) {
921
+ const n = t.walkChildren(t.children ?? []);
922
+ if (e.kind === "static")
923
+ return { ...t.mapStaticDef(e.def, "CUSTOM_LAYOUT"), children: n };
924
+ const r = e.fn;
925
+ return ((o) => {
926
+ const s = r(o);
927
+ return { ...t.mapStaticDef(s, "CUSTOM_LAYOUT"), children: n };
928
+ });
929
+ }
930
+ function pn(e) {
931
+ return e.children;
932
+ }
933
+ y({
934
+ itemType: "CUSTOM_LAYOUT",
935
+ entryShape: "compound",
936
+ mapToWidget: cn,
937
+ buildCustomWidget: ln,
938
+ getChildren: pn
1075
939
  });
1076
- g({
1077
- itemType: "DROPDOWN",
940
+ y({
941
+ itemType: "TAGS",
1078
942
  entryShape: "keyed",
1079
943
  sensibleDefaults: {
1080
- base: {
1081
- suppressAutomaticLabels: !1,
1082
- suppressAutomaticPlaceholders: !1
1083
- },
944
+ base: { suppressAutomaticLabels: !1, suppressAutomaticPlaceholders: !1 },
1084
945
  fields: ["suppressAutomaticLabels", "suppressAutomaticPlaceholders"],
1085
- apply: (e, t) => N(S(e, t), t)
946
+ apply: (e, t) => N(w(e, t), t)
1086
947
  },
1087
948
  mapToWidget: (e) => ({
1088
949
  uid: e.uid ?? "",
1089
950
  kind: "input",
1090
- type: "dropdown",
951
+ type: "tags",
1091
952
  path: e.path ?? "",
1092
953
  ...e.label != null ? { label: e.label } : {},
1093
954
  ...e.disabled != null ? { disabled: e.disabled } : {},
1094
955
  ...e.readonly != null ? { readonly: e.readonly } : {},
1095
- ...e.validator != null ? { validator: e.validator } : {},
1096
- props: v(e)
956
+ ...e.validator != null ? { validator: T(e.validator, "array") } : {},
957
+ props: _(e)
1097
958
  })
1098
959
  });
1099
- function yn(e) {
1100
- return {
1101
- uid: e.uid ?? "",
1102
- kind: "layout",
1103
- type: "accordion",
1104
- props: {
1105
- sections: e.sections,
1106
- renderMode: e.renderMode ?? "all",
1107
- ...e.singleOpen != null ? { singleOpen: e.singleOpen } : {},
1108
- ...e.defaultOpen != null ? { defaultOpen: e.defaultOpen } : {}
1109
- },
1110
- children: []
1111
- };
960
+ const nt = {
961
+ INPUTS: /* @__PURE__ */ new Set([
962
+ "INPUTS",
963
+ "TEXTAREA",
964
+ "PASSWORD",
965
+ "SELECT",
966
+ "DROPDOWN",
967
+ "RADIOGROUP",
968
+ "CHECKBOX",
969
+ "CALENDAR",
970
+ "DATE_INPUT",
971
+ "DATE_PICKER",
972
+ "RANGE_CALENDAR",
973
+ "RANGE_DATE_INPUT",
974
+ "RANGE_DATE_PICKER",
975
+ "CURRENCY",
976
+ "MARKDOWN",
977
+ "LIST",
978
+ "CUSTOM_INPUT",
979
+ "REPEATER",
980
+ "TAGS"
981
+ ]),
982
+ ACTIONS: /* @__PURE__ */ new Set(["ACTIONS", "CUSTOM_ACTION"]),
983
+ DISPLAYS: /* @__PURE__ */ new Set(["DISPLAYS", "ALERTS", "MARKDOWN_TEXTS", "CUSTOM_DISPLAY"]),
984
+ LAYOUTS: /* @__PURE__ */ new Set(["LAYOUTS", "TABS", "ACCORDION", "CUSTOM_LAYOUT"])
985
+ };
986
+ function dn(e, t) {
987
+ const n = nt[e];
988
+ return n ? n.has(t) : e === t;
1112
989
  }
1113
- function gn(e, t) {
1114
- const n = t.walkChildren(t.children ?? []);
1115
- if (e.kind === "static")
1116
- return { ...t.mapStaticDef(e.def, "ACCORDION"), children: n };
1117
- const r = e.fn;
1118
- return ((o) => {
1119
- const s = r(o);
1120
- return { ...t.mapStaticDef(s, "ACCORDION"), children: n };
1121
- });
990
+ class mn {
991
+ resolve(t, n) {
992
+ const r = [];
993
+ for (const s of n)
994
+ s.kind === "aggregated" ? this.collectFromAggregated(s, t, r) : this.collectFromLeaf(s, t, r);
995
+ const o = this.rollUpSensibleDefaults(r);
996
+ return {
997
+ leafSelectors: r,
998
+ sensibleDefaults: o
999
+ };
1000
+ }
1001
+ collectFromAggregated(t, n, r) {
1002
+ if (t.matcher(n))
1003
+ for (const o of t.children)
1004
+ this.collectFromLeaf(o, n, r);
1005
+ }
1006
+ collectFromLeaf(t, n, r) {
1007
+ dn(t.selectorType, n.itemType ?? "") && t.matcher(n) && r.push(t);
1008
+ }
1009
+ rollUpSensibleDefaults(t) {
1010
+ const n = /* @__PURE__ */ new Map(), r = (s, i) => {
1011
+ const a = n.get(s) ?? [];
1012
+ a.push(i), n.set(s, a);
1013
+ };
1014
+ for (const s of t) {
1015
+ const i = nt[s.selectorType];
1016
+ if (i)
1017
+ for (const a of i) r(a, s);
1018
+ else
1019
+ r(s.selectorType, s);
1020
+ }
1021
+ const o = {};
1022
+ for (const [s, i] of n)
1023
+ et(s) && (o[s] = H(s).rollUpSensibleDefaults(i));
1024
+ return o;
1025
+ }
1026
+ }
1027
+ const fn = new mn();
1028
+ class hn {
1029
+ /**
1030
+ * Deep merges two objects, with right taking precedence over left when properties conflict.
1031
+ * Arrays are replaced, not merged.
1032
+ * @param left - The base object
1033
+ * @param right - The object whose properties take precedence
1034
+ * @returns A new merged object
1035
+ */
1036
+ deepMerge(t, n) {
1037
+ if (n == null)
1038
+ return t;
1039
+ if (t == null || typeof t != "object" || typeof n != "object" || Array.isArray(t) || Array.isArray(n))
1040
+ return n;
1041
+ const r = { ...t };
1042
+ for (const o in n)
1043
+ Object.prototype.hasOwnProperty.call(n, o) && (typeof n[o] == "object" && !Array.isArray(n[o]) && n[o] !== null && typeof t[o] == "object" && !Array.isArray(t[o]) && t[o] !== null ? r[o] = this.deepMerge(t[o], n[o]) : r[o] = n[o]);
1044
+ return r;
1045
+ }
1046
+ }
1047
+ const yn = new hn();
1048
+ class gn {
1049
+ constructor(t) {
1050
+ this.objectUtils = t;
1051
+ }
1052
+ merge(t, n, r) {
1053
+ let o = {}, s = null;
1054
+ typeof t == "function" && (s = t);
1055
+ const i = this.collectDecorators(r);
1056
+ for (const c of i) {
1057
+ if (s != null) {
1058
+ s = this.composeRuntimeFunctions(s, c);
1059
+ continue;
1060
+ }
1061
+ if (typeof c == "function") {
1062
+ const p = c({
1063
+ ...o,
1064
+ ...typeof t == "function" ? {} : t
1065
+ });
1066
+ if (typeof p == "function") {
1067
+ s = this.createPromotedFunction(
1068
+ o,
1069
+ t,
1070
+ p,
1071
+ n,
1072
+ r
1073
+ );
1074
+ continue;
1075
+ }
1076
+ o = this.objectUtils.deepMerge(o, p);
1077
+ } else
1078
+ o = this.objectUtils.deepMerge(o, c);
1079
+ }
1080
+ if (s != null)
1081
+ return {
1082
+ kind: "dynamic",
1083
+ fn: this.wrapWithSensibleDefaults(s, o, n, r)
1084
+ };
1085
+ const a = this.objectUtils.deepMerge(t, o);
1086
+ return { kind: "static", def: this.applySensibleDefaults({ ...a }, n, r) };
1087
+ }
1088
+ // ── Collect all decorators in priority order ──
1089
+ collectDecorators(t) {
1090
+ const n = [];
1091
+ for (const r of t.leafSelectors) {
1092
+ const o = r.config;
1093
+ o.override != null && n.push(o.override);
1094
+ }
1095
+ return n;
1096
+ }
1097
+ // ── Apply sensible defaults via registry ──
1098
+ applySensibleDefaults(t, n, r) {
1099
+ if (!et(n)) return t;
1100
+ const o = r.sensibleDefaults[n] ?? {};
1101
+ return H(n).applySensibleDefaults(t, o);
1102
+ }
1103
+ // ── Create promoted FunctionWidget ──
1104
+ createPromotedFunction(t, n, r, o, s) {
1105
+ return (i) => {
1106
+ const a = r(i);
1107
+ let u = this.objectUtils.deepMerge(t, a);
1108
+ return u = this.objectUtils.deepMerge(u, n), this.applySensibleDefaults(u, o, s);
1109
+ };
1110
+ }
1111
+ // ── Wrap runtime function with accumulated static decorators and sensible defaults ──
1112
+ wrapWithSensibleDefaults(t, n, r, o) {
1113
+ return (s) => {
1114
+ let i = t(s);
1115
+ return Object.keys(n).length > 0 && (i = this.objectUtils.deepMerge(n, i)), this.applySensibleDefaults(i, r, o);
1116
+ };
1117
+ }
1118
+ // ── Compose two runtime functions ──
1119
+ composeRuntimeFunctions(t, n) {
1120
+ return typeof n == "function" ? (r) => {
1121
+ const o = t(r), s = n(o);
1122
+ return typeof s == "function" ? s(r) : this.objectUtils.deepMerge(s, o);
1123
+ } : (r) => {
1124
+ const o = t(r);
1125
+ return this.objectUtils.deepMerge(o, n);
1126
+ };
1127
+ }
1122
1128
  }
1123
- function bn(e) {
1124
- return e.children;
1129
+ const bn = new gn(yn);
1130
+ class _n {
1131
+ mapToWidget(t, n) {
1132
+ if (t.kind === "dynamic") {
1133
+ const r = t.fn;
1134
+ return ((o) => {
1135
+ const s = r(o);
1136
+ return this.mapStaticDef(s, n);
1137
+ });
1138
+ }
1139
+ return this.mapStaticDef(t.def, n);
1140
+ }
1141
+ mapStaticDef(t, n) {
1142
+ const r = H(n).mapToWidget(t);
1143
+ return this.applyBaseWidgetFields(r, t);
1144
+ }
1145
+ /**
1146
+ * Injects BaseWidget-level fields that all widget types share.
1147
+ * Centralized here so individual mappers don't need to repeat the pattern.
1148
+ */
1149
+ applyBaseWidgetFields(t, n) {
1150
+ return n.size != null && (t.size = n.size), n.defaultValue != null && t.kind === "input" && (t.defaultValue = n.defaultValue), n.on != null && (t.on = n.on), n.include != null && (t.include = n.include), n.exclude != null && (t.exclude = n.exclude), t;
1151
+ }
1125
1152
  }
1126
- g({
1127
- itemType: "ACCORDION",
1128
- entryShape: "compound",
1129
- mapToWidget: yn,
1130
- buildCustomWidget: gn,
1131
- getChildren: bn
1132
- });
1133
- function _n(e) {
1134
- const t = {};
1135
- return e.addLabel != null && (t.addLabel = e.addLabel), e.removeLabel != null && (t.removeLabel = e.removeLabel), e.limit != null && (t.limit = e.limit), e.title != null && (t.title = e.title), e.addButtonIcon != null && (t.addButtonIcon = e.addButtonIcon), e.removeButtonIcon != null && (t.removeButtonIcon = e.removeButtonIcon), t;
1153
+ const vn = new _n();
1154
+ class wn {
1155
+ /**
1156
+ * Ensures the output is always a uniform GslSelector[] of aggregated selectors.
1157
+ *
1158
+ * Callers can pass flat leaf selectors (single styling rules) or pre-grouped
1159
+ * aggregated selectors. This method separates them into two buckets, then wraps
1160
+ * any bare leaves into a catch-all aggregated selector so downstream code only
1161
+ * deals with one shape.
1162
+ */
1163
+ normalizeSelectors(t) {
1164
+ const n = Array.isArray(t) ? t : [t], r = [], o = [];
1165
+ for (const s of n)
1166
+ s.kind === "leaf" ? o.push(s) : r.push(s);
1167
+ return o.length > 0 && r.unshift({
1168
+ kind: "aggregated",
1169
+ matcher: () => !0,
1170
+ children: o
1171
+ }), r;
1172
+ }
1173
+ extractFormConfig() {
1174
+ return {
1175
+ suppressAutomaticStack: !1
1176
+ };
1177
+ }
1136
1178
  }
1137
- function vn(e) {
1138
- return {
1139
- uid: e.uid ?? "",
1140
- kind: "input",
1141
- type: "repeater",
1142
- path: e.path ?? "",
1143
- ...e.label != null ? { label: e.label } : {},
1144
- ...e.disabled != null ? { disabled: e.disabled } : {},
1145
- ...e.readonly != null ? { readonly: e.readonly } : {},
1146
- ...e.validator != null ? { validator: O(e.validator, "array") } : {},
1147
- props: {
1148
- ..._n(e),
1149
- template: { kind: "layout", type: "flex", children: [], props: { direction: "column" } }
1179
+ const Sn = new wn(), kn = {
1180
+ input: /* @__PURE__ */ new Set(["disabled", "readonly", "label", "validator", "size"]),
1181
+ action: /* @__PURE__ */ new Set(["disabled", "label", "size"]),
1182
+ layout: /* @__PURE__ */ new Set(["size"]),
1183
+ display: /* @__PURE__ */ new Set([])
1184
+ }, Ae = {
1185
+ onChange: "change",
1186
+ onLoad: "load",
1187
+ onFilter: "filter",
1188
+ onClick: "click"
1189
+ };
1190
+ class Tn {
1191
+ /**
1192
+ * Extracts `states` from a merge result, combining with state-targeted
1193
+ * GSL leaf selectors from `_gslStates`.
1194
+ *
1195
+ * Returns a cleaned merge result (no states) and accumulated state data.
1196
+ */
1197
+ extractFromMergeResult(t, n) {
1198
+ const r = {};
1199
+ for (const a of n) {
1200
+ const u = a.targetState, c = a.config, p = c.override && typeof c.override != "function" ? c.override : c;
1201
+ r[u] = {
1202
+ ...r[u] || {},
1203
+ ...p
1204
+ };
1150
1205
  }
1151
- };
1206
+ if (t.kind === "dynamic") {
1207
+ const a = t.fn;
1208
+ return {
1209
+ cleanedResult: { kind: "dynamic", fn: (c) => {
1210
+ const p = a(c), { states: d, ...m } = p;
1211
+ return m;
1212
+ } },
1213
+ stateData: { stateOverrides: r }
1214
+ };
1215
+ }
1216
+ const { states: o, ...s } = t.def, i = {};
1217
+ for (const [a, u] of Object.entries(r))
1218
+ i[a] = { ...u };
1219
+ if (o)
1220
+ for (const [a, u] of Object.entries(
1221
+ o
1222
+ ))
1223
+ i[a] = { ...i[a] || {}, ...u };
1224
+ return {
1225
+ cleanedResult: { kind: "static", def: s },
1226
+ stateData: { stateOverrides: i }
1227
+ };
1228
+ }
1229
+ /**
1230
+ * Applies state overrides to a core widget. Each override produces:
1231
+ * - `visible: true/false` → `include: { in }` / `exclude: { from }`
1232
+ * - Core suffixable props → `'prop.stateName': value` at widget root
1233
+ * - Event handlers → `on: { 'eventType.stateName': eventId }` with registry wiring
1234
+ * - Custom props → `props: { 'prop.stateName': value }`
1235
+ */
1236
+ applyToWidget(t, n, r, o) {
1237
+ const { stateOverrides: s } = n;
1238
+ if (Object.keys(s).length === 0)
1239
+ return t;
1240
+ const i = { ...t }, a = t.kind, u = kn[a] || /* @__PURE__ */ new Set();
1241
+ t.props && (i.props = { ...t.props }), t.on && (i.on = { ...t.on });
1242
+ for (const [c, p] of Object.entries(s))
1243
+ for (const [d, m] of Object.entries(p))
1244
+ d === "visible" ? this.applyVisibility(i, c, m) : Ae[d] ? this.applyStateEvent(i, c, d, m, r, o) : u.has(d) ? i[`${d}.${c}`] = m : (i.props || (i.props = {}), i.props[`${d}.${c}`] = m);
1245
+ return i;
1246
+ }
1247
+ hasStateData(t) {
1248
+ return Object.keys(t.stateOverrides).length > 0;
1249
+ }
1250
+ // ── Visibility helpers ──
1251
+ applyVisibility(t, n, r) {
1252
+ if (r) {
1253
+ const o = t.include?.in || [];
1254
+ t.include = { ...t.include || {}, in: [...o, n] };
1255
+ } else {
1256
+ const o = t.exclude?.from || [];
1257
+ t.exclude = { ...t.exclude || {}, from: [...o, n] };
1258
+ }
1259
+ }
1260
+ // ── State-suffixed event helpers ──
1261
+ applyStateEvent(t, n, r, o, s, i) {
1262
+ const a = Ae[r];
1263
+ if (t.on || (t.on = {}), typeof o == "function") {
1264
+ const u = i.next();
1265
+ s.set(u, o), t.on[`${a}.${n}`] = u;
1266
+ } else typeof o == "string" && (t.on[`${a}.${n}`] = o);
1267
+ }
1152
1268
  }
1153
- function le(e, t) {
1154
- for (const n of e) {
1155
- if (typeof n == "function") continue;
1156
- const r = n;
1157
- typeof r.path == "string" && r.path && (r.path = t + r.path), "children" in r && Array.isArray(r.children) && le(r.children, t);
1158
- const o = r.props;
1159
- o?.template?.children && Array.isArray(o.template.children) && le(o.template.children, t);
1269
+ const zn = new Tn();
1270
+ function An() {
1271
+ let e = 0;
1272
+ return { next: () => `event_${e++}` };
1273
+ }
1274
+ class On {
1275
+ constructor(t, n, r, o, s) {
1276
+ this.resolver = t, this.merger = n, this.mapper = r, this.eventWiring = o, this.stateExpansion = s;
1277
+ }
1278
+ walkAndMap(t, n, r) {
1279
+ const o = /* @__PURE__ */ new Map(), s = An(), i = { value: 0 }, a = /* @__PURE__ */ new Set();
1280
+ return { widgets: this.walkItems(
1281
+ t,
1282
+ n,
1283
+ o,
1284
+ r,
1285
+ s,
1286
+ i,
1287
+ a
1288
+ ), eventRegistry: o };
1289
+ }
1290
+ walkItems(t, n, r, o, s, i, a) {
1291
+ return t.flatMap((u) => {
1292
+ if (u.type !== "ITEMS")
1293
+ throw new Error("Unexpected gui shortcut type");
1294
+ return u.items.map((c) => this.processItem(
1295
+ c,
1296
+ u.itemType,
1297
+ u.tags,
1298
+ n,
1299
+ r,
1300
+ o,
1301
+ s,
1302
+ i,
1303
+ a
1304
+ ));
1305
+ });
1160
1306
  }
1161
- }
1162
- function wn(e, t) {
1163
- const n = t.walkChildren(t.children ?? []), r = e.kind === "static" ? e.def.path ?? "" : e.fn({})?.path ?? "";
1164
- r && le(n, r + ".items.");
1165
- const o = {
1166
- kind: "layout",
1167
- type: "flex",
1168
- uid: "",
1169
- children: n,
1170
- props: { direction: "column" }
1171
- };
1172
- if (e.kind === "static") {
1173
- const i = t.mapStaticDef(e.def, "REPEATER");
1174
- return {
1175
- ...i,
1176
- props: { ...i.props, template: o }
1307
+ processItem(t, n, r, o, s, i, a, u, c) {
1308
+ const p = n, d = H(n), m = d.parseEntry(t), h = this.buildBaseDef(m), P = this.buildDecoratorForMatching(h, p, r), k = this.resolver.resolve(P, o), ke = k.leafSelectors.filter((z) => z.targetState != null), Te = {
1309
+ leafSelectors: k.leafSelectors.filter((z) => z.targetState == null),
1310
+ sensibleDefaults: k.sensibleDefaults
1177
1311
  };
1312
+ let L = this.merger.merge(h, p, Te);
1313
+ d.afterMerge && (L = d.afterMerge(L, {
1314
+ eventRegistry: s,
1315
+ formConfig: i,
1316
+ eventIdGenerator: a
1317
+ })), L = this.eventWiring.wireInputLayoutEvents(
1318
+ L,
1319
+ s,
1320
+ a
1321
+ );
1322
+ const { cleanedResult: ze, stateData: ue } = this.stateExpansion.extractFromMergeResult(
1323
+ L,
1324
+ ke
1325
+ );
1326
+ let C;
1327
+ if (d.buildCustomWidget) {
1328
+ const z = this.buildCustomWidgetContext(
1329
+ m.children,
1330
+ o,
1331
+ s,
1332
+ i,
1333
+ a,
1334
+ u,
1335
+ c
1336
+ );
1337
+ C = this.buildCustomWidget(d, ze, z);
1338
+ } else
1339
+ C = this.mapper.mapToWidget(ze, p);
1340
+ if (typeof C != "function") {
1341
+ const z = C;
1342
+ z.uid || (z.path && !c.has(z.path) ? (z.uid = z.path, c.add(z.path)) : z.uid = `dx_${u.value++}`);
1343
+ }
1344
+ if (this.stateExpansion.hasStateData(ue))
1345
+ if (typeof C == "function") {
1346
+ const z = C;
1347
+ C = ((Et) => {
1348
+ const $t = z(Et);
1349
+ return this.stateExpansion.applyToWidget(
1350
+ $t,
1351
+ ue,
1352
+ s,
1353
+ a
1354
+ );
1355
+ });
1356
+ } else
1357
+ C = this.stateExpansion.applyToWidget(
1358
+ C,
1359
+ ue,
1360
+ s,
1361
+ a
1362
+ );
1363
+ return C;
1178
1364
  }
1179
- const s = e.fn;
1180
- return ((i) => {
1181
- const a = s(i), u = t.mapStaticDef(a, "REPEATER");
1182
- return {
1183
- ...u,
1184
- props: { ...u.props, template: o }
1185
- };
1186
- });
1187
- }
1188
- function Sn(e) {
1189
- return {
1190
- baseDef: e.def,
1191
- path: e.key,
1192
- children: e.children
1193
- };
1194
- }
1195
- function kn(e) {
1196
- return e.children;
1197
- }
1198
- const Tn = {
1199
- parseEntry: Sn,
1200
- rollUpSensibleDefaults: () => ({}),
1201
- applySensibleDefaults: (e) => e,
1202
- mapToWidget: vn,
1203
- buildCustomWidget: wn,
1204
- getChildren: kn
1205
- };
1206
- Qe("REPEATER", Tn);
1207
- g({
1208
- itemType: "MARKDOWN",
1209
- entryShape: "keyed",
1210
- sensibleDefaults: {
1211
- base: { suppressAutomaticLabels: !1, suppressAutomaticPlaceholders: !1 },
1212
- fields: ["suppressAutomaticLabels", "suppressAutomaticPlaceholders"],
1213
- apply: (e, t) => N(S(e, t), t)
1214
- },
1215
- mapToWidget: (e) => ({
1216
- uid: e.uid ?? "",
1217
- kind: "input",
1218
- type: "markdown",
1219
- path: e.path ?? "",
1220
- ...e.label != null ? { label: e.label } : {},
1221
- ...e.disabled != null ? { disabled: e.disabled } : {},
1222
- ...e.readonly != null ? { readonly: e.readonly } : {},
1223
- ...e.validator != null ? { validator: O(e.validator, "string") } : {},
1224
- props: v(e)
1225
- })
1226
- });
1227
- g({
1228
- itemType: "RANGE_DATE_INPUT",
1229
- entryShape: "keyed",
1230
- sensibleDefaults: {
1231
- base: { suppressAutomaticLabels: !1 },
1232
- fields: ["suppressAutomaticLabels"],
1233
- apply: (e, t) => S(e, t)
1234
- },
1235
- mapToWidget: (e) => ({
1236
- uid: e.uid ?? "",
1237
- kind: "input",
1238
- type: "rangeDateInput",
1239
- path: e.path ?? "",
1240
- ...e.label != null ? { label: e.label } : {},
1241
- ...e.disabled != null ? { disabled: e.disabled } : {},
1242
- ...e.readonly != null ? { readonly: e.readonly } : {},
1243
- ...e.validator != null ? { validator: O(e.validator, "array") } : {},
1244
- props: v(e)
1245
- })
1246
- });
1247
- g({
1248
- itemType: "RANGE_DATE_PICKER",
1249
- entryShape: "keyed",
1250
- sensibleDefaults: {
1251
- base: {
1252
- suppressAutomaticLabels: !1,
1253
- suppressAutomaticPlaceholders: !1
1254
- },
1255
- fields: ["suppressAutomaticLabels", "suppressAutomaticPlaceholders"],
1256
- apply: (e, t) => N(S(e, t), t)
1257
- },
1258
- mapToWidget: (e) => ({
1259
- uid: e.uid ?? "",
1260
- kind: "input",
1261
- type: "rangeDatePicker",
1262
- path: e.path ?? "",
1263
- ...e.label != null ? { label: e.label } : {},
1264
- ...e.disabled != null ? { disabled: e.disabled } : {},
1265
- ...e.readonly != null ? { readonly: e.readonly } : {},
1266
- ...e.validator != null ? { validator: O(e.validator, "array") } : {},
1267
- props: v(e)
1268
- })
1269
- });
1270
- g({
1271
- itemType: "CUSTOM_DISPLAY",
1272
- entryShape: "bare",
1273
- mapToWidget: (e) => ({
1274
- uid: e.uid ?? "",
1275
- kind: "display",
1276
- type: e.customType,
1277
- props: e.props ?? {}
1278
- })
1279
- });
1280
- g({
1281
- itemType: "CUSTOM_INPUT",
1282
- entryShape: "keyed",
1283
- sensibleDefaults: {
1284
- base: {
1285
- suppressAutomaticLabels: !1
1286
- },
1287
- fields: ["suppressAutomaticLabels"],
1288
- apply: (e, t) => S(e, t)
1289
- },
1290
- mapToWidget: (e) => ({
1291
- uid: e.uid ?? "",
1292
- kind: "input",
1293
- type: e.customType,
1294
- path: e.path ?? "",
1295
- ...e.label != null ? { label: e.label } : {},
1296
- ...e.disabled != null ? { disabled: e.disabled } : {},
1297
- ...e.readonly != null ? { readonly: e.readonly } : {},
1298
- ...e.defaultValue != null ? { defaultValue: e.defaultValue } : {},
1299
- ...e.validator != null ? { validator: e.validator } : {},
1300
- props: e.props ?? {}
1301
- })
1302
- });
1303
- g({
1304
- itemType: "CUSTOM_ACTION",
1305
- entryShape: "bare",
1306
- mapToWidget: (e) => {
1307
- const {
1308
- uid: t,
1309
- label: n,
1310
- disabled: r,
1311
- on: o,
1312
- onClick: s,
1313
- data: i,
1314
- customType: a,
1315
- tags: u,
1316
- size: c,
1317
- include: p,
1318
- exclude: d,
1319
- states: m,
1320
- props: h,
1321
- ...P
1322
- } = e;
1365
+ buildCustomWidgetContext(t, n, r, o, s, i, a) {
1323
1366
  return {
1324
- uid: t ?? "",
1325
- kind: "action",
1326
- type: e.customType,
1327
- label: n,
1328
- disabled: r,
1329
- ...o != null ? { on: o } : {},
1330
- props: { ...h, ...P }
1367
+ children: t,
1368
+ mapStaticDef: (u, c) => this.mapper.mapStaticDef(u, c),
1369
+ walkChildren: (u) => this.walkItems(
1370
+ u,
1371
+ n,
1372
+ r,
1373
+ o,
1374
+ s,
1375
+ i,
1376
+ a
1377
+ )
1331
1378
  };
1332
- },
1333
- afterMerge: (e, t) => ye.extractOnClickFromMergeResult(
1334
- e,
1335
- t.eventRegistry,
1336
- t.eventIdGenerator
1337
- )
1338
- });
1339
- function zn(e) {
1340
- return {
1341
- uid: e.uid ?? "",
1342
- kind: "layout",
1343
- type: e.customType,
1344
- props: e.props ?? {},
1345
- children: []
1346
- };
1347
- }
1348
- function An(e, t) {
1349
- const n = t.walkChildren(t.children ?? []);
1350
- if (e.kind === "static")
1351
- return { ...t.mapStaticDef(e.def, "CUSTOM_LAYOUT"), children: n };
1352
- const r = e.fn;
1353
- return ((o) => {
1354
- const s = r(o);
1355
- return { ...t.mapStaticDef(s, "CUSTOM_LAYOUT"), children: n };
1356
- });
1357
- }
1358
- function On(e) {
1359
- return e.children;
1379
+ }
1380
+ buildCustomWidget(t, n, r) {
1381
+ return t.buildCustomWidget(n, r);
1382
+ }
1383
+ /**
1384
+ * Resolves the base definition from a parsed entry, injecting the path for keyed entries.
1385
+ * For runtime (function) providers, wraps them to inject the path at evaluation time.
1386
+ */
1387
+ buildBaseDef(t) {
1388
+ const n = t.baseDef;
1389
+ return typeof n == "function" ? (r) => {
1390
+ const s = n(r ?? {});
1391
+ return t.path != null ? { ...s, path: t.path } : s;
1392
+ } : t.path != null ? { ...n, path: t.path } : n;
1393
+ }
1394
+ buildDecoratorForMatching(t, n, r) {
1395
+ if (typeof t == "function")
1396
+ return { itemType: n, tags: [...r] };
1397
+ const o = [...r, ..."tags" in t && t.tags ? t.tags : []], s = "uid" in t ? t.uid : void 0, i = "type" in t ? t.type : void 0;
1398
+ return { itemType: n, tags: o, uid: s, type: i };
1399
+ }
1360
1400
  }
1361
- g({
1362
- itemType: "CUSTOM_LAYOUT",
1363
- entryShape: "compound",
1364
- mapToWidget: zn,
1365
- buildCustomWidget: An,
1366
- getChildren: On
1367
- });
1368
1401
  class En {
1369
1402
  constructor(t, n) {
1370
1403
  this.selectorNormalizer = t, this.walker = n;
@@ -1393,7 +1426,7 @@ class En {
1393
1426
  */
1394
1427
  prepareForm(t, n, r) {
1395
1428
  const s = (Array.isArray(t) ? [...t] : [t]).map(
1396
- (u) => typeof u == "function" ? Dt(u) : u
1429
+ (u) => typeof u == "function" ? Mt(u) : u
1397
1430
  ), i = this.selectorNormalizer.normalizeSelectors(n), a = {
1398
1431
  ...this.selectorNormalizer.extractFormConfig(),
1399
1432
  ...r
@@ -1450,13 +1483,13 @@ class En {
1450
1483
  }), r.dependencies && (o.dependencies = r.dependencies), r.widgetLoaders && (o.widgetLoaders = r.widgetLoaders), r.validateOn && (o.validateOn = r.validateOn), r.itemRenderers && (o.itemRenderers = r.itemRenderers), o;
1451
1484
  }
1452
1485
  }
1453
- const $n = new tn(
1454
- jt,
1455
- Vt,
1456
- Bt,
1486
+ const $n = new On(
1487
+ fn,
1488
+ bn,
1489
+ vn,
1457
1490
  ye,
1458
- Qt
1459
- ), Pn = new En(Gt, $n);
1491
+ zn
1492
+ ), Pn = new En(Sn, $n);
1460
1493
  function Zn(e) {
1461
1494
  return typeof e == "function" ? !0 : Array.isArray(e) ? e.length === 0 || e.every(Oe) : Oe(e);
1462
1495
  }
@@ -1539,7 +1572,7 @@ class rt extends Error {
1539
1572
  }
1540
1573
  }
1541
1574
  const Nn = {};
1542
- function L(e) {
1575
+ function M(e) {
1543
1576
  return Nn;
1544
1577
  }
1545
1578
  function pe(e, t) {
@@ -1553,7 +1586,7 @@ function be(e) {
1553
1586
  return e.slice(t, n);
1554
1587
  }
1555
1588
  const Pe = Symbol("evaluating");
1556
- function y(e, t, n) {
1589
+ function g(e, t, n) {
1557
1590
  let r;
1558
1591
  Object.defineProperty(e, t, {
1559
1592
  get() {
@@ -1569,7 +1602,7 @@ function y(e, t, n) {
1569
1602
  configurable: !0
1570
1603
  });
1571
1604
  }
1572
- function Mn(...e) {
1605
+ function Ln(...e) {
1573
1606
  const t = {};
1574
1607
  for (const n of e) {
1575
1608
  const r = Object.getOwnPropertyDescriptors(n);
@@ -1577,7 +1610,7 @@ function Mn(...e) {
1577
1610
  }
1578
1611
  return Object.defineProperties({}, t);
1579
1612
  }
1580
- function Ln(e) {
1613
+ function Mn(e) {
1581
1614
  return e.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
1582
1615
  }
1583
1616
  const ot = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
@@ -1705,7 +1738,7 @@ const ee = (e) => (t, n, r, o) => {
1705
1738
  if (i instanceof Promise)
1706
1739
  throw new j();
1707
1740
  if (i.issues.length) {
1708
- const a = new (o?.Err ?? e)(i.issues.map((u) => D(u, s, L())));
1741
+ const a = new (o?.Err ?? e)(i.issues.map((u) => D(u, s, M())));
1709
1742
  throw ot(a, o?.callee), a;
1710
1743
  }
1711
1744
  return i.value;
@@ -1713,7 +1746,7 @@ const ee = (e) => (t, n, r, o) => {
1713
1746
  const s = r ? Object.assign(r, { async: !0 }) : { async: !0 };
1714
1747
  let i = t._zod.run({ value: n, issues: [] }, s);
1715
1748
  if (i instanceof Promise && (i = await i), i.issues.length) {
1716
- const a = new (o?.Err ?? e)(i.issues.map((u) => D(u, s, L())));
1749
+ const a = new (o?.Err ?? e)(i.issues.map((u) => D(u, s, M())));
1717
1750
  throw ot(a, o?.callee), a;
1718
1751
  }
1719
1752
  return i.value;
@@ -1723,14 +1756,14 @@ const ee = (e) => (t, n, r, o) => {
1723
1756
  throw new j();
1724
1757
  return s.issues.length ? {
1725
1758
  success: !1,
1726
- error: new (e ?? ut)(s.issues.map((i) => D(i, o, L())))
1759
+ error: new (e ?? ut)(s.issues.map((i) => D(i, o, M())))
1727
1760
  } : { success: !0, data: s.value };
1728
1761
  }, ct = /* @__PURE__ */ ne(Q), re = (e) => async (t, n, r) => {
1729
1762
  const o = r ? Object.assign(r, { async: !0 }) : { async: !0 };
1730
1763
  let s = t._zod.run({ value: n, issues: [] }, o);
1731
1764
  return s instanceof Promise && (s = await s), s.issues.length ? {
1732
1765
  success: !1,
1733
- error: new e(s.issues.map((i) => D(i, o, L())))
1766
+ error: new e(s.issues.map((i) => D(i, o, M())))
1734
1767
  } : { success: !0, data: s.value };
1735
1768
  }, lt = /* @__PURE__ */ re(Q), Un = (e) => (t, n, r) => {
1736
1769
  const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
@@ -2024,7 +2057,7 @@ const sr = (e) => {
2024
2057
  major: 4,
2025
2058
  minor: 3,
2026
2059
  patch: 6
2027
- }, _ = /* @__PURE__ */ l("$ZodType", (e, t) => {
2060
+ }, v = /* @__PURE__ */ l("$ZodType", (e, t) => {
2028
2061
  var n;
2029
2062
  e ?? (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = Tr;
2030
2063
  const r = [...e._zod.def.checks ?? []];
@@ -2086,7 +2119,7 @@ const sr = (e) => {
2086
2119
  return o(u, r, a);
2087
2120
  };
2088
2121
  }
2089
- y(e, "~standard", () => ({
2122
+ g(e, "~standard", () => ({
2090
2123
  validate: (o) => {
2091
2124
  try {
2092
2125
  const s = ct(e, o);
@@ -2099,7 +2132,7 @@ const sr = (e) => {
2099
2132
  version: 1
2100
2133
  }));
2101
2134
  }), we = /* @__PURE__ */ l("$ZodString", (e, t) => {
2102
- _.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? sr(e._zod.bag), e._zod.parse = (n, r) => {
2135
+ v.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? sr(e._zod.bag), e._zod.parse = (n, r) => {
2103
2136
  if (t.coerce)
2104
2137
  try {
2105
2138
  n.value = String(n.value);
@@ -2201,7 +2234,7 @@ const sr = (e) => {
2201
2234
  });
2202
2235
  };
2203
2236
  }), ft = /* @__PURE__ */ l("$ZodNumber", (e, t) => {
2204
- _.init(e, t), e._zod.pattern = e._zod.bag.pattern ?? ar, e._zod.parse = (n, r) => {
2237
+ v.init(e, t), e._zod.pattern = e._zod.bag.pattern ?? ar, e._zod.parse = (n, r) => {
2205
2238
  if (t.coerce)
2206
2239
  try {
2207
2240
  n.value = Number(n.value);
@@ -2219,10 +2252,10 @@ const sr = (e) => {
2219
2252
  ...s ? { received: s } : {}
2220
2253
  }), n;
2221
2254
  };
2222
- }), Mr = /* @__PURE__ */ l("$ZodNumberFormat", (e, t) => {
2255
+ }), Lr = /* @__PURE__ */ l("$ZodNumberFormat", (e, t) => {
2223
2256
  mr.init(e, t), ft.init(e, t);
2224
- }), Lr = /* @__PURE__ */ l("$ZodBoolean", (e, t) => {
2225
- _.init(e, t), e._zod.pattern = ur, e._zod.parse = (n, r) => {
2257
+ }), Mr = /* @__PURE__ */ l("$ZodBoolean", (e, t) => {
2258
+ v.init(e, t), e._zod.pattern = ur, e._zod.parse = (n, r) => {
2226
2259
  if (t.coerce)
2227
2260
  try {
2228
2261
  n.value = !!n.value;
@@ -2237,13 +2270,13 @@ const sr = (e) => {
2237
2270
  }), n;
2238
2271
  };
2239
2272
  }), Dr = /* @__PURE__ */ l("$ZodAny", (e, t) => {
2240
- _.init(e, t), e._zod.parse = (n) => n;
2273
+ v.init(e, t), e._zod.parse = (n) => n;
2241
2274
  });
2242
2275
  function Ce(e, t, n) {
2243
2276
  e.issues.length && t.issues.push(...Rn(n, e.issues)), t.value[n] = e.value;
2244
2277
  }
2245
2278
  const ht = /* @__PURE__ */ l("$ZodArray", (e, t) => {
2246
- _.init(e, t), e._zod.parse = (n, r) => {
2279
+ v.init(e, t), e._zod.parse = (n, r) => {
2247
2280
  const o = n.value;
2248
2281
  if (!Array.isArray(o))
2249
2282
  return n.issues.push({
@@ -2273,14 +2306,14 @@ function Ne(e, t, n, r) {
2273
2306
  code: "invalid_union",
2274
2307
  input: t.value,
2275
2308
  inst: n,
2276
- errors: e.map((s) => s.issues.map((i) => D(i, r, L())))
2309
+ errors: e.map((s) => s.issues.map((i) => D(i, r, M())))
2277
2310
  }), t);
2278
2311
  }
2279
2312
  const Rr = /* @__PURE__ */ l("$ZodUnion", (e, t) => {
2280
- _.init(e, t), y(e._zod, "optin", () => t.options.some((o) => o._zod.optin === "optional") ? "optional" : void 0), y(e._zod, "optout", () => t.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0), y(e._zod, "values", () => {
2313
+ v.init(e, t), g(e._zod, "optin", () => t.options.some((o) => o._zod.optin === "optional") ? "optional" : void 0), g(e._zod, "optout", () => t.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0), g(e._zod, "values", () => {
2281
2314
  if (t.options.every((o) => o._zod.values))
2282
2315
  return new Set(t.options.flatMap((o) => Array.from(o._zod.values)));
2283
- }), y(e._zod, "pattern", () => {
2316
+ }), g(e._zod, "pattern", () => {
2284
2317
  if (t.options.every((o) => o._zod.pattern)) {
2285
2318
  const o = t.options.map((s) => s._zod.pattern);
2286
2319
  return new RegExp(`^(${o.map((s) => be(s.source)).join("|")})$`);
@@ -2308,9 +2341,9 @@ const Rr = /* @__PURE__ */ l("$ZodUnion", (e, t) => {
2308
2341
  return i ? Promise.all(a).then((u) => Ne(u, o, e, s)) : Ne(a, o, e, s);
2309
2342
  };
2310
2343
  }), Fr = /* @__PURE__ */ l("$ZodIntersection", (e, t) => {
2311
- _.init(e, t), e._zod.parse = (n, r) => {
2344
+ v.init(e, t), e._zod.parse = (n, r) => {
2312
2345
  const o = n.value, s = t.left._zod.run({ value: o, issues: [] }, r), i = t.right._zod.run({ value: o, issues: [] }, r);
2313
- return s instanceof Promise || i instanceof Promise ? Promise.all([s, i]).then(([u, c]) => Me(n, u, c)) : Me(n, s, i);
2346
+ return s instanceof Promise || i instanceof Promise ? Promise.all([s, i]).then(([u, c]) => Le(n, u, c)) : Le(n, s, i);
2314
2347
  };
2315
2348
  });
2316
2349
  function me(e, t) {
@@ -2348,7 +2381,7 @@ function me(e, t) {
2348
2381
  }
2349
2382
  return { valid: !1, mergeErrorPath: [] };
2350
2383
  }
2351
- function Me(e, t, n) {
2384
+ function Le(e, t, n) {
2352
2385
  const r = /* @__PURE__ */ new Map();
2353
2386
  let o;
2354
2387
  for (const a of t.issues)
@@ -2373,7 +2406,7 @@ function Me(e, t, n) {
2373
2406
  return e.value = i.data, e;
2374
2407
  }
2375
2408
  const jr = /* @__PURE__ */ l("$ZodTransform", (e, t) => {
2376
- _.init(e, t), e._zod.parse = (n, r) => {
2409
+ v.init(e, t), e._zod.parse = (n, r) => {
2377
2410
  if (r.direction === "backward")
2378
2411
  throw new rt(e.constructor.name);
2379
2412
  const o = t.transform(n.value, n);
@@ -2384,29 +2417,29 @@ const jr = /* @__PURE__ */ l("$ZodTransform", (e, t) => {
2384
2417
  return n.value = o, n;
2385
2418
  };
2386
2419
  });
2387
- function Le(e, t) {
2420
+ function Me(e, t) {
2388
2421
  return e.issues.length && t === void 0 ? { issues: [], value: void 0 } : e;
2389
2422
  }
2390
2423
  const Se = /* @__PURE__ */ l("$ZodOptional", (e, t) => {
2391
- _.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional", y(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, void 0]) : void 0), y(e._zod, "pattern", () => {
2424
+ v.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional", g(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, void 0]) : void 0), g(e._zod, "pattern", () => {
2392
2425
  const n = t.innerType._zod.pattern;
2393
2426
  return n ? new RegExp(`^(${be(n.source)})?$`) : void 0;
2394
2427
  }), e._zod.parse = (n, r) => {
2395
2428
  if (t.innerType._zod.optin === "optional") {
2396
2429
  const o = t.innerType._zod.run(n, r);
2397
- return o instanceof Promise ? o.then((s) => Le(s, n.value)) : Le(o, n.value);
2430
+ return o instanceof Promise ? o.then((s) => Me(s, n.value)) : Me(o, n.value);
2398
2431
  }
2399
2432
  return n.value === void 0 ? n : t.innerType._zod.run(n, r);
2400
2433
  };
2401
2434
  }), Wr = /* @__PURE__ */ l("$ZodExactOptional", (e, t) => {
2402
- Se.init(e, t), y(e._zod, "values", () => t.innerType._zod.values), y(e._zod, "pattern", () => t.innerType._zod.pattern), e._zod.parse = (n, r) => t.innerType._zod.run(n, r);
2435
+ Se.init(e, t), g(e._zod, "values", () => t.innerType._zod.values), g(e._zod, "pattern", () => t.innerType._zod.pattern), e._zod.parse = (n, r) => t.innerType._zod.run(n, r);
2403
2436
  }), xr = /* @__PURE__ */ l("$ZodNullable", (e, t) => {
2404
- _.init(e, t), y(e._zod, "optin", () => t.innerType._zod.optin), y(e._zod, "optout", () => t.innerType._zod.optout), y(e._zod, "pattern", () => {
2437
+ v.init(e, t), g(e._zod, "optin", () => t.innerType._zod.optin), g(e._zod, "optout", () => t.innerType._zod.optout), g(e._zod, "pattern", () => {
2405
2438
  const n = t.innerType._zod.pattern;
2406
2439
  return n ? new RegExp(`^(${be(n.source)}|null)$`) : void 0;
2407
- }), y(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, null]) : void 0), e._zod.parse = (n, r) => n.value === null ? n : t.innerType._zod.run(n, r);
2440
+ }), g(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, null]) : void 0), e._zod.parse = (n, r) => n.value === null ? n : t.innerType._zod.run(n, r);
2408
2441
  }), Ur = /* @__PURE__ */ l("$ZodDefault", (e, t) => {
2409
- _.init(e, t), e._zod.optin = "optional", y(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
2442
+ v.init(e, t), e._zod.optin = "optional", g(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
2410
2443
  if (r.direction === "backward")
2411
2444
  return t.innerType._zod.run(n, r);
2412
2445
  if (n.value === void 0)
@@ -2419,9 +2452,9 @@ function De(e, t) {
2419
2452
  return e.value === void 0 && (e.value = t.defaultValue), e;
2420
2453
  }
2421
2454
  const Vr = /* @__PURE__ */ l("$ZodPrefault", (e, t) => {
2422
- _.init(e, t), e._zod.optin = "optional", y(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => (r.direction === "backward" || n.value === void 0 && (n.value = t.defaultValue), t.innerType._zod.run(n, r));
2455
+ v.init(e, t), e._zod.optin = "optional", g(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => (r.direction === "backward" || n.value === void 0 && (n.value = t.defaultValue), t.innerType._zod.run(n, r));
2423
2456
  }), Jr = /* @__PURE__ */ l("$ZodNonOptional", (e, t) => {
2424
- _.init(e, t), y(e._zod, "values", () => {
2457
+ v.init(e, t), g(e._zod, "values", () => {
2425
2458
  const n = t.innerType._zod.values;
2426
2459
  return n ? new Set([...n].filter((r) => r !== void 0)) : void 0;
2427
2460
  }), e._zod.parse = (n, r) => {
@@ -2438,26 +2471,26 @@ function Re(e, t) {
2438
2471
  }), e;
2439
2472
  }
2440
2473
  const Br = /* @__PURE__ */ l("$ZodCatch", (e, t) => {
2441
- _.init(e, t), y(e._zod, "optin", () => t.innerType._zod.optin), y(e._zod, "optout", () => t.innerType._zod.optout), y(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
2474
+ v.init(e, t), g(e._zod, "optin", () => t.innerType._zod.optin), g(e._zod, "optout", () => t.innerType._zod.optout), g(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
2442
2475
  if (r.direction === "backward")
2443
2476
  return t.innerType._zod.run(n, r);
2444
2477
  const o = t.innerType._zod.run(n, r);
2445
2478
  return o instanceof Promise ? o.then((s) => (n.value = s.value, s.issues.length && (n.value = t.catchValue({
2446
2479
  ...n,
2447
2480
  error: {
2448
- issues: s.issues.map((i) => D(i, r, L()))
2481
+ issues: s.issues.map((i) => D(i, r, M()))
2449
2482
  },
2450
2483
  input: n.value
2451
2484
  }), n.issues = []), n)) : (n.value = o.value, o.issues.length && (n.value = t.catchValue({
2452
2485
  ...n,
2453
2486
  error: {
2454
- issues: o.issues.map((s) => D(s, r, L()))
2487
+ issues: o.issues.map((s) => D(s, r, M()))
2455
2488
  },
2456
2489
  input: n.value
2457
2490
  }), n.issues = []), n);
2458
2491
  };
2459
2492
  }), Yr = /* @__PURE__ */ l("$ZodPipe", (e, t) => {
2460
- _.init(e, t), y(e._zod, "values", () => t.in._zod.values), y(e._zod, "optin", () => t.in._zod.optin), y(e._zod, "optout", () => t.out._zod.optout), y(e._zod, "propValues", () => t.in._zod.propValues), e._zod.parse = (n, r) => {
2493
+ v.init(e, t), g(e._zod, "values", () => t.in._zod.values), g(e._zod, "optin", () => t.in._zod.optin), g(e._zod, "optout", () => t.out._zod.optout), g(e._zod, "propValues", () => t.in._zod.propValues), e._zod.parse = (n, r) => {
2461
2494
  if (r.direction === "backward") {
2462
2495
  const s = t.out._zod.run(n, r);
2463
2496
  return s instanceof Promise ? s.then((i) => K(i, t.in, r)) : K(s, t.in, r);
@@ -2470,7 +2503,7 @@ function K(e, t, n) {
2470
2503
  return e.issues.length ? (e.aborted = !0, e) : t._zod.run({ value: e.value, issues: e.issues }, n);
2471
2504
  }
2472
2505
  const Gr = /* @__PURE__ */ l("$ZodReadonly", (e, t) => {
2473
- _.init(e, t), y(e._zod, "propValues", () => t.innerType._zod.propValues), y(e._zod, "values", () => t.innerType._zod.values), y(e._zod, "optin", () => t.innerType?._zod?.optin), y(e._zod, "optout", () => t.innerType?._zod?.optout), e._zod.parse = (n, r) => {
2506
+ v.init(e, t), g(e._zod, "propValues", () => t.innerType._zod.propValues), g(e._zod, "values", () => t.innerType._zod.values), g(e._zod, "optin", () => t.innerType?._zod?.optin), g(e._zod, "optout", () => t.innerType?._zod?.optout), e._zod.parse = (n, r) => {
2474
2507
  if (r.direction === "backward")
2475
2508
  return t.innerType._zod.run(n, r);
2476
2509
  const o = t.innerType._zod.run(n, r);
@@ -2481,7 +2514,7 @@ function Fe(e) {
2481
2514
  return e.value = Object.freeze(e.value), e;
2482
2515
  }
2483
2516
  const yt = /* @__PURE__ */ l("$ZodCustom", (e, t) => {
2484
- $.init(e, t), _.init(e, t), e._zod.parse = (n, r) => n, e._zod.check = (n) => {
2517
+ $.init(e, t), v.init(e, t), e._zod.parse = (n, r) => n, e._zod.check = (n) => {
2485
2518
  const r = n.value, o = t.fn(r);
2486
2519
  if (o instanceof Promise)
2487
2520
  return o.then((s) => je(s, n, r, e));
@@ -2785,7 +2818,7 @@ function So() {
2785
2818
  }
2786
2819
  // @__NO_SIDE_EFFECTS__
2787
2820
  function ko() {
2788
- return /* @__PURE__ */ x((e) => Ln(e));
2821
+ return /* @__PURE__ */ x((e) => Mn(e));
2789
2822
  }
2790
2823
  // @__NO_SIDE_EFFECTS__
2791
2824
  function To(e, t, n) {
@@ -2856,7 +2889,7 @@ function wt(e) {
2856
2889
  external: e?.external ?? void 0
2857
2890
  };
2858
2891
  }
2859
- function A(e, t, n = { path: [], schemaPath: [] }) {
2892
+ function O(e, t, n = { path: [], schemaPath: [] }) {
2860
2893
  var r;
2861
2894
  const o = e._zod.def, s = t.seen.get(e);
2862
2895
  if (s)
@@ -2881,10 +2914,10 @@ function A(e, t, n = { path: [], schemaPath: [] }) {
2881
2914
  h(e, t, m, p);
2882
2915
  }
2883
2916
  const d = e._zod.parent;
2884
- d && (i.ref || (i.ref = d), A(d, t, p), t.seen.get(d).isParent = !0);
2917
+ d && (i.ref || (i.ref = d), O(d, t, p), t.seen.get(d).isParent = !0);
2885
2918
  }
2886
2919
  const u = t.metadataRegistry.get(e);
2887
- return u && Object.assign(i.schema, u), t.io === "input" && z(e) && (delete i.schema.examples, delete i.schema.default), t.io === "input" && i.schema._prefault && ((r = i.schema).default ?? (r.default = i.schema._prefault)), delete i.schema._prefault, t.seen.get(e).schema;
2920
+ return u && Object.assign(i.schema, u), t.io === "input" && A(e) && (delete i.schema.examples, delete i.schema.default), t.io === "input" && i.schema._prefault && ((r = i.schema).default ?? (r.default = i.schema._prefault)), delete i.schema._prefault, t.seen.get(e).schema;
2888
2921
  }
2889
2922
  function St(e, t) {
2890
2923
  const n = e.seen.get(t);
@@ -3024,7 +3057,7 @@ function kt(e, t) {
3024
3057
  throw new Error("Error converting schema to JSON.");
3025
3058
  }
3026
3059
  }
3027
- function z(e, t) {
3060
+ function A(e, t) {
3028
3061
  const n = t ?? { seen: /* @__PURE__ */ new Set() };
3029
3062
  if (n.seen.has(e))
3030
3063
  return !1;
@@ -3033,45 +3066,45 @@ function z(e, t) {
3033
3066
  if (r.type === "transform")
3034
3067
  return !0;
3035
3068
  if (r.type === "array")
3036
- return z(r.element, n);
3069
+ return A(r.element, n);
3037
3070
  if (r.type === "set")
3038
- return z(r.valueType, n);
3071
+ return A(r.valueType, n);
3039
3072
  if (r.type === "lazy")
3040
- return z(r.getter(), n);
3073
+ return A(r.getter(), n);
3041
3074
  if (r.type === "promise" || r.type === "optional" || r.type === "nonoptional" || r.type === "nullable" || r.type === "readonly" || r.type === "default" || r.type === "prefault")
3042
- return z(r.innerType, n);
3075
+ return A(r.innerType, n);
3043
3076
  if (r.type === "intersection")
3044
- return z(r.left, n) || z(r.right, n);
3077
+ return A(r.left, n) || A(r.right, n);
3045
3078
  if (r.type === "record" || r.type === "map")
3046
- return z(r.keyType, n) || z(r.valueType, n);
3079
+ return A(r.keyType, n) || A(r.valueType, n);
3047
3080
  if (r.type === "pipe")
3048
- return z(r.in, n) || z(r.out, n);
3081
+ return A(r.in, n) || A(r.out, n);
3049
3082
  if (r.type === "object") {
3050
3083
  for (const o in r.shape)
3051
- if (z(r.shape[o], n))
3084
+ if (A(r.shape[o], n))
3052
3085
  return !0;
3053
3086
  return !1;
3054
3087
  }
3055
3088
  if (r.type === "union") {
3056
3089
  for (const o of r.options)
3057
- if (z(o, n))
3090
+ if (A(o, n))
3058
3091
  return !0;
3059
3092
  return !1;
3060
3093
  }
3061
3094
  if (r.type === "tuple") {
3062
3095
  for (const o of r.items)
3063
- if (z(o, n))
3096
+ if (A(o, n))
3064
3097
  return !0;
3065
- return !!(r.rest && z(r.rest, n));
3098
+ return !!(r.rest && A(r.rest, n));
3066
3099
  }
3067
3100
  return !1;
3068
3101
  }
3069
3102
  const Oo = (e, t = {}) => (n) => {
3070
3103
  const r = wt({ ...n, processors: t });
3071
- return A(e, r), St(r, e), kt(r, e);
3104
+ return O(e, r), St(r, e), kt(r, e);
3072
3105
  }, X = (e, t, n = {}) => (r) => {
3073
3106
  const { libraryOptions: o, target: s } = r ?? {}, i = wt({ ...o ?? {}, target: s, io: t, processors: n });
3074
- return A(e, i), St(i, e), kt(i, e);
3107
+ return O(e, i), St(i, e), kt(i, e);
3075
3108
  }, Eo = {
3076
3109
  guid: "uuid",
3077
3110
  url: "uri",
@@ -3100,18 +3133,18 @@ const Oo = (e, t = {}) => (n) => {
3100
3133
  throw new Error("Transforms cannot be represented in JSON Schema");
3101
3134
  }, Io = (e, t, n, r) => {
3102
3135
  const o = n, s = e._zod.def, { minimum: i, maximum: a } = e._zod.bag;
3103
- typeof i == "number" && (o.minItems = i), typeof a == "number" && (o.maxItems = a), o.type = "array", o.items = A(s.element, t, { ...r, path: [...r.path, "items"] });
3136
+ typeof i == "number" && (o.minItems = i), typeof a == "number" && (o.maxItems = a), o.type = "array", o.items = O(s.element, t, { ...r, path: [...r.path, "items"] });
3104
3137
  }, Co = (e, t, n, r) => {
3105
- const o = e._zod.def, s = o.inclusive === !1, i = o.options.map((a, u) => A(a, t, {
3138
+ const o = e._zod.def, s = o.inclusive === !1, i = o.options.map((a, u) => O(a, t, {
3106
3139
  ...r,
3107
3140
  path: [...r.path, s ? "oneOf" : "anyOf", u]
3108
3141
  }));
3109
3142
  s ? n.oneOf = i : n.anyOf = i;
3110
3143
  }, No = (e, t, n, r) => {
3111
- const o = e._zod.def, s = A(o.left, t, {
3144
+ const o = e._zod.def, s = O(o.left, t, {
3112
3145
  ...r,
3113
3146
  path: [...r.path, "allOf", 0]
3114
- }), i = A(o.right, t, {
3147
+ }), i = O(o.right, t, {
3115
3148
  ...r,
3116
3149
  path: [...r.path, "allOf", 1]
3117
3150
  }), a = (c) => "allOf" in c && Object.keys(c).length === 1, u = [
@@ -3119,27 +3152,27 @@ const Oo = (e, t = {}) => (n) => {
3119
3152
  ...a(i) ? i.allOf : [i]
3120
3153
  ];
3121
3154
  n.allOf = u;
3122
- }, Mo = (e, t, n, r) => {
3123
- const o = e._zod.def, s = A(o.innerType, t, r), i = t.seen.get(e);
3124
- t.target === "openapi-3.0" ? (i.ref = o.innerType, n.nullable = !0) : n.anyOf = [s, { type: "null" }];
3125
3155
  }, Lo = (e, t, n, r) => {
3156
+ const o = e._zod.def, s = O(o.innerType, t, r), i = t.seen.get(e);
3157
+ t.target === "openapi-3.0" ? (i.ref = o.innerType, n.nullable = !0) : n.anyOf = [s, { type: "null" }];
3158
+ }, Mo = (e, t, n, r) => {
3126
3159
  const o = e._zod.def;
3127
- A(o.innerType, t, r);
3160
+ O(o.innerType, t, r);
3128
3161
  const s = t.seen.get(e);
3129
3162
  s.ref = o.innerType;
3130
3163
  }, Do = (e, t, n, r) => {
3131
3164
  const o = e._zod.def;
3132
- A(o.innerType, t, r);
3165
+ O(o.innerType, t, r);
3133
3166
  const s = t.seen.get(e);
3134
3167
  s.ref = o.innerType, n.default = JSON.parse(JSON.stringify(o.defaultValue));
3135
3168
  }, Ro = (e, t, n, r) => {
3136
3169
  const o = e._zod.def;
3137
- A(o.innerType, t, r);
3170
+ O(o.innerType, t, r);
3138
3171
  const s = t.seen.get(e);
3139
3172
  s.ref = o.innerType, t.io === "input" && (n._prefault = JSON.parse(JSON.stringify(o.defaultValue)));
3140
3173
  }, Fo = (e, t, n, r) => {
3141
3174
  const o = e._zod.def;
3142
- A(o.innerType, t, r);
3175
+ O(o.innerType, t, r);
3143
3176
  const s = t.seen.get(e);
3144
3177
  s.ref = o.innerType;
3145
3178
  let i;
@@ -3151,17 +3184,17 @@ const Oo = (e, t = {}) => (n) => {
3151
3184
  n.default = i;
3152
3185
  }, jo = (e, t, n, r) => {
3153
3186
  const o = e._zod.def, s = t.io === "input" ? o.in._zod.def.type === "transform" ? o.out : o.in : o.out;
3154
- A(s, t, r);
3187
+ O(s, t, r);
3155
3188
  const i = t.seen.get(e);
3156
3189
  i.ref = s;
3157
3190
  }, Wo = (e, t, n, r) => {
3158
3191
  const o = e._zod.def;
3159
- A(o.innerType, t, r);
3192
+ O(o.innerType, t, r);
3160
3193
  const s = t.seen.get(e);
3161
3194
  s.ref = o.innerType, n.readOnly = !0;
3162
3195
  }, Tt = (e, t, n, r) => {
3163
3196
  const o = e._zod.def;
3164
- A(o.innerType, t, r);
3197
+ O(o.innerType, t, r);
3165
3198
  const s = t.seen.get(e);
3166
3199
  s.ref = o.innerType;
3167
3200
  }, xo = /* @__PURE__ */ l("ZodISODateTime", (e, t) => {
@@ -3219,19 +3252,19 @@ const qo = (e, t) => {
3219
3252
  });
3220
3253
  }, I = l("ZodError", qo, {
3221
3254
  Parent: Error
3222
- }), Xo = /* @__PURE__ */ ee(I), Ho = /* @__PURE__ */ te(I), Qo = /* @__PURE__ */ ne(I), es = /* @__PURE__ */ re(I), ts = /* @__PURE__ */ Un(I), ns = /* @__PURE__ */ Vn(I), rs = /* @__PURE__ */ Jn(I), os = /* @__PURE__ */ Bn(I), ss = /* @__PURE__ */ Yn(I), is = /* @__PURE__ */ Gn(I), as = /* @__PURE__ */ Kn(I), us = /* @__PURE__ */ qn(I), E = /* @__PURE__ */ l("ZodType", (e, t) => (_.init(e, t), Object.assign(e["~standard"], {
3255
+ }), Xo = /* @__PURE__ */ ee(I), Ho = /* @__PURE__ */ te(I), Qo = /* @__PURE__ */ ne(I), es = /* @__PURE__ */ re(I), ts = /* @__PURE__ */ Un(I), ns = /* @__PURE__ */ Vn(I), rs = /* @__PURE__ */ Jn(I), os = /* @__PURE__ */ Bn(I), ss = /* @__PURE__ */ Yn(I), is = /* @__PURE__ */ Gn(I), as = /* @__PURE__ */ Kn(I), us = /* @__PURE__ */ qn(I), E = /* @__PURE__ */ l("ZodType", (e, t) => (v.init(e, t), Object.assign(e["~standard"], {
3223
3256
  jsonSchema: {
3224
3257
  input: X(e, "input"),
3225
3258
  output: X(e, "output")
3226
3259
  }
3227
- }), e.toJSONSchema = Oo(e, {}), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.check = (...n) => e.clone(Mn(t, {
3260
+ }), e.toJSONSchema = Oo(e, {}), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.check = (...n) => e.clone(Ln(t, {
3228
3261
  checks: [
3229
3262
  ...t.checks ?? [],
3230
3263
  ...n.map((r) => typeof r == "function" ? { _zod: { check: r, def: { check: "custom" }, onattach: [] } } : r)
3231
3264
  ]
3232
3265
  }), {
3233
3266
  parent: !0
3234
- }), e.with = e.check, e.clone = (n, r) => it(e, n, r), e.brand = () => e, e.register = ((n, r) => (n.add(e, r), e)), e.parse = (n, r) => Xo(e, n, r, { callee: e.parse }), e.safeParse = (n, r) => Qo(e, n, r), e.parseAsync = async (n, r) => Ho(e, n, r, { callee: e.parseAsync }), e.safeParseAsync = async (n, r) => es(e, n, r), e.spa = e.safeParseAsync, e.encode = (n, r) => ts(e, n, r), e.decode = (n, r) => ns(e, n, r), e.encodeAsync = async (n, r) => rs(e, n, r), e.decodeAsync = async (n, r) => os(e, n, r), e.safeEncode = (n, r) => ss(e, n, r), e.safeDecode = (n, r) => is(e, n, r), e.safeEncodeAsync = async (n, r) => as(e, n, r), e.safeDecodeAsync = async (n, r) => us(e, n, r), e.refine = (n, r) => e.check(Ns(n, r)), e.superRefine = (n) => e.check(Ms(n)), e.overwrite = (n) => e.check(/* @__PURE__ */ x(n)), e.optional = () => xe(e), e.exactOptional = () => vs(e), e.nullable = () => Ue(e), e.nullish = () => xe(Ue(e)), e.nonoptional = (n) => Os(e, n), e.array = () => ps(e), e.or = (n) => ms([e, n]), e.and = (n) => hs(e, n), e.transform = (n) => Ve(e, gs(n)), e.default = (n) => ks(e, n), e.prefault = (n) => zs(e, n), e.catch = (n) => $s(e, n), e.pipe = (n) => Ve(e, n), e.readonly = () => Is(e), e.describe = (n) => {
3267
+ }), e.with = e.check, e.clone = (n, r) => it(e, n, r), e.brand = () => e, e.register = ((n, r) => (n.add(e, r), e)), e.parse = (n, r) => Xo(e, n, r, { callee: e.parse }), e.safeParse = (n, r) => Qo(e, n, r), e.parseAsync = async (n, r) => Ho(e, n, r, { callee: e.parseAsync }), e.safeParseAsync = async (n, r) => es(e, n, r), e.spa = e.safeParseAsync, e.encode = (n, r) => ts(e, n, r), e.decode = (n, r) => ns(e, n, r), e.encodeAsync = async (n, r) => rs(e, n, r), e.decodeAsync = async (n, r) => os(e, n, r), e.safeEncode = (n, r) => ss(e, n, r), e.safeDecode = (n, r) => is(e, n, r), e.safeEncodeAsync = async (n, r) => as(e, n, r), e.safeDecodeAsync = async (n, r) => us(e, n, r), e.refine = (n, r) => e.check(Ns(n, r)), e.superRefine = (n) => e.check(Ls(n)), e.overwrite = (n) => e.check(/* @__PURE__ */ x(n)), e.optional = () => xe(e), e.exactOptional = () => vs(e), e.nullable = () => Ue(e), e.nullish = () => xe(Ue(e)), e.nonoptional = (n) => Os(e, n), e.array = () => ps(e), e.or = (n) => ms([e, n]), e.and = (n) => hs(e, n), e.transform = (n) => Ve(e, gs(n)), e.default = (n) => ks(e, n), e.prefault = (n) => zs(e, n), e.catch = (n) => $s(e, n), e.pipe = (n) => Ve(e, n), e.readonly = () => Is(e), e.describe = (n) => {
3235
3268
  const r = e.clone();
3236
3269
  return V.add(r, { description: n }), r;
3237
3270
  }, Object.defineProperty(e, "description", {
@@ -3317,7 +3350,7 @@ function vs(e) {
3317
3350
  });
3318
3351
  }
3319
3352
  const ws = /* @__PURE__ */ l("ZodNullable", (e, t) => {
3320
- xr.init(e, t), E.init(e, t), e._zod.processJSONSchema = (n, r, o) => Mo(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
3353
+ xr.init(e, t), E.init(e, t), e._zod.processJSONSchema = (n, r, o) => Lo(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
3321
3354
  });
3322
3355
  function Ue(e) {
3323
3356
  return new ws({
@@ -3350,7 +3383,7 @@ function zs(e, t) {
3350
3383
  });
3351
3384
  }
3352
3385
  const As = /* @__PURE__ */ l("ZodNonOptional", (e, t) => {
3353
- Jr.init(e, t), E.init(e, t), e._zod.processJSONSchema = (n, r, o) => Lo(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
3386
+ Jr.init(e, t), E.init(e, t), e._zod.processJSONSchema = (n, r, o) => Mo(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
3354
3387
  });
3355
3388
  function Os(e, t) {
3356
3389
  return new As({
@@ -3395,13 +3428,13 @@ const Cs = /* @__PURE__ */ l("ZodCustom", (e, t) => {
3395
3428
  function Ns(e, t = {}) {
3396
3429
  return /* @__PURE__ */ _t(Cs, e, t);
3397
3430
  }
3398
- function Ms(e) {
3431
+ function Ls(e) {
3399
3432
  return /* @__PURE__ */ vt(e);
3400
3433
  }
3401
3434
  const R = /* @__PURE__ */ l("ZodMiniType", (e, t) => {
3402
3435
  if (!e._zod)
3403
3436
  throw new Error("Uninitialized schema in ZodMiniType.");
3404
- _.init(e, t), e.def = t, e.type = t.type, e.parse = (n, r) => Wn(e, n, r, { callee: e.parse }), e.safeParse = (n, r) => ct(e, n, r), e.parseAsync = async (n, r) => xn(e, n, r, { callee: e.parseAsync }), e.safeParseAsync = async (n, r) => lt(e, n, r), e.check = (...n) => e.clone({
3437
+ v.init(e, t), e.def = t, e.type = t.type, e.parse = (n, r) => Wn(e, n, r, { callee: e.parse }), e.safeParse = (n, r) => ct(e, n, r), e.parseAsync = async (n, r) => xn(e, n, r, { callee: e.parseAsync }), e.safeParseAsync = async (n, r) => lt(e, n, r), e.check = (...n) => e.clone({
3405
3438
  ...t,
3406
3439
  checks: [
3407
3440
  ...t.checks ?? [],
@@ -3417,12 +3450,12 @@ function Je(e) {
3417
3450
  }
3418
3451
  const U = /* @__PURE__ */ l("ZodMiniStringFormat", (e, t) => {
3419
3452
  Z.init(e, t), zt.init(e, t);
3420
- }), Ls = /* @__PURE__ */ l("ZodMiniEmail", (e, t) => {
3453
+ }), Ms = /* @__PURE__ */ l("ZodMiniEmail", (e, t) => {
3421
3454
  Ar.init(e, t), U.init(e, t);
3422
3455
  });
3423
3456
  // @__NO_SIDE_EFFECTS__
3424
3457
  function Ds(e) {
3425
- return /* @__PURE__ */ Hr(Ls, e);
3458
+ return /* @__PURE__ */ Hr(Ms, e);
3426
3459
  }
3427
3460
  const Rs = /* @__PURE__ */ l("ZodMiniUUID", (e, t) => {
3428
3461
  zr.init(e, t), U.init(e, t);
@@ -3467,14 +3500,14 @@ function Be(e) {
3467
3500
  return /* @__PURE__ */ ao(At, e);
3468
3501
  }
3469
3502
  const Gs = /* @__PURE__ */ l("ZodMiniNumberFormat", (e, t) => {
3470
- Mr.init(e, t), At.init(e, t);
3503
+ Lr.init(e, t), At.init(e, t);
3471
3504
  });
3472
3505
  // @__NO_SIDE_EFFECTS__
3473
3506
  function Ks(e) {
3474
3507
  return /* @__PURE__ */ uo(Gs, e);
3475
3508
  }
3476
3509
  const qs = /* @__PURE__ */ l("ZodMiniBoolean", (e, t) => {
3477
- Lr.init(e, t), R.init(e, t);
3510
+ Mr.init(e, t), R.init(e, t);
3478
3511
  });
3479
3512
  // @__NO_SIDE_EFFECTS__
3480
3513
  function Ye(e) {
@@ -3512,7 +3545,7 @@ const ti = /* @__PURE__ */ l("ZodMiniCustom", (e, t) => {
3512
3545
  yt.init(e, t), R.init(e, t);
3513
3546
  });
3514
3547
  // @__NO_SIDE_EFFECTS__
3515
- function w(e, t = {}) {
3548
+ function S(e, t = {}) {
3516
3549
  return /* @__PURE__ */ _t(ti, e, t);
3517
3550
  }
3518
3551
  // @__NO_SIDE_EFFECTS__
@@ -3560,33 +3593,33 @@ function oi(e, t) {
3560
3593
  let o = r ? /* @__PURE__ */ Je(r) : /* @__PURE__ */ Je();
3561
3594
  if (n.required === !0) {
3562
3595
  const s = b(n.messages?.required, t) ?? "This field is required";
3563
- o = o.check(/* @__PURE__ */ w((i) => i.length > 0, { error: s }));
3596
+ o = o.check(/* @__PURE__ */ S((i) => i.length > 0, { error: s }));
3564
3597
  }
3565
3598
  if (typeof n.minLength == "number") {
3566
3599
  const s = b(n.messages?.minLength, t), i = n.minLength;
3567
3600
  o = o.check(
3568
- s ? /* @__PURE__ */ w((a) => a.length >= i, { error: s }) : /* @__PURE__ */ W(i)
3601
+ s ? /* @__PURE__ */ S((a) => a.length >= i, { error: s }) : /* @__PURE__ */ W(i)
3569
3602
  );
3570
3603
  }
3571
3604
  if (typeof n.maxLength == "number") {
3572
3605
  const s = b(n.messages?.maxLength, t), i = n.maxLength;
3573
3606
  o = o.check(
3574
- s ? /* @__PURE__ */ w((a) => a.length <= i, { error: s }) : /* @__PURE__ */ se(i)
3607
+ s ? /* @__PURE__ */ S((a) => a.length <= i, { error: s }) : /* @__PURE__ */ se(i)
3575
3608
  );
3576
3609
  }
3577
3610
  if (typeof n.pattern == "string") {
3578
3611
  const s = b(n.messages?.pattern, t), i = new RegExp(n.pattern);
3579
3612
  o = o.check(
3580
- s ? /* @__PURE__ */ w((a) => i.test(a), { error: s }) : /* @__PURE__ */ bt(i)
3613
+ s ? /* @__PURE__ */ S((a) => i.test(a), { error: s }) : /* @__PURE__ */ bt(i)
3581
3614
  );
3582
3615
  }
3583
3616
  if (n.enum) {
3584
3617
  const s = n.enum, i = b(n.messages?.enum, t);
3585
- o = o.check(/* @__PURE__ */ w((a) => s.includes(a), i ? { error: i } : void 0));
3618
+ o = o.check(/* @__PURE__ */ S((a) => s.includes(a), i ? { error: i } : void 0));
3586
3619
  }
3587
3620
  if (n.const !== void 0) {
3588
3621
  const s = b(n.messages?.const, t);
3589
- o = o.check(/* @__PURE__ */ w((i) => i === n.const, s ? { error: s } : void 0));
3622
+ o = o.check(/* @__PURE__ */ S((i) => i === n.const, s ? { error: s } : void 0));
3590
3623
  }
3591
3624
  if (n.format !== void 0)
3592
3625
  if (ni.includes(n.format)) {
@@ -3617,33 +3650,33 @@ function ii(e, t) {
3617
3650
  let o = r ? /* @__PURE__ */ Be(r) : /* @__PURE__ */ Be();
3618
3651
  if (n.type === "integer" && (o = o.check(/* @__PURE__ */ Ks())), n.minimum !== void 0) {
3619
3652
  const s = b(n.messages?.minimum, t), i = n.minimum;
3620
- o = o.check(s ? /* @__PURE__ */ w((a) => a >= i, { error: s }) : /* @__PURE__ */ mo(i));
3653
+ o = o.check(s ? /* @__PURE__ */ S((a) => a >= i, { error: s }) : /* @__PURE__ */ mo(i));
3621
3654
  }
3622
3655
  if (n.maximum !== void 0) {
3623
3656
  const s = b(n.messages?.maximum, t), i = n.maximum;
3624
- o = o.check(s ? /* @__PURE__ */ w((a) => a <= i, { error: s }) : /* @__PURE__ */ po(i));
3657
+ o = o.check(s ? /* @__PURE__ */ S((a) => a <= i, { error: s }) : /* @__PURE__ */ po(i));
3625
3658
  }
3626
3659
  if (n.exclusiveMinimum !== void 0) {
3627
3660
  const s = b(n.messages?.exclusiveMinimum, t), i = n.exclusiveMinimum;
3628
- o = o.check(/* @__PURE__ */ w((a) => a > i, s ? { error: s } : void 0));
3661
+ o = o.check(/* @__PURE__ */ S((a) => a > i, s ? { error: s } : void 0));
3629
3662
  }
3630
3663
  if (n.exclusiveMaximum !== void 0) {
3631
3664
  const s = b(n.messages?.exclusiveMaximum, t), i = n.exclusiveMaximum;
3632
- o = o.check(/* @__PURE__ */ w((a) => a < i, s ? { error: s } : void 0));
3665
+ o = o.check(/* @__PURE__ */ S((a) => a < i, s ? { error: s } : void 0));
3633
3666
  }
3634
3667
  if (n.multipleOf !== void 0) {
3635
3668
  const s = b(n.messages?.multipleOf, t), i = n.multipleOf;
3636
3669
  o = o.check(
3637
- /* @__PURE__ */ w((a) => si(a, i), s ? { error: s } : void 0)
3670
+ /* @__PURE__ */ S((a) => si(a, i), s ? { error: s } : void 0)
3638
3671
  );
3639
3672
  }
3640
3673
  if (n.enum) {
3641
3674
  const s = n.enum, i = b(n.messages?.enum, t);
3642
- o = o.check(/* @__PURE__ */ w((a) => s.includes(a), i ? { error: i } : void 0));
3675
+ o = o.check(/* @__PURE__ */ S((a) => s.includes(a), i ? { error: i } : void 0));
3643
3676
  }
3644
3677
  if (n.const !== void 0) {
3645
3678
  const s = b(n.messages?.const, t);
3646
- o = o.check(/* @__PURE__ */ w((i) => i === n.const, s ? { error: s } : void 0));
3679
+ o = o.check(/* @__PURE__ */ S((i) => i === n.const, s ? { error: s } : void 0));
3647
3680
  }
3648
3681
  return o;
3649
3682
  });
@@ -3654,7 +3687,7 @@ function ai(e, t) {
3654
3687
  let o = r ? /* @__PURE__ */ Ye(r) : /* @__PURE__ */ Ye();
3655
3688
  if (n.const !== void 0) {
3656
3689
  const s = b(n.messages?.const, t);
3657
- o = o.check(/* @__PURE__ */ w((i) => i === n.const, s ? { error: s } : void 0));
3690
+ o = o.check(/* @__PURE__ */ S((i) => i === n.const, s ? { error: s } : void 0));
3658
3691
  }
3659
3692
  return o;
3660
3693
  });
@@ -3665,18 +3698,18 @@ function ui(e, t) {
3665
3698
  let o = r ? /* @__PURE__ */ Ge(/* @__PURE__ */ fe(), r) : /* @__PURE__ */ Ge(/* @__PURE__ */ fe());
3666
3699
  if (n.required === !0) {
3667
3700
  const s = b(n.messages?.required, t) ?? "This field is required";
3668
- o = o.check(/* @__PURE__ */ w((i) => i.length > 0, { error: s }));
3701
+ o = o.check(/* @__PURE__ */ S((i) => i.length > 0, { error: s }));
3669
3702
  }
3670
3703
  if (typeof n.minItems == "number") {
3671
3704
  const s = b(n.messages?.minItems, t), i = n.minItems;
3672
3705
  o = o.check(
3673
- s ? /* @__PURE__ */ w((a) => a.length >= i, { error: s }) : /* @__PURE__ */ W(i)
3706
+ s ? /* @__PURE__ */ S((a) => a.length >= i, { error: s }) : /* @__PURE__ */ W(i)
3674
3707
  );
3675
3708
  }
3676
3709
  if (typeof n.maxItems == "number") {
3677
3710
  const s = b(n.messages?.maxItems, t), i = n.maxItems;
3678
3711
  o = o.check(
3679
- s ? /* @__PURE__ */ w((a) => a.length <= i, { error: s }) : /* @__PURE__ */ se(i)
3712
+ s ? /* @__PURE__ */ S((a) => a.length <= i, { error: s }) : /* @__PURE__ */ se(i)
3680
3713
  );
3681
3714
  }
3682
3715
  return o;
@@ -3717,38 +3750,38 @@ function Y(e, t) {
3717
3750
  }
3718
3751
  const li = {
3719
3752
  // ACTION
3720
- button: async () => (await import("./button.element-DxwYDdu6.js")).ButtonElement,
3753
+ button: async () => (await import("./button.element-3a7rRHbA.js")).ButtonElement,
3721
3754
  // INPUTS
3722
- calendar: async () => (await import("./calendar.element-O2of7VBr.js")).CalendarElement,
3723
- rangeCalendar: async () => (await import("./range-calendar.element-DQZXvd-L.js")).RangeCalendarElement,
3724
- rangeDateInput: async () => (await import("./range-date-input.element-v71P-oUp.js")).RangeDateInputElement,
3725
- rangeDatePicker: async () => (await import("./range-date-picker.element-CA-KcQhA.js")).RangeDatePickerElement,
3726
- currency: async () => (await import("./currency.element-ybKzwXEh.js")).CurrencyElement,
3727
- dateInput: async () => (await import("./date.element-p6aB6OGd.js")).DateElement,
3728
- datePicker: async () => (await import("./date-picker.element-CP2_u_ZE.js")).DatePickerElement,
3729
- dropdown: async () => (await import("./dropdown.element-sbd3T145.js")).DropdownElement,
3730
- list: async () => (await import("./list.element-Bgnx2CN_.js")).ListElement,
3731
- markdown: async () => (await import("./markdown.element-1IF3G5KX.js")).MarkdownElement,
3732
- password: async () => (await import("./password.element-BT65mDsp.js")).PasswordElement,
3733
- textinput: async () => (await import("./textinput.element-zI0iG-Cq.js")).TextinputElement,
3734
- textarea: async () => (await import("./textarea.element-BTJLqnnI.js")).TextareaElement,
3735
- toggle: async () => (await import("./toggle.element-NXRrhALB.js")).ToggleElement,
3736
- checkbox: async () => (await import("./checkbox.element-DMmer4Jw.js")).CheckboxElement,
3737
- number: async () => (await import("./number.element-zgd4L5hn.js")).NumberElement,
3738
- radiogroup: async () => (await import("./radiogroup.element-DzHLgRh1.js")).RadiogroupElement,
3739
- select: async () => (await import("./select.element-CjWqp9dd.js")).SelectElement,
3740
- tags: async () => (await import("./tags.element-ed1_51GA.js")).TagsElement,
3755
+ calendar: async () => (await import("./calendar.element-MubSE1bx.js")).CalendarElement,
3756
+ rangeCalendar: async () => (await import("./range-calendar.element-QTE6vGNP.js")).RangeCalendarElement,
3757
+ rangeDateInput: async () => (await import("./range-date-input.element-Dj29D_OQ.js")).RangeDateInputElement,
3758
+ rangeDatePicker: async () => (await import("./range-date-picker.element-BUUKtKkz.js")).RangeDatePickerElement,
3759
+ currency: async () => (await import("./currency.element-YyL4TeL0.js")).CurrencyElement,
3760
+ dateInput: async () => (await import("./date.element-BtVJSIRk.js")).DateElement,
3761
+ datePicker: async () => (await import("./date-picker.element-DabW_-0-.js")).DatePickerElement,
3762
+ dropdown: async () => (await import("./dropdown.element-DqzC6aXR.js")).DropdownElement,
3763
+ list: async () => (await import("./list.element-Co3V3Cn5.js")).ListElement,
3764
+ markdown: async () => (await import("./markdown.element-CNp4wbg9.js")).MarkdownElement,
3765
+ password: async () => (await import("./password.element-n-R9RbkB.js")).PasswordElement,
3766
+ textinput: async () => (await import("./textinput.element-CkXNzMUg.js")).TextinputElement,
3767
+ textarea: async () => (await import("./textarea.element-Cu9ZW3K4.js")).TextareaElement,
3768
+ toggle: async () => (await import("./toggle.element-C1kCw5H8.js")).ToggleElement,
3769
+ checkbox: async () => (await import("./checkbox.element-CVskoXEc.js")).CheckboxElement,
3770
+ number: async () => (await import("./number.element-B6TsvHMK.js")).NumberElement,
3771
+ radiogroup: async () => (await import("./radiogroup.element-CeQn623u.js")).RadiogroupElement,
3772
+ select: async () => (await import("./select.element-jcDF1h-g.js")).SelectElement,
3773
+ tags: async () => (await import("./tags.element-CX3vQL8L.js")).TagsElement,
3741
3774
  // REPEATER
3742
- repeater: async () => (await import("./repeater.element-Ry8HyMfW.js")).RepeaterElement,
3775
+ repeater: async () => (await import("./repeater.element-CtNgB4F5.js")).RepeaterElement,
3743
3776
  // LAYOUTS
3744
- flex: async () => (await import("./flex.element-B0sG0YT1.js")).FlexElement,
3745
- grid: async () => (await import("./grid.element-Bf5aEjkj.js")).GridElement,
3746
- tabs: async () => (await import("./tabs.element-VLrtF1j5.js")).TabsElement,
3747
- accordion: async () => (await import("./accordion.element-ChLmV6QT.js")).AccordionElement,
3777
+ flex: async () => (await import("./flex.element-DG4Uaj_X.js")).FlexElement,
3778
+ grid: async () => (await import("./grid.element-DCZsh-3J.js")).GridElement,
3779
+ tabs: async () => (await import("./tabs.element-BvAyI71N.js")).TabsElement,
3780
+ accordion: async () => (await import("./accordion.element-BIgxl5e9.js")).AccordionElement,
3748
3781
  // DISPLAY
3749
- alert: async () => (await import("./alert.element-9QFlqjj9.js")).AlertElement,
3750
- markdownText: async () => (await import("./markdown-text.element-C_1OqrGa.js")).MarkdownTextElement,
3751
- renderer: async () => (await import("./renderer.element-DMsheQGi.js")).RendererElement
3782
+ alert: async () => (await import("./alert.element-DPWq9-0F.js")).AlertElement,
3783
+ markdownText: async () => (await import("./markdown-text.element-B8TfVLIO.js")).MarkdownTextElement,
3784
+ renderer: async () => (await import("./renderer.element-CNyMn2Lu.js")).RendererElement
3752
3785
  };
3753
3786
  var pi = Object.defineProperty, di = Object.getOwnPropertyDescriptor, ae = (e, t, n, r) => {
3754
3787
  for (var o = r > 1 ? void 0 : r ? di(t, n) : t, s = e.length - 1, i; s >= 0; s--)