@gridkitjs/forms-core 0.0.0-dev-20261206092422 → 0.0.0-dev-20261206115313

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/dist/index.js CHANGED
@@ -38,6 +38,171 @@ function booleanParser(words) {
38
38
  };
39
39
  }
40
40
 
41
+ // src/choice/multi.ts
42
+ function valueKeys(value) {
43
+ return value ?? [];
44
+ }
45
+ function toKeyList(keys) {
46
+ return keys.length === 0 ? null : keys;
47
+ }
48
+ function hasKey(value, key) {
49
+ return valueKeys(value).some((held) => Object.is(held, key));
50
+ }
51
+ function sameKeys(a, b) {
52
+ const left = valueKeys(a);
53
+ const right = valueKeys(b);
54
+ return left.length === right.length && left.every((key, index) => Object.is(key, right[index]));
55
+ }
56
+ function canAddKey(value, maxCount) {
57
+ return maxCount === null || valueKeys(value).length < maxCount;
58
+ }
59
+ function addKeys(value, keys, maxCount = null) {
60
+ const next2 = [...valueKeys(value)];
61
+ for (const key of keys) {
62
+ if (!canAddKey(next2, maxCount)) {
63
+ break;
64
+ }
65
+ if (!next2.some((held) => Object.is(held, key))) {
66
+ next2.push(key);
67
+ }
68
+ }
69
+ return next2.length === valueKeys(value).length ? value : next2;
70
+ }
71
+ function removeKeys(value, keys) {
72
+ const held = valueKeys(value);
73
+ const next2 = held.filter((key) => !keys.some((gone) => Object.is(gone, key)));
74
+ return next2.length === held.length ? value : toKeyList(next2);
75
+ }
76
+ function toggleKey(value, key, maxCount = null) {
77
+ return hasKey(value, key) ? removeKeys(value, [key]) : addKeys(value, [key], maxCount);
78
+ }
79
+ function rangeKeys(rows, from, to) {
80
+ const keys = [];
81
+ for (let index = Math.min(from, to); index <= Math.max(from, to); index++) {
82
+ const row = rows[index];
83
+ if (row?.kind === "option" && row.option.disabled !== true) {
84
+ keys.push(row.option.value);
85
+ }
86
+ }
87
+ return keys;
88
+ }
89
+ function enabledKeys(scope) {
90
+ return scope.filter((option) => option.disabled !== true).map((option) => option.value);
91
+ }
92
+ function scopeState(value, scope) {
93
+ const keys = enabledKeys(scope);
94
+ const chosen2 = keys.filter((key) => hasKey(value, key)).length;
95
+ if (chosen2 === 0) {
96
+ return "none";
97
+ }
98
+ return chosen2 === keys.length ? "all" : "some";
99
+ }
100
+ function canSelectAll(value, scope, maxCount) {
101
+ if (maxCount === null) {
102
+ return true;
103
+ }
104
+ const missing = enabledKeys(scope).filter((key) => !hasKey(value, key));
105
+ return valueKeys(value).length + missing.length <= maxCount;
106
+ }
107
+ function selectAll(value, scope, maxCount = null) {
108
+ const keys = enabledKeys(scope);
109
+ if (scopeState(value, scope) === "all") {
110
+ return removeKeys(value, keys);
111
+ }
112
+ return canSelectAll(value, scope, maxCount) ? addKeys(value, keys) : value;
113
+ }
114
+ function clearKeys(value, locked) {
115
+ return removeKeys(
116
+ value,
117
+ valueKeys(value).filter((key) => !locked(key))
118
+ );
119
+ }
120
+ function keyChanges(previous, next2) {
121
+ return {
122
+ added: valueKeys(next2).filter((key) => !hasKey(previous, key)),
123
+ removed: valueKeys(previous).filter((key) => !hasKey(next2, key))
124
+ };
125
+ }
126
+
127
+ // src/choice/options.ts
128
+ function sameKey(a, b) {
129
+ return Object.is(a, b);
130
+ }
131
+ function keyText(key) {
132
+ return String(key);
133
+ }
134
+ function standInOption(key) {
135
+ return { value: key, label: keyText(key) };
136
+ }
137
+ function findDuplicateKeys(options) {
138
+ const seen = /* @__PURE__ */ new Set();
139
+ const duplicates = /* @__PURE__ */ new Set();
140
+ for (const option of options) {
141
+ const text = keyText(option.value);
142
+ if (seen.has(text)) {
143
+ duplicates.add(text);
144
+ } else {
145
+ seen.add(text);
146
+ }
147
+ }
148
+ return [...duplicates];
149
+ }
150
+ function flattenOptions(options, actions = {}) {
151
+ const groups2 = /* @__PURE__ */ new Map();
152
+ for (const option of options) {
153
+ const group = option.group ?? null;
154
+ const members = groups2.get(group);
155
+ if (members === void 0) {
156
+ groups2.set(group, [option]);
157
+ } else {
158
+ members.push(option);
159
+ }
160
+ }
161
+ const rows = (actions.start ?? []).map(actionRow);
162
+ let position = 0;
163
+ for (const [group, members] of groups2) {
164
+ if (group !== null) {
165
+ rows.push({ kind: "header", label: group, size: members.length });
166
+ }
167
+ for (const option of members) {
168
+ rows.push({ kind: "option", option, group, position });
169
+ position += 1;
170
+ }
171
+ }
172
+ rows.push(...(actions.end ?? []).map(actionRow));
173
+ return rows;
174
+ }
175
+ function actionRow(action) {
176
+ return { kind: "action", action };
177
+ }
178
+
179
+ // src/choice/details.ts
180
+ function choiceDetails(value, previous, optionOf, query) {
181
+ const known = (key) => optionOf(key) ?? standInOption(key);
182
+ const { added, removed } = keyChanges(previous, value);
183
+ return {
184
+ options: valueKeys(value).map(known),
185
+ previousOptions: valueKeys(previous).map(known),
186
+ added: added.map(known),
187
+ removed: removed.map(known),
188
+ unknownKeys: valueKeys(value).filter((key) => optionOf(key) === null),
189
+ query
190
+ };
191
+ }
192
+ function singleChoiceDetails(value, previous, optionOf, query) {
193
+ const details = choiceDetails(
194
+ value === null ? null : [value],
195
+ previous === null ? null : [previous],
196
+ optionOf,
197
+ query
198
+ );
199
+ return {
200
+ ...details,
201
+ option: details.options[0] ?? null,
202
+ previousOption: details.previousOptions[0] ?? null
203
+ };
204
+ }
205
+
41
206
  // src/localeKey.ts
42
207
  function localeKey(locale) {
43
208
  if (locale === void 0) {
@@ -46,6 +211,1030 @@ function localeKey(locale) {
46
211
  return typeof locale === "string" || locale instanceof Intl.Locale ? String(locale) : locale.map(String).join(",");
47
212
  }
48
213
 
214
+ // src/choice/match.ts
215
+ var DEFAULT_MATCH_FIELDS = ["label", "keywords"];
216
+ var MARKS = /\p{Mn}/gu;
217
+ var FOLDED_MARK_BASE = /^[\p{Script=Latin}\p{Script=Greek}\p{Script=Cyrillic}\p{Script=Hebrew}\p{Script=Arabic}]/u;
218
+ var WHITESPACE = /\s+/u;
219
+ var segmenters = /* @__PURE__ */ new Map();
220
+ function segmenter(locale, granularity) {
221
+ const key = `${granularity}|${localeKey(locale)}`;
222
+ let found = segmenters.get(key);
223
+ if (found === void 0) {
224
+ found = new Intl.Segmenter(locale, { granularity });
225
+ segmenters.set(key, found);
226
+ }
227
+ return found;
228
+ }
229
+ var dotlessILocales = /* @__PURE__ */ new Map();
230
+ function keepsDotlessI(locale) {
231
+ const key = localeKey(locale);
232
+ let keeps = dotlessILocales.get(key);
233
+ if (keeps === void 0) {
234
+ const language = segmenter(locale, "grapheme").resolvedOptions().locale.split("-")[0];
235
+ keeps = language === "tr" || language === "az";
236
+ dotlessILocales.set(key, keeps);
237
+ }
238
+ return keeps;
239
+ }
240
+ var PLAIN_ASCII = /^[\x20-\x7e]*$/;
241
+ var SINGLE_UNIT_GRAPHEMES = /^[\x20-\x7e\xa0-\u02ff]*$/;
242
+ function graphemes(text, locale) {
243
+ return SINGLE_UNIT_GRAPHEMES.test(text) ? Array.from(text, (segment, index) => ({ segment, index })) : segmenter(locale, "grapheme").segment(text);
244
+ }
245
+ function lowerAscii(text, dotlessI) {
246
+ return (dotlessI ? text.replaceAll("I", "\u0131") : text).toLowerCase();
247
+ }
248
+ function foldGrapheme(grapheme, locale, dotlessI) {
249
+ if (PLAIN_ASCII.test(grapheme)) {
250
+ return lowerAscii(grapheme, dotlessI);
251
+ }
252
+ let folded = grapheme.normalize("NFC").toLocaleLowerCase(locale).normalize("NFKD");
253
+ if (FOLDED_MARK_BASE.test(folded)) {
254
+ folded = folded.replace(MARKS, "");
255
+ }
256
+ if (!dotlessI) {
257
+ folded = folded.replaceAll("\u0131", "i");
258
+ }
259
+ return folded.replaceAll("\u03C2", "\u03C3");
260
+ }
261
+ function foldText(text, locale) {
262
+ const folded = fold(text, locale);
263
+ if (folded.starts !== null) {
264
+ return folded;
265
+ }
266
+ const starts = Array.from({ length: text.length }, (_, unit) => unit);
267
+ return {
268
+ text: folded.text,
269
+ starts,
270
+ ends: starts.map((unit) => unit + 1)
271
+ };
272
+ }
273
+ function fold(text, locale) {
274
+ const dotlessI = keepsDotlessI(locale);
275
+ if (PLAIN_ASCII.test(text)) {
276
+ return { text: lowerAscii(text, dotlessI), starts: null, ends: null };
277
+ }
278
+ let folded = "";
279
+ const starts = [];
280
+ const ends = [];
281
+ for (const { segment, index } of graphemes(text, locale)) {
282
+ const part = foldGrapheme(segment, locale, dotlessI);
283
+ folded += part;
284
+ const end = index + segment.length;
285
+ for (let unit = 0; unit < part.length; unit++) {
286
+ starts.push(index);
287
+ ends.push(end);
288
+ }
289
+ }
290
+ return { text: folded, starts, ends };
291
+ }
292
+ function foldField(text, locale) {
293
+ return { original: text, folded: fold(text, locale), wordStarts: null };
294
+ }
295
+ function startOf(folded, unit) {
296
+ return folded.starts === null ? unit : folded.starts[unit] ?? 0;
297
+ }
298
+ function endOf(folded, unit) {
299
+ return folded.ends === null ? unit + 1 : folded.ends[unit] ?? 0;
300
+ }
301
+ function wordStartsOf(field, locale) {
302
+ if (field.wordStarts !== null) {
303
+ return field.wordStarts;
304
+ }
305
+ const { folded } = field;
306
+ const length = folded.text.length;
307
+ const found = [];
308
+ let unit = 0;
309
+ for (const { index, isWordLike } of segmenter(locale, "word").segment(
310
+ field.original
311
+ )) {
312
+ while (unit < length && startOf(folded, unit) < index) {
313
+ unit += 1;
314
+ }
315
+ if (isWordLike === true && unit < length) {
316
+ found.push(unit);
317
+ }
318
+ }
319
+ field.wordStarts = found;
320
+ return found;
321
+ }
322
+ function originalRange(folded, start, length) {
323
+ return [startOf(folded, start), endOf(folded, start + length - 1)];
324
+ }
325
+ function findIn(field, query, mode, locale) {
326
+ const { folded } = field;
327
+ let start;
328
+ switch (mode) {
329
+ case "contains":
330
+ start = folded.text.indexOf(query);
331
+ break;
332
+ case "startsWith":
333
+ start = folded.text.startsWith(query) ? 0 : -1;
334
+ break;
335
+ case "words":
336
+ start = wordStartsOf(field, locale).find(
337
+ (at) => folded.text.startsWith(query, at)
338
+ ) ?? -1;
339
+ break;
340
+ }
341
+ return start === -1 ? null : originalRange(folded, start, query.length);
342
+ }
343
+ function joinRanges(ranges) {
344
+ const sorted = [...ranges].sort((a, b) => a[0] - b[0] || a[1] - b[1]);
345
+ const joined = [];
346
+ for (const [start, end] of sorted) {
347
+ const last = joined.at(-1);
348
+ if (last !== void 0 && start <= last[1]) {
349
+ last[1] = Math.max(last[1], end);
350
+ } else {
351
+ joined.push([start, end]);
352
+ }
353
+ }
354
+ return joined;
355
+ }
356
+ function queryParts(query, mode, locale) {
357
+ const folded = foldText(query.trim(), locale).text;
358
+ if (folded === "") {
359
+ return [];
360
+ }
361
+ return mode === "words" ? folded.split(WHITESPACE).filter((word) => word !== "") : [folded];
362
+ }
363
+ function matchParts(field, parts, mode, locale) {
364
+ const ranges = [];
365
+ for (const part of parts) {
366
+ const range = findIn(field, part, mode, locale);
367
+ if (range === null) {
368
+ return null;
369
+ }
370
+ ranges.push(range);
371
+ }
372
+ return joinRanges(ranges);
373
+ }
374
+ function matchText(text, query, mode, locale) {
375
+ const parts = queryParts(query, mode, locale);
376
+ if (parts.length === 0) {
377
+ return [];
378
+ }
379
+ return matchParts(foldField(text, locale), parts, mode, locale);
380
+ }
381
+ function fieldTexts(option, field) {
382
+ switch (field) {
383
+ case "label":
384
+ return [option.label];
385
+ case "description":
386
+ return option.description === void 0 ? [] : [option.description];
387
+ case "keywords":
388
+ return option.keywords ?? [];
389
+ default: {
390
+ const text = option.columns?.[field];
391
+ return text === void 0 ? [] : [text];
392
+ }
393
+ }
394
+ }
395
+ function foldOption(option, fields, locale) {
396
+ return fields.map((field) => ({
397
+ field,
398
+ texts: fieldTexts(option, field).map((text) => foldField(text, locale))
399
+ }));
400
+ }
401
+ function rangesFor(field, ranges) {
402
+ return field === "keywords" ? [] : ranges;
403
+ }
404
+ function matchFolded(option, parts, mode, locale) {
405
+ if (parts.length === 0) {
406
+ return { fields: {} };
407
+ }
408
+ if (mode !== "words") {
409
+ const fields2 = {};
410
+ for (const { field, texts } of option) {
411
+ for (const text of texts) {
412
+ const ranges = matchParts(text, parts, mode, locale);
413
+ if (ranges !== null) {
414
+ fields2[field] = rangesFor(field, ranges);
415
+ break;
416
+ }
417
+ }
418
+ }
419
+ return Object.keys(fields2).length === 0 ? null : { fields: fields2 };
420
+ }
421
+ const found = /* @__PURE__ */ new Map();
422
+ for (const part of parts) {
423
+ let matched = false;
424
+ for (const { field, texts } of option) {
425
+ for (const text of texts) {
426
+ const range = findIn(text, part, mode, locale);
427
+ if (range !== null) {
428
+ const ranges = found.get(field) ?? [];
429
+ ranges.push(range);
430
+ found.set(field, ranges);
431
+ matched = true;
432
+ }
433
+ }
434
+ }
435
+ if (!matched) {
436
+ return null;
437
+ }
438
+ }
439
+ const fields = {};
440
+ for (const [field, ranges] of found) {
441
+ fields[field] = rangesFor(field, joinRanges(ranges));
442
+ }
443
+ return { fields };
444
+ }
445
+ function matchOption(option, query, context) {
446
+ const { mode, locale, fields } = context;
447
+ return matchFolded(
448
+ foldOption(option, fields, locale),
449
+ queryParts(query, mode, locale),
450
+ mode,
451
+ locale
452
+ );
453
+ }
454
+ function createOptionIndex(options, fields, locale) {
455
+ const folded = /* @__PURE__ */ new Map();
456
+ const indexOf = /* @__PURE__ */ new Map();
457
+ options.forEach((option, index) => {
458
+ if (!indexOf.has(option)) {
459
+ indexOf.set(option, index);
460
+ }
461
+ });
462
+ const foldedAt = (index, option) => {
463
+ let found = folded.get(index);
464
+ if (found === void 0) {
465
+ found = foldOption(option, fields, locale);
466
+ folded.set(index, found);
467
+ }
468
+ return found;
469
+ };
470
+ const matchAt = (index, query, mode) => {
471
+ const option = options[index];
472
+ return option === void 0 ? null : matchFolded(
473
+ foldedAt(index, option),
474
+ queryParts(query, mode, locale),
475
+ mode,
476
+ locale
477
+ );
478
+ };
479
+ const search = (query, mode, matcher) => {
480
+ const parts = queryParts(query, mode, locale);
481
+ const defaultMatch = (option, asked) => {
482
+ const index = indexOf.get(option);
483
+ if (index === void 0) {
484
+ return matchOption(option, asked, { mode, locale, fields });
485
+ }
486
+ return asked === query ? matchFolded(foldedAt(index, option), parts, mode, locale) : matchAt(index, asked, mode);
487
+ };
488
+ const context = { mode, locale, fields, defaultMatch };
489
+ const hits = [];
490
+ options.forEach((option, index) => {
491
+ const match = matcher === void 0 ? matchFolded(foldedAt(index, option), parts, mode, locale) : matcherResult(matcher(option, query, context));
492
+ if (match !== null) {
493
+ hits.push({ option, index, match });
494
+ }
495
+ });
496
+ return hits;
497
+ };
498
+ return { options, matchAt, search };
499
+ }
500
+ function matcherResult(result) {
501
+ if (result === true) {
502
+ return { fields: {} };
503
+ }
504
+ return result === false ? null : result;
505
+ }
506
+
507
+ // src/typeahead.ts
508
+ function typeaheadIndex(labels, from, query) {
509
+ const typed = query.toLowerCase();
510
+ const firstCodePoint = typed.codePointAt(0);
511
+ if (firstCodePoint === void 0) {
512
+ return -1;
513
+ }
514
+ const first = String.fromCodePoint(firstCodePoint);
515
+ const repeated = typed.replaceAll(first, "") === "";
516
+ const prefix = repeated ? first : typed;
517
+ const start = repeated ? from + 1 : Math.max(from, 0);
518
+ for (let offset2 = 0; offset2 < labels.length; offset2++) {
519
+ const index = (start + offset2) % labels.length;
520
+ if (labels[index]?.toLowerCase().startsWith(prefix) === true) {
521
+ return index;
522
+ }
523
+ }
524
+ return -1;
525
+ }
526
+
527
+ // src/choice/moveActive.ts
528
+ function isLandingRow(row, disabledOptions) {
529
+ return row.kind !== "header" && (!row.disabled || disabledOptions === "focus");
530
+ }
531
+ function findLanding(rows, start, step2, stop, disabledOptions) {
532
+ for (let index = start; index !== stop; index += step2) {
533
+ const row = rows[index];
534
+ if (row !== void 0 && isLandingRow(row, disabledOptions)) {
535
+ return index;
536
+ }
537
+ }
538
+ return null;
539
+ }
540
+ function moveActive(rows, from, move, disabledOptions = "skip") {
541
+ const count = rows.length;
542
+ const first = findLanding(rows, 0, 1, count, disabledOptions);
543
+ if (first === null) {
544
+ return null;
545
+ }
546
+ const last = findLanding(rows, count - 1, -1, -1, disabledOptions) ?? first;
547
+ if (from === null || from < 0 || from >= count) {
548
+ return move.kind === "previous" || move.kind === "last" ? last : first;
549
+ }
550
+ switch (move.kind) {
551
+ case "first":
552
+ return first;
553
+ case "last":
554
+ return last;
555
+ case "next":
556
+ return findLanding(rows, from + 1, 1, count, disabledOptions) ?? from;
557
+ case "previous":
558
+ return findLanding(rows, from - 1, -1, -1, disabledOptions) ?? from;
559
+ case "pageDown": {
560
+ const target = Math.min(from + Math.max(move.rows, 1), count - 1);
561
+ return findLanding(rows, target, 1, count, disabledOptions) ?? findLanding(rows, target - 1, -1, from, disabledOptions) ?? from;
562
+ }
563
+ case "pageUp": {
564
+ const target = Math.max(from - Math.max(move.rows, 1), 0);
565
+ return findLanding(rows, target, -1, -1, disabledOptions) ?? findLanding(rows, target + 1, 1, from, disabledOptions) ?? from;
566
+ }
567
+ }
568
+ }
569
+ function typeaheadRow(rows, from, buffer, locale, disabledOptions = "skip") {
570
+ const labels = rows.map(
571
+ (row) => isLandingRow(row, disabledOptions) ? row.typeahead : ""
572
+ );
573
+ const index = typeaheadIndex(
574
+ labels,
575
+ from ?? -1,
576
+ foldText(buffer, locale).text
577
+ );
578
+ return index === -1 ? null : index;
579
+ }
580
+
581
+ // src/choice/source.ts
582
+ var DEFAULT_SOURCE_DEBOUNCE = 250;
583
+ var DEFAULT_SOURCE_PAGE_SIZE = 50;
584
+ function toOptionPage(answer) {
585
+ return "options" in answer ? answer : { options: answer };
586
+ }
587
+ function canonical(value) {
588
+ switch (typeof value) {
589
+ case "string":
590
+ return JSON.stringify(value);
591
+ case "number":
592
+ case "boolean":
593
+ case "undefined":
594
+ return String(value);
595
+ case "bigint":
596
+ return `${String(value)}n`;
597
+ case "symbol":
598
+ case "function":
599
+ return `<${typeof value}>`;
600
+ case "object":
601
+ if (value === null) {
602
+ return "null";
603
+ }
604
+ if (value instanceof Date) {
605
+ return `Date(${String(value.getTime())})`;
606
+ }
607
+ if (Array.isArray(value)) {
608
+ return `[${value.map(canonical).join(",")}]`;
609
+ }
610
+ return `{${Object.entries(value).filter(([, member]) => member !== void 0).sort(([a], [b]) => a < b ? -1 : a > b ? 1 : 0).map(([key, member]) => `${JSON.stringify(key)}:${canonical(member)}`).join(",")}}`;
611
+ }
612
+ }
613
+ function filtersKey(filters) {
614
+ return canonical(filters);
615
+ }
616
+ function sameFilters(a, b) {
617
+ return filtersKey(a) === filtersKey(b);
618
+ }
619
+ function appendPage(shown, page) {
620
+ return {
621
+ options: shown === null ? page.options : [...shown.options, ...page.options],
622
+ next: page.next ?? null,
623
+ total: page.total ?? shown?.total ?? null
624
+ };
625
+ }
626
+ var SOURCE_IDLE = { kind: "idle" };
627
+ function shownOf(state) {
628
+ switch (state.kind) {
629
+ case "idle":
630
+ return null;
631
+ case "loaded":
632
+ return state.result;
633
+ case "waiting":
634
+ case "loading":
635
+ case "failed":
636
+ return state.shown;
637
+ }
638
+ }
639
+ function sourceReducer(state, action) {
640
+ switch (action.type) {
641
+ case "wait":
642
+ return { kind: "waiting", query: action.query, shown: shownOf(state) };
643
+ case "start":
644
+ return {
645
+ kind: "loading",
646
+ query: action.query,
647
+ request: action.request,
648
+ shown: shownOf(state),
649
+ more: action.more
650
+ };
651
+ case "page":
652
+ if (state.kind !== "loading" || state.request !== action.request) {
653
+ return state;
654
+ }
655
+ return {
656
+ kind: "loaded",
657
+ query: state.query,
658
+ result: appendPage(state.more ? state.shown : null, action.page)
659
+ };
660
+ case "fail":
661
+ if (state.kind !== "loading" || state.request !== action.request) {
662
+ return state;
663
+ }
664
+ return {
665
+ kind: "failed",
666
+ query: state.query,
667
+ request: state.request,
668
+ error: action.error,
669
+ shown: state.shown,
670
+ more: state.more
671
+ };
672
+ case "show":
673
+ return { kind: "loaded", query: action.query, result: action.result };
674
+ case "reset":
675
+ return state.kind === "idle" ? state : SOURCE_IDLE;
676
+ }
677
+ }
678
+
679
+ // src/choice/optionCache.ts
680
+ function createOptionCache(options = {}) {
681
+ const maxQueries = options.maxQueries ?? 50;
682
+ const maxAge = options.maxAge ?? 3e5;
683
+ const now = options.now ?? Date.now;
684
+ const queries = /* @__PURE__ */ new Map();
685
+ const byKey = /* @__PURE__ */ new Map();
686
+ const resolving = /* @__PURE__ */ new Set();
687
+ const missing = /* @__PURE__ */ new Set();
688
+ const pending = /* @__PURE__ */ new Map();
689
+ const listeners = /* @__PURE__ */ new Set();
690
+ let version = 0;
691
+ const notify = () => {
692
+ version += 1;
693
+ for (const listener of [...listeners]) {
694
+ listener();
695
+ }
696
+ };
697
+ const queryKey = (key) => JSON.stringify([key.filters, key.text]);
698
+ const learn = (found) => {
699
+ let learned = false;
700
+ for (const option of found) {
701
+ learned ||= !byKey.has(option.value);
702
+ byKey.set(option.value, option);
703
+ }
704
+ return learned;
705
+ };
706
+ const flush = () => {
707
+ const batches = [...pending.values()];
708
+ pending.clear();
709
+ for (const { keys, request } of batches) {
710
+ const { signal } = request.abort();
711
+ Promise.resolve().then(() => request.resolve(keys, { filters: request.filters, signal })).then(
712
+ (found) => {
713
+ learn(found);
714
+ for (const key of keys) {
715
+ resolving.delete(key);
716
+ if (!byKey.has(key)) {
717
+ missing.add(key);
718
+ }
719
+ }
720
+ notify();
721
+ },
722
+ () => {
723
+ for (const key of keys) {
724
+ resolving.delete(key);
725
+ }
726
+ notify();
727
+ }
728
+ );
729
+ }
730
+ };
731
+ return {
732
+ readPage: (key) => {
733
+ const id = queryKey(key);
734
+ const entry2 = queries.get(id);
735
+ if (entry2 === void 0) {
736
+ return null;
737
+ }
738
+ if (now() - entry2.at > maxAge) {
739
+ queries.delete(id);
740
+ return null;
741
+ }
742
+ queries.delete(id);
743
+ queries.set(id, entry2);
744
+ return entry2.pages.get(JSON.stringify(key.cursor)) ?? null;
745
+ },
746
+ storePage: (key, page) => {
747
+ const id = queryKey(key);
748
+ const existing = queries.get(id);
749
+ const entry2 = key.cursor === null || existing === void 0 ? { at: now(), pages: /* @__PURE__ */ new Map() } : existing;
750
+ entry2.pages.set(JSON.stringify(key.cursor), page);
751
+ queries.delete(id);
752
+ queries.set(id, entry2);
753
+ for (const oldest of queries.keys()) {
754
+ if (queries.size <= maxQueries) {
755
+ break;
756
+ }
757
+ queries.delete(oldest);
758
+ }
759
+ if (learn(page.options)) {
760
+ notify();
761
+ }
762
+ },
763
+ addOptions: (found) => {
764
+ learn(found);
765
+ },
766
+ lookup: (key) => {
767
+ const option = byKey.get(key);
768
+ if (option !== void 0) {
769
+ return { kind: "known", option };
770
+ }
771
+ if (resolving.has(key)) {
772
+ return { kind: "resolving" };
773
+ }
774
+ return missing.has(key) ? { kind: "missing" } : { kind: "unresolved" };
775
+ },
776
+ resolve: (keys, request) => {
777
+ const asked = [...new Set(keys)].filter(
778
+ (key) => !byKey.has(key) && !resolving.has(key) && !missing.has(key)
779
+ );
780
+ if (asked.length === 0) {
781
+ return;
782
+ }
783
+ const id = filtersKey(request.filters);
784
+ const batch = pending.get(id);
785
+ if (batch === void 0) {
786
+ if (pending.size === 0) {
787
+ void Promise.resolve().then(flush);
788
+ }
789
+ pending.set(id, {
790
+ keys: asked,
791
+ request
792
+ });
793
+ } else {
794
+ batch.keys.push(...asked.filter((key) => !batch.keys.includes(key)));
795
+ }
796
+ for (const key of asked) {
797
+ resolving.add(key);
798
+ }
799
+ },
800
+ invalidate: () => {
801
+ queries.clear();
802
+ missing.clear();
803
+ },
804
+ subscribe: (listener) => {
805
+ listeners.add(listener);
806
+ return () => {
807
+ listeners.delete(listener);
808
+ };
809
+ },
810
+ getVersion: () => version
811
+ };
812
+ }
813
+
814
+ // src/choice/sourceController.ts
815
+ function createOptionSourceController(initial) {
816
+ let options = initial;
817
+ const ownCache = createOptionCache();
818
+ let state = SOURCE_IDLE;
819
+ let lastRequest = 0;
820
+ let inFlight = null;
821
+ let cancelWait = null;
822
+ const listeners = /* @__PURE__ */ new Set();
823
+ let cacheSubscription = null;
824
+ const cache2 = () => options.cache ?? ownCache;
825
+ const emit = () => {
826
+ for (const listener of [...listeners]) {
827
+ listener();
828
+ }
829
+ };
830
+ const apply = (action) => {
831
+ state = sourceReducer(state, action);
832
+ };
833
+ const transition = (change) => {
834
+ const before = state;
835
+ change();
836
+ if (state !== before) {
837
+ emit();
838
+ }
839
+ };
840
+ const release = () => {
841
+ cancelWait?.();
842
+ cancelWait = null;
843
+ inFlight?.abort();
844
+ inFlight = null;
845
+ };
846
+ const isLocal = () => options.source.filtering === "local";
847
+ const tooShort = (text) => text.trim().length < (options.source.minQueryLength ?? 0);
848
+ const queryOf = (text) => ({
849
+ text,
850
+ filters: options.filters
851
+ });
852
+ const pageKey = (query, cursor) => ({
853
+ text: isLocal() ? "" : query.text,
854
+ filters: filtersKey(query.filters),
855
+ cursor
856
+ });
857
+ const matches = (option, text) => text.trim() === "" || options.match(option, text);
858
+ const shownResult = (query, page, more) => {
859
+ if (!isLocal()) {
860
+ return appendPage(more, page);
861
+ }
862
+ const kept = page.options.filter((option) => matches(option, query.text));
863
+ return { options: kept, next: null, total: kept.length };
864
+ };
865
+ const fetch = (query, cursor, more) => {
866
+ const key = pageKey(query, cursor);
867
+ const cached = cache2().readPage(key);
868
+ if (cached !== null) {
869
+ apply({ type: "show", query, result: shownResult(query, cached, more) });
870
+ return;
871
+ }
872
+ lastRequest += 1;
873
+ const request = lastRequest;
874
+ const { signal, abort } = options.abort();
875
+ inFlight = { request, abort };
876
+ apply({ type: "start", query, request, more: more !== null });
877
+ const { source } = options;
878
+ Promise.resolve().then(
879
+ () => source.search({
880
+ text: key.text,
881
+ filters: query.filters,
882
+ cursor,
883
+ pageSize: source.pageSize ?? DEFAULT_SOURCE_PAGE_SIZE,
884
+ signal
885
+ })
886
+ ).then(
887
+ (answer) => {
888
+ if (inFlight?.request !== request) {
889
+ return;
890
+ }
891
+ inFlight = null;
892
+ const page = toOptionPage(answer);
893
+ cache2().storePage(key, page);
894
+ transition(() => {
895
+ if (isLocal()) {
896
+ apply({
897
+ type: "show",
898
+ query,
899
+ result: shownResult(query, page, null)
900
+ });
901
+ } else {
902
+ apply({ type: "page", request, page });
903
+ }
904
+ });
905
+ },
906
+ (error) => {
907
+ if (inFlight?.request !== request) {
908
+ return;
909
+ }
910
+ inFlight = null;
911
+ transition(() => {
912
+ apply({ type: "fail", request, error });
913
+ });
914
+ options.onError?.(error, query);
915
+ }
916
+ );
917
+ };
918
+ const ask = (text) => {
919
+ release();
920
+ if (tooShort(text)) {
921
+ apply({ type: "reset" });
922
+ } else {
923
+ fetch(queryOf(text), null, null);
924
+ }
925
+ };
926
+ const subscribeCache = () => {
927
+ cacheSubscription = cache2().subscribe(emit);
928
+ };
929
+ return {
930
+ getState: () => state,
931
+ subscribe: (listener) => {
932
+ listeners.add(listener);
933
+ if (cacheSubscription === null) {
934
+ subscribeCache();
935
+ }
936
+ return () => {
937
+ listeners.delete(listener);
938
+ if (listeners.size === 0) {
939
+ cacheSubscription?.();
940
+ cacheSubscription = null;
941
+ }
942
+ };
943
+ },
944
+ setOptions: (next2) => {
945
+ const previous = options;
946
+ options = next2;
947
+ if ((previous.cache ?? ownCache) !== cache2() && cacheSubscription !== null) {
948
+ cacheSubscription();
949
+ subscribeCache();
950
+ }
951
+ if (sameFilters(previous.filters, next2.filters)) {
952
+ return;
953
+ }
954
+ const shown = state.kind === "idle" ? null : state.query.text;
955
+ release();
956
+ apply({ type: "reset" });
957
+ if (shown !== null) {
958
+ ask(shown);
959
+ }
960
+ },
961
+ query: (text) => {
962
+ transition(() => {
963
+ release();
964
+ const query = queryOf(text);
965
+ const delay = options.source.debounce ?? DEFAULT_SOURCE_DEBOUNCE;
966
+ if (tooShort(text) || isLocal() || delay <= 0 || cache2().readPage(pageKey(query, null)) !== null) {
967
+ ask(text);
968
+ return;
969
+ }
970
+ apply({ type: "wait", query });
971
+ cancelWait = options.schedule(() => {
972
+ cancelWait = null;
973
+ transition(() => {
974
+ fetch(query, null, null);
975
+ });
976
+ }, delay);
977
+ });
978
+ },
979
+ queryNow: (text) => {
980
+ transition(() => {
981
+ ask(text);
982
+ });
983
+ },
984
+ loadMore: () => {
985
+ if (state.kind !== "loaded" || state.result.next === null || isLocal()) {
986
+ return;
987
+ }
988
+ const { query, result } = state;
989
+ transition(() => {
990
+ fetch(query, result.next, result);
991
+ });
992
+ },
993
+ retry: () => {
994
+ if (state.kind !== "failed") {
995
+ return;
996
+ }
997
+ const { query, more, shown } = state;
998
+ transition(() => {
999
+ release();
1000
+ if (more && shown !== null && shown.next !== null) {
1001
+ fetch(query, shown.next, shown);
1002
+ } else {
1003
+ fetch(query, null, null);
1004
+ }
1005
+ });
1006
+ },
1007
+ invalidate: () => {
1008
+ cache2().invalidate();
1009
+ if (state.kind !== "idle") {
1010
+ const { text } = state.query;
1011
+ transition(() => {
1012
+ ask(text);
1013
+ });
1014
+ }
1015
+ },
1016
+ close: () => {
1017
+ transition(() => {
1018
+ release();
1019
+ apply({ type: "reset" });
1020
+ });
1021
+ },
1022
+ resolve: (keys) => {
1023
+ const { resolve } = options.source;
1024
+ if (resolve !== void 0) {
1025
+ cache2().resolve(keys, {
1026
+ resolve,
1027
+ filters: options.filters,
1028
+ abort: options.abort
1029
+ });
1030
+ }
1031
+ },
1032
+ lookup: (key) => cache2().lookup(key),
1033
+ getCache: cache2,
1034
+ destroy: () => {
1035
+ release();
1036
+ apply({ type: "reset" });
1037
+ }
1038
+ };
1039
+ }
1040
+
1041
+ // src/choice/tree.ts
1042
+ function createTreeIndex(nodes) {
1043
+ const byKey = /* @__PURE__ */ new Map();
1044
+ const keys = [];
1045
+ const cycles = [];
1046
+ const visit = (siblings, parent) => {
1047
+ const placed = [];
1048
+ for (const node of siblings) {
1049
+ const key = node.value;
1050
+ if (byKey.has(key)) {
1051
+ cycles.push(key);
1052
+ continue;
1053
+ }
1054
+ byKey.set(key, { parent, children: null, disabled: false });
1055
+ keys.push(key);
1056
+ placed.push(key);
1057
+ const children = node.children === void 0 ? null : visit(node.children, key);
1058
+ byKey.set(key, {
1059
+ parent,
1060
+ children: children?.length === 0 ? null : children,
1061
+ disabled: node.disabled === true
1062
+ });
1063
+ }
1064
+ return placed;
1065
+ };
1066
+ const roots = visit(nodes, null);
1067
+ return {
1068
+ roots,
1069
+ keys,
1070
+ has: (key) => byKey.has(key),
1071
+ parentOf: (key) => byKey.get(key)?.parent ?? null,
1072
+ childrenOf: (key) => byKey.get(key)?.children ?? null,
1073
+ isDisabled: (key) => byKey.get(key)?.disabled === true,
1074
+ cycles
1075
+ };
1076
+ }
1077
+ function enabledDescendants(tree, key) {
1078
+ const found = [];
1079
+ for (const child of tree.childrenOf(key) ?? []) {
1080
+ if (!tree.isDisabled(child)) {
1081
+ found.push(child, ...enabledDescendants(tree, child));
1082
+ }
1083
+ }
1084
+ return found;
1085
+ }
1086
+ function settleAncestors(tree, ticked, key) {
1087
+ for (let parent = tree.parentOf(key); parent !== null; parent = tree.parentOf(parent)) {
1088
+ if (tree.isDisabled(parent)) {
1089
+ continue;
1090
+ }
1091
+ const enabled = (tree.childrenOf(parent) ?? []).filter(
1092
+ (child) => !tree.isDisabled(child)
1093
+ );
1094
+ if (enabled.length > 0 && enabled.every((child) => ticked.has(child))) {
1095
+ ticked.add(parent);
1096
+ } else {
1097
+ ticked.delete(parent);
1098
+ }
1099
+ }
1100
+ }
1101
+ function tickNode(tree, ticked, key, tick, cascade) {
1102
+ if (tree.isDisabled(key)) {
1103
+ return ticked;
1104
+ }
1105
+ return setTick(tree, ticked, key, tick, cascade);
1106
+ }
1107
+ function setTick(tree, ticked, key, tick, cascade) {
1108
+ const next2 = new Set(ticked);
1109
+ const changed = cascade ? [key, ...enabledDescendants(tree, key)] : [key];
1110
+ for (const node of changed) {
1111
+ if (tick) {
1112
+ next2.add(node);
1113
+ } else {
1114
+ next2.delete(node);
1115
+ }
1116
+ }
1117
+ if (cascade) {
1118
+ settleAncestors(tree, next2, key);
1119
+ }
1120
+ return next2;
1121
+ }
1122
+ function tickState(tree, ticked, key) {
1123
+ const enabled = (tree.childrenOf(key) ?? []).filter(
1124
+ (child) => !tree.isDisabled(child)
1125
+ );
1126
+ if (enabled.length === 0) {
1127
+ return ticked.has(key) ? "ticked" : "unticked";
1128
+ }
1129
+ const states = new Set(
1130
+ enabled.map((child) => tickState(tree, ticked, child))
1131
+ );
1132
+ if (states.size === 1 && states.has("ticked")) {
1133
+ return "ticked";
1134
+ }
1135
+ return states.size === 1 && states.has("unticked") && !ticked.has(key) ? "unticked" : "mixed";
1136
+ }
1137
+ function inValue(tree, ticked, key, mode) {
1138
+ switch (mode) {
1139
+ case "all":
1140
+ return true;
1141
+ case "leaves":
1142
+ return tree.childrenOf(key) === null;
1143
+ case "parent": {
1144
+ const parent = tree.parentOf(key);
1145
+ return parent === null || !ticked.has(parent);
1146
+ }
1147
+ }
1148
+ }
1149
+ function treeValue(tree, ticked, mode, previous) {
1150
+ const shown = [...ticked].filter((key) => inValue(tree, ticked, key, mode));
1151
+ const kept = (previous ?? []).filter((key) => shown.includes(key));
1152
+ const value = [...kept, ...shown.filter((key) => !kept.includes(key))];
1153
+ return value.length === 0 ? null : value;
1154
+ }
1155
+ function tickedFromValue(tree, value, cascade = true) {
1156
+ let ticked = /* @__PURE__ */ new Set();
1157
+ for (const key of value ?? []) {
1158
+ ticked = setTick(tree, ticked, key, true, cascade);
1159
+ }
1160
+ return ticked;
1161
+ }
1162
+ function hasChildNodes(node) {
1163
+ return (node.children?.length ?? 0) > 0 || node.hasChildren === true;
1164
+ }
1165
+ function flattenTree(nodes, open) {
1166
+ const rows = [];
1167
+ const path = /* @__PURE__ */ new Set();
1168
+ const visit = (siblings, level, parent) => {
1169
+ const shown = siblings.filter((node) => !path.has(node.value));
1170
+ shown.forEach((node, index) => {
1171
+ const branch = hasChildNodes(node);
1172
+ const expanded = branch ? open.has(node.value) : null;
1173
+ rows.push({
1174
+ option: node,
1175
+ level,
1176
+ expanded,
1177
+ parent,
1178
+ size: shown.length,
1179
+ position: index + 1
1180
+ });
1181
+ if (expanded === true && node.children !== void 0) {
1182
+ path.add(node.value);
1183
+ visit(node.children, level + 1, rows.length - 1);
1184
+ path.delete(node.value);
1185
+ }
1186
+ });
1187
+ };
1188
+ visit(nodes, 1, null);
1189
+ return rows;
1190
+ }
1191
+ function searchTree(nodes, query, context) {
1192
+ const open = /* @__PURE__ */ new Set();
1193
+ const matches = /* @__PURE__ */ new Map();
1194
+ if (query.trim() === "") {
1195
+ return { nodes, open, matches };
1196
+ }
1197
+ const path = /* @__PURE__ */ new Set();
1198
+ const prune = (siblings) => {
1199
+ const kept = [];
1200
+ for (const node of siblings) {
1201
+ if (path.has(node.value)) {
1202
+ continue;
1203
+ }
1204
+ path.add(node.value);
1205
+ const match = matchOption(node, query, context);
1206
+ const children = prune(node.children ?? []);
1207
+ path.delete(node.value);
1208
+ if (match !== null) {
1209
+ matches.set(node.value, match);
1210
+ }
1211
+ if (children.length > 0) {
1212
+ open.add(node.value);
1213
+ }
1214
+ if (match !== null) {
1215
+ kept.push(node);
1216
+ } else if (children.length > 0) {
1217
+ kept.push({ ...node, children });
1218
+ }
1219
+ }
1220
+ return kept;
1221
+ };
1222
+ return { nodes: prune(nodes), open, matches };
1223
+ }
1224
+ var CHILDREN_UNLOADED = { kind: "unloaded" };
1225
+ function childrenLoadReducer(state, action) {
1226
+ switch (action.type) {
1227
+ case "start":
1228
+ return { kind: "loading", request: action.request };
1229
+ case "loaded":
1230
+ return state.kind === "loading" && state.request === action.request ? { kind: "loaded" } : state;
1231
+ case "fail":
1232
+ return state.kind === "loading" && state.request === action.request ? { kind: "failed", error: action.error } : state;
1233
+ case "reset":
1234
+ return CHILDREN_UNLOADED;
1235
+ }
1236
+ }
1237
+
49
1238
  // src/date/values.ts
50
1239
  var DAY_MS = 864e5;
51
1240
  var MIN_YEAR = 1;
@@ -3056,9 +4245,9 @@ function readPeriodText(text, options, layout, locale, messages) {
3056
4245
  };
3057
4246
  }
3058
4247
  }
3059
- const canonical = toPeriod(clean, granularity);
3060
- if (canonical !== null) {
3061
- return { kind: "period", period: canonical };
4248
+ const canonical2 = toPeriod(clean, granularity);
4249
+ if (canonical2 !== null) {
4250
+ return { kind: "period", period: canonical2 };
3062
4251
  }
3063
4252
  if (granularity === "year") {
3064
4253
  return /^\d{1,4}$/.test(clean) ? readingOf(granularity, clean, 1, today) : UNREADABLE;
@@ -3849,7 +5038,7 @@ function isTwelveHour(layout) {
3849
5038
  function hasSeconds(layout) {
3850
5039
  return layout.segments.some((segment) => segment.type === "second");
3851
5040
  }
3852
- function startOf(limits) {
5041
+ function startOf2(limits) {
3853
5042
  return timeParts(limits.min ?? "00:00");
3854
5043
  }
3855
5044
  function values(count, every = 1) {
@@ -3863,7 +5052,7 @@ function timeColumns(time, options) {
3863
5052
  const step2 = stepOf2(options.minuteStep);
3864
5053
  const twelve = isTwelveHour(layout);
3865
5054
  const limits = windowOf(options);
3866
- const current = time === null ? startOf(options) : timeParts(time);
5055
+ const current = time === null ? startOf2(options) : timeParts(time);
3867
5056
  const held = time === null ? null : current;
3868
5057
  const afternoon = current.hour >= 12 ? 12 : 0;
3869
5058
  const lastMinute = 60 - step2;
@@ -3944,7 +5133,7 @@ function clampTime(time, limits) {
3944
5133
  return time;
3945
5134
  }
3946
5135
  function setTimeColumn(time, type, value, options) {
3947
- const current = time === null ? startOf(options) : timeParts(time);
5136
+ const current = time === null ? startOf2(options) : timeParts(time);
3948
5137
  let { hour, minute, second } = current;
3949
5138
  switch (type) {
3950
5139
  case "hour":
@@ -4785,7 +5974,10 @@ var COMMIT_SOURCES = {
4785
5974
  preset: "preset",
4786
5975
  clear: "clear",
4787
5976
  toggle: "toggle",
4788
- autofill: "autofill"
5977
+ autofill: "autofill",
5978
+ remove: "remove",
5979
+ drop: "drop",
5980
+ paste: "paste"
4789
5981
  };
4790
5982
  function formatterOf(options, purpose) {
4791
5983
  const format = options.format ?? options.defaultFormat;
@@ -6453,6 +7645,9 @@ function createDefaultFormsMessages(locale) {
6453
7645
  optional: "optional",
6454
7646
  fieldHelp: "More information",
6455
7647
  searchPlaceholder: "Search",
7648
+ resultCount: (count) => counted(n, count, ["result", "results"]),
7649
+ noMatches: (query) => `No matches for \u201C${query}\u201D`,
7650
+ selectedCount: (count) => `${n(count)} selected`,
6456
7651
  severityLabel: (severity) => SEVERITY_LABELS[severity],
6457
7652
  severityCount: (severity, count) => counted(n, count, SEVERITY_NOUNS[severity]),
6458
7653
  messageSummaryTitle: (count) => count === 1 ? "There is 1 problem with this form" : `There are ${n(count)} problems with this form`
@@ -8052,26 +9247,6 @@ function summarizeMessages(fields, severities) {
8052
9247
  };
8053
9248
  }
8054
9249
 
8055
- // src/typeahead.ts
8056
- function typeaheadIndex(labels, from, query) {
8057
- const typed = query.toLowerCase();
8058
- const firstCodePoint = typed.codePointAt(0);
8059
- if (firstCodePoint === void 0) {
8060
- return -1;
8061
- }
8062
- const first = String.fromCodePoint(firstCodePoint);
8063
- const repeated = typed.replaceAll(first, "") === "";
8064
- const prefix = repeated ? first : typed;
8065
- const start = repeated ? from + 1 : Math.max(from, 0);
8066
- for (let offset2 = 0; offset2 < labels.length; offset2++) {
8067
- const index = (start + offset2) % labels.length;
8068
- if (labels[index]?.toLowerCase().startsWith(prefix) === true) {
8069
- return index;
8070
- }
8071
- }
8072
- return -1;
8073
- }
8074
-
8075
9250
  // src/virtualization.ts
8076
9251
  function visibleRange(heights, estimatedHeight, scrollTop, viewportHeight, overscan) {
8077
9252
  const rowCount = heights.length;
@@ -8116,14 +9291,21 @@ export {
8116
9291
  ALL_DAY,
8117
9292
  CALENDAR_FISCAL_YEAR,
8118
9293
  CHECKBOX_WORDS,
9294
+ CHILDREN_UNLOADED,
9295
+ DEFAULT_MATCH_FIELDS,
9296
+ DEFAULT_SOURCE_DEBOUNCE,
9297
+ DEFAULT_SOURCE_PAGE_SIZE,
8119
9298
  NO_TIME,
8120
9299
  POPUP_CLOSED,
9300
+ SOURCE_IDLE,
8121
9301
  SWITCH_WORDS,
8122
9302
  addDays,
8123
9303
  addDecimals,
9304
+ addKeys,
8124
9305
  addMonths,
8125
9306
  addPeriods,
8126
9307
  addYears,
9308
+ appendPage,
8127
9309
  applyMaskEdit,
8128
9310
  availableDateRule,
8129
9311
  booleanFormatter,
@@ -8133,11 +9315,16 @@ export {
8133
9315
  calendarReducer,
8134
9316
  calendarStart,
8135
9317
  calendarYears,
9318
+ canAddKey,
9319
+ canSelectAll,
8136
9320
  checkedRule,
9321
+ childrenLoadReducer,
9322
+ choiceDetails,
8137
9323
  clampCalendarDate,
8138
9324
  clampCalendarMonth,
8139
9325
  clampTime,
8140
9326
  cleanPastedNumber,
9327
+ clearKeys,
8141
9328
  commonDatePresets,
8142
9329
  compareCalendarMonths,
8143
9330
  compareDateTimes,
@@ -8154,6 +9341,10 @@ export {
8154
9341
  createDefaultFormsMessages,
8155
9342
  createFieldController,
8156
9343
  createFieldRegistry,
9344
+ createOptionCache,
9345
+ createOptionIndex,
9346
+ createOptionSourceController,
9347
+ createTreeIndex,
8157
9348
  dateDetails,
8158
9349
  dateFormatter,
8159
9350
  dateFromInstant,
@@ -8189,7 +9380,12 @@ export {
8189
9380
  fieldText,
8190
9381
  filterMaskEdit,
8191
9382
  filterNumberEdit,
9383
+ filtersKey,
9384
+ findDuplicateKeys,
8192
9385
  fixedFractionDigits,
9386
+ flattenOptions,
9387
+ flattenTree,
9388
+ foldText,
8193
9389
  formatCalendarMonth,
8194
9390
  formatCalendarYear,
8195
9391
  formatDate,
@@ -8216,6 +9412,7 @@ export {
8216
9412
  formatTimeSpan,
8217
9413
  formatWeekday,
8218
9414
  hasError,
9415
+ hasKey,
8219
9416
  ibanRule,
8220
9417
  idleSegments,
8221
9418
  inlineStep,
@@ -8232,6 +9429,7 @@ export {
8232
9429
  isCalendarMonthDisabled,
8233
9430
  isDecimalString,
8234
9431
  isInstant,
9432
+ isLandingRow,
8235
9433
  isLeapYear,
8236
9434
  isPeriod,
8237
9435
  isPlainDate,
@@ -8242,12 +9440,16 @@ export {
8242
9440
  isTimeZone,
8243
9441
  isValidMaskStart,
8244
9442
  joinSegments,
9443
+ keyChanges,
9444
+ keyText,
8245
9445
  luhnRule,
8246
9446
  maskDetails,
8247
9447
  maskFormatter,
8248
9448
  maskInputHints,
8249
9449
  maskParser,
8250
9450
  maskPresets,
9451
+ matchOption,
9452
+ matchText,
8251
9453
  maxDateRule,
8252
9454
  maxDateTimeRule,
8253
9455
  maxDurationRule,
@@ -8270,6 +9472,7 @@ export {
8270
9472
  monthGrid,
8271
9473
  monthOfDate,
8272
9474
  mostSevere,
9475
+ moveActive,
8273
9476
  moveCalendarDate,
8274
9477
  nextCheckedValue,
8275
9478
  normalizeDecimal,
@@ -8311,6 +9514,7 @@ export {
8311
9514
  rangeEnds,
8312
9515
  rangeFlags,
8313
9516
  rangeIncludes,
9517
+ rangeKeys,
8314
9518
  rangePickPreview,
8315
9519
  rangePickReducer,
8316
9520
  rangeSpan,
@@ -8319,6 +9523,7 @@ export {
8319
9523
  readRangeEnds,
8320
9524
  readTimeText,
8321
9525
  relativePreset,
9526
+ removeKeys,
8322
9527
  requiredRule,
8323
9528
  resolveDateRange,
8324
9529
  resolveDateRule,
@@ -8327,23 +9532,32 @@ export {
8327
9532
  roundDecimal,
8328
9533
  runtimeTimeZone,
8329
9534
  sameDayIn,
9535
+ sameFilters,
9536
+ sameKey,
9537
+ sameKeys,
8330
9538
  sameRange,
8331
9539
  sameRule,
9540
+ scopeState,
9541
+ searchTree,
8332
9542
  segmentAria,
8333
9543
  segmentReducer,
8334
9544
  segmentRuns,
8335
9545
  segmentSpans,
8336
9546
  segmentValue,
8337
9547
  segmentsTime,
9548
+ selectAll,
8338
9549
  setTimeColumn,
8339
9550
  shiftDecimal,
8340
9551
  shownEnd,
8341
9552
  shownMessages,
9553
+ singleChoiceDetails,
8342
9554
  snapTime,
8343
9555
  sortFieldMessages,
9556
+ sourceReducer,
8344
9557
  spanOf,
8345
9558
  splitDateTime,
8346
9559
  splitSegments,
9560
+ standInOption,
8347
9561
  startOfDayIn,
8348
9562
  startOfMonth,
8349
9563
  startOfWeek,
@@ -8353,6 +9567,9 @@ export {
8353
9567
  subtractDecimals,
8354
9568
  summarizeMessages,
8355
9569
  textParser,
9570
+ tickNode,
9571
+ tickState,
9572
+ tickedFromValue,
8356
9573
  timeColumns,
8357
9574
  timeDetails,
8358
9575
  timeFormatter,
@@ -8361,13 +9578,19 @@ export {
8361
9578
  timeRangeKind,
8362
9579
  toFieldMessages,
8363
9580
  toInstant,
9581
+ toKeyList,
9582
+ toOptionPage,
8364
9583
  toPeriod,
8365
9584
  toPlainDate,
8366
9585
  toPlainDateTime,
8367
9586
  toPlainTime,
8368
9587
  todayIn,
9588
+ toggleKey,
9589
+ treeValue,
8369
9590
  typeaheadIndex,
9591
+ typeaheadRow,
8370
9592
  unreadable,
9593
+ valueKeys,
8371
9594
  visibleRange,
8372
9595
  wallClockOf,
8373
9596
  weekInfo,