@pie-players/pie-assessment-toolkit 0.3.63 → 0.3.65
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 +92 -1
- package/dist/components/ItemToolBar.custom-element.js +1 -1
- package/dist/components/PieAssessmentToolkit.custom-element.js +11 -11
- package/dist/components/SectionToolBar.custom-element.js +1 -1
- package/dist/components/chunks/ItemToolBar-cckwpz6c.js +51 -0
- package/dist/components/chunks/ItemToolBar-pryf0rtz.js +22 -0
- package/dist/index.d.ts +10 -6
- package/dist/index.js +12 -4
- package/dist/policy/core/ToolPolicyEngine.d.ts +21 -0
- package/dist/policy/core/ToolPolicyEngine.js +27 -0
- package/dist/policy/core/feature-decision.d.ts +57 -0
- package/dist/policy/core/feature-decision.js +40 -0
- package/dist/policy/engine.d.ts +1 -0
- package/dist/policy/sources/PnpPolicySource.d.ts +22 -0
- package/dist/policy/sources/PnpPolicySource.js +41 -11
- package/dist/runtime/catalog-registration.d.ts +56 -1
- package/dist/runtime/catalog-registration.js +64 -31
- package/dist/runtime/composition-emit-scheduler.d.ts +78 -0
- package/dist/runtime/composition-emit-scheduler.js +154 -0
- package/dist/runtime/core/engine-resolver.d.ts +1 -1
- package/dist/services/AccessibilityCatalogResolver.d.ts +100 -4
- package/dist/services/AccessibilityCatalogResolver.js +183 -58
- package/dist/services/SSMLExtractor.js +28 -18
- package/dist/services/TTSService.d.ts +25 -0
- package/dist/services/TTSService.js +241 -45
- package/dist/services/ToolRegistry.d.ts +218 -8
- package/dist/services/ToolRegistry.js +124 -8
- package/dist/services/ToolkitCoordinator.d.ts +25 -3
- package/dist/services/ToolkitCoordinator.js +47 -6
- package/dist/services/catalog-media.d.ts +25 -0
- package/dist/services/catalog-media.js +101 -0
- package/dist/services/createDefaultToolRegistry.d.ts +25 -58
- package/dist/services/createDefaultToolRegistry.js +24 -104
- package/dist/services/defaultPersonalNeedsProfile.d.ts +20 -2
- package/dist/services/defaultPersonalNeedsProfile.js +21 -19
- package/dist/services/interfaces.d.ts +29 -2
- package/dist/services/pnp-standard-features.d.ts +1 -1
- package/dist/services/spoken-audio-cards.d.ts +54 -0
- package/dist/services/spoken-audio-cards.js +66 -0
- package/dist/services/tool-config-defaults.d.ts +7 -23
- package/dist/services/tool-config-defaults.js +7 -46
- package/dist/services/tool-config-validation.d.ts +1 -1
- package/dist/services/tool-config-validation.js +44 -4
- package/dist/services/tts/browser-provider.js +2 -1
- package/dist/services/tts/math-aware-text-processing.js +3 -3
- package/dist/services/tts/text-processing.d.ts +51 -0
- package/dist/services/tts/text-processing.js +117 -1
- package/dist/services/tts-runtime-config.js +7 -2
- package/dist/tools/internal.d.ts +34 -0
- package/dist/tools/internal.js +33 -0
- package/dist/tools/tool-tag-map.d.ts +15 -3
- package/dist/tools/tool-tag-map.js +21 -18
- package/package.json +14 -10
- package/dist/components/chunks/ItemToolBar-843902tp.js +0 -51
- package/dist/components/chunks/ItemToolBar-84nv78dy.js +0 -22
- package/dist/tools/registrations/accessibility-tools.d.ts +0 -34
- package/dist/tools/registrations/accessibility-tools.js +0 -217
- package/dist/tools/registrations/calculator.d.ts +0 -20
- package/dist/tools/registrations/calculator.js +0 -228
- package/dist/tools/registrations/interaction-tools.d.ts +0 -27
- package/dist/tools/registrations/interaction-tools.js +0 -143
- package/dist/tools/registrations/measurement-tools.d.ts +0 -24
- package/dist/tools/registrations/measurement-tools.js +0 -130
- package/dist/tools/registrations/subject-specific-tools.d.ts +0 -27
- package/dist/tools/registrations/subject-specific-tools.js +0 -158
- package/dist/tools/registrations/tts.d.ts +0 -21
- package/dist/tools/registrations/tts.js +0 -184
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./chunks/ItemToolBar-
|
|
1
|
+
import"./chunks/ItemToolBar-pryf0rtz.js";import{H as w,J as G,K as Y,d as U,e as V,g as F,o as E,t as W,v as X}from"./chunks/ItemToolBar-cckwpz6c.js";var x=(H,A)=>{if(customElements.get(H))return;try{customElements.define(H,A)}catch(C){if(!(C instanceof DOMException&&C.name==="NotSupportedError"||C&&typeof C==="object"&&C.name==="NotSupportedError")||!customElements.get(H))throw C}},D=W("<pie-item-toolbar></pie-item-toolbar>",2);function Z(H,A){U(A,!0);let C=G(A,"enabledTools",7,""),J=G(A,"position",7,"bottom"),K=G(A,"sectionId",7,""),L=G(A,"size",7,"md"),M=G(A,"language",7,"en-US"),O=G(A,"toolRegistry",7,null),P=G(A,"item",7,null),Q=G(A,"hostButtons",23,()=>[]);var j={get enabledTools(){return C()},set enabledTools(k){C(k),F()},get position(){return J()},set position(k){J(k),F()},get sectionId(){return K()},set sectionId(k){K(k),F()},get size(){return L()},set size(k){L(k),F()},get language(){return M()},set language(k){M(k),F()},get toolRegistry(){return O()},set toolRegistry(k){O(k),F()},get item(){return P()},set item(k){P(k),F()},get hostButtons(){return Q()},set hostButtons(k){Q(k),F()}},q=D();return w(q,"level","section"),E(()=>w(q,"scope-id",K())),E(()=>w(q,"section-id",K())),E(()=>w(q,"tools",C())),w(q,"content-kind","section"),E(()=>w(q,"position",J())),E(()=>w(q,"size",L())),E(()=>w(q,"language",M())),E(()=>w(q,"toolRegistry",O())),E(()=>w(q,"item",P())),E(()=>w(q,"hostButtons",Q())),X(H,q),V(j)}x("pie-section-toolbar",Y(Z,{enabledTools:{attribute:"enabled-tools",type:"String"},position:{attribute:"position",type:"String"},sectionId:{attribute:"section-id",type:"String"},size:{attribute:"size",type:"String"},language:{attribute:"language",type:"String"},toolRegistry:{type:"Object"},item:{type:"Object"},hostButtons:{type:"Object"}},[],[],{mode:"open"}));export{Z as default};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
var p6=((J)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(J,{get:(Q,W)=>(typeof require<"u"?require:Q)[W]}):J)(function(J){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+J+'" is not supported')});var Z8="5";if(typeof window<"u")((window.__svelte??={}).v??=new Set).add(Z8);var b=2,_0=4,PJ=8,NJ=16777216,W0=16,c=32,B0=64,fJ=128,X0=512,x=1024,D=2048,m=4096,_=8192,g=16384,H0=32768,pJ=33554432,O0=65536,UJ=131072,W7=262144,l0=524288,G8=1048576,y0=33554432,A0=65536,AJ=2097152,I0=4194304,k0=8388608,i=Symbol("$state"),QQ=Symbol("legacy props"),$8=Symbol(""),OQ=Symbol("proxy path"),FQ=Symbol("attributes"),WQ=Symbol("class"),XQ=Symbol("style"),zQ=Symbol("text"),X7=Symbol("form reset"),z7=Symbol("hmr anchor"),XJ=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},K7=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml");var dJ=3,D0=8;var q8=1,P8=2,Z7=4,U8=8,B8=16,H8=1,Y8=2,M8=4,V8=8,L8=16;var O8=1,F8=2;var _J="[",BJ="[!",G7="[?",IJ="]",c0={};var y=Symbol("uninitialized"),F0=Symbol("filename"),w8=Symbol("hmr"),wQ="http://www.w3.org/1999/xhtml",KQ="http://www.w3.org/2000/svg",$7="http://www.w3.org/1998/Math/MathML";var P=!0;var i0="font-weight: bold",o0="font-weight: normal";function S8(J){if(P)console.warn(`%c[svelte] await_reactivity_loss
|
|
2
|
+
%cDetected reactivity loss when reading \`${J}\`. This happens when state is read in an async function after an earlier \`await\`
|
|
3
|
+
https://svelte.dev/e/await_reactivity_loss`,i0,o0);else console.warn("https://svelte.dev/e/await_reactivity_loss")}function C8(J,Q){if(P)console.warn(`%c[svelte] await_waterfall
|
|
4
|
+
%cAn async derived, \`${J}\` (${Q}) was not read immediately after it resolved. This often indicates an unnecessary waterfall, which can slow down your app
|
|
5
|
+
https://svelte.dev/e/await_waterfall`,i0,o0);else console.warn("https://svelte.dev/e/await_waterfall")}function N8(){if(P)console.warn(`%c[svelte] derived_inert
|
|
6
|
+
%cReading a derived belonging to a now-destroyed effect may result in stale values
|
|
7
|
+
https://svelte.dev/e/derived_inert`,i0,o0);else console.warn("https://svelte.dev/e/derived_inert")}function A8(J,Q,W){if(P)console.warn(`%c[svelte] hydration_attribute_changed
|
|
8
|
+
%cThe \`${J}\` attribute on \`${Q}\` changed its value between server and client renders. The client value, \`${W}\`, will be ignored in favour of the server value
|
|
9
|
+
https://svelte.dev/e/hydration_attribute_changed`,i0,o0);else console.warn("https://svelte.dev/e/hydration_attribute_changed")}function I8(J){if(P)console.warn(`%c[svelte] hydration_html_changed
|
|
10
|
+
%c${J?`The value of an \`{@html ...}\` block ${J} changed between server and client renders. The client value will be ignored in favour of the server value`:"The value of an `{@html ...}` block changed between server and client renders. The client value will be ignored in favour of the server value"}
|
|
11
|
+
https://svelte.dev/e/hydration_html_changed`,i0,o0);else console.warn("https://svelte.dev/e/hydration_html_changed")}function HJ(J){if(P)console.warn(`%c[svelte] hydration_mismatch
|
|
12
|
+
%c${J?`Hydration failed because the initial UI does not match what was rendered on the server. The error occurred near ${J}`:"Hydration failed because the initial UI does not match what was rendered on the server"}
|
|
13
|
+
https://svelte.dev/e/hydration_mismatch`,i0,o0);else console.warn("https://svelte.dev/e/hydration_mismatch")}function D8(){if(P)console.warn(`%c[svelte] lifecycle_double_unmount
|
|
14
|
+
%cTried to unmount a component that was not mounted
|
|
15
|
+
https://svelte.dev/e/lifecycle_double_unmount`,i0,o0);else console.warn("https://svelte.dev/e/lifecycle_double_unmount")}function SQ(J){if(P)console.warn(`%c[svelte] state_proxy_equality_mismatch
|
|
16
|
+
%cReactive \`$state(...)\` proxies and the values they proxy have different identities. Because of this, comparisons with \`${J}\` will produce unexpected results
|
|
17
|
+
https://svelte.dev/e/state_proxy_equality_mismatch`,i0,o0);else console.warn("https://svelte.dev/e/state_proxy_equality_mismatch")}function R8(){if(P)console.warn(`%c[svelte] state_proxy_unmount
|
|
18
|
+
%cTried to unmount a state proxy, rather than a component
|
|
19
|
+
https://svelte.dev/e/state_proxy_unmount`,i0,o0);else console.warn("https://svelte.dev/e/state_proxy_unmount")}function j8(){if(P)console.warn("%c[svelte] svelte_boundary_reset_noop\n%cA `<svelte:boundary>` `reset` function only resets the boundary the first time it is called\nhttps://svelte.dev/e/svelte_boundary_reset_noop",i0,o0);else console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}var zJ=Array.isArray,T8=Array.prototype.indexOf,YJ=Array.prototype.includes,lJ=Array.from,ZQ=Object.keys,n=Object.defineProperty,Y0=Object.getOwnPropertyDescriptor,CQ=Object.getOwnPropertyDescriptors,q7=Object.prototype,x8=Array.prototype,DJ=Object.getPrototypeOf,P7=Object.isExtensible;var s0=()=>{};function NQ(J){for(var Q=0;Q<J.length;Q++)J[Q]()}function AQ(){var J,Q,W=new Promise((X,z)=>{J=X,Q=z});return{promise:W,resolve:J,reject:Q}}function k8(J){if(P){let Q=Error(`invariant_violation
|
|
20
|
+
An invariant violation occurred, meaning Svelte's internal assumptions were flawed. This is a bug in Svelte, not your app — please open an issue at https://github.com/sveltejs/svelte, citing the following message: "${J}"
|
|
21
|
+
https://svelte.dev/e/invariant_violation`);throw Q.name="Svelte error",Q}else throw Error("https://svelte.dev/e/invariant_violation")}function b8(){if(P){let J=Error("async_derived_orphan\nCannot create a `$derived(...)` with an `await` expression outside of an effect tree\nhttps://svelte.dev/e/async_derived_orphan");throw J.name="Svelte error",J}else throw Error("https://svelte.dev/e/async_derived_orphan")}function y8(){if(P){let J=Error(`derived_references_self
|
|
22
|
+
A derived value cannot reference itself recursively
|
|
23
|
+
https://svelte.dev/e/derived_references_self`);throw J.name="Svelte error",J}else throw Error("https://svelte.dev/e/derived_references_self")}function U7(J,Q,W){if(P){let X=Error(`each_key_duplicate
|
|
24
|
+
${W?`Keyed each block has duplicate key \`${W}\` at indexes ${J} and ${Q}`:`Keyed each block has duplicate key at indexes ${J} and ${Q}`}
|
|
25
|
+
https://svelte.dev/e/each_key_duplicate`);throw X.name="Svelte error",X}else throw Error("https://svelte.dev/e/each_key_duplicate")}function h8(J,Q,W){if(P){let X=Error(`each_key_volatile
|
|
26
|
+
Keyed each block has key that is not idempotent — the key for item at index ${J} was \`${Q}\` but is now \`${W}\`. Keys must be the same each time for a given item
|
|
27
|
+
https://svelte.dev/e/each_key_volatile`);throw X.name="Svelte error",X}else throw Error("https://svelte.dev/e/each_key_volatile")}function g8(J){if(P){let Q=Error(`effect_in_teardown
|
|
28
|
+
\`${J}\` cannot be used inside an effect cleanup function
|
|
29
|
+
https://svelte.dev/e/effect_in_teardown`);throw Q.name="Svelte error",Q}else throw Error("https://svelte.dev/e/effect_in_teardown")}function v8(){if(P){let J=Error("effect_in_unowned_derived\nEffect cannot be created inside a `$derived` value that was not itself created inside an effect\nhttps://svelte.dev/e/effect_in_unowned_derived");throw J.name="Svelte error",J}else throw Error("https://svelte.dev/e/effect_in_unowned_derived")}function m8(J){if(P){let Q=Error(`effect_orphan
|
|
30
|
+
\`${J}\` can only be used inside an effect (e.g. during component initialisation)
|
|
31
|
+
https://svelte.dev/e/effect_orphan`);throw Q.name="Svelte error",Q}else throw Error("https://svelte.dev/e/effect_orphan")}function u8(){if(P){let J=Error(`effect_update_depth_exceeded
|
|
32
|
+
Maximum update depth exceeded. This typically indicates that an effect reads and writes the same piece of state
|
|
33
|
+
https://svelte.dev/e/effect_update_depth_exceeded`);throw J.name="Svelte error",J}else throw Error("https://svelte.dev/e/effect_update_depth_exceeded")}function f8(){if(P){let J=Error(`hydration_failed
|
|
34
|
+
Failed to hydrate the application
|
|
35
|
+
https://svelte.dev/e/hydration_failed`);throw J.name="Svelte error",J}else throw Error("https://svelte.dev/e/hydration_failed")}function p8(J){if(P){let Q=Error(`props_invalid_value
|
|
36
|
+
Cannot do \`bind:${J}={undefined}\` when \`${J}\` has a fallback value
|
|
37
|
+
https://svelte.dev/e/props_invalid_value`);throw Q.name="Svelte error",Q}else throw Error("https://svelte.dev/e/props_invalid_value")}function d8(J){if(P){let Q=Error(`rune_outside_svelte
|
|
38
|
+
The \`${J}\` rune is only available inside \`.svelte\` and \`.svelte.js/ts\` files
|
|
39
|
+
https://svelte.dev/e/rune_outside_svelte`);throw Q.name="Svelte error",Q}else throw Error("https://svelte.dev/e/rune_outside_svelte")}function _8(){if(P){let J=Error("state_descriptors_fixed\nProperty descriptors defined on `$state` objects must contain `value` and always be `enumerable`, `configurable` and `writable`.\nhttps://svelte.dev/e/state_descriptors_fixed");throw J.name="Svelte error",J}else throw Error("https://svelte.dev/e/state_descriptors_fixed")}function l8(){if(P){let J=Error("state_prototype_fixed\nCannot set prototype of `$state` object\nhttps://svelte.dev/e/state_prototype_fixed");throw J.name="Svelte error",J}else throw Error("https://svelte.dev/e/state_prototype_fixed")}function c8(){if(P){let J=Error("state_unsafe_mutation\nUpdating state inside `$derived(...)`, `$inspect(...)` or a template expression is forbidden. If the value should not be reactive, declare it without `$state`\nhttps://svelte.dev/e/state_unsafe_mutation");throw J.name="Svelte error",J}else throw Error("https://svelte.dev/e/state_unsafe_mutation")}function i8(){if(P){let J=Error("svelte_boundary_reset_onerror\nA `<svelte:boundary>` `reset` function cannot be called while an error is still being handled\nhttps://svelte.dev/e/svelte_boundary_reset_onerror");throw J.name="Svelte error",J}else throw Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}var t=!1,MJ=!1,h0=!1;var A=null;function KJ(J){A=J}var a0=null;function cJ(J){a0=J}var R0=null;function IQ(J){R0=J}function B7(J,Q=!1,W){if(A={p:A,i:!1,c:null,e:null,s:J,x:null,r:O,l:MJ&&!Q?{s:null,u:null,$:[]}:null},P)A.function=W,R0=W}function H7(J){var Q=A,W=Q.e;if(W!==null){Q.e=null;for(var X of W)Y7(X)}if(J!==void 0)Q.x=J;if(Q.i=!0,A=Q.p,P)R0=A?.function??null;return J??{}}function g0(){return!MJ||A!==null&&A.l===null}var RJ=[];function s8(){var J=RJ;RJ=[],NQ(J)}function o(J){if(RJ.length===0&&!jJ){var Q=RJ;queueMicrotask(()=>{if(Q===RJ)s8()})}RJ.push(J)}function a8(){while(RJ.length>0)s8()}var M7=new WeakMap;function DQ(J){var Q=O;if(Q===null)return w.f|=k0,J;if(P&&J instanceof Error&&!M7.has(J))M7.set(J,G4(J,Q));if((Q.f&H0)===0&&(Q.f&_0)===0){if(P&&!Q.parent&&J instanceof Error)r8(J);throw J}v0(J,Q)}function v0(J,Q){if(Q!==null&&(Q.f&g)!==0)return;while(Q!==null){if((Q.f&fJ)!==0){if((Q.f&H0)===0)throw J;try{Q.b.error(J);return}catch(W){J=W}}Q=Q.parent}if(P&&J instanceof Error)r8(J);throw J}function G4(J,Q){let W=Y0(J,"message");if(W&&!W.configurable)return;var X=GQ?" ":"\t",z=`
|
|
40
|
+
${X}in ${Q.fn?.name||"<unknown>"}`,K=Q.ctx;while(K!==null)z+=`
|
|
41
|
+
${X}in ${K.function?.[F0].split("/").pop()}`,K=K.p;return{message:J.message+`
|
|
42
|
+
${z}
|
|
43
|
+
`,stack:J.stack?.split(`
|
|
44
|
+
`).filter((Z)=>!Z.includes("svelte/src/internal")).join(`
|
|
45
|
+
`)}}function r8(J){let Q=M7.get(J);if(Q)n(J,"message",{value:Q.message}),n(J,"stack",{value:Q.stack})}function RQ(J){return J===this.v}function jQ(J,Q){return J!=J?Q==Q:J!==Q||J!==null&&typeof J==="object"||typeof J==="function"}function TQ(J){return!jQ(J,this.v)}var $Q=null;function G0(J,Q){return J.label=Q,kQ(J.v,Q),J}function kQ(J,Q){return J?.[OQ]?.(Q),J}function m0(J){let Q=Error(),W=$4();if(W.length===0)return null;return W.unshift(`
|
|
46
|
+
`),n(Q,"stack",{value:W.join(`
|
|
47
|
+
`)}),n(Q,"name",{value:J}),Q}function $4(){let J=Error.stackTraceLimit;Error.stackTraceLimit=1/0;let Q=Error().stack;if(Error.stackTraceLimit=J,!Q)return[];let W=Q.split(`
|
|
48
|
+
`),X=[];for(let z=0;z<W.length;z++){let K=W[z],Z=K.replaceAll("\\","/");if(K.trim()==="Error")continue;if(K.includes("validate_each_keys"))return[];if(Z.includes("svelte/src/internal")||Z.includes("node_modules/.vite"))continue;X.push(K)}return X}function t8(J,Q){if(!P)throw Error("invariant(...) was not guarded by if (DEV)");if(!J)k8(Q)}function r0(J){var Q=w,W=O;f(null),p(null);try{return J()}finally{f(Q),p(W)}}function e8(J){let Q=0,W=q0(0),X;if(P)G0(W,"createSubscriber version");return()=>{if(VJ())R(W),e(()=>{if(Q===0)X=h(()=>J(()=>TJ(W)));return Q+=1,()=>{o(()=>{if(Q-=1,Q===0)X?.(),X=void 0,TJ(W)})}})}}var P4=~(D|m|x);function T(J,Q){J.f=J.f&P4|Q}function iJ(J){if((J.f&X0)!==0||J.deps===null)T(J,x);else T(J,m)}function J9(J){if(J===null)return;for(let Q of J){if((Q.f&b)===0||(Q.f&A0)===0)continue;Q.f^=A0,J9(Q.deps)}}function EQ(J,Q,W){if((J.f&D)!==0)Q.add(J);else if((J.f&m)!==0)W.add(J);J9(J.deps),T(J,x)}var U4=O0|l0;function O7(J,Q,W,X){new F7(J,Q,W,X)}class F7{parent;is_pending=!1;transform_error;#J;#Q=F?C:null;#W;#G;#K;#Z=null;#X=null;#$=null;#z=null;#M=0;#P=0;#U=!1;#B=new Set;#V=new Set;#q=null;#F=e8(()=>{if(this.#q=q0(this.#M),P)G0(this.#q,"$effect.pending()");return()=>{this.#q=null}});constructor(J,Q,W,X){if(this.#J=J,this.#W=Q,this.#G=(z)=>{var K=O;K.b=this,K.f|=fJ,W(z)},this.parent=O.b,this.transform_error=X??this.parent?.transform_error??((z)=>z),this.#K=w0(()=>{if(F){let z=this.#Q;l();let K=z.data===BJ;if(z.data.startsWith(G7)){let G=JSON.parse(z.data.slice(G7.length));this.#w(G)}else if(K)this.#C();else this.#L()}else this.#H()},U4),F)this.#J=C}#L(){try{this.#Z=s(()=>this.#G(this.#J))}catch(J){this.error(J)}}#w(J){let Q=this.#W.failed,{reset:W,invoke_onerror:X}=this.#S(J);if(o(X),!Q)return;this.#$=s(()=>{Q(this.#J,()=>J,()=>W)})}#S(J){var Q=!1,W=!1;let X=()=>{if(Q){j8();return}if(Q=!0,W)i8();if(this.#$!==null)n0(this.#$,()=>{this.#$=null});this.#Y(()=>{this.#H()})};return{reset:X,invoke_onerror:()=>{try{W=!0,this.#W.onerror?.(J,X),W=!1}catch(K){v0(K,this.#K&&this.#K.parent)}}}}#C(){let J=this.#W.pending;if(!J)return;this.is_pending=!0,this.#X=s(()=>J(this.#J)),o(()=>{var Q=this.#z=document.createDocumentFragment(),W=a();if(Q.append(W),this.#Z=this.#Y(()=>{return s(()=>this.#G(W))}),this.#P===0)this.#J.before(Q),this.#z=null,n0(this.#X,()=>{this.#X=null}),this.#O(S)})}#H(){try{if(this.is_pending=this.has_pending_snippet(),this.#P=0,this.#M=0,this.#Z=s(()=>{this.#G(this.#J)}),this.#P>0){var J=this.#z=document.createDocumentFragment();oJ(this.#Z,J);let Q=this.#W.pending;this.#X=s(()=>Q(this.#J))}else this.#O(S)}catch(Q){this.error(Q)}}#O(J){this.is_pending=!1,J.transfer_effects(this.#B,this.#V)}defer_effect(J){EQ(J,this.#B,this.#V)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#W.pending}#Y(J){var Q=O,W=w,X=A;p(this.#K),f(this.#K),KJ(this.#K.ctx);try{return Z0.ensure(),J()}catch(z){return DQ(z),null}finally{p(Q),f(W),KJ(X)}}#N(J,Q){if(!this.has_pending_snippet()){if(this.parent)this.parent.#N(J,Q);return}if(this.#P+=J,this.#P===0){if(this.#O(Q),this.#X)n0(this.#X,()=>{this.#X=null});if(this.#z)this.#J.before(this.#z),this.#z=null}}update_pending_count(J,Q){if(this.#N(J,Q),this.#M+=J,!this.#q||this.#U)return;this.#U=!0,o(()=>{if(this.#U=!1,this.#q)u0(this.#q,this.#M)})}get_effect_pending(){return this.#F(),R(this.#q)}error(J){if(!this.#W.onerror&&!this.#W.failed)throw J;if(S?.is_fork){if(this.#Z)S.skip_effect(this.#Z);if(this.#X)S.skip_effect(this.#X);if(this.#$)S.skip_effect(this.#$);S.oncommit(()=>{this.#A(J)})}else this.#A(J)}#A(J){if(this.#Z)v(this.#Z),this.#Z=null;if(this.#X)v(this.#X),this.#X=null;if(this.#$)v(this.#$),this.#$=null;if(F)j(this.#Q),L7(),j(t0());let Q=this.#W.failed,W=(X)=>{let{reset:z,invoke_onerror:K}=this.#S(X);if(K(),Q)this.#$=this.#Y(()=>{try{return s(()=>{var Z=O;Z.b=this,Z.f|=fJ,Q(this.#J,()=>X,()=>z)})}catch(Z){return v0(Z,this.#K.parent),null}})};o(()=>{var X;try{X=this.transform_error(J)}catch(z){v0(z,this.#K&&this.#K.parent);return}if(X!==null&&typeof X==="object"&&typeof X.then==="function")X.then(W,(z)=>v0(z,this.#K&&this.#K.parent));else W(X)})}}function bQ(J,Q,W,X){let z=g0()?LJ:xJ;var K=J.filter((U)=>!U.settled),Z=Q.map(z);if(P)Z.forEach((U,M)=>{U.label=Q[M].toString().replace("() => ","").replaceAll("$.eager(() => ","$state.eager(").replace(/\$\.get\((.+?)\)/g,(L,V)=>V)});if(W.length===0&&K.length===0){X(Z);return}var G=O,$=Q9(),Y=K.length===1?K[0].promise:K.length>1?Promise.all(K.map((U)=>U.promise)):null;function H(U){if((G.f&g)!==0)return;$();try{X([...Z,...U])}catch(M){v0(M,G)}sJ()}var B=w7();if(W.length===0){Y.then(()=>H([])).finally(B);return}function q(){Promise.all(W.map((U)=>C7(U))).then(H).catch((U)=>v0(U,G)).finally(B)}if(Y)Y.then(()=>{$(),q(),sJ()});else q()}function Q9(){var J=O,Q=w,W=A,X=S;if(P)var z=a0;return function(Z=!0){if(p(J),f(Q),KJ(W),Z&&(J.f&g)===0)X?.activate(),X?.apply();if(P)S7(null),cJ(z)}}function sJ(J=!0){if(p(null),f(null),KJ(null),J)S?.deactivate();if(P)S7(null),cJ(null)}function w7(){var J=O,Q=J.b,W=S,X=!!Q?.is_rendered();return Q?.update_pending_count(1,W),W.increment(X,J),()=>{Q?.update_pending_count(-1,W),W.decrement(X,J)}}var S0=null;function S7(J){S0=J}var PQ=new Set;function LJ(J){var Q=b|D;if(O!==null)O.f|=l0;let W={ctx:A,deps:null,effects:null,equals:RQ,f:Q,fn:J,reactions:null,rv:0,v:y,wv:0,parent:O,ac:null};if(P&&h0)W.created=m0("created at");return W}var aJ=Symbol("obsolete");function C7(J,Q,W){let X=O;if(X===null)b8();var z=void 0,K=q0(y);if(P)K.label=Q??J.toString();var Z=!w,G=new Set;if(z9(()=>{var $=O;if(P)S0={effect:$,effect_deps:new Set,warned:!1};var Y=AQ();z=Y.promise;try{Promise.resolve(J()).then(Y.resolve,(U)=>{if(U!==XJ)Y.reject(U)}).finally(sJ)}catch(U){Y.reject(U),sJ()}if(P){if(S0){if($.deps!==null)for(let U=0;U<M0;U+=1)S0.effect_deps.add($.deps[U]);if(J0!==null)for(let U=0;U<J0.length;U+=1)S0.effect_deps.add(J0[U])}S0=null}var H=S;if(Z){if(($.f&H0)!==0)var B=w7();if(X.b?.is_rendered())H.async_deriveds.get($)?.reject(aJ);else for(let U of G.values())U.reject(aJ);G.add(Y),H.async_deriveds.set($,Y)}let q=(U,M=void 0)=>{if(P)S0=null;if(B?.(),G.delete(Y),M===aJ)return;if(H.activate(),M)K.f|=k0,u0(K,M);else{if((K.f&k0)!==0)K.f^=k0;if(P&&W!==void 0&&!K.equals(U))PQ.add(K),setTimeout(()=>{if(PQ.has(K)&&($.f&g)===0)C8(K.label,W),PQ.delete(K)});u0(K,U)}H.deactivate()};Y.promise.then(q,(U)=>q(null,U||"unknown"))}),$0(()=>{for(let $ of G)$.reject(aJ)}),P)K.f|=I0;return new Promise(($)=>{function Y(H){function B(){if(H===z)$(K);else Y(z)}H.then(B,B)}Y(z)})}function H4(J){let Q=LJ(J);if(!t)gQ(Q);return Q}function xJ(J){let Q=LJ(J);return Q.equals=TQ,Q}function W9(J){var Q=J.effects;if(Q!==null){J.effects=null;for(var W=0;W<Q.length;W+=1)v(Q[W])}}var N7=[];function UQ(J){var Q,W=O,X=J.parent;if(!j0&&X!==null&&J.v!==y&&(X.f&(g|_))!==0)return N8(),J.v;if(p(X),P){let z=kJ;yQ(new Set);try{if(YJ.call(N7,J))y8();N7.push(J),J.f&=~A0,W9(J),Q=hQ(J)}finally{p(W),yQ(z),N7.pop()}}else try{J.f&=~A0,W9(J),Q=hQ(J)}finally{p(W)}return Q}function A7(J){var Q=UQ(J);if(!J.equals(Q)){if(J.wv=rJ(),!S?.is_fork||J.deps===null){if(S!==null)S.capture(J,Q,!0),OJ?.capture(J,Q,!0);else J.v=Q;if(J.deps===null){T(J,x);return}}}if(j0)return;if(Q0!==null){if(VJ()||S?.is_fork)Q0.set(J,Q)}else iJ(J)}function X9(J){if(J.effects===null)return;for(let Q of J.effects)if(Q.teardown||Q.ac){if(Q.teardown?.(),Q.ac!==null)r0(()=>{Q.ac.abort(XJ),Q.ac=null});if(Q.fn!==null)Q.teardown=s0;EJ(Q,0),BQ(Q)}}function I7(J){if(J.effects===null)return;for(let Q of J.effects)if(Q.teardown&&Q.fn!==null)e0(Q)}var kJ=new Set,ZJ=new Map;function yQ(J){kJ=J}var D7=!1;function K9(){D7=!0}function q0(J,Q){var W={f:0,v:J,reactions:null,equals:RQ,rv:0,wv:0};if(P&&h0)W.created=Q??m0("created at"),W.updated=null,W.set_during_effect=!1,W.trace=null;return W}function JJ(J,Q){let W=q0(J,Q);return gQ(W),W}function bJ(J,Q=!1,W=!0){let X=q0(J);if(!Q)X.equals=TQ;if(MJ&&W&&A!==null&&A.l!==null)(A.l.s??=[]).push(X);return X}function P0(J,Q,W=!1){if(w!==null&&(!V0||(w.f&UJ)!==0)&&g0()&&(w.f&(b|W0|I0|UJ))!==0&&(f0===null||!f0.has(J)))c8();let X=W?GJ(Q):Q;if(P)kQ(X,J.label);return u0(J,X,HQ)}function u0(J,Q,W=null){if(!J.equals(Q)){ZJ.set(J,j0?Q:J.v);var X=Z0.ensure();if(X.capture(J,Q),P){if(h0||O!==null){J.updated??=new Map;let z=(J.updated.get("")?.count??0)+1;if(J.updated.set("",{error:null,count:z}),h0||z>5){let K=m0("updated at");if(K!==null){let Z=J.updated.get(K.stack);if(!Z)Z={error:K,count:0},J.updated.set(K.stack,Z);Z.count++}}}if(O!==null)J.set_during_effect=!0}if((J.f&b)!==0){let z=J;if((J.f&D)!==0)UQ(z);if(Q0===null)iJ(z)}if(J.wv=rJ(),Z9(J,D,W),g0()&&O!==null&&(O.f&x)!==0&&(O.f&(c|B0))===0)if(T0===null)G9([J]);else T0.push(J);if(!X.is_fork&&kJ.size>0&&!D7)vQ()}return Q}function vQ(){D7=!1;for(let J of kJ){if((J.f&x)!==0)T(J,m);let Q;try{Q=FJ(J)}catch{Q=!0}if(Q)e0(J)}kJ.clear()}function TJ(J){P0(J,J.v+1)}function Z9(J,Q,W){var X=J.reactions;if(X===null)return;var z=g0(),K=X.length;for(var Z=0;Z<K;Z++){var G=X[Z],$=G.f;if(!z&&G===O)continue;var Y=($&D)===0;if(Y)T(G,Q);if(($&UJ)!==0)kJ.add(G);else if(($&b)!==0){var H=G;if(Q0?.delete(H),($&A0)===0){if($&X0&&(O===null||(O.f&AJ)===0))G.f|=A0;Z9(H,m,W)}}else if(Y){var B=G;if(($&W0)!==0&&E0!==null)E0.add(B);if(W!==null)W.push(B);else YQ(B)}}}var $9=!1,mQ=!1,D2=Symbol("unmounted");function R7(J){var Q=mQ;try{return mQ=!1,[J(),mQ]}finally{mQ=Q}}var uQ=null,nJ=null,S=null,OJ=null,Q0=null,x7=null,jJ=!1,j7=!1,yJ=null,HQ=null,q9=0,T7=new Set,V4=1;class Z0{id=V4++;#J=!1;linked=!0;#Q=null;#W=null;async_deriveds=new Map;current=new Map;previous=new Map;#G=new Set;#K=new Set;#Z=0;#X=new Map;#$=null;#z=[];#M=[];#P=new Set;#U=new Set;#B=new Map;#V=new Set;is_fork=!1;#q=!1;constructor(){if(nJ===null)uQ=nJ=this;else nJ.#W=this,this.#Q=nJ;nJ=this}#F(){if(this.is_fork)return!0;for(let W of this.#X.keys()){var J=W,Q=!1;while(J.parent!==null){if(this.#B.has(J)){Q=!0;break}J=J.parent}if(!Q)return!0}return!1}skip_effect(J){if(!this.#B.has(J))this.#B.set(J,{d:[],m:[]});this.#V.delete(J)}unskip_effect(J,Q=(W)=>this.schedule(W)){var W=this.#B.get(J);if(W){this.#B.delete(J);for(var X of W.d)T(X,D),Q(X);for(X of W.m)T(X,m),Q(X)}this.#V.add(J)}#L(){if(this.#J=!0,q9++>1000)this.#Y(),L4();if(P)for(let G of this.current.keys())T7.add(G);for(let G of this.#P)this.#U.delete(G),T(G,D),this.schedule(G);for(let G of this.#U)T(G,m),this.schedule(G);let J=this.#z;this.#z=[],this.apply();var Q=yJ=[],W=[],X=HQ=[];for(let G of J)try{this.#w(G,Q,W)}catch($){if(H9(G),!this.#F())this.discard();throw $}if(S=null,X.length>0){var z=Z0.ensure();for(let G of X)z.schedule(G)}if(yJ=null,HQ=null,this.#F()){this.#H(W),this.#H(Q);for(let[G,$]of this.#B)B9(G,$);if(X.length>0)S.#L();return}let K=this.#S();if(K){this.#H(W),this.#H(Q),K.#C(this);return}this.#P.clear(),this.#U.clear();for(let G of this.#G)G(this);this.#G.clear(),OJ=this,P9(W),P9(Q),OJ=null,this.#$?.resolve();var Z=S;if(this.#Z===0&&(this.#z.length===0||Z!==null)){if(this.#Y(),t)this.#O(),S=Z}if(this.#z.length>0)if(Z!==null){let G=Z;G.#z.push(...this.#z.filter(($)=>!G.#z.includes($)))}else Z=this;if(Z!==null)Z.#L()}#w(J,Q,W){J.f^=x;var X=J.first;while(X!==null){var z=X.f,K=(z&(c|B0))!==0,Z=K&&(z&x)!==0,G=Z||(z&_)!==0||this.#B.has(X);if(!G&&X.fn!==null){if(K)X.f^=x;else if((z&_0)!==0)Q.push(X);else if(t&&(z&(PJ|NJ))!==0)W.push(X);else if(FJ(X)){if((z&W0)!==0)this.#U.add(X);e0(X)}var $=X.first;if($!==null){X=$;continue}}while(X!==null){var Y=X.next;if(Y!==null){X=Y;break}X=X.parent}}}#S(){var J=this.#Q;while(J!==null){if(!J.is_fork){for(let[Q,[,W]]of this.current)if(J.current.has(Q)&&!W)return J}J=J.#Q}return null}#C(J){for(let[W,X]of J.current){if(!this.previous.has(W)&&J.previous.has(W))this.previous.set(W,J.previous.get(W));this.current.set(W,X)}for(let[W,X]of J.async_deriveds){let z=this.async_deriveds.get(W);if(z)X.promise.then(z.resolve).catch(z.reject)}J.async_deriveds.clear(),this.transfer_effects(J.#P,J.#U);let Q=(W)=>{var X=W.reactions;if(X===null)return;if((W.f&b)!==0&&(W.f&(D|m))===0)return;for(let Z of X){var z=Z.f;if((z&b)!==0)Q(Z);else{var K=Z;if(z&(I0|W0)&&!this.async_deriveds.has(K))this.#U.delete(K),T(K,D),this.schedule(K)}}};for(let W of this.current.keys())Q(W);this.oncommit(()=>J.discard()),J.#Y(),S=this,this.#L()}#H(J){for(var Q=0;Q<J.length;Q+=1)EQ(J[Q],this.#P,this.#U)}capture(J,Q,W=!1){if(J.v!==y&&!this.previous.has(J))this.previous.set(J,J.v);if((J.f&k0)===0)this.current.set(J,[Q,W]),Q0?.set(J,Q);if(!this.is_fork)J.v=Q}activate(){S=this}deactivate(){S=null,Q0=null}flush(){try{if(P)T7.clear();j7=!0,S=this,this.#L()}finally{if(q9=0,x7=null,yJ=null,HQ=null,j7=!1,S=null,Q0=null,ZJ.clear(),P)for(let J of T7)J.updated=null}}discard(){for(let J of this.#K)J(this);this.#K.clear();for(let J of this.async_deriveds.values())J.reject(aJ);this.#Y(),this.#$?.resolve()}register_created_effect(J){this.#M.push(J)}#O(){for(let H=uQ;H!==null;H=H.#W){var J=H.id<this.id,Q=[];for(let[B,[q,U]]of this.current){if(H.current.has(B)){var W=H.current.get(B)[0];if(J&&q!==W)H.current.set(B,[q,U]);else continue}Q.push(B)}if(J)for(let[B,q]of this.async_deriveds){let U=H.async_deriveds.get(B);if(U)q.promise.then(U.resolve).catch(U.reject)}var X=[...H.current.keys()].filter((B)=>!H.current.get(B)[1]);if(!H.#J||X.length===0)continue;var z=X.filter((B)=>!this.current.has(B));if(z.length===0){if(J)H.discard()}else if(Q.length>0){if(P&&!H.#q)t8(H.#z.length===0,"Batch has scheduled roots");if(J)for(let B of this.#V)H.unskip_effect(B,(q)=>{if((q.f&(W0|I0))!==0)H.schedule(q);else H.#H([q])});H.activate();var K=new Set,Z=new Map;for(var G of Q)U9(G,z,K,Z);Z=new Map;var $=[...H.current].filter(([B,q])=>{let U=this.current.get(B);if(!U)return!0;return U[0]!==q[0]||U[1]!==q[1]}).map(([B])=>B);if($.length>0){for(let B of this.#M)if((B.f&(g|_|UJ))===0&&k7(B,$,Z))if((B.f&(I0|W0))!==0)T(B,D),H.schedule(B);else H.#P.add(B)}if(H.#z.length>0&&!H.#q){H.apply();for(var Y of H.#z)H.#w(Y,[],[]);H.#z=[]}H.deactivate()}}}increment(J,Q){if(this.#Z+=1,J){let W=this.#X.get(Q)??0;this.#X.set(Q,W+1)}}decrement(J,Q){if(this.#Z-=1,J){let W=this.#X.get(Q)??0;if(W===1)this.#X.delete(Q);else this.#X.set(Q,W-1)}if(this.#q)return;this.#q=!0,o(()=>{if(this.#q=!1,this.linked)this.flush()})}transfer_effects(J,Q){for(let W of J)this.#P.add(W);for(let W of Q)this.#U.add(W);J.clear(),Q.clear()}oncommit(J){this.#G.add(J)}ondiscard(J){this.#K.add(J)}settled(){return(this.#$??=AQ()).promise}static ensure(){if(S===null){let J=S=new Z0;if(!j7&&!jJ)o(()=>{if(!J.#J)J.flush()})}return S}apply(){if(!t||!this.is_fork&&this.#Q===null&&this.#W===null){Q0=null;return}Q0=new Map;for(let[Q,[W]]of this.current)Q0.set(Q,W);for(let Q=uQ;Q!==null;Q=Q.#W){if(Q===this||Q.is_fork)continue;var J=!1;if(Q.id<this.id)for(let[W,[,X]]of Q.current){if(X)continue;if(this.current.has(W)){J=!0;break}}if(!J){for(let[W,X]of Q.previous)if(!Q0.has(W))Q0.set(W,X)}}}schedule(J){if(x7=J,J.b?.is_pending&&(J.f&(_0|PJ|NJ))!==0&&(J.f&H0)===0){J.b.defer_effect(J);return}var Q=J;while(Q.parent!==null){Q=Q.parent;var W=Q.f;if(yJ!==null&&Q===O){if(t)return;if((w===null||(w.f&b)===0)&&!$9)return}if((W&(B0|c))!==0){if((W&x)===0)return;Q.f^=x}}this.#z.push(Q)}#Y(){if(!this.linked)return;var J=this.#Q,Q=this.#W;if(J===null)uQ=Q;else J.#W=Q;if(Q===null)nJ=J;else Q.#Q=J;this.linked=!1}}function tJ(J){var Q=jJ;jJ=!0;try{var W;if(J){if(S!==null&&!S.is_fork)S.flush();W=J()}while(!0){if(a8(),S===null)return W;S.flush()}}finally{jJ=Q}}function L4(){if(P){var J=new Map;for(let W of S.current.keys())for(let[X,z]of W.updated??[]){var Q=J.get(X);if(!Q)Q={error:z.error,count:0},J.set(X,Q);Q.count+=z.count}for(let W of J.values())if(W.error)console.error(W.error)}try{u8()}catch(W){if(P)n(W,"stack",{value:""});v0(W,x7)}}var E0=null;function P9(J){var Q=J.length;if(Q===0)return;var W=0;while(W<Q){var X=J[W++];if((X.f&(g|_))===0&&FJ(X)){if(E0=new Set,e0(X),X.deps===null&&X.first===null&&X.nodes===null&&X.teardown===null&&X.ac===null)E7(X);if(E0?.size>0){ZJ.clear();for(let z of E0){if((z.f&(g|_))!==0)continue;let K=[z],Z=z.parent;while(Z!==null){if(E0.has(Z))E0.delete(Z),K.push(Z);Z=Z.parent}for(let G=K.length-1;G>=0;G--){let $=K[G];if(($.f&(g|_))!==0)continue;e0($)}}E0.clear()}}}E0=null}function U9(J,Q,W,X){if(W.has(J))return;if(W.add(J),J.reactions!==null)for(let z of J.reactions){let K=z.f;if((K&b)!==0)U9(z,Q,W,X);else if((K&(I0|W0))!==0&&(K&D)===0&&k7(z,Q,X))T(z,D),YQ(z)}}function k7(J,Q,W){let X=W.get(J);if(X!==void 0)return X;if(J.deps!==null)for(let z of J.deps){if(YJ.call(Q,z))return!0;if((z.f&b)!==0&&k7(z,Q,W))return W.set(z,!0),!0}return W.set(J,!1),!1}function YQ(J){S.schedule(J)}function B9(J,Q){if((J.f&c)!==0&&(J.f&x)!==0)return;if((J.f&D)!==0)Q.d.push(J);else if((J.f&m)!==0)Q.m.push(J);T(J,x);var W=J.first;while(W!==null)B9(W,Q),W=W.next}function H9(J){T(J,x);var Q=J.first;while(Q!==null)H9(Q),Q=Q.next}function M9(J){if(O===null){if(w===null)m8(J);v8()}if(j0)g8(J)}function F4(J,Q){var W=Q.last;if(W===null)Q.last=Q.first=J;else W.next=J,J.prev=W,Q.last=J}function QJ(J,Q){var W=O;if(P)while(W!==null&&(W.f&UJ)!==0)W=W.parent;if(W!==null&&(W.f&_)!==0)J|=_;var X={ctx:A,deps:null,nodes:null,f:J|D|X0,first:null,fn:Q,last:null,next:null,parent:W,b:W&&W.b,prev:null,teardown:null,wv:0,ac:null};if(P)X.component_function=R0;S?.register_created_effect(X);var z=X;if((J&_0)!==0)if(yJ!==null)yJ.push(X);else Z0.ensure().schedule(X);else if(Q!==null){try{e0(X)}catch(Z){throw v(X),Z}if(z.deps===null&&z.teardown===null&&z.nodes===null&&z.first===z.last&&(z.f&l0)===0){if(z=z.first,(J&W0)!==0&&(J&O0)!==0&&z!==null)z.f|=O0}}if(z!==null){if(z.parent=W,W!==null)F4(z,W);if(w!==null&&(w.f&b)!==0&&(J&B0)===0){var K=w;(K.effects??=[]).push(z)}}return X}function VJ(){return w!==null&&!V0}function $0(J){let Q=QJ(PJ,null);return T(Q,x),Q.teardown=J,Q}function y7(J){if(M9("$effect"),P)n(J,"name",{value:"$effect"});var Q=O.f,W=!w&&(Q&c)!==0&&A!==null&&!A.i;if(W){var X=A;(X.e??=[]).push(J)}else return Y7(J)}function Y7(J){return QJ(_0|G8,J)}function h7(J){Z0.ensure();let Q=QJ(B0|l0,J);return()=>{v(Q)}}function V9(J){Z0.ensure();let Q=QJ(B0|l0,J);return(W={})=>{return new Promise((X)=>{if(W.outro)n0(Q,()=>{v(Q),X(void 0)});else v(Q),X(void 0)})}}function L0(J){return QJ(_0,J)}function z9(J){return QJ(I0|l0,J)}function e(J,Q=0){return QJ(PJ|Q,J)}function g7(J,Q=[],W=[],X=[]){bQ(X,Q,W,(z)=>{QJ(PJ,()=>{J(...z.map(R))})})}function w0(J,Q=0){var W=QJ(W0|Q,J);if(P)W.dev_stack=a0;return W}function s(J){return QJ(c|l0,J)}function v7(J){var Q=J.teardown;if(Q!==null){let W=j0,X=w;b7(!0),f(null);try{Q.call(null)}finally{b7(W),f(X)}}}function BQ(J,Q=!1){var W=J.first;J.first=J.last=null;while(W!==null){let z=W.ac;if(z!==null)r0(()=>{z.abort(XJ)});var X=W.next;if((W.f&B0)!==0)W.parent=null;else v(W,Q);W=X}}function L9(J){var Q=J.first;while(Q!==null){var W=Q.next;if((Q.f&c)===0)v(Q);Q=W}}function v(J,Q=!0){var W=!1;if((Q||(J.f&W7)!==0)&&J.nodes!==null&&J.nodes.end!==null)m7(J.nodes.start,J.nodes.end),W=!0;J.f|=pJ,BQ(J,Q&&!W),EJ(J,0);var X=J.nodes&&J.nodes.t;if(X!==null)for(let K of X)K.stop();v7(J),J.f^=pJ,J.f|=g;var z=J.parent;if(z!==null&&z.first!==null)E7(J);if(P)J.component_function=null;J.next=J.prev=J.teardown=J.ctx=J.deps=J.fn=J.nodes=J.ac=J.b=null}function m7(J,Q){while(J!==null){var W=J===Q?null:r(J);J.remove(),J=W}}function E7(J){var{parent:Q,prev:W,next:X}=J;if(W!==null)W.next=X;if(X!==null)X.prev=W;if(Q!==null){if(Q.first===J)Q.first=X;if(Q.last===J)Q.last=W}}function n0(J,Q,W=!0){var X=[];O9(J,X,!0);var z=()=>{if(W)v(J);if(Q)Q()},K=X.length;if(K>0){var Z=()=>--K||z();for(var G of X)G.out(Z)}else z()}function O9(J,Q,W){if((J.f&_)!==0)return;J.f^=_;var X=J.nodes&&J.nodes.t;if(X!==null){for(let G of X)if(G.is_global||W)Q.push(G)}var z=J.first;while(z!==null){var K=z.next;if((z.f&B0)===0){var Z=(z.f&O0)!==0||(z.f&c)!==0&&(J.f&W0)!==0;O9(z,Q,Z?W:!1)}z=K}}function eJ(J){F9(J,!0)}function F9(J,Q){if((J.f&_)===0)return;if(J.f^=_,(J.f&x)===0)T(J,D),Z0.ensure().schedule(J);var W=J.first;while(W!==null){var X=W.next,z=(W.f&O0)!==0||(W.f&c)!==0;F9(W,z?Q:!1),W=X}var K=J.nodes&&J.nodes.t;if(K!==null){for(let Z of K)if(Z.is_global||Q)Z.in()}}function oJ(J,Q){if(!J.nodes)return;var W=J.nodes.start,X=J.nodes.end;while(W!==null){var z=W===X?null:r(W);Q.append(W),W=z}}var w9=null;var fQ=!1,j0=!1;function b7(J){j0=J}var w=null,V0=!1;function f(J){w=J}var O=null;function p(J){O=J}var f0=null;function gQ(J){if(w!==null&&(!t||(w.f&b)!==0))(f0??=new Set).add(J)}var J0=null,M0=0,T0=null;function G9(J){T0=J}var S9=1,hJ=0,wJ=hJ;function u7(J){wJ=J}function rJ(){return++S9}function FJ(J){var Q=J.f;if((Q&D)!==0)return!0;if(Q&b)J.f&=~A0;if((Q&m)!==0){var W=J.deps,X=W.length;for(var z=0;z<X;z++){var K=W[z];if(FJ(K))A7(K);if(K.wv>J.wv)return!0}if((Q&X0)!==0&&Q0===null)T(J,x)}return!1}function C9(J,Q,W=!0){var X=J.reactions;if(X===null)return;if(!t&&f0!==null&&f0.has(J))return;for(var z=0;z<X.length;z++){var K=X[z];if((K.f&b)!==0)C9(K,Q,!1);else if(Q===K){if(W)T(K,D);else if((K.f&x)!==0)T(K,m);YQ(K)}}}function hQ(J){var Q=J0,W=M0,X=T0,z=w,K=f0,Z=A,G=V0,$=wJ,Y=J.f;if(J0=null,M0=0,T0=null,w=(Y&(c|B0))===0?J:null,f0=null,KJ(J.ctx),V0=!1,wJ=++hJ,J.ac!==null)r0(()=>{J.ac.abort(XJ)}),J.ac=null;try{J.f|=AJ;var H=J.fn,B=H();J.f|=H0;var q=J.deps,U=S?.is_fork;if(J0!==null){var M;if(!U)EJ(J,M0);if(q!==null&&M0>0){q.length=M0+J0.length;for(M=0;M<J0.length;M++)q[M0+M]=J0[M]}else J.deps=q=J0;if(VJ()&&(J.f&X0)!==0)for(M=M0;M<q.length;M++)(q[M].reactions??=[]).push(J)}else if(!U&&q!==null&&M0<q.length)EJ(J,M0),q.length=M0;if(g0()&&T0!==null&&!V0&&q!==null&&(J.f&(b|m|D))===0)for(M=0;M<T0.length;M++)C9(T0[M],J);if(z!==null&&z!==J){if(hJ++,z.deps!==null)for(let L=0;L<W;L+=1)z.deps[L].rv=hJ;if(Q!==null)for(let L of Q)L.rv=hJ;if(T0!==null)if(X===null)X=T0;else X.push(...T0)}if((J.f&k0)!==0)J.f^=k0;return B}catch(L){return DQ(L)}finally{J.f^=AJ,J0=Q,M0=W,T0=X,w=z,f0=K,KJ(Z),V0=G,wJ=$}}function w4(J,Q){let W=Q.reactions;if(W!==null){var X=T8.call(W,J);if(X!==-1){var z=W.length-1;if(z===0)W=Q.reactions=null;else W[X]=W[z],W.pop()}}if(W===null&&(Q.f&b)!==0&&(J0===null||!YJ.call(J0,Q))){var K=Q;if((K.f&X0)!==0)K.f^=X0,K.f&=~A0;if(K.v!==y)iJ(K);if(K.ac!==null)r0(()=>{K.ac.abort(XJ),K.ac=null,T(K,D)});X9(K),EJ(K,0)}}function EJ(J,Q){var W=J.deps;if(W===null)return;for(var X=Q;X<W.length;X++)w4(J,W[X])}function e0(J){var Q=J.f;if((Q&g)!==0)return;T(J,x);var W=O,X=fQ;if(O=J,fQ=(Q&(c|B0))===0,P){var z=R0;IQ(J.component_function);var K=a0;cJ(J.dev_stack??a0)}try{if((Q&(W0|NJ))!==0)L9(J);else BQ(J);v7(J);var Z=hQ(J);if(J.teardown=typeof Z==="function"?Z:null,J.wv=S9,P&&h0&&(J.f&D)!==0&&J.deps!==null){for(var G of J.deps)if(G.set_during_effect)G.wv=rJ(),G.set_during_effect=!1}}finally{if(fQ=X,O=W,P)IQ(z),cJ(K)}}function R(J){var Q=J.f,W=(Q&b)!==0;if(w9?.add(J),w!==null&&!V0){var X=O!==null&&(O.f&g)!==0;if(!X&&(f0===null||!f0.has(J))){var z=w.deps;if((w.f&AJ)!==0){if(J.rv<hJ)if(J.rv=hJ,J0===null&&z!==null&&z[M0]===J)M0++;else if(J0===null)J0=[J];else J0.push(J)}else{if(w.deps??=[],!YJ.call(w.deps,J))w.deps.push(J);var K=J.reactions;if(K===null)J.reactions=[w];else if(!YJ.call(K,w))K.push(w)}}}if(P){if(!V0&&S0&&S===null&&OJ===null&&!S0.warned&&(S0.effect.f&AJ)===0&&!S0.effect_deps.has(J)){S0.warned=!0,S8(J.label);var Z=m0("traced at");if(Z)console.warn(Z)}if(PQ.delete(J),h0&&!V0&&$Q!==null&&w!==null&&$Q.reaction===w){if(J.trace)J.trace();else if(Z=m0("traced at"),Z){var G=$Q.entries.get(J);if(G===void 0)G={traces:[]},$Q.entries.set(J,G);var $=G.traces[G.traces.length-1];if(Z.stack!==$?.stack)G.traces.push(Z)}}}if(j0&&ZJ.has(J))return ZJ.get(J);if(W){var Y=J;if(j0){var H=Y.v;if((Y.f&x)===0&&Y.reactions!==null||A9(Y))H=UQ(Y);return ZJ.set(Y,H),H}var B=(Y.f&X0)===0&&!V0&&w!==null&&(fQ||(w.f&X0)!==0),q=(Y.f&H0)===0;if(FJ(Y)){if(B)Y.f|=X0;A7(Y)}if(B&&!q)I7(Y),N9(Y)}if(Q0?.has(J))return Q0.get(J);if((J.f&k0)!==0)throw J.v;return J.v}function N9(J){if(J.f|=X0,J.deps===null)return;for(let Q of J.deps)if((Q.reactions??=[]).push(J),(Q.f&b)!==0&&(Q.f&X0)===0)I7(Q),N9(Q)}function A9(J){if(J.v===y)return!0;if(J.deps===null)return!1;for(let Q of J.deps){if(ZJ.has(Q))return!0;if((Q.f&b)!==0&&A9(Q))return!0}return!1}function h(J){var Q=V0;try{return V0=!0,J()}finally{V0=Q}}function dQ(J){if(typeof J!=="object"||!J||J instanceof EventTarget)return;if(i in J)pQ(J);else if(!Array.isArray(J))for(let Q in J){let W=J[Q];if(typeof W==="object"&&W&&i in W)pQ(W)}}function pQ(J,Q=new Set){if(typeof J==="object"&&J!==null&&!(J instanceof EventTarget)&&!Q.has(J)){if(Q.add(J),J instanceof Date)J.getTime();for(let X in J)try{pQ(J[X],Q)}catch(z){}let W=DJ(J);if(W!==Object.prototype&&W!==Array.prototype&&W!==Map.prototype&&W!==Set.prototype&&W!==Date.prototype){let X=CQ(W);for(let z in X){let K=X[z].get;if(K)try{K.call(J)}catch(Z){}}}}}var S4=/^[a-zA-Z_$][a-zA-Z_$0-9]*$/;function GJ(J){if(typeof J!=="object"||J===null||i in J)return J;let Q=DJ(J);if(Q!==q7&&Q!==x8)return J;var W=new Map,X=zJ(J),z=JJ(0),K=P&&h0?m0("created at"):null,Z=wJ,G=(B)=>{if(wJ===Z)return B();var q=w,U=wJ;f(null),u7(Z);var M=B();return f(q),u7(U),M};if(X){if(W.set("length",JJ(J.length,K)),P)J=N4(J)}var $="";let Y=!1;function H(B){if(Y)return;Y=!0,$=B,G0(z,`${$} version`);for(let[q,U]of W)G0(U,gJ($,q));Y=!1}return new Proxy(J,{defineProperty(B,q,U){if(!("value"in U)||U.configurable===!1||U.enumerable===!1||U.writable===!1)_8();var M=W.get(q);if(M===void 0)G(()=>{var L=JJ(U.value,K);if(W.set(q,L),P&&typeof q==="string")G0(L,gJ($,q));return L});else P0(M,U.value,!0);return!0},deleteProperty(B,q){var U=W.get(q);if(U===void 0){if(q in B){let M=G(()=>JJ(y,K));if(W.set(q,M),TJ(z),P)G0(M,gJ($,q))}}else P0(U,y),TJ(z);return!0},get(B,q,U){if(q===i)return J;if(P&&q===OQ)return H;var M=W.get(q),L=q in B;if(M===void 0&&(!L||Y0(B,q)?.writable))M=G(()=>{var N=GJ(L?B[q]:y),k=JJ(N,K);if(P)G0(k,gJ($,q));return k}),W.set(q,M);if(M!==void 0){var V=R(M);return V===y?void 0:V}return Reflect.get(B,q,U)},getOwnPropertyDescriptor(B,q){var U=Reflect.getOwnPropertyDescriptor(B,q);if(U&&"value"in U){var M=W.get(q);if(M)U.value=R(M)}else if(U===void 0){var L=W.get(q),V=L?.v;if(L!==void 0&&V!==y)return{enumerable:!0,configurable:!0,value:V,writable:!0}}return U},has(B,q){if(q===i)return!0;var U=W.get(q),M=U!==void 0&&U.v!==y||Reflect.has(B,q);if(U!==void 0||O!==null&&(!M||Y0(B,q)?.writable)){if(U===void 0)U=G(()=>{var V=M?GJ(B[q]):y,N=JJ(V,K);if(P)G0(N,gJ($,q));return N}),W.set(q,U);var L=R(U);if(L===y)return!1}return M},set(B,q,U,M){var L=W.get(q),V=q in B;if(X&&q==="length")for(var N=U;N<L.v;N+=1){var k=W.get(N+"");if(k!==void 0)P0(k,y);else if(N in B){if(k=G(()=>JJ(y,K)),W.set(N+"",k),P)G0(k,gJ($,N))}}if(L===void 0){if(!V||Y0(B,q)?.writable){if(L=G(()=>JJ(void 0,K)),P)G0(L,gJ($,q));P0(L,GJ(U)),W.set(q,L)}}else{V=L.v!==y;var E=G(()=>GJ(U));P0(L,E)}var I=Reflect.getOwnPropertyDescriptor(B,q);if(I?.set)I.set.call(M,U);if(!V){if(X&&typeof q==="string"){var x0=W.get("length"),U0=Number(q);if(Number.isInteger(U0)&&U0>=x0.v)P0(x0,U0+1)}TJ(z)}return!0},ownKeys(B){R(z);var q=Reflect.ownKeys(B).filter((L)=>{var V=W.get(L);return V===void 0||V.v!==y});for(var[U,M]of W)if(M.v!==y&&!(U in B))q.push(U);return q},setPrototypeOf(){l8()}})}function gJ(J,Q){if(typeof Q==="symbol")return`${J}[Symbol(${Q.description??""})]`;if(S4.test(Q))return`${J}.${Q}`;return/^\d+$/.test(Q)?`${J}[${Q}]`:`${J}['${Q}']`}function _Q(J){try{if(J!==null&&typeof J==="object"&&i in J)return J[i]}catch{}return J}var C4=new Set(["copyWithin","fill","pop","push","reverse","shift","sort","splice","unshift"]);function N4(J){return new Proxy(J,{get(Q,W,X){var z=Reflect.get(Q,W,X);if(!C4.has(W))return z;return function(...K){K9();var Z=z.apply(this,K);return vQ(),Z}}})}function I9(){let{prototype:J,__svelte_cleanup:Q}=Array;if(Q)Q();let{indexOf:W,lastIndexOf:X,includes:z}=J;J.indexOf=function(K,Z){let G=W.call(this,K,Z);if(G===-1){for(let $=Z??0;$<this.length;$+=1)if(_Q(this[$])===K){SQ("array.indexOf(...)");break}}return G},J.lastIndexOf=function(K,Z){let G=X.call(this,K,Z??this.length-1);if(G===-1){for(let $=0;$<=(Z??this.length-1);$+=1)if(_Q(this[$])===K){SQ("array.lastIndexOf(...)");break}}return G},J.includes=function(K,Z){let G=z.call(this,K,Z);if(!G){for(let $=0;$<this.length;$+=1)if(_Q(this[$])===K){SQ("array.includes(...)");break}}return G},Array.__svelte_cleanup=()=>{J.indexOf=W,J.lastIndexOf=X,J.includes=z}}var f7,D9,GQ,R9,j9;function lQ(){if(f7!==void 0)return;f7=window,D9=document,GQ=/Firefox/.test(navigator.userAgent);var J=Element.prototype,Q=Node.prototype,W=Text.prototype;if(R9=Y0(Q,"firstChild").get,j9=Y0(Q,"nextSibling").get,P7(J))J[WQ]=void 0,J[FQ]=null,J[XQ]=void 0,J.__e=void 0;if(P7(W))W[zQ]=void 0;if(P)J.__svelte_meta=null,I9()}function a(J=""){return document.createTextNode(J)}function u(J){return R9.call(J)}function r(J){return j9.call(J)}function A4(J,Q){if(!F)return u(J);var W=u(C);if(W===null)W=C.appendChild(a());else if(Q&&W.nodeType!==dJ){var X=a();return W?.before(X),j(X),X}if(Q)iQ(W);return j(W),W}function I4(J,Q=!1){if(!F){var W=u(J);if(W instanceof Comment&&W.data==="")return r(W);return W}if(Q){if(C?.nodeType!==dJ){var X=a();return C?.before(X),j(X),X}iQ(C)}return C}function D4(J,Q=1,W=!1){let X=F?C:J;var z;while(Q--)z=X,X=r(X);if(!F)return X;if(W){if(X?.nodeType!==dJ){var K=a();if(X===null)z?.after(K);else X.before(K);return j(K),K}iQ(X)}return j(X),X}function qQ(J){J.textContent=""}function cQ(){if(!t)return!1;if(E0!==null)return!1;var J=O.f;return(J&H0)!==0}function p0(J,Q,W){if(Q==null||Q===wQ)return W?document.createElement(J,{is:W}):document.createElement(J);return W?document.createElementNS(Q,J,{is:W}):document.createElementNS(Q,J)}function iQ(J){if(J.nodeValue.length<65536)return;let Q=J.nextSibling;while(Q!==null&&Q.nodeType===dJ)Q.remove(),J.nodeValue+=Q.nodeValue,Q=J.nextSibling}var F=!1;function d(J){F=J}var C;function j(J){if(J===null)throw HJ(),c0;return C=J}function l(){return j(r(C))}function T9(J){if(!F)return;if(r(C)!==null)throw HJ(),c0;C=J}function L7(J=1){if(F){var Q=J,W=C;while(Q--)W=r(W);C=W}}function t0(J=!0){var Q=0,W=C;while(!0){if(W.nodeType===D0){var X=W.data;if(X===IJ){if(Q===0)return W;Q-=1}else if(X===_J||X===BJ||X[0]==="["&&!isNaN(Number(X.slice(1))))Q+=1}var z=r(W);if(J)W.remove();W=z}}function MQ(J){if(!J||J.nodeType!==D0)throw HJ(),c0;return J.data}var JQ=Symbol("events"),p7=new Set,oQ=new Set;function k9(J,Q,W){(Q[JQ]??={})[J]=W}function E9(J){for(var Q=0;Q<J.length;Q++)p7.add(J[Q]);for(var W of oQ)W(J)}var x9=null;function d7(J){var Q=this,W=Q.ownerDocument,X=J.type,z=J.composedPath?.()||[],K=z[0]||J.target;x9=J;var Z=0,G=x9===J&&J[JQ];if(G){var $=z.indexOf(G);if($!==-1&&(Q===document||Q===window)){J[JQ]=Q;return}var Y=z.indexOf(Q);if(Y===-1)return;if($<=Y)Z=$}if(K=z[Z]||J.target,K===Q)return;n(J,"currentTarget",{configurable:!0,get(){return K||W}});var H=w,B=O;f(null),p(null);try{var q,U=[];while(K!==null){if(K===Q)break;try{var M=K[JQ]?.[X];if(M!=null&&(!K.disabled||J.target===K))M.call(K,J)}catch(L){if(q)U.push(L);else q=L}if(J.cancelBubble)break;Z++,K=Z<z.length?z[Z]:null}if(q){for(let L of U)queueMicrotask(()=>{throw L});throw q}}finally{J[JQ]=Q,delete J.currentTarget,f(H),p(B)}}var R4=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:(J)=>{return J}});function b9(J){return R4?.createHTML(J)??J}function _7(J){var Q=p0("template");return Q.innerHTML=b9(J.replaceAll("<!>","<!---->")),Q.content}function C0(J,Q){var W=O;if(W.nodes===null)W.nodes={start:J,end:Q,a:null,t:null}}function x4(J,Q){var W=(Q&O8)!==0,X=(Q&F8)!==0,z,K=!J.startsWith("<!>");return()=>{if(F)return C0(C,null),C;if(z===void 0){if(z=_7(K?J:"<!>"+J),!W)z=u(z)}var Z=X||GQ?document.importNode(z,!0):z.cloneNode(!0);if(W){var G=u(Z),$=Z.lastChild;C0(G,$)}else C0(Z,Z);return Z}}function k4(){if(F)return C0(C,null),C;var J=document.createDocumentFragment(),Q=document.createComment(""),W=a();return J.append(Q,W),C0(Q,W),J}function l7(J,Q){if(F){var W=O;if((W.f&H0)===0||W.nodes.end===null)W.nodes.end=C;l();return}if(J===null)return;J.before(Q)}var E4=/\r/g;function y9(J){J=J.replace(E4,"");let Q=5381,W=J.length;while(W--)Q=(Q<<5)-Q^J.charCodeAt(W);return(Q>>>0).toString(36)}var b4=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected","webkitdirectory","defer","disablepictureinpicture","disableremoteplayback"];var NX=[...b4,"formNoValidate","isMap","noModule","playsInline","readOnly","value","volume","defaultValue","defaultChecked","srcObject","noValidate","allowFullscreen","disablePictureInPicture","disableRemotePlayback"];var y4=["touchstart","touchmove"];function h9(J){return y4.includes(J)}var h4=["$state","$state.raw","$derived","$derived.by"],AX=[...h4,"$state.eager","$state.snapshot","$props","$props.id","$bindable","$effect","$effect.pre","$effect.tracking","$effect.root","$effect.pending","$inspect","$inspect().with","$inspect.trace","$host"];function sQ(J){return J?.replace(/\//g,"/")}var c7=!0;function g4(J,Q){var W=Q==null?"":typeof Q==="object"?`${Q}`:Q;if(W!==(J[zQ]??=J.nodeValue))J[zQ]=W,J.nodeValue=`${W}`}function rQ(J,Q){return g9(J,Q)}function o7(J,Q){lQ(),Q.intro=Q.intro??!1;let W=Q.target,X=F,z=C;try{var K=u(W);while(K&&(K.nodeType!==D0||K.data!==_J))K=r(K);if(!K)throw c0;d(!0),j(K);let Z=g9(J,{...Q,anchor:K});return d(!1),Z}catch(Z){if(Z instanceof Error&&Z.message.split(`
|
|
49
|
+
`).some((G)=>G.startsWith("https://svelte.dev/e/")))throw Z;if(Z!==c0)console.warn("Failed to hydrate: ",Z);if(Q.recover===!1)f8();return lQ(),qQ(W),d(!1),rQ(J,Q)}finally{d(X),j(z)}}var aQ=new Map;function g9(J,{target:Q,anchor:W,props:X={},events:z,context:K,intro:Z=!0,transformError:G}){lQ();var $=void 0,Y=V9(()=>{var H=W??Q.appendChild(a());O7(H,{pending:()=>{}},(U)=>{B7({});var M=A;if(K)M.c=K;if(z)X.$$events=z;if(F)C0(U,null);if(c7=Z,$=J(U,X)||{},c7=!0,F){if(O.nodes.end=C,C===null||C.nodeType!==D0||C.data!==IJ)throw HJ(),c0}H7()},G);var B=new Set,q=(U)=>{for(var M=0;M<U.length;M++){var L=U[M];if(B.has(L))continue;B.add(L);var V=h9(L);for(let E of[Q,document]){var N=aQ.get(E);if(N===void 0)N=new Map,aQ.set(E,N);var k=N.get(L);if(k===void 0)E.addEventListener(L,d7,{passive:V}),N.set(L,1);else N.set(L,k+1)}}};return q(lJ(p7)),oQ.add(q),()=>{for(var U of B)for(let V of[Q,document]){var M=aQ.get(V),L=M.get(U);if(--L==0){if(V.removeEventListener(U,d7),M.delete(U),M.size===0)aQ.delete(V)}else M.set(U,L)}if(oQ.delete(q),H!==W)H.parentNode?.removeChild(H)}});return i7.set($,Y),$}var i7=new WeakMap;function s7(J,Q){let W=i7.get(J);if(W)return i7.delete(J),W(Q);if(P)if(i in J)R8();else D8();return Promise.resolve()}var v9=new Map;function m9(J,Q){var W=v9.get(J);if(!W)W=new Set,v9.set(J,W);W.add(Q)}class $J{anchor;#J=new Map;#Q=new Map;#W=new Map;#G=new Set;#K=!0;constructor(J,Q=!0){this.anchor=J,this.#K=Q}#Z=(J)=>{if(!this.#J.has(J))return;var Q=this.#J.get(J),W=this.#Q.get(Q);if(W)eJ(W),this.#G.delete(Q);else{var X=this.#W.get(Q);if(X){if(eJ(X.effect),this.#Q.set(Q,X.effect),this.#W.delete(Q),P)X.fragment.lastChild[z7]=this.anchor;X.fragment.lastChild.remove(),this.anchor.before(X.fragment),W=X.effect}}for(let[z,K]of this.#J){if(this.#J.delete(z),z===J)break;let Z=this.#W.get(K);if(Z)v(Z.effect),this.#W.delete(K)}for(let[z,K]of this.#Q){if(z===Q||this.#G.has(z))continue;let Z=()=>{if(Array.from(this.#J.values()).includes(z)){var $=document.createDocumentFragment();oJ(K,$),$.append(a()),this.#W.set(z,{effect:K,fragment:$})}else v(K);this.#G.delete(z),this.#Q.delete(z)};if(this.#K||!W)this.#G.add(z),n0(K,Z,!1);else Z()}};#X=(J)=>{this.#J.delete(J);let Q=Array.from(this.#J.values());for(let[W,X]of this.#W)if(!Q.includes(W))v(X.effect),this.#W.delete(W)};ensure(J,Q){var W=S,X=cQ();if(Q&&!this.#Q.has(J)&&!this.#W.has(J))if(X){var z=document.createDocumentFragment(),K=a();z.append(K),this.#W.set(J,{effect:s(()=>Q(K)),fragment:z})}else this.#Q.set(J,s(()=>Q(this.anchor)));if(this.#J.set(W,J),X){for(let[Z,G]of this.#Q)if(Z===J)W.unskip_effect(G);else W.skip_effect(G);for(let[Z,G]of this.#W)if(Z===J)W.unskip_effect(G.effect);else W.skip_effect(G.effect);W.oncommit(this.#Z),W.ondiscard(this.#X)}else{if(F)this.anchor=C;this.#Z(W)}}}function u4(J,Q,W=!1){var X;if(F)X=C,l();var z=new $J(J),K=W?O0:0;function Z(G,$){if(F){var Y=MQ(X);if(G!==parseInt(Y.substring(1))){var H=t0();j(H),z.anchor=H,d(!1),z.ensure(G,$),d(!0);return}}z.ensure(G,$)}w0(()=>{var G=!1;if(Q(($,Y=0)=>{G=!0,Z(Y,$)}),!G)Z(-1,null)},K)}var f4=Symbol("NaN");function p4(J,Q,W){if(F)l();var X=new $J(J),z=!g0();w0(()=>{var K=Q();if(K!==K)K=f4;if(z&&K!==null&&typeof K==="object")K={};X.ensure(K,W)})}function d4(J,Q,W){var X=[],z=Q.length,K,Z=Q.length;for(var G=0;G<z;G++){let B=Q[G];n0(B,()=>{if(K){if(K.pending.delete(B),K.done.add(B),K.pending.size===0){var q=J.outrogroups;if(a7(J,lJ(K.done)),q.delete(K),q.size===0)J.outrogroups=null}}else Z-=1},!1)}if(Z===0){var $=X.length===0&&W!==null;if($){var Y=W,H=Y.parentNode;qQ(H),H.append(Y),J.items.clear()}a7(J,Q,!$)}else K={pending:new Set(Q),done:new Set},(J.outrogroups??=new Set).add(K)}function a7(J,Q,W=!0){var X;if(J.pending.size>0){X=new Set;for(let Z of J.pending.values())for(let G of Z)X.add(J.items.get(G).e)}for(var z=0;z<Q.length;z++){var K=Q[z];if(X?.has(K)){K.f|=y0;let Z=document.createDocumentFragment();oJ(K,Z)}else v(Q[z],W)}}var f9;function _4(J,Q,W,X,z,K=null){var Z=J,G=new Map,$=(Q&Z7)!==0;if($){var Y=J;Z=F?j(u(Y)):Y.appendChild(a())}if(F)l();var H=null,B=xJ(()=>{var E=W();return zJ(E)?E:E==null?[]:lJ(E)});if(P)G0(B,"{#each ...}");var q,U=new Map,M=!0;function L(E){if((k.effect.f&g)!==0)return;if(k.pending.delete(E),k.fallback=H,l4(k,q,Z,Q,X),H!==null)if(q.length===0)if((H.f&y0)===0)eJ(H);else H.f^=y0,LQ(H,null,Z);else n0(H,()=>{H=null})}function V(E){k.pending.delete(E)}var N=w0(()=>{q=R(B);var E=q.length;let I=!1;if(F){var x0=MQ(Z)===BJ;if(x0!==(E===0))Z=t0(),j(Z),d(!1),I=!0}var U0=new Set,N0=S,mJ=cQ();for(var d0=0;d0<E;d0+=1){if(F&&C.nodeType===D0&&C.data===IJ)Z=C,I=!0,d(!1);var b0=q[d0],uJ=X(b0,d0);if(P){var K8=X(b0,d0);if(uJ!==K8)h8(String(d0),String(uJ),String(K8))}var WJ=M?null:G.get(uJ);if(WJ){if(WJ.v)u0(WJ.v,b0);if(WJ.i)u0(WJ.i,d0);if(mJ)N0.unskip_effect(WJ.e)}else{if(WJ=c4(G,M?Z:f9??=a(),b0,uJ,d0,z,Q,W),!M)WJ.e.f|=y0;G.set(uJ,WJ)}U0.add(uJ)}if(E===0&&K&&!H)if(M)H=s(()=>K(Z));else H=s(()=>K(f9??=a())),H.f|=y0;if(E>U0.size)if(P)i4(q,X);else U7("","","");if(F&&E>0)j(t0());if(!M)if(U.set(N0,U0),mJ){for(let[K4,Z4]of G)if(!U0.has(K4))N0.skip_effect(Z4.e);N0.oncommit(L),N0.ondiscard(V)}else L(N0);if(I)d(!0);R(B)}),k={effect:N,flags:Q,items:G,pending:U,outrogroups:null,fallback:H};if(M=!1,F)Z=C}function VQ(J){while(J!==null&&(J.f&c)===0)J=J.next;return J}function l4(J,Q,W,X,z){var K=(X&U8)!==0,Z=Q.length,G=J.items,$=VQ(J.effect.first),Y,H=null,B,q=[],U=[],M,L,V,N;if(K){for(N=0;N<Z;N+=1)if(M=Q[N],L=z(M,N),V=G.get(L).e,(V.f&y0)===0)V.nodes?.a?.measure(),(B??=new Set).add(V)}for(N=0;N<Z;N+=1){if(M=Q[N],L=z(M,N),V=G.get(L).e,J.outrogroups!==null)for(let b0 of J.outrogroups)b0.pending.delete(V),b0.done.delete(V);if((V.f&_)!==0){if(eJ(V),K)V.nodes?.a?.unfix(),(B??=new Set).delete(V)}if((V.f&y0)!==0)if(V.f^=y0,V===$)LQ(V,null,W);else{var k=H?H.next:$;if(V===J.effect.last)J.effect.last=V.prev;if(V.prev)V.prev.next=V.next;if(V.next)V.next.prev=V.prev;SJ(J,H,V),SJ(J,V,k),LQ(V,k,W),H=V,q=[],U=[],$=VQ(H.next);continue}if(V!==$){if(Y!==void 0&&Y.has(V)){if(q.length<U.length){var E=U[0],I;H=E.prev;var x0=q[0],U0=q[q.length-1];for(I=0;I<q.length;I+=1)LQ(q[I],E,W);for(I=0;I<U.length;I+=1)Y.delete(U[I]);SJ(J,x0.prev,U0.next),SJ(J,H,x0),SJ(J,U0,E),$=E,H=U0,N-=1,q=[],U=[]}else Y.delete(V),LQ(V,$,W),SJ(J,V.prev,V.next),SJ(J,V,H===null?J.effect.first:H.next),SJ(J,H,V),H=V;continue}q=[],U=[];while($!==null&&$!==V)(Y??=new Set).add($),U.push($),$=VQ($.next);if($===null)continue}if((V.f&y0)===0)q.push(V);H=V,$=VQ(V.next)}if(J.outrogroups!==null){for(let b0 of J.outrogroups)if(b0.pending.size===0)a7(J,lJ(b0.done)),J.outrogroups?.delete(b0);if(J.outrogroups.size===0)J.outrogroups=null}if($!==null||Y!==void 0){var N0=[];if(Y!==void 0){for(V of Y)if((V.f&_)===0)N0.push(V)}while($!==null){if(($.f&_)===0&&$!==J.fallback)N0.push($);$=VQ($.next)}var mJ=N0.length;if(mJ>0){var d0=(X&Z7)!==0&&Z===0?W:null;if(K){for(N=0;N<mJ;N+=1)N0[N].nodes?.a?.measure();for(N=0;N<mJ;N+=1)N0[N].nodes?.a?.fix()}d4(J,N0,d0)}}if(K)o(()=>{if(B===void 0)return;for(V of B)V.nodes?.a?.apply()})}function c4(J,Q,W,X,z,K,Z,G){var $=(Z&q8)!==0?(Z&B8)===0?bJ(W,!1,!1):q0(W):null,Y=(Z&P8)!==0?q0(z):null;if(P&&$)$.trace=()=>{G()[Y?.v??z]};return{v:$,i:Y,e:s(()=>{return K(Q,$??W,Y??z,G),()=>{J.delete(X)}})}}function LQ(J,Q,W){if(!J.nodes)return;var X=J.nodes.start,z=J.nodes.end,K=Q&&(Q.f&y0)===0?Q.nodes.start:W;while(X!==null){var Z=r(X);if(K.before(X),X===z)return;X=Z}}function SJ(J,Q,W){if(Q===null)J.effect.first=W;else Q.next=W;if(W===null)J.effect.last=Q;else W.prev=Q}function i4(J,Q){let W=new Map,X=J.length;for(let z=0;z<X;z++){let K=Q(J[z],z);if(W.has(K)){let Z=String(W.get(K)),G=String(z),$=String(K);if($.startsWith("[object "))$=null;U7(Z,G,$)}W.set(K,z)}}function o4(J,Q,W){if(!Q||Q===y9(String(W??"")))return;let X,z=J.__svelte_meta?.loc;if(z)X=`near ${z.file}:${z.line}:${z.column}`;else if(R0?.[F0])X=`in ${R0[F0]}`;I8(sQ(X))}function s4(J,Q,W=!1,X=!1,z=!1,K=!1){var Z=J,G="";if(W){var $=J;if(F)Z=j(u($))}g7(()=>{var Y=O;if(G===(G=Q()??"")){if(F)l();return}if(W&&!F){if(Y.nodes=null,$.innerHTML=G,G!=="")C0(u($),$.lastChild);return}if(Y.nodes!==null)m7(Y.nodes.start,Y.nodes.end),Y.nodes=null;if(G==="")return;if(F){var H=C.data,B=l(),q=B;while(B!==null&&(B.nodeType!==D0||B.data!==""))q=B,B=r(B);if(B===null)throw HJ(),c0;if(P&&!K)o4(B.parentNode,H,G);C0(C,q),Z=j(B);return}var U=X?KQ:z?$7:void 0,M=p0(X?"svg":z?"math":"template",U);M.innerHTML=G;var L=X||z?M:M.content;if(C0(u(L),L.lastChild),X||z)while(u(L))Z.before(u(L));else Z.before(L)})}function a4(J,Q,W,X,z){if(F)l();var K=Q.$$slots?.[W],Z=!1;if(K===!0)K=Q[W==="default"?"children":W],Z=!0;if(K===void 0){if(z!==null)z(J)}else K(J,Z?()=>X:X)}function J6(J,Q){L0(()=>{var W=J.getRootNode(),X=W.host?W:W.head??W.ownerDocument.head;if(!X.querySelector("#"+Q.hash)){let z=p0("style");if(z.id=Q.hash,z.textContent=Q.code,X.appendChild(z),P)m9(Q.hash,z)}})}function Q6(J,Q,W){L0(()=>{var X=h(()=>Q(J,W?.())||{});if(W&&X?.update){var z=!1,K={};e(()=>{var Z=W();if(dQ(Z),z&&jQ(K,Z))K=Z,X.update(Z)}),z=!0}if(X?.destroy)return()=>X.destroy()})}var p9=[...`
|
|
50
|
+
\r\f \v\uFEFF`];function _9(J,Q,W){var X=J==null?"":""+J;if(Q)X=X?X+" "+Q:Q;if(W){for(var z of Object.keys(W))if(W[z])X=X?X+" "+z:z;else if(X.length){var K=z.length,Z=0;while((Z=X.indexOf(z,Z))>=0){var G=Z+K;if((Z===0||p9.includes(X[Z-1]))&&(G===X.length||p9.includes(X[G])))X=(Z===0?"":X.substring(0,Z))+X.substring(G+1);else Z=G}}}return X===""?null:X}function d9(J,Q=!1){var W=Q?" !important;":";",X="";for(var z of Object.keys(J)){var K=J[z];if(K!=null&&K!=="")X+=" "+z+": "+K+W}return X}function r7(J){if(J[0]!=="-"||J[1]!=="-")return J.toLowerCase();return J}function l9(J,Q){if(Q){var W="",X,z;if(Array.isArray(Q))X=Q[0],z=Q[1];else X=Q;if(J){J=String(J).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var K=!1,Z=0,G=!1,$=[];if(X)$.push(...Object.keys(X).map(r7));if(z)$.push(...Object.keys(z).map(r7));var Y=0,H=-1;let L=J.length;for(var B=0;B<L;B++){var q=J[B];if(G){if(q==="/"&&J[B-1]==="*")G=!1}else if(K){if(K===q)K=!1}else if(q==="/"&&J[B+1]==="*")G=!0;else if(q==='"'||q==="'")K=q;else if(q==="(")Z++;else if(q===")")Z--;if(!G&&K===!1&&Z===0){if(q===":"&&H===-1)H=B;else if(q===";"||B===L-1){if(H!==-1){var U=r7(J.substring(Y,H).trim());if(!$.includes(U)){if(q!==";")B++;var M=J.substring(Y,B).trim();W+=" "+M+";"}}Y=B+1,H=-1}}}}if(X)W+=d9(X);if(z)W+=d9(z,!0);return W=W.trim(),W===""?null:W}return J==null?null:String(J)}function c9(J,Q,W,X,z,K){var Z=J[WQ];if(F||Z!==W||Z===void 0){var G=_9(W,X,K);if(!F||G!==J.getAttribute("class"))if(G==null)J.removeAttribute("class");else if(Q)J.className=G;else J.setAttribute("class",G);J[WQ]=W}else if(K&&z!==K)for(var $ in K){var Y=!!K[$];if(z==null||Y!==!!z[$])J.classList.toggle($,Y)}return K}function n7(J,Q={},W,X){for(var z in W){var K=W[z];if(Q[z]!==K)if(W[z]==null)J.style.removeProperty(z);else J.style.setProperty(z,K,X)}}function i9(J,Q,W,X){var z=J[XQ];if(F||z!==Q){var K=l9(Q,X);if(!F||K!==J.getAttribute("style"))if(K==null)J.removeAttribute("style");else J.style.cssText=K;J[XQ]=Q}else if(X)if(Array.isArray(X))n7(J,W?.[0],X[0]),n7(J,W?.[1],X[1],"important");else n7(J,W,X);return X}var P6=Symbol("class"),U6=Symbol("style"),B6=Symbol("is custom element"),H6=Symbol("is html"),Y6=K7?"link":"LINK";function a9(J,Q,W,X){var z=V6(J);if(F){if(z[Q]=J.getAttribute(Q),Q==="src"||Q==="srcset"||Q==="href"&&J.nodeName===Y6){if(!X)L6(J,Q,W??"");return}}if(z[Q]===(z[Q]=W))return;if(Q==="loading")J[$8]=W;if(W==null)J.removeAttribute(Q);else if(typeof W!=="string"&&r9(J).includes(Q))J[Q]=W;else J.setAttribute(Q,W)}function M6(J,Q,W){var X=w,z=O;let K=F;if(F)d(!1);f(null),p(null);try{if(Q!=="style"&&(t7.has(J.getAttribute("is")||J.nodeName)||!customElements||customElements.get(J.getAttribute("is")||J.nodeName.toLowerCase())?r9(J).includes(Q):W&&typeof W==="object"))J[Q]=W;else a9(J,Q,W==null?W:String(W))}finally{if(f(X),p(z),K)d(!0)}}function V6(J){return J[FQ]??={[B6]:J.nodeName.includes("-"),[H6]:J.namespaceURI===wQ}}var t7=new Map;function r9(J){var Q=J.getAttribute("is")||J.nodeName,W=t7.get(Q);if(W)return W;t7.set(Q,W=[]);var X,z=J,K=Element.prototype;while(K!==z){X=CQ(z);for(var Z in X)if(X[Z].set&&Z!=="innerHTML"&&Z!=="textContent"&&Z!=="innerText")W.push(Z);z=DJ(z)}return W}function L6(J,Q,W){if(!P)return;if(Q==="srcset"&&O6(J,W))return;if(e7(J.getAttribute(Q)??"",W))return;A8(Q,J.outerHTML.replace(J.innerHTML,J.innerHTML&&"..."),String(W))}function e7(J,Q){if(J===Q)return!0;return new URL(J,document.baseURI).href===new URL(Q,document.baseURI).href}function o9(J){return J.split(",").map((Q)=>Q.trim().split(" ").filter(Boolean))}function O6(J,Q){var W=o9(J.srcset),X=o9(Q);return X.length===W.length&&X.every(([z,K],Z)=>K===W[Z][1]&&(e7(W[Z][0],z)||e7(z,W[Z][0])))}class n9{#J=new WeakMap;#Q;#W;static entries=new WeakMap;constructor(J){this.#W=J}observe(J,Q){var W=this.#J.get(J)||new Set;return W.add(Q),this.#J.set(J,W),this.#G().observe(J,this.#W),()=>{var X=this.#J.get(J);if(X.delete(Q),X.size===0)this.#J.delete(J),this.#Q.unobserve(J)}}#G(){return this.#Q??(this.#Q=new ResizeObserver((J)=>{for(var Q of J){n9.entries.set(Q.target,Q);for(var W of this.#J.get(Q.target)||[])W(Q)}}))}}function J8(J,Q){return J===Q||J?.[i]===Q}function F6(J={},Q,W,X){var z=A.r,K=O;return L0(()=>{var Z,G;return e(()=>{Z=G,G=X?.()||[],h(()=>{if(!J8(W(...G),J)){if(Q(J,...G),Z&&J8(W(...Z),J))Q(null,...Z)}})}),()=>{let $=K;while($!==z&&$.parent!==null&&$.parent.f&pJ)$=$.parent;let Y=()=>{if(G&&J8(W(...G),J))Q(null,...G)},H=$.teardown;$.teardown=()=>{Y(),H?.()}}}),J}function w6(J,Q,W,X){var z=!MJ||(W&Y8)!==0,K=(W&V8)!==0,Z=(W&L8)!==0,G=X,$=!0,Y=void 0,H=()=>{if(Z&&z)return Y??=LJ(X),R(Y);if($)$=!1,G=Z?h(X):X;return G};let B;if(K){var q=i in J||QQ in J;B=Y0(J,Q)?.set??(q&&Q in J?(I)=>J[Q]=I:void 0)}var U,M=!1;if(K)[U,M]=R7(()=>J[Q]);else U=J[Q];if(U===void 0&&X!==void 0){if(U=H(),B){if(z)p8(Q);B(U)}}var L;if(z)L=()=>{var I=J[Q];if(I===void 0)return H();return $=!0,I};else L=()=>{var I=J[Q];if(I!==void 0)G=void 0;return I===void 0?G:I};if(z&&(W&M8)===0)return L;if(B){var V=J.$$legacy;return function(I,x0){if(arguments.length>0){if(!z||!x0||V||M)B(x0?L():I);return I}return L()}}var N=!1,k=((W&H8)!==0?LJ:xJ)(()=>{return N=!1,L()});if(P)k.label=Q;if(K)R(k);var E=O;return function(I,x0){if(arguments.length>0){let U0=x0?R(k):z&&K?GJ(I):I;if(P0(k,U0),N=!0,G!==void 0)G=U0;return I}if(j0&&N||(E.f&g)!==0)return k.v;return R(k)}}function t9(J){return new e9(J)}class e9{#J;#Q;constructor(J){var Q=new Map,W=(z,K)=>{var Z=bJ(K,!1,!1);return Q.set(z,Z),Z};let X=new Proxy({...J.props||{},$$events:{}},{get(z,K){return R(Q.get(K)??W(K,Reflect.get(z,K)))},has(z,K){if(K===QQ)return!0;return R(Q.get(K)??W(K,Reflect.get(z,K))),Reflect.has(z,K)},set(z,K,Z){return P0(Q.get(K)??W(K,Z),Z),Reflect.set(z,K,Z)}});if(this.#Q=(J.hydrate?o7:rQ)(J.component,{target:J.target,anchor:J.anchor,props:X,context:J.context,intro:J.intro??!1,recover:J.recover,transformError:J.transformError}),!t&&(!J?.props?.$$host||J.sync===!1))tJ();this.#J=X.$$events;for(let z of Object.keys(this.#Q)){if(z==="$set"||z==="$destroy"||z==="$on")continue;n(this,z,{get(){return this.#Q[z]},set(K){this.#Q[z]=K},enumerable:!0})}this.#Q.$set=(z)=>{Object.assign(X,z)},this.#Q.$destroy=()=>{s7(this.#Q)}}$set(J){this.#Q.$set(J)}$on(J,Q){this.#J[J]=this.#J[J]||[];let W=(...X)=>Q.call(this,...X);return this.#J[J].push(W),()=>{this.#J[J]=this.#J[J].filter((X)=>X!==W)}}$destroy(){this.#Q.$destroy()}}var J4;if(typeof HTMLElement==="function")J4=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;$$shadowRoot=null;constructor(J,Q,W){super();if(this.$$ctor=J,this.$$s=Q,W)this.$$shadowRoot=this.attachShadow(W)}addEventListener(J,Q,W){if(this.$$l[J]=this.$$l[J]||[],this.$$l[J].push(Q),this.$$c){let X=this.$$c.$on(J,Q);this.$$l_u.set(Q,X)}super.addEventListener(J,Q,W)}removeEventListener(J,Q,W){if(super.removeEventListener(J,Q,W),this.$$c){let X=this.$$l_u.get(Q);if(X)X(),this.$$l_u.delete(Q)}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let J=function(X){return(z)=>{let K=p0("slot");if(X!=="default")K.name=X;l7(z,K)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;let Q={},W=j6(this);for(let X of this.$$s)if(X in W)if(X==="default"&&!this.$$d.children)this.$$d.children=J(X),Q.default=!0;else Q[X]=J(X);for(let X of this.attributes){let z=this.$$g_p(X.name);if(!(z in this.$$d))this.$$d[z]=tQ(z,X.value,this.$$p_d,"toProp")}for(let X in this.$$p_d)if(!(X in this.$$d)&&this[X]!==void 0)this.$$d[X]=this[X],delete this[X];this.$$c=t9({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:Q,$$host:this}}),this.$$me=h7(()=>{e(()=>{this.$$r=!0;for(let X of ZQ(this.$$c)){if(!this.$$p_d[X]?.reflect)continue;this.$$d[X]=this.$$c[X];let z=tQ(X,this.$$d[X],this.$$p_d,"toAttribute");if(z==null)this.removeAttribute(this.$$p_d[X].attribute||X);else this.setAttribute(this.$$p_d[X].attribute||X,z)}this.$$r=!1})});for(let X in this.$$l)for(let z of this.$$l[X]){let K=this.$$c.$on(X,z);this.$$l_u.set(z,K)}this.$$l={}}}attributeChangedCallback(J,Q,W){if(this.$$r)return;J=this.$$g_p(J),this.$$d[J]=tQ(J,W,this.$$p_d,"toProp"),this.$$c?.$set({[J]:this.$$d[J]})}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{if(!this.$$cn&&this.$$c)this.$$c.$destroy(),this.$$me(),this.$$c=void 0})}$$g_p(J){return ZQ(this.$$p_d).find((Q)=>this.$$p_d[Q].attribute===J||!this.$$p_d[Q].attribute&&Q.toLowerCase()===J)||J}};function tQ(J,Q,W,X){let z=W[J]?.type;if(Q=z==="Boolean"&&typeof Q!=="boolean"?Q!=null:Q,!X||!W[J])return Q;else if(X==="toAttribute")switch(z){case"Object":case"Array":return Q==null?null:JSON.stringify(Q);case"Boolean":return Q?"":null;case"Number":return Q==null?null:Q;default:return Q}else switch(z){case"Object":case"Array":return Q&&JSON.parse(Q);case"Boolean":return Q;case"Number":return Q!=null?+Q:Q;default:return Q}}function j6(J){let Q={};return J.childNodes.forEach((W)=>{Q[W.slot||"default"]=!0}),Q}function T6(J,Q,W,X,z,K){let Z=class extends J4{constructor(){super(J,W,z);this.$$p_d=Q}static get observedAttributes(){return ZQ(Q).map((G)=>(Q[G].attribute||G).toLowerCase())}};if(ZQ(Q).forEach((G)=>{n(Z.prototype,G,{get(){return this.$$c&&G in this.$$c?this.$$c[G]:this.$$d[G]},set($){$=tQ(G,$,Q),this.$$d[G]=$;var Y=this.$$c;if(Y){var H=Y0(Y,G)?.get;if(H)Y[G]=$;else Y.$set({[G]:$})}}})}),X.forEach((G)=>{n(Z.prototype,G,{get(){return this.$$c?.[G]}})}),K)Z=K(Z);return J.element=Z,Z}if(P){let J=function(Q){if(!(Q in globalThis)){let W;Object.defineProperty(globalThis,Q,{configurable:!0,get:()=>{if(W!==void 0)return W;d8(Q)},set:(X)=>{W=X}})}};J("$state"),J("$effect"),J("$derived"),J("$inspect"),J("$props"),J("$bindable")}import{createContext as eQ}from"@pie-players/pie-context";var Q4=eQ(Symbol.for("pie.assessmentToolkit.runtimeContext")),W4=eQ(Symbol.for("pie.assessmentToolkit.hostRuntimeContext")),X4=eQ(Symbol.for("pie.assessmentToolkit.shellContext")),x6=eQ(Symbol.for("pie.assessmentToolkit.regionScopeContext"));import{ContextConsumer as k6}from"@pie-players/pie-context";function W8(J,Q,W){let X=!1,z=new k6(J,{context:Q,subscribe:!0,onValue:(Y)=>{X=!0,W(Y)}});z.connect();let K=(Y)=>{if(Y.context!==Q)return;z.requestValue()};J.addEventListener("context-provider",K);let Z=0,G=200,$=globalThis.setInterval(()=>{if(X||Z>=G){globalThis.clearInterval($);return}Z+=1,z.requestValue()},50);return()=>{globalThis.clearInterval($),J.removeEventListener("context-provider",K),z.disconnect()}}function qH(J,Q){return W8(J,Q4,Q)}function PH(J,Q){return W8(J,W4,Q)}function UH(J,Q){return W8(J,X4,Q)}var J7={assessment:[],section:[],item:[],passage:[],rubric:[],element:[]};var X8={section:[...J7.section],item:[...J7.item],passage:[...J7.passage]};function vJ(J){return typeof J==="object"&&J!==null&&!Array.isArray(J)}function CJ(J,Q){if(J==null)return[];if(!Array.isArray(J))throw Error(`Invalid tools config at "${Q}": expected an array of tool ids.`);if(J.find((X)=>typeof X!=="string")!==void 0)throw Error(`Invalid tools config at "${Q}": all entries must be strings.`);return J}function E6(J){if(J==null)return;if(!vJ(J))throw Error('Invalid tools config at "placement": expected an object with section/item/passage arrays.');return J}function b6(J){if(J==null)return;if(!vJ(J))throw Error('Invalid tools config at "policy": expected an object with allowed/blocked arrays.');return J}function y6(J,Q){if(Q==null)return;if(!vJ(Q))throw Error(`Invalid tools config at "providers.${J}": expected an object.`);let W=Q,X=(z)=>z==="polly"||z==="google"||z==="custom";if("enabled"in W&&W.enabled!==void 0&&typeof W.enabled!=="boolean")throw Error(`Invalid tools config at "providers.${J}.enabled": expected a boolean.`);if("settings"in W&&W.settings!==void 0&&!vJ(W.settings))throw Error(`Invalid tools config at "providers.${J}.settings": expected an object.`);if("provider"in W&&W.provider!==void 0&&!vJ(W.provider)&&!(J==="textToSpeech"&&X(W.provider)))throw Error(`Invalid tools config at "providers.${J}.provider": expected an object.`);return W}function h6(J){if(J==null)return{};if(!vJ(J))throw Error('Invalid tools config at "providers": expected an object keyed by tool id.');let Q={};for(let[W,X]of Object.entries(J))Q[W]=y6(W,X);return Q}function z8(J){let Q=J.trim();if(!Q)return"";return Q}function qJ(J){if(!J||J.length===0)return[];let Q=new Set;for(let W of J){if(typeof W!=="string")throw Error("Invalid tools config: tool list entries must be strings.");let X=z8(W);if(!X)continue;Q.add(X)}return Array.from(Q)}function MH(J){if(!J)return[];return qJ(J.split(",").map((Q)=>Q.trim()).filter(Boolean))}function g6(J,Q){if(J==null)return;if(J==="on"||J==="off")return J;throw Error(`Invalid tools config at "${Q}": expected "on" or "off", got ${JSON.stringify(J)}.`)}function VH(J){if(J!=null&&!vJ(J))throw Error('Invalid tools config: expected an object with "policy", "placement", and "providers".');let Q=b6(J?.policy),W=E6(J?.placement),X=h6(J?.providers),z=g6(J?.pnpEnforcement,"pnpEnforcement"),K={policy:{allowed:qJ(CJ(Q?.allowed,"policy.allowed")),blocked:qJ(CJ(Q?.blocked,"policy.blocked"))},placement:{section:qJ(CJ(W?.section,"placement.section")).length?qJ(CJ(W?.section,"placement.section")):[...X8.section],item:qJ(CJ(W?.item,"placement.item")).length?qJ(CJ(W?.item,"placement.item")):[...X8.item],passage:qJ(CJ(W?.passage,"placement.passage")).length?qJ(CJ(W?.passage,"placement.passage")):[...X8.passage]},providers:X};if(z)K.pnpEnforcement=z;return K}var v6=["assessment","section","item","passage","rubric","element"];function Q7(J,Q){if(typeof J!=="string"||J.trim().length===0)throw Error(`Invalid tool registration: "${Q}" must be a non-empty string.`)}var m6=[{pattern:/<script\b/i,reason:"contains a <script> tag"},{pattern:/\son[a-z]+\s*=/i,reason:"contains an inline event handler (on*=) attribute"},{pattern:/javascript:/i,reason:"contains a javascript: URL"},{pattern:/<foreignObject\b/i,reason:"contains a <foreignObject> element"}];function u6(J,Q,W){let X=Q.trimStart(),z=X.toLowerCase().startsWith("<svg"),K=/^https?:/i.test(X);if(/^data:/i.test(X))throw Error(`Invalid tool registration "${J}": "${W}" may not be a data: URL.`);if(!z&&!K)return;for(let{pattern:G,reason:$}of m6)if(G.test(Q))throw Error(`Invalid tool registration "${J}": "${W}" ${$}. Inline SVG icons must not include scriptable content.`)}function z4(J){Q7(J.toolId,"toolId"),Q7(J.name,"name"),Q7(J.description,"description");let Q=J.activation==="region";if(!Q||J.icon!==void 0){if(typeof J.icon!=="string"&&typeof J.icon!=="function")throw Error(`Invalid tool registration "${J.toolId}": "icon" must be a string or function.`)}if(typeof J.icon==="string")u6(J.toolId,J.icon,"icon");if(!Array.isArray(J.supportedLevels)||J.supportedLevels.length===0)throw Error(`Invalid tool registration "${J.toolId}": "supportedLevels" must be a non-empty array.`);let W=J.supportedLevels.find((X)=>!v6.includes(X));if(W)throw Error(`Invalid tool registration "${J.toolId}": unsupported level "${W}".`);if(J.activation!==void 0&&J.activation!=="toolbar-toggle"&&J.activation!=="selection-gateway"&&J.activation!=="region")throw Error(`Invalid tool registration "${J.toolId}": unsupported activation "${String(J.activation)}".`);if(J.surfaces!==void 0&&(!Array.isArray(J.surfaces)||J.surfaces.some((X)=>typeof X!=="string"||X.trim().length===0)))throw Error(`Invalid tool registration "${J.toolId}": "surfaces" must be an array of non-empty strings.`);if(Q&&!J.surfaces?.length)throw Error(`Invalid tool registration "${J.toolId}": region tools must declare at least one host surface in "surfaces".`);if(Q&&typeof J.renderSurface!=="function")throw Error(`Invalid tool registration "${J.toolId}": region tools must implement "renderSurface".`);if(J.renderSurface!==void 0&&typeof J.renderSurface!=="function")throw Error(`Invalid tool registration "${J.toolId}": "renderSurface" must be a function.`);if(J.renderSurface&&!J.surfaces?.length)throw Error(`Invalid tool registration "${J.toolId}": "renderSurface" requires at least one entry in "surfaces".`);if(J.singletonScope!==void 0&&J.singletonScope!=="section")throw Error(`Invalid tool registration "${J.toolId}": unsupported singletonScope "${String(J.singletonScope)}".`);if(J.activation==="selection-gateway"&&J.singletonScope!=="section")throw Error(`Invalid tool registration "${J.toolId}": selection-gateway tools must declare singletonScope "section".`);if(J.pnpSupportIds!==void 0&&(!Array.isArray(J.pnpSupportIds)||J.pnpSupportIds.some((X)=>typeof X!=="string"||X.trim().length===0)))throw Error(`Invalid tool registration "${J.toolId}": "pnpSupportIds" must be an array of non-empty strings.`);if(J.activation!=="region"&&typeof J.isVisibleInContext!=="function")throw Error(`Invalid tool registration "${J.toolId}": "isVisibleInContext" must be a function.`);if(J.isVisibleInContext!==void 0&&typeof J.isVisibleInContext!=="function")throw Error(`Invalid tool registration "${J.toolId}": "isVisibleInContext" must be a function when present.`);if(J.requiresAuthoredContent!==void 0){if(typeof J.requiresAuthoredContent!=="object"||J.requiresAuthoredContent===null||typeof J.requiresAuthoredContent.resolve!=="function")throw Error(`Invalid tool registration "${J.toolId}": "requiresAuthoredContent" must be an object with a "resolve" function.`);if(!J.pnpSupportIds?.length)throw Error(`Invalid tool registration "${J.toolId}": "requiresAuthoredContent" requires at least one entry in "pnpSupportIds", which is what a host filters a default grant list on.`)}if(J.renderToolbar!==void 0){if(typeof J.renderToolbar!=="function")throw Error(`Invalid tool registration "${J.toolId}": "renderToolbar" must be a function.`)}else if(!Q)throw Error(`Invalid tool registration "${J.toolId}": "renderToolbar" must be a function.`)}class f6{tools=new Map;pnpIndex=new Map;componentOverrides={};moduleLoaders=new Map;loadedToolModules=new Set;moduleLoadPromises=new Map;normalizeToolId(J){return z8(J)}normalizeToolIds(J){return J.map((Q)=>this.normalizeToolId(Q))}register(J){if(z4(J),this.tools.has(J.toolId))throw Error(`Tool '${J.toolId}' is already registered`);if(this.tools.set(J.toolId,J),J.pnpSupportIds)for(let Q of J.pnpSupportIds){if(!this.pnpIndex.has(Q))this.pnpIndex.set(Q,new Set);this.pnpIndex.get(Q).add(J.toolId)}}override(J){if(z4(J),!this.tools.has(J.toolId))throw Error(`Cannot override non-existent tool '${J.toolId}'`);let Q=this.tools.get(J.toolId);if(Q.pnpSupportIds)for(let W of Q.pnpSupportIds)this.pnpIndex.get(W)?.delete(J.toolId);if(this.tools.set(J.toolId,J),J.pnpSupportIds)for(let W of J.pnpSupportIds){if(!this.pnpIndex.has(W))this.pnpIndex.set(W,new Set);this.pnpIndex.get(W).add(J.toolId)}}unregister(J){let Q=this.tools.get(J);if(!Q)return;if(Q.pnpSupportIds)for(let W of Q.pnpSupportIds)this.pnpIndex.get(W)?.delete(J);this.tools.delete(J)}get(J){return this.tools.get(J)}has(J){return this.tools.has(J)}getAllToolIds(){return Array.from(this.tools.keys())}getAllTools(){return Array.from(this.tools.values())}getToolsByPNPSupport(J){return this.pnpIndex.get(J)||new Set}getToolsByLevel(J){return this.getAllTools().filter((Q)=>Q.supportedLevels.includes(J))}getToolActivation(J){return this.get(J)?.activation||"toolbar-toggle"}getToolSingletonScope(J){return this.get(J)?.singletonScope||null}getToolsBySurface(J){if(!J)return[];return this.getAllTools().filter((Q)=>typeof Q.renderSurface==="function"&&Q.surfaces?.includes(J))}getContentDependentSupportIds(){let J=new Set;for(let Q of this.getAllTools()){if(!Q.requiresAuthoredContent)continue;for(let W of Q.pnpSupportIds||[])J.add(W)}return[...J].sort()}filterToolIdsByActivation(J,Q){return J.filter((W)=>this.getToolActivation(W)===Q)}filterVisibleInContext(J,Q){let W=[];for(let X of J){let z=this.get(X);if(!z){console.warn(`Tool '${X}' is allowed but not registered`);continue}if(!z.supportedLevels.includes(Q.level))continue;try{if(z.isVisibleInContext?.(Q))W.push(z)}catch(K){console.error(`Error evaluating visibility for tool '${X}':`,K)}}return W}getToolMetadata(){return this.getAllTools().map((J)=>({toolId:J.toolId,name:J.name,description:J.description,pnpSupportIds:J.pnpSupportIds||[],supportedLevels:J.supportedLevels,activation:J.activation||"toolbar-toggle",singletonScope:J.singletonScope||null,surfaces:J.surfaces||[],requiresAuthoredContent:Boolean(J.requiresAuthoredContent),contentDependencyDescription:J.requiresAuthoredContent?.description??null}))}generatePNPSupportsFromTools(J){let Q=new Set;for(let W of J){let X=this.get(W);if(X?.pnpSupportIds)for(let z of X.pnpSupportIds)Q.add(z)}return Array.from(Q)}clear(){this.tools.clear(),this.pnpIndex.clear()}setComponentOverrides(J){this.componentOverrides=J}setToolModuleLoaders(J){for(let[Q,W]of Object.entries(J)){if(!W)continue;if(Q7(Q,"tool module loader id"),typeof W!=="function")throw Error(`Invalid tool module loader for "${Q}": expected a function.`);this.moduleLoaders.set(Q,W)}}async ensureToolModuleLoaded(J){if(this.loadedToolModules.has(J))return;let Q=this.moduleLoadPromises.get(J);if(Q){await Q;return}let W=this.moduleLoaders.get(J);if(!W)return;let X=(async()=>{await W(),this.loadedToolModules.add(J)})();this.moduleLoadPromises.set(J,X);try{await X}finally{this.moduleLoadPromises.delete(J)}}async ensureToolModulesLoaded(J){await Promise.all(J.map((Q)=>this.ensureToolModuleLoaded(Q)))}isToolModuleLoaded(J){return this.loadedToolModules.has(J)}renderForToolbar(J,Q,W){let X=this.get(J);if(!X)throw Error(`Tool '${J}' is not registered`);if(typeof X.renderToolbar!=="function")throw Error(`Tool '${J}' has activation "${X.activation||"toolbar-toggle"}" and renders into a host surface, not a toolbar. Remove it from toolbar placement.`);let z={...W,componentOverrides:{...this.componentOverrides||{},...W.componentOverrides||{}}};return X.renderToolbar(Q,z)}renderForSurface(J,Q){let W=this.get(J);if(!W)throw Error(`Tool '${J}' is not registered`);if(typeof W.renderSurface!=="function")throw Error(`Tool '${J}' does not render into a host surface. Surface capabilities declare "surfaces" and implement "renderSurface".`);return W.renderSurface({...Q,componentOverrides:{...this.componentOverrides||{},...Q.componentOverrides||{}}})}}
|
|
51
|
+
export{p6 as b,T9 as c,B7 as d,H7 as e,H4 as f,tJ as g,JJ as h,P0 as i,GJ as j,A4 as k,I4 as l,D4 as m,y7 as n,g7 as o,R as p,h as q,k9 as r,E9 as s,x4 as t,k4 as u,l7 as v,g4 as w,u4 as x,p4 as y,_4 as z,s4 as A,a4 as B,J6 as C,Q6 as D,c9 as E,i9 as F,a9 as G,M6 as H,F6 as I,w6 as J,T6 as K,Q4 as L,W4 as M,qH as N,PH as O,UH as P,qJ as Q,MH as R,VH as S,f6 as T};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import{A as j0,C as bj,D as fL,E as CL,F as _j,G as ZL,H as yL,I as Ej,J as d,K as vj,N as gj,P as $j,R as mj,T as hj,c as PL,d as Ij,e as Cj,f as N,g as a,h as HL,i as RL,j as yj,k as hL,l as KL,m as P0,n as VL,o as UL,p as L,r as R0,s as pj,t as ML,u as QL,v as F,x as DL,y as M0,z as L0}from"./ItemToolBar-cckwpz6c.js";function g0(z){return typeof z.href==="string"}function zj(z){if(!z||typeof z!=="object"||Array.isArray(z))return!1;let P=z;if(typeof P.id!=="string"||P.id.trim().length===0)return!1;if(typeof P.label!=="string"||P.label.trim().length===0)return!1;if(P.ariaLabel!==void 0&&typeof P.ariaLabel!=="string")return!1;if(P.icon!==void 0&&typeof P.icon!=="string")return!1;if(P.tooltip!==void 0&&typeof P.tooltip!=="string")return!1;if(P.active!==void 0&&typeof P.active!=="boolean")return!1;if(P.disabled!==void 0&&typeof P.disabled!=="boolean")return!1;let A=typeof P.href==="string",YL=typeof P.onClick==="function";if(A===YL)return!1;if(A)return!0;return YL}function $0(z){return typeof z==="string"&&z.trimStart().startsWith("<svg")}function m0(z){return typeof z==="string"&&z.trimStart().startsWith("http")}import{sanitizeSvgIcon as Y0}from"@pie-players/pie-players-shared/security";import{approximateZoomFromWidths as WJ,computeZoomCompensation as wJ,ICON_BUTTON_ZOOM_OPTIONS as fj}from"@pie-players/pie-players-shared/ui/zoom-compensation";import{createFocusTrap as zJ,FOCUSABLE_SELECTOR as xj,isProgrammaticFocusTarget as Tj}from"@pie-players/pie-players-shared";var qJ=["assessment","section","item","passage","rubric"],FJ=new Set(qJ);function Hj(z){return FJ.has(z)}function h0(z,P,A){let YL=z.trim(),xL=A.trim();if(!YL||!xL)throw Error("Tool instance ids require non-empty tool and scope ids");if(!Hj(P))throw Error(`Unknown tool scope level '${P}'. Register custom levels with registerToolScopeLevel().`);return`${YL}:${P}:${xL}`}function u0(z){let P=z.split(":");if(P.length!==3)return null;let[A,YL,xL]=P;if(!A||!xL)return null;if(!Hj(YL))return null;return{baseToolId:A,scopeLevel:YL,scopeId:xL}}import"@pie-players/pie-players-shared/nds-icon-button";var kJ=(z,P)=>{if(customElements.get(z))return;try{customElements.define(z,P)}catch(A){if(!(A instanceof DOMException&&A.name==="NotSupportedError"||A&&typeof A==="object"&&A.name==="NotSupportedError")||!customElements.get(z))throw A}},N0=ML('<span class="item-toolbar__element-host svelte-rnx3ie"></span>'),HJ=ML('<span class="item-toolbar__nds-button-zoom svelte-rnx3ie"><nds-icon-button></nds-icon-button></span>',2),G0=ML('<span aria-hidden="true"></span>'),Bj=ML('<img class="item-toolbar__icon-image svelte-rnx3ie" alt=""/>'),Sj=ML('<i aria-hidden="true"></i>'),fJ=ML("<a><!></a>"),xJ=ML('<button type="button"><!></button>'),Aj=ML('<span class="item-toolbar__controls-host svelte-rnx3ie"></span>'),TJ=ML("<div></div>"),BJ=ML('<div><div class="item-toolbar__tools-row svelte-rnx3ie"><!> <!> <!></div> <!></div>'),SJ={hash:"svelte-rnx3ie",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;
|
|
2
|
+
/* Cap the gap between toolbar items (e.g. TTS play ↔ calculator) at its
|
|
3
|
+
200%-zoom size with the same factor the buttons use, so the spacing
|
|
4
|
+
doesn't keep growing past 200% while the buttons themselves freeze. */gap:calc(0.5rem * var(--pie-toolbar-zoom-comp, 1));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,
|
|
5
|
+
.item-toolbar--bottom.svelte-rnx3ie {align-items:flex-end;}.item-toolbar--left.svelte-rnx3ie,
|
|
6
|
+
.item-toolbar--right.svelte-rnx3ie {align-items:stretch;}.item-toolbar--left.svelte-rnx3ie .item-toolbar__tools-row:where(.svelte-rnx3ie),
|
|
7
|
+
.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),
|
|
8
|
+
.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;}
|
|
9
|
+
|
|
10
|
+
/* Drive the vendored NDS icon button's outer size via its own \`--height-32\`
|
|
11
|
+
custom property so its light-DOM inner button matches the toolbar's
|
|
12
|
+
md/sm/lg dimensions (32 / 44 / 40 px) without a layout shift. The glyph
|
|
13
|
+
keeps the NDS-native icon size (we render size="small"), so it isn't
|
|
14
|
+
oversized. */
|
|
15
|
+
/* Freeze the calculator's header open/close button at its 200%-zoom size
|
|
16
|
+
(factor is 1 at zoom <= 200%). Zoom on this wrapper, not the host. */.item-toolbar__nds-button-zoom.svelte-rnx3ie {display:inline-flex;zoom:var(--pie-toolbar-zoom-comp, 1);}.item-toolbar.svelte-rnx3ie nds-icon-button:where(.svelte-rnx3ie) {
|
|
17
|
+
/* Host-settable button size per toolbar size (drives the NDS outer button
|
|
18
|
+
via its own --height-32). */--height-32: var(--pie-calculator-button-size, 2rem);
|
|
19
|
+
/* Host-settable accent for the calculator button: the NDS tertiary glyph
|
|
20
|
+
colour derives from --color-interactive-blue, remapped here to a
|
|
21
|
+
themeable variable. */--color-interactive-blue: var(--pie-calculator-button-color, #146eb3);}.item-toolbar--sm.svelte-rnx3ie nds-icon-button:where(.svelte-rnx3ie) {--height-32: var(--pie-calculator-button-size-sm, 2.75rem);}.item-toolbar--lg.svelte-rnx3ie nds-icon-button:where(.svelte-rnx3ie) {--height-32: var(--pie-calculator-button-size-lg, 2.5rem);}.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;}`};function uj(z,P){Ij(P,!0),bj(z,SJ);let A=typeof window<"u",YL=["/_fa-pro/fontawesome.min.css","/_fa-pro/light.min.css"],xL="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.5.2/css/all.min.css",cj="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap",c0=/font.?awesome|fa-?pro/i,s0=!1,q0=()=>{if(!A||s0)return;if(s0=!0,!document.querySelector('link[href*="Roboto"]')){let K=document.createElement("link");K.rel="stylesheet",K.href=cj,document.head.appendChild(K)}if(Array.from(document.querySelectorAll('link[rel="stylesheet"][href]')).some((K)=>c0.test(K.href)))return;if(!document.querySelector(`link[href="${xL}"]`)){let K=document.createElement("link");K.rel="stylesheet",K.href=xL,document.head.appendChild(K)}for(let K of YL){if(document.querySelector(`link[href="${K}"]`))continue;let J=document.createElement("link");J.rel="stylesheet",J.href=K,document.head.appendChild(J)}},i0="__pieFaToolbarShadowInstalled",sj=(j)=>{let K=j.getRootNode();if(!(K instanceof ShadowRoot))return;let J=K;if(J[i0])return;J[i0]=!0;let U=new Set,X=(H)=>{if(!H||U.has(H))return;U.add(H);let i=document.createElement("link");i.rel="stylesheet",i.href=H,K.appendChild(i)},V=Array.from(document.querySelectorAll('link[rel="stylesheet"][href]')).filter((H)=>c0.test(H.href));for(let H of V)X(H.href)},ij=(j)=>{return q0(),sj(j),{}},aj=(j,K)=>{let J=K,U=()=>{let V=j.querySelector("button");if(V)V.setAttribute("aria-pressed",J?"true":"false")};U();let X=new MutationObserver(U);return X.observe(j,{childList:!0,subtree:!0}),{update(V){J=V,U()},destroy(){X.disconnect()}}},dj={calculator:"calculator"},rj=(j)=>dj[j.id]??null,lj=new hj,pL=HL(yj({})),EL=d(P,"level",7,"item"),J0=d(P,"scopeId",7,""),F0=d(P,"itemId",7,""),k0=d(P,"sectionId",7,""),W0=d(P,"catalogId",7,""),w0=d(P,"tools",7,"calculator,textToSpeech,answerEliminator"),z0=d(P,"contentKind",7,"assessment-item"),TL=d(P,"position",7,"bottom"),uL=d(P,"scopeElement",7,null),H0=d(P,"toolRegistry",7,null),f0=d(P,"item",7,null),Z0=d(P,"hostButtons",23,()=>[]),x0=d(P,"class",7,""),cL=d(P,"size",7,"md"),K0=d(P,"language",7,"en-US"),qL=HL(null);function a0(){if(typeof window>"u")return 1;return wJ(WJ(window.outerWidth,window.innerWidth),fj.maxZoom,fj.minCompensation)}let d0=HL(1);VL(()=>{if(typeof window>"u")return;let j=()=>{RL(d0,a0(),!0)};return j(),window.addEventListener("resize",j),()=>window.removeEventListener("resize",j)});let $=HL(null),sL=N(()=>L($)?.ndsIcons===!0),bL=HL(null),iL=HL(0),U0=HL(0),T0=HL(0);VL(()=>{if(!L(qL))return;return gj(L(qL),(j)=>{RL($,j,!0)})}),VL(()=>{if(!L(qL))return;return $j(L(qL),(j)=>{RL(bL,j,!0)})}),VL(()=>{let j=L($)?.toolkitCoordinator;if(!j||typeof j.onPolicyChange!=="function")return;let K=j.onPolicyChange(()=>{RL(U0,L(U0)+1)});return()=>{try{K?.()}catch{}}}),VL(()=>{let j=L($)?.toolkitCoordinator;if(!j||typeof j.onToolContextResolverChange!=="function")return;let K=j.onToolContextResolverChange(()=>{RL(T0,L(T0)+1)});return()=>{try{K?.()}catch{}}});let y=N(()=>L($)?.toolCoordinator),r0=N(()=>L($)?.ttsService),vL=N(()=>L($)?.elementToolStateStore),Q0=N(()=>L($)?.assessmentId??""),aL=N(()=>F0()||L(bL)?.itemId||""),r=N(()=>L(bL)?.canonicalItemId||L(aL)),BL=N(()=>k0()||L($)?.sectionId||""),gL=N(()=>z0()||L(bL)?.contentKind||(EL()==="section"?"section":"assessment-item")),p=N(()=>{if(EL()&&EL()!=="item")return EL();if(L(gL)==="rubric-block-stimulus")return"passage";return"item"}),SL=N(()=>{if(J0())return J0();if(L(p)==="section")return L(BL)||L($)?.sectionId||"default-section";if(L(p)==="assessment")return L($)?.assessmentId||"default-assessment";return L(r)||L(aL)||"default-item"}),l0=N(()=>W0()||L(SL)),WL=N(()=>f0()||L(bL)?.item||null),XL=N(()=>H0()||lj),oj=N(()=>mj(w0())),nj=N(()=>L(XL).normalizeToolIds(L(oj)).filter(Boolean)),tj=N(()=>{if(L(p)==="section")return"section";if(L(p)==="passage"||L(gL)==="rubric-block-stimulus")return"passage";return"item"}),o0=N(()=>{L(U0);let j=L($)?.toolkitCoordinator;if(!j||typeof j.decideToolPolicy!=="function")return null;return j.decideToolPolicy({level:L(tj),scope:{level:L(p),scopeId:L(SL),assessmentId:L($)?.assessmentId,sectionId:L(BL)||void 0,itemId:L(aL)||void 0,canonicalItemId:L(r)||void 0,contentKind:L(gL)}})}),n0=N(()=>{let j=(K)=>Array.from(new Set(K));if(L(o0))return j(L(XL).normalizeToolIds(L(o0).visibleTools.map((K)=>K.toolId)).filter(Boolean));return j(L(nj))}),B0=N(()=>{if(L(p)==="section"||L(p)==="assessment")return!0;let j=L(WL)?.config;return!!(L(WL)&&j&&typeof j==="object")}),t0=N(()=>{L(U0);let j=L($)?.toolkitCoordinator;if(!j||typeof j.getPolicyInputs!=="function")return null;return j.getPolicyInputs()}),$L=N(()=>L(t0)?.assessment??null),D0=N(()=>L(t0)?.currentItemRef??null),dL=N(()=>{if(L(p)==="section")return{level:"section",assessment:L($L)||{},section:{}};if(L(p)==="assessment")return{level:"assessment",assessment:L($L)||{}};if(!L(B0)||!L(WL))return null;if(L(p)==="passage")return{level:"passage",assessment:L($L)||{},itemRef:L(D0)||{id:L(r)},passage:L(WL)};return{level:"item",assessment:L($L)||{},itemRef:L(D0)||{id:L(r)},item:L(WL)}}),e0=N(()=>{if(L(dL))return L(dL);return{level:"item",assessment:L($L)||{},itemRef:L(D0)||{id:L(r)},item:L(WL)||{id:L(r),config:{}}}}),Lj=N(()=>{if(L(p)!=="item"&&L(p)!=="passage")return[];if(!L(B0)||!L(WL))return[];let j=L(WL)?.config?.models;return(Array.isArray(j)?j:j&&typeof j==="object"?Object.values(j):[]).filter((J)=>J&&typeof J==="object"&&typeof J.id==="string").map((J)=>({level:"element",assessment:L($L)||{},itemRef:L(D0)||{id:L(r)},item:L(WL),elementId:J.id}))}),ej=N(()=>{let j=L($)?.toolkitCoordinator||null,K=(J)=>u0(J)?J:h0(J,L(p),L(SL));return{scope:{level:L(p),scopeId:L(SL),assessmentId:L($)?.assessmentId,sectionId:L(BL),itemId:L(aL),canonicalItemId:L(r),contentKind:L(gL)},itemId:L(SL),catalogId:L(l0),language:K0(),ui:{size:cL()},getScopeElement:()=>uL()||L(bL)?.scopeElement||null,getGlobalElementId:()=>{if(!L(vL)||!L(Q0)||!L(BL)||!L(r))return null;return L(vL).getGlobalElementId(L(Q0),L(BL),L(r),L(r))},toolCoordinator:L(y)||null,toolkitCoordinator:j,ttsService:L(r0)||null,elementToolStateStore:L(vL)||null,toggleTool:(J)=>{if(!L(y))return;let U=K(J);if(!L(y).getToolState(U))L(y).registerTool(U,J);L(y).toggleTool(U)},isToolVisible:(J)=>{if(!L(y))return!1;return L(y).isToolVisible(K(J))},subscribeVisibility:L(y)?(J)=>L(y).subscribe(J):null}}),S0=N(()=>{L(T0);let j=L($)?.toolkitCoordinator;if(!j||typeof j.hasToolContextResolver!=="function"||typeof j.resolveToolContext!=="function")return{};let K={};for(let J of L(n0)){if(!L(XL).get(J)?.supportedLevels.includes(L(p)))continue;if(!j.hasToolContextResolver(J))continue;let X=j.resolveToolContext({toolId:J,context:L(e0),toolbarContext:L(ej)});if(X)K[J]=X}return K}),LJ=N(()=>{let j=L(n0).filter((V)=>{let H=L(XL).get(V);return H?H.supportedLevels.includes(L(p)):!1}),K=Object.values(L(S0)),J=new Set(K.map((V)=>V.toolId)),U=new Set(K.filter((V)=>V.visible).map((V)=>V.toolId)),X=j.filter((V)=>!J.has(V));if(L(p)==="section")return X.forEach((V)=>U.add(V)),Array.from(U);if(!L(B0))return X.forEach((V)=>U.add(V)),Array.from(U);if(!L(dL)&&L(Lj).length===0)return X.forEach((V)=>U.add(V)),Array.from(U);if(L(dL))L(XL).filterVisibleInContext(X,L(dL)).forEach((V)=>U.add(V.toolId));for(let V of L(Lj))L(XL).filterVisibleInContext(X,V).forEach((H)=>U.add(H.toolId));return Array.from(U)}),A0=N(()=>L(XL).filterToolIdsByActivation(L(LJ),"toolbar-toggle"));VL(()=>{if(!A)return;let j=!1;return L(XL).ensureToolModulesLoaded(L(A0)).then(()=>{if(!j)RL(iL,L(iL)+1)}).catch((K)=>{console.error("[ItemToolBar] Failed to load one or more tool modules:",K)}),()=>{j=!0}});function jJ(){if(uL())return uL();return L(bL)?.scopeElement||null}function JJ(){if(!L(vL)||!L(Q0)||!L(BL)||!L(r))return null;return L(vL).getGlobalElementId(L(Q0),L(BL),L(r),L(r))}let _L=N(()=>{let j=L($)?.toolkitCoordinator||null,K=(J)=>{return u0(J)?J:h0(J,L(p),L(SL))};return{scope:{level:L(p),scopeId:L(SL),assessmentId:L($)?.assessmentId,sectionId:L(BL),itemId:L(aL),canonicalItemId:L(r),contentKind:L(gL)},itemId:L(SL),catalogId:L(l0),language:K0(),ui:{size:cL()},getScopeElement:jJ,getGlobalElementId:JJ,toolCoordinator:L(y)||null,toolkitCoordinator:j,ttsService:L(r0)||null,elementToolStateStore:L(vL)||null,toggleTool:(J)=>{if(!L(y))return;let U=K(J);if(!L(y).getToolState(U))L(y).registerTool(U,J);L(y).toggleTool(U)},isToolVisible:(J)=>{if(!L(y))return!1;return L(y).isToolVisible(K(J))},subscribeVisibility:L(y)?(J)=>L(y).subscribe(J):null,getResolvedToolContext:(J)=>L(S0)[J]??null,getToolRenderParams:(J)=>L(S0)[J]?.params??null}}),wL=N(()=>{if(!A)return[];L(iL);let j=[];for(let K of L(A0)){let J=L(XL).renderForToolbar(K,L(e0),L(_L));if(J)j.push(J)}return j}),ZJ=N(()=>{if(!Array.isArray(Z0()))return[];let j=[];return Z0().forEach((K,J)=>{if(zj(K)){j.push(K);return}console.warn(`[ItemToolBar] Ignoring invalid host button at index ${J}. Expected { id, label, href | onClick } with valid types.`)}),j}),KJ=N(()=>L(wL).filter((j)=>!!j.button).map((j)=>{let K=j.button;return{id:j.toolId,label:K.label,ariaLabel:K.ariaLabel||K.label,icon:K.icon,tooltip:K.tooltip||K.label,disabled:K.disabled,active:L(pL)[j.toolId]??K.active??!1,onClick:()=>{K.onClick(),lL()}}})),jj=N(()=>[...L(KJ),...L(ZJ)]),rL=N(()=>{let j={};for(let K of L(wL))j[K.toolId]=L(pL)[K.toolId]??K.button?.active??!1;return j}),UJ=N(()=>L(wL).flatMap((j)=>(j.elements||[]).filter((K)=>K.mount==="before-buttons").filter((K)=>Boolean(K.element)).map((K,J)=>({key:`before-${j.toolId}-${J}`,toolId:j.toolId,entry:K})))),QJ=N(()=>L(wL).flatMap((j)=>(j.elements||[]).filter((K)=>K.mount==="after-buttons").filter((K)=>Boolean(K.element)).map((K,J)=>({key:`after-${j.toolId}-${J}`,toolId:j.toolId,entry:K})))),Jj=N(()=>L(wL).flatMap((j)=>(j.elements||[]).filter((K)=>K.mount==="controls-row").filter((K)=>Boolean(K.element)).map((K,J)=>({key:`controls-row-${j.toolId}-${J}`,toolId:j.toolId,entry:K})))),Zj=N(()=>L(wL).flatMap((j)=>(j.elements||[]).map((K)=>({toolId:j.toolId,hint:K.layoutHints?.controlsRow})).filter((K)=>Boolean(K.hint)))),Kj=N(()=>L(wL).flatMap((j)=>(j.elements||[]).map((K)=>({toolId:j.toolId,hint:K.layoutHints?.headerOverlay})).filter((K)=>Boolean(K.hint)))),Uj=N(()=>L(Zj).some((j)=>j.hint?.reserveSpace===!0)),Qj=N(()=>L(Zj).some((j)=>j.hint?.showWhenToolActive===!0&&(L(rL)[j.toolId]??!1))),DJ=N(()=>TL()==="left"||TL()==="right"),Dj=N(()=>L(Kj).some((j)=>j.hint?.showWhenToolActive===!0&&(L(rL)[j.toolId]??!1))),XJ=N(()=>L(Jj).length>0||L(Uj)||L(Qj));function OJ(){if(!L(qL))return null;let j=L(qL).getRootNode();if(j instanceof ShadowRoot)return j.host;return null}VL(()=>{let j=OJ();if(!j)return;let K=L(Kj).length>0,J=L(Dj);return j.setAttribute("data-pie-header-overlay",K?"true":"false"),j.setAttribute("data-pie-header-overlay-active",J?"true":"false"),()=>{j.removeAttribute("data-pie-header-overlay"),j.removeAttribute("data-pie-header-overlay-active")}}),VL(()=>{if(!A)return;if(L(jj).some((j)=>j.icon==="calculator"))q0()});function X0(j){if(j.id in L(pL))return L(pL)[j.id]===!0;return j.active===!0}function Xj(j){return{calculator:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7 2h10a2 2 0 0 1 2 2v16a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2Zm0 2v4h10V4H7Zm0 6v2h2v-2H7Zm4 0v2h2v-2h-2Zm4 0v2h2v-2h-2Zm-8 4v2h2v-2H7Zm4 0v2h2v-2h-2Zm4 0v2h2v-2h-2Zm-8 4v2h2v-2H7Zm4 0v2h2v-2h-2Zm4 0v2h2v-2h-2Z" fill="currentColor"/></svg>',"volume-up":'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14 3.23v2.06A7.002 7.002 0 0 1 19 12a7 7 0 0 1-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77Zm-2 17.75V3L7 8H3v8h4l5 5Zm4.5-9a4.5 4.5 0 0 0-2.5-4.03v8.05A4.5 4.5 0 0 0 16.5 12Z" fill="currentColor"/></svg>',swatch:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 3a9 9 0 1 0 9 9c0-.55-.45-1-1-1h-2.5a1.5 1.5 0 0 1 0-3H20a1 1 0 0 0 1-1 8.99 8.99 0 0 0-9-4Zm-5.5 9A1.5 1.5 0 1 1 8 13.5 1.5 1.5 0 0 1 6.5 12Zm3-4A1.5 1.5 0 1 1 11 9.5 1.5 1.5 0 0 1 9.5 8Zm5 0A1.5 1.5 0 1 1 16 9.5 1.5 1.5 0 0 1 14.5 8Z" fill="currentColor"/></svg>',"chart-bar":'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4.75 5a.76.76 0 0 1 .75.75v11c0 .438.313.75.75.75h13a.76.76 0 0 1 .696 1.039.74.74 0 0 1-.696.461h-13C5 19 4 18 4 16.75v-11A.74.74 0 0 1 4.75 5ZM8 8.25a.74.74 0 0 1 .75-.75h6.5a.76.76 0 0 1 .696 1.039.74.74 0 0 1-.696.461h-6.5A.722.722 0 0 1 8 8.25Zm.75 2.25h4.5a.76.76 0 0 1 .696 1.039.74.74 0 0 1-.696.461h-4.5a.723.723 0 0 1-.75-.75.74.74 0 0 1 .75-.75Zm0 3h8.5a.76.76 0 0 1 .696 1.039.74.74 0 0 1-.696.461h-8.5a.723.723 0 0 1-.75-.75.74.74 0 0 1 .75-.75Z" fill="currentColor"/></svg>',beaker:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M5 21c-.85 0-1.454-.38-1.813-1.137-.358-.759-.27-1.463.263-2.113L9 11V5H8a.968.968 0 0 1-.713-.287A.968.968 0 0 1 7 4c0-.283.096-.52.287-.712A.968.968 0 0 1 8 3h8c.283 0 .52.096.712.288.192.191.288.429.288.712s-.096.52-.288.713A.968.968 0 0 1 16 5h-1v6l5.55 6.75c.533.65.62 1.354.262 2.113C20.454 20.62 19.85 21 19 21H5Zm2-3h10l-3.4-4h-3.2L7 18Zm-2 1h14l-6-7.3V5h-2v6.7L5 19Z" fill="currentColor"/></svg>',protractor:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m6.75 21-.25-2.2 2.85-7.85a3.95 3.95 0 0 0 1.75.95l-2.75 7.55L6.75 21Zm10.5 0-1.6-1.55-2.75-7.55a3.948 3.948 0 0 0 1.75-.95l2.85 7.85-.25 2.2ZM12 11a2.893 2.893 0 0 1-2.125-.875A2.893 2.893 0 0 1 9 8c0-.65.188-1.23.563-1.737A2.935 2.935 0 0 1 11 5.2V3h2v2.2c.583.2 1.063.554 1.438 1.063C14.812 6.77 15 7.35 15 8c0 .833-.292 1.542-.875 2.125A2.893 2.893 0 0 1 12 11Zm0-2c.283 0 .52-.096.713-.287A.967.967 0 0 0 13 8a.967.967 0 0 0-.287-.713A.968.968 0 0 0 12 7a.968.968 0 0 0-.713.287A.967.967 0 0 0 11 8c0 .283.096.52.287.713.192.191.43.287.713.287Z" fill="currentColor"/></svg>',"bars-3":'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M6.85 15c.517 0 .98-.15 1.388-.45.408-.3.695-.692.862-1.175l.375-1.15c.267-.8.2-1.537-.2-2.213C8.875 9.337 8.3 9 7.55 9H4.025l.475 3.925c.083.583.346 1.075.787 1.475.442.4.963.6 1.563.6Zm10.3 0c.6 0 1.12-.2 1.563-.6.441-.4.704-.892.787-1.475L19.975 9h-3.5c-.75 0-1.325.342-1.725 1.025-.4.683-.467 1.425-.2 2.225l.35 1.125c.167.483.454.875.862 1.175.409.3.871.45 1.388.45Zm-10.3 2c-1.1 0-2.063-.363-2.887-1.088a4.198 4.198 0 0 1-1.438-2.737L2 9H1V7h6.55c.733 0 1.404.18 2.013.537A3.906 3.906 0 0 1 11 9h2.025c.35-.617.83-1.104 1.438-1.463A3.892 3.892 0 0 1 16.474 7H23v2h-1l-.525 4.175a4.198 4.198 0 0 1-1.438 2.737A4.238 4.238 0 0 1 17.15 17c-.95 0-1.804-.27-2.562-.813A4.234 4.234 0 0 1 13 14.026l-.375-1.125a21.35 21.35 0 0 1-.1-.363 4.926 4.926 0 0 1-.1-.537h-.85c-.033.2-.067.363-.1.488a21.35 21.35 0 0 1-.1.362L11 14a4.3 4.3 0 0 1-1.588 2.175A4.258 4.258 0 0 1 6.85 17Z" fill="currentColor"/></svg>',ruler:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m8.8 10.95 2.15-2.175-1.4-1.425-1.1 1.1-1.4-1.4 1.075-1.1L7 4.825 4.825 7 8.8 10.95Zm8.2 8.225L19.175 17l-1.125-1.125-1.1 1.075-1.4-1.4 1.075-1.1-1.425-1.4-2.15 2.15L17 19.175ZM7.25 21H3v-4.25l4.375-4.375L2 7l5-5 5.4 5.4 3.775-3.8c.2-.2.425-.35.675-.45a2.068 2.068 0 0 1 1.55 0c.25.1.475.25.675.45L20.4 4.95c.2.2.35.425.45.675.1.25.15.508.15.775a1.975 1.975 0 0 1-.6 1.425l-3.775 3.8L22 17l-5 5-5.375-5.375L7.25 21ZM5 19h1.4l9.8-9.775L14.775 7.8 5 17.6V19Z" fill="currentColor"/></svg>'}[j]||null}function lL(){let j={};for(let K of L(wL))if(K.sync?.(),K.button)j[K.toolId]=K.button.active??!1;RL(pL,j,!0)}VL(()=>{let j=[];lL();for(let K of L(wL))if(K.subscribeActive){let J=!1,U=K.subscribeActive((X)=>{queueMicrotask(()=>{if(J)return;RL(pL,{...L(pL),[K.toolId]:X},!0),K.sync?.()})});j.push(()=>{J=!0,U()})}return()=>{j.forEach((K)=>K())}}),VL(()=>{if(!L(_L).subscribeVisibility)return;let j=!1,K=L(_L).subscribeVisibility(()=>{queueMicrotask(()=>{if(j)return;lL()})});return()=>{j=!0,K?.()}}),VL(()=>{let j=L(_L).toolkitCoordinator;if(typeof j?.subscribeTelemetry!=="function")return;let K=!1,J=j.subscribeTelemetry(({eventName:U,payload:X})=>{if(U!=="pie-toolkit-tool-config-updated")return;if(X?.toolId&&!L(A0).includes(X.toolId))return;queueMicrotask(()=>{if(K)return;RL(iL,L(iL)+1),lL()})});return()=>{K=!0,J?.()}});function I0(j,K){let J=null,U=(V)=>{if(!V)return;let H=V.__pieToolElementUnmount;if(typeof H==="function")H()},X=(V)=>{if(J===V)return;if(J){if(U(J),J.parentNode===j)j.removeChild(J)}if(J=V,J){if(J.parentNode&&J.parentNode!==j)J.parentNode.removeChild(J);j.appendChild(J)}};return X(K),{update(V){X(V)},destroy(){X(null)}}}function C0(j,K){let J=K,U=null,X=null,V=null,H=null,i=null,FL=null,c=null,Y=null,l=null,o=!1,s=!1,k=null,B=null,b=null,LL=0,m=0,I=0,f=0,q=0,T=0,n=0,NL=0,C=null,GL=[],_=0,E=0,v=J.mounted.entry.shell?.initialWidth??720,g=J.mounted.entry.shell?.initialHeight??560,kL=null,jL=null,x=!1,S=(Z)=>{if(!Z)return;let D=Z.__pieToolElementUnmount;if(typeof D==="function")D()},zL=()=>{let Z=J.mounted.entry.shell;if(!Z)return null;return{toolId:J.mounted.toolId,toolbarContext:L(_L),shellConfig:Z}},oL=(Z)=>{let D=L(XL).get(J.mounted.toolId),R=zL();if(!D?.onHostedMount||!R)return;D.onHostedMount(Z,R)},AL=()=>{let Z=L(XL).get(J.mounted.toolId),D=zL();if(!Z?.onHostedResize||!D)return;Z.onHostedResize({width:v,height:g},J.mounted.entry.element,D)},nL=()=>{let Z=L(XL).get(J.mounted.toolId),D=zL();if(!Z?.onHostedUnmount||!D)return;Z.onHostedUnmount(J.mounted.entry.element,D)},w=(Z,D,R)=>Math.max(D,Math.min(Z,R)),t=()=>{let Z=J.mounted.entry.shell,D=Z?.minWidth??320,R=Z?.minHeight??240,O=Z?.maxWidth??window.innerWidth,G=Z?.maxHeight??window.innerHeight;return{minWidth:D,minHeight:R,maxWidth:O,maxHeight:G}},y0=()=>{let Z=J.mounted.entry.shell?.minWidth,D=typeof Z==="number"&&Z>0&&v<Z,R=D?`${Z}px`:"";if(k)k.style.minWidth=R;if(X)X.style.minWidth=R;if(V)V.style.minWidth=R;if(U)U.style.overflowX=D?"auto":"visible",U.style.overflowY="visible"},Vj=()=>J.mounted.entry.shell?.content?.overflowY==="auto"?"auto":"hidden",GJ=()=>{if(!X)return 0;let Z=X.getBoundingClientRect().height;if(Z>0)return Z;return X.offsetHeight||0},p0=()=>{if(!V)return;let Z=J.mounted.entry.shell;if(V.style.overflowX="hidden",V.style.overflowY=Vj(),!k)return;if(Z?.content?.preserveMinHeight===!0){let D=GJ(),R=Z.minHeight??240,O=Math.max(0,R-D),G=Math.max(0,g-D),Q=Math.max(G,O);k.style.height=`${Q}px`,k.style.minHeight="0",k.style.flex=`0 0 ${Q}px`;return}k.style.height="100%",k.style.minHeight="0",k.style.flex="1 1 auto"},O0=()=>{let{minWidth:Z,minHeight:D,maxWidth:R,maxHeight:O}=t(),G=Math.min(Z,window.innerWidth),Q=Math.min(D,window.innerHeight);v=w(v,G,Math.max(G,Math.min(R,window.innerWidth))),g=w(g,Q,Math.max(Q,Math.min(O,window.innerHeight))),_=w(_,0,Math.max(0,window.innerWidth-v)),E=w(E,0,Math.max(0,window.innerHeight-g)),tL(),y0(),p0(),AL()},IL=(Z,D)=>{_+=Z,E+=D,O0()},V0=(Z,D)=>{v+=Z,g+=D,O0()},Yj=(Z,D,R,O="fa-regular")=>{let G=document.createElement("nds-icon-button");if(G.setAttribute("variant","tertiary"),G.setAttribute("size","small"),G.setAttribute("type","circle"),G.setAttribute("icon-name",D),G.setAttribute("button-aria-label",Z),G.title=Z,G.addEventListener("click",(Q)=>{Q.stopPropagation(),R(),mL()}),O!=="fa-light"){let Q=(M)=>{M.classList.remove("fa-light"),M.classList.add(O)},W=G.querySelector("i.fa-light");if(W)Q(W);else{let M=new MutationObserver(()=>{let h=G.querySelector("i.fa-light");if(h)Q(h),M.disconnect()});M.observe(G,{childList:!0,subtree:!0})}}return G},Nj=(Z,D,R)=>{let O=document.createElement("button");return O.type="button",O.className="pie-tool-shell__control",O.setAttribute("aria-label",Z),O.title=Z,O.textContent=D,O.style.border="1px solid transparent",O.style.background="color-mix(in srgb, var(--pie-white, #fff) 10%, transparent)",O.style.color="inherit",O.style.cursor="pointer",O.style.display="inline-flex",O.style.alignItems="center",O.style.justifyContent="center",O.style.width="28px",O.style.height="28px",O.style.padding="0",O.style.fontSize="14px",O.style.fontWeight="700",O.style.borderRadius="8px",O.style.lineHeight="1",O.onclick=(G)=>{G.stopPropagation(),R(),mL()},O.onfocus=()=>{O.style.outline="2px solid var(--pie-button-focus-outline, var(--pie-primary, #4A90E2))",O.style.outlineOffset="2px"},O.onblur=()=>{O.style.outline="none",O.style.outlineOffset="0"},O},tL=()=>{if(!U)return;U.style.left=`${_}px`,U.style.top=`${E}px`,U.style.width=`${v}px`,U.style.height=`${g}px`,U.style.display=J.active?"flex":"none",U.style.setProperty("--pie-tool-shell-zoom-comp",String(a0()))},Gj=()=>{if(!V)return;let Z=J.mounted.entry.element;if(Z.style.display="block",Z.style.width="100%",Z.style.height="100%",Z.style.flex="1 1 auto",Z.style.minHeight="0",k&&k!==Z){if(k.parentNode===V)S(k),V.removeChild(k);k=null}if(Z.parentNode&&Z.parentNode!==V)Z.parentNode.removeChild(Z);if(Z.parentNode!==V)V.appendChild(Z);k=Z,y0(),p0(),oL(Z)},mL=()=>{if(L(y)&&U)L(y).bringToFront(U)},b0=()=>{let{innerWidth:Z,innerHeight:D}=window,R=J.mounted.entry.shell,O=R?.initialAlign??"center",G=R?.initialMargin??16,Q=G+60;switch(O){case"top-left":_=G,E=Q;break;case"top-right":_=Math.max(0,Z-v-G),E=Q;break;case"bottom-left":_=G,E=Math.max(0,D-g-Q);break;case"bottom-right":_=Math.max(0,Z-v-G),E=Math.max(0,D-g-Q);break;default:_=Math.max(0,Math.round((Z-v)/2)),E=Math.max(0,Math.round((D-g)/2))}O0()},PJ=()=>{let Z=jL;if(!Z)return;queueMicrotask(()=>{if(!Z.isConnected)return;try{Z.focus()}catch{}})},Pj=()=>{if(typeof document>"u")return null;let Z=document.activeElement;while(Z){let D=Z.shadowRoot;if(D&&D.activeElement&&D.activeElement!==Z)Z=D.activeElement;else break}return Z??null},Rj=()=>{if(!U||kL)return;let Z=Pj();if(!jL&&Z&&!U.contains(Z))jL=Z;let D=J.mounted.toolId==="calculator";if(D&&!s)document.addEventListener("keydown",E0,!0),s=!0;kL=zJ(U,{initialFocus:FL,onEscape:()=>{v0()},wrap:!D,onTabExit:D?(R,O)=>{if(R==="backward"){if(jL?.isConnected){O.preventDefault();try{jL.focus()}catch{}}return}let G=_0();if(G){O.preventDefault();try{G.focus()}catch{}}}:void 0})},_0=()=>{let Z=L(_L).getScopeElement?.()??null;if(!Z)return null;let D=(O)=>{if(L(qL)&&L(qL).contains(O))return!0;if(U&&U.contains(O))return!0;return!1},R=(O)=>{if(O instanceof HTMLElement){if(D(O))return null;if(O.matches?.(xj)&&Tj(O))return O}let G=O.shadowRoot;if(G)for(let Q=0;Q<G.children.length;Q++){let W=R(G.children[Q]);if(W)return W}for(let Q=0;Q<O.children.length;Q++){let W=R(O.children[Q]);if(W)return W}return null};return R(Z)},RJ=()=>{if(!U)return[];return Array.from(U.querySelectorAll(xj)).filter((Z)=>Z!==Y&&Z!==l).filter(Tj)},E0=(Z)=>{if(Z.key!=="Tab")return;if(!U||!J.active)return;let D=Pj();if(!D)return;if(U.contains(D))return;let R=RJ();if(R.length===0)return;if(Z.shiftKey){let O=_0();if(D!==O)return;Z.preventDefault();try{R[R.length-1].focus()}catch{}return}if(D!==jL)return;Z.preventDefault();try{R[0].focus()}catch{}},Mj=()=>{if(s)document.removeEventListener("keydown",E0,!0),s=!1;if(!kL)return;let Z=kL;kL=null;try{Z()}catch{}PJ()},v0=()=>{L(_L).toggleTool(J.mounted.toolId),lL()},qj=(Z)=>{if(!J.mounted.entry.shell?.draggable)return;if(Z.target.closest("button")||!U)return;Z.preventDefault(),B=Z.pointerId,LL=Z.clientX-_,m=Z.clientY-E,U.setPointerCapture(Z.pointerId),mL()},MJ=(Z)=>(D)=>{if(!U||!J.mounted.entry.shell?.resizable)return;D.preventDefault(),D.stopPropagation(),b=D.pointerId,C=Z,I=v,f=g,q=D.clientX,T=D.clientY,n=_,NL=E,U.setPointerCapture(D.pointerId),mL()},Fj=(Z)=>{if(!U)return;if(B===Z.pointerId){Z.preventDefault();let D=Math.max(0,window.innerWidth-v),R=Math.max(0,window.innerHeight-g);_=w(Z.clientX-LL,0,D),E=w(Z.clientY-m,0,R),tL();return}if(b===Z.pointerId){Z.preventDefault();let D=J.mounted.entry.shell,R=D?.minWidth??320,O=D?.minHeight??240,G=Math.min(R,window.innerWidth),Q=Math.min(O,window.innerHeight),W=D?.maxWidth??window.innerWidth,M=D?.maxHeight??window.innerHeight,h=Z.clientX-q,e=Z.clientY-T;if(C==="se")v=w(I+h,G,Math.max(G,Math.min(W,window.innerWidth-_))),g=w(f+e,Q,Math.max(Q,Math.min(M,window.innerHeight-E)));else if(C==="sw"){let JL=n+I,OL=w(I-h,G,Math.min(W,JL));_=JL-OL,v=OL,g=w(f+e,Q,Math.max(Q,Math.min(M,window.innerHeight-E)))}else if(C==="ne"){let JL=NL+f;v=w(I+h,G,Math.max(G,Math.min(W,window.innerWidth-_)));let OL=w(f-e,Q,Math.min(M,JL));E=JL-OL,g=OL}else if(C==="nw"){let JL=n+I,OL=NL+f,eL=w(I-h,G,Math.min(W,JL));_=JL-eL,v=eL;let u=w(f-e,Q,Math.min(M,OL));E=OL-u,g=u}tL(),y0(),p0(),AL()}},kj=(Z)=>{if(!U)return;if(B===Z.pointerId)B=null,U.releasePointerCapture(Z.pointerId);if(b===Z.pointerId)b=null,U.releasePointerCapture(Z.pointerId)},Wj=()=>{O0()};if(A&&J.mounted.entry.shell){let Z=J.mounted.toolId==="calculator",D=Z&&L(sL);if(D)q0();if(U=document.createElement("div"),U.className="pie-tool-shell",U.setAttribute("data-pie-tool-shell",J.mounted.toolId),U.style.position="fixed",U.style.zIndex="2000",U.style.background="var(--pie-background, #fff)",U.style.border="1px solid var(--pie-border-light, #d1d5db)",U.style.borderRadius="12px",U.style.boxShadow="0 10px 40px color-mix(in srgb, var(--pie-black, #000) 25%, transparent)",U.style.overflow="visible",U.style.display=J.active?"flex":"none",U.style.flexDirection="column",U.style.userSelect="none",U.style.webkitUserSelect="none",U.style.touchAction="none",U.setAttribute("draggable","false"),U.addEventListener("dragstart",(Q)=>Q.preventDefault()),X=document.createElement("div"),X.className="pie-tool-shell__header",X.style.display="flex",X.style.alignItems="center",X.style.justifyContent="space-between",X.style.gap="6px",X.style.padding=Z?"12px 12px 12px 28px":"10px 12px",Z)X.style.minHeight="48px";if(Z)X.style.background="var(--pie-section-player-card-header-background, #f3f4f6)",X.style.color="var(--pie-text, #111827)",X.style.borderBottom="1px solid var(--pie-border-light, #e5e7eb)";else X.style.background="var(--pie-primary-dark, #2c3e50)",X.style.color="var(--pie-white, #fff)";X.style.cursor=J.mounted.entry.shell.draggable===!1?"default":"move",X.style.flex="0 0 auto",X.style.borderRadius="12px 12px 0 0",X.style.overflow="hidden",X.style.userSelect="none",X.style.webkitUserSelect="none",X.style.touchAction="none",X.setAttribute("draggable","false"),X.addEventListener("dragstart",(Q)=>Q.preventDefault()),H=document.createElement("span"),H.className="pie-tool-shell__title",H.textContent=J.mounted.entry.shell.title||J.mounted.toolId,X.appendChild(H),i=document.createElement("div"),i.className="pie-tool-shell__controls",i.style.display="inline-flex",i.style.alignItems="center",i.style.gap=Z?"6px":"4px";let R=J.mounted.entry.shell,O=(Q,W,M,h,e="fa-regular")=>{if(!i)return;i.appendChild(D?Yj(Q,M,h,e):Nj(Q,W,h))};if(R?.draggable!==!1)O("Move tool left","←","chevron-left",()=>IL(-24,0)),O("Move tool right","→","chevron-right",()=>IL(24,0)),O("Move tool up","↑","chevron-up",()=>IL(0,-24)),O("Move tool down","↓","chevron-down",()=>IL(0,24));if(R?.resizable!==!1)O("Shrink tool window","−","magnifying-glass-minus",()=>V0(-40,-40)),O("Grow tool window","+","magnifying-glass-plus",()=>V0(40,40));if(!Z)i.appendChild(Nj("Center tool window","◎",b0));let G=null;if(Z)G=document.createElement("div"),G.className="pie-tool-shell__header-right",G.style.display="inline-flex",G.style.alignItems="center",G.style.gap="6px",G.style.setProperty("zoom","var(--pie-tool-shell-zoom-comp, 1)"),G.appendChild(i),X.appendChild(G);else X.appendChild(i);if(D)FL=Yj("Close tool","xmark",v0,"fa-regular"),FL.style.display=J.mounted.entry.shell.closeable===!1?"none":"inline-block";else{let Q=document.createElement("button");Q.type="button",Q.className="pie-tool-shell__close",Q.setAttribute("aria-label","Close tool");let W="http://www.w3.org/2000/svg",M=document.createElementNS(W,"svg");M.setAttribute("xmlns",W),M.setAttribute("viewBox","0 0 16 16"),M.setAttribute("aria-hidden","true");let h=document.createElementNS(W,"path");h.setAttribute("d","M3.5 3.5L12.5 12.5M12.5 3.5L3.5 12.5"),h.setAttribute("stroke","currentColor"),h.setAttribute("stroke-width","1.8"),h.setAttribute("stroke-linecap","round"),M.appendChild(h),Q.appendChild(M);let e=M.style;e.width="16px",e.height="16px",e.display="block",e.flexShrink="0",e.pointerEvents="none";let JL="color-mix(in srgb, var(--pie-white, #fff) 8%, transparent)",OL="color-mix(in srgb, var(--pie-white, #fff) 18%, transparent)";Q.style.border="1px solid transparent",Q.style.background=JL,Q.style.color="inherit",Q.style.cursor="pointer",Q.style.display="inline-flex",Q.style.alignItems="center",Q.style.justifyItems="center",Q.style.width="28px",Q.style.height="28px",Q.style.padding="0",Q.style.borderRadius="8px",Q.style.lineHeight="0",Q.style.transition="background-color 0.15s ease, border-color 0.15s ease",Q.style.display=J.mounted.entry.shell.closeable===!1?"none":"inline-flex",Q.onmouseenter=()=>{Q.style.background=OL},Q.onmouseleave=()=>{Q.style.background=JL},Q.onfocus=()=>{Q.style.outline="2px solid var(--pie-button-focus-outline, var(--pie-primary, #4A90E2))",Q.style.outlineOffset="2px"},Q.onblur=()=>{Q.style.outline="none",Q.style.outlineOffset="0"},Q.onclick=v0,FL=Q}if(G)G.appendChild(FL);else X.appendChild(FL);if(X.tabIndex=0,X.onkeydown=(Q)=>{if(Q.key==="Home"){Q.preventDefault(),b0();return}let W=J.mounted.entry.shell;if(Q.shiftKey&&W?.resizable!==!1){if(Q.key==="ArrowRight"||Q.key==="ArrowDown"){Q.preventDefault(),V0(40,40);return}if(Q.key==="ArrowLeft"||Q.key==="ArrowUp"){Q.preventDefault(),V0(-40,-40);return}}if(W?.draggable!==!1){if(Q.key==="ArrowLeft")Q.preventDefault(),IL(-24,0);else if(Q.key==="ArrowRight")Q.preventDefault(),IL(24,0);else if(Q.key==="ArrowUp")Q.preventDefault(),IL(0,-24);else if(Q.key==="ArrowDown")Q.preventDefault(),IL(0,24)}},V=document.createElement("div"),V.className="pie-tool-shell__content",V.style.position="relative",V.style.width="100%",V.style.flex="1 1 auto",V.style.minHeight="0",V.style.overflowX="hidden",V.style.overflowY=Vj(),V.style.borderRadius="0 0 12px 12px",Z){let Q=(W)=>{let M=document.createElement("div");return M.tabIndex=0,M.setAttribute("aria-hidden","true"),M.setAttribute("data-pie-tool-shell-focus-guard",W),M.style.position="absolute",M.style.width="1px",M.style.height="1px",M.style.padding="0",M.style.margin="-1px",M.style.overflow="hidden",M.style.clipPath="inset(50%)",M.style.whiteSpace="nowrap",M.style.border="0",M};Y=Q("start"),l=Q("end"),Y.addEventListener("focus",(W)=>{if(o)return;o=!0;try{if(W.stopPropagation(),jL?.isConnected)try{jL.focus()}catch{}}finally{queueMicrotask(()=>{o=!1})}}),l.addEventListener("focus",(W)=>{if(o)return;o=!0;try{W.stopPropagation();let M=_0();if(M)try{M.focus()}catch{}}finally{queueMicrotask(()=>{o=!1})}}),U.appendChild(Y)}if(U.appendChild(X),U.appendChild(V),Z&&l)U.appendChild(l);if(J.mounted.entry.shell.resizable!==!1){let Q=(W,M,h,e,JL,OL,eL)=>{let u=document.createElement("div");if(u.className="pie-tool-shell__resize",u.style.position="absolute",u.style.width="24px",u.style.height="24px",u.style.cursor=OL,u.style.zIndex="10",u.style.touchAction="none",u.setAttribute("draggable","false"),M!==null)u.style.top=M;if(h!==null)u.style.right=h;if(e!==null)u.style.bottom=e;if(JL!==null)u.style.left=JL;if(eL!==null)u.style.background=`linear-gradient(${eL}, transparent 0%, transparent 40%, rgba(0,0,0,0.35) 40%, rgba(0,0,0,0.35) 60%, transparent 60%, transparent 100%)`;let wj=MJ(W);u.addEventListener("pointerdown",wj),U.appendChild(u),GL.push({el:u,handler:wj})};Q("se",null,"0","0",null,"nwse-resize",null),Q("nw","0",null,null,"0","nwse-resize","135deg"),Q("ne","0","0",null,null,"nesw-resize",null),Q("sw",null,null,"0","0","nesw-resize",null)}if(X.addEventListener("pointerdown",qj),U.addEventListener("pointermove",Fj),U.addEventListener("pointerup",kj),U.addEventListener("pointerdown",mL),window.addEventListener("resize",Wj),document.body.appendChild(U),b0(),tL(),Gj(),AL(),J.active)Rj();x=J.active}return{update(Z){if(J=Z,!U||!V||!H||!FL)return;H.textContent=J.mounted.entry.shell?.title||J.mounted.toolId;let D=J.mounted.toolId==="calculator"?"inline-block":"inline-flex";if(FL.style.display=J.mounted.entry.shell?.closeable===!1?"none":D,tL(),Gj(),AL(),!x&&J.active)Rj();else if(x&&!J.active)Mj(),jL=null;x=J.active},destroy(){if(nL(),kL)Mj();if(s)document.removeEventListener("keydown",E0,!0),s=!1;for(let{el:Z,handler:D}of GL)Z.removeEventListener("pointerdown",D);if(jL=null,GL.length=0,X)X.removeEventListener("pointerdown",qj),X.onkeydown=null;if(U)U.removeEventListener("pointermove",Fj),U.removeEventListener("pointerup",kj),U.removeEventListener("pointerdown",mL);if(window.removeEventListener("resize",Wj),k&&V&&k.parentNode===V)S(k),V.removeChild(k);if(k=null,U&&U.parentElement)U.remove()}}}var VJ={get level(){return EL()},set level(j){EL(j),a()},get scopeId(){return J0()},set scopeId(j){J0(j),a()},get itemId(){return F0()},set itemId(j){F0(j),a()},get sectionId(){return k0()},set sectionId(j){k0(j),a()},get catalogId(){return W0()},set catalogId(j){W0(j),a()},get tools(){return w0()},set tools(j){w0(j),a()},get contentKind(){return z0()},set contentKind(j){z0(j),a()},get position(){return TL()},set position(j){TL(j),a()},get scopeElement(){return uL()},set scopeElement(j){uL(j),a()},get toolRegistry(){return H0()},set toolRegistry(j){H0(j),a()},get item(){return f0()},set item(j){f0(j),a()},get hostButtons(){return Z0()},set hostButtons(j){Z0(j),a()},get class(){return x0()},set class(j){x0(j),a()},get size(){return cL()},set size(j){cL(j),a()},get language(){return K0()},set language(j){K0(j),a()}},Oj=QL(),YJ=KL(Oj);{var NJ=(j)=>{var K=BJ();let J;var U=hL(K),X=hL(U);L0(X,17,()=>L(UJ),(c)=>c.key,(c,Y)=>{var l=QL(),o=KL(l);{var s=(B)=>{var b=QL(),LL=KL(b);M0(LL,()=>L(sL),(m)=>{var I=N0();fL(I,(f,q)=>C0?.(f,q),()=>({mounted:L(Y),active:L(rL)[L(Y).toolId]??!1})),F(m,I)}),F(B,b)},k=(B)=>{var b=N0();fL(b,(LL,m)=>I0?.(LL,m),()=>L(Y).entry.element),F(B,b)};DL(o,(B)=>{if(L(Y).entry.shell)B(s);else B(k,-1)})}F(c,l)});var V=P0(X,2);L0(V,17,()=>L(jj),(c)=>c.id,(c,Y,l,o)=>{let s=N(()=>L(sL)&&!g0(L(Y))?rj(L(Y)):null);var k=QL(),B=KL(k);{var b=(f)=>{var q=HJ(),T=hL(q);CL(T,1,"item-toolbar__nds-button svelte-rnx3ie"),yL(T,"type","circle"),yL(T,"size","small"),yL(T,"variant","tertiary"),UL(()=>yL(T,"icon-name",L(s))),UL(()=>yL(T,"button-aria-label",L(Y).ariaLabel||L(Y).label)),UL(()=>yL(T,"title",L(Y).tooltip||L(Y).label)),UL(()=>yL(T,"disabled",L(Y).disabled)),fL(T,(n)=>ij?.(n)),fL(T,(n,NL)=>aj?.(n,NL),()=>X0(L(Y))),PL(q),R0("click",T,function(...n){L(Y).onClick?.apply(this,n)}),F(f,q)},LL=(f)=>{var q=fJ();let T;var n=hL(q);{var NL=(C)=>{var GL=QL(),_=KL(GL);{var E=(x)=>{var S=G0();j0(S,()=>Y0(L(Y).icon),!0),PL(S),F(x,S)},v=N(()=>$0(L(Y).icon)),g=(x)=>{var S=Bj();UL(()=>ZL(S,"src",L(Y).icon)),F(x,S)},kL=N(()=>m0(L(Y).icon)),jL=(x)=>{let S=N(()=>Xj(L(Y).icon));var zL=QL(),oL=KL(zL);{var AL=(w)=>{var t=G0();j0(t,()=>Y0(L(S)),!0),PL(t),F(w,t)},nL=(w)=>{var t=Sj();UL(()=>CL(t,1,`icon icon-${L(Y).icon}`,"svelte-rnx3ie")),F(w,t)};DL(oL,(w)=>{if(L(S))w(AL);else w(nL,-1)})}F(x,zL)};DL(_,(x)=>{if(L(v))x(E);else if(L(kL))x(g,1);else x(jL,-1)})}F(C,GL)};DL(n,(C)=>{if(L(Y).icon)C(NL)})}PL(q),UL((C)=>{T=CL(q,1,"item-toolbar__button svelte-rnx3ie",null,T,C),ZL(q,"href",L(Y).disabled?void 0:L(Y).href),ZL(q,"target",L(Y).target),ZL(q,"rel",L(Y).rel),ZL(q,"aria-label",L(Y).ariaLabel||L(Y).label),ZL(q,"title",L(Y).tooltip||L(Y).label),ZL(q,"aria-disabled",L(Y).disabled?"true":void 0)},[()=>({"item-toolbar__button--active":X0(L(Y))})]),R0("click",q,(C)=>{if(L(Y).disabled)C.preventDefault()}),F(f,q)},m=N(()=>g0(L(Y))),I=(f)=>{var q=xJ();let T;var n=hL(q);{var NL=(C)=>{var GL=QL(),_=KL(GL);{var E=(x)=>{var S=G0();j0(S,()=>Y0(L(Y).icon),!0),PL(S),F(x,S)},v=N(()=>$0(L(Y).icon)),g=(x)=>{var S=Bj();UL(()=>ZL(S,"src",L(Y).icon)),F(x,S)},kL=N(()=>m0(L(Y).icon)),jL=(x)=>{let S=N(()=>Xj(L(Y).icon));var zL=QL(),oL=KL(zL);{var AL=(w)=>{var t=G0();j0(t,()=>Y0(L(S)),!0),PL(t),F(w,t)},nL=(w)=>{var t=Sj();UL(()=>CL(t,1,`icon icon-${L(Y).icon}`,"svelte-rnx3ie")),F(w,t)};DL(oL,(w)=>{if(L(S))w(AL);else w(nL,-1)})}F(x,zL)};DL(_,(x)=>{if(L(v))x(E);else if(L(kL))x(g,1);else x(jL,-1)})}F(C,GL)};DL(n,(C)=>{if(L(Y).icon)C(NL)})}PL(q),UL((C,GL)=>{T=CL(q,1,"item-toolbar__button svelte-rnx3ie",null,T,C),ZL(q,"aria-label",L(Y).ariaLabel||L(Y).label),ZL(q,"aria-pressed",GL),ZL(q,"title",L(Y).tooltip||L(Y).label),q.disabled=L(Y).disabled},[()=>({"item-toolbar__button--active":X0(L(Y))}),()=>X0(L(Y))]),R0("click",q,function(...C){L(Y).onClick?.apply(this,C)}),F(f,q)};DL(B,(f)=>{if(L(s))f(b);else if(L(m))f(LL,1);else f(I,-1)})}F(c,k)});var H=P0(V,2);L0(H,17,()=>L(QJ),(c)=>c.key,(c,Y)=>{var l=QL(),o=KL(l);{var s=(B)=>{var b=QL(),LL=KL(b);M0(LL,()=>L(sL),(m)=>{var I=N0();fL(I,(f,q)=>C0?.(f,q),()=>({mounted:L(Y),active:L(rL)[L(Y).toolId]??!1})),F(m,I)}),F(B,b)},k=(B)=>{var b=N0();fL(b,(LL,m)=>I0?.(LL,m),()=>L(Y).entry.element),F(B,b)};DL(o,(B)=>{if(L(Y).entry.shell)B(s);else B(k,-1)})}F(c,l)}),PL(U);var i=P0(U,2);{var FL=(c)=>{var Y=TJ();let l;L0(Y,21,()=>L(Jj),(o)=>o.key,(o,s)=>{var k=QL(),B=KL(k);{var b=(m)=>{var I=QL(),f=KL(I);M0(f,()=>L(sL),(q)=>{var T=Aj();fL(T,(n,NL)=>C0?.(n,NL),()=>({mounted:L(s),active:L(rL)[L(s).toolId]??!1})),F(q,T)}),F(m,I)},LL=(m)=>{var I=Aj();fL(I,(f,q)=>I0?.(f,q),()=>L(s).entry.element),F(m,I)};DL(B,(m)=>{if(L(s).entry.shell)m(b);else m(LL,-1)})}F(o,k)}),PL(Y),UL(()=>l=CL(Y,1,"item-toolbar__controls-row svelte-rnx3ie",null,l,{"item-toolbar__controls-row--reserve":L(Uj),"item-toolbar__controls-row--active":L(Qj),"item-toolbar__controls-row--align-start":L(DJ)})),F(c,Y)};DL(i,(c)=>{if(L(XJ))c(FL)})}PL(K),Ej(K,(c)=>RL(qL,c),()=>L(qL)),UL(()=>{J=CL(K,1,`item-toolbar ${x0()??""} item-toolbar--${cL()??""}`,"svelte-rnx3ie",J,{"item-toolbar--top":TL()==="top","item-toolbar--right":TL()==="right","item-toolbar--bottom":TL()==="bottom","item-toolbar--left":TL()==="left","item-toolbar--header-overlay-active":L(Dj)}),ZL(K,"data-content-kind",L(gL)),ZL(K,"data-level",L(p)),_j(K,`--pie-toolbar-zoom-comp: ${L(d0)};`)}),F(j,K)};DL(YJ,(j)=>{if(A)j(NJ)})}return F(z,Oj),Cj(VJ)}pj(["click"]);kJ("pie-item-toolbar",vj(uj,{level:{attribute:"level",type:"String"},scopeId:{attribute:"scope-id",type:"String"},itemId:{attribute:"item-id",type:"String"},sectionId:{attribute:"section-id",type:"String"},catalogId:{attribute:"catalog-id",type:"String"},tools:{attribute:"tools",type:"String"},contentKind:{attribute:"content-kind",type:"String"},position:{attribute:"position",type:"String"},size:{attribute:"size",type:"String"},language:{attribute:"language",type:"String"},scopeElement:{type:"Object"},toolRegistry:{type:"Object"},item:{type:"Object"},hostButtons:{type:"Object"},class:{}},[],[],{mode:"open"}));
|
|
22
|
+
export{uj as a};
|
package/dist/index.d.ts
CHANGED
|
@@ -10,11 +10,12 @@ export type { AssessmentToolkitHostRuntimeContext, AssessmentToolkitRegionScopeC
|
|
|
10
10
|
export type { TTSHighlightContext, TTSHighlightTargetResolver, TTSHighlightTargetResolverProvider, TTSHighlightTargetResolverRuntime, } from "./services/tts/highlight-target-resolver.js";
|
|
11
11
|
export { assessmentToolkitHostRuntimeContext, assessmentToolkitRegionScopeContext, assessmentToolkitRuntimeContext, assessmentToolkitShellContext, } from "./context/assessment-toolkit-context.js";
|
|
12
12
|
export { connectAssessmentToolkitHostRuntimeContext, connectAssessmentToolkitRegionScopeContext, connectAssessmentToolkitRuntimeContext, connectAssessmentToolkitShellContext, } from "./context/runtime-context-consumer.js";
|
|
13
|
+
export { catalogOwnerContextFor, collectCatalogRegistrations, collectEntityCatalogRegistrations, type CatalogOwnerIdentity, type CatalogRegistration, type CatalogSourceEntity, } from "./runtime/catalog-registration.js";
|
|
13
14
|
export { PIE_INTERNAL_CONTENT_LOADED_EVENT, PIE_INTERNAL_ITEM_SESSION_CHANGED_EVENT, PIE_INTERNAL_ITEM_PLAYER_ERROR_EVENT, PIE_ITEM_SESSION_CHANGED_EVENT, PIE_REGISTER_EVENT, PIE_UNREGISTER_EVENT, type InternalContentLoadedDetail, type InternalItemSessionChangedDetail, type InternalItemPlayerErrorDetail, type ItemSessionChangedDetail, type RuntimeRegistrationDetail, type RuntimeRegistrationKind, } from "./runtime/registration-events.js";
|
|
14
15
|
export { connectToolRegionScopeContext, connectToolRuntimeContext, connectToolShellContext, createCrossBoundaryEvent, dispatchCrossBoundaryEvent, isContextValueDefined, } from "./runtime/tool-host-contract.js";
|
|
15
16
|
export type { AccessibilityCatalogResolverApi, ElementToolStateStoreApi, HighlightCoordinatorApi, I18nServiceApi, ThemeProviderApi, ToolCoordinatorApi, ToolkitCoordinatorApi, TtsServiceApi, ToolState, } from "./services/interfaces.js";
|
|
16
|
-
export type { CatalogLookupContext, CatalogLookupOptions, CatalogOwnerContext, CatalogOwnerKind, CatalogStatistics, CatalogType, ResolvedCatalog, } from "./services/AccessibilityCatalogResolver.js";
|
|
17
|
-
export { AccessibilityCatalogResolver } from "./services/AccessibilityCatalogResolver.js";
|
|
17
|
+
export type { CatalogCardForm, CatalogChangeEvent, CatalogChangeListener, CatalogChangeReason, CatalogLookupContext, CatalogLookupOptions, CatalogOwnerContext, CatalogOwnerKind, CatalogStatistics, CatalogType, ResolvedCatalog, } from "./services/AccessibilityCatalogResolver.js";
|
|
18
|
+
export { AccessibilityCatalogResolver, catalogCardForm, isKnownCatalogType, KNOWN_CATALOG_TYPES, } from "./services/AccessibilityCatalogResolver.js";
|
|
18
19
|
export { ContextVariableStore } from "./services/ContextVariableStore.js";
|
|
19
20
|
export { ElementToolStateStore } from "./services/ElementToolStateStore.js";
|
|
20
21
|
export type { Annotation } from "./services/HighlightCoordinator.js";
|
|
@@ -23,17 +24,20 @@ export type { SerializedRange } from "./services/RangeSerializer.js";
|
|
|
23
24
|
export { RangeSerializer } from "./services/RangeSerializer.js";
|
|
24
25
|
export type { I18nConfig, PluralTranslation, TranslationBundle, } from "./services/I18nService.js";
|
|
25
26
|
export { I18nService } from "./services/I18nService.js";
|
|
26
|
-
export type { ResolvedToolContext, ToolbarContext, ToolContextResolver, ToolContextResolverContext, ToolContextResolverMap, ToolContextResolverResult, ToolModuleLoader, ToolToolbarButtonDefinition, ToolToolbarRenderResult, ToolWindowShellAction, ToolWindowShellAlign, ToolWindowShellConfig, ToolWindowShellContentConfig, ToolRegistration, } from "./services/ToolRegistry.js";
|
|
27
|
+
export type { ResolvedToolContext, ToolbarContext, ToolContextResolver, ToolContextResolverContext, ToolContextResolverMap, ToolContextResolverResult, ToolActivation, ToolContentDependency, ToolContentDependencyContext, ToolModuleLoader, ToolSingletonScope, ToolSurfaceRenderContext, ToolSurfaceRenderResult, ToolSurfaceServices, ToolToolbarButtonDefinition, ToolToolbarRenderResult, ToolWindowShellAction, ToolWindowShellAlign, ToolWindowShellConfig, ToolWindowShellContentConfig, ToolRegistration, } from "./services/ToolRegistry.js";
|
|
27
28
|
export { ToolRegistry } from "./services/ToolRegistry.js";
|
|
28
29
|
export type { AssessmentToolContext, BaseToolContext, ElementToolContext, ItemToolContext, PassageToolContext, RubricToolContext, SectionToolContext, ToolContext, ToolLevel, } from "./services/tool-context.js";
|
|
29
30
|
export { extractTextContent, hasChoiceInteraction, hasMathContent, hasReadableText, isAssessmentContext, isElementContext, isItemContext, isPassageContext, isRubricContext, isSectionContext, } from "./services/tool-context.js";
|
|
30
|
-
export { DEFAULT_TOOL_PLACEMENT
|
|
31
|
+
export { DEFAULT_TOOL_PLACEMENT } from "./services/createDefaultToolRegistry.js";
|
|
31
32
|
export type { CreateToolsConfigArgs } from "./services/create-tools-config.js";
|
|
32
33
|
export { createToolsConfig } from "./services/create-tools-config.js";
|
|
33
|
-
export {
|
|
34
|
+
export { createEmptyPersonalNeedsProfile } from "./services/defaultPersonalNeedsProfile.js";
|
|
34
35
|
export type { ToolComponentFactory, ToolComponentFactoryMap, ToolComponentOverrides, ToolTagMap, } from "./tools/tool-tag-map.js";
|
|
35
|
-
export { createToolElement,
|
|
36
|
+
export { createToolElement, resolveToolTag, toToolIdFromTag, } from "./tools/tool-tag-map.js";
|
|
36
37
|
export { ALL_STANDARD_ACCESS_FEATURES, EXAMPLE_PNP_CONFIGURATIONS, getFeatureCategory, getFeaturesInCategory, isStandardAccessFeature, QTI_STANDARD_ACCESS_FEATURES, } from "./services/pnp-standard-features.js";
|
|
38
|
+
export { applyMediaFragment, isSafeMediaSrc, normalizeMediaFragment, normalizeMediaSources, trimmedOrUndefined, } from "./services/catalog-media.js";
|
|
39
|
+
export type { SpokenAudioMedia } from "./services/spoken-audio-cards.js";
|
|
40
|
+
export { resolveSpokenAudioMedia, SPOKEN_CATALOG_TYPE, } from "./services/spoken-audio-cards.js";
|
|
37
41
|
export type { ExtractionResult } from "./services/SSMLExtractor.js";
|
|
38
42
|
export { SSMLExtractor } from "./services/SSMLExtractor.js";
|
|
39
43
|
export type { FontSize, ThemeConfig } from "./services/ThemeProvider.js";
|
package/dist/index.js
CHANGED
|
@@ -8,9 +8,10 @@
|
|
|
8
8
|
*/
|
|
9
9
|
export { assessmentToolkitHostRuntimeContext, assessmentToolkitRegionScopeContext, assessmentToolkitRuntimeContext, assessmentToolkitShellContext, } from "./context/assessment-toolkit-context.js";
|
|
10
10
|
export { connectAssessmentToolkitHostRuntimeContext, connectAssessmentToolkitRegionScopeContext, connectAssessmentToolkitRuntimeContext, connectAssessmentToolkitShellContext, } from "./context/runtime-context-consumer.js";
|
|
11
|
+
export { catalogOwnerContextFor, collectCatalogRegistrations, collectEntityCatalogRegistrations, } from "./runtime/catalog-registration.js";
|
|
11
12
|
export { PIE_INTERNAL_CONTENT_LOADED_EVENT, PIE_INTERNAL_ITEM_SESSION_CHANGED_EVENT, PIE_INTERNAL_ITEM_PLAYER_ERROR_EVENT, PIE_ITEM_SESSION_CHANGED_EVENT, PIE_REGISTER_EVENT, PIE_UNREGISTER_EVENT, } from "./runtime/registration-events.js";
|
|
12
13
|
export { connectToolRegionScopeContext, connectToolRuntimeContext, connectToolShellContext, createCrossBoundaryEvent, dispatchCrossBoundaryEvent, isContextValueDefined, } from "./runtime/tool-host-contract.js";
|
|
13
|
-
export { AccessibilityCatalogResolver } from "./services/AccessibilityCatalogResolver.js";
|
|
14
|
+
export { AccessibilityCatalogResolver, catalogCardForm, isKnownCatalogType, KNOWN_CATALOG_TYPES, } from "./services/AccessibilityCatalogResolver.js";
|
|
14
15
|
// Context Variable Store (QTI 3.0 Context Declarations)
|
|
15
16
|
export { ContextVariableStore } from "./services/ContextVariableStore.js";
|
|
16
17
|
// Element Tool State Store (Element-level ephemeral tool state)
|
|
@@ -20,12 +21,19 @@ export { RangeSerializer } from "./services/RangeSerializer.js";
|
|
|
20
21
|
export { I18nService } from "./services/I18nService.js";
|
|
21
22
|
export { ToolRegistry } from "./services/ToolRegistry.js";
|
|
22
23
|
export { extractTextContent, hasChoiceInteraction, hasMathContent, hasReadableText, isAssessmentContext, isElementContext, isItemContext, isPassageContext, isRubricContext, isSectionContext, } from "./services/tool-context.js";
|
|
23
|
-
export { DEFAULT_TOOL_PLACEMENT
|
|
24
|
+
export { DEFAULT_TOOL_PLACEMENT } from "./services/createDefaultToolRegistry.js";
|
|
24
25
|
export { createToolsConfig } from "./services/create-tools-config.js";
|
|
25
|
-
export {
|
|
26
|
-
export { createToolElement,
|
|
26
|
+
export { createEmptyPersonalNeedsProfile } from "./services/defaultPersonalNeedsProfile.js";
|
|
27
|
+
export { createToolElement, resolveToolTag, toToolIdFromTag, } from "./tools/tool-tag-map.js";
|
|
27
28
|
// QTI 3.0 Standard Access Features
|
|
28
29
|
export { ALL_STANDARD_ACCESS_FEATURES, EXAMPLE_PNP_CONFIGURATIONS, getFeatureCategory, getFeaturesInCategory, isStandardAccessFeature, QTI_STANDARD_ACCESS_FEATURES, } from "./services/pnp-standard-features.js";
|
|
30
|
+
// Media-bearing catalog cards: the generic half, shared by every card form that
|
|
31
|
+
// references a recording rather than carrying text. `applyMediaFragment` reached
|
|
32
|
+
// the public surface through `sign-language-cards.js` until signing moved to
|
|
33
|
+
// `@pie-players/pie-tool-sign-language`; it is exported from its own module now,
|
|
34
|
+
// alongside the validators a capability package needs to read a media payload.
|
|
35
|
+
export { applyMediaFragment, isSafeMediaSrc, normalizeMediaFragment, normalizeMediaSources, trimmedOrUndefined, } from "./services/catalog-media.js";
|
|
36
|
+
export { resolveSpokenAudioMedia, SPOKEN_CATALOG_TYPE, } from "./services/spoken-audio-cards.js";
|
|
29
37
|
export { SSMLExtractor } from "./services/SSMLExtractor.js";
|
|
30
38
|
export { ThemeProvider } from "./services/ThemeProvider.js";
|
|
31
39
|
// Tool Coordinator
|
|
@@ -21,6 +21,7 @@ import type { CanonicalToolsConfig, ToolPlacementLevel } from "../../services/to
|
|
|
21
21
|
import type { ToolRegistry } from "../../services/ToolRegistry.js";
|
|
22
22
|
import type { ToolPolicyDecision, ToolPolicyDecisionRequest } from "./decision-types.js";
|
|
23
23
|
import type { PolicySource } from "./PolicySource.js";
|
|
24
|
+
import type { FeaturePolicyDecision } from "./feature-decision.js";
|
|
24
25
|
export type PnpEnforcementMode = "on" | "off";
|
|
25
26
|
export interface ToolPolicyEngineInputs {
|
|
26
27
|
tools?: CanonicalToolsConfig | null;
|
|
@@ -88,6 +89,26 @@ export declare class ToolPolicyEngine {
|
|
|
88
89
|
* cached `ToolPolicyDecision` rather than re-call `decide(...)`.
|
|
89
90
|
*/
|
|
90
91
|
decide(request: ToolPolicyDecisionRequest): ToolPolicyDecision;
|
|
92
|
+
/**
|
|
93
|
+
* Resolve eligibility for one PNP/AfA feature id through the six-level
|
|
94
|
+
* precedence, independent of toolbar placement.
|
|
95
|
+
*
|
|
96
|
+
* For capabilities that render as their own surface rather than a toolbar
|
|
97
|
+
* button — a signed alternate's region, for example — `decide(...)` cannot
|
|
98
|
+
* answer the question, because such a capability is deliberately absent from
|
|
99
|
+
* `tools.placement` and would read as "removed by policy" when nothing of
|
|
100
|
+
* the sort happened. See {@link FeaturePolicyDecision}.
|
|
101
|
+
*
|
|
102
|
+
* `pnpEnforcement` is deliberately **not** consulted here. That flag governs
|
|
103
|
+
* whether PNP/profile policy *refines* an otherwise-visible tool set; a
|
|
104
|
+
* feature with no placement has no unrefined baseline to fall back to, so
|
|
105
|
+
* skipping the PNP read would make the capability permanently unavailable
|
|
106
|
+
* rather than merely unrefined. Auto-mode already flips enforcement on
|
|
107
|
+
* whenever profile material exists, so this only diverges for a host that
|
|
108
|
+
* explicitly forces `"off"` while supplying a profile that grants the
|
|
109
|
+
* feature — and there, honouring the profile is the safer failure.
|
|
110
|
+
*/
|
|
111
|
+
decideFeature(featureId: string): FeaturePolicyDecision;
|
|
91
112
|
/**
|
|
92
113
|
* Convenience wrapper for hosts that just want the visible tool
|
|
93
114
|
* IDs. Equivalent to `decide(...).visibleTools.map(e => e.toolId)`.
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
* `ToolkitCoordinator`. PR 3 switches `<pie-item-toolbar>` over.
|
|
18
18
|
*/
|
|
19
19
|
import { normalizeToolsConfig } from "../../services/tools-config-normalizer.js";
|
|
20
|
+
import { interpretFeatureResult } from "./feature-decision.js";
|
|
20
21
|
import { composeDecision } from "./compose-decision.js";
|
|
21
22
|
import { resolveDefaultPnpEnforcement } from "./pnp-policy-inputs.js";
|
|
22
23
|
import { PnpPolicySource } from "../sources/PnpPolicySource.js";
|
|
@@ -85,6 +86,32 @@ export class ToolPolicyEngine {
|
|
|
85
86
|
contextId: requestContextId,
|
|
86
87
|
});
|
|
87
88
|
}
|
|
89
|
+
/**
|
|
90
|
+
* Resolve eligibility for one PNP/AfA feature id through the six-level
|
|
91
|
+
* precedence, independent of toolbar placement.
|
|
92
|
+
*
|
|
93
|
+
* For capabilities that render as their own surface rather than a toolbar
|
|
94
|
+
* button — a signed alternate's region, for example — `decide(...)` cannot
|
|
95
|
+
* answer the question, because such a capability is deliberately absent from
|
|
96
|
+
* `tools.placement` and would read as "removed by policy" when nothing of
|
|
97
|
+
* the sort happened. See {@link FeaturePolicyDecision}.
|
|
98
|
+
*
|
|
99
|
+
* `pnpEnforcement` is deliberately **not** consulted here. That flag governs
|
|
100
|
+
* whether PNP/profile policy *refines* an otherwise-visible tool set; a
|
|
101
|
+
* feature with no placement has no unrefined baseline to fall back to, so
|
|
102
|
+
* skipping the PNP read would make the capability permanently unavailable
|
|
103
|
+
* rather than merely unrefined. Auto-mode already flips enforcement on
|
|
104
|
+
* whenever profile material exists, so this only diverges for a host that
|
|
105
|
+
* explicitly forces `"off"` while supplying a profile that grants the
|
|
106
|
+
* feature — and there, honouring the profile is the safer failure.
|
|
107
|
+
*/
|
|
108
|
+
decideFeature(featureId) {
|
|
109
|
+
this.assertNotDisposed();
|
|
110
|
+
return interpretFeatureResult(featureId, this.pnpPolicySource.resolveFeature(featureId, {
|
|
111
|
+
assessment: this.assessment ?? undefined,
|
|
112
|
+
currentItemRef: this.currentItemRef ?? undefined,
|
|
113
|
+
}));
|
|
114
|
+
}
|
|
88
115
|
/**
|
|
89
116
|
* Convenience wrapper for hosts that just want the visible tool
|
|
90
117
|
* IDs. Equivalent to `decide(...).visibleTools.map(e => e.toolId)`.
|