mlform 0.1.16 → 0.1.18

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.
package/README.md CHANGED
@@ -9,7 +9,7 @@ Schema-driven forms for machine learning applications.
9
9
 
10
10
  MLForm gives you a predictable UI layer between users and model backends. You describe inputs and reports with a schema, MLForm renders accessible Web Components, validates values, submits structured payloads, and displays model results in the same host container.
11
11
 
12
- Version `0.1.16` is the current release in this repository.
12
+ Version `0.1.18` is the current release in this repository.
13
13
 
14
14
  ## Why MLForm
15
15
 
@@ -306,7 +306,7 @@ The main package targets Node.js `>=24.9.0`.
306
306
 
307
307
  ## Release Notes
308
308
 
309
- For `0.1.16`, use the repository release entry and the published docs as the source of truth:
309
+ For `0.1.18`, use the repository release entry and the published docs as the source of truth:
310
310
 
311
311
  - GitHub releases: https://github.com/UlloaSP/mlform/releases
312
312
  - npm package: https://www.npmjs.com/package/mlform
@@ -1,4 +1,4 @@
1
- import { f as e, m as t, s as n } from "./schema-D9V7-AkU.js";
1
+ import { d as e, m as t, s as n } from "./schema-CNKKJZRx.js";
2
2
  import { s as r } from "./primitives-BcXt2QWI.js";
3
3
  import * as i from "zod";
4
4
  //#region src/builtins/constants.ts
@@ -6,9 +6,6 @@ var a = {
6
6
  classifier: "classifier",
7
7
  regressor: "regressor"
8
8
  }, o = {
9
- classifier: a.classifier,
10
- regressor: a.regressor
11
- }, ee = {
12
9
  text: "text",
13
10
  number: "number",
14
11
  boolean: "boolean",
@@ -23,10 +20,10 @@ var a = {
23
20
  }, s = {
24
21
  classifier: "Classifier report",
25
22
  regressor: "Regressor report"
26
- }, te = {
23
+ }, c = {
27
24
  unknownPrediction: "Unknown",
28
25
  classifierClassLabel: (e) => `Class ${e + 1}`
29
- }, c = {
26
+ }, l = {
30
27
  invalidNumber: "Value must be a valid number.",
31
28
  textPatternMismatch: "Value does not match the expected pattern.",
32
29
  categoryOptionMismatch: "Value must match one of the available options.",
@@ -47,7 +44,7 @@ var a = {
47
44
  timestampsUnique: "Timestamps must be unique.",
48
45
  timestampsAscending: "Timestamps must be sorted in ascending order.",
49
46
  timestampsDescending: "Timestamps must be sorted in descending order."
50
- }, l = i.record(i.string(), i.unknown()).optional(), u = i.union([i.string().min(1), i.number().int().nonnegative()]), d = i.union([u, i.record(i.string().min(1), u.nullish())]).optional(), f = i.custom((e) => typeof e == "function"), p = i.enum([
47
+ }, u = i.record(i.string(), i.unknown()).optional(), d = i.union([i.string().min(1), i.number().int().nonnegative()]), f = i.union([d, i.record(i.string().min(1), d.nullish())]).optional(), ee = i.custom((e) => typeof e == "function"), p = i.enum([
51
48
  "idle",
52
49
  "editing",
53
50
  "validating",
@@ -106,7 +103,7 @@ var a = {
106
103
  kind: i.literal("not"),
107
104
  condition: m
108
105
  })
109
- ])), h = i.union([f, m]), g = {
106
+ ])), h = i.union([ee, m]), g = {
110
107
  id: i.string().optional(),
111
108
  label: i.string().min(1),
112
109
  description: i.string().optional(),
@@ -126,23 +123,20 @@ var a = {
126
123
  ]).optional(),
127
124
  includeInSubmission: i.boolean().optional(),
128
125
  displayKey: i.string().min(1).optional(),
129
- mappedTo: d,
126
+ mappedTo: f,
130
127
  valuePath: i.union([i.string().min(1), i.array(i.string().min(1)).min(1)]).optional(),
131
128
  defaultValue: i.unknown().optional(),
132
- ui: l
129
+ ui: u
133
130
  }, _ = {
134
131
  id: i.string().optional(),
135
132
  label: i.string().optional(),
136
133
  description: i.string().optional(),
137
- mappedTo: d,
138
- ui: l
134
+ mappedTo: f,
135
+ ui: u
139
136
  }, v = i.union([i.string(), i.object({
140
137
  label: i.string(),
141
138
  value: i.string()
142
- })]), y = (e, t) => {
143
- let n = e.raw;
144
- if (!(typeof n != "object" || !n || !("outputs" in n) || !Array.isArray(n.outputs))) return n.outputs.find((e) => e.type === t);
145
- }, b = (e, t, n) => ({
139
+ })]), y = (e, t, n) => ({
146
140
  component: e,
147
141
  props: {
148
142
  id: t.id,
@@ -155,7 +149,7 @@ var a = {
155
149
  ...n,
156
150
  ...t.ui
157
151
  }
158
- }), x = {
152
+ }), b = {
159
153
  kind: "boolean",
160
154
  schema: i.object({
161
155
  kind: i.literal("boolean"),
@@ -170,7 +164,7 @@ var a = {
170
164
  return e == null || e === "" ? null : e === !0 || e === "true" ? !0 : e === !1 || e === "false" ? !1 : !!e;
171
165
  },
172
166
  describe(e, t) {
173
- return b("boolean-field", e, {
167
+ return y("boolean-field", e, {
174
168
  checked: t.state.value,
175
169
  trueLabel: e.trueLabel,
176
170
  falseLabel: e.falseLabel,
@@ -178,7 +172,7 @@ var a = {
178
172
  errors: t.state.errors
179
173
  });
180
174
  }
181
- }, S = {
175
+ }, x = {
182
176
  kind: "category",
183
177
  schema: i.object({
184
178
  kind: i.literal("category"),
@@ -192,27 +186,27 @@ var a = {
192
186
  return e == null || e === "" ? null : typeof e == "string" || typeof e == "number" || typeof e == "boolean" || typeof e == "bigint" ? `${e}` : null;
193
187
  },
194
188
  validate(e, t) {
195
- return e === null || t.options.map((e) => typeof e == "string" ? e : e.value).includes(e) ? [] : [c.categoryOptionMismatch];
189
+ return e === null || t.options.map((e) => typeof e == "string" ? e : e.value).includes(e) ? [] : [l.categoryOptionMismatch];
196
190
  },
197
191
  describe(e, t) {
198
- return b("category-field", e, {
192
+ return y("category-field", e, {
199
193
  value: t.state.value,
200
194
  options: e.options,
201
195
  state: t.state.status,
202
196
  errors: t.state.errors
203
197
  });
204
198
  }
205
- }, ne = i.object({
199
+ }, te = i.object({
206
200
  label: i.string(),
207
201
  value: i.string(),
208
202
  mapping: i.record(i.string(), i.unknown())
209
- }), C = {
203
+ }), S = {
210
204
  kind: "mapped-category",
211
205
  schema: i.object({
212
206
  kind: i.literal("mapped-category"),
213
207
  ...g,
214
208
  includeInSubmission: i.boolean().optional().default(!1),
215
- options: i.array(ne).min(1)
209
+ options: i.array(te).min(1)
216
210
  }),
217
211
  getDefaultValue(e) {
218
212
  return typeof e.defaultValue == "string" ? e.defaultValue : null;
@@ -221,10 +215,10 @@ var a = {
221
215
  return e == null || e === "" ? null : typeof e == "string" || typeof e == "number" || typeof e == "boolean" || typeof e == "bigint" ? `${e}` : null;
222
216
  },
223
217
  validate(e, t) {
224
- return e === null || t.options.map((e) => e.value).includes(e) ? [] : [c.categoryOptionMismatch];
218
+ return e === null || t.options.map((e) => e.value).includes(e) ? [] : [l.categoryOptionMismatch];
225
219
  },
226
220
  describe(e, t) {
227
- return b("category-field", e, {
221
+ return y("category-field", e, {
228
222
  value: t.state.value,
229
223
  options: e.options.map((e) => ({
230
224
  label: e.label,
@@ -234,17 +228,17 @@ var a = {
234
228
  errors: t.state.errors
235
229
  });
236
230
  }
237
- }, w = i.object({
231
+ }, C = i.object({
238
232
  label: i.string(),
239
233
  value: i.string(),
240
- mappedTo: d.unwrap()
241
- }), T = {
234
+ mappedTo: f.unwrap()
235
+ }), w = {
242
236
  kind: "onehot-category",
243
237
  schema: i.object({
244
238
  kind: i.literal("onehot-category"),
245
239
  ...g,
246
240
  includeInSubmission: i.boolean().optional().default(!0),
247
- options: i.array(w).min(1)
241
+ options: i.array(C).min(1)
248
242
  }),
249
243
  getDefaultValue(e) {
250
244
  return typeof e.defaultValue == "string" ? e.defaultValue : null;
@@ -253,10 +247,10 @@ var a = {
253
247
  return e == null || e === "" ? null : typeof e == "string" || typeof e == "number" || typeof e == "boolean" || typeof e == "bigint" ? `${e}` : null;
254
248
  },
255
249
  validate(e, t) {
256
- return e === null || t.options.some((t) => t.value === e) ? [] : [c.categoryOptionMismatch];
250
+ return e === null || t.options.some((t) => t.value === e) ? [] : [l.categoryOptionMismatch];
257
251
  },
258
252
  describe(e, t) {
259
- return b("category-field", e, {
253
+ return y("category-field", e, {
260
254
  value: t.state.value,
261
255
  options: e.options.map((e) => ({
262
256
  label: e.label,
@@ -266,14 +260,14 @@ var a = {
266
260
  errors: t.state.errors
267
261
  });
268
262
  }
269
- }, E = (e) => typeof e == "object" && !!e && !Array.isArray(e), D = (e) => {
263
+ }, T = (e) => typeof e == "object" && !!e && !Array.isArray(e), E = (e) => {
270
264
  if (e instanceof Date) return Number.isNaN(e.getTime()) ? null : e;
271
265
  if (typeof e == "string" || typeof e == "number") {
272
266
  let t = new Date(e);
273
267
  return Number.isNaN(t.getTime()) ? null : t;
274
268
  }
275
269
  return null;
276
- }, O = {
270
+ }, D = {
277
271
  kind: "date",
278
272
  schema: i.object({
279
273
  kind: i.literal("date"),
@@ -283,25 +277,25 @@ var a = {
283
277
  step: i.number().positive().optional()
284
278
  }),
285
279
  getDefaultValue(e) {
286
- return D(e.defaultValue) ?? null;
280
+ return E(e.defaultValue) ?? null;
287
281
  },
288
282
  normalizeValue(e) {
289
- return D(e);
283
+ return E(e);
290
284
  },
291
285
  serializeValue(e) {
292
286
  return e instanceof Date ? e.toISOString() : e;
293
287
  },
294
288
  validate(e, t) {
295
- let n = [], r = D(t.min), i = D(t.max);
296
- if (r && i && r.getTime() > i.getTime() && n.push(c.invalidDateRange), e === null) return n;
297
- if (r && e.getTime() < r.getTime() && n.push(c.dateOnOrAfter(String(t.min))), i && e.getTime() > i.getTime() && n.push(c.dateOnOrBefore(String(t.max))), t.step !== void 0) {
289
+ let n = [], r = E(t.min), i = E(t.max);
290
+ if (r && i && r.getTime() > i.getTime() && n.push(l.invalidDateRange), e === null) return n;
291
+ if (r && e.getTime() < r.getTime() && n.push(l.dateOnOrAfter(String(t.min))), i && e.getTime() > i.getTime() && n.push(l.dateOnOrBefore(String(t.max))), t.step !== void 0) {
298
292
  let i = r ?? /* @__PURE__ */ new Date("1970-01-01T00:00:00Z");
299
- Math.round(Math.abs(e.getTime() - i.getTime()) / 864e5) % t.step !== 0 && n.push(c.stepDate(t.step));
293
+ Math.round(Math.abs(e.getTime() - i.getTime()) / 864e5) % t.step !== 0 && n.push(l.stepDate(t.step));
300
294
  }
301
295
  return n;
302
296
  },
303
297
  describe(e, t) {
304
- return b("date-field", e, {
298
+ return y("date-field", e, {
305
299
  value: t.state.value instanceof Date ? t.state.value.toISOString().slice(0, 10) : t.state.value,
306
300
  min: e.min,
307
301
  max: e.max,
@@ -310,7 +304,7 @@ var a = {
310
304
  errors: t.state.errors
311
305
  });
312
306
  }
313
- }, k = {
307
+ }, O = {
314
308
  kind: "long-text",
315
309
  schema: i.object({
316
310
  kind: i.literal("long-text"),
@@ -328,10 +322,10 @@ var a = {
328
322
  },
329
323
  validate(e, t) {
330
324
  let n = [];
331
- return t.minLength !== void 0 && t.maxLength !== void 0 && t.minLength > t.maxLength && n.push(c.invalidTextLengthRange), e.length === 0 ? n : (t.minLength !== void 0 && e.length < t.minLength && n.push(c.minLength(t.minLength)), t.maxLength !== void 0 && e.length > t.maxLength && n.push(c.maxLength(t.maxLength)), n);
325
+ return t.minLength !== void 0 && t.maxLength !== void 0 && t.minLength > t.maxLength && n.push(l.invalidTextLengthRange), e.length === 0 ? n : (t.minLength !== void 0 && e.length < t.minLength && n.push(l.minLength(t.minLength)), t.maxLength !== void 0 && e.length > t.maxLength && n.push(l.maxLength(t.maxLength)), n);
332
326
  },
333
327
  describe(e, t) {
334
- return b("long-text-field", e, {
328
+ return y("long-text-field", e, {
335
329
  value: t.state.value,
336
330
  placeholder: e.placeholder ?? "",
337
331
  minLength: e.minLength,
@@ -341,7 +335,7 @@ var a = {
341
335
  errors: t.state.errors
342
336
  });
343
337
  }
344
- }, A = {
338
+ }, k = {
345
339
  kind: "multi-choice",
346
340
  schema: i.object({
347
341
  kind: i.literal("multi-choice"),
@@ -364,10 +358,10 @@ var a = {
364
358
  validate(e, t) {
365
359
  if (e.length === 0) return [];
366
360
  let n = t.options.map((e) => typeof e == "string" ? e : e.value);
367
- return e.filter((e) => !n.includes(e)).length > 0 ? [c.categoryOptionMismatch] : [];
361
+ return e.filter((e) => !n.includes(e)).length > 0 ? [l.categoryOptionMismatch] : [];
368
362
  },
369
363
  describe(e, t) {
370
- return b("multi-choice-field", e, {
364
+ return y("multi-choice-field", e, {
371
365
  value: t.state.value,
372
366
  options: e.options,
373
367
  layout: e.layout ?? "vertical",
@@ -375,7 +369,7 @@ var a = {
375
369
  errors: t.state.errors
376
370
  });
377
371
  }
378
- }, j = {
372
+ }, A = {
379
373
  kind: "number",
380
374
  schema: i.object({
381
375
  kind: i.literal("number"),
@@ -403,17 +397,17 @@ var a = {
403
397
  },
404
398
  validate(e, t) {
405
399
  let n = [];
406
- if (t.min !== void 0 && t.max !== void 0 && t.min > t.max && n.push(c.invalidNumericRange), e === null) return n;
407
- if (typeof e != "number") return n.push(c.invalidNumber), n;
408
- if (t.min !== void 0 && e < t.min && n.push(c.minValue(t.min)), t.max !== void 0 && e > t.max && n.push(c.maxValue(t.max)), t.step !== void 0) {
400
+ if (t.min !== void 0 && t.max !== void 0 && t.min > t.max && n.push(l.invalidNumericRange), e === null) return n;
401
+ if (typeof e != "number") return n.push(l.invalidNumber), n;
402
+ if (t.min !== void 0 && e < t.min && n.push(l.minValue(t.min)), t.max !== void 0 && e > t.max && n.push(l.maxValue(t.max)), t.step !== void 0) {
409
403
  let r = t.min ?? 0, i = Math.abs(e - r) % t.step, a = t.step * 1e-9;
410
- i > a && Math.abs(i - t.step) > a && n.push(c.stepValue(t.step));
404
+ i > a && Math.abs(i - t.step) > a && n.push(l.stepValue(t.step));
411
405
  }
412
406
  return n;
413
407
  },
414
408
  describe(e, t) {
415
409
  let n = e.min !== void 0 && e.max !== void 0 && !e.required && t.state.value !== null;
416
- return b("number-field", e, {
410
+ return y("number-field", e, {
417
411
  value: t.state.value,
418
412
  min: e.min,
419
413
  max: e.max,
@@ -425,7 +419,7 @@ var a = {
425
419
  errors: t.state.errors
426
420
  });
427
421
  }
428
- }, M = {
422
+ }, j = {
429
423
  kind: "rating",
430
424
  schema: i.object({
431
425
  kind: i.literal("rating"),
@@ -445,10 +439,10 @@ var a = {
445
439
  validate(e, t) {
446
440
  if (e === null) return [];
447
441
  let n = [], r = t.min ?? 1, i = t.max;
448
- return r > i ? (n.push(c.invalidNumericRange), n) : (e < r && n.push(c.minValue(r)), e > i && n.push(c.maxValue(i)), n);
442
+ return r > i ? (n.push(l.invalidNumericRange), n) : (e < r && n.push(l.minValue(r)), e > i && n.push(l.maxValue(i)), n);
449
443
  },
450
444
  describe(e, t) {
451
- return b("rating-field", e, {
445
+ return y("rating-field", e, {
452
446
  value: t.state.value,
453
447
  min: e.min ?? 1,
454
448
  max: e.max,
@@ -457,7 +451,7 @@ var a = {
457
451
  errors: t.state.errors
458
452
  });
459
453
  }
460
- }, N = {
454
+ }, M = {
461
455
  kind: "text",
462
456
  schema: i.object({
463
457
  kind: i.literal("text"),
@@ -475,10 +469,10 @@ var a = {
475
469
  },
476
470
  validate(e, t) {
477
471
  let n = [];
478
- return t.minLength !== void 0 && t.maxLength !== void 0 && t.minLength > t.maxLength && n.push(c.invalidTextLengthRange), e.length === 0 ? n : (t.minLength !== void 0 && e.length < t.minLength && n.push(c.minLength(t.minLength)), t.maxLength !== void 0 && e.length > t.maxLength && n.push(c.maxLength(t.maxLength)), t.pattern && !new RegExp(t.pattern).test(e) && n.push(c.textPatternMismatch), n);
472
+ return t.minLength !== void 0 && t.maxLength !== void 0 && t.minLength > t.maxLength && n.push(l.invalidTextLengthRange), e.length === 0 ? n : (t.minLength !== void 0 && e.length < t.minLength && n.push(l.minLength(t.minLength)), t.maxLength !== void 0 && e.length > t.maxLength && n.push(l.maxLength(t.maxLength)), t.pattern && !new RegExp(t.pattern).test(e) && n.push(l.textPatternMismatch), n);
479
473
  },
480
474
  describe(e, t) {
481
- return b("text-field", e, {
475
+ return y("text-field", e, {
482
476
  value: t.state.value,
483
477
  placeholder: e.placeholder ?? "",
484
478
  minLength: e.minLength,
@@ -488,23 +482,23 @@ var a = {
488
482
  errors: t.state.errors
489
483
  });
490
484
  }
491
- }, P = i.object({
485
+ }, N = i.object({
492
486
  kind: i.string().min(1),
493
487
  label: i.string().min(1),
494
488
  required: i.boolean().optional()
495
- }).passthrough(), re = i.object({
489
+ }).passthrough(), P = i.object({
496
490
  kind: i.literal("series"),
497
491
  ...g,
498
- field1: P,
499
- field2: P,
492
+ field1: N,
493
+ field2: N,
500
494
  minPoints: i.number().int().nonnegative().optional(),
501
495
  maxPoints: i.number().int().nonnegative().optional()
502
- }), ie = "This field is required.", F = (e) => e.toISOString().slice(0, 10), I = {
503
- text: N,
504
- number: j,
505
- date: O,
506
- category: S
507
- }, L = (e) => I[e], R = (e) => {
496
+ }), F = "This field is required.", I = (e) => e.toISOString().slice(0, 10), L = {
497
+ text: M,
498
+ number: A,
499
+ date: D,
500
+ category: x
501
+ }, R = (e) => L[e], ne = (e) => {
508
502
  if (e == null || e === "") return null;
509
503
  if (typeof e == "boolean") return e;
510
504
  if (typeof e == "string") {
@@ -513,19 +507,19 @@ var a = {
513
507
  }
514
508
  return !!e;
515
509
  }, z = (e, t) => {
516
- if (e.kind === x.kind) return R(t);
517
- let n = L(e.kind);
510
+ if (e.kind === b.kind) return ne(t);
511
+ let n = R(e.kind);
518
512
  return n?.normalizeValue ? n.normalizeValue(t, e) : t;
519
513
  }, B = (e, t) => {
520
514
  if (t == null) return null;
521
- if (e.kind === "date" && t instanceof Date) return F(t);
522
- let n = L(e.kind);
515
+ if (e.kind === "date" && t instanceof Date) return I(t);
516
+ let n = R(e.kind);
523
517
  return n?.serializeValue ? n.serializeValue(t, e) : t;
524
- }, ae = (e, t) => t == null ? !0 : typeof t == "string" ? t.trim().length === 0 : e.kind === x.kind ? t == null : !1, V = (e, t) => {
525
- if (e.required && ae(e, t)) return [ie];
526
- if (e.kind === x.kind) {
518
+ }, re = (e, t) => t == null ? !0 : typeof t == "string" ? t.trim().length === 0 : e.kind === b.kind ? t == null : !1, V = (e, t) => {
519
+ if (e.required && re(e, t)) return [F];
520
+ if (e.kind === b.kind) {
527
521
  if (t === null) return [];
528
- let n = x.validate?.(t, e, {
522
+ let n = b.validate?.(t, e, {
529
523
  field: {
530
524
  ...e,
531
525
  id: e.label
@@ -537,7 +531,7 @@ var a = {
537
531
  });
538
532
  return Array.isArray(n) ? n : [];
539
533
  }
540
- let n = L(e.kind);
534
+ let n = R(e.kind);
541
535
  if (!n?.validate) return [];
542
536
  let r = n.validate(t, e, {
543
537
  field: {
@@ -555,7 +549,7 @@ var a = {
555
549
  field1: e[0],
556
550
  field2: e[1]
557
551
  } : null;
558
- if (!E(e)) return null;
552
+ if (!T(e)) return null;
559
553
  if ("field1" in e || "field2" in e) return {
560
554
  field1: e.field1,
561
555
  field2: e.field2
@@ -573,10 +567,10 @@ var a = {
573
567
  } : null;
574
568
  }, G = (e, t) => {
575
569
  let n = /* @__PURE__ */ new Set();
576
- return t.minPoints !== void 0 && t.maxPoints !== void 0 && t.minPoints > t.maxPoints && n.add(c.invalidPointCountRange), t.minPoints !== void 0 && e.length < t.minPoints && n.add(c.minPoints(t.minPoints)), t.maxPoints !== void 0 && e.length > t.maxPoints && n.add(c.maxPoints(t.maxPoints)), n;
570
+ return t.minPoints !== void 0 && t.maxPoints !== void 0 && t.minPoints > t.maxPoints && n.add(l.invalidPointCountRange), t.minPoints !== void 0 && e.length < t.minPoints && n.add(l.minPoints(t.minPoints)), t.maxPoints !== void 0 && e.length > t.maxPoints && n.add(l.maxPoints(t.maxPoints)), n;
577
571
  }, K = {
578
572
  kind: "series",
579
- schema: re,
573
+ schema: P,
580
574
  getDefaultValue(e) {
581
575
  return Array.isArray(e.defaultValue) ? e.defaultValue.map((t) => W(t, e)).filter((e) => e !== null) : [];
582
576
  },
@@ -597,8 +591,8 @@ var a = {
597
591
  }), [...n];
598
592
  },
599
593
  describe(e, t) {
600
- return b("series-field", e, {
601
- value: Array.isArray(t.state.value) ? t.state.value.map((t) => E(t) ? {
594
+ return y("series-field", e, {
595
+ value: Array.isArray(t.state.value) ? t.state.value.map((t) => T(t) ? {
602
596
  field1: B(e.field1, t.field1),
603
597
  field2: B(e.field2, t.field2)
604
598
  } : t) : [],
@@ -625,10 +619,10 @@ var a = {
625
619
  return e == null || e === "" ? null : typeof e == "string" || typeof e == "number" || typeof e == "boolean" || typeof e == "bigint" ? `${e}` : null;
626
620
  },
627
621
  validate(e, t) {
628
- return e === null || t.options.map((e) => typeof e == "string" ? e : e.value).includes(e) ? [] : [c.categoryOptionMismatch];
622
+ return e === null || t.options.map((e) => typeof e == "string" ? e : e.value).includes(e) ? [] : [l.categoryOptionMismatch];
629
623
  },
630
624
  describe(e, t) {
631
- return b("single-choice-field", e, {
625
+ return y("single-choice-field", e, {
632
626
  value: t.state.value,
633
627
  options: e.options,
634
628
  layout: e.layout ?? "vertical",
@@ -646,7 +640,7 @@ var a = {
646
640
  showClassProbabilities: i.boolean().optional().default(!0)
647
641
  }),
648
642
  resolvePayload(t, n) {
649
- return e(n.report, n.result) ?? y(n.result, o.classifier);
643
+ return e(n.report, n.result);
650
644
  },
651
645
  describe(e, t) {
652
646
  return t.state.status === "idle" && t.payload === void 0 ? null : {
@@ -675,7 +669,7 @@ var a = {
675
669
  precision: i.number().int().nonnegative().optional().default(2)
676
670
  }),
677
671
  resolvePayload(t, n) {
678
- return e(n.report, n.result) ?? y(n.result, o.regressor);
672
+ return e(n.report, n.result);
679
673
  },
680
674
  describe(e, t) {
681
675
  return t.state.status === "idle" && t.payload === void 0 ? null : {
@@ -694,7 +688,7 @@ var a = {
694
688
  }
695
689
  };
696
690
  }
697
- }, X = (e) => e.kind === "mapped-category" ? e.config : null, Z = (e, n) => e.getField(n) ?? e.getField(t(n)), oe = async (e, t) => {
691
+ }, X = (e) => e.kind === "mapped-category" ? e.config : null, Z = (e, n) => e.getField(n) ?? e.getField(t(n)), ie = async (e, t) => {
698
692
  let n = t.getField(e.fieldId);
699
693
  if (!n) return;
700
694
  let r = X(n);
@@ -718,35 +712,35 @@ var a = {
718
712
  }
719
713
  },
720
714
  async onValuesChanged(e, t) {
721
- await oe(e, t);
715
+ await ie(e, t);
722
716
  }
723
- }), se = [
724
- N,
725
- j,
717
+ }), ae = [
718
+ M,
719
+ A,
720
+ b,
726
721
  x,
727
722
  S,
728
- C,
729
- T,
730
- O,
723
+ w,
724
+ D,
731
725
  K,
732
- k,
726
+ O,
733
727
  q,
734
- A,
735
- M
736
- ], $ = [J, Y], ce = (e, t) => {
728
+ k,
729
+ j
730
+ ], oe = [J, Y], $ = (e, t) => {
737
731
  !t.describe || e.getField(t.kind) || e.registerField({
738
732
  kind: t.kind,
739
733
  describe: t.describe
740
734
  });
741
- }, le = (e, t) => {
735
+ }, se = (e, t) => {
742
736
  !t.describe || e.getReport(t.kind) || e.registerReport({
743
737
  kind: t.kind,
744
738
  describe: t.describe
745
739
  });
746
- }, ue = () => n().registerReport(J).registerReport(Y), de = () => {
740
+ }, ce = () => n().registerReport(J).registerReport(Y), le = () => {
747
741
  let e = n(), t = r();
748
- for (let n of se) e.registerField(n), ce(t, n);
749
- for (let n of $) e.registerReport(n), le(t, n);
742
+ for (let n of ae) e.registerField(n), $(t, n);
743
+ for (let n of oe) e.registerReport(n), se(t, n);
750
744
  return {
751
745
  registry: e,
752
746
  descriptorRegistry: t,
@@ -754,4 +748,4 @@ var a = {
754
748
  };
755
749
  };
756
750
  //#endregion
757
- export { c as C, s as S, x as _, J as a, te as b, N as c, A as d, k as f, S as g, C as h, Y as i, M as l, T as m, de as n, q as o, O as p, Q as r, K as s, ue as t, j as u, ee as v, a as x, o as y };
751
+ export { l as S, b as _, J as a, a as b, M as c, k as d, O as f, x as g, S as h, Y as i, j as l, w as m, le as n, q as o, D as p, Q as r, K as s, ce as t, A as u, o as v, s as x, c as y };
@@ -1,2 +1,2 @@
1
- import { C as e, S as t, _ as n, a as r, b as i, c as a, d as o, f as s, g as c, h as l, i as u, l as d, m as f, n as p, o as m, p as h, r as g, s as _, t as v, u as y, v as b, x, y as S } from "../builtins-DQTX_dwn.js";
2
- export { n as booleanFieldDefinition, b as builtinFieldKinds, S as builtinLegacyOutputTypes, i as builtinReportFallbacks, x as builtinReportKinds, t as builtinReportLabels, e as builtinValidationMessages, c as categoryFieldDefinition, r as classifierReportDefinition, v as createBuiltinMlRegistry, g as createMappedCategoryBehavior, p as createMlRegistryPack, h as dateFieldDefinition, s as longTextFieldDefinition, l as mappedCategoryFieldDefinition, o as multiChoiceFieldDefinition, y as numberFieldDefinition, f as oneHotCategoryFieldDefinition, d as ratingFieldDefinition, u as regressorReportDefinition, _ as seriesFieldDefinition, m as singleChoiceFieldDefinition, a as textFieldDefinition };
1
+ import { S as e, _ as t, a as n, b as r, c as i, d as a, f as o, g as s, h as c, i as l, l as u, m as d, n as f, o as p, p as m, r as h, s as g, t as _, u as v, v as y, x as b, y as x } from "../builtins-STiTwaH9.js";
2
+ export { t as booleanFieldDefinition, y as builtinFieldKinds, x as builtinReportFallbacks, r as builtinReportKinds, b as builtinReportLabels, e as builtinValidationMessages, s as categoryFieldDefinition, n as classifierReportDefinition, _ as createBuiltinMlRegistry, h as createMappedCategoryBehavior, f as createMlRegistryPack, m as dateFieldDefinition, o as longTextFieldDefinition, c as mappedCategoryFieldDefinition, a as multiChoiceFieldDefinition, v as numberFieldDefinition, d as oneHotCategoryFieldDefinition, u as ratingFieldDefinition, l as regressorReportDefinition, g as seriesFieldDefinition, p as singleChoiceFieldDefinition, i as textFieldDefinition };
@@ -1,6 +1,6 @@
1
- import { _ as e, t } from "../runtime-BxMSso-p.js";
2
- import { m as n, s as r } from "../schema-D9V7-AkU.js";
3
- import { n as i } from "../builtins-DQTX_dwn.js";
1
+ import { _ as e, t } from "../runtime-Eo_q4pgg.js";
2
+ import { m as n, s as r } from "../schema-CNKKJZRx.js";
3
+ import { n as i } from "../builtins-STiTwaH9.js";
4
4
  import { _ as a, a as o, h as s, l as c, m as l, p as u, r as d, t as f } from "../primitives-BcXt2QWI.js";
5
5
  import { d as p, h as m, r as h } from "../design-Dr7o4rR9.js";
6
6
  import { LitElement as g, css as _, html as v, nothing as y } from "lit";
@@ -1,3 +1,3 @@
1
- import { _ as e, a as t, c as n, d as r, f as i, g as a, h as o, i as s, l as c, m as l, n as u, o as d, p as f, r as p, s as m, t as h, u as g, v as _ } from "../runtime-BxMSso-p.js";
2
- import { J as v, Y as y } from "../transport-BG3HPc3-.js";
1
+ import { _ as e, a as t, c as n, d as r, f as i, g as a, h as o, i as s, l as c, m as l, n as u, o as d, p as f, r as p, s as m, t as h, u as g, v as _ } from "../runtime-Eo_q4pgg.js";
2
+ import { J as v, Y as y } from "../transport-Cloa_erk.js";
3
3
  export { r as EngineError, i as RegistryError, f as ReportPayloadError, l as SubmissionAbortedError, o as SubmitError, v as TransportError, a as ValidationError, h as createForm, h as createFormRuntime, m as createMultiBackendSubmissionSnapshot, n as createSubmissionSnapshot, u as defaultEquality, e as executeFormPipeline, d as executeMultiBackendPipeline, _ as executeReportFetches, c as identity, g as isPromiseLike, p as shallowArrayEquality, s as shallowEquality, t as shallowObjectEquality, y as transportErrorCodes };
@@ -1,2 +1,2 @@
1
- import { a as e, c as t, d as n, f as r, i, l as a, m as o, n as s, o as c, p as l, r as u, s as d, t as f, u as p } from "../schema-D9V7-AkU.js";
2
- export { p as MissingReportMappedToError, c as RegistryError, d as createRegistry, s as createReportContexts, f as createReportFetchRequest, t as defineFieldDefinition, a as defineReportDefinition, u as getReportContext, n as mappedToKey, e as normalizeSchema, o as normalizeSchemaId, r as resolveMappedReportPayload, l as resolveMappedTo, i as resolveOneHotDisplayValue };
1
+ import { a as e, c as t, d as n, f as r, i, l as a, m as o, n as s, o as c, p as l, r as u, s as d, t as f, u as p } from "../schema-CNKKJZRx.js";
2
+ export { c as RegistryError, d as createRegistry, s as createReportContexts, f as createReportFetchRequest, t as defineFieldDefinition, a as defineReportDefinition, u as getReportContext, p as mappedToKey, e as normalizeSchema, o as normalizeSchemaId, n as resolveMappedReportPayload, r as resolveMappedTargets, l as resolveMappedTo, i as resolveOneHotDisplayValue };
@@ -1,2 +1,2 @@
1
- import { A as e, B as t, C as n, D as r, E as i, F as a, G as o, H as s, I as c, J as l, K as u, L as d, M as f, N as p, O as m, P as h, R as g, S as _, T as v, U as y, V as b, W as x, Y as S, _ as C, a as w, b as T, c as E, d as D, f as O, g as k, h as A, i as j, j as M, k as N, l as P, m as F, n as I, o as L, p as R, q as z, r as B, s as V, t as H, u as U, v as W, w as G, x as K, y as q, z as J } from "../transport-BG3HPc3-.js";
1
+ import { A as e, B as t, C as n, D as r, E as i, F as a, G as o, H as s, I as c, J as l, K as u, L as d, M as f, N as p, O as m, P as h, R as g, S as _, T as v, U as y, V as b, W as x, Y as S, _ as C, a as w, b as T, c as E, d as D, f as O, g as k, h as A, i as j, j as M, k as N, l as P, m as F, n as I, o as L, p as R, q as z, r as B, s as V, t as H, u as U, v as W, w as G, x as K, y as q, z as J } from "../transport-Cloa_erk.js";
2
2
  export { l as TransportError, t as assertPayloadWithinLimits, b as assertTransportCapabilities, s as cloneCapabilities, w as createFallbackTransport, V as createFanoutTransport, h as createGraphqlTransport, r as createGrpcSessionTransport, m as createGrpcStreamTransport, N as createGrpcTransport, e as createGrpcUnaryTransport, I as createHedgedTransport, a as createJsonTransport, E as createLoadBalancedTransport, C as createMemoryCircuitBreakerState, A as createMemorySharedRateLimiter, O as createMemoryTransportCacheStore, H as createMemoryTransportHealthState, j as createPipelineTransport, L as createQuorumFanoutTransport, B as createRacingTransport, P as createRoutingTransport, f as createSessionTransport, p as createSseTransport, c as createTransportRequestRunner, M as createWebSocketSessionTransport, U as createWeightedRoutingTransport, d as extractErrorMessage, g as getTransportPolicyContext, y as inferTransportCapabilities, x as mergeTransportCapabilities, o as normalizeTransportCapabilities, i as pipe, u as transportDefaults, S as transportErrorCodes, z as transportErrorMessages, W as withAuth, D as withCache, k as withCircuitBreaker, R as withDedup, K as withLogging, q as withMetrics, F as withRateLimit, _ as withRequestTransform, n as withResponseTransform, v as withRetry, G as withTimeout, T as withTracing, J as withTransportPolicyContext };