@bysages/svelte 0.1.1 → 0.2.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 (3) hide show
  1. package/dist/index.d.mts +155 -75
  2. package/dist/index.mjs +1478 -809
  3. package/package.json +7 -7
package/dist/index.mjs CHANGED
@@ -4,18 +4,19 @@ import { Accordion as Accordion$1 } from "@ark-ui/svelte/accordion";
4
4
  import "svelte/internal/disclose-version";
5
5
  import * as $ from "svelte/internal/client";
6
6
  import { Field as Field$1, useFieldContext } from "@ark-ui/svelte/field";
7
+ import { Popover as Popover$1 } from "@ark-ui/svelte/popover";
8
+ import Portal from "@ark-ui/svelte/portal";
9
+ import { getContext, setContext, untrack } from "svelte";
7
10
  import { Collapsible as Collapsible$1 } from "@ark-ui/svelte/collapsible";
8
11
  import "svelte/internal/flags/legacy";
9
12
  import { renderHtml } from "@tanstack/markdown/html";
10
- import { getContext, setContext, untrack } from "svelte";
11
13
  import { Combobox as Combobox$1 } from "@ark-ui/svelte/combobox";
12
14
  import { createFileTreeCollection, createGridCollection, createTreeCollection, useAsyncList, useListCollection, useListCollection as useListCollection$1, useListSelection } from "@ark-ui/svelte/collection";
13
- import Portal from "@ark-ui/svelte/portal";
14
15
  import { AngleSlider as AngleSlider$1 } from "@ark-ui/svelte/angle-slider";
15
16
  import { Avatar as Avatar$1 } from "@ark-ui/svelte/avatar";
16
17
  import { DatePicker as DatePicker$1 } from "@ark-ui/svelte/date-picker";
17
18
  import { useEnvironmentContext } from "@ark-ui/svelte/environment";
18
- import { useLocaleContext } from "@ark-ui/svelte/locale";
19
+ import { useFilter, useLocaleContext } from "@ark-ui/svelte/locale";
19
20
  import * as cascade from "@zag-js/cascade-select";
20
21
  import { normalizeProps, useMachine } from "@zag-js/svelte";
21
22
  import { Carousel as Carousel$1 } from "@ark-ui/svelte/carousel";
@@ -41,7 +42,6 @@ import { JsonTreeView as JsonTreeView$1 } from "@ark-ui/svelte/json-tree-view";
41
42
  import { Listbox as Listbox$1 } from "@ark-ui/svelte/listbox";
42
43
  import { Marquee as Marquee$1 } from "@ark-ui/svelte/marquee";
43
44
  import { Menu as Menu$1 } from "@ark-ui/svelte/menu";
44
- import { Popover as Popover$1 } from "@ark-ui/svelte/popover";
45
45
  import { NavigationMenu as NavigationMenu$1 } from "@ark-ui/svelte/navigation-menu";
46
46
  import { NumberInput as NumberInput$1 } from "@ark-ui/svelte/number-input";
47
47
  import { Pagination as Pagination$1 } from "@ark-ui/svelte/pagination";
@@ -54,7 +54,7 @@ import { RadioGroup as RadioGroup$1 } from "@ark-ui/svelte/radio-group";
54
54
  import { RatingGroup as RatingGroup$1 } from "@ark-ui/svelte/rating-group";
55
55
  import { ScrollArea as ScrollArea$1 } from "@ark-ui/svelte/scroll-area";
56
56
  import { SegmentGroup as SegmentGroup$1 } from "@ark-ui/svelte/segment-group";
57
- import { Select as Select$1 } from "@ark-ui/svelte/select";
57
+ import { Select as Select$1, createListCollection } from "@ark-ui/svelte/select";
58
58
  import { SignaturePad as SignaturePad$1 } from "@ark-ui/svelte/signature-pad";
59
59
  import { Slider as Slider$1 } from "@ark-ui/svelte/slider";
60
60
  import { Splitter as Splitter$1 } from "@ark-ui/svelte/splitter";
@@ -83,7 +83,7 @@ const Accordion = Accordion$1;
83
83
  injectComponentStyle("accordion");
84
84
  //#endregion
85
85
  //#region src/components/affix/Affix.svelte
86
- var rest_excludes$125 = /* @__PURE__ */ new Set([
86
+ var rest_excludes$126 = /* @__PURE__ */ new Set([
87
87
  "$$slots",
88
88
  "$$events",
89
89
  "$$legacy",
@@ -91,10 +91,10 @@ var rest_excludes$125 = /* @__PURE__ */ new Set([
91
91
  "offsetBottom",
92
92
  "children"
93
93
  ]);
94
- var root$126 = $.from_html(`<div><!></div>`);
94
+ var root$125 = $.from_html(`<div><!></div>`);
95
95
  function Affix$1($$anchor, $$props) {
96
- let offsetTop = $.prop($$props, "offsetTop", 3, "0px"), offsetBottom = $.prop($$props, "offsetBottom", 3, "0px"), rest = $.rest_props($$props, rest_excludes$125);
97
- var div = root$126();
96
+ let offsetTop = $.prop($$props, "offsetTop", 3, "0px"), offsetBottom = $.prop($$props, "offsetBottom", 3, "0px"), rest = $.rest_props($$props, rest_excludes$126);
97
+ var div = root$125();
98
98
  $.attribute_effect(div, () => ({
99
99
  ...rest,
100
100
  "data-scope": "affix",
@@ -122,7 +122,7 @@ const Affix = Affix$1;
122
122
  injectComponentStyle("affix");
123
123
  //#endregion
124
124
  //#region src/components/button/Button.svelte
125
- var rest_excludes$124 = /* @__PURE__ */ new Set([
125
+ var rest_excludes$125 = /* @__PURE__ */ new Set([
126
126
  "$$slots",
127
127
  "$$events",
128
128
  "$$legacy",
@@ -136,7 +136,7 @@ var rest_excludes$124 = /* @__PURE__ */ new Set([
136
136
  "children"
137
137
  ]);
138
138
  function Button$1($$anchor, $$props) {
139
- let variant = $.prop($$props, "variant", 3, "solid"), tone = $.prop($$props, "tone", 3, "ink"), size = $.prop($$props, "size", 3, "md"), square = $.prop($$props, "square", 3, false), type = $.prop($$props, "type", 3, "button"), disabled = $.prop($$props, "disabled", 3, false), rest = $.rest_props($$props, rest_excludes$124);
139
+ let variant = $.prop($$props, "variant", 3, "solid"), tone = $.prop($$props, "tone", 3, "ink"), size = $.prop($$props, "size", 3, "md"), square = $.prop($$props, "square", 3, false), type = $.prop($$props, "type", 3, "button"), disabled = $.prop($$props, "disabled", 3, false), rest = $.rest_props($$props, rest_excludes$125);
140
140
  var fragment = $.comment();
141
141
  var node = $.first_child(fragment);
142
142
  $.element(node, () => $$props.as ?? "button", false, ($$element, $$anchor) => {
@@ -168,7 +168,7 @@ const Button = Button$1;
168
168
  injectComponentStyle("button");
169
169
  //#endregion
170
170
  //#region src/components/ai-action/AiAction.svelte
171
- var rest_excludes$123 = /* @__PURE__ */ new Set([
171
+ var rest_excludes$124 = /* @__PURE__ */ new Set([
172
172
  "$$slots",
173
173
  "$$events",
174
174
  "$$legacy",
@@ -176,7 +176,7 @@ var rest_excludes$123 = /* @__PURE__ */ new Set([
176
176
  "children"
177
177
  ]);
178
178
  function AiAction$1($$anchor, $$props) {
179
- let rest = $.rest_props($$props, rest_excludes$123);
179
+ let rest = $.rest_props($$props, rest_excludes$124);
180
180
  Button($$anchor, $.spread_props({
181
181
  variant: "ghost",
182
182
  size: "sm",
@@ -205,17 +205,17 @@ const AiAction = AiAction$1;
205
205
  injectComponentStyle("ai");
206
206
  //#endregion
207
207
  //#region src/components/ai-message/AiMessage.svelte
208
- var rest_excludes$122 = /* @__PURE__ */ new Set([
208
+ var rest_excludes$123 = /* @__PURE__ */ new Set([
209
209
  "$$slots",
210
210
  "$$events",
211
211
  "$$legacy",
212
212
  "role",
213
213
  "children"
214
214
  ]);
215
- var root$125 = $.from_html(`<article><!></article>`);
215
+ var root$124 = $.from_html(`<article><!></article>`);
216
216
  function AiMessage$1($$anchor, $$props) {
217
- let role = $.prop($$props, "role", 3, "assistant"), rest = $.rest_props($$props, rest_excludes$122);
218
- var article = root$125();
217
+ let role = $.prop($$props, "role", 3, "assistant"), rest = $.rest_props($$props, rest_excludes$123);
218
+ var article = root$124();
219
219
  $.attribute_effect(article, () => ({
220
220
  ...rest,
221
221
  "data-scope": "ai",
@@ -242,28 +242,292 @@ injectComponentStyle("ai");
242
242
  const Field = Field$1;
243
243
  injectComponentStyle("field");
244
244
  //#endregion
245
+ //#region src/components/mentions/MentionsVessel.svelte
246
+ var root$123 = $.from_html(`<div data-scope="mentions" data-part="option"> </div>`);
247
+ var root_1$26 = $.from_html(`<div></div>`);
248
+ function MentionsVessel$1($$anchor, $$props) {
249
+ $.push($$props, true);
250
+ let open = $.prop($$props, "open", 3, false), matches = $.prop($$props, "matches", 19, () => []), active = $.prop($$props, "active", 3, 0), anchor = $.prop($$props, "anchor", 3, null);
251
+ var fragment = $.comment();
252
+ var node = $.first_child(fragment);
253
+ $.component(node, () => Popover$1.Root, ($$anchor, ArkPopover_Root) => {
254
+ ArkPopover_Root($$anchor, {
255
+ get open() {
256
+ return open();
257
+ },
258
+ positioning: {
259
+ placement: "bottom-start",
260
+ getAnchorRect: () => anchor()?.getBoundingClientRect() ?? null
261
+ },
262
+ onOpenChange: (details) => $$props.onOpenChange?.(details.open),
263
+ children: ($$anchor, $$slotProps) => {
264
+ Portal($$anchor, {
265
+ children: ($$anchor, $$slotProps) => {
266
+ var fragment_2 = $.comment();
267
+ var node_1 = $.first_child(fragment_2);
268
+ $.component(node_1, () => Popover$1.Positioner, ($$anchor, ArkPopover_Positioner) => {
269
+ ArkPopover_Positioner($$anchor, {
270
+ children: ($$anchor, $$slotProps) => {
271
+ var fragment_3 = $.comment();
272
+ var node_2 = $.first_child(fragment_3);
273
+ {
274
+ const asChild = ($$anchor, contentProps = $.noop) => {
275
+ var div = root_1$26();
276
+ $.attribute_effect(div, ($0) => ({
277
+ ...$0,
278
+ "data-scope": "mentions",
279
+ "data-part": "popup"
280
+ }), [() => contentProps()()]);
281
+ $.each(div, 23, matches, (entry) => entry.value, ($$anchor, entry, index) => {
282
+ var div_1 = root$123();
283
+ var text = $.only_child(div_1, true);
284
+ $.template_effect(() => {
285
+ $.set_attribute(div_1, "data-active", $.get(index) === active() ? "" : void 0);
286
+ $.set_text(text, $.get(entry).label);
287
+ });
288
+ $.event("mouseenter", div_1, () => $$props.onActiveChange?.($.get(index)));
289
+ $.delegated("mousedown", div_1, (event) => event.preventDefault());
290
+ $.delegated("click", div_1, () => $$props.onInsert?.($.get(entry)));
291
+ $.append($$anchor, div_1);
292
+ });
293
+ $.reset(div);
294
+ $.append($$anchor, div);
295
+ };
296
+ $.component(node_2, () => Popover$1.Content, ($$anchor, ArkPopover_Content) => {
297
+ ArkPopover_Content($$anchor, {
298
+ asChild,
299
+ $$slots: { asChild: true }
300
+ });
301
+ });
302
+ }
303
+ $.append($$anchor, fragment_3);
304
+ },
305
+ $$slots: { default: true }
306
+ });
307
+ });
308
+ $.append($$anchor, fragment_2);
309
+ },
310
+ $$slots: { default: true }
311
+ });
312
+ },
313
+ $$slots: { default: true }
314
+ });
315
+ });
316
+ $.append($$anchor, fragment);
317
+ $.pop();
318
+ }
319
+ $.delegate(["mousedown", "click"]);
320
+ //#endregion
321
+ //#region src/components/mentions/Mentions.svelte
322
+ var rest_excludes$122 = /* @__PURE__ */ new Set([
323
+ "$$slots",
324
+ "$$events",
325
+ "$$legacy",
326
+ "items",
327
+ "value",
328
+ "trigger",
329
+ "placeholder",
330
+ "autoresize",
331
+ "invalid",
332
+ "onValueChange"
333
+ ]);
334
+ var root$122 = $.from_html(`<div><!> <!></div>`);
335
+ function Mentions$1($$anchor, $$props) {
336
+ $.push($$props, true);
337
+ let items = $.prop($$props, "items", 19, () => []), value = $.prop($$props, "value", 15, ""), trigger = $.prop($$props, "trigger", 3, "@"), autoresize = $.prop($$props, "autoresize", 3, false), invalid = $.prop($$props, "invalid", 3, false), rest = $.rest_props($$props, rest_excludes$122);
338
+ let textareaEl = $.state(null);
339
+ const mentions = useMentions(() => ({
340
+ items: items(),
341
+ trigger: trigger()
342
+ }), () => $.get(textareaEl), {
343
+ getText: () => $.get(textareaEl)?.value ?? value(),
344
+ setText: (next) => {
345
+ value(next);
346
+ $$props.onValueChange?.(next);
347
+ }
348
+ });
349
+ function onInput(event) {
350
+ $$props.onValueChange?.(event.currentTarget.value);
351
+ mentions.onInput();
352
+ }
353
+ var div = root$122();
354
+ $.attribute_effect(div, () => ({
355
+ ...rest,
356
+ "data-scope": "mentions",
357
+ "data-part": "root"
358
+ }));
359
+ var node = $.child(div);
360
+ {
361
+ let $0 = $.derived(() => invalid() ? "true" : void 0);
362
+ $.component(node, () => Field.Textarea, ($$anchor, Field_Textarea) => {
363
+ Field_Textarea($$anchor, {
364
+ get autoresize() {
365
+ return autoresize();
366
+ },
367
+ rows: 3,
368
+ get placeholder() {
369
+ return $$props.placeholder;
370
+ },
371
+ get "aria-invalid"() {
372
+ return $.get($0);
373
+ },
374
+ "data-scope": "mentions",
375
+ "data-part": "textarea",
376
+ oninput: onInput,
377
+ get onkeydown() {
378
+ return mentions.onKeydown;
379
+ },
380
+ get ref() {
381
+ return $.get(textareaEl);
382
+ },
383
+ set ref($$value) {
384
+ $.set(textareaEl, $$value, true);
385
+ },
386
+ get value() {
387
+ return value();
388
+ },
389
+ set value($$value) {
390
+ value($$value);
391
+ }
392
+ });
393
+ });
394
+ }
395
+ MentionsVessel$1($.sibling(node, 2), {
396
+ get open() {
397
+ return mentions.open;
398
+ },
399
+ get matches() {
400
+ return mentions.matches;
401
+ },
402
+ get active() {
403
+ return mentions.active;
404
+ },
405
+ get anchor() {
406
+ return $.get(textareaEl);
407
+ },
408
+ get onInsert() {
409
+ return mentions.insert;
410
+ },
411
+ onActiveChange: (index) => mentions.active = index,
412
+ onOpenChange: (open) => {
413
+ if (!open) mentions.close();
414
+ }
415
+ });
416
+ $.reset(div);
417
+ $.append($$anchor, div);
418
+ $.pop();
419
+ }
420
+ //#endregion
421
+ //#region src/components/mentions/index.ts
422
+ /** @-mentions: a plain textarea that, when the text before the caret
423
+ * ends with the trigger character followed by a token, offers the
424
+ * matching candidates in a small anchored vessel; choosing one replaces
425
+ * the token with `trigger + label` and hands the whole text back
426
+ * through `bind:value`. Arrows move, Enter inserts, Escape dismisses. */
427
+ const Mentions = Mentions$1;
428
+ /** The vessel: the candidates themselves as a floating card. Composers
429
+ * that keep their own field anatomy wire it up with `useMentions`
430
+ * directly. */
431
+ const MentionsVessel = MentionsVessel$1;
432
+ injectComponentStyle("mentions");
433
+ //#endregion
245
434
  //#region src/components/ai-prompt-input/AiPromptInput.svelte
246
435
  var rest_excludes$121 = /* @__PURE__ */ new Set([
247
436
  "$$slots",
248
437
  "$$events",
249
438
  "$$legacy",
250
439
  "value",
440
+ "onValueChange",
251
441
  "onSubmit",
442
+ "onStop",
252
443
  "placeholder",
253
- "disabled"
254
- ]);
255
- var root$124 = $.from_svg(`<svg viewBox="0 0 16 16" width="14" height="14" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="square"><path d="M8 13V3M3.5 7.5 8 3l4.5 4.5"></path></svg>`);
256
- var root_1$25 = $.from_html(`<form><!> <div data-scope="ai" data-part="prompt-footer"><!></div></form>`);
444
+ "disabled",
445
+ "busy",
446
+ "mentions",
447
+ "header",
448
+ "leading",
449
+ "trailing",
450
+ "footer",
451
+ "footerEnd"
452
+ ]);
453
+ var root$121 = $.from_svg(`<svg viewBox="0 0 16 16" width="14" height="14" aria-hidden="true"><rect x="4.5" y="4.5" width="7" height="7" fill="currentColor"></rect></svg>`);
454
+ var root_1$25 = $.from_svg(`<svg viewBox="0 0 16 16" width="14" height="14" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="square"><path d="M8 13V3M3.5 7.5 8 3l4.5 4.5"></path></svg>`);
455
+ var root_2$19 = $.from_html(`<div data-scope="ai" data-part="prompt-header"><!></div>`);
456
+ var root_3$11 = $.from_html(`<div data-scope="ai" data-part="prompt-leading"><!></div>`);
457
+ var root_4$9 = $.from_html(`<div data-scope="ai" data-part="prompt-trailing"><!> <!></div>`);
458
+ var root_5$9 = $.from_html(`<div data-scope="ai" data-part="prompt-footer"><!> <div data-scope="ai" data-part="prompt-end"><!> <!></div></div>`);
459
+ var root_6$6 = $.from_html(`<form><!> <div data-scope="ai" data-part="prompt-main"><!> <!> <!> <!></div> <!></form>`);
257
460
  function AiPromptInput$1($$anchor, $$props) {
258
461
  $.push($$props, true);
259
- let value = $.prop($$props, "value", 15, ""), placeholder = $.prop($$props, "placeholder", 3, "Send a message"), disabled = $.prop($$props, "disabled", 3, false), rest = $.rest_props($$props, rest_excludes$121);
462
+ const seal = ($$anchor) => {
463
+ var fragment = $.comment();
464
+ var node = $.first_child(fragment);
465
+ var consequent = ($$anchor) => {
466
+ Button($$anchor, {
467
+ variant: "solid",
468
+ size: "sm",
469
+ square: true,
470
+ type: "button",
471
+ "aria-label": "Stop",
472
+ get disabled() {
473
+ return disabled();
474
+ },
475
+ onclick: () => $$props.onStop?.(),
476
+ children: ($$anchor, $$slotProps) => {
477
+ var svg = root$121();
478
+ $.append($$anchor, svg);
479
+ },
480
+ $$slots: { default: true }
481
+ });
482
+ };
483
+ var alternate = ($$anchor) => {
484
+ {
485
+ let $0 = $.derived(() => disabled() || !value().trim());
486
+ Button($$anchor, {
487
+ variant: "solid",
488
+ size: "sm",
489
+ square: true,
490
+ type: "submit",
491
+ "aria-label": "Send",
492
+ get disabled() {
493
+ return $.get($0);
494
+ },
495
+ children: ($$anchor, $$slotProps) => {
496
+ var svg_1 = root_1$25();
497
+ $.append($$anchor, svg_1);
498
+ },
499
+ $$slots: { default: true }
500
+ });
501
+ }
502
+ };
503
+ $.if(node, ($$render) => {
504
+ if (busy()) $$render(consequent);
505
+ else $$render(alternate, -1);
506
+ });
507
+ $.append($$anchor, fragment);
508
+ };
509
+ let value = $.prop($$props, "value", 15, ""), placeholder = $.prop($$props, "placeholder", 3, "Send a message"), disabled = $.prop($$props, "disabled", 3, false), busy = $.prop($$props, "busy", 3, false), rest = $.rest_props($$props, rest_excludes$121);
510
+ let textareaEl = $.state(null);
511
+ const mentionState = useMentions(() => ({
512
+ items: $$props.mentions?.items ?? [],
513
+ trigger: $$props.mentions?.trigger
514
+ }), () => $.get(textareaEl), {
515
+ getText: () => $.get(textareaEl)?.value ?? value(),
516
+ setText: (next) => {
517
+ value(next);
518
+ $$props.onValueChange?.(next);
519
+ }
520
+ });
521
+ const mentionsActive = $.derived(() => $$props.mentions != null);
260
522
  function send() {
261
523
  const text = value().trim();
262
- if (!text || disabled()) return;
524
+ if (!text || disabled() || busy()) return;
263
525
  $$props.onSubmit?.(text);
264
526
  value("");
527
+ $$props.onValueChange?.("");
265
528
  }
266
- var form = root_1$25();
529
+ const hasFooter = $.derived(() => $$props.footer != null);
530
+ var form = root_6$6();
267
531
  var event_handler = (event) => {
268
532
  event.preventDefault();
269
533
  send();
@@ -274,13 +538,36 @@ function AiPromptInput$1($$anchor, $$props) {
274
538
  "data-part": "prompt",
275
539
  onsubmit: event_handler
276
540
  }));
277
- var node = $.child(form);
278
- $.component(node, () => Field.Root, ($$anchor, Field_Root) => {
541
+ var node_1 = $.child(form);
542
+ var consequent_1 = ($$anchor) => {
543
+ var div = root_2$19();
544
+ var node_2 = $.child(div);
545
+ $.snippet(node_2, () => $$props.header);
546
+ $.reset(div);
547
+ $.append($$anchor, div);
548
+ };
549
+ $.if(node_1, ($$render) => {
550
+ if ($$props.header) $$render(consequent_1);
551
+ });
552
+ var div_1 = $.sibling(node_1, 2);
553
+ var node_3 = $.child(div_1);
554
+ var consequent_2 = ($$anchor) => {
555
+ var div_2 = root_3$11();
556
+ var node_4 = $.child(div_2);
557
+ $.snippet(node_4, () => $$props.leading);
558
+ $.reset(div_2);
559
+ $.append($$anchor, div_2);
560
+ };
561
+ $.if(node_3, ($$render) => {
562
+ if ($$props.leading) $$render(consequent_2);
563
+ });
564
+ var node_5 = $.sibling(node_3, 2);
565
+ $.component(node_5, () => Field.Root, ($$anchor, Field_Root) => {
279
566
  Field_Root($$anchor, {
280
567
  children: ($$anchor, $$slotProps) => {
281
- var fragment = $.comment();
282
- var node_1 = $.first_child(fragment);
283
- $.component(node_1, () => Field.Textarea, ($$anchor, Field_Textarea) => {
568
+ var fragment_3 = $.comment();
569
+ var node_6 = $.first_child(fragment_3);
570
+ $.component(node_6, () => Field.Textarea, ($$anchor, Field_Textarea) => {
284
571
  Field_Textarea($$anchor, {
285
572
  autoresize: true,
286
573
  rows: 1,
@@ -290,12 +577,20 @@ function AiPromptInput$1($$anchor, $$props) {
290
577
  get disabled() {
291
578
  return disabled();
292
579
  },
580
+ oninput: () => mentionState.onInput(),
293
581
  onkeydown: (event) => {
582
+ if (mentionState.onKeydown(event)) return;
294
583
  if (event.key === "Enter" && !event.shiftKey) {
295
584
  event.preventDefault();
296
585
  send();
297
586
  }
298
587
  },
588
+ get ref() {
589
+ return $.get(textareaEl);
590
+ },
591
+ set ref($$value) {
592
+ $.set(textareaEl, $$value, true);
593
+ },
299
594
  get value() {
300
595
  return value();
301
596
  },
@@ -304,32 +599,90 @@ function AiPromptInput$1($$anchor, $$props) {
304
599
  }
305
600
  });
306
601
  });
307
- $.append($$anchor, fragment);
602
+ $.append($$anchor, fragment_3);
308
603
  },
309
604
  $$slots: { default: true }
310
605
  });
311
606
  });
312
- var div = $.sibling(node, 2);
313
- var node_2 = $.child(div);
314
- {
315
- let $0 = $.derived(() => disabled() || !value().trim());
316
- Button(node_2, {
317
- variant: "solid",
318
- size: "sm",
319
- square: true,
320
- type: "submit",
321
- "aria-label": "Send",
322
- get disabled() {
323
- return $.get($0);
607
+ var node_7 = $.sibling(node_5, 2);
608
+ var consequent_3 = ($$anchor) => {
609
+ MentionsVessel($$anchor, {
610
+ get open() {
611
+ return mentionState.open;
324
612
  },
325
- children: ($$anchor, $$slotProps) => {
326
- var svg = root$124();
327
- $.append($$anchor, svg);
613
+ get matches() {
614
+ return mentionState.matches;
328
615
  },
329
- $$slots: { default: true }
616
+ get active() {
617
+ return mentionState.active;
618
+ },
619
+ get anchor() {
620
+ return $.get(textareaEl);
621
+ },
622
+ get onInsert() {
623
+ return mentionState.insert;
624
+ },
625
+ onActiveChange: (index) => mentionState.active = index,
626
+ onOpenChange: (open) => {
627
+ if (!open) mentionState.close();
628
+ }
330
629
  });
331
- }
332
- $.reset(div);
630
+ };
631
+ $.if(node_7, ($$render) => {
632
+ if ($.get(mentionsActive)) $$render(consequent_3);
633
+ });
634
+ var node_8 = $.sibling(node_7, 2);
635
+ var consequent_6 = ($$anchor) => {
636
+ var div_3 = root_4$9();
637
+ var node_9 = $.child(div_3);
638
+ var consequent_4 = ($$anchor) => {
639
+ var fragment_5 = $.comment();
640
+ var node_10 = $.first_child(fragment_5);
641
+ $.snippet(node_10, () => $$props.trailing);
642
+ $.append($$anchor, fragment_5);
643
+ };
644
+ $.if(node_9, ($$render) => {
645
+ if ($$props.trailing) $$render(consequent_4);
646
+ });
647
+ var node_11 = $.sibling(node_9, 2);
648
+ var consequent_5 = ($$anchor) => {
649
+ seal($$anchor);
650
+ };
651
+ $.if(node_11, ($$render) => {
652
+ if (!$.get(hasFooter)) $$render(consequent_5);
653
+ });
654
+ $.reset(div_3);
655
+ $.append($$anchor, div_3);
656
+ };
657
+ $.if(node_8, ($$render) => {
658
+ if (!$.get(hasFooter) || $$props.trailing) $$render(consequent_6);
659
+ });
660
+ $.reset(div_1);
661
+ var node_12 = $.sibling(div_1, 2);
662
+ var consequent_8 = ($$anchor) => {
663
+ var div_4 = root_5$9();
664
+ var node_13 = $.child(div_4);
665
+ $.snippet(node_13, () => $$props.footer);
666
+ var div_5 = $.sibling(node_13, 2);
667
+ var node_14 = $.child(div_5);
668
+ var consequent_7 = ($$anchor) => {
669
+ var fragment_7 = $.comment();
670
+ var node_15 = $.first_child(fragment_7);
671
+ $.snippet(node_15, () => $$props.footerEnd);
672
+ $.append($$anchor, fragment_7);
673
+ };
674
+ $.if(node_14, ($$render) => {
675
+ if ($$props.footerEnd) $$render(consequent_7);
676
+ });
677
+ var node_16 = $.sibling(node_14, 2);
678
+ seal(node_16);
679
+ $.reset(div_5);
680
+ $.reset(div_4);
681
+ $.append($$anchor, div_4);
682
+ };
683
+ $.if(node_12, ($$render) => {
684
+ if ($.get(hasFooter)) $$render(consequent_8);
685
+ });
333
686
  $.reset(form);
334
687
  $.append($$anchor, form);
335
688
  $.pop();
@@ -349,9 +702,9 @@ const Collapsible = Collapsible$1;
349
702
  injectComponentStyle("collapsible");
350
703
  //#endregion
351
704
  //#region src/components/ai/ChevronIcon.svelte
352
- var root$123 = $.from_svg(`<svg viewBox="0 0 16 16" fill="none" aria-hidden="true"><path d="M6 4l4 4-4 4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path></svg>`);
705
+ var root$120 = $.from_svg(`<svg viewBox="0 0 16 16" fill="none" aria-hidden="true"><path d="M6 4l4 4-4 4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path></svg>`);
353
706
  function ChevronIcon($$anchor) {
354
- var svg = root$123();
707
+ var svg = root$120();
355
708
  $.append($$anchor, svg);
356
709
  }
357
710
  //#endregion
@@ -363,7 +716,7 @@ var rest_excludes$120 = /* @__PURE__ */ new Set([
363
716
  "label",
364
717
  "children"
365
718
  ]);
366
- var root$122 = $.from_html(`<span> </span> <!>`, 1);
719
+ var root$119 = $.from_html(`<span> </span> <!>`, 1);
367
720
  var root_1$24 = $.from_html(`<div data-scope="ai" data-part="reasoning-content"><!></div>`);
368
721
  var root_2$18 = $.from_html(`<!> <!>`, 1);
369
722
  function AiReasoning$1($$anchor, $$props) {
@@ -379,7 +732,7 @@ function AiReasoning$1($$anchor, $$props) {
379
732
  $.component(node_1, () => Collapsible.Trigger, ($$anchor, Collapsible_Trigger) => {
380
733
  Collapsible_Trigger($$anchor, {
381
734
  children: ($$anchor, $$slotProps) => {
382
- var fragment_2 = root$122();
735
+ var fragment_2 = root$119();
383
736
  var span = $.first_child(fragment_2);
384
737
  var text = $.only_child(span, true);
385
738
  var node_2 = $.sibling(span, 2);
@@ -424,26 +777,98 @@ function AiReasoning$1($$anchor, $$props) {
424
777
  const AiReasoning = AiReasoning$1;
425
778
  injectComponentStyle("ai");
426
779
  //#endregion
780
+ //#region src/components/ai-response/code-copy.ts
781
+ /** The two glyphs a copy affordance needs: the stamp and its
782
+ * confirmation. Inline SVG keeps the enhancement framework-agnostic —
783
+ * it lives beside the renderer's generated code HTML. */
784
+ const COPY_CODE_ICON = `<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/></svg>`;
785
+ const COPIED_CODE_ICON = `<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M20 6 9 17l-5-5"/></svg>`;
786
+ /** How long the confirmation stays before the stamp returns. */
787
+ const REVERT_MS = 1500;
788
+ /** Make sure every fenced block under `host` carries its copy stamp.
789
+ * The stamp anchors to a wrapper outside the scrolling `pre` — inside,
790
+ * it would fix to the overflow area and travel out of view with the
791
+ * code. The renderer rebuilds the markdown as one HTML string on every
792
+ * stream tick, so this stays idempotent and cheap enough to re-run
793
+ * after each patch. */
794
+ function decorateCodeCopy(host, copyLabel) {
795
+ for (const pre of host.querySelectorAll("pre")) {
796
+ let body = pre.parentElement;
797
+ if (!body || body.getAttribute("data-part") !== "code-body") {
798
+ body = document.createElement("div");
799
+ body.setAttribute("data-scope", "ai");
800
+ body.setAttribute("data-part", "code-body");
801
+ pre.replaceWith(body);
802
+ body.appendChild(pre);
803
+ }
804
+ let button = body.querySelector("[data-part=\"code-copy\"]");
805
+ if (!button) {
806
+ button = document.createElement("button");
807
+ button.type = "button";
808
+ button.setAttribute("data-scope", "ai");
809
+ button.setAttribute("data-part", "code-copy");
810
+ button.innerHTML = COPY_CODE_ICON;
811
+ body.appendChild(button);
812
+ }
813
+ button.title = copyLabel;
814
+ button.setAttribute("aria-label", copyLabel);
815
+ }
816
+ }
817
+ /** The one delegated click for the whole response: copy the block's
818
+ * text and confirm in place, then return the stamp after a beat. */
819
+ async function clickCodeCopy(event, copyLabel, copiedLabel) {
820
+ const button = event.target?.closest("[data-part=\"code-copy\"]");
821
+ const pre = button?.closest("[data-part=\"code-body\"]")?.querySelector("pre");
822
+ if (!button || !pre) return;
823
+ await navigator.clipboard.writeText(pre.textContent ?? "");
824
+ button.innerHTML = COPIED_CODE_ICON;
825
+ button.setAttribute("data-state", "copied");
826
+ button.title = copiedLabel;
827
+ button.setAttribute("aria-label", copiedLabel);
828
+ setTimeout(() => {
829
+ if (!button.isConnected) return;
830
+ button.innerHTML = COPY_CODE_ICON;
831
+ button.removeAttribute("data-state");
832
+ button.title = copyLabel;
833
+ button.setAttribute("aria-label", copyLabel);
834
+ }, REVERT_MS);
835
+ }
836
+ //#endregion
427
837
  //#region src/components/ai-response/AiResponse.svelte
428
838
  var rest_excludes$119 = /* @__PURE__ */ new Set([
429
839
  "$$slots",
430
840
  "$$events",
431
841
  "$$legacy",
432
- "content"
842
+ "content",
843
+ "highlighter",
844
+ "copyLabel",
845
+ "copiedLabel",
846
+ "onclick"
433
847
  ]);
434
- var root$121 = $.from_html(`<div></div>`);
848
+ var root_1$23 = $.from_html(`<div></div>`);
435
849
  function AiResponse$1($$anchor, $$props) {
436
850
  $.push($$props, true);
437
- let rest = $.rest_props($$props, rest_excludes$119);
438
- const html = $.derived(() => renderHtml($$props.content));
439
- var div = root$121();
851
+ let copyLabel = $.prop($$props, "copyLabel", 3, "Copy code"), copiedLabel = $.prop($$props, "copiedLabel", 3, "Copied"), rest = $.rest_props($$props, rest_excludes$119);
852
+ const html = $.derived(() => renderHtml($$props.content, $$props.highlighter ? { highlighter: $$props.highlighter } : void 0));
853
+ let root;
854
+ $.user_effect(() => {
855
+ $.get(html);
856
+ if (root) decorateCodeCopy(root, copyLabel());
857
+ });
858
+ const handleClick = (event) => {
859
+ clickCodeCopy(event, copyLabel(), copiedLabel());
860
+ $$props.onclick?.(event);
861
+ };
862
+ var div = root_1$23();
440
863
  $.attribute_effect(div, () => ({
441
864
  ...rest,
442
865
  "data-scope": "ai",
443
- "data-part": "response"
866
+ "data-part": "response",
867
+ onclick: handleClick
444
868
  }));
445
869
  $.html(div, () => $.get(html), true);
446
870
  $.reset(div);
871
+ $.bind_this(div, ($$value) => root = $$value, () => root);
447
872
  $.append($$anchor, div);
448
873
  $.pop();
449
874
  }
@@ -461,10 +886,10 @@ var rest_excludes$118 = /* @__PURE__ */ new Set([
461
886
  "href",
462
887
  "children"
463
888
  ]);
464
- var root$120 = $.from_html(`<li data-scope="ai" data-part="source"><a><!></a></li>`);
889
+ var root$118 = $.from_html(`<li data-scope="ai" data-part="source"><a><!></a></li>`);
465
890
  function AiSource$1($$anchor, $$props) {
466
891
  let rest = $.rest_props($$props, rest_excludes$118);
467
- var li = root$120();
892
+ var li = root$118();
468
893
  var a = $.child(li);
469
894
  $.attribute_effect(a, () => ({
470
895
  ...rest,
@@ -500,10 +925,10 @@ var rest_excludes$117 = /* @__PURE__ */ new Set([
500
925
  "$$legacy",
501
926
  "children"
502
927
  ]);
503
- var root$119 = $.from_html(`<ol><!></ol>`);
928
+ var root$117 = $.from_html(`<ol><!></ol>`);
504
929
  function AiSources$1($$anchor, $$props) {
505
930
  let rest = $.rest_props($$props, rest_excludes$117);
506
- var ol = root$119();
931
+ var ol = root$117();
507
932
  $.attribute_effect(ol, () => ({
508
933
  ...rest,
509
934
  "data-scope": "ai",
@@ -566,12 +991,12 @@ var rest_excludes$115 = /* @__PURE__ */ new Set([
566
991
  "input",
567
992
  "output"
568
993
  ]);
569
- var root$118 = $.from_html(`<span data-scope="ai" data-part="tool-status"> </span>`);
570
- var root_1$23 = $.from_html(`<span> </span> <!> <!>`, 1);
994
+ var root$116 = $.from_html(`<span data-scope="ai" data-part="tool-status"> </span>`);
995
+ var root_1$22 = $.from_html(`<span> </span> <!> <!>`, 1);
571
996
  var root_2$17 = $.from_html(`<span data-scope="ai" data-part="tool-label">Input</span> <pre> </pre>`, 1);
572
997
  var root_3$10 = $.from_html(`<span data-scope="ai" data-part="tool-label">Output</span> <pre> </pre>`, 1);
573
- var root_4$7 = $.from_html(`<div data-scope="ai" data-part="tool-body"><!> <!></div>`);
574
- var root_5$6 = $.from_html(`<!> <!>`, 1);
998
+ var root_4$8 = $.from_html(`<div data-scope="ai" data-part="tool-body"><!> <!></div>`);
999
+ var root_5$8 = $.from_html(`<!> <!>`, 1);
575
1000
  function AiTool$1($$anchor, $$props) {
576
1001
  $.push($$props, true);
577
1002
  let rest = $.rest_props($$props, rest_excludes$115);
@@ -584,17 +1009,17 @@ function AiTool$1($$anchor, $$props) {
584
1009
  return $$props.status;
585
1010
  },
586
1011
  children: ($$anchor, $$slotProps) => {
587
- var fragment_1 = root_5$6();
1012
+ var fragment_1 = root_5$8();
588
1013
  var node_1 = $.first_child(fragment_1);
589
1014
  $.component(node_1, () => Collapsible.Trigger, ($$anchor, Collapsible_Trigger) => {
590
1015
  Collapsible_Trigger($$anchor, {
591
1016
  children: ($$anchor, $$slotProps) => {
592
- var fragment_2 = root_1$23();
1017
+ var fragment_2 = root_1$22();
593
1018
  var span = $.first_child(fragment_2);
594
1019
  var text = $.only_child(span, true);
595
1020
  var node_2 = $.sibling(span, 2);
596
1021
  var consequent = ($$anchor) => {
597
- var span_1 = root$118();
1022
+ var span_1 = root$116();
598
1023
  var text_1 = $.only_child(span_1, true);
599
1024
  $.template_effect(($0) => $.set_text(text_1, $0), [() => $$props.status.charAt(0).toUpperCase() + $$props.status.slice(1)]);
600
1025
  $.append($$anchor, span_1);
@@ -621,7 +1046,7 @@ function AiTool$1($$anchor, $$props) {
621
1046
  $.component(node_4, () => Collapsible.Content, ($$anchor, Collapsible_Content) => {
622
1047
  Collapsible_Content($$anchor, {
623
1048
  children: ($$anchor, $$slotProps) => {
624
- var div = root_4$7();
1049
+ var div = root_4$8();
625
1050
  var node_5 = $.child(div);
626
1051
  var consequent_1 = ($$anchor) => {
627
1052
  var fragment_4 = root_2$17();
@@ -673,10 +1098,10 @@ var rest_excludes$114 = /* @__PURE__ */ new Set([
673
1098
  "$$legacy",
674
1099
  "children"
675
1100
  ]);
676
- var root$117 = $.from_html(`<div><!></div>`);
1101
+ var root$115 = $.from_html(`<div><!></div>`);
677
1102
  function Ai$1($$anchor, $$props) {
678
1103
  let rest = $.rest_props($$props, rest_excludes$114);
679
- var div = root$117();
1104
+ var div = root$115();
680
1105
  $.attribute_effect(div, () => ({
681
1106
  ...rest,
682
1107
  role: "log",
@@ -697,10 +1122,10 @@ var rest_excludes$113 = /* @__PURE__ */ new Set([
697
1122
  "$$legacy",
698
1123
  "children"
699
1124
  ]);
700
- var root$116 = $.from_html(`<div><!></div>`);
1125
+ var root$114 = $.from_html(`<div><!></div>`);
701
1126
  function AiActions($$anchor, $$props) {
702
1127
  let rest = $.rest_props($$props, rest_excludes$113);
703
- var div = root$116();
1128
+ var div = root$114();
704
1129
  $.attribute_effect(div, () => ({
705
1130
  ...rest,
706
1131
  "data-scope": "ai",
@@ -719,10 +1144,10 @@ var rest_excludes$112 = /* @__PURE__ */ new Set([
719
1144
  "$$legacy",
720
1145
  "children"
721
1146
  ]);
722
- var root$115 = $.from_html(`<div><!></div>`);
1147
+ var root$113 = $.from_html(`<div><!></div>`);
723
1148
  function AiContent($$anchor, $$props) {
724
1149
  let rest = $.rest_props($$props, rest_excludes$112);
725
- var div = root$115();
1150
+ var div = root$113();
726
1151
  $.attribute_effect(div, () => ({
727
1152
  ...rest,
728
1153
  "data-scope": "ai",
@@ -741,10 +1166,10 @@ var rest_excludes$111 = /* @__PURE__ */ new Set([
741
1166
  "$$legacy",
742
1167
  "children"
743
1168
  ]);
744
- var root$114 = $.from_html(`<span><!></span>`);
1169
+ var root$112 = $.from_html(`<span><!></span>`);
745
1170
  function AiLoader($$anchor, $$props) {
746
1171
  let rest = $.rest_props($$props, rest_excludes$111);
747
- var span = root$114();
1172
+ var span = root$112();
748
1173
  $.attribute_effect(span, () => ({
749
1174
  ...rest,
750
1175
  role: "status",
@@ -793,8 +1218,8 @@ var rest_excludes$110 = /* @__PURE__ */ new Set([
793
1218
  "status",
794
1219
  "onRemove"
795
1220
  ]);
796
- var root$113 = $.from_svg(`<svg viewBox="0 0 16 16" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="square"><rect x="2.5" y="3.5" width="11" height="9"></rect><path d="M2.5 10.5 6 7l3 3 2-1.5 2.5 2"></path><circle cx="6" cy="6" r="0.75" fill="currentColor" stroke="none"></circle></svg>`);
797
- var root_1$22 = $.from_svg(`<svg viewBox="0 0 16 16" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="square"><path d="M4 2.5h5l3 3V13.5H4z"></path><path d="M9 2.5v3h3"></path></svg>`);
1221
+ var root$111 = $.from_svg(`<svg viewBox="0 0 16 16" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="square"><rect x="2.5" y="3.5" width="11" height="9"></rect><path d="M2.5 10.5 6 7l3 3 2-1.5 2.5 2"></path><circle cx="6" cy="6" r="0.75" fill="currentColor" stroke="none"></circle></svg>`);
1222
+ var root_1$21 = $.from_svg(`<svg viewBox="0 0 16 16" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="square"><path d="M4 2.5h5l3 3V13.5H4z"></path><path d="M9 2.5v3h3"></path></svg>`);
798
1223
  var root_2$16 = $.from_html(`<span> </span>`);
799
1224
  var root_3$9 = $.from_html(`<span><!> <span> </span> <!> <button type="button" data-remove=""><svg viewBox="0 0 16 16" width="12" height="12" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="square"><path d="M4 4l8 8M12 4l-8 8"></path></svg></button></span>`);
800
1225
  function Attachment$1($$anchor, $$props) {
@@ -836,12 +1261,12 @@ function Attachment$1($$anchor, $$props) {
836
1261
  }));
837
1262
  var node = $.child(span);
838
1263
  var consequent = ($$anchor) => {
839
- var svg = root$113();
1264
+ var svg = root$111();
840
1265
  $.append($$anchor, svg);
841
1266
  };
842
1267
  var d = $.derived(() => isImage($$props.name));
843
1268
  var alternate = ($$anchor) => {
844
- var svg_1 = root_1$22();
1269
+ var svg_1 = root_1$21();
845
1270
  $.append($$anchor, svg_1);
846
1271
  };
847
1272
  $.if(node, ($$render) => {
@@ -879,10 +1304,10 @@ var rest_excludes$109 = /* @__PURE__ */ new Set([
879
1304
  "$$legacy",
880
1305
  "children"
881
1306
  ]);
882
- var root$112 = $.from_html(`<span><!></span>`);
1307
+ var root$110 = $.from_html(`<span><!></span>`);
883
1308
  function Attachments$1($$anchor, $$props) {
884
1309
  let rest = $.rest_props($$props, rest_excludes$109);
885
- var span = root$112();
1310
+ var span = root$110();
886
1311
  $.attribute_effect(span, () => ({
887
1312
  ...rest,
888
1313
  "data-scope": "ai",
@@ -907,12 +1332,12 @@ var rest_excludes$108 = /* @__PURE__ */ new Set([
907
1332
  "status",
908
1333
  "children"
909
1334
  ]);
910
- var root$111 = $.from_html(`<div><!></div>`);
1335
+ var root$109 = $.from_html(`<div><!></div>`);
911
1336
  function Alert$1($$anchor, $$props) {
912
1337
  $.push($$props, true);
913
1338
  let status = $.prop($$props, "status", 3, "ink"), rest = $.rest_props($$props, rest_excludes$108);
914
1339
  setContext("alert:status", () => status());
915
- var div = root$111();
1340
+ var div = root$109();
916
1341
  $.attribute_effect(div, () => ({
917
1342
  ...rest,
918
1343
  role: status() === "ink" || status() === "info" ? "status" : "alert",
@@ -934,10 +1359,10 @@ var rest_excludes$107 = /* @__PURE__ */ new Set([
934
1359
  "$$legacy",
935
1360
  "children"
936
1361
  ]);
937
- var root$110 = $.from_html(`<div><!></div>`);
1362
+ var root$108 = $.from_html(`<div><!></div>`);
938
1363
  function AlertBody($$anchor, $$props) {
939
1364
  let rest = $.rest_props($$props, rest_excludes$107);
940
- var div = root$110();
1365
+ var div = root$108();
941
1366
  $.attribute_effect(div, () => ({
942
1367
  ...rest,
943
1368
  "data-scope": "alert",
@@ -956,10 +1381,10 @@ var rest_excludes$106 = /* @__PURE__ */ new Set([
956
1381
  "$$legacy",
957
1382
  "children"
958
1383
  ]);
959
- var root$109 = $.from_html(`<p><!></p>`);
1384
+ var root$107 = $.from_html(`<p><!></p>`);
960
1385
  function AlertDescription($$anchor, $$props) {
961
1386
  let rest = $.rest_props($$props, rest_excludes$106);
962
- var p = root$109();
1387
+ var p = root$107();
963
1388
  $.attribute_effect(p, () => ({
964
1389
  ...rest,
965
1390
  "data-scope": "alert",
@@ -977,7 +1402,7 @@ var rest_excludes$105 = /* @__PURE__ */ new Set([
977
1402
  "$$events",
978
1403
  "$$legacy"
979
1404
  ]);
980
- var root$108 = $.from_html(`<span><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path></path></svg></span>`);
1405
+ var root$106 = $.from_html(`<span><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path></path></svg></span>`);
981
1406
  function AlertIcon($$anchor, $$props) {
982
1407
  $.push($$props, true);
983
1408
  let rest = $.rest_props($$props, rest_excludes$105);
@@ -989,7 +1414,7 @@ function AlertIcon($$anchor, $$props) {
989
1414
  danger: "M6 6l12 12M18 6 6 18",
990
1415
  ink: "M12 8v5m0 3v.01M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18Z"
991
1416
  };
992
- var span = root$108();
1417
+ var span = root$106();
993
1418
  $.attribute_effect(span, () => ({
994
1419
  ...rest,
995
1420
  "data-scope": "alert",
@@ -1012,10 +1437,10 @@ var rest_excludes$104 = /* @__PURE__ */ new Set([
1012
1437
  "$$legacy",
1013
1438
  "children"
1014
1439
  ]);
1015
- var root$107 = $.from_html(`<p><!></p>`);
1440
+ var root$105 = $.from_html(`<p><!></p>`);
1016
1441
  function AlertTitle($$anchor, $$props) {
1017
1442
  let rest = $.rest_props($$props, rest_excludes$104);
1018
- var p = root$107();
1443
+ var p = root$105();
1019
1444
  $.attribute_effect(p, () => ({
1020
1445
  ...rest,
1021
1446
  "data-scope": "alert",
@@ -1050,7 +1475,7 @@ var rest_excludes$103 = /* @__PURE__ */ new Set([
1050
1475
  "placeholder",
1051
1476
  "filter"
1052
1477
  ]);
1053
- var root$106 = $.from_html(`<!> <!>`, 1);
1478
+ var root$104 = $.from_html(`<!> <!>`, 1);
1054
1479
  function AutoComplete$1($$anchor, $$props) {
1055
1480
  $.push($$props, true);
1056
1481
  let value = $.prop($$props, "value", 15, ""), items = $.prop($$props, "items", 19, () => []), rest = $.rest_props($$props, rest_excludes$103);
@@ -1080,7 +1505,7 @@ function AutoComplete$1($$anchor, $$props) {
1080
1505
  positioning: { sameWidth: true }
1081
1506
  }, () => rest, {
1082
1507
  children: ($$anchor, $$slotProps) => {
1083
- var fragment_1 = root$106();
1508
+ var fragment_1 = root$104();
1084
1509
  var node_1 = $.first_child(fragment_1);
1085
1510
  $.component(node_1, () => Combobox$1.Control, ($$anchor, ArkCombobox_Control) => {
1086
1511
  ArkCombobox_Control($$anchor, {
@@ -1110,7 +1535,7 @@ function AutoComplete$1($$anchor, $$props) {
1110
1535
  $.component(node_5, () => Combobox$1.Content, ($$anchor, ArkCombobox_Content) => {
1111
1536
  ArkCombobox_Content($$anchor, {
1112
1537
  children: ($$anchor, $$slotProps) => {
1113
- var fragment_5 = root$106();
1538
+ var fragment_5 = root$104();
1114
1539
  var node_6 = $.first_child(fragment_5);
1115
1540
  $.component(node_6, () => Combobox$1.Empty, ($$anchor, ArkCombobox_Empty) => {
1116
1541
  ArkCombobox_Empty($$anchor, {
@@ -1198,10 +1623,10 @@ var rest_excludes$102 = /* @__PURE__ */ new Set([
1198
1623
  "ratio",
1199
1624
  "children"
1200
1625
  ]);
1201
- var root$105 = $.from_html(`<div><!></div>`);
1626
+ var root$103 = $.from_html(`<div><!></div>`);
1202
1627
  function AspectRatio$1($$anchor, $$props) {
1203
1628
  let ratio = $.prop($$props, "ratio", 3, "1 / 1"), rest = $.rest_props($$props, rest_excludes$102);
1204
- var div = root$105();
1629
+ var div = root$103();
1205
1630
  $.attribute_effect(div, () => ({
1206
1631
  ...rest,
1207
1632
  "data-scope": "aspect-ratio",
@@ -1220,24 +1645,55 @@ function AspectRatio$1($$anchor, $$props) {
1220
1645
  const AspectRatio = AspectRatio$1;
1221
1646
  injectComponentStyle("aspect-ratio");
1222
1647
  //#endregion
1648
+ //#region src/components/avatar/Avatar.svelte
1649
+ var rest_excludes$101 = /* @__PURE__ */ new Set([
1650
+ "$$slots",
1651
+ "$$events",
1652
+ "$$legacy",
1653
+ "size",
1654
+ "children"
1655
+ ]);
1656
+ function Avatar$2($$anchor, $$props) {
1657
+ let rest = $.rest_props($$props, rest_excludes$101);
1658
+ var fragment = $.comment();
1659
+ var node = $.first_child(fragment);
1660
+ $.component(node, () => Avatar$1.Root, ($$anchor, ArkAvatar_Root) => {
1661
+ ArkAvatar_Root($$anchor, $.spread_props(() => rest, {
1662
+ get "data-size"() {
1663
+ return $$props.size;
1664
+ },
1665
+ children: ($$anchor, $$slotProps) => {
1666
+ var fragment_1 = $.comment();
1667
+ var node_1 = $.first_child(fragment_1);
1668
+ $.snippet(node_1, () => $$props.children ?? $.noop);
1669
+ $.append($$anchor, fragment_1);
1670
+ },
1671
+ $$slots: { default: true }
1672
+ }));
1673
+ });
1674
+ $.append($$anchor, fragment);
1675
+ }
1676
+ //#endregion
1223
1677
  //#region src/components/avatar/index.ts
1224
- /** Ark's Avatar, dressed in the paper-and-ink system: a circular seal on
1225
- * inset paper that holds initials until the image loads over them. The
1226
- * API is Ark's own — Root, Image, Fallback. */
1227
- const Avatar = Avatar$1;
1678
+ /** Avatar, dressed in the paper-and-ink system: a circular seal on
1679
+ * inset paper that holds initials until the image loads over them.
1680
+ * `size` picks a control-height rung for the seal — the core styles
1681
+ * re-point `--bs-avatar-size` per rung, and scenes can still retune the
1682
+ * variable directly. */
1683
+ const Avatar = Object.assign({}, Avatar$1, { Root: Avatar$2 });
1228
1684
  injectComponentStyle("avatar");
1229
1685
  //#endregion
1230
1686
  //#region src/components/avatar-group/AvatarGroup.svelte
1231
- var rest_excludes$101 = /* @__PURE__ */ new Set([
1687
+ var rest_excludes$100 = /* @__PURE__ */ new Set([
1232
1688
  "$$slots",
1233
1689
  "$$events",
1234
1690
  "$$legacy",
1235
1691
  "children"
1236
1692
  ]);
1237
- var root$104 = $.from_html(`<div><!></div>`);
1693
+ var root$102 = $.from_html(`<div><!></div>`);
1238
1694
  function AvatarGroup$1($$anchor, $$props) {
1239
- let rest = $.rest_props($$props, rest_excludes$101);
1240
- var div = root$104();
1695
+ let rest = $.rest_props($$props, rest_excludes$100);
1696
+ var div = root$102();
1241
1697
  $.attribute_effect(div, () => ({
1242
1698
  ...rest,
1243
1699
  "data-scope": "avatar-group",
@@ -1256,28 +1712,52 @@ const AvatarGroup = AvatarGroup$1;
1256
1712
  injectComponentStyle("avatar-group");
1257
1713
  //#endregion
1258
1714
  //#region src/components/back-top/BackTop.svelte
1259
- var rest_excludes$100 = /* @__PURE__ */ new Set([
1715
+ var rest_excludes$99 = /* @__PURE__ */ new Set([
1260
1716
  "$$slots",
1261
1717
  "$$events",
1262
1718
  "$$legacy",
1263
1719
  "threshold",
1264
1720
  "label",
1721
+ "scrollEl",
1265
1722
  "children"
1266
1723
  ]);
1267
- var root$103 = $.from_svg(`<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m6 14 6-6 6 6"></path></svg>`);
1268
- var root_1$21 = $.from_html(`<div data-scope="back-top" data-part="root"><!></div>`);
1724
+ var root$101 = $.from_svg(`<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m6 14 6-6 6 6"></path></svg>`);
1725
+ var root_1$20 = $.from_html(`<div><!></div>`);
1269
1726
  function BackTop$1($$anchor, $$props) {
1270
1727
  $.push($$props, true);
1271
- let threshold = $.prop($$props, "threshold", 3, 400), label = $.prop($$props, "label", 3, "Back to top"), rest = $.rest_props($$props, rest_excludes$100);
1728
+ let threshold = $.prop($$props, "threshold", 3, 400), label = $.prop($$props, "label", 3, "Back to top"), rest = $.rest_props($$props, rest_excludes$99);
1272
1729
  let visible = $.state(false);
1273
1730
  $.user_effect(() => {
1274
1731
  if (typeof window === "undefined") return;
1275
- const onScroll = () => $.set(visible, window.scrollY > threshold());
1732
+ const el = $$props.scrollEl?.() ?? null;
1733
+ const onScroll = () => $.set(visible, (el ? el.scrollTop : window.scrollY) > threshold());
1276
1734
  onScroll();
1277
- window.addEventListener("scroll", onScroll, { passive: true });
1278
- return () => window.removeEventListener("scroll", onScroll);
1735
+ if (el) el.addEventListener("scroll", onScroll, { passive: true });
1736
+ else window.addEventListener("scroll", onScroll, { passive: true });
1737
+ return () => {
1738
+ if (el) el.removeEventListener("scroll", onScroll);
1739
+ else window.removeEventListener("scroll", onScroll);
1740
+ };
1279
1741
  });
1280
- var div = root_1$21();
1742
+ const toTop = () => {
1743
+ const el = $$props.scrollEl?.();
1744
+ if (!el) {
1745
+ window.scrollTo({ top: 0 });
1746
+ return;
1747
+ }
1748
+ const reduce = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
1749
+ el.scrollTo({
1750
+ top: 0,
1751
+ behavior: reduce ? "auto" : "smooth"
1752
+ });
1753
+ };
1754
+ var div = root_1$20();
1755
+ $.attribute_effect(div, () => ({
1756
+ "data-scope": "back-top",
1757
+ "data-part": "root",
1758
+ "data-state": $.get(visible) ? "shown" : "hidden",
1759
+ ...$$props.scrollEl ? { "data-container": "" } : {}
1760
+ }));
1281
1761
  var node = $.child(div);
1282
1762
  {
1283
1763
  let $0 = $.derived(() => $.get(visible) ? void 0 : "true");
@@ -1296,7 +1776,7 @@ function BackTop$1($$anchor, $$props) {
1296
1776
  get tabindex() {
1297
1777
  return $.get($1);
1298
1778
  },
1299
- onclick: () => window.scrollTo({ top: 0 }),
1779
+ onclick: toTop,
1300
1780
  children: ($$anchor, $$slotProps) => {
1301
1781
  var fragment = $.comment();
1302
1782
  var node_1 = $.first_child(fragment);
@@ -1307,7 +1787,7 @@ function BackTop$1($$anchor, $$props) {
1307
1787
  $.append($$anchor, fragment_1);
1308
1788
  };
1309
1789
  var alternate = ($$anchor) => {
1310
- var svg = root$103();
1790
+ var svg = root$101();
1311
1791
  $.append($$anchor, svg);
1312
1792
  };
1313
1793
  $.if(node_1, ($$render) => {
@@ -1320,7 +1800,6 @@ function BackTop$1($$anchor, $$props) {
1320
1800
  }));
1321
1801
  }
1322
1802
  $.reset(div);
1323
- $.template_effect(() => $.set_attribute(div, "data-state", $.get(visible) ? "shown" : "hidden"));
1324
1803
  $.append($$anchor, div);
1325
1804
  $.pop();
1326
1805
  }
@@ -1337,7 +1816,7 @@ const BackTop = BackTop$1;
1337
1816
  injectComponentStyle("back-top");
1338
1817
  //#endregion
1339
1818
  //#region src/components/badge/Badge.svelte
1340
- var rest_excludes$99 = /* @__PURE__ */ new Set([
1819
+ var rest_excludes$98 = /* @__PURE__ */ new Set([
1341
1820
  "$$slots",
1342
1821
  "$$events",
1343
1822
  "$$legacy",
@@ -1345,12 +1824,12 @@ var rest_excludes$99 = /* @__PURE__ */ new Set([
1345
1824
  "variant",
1346
1825
  "children"
1347
1826
  ]);
1348
- var root$102 = $.from_html(`<span><!></span>`);
1827
+ var root$100 = $.from_html(`<span><!></span>`);
1349
1828
  function Badge$1($$anchor, $$props) {
1350
1829
  $.push($$props, true);
1351
- let tone = $.prop($$props, "tone", 3, "ink"), variant = $.prop($$props, "variant", 3, "solid"), rest = $.rest_props($$props, rest_excludes$99);
1830
+ let tone = $.prop($$props, "tone", 3, "ink"), variant = $.prop($$props, "variant", 3, "solid"), rest = $.rest_props($$props, rest_excludes$98);
1352
1831
  injectComponentStyle("badge");
1353
- var span = root$102();
1832
+ var span = root$100();
1354
1833
  $.attribute_effect(span, () => ({
1355
1834
  ...rest,
1356
1835
  "data-scope": "badge",
@@ -1371,16 +1850,16 @@ function Badge$1($$anchor, $$props) {
1371
1850
  const Badge = Badge$1;
1372
1851
  //#endregion
1373
1852
  //#region src/components/breadcrumb/Breadcrumb.svelte
1374
- var rest_excludes$98 = /* @__PURE__ */ new Set([
1853
+ var rest_excludes$97 = /* @__PURE__ */ new Set([
1375
1854
  "$$slots",
1376
1855
  "$$events",
1377
1856
  "$$legacy",
1378
1857
  "children"
1379
1858
  ]);
1380
- var root$101 = $.from_html(`<nav><!></nav>`);
1859
+ var root$99 = $.from_html(`<nav><!></nav>`);
1381
1860
  function Breadcrumb$1($$anchor, $$props) {
1382
- let rest = $.rest_props($$props, rest_excludes$98);
1383
- var nav = root$101();
1861
+ let rest = $.rest_props($$props, rest_excludes$97);
1862
+ var nav = root$99();
1384
1863
  $.attribute_effect(nav, () => ({
1385
1864
  ...rest,
1386
1865
  "aria-label": "Breadcrumb",
@@ -1394,16 +1873,16 @@ function Breadcrumb$1($$anchor, $$props) {
1394
1873
  }
1395
1874
  //#endregion
1396
1875
  //#region src/components/breadcrumb/BreadcrumbCurrent.svelte
1397
- var rest_excludes$97 = /* @__PURE__ */ new Set([
1876
+ var rest_excludes$96 = /* @__PURE__ */ new Set([
1398
1877
  "$$slots",
1399
1878
  "$$events",
1400
1879
  "$$legacy",
1401
1880
  "children"
1402
1881
  ]);
1403
- var root$100 = $.from_html(`<span><!></span>`);
1882
+ var root$98 = $.from_html(`<span><!></span>`);
1404
1883
  function BreadcrumbCurrent($$anchor, $$props) {
1405
- let rest = $.rest_props($$props, rest_excludes$97);
1406
- var span = root$100();
1884
+ let rest = $.rest_props($$props, rest_excludes$96);
1885
+ var span = root$98();
1407
1886
  $.attribute_effect(span, () => ({
1408
1887
  ...rest,
1409
1888
  "aria-current": "page",
@@ -1417,16 +1896,16 @@ function BreadcrumbCurrent($$anchor, $$props) {
1417
1896
  }
1418
1897
  //#endregion
1419
1898
  //#region src/components/breadcrumb/BreadcrumbItem.svelte
1420
- var rest_excludes$96 = /* @__PURE__ */ new Set([
1899
+ var rest_excludes$95 = /* @__PURE__ */ new Set([
1421
1900
  "$$slots",
1422
1901
  "$$events",
1423
1902
  "$$legacy",
1424
1903
  "children"
1425
1904
  ]);
1426
- var root$99 = $.from_html(`<li><!></li>`);
1905
+ var root$97 = $.from_html(`<li><!></li>`);
1427
1906
  function BreadcrumbItem($$anchor, $$props) {
1428
- let rest = $.rest_props($$props, rest_excludes$96);
1429
- var li = root$99();
1907
+ let rest = $.rest_props($$props, rest_excludes$95);
1908
+ var li = root$97();
1430
1909
  $.attribute_effect(li, () => ({
1431
1910
  ...rest,
1432
1911
  "data-scope": "breadcrumb",
@@ -1439,16 +1918,16 @@ function BreadcrumbItem($$anchor, $$props) {
1439
1918
  }
1440
1919
  //#endregion
1441
1920
  //#region src/components/breadcrumb/BreadcrumbLink.svelte
1442
- var rest_excludes$95 = /* @__PURE__ */ new Set([
1921
+ var rest_excludes$94 = /* @__PURE__ */ new Set([
1443
1922
  "$$slots",
1444
1923
  "$$events",
1445
1924
  "$$legacy",
1446
1925
  "children"
1447
1926
  ]);
1448
- var root$98 = $.from_html(`<a><!></a>`);
1927
+ var root$96 = $.from_html(`<a><!></a>`);
1449
1928
  function BreadcrumbLink($$anchor, $$props) {
1450
- let rest = $.rest_props($$props, rest_excludes$95);
1451
- var a = root$98();
1929
+ let rest = $.rest_props($$props, rest_excludes$94);
1930
+ var a = root$96();
1452
1931
  $.attribute_effect(a, () => ({
1453
1932
  ...rest,
1454
1933
  "data-scope": "breadcrumb",
@@ -1461,16 +1940,16 @@ function BreadcrumbLink($$anchor, $$props) {
1461
1940
  }
1462
1941
  //#endregion
1463
1942
  //#region src/components/breadcrumb/BreadcrumbList.svelte
1464
- var rest_excludes$94 = /* @__PURE__ */ new Set([
1943
+ var rest_excludes$93 = /* @__PURE__ */ new Set([
1465
1944
  "$$slots",
1466
1945
  "$$events",
1467
1946
  "$$legacy",
1468
1947
  "children"
1469
1948
  ]);
1470
- var root$97 = $.from_html(`<ol><!></ol>`);
1949
+ var root$95 = $.from_html(`<ol><!></ol>`);
1471
1950
  function BreadcrumbList($$anchor, $$props) {
1472
- let rest = $.rest_props($$props, rest_excludes$94);
1473
- var ol = root$97();
1951
+ let rest = $.rest_props($$props, rest_excludes$93);
1952
+ var ol = root$95();
1474
1953
  $.attribute_effect(ol, () => ({
1475
1954
  ...rest,
1476
1955
  "data-scope": "breadcrumb",
@@ -1483,16 +1962,16 @@ function BreadcrumbList($$anchor, $$props) {
1483
1962
  }
1484
1963
  //#endregion
1485
1964
  //#region src/components/breadcrumb/BreadcrumbSeparator.svelte
1486
- var rest_excludes$93 = /* @__PURE__ */ new Set([
1965
+ var rest_excludes$92 = /* @__PURE__ */ new Set([
1487
1966
  "$$slots",
1488
1967
  "$$events",
1489
1968
  "$$legacy",
1490
1969
  "children"
1491
1970
  ]);
1492
- var root$96 = $.from_html(`<span><!></span>`);
1971
+ var root$94 = $.from_html(`<span><!></span>`);
1493
1972
  function BreadcrumbSeparator($$anchor, $$props) {
1494
- let rest = $.rest_props($$props, rest_excludes$93);
1495
- var span = root$96();
1973
+ let rest = $.rest_props($$props, rest_excludes$92);
1974
+ var span = root$94();
1496
1975
  $.attribute_effect(span, () => ({
1497
1976
  ...rest,
1498
1977
  "aria-hidden": "true",
@@ -1533,7 +2012,7 @@ const Breadcrumb = Object.assign(Breadcrumb$1, {
1533
2012
  injectComponentStyle("breadcrumb");
1534
2013
  //#endregion
1535
2014
  //#region src/components/button-group/ButtonGroup.svelte
1536
- var rest_excludes$92 = /* @__PURE__ */ new Set([
2015
+ var rest_excludes$91 = /* @__PURE__ */ new Set([
1537
2016
  "$$slots",
1538
2017
  "$$events",
1539
2018
  "$$legacy",
@@ -1542,10 +2021,10 @@ var rest_excludes$92 = /* @__PURE__ */ new Set([
1542
2021
  "radius",
1543
2022
  "children"
1544
2023
  ]);
1545
- var root$95 = $.from_html(`<div><!></div>`);
2024
+ var root$93 = $.from_html(`<div><!></div>`);
1546
2025
  function ButtonGroup$1($$anchor, $$props) {
1547
- let orientation = $.prop($$props, "orientation", 3, "horizontal"), rest = $.rest_props($$props, rest_excludes$92);
1548
- var div = root$95();
2026
+ let orientation = $.prop($$props, "orientation", 3, "horizontal"), rest = $.rest_props($$props, rest_excludes$91);
2027
+ var div = root$93();
1549
2028
  $.attribute_effect(div, () => ({
1550
2029
  ...rest,
1551
2030
  role: "group",
@@ -1568,17 +2047,17 @@ const ButtonGroup = ButtonGroup$1;
1568
2047
  injectComponentStyle("button-group");
1569
2048
  //#endregion
1570
2049
  //#region src/components/banner/Banner.svelte
1571
- var rest_excludes$91 = /* @__PURE__ */ new Set([
2050
+ var rest_excludes$90 = /* @__PURE__ */ new Set([
1572
2051
  "$$slots",
1573
2052
  "$$events",
1574
2053
  "$$legacy",
1575
2054
  "status",
1576
2055
  "children"
1577
2056
  ]);
1578
- var root$94 = $.from_html(`<div><!></div>`);
2057
+ var root$92 = $.from_html(`<div><!></div>`);
1579
2058
  function Banner$1($$anchor, $$props) {
1580
- let status = $.prop($$props, "status", 3, "ink"), rest = $.rest_props($$props, rest_excludes$91);
1581
- var div = root$94();
2059
+ let status = $.prop($$props, "status", 3, "ink"), rest = $.rest_props($$props, rest_excludes$90);
2060
+ var div = root$92();
1582
2061
  $.attribute_effect(div, () => ({
1583
2062
  ...rest,
1584
2063
  role: status() === "ink" ? void 0 : "status",
@@ -1593,16 +2072,16 @@ function Banner$1($$anchor, $$props) {
1593
2072
  }
1594
2073
  //#endregion
1595
2074
  //#region src/components/banner/BannerActions.svelte
1596
- var rest_excludes$90 = /* @__PURE__ */ new Set([
2075
+ var rest_excludes$89 = /* @__PURE__ */ new Set([
1597
2076
  "$$slots",
1598
2077
  "$$events",
1599
2078
  "$$legacy",
1600
2079
  "children"
1601
2080
  ]);
1602
- var root$93 = $.from_html(`<div><!></div>`);
2081
+ var root$91 = $.from_html(`<div><!></div>`);
1603
2082
  function BannerActions($$anchor, $$props) {
1604
- let rest = $.rest_props($$props, rest_excludes$90);
1605
- var div = root$93();
2083
+ let rest = $.rest_props($$props, rest_excludes$89);
2084
+ var div = root$91();
1606
2085
  $.attribute_effect(div, () => ({
1607
2086
  ...rest,
1608
2087
  "data-scope": "banner",
@@ -1615,16 +2094,16 @@ function BannerActions($$anchor, $$props) {
1615
2094
  }
1616
2095
  //#endregion
1617
2096
  //#region src/components/banner/BannerBody.svelte
1618
- var rest_excludes$89 = /* @__PURE__ */ new Set([
2097
+ var rest_excludes$88 = /* @__PURE__ */ new Set([
1619
2098
  "$$slots",
1620
2099
  "$$events",
1621
2100
  "$$legacy",
1622
2101
  "children"
1623
2102
  ]);
1624
- var root$92 = $.from_html(`<div><!></div>`);
2103
+ var root$90 = $.from_html(`<div><!></div>`);
1625
2104
  function BannerBody($$anchor, $$props) {
1626
- let rest = $.rest_props($$props, rest_excludes$89);
1627
- var div = root$92();
2105
+ let rest = $.rest_props($$props, rest_excludes$88);
2106
+ var div = root$90();
1628
2107
  $.attribute_effect(div, () => ({
1629
2108
  ...rest,
1630
2109
  "data-scope": "banner",
@@ -1637,17 +2116,17 @@ function BannerBody($$anchor, $$props) {
1637
2116
  }
1638
2117
  //#endregion
1639
2118
  //#region src/components/banner/BannerClose.svelte
1640
- var rest_excludes$88 = /* @__PURE__ */ new Set([
2119
+ var rest_excludes$87 = /* @__PURE__ */ new Set([
1641
2120
  "$$slots",
1642
2121
  "$$events",
1643
2122
  "$$legacy",
1644
2123
  "type"
1645
2124
  ]);
1646
- var root$91 = $.from_html(`<button><svg viewBox="0 0 16 16" fill="none" aria-hidden="true"><path d="M4 4l8 8M12 4l-8 8" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path></svg></button>`);
2125
+ var root$89 = $.from_html(`<button><svg viewBox="0 0 16 16" fill="none" aria-hidden="true"><path d="M4 4l8 8M12 4l-8 8" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path></svg></button>`);
1647
2126
  function BannerClose($$anchor, $$props) {
1648
2127
  $.push($$props, true);
1649
- let type = $.prop($$props, "type", 3, "button"), rest = $.rest_props($$props, rest_excludes$88);
1650
- var button = root$91();
2128
+ let type = $.prop($$props, "type", 3, "button"), rest = $.rest_props($$props, rest_excludes$87);
2129
+ var button = root$89();
1651
2130
  $.attribute_effect(button, () => ({
1652
2131
  ...rest,
1653
2132
  type: type(),
@@ -1660,16 +2139,16 @@ function BannerClose($$anchor, $$props) {
1660
2139
  }
1661
2140
  //#endregion
1662
2141
  //#region src/components/banner/BannerDescription.svelte
1663
- var rest_excludes$87 = /* @__PURE__ */ new Set([
2142
+ var rest_excludes$86 = /* @__PURE__ */ new Set([
1664
2143
  "$$slots",
1665
2144
  "$$events",
1666
2145
  "$$legacy",
1667
2146
  "children"
1668
2147
  ]);
1669
- var root$90 = $.from_html(`<p><!></p>`);
2148
+ var root$88 = $.from_html(`<p><!></p>`);
1670
2149
  function BannerDescription($$anchor, $$props) {
1671
- let rest = $.rest_props($$props, rest_excludes$87);
1672
- var p = root$90();
2150
+ let rest = $.rest_props($$props, rest_excludes$86);
2151
+ var p = root$88();
1673
2152
  $.attribute_effect(p, () => ({
1674
2153
  ...rest,
1675
2154
  "data-scope": "banner",
@@ -1682,16 +2161,16 @@ function BannerDescription($$anchor, $$props) {
1682
2161
  }
1683
2162
  //#endregion
1684
2163
  //#region src/components/banner/BannerIcon.svelte
1685
- var rest_excludes$86 = /* @__PURE__ */ new Set([
2164
+ var rest_excludes$85 = /* @__PURE__ */ new Set([
1686
2165
  "$$slots",
1687
2166
  "$$events",
1688
2167
  "$$legacy",
1689
2168
  "children"
1690
2169
  ]);
1691
- var root$89 = $.from_html(`<span><!></span>`);
2170
+ var root$87 = $.from_html(`<span><!></span>`);
1692
2171
  function BannerIcon($$anchor, $$props) {
1693
- let rest = $.rest_props($$props, rest_excludes$86);
1694
- var span = root$89();
2172
+ let rest = $.rest_props($$props, rest_excludes$85);
2173
+ var span = root$87();
1695
2174
  $.attribute_effect(span, () => ({
1696
2175
  ...rest,
1697
2176
  "data-scope": "banner",
@@ -1704,16 +2183,16 @@ function BannerIcon($$anchor, $$props) {
1704
2183
  }
1705
2184
  //#endregion
1706
2185
  //#region src/components/banner/BannerTitle.svelte
1707
- var rest_excludes$85 = /* @__PURE__ */ new Set([
2186
+ var rest_excludes$84 = /* @__PURE__ */ new Set([
1708
2187
  "$$slots",
1709
2188
  "$$events",
1710
2189
  "$$legacy",
1711
2190
  "children"
1712
2191
  ]);
1713
- var root$88 = $.from_html(`<p><!></p>`);
2192
+ var root$86 = $.from_html(`<p><!></p>`);
1714
2193
  function BannerTitle($$anchor, $$props) {
1715
- let rest = $.rest_props($$props, rest_excludes$85);
1716
- var p = root$88();
2194
+ let rest = $.rest_props($$props, rest_excludes$84);
2195
+ var p = root$86();
1717
2196
  $.attribute_effect(p, () => ({
1718
2197
  ...rest,
1719
2198
  "data-scope": "banner",
@@ -1782,7 +2261,7 @@ const header = ($$anchor) => {
1782
2261
  $.component(node_2, () => DatePicker$1.PrevTrigger, ($$anchor, ArkDatePicker_PrevTrigger) => {
1783
2262
  ArkDatePicker_PrevTrigger($$anchor, {
1784
2263
  children: ($$anchor, $$slotProps) => {
1785
- var svg = root$87();
2264
+ var svg = root$85();
1786
2265
  $.append($$anchor, svg);
1787
2266
  },
1788
2267
  $$slots: { default: true }
@@ -1814,7 +2293,7 @@ const header = ($$anchor) => {
1814
2293
  $.component(node_5, () => DatePicker$1.NextTrigger, ($$anchor, ArkDatePicker_NextTrigger) => {
1815
2294
  ArkDatePicker_NextTrigger($$anchor, {
1816
2295
  children: ($$anchor, $$slotProps) => {
1817
- var svg_1 = root_1$20();
2296
+ var svg_1 = root_1$19();
1818
2297
  $.append($$anchor, svg_1);
1819
2298
  },
1820
2299
  $$slots: { default: true }
@@ -1828,7 +2307,7 @@ const header = ($$anchor) => {
1828
2307
  $.reset(div);
1829
2308
  $.append($$anchor, div);
1830
2309
  };
1831
- var rest_excludes$84 = /* @__PURE__ */ new Set([
2310
+ var rest_excludes$83 = /* @__PURE__ */ new Set([
1832
2311
  "$$slots",
1833
2312
  "$$events",
1834
2313
  "$$legacy",
@@ -1838,16 +2317,16 @@ var rest_excludes$84 = /* @__PURE__ */ new Set([
1838
2317
  "onValueChange",
1839
2318
  "children"
1840
2319
  ]);
1841
- var root$87 = $.from_svg(`<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true" style="transform: rotate(180deg)"><path d="m9 5 7 7-7 7"></path></svg>`);
1842
- var root_1$20 = $.from_svg(`<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><path d="m9 5 7 7-7 7"></path></svg>`);
2320
+ var root$85 = $.from_svg(`<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true" style="transform: rotate(180deg)"><path d="m9 5 7 7-7 7"></path></svg>`);
2321
+ var root_1$19 = $.from_svg(`<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" aria-hidden="true"><path d="m9 5 7 7-7 7"></path></svg>`);
1843
2322
  var root_2$15 = $.from_html(`<!> <!> <!>`, 1);
1844
2323
  var root_3$8 = $.from_html(`<div data-scope="calendar" data-part="header"><!></div>`);
1845
- var root_4$6 = $.from_html(`<!> <!>`, 1);
1846
- var root_5$5 = $.from_html(`<div><!> <!></div>`);
2324
+ var root_4$7 = $.from_html(`<!> <!>`, 1);
2325
+ var root_5$7 = $.from_html(`<div><!> <!></div>`);
1847
2326
  function Calendar$1($$anchor, $$props) {
1848
2327
  $.push($$props, true);
1849
- let rest = $.rest_props($$props, rest_excludes$84);
1850
- var div_1 = root_5$5();
2328
+ let rest = $.rest_props($$props, rest_excludes$83);
2329
+ var div_1 = root_5$7();
1851
2330
  $.attribute_effect(div_1, () => ({
1852
2331
  ...rest,
1853
2332
  "data-scope": "calendar",
@@ -1876,7 +2355,7 @@ function Calendar$1($$anchor, $$props) {
1876
2355
  ArkDatePicker_View($$anchor, {
1877
2356
  view: "day",
1878
2357
  children: ($$anchor, $$slotProps) => {
1879
- var fragment_8 = root_4$6();
2358
+ var fragment_8 = root_4$7();
1880
2359
  var node_8 = $.first_child(fragment_8);
1881
2360
  header(node_8);
1882
2361
  var node_9 = $.sibling(node_8, 2);
@@ -1887,7 +2366,7 @@ function Calendar$1($$anchor, $$props) {
1887
2366
  $.component(node_10, () => DatePicker$1.Table, ($$anchor, ArkDatePicker_Table) => {
1888
2367
  ArkDatePicker_Table($$anchor, {
1889
2368
  children: ($$anchor, $$slotProps) => {
1890
- var fragment_10 = root_4$6();
2369
+ var fragment_10 = root_4$7();
1891
2370
  var node_11 = $.first_child(fragment_10);
1892
2371
  $.component(node_11, () => DatePicker$1.TableHead, ($$anchor, ArkDatePicker_TableHead) => {
1893
2372
  ArkDatePicker_TableHead($$anchor, {
@@ -2007,7 +2486,7 @@ function Calendar$1($$anchor, $$props) {
2007
2486
  ArkDatePicker_View_1($$anchor, {
2008
2487
  view: "month",
2009
2488
  children: ($$anchor, $$slotProps) => {
2010
- var fragment_21 = root_4$6();
2489
+ var fragment_21 = root_4$7();
2011
2490
  var node_22 = $.first_child(fragment_21);
2012
2491
  header(node_22);
2013
2492
  var node_23 = $.sibling(node_22, 2);
@@ -2100,7 +2579,7 @@ function Calendar$1($$anchor, $$props) {
2100
2579
  ArkDatePicker_View_2($$anchor, {
2101
2580
  view: "year",
2102
2581
  children: ($$anchor, $$slotProps) => {
2103
- var fragment_30 = root_4$6();
2582
+ var fragment_30 = root_4$7();
2104
2583
  var node_32 = $.first_child(fragment_30);
2105
2584
  header(node_32);
2106
2585
  var node_33 = $.sibling(node_32, 2);
@@ -2208,16 +2687,16 @@ injectComponentStyle("calendar");
2208
2687
  injectComponentStyle("date-picker");
2209
2688
  //#endregion
2210
2689
  //#region src/components/card/Card.svelte
2211
- var rest_excludes$83 = /* @__PURE__ */ new Set([
2690
+ var rest_excludes$82 = /* @__PURE__ */ new Set([
2212
2691
  "$$slots",
2213
2692
  "$$events",
2214
2693
  "$$legacy",
2215
2694
  "children"
2216
2695
  ]);
2217
- var root$86 = $.from_html(`<section><!></section>`);
2696
+ var root$84 = $.from_html(`<section><!></section>`);
2218
2697
  function Card$1($$anchor, $$props) {
2219
- let rest = $.rest_props($$props, rest_excludes$83);
2220
- var section = root$86();
2698
+ let rest = $.rest_props($$props, rest_excludes$82);
2699
+ var section = root$84();
2221
2700
  $.attribute_effect(section, () => ({
2222
2701
  ...rest,
2223
2702
  "data-scope": "card",
@@ -2230,16 +2709,16 @@ function Card$1($$anchor, $$props) {
2230
2709
  }
2231
2710
  //#endregion
2232
2711
  //#region src/components/card/CardContent.svelte
2233
- var rest_excludes$82 = /* @__PURE__ */ new Set([
2712
+ var rest_excludes$81 = /* @__PURE__ */ new Set([
2234
2713
  "$$slots",
2235
2714
  "$$events",
2236
2715
  "$$legacy",
2237
2716
  "children"
2238
2717
  ]);
2239
- var root$85 = $.from_html(`<div><!></div>`);
2718
+ var root$83 = $.from_html(`<div><!></div>`);
2240
2719
  function CardContent($$anchor, $$props) {
2241
- let rest = $.rest_props($$props, rest_excludes$82);
2242
- var div = root$85();
2720
+ let rest = $.rest_props($$props, rest_excludes$81);
2721
+ var div = root$83();
2243
2722
  $.attribute_effect(div, () => ({
2244
2723
  ...rest,
2245
2724
  "data-scope": "card",
@@ -2252,16 +2731,16 @@ function CardContent($$anchor, $$props) {
2252
2731
  }
2253
2732
  //#endregion
2254
2733
  //#region src/components/card/CardDescription.svelte
2255
- var rest_excludes$81 = /* @__PURE__ */ new Set([
2734
+ var rest_excludes$80 = /* @__PURE__ */ new Set([
2256
2735
  "$$slots",
2257
2736
  "$$events",
2258
2737
  "$$legacy",
2259
2738
  "children"
2260
2739
  ]);
2261
- var root$84 = $.from_html(`<p><!></p>`);
2740
+ var root$82 = $.from_html(`<p><!></p>`);
2262
2741
  function CardDescription($$anchor, $$props) {
2263
- let rest = $.rest_props($$props, rest_excludes$81);
2264
- var p = root$84();
2742
+ let rest = $.rest_props($$props, rest_excludes$80);
2743
+ var p = root$82();
2265
2744
  $.attribute_effect(p, () => ({
2266
2745
  ...rest,
2267
2746
  "data-scope": "card",
@@ -2274,16 +2753,16 @@ function CardDescription($$anchor, $$props) {
2274
2753
  }
2275
2754
  //#endregion
2276
2755
  //#region src/components/card/CardFooter.svelte
2277
- var rest_excludes$80 = /* @__PURE__ */ new Set([
2756
+ var rest_excludes$79 = /* @__PURE__ */ new Set([
2278
2757
  "$$slots",
2279
2758
  "$$events",
2280
2759
  "$$legacy",
2281
2760
  "children"
2282
2761
  ]);
2283
- var root$83 = $.from_html(`<footer><!></footer>`);
2762
+ var root$81 = $.from_html(`<footer><!></footer>`);
2284
2763
  function CardFooter($$anchor, $$props) {
2285
- let rest = $.rest_props($$props, rest_excludes$80);
2286
- var footer = root$83();
2764
+ let rest = $.rest_props($$props, rest_excludes$79);
2765
+ var footer = root$81();
2287
2766
  $.attribute_effect(footer, () => ({
2288
2767
  ...rest,
2289
2768
  "data-scope": "card",
@@ -2296,16 +2775,16 @@ function CardFooter($$anchor, $$props) {
2296
2775
  }
2297
2776
  //#endregion
2298
2777
  //#region src/components/card/CardHeader.svelte
2299
- var rest_excludes$79 = /* @__PURE__ */ new Set([
2778
+ var rest_excludes$78 = /* @__PURE__ */ new Set([
2300
2779
  "$$slots",
2301
2780
  "$$events",
2302
2781
  "$$legacy",
2303
2782
  "children"
2304
2783
  ]);
2305
- var root$82 = $.from_html(`<header><!></header>`);
2784
+ var root$80 = $.from_html(`<header><!></header>`);
2306
2785
  function CardHeader($$anchor, $$props) {
2307
- let rest = $.rest_props($$props, rest_excludes$79);
2308
- var header = root$82();
2786
+ let rest = $.rest_props($$props, rest_excludes$78);
2787
+ var header = root$80();
2309
2788
  $.attribute_effect(header, () => ({
2310
2789
  ...rest,
2311
2790
  "data-scope": "card",
@@ -2318,16 +2797,16 @@ function CardHeader($$anchor, $$props) {
2318
2797
  }
2319
2798
  //#endregion
2320
2799
  //#region src/components/card/CardTitle.svelte
2321
- var rest_excludes$78 = /* @__PURE__ */ new Set([
2800
+ var rest_excludes$77 = /* @__PURE__ */ new Set([
2322
2801
  "$$slots",
2323
2802
  "$$events",
2324
2803
  "$$legacy",
2325
2804
  "children"
2326
2805
  ]);
2327
- var root$81 = $.from_html(`<h3><!></h3>`);
2806
+ var root$79 = $.from_html(`<h3><!></h3>`);
2328
2807
  function CardTitle($$anchor, $$props) {
2329
- let rest = $.rest_props($$props, rest_excludes$78);
2330
- var h3 = root$81();
2808
+ let rest = $.rest_props($$props, rest_excludes$77);
2809
+ var h3 = root$79();
2331
2810
  $.attribute_effect(h3, () => ({
2332
2811
  ...rest,
2333
2812
  "data-scope": "card",
@@ -2353,8 +2832,41 @@ const Card = Object.assign(Card$1, {
2353
2832
  });
2354
2833
  injectComponentStyle("card");
2355
2834
  //#endregion
2835
+ //#region src/components/input/Input.svelte
2836
+ var rest_excludes$76 = /* @__PURE__ */ new Set([
2837
+ "$$slots",
2838
+ "$$events",
2839
+ "$$legacy",
2840
+ "value",
2841
+ "size",
2842
+ "invalid"
2843
+ ]);
2844
+ var root$78 = $.from_html(`<input/>`);
2845
+ function Input$1($$anchor, $$props) {
2846
+ $.push($$props, true);
2847
+ let value = $.prop($$props, "value", 15), size = $.prop($$props, "size", 3, "md"), invalid = $.prop($$props, "invalid", 3, false), rest = $.rest_props($$props, rest_excludes$76);
2848
+ const field = useFieldContext();
2849
+ const fieldProps = $.derived(() => field?.()?.getInputProps() ?? {});
2850
+ var input = root$78();
2851
+ var event_handler = (event) => {
2852
+ value(event.currentTarget.value);
2853
+ };
2854
+ $.attribute_effect(input, () => ({
2855
+ ...$.get(fieldProps),
2856
+ ...rest,
2857
+ "data-scope": "input",
2858
+ "data-part": "root",
2859
+ "data-size": size(),
2860
+ "data-invalid": invalid() || $.get(fieldProps)["data-invalid"] != null ? "" : void 0,
2861
+ oninput: event_handler
2862
+ }), void 0, void 0, void 0, void 0, true);
2863
+ $.bind_value(input, value);
2864
+ $.append($$anchor, input);
2865
+ $.pop();
2866
+ }
2867
+ //#endregion
2356
2868
  //#region src/components/cascade-select/CascadeSelect.svelte
2357
- var rest_excludes$77 = /* @__PURE__ */ new Set([
2869
+ var rest_excludes$75 = /* @__PURE__ */ new Set([
2358
2870
  "$$slots",
2359
2871
  "$$events",
2360
2872
  "$$legacy",
@@ -2362,14 +2874,18 @@ var rest_excludes$77 = /* @__PURE__ */ new Set([
2362
2874
  "data",
2363
2875
  "placeholder",
2364
2876
  "highlightTrigger",
2877
+ "filterable",
2365
2878
  "multiple",
2366
2879
  "disabled"
2367
2880
  ]);
2368
- var root$80 = $.from_html(`<span data-part="branch-indicator" aria-hidden="true"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m9 18 6-6-6-6"></path></svg></span>`);
2369
- var root_1$19 = $.from_html(`<li><span> </span> <!> <span><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m5 12.5 5 5L19 7"></path></svg></span></li>`);
2881
+ var root$77 = $.from_html(`<span data-part="branch-indicator" aria-hidden="true"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m9 18 6-6-6-6"></path></svg></span>`);
2882
+ var root_1$18 = $.from_html(`<li><span> </span> <!> <span><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m5 12.5 5 5L19 7"></path></svg></span></li>`);
2370
2883
  var root_2$14 = $.from_html(`<ul></ul> <!>`, 1);
2371
- var root_3$7 = $.from_html(`<div><div><!></div></div>`);
2372
- var root_4$5 = $.from_html(`<div><div><button><span> </span> <span><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m6 9 6 6 6-6"></path></svg></span></button></div> <!></div>`);
2884
+ var root_3$7 = $.from_html(`<div data-part="search"><!></div>`);
2885
+ var root_4$6 = $.from_html(`<p data-part="empty">Nothing matches</p>`);
2886
+ var root_5$6 = $.from_html(`<button type="button" data-part="match"> </button>`);
2887
+ var root_6$5 = $.from_html(`<div><div><!> <!></div></div>`);
2888
+ var root_7$4 = $.from_html(`<div><div><button><span> </span> <span><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m6 9 6 6 6-6"></path></svg></span></button></div> <!></div>`);
2373
2889
  function CascadeSelect$1($$anchor, $$props) {
2374
2890
  const id = $.props_id();
2375
2891
  $.push($$props, true);
@@ -2395,14 +2911,14 @@ function CascadeSelect$1($$anchor, $$props) {
2395
2911
  value: [...valuePath(), $.get(itemValue)]
2396
2912
  }));
2397
2913
  const itemState = $.derived(() => $.get(api).getItemState($.get(itemProps)));
2398
- var li = root_1$19();
2914
+ var li = root_1$18();
2399
2915
  $.attribute_effect(li, ($0) => ({ ...$0 }), [() => $.get(api).getItemProps($.get(itemProps))]);
2400
2916
  var span = $.child(li);
2401
2917
  $.attribute_effect(span, ($0) => ({ ...$0 }), [() => $.get(api).getItemTextProps($.get(itemProps))]);
2402
2918
  var text = $.only_child(span, true);
2403
2919
  var node_1 = $.sibling(span, 2);
2404
2920
  var consequent = ($$anchor) => {
2405
- var span_1 = root$80();
2921
+ var span_1 = root$77();
2406
2922
  $.append($$anchor, span_1);
2407
2923
  };
2408
2924
  $.if(node_1, ($$render) => {
@@ -2429,7 +2945,7 @@ function CascadeSelect$1($$anchor, $$props) {
2429
2945
  });
2430
2946
  $.append($$anchor, fragment);
2431
2947
  };
2432
- let value = $.prop($$props, "value", 15), placeholder = $.prop($$props, "placeholder", 3, "Select…"), multiple = $.prop($$props, "multiple", 3, false), disabled = $.prop($$props, "disabled", 3, false), rest = $.rest_props($$props, rest_excludes$77);
2948
+ let value = $.prop($$props, "value", 15), placeholder = $.prop($$props, "placeholder", 3, "Select…"), filterable = $.prop($$props, "filterable", 3, false), multiple = $.prop($$props, "multiple", 3, false), disabled = $.prop($$props, "disabled", 3, false), rest = $.rest_props($$props, rest_excludes$75);
2433
2949
  const locale = useLocaleContext();
2434
2950
  const env = useEnvironmentContext();
2435
2951
  const collection = $.derived(() => cascade.collection({
@@ -2456,6 +2972,42 @@ function CascadeSelect$1($$anchor, $$props) {
2456
2972
  }
2457
2973
  }));
2458
2974
  const api = $.derived(() => cascade.connect(service, normalizeProps));
2975
+ let query = $.state("");
2976
+ const filterFns = useFilter({ sensitivity: "base" });
2977
+ const filtering = $.derived(() => filterable() && $.get(query).trim().length > 0);
2978
+ /** The corridor's answer to a query: every leaf whose route matches —
2979
+ * the query may land on any hop, and the whole route still shows. */
2980
+ const matchPaths = $.derived(() => {
2981
+ if (!$.get(filtering)) return [];
2982
+ const q = $.get(query).trim();
2983
+ const hits = [];
2984
+ const walk = (nodes, path, labels, matched) => {
2985
+ for (const node of nodes ?? []) {
2986
+ const hit = matched || filterFns.contains(node.label, q);
2987
+ const nextPath = [...path, node.value];
2988
+ const nextLabels = [...labels, node.label];
2989
+ if (node.children?.length) walk(node.children, nextPath, nextLabels, hit);
2990
+ else if (hit) hits.push({
2991
+ path: nextPath,
2992
+ labels: nextLabels
2993
+ });
2994
+ }
2995
+ };
2996
+ walk($$props.data, [], [], false);
2997
+ return hits;
2998
+ });
2999
+ const isSelected = (path) => (value() ?? []).some((p) => p.join("/") === path.join("/"));
3000
+ function pickMatch(path) {
3001
+ if (multiple()) {
3002
+ const current = value() ?? [];
3003
+ const key = path.join("/");
3004
+ const next = current.some((p) => p.join("/") === key) ? current.filter((p) => p.join("/") !== key) : [...current, path];
3005
+ $.get(api).setValue(next);
3006
+ } else {
3007
+ $.get(api).selectValue(path);
3008
+ $.get(api).setOpen(false);
3009
+ }
3010
+ }
2459
3011
  /** The machine's `valueAsString` only updates through its select event,
2460
3012
  * so an externally-set `value` would render the placeholder forever —
2461
3013
  * resolve the labels from the data instead. */
@@ -2474,7 +3026,7 @@ function CascadeSelect$1($$anchor, $$props) {
2474
3026
  const parts = (value() ?? []).map((path) => labelsFor(path)?.join(" / ")).filter((label) => label != null);
2475
3027
  return parts.length > 0 ? parts.join(", ") : null;
2476
3028
  });
2477
- var div = root_4$5();
3029
+ var div = root_7$4();
2478
3030
  $.attribute_effect(div, ($0) => ({
2479
3031
  ...rest,
2480
3032
  ...$0
@@ -2482,8 +3034,13 @@ function CascadeSelect$1($$anchor, $$props) {
2482
3034
  var div_1 = $.child(div);
2483
3035
  $.attribute_effect(div_1, ($0) => ({ ...$0 }), [() => $.get(api).getControlProps()]);
2484
3036
  var button = $.child(div_1);
3037
+ var event_handler = (event) => {
3038
+ $.get(api).getTriggerProps().onclick?.(event);
3039
+ $.set(query, "");
3040
+ };
2485
3041
  $.attribute_effect(button, ($0) => ({
2486
3042
  ...$0,
3043
+ onclick: event_handler,
2487
3044
  disabled: disabled() || void 0
2488
3045
  }), [() => $.get(api).getTriggerProps()]);
2489
3046
  var span_3 = $.child(button);
@@ -2496,12 +3053,66 @@ function CascadeSelect$1($$anchor, $$props) {
2496
3053
  var node_3 = $.sibling(div_1, 2);
2497
3054
  Portal(node_3, {
2498
3055
  children: ($$anchor, $$slotProps) => {
2499
- var div_2 = root_3$7();
3056
+ var div_2 = root_6$5();
2500
3057
  $.attribute_effect(div_2, ($0) => ({ ...$0 }), [() => $.get(api).getPositionerProps()]);
2501
3058
  var div_3 = $.child(div_2);
2502
3059
  $.attribute_effect(div_3, ($0) => ({ ...$0 }), [() => $.get(api).getContentProps()]);
2503
3060
  var node_4 = $.child(div_3);
2504
- column(node_4, () => $.get(collection).rootNode, () => [], () => []);
3061
+ var consequent_2 = ($$anchor) => {
3062
+ var div_4 = root_3$7();
3063
+ Input$1($.child(div_4), {
3064
+ size: "sm",
3065
+ placeholder: "Filter…",
3066
+ "aria-label": "Filter options",
3067
+ get value() {
3068
+ return $.get(query);
3069
+ },
3070
+ set value($$value) {
3071
+ $.set(query, $$value, true);
3072
+ }
3073
+ });
3074
+ $.reset(div_4);
3075
+ $.append($$anchor, div_4);
3076
+ };
3077
+ $.if(node_4, ($$render) => {
3078
+ if (filterable()) $$render(consequent_2);
3079
+ });
3080
+ var node_6 = $.sibling(node_4, 2);
3081
+ var consequent_4 = ($$anchor) => {
3082
+ var fragment_2 = $.comment();
3083
+ var node_7 = $.first_child(fragment_2);
3084
+ var consequent_3 = ($$anchor) => {
3085
+ var p_1 = root_4$6();
3086
+ $.append($$anchor, p_1);
3087
+ };
3088
+ var alternate = ($$anchor) => {
3089
+ var fragment_3 = $.comment();
3090
+ var node_8 = $.first_child(fragment_3);
3091
+ $.each(node_8, 17, () => $.get(matchPaths), (hit) => hit.path.join("/"), ($$anchor, hit) => {
3092
+ var button_1 = root_5$6();
3093
+ var text_2 = $.only_child(button_1, true);
3094
+ $.template_effect(($0, $1) => {
3095
+ $.set_attribute(button_1, "data-selected", $0);
3096
+ $.set_text(text_2, $1);
3097
+ }, [() => isSelected($.get(hit).path) || void 0, () => $.get(hit).labels.join(" / ")]);
3098
+ $.delegated("click", button_1, () => pickMatch($.get(hit).path));
3099
+ $.append($$anchor, button_1);
3100
+ });
3101
+ $.append($$anchor, fragment_3);
3102
+ };
3103
+ $.if(node_7, ($$render) => {
3104
+ if ($.get(matchPaths).length === 0) $$render(consequent_3);
3105
+ else $$render(alternate, -1);
3106
+ });
3107
+ $.append($$anchor, fragment_2);
3108
+ };
3109
+ var alternate_1 = ($$anchor) => {
3110
+ column($$anchor, () => $.get(collection).rootNode, () => [], () => []);
3111
+ };
3112
+ $.if(node_6, ($$render) => {
3113
+ if ($.get(filtering)) $$render(consequent_4);
3114
+ else $$render(alternate_1, -1);
3115
+ });
2505
3116
  $.reset(div_3);
2506
3117
  $.reset(div_2);
2507
3118
  $.append($$anchor, div_2);
@@ -2513,6 +3124,7 @@ function CascadeSelect$1($$anchor, $$props) {
2513
3124
  $.append($$anchor, div);
2514
3125
  $.pop();
2515
3126
  }
3127
+ $.delegate(["click"]);
2516
3128
  //#endregion
2517
3129
  //#region src/components/cascade-select/index.ts
2518
3130
  /** A corridor of linked columns: pick a branch and the next column
@@ -2539,22 +3151,26 @@ const Checkbox = Checkbox$1;
2539
3151
  injectComponentStyle("checkbox");
2540
3152
  //#endregion
2541
3153
  //#region src/components/checkbox-group/CheckboxGroup.svelte
2542
- var rest_excludes$76 = /* @__PURE__ */ new Set([
3154
+ var rest_excludes$74 = /* @__PURE__ */ new Set([
2543
3155
  "$$slots",
2544
3156
  "$$events",
2545
3157
  "$$legacy",
2546
3158
  "value",
2547
3159
  "options",
2548
3160
  "layout",
3161
+ "invalid",
2549
3162
  "disabled"
2550
3163
  ]);
2551
- var root$79 = $.from_svg(`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m5 12.5 5 5L19 7"></path></svg>`);
2552
- var root_1$18 = $.from_html(`<!> <!> <!>`, 1);
3164
+ var root$76 = $.from_svg(`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m5 12.5 5 5L19 7"></path></svg>`);
3165
+ var root_1$17 = $.from_html(`<!> <!> <!>`, 1);
2553
3166
  var root_2$13 = $.from_html(`<div></div>`);
2554
3167
  function CheckboxGroup$1($$anchor, $$props) {
2555
3168
  $.push($$props, true);
2556
- let value = $.prop($$props, "value", 31, () => $.proxy([])), layout = $.prop($$props, "layout", 3, "vertical"), disabled = $.prop($$props, "disabled", 3, false), rest = $.rest_props($$props, rest_excludes$76);
3169
+ let value = $.prop($$props, "value", 31, () => $.proxy([])), layout = $.prop($$props, "layout", 3, "vertical"), invalid = $.prop($$props, "invalid", 3, false), disabled = $.prop($$props, "disabled", 3, false), rest = $.rest_props($$props, rest_excludes$74);
3170
+ const field = useFieldContext();
2557
3171
  const selected = $.derived(() => new Set(value()));
3172
+ const isInvalid = $.derived(() => invalid() || field?.()?.invalid === true);
3173
+ const isDisabled = $.derived(() => disabled() || field?.()?.disabled === true);
2558
3174
  function toggle(option) {
2559
3175
  const next = new Set($.get(selected));
2560
3176
  if (next.has(option)) next.delete(option);
@@ -2567,25 +3183,29 @@ function CheckboxGroup$1($$anchor, $$props) {
2567
3183
  role: "group",
2568
3184
  "data-scope": "checkbox-group",
2569
3185
  "data-part": "root",
2570
- "data-layout": layout()
3186
+ "data-layout": layout(),
3187
+ "data-invalid": $.get(isInvalid) ? "" : void 0
2571
3188
  }));
2572
3189
  $.each(div, 21, () => $$props.options, (option) => option.value, ($$anchor, option) => {
2573
3190
  var fragment = $.comment();
2574
3191
  var node = $.first_child(fragment);
2575
3192
  {
2576
3193
  let $0 = $.derived(() => $.get(selected).has($.get(option).value));
2577
- let $1 = $.derived(() => disabled() || $.get(option).disabled === true);
3194
+ let $1 = $.derived(() => $.get(isDisabled) || $.get(option).disabled === true);
2578
3195
  $.component(node, () => Checkbox$1.Root, ($$anchor, ArkCheckbox_Root) => {
2579
3196
  ArkCheckbox_Root($$anchor, {
2580
3197
  get checked() {
2581
3198
  return $.get($0);
2582
3199
  },
3200
+ get invalid() {
3201
+ return $.get(isInvalid);
3202
+ },
2583
3203
  get disabled() {
2584
3204
  return $.get($1);
2585
3205
  },
2586
3206
  onCheckedChange: () => toggle($.get(option).value),
2587
3207
  children: ($$anchor, $$slotProps) => {
2588
- var fragment_1 = root_1$18();
3208
+ var fragment_1 = root_1$17();
2589
3209
  var node_1 = $.first_child(fragment_1);
2590
3210
  $.component(node_1, () => Checkbox$1.Control, ($$anchor, ArkCheckbox_Control) => {
2591
3211
  ArkCheckbox_Control($$anchor, {
@@ -2595,7 +3215,7 @@ function CheckboxGroup$1($$anchor, $$props) {
2595
3215
  $.component(node_2, () => Checkbox$1.Indicator, ($$anchor, ArkCheckbox_Indicator) => {
2596
3216
  ArkCheckbox_Indicator($$anchor, {
2597
3217
  children: ($$anchor, $$slotProps) => {
2598
- var svg = root$79();
3218
+ var svg = root$76();
2599
3219
  $.append($$anchor, svg);
2600
3220
  },
2601
3221
  $$slots: { default: true }
@@ -2643,7 +3263,7 @@ injectComponentStyle("checkbox-group");
2643
3263
  injectComponentStyle("checkbox");
2644
3264
  //#endregion
2645
3265
  //#region src/components/chip/Chip.svelte
2646
- var rest_excludes$75 = /* @__PURE__ */ new Set([
3266
+ var rest_excludes$73 = /* @__PURE__ */ new Set([
2647
3267
  "$$slots",
2648
3268
  "$$events",
2649
3269
  "$$legacy",
@@ -2652,10 +3272,10 @@ var rest_excludes$75 = /* @__PURE__ */ new Set([
2652
3272
  "tone",
2653
3273
  "variant"
2654
3274
  ]);
2655
- var root$78 = $.from_html(`<span> </span>`);
3275
+ var root$75 = $.from_html(`<span> </span>`);
2656
3276
  function Chip$1($$anchor, $$props) {
2657
- let tone = $.prop($$props, "tone", 3, "ink"), variant = $.prop($$props, "variant", 3, "solid"), rest = $.rest_props($$props, rest_excludes$75);
2658
- var span = root$78();
3277
+ let tone = $.prop($$props, "tone", 3, "ink"), variant = $.prop($$props, "variant", 3, "solid"), rest = $.rest_props($$props, rest_excludes$73);
3278
+ var span = root$75();
2659
3279
  $.attribute_effect(span, () => ({
2660
3280
  ...rest,
2661
3281
  "data-scope": "chip",
@@ -2718,7 +3338,7 @@ const row$1 = ($$anchor, entry = $.noop) => {
2718
3338
  var node_1 = $.child(div);
2719
3339
  {
2720
3340
  const asChild = ($$anchor, textProps = $.noop) => {
2721
- var span = root$77();
3341
+ var span = root$74();
2722
3342
  $.attribute_effect(span, ($0) => ({
2723
3343
  ...$0,
2724
3344
  "data-scope": "command",
@@ -2737,7 +3357,7 @@ const row$1 = ($$anchor, entry = $.noop) => {
2737
3357
  }
2738
3358
  var node_2 = $.sibling(node_1, 2);
2739
3359
  var consequent = ($$anchor) => {
2740
- var span_1 = root_1$17();
3360
+ var span_1 = root_1$16();
2741
3361
  var text_1 = $.only_child(span_1, true);
2742
3362
  $.template_effect(() => $.set_text(text_1, entry().hint));
2743
3363
  $.append($$anchor, span_1);
@@ -2760,13 +3380,13 @@ const row$1 = ($$anchor, entry = $.noop) => {
2760
3380
  }
2761
3381
  $.append($$anchor, fragment);
2762
3382
  };
2763
- var root$77 = $.from_html(`<span> </span>`);
2764
- var root_1$17 = $.from_html(`<span data-scope="command" data-part="item-hint"> </span>`);
3383
+ var root$74 = $.from_html(`<span> </span>`);
3384
+ var root_1$16 = $.from_html(`<span data-scope="command" data-part="item-hint"> </span>`);
2765
3385
  var root_2$12 = $.from_html(`<div><!> <!></div>`);
2766
3386
  var root_3$6 = $.from_html(`<input/>`);
2767
- var root_4$4 = $.from_html(`<div> </div>`);
2768
- var root_5$4 = $.from_html(`<div data-scope="command" data-part="empty"> </div>`);
2769
- var root_6$3 = $.from_html(`<!> <!>`, 1);
3387
+ var root_4$5 = $.from_html(`<div> </div>`);
3388
+ var root_5$5 = $.from_html(`<div data-scope="command" data-part="empty"> </div>`);
3389
+ var root_6$4 = $.from_html(`<!> <!>`, 1);
2770
3390
  var root_7$3 = $.from_html(`<div><!></div>`);
2771
3391
  function Command$1($$anchor, $$props) {
2772
3392
  $.push($$props, true);
@@ -2829,7 +3449,7 @@ function Command$1($$anchor, $$props) {
2829
3449
  children: ($$anchor, $$slotProps) => {
2830
3450
  Portal($$anchor, {
2831
3451
  children: ($$anchor, $$slotProps) => {
2832
- var fragment_3 = root_6$3();
3452
+ var fragment_3 = root_6$4();
2833
3453
  var node_4 = $.first_child(fragment_3);
2834
3454
  $.component(node_4, () => Dialog$1.Backdrop, ($$anchor, ArkDialog_Backdrop) => {
2835
3455
  ArkDialog_Backdrop($$anchor, {});
@@ -2870,7 +3490,7 @@ function Command$1($$anchor, $$props) {
2870
3490
  onInputValueChange: onFieldInput,
2871
3491
  onValueChange: pick,
2872
3492
  children: ($$anchor, $$slotProps) => {
2873
- var fragment_4 = root_6$3();
3493
+ var fragment_4 = root_6$4();
2874
3494
  var node_8 = $.first_child(fragment_4);
2875
3495
  {
2876
3496
  const asChild = ($$anchor, inputProps = $.noop) => {
@@ -2929,7 +3549,7 @@ function Command$1($$anchor, $$props) {
2929
3549
  var node_14 = $.child(div_4);
2930
3550
  {
2931
3551
  const asChild = ($$anchor, labelProps = $.noop) => {
2932
- var div_5 = root_4$4();
3552
+ var div_5 = root_4$5();
2933
3553
  $.attribute_effect(div_5, ($0) => ({
2934
3554
  ...$0,
2935
3555
  "data-scope": "command",
@@ -2970,7 +3590,7 @@ function Command$1($$anchor, $$props) {
2970
3590
  });
2971
3591
  var node_16 = $.sibling(node_10, 2);
2972
3592
  var consequent_2 = ($$anchor) => {
2973
- var div_6 = root_5$4();
3593
+ var div_6 = root_5$5();
2974
3594
  var text_3 = $.only_child(div_6, true);
2975
3595
  $.template_effect(() => $.set_text(text_3, emptyText()));
2976
3596
  $.append($$anchor, div_6);
@@ -3038,7 +3658,7 @@ injectComponentStyle("command");
3038
3658
  injectComponentStyle("dialog");
3039
3659
  //#endregion
3040
3660
  //#region src/components/comment/Comment.svelte
3041
- var rest_excludes$74 = /* @__PURE__ */ new Set([
3661
+ var rest_excludes$72 = /* @__PURE__ */ new Set([
3042
3662
  "$$slots",
3043
3663
  "$$events",
3044
3664
  "$$legacy",
@@ -3048,15 +3668,15 @@ var rest_excludes$74 = /* @__PURE__ */ new Set([
3048
3668
  "actions",
3049
3669
  "children"
3050
3670
  ]);
3051
- var root$76 = $.from_html(`<div data-scope="comment" data-part="avatar"><!></div>`);
3052
- var root_1$16 = $.from_html(`<span data-scope="comment" data-part="author"> </span>`);
3671
+ var root$73 = $.from_html(`<div data-scope="comment" data-part="avatar"><!></div>`);
3672
+ var root_1$15 = $.from_html(`<span data-scope="comment" data-part="author"> </span>`);
3053
3673
  var root_2$11 = $.from_html(`<time data-scope="comment" data-part="datetime"> </time>`);
3054
3674
  var root_3$5 = $.from_html(`<header data-scope="comment" data-part="header"><!> <!></header>`);
3055
- var root_4$3 = $.from_html(`<div data-scope="comment" data-part="actions"><!></div>`);
3056
- var root_5$3 = $.from_html(`<article><!> <div data-scope="comment" data-part="body"><!> <div data-scope="comment" data-part="content"><!></div> <!></div></article>`);
3675
+ var root_4$4 = $.from_html(`<div data-scope="comment" data-part="actions"><!></div>`);
3676
+ var root_5$4 = $.from_html(`<article><!> <div data-scope="comment" data-part="body"><!> <div data-scope="comment" data-part="content"><!></div> <!></div></article>`);
3057
3677
  function Comment$1($$anchor, $$props) {
3058
- let rest = $.rest_props($$props, rest_excludes$74);
3059
- var article = root_5$3();
3678
+ let rest = $.rest_props($$props, rest_excludes$72);
3679
+ var article = root_5$4();
3060
3680
  $.attribute_effect(article, () => ({
3061
3681
  ...rest,
3062
3682
  "data-scope": "comment",
@@ -3064,7 +3684,7 @@ function Comment$1($$anchor, $$props) {
3064
3684
  }));
3065
3685
  var node = $.child(article);
3066
3686
  var consequent = ($$anchor) => {
3067
- var div = root$76();
3687
+ var div = root$73();
3068
3688
  var node_1 = $.child(div);
3069
3689
  $.snippet(node_1, () => $$props.avatar);
3070
3690
  $.reset(div);
@@ -3079,7 +3699,7 @@ function Comment$1($$anchor, $$props) {
3079
3699
  var header = root_3$5();
3080
3700
  var node_3 = $.child(header);
3081
3701
  var consequent_1 = ($$anchor) => {
3082
- var span = root_1$16();
3702
+ var span = root_1$15();
3083
3703
  var text = $.only_child(span, true);
3084
3704
  $.template_effect(() => $.set_text(text, $$props.author));
3085
3705
  $.append($$anchor, span);
@@ -3112,7 +3732,7 @@ function Comment$1($$anchor, $$props) {
3112
3732
  $.reset(div_2);
3113
3733
  var node_6 = $.sibling(div_2, 2);
3114
3734
  var consequent_4 = ($$anchor) => {
3115
- var div_3 = root_4$3();
3735
+ var div_3 = root_4$4();
3116
3736
  var node_7 = $.child(div_3);
3117
3737
  $.snippet(node_7, () => $$props.actions);
3118
3738
  $.reset(div_3);
@@ -3146,7 +3766,7 @@ function useConfig() {
3146
3766
  }
3147
3767
  //#endregion
3148
3768
  //#region src/components/config-provider/ConfigProvider.svelte
3149
- var rest_excludes$73 = /* @__PURE__ */ new Set([
3769
+ var rest_excludes$71 = /* @__PURE__ */ new Set([
3150
3770
  "$$slots",
3151
3771
  "$$events",
3152
3772
  "$$legacy",
@@ -3157,10 +3777,10 @@ var rest_excludes$73 = /* @__PURE__ */ new Set([
3157
3777
  "lang",
3158
3778
  "children"
3159
3779
  ]);
3160
- var root$75 = $.from_html(`<div><!></div>`);
3780
+ var root$72 = $.from_html(`<div><!></div>`);
3161
3781
  function ConfigProvider$1($$anchor, $$props) {
3162
3782
  $.push($$props, true);
3163
- let rest = $.rest_props($$props, rest_excludes$73);
3783
+ let rest = $.rest_props($$props, rest_excludes$71);
3164
3784
  provideConfig({
3165
3785
  get density() {
3166
3786
  return $$props.density;
@@ -3175,7 +3795,7 @@ function ConfigProvider$1($$anchor, $$props) {
3175
3795
  return $$props.locale;
3176
3796
  }
3177
3797
  });
3178
- var div = root$75();
3798
+ var div = root$72();
3179
3799
  $.attribute_effect(div, () => ({
3180
3800
  ...rest,
3181
3801
  "data-scope": "config-provider",
@@ -3200,7 +3820,7 @@ function ConfigProvider$1($$anchor, $$props) {
3200
3820
  const ConfigProvider = ConfigProvider$1;
3201
3821
  //#endregion
3202
3822
  //#region src/components/container/Container.svelte
3203
- var rest_excludes$72 = /* @__PURE__ */ new Set([
3823
+ var rest_excludes$70 = /* @__PURE__ */ new Set([
3204
3824
  "$$slots",
3205
3825
  "$$events",
3206
3826
  "$$legacy",
@@ -3208,10 +3828,10 @@ var rest_excludes$72 = /* @__PURE__ */ new Set([
3208
3828
  "padding",
3209
3829
  "children"
3210
3830
  ]);
3211
- var root$74 = $.from_html(`<div><!></div>`);
3831
+ var root$71 = $.from_html(`<div><!></div>`);
3212
3832
  function Container$1($$anchor, $$props) {
3213
- let size = $.prop($$props, "size", 3, "readable"), padding = $.prop($$props, "padding", 3, true), rest = $.rest_props($$props, rest_excludes$72);
3214
- var div = root$74();
3833
+ let size = $.prop($$props, "size", 3, "readable"), padding = $.prop($$props, "padding", 3, true), rest = $.rest_props($$props, rest_excludes$70);
3834
+ var div = root$71();
3215
3835
  $.attribute_effect(div, () => ({
3216
3836
  ...rest,
3217
3837
  "data-scope": "container",
@@ -3251,17 +3871,17 @@ const DatePicker = DatePicker$1;
3251
3871
  injectComponentStyle("date-picker");
3252
3872
  //#endregion
3253
3873
  //#region src/components/descriptions/Descriptions.svelte
3254
- var rest_excludes$71 = /* @__PURE__ */ new Set([
3874
+ var rest_excludes$69 = /* @__PURE__ */ new Set([
3255
3875
  "$$slots",
3256
3876
  "$$events",
3257
3877
  "$$legacy",
3258
3878
  "layout",
3259
3879
  "children"
3260
3880
  ]);
3261
- var root$73 = $.from_html(`<dl><!></dl>`);
3881
+ var root$70 = $.from_html(`<dl><!></dl>`);
3262
3882
  function Descriptions$1($$anchor, $$props) {
3263
- let layout = $.prop($$props, "layout", 3, "horizontal"), rest = $.rest_props($$props, rest_excludes$71);
3264
- var dl = root$73();
3883
+ let layout = $.prop($$props, "layout", 3, "horizontal"), rest = $.rest_props($$props, rest_excludes$69);
3884
+ var dl = root$70();
3265
3885
  $.attribute_effect(dl, () => ({
3266
3886
  ...rest,
3267
3887
  "data-scope": "descriptions",
@@ -3275,16 +3895,16 @@ function Descriptions$1($$anchor, $$props) {
3275
3895
  }
3276
3896
  //#endregion
3277
3897
  //#region src/components/descriptions/DescriptionsDetail.svelte
3278
- var rest_excludes$70 = /* @__PURE__ */ new Set([
3898
+ var rest_excludes$68 = /* @__PURE__ */ new Set([
3279
3899
  "$$slots",
3280
3900
  "$$events",
3281
3901
  "$$legacy",
3282
3902
  "children"
3283
3903
  ]);
3284
- var root$72 = $.from_html(`<dd><!></dd>`);
3904
+ var root$69 = $.from_html(`<dd><!></dd>`);
3285
3905
  function DescriptionsDetail($$anchor, $$props) {
3286
- let rest = $.rest_props($$props, rest_excludes$70);
3287
- var dd = root$72();
3906
+ let rest = $.rest_props($$props, rest_excludes$68);
3907
+ var dd = root$69();
3288
3908
  $.attribute_effect(dd, () => ({
3289
3909
  ...rest,
3290
3910
  "data-scope": "descriptions",
@@ -3297,16 +3917,16 @@ function DescriptionsDetail($$anchor, $$props) {
3297
3917
  }
3298
3918
  //#endregion
3299
3919
  //#region src/components/descriptions/DescriptionsItem.svelte
3300
- var rest_excludes$69 = /* @__PURE__ */ new Set([
3920
+ var rest_excludes$67 = /* @__PURE__ */ new Set([
3301
3921
  "$$slots",
3302
3922
  "$$events",
3303
3923
  "$$legacy",
3304
3924
  "children"
3305
3925
  ]);
3306
- var root$71 = $.from_html(`<div><!></div>`);
3926
+ var root$68 = $.from_html(`<div><!></div>`);
3307
3927
  function DescriptionsItem($$anchor, $$props) {
3308
- let rest = $.rest_props($$props, rest_excludes$69);
3309
- var div = root$71();
3928
+ let rest = $.rest_props($$props, rest_excludes$67);
3929
+ var div = root$68();
3310
3930
  $.attribute_effect(div, () => ({
3311
3931
  ...rest,
3312
3932
  "data-scope": "descriptions",
@@ -3319,16 +3939,16 @@ function DescriptionsItem($$anchor, $$props) {
3319
3939
  }
3320
3940
  //#endregion
3321
3941
  //#region src/components/descriptions/DescriptionsTerm.svelte
3322
- var rest_excludes$68 = /* @__PURE__ */ new Set([
3942
+ var rest_excludes$66 = /* @__PURE__ */ new Set([
3323
3943
  "$$slots",
3324
3944
  "$$events",
3325
3945
  "$$legacy",
3326
3946
  "children"
3327
3947
  ]);
3328
- var root$70 = $.from_html(`<dt><!></dt>`);
3948
+ var root$67 = $.from_html(`<dt><!></dt>`);
3329
3949
  function DescriptionsTerm($$anchor, $$props) {
3330
- let rest = $.rest_props($$props, rest_excludes$68);
3331
- var dt = root$70();
3950
+ let rest = $.rest_props($$props, rest_excludes$66);
3951
+ var dt = root$67();
3332
3952
  $.attribute_effect(dt, () => ({
3333
3953
  ...rest,
3334
3954
  "data-scope": "descriptions",
@@ -3369,39 +3989,6 @@ injectComponentStyle("dialog");
3369
3989
  const Drawer = Drawer$1;
3370
3990
  injectComponentStyle("drawer");
3371
3991
  //#endregion
3372
- //#region src/components/input/Input.svelte
3373
- var rest_excludes$67 = /* @__PURE__ */ new Set([
3374
- "$$slots",
3375
- "$$events",
3376
- "$$legacy",
3377
- "value",
3378
- "size",
3379
- "invalid"
3380
- ]);
3381
- var root$69 = $.from_html(`<input/>`);
3382
- function Input$1($$anchor, $$props) {
3383
- $.push($$props, true);
3384
- let value = $.prop($$props, "value", 15), size = $.prop($$props, "size", 3, "md"), invalid = $.prop($$props, "invalid", 3, false), rest = $.rest_props($$props, rest_excludes$67);
3385
- const field = useFieldContext();
3386
- const fieldProps = $.derived(() => field?.()?.getInputProps() ?? {});
3387
- var input = root$69();
3388
- var event_handler = (event) => {
3389
- value(event.currentTarget.value);
3390
- };
3391
- $.attribute_effect(input, () => ({
3392
- ...$.get(fieldProps),
3393
- ...rest,
3394
- "data-scope": "input",
3395
- "data-part": "root",
3396
- "data-size": size(),
3397
- "data-invalid": invalid() || $.get(fieldProps)["data-invalid"] != null ? "" : void 0,
3398
- oninput: event_handler
3399
- }), void 0, void 0, void 0, void 0, true);
3400
- $.bind_value(input, value);
3401
- $.append($$anchor, input);
3402
- $.pop();
3403
- }
3404
- //#endregion
3405
3992
  //#region src/components/input/index.ts
3406
3993
  /** The bare text input, dressed in the field recipe: border, surface,
3407
3994
  * focus halo — no shadow. Inside a Field.Root it picks up the label
@@ -3410,7 +3997,7 @@ const Input = Input$1;
3410
3997
  injectComponentStyle("input");
3411
3998
  //#endregion
3412
3999
  //#region src/components/dynamic-input/DynamicInput.svelte
3413
- var rest_excludes$66 = /* @__PURE__ */ new Set([
4000
+ var rest_excludes$65 = /* @__PURE__ */ new Set([
3414
4001
  "$$slots",
3415
4002
  "$$events",
3416
4003
  "$$legacy",
@@ -3422,12 +4009,12 @@ var rest_excludes$66 = /* @__PURE__ */ new Set([
3422
4009
  "disabled",
3423
4010
  "invalid"
3424
4011
  ]);
3425
- var root$68 = $.from_svg(`<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M18 6 6 18M6 6l12 12"></path></svg>`);
3426
- var root_1$15 = $.from_html(`<div data-scope="dynamic-input" data-part="row"><!> <!></div>`);
4012
+ var root$66 = $.from_svg(`<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M18 6 6 18M6 6l12 12"></path></svg>`);
4013
+ var root_1$14 = $.from_html(`<div data-scope="dynamic-input" data-part="row"><!> <!></div>`);
3427
4014
  var root_2$10 = $.from_html(`<div><!> <div data-scope="dynamic-input" data-part="add"><!></div></div>`);
3428
4015
  function DynamicInput$1($$anchor, $$props) {
3429
4016
  $.push($$props, true);
3430
- let value = $.prop($$props, "value", 31, () => $.proxy([""])), min = $.prop($$props, "min", 3, 0), addLabel = $.prop($$props, "addLabel", 3, "Add entry"), disabled = $.prop($$props, "disabled", 3, false), invalid = $.prop($$props, "invalid", 3, false), rest = $.rest_props($$props, rest_excludes$66);
4017
+ let value = $.prop($$props, "value", 31, () => $.proxy([""])), min = $.prop($$props, "min", 3, 0), addLabel = $.prop($$props, "addLabel", 3, "Add entry"), disabled = $.prop($$props, "disabled", 3, false), invalid = $.prop($$props, "invalid", 3, false), rest = $.rest_props($$props, rest_excludes$65);
3431
4018
  const canRemove = $.derived(() => value().length > Math.max(min(), 1));
3432
4019
  const canAdd = $.derived(() => $$props.max === void 0 || value().length < $$props.max);
3433
4020
  function update(index, next) {
@@ -3450,7 +4037,7 @@ function DynamicInput$1($$anchor, $$props) {
3450
4037
  }));
3451
4038
  var node = $.child(div);
3452
4039
  $.each(node, 17, value, $.index, ($$anchor, entry, index) => {
3453
- var div_1 = root_1$15();
4040
+ var div_1 = root_1$14();
3454
4041
  var node_1 = $.child(div_1);
3455
4042
  Input(node_1, {
3456
4043
  get value() {
@@ -3479,7 +4066,7 @@ function DynamicInput$1($$anchor, $$props) {
3479
4066
  "aria-label": `Remove entry ${index + 1}`,
3480
4067
  onclick: () => remove(index),
3481
4068
  children: ($$anchor, $$slotProps) => {
3482
- var svg = root$68();
4069
+ var svg = root$66();
3483
4070
  $.append($$anchor, svg);
3484
4071
  },
3485
4072
  $$slots: { default: true }
@@ -3529,18 +4116,18 @@ const Editable = Editable$1;
3529
4116
  injectComponentStyle("editable");
3530
4117
  //#endregion
3531
4118
  //#region src/components/ellipsis/Ellipsis.svelte
3532
- var rest_excludes$65 = /* @__PURE__ */ new Set([
4119
+ var rest_excludes$64 = /* @__PURE__ */ new Set([
3533
4120
  "$$slots",
3534
4121
  "$$events",
3535
4122
  "$$legacy",
3536
4123
  "lines",
3537
4124
  "children"
3538
4125
  ]);
3539
- var root$67 = $.from_html(`<span><!></span>`);
4126
+ var root$65 = $.from_html(`<span><!></span>`);
3540
4127
  function Ellipsis$1($$anchor, $$props) {
3541
- let lines = $.prop($$props, "lines", 3, 1), rest = $.rest_props($$props, rest_excludes$65);
4128
+ let lines = $.prop($$props, "lines", 3, 1), rest = $.rest_props($$props, rest_excludes$64);
3542
4129
  const multiline = $.derived(() => lines() > 1);
3543
- var span = root$67();
4130
+ var span = root$65();
3544
4131
  $.attribute_effect(span, ($0) => ({
3545
4132
  ...rest,
3546
4133
  "data-scope": "ellipsis",
@@ -3562,16 +4149,16 @@ const Ellipsis = Ellipsis$1;
3562
4149
  injectComponentStyle("ellipsis");
3563
4150
  //#endregion
3564
4151
  //#region src/components/empty/Empty.svelte
3565
- var rest_excludes$64 = /* @__PURE__ */ new Set([
4152
+ var rest_excludes$63 = /* @__PURE__ */ new Set([
3566
4153
  "$$slots",
3567
4154
  "$$events",
3568
4155
  "$$legacy",
3569
4156
  "children"
3570
4157
  ]);
3571
- var root$66 = $.from_html(`<div><!></div>`);
4158
+ var root$64 = $.from_html(`<div><!></div>`);
3572
4159
  function Empty$1($$anchor, $$props) {
3573
- let rest = $.rest_props($$props, rest_excludes$64);
3574
- var div = root$66();
4160
+ let rest = $.rest_props($$props, rest_excludes$63);
4161
+ var div = root$64();
3575
4162
  $.attribute_effect(div, () => ({
3576
4163
  ...rest,
3577
4164
  "data-scope": "empty",
@@ -3584,16 +4171,16 @@ function Empty$1($$anchor, $$props) {
3584
4171
  }
3585
4172
  //#endregion
3586
4173
  //#region src/components/empty/EmptyActions.svelte
3587
- var rest_excludes$63 = /* @__PURE__ */ new Set([
4174
+ var rest_excludes$62 = /* @__PURE__ */ new Set([
3588
4175
  "$$slots",
3589
4176
  "$$events",
3590
4177
  "$$legacy",
3591
4178
  "children"
3592
4179
  ]);
3593
- var root$65 = $.from_html(`<div><!></div>`);
4180
+ var root$63 = $.from_html(`<div><!></div>`);
3594
4181
  function EmptyActions($$anchor, $$props) {
3595
- let rest = $.rest_props($$props, rest_excludes$63);
3596
- var div = root$65();
4182
+ let rest = $.rest_props($$props, rest_excludes$62);
4183
+ var div = root$63();
3597
4184
  $.attribute_effect(div, () => ({
3598
4185
  ...rest,
3599
4186
  "data-scope": "empty",
@@ -3606,16 +4193,16 @@ function EmptyActions($$anchor, $$props) {
3606
4193
  }
3607
4194
  //#endregion
3608
4195
  //#region src/components/empty/EmptyDescription.svelte
3609
- var rest_excludes$62 = /* @__PURE__ */ new Set([
4196
+ var rest_excludes$61 = /* @__PURE__ */ new Set([
3610
4197
  "$$slots",
3611
4198
  "$$events",
3612
4199
  "$$legacy",
3613
4200
  "children"
3614
4201
  ]);
3615
- var root$64 = $.from_html(`<p><!></p>`);
4202
+ var root$62 = $.from_html(`<p><!></p>`);
3616
4203
  function EmptyDescription($$anchor, $$props) {
3617
- let rest = $.rest_props($$props, rest_excludes$62);
3618
- var p = root$64();
4204
+ let rest = $.rest_props($$props, rest_excludes$61);
4205
+ var p = root$62();
3619
4206
  $.attribute_effect(p, () => ({
3620
4207
  ...rest,
3621
4208
  "data-scope": "empty",
@@ -3628,16 +4215,16 @@ function EmptyDescription($$anchor, $$props) {
3628
4215
  }
3629
4216
  //#endregion
3630
4217
  //#region src/components/empty/EmptyTitle.svelte
3631
- var rest_excludes$61 = /* @__PURE__ */ new Set([
4218
+ var rest_excludes$60 = /* @__PURE__ */ new Set([
3632
4219
  "$$slots",
3633
4220
  "$$events",
3634
4221
  "$$legacy",
3635
4222
  "children"
3636
4223
  ]);
3637
- var root$63 = $.from_html(`<h3><!></h3>`);
4224
+ var root$61 = $.from_html(`<h3><!></h3>`);
3638
4225
  function EmptyTitle($$anchor, $$props) {
3639
- let rest = $.rest_props($$props, rest_excludes$61);
3640
- var h3 = root$63();
4226
+ let rest = $.rest_props($$props, rest_excludes$60);
4227
+ var h3 = root$61();
3641
4228
  $.attribute_effect(h3, () => ({
3642
4229
  ...rest,
3643
4230
  "data-scope": "empty",
@@ -3650,16 +4237,16 @@ function EmptyTitle($$anchor, $$props) {
3650
4237
  }
3651
4238
  //#endregion
3652
4239
  //#region src/components/empty/EmptyVisual.svelte
3653
- var rest_excludes$60 = /* @__PURE__ */ new Set([
4240
+ var rest_excludes$59 = /* @__PURE__ */ new Set([
3654
4241
  "$$slots",
3655
4242
  "$$events",
3656
4243
  "$$legacy",
3657
4244
  "children"
3658
4245
  ]);
3659
- var root$62 = $.from_html(`<div><!></div>`);
4246
+ var root$60 = $.from_html(`<div><!></div>`);
3660
4247
  function EmptyVisual($$anchor, $$props) {
3661
- let rest = $.rest_props($$props, rest_excludes$60);
3662
- var div = root$62();
4248
+ let rest = $.rest_props($$props, rest_excludes$59);
4249
+ var div = root$60();
3663
4250
  $.attribute_effect(div, () => ({
3664
4251
  ...rest,
3665
4252
  "data-scope": "empty",
@@ -3710,7 +4297,7 @@ function useFloatButton() {
3710
4297
  }
3711
4298
  //#endregion
3712
4299
  //#region src/components/float-button/FloatButton.svelte
3713
- var rest_excludes$59 = /* @__PURE__ */ new Set([
4300
+ var rest_excludes$58 = /* @__PURE__ */ new Set([
3714
4301
  "$$slots",
3715
4302
  "$$events",
3716
4303
  "$$legacy",
@@ -3718,10 +4305,10 @@ var rest_excludes$59 = /* @__PURE__ */ new Set([
3718
4305
  "placement",
3719
4306
  "children"
3720
4307
  ]);
3721
- var root$61 = $.from_html(`<div><!></div>`);
4308
+ var root$59 = $.from_html(`<div><!></div>`);
3722
4309
  function FloatButton$1($$anchor, $$props) {
3723
4310
  $.push($$props, true);
3724
- let open = $.prop($$props, "open", 15, false), placement = $.prop($$props, "placement", 3, "bottom-end"), rest = $.rest_props($$props, rest_excludes$59);
4311
+ let open = $.prop($$props, "open", 15, false), placement = $.prop($$props, "placement", 3, "bottom-end"), rest = $.rest_props($$props, rest_excludes$58);
3725
4312
  setContext(FLOAT_BUTTON_KEY, {
3726
4313
  get open() {
3727
4314
  return open();
@@ -3729,7 +4316,7 @@ function FloatButton$1($$anchor, $$props) {
3729
4316
  toggle: () => open(!open()),
3730
4317
  close: () => open(false)
3731
4318
  });
3732
- var div = root$61();
4319
+ var div = root$59();
3733
4320
  $.attribute_effect(div, () => ({
3734
4321
  ...rest,
3735
4322
  "data-scope": "float-button",
@@ -3745,12 +4332,12 @@ function FloatButton$1($$anchor, $$props) {
3745
4332
  }
3746
4333
  //#endregion
3747
4334
  //#region src/components/float-button/FloatButtonItem.svelte
3748
- var root$60 = $.from_html(`<div data-scope="float-button" data-part="item"><!> <span data-scope="float-button" data-part="item-label" aria-hidden="true"> </span></div>`);
4335
+ var root$58 = $.from_html(`<div data-scope="float-button" data-part="item"><!> <span data-scope="float-button" data-part="item-label" aria-hidden="true"> </span></div>`);
3749
4336
  function FloatButtonItem($$anchor, $$props) {
3750
4337
  $.push($$props, true);
3751
4338
  let disabled = $.prop($$props, "disabled", 3, false);
3752
4339
  const context = useFloatButton();
3753
- var div = root$60();
4340
+ var div = root$58();
3754
4341
  var node = $.child(div);
3755
4342
  Button(node, {
3756
4343
  variant: "outline",
@@ -3860,7 +4447,7 @@ function useForm() {
3860
4447
  }
3861
4448
  //#endregion
3862
4449
  //#region src/components/form/Form.svelte
3863
- var rest_excludes$58 = /* @__PURE__ */ new Set([
4450
+ var rest_excludes$57 = /* @__PURE__ */ new Set([
3864
4451
  "$$slots",
3865
4452
  "$$events",
3866
4453
  "$$legacy",
@@ -3873,7 +4460,7 @@ var rest_excludes$58 = /* @__PURE__ */ new Set([
3873
4460
  "onError",
3874
4461
  "children"
3875
4462
  ]);
3876
- var root$59 = $.from_html(`<form><!></form>`);
4463
+ var root$57 = $.from_html(`<form><!></form>`);
3877
4464
  function Form$1($$anchor, $$props) {
3878
4465
  $.push($$props, true);
3879
4466
  const $state = () => $.store_get($$props.state, "$state", $$stores);
@@ -3882,7 +4469,7 @@ function Form$1($$anchor, $$props) {
3882
4469
  "input",
3883
4470
  "change",
3884
4471
  "blur"
3885
- ]), disabled = $.prop($$props, "disabled", 3, false), rest = $.rest_props($$props, rest_excludes$58);
4472
+ ]), disabled = $.prop($$props, "disabled", 3, false), rest = $.rest_props($$props, rest_excludes$57);
3886
4473
  let errors = $state()(/* @__PURE__ */ new Map());
3887
4474
  provideForm({
3888
4475
  errors: () => errors,
@@ -3935,7 +4522,7 @@ function Form$1($$anchor, $$props) {
3935
4522
  timer = setTimeout(() => void runValidate(), event.type === "input" ? 300 : 0);
3936
4523
  }
3937
4524
  var $$exports = { validate };
3938
- var form = root$59();
4525
+ var form = root$57();
3939
4526
  $.attribute_effect(form, () => ({
3940
4527
  ...rest,
3941
4528
  "data-scope": "form",
@@ -3956,7 +4543,7 @@ function Form$1($$anchor, $$props) {
3956
4543
  }
3957
4544
  //#endregion
3958
4545
  //#region src/components/form/FormField.svelte
3959
- var rest_excludes$57 = /* @__PURE__ */ new Set([
4546
+ var rest_excludes$56 = /* @__PURE__ */ new Set([
3960
4547
  "$$slots",
3961
4548
  "$$events",
3962
4549
  "$$legacy",
@@ -3968,16 +4555,16 @@ var rest_excludes$57 = /* @__PURE__ */ new Set([
3968
4555
  "disabled",
3969
4556
  "children"
3970
4557
  ]);
3971
- var root$58 = $.from_html(`<!> <!> <!> <!>`, 1);
3972
- var root_1$14 = $.from_html(`<div><!></div>`);
4558
+ var root$56 = $.from_html(`<!> <!> <!> <!>`, 1);
4559
+ var root_1$13 = $.from_html(`<div><!></div>`);
3973
4560
  function FormField$1($$anchor, $$props) {
3974
4561
  $.push($$props, true);
3975
- let required = $.prop($$props, "required", 3, false), invalid = $.prop($$props, "invalid", 3, false), disabled = $.prop($$props, "disabled", 3, false), rest = $.rest_props($$props, rest_excludes$57);
4562
+ let required = $.prop($$props, "required", 3, false), invalid = $.prop($$props, "invalid", 3, false), disabled = $.prop($$props, "disabled", 3, false), rest = $.rest_props($$props, rest_excludes$56);
3976
4563
  const form = useForm();
3977
4564
  const formError = $.derived(() => $$props.name ? form?.errors().get($$props.name) : void 0);
3978
4565
  const fieldInvalid = $.derived(() => invalid() || $.get(formError) != null);
3979
4566
  const fieldDisabled = $.derived(() => disabled() || (form?.disabled ?? false));
3980
- var div = root_1$14();
4567
+ var div = root_1$13();
3981
4568
  $.attribute_effect(div, () => ({
3982
4569
  ...rest,
3983
4570
  "data-form-field": $$props.name
@@ -3995,7 +4582,7 @@ function FormField$1($$anchor, $$props) {
3995
4582
  return $.get(fieldDisabled);
3996
4583
  },
3997
4584
  children: ($$anchor, $$slotProps) => {
3998
- var fragment = root$58();
4585
+ var fragment = root$56();
3999
4586
  var node_1 = $.first_child(fragment);
4000
4587
  var consequent = ($$anchor) => {
4001
4588
  var fragment_1 = $.comment();
@@ -4077,7 +4664,7 @@ injectComponentStyle("form");
4077
4664
  injectComponentStyle("field");
4078
4665
  //#endregion
4079
4666
  //#region src/components/grid/Grid.svelte
4080
- var rest_excludes$56 = /* @__PURE__ */ new Set([
4667
+ var rest_excludes$55 = /* @__PURE__ */ new Set([
4081
4668
  "$$slots",
4082
4669
  "$$events",
4083
4670
  "$$legacy",
@@ -4086,7 +4673,7 @@ var rest_excludes$56 = /* @__PURE__ */ new Set([
4086
4673
  "minChildWidth",
4087
4674
  "children"
4088
4675
  ]);
4089
- var root$57 = $.from_html(`<div><!></div>`);
4676
+ var root$55 = $.from_html(`<div><!></div>`);
4090
4677
  function Grid$1($$anchor, $$props) {
4091
4678
  /** The same named steps of the space ramp the stack uses — one
4092
4679
  * vocabulary of distance across the layout primitives. */
@@ -4098,9 +4685,9 @@ function Grid$1($$anchor, $$props) {
4098
4685
  lg: "var(--bs-gap-lg)",
4099
4686
  xl: "var(--bs-gap-xl)"
4100
4687
  };
4101
- let columns = $.prop($$props, "columns", 3, 12), gap = $.prop($$props, "gap", 3, "md"), rest = $.rest_props($$props, rest_excludes$56);
4688
+ let columns = $.prop($$props, "columns", 3, 12), gap = $.prop($$props, "gap", 3, "md"), rest = $.rest_props($$props, rest_excludes$55);
4102
4689
  const gapValue = $.derived(() => gapVars[gap()] ?? gapVars.md);
4103
- var div = root$57();
4690
+ var div = root$55();
4104
4691
  $.attribute_effect(div, ($0) => ({
4105
4692
  ...rest,
4106
4693
  "data-scope": "grid",
@@ -4140,7 +4727,7 @@ const HoverCard = HoverCard$1;
4140
4727
  injectComponentStyle("hover-card");
4141
4728
  //#endregion
4142
4729
  //#region src/components/icon/Icon.svelte
4143
- var rest_excludes$55 = /* @__PURE__ */ new Set([
4730
+ var rest_excludes$54 = /* @__PURE__ */ new Set([
4144
4731
  "$$slots",
4145
4732
  "$$events",
4146
4733
  "$$legacy",
@@ -4148,10 +4735,10 @@ var rest_excludes$55 = /* @__PURE__ */ new Set([
4148
4735
  "label",
4149
4736
  "children"
4150
4737
  ]);
4151
- var root$56 = $.from_html(`<span><!></span>`);
4738
+ var root$54 = $.from_html(`<span><!></span>`);
4152
4739
  function Icon$1($$anchor, $$props) {
4153
- let size = $.prop($$props, "size", 3, "inherit"), rest = $.rest_props($$props, rest_excludes$55);
4154
- var span = root$56();
4740
+ let size = $.prop($$props, "size", 3, "inherit"), rest = $.rest_props($$props, rest_excludes$54);
4741
+ var span = root$54();
4155
4742
  $.attribute_effect(span, () => ({
4156
4743
  ...rest,
4157
4744
  role: $$props.label != null ? "img" : void 0,
@@ -4175,7 +4762,7 @@ const Icon = Icon$1;
4175
4762
  injectComponentStyle("icon");
4176
4763
  //#endregion
4177
4764
  //#region src/components/image/Image.svelte
4178
- var rest_excludes$54 = /* @__PURE__ */ new Set([
4765
+ var rest_excludes$53 = /* @__PURE__ */ new Set([
4179
4766
  "$$slots",
4180
4767
  "$$events",
4181
4768
  "$$legacy",
@@ -4185,12 +4772,12 @@ var rest_excludes$54 = /* @__PURE__ */ new Set([
4185
4772
  "loading",
4186
4773
  "fallback"
4187
4774
  ]);
4188
- var root$55 = $.from_svg(`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="3" y="4" width="18" height="16" rx="1.5"></rect><circle cx="9" cy="10" r="1.5"></circle><path d="m5.5 17.5 4.5-5 3 3.5 2.5-3 3 4.5"></path></svg>`);
4189
- var root_1$13 = $.from_html(`<div data-scope="image" data-part="fallback"><!></div>`);
4775
+ var root$53 = $.from_svg(`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="3" y="4" width="18" height="16" rx="1.5"></rect><circle cx="9" cy="10" r="1.5"></circle><path d="m5.5 17.5 4.5-5 3 3.5 2.5-3 3 4.5"></path></svg>`);
4776
+ var root_1$12 = $.from_html(`<div data-scope="image" data-part="fallback"><!></div>`);
4190
4777
  var root_2$9 = $.from_html(`<figure><img data-scope="image" data-part="img" decoding="async"/> <!></figure>`);
4191
4778
  function Image$1($$anchor, $$props) {
4192
4779
  $.push($$props, true);
4193
- let alt = $.prop($$props, "alt", 3, ""), fit = $.prop($$props, "fit", 3, "cover"), loading = $.prop($$props, "loading", 3, "lazy"), rest = $.rest_props($$props, rest_excludes$54);
4780
+ let alt = $.prop($$props, "alt", 3, ""), fit = $.prop($$props, "fit", 3, "cover"), loading = $.prop($$props, "loading", 3, "lazy"), rest = $.rest_props($$props, rest_excludes$53);
4194
4781
  let state = $.state("loading");
4195
4782
  $.user_effect(() => {
4196
4783
  $$props.src;
@@ -4207,7 +4794,7 @@ function Image$1($$anchor, $$props) {
4207
4794
  var img = $.child(figure);
4208
4795
  var node = $.sibling(img, 2);
4209
4796
  var consequent_1 = ($$anchor) => {
4210
- var div = root_1$13();
4797
+ var div = root_1$12();
4211
4798
  var node_1 = $.child(div);
4212
4799
  var consequent = ($$anchor) => {
4213
4800
  var fragment = $.comment();
@@ -4216,7 +4803,7 @@ function Image$1($$anchor, $$props) {
4216
4803
  $.append($$anchor, fragment);
4217
4804
  };
4218
4805
  var alternate = ($$anchor) => {
4219
- var svg = root$55();
4806
+ var svg = root$53();
4220
4807
  $.append($$anchor, svg);
4221
4808
  };
4222
4809
  $.if(node_1, ($$render) => {
@@ -4272,7 +4859,7 @@ const tool = ($$anchor, label = $.noop, onclick = $.noop, glyph = $.noop) => {
4272
4859
  return onclick();
4273
4860
  },
4274
4861
  children: ($$anchor, $$slotProps) => {
4275
- var svg = root$54();
4862
+ var svg = root$52();
4276
4863
  var node = $.child(svg);
4277
4864
  $.snippet(node, glyph);
4278
4865
  $.reset(svg);
@@ -4282,7 +4869,7 @@ const tool = ($$anchor, label = $.noop, onclick = $.noop, glyph = $.noop) => {
4282
4869
  });
4283
4870
  };
4284
4871
  const zoomIn = ($$anchor) => {
4285
- var fragment_1 = root_1$12();
4872
+ var fragment_1 = root_1$11();
4286
4873
  $.next(3);
4287
4874
  $.append($$anchor, fragment_1);
4288
4875
  };
@@ -4297,17 +4884,17 @@ const turnGlyph = ($$anchor) => {
4297
4884
  $.append($$anchor, fragment_3);
4298
4885
  };
4299
4886
  const closeGlyph = ($$anchor) => {
4300
- var fragment_4 = root_4$2();
4887
+ var fragment_4 = root_4$3();
4301
4888
  $.next();
4302
4889
  $.append($$anchor, fragment_4);
4303
4890
  };
4304
- var root$54 = $.from_svg(`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><!></svg>`);
4305
- var root_1$12 = $.from_svg(`<circle cx="11" cy="11" r="7"></circle><path d="m16.2 16.2 4.8 4.8"></path><path d="M8 11h6"></path><path d="M11 8v6"></path>`, 1);
4891
+ var root$52 = $.from_svg(`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><!></svg>`);
4892
+ var root_1$11 = $.from_svg(`<circle cx="11" cy="11" r="7"></circle><path d="m16.2 16.2 4.8 4.8"></path><path d="M8 11h6"></path><path d="M11 8v6"></path>`, 1);
4306
4893
  var root_2$8 = $.from_svg(`<circle cx="11" cy="11" r="7"></circle><path d="m16.2 16.2 4.8 4.8"></path><path d="M8 11h6"></path>`, 1);
4307
4894
  var root_3$4 = $.from_svg(`<path d="M20.49 12A8.5 8.5 0 1 1 18 6.06"></path><path d="M20.5 3.5v4h-4"></path>`, 1);
4308
- var root_4$2 = $.from_svg(`<path d="m6 6 12 12"></path><path d="M18 6 6 18"></path>`, 1);
4309
- var root_5$2 = $.from_html(`<!> <!>`, 1);
4310
- var root_6$2 = $.from_html(`<!> <!> <!>`, 1);
4895
+ var root_4$3 = $.from_svg(`<path d="m6 6 12 12"></path><path d="M18 6 6 18"></path>`, 1);
4896
+ var root_5$3 = $.from_html(`<!> <!>`, 1);
4897
+ var root_6$3 = $.from_html(`<!> <!> <!>`, 1);
4311
4898
  var root_7$2 = $.from_html(`<img data-scope="image-viewer" data-part="viewport"/> <div data-scope="image-viewer" data-part="toolbar"><!></div>`, 1);
4312
4899
  function ImageViewer$1($$anchor, $$props) {
4313
4900
  $.push($$props, true);
@@ -4346,7 +4933,7 @@ function ImageViewer$1($$anchor, $$props) {
4346
4933
  children: ($$anchor, $$slotProps) => {
4347
4934
  Portal($$anchor, {
4348
4935
  children: ($$anchor, $$slotProps) => {
4349
- var fragment_7 = root_5$2();
4936
+ var fragment_7 = root_5$3();
4350
4937
  var node_2 = $.first_child(fragment_7);
4351
4938
  $.component(node_2, () => Dialog$1.Backdrop, ($$anchor, ArkDialog_Backdrop) => {
4352
4939
  ArkDialog_Backdrop($$anchor, { class: "bs-image-viewer-backdrop" });
@@ -4377,10 +4964,10 @@ function ImageViewer$1($$anchor, $$props) {
4377
4964
  var node_5 = $.child(div);
4378
4965
  ButtonGroup(node_5, {
4379
4966
  children: ($$anchor, $$slotProps) => {
4380
- var fragment_10 = root_6$2();
4967
+ var fragment_10 = root_6$3();
4381
4968
  var node_6 = $.first_child(fragment_10);
4382
4969
  var consequent = ($$anchor) => {
4383
- var fragment_11 = root_5$2();
4970
+ var fragment_11 = root_5$3();
4384
4971
  var node_7 = $.first_child(fragment_11);
4385
4972
  tool(node_7, () => "Zoom in", () => () => zoom(SCALE_STEP), () => zoomIn);
4386
4973
  var node_8 = $.sibling(node_7, 2);
@@ -4438,16 +5025,16 @@ const ImageViewer = ImageViewer$1;
4438
5025
  injectComponentStyle("image-viewer");
4439
5026
  //#endregion
4440
5027
  //#region src/components/input-group/InputGroup.svelte
4441
- var rest_excludes$53 = /* @__PURE__ */ new Set([
5028
+ var rest_excludes$52 = /* @__PURE__ */ new Set([
4442
5029
  "$$slots",
4443
5030
  "$$events",
4444
5031
  "$$legacy",
4445
5032
  "children"
4446
5033
  ]);
4447
- var root$53 = $.from_html(`<div><!></div>`);
5034
+ var root$51 = $.from_html(`<div><!></div>`);
4448
5035
  function InputGroup$1($$anchor, $$props) {
4449
- let rest = $.rest_props($$props, rest_excludes$53);
4450
- var div = root$53();
5036
+ let rest = $.rest_props($$props, rest_excludes$52);
5037
+ var div = root$51();
4451
5038
  $.attribute_effect(div, () => ({
4452
5039
  ...rest,
4453
5040
  "data-scope": "input-group",
@@ -4460,16 +5047,16 @@ function InputGroup$1($$anchor, $$props) {
4460
5047
  }
4461
5048
  //#endregion
4462
5049
  //#region src/components/input-group/InputGroupAddon.svelte
4463
- var rest_excludes$52 = /* @__PURE__ */ new Set([
5050
+ var rest_excludes$51 = /* @__PURE__ */ new Set([
4464
5051
  "$$slots",
4465
5052
  "$$events",
4466
5053
  "$$legacy",
4467
5054
  "children"
4468
5055
  ]);
4469
- var root$52 = $.from_html(`<div><!></div>`);
5056
+ var root$50 = $.from_html(`<div><!></div>`);
4470
5057
  function InputGroupAddon($$anchor, $$props) {
4471
- let rest = $.rest_props($$props, rest_excludes$52);
4472
- var div = root$52();
5058
+ let rest = $.rest_props($$props, rest_excludes$51);
5059
+ var div = root$50();
4473
5060
  $.attribute_effect(div, () => ({
4474
5061
  ...rest,
4475
5062
  "data-scope": "input-group",
@@ -4498,16 +5085,16 @@ const JsonTreeView = JsonTreeView$1;
4498
5085
  injectComponentStyle("json-tree-view");
4499
5086
  //#endregion
4500
5087
  //#region src/components/kbd/Kbd.svelte
4501
- var rest_excludes$51 = /* @__PURE__ */ new Set([
5088
+ var rest_excludes$50 = /* @__PURE__ */ new Set([
4502
5089
  "$$slots",
4503
5090
  "$$events",
4504
5091
  "$$legacy",
4505
5092
  "children"
4506
5093
  ]);
4507
- var root$51 = $.from_html(`<kbd><!></kbd>`);
5094
+ var root$49 = $.from_html(`<kbd><!></kbd>`);
4508
5095
  function Kbd$1($$anchor, $$props) {
4509
- let rest = $.rest_props($$props, rest_excludes$51);
4510
- var kbd = root$51();
5096
+ let rest = $.rest_props($$props, rest_excludes$50);
5097
+ var kbd = root$49();
4511
5098
  $.attribute_effect(kbd, () => ({
4512
5099
  ...rest,
4513
5100
  "data-scope": "kbd",
@@ -4535,19 +5122,19 @@ function useLayout() {
4535
5122
  }
4536
5123
  //#endregion
4537
5124
  //#region src/components/layout/Layout.svelte
4538
- var rest_excludes$50 = /* @__PURE__ */ new Set([
5125
+ var rest_excludes$49 = /* @__PURE__ */ new Set([
4539
5126
  "$$slots",
4540
5127
  "$$events",
4541
5128
  "$$legacy",
4542
5129
  "sider",
4543
5130
  "children"
4544
5131
  ]);
4545
- var root$50 = $.from_html(`<div><!></div>`);
5132
+ var root$48 = $.from_html(`<div><!></div>`);
4546
5133
  function Layout$1($$anchor, $$props) {
4547
5134
  $.push($$props, true);
4548
- let rest = $.rest_props($$props, rest_excludes$50);
5135
+ let rest = $.rest_props($$props, rest_excludes$49);
4549
5136
  provideLayout({ siderPlacement: () => $$props.sider });
4550
- var div = root$50();
5137
+ var div = root$48();
4551
5138
  $.attribute_effect(div, () => ({
4552
5139
  ...rest,
4553
5140
  "data-scope": "layout",
@@ -4562,16 +5149,16 @@ function Layout$1($$anchor, $$props) {
4562
5149
  }
4563
5150
  //#endregion
4564
5151
  //#region src/components/layout/LayoutContent.svelte
4565
- var rest_excludes$49 = /* @__PURE__ */ new Set([
5152
+ var rest_excludes$48 = /* @__PURE__ */ new Set([
4566
5153
  "$$slots",
4567
5154
  "$$events",
4568
5155
  "$$legacy",
4569
5156
  "children"
4570
5157
  ]);
4571
- var root$49 = $.from_html(`<main><!></main>`);
5158
+ var root$47 = $.from_html(`<main><!></main>`);
4572
5159
  function LayoutContent($$anchor, $$props) {
4573
- let rest = $.rest_props($$props, rest_excludes$49);
4574
- var main = root$49();
5160
+ let rest = $.rest_props($$props, rest_excludes$48);
5161
+ var main = root$47();
4575
5162
  $.attribute_effect(main, () => ({
4576
5163
  ...rest,
4577
5164
  "data-scope": "layout",
@@ -4584,16 +5171,16 @@ function LayoutContent($$anchor, $$props) {
4584
5171
  }
4585
5172
  //#endregion
4586
5173
  //#region src/components/layout/LayoutFooter.svelte
4587
- var rest_excludes$48 = /* @__PURE__ */ new Set([
5174
+ var rest_excludes$47 = /* @__PURE__ */ new Set([
4588
5175
  "$$slots",
4589
5176
  "$$events",
4590
5177
  "$$legacy",
4591
5178
  "children"
4592
5179
  ]);
4593
- var root$48 = $.from_html(`<footer><!></footer>`);
5180
+ var root$46 = $.from_html(`<footer><!></footer>`);
4594
5181
  function LayoutFooter($$anchor, $$props) {
4595
- let rest = $.rest_props($$props, rest_excludes$48);
4596
- var footer = root$48();
5182
+ let rest = $.rest_props($$props, rest_excludes$47);
5183
+ var footer = root$46();
4597
5184
  $.attribute_effect(footer, () => ({
4598
5185
  ...rest,
4599
5186
  "data-scope": "layout",
@@ -4606,16 +5193,16 @@ function LayoutFooter($$anchor, $$props) {
4606
5193
  }
4607
5194
  //#endregion
4608
5195
  //#region src/components/layout/LayoutHeader.svelte
4609
- var rest_excludes$47 = /* @__PURE__ */ new Set([
5196
+ var rest_excludes$46 = /* @__PURE__ */ new Set([
4610
5197
  "$$slots",
4611
5198
  "$$events",
4612
5199
  "$$legacy",
4613
5200
  "children"
4614
5201
  ]);
4615
- var root$47 = $.from_html(`<header><!></header>`);
5202
+ var root$45 = $.from_html(`<header><!></header>`);
4616
5203
  function LayoutHeader($$anchor, $$props) {
4617
- let rest = $.rest_props($$props, rest_excludes$47);
4618
- var header = root$47();
5204
+ let rest = $.rest_props($$props, rest_excludes$46);
5205
+ var header = root$45();
4619
5206
  $.attribute_effect(header, () => ({
4620
5207
  ...rest,
4621
5208
  "data-scope": "layout",
@@ -4628,7 +5215,7 @@ function LayoutHeader($$anchor, $$props) {
4628
5215
  }
4629
5216
  //#endregion
4630
5217
  //#region src/components/layout/LayoutSider.svelte
4631
- var rest_excludes$46 = /* @__PURE__ */ new Set([
5218
+ var rest_excludes$45 = /* @__PURE__ */ new Set([
4632
5219
  "$$slots",
4633
5220
  "$$events",
4634
5221
  "$$legacy",
@@ -4640,11 +5227,11 @@ var rest_excludes$46 = /* @__PURE__ */ new Set([
4640
5227
  "maxWidth",
4641
5228
  "children"
4642
5229
  ]);
4643
- var root$46 = $.from_html(`<div data-scope="layout" data-part="sider-resize" role="separator" aria-orientation="vertical" aria-label="Resize sidebar"></div>`);
4644
- var root_1$11 = $.from_html(`<aside><!> <!></aside>`);
5230
+ var root$44 = $.from_html(`<div data-scope="layout" data-part="sider-resize" role="separator" aria-orientation="vertical" aria-label="Resize sidebar"></div>`);
5231
+ var root_1$10 = $.from_html(`<aside><!> <!></aside>`);
4645
5232
  function LayoutSider($$anchor, $$props) {
4646
5233
  $.push($$props, true);
4647
- let collapsed = $.prop($$props, "collapsed", 11, false), width = $.prop($$props, "width", 15, "16rem"), collapsedWidth = $.prop($$props, "collapsedWidth", 3, "3.5rem"), resizable = $.prop($$props, "resizable", 3, false), minWidth = $.prop($$props, "minWidth", 3, "12rem"), maxWidth = $.prop($$props, "maxWidth", 3, "24rem"), rest = $.rest_props($$props, rest_excludes$46);
5234
+ let collapsed = $.prop($$props, "collapsed", 11, false), width = $.prop($$props, "width", 15, "16rem"), collapsedWidth = $.prop($$props, "collapsedWidth", 3, "3.5rem"), resizable = $.prop($$props, "resizable", 3, false), minWidth = $.prop($$props, "minWidth", 3, "12rem"), maxWidth = $.prop($$props, "maxWidth", 3, "24rem"), rest = $.rest_props($$props, rest_excludes$45);
4648
5235
  const layout = useLayout();
4649
5236
  /** One step of the arrow-key resize, in px. */
4650
5237
  const RESIZE_STEP = 16;
@@ -4682,7 +5269,7 @@ function LayoutSider($$anchor, $$props) {
4682
5269
  const next = Math.round(current + (widen ? RESIZE_STEP : -16));
4683
5270
  width(`${next}px`);
4684
5271
  }
4685
- var aside = root_1$11();
5272
+ var aside = root_1$10();
4686
5273
  $.attribute_effect(aside, () => ({
4687
5274
  ...rest,
4688
5275
  style: $.get(siderStyle),
@@ -4696,7 +5283,7 @@ function LayoutSider($$anchor, $$props) {
4696
5283
  $.snippet(node, () => $$props.children ?? $.noop, () => ({ collapsed: collapsed() }));
4697
5284
  var node_1 = $.sibling(node, 2);
4698
5285
  var consequent = ($$anchor) => {
4699
- var div = root$46();
5286
+ var div = root$44();
4700
5287
  $.set_attribute(div, "tabindex", 0);
4701
5288
  $.template_effect(($0) => {
4702
5289
  $.set_attribute(div, "data-dragging", $.get(dragging) ? "" : void 0);
@@ -4736,17 +5323,17 @@ const Layout = Object.assign(Layout$1, {
4736
5323
  injectComponentStyle("layout");
4737
5324
  //#endregion
4738
5325
  //#region src/components/link/Link.svelte
4739
- var rest_excludes$45 = /* @__PURE__ */ new Set([
5326
+ var rest_excludes$44 = /* @__PURE__ */ new Set([
4740
5327
  "$$slots",
4741
5328
  "$$events",
4742
5329
  "$$legacy",
4743
5330
  "underline",
4744
5331
  "children"
4745
5332
  ]);
4746
- var root$45 = $.from_html(`<a><!></a>`);
5333
+ var root$43 = $.from_html(`<a><!></a>`);
4747
5334
  function Link$1($$anchor, $$props) {
4748
- let underline = $.prop($$props, "underline", 3, "hover"), rest = $.rest_props($$props, rest_excludes$45);
4749
- var a = root$45();
5335
+ let underline = $.prop($$props, "underline", 3, "hover"), rest = $.rest_props($$props, rest_excludes$44);
5336
+ var a = root$43();
4750
5337
  $.attribute_effect(a, () => ({
4751
5338
  ...rest,
4752
5339
  "data-scope": "link",
@@ -4766,7 +5353,7 @@ const Link = Link$1;
4766
5353
  injectComponentStyle("link");
4767
5354
  //#endregion
4768
5355
  //#region src/components/list/List.svelte
4769
- var rest_excludes$44 = /* @__PURE__ */ new Set([
5356
+ var rest_excludes$43 = /* @__PURE__ */ new Set([
4770
5357
  "$$slots",
4771
5358
  "$$events",
4772
5359
  "$$legacy",
@@ -4774,10 +5361,10 @@ var rest_excludes$44 = /* @__PURE__ */ new Set([
4774
5361
  "hoverable",
4775
5362
  "children"
4776
5363
  ]);
4777
- var root$44 = $.from_html(`<ul><!></ul>`);
5364
+ var root$42 = $.from_html(`<ul><!></ul>`);
4778
5365
  function List$1($$anchor, $$props) {
4779
- let bordered = $.prop($$props, "bordered", 3, false), hoverable = $.prop($$props, "hoverable", 3, false), rest = $.rest_props($$props, rest_excludes$44);
4780
- var ul = root$44();
5366
+ let bordered = $.prop($$props, "bordered", 3, false), hoverable = $.prop($$props, "hoverable", 3, false), rest = $.rest_props($$props, rest_excludes$43);
5367
+ var ul = root$42();
4781
5368
  $.attribute_effect(ul, () => ({
4782
5369
  ...rest,
4783
5370
  "data-scope": "list",
@@ -4792,16 +5379,16 @@ function List$1($$anchor, $$props) {
4792
5379
  }
4793
5380
  //#endregion
4794
5381
  //#region src/components/list/ListActions.svelte
4795
- var rest_excludes$43 = /* @__PURE__ */ new Set([
5382
+ var rest_excludes$42 = /* @__PURE__ */ new Set([
4796
5383
  "$$slots",
4797
5384
  "$$events",
4798
5385
  "$$legacy",
4799
5386
  "children"
4800
5387
  ]);
4801
- var root$43 = $.from_html(`<div><!></div>`);
5388
+ var root$41 = $.from_html(`<div><!></div>`);
4802
5389
  function ListActions($$anchor, $$props) {
4803
- let rest = $.rest_props($$props, rest_excludes$43);
4804
- var div = root$43();
5390
+ let rest = $.rest_props($$props, rest_excludes$42);
5391
+ var div = root$41();
4805
5392
  $.attribute_effect(div, () => ({
4806
5393
  ...rest,
4807
5394
  "data-scope": "list",
@@ -4814,7 +5401,7 @@ function ListActions($$anchor, $$props) {
4814
5401
  }
4815
5402
  //#endregion
4816
5403
  //#region src/components/list/ListContent.svelte
4817
- var rest_excludes$42 = /* @__PURE__ */ new Set([
5404
+ var rest_excludes$41 = /* @__PURE__ */ new Set([
4818
5405
  "$$slots",
4819
5406
  "$$events",
4820
5407
  "$$legacy",
@@ -4822,11 +5409,11 @@ var rest_excludes$42 = /* @__PURE__ */ new Set([
4822
5409
  "description",
4823
5410
  "children"
4824
5411
  ]);
4825
- var root$42 = $.from_html(`<div data-scope="list" data-part="title"><!></div>`);
4826
- var root_1$10 = $.from_html(`<div data-scope="list" data-part="description"><!></div>`);
5412
+ var root$40 = $.from_html(`<div data-scope="list" data-part="title"><!></div>`);
5413
+ var root_1$9 = $.from_html(`<div data-scope="list" data-part="description"><!></div>`);
4827
5414
  var root_2$7 = $.from_html(`<div><!> <!> <!></div>`);
4828
5415
  function ListContent($$anchor, $$props) {
4829
- let rest = $.rest_props($$props, rest_excludes$42);
5416
+ let rest = $.rest_props($$props, rest_excludes$41);
4830
5417
  var div = root_2$7();
4831
5418
  $.attribute_effect(div, () => ({
4832
5419
  ...rest,
@@ -4835,7 +5422,7 @@ function ListContent($$anchor, $$props) {
4835
5422
  }));
4836
5423
  var node = $.child(div);
4837
5424
  var consequent = ($$anchor) => {
4838
- var div_1 = root$42();
5425
+ var div_1 = root$40();
4839
5426
  var node_1 = $.child(div_1);
4840
5427
  $.snippet(node_1, () => $$props.title);
4841
5428
  $.reset(div_1);
@@ -4846,7 +5433,7 @@ function ListContent($$anchor, $$props) {
4846
5433
  });
4847
5434
  var node_2 = $.sibling(node, 2);
4848
5435
  var consequent_1 = ($$anchor) => {
4849
- var div_2 = root_1$10();
5436
+ var div_2 = root_1$9();
4850
5437
  var node_3 = $.child(div_2);
4851
5438
  $.snippet(node_3, () => $$props.description);
4852
5439
  $.reset(div_2);
@@ -4862,16 +5449,16 @@ function ListContent($$anchor, $$props) {
4862
5449
  }
4863
5450
  //#endregion
4864
5451
  //#region src/components/list/ListItem.svelte
4865
- var rest_excludes$41 = /* @__PURE__ */ new Set([
5452
+ var rest_excludes$40 = /* @__PURE__ */ new Set([
4866
5453
  "$$slots",
4867
5454
  "$$events",
4868
5455
  "$$legacy",
4869
5456
  "children"
4870
5457
  ]);
4871
- var root$41 = $.from_html(`<li><!></li>`);
5458
+ var root$39 = $.from_html(`<li><!></li>`);
4872
5459
  function ListItem($$anchor, $$props) {
4873
- let rest = $.rest_props($$props, rest_excludes$41);
4874
- var li = root$41();
5460
+ let rest = $.rest_props($$props, rest_excludes$40);
5461
+ var li = root$39();
4875
5462
  $.attribute_effect(li, () => ({
4876
5463
  ...rest,
4877
5464
  "data-scope": "list",
@@ -4884,16 +5471,16 @@ function ListItem($$anchor, $$props) {
4884
5471
  }
4885
5472
  //#endregion
4886
5473
  //#region src/components/list/ListLeading.svelte
4887
- var rest_excludes$40 = /* @__PURE__ */ new Set([
5474
+ var rest_excludes$39 = /* @__PURE__ */ new Set([
4888
5475
  "$$slots",
4889
5476
  "$$events",
4890
5477
  "$$legacy",
4891
5478
  "children"
4892
5479
  ]);
4893
- var root$40 = $.from_html(`<div><!></div>`);
5480
+ var root$38 = $.from_html(`<div><!></div>`);
4894
5481
  function ListLeading($$anchor, $$props) {
4895
- let rest = $.rest_props($$props, rest_excludes$40);
4896
- var div = root$40();
5482
+ let rest = $.rest_props($$props, rest_excludes$39);
5483
+ var div = root$38();
4897
5484
  $.attribute_effect(div, () => ({
4898
5485
  ...rest,
4899
5486
  "data-scope": "list",
@@ -4937,7 +5524,7 @@ const Marquee = Marquee$1;
4937
5524
  injectComponentStyle("marquee");
4938
5525
  //#endregion
4939
5526
  //#region src/components/masonry/Masonry.svelte
4940
- var rest_excludes$39 = /* @__PURE__ */ new Set([
5527
+ var rest_excludes$38 = /* @__PURE__ */ new Set([
4941
5528
  "$$slots",
4942
5529
  "$$events",
4943
5530
  "$$legacy",
@@ -4945,7 +5532,7 @@ var rest_excludes$39 = /* @__PURE__ */ new Set([
4945
5532
  "gap",
4946
5533
  "children"
4947
5534
  ]);
4948
- var root$39 = $.from_html(`<div><!></div>`);
5535
+ var root$37 = $.from_html(`<div><!></div>`);
4949
5536
  function Masonry$1($$anchor, $$props) {
4950
5537
  /** The same named steps of the space ramp the stack uses — one
4951
5538
  * vocabulary of distance across the layout primitives. */
@@ -4957,9 +5544,9 @@ function Masonry$1($$anchor, $$props) {
4957
5544
  lg: "var(--bs-gap-lg)",
4958
5545
  xl: "var(--bs-gap-xl)"
4959
5546
  };
4960
- let columns = $.prop($$props, "columns", 3, 3), gap = $.prop($$props, "gap", 3, "md"), rest = $.rest_props($$props, rest_excludes$39);
5547
+ let columns = $.prop($$props, "columns", 3, 3), gap = $.prop($$props, "gap", 3, "md"), rest = $.rest_props($$props, rest_excludes$38);
4961
5548
  const gapValue = $.derived(() => gapVars[gap()] ?? gapVars.md);
4962
- var div = root$39();
5549
+ var div = root$37();
4963
5550
  $.attribute_effect(div, ($0) => ({
4964
5551
  ...rest,
4965
5552
  "data-scope": "masonry",
@@ -4992,19 +5579,19 @@ const Menu = Menu$1;
4992
5579
  injectComponentStyle("menu");
4993
5580
  //#endregion
4994
5581
  //#region src/components/menubar/Menubar.svelte
4995
- var rest_excludes$38 = /* @__PURE__ */ new Set([
5582
+ var rest_excludes$37 = /* @__PURE__ */ new Set([
4996
5583
  "$$slots",
4997
5584
  "$$events",
4998
5585
  "$$legacy",
4999
5586
  "items",
5000
5587
  "onSelect"
5001
5588
  ]);
5002
- var root$38 = $.from_html(`<button> </button>`);
5003
- var root_1$9 = $.from_html(`<!> <!>`, 1);
5589
+ var root$36 = $.from_html(`<button> </button>`);
5590
+ var root_1$8 = $.from_html(`<!> <!>`, 1);
5004
5591
  var root_2$6 = $.from_html(`<div></div>`);
5005
5592
  function Menubar$1($$anchor, $$props) {
5006
5593
  $.push($$props, true);
5007
- let items = $.prop($$props, "items", 19, () => []), rest = $.rest_props($$props, rest_excludes$38);
5594
+ let items = $.prop($$props, "items", 19, () => []), rest = $.rest_props($$props, rest_excludes$37);
5008
5595
  var div = root_2$6();
5009
5596
  $.attribute_effect(div, () => ({
5010
5597
  ...rest,
@@ -5019,11 +5606,11 @@ function Menubar$1($$anchor, $$props) {
5019
5606
  ArkMenu_Root($$anchor, {
5020
5607
  positioning: { placement: "bottom-start" },
5021
5608
  children: ($$anchor, $$slotProps) => {
5022
- var fragment_1 = root_1$9();
5609
+ var fragment_1 = root_1$8();
5023
5610
  var node_1 = $.first_child(fragment_1);
5024
5611
  {
5025
5612
  const asChild = ($$anchor, props = $.noop) => {
5026
- var button = root$38();
5613
+ var button = root$36();
5027
5614
  $.attribute_effect(button, ($0) => ({
5028
5615
  ...$0,
5029
5616
  type: "button",
@@ -5050,277 +5637,88 @@ function Menubar$1($$anchor, $$props) {
5050
5637
  ArkMenu_Positioner($$anchor, {
5051
5638
  children: ($$anchor, $$slotProps) => {
5052
5639
  var fragment_3 = $.comment();
5053
- var node_4 = $.first_child(fragment_3);
5054
- $.component(node_4, () => Menu$1.Content, ($$anchor, ArkMenu_Content) => {
5055
- ArkMenu_Content($$anchor, {
5056
- children: ($$anchor, $$slotProps) => {
5057
- var fragment_4 = $.comment();
5058
- var node_5 = $.first_child(fragment_4);
5059
- $.each(node_5, 17, () => $.get(group).items, (entry) => entry.value, ($$anchor, entry) => {
5060
- var fragment_5 = $.comment();
5061
- var node_6 = $.first_child(fragment_5);
5062
- {
5063
- let $0 = $.derived(() => $.get(entry).danger ? "" : void 0);
5064
- $.component(node_6, () => Menu$1.Item, ($$anchor, ArkMenu_Item) => {
5065
- ArkMenu_Item($$anchor, {
5066
- get value() {
5067
- return $.get(entry).value;
5068
- },
5069
- get disabled() {
5070
- return $.get(entry).disabled;
5071
- },
5072
- get "data-danger"() {
5073
- return $.get($0);
5074
- },
5075
- onSelect: () => $$props.onSelect?.($.get(entry).value),
5076
- children: ($$anchor, $$slotProps) => {
5077
- var fragment_6 = $.comment();
5078
- var node_7 = $.first_child(fragment_6);
5079
- $.component(node_7, () => Menu$1.ItemText, ($$anchor, ArkMenu_ItemText) => {
5080
- ArkMenu_ItemText($$anchor, {
5081
- children: ($$anchor, $$slotProps) => {
5082
- $.next();
5083
- var text_1 = $.text();
5084
- $.template_effect(() => $.set_text(text_1, $.get(entry).label));
5085
- $.append($$anchor, text_1);
5086
- },
5087
- $$slots: { default: true }
5088
- });
5089
- });
5090
- $.append($$anchor, fragment_6);
5091
- },
5092
- $$slots: { default: true }
5093
- });
5094
- });
5095
- }
5096
- $.append($$anchor, fragment_5);
5097
- });
5098
- $.append($$anchor, fragment_4);
5099
- },
5100
- $$slots: { default: true }
5101
- });
5102
- });
5103
- $.append($$anchor, fragment_3);
5104
- },
5105
- $$slots: { default: true }
5106
- });
5107
- });
5108
- $.append($$anchor, fragment_2);
5109
- },
5110
- $$slots: { default: true }
5111
- });
5112
- $.append($$anchor, fragment_1);
5113
- },
5114
- $$slots: { default: true }
5115
- });
5116
- });
5117
- $.append($$anchor, fragment);
5118
- });
5119
- $.reset(div);
5120
- $.append($$anchor, div);
5121
- $.pop();
5122
- }
5123
- //#endregion
5124
- //#region src/components/menubar/index.ts
5125
- /** A desktop-style menu bar: a row of quiet ghost triggers, each
5126
- * opening the same paper vessel as the menu family. The triggers are
5127
- * our own buttons grafted onto the menu machine's trigger via
5128
- * `asChild` — the machine keeps the trigger element (positioning,
5129
- * focus restore, `data-state`) while the element wears the menubar
5130
- * scope. The popups keep the menu parts untouched, so the menu
5131
- * stylesheet dresses them. */
5132
- const Menubar = Menubar$1;
5133
- injectComponentStyle("menubar");
5134
- injectComponentStyle("menu");
5135
- //#endregion
5136
- //#region src/components/mentions/MentionsVessel.svelte
5137
- var root$37 = $.from_html(`<div data-scope="mentions" data-part="option"> </div>`);
5138
- var root_1$8 = $.from_html(`<div></div>`);
5139
- function MentionsVessel$1($$anchor, $$props) {
5140
- $.push($$props, true);
5141
- let open = $.prop($$props, "open", 3, false), matches = $.prop($$props, "matches", 19, () => []), active = $.prop($$props, "active", 3, 0), anchor = $.prop($$props, "anchor", 3, null);
5142
- var fragment = $.comment();
5143
- var node = $.first_child(fragment);
5144
- $.component(node, () => Popover$1.Root, ($$anchor, ArkPopover_Root) => {
5145
- ArkPopover_Root($$anchor, {
5146
- get open() {
5147
- return open();
5148
- },
5149
- positioning: {
5150
- placement: "bottom-start",
5151
- getAnchorRect: () => anchor()?.getBoundingClientRect() ?? null
5152
- },
5153
- onOpenChange: (details) => $$props.onOpenChange?.(details.open),
5154
- children: ($$anchor, $$slotProps) => {
5155
- Portal($$anchor, {
5156
- children: ($$anchor, $$slotProps) => {
5157
- var fragment_2 = $.comment();
5158
- var node_1 = $.first_child(fragment_2);
5159
- $.component(node_1, () => Popover$1.Positioner, ($$anchor, ArkPopover_Positioner) => {
5160
- ArkPopover_Positioner($$anchor, {
5161
- children: ($$anchor, $$slotProps) => {
5162
- var fragment_3 = $.comment();
5163
- var node_2 = $.first_child(fragment_3);
5164
- {
5165
- const asChild = ($$anchor, contentProps = $.noop) => {
5166
- var div = root_1$8();
5167
- $.attribute_effect(div, ($0) => ({
5168
- ...$0,
5169
- "data-scope": "mentions",
5170
- "data-part": "popup"
5171
- }), [() => contentProps()()]);
5172
- $.each(div, 23, matches, (entry) => entry.value, ($$anchor, entry, index) => {
5173
- var div_1 = root$37();
5174
- var text = $.only_child(div_1, true);
5175
- $.template_effect(() => {
5176
- $.set_attribute(div_1, "data-active", $.get(index) === active() ? "" : void 0);
5177
- $.set_text(text, $.get(entry).label);
5178
- });
5179
- $.event("mouseenter", div_1, () => $$props.onActiveChange?.($.get(index)));
5180
- $.delegated("mousedown", div_1, (event) => event.preventDefault());
5181
- $.delegated("click", div_1, () => $$props.onInsert?.($.get(entry)));
5182
- $.append($$anchor, div_1);
5183
- });
5184
- $.reset(div);
5185
- $.append($$anchor, div);
5186
- };
5187
- $.component(node_2, () => Popover$1.Content, ($$anchor, ArkPopover_Content) => {
5188
- ArkPopover_Content($$anchor, {
5189
- asChild,
5190
- $$slots: { asChild: true }
5191
- });
5192
- });
5193
- }
5194
- $.append($$anchor, fragment_3);
5195
- },
5196
- $$slots: { default: true }
5197
- });
5198
- });
5199
- $.append($$anchor, fragment_2);
5200
- },
5201
- $$slots: { default: true }
5202
- });
5203
- },
5204
- $$slots: { default: true }
5205
- });
5206
- });
5207
- $.append($$anchor, fragment);
5208
- $.pop();
5209
- }
5210
- $.delegate(["mousedown", "click"]);
5211
- //#endregion
5212
- //#region src/components/mentions/Mentions.svelte
5213
- var rest_excludes$37 = /* @__PURE__ */ new Set([
5214
- "$$slots",
5215
- "$$events",
5216
- "$$legacy",
5217
- "items",
5218
- "value",
5219
- "trigger",
5220
- "placeholder",
5221
- "autoresize",
5222
- "invalid",
5223
- "onValueChange"
5224
- ]);
5225
- var root$36 = $.from_html(`<div><!> <!></div>`);
5226
- function Mentions$1($$anchor, $$props) {
5227
- $.push($$props, true);
5228
- let items = $.prop($$props, "items", 19, () => []), value = $.prop($$props, "value", 15, ""), trigger = $.prop($$props, "trigger", 3, "@"), autoresize = $.prop($$props, "autoresize", 3, false), invalid = $.prop($$props, "invalid", 3, false), rest = $.rest_props($$props, rest_excludes$37);
5229
- let textareaEl = $.state(null);
5230
- const mentions = useMentions(() => ({
5231
- items: items(),
5232
- trigger: trigger()
5233
- }), () => $.get(textareaEl), {
5234
- getText: () => $.get(textareaEl)?.value ?? value(),
5235
- setText: (next) => {
5236
- value(next);
5237
- $$props.onValueChange?.(next);
5238
- }
5239
- });
5240
- function onInput(event) {
5241
- $$props.onValueChange?.(event.currentTarget.value);
5242
- mentions.onInput();
5243
- }
5244
- var div = root$36();
5245
- $.attribute_effect(div, () => ({
5246
- ...rest,
5247
- "data-scope": "mentions",
5248
- "data-part": "root"
5249
- }));
5250
- var node = $.child(div);
5251
- {
5252
- let $0 = $.derived(() => invalid() ? "true" : void 0);
5253
- $.component(node, () => Field.Textarea, ($$anchor, Field_Textarea) => {
5254
- Field_Textarea($$anchor, {
5255
- get autoresize() {
5256
- return autoresize();
5257
- },
5258
- rows: 3,
5259
- get placeholder() {
5260
- return $$props.placeholder;
5261
- },
5262
- get "aria-invalid"() {
5263
- return $.get($0);
5264
- },
5265
- "data-scope": "mentions",
5266
- "data-part": "textarea",
5267
- oninput: onInput,
5268
- get onkeydown() {
5269
- return mentions.onKeydown;
5270
- },
5271
- get ref() {
5272
- return $.get(textareaEl);
5273
- },
5274
- set ref($$value) {
5275
- $.set(textareaEl, $$value, true);
5276
- },
5277
- get value() {
5278
- return value();
5640
+ var node_4 = $.first_child(fragment_3);
5641
+ $.component(node_4, () => Menu$1.Content, ($$anchor, ArkMenu_Content) => {
5642
+ ArkMenu_Content($$anchor, {
5643
+ children: ($$anchor, $$slotProps) => {
5644
+ var fragment_4 = $.comment();
5645
+ var node_5 = $.first_child(fragment_4);
5646
+ $.each(node_5, 17, () => $.get(group).items, (entry) => entry.value, ($$anchor, entry) => {
5647
+ var fragment_5 = $.comment();
5648
+ var node_6 = $.first_child(fragment_5);
5649
+ {
5650
+ let $0 = $.derived(() => $.get(entry).danger ? "" : void 0);
5651
+ $.component(node_6, () => Menu$1.Item, ($$anchor, ArkMenu_Item) => {
5652
+ ArkMenu_Item($$anchor, {
5653
+ get value() {
5654
+ return $.get(entry).value;
5655
+ },
5656
+ get disabled() {
5657
+ return $.get(entry).disabled;
5658
+ },
5659
+ get "data-danger"() {
5660
+ return $.get($0);
5661
+ },
5662
+ onSelect: () => $$props.onSelect?.($.get(entry).value),
5663
+ children: ($$anchor, $$slotProps) => {
5664
+ var fragment_6 = $.comment();
5665
+ var node_7 = $.first_child(fragment_6);
5666
+ $.component(node_7, () => Menu$1.ItemText, ($$anchor, ArkMenu_ItemText) => {
5667
+ ArkMenu_ItemText($$anchor, {
5668
+ children: ($$anchor, $$slotProps) => {
5669
+ $.next();
5670
+ var text_1 = $.text();
5671
+ $.template_effect(() => $.set_text(text_1, $.get(entry).label));
5672
+ $.append($$anchor, text_1);
5673
+ },
5674
+ $$slots: { default: true }
5675
+ });
5676
+ });
5677
+ $.append($$anchor, fragment_6);
5678
+ },
5679
+ $$slots: { default: true }
5680
+ });
5681
+ });
5682
+ }
5683
+ $.append($$anchor, fragment_5);
5684
+ });
5685
+ $.append($$anchor, fragment_4);
5686
+ },
5687
+ $$slots: { default: true }
5688
+ });
5689
+ });
5690
+ $.append($$anchor, fragment_3);
5691
+ },
5692
+ $$slots: { default: true }
5693
+ });
5694
+ });
5695
+ $.append($$anchor, fragment_2);
5696
+ },
5697
+ $$slots: { default: true }
5698
+ });
5699
+ $.append($$anchor, fragment_1);
5279
5700
  },
5280
- set value($$value) {
5281
- value($$value);
5282
- }
5701
+ $$slots: { default: true }
5283
5702
  });
5284
5703
  });
5285
- }
5286
- MentionsVessel$1($.sibling(node, 2), {
5287
- get open() {
5288
- return mentions.open;
5289
- },
5290
- get matches() {
5291
- return mentions.matches;
5292
- },
5293
- get active() {
5294
- return mentions.active;
5295
- },
5296
- get anchor() {
5297
- return $.get(textareaEl);
5298
- },
5299
- get onInsert() {
5300
- return mentions.insert;
5301
- },
5302
- onActiveChange: (index) => mentions.active = index,
5303
- onOpenChange: (open) => {
5304
- if (!open) mentions.close();
5305
- }
5704
+ $.append($$anchor, fragment);
5306
5705
  });
5307
5706
  $.reset(div);
5308
5707
  $.append($$anchor, div);
5309
5708
  $.pop();
5310
5709
  }
5311
5710
  //#endregion
5312
- //#region src/components/mentions/index.ts
5313
- /** @-mentions: a plain textarea that, when the text before the caret
5314
- * ends with the trigger character followed by a token, offers the
5315
- * matching candidates in a small anchored vessel; choosing one replaces
5316
- * the token with `trigger + label` and hands the whole text back
5317
- * through `bind:value`. Arrows move, Enter inserts, Escape dismisses. */
5318
- const Mentions = Mentions$1;
5319
- /** The vessel: the candidates themselves as a floating card. Composers
5320
- * that keep their own field anatomy wire it up with `useMentions`
5321
- * directly. */
5322
- const MentionsVessel = MentionsVessel$1;
5323
- injectComponentStyle("mentions");
5711
+ //#region src/components/menubar/index.ts
5712
+ /** A desktop-style menu bar: a row of quiet ghost triggers, each
5713
+ * opening the same paper vessel as the menu family. The triggers are
5714
+ * our own buttons grafted onto the menu machine's trigger via
5715
+ * `asChild` — the machine keeps the trigger element (positioning,
5716
+ * focus restore, `data-state`) while the element wears the menubar
5717
+ * scope. The popups keep the menu parts untouched, so the menu
5718
+ * stylesheet dresses them. */
5719
+ const Menubar = Menubar$1;
5720
+ injectComponentStyle("menubar");
5721
+ injectComponentStyle("menu");
5324
5722
  //#endregion
5325
5723
  //#region src/components/meter/MeterLabel.svelte
5326
5724
  var rest_excludes$36 = /* @__PURE__ */ new Set([
@@ -6468,6 +6866,7 @@ var rest_excludes$14 = /* @__PURE__ */ new Set([
6468
6866
  "selectable",
6469
6867
  "sortable",
6470
6868
  "filterable",
6869
+ "showToolbar",
6471
6870
  "tree",
6472
6871
  "merge",
6473
6872
  "pinStart",
@@ -6489,15 +6888,18 @@ var root$13 = $.from_html(`<input type="checkbox" aria-label="Select row"/>`);
6489
6888
  var root_1$3 = $.from_html(`<div data-scope="table" data-part="cell-main"><button type="button" data-scope="table" data-part="expander"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m9 6 6 6-6 6"></path></svg></button> <!></div>`);
6490
6889
  var root_2$2 = $.from_html(`<div><!></div>`);
6491
6890
  var root_3$2 = $.from_html(`<div role="row" data-scope="table" data-part="row"></div>`);
6492
- var root_4$1 = $.from_html(`<div data-scope="table" data-part="toolbar"><input type="search" data-scope="table" data-part="global-filter" aria-label="Filter all columns"/></div>`);
6493
- var root_5$1 = $.from_html(`<div><input type="checkbox" aria-label="Select all rows"/></div>`);
6494
- var root_6$1 = $.from_html(`<input type="text" data-scope="table" data-part="header-filter" placeholder="Filter"/>`);
6891
+ var root_4$2 = $.from_html(`<div data-scope="table" data-part="toolbar"><input type="search" data-scope="table" data-part="global-filter" aria-label="Filter all columns"/></div>`);
6892
+ var root_5$2 = $.from_html(`<div><input type="checkbox" aria-label="Select all rows"/></div>`);
6893
+ var root_6$2 = $.from_html(`<input type="text" data-scope="table" data-part="header-filter" placeholder="Filter"/>`);
6495
6894
  var root_7$1 = $.from_html(`<div><!> <!></div>`);
6496
6895
  var root_8 = $.from_html(`<div data-scope="table" data-part="empty"> </div>`);
6497
6896
  var root_9 = $.from_html(`<div role="rowgroup" data-scope="table" data-part="footer"></div>`);
6498
- var root_10 = $.from_html(`<option> </option>`);
6499
- var root_11 = $.from_html(`<div data-scope="table" data-part="pagination"><button type="button" data-scope="table" data-part="page-button">Prev</button> <button type="button" data-scope="table" data-part="page-button">Next</button> <select data-scope="table" data-part="page-size" aria-label="Rows per page"></select> <span data-scope="table" data-part="page-status"> </span></div>`);
6500
- var root_12 = $.from_html(`<div><!> <div data-scope="table" data-part="viewport"><div role="table" data-scope="table" data-part="table"><div role="rowgroup" data-scope="table" data-part="header"></div> <div role="rowgroup" data-scope="table" data-part="body"><!> <!></div> <!></div></div> <!></div>`);
6897
+ var root_10 = $.from_svg(`<svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m6 9 6 6 6-6"></path></svg>`);
6898
+ var root_11 = $.from_html(`<!> <!>`, 1);
6899
+ var root_12 = $.from_svg(`<svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path></path></svg>`);
6900
+ var root_13 = $.from_html(`<!> <!> <!>`, 1);
6901
+ var root_14 = $.from_html(`<div data-scope="table" data-part="pagination"><span data-scope="table" data-part="page-status"> </span> <div data-scope="table" data-part="page-nav"><!> <!></div></div>`);
6902
+ var root_15 = $.from_html(`<div><!> <div data-scope="table" data-part="viewport"><div role="table" data-scope="table" data-part="table"><div role="rowgroup" data-scope="table" data-part="header"></div> <div role="rowgroup" data-scope="table" data-part="body"><!> <!></div> <!></div></div> <!></div>`);
6501
6903
  function DataTable$1($$anchor, $$props) {
6502
6904
  $.push($$props, true);
6503
6905
  const $virtualizer = () => $.store_get(virtualizer, "$virtualizer", $$stores);
@@ -6591,7 +6993,7 @@ function DataTable$1($$anchor, $$props) {
6591
6993
  $.event("dragend", div, onRowDragEnd);
6592
6994
  $.append($$anchor, div);
6593
6995
  };
6594
- let selectable = $.prop($$props, "selectable", 3, false), sortable = $.prop($$props, "sortable", 3, true), filterable = $.prop($$props, "filterable", 3, false), tree = $.prop($$props, "tree", 3, false), virtual = $.prop($$props, "virtual", 3, false), rowHeight = $.prop($$props, "rowHeight", 3, 40), paginated = $.prop($$props, "paginated", 3, false), pageSize = $.prop($$props, "pageSize", 3, 10), pageSizeOptions = $.prop($$props, "pageSizeOptions", 19, () => [
6996
+ let selectable = $.prop($$props, "selectable", 3, false), sortable = $.prop($$props, "sortable", 3, true), filterable = $.prop($$props, "filterable", 3, false), showToolbar = $.prop($$props, "showToolbar", 3, true), tree = $.prop($$props, "tree", 3, false), virtual = $.prop($$props, "virtual", 3, false), rowHeight = $.prop($$props, "rowHeight", 3, 40), paginated = $.prop($$props, "paginated", 3, false), pageSize = $.prop($$props, "pageSize", 3, 10), pageSizeOptions = $.prop($$props, "pageSizeOptions", 19, () => [
6595
6997
  10,
6596
6998
  20,
6597
6999
  50
@@ -6908,7 +7310,7 @@ function DataTable$1($$anchor, $$props) {
6908
7310
  ...span > 1 ? { "grid-row": `span ${span}` } : {}
6909
7311
  };
6910
7312
  }
6911
- var div_3 = root_12();
7313
+ var div_3 = root_15();
6912
7314
  $.attribute_effect(div_3, ($0) => ({
6913
7315
  ...rest,
6914
7316
  "data-scope": "table",
@@ -6918,7 +7320,7 @@ function DataTable$1($$anchor, $$props) {
6918
7320
  }), [() => `calc(${baseRowHeight()}px * var(--bs-density-scale, 1))`]);
6919
7321
  var node_4 = $.child(div_3);
6920
7322
  var consequent_3 = ($$anchor) => {
6921
- var div_4 = root_4$1();
7323
+ var div_4 = root_4$2();
6922
7324
  var input_1 = $.child(div_4);
6923
7325
  $.remove_input_defaults(input_1);
6924
7326
  $.reset(div_4);
@@ -6930,7 +7332,7 @@ function DataTable$1($$anchor, $$props) {
6930
7332
  $.append($$anchor, div_4);
6931
7333
  };
6932
7334
  $.if(node_4, ($$render) => {
6933
- if (filterable()) $$render(consequent_3);
7335
+ if (filterable() && showToolbar()) $$render(consequent_3);
6934
7336
  });
6935
7337
  var div_5 = $.sibling(node_4, 2);
6936
7338
  var div_6 = $.child(div_5);
@@ -6944,7 +7346,7 @@ function DataTable$1($$anchor, $$props) {
6944
7346
  var node_5 = $.first_child(fragment_2);
6945
7347
  var consequent_4 = ($$anchor) => {
6946
7348
  const all = $.derived(() => table.getIsAllRowsSelected());
6947
- var div_9 = root_5$1();
7349
+ var div_9 = root_5$2();
6948
7350
  $.attribute_effect(div_9, ($0, $1) => ({
6949
7351
  role: "columnheader",
6950
7352
  "data-scope": "table",
@@ -6995,11 +7397,11 @@ function DataTable$1($$anchor, $$props) {
6995
7397
  } });
6996
7398
  };
6997
7399
  $.if(node_6, ($$render) => {
6998
- if (!$.get(header).isPlaceholder) $$render(consequent_5);
7400
+ if (!$.get(header).isPlaceholder && $.get(header).column.columnDef.header !== "") $$render(consequent_5);
6999
7401
  });
7000
7402
  var node_7 = $.sibling(node_6, 2);
7001
7403
  var consequent_6 = ($$anchor) => {
7002
- var input_3 = root_6$1();
7404
+ var input_3 = root_6$2();
7003
7405
  $.remove_input_defaults(input_3);
7004
7406
  $.set_attribute(input_3, "draggable", false);
7005
7407
  $.template_effect(($0) => {
@@ -7101,45 +7503,247 @@ function DataTable$1($$anchor, $$props) {
7101
7503
  $.reset(div_5);
7102
7504
  $.bind_this(div_5, ($$value) => $.set(viewportEl, $$value), () => $.get(viewportEl));
7103
7505
  var node_14 = $.sibling(div_5, 2);
7104
- var consequent_11 = ($$anchor) => {
7506
+ var consequent_12 = ($$anchor) => {
7105
7507
  const pagination = $.derived(() => table.atoms.pagination.get());
7106
- var div_16 = root_11();
7107
- var button_1 = $.child(div_16);
7108
- var button_2 = $.sibling(button_1, 2);
7109
- var select = $.sibling(button_2, 2);
7110
- $.each(select, 20, pageSizeOptions, (size) => size, ($$anchor, size) => {
7111
- var option = root_10();
7112
- var text_1 = $.only_child(option, true);
7113
- var option_value = {};
7114
- $.template_effect(() => {
7115
- $.set_text(text_1, `${size} / page`);
7116
- if (option_value !== (option_value = size)) option.value = (option.__value = option_value) ?? "";
7508
+ const sizeItems = $.derived(() => createListCollection({ items: pageSizeOptions().map((size) => ({
7509
+ label: `${size} / page`,
7510
+ value: String(size)
7511
+ })) }));
7512
+ var div_16 = root_14();
7513
+ var span_1 = $.child(div_16);
7514
+ var text_1 = $.only_child(span_1, true);
7515
+ var div_17 = $.sibling(span_1, 2);
7516
+ var node_15 = $.child(div_17);
7517
+ {
7518
+ let $0 = $.derived(() => [String($.get(pagination).pageSize)]);
7519
+ $.component(node_15, () => Select.Root, ($$anchor, ArkSelect_Root) => {
7520
+ ArkSelect_Root($$anchor, {
7521
+ get collection() {
7522
+ return $.get(sizeItems);
7523
+ },
7524
+ get value() {
7525
+ return $.get($0);
7526
+ },
7527
+ onValueChange: (details) => table.setPageSize(Number(details.value[0])),
7528
+ positioning: { placement: "top-start" },
7529
+ children: ($$anchor, $$slotProps) => {
7530
+ var fragment_9 = root_11();
7531
+ var node_16 = $.first_child(fragment_9);
7532
+ $.component(node_16, () => Select.Control, ($$anchor, ArkSelect_Control) => {
7533
+ ArkSelect_Control($$anchor, {
7534
+ children: ($$anchor, $$slotProps) => {
7535
+ var fragment_10 = $.comment();
7536
+ var node_17 = $.first_child(fragment_10);
7537
+ $.component(node_17, () => Select.Trigger, ($$anchor, ArkSelect_Trigger) => {
7538
+ ArkSelect_Trigger($$anchor, {
7539
+ "aria-label": "Rows per page",
7540
+ children: ($$anchor, $$slotProps) => {
7541
+ var fragment_11 = root_11();
7542
+ var node_18 = $.first_child(fragment_11);
7543
+ $.component(node_18, () => Select.ValueText, ($$anchor, ArkSelect_ValueText) => {
7544
+ ArkSelect_ValueText($$anchor, {});
7545
+ });
7546
+ var node_19 = $.sibling(node_18, 2);
7547
+ $.component(node_19, () => Select.Indicator, ($$anchor, ArkSelect_Indicator) => {
7548
+ ArkSelect_Indicator($$anchor, {
7549
+ children: ($$anchor, $$slotProps) => {
7550
+ var svg = root_10();
7551
+ $.append($$anchor, svg);
7552
+ },
7553
+ $$slots: { default: true }
7554
+ });
7555
+ });
7556
+ $.append($$anchor, fragment_11);
7557
+ },
7558
+ $$slots: { default: true }
7559
+ });
7560
+ });
7561
+ $.append($$anchor, fragment_10);
7562
+ },
7563
+ $$slots: { default: true }
7564
+ });
7565
+ });
7566
+ var node_20 = $.sibling(node_16, 2);
7567
+ $.component(node_20, () => Select.Positioner, ($$anchor, ArkSelect_Positioner) => {
7568
+ ArkSelect_Positioner($$anchor, {
7569
+ children: ($$anchor, $$slotProps) => {
7570
+ var fragment_12 = $.comment();
7571
+ var node_21 = $.first_child(fragment_12);
7572
+ $.component(node_21, () => Select.Content, ($$anchor, ArkSelect_Content) => {
7573
+ ArkSelect_Content($$anchor, {
7574
+ children: ($$anchor, $$slotProps) => {
7575
+ var fragment_13 = $.comment();
7576
+ var node_22 = $.first_child(fragment_13);
7577
+ $.each(node_22, 17, () => $.get(sizeItems).items, (item) => item.value, ($$anchor, item) => {
7578
+ var fragment_14 = $.comment();
7579
+ var node_23 = $.first_child(fragment_14);
7580
+ $.component(node_23, () => Select.Item, ($$anchor, ArkSelect_Item) => {
7581
+ ArkSelect_Item($$anchor, {
7582
+ get item() {
7583
+ return $.get(item);
7584
+ },
7585
+ get value() {
7586
+ return $.get(item).value;
7587
+ },
7588
+ children: ($$anchor, $$slotProps) => {
7589
+ var fragment_15 = root_11();
7590
+ var node_24 = $.first_child(fragment_15);
7591
+ $.component(node_24, () => Select.ItemText, ($$anchor, ArkSelect_ItemText) => {
7592
+ ArkSelect_ItemText($$anchor, {
7593
+ children: ($$anchor, $$slotProps) => {
7594
+ $.next();
7595
+ var text_2 = $.text();
7596
+ $.template_effect(() => $.set_text(text_2, $.get(item).label));
7597
+ $.append($$anchor, text_2);
7598
+ },
7599
+ $$slots: { default: true }
7600
+ });
7601
+ });
7602
+ var node_25 = $.sibling(node_24, 2);
7603
+ $.component(node_25, () => Select.ItemIndicator, ($$anchor, ArkSelect_ItemIndicator) => {
7604
+ ArkSelect_ItemIndicator($$anchor, {
7605
+ children: ($$anchor, $$slotProps) => {
7606
+ $.next();
7607
+ var text_3 = $.text("✓");
7608
+ $.append($$anchor, text_3);
7609
+ },
7610
+ $$slots: { default: true }
7611
+ });
7612
+ });
7613
+ $.append($$anchor, fragment_15);
7614
+ },
7615
+ $$slots: { default: true }
7616
+ });
7617
+ });
7618
+ $.append($$anchor, fragment_14);
7619
+ });
7620
+ $.append($$anchor, fragment_13);
7621
+ },
7622
+ $$slots: { default: true }
7623
+ });
7624
+ });
7625
+ $.append($$anchor, fragment_12);
7626
+ },
7627
+ $$slots: { default: true }
7628
+ });
7629
+ });
7630
+ $.append($$anchor, fragment_9);
7631
+ },
7632
+ $$slots: { default: true }
7633
+ });
7117
7634
  });
7118
- $.append($$anchor, option);
7119
- });
7120
- $.reset(select);
7121
- var select_value;
7122
- $.init_select(select);
7123
- var span_1 = $.sibling(select, 2);
7124
- var text_2 = $.only_child(span_1, true);
7635
+ }
7636
+ var node_26 = $.sibling(node_15, 2);
7637
+ {
7638
+ const glyph = ($$anchor, direction = $.noop) => {
7639
+ var svg_1 = root_12();
7640
+ var path = $.only_child(svg_1);
7641
+ $.template_effect(() => $.set_attribute(path, "d", direction() === "start" ? "m15 18-6-6 6-6" : "m9 18 6-6-6-6"));
7642
+ $.append($$anchor, svg_1);
7643
+ };
7644
+ let $0 = $.derived(() => table.getRowCount());
7645
+ let $1 = $.derived(() => $.get(pagination).pageIndex + 1);
7646
+ $.component(node_26, () => Pagination.Root, ($$anchor, ArkPagination_Root) => {
7647
+ ArkPagination_Root($$anchor, {
7648
+ get count() {
7649
+ return $.get($0);
7650
+ },
7651
+ get pageSize() {
7652
+ return $.get(pagination).pageSize;
7653
+ },
7654
+ get page() {
7655
+ return $.get($1);
7656
+ },
7657
+ onPageChange: (details) => table.setPageIndex(details.page - 1),
7658
+ glyph,
7659
+ children: ($$anchor, $$slotProps) => {
7660
+ var fragment_17 = root_13();
7661
+ var node_27 = $.first_child(fragment_17);
7662
+ $.component(node_27, () => Pagination.PrevTrigger, ($$anchor, ArkPagination_PrevTrigger) => {
7663
+ ArkPagination_PrevTrigger($$anchor, {
7664
+ children: ($$anchor, $$slotProps) => {
7665
+ glyph($$anchor, () => "start");
7666
+ },
7667
+ $$slots: { default: true }
7668
+ });
7669
+ });
7670
+ var node_28 = $.sibling(node_27, 2);
7671
+ {
7672
+ const children = ($$anchor, scope = $.noop) => {
7673
+ var fragment_19 = $.comment();
7674
+ var node_29 = $.first_child(fragment_19);
7675
+ $.each(node_29, 19, () => scope().pages, (page, index) => page.type === "ellipsis" ? `e${index}` : page.value, ($$anchor, page, index) => {
7676
+ var fragment_20 = $.comment();
7677
+ var node_30 = $.first_child(fragment_20);
7678
+ var consequent_11 = ($$anchor) => {
7679
+ var fragment_21 = $.comment();
7680
+ var node_31 = $.first_child(fragment_21);
7681
+ $.component(node_31, () => Pagination.Ellipsis, ($$anchor, ArkPagination_Ellipsis) => {
7682
+ ArkPagination_Ellipsis($$anchor, { get index() {
7683
+ return $.get(index);
7684
+ } });
7685
+ });
7686
+ $.append($$anchor, fragment_21);
7687
+ };
7688
+ var alternate_3 = ($$anchor) => {
7689
+ var fragment_22 = $.comment();
7690
+ var node_32 = $.first_child(fragment_22);
7691
+ $.component(node_32, () => Pagination.Item, ($$anchor, ArkPagination_Item) => {
7692
+ ArkPagination_Item($$anchor, {
7693
+ get value() {
7694
+ return $.get(page).value;
7695
+ },
7696
+ children: ($$anchor, $$slotProps) => {
7697
+ $.next();
7698
+ var text_4 = $.text();
7699
+ $.template_effect(($0) => $.set_text(text_4, $0), [() => String($.get(page).value)]);
7700
+ $.append($$anchor, text_4);
7701
+ },
7702
+ $$slots: { default: true }
7703
+ });
7704
+ });
7705
+ $.append($$anchor, fragment_22);
7706
+ };
7707
+ $.if(node_30, ($$render) => {
7708
+ if ($.get(page).type === "ellipsis") $$render(consequent_11);
7709
+ else $$render(alternate_3, -1);
7710
+ });
7711
+ $.append($$anchor, fragment_20);
7712
+ });
7713
+ $.append($$anchor, fragment_19);
7714
+ };
7715
+ $.component(node_28, () => Pagination.Context, ($$anchor, ArkPagination_Context) => {
7716
+ ArkPagination_Context($$anchor, {
7717
+ children,
7718
+ $$slots: { default: true }
7719
+ });
7720
+ });
7721
+ }
7722
+ var node_33 = $.sibling(node_28, 2);
7723
+ $.component(node_33, () => Pagination.NextTrigger, ($$anchor, ArkPagination_NextTrigger) => {
7724
+ ArkPagination_NextTrigger($$anchor, {
7725
+ children: ($$anchor, $$slotProps) => {
7726
+ glyph($$anchor, () => "end");
7727
+ },
7728
+ $$slots: { default: true }
7729
+ });
7730
+ });
7731
+ $.append($$anchor, fragment_17);
7732
+ },
7733
+ $$slots: {
7734
+ glyph: true,
7735
+ default: true
7736
+ }
7737
+ });
7738
+ });
7739
+ }
7740
+ $.reset(div_17);
7125
7741
  $.reset(div_16);
7126
- $.template_effect(($0, $1, $2) => {
7127
- button_1.disabled = $0;
7128
- button_2.disabled = $1;
7129
- if (select_value !== (select_value = $.get(pagination).pageSize)) select.value = (select.__value = select_value) ?? "", $.select_option(select, select_value);
7130
- $.set_text(text_2, $2);
7131
- }, [
7132
- () => !table.getCanPreviousPage(),
7133
- () => !table.getCanNextPage(),
7134
- () => `Page ${$.get(pagination).pageIndex + 1} of ${table.getPageCount()} · ${table.getRowCount()} rows`
7135
- ]);
7136
- $.delegated("click", button_1, () => table.previousPage());
7137
- $.delegated("click", button_2, () => table.nextPage());
7138
- $.delegated("change", select, (e) => table.setPageSize(Number(e.currentTarget.value)));
7742
+ $.template_effect(($0) => $.set_text(text_1, $0), [() => `${table.getRowCount()} rows`]);
7139
7743
  $.append($$anchor, div_16);
7140
7744
  };
7141
7745
  $.if(node_14, ($$render) => {
7142
- if (paginated()) $$render(consequent_11);
7746
+ if (paginated()) $$render(consequent_12);
7143
7747
  });
7144
7748
  $.reset(div_3);
7145
7749
  $.template_effect(($0) => {
@@ -7518,14 +8122,14 @@ var root$1 = $.from_html(`<div data-scope="transfer" data-part="search"><!></div
7518
8122
  var root_1$2 = $.from_html(`<p data-scope="transfer" data-part="empty">Nothing here</p>`);
7519
8123
  var root_2$1 = $.from_svg(`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m5 12.5 5 5L19 7"></path></svg>`);
7520
8124
  var root_3$1 = $.from_html(`<!> <!> <!>`, 1);
7521
- var root_4 = $.from_html(`<div data-scope="transfer" data-part="panel"><div data-scope="transfer" data-part="head"><span data-scope="transfer" data-part="title"> </span> <span data-scope="transfer" data-part="count"> </span></div> <!> <div data-scope="transfer" data-part="list"><!></div></div>`);
7522
- var root_5 = $.from_svg(`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12h14m-6-6 6 6-6 6"></path></svg>`);
7523
- var root_6 = $.from_svg(`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M19 12H5m6-6-6 6 6 6"></path></svg>`);
8125
+ var root_4$1 = $.from_html(`<div data-scope="transfer" data-part="panel"><div data-scope="transfer" data-part="head"><span data-scope="transfer" data-part="title"> </span> <span data-scope="transfer" data-part="count"> </span></div> <!> <div data-scope="transfer" data-part="list"><!></div></div>`);
8126
+ var root_5$1 = $.from_svg(`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12h14m-6-6 6 6-6 6"></path></svg>`);
8127
+ var root_6$1 = $.from_svg(`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M19 12H5m6-6-6 6 6 6"></path></svg>`);
7524
8128
  var root_7 = $.from_html(`<div><!> <div data-scope="transfer" data-part="operations"><!> <!></div> <!></div>`);
7525
8129
  function Transfer$1($$anchor, $$props) {
7526
8130
  $.push($$props, true);
7527
8131
  const panel = ($$anchor, side = $.noop, title = $.noop, items = $.noop, checked = $.noop) => {
7528
- var div = root_4();
8132
+ var div = root_4$1();
7529
8133
  var div_1 = $.child(div);
7530
8134
  var span = $.child(div_1);
7531
8135
  var text = $.only_child(span, true);
@@ -7691,7 +8295,7 @@ function Transfer$1($$anchor, $$props) {
7691
8295
  "aria-label": "Move right",
7692
8296
  onclick: () => move(true),
7693
8297
  children: ($$anchor, $$slotProps) => {
7694
- var svg_1 = root_5();
8298
+ var svg_1 = root_5$1();
7695
8299
  $.append($$anchor, svg_1);
7696
8300
  },
7697
8301
  $$slots: { default: true }
@@ -7710,7 +8314,7 @@ function Transfer$1($$anchor, $$props) {
7710
8314
  "aria-label": "Move left",
7711
8315
  onclick: () => move(false),
7712
8316
  children: ($$anchor, $$slotProps) => {
7713
- var svg_2 = root_6();
8317
+ var svg_2 = root_6$1();
7714
8318
  $.append($$anchor, svg_2);
7715
8319
  },
7716
8320
  $$slots: { default: true }
@@ -7889,16 +8493,22 @@ var rest_excludes$1 = /* @__PURE__ */ new Set([
7889
8493
  "value",
7890
8494
  "data",
7891
8495
  "placeholder",
8496
+ "filterable",
7892
8497
  "disabled"
7893
8498
  ]);
7894
8499
  var root = $.from_svg(`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m9 18 6-6-6-6"></path></svg>`);
7895
8500
  var root_1$1 = $.from_html(`<!> <!>`, 1);
7896
8501
  var root_2 = $.from_html(`<span><!></span>`);
7897
8502
  var root_3 = $.from_html(`<button> <span data-part="chevron" aria-hidden="true"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m9 18 6-6-6-6"></path></svg></span></button>`);
8503
+ var root_4 = $.from_html(`<div data-scope="tree-select" data-part="search"><!></div>`);
8504
+ var root_5 = $.from_html(`<p data-scope="tree-select" data-part="empty">Nothing matches</p>`);
8505
+ var root_6 = $.from_html(`<!> <div data-scope="tree-select" data-part="body"><!></div>`, 1);
7898
8506
  function TreeSelect$1($$anchor, $$props) {
7899
8507
  $.push($$props, true);
7900
- let value = $.prop($$props, "value", 15), placeholder = $.prop($$props, "placeholder", 3, "Select…"), disabled = $.prop($$props, "disabled", 3, false), rest = $.rest_props($$props, rest_excludes$1);
8508
+ let value = $.prop($$props, "value", 15), placeholder = $.prop($$props, "placeholder", 3, "Select…"), filterable = $.prop($$props, "filterable", 3, false), disabled = $.prop($$props, "disabled", 3, false), rest = $.rest_props($$props, rest_excludes$1);
7901
8509
  let open = $.state(false);
8510
+ let query = $.state("");
8511
+ const filterFns = useFilter({ sensitivity: "base" });
7902
8512
  const collection = $.derived(() => createTreeCollection$1({
7903
8513
  nodeToValue: (node) => node.value,
7904
8514
  nodeToString: (node) => node.label,
@@ -7908,7 +8518,23 @@ function TreeSelect$1($$anchor, $$props) {
7908
8518
  children: $$props.data
7909
8519
  }
7910
8520
  }));
8521
+ const filtering = $.derived(() => filterable() && $.get(query).trim().length > 0);
8522
+ /** The collection pruned to the matches — each hit keeping its
8523
+ * ancestors, so a deep match still reads inside its hierarchy. */
8524
+ const visibleCollection = $.derived(() => $.get(filtering) ? $.get(collection).filter((node) => filterFns.contains(node.label, $.get(query).trim())) : $.get(collection));
7911
8525
  const firstLevel = $.derived(() => ($$props.data ?? []).map((node) => node.value));
8526
+ const expandedWhileFiltering = $.derived(() => {
8527
+ if (!$.get(filtering)) return void 0;
8528
+ const values = [];
8529
+ const walk = (nodes) => {
8530
+ for (const node of nodes) if (node.children?.length) {
8531
+ values.push(node.value);
8532
+ walk(node.children);
8533
+ }
8534
+ };
8535
+ walk($.get(visibleCollection).rootNode.children ?? []);
8536
+ return values;
8537
+ });
7912
8538
  const label = $.derived(() => {
7913
8539
  let found;
7914
8540
  const walk = (nodes) => {
@@ -7937,7 +8563,10 @@ function TreeSelect$1($$anchor, $$props) {
7937
8563
  sameWidth: true,
7938
8564
  placement: "bottom-start"
7939
8565
  },
7940
- onOpenChange: (details) => $.set(open, details.open, true),
8566
+ onOpenChange: (details) => {
8567
+ $.set(open, details.open, true);
8568
+ if (!details.open) $.set(query, "");
8569
+ },
7941
8570
  children: ($$anchor, $$slotProps) => {
7942
8571
  var fragment_11 = root_1$1();
7943
8572
  var node_13 = $.first_child(fragment_11);
@@ -7985,45 +8614,85 @@ function TreeSelect$1($$anchor, $$props) {
7985
8614
  "data-scope": "tree-select",
7986
8615
  "data-part": "content",
7987
8616
  children: ($$anchor, $$slotProps) => {
7988
- var fragment_14 = $.comment();
8617
+ var fragment_14 = root_6();
7989
8618
  var node_17 = $.first_child(fragment_14);
7990
- {
7991
- let $0 = $.derived(() => value() ? [value()] : []);
7992
- $.component(node_17, () => TreeView$1.Root, ($$anchor, ArkTreeView_Root) => {
7993
- ArkTreeView_Root($$anchor, {
7994
- get collection() {
7995
- return $.get(collection);
7996
- },
7997
- selectionMode: "single",
7998
- get selectedValue() {
7999
- return $.get($0);
8000
- },
8001
- get defaultExpandedValue() {
8002
- return $.get(firstLevel);
8003
- },
8004
- onSelectionChange: pick,
8005
- children: ($$anchor, $$slotProps) => {
8006
- var fragment_15 = $.comment();
8007
- var node_18 = $.first_child(fragment_15);
8008
- $.component(node_18, () => TreeView$1.Tree, ($$anchor, ArkTreeView_Tree) => {
8009
- ArkTreeView_Tree($$anchor, {
8010
- children: ($$anchor, $$slotProps) => {
8011
- var fragment_16 = $.comment();
8012
- var node_19 = $.first_child(fragment_16);
8013
- $.each(node_19, 19, () => $.get(collection).rootNode.children ?? [], (node) => node.value, ($$anchor, node, index) => {
8014
- row($$anchor, () => $.get(node), () => [$.get(index)]);
8015
- });
8016
- $.append($$anchor, fragment_16);
8017
- },
8018
- $$slots: { default: true }
8619
+ var consequent_1 = ($$anchor) => {
8620
+ var div = root_4();
8621
+ Input$1($.child(div), {
8622
+ size: "sm",
8623
+ placeholder: "Filter…",
8624
+ "aria-label": "Filter options",
8625
+ get value() {
8626
+ return $.get(query);
8627
+ },
8628
+ set value($$value) {
8629
+ $.set(query, $$value, true);
8630
+ }
8631
+ });
8632
+ $.reset(div);
8633
+ $.append($$anchor, div);
8634
+ };
8635
+ $.if(node_17, ($$render) => {
8636
+ if (filterable()) $$render(consequent_1);
8637
+ });
8638
+ var div_1 = $.sibling(node_17, 2);
8639
+ var node_19 = $.child(div_1);
8640
+ var consequent_2 = ($$anchor) => {
8641
+ var p = root_5();
8642
+ $.append($$anchor, p);
8643
+ };
8644
+ var alternate_1 = ($$anchor) => {
8645
+ var fragment_15 = $.comment();
8646
+ var node_20 = $.first_child(fragment_15);
8647
+ {
8648
+ let $0 = $.derived(() => value() ? [value()] : []);
8649
+ let $1 = $.derived(() => $.get(filtering) ? $.get(expandedWhileFiltering) : void 0);
8650
+ let $2 = $.derived(() => $.get(filtering) ? void 0 : $.get(firstLevel));
8651
+ $.component(node_20, () => TreeView$1.Root, ($$anchor, ArkTreeView_Root) => {
8652
+ ArkTreeView_Root($$anchor, {
8653
+ get collection() {
8654
+ return $.get(visibleCollection);
8655
+ },
8656
+ selectionMode: "single",
8657
+ get selectedValue() {
8658
+ return $.get($0);
8659
+ },
8660
+ get expandedValue() {
8661
+ return $.get($1);
8662
+ },
8663
+ get defaultExpandedValue() {
8664
+ return $.get($2);
8665
+ },
8666
+ onSelectionChange: pick,
8667
+ children: ($$anchor, $$slotProps) => {
8668
+ var fragment_16 = $.comment();
8669
+ var node_21 = $.first_child(fragment_16);
8670
+ $.component(node_21, () => TreeView$1.Tree, ($$anchor, ArkTreeView_Tree) => {
8671
+ ArkTreeView_Tree($$anchor, {
8672
+ children: ($$anchor, $$slotProps) => {
8673
+ var fragment_17 = $.comment();
8674
+ var node_22 = $.first_child(fragment_17);
8675
+ $.each(node_22, 19, () => $.get(visibleCollection).rootNode.children ?? [], (node) => node.value, ($$anchor, node, index) => {
8676
+ row($$anchor, () => $.get(node), () => [$.get(index)]);
8677
+ });
8678
+ $.append($$anchor, fragment_17);
8679
+ },
8680
+ $$slots: { default: true }
8681
+ });
8019
8682
  });
8020
- });
8021
- $.append($$anchor, fragment_15);
8022
- },
8023
- $$slots: { default: true }
8683
+ $.append($$anchor, fragment_16);
8684
+ },
8685
+ $$slots: { default: true }
8686
+ });
8024
8687
  });
8025
- });
8026
- }
8688
+ }
8689
+ $.append($$anchor, fragment_15);
8690
+ };
8691
+ $.if(node_19, ($$render) => {
8692
+ if (($.get(visibleCollection).rootNode.children ?? []).length === 0) $$render(consequent_2);
8693
+ else $$render(alternate_1, -1);
8694
+ });
8695
+ $.reset(div_1);
8027
8696
  $.append($$anchor, fragment_14);
8028
8697
  },
8029
8698
  $$slots: { default: true }