@pie-element/mc-populated-blank 0.2.12 → 0.2.13-next.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 (45) 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/controller/defaults.d.ts +0 -1
  6. package/dist/controller/index.d.ts +0 -1
  7. package/dist/controller/index.js.map +1 -1
  8. package/dist/delivery/computeAudioMode.d.ts +0 -1
  9. package/dist/delivery/computeChoiceCorrectness.d.ts +0 -1
  10. package/dist/delivery/computeDisplayState.d.ts +0 -1
  11. package/dist/delivery/computeLayoutProfile.d.ts +0 -1
  12. package/dist/delivery/computeLayoutStyle.d.ts +0 -1
  13. package/dist/delivery/index.d.ts +0 -1
  14. package/dist/delivery/index.js +409 -284
  15. package/dist/delivery/index.js.map +1 -1
  16. package/dist/delivery/variant-css-map.d.ts +0 -1
  17. package/dist/index.d.ts +0 -1
  18. package/dist/index.iife.d.ts +0 -1
  19. package/dist/index.iife.js +6 -6
  20. package/dist/index.js +409 -284
  21. package/dist/index.js.map +1 -1
  22. package/dist/print/index.d.ts +0 -1
  23. package/dist/print/index.js +363 -238
  24. package/dist/print/index.js.map +1 -1
  25. package/dist/runtime-support.d.ts +12 -0
  26. package/dist/runtime-support.js +14 -0
  27. package/dist/runtime-support.js.map +1 -0
  28. package/dist/shared/layoutLimits.d.ts +0 -1
  29. package/dist/shared/types.d.ts +0 -1
  30. package/package.json +19 -5
  31. package/dist/author/index.d.ts.map +0 -1
  32. package/dist/controller/defaults.d.ts.map +0 -1
  33. package/dist/controller/index.d.ts.map +0 -1
  34. package/dist/delivery/computeAudioMode.d.ts.map +0 -1
  35. package/dist/delivery/computeChoiceCorrectness.d.ts.map +0 -1
  36. package/dist/delivery/computeDisplayState.d.ts.map +0 -1
  37. package/dist/delivery/computeLayoutProfile.d.ts.map +0 -1
  38. package/dist/delivery/computeLayoutStyle.d.ts.map +0 -1
  39. package/dist/delivery/index.d.ts.map +0 -1
  40. package/dist/delivery/variant-css-map.d.ts.map +0 -1
  41. package/dist/index.d.ts.map +0 -1
  42. package/dist/index.iife.d.ts.map +0 -1
  43. package/dist/print/index.d.ts.map +0 -1
  44. package/dist/shared/layoutLimits.d.ts.map +0 -1
  45. package/dist/shared/types.d.ts.map +0 -1
@@ -1,16 +1,16 @@
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
  var NAMESPACE_SVG = "http://www.w3.org/2000/svg";
11
11
  var NAMESPACE_MATHML = "http://www.w3.org/1998/Math/MathML";
12
12
  //#endregion
13
- //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/shared/utils.js
13
+ //#region ../../../node_modules/.bun/svelte@5.56.1/node_modules/svelte/src/internal/shared/utils.js
14
14
  var is_array = Array.isArray;
15
15
  var index_of = Array.prototype.indexOf;
16
16
  var includes = Array.prototype.includes;
@@ -47,7 +47,7 @@ function deferred() {
47
47
  };
48
48
  }
49
49
  //#endregion
50
- //#region \0@oxc-project+runtime@0.129.0/helpers/typeof.js
50
+ //#region \0@oxc-project+runtime@0.133.0/helpers/esm/typeof.js
51
51
  function _typeof(o) {
52
52
  "@babel/helpers - typeof";
53
53
  return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
@@ -57,7 +57,7 @@ function _typeof(o) {
57
57
  }, _typeof(o);
58
58
  }
59
59
  //#endregion
60
- //#region \0@oxc-project+runtime@0.129.0/helpers/toPrimitive.js
60
+ //#region \0@oxc-project+runtime@0.133.0/helpers/esm/toPrimitive.js
61
61
  function toPrimitive(t, r) {
62
62
  if ("object" != _typeof(t) || !t) return t;
63
63
  var e = t[Symbol.toPrimitive];
@@ -69,13 +69,13 @@ function toPrimitive(t, r) {
69
69
  return ("string" === r ? String : Number)(t);
70
70
  }
71
71
  //#endregion
72
- //#region \0@oxc-project+runtime@0.129.0/helpers/toPropertyKey.js
72
+ //#region \0@oxc-project+runtime@0.133.0/helpers/esm/toPropertyKey.js
73
73
  function toPropertyKey(t) {
74
74
  var i = toPrimitive(t, "string");
75
75
  return "symbol" == _typeof(i) ? i : i + "";
76
76
  }
77
77
  //#endregion
78
- //#region \0@oxc-project+runtime@0.129.0/helpers/defineProperty.js
78
+ //#region \0@oxc-project+runtime@0.133.0/helpers/esm/defineProperty.js
79
79
  function _defineProperty(e, r, t) {
80
80
  return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
81
81
  value: t,
@@ -114,6 +114,10 @@ var ERROR_VALUE = 1 << 23;
114
114
  var STATE_SYMBOL = Symbol("$state");
115
115
  var LEGACY_PROPS = Symbol("legacy props");
116
116
  var LOADING_ATTR_SYMBOL = Symbol("");
117
+ var ATTRIBUTES_CACHE = Symbol("attributes");
118
+ var CLASS_CACHE = Symbol("class");
119
+ var STYLE_CACHE = Symbol("style");
120
+ var TEXT_CACHE = Symbol("text");
117
121
  /** allow users to ignore aborted signal errors if `reason.name === 'StaleReactionError` */
118
122
  var STALE_REACTION = new class StaleReactionError extends Error {
119
123
  constructor(..._args) {
@@ -124,7 +128,7 @@ var STALE_REACTION = new class StaleReactionError extends Error {
124
128
  }();
125
129
  var IS_XHTML = !!globalThis.document?.contentType && /* @__PURE__ */ globalThis.document.contentType.includes("xml");
126
130
  //#endregion
127
- //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/errors.js
131
+ //#region ../../../node_modules/.bun/svelte@5.56.1/node_modules/svelte/src/internal/client/errors.js
128
132
  /**
129
133
  * Cannot create a `$derived(...)` with an `await` expression outside of an effect tree
130
134
  * @returns {never}
@@ -235,7 +239,7 @@ function svelte_boundary_reset_noop() {
235
239
  console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`);
236
240
  }
237
241
  //#endregion
238
- //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/dom/hydration.js
242
+ //#region ../../../node_modules/.bun/svelte@5.56.1/node_modules/svelte/src/internal/client/dom/hydration.js
239
243
  /** @import { TemplateNode } from '#client' */
240
244
  /**
241
245
  * Use this variable to guard everything related to hydration code so it can be treeshaken out
@@ -314,7 +318,7 @@ function read_hydration_instruction(node) {
314
318
  return node.data;
315
319
  }
316
320
  //#endregion
317
- //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/reactivity/equality.js
321
+ //#region ../../../node_modules/.bun/svelte@5.56.1/node_modules/svelte/src/internal/client/reactivity/equality.js
318
322
  /** @import { Equals } from '#client' */
319
323
  /** @type {Equals} */
320
324
  function equals(value) {
@@ -333,13 +337,13 @@ function safe_equals(value) {
333
337
  return !safe_not_equal(value, this.v);
334
338
  }
335
339
  //#endregion
336
- //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/flags/index.js
340
+ //#region ../../../node_modules/.bun/svelte@5.56.1/node_modules/svelte/src/internal/flags/index.js
337
341
  /** True if experimental.async=true */
338
342
  var async_mode_flag = false;
339
343
  /** True if we're not certain that we only have Svelte 5 code in the compilation */
340
344
  var legacy_mode_flag = false;
341
345
  //#endregion
342
- //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/context.js
346
+ //#region ../../../node_modules/.bun/svelte@5.56.1/node_modules/svelte/src/internal/client/context.js
343
347
  /** @import { ComponentContext, DevStackEntry, Effect } from '#client' */
344
348
  /** @type {ComponentContext | null} */
345
349
  var component_context = null;
@@ -391,7 +395,7 @@ function is_runes() {
391
395
  return !legacy_mode_flag || component_context !== null && component_context.l === null;
392
396
  }
393
397
  //#endregion
394
- //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/dom/task.js
398
+ //#region ../../../node_modules/.bun/svelte@5.56.1/node_modules/svelte/src/internal/client/dom/task.js
395
399
  /** @type {Array<() => void>} */
396
400
  var micro_tasks = [];
397
401
  function run_micro_tasks() {
@@ -449,7 +453,7 @@ function invoke_error_boundary(error, effect) {
449
453
  throw error;
450
454
  }
451
455
  //#endregion
452
- //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/reactivity/status.js
456
+ //#region ../../../node_modules/.bun/svelte@5.56.1/node_modules/svelte/src/internal/client/reactivity/status.js
453
457
  /** @import { Derived, Signal } from '#client' */
454
458
  var STATUS_MASK = ~(DIRTY | MAYBE_DIRTY | CLEAN);
455
459
  /**
@@ -468,7 +472,7 @@ function update_derived_status(derived) {
468
472
  else set_signal_status(derived, MAYBE_DIRTY);
469
473
  }
470
474
  //#endregion
471
- //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/reactivity/utils.js
475
+ //#region ../../../node_modules/.bun/svelte@5.56.1/node_modules/svelte/src/internal/client/reactivity/utils.js
472
476
  /** @import { Derived, Effect, Value } from '#client' */
473
477
  /**
474
478
  * @param {Value[] | null} deps
@@ -496,7 +500,7 @@ function defer_effect(effect, dirty_effects, maybe_dirty_effects) {
496
500
  set_signal_status(effect, CLEAN);
497
501
  }
498
502
  //#endregion
499
- //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/reactivity/store.js
503
+ //#region ../../../node_modules/.bun/svelte@5.56.1/node_modules/svelte/src/internal/client/reactivity/store.js
500
504
  /**
501
505
  * We set this to `true` when updating a store so that we correctly
502
506
  * schedule effects if the update takes place inside a `$:` effect
@@ -526,46 +530,53 @@ function capture_store_binding(fn) {
526
530
  }
527
531
  }
528
532
  //#endregion
529
- //#region \0@oxc-project+runtime@0.129.0/helpers/checkPrivateRedeclaration.js
533
+ //#region \0@oxc-project+runtime@0.133.0/helpers/esm/checkPrivateRedeclaration.js
530
534
  function _checkPrivateRedeclaration(e, t) {
531
535
  if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object");
532
536
  }
533
537
  //#endregion
534
- //#region \0@oxc-project+runtime@0.129.0/helpers/classPrivateMethodInitSpec.js
538
+ //#region \0@oxc-project+runtime@0.133.0/helpers/esm/classPrivateMethodInitSpec.js
535
539
  function _classPrivateMethodInitSpec(e, a) {
536
540
  _checkPrivateRedeclaration(e, a), a.add(e);
537
541
  }
538
542
  //#endregion
539
- //#region \0@oxc-project+runtime@0.129.0/helpers/classPrivateFieldInitSpec.js
543
+ //#region \0@oxc-project+runtime@0.133.0/helpers/esm/classPrivateFieldInitSpec.js
540
544
  function _classPrivateFieldInitSpec(e, t, a) {
541
545
  _checkPrivateRedeclaration(e, t), t.set(e, a);
542
546
  }
543
547
  //#endregion
544
- //#region \0@oxc-project+runtime@0.129.0/helpers/assertClassBrand.js
548
+ //#region \0@oxc-project+runtime@0.133.0/helpers/esm/assertClassBrand.js
545
549
  function _assertClassBrand(e, t, n) {
546
550
  if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n;
547
551
  throw new TypeError("Private element is not present on this object");
548
552
  }
549
553
  //#endregion
550
- //#region \0@oxc-project+runtime@0.129.0/helpers/classPrivateFieldGet2.js
551
- function _classPrivateFieldGet2(s, a) {
552
- return s.get(_assertClassBrand(s, a));
553
- }
554
- //#endregion
555
- //#region \0@oxc-project+runtime@0.129.0/helpers/classPrivateFieldSet2.js
554
+ //#region \0@oxc-project+runtime@0.133.0/helpers/esm/classPrivateFieldSet2.js
556
555
  function _classPrivateFieldSet2(s, a, r) {
557
556
  return s.set(_assertClassBrand(s, a), r), r;
558
557
  }
559
558
  //#endregion
560
- //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/reactivity/batch.js
559
+ //#region \0@oxc-project+runtime@0.133.0/helpers/esm/classPrivateFieldGet2.js
560
+ function _classPrivateFieldGet2(s, a) {
561
+ return s.get(_assertClassBrand(s, a));
562
+ }
563
+ //#endregion
564
+ //#region ../../../node_modules/.bun/svelte@5.56.1/node_modules/svelte/src/internal/client/reactivity/batch.js
561
565
  /** @import { Fork } from 'svelte' */
562
566
  /** @import { Derived, Effect, Reaction, Source, Value } from '#client' */
563
567
  var _Batch;
564
- /** @type {Set<Batch>} */
565
- var batches = /* @__PURE__ */ new Set();
568
+ /** @type {Batch | null} */
569
+ var first_batch = null;
570
+ /** @type {Batch | null} */
571
+ var last_batch = null;
566
572
  /** @type {Batch | null} */
567
573
  var current_batch = null;
568
574
  /**
575
+ * This is needed to avoid overwriting inputs
576
+ * @type {Batch | null}
577
+ */
578
+ var previous_batch = null;
579
+ /**
569
580
  * When time travelling (i.e. working in one batch, while other batches
570
581
  * still have ongoing work), we ignore the real values of affected
571
582
  * signals in favour of their values within the batch
@@ -593,9 +604,11 @@ var collected_effects = null;
593
604
  var legacy_updates = null;
594
605
  var flush_count = 0;
595
606
  var uid = 1;
607
+ var _started = /* @__PURE__ */ new WeakMap();
608
+ var _prev = /* @__PURE__ */ new WeakMap();
609
+ var _next = /* @__PURE__ */ new WeakMap();
596
610
  var _commit_callbacks = /* @__PURE__ */ new WeakMap();
597
611
  var _discard_callbacks = /* @__PURE__ */ new WeakMap();
598
- var _fork_commit_callbacks = /* @__PURE__ */ new WeakMap();
599
612
  var _pending = /* @__PURE__ */ new WeakMap();
600
613
  var _blocking_pending = /* @__PURE__ */ new WeakMap();
601
614
  var _deferred = /* @__PURE__ */ new WeakMap();
@@ -606,12 +619,21 @@ var _maybe_dirty_effects$1 = /* @__PURE__ */ new WeakMap();
606
619
  var _skipped_branches = /* @__PURE__ */ new WeakMap();
607
620
  var _unskipped_branches = /* @__PURE__ */ new WeakMap();
608
621
  var _decrement_queued = /* @__PURE__ */ new WeakMap();
609
- var _blockers = /* @__PURE__ */ new WeakMap();
610
622
  var _Batch_brand = /* @__PURE__ */ new WeakSet();
611
623
  var Batch = class Batch {
612
624
  constructor() {
613
625
  _classPrivateMethodInitSpec(this, _Batch_brand);
614
626
  _defineProperty(this, "id", uid++);
627
+ _classPrivateFieldInitSpec(this, _started, false);
628
+ _defineProperty(this, "linked", true);
629
+ _classPrivateFieldInitSpec(this, _prev, null);
630
+ _classPrivateFieldInitSpec(this, _next, null);
631
+ _defineProperty(
632
+ this,
633
+ /** @type {Map<Effect, ReturnType<typeof deferred<any>>>} */
634
+ "async_deriveds",
635
+ /* @__PURE__ */ new Map()
636
+ );
615
637
  _defineProperty(
616
638
  this,
617
639
  /**
@@ -635,8 +657,7 @@ var Batch = class Batch {
635
657
  );
636
658
  _classPrivateFieldInitSpec(this, _commit_callbacks, /* @__PURE__ */ new Set());
637
659
  _classPrivateFieldInitSpec(this, _discard_callbacks, /* @__PURE__ */ new Set());
638
- _classPrivateFieldInitSpec(this, _fork_commit_callbacks, /* @__PURE__ */ new Set());
639
- _classPrivateFieldInitSpec(this, _pending, /* @__PURE__ */ new Map());
660
+ _classPrivateFieldInitSpec(this, _pending, 0);
640
661
  _classPrivateFieldInitSpec(this, _blocking_pending, /* @__PURE__ */ new Map());
641
662
  _classPrivateFieldInitSpec(this, _deferred, null);
642
663
  _classPrivateFieldInitSpec(this, _roots, []);
@@ -647,7 +668,12 @@ var Batch = class Batch {
647
668
  _classPrivateFieldInitSpec(this, _unskipped_branches, /* @__PURE__ */ new Set());
648
669
  _defineProperty(this, "is_fork", false);
649
670
  _classPrivateFieldInitSpec(this, _decrement_queued, false);
650
- _classPrivateFieldInitSpec(this, _blockers, /* @__PURE__ */ new Set());
671
+ if (last_batch === null) first_batch = last_batch = this;
672
+ else {
673
+ _classPrivateFieldSet2(_next, last_batch, this);
674
+ _classPrivateFieldSet2(_prev, this, last_batch);
675
+ }
676
+ last_batch = this;
651
677
  }
652
678
  /**
653
679
  * Add an effect to the #skipped_branches map and reset its children
@@ -722,8 +748,8 @@ var Batch = class Batch {
722
748
  discard() {
723
749
  for (const fn of _classPrivateFieldGet2(_discard_callbacks, this)) fn(this);
724
750
  _classPrivateFieldGet2(_discard_callbacks, this).clear();
725
- _classPrivateFieldGet2(_fork_commit_callbacks, this).clear();
726
- batches.delete(this);
751
+ _assertClassBrand(_Batch_brand, this, _unlink).call(this);
752
+ _classPrivateFieldGet2(_deferred, this)?.resolve();
727
753
  }
728
754
  /**
729
755
  * @param {Effect} effect
@@ -736,8 +762,7 @@ var Batch = class Batch {
736
762
  * @param {Effect} effect
737
763
  */
738
764
  increment(blocking, effect) {
739
- let pending_count = _classPrivateFieldGet2(_pending, this).get(effect) ?? 0;
740
- _classPrivateFieldGet2(_pending, this).set(effect, pending_count + 1);
765
+ _classPrivateFieldSet2(_pending, this, _classPrivateFieldGet2(_pending, this) + 1);
741
766
  if (blocking) {
742
767
  let blocking_pending_count = _classPrivateFieldGet2(_blocking_pending, this).get(effect) ?? 0;
743
768
  _classPrivateFieldGet2(_blocking_pending, this).set(effect, blocking_pending_count + 1);
@@ -746,22 +771,19 @@ var Batch = class Batch {
746
771
  /**
747
772
  * @param {boolean} blocking
748
773
  * @param {Effect} effect
749
- * @param {boolean} skip - whether to skip updates (because this is triggered by a stale reaction)
750
774
  */
751
- decrement(blocking, effect, skip) {
752
- let pending_count = _classPrivateFieldGet2(_pending, this).get(effect) ?? 0;
753
- if (pending_count === 1) _classPrivateFieldGet2(_pending, this).delete(effect);
754
- else _classPrivateFieldGet2(_pending, this).set(effect, pending_count - 1);
775
+ decrement(blocking, effect) {
776
+ _classPrivateFieldSet2(_pending, this, _classPrivateFieldGet2(_pending, this) - 1);
755
777
  if (blocking) {
756
778
  let blocking_pending_count = _classPrivateFieldGet2(_blocking_pending, this).get(effect) ?? 0;
757
779
  if (blocking_pending_count === 1) _classPrivateFieldGet2(_blocking_pending, this).delete(effect);
758
780
  else _classPrivateFieldGet2(_blocking_pending, this).set(effect, blocking_pending_count - 1);
759
781
  }
760
- if (_classPrivateFieldGet2(_decrement_queued, this) || skip) return;
782
+ if (_classPrivateFieldGet2(_decrement_queued, this)) return;
761
783
  _classPrivateFieldSet2(_decrement_queued, this, true);
762
784
  queue_micro_task(() => {
763
785
  _classPrivateFieldSet2(_decrement_queued, this, false);
764
- this.flush();
786
+ if (this.linked) this.flush();
765
787
  });
766
788
  }
767
789
  /**
@@ -782,48 +804,38 @@ var Batch = class Batch {
782
804
  ondiscard(fn) {
783
805
  _classPrivateFieldGet2(_discard_callbacks, this).add(fn);
784
806
  }
785
- /** @param {(batch: Batch) => void} fn */
786
- on_fork_commit(fn) {
787
- _classPrivateFieldGet2(_fork_commit_callbacks, this).add(fn);
788
- }
789
- run_fork_commit_callbacks() {
790
- for (const fn of _classPrivateFieldGet2(_fork_commit_callbacks, this)) fn(this);
791
- _classPrivateFieldGet2(_fork_commit_callbacks, this).clear();
792
- }
793
807
  settled() {
794
808
  return (_classPrivateFieldGet2(_deferred, this) ?? _classPrivateFieldSet2(_deferred, this, deferred())).promise;
795
809
  }
796
810
  static ensure() {
797
811
  if (current_batch === null) {
798
812
  const batch = current_batch = new Batch();
799
- if (!is_processing) {
800
- batches.add(current_batch);
801
- if (!is_flushing_sync) queue_micro_task(() => {
802
- if (current_batch !== batch) return;
803
- batch.flush();
804
- });
805
- }
813
+ if (!is_processing && !is_flushing_sync) queue_micro_task(() => {
814
+ if (!_classPrivateFieldGet2(_started, batch)) batch.flush();
815
+ });
806
816
  }
807
817
  return current_batch;
808
818
  }
809
819
  apply() {
810
- if (!async_mode_flag || !this.is_fork && batches.size === 1) {
820
+ if (!async_mode_flag || !this.is_fork && _classPrivateFieldGet2(_prev, this) === null && _classPrivateFieldGet2(_next, this) === null) {
811
821
  batch_values = null;
812
822
  return;
813
823
  }
814
824
  batch_values = /* @__PURE__ */ new Map();
815
825
  for (const [source, [value]] of this.current) batch_values.set(source, value);
816
- for (const batch of batches) {
826
+ for (let batch = first_batch; batch !== null; batch = _classPrivateFieldGet2(_next, batch)) {
817
827
  if (batch === this || batch.is_fork) continue;
818
828
  var intersects = false;
819
- var differs = false;
820
829
  if (batch.id < this.id) for (const [source, [, is_derived]] of batch.current) {
821
830
  if (is_derived) continue;
822
- intersects || (intersects = this.current.has(source));
823
- differs || (differs = !this.current.has(source));
831
+ if (this.current.has(source)) {
832
+ intersects = true;
833
+ break;
834
+ }
835
+ }
836
+ if (!intersects) {
837
+ for (const [source, previous] of batch.previous) if (!batch_values.has(source)) batch_values.set(source, previous);
824
838
  }
825
- if (intersects && differs) _classPrivateFieldGet2(_blockers, this).add(batch);
826
- else for (const [source, previous] of batch.previous) if (!batch_values.has(source)) batch_values.set(source, previous);
827
839
  }
828
840
  }
829
841
  /**
@@ -854,12 +866,10 @@ var Batch = class Batch {
854
866
  };
855
867
  _Batch = Batch;
856
868
  function _is_deferred() {
857
- return this.is_fork || _classPrivateFieldGet2(_blocking_pending, this).size > 0;
858
- }
859
- function _is_blocked() {
860
- for (const batch of _classPrivateFieldGet2(_blockers, this)) for (const effect of _classPrivateFieldGet2(_blocking_pending, batch).keys()) {
861
- var skipped = false;
869
+ if (this.is_fork) return true;
870
+ for (const effect of _classPrivateFieldGet2(_blocking_pending, this).keys()) {
862
871
  var e = effect;
872
+ var skipped = false;
863
873
  while (e.parent !== null) {
864
874
  if (_classPrivateFieldGet2(_skipped_branches, this).has(e)) {
865
875
  skipped = true;
@@ -872,20 +882,19 @@ function _is_blocked() {
872
882
  return false;
873
883
  }
874
884
  function _process() {
885
+ _classPrivateFieldSet2(_started, this, true);
875
886
  if (flush_count++ > 1e3) {
876
- batches.delete(this);
887
+ _assertClassBrand(_Batch_brand, this, _unlink).call(this);
877
888
  infinite_loop_guard();
878
889
  }
879
- if (!_assertClassBrand(_Batch_brand, this, _is_deferred).call(this)) {
880
- for (const e of _classPrivateFieldGet2(_dirty_effects$1, this)) {
881
- _classPrivateFieldGet2(_maybe_dirty_effects$1, this).delete(e);
882
- set_signal_status(e, DIRTY);
883
- this.schedule(e);
884
- }
885
- for (const e of _classPrivateFieldGet2(_maybe_dirty_effects$1, this)) {
886
- set_signal_status(e, MAYBE_DIRTY);
887
- this.schedule(e);
888
- }
890
+ for (const e of _classPrivateFieldGet2(_dirty_effects$1, this)) {
891
+ _classPrivateFieldGet2(_maybe_dirty_effects$1, this).delete(e);
892
+ set_signal_status(e, DIRTY);
893
+ this.schedule(e);
894
+ }
895
+ for (const e of _classPrivateFieldGet2(_maybe_dirty_effects$1, this)) {
896
+ set_signal_status(e, MAYBE_DIRTY);
897
+ this.schedule(e);
889
898
  }
890
899
  const roots = _classPrivateFieldGet2(_roots, this);
891
900
  _classPrivateFieldSet2(_roots, this, []);
@@ -903,6 +912,7 @@ function _process() {
903
912
  _assertClassBrand(_Batch_brand, this, _traverse).call(this, root, effects, render_effects);
904
913
  } catch (e) {
905
914
  reset_all(root);
915
+ if (!_assertClassBrand(_Batch_brand, this, _is_deferred).call(this)) this.discard();
906
916
  throw e;
907
917
  }
908
918
  current_batch = null;
@@ -912,30 +922,43 @@ function _process() {
912
922
  }
913
923
  collected_effects = null;
914
924
  legacy_updates = null;
915
- if (_assertClassBrand(_Batch_brand, this, _is_deferred).call(this) || _assertClassBrand(_Batch_brand, this, _is_blocked).call(this)) {
925
+ if (_assertClassBrand(_Batch_brand, this, _is_deferred).call(this)) {
916
926
  _assertClassBrand(_Batch_brand, this, _defer_effects).call(this, render_effects);
917
927
  _assertClassBrand(_Batch_brand, this, _defer_effects).call(this, effects);
918
928
  for (const [e, t] of _classPrivateFieldGet2(_skipped_branches, this)) reset_branch(e, t);
919
- } else {
920
- if (_classPrivateFieldGet2(_pending, this).size === 0) batches.delete(this);
921
- _classPrivateFieldGet2(_dirty_effects$1, this).clear();
922
- _classPrivateFieldGet2(_maybe_dirty_effects$1, this).clear();
923
- for (const fn of _classPrivateFieldGet2(_commit_callbacks, this)) fn(this);
924
- _classPrivateFieldGet2(_commit_callbacks, this).clear();
925
- flush_queued_effects(render_effects);
926
- flush_queued_effects(effects);
927
- _classPrivateFieldGet2(_deferred, this)?.resolve();
929
+ if (updates.length > 0)
930
+ /** @type {Batch} */ _assertClassBrand(_Batch_brand, current_batch, _process).call(current_batch);
931
+ return;
928
932
  }
929
- var next_batch = current_batch;
930
- if (_classPrivateFieldGet2(_roots, this).length > 0) {
931
- const batch = next_batch ?? (next_batch = this);
932
- _classPrivateFieldGet2(_roots, batch).push(..._classPrivateFieldGet2(_roots, this).filter((r) => !_classPrivateFieldGet2(_roots, batch).includes(r)));
933
+ const earlier_batch = _assertClassBrand(_Batch_brand, this, _find_earlier_batch).call(this);
934
+ if (earlier_batch) {
935
+ _assertClassBrand(_Batch_brand, this, _defer_effects).call(this, render_effects);
936
+ _assertClassBrand(_Batch_brand, this, _defer_effects).call(this, effects);
937
+ _assertClassBrand(_Batch_brand, earlier_batch, _merge).call(earlier_batch, this);
938
+ return;
933
939
  }
934
- if (next_batch !== null) {
935
- batches.add(next_batch);
936
- _assertClassBrand(_Batch_brand, next_batch, _process).call(next_batch);
940
+ _classPrivateFieldGet2(_dirty_effects$1, this).clear();
941
+ _classPrivateFieldGet2(_maybe_dirty_effects$1, this).clear();
942
+ for (const fn of _classPrivateFieldGet2(_commit_callbacks, this)) fn(this);
943
+ _classPrivateFieldGet2(_commit_callbacks, this).clear();
944
+ previous_batch = this;
945
+ flush_queued_effects(render_effects);
946
+ flush_queued_effects(effects);
947
+ previous_batch = null;
948
+ _classPrivateFieldGet2(_deferred, this)?.resolve();
949
+ var next_batch = current_batch;
950
+ if (_classPrivateFieldGet2(_pending, this) === 0 && (_classPrivateFieldGet2(_roots, this).length === 0 || next_batch !== null)) {
951
+ _assertClassBrand(_Batch_brand, this, _unlink).call(this);
952
+ if (async_mode_flag) {
953
+ _assertClassBrand(_Batch_brand, this, _commit$1).call(this);
954
+ current_batch = next_batch;
955
+ }
937
956
  }
938
- if (async_mode_flag && !batches.has(this)) _assertClassBrand(_Batch_brand, this, _commit$1).call(this);
957
+ if (_classPrivateFieldGet2(_roots, this).length > 0) if (next_batch !== null) {
958
+ const batch = next_batch;
959
+ _classPrivateFieldGet2(_roots, batch).push(..._classPrivateFieldGet2(_roots, this).filter((r) => !_classPrivateFieldGet2(_roots, batch).includes(r)));
960
+ } else next_batch = this;
961
+ if (next_batch !== null) _assertClassBrand(_Batch_brand, next_batch, _process).call(next_batch);
939
962
  }
940
963
  /**
941
964
  * Traverse the effect tree, executing effects or stashing
@@ -974,6 +997,59 @@ function _traverse(root, effects, render_effects) {
974
997
  }
975
998
  }
976
999
  }
1000
+ function _find_earlier_batch() {
1001
+ var batch = _classPrivateFieldGet2(_prev, this);
1002
+ while (batch !== null) {
1003
+ if (!batch.is_fork) {
1004
+ for (const [value, [, is_derived]] of this.current) if (batch.current.has(value) && !is_derived) return batch;
1005
+ }
1006
+ batch = _classPrivateFieldGet2(_prev, batch);
1007
+ }
1008
+ return null;
1009
+ }
1010
+ /**
1011
+ * @param {Batch} batch
1012
+ */
1013
+ function _merge(batch) {
1014
+ for (const [source, value] of batch.current) {
1015
+ if (!this.previous.has(source) && batch.previous.has(source)) this.previous.set(source, batch.previous.get(source));
1016
+ this.current.set(source, value);
1017
+ }
1018
+ for (const [effect, deferred] of batch.async_deriveds) {
1019
+ const d = this.async_deriveds.get(effect);
1020
+ if (d) deferred.promise.then(d.resolve).catch(d.reject);
1021
+ }
1022
+ this.transfer_effects(_classPrivateFieldGet2(_dirty_effects$1, batch), _classPrivateFieldGet2(_maybe_dirty_effects$1, batch));
1023
+ /**
1024
+ * mark all effects that depend on `batch.current`, except the
1025
+ * async effects that we just resolved (TODO unless they depend
1026
+ * on values in this batch that are NOT in the later batch?).
1027
+ * Through this we also will populate the correct #skipped_branches,
1028
+ * oncommit callbacks etc, so we don't need to merge them separately.
1029
+ * @param {Value} value
1030
+ */
1031
+ const mark = (value) => {
1032
+ var reactions = value.reactions;
1033
+ if (reactions === null) return;
1034
+ for (const reaction of reactions) {
1035
+ var flags = reaction.f;
1036
+ if ((flags & 2) !== 0) mark(reaction);
1037
+ else {
1038
+ var effect = reaction;
1039
+ if (flags & 4194320 && !this.async_deriveds.has(effect)) {
1040
+ _classPrivateFieldGet2(_maybe_dirty_effects$1, this).delete(effect);
1041
+ set_signal_status(effect, DIRTY);
1042
+ this.schedule(effect);
1043
+ }
1044
+ }
1045
+ }
1046
+ };
1047
+ for (const source of this.current.keys()) mark(source);
1048
+ this.oncommit(() => batch.discard());
1049
+ _assertClassBrand(_Batch_brand, batch, _unlink).call(batch);
1050
+ current_batch = this;
1051
+ _assertClassBrand(_Batch_brand, this, _process).call(this);
1052
+ }
977
1053
  /**
978
1054
  * @param {Effect[]} effects
979
1055
  */
@@ -981,7 +1057,7 @@ function _defer_effects(effects) {
981
1057
  for (var i = 0; i < effects.length; i += 1) defer_effect(effects[i], _classPrivateFieldGet2(_dirty_effects$1, this), _classPrivateFieldGet2(_maybe_dirty_effects$1, this));
982
1058
  }
983
1059
  function _commit$1() {
984
- for (const batch of batches) {
1060
+ for (let batch = first_batch; batch !== null; batch = _classPrivateFieldGet2(_next, batch)) {
985
1061
  var is_earlier = batch.id < this.id;
986
1062
  /** @type {Source[]} */
987
1063
  var sources = [];
@@ -993,7 +1069,12 @@ function _commit$1() {
993
1069
  }
994
1070
  sources.push(source);
995
1071
  }
996
- var others = [...batch.current.keys()].filter((s) => !this.current.has(s));
1072
+ if (is_earlier) for (const [effect, deferred] of this.async_deriveds) {
1073
+ const d = batch.async_deriveds.get(effect);
1074
+ if (d) deferred.promise.then(d.resolve).catch(d.reject);
1075
+ }
1076
+ if (!_classPrivateFieldGet2(_started, batch)) continue;
1077
+ var others = [...batch.current.keys()].filter((s) => !batch.current.get(s)[1] && !this.current.has(s));
997
1078
  if (others.length === 0) {
998
1079
  if (is_earlier) batch.discard();
999
1080
  } else if (sources.length > 0) {
@@ -1008,12 +1089,18 @@ function _commit$1() {
1008
1089
  var checked = /* @__PURE__ */ new Map();
1009
1090
  for (var source of sources) mark_effects(source, others, marked, checked);
1010
1091
  checked = /* @__PURE__ */ new Map();
1011
- var current_unequal = [...batch.current.keys()].filter((c) => this.current.has(c) ? this.current.get(c)[0] !== c : true);
1012
- for (const effect of _classPrivateFieldGet2(_new_effects, this)) if ((effect.f & 155648) === 0 && depends_on(effect, current_unequal, checked)) if ((effect.f & 4194320) !== 0) {
1013
- set_signal_status(effect, DIRTY);
1014
- batch.schedule(effect);
1015
- } else _classPrivateFieldGet2(_dirty_effects$1, batch).add(effect);
1016
- if (_classPrivateFieldGet2(_roots, batch).length > 0) {
1092
+ var current_unequal = [...batch.current].filter(([c, v1]) => {
1093
+ const v2 = this.current.get(c);
1094
+ if (!v2) return true;
1095
+ return v2[0] !== v1[0] || v2[1] !== v1[1];
1096
+ }).map(([c]) => c);
1097
+ if (current_unequal.length > 0) {
1098
+ for (const effect of _classPrivateFieldGet2(_new_effects, this)) if ((effect.f & 155648) === 0 && depends_on(effect, current_unequal, checked)) if ((effect.f & 4194320) !== 0) {
1099
+ set_signal_status(effect, DIRTY);
1100
+ batch.schedule(effect);
1101
+ } else _classPrivateFieldGet2(_dirty_effects$1, batch).add(effect);
1102
+ }
1103
+ if (_classPrivateFieldGet2(_roots, batch).length > 0 && !_classPrivateFieldGet2(_decrement_queued, batch)) {
1017
1104
  batch.apply();
1018
1105
  for (var root of _classPrivateFieldGet2(_roots, batch)) _assertClassBrand(_Batch_brand, batch, _traverse).call(batch, root, [], []);
1019
1106
  _classPrivateFieldSet2(_roots, batch, []);
@@ -1021,13 +1108,16 @@ function _commit$1() {
1021
1108
  batch.deactivate();
1022
1109
  }
1023
1110
  }
1024
- for (const batch of batches) if (_classPrivateFieldGet2(_blockers, batch).has(this)) {
1025
- _classPrivateFieldGet2(_blockers, batch).delete(this);
1026
- if (_classPrivateFieldGet2(_blockers, batch).size === 0 && !_assertClassBrand(_Batch_brand, batch, _is_deferred).call(batch)) {
1027
- batch.activate();
1028
- _assertClassBrand(_Batch_brand, batch, _process).call(batch);
1029
- }
1030
- }
1111
+ }
1112
+ function _unlink() {
1113
+ if (!this.linked) return;
1114
+ var prev = _classPrivateFieldGet2(_prev, this);
1115
+ var next = _classPrivateFieldGet2(_next, this);
1116
+ if (prev === null) first_batch = next;
1117
+ else _classPrivateFieldSet2(_next, prev, next);
1118
+ if (next === null) last_batch = prev;
1119
+ else _classPrivateFieldSet2(_prev, next, prev);
1120
+ this.linked = false;
1031
1121
  }
1032
1122
  /**
1033
1123
  * Synchronously flush any pending updates.
@@ -1180,7 +1270,7 @@ function reset_all(effect) {
1180
1270
  }
1181
1271
  }
1182
1272
  //#endregion
1183
- //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/reactivity/create-subscriber.js
1273
+ //#region ../../../node_modules/.bun/svelte@5.56.1/node_modules/svelte/src/reactivity/create-subscriber.js
1184
1274
  /**
1185
1275
  * Returns a `subscribe` function that integrates external event-based systems with Svelte's reactivity.
1186
1276
  * It's particularly useful for integrating with web APIs like `MediaQuery`, `IntersectionObserver`, or `WebSocket`.
@@ -1253,13 +1343,13 @@ function createSubscriber(start) {
1253
1343
  };
1254
1344
  }
1255
1345
  //#endregion
1256
- //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/dom/blocks/boundary.js
1346
+ //#region ../../../node_modules/.bun/svelte@5.56.1/node_modules/svelte/src/internal/client/dom/blocks/boundary.js
1257
1347
  /** @import { Effect, Source, TemplateNode, } from '#client' */
1258
1348
  /**
1259
1349
  * @typedef {{
1260
- * onerror?: (error: unknown, reset: () => void) => void;
1261
- * failed?: (anchor: Node, error: () => unknown, reset: () => () => void) => void;
1262
- * pending?: (anchor: Node) => void;
1350
+ * onerror?: ((error: unknown, reset: () => void) => void) | null;
1351
+ * failed?: ((anchor: Node, error: () => unknown, reset: () => () => void) => void) | null;
1352
+ * pending?: ((anchor: Node) => void) | null;
1263
1353
  * }} BoundaryProps
1264
1354
  */
1265
1355
  var flags = EFFECT_TRANSPARENT | EFFECT_PRESERVED;
@@ -1406,7 +1496,7 @@ var Boundary = class {
1406
1496
  if (_classPrivateFieldGet2(_main_effect, this)) current_batch.skip_effect(_classPrivateFieldGet2(_main_effect, this));
1407
1497
  if (_classPrivateFieldGet2(_pending_effect, this)) current_batch.skip_effect(_classPrivateFieldGet2(_pending_effect, this));
1408
1498
  if (_classPrivateFieldGet2(_failed_effect, this)) current_batch.skip_effect(_classPrivateFieldGet2(_failed_effect, this));
1409
- current_batch.on_fork_commit(() => {
1499
+ current_batch.oncommit(() => {
1410
1500
  _assertClassBrand(_Boundary_brand, this, _handle_error).call(this, error);
1411
1501
  });
1412
1502
  } else _assertClassBrand(_Boundary_brand, this, _handle_error).call(this, error);
@@ -1606,8 +1696,8 @@ function _handle_error(error) {
1606
1696
  });
1607
1697
  }
1608
1698
  //#endregion
1609
- //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/reactivity/async.js
1610
- /** @import { Blocker, Effect, Value } from '#client' */
1699
+ //#region ../../../node_modules/.bun/svelte@5.56.1/node_modules/svelte/src/internal/client/reactivity/async.js
1700
+ /** @import { Blocker, Effect, Source, Value } from '#client' */
1611
1701
  /**
1612
1702
  * @param {Blocker[]} blockers
1613
1703
  * @param {Array<() => any>} sync
@@ -1617,30 +1707,34 @@ function _handle_error(error) {
1617
1707
  function flatten(blockers, sync, async, fn) {
1618
1708
  const d = is_runes() ? derived : derived_safe_equal;
1619
1709
  var pending = blockers.filter((b) => !b.settled);
1710
+ var deriveds = sync.map(d);
1620
1711
  if (async.length === 0 && pending.length === 0) {
1621
- fn(sync.map(d));
1712
+ fn(deriveds);
1622
1713
  return;
1623
1714
  }
1624
1715
  var parent = active_effect;
1625
1716
  var restore = capture();
1626
1717
  var blocker_promise = pending.length === 1 ? pending[0].promise : pending.length > 1 ? Promise.all(pending.map((b) => b.promise)) : null;
1627
- /** @param {Value[]} values */
1628
- function finish(values) {
1718
+ /**
1719
+ * @param {Source[]} async
1720
+ */
1721
+ function finish(async) {
1722
+ if ((parent.f & 16384) !== 0) return;
1629
1723
  restore();
1630
1724
  try {
1631
- fn(values);
1725
+ fn([...deriveds, ...async]);
1632
1726
  } catch (error) {
1633
- if ((parent.f & 16384) === 0) invoke_error_boundary(error, parent);
1727
+ invoke_error_boundary(error, parent);
1634
1728
  }
1635
1729
  unset_context();
1636
1730
  }
1731
+ var decrement_pending = increment_pending();
1637
1732
  if (async.length === 0) {
1638
- /** @type {Promise<any>} */ blocker_promise.then(() => finish(sync.map(d)));
1733
+ /** @type {Promise<any>} */ blocker_promise.then(() => finish([])).finally(decrement_pending);
1639
1734
  return;
1640
1735
  }
1641
- var decrement_pending = increment_pending();
1642
1736
  function run() {
1643
- Promise.all(async.map((expression) => /* @__PURE__ */ async_derived(expression))).then((result) => finish([...sync.map(d), ...result])).catch((error) => invoke_error_boundary(error, parent)).finally(() => decrement_pending());
1737
+ Promise.all(async.map((expression) => /* @__PURE__ */ async_derived(expression))).then(finish).catch((error) => invoke_error_boundary(error, parent)).finally(decrement_pending);
1644
1738
  }
1645
1739
  if (blocker_promise) blocker_promise.then(() => {
1646
1740
  restore();
@@ -1682,12 +1776,12 @@ function increment_pending() {
1682
1776
  var effect = active_effect;
1683
1777
  var boundary = effect.b;
1684
1778
  var batch = current_batch;
1685
- var blocking = boundary.is_rendered();
1686
- boundary.update_pending_count(1, batch);
1779
+ var blocking = !!boundary?.is_rendered();
1780
+ boundary?.update_pending_count(1, batch);
1687
1781
  batch.increment(blocking, effect);
1688
- return (skip = false) => {
1689
- boundary.update_pending_count(-1, batch);
1690
- batch.decrement(blocking, effect, skip);
1782
+ return () => {
1783
+ boundary?.update_pending_count(-1, batch);
1784
+ batch.decrement(blocking, effect);
1691
1785
  };
1692
1786
  }
1693
1787
  /**
@@ -1695,7 +1789,7 @@ function increment_pending() {
1695
1789
  * @param {() => V} fn
1696
1790
  * @returns {Derived<V>}
1697
1791
  */
1698
- /* @__NO_SIDE_EFFECTS__ */
1792
+ /*#__NO_SIDE_EFFECTS__*/
1699
1793
  function derived(fn) {
1700
1794
  var flags = 2 | DIRTY;
1701
1795
  if (active_effect !== null) active_effect.f |= EFFECT_PRESERVED;
@@ -1714,6 +1808,7 @@ function derived(fn) {
1714
1808
  ac: null
1715
1809
  };
1716
1810
  }
1811
+ var OBSOLETE = Symbol("obsolete");
1717
1812
  /**
1718
1813
  * @template V
1719
1814
  * @param {() => V | Promise<V>} fn
@@ -1721,22 +1816,24 @@ function derived(fn) {
1721
1816
  * @param {string} [location] If provided, print a warning if the value is not read immediately after update
1722
1817
  * @returns {Promise<Source<V>>}
1723
1818
  */
1724
- /* @__NO_SIDE_EFFECTS__ */
1819
+ /*#__NO_SIDE_EFFECTS__*/
1725
1820
  function async_derived(fn, label, location) {
1726
1821
  let parent = active_effect;
1727
1822
  if (parent === null) async_derived_orphan();
1728
1823
  var promise = void 0;
1729
1824
  var signal = source(UNINITIALIZED);
1730
1825
  var should_suspend = !active_reaction;
1731
- /** @type {Map<Batch, ReturnType<typeof deferred<V>>>} */
1732
- var deferreds = /* @__PURE__ */ new Map();
1826
+ /** @type {Set<ReturnType<typeof deferred<V>>>} */
1827
+ var deferreds = /* @__PURE__ */ new Set();
1733
1828
  async_effect(() => {
1734
1829
  var effect = active_effect;
1735
1830
  /** @type {ReturnType<typeof deferred<V>>} */
1736
1831
  var d = deferred();
1737
1832
  promise = d.promise;
1738
1833
  try {
1739
- Promise.resolve(fn()).then(d.resolve, d.reject).finally(unset_context);
1834
+ Promise.resolve(fn()).then(d.resolve, (e) => {
1835
+ if (e !== STALE_REACTION) d.reject(e);
1836
+ }).finally(unset_context);
1740
1837
  } catch (error) {
1741
1838
  d.reject(error);
1742
1839
  unset_context();
@@ -1744,22 +1841,19 @@ function async_derived(fn, label, location) {
1744
1841
  var batch = current_batch;
1745
1842
  if (should_suspend) {
1746
1843
  if ((effect.f & 32768) !== 0) var decrement_pending = increment_pending();
1747
- if (parent.b.is_rendered()) {
1748
- deferreds.get(batch)?.reject(STALE_REACTION);
1749
- deferreds.delete(batch);
1750
- } else {
1751
- for (const d of deferreds.values()) d.reject(STALE_REACTION);
1752
- deferreds.clear();
1753
- }
1754
- deferreds.set(batch, d);
1844
+ if (parent.b?.is_rendered()) batch.async_deriveds.get(effect)?.reject(OBSOLETE);
1845
+ else for (const d of deferreds.values()) d.reject(OBSOLETE);
1846
+ deferreds.add(d);
1847
+ batch.async_deriveds.set(effect, d);
1755
1848
  }
1756
1849
  /**
1757
1850
  * @param {any} value
1758
1851
  * @param {unknown} error
1759
1852
  */
1760
1853
  const handler = (value, error = void 0) => {
1761
- if (decrement_pending) decrement_pending(error === STALE_REACTION);
1762
- if (error === STALE_REACTION || (effect.f & 16384) !== 0) return;
1854
+ decrement_pending?.();
1855
+ deferreds.delete(d);
1856
+ if (error === OBSOLETE) return;
1763
1857
  batch.activate();
1764
1858
  if (error) {
1765
1859
  signal.f |= ERROR_VALUE;
@@ -1767,18 +1861,13 @@ function async_derived(fn, label, location) {
1767
1861
  } else {
1768
1862
  if ((signal.f & 8388608) !== 0) signal.f ^= ERROR_VALUE;
1769
1863
  internal_set(signal, value);
1770
- for (const [b, d] of deferreds) {
1771
- deferreds.delete(b);
1772
- if (b === batch) break;
1773
- d.reject(STALE_REACTION);
1774
- }
1775
1864
  }
1776
1865
  batch.deactivate();
1777
1866
  };
1778
1867
  d.promise.then(handler, (e) => handler(null, e || "unknown"));
1779
1868
  });
1780
1869
  teardown(() => {
1781
- for (const d of deferreds.values()) d.reject(STALE_REACTION);
1870
+ for (const d of deferreds) d.reject(OBSOLETE);
1782
1871
  });
1783
1872
  return new Promise((fulfil) => {
1784
1873
  /** @param {Promise<V>} p */
@@ -1797,7 +1886,7 @@ function async_derived(fn, label, location) {
1797
1886
  * @param {() => V} fn
1798
1887
  * @returns {Derived<V>}
1799
1888
  */
1800
- /* @__NO_SIDE_EFFECTS__ */
1889
+ /*#__NO_SIDE_EFFECTS__*/
1801
1890
  function user_derived(fn) {
1802
1891
  const d = /* @__PURE__ */ derived(fn);
1803
1892
  if (!async_mode_flag) push_reaction_value(d);
@@ -1808,7 +1897,7 @@ function user_derived(fn) {
1808
1897
  * @param {() => V} fn
1809
1898
  * @returns {Derived<V>}
1810
1899
  */
1811
- /* @__NO_SIDE_EFFECTS__ */
1900
+ /*#__NO_SIDE_EFFECTS__*/
1812
1901
  function derived_safe_equal(fn) {
1813
1902
  const signal = /* @__PURE__ */ derived(fn);
1814
1903
  signal.equals = safe_equals;
@@ -1834,7 +1923,7 @@ function execute_derived(derived) {
1834
1923
  var value;
1835
1924
  var prev_active_effect = active_effect;
1836
1925
  var parent = derived.parent;
1837
- if (!is_destroying_effect && parent !== null && (parent.f & 24576) !== 0) {
1926
+ if (!is_destroying_effect && parent !== null && derived.v !== UNINITIALIZED && (parent.f & 24576) !== 0) {
1838
1927
  derived_inert();
1839
1928
  return derived.v;
1840
1929
  }
@@ -1857,8 +1946,10 @@ function update_derived(derived) {
1857
1946
  if (!derived.equals(value)) {
1858
1947
  derived.wv = increment_write_version();
1859
1948
  if (!current_batch?.is_fork || derived.deps === null) {
1860
- if (current_batch !== null) current_batch.capture(derived, value, true);
1861
- else derived.v = value;
1949
+ if (current_batch !== null) {
1950
+ current_batch.capture(derived, value, true);
1951
+ previous_batch?.capture(derived, value, true);
1952
+ } else derived.v = value;
1862
1953
  if (derived.deps === null) {
1863
1954
  set_signal_status(derived, CLEAN);
1864
1955
  return;
@@ -1878,7 +1969,7 @@ function freeze_derived_effects(derived) {
1878
1969
  for (const e of derived.effects) if (e.teardown || e.ac) {
1879
1970
  e.teardown?.();
1880
1971
  e.ac?.abort(STALE_REACTION);
1881
- e.teardown = noop;
1972
+ if (e.fn !== null) e.teardown = noop;
1882
1973
  e.ac = null;
1883
1974
  remove_reactions(e, 0);
1884
1975
  destroy_effect_children(e);
@@ -1889,12 +1980,12 @@ function freeze_derived_effects(derived) {
1889
1980
  */
1890
1981
  function unfreeze_derived_effects(derived) {
1891
1982
  if (derived.effects === null) return;
1892
- for (const e of derived.effects) if (e.teardown) update_effect(e);
1983
+ for (const e of derived.effects) if (e.teardown && e.fn !== null) update_effect(e);
1893
1984
  }
1894
1985
  //#endregion
1895
- //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/reactivity/sources.js
1986
+ //#region ../../../node_modules/.bun/svelte@5.56.1/node_modules/svelte/src/internal/client/reactivity/sources.js
1896
1987
  /** @import { Derived, Effect, Source, Value } from '#client' */
1897
- /** @type {Set<any>} */
1988
+ /** @type {Set<Effect>} */
1898
1989
  var eager_effects = /* @__PURE__ */ new Set();
1899
1990
  /** @type {Map<Source, any>} */
1900
1991
  var old_values = /* @__PURE__ */ new Map();
@@ -1920,7 +2011,7 @@ function source(v, stack) {
1920
2011
  * @param {V} v
1921
2012
  * @param {Error | null} [stack]
1922
2013
  */
1923
- /* @__NO_SIDE_EFFECTS__ */
2014
+ /*#__NO_SIDE_EFFECTS__*/
1924
2015
  function state(v, stack) {
1925
2016
  const s = source(v, stack);
1926
2017
  push_reaction_value(s);
@@ -1932,7 +2023,7 @@ function state(v, stack) {
1932
2023
  * @param {boolean} [immutable]
1933
2024
  * @returns {Source<V>}
1934
2025
  */
1935
- /* @__NO_SIDE_EFFECTS__ */
2026
+ /*#__NO_SIDE_EFFECTS__*/
1936
2027
  function mutable_source(initial_value, immutable = false, trackable = true) {
1937
2028
  const s = source(initial_value);
1938
2029
  if (!immutable) s.equals = safe_equals;
@@ -1950,7 +2041,7 @@ function mutable_source(initial_value, immutable = false, trackable = true) {
1950
2041
  * @returns {V}
1951
2042
  */
1952
2043
  function set(source, value, should_proxy = false) {
1953
- 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();
2044
+ 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();
1954
2045
  return internal_set(source, should_proxy ? proxy(value) : value, legacy_updates);
1955
2046
  }
1956
2047
  /**
@@ -1982,7 +2073,13 @@ function flush_eager_effects() {
1982
2073
  eager_effects_deferred = false;
1983
2074
  for (const effect of eager_effects) {
1984
2075
  if ((effect.f & 1024) !== 0) set_signal_status(effect, MAYBE_DIRTY);
1985
- if (is_dirty(effect)) update_effect(effect);
2076
+ let dirty;
2077
+ try {
2078
+ dirty = is_dirty(effect);
2079
+ } catch {
2080
+ dirty = true;
2081
+ }
2082
+ if (dirty) update_effect(effect);
1986
2083
  }
1987
2084
  eager_effects.clear();
1988
2085
  }
@@ -2010,7 +2107,8 @@ function mark_reactions(signal, status, updated_during_traversal) {
2010
2107
  if (!runes && reaction === active_effect) continue;
2011
2108
  var not_dirty = (flags & DIRTY) === 0;
2012
2109
  if (not_dirty) set_signal_status(reaction, status);
2013
- if ((flags & 2) !== 0) {
2110
+ if ((flags & 131072) !== 0) eager_effects.add(reaction);
2111
+ else if ((flags & 2) !== 0) {
2014
2112
  var derived = reaction;
2015
2113
  batch_values?.delete(derived);
2016
2114
  if ((flags & 65536) === 0) {
@@ -2183,8 +2281,19 @@ function proxy(value) {
2183
2281
  }
2184
2282
  });
2185
2283
  }
2284
+ new Set([
2285
+ "copyWithin",
2286
+ "fill",
2287
+ "pop",
2288
+ "push",
2289
+ "reverse",
2290
+ "shift",
2291
+ "sort",
2292
+ "splice",
2293
+ "unshift"
2294
+ ]);
2186
2295
  //#endregion
2187
- //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/dom/operations.js
2296
+ //#region ../../../node_modules/.bun/svelte@5.56.1/node_modules/svelte/src/internal/client/dom/operations.js
2188
2297
  /** @import { Effect, TemplateNode } from '#client' */
2189
2298
  /** @type {Window} */
2190
2299
  var $window;
@@ -2208,13 +2317,13 @@ function init_operations() {
2208
2317
  first_child_getter = get_descriptor(node_prototype, "firstChild").get;
2209
2318
  next_sibling_getter = get_descriptor(node_prototype, "nextSibling").get;
2210
2319
  if (is_extensible(element_prototype)) {
2211
- element_prototype.__click = void 0;
2212
- element_prototype.__className = void 0;
2213
- element_prototype.__attributes = null;
2214
- element_prototype.__style = void 0;
2320
+ /** @type {any} */ element_prototype[CLASS_CACHE] = void 0;
2321
+ /** @type {any} */ element_prototype[ATTRIBUTES_CACHE] = null;
2322
+ /** @type {any} */ element_prototype[STYLE_CACHE] = void 0;
2215
2323
  element_prototype.__e = void 0;
2216
2324
  }
2217
- if (is_extensible(text_prototype)) text_prototype.__t = void 0;
2325
+ if (is_extensible(text_prototype))
2326
+ /** @type {any} */ text_prototype[TEXT_CACHE] = void 0;
2218
2327
  }
2219
2328
  /**
2220
2329
  * @param {string} value
@@ -2227,7 +2336,7 @@ function create_text(value = "") {
2227
2336
  * @template {Node} N
2228
2337
  * @param {N} node
2229
2338
  */
2230
- /* @__NO_SIDE_EFFECTS__ */
2339
+ /*@__NO_SIDE_EFFECTS__*/
2231
2340
  function get_first_child(node) {
2232
2341
  return first_child_getter.call(node);
2233
2342
  }
@@ -2235,7 +2344,7 @@ function get_first_child(node) {
2235
2344
  * @template {Node} N
2236
2345
  * @param {N} node
2237
2346
  */
2238
- /* @__NO_SIDE_EFFECTS__ */
2347
+ /*@__NO_SIDE_EFFECTS__*/
2239
2348
  function get_next_sibling(node) {
2240
2349
  return next_sibling_getter.call(node);
2241
2350
  }
@@ -2331,6 +2440,12 @@ function should_defer_append() {
2331
2440
  return (active_effect.f & REACTION_RAN) !== 0;
2332
2441
  }
2333
2442
  /**
2443
+ * Branching here is intentional and load-bearing for perf. `createElement(tag)`
2444
+ * hits a fast path in Blink that `createElementNS(NAMESPACE_HTML, tag)` doesn't,
2445
+ * and passing an explicit `undefined` as the trailing options arg measurably
2446
+ * slows both APIs. Funnelling every case through a single `createElementNS(ns,
2447
+ * tag, options)` call would be smaller but slower on the HTML path.
2448
+ *
2334
2449
  * @template {keyof HTMLElementTagNameMap | string} T
2335
2450
  * @param {T} tag
2336
2451
  * @param {string} [namespace]
@@ -2338,8 +2453,8 @@ function should_defer_append() {
2338
2453
  * @returns {T extends keyof HTMLElementTagNameMap ? HTMLElementTagNameMap[T] : Element}
2339
2454
  */
2340
2455
  function create_element(tag, namespace, is) {
2341
- let options = is ? { is } : void 0;
2342
- return document.createElementNS(namespace ?? "http://www.w3.org/1999/xhtml", tag, options);
2456
+ if (namespace == null || namespace === "http://www.w3.org/1999/xhtml") return is ? document.createElement(tag, { is }) : document.createElement(tag);
2457
+ return is ? document.createElementNS(namespace, tag, { is }) : document.createElementNS(namespace, tag);
2343
2458
  }
2344
2459
  /**
2345
2460
  * Browsers split text nodes larger than 65536 bytes when parsing.
@@ -2356,7 +2471,7 @@ function merge_text_nodes(text) {
2356
2471
  }
2357
2472
  }
2358
2473
  //#endregion
2359
- //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/dom/elements/bindings/shared.js
2474
+ //#region ../../../node_modules/.bun/svelte@5.56.1/node_modules/svelte/src/internal/client/dom/elements/bindings/shared.js
2360
2475
  /**
2361
2476
  * @template T
2362
2477
  * @param {() => T} fn
@@ -2374,7 +2489,7 @@ function without_reactive_context(fn) {
2374
2489
  }
2375
2490
  }
2376
2491
  //#endregion
2377
- //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/reactivity/effects.js
2492
+ //#region ../../../node_modules/.bun/svelte@5.56.1/node_modules/svelte/src/internal/client/reactivity/effects.js
2378
2493
  /** @import { Blocker, ComponentContext, ComponentContextLegacy, Derived, Effect, TemplateNode, TransitionManager } from '#client' */
2379
2494
  /**
2380
2495
  * @param {'$effect' | '$effect.pre' | '$inspect'} rune
@@ -2474,7 +2589,7 @@ function teardown(fn) {
2474
2589
  function user_effect(fn) {
2475
2590
  validate_effect("$effect");
2476
2591
  var flags = active_effect.f;
2477
- if (!active_reaction && (flags & 32) !== 0 && (flags & 32768) === 0) {
2592
+ if (!active_reaction && (flags & 32) !== 0 && component_context !== null && !component_context.i) {
2478
2593
  var context = component_context;
2479
2594
  (context.e ?? (context.e = [])).push(fn);
2480
2595
  } else return create_user_effect(fn);
@@ -2547,7 +2662,9 @@ function render_effect(fn, flags = 0) {
2547
2662
  */
2548
2663
  function template_effect(fn, sync = [], async = [], blockers = []) {
2549
2664
  flatten(blockers, sync, async, (values) => {
2550
- create_effect(8, () => fn(...values.map(get)));
2665
+ create_effect(8, () => {
2666
+ fn(...values.map(get));
2667
+ });
2551
2668
  });
2552
2669
  }
2553
2670
  /**
@@ -2623,7 +2740,7 @@ function destroy_effect(effect, remove_dom = true) {
2623
2740
  remove_effect_dom(effect.nodes.start, effect.nodes.end);
2624
2741
  removed = true;
2625
2742
  }
2626
- set_signal_status(effect, DESTROYING);
2743
+ effect.f |= DESTROYING;
2627
2744
  destroy_effect_children(effect, remove_dom && !removed);
2628
2745
  remove_reactions(effect, 0);
2629
2746
  var transitions = effect.nodes && effect.nodes.t;
@@ -2758,14 +2875,14 @@ function move_effect(effect, fragment) {
2758
2875
  }
2759
2876
  }
2760
2877
  //#endregion
2761
- //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/legacy.js
2878
+ //#region ../../../node_modules/.bun/svelte@5.56.1/node_modules/svelte/src/internal/client/legacy.js
2762
2879
  /**
2763
2880
  * @type {Set<Value> | null}
2764
2881
  * @deprecated
2765
2882
  */
2766
2883
  var captured_signals = null;
2767
2884
  //#endregion
2768
- //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/runtime.js
2885
+ //#region ../../../node_modules/.bun/svelte@5.56.1/node_modules/svelte/src/internal/client/runtime.js
2769
2886
  /** @import { Derived, Effect, Reaction, Source, Value } from '#client' */
2770
2887
  var is_updating_effect = false;
2771
2888
  var is_destroying_effect = false;
@@ -2789,13 +2906,12 @@ function set_active_effect(effect) {
2789
2906
  /**
2790
2907
  * When sources are created within a reaction, reading and writing
2791
2908
  * them within that reaction should not cause a re-run
2792
- * @type {null | Source[]}
2909
+ * @type {null | Set<Source>}
2793
2910
  */
2794
2911
  var current_sources = null;
2795
2912
  /** @param {Value} value */
2796
2913
  function push_reaction_value(value) {
2797
- if (active_reaction !== null && (!async_mode_flag || (active_reaction.f & 2) !== 0)) if (current_sources === null) current_sources = [value];
2798
- else current_sources.push(value);
2914
+ if (active_reaction !== null && (!async_mode_flag || (active_reaction.f & 2) !== 0)) (current_sources ?? (current_sources = /* @__PURE__ */ new Set())).add(value);
2799
2915
  }
2800
2916
  /**
2801
2917
  * The dependencies of the reaction that is currently being executed. In many cases,
@@ -2860,7 +2976,7 @@ function is_dirty(reaction) {
2860
2976
  function schedule_possible_effect_self_invalidation(signal, effect, root = true) {
2861
2977
  var reactions = signal.reactions;
2862
2978
  if (reactions === null) return;
2863
- if (!async_mode_flag && current_sources !== null && includes.call(current_sources, signal)) return;
2979
+ if (!async_mode_flag && current_sources !== null && current_sources.has(signal)) return;
2864
2980
  for (var i = 0; i < reactions.length; i++) {
2865
2981
  var reaction = reactions[i];
2866
2982
  if ((reaction.f & 2) !== 0) schedule_possible_effect_self_invalidation(reaction, effect, false);
@@ -3015,7 +3131,7 @@ function get(signal) {
3015
3131
  var is_derived = (signal.f & 2) !== 0;
3016
3132
  captured_signals?.add(signal);
3017
3133
  if (active_reaction !== null && !untracking) {
3018
- if (!(active_effect !== null && (active_effect.f & 16384) !== 0) && (current_sources === null || !includes.call(current_sources, signal))) {
3134
+ if (!(active_effect !== null && (active_effect.f & 16384) !== 0) && (current_sources === null || !current_sources.has(signal))) {
3019
3135
  var deps = active_reaction.deps;
3020
3136
  if ((active_reaction.f & 2097152) !== 0) {
3021
3137
  if (signal.rv < read_version) {
@@ -3026,7 +3142,8 @@ function get(signal) {
3026
3142
  }
3027
3143
  } else {
3028
3144
  var _active_reaction;
3029
- ((_active_reaction = active_reaction).deps ?? (_active_reaction.deps = [])).push(signal);
3145
+ (_active_reaction = active_reaction).deps ?? (_active_reaction.deps = []);
3146
+ if (!includes.call(active_reaction.deps, signal)) active_reaction.deps.push(signal);
3030
3147
  var reactions = signal.reactions;
3031
3148
  if (reactions === null) signal.reactions = [active_reaction];
3032
3149
  else if (!includes.call(reactions, active_reaction)) reactions.push(active_reaction);
@@ -3109,7 +3226,7 @@ function untrack(fn) {
3109
3226
  }
3110
3227
  }
3111
3228
  //#endregion
3112
- //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/dom/elements/events.js
3229
+ //#region ../../../node_modules/.bun/svelte@5.56.1/node_modules/svelte/src/internal/client/dom/elements/events.js
3113
3230
  /**
3114
3231
  * Used on elements, as a map of event type -> event handler,
3115
3232
  * and on events themselves to track which element handled an event
@@ -3166,8 +3283,7 @@ function handle_event_propagation(event) {
3166
3283
  */
3167
3284
  var other_errors = [];
3168
3285
  while (current_target !== null) {
3169
- /** @type {null | Element} */
3170
- var parent_element = current_target.assignedSlot || current_target.parentNode || current_target.host || null;
3286
+ if (current_target === handler_element) break;
3171
3287
  try {
3172
3288
  var delegated = current_target[event_symbol]?.[event_name];
3173
3289
  if (delegated != null && (!current_target.disabled || event.target === current_target)) delegated.call(current_target, event);
@@ -3175,8 +3291,9 @@ function handle_event_propagation(event) {
3175
3291
  if (throw_error) other_errors.push(error);
3176
3292
  else throw_error = error;
3177
3293
  }
3178
- if (event.cancelBubble || parent_element === handler_element || parent_element === null) break;
3179
- current_target = parent_element;
3294
+ if (event.cancelBubble) break;
3295
+ path_idx++;
3296
+ current_target = path_idx < path.length ? path[path_idx] : null;
3180
3297
  }
3181
3298
  if (throw_error) {
3182
3299
  for (let error of other_errors) queueMicrotask(() => {
@@ -3192,7 +3309,7 @@ function handle_event_propagation(event) {
3192
3309
  }
3193
3310
  }
3194
3311
  //#endregion
3195
- //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/dom/reconciler.js
3312
+ //#region ../../../node_modules/.bun/svelte@5.56.1/node_modules/svelte/src/internal/client/dom/reconciler.js
3196
3313
  var policy = globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", {
3197
3314
  /** @param {string} html */
3198
3315
  createHTML: (html) => {
@@ -3211,7 +3328,7 @@ function create_fragment_from_html(html) {
3211
3328
  return elem.content;
3212
3329
  }
3213
3330
  //#endregion
3214
- //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/dom/template.js
3331
+ //#region ../../../node_modules/.bun/svelte@5.56.1/node_modules/svelte/src/internal/client/dom/template.js
3215
3332
  /** @import { Effect, EffectNodes, TemplateNode } from '#client' */
3216
3333
  /** @import { TemplateStructure } from './types' */
3217
3334
  /**
@@ -3232,7 +3349,7 @@ function assign_nodes(start, end) {
3232
3349
  * @param {number} flags
3233
3350
  * @returns {() => Node | Node[]}
3234
3351
  */
3235
- /* @__NO_SIDE_EFFECTS__ */
3352
+ /*#__NO_SIDE_EFFECTS__*/
3236
3353
  function from_html(content, flags) {
3237
3354
  var is_fragment = (flags & 1) !== 0;
3238
3355
  var use_import_node = (flags & 2) !== 0;
@@ -3333,9 +3450,10 @@ function is_passive_event(name) {
3333
3450
  * @returns {void}
3334
3451
  */
3335
3452
  function set_text(text, value) {
3453
+ var _text;
3336
3454
  var str = value == null ? "" : typeof value === "object" ? `${value}` : value;
3337
- if (str !== (text.__t ?? (text.__t = text.nodeValue))) {
3338
- text.__t = str;
3455
+ if (str !== ((_text = text)[TEXT_CACHE] ?? (_text[TEXT_CACHE] = text.nodeValue))) {
3456
+ /** @type {any} */ text[TEXT_CACHE] = str;
3339
3457
  text.nodeValue = `${str}`;
3340
3458
  }
3341
3459
  }
@@ -3515,7 +3633,7 @@ function unmount(component, options) {
3515
3633
  return Promise.resolve();
3516
3634
  }
3517
3635
  //#endregion
3518
- //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/dom/blocks/branches.js
3636
+ //#region ../../../node_modules/.bun/svelte@5.56.1/node_modules/svelte/src/internal/client/dom/blocks/branches.js
3519
3637
  /** @import { Effect, TemplateNode } from '#client' */
3520
3638
  var _batches = /* @__PURE__ */ new WeakMap();
3521
3639
  var _onscreen = /* @__PURE__ */ new WeakMap();
@@ -3557,6 +3675,7 @@ var BranchManager = class {
3557
3675
  } else {
3558
3676
  var offscreen = _classPrivateFieldGet2(_offscreen, this).get(key);
3559
3677
  if (offscreen) {
3678
+ resume_effect(offscreen.effect);
3560
3679
  _classPrivateFieldGet2(_onscreen, this).set(key, offscreen.effect);
3561
3680
  _classPrivateFieldGet2(_offscreen, this).delete(key);
3562
3681
  /** @type {TemplateNode} */ offscreen.fragment.lastChild.remove();
@@ -3637,7 +3756,7 @@ var BranchManager = class {
3637
3756
  }
3638
3757
  };
3639
3758
  //#endregion
3640
- //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/dom/blocks/if.js
3759
+ //#region ../../../node_modules/.bun/svelte@5.56.1/node_modules/svelte/src/internal/client/dom/blocks/if.js
3641
3760
  /** @import { TemplateNode } from '#client' */
3642
3761
  /**
3643
3762
  * @param {TemplateNode} node
@@ -3683,7 +3802,7 @@ function if_block(node, fn, elseif = false) {
3683
3802
  }, flags);
3684
3803
  }
3685
3804
  //#endregion
3686
- //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/dom/blocks/each.js
3805
+ //#region ../../../node_modules/.bun/svelte@5.56.1/node_modules/svelte/src/internal/client/dom/blocks/each.js
3687
3806
  /** @import { EachItem, EachOutroGroup, EachState, Effect, EffectNodes, MaybeSource, Source, TemplateNode, TransitionManager, Value } from '#client' */
3688
3807
  /** @import { Batch } from '../../reactivity/batch.js'; */
3689
3808
  /**
@@ -4155,7 +4274,7 @@ function html(node, get_value, is_controlled = false, svg = false, mathml = fals
4155
4274
  });
4156
4275
  }
4157
4276
  //#endregion
4158
- //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/dom/css.js
4277
+ //#region ../../../node_modules/.bun/svelte@5.56.1/node_modules/svelte/src/internal/client/dom/css.js
4159
4278
  /**
4160
4279
  * @param {Node} anchor
4161
4280
  * @param {{ hash: string, code: string }} css
@@ -4173,7 +4292,7 @@ function append_styles(anchor, css) {
4173
4292
  });
4174
4293
  }
4175
4294
  //#endregion
4176
- //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/dom/elements/attributes.js
4295
+ //#region ../../../node_modules/.bun/svelte@5.56.1/node_modules/svelte/src/internal/client/dom/elements/attributes.js
4177
4296
  /** @import { Blocker, Effect } from '#client' */
4178
4297
  var IS_CUSTOM_ELEMENT = Symbol("is custom element");
4179
4298
  var IS_HTML = Symbol("is html");
@@ -4204,7 +4323,8 @@ function set_attribute(element, attribute, value, skip_warning) {
4204
4323
  * @param {Element} element
4205
4324
  */
4206
4325
  function get_attributes(element) {
4207
- return element.__attributes ?? (element.__attributes = {
4326
+ var _element;
4327
+ return (_element = element)[ATTRIBUTES_CACHE] ?? (_element[ATTRIBUTES_CACHE] = {
4208
4328
  [IS_CUSTOM_ELEMENT]: element.nodeName.includes("-"),
4209
4329
  [IS_HTML]: element.namespaceURI === "http://www.w3.org/1999/xhtml"
4210
4330
  });
@@ -4222,13 +4342,13 @@ function get_setters(element) {
4222
4342
  var element_proto = Element.prototype;
4223
4343
  while (element_proto !== proto) {
4224
4344
  descriptors = get_descriptors(proto);
4225
- for (var key in descriptors) if (descriptors[key].set) setters.push(key);
4345
+ for (var key in descriptors) if (descriptors[key].set && key !== "innerHTML" && key !== "textContent" && key !== "innerText") setters.push(key);
4226
4346
  proto = get_prototype_of(proto);
4227
4347
  }
4228
4348
  return setters;
4229
4349
  }
4230
4350
  //#endregion
4231
- //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/dom/elements/bindings/size.js
4351
+ //#region ../../../node_modules/.bun/svelte@5.56.1/node_modules/svelte/src/internal/client/dom/elements/bindings/size.js
4232
4352
  var _ResizeObserverSingleton;
4233
4353
  var _listeners = /* @__PURE__ */ new WeakMap();
4234
4354
  var _observer = /* @__PURE__ */ new WeakMap();
@@ -4280,8 +4400,8 @@ function _getObserver() {
4280
4400
  }
4281
4401
  _defineProperty(ResizeObserverSingleton, "entries", /* @__PURE__ */ new WeakMap());
4282
4402
  //#endregion
4283
- //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/reactivity/props.js
4284
- /** @import { Effect, Source } from './types.js' */
4403
+ //#region ../../../node_modules/.bun/svelte@5.56.1/node_modules/svelte/src/internal/client/reactivity/props.js
4404
+ /** @import { Derived, Effect, Source } from './types.js' */
4285
4405
  /**
4286
4406
  * This function is responsible for synchronizing a possibly bound prop with the inner component state.
4287
4407
  * It is used whenever the compiler sees that the component writes to the prop, or when it has a default prop_value.
@@ -4298,7 +4418,12 @@ function prop(props, key, flags, fallback) {
4298
4418
  var lazy = (flags & 16) !== 0;
4299
4419
  var fallback_value = fallback;
4300
4420
  var fallback_dirty = true;
4421
+ var fallback_signal = void 0;
4301
4422
  var get_fallback = () => {
4423
+ if (lazy && runes) {
4424
+ fallback_signal ?? (fallback_signal = /* @__PURE__ */ derived(fallback));
4425
+ return get(fallback_signal);
4426
+ }
4302
4427
  if (fallback_dirty) {
4303
4428
  fallback_dirty = false;
4304
4429
  fallback_value = lazy ? untrack(fallback) : fallback;
@@ -4368,7 +4493,7 @@ function prop(props, key, flags, fallback) {
4368
4493
  });
4369
4494
  }
4370
4495
  //#endregion
4371
- //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/legacy/legacy-client.js
4496
+ //#region ../../../node_modules/.bun/svelte@5.56.1/node_modules/svelte/src/legacy/legacy-client.js
4372
4497
  /** @import { ComponentConstructorOptions, ComponentType, SvelteComponent, Component } from 'svelte' */
4373
4498
  /**
4374
4499
  * Takes the same options as a Svelte 4 component and the component function and returns a Svelte 4 compatible component.
@@ -4487,7 +4612,7 @@ var Svelte4Component = class {
4487
4612
  }
4488
4613
  };
4489
4614
  //#endregion
4490
- //#region ../../../node_modules/.bun/svelte@5.55.5/node_modules/svelte/src/internal/client/dom/elements/custom-element.js
4615
+ //#region ../../../node_modules/.bun/svelte@5.56.1/node_modules/svelte/src/internal/client/dom/elements/custom-element.js
4491
4616
  /**
4492
4617
  * @typedef {Object} CustomElementPropDefinition
4493
4618
  * @property {string} [attribute]
@@ -4773,18 +4898,18 @@ function create_custom_element(Component, props_definition, slots, exports, shad
4773
4898
  }
4774
4899
  //#endregion
4775
4900
  //#region src/print/Print.svelte
4776
- var root_1 = /* @__PURE__ */ from_html(`<div class="mb-4 prose prose-sm svelte-1fx5wwa"></div>`);
4777
- var root_2 = /* @__PURE__ */ from_html(`<div class="mb-2 prose prose-sm svelte-1fx5wwa"></div>`);
4778
- var root_4 = /* @__PURE__ */ from_html(`<img class="max-h-14 object-contain"/>`);
4901
+ var root = /* @__PURE__ */ from_html(`<div class="mb-4 prose prose-sm svelte-1fx5wwa"></div>`);
4902
+ var root_1 = /* @__PURE__ */ from_html(`<div class="mb-2 prose prose-sm svelte-1fx5wwa"></div>`);
4903
+ var root_2 = /* @__PURE__ */ from_html(`<img class="max-h-14 object-contain"/>`);
4779
4904
  var root_3 = /* @__PURE__ */ from_html(`<div class="mb-4 prose prose-sm svelte-1fx5wwa"><!> <span class="inline-block min-w-[6rem] border-b-2 border-gray-600 print:border-black px-1"><!></span> <!></div>`);
4780
- var root_8 = /* @__PURE__ */ from_html(`<div><strong>Audio:</strong> </div>`);
4781
- var root_9 = /* @__PURE__ */ from_html(`<div><strong>Transcript:</strong> </div>`);
4782
- var root_7 = /* @__PURE__ */ from_html(`<div class="text-sm mb-4"><!> <!></div>`);
4783
- var root_11 = /* @__PURE__ */ from_html(`<span class="font-medium"> </span> <!>`, 1);
4784
- var root_14 = /* @__PURE__ */ from_html(`<span class="font-medium">(key)</span>`);
4785
- var root_13 = /* @__PURE__ */ from_html(`<!> <!>`, 1);
4905
+ var root_4 = /* @__PURE__ */ from_html(`<div><strong>Audio:</strong> </div>`);
4906
+ var root_5 = /* @__PURE__ */ from_html(`<div><strong>Transcript:</strong> </div>`);
4907
+ var root_6 = /* @__PURE__ */ from_html(`<div class="text-sm mb-4"><!> <!></div>`);
4908
+ var root_7 = /* @__PURE__ */ from_html(`<span class="font-medium"> </span> <!>`, 1);
4909
+ var root_8 = /* @__PURE__ */ from_html(`<span class="font-medium">(key)</span>`);
4910
+ var root_9 = /* @__PURE__ */ from_html(`<!> <!>`, 1);
4786
4911
  var root_10 = /* @__PURE__ */ from_html(`<li><!></li>`);
4787
- var root = /* @__PURE__ */ from_html(`<div class="p-4 print:p-0"><!> <!> <!> <!> <ul class="text-sm list-disc pl-5"></ul></div>`);
4912
+ var root_11 = /* @__PURE__ */ from_html(`<div class="p-4 print:p-0"><!> <!> <!> <!> <ul class="text-sm list-disc pl-5"></ul></div>`);
4788
4913
  var $$css = {
4789
4914
  hash: "svelte-1fx5wwa",
4790
4915
  code: ".prose.svelte-1fx5wwa p {margin:0.5em 0;}.prose.svelte-1fx5wwa strong {font-weight:600;}"
@@ -4825,10 +4950,10 @@ function Print($$anchor, $$props) {
4825
4950
  flushSync();
4826
4951
  }
4827
4952
  };
4828
- var div = root();
4953
+ var div = root_11();
4829
4954
  var node = child(div);
4830
4955
  var consequent = ($$anchor) => {
4831
- var div_1 = root_1();
4956
+ var div_1 = root();
4832
4957
  html(div_1, () => get(prompt), true);
4833
4958
  reset(div_1);
4834
4959
  append($$anchor, div_1);
@@ -4838,7 +4963,7 @@ function Print($$anchor, $$props) {
4838
4963
  });
4839
4964
  var node_1 = sibling(node, 2);
4840
4965
  var consequent_1 = ($$anchor) => {
4841
- var div_2 = root_2();
4966
+ var div_2 = root_1();
4842
4967
  html(div_2, () => model().sentenceHtml, true);
4843
4968
  reset(div_2);
4844
4969
  append($$anchor, div_2);
@@ -4854,7 +4979,7 @@ function Print($$anchor, $$props) {
4854
4979
  var span = sibling(node_3, 2);
4855
4980
  var node_4 = child(span);
4856
4981
  var consequent_2 = ($$anchor) => {
4857
- var img = root_4();
4982
+ var img = root_2();
4858
4983
  template_effect(() => {
4859
4984
  set_attribute(img, "src", get(correct).imageUrl);
4860
4985
  set_attribute(img, "alt", get(correct).imageAlt || "");
@@ -4884,10 +5009,10 @@ function Print($$anchor, $$props) {
4884
5009
  });
4885
5010
  var node_7 = sibling(node_2, 2);
4886
5011
  var consequent_7 = ($$anchor) => {
4887
- var div_4 = root_7();
5012
+ var div_4 = root_6();
4888
5013
  var node_8 = child(div_4);
4889
5014
  var consequent_5 = ($$anchor) => {
4890
- var div_5 = root_8();
5015
+ var div_5 = root_4();
4891
5016
  var text_1 = sibling(child(div_5));
4892
5017
  reset(div_5);
4893
5018
  template_effect(() => set_text(text_1, ` ${model().audioUrl ?? ""}`));
@@ -4898,7 +5023,7 @@ function Print($$anchor, $$props) {
4898
5023
  });
4899
5024
  var node_9 = sibling(node_8, 2);
4900
5025
  var consequent_6 = ($$anchor) => {
4901
- var div_6 = root_9();
5026
+ var div_6 = root_5();
4902
5027
  var text_2 = sibling(child(div_6));
4903
5028
  reset(div_6);
4904
5029
  template_effect(() => set_text(text_2, ` ${model().audioTranscript ?? ""}`));
@@ -4918,7 +5043,7 @@ function Print($$anchor, $$props) {
4918
5043
  var li = root_10();
4919
5044
  var node_10 = child(li);
4920
5045
  var consequent_9 = ($$anchor) => {
4921
- var fragment_1 = root_11();
5046
+ var fragment_1 = root_7();
4922
5047
  var span_1 = first_child(fragment_1);
4923
5048
  var text_3 = child(span_1, true);
4924
5049
  reset(span_1);
@@ -4933,12 +5058,12 @@ function Print($$anchor, $$props) {
4933
5058
  append($$anchor, fragment_1);
4934
5059
  };
4935
5060
  var alternate_1 = ($$anchor) => {
4936
- var fragment_2 = root_13();
5061
+ var fragment_2 = root_9();
4937
5062
  var node_12 = first_child(fragment_2);
4938
5063
  html(node_12, () => get(c).labelHtml || "");
4939
5064
  var node_13 = sibling(node_12, 2);
4940
5065
  var consequent_10 = ($$anchor) => {
4941
- append($$anchor, root_14());
5066
+ append($$anchor, root_8());
4942
5067
  };
4943
5068
  if_block(node_13, ($$render) => {
4944
5069
  if (get(showAnswerKey) && get(c).id === model()?.correctChoiceId) $$render(consequent_10);