@pie-element/mc-populated-blank 0.2.13-next.3 → 0.3.0-next.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/author/index.js +1172 -1150
- package/dist/author/index.js.map +1 -1
- package/dist/browser/author/index.js +7 -7
- package/dist/browser/{client-B0miu8E8.js → client-BAfWqkS6.js} +1024 -1080
- package/dist/browser/client-BAfWqkS6.js.map +1 -0
- package/dist/browser/controller/index.js +0 -2
- package/dist/browser/controller/index.js.map +1 -1
- package/dist/browser/delivery/index.js +354 -529
- package/dist/browser/delivery/index.js.map +1 -1
- package/dist/browser/print/index.js +58 -58
- package/dist/browser/print/index.js.map +1 -1
- package/dist/controller/defaults.d.ts +0 -1
- package/dist/controller/index.d.ts +0 -2
- package/dist/controller/index.js +0 -2
- package/dist/controller/index.js.map +1 -1
- package/dist/delivery/computeLayoutStyle.d.ts +0 -1
- package/dist/delivery/index.js +1438 -1614
- package/dist/delivery/index.js.map +1 -1
- package/dist/index.iife.d.ts +0 -2
- package/dist/index.iife.js +105 -30
- package/dist/index.js +1438 -1614
- package/dist/index.js.map +1 -1
- package/dist/print/index.js +1318 -1299
- package/dist/print/index.js.map +1 -1
- package/dist/shared/types.d.ts +9 -1
- package/module/print.js +2312 -0
- package/module/print.js.map +1 -0
- package/package.json +13 -7
- package/dist/browser/client-B0miu8E8.js.map +0 -1
package/dist/delivery/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
//#region ../../../node_modules/.bun/svelte@5.56.
|
|
1
|
+
//#region ../../../node_modules/.bun/svelte@5.56.8/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.56.
|
|
7
|
+
//#region ../../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/constants.js
|
|
8
8
|
var HYDRATION_ERROR = {};
|
|
9
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.56.
|
|
13
|
+
//#region ../../../node_modules/.bun/svelte@5.56.8/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.
|
|
50
|
+
//#region \0@oxc-project+runtime@0.139.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.
|
|
60
|
+
//#region \0@oxc-project+runtime@0.139.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.
|
|
72
|
+
//#region \0@oxc-project+runtime@0.139.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.
|
|
78
|
+
//#region \0@oxc-project+runtime@0.139.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,
|
|
@@ -129,7 +129,7 @@ var STALE_REACTION = new class StaleReactionError extends Error {
|
|
|
129
129
|
}();
|
|
130
130
|
var IS_XHTML = !!globalThis.document?.contentType && /* @__PURE__ */ globalThis.document.contentType.includes("xml");
|
|
131
131
|
//#endregion
|
|
132
|
-
//#region ../../../node_modules/.bun/svelte@5.56.
|
|
132
|
+
//#region ../../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/internal/client/errors.js
|
|
133
133
|
/**
|
|
134
134
|
* Cannot create a `$derived(...)` with an `await` expression outside of an effect tree
|
|
135
135
|
* @returns {never}
|
|
@@ -240,7 +240,7 @@ function svelte_boundary_reset_noop() {
|
|
|
240
240
|
console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`);
|
|
241
241
|
}
|
|
242
242
|
//#endregion
|
|
243
|
-
//#region ../../../node_modules/.bun/svelte@5.56.
|
|
243
|
+
//#region ../../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/internal/client/dom/hydration.js
|
|
244
244
|
/** @import { TemplateNode } from '#client' */
|
|
245
245
|
/**
|
|
246
246
|
* Use this variable to guard everything related to hydration code so it can be treeshaken out
|
|
@@ -319,7 +319,7 @@ function read_hydration_instruction(node) {
|
|
|
319
319
|
return node.data;
|
|
320
320
|
}
|
|
321
321
|
//#endregion
|
|
322
|
-
//#region ../../../node_modules/.bun/svelte@5.56.
|
|
322
|
+
//#region ../../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/internal/client/reactivity/equality.js
|
|
323
323
|
/** @import { Equals } from '#client' */
|
|
324
324
|
/** @type {Equals} */
|
|
325
325
|
function equals(value) {
|
|
@@ -338,13 +338,13 @@ function safe_equals(value) {
|
|
|
338
338
|
return !safe_not_equal(value, this.v);
|
|
339
339
|
}
|
|
340
340
|
//#endregion
|
|
341
|
-
//#region ../../../node_modules/.bun/svelte@5.56.
|
|
341
|
+
//#region ../../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/internal/flags/index.js
|
|
342
342
|
/** True if experimental.async=true */
|
|
343
343
|
var async_mode_flag = false;
|
|
344
344
|
/** True if we're not certain that we only have Svelte 5 code in the compilation */
|
|
345
345
|
var legacy_mode_flag = false;
|
|
346
346
|
//#endregion
|
|
347
|
-
//#region ../../../node_modules/.bun/svelte@5.56.
|
|
347
|
+
//#region ../../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/internal/client/context.js
|
|
348
348
|
/** @import { ComponentContext, DevStackEntry, Effect } from '#client' */
|
|
349
349
|
/** @type {ComponentContext | null} */
|
|
350
350
|
var component_context = null;
|
|
@@ -396,7 +396,7 @@ function is_runes() {
|
|
|
396
396
|
return !legacy_mode_flag || component_context !== null && component_context.l === null;
|
|
397
397
|
}
|
|
398
398
|
//#endregion
|
|
399
|
-
//#region ../../../node_modules/.bun/svelte@5.56.
|
|
399
|
+
//#region ../../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/internal/client/dom/task.js
|
|
400
400
|
/** @type {Array<() => void>} */
|
|
401
401
|
var micro_tasks = [];
|
|
402
402
|
function run_micro_tasks() {
|
|
@@ -439,6 +439,7 @@ function handle_error(error) {
|
|
|
439
439
|
* @param {Effect | null} effect
|
|
440
440
|
*/
|
|
441
441
|
function invoke_error_boundary(error, effect) {
|
|
442
|
+
if (effect !== null && (effect.f & 16384) !== 0) return;
|
|
442
443
|
while (effect !== null) {
|
|
443
444
|
if ((effect.f & 128) !== 0) {
|
|
444
445
|
if ((effect.f & 32768) === 0) throw error;
|
|
@@ -454,7 +455,7 @@ function invoke_error_boundary(error, effect) {
|
|
|
454
455
|
throw error;
|
|
455
456
|
}
|
|
456
457
|
//#endregion
|
|
457
|
-
//#region ../../../node_modules/.bun/svelte@5.56.
|
|
458
|
+
//#region ../../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/internal/client/reactivity/status.js
|
|
458
459
|
/** @import { Derived, Signal } from '#client' */
|
|
459
460
|
var STATUS_MASK = ~(DIRTY | MAYBE_DIRTY | CLEAN);
|
|
460
461
|
/**
|
|
@@ -473,7 +474,7 @@ function update_derived_status(derived) {
|
|
|
473
474
|
else set_signal_status(derived, MAYBE_DIRTY);
|
|
474
475
|
}
|
|
475
476
|
//#endregion
|
|
476
|
-
//#region ../../../node_modules/.bun/svelte@5.56.
|
|
477
|
+
//#region ../../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/internal/client/reactivity/utils.js
|
|
477
478
|
/** @import { Derived, Effect, Value } from '#client' */
|
|
478
479
|
/**
|
|
479
480
|
* @param {Value[] | null} deps
|
|
@@ -501,7 +502,7 @@ function defer_effect(effect, dirty_effects, maybe_dirty_effects) {
|
|
|
501
502
|
set_signal_status(effect, CLEAN);
|
|
502
503
|
}
|
|
503
504
|
//#endregion
|
|
504
|
-
//#region ../../../node_modules/.bun/svelte@5.56.
|
|
505
|
+
//#region ../../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/internal/client/reactivity/store.js
|
|
505
506
|
/**
|
|
506
507
|
* We set this to `true` when updating a store so that we correctly
|
|
507
508
|
* schedule effects if the update takes place inside a `$:` effect
|
|
@@ -531,1460 +532,1515 @@ function capture_store_binding(fn) {
|
|
|
531
532
|
}
|
|
532
533
|
}
|
|
533
534
|
//#endregion
|
|
534
|
-
//#region
|
|
535
|
+
//#region ../../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/internal/client/dom/elements/misc.js
|
|
536
|
+
var listening_to_form_reset = false;
|
|
537
|
+
function add_form_reset_listener() {
|
|
538
|
+
if (!listening_to_form_reset) {
|
|
539
|
+
listening_to_form_reset = true;
|
|
540
|
+
document.addEventListener("reset", (evt) => {
|
|
541
|
+
Promise.resolve().then(() => {
|
|
542
|
+
if (!evt.defaultPrevented) for (const e of evt.target.elements)
|
|
543
|
+
/** @type {any} */ e[FORM_RESET_HANDLER]?.();
|
|
544
|
+
});
|
|
545
|
+
}, { capture: true });
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
//#endregion
|
|
549
|
+
//#region ../../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/internal/client/dom/elements/bindings/shared.js
|
|
550
|
+
/**
|
|
551
|
+
* @template T
|
|
552
|
+
* @param {() => T} fn
|
|
553
|
+
*/
|
|
554
|
+
function without_reactive_context(fn) {
|
|
555
|
+
var previous_reaction = active_reaction;
|
|
556
|
+
var previous_effect = active_effect;
|
|
557
|
+
set_active_reaction(null);
|
|
558
|
+
set_active_effect(null);
|
|
559
|
+
try {
|
|
560
|
+
return fn();
|
|
561
|
+
} finally {
|
|
562
|
+
set_active_reaction(previous_reaction);
|
|
563
|
+
set_active_effect(previous_effect);
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
//#endregion
|
|
567
|
+
//#region ../../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/reactivity/create-subscriber.js
|
|
568
|
+
/**
|
|
569
|
+
* Returns a `subscribe` function that integrates external event-based systems with Svelte's reactivity.
|
|
570
|
+
* It's particularly useful for integrating with web APIs like `MediaQuery`, `IntersectionObserver`, or `WebSocket`.
|
|
571
|
+
*
|
|
572
|
+
* If `subscribe` is called inside an effect (including indirectly, for example inside a getter),
|
|
573
|
+
* the `start` callback will be called with an `update` function. Whenever `update` is called, the effect re-runs.
|
|
574
|
+
*
|
|
575
|
+
* If `start` returns a cleanup function, it will be called when the effect is destroyed.
|
|
576
|
+
*
|
|
577
|
+
* If `subscribe` is called in multiple effects, `start` will only be called once as long as the effects
|
|
578
|
+
* are active, and the returned teardown function will only be called when all effects are destroyed.
|
|
579
|
+
*
|
|
580
|
+
* It's best understood with an example. Here's an implementation of [`MediaQuery`](https://svelte.dev/docs/svelte/svelte-reactivity#MediaQuery):
|
|
581
|
+
*
|
|
582
|
+
* ```js
|
|
583
|
+
* import { createSubscriber } from 'svelte/reactivity';
|
|
584
|
+
* import { on } from 'svelte/events';
|
|
585
|
+
*
|
|
586
|
+
* export class MediaQuery {
|
|
587
|
+
* #query;
|
|
588
|
+
* #subscribe;
|
|
589
|
+
*
|
|
590
|
+
* constructor(query) {
|
|
591
|
+
* this.#query = window.matchMedia(`(${query})`);
|
|
592
|
+
*
|
|
593
|
+
* this.#subscribe = createSubscriber((update) => {
|
|
594
|
+
* // when the `change` event occurs, re-run any effects that read `this.current`
|
|
595
|
+
* const off = on(this.#query, 'change', update);
|
|
596
|
+
*
|
|
597
|
+
* // stop listening when all the effects are destroyed
|
|
598
|
+
* return () => off();
|
|
599
|
+
* });
|
|
600
|
+
* }
|
|
601
|
+
*
|
|
602
|
+
* get current() {
|
|
603
|
+
* // This makes the getter reactive, if read in an effect
|
|
604
|
+
* this.#subscribe();
|
|
605
|
+
*
|
|
606
|
+
* // Return the current state of the query, whether or not we're in an effect
|
|
607
|
+
* return this.#query.matches;
|
|
608
|
+
* }
|
|
609
|
+
* }
|
|
610
|
+
* ```
|
|
611
|
+
* @param {(update: () => void) => (() => void) | void} start
|
|
612
|
+
* @since 5.7.0
|
|
613
|
+
*/
|
|
614
|
+
function createSubscriber(start) {
|
|
615
|
+
let subscribers = 0;
|
|
616
|
+
let version = source(0);
|
|
617
|
+
/** @type {(() => void) | void} */
|
|
618
|
+
let stop;
|
|
619
|
+
return () => {
|
|
620
|
+
if (effect_tracking()) {
|
|
621
|
+
get(version);
|
|
622
|
+
render_effect(() => {
|
|
623
|
+
if (subscribers === 0) stop = untrack(() => start(() => increment(version)));
|
|
624
|
+
subscribers += 1;
|
|
625
|
+
return () => {
|
|
626
|
+
queue_micro_task(() => {
|
|
627
|
+
subscribers -= 1;
|
|
628
|
+
if (subscribers === 0) {
|
|
629
|
+
stop?.();
|
|
630
|
+
stop = void 0;
|
|
631
|
+
increment(version);
|
|
632
|
+
}
|
|
633
|
+
});
|
|
634
|
+
};
|
|
635
|
+
});
|
|
636
|
+
}
|
|
637
|
+
};
|
|
638
|
+
}
|
|
639
|
+
//#endregion
|
|
640
|
+
//#region \0@oxc-project+runtime@0.139.0/helpers/esm/checkPrivateRedeclaration.js
|
|
535
641
|
function _checkPrivateRedeclaration(e, t) {
|
|
536
642
|
if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object");
|
|
537
643
|
}
|
|
538
644
|
//#endregion
|
|
539
|
-
//#region \0@oxc-project+runtime@0.
|
|
645
|
+
//#region \0@oxc-project+runtime@0.139.0/helpers/esm/classPrivateMethodInitSpec.js
|
|
540
646
|
function _classPrivateMethodInitSpec(e, a) {
|
|
541
647
|
_checkPrivateRedeclaration(e, a), a.add(e);
|
|
542
648
|
}
|
|
543
649
|
//#endregion
|
|
544
|
-
//#region \0@oxc-project+runtime@0.
|
|
650
|
+
//#region \0@oxc-project+runtime@0.139.0/helpers/esm/classPrivateFieldInitSpec.js
|
|
545
651
|
function _classPrivateFieldInitSpec(e, t, a) {
|
|
546
652
|
_checkPrivateRedeclaration(e, t), t.set(e, a);
|
|
547
653
|
}
|
|
548
654
|
//#endregion
|
|
549
|
-
//#region \0@oxc-project+runtime@0.
|
|
655
|
+
//#region \0@oxc-project+runtime@0.139.0/helpers/esm/assertClassBrand.js
|
|
550
656
|
function _assertClassBrand(e, t, n) {
|
|
551
657
|
if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n;
|
|
552
658
|
throw new TypeError("Private element is not present on this object");
|
|
553
659
|
}
|
|
554
660
|
//#endregion
|
|
555
|
-
//#region \0@oxc-project+runtime@0.
|
|
661
|
+
//#region \0@oxc-project+runtime@0.139.0/helpers/esm/classPrivateFieldSet2.js
|
|
556
662
|
function _classPrivateFieldSet2(s, a, r) {
|
|
557
663
|
return s.set(_assertClassBrand(s, a), r), r;
|
|
558
664
|
}
|
|
559
665
|
//#endregion
|
|
560
|
-
//#region \0@oxc-project+runtime@0.
|
|
666
|
+
//#region \0@oxc-project+runtime@0.139.0/helpers/esm/classPrivateFieldGet2.js
|
|
561
667
|
function _classPrivateFieldGet2(s, a) {
|
|
562
668
|
return s.get(_assertClassBrand(s, a));
|
|
563
669
|
}
|
|
564
670
|
//#endregion
|
|
565
|
-
//#region ../../../node_modules/.bun/svelte@5.56.
|
|
566
|
-
/** @import {
|
|
567
|
-
/** @import { Derived, Effect, Reaction, Source, Value } from '#client' */
|
|
568
|
-
var _Batch;
|
|
569
|
-
/** @type {Batch | null} */
|
|
570
|
-
var first_batch = null;
|
|
571
|
-
/** @type {Batch | null} */
|
|
572
|
-
var last_batch = null;
|
|
573
|
-
/** @type {Batch | null} */
|
|
574
|
-
var current_batch = null;
|
|
575
|
-
/**
|
|
576
|
-
* This is needed to avoid overwriting inputs
|
|
577
|
-
* @type {Batch | null}
|
|
578
|
-
*/
|
|
579
|
-
var previous_batch = null;
|
|
580
|
-
/**
|
|
581
|
-
* When time travelling (i.e. working in one batch, while other batches
|
|
582
|
-
* still have ongoing work), we ignore the real values of affected
|
|
583
|
-
* signals in favour of their values within the batch
|
|
584
|
-
* @type {Map<Value, any> | null}
|
|
585
|
-
*/
|
|
586
|
-
var batch_values = null;
|
|
587
|
-
/** @type {Effect | null} */
|
|
588
|
-
var last_scheduled_effect = null;
|
|
589
|
-
var is_flushing_sync = false;
|
|
590
|
-
var is_processing = false;
|
|
671
|
+
//#region ../../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/internal/client/dom/blocks/boundary.js
|
|
672
|
+
/** @import { Effect, Source, TemplateNode, } from '#client' */
|
|
591
673
|
/**
|
|
592
|
-
*
|
|
593
|
-
*
|
|
594
|
-
*
|
|
595
|
-
*
|
|
674
|
+
* @typedef {{
|
|
675
|
+
* onerror?: ((error: unknown, reset: () => void) => void) | null;
|
|
676
|
+
* failed?: ((anchor: Node, error: () => unknown, reset: () => () => void) => void) | null;
|
|
677
|
+
* pending?: ((anchor: Node) => void) | null;
|
|
678
|
+
* }} BoundaryProps
|
|
596
679
|
*/
|
|
597
|
-
var
|
|
680
|
+
var flags = EFFECT_TRANSPARENT | EFFECT_PRESERVED;
|
|
598
681
|
/**
|
|
599
|
-
*
|
|
600
|
-
*
|
|
601
|
-
*
|
|
602
|
-
* @
|
|
603
|
-
* @
|
|
682
|
+
* @param {TemplateNode} node
|
|
683
|
+
* @param {BoundaryProps} props
|
|
684
|
+
* @param {((anchor: Node) => void)} children
|
|
685
|
+
* @param {((error: unknown) => unknown) | undefined} [transform_error]
|
|
686
|
+
* @returns {void}
|
|
604
687
|
*/
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
var
|
|
609
|
-
var
|
|
610
|
-
var
|
|
611
|
-
var
|
|
612
|
-
var
|
|
613
|
-
var
|
|
614
|
-
var
|
|
615
|
-
var
|
|
616
|
-
var
|
|
617
|
-
var
|
|
688
|
+
function boundary(node, props, children, transform_error) {
|
|
689
|
+
new Boundary(node, props, children, transform_error);
|
|
690
|
+
}
|
|
691
|
+
var _anchor = /* @__PURE__ */ new WeakMap();
|
|
692
|
+
var _hydrate_open = /* @__PURE__ */ new WeakMap();
|
|
693
|
+
var _props = /* @__PURE__ */ new WeakMap();
|
|
694
|
+
var _children = /* @__PURE__ */ new WeakMap();
|
|
695
|
+
var _effect = /* @__PURE__ */ new WeakMap();
|
|
696
|
+
var _main_effect = /* @__PURE__ */ new WeakMap();
|
|
697
|
+
var _pending_effect = /* @__PURE__ */ new WeakMap();
|
|
698
|
+
var _failed_effect = /* @__PURE__ */ new WeakMap();
|
|
699
|
+
var _offscreen_fragment = /* @__PURE__ */ new WeakMap();
|
|
700
|
+
var _local_pending_count = /* @__PURE__ */ new WeakMap();
|
|
701
|
+
var _pending_count = /* @__PURE__ */ new WeakMap();
|
|
702
|
+
var _pending_count_update_queued = /* @__PURE__ */ new WeakMap();
|
|
618
703
|
var _dirty_effects$1 = /* @__PURE__ */ new WeakMap();
|
|
619
704
|
var _maybe_dirty_effects$1 = /* @__PURE__ */ new WeakMap();
|
|
620
|
-
var
|
|
621
|
-
var
|
|
622
|
-
var
|
|
623
|
-
var
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
_defineProperty(
|
|
633
|
-
this,
|
|
634
|
-
/** @type {Map<Effect, ReturnType<typeof deferred<any>>>} */
|
|
635
|
-
"async_deriveds",
|
|
636
|
-
/* @__PURE__ */ new Map()
|
|
637
|
-
);
|
|
705
|
+
var _effect_pending = /* @__PURE__ */ new WeakMap();
|
|
706
|
+
var _effect_pending_subscriber = /* @__PURE__ */ new WeakMap();
|
|
707
|
+
var _Boundary_brand = /* @__PURE__ */ new WeakSet();
|
|
708
|
+
var Boundary = class {
|
|
709
|
+
/**
|
|
710
|
+
* @param {TemplateNode} node
|
|
711
|
+
* @param {BoundaryProps} props
|
|
712
|
+
* @param {((anchor: Node) => void)} children
|
|
713
|
+
* @param {((error: unknown) => unknown) | undefined} [transform_error]
|
|
714
|
+
*/
|
|
715
|
+
constructor(node, props, children, transform_error) {
|
|
716
|
+
_classPrivateMethodInitSpec(this, _Boundary_brand);
|
|
638
717
|
_defineProperty(
|
|
639
718
|
this,
|
|
640
|
-
/**
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
* They keys of this map are identical to `this.#previous`
|
|
644
|
-
* @type {Map<Value, [any, boolean]>}
|
|
645
|
-
*/
|
|
646
|
-
"current",
|
|
647
|
-
/* @__PURE__ */ new Map()
|
|
719
|
+
/** @type {Boundary | null} */
|
|
720
|
+
"parent",
|
|
721
|
+
void 0
|
|
648
722
|
);
|
|
723
|
+
_defineProperty(this, "is_pending", false);
|
|
649
724
|
_defineProperty(
|
|
650
725
|
this,
|
|
651
726
|
/**
|
|
652
|
-
*
|
|
653
|
-
*
|
|
654
|
-
* @type {
|
|
727
|
+
* API-level transformError transform function. Transforms errors before they reach the `failed` snippet.
|
|
728
|
+
* Inherited from parent boundary, or defaults to identity.
|
|
729
|
+
* @type {(error: unknown) => unknown}
|
|
655
730
|
*/
|
|
656
|
-
"
|
|
657
|
-
|
|
731
|
+
"transform_error",
|
|
732
|
+
void 0
|
|
658
733
|
);
|
|
659
|
-
_classPrivateFieldInitSpec(this,
|
|
660
|
-
_classPrivateFieldInitSpec(this,
|
|
661
|
-
_classPrivateFieldInitSpec(this,
|
|
662
|
-
_classPrivateFieldInitSpec(this,
|
|
663
|
-
_classPrivateFieldInitSpec(this,
|
|
664
|
-
_classPrivateFieldInitSpec(this,
|
|
665
|
-
_classPrivateFieldInitSpec(this,
|
|
734
|
+
_classPrivateFieldInitSpec(this, _anchor, void 0);
|
|
735
|
+
_classPrivateFieldInitSpec(this, _hydrate_open, hydrating ? hydrate_node : null);
|
|
736
|
+
_classPrivateFieldInitSpec(this, _props, void 0);
|
|
737
|
+
_classPrivateFieldInitSpec(this, _children, void 0);
|
|
738
|
+
_classPrivateFieldInitSpec(this, _effect, void 0);
|
|
739
|
+
_classPrivateFieldInitSpec(this, _main_effect, null);
|
|
740
|
+
_classPrivateFieldInitSpec(this, _pending_effect, null);
|
|
741
|
+
_classPrivateFieldInitSpec(this, _failed_effect, null);
|
|
742
|
+
_classPrivateFieldInitSpec(this, _offscreen_fragment, null);
|
|
743
|
+
_classPrivateFieldInitSpec(this, _local_pending_count, 0);
|
|
744
|
+
_classPrivateFieldInitSpec(this, _pending_count, 0);
|
|
745
|
+
_classPrivateFieldInitSpec(this, _pending_count_update_queued, false);
|
|
666
746
|
_classPrivateFieldInitSpec(this, _dirty_effects$1, /* @__PURE__ */ new Set());
|
|
667
747
|
_classPrivateFieldInitSpec(this, _maybe_dirty_effects$1, /* @__PURE__ */ new Set());
|
|
668
|
-
_classPrivateFieldInitSpec(this,
|
|
669
|
-
_classPrivateFieldInitSpec(this,
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
*/
|
|
683
|
-
skip_effect(effect) {
|
|
684
|
-
if (!_classPrivateFieldGet2(_skipped_branches, this).has(effect)) _classPrivateFieldGet2(_skipped_branches, this).set(effect, {
|
|
685
|
-
d: [],
|
|
686
|
-
m: []
|
|
748
|
+
_classPrivateFieldInitSpec(this, _effect_pending, null);
|
|
749
|
+
_classPrivateFieldInitSpec(this, _effect_pending_subscriber, createSubscriber(() => {
|
|
750
|
+
_classPrivateFieldSet2(_effect_pending, this, source(_classPrivateFieldGet2(_local_pending_count, this)));
|
|
751
|
+
return () => {
|
|
752
|
+
_classPrivateFieldSet2(_effect_pending, this, null);
|
|
753
|
+
};
|
|
754
|
+
}));
|
|
755
|
+
_classPrivateFieldSet2(_anchor, this, node);
|
|
756
|
+
_classPrivateFieldSet2(_props, this, props);
|
|
757
|
+
_classPrivateFieldSet2(_children, this, (anchor) => {
|
|
758
|
+
var effect = active_effect;
|
|
759
|
+
effect.b = this;
|
|
760
|
+
effect.f |= 128;
|
|
761
|
+
children(anchor);
|
|
687
762
|
});
|
|
688
|
-
|
|
763
|
+
this.parent = active_effect.b;
|
|
764
|
+
this.transform_error = transform_error ?? this.parent?.transform_error ?? ((e) => e);
|
|
765
|
+
_classPrivateFieldSet2(_effect, this, block(() => {
|
|
766
|
+
if (hydrating) {
|
|
767
|
+
const comment = _classPrivateFieldGet2(_hydrate_open, this);
|
|
768
|
+
hydrate_next();
|
|
769
|
+
const server_rendered_pending = comment.data === "[!";
|
|
770
|
+
if (comment.data.startsWith("[?")) {
|
|
771
|
+
const serialized_error = JSON.parse(comment.data.slice(2));
|
|
772
|
+
_assertClassBrand(_Boundary_brand, this, _hydrate_failed_content).call(this, serialized_error);
|
|
773
|
+
} else if (server_rendered_pending) _assertClassBrand(_Boundary_brand, this, _hydrate_pending_content).call(this);
|
|
774
|
+
else _assertClassBrand(_Boundary_brand, this, _hydrate_resolved_content).call(this);
|
|
775
|
+
} else _assertClassBrand(_Boundary_brand, this, _render).call(this);
|
|
776
|
+
}, flags));
|
|
777
|
+
if (hydrating) _classPrivateFieldSet2(_anchor, this, hydrate_node);
|
|
689
778
|
}
|
|
690
779
|
/**
|
|
691
|
-
*
|
|
692
|
-
* any tracked dirty/maybe_dirty child effects
|
|
780
|
+
* Defer an effect inside a pending boundary until the boundary resolves
|
|
693
781
|
* @param {Effect} effect
|
|
694
|
-
* @param {(e: Effect) => void} callback
|
|
695
|
-
*/
|
|
696
|
-
unskip_effect(effect, callback = (e) => this.schedule(e)) {
|
|
697
|
-
var tracked = _classPrivateFieldGet2(_skipped_branches, this).get(effect);
|
|
698
|
-
if (tracked) {
|
|
699
|
-
_classPrivateFieldGet2(_skipped_branches, this).delete(effect);
|
|
700
|
-
for (var e of tracked.d) {
|
|
701
|
-
set_signal_status(e, DIRTY);
|
|
702
|
-
callback(e);
|
|
703
|
-
}
|
|
704
|
-
for (e of tracked.m) {
|
|
705
|
-
set_signal_status(e, MAYBE_DIRTY);
|
|
706
|
-
callback(e);
|
|
707
|
-
}
|
|
708
|
-
}
|
|
709
|
-
_classPrivateFieldGet2(_unskipped_branches, this).add(effect);
|
|
710
|
-
}
|
|
711
|
-
/**
|
|
712
|
-
* Associate a change to a given source with the current
|
|
713
|
-
* batch, noting its previous and current values
|
|
714
|
-
* @param {Value} source
|
|
715
|
-
* @param {any} value
|
|
716
|
-
* @param {boolean} [is_derived]
|
|
717
782
|
*/
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
if ((source.f & 8388608) === 0) {
|
|
721
|
-
this.current.set(source, [value, is_derived]);
|
|
722
|
-
batch_values?.set(source, value);
|
|
723
|
-
}
|
|
724
|
-
if (!this.is_fork) source.v = value;
|
|
725
|
-
}
|
|
726
|
-
activate() {
|
|
727
|
-
current_batch = this;
|
|
728
|
-
}
|
|
729
|
-
deactivate() {
|
|
730
|
-
current_batch = null;
|
|
731
|
-
batch_values = null;
|
|
732
|
-
}
|
|
733
|
-
flush() {
|
|
734
|
-
try {
|
|
735
|
-
is_processing = true;
|
|
736
|
-
current_batch = this;
|
|
737
|
-
_assertClassBrand(_Batch_brand, this, _process).call(this);
|
|
738
|
-
} finally {
|
|
739
|
-
flush_count = 0;
|
|
740
|
-
last_scheduled_effect = null;
|
|
741
|
-
collected_effects = null;
|
|
742
|
-
legacy_updates = null;
|
|
743
|
-
is_processing = false;
|
|
744
|
-
current_batch = null;
|
|
745
|
-
batch_values = null;
|
|
746
|
-
old_values.clear();
|
|
747
|
-
}
|
|
748
|
-
}
|
|
749
|
-
discard() {
|
|
750
|
-
for (const fn of _classPrivateFieldGet2(_discard_callbacks, this)) fn(this);
|
|
751
|
-
_classPrivateFieldGet2(_discard_callbacks, this).clear();
|
|
752
|
-
_assertClassBrand(_Batch_brand, this, _unlink).call(this);
|
|
753
|
-
_classPrivateFieldGet2(_deferred, this)?.resolve();
|
|
783
|
+
defer_effect(effect) {
|
|
784
|
+
defer_effect(effect, _classPrivateFieldGet2(_dirty_effects$1, this), _classPrivateFieldGet2(_maybe_dirty_effects$1, this));
|
|
754
785
|
}
|
|
755
786
|
/**
|
|
756
|
-
*
|
|
787
|
+
* Returns `false` if the effect exists inside a boundary whose pending snippet is shown
|
|
788
|
+
* @returns {boolean}
|
|
757
789
|
*/
|
|
758
|
-
|
|
759
|
-
|
|
790
|
+
is_rendered() {
|
|
791
|
+
return !this.is_pending && (!this.parent || this.parent.is_rendered());
|
|
760
792
|
}
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
* @param {Effect} effect
|
|
764
|
-
*/
|
|
765
|
-
increment(blocking, effect) {
|
|
766
|
-
_classPrivateFieldSet2(_pending, this, _classPrivateFieldGet2(_pending, this) + 1);
|
|
767
|
-
if (blocking) {
|
|
768
|
-
let blocking_pending_count = _classPrivateFieldGet2(_blocking_pending, this).get(effect) ?? 0;
|
|
769
|
-
_classPrivateFieldGet2(_blocking_pending, this).set(effect, blocking_pending_count + 1);
|
|
770
|
-
}
|
|
793
|
+
has_pending_snippet() {
|
|
794
|
+
return !!_classPrivateFieldGet2(_props, this).pending;
|
|
771
795
|
}
|
|
772
796
|
/**
|
|
773
|
-
*
|
|
774
|
-
*
|
|
797
|
+
* Update the source that powers `$effect.pending()` inside this boundary,
|
|
798
|
+
* and controls when the current `pending` snippet (if any) is removed.
|
|
799
|
+
* Do not call from inside the class
|
|
800
|
+
* @param {1 | -1} d
|
|
801
|
+
* @param {Batch} batch
|
|
775
802
|
*/
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
else _classPrivateFieldGet2(_blocking_pending, this).set(effect, blocking_pending_count - 1);
|
|
782
|
-
}
|
|
783
|
-
if (_classPrivateFieldGet2(_decrement_queued, this)) return;
|
|
784
|
-
_classPrivateFieldSet2(_decrement_queued, this, true);
|
|
803
|
+
update_pending_count(d, batch) {
|
|
804
|
+
_assertClassBrand(_Boundary_brand, this, _update_pending_count).call(this, d, batch);
|
|
805
|
+
_classPrivateFieldSet2(_local_pending_count, this, _classPrivateFieldGet2(_local_pending_count, this) + d);
|
|
806
|
+
if (!_classPrivateFieldGet2(_effect_pending, this) || _classPrivateFieldGet2(_pending_count_update_queued, this)) return;
|
|
807
|
+
_classPrivateFieldSet2(_pending_count_update_queued, this, true);
|
|
785
808
|
queue_micro_task(() => {
|
|
786
|
-
_classPrivateFieldSet2(
|
|
787
|
-
if (this
|
|
809
|
+
_classPrivateFieldSet2(_pending_count_update_queued, this, false);
|
|
810
|
+
if (_classPrivateFieldGet2(_effect_pending, this)) internal_set(_classPrivateFieldGet2(_effect_pending, this), _classPrivateFieldGet2(_local_pending_count, this));
|
|
788
811
|
});
|
|
789
812
|
}
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
*/
|
|
794
|
-
transfer_effects(dirty_effects, maybe_dirty_effects) {
|
|
795
|
-
for (const e of dirty_effects) _classPrivateFieldGet2(_dirty_effects$1, this).add(e);
|
|
796
|
-
for (const e of maybe_dirty_effects) _classPrivateFieldGet2(_maybe_dirty_effects$1, this).add(e);
|
|
797
|
-
dirty_effects.clear();
|
|
798
|
-
maybe_dirty_effects.clear();
|
|
799
|
-
}
|
|
800
|
-
/** @param {(batch: Batch) => void} fn */
|
|
801
|
-
oncommit(fn) {
|
|
802
|
-
_classPrivateFieldGet2(_commit_callbacks, this).add(fn);
|
|
803
|
-
}
|
|
804
|
-
/** @param {(batch: Batch) => void} fn */
|
|
805
|
-
ondiscard(fn) {
|
|
806
|
-
_classPrivateFieldGet2(_discard_callbacks, this).add(fn);
|
|
807
|
-
}
|
|
808
|
-
settled() {
|
|
809
|
-
return (_classPrivateFieldGet2(_deferred, this) ?? _classPrivateFieldSet2(_deferred, this, deferred())).promise;
|
|
813
|
+
get_effect_pending() {
|
|
814
|
+
_classPrivateFieldGet2(_effect_pending_subscriber, this).call(this);
|
|
815
|
+
return get(_classPrivateFieldGet2(_effect_pending, this));
|
|
810
816
|
}
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
817
|
+
/** @param {unknown} error */
|
|
818
|
+
error(error) {
|
|
819
|
+
if (!_classPrivateFieldGet2(_props, this).onerror && !_classPrivateFieldGet2(_props, this).failed) throw error;
|
|
820
|
+
if (current_batch?.is_fork) {
|
|
821
|
+
if (_classPrivateFieldGet2(_main_effect, this)) current_batch.skip_effect(_classPrivateFieldGet2(_main_effect, this));
|
|
822
|
+
if (_classPrivateFieldGet2(_pending_effect, this)) current_batch.skip_effect(_classPrivateFieldGet2(_pending_effect, this));
|
|
823
|
+
if (_classPrivateFieldGet2(_failed_effect, this)) current_batch.skip_effect(_classPrivateFieldGet2(_failed_effect, this));
|
|
824
|
+
current_batch.oncommit(() => {
|
|
825
|
+
_assertClassBrand(_Boundary_brand, this, _handle_error).call(this, error);
|
|
816
826
|
});
|
|
817
|
-
}
|
|
818
|
-
return current_batch;
|
|
819
|
-
}
|
|
820
|
-
apply() {
|
|
821
|
-
if (!async_mode_flag || !this.is_fork && _classPrivateFieldGet2(_prev, this) === null && _classPrivateFieldGet2(_next, this) === null) {
|
|
822
|
-
batch_values = null;
|
|
823
|
-
return;
|
|
824
|
-
}
|
|
825
|
-
batch_values = /* @__PURE__ */ new Map();
|
|
826
|
-
for (const [source, [value]] of this.current) batch_values.set(source, value);
|
|
827
|
-
for (let batch = first_batch; batch !== null; batch = _classPrivateFieldGet2(_next, batch)) {
|
|
828
|
-
if (batch === this || batch.is_fork) continue;
|
|
829
|
-
var intersects = false;
|
|
830
|
-
if (batch.id < this.id) for (const [source, [, is_derived]] of batch.current) {
|
|
831
|
-
if (is_derived) continue;
|
|
832
|
-
if (this.current.has(source)) {
|
|
833
|
-
intersects = true;
|
|
834
|
-
break;
|
|
835
|
-
}
|
|
836
|
-
}
|
|
837
|
-
if (!intersects) {
|
|
838
|
-
for (const [source, previous] of batch.previous) if (!batch_values.has(source)) batch_values.set(source, previous);
|
|
839
|
-
}
|
|
840
|
-
}
|
|
841
|
-
}
|
|
842
|
-
/**
|
|
843
|
-
*
|
|
844
|
-
* @param {Effect} effect
|
|
845
|
-
*/
|
|
846
|
-
schedule(effect) {
|
|
847
|
-
last_scheduled_effect = effect;
|
|
848
|
-
if (effect.b?.is_pending && (effect.f & 16777228) !== 0 && (effect.f & 32768) === 0) {
|
|
849
|
-
effect.b.defer_effect(effect);
|
|
850
|
-
return;
|
|
851
|
-
}
|
|
852
|
-
var e = effect;
|
|
853
|
-
while (e.parent !== null) {
|
|
854
|
-
e = e.parent;
|
|
855
|
-
var flags = e.f;
|
|
856
|
-
if (collected_effects !== null && e === active_effect) {
|
|
857
|
-
if (async_mode_flag) return;
|
|
858
|
-
if ((active_reaction === null || (active_reaction.f & 2) === 0) && !legacy_is_updating_store) return;
|
|
859
|
-
}
|
|
860
|
-
if ((flags & 96) !== 0) {
|
|
861
|
-
if ((flags & 1024) === 0) return;
|
|
862
|
-
e.f ^= CLEAN;
|
|
863
|
-
}
|
|
864
|
-
}
|
|
865
|
-
_classPrivateFieldGet2(_roots, this).push(e);
|
|
827
|
+
} else _assertClassBrand(_Boundary_brand, this, _handle_error).call(this, error);
|
|
866
828
|
}
|
|
867
829
|
};
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
var skipped = false;
|
|
874
|
-
while (e.parent !== null) {
|
|
875
|
-
if (_classPrivateFieldGet2(_skipped_branches, this).has(e)) {
|
|
876
|
-
skipped = true;
|
|
877
|
-
break;
|
|
878
|
-
}
|
|
879
|
-
e = e.parent;
|
|
880
|
-
}
|
|
881
|
-
if (!skipped) return true;
|
|
830
|
+
function _hydrate_resolved_content() {
|
|
831
|
+
try {
|
|
832
|
+
_classPrivateFieldSet2(_main_effect, this, branch(() => _classPrivateFieldGet2(_children, this).call(this, _classPrivateFieldGet2(_anchor, this))));
|
|
833
|
+
} catch (error) {
|
|
834
|
+
this.error(error);
|
|
882
835
|
}
|
|
883
|
-
return false;
|
|
884
836
|
}
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
}
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
this
|
|
895
|
-
}
|
|
896
|
-
for (const e of _classPrivateFieldGet2(_maybe_dirty_effects$1, this)) {
|
|
897
|
-
set_signal_status(e, MAYBE_DIRTY);
|
|
898
|
-
this.schedule(e);
|
|
899
|
-
}
|
|
900
|
-
const roots = _classPrivateFieldGet2(_roots, this);
|
|
901
|
-
_classPrivateFieldSet2(_roots, this, []);
|
|
902
|
-
this.apply();
|
|
903
|
-
/** @type {Effect[]} */
|
|
904
|
-
var effects = collected_effects = [];
|
|
905
|
-
/** @type {Effect[]} */
|
|
906
|
-
var render_effects = [];
|
|
907
|
-
/**
|
|
908
|
-
* @type {Effect[]}
|
|
909
|
-
* @deprecated when we get rid of legacy mode and stores, we can get rid of this
|
|
910
|
-
*/
|
|
911
|
-
var updates = legacy_updates = [];
|
|
912
|
-
for (const root of roots) try {
|
|
913
|
-
_assertClassBrand(_Batch_brand, this, _traverse).call(this, root, effects, render_effects);
|
|
914
|
-
} catch (e) {
|
|
915
|
-
reset_all(root);
|
|
916
|
-
if (!_assertClassBrand(_Batch_brand, this, _is_deferred).call(this)) this.discard();
|
|
917
|
-
throw e;
|
|
918
|
-
}
|
|
919
|
-
current_batch = null;
|
|
920
|
-
if (updates.length > 0) {
|
|
921
|
-
var batch = _Batch.ensure();
|
|
922
|
-
for (const e of updates) batch.schedule(e);
|
|
923
|
-
}
|
|
924
|
-
collected_effects = null;
|
|
925
|
-
legacy_updates = null;
|
|
926
|
-
if (_assertClassBrand(_Batch_brand, this, _is_deferred).call(this)) {
|
|
927
|
-
_assertClassBrand(_Batch_brand, this, _defer_effects).call(this, render_effects);
|
|
928
|
-
_assertClassBrand(_Batch_brand, this, _defer_effects).call(this, effects);
|
|
929
|
-
for (const [e, t] of _classPrivateFieldGet2(_skipped_branches, this)) reset_branch(e, t);
|
|
930
|
-
if (updates.length > 0)
|
|
931
|
-
/** @type {Batch} */ _assertClassBrand(_Batch_brand, current_batch, _process).call(current_batch);
|
|
932
|
-
return;
|
|
933
|
-
}
|
|
934
|
-
const earlier_batch = _assertClassBrand(_Batch_brand, this, _find_earlier_batch).call(this);
|
|
935
|
-
if (earlier_batch) {
|
|
936
|
-
_assertClassBrand(_Batch_brand, this, _defer_effects).call(this, render_effects);
|
|
937
|
-
_assertClassBrand(_Batch_brand, this, _defer_effects).call(this, effects);
|
|
938
|
-
_assertClassBrand(_Batch_brand, earlier_batch, _merge).call(earlier_batch, this);
|
|
939
|
-
return;
|
|
940
|
-
}
|
|
941
|
-
_classPrivateFieldGet2(_dirty_effects$1, this).clear();
|
|
942
|
-
_classPrivateFieldGet2(_maybe_dirty_effects$1, this).clear();
|
|
943
|
-
for (const fn of _classPrivateFieldGet2(_commit_callbacks, this)) fn(this);
|
|
944
|
-
_classPrivateFieldGet2(_commit_callbacks, this).clear();
|
|
945
|
-
previous_batch = this;
|
|
946
|
-
flush_queued_effects(render_effects);
|
|
947
|
-
flush_queued_effects(effects);
|
|
948
|
-
previous_batch = null;
|
|
949
|
-
_classPrivateFieldGet2(_deferred, this)?.resolve();
|
|
950
|
-
var next_batch = current_batch;
|
|
951
|
-
if (_classPrivateFieldGet2(_pending, this) === 0 && (_classPrivateFieldGet2(_roots, this).length === 0 || next_batch !== null)) {
|
|
952
|
-
_assertClassBrand(_Batch_brand, this, _unlink).call(this);
|
|
953
|
-
if (async_mode_flag) {
|
|
954
|
-
_assertClassBrand(_Batch_brand, this, _commit$1).call(this);
|
|
955
|
-
current_batch = next_batch;
|
|
956
|
-
}
|
|
957
|
-
}
|
|
958
|
-
if (_classPrivateFieldGet2(_roots, this).length > 0) if (next_batch !== null) {
|
|
959
|
-
const batch = next_batch;
|
|
960
|
-
_classPrivateFieldGet2(_roots, batch).push(..._classPrivateFieldGet2(_roots, this).filter((r) => !_classPrivateFieldGet2(_roots, batch).includes(r)));
|
|
961
|
-
} else next_batch = this;
|
|
962
|
-
if (next_batch !== null) _assertClassBrand(_Batch_brand, next_batch, _process).call(next_batch);
|
|
837
|
+
/**
|
|
838
|
+
* @param {unknown} error The deserialized error from the server's hydration comment
|
|
839
|
+
*/
|
|
840
|
+
function _hydrate_failed_content(error) {
|
|
841
|
+
const failed = _classPrivateFieldGet2(_props, this).failed;
|
|
842
|
+
const { reset, invoke_onerror } = _assertClassBrand(_Boundary_brand, this, _create_reset).call(this, error);
|
|
843
|
+
queue_micro_task(invoke_onerror);
|
|
844
|
+
if (!failed) return;
|
|
845
|
+
_classPrivateFieldSet2(_failed_effect, this, branch(() => {
|
|
846
|
+
failed(_classPrivateFieldGet2(_anchor, this), () => error, () => reset);
|
|
847
|
+
}));
|
|
963
848
|
}
|
|
964
849
|
/**
|
|
965
|
-
*
|
|
966
|
-
*
|
|
967
|
-
* @param {
|
|
968
|
-
* @
|
|
969
|
-
* @param {Effect[]} render_effects
|
|
850
|
+
* Creates the `reset` function for a failed boundary, along with a function
|
|
851
|
+
* that invokes `onerror` with it (if provided)
|
|
852
|
+
* @param {unknown} error
|
|
853
|
+
* @returns {{ reset: () => void, invoke_onerror: () => void }}
|
|
970
854
|
*/
|
|
971
|
-
function
|
|
972
|
-
|
|
973
|
-
var
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
if (is_branch) effect.f ^= CLEAN;
|
|
979
|
-
else if ((flags & 4) !== 0) effects.push(effect);
|
|
980
|
-
else if (async_mode_flag && (flags & 16777224) !== 0) render_effects.push(effect);
|
|
981
|
-
else if (is_dirty(effect)) {
|
|
982
|
-
if ((flags & 16) !== 0) _classPrivateFieldGet2(_maybe_dirty_effects$1, this).add(effect);
|
|
983
|
-
update_effect(effect);
|
|
984
|
-
}
|
|
985
|
-
var child = effect.first;
|
|
986
|
-
if (child !== null) {
|
|
987
|
-
effect = child;
|
|
988
|
-
continue;
|
|
989
|
-
}
|
|
855
|
+
function _create_reset(error) {
|
|
856
|
+
var did_reset = false;
|
|
857
|
+
var calling_on_error = false;
|
|
858
|
+
const reset = () => {
|
|
859
|
+
if (did_reset) {
|
|
860
|
+
svelte_boundary_reset_noop();
|
|
861
|
+
return;
|
|
990
862
|
}
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
863
|
+
did_reset = true;
|
|
864
|
+
if (calling_on_error) svelte_boundary_reset_onerror();
|
|
865
|
+
if (_classPrivateFieldGet2(_failed_effect, this) !== null) pause_effect(_classPrivateFieldGet2(_failed_effect, this), () => {
|
|
866
|
+
_classPrivateFieldSet2(_failed_effect, this, null);
|
|
867
|
+
});
|
|
868
|
+
_assertClassBrand(_Boundary_brand, this, _run).call(this, () => {
|
|
869
|
+
_assertClassBrand(_Boundary_brand, this, _render).call(this);
|
|
870
|
+
});
|
|
871
|
+
};
|
|
872
|
+
const invoke_onerror = () => {
|
|
873
|
+
try {
|
|
874
|
+
calling_on_error = true;
|
|
875
|
+
_classPrivateFieldGet2(_props, this).onerror?.(error, reset);
|
|
876
|
+
calling_on_error = false;
|
|
877
|
+
} catch (err) {
|
|
878
|
+
invoke_error_boundary(err, _classPrivateFieldGet2(_effect, this) && _classPrivateFieldGet2(_effect, this).parent);
|
|
998
879
|
}
|
|
999
|
-
}
|
|
880
|
+
};
|
|
881
|
+
return {
|
|
882
|
+
reset,
|
|
883
|
+
invoke_onerror
|
|
884
|
+
};
|
|
1000
885
|
}
|
|
1001
|
-
function
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
886
|
+
function _hydrate_pending_content() {
|
|
887
|
+
const pending = _classPrivateFieldGet2(_props, this).pending;
|
|
888
|
+
if (!pending) return;
|
|
889
|
+
this.is_pending = true;
|
|
890
|
+
_classPrivateFieldSet2(_pending_effect, this, branch(() => pending(_classPrivateFieldGet2(_anchor, this))));
|
|
891
|
+
queue_micro_task(() => {
|
|
892
|
+
var fragment = _classPrivateFieldSet2(_offscreen_fragment, this, document.createDocumentFragment());
|
|
893
|
+
var anchor = create_text();
|
|
894
|
+
fragment.append(anchor);
|
|
895
|
+
_classPrivateFieldSet2(_main_effect, this, _assertClassBrand(_Boundary_brand, this, _run).call(this, () => {
|
|
896
|
+
return branch(() => _classPrivateFieldGet2(_children, this).call(this, anchor));
|
|
897
|
+
}));
|
|
898
|
+
if (_classPrivateFieldGet2(_pending_count, this) === 0) {
|
|
899
|
+
_classPrivateFieldGet2(_anchor, this).before(fragment);
|
|
900
|
+
_classPrivateFieldSet2(_offscreen_fragment, this, null);
|
|
901
|
+
pause_effect(_classPrivateFieldGet2(_pending_effect, this), () => {
|
|
902
|
+
_classPrivateFieldSet2(_pending_effect, this, null);
|
|
903
|
+
});
|
|
904
|
+
_assertClassBrand(_Boundary_brand, this, _resolve).call(this, current_batch);
|
|
1006
905
|
}
|
|
1007
|
-
|
|
906
|
+
});
|
|
907
|
+
}
|
|
908
|
+
function _render() {
|
|
909
|
+
try {
|
|
910
|
+
this.is_pending = this.has_pending_snippet();
|
|
911
|
+
_classPrivateFieldSet2(_pending_count, this, 0);
|
|
912
|
+
_classPrivateFieldSet2(_local_pending_count, this, 0);
|
|
913
|
+
_classPrivateFieldSet2(_main_effect, this, branch(() => {
|
|
914
|
+
_classPrivateFieldGet2(_children, this).call(this, _classPrivateFieldGet2(_anchor, this));
|
|
915
|
+
}));
|
|
916
|
+
if (_classPrivateFieldGet2(_pending_count, this) > 0) {
|
|
917
|
+
var fragment = _classPrivateFieldSet2(_offscreen_fragment, this, document.createDocumentFragment());
|
|
918
|
+
move_effect(_classPrivateFieldGet2(_main_effect, this), fragment);
|
|
919
|
+
const pending = _classPrivateFieldGet2(_props, this).pending;
|
|
920
|
+
_classPrivateFieldSet2(_pending_effect, this, branch(() => pending(_classPrivateFieldGet2(_anchor, this))));
|
|
921
|
+
} else _assertClassBrand(_Boundary_brand, this, _resolve).call(this, current_batch);
|
|
922
|
+
} catch (error) {
|
|
923
|
+
this.error(error);
|
|
1008
924
|
}
|
|
1009
|
-
return null;
|
|
1010
925
|
}
|
|
1011
926
|
/**
|
|
1012
927
|
* @param {Batch} batch
|
|
1013
928
|
*/
|
|
1014
|
-
function
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
this.current.set(source, value);
|
|
1018
|
-
}
|
|
1019
|
-
for (const [effect, deferred] of batch.async_deriveds) {
|
|
1020
|
-
const d = this.async_deriveds.get(effect);
|
|
1021
|
-
if (d) deferred.promise.then(d.resolve).catch(d.reject);
|
|
1022
|
-
}
|
|
1023
|
-
this.transfer_effects(_classPrivateFieldGet2(_dirty_effects$1, batch), _classPrivateFieldGet2(_maybe_dirty_effects$1, batch));
|
|
1024
|
-
/**
|
|
1025
|
-
* mark all effects that depend on `batch.current`, except the
|
|
1026
|
-
* async effects that we just resolved (TODO unless they depend
|
|
1027
|
-
* on values in this batch that are NOT in the later batch?).
|
|
1028
|
-
* Through this we also will populate the correct #skipped_branches,
|
|
1029
|
-
* oncommit callbacks etc, so we don't need to merge them separately.
|
|
1030
|
-
* @param {Value} value
|
|
1031
|
-
*/
|
|
1032
|
-
const mark = (value) => {
|
|
1033
|
-
var reactions = value.reactions;
|
|
1034
|
-
if (reactions === null) return;
|
|
1035
|
-
for (const reaction of reactions) {
|
|
1036
|
-
var flags = reaction.f;
|
|
1037
|
-
if ((flags & 2) !== 0) mark(reaction);
|
|
1038
|
-
else {
|
|
1039
|
-
var effect = reaction;
|
|
1040
|
-
if (flags & 4194320 && !this.async_deriveds.has(effect)) {
|
|
1041
|
-
_classPrivateFieldGet2(_maybe_dirty_effects$1, this).delete(effect);
|
|
1042
|
-
set_signal_status(effect, DIRTY);
|
|
1043
|
-
this.schedule(effect);
|
|
1044
|
-
}
|
|
1045
|
-
}
|
|
1046
|
-
}
|
|
1047
|
-
};
|
|
1048
|
-
for (const source of this.current.keys()) mark(source);
|
|
1049
|
-
this.oncommit(() => batch.discard());
|
|
1050
|
-
_assertClassBrand(_Batch_brand, batch, _unlink).call(batch);
|
|
1051
|
-
current_batch = this;
|
|
1052
|
-
_assertClassBrand(_Batch_brand, this, _process).call(this);
|
|
929
|
+
function _resolve(batch) {
|
|
930
|
+
this.is_pending = false;
|
|
931
|
+
batch.transfer_effects(_classPrivateFieldGet2(_dirty_effects$1, this), _classPrivateFieldGet2(_maybe_dirty_effects$1, this));
|
|
1053
932
|
}
|
|
1054
933
|
/**
|
|
1055
|
-
* @
|
|
934
|
+
* @template T
|
|
935
|
+
* @param {() => T} fn
|
|
1056
936
|
*/
|
|
1057
|
-
function
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
if (d) deferred.promise.then(d.resolve).catch(d.reject);
|
|
1076
|
-
}
|
|
1077
|
-
if (!_classPrivateFieldGet2(_started, batch)) continue;
|
|
1078
|
-
var others = [...batch.current.keys()].filter((s) => !batch.current.get(s)[1] && !this.current.has(s));
|
|
1079
|
-
if (others.length === 0) {
|
|
1080
|
-
if (is_earlier) batch.discard();
|
|
1081
|
-
} else if (sources.length > 0) {
|
|
1082
|
-
if (is_earlier) for (const unskipped of _classPrivateFieldGet2(_unskipped_branches, this)) batch.unskip_effect(unskipped, (e) => {
|
|
1083
|
-
if ((e.f & 4194320) !== 0) batch.schedule(e);
|
|
1084
|
-
else _assertClassBrand(_Batch_brand, batch, _defer_effects).call(batch, [e]);
|
|
1085
|
-
});
|
|
1086
|
-
batch.activate();
|
|
1087
|
-
/** @type {Set<Value>} */
|
|
1088
|
-
var marked = /* @__PURE__ */ new Set();
|
|
1089
|
-
/** @type {Map<Reaction, boolean>} */
|
|
1090
|
-
var checked = /* @__PURE__ */ new Map();
|
|
1091
|
-
for (var source of sources) mark_effects(source, others, marked, checked);
|
|
1092
|
-
checked = /* @__PURE__ */ new Map();
|
|
1093
|
-
var current_unequal = [...batch.current].filter(([c, v1]) => {
|
|
1094
|
-
const v2 = this.current.get(c);
|
|
1095
|
-
if (!v2) return true;
|
|
1096
|
-
return v2[0] !== v1[0] || v2[1] !== v1[1];
|
|
1097
|
-
}).map(([c]) => c);
|
|
1098
|
-
if (current_unequal.length > 0) {
|
|
1099
|
-
for (const effect of _classPrivateFieldGet2(_new_effects, this)) if ((effect.f & 155648) === 0 && depends_on(effect, current_unequal, checked)) if ((effect.f & 4194320) !== 0) {
|
|
1100
|
-
set_signal_status(effect, DIRTY);
|
|
1101
|
-
batch.schedule(effect);
|
|
1102
|
-
} else _classPrivateFieldGet2(_dirty_effects$1, batch).add(effect);
|
|
1103
|
-
}
|
|
1104
|
-
if (_classPrivateFieldGet2(_roots, batch).length > 0 && !_classPrivateFieldGet2(_decrement_queued, batch)) {
|
|
1105
|
-
batch.apply();
|
|
1106
|
-
for (var root of _classPrivateFieldGet2(_roots, batch)) _assertClassBrand(_Batch_brand, batch, _traverse).call(batch, root, [], []);
|
|
1107
|
-
_classPrivateFieldSet2(_roots, batch, []);
|
|
1108
|
-
}
|
|
1109
|
-
batch.deactivate();
|
|
1110
|
-
}
|
|
1111
|
-
}
|
|
1112
|
-
}
|
|
1113
|
-
function _unlink() {
|
|
1114
|
-
if (!this.linked) return;
|
|
1115
|
-
var prev = _classPrivateFieldGet2(_prev, this);
|
|
1116
|
-
var next = _classPrivateFieldGet2(_next, this);
|
|
1117
|
-
if (prev === null) first_batch = next;
|
|
1118
|
-
else _classPrivateFieldSet2(_next, prev, next);
|
|
1119
|
-
if (next === null) last_batch = prev;
|
|
1120
|
-
else _classPrivateFieldSet2(_prev, next, prev);
|
|
1121
|
-
this.linked = false;
|
|
937
|
+
function _run(fn) {
|
|
938
|
+
var previous_effect = active_effect;
|
|
939
|
+
var previous_reaction = active_reaction;
|
|
940
|
+
var previous_ctx = component_context;
|
|
941
|
+
set_active_effect(_classPrivateFieldGet2(_effect, this));
|
|
942
|
+
set_active_reaction(_classPrivateFieldGet2(_effect, this));
|
|
943
|
+
set_component_context(_classPrivateFieldGet2(_effect, this).ctx);
|
|
944
|
+
try {
|
|
945
|
+
Batch.ensure();
|
|
946
|
+
return fn();
|
|
947
|
+
} catch (e) {
|
|
948
|
+
handle_error(e);
|
|
949
|
+
return null;
|
|
950
|
+
} finally {
|
|
951
|
+
set_active_effect(previous_effect);
|
|
952
|
+
set_active_reaction(previous_reaction);
|
|
953
|
+
set_component_context(previous_ctx);
|
|
954
|
+
}
|
|
1122
955
|
}
|
|
1123
956
|
/**
|
|
1124
|
-
*
|
|
1125
|
-
*
|
|
1126
|
-
* @
|
|
1127
|
-
* @param {
|
|
1128
|
-
* @returns {T}
|
|
957
|
+
* Updates the pending count associated with the currently visible pending snippet,
|
|
958
|
+
* if any, such that we can replace the snippet with content once work is done
|
|
959
|
+
* @param {1 | -1} d
|
|
960
|
+
* @param {Batch} batch
|
|
1129
961
|
*/
|
|
1130
|
-
function
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
if (fn) {
|
|
1136
|
-
if (current_batch !== null && !current_batch.is_fork) current_batch.flush();
|
|
1137
|
-
result = fn();
|
|
1138
|
-
}
|
|
1139
|
-
while (true) {
|
|
1140
|
-
flush_tasks();
|
|
1141
|
-
if (current_batch === null) return result;
|
|
1142
|
-
current_batch.flush();
|
|
962
|
+
function _update_pending_count(d, batch) {
|
|
963
|
+
if (!this.has_pending_snippet()) {
|
|
964
|
+
if (this.parent) {
|
|
965
|
+
var _this$parent;
|
|
966
|
+
_assertClassBrand(_Boundary_brand, _this$parent = this.parent, _update_pending_count).call(_this$parent, d, batch);
|
|
1143
967
|
}
|
|
1144
|
-
|
|
1145
|
-
is_flushing_sync = was_flushing_sync;
|
|
968
|
+
return;
|
|
1146
969
|
}
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
970
|
+
_classPrivateFieldSet2(_pending_count, this, _classPrivateFieldGet2(_pending_count, this) + d);
|
|
971
|
+
if (_classPrivateFieldGet2(_pending_count, this) === 0) {
|
|
972
|
+
_assertClassBrand(_Boundary_brand, this, _resolve).call(this, batch);
|
|
973
|
+
if (_classPrivateFieldGet2(_pending_effect, this)) pause_effect(_classPrivateFieldGet2(_pending_effect, this), () => {
|
|
974
|
+
_classPrivateFieldSet2(_pending_effect, this, null);
|
|
975
|
+
});
|
|
976
|
+
if (_classPrivateFieldGet2(_offscreen_fragment, this)) {
|
|
977
|
+
_classPrivateFieldGet2(_anchor, this).before(_classPrivateFieldGet2(_offscreen_fragment, this));
|
|
978
|
+
_classPrivateFieldSet2(_offscreen_fragment, this, null);
|
|
979
|
+
}
|
|
1153
980
|
}
|
|
1154
981
|
}
|
|
1155
|
-
/** @type {Set<Effect> | null} */
|
|
1156
|
-
var eager_block_effects = null;
|
|
1157
982
|
/**
|
|
1158
|
-
* @param {
|
|
1159
|
-
* @returns {void}
|
|
983
|
+
* @param {unknown} error
|
|
1160
984
|
*/
|
|
1161
|
-
function
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
985
|
+
function _handle_error(error) {
|
|
986
|
+
if (_classPrivateFieldGet2(_main_effect, this)) {
|
|
987
|
+
destroy_effect(_classPrivateFieldGet2(_main_effect, this));
|
|
988
|
+
_classPrivateFieldSet2(_main_effect, this, null);
|
|
989
|
+
}
|
|
990
|
+
if (_classPrivateFieldGet2(_pending_effect, this)) {
|
|
991
|
+
destroy_effect(_classPrivateFieldGet2(_pending_effect, this));
|
|
992
|
+
_classPrivateFieldSet2(_pending_effect, this, null);
|
|
993
|
+
}
|
|
994
|
+
if (_classPrivateFieldGet2(_failed_effect, this)) {
|
|
995
|
+
destroy_effect(_classPrivateFieldGet2(_failed_effect, this));
|
|
996
|
+
_classPrivateFieldSet2(_failed_effect, this, null);
|
|
997
|
+
}
|
|
998
|
+
if (hydrating) {
|
|
999
|
+
set_hydrate_node(_classPrivateFieldGet2(_hydrate_open, this));
|
|
1000
|
+
next();
|
|
1001
|
+
set_hydrate_node(skip_nodes());
|
|
1002
|
+
}
|
|
1003
|
+
let failed = _classPrivateFieldGet2(_props, this).failed;
|
|
1004
|
+
/** @param {unknown} transformed_error */
|
|
1005
|
+
const handle_error_result = (transformed_error) => {
|
|
1006
|
+
const { reset, invoke_onerror } = _assertClassBrand(_Boundary_brand, this, _create_reset).call(this, transformed_error);
|
|
1007
|
+
invoke_onerror();
|
|
1008
|
+
if (failed) _classPrivateFieldSet2(_failed_effect, this, _assertClassBrand(_Boundary_brand, this, _run).call(this, () => {
|
|
1009
|
+
try {
|
|
1010
|
+
return branch(() => {
|
|
1011
|
+
var effect = active_effect;
|
|
1012
|
+
effect.b = this;
|
|
1013
|
+
effect.f |= 128;
|
|
1014
|
+
failed(_classPrivateFieldGet2(_anchor, this), () => transformed_error, () => reset);
|
|
1015
|
+
});
|
|
1016
|
+
} catch (error) {
|
|
1017
|
+
invoke_error_boundary(error, _classPrivateFieldGet2(_effect, this).parent);
|
|
1018
|
+
return null;
|
|
1192
1019
|
}
|
|
1020
|
+
}));
|
|
1021
|
+
};
|
|
1022
|
+
queue_micro_task(() => {
|
|
1023
|
+
/** @type {unknown} */
|
|
1024
|
+
var result;
|
|
1025
|
+
try {
|
|
1026
|
+
result = this.transform_error(error);
|
|
1027
|
+
} catch (e) {
|
|
1028
|
+
invoke_error_boundary(e, _classPrivateFieldGet2(_effect, this) && _classPrivateFieldGet2(_effect, this).parent);
|
|
1029
|
+
return;
|
|
1193
1030
|
}
|
|
1194
|
-
|
|
1195
|
-
|
|
1031
|
+
if (result !== null && typeof result === "object" && typeof result.then === "function")
|
|
1032
|
+
/** @type {any} */ result.then(
|
|
1033
|
+
handle_error_result,
|
|
1034
|
+
/** @param {unknown} e */
|
|
1035
|
+
(e) => invoke_error_boundary(e, _classPrivateFieldGet2(_effect, this) && _classPrivateFieldGet2(_effect, this).parent)
|
|
1036
|
+
);
|
|
1037
|
+
else handle_error_result(result);
|
|
1038
|
+
});
|
|
1196
1039
|
}
|
|
1040
|
+
//#endregion
|
|
1041
|
+
//#region ../../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/internal/client/reactivity/async.js
|
|
1042
|
+
/** @import { Blocker, Effect, Source, Value } from '#client' */
|
|
1197
1043
|
/**
|
|
1198
|
-
*
|
|
1199
|
-
*
|
|
1200
|
-
*
|
|
1201
|
-
* @param {Value}
|
|
1202
|
-
* @param {Source[]} sources
|
|
1203
|
-
* @param {Set<Value>} marked
|
|
1204
|
-
* @param {Map<Reaction, boolean>} checked
|
|
1044
|
+
* @param {Blocker[]} blockers
|
|
1045
|
+
* @param {Array<() => any>} sync
|
|
1046
|
+
* @param {Array<() => Promise<any>>} async
|
|
1047
|
+
* @param {(values: Value[]) => any} fn
|
|
1205
1048
|
*/
|
|
1206
|
-
function
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
set_signal_status(reaction, DIRTY);
|
|
1214
|
-
schedule_effect(reaction);
|
|
1215
|
-
}
|
|
1049
|
+
function flatten(blockers, sync, async, fn) {
|
|
1050
|
+
const d = is_runes() ? derived : derived_safe_equal;
|
|
1051
|
+
var pending = blockers.filter((b) => !b.settled);
|
|
1052
|
+
var deriveds = sync.map(d);
|
|
1053
|
+
if (async.length === 0 && pending.length === 0) {
|
|
1054
|
+
fn(deriveds);
|
|
1055
|
+
return;
|
|
1216
1056
|
}
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
* @param {
|
|
1222
|
-
*/
|
|
1223
|
-
function
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
return true;
|
|
1057
|
+
var parent = active_effect;
|
|
1058
|
+
var restore = capture();
|
|
1059
|
+
var blocker_promise = pending.length === 1 ? pending[0].promise : pending.length > 1 ? Promise.all(pending.map((b) => b.promise)) : null;
|
|
1060
|
+
/**
|
|
1061
|
+
* @param {Source[]} async
|
|
1062
|
+
*/
|
|
1063
|
+
function finish(async) {
|
|
1064
|
+
if ((parent.f & 16384) !== 0) return;
|
|
1065
|
+
restore();
|
|
1066
|
+
try {
|
|
1067
|
+
fn([...deriveds, ...async]);
|
|
1068
|
+
} catch (error) {
|
|
1069
|
+
invoke_error_boundary(error, parent);
|
|
1231
1070
|
}
|
|
1071
|
+
unset_context();
|
|
1232
1072
|
}
|
|
1233
|
-
|
|
1234
|
-
|
|
1073
|
+
var decrement_pending = increment_pending();
|
|
1074
|
+
if (async.length === 0) {
|
|
1075
|
+
/** @type {Promise<any>} */ blocker_promise.then(() => finish([])).finally(decrement_pending);
|
|
1076
|
+
return;
|
|
1077
|
+
}
|
|
1078
|
+
function run() {
|
|
1079
|
+
Promise.all(async.map((expression) => /* @__PURE__ */ async_derived(expression))).then(finish).catch((error) => invoke_error_boundary(error, parent)).finally(decrement_pending);
|
|
1080
|
+
}
|
|
1081
|
+
if (blocker_promise) blocker_promise.then(() => {
|
|
1082
|
+
restore();
|
|
1083
|
+
run();
|
|
1084
|
+
unset_context();
|
|
1085
|
+
});
|
|
1086
|
+
else run();
|
|
1235
1087
|
}
|
|
1236
1088
|
/**
|
|
1237
|
-
*
|
|
1238
|
-
*
|
|
1089
|
+
* Captures the current effect context so that we can restore it after
|
|
1090
|
+
* some asynchronous work has happened (so that e.g. `await a + b`
|
|
1091
|
+
* causes `b` to be registered as a dependency).
|
|
1239
1092
|
*/
|
|
1240
|
-
function
|
|
1241
|
-
|
|
1242
|
-
|
|
1093
|
+
function capture() {
|
|
1094
|
+
var previous_effect = active_effect;
|
|
1095
|
+
var previous_reaction = active_reaction;
|
|
1096
|
+
var previous_component_context = component_context;
|
|
1097
|
+
var previous_batch = current_batch;
|
|
1098
|
+
return function restore(activate_batch = true) {
|
|
1099
|
+
set_active_effect(previous_effect);
|
|
1100
|
+
set_active_reaction(previous_reaction);
|
|
1101
|
+
set_component_context(previous_component_context);
|
|
1102
|
+
if (activate_batch && (previous_effect.f & 16384) === 0) {
|
|
1103
|
+
previous_batch?.activate();
|
|
1104
|
+
previous_batch?.apply();
|
|
1105
|
+
}
|
|
1106
|
+
};
|
|
1107
|
+
}
|
|
1108
|
+
function unset_context(deactivate_batch = true) {
|
|
1109
|
+
set_active_effect(null);
|
|
1110
|
+
set_active_reaction(null);
|
|
1111
|
+
set_component_context(null);
|
|
1112
|
+
if (deactivate_batch) current_batch?.deactivate();
|
|
1113
|
+
}
|
|
1243
1114
|
/**
|
|
1244
|
-
*
|
|
1245
|
-
* they can be correctly rescheduled later. Tracks dirty and maybe_dirty
|
|
1246
|
-
* effects so they can be rescheduled if the branch survives.
|
|
1247
|
-
* @param {Effect} effect
|
|
1248
|
-
* @param {{ d: Effect[], m: Effect[] }} tracked
|
|
1115
|
+
* @returns {(skip?: boolean) => void}
|
|
1249
1116
|
*/
|
|
1250
|
-
function
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1117
|
+
function increment_pending() {
|
|
1118
|
+
var effect = active_effect;
|
|
1119
|
+
var boundary = effect.b;
|
|
1120
|
+
var batch = current_batch;
|
|
1121
|
+
var blocking = !!boundary?.is_rendered();
|
|
1122
|
+
boundary?.update_pending_count(1, batch);
|
|
1123
|
+
batch.increment(blocking, effect);
|
|
1124
|
+
return () => {
|
|
1125
|
+
boundary?.update_pending_count(-1, batch);
|
|
1126
|
+
batch.decrement(blocking, effect);
|
|
1127
|
+
};
|
|
1260
1128
|
}
|
|
1261
1129
|
/**
|
|
1262
|
-
*
|
|
1263
|
-
* @param {
|
|
1130
|
+
* @template V
|
|
1131
|
+
* @param {() => V} fn
|
|
1132
|
+
* @returns {Derived<V>}
|
|
1264
1133
|
*/
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
var
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1134
|
+
/*#__NO_SIDE_EFFECTS__*/
|
|
1135
|
+
function derived(fn) {
|
|
1136
|
+
var flags = 2 | DIRTY;
|
|
1137
|
+
if (active_effect !== null) active_effect.f |= EFFECT_PRESERVED;
|
|
1138
|
+
return {
|
|
1139
|
+
ctx: component_context,
|
|
1140
|
+
deps: null,
|
|
1141
|
+
effects: null,
|
|
1142
|
+
equals,
|
|
1143
|
+
f: flags,
|
|
1144
|
+
fn,
|
|
1145
|
+
reactions: null,
|
|
1146
|
+
rv: 0,
|
|
1147
|
+
v: UNINITIALIZED,
|
|
1148
|
+
wv: 0,
|
|
1149
|
+
parent: active_effect,
|
|
1150
|
+
ac: null
|
|
1151
|
+
};
|
|
1272
1152
|
}
|
|
1273
|
-
|
|
1274
|
-
//#region ../../../node_modules/.bun/svelte@5.56.1/node_modules/svelte/src/reactivity/create-subscriber.js
|
|
1153
|
+
var OBSOLETE = Symbol("obsolete");
|
|
1275
1154
|
/**
|
|
1276
|
-
*
|
|
1277
|
-
*
|
|
1278
|
-
*
|
|
1279
|
-
* If
|
|
1280
|
-
*
|
|
1281
|
-
*
|
|
1282
|
-
* If `start` returns a cleanup function, it will be called when the effect is destroyed.
|
|
1283
|
-
*
|
|
1284
|
-
* If `subscribe` is called in multiple effects, `start` will only be called once as long as the effects
|
|
1285
|
-
* are active, and the returned teardown function will only be called when all effects are destroyed.
|
|
1286
|
-
*
|
|
1287
|
-
* It's best understood with an example. Here's an implementation of [`MediaQuery`](https://svelte.dev/docs/svelte/svelte-reactivity#MediaQuery):
|
|
1288
|
-
*
|
|
1289
|
-
* ```js
|
|
1290
|
-
* import { createSubscriber } from 'svelte/reactivity';
|
|
1291
|
-
* import { on } from 'svelte/events';
|
|
1292
|
-
*
|
|
1293
|
-
* export class MediaQuery {
|
|
1294
|
-
* #query;
|
|
1295
|
-
* #subscribe;
|
|
1296
|
-
*
|
|
1297
|
-
* constructor(query) {
|
|
1298
|
-
* this.#query = window.matchMedia(`(${query})`);
|
|
1299
|
-
*
|
|
1300
|
-
* this.#subscribe = createSubscriber((update) => {
|
|
1301
|
-
* // when the `change` event occurs, re-run any effects that read `this.current`
|
|
1302
|
-
* const off = on(this.#query, 'change', update);
|
|
1303
|
-
*
|
|
1304
|
-
* // stop listening when all the effects are destroyed
|
|
1305
|
-
* return () => off();
|
|
1306
|
-
* });
|
|
1307
|
-
* }
|
|
1308
|
-
*
|
|
1309
|
-
* get current() {
|
|
1310
|
-
* // This makes the getter reactive, if read in an effect
|
|
1311
|
-
* this.#subscribe();
|
|
1312
|
-
*
|
|
1313
|
-
* // Return the current state of the query, whether or not we're in an effect
|
|
1314
|
-
* return this.#query.matches;
|
|
1315
|
-
* }
|
|
1316
|
-
* }
|
|
1317
|
-
* ```
|
|
1318
|
-
* @param {(update: () => void) => (() => void) | void} start
|
|
1319
|
-
* @since 5.7.0
|
|
1155
|
+
* @template V
|
|
1156
|
+
* @param {() => V | Promise<V>} fn
|
|
1157
|
+
* @param {string} [label]
|
|
1158
|
+
* @param {string} [location] If provided, print a warning if the value is not read immediately after update
|
|
1159
|
+
* @returns {Promise<Source<V>>}
|
|
1320
1160
|
*/
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
let
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
});
|
|
1161
|
+
/*#__NO_SIDE_EFFECTS__*/
|
|
1162
|
+
function async_derived(fn, label, location) {
|
|
1163
|
+
let parent = active_effect;
|
|
1164
|
+
if (parent === null) async_derived_orphan();
|
|
1165
|
+
var promise = void 0;
|
|
1166
|
+
var signal = source(UNINITIALIZED);
|
|
1167
|
+
var should_suspend = !active_reaction;
|
|
1168
|
+
/** @type {Set<ReturnType<typeof deferred<V>>>} */
|
|
1169
|
+
var deferreds = /* @__PURE__ */ new Set();
|
|
1170
|
+
async_effect(() => {
|
|
1171
|
+
var effect = active_effect;
|
|
1172
|
+
/** @type {ReturnType<typeof deferred<V>>} */
|
|
1173
|
+
var d = deferred();
|
|
1174
|
+
promise = d.promise;
|
|
1175
|
+
try {
|
|
1176
|
+
Promise.resolve(fn()).then(d.resolve, (e) => {
|
|
1177
|
+
if (e !== STALE_REACTION) d.reject(e);
|
|
1178
|
+
}).finally(unset_context);
|
|
1179
|
+
} catch (error) {
|
|
1180
|
+
d.reject(error);
|
|
1181
|
+
unset_context();
|
|
1343
1182
|
}
|
|
1344
|
-
|
|
1183
|
+
var batch = current_batch;
|
|
1184
|
+
if (should_suspend) {
|
|
1185
|
+
if ((effect.f & 32768) !== 0) var decrement_pending = increment_pending();
|
|
1186
|
+
if (parent.b?.is_rendered()) batch.async_deriveds.get(effect)?.reject(OBSOLETE);
|
|
1187
|
+
else for (const d of deferreds.values()) d.reject(OBSOLETE);
|
|
1188
|
+
deferreds.add(d);
|
|
1189
|
+
batch.async_deriveds.set(effect, d);
|
|
1190
|
+
}
|
|
1191
|
+
/**
|
|
1192
|
+
* @param {any} value
|
|
1193
|
+
* @param {unknown} error
|
|
1194
|
+
*/
|
|
1195
|
+
const handler = (value, error = void 0) => {
|
|
1196
|
+
decrement_pending?.();
|
|
1197
|
+
deferreds.delete(d);
|
|
1198
|
+
if (error === OBSOLETE) return;
|
|
1199
|
+
batch.activate();
|
|
1200
|
+
if (error) {
|
|
1201
|
+
signal.f |= ERROR_VALUE;
|
|
1202
|
+
internal_set(signal, error);
|
|
1203
|
+
} else {
|
|
1204
|
+
if ((signal.f & 8388608) !== 0) signal.f ^= ERROR_VALUE;
|
|
1205
|
+
internal_set(signal, value);
|
|
1206
|
+
}
|
|
1207
|
+
batch.deactivate();
|
|
1208
|
+
};
|
|
1209
|
+
d.promise.then(handler, (e) => handler(null, e || "unknown"));
|
|
1210
|
+
});
|
|
1211
|
+
teardown(() => {
|
|
1212
|
+
for (const d of deferreds) d.reject(OBSOLETE);
|
|
1213
|
+
});
|
|
1214
|
+
return new Promise((fulfil) => {
|
|
1215
|
+
/** @param {Promise<V>} p */
|
|
1216
|
+
function next(p) {
|
|
1217
|
+
function go() {
|
|
1218
|
+
if (p === promise) fulfil(signal);
|
|
1219
|
+
else next(promise);
|
|
1220
|
+
}
|
|
1221
|
+
p.then(go, go);
|
|
1222
|
+
}
|
|
1223
|
+
next(promise);
|
|
1224
|
+
});
|
|
1345
1225
|
}
|
|
1346
|
-
//#endregion
|
|
1347
|
-
//#region ../../../node_modules/.bun/svelte@5.56.1/node_modules/svelte/src/internal/client/dom/blocks/boundary.js
|
|
1348
|
-
/** @import { Effect, Source, TemplateNode, } from '#client' */
|
|
1349
1226
|
/**
|
|
1350
|
-
* @
|
|
1351
|
-
*
|
|
1352
|
-
*
|
|
1353
|
-
* pending?: ((anchor: Node) => void) | null;
|
|
1354
|
-
* }} BoundaryProps
|
|
1227
|
+
* @template V
|
|
1228
|
+
* @param {() => V} fn
|
|
1229
|
+
* @returns {Derived<V>}
|
|
1355
1230
|
*/
|
|
1356
|
-
|
|
1231
|
+
/*#__NO_SIDE_EFFECTS__*/
|
|
1232
|
+
function user_derived(fn) {
|
|
1233
|
+
const d = /* @__PURE__ */ derived(fn);
|
|
1234
|
+
if (!async_mode_flag) push_reaction_value(d);
|
|
1235
|
+
return d;
|
|
1236
|
+
}
|
|
1357
1237
|
/**
|
|
1358
|
-
* @
|
|
1359
|
-
* @param {
|
|
1360
|
-
* @
|
|
1361
|
-
|
|
1238
|
+
* @template V
|
|
1239
|
+
* @param {() => V} fn
|
|
1240
|
+
* @returns {Derived<V>}
|
|
1241
|
+
*/
|
|
1242
|
+
/*#__NO_SIDE_EFFECTS__*/
|
|
1243
|
+
function derived_safe_equal(fn) {
|
|
1244
|
+
const signal = /* @__PURE__ */ derived(fn);
|
|
1245
|
+
signal.equals = safe_equals;
|
|
1246
|
+
return signal;
|
|
1247
|
+
}
|
|
1248
|
+
/**
|
|
1249
|
+
* @param {Derived} derived
|
|
1362
1250
|
* @returns {void}
|
|
1363
1251
|
*/
|
|
1364
|
-
function
|
|
1365
|
-
|
|
1252
|
+
function destroy_derived_effects(derived) {
|
|
1253
|
+
var effects = derived.effects;
|
|
1254
|
+
if (effects !== null) {
|
|
1255
|
+
derived.effects = null;
|
|
1256
|
+
for (var i = 0; i < effects.length; i += 1) destroy_effect(effects[i]);
|
|
1257
|
+
}
|
|
1366
1258
|
}
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
var
|
|
1374
|
-
var
|
|
1375
|
-
var
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1259
|
+
/**
|
|
1260
|
+
* @template T
|
|
1261
|
+
* @param {Derived} derived
|
|
1262
|
+
* @returns {T}
|
|
1263
|
+
*/
|
|
1264
|
+
function execute_derived(derived) {
|
|
1265
|
+
var value;
|
|
1266
|
+
var prev_active_effect = active_effect;
|
|
1267
|
+
var parent = derived.parent;
|
|
1268
|
+
if (!is_destroying_effect && parent !== null && derived.v !== UNINITIALIZED && (parent.f & 24576) !== 0) {
|
|
1269
|
+
derived_inert();
|
|
1270
|
+
return derived.v;
|
|
1271
|
+
}
|
|
1272
|
+
set_active_effect(parent);
|
|
1273
|
+
try {
|
|
1274
|
+
derived.f &= ~WAS_MARKED;
|
|
1275
|
+
destroy_derived_effects(derived);
|
|
1276
|
+
value = update_reaction(derived);
|
|
1277
|
+
} finally {
|
|
1278
|
+
set_active_effect(prev_active_effect);
|
|
1279
|
+
}
|
|
1280
|
+
return value;
|
|
1281
|
+
}
|
|
1282
|
+
/**
|
|
1283
|
+
* @param {Derived} derived
|
|
1284
|
+
* @returns {void}
|
|
1285
|
+
*/
|
|
1286
|
+
function update_derived(derived) {
|
|
1287
|
+
var value = execute_derived(derived);
|
|
1288
|
+
if (!derived.equals(value)) {
|
|
1289
|
+
derived.wv = increment_write_version();
|
|
1290
|
+
if (!current_batch?.is_fork || derived.deps === null) {
|
|
1291
|
+
if (current_batch !== null) {
|
|
1292
|
+
current_batch.capture(derived, value, true);
|
|
1293
|
+
previous_batch?.capture(derived, value, true);
|
|
1294
|
+
} else derived.v = value;
|
|
1295
|
+
if (derived.deps === null) {
|
|
1296
|
+
set_signal_status(derived, CLEAN);
|
|
1297
|
+
return;
|
|
1298
|
+
}
|
|
1299
|
+
}
|
|
1300
|
+
}
|
|
1301
|
+
if (is_destroying_effect) return;
|
|
1302
|
+
if (batch_values !== null) {
|
|
1303
|
+
if (effect_tracking() || current_batch?.is_fork) batch_values.set(derived, value);
|
|
1304
|
+
} else update_derived_status(derived);
|
|
1305
|
+
}
|
|
1306
|
+
/**
|
|
1307
|
+
* @param {Derived} derived
|
|
1308
|
+
*/
|
|
1309
|
+
function freeze_derived_effects(derived) {
|
|
1310
|
+
if (derived.effects === null) return;
|
|
1311
|
+
for (const e of derived.effects) if (e.teardown || e.ac) {
|
|
1312
|
+
e.teardown?.();
|
|
1313
|
+
if (e.ac !== null) without_reactive_context(() => {
|
|
1314
|
+
/** @type {AbortController} */ e.ac.abort(STALE_REACTION);
|
|
1315
|
+
e.ac = null;
|
|
1316
|
+
});
|
|
1317
|
+
if (e.fn !== null) e.teardown = noop;
|
|
1318
|
+
remove_reactions(e, 0);
|
|
1319
|
+
destroy_effect_children(e);
|
|
1320
|
+
}
|
|
1321
|
+
}
|
|
1322
|
+
/**
|
|
1323
|
+
* @param {Derived} derived
|
|
1324
|
+
*/
|
|
1325
|
+
function unfreeze_derived_effects(derived) {
|
|
1326
|
+
if (derived.effects === null) return;
|
|
1327
|
+
for (const e of derived.effects) if (e.teardown && e.fn !== null) update_effect(e);
|
|
1328
|
+
}
|
|
1329
|
+
//#endregion
|
|
1330
|
+
//#region ../../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/internal/client/reactivity/batch.js
|
|
1331
|
+
/** @import { Fork } from 'svelte' */
|
|
1332
|
+
/** @import { Derived, Effect, Reaction, Source, Value } from '#client' */
|
|
1333
|
+
var _Batch;
|
|
1334
|
+
/** @type {Batch | null} */
|
|
1335
|
+
var first_batch = null;
|
|
1336
|
+
/** @type {Batch | null} */
|
|
1337
|
+
var last_batch = null;
|
|
1338
|
+
/** @type {Batch | null} */
|
|
1339
|
+
var current_batch = null;
|
|
1340
|
+
/**
|
|
1341
|
+
* This is needed to avoid overwriting inputs
|
|
1342
|
+
* @type {Batch | null}
|
|
1343
|
+
*/
|
|
1344
|
+
var previous_batch = null;
|
|
1345
|
+
/**
|
|
1346
|
+
* When time travelling (i.e. working in one batch, while other batches
|
|
1347
|
+
* still have ongoing work), we ignore the real values of affected
|
|
1348
|
+
* signals in favour of their values within the batch
|
|
1349
|
+
* @type {Map<Value, any> | null}
|
|
1350
|
+
*/
|
|
1351
|
+
var batch_values = null;
|
|
1352
|
+
/** @type {Effect | null} */
|
|
1353
|
+
var last_scheduled_effect = null;
|
|
1354
|
+
var is_flushing_sync = false;
|
|
1355
|
+
var is_processing = false;
|
|
1356
|
+
/**
|
|
1357
|
+
* During traversal, this is an array. Newly created effects are (if not immediately
|
|
1358
|
+
* executed) pushed to this array, rather than going through the scheduling
|
|
1359
|
+
* rigamarole that would cause another turn of the flush loop.
|
|
1360
|
+
* @type {Effect[] | null}
|
|
1361
|
+
*/
|
|
1362
|
+
var collected_effects = null;
|
|
1363
|
+
/**
|
|
1364
|
+
* An array of effects that are marked during traversal as a result of a `set`
|
|
1365
|
+
* (not `internal_set`) call. These will be added to the next batch and
|
|
1366
|
+
* trigger another `batch.process()`
|
|
1367
|
+
* @type {Effect[] | null}
|
|
1368
|
+
* @deprecated when we get rid of legacy mode and stores, we can get rid of this
|
|
1369
|
+
*/
|
|
1370
|
+
var legacy_updates = null;
|
|
1371
|
+
var flush_count = 0;
|
|
1372
|
+
var uid = 1;
|
|
1373
|
+
var _started = /* @__PURE__ */ new WeakMap();
|
|
1374
|
+
var _prev = /* @__PURE__ */ new WeakMap();
|
|
1375
|
+
var _next = /* @__PURE__ */ new WeakMap();
|
|
1376
|
+
var _commit_callbacks = /* @__PURE__ */ new WeakMap();
|
|
1377
|
+
var _discard_callbacks = /* @__PURE__ */ new WeakMap();
|
|
1378
|
+
var _pending = /* @__PURE__ */ new WeakMap();
|
|
1379
|
+
var _blocking_pending = /* @__PURE__ */ new WeakMap();
|
|
1380
|
+
var _deferred = /* @__PURE__ */ new WeakMap();
|
|
1381
|
+
var _roots = /* @__PURE__ */ new WeakMap();
|
|
1382
|
+
var _new_effects = /* @__PURE__ */ new WeakMap();
|
|
1379
1383
|
var _dirty_effects = /* @__PURE__ */ new WeakMap();
|
|
1380
1384
|
var _maybe_dirty_effects = /* @__PURE__ */ new WeakMap();
|
|
1381
|
-
var
|
|
1382
|
-
var
|
|
1383
|
-
var
|
|
1384
|
-
var
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1385
|
+
var _skipped_branches = /* @__PURE__ */ new WeakMap();
|
|
1386
|
+
var _unskipped_branches = /* @__PURE__ */ new WeakMap();
|
|
1387
|
+
var _decrement_queued = /* @__PURE__ */ new WeakMap();
|
|
1388
|
+
var _Batch_brand = /* @__PURE__ */ new WeakSet();
|
|
1389
|
+
var Batch = class Batch {
|
|
1390
|
+
constructor() {
|
|
1391
|
+
_classPrivateMethodInitSpec(this, _Batch_brand);
|
|
1392
|
+
_defineProperty(this, "id", uid++);
|
|
1393
|
+
_classPrivateFieldInitSpec(this, _started, false);
|
|
1394
|
+
_defineProperty(this, "linked", true);
|
|
1395
|
+
_classPrivateFieldInitSpec(this, _prev, null);
|
|
1396
|
+
_classPrivateFieldInitSpec(this, _next, null);
|
|
1393
1397
|
_defineProperty(
|
|
1394
1398
|
this,
|
|
1395
|
-
/** @type {
|
|
1396
|
-
"
|
|
1397
|
-
|
|
1399
|
+
/** @type {Map<Effect, ReturnType<typeof deferred<any>>>} */
|
|
1400
|
+
"async_deriveds",
|
|
1401
|
+
/* @__PURE__ */ new Map()
|
|
1398
1402
|
);
|
|
1399
|
-
_defineProperty(this, "is_pending", false);
|
|
1400
1403
|
_defineProperty(
|
|
1401
1404
|
this,
|
|
1402
1405
|
/**
|
|
1403
|
-
*
|
|
1404
|
-
*
|
|
1405
|
-
*
|
|
1406
|
+
* The current values of any signals that are updated in this batch.
|
|
1407
|
+
* Tuple format: [value, is_derived] (note: is_derived is false for deriveds, too, if they were overridden via assignment)
|
|
1408
|
+
* They keys of this map are identical to `this.#previous`
|
|
1409
|
+
* @type {Map<Value, [any, boolean]>}
|
|
1406
1410
|
*/
|
|
1407
|
-
"
|
|
1408
|
-
|
|
1411
|
+
"current",
|
|
1412
|
+
/* @__PURE__ */ new Map()
|
|
1409
1413
|
);
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
_classPrivateFieldInitSpec(this,
|
|
1421
|
-
_classPrivateFieldInitSpec(this,
|
|
1414
|
+
_defineProperty(
|
|
1415
|
+
this,
|
|
1416
|
+
/**
|
|
1417
|
+
* The values of any signals (sources and deriveds) that are updated in this batch _before_ those updates took place.
|
|
1418
|
+
* They keys of this map are identical to `this.#current`
|
|
1419
|
+
* @type {Map<Value, any>}
|
|
1420
|
+
*/
|
|
1421
|
+
"previous",
|
|
1422
|
+
/* @__PURE__ */ new Map()
|
|
1423
|
+
);
|
|
1424
|
+
_classPrivateFieldInitSpec(this, _commit_callbacks, /* @__PURE__ */ new Set());
|
|
1425
|
+
_classPrivateFieldInitSpec(this, _discard_callbacks, /* @__PURE__ */ new Set());
|
|
1426
|
+
_classPrivateFieldInitSpec(this, _pending, 0);
|
|
1427
|
+
_classPrivateFieldInitSpec(this, _blocking_pending, /* @__PURE__ */ new Map());
|
|
1428
|
+
_classPrivateFieldInitSpec(this, _deferred, null);
|
|
1429
|
+
_classPrivateFieldInitSpec(this, _roots, []);
|
|
1430
|
+
_classPrivateFieldInitSpec(this, _new_effects, []);
|
|
1422
1431
|
_classPrivateFieldInitSpec(this, _dirty_effects, /* @__PURE__ */ new Set());
|
|
1423
1432
|
_classPrivateFieldInitSpec(this, _maybe_dirty_effects, /* @__PURE__ */ new Set());
|
|
1424
|
-
_classPrivateFieldInitSpec(this,
|
|
1425
|
-
_classPrivateFieldInitSpec(this,
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
var effect = active_effect;
|
|
1435
|
-
effect.b = this;
|
|
1436
|
-
effect.f |= 128;
|
|
1437
|
-
children(anchor);
|
|
1438
|
-
});
|
|
1439
|
-
this.parent = active_effect.b;
|
|
1440
|
-
this.transform_error = transform_error ?? this.parent?.transform_error ?? ((e) => e);
|
|
1441
|
-
_classPrivateFieldSet2(_effect, this, block(() => {
|
|
1442
|
-
if (hydrating) {
|
|
1443
|
-
const comment = _classPrivateFieldGet2(_hydrate_open, this);
|
|
1444
|
-
hydrate_next();
|
|
1445
|
-
const server_rendered_pending = comment.data === "[!";
|
|
1446
|
-
if (comment.data.startsWith("[?")) {
|
|
1447
|
-
const serialized_error = JSON.parse(comment.data.slice(2));
|
|
1448
|
-
_assertClassBrand(_Boundary_brand, this, _hydrate_failed_content).call(this, serialized_error);
|
|
1449
|
-
} else if (server_rendered_pending) _assertClassBrand(_Boundary_brand, this, _hydrate_pending_content).call(this);
|
|
1450
|
-
else _assertClassBrand(_Boundary_brand, this, _hydrate_resolved_content).call(this);
|
|
1451
|
-
} else _assertClassBrand(_Boundary_brand, this, _render).call(this);
|
|
1452
|
-
}, flags));
|
|
1453
|
-
if (hydrating) _classPrivateFieldSet2(_anchor, this, hydrate_node);
|
|
1433
|
+
_classPrivateFieldInitSpec(this, _skipped_branches, /* @__PURE__ */ new Map());
|
|
1434
|
+
_classPrivateFieldInitSpec(this, _unskipped_branches, /* @__PURE__ */ new Set());
|
|
1435
|
+
_defineProperty(this, "is_fork", false);
|
|
1436
|
+
_classPrivateFieldInitSpec(this, _decrement_queued, false);
|
|
1437
|
+
if (last_batch === null) first_batch = last_batch = this;
|
|
1438
|
+
else {
|
|
1439
|
+
_classPrivateFieldSet2(_next, last_batch, this);
|
|
1440
|
+
_classPrivateFieldSet2(_prev, this, last_batch);
|
|
1441
|
+
}
|
|
1442
|
+
last_batch = this;
|
|
1454
1443
|
}
|
|
1455
1444
|
/**
|
|
1456
|
-
*
|
|
1445
|
+
* Add an effect to the #skipped_branches map and reset its children
|
|
1457
1446
|
* @param {Effect} effect
|
|
1458
1447
|
*/
|
|
1459
|
-
|
|
1460
|
-
|
|
1448
|
+
skip_effect(effect) {
|
|
1449
|
+
if (!_classPrivateFieldGet2(_skipped_branches, this).has(effect)) _classPrivateFieldGet2(_skipped_branches, this).set(effect, {
|
|
1450
|
+
d: [],
|
|
1451
|
+
m: []
|
|
1452
|
+
});
|
|
1453
|
+
_classPrivateFieldGet2(_unskipped_branches, this).delete(effect);
|
|
1461
1454
|
}
|
|
1462
1455
|
/**
|
|
1463
|
-
*
|
|
1464
|
-
*
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1456
|
+
* Remove an effect from the #skipped_branches map and reschedule
|
|
1457
|
+
* any tracked dirty/maybe_dirty child effects
|
|
1458
|
+
* @param {Effect} effect
|
|
1459
|
+
* @param {(e: Effect) => void} callback
|
|
1460
|
+
*/
|
|
1461
|
+
unskip_effect(effect, callback = (e) => this.schedule(e)) {
|
|
1462
|
+
var tracked = _classPrivateFieldGet2(_skipped_branches, this).get(effect);
|
|
1463
|
+
if (tracked) {
|
|
1464
|
+
_classPrivateFieldGet2(_skipped_branches, this).delete(effect);
|
|
1465
|
+
for (var e of tracked.d) {
|
|
1466
|
+
set_signal_status(e, DIRTY);
|
|
1467
|
+
callback(e);
|
|
1468
|
+
}
|
|
1469
|
+
for (e of tracked.m) {
|
|
1470
|
+
set_signal_status(e, MAYBE_DIRTY);
|
|
1471
|
+
callback(e);
|
|
1472
|
+
}
|
|
1473
|
+
}
|
|
1474
|
+
_classPrivateFieldGet2(_unskipped_branches, this).add(effect);
|
|
1471
1475
|
}
|
|
1472
1476
|
/**
|
|
1473
|
-
*
|
|
1474
|
-
*
|
|
1475
|
-
*
|
|
1476
|
-
* @param {
|
|
1477
|
-
* @param {
|
|
1477
|
+
* Associate a change to a given source with the current
|
|
1478
|
+
* batch, noting its previous and current values
|
|
1479
|
+
* @param {Value} source
|
|
1480
|
+
* @param {any} value
|
|
1481
|
+
* @param {boolean} [is_derived]
|
|
1478
1482
|
*/
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
if (_classPrivateFieldGet2(_effect_pending, this)) internal_set(_classPrivateFieldGet2(_effect_pending, this), _classPrivateFieldGet2(_local_pending_count, this));
|
|
1487
|
-
});
|
|
1488
|
-
}
|
|
1489
|
-
get_effect_pending() {
|
|
1490
|
-
_classPrivateFieldGet2(_effect_pending_subscriber, this).call(this);
|
|
1491
|
-
return get(_classPrivateFieldGet2(_effect_pending, this));
|
|
1483
|
+
capture(source, value, is_derived = false) {
|
|
1484
|
+
if (source.v !== UNINITIALIZED && !this.previous.has(source)) this.previous.set(source, source.v);
|
|
1485
|
+
if ((source.f & 8388608) === 0) {
|
|
1486
|
+
this.current.set(source, [value, is_derived]);
|
|
1487
|
+
batch_values?.set(source, value);
|
|
1488
|
+
}
|
|
1489
|
+
if (!this.is_fork) source.v = value;
|
|
1492
1490
|
}
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
if (!_classPrivateFieldGet2(_props, this).onerror && !_classPrivateFieldGet2(_props, this).failed) throw error;
|
|
1496
|
-
if (current_batch?.is_fork) {
|
|
1497
|
-
if (_classPrivateFieldGet2(_main_effect, this)) current_batch.skip_effect(_classPrivateFieldGet2(_main_effect, this));
|
|
1498
|
-
if (_classPrivateFieldGet2(_pending_effect, this)) current_batch.skip_effect(_classPrivateFieldGet2(_pending_effect, this));
|
|
1499
|
-
if (_classPrivateFieldGet2(_failed_effect, this)) current_batch.skip_effect(_classPrivateFieldGet2(_failed_effect, this));
|
|
1500
|
-
current_batch.oncommit(() => {
|
|
1501
|
-
_assertClassBrand(_Boundary_brand, this, _handle_error).call(this, error);
|
|
1502
|
-
});
|
|
1503
|
-
} else _assertClassBrand(_Boundary_brand, this, _handle_error).call(this, error);
|
|
1491
|
+
activate() {
|
|
1492
|
+
current_batch = this;
|
|
1504
1493
|
}
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
_classPrivateFieldSet2(_main_effect, this, branch(() => _classPrivateFieldGet2(_children, this).call(this, _classPrivateFieldGet2(_anchor, this))));
|
|
1509
|
-
} catch (error) {
|
|
1510
|
-
this.error(error);
|
|
1494
|
+
deactivate() {
|
|
1495
|
+
current_batch = null;
|
|
1496
|
+
batch_values = null;
|
|
1511
1497
|
}
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
this.is_pending = true;
|
|
1527
|
-
_classPrivateFieldSet2(_pending_effect, this, branch(() => pending(_classPrivateFieldGet2(_anchor, this))));
|
|
1528
|
-
queue_micro_task(() => {
|
|
1529
|
-
var fragment = _classPrivateFieldSet2(_offscreen_fragment, this, document.createDocumentFragment());
|
|
1530
|
-
var anchor = create_text();
|
|
1531
|
-
fragment.append(anchor);
|
|
1532
|
-
_classPrivateFieldSet2(_main_effect, this, _assertClassBrand(_Boundary_brand, this, _run).call(this, () => {
|
|
1533
|
-
return branch(() => _classPrivateFieldGet2(_children, this).call(this, anchor));
|
|
1534
|
-
}));
|
|
1535
|
-
if (_classPrivateFieldGet2(_pending_count, this) === 0) {
|
|
1536
|
-
_classPrivateFieldGet2(_anchor, this).before(fragment);
|
|
1537
|
-
_classPrivateFieldSet2(_offscreen_fragment, this, null);
|
|
1538
|
-
pause_effect(_classPrivateFieldGet2(_pending_effect, this), () => {
|
|
1539
|
-
_classPrivateFieldSet2(_pending_effect, this, null);
|
|
1540
|
-
});
|
|
1541
|
-
_assertClassBrand(_Boundary_brand, this, _resolve).call(this, current_batch);
|
|
1498
|
+
flush() {
|
|
1499
|
+
try {
|
|
1500
|
+
is_processing = true;
|
|
1501
|
+
current_batch = this;
|
|
1502
|
+
_assertClassBrand(_Batch_brand, this, _process).call(this);
|
|
1503
|
+
} finally {
|
|
1504
|
+
flush_count = 0;
|
|
1505
|
+
last_scheduled_effect = null;
|
|
1506
|
+
collected_effects = null;
|
|
1507
|
+
legacy_updates = null;
|
|
1508
|
+
is_processing = false;
|
|
1509
|
+
current_batch = null;
|
|
1510
|
+
batch_values = null;
|
|
1511
|
+
old_values.clear();
|
|
1542
1512
|
}
|
|
1543
|
-
});
|
|
1544
|
-
}
|
|
1545
|
-
function _render() {
|
|
1546
|
-
try {
|
|
1547
|
-
this.is_pending = this.has_pending_snippet();
|
|
1548
|
-
_classPrivateFieldSet2(_pending_count, this, 0);
|
|
1549
|
-
_classPrivateFieldSet2(_local_pending_count, this, 0);
|
|
1550
|
-
_classPrivateFieldSet2(_main_effect, this, branch(() => {
|
|
1551
|
-
_classPrivateFieldGet2(_children, this).call(this, _classPrivateFieldGet2(_anchor, this));
|
|
1552
|
-
}));
|
|
1553
|
-
if (_classPrivateFieldGet2(_pending_count, this) > 0) {
|
|
1554
|
-
var fragment = _classPrivateFieldSet2(_offscreen_fragment, this, document.createDocumentFragment());
|
|
1555
|
-
move_effect(_classPrivateFieldGet2(_main_effect, this), fragment);
|
|
1556
|
-
const pending = _classPrivateFieldGet2(_props, this).pending;
|
|
1557
|
-
_classPrivateFieldSet2(_pending_effect, this, branch(() => pending(_classPrivateFieldGet2(_anchor, this))));
|
|
1558
|
-
} else _assertClassBrand(_Boundary_brand, this, _resolve).call(this, current_batch);
|
|
1559
|
-
} catch (error) {
|
|
1560
|
-
this.error(error);
|
|
1561
1513
|
}
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
batch.transfer_effects(_classPrivateFieldGet2(_dirty_effects, this), _classPrivateFieldGet2(_maybe_dirty_effects, this));
|
|
1569
|
-
}
|
|
1570
|
-
/**
|
|
1571
|
-
* @template T
|
|
1572
|
-
* @param {() => T} fn
|
|
1573
|
-
*/
|
|
1574
|
-
function _run(fn) {
|
|
1575
|
-
var previous_effect = active_effect;
|
|
1576
|
-
var previous_reaction = active_reaction;
|
|
1577
|
-
var previous_ctx = component_context;
|
|
1578
|
-
set_active_effect(_classPrivateFieldGet2(_effect, this));
|
|
1579
|
-
set_active_reaction(_classPrivateFieldGet2(_effect, this));
|
|
1580
|
-
set_component_context(_classPrivateFieldGet2(_effect, this).ctx);
|
|
1581
|
-
try {
|
|
1582
|
-
Batch.ensure();
|
|
1583
|
-
return fn();
|
|
1584
|
-
} catch (e) {
|
|
1585
|
-
handle_error(e);
|
|
1586
|
-
return null;
|
|
1587
|
-
} finally {
|
|
1588
|
-
set_active_effect(previous_effect);
|
|
1589
|
-
set_active_reaction(previous_reaction);
|
|
1590
|
-
set_component_context(previous_ctx);
|
|
1514
|
+
discard() {
|
|
1515
|
+
for (const fn of _classPrivateFieldGet2(_discard_callbacks, this)) fn(this);
|
|
1516
|
+
_classPrivateFieldGet2(_discard_callbacks, this).clear();
|
|
1517
|
+
for (const deferred of this.async_deriveds.values()) deferred.reject(OBSOLETE);
|
|
1518
|
+
_assertClassBrand(_Batch_brand, this, _unlink).call(this);
|
|
1519
|
+
_classPrivateFieldGet2(_deferred, this)?.resolve();
|
|
1591
1520
|
}
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1521
|
+
/**
|
|
1522
|
+
* @param {Effect} effect
|
|
1523
|
+
*/
|
|
1524
|
+
register_created_effect(effect) {
|
|
1525
|
+
_classPrivateFieldGet2(_new_effects, this).push(effect);
|
|
1526
|
+
}
|
|
1527
|
+
/**
|
|
1528
|
+
* @param {boolean} blocking
|
|
1529
|
+
* @param {Effect} effect
|
|
1530
|
+
*/
|
|
1531
|
+
increment(blocking, effect) {
|
|
1532
|
+
_classPrivateFieldSet2(_pending, this, _classPrivateFieldGet2(_pending, this) + 1);
|
|
1533
|
+
if (blocking) {
|
|
1534
|
+
let blocking_pending_count = _classPrivateFieldGet2(_blocking_pending, this).get(effect) ?? 0;
|
|
1535
|
+
_classPrivateFieldGet2(_blocking_pending, this).set(effect, blocking_pending_count + 1);
|
|
1604
1536
|
}
|
|
1605
|
-
return;
|
|
1606
1537
|
}
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
if (
|
|
1614
|
-
_classPrivateFieldGet2(
|
|
1615
|
-
|
|
1538
|
+
/**
|
|
1539
|
+
* @param {boolean} blocking
|
|
1540
|
+
* @param {Effect} effect
|
|
1541
|
+
*/
|
|
1542
|
+
decrement(blocking, effect) {
|
|
1543
|
+
_classPrivateFieldSet2(_pending, this, _classPrivateFieldGet2(_pending, this) - 1);
|
|
1544
|
+
if (blocking) {
|
|
1545
|
+
let blocking_pending_count = _classPrivateFieldGet2(_blocking_pending, this).get(effect) ?? 0;
|
|
1546
|
+
if (blocking_pending_count === 1) _classPrivateFieldGet2(_blocking_pending, this).delete(effect);
|
|
1547
|
+
else _classPrivateFieldGet2(_blocking_pending, this).set(effect, blocking_pending_count - 1);
|
|
1616
1548
|
}
|
|
1549
|
+
if (_classPrivateFieldGet2(_decrement_queued, this)) return;
|
|
1550
|
+
_classPrivateFieldSet2(_decrement_queued, this, true);
|
|
1551
|
+
queue_micro_task(() => {
|
|
1552
|
+
_classPrivateFieldSet2(_decrement_queued, this, false);
|
|
1553
|
+
if (this.linked) this.flush();
|
|
1554
|
+
});
|
|
1617
1555
|
}
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
* @param {
|
|
1621
|
-
*/
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1556
|
+
/**
|
|
1557
|
+
* @param {Set<Effect>} dirty_effects
|
|
1558
|
+
* @param {Set<Effect>} maybe_dirty_effects
|
|
1559
|
+
*/
|
|
1560
|
+
transfer_effects(dirty_effects, maybe_dirty_effects) {
|
|
1561
|
+
for (const e of dirty_effects) _classPrivateFieldGet2(_dirty_effects, this).add(e);
|
|
1562
|
+
for (const e of maybe_dirty_effects) _classPrivateFieldGet2(_maybe_dirty_effects, this).add(e);
|
|
1563
|
+
dirty_effects.clear();
|
|
1564
|
+
maybe_dirty_effects.clear();
|
|
1626
1565
|
}
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1566
|
+
/** @param {(batch: Batch) => void} fn */
|
|
1567
|
+
oncommit(fn) {
|
|
1568
|
+
_classPrivateFieldGet2(_commit_callbacks, this).add(fn);
|
|
1630
1569
|
}
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1570
|
+
/** @param {(batch: Batch) => void} fn */
|
|
1571
|
+
ondiscard(fn) {
|
|
1572
|
+
_classPrivateFieldGet2(_discard_callbacks, this).add(fn);
|
|
1634
1573
|
}
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
next();
|
|
1638
|
-
set_hydrate_node(skip_nodes());
|
|
1574
|
+
settled() {
|
|
1575
|
+
return (_classPrivateFieldGet2(_deferred, this) ?? _classPrivateFieldSet2(_deferred, this, deferred())).promise;
|
|
1639
1576
|
}
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
svelte_boundary_reset_noop();
|
|
1647
|
-
return;
|
|
1577
|
+
static ensure() {
|
|
1578
|
+
if (current_batch === null) {
|
|
1579
|
+
const batch = current_batch = new Batch();
|
|
1580
|
+
if (!is_processing && !is_flushing_sync) queue_micro_task(() => {
|
|
1581
|
+
if (!_classPrivateFieldGet2(_started, batch)) batch.flush();
|
|
1582
|
+
});
|
|
1648
1583
|
}
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
_assertClassBrand(_Boundary_brand, this, _render).call(this);
|
|
1656
|
-
});
|
|
1657
|
-
};
|
|
1658
|
-
/** @param {unknown} transformed_error */
|
|
1659
|
-
const handle_error_result = (transformed_error) => {
|
|
1660
|
-
try {
|
|
1661
|
-
calling_on_error = true;
|
|
1662
|
-
onerror?.(transformed_error, reset);
|
|
1663
|
-
calling_on_error = false;
|
|
1664
|
-
} catch (error) {
|
|
1665
|
-
invoke_error_boundary(error, _classPrivateFieldGet2(_effect, this) && _classPrivateFieldGet2(_effect, this).parent);
|
|
1584
|
+
return current_batch;
|
|
1585
|
+
}
|
|
1586
|
+
apply() {
|
|
1587
|
+
if (!async_mode_flag || !this.is_fork && _classPrivateFieldGet2(_prev, this) === null && _classPrivateFieldGet2(_next, this) === null) {
|
|
1588
|
+
batch_values = null;
|
|
1589
|
+
return;
|
|
1666
1590
|
}
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1591
|
+
batch_values = /* @__PURE__ */ new Map();
|
|
1592
|
+
for (const [source, [value]] of this.current) batch_values.set(source, value);
|
|
1593
|
+
for (let batch = first_batch; batch !== null; batch = _classPrivateFieldGet2(_next, batch)) {
|
|
1594
|
+
if (batch === this || batch.is_fork) continue;
|
|
1595
|
+
var intersects = false;
|
|
1596
|
+
if (batch.id < this.id) for (const [source, [, is_derived]] of batch.current) {
|
|
1597
|
+
if (is_derived) continue;
|
|
1598
|
+
if (this.current.has(source)) {
|
|
1599
|
+
intersects = true;
|
|
1600
|
+
break;
|
|
1601
|
+
}
|
|
1678
1602
|
}
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1603
|
+
if (!intersects) {
|
|
1604
|
+
for (const [source, previous] of batch.previous) if (!batch_values.has(source)) batch_values.set(source, previous);
|
|
1605
|
+
}
|
|
1606
|
+
}
|
|
1607
|
+
}
|
|
1608
|
+
/**
|
|
1609
|
+
*
|
|
1610
|
+
* @param {Effect} effect
|
|
1611
|
+
*/
|
|
1612
|
+
schedule(effect) {
|
|
1613
|
+
last_scheduled_effect = effect;
|
|
1614
|
+
if (effect.b?.is_pending && (effect.f & 16777228) !== 0 && (effect.f & 32768) === 0) {
|
|
1615
|
+
effect.b.defer_effect(effect);
|
|
1688
1616
|
return;
|
|
1689
1617
|
}
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1618
|
+
var e = effect;
|
|
1619
|
+
while (e.parent !== null) {
|
|
1620
|
+
e = e.parent;
|
|
1621
|
+
var flags = e.f;
|
|
1622
|
+
if (collected_effects !== null && e === active_effect) {
|
|
1623
|
+
if (async_mode_flag) return;
|
|
1624
|
+
if ((active_reaction === null || (active_reaction.f & 2) === 0) && !legacy_is_updating_store) return;
|
|
1625
|
+
}
|
|
1626
|
+
if ((flags & 96) !== 0) {
|
|
1627
|
+
if ((flags & 1024) === 0) return;
|
|
1628
|
+
e.f ^= CLEAN;
|
|
1629
|
+
}
|
|
1630
|
+
}
|
|
1631
|
+
_classPrivateFieldGet2(_roots, this).push(e);
|
|
1632
|
+
}
|
|
1633
|
+
};
|
|
1634
|
+
_Batch = Batch;
|
|
1635
|
+
function _is_deferred() {
|
|
1636
|
+
if (this.is_fork) return true;
|
|
1637
|
+
for (const effect of _classPrivateFieldGet2(_blocking_pending, this).keys()) {
|
|
1638
|
+
var e = effect;
|
|
1639
|
+
var skipped = false;
|
|
1640
|
+
while (e.parent !== null) {
|
|
1641
|
+
if (_classPrivateFieldGet2(_skipped_branches, this).has(e)) {
|
|
1642
|
+
skipped = true;
|
|
1643
|
+
break;
|
|
1644
|
+
}
|
|
1645
|
+
e = e.parent;
|
|
1646
|
+
}
|
|
1647
|
+
if (!skipped) return true;
|
|
1648
|
+
}
|
|
1649
|
+
return false;
|
|
1698
1650
|
}
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
* @param {Array<() => any>} sync
|
|
1705
|
-
* @param {Array<() => Promise<any>>} async
|
|
1706
|
-
* @param {(values: Value[]) => any} fn
|
|
1707
|
-
*/
|
|
1708
|
-
function flatten(blockers, sync, async, fn) {
|
|
1709
|
-
const d = is_runes() ? derived : derived_safe_equal;
|
|
1710
|
-
var pending = blockers.filter((b) => !b.settled);
|
|
1711
|
-
var deriveds = sync.map(d);
|
|
1712
|
-
if (async.length === 0 && pending.length === 0) {
|
|
1713
|
-
fn(deriveds);
|
|
1714
|
-
return;
|
|
1651
|
+
function _process() {
|
|
1652
|
+
_classPrivateFieldSet2(_started, this, true);
|
|
1653
|
+
if (flush_count++ > 1e3) {
|
|
1654
|
+
_assertClassBrand(_Batch_brand, this, _unlink).call(this);
|
|
1655
|
+
infinite_loop_guard();
|
|
1715
1656
|
}
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1657
|
+
for (const e of _classPrivateFieldGet2(_dirty_effects, this)) {
|
|
1658
|
+
_classPrivateFieldGet2(_maybe_dirty_effects, this).delete(e);
|
|
1659
|
+
set_signal_status(e, DIRTY);
|
|
1660
|
+
this.schedule(e);
|
|
1661
|
+
}
|
|
1662
|
+
for (const e of _classPrivateFieldGet2(_maybe_dirty_effects, this)) {
|
|
1663
|
+
set_signal_status(e, MAYBE_DIRTY);
|
|
1664
|
+
this.schedule(e);
|
|
1665
|
+
}
|
|
1666
|
+
const roots = _classPrivateFieldGet2(_roots, this);
|
|
1667
|
+
_classPrivateFieldSet2(_roots, this, []);
|
|
1668
|
+
this.apply();
|
|
1669
|
+
/** @type {Effect[]} */
|
|
1670
|
+
var effects = collected_effects = [];
|
|
1671
|
+
/** @type {Effect[]} */
|
|
1672
|
+
var render_effects = [];
|
|
1719
1673
|
/**
|
|
1720
|
-
* @
|
|
1674
|
+
* @type {Effect[]}
|
|
1675
|
+
* @deprecated when we get rid of legacy mode and stores, we can get rid of this
|
|
1721
1676
|
*/
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
}
|
|
1730
|
-
unset_context();
|
|
1677
|
+
var updates = legacy_updates = [];
|
|
1678
|
+
for (const root of roots) try {
|
|
1679
|
+
_assertClassBrand(_Batch_brand, this, _traverse).call(this, root, effects, render_effects);
|
|
1680
|
+
} catch (e) {
|
|
1681
|
+
reset_all(root);
|
|
1682
|
+
if (!_assertClassBrand(_Batch_brand, this, _is_deferred).call(this)) this.discard();
|
|
1683
|
+
throw e;
|
|
1731
1684
|
}
|
|
1732
|
-
|
|
1733
|
-
if (
|
|
1734
|
-
|
|
1685
|
+
current_batch = null;
|
|
1686
|
+
if (updates.length > 0) {
|
|
1687
|
+
var batch = _Batch.ensure();
|
|
1688
|
+
for (const e of updates) batch.schedule(e);
|
|
1689
|
+
}
|
|
1690
|
+
collected_effects = null;
|
|
1691
|
+
legacy_updates = null;
|
|
1692
|
+
if (_assertClassBrand(_Batch_brand, this, _is_deferred).call(this)) {
|
|
1693
|
+
_assertClassBrand(_Batch_brand, this, _defer_effects).call(this, render_effects);
|
|
1694
|
+
_assertClassBrand(_Batch_brand, this, _defer_effects).call(this, effects);
|
|
1695
|
+
for (const [e, t] of _classPrivateFieldGet2(_skipped_branches, this)) reset_branch(e, t);
|
|
1696
|
+
if (updates.length > 0)
|
|
1697
|
+
/** @type {Batch} */ _assertClassBrand(_Batch_brand, current_batch, _process).call(current_batch);
|
|
1735
1698
|
return;
|
|
1736
1699
|
}
|
|
1737
|
-
|
|
1738
|
-
|
|
1700
|
+
const earlier_batch = _assertClassBrand(_Batch_brand, this, _find_earlier_batch).call(this);
|
|
1701
|
+
if (earlier_batch) {
|
|
1702
|
+
_assertClassBrand(_Batch_brand, this, _defer_effects).call(this, render_effects);
|
|
1703
|
+
_assertClassBrand(_Batch_brand, this, _defer_effects).call(this, effects);
|
|
1704
|
+
_assertClassBrand(_Batch_brand, earlier_batch, _merge).call(earlier_batch, this);
|
|
1705
|
+
return;
|
|
1706
|
+
}
|
|
1707
|
+
_classPrivateFieldGet2(_dirty_effects, this).clear();
|
|
1708
|
+
_classPrivateFieldGet2(_maybe_dirty_effects, this).clear();
|
|
1709
|
+
for (const fn of _classPrivateFieldGet2(_commit_callbacks, this)) fn(this);
|
|
1710
|
+
_classPrivateFieldGet2(_commit_callbacks, this).clear();
|
|
1711
|
+
previous_batch = this;
|
|
1712
|
+
flush_queued_effects(render_effects);
|
|
1713
|
+
flush_queued_effects(effects);
|
|
1714
|
+
previous_batch = null;
|
|
1715
|
+
_classPrivateFieldGet2(_deferred, this)?.resolve();
|
|
1716
|
+
var next_batch = current_batch;
|
|
1717
|
+
if (_classPrivateFieldGet2(_pending, this) === 0 && (_classPrivateFieldGet2(_roots, this).length === 0 || next_batch !== null)) {
|
|
1718
|
+
_assertClassBrand(_Batch_brand, this, _unlink).call(this);
|
|
1719
|
+
if (async_mode_flag) {
|
|
1720
|
+
_assertClassBrand(_Batch_brand, this, _commit$1).call(this);
|
|
1721
|
+
current_batch = next_batch;
|
|
1722
|
+
}
|
|
1723
|
+
}
|
|
1724
|
+
if (_classPrivateFieldGet2(_roots, this).length > 0) if (next_batch !== null) {
|
|
1725
|
+
const batch = next_batch;
|
|
1726
|
+
_classPrivateFieldGet2(_roots, batch).push(..._classPrivateFieldGet2(_roots, this).filter((r) => !_classPrivateFieldGet2(_roots, batch).includes(r)));
|
|
1727
|
+
} else next_batch = this;
|
|
1728
|
+
if (next_batch !== null) _assertClassBrand(_Batch_brand, next_batch, _process).call(next_batch);
|
|
1729
|
+
}
|
|
1730
|
+
/**
|
|
1731
|
+
* Traverse the effect tree, executing effects or stashing
|
|
1732
|
+
* them for later execution as appropriate
|
|
1733
|
+
* @param {Effect} root
|
|
1734
|
+
* @param {Effect[]} effects
|
|
1735
|
+
* @param {Effect[]} render_effects
|
|
1736
|
+
*/
|
|
1737
|
+
function _traverse(root, effects, render_effects) {
|
|
1738
|
+
root.f ^= CLEAN;
|
|
1739
|
+
var effect = root.first;
|
|
1740
|
+
while (effect !== null) {
|
|
1741
|
+
var flags = effect.f;
|
|
1742
|
+
var is_branch = (flags & 96) !== 0;
|
|
1743
|
+
if (!(is_branch && (flags & 1024) !== 0 || (flags & 8192) !== 0 || _classPrivateFieldGet2(_skipped_branches, this).has(effect)) && effect.fn !== null) {
|
|
1744
|
+
if (is_branch) effect.f ^= CLEAN;
|
|
1745
|
+
else if ((flags & 4) !== 0) effects.push(effect);
|
|
1746
|
+
else if (async_mode_flag && (flags & 16777224) !== 0) render_effects.push(effect);
|
|
1747
|
+
else if (is_dirty(effect)) {
|
|
1748
|
+
if ((flags & 16) !== 0) _classPrivateFieldGet2(_maybe_dirty_effects, this).add(effect);
|
|
1749
|
+
update_effect(effect);
|
|
1750
|
+
}
|
|
1751
|
+
var child = effect.first;
|
|
1752
|
+
if (child !== null) {
|
|
1753
|
+
effect = child;
|
|
1754
|
+
continue;
|
|
1755
|
+
}
|
|
1756
|
+
}
|
|
1757
|
+
while (effect !== null) {
|
|
1758
|
+
var next = effect.next;
|
|
1759
|
+
if (next !== null) {
|
|
1760
|
+
effect = next;
|
|
1761
|
+
break;
|
|
1762
|
+
}
|
|
1763
|
+
effect = effect.parent;
|
|
1764
|
+
}
|
|
1739
1765
|
}
|
|
1740
|
-
if (blocker_promise) blocker_promise.then(() => {
|
|
1741
|
-
restore();
|
|
1742
|
-
run();
|
|
1743
|
-
unset_context();
|
|
1744
|
-
});
|
|
1745
|
-
else run();
|
|
1746
1766
|
}
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
function capture() {
|
|
1753
|
-
var previous_effect = active_effect;
|
|
1754
|
-
var previous_reaction = active_reaction;
|
|
1755
|
-
var previous_component_context = component_context;
|
|
1756
|
-
var previous_batch = current_batch;
|
|
1757
|
-
return function restore(activate_batch = true) {
|
|
1758
|
-
set_active_effect(previous_effect);
|
|
1759
|
-
set_active_reaction(previous_reaction);
|
|
1760
|
-
set_component_context(previous_component_context);
|
|
1761
|
-
if (activate_batch && (previous_effect.f & 16384) === 0) {
|
|
1762
|
-
previous_batch?.activate();
|
|
1763
|
-
previous_batch?.apply();
|
|
1767
|
+
function _find_earlier_batch() {
|
|
1768
|
+
var batch = _classPrivateFieldGet2(_prev, this);
|
|
1769
|
+
while (batch !== null) {
|
|
1770
|
+
if (!batch.is_fork) {
|
|
1771
|
+
for (const [value, [, is_derived]] of this.current) if (batch.current.has(value) && !is_derived) return batch;
|
|
1764
1772
|
}
|
|
1765
|
-
|
|
1766
|
-
}
|
|
1767
|
-
|
|
1768
|
-
set_active_effect(null);
|
|
1769
|
-
set_active_reaction(null);
|
|
1770
|
-
set_component_context(null);
|
|
1771
|
-
if (deactivate_batch) current_batch?.deactivate();
|
|
1773
|
+
batch = _classPrivateFieldGet2(_prev, batch);
|
|
1774
|
+
}
|
|
1775
|
+
return null;
|
|
1772
1776
|
}
|
|
1773
1777
|
/**
|
|
1774
|
-
* @
|
|
1778
|
+
* @param {Batch} batch
|
|
1775
1779
|
*/
|
|
1776
|
-
function
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1780
|
+
function _merge(batch) {
|
|
1781
|
+
for (const [source, value] of batch.current) {
|
|
1782
|
+
if (!this.previous.has(source) && batch.previous.has(source)) this.previous.set(source, batch.previous.get(source));
|
|
1783
|
+
this.current.set(source, value);
|
|
1784
|
+
}
|
|
1785
|
+
for (const [effect, deferred] of batch.async_deriveds) {
|
|
1786
|
+
const d = this.async_deriveds.get(effect);
|
|
1787
|
+
if (d) deferred.promise.then(d.resolve).catch(d.reject);
|
|
1788
|
+
}
|
|
1789
|
+
batch.async_deriveds.clear();
|
|
1790
|
+
this.transfer_effects(_classPrivateFieldGet2(_dirty_effects, batch), _classPrivateFieldGet2(_maybe_dirty_effects, batch));
|
|
1791
|
+
/**
|
|
1792
|
+
* mark all effects that depend on `batch.current`, except the
|
|
1793
|
+
* async effects that we just resolved (TODO unless they depend
|
|
1794
|
+
* on values in this batch that are NOT in the later batch?).
|
|
1795
|
+
* Through this we also will populate the correct #skipped_branches,
|
|
1796
|
+
* oncommit callbacks etc, so we don't need to merge them separately.
|
|
1797
|
+
* @param {Value} value
|
|
1798
|
+
*/
|
|
1799
|
+
const mark = (value) => {
|
|
1800
|
+
var reactions = value.reactions;
|
|
1801
|
+
if (reactions === null) return;
|
|
1802
|
+
if ((value.f & 2) !== 0 && (value.f & 6144) === 0) return;
|
|
1803
|
+
for (const reaction of reactions) {
|
|
1804
|
+
var flags = reaction.f;
|
|
1805
|
+
if ((flags & 2) !== 0) mark(reaction);
|
|
1806
|
+
else {
|
|
1807
|
+
var effect = reaction;
|
|
1808
|
+
if (flags & 4194320 && !this.async_deriveds.has(effect)) {
|
|
1809
|
+
_classPrivateFieldGet2(_maybe_dirty_effects, this).delete(effect);
|
|
1810
|
+
set_signal_status(effect, DIRTY);
|
|
1811
|
+
this.schedule(effect);
|
|
1812
|
+
}
|
|
1813
|
+
}
|
|
1814
|
+
}
|
|
1786
1815
|
};
|
|
1816
|
+
for (const source of this.current.keys()) mark(source);
|
|
1817
|
+
this.oncommit(() => batch.discard());
|
|
1818
|
+
_assertClassBrand(_Batch_brand, batch, _unlink).call(batch);
|
|
1819
|
+
current_batch = this;
|
|
1820
|
+
_assertClassBrand(_Batch_brand, this, _process).call(this);
|
|
1787
1821
|
}
|
|
1788
1822
|
/**
|
|
1789
|
-
* @
|
|
1790
|
-
* @param {() => V} fn
|
|
1791
|
-
* @returns {Derived<V>}
|
|
1823
|
+
* @param {Effect[]} effects
|
|
1792
1824
|
*/
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
var flags = 2 | DIRTY;
|
|
1796
|
-
if (active_effect !== null) active_effect.f |= EFFECT_PRESERVED;
|
|
1797
|
-
return {
|
|
1798
|
-
ctx: component_context,
|
|
1799
|
-
deps: null,
|
|
1800
|
-
effects: null,
|
|
1801
|
-
equals,
|
|
1802
|
-
f: flags,
|
|
1803
|
-
fn,
|
|
1804
|
-
reactions: null,
|
|
1805
|
-
rv: 0,
|
|
1806
|
-
v: UNINITIALIZED,
|
|
1807
|
-
wv: 0,
|
|
1808
|
-
parent: active_effect,
|
|
1809
|
-
ac: null
|
|
1810
|
-
};
|
|
1825
|
+
function _defer_effects(effects) {
|
|
1826
|
+
for (var i = 0; i < effects.length; i += 1) defer_effect(effects[i], _classPrivateFieldGet2(_dirty_effects, this), _classPrivateFieldGet2(_maybe_dirty_effects, this));
|
|
1811
1827
|
}
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
var promise = void 0;
|
|
1825
|
-
var signal = source(UNINITIALIZED);
|
|
1826
|
-
var should_suspend = !active_reaction;
|
|
1827
|
-
/** @type {Set<ReturnType<typeof deferred<V>>>} */
|
|
1828
|
-
var deferreds = /* @__PURE__ */ new Set();
|
|
1829
|
-
async_effect(() => {
|
|
1830
|
-
var effect = active_effect;
|
|
1831
|
-
/** @type {ReturnType<typeof deferred<V>>} */
|
|
1832
|
-
var d = deferred();
|
|
1833
|
-
promise = d.promise;
|
|
1834
|
-
try {
|
|
1835
|
-
Promise.resolve(fn()).then(d.resolve, (e) => {
|
|
1836
|
-
if (e !== STALE_REACTION) d.reject(e);
|
|
1837
|
-
}).finally(unset_context);
|
|
1838
|
-
} catch (error) {
|
|
1839
|
-
d.reject(error);
|
|
1840
|
-
unset_context();
|
|
1828
|
+
function _commit$1() {
|
|
1829
|
+
for (let batch = first_batch; batch !== null; batch = _classPrivateFieldGet2(_next, batch)) {
|
|
1830
|
+
var is_earlier = batch.id < this.id;
|
|
1831
|
+
/** @type {Source[]} */
|
|
1832
|
+
var sources = [];
|
|
1833
|
+
for (const [source, [value, is_derived]] of this.current) {
|
|
1834
|
+
if (batch.current.has(source)) {
|
|
1835
|
+
var batch_value = batch.current.get(source)[0];
|
|
1836
|
+
if (is_earlier && value !== batch_value) batch.current.set(source, [value, is_derived]);
|
|
1837
|
+
else continue;
|
|
1838
|
+
}
|
|
1839
|
+
sources.push(source);
|
|
1841
1840
|
}
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
if ((
|
|
1845
|
-
if (parent.b?.is_rendered()) batch.async_deriveds.get(effect)?.reject(OBSOLETE);
|
|
1846
|
-
else for (const d of deferreds.values()) d.reject(OBSOLETE);
|
|
1847
|
-
deferreds.add(d);
|
|
1848
|
-
batch.async_deriveds.set(effect, d);
|
|
1841
|
+
if (is_earlier) for (const [effect, deferred] of this.async_deriveds) {
|
|
1842
|
+
const d = batch.async_deriveds.get(effect);
|
|
1843
|
+
if (d) deferred.promise.then(d.resolve).catch(d.reject);
|
|
1849
1844
|
}
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1845
|
+
var current = [...batch.current.keys()].filter((source) => !batch.current.get(source)[1]);
|
|
1846
|
+
if (!_classPrivateFieldGet2(_started, batch) || current.length === 0) continue;
|
|
1847
|
+
var others = current.filter((source) => !this.current.has(source));
|
|
1848
|
+
if (others.length === 0) {
|
|
1849
|
+
if (is_earlier) batch.discard();
|
|
1850
|
+
} else if (sources.length > 0) {
|
|
1851
|
+
if (is_earlier) for (const unskipped of _classPrivateFieldGet2(_unskipped_branches, this)) batch.unskip_effect(unskipped, (e) => {
|
|
1852
|
+
if ((e.f & 4194320) !== 0) batch.schedule(e);
|
|
1853
|
+
else _assertClassBrand(_Batch_brand, batch, _defer_effects).call(batch, [e]);
|
|
1854
|
+
});
|
|
1858
1855
|
batch.activate();
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1856
|
+
/** @type {Set<Value>} */
|
|
1857
|
+
var marked = /* @__PURE__ */ new Set();
|
|
1858
|
+
/** @type {Map<Reaction, boolean>} */
|
|
1859
|
+
var checked = /* @__PURE__ */ new Map();
|
|
1860
|
+
for (var source of sources) mark_effects(source, others, marked, checked);
|
|
1861
|
+
checked = /* @__PURE__ */ new Map();
|
|
1862
|
+
var current_unequal = [...batch.current].filter(([c, v1]) => {
|
|
1863
|
+
const v2 = this.current.get(c);
|
|
1864
|
+
if (!v2) return true;
|
|
1865
|
+
return v2[0] !== v1[0] || v2[1] !== v1[1];
|
|
1866
|
+
}).map(([c]) => c);
|
|
1867
|
+
if (current_unequal.length > 0) {
|
|
1868
|
+
for (const effect of _classPrivateFieldGet2(_new_effects, this)) if ((effect.f & 155648) === 0 && depends_on(effect, current_unequal, checked)) if ((effect.f & 4194320) !== 0) {
|
|
1869
|
+
set_signal_status(effect, DIRTY);
|
|
1870
|
+
batch.schedule(effect);
|
|
1871
|
+
} else _classPrivateFieldGet2(_dirty_effects, batch).add(effect);
|
|
1865
1872
|
}
|
|
1866
|
-
batch.
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
teardown(() => {
|
|
1871
|
-
for (const d of deferreds) d.reject(OBSOLETE);
|
|
1872
|
-
});
|
|
1873
|
-
return new Promise((fulfil) => {
|
|
1874
|
-
/** @param {Promise<V>} p */
|
|
1875
|
-
function next(p) {
|
|
1876
|
-
function go() {
|
|
1877
|
-
if (p === promise) fulfil(signal);
|
|
1878
|
-
else next(promise);
|
|
1873
|
+
if (_classPrivateFieldGet2(_roots, batch).length > 0 && !_classPrivateFieldGet2(_decrement_queued, batch)) {
|
|
1874
|
+
batch.apply();
|
|
1875
|
+
for (var root of _classPrivateFieldGet2(_roots, batch)) _assertClassBrand(_Batch_brand, batch, _traverse).call(batch, root, [], []);
|
|
1876
|
+
_classPrivateFieldSet2(_roots, batch, []);
|
|
1879
1877
|
}
|
|
1880
|
-
|
|
1878
|
+
batch.deactivate();
|
|
1881
1879
|
}
|
|
1882
|
-
|
|
1883
|
-
|
|
1880
|
+
}
|
|
1881
|
+
}
|
|
1882
|
+
function _unlink() {
|
|
1883
|
+
if (!this.linked) return;
|
|
1884
|
+
var prev = _classPrivateFieldGet2(_prev, this);
|
|
1885
|
+
var next = _classPrivateFieldGet2(_next, this);
|
|
1886
|
+
if (prev === null) first_batch = next;
|
|
1887
|
+
else _classPrivateFieldSet2(_next, prev, next);
|
|
1888
|
+
if (next === null) last_batch = prev;
|
|
1889
|
+
else _classPrivateFieldSet2(_prev, next, prev);
|
|
1890
|
+
this.linked = false;
|
|
1884
1891
|
}
|
|
1885
1892
|
/**
|
|
1886
|
-
*
|
|
1887
|
-
*
|
|
1888
|
-
* @
|
|
1893
|
+
* Synchronously flush any pending updates.
|
|
1894
|
+
* Returns void if no callback is provided, otherwise returns the result of calling the callback.
|
|
1895
|
+
* @template [T=void]
|
|
1896
|
+
* @param {(() => T) | undefined} [fn]
|
|
1897
|
+
* @returns {T}
|
|
1889
1898
|
*/
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1899
|
+
function flushSync(fn) {
|
|
1900
|
+
var was_flushing_sync = is_flushing_sync;
|
|
1901
|
+
is_flushing_sync = true;
|
|
1902
|
+
try {
|
|
1903
|
+
var result;
|
|
1904
|
+
if (fn) {
|
|
1905
|
+
if (current_batch !== null && !current_batch.is_fork) current_batch.flush();
|
|
1906
|
+
result = fn();
|
|
1907
|
+
}
|
|
1908
|
+
while (true) {
|
|
1909
|
+
flush_tasks();
|
|
1910
|
+
if (current_batch === null) return result;
|
|
1911
|
+
current_batch.flush();
|
|
1912
|
+
}
|
|
1913
|
+
} finally {
|
|
1914
|
+
is_flushing_sync = was_flushing_sync;
|
|
1915
|
+
}
|
|
1895
1916
|
}
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
function derived_safe_equal(fn) {
|
|
1903
|
-
const signal = /* @__PURE__ */ derived(fn);
|
|
1904
|
-
signal.equals = safe_equals;
|
|
1905
|
-
return signal;
|
|
1917
|
+
function infinite_loop_guard() {
|
|
1918
|
+
try {
|
|
1919
|
+
effect_update_depth_exceeded();
|
|
1920
|
+
} catch (error) {
|
|
1921
|
+
invoke_error_boundary(error, last_scheduled_effect);
|
|
1922
|
+
}
|
|
1906
1923
|
}
|
|
1924
|
+
/** @type {Set<Effect> | null} */
|
|
1925
|
+
var eager_block_effects = null;
|
|
1907
1926
|
/**
|
|
1908
|
-
* @param {
|
|
1927
|
+
* @param {Array<Effect>} effects
|
|
1909
1928
|
* @returns {void}
|
|
1910
1929
|
*/
|
|
1911
|
-
function
|
|
1912
|
-
var
|
|
1913
|
-
if (
|
|
1914
|
-
|
|
1915
|
-
|
|
1930
|
+
function flush_queued_effects(effects) {
|
|
1931
|
+
var length = effects.length;
|
|
1932
|
+
if (length === 0) return;
|
|
1933
|
+
var i = 0;
|
|
1934
|
+
while (i < length) {
|
|
1935
|
+
var effect = effects[i++];
|
|
1936
|
+
if ((effect.f & 24576) === 0 && is_dirty(effect)) {
|
|
1937
|
+
eager_block_effects = /* @__PURE__ */ new Set();
|
|
1938
|
+
update_effect(effect);
|
|
1939
|
+
if (effect.deps === null && effect.first === null && effect.nodes === null && effect.teardown === null && effect.ac === null) unlink_effect(effect);
|
|
1940
|
+
if (eager_block_effects?.size > 0) {
|
|
1941
|
+
old_values.clear();
|
|
1942
|
+
for (const e of eager_block_effects) {
|
|
1943
|
+
if ((e.f & 24576) !== 0) continue;
|
|
1944
|
+
/** @type {Effect[]} */
|
|
1945
|
+
const ordered_effects = [e];
|
|
1946
|
+
let ancestor = e.parent;
|
|
1947
|
+
while (ancestor !== null) {
|
|
1948
|
+
if (eager_block_effects.has(ancestor)) {
|
|
1949
|
+
eager_block_effects.delete(ancestor);
|
|
1950
|
+
ordered_effects.push(ancestor);
|
|
1951
|
+
}
|
|
1952
|
+
ancestor = ancestor.parent;
|
|
1953
|
+
}
|
|
1954
|
+
for (let j = ordered_effects.length - 1; j >= 0; j--) {
|
|
1955
|
+
const e = ordered_effects[j];
|
|
1956
|
+
if ((e.f & 24576) !== 0) continue;
|
|
1957
|
+
update_effect(e);
|
|
1958
|
+
}
|
|
1959
|
+
}
|
|
1960
|
+
eager_block_effects.clear();
|
|
1961
|
+
}
|
|
1962
|
+
}
|
|
1916
1963
|
}
|
|
1964
|
+
eager_block_effects = null;
|
|
1917
1965
|
}
|
|
1918
1966
|
/**
|
|
1919
|
-
*
|
|
1920
|
-
*
|
|
1921
|
-
*
|
|
1967
|
+
* This is similar to `mark_reactions`, but it only marks async/block effects
|
|
1968
|
+
* depending on `value` and at least one of the other `sources`, so that
|
|
1969
|
+
* these effects can re-run after another batch has been committed
|
|
1970
|
+
* @param {Value} value
|
|
1971
|
+
* @param {Source[]} sources
|
|
1972
|
+
* @param {Set<Value>} marked
|
|
1973
|
+
* @param {Map<Reaction, boolean>} checked
|
|
1922
1974
|
*/
|
|
1923
|
-
function
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
derived.f &= ~WAS_MARKED;
|
|
1934
|
-
destroy_derived_effects(derived);
|
|
1935
|
-
value = update_reaction(derived);
|
|
1936
|
-
} finally {
|
|
1937
|
-
set_active_effect(prev_active_effect);
|
|
1975
|
+
function mark_effects(value, sources, marked, checked) {
|
|
1976
|
+
if (marked.has(value)) return;
|
|
1977
|
+
marked.add(value);
|
|
1978
|
+
if (value.reactions !== null) for (const reaction of value.reactions) {
|
|
1979
|
+
const flags = reaction.f;
|
|
1980
|
+
if ((flags & 2) !== 0) mark_effects(reaction, sources, marked, checked);
|
|
1981
|
+
else if ((flags & 4194320) !== 0 && (flags & 2048) === 0 && depends_on(reaction, sources, checked)) {
|
|
1982
|
+
set_signal_status(reaction, DIRTY);
|
|
1983
|
+
schedule_effect(reaction);
|
|
1984
|
+
}
|
|
1938
1985
|
}
|
|
1939
|
-
return value;
|
|
1940
1986
|
}
|
|
1941
1987
|
/**
|
|
1942
|
-
* @param {
|
|
1943
|
-
* @
|
|
1988
|
+
* @param {Reaction} reaction
|
|
1989
|
+
* @param {Source[]} sources
|
|
1990
|
+
* @param {Map<Reaction, boolean>} checked
|
|
1944
1991
|
*/
|
|
1945
|
-
function
|
|
1946
|
-
|
|
1947
|
-
if (
|
|
1948
|
-
|
|
1949
|
-
if (
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
} else derived.v = value;
|
|
1954
|
-
if (derived.deps === null) {
|
|
1955
|
-
set_signal_status(derived, CLEAN);
|
|
1956
|
-
return;
|
|
1957
|
-
}
|
|
1992
|
+
function depends_on(reaction, sources, checked) {
|
|
1993
|
+
const depends = checked.get(reaction);
|
|
1994
|
+
if (depends !== void 0) return depends;
|
|
1995
|
+
if (reaction.deps !== null) for (const dep of reaction.deps) {
|
|
1996
|
+
if (includes.call(sources, dep)) return true;
|
|
1997
|
+
if ((dep.f & 2) !== 0 && depends_on(dep, sources, checked)) {
|
|
1998
|
+
checked.set(dep, true);
|
|
1999
|
+
return true;
|
|
1958
2000
|
}
|
|
1959
2001
|
}
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
if (effect_tracking() || current_batch?.is_fork) batch_values.set(derived, value);
|
|
1963
|
-
} else update_derived_status(derived);
|
|
2002
|
+
checked.set(reaction, false);
|
|
2003
|
+
return false;
|
|
1964
2004
|
}
|
|
1965
2005
|
/**
|
|
1966
|
-
* @param {
|
|
2006
|
+
* @param {Effect} effect
|
|
2007
|
+
* @returns {void}
|
|
1967
2008
|
*/
|
|
1968
|
-
function
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
2009
|
+
function schedule_effect(effect) {
|
|
2010
|
+
/** @type {Batch} */ current_batch.schedule(effect);
|
|
2011
|
+
}
|
|
2012
|
+
/**
|
|
2013
|
+
* Mark all the effects inside a skipped branch CLEAN, so that
|
|
2014
|
+
* they can be correctly rescheduled later. Tracks dirty and maybe_dirty
|
|
2015
|
+
* effects so they can be rescheduled if the branch survives.
|
|
2016
|
+
* @param {Effect} effect
|
|
2017
|
+
* @param {{ d: Effect[], m: Effect[] }} tracked
|
|
2018
|
+
*/
|
|
2019
|
+
function reset_branch(effect, tracked) {
|
|
2020
|
+
if ((effect.f & 32) !== 0 && (effect.f & 1024) !== 0) return;
|
|
2021
|
+
if ((effect.f & 2048) !== 0) tracked.d.push(effect);
|
|
2022
|
+
else if ((effect.f & 4096) !== 0) tracked.m.push(effect);
|
|
2023
|
+
set_signal_status(effect, CLEAN);
|
|
2024
|
+
var e = effect.first;
|
|
2025
|
+
while (e !== null) {
|
|
2026
|
+
reset_branch(e, tracked);
|
|
2027
|
+
e = e.next;
|
|
1977
2028
|
}
|
|
1978
2029
|
}
|
|
1979
2030
|
/**
|
|
1980
|
-
*
|
|
2031
|
+
* Mark an entire effect tree clean following an error
|
|
2032
|
+
* @param {Effect} effect
|
|
1981
2033
|
*/
|
|
1982
|
-
function
|
|
1983
|
-
|
|
1984
|
-
|
|
2034
|
+
function reset_all(effect) {
|
|
2035
|
+
set_signal_status(effect, CLEAN);
|
|
2036
|
+
var e = effect.first;
|
|
2037
|
+
while (e !== null) {
|
|
2038
|
+
reset_all(e);
|
|
2039
|
+
e = e.next;
|
|
2040
|
+
}
|
|
1985
2041
|
}
|
|
1986
2042
|
//#endregion
|
|
1987
|
-
//#region ../../../node_modules/.bun/svelte@5.56.
|
|
2043
|
+
//#region ../../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/internal/client/reactivity/sources.js
|
|
1988
2044
|
/** @import { Derived, Effect, Source, Value } from '#client' */
|
|
1989
2045
|
/** @type {Set<Effect>} */
|
|
1990
2046
|
var eager_effects = /* @__PURE__ */ new Set();
|
|
@@ -2282,19 +2338,8 @@ function proxy(value) {
|
|
|
2282
2338
|
}
|
|
2283
2339
|
});
|
|
2284
2340
|
}
|
|
2285
|
-
new Set([
|
|
2286
|
-
"copyWithin",
|
|
2287
|
-
"fill",
|
|
2288
|
-
"pop",
|
|
2289
|
-
"push",
|
|
2290
|
-
"reverse",
|
|
2291
|
-
"shift",
|
|
2292
|
-
"sort",
|
|
2293
|
-
"splice",
|
|
2294
|
-
"unshift"
|
|
2295
|
-
]);
|
|
2296
2341
|
//#endregion
|
|
2297
|
-
//#region ../../../node_modules/.bun/svelte@5.56.
|
|
2342
|
+
//#region ../../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/internal/client/dom/operations.js
|
|
2298
2343
|
/** @import { Effect, TemplateNode } from '#client' */
|
|
2299
2344
|
/** @type {Window} */
|
|
2300
2345
|
var $window;
|
|
@@ -2472,39 +2517,7 @@ function merge_text_nodes(text) {
|
|
|
2472
2517
|
}
|
|
2473
2518
|
}
|
|
2474
2519
|
//#endregion
|
|
2475
|
-
//#region ../../../node_modules/.bun/svelte@5.56.
|
|
2476
|
-
var listening_to_form_reset = false;
|
|
2477
|
-
function add_form_reset_listener() {
|
|
2478
|
-
if (!listening_to_form_reset) {
|
|
2479
|
-
listening_to_form_reset = true;
|
|
2480
|
-
document.addEventListener("reset", (evt) => {
|
|
2481
|
-
Promise.resolve().then(() => {
|
|
2482
|
-
if (!evt.defaultPrevented) for (const e of evt.target.elements)
|
|
2483
|
-
/** @type {any} */ e[FORM_RESET_HANDLER]?.();
|
|
2484
|
-
});
|
|
2485
|
-
}, { capture: true });
|
|
2486
|
-
}
|
|
2487
|
-
}
|
|
2488
|
-
//#endregion
|
|
2489
|
-
//#region ../../../node_modules/.bun/svelte@5.56.1/node_modules/svelte/src/internal/client/dom/elements/bindings/shared.js
|
|
2490
|
-
/**
|
|
2491
|
-
* @template T
|
|
2492
|
-
* @param {() => T} fn
|
|
2493
|
-
*/
|
|
2494
|
-
function without_reactive_context(fn) {
|
|
2495
|
-
var previous_reaction = active_reaction;
|
|
2496
|
-
var previous_effect = active_effect;
|
|
2497
|
-
set_active_reaction(null);
|
|
2498
|
-
set_active_effect(null);
|
|
2499
|
-
try {
|
|
2500
|
-
return fn();
|
|
2501
|
-
} finally {
|
|
2502
|
-
set_active_reaction(previous_reaction);
|
|
2503
|
-
set_active_effect(previous_effect);
|
|
2504
|
-
}
|
|
2505
|
-
}
|
|
2506
|
-
//#endregion
|
|
2507
|
-
//#region ../../../node_modules/.bun/svelte@5.56.1/node_modules/svelte/src/internal/client/reactivity/effects.js
|
|
2520
|
+
//#region ../../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/internal/client/reactivity/effects.js
|
|
2508
2521
|
/** @import { Blocker, ComponentContext, ComponentContextLegacy, Derived, Effect, TemplateNode, TransitionManager } from '#client' */
|
|
2509
2522
|
/**
|
|
2510
2523
|
* @param {'$effect' | '$effect.pre' | '$inspect'} rune
|
|
@@ -2890,15 +2903,18 @@ function move_effect(effect, fragment) {
|
|
|
2890
2903
|
}
|
|
2891
2904
|
}
|
|
2892
2905
|
//#endregion
|
|
2893
|
-
//#region ../../../node_modules/.bun/svelte@5.56.
|
|
2906
|
+
//#region ../../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/internal/client/legacy.js
|
|
2894
2907
|
/**
|
|
2895
2908
|
* @type {Set<Value> | null}
|
|
2896
2909
|
* @deprecated
|
|
2897
2910
|
*/
|
|
2898
2911
|
var captured_signals = null;
|
|
2899
2912
|
//#endregion
|
|
2900
|
-
//#region ../../../node_modules/.bun/svelte@5.56.
|
|
2913
|
+
//#region ../../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/internal/client/runtime.js
|
|
2901
2914
|
/** @import { Derived, Effect, Reaction, Source, Value } from '#client' */
|
|
2915
|
+
/**
|
|
2916
|
+
* True if updating in an effect context that is reactive (i.e. not branch/root effects)
|
|
2917
|
+
*/
|
|
2902
2918
|
var is_updating_effect = false;
|
|
2903
2919
|
var is_destroying_effect = false;
|
|
2904
2920
|
/** @param {boolean} value */
|
|
@@ -3099,6 +3115,11 @@ function remove_reaction(signal, dependency) {
|
|
|
3099
3115
|
derived.f &= ~WAS_MARKED;
|
|
3100
3116
|
}
|
|
3101
3117
|
if (derived.v !== UNINITIALIZED) update_derived_status(derived);
|
|
3118
|
+
if (derived.ac !== null) without_reactive_context(() => {
|
|
3119
|
+
/** @type {AbortController} */ derived.ac.abort(STALE_REACTION);
|
|
3120
|
+
derived.ac = null;
|
|
3121
|
+
set_signal_status(derived, DIRTY);
|
|
3122
|
+
});
|
|
3102
3123
|
freeze_derived_effects(derived);
|
|
3103
3124
|
remove_reactions(derived, 0);
|
|
3104
3125
|
}
|
|
@@ -3124,7 +3145,7 @@ function update_effect(effect) {
|
|
|
3124
3145
|
var previous_effect = active_effect;
|
|
3125
3146
|
var was_updating_effect = is_updating_effect;
|
|
3126
3147
|
active_effect = effect;
|
|
3127
|
-
is_updating_effect =
|
|
3148
|
+
is_updating_effect = (flags & 96) === 0;
|
|
3128
3149
|
try {
|
|
3129
3150
|
if ((flags & 16777232) !== 0) destroy_block_effect_children(effect);
|
|
3130
3151
|
else destroy_effect_children(effect);
|
|
@@ -3241,7 +3262,7 @@ function untrack(fn) {
|
|
|
3241
3262
|
}
|
|
3242
3263
|
}
|
|
3243
3264
|
//#endregion
|
|
3244
|
-
//#region ../../../node_modules/.bun/svelte@5.56.
|
|
3265
|
+
//#region ../../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/internal/client/dom/elements/events.js
|
|
3245
3266
|
/**
|
|
3246
3267
|
* Used on elements, as a map of event type -> event handler,
|
|
3247
3268
|
* and on events themselves to track which element handled an event
|
|
@@ -3324,7 +3345,7 @@ function handle_event_propagation(event) {
|
|
|
3324
3345
|
}
|
|
3325
3346
|
}
|
|
3326
3347
|
//#endregion
|
|
3327
|
-
//#region ../../../node_modules/.bun/svelte@5.56.
|
|
3348
|
+
//#region ../../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/internal/client/dom/reconciler.js
|
|
3328
3349
|
var policy = globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", {
|
|
3329
3350
|
/** @param {string} html */
|
|
3330
3351
|
createHTML: (html) => {
|
|
@@ -3343,7 +3364,7 @@ function create_fragment_from_html(html) {
|
|
|
3343
3364
|
return elem.content;
|
|
3344
3365
|
}
|
|
3345
3366
|
//#endregion
|
|
3346
|
-
//#region ../../../node_modules/.bun/svelte@5.56.
|
|
3367
|
+
//#region ../../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/internal/client/dom/template.js
|
|
3347
3368
|
/** @import { Effect, EffectNodes, TemplateNode } from '#client' */
|
|
3348
3369
|
/** @import { TemplateStructure } from './types' */
|
|
3349
3370
|
/**
|
|
@@ -3493,9 +3514,8 @@ function is_passive_event(name) {
|
|
|
3493
3514
|
* @returns {void}
|
|
3494
3515
|
*/
|
|
3495
3516
|
function set_text(text, value) {
|
|
3496
|
-
var _text;
|
|
3497
3517
|
var str = value == null ? "" : typeof value === "object" ? `${value}` : value;
|
|
3498
|
-
if (str !== (
|
|
3518
|
+
if (str !== (text[TEXT_CACHE] ?? (text[TEXT_CACHE] = text.nodeValue))) {
|
|
3499
3519
|
/** @type {any} */ text[TEXT_CACHE] = str;
|
|
3500
3520
|
text.nodeValue = `${str}`;
|
|
3501
3521
|
}
|
|
@@ -3676,7 +3696,7 @@ function unmount(component, options) {
|
|
|
3676
3696
|
return Promise.resolve();
|
|
3677
3697
|
}
|
|
3678
3698
|
//#endregion
|
|
3679
|
-
//#region ../../../node_modules/.bun/svelte@5.56.
|
|
3699
|
+
//#region ../../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/internal/client/dom/blocks/branches.js
|
|
3680
3700
|
/** @import { Effect, TemplateNode } from '#client' */
|
|
3681
3701
|
var _batches = /* @__PURE__ */ new WeakMap();
|
|
3682
3702
|
var _onscreen = /* @__PURE__ */ new WeakMap();
|
|
@@ -3799,7 +3819,7 @@ var BranchManager = class {
|
|
|
3799
3819
|
}
|
|
3800
3820
|
};
|
|
3801
3821
|
//#endregion
|
|
3802
|
-
//#region ../../../node_modules/.bun/svelte@5.56.
|
|
3822
|
+
//#region ../../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/internal/client/dom/blocks/if.js
|
|
3803
3823
|
/** @import { TemplateNode } from '#client' */
|
|
3804
3824
|
/**
|
|
3805
3825
|
* @param {TemplateNode} node
|
|
@@ -3845,7 +3865,7 @@ function if_block(node, fn, elseif = false) {
|
|
|
3845
3865
|
}, flags);
|
|
3846
3866
|
}
|
|
3847
3867
|
//#endregion
|
|
3848
|
-
//#region ../../../node_modules/.bun/svelte@5.56.
|
|
3868
|
+
//#region ../../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/internal/client/dom/blocks/each.js
|
|
3849
3869
|
/** @import { EachItem, EachOutroGroup, EachState, Effect, EffectNodes, MaybeSource, Source, TemplateNode, TransitionManager, Value } from '#client' */
|
|
3850
3870
|
/** @import { Batch } from '../../reactivity/batch.js'; */
|
|
3851
3871
|
/**
|
|
@@ -4310,7 +4330,7 @@ function html(node, get_value, is_controlled = false, svg = false, mathml = fals
|
|
|
4310
4330
|
});
|
|
4311
4331
|
}
|
|
4312
4332
|
//#endregion
|
|
4313
|
-
//#region ../../../node_modules/.bun/svelte@5.56.
|
|
4333
|
+
//#region ../../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/internal/client/dom/css.js
|
|
4314
4334
|
/**
|
|
4315
4335
|
* @param {Node} anchor
|
|
4316
4336
|
* @param {{ hash: string, code: string }} css
|
|
@@ -4328,7 +4348,7 @@ function append_styles$1(anchor, css) {
|
|
|
4328
4348
|
});
|
|
4329
4349
|
}
|
|
4330
4350
|
//#endregion
|
|
4331
|
-
//#region ../../../node_modules/.bun/svelte@5.56.
|
|
4351
|
+
//#region ../../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/internal/shared/attributes.js
|
|
4332
4352
|
var whitespace = [..." \n\r\f\xA0\v"];
|
|
4333
4353
|
/**
|
|
4334
4354
|
* @param {any} value
|
|
@@ -4438,7 +4458,7 @@ function to_style(value, styles) {
|
|
|
4438
4458
|
return value == null ? null : String(value);
|
|
4439
4459
|
}
|
|
4440
4460
|
//#endregion
|
|
4441
|
-
//#region ../../../node_modules/.bun/svelte@5.56.
|
|
4461
|
+
//#region ../../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/internal/client/dom/elements/class.js
|
|
4442
4462
|
/**
|
|
4443
4463
|
* @param {Element} dom
|
|
4444
4464
|
* @param {boolean | number} is_html
|
|
@@ -4463,7 +4483,7 @@ function set_class(dom, is_html, value, hash, prev_classes, next_classes) {
|
|
|
4463
4483
|
return next_classes;
|
|
4464
4484
|
}
|
|
4465
4485
|
//#endregion
|
|
4466
|
-
//#region ../../../node_modules/.bun/svelte@5.56.
|
|
4486
|
+
//#region ../../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/internal/client/dom/elements/style.js
|
|
4467
4487
|
/**
|
|
4468
4488
|
* @param {Element & ElementCSSInlineStyle} dom
|
|
4469
4489
|
* @param {Record<string, any>} prev
|
|
@@ -4497,7 +4517,7 @@ function set_style(dom, value, prev_styles, next_styles) {
|
|
|
4497
4517
|
return next_styles;
|
|
4498
4518
|
}
|
|
4499
4519
|
//#endregion
|
|
4500
|
-
//#region ../../../node_modules/.bun/svelte@5.56.
|
|
4520
|
+
//#region ../../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/internal/client/dom/elements/attributes.js
|
|
4501
4521
|
/** @import { Blocker, Effect } from '#client' */
|
|
4502
4522
|
var IS_CUSTOM_ELEMENT = Symbol("is custom element");
|
|
4503
4523
|
var IS_HTML = Symbol("is html");
|
|
@@ -4574,8 +4594,7 @@ function set_attribute(element, attribute, value, skip_warning) {
|
|
|
4574
4594
|
* @param {Element} element
|
|
4575
4595
|
*/
|
|
4576
4596
|
function get_attributes(element) {
|
|
4577
|
-
|
|
4578
|
-
return (_element = element)[ATTRIBUTES_CACHE] ?? (_element[ATTRIBUTES_CACHE] = {
|
|
4597
|
+
return element[ATTRIBUTES_CACHE] ?? (element[ATTRIBUTES_CACHE] = {
|
|
4579
4598
|
[IS_CUSTOM_ELEMENT]: element.nodeName.includes("-"),
|
|
4580
4599
|
[IS_HTML]: element.namespaceURI === "http://www.w3.org/1999/xhtml"
|
|
4581
4600
|
});
|
|
@@ -4599,7 +4618,7 @@ function get_setters(element) {
|
|
|
4599
4618
|
return setters;
|
|
4600
4619
|
}
|
|
4601
4620
|
//#endregion
|
|
4602
|
-
//#region ../../../node_modules/.bun/svelte@5.56.
|
|
4621
|
+
//#region ../../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/internal/client/dom/elements/bindings/size.js
|
|
4603
4622
|
var _ResizeObserverSingleton;
|
|
4604
4623
|
var _listeners = /* @__PURE__ */ new WeakMap();
|
|
4605
4624
|
var _observer = /* @__PURE__ */ new WeakMap();
|
|
@@ -4651,7 +4670,7 @@ function _getObserver() {
|
|
|
4651
4670
|
}
|
|
4652
4671
|
_defineProperty(ResizeObserverSingleton, "entries", /* @__PURE__ */ new WeakMap());
|
|
4653
4672
|
//#endregion
|
|
4654
|
-
//#region ../../../node_modules/.bun/svelte@5.56.
|
|
4673
|
+
//#region ../../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/internal/client/dom/elements/bindings/this.js
|
|
4655
4674
|
/** @import { ComponentContext, Effect } from '#client' */
|
|
4656
4675
|
/**
|
|
4657
4676
|
* @param {any} bound_value
|
|
@@ -4703,7 +4722,7 @@ function bind_this(element_or_component = {}, update, get_value, get_parts) {
|
|
|
4703
4722
|
return element_or_component;
|
|
4704
4723
|
}
|
|
4705
4724
|
//#endregion
|
|
4706
|
-
//#region ../../../node_modules/.bun/svelte@5.56.
|
|
4725
|
+
//#region ../../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/internal/client/reactivity/props.js
|
|
4707
4726
|
/** @import { Derived, Effect, Source } from './types.js' */
|
|
4708
4727
|
/**
|
|
4709
4728
|
* This function is responsible for synchronizing a possibly bound prop with the inner component state.
|
|
@@ -4796,7 +4815,7 @@ function prop(props, key, flags, fallback) {
|
|
|
4796
4815
|
});
|
|
4797
4816
|
}
|
|
4798
4817
|
//#endregion
|
|
4799
|
-
//#region ../../../node_modules/.bun/svelte@5.56.
|
|
4818
|
+
//#region ../../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/legacy/legacy-client.js
|
|
4800
4819
|
/** @import { ComponentConstructorOptions, ComponentType, SvelteComponent, Component } from 'svelte' */
|
|
4801
4820
|
/**
|
|
4802
4821
|
* Takes the same options as a Svelte 4 component and the component function and returns a Svelte 4 compatible component.
|
|
@@ -4915,7 +4934,7 @@ var Svelte4Component = class {
|
|
|
4915
4934
|
}
|
|
4916
4935
|
};
|
|
4917
4936
|
//#endregion
|
|
4918
|
-
//#region ../../../node_modules/.bun/svelte@5.56.
|
|
4937
|
+
//#region ../../../node_modules/.bun/svelte@5.56.8/node_modules/svelte/src/internal/client/dom/elements/custom-element.js
|
|
4919
4938
|
/**
|
|
4920
4939
|
* @typedef {Object} CustomElementPropDefinition
|
|
4921
4940
|
* @property {string} [attribute]
|
|
@@ -5200,114 +5219,9 @@ function create_custom_element(Component, props_definition, slots, exports, shad
|
|
|
5200
5219
|
return Class;
|
|
5201
5220
|
}
|
|
5202
5221
|
//#endregion
|
|
5203
|
-
//#region ../../lib-svelte/styling/dist/index2.js
|
|
5204
|
-
var e$1 = {
|
|
5205
|
-
50: "#e8f5e9",
|
|
5206
|
-
500: "#4caf50"
|
|
5207
|
-
}, t$2 = {
|
|
5208
|
-
200: "#9fa8da",
|
|
5209
|
-
500: "#3f51b5",
|
|
5210
|
-
800: "#283593"
|
|
5211
|
-
}, n$1 = { 500: "#ff9800" }, r$1 = {
|
|
5212
|
-
200: "#f48fb1",
|
|
5213
|
-
900: "#880e4f",
|
|
5214
|
-
A400: "#f50057"
|
|
5215
|
-
}, i = {
|
|
5216
|
-
50: "#ffebee",
|
|
5217
|
-
700: "#d32f2f"
|
|
5218
|
-
}, a = {
|
|
5219
|
-
TEXT: "black",
|
|
5220
|
-
DISABLED: "grey",
|
|
5221
|
-
DISABLED_SECONDARY: "#ABABAB",
|
|
5222
|
-
CORRECT: e$1[500],
|
|
5223
|
-
CORRECT_SECONDARY: e$1[50],
|
|
5224
|
-
CORRECT_TERTIARY: "#0EA449",
|
|
5225
|
-
CORRECT_WITH_ICON: "#087D38",
|
|
5226
|
-
INCORRECT: n$1[500],
|
|
5227
|
-
INCORRECT_SECONDARY: i[50],
|
|
5228
|
-
INCORRECT_WITH_ICON: "#BF0D00",
|
|
5229
|
-
MISSING: i[700],
|
|
5230
|
-
MISSING_WITH_ICON: "#6A78A1",
|
|
5231
|
-
PRIMARY: t$2[500],
|
|
5232
|
-
PRIMARY_LIGHT: t$2[200],
|
|
5233
|
-
PRIMARY_DARK: t$2[800],
|
|
5234
|
-
SECONDARY: r$1.A400,
|
|
5235
|
-
SECONDARY_LIGHT: r$1[200],
|
|
5236
|
-
SECONDARY_DARK: r$1[900],
|
|
5237
|
-
TERTIARY: "#146EB3",
|
|
5238
|
-
TERTIARY_LIGHT: "#D0E2F0",
|
|
5239
|
-
BACKGROUND: "rgba(255,255,255,0)",
|
|
5240
|
-
BACKGROUND_DARK: "#ECEDF1",
|
|
5241
|
-
DROPDOWN_BACKGROUND: "#E0E1E6",
|
|
5242
|
-
SECONDARY_BACKGROUND: "rgba(241,241,241,1)",
|
|
5243
|
-
BORDER: "#9A9A9A",
|
|
5244
|
-
BORDER_LIGHT: "#D1D1D1",
|
|
5245
|
-
BORDER_DARK: "#646464",
|
|
5246
|
-
BORDER_GRAY: "#7E8494",
|
|
5247
|
-
BLACK: "#000000",
|
|
5248
|
-
WHITE: "#ffffff",
|
|
5249
|
-
TRANSPARENT: "transparent",
|
|
5250
|
-
FOCUS_CHECKED: "#BBDEFB",
|
|
5251
|
-
FOCUS_CHECKED_BORDER: "#1565C0",
|
|
5252
|
-
FOCUS_UNCHECKED: "#E0E0E0",
|
|
5253
|
-
FOCUS_UNCHECKED_BORDER: "#757575",
|
|
5254
|
-
BLUE_GREY100: "#F3F5F7",
|
|
5255
|
-
BLUE_GREY300: "#C0C3CF",
|
|
5256
|
-
BLUE_GREY600: "#7E8494",
|
|
5257
|
-
BLUE_GREY900: "#152452",
|
|
5258
|
-
FADED_PRIMARY: "#DCDAFB"
|
|
5259
|
-
};
|
|
5260
|
-
Object.freeze(a);
|
|
5261
|
-
var o = (e) => (...t) => {
|
|
5262
|
-
let n = t.pop();
|
|
5263
|
-
return t.reduceRight((t, n) => `var(--${e}-${n}, ${t})`, n);
|
|
5264
|
-
}, s = o("pie"), c = () => s("text", a.TEXT), l = () => s("disabled", a.DISABLED), u = () => s("disabled-secondary", a.DISABLED_SECONDARY), d = () => s("correct", a.CORRECT), f = () => s("correct-secondary", a.CORRECT_SECONDARY), p = () => s("correct-tertiary", a.CORRECT_TERTIARY), m = () => s("correct-icon", a.CORRECT_WITH_ICON), h = () => s("incorrect", a.INCORRECT), g = () => s("incorrect-icon", a.INCORRECT_WITH_ICON), _ = () => s("incorrect-secondary", a.INCORRECT_SECONDARY), v = () => s("missing", a.MISSING), y = () => s("missing-icon", a.MISSING_WITH_ICON), b = () => s("primary", a.PRIMARY), x = () => s("primary-light", a.PRIMARY_LIGHT), S = () => s("primary-dark", a.PRIMARY_DARK), C = () => s("primary-text", "text", a.TEXT), w = () => s("faded-primary", a.FADED_PRIMARY), T = () => s("secondary", a.SECONDARY), E = () => s("secondary-light", a.SECONDARY_LIGHT), D = () => s("secondary-dark", a.SECONDARY_DARK), O = () => s("secondary-text", "text", a.TEXT), k = () => s("background", a.BACKGROUND), A = () => s("background-dark", a.BACKGROUND_DARK), j = () => s("secondary-background", a.SECONDARY_BACKGROUND), M = () => s("dropdown-background", a.DROPDOWN_BACKGROUND), N = () => s("tertiary", a.TERTIARY), P = () => s("tertiary-light", a.TERTIARY_LIGHT), F = () => s("border", a.BORDER), I = () => s("border-light", a.BORDER_LIGHT), L = () => s("border-dark", a.BORDER_DARK), R = () => s("border-gray", a.BORDER_GRAY), z = () => s("black", a.BLACK), B = () => s("white", a.WHITE), V = () => a.TRANSPARENT, H = () => s("focus-checked", a.FOCUS_CHECKED), U = () => s("focus-checked-border", a.FOCUS_CHECKED_BORDER), W = () => s("focus-unchecked", a.FOCUS_UNCHECKED), G = () => s("focus-unchecked-border", a.FOCUS_UNCHECKED_BORDER), K = () => s("blue-grey-100", a.BLUE_GREY100), q = () => s("blue-grey-300", a.BLUE_GREY300), J = () => s("blue-grey-600", a.BLUE_GREY600), Y = () => s("blue-grey-900", a.BLUE_GREY900), Z = {
|
|
5265
|
-
text: c,
|
|
5266
|
-
disabled: l,
|
|
5267
|
-
disabledSecondary: u,
|
|
5268
|
-
correct: d,
|
|
5269
|
-
correctSecondary: f,
|
|
5270
|
-
correctTertiary: p,
|
|
5271
|
-
correctWithIcon: m,
|
|
5272
|
-
incorrect: h,
|
|
5273
|
-
incorrectWithIcon: g,
|
|
5274
|
-
incorrectSecondary: _,
|
|
5275
|
-
missing: v,
|
|
5276
|
-
missingWithIcon: y,
|
|
5277
|
-
primary: b,
|
|
5278
|
-
primaryLight: x,
|
|
5279
|
-
primaryDark: S,
|
|
5280
|
-
primaryText: C,
|
|
5281
|
-
fadedPrimary: w,
|
|
5282
|
-
secondary: T,
|
|
5283
|
-
secondaryLight: E,
|
|
5284
|
-
secondaryDark: D,
|
|
5285
|
-
secondaryText: O,
|
|
5286
|
-
background: k,
|
|
5287
|
-
backgroundDark: A,
|
|
5288
|
-
secondaryBackground: j,
|
|
5289
|
-
dropdownBackground: M,
|
|
5290
|
-
tertiary: N,
|
|
5291
|
-
tertiaryLight: P,
|
|
5292
|
-
border: F,
|
|
5293
|
-
borderLight: I,
|
|
5294
|
-
borderDark: L,
|
|
5295
|
-
borderGray: R,
|
|
5296
|
-
black: z,
|
|
5297
|
-
white: B,
|
|
5298
|
-
transparent: V,
|
|
5299
|
-
focusChecked: H,
|
|
5300
|
-
focusCheckedBorder: U,
|
|
5301
|
-
focusUnchecked: W,
|
|
5302
|
-
focusUncheckedBorder: G,
|
|
5303
|
-
blueGrey100: K,
|
|
5304
|
-
blueGrey300: q,
|
|
5305
|
-
blueGrey600: J,
|
|
5306
|
-
blueGrey900: Y
|
|
5307
|
-
};
|
|
5308
|
-
//#endregion
|
|
5309
5222
|
//#region ../../lib-svelte/delivery-events/dist/index2.js
|
|
5310
|
-
var _e
|
|
5223
|
+
var _e;
|
|
5224
|
+
var _e2;
|
|
5311
5225
|
var e = (_e = class e extends CustomEvent {
|
|
5312
5226
|
constructor(t, n, r) {
|
|
5313
5227
|
super(e.TYPE, {
|
|
@@ -5320,7 +5234,8 @@ var e = (_e = class e extends CustomEvent {
|
|
|
5320
5234
|
}
|
|
5321
5235
|
}), this.component = t, this.complete = n;
|
|
5322
5236
|
}
|
|
5323
|
-
}, _e.TYPE = "model-set", _e)
|
|
5237
|
+
}, _e.TYPE = "model-set", _e);
|
|
5238
|
+
var t$1 = (_e2 = class e extends CustomEvent {
|
|
5324
5239
|
constructor(t, n) {
|
|
5325
5240
|
super(e.TYPE, {
|
|
5326
5241
|
bubbles: !0,
|
|
@@ -5381,7 +5296,7 @@ function AudioPlayer($$anchor, $$props) {
|
|
|
5381
5296
|
BLOCKED: "blocked",
|
|
5382
5297
|
PAUSED: "paused"
|
|
5383
5298
|
};
|
|
5384
|
-
let hasAudio = prop($$props, "hasAudio", 7, false), audioUrl = prop($$props, "audioUrl", 7), useFeatureButtonAudio = prop($$props, "useFeatureButtonAudio", 7, false), autoplayEnabled = prop($$props, "autoplayEnabled", 7, false),
|
|
5299
|
+
let hasAudio = prop($$props, "hasAudio", 7, false), audioUrl = prop($$props, "audioUrl", 7), useFeatureButtonAudio = prop($$props, "useFeatureButtonAudio", 7, false), autoplayEnabled = prop($$props, "autoplayEnabled", 7, false), featureAudioSkin = prop($$props, "featureAudioSkin", 7), uiText = prop($$props, "uiText", 7), locale = prop($$props, "locale", 7, ""), onaudiostarted = prop($$props, "onaudiostarted", 7), onaudioended = prop($$props, "onaudioended", 7);
|
|
5385
5300
|
let audioEl = /* @__PURE__ */ state(null);
|
|
5386
5301
|
let featureAudioButtonEl = /* @__PURE__ */ state(null);
|
|
5387
5302
|
let autoplayEnableButtonEl = /* @__PURE__ */ state(null);
|
|
@@ -5472,27 +5387,6 @@ function AudioPlayer($$anchor, $$props) {
|
|
|
5472
5387
|
autoplayEnabled($$value);
|
|
5473
5388
|
flushSync();
|
|
5474
5389
|
},
|
|
5475
|
-
get audioTranscript() {
|
|
5476
|
-
return audioTranscript();
|
|
5477
|
-
},
|
|
5478
|
-
set audioTranscript($$value) {
|
|
5479
|
-
audioTranscript($$value);
|
|
5480
|
-
flushSync();
|
|
5481
|
-
},
|
|
5482
|
-
get showVisibleTranscript() {
|
|
5483
|
-
return showVisibleTranscript();
|
|
5484
|
-
},
|
|
5485
|
-
set showVisibleTranscript($$value) {
|
|
5486
|
-
showVisibleTranscript($$value);
|
|
5487
|
-
flushSync();
|
|
5488
|
-
},
|
|
5489
|
-
get transcriptId() {
|
|
5490
|
-
return transcriptId();
|
|
5491
|
-
},
|
|
5492
|
-
set transcriptId($$value) {
|
|
5493
|
-
transcriptId($$value);
|
|
5494
|
-
flushSync();
|
|
5495
|
-
},
|
|
5496
5390
|
get featureAudioSkin() {
|
|
5497
5391
|
return featureAudioSkin();
|
|
5498
5392
|
},
|
|
@@ -5575,10 +5469,7 @@ function AudioPlayer($$anchor, $$props) {
|
|
|
5575
5469
|
if_block(node_2, ($$render) => {
|
|
5576
5470
|
if (get(autoPlayPromptOpen)) $$render(consequent_1);
|
|
5577
5471
|
});
|
|
5578
|
-
template_effect(() =>
|
|
5579
|
-
set_attribute(audio_1, "src", audioUrl());
|
|
5580
|
-
set_attribute(audio_1, "aria-describedby", audioTranscript() ? transcriptId() : void 0);
|
|
5581
|
-
});
|
|
5472
|
+
template_effect(() => set_attribute(audio_1, "src", audioUrl()));
|
|
5582
5473
|
append($$anchor, fragment_2);
|
|
5583
5474
|
};
|
|
5584
5475
|
var consequent_3 = ($$anchor) => {
|
|
@@ -5607,9 +5498,6 @@ create_custom_element(AudioPlayer, {
|
|
|
5607
5498
|
audioUrl: {},
|
|
5608
5499
|
useFeatureButtonAudio: {},
|
|
5609
5500
|
autoplayEnabled: {},
|
|
5610
|
-
audioTranscript: {},
|
|
5611
|
-
showVisibleTranscript: {},
|
|
5612
|
-
transcriptId: {},
|
|
5613
5501
|
featureAudioSkin: {},
|
|
5614
5502
|
uiText: {},
|
|
5615
5503
|
locale: {},
|
|
@@ -5624,7 +5512,7 @@ var root_2$2 = /* @__PURE__ */ from_html(`<span class="cloze-marker-empty svelte
|
|
|
5624
5512
|
var root_3$2 = /* @__PURE__ */ from_html(`<span role="status" aria-live="polite" aria-atomic="true"><!></span>`);
|
|
5625
5513
|
var $$css$2 = {
|
|
5626
5514
|
hash: "svelte-d9l5tb",
|
|
5627
|
-
code: ".cloze-marker.svelte-d9l5tb {display:inline-flex;align-items:center;justify-content:center;text-align:center;vertical-align:baseline;}.cloze-marker.svelte-d9l5tb:focus-within {outline:2px solid var(--
|
|
5515
|
+
code: ".cloze-marker.svelte-d9l5tb {display:inline-flex;align-items:center;justify-content:center;text-align:center;vertical-align:baseline;}.cloze-marker.svelte-d9l5tb:focus-within {outline:2px solid var(--mpb-focus-ring, #1565c0);outline-offset:2px;}.cloze-marker-standalone.svelte-d9l5tb {width:var(--mpb-blank-standalone-width, 7rem);}.cloze-marker-empty.svelte-d9l5tb {display:inline-block;min-width:4ch;}.cloze-marker-value.svelte-d9l5tb {width:100%;display:inline-flex;align-items:center;justify-content:center;text-align:center;}.cloze-marker-value.svelte-d9l5tb p {margin:0;}"
|
|
5628
5516
|
};
|
|
5629
5517
|
function ClozeMarker($$anchor, $$props) {
|
|
5630
5518
|
push($$props, true);
|
|
@@ -5733,7 +5621,7 @@ var root_4$1 = /* @__PURE__ */ from_html(`<span aria-hidden="true"> </span>`);
|
|
|
5733
5621
|
var root_5$1 = /* @__PURE__ */ from_html(`<div style="gap:var(--mpb-choice-row-gap, 0.5rem);"><!> <!></div>`);
|
|
5734
5622
|
var $$css$1 = {
|
|
5735
5623
|
hash: "svelte-8xu1pt",
|
|
5736
|
-
code: ".choice-row-horizontal.svelte-8xu1pt {flex-direction:column;align-items:center;width:min(var(--mpb-choice-width-px, 170px), var(--mpb-choice-width-vw, 30vw));min-height:var(--mpb-choice-tile-min-height, 11rem);gap:0;}.choice-tile.svelte-8xu1pt {display:flex;flex-direction:column;justify-content:space-between;align-items:center;width:100%;min-height:var(--mpb-choice-tile-min-height, 11rem);padding:0.8rem 0.65rem 0.5rem;border-radius:8px;background:transparent;transition:background-color 120ms ease-in-out;}.choice-tile-content.svelte-8xu1pt {width:100%;display:flex;align-items:center;justify-content:center;min-height:var(--mpb-choice-content-min-height, 7.5rem);}.choice-row-horizontal.svelte-8xu1pt:hover .choice-tile:where(.svelte-8xu1pt) {background:var(--mpb-choice-hover-bg, var(--pie-
|
|
5624
|
+
code: ".choice-row-horizontal.svelte-8xu1pt {flex-direction:column;align-items:center;width:min(var(--mpb-choice-width-px, 170px), var(--mpb-choice-width-vw, 30vw));min-height:var(--mpb-choice-tile-min-height, 11rem);gap:0;}.choice-tile.svelte-8xu1pt {display:flex;flex-direction:column;justify-content:space-between;align-items:center;width:100%;min-height:var(--mpb-choice-tile-min-height, 11rem);padding:0.8rem 0.65rem 0.5rem;border-radius:8px;background:transparent;transition:background-color 120ms ease-in-out;}.choice-tile-content.svelte-8xu1pt {width:100%;display:flex;align-items:center;justify-content:center;min-height:var(--mpb-choice-content-min-height, 7.5rem);}.choice-row-horizontal.svelte-8xu1pt:hover .choice-tile:where(.svelte-8xu1pt) {background:var(--mpb-choice-hover-bg, var(--pie-background-dark, #ecedf1));}.pie-choice-horizontal.svelte-8xu1pt:not(.is-selected):not(:hover) .pie-choice-tile:where(.svelte-8xu1pt) {background:transparent;}.choice-row-horizontal.is-selected.svelte-8xu1pt .choice-tile:where(.svelte-8xu1pt) {background:var(--mpb-choice-selected-bg, var(--pie-secondary-background, rgba(241, 241, 241, 1)));}.choice-row-horizontal.is-selected.svelte-8xu1pt:hover .choice-tile:where(.svelte-8xu1pt) {background:var(--mpb-choice-selected-bg, var(--pie-secondary-background, rgba(241, 241, 241, 1)));}.pie-choice.svelte-8xu1pt:not(.pie-choice-horizontal):hover .pie-choice-label-wrap:where(.svelte-8xu1pt) {background:var(--pie-background-dark, #ecedf1);}.pie-choice.svelte-8xu1pt:not(.pie-choice-horizontal):not(.is-selected):not(:hover) .pie-choice-label-wrap:where(.svelte-8xu1pt) {background:transparent;}.pie-choice:not(.pie-choice-horizontal).is-selected.svelte-8xu1pt .pie-choice-label-wrap:where(.svelte-8xu1pt) {background:var(--pie-secondary-background, rgba(241, 241, 241, 1));border-radius:6px;}.pie-choice:not(.pie-choice-horizontal).is-selected.svelte-8xu1pt:hover .pie-choice-label-wrap:where(.svelte-8xu1pt) {background:var(--pie-secondary-background, rgba(241, 241, 241, 1));}.pie-choice.choice-correct.svelte-8xu1pt {border-left:3px solid var(--pie-correct-tertiary, #0ea449);}.pie-choice.choice-incorrect.svelte-8xu1pt {border-left:3px solid var(--pie-incorrect-icon, #bf0d00);}.pie-choice-horizontal.choice-correct.svelte-8xu1pt .choice-tile:where(.svelte-8xu1pt) {background:var(--pie-correct-secondary, #e8f5e9);}.pie-choice-horizontal.choice-incorrect.svelte-8xu1pt .choice-tile:where(.svelte-8xu1pt) {background:var(--pie-incorrect-secondary, #ffebee);}.pie-choice-feedback-badge.svelte-8xu1pt {margin-left:auto;display:inline-flex;align-items:center;justify-content:center;width:1.1rem;height:1.1rem;border-radius:9999px;font-size:0.72rem;line-height:1;font-weight:700;color:var(--pie-white, #ffffff);}.pie-choice-feedback-correct.svelte-8xu1pt {background:var(--pie-correct-icon, #087d38);}.pie-choice-feedback-incorrect.svelte-8xu1pt {background:var(--pie-incorrect-icon, #bf0d00);}.choice-row-horizontal.svelte-8xu1pt p {margin:0;text-align:center;}.choice-html.svelte-8xu1pt p {margin:0;}.choice-html.svelte-8xu1pt {width:100%;display:inline-flex;align-items:center;justify-content:center;text-align:center;}.choice-radio-bottom.svelte-8xu1pt {margin-top:var(--mpb-horizontal-choice-radio-top-margin, 0.5rem);padding:var(--mpb-choice-radio-padding, 0px);}.choice-radio-inline.svelte-8xu1pt {margin-top:var(--mpb-horizontal-choice-radio-top-margin, 0.5rem);}"
|
|
5737
5625
|
};
|
|
5738
5626
|
function ChoiceRow($$anchor, $$props) {
|
|
5739
5627
|
push($$props, true);
|
|
@@ -5946,7 +5834,7 @@ function computeChoiceCorrectness(params) {
|
|
|
5946
5834
|
//#endregion
|
|
5947
5835
|
//#region src/delivery/computeLayoutProfile.ts
|
|
5948
5836
|
var BLANK_TOKEN = "{{blank}}";
|
|
5949
|
-
var FEATURE_BUTTON_PROFILES = new Set([
|
|
5837
|
+
var FEATURE_BUTTON_PROFILES = /* @__PURE__ */ new Set([
|
|
5950
5838
|
"audio_blank_only",
|
|
5951
5839
|
"stimulus_image_blank",
|
|
5952
5840
|
"token_sequence"
|
|
@@ -6172,7 +6060,7 @@ var DEFAULT_LAYOUT_PROFILE_PRESETS = {
|
|
|
6172
6060
|
}
|
|
6173
6061
|
};
|
|
6174
6062
|
function computeLayoutStyle(params) {
|
|
6175
|
-
const { layoutProfile, isBlankOnlyTemplate
|
|
6063
|
+
const { layoutProfile, isBlankOnlyTemplate } = params;
|
|
6176
6064
|
const configured = params.configuredLimits && typeof params.configuredLimits === "object" ? params.configuredLimits : {};
|
|
6177
6065
|
const customPresets = params.customProfilePresets && typeof params.customProfilePresets === "object" ? params.customProfilePresets : {};
|
|
6178
6066
|
const customForProfile = customPresets[layoutProfile] && typeof customPresets[layoutProfile] === "object" ? customPresets[layoutProfile] : {};
|
|
@@ -6194,7 +6082,7 @@ function computeLayoutStyle(params) {
|
|
|
6194
6082
|
const blankWidth = wideBlankProfiles.includes(layoutProfile) ? `${l.blankWideWidthRem}rem` : isBlankOnlyTemplate ? `${l.blankStandaloneWidthRem}rem` : "auto";
|
|
6195
6083
|
const blankBorderWidth = wideUnderlineProfiles.includes(layoutProfile) ? `${l.blankUnderlineWideWidthPx}px` : `${l.blankUnderlineWidthPx}px`;
|
|
6196
6084
|
return {
|
|
6197
|
-
rootStyle:
|
|
6085
|
+
rootStyle: Object.keys(CSS_VAR_SPEC).map((key) => `${CSS_VAR_SPEC[key].varName}:${l[key]}${CSS_VAR_SPEC[key].unit}`).join(";"),
|
|
6198
6086
|
blankWidth,
|
|
6199
6087
|
blankBorderWidth,
|
|
6200
6088
|
legendMaxChars: l.legendMaxChars
|
|
@@ -6259,7 +6147,7 @@ function computeLegendText(params) {
|
|
|
6259
6147
|
}
|
|
6260
6148
|
//#endregion
|
|
6261
6149
|
//#region src/delivery/cqt-css/sel-r1-base.css?raw
|
|
6262
|
-
var sel_r1_base_default = "/* Shared base styles for all sel_r1-*_plusggg variants.\n Applied via the data-mpb-variant=\"sel-r1-base\" style element.\n Uses [class*=\"variant-sel-r1-\"] so it covers every r1 variant class.\n Source: web-ItemBankViewer/learnosity/templates/Renaissance/r1.scss */\n\n/* r1.scss: Starial font throughout */\n[class*=\"variant-sel-r1-\"] {\n font-family: Starial, Arial, sans-serif;\n}\n\n/* r1.scss: .rli-r1-audio-transcript { font-family:Roboto; font-size:16px } */\n[class*=\"variant-sel-r1-\"] .pie-audio-transcript {\n font-family: Roboto, Arial, sans-serif;\n font-size: 16px;\n font-style: normal;\n font-weight: 400;\n}\n\n/* r1.scss: .rli-r1-content-element { font-size: 1.9em } wraps all stem tokens.\n Makes inline font-size spans in the template multiply on top of this base. */\n[class*=\"variant-sel-r1-\"] .pie-template-line {\n font-size: 1.9em;\n}\n\n/* r1.scss: .rli-r1-stem { display:flex; flex-direction:row; justify-content:center }\n r1.scss: .rli-r1-content-element { margin-right:2px; margin-left:2px } — 4px total gap.\n column-gap:4px
|
|
6150
|
+
var sel_r1_base_default = "/* Shared base styles for all sel_r1-*_plusggg variants.\n Applied via the data-mpb-variant=\"sel-r1-base\" style element.\n Uses [class*=\"variant-sel-r1-\"] so it covers every r1 variant class.\n Source: web-ItemBankViewer/learnosity/templates/Renaissance/r1.scss */\n\n/* r1.scss: Starial font throughout.\n font-size 14px mirrors the Learnosity host root (.lrn_widget) which sets the\n base for all em-scaled rules in r1.scss (e.g. .rli-r1-content-element { 1.9em })\n and any em-based author content (e.g. <span style=\"font-size:1.8em\">). Without\n this base PIE inherits the 16px browser default and renders ~14% larger than\n the LSY reference. See CONTOOL-2567. */\n[class*=\"variant-sel-r1-\"] {\n font-family: Starial, Arial, sans-serif;\n font-size: 14px;\n}\n\n/* r1.scss: .rli-r1-audio-transcript { font-family:Roboto; font-size:16px } */\n[class*=\"variant-sel-r1-\"] .pie-audio-transcript {\n font-family: Roboto, Arial, sans-serif;\n font-size: 16px;\n font-style: normal;\n font-weight: 400;\n}\n\n/* r1.scss: .rli-r1-content-element { font-size: 1.9em } wraps all stem tokens.\n Makes inline font-size spans in the template multiply on top of this base. */\n[class*=\"variant-sel-r1-\"] .pie-template-line {\n font-size: 1.9em;\n}\n\n/* r1.scss: .rli-r1-stem { display:flex; flex-direction:row; justify-content:center }\n r1.scss: .rli-r1-content-element { margin-right:2px; margin-left:2px } — 4px total gap.\n Apply the per-element margin to both classless tokens and the blank slot\n (which is the cloze equivalent) so the gap stacks with whitespace text-nodes\n between flex items the same way LSY does. Earlier this used column-gap:4px,\n but flex column-gap accumulates with the cloze-side mx-1 and the implicit\n whitespace, producing a wider gap than LSY shows. See CONTOOL-2569. */\n[class*=\"variant-sel-r1-\"] .pie-template-line {\n display: flex;\n flex-direction: row;\n align-items: baseline;\n justify-content: center;\n}\n\n[class*=\"variant-sel-r1-\"] .pie-template-line p {\n margin: 0;\n display: flex;\n flex-direction: row;\n align-items: baseline;\n}\n\n/* r1.scss: .rli-r1-content-element { min-width:150px; max-width:150px; min-height:150px;\n line-height:89px; margin-right:2px; margin-left:2px } — wraps every stem token\n (blank slot and adjacent inline spans) in LSY, giving each a 150px box with a\n 2px per-side margin. Apply to inline tokens in all r1 variants so trailing\n tokens in audio_blank_only (gplusggg) match the blank's height the way LSY does. */\n[class*=\"variant-sel-r1-\"] .pie-template-line span:not([class]) {\n min-width: 150px;\n max-width: 150px;\n min-height: 150px;\n line-height: 89px;\n margin-left: 2px;\n margin-right: 2px;\n}\n\n/* In token_sequence layouts the blank itself is also a content-element box (no\n surrounding .rli-r1-cloze container at 160px). audio_blank_only / stimulus_image_blank\n keep their own 160px min-height set on the blank slot in McPopulatedBlank.svelte to\n mirror LSY's .rli-r1-cloze height. The 2px per-side margin matches LSY's\n .rli-r1-content-element pattern (overriding the default Tailwind mx-1). */\n[class*=\"variant-sel-r1-\"].layout-token_sequence .pie-template-line .pie-blank-slot {\n min-width: 150px;\n max-width: 150px;\n min-height: 150px;\n line-height: 89px;\n margin-left: 2px;\n margin-right: 2px;\n}\n\n/* audio_blank_only / stimulus_image_blank keep the 160px wide blank slot, but\n still need the 2px per-side margin so the gap to the trailing token mirrors\n LSY's .rli-r1-content-element rhythm. Without this, Tailwind's mx-1 (4px)\n would dominate and the cloze→token gap diverges from LSY. See CONTOOL-2569. */\n[class*=\"variant-sel-r1-\"].layout-audio_blank_only .pie-template-line .pie-blank-slot,\n[class*=\"variant-sel-r1-\"].layout-stimulus_image_blank .pie-template-line .pie-blank-slot {\n margin-left: 2px;\n margin-right: 2px;\n}\n\n/* r1.scss: .rli-r1-content-element { font-size:1.9em; line-height:89px } on distractors */\n[class*=\"variant-sel-r1-\"] .pie-choice-label {\n font-size: 1.9em;\n line-height: 89px;\n}\n\n/* r1.scss: .rli-r1-content-element { min-width:150px; max-width:150px;\n min-height:150px } wraps every image (stem token + distractor) and forces\n the content box to 150×150. LSY's host also rewrites <img width/height>\n to 150 server-side. PIE keeps the authored attributes (typically 108×108),\n so without an explicit override images render ~28% smaller than LSY.\n See CONTOOL-2570. */\n[class*=\"variant-sel-r1-\"] .pie-template-line img,\n[class*=\"variant-sel-r1-\"] .pie-choice-label img {\n width: 150px;\n height: 150px;\n}\n";
|
|
6263
6151
|
//#endregion
|
|
6264
6152
|
//#region src/delivery/variant-css-map.ts
|
|
6265
6153
|
var VARIANT_BY_CUSTOM_TYPE = {
|
|
@@ -6273,13 +6161,13 @@ var VARIANT_BY_CUSTOM_TYPE = {
|
|
|
6273
6161
|
variantId: "sr-vic",
|
|
6274
6162
|
variantClass: "variant-sr-vic",
|
|
6275
6163
|
sourceUrl: "https://global-pr-ibvcustomfiles.renaissance-go.com/learnosity/sr-vic/0.0.1/question.css",
|
|
6276
|
-
cssText: "/* Source baseline: https://global-pr-ibvcustomfiles.renaissance-go.com/learnosity/sr-vic/0.0.1/question.css */\n/* Reference layout: web-ItemBankViewer/learnosity/templates/Renaissance/vic.scss */\n.mc-populated-blank-root.variant-sr-vic {\n font-family: Starial, Arial, sans-serif;\n --mpb-inline-grid-column-gap: 1rem;\n --mpb-inline-grid-row-gap: 0.5rem;\n --mpb-inline-template-margin-top: 0.2rem;\n --mpb-inline-choices-margin-top: 0.2rem;\n}\n\n.mc-populated-blank-root.variant-sr-vic .pie-template-line,\n.mc-populated-blank-root.variant-sr-vic .pie-blank-value,\n.mc-populated-blank-root.variant-sr-vic .pie-choice-label {\n line-height: 123%;\n}\n\n/* vic.scss: .rli-vic-answer uses display:flex so sentence and cloze stay on\n one line. The template HTML wraps text in <p>, which is block by default and\n breaks to a new line. Making <p> inline keeps the sentence and blank inline. */\n.mc-populated-blank-root.variant-sr-vic .pie-template-line p {\n display: inline;\n margin: 0;\n}\n\n/* vic.scss: .rli-vic-cloze > .rli-vic-content-element { color: #cc3333 } */\n.mc-populated-blank-root.variant-sr-vic .pie-blank-value {\n color: #cc3333;\n}\n\n/* vic.scss: .rli-vic-selected { background-color: #fcfcd3 } applied to the\n whole distractor row (radio + label), not just the label wrapper. */\n.mc-populated-blank-root.variant-sr-vic .pie-choice.is-selected {\n background-color: #fcfcd3;\n border-radius: 6px;\n}\n\n.mc-populated-blank-root.variant-sr-vic .pie-choice.is-selected .pie-choice-label-wrap {\n background-color: transparent;\n}\n\n/* vic.scss: distractor label text sits to the right of the radio — no centering. */\n.mc-populated-blank-root.variant-sr-vic .pie-choice-label {\n text-align: left;\n justify-content: flex-start;\n}\n\n/* vic.scss: .rli-vic-distractor:hover { background-color: #F2F2F2 } applied to\n the full row element, not only the inner label wrapper. */\n.mc-populated-blank-root.variant-sr-vic .pie-choice:not(.pie-choice-horizontal):hover {\n background-color: #f2f2f2;\n border-radius: 6px;\n}\n\n.mc-populated-blank-root.variant-sr-vic\n .pie-choice:not(.pie-choice-horizontal):hover\n .pie-choice-label-wrap {\n background-color: transparent;\n}\n\n/* Selected state must win over hover — yellow persists when hovering a chosen row. */\n.mc-populated-blank-root.variant-sr-vic .pie-choice:not(.pie-choice-horizontal).is-selected:hover {\n background-color: #fcfcd3;\n}\n"
|
|
6164
|
+
cssText: "/* Source baseline: https://global-pr-ibvcustomfiles.renaissance-go.com/learnosity/sr-vic/0.0.1/question.css */\n/* Reference layout: web-ItemBankViewer/learnosity/templates/Renaissance/vic.scss */\n.mc-populated-blank-root.variant-sr-vic {\n font-family: Starial, Arial, sans-serif;\n --mpb-inline-grid-column-gap: 1rem;\n --mpb-inline-grid-row-gap: 0.5rem;\n --mpb-inline-template-margin-top: 0.2rem;\n --mpb-inline-choices-margin-top: 0.2rem;\n}\n\n.mc-populated-blank-root.variant-sr-vic .pie-template-line,\n.mc-populated-blank-root.variant-sr-vic .pie-blank-value,\n.mc-populated-blank-root.variant-sr-vic .pie-choice-label {\n line-height: 123%;\n}\n\n/* vic.scss: .rli-vic-answer uses display:flex so sentence and cloze stay on\n one line. The template HTML wraps text in <p>, which is block by default and\n breaks to a new line. Making <p> inline keeps the sentence and blank inline. */\n.mc-populated-blank-root.variant-sr-vic .pie-template-line p {\n display: inline;\n margin: 0;\n}\n\n/* LSY .rli-vic-answer has no text-align rule and inherits start; PIE's\n inline_sentence layout sets text-align:center on .template-line via a\n Svelte-scoped selector with specificity (0,4,0), so we need to match or\n exceed that. Pin sr-vic back to start so wrapped lines stay left-aligned.\n Same root cause as sel-vic. See CONTOOL-2573. */\n.mc-populated-blank-root.variant-sr-vic.layout-inline_sentence .pie-template-line.template-line {\n text-align: start;\n}\n\n/* vic.scss: .rli-vic-cloze > .rli-vic-content-element { color: #cc3333 } */\n.mc-populated-blank-root.variant-sr-vic .pie-blank-value {\n color: #cc3333;\n}\n\n/* vic.scss: .rli-vic-selected { background-color: #fcfcd3 } applied to the\n whole distractor row (radio + label), not just the label wrapper. */\n.mc-populated-blank-root.variant-sr-vic .pie-choice.is-selected {\n background-color: #fcfcd3;\n border-radius: 6px;\n}\n\n.mc-populated-blank-root.variant-sr-vic .pie-choice.is-selected .pie-choice-label-wrap {\n background-color: transparent;\n}\n\n/* vic.scss: distractor label text sits to the right of the radio — no centering. */\n.mc-populated-blank-root.variant-sr-vic .pie-choice-label {\n text-align: left;\n justify-content: flex-start;\n}\n\n/* vic.scss: .rli-vic-distractor:hover { background-color: #F2F2F2 } applied to\n the full row element, not only the inner label wrapper. */\n.mc-populated-blank-root.variant-sr-vic .pie-choice:not(.pie-choice-horizontal):hover {\n background-color: #f2f2f2;\n border-radius: 6px;\n}\n\n.mc-populated-blank-root.variant-sr-vic\n .pie-choice:not(.pie-choice-horizontal):hover\n .pie-choice-label-wrap {\n background-color: transparent;\n}\n\n/* Selected state must win over hover — yellow persists when hovering a chosen row. */\n.mc-populated-blank-root.variant-sr-vic .pie-choice:not(.pie-choice-horizontal).is-selected:hover {\n background-color: #fcfcd3;\n}\n"
|
|
6277
6165
|
},
|
|
6278
6166
|
sel_vic: {
|
|
6279
6167
|
variantId: "sel-vic",
|
|
6280
6168
|
variantClass: "variant-sel-vic",
|
|
6281
6169
|
sourceUrl: "https://global-pr-ibvcustomfiles.renaissance-go.com/learnosity/sel_vic/0.0.1/question.css",
|
|
6282
|
-
cssText: "/* Source baseline: https://global-pr-ibvcustomfiles.renaissance-go.com/learnosity/sel_vic/0.0.1/question.css */\n/* Reference layout: web-ItemBankViewer/learnosity/templates/Renaissance/sel_vic/scss/main.scss + vic.scss */\n.mc-populated-blank-root.variant-sel-vic {\n font-family: Starial, Arial, sans-serif;\n font-size:
|
|
6170
|
+
cssText: "/* Source baseline: https://global-pr-ibvcustomfiles.renaissance-go.com/learnosity/sel_vic/0.0.1/question.css */\n/* Reference layout: web-ItemBankViewer/learnosity/templates/Renaissance/sel_vic/scss/main.scss + vic.scss */\n.mc-populated-blank-root.variant-sel-vic {\n font-family: Starial, Arial, sans-serif;\n /* LSY chain: .lrn_widget (14px host) → .sel-vic { 1.5em } = 21px.\n PIE collapses both LSY layers into this single variant-root selector, so\n the resolved value is set directly. See CONTOOL-2567. */\n font-size: 21px;\n max-width: 800px;\n margin-inline: auto;\n --mpb-inline-grid-column-gap: 1rem;\n --mpb-inline-grid-row-gap: 0.5rem;\n --mpb-inline-template-margin-top: 0.2rem;\n --mpb-inline-choices-margin-top: 0.2rem;\n}\n\n.mc-populated-blank-root.variant-sel-vic .pie-audio-transcript {\n font-family: Roboto, Arial, sans-serif;\n font-size: 16px;\n font-style: normal;\n font-weight: 400;\n}\n\n.mc-populated-blank-root.variant-sel-vic .pie-template-line,\n.mc-populated-blank-root.variant-sel-vic .pie-blank-value,\n.mc-populated-blank-root.variant-sel-vic .pie-choice-label {\n line-height: 123%;\n}\n\n/* sel_vic/main.scss: template left ~75%, audio right ~25% on the same row.\n Svelte scoping prevents the component-internal grid-area rule from reaching\n .audio-container inside AudioPlayer, so we override it here via the global\n .pie-audio-container class which is not subject to scope hashing. */\n.mc-populated-blank-root.variant-sel-vic .pie-audio-container {\n grid-area: audio;\n margin: 0;\n justify-self: end;\n align-self: start;\n min-height: 128px;\n}\n\n/* vic.scss: sentence and cloze sit inline — the <p> wrapper must not break to\n a new line before the blank slot. */\n.mc-populated-blank-root.variant-sel-vic .pie-template-line p {\n display: inline;\n margin: 0;\n}\n\n/* LSY .rli-vic-answer has no text-align rule and inherits start; PIE's\n inline_sentence layout sets text-align:center on .template-line via a\n Svelte-scoped selector with specificity (0,4,0), so we need to match or\n exceed that. Pin sel-vic back to start so wrapped lines stay left-aligned.\n See CONTOOL-2573. */\n.mc-populated-blank-root.variant-sel-vic.layout-inline_sentence .pie-template-line.template-line {\n text-align: start;\n}\n\n/* vic.scss: .rli-vic-cloze { margin-left: 6px; margin-right: 6px } gives the\n cloze breathing room from adjacent text or punctuation. The PIE markup uses\n Tailwind-style mx-1 in the class list, but mc-populated-blank does not\n compile Tailwind, so that class is a no-op. Set the inline margin\n explicitly so the cloze→trailing-punctuation gap matches LSY. See\n CONTOOL-2572. */\n.mc-populated-blank-root.variant-sel-vic .pie-template-line .pie-blank-slot {\n margin-left: 6px;\n margin-right: 6px;\n}\n\n/* vic.scss: .rli-vic-cloze > .rli-vic-content-element { color: #cc3333 } */\n.mc-populated-blank-root.variant-sel-vic .pie-blank-value {\n color: #cc3333;\n}\n\n/* sel_vic/main.scss: .sel-vic { max-width: 800px } — the fieldset/choices must\n also be constrained so rows don't span beyond 800px. */\n.mc-populated-blank-root.variant-sel-vic .pie-choices-fieldset {\n max-width: 800px;\n width: 100%;\n}\n\n/* vic.scss: distractor label text sits to the right of the radio — no centering. */\n.mc-populated-blank-root.variant-sel-vic .pie-choice-label {\n text-align: left;\n justify-content: flex-start;\n}\n\n/* vic.scss: .rli-vic-selected { background-color: #fcfcd3 } on the full row. */\n.mc-populated-blank-root.variant-sel-vic .pie-choice.is-selected {\n background-color: #fcfcd3;\n border-radius: 6px;\n}\n\n.mc-populated-blank-root.variant-sel-vic .pie-choice.is-selected .pie-choice-label-wrap {\n background-color: transparent;\n}\n\n/* Selected state must win over hover. */\n.mc-populated-blank-root.variant-sel-vic .pie-choice:not(.pie-choice-horizontal).is-selected:hover {\n background-color: #fcfcd3;\n}\n\n/* vic.scss: .rli-vic-distractor:hover { background-color: #F2F2F2 } on the full row. */\n.mc-populated-blank-root.variant-sel-vic .pie-choice:not(.pie-choice-horizontal):hover {\n background-color: #f2f2f2;\n border-radius: 6px;\n}\n\n.mc-populated-blank-root.variant-sel-vic\n .pie-choice:not(.pie-choice-horizontal):hover\n .pie-choice-label-wrap {\n background-color: transparent;\n}\n\n@media (min-width: 620px) {\n .mc-populated-blank-root.variant-sel-vic .pie-audio-transcript {\n min-width: 620px;\n max-width: 800px;\n transform: translateX(-55px);\n }\n}\n"
|
|
6283
6171
|
},
|
|
6284
6172
|
"sel_r1-_gplusggg": {
|
|
6285
6173
|
variantId: "sel-r1-gplusggg",
|
|
@@ -6303,13 +6191,13 @@ var VARIANT_BY_CUSTOM_TYPE = {
|
|
|
6303
6191
|
variantId: "sel-r1-ggplus",
|
|
6304
6192
|
variantClass: "variant-sel-r1-ggplus",
|
|
6305
6193
|
sourceUrl: "https://global-pr-ibvcustomfiles.renaissance-go.com/learnosity/sel_r1-_ggplusggg/0.0.1/question.css",
|
|
6306
|
-
cssText: "/* Source baseline: https://global-pr-ibvcustomfiles.renaissance-go.com/learnosity/sel_r1-_ggplusggg/0.0.1/question.css */\n/* Shared r1 base styles (font, template-line flex, choice-label) are in sel-r1-base.css */\n.mc-populated-blank-root.variant-sel-r1-ggplus {\n max-width: 875px;\n margin-inline: auto;\n --mpb-listen-button-size: 128px;\n --mpb-choice-width-px: 155px;\n --mpb-choice-tile-min-height: 11.25rem;\n --mpb-choice-content-min-height: 9.375rem;\n --mpb-choice-hover-bg: #f2f2f2;\n --mpb-choice-selected-bg: #fcfcd3;\n}\n
|
|
6194
|
+
cssText: "/* Source baseline: https://global-pr-ibvcustomfiles.renaissance-go.com/learnosity/sel_r1-_ggplusggg/0.0.1/question.css */\n/* Shared r1 base styles (font, template-line flex, choice-label) are in sel-r1-base.css */\n.mc-populated-blank-root.variant-sel-r1-ggplus {\n max-width: 875px;\n margin-inline: auto;\n --mpb-listen-button-size: 128px;\n --mpb-choice-width-px: 155px;\n --mpb-choice-tile-min-height: 11.25rem;\n --mpb-choice-content-min-height: 9.375rem;\n --mpb-choice-hover-bg: #f2f2f2;\n --mpb-choice-selected-bg: #fcfcd3;\n}\n"
|
|
6307
6195
|
},
|
|
6308
6196
|
"sel_r1-s3_plusggg": {
|
|
6309
6197
|
variantId: "sel-r1-s3",
|
|
6310
6198
|
variantClass: "variant-sel-r1-s3",
|
|
6311
6199
|
sourceUrl: "https://global-pr-ibvcustomfiles.renaissance-go.com/learnosity/sel_r1-s3_plusggg/0.0.1/question.css",
|
|
6312
|
-
cssText: "/* Source baseline: https://global-pr-ibvcustomfiles.renaissance-go.com/learnosity/sel_r1-s3_plusggg/0.0.1/question.css */\n/* Shared r1 base styles (font, template-line flex, choice-label) are in sel-r1-base.css */\n.mc-populated-blank-root.variant-sel-r1-s3 {\n max-width: 860px;\n margin-inline: auto;\n --mpb-listen-button-size: 128px;\n --mpb-choice-width-px: 155px;\n --mpb-choice-tile-min-height: 11.25rem;\n --mpb-choice-content-min-height: 9.375rem;\n --mpb-choice-group-gap: 0.35rem;\n --mpb-choice-row-gap: 0.35rem;\n --mpb-horizontal-choice-radio-top-margin: 0.25rem;\n --mpb-stimulus-min-column: 240px;\n --mpb-stimulus-grid-column-gap: 1.1rem;\n --mpb-stimulus-choices-margin-top: 0.85rem;\n --mpb-audio-blank-template-margin-bottom: 0.9rem;\n --mpb-blank-wide-width: 6.8rem;\n}\n\n/*
|
|
6200
|
+
cssText: "/* Source baseline: https://global-pr-ibvcustomfiles.renaissance-go.com/learnosity/sel_r1-s3_plusggg/0.0.1/question.css */\n/* Shared r1 base styles (font, template-line flex, choice-label) are in sel-r1-base.css */\n.mc-populated-blank-root.variant-sel-r1-s3 {\n max-width: 860px;\n margin-inline: auto;\n --mpb-listen-button-size: 128px;\n --mpb-choice-width-px: 155px;\n --mpb-choice-tile-min-height: 11.25rem;\n --mpb-choice-content-min-height: 9.375rem;\n --mpb-choice-group-gap: 0.35rem;\n --mpb-choice-row-gap: 0.35rem;\n --mpb-horizontal-choice-radio-top-margin: 0.25rem;\n --mpb-stimulus-min-column: 240px;\n --mpb-stimulus-grid-column-gap: 1.1rem;\n --mpb-stimulus-choices-margin-top: 0.85rem;\n --mpb-audio-blank-template-margin-bottom: 0.9rem;\n --mpb-blank-wide-width: 6.8rem;\n}\n\n/* sel_r1-s3_plusggg/question.css does not set font-weight on distractors or\n cloze content-element, so they inherit 400 from the host root. The earlier\n font-weight:500 override caused PIE to render visibly heavier than LSY for\n the same author content. See CONTOOL-2571. */\n.mc-populated-blank-root.variant-sel-r1-s3 .pie-choice-label,\n.mc-populated-blank-root.variant-sel-r1-s3 .pie-choice-label :is(span, p, div) {\n font-size: 1.9em;\n line-height: 89px;\n}\n\n.mc-populated-blank-root.variant-sel-r1-s3 .pie-blank-value,\n.mc-populated-blank-root.variant-sel-r1-s3 .pie-blank-value :is(span, p, div) {\n line-height: 1.1;\n white-space: nowrap;\n}\n\n.mc-populated-blank-root.variant-sel-r1-s3 .pie-choice-horizontal .pie-choice-tile {\n border-radius: 6px;\n background: #f1f1f1;\n}\n\n.mc-populated-blank-root.variant-sel-r1-s3.layout-stimulus_image_blank {\n grid-template-columns: minmax(220px, auto) auto auto;\n grid-template-areas:\n \"transcript transcript transcript\"\n \"sentence template audio\"\n \"choices choices choices\";\n justify-content: center;\n}\n\n.mc-populated-blank-root.variant-sel-r1-s3.layout-stimulus_image_blank .pie-template-line {\n grid-area: template;\n justify-self: center;\n}\n\n.mc-populated-blank-root.variant-sel-r1-s3.layout-stimulus_image_blank .pie-sentence-line {\n justify-self: end;\n}\n\n.mc-populated-blank-root.variant-sel-r1-s3.layout-stimulus_image_blank .pie-audio-container {\n justify-self: start;\n align-self: start;\n}\n\n.mc-populated-blank-root.variant-sel-r1-s3.layout-stimulus_image_blank .pie-choices-fieldset {\n justify-self: center;\n width: fit-content;\n}\n\n.mc-populated-blank-root.variant-sel-r1-s3 .pie-sentence-line img {\n max-width: 100%;\n height: auto;\n}\n\n.mc-populated-blank-root.variant-sel-r1-s3 .pie-choice-horizontal:hover .pie-choice-tile {\n background: #e2e2e2;\n}\n\n.mc-populated-blank-root.variant-sel-r1-s3 .pie-choice-horizontal.is-selected .pie-choice-tile,\n.mc-populated-blank-root.variant-sel-r1-s3\n .pie-choice-horizontal.is-selected:hover\n .pie-choice-tile {\n background: #fcfcd3;\n}\n\n.mc-populated-blank-root.variant-sel-r1-s3 .pie-choice-horizontal .pie-choice-radio {\n transform: scale(0.85);\n}\n"
|
|
6313
6201
|
}
|
|
6314
6202
|
};
|
|
6315
6203
|
var normalizeCustomType = (value) => {
|
|
@@ -6321,7 +6209,7 @@ var getVariantCssConfig = (customType) => {
|
|
|
6321
6209
|
var getVariantRootClass = (customType) => {
|
|
6322
6210
|
return getVariantCssConfig(customType)?.variantClass || "";
|
|
6323
6211
|
};
|
|
6324
|
-
var SEL_R1_VARIANT_IDS = new Set([
|
|
6212
|
+
var SEL_R1_VARIANT_IDS = /* @__PURE__ */ new Set([
|
|
6325
6213
|
"sel-r1-plusggg",
|
|
6326
6214
|
"sel-r1-gplusggg",
|
|
6327
6215
|
"sel-r1-g-stem",
|
|
@@ -6349,17 +6237,16 @@ var ensureVariantCssInjected = (config) => {
|
|
|
6349
6237
|
//#endregion
|
|
6350
6238
|
//#region src/delivery/McPopulatedBlank.svelte
|
|
6351
6239
|
var root = /* @__PURE__ */ from_html(`<div class="mb-4 prose pie-prompt"></div>`);
|
|
6352
|
-
var root_1 = /* @__PURE__ */
|
|
6353
|
-
var root_2 = /* @__PURE__ */ from_svg(`<svg class="pie-correct-answer-toggle-svg svelte-6wlbb4" preserveAspectRatio="xMinYMin meet" version="1.1" viewBox="-
|
|
6354
|
-
var root_3 = /* @__PURE__ */
|
|
6355
|
-
var root_4 = /* @__PURE__ */ from_html(`<div class="
|
|
6356
|
-
var root_5 = /* @__PURE__ */ from_html(`<div class="mb-
|
|
6357
|
-
var root_6 = /* @__PURE__ */ from_html(`<
|
|
6358
|
-
var root_7 = /* @__PURE__ */ from_html(`<p class="sr-only pie-
|
|
6359
|
-
var root_8 = /* @__PURE__ */ from_html(`<div><!> <!> <!> <!> <!> <!> <!> <fieldset class="border-0 p-0 m-0 pie-choices-fieldset svelte-6wlbb4"><legend class="sr-only pie-choices-legend svelte-6wlbb4"> </legend> <div style="gap:var(--mpb-choice-group-gap, 0.5rem);" role="radiogroup" tabindex="-1"></div></fieldset></div>`);
|
|
6240
|
+
var root_1 = /* @__PURE__ */ from_svg(`<svg class="pie-correct-answer-toggle-svg svelte-6wlbb4" preserveAspectRatio="xMinYMin meet" version="1.1" viewBox="-283 359 34 35"><circle cx="-266" cy="375.9" r="14" fill="var(--pie-tertiary-light, #d0e2f0)"></circle><path d="M-280.5,375.9c0-8,6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5s-6.5,14.5-14.5,14.5S-280.5,383.9-280.5,375.9z M-279.5,375.9c0,7.4,6.1,13.5,13.5,13.5c7.4,0,13.5-6.1,13.5-13.5s-6.1-13.5-13.5-13.5C-273.4,362.4-279.5,368.5-279.5,375.9z" fill="var(--pie-tertiary-light, #d0e2f0)"></path><polygon points="-265.4,383.1 -258.6,377.2 -261.2,374.2 -264.3,376.9 -268.9,368.7 -272.4,370.6" fill="var(--pie-tertiary, #146eb3)"></polygon></svg>`);
|
|
6241
|
+
var root_2 = /* @__PURE__ */ from_svg(`<svg class="pie-correct-answer-toggle-svg svelte-6wlbb4" preserveAspectRatio="xMinYMin meet" version="1.1" viewBox="-129.5 127 34 35"><path d="M-112.9,160.4c-8.5,0-15.5-6.9-15.5-15.5c0-8.5,6.9-15.5,15.5-15.5s15.5,6.9,15.5,15.5 C-97.4,153.5-104.3,160.4-112.9,160.4z" fill="#D0CAC5" stroke="#E6E3E0" stroke-width="0.75"></path><path d="M-113.2,159c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-105.2,159-113.2,159z" fill="#B3ABA4" stroke="#CDC7C2" stroke-width="0.5"></path><circle cx="-114.2" cy="143.5" r="14" fill="white"></circle><path d="M-114.2,158c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-106.2,158-114.2,158z M-114.2,130c-7.4,0-13.5,6.1-13.5,13.5s6.1,13.5,13.5,13.5s13.5-6.1,13.5-13.5S-106.8,130-114.2,130z" fill="var(--pie-background-dark, #ecedf1)"></path><polygon points="-114.8,150.7 -121.6,144.8 -119,141.8 -115.9,144.5 -111.3,136.3 -107.8,138.2" fill="var(--pie-tertiary, #146eb3)"></polygon></svg>`);
|
|
6242
|
+
var root_3 = /* @__PURE__ */ from_html(`<div class="pie-correct-answer-toggle-row svelte-6wlbb4"><button type="button" class="mb-3 pie-toggle-correct-answer svelte-6wlbb4" style="gap:var(--mpb-toggle-button-gap, 0.5rem);" data-testid="show-correct-answer"><span class="pie-correct-answer-toggle-content svelte-6wlbb4"><span class="pie-correct-answer-toggle-icon-holder svelte-6wlbb4" aria-hidden="true"><!></span> <span class="pie-correct-answer-toggle-label svelte-6wlbb4"> </span></span></button></div>`);
|
|
6243
|
+
var root_4 = /* @__PURE__ */ from_html(`<div class="mb-3 prose prose-p:my-1 sentence-line pie-sentence-line svelte-6wlbb4"></div>`);
|
|
6244
|
+
var root_5 = /* @__PURE__ */ from_html(`<div class="mb-4 template-line pie-template-line svelte-6wlbb4"><!><!><!></div>`);
|
|
6245
|
+
var root_6 = /* @__PURE__ */ from_html(`<p class="sr-only pie-result-feedback svelte-6wlbb4" role="status" aria-live="polite"> </p>`);
|
|
6246
|
+
var root_7 = /* @__PURE__ */ from_html(`<div><!> <!> <!> <!> <!> <!> <fieldset class="border-0 p-0 m-0 pie-choices-fieldset svelte-6wlbb4"><legend class="sr-only pie-choices-legend svelte-6wlbb4"> </legend> <div style="gap:var(--mpb-choice-group-gap, 0.5rem);" role="radiogroup" tabindex="-1"></div></fieldset></div>`);
|
|
6360
6247
|
var $$css = {
|
|
6361
6248
|
hash: "svelte-6wlbb4",
|
|
6362
|
-
code: ".sr-only.svelte-6wlbb4 {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;}.mc-populated-blank-root.svelte-6wlbb4 .prose {max-width:none;}.pie-toggle-correct-answer.svelte-6wlbb4 {width:100%;cursor:pointer;border:0;background:transparent;padding:0;display:flex;justify-content:center;text-align:center;color:var(--pie-
|
|
6249
|
+
code: ".sr-only.svelte-6wlbb4 {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;}.mc-populated-blank-root.svelte-6wlbb4 {--mpb-focus-ring: var(\n --pie-focus-outline,\n var(--pie-button-focus-outline, var(--pie-focus-checked-border, #1565c0))\n );}.mc-populated-blank-root.svelte-6wlbb4 .prose {max-width:none;}.pie-toggle-correct-answer.svelte-6wlbb4 {width:100%;cursor:pointer;border:0;background:transparent;padding:0;display:flex;justify-content:center;text-align:center;color:var(--pie-text, black);}.pie-correct-answer-toggle-row.svelte-6wlbb4 {width:100%;display:flex;justify-content:flex-end;}.pie-correct-answer-toggle-content.svelte-6wlbb4 {display:flex;margin:0 auto;align-items:center;}.pie-correct-answer-toggle-icon-holder.svelte-6wlbb4 {width:25px;margin-right:5px;display:inline-flex;align-items:center;justify-content:center;}.pie-correct-answer-toggle-svg.svelte-6wlbb4 {width:25px;height:25px;}.pie-correct-answer-toggle-label.svelte-6wlbb4 {width:fit-content;min-width:140px;align-self:center;vertical-align:middle;font-weight:400;user-select:none;}.pie-toggle-correct-answer.svelte-6wlbb4:hover .pie-correct-answer-toggle-label:where(.svelte-6wlbb4),\n .pie-toggle-correct-answer.svelte-6wlbb4:focus-visible .pie-correct-answer-toggle-label:where(.svelte-6wlbb4) {text-decoration:underline;}.template-line.svelte-6wlbb4 {white-space:pre-wrap;}.template-line.svelte-6wlbb4 p {margin:0;display:inline;}.layout-audio_blank_only.svelte-6wlbb4 .pie-audio-container,\n .layout-stimulus_image_blank.svelte-6wlbb4 .pie-audio-container {display:flex;width:min(100%, var(--mpb-audio-instructions-max-width, 875px));margin-left:auto;margin-right:auto;justify-content:flex-end;}.layout-audio_blank_only.svelte-6wlbb4 .template-line:where(.svelte-6wlbb4),\n .layout-stimulus_image_blank.svelte-6wlbb4 .template-line:where(.svelte-6wlbb4) {text-align:center;margin:var(--mpb-audio-blank-template-margin-top, 0.8rem) 0\n var(--mpb-audio-blank-template-margin-bottom, 1.8rem);}.layout-audio_blank_only.svelte-6wlbb4 fieldset:where(.svelte-6wlbb4) {display:flex;justify-content:center;}.layout-audio_blank_only.svelte-6wlbb4 .pie-blank-slot,\n .layout-stimulus_image_blank.svelte-6wlbb4 .pie-blank-slot {width:var(--mpb-blank-wide-width, 10rem);border-bottom-width:var(--mpb-blank-underline-wide-width, 6px);min-height:160px;padding-bottom:4px;}.layout-stimulus_image_blank.svelte-6wlbb4 {display:grid;grid-template-columns:minmax(var(--mpb-stimulus-min-column, 210px), 1fr) auto;grid-template-areas:'sentence audio'\n '. template'\n 'choices choices';column-gap:var(--mpb-stimulus-grid-column-gap, 2rem);row-gap:var(--mpb-stimulus-grid-row-gap, 0.7rem);align-items:start;}.layout-stimulus_image_blank.svelte-6wlbb4 .pie-audio-container {grid-area:audio;margin:0;}.layout-stimulus_image_blank.svelte-6wlbb4 .sentence-line:where(.svelte-6wlbb4) {grid-area:sentence;margin:var(--mpb-stimulus-sentence-margin-top, 0.2rem) 0 0;}.layout-stimulus_image_blank.svelte-6wlbb4 .template-line:where(.svelte-6wlbb4) {grid-area:template;margin:0;text-align:center;justify-self:center;}.layout-stimulus_image_blank.svelte-6wlbb4 fieldset:where(.svelte-6wlbb4) {grid-area:choices;margin-top:var(--mpb-stimulus-choices-margin-top, 0.9rem);}.layout-token_sequence.svelte-6wlbb4 {display:grid;grid-template-columns:1fr auto;grid-template-areas:'audio audio'\n 'template template'\n 'choices choices';column-gap:var(--mpb-token-grid-column-gap, 1.5rem);row-gap:var(--mpb-token-grid-row-gap, 0.8rem);align-items:start;}.layout-token_sequence.svelte-6wlbb4 .pie-audio-container {grid-area:audio;margin:0;justify-self:end;}.layout-token_sequence.svelte-6wlbb4 .template-line:where(.svelte-6wlbb4) {grid-area:template;margin:var(--mpb-token-template-margin-top, 0.6rem) 0 0;justify-self:center;text-align:center;}.layout-token_sequence.svelte-6wlbb4 .template-line:where(.svelte-6wlbb4) span + span {margin-left:var(--mpb-token-inline-token-gap, 0.35rem);}.layout-token_sequence.svelte-6wlbb4 .pie-blank-slot {width:var(--mpb-blank-standalone-width, 7rem);border-bottom-width:var(--mpb-blank-underline-wide-width, 4px);margin-left:var(--mpb-token-inline-token-gap, 0.35rem);}.layout-token_sequence.svelte-6wlbb4 fieldset:where(.svelte-6wlbb4) {grid-area:choices;margin-top:var(--mpb-token-choices-margin-top, 0.2rem);}.layout-inline_sentence.has-inline-audio.svelte-6wlbb4 {display:grid;grid-template-columns:minmax(var(--mpb-text-min-column, 260px), 1fr) auto;grid-template-areas:'template audio'\n 'choices choices';column-gap:var(--mpb-inline-grid-column-gap, 1.5rem);row-gap:var(--mpb-inline-grid-row-gap, 0.65rem);align-items:start;}.layout-inline_sentence.has-inline-audio.svelte-6wlbb4 .pie-audio-container {grid-area:audio;margin:0;justify-self:end;}.layout-inline_sentence.has-inline-audio.svelte-6wlbb4 .template-line:where(.svelte-6wlbb4) {grid-area:template;margin:var(--mpb-inline-template-margin-top, 0.45rem) 0 0;text-align:center;justify-self:center;}.layout-inline_sentence.has-inline-audio.svelte-6wlbb4 fieldset:where(.svelte-6wlbb4) {grid-area:choices;margin-top:var(--mpb-inline-choices-margin-top, 0.25rem);}\n\n /* Match Learnosity responsive behavior for CQT audio-blank layouts:\n at smaller widths, audio control shifts left and answer tiles stack. */\n @media (max-width: 760px) {.layout-audio_blank_only.svelte-6wlbb4 .pie-audio-container,\n .layout-stimulus_image_blank.svelte-6wlbb4 .pie-audio-container,\n .layout-token_sequence.svelte-6wlbb4 .pie-audio-container,\n .layout-inline_sentence.has-inline-audio.svelte-6wlbb4 .pie-audio-container {width:100%;margin-left:0;margin-right:0;justify-content:flex-start;justify-self:start;}.layout-audio_blank_only.svelte-6wlbb4 .pie-choices:where(.svelte-6wlbb4),\n .layout-token_sequence.svelte-6wlbb4 .pie-choices:where(.svelte-6wlbb4),\n .layout-stimulus_image_blank.svelte-6wlbb4 .pie-choices:where(.svelte-6wlbb4),\n .layout-inline_sentence.has-inline-audio.svelte-6wlbb4 .pie-choices:where(.svelte-6wlbb4) {flex-direction:column;align-items:flex-start;justify-content:flex-start;}.layout-audio_blank_only.svelte-6wlbb4 .choice-row-horizontal:where(.svelte-6wlbb4),\n .layout-token_sequence.svelte-6wlbb4 .choice-row-horizontal:where(.svelte-6wlbb4),\n .layout-stimulus_image_blank.svelte-6wlbb4 .choice-row-horizontal:where(.svelte-6wlbb4),\n .layout-inline_sentence.has-inline-audio.svelte-6wlbb4 .choice-row-horizontal:where(.svelte-6wlbb4) {width:min(100%, var(--mpb-narrow-choice-max-width, 230px));align-items:flex-start;}\n }"
|
|
6363
6250
|
};
|
|
6364
6251
|
function McPopulatedBlank($$anchor, $$props) {
|
|
6365
6252
|
push($$props, true);
|
|
@@ -6371,15 +6258,13 @@ function McPopulatedBlank($$anchor, $$props) {
|
|
|
6371
6258
|
showCorrectAnswer: "Show correct answer",
|
|
6372
6259
|
hideCorrectAnswer: "Hide correct answer",
|
|
6373
6260
|
clickToEnableAutoplay: "Click to enable audio autoplay",
|
|
6374
|
-
audioResourceUnavailable: "Audio is enabled but no playable audio URL is configured."
|
|
6375
|
-
transcriptLabel: "Transcript"
|
|
6261
|
+
audioResourceUnavailable: "Audio is enabled but no playable audio URL is configured."
|
|
6376
6262
|
};
|
|
6377
6263
|
let model = prop($$props, "model", 7), session = prop($$props, "session", 7);
|
|
6378
6264
|
let localChoiceId = /* @__PURE__ */ state("");
|
|
6379
6265
|
let toggleCorrectAnswerButtonEl = /* @__PURE__ */ state(null);
|
|
6380
6266
|
let choicesGroupEl = /* @__PURE__ */ state(null);
|
|
6381
6267
|
let rootEl = /* @__PURE__ */ state(null);
|
|
6382
|
-
let ancestorHasTranscriptClass = /* @__PURE__ */ state(false);
|
|
6383
6268
|
const instanceId = `mc-populated-blank-${Math.random().toString(36).slice(2, 10)}`;
|
|
6384
6269
|
const deliveryMode = /* @__PURE__ */ user_derived(() => (model()?.mode || model()?.env?.mode || "").toString());
|
|
6385
6270
|
const isEvaluateMode = /* @__PURE__ */ user_derived(() => get(deliveryMode) === "evaluate");
|
|
@@ -6403,28 +6288,11 @@ function McPopulatedBlank($$anchor, $$props) {
|
|
|
6403
6288
|
const isHorizontalChoices = /* @__PURE__ */ user_derived(() => get(layoutProfileFlags).isHorizontalChoices);
|
|
6404
6289
|
const hasInlineSentenceAudioLayout = /* @__PURE__ */ user_derived(() => get(layoutProfileFlags).hasInlineSentenceAudioLayout);
|
|
6405
6290
|
const useFeatureButtonAudio = /* @__PURE__ */ user_derived(() => get(layoutProfileFlags).useFeatureButtonAudio);
|
|
6406
|
-
const showVisibleTranscript = /* @__PURE__ */ user_derived(() => get(ancestorHasTranscriptClass));
|
|
6407
|
-
const correctAnswerStyleVars = /* @__PURE__ */ user_derived(() => [
|
|
6408
|
-
`--pie-correct-answer-toggle-label-color:${Z.text()}`,
|
|
6409
|
-
`--pie-correct-answer-toggle-icon-open-bg:${Z.tertiaryLight()}`,
|
|
6410
|
-
`--pie-correct-answer-toggle-icon-closed-bg:${Z.backgroundDark()}`,
|
|
6411
|
-
`--pie-correct-answer-toggle-icon-glyph-color:${Z.tertiary()}`,
|
|
6412
|
-
`--pie-correct-answer-choice-hover-bg:${Z.backgroundDark()}`,
|
|
6413
|
-
`--pie-correct-answer-choice-selected-bg:${Z.secondaryBackground()}`,
|
|
6414
|
-
`--pie-correct-answer-choice-correct-bg:${Z.correctSecondary()}`,
|
|
6415
|
-
`--pie-correct-answer-choice-incorrect-bg:${Z.incorrectSecondary()}`,
|
|
6416
|
-
`--pie-correct-answer-choice-correct-border:${Z.correctTertiary()}`,
|
|
6417
|
-
`--pie-correct-answer-choice-incorrect-border:${Z.incorrectWithIcon()}`,
|
|
6418
|
-
`--pie-correct-answer-feedback-correct-bg:${Z.correctWithIcon()}`,
|
|
6419
|
-
`--pie-correct-answer-feedback-incorrect-bg:${Z.incorrectWithIcon()}`,
|
|
6420
|
-
`--pie-correct-answer-feedback-glyph-color:${Z.white()}`
|
|
6421
|
-
].join(";"));
|
|
6422
6291
|
const layout = /* @__PURE__ */ user_derived(() => computeLayoutStyle({
|
|
6423
6292
|
layoutProfile: get(layoutProfile),
|
|
6424
6293
|
isBlankOnlyTemplate: get(isBlankOnlyTemplate),
|
|
6425
6294
|
configuredLimits: model()?.layoutLimits,
|
|
6426
|
-
customProfilePresets: model()?.layoutProfilePresets
|
|
6427
|
-
correctAnswerStyleVars: get(correctAnswerStyleVars)
|
|
6295
|
+
customProfilePresets: model()?.layoutProfilePresets
|
|
6428
6296
|
}));
|
|
6429
6297
|
const choices = /* @__PURE__ */ user_derived(() => Array.isArray(model()?.choices) ? model().choices : []);
|
|
6430
6298
|
const choiceMode = /* @__PURE__ */ user_derived(() => model()?.choiceMode || "text");
|
|
@@ -6457,7 +6325,6 @@ function McPopulatedBlank($$anchor, $$props) {
|
|
|
6457
6325
|
...model()?.uiText || {}
|
|
6458
6326
|
}));
|
|
6459
6327
|
const promptId = /* @__PURE__ */ user_derived(() => `${instanceId}-prompt`);
|
|
6460
|
-
const transcriptId = /* @__PURE__ */ user_derived(() => `${instanceId}-transcript`);
|
|
6461
6328
|
const legendId = /* @__PURE__ */ user_derived(() => `${instanceId}-choices-legend`);
|
|
6462
6329
|
const resultId = /* @__PURE__ */ user_derived(() => `${instanceId}-result`);
|
|
6463
6330
|
const legendText = /* @__PURE__ */ user_derived(() => computeLegendText({
|
|
@@ -6472,12 +6339,7 @@ function McPopulatedBlank($$anchor, $$props) {
|
|
|
6472
6339
|
if (explicit) return explicit;
|
|
6473
6340
|
return get(legendText);
|
|
6474
6341
|
});
|
|
6475
|
-
const templateDescribedBy = /* @__PURE__ */ user_derived(() =>
|
|
6476
|
-
const ids = [];
|
|
6477
|
-
if (model()?.prompt) ids.push(get(promptId));
|
|
6478
|
-
if (model()?.hasAudio && model()?.audioTranscript) ids.push(get(transcriptId));
|
|
6479
|
-
return ids.length ? ids.join(" ") : void 0;
|
|
6480
|
-
});
|
|
6342
|
+
const templateDescribedBy = /* @__PURE__ */ user_derived(() => model()?.prompt ? get(promptId) : void 0);
|
|
6481
6343
|
const lang = /* @__PURE__ */ user_derived(() => {
|
|
6482
6344
|
const locale = model()?.locale || "";
|
|
6483
6345
|
return locale ? locale.slice(0, 2) : "en";
|
|
@@ -6491,9 +6353,15 @@ function McPopulatedBlank($$anchor, $$props) {
|
|
|
6491
6353
|
before: t,
|
|
6492
6354
|
after: ""
|
|
6493
6355
|
};
|
|
6356
|
+
let before = t.slice(0, idx);
|
|
6357
|
+
let after = t.slice(idx + 9);
|
|
6358
|
+
if (get(layoutProfile) === "inline_sentence") {
|
|
6359
|
+
before = `${before.replace(/\s+$/, "")} `;
|
|
6360
|
+
after = ` ${after.replace(/^\s+/, "")}`;
|
|
6361
|
+
}
|
|
6494
6362
|
return {
|
|
6495
|
-
before
|
|
6496
|
-
after
|
|
6363
|
+
before,
|
|
6364
|
+
after
|
|
6497
6365
|
};
|
|
6498
6366
|
});
|
|
6499
6367
|
function emitSession(updatedSession, sourceEl) {
|
|
@@ -6569,8 +6437,7 @@ function McPopulatedBlank($$anchor, $$props) {
|
|
|
6569
6437
|
const group = get(choicesGroupEl);
|
|
6570
6438
|
if (!group) return;
|
|
6571
6439
|
const handleChange = (e) => {
|
|
6572
|
-
|
|
6573
|
-
if (!target || target.type !== "radio") return;
|
|
6440
|
+
if (e.target?.type !== "radio") return;
|
|
6574
6441
|
onRadioChange(e);
|
|
6575
6442
|
};
|
|
6576
6443
|
const handleKeydown = (e) => onRadioGroupKeydown(e);
|
|
@@ -6584,24 +6451,6 @@ function McPopulatedBlank($$anchor, $$props) {
|
|
|
6584
6451
|
user_effect(() => {
|
|
6585
6452
|
ensureVariantCssInjected(get(variantCssConfig));
|
|
6586
6453
|
});
|
|
6587
|
-
user_effect(() => {
|
|
6588
|
-
const el = get(rootEl);
|
|
6589
|
-
if (!el) return;
|
|
6590
|
-
const check = () => {
|
|
6591
|
-
set(ancestorHasTranscriptClass, !!el.closest(".rli-with-audio-transcript"));
|
|
6592
|
-
};
|
|
6593
|
-
check();
|
|
6594
|
-
const observer = new MutationObserver(check);
|
|
6595
|
-
let node = el.parentElement;
|
|
6596
|
-
while (node) {
|
|
6597
|
-
observer.observe(node, {
|
|
6598
|
-
attributes: true,
|
|
6599
|
-
attributeFilter: ["class"]
|
|
6600
|
-
});
|
|
6601
|
-
node = node.parentElement;
|
|
6602
|
-
}
|
|
6603
|
-
return () => observer.disconnect();
|
|
6604
|
-
});
|
|
6605
6454
|
var $$exports = {
|
|
6606
6455
|
get model() {
|
|
6607
6456
|
return model();
|
|
@@ -6618,8 +6467,8 @@ function McPopulatedBlank($$anchor, $$props) {
|
|
|
6618
6467
|
flushSync();
|
|
6619
6468
|
}
|
|
6620
6469
|
};
|
|
6621
|
-
var div =
|
|
6622
|
-
var
|
|
6470
|
+
var div = root_7();
|
|
6471
|
+
var node = child(div);
|
|
6623
6472
|
var consequent = ($$anchor) => {
|
|
6624
6473
|
var div_1 = root();
|
|
6625
6474
|
html(div_1, () => model().prompt, true);
|
|
@@ -6627,44 +6476,29 @@ function McPopulatedBlank($$anchor, $$props) {
|
|
|
6627
6476
|
template_effect(() => set_attribute(div_1, "id", get(promptId)));
|
|
6628
6477
|
append($$anchor, div_1);
|
|
6629
6478
|
};
|
|
6630
|
-
if_block(
|
|
6479
|
+
if_block(node, ($$render) => {
|
|
6631
6480
|
if (model()?.prompt) $$render(consequent);
|
|
6632
6481
|
});
|
|
6633
|
-
var
|
|
6634
|
-
var
|
|
6635
|
-
var
|
|
6636
|
-
var text = child(p, true);
|
|
6637
|
-
reset(p);
|
|
6638
|
-
template_effect(() => {
|
|
6639
|
-
set_class(p, 1, `text-sm mb-3 text-gray-700 text-center pie-audio-transcript ${get(showVisibleTranscript) ? "" : "sr-only"}`, "svelte-6wlbb4");
|
|
6640
|
-
set_attribute(p, "id", get(transcriptId));
|
|
6641
|
-
set_text(text, model().audioTranscript);
|
|
6642
|
-
});
|
|
6643
|
-
append($$anchor, p);
|
|
6644
|
-
};
|
|
6645
|
-
if_block(node_2, ($$render) => {
|
|
6646
|
-
if (model()?.audioTranscript) $$render(consequent_1);
|
|
6647
|
-
});
|
|
6648
|
-
var node_3 = sibling(node_2, 2);
|
|
6649
|
-
var consequent_3 = ($$anchor) => {
|
|
6650
|
-
var div_2 = root_4();
|
|
6482
|
+
var node_1 = sibling(node, 2);
|
|
6483
|
+
var consequent_2 = ($$anchor) => {
|
|
6484
|
+
var div_2 = root_3();
|
|
6651
6485
|
var button = child(div_2);
|
|
6652
6486
|
var span = child(button);
|
|
6653
6487
|
var span_1 = child(span);
|
|
6654
|
-
var
|
|
6655
|
-
var
|
|
6656
|
-
append($$anchor,
|
|
6488
|
+
var node_2 = child(span_1);
|
|
6489
|
+
var consequent_1 = ($$anchor) => {
|
|
6490
|
+
append($$anchor, root_1());
|
|
6657
6491
|
};
|
|
6658
6492
|
var alternate = ($$anchor) => {
|
|
6659
|
-
append($$anchor,
|
|
6493
|
+
append($$anchor, root_2());
|
|
6660
6494
|
};
|
|
6661
|
-
if_block(
|
|
6662
|
-
if (get(showCorrectAnswer)) $$render(
|
|
6495
|
+
if_block(node_2, ($$render) => {
|
|
6496
|
+
if (get(showCorrectAnswer)) $$render(consequent_1);
|
|
6663
6497
|
else $$render(alternate, -1);
|
|
6664
6498
|
});
|
|
6665
6499
|
reset(span_1);
|
|
6666
6500
|
var span_2 = sibling(span_1, 2);
|
|
6667
|
-
var
|
|
6501
|
+
var text = child(span_2, true);
|
|
6668
6502
|
reset(span_2);
|
|
6669
6503
|
reset(span);
|
|
6670
6504
|
reset(button);
|
|
@@ -6672,21 +6506,20 @@ function McPopulatedBlank($$anchor, $$props) {
|
|
|
6672
6506
|
reset(div_2);
|
|
6673
6507
|
template_effect(() => {
|
|
6674
6508
|
set_attribute(button, "aria-pressed", get(showCorrectAnswer));
|
|
6675
|
-
set_text(
|
|
6509
|
+
set_text(text, get(showCorrectAnswer) ? get(uiText).hideCorrectAnswer : get(uiText).showCorrectAnswer);
|
|
6676
6510
|
});
|
|
6677
6511
|
append($$anchor, div_2);
|
|
6678
6512
|
};
|
|
6679
|
-
if_block(
|
|
6680
|
-
if (get(shouldShowCorrectAnswerToggle)) $$render(
|
|
6513
|
+
if_block(node_1, ($$render) => {
|
|
6514
|
+
if (get(shouldShowCorrectAnswerToggle)) $$render(consequent_2);
|
|
6681
6515
|
});
|
|
6682
|
-
var
|
|
6516
|
+
var node_3 = sibling(node_1, 2);
|
|
6683
6517
|
{
|
|
6684
6518
|
let $0 = /* @__PURE__ */ user_derived(() => !!model()?.hasAudio);
|
|
6685
6519
|
let $1 = /* @__PURE__ */ user_derived(() => model()?.audioUrl);
|
|
6686
6520
|
let $2 = /* @__PURE__ */ user_derived(() => !!model()?.autoplayAudioEnabled);
|
|
6687
|
-
let $3 = /* @__PURE__ */ user_derived(() => model()?.
|
|
6688
|
-
|
|
6689
|
-
AudioPlayer(node_5, {
|
|
6521
|
+
let $3 = /* @__PURE__ */ user_derived(() => model()?.locale);
|
|
6522
|
+
AudioPlayer(node_3, {
|
|
6690
6523
|
get hasAudio() {
|
|
6691
6524
|
return get($0);
|
|
6692
6525
|
},
|
|
@@ -6699,15 +6532,6 @@ function McPopulatedBlank($$anchor, $$props) {
|
|
|
6699
6532
|
get autoplayEnabled() {
|
|
6700
6533
|
return get($2);
|
|
6701
6534
|
},
|
|
6702
|
-
get audioTranscript() {
|
|
6703
|
-
return get($3);
|
|
6704
|
-
},
|
|
6705
|
-
get showVisibleTranscript() {
|
|
6706
|
-
return get(showVisibleTranscript);
|
|
6707
|
-
},
|
|
6708
|
-
get transcriptId() {
|
|
6709
|
-
return get(transcriptId);
|
|
6710
|
-
},
|
|
6711
6535
|
get featureAudioSkin() {
|
|
6712
6536
|
return get(featureAudioSkin);
|
|
6713
6537
|
},
|
|
@@ -6715,30 +6539,30 @@ function McPopulatedBlank($$anchor, $$props) {
|
|
|
6715
6539
|
return get(uiText);
|
|
6716
6540
|
},
|
|
6717
6541
|
get locale() {
|
|
6718
|
-
return get($
|
|
6542
|
+
return get($3);
|
|
6719
6543
|
},
|
|
6720
6544
|
onaudiostarted: onAudioStarted,
|
|
6721
6545
|
onaudioended: onAudioEnded
|
|
6722
6546
|
});
|
|
6723
6547
|
}
|
|
6724
|
-
var
|
|
6725
|
-
var
|
|
6726
|
-
var div_3 =
|
|
6548
|
+
var node_4 = sibling(node_3, 2);
|
|
6549
|
+
var consequent_3 = ($$anchor) => {
|
|
6550
|
+
var div_3 = root_4();
|
|
6727
6551
|
html(div_3, () => model().sentenceHtml, true);
|
|
6728
6552
|
reset(div_3);
|
|
6729
6553
|
template_effect(() => set_attribute(div_3, "aria-describedby", get(templateDescribedBy)));
|
|
6730
6554
|
append($$anchor, div_3);
|
|
6731
6555
|
};
|
|
6732
|
-
if_block(
|
|
6733
|
-
if (model()?.sentenceHtml) $$render(
|
|
6556
|
+
if_block(node_4, ($$render) => {
|
|
6557
|
+
if (model()?.sentenceHtml) $$render(consequent_3);
|
|
6734
6558
|
});
|
|
6735
|
-
var
|
|
6736
|
-
var
|
|
6737
|
-
var div_4 =
|
|
6738
|
-
var
|
|
6739
|
-
html(
|
|
6740
|
-
var
|
|
6741
|
-
ClozeMarker(
|
|
6559
|
+
var node_5 = sibling(node_4, 2);
|
|
6560
|
+
var consequent_4 = ($$anchor) => {
|
|
6561
|
+
var div_4 = root_5();
|
|
6562
|
+
var node_6 = child(div_4);
|
|
6563
|
+
html(node_6, () => get(templateParts).before);
|
|
6564
|
+
var node_7 = sibling(node_6);
|
|
6565
|
+
ClozeMarker(node_7, {
|
|
6742
6566
|
get choiceMode() {
|
|
6743
6567
|
return get(choiceMode);
|
|
6744
6568
|
},
|
|
@@ -6761,31 +6585,31 @@ function McPopulatedBlank($$anchor, $$props) {
|
|
|
6761
6585
|
return get(uiText).selectedAnswerInSentence;
|
|
6762
6586
|
}
|
|
6763
6587
|
});
|
|
6764
|
-
html(sibling(
|
|
6588
|
+
html(sibling(node_7), () => get(templateParts).after);
|
|
6765
6589
|
reset(div_4);
|
|
6766
6590
|
template_effect(() => set_attribute(div_4, "aria-describedby", get(templateDescribedBy)));
|
|
6767
6591
|
append($$anchor, div_4);
|
|
6768
6592
|
};
|
|
6769
|
-
if_block(
|
|
6770
|
-
if (!get(isAudioOnlyMode)) $$render(
|
|
6593
|
+
if_block(node_5, ($$render) => {
|
|
6594
|
+
if (!get(isAudioOnlyMode)) $$render(consequent_4);
|
|
6771
6595
|
});
|
|
6772
|
-
var
|
|
6773
|
-
var
|
|
6774
|
-
var
|
|
6775
|
-
var
|
|
6776
|
-
reset(
|
|
6596
|
+
var node_9 = sibling(node_5, 2);
|
|
6597
|
+
var consequent_5 = ($$anchor) => {
|
|
6598
|
+
var p = root_6();
|
|
6599
|
+
var text_1 = child(p, true);
|
|
6600
|
+
reset(p);
|
|
6777
6601
|
template_effect(() => {
|
|
6778
|
-
set_attribute(
|
|
6779
|
-
set_text(
|
|
6602
|
+
set_attribute(p, "id", get(resultId));
|
|
6603
|
+
set_text(text_1, get(resultText));
|
|
6780
6604
|
});
|
|
6781
|
-
append($$anchor,
|
|
6605
|
+
append($$anchor, p);
|
|
6782
6606
|
};
|
|
6783
|
-
if_block(
|
|
6784
|
-
if (get(resultText)) $$render(
|
|
6607
|
+
if_block(node_9, ($$render) => {
|
|
6608
|
+
if (get(resultText)) $$render(consequent_5);
|
|
6785
6609
|
});
|
|
6786
|
-
var fieldset = sibling(
|
|
6610
|
+
var fieldset = sibling(node_9, 2);
|
|
6787
6611
|
var legend = child(fieldset);
|
|
6788
|
-
var
|
|
6612
|
+
var text_2 = child(legend, true);
|
|
6789
6613
|
reset(legend);
|
|
6790
6614
|
var div_5 = sibling(legend, 2);
|
|
6791
6615
|
each(div_5, 21, () => get(choices), (c) => c.id, ($$anchor, c) => {
|
|
@@ -6835,7 +6659,7 @@ function McPopulatedBlank($$anchor, $$props) {
|
|
|
6835
6659
|
set_style(div, get(layout).rootStyle);
|
|
6836
6660
|
fieldset.disabled = model()?.disabled;
|
|
6837
6661
|
set_attribute(legend, "id", get(legendId));
|
|
6838
|
-
set_text(
|
|
6662
|
+
set_text(text_2, get(legendText));
|
|
6839
6663
|
set_class(div_5, 1, `pie-choices ${get(isHorizontalChoices) ? "flex flex-row flex-wrap items-start justify-center" : "flex flex-col"}`, "svelte-6wlbb4");
|
|
6840
6664
|
set_attribute(div_5, "aria-labelledby", get(choicesGroupLabelledBy));
|
|
6841
6665
|
set_attribute(div_5, "aria-label", get(choicesGroupAriaLabel));
|