@pie-element/mc-populated-blank 0.2.12 → 0.2.13-next.1

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 (57) hide show
  1. package/configure.js +2 -0
  2. package/dist/author/index.d.ts +0 -1
  3. package/dist/author/index.js +292 -171
  4. package/dist/author/index.js.map +1 -1
  5. package/dist/browser/author/index.js +50 -0
  6. package/dist/browser/author/index.js.map +1 -0
  7. package/dist/browser/client-B0miu8E8.js +2414 -0
  8. package/dist/browser/client-B0miu8E8.js.map +1 -0
  9. package/dist/browser/controller/index.js +221 -0
  10. package/dist/browser/controller/index.js.map +1 -0
  11. package/dist/browser/delivery/index.js +1234 -0
  12. package/dist/browser/delivery/index.js.map +1 -0
  13. package/dist/browser/layoutLimits-ATKOwLHb.js +42 -0
  14. package/dist/browser/layoutLimits-ATKOwLHb.js.map +1 -0
  15. package/dist/browser/print/index.js +125 -0
  16. package/dist/browser/print/index.js.map +1 -0
  17. package/dist/controller/defaults.d.ts +0 -1
  18. package/dist/controller/index.d.ts +0 -1
  19. package/dist/controller/index.js.map +1 -1
  20. package/dist/delivery/computeAudioMode.d.ts +0 -1
  21. package/dist/delivery/computeChoiceCorrectness.d.ts +0 -1
  22. package/dist/delivery/computeDisplayState.d.ts +0 -1
  23. package/dist/delivery/computeLayoutProfile.d.ts +0 -1
  24. package/dist/delivery/computeLayoutStyle.d.ts +0 -1
  25. package/dist/delivery/index.d.ts +0 -1
  26. package/dist/delivery/index.js +409 -284
  27. package/dist/delivery/index.js.map +1 -1
  28. package/dist/delivery/variant-css-map.d.ts +0 -1
  29. package/dist/index.d.ts +0 -1
  30. package/dist/index.iife.d.ts +0 -1
  31. package/dist/index.iife.js +6 -6
  32. package/dist/index.js +409 -284
  33. package/dist/index.js.map +1 -1
  34. package/dist/print/index.d.ts +0 -1
  35. package/dist/print/index.js +363 -238
  36. package/dist/print/index.js.map +1 -1
  37. package/dist/runtime-support.d.ts +12 -0
  38. package/dist/runtime-support.js +14 -0
  39. package/dist/runtime-support.js.map +1 -0
  40. package/dist/shared/layoutLimits.d.ts +0 -1
  41. package/dist/shared/types.d.ts +0 -1
  42. package/package.json +31 -5
  43. package/dist/author/index.d.ts.map +0 -1
  44. package/dist/controller/defaults.d.ts.map +0 -1
  45. package/dist/controller/index.d.ts.map +0 -1
  46. package/dist/delivery/computeAudioMode.d.ts.map +0 -1
  47. package/dist/delivery/computeChoiceCorrectness.d.ts.map +0 -1
  48. package/dist/delivery/computeDisplayState.d.ts.map +0 -1
  49. package/dist/delivery/computeLayoutProfile.d.ts.map +0 -1
  50. package/dist/delivery/computeLayoutStyle.d.ts.map +0 -1
  51. package/dist/delivery/index.d.ts.map +0 -1
  52. package/dist/delivery/variant-css-map.d.ts.map +0 -1
  53. package/dist/index.d.ts.map +0 -1
  54. package/dist/index.iife.d.ts.map +0 -1
  55. package/dist/print/index.d.ts.map +0 -1
  56. package/dist/shared/layoutLimits.d.ts.map +0 -1
  57. package/dist/shared/types.d.ts.map +0 -1
@@ -1,14 +1,14 @@
1
- //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/disclose-version.js
1
+ //#region ../../../node_modules/.bun/svelte@5.56.1/node_modules/svelte/src/internal/disclose-version.js
2
2
  if (typeof window !== "undefined") {
3
3
  var _window$__svelte, _window;
4
4
  ((_window$__svelte = (_window = window).__svelte ?? (_window.__svelte = {})).v ?? (_window$__svelte.v = /* @__PURE__ */ new Set())).add("5");
5
5
  }
6
6
  //#endregion
7
- //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/constants.js
7
+ //#region ../../../node_modules/.bun/svelte@5.56.1/node_modules/svelte/src/constants.js
8
8
  var HYDRATION_ERROR = {};
9
- var UNINITIALIZED = Symbol();
9
+ var UNINITIALIZED = Symbol("uninitialized");
10
10
  //#endregion
11
- //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/shared/utils.js
11
+ //#region ../../../node_modules/.bun/svelte@5.56.1/node_modules/svelte/src/internal/shared/utils.js
12
12
  var is_array = Array.isArray;
13
13
  var index_of = Array.prototype.indexOf;
14
14
  var includes = Array.prototype.includes;
@@ -44,7 +44,7 @@ function deferred() {
44
44
  };
45
45
  }
46
46
  //#endregion
47
- //#region \0@oxc-project+runtime@0.129.0/helpers/typeof.js
47
+ //#region \0@oxc-project+runtime@0.133.0/helpers/esm/typeof.js
48
48
  function _typeof(o) {
49
49
  "@babel/helpers - typeof";
50
50
  return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
@@ -54,7 +54,7 @@ function _typeof(o) {
54
54
  }, _typeof(o);
55
55
  }
56
56
  //#endregion
57
- //#region \0@oxc-project+runtime@0.129.0/helpers/toPrimitive.js
57
+ //#region \0@oxc-project+runtime@0.133.0/helpers/esm/toPrimitive.js
58
58
  function toPrimitive(t, r) {
59
59
  if ("object" != _typeof(t) || !t) return t;
60
60
  var e = t[Symbol.toPrimitive];
@@ -66,13 +66,13 @@ function toPrimitive(t, r) {
66
66
  return ("string" === r ? String : Number)(t);
67
67
  }
68
68
  //#endregion
69
- //#region \0@oxc-project+runtime@0.129.0/helpers/toPropertyKey.js
69
+ //#region \0@oxc-project+runtime@0.133.0/helpers/esm/toPropertyKey.js
70
70
  function toPropertyKey(t) {
71
71
  var i = toPrimitive(t, "string");
72
72
  return "symbol" == _typeof(i) ? i : i + "";
73
73
  }
74
74
  //#endregion
75
- //#region \0@oxc-project+runtime@0.129.0/helpers/defineProperty.js
75
+ //#region \0@oxc-project+runtime@0.133.0/helpers/esm/defineProperty.js
76
76
  function _defineProperty(e, r, t) {
77
77
  return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
78
78
  value: t,
@@ -108,6 +108,10 @@ var REACTION_IS_UPDATING = 1 << 21;
108
108
  var ERROR_VALUE = 1 << 23;
109
109
  var STATE_SYMBOL = Symbol("$state");
110
110
  var LEGACY_PROPS = Symbol("legacy props");
111
+ var ATTRIBUTES_CACHE = Symbol("attributes");
112
+ var CLASS_CACHE = Symbol("class");
113
+ var STYLE_CACHE = Symbol("style");
114
+ var TEXT_CACHE = Symbol("text");
111
115
  /** allow users to ignore aborted signal errors if `reason.name === 'StaleReactionError` */
112
116
  var STALE_REACTION = new class StaleReactionError extends Error {
113
117
  constructor(..._args) {
@@ -187,7 +191,7 @@ function svelte_boundary_reset_noop() {
187
191
  console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`);
188
192
  }
189
193
  //#endregion
190
- //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/dom/hydration.js
194
+ //#region ../../../node_modules/.bun/svelte@5.56.1/node_modules/svelte/src/internal/client/dom/hydration.js
191
195
  /** @import { TemplateNode } from '#client' */
192
196
  /**
193
197
  * Use this variable to guard everything related to hydration code so it can be treeshaken out
@@ -246,7 +250,7 @@ function skip_nodes(remove = true) {
246
250
  }
247
251
  }
248
252
  //#endregion
249
- //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/reactivity/equality.js
253
+ //#region ../../../node_modules/.bun/svelte@5.56.1/node_modules/svelte/src/internal/client/reactivity/equality.js
250
254
  /** @import { Equals } from '#client' */
251
255
  /** @type {Equals} */
252
256
  function equals(value) {
@@ -265,13 +269,13 @@ function safe_equals(value) {
265
269
  return !safe_not_equal(value, this.v);
266
270
  }
267
271
  //#endregion
268
- //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/flags/index.js
272
+ //#region ../../../node_modules/.bun/svelte@5.56.1/node_modules/svelte/src/internal/flags/index.js
269
273
  /** True if experimental.async=true */
270
274
  var async_mode_flag = false;
271
275
  /** True if we're not certain that we only have Svelte 5 code in the compilation */
272
276
  var legacy_mode_flag = false;
273
277
  //#endregion
274
- //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/context.js
278
+ //#region ../../../node_modules/.bun/svelte@5.56.1/node_modules/svelte/src/internal/client/context.js
275
279
  /** @import { ComponentContext, DevStackEntry, Effect } from '#client' */
276
280
  /** @type {ComponentContext | null} */
277
281
  var component_context = null;
@@ -323,7 +327,7 @@ function is_runes() {
323
327
  return !legacy_mode_flag || component_context !== null && component_context.l === null;
324
328
  }
325
329
  //#endregion
326
- //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/dom/task.js
330
+ //#region ../../../node_modules/.bun/svelte@5.56.1/node_modules/svelte/src/internal/client/dom/task.js
327
331
  /** @type {Array<() => void>} */
328
332
  var micro_tasks = [];
329
333
  function run_micro_tasks() {
@@ -381,7 +385,7 @@ function invoke_error_boundary(error, effect) {
381
385
  throw error;
382
386
  }
383
387
  //#endregion
384
- //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/reactivity/status.js
388
+ //#region ../../../node_modules/.bun/svelte@5.56.1/node_modules/svelte/src/internal/client/reactivity/status.js
385
389
  /** @import { Derived, Signal } from '#client' */
386
390
  var STATUS_MASK = ~(DIRTY | MAYBE_DIRTY | CLEAN);
387
391
  /**
@@ -400,7 +404,7 @@ function update_derived_status(derived) {
400
404
  else set_signal_status(derived, MAYBE_DIRTY);
401
405
  }
402
406
  //#endregion
403
- //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/reactivity/utils.js
407
+ //#region ../../../node_modules/.bun/svelte@5.56.1/node_modules/svelte/src/internal/client/reactivity/utils.js
404
408
  /** @import { Derived, Effect, Value } from '#client' */
405
409
  /**
406
410
  * @param {Value[] | null} deps
@@ -428,7 +432,7 @@ function defer_effect(effect, dirty_effects, maybe_dirty_effects) {
428
432
  set_signal_status(effect, CLEAN);
429
433
  }
430
434
  //#endregion
431
- //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/reactivity/store.js
435
+ //#region ../../../node_modules/.bun/svelte@5.56.1/node_modules/svelte/src/internal/client/reactivity/store.js
432
436
  /**
433
437
  * We set this to `true` when updating a store so that we correctly
434
438
  * schedule effects if the update takes place inside a `$:` effect
@@ -458,46 +462,53 @@ function capture_store_binding(fn) {
458
462
  }
459
463
  }
460
464
  //#endregion
461
- //#region \0@oxc-project+runtime@0.129.0/helpers/checkPrivateRedeclaration.js
465
+ //#region \0@oxc-project+runtime@0.133.0/helpers/esm/checkPrivateRedeclaration.js
462
466
  function _checkPrivateRedeclaration(e, t) {
463
467
  if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object");
464
468
  }
465
469
  //#endregion
466
- //#region \0@oxc-project+runtime@0.129.0/helpers/classPrivateMethodInitSpec.js
470
+ //#region \0@oxc-project+runtime@0.133.0/helpers/esm/classPrivateMethodInitSpec.js
467
471
  function _classPrivateMethodInitSpec(e, a) {
468
472
  _checkPrivateRedeclaration(e, a), a.add(e);
469
473
  }
470
474
  //#endregion
471
- //#region \0@oxc-project+runtime@0.129.0/helpers/classPrivateFieldInitSpec.js
475
+ //#region \0@oxc-project+runtime@0.133.0/helpers/esm/classPrivateFieldInitSpec.js
472
476
  function _classPrivateFieldInitSpec(e, t, a) {
473
477
  _checkPrivateRedeclaration(e, t), t.set(e, a);
474
478
  }
475
479
  //#endregion
476
- //#region \0@oxc-project+runtime@0.129.0/helpers/assertClassBrand.js
480
+ //#region \0@oxc-project+runtime@0.133.0/helpers/esm/assertClassBrand.js
477
481
  function _assertClassBrand(e, t, n) {
478
482
  if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n;
479
483
  throw new TypeError("Private element is not present on this object");
480
484
  }
481
485
  //#endregion
482
- //#region \0@oxc-project+runtime@0.129.0/helpers/classPrivateFieldGet2.js
483
- function _classPrivateFieldGet2(s, a) {
484
- return s.get(_assertClassBrand(s, a));
485
- }
486
- //#endregion
487
- //#region \0@oxc-project+runtime@0.129.0/helpers/classPrivateFieldSet2.js
486
+ //#region \0@oxc-project+runtime@0.133.0/helpers/esm/classPrivateFieldSet2.js
488
487
  function _classPrivateFieldSet2(s, a, r) {
489
488
  return s.set(_assertClassBrand(s, a), r), r;
490
489
  }
491
490
  //#endregion
492
- //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/reactivity/batch.js
491
+ //#region \0@oxc-project+runtime@0.133.0/helpers/esm/classPrivateFieldGet2.js
492
+ function _classPrivateFieldGet2(s, a) {
493
+ return s.get(_assertClassBrand(s, a));
494
+ }
495
+ //#endregion
496
+ //#region ../../../node_modules/.bun/svelte@5.56.1/node_modules/svelte/src/internal/client/reactivity/batch.js
493
497
  /** @import { Fork } from 'svelte' */
494
498
  /** @import { Derived, Effect, Reaction, Source, Value } from '#client' */
495
499
  var _Batch;
496
- /** @type {Set<Batch>} */
497
- var batches = /* @__PURE__ */ new Set();
500
+ /** @type {Batch | null} */
501
+ var first_batch = null;
502
+ /** @type {Batch | null} */
503
+ var last_batch = null;
498
504
  /** @type {Batch | null} */
499
505
  var current_batch = null;
500
506
  /**
507
+ * This is needed to avoid overwriting inputs
508
+ * @type {Batch | null}
509
+ */
510
+ var previous_batch = null;
511
+ /**
501
512
  * When time travelling (i.e. working in one batch, while other batches
502
513
  * still have ongoing work), we ignore the real values of affected
503
514
  * signals in favour of their values within the batch
@@ -525,9 +536,11 @@ var collected_effects = null;
525
536
  var legacy_updates = null;
526
537
  var flush_count = 0;
527
538
  var uid = 1;
539
+ var _started = /* @__PURE__ */ new WeakMap();
540
+ var _prev = /* @__PURE__ */ new WeakMap();
541
+ var _next = /* @__PURE__ */ new WeakMap();
528
542
  var _commit_callbacks = /* @__PURE__ */ new WeakMap();
529
543
  var _discard_callbacks = /* @__PURE__ */ new WeakMap();
530
- var _fork_commit_callbacks = /* @__PURE__ */ new WeakMap();
531
544
  var _pending = /* @__PURE__ */ new WeakMap();
532
545
  var _blocking_pending = /* @__PURE__ */ new WeakMap();
533
546
  var _deferred = /* @__PURE__ */ new WeakMap();
@@ -538,12 +551,21 @@ var _maybe_dirty_effects$1 = /* @__PURE__ */ new WeakMap();
538
551
  var _skipped_branches = /* @__PURE__ */ new WeakMap();
539
552
  var _unskipped_branches = /* @__PURE__ */ new WeakMap();
540
553
  var _decrement_queued = /* @__PURE__ */ new WeakMap();
541
- var _blockers = /* @__PURE__ */ new WeakMap();
542
554
  var _Batch_brand = /* @__PURE__ */ new WeakSet();
543
555
  var Batch = class Batch {
544
556
  constructor() {
545
557
  _classPrivateMethodInitSpec(this, _Batch_brand);
546
558
  _defineProperty(this, "id", uid++);
559
+ _classPrivateFieldInitSpec(this, _started, false);
560
+ _defineProperty(this, "linked", true);
561
+ _classPrivateFieldInitSpec(this, _prev, null);
562
+ _classPrivateFieldInitSpec(this, _next, null);
563
+ _defineProperty(
564
+ this,
565
+ /** @type {Map<Effect, ReturnType<typeof deferred<any>>>} */
566
+ "async_deriveds",
567
+ /* @__PURE__ */ new Map()
568
+ );
547
569
  _defineProperty(
548
570
  this,
549
571
  /**
@@ -567,8 +589,7 @@ var Batch = class Batch {
567
589
  );
568
590
  _classPrivateFieldInitSpec(this, _commit_callbacks, /* @__PURE__ */ new Set());
569
591
  _classPrivateFieldInitSpec(this, _discard_callbacks, /* @__PURE__ */ new Set());
570
- _classPrivateFieldInitSpec(this, _fork_commit_callbacks, /* @__PURE__ */ new Set());
571
- _classPrivateFieldInitSpec(this, _pending, /* @__PURE__ */ new Map());
592
+ _classPrivateFieldInitSpec(this, _pending, 0);
572
593
  _classPrivateFieldInitSpec(this, _blocking_pending, /* @__PURE__ */ new Map());
573
594
  _classPrivateFieldInitSpec(this, _deferred, null);
574
595
  _classPrivateFieldInitSpec(this, _roots, []);
@@ -579,7 +600,12 @@ var Batch = class Batch {
579
600
  _classPrivateFieldInitSpec(this, _unskipped_branches, /* @__PURE__ */ new Set());
580
601
  _defineProperty(this, "is_fork", false);
581
602
  _classPrivateFieldInitSpec(this, _decrement_queued, false);
582
- _classPrivateFieldInitSpec(this, _blockers, /* @__PURE__ */ new Set());
603
+ if (last_batch === null) first_batch = last_batch = this;
604
+ else {
605
+ _classPrivateFieldSet2(_next, last_batch, this);
606
+ _classPrivateFieldSet2(_prev, this, last_batch);
607
+ }
608
+ last_batch = this;
583
609
  }
584
610
  /**
585
611
  * Add an effect to the #skipped_branches map and reset its children
@@ -654,8 +680,8 @@ var Batch = class Batch {
654
680
  discard() {
655
681
  for (const fn of _classPrivateFieldGet2(_discard_callbacks, this)) fn(this);
656
682
  _classPrivateFieldGet2(_discard_callbacks, this).clear();
657
- _classPrivateFieldGet2(_fork_commit_callbacks, this).clear();
658
- batches.delete(this);
683
+ _assertClassBrand(_Batch_brand, this, _unlink).call(this);
684
+ _classPrivateFieldGet2(_deferred, this)?.resolve();
659
685
  }
660
686
  /**
661
687
  * @param {Effect} effect
@@ -668,8 +694,7 @@ var Batch = class Batch {
668
694
  * @param {Effect} effect
669
695
  */
670
696
  increment(blocking, effect) {
671
- let pending_count = _classPrivateFieldGet2(_pending, this).get(effect) ?? 0;
672
- _classPrivateFieldGet2(_pending, this).set(effect, pending_count + 1);
697
+ _classPrivateFieldSet2(_pending, this, _classPrivateFieldGet2(_pending, this) + 1);
673
698
  if (blocking) {
674
699
  let blocking_pending_count = _classPrivateFieldGet2(_blocking_pending, this).get(effect) ?? 0;
675
700
  _classPrivateFieldGet2(_blocking_pending, this).set(effect, blocking_pending_count + 1);
@@ -678,22 +703,19 @@ var Batch = class Batch {
678
703
  /**
679
704
  * @param {boolean} blocking
680
705
  * @param {Effect} effect
681
- * @param {boolean} skip - whether to skip updates (because this is triggered by a stale reaction)
682
706
  */
683
- decrement(blocking, effect, skip) {
684
- let pending_count = _classPrivateFieldGet2(_pending, this).get(effect) ?? 0;
685
- if (pending_count === 1) _classPrivateFieldGet2(_pending, this).delete(effect);
686
- else _classPrivateFieldGet2(_pending, this).set(effect, pending_count - 1);
707
+ decrement(blocking, effect) {
708
+ _classPrivateFieldSet2(_pending, this, _classPrivateFieldGet2(_pending, this) - 1);
687
709
  if (blocking) {
688
710
  let blocking_pending_count = _classPrivateFieldGet2(_blocking_pending, this).get(effect) ?? 0;
689
711
  if (blocking_pending_count === 1) _classPrivateFieldGet2(_blocking_pending, this).delete(effect);
690
712
  else _classPrivateFieldGet2(_blocking_pending, this).set(effect, blocking_pending_count - 1);
691
713
  }
692
- if (_classPrivateFieldGet2(_decrement_queued, this) || skip) return;
714
+ if (_classPrivateFieldGet2(_decrement_queued, this)) return;
693
715
  _classPrivateFieldSet2(_decrement_queued, this, true);
694
716
  queue_micro_task(() => {
695
717
  _classPrivateFieldSet2(_decrement_queued, this, false);
696
- this.flush();
718
+ if (this.linked) this.flush();
697
719
  });
698
720
  }
699
721
  /**
@@ -714,48 +736,38 @@ var Batch = class Batch {
714
736
  ondiscard(fn) {
715
737
  _classPrivateFieldGet2(_discard_callbacks, this).add(fn);
716
738
  }
717
- /** @param {(batch: Batch) => void} fn */
718
- on_fork_commit(fn) {
719
- _classPrivateFieldGet2(_fork_commit_callbacks, this).add(fn);
720
- }
721
- run_fork_commit_callbacks() {
722
- for (const fn of _classPrivateFieldGet2(_fork_commit_callbacks, this)) fn(this);
723
- _classPrivateFieldGet2(_fork_commit_callbacks, this).clear();
724
- }
725
739
  settled() {
726
740
  return (_classPrivateFieldGet2(_deferred, this) ?? _classPrivateFieldSet2(_deferred, this, deferred())).promise;
727
741
  }
728
742
  static ensure() {
729
743
  if (current_batch === null) {
730
744
  const batch = current_batch = new Batch();
731
- if (!is_processing) {
732
- batches.add(current_batch);
733
- if (!is_flushing_sync) queue_micro_task(() => {
734
- if (current_batch !== batch) return;
735
- batch.flush();
736
- });
737
- }
745
+ if (!is_processing && !is_flushing_sync) queue_micro_task(() => {
746
+ if (!_classPrivateFieldGet2(_started, batch)) batch.flush();
747
+ });
738
748
  }
739
749
  return current_batch;
740
750
  }
741
751
  apply() {
742
- if (!async_mode_flag || !this.is_fork && batches.size === 1) {
752
+ if (!async_mode_flag || !this.is_fork && _classPrivateFieldGet2(_prev, this) === null && _classPrivateFieldGet2(_next, this) === null) {
743
753
  batch_values = null;
744
754
  return;
745
755
  }
746
756
  batch_values = /* @__PURE__ */ new Map();
747
757
  for (const [source, [value]] of this.current) batch_values.set(source, value);
748
- for (const batch of batches) {
758
+ for (let batch = first_batch; batch !== null; batch = _classPrivateFieldGet2(_next, batch)) {
749
759
  if (batch === this || batch.is_fork) continue;
750
760
  var intersects = false;
751
- var differs = false;
752
761
  if (batch.id < this.id) for (const [source, [, is_derived]] of batch.current) {
753
762
  if (is_derived) continue;
754
- intersects || (intersects = this.current.has(source));
755
- differs || (differs = !this.current.has(source));
763
+ if (this.current.has(source)) {
764
+ intersects = true;
765
+ break;
766
+ }
767
+ }
768
+ if (!intersects) {
769
+ for (const [source, previous] of batch.previous) if (!batch_values.has(source)) batch_values.set(source, previous);
756
770
  }
757
- if (intersects && differs) _classPrivateFieldGet2(_blockers, this).add(batch);
758
- else for (const [source, previous] of batch.previous) if (!batch_values.has(source)) batch_values.set(source, previous);
759
771
  }
760
772
  }
761
773
  /**
@@ -786,12 +798,10 @@ var Batch = class Batch {
786
798
  };
787
799
  _Batch = Batch;
788
800
  function _is_deferred() {
789
- return this.is_fork || _classPrivateFieldGet2(_blocking_pending, this).size > 0;
790
- }
791
- function _is_blocked() {
792
- for (const batch of _classPrivateFieldGet2(_blockers, this)) for (const effect of _classPrivateFieldGet2(_blocking_pending, batch).keys()) {
793
- var skipped = false;
801
+ if (this.is_fork) return true;
802
+ for (const effect of _classPrivateFieldGet2(_blocking_pending, this).keys()) {
794
803
  var e = effect;
804
+ var skipped = false;
795
805
  while (e.parent !== null) {
796
806
  if (_classPrivateFieldGet2(_skipped_branches, this).has(e)) {
797
807
  skipped = true;
@@ -804,20 +814,19 @@ function _is_blocked() {
804
814
  return false;
805
815
  }
806
816
  function _process() {
817
+ _classPrivateFieldSet2(_started, this, true);
807
818
  if (flush_count++ > 1e3) {
808
- batches.delete(this);
819
+ _assertClassBrand(_Batch_brand, this, _unlink).call(this);
809
820
  infinite_loop_guard();
810
821
  }
811
- if (!_assertClassBrand(_Batch_brand, this, _is_deferred).call(this)) {
812
- for (const e of _classPrivateFieldGet2(_dirty_effects$1, this)) {
813
- _classPrivateFieldGet2(_maybe_dirty_effects$1, this).delete(e);
814
- set_signal_status(e, DIRTY);
815
- this.schedule(e);
816
- }
817
- for (const e of _classPrivateFieldGet2(_maybe_dirty_effects$1, this)) {
818
- set_signal_status(e, MAYBE_DIRTY);
819
- this.schedule(e);
820
- }
822
+ for (const e of _classPrivateFieldGet2(_dirty_effects$1, this)) {
823
+ _classPrivateFieldGet2(_maybe_dirty_effects$1, this).delete(e);
824
+ set_signal_status(e, DIRTY);
825
+ this.schedule(e);
826
+ }
827
+ for (const e of _classPrivateFieldGet2(_maybe_dirty_effects$1, this)) {
828
+ set_signal_status(e, MAYBE_DIRTY);
829
+ this.schedule(e);
821
830
  }
822
831
  const roots = _classPrivateFieldGet2(_roots, this);
823
832
  _classPrivateFieldSet2(_roots, this, []);
@@ -835,6 +844,7 @@ function _process() {
835
844
  _assertClassBrand(_Batch_brand, this, _traverse).call(this, root, effects, render_effects);
836
845
  } catch (e) {
837
846
  reset_all(root);
847
+ if (!_assertClassBrand(_Batch_brand, this, _is_deferred).call(this)) this.discard();
838
848
  throw e;
839
849
  }
840
850
  current_batch = null;
@@ -844,30 +854,43 @@ function _process() {
844
854
  }
845
855
  collected_effects = null;
846
856
  legacy_updates = null;
847
- if (_assertClassBrand(_Batch_brand, this, _is_deferred).call(this) || _assertClassBrand(_Batch_brand, this, _is_blocked).call(this)) {
857
+ if (_assertClassBrand(_Batch_brand, this, _is_deferred).call(this)) {
848
858
  _assertClassBrand(_Batch_brand, this, _defer_effects).call(this, render_effects);
849
859
  _assertClassBrand(_Batch_brand, this, _defer_effects).call(this, effects);
850
860
  for (const [e, t] of _classPrivateFieldGet2(_skipped_branches, this)) reset_branch(e, t);
851
- } else {
852
- if (_classPrivateFieldGet2(_pending, this).size === 0) batches.delete(this);
853
- _classPrivateFieldGet2(_dirty_effects$1, this).clear();
854
- _classPrivateFieldGet2(_maybe_dirty_effects$1, this).clear();
855
- for (const fn of _classPrivateFieldGet2(_commit_callbacks, this)) fn(this);
856
- _classPrivateFieldGet2(_commit_callbacks, this).clear();
857
- flush_queued_effects(render_effects);
858
- flush_queued_effects(effects);
859
- _classPrivateFieldGet2(_deferred, this)?.resolve();
861
+ if (updates.length > 0)
862
+ /** @type {Batch} */ _assertClassBrand(_Batch_brand, current_batch, _process).call(current_batch);
863
+ return;
860
864
  }
861
- var next_batch = current_batch;
862
- if (_classPrivateFieldGet2(_roots, this).length > 0) {
863
- const batch = next_batch ?? (next_batch = this);
864
- _classPrivateFieldGet2(_roots, batch).push(..._classPrivateFieldGet2(_roots, this).filter((r) => !_classPrivateFieldGet2(_roots, batch).includes(r)));
865
+ const earlier_batch = _assertClassBrand(_Batch_brand, this, _find_earlier_batch).call(this);
866
+ if (earlier_batch) {
867
+ _assertClassBrand(_Batch_brand, this, _defer_effects).call(this, render_effects);
868
+ _assertClassBrand(_Batch_brand, this, _defer_effects).call(this, effects);
869
+ _assertClassBrand(_Batch_brand, earlier_batch, _merge).call(earlier_batch, this);
870
+ return;
865
871
  }
866
- if (next_batch !== null) {
867
- batches.add(next_batch);
868
- _assertClassBrand(_Batch_brand, next_batch, _process).call(next_batch);
872
+ _classPrivateFieldGet2(_dirty_effects$1, this).clear();
873
+ _classPrivateFieldGet2(_maybe_dirty_effects$1, this).clear();
874
+ for (const fn of _classPrivateFieldGet2(_commit_callbacks, this)) fn(this);
875
+ _classPrivateFieldGet2(_commit_callbacks, this).clear();
876
+ previous_batch = this;
877
+ flush_queued_effects(render_effects);
878
+ flush_queued_effects(effects);
879
+ previous_batch = null;
880
+ _classPrivateFieldGet2(_deferred, this)?.resolve();
881
+ var next_batch = current_batch;
882
+ if (_classPrivateFieldGet2(_pending, this) === 0 && (_classPrivateFieldGet2(_roots, this).length === 0 || next_batch !== null)) {
883
+ _assertClassBrand(_Batch_brand, this, _unlink).call(this);
884
+ if (async_mode_flag) {
885
+ _assertClassBrand(_Batch_brand, this, _commit).call(this);
886
+ current_batch = next_batch;
887
+ }
869
888
  }
870
- if (async_mode_flag && !batches.has(this)) _assertClassBrand(_Batch_brand, this, _commit).call(this);
889
+ if (_classPrivateFieldGet2(_roots, this).length > 0) if (next_batch !== null) {
890
+ const batch = next_batch;
891
+ _classPrivateFieldGet2(_roots, batch).push(..._classPrivateFieldGet2(_roots, this).filter((r) => !_classPrivateFieldGet2(_roots, batch).includes(r)));
892
+ } else next_batch = this;
893
+ if (next_batch !== null) _assertClassBrand(_Batch_brand, next_batch, _process).call(next_batch);
871
894
  }
872
895
  /**
873
896
  * Traverse the effect tree, executing effects or stashing
@@ -906,6 +929,59 @@ function _traverse(root, effects, render_effects) {
906
929
  }
907
930
  }
908
931
  }
932
+ function _find_earlier_batch() {
933
+ var batch = _classPrivateFieldGet2(_prev, this);
934
+ while (batch !== null) {
935
+ if (!batch.is_fork) {
936
+ for (const [value, [, is_derived]] of this.current) if (batch.current.has(value) && !is_derived) return batch;
937
+ }
938
+ batch = _classPrivateFieldGet2(_prev, batch);
939
+ }
940
+ return null;
941
+ }
942
+ /**
943
+ * @param {Batch} batch
944
+ */
945
+ function _merge(batch) {
946
+ for (const [source, value] of batch.current) {
947
+ if (!this.previous.has(source) && batch.previous.has(source)) this.previous.set(source, batch.previous.get(source));
948
+ this.current.set(source, value);
949
+ }
950
+ for (const [effect, deferred] of batch.async_deriveds) {
951
+ const d = this.async_deriveds.get(effect);
952
+ if (d) deferred.promise.then(d.resolve).catch(d.reject);
953
+ }
954
+ this.transfer_effects(_classPrivateFieldGet2(_dirty_effects$1, batch), _classPrivateFieldGet2(_maybe_dirty_effects$1, batch));
955
+ /**
956
+ * mark all effects that depend on `batch.current`, except the
957
+ * async effects that we just resolved (TODO unless they depend
958
+ * on values in this batch that are NOT in the later batch?).
959
+ * Through this we also will populate the correct #skipped_branches,
960
+ * oncommit callbacks etc, so we don't need to merge them separately.
961
+ * @param {Value} value
962
+ */
963
+ const mark = (value) => {
964
+ var reactions = value.reactions;
965
+ if (reactions === null) return;
966
+ for (const reaction of reactions) {
967
+ var flags = reaction.f;
968
+ if ((flags & 2) !== 0) mark(reaction);
969
+ else {
970
+ var effect = reaction;
971
+ if (flags & 4194320 && !this.async_deriveds.has(effect)) {
972
+ _classPrivateFieldGet2(_maybe_dirty_effects$1, this).delete(effect);
973
+ set_signal_status(effect, DIRTY);
974
+ this.schedule(effect);
975
+ }
976
+ }
977
+ }
978
+ };
979
+ for (const source of this.current.keys()) mark(source);
980
+ this.oncommit(() => batch.discard());
981
+ _assertClassBrand(_Batch_brand, batch, _unlink).call(batch);
982
+ current_batch = this;
983
+ _assertClassBrand(_Batch_brand, this, _process).call(this);
984
+ }
909
985
  /**
910
986
  * @param {Effect[]} effects
911
987
  */
@@ -913,7 +989,7 @@ function _defer_effects(effects) {
913
989
  for (var i = 0; i < effects.length; i += 1) defer_effect(effects[i], _classPrivateFieldGet2(_dirty_effects$1, this), _classPrivateFieldGet2(_maybe_dirty_effects$1, this));
914
990
  }
915
991
  function _commit() {
916
- for (const batch of batches) {
992
+ for (let batch = first_batch; batch !== null; batch = _classPrivateFieldGet2(_next, batch)) {
917
993
  var is_earlier = batch.id < this.id;
918
994
  /** @type {Source[]} */
919
995
  var sources = [];
@@ -925,7 +1001,12 @@ function _commit() {
925
1001
  }
926
1002
  sources.push(source);
927
1003
  }
928
- var others = [...batch.current.keys()].filter((s) => !this.current.has(s));
1004
+ if (is_earlier) for (const [effect, deferred] of this.async_deriveds) {
1005
+ const d = batch.async_deriveds.get(effect);
1006
+ if (d) deferred.promise.then(d.resolve).catch(d.reject);
1007
+ }
1008
+ if (!_classPrivateFieldGet2(_started, batch)) continue;
1009
+ var others = [...batch.current.keys()].filter((s) => !batch.current.get(s)[1] && !this.current.has(s));
929
1010
  if (others.length === 0) {
930
1011
  if (is_earlier) batch.discard();
931
1012
  } else if (sources.length > 0) {
@@ -940,12 +1021,18 @@ function _commit() {
940
1021
  var checked = /* @__PURE__ */ new Map();
941
1022
  for (var source of sources) mark_effects(source, others, marked, checked);
942
1023
  checked = /* @__PURE__ */ new Map();
943
- var current_unequal = [...batch.current.keys()].filter((c) => this.current.has(c) ? this.current.get(c)[0] !== c : true);
944
- for (const effect of _classPrivateFieldGet2(_new_effects, this)) if ((effect.f & 155648) === 0 && depends_on(effect, current_unequal, checked)) if ((effect.f & 4194320) !== 0) {
945
- set_signal_status(effect, DIRTY);
946
- batch.schedule(effect);
947
- } else _classPrivateFieldGet2(_dirty_effects$1, batch).add(effect);
948
- if (_classPrivateFieldGet2(_roots, batch).length > 0) {
1024
+ var current_unequal = [...batch.current].filter(([c, v1]) => {
1025
+ const v2 = this.current.get(c);
1026
+ if (!v2) return true;
1027
+ return v2[0] !== v1[0] || v2[1] !== v1[1];
1028
+ }).map(([c]) => c);
1029
+ if (current_unequal.length > 0) {
1030
+ for (const effect of _classPrivateFieldGet2(_new_effects, this)) if ((effect.f & 155648) === 0 && depends_on(effect, current_unequal, checked)) if ((effect.f & 4194320) !== 0) {
1031
+ set_signal_status(effect, DIRTY);
1032
+ batch.schedule(effect);
1033
+ } else _classPrivateFieldGet2(_dirty_effects$1, batch).add(effect);
1034
+ }
1035
+ if (_classPrivateFieldGet2(_roots, batch).length > 0 && !_classPrivateFieldGet2(_decrement_queued, batch)) {
949
1036
  batch.apply();
950
1037
  for (var root of _classPrivateFieldGet2(_roots, batch)) _assertClassBrand(_Batch_brand, batch, _traverse).call(batch, root, [], []);
951
1038
  _classPrivateFieldSet2(_roots, batch, []);
@@ -953,13 +1040,16 @@ function _commit() {
953
1040
  batch.deactivate();
954
1041
  }
955
1042
  }
956
- for (const batch of batches) if (_classPrivateFieldGet2(_blockers, batch).has(this)) {
957
- _classPrivateFieldGet2(_blockers, batch).delete(this);
958
- if (_classPrivateFieldGet2(_blockers, batch).size === 0 && !_assertClassBrand(_Batch_brand, batch, _is_deferred).call(batch)) {
959
- batch.activate();
960
- _assertClassBrand(_Batch_brand, batch, _process).call(batch);
961
- }
962
- }
1043
+ }
1044
+ function _unlink() {
1045
+ if (!this.linked) return;
1046
+ var prev = _classPrivateFieldGet2(_prev, this);
1047
+ var next = _classPrivateFieldGet2(_next, this);
1048
+ if (prev === null) first_batch = next;
1049
+ else _classPrivateFieldSet2(_next, prev, next);
1050
+ if (next === null) last_batch = prev;
1051
+ else _classPrivateFieldSet2(_prev, next, prev);
1052
+ this.linked = false;
963
1053
  }
964
1054
  /**
965
1055
  * Synchronously flush any pending updates.
@@ -1112,7 +1202,7 @@ function reset_all(effect) {
1112
1202
  }
1113
1203
  }
1114
1204
  //#endregion
1115
- //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/reactivity/create-subscriber.js
1205
+ //#region ../../../node_modules/.bun/svelte@5.56.1/node_modules/svelte/src/reactivity/create-subscriber.js
1116
1206
  /**
1117
1207
  * Returns a `subscribe` function that integrates external event-based systems with Svelte's reactivity.
1118
1208
  * It's particularly useful for integrating with web APIs like `MediaQuery`, `IntersectionObserver`, or `WebSocket`.
@@ -1185,13 +1275,13 @@ function createSubscriber(start) {
1185
1275
  };
1186
1276
  }
1187
1277
  //#endregion
1188
- //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/dom/blocks/boundary.js
1278
+ //#region ../../../node_modules/.bun/svelte@5.56.1/node_modules/svelte/src/internal/client/dom/blocks/boundary.js
1189
1279
  /** @import { Effect, Source, TemplateNode, } from '#client' */
1190
1280
  /**
1191
1281
  * @typedef {{
1192
- * onerror?: (error: unknown, reset: () => void) => void;
1193
- * failed?: (anchor: Node, error: () => unknown, reset: () => () => void) => void;
1194
- * pending?: (anchor: Node) => void;
1282
+ * onerror?: ((error: unknown, reset: () => void) => void) | null;
1283
+ * failed?: ((anchor: Node, error: () => unknown, reset: () => () => void) => void) | null;
1284
+ * pending?: ((anchor: Node) => void) | null;
1195
1285
  * }} BoundaryProps
1196
1286
  */
1197
1287
  var flags = EFFECT_TRANSPARENT | EFFECT_PRESERVED;
@@ -1338,7 +1428,7 @@ var Boundary = class {
1338
1428
  if (_classPrivateFieldGet2(_main_effect, this)) current_batch.skip_effect(_classPrivateFieldGet2(_main_effect, this));
1339
1429
  if (_classPrivateFieldGet2(_pending_effect, this)) current_batch.skip_effect(_classPrivateFieldGet2(_pending_effect, this));
1340
1430
  if (_classPrivateFieldGet2(_failed_effect, this)) current_batch.skip_effect(_classPrivateFieldGet2(_failed_effect, this));
1341
- current_batch.on_fork_commit(() => {
1431
+ current_batch.oncommit(() => {
1342
1432
  _assertClassBrand(_Boundary_brand, this, _handle_error).call(this, error);
1343
1433
  });
1344
1434
  } else _assertClassBrand(_Boundary_brand, this, _handle_error).call(this, error);
@@ -1542,7 +1632,7 @@ function _handle_error(error) {
1542
1632
  * @param {() => V} fn
1543
1633
  * @returns {Derived<V>}
1544
1634
  */
1545
- /* @__NO_SIDE_EFFECTS__ */
1635
+ /*#__NO_SIDE_EFFECTS__*/
1546
1636
  function derived(fn) {
1547
1637
  var flags = 2 | DIRTY;
1548
1638
  if (active_effect !== null) active_effect.f |= EFFECT_PRESERVED;
@@ -1566,7 +1656,7 @@ function derived(fn) {
1566
1656
  * @param {() => V} fn
1567
1657
  * @returns {Derived<V>}
1568
1658
  */
1569
- /* @__NO_SIDE_EFFECTS__ */
1659
+ /*#__NO_SIDE_EFFECTS__*/
1570
1660
  function derived_safe_equal(fn) {
1571
1661
  const signal = /* @__PURE__ */ derived(fn);
1572
1662
  signal.equals = safe_equals;
@@ -1592,7 +1682,7 @@ function execute_derived(derived) {
1592
1682
  var value;
1593
1683
  var prev_active_effect = active_effect;
1594
1684
  var parent = derived.parent;
1595
- if (!is_destroying_effect && parent !== null && (parent.f & 24576) !== 0) {
1685
+ if (!is_destroying_effect && parent !== null && derived.v !== UNINITIALIZED && (parent.f & 24576) !== 0) {
1596
1686
  derived_inert();
1597
1687
  return derived.v;
1598
1688
  }
@@ -1615,8 +1705,10 @@ function update_derived(derived) {
1615
1705
  if (!derived.equals(value)) {
1616
1706
  derived.wv = increment_write_version();
1617
1707
  if (!current_batch?.is_fork || derived.deps === null) {
1618
- if (current_batch !== null) current_batch.capture(derived, value, true);
1619
- else derived.v = value;
1708
+ if (current_batch !== null) {
1709
+ current_batch.capture(derived, value, true);
1710
+ previous_batch?.capture(derived, value, true);
1711
+ } else derived.v = value;
1620
1712
  if (derived.deps === null) {
1621
1713
  set_signal_status(derived, CLEAN);
1622
1714
  return;
@@ -1636,7 +1728,7 @@ function freeze_derived_effects(derived) {
1636
1728
  for (const e of derived.effects) if (e.teardown || e.ac) {
1637
1729
  e.teardown?.();
1638
1730
  e.ac?.abort(STALE_REACTION);
1639
- e.teardown = noop;
1731
+ if (e.fn !== null) e.teardown = noop;
1640
1732
  e.ac = null;
1641
1733
  remove_reactions(e, 0);
1642
1734
  destroy_effect_children(e);
@@ -1647,12 +1739,12 @@ function freeze_derived_effects(derived) {
1647
1739
  */
1648
1740
  function unfreeze_derived_effects(derived) {
1649
1741
  if (derived.effects === null) return;
1650
- for (const e of derived.effects) if (e.teardown) update_effect(e);
1742
+ for (const e of derived.effects) if (e.teardown && e.fn !== null) update_effect(e);
1651
1743
  }
1652
1744
  //#endregion
1653
- //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/reactivity/sources.js
1745
+ //#region ../../../node_modules/.bun/svelte@5.56.1/node_modules/svelte/src/internal/client/reactivity/sources.js
1654
1746
  /** @import { Derived, Effect, Source, Value } from '#client' */
1655
- /** @type {Set<any>} */
1747
+ /** @type {Set<Effect>} */
1656
1748
  var eager_effects = /* @__PURE__ */ new Set();
1657
1749
  /** @type {Map<Source, any>} */
1658
1750
  var old_values = /* @__PURE__ */ new Map();
@@ -1678,7 +1770,7 @@ function source(v, stack) {
1678
1770
  * @param {V} v
1679
1771
  * @param {Error | null} [stack]
1680
1772
  */
1681
- /* @__NO_SIDE_EFFECTS__ */
1773
+ /*#__NO_SIDE_EFFECTS__*/
1682
1774
  function state(v, stack) {
1683
1775
  const s = source(v, stack);
1684
1776
  push_reaction_value(s);
@@ -1690,7 +1782,7 @@ function state(v, stack) {
1690
1782
  * @param {boolean} [immutable]
1691
1783
  * @returns {Source<V>}
1692
1784
  */
1693
- /* @__NO_SIDE_EFFECTS__ */
1785
+ /*#__NO_SIDE_EFFECTS__*/
1694
1786
  function mutable_source(initial_value, immutable = false, trackable = true) {
1695
1787
  const s = source(initial_value);
1696
1788
  if (!immutable) s.equals = safe_equals;
@@ -1708,7 +1800,7 @@ function mutable_source(initial_value, immutable = false, trackable = true) {
1708
1800
  * @returns {V}
1709
1801
  */
1710
1802
  function set(source, value, should_proxy = false) {
1711
- if (active_reaction !== null && (!untracking || (active_reaction.f & 131072) !== 0) && is_runes() && (active_reaction.f & 4325394) !== 0 && (current_sources === null || !includes.call(current_sources, source))) state_unsafe_mutation();
1803
+ if (active_reaction !== null && (!untracking || (active_reaction.f & 131072) !== 0) && is_runes() && (active_reaction.f & 4325394) !== 0 && (current_sources === null || !current_sources.has(source))) state_unsafe_mutation();
1712
1804
  return internal_set(source, should_proxy ? proxy(value) : value, legacy_updates);
1713
1805
  }
1714
1806
  /**
@@ -1740,7 +1832,13 @@ function flush_eager_effects() {
1740
1832
  eager_effects_deferred = false;
1741
1833
  for (const effect of eager_effects) {
1742
1834
  if ((effect.f & 1024) !== 0) set_signal_status(effect, MAYBE_DIRTY);
1743
- if (is_dirty(effect)) update_effect(effect);
1835
+ let dirty;
1836
+ try {
1837
+ dirty = is_dirty(effect);
1838
+ } catch {
1839
+ dirty = true;
1840
+ }
1841
+ if (dirty) update_effect(effect);
1744
1842
  }
1745
1843
  eager_effects.clear();
1746
1844
  }
@@ -1768,7 +1866,8 @@ function mark_reactions(signal, status, updated_during_traversal) {
1768
1866
  if (!runes && reaction === active_effect) continue;
1769
1867
  var not_dirty = (flags & DIRTY) === 0;
1770
1868
  if (not_dirty) set_signal_status(reaction, status);
1771
- if ((flags & 2) !== 0) {
1869
+ if ((flags & 131072) !== 0) eager_effects.add(reaction);
1870
+ else if ((flags & 2) !== 0) {
1772
1871
  var derived = reaction;
1773
1872
  batch_values?.delete(derived);
1774
1873
  if ((flags & 65536) === 0) {
@@ -1941,8 +2040,19 @@ function proxy(value) {
1941
2040
  }
1942
2041
  });
1943
2042
  }
2043
+ new Set([
2044
+ "copyWithin",
2045
+ "fill",
2046
+ "pop",
2047
+ "push",
2048
+ "reverse",
2049
+ "shift",
2050
+ "sort",
2051
+ "splice",
2052
+ "unshift"
2053
+ ]);
1944
2054
  //#endregion
1945
- //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/dom/operations.js
2055
+ //#region ../../../node_modules/.bun/svelte@5.56.1/node_modules/svelte/src/internal/client/dom/operations.js
1946
2056
  /** @type {Window} */
1947
2057
  var $window;
1948
2058
  /** @type {boolean} */
@@ -1965,13 +2075,13 @@ function init_operations() {
1965
2075
  first_child_getter = get_descriptor(node_prototype, "firstChild").get;
1966
2076
  next_sibling_getter = get_descriptor(node_prototype, "nextSibling").get;
1967
2077
  if (is_extensible(element_prototype)) {
1968
- element_prototype.__click = void 0;
1969
- element_prototype.__className = void 0;
1970
- element_prototype.__attributes = null;
1971
- element_prototype.__style = void 0;
2078
+ /** @type {any} */ element_prototype[CLASS_CACHE] = void 0;
2079
+ /** @type {any} */ element_prototype[ATTRIBUTES_CACHE] = null;
2080
+ /** @type {any} */ element_prototype[STYLE_CACHE] = void 0;
1972
2081
  element_prototype.__e = void 0;
1973
2082
  }
1974
- if (is_extensible(text_prototype)) text_prototype.__t = void 0;
2083
+ if (is_extensible(text_prototype))
2084
+ /** @type {any} */ text_prototype[TEXT_CACHE] = void 0;
1975
2085
  }
1976
2086
  /**
1977
2087
  * @param {string} value
@@ -1984,7 +2094,7 @@ function create_text(value = "") {
1984
2094
  * @template {Node} N
1985
2095
  * @param {N} node
1986
2096
  */
1987
- /* @__NO_SIDE_EFFECTS__ */
2097
+ /*@__NO_SIDE_EFFECTS__*/
1988
2098
  function get_first_child(node) {
1989
2099
  return first_child_getter.call(node);
1990
2100
  }
@@ -1992,7 +2102,7 @@ function get_first_child(node) {
1992
2102
  * @template {Node} N
1993
2103
  * @param {N} node
1994
2104
  */
1995
- /* @__NO_SIDE_EFFECTS__ */
2105
+ /*@__NO_SIDE_EFFECTS__*/
1996
2106
  function get_next_sibling(node) {
1997
2107
  return next_sibling_getter.call(node);
1998
2108
  }
@@ -2005,6 +2115,12 @@ function clear_text_content(node) {
2005
2115
  node.textContent = "";
2006
2116
  }
2007
2117
  /**
2118
+ * Branching here is intentional and load-bearing for perf. `createElement(tag)`
2119
+ * hits a fast path in Blink that `createElementNS(NAMESPACE_HTML, tag)` doesn't,
2120
+ * and passing an explicit `undefined` as the trailing options arg measurably
2121
+ * slows both APIs. Funnelling every case through a single `createElementNS(ns,
2122
+ * tag, options)` call would be smaller but slower on the HTML path.
2123
+ *
2008
2124
  * @template {keyof HTMLElementTagNameMap | string} T
2009
2125
  * @param {T} tag
2010
2126
  * @param {string} [namespace]
@@ -2012,11 +2128,11 @@ function clear_text_content(node) {
2012
2128
  * @returns {T extends keyof HTMLElementTagNameMap ? HTMLElementTagNameMap[T] : Element}
2013
2129
  */
2014
2130
  function create_element(tag, namespace, is) {
2015
- let options = is ? { is } : void 0;
2016
- return document.createElementNS(namespace ?? "http://www.w3.org/1999/xhtml", tag, options);
2131
+ if (namespace == null || namespace === "http://www.w3.org/1999/xhtml") return is ? document.createElement(tag, { is }) : document.createElement(tag);
2132
+ return is ? document.createElementNS(namespace, tag, { is }) : document.createElementNS(namespace, tag);
2017
2133
  }
2018
2134
  //#endregion
2019
- //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/dom/elements/bindings/shared.js
2135
+ //#region ../../../node_modules/.bun/svelte@5.56.1/node_modules/svelte/src/internal/client/dom/elements/bindings/shared.js
2020
2136
  /**
2021
2137
  * @template T
2022
2138
  * @param {() => T} fn
@@ -2034,7 +2150,7 @@ function without_reactive_context(fn) {
2034
2150
  }
2035
2151
  }
2036
2152
  //#endregion
2037
- //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/reactivity/effects.js
2153
+ //#region ../../../node_modules/.bun/svelte@5.56.1/node_modules/svelte/src/internal/client/reactivity/effects.js
2038
2154
  /** @import { Blocker, ComponentContext, ComponentContextLegacy, Derived, Effect, TemplateNode, TransitionManager } from '#client' */
2039
2155
  /**
2040
2156
  * @param {Effect} effect
@@ -2234,7 +2350,7 @@ function destroy_effect(effect, remove_dom = true) {
2234
2350
  remove_effect_dom(effect.nodes.start, effect.nodes.end);
2235
2351
  removed = true;
2236
2352
  }
2237
- set_signal_status(effect, DESTROYING);
2353
+ effect.f |= DESTROYING;
2238
2354
  destroy_effect_children(effect, remove_dom && !removed);
2239
2355
  remove_reactions(effect, 0);
2240
2356
  var transitions = effect.nodes && effect.nodes.t;
@@ -2338,14 +2454,14 @@ function move_effect(effect, fragment) {
2338
2454
  }
2339
2455
  }
2340
2456
  //#endregion
2341
- //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/legacy.js
2457
+ //#region ../../../node_modules/.bun/svelte@5.56.1/node_modules/svelte/src/internal/client/legacy.js
2342
2458
  /**
2343
2459
  * @type {Set<Value> | null}
2344
2460
  * @deprecated
2345
2461
  */
2346
2462
  var captured_signals = null;
2347
2463
  //#endregion
2348
- //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/runtime.js
2464
+ //#region ../../../node_modules/.bun/svelte@5.56.1/node_modules/svelte/src/internal/client/runtime.js
2349
2465
  /** @import { Derived, Effect, Reaction, Source, Value } from '#client' */
2350
2466
  var is_updating_effect = false;
2351
2467
  var is_destroying_effect = false;
@@ -2369,13 +2485,12 @@ function set_active_effect(effect) {
2369
2485
  /**
2370
2486
  * When sources are created within a reaction, reading and writing
2371
2487
  * them within that reaction should not cause a re-run
2372
- * @type {null | Source[]}
2488
+ * @type {null | Set<Source>}
2373
2489
  */
2374
2490
  var current_sources = null;
2375
2491
  /** @param {Value} value */
2376
2492
  function push_reaction_value(value) {
2377
- if (active_reaction !== null && (!async_mode_flag || (active_reaction.f & 2) !== 0)) if (current_sources === null) current_sources = [value];
2378
- else current_sources.push(value);
2493
+ if (active_reaction !== null && (!async_mode_flag || (active_reaction.f & 2) !== 0)) (current_sources ?? (current_sources = /* @__PURE__ */ new Set())).add(value);
2379
2494
  }
2380
2495
  /**
2381
2496
  * The dependencies of the reaction that is currently being executed. In many cases,
@@ -2440,7 +2555,7 @@ function is_dirty(reaction) {
2440
2555
  function schedule_possible_effect_self_invalidation(signal, effect, root = true) {
2441
2556
  var reactions = signal.reactions;
2442
2557
  if (reactions === null) return;
2443
- if (!async_mode_flag && current_sources !== null && includes.call(current_sources, signal)) return;
2558
+ if (!async_mode_flag && current_sources !== null && current_sources.has(signal)) return;
2444
2559
  for (var i = 0; i < reactions.length; i++) {
2445
2560
  var reaction = reactions[i];
2446
2561
  if ((reaction.f & 2) !== 0) schedule_possible_effect_self_invalidation(reaction, effect, false);
@@ -2595,7 +2710,7 @@ function get(signal) {
2595
2710
  var is_derived = (signal.f & 2) !== 0;
2596
2711
  captured_signals?.add(signal);
2597
2712
  if (active_reaction !== null && !untracking) {
2598
- if (!(active_effect !== null && (active_effect.f & 16384) !== 0) && (current_sources === null || !includes.call(current_sources, signal))) {
2713
+ if (!(active_effect !== null && (active_effect.f & 16384) !== 0) && (current_sources === null || !current_sources.has(signal))) {
2599
2714
  var deps = active_reaction.deps;
2600
2715
  if ((active_reaction.f & 2097152) !== 0) {
2601
2716
  if (signal.rv < read_version) {
@@ -2606,7 +2721,8 @@ function get(signal) {
2606
2721
  }
2607
2722
  } else {
2608
2723
  var _active_reaction;
2609
- ((_active_reaction = active_reaction).deps ?? (_active_reaction.deps = [])).push(signal);
2724
+ (_active_reaction = active_reaction).deps ?? (_active_reaction.deps = []);
2725
+ if (!includes.call(active_reaction.deps, signal)) active_reaction.deps.push(signal);
2610
2726
  var reactions = signal.reactions;
2611
2727
  if (reactions === null) signal.reactions = [active_reaction];
2612
2728
  else if (!includes.call(reactions, active_reaction)) reactions.push(active_reaction);
@@ -2689,7 +2805,7 @@ function untrack(fn) {
2689
2805
  }
2690
2806
  }
2691
2807
  //#endregion
2692
- //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/dom/elements/events.js
2808
+ //#region ../../../node_modules/.bun/svelte@5.56.1/node_modules/svelte/src/internal/client/dom/elements/events.js
2693
2809
  /**
2694
2810
  * Used on elements, as a map of event type -> event handler,
2695
2811
  * and on events themselves to track which element handled an event
@@ -2746,8 +2862,7 @@ function handle_event_propagation(event) {
2746
2862
  */
2747
2863
  var other_errors = [];
2748
2864
  while (current_target !== null) {
2749
- /** @type {null | Element} */
2750
- var parent_element = current_target.assignedSlot || current_target.parentNode || current_target.host || null;
2865
+ if (current_target === handler_element) break;
2751
2866
  try {
2752
2867
  var delegated = current_target[event_symbol]?.[event_name];
2753
2868
  if (delegated != null && (!current_target.disabled || event.target === current_target)) delegated.call(current_target, event);
@@ -2755,8 +2870,9 @@ function handle_event_propagation(event) {
2755
2870
  if (throw_error) other_errors.push(error);
2756
2871
  else throw_error = error;
2757
2872
  }
2758
- if (event.cancelBubble || parent_element === handler_element || parent_element === null) break;
2759
- current_target = parent_element;
2873
+ if (event.cancelBubble) break;
2874
+ path_idx++;
2875
+ current_target = path_idx < path.length ? path[path_idx] : null;
2760
2876
  }
2761
2877
  if (throw_error) {
2762
2878
  for (let error of other_errors) queueMicrotask(() => {
@@ -2772,7 +2888,7 @@ function handle_event_propagation(event) {
2772
2888
  }
2773
2889
  }
2774
2890
  //#endregion
2775
- //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/dom/reconciler.js
2891
+ //#region ../../../node_modules/.bun/svelte@5.56.1/node_modules/svelte/src/internal/client/dom/reconciler.js
2776
2892
  var policy = globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", {
2777
2893
  /** @param {string} html */
2778
2894
  createHTML: (html) => {
@@ -2791,7 +2907,7 @@ function create_fragment_from_html(html) {
2791
2907
  return elem.content;
2792
2908
  }
2793
2909
  //#endregion
2794
- //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/dom/template.js
2910
+ //#region ../../../node_modules/.bun/svelte@5.56.1/node_modules/svelte/src/internal/client/dom/template.js
2795
2911
  /** @import { Effect, EffectNodes, TemplateNode } from '#client' */
2796
2912
  /** @import { TemplateStructure } from './types' */
2797
2913
  /**
@@ -2812,7 +2928,7 @@ function assign_nodes(start, end) {
2812
2928
  * @param {number} flags
2813
2929
  * @returns {() => Node | Node[]}
2814
2930
  */
2815
- /* @__NO_SIDE_EFFECTS__ */
2931
+ /*#__NO_SIDE_EFFECTS__*/
2816
2932
  function from_html(content, flags) {
2817
2933
  var is_fragment = (flags & 1) !== 0;
2818
2934
  var use_import_node = (flags & 2) !== 0;
@@ -3050,7 +3166,7 @@ function unmount(component, options) {
3050
3166
  return Promise.resolve();
3051
3167
  }
3052
3168
  //#endregion
3053
- //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/dom/css.js
3169
+ //#region ../../../node_modules/.bun/svelte@5.56.1/node_modules/svelte/src/internal/client/dom/css.js
3054
3170
  /**
3055
3171
  * @param {Node} anchor
3056
3172
  * @param {{ hash: string, code: string }} css
@@ -3068,7 +3184,7 @@ function append_styles(anchor, css) {
3068
3184
  });
3069
3185
  }
3070
3186
  //#endregion
3071
- //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/dom/elements/bindings/size.js
3187
+ //#region ../../../node_modules/.bun/svelte@5.56.1/node_modules/svelte/src/internal/client/dom/elements/bindings/size.js
3072
3188
  var _ResizeObserverSingleton;
3073
3189
  var _listeners = /* @__PURE__ */ new WeakMap();
3074
3190
  var _observer = /* @__PURE__ */ new WeakMap();
@@ -3120,8 +3236,8 @@ function _getObserver() {
3120
3236
  }
3121
3237
  _defineProperty(ResizeObserverSingleton, "entries", /* @__PURE__ */ new WeakMap());
3122
3238
  //#endregion
3123
- //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/reactivity/props.js
3124
- /** @import { Effect, Source } from './types.js' */
3239
+ //#region ../../../node_modules/.bun/svelte@5.56.1/node_modules/svelte/src/internal/client/reactivity/props.js
3240
+ /** @import { Derived, Effect, Source } from './types.js' */
3125
3241
  /**
3126
3242
  * This function is responsible for synchronizing a possibly bound prop with the inner component state.
3127
3243
  * It is used whenever the compiler sees that the component writes to the prop, or when it has a default prop_value.
@@ -3138,7 +3254,12 @@ function prop(props, key, flags, fallback) {
3138
3254
  var lazy = (flags & 16) !== 0;
3139
3255
  var fallback_value = fallback;
3140
3256
  var fallback_dirty = true;
3257
+ var fallback_signal = void 0;
3141
3258
  var get_fallback = () => {
3259
+ if (lazy && runes) {
3260
+ fallback_signal ?? (fallback_signal = /* @__PURE__ */ derived(fallback));
3261
+ return get(fallback_signal);
3262
+ }
3142
3263
  if (fallback_dirty) {
3143
3264
  fallback_dirty = false;
3144
3265
  fallback_value = lazy ? untrack(fallback) : fallback;
@@ -3208,7 +3329,7 @@ function prop(props, key, flags, fallback) {
3208
3329
  });
3209
3330
  }
3210
3331
  //#endregion
3211
- //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/legacy/legacy-client.js
3332
+ //#region ../../../node_modules/.bun/svelte@5.56.1/node_modules/svelte/src/legacy/legacy-client.js
3212
3333
  /** @import { ComponentConstructorOptions, ComponentType, SvelteComponent, Component } from 'svelte' */
3213
3334
  /**
3214
3335
  * Takes the same options as a Svelte 4 component and the component function and returns a Svelte 4 compatible component.
@@ -3327,7 +3448,7 @@ var Svelte4Component = class {
3327
3448
  }
3328
3449
  };
3329
3450
  //#endregion
3330
- //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/dom/elements/custom-element.js
3451
+ //#region ../../../node_modules/.bun/svelte@5.56.1/node_modules/svelte/src/internal/client/dom/elements/custom-element.js
3331
3452
  /**
3332
3453
  * @typedef {Object} CustomElementPropDefinition
3333
3454
  * @property {string} [attribute]