@pie-players/pie-assessment-toolkit 0.3.44 → 0.3.45
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 +54 -69
- package/dist/components/ItemToolBar.custom-element.js +479 -324
- package/dist/components/PieAssessmentToolkit.custom-element.js +19498 -3590
- package/dist/components/SectionToolBar.custom-element.js +761 -507
- package/dist/index.d.ts +3 -6
- package/dist/index.js +1 -3
- package/dist/index.js.map +1 -1
- package/dist/policy/core/ToolPolicyEngine.d.ts +1 -2
- package/dist/policy/core/ToolPolicyEngine.js +1 -2
- package/dist/policy/core/ToolPolicyEngine.js.map +1 -1
- package/dist/policy/core/pnp-policy-inputs.d.ts +2 -3
- package/dist/policy/core/pnp-policy-inputs.js +2 -3
- package/dist/policy/core/pnp-policy-inputs.js.map +1 -1
- package/dist/policy/core/provenance.d.ts +7 -34
- package/dist/policy/core/provenance.js +4 -21
- package/dist/policy/core/provenance.js.map +1 -1
- package/dist/policy/sources/PnpPolicySource.d.ts +6 -19
- package/dist/policy/sources/PnpPolicySource.js +6 -19
- package/dist/policy/sources/PnpPolicySource.js.map +1 -1
- package/dist/runtime/SectionRuntimeEngine.d.ts +13 -28
- package/dist/runtime/SectionRuntimeEngine.js +13 -27
- package/dist/runtime/SectionRuntimeEngine.js.map +1 -1
- package/dist/runtime/adapter/SectionEngineAdapter.d.ts +2 -2
- package/dist/runtime/adapter/SectionEngineAdapter.js +2 -2
- package/dist/runtime/adapter/SectionEngineAdapter.js.map +1 -1
- package/dist/runtime/adapter/coordinator-bridge.d.ts +1 -1
- package/dist/runtime/adapter/coordinator-bridge.js +1 -1
- package/dist/runtime/adapter/coordinator-bridge.js.map +1 -1
- package/dist/runtime/adapter/dom-event-bridge.d.ts +1 -1
- package/dist/runtime/adapter/dom-event-bridge.js +1 -1
- package/dist/runtime/adapter/dom-event-bridge.js.map +1 -1
- package/dist/runtime/catalog-registration.d.ts +12 -0
- package/dist/runtime/catalog-registration.js +54 -0
- package/dist/runtime/catalog-registration.js.map +1 -0
- package/dist/runtime/core/engine-output.d.ts +2 -2
- package/dist/runtime/core/engine-output.js +2 -2
- package/dist/runtime/core/engine-output.js.map +1 -1
- package/dist/runtime/core/engine-readiness.d.ts +2 -2
- package/dist/runtime/core/engine-readiness.js.map +1 -1
- package/dist/runtime/core/engine-resolver.d.ts +13 -41
- package/dist/runtime/core/engine-resolver.js +19 -76
- package/dist/runtime/core/engine-resolver.js.map +1 -1
- package/dist/runtime/core/engine-transition.d.ts +1 -1
- package/dist/runtime/core/engine-transition.js +1 -1
- package/dist/runtime/core/engine-transition.js.map +1 -1
- package/dist/runtime/engine.d.ts +1 -1
- package/dist/runtime/engine.js.map +1 -1
- package/dist/runtime/section-runtime-engine-host-context.d.ts +22 -15
- package/dist/runtime/section-runtime-engine-host-context.js +10 -10
- package/dist/runtime/section-runtime-engine-host-context.js.map +1 -1
- package/dist/runtime/stage-emit-gate.d.ts +4 -4
- package/dist/runtime/stage-emit-gate.js +3 -3
- package/dist/runtime/stage-emit-gate.js.map +1 -1
- package/dist/services/AccessibilityCatalogResolver.d.ts +23 -0
- package/dist/services/AccessibilityCatalogResolver.js +200 -28
- package/dist/services/AccessibilityCatalogResolver.js.map +1 -1
- package/dist/services/HighlightCoordinator.d.ts +25 -0
- package/dist/services/HighlightCoordinator.js +125 -0
- package/dist/services/HighlightCoordinator.js.map +1 -1
- package/dist/services/SSMLExtractor.d.ts +16 -1
- package/dist/services/SSMLExtractor.js +86 -7
- package/dist/services/SSMLExtractor.js.map +1 -1
- package/dist/services/TTSService.d.ts +30 -4
- package/dist/services/TTSService.js +652 -159
- package/dist/services/TTSService.js.map +1 -1
- package/dist/services/ToolRegistry.d.ts +2 -2
- package/dist/services/ToolRegistry.js +1 -1
- package/dist/services/ToolRegistry.js.map +1 -1
- package/dist/services/ToolkitCoordinator.d.ts +16 -73
- package/dist/services/ToolkitCoordinator.js +34 -113
- package/dist/services/ToolkitCoordinator.js.map +1 -1
- package/dist/services/interfaces.d.ts +20 -2
- package/dist/services/interfaces.js.map +1 -1
- package/dist/services/tool-config-validation.d.ts +1 -1
- package/dist/services/tool-config-validation.js +7 -7
- package/dist/services/tool-config-validation.js.map +1 -1
- package/dist/services/tool-instance-id.js +1 -1
- package/dist/services/tool-instance-id.js.map +1 -1
- package/dist/services/tool-providers/TTSToolProvider.js +3 -3
- package/dist/services/tool-providers/TTSToolProvider.js.map +1 -1
- package/dist/services/tools-config-normalizer.d.ts +13 -2
- package/dist/services/tools-config-normalizer.js +3 -8
- package/dist/services/tools-config-normalizer.js.map +1 -1
- package/dist/services/tts/browser-provider.js +2 -0
- package/dist/services/tts/browser-provider.js.map +1 -1
- package/dist/services/tts/catalog-span-alignment.d.ts +39 -0
- package/dist/services/tts/catalog-span-alignment.js +300 -0
- package/dist/services/tts/catalog-span-alignment.js.map +1 -0
- package/dist/services/tts/generated-speech/assemble-plan.d.ts +33 -0
- package/dist/services/tts/generated-speech/assemble-plan.js +111 -0
- package/dist/services/tts/generated-speech/assemble-plan.js.map +1 -0
- package/dist/services/tts/generated-speech/dom/build-dom-plan.d.ts +25 -0
- package/dist/services/tts/generated-speech/dom/build-dom-plan.js +66 -0
- package/dist/services/tts/generated-speech/dom/build-dom-plan.js.map +1 -0
- package/dist/services/tts/generated-speech/dom/to-chunk-inputs.d.ts +19 -0
- package/dist/services/tts/generated-speech/dom/to-chunk-inputs.js +71 -0
- package/dist/services/tts/generated-speech/dom/to-chunk-inputs.js.map +1 -0
- package/dist/services/tts/generated-speech/dom/types.d.ts +37 -0
- package/dist/services/tts/generated-speech/dom/types.js +2 -0
- package/dist/services/tts/generated-speech/dom/types.js.map +1 -0
- package/dist/services/tts/generated-speech/index.d.ts +17 -0
- package/dist/services/tts/generated-speech/index.js +17 -0
- package/dist/services/tts/generated-speech/index.js.map +1 -0
- package/dist/services/tts/generated-speech/math-speech-cache.d.ts +15 -0
- package/dist/services/tts/generated-speech/math-speech-cache.js +78 -0
- package/dist/services/tts/generated-speech/math-speech-cache.js.map +1 -0
- package/dist/services/tts/generated-speech/types.d.ts +104 -0
- package/dist/services/tts/generated-speech/types.js +18 -0
- package/dist/services/tts/generated-speech/types.js.map +1 -0
- package/dist/services/tts/highlight-pipeline/boundary-normalizer.d.ts +2 -0
- package/dist/services/tts/highlight-pipeline/boundary-normalizer.js +106 -0
- package/dist/services/tts/highlight-pipeline/boundary-normalizer.js.map +1 -0
- package/dist/services/tts/highlight-pipeline/create-highlight-plan.d.ts +6 -0
- package/dist/services/tts/highlight-pipeline/create-highlight-plan.js +217 -0
- package/dist/services/tts/highlight-pipeline/create-highlight-plan.js.map +1 -0
- package/dist/services/tts/highlight-pipeline/highlight-policy.d.ts +2 -0
- package/dist/services/tts/highlight-pipeline/highlight-policy.js +32 -0
- package/dist/services/tts/highlight-pipeline/highlight-policy.js.map +1 -0
- package/dist/services/tts/highlight-pipeline/index.d.ts +9 -0
- package/dist/services/tts/highlight-pipeline/index.js +9 -0
- package/dist/services/tts/highlight-pipeline/index.js.map +1 -0
- package/dist/services/tts/highlight-pipeline/math-semantic-resolver.d.ts +3 -0
- package/dist/services/tts/highlight-pipeline/math-semantic-resolver.js +32 -0
- package/dist/services/tts/highlight-pipeline/math-semantic-resolver.js.map +1 -0
- package/dist/services/tts/highlight-pipeline/normalize-speech-chunks.d.ts +29 -0
- package/dist/services/tts/highlight-pipeline/normalize-speech-chunks.js +44 -0
- package/dist/services/tts/highlight-pipeline/normalize-speech-chunks.js.map +1 -0
- package/dist/services/tts/highlight-pipeline/prose-boundary-resolver.d.ts +2 -0
- package/dist/services/tts/highlight-pipeline/prose-boundary-resolver.js +20 -0
- package/dist/services/tts/highlight-pipeline/prose-boundary-resolver.js.map +1 -0
- package/dist/services/tts/highlight-pipeline/readable-region.d.ts +1 -0
- package/dist/services/tts/highlight-pipeline/readable-region.js +19 -0
- package/dist/services/tts/highlight-pipeline/readable-region.js.map +1 -0
- package/dist/services/tts/highlight-pipeline/rendered-math-target-resolver.d.ts +6 -0
- package/dist/services/tts/highlight-pipeline/rendered-math-target-resolver.js +198 -0
- package/dist/services/tts/highlight-pipeline/rendered-math-target-resolver.js.map +1 -0
- package/dist/services/tts/highlight-pipeline/types.d.ts +72 -0
- package/dist/services/tts/highlight-pipeline/types.js +2 -0
- package/dist/services/tts/highlight-pipeline/types.js.map +1 -0
- package/dist/services/tts/highlight-pipeline/visible-map-range.d.ts +2 -0
- package/dist/services/tts/highlight-pipeline/visible-map-range.js +22 -0
- package/dist/services/tts/highlight-pipeline/visible-map-range.js.map +1 -0
- package/dist/services/tts/math-alignment/index.d.ts +30 -0
- package/dist/services/tts/math-alignment/index.js +66 -0
- package/dist/services/tts/math-alignment/index.js.map +1 -0
- package/dist/services/tts/math-alignment/mathml-tokenizer.d.ts +2 -0
- package/dist/services/tts/math-alignment/mathml-tokenizer.js +317 -0
- package/dist/services/tts/math-alignment/mathml-tokenizer.js.map +1 -0
- package/dist/services/tts/math-alignment/range-resolver.d.ts +10 -0
- package/dist/services/tts/math-alignment/range-resolver.js +13 -0
- package/dist/services/tts/math-alignment/range-resolver.js.map +1 -0
- package/dist/services/tts/math-alignment/sequence-aligner.d.ts +7 -0
- package/dist/services/tts/math-alignment/sequence-aligner.js +119 -0
- package/dist/services/tts/math-alignment/sequence-aligner.js.map +1 -0
- package/dist/services/tts/math-alignment/speech-tokenizer.d.ts +31 -0
- package/dist/services/tts/math-alignment/speech-tokenizer.js +143 -0
- package/dist/services/tts/math-alignment/speech-tokenizer.js.map +1 -0
- package/dist/services/tts/math-alignment/types.d.ts +58 -0
- package/dist/services/tts/math-alignment/types.js +2 -0
- package/dist/services/tts/math-alignment/types.js.map +1 -0
- package/dist/services/tts/math-aware-text-processing.d.ts +18 -0
- package/dist/services/tts/math-aware-text-processing.js +348 -0
- package/dist/services/tts/math-aware-text-processing.js.map +1 -0
- package/dist/services/tts/math-speech.d.ts +44 -0
- package/dist/services/tts/math-speech.js +147 -0
- package/dist/services/tts/math-speech.js.map +1 -0
- package/dist/services/tts/mathml-sanitization.d.ts +1 -0
- package/dist/services/tts/mathml-sanitization.js +170 -0
- package/dist/services/tts/mathml-sanitization.js.map +1 -0
- package/dist/services/tts/ssml/spoken-text.d.ts +33 -0
- package/dist/services/tts/ssml/spoken-text.js +159 -0
- package/dist/services/tts/ssml/spoken-text.js.map +1 -0
- package/dist/services/tts/text-processing.d.ts +3 -0
- package/dist/services/tts/text-processing.js +30 -4
- package/dist/services/tts/text-processing.js.map +1 -1
- package/dist/services/tts-runtime-config.d.ts +17 -1
- package/dist/services/tts-runtime-config.js +11 -1
- package/dist/services/tts-runtime-config.js.map +1 -1
- package/dist/tools/registrations/accessibility-tools.js +0 -1
- package/dist/tools/registrations/accessibility-tools.js.map +1 -1
- package/dist/tools/registrations/calculator.js +41 -2
- package/dist/tools/registrations/calculator.js.map +1 -1
- package/dist/tools/tool-tag-map.js +0 -1
- package/dist/tools/tool-tag-map.js.map +1 -1
- package/package.json +8 -11
- package/dist/services/PNPToolResolver.d.ts +0 -280
- package/dist/services/PNPToolResolver.js +0 -514
- package/dist/services/PNPToolResolver.js.map +0 -1
- package/dist/services/pnp-provenance.d.ts +0 -166
- package/dist/services/pnp-provenance.js +0 -231
- package/dist/services/pnp-provenance.js.map +0 -1
|
@@ -6,15 +6,15 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
6
6
|
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
7
7
|
});
|
|
8
8
|
|
|
9
|
-
// ../../node_modules/.bun/svelte@5.
|
|
9
|
+
// ../../node_modules/.bun/svelte@5.56.0/node_modules/svelte/src/version.js
|
|
10
10
|
var PUBLIC_VERSION = "5";
|
|
11
11
|
|
|
12
|
-
// ../../node_modules/.bun/svelte@5.
|
|
12
|
+
// ../../node_modules/.bun/svelte@5.56.0/node_modules/svelte/src/internal/disclose-version.js
|
|
13
13
|
if (typeof window !== "undefined") {
|
|
14
14
|
((window.__svelte ??= {}).v ??= new Set).add(PUBLIC_VERSION);
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
// ../../node_modules/.bun/svelte@5.
|
|
17
|
+
// ../../node_modules/.bun/svelte@5.56.0/node_modules/svelte/src/constants.js
|
|
18
18
|
var EACH_ITEM_REACTIVE = 1;
|
|
19
19
|
var EACH_INDEX_REACTIVE = 1 << 1;
|
|
20
20
|
var EACH_IS_CONTROLLED = 1 << 2;
|
|
@@ -38,7 +38,7 @@ var HYDRATION_END = "]";
|
|
|
38
38
|
var HYDRATION_ERROR = {};
|
|
39
39
|
var ELEMENT_PRESERVE_ATTRIBUTE_CASE = 1 << 1;
|
|
40
40
|
var ELEMENT_IS_INPUT = 1 << 2;
|
|
41
|
-
var UNINITIALIZED = Symbol();
|
|
41
|
+
var UNINITIALIZED = Symbol("uninitialized");
|
|
42
42
|
var FILENAME = Symbol("filename");
|
|
43
43
|
var HMR = Symbol("hmr");
|
|
44
44
|
var NAMESPACE_HTML = "http://www.w3.org/1999/xhtml";
|
|
@@ -47,7 +47,7 @@ var NAMESPACE_MATHML = "http://www.w3.org/1998/Math/MathML";
|
|
|
47
47
|
|
|
48
48
|
// ../../node_modules/.bun/esm-env@1.2.2/node_modules/esm-env/true.js
|
|
49
49
|
var true_default = true;
|
|
50
|
-
// ../../node_modules/.bun/svelte@5.
|
|
50
|
+
// ../../node_modules/.bun/svelte@5.56.0/node_modules/svelte/src/internal/shared/utils.js
|
|
51
51
|
var is_array = Array.isArray;
|
|
52
52
|
var index_of = Array.prototype.indexOf;
|
|
53
53
|
var includes = Array.prototype.includes;
|
|
@@ -76,7 +76,7 @@ function deferred() {
|
|
|
76
76
|
return { promise, resolve, reject };
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
// ../../node_modules/.bun/svelte@5.
|
|
79
|
+
// ../../node_modules/.bun/svelte@5.56.0/node_modules/svelte/src/internal/client/constants.js
|
|
80
80
|
var DERIVED = 1 << 1;
|
|
81
81
|
var EFFECT = 1 << 2;
|
|
82
82
|
var RENDER_EFFECT = 1 << 3;
|
|
@@ -107,6 +107,11 @@ var STATE_SYMBOL = Symbol("$state");
|
|
|
107
107
|
var LEGACY_PROPS = Symbol("legacy props");
|
|
108
108
|
var LOADING_ATTR_SYMBOL = Symbol("");
|
|
109
109
|
var PROXY_PATH_SYMBOL = Symbol("proxy path");
|
|
110
|
+
var ATTRIBUTES_CACHE = Symbol("attributes");
|
|
111
|
+
var CLASS_CACHE = Symbol("class");
|
|
112
|
+
var STYLE_CACHE = Symbol("style");
|
|
113
|
+
var TEXT_CACHE = Symbol("text");
|
|
114
|
+
var FORM_RESET_HANDLER = Symbol("form reset");
|
|
110
115
|
var HMR_ANCHOR = Symbol("hmr anchor");
|
|
111
116
|
var STALE_REACTION = new class StaleReactionError extends Error {
|
|
112
117
|
name = "StaleReactionError";
|
|
@@ -116,7 +121,7 @@ var IS_XHTML = !!globalThis.document?.contentType && /* @__PURE__ */ globalThis.
|
|
|
116
121
|
var TEXT_NODE = 3;
|
|
117
122
|
var COMMENT_NODE = 8;
|
|
118
123
|
|
|
119
|
-
// ../../node_modules/.bun/svelte@5.
|
|
124
|
+
// ../../node_modules/.bun/svelte@5.56.0/node_modules/svelte/src/internal/shared/errors.js
|
|
120
125
|
function invariant_violation(message) {
|
|
121
126
|
if (true_default) {
|
|
122
127
|
const error = new Error(`invariant_violation
|
|
@@ -129,7 +134,7 @@ https://svelte.dev/e/invariant_violation`);
|
|
|
129
134
|
}
|
|
130
135
|
}
|
|
131
136
|
|
|
132
|
-
// ../../node_modules/.bun/svelte@5.
|
|
137
|
+
// ../../node_modules/.bun/svelte@5.56.0/node_modules/svelte/src/internal/client/errors.js
|
|
133
138
|
function async_derived_orphan() {
|
|
134
139
|
if (true_default) {
|
|
135
140
|
const error = new Error(`async_derived_orphan
|
|
@@ -296,7 +301,7 @@ https://svelte.dev/e/svelte_boundary_reset_onerror`);
|
|
|
296
301
|
}
|
|
297
302
|
}
|
|
298
303
|
|
|
299
|
-
// ../../node_modules/.bun/svelte@5.
|
|
304
|
+
// ../../node_modules/.bun/svelte@5.56.0/node_modules/svelte/src/internal/client/warnings.js
|
|
300
305
|
var bold = "font-weight: bold";
|
|
301
306
|
var normal = "font-weight: normal";
|
|
302
307
|
function await_reactivity_loss(name) {
|
|
@@ -390,7 +395,7 @@ https://svelte.dev/e/svelte_boundary_reset_noop`, bold, normal);
|
|
|
390
395
|
}
|
|
391
396
|
}
|
|
392
397
|
|
|
393
|
-
// ../../node_modules/.bun/svelte@5.
|
|
398
|
+
// ../../node_modules/.bun/svelte@5.56.0/node_modules/svelte/src/internal/client/dom/hydration.js
|
|
394
399
|
var hydrating = false;
|
|
395
400
|
function set_hydrating(value) {
|
|
396
401
|
hydrating = value;
|
|
@@ -453,7 +458,7 @@ function read_hydration_instruction(node) {
|
|
|
453
458
|
return node.data;
|
|
454
459
|
}
|
|
455
460
|
|
|
456
|
-
// ../../node_modules/.bun/svelte@5.
|
|
461
|
+
// ../../node_modules/.bun/svelte@5.56.0/node_modules/svelte/src/internal/client/reactivity/equality.js
|
|
457
462
|
function equals(value) {
|
|
458
463
|
return value === this.v;
|
|
459
464
|
}
|
|
@@ -464,12 +469,12 @@ function safe_equals(value) {
|
|
|
464
469
|
return !safe_not_equal(value, this.v);
|
|
465
470
|
}
|
|
466
471
|
|
|
467
|
-
// ../../node_modules/.bun/svelte@5.
|
|
472
|
+
// ../../node_modules/.bun/svelte@5.56.0/node_modules/svelte/src/internal/flags/index.js
|
|
468
473
|
var async_mode_flag = false;
|
|
469
474
|
var legacy_mode_flag = false;
|
|
470
475
|
var tracing_mode_flag = false;
|
|
471
476
|
|
|
472
|
-
// ../../node_modules/.bun/svelte@5.
|
|
477
|
+
// ../../node_modules/.bun/svelte@5.56.0/node_modules/svelte/src/internal/client/dev/tracing.js
|
|
473
478
|
var tracing_expressions = null;
|
|
474
479
|
function tag(source, label) {
|
|
475
480
|
source.label = label;
|
|
@@ -481,7 +486,7 @@ function tag_proxy(value, label) {
|
|
|
481
486
|
return value;
|
|
482
487
|
}
|
|
483
488
|
|
|
484
|
-
// ../../node_modules/.bun/svelte@5.
|
|
489
|
+
// ../../node_modules/.bun/svelte@5.56.0/node_modules/svelte/src/internal/shared/dev.js
|
|
485
490
|
function get_error(label) {
|
|
486
491
|
const error = new Error;
|
|
487
492
|
const stack = get_stack();
|
|
@@ -533,7 +538,7 @@ function invariant(condition, message) {
|
|
|
533
538
|
invariant_violation(message);
|
|
534
539
|
}
|
|
535
540
|
|
|
536
|
-
// ../../node_modules/.bun/svelte@5.
|
|
541
|
+
// ../../node_modules/.bun/svelte@5.56.0/node_modules/svelte/src/internal/client/context.js
|
|
537
542
|
var component_context = null;
|
|
538
543
|
function set_component_context(context) {
|
|
539
544
|
component_context = context;
|
|
@@ -585,7 +590,7 @@ function is_runes() {
|
|
|
585
590
|
return !legacy_mode_flag || component_context !== null && component_context.l === null;
|
|
586
591
|
}
|
|
587
592
|
|
|
588
|
-
// ../../node_modules/.bun/svelte@5.
|
|
593
|
+
// ../../node_modules/.bun/svelte@5.56.0/node_modules/svelte/src/internal/client/dom/task.js
|
|
589
594
|
var micro_tasks = [];
|
|
590
595
|
function run_micro_tasks() {
|
|
591
596
|
var tasks = micro_tasks;
|
|
@@ -608,7 +613,7 @@ function flush_tasks() {
|
|
|
608
613
|
}
|
|
609
614
|
}
|
|
610
615
|
|
|
611
|
-
// ../../node_modules/.bun/svelte@5.
|
|
616
|
+
// ../../node_modules/.bun/svelte@5.56.0/node_modules/svelte/src/internal/client/error-handling.js
|
|
612
617
|
var adjustments = new WeakMap;
|
|
613
618
|
function handle_error(error) {
|
|
614
619
|
var effect = active_effect;
|
|
@@ -681,7 +686,7 @@ function apply_adjustments(error) {
|
|
|
681
686
|
}
|
|
682
687
|
}
|
|
683
688
|
|
|
684
|
-
// ../../node_modules/.bun/svelte@5.
|
|
689
|
+
// ../../node_modules/.bun/svelte@5.56.0/node_modules/svelte/src/internal/client/reactivity/status.js
|
|
685
690
|
var STATUS_MASK = ~(DIRTY | MAYBE_DIRTY | CLEAN);
|
|
686
691
|
function set_signal_status(signal, status) {
|
|
687
692
|
signal.f = signal.f & STATUS_MASK | status;
|
|
@@ -694,7 +699,7 @@ function update_derived_status(derived) {
|
|
|
694
699
|
}
|
|
695
700
|
}
|
|
696
701
|
|
|
697
|
-
// ../../node_modules/.bun/svelte@5.
|
|
702
|
+
// ../../node_modules/.bun/svelte@5.56.0/node_modules/svelte/src/internal/client/reactivity/utils.js
|
|
698
703
|
function clear_marked(deps) {
|
|
699
704
|
if (deps === null)
|
|
700
705
|
return;
|
|
@@ -716,10 +721,10 @@ function defer_effect(effect, dirty_effects, maybe_dirty_effects) {
|
|
|
716
721
|
set_signal_status(effect, CLEAN);
|
|
717
722
|
}
|
|
718
723
|
|
|
719
|
-
// ../../node_modules/.bun/svelte@5.
|
|
724
|
+
// ../../node_modules/.bun/svelte@5.56.0/node_modules/svelte/src/internal/client/reactivity/store.js
|
|
720
725
|
var legacy_is_updating_store = false;
|
|
721
726
|
var is_store_binding = false;
|
|
722
|
-
var IS_UNMOUNTED = Symbol();
|
|
727
|
+
var IS_UNMOUNTED = Symbol("unmounted");
|
|
723
728
|
function capture_store_binding(fn) {
|
|
724
729
|
var previous_is_store_binding = is_store_binding;
|
|
725
730
|
try {
|
|
@@ -730,8 +735,9 @@ function capture_store_binding(fn) {
|
|
|
730
735
|
}
|
|
731
736
|
}
|
|
732
737
|
|
|
733
|
-
// ../../node_modules/.bun/svelte@5.
|
|
734
|
-
var
|
|
738
|
+
// ../../node_modules/.bun/svelte@5.56.0/node_modules/svelte/src/internal/client/reactivity/batch.js
|
|
739
|
+
var first_batch = null;
|
|
740
|
+
var last_batch = null;
|
|
735
741
|
var current_batch = null;
|
|
736
742
|
var previous_batch = null;
|
|
737
743
|
var batch_values = null;
|
|
@@ -741,17 +747,21 @@ var is_processing = false;
|
|
|
741
747
|
var collected_effects = null;
|
|
742
748
|
var legacy_updates = null;
|
|
743
749
|
var flush_count = 0;
|
|
744
|
-
var source_stacks =
|
|
750
|
+
var source_stacks = new Set;
|
|
745
751
|
var uid = 1;
|
|
746
752
|
|
|
747
753
|
class Batch {
|
|
748
754
|
id = uid++;
|
|
755
|
+
#started = false;
|
|
756
|
+
linked = true;
|
|
757
|
+
#prev = null;
|
|
758
|
+
#next = null;
|
|
759
|
+
async_deriveds = new Map;
|
|
749
760
|
current = new Map;
|
|
750
761
|
previous = new Map;
|
|
751
762
|
#commit_callbacks = new Set;
|
|
752
763
|
#discard_callbacks = new Set;
|
|
753
|
-
#
|
|
754
|
-
#pending = new Map;
|
|
764
|
+
#pending = 0;
|
|
755
765
|
#blocking_pending = new Map;
|
|
756
766
|
#deferred = null;
|
|
757
767
|
#roots = [];
|
|
@@ -762,25 +772,30 @@ class Batch {
|
|
|
762
772
|
#unskipped_branches = new Set;
|
|
763
773
|
is_fork = false;
|
|
764
774
|
#decrement_queued = false;
|
|
765
|
-
|
|
775
|
+
constructor() {
|
|
776
|
+
if (last_batch === null) {
|
|
777
|
+
first_batch = last_batch = this;
|
|
778
|
+
} else {
|
|
779
|
+
last_batch.#next = this;
|
|
780
|
+
this.#prev = last_batch;
|
|
781
|
+
}
|
|
782
|
+
last_batch = this;
|
|
783
|
+
}
|
|
766
784
|
#is_deferred() {
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
skipped = true;
|
|
777
|
-
break;
|
|
778
|
-
}
|
|
779
|
-
e = e.parent;
|
|
780
|
-
}
|
|
781
|
-
if (!skipped) {
|
|
782
|
-
return true;
|
|
785
|
+
if (this.is_fork)
|
|
786
|
+
return true;
|
|
787
|
+
for (const effect of this.#blocking_pending.keys()) {
|
|
788
|
+
var e = effect;
|
|
789
|
+
var skipped = false;
|
|
790
|
+
while (e.parent !== null) {
|
|
791
|
+
if (this.#skipped_branches.has(e)) {
|
|
792
|
+
skipped = true;
|
|
793
|
+
break;
|
|
783
794
|
}
|
|
795
|
+
e = e.parent;
|
|
796
|
+
}
|
|
797
|
+
if (!skipped) {
|
|
798
|
+
return true;
|
|
784
799
|
}
|
|
785
800
|
}
|
|
786
801
|
return false;
|
|
@@ -807,21 +822,25 @@ class Batch {
|
|
|
807
822
|
this.#unskipped_branches.add(effect);
|
|
808
823
|
}
|
|
809
824
|
#process() {
|
|
825
|
+
this.#started = true;
|
|
810
826
|
if (flush_count++ > 1000) {
|
|
811
|
-
|
|
827
|
+
this.#unlink();
|
|
812
828
|
infinite_loop_guard();
|
|
813
829
|
}
|
|
814
|
-
if (
|
|
815
|
-
for (const
|
|
816
|
-
|
|
817
|
-
set_signal_status(e, DIRTY);
|
|
818
|
-
this.schedule(e);
|
|
819
|
-
}
|
|
820
|
-
for (const e of this.#maybe_dirty_effects) {
|
|
821
|
-
set_signal_status(e, MAYBE_DIRTY);
|
|
822
|
-
this.schedule(e);
|
|
830
|
+
if (true_default) {
|
|
831
|
+
for (const value of this.current.keys()) {
|
|
832
|
+
source_stacks.add(value);
|
|
823
833
|
}
|
|
824
834
|
}
|
|
835
|
+
for (const e of this.#dirty_effects) {
|
|
836
|
+
this.#maybe_dirty_effects.delete(e);
|
|
837
|
+
set_signal_status(e, DIRTY);
|
|
838
|
+
this.schedule(e);
|
|
839
|
+
}
|
|
840
|
+
for (const e of this.#maybe_dirty_effects) {
|
|
841
|
+
set_signal_status(e, MAYBE_DIRTY);
|
|
842
|
+
this.schedule(e);
|
|
843
|
+
}
|
|
825
844
|
const roots = this.#roots;
|
|
826
845
|
this.#roots = [];
|
|
827
846
|
this.apply();
|
|
@@ -833,6 +852,8 @@ class Batch {
|
|
|
833
852
|
this.#traverse(root, effects, render_effects);
|
|
834
853
|
} catch (e) {
|
|
835
854
|
reset_all(root);
|
|
855
|
+
if (!this.#is_deferred())
|
|
856
|
+
this.discard();
|
|
836
857
|
throw e;
|
|
837
858
|
}
|
|
838
859
|
}
|
|
@@ -845,44 +866,53 @@ class Batch {
|
|
|
845
866
|
}
|
|
846
867
|
collected_effects = null;
|
|
847
868
|
legacy_updates = null;
|
|
848
|
-
if (this.#is_deferred()
|
|
869
|
+
if (this.#is_deferred()) {
|
|
849
870
|
this.#defer_effects(render_effects);
|
|
850
871
|
this.#defer_effects(effects);
|
|
851
872
|
for (const [e, t] of this.#skipped_branches) {
|
|
852
873
|
reset_branch(e, t);
|
|
853
874
|
}
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
this.#dirty_effects.clear();
|
|
859
|
-
this.#maybe_dirty_effects.clear();
|
|
860
|
-
for (const fn of this.#commit_callbacks)
|
|
861
|
-
fn(this);
|
|
862
|
-
this.#commit_callbacks.clear();
|
|
863
|
-
previous_batch = this;
|
|
864
|
-
flush_queued_effects(render_effects);
|
|
865
|
-
flush_queued_effects(effects);
|
|
866
|
-
previous_batch = null;
|
|
867
|
-
this.#deferred?.resolve();
|
|
875
|
+
if (updates.length > 0) {
|
|
876
|
+
current_batch.#process();
|
|
877
|
+
}
|
|
878
|
+
return;
|
|
868
879
|
}
|
|
880
|
+
const earlier_batch = this.#find_earlier_batch();
|
|
881
|
+
if (earlier_batch) {
|
|
882
|
+
this.#defer_effects(render_effects);
|
|
883
|
+
this.#defer_effects(effects);
|
|
884
|
+
earlier_batch.#merge(this);
|
|
885
|
+
return;
|
|
886
|
+
}
|
|
887
|
+
this.#dirty_effects.clear();
|
|
888
|
+
this.#maybe_dirty_effects.clear();
|
|
889
|
+
for (const fn of this.#commit_callbacks)
|
|
890
|
+
fn(this);
|
|
891
|
+
this.#commit_callbacks.clear();
|
|
892
|
+
previous_batch = this;
|
|
893
|
+
flush_queued_effects(render_effects);
|
|
894
|
+
flush_queued_effects(effects);
|
|
895
|
+
previous_batch = null;
|
|
896
|
+
this.#deferred?.resolve();
|
|
869
897
|
var next_batch = current_batch;
|
|
898
|
+
if (this.#pending === 0 && (this.#roots.length === 0 || next_batch !== null)) {
|
|
899
|
+
this.#unlink();
|
|
900
|
+
if (async_mode_flag) {
|
|
901
|
+
this.#commit();
|
|
902
|
+
current_batch = next_batch;
|
|
903
|
+
}
|
|
904
|
+
}
|
|
870
905
|
if (this.#roots.length > 0) {
|
|
871
|
-
|
|
872
|
-
|
|
906
|
+
if (next_batch !== null) {
|
|
907
|
+
const batch2 = next_batch;
|
|
908
|
+
batch2.#roots.push(...this.#roots.filter((r) => !batch2.#roots.includes(r)));
|
|
909
|
+
} else {
|
|
910
|
+
next_batch = this;
|
|
911
|
+
}
|
|
873
912
|
}
|
|
874
913
|
if (next_batch !== null) {
|
|
875
|
-
batches.add(next_batch);
|
|
876
|
-
if (true_default) {
|
|
877
|
-
for (const source2 of this.current.keys()) {
|
|
878
|
-
source_stacks.add(source2);
|
|
879
|
-
}
|
|
880
|
-
}
|
|
881
914
|
next_batch.#process();
|
|
882
915
|
}
|
|
883
|
-
if (async_mode_flag && !batches.has(this)) {
|
|
884
|
-
this.#commit();
|
|
885
|
-
}
|
|
886
916
|
}
|
|
887
917
|
#traverse(root, effects, render_effects) {
|
|
888
918
|
root.f ^= CLEAN;
|
|
@@ -920,6 +950,59 @@ class Batch {
|
|
|
920
950
|
}
|
|
921
951
|
}
|
|
922
952
|
}
|
|
953
|
+
#find_earlier_batch() {
|
|
954
|
+
var batch = this.#prev;
|
|
955
|
+
while (batch !== null) {
|
|
956
|
+
if (!batch.is_fork) {
|
|
957
|
+
for (const [value, [, is_derived]] of this.current) {
|
|
958
|
+
if (batch.current.has(value) && !is_derived) {
|
|
959
|
+
return batch;
|
|
960
|
+
}
|
|
961
|
+
}
|
|
962
|
+
}
|
|
963
|
+
batch = batch.#prev;
|
|
964
|
+
}
|
|
965
|
+
return null;
|
|
966
|
+
}
|
|
967
|
+
#merge(batch) {
|
|
968
|
+
for (const [source2, value] of batch.current) {
|
|
969
|
+
if (!this.previous.has(source2) && batch.previous.has(source2)) {
|
|
970
|
+
this.previous.set(source2, batch.previous.get(source2));
|
|
971
|
+
}
|
|
972
|
+
this.current.set(source2, value);
|
|
973
|
+
}
|
|
974
|
+
for (const [effect, deferred2] of batch.async_deriveds) {
|
|
975
|
+
const d = this.async_deriveds.get(effect);
|
|
976
|
+
if (d)
|
|
977
|
+
deferred2.promise.then(d.resolve).catch(d.reject);
|
|
978
|
+
}
|
|
979
|
+
this.transfer_effects(batch.#dirty_effects, batch.#maybe_dirty_effects);
|
|
980
|
+
const mark = (value) => {
|
|
981
|
+
var reactions = value.reactions;
|
|
982
|
+
if (reactions === null)
|
|
983
|
+
return;
|
|
984
|
+
for (const reaction of reactions) {
|
|
985
|
+
var flags = reaction.f;
|
|
986
|
+
if ((flags & DERIVED) !== 0) {
|
|
987
|
+
mark(reaction);
|
|
988
|
+
} else {
|
|
989
|
+
var effect = reaction;
|
|
990
|
+
if (flags & (ASYNC | BLOCK_EFFECT) && !this.async_deriveds.has(effect)) {
|
|
991
|
+
this.#maybe_dirty_effects.delete(effect);
|
|
992
|
+
set_signal_status(effect, DIRTY);
|
|
993
|
+
this.schedule(effect);
|
|
994
|
+
}
|
|
995
|
+
}
|
|
996
|
+
}
|
|
997
|
+
};
|
|
998
|
+
for (const source2 of this.current.keys()) {
|
|
999
|
+
mark(source2);
|
|
1000
|
+
}
|
|
1001
|
+
this.oncommit(() => batch.discard());
|
|
1002
|
+
batch.#unlink();
|
|
1003
|
+
current_batch = this;
|
|
1004
|
+
this.#process();
|
|
1005
|
+
}
|
|
923
1006
|
#defer_effects(effects) {
|
|
924
1007
|
for (var i = 0;i < effects.length; i += 1) {
|
|
925
1008
|
defer_effect(effects[i], this.#dirty_effects, this.#maybe_dirty_effects);
|
|
@@ -945,8 +1028,10 @@ class Batch {
|
|
|
945
1028
|
batch_values = null;
|
|
946
1029
|
}
|
|
947
1030
|
flush() {
|
|
948
|
-
var source_stacks2 = true_default ? new Set : null;
|
|
949
1031
|
try {
|
|
1032
|
+
if (true_default) {
|
|
1033
|
+
source_stacks.clear();
|
|
1034
|
+
}
|
|
950
1035
|
is_processing = true;
|
|
951
1036
|
current_batch = this;
|
|
952
1037
|
this.#process();
|
|
@@ -960,7 +1045,7 @@ class Batch {
|
|
|
960
1045
|
batch_values = null;
|
|
961
1046
|
old_values.clear();
|
|
962
1047
|
if (true_default) {
|
|
963
|
-
for (const source2 of
|
|
1048
|
+
for (const source2 of source_stacks) {
|
|
964
1049
|
source2.updated = null;
|
|
965
1050
|
}
|
|
966
1051
|
}
|
|
@@ -970,14 +1055,14 @@ class Batch {
|
|
|
970
1055
|
for (const fn of this.#discard_callbacks)
|
|
971
1056
|
fn(this);
|
|
972
1057
|
this.#discard_callbacks.clear();
|
|
973
|
-
this.#
|
|
974
|
-
|
|
1058
|
+
this.#unlink();
|
|
1059
|
+
this.#deferred?.resolve();
|
|
975
1060
|
}
|
|
976
1061
|
register_created_effect(effect) {
|
|
977
1062
|
this.#new_effects.push(effect);
|
|
978
1063
|
}
|
|
979
1064
|
#commit() {
|
|
980
|
-
for (
|
|
1065
|
+
for (let batch = first_batch;batch !== null; batch = batch.#next) {
|
|
981
1066
|
var is_earlier = batch.id < this.id;
|
|
982
1067
|
var sources = [];
|
|
983
1068
|
for (const [source3, [value, is_derived]] of this.current) {
|
|
@@ -991,13 +1076,22 @@ class Batch {
|
|
|
991
1076
|
}
|
|
992
1077
|
sources.push(source3);
|
|
993
1078
|
}
|
|
994
|
-
|
|
1079
|
+
if (is_earlier) {
|
|
1080
|
+
for (const [effect, deferred2] of this.async_deriveds) {
|
|
1081
|
+
const d = batch.async_deriveds.get(effect);
|
|
1082
|
+
if (d)
|
|
1083
|
+
deferred2.promise.then(d.resolve).catch(d.reject);
|
|
1084
|
+
}
|
|
1085
|
+
}
|
|
1086
|
+
if (!batch.#started)
|
|
1087
|
+
continue;
|
|
1088
|
+
var others = [...batch.current.keys()].filter((s) => !batch.current.get(s)[1] && !this.current.has(s));
|
|
995
1089
|
if (others.length === 0) {
|
|
996
1090
|
if (is_earlier) {
|
|
997
1091
|
batch.discard();
|
|
998
1092
|
}
|
|
999
1093
|
} else if (sources.length > 0) {
|
|
1000
|
-
if (true_default) {
|
|
1094
|
+
if (true_default && !batch.#decrement_queued) {
|
|
1001
1095
|
invariant(batch.#roots.length === 0, "Batch has scheduled roots");
|
|
1002
1096
|
}
|
|
1003
1097
|
if (is_earlier) {
|
|
@@ -1018,18 +1112,25 @@ class Batch {
|
|
|
1018
1112
|
mark_effects(source2, others, marked, checked);
|
|
1019
1113
|
}
|
|
1020
1114
|
checked = new Map;
|
|
1021
|
-
var current_unequal = [...batch.current
|
|
1022
|
-
|
|
1023
|
-
if (
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1115
|
+
var current_unequal = [...batch.current].filter(([c, v1]) => {
|
|
1116
|
+
const v2 = this.current.get(c);
|
|
1117
|
+
if (!v2)
|
|
1118
|
+
return true;
|
|
1119
|
+
return v2[0] !== v1[0] || v2[1] !== v1[1];
|
|
1120
|
+
}).map(([c]) => c);
|
|
1121
|
+
if (current_unequal.length > 0) {
|
|
1122
|
+
for (const effect of this.#new_effects) {
|
|
1123
|
+
if ((effect.f & (DESTROYED | INERT | EAGER_EFFECT)) === 0 && depends_on(effect, current_unequal, checked)) {
|
|
1124
|
+
if ((effect.f & (ASYNC | BLOCK_EFFECT)) !== 0) {
|
|
1125
|
+
set_signal_status(effect, DIRTY);
|
|
1126
|
+
batch.schedule(effect);
|
|
1127
|
+
} else {
|
|
1128
|
+
batch.#dirty_effects.add(effect);
|
|
1129
|
+
}
|
|
1029
1130
|
}
|
|
1030
1131
|
}
|
|
1031
1132
|
}
|
|
1032
|
-
if (batch.#roots.length > 0) {
|
|
1133
|
+
if (batch.#roots.length > 0 && !batch.#decrement_queued) {
|
|
1033
1134
|
batch.apply();
|
|
1034
1135
|
for (var root of batch.#roots) {
|
|
1035
1136
|
batch.#traverse(root, [], []);
|
|
@@ -1039,31 +1140,16 @@ class Batch {
|
|
|
1039
1140
|
batch.deactivate();
|
|
1040
1141
|
}
|
|
1041
1142
|
}
|
|
1042
|
-
for (const batch of batches) {
|
|
1043
|
-
if (batch.#blockers.has(this)) {
|
|
1044
|
-
batch.#blockers.delete(this);
|
|
1045
|
-
if (batch.#blockers.size === 0 && !batch.#is_deferred()) {
|
|
1046
|
-
batch.activate();
|
|
1047
|
-
batch.#process();
|
|
1048
|
-
}
|
|
1049
|
-
}
|
|
1050
|
-
}
|
|
1051
1143
|
}
|
|
1052
1144
|
increment(blocking, effect) {
|
|
1053
|
-
|
|
1054
|
-
this.#pending.set(effect, pending_count + 1);
|
|
1145
|
+
this.#pending += 1;
|
|
1055
1146
|
if (blocking) {
|
|
1056
1147
|
let blocking_pending_count = this.#blocking_pending.get(effect) ?? 0;
|
|
1057
1148
|
this.#blocking_pending.set(effect, blocking_pending_count + 1);
|
|
1058
1149
|
}
|
|
1059
1150
|
}
|
|
1060
|
-
decrement(blocking, effect
|
|
1061
|
-
|
|
1062
|
-
if (pending_count === 1) {
|
|
1063
|
-
this.#pending.delete(effect);
|
|
1064
|
-
} else {
|
|
1065
|
-
this.#pending.set(effect, pending_count - 1);
|
|
1066
|
-
}
|
|
1151
|
+
decrement(blocking, effect) {
|
|
1152
|
+
this.#pending -= 1;
|
|
1067
1153
|
if (blocking) {
|
|
1068
1154
|
let blocking_pending_count = this.#blocking_pending.get(effect) ?? 0;
|
|
1069
1155
|
if (blocking_pending_count === 1) {
|
|
@@ -1072,12 +1158,14 @@ class Batch {
|
|
|
1072
1158
|
this.#blocking_pending.set(effect, blocking_pending_count - 1);
|
|
1073
1159
|
}
|
|
1074
1160
|
}
|
|
1075
|
-
if (this.#decrement_queued
|
|
1161
|
+
if (this.#decrement_queued)
|
|
1076
1162
|
return;
|
|
1077
1163
|
this.#decrement_queued = true;
|
|
1078
1164
|
queue_micro_task(() => {
|
|
1079
1165
|
this.#decrement_queued = false;
|
|
1080
|
-
this.
|
|
1166
|
+
if (this.linked) {
|
|
1167
|
+
this.flush();
|
|
1168
|
+
}
|
|
1081
1169
|
});
|
|
1082
1170
|
}
|
|
1083
1171
|
transfer_effects(dirty_effects, maybe_dirty_effects) {
|
|
@@ -1096,36 +1184,24 @@ class Batch {
|
|
|
1096
1184
|
ondiscard(fn) {
|
|
1097
1185
|
this.#discard_callbacks.add(fn);
|
|
1098
1186
|
}
|
|
1099
|
-
on_fork_commit(fn) {
|
|
1100
|
-
this.#fork_commit_callbacks.add(fn);
|
|
1101
|
-
}
|
|
1102
|
-
run_fork_commit_callbacks() {
|
|
1103
|
-
for (const fn of this.#fork_commit_callbacks)
|
|
1104
|
-
fn(this);
|
|
1105
|
-
this.#fork_commit_callbacks.clear();
|
|
1106
|
-
}
|
|
1107
1187
|
settled() {
|
|
1108
1188
|
return (this.#deferred ??= deferred()).promise;
|
|
1109
1189
|
}
|
|
1110
1190
|
static ensure() {
|
|
1111
1191
|
if (current_batch === null) {
|
|
1112
1192
|
const batch = current_batch = new Batch;
|
|
1113
|
-
if (!is_processing) {
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
queue_micro_task(() => {
|
|
1117
|
-
if (current_batch !== batch) {
|
|
1118
|
-
return;
|
|
1119
|
-
}
|
|
1193
|
+
if (!is_processing && !is_flushing_sync) {
|
|
1194
|
+
queue_micro_task(() => {
|
|
1195
|
+
if (!batch.#started) {
|
|
1120
1196
|
batch.flush();
|
|
1121
|
-
}
|
|
1122
|
-
}
|
|
1197
|
+
}
|
|
1198
|
+
});
|
|
1123
1199
|
}
|
|
1124
1200
|
}
|
|
1125
1201
|
return current_batch;
|
|
1126
1202
|
}
|
|
1127
1203
|
apply() {
|
|
1128
|
-
if (!async_mode_flag || !this.is_fork &&
|
|
1204
|
+
if (!async_mode_flag || !this.is_fork && this.#prev === null && this.#next === null) {
|
|
1129
1205
|
batch_values = null;
|
|
1130
1206
|
return;
|
|
1131
1207
|
}
|
|
@@ -1133,22 +1209,21 @@ class Batch {
|
|
|
1133
1209
|
for (const [source2, [value]] of this.current) {
|
|
1134
1210
|
batch_values.set(source2, value);
|
|
1135
1211
|
}
|
|
1136
|
-
for (
|
|
1212
|
+
for (let batch = first_batch;batch !== null; batch = batch.#next) {
|
|
1137
1213
|
if (batch === this || batch.is_fork)
|
|
1138
1214
|
continue;
|
|
1139
1215
|
var intersects = false;
|
|
1140
|
-
var differs = false;
|
|
1141
1216
|
if (batch.id < this.id) {
|
|
1142
1217
|
for (const [source2, [, is_derived]] of batch.current) {
|
|
1143
1218
|
if (is_derived)
|
|
1144
1219
|
continue;
|
|
1145
|
-
|
|
1146
|
-
|
|
1220
|
+
if (this.current.has(source2)) {
|
|
1221
|
+
intersects = true;
|
|
1222
|
+
break;
|
|
1223
|
+
}
|
|
1147
1224
|
}
|
|
1148
1225
|
}
|
|
1149
|
-
if (intersects
|
|
1150
|
-
this.#blockers.add(batch);
|
|
1151
|
-
} else {
|
|
1226
|
+
if (!intersects) {
|
|
1152
1227
|
for (const [source2, previous] of batch.previous) {
|
|
1153
1228
|
if (!batch_values.has(source2)) {
|
|
1154
1229
|
batch_values.set(source2, previous);
|
|
@@ -1183,6 +1258,23 @@ class Batch {
|
|
|
1183
1258
|
}
|
|
1184
1259
|
this.#roots.push(e);
|
|
1185
1260
|
}
|
|
1261
|
+
#unlink() {
|
|
1262
|
+
if (!this.linked)
|
|
1263
|
+
return;
|
|
1264
|
+
var prev = this.#prev;
|
|
1265
|
+
var next2 = this.#next;
|
|
1266
|
+
if (prev === null) {
|
|
1267
|
+
first_batch = next2;
|
|
1268
|
+
} else {
|
|
1269
|
+
prev.#next = next2;
|
|
1270
|
+
}
|
|
1271
|
+
if (next2 === null) {
|
|
1272
|
+
last_batch = prev;
|
|
1273
|
+
} else {
|
|
1274
|
+
next2.#prev = prev;
|
|
1275
|
+
}
|
|
1276
|
+
this.linked = false;
|
|
1277
|
+
}
|
|
1186
1278
|
}
|
|
1187
1279
|
function flushSync(fn) {
|
|
1188
1280
|
var was_flushing_sync = is_flushing_sync;
|
|
@@ -1312,6 +1404,7 @@ function depends_on(reaction, sources, checked) {
|
|
|
1312
1404
|
function schedule_effect(effect) {
|
|
1313
1405
|
current_batch.schedule(effect);
|
|
1314
1406
|
}
|
|
1407
|
+
var version_map = new Map;
|
|
1315
1408
|
function reset_branch(effect, tracked) {
|
|
1316
1409
|
if ((effect.f & BRANCH_EFFECT) !== 0 && (effect.f & CLEAN) !== 0) {
|
|
1317
1410
|
return;
|
|
@@ -1337,7 +1430,7 @@ function reset_all(effect) {
|
|
|
1337
1430
|
}
|
|
1338
1431
|
}
|
|
1339
1432
|
|
|
1340
|
-
// ../../node_modules/.bun/svelte@5.
|
|
1433
|
+
// ../../node_modules/.bun/svelte@5.56.0/node_modules/svelte/src/reactivity/create-subscriber.js
|
|
1341
1434
|
function createSubscriber(start) {
|
|
1342
1435
|
let subscribers = 0;
|
|
1343
1436
|
let version = source(0);
|
|
@@ -1368,7 +1461,7 @@ function createSubscriber(start) {
|
|
|
1368
1461
|
};
|
|
1369
1462
|
}
|
|
1370
1463
|
|
|
1371
|
-
// ../../node_modules/.bun/svelte@5.
|
|
1464
|
+
// ../../node_modules/.bun/svelte@5.56.0/node_modules/svelte/src/internal/client/dom/blocks/boundary.js
|
|
1372
1465
|
var flags = EFFECT_TRANSPARENT | EFFECT_PRESERVED;
|
|
1373
1466
|
function boundary(node, props, children, transform_error) {
|
|
1374
1467
|
new Boundary(node, props, children, transform_error);
|
|
@@ -1574,7 +1667,7 @@ class Boundary {
|
|
|
1574
1667
|
current_batch.skip_effect(this.#pending_effect);
|
|
1575
1668
|
if (this.#failed_effect)
|
|
1576
1669
|
current_batch.skip_effect(this.#failed_effect);
|
|
1577
|
-
current_batch.
|
|
1670
|
+
current_batch.oncommit(() => {
|
|
1578
1671
|
this.#handle_error(error);
|
|
1579
1672
|
});
|
|
1580
1673
|
} else {
|
|
@@ -1662,7 +1755,7 @@ class Boundary {
|
|
|
1662
1755
|
}
|
|
1663
1756
|
}
|
|
1664
1757
|
|
|
1665
|
-
// ../../node_modules/.bun/svelte@5.
|
|
1758
|
+
// ../../node_modules/.bun/svelte@5.56.0/node_modules/svelte/src/internal/client/reactivity/async.js
|
|
1666
1759
|
function flatten(blockers, sync, async, fn) {
|
|
1667
1760
|
const d = is_runes() ? derived : derived_safe_equal;
|
|
1668
1761
|
var pending = blockers.filter((b) => !b.settled);
|
|
@@ -1674,23 +1767,24 @@ function flatten(blockers, sync, async, fn) {
|
|
|
1674
1767
|
var restore = capture();
|
|
1675
1768
|
var blocker_promise = pending.length === 1 ? pending[0].promise : pending.length > 1 ? Promise.all(pending.map((b) => b.promise)) : null;
|
|
1676
1769
|
function finish(values) {
|
|
1770
|
+
if ((parent.f & DESTROYED) !== 0) {
|
|
1771
|
+
return;
|
|
1772
|
+
}
|
|
1677
1773
|
restore();
|
|
1678
1774
|
try {
|
|
1679
1775
|
fn(values);
|
|
1680
1776
|
} catch (error) {
|
|
1681
|
-
|
|
1682
|
-
invoke_error_boundary(error, parent);
|
|
1683
|
-
}
|
|
1777
|
+
invoke_error_boundary(error, parent);
|
|
1684
1778
|
}
|
|
1685
1779
|
unset_context();
|
|
1686
1780
|
}
|
|
1781
|
+
var decrement_pending = increment_pending();
|
|
1687
1782
|
if (async.length === 0) {
|
|
1688
|
-
blocker_promise.then(() => finish(sync.map(d)));
|
|
1783
|
+
blocker_promise.then(() => finish(sync.map(d))).finally(decrement_pending);
|
|
1689
1784
|
return;
|
|
1690
1785
|
}
|
|
1691
|
-
var decrement_pending = increment_pending();
|
|
1692
1786
|
function run() {
|
|
1693
|
-
Promise.all(async.map((expression) => async_derived(expression))).then((result) => finish([...sync.map(d), ...result])).catch((error) => invoke_error_boundary(error, parent)).finally(
|
|
1787
|
+
Promise.all(async.map((expression) => async_derived(expression))).then((result) => finish([...sync.map(d), ...result])).catch((error) => invoke_error_boundary(error, parent)).finally(decrement_pending);
|
|
1694
1788
|
}
|
|
1695
1789
|
if (blocker_promise) {
|
|
1696
1790
|
blocker_promise.then(() => {
|
|
@@ -1739,16 +1833,16 @@ function increment_pending() {
|
|
|
1739
1833
|
var effect = active_effect;
|
|
1740
1834
|
var boundary2 = effect.b;
|
|
1741
1835
|
var batch = current_batch;
|
|
1742
|
-
var blocking = boundary2
|
|
1743
|
-
boundary2
|
|
1836
|
+
var blocking = !!boundary2?.is_rendered();
|
|
1837
|
+
boundary2?.update_pending_count(1, batch);
|
|
1744
1838
|
batch.increment(blocking, effect);
|
|
1745
|
-
return (
|
|
1746
|
-
boundary2
|
|
1747
|
-
batch.decrement(blocking, effect
|
|
1839
|
+
return () => {
|
|
1840
|
+
boundary2?.update_pending_count(-1, batch);
|
|
1841
|
+
batch.decrement(blocking, effect);
|
|
1748
1842
|
};
|
|
1749
1843
|
}
|
|
1750
1844
|
|
|
1751
|
-
// ../../node_modules/.bun/svelte@5.
|
|
1845
|
+
// ../../node_modules/.bun/svelte@5.56.0/node_modules/svelte/src/internal/client/reactivity/deriveds.js
|
|
1752
1846
|
var reactivity_loss_tracker = null;
|
|
1753
1847
|
function set_reactivity_loss_tracker(v) {
|
|
1754
1848
|
reactivity_loss_tracker = v;
|
|
@@ -1778,6 +1872,7 @@ function derived(fn) {
|
|
|
1778
1872
|
}
|
|
1779
1873
|
return signal;
|
|
1780
1874
|
}
|
|
1875
|
+
var OBSOLETE = Symbol("obsolete");
|
|
1781
1876
|
function async_derived(fn, label, location) {
|
|
1782
1877
|
let parent = active_effect;
|
|
1783
1878
|
if (parent === null) {
|
|
@@ -1786,9 +1881,9 @@ function async_derived(fn, label, location) {
|
|
|
1786
1881
|
var promise = undefined;
|
|
1787
1882
|
var signal = source(UNINITIALIZED);
|
|
1788
1883
|
if (true_default)
|
|
1789
|
-
signal.label = label;
|
|
1884
|
+
signal.label = label ?? fn.toString();
|
|
1790
1885
|
var should_suspend = !active_reaction;
|
|
1791
|
-
var deferreds = new
|
|
1886
|
+
var deferreds = new Set;
|
|
1792
1887
|
async_effect(() => {
|
|
1793
1888
|
var effect = active_effect;
|
|
1794
1889
|
if (true_default) {
|
|
@@ -1797,7 +1892,10 @@ function async_derived(fn, label, location) {
|
|
|
1797
1892
|
var d = deferred();
|
|
1798
1893
|
promise = d.promise;
|
|
1799
1894
|
try {
|
|
1800
|
-
Promise.resolve(fn()).then(d.resolve,
|
|
1895
|
+
Promise.resolve(fn()).then(d.resolve, (e) => {
|
|
1896
|
+
if (e !== STALE_REACTION)
|
|
1897
|
+
d.reject(e);
|
|
1898
|
+
}).finally(unset_context);
|
|
1801
1899
|
} catch (error) {
|
|
1802
1900
|
d.reject(error);
|
|
1803
1901
|
unset_context();
|
|
@@ -1822,28 +1920,24 @@ function async_derived(fn, label, location) {
|
|
|
1822
1920
|
if ((effect.f & REACTION_RAN) !== 0) {
|
|
1823
1921
|
var decrement_pending = increment_pending();
|
|
1824
1922
|
}
|
|
1825
|
-
if (parent.b
|
|
1826
|
-
|
|
1827
|
-
deferreds.delete(batch);
|
|
1923
|
+
if (parent.b?.is_rendered()) {
|
|
1924
|
+
batch.async_deriveds.get(effect)?.reject(OBSOLETE);
|
|
1828
1925
|
} else {
|
|
1829
1926
|
for (const d2 of deferreds.values()) {
|
|
1830
|
-
d2.reject(
|
|
1927
|
+
d2.reject(OBSOLETE);
|
|
1831
1928
|
}
|
|
1832
|
-
deferreds.clear();
|
|
1833
1929
|
}
|
|
1834
|
-
deferreds.
|
|
1930
|
+
deferreds.add(d);
|
|
1931
|
+
batch.async_deriveds.set(effect, d);
|
|
1835
1932
|
}
|
|
1836
1933
|
const handler = (value, error = undefined) => {
|
|
1837
1934
|
if (true_default) {
|
|
1838
1935
|
reactivity_loss_tracker = null;
|
|
1839
1936
|
}
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
}
|
|
1844
|
-
if (error === STALE_REACTION || (effect.f & DESTROYED) !== 0) {
|
|
1937
|
+
decrement_pending?.();
|
|
1938
|
+
deferreds.delete(d);
|
|
1939
|
+
if (error === OBSOLETE)
|
|
1845
1940
|
return;
|
|
1846
|
-
}
|
|
1847
1941
|
batch.activate();
|
|
1848
1942
|
if (error) {
|
|
1849
1943
|
signal.f |= ERROR_VALUE;
|
|
@@ -1852,30 +1946,24 @@ function async_derived(fn, label, location) {
|
|
|
1852
1946
|
if ((signal.f & ERROR_VALUE) !== 0) {
|
|
1853
1947
|
signal.f ^= ERROR_VALUE;
|
|
1854
1948
|
}
|
|
1855
|
-
|
|
1856
|
-
for (const [b, d2] of deferreds) {
|
|
1857
|
-
deferreds.delete(b);
|
|
1858
|
-
if (b === batch)
|
|
1859
|
-
break;
|
|
1860
|
-
d2.reject(STALE_REACTION);
|
|
1861
|
-
}
|
|
1862
|
-
if (true_default && location !== undefined) {
|
|
1949
|
+
if (true_default && location !== undefined && !signal.equals(value)) {
|
|
1863
1950
|
recent_async_deriveds.add(signal);
|
|
1864
1951
|
setTimeout(() => {
|
|
1865
|
-
if (recent_async_deriveds.has(signal)) {
|
|
1952
|
+
if (recent_async_deriveds.has(signal) && (effect.f & DESTROYED) === 0) {
|
|
1866
1953
|
await_waterfall(signal.label, location);
|
|
1867
1954
|
recent_async_deriveds.delete(signal);
|
|
1868
1955
|
}
|
|
1869
1956
|
});
|
|
1870
1957
|
}
|
|
1958
|
+
internal_set(signal, value);
|
|
1871
1959
|
}
|
|
1872
1960
|
batch.deactivate();
|
|
1873
1961
|
};
|
|
1874
1962
|
d.promise.then(handler, (e) => handler(null, e || "unknown"));
|
|
1875
1963
|
});
|
|
1876
1964
|
teardown(() => {
|
|
1877
|
-
for (const d of deferreds
|
|
1878
|
-
d.reject(
|
|
1965
|
+
for (const d of deferreds) {
|
|
1966
|
+
d.reject(OBSOLETE);
|
|
1879
1967
|
}
|
|
1880
1968
|
});
|
|
1881
1969
|
if (true_default) {
|
|
@@ -1920,7 +2008,7 @@ function execute_derived(derived2) {
|
|
|
1920
2008
|
var value;
|
|
1921
2009
|
var prev_active_effect = active_effect;
|
|
1922
2010
|
var parent = derived2.parent;
|
|
1923
|
-
if (!is_destroying_effect && parent !== null && (parent.f & (DESTROYED | INERT)) !== 0) {
|
|
2011
|
+
if (!is_destroying_effect && parent !== null && derived2.v !== UNINITIALIZED && (parent.f & (DESTROYED | INERT)) !== 0) {
|
|
1924
2012
|
derived_inert();
|
|
1925
2013
|
return derived2.v;
|
|
1926
2014
|
}
|
|
@@ -1959,6 +2047,7 @@ function update_derived(derived2) {
|
|
|
1959
2047
|
if (!current_batch?.is_fork || derived2.deps === null) {
|
|
1960
2048
|
if (current_batch !== null) {
|
|
1961
2049
|
current_batch.capture(derived2, value, true);
|
|
2050
|
+
previous_batch?.capture(derived2, value, true);
|
|
1962
2051
|
} else {
|
|
1963
2052
|
derived2.v = value;
|
|
1964
2053
|
}
|
|
@@ -1986,7 +2075,8 @@ function freeze_derived_effects(derived2) {
|
|
|
1986
2075
|
if (e.teardown || e.ac) {
|
|
1987
2076
|
e.teardown?.();
|
|
1988
2077
|
e.ac?.abort(STALE_REACTION);
|
|
1989
|
-
e.
|
|
2078
|
+
if (e.fn !== null)
|
|
2079
|
+
e.teardown = noop;
|
|
1990
2080
|
e.ac = null;
|
|
1991
2081
|
remove_reactions(e, 0);
|
|
1992
2082
|
destroy_effect_children(e);
|
|
@@ -1997,13 +2087,13 @@ function unfreeze_derived_effects(derived2) {
|
|
|
1997
2087
|
if (derived2.effects === null)
|
|
1998
2088
|
return;
|
|
1999
2089
|
for (const e of derived2.effects) {
|
|
2000
|
-
if (e.teardown) {
|
|
2090
|
+
if (e.teardown && e.fn !== null) {
|
|
2001
2091
|
update_effect(e);
|
|
2002
2092
|
}
|
|
2003
2093
|
}
|
|
2004
2094
|
}
|
|
2005
2095
|
|
|
2006
|
-
// ../../node_modules/.bun/svelte@5.
|
|
2096
|
+
// ../../node_modules/.bun/svelte@5.56.0/node_modules/svelte/src/internal/client/reactivity/sources.js
|
|
2007
2097
|
var eager_effects = new Set;
|
|
2008
2098
|
var old_values = new Map;
|
|
2009
2099
|
function set_eager_effects(v) {
|
|
@@ -2046,7 +2136,7 @@ function mutable_source(initial_value, immutable = false, trackable = true) {
|
|
|
2046
2136
|
return s;
|
|
2047
2137
|
}
|
|
2048
2138
|
function set(source2, value, should_proxy = false) {
|
|
2049
|
-
if (active_reaction !== null && (!untracking || (active_reaction.f & EAGER_EFFECT) !== 0) && is_runes() && (active_reaction.f & (DERIVED | BLOCK_EFFECT | ASYNC | EAGER_EFFECT)) !== 0 && (current_sources === null || !
|
|
2139
|
+
if (active_reaction !== null && (!untracking || (active_reaction.f & EAGER_EFFECT) !== 0) && is_runes() && (active_reaction.f & (DERIVED | BLOCK_EFFECT | ASYNC | EAGER_EFFECT)) !== 0 && (current_sources === null || !current_sources.has(source2))) {
|
|
2050
2140
|
state_unsafe_mutation();
|
|
2051
2141
|
}
|
|
2052
2142
|
let new_value = should_proxy ? proxy(value) : value;
|
|
@@ -2111,7 +2201,13 @@ function flush_eager_effects() {
|
|
|
2111
2201
|
if ((effect.f & CLEAN) !== 0) {
|
|
2112
2202
|
set_signal_status(effect, MAYBE_DIRTY);
|
|
2113
2203
|
}
|
|
2114
|
-
|
|
2204
|
+
let dirty;
|
|
2205
|
+
try {
|
|
2206
|
+
dirty = is_dirty(effect);
|
|
2207
|
+
} catch {
|
|
2208
|
+
dirty = true;
|
|
2209
|
+
}
|
|
2210
|
+
if (dirty) {
|
|
2115
2211
|
update_effect(effect);
|
|
2116
2212
|
}
|
|
2117
2213
|
}
|
|
@@ -2131,19 +2227,17 @@ function mark_reactions(signal, status, updated_during_traversal) {
|
|
|
2131
2227
|
var flags2 = reaction.f;
|
|
2132
2228
|
if (!runes && reaction === active_effect)
|
|
2133
2229
|
continue;
|
|
2134
|
-
if (true_default && (flags2 & EAGER_EFFECT) !== 0) {
|
|
2135
|
-
eager_effects.add(reaction);
|
|
2136
|
-
continue;
|
|
2137
|
-
}
|
|
2138
2230
|
var not_dirty = (flags2 & DIRTY) === 0;
|
|
2139
2231
|
if (not_dirty) {
|
|
2140
2232
|
set_signal_status(reaction, status);
|
|
2141
2233
|
}
|
|
2142
|
-
if ((flags2 &
|
|
2234
|
+
if ((flags2 & EAGER_EFFECT) !== 0) {
|
|
2235
|
+
eager_effects.add(reaction);
|
|
2236
|
+
} else if ((flags2 & DERIVED) !== 0) {
|
|
2143
2237
|
var derived2 = reaction;
|
|
2144
2238
|
batch_values?.delete(derived2);
|
|
2145
2239
|
if ((flags2 & WAS_MARKED) === 0) {
|
|
2146
|
-
if (flags2 & CONNECTED) {
|
|
2240
|
+
if (flags2 & CONNECTED && (active_effect === null || (active_effect.f & REACTION_IS_UPDATING) === 0)) {
|
|
2147
2241
|
reaction.f |= WAS_MARKED;
|
|
2148
2242
|
}
|
|
2149
2243
|
mark_reactions(derived2, MAYBE_DIRTY, updated_during_traversal);
|
|
@@ -2162,7 +2256,7 @@ function mark_reactions(signal, status, updated_during_traversal) {
|
|
|
2162
2256
|
}
|
|
2163
2257
|
}
|
|
2164
2258
|
|
|
2165
|
-
// ../../node_modules/.bun/svelte@5.
|
|
2259
|
+
// ../../node_modules/.bun/svelte@5.56.0/node_modules/svelte/src/internal/client/proxy.js
|
|
2166
2260
|
var regex_is_valid_identifier = /^[a-zA-Z_$][a-zA-Z_$0-9]*$/;
|
|
2167
2261
|
function proxy(value) {
|
|
2168
2262
|
if (typeof value !== "object" || value === null || STATE_SYMBOL in value) {
|
|
@@ -2425,7 +2519,7 @@ function inspectable_array(array) {
|
|
|
2425
2519
|
});
|
|
2426
2520
|
}
|
|
2427
2521
|
|
|
2428
|
-
// ../../node_modules/.bun/svelte@5.
|
|
2522
|
+
// ../../node_modules/.bun/svelte@5.56.0/node_modules/svelte/src/internal/client/dev/equality.js
|
|
2429
2523
|
function init_array_prototype_warnings() {
|
|
2430
2524
|
const array_prototype2 = Array.prototype;
|
|
2431
2525
|
const cleanup = Array.__svelte_cleanup;
|
|
@@ -2476,7 +2570,7 @@ function init_array_prototype_warnings() {
|
|
|
2476
2570
|
};
|
|
2477
2571
|
}
|
|
2478
2572
|
|
|
2479
|
-
// ../../node_modules/.bun/svelte@5.
|
|
2573
|
+
// ../../node_modules/.bun/svelte@5.56.0/node_modules/svelte/src/internal/client/dom/operations.js
|
|
2480
2574
|
var $window;
|
|
2481
2575
|
var $document;
|
|
2482
2576
|
var is_firefox;
|
|
@@ -2495,14 +2589,13 @@ function init_operations() {
|
|
|
2495
2589
|
first_child_getter = get_descriptor(node_prototype, "firstChild").get;
|
|
2496
2590
|
next_sibling_getter = get_descriptor(node_prototype, "nextSibling").get;
|
|
2497
2591
|
if (is_extensible(element_prototype)) {
|
|
2498
|
-
element_prototype
|
|
2499
|
-
element_prototype
|
|
2500
|
-
element_prototype
|
|
2501
|
-
element_prototype.__style = undefined;
|
|
2592
|
+
element_prototype[CLASS_CACHE] = undefined;
|
|
2593
|
+
element_prototype[ATTRIBUTES_CACHE] = null;
|
|
2594
|
+
element_prototype[STYLE_CACHE] = undefined;
|
|
2502
2595
|
element_prototype.__e = undefined;
|
|
2503
2596
|
}
|
|
2504
2597
|
if (is_extensible(text_prototype)) {
|
|
2505
|
-
text_prototype
|
|
2598
|
+
text_prototype[TEXT_CACHE] = undefined;
|
|
2506
2599
|
}
|
|
2507
2600
|
if (true_default) {
|
|
2508
2601
|
element_prototype.__svelte_meta = null;
|
|
@@ -2593,8 +2686,10 @@ function should_defer_append() {
|
|
|
2593
2686
|
return (flags2 & REACTION_RAN) !== 0;
|
|
2594
2687
|
}
|
|
2595
2688
|
function create_element(tag2, namespace, is) {
|
|
2596
|
-
|
|
2597
|
-
|
|
2689
|
+
if (namespace == null || namespace === NAMESPACE_HTML) {
|
|
2690
|
+
return is ? document.createElement(tag2, { is }) : document.createElement(tag2);
|
|
2691
|
+
}
|
|
2692
|
+
return is ? document.createElementNS(namespace, tag2, { is }) : document.createElementNS(namespace, tag2);
|
|
2598
2693
|
}
|
|
2599
2694
|
function merge_text_nodes(text) {
|
|
2600
2695
|
if (text.nodeValue.length < 65536) {
|
|
@@ -2608,7 +2703,7 @@ function merge_text_nodes(text) {
|
|
|
2608
2703
|
}
|
|
2609
2704
|
}
|
|
2610
2705
|
|
|
2611
|
-
// ../../node_modules/.bun/svelte@5.
|
|
2706
|
+
// ../../node_modules/.bun/svelte@5.56.0/node_modules/svelte/src/internal/client/dom/elements/bindings/shared.js
|
|
2612
2707
|
function without_reactive_context(fn) {
|
|
2613
2708
|
var previous_reaction = active_reaction;
|
|
2614
2709
|
var previous_effect = active_effect;
|
|
@@ -2622,7 +2717,7 @@ function without_reactive_context(fn) {
|
|
|
2622
2717
|
}
|
|
2623
2718
|
}
|
|
2624
2719
|
|
|
2625
|
-
// ../../node_modules/.bun/svelte@5.
|
|
2720
|
+
// ../../node_modules/.bun/svelte@5.56.0/node_modules/svelte/src/internal/client/reactivity/effects.js
|
|
2626
2721
|
function validate_effect(rune) {
|
|
2627
2722
|
if (active_effect === null) {
|
|
2628
2723
|
if (active_reaction === null) {
|
|
@@ -2724,7 +2819,7 @@ function user_effect(fn) {
|
|
|
2724
2819
|
});
|
|
2725
2820
|
}
|
|
2726
2821
|
var flags2 = active_effect.f;
|
|
2727
|
-
var defer = !active_reaction && (flags2 & BRANCH_EFFECT) !== 0 &&
|
|
2822
|
+
var defer = !active_reaction && (flags2 & BRANCH_EFFECT) !== 0 && component_context !== null && !component_context.i;
|
|
2728
2823
|
if (defer) {
|
|
2729
2824
|
var context = component_context;
|
|
2730
2825
|
(context.e ??= []).push(fn);
|
|
@@ -2956,10 +3051,10 @@ function move_effect(effect2, fragment) {
|
|
|
2956
3051
|
}
|
|
2957
3052
|
}
|
|
2958
3053
|
|
|
2959
|
-
// ../../node_modules/.bun/svelte@5.
|
|
3054
|
+
// ../../node_modules/.bun/svelte@5.56.0/node_modules/svelte/src/internal/client/legacy.js
|
|
2960
3055
|
var captured_signals = null;
|
|
2961
3056
|
|
|
2962
|
-
// ../../node_modules/.bun/svelte@5.
|
|
3057
|
+
// ../../node_modules/.bun/svelte@5.56.0/node_modules/svelte/src/internal/client/runtime.js
|
|
2963
3058
|
var is_updating_effect = false;
|
|
2964
3059
|
var is_destroying_effect = false;
|
|
2965
3060
|
function set_is_destroying_effect(value) {
|
|
@@ -2977,11 +3072,7 @@ function set_active_effect(effect2) {
|
|
|
2977
3072
|
var current_sources = null;
|
|
2978
3073
|
function push_reaction_value(value) {
|
|
2979
3074
|
if (active_reaction !== null && (!async_mode_flag || (active_reaction.f & DERIVED) !== 0)) {
|
|
2980
|
-
|
|
2981
|
-
current_sources = [value];
|
|
2982
|
-
} else {
|
|
2983
|
-
current_sources.push(value);
|
|
2984
|
-
}
|
|
3075
|
+
(current_sources ??= new Set).add(value);
|
|
2985
3076
|
}
|
|
2986
3077
|
}
|
|
2987
3078
|
var new_deps = null;
|
|
@@ -3029,7 +3120,7 @@ function schedule_possible_effect_self_invalidation(signal, effect2, root = true
|
|
|
3029
3120
|
var reactions = signal.reactions;
|
|
3030
3121
|
if (reactions === null)
|
|
3031
3122
|
return;
|
|
3032
|
-
if (!async_mode_flag && current_sources !== null &&
|
|
3123
|
+
if (!async_mode_flag && current_sources !== null && current_sources.has(signal)) {
|
|
3033
3124
|
return;
|
|
3034
3125
|
}
|
|
3035
3126
|
for (var i = 0;i < reactions.length; i++) {
|
|
@@ -3226,7 +3317,7 @@ function get2(signal) {
|
|
|
3226
3317
|
captured_signals?.add(signal);
|
|
3227
3318
|
if (active_reaction !== null && !untracking) {
|
|
3228
3319
|
var destroyed = active_effect !== null && (active_effect.f & DESTROYED) !== 0;
|
|
3229
|
-
if (!destroyed && (current_sources === null || !
|
|
3320
|
+
if (!destroyed && (current_sources === null || !current_sources.has(signal))) {
|
|
3230
3321
|
var deps = active_reaction.deps;
|
|
3231
3322
|
if ((active_reaction.f & REACTION_IS_UPDATING) !== 0) {
|
|
3232
3323
|
if (signal.rv < read_version) {
|
|
@@ -3240,7 +3331,10 @@ function get2(signal) {
|
|
|
3240
3331
|
}
|
|
3241
3332
|
}
|
|
3242
3333
|
} else {
|
|
3243
|
-
|
|
3334
|
+
active_reaction.deps ??= [];
|
|
3335
|
+
if (!includes.call(active_reaction.deps, signal)) {
|
|
3336
|
+
active_reaction.deps.push(signal);
|
|
3337
|
+
}
|
|
3244
3338
|
var reactions = signal.reactions;
|
|
3245
3339
|
if (reactions === null) {
|
|
3246
3340
|
signal.reactions = [active_reaction];
|
|
@@ -3388,7 +3482,7 @@ function deep_read(value, visited = new Set) {
|
|
|
3388
3482
|
}
|
|
3389
3483
|
}
|
|
3390
3484
|
}
|
|
3391
|
-
// ../../node_modules/.bun/svelte@5.
|
|
3485
|
+
// ../../node_modules/.bun/svelte@5.56.0/node_modules/svelte/src/internal/client/dom/elements/events.js
|
|
3392
3486
|
var event_symbol = Symbol("events");
|
|
3393
3487
|
var all_registered_events = new Set;
|
|
3394
3488
|
var root_event_handles = new Set;
|
|
@@ -3444,7 +3538,8 @@ function handle_event_propagation(event) {
|
|
|
3444
3538
|
var throw_error;
|
|
3445
3539
|
var other_errors = [];
|
|
3446
3540
|
while (current_target !== null) {
|
|
3447
|
-
|
|
3541
|
+
if (current_target === handler_element)
|
|
3542
|
+
break;
|
|
3448
3543
|
try {
|
|
3449
3544
|
var delegated2 = current_target[event_symbol]?.[event_name];
|
|
3450
3545
|
if (delegated2 != null && (!current_target.disabled || event.target === current_target)) {
|
|
@@ -3457,10 +3552,10 @@ function handle_event_propagation(event) {
|
|
|
3457
3552
|
throw_error = error;
|
|
3458
3553
|
}
|
|
3459
3554
|
}
|
|
3460
|
-
if (event.cancelBubble
|
|
3555
|
+
if (event.cancelBubble)
|
|
3461
3556
|
break;
|
|
3462
|
-
|
|
3463
|
-
current_target =
|
|
3557
|
+
path_idx++;
|
|
3558
|
+
current_target = path_idx < path.length ? path[path_idx] : null;
|
|
3464
3559
|
}
|
|
3465
3560
|
if (throw_error) {
|
|
3466
3561
|
for (let error of other_errors) {
|
|
@@ -3478,7 +3573,7 @@ function handle_event_propagation(event) {
|
|
|
3478
3573
|
}
|
|
3479
3574
|
}
|
|
3480
3575
|
|
|
3481
|
-
// ../../node_modules/.bun/svelte@5.
|
|
3576
|
+
// ../../node_modules/.bun/svelte@5.56.0/node_modules/svelte/src/internal/client/dom/reconciler.js
|
|
3482
3577
|
var policy = globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", {
|
|
3483
3578
|
createHTML: (html) => {
|
|
3484
3579
|
return html;
|
|
@@ -3493,7 +3588,7 @@ function create_fragment_from_html(html) {
|
|
|
3493
3588
|
return elem.content;
|
|
3494
3589
|
}
|
|
3495
3590
|
|
|
3496
|
-
// ../../node_modules/.bun/svelte@5.
|
|
3591
|
+
// ../../node_modules/.bun/svelte@5.56.0/node_modules/svelte/src/internal/client/dom/template.js
|
|
3497
3592
|
function assign_nodes(start, end) {
|
|
3498
3593
|
var effect2 = active_effect;
|
|
3499
3594
|
if (effect2.nodes === null) {
|
|
@@ -3553,7 +3648,7 @@ function append(anchor, dom) {
|
|
|
3553
3648
|
anchor.before(dom);
|
|
3554
3649
|
}
|
|
3555
3650
|
|
|
3556
|
-
// ../../node_modules/.bun/svelte@5.
|
|
3651
|
+
// ../../node_modules/.bun/svelte@5.56.0/node_modules/svelte/src/utils.js
|
|
3557
3652
|
var regex_return_characters = /\r/g;
|
|
3558
3653
|
function hash(str) {
|
|
3559
3654
|
str = str.replace(regex_return_characters, "");
|
|
@@ -3641,7 +3736,7 @@ function sanitize_location(location) {
|
|
|
3641
3736
|
return location?.replace(/\//g, "/");
|
|
3642
3737
|
}
|
|
3643
3738
|
|
|
3644
|
-
// ../../node_modules/.bun/svelte@5.
|
|
3739
|
+
// ../../node_modules/.bun/svelte@5.56.0/node_modules/svelte/src/internal/client/render.js
|
|
3645
3740
|
var should_intro = true;
|
|
3646
3741
|
function mount(component, options) {
|
|
3647
3742
|
return _mount(component, options);
|
|
@@ -3783,7 +3878,7 @@ function unmount(component, options) {
|
|
|
3783
3878
|
}
|
|
3784
3879
|
return Promise.resolve();
|
|
3785
3880
|
}
|
|
3786
|
-
// ../../node_modules/.bun/svelte@5.
|
|
3881
|
+
// ../../node_modules/.bun/svelte@5.56.0/node_modules/svelte/src/internal/client/dom/blocks/branches.js
|
|
3787
3882
|
class BranchManager {
|
|
3788
3883
|
anchor;
|
|
3789
3884
|
#batches = new Map;
|
|
@@ -3806,6 +3901,7 @@ class BranchManager {
|
|
|
3806
3901
|
} else {
|
|
3807
3902
|
var offscreen = this.#offscreen.get(key);
|
|
3808
3903
|
if (offscreen) {
|
|
3904
|
+
resume_effect(offscreen.effect);
|
|
3809
3905
|
this.#onscreen.set(key, offscreen.effect);
|
|
3810
3906
|
this.#offscreen.delete(key);
|
|
3811
3907
|
if (true_default) {
|
|
@@ -3904,7 +4000,7 @@ class BranchManager {
|
|
|
3904
4000
|
}
|
|
3905
4001
|
}
|
|
3906
4002
|
|
|
3907
|
-
// ../../node_modules/.bun/svelte@5.
|
|
4003
|
+
// ../../node_modules/.bun/svelte@5.56.0/node_modules/svelte/src/index-client.js
|
|
3908
4004
|
if (true_default) {
|
|
3909
4005
|
let throw_rune_error = function(rune) {
|
|
3910
4006
|
if (!(rune in globalThis)) {
|
|
@@ -3930,7 +4026,7 @@ if (true_default) {
|
|
|
3930
4026
|
throw_rune_error("$props");
|
|
3931
4027
|
throw_rune_error("$bindable");
|
|
3932
4028
|
}
|
|
3933
|
-
// ../../node_modules/.bun/svelte@5.
|
|
4029
|
+
// ../../node_modules/.bun/svelte@5.56.0/node_modules/svelte/src/internal/client/dev/css.js
|
|
3934
4030
|
var all_styles = new Map;
|
|
3935
4031
|
function register_style(hash2, style) {
|
|
3936
4032
|
var styles = all_styles.get(hash2);
|
|
@@ -3940,7 +4036,7 @@ function register_style(hash2, style) {
|
|
|
3940
4036
|
}
|
|
3941
4037
|
styles.add(style);
|
|
3942
4038
|
}
|
|
3943
|
-
// ../../node_modules/.bun/svelte@5.
|
|
4039
|
+
// ../../node_modules/.bun/svelte@5.56.0/node_modules/svelte/src/internal/client/dom/blocks/if.js
|
|
3944
4040
|
function if_block(node, fn, elseif = false) {
|
|
3945
4041
|
var marker;
|
|
3946
4042
|
if (hydrating) {
|
|
@@ -3975,9 +4071,9 @@ function if_block(node, fn, elseif = false) {
|
|
|
3975
4071
|
}
|
|
3976
4072
|
}, flags2);
|
|
3977
4073
|
}
|
|
3978
|
-
// ../../node_modules/.bun/svelte@5.
|
|
4074
|
+
// ../../node_modules/.bun/svelte@5.56.0/node_modules/svelte/src/internal/client/dom/blocks/key.js
|
|
3979
4075
|
var NAN = Symbol("NaN");
|
|
3980
|
-
// ../../node_modules/.bun/svelte@5.
|
|
4076
|
+
// ../../node_modules/.bun/svelte@5.56.0/node_modules/svelte/src/internal/client/dom/blocks/each.js
|
|
3981
4077
|
function pause_effects(state2, to_destroy, controlled_anchor) {
|
|
3982
4078
|
var transitions = [];
|
|
3983
4079
|
var length = to_destroy.length;
|
|
@@ -4412,7 +4508,7 @@ function validate_each_keys(array, key_fn) {
|
|
|
4412
4508
|
keys.set(key, i);
|
|
4413
4509
|
}
|
|
4414
4510
|
}
|
|
4415
|
-
// ../../node_modules/.bun/svelte@5.
|
|
4511
|
+
// ../../node_modules/.bun/svelte@5.56.0/node_modules/svelte/src/internal/client/dom/blocks/html.js
|
|
4416
4512
|
function check_hash(element, server_hash, value) {
|
|
4417
4513
|
if (!server_hash || server_hash === hash(String(value ?? "")))
|
|
4418
4514
|
return;
|
|
@@ -4488,14 +4584,14 @@ function html(node, get_value, is_controlled = false, svg = false, mathml = fals
|
|
|
4488
4584
|
}
|
|
4489
4585
|
});
|
|
4490
4586
|
}
|
|
4491
|
-
// ../../node_modules/.bun/svelte@5.
|
|
4587
|
+
// ../../node_modules/.bun/svelte@5.56.0/node_modules/svelte/src/internal/client/timing.js
|
|
4492
4588
|
var now = true_default ? () => performance.now() : () => Date.now();
|
|
4493
4589
|
var raf = {
|
|
4494
4590
|
tick: (_) => (true_default ? requestAnimationFrame : noop)(_),
|
|
4495
4591
|
now: () => now(),
|
|
4496
4592
|
tasks: new Set
|
|
4497
4593
|
};
|
|
4498
|
-
// ../../node_modules/.bun/svelte@5.
|
|
4594
|
+
// ../../node_modules/.bun/svelte@5.56.0/node_modules/svelte/src/internal/client/dom/css.js
|
|
4499
4595
|
function append_styles(anchor, css) {
|
|
4500
4596
|
effect(() => {
|
|
4501
4597
|
var root = anchor.getRootNode();
|
|
@@ -4511,7 +4607,7 @@ function append_styles(anchor, css) {
|
|
|
4511
4607
|
}
|
|
4512
4608
|
});
|
|
4513
4609
|
}
|
|
4514
|
-
// ../../node_modules/.bun/svelte@5.
|
|
4610
|
+
// ../../node_modules/.bun/svelte@5.56.0/node_modules/svelte/src/internal/client/dom/elements/actions.js
|
|
4515
4611
|
function action(dom, action2, get_value) {
|
|
4516
4612
|
effect(() => {
|
|
4517
4613
|
var payload = untrack(() => action2(dom, get_value?.()) || {});
|
|
@@ -4533,7 +4629,7 @@ function action(dom, action2, get_value) {
|
|
|
4533
4629
|
}
|
|
4534
4630
|
});
|
|
4535
4631
|
}
|
|
4536
|
-
// ../../node_modules/.bun/svelte@5.
|
|
4632
|
+
// ../../node_modules/.bun/svelte@5.56.0/node_modules/svelte/src/internal/shared/attributes.js
|
|
4537
4633
|
var replacements = {
|
|
4538
4634
|
translate: new Map([
|
|
4539
4635
|
[true, "yes"],
|
|
@@ -4568,9 +4664,9 @@ function to_class(value, hash2, directives) {
|
|
|
4568
4664
|
return classname === "" ? null : classname;
|
|
4569
4665
|
}
|
|
4570
4666
|
|
|
4571
|
-
// ../../node_modules/.bun/svelte@5.
|
|
4667
|
+
// ../../node_modules/.bun/svelte@5.56.0/node_modules/svelte/src/internal/client/dom/elements/class.js
|
|
4572
4668
|
function set_class(dom, is_html, value, hash2, prev_classes, next_classes) {
|
|
4573
|
-
var prev = dom
|
|
4669
|
+
var prev = dom[CLASS_CACHE];
|
|
4574
4670
|
if (hydrating || prev !== value || prev === undefined) {
|
|
4575
4671
|
var next_class_name = to_class(value, hash2, next_classes);
|
|
4576
4672
|
if (!hydrating || next_class_name !== dom.getAttribute("class")) {
|
|
@@ -4582,7 +4678,7 @@ function set_class(dom, is_html, value, hash2, prev_classes, next_classes) {
|
|
|
4582
4678
|
dom.setAttribute("class", next_class_name);
|
|
4583
4679
|
}
|
|
4584
4680
|
}
|
|
4585
|
-
dom
|
|
4681
|
+
dom[CLASS_CACHE] = value;
|
|
4586
4682
|
} else if (next_classes && prev_classes !== next_classes) {
|
|
4587
4683
|
for (var key in next_classes) {
|
|
4588
4684
|
var is_present = !!next_classes[key];
|
|
@@ -4594,7 +4690,7 @@ function set_class(dom, is_html, value, hash2, prev_classes, next_classes) {
|
|
|
4594
4690
|
return next_classes;
|
|
4595
4691
|
}
|
|
4596
4692
|
|
|
4597
|
-
// ../../node_modules/.bun/svelte@5.
|
|
4693
|
+
// ../../node_modules/.bun/svelte@5.56.0/node_modules/svelte/src/internal/client/dom/elements/attributes.js
|
|
4598
4694
|
var CLASS = Symbol("class");
|
|
4599
4695
|
var STYLE = Symbol("style");
|
|
4600
4696
|
var IS_CUSTOM_ELEMENT = Symbol("is custom element");
|
|
@@ -4625,7 +4721,7 @@ function set_attribute2(element, attribute, value, skip_warning) {
|
|
|
4625
4721
|
}
|
|
4626
4722
|
}
|
|
4627
4723
|
function get_attributes(element) {
|
|
4628
|
-
return element
|
|
4724
|
+
return element[ATTRIBUTES_CACHE] ??= {
|
|
4629
4725
|
[IS_CUSTOM_ELEMENT]: element.nodeName.includes("-"),
|
|
4630
4726
|
[IS_HTML]: element.namespaceURI === NAMESPACE_HTML
|
|
4631
4727
|
};
|
|
@@ -4643,7 +4739,7 @@ function get_setters(element) {
|
|
|
4643
4739
|
while (element_proto !== proto) {
|
|
4644
4740
|
descriptors = get_descriptors(proto);
|
|
4645
4741
|
for (var key in descriptors) {
|
|
4646
|
-
if (descriptors[key].set) {
|
|
4742
|
+
if (descriptors[key].set && key !== "innerHTML" && key !== "textContent" && key !== "innerText") {
|
|
4647
4743
|
setters.push(key);
|
|
4648
4744
|
}
|
|
4649
4745
|
}
|
|
@@ -4673,9 +4769,9 @@ function srcset_url_equal(element, srcset) {
|
|
|
4673
4769
|
var urls = split_srcset(srcset);
|
|
4674
4770
|
return urls.length === element_urls.length && urls.every(([url, width], i) => width === element_urls[i][1] && (src_url_equal(element_urls[i][0], url) || src_url_equal(url, element_urls[i][0])));
|
|
4675
4771
|
}
|
|
4676
|
-
// ../../node_modules/.bun/svelte@5.
|
|
4772
|
+
// ../../node_modules/.bun/svelte@5.56.0/node_modules/svelte/src/internal/client/dom/elements/bindings/input.js
|
|
4677
4773
|
var pending = new Set;
|
|
4678
|
-
// ../../node_modules/.bun/svelte@5.
|
|
4774
|
+
// ../../node_modules/.bun/svelte@5.56.0/node_modules/svelte/src/internal/client/dom/elements/bindings/size.js
|
|
4679
4775
|
class ResizeObserverSingleton {
|
|
4680
4776
|
#listeners = new WeakMap;
|
|
4681
4777
|
#observer;
|
|
@@ -4709,7 +4805,7 @@ class ResizeObserverSingleton {
|
|
|
4709
4805
|
}));
|
|
4710
4806
|
}
|
|
4711
4807
|
}
|
|
4712
|
-
// ../../node_modules/.bun/svelte@5.
|
|
4808
|
+
// ../../node_modules/.bun/svelte@5.56.0/node_modules/svelte/src/internal/client/dom/elements/bindings/this.js
|
|
4713
4809
|
function is_bound_this(bound_value, element_or_component) {
|
|
4714
4810
|
return bound_value === element_or_component || bound_value?.[STATE_SYMBOL] === element_or_component;
|
|
4715
4811
|
}
|
|
@@ -4723,7 +4819,7 @@ function bind_this(element_or_component = {}, update2, get_value, get_parts) {
|
|
|
4723
4819
|
old_parts = parts;
|
|
4724
4820
|
parts = get_parts?.() || [];
|
|
4725
4821
|
untrack(() => {
|
|
4726
|
-
if (
|
|
4822
|
+
if (!is_bound_this(get_value(...parts), element_or_component)) {
|
|
4727
4823
|
update2(element_or_component, ...parts);
|
|
4728
4824
|
if (old_parts && is_bound_this(get_value(...old_parts), element_or_component)) {
|
|
4729
4825
|
update2(null, ...old_parts);
|
|
@@ -4750,14 +4846,19 @@ function bind_this(element_or_component = {}, update2, get_value, get_parts) {
|
|
|
4750
4846
|
});
|
|
4751
4847
|
return element_or_component;
|
|
4752
4848
|
}
|
|
4753
|
-
// ../../node_modules/.bun/svelte@5.
|
|
4849
|
+
// ../../node_modules/.bun/svelte@5.56.0/node_modules/svelte/src/internal/client/reactivity/props.js
|
|
4754
4850
|
function prop(props, key, flags2, fallback) {
|
|
4755
4851
|
var runes = !legacy_mode_flag || (flags2 & PROPS_IS_RUNES) !== 0;
|
|
4756
4852
|
var bindable = (flags2 & PROPS_IS_BINDABLE) !== 0;
|
|
4757
4853
|
var lazy = (flags2 & PROPS_IS_LAZY_INITIAL) !== 0;
|
|
4758
4854
|
var fallback_value = fallback;
|
|
4759
4855
|
var fallback_dirty = true;
|
|
4856
|
+
var fallback_signal = undefined;
|
|
4760
4857
|
var get_fallback = () => {
|
|
4858
|
+
if (lazy && runes) {
|
|
4859
|
+
fallback_signal ??= derived(fallback);
|
|
4860
|
+
return get2(fallback_signal);
|
|
4861
|
+
}
|
|
4761
4862
|
if (fallback_dirty) {
|
|
4762
4863
|
fallback_dirty = false;
|
|
4763
4864
|
fallback_value = lazy ? untrack(fallback) : fallback;
|
|
@@ -4844,7 +4945,7 @@ function prop(props, key, flags2, fallback) {
|
|
|
4844
4945
|
return get2(d);
|
|
4845
4946
|
};
|
|
4846
4947
|
}
|
|
4847
|
-
// ../../node_modules/.bun/svelte@5.
|
|
4948
|
+
// ../../node_modules/.bun/svelte@5.56.0/node_modules/svelte/src/legacy/legacy-client.js
|
|
4848
4949
|
function createClassComponent(options) {
|
|
4849
4950
|
return new Svelte4Component(options);
|
|
4850
4951
|
}
|
|
@@ -4922,7 +5023,7 @@ class Svelte4Component {
|
|
|
4922
5023
|
}
|
|
4923
5024
|
}
|
|
4924
5025
|
|
|
4925
|
-
// ../../node_modules/.bun/svelte@5.
|
|
5026
|
+
// ../../node_modules/.bun/svelte@5.56.0/node_modules/svelte/src/internal/client/dom/elements/custom-element.js
|
|
4926
5027
|
var SvelteElement;
|
|
4927
5028
|
if (typeof HTMLElement === "function") {
|
|
4928
5029
|
SvelteElement = class extends HTMLElement {
|
|
@@ -5786,7 +5887,7 @@ function createScopedToolId(baseToolId, scopeLevel, scopeId) {
|
|
|
5786
5887
|
}
|
|
5787
5888
|
function parseScopedToolId(id) {
|
|
5788
5889
|
const parts = id.split(":");
|
|
5789
|
-
if (parts.length !== 3
|
|
5890
|
+
if (parts.length !== 3)
|
|
5790
5891
|
return null;
|
|
5791
5892
|
const [baseToolId, scopeLevelRaw, scopeId] = parts;
|
|
5792
5893
|
if (!baseToolId || !scopeId)
|
|
@@ -6141,7 +6242,8 @@ class BrowserTTSProvider {
|
|
|
6141
6242
|
supportsWordBoundary: true,
|
|
6142
6243
|
supportsVoiceSelection: true,
|
|
6143
6244
|
supportsRateControl: true,
|
|
6144
|
-
supportsPitchControl: true
|
|
6245
|
+
supportsPitchControl: true,
|
|
6246
|
+
supportsSSML: false
|
|
6145
6247
|
};
|
|
6146
6248
|
}
|
|
6147
6249
|
destroy() {}
|
|
@@ -6440,7 +6542,7 @@ class TTSToolProvider {
|
|
|
6440
6542
|
}
|
|
6441
6543
|
const moduleLoadStartedAt = Date.now();
|
|
6442
6544
|
await this.emitTelemetry("pie-tool-library-load-start", {
|
|
6443
|
-
toolId: "
|
|
6545
|
+
toolId: "textToSpeech",
|
|
6444
6546
|
operation: "server-provider-module-import",
|
|
6445
6547
|
backend: config.serverProvider || config.backend
|
|
6446
6548
|
});
|
|
@@ -6448,7 +6550,7 @@ class TTSToolProvider {
|
|
|
6448
6550
|
try {
|
|
6449
6551
|
const loaded = await import("@pie-players/tts-client-server");
|
|
6450
6552
|
await this.emitTelemetry("pie-tool-library-load-success", {
|
|
6451
|
-
toolId: "
|
|
6553
|
+
toolId: "textToSpeech",
|
|
6452
6554
|
operation: "server-provider-module-import",
|
|
6453
6555
|
backend: config.serverProvider || config.backend,
|
|
6454
6556
|
duration: Date.now() - moduleLoadStartedAt
|
|
@@ -6456,7 +6558,7 @@ class TTSToolProvider {
|
|
|
6456
6558
|
return loaded;
|
|
6457
6559
|
} catch (error) {
|
|
6458
6560
|
await this.emitTelemetry("pie-tool-library-load-error", {
|
|
6459
|
-
toolId: "
|
|
6561
|
+
toolId: "textToSpeech",
|
|
6460
6562
|
operation: "server-provider-module-import",
|
|
6461
6563
|
backend: config.serverProvider || config.backend,
|
|
6462
6564
|
duration: Date.now() - moduleLoadStartedAt,
|
|
@@ -6514,7 +6616,6 @@ var DEFAULT_TOOL_TAG_MAP = {
|
|
|
6514
6616
|
highlighter: "pie-tool-annotation-toolbar",
|
|
6515
6617
|
lineReader: "pie-tool-line-reader",
|
|
6516
6618
|
theme: "pie-tool-theme",
|
|
6517
|
-
colorScheme: "pie-tool-theme",
|
|
6518
6619
|
annotationToolbar: "pie-tool-annotation-toolbar",
|
|
6519
6620
|
graph: "pie-tool-graph",
|
|
6520
6621
|
periodicTable: "pie-tool-periodic-table"
|
|
@@ -6532,6 +6633,30 @@ var createToolElement = (toolId, context, toolbarContext, overrides) => {
|
|
|
6532
6633
|
};
|
|
6533
6634
|
|
|
6534
6635
|
// dist/tools/registrations/calculator.js
|
|
6636
|
+
var overlayElementCache = new WeakMap;
|
|
6637
|
+
function getCachedOverlay(coordinator, fullToolId) {
|
|
6638
|
+
if (!coordinator)
|
|
6639
|
+
return null;
|
|
6640
|
+
const scoped = overlayElementCache.get(coordinator);
|
|
6641
|
+
const element2 = scoped?.get(fullToolId);
|
|
6642
|
+
if (!element2)
|
|
6643
|
+
return null;
|
|
6644
|
+
if (!element2.isConnected) {
|
|
6645
|
+
scoped?.delete(fullToolId);
|
|
6646
|
+
return null;
|
|
6647
|
+
}
|
|
6648
|
+
return element2;
|
|
6649
|
+
}
|
|
6650
|
+
function setCachedOverlay(coordinator, fullToolId, element2) {
|
|
6651
|
+
if (!coordinator)
|
|
6652
|
+
return;
|
|
6653
|
+
let scoped = overlayElementCache.get(coordinator);
|
|
6654
|
+
if (!scoped) {
|
|
6655
|
+
scoped = new Map;
|
|
6656
|
+
overlayElementCache.set(coordinator, scoped);
|
|
6657
|
+
}
|
|
6658
|
+
scoped.set(fullToolId, element2);
|
|
6659
|
+
}
|
|
6535
6660
|
function normalizeCalculatorType(value) {
|
|
6536
6661
|
return value === "basic" || value === "scientific" ? value : null;
|
|
6537
6662
|
}
|
|
@@ -6601,7 +6726,11 @@ var calculatorToolRegistration = {
|
|
|
6601
6726
|
const { calculatorType, availableTypes, displayName } = getCalculatorRenderParams(toolbarContext);
|
|
6602
6727
|
const fullToolId = createScopedToolId(this.toolId, toolbarContext.scope.level, toolbarContext.scope.scopeId);
|
|
6603
6728
|
const componentOverrides = toolbarContext.componentOverrides;
|
|
6604
|
-
const
|
|
6729
|
+
const cachedOverlay = getCachedOverlay(toolbarContext.toolCoordinator, fullToolId);
|
|
6730
|
+
const overlay = cachedOverlay ?? createToolElement(this.toolId, context, toolbarContext, componentOverrides);
|
|
6731
|
+
if (!cachedOverlay) {
|
|
6732
|
+
setCachedOverlay(toolbarContext.toolCoordinator, fullToolId, overlay);
|
|
6733
|
+
}
|
|
6605
6734
|
overlay.setAttribute("tool-id", fullToolId);
|
|
6606
6735
|
overlay.toolkitCoordinator = toolbarContext.toolkitCoordinator;
|
|
6607
6736
|
applyCalculatorParamsToElement(overlay, calculatorType, availableTypes);
|
|
@@ -6618,7 +6747,9 @@ var calculatorToolRegistration = {
|
|
|
6618
6747
|
active: toolbarContext.isToolVisible(fullToolId)
|
|
6619
6748
|
};
|
|
6620
6749
|
let lastVisibleState = button.active;
|
|
6621
|
-
overlay.visible
|
|
6750
|
+
if (overlay.visible !== button.active) {
|
|
6751
|
+
overlay.visible = button.active;
|
|
6752
|
+
}
|
|
6622
6753
|
return {
|
|
6623
6754
|
toolId: this.toolId,
|
|
6624
6755
|
elements: [
|
|
@@ -6664,6 +6795,25 @@ var calculatorToolRegistration = {
|
|
|
6664
6795
|
}
|
|
6665
6796
|
};
|
|
6666
6797
|
|
|
6798
|
+
// dist/services/tts/math-speech.js
|
|
6799
|
+
var sreOperationQueue = Promise.resolve();
|
|
6800
|
+
var isPlainRecord = (value) => !!value && typeof value === "object" && !Array.isArray(value);
|
|
6801
|
+
var trimOption = (value) => typeof value === "string" && value.trim() ? value.trim() : undefined;
|
|
6802
|
+
var normalizeSREMathSpeechOptions = (options) => {
|
|
6803
|
+
if (!isPlainRecord(options))
|
|
6804
|
+
return;
|
|
6805
|
+
const domain = trimOption(options.domain);
|
|
6806
|
+
const style = trimOption(options.style);
|
|
6807
|
+
const engineOptions = isPlainRecord(options.engineOptions) ? options.engineOptions : undefined;
|
|
6808
|
+
if (!domain && !style && !engineOptions)
|
|
6809
|
+
return;
|
|
6810
|
+
return {
|
|
6811
|
+
...domain ? { domain } : {},
|
|
6812
|
+
...style ? { style } : {},
|
|
6813
|
+
...engineOptions ? { engineOptions } : {}
|
|
6814
|
+
};
|
|
6815
|
+
};
|
|
6816
|
+
|
|
6667
6817
|
// dist/services/tts-runtime-config.js
|
|
6668
6818
|
var VALID_TTS_LAYOUT_MODES = new Set([
|
|
6669
6819
|
"reserved-row",
|
|
@@ -6729,7 +6879,7 @@ var applyRuntimeDefaults = (config) => {
|
|
|
6729
6879
|
};
|
|
6730
6880
|
var resolveTTSRuntimeSettings = (config) => {
|
|
6731
6881
|
const configRecord = toRecord(config);
|
|
6732
|
-
const settingsRecord = toRecord(
|
|
6882
|
+
const settingsRecord = toRecord(configRecord.settings);
|
|
6733
6883
|
return applyRuntimeDefaults({
|
|
6734
6884
|
...configRecord,
|
|
6735
6885
|
...settingsRecord
|
|
@@ -6749,6 +6899,7 @@ var buildRuntimeTTSConfig = (config) => {
|
|
|
6749
6899
|
const backend = resolveTTSBackend(config);
|
|
6750
6900
|
const runtimeProvider = resolveRuntimeProvider(config, backend);
|
|
6751
6901
|
const transportMode = resolveTransportMode(config, runtimeProvider);
|
|
6902
|
+
const mathSpeech = normalizeSREMathSpeechOptions(config.mathSpeech);
|
|
6752
6903
|
return {
|
|
6753
6904
|
voice: config.defaultVoice,
|
|
6754
6905
|
rate: config.rate,
|
|
@@ -6763,7 +6914,8 @@ var buildRuntimeTTSConfig = (config) => {
|
|
|
6763
6914
|
} : {},
|
|
6764
6915
|
...transportMode === "custom" && typeof config.cache === "boolean" ? { cache: config.cache } : {},
|
|
6765
6916
|
...transportMode === "custom" && config.speedRate ? { speedRate: config.speedRate } : {},
|
|
6766
|
-
...transportMode === "custom" && config.lang_id ? { lang_id: config.lang_id } : {}
|
|
6917
|
+
...transportMode === "custom" && config.lang_id ? { lang_id: config.lang_id } : {},
|
|
6918
|
+
...mathSpeech ? { mathSpeech } : {}
|
|
6767
6919
|
},
|
|
6768
6920
|
apiEndpoint: config.apiEndpoint,
|
|
6769
6921
|
provider: runtimeProvider,
|
|
@@ -6772,7 +6924,8 @@ var buildRuntimeTTSConfig = (config) => {
|
|
|
6772
6924
|
endpointMode: config.endpointMode,
|
|
6773
6925
|
endpointValidationMode: config.endpointValidationMode,
|
|
6774
6926
|
includeAuthOnAssetFetch: config.includeAuthOnAssetFetch,
|
|
6775
|
-
validateEndpoint: config.validateEndpoint
|
|
6927
|
+
validateEndpoint: config.validateEndpoint,
|
|
6928
|
+
...typeof config.mathTokenHighlighting === "boolean" ? { mathTokenHighlighting: config.mathTokenHighlighting } : {}
|
|
6776
6929
|
};
|
|
6777
6930
|
};
|
|
6778
6931
|
var resolveTTSLayoutMode = (config) => normalizeTTSLayoutMode(config.layoutMode);
|
|
@@ -7238,7 +7391,6 @@ var themeToolRegistration = {
|
|
|
7238
7391
|
"highContrastDisplay",
|
|
7239
7392
|
"colorContrast",
|
|
7240
7393
|
"invertColors",
|
|
7241
|
-
"colorScheme",
|
|
7242
7394
|
"theme",
|
|
7243
7395
|
"highContrast",
|
|
7244
7396
|
"customColors"
|
|
@@ -8422,26 +8574,16 @@ var __pieDefineSafely = (tagName, ctor) => {
|
|
|
8422
8574
|
}
|
|
8423
8575
|
}
|
|
8424
8576
|
};
|
|
8425
|
-
var
|
|
8426
|
-
var
|
|
8427
|
-
var
|
|
8428
|
-
var
|
|
8429
|
-
var
|
|
8430
|
-
var
|
|
8431
|
-
var
|
|
8432
|
-
var
|
|
8433
|
-
var
|
|
8434
|
-
var
|
|
8435
|
-
var root_19 = from_html(`<img class="item-toolbar__icon-image svelte-rnx3ie" alt=""/>`);
|
|
8436
|
-
var root_21 = from_html(`<span aria-hidden="true"></span>`);
|
|
8437
|
-
var root_22 = from_html(`<i aria-hidden="true"></i>`);
|
|
8438
|
-
var root_15 = from_html(`<button type="button"><!></button>`);
|
|
8439
|
-
var root_24 = from_html(`<span class="item-toolbar__element-host svelte-rnx3ie"></span>`);
|
|
8440
|
-
var root_25 = from_html(`<span class="item-toolbar__element-host svelte-rnx3ie"></span>`);
|
|
8441
|
-
var root_28 = from_html(`<span class="item-toolbar__controls-host svelte-rnx3ie"></span>`);
|
|
8442
|
-
var root_29 = from_html(`<span class="item-toolbar__controls-host svelte-rnx3ie"></span>`);
|
|
8443
|
-
var root_26 = from_html(`<div></div>`);
|
|
8444
|
-
var root_2 = from_html(`<div><div class="item-toolbar__tools-row svelte-rnx3ie"><!> <!> <!></div> <!></div>`);
|
|
8577
|
+
var root_1 = from_html(`<span class="item-toolbar__element-host svelte-rnx3ie"></span>`);
|
|
8578
|
+
var root_2 = from_html(`<span class="item-toolbar__calculator-icon svelte-rnx3ie" aria-hidden="true"><i class="fa-regular fa-calculator svelte-rnx3ie"></i></span>`);
|
|
8579
|
+
var root_3 = from_html(`<span aria-hidden="true"></span>`);
|
|
8580
|
+
var root_4 = from_html(`<img class="item-toolbar__icon-image svelte-rnx3ie" alt=""/>`);
|
|
8581
|
+
var root_5 = from_html(`<i aria-hidden="true"></i>`);
|
|
8582
|
+
var root_6 = from_html(`<a><!></a>`);
|
|
8583
|
+
var root_7 = from_html(`<button type="button"><!></button>`);
|
|
8584
|
+
var root_8 = from_html(`<span class="item-toolbar__controls-host svelte-rnx3ie"></span>`);
|
|
8585
|
+
var root_9 = from_html(`<div></div>`);
|
|
8586
|
+
var root_10 = from_html(`<div><div class="item-toolbar__tools-row svelte-rnx3ie"><!> <!> <!></div> <!></div>`);
|
|
8445
8587
|
var $$css = {
|
|
8446
8588
|
hash: "svelte-rnx3ie",
|
|
8447
8589
|
code: `.item-toolbar.svelte-rnx3ie {display:flex;flex-direction:column;align-items:flex-end;gap:0;--pie-toolbar-tools-row-height: 2rem;--pie-tts-controls-row-height: 2.875rem;}.item-toolbar__tools-row.svelte-rnx3ie {display:flex;align-items:center;justify-content:flex-end;flex-wrap:nowrap;gap:0.5rem;min-height:var(--pie-toolbar-tools-row-height);}.item-toolbar__controls-row.svelte-rnx3ie {display:flex;align-items:center;justify-content:flex-end;width:100%;min-height:0;height:auto;}.item-toolbar__controls-row--reserve.svelte-rnx3ie {min-height:var(--pie-tts-controls-row-height);height:var(--pie-tts-controls-row-height);}.item-toolbar__controls-row--active.svelte-rnx3ie {min-height:var(--pie-tts-controls-row-height);height:var(--pie-tts-controls-row-height);}.item-toolbar__controls-row--align-start.svelte-rnx3ie {justify-content:flex-start;}.item-toolbar__controls-host.svelte-rnx3ie {display:inline-flex;align-items:center;justify-content:flex-end;width:100%;}.item-toolbar--top.svelte-rnx3ie,
|
|
@@ -8450,7 +8592,10 @@ var $$css = {
|
|
|
8450
8592
|
.item-toolbar--right.svelte-rnx3ie .item-toolbar__tools-row:where(.svelte-rnx3ie) {flex-direction:column;align-items:center;justify-content:flex-start;flex-wrap:nowrap;}.item-toolbar--left.svelte-rnx3ie .item-toolbar__controls-row:where(.svelte-rnx3ie),
|
|
8451
8593
|
.item-toolbar--right.svelte-rnx3ie .item-toolbar__controls-row:where(.svelte-rnx3ie) {justify-content:flex-start;width:auto;min-height:0;height:auto;}.item-toolbar__button.svelte-rnx3ie {display:flex;align-items:center;justify-content:center;width:2rem;height:2rem;padding:0.25rem;border:1px solid var(--pie-button-border, var(--pie-border, #ccc));border-radius:0.25rem;background-color:var(--pie-button-bg, var(--pie-background, white));color:var(--pie-button-color, var(--pie-text, #333));cursor:pointer;transition:all 0.15s ease;text-decoration:none;}.item-toolbar__element-host.svelte-rnx3ie {display:contents;}.item-toolbar--sm.svelte-rnx3ie .item-toolbar__button:where(.svelte-rnx3ie) {width:2.75rem;height:2.75rem;}.item-toolbar--sm.svelte-rnx3ie {--pie-toolbar-tools-row-height: 2.75rem;--pie-tts-controls-row-height: 3.625rem;}.item-toolbar--lg.svelte-rnx3ie .item-toolbar__button:where(.svelte-rnx3ie) {width:2.5rem;height:2.5rem;}.item-toolbar--lg.svelte-rnx3ie {--pie-toolbar-tools-row-height: 2.5rem;--pie-tts-controls-row-height: 3.375rem;}.item-toolbar__button.svelte-rnx3ie:hover:not(:disabled) {background-color:var(--pie-button-hover-bg, var(--pie-secondary-background, #f5f5f5));border-color:var(--pie-button-hover-border, var(--pie-button-border, var(--pie-border, #ccc)));color:var(--pie-button-hover-color, var(--pie-button-color, var(--pie-text, #333)));transform:translateY(-1px);box-shadow:0 2px 4px color-mix(in srgb, var(--pie-black, #000) 10%, transparent);}.item-toolbar__button.svelte-rnx3ie:active:not(:disabled) {transform:translateY(0);box-shadow:none;}.item-toolbar__button--active.svelte-rnx3ie {background-color:var(--pie-primary, #1976d2);color:var(--pie-white, #fff);border-color:var(--pie-primary, #1976d2);}.item-toolbar__button--active.svelte-rnx3ie:hover:not(:disabled) {background-color:var(--pie-primary-dark, #1565c0);}.item-toolbar__button.svelte-rnx3ie:focus-visible {outline:2px solid var(--pie-button-focus-outline, var(--pie-primary, #1976d2));outline-offset:2px;}.item-toolbar__button.svelte-rnx3ie:disabled {opacity:0.5;cursor:not-allowed;}.item-toolbar__button.svelte-rnx3ie svg {width:100%;height:100%;}.item-toolbar__icon-image.svelte-rnx3ie {width:100%;height:100%;object-fit:contain;}
|
|
8452
8594
|
|
|
8453
|
-
/* Decorative only — the outer link/button owns focus and aria semantics. */.item-toolbar__calculator-icon.svelte-rnx3ie {pointer-events:none;display:inline-flex;align-items:center;justify-content:center;width:100%;height:100%;}
|
|
8595
|
+
/* Decorative only — the outer link/button owns focus and aria semantics. */.item-toolbar__calculator-icon.svelte-rnx3ie {pointer-events:none;display:inline-flex;align-items:center;justify-content:center;width:100%;height:100%;}
|
|
8596
|
+
|
|
8597
|
+
/* Defensive: if FA fails to load (shadow injection misses, CSP blocks the
|
|
8598
|
+
stylesheet, etc.), the <i> would otherwise render as italic text. */.item-toolbar__calculator-icon.svelte-rnx3ie > i:where(.svelte-rnx3ie) {font-style:normal;}`
|
|
8454
8599
|
};
|
|
8455
8600
|
function ItemToolBar($$anchor, $$props) {
|
|
8456
8601
|
push($$props, true);
|
|
@@ -8459,7 +8604,6 @@ function ItemToolBar($$anchor, $$props) {
|
|
|
8459
8604
|
const FA_PRO_HREFS = ["/_fa-pro/fontawesome.min.css", "/_fa-pro/light.min.css"];
|
|
8460
8605
|
const FA_FREE_HREF = "https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.5.2/css/all.min.css";
|
|
8461
8606
|
const ROBOTO_HREF = "https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap";
|
|
8462
|
-
const FA_LIGHT_SHIM_ID = "pie-nds-fa-light-shim";
|
|
8463
8607
|
let ndsAssetsInstalled = false;
|
|
8464
8608
|
const ensureNdsAssets = () => {
|
|
8465
8609
|
if (!isBrowser || ndsAssetsInstalled)
|
|
@@ -8485,14 +8629,9 @@ function ItemToolBar($$anchor, $$props) {
|
|
|
8485
8629
|
link2.href = href;
|
|
8486
8630
|
document.head.appendChild(link2);
|
|
8487
8631
|
}
|
|
8488
|
-
if (!document.getElementById(FA_LIGHT_SHIM_ID)) {
|
|
8489
|
-
const style = document.createElement("style");
|
|
8490
|
-
style.id = FA_LIGHT_SHIM_ID;
|
|
8491
|
-
style.textContent = '.fa-light{font-family:"Font Awesome 6 Free";font-weight:900;}';
|
|
8492
|
-
document.head.appendChild(style);
|
|
8493
|
-
}
|
|
8494
8632
|
};
|
|
8495
8633
|
const FA_TOOLBAR_SHADOW_INSTALLED = "__pieFaToolbarShadowInstalled";
|
|
8634
|
+
const FA_HREF_PATTERN = /font.?awesome|fa-?pro/i;
|
|
8496
8635
|
const installFaInToolbarShadow = (root) => {
|
|
8497
8636
|
const shadow = root.getRootNode();
|
|
8498
8637
|
if (!(shadow instanceof ShadowRoot))
|
|
@@ -8501,15 +8640,19 @@ function ItemToolBar($$anchor, $$props) {
|
|
|
8501
8640
|
if (marker[FA_TOOLBAR_SHADOW_INSTALLED])
|
|
8502
8641
|
return;
|
|
8503
8642
|
marker[FA_TOOLBAR_SHADOW_INSTALLED] = true;
|
|
8643
|
+
const seenHrefs = new Set;
|
|
8504
8644
|
const appendLink = (href) => {
|
|
8645
|
+
if (!href || seenHrefs.has(href))
|
|
8646
|
+
return;
|
|
8647
|
+
seenHrefs.add(href);
|
|
8505
8648
|
const link2 = document.createElement("link");
|
|
8506
8649
|
link2.rel = "stylesheet";
|
|
8507
8650
|
link2.href = href;
|
|
8508
8651
|
shadow.appendChild(link2);
|
|
8509
8652
|
};
|
|
8510
|
-
|
|
8511
|
-
for (const
|
|
8512
|
-
appendLink(href);
|
|
8653
|
+
const documentFaLinks = Array.from(document.querySelectorAll('link[rel="stylesheet"][href]')).filter((link2) => FA_HREF_PATTERN.test(link2.href));
|
|
8654
|
+
for (const link2 of documentFaLinks)
|
|
8655
|
+
appendLink(link2.href);
|
|
8513
8656
|
const shim = document.createElement("style");
|
|
8514
8657
|
shim.textContent = '.fa-light{font-family:"Font Awesome 6 Free";font-weight:900;}';
|
|
8515
8658
|
shadow.appendChild(shim);
|
|
@@ -9172,7 +9315,7 @@ function ItemToolBar($$anchor, $$props) {
|
|
|
9172
9315
|
height += dh;
|
|
9173
9316
|
applyPositionAndSize();
|
|
9174
9317
|
};
|
|
9175
|
-
const createShellIconButton = (label, iconName, onActivate) => {
|
|
9318
|
+
const createShellIconButton = (label, iconName, onActivate, faVariant = "fa-regular") => {
|
|
9176
9319
|
const button = document.createElement("nds-icon-button");
|
|
9177
9320
|
button.setAttribute("variant", "tertiary");
|
|
9178
9321
|
button.setAttribute("size", "small");
|
|
@@ -9185,6 +9328,25 @@ function ItemToolBar($$anchor, $$props) {
|
|
|
9185
9328
|
onActivate();
|
|
9186
9329
|
bringToFront();
|
|
9187
9330
|
});
|
|
9331
|
+
if (faVariant !== "fa-light") {
|
|
9332
|
+
const swapVariant = (icon) => {
|
|
9333
|
+
icon.classList.remove("fa-light");
|
|
9334
|
+
icon.classList.add(faVariant);
|
|
9335
|
+
};
|
|
9336
|
+
const existing = button.querySelector("i.fa-light");
|
|
9337
|
+
if (existing) {
|
|
9338
|
+
swapVariant(existing);
|
|
9339
|
+
} else {
|
|
9340
|
+
const observer = new MutationObserver(() => {
|
|
9341
|
+
const target = button.querySelector("i.fa-light");
|
|
9342
|
+
if (target) {
|
|
9343
|
+
swapVariant(target);
|
|
9344
|
+
observer.disconnect();
|
|
9345
|
+
}
|
|
9346
|
+
});
|
|
9347
|
+
observer.observe(button, { childList: true, subtree: true });
|
|
9348
|
+
}
|
|
9349
|
+
}
|
|
9188
9350
|
return button;
|
|
9189
9351
|
};
|
|
9190
9352
|
const createShellControlButton = (label, glyph, onActivate) => {
|
|
@@ -9432,10 +9594,10 @@ function ItemToolBar($$anchor, $$props) {
|
|
|
9432
9594
|
controlsEl.style.alignItems = "center";
|
|
9433
9595
|
controlsEl.style.gap = isCalculatorShell ? "6px" : "4px";
|
|
9434
9596
|
const shellConfig = currentArgs.mounted.entry.shell;
|
|
9435
|
-
const appendControl = (label, glyph, iconName, onActivate) => {
|
|
9597
|
+
const appendControl = (label, glyph, iconName, onActivate, faVariant = "fa-regular") => {
|
|
9436
9598
|
if (!controlsEl)
|
|
9437
9599
|
return;
|
|
9438
|
-
controlsEl.appendChild(isCalculatorShell ? createShellIconButton(label, iconName, onActivate) : createShellControlButton(label, glyph, onActivate));
|
|
9600
|
+
controlsEl.appendChild(isCalculatorShell ? createShellIconButton(label, iconName, onActivate, faVariant) : createShellControlButton(label, glyph, onActivate));
|
|
9439
9601
|
};
|
|
9440
9602
|
if (shellConfig?.draggable !== false) {
|
|
9441
9603
|
appendControl("Move tool left", "←", "chevron-left", () => moveBy(-24, 0));
|
|
@@ -9463,15 +9625,8 @@ function ItemToolBar($$anchor, $$props) {
|
|
|
9463
9625
|
headerEl.appendChild(controlsEl);
|
|
9464
9626
|
}
|
|
9465
9627
|
if (isCalculatorShell) {
|
|
9466
|
-
closeButtonEl =
|
|
9467
|
-
closeButtonEl.setAttribute("variant", "tertiary");
|
|
9468
|
-
closeButtonEl.setAttribute("size", "small");
|
|
9469
|
-
closeButtonEl.setAttribute("type", "circle");
|
|
9470
|
-
closeButtonEl.setAttribute("icon-name", "xmark");
|
|
9471
|
-
closeButtonEl.setAttribute("button-aria-label", "Close tool");
|
|
9472
|
-
closeButtonEl.title = "Close tool";
|
|
9628
|
+
closeButtonEl = createShellIconButton("Close tool", "xmark", closeShell, "fa-regular");
|
|
9473
9629
|
closeButtonEl.style.display = currentArgs.mounted.entry.shell.closeable === false ? "none" : "inline-block";
|
|
9474
|
-
closeButtonEl.addEventListener("click", closeShell);
|
|
9475
9630
|
} else {
|
|
9476
9631
|
const closeButton = document.createElement("button");
|
|
9477
9632
|
closeButton.type = "button";
|
|
@@ -9765,7 +9920,7 @@ function ItemToolBar($$anchor, $$props) {
|
|
|
9765
9920
|
var node_1 = first_child(fragment);
|
|
9766
9921
|
{
|
|
9767
9922
|
var consequent_15 = ($$anchor2) => {
|
|
9768
|
-
var div =
|
|
9923
|
+
var div = root_10();
|
|
9769
9924
|
let classes;
|
|
9770
9925
|
var div_1 = child(div);
|
|
9771
9926
|
var node_2 = child(div_1);
|
|
@@ -9774,7 +9929,7 @@ function ItemToolBar($$anchor, $$props) {
|
|
|
9774
9929
|
var node_3 = first_child(fragment_1);
|
|
9775
9930
|
{
|
|
9776
9931
|
var consequent = ($$anchor4) => {
|
|
9777
|
-
var span =
|
|
9932
|
+
var span = root_1();
|
|
9778
9933
|
action(span, ($$node, $$action_arg) => mountElementWithShell?.($$node, $$action_arg), () => ({
|
|
9779
9934
|
mounted: get2(mounted),
|
|
9780
9935
|
active: get2(renderedToolActiveById)[get2(mounted).toolId] ?? false
|
|
@@ -9782,7 +9937,7 @@ function ItemToolBar($$anchor, $$props) {
|
|
|
9782
9937
|
append($$anchor4, span);
|
|
9783
9938
|
};
|
|
9784
9939
|
var alternate = ($$anchor4) => {
|
|
9785
|
-
var span_1 =
|
|
9940
|
+
var span_1 = root_1();
|
|
9786
9941
|
action(span_1, ($$node, $$action_arg) => mountElement?.($$node, $$action_arg), () => get2(mounted).entry.element);
|
|
9787
9942
|
append($$anchor4, span_1);
|
|
9788
9943
|
};
|
|
@@ -9801,7 +9956,7 @@ function ItemToolBar($$anchor, $$props) {
|
|
|
9801
9956
|
var node_5 = first_child(fragment_2);
|
|
9802
9957
|
{
|
|
9803
9958
|
var consequent_6 = ($$anchor4) => {
|
|
9804
|
-
var a =
|
|
9959
|
+
var a = root_6();
|
|
9805
9960
|
let classes_1;
|
|
9806
9961
|
var node_6 = child(a);
|
|
9807
9962
|
{
|
|
@@ -9810,19 +9965,19 @@ function ItemToolBar($$anchor, $$props) {
|
|
|
9810
9965
|
var node_7 = first_child(fragment_3);
|
|
9811
9966
|
{
|
|
9812
9967
|
var consequent_1 = ($$anchor6) => {
|
|
9813
|
-
var span_2 =
|
|
9968
|
+
var span_2 = root_2();
|
|
9814
9969
|
action(span_2, ($$node) => ndsIconButtonAction?.($$node));
|
|
9815
9970
|
append($$anchor6, span_2);
|
|
9816
9971
|
};
|
|
9817
9972
|
var consequent_2 = ($$anchor6) => {
|
|
9818
|
-
var span_3 =
|
|
9973
|
+
var span_3 = root_3();
|
|
9819
9974
|
html(span_3, () => sanitizeSvgIcon(get2(item2).icon), true);
|
|
9820
9975
|
reset(span_3);
|
|
9821
9976
|
append($$anchor6, span_3);
|
|
9822
9977
|
};
|
|
9823
9978
|
var d2 = user_derived(() => isInlineSvgIcon(get2(item2).icon));
|
|
9824
9979
|
var consequent_3 = ($$anchor6) => {
|
|
9825
|
-
var img =
|
|
9980
|
+
var img = root_4();
|
|
9826
9981
|
template_effect(() => set_attribute2(img, "src", get2(item2).icon));
|
|
9827
9982
|
append($$anchor6, img);
|
|
9828
9983
|
};
|
|
@@ -9833,13 +9988,13 @@ function ItemToolBar($$anchor, $$props) {
|
|
|
9833
9988
|
var node_8 = first_child(fragment_4);
|
|
9834
9989
|
{
|
|
9835
9990
|
var consequent_4 = ($$anchor7) => {
|
|
9836
|
-
var span_4 =
|
|
9991
|
+
var span_4 = root_3();
|
|
9837
9992
|
html(span_4, () => sanitizeSvgIcon(get2(fallbackIcon)), true);
|
|
9838
9993
|
reset(span_4);
|
|
9839
9994
|
append($$anchor7, span_4);
|
|
9840
9995
|
};
|
|
9841
9996
|
var alternate_1 = ($$anchor7) => {
|
|
9842
|
-
var i =
|
|
9997
|
+
var i = root_5();
|
|
9843
9998
|
template_effect(() => set_class(i, 1, `icon icon-${get2(item2).icon}`, "svelte-rnx3ie"));
|
|
9844
9999
|
append($$anchor7, i);
|
|
9845
10000
|
};
|
|
@@ -9893,7 +10048,7 @@ function ItemToolBar($$anchor, $$props) {
|
|
|
9893
10048
|
};
|
|
9894
10049
|
var d_2 = user_derived(() => isToolbarLinkItem(get2(item2)));
|
|
9895
10050
|
var alternate_5 = ($$anchor4) => {
|
|
9896
|
-
var button_1 =
|
|
10051
|
+
var button_1 = root_7();
|
|
9897
10052
|
let classes_2;
|
|
9898
10053
|
var node_9 = child(button_1);
|
|
9899
10054
|
{
|
|
@@ -9902,19 +10057,19 @@ function ItemToolBar($$anchor, $$props) {
|
|
|
9902
10057
|
var node_10 = first_child(fragment_5);
|
|
9903
10058
|
{
|
|
9904
10059
|
var consequent_7 = ($$anchor6) => {
|
|
9905
|
-
var span_5 =
|
|
10060
|
+
var span_5 = root_2();
|
|
9906
10061
|
action(span_5, ($$node) => ndsIconButtonAction?.($$node));
|
|
9907
10062
|
append($$anchor6, span_5);
|
|
9908
10063
|
};
|
|
9909
10064
|
var consequent_8 = ($$anchor6) => {
|
|
9910
|
-
var span_6 =
|
|
10065
|
+
var span_6 = root_3();
|
|
9911
10066
|
html(span_6, () => sanitizeSvgIcon(get2(item2).icon), true);
|
|
9912
10067
|
reset(span_6);
|
|
9913
10068
|
append($$anchor6, span_6);
|
|
9914
10069
|
};
|
|
9915
10070
|
var d_3 = user_derived(() => isInlineSvgIcon(get2(item2).icon));
|
|
9916
10071
|
var consequent_9 = ($$anchor6) => {
|
|
9917
|
-
var img_1 =
|
|
10072
|
+
var img_1 = root_4();
|
|
9918
10073
|
template_effect(() => set_attribute2(img_1, "src", get2(item2).icon));
|
|
9919
10074
|
append($$anchor6, img_1);
|
|
9920
10075
|
};
|
|
@@ -9925,13 +10080,13 @@ function ItemToolBar($$anchor, $$props) {
|
|
|
9925
10080
|
var node_11 = first_child(fragment_6);
|
|
9926
10081
|
{
|
|
9927
10082
|
var consequent_10 = ($$anchor7) => {
|
|
9928
|
-
var span_7 =
|
|
10083
|
+
var span_7 = root_3();
|
|
9929
10084
|
html(span_7, () => sanitizeSvgIcon(get2(fallbackIcon)), true);
|
|
9930
10085
|
reset(span_7);
|
|
9931
10086
|
append($$anchor7, span_7);
|
|
9932
10087
|
};
|
|
9933
10088
|
var alternate_3 = ($$anchor7) => {
|
|
9934
|
-
var i_1 =
|
|
10089
|
+
var i_1 = root_5();
|
|
9935
10090
|
template_effect(() => set_class(i_1, 1, `icon icon-${get2(item2).icon}`, "svelte-rnx3ie"));
|
|
9936
10091
|
append($$anchor7, i_1);
|
|
9937
10092
|
};
|
|
@@ -9995,7 +10150,7 @@ function ItemToolBar($$anchor, $$props) {
|
|
|
9995
10150
|
var node_13 = first_child(fragment_7);
|
|
9996
10151
|
{
|
|
9997
10152
|
var consequent_12 = ($$anchor4) => {
|
|
9998
|
-
var span_8 =
|
|
10153
|
+
var span_8 = root_1();
|
|
9999
10154
|
action(span_8, ($$node, $$action_arg) => mountElementWithShell?.($$node, $$action_arg), () => ({
|
|
10000
10155
|
mounted: get2(mounted),
|
|
10001
10156
|
active: get2(renderedToolActiveById)[get2(mounted).toolId] ?? false
|
|
@@ -10003,7 +10158,7 @@ function ItemToolBar($$anchor, $$props) {
|
|
|
10003
10158
|
append($$anchor4, span_8);
|
|
10004
10159
|
};
|
|
10005
10160
|
var alternate_6 = ($$anchor4) => {
|
|
10006
|
-
var span_9 =
|
|
10161
|
+
var span_9 = root_1();
|
|
10007
10162
|
action(span_9, ($$node, $$action_arg) => mountElement?.($$node, $$action_arg), () => get2(mounted).entry.element);
|
|
10008
10163
|
append($$anchor4, span_9);
|
|
10009
10164
|
};
|
|
@@ -10020,14 +10175,14 @@ function ItemToolBar($$anchor, $$props) {
|
|
|
10020
10175
|
var node_14 = sibling(div_1, 2);
|
|
10021
10176
|
{
|
|
10022
10177
|
var consequent_14 = ($$anchor3) => {
|
|
10023
|
-
var div_2 =
|
|
10178
|
+
var div_2 = root_9();
|
|
10024
10179
|
let classes_3;
|
|
10025
10180
|
each(div_2, 21, () => get2(mountedElementsControlsRow), (mounted) => mounted.key, ($$anchor4, mounted) => {
|
|
10026
10181
|
var fragment_8 = comment();
|
|
10027
10182
|
var node_15 = first_child(fragment_8);
|
|
10028
10183
|
{
|
|
10029
10184
|
var consequent_13 = ($$anchor5) => {
|
|
10030
|
-
var span_10 =
|
|
10185
|
+
var span_10 = root_8();
|
|
10031
10186
|
action(span_10, ($$node, $$action_arg) => mountElementWithShell?.($$node, $$action_arg), () => ({
|
|
10032
10187
|
mounted: get2(mounted),
|
|
10033
10188
|
active: get2(renderedToolActiveById)[get2(mounted).toolId] ?? false
|
|
@@ -10035,7 +10190,7 @@ function ItemToolBar($$anchor, $$props) {
|
|
|
10035
10190
|
append($$anchor5, span_10);
|
|
10036
10191
|
};
|
|
10037
10192
|
var alternate_7 = ($$anchor5) => {
|
|
10038
|
-
var span_11 =
|
|
10193
|
+
var span_11 = root_8();
|
|
10039
10194
|
action(span_11, ($$node, $$action_arg) => mountElement?.($$node, $$action_arg), () => get2(mounted).entry.element);
|
|
10040
10195
|
append($$anchor5, span_11);
|
|
10041
10196
|
};
|