@pie-players/pie-assessment-toolkit 0.3.44 → 0.3.46
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 +59 -70
- package/dist/components/ItemToolBar.custom-element.js +776 -357
- package/dist/components/PieAssessmentToolkit.custom-element.js +19501 -3591
- package/dist/components/SectionToolBar.custom-element.js +1058 -540
- 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 +11 -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 +46 -5
- 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 {
|
|
@@ -5231,7 +5332,11 @@ function isExternalIconUrl(icon) {
|
|
|
5231
5332
|
|
|
5232
5333
|
// dist/components/.ItemToolBar.custom-element.unbundled.js
|
|
5233
5334
|
import { sanitizeSvgIcon } from "@pie-players/pie-players-shared/security";
|
|
5234
|
-
import {
|
|
5335
|
+
import {
|
|
5336
|
+
createFocusTrap,
|
|
5337
|
+
FOCUSABLE_SELECTOR,
|
|
5338
|
+
isProgrammaticFocusTarget
|
|
5339
|
+
} from "@pie-players/pie-players-shared";
|
|
5235
5340
|
|
|
5236
5341
|
// dist/services/tool-config-defaults.js
|
|
5237
5342
|
var DEFAULT_TOOL_PLACEMENT = {
|
|
@@ -5786,7 +5891,7 @@ function createScopedToolId(baseToolId, scopeLevel, scopeId) {
|
|
|
5786
5891
|
}
|
|
5787
5892
|
function parseScopedToolId(id) {
|
|
5788
5893
|
const parts = id.split(":");
|
|
5789
|
-
if (parts.length !== 3
|
|
5894
|
+
if (parts.length !== 3)
|
|
5790
5895
|
return null;
|
|
5791
5896
|
const [baseToolId, scopeLevelRaw, scopeId] = parts;
|
|
5792
5897
|
if (!baseToolId || !scopeId)
|
|
@@ -6141,7 +6246,8 @@ class BrowserTTSProvider {
|
|
|
6141
6246
|
supportsWordBoundary: true,
|
|
6142
6247
|
supportsVoiceSelection: true,
|
|
6143
6248
|
supportsRateControl: true,
|
|
6144
|
-
supportsPitchControl: true
|
|
6249
|
+
supportsPitchControl: true,
|
|
6250
|
+
supportsSSML: false
|
|
6145
6251
|
};
|
|
6146
6252
|
}
|
|
6147
6253
|
destroy() {}
|
|
@@ -6440,7 +6546,7 @@ class TTSToolProvider {
|
|
|
6440
6546
|
}
|
|
6441
6547
|
const moduleLoadStartedAt = Date.now();
|
|
6442
6548
|
await this.emitTelemetry("pie-tool-library-load-start", {
|
|
6443
|
-
toolId: "
|
|
6549
|
+
toolId: "textToSpeech",
|
|
6444
6550
|
operation: "server-provider-module-import",
|
|
6445
6551
|
backend: config.serverProvider || config.backend
|
|
6446
6552
|
});
|
|
@@ -6448,7 +6554,7 @@ class TTSToolProvider {
|
|
|
6448
6554
|
try {
|
|
6449
6555
|
const loaded = await import("@pie-players/tts-client-server");
|
|
6450
6556
|
await this.emitTelemetry("pie-tool-library-load-success", {
|
|
6451
|
-
toolId: "
|
|
6557
|
+
toolId: "textToSpeech",
|
|
6452
6558
|
operation: "server-provider-module-import",
|
|
6453
6559
|
backend: config.serverProvider || config.backend,
|
|
6454
6560
|
duration: Date.now() - moduleLoadStartedAt
|
|
@@ -6456,7 +6562,7 @@ class TTSToolProvider {
|
|
|
6456
6562
|
return loaded;
|
|
6457
6563
|
} catch (error) {
|
|
6458
6564
|
await this.emitTelemetry("pie-tool-library-load-error", {
|
|
6459
|
-
toolId: "
|
|
6565
|
+
toolId: "textToSpeech",
|
|
6460
6566
|
operation: "server-provider-module-import",
|
|
6461
6567
|
backend: config.serverProvider || config.backend,
|
|
6462
6568
|
duration: Date.now() - moduleLoadStartedAt,
|
|
@@ -6514,7 +6620,6 @@ var DEFAULT_TOOL_TAG_MAP = {
|
|
|
6514
6620
|
highlighter: "pie-tool-annotation-toolbar",
|
|
6515
6621
|
lineReader: "pie-tool-line-reader",
|
|
6516
6622
|
theme: "pie-tool-theme",
|
|
6517
|
-
colorScheme: "pie-tool-theme",
|
|
6518
6623
|
annotationToolbar: "pie-tool-annotation-toolbar",
|
|
6519
6624
|
graph: "pie-tool-graph",
|
|
6520
6625
|
periodicTable: "pie-tool-periodic-table"
|
|
@@ -6532,6 +6637,30 @@ var createToolElement = (toolId, context, toolbarContext, overrides) => {
|
|
|
6532
6637
|
};
|
|
6533
6638
|
|
|
6534
6639
|
// dist/tools/registrations/calculator.js
|
|
6640
|
+
var overlayElementCache = new WeakMap;
|
|
6641
|
+
function getCachedOverlay(coordinator, fullToolId) {
|
|
6642
|
+
if (!coordinator)
|
|
6643
|
+
return null;
|
|
6644
|
+
const scoped = overlayElementCache.get(coordinator);
|
|
6645
|
+
const element2 = scoped?.get(fullToolId);
|
|
6646
|
+
if (!element2)
|
|
6647
|
+
return null;
|
|
6648
|
+
if (!element2.isConnected) {
|
|
6649
|
+
scoped?.delete(fullToolId);
|
|
6650
|
+
return null;
|
|
6651
|
+
}
|
|
6652
|
+
return element2;
|
|
6653
|
+
}
|
|
6654
|
+
function setCachedOverlay(coordinator, fullToolId, element2) {
|
|
6655
|
+
if (!coordinator)
|
|
6656
|
+
return;
|
|
6657
|
+
let scoped = overlayElementCache.get(coordinator);
|
|
6658
|
+
if (!scoped) {
|
|
6659
|
+
scoped = new Map;
|
|
6660
|
+
overlayElementCache.set(coordinator, scoped);
|
|
6661
|
+
}
|
|
6662
|
+
scoped.set(fullToolId, element2);
|
|
6663
|
+
}
|
|
6535
6664
|
function normalizeCalculatorType(value) {
|
|
6536
6665
|
return value === "basic" || value === "scientific" ? value : null;
|
|
6537
6666
|
}
|
|
@@ -6601,7 +6730,11 @@ var calculatorToolRegistration = {
|
|
|
6601
6730
|
const { calculatorType, availableTypes, displayName } = getCalculatorRenderParams(toolbarContext);
|
|
6602
6731
|
const fullToolId = createScopedToolId(this.toolId, toolbarContext.scope.level, toolbarContext.scope.scopeId);
|
|
6603
6732
|
const componentOverrides = toolbarContext.componentOverrides;
|
|
6604
|
-
const
|
|
6733
|
+
const cachedOverlay = getCachedOverlay(toolbarContext.toolCoordinator, fullToolId);
|
|
6734
|
+
const overlay = cachedOverlay ?? createToolElement(this.toolId, context, toolbarContext, componentOverrides);
|
|
6735
|
+
if (!cachedOverlay) {
|
|
6736
|
+
setCachedOverlay(toolbarContext.toolCoordinator, fullToolId, overlay);
|
|
6737
|
+
}
|
|
6605
6738
|
overlay.setAttribute("tool-id", fullToolId);
|
|
6606
6739
|
overlay.toolkitCoordinator = toolbarContext.toolkitCoordinator;
|
|
6607
6740
|
applyCalculatorParamsToElement(overlay, calculatorType, availableTypes);
|
|
@@ -6618,7 +6751,9 @@ var calculatorToolRegistration = {
|
|
|
6618
6751
|
active: toolbarContext.isToolVisible(fullToolId)
|
|
6619
6752
|
};
|
|
6620
6753
|
let lastVisibleState = button.active;
|
|
6621
|
-
overlay.visible
|
|
6754
|
+
if (overlay.visible !== button.active) {
|
|
6755
|
+
overlay.visible = button.active;
|
|
6756
|
+
}
|
|
6622
6757
|
return {
|
|
6623
6758
|
toolId: this.toolId,
|
|
6624
6759
|
elements: [
|
|
@@ -6630,10 +6765,12 @@ var calculatorToolRegistration = {
|
|
|
6630
6765
|
draggable: true,
|
|
6631
6766
|
resizable: true,
|
|
6632
6767
|
closeable: true,
|
|
6633
|
-
initialWidth:
|
|
6634
|
-
initialHeight:
|
|
6635
|
-
minWidth:
|
|
6636
|
-
minHeight: 420
|
|
6768
|
+
initialWidth: 380,
|
|
6769
|
+
initialHeight: 420,
|
|
6770
|
+
minWidth: 380,
|
|
6771
|
+
minHeight: 420,
|
|
6772
|
+
initialAlign: "bottom-right",
|
|
6773
|
+
initialMargin: 16
|
|
6637
6774
|
}
|
|
6638
6775
|
}
|
|
6639
6776
|
],
|
|
@@ -6664,6 +6801,25 @@ var calculatorToolRegistration = {
|
|
|
6664
6801
|
}
|
|
6665
6802
|
};
|
|
6666
6803
|
|
|
6804
|
+
// dist/services/tts/math-speech.js
|
|
6805
|
+
var sreOperationQueue = Promise.resolve();
|
|
6806
|
+
var isPlainRecord = (value) => !!value && typeof value === "object" && !Array.isArray(value);
|
|
6807
|
+
var trimOption = (value) => typeof value === "string" && value.trim() ? value.trim() : undefined;
|
|
6808
|
+
var normalizeSREMathSpeechOptions = (options) => {
|
|
6809
|
+
if (!isPlainRecord(options))
|
|
6810
|
+
return;
|
|
6811
|
+
const domain = trimOption(options.domain);
|
|
6812
|
+
const style = trimOption(options.style);
|
|
6813
|
+
const engineOptions = isPlainRecord(options.engineOptions) ? options.engineOptions : undefined;
|
|
6814
|
+
if (!domain && !style && !engineOptions)
|
|
6815
|
+
return;
|
|
6816
|
+
return {
|
|
6817
|
+
...domain ? { domain } : {},
|
|
6818
|
+
...style ? { style } : {},
|
|
6819
|
+
...engineOptions ? { engineOptions } : {}
|
|
6820
|
+
};
|
|
6821
|
+
};
|
|
6822
|
+
|
|
6667
6823
|
// dist/services/tts-runtime-config.js
|
|
6668
6824
|
var VALID_TTS_LAYOUT_MODES = new Set([
|
|
6669
6825
|
"reserved-row",
|
|
@@ -6729,7 +6885,7 @@ var applyRuntimeDefaults = (config) => {
|
|
|
6729
6885
|
};
|
|
6730
6886
|
var resolveTTSRuntimeSettings = (config) => {
|
|
6731
6887
|
const configRecord = toRecord(config);
|
|
6732
|
-
const settingsRecord = toRecord(
|
|
6888
|
+
const settingsRecord = toRecord(configRecord.settings);
|
|
6733
6889
|
return applyRuntimeDefaults({
|
|
6734
6890
|
...configRecord,
|
|
6735
6891
|
...settingsRecord
|
|
@@ -6749,6 +6905,7 @@ var buildRuntimeTTSConfig = (config) => {
|
|
|
6749
6905
|
const backend = resolveTTSBackend(config);
|
|
6750
6906
|
const runtimeProvider = resolveRuntimeProvider(config, backend);
|
|
6751
6907
|
const transportMode = resolveTransportMode(config, runtimeProvider);
|
|
6908
|
+
const mathSpeech = normalizeSREMathSpeechOptions(config.mathSpeech);
|
|
6752
6909
|
return {
|
|
6753
6910
|
voice: config.defaultVoice,
|
|
6754
6911
|
rate: config.rate,
|
|
@@ -6763,7 +6920,8 @@ var buildRuntimeTTSConfig = (config) => {
|
|
|
6763
6920
|
} : {},
|
|
6764
6921
|
...transportMode === "custom" && typeof config.cache === "boolean" ? { cache: config.cache } : {},
|
|
6765
6922
|
...transportMode === "custom" && config.speedRate ? { speedRate: config.speedRate } : {},
|
|
6766
|
-
...transportMode === "custom" && config.lang_id ? { lang_id: config.lang_id } : {}
|
|
6923
|
+
...transportMode === "custom" && config.lang_id ? { lang_id: config.lang_id } : {},
|
|
6924
|
+
...mathSpeech ? { mathSpeech } : {}
|
|
6767
6925
|
},
|
|
6768
6926
|
apiEndpoint: config.apiEndpoint,
|
|
6769
6927
|
provider: runtimeProvider,
|
|
@@ -6772,7 +6930,8 @@ var buildRuntimeTTSConfig = (config) => {
|
|
|
6772
6930
|
endpointMode: config.endpointMode,
|
|
6773
6931
|
endpointValidationMode: config.endpointValidationMode,
|
|
6774
6932
|
includeAuthOnAssetFetch: config.includeAuthOnAssetFetch,
|
|
6775
|
-
validateEndpoint: config.validateEndpoint
|
|
6933
|
+
validateEndpoint: config.validateEndpoint,
|
|
6934
|
+
...typeof config.mathTokenHighlighting === "boolean" ? { mathTokenHighlighting: config.mathTokenHighlighting } : {}
|
|
6776
6935
|
};
|
|
6777
6936
|
};
|
|
6778
6937
|
var resolveTTSLayoutMode = (config) => normalizeTTSLayoutMode(config.layoutMode);
|
|
@@ -7238,7 +7397,6 @@ var themeToolRegistration = {
|
|
|
7238
7397
|
"highContrastDisplay",
|
|
7239
7398
|
"colorContrast",
|
|
7240
7399
|
"invertColors",
|
|
7241
|
-
"colorScheme",
|
|
7242
7400
|
"theme",
|
|
7243
7401
|
"highContrast",
|
|
7244
7402
|
"customColors"
|
|
@@ -8422,26 +8580,16 @@ var __pieDefineSafely = (tagName, ctor) => {
|
|
|
8422
8580
|
}
|
|
8423
8581
|
}
|
|
8424
8582
|
};
|
|
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>`);
|
|
8583
|
+
var root_1 = from_html(`<span class="item-toolbar__element-host svelte-rnx3ie"></span>`);
|
|
8584
|
+
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>`);
|
|
8585
|
+
var root_3 = from_html(`<span aria-hidden="true"></span>`);
|
|
8586
|
+
var root_4 = from_html(`<img class="item-toolbar__icon-image svelte-rnx3ie" alt=""/>`);
|
|
8587
|
+
var root_5 = from_html(`<i aria-hidden="true"></i>`);
|
|
8588
|
+
var root_6 = from_html(`<a><!></a>`);
|
|
8589
|
+
var root_7 = from_html(`<button type="button"><!></button>`);
|
|
8590
|
+
var root_8 = from_html(`<span class="item-toolbar__controls-host svelte-rnx3ie"></span>`);
|
|
8591
|
+
var root_9 = from_html(`<div></div>`);
|
|
8592
|
+
var root_10 = from_html(`<div><div class="item-toolbar__tools-row svelte-rnx3ie"><!> <!> <!></div> <!></div>`);
|
|
8445
8593
|
var $$css = {
|
|
8446
8594
|
hash: "svelte-rnx3ie",
|
|
8447
8595
|
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 +8598,10 @@ var $$css = {
|
|
|
8450
8598
|
.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
8599
|
.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
8600
|
|
|
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%;}
|
|
8601
|
+
/* 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%;}
|
|
8602
|
+
|
|
8603
|
+
/* Defensive: if FA fails to load (shadow injection misses, CSP blocks the
|
|
8604
|
+
stylesheet, etc.), the <i> would otherwise render as italic text. */.item-toolbar__calculator-icon.svelte-rnx3ie > i:where(.svelte-rnx3ie) {font-style:normal;}`
|
|
8454
8605
|
};
|
|
8455
8606
|
function ItemToolBar($$anchor, $$props) {
|
|
8456
8607
|
push($$props, true);
|
|
@@ -8459,7 +8610,6 @@ function ItemToolBar($$anchor, $$props) {
|
|
|
8459
8610
|
const FA_PRO_HREFS = ["/_fa-pro/fontawesome.min.css", "/_fa-pro/light.min.css"];
|
|
8460
8611
|
const FA_FREE_HREF = "https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.5.2/css/all.min.css";
|
|
8461
8612
|
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
8613
|
let ndsAssetsInstalled = false;
|
|
8464
8614
|
const ensureNdsAssets = () => {
|
|
8465
8615
|
if (!isBrowser || ndsAssetsInstalled)
|
|
@@ -8485,14 +8635,9 @@ function ItemToolBar($$anchor, $$props) {
|
|
|
8485
8635
|
link2.href = href;
|
|
8486
8636
|
document.head.appendChild(link2);
|
|
8487
8637
|
}
|
|
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
8638
|
};
|
|
8495
8639
|
const FA_TOOLBAR_SHADOW_INSTALLED = "__pieFaToolbarShadowInstalled";
|
|
8640
|
+
const FA_HREF_PATTERN = /font.?awesome|fa-?pro/i;
|
|
8496
8641
|
const installFaInToolbarShadow = (root) => {
|
|
8497
8642
|
const shadow = root.getRootNode();
|
|
8498
8643
|
if (!(shadow instanceof ShadowRoot))
|
|
@@ -8501,15 +8646,19 @@ function ItemToolBar($$anchor, $$props) {
|
|
|
8501
8646
|
if (marker[FA_TOOLBAR_SHADOW_INSTALLED])
|
|
8502
8647
|
return;
|
|
8503
8648
|
marker[FA_TOOLBAR_SHADOW_INSTALLED] = true;
|
|
8649
|
+
const seenHrefs = new Set;
|
|
8504
8650
|
const appendLink = (href) => {
|
|
8651
|
+
if (!href || seenHrefs.has(href))
|
|
8652
|
+
return;
|
|
8653
|
+
seenHrefs.add(href);
|
|
8505
8654
|
const link2 = document.createElement("link");
|
|
8506
8655
|
link2.rel = "stylesheet";
|
|
8507
8656
|
link2.href = href;
|
|
8508
8657
|
shadow.appendChild(link2);
|
|
8509
8658
|
};
|
|
8510
|
-
|
|
8511
|
-
for (const
|
|
8512
|
-
appendLink(href);
|
|
8659
|
+
const documentFaLinks = Array.from(document.querySelectorAll('link[rel="stylesheet"][href]')).filter((link2) => FA_HREF_PATTERN.test(link2.href));
|
|
8660
|
+
for (const link2 of documentFaLinks)
|
|
8661
|
+
appendLink(link2.href);
|
|
8513
8662
|
const shim = document.createElement("style");
|
|
8514
8663
|
shim.textContent = '.fa-light{font-family:"Font Awesome 6 Free";font-weight:900;}';
|
|
8515
8664
|
shadow.appendChild(shim);
|
|
@@ -9089,6 +9238,10 @@ function ItemToolBar($$anchor, $$props) {
|
|
|
9089
9238
|
let controlsEl = null;
|
|
9090
9239
|
let closeButtonEl = null;
|
|
9091
9240
|
let resizeHandleEl = null;
|
|
9241
|
+
let startFocusGuardEl = null;
|
|
9242
|
+
let endFocusGuardEl = null;
|
|
9243
|
+
let focusGuardRedirecting = false;
|
|
9244
|
+
let calculatorBridgeAttached = false;
|
|
9092
9245
|
let mountedContentElement = null;
|
|
9093
9246
|
let dragPointerId = null;
|
|
9094
9247
|
let resizePointerId = null;
|
|
@@ -9098,6 +9251,10 @@ function ItemToolBar($$anchor, $$props) {
|
|
|
9098
9251
|
let resizeStartHeight = 0;
|
|
9099
9252
|
let resizeStartX = 0;
|
|
9100
9253
|
let resizeStartY = 0;
|
|
9254
|
+
let resizeStartShellX = 0;
|
|
9255
|
+
let resizeStartShellY = 0;
|
|
9256
|
+
let resizeCorner = null;
|
|
9257
|
+
const resizeHandleEls = [];
|
|
9101
9258
|
let x2 = 0;
|
|
9102
9259
|
let y2 = 0;
|
|
9103
9260
|
let width = currentArgs.mounted.entry.shell?.initialWidth ?? 720;
|
|
@@ -9172,7 +9329,7 @@ function ItemToolBar($$anchor, $$props) {
|
|
|
9172
9329
|
height += dh;
|
|
9173
9330
|
applyPositionAndSize();
|
|
9174
9331
|
};
|
|
9175
|
-
const createShellIconButton = (label, iconName, onActivate) => {
|
|
9332
|
+
const createShellIconButton = (label, iconName, onActivate, faVariant = "fa-regular") => {
|
|
9176
9333
|
const button = document.createElement("nds-icon-button");
|
|
9177
9334
|
button.setAttribute("variant", "tertiary");
|
|
9178
9335
|
button.setAttribute("size", "small");
|
|
@@ -9185,6 +9342,25 @@ function ItemToolBar($$anchor, $$props) {
|
|
|
9185
9342
|
onActivate();
|
|
9186
9343
|
bringToFront();
|
|
9187
9344
|
});
|
|
9345
|
+
if (faVariant !== "fa-light") {
|
|
9346
|
+
const swapVariant = (icon) => {
|
|
9347
|
+
icon.classList.remove("fa-light");
|
|
9348
|
+
icon.classList.add(faVariant);
|
|
9349
|
+
};
|
|
9350
|
+
const existing = button.querySelector("i.fa-light");
|
|
9351
|
+
if (existing) {
|
|
9352
|
+
swapVariant(existing);
|
|
9353
|
+
} else {
|
|
9354
|
+
const observer = new MutationObserver(() => {
|
|
9355
|
+
const target = button.querySelector("i.fa-light");
|
|
9356
|
+
if (target) {
|
|
9357
|
+
swapVariant(target);
|
|
9358
|
+
observer.disconnect();
|
|
9359
|
+
}
|
|
9360
|
+
});
|
|
9361
|
+
observer.observe(button, { childList: true, subtree: true });
|
|
9362
|
+
}
|
|
9363
|
+
}
|
|
9188
9364
|
return button;
|
|
9189
9365
|
};
|
|
9190
9366
|
const createShellControlButton = (label, glyph, onActivate) => {
|
|
@@ -9265,8 +9441,31 @@ function ItemToolBar($$anchor, $$props) {
|
|
|
9265
9441
|
const centerShell = () => {
|
|
9266
9442
|
const viewportW = window.innerWidth;
|
|
9267
9443
|
const viewportH = window.innerHeight;
|
|
9268
|
-
|
|
9269
|
-
|
|
9444
|
+
const shellConfig = currentArgs.mounted.entry.shell;
|
|
9445
|
+
const align = shellConfig?.initialAlign ?? "center";
|
|
9446
|
+
const margin = shellConfig?.initialMargin ?? 16;
|
|
9447
|
+
const verticalMargin = margin + 60;
|
|
9448
|
+
switch (align) {
|
|
9449
|
+
case "top-left":
|
|
9450
|
+
x2 = margin;
|
|
9451
|
+
y2 = verticalMargin;
|
|
9452
|
+
break;
|
|
9453
|
+
case "top-right":
|
|
9454
|
+
x2 = Math.max(0, viewportW - width - margin);
|
|
9455
|
+
y2 = verticalMargin;
|
|
9456
|
+
break;
|
|
9457
|
+
case "bottom-left":
|
|
9458
|
+
x2 = margin;
|
|
9459
|
+
y2 = Math.max(0, viewportH - height - verticalMargin);
|
|
9460
|
+
break;
|
|
9461
|
+
case "bottom-right":
|
|
9462
|
+
x2 = Math.max(0, viewportW - width - margin);
|
|
9463
|
+
y2 = Math.max(0, viewportH - height - verticalMargin);
|
|
9464
|
+
break;
|
|
9465
|
+
default:
|
|
9466
|
+
x2 = Math.max(0, Math.round((viewportW - width) / 2));
|
|
9467
|
+
y2 = Math.max(0, Math.round((viewportH - height) / 2));
|
|
9468
|
+
}
|
|
9270
9469
|
applyPositionAndSize();
|
|
9271
9470
|
};
|
|
9272
9471
|
const restoreOpenerFocus = () => {
|
|
@@ -9302,14 +9501,113 @@ function ItemToolBar($$anchor, $$props) {
|
|
|
9302
9501
|
if (!openerEl && active && !shellEl.contains(active)) {
|
|
9303
9502
|
openerEl = active;
|
|
9304
9503
|
}
|
|
9504
|
+
const isCalculatorShellTrap = currentArgs.mounted.toolId === "calculator";
|
|
9505
|
+
if (isCalculatorShellTrap && !calculatorBridgeAttached) {
|
|
9506
|
+
document.addEventListener("keydown", onCalculatorBridgeKeydown, true);
|
|
9507
|
+
calculatorBridgeAttached = true;
|
|
9508
|
+
}
|
|
9305
9509
|
focusTrapCleanup = createFocusTrap(shellEl, {
|
|
9306
9510
|
initialFocus: closeButtonEl,
|
|
9307
9511
|
onEscape: () => {
|
|
9308
9512
|
closeShell();
|
|
9309
|
-
}
|
|
9513
|
+
},
|
|
9514
|
+
wrap: !isCalculatorShellTrap,
|
|
9515
|
+
onTabExit: isCalculatorShellTrap ? (direction, event2) => {
|
|
9516
|
+
if (direction === "backward") {
|
|
9517
|
+
if (openerEl?.isConnected) {
|
|
9518
|
+
event2.preventDefault();
|
|
9519
|
+
try {
|
|
9520
|
+
openerEl.focus();
|
|
9521
|
+
} catch {}
|
|
9522
|
+
}
|
|
9523
|
+
return;
|
|
9524
|
+
}
|
|
9525
|
+
const next2 = findFirstQuestionFocusable();
|
|
9526
|
+
if (next2) {
|
|
9527
|
+
event2.preventDefault();
|
|
9528
|
+
try {
|
|
9529
|
+
next2.focus();
|
|
9530
|
+
} catch {}
|
|
9531
|
+
}
|
|
9532
|
+
} : undefined
|
|
9310
9533
|
});
|
|
9311
9534
|
};
|
|
9535
|
+
const findFirstQuestionFocusable = () => {
|
|
9536
|
+
const scope = get2(toolbarContext).getScopeElement?.() ?? null;
|
|
9537
|
+
if (!scope)
|
|
9538
|
+
return null;
|
|
9539
|
+
const isExcluded = (el) => {
|
|
9540
|
+
if (get2(toolbarRootElement) && get2(toolbarRootElement).contains(el))
|
|
9541
|
+
return true;
|
|
9542
|
+
if (shellEl && shellEl.contains(el))
|
|
9543
|
+
return true;
|
|
9544
|
+
return false;
|
|
9545
|
+
};
|
|
9546
|
+
const visit = (node2) => {
|
|
9547
|
+
if (node2 instanceof HTMLElement) {
|
|
9548
|
+
if (isExcluded(node2))
|
|
9549
|
+
return null;
|
|
9550
|
+
if (node2.matches?.(FOCUSABLE_SELECTOR) && isProgrammaticFocusTarget(node2)) {
|
|
9551
|
+
return node2;
|
|
9552
|
+
}
|
|
9553
|
+
}
|
|
9554
|
+
const shadow = node2.shadowRoot;
|
|
9555
|
+
if (shadow) {
|
|
9556
|
+
for (let i = 0;i < shadow.children.length; i++) {
|
|
9557
|
+
const found = visit(shadow.children[i]);
|
|
9558
|
+
if (found)
|
|
9559
|
+
return found;
|
|
9560
|
+
}
|
|
9561
|
+
}
|
|
9562
|
+
for (let i = 0;i < node2.children.length; i++) {
|
|
9563
|
+
const found = visit(node2.children[i]);
|
|
9564
|
+
if (found)
|
|
9565
|
+
return found;
|
|
9566
|
+
}
|
|
9567
|
+
return null;
|
|
9568
|
+
};
|
|
9569
|
+
return visit(scope);
|
|
9570
|
+
};
|
|
9571
|
+
const getShellFocusables = () => {
|
|
9572
|
+
if (!shellEl)
|
|
9573
|
+
return [];
|
|
9574
|
+
return Array.from(shellEl.querySelectorAll(FOCUSABLE_SELECTOR)).filter((el) => el !== startFocusGuardEl && el !== endFocusGuardEl).filter(isProgrammaticFocusTarget);
|
|
9575
|
+
};
|
|
9576
|
+
const onCalculatorBridgeKeydown = (event2) => {
|
|
9577
|
+
if (event2.key !== "Tab")
|
|
9578
|
+
return;
|
|
9579
|
+
if (!shellEl || !currentArgs.active)
|
|
9580
|
+
return;
|
|
9581
|
+
const active = getDeepActiveElement();
|
|
9582
|
+
if (!active)
|
|
9583
|
+
return;
|
|
9584
|
+
if (shellEl.contains(active))
|
|
9585
|
+
return;
|
|
9586
|
+
const focusables = getShellFocusables();
|
|
9587
|
+
if (focusables.length === 0)
|
|
9588
|
+
return;
|
|
9589
|
+
if (event2.shiftKey) {
|
|
9590
|
+
const firstQuestion = findFirstQuestionFocusable();
|
|
9591
|
+
if (active !== firstQuestion)
|
|
9592
|
+
return;
|
|
9593
|
+
event2.preventDefault();
|
|
9594
|
+
try {
|
|
9595
|
+
focusables[focusables.length - 1].focus();
|
|
9596
|
+
} catch {}
|
|
9597
|
+
return;
|
|
9598
|
+
}
|
|
9599
|
+
if (active !== openerEl)
|
|
9600
|
+
return;
|
|
9601
|
+
event2.preventDefault();
|
|
9602
|
+
try {
|
|
9603
|
+
focusables[0].focus();
|
|
9604
|
+
} catch {}
|
|
9605
|
+
};
|
|
9312
9606
|
const removeFocusTrap = () => {
|
|
9607
|
+
if (calculatorBridgeAttached) {
|
|
9608
|
+
document.removeEventListener("keydown", onCalculatorBridgeKeydown, true);
|
|
9609
|
+
calculatorBridgeAttached = false;
|
|
9610
|
+
}
|
|
9313
9611
|
if (!focusTrapCleanup)
|
|
9314
9612
|
return;
|
|
9315
9613
|
const cleanup = focusTrapCleanup;
|
|
@@ -9327,25 +9625,28 @@ function ItemToolBar($$anchor, $$props) {
|
|
|
9327
9625
|
if (!currentArgs.mounted.entry.shell?.draggable)
|
|
9328
9626
|
return;
|
|
9329
9627
|
const target = event2.target;
|
|
9330
|
-
if (target.closest("button"))
|
|
9331
|
-
return;
|
|
9332
|
-
if (!shellEl)
|
|
9628
|
+
if (target.closest("button") || !shellEl)
|
|
9333
9629
|
return;
|
|
9630
|
+
event2.preventDefault();
|
|
9334
9631
|
dragPointerId = event2.pointerId;
|
|
9335
9632
|
dragOffsetX = event2.clientX - x2;
|
|
9336
9633
|
dragOffsetY = event2.clientY - y2;
|
|
9337
9634
|
shellEl.setPointerCapture(event2.pointerId);
|
|
9338
9635
|
bringToFront();
|
|
9339
9636
|
};
|
|
9340
|
-
const
|
|
9637
|
+
const createResizePointerDownHandler = (corner) => (event2) => {
|
|
9341
9638
|
if (!shellEl || !currentArgs.mounted.entry.shell?.resizable)
|
|
9342
9639
|
return;
|
|
9640
|
+
event2.preventDefault();
|
|
9343
9641
|
event2.stopPropagation();
|
|
9344
9642
|
resizePointerId = event2.pointerId;
|
|
9643
|
+
resizeCorner = corner;
|
|
9345
9644
|
resizeStartWidth = width;
|
|
9346
9645
|
resizeStartHeight = height;
|
|
9347
9646
|
resizeStartX = event2.clientX;
|
|
9348
9647
|
resizeStartY = event2.clientY;
|
|
9648
|
+
resizeStartShellX = x2;
|
|
9649
|
+
resizeStartShellY = y2;
|
|
9349
9650
|
shellEl.setPointerCapture(event2.pointerId);
|
|
9350
9651
|
bringToFront();
|
|
9351
9652
|
};
|
|
@@ -9353,6 +9654,7 @@ function ItemToolBar($$anchor, $$props) {
|
|
|
9353
9654
|
if (!shellEl)
|
|
9354
9655
|
return;
|
|
9355
9656
|
if (dragPointerId === event2.pointerId) {
|
|
9657
|
+
event2.preventDefault();
|
|
9356
9658
|
const maxX = Math.max(0, window.innerWidth - width);
|
|
9357
9659
|
const maxY = Math.max(0, window.innerHeight - height);
|
|
9358
9660
|
x2 = clamp(event2.clientX - dragOffsetX, 0, maxX);
|
|
@@ -9361,13 +9663,39 @@ function ItemToolBar($$anchor, $$props) {
|
|
|
9361
9663
|
return;
|
|
9362
9664
|
}
|
|
9363
9665
|
if (resizePointerId === event2.pointerId) {
|
|
9666
|
+
event2.preventDefault();
|
|
9364
9667
|
const shellConfig = currentArgs.mounted.entry.shell;
|
|
9365
9668
|
const minWidth = shellConfig?.minWidth ?? 320;
|
|
9366
9669
|
const minHeight = shellConfig?.minHeight ?? 240;
|
|
9367
9670
|
const maxWidth = shellConfig?.maxWidth ?? window.innerWidth;
|
|
9368
9671
|
const maxHeight = shellConfig?.maxHeight ?? window.innerHeight;
|
|
9369
|
-
|
|
9370
|
-
|
|
9672
|
+
const dx = event2.clientX - resizeStartX;
|
|
9673
|
+
const dy = event2.clientY - resizeStartY;
|
|
9674
|
+
if (resizeCorner === "se") {
|
|
9675
|
+
width = clamp(resizeStartWidth + dx, minWidth, Math.max(minWidth, Math.min(maxWidth, window.innerWidth - x2)));
|
|
9676
|
+
height = clamp(resizeStartHeight + dy, minHeight, Math.max(minHeight, Math.min(maxHeight, window.innerHeight - y2)));
|
|
9677
|
+
} else if (resizeCorner === "sw") {
|
|
9678
|
+
const rightEdge = resizeStartShellX + resizeStartWidth;
|
|
9679
|
+
const newWidth = clamp(resizeStartWidth - dx, minWidth, Math.min(maxWidth, rightEdge));
|
|
9680
|
+
x2 = rightEdge - newWidth;
|
|
9681
|
+
width = newWidth;
|
|
9682
|
+
height = clamp(resizeStartHeight + dy, minHeight, Math.max(minHeight, Math.min(maxHeight, window.innerHeight - y2)));
|
|
9683
|
+
} else if (resizeCorner === "ne") {
|
|
9684
|
+
const bottomEdge = resizeStartShellY + resizeStartHeight;
|
|
9685
|
+
width = clamp(resizeStartWidth + dx, minWidth, Math.max(minWidth, Math.min(maxWidth, window.innerWidth - x2)));
|
|
9686
|
+
const newHeight = clamp(resizeStartHeight - dy, minHeight, Math.min(maxHeight, bottomEdge));
|
|
9687
|
+
y2 = bottomEdge - newHeight;
|
|
9688
|
+
height = newHeight;
|
|
9689
|
+
} else if (resizeCorner === "nw") {
|
|
9690
|
+
const rightEdge = resizeStartShellX + resizeStartWidth;
|
|
9691
|
+
const bottomEdge = resizeStartShellY + resizeStartHeight;
|
|
9692
|
+
const newWidth = clamp(resizeStartWidth - dx, minWidth, Math.min(maxWidth, rightEdge));
|
|
9693
|
+
x2 = rightEdge - newWidth;
|
|
9694
|
+
width = newWidth;
|
|
9695
|
+
const newHeight = clamp(resizeStartHeight - dy, minHeight, Math.min(maxHeight, bottomEdge));
|
|
9696
|
+
y2 = bottomEdge - newHeight;
|
|
9697
|
+
height = newHeight;
|
|
9698
|
+
}
|
|
9371
9699
|
applyShellStyle();
|
|
9372
9700
|
notifyHostedResize();
|
|
9373
9701
|
}
|
|
@@ -9400,14 +9728,20 @@ function ItemToolBar($$anchor, $$props) {
|
|
|
9400
9728
|
shellEl.style.border = "1px solid var(--pie-border-light, #d1d5db)";
|
|
9401
9729
|
shellEl.style.borderRadius = "12px";
|
|
9402
9730
|
shellEl.style.boxShadow = "0 10px 40px color-mix(in srgb, var(--pie-black, #000) 25%, transparent)";
|
|
9403
|
-
shellEl.style.overflow = "
|
|
9731
|
+
shellEl.style.overflow = "visible";
|
|
9404
9732
|
shellEl.style.display = currentArgs.active ? "flex" : "none";
|
|
9405
9733
|
shellEl.style.flexDirection = "column";
|
|
9734
|
+
shellEl.style.userSelect = "none";
|
|
9735
|
+
shellEl.style.webkitUserSelect = "none";
|
|
9736
|
+
shellEl.style.touchAction = "none";
|
|
9737
|
+
shellEl.setAttribute("draggable", "false");
|
|
9738
|
+
shellEl.addEventListener("dragstart", (e) => e.preventDefault());
|
|
9406
9739
|
headerEl = document.createElement("div");
|
|
9407
9740
|
headerEl.className = "pie-tool-shell__header";
|
|
9408
9741
|
headerEl.style.display = "flex";
|
|
9409
9742
|
headerEl.style.alignItems = "center";
|
|
9410
9743
|
headerEl.style.justifyContent = "space-between";
|
|
9744
|
+
headerEl.style.gap = "6px";
|
|
9411
9745
|
headerEl.style.padding = isCalculatorShell ? "12px 12px 12px 28px" : "10px 12px";
|
|
9412
9746
|
if (isCalculatorShell) {
|
|
9413
9747
|
headerEl.style.minHeight = "48px";
|
|
@@ -9422,6 +9756,13 @@ function ItemToolBar($$anchor, $$props) {
|
|
|
9422
9756
|
}
|
|
9423
9757
|
headerEl.style.cursor = currentArgs.mounted.entry.shell.draggable === false ? "default" : "move";
|
|
9424
9758
|
headerEl.style.flex = "0 0 auto";
|
|
9759
|
+
headerEl.style.borderRadius = "12px 12px 0 0";
|
|
9760
|
+
headerEl.style.overflow = "hidden";
|
|
9761
|
+
headerEl.style.userSelect = "none";
|
|
9762
|
+
headerEl.style.webkitUserSelect = "none";
|
|
9763
|
+
headerEl.style.touchAction = "none";
|
|
9764
|
+
headerEl.setAttribute("draggable", "false");
|
|
9765
|
+
headerEl.addEventListener("dragstart", (e) => e.preventDefault());
|
|
9425
9766
|
titleEl = document.createElement("span");
|
|
9426
9767
|
titleEl.className = "pie-tool-shell__title";
|
|
9427
9768
|
titleEl.textContent = currentArgs.mounted.entry.shell.title || currentArgs.mounted.toolId;
|
|
@@ -9432,10 +9773,10 @@ function ItemToolBar($$anchor, $$props) {
|
|
|
9432
9773
|
controlsEl.style.alignItems = "center";
|
|
9433
9774
|
controlsEl.style.gap = isCalculatorShell ? "6px" : "4px";
|
|
9434
9775
|
const shellConfig = currentArgs.mounted.entry.shell;
|
|
9435
|
-
const appendControl = (label, glyph, iconName, onActivate) => {
|
|
9776
|
+
const appendControl = (label, glyph, iconName, onActivate, faVariant = "fa-regular") => {
|
|
9436
9777
|
if (!controlsEl)
|
|
9437
9778
|
return;
|
|
9438
|
-
controlsEl.appendChild(isCalculatorShell ? createShellIconButton(label, iconName, onActivate) : createShellControlButton(label, glyph, onActivate));
|
|
9779
|
+
controlsEl.appendChild(isCalculatorShell ? createShellIconButton(label, iconName, onActivate, faVariant) : createShellControlButton(label, glyph, onActivate));
|
|
9439
9780
|
};
|
|
9440
9781
|
if (shellConfig?.draggable !== false) {
|
|
9441
9782
|
appendControl("Move tool left", "←", "chevron-left", () => moveBy(-24, 0));
|
|
@@ -9463,15 +9804,8 @@ function ItemToolBar($$anchor, $$props) {
|
|
|
9463
9804
|
headerEl.appendChild(controlsEl);
|
|
9464
9805
|
}
|
|
9465
9806
|
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";
|
|
9807
|
+
closeButtonEl = createShellIconButton("Close tool", "xmark", closeShell, "fa-regular");
|
|
9473
9808
|
closeButtonEl.style.display = currentArgs.mounted.entry.shell.closeable === false ? "none" : "inline-block";
|
|
9474
|
-
closeButtonEl.addEventListener("click", closeShell);
|
|
9475
9809
|
} else {
|
|
9476
9810
|
const closeButton = document.createElement("button");
|
|
9477
9811
|
closeButton.type = "button";
|
|
@@ -9575,20 +9909,100 @@ function ItemToolBar($$anchor, $$props) {
|
|
|
9575
9909
|
contentEl.style.width = "100%";
|
|
9576
9910
|
contentEl.style.flex = "1 1 auto";
|
|
9577
9911
|
contentEl.style.minHeight = "0";
|
|
9912
|
+
contentEl.style.overflow = "hidden";
|
|
9913
|
+
contentEl.style.borderRadius = "0 0 12px 12px";
|
|
9914
|
+
if (isCalculatorShell) {
|
|
9915
|
+
const makeFocusGuard = (label) => {
|
|
9916
|
+
const el = document.createElement("div");
|
|
9917
|
+
el.tabIndex = 0;
|
|
9918
|
+
el.setAttribute("aria-hidden", "true");
|
|
9919
|
+
el.setAttribute("data-pie-tool-shell-focus-guard", label);
|
|
9920
|
+
el.style.position = "absolute";
|
|
9921
|
+
el.style.width = "1px";
|
|
9922
|
+
el.style.height = "1px";
|
|
9923
|
+
el.style.padding = "0";
|
|
9924
|
+
el.style.margin = "-1px";
|
|
9925
|
+
el.style.overflow = "hidden";
|
|
9926
|
+
el.style.clipPath = "inset(50%)";
|
|
9927
|
+
el.style.whiteSpace = "nowrap";
|
|
9928
|
+
el.style.border = "0";
|
|
9929
|
+
return el;
|
|
9930
|
+
};
|
|
9931
|
+
startFocusGuardEl = makeFocusGuard("start");
|
|
9932
|
+
endFocusGuardEl = makeFocusGuard("end");
|
|
9933
|
+
startFocusGuardEl.addEventListener("focus", (event2) => {
|
|
9934
|
+
if (focusGuardRedirecting)
|
|
9935
|
+
return;
|
|
9936
|
+
focusGuardRedirecting = true;
|
|
9937
|
+
try {
|
|
9938
|
+
event2.stopPropagation();
|
|
9939
|
+
if (openerEl?.isConnected) {
|
|
9940
|
+
try {
|
|
9941
|
+
openerEl.focus();
|
|
9942
|
+
} catch {}
|
|
9943
|
+
}
|
|
9944
|
+
} finally {
|
|
9945
|
+
queueMicrotask(() => {
|
|
9946
|
+
focusGuardRedirecting = false;
|
|
9947
|
+
});
|
|
9948
|
+
}
|
|
9949
|
+
});
|
|
9950
|
+
endFocusGuardEl.addEventListener("focus", (event2) => {
|
|
9951
|
+
if (focusGuardRedirecting)
|
|
9952
|
+
return;
|
|
9953
|
+
focusGuardRedirecting = true;
|
|
9954
|
+
try {
|
|
9955
|
+
event2.stopPropagation();
|
|
9956
|
+
const next2 = findFirstQuestionFocusable();
|
|
9957
|
+
if (next2) {
|
|
9958
|
+
try {
|
|
9959
|
+
next2.focus();
|
|
9960
|
+
} catch {}
|
|
9961
|
+
}
|
|
9962
|
+
} finally {
|
|
9963
|
+
queueMicrotask(() => {
|
|
9964
|
+
focusGuardRedirecting = false;
|
|
9965
|
+
});
|
|
9966
|
+
}
|
|
9967
|
+
});
|
|
9968
|
+
shellEl.appendChild(startFocusGuardEl);
|
|
9969
|
+
}
|
|
9578
9970
|
shellEl.appendChild(headerEl);
|
|
9579
9971
|
shellEl.appendChild(contentEl);
|
|
9972
|
+
if (isCalculatorShell && endFocusGuardEl) {
|
|
9973
|
+
shellEl.appendChild(endFocusGuardEl);
|
|
9974
|
+
}
|
|
9580
9975
|
if (currentArgs.mounted.entry.shell.resizable !== false) {
|
|
9581
|
-
|
|
9582
|
-
|
|
9583
|
-
|
|
9584
|
-
|
|
9585
|
-
|
|
9586
|
-
|
|
9587
|
-
|
|
9588
|
-
|
|
9589
|
-
|
|
9590
|
-
|
|
9591
|
-
|
|
9976
|
+
const addResizeHandle = (corner, top, right, bottom, left, cursor, gradientAngle) => {
|
|
9977
|
+
const el = document.createElement("div");
|
|
9978
|
+
el.className = "pie-tool-shell__resize";
|
|
9979
|
+
el.style.position = "absolute";
|
|
9980
|
+
el.style.width = "24px";
|
|
9981
|
+
el.style.height = "24px";
|
|
9982
|
+
el.style.cursor = cursor;
|
|
9983
|
+
el.style.zIndex = "10";
|
|
9984
|
+
el.style.touchAction = "none";
|
|
9985
|
+
el.setAttribute("draggable", "false");
|
|
9986
|
+
if (top !== null)
|
|
9987
|
+
el.style.top = top;
|
|
9988
|
+
if (right !== null)
|
|
9989
|
+
el.style.right = right;
|
|
9990
|
+
if (bottom !== null)
|
|
9991
|
+
el.style.bottom = bottom;
|
|
9992
|
+
if (left !== null)
|
|
9993
|
+
el.style.left = left;
|
|
9994
|
+
if (gradientAngle !== null) {
|
|
9995
|
+
el.style.background = `linear-gradient(${gradientAngle}, transparent 0%, transparent 40%, rgba(0,0,0,0.35) 40%, rgba(0,0,0,0.35) 60%, transparent 60%, transparent 100%)`;
|
|
9996
|
+
}
|
|
9997
|
+
const handler = createResizePointerDownHandler(corner);
|
|
9998
|
+
el.addEventListener("pointerdown", handler);
|
|
9999
|
+
shellEl.appendChild(el);
|
|
10000
|
+
resizeHandleEls.push({ el, handler });
|
|
10001
|
+
};
|
|
10002
|
+
addResizeHandle("se", null, "0", "0", null, "nwse-resize", null);
|
|
10003
|
+
addResizeHandle("nw", "0", null, null, "0", "nwse-resize", "135deg");
|
|
10004
|
+
addResizeHandle("ne", "0", "0", null, null, "nesw-resize", null);
|
|
10005
|
+
addResizeHandle("sw", null, null, "0", "0", "nesw-resize", null);
|
|
9592
10006
|
}
|
|
9593
10007
|
headerEl.addEventListener("pointerdown", onHeaderPointerDown);
|
|
9594
10008
|
shellEl.addEventListener("pointermove", onShellPointerMove);
|
|
@@ -9629,10 +10043,15 @@ function ItemToolBar($$anchor, $$props) {
|
|
|
9629
10043
|
if (focusTrapCleanup) {
|
|
9630
10044
|
removeFocusTrap();
|
|
9631
10045
|
}
|
|
9632
|
-
|
|
9633
|
-
|
|
9634
|
-
|
|
10046
|
+
if (calculatorBridgeAttached) {
|
|
10047
|
+
document.removeEventListener("keydown", onCalculatorBridgeKeydown, true);
|
|
10048
|
+
calculatorBridgeAttached = false;
|
|
9635
10049
|
}
|
|
10050
|
+
for (const { el, handler } of resizeHandleEls) {
|
|
10051
|
+
el.removeEventListener("pointerdown", handler);
|
|
10052
|
+
}
|
|
10053
|
+
openerEl = null;
|
|
10054
|
+
resizeHandleEls.length = 0;
|
|
9636
10055
|
if (headerEl) {
|
|
9637
10056
|
headerEl.removeEventListener("pointerdown", onHeaderPointerDown);
|
|
9638
10057
|
headerEl.onkeydown = null;
|
|
@@ -9765,7 +10184,7 @@ function ItemToolBar($$anchor, $$props) {
|
|
|
9765
10184
|
var node_1 = first_child(fragment);
|
|
9766
10185
|
{
|
|
9767
10186
|
var consequent_15 = ($$anchor2) => {
|
|
9768
|
-
var div =
|
|
10187
|
+
var div = root_10();
|
|
9769
10188
|
let classes;
|
|
9770
10189
|
var div_1 = child(div);
|
|
9771
10190
|
var node_2 = child(div_1);
|
|
@@ -9774,7 +10193,7 @@ function ItemToolBar($$anchor, $$props) {
|
|
|
9774
10193
|
var node_3 = first_child(fragment_1);
|
|
9775
10194
|
{
|
|
9776
10195
|
var consequent = ($$anchor4) => {
|
|
9777
|
-
var span =
|
|
10196
|
+
var span = root_1();
|
|
9778
10197
|
action(span, ($$node, $$action_arg) => mountElementWithShell?.($$node, $$action_arg), () => ({
|
|
9779
10198
|
mounted: get2(mounted),
|
|
9780
10199
|
active: get2(renderedToolActiveById)[get2(mounted).toolId] ?? false
|
|
@@ -9782,7 +10201,7 @@ function ItemToolBar($$anchor, $$props) {
|
|
|
9782
10201
|
append($$anchor4, span);
|
|
9783
10202
|
};
|
|
9784
10203
|
var alternate = ($$anchor4) => {
|
|
9785
|
-
var span_1 =
|
|
10204
|
+
var span_1 = root_1();
|
|
9786
10205
|
action(span_1, ($$node, $$action_arg) => mountElement?.($$node, $$action_arg), () => get2(mounted).entry.element);
|
|
9787
10206
|
append($$anchor4, span_1);
|
|
9788
10207
|
};
|
|
@@ -9801,7 +10220,7 @@ function ItemToolBar($$anchor, $$props) {
|
|
|
9801
10220
|
var node_5 = first_child(fragment_2);
|
|
9802
10221
|
{
|
|
9803
10222
|
var consequent_6 = ($$anchor4) => {
|
|
9804
|
-
var a =
|
|
10223
|
+
var a = root_6();
|
|
9805
10224
|
let classes_1;
|
|
9806
10225
|
var node_6 = child(a);
|
|
9807
10226
|
{
|
|
@@ -9810,19 +10229,19 @@ function ItemToolBar($$anchor, $$props) {
|
|
|
9810
10229
|
var node_7 = first_child(fragment_3);
|
|
9811
10230
|
{
|
|
9812
10231
|
var consequent_1 = ($$anchor6) => {
|
|
9813
|
-
var span_2 =
|
|
10232
|
+
var span_2 = root_2();
|
|
9814
10233
|
action(span_2, ($$node) => ndsIconButtonAction?.($$node));
|
|
9815
10234
|
append($$anchor6, span_2);
|
|
9816
10235
|
};
|
|
9817
10236
|
var consequent_2 = ($$anchor6) => {
|
|
9818
|
-
var span_3 =
|
|
10237
|
+
var span_3 = root_3();
|
|
9819
10238
|
html(span_3, () => sanitizeSvgIcon(get2(item2).icon), true);
|
|
9820
10239
|
reset(span_3);
|
|
9821
10240
|
append($$anchor6, span_3);
|
|
9822
10241
|
};
|
|
9823
10242
|
var d2 = user_derived(() => isInlineSvgIcon(get2(item2).icon));
|
|
9824
10243
|
var consequent_3 = ($$anchor6) => {
|
|
9825
|
-
var img =
|
|
10244
|
+
var img = root_4();
|
|
9826
10245
|
template_effect(() => set_attribute2(img, "src", get2(item2).icon));
|
|
9827
10246
|
append($$anchor6, img);
|
|
9828
10247
|
};
|
|
@@ -9833,15 +10252,15 @@ function ItemToolBar($$anchor, $$props) {
|
|
|
9833
10252
|
var node_8 = first_child(fragment_4);
|
|
9834
10253
|
{
|
|
9835
10254
|
var consequent_4 = ($$anchor7) => {
|
|
9836
|
-
var span_4 =
|
|
10255
|
+
var span_4 = root_3();
|
|
9837
10256
|
html(span_4, () => sanitizeSvgIcon(get2(fallbackIcon)), true);
|
|
9838
10257
|
reset(span_4);
|
|
9839
10258
|
append($$anchor7, span_4);
|
|
9840
10259
|
};
|
|
9841
10260
|
var alternate_1 = ($$anchor7) => {
|
|
9842
|
-
var
|
|
9843
|
-
template_effect(() => set_class(
|
|
9844
|
-
append($$anchor7,
|
|
10261
|
+
var i_1 = root_5();
|
|
10262
|
+
template_effect(() => set_class(i_1, 1, `icon icon-${get2(item2).icon}`, "svelte-rnx3ie"));
|
|
10263
|
+
append($$anchor7, i_1);
|
|
9845
10264
|
};
|
|
9846
10265
|
if_block(node_8, ($$render) => {
|
|
9847
10266
|
if (get2(fallbackIcon))
|
|
@@ -9893,7 +10312,7 @@ function ItemToolBar($$anchor, $$props) {
|
|
|
9893
10312
|
};
|
|
9894
10313
|
var d_2 = user_derived(() => isToolbarLinkItem(get2(item2)));
|
|
9895
10314
|
var alternate_5 = ($$anchor4) => {
|
|
9896
|
-
var button_1 =
|
|
10315
|
+
var button_1 = root_7();
|
|
9897
10316
|
let classes_2;
|
|
9898
10317
|
var node_9 = child(button_1);
|
|
9899
10318
|
{
|
|
@@ -9902,19 +10321,19 @@ function ItemToolBar($$anchor, $$props) {
|
|
|
9902
10321
|
var node_10 = first_child(fragment_5);
|
|
9903
10322
|
{
|
|
9904
10323
|
var consequent_7 = ($$anchor6) => {
|
|
9905
|
-
var span_5 =
|
|
10324
|
+
var span_5 = root_2();
|
|
9906
10325
|
action(span_5, ($$node) => ndsIconButtonAction?.($$node));
|
|
9907
10326
|
append($$anchor6, span_5);
|
|
9908
10327
|
};
|
|
9909
10328
|
var consequent_8 = ($$anchor6) => {
|
|
9910
|
-
var span_6 =
|
|
10329
|
+
var span_6 = root_3();
|
|
9911
10330
|
html(span_6, () => sanitizeSvgIcon(get2(item2).icon), true);
|
|
9912
10331
|
reset(span_6);
|
|
9913
10332
|
append($$anchor6, span_6);
|
|
9914
10333
|
};
|
|
9915
10334
|
var d_3 = user_derived(() => isInlineSvgIcon(get2(item2).icon));
|
|
9916
10335
|
var consequent_9 = ($$anchor6) => {
|
|
9917
|
-
var img_1 =
|
|
10336
|
+
var img_1 = root_4();
|
|
9918
10337
|
template_effect(() => set_attribute2(img_1, "src", get2(item2).icon));
|
|
9919
10338
|
append($$anchor6, img_1);
|
|
9920
10339
|
};
|
|
@@ -9925,15 +10344,15 @@ function ItemToolBar($$anchor, $$props) {
|
|
|
9925
10344
|
var node_11 = first_child(fragment_6);
|
|
9926
10345
|
{
|
|
9927
10346
|
var consequent_10 = ($$anchor7) => {
|
|
9928
|
-
var span_7 =
|
|
10347
|
+
var span_7 = root_3();
|
|
9929
10348
|
html(span_7, () => sanitizeSvgIcon(get2(fallbackIcon)), true);
|
|
9930
10349
|
reset(span_7);
|
|
9931
10350
|
append($$anchor7, span_7);
|
|
9932
10351
|
};
|
|
9933
10352
|
var alternate_3 = ($$anchor7) => {
|
|
9934
|
-
var
|
|
9935
|
-
template_effect(() => set_class(
|
|
9936
|
-
append($$anchor7,
|
|
10353
|
+
var i_2 = root_5();
|
|
10354
|
+
template_effect(() => set_class(i_2, 1, `icon icon-${get2(item2).icon}`, "svelte-rnx3ie"));
|
|
10355
|
+
append($$anchor7, i_2);
|
|
9937
10356
|
};
|
|
9938
10357
|
if_block(node_11, ($$render) => {
|
|
9939
10358
|
if (get2(fallbackIcon))
|
|
@@ -9995,7 +10414,7 @@ function ItemToolBar($$anchor, $$props) {
|
|
|
9995
10414
|
var node_13 = first_child(fragment_7);
|
|
9996
10415
|
{
|
|
9997
10416
|
var consequent_12 = ($$anchor4) => {
|
|
9998
|
-
var span_8 =
|
|
10417
|
+
var span_8 = root_1();
|
|
9999
10418
|
action(span_8, ($$node, $$action_arg) => mountElementWithShell?.($$node, $$action_arg), () => ({
|
|
10000
10419
|
mounted: get2(mounted),
|
|
10001
10420
|
active: get2(renderedToolActiveById)[get2(mounted).toolId] ?? false
|
|
@@ -10003,7 +10422,7 @@ function ItemToolBar($$anchor, $$props) {
|
|
|
10003
10422
|
append($$anchor4, span_8);
|
|
10004
10423
|
};
|
|
10005
10424
|
var alternate_6 = ($$anchor4) => {
|
|
10006
|
-
var span_9 =
|
|
10425
|
+
var span_9 = root_1();
|
|
10007
10426
|
action(span_9, ($$node, $$action_arg) => mountElement?.($$node, $$action_arg), () => get2(mounted).entry.element);
|
|
10008
10427
|
append($$anchor4, span_9);
|
|
10009
10428
|
};
|
|
@@ -10020,14 +10439,14 @@ function ItemToolBar($$anchor, $$props) {
|
|
|
10020
10439
|
var node_14 = sibling(div_1, 2);
|
|
10021
10440
|
{
|
|
10022
10441
|
var consequent_14 = ($$anchor3) => {
|
|
10023
|
-
var div_2 =
|
|
10442
|
+
var div_2 = root_9();
|
|
10024
10443
|
let classes_3;
|
|
10025
10444
|
each(div_2, 21, () => get2(mountedElementsControlsRow), (mounted) => mounted.key, ($$anchor4, mounted) => {
|
|
10026
10445
|
var fragment_8 = comment();
|
|
10027
10446
|
var node_15 = first_child(fragment_8);
|
|
10028
10447
|
{
|
|
10029
10448
|
var consequent_13 = ($$anchor5) => {
|
|
10030
|
-
var span_10 =
|
|
10449
|
+
var span_10 = root_8();
|
|
10031
10450
|
action(span_10, ($$node, $$action_arg) => mountElementWithShell?.($$node, $$action_arg), () => ({
|
|
10032
10451
|
mounted: get2(mounted),
|
|
10033
10452
|
active: get2(renderedToolActiveById)[get2(mounted).toolId] ?? false
|
|
@@ -10035,7 +10454,7 @@ function ItemToolBar($$anchor, $$props) {
|
|
|
10035
10454
|
append($$anchor5, span_10);
|
|
10036
10455
|
};
|
|
10037
10456
|
var alternate_7 = ($$anchor5) => {
|
|
10038
|
-
var span_11 =
|
|
10457
|
+
var span_11 = root_8();
|
|
10039
10458
|
action(span_11, ($$node, $$action_arg) => mountElement?.($$node, $$action_arg), () => get2(mounted).entry.element);
|
|
10040
10459
|
append($$anchor5, span_11);
|
|
10041
10460
|
};
|