diff --git a/crates/codegraph-ui/viewer/assets/archivo-latin-ext-wght-normal-C4zznr8T.woff2 b/crates/codegraph-ui/viewer/assets/archivo-latin-ext-wght-normal-C4zznr8T.woff2 deleted file mode 100644 index 2e544c2..0000000 Binary files a/crates/codegraph-ui/viewer/assets/archivo-latin-ext-wght-normal-C4zznr8T.woff2 and /dev/null differ diff --git a/crates/codegraph-ui/viewer/assets/archivo-latin-wght-normal-E0tuGl4L.woff2 b/crates/codegraph-ui/viewer/assets/archivo-latin-wght-normal-E0tuGl4L.woff2 deleted file mode 100644 index 716d4ab..0000000 Binary files a/crates/codegraph-ui/viewer/assets/archivo-latin-wght-normal-E0tuGl4L.woff2 and /dev/null differ diff --git a/crates/codegraph-ui/viewer/assets/archivo-vietnamese-wght-normal-XAtsl5Q_.woff2 b/crates/codegraph-ui/viewer/assets/archivo-vietnamese-wght-normal-XAtsl5Q_.woff2 deleted file mode 100644 index 0149781..0000000 Binary files a/crates/codegraph-ui/viewer/assets/archivo-vietnamese-wght-normal-XAtsl5Q_.woff2 and /dev/null differ diff --git a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-cyrillic-400-italic-2syK4fUT.woff b/crates/codegraph-ui/viewer/assets/ibm-plex-mono-cyrillic-400-italic-2syK4fUT.woff deleted file mode 100644 index 1389938..0000000 Binary files a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-cyrillic-400-italic-2syK4fUT.woff and /dev/null differ diff --git a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-cyrillic-400-italic-CBJ8pzag.woff2 b/crates/codegraph-ui/viewer/assets/ibm-plex-mono-cyrillic-400-italic-CBJ8pzag.woff2 deleted file mode 100644 index 2bbfd70..0000000 Binary files a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-cyrillic-400-italic-CBJ8pzag.woff2 and /dev/null differ diff --git a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-cyrillic-400-normal-BSMlKf0J.woff2 b/crates/codegraph-ui/viewer/assets/ibm-plex-mono-cyrillic-400-normal-BSMlKf0J.woff2 deleted file mode 100644 index 20e72b0..0000000 Binary files a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-cyrillic-400-normal-BSMlKf0J.woff2 and /dev/null differ diff --git a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-cyrillic-400-normal-CEL4l2ZJ.woff b/crates/codegraph-ui/viewer/assets/ibm-plex-mono-cyrillic-400-normal-CEL4l2ZJ.woff deleted file mode 100644 index 1487d93..0000000 Binary files a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-cyrillic-400-normal-CEL4l2ZJ.woff and /dev/null differ diff --git a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-cyrillic-500-normal-Ael50iVv.woff b/crates/codegraph-ui/viewer/assets/ibm-plex-mono-cyrillic-500-normal-Ael50iVv.woff deleted file mode 100644 index 7e53f59..0000000 Binary files a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-cyrillic-500-normal-Ael50iVv.woff and /dev/null differ diff --git a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-cyrillic-500-normal-Bq9vWWag.woff2 b/crates/codegraph-ui/viewer/assets/ibm-plex-mono-cyrillic-500-normal-Bq9vWWag.woff2 deleted file mode 100644 index 328efe3..0000000 Binary files a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-cyrillic-500-normal-Bq9vWWag.woff2 and /dev/null differ diff --git a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-cyrillic-600-normal-CTOM6hUh.woff2 b/crates/codegraph-ui/viewer/assets/ibm-plex-mono-cyrillic-600-normal-CTOM6hUh.woff2 deleted file mode 100644 index 56fa97f..0000000 Binary files a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-cyrillic-600-normal-CTOM6hUh.woff2 and /dev/null differ diff --git a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-cyrillic-600-normal-fLZuRloM.woff b/crates/codegraph-ui/viewer/assets/ibm-plex-mono-cyrillic-600-normal-fLZuRloM.woff deleted file mode 100644 index bc061ec..0000000 Binary files a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-cyrillic-600-normal-fLZuRloM.woff and /dev/null differ diff --git a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-cyrillic-ext-400-italic-B4oTjJdl.woff b/crates/codegraph-ui/viewer/assets/ibm-plex-mono-cyrillic-ext-400-italic-B4oTjJdl.woff deleted file mode 100644 index 44ae51e..0000000 Binary files a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-cyrillic-ext-400-italic-B4oTjJdl.woff and /dev/null differ diff --git a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-cyrillic-ext-400-italic-CBjNughH.woff2 b/crates/codegraph-ui/viewer/assets/ibm-plex-mono-cyrillic-ext-400-italic-CBjNughH.woff2 deleted file mode 100644 index d7f4391..0000000 Binary files a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-cyrillic-ext-400-italic-CBjNughH.woff2 and /dev/null differ diff --git a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-cyrillic-ext-400-normal-DMdlQ8Kv.woff b/crates/codegraph-ui/viewer/assets/ibm-plex-mono-cyrillic-ext-400-normal-DMdlQ8Kv.woff deleted file mode 100644 index eff6edd..0000000 Binary files a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-cyrillic-ext-400-normal-DMdlQ8Kv.woff and /dev/null differ diff --git a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-cyrillic-ext-400-normal-xuaO2J-f.woff2 b/crates/codegraph-ui/viewer/assets/ibm-plex-mono-cyrillic-ext-400-normal-xuaO2J-f.woff2 deleted file mode 100644 index b54e556..0000000 Binary files a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-cyrillic-ext-400-normal-xuaO2J-f.woff2 and /dev/null differ diff --git a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-cyrillic-ext-500-normal-BIfNGwUT.woff b/crates/codegraph-ui/viewer/assets/ibm-plex-mono-cyrillic-ext-500-normal-BIfNGwUT.woff deleted file mode 100644 index 626c775..0000000 Binary files a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-cyrillic-ext-500-normal-BIfNGwUT.woff and /dev/null differ diff --git a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-cyrillic-ext-500-normal-BqneJy0T.woff2 b/crates/codegraph-ui/viewer/assets/ibm-plex-mono-cyrillic-ext-500-normal-BqneJy0T.woff2 deleted file mode 100644 index 7d066e9..0000000 Binary files a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-cyrillic-ext-500-normal-BqneJy0T.woff2 and /dev/null differ diff --git a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-cyrillic-ext-600-normal-9HEixskS.woff b/crates/codegraph-ui/viewer/assets/ibm-plex-mono-cyrillic-ext-600-normal-9HEixskS.woff deleted file mode 100644 index ee42a1e..0000000 Binary files a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-cyrillic-ext-600-normal-9HEixskS.woff and /dev/null differ diff --git a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-cyrillic-ext-600-normal-V-xxqcpd.woff2 b/crates/codegraph-ui/viewer/assets/ibm-plex-mono-cyrillic-ext-600-normal-V-xxqcpd.woff2 deleted file mode 100644 index 7ebf1f2..0000000 Binary files a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-cyrillic-ext-600-normal-V-xxqcpd.woff2 and /dev/null differ diff --git a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-latin-400-italic-66oory27.woff b/crates/codegraph-ui/viewer/assets/ibm-plex-mono-latin-400-italic-66oory27.woff deleted file mode 100644 index 9ba3964..0000000 Binary files a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-latin-400-italic-66oory27.woff and /dev/null differ diff --git a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-latin-400-italic-BqAiT5Ww.woff2 b/crates/codegraph-ui/viewer/assets/ibm-plex-mono-latin-400-italic-BqAiT5Ww.woff2 deleted file mode 100644 index 855c41c..0000000 Binary files a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-latin-400-italic-BqAiT5Ww.woff2 and /dev/null differ diff --git a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-latin-400-normal-CvHOgSBP.woff b/crates/codegraph-ui/viewer/assets/ibm-plex-mono-latin-400-normal-CvHOgSBP.woff deleted file mode 100644 index 8c83fdc..0000000 Binary files a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-latin-400-normal-CvHOgSBP.woff and /dev/null differ diff --git a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-latin-400-normal-DMJ8VG8y.woff2 b/crates/codegraph-ui/viewer/assets/ibm-plex-mono-latin-400-normal-DMJ8VG8y.woff2 deleted file mode 100644 index 0804aaf..0000000 Binary files a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-latin-400-normal-DMJ8VG8y.woff2 and /dev/null differ diff --git a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-latin-500-normal-CB9ihrfo.woff b/crates/codegraph-ui/viewer/assets/ibm-plex-mono-latin-500-normal-CB9ihrfo.woff deleted file mode 100644 index 780de71..0000000 Binary files a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-latin-500-normal-CB9ihrfo.woff and /dev/null differ diff --git a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-latin-500-normal-DSY6xOcd.woff2 b/crates/codegraph-ui/viewer/assets/ibm-plex-mono-latin-500-normal-DSY6xOcd.woff2 deleted file mode 100644 index 090f82f..0000000 Binary files a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-latin-500-normal-DSY6xOcd.woff2 and /dev/null differ diff --git a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-latin-600-normal-BgSNZQsw.woff2 b/crates/codegraph-ui/viewer/assets/ibm-plex-mono-latin-600-normal-BgSNZQsw.woff2 deleted file mode 100644 index 67aeeb0..0000000 Binary files a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-latin-600-normal-BgSNZQsw.woff2 and /dev/null differ diff --git a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-latin-600-normal-DWFSQ4vo.woff b/crates/codegraph-ui/viewer/assets/ibm-plex-mono-latin-600-normal-DWFSQ4vo.woff deleted file mode 100644 index c812d78..0000000 Binary files a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-latin-600-normal-DWFSQ4vo.woff and /dev/null differ diff --git a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-latin-ext-400-italic-B7_fu1kp.woff2 b/crates/codegraph-ui/viewer/assets/ibm-plex-mono-latin-ext-400-italic-B7_fu1kp.woff2 deleted file mode 100644 index 7d4e8fd..0000000 Binary files a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-latin-ext-400-italic-B7_fu1kp.woff2 and /dev/null differ diff --git a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-latin-ext-400-italic-Bg0ZHwF4.woff b/crates/codegraph-ui/viewer/assets/ibm-plex-mono-latin-ext-400-italic-Bg0ZHwF4.woff deleted file mode 100644 index abacaa7..0000000 Binary files a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-latin-ext-400-italic-Bg0ZHwF4.woff and /dev/null differ diff --git a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-latin-ext-400-normal-BmRBH3aV.woff2 b/crates/codegraph-ui/viewer/assets/ibm-plex-mono-latin-ext-400-normal-BmRBH3aV.woff2 deleted file mode 100644 index 732c64d..0000000 Binary files a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-latin-ext-400-normal-BmRBH3aV.woff2 and /dev/null differ diff --git a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-latin-ext-400-normal-D3D2R8hC.woff b/crates/codegraph-ui/viewer/assets/ibm-plex-mono-latin-ext-400-normal-D3D2R8hC.woff deleted file mode 100644 index 338fc76..0000000 Binary files a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-latin-ext-400-normal-D3D2R8hC.woff and /dev/null differ diff --git a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-latin-ext-500-normal-CAhNIIs5.woff2 b/crates/codegraph-ui/viewer/assets/ibm-plex-mono-latin-ext-500-normal-CAhNIIs5.woff2 deleted file mode 100644 index 6f33f8c..0000000 Binary files a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-latin-ext-500-normal-CAhNIIs5.woff2 and /dev/null differ diff --git a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-latin-ext-500-normal-CZ70TYgx.woff b/crates/codegraph-ui/viewer/assets/ibm-plex-mono-latin-ext-500-normal-CZ70TYgx.woff deleted file mode 100644 index 370da9c..0000000 Binary files a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-latin-ext-500-normal-CZ70TYgx.woff and /dev/null differ diff --git a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-latin-ext-600-normal-D38SheWl.woff2 b/crates/codegraph-ui/viewer/assets/ibm-plex-mono-latin-ext-600-normal-D38SheWl.woff2 deleted file mode 100644 index c0b57de..0000000 Binary files a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-latin-ext-600-normal-D38SheWl.woff2 and /dev/null differ diff --git a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-latin-ext-600-normal-DmB0ttJJ.woff b/crates/codegraph-ui/viewer/assets/ibm-plex-mono-latin-ext-600-normal-DmB0ttJJ.woff deleted file mode 100644 index 45e343b..0000000 Binary files a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-latin-ext-600-normal-DmB0ttJJ.woff and /dev/null differ diff --git a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-vietnamese-400-italic-D6eaYXMU.woff b/crates/codegraph-ui/viewer/assets/ibm-plex-mono-vietnamese-400-italic-D6eaYXMU.woff deleted file mode 100644 index 54aff22..0000000 Binary files a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-vietnamese-400-italic-D6eaYXMU.woff and /dev/null differ diff --git a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-vietnamese-400-italic-DRuN92E5.woff2 b/crates/codegraph-ui/viewer/assets/ibm-plex-mono-vietnamese-400-italic-DRuN92E5.woff2 deleted file mode 100644 index bafe6fa..0000000 Binary files a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-vietnamese-400-italic-DRuN92E5.woff2 and /dev/null differ diff --git a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-vietnamese-400-normal-BulugwFq.woff2 b/crates/codegraph-ui/viewer/assets/ibm-plex-mono-vietnamese-400-normal-BulugwFq.woff2 deleted file mode 100644 index 21612f4..0000000 Binary files a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-vietnamese-400-normal-BulugwFq.woff2 and /dev/null differ diff --git a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-vietnamese-400-normal-DDuiU_S-.woff b/crates/codegraph-ui/viewer/assets/ibm-plex-mono-vietnamese-400-normal-DDuiU_S-.woff deleted file mode 100644 index dfa68b0..0000000 Binary files a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-vietnamese-400-normal-DDuiU_S-.woff and /dev/null differ diff --git a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-vietnamese-500-normal-C8zxqsMH.woff b/crates/codegraph-ui/viewer/assets/ibm-plex-mono-vietnamese-500-normal-C8zxqsMH.woff deleted file mode 100644 index b1a1d12..0000000 Binary files a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-vietnamese-500-normal-C8zxqsMH.woff and /dev/null differ diff --git a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-vietnamese-500-normal-DZ4AoWbu.woff2 b/crates/codegraph-ui/viewer/assets/ibm-plex-mono-vietnamese-500-normal-DZ4AoWbu.woff2 deleted file mode 100644 index 3920890..0000000 Binary files a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-vietnamese-500-normal-DZ4AoWbu.woff2 and /dev/null differ diff --git a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-vietnamese-600-normal-D2EvbN8M.woff2 b/crates/codegraph-ui/viewer/assets/ibm-plex-mono-vietnamese-600-normal-D2EvbN8M.woff2 deleted file mode 100644 index a1c5bd3..0000000 Binary files a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-vietnamese-600-normal-D2EvbN8M.woff2 and /dev/null differ diff --git a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-vietnamese-600-normal-iLQfcSjf.woff b/crates/codegraph-ui/viewer/assets/ibm-plex-mono-vietnamese-600-normal-iLQfcSjf.woff deleted file mode 100644 index fbc5264..0000000 Binary files a/crates/codegraph-ui/viewer/assets/ibm-plex-mono-vietnamese-600-normal-iLQfcSjf.woff and /dev/null differ diff --git a/crates/codegraph-ui/viewer/assets/index-Bpmr0I56.js b/crates/codegraph-ui/viewer/assets/index-Bpmr0I56.js deleted file mode 100644 index 0684dbb..0000000 --- a/crates/codegraph-ui/viewer/assets/index-Bpmr0I56.js +++ /dev/null @@ -1,97 +0,0 @@ -(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))o(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&o(a)}).observe(document,{childList:!0,subtree:!0});function r(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function o(s){if(s.ep)return;s.ep=!0;const i=r(s);fetch(s.href,i)}})();const Bv=!1;var Ja=Array.isArray,im=Array.prototype.indexOf,_a=Array.prototype.includes,$a=Array.from,am=Object.defineProperty,ro=Object.getOwnPropertyDescriptor,Vv=Object.getOwnPropertyDescriptors,Wv=Object.prototype,lm=Array.prototype,el=Object.getPrototypeOf,hd=Object.isExtensible;function As(e){return typeof e=="function"}const Ln=()=>{};function cm(e){return e()}function Tc(e){for(var t=0;t{e=o,t=s});return{promise:r,resolve:e,reject:t}}function wn(e,t,r=!1){return e===void 0?r?t():t:e}function wi(e,t){if(Array.isArray(e))return e;if(t===void 0||!(Symbol.iterator in e))return Array.from(e);const r=[];for(const o of e)if(r.push(o),r.length===t)break;return r}function um(e,t){var r={};for(var o in e)t.includes(o)||(r[o]=e[o]);for(var s of Object.getOwnPropertySymbols(e))Object.propertyIsEnumerable.call(e,s)&&!t.includes(s)&&(r[s]=e[s]);return r}const vn=2,es=4,bi=8,fu=1<<24,er=16,Vn=32,br=64,Cc=128,Bn=512,ln=1024,tn=2048,or=4096,xn=8192,Dn=16384,_s=32768,Nc=1<<25,io=65536,ya=1<<17,dm=1<<18,Ro=1<<19,Yv=1<<20,fr=1<<25,To=65536,wa=1<<21,Go=1<<22,oo=1<<23,pr=Symbol("$state"),Xv=Symbol("legacy props"),fm=Symbol(""),Gv=Symbol("attributes"),Ic=Symbol("class"),Ac=Symbol("style"),Pc=Symbol("text"),sa=Symbol("form reset"),xi=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},vu=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml");function hu(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function vm(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function hm(e,t,r){throw new Error("https://svelte.dev/e/each_key_duplicate")}function gm(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function pm(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function mm(e){throw new Error("https://svelte.dev/e/effect_orphan")}function _m(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function ym(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function wm(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function bm(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function xm(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function km(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const Em=1,Sm=2,Zv=4,Mm=8,Tm=16,Cm=1,Nm=2,Im=4,Am=8,Pm=16,Uv=1,Om=2,en=Symbol("uninitialized"),Lm="http://www.w3.org/1999/xhtml",Dm="@attach";function Rm(){console.warn("https://svelte.dev/e/derived_inert")}function zm(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function Hm(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function Qv(e){return e===this.v}function Jv(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function $v(e){return!Jv(e,this.v)}let ys=!1,qm=!1;function jm(){ys=!0}const Fm=[];function eh(e,t=!1,r=!1){return ia(e,new Map,"",Fm,null,r)}function ia(e,t,r,o,s=null,i=!1){if(typeof e=="object"&&e!==null){var a=t.get(e);if(a!==void 0)return a;if(e instanceof Map)return new Map(e);if(e instanceof Set)return new Set(e);if(Ja(e)){var l=Array(e.length);t.set(e,l),s!==null&&t.set(s,l);for(var c=0;c{t===mo&&nh()})}mo.push(e)}function Wm(){for(;mo.length>0;)nh()}function rh(e){var t=ut;if(t===null)return pt.f|=oo,e;if((t.f&_s)===0&&(t.f&es)===0)throw e;to(e,t)}function to(e,t){if(!(t!==null&&(t.f&Dn)!==0)){for(;t!==null;){if((t.f&Cc)!==0){if((t.f&_s)===0)throw e;try{t.b.error(e);return}catch(r){e=r}}t=t.parent}throw e}}const Km=-7169;function Zt(e,t){e.f=e.f&Km|t}function mu(e){(e.f&Bn)!==0||e.deps===null?Zt(e,ln):Zt(e,or)}function oh(e){if(e!==null)for(const t of e)(t.f&vn)===0||(t.f&To)===0||(t.f^=To,oh(t.deps))}function sh(e,t,r){(e.f&tn)!==0?t.add(e):(e.f&or)!==0&&r.add(e),oh(e.deps),Zt(e,ln)}let Hi=!1;function Ym(e){var t=Hi;try{return Hi=!1,[e(),Hi]}finally{Hi=t}}function Xm(e,t){if(t){const r=document.body;e.autofocus=!0,vr(()=>{document.activeElement===r&&e.focus()})}}let gd=!1;function Gm(){gd||(gd=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t[sa]?.()})},{capture:!0}))}function ws(e){var t=pt,r=ut;Wn(null),xr(null);try{return e()}finally{Wn(t),xr(r)}}function Zm(e,t,r,o=r){e.addEventListener(t,()=>ws(r));const s=e[sa];s?e[sa]=()=>{s(),o(!0)}:e[sa]=()=>o(!0),Gm()}function ih(e){let t=0,r=Co(0),o;return()=>{xu()&&(n(r),tl(()=>(t===0&&(o=Ut(()=>e(()=>$s(r)))),t+=1,()=>{vr(()=>{t-=1,t===0&&(o?.(),o=void 0,$s(r))})})))}}var Um=io|Ro;function Qm(e,t,r,o){new Jm(e,t,r,o)}class Jm{parent;is_pending=!1;transform_error;#e;#n=null;#t;#a;#o;#i=null;#r=null;#l=null;#s=null;#g=0;#c=0;#u=!1;#f=new Set;#p=new Set;#d=null;#_=ih(()=>(this.#d=Co(this.#g),()=>{this.#d=null}));constructor(t,r,o,s){this.#e=t,this.#t=r,this.#a=i=>{var a=ut;a.b=this,a.f|=Cc,o(i)},this.parent=ut.b,this.transform_error=s??this.parent?.transform_error??(i=>i),this.#o=Mi(()=>{this.#v()},Um)}#m(){try{this.#i=Mn(()=>this.#a(this.#e))}catch(t){this.error(t)}}#b(t){const r=this.#t.failed,{reset:o,invoke_onerror:s}=this.#y(t);vr(s),r&&(this.#l=Mn(()=>{r(this.#e,()=>t,()=>o)}))}#y(t){var r=!1,o=!1;const s=()=>{if(r){Hm();return}r=!0,o&&km(),this.#l!==null&&Eo(this.#l,()=>{this.#l=null}),this.#h(()=>{this.#v()})};return{reset:s,invoke_onerror:()=>{try{o=!0,this.#t.onerror?.(t,s),o=!1}catch(a){to(a,this.#o&&this.#o.parent)}}}}#x(){const t=this.#t.pending;t&&(this.is_pending=!0,this.#r=Mn(()=>t(this.#e)),vr(()=>{var r=this.#s=document.createDocumentFragment(),o=Dr();r.append(o),this.#i=this.#h(()=>Mn(()=>this.#a(o))),this.#c===0&&(this.#e.before(r),this.#s=null,Eo(this.#r,()=>{this.#r=null}),this.#w(lt))}))}#v(){try{if(this.is_pending=this.has_pending_snippet(),this.#c=0,this.#g=0,this.#i=Mn(()=>{this.#a(this.#e)}),this.#c>0){var t=this.#s=document.createDocumentFragment();Su(this.#i,t);const r=this.#t.pending;this.#r=Mn(()=>r(this.#e))}else this.#w(lt)}catch(r){this.error(r)}}#w(t){this.is_pending=!1,t.transfer_effects(this.#f,this.#p)}defer_effect(t){sh(t,this.#f,this.#p)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#t.pending}#h(t){var r=ut,o=pt,s=Ot;xr(this.#o),Wn(this.#o),ts(this.#o.ctx);try{return Hr.ensure(),t()}catch(i){return rh(i),null}finally{xr(r),Wn(o),ts(s)}}#k(t,r){if(!this.has_pending_snippet()){this.parent&&this.parent.#k(t,r);return}this.#c+=t,this.#c===0&&(this.#w(r),this.#r&&Eo(this.#r,()=>{this.#r=null}),this.#s&&(this.#e.before(this.#s),this.#s=null))}update_pending_count(t,r){this.#k(t,r),this.#g+=t,!(!this.#d||this.#u)&&(this.#u=!0,vr(()=>{this.#u=!1,this.#d&&rs(this.#d,this.#g)}))}get_effect_pending(){return this.#_(),n(this.#d)}error(t){if(!this.#t.onerror&&!this.#t.failed)throw t;lt?.is_fork?(this.#i&<.skip_effect(this.#i),this.#r&<.skip_effect(this.#r),this.#l&<.skip_effect(this.#l),lt.oncommit(()=>{this.#E(t)})):this.#E(t)}#E(t){this.#i&&(hn(this.#i),this.#i=null),this.#r&&(hn(this.#r),this.#r=null),this.#l&&(hn(this.#l),this.#l=null);let r=this.#t.failed;const o=s=>{const{reset:i,invoke_onerror:a}=this.#y(s);a(),r&&(this.#l=this.#h(()=>{try{return Mn(()=>{var l=ut;l.b=this,l.f|=Cc,r(this.#e,()=>s,()=>i)})}catch(l){return to(l,this.#o.parent),null}}))};vr(()=>{var s;try{s=this.transform_error(t)}catch(i){to(i,this.#o&&this.#o.parent);return}s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(o,i=>to(i,this.#o&&this.#o.parent)):o(s)})}}function ah(e,t,r,o){const s=ki()?ns:_u;var i=e.filter(g=>!g.settled),a=t.map(s);if(r.length===0&&i.length===0){o(a);return}var l=ut,c=$m(),f=i.length===1?i[0].promise:i.length>1?Promise.all(i.map(g=>g.promise)):null;function u(g){if((l.f&Dn)===0){c();try{o([...a,...g])}catch(p){to(p,l)}ba()}}var h=lh();if(r.length===0){f.then(()=>u([])).finally(h);return}function d(){Promise.all(r.map(g=>e_(g))).then(u).catch(g=>to(g,l)).finally(h)}f?f.then(()=>{c(),d(),ba()}):d()}function $m(){var e=ut,t=pt,r=Ot,o=lt;return function(i=!0){xr(e),Wn(t),ts(r),i&&(e.f&Dn)===0&&(o?.activate(),o?.apply())}}function ba(e=!0){xr(null),Wn(null),ts(null),e&<?.deactivate()}function lh(){var e=ut,t=e.b,r=lt,o=!!t?.is_rendered();return t?.update_pending_count(1,r),r.increment(o,e),()=>{t?.update_pending_count(-1,r),r.decrement(o,e)}}function ns(e){var t=vn|tn;return ut!==null&&(ut.f|=Ro),{ctx:Ot,deps:null,effects:null,equals:Qv,f:t,fn:e,reactions:null,rv:0,v:en,wv:0,parent:ut,ac:null}}const Ks=Symbol("obsolete");function e_(e,t,r){let o=ut;o===null&&vm();var s=void 0,i=Co(en),a=!pt,l=new Set;return h_(()=>{var c=ut,f=Kv();s=f.promise;try{Promise.resolve(e()).then(f.resolve,g=>{g!==xi&&f.reject(g)}).finally(ba)}catch(g){f.reject(g),ba()}var u=lt;if(a){if((c.f&_s)!==0)var h=lh();if(o.b?.is_rendered())u.async_deriveds.get(c)?.reject(Ks);else for(const g of l.values())g.reject(Ks);l.add(f),u.async_deriveds.set(c,f)}const d=(g,p=void 0)=>{h?.(),l.delete(f),p!==Ks&&(u.activate(),p?(i.f|=oo,rs(i,p)):((i.f&oo)!==0&&(i.f^=oo),rs(i,g)),u.deactivate())};f.promise.then(d,g=>d(null,g||"unknown"))}),ku(()=>{for(const c of l)c.reject(Ks)}),new Promise(c=>{function f(u){function h(){u===s?c(i):f(s)}u.then(h,h)}f(s)})}function S(e){const t=ns(e);return Nh(t),t}function _u(e){const t=ns(e);return t.equals=$v,t}function t_(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r{t.ac.abort(xi),t.ac=null}),t.fn!==null&&(t.teardown=Ln),li(t,0),Eu(t))}function uh(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&t.fn!==null&&os(t)}let Fl=null,Fo=null,lt=null,Oc=null,tr=null,Lc=null,Js=!1,Bl=!1,Wo=null,aa=null;var pd=0;let r_=1;class Hr{id=r_++;#e=!1;linked=!0;#n=null;#t=null;async_deriveds=new Map;current=new Map;previous=new Map;#a=new Set;#o=new Set;#i=0;#r=new Map;#l=null;#s=[];#g=[];#c=new Set;#u=new Set;#f=new Map;#p=new Set;is_fork=!1;#d=!1;constructor(){Fo===null?Fl=Fo=this:(Fo.#t=this,this.#n=Fo),Fo=this}#_(){if(this.is_fork)return!0;for(const o of this.#r.keys()){for(var t=o,r=!1;t.parent!==null;){if(this.#f.has(t)){r=!0;break}t=t.parent}if(!r)return!0}return!1}skip_effect(t){this.#f.has(t)||this.#f.set(t,{d:[],m:[]}),this.#p.delete(t)}unskip_effect(t,r=o=>this.schedule(o)){var o=this.#f.get(t);if(o){this.#f.delete(t);for(var s of o.d)Zt(s,tn),r(s);for(s of o.m)Zt(s,or),r(s)}this.#p.add(t)}#m(){this.#e=!0,pd++>1e3&&(this.#h(),s_());for(const c of this.#c)this.#u.delete(c),Zt(c,tn),this.schedule(c);for(const c of this.#u)Zt(c,or),this.schedule(c);const t=this.#s;this.#s=[],this.apply();var r=Wo=[],o=[],s=aa=[];for(const c of t)try{this.#b(c,r,o)}catch(f){throw vh(c),this.#_()||this.discard(),f}if(lt=null,s.length>0){var i=Hr.ensure();for(const c of s)i.schedule(c)}if(Wo=null,aa=null,this.#_()){this.#v(o),this.#v(r);for(const[c,f]of this.#f)fh(c,f);s.length>0&<.#m();return}const a=this.#y();if(a){this.#v(o),this.#v(r),a.#x(this);return}this.#c.clear(),this.#u.clear();for(const c of this.#a)c(this);this.#a.clear(),Oc=this,md(o),md(r),Oc=null,this.#l?.resolve();var l=lt;if(this.#i===0&&(this.#s.length===0||l!==null)&&this.#h(),this.#s.length>0)if(l!==null){const c=l;c.#s.push(...this.#s.filter(f=>!c.#s.includes(f)))}else l=this;l!==null&&(mr.clear(),l.#m())}#b(t,r,o){t.f^=ln;for(var s=t.first;s!==null;){var i=s.f,a=(i&(Vn|br))!==0,l=a&&(i&ln)!==0,c=l||(i&xn)!==0||this.#f.has(s);if(!c&&s.fn!==null){a?s.f^=ln:(i&es)!==0?r.push(s):Ti(s)&&((i&er)!==0&&this.#u.add(s),os(s));var f=s.first;if(f!==null){s=f;continue}}for(;s!==null;){var u=s.next;if(u!==null){s=u;break}s=s.parent}}}#y(){for(var t=this.#n;t!==null;){if(!t.is_fork){for(const[r,[,o]]of this.current)if(t.current.has(r)&&!o)return t}t=t.#n}return null}#x(t){for(const[o,s]of t.current)!this.previous.has(o)&&t.previous.has(o)&&this.previous.set(o,t.previous.get(o)),this.current.set(o,s);for(const[o,s]of t.async_deriveds){const i=this.async_deriveds.get(o);i&&s.promise.then(i.resolve).catch(i.reject)}t.async_deriveds.clear(),this.transfer_effects(t.#c,t.#u);const r=o=>{var s=o.reactions;if(s!==null&&!((o.f&vn)!==0&&(o.f&(tn|or))===0))for(const l of s){var i=l.f;if((i&vn)!==0)r(l);else{var a=l;i&(Go|er)&&!this.async_deriveds.has(a)&&(this.#u.delete(a),Zt(a,tn),this.schedule(a))}}};for(const o of this.current.keys())r(o);this.oncommit(()=>t.discard()),t.#h(),lt=this,this.#m()}#v(t){for(var r=0;r!h.current.get(d)[1]);if(!(!h.#e||s.length===0)){var i=s.filter(d=>!this.current.has(d));if(i.length===0)t&&h.discard();else if(r.length>0){if(t)for(const d of this.#p)h.unskip_effect(d,g=>{(g.f&(er|Go))!==0?h.schedule(g):h.#v([g])});h.activate();var a=new Set,l=new Map;for(var c of r)dh(c,i,a,l);l=new Map;var f=[...h.current].filter(([d,g])=>{const p=this.current.get(d);return p?p[0]!==g[0]||p[1]!==g[1]:!0}).map(([d])=>d);if(f.length>0)for(const d of this.#g)(d.f&(Dn|xn|ya))===0&&wu(d,f,l)&&((d.f&(Go|er))!==0?(Zt(d,tn),h.schedule(d)):h.#c.add(d));if(h.#s.length>0&&!h.#d){h.apply();for(var u of h.#s)h.#b(u,[],[]);h.#s=[]}h.deactivate()}}}}increment(t,r){if(this.#i+=1,t){let o=this.#r.get(r)??0;this.#r.set(r,o+1)}}decrement(t,r){if(this.#i-=1,t){let o=this.#r.get(r)??0;o===1?this.#r.delete(r):this.#r.set(r,o-1)}this.#d||(this.#d=!0,vr(()=>{this.#d=!1,this.linked&&this.flush()}))}transfer_effects(t,r){for(const o of t)this.#c.add(o);for(const o of r)this.#u.add(o);t.clear(),r.clear()}oncommit(t){this.#a.add(t)}ondiscard(t){this.#o.add(t)}settled(){return(this.#l??=Kv()).promise}static ensure(){if(lt===null){const t=lt=new Hr;!Bl&&!Js&&vr(()=>{t.#e||t.flush()})}return lt}apply(){{tr=null;return}}schedule(t){if(Lc=t,t.b?.is_pending&&(t.f&(es|bi|fu))!==0&&(t.f&_s)===0){t.b.defer_effect(t);return}for(var r=t;r.parent!==null;){r=r.parent;var o=r.f;if(Wo!==null&&r===ut&&(pt===null||(pt.f&vn)===0))return;if((o&(br|Vn))!==0){if((o&ln)===0)return;r.f^=ln}}this.#s.push(r)}#h(){if(this.linked){var t=this.#n,r=this.#t;t===null?Fl=r:t.#t=r,r===null?Fo=t:r.#n=t,this.linked=!1}}}function o_(e){var t=Js;Js=!0;try{for(var r;;){if(Wm(),lt===null)return r;lt.flush()}}finally{Js=t}}function s_(){try{_m()}catch(e){to(e,Lc)}}let Ir=null;function md(e){var t=e.length;if(t!==0){for(var r=0;r0)){mr.clear();for(const s of Ir){if((s.f&(Dn|xn))!==0)continue;const i=[s];let a=s.parent;for(;a!==null;)Ir.has(a)&&(Ir.delete(a),i.push(a)),a=a.parent;for(let l=i.length-1;l>=0;l--){const c=i[l];(c.f&(Dn|xn))===0&&os(c)}}Ir.clear()}}Ir=null}}function dh(e,t,r,o){if(!r.has(e)&&(r.add(e),e.reactions!==null))for(const s of e.reactions){const i=s.f;(i&vn)!==0?dh(s,t,r,o):(i&(Go|er))!==0&&(i&tn)===0&&wu(s,t,o)&&(Zt(s,tn),bu(s))}}function wu(e,t,r){const o=r.get(e);if(o!==void 0)return o;if(e.deps!==null)for(const s of e.deps){if(_a.call(t,s))return!0;if((s.f&vn)!==0&&wu(s,t,r))return r.set(s,!0),!0}return r.set(e,!1),!1}function bu(e){lt.schedule(e)}function fh(e,t){if(!((e.f&Vn)!==0&&(e.f&ln)!==0)){(e.f&tn)!==0?t.d.push(e):(e.f&or)!==0&&t.m.push(e),Zt(e,ln);for(var r=e.first;r!==null;)fh(r,t),r=r.next}}function vh(e){Zt(e,ln);for(var t=e.first;t!==null;)vh(t),t=t.next}let xa=new Set;const mr=new Map;let hh=!1;function Co(e,t){var r={f:0,v:e,reactions:null,equals:Qv,rv:0,wv:0};return r}function ae(e,t){const r=Co(e);return Nh(r),r}function i_(e,t=!1,r=!0){const o=Co(e);return t||(o.equals=$v),ys&&r&&Ot!==null&&Ot.l!==null&&(Ot.l.s??=[]).push(o),o}function L(e,t,r=!1){pt!==null&&(!nr||(pt.f&ya)!==0)&&ki()&&(pt.f&(vn|er|Go|ya))!==0&&(_r===null||!_r.has(e))&&xm();let o=r?un(t):t;return rs(e,o,aa)}function rs(e,t,r=null){if(!e.equals(t)){qr?mr.set(e,t):mr.has(e)||mr.set(e,e.v);var o=Hr.ensure();if(o.capture(e,t),(e.f&vn)!==0){const s=e;(e.f&tn)!==0&&yu(s),tr===null&&mu(s)}e.wv=Ah(),gh(e,tn,r),ki()&&ut!==null&&(ut.f&ln)!==0&&(ut.f&(Vn|br))===0&&(jn===null?m_([e]):jn.push(e)),!o.is_fork&&xa.size>0&&!hh&&a_()}return t}function a_(){hh=!1;for(const e of xa){(e.f&ln)!==0&&Zt(e,or);let t;try{t=Ti(e)}catch{t=!0}t&&os(e)}xa.clear()}function $s(e){L(e,e.v+1)}function gh(e,t,r){var o=e.reactions;if(o!==null)for(var s=ki(),i=o.length,a=0;a{if(So===i)return l();var c=pt,f=So;Wn(null),wd(i);var u=l();return Wn(c),wd(f),u};return o&&r.set("length",ae(e.length)),new Proxy(e,{defineProperty(l,c,f){(!("value"in f)||f.configurable===!1||f.enumerable===!1||f.writable===!1)&&wm();var u=r.get(c);return u===void 0?a(()=>{var h=ae(f.value);return r.set(c,h),h}):L(u,f.value,!0),!0},deleteProperty(l,c){var f=r.get(c);if(f===void 0){if(c in l){const u=a(()=>ae(en));r.set(c,u),$s(s)}}else L(f,en),$s(s);return!0},get(l,c,f){if(c===pr)return e;var u=r.get(c),h=c in l;if(u===void 0&&(!h||ro(l,c)?.writable)&&(u=a(()=>{var g=un(h?l[c]:en),p=ae(g);return p}),r.set(c,u)),u!==void 0){var d=n(u);return d===en?void 0:d}return Reflect.get(l,c,f)},getOwnPropertyDescriptor(l,c){var f=Reflect.getOwnPropertyDescriptor(l,c);if(f&&"value"in f){var u=r.get(c);u&&(f.value=n(u))}else if(f===void 0){var h=r.get(c),d=h?.v;if(h!==void 0&&d!==en)return{enumerable:!0,configurable:!0,value:d,writable:!0}}return f},has(l,c){if(c===pr)return!0;var f=r.get(c),u=f!==void 0&&f.v!==en||Reflect.has(l,c);if(f!==void 0||ut!==null&&(!u||ro(l,c)?.writable)){f===void 0&&(f=a(()=>{var d=u?un(l[c]):en,g=ae(d);return g}),r.set(c,f));var h=n(f);if(h===en)return!1}return u},set(l,c,f,u){var h=r.get(c),d=c in l;if(o&&c==="length")for(var g=f;gae(en)),r.set(g+"",p))}if(h===void 0)(!d||ro(l,c)?.writable)&&(h=a(()=>ae(void 0)),L(h,un(f)),r.set(c,h));else{d=h.v!==en;var y=a(()=>un(f));L(h,y)}var w=Reflect.getOwnPropertyDescriptor(l,c);if(w?.set&&w.set.call(u,f),!d){if(o&&typeof c=="string"){var M=r.get("length"),I=Number(c);Number.isInteger(I)&&I>=M.v&&L(M,I+1)}$s(s)}return!0},ownKeys(l){n(s);var c=Reflect.ownKeys(l).filter(h=>{var d=r.get(h);return d===void 0||d.v!==en});for(var[f,u]of r)u.v!==en&&!(f in l)&&c.push(f);return c},setPrototypeOf(){bm()}})}function _d(e){try{if(e!==null&&typeof e=="object"&&pr in e)return e[pr]}catch{}return e}function l_(e,t){return Object.is(_d(e),_d(t))}var fn,ph,mh,_h;function c_(){if(fn===void 0){fn=window,ph=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;mh=ro(t,"firstChild").get,_h=ro(t,"nextSibling").get,hd(e)&&(e[Ic]=void 0,e[Gv]=null,e[Ac]=void 0,e.__e=void 0),hd(r)&&(r[Pc]=void 0)}}function Dr(e=""){return document.createTextNode(e)}function Pr(e){return mh.call(e)}function Ei(e){return _h.call(e)}function v(e,t){return Pr(e)}function ye(e,t=!1){{var r=Pr(e);return r instanceof Comment&&r.data===""?Ei(r):r}}function m(e,t=1,r=!1){let o=e;for(;t--;)o=Ei(o);return o}function u_(e){e.textContent=""}function yh(){return!1}function d_(e,t,r){return r?document.createElement(e,{is:r}):document.createElement(e)}function wh(e){ut===null&&(pt===null&&mm(),pm()),qr&&gm()}function f_(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function Xn(e,t){var r=ut;r!==null&&(r.f&xn)!==0&&(e|=xn);var o={ctx:Ot,deps:null,nodes:null,f:e|tn|Bn,first:null,fn:t,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};lt?.register_created_effect(o);var s=o;if((e&es)!==0)Wo!==null?Wo.push(o):Hr.ensure().schedule(o);else if(t!==null){try{os(o)}catch(a){throw hn(o),a}s.deps===null&&s.teardown===null&&s.nodes===null&&s.first===s.last&&(s.f&Ro)===0&&(s=s.first,(e&er)!==0&&(e&io)!==0&&s!==null&&(s.f|=io))}if(s!==null&&(s.parent=r,r!==null&&f_(s,r),pt!==null&&(pt.f&vn)!==0&&(e&br)===0)){var i=pt;(i.effects??=[]).push(s)}return o}function xu(){return pt!==null&&!nr}function ku(e){const t=Xn(bi,null);return Zt(t,ln),t.teardown=e,t}function et(e){wh();var t=ut.f,r=!pt&&(t&Vn)!==0&&Ot!==null&&!Ot.i;if(r){var o=Ot;(o.e??=[]).push(e)}else return bh(e)}function bh(e){return Xn(es|Yv,e)}function xh(e){return wh(),Xn(bi|Yv,e)}function kh(e){Hr.ensure();const t=Xn(br|Ro,e);return()=>{hn(t)}}function v_(e){Hr.ensure();const t=Xn(br|Ro,e);return(r={})=>new Promise(o=>{r.outro?Eo(t,()=>{hn(t),o(void 0)}):(hn(t),o(void 0))})}function Si(e){return Xn(es,e)}function h_(e){return Xn(Go|Ro,e)}function tl(e,t=0){return Xn(bi|t,e)}function P(e,t=[],r=[],o=[]){ah(o,t,r,s=>{Xn(bi,()=>{e(...s.map(n))})})}function Mi(e,t=0){var r=Xn(er|t,e);return r}function Eh(e,t=0){var r=Xn(fu|t,e);return r}function Mn(e){return Xn(Vn|Ro,e)}function Sh(e){var t=e.teardown;if(t!==null){const r=qr,o=pt;yd(!0),Wn(null);try{t.call(null)}finally{yd(r),Wn(o)}}}function Eu(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){const s=r.ac;s!==null&&ws(()=>{s.abort(xi)});var o=r.next;(r.f&br)!==0?r.parent=null:hn(r,t),r=o}}function g_(e){for(var t=e.first;t!==null;){var r=t.next;(t.f&Vn)===0&&hn(t),t=r}}function hn(e,t=!0){var r=!1;(t||(e.f&dm)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(p_(e.nodes.start,e.nodes.end),r=!0),e.f|=Nc,Eu(e,t&&!r),li(e,0);var o=e.nodes&&e.nodes.t;if(o!==null)for(const i of o)i.stop();Sh(e),e.f^=Nc,e.f|=Dn;var s=e.parent;s!==null&&s.first!==null&&Mh(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function p_(e,t){for(;e!==null;){var r=e===t?null:Ei(e);e.remove(),e=r}}function Mh(e){var t=e.parent,r=e.prev,o=e.next;r!==null&&(r.next=o),o!==null&&(o.prev=r),t!==null&&(t.first===e&&(t.first=o),t.last===e&&(t.last=r))}function Eo(e,t,r=!0){var o=[];Th(e,o,!0);var s=()=>{r&&hn(e),t&&t()},i=o.length;if(i>0){var a=()=>--i||s();for(var l of o)l.out(a)}else s()}function Th(e,t,r){if((e.f&xn)===0){e.f^=xn;var o=e.nodes&&e.nodes.t;if(o!==null)for(const l of o)(l.is_global||r)&&t.push(l);for(var s=e.first;s!==null;){var i=s.next;if((s.f&br)===0){var a=(s.f&io)!==0||(s.f&Vn)!==0&&(e.f&er)!==0;Th(s,t,a?r:!1)}s=i}}}function ka(e){Ch(e,!0)}function Ch(e,t){if((e.f&xn)!==0){e.f^=xn,(e.f&ln)===0&&(Zt(e,tn),Hr.ensure().schedule(e));for(var r=e.first;r!==null;){var o=r.next,s=(r.f&io)!==0||(r.f&Vn)!==0;Ch(r,s?t:!1),r=o}var i=e.nodes&&e.nodes.t;if(i!==null)for(const a of i)(a.is_global||t)&&a.in()}}function Su(e,t){if(e.nodes)for(var r=e.nodes.start,o=e.nodes.end;r!==null;){var s=r===o?null:Ei(r);t.append(r),r=s}}let la=!1,qr=!1;function yd(e){qr=e}let pt=null,nr=!1;function Wn(e){pt=e}let ut=null;function xr(e){ut=e}let _r=null;function Nh(e){pt!==null&&(_r??=new Set).add(e)}let Sn=null,On=0,jn=null;function m_(e){jn=e}let Ih=1,_o=0,So=_o;function wd(e){So=e}function Ah(){return++Ih}function Ti(e){var t=e.f;if((t&tn)!==0)return!0;if(t&vn&&(e.f&=~To),(t&or)!==0){for(var r=e.deps,o=r.length,s=0;se.wv)return!0}(t&Bn)!==0&&tr===null&&Zt(e,ln)}return!1}function Ph(e,t,r=!0){var o=e.reactions;if(o!==null&&!(_r!==null&&_r.has(e)))for(var s=0;s{e.ac.abort(xi)}),e.ac=null);try{e.f|=wa;var u=e.fn,h=u();e.f|=_s;var d=e.deps,g=lt?.is_fork;if(Sn!==null){var p;if(g||li(e,On),d!==null&&On>0)for(d.length=On+Sn.length,p=0;p{i.ac.abort(xi),i.ac=null,Zt(i,tn)}),n_(i),li(i,0)}}function li(e,t){var r=e.deps;if(r!==null)for(var o=t;or?.call(this,i))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?vr(()=>{t.addEventListener(e,s,o)}):t.addEventListener(e,s,o),s}function zc(e,t,r,o={}){var s=Mu(t,e,r,o);return()=>{e.removeEventListener(t,s,o)}}function Ge(e,t,r,o,s){var i={capture:o,passive:s},a=Mu(e,t,r,i);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&ku(()=>{t.removeEventListener(e,a,i)})}function ke(e,t,r){(t[Ys]??={})[e]=r}function mt(e){for(var t=0;t{Wl=!1,Vl=null}));var a=0,l=Vl===e&&e[Ys];if(l){var c=s.indexOf(l);if(c!==-1&&(t===document||t===window)){e[Ys]=t;return}var f=s.indexOf(t);if(f===-1)return;c<=f&&(a=c)}if(i=s[a]||e.target,i!==t){am(e,"currentTarget",{configurable:!0,get(){return i||r}});var u=pt,h=ut;Wn(null),xr(null);try{for(var d,g=[];i!==null&&i!==t;){try{var p=i[Ys]?.[o];p!=null&&(!i.disabled||e.target===i)&&p.call(i,e)}catch(y){d?g.push(y):d=y}if(e.cancelBubble)break;a++,i=a{throw y});throw d}}finally{e[Ys]=t,delete e.currentTarget,Wn(u),xr(h)}}}const M_=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function T_(e){return M_?.createHTML(e)??e}function Hh(e){var t=d_("template");return t.innerHTML=T_(e.replaceAll("","")),t.content}function ss(e,t){var r=ut;r.nodes===null&&(r.nodes={start:e,end:t,a:null,t:null})}function N(e,t){var r=(t&Uv)!==0,o=(t&Om)!==0,s,i=!e.startsWith("");return()=>{s===void 0&&(s=Hh(i?e:""+e),r||(s=Pr(s)));var a=o||ph?document.importNode(s,!0):s.cloneNode(!0);if(r){var l=Pr(a),c=a.lastChild;ss(l,c)}else ss(a,a);return a}}function C_(e,t,r="svg"){var o=!e.startsWith(""),s=(t&Uv)!==0,i=`<${r}>${o?e:""+e}`,a;return()=>{if(!a){var l=Hh(i),c=Pr(l);if(s)for(a=document.createDocumentFragment();Pr(c);)a.appendChild(Pr(c));else a=Pr(c)}var f=a.cloneNode(!0);if(s){var u=Pr(f),h=f.lastChild;ss(u,h)}else ss(f,f);return f}}function Yt(e,t){return C_(e,t,"svg")}function wt(e=""){{var t=Dr(e+"");return ss(t,t),t}}function St(){var e=document.createDocumentFragment(),t=document.createComment(""),r=Dr();return e.append(t,r),ss(t,r),e}function _(e,t){e!==null&&e.before(t)}function x(e,t){var r=t==null?"":typeof t=="object"?`${t}`:t;r!==(e[Pc]??=e.nodeValue)&&(e[Pc]=r,e.nodeValue=`${r}`)}function N_(e,t){return I_(e,t)}const qi=new Map;function I_(e,{target:t,anchor:r,props:o={},events:s,context:i,intro:a=!0,transformError:l}){c_();var c=void 0,f=v_(()=>{var u=r??t.appendChild(Dr());Qm(u,{pending:()=>{}},g=>{Ne({});var p=Ot;i&&(p.c=i),s&&(o.$$events=s),c=e(g,o)||{},Ie()},l);var h=new Set,d=g=>{for(var p=0;p{for(var g of h)for(const w of[t,document]){var p=qi.get(w),y=p.get(g);--y==0?(w.removeEventListener(g,Hc),p.delete(g),p.size===0&&qi.delete(w)):p.set(g,y)}Rc.delete(d),u!==r&&u.parentNode?.removeChild(u)}});return A_.set(c,f),c}let A_=new WeakMap;class Tu{anchor;#e=new Map;#n=new Map;#t=new Map;#a=new Set;#o=!0;constructor(t,r=!0){this.anchor=t,this.#o=r}#i=t=>{if(this.#e.has(t)){var r=this.#e.get(t),o=this.#n.get(r);if(o)ka(o),this.#a.delete(r);else{var s=this.#t.get(r);s&&(ka(s.effect),this.#n.set(r,s.effect),this.#t.delete(r),s.fragment.lastChild.remove(),this.anchor.before(s.fragment),o=s.effect)}for(const[i,a]of this.#e){if(this.#e.delete(i),i===t)break;const l=this.#t.get(a);l&&(hn(l.effect),this.#t.delete(a))}for(const[i,a]of this.#n){if(i===r||this.#a.has(i))continue;const l=()=>{if(Array.from(this.#e.values()).includes(i)){var f=document.createDocumentFragment();Su(a,f),f.append(Dr()),this.#t.set(i,{effect:a,fragment:f})}else hn(a);this.#a.delete(i),this.#n.delete(i)};this.#o||!o?(this.#a.add(i),Eo(a,l,!1)):l()}}};#r=t=>{this.#e.delete(t);const r=Array.from(this.#e.values());for(const[o,s]of this.#t)r.includes(o)||(hn(s.effect),this.#t.delete(o))};ensure(t,r){var o=lt,s=yh();if(r&&!this.#n.has(t)&&!this.#t.has(t))if(s){var i=document.createDocumentFragment(),a=Dr();i.append(a),this.#t.set(t,{effect:Mn(()=>r(a)),fragment:i})}else this.#n.set(t,Mn(()=>r(this.anchor)));if(this.#e.set(o,t),s){for(const[l,c]of this.#n)l===t?o.unskip_effect(c):o.skip_effect(c);for(const[l,c]of this.#t)l===t?o.unskip_effect(c.effect):o.skip_effect(c.effect);o.oncommit(this.#i),o.ondiscard(this.#r)}else this.#i(o)}}function V(e,t,r=!1){var o=new Tu(e),s=r?io:0;function i(a,l){o.ensure(a,l)}Mi(()=>{var a=!1;t((l,c=0)=>{a=!0,i(c,l)}),a||i(-1,null)},s)}function Kn(e,t){return t}function P_(e,t,r){for(var o=[],s=t.length,i,a=t.length,l=0;l{if(i){if(i.pending.delete(h),i.done.add(h),i.pending.size===0){var d=e.outrogroups;qc(e,$a(i.done)),d.delete(i),d.size===0&&(e.outrogroups=null)}}else a-=1},!1)}if(a===0){var c=o.length===0&&r!==null&&e.pending.size===0;if(c){var f=r,u=f.parentNode;u_(u),u.append(f),e.items.clear()}qc(e,t,!c)}else i={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(i)}function qc(e,t,r=!0){var o;if(e.pending.size>0){o=new Set;for(const a of e.pending.values())for(const l of a)o.add(e.items.get(l).e)}for(var s=0;s{var C=r();return Ja(C)?C:C==null?[]:$a(C)}),d,g=new Map,p=!0;function y(C){(I.effect.f&Dn)===0&&(I.pending.delete(C),I.fallback=u,O_(I,d,a,t,o),u!==null&&(d.length===0?(u.f&fr)===0?ka(u):(u.f^=fr,Xs(u,null,a)):Eo(u,()=>{u=null})))}function w(C){I.pending.delete(C)}var M=Mi(()=>{d=n(h);for(var C=d.length,T=new Set,A=lt,D=yh(),j=0;ji(a)):(u=Mn(()=>i(bd??=Dr())),u.f|=fr)),C>T.size&&hm(),!p)if(g.set(A,T),D){for(const[H,B]of l)T.has(H)||A.skip_effect(B.e);A.oncommit(y),A.ondiscard(w)}else y(A);n(h)}),I={effect:M,items:l,pending:g,outrogroups:null,fallback:u};p=!1}function Ps(e){for(;e!==null&&(e.f&Vn)===0;)e=e.next;return e}function O_(e,t,r,o,s){var i=(o&Mm)!==0,a=t.length,l=e.items,c=Ps(e.effect.first),f,u=null,h,d=[],g=[],p,y,w,M;if(i)for(M=0;M0){var z=(o&Zv)!==0&&a===0?r:null;if(i){for(M=0;M{if(h!==void 0)for(w of h)w.nodes?.a?.apply()})}function L_(e,t,r,o,s,i,a,l){var c=(a&Em)!==0?(a&Tm)===0?i_(r,!1,!1):Co(r):null,f=(a&Sm)!==0?Co(s):null;return{v:c,i:f,e:Mn(()=>(i(t,c??r,f??s,l),()=>{e.delete(o)}))}}function Xs(e,t,r){if(e.nodes)for(var o=e.nodes.start,s=e.nodes.end,i=t&&(t.f&fr)===0?t.nodes.start:r;o!==null;){var a=Ei(o);if(i.before(o),o===s)return;o=a}}function Vr(e,t,r){t===null?e.effect.first=r:t.next=r,r===null?e.effect.last=t:r.prev=t}function Nn(e,t,...r){var o=new Tu(e);Mi(()=>{const s=t()??null;o.ensure(s,s&&(i=>s(i,...r)))},io)}function Cu(e,t,r){var o=new Tu(e);Mi(()=>{var s=t()??null;o.ensure(s,s&&(i=>r(i,s)))},io)}function bn(e,t,r){Si(()=>{var o=Ut(()=>t(e,r?.())||{});if(r&&o?.update){var s=!1,i={};tl(()=>{var a=r();Rh(a),s&&Jv(i,a)&&(i=a,o.update(a))}),s=!0}if(o?.destroy)return()=>o.destroy()})}function D_(e,t){var r=void 0,o;Eh(()=>{r!==(r=t())&&(o&&(hn(o),o=null),r&&(o=Mn(()=>{Si(()=>r(e))})))})}function qh(e){var t,r,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t=0;){var l=a+i;(a===0||xd.includes(o[a-1]))&&(l===o.length||xd.includes(o[l]))?o=(a===0?"":o.substring(0,a))+o.substring(l+1):a=l}}return o===""?null:o}function kd(e,t=!1){var r=t?" !important;":";",o="";for(var s of Object.keys(e)){var i=e[s];i!=null&&i!==""&&(o+=" "+s+": "+i+r)}return o}function Kl(e){return e[0]!=="-"||e[1]!=="-"?e.toLowerCase():e}function H_(e,t){if(t){var r="",o,s;if(Array.isArray(t)?(o=t[0],s=t[1]):o=t,e){e=String(e).replaceAll(/\/\*.*?\*\//g,"").trim();var i=!1,a=0,l=!1,c=[];o&&c.push(...Object.keys(o).map(Kl)),s&&c.push(...Object.keys(s).map(Kl));var f=0,u=-1;const y=e.length;for(var h=0;h{"__value"in e&&No(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),ku(()=>{t.disconnect()})}function Ed(e){return"__value"in e?e.__value:e.value}const Qr=Symbol("class"),dr=Symbol("style"),jh=Symbol("is custom element"),Fh=Symbol("is html"),q_=vu?"input":"INPUT",j_=vu?"option":"OPTION",F_=vu?"select":"SELECT";function Bh(e,t){var r=Nu(e);r.checked!==(r.checked=t??void 0)&&(e.checked=t)}function B_(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function se(e,t,r,o){var s=Nu(e);s[t]!==(s[t]=r)&&(t==="loading"&&(e[fm]=r),r==null?e.removeAttribute(t):typeof r!="string"&&Vh(e).includes(t)?e[t]=r:e.setAttribute(t,r))}function V_(e,t,r,o,s=!1,i=!1){var a=Nu(e),l=a[jh],c=!a[Fh],f=t||{},u=e.nodeName===j_;for(var h in t)!(h in r)&&h[0]+h[1]!=="$$"&&(r[h]=null);r.class?r.class=zo(r.class):(o||r[Qr])&&(r.class=null),r[dr]&&(r.style??=null);var d=Vh(e);if(e.nodeName===q_&&"type"in r&&("value"in r||"__value"in r)){var g=r.type;(g!==f.type||g===void 0&&e.hasAttribute("type"))&&(f.type=g,se(e,"type",g))}for(const A in r){let D=r[A];if(u&&A==="value"&&D==null){e.value=e.__value="",f[A]=D;continue}if(A==="class"){var p=e.namespaceURI==="http://www.w3.org/1999/xhtml";Ce(e,p,D,o,t?.[Qr],r[Qr]),f[A]=D,f[Qr]=r[Qr];continue}if(A==="style"){nt(e,D,t?.[dr],r[dr]),f[A]=D,f[dr]=r[dr];continue}var y=f[A];if(!(D===y&&!(D===void 0&&e.hasAttribute(A)))){f[A]=D;var w=A[0]+A[1];if(w!=="$$")if(w==="on"){const j={},R="$$"+A;let z=A.slice(2);var M=b_(z);if(y_(z)&&(z=z.slice(0,-7),j.capture=!0),!M&&y){if(D!=null)continue;e.removeEventListener(z,f[R],j),f[R]=null}if(M)ke(z,e,D),mt([z]);else if(D!=null){let W=function(H){f[A].call(this,H)};var T=W;f[R]=Mu(z,e,W,j)}}else if(A==="style")se(e,A,D);else if(A==="autofocus")Xm(e,!!D);else if(!l&&(A==="__value"||A==="value"&&D!=null))e.value=e.__value=D;else if(A==="selected"&&u)B_(e,D);else{var I=A;c||(I=k_(I));var C=I==="defaultValue"||I==="defaultChecked";if(D==null&&!l&&!C)if(a[A]=null,I==="value"||I==="checked"){let j=e;const R=t===void 0;if(I==="value"){let z=j.defaultValue;j.removeAttribute(I),j.defaultValue=z,j.value=j.__value=R?z:null}else{let z=j.defaultChecked;j.removeAttribute(I),j.defaultChecked=z,j.checked=R?z:!1}}else e.removeAttribute(A);else C||d.includes(I)&&(l||typeof D!="string")?(e[I]=D,I in a&&(a[I]=en)):typeof D!="function"&&se(e,I,D)}}}return f}function Fr(e,t,r=[],o=[],s=[],i,a=!1,l=!1){ah(s,r,o,c=>{var f=void 0,u={},h=e.nodeName===F_,d=!1;if(Eh(()=>{var p=t(...c.map(n)),y=V_(e,f,p,i,a,l);d&&h&&"value"in p&&No(e,p.value);for(let M of Object.getOwnPropertySymbols(u))p[M]||hn(u[M]);for(let M of Object.getOwnPropertySymbols(p)){var w=p[M];M.description===Dm&&(!f||w!==f[M])&&(u[M]&&hn(u[M]),u[M]=Mn(()=>D_(e,()=>w))),y[M]=w}f=y}),h){var g=e;Si(()=>{No(g,f.value,!0),ci(g)})}d=!0})}function Nu(e){return e[Gv]??={[jh]:e.nodeName.includes("-"),[Fh]:e.namespaceURI===Lm}}var Sd=new Map;function Vh(e){var t=e.getAttribute("is")||e.nodeName,r=Sd.get(t);if(r)return r;Sd.set(t,r=[]);for(var o,s=e,i=Element.prototype;i!==s;){o=Vv(s);for(var a in o)o[a].set&&a!=="innerHTML"&&a!=="textContent"&&a!=="innerText"&&r.push(a);s=el(s)}return r}function Iu(e,t,r=t){var o=new WeakSet;Zm(e,"input",async s=>{var i=s?e.defaultValue:e.value;if(i=Xl(e)?Gl(i):i,r(i),lt!==null&&o.add(lt),await Ea(),i!==(i=t())){var a=e.selectionStart,l=e.selectionEnd,c=e.value.length;if(e.value=i??"",l!==null){var f=e.value.length;a===l&&l===c&&f>c?(e.selectionStart=f,e.selectionEnd=f):(e.selectionStart=a,e.selectionEnd=Math.min(l,f))}}}),Ut(t)==null&&e.value&&(r(Xl(e)?Gl(e.value):e.value),lt!==null&&o.add(lt)),tl(()=>{var s=t();if(e===document.activeElement){var i=lt;if(o.has(i))return}Xl(e)&&s===Gl(e.value)||e.type==="date"&&!s&&!e.value||s!==e.value&&(e.value=s??"")})}function Xl(e){var t=e.type;return t==="number"||t==="range"}function Gl(e){return e===""?null:+e}class Au{#e=new WeakMap;#n;#t;static entries=new WeakMap;constructor(t){this.#t=t}observe(t,r){var o=this.#e.get(t)||new Set;return o.add(r),this.#e.set(t,o),this.#a().observe(t,this.#t),()=>{var s=this.#e.get(t);s.delete(r),s.size===0&&(this.#e.delete(t),this.#n.unobserve(t))}}#a(){return this.#n??(this.#n=new ResizeObserver(t=>{for(var r of t){Au.entries.set(r.target,r);for(var o of this.#e.get(r.target)||[])o(r)}}))}}var W_=new Au({box:"border-box"});function Md(e,t,r){var o=W_.observe(e,()=>r(e[t]));Si(()=>(Ut(()=>r(e[t])),o))}function Zl(e,t){return e===t||e?.[pr]===t}function Wt(e={},t,r,o){var s=Ot.r,i=ut;return Si(()=>{var a,l;return tl(()=>{a=l,l=[],Ut(()=>{Zl(r(...l),e)||(t(e,...l),a&&Zl(r(...a),e)&&t(null,...a))})}),()=>{let c=i;for(;c!==s&&c.parent!==null&&c.parent.f&Nc;)c=c.parent;const f=()=>{l&&Zl(r(...l),e)&&t(null,...l)},u=c.teardown;c.teardown=()=>{f(),u?.()}}}),e}function Wh(e=!1){const t=Ot,r=t.l.u;if(!r)return;let o=()=>Rh(t.s);if(e){let s=0,i={};const a=ns(()=>{let l=!1;const c=t.s;for(const f in c)c[f]!==i[f]&&(i[f]=c[f],l=!0);return l&&s++,s});o=()=>n(a)}r.b.length&&xh(()=>{Td(t,o),Tc(r.b)}),et(()=>{const s=Ut(()=>r.m.map(cm));return()=>{for(const i of s)typeof i=="function"&&i()}}),r.a.length&&et(()=>{Td(t,o),Tc(r.a)})}function Td(e,t){if(e.l.s)for(const r of e.l.s)n(r);t()}const K_={get(e,t){if(!e.exclude.has(t))return e.props[t]},set(e,t){return!1},getOwnPropertyDescriptor(e,t){if(!e.exclude.has(t)&&t in e.props)return{enumerable:!0,configurable:!0,value:e.props[t]}},has(e,t){return e.exclude.has(t)?!1:t in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(t=>!e.exclude.has(t))}};function ao(e,t,r){return new Proxy({props:e,exclude:t},K_)}const Y_={get(e,t){let r=e.props.length;for(;r--;){let o=e.props[r];if(As(o)&&(o=o()),typeof o=="object"&&o!==null&&t in o)return o[t]}},set(e,t,r){let o=e.props.length;for(;o--;){let s=e.props[o];As(s)&&(s=s());const i=ro(s,t);if(i&&i.set)return i.set(r),!0}return!1},getOwnPropertyDescriptor(e,t){let r=e.props.length;for(;r--;){let o=e.props[r];if(As(o)&&(o=o()),typeof o=="object"&&o!==null&&t in o){const s=ro(o,t);return s&&!s.configurable&&(s.configurable=!0),s}}},has(e,t){if(t===pr||t===Xv)return!1;for(let r of e.props)if(As(r)&&(r=r()),r!=null&&t in r)return!0;return!1},ownKeys(e){const t=[];for(let r of e.props)if(As(r)&&(r=r()),!!r){for(const o in r)t.includes(o)||t.push(o);for(const o of Object.getOwnPropertySymbols(r))t.includes(o)||t.push(o)}return t}};function Jr(...e){return new Proxy({props:e},Y_)}function Ee(e,t,r,o){var s=!ys||(r&Nm)!==0,i=(r&Am)!==0,a=(r&Pm)!==0,l=o,c=!0,f=void 0,u=()=>a&&s?(f??=ns(o),n(f)):(c&&(c=!1,l=a?Ut(o):o),l);let h;if(i){var d=pr in e||Xv in e;h=ro(e,t)?.set??(d&&t in e?T=>e[t]=T:void 0)}var g,p=!1;i?[g,p]=Ym(()=>e[t]):g=e[t],g===void 0&&o!==void 0&&(g=u(),h&&(s&&ym(),h(g)));var y;if(s?y=()=>{var T=e[t];return T===void 0?u():(c=!0,T)}:y=()=>{var T=e[t];return T!==void 0&&(l=void 0),T===void 0?l:T},s&&(r&Im)===0)return y;if(h){var w=e.$$legacy;return(function(T,A){return arguments.length>0?((!s||!A||w||p)&&h(A?y():T),T):y()})}var M=!1,I=((r&Cm)!==0?ns:_u)(()=>(M=!1,y()));i&&n(I);var C=ut;return(function(T,A){if(arguments.length>0){const D=A?n(I):s&&i?un(T):T;return L(I,D),M=!0,l!==void 0&&(l=D),T}return qr&&M||(C.f&Dn)!==0?I.v:n(I)})}function X_(e){Ot===null&&hu(),ys&&Ot.l!==null?G_(Ot).m.push(e):et(()=>{const t=Ut(e);if(typeof t=="function")return t})}function nl(e){Ot===null&&hu(),X_(()=>()=>Ut(e))}function G_(e){var t=e.l;return t.u??={a:[],b:[],m:[]}}const Z_="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(Z_);function Cd(e){return e.split("/").map(encodeURIComponent).join("/")}function vo(e){const t=e.toString();return t?`?${t}`:""}const U_={symbolHref(e,t={}){const r=new URLSearchParams;return t.trail&&r.set("t",t.trail),t.line&&r.set("hl",String(t.line)),e?`#/s/${Cd(e)}${vo(r)}`:`#/s${vo(r)}`},fileHref(e,t={}){const r=new URLSearchParams;return t.source&&r.set("src","1"),t.line&&r.set("hl",String(t.line)),`#/file/${Cd(e)}${vo(r)}`},mapHref(e={}){const t=new URLSearchParams;return e.root!==void 0&&e.root!==null&&t.set("root",e.root),e.depth&&t.set("depth",String(e.depth)),e.tests&&t.set("tests","1"),`#/map${vo(t)}`},flowHref(e={}){const t=new URLSearchParams;return e.from&&t.set("from",e.from),e.to&&t.set("to",e.to),e.symbols&&t.set("symbols",e.symbols),e.trail&&t.set("t",e.trail),`#/flow${vo(t)}`},entryHref(){return"#/entry"},screensHref(){return"#/screens"},stepsHref(e={}){const t=new URLSearchParams;return e.anchor?t.set("anchor",e.anchor):e.symbol&&t.set("symbol",e.symbol),e.depth&&t.set("depth",String(e.depth)),e.through&&t.set("through","1"),e.view&&t.set("view",e.view),`#/steps${vo(t)}`},deadHref(e={}){const t=new URLSearchParams;return e.exported&&t.set("exported","1"),`#/dead${vo(t)}`},navigate(e,t={}){const r=e.startsWith("#")?e:`#${e}`;if(t.replace){history.replaceState(history.state,"",r),jc();return}location.hash!==r&&(location.hash=r,jc())},back(){history.back()}};let jc=()=>{};function Q_(e){jc=e}let Er=U_;function cn(e,t={}){return Er.symbolHref(e,t)}function nn(e,t={}){return Er.fileHref(e,t)}function ei(e={}){return Er.mapHref(e)}function Ho(e={}){return Er.flowHref(e)}function Pu(){return Er.entryHref()}function Kh(){return Er.screensHref()}function cr(e={}){return Er.stepsHref(e)}function Sa(e={}){return Er.deadHref(e)}function Et(e,t={}){Er.navigate(e,t)}function J_(){Er.back()}function $_(e){try{return decodeURIComponent(e)}catch{return e}}function e1(e){const t=e.get("hl");if(t===null)return null;const r=Number.parseInt(t,10);return Number.isFinite(r)&&r>0?r:null}function Yh(e){const t=e.startsWith("#")?e.slice(1):e,r=t.indexOf("?"),o=r<0?t:t.slice(0,r),s=new URLSearchParams(r<0?"":t.slice(r+1)),i=o.split("/").filter(Boolean).map($_),a=e1(s),[l,...c]=i;let f;if(l===void 0)f={view:"home"};else if(l==="s")f={view:"symbol",id:c.length>0?c.join("/"):null,line:a};else if(l==="file"&&c.length>0)f={view:"file",path:c.join("/"),line:a,source:s.get("src")==="1"};else if(l==="map"&&c.length===0){const u=s.get("root"),h=Number.parseInt(s.get("depth")??"",10);f={view:"map",root:u===null?null:u,depth:Number.isFinite(h)&&h>=1&&h<=4?h:null,tests:s.get("tests")==="1"}}else if(l==="entry"&&c.length===0)f={view:"entry"};else if(l==="screens"&&c.length===0)f={view:"screens"};else if(l==="steps"&&c.length===0){const u=Number.parseInt(s.get("depth")??"",10),h=s.get("view");f={view:"steps",anchor:s.get("anchor"),symbol:s.get("symbol"),depth:Number.isFinite(u)&&u>=1&&u<=14?u:null,through:s.get("through")==="1",reading:h==="order"||h==="tree"?h:null}}else l==="dead"&&c.length===0?f={view:"dead",exported:s.get("exported")==="1"}:l==="flow"&&c.length===0?f={view:"flow",from:s.get("from"),to:s.get("to"),symbols:s.get("symbols"),trail:s.get("t")}:f={view:"unknown",path:o};return{route:f,params:s,raw:t}}const t1=Yh(typeof location>"u"?"":location.hash);let Ma=ae(un(t1));function Ul(){const e=Yh(location.hash);e.raw!==n(Ma).raw&&L(Ma,e,!0)}typeof window<"u"&&(window.addEventListener("hashchange",Ul),window.addEventListener("popstate",Ul),Q_(Ul));const ti={get route(){return n(Ma).route},get params(){return n(Ma).params}};class Yn extends Error{status;code;guidance;constructor(t,r,o,s){super(o),this.name="ApiFailure",this.status=t,this.code=r,this.guidance=s}}function Ql(e){return e.split("/").map(encodeURIComponent).join("/")}function Wr(e){const t=e.toString();return t?`?${t}`:""}const n1="X-CodeGraph-UI";function r1(e={}){const t=e.baseUrl??"",r=e.fetch??((...a)=>globalThis.fetch(...a));async function o(a,l,c){let f;try{f=await r(`${t}${a}`,{...l,signal:c})}catch(h){throw c?.aborted?h:new Yn(0,"unreachable","The codegraph ui server is not answering.","It may have been stopped — restart it with `codegraph ui` and reload this page.")}const u=await f.json().catch(()=>null);if(!f.ok){const h=u??{};throw new Yn(f.status,h.code??"error",h.error??`The server answered ${f.status}.`,h.hint??null)}return u}function s(a,l){return o(a,{headers:{accept:"application/json"}},l)}function i(a,l,c,f){const u={accept:"application/json",[n1]:"1"};return c!==void 0&&(u["content-type"]="application/json"),o(a,{method:l,headers:u,...c===void 0?{}:{body:JSON.stringify(c)}},f)}return{stats:a=>s("api/stats",a),search(a,l={},c){const f=new URLSearchParams({q:a});return l.limit&&f.set("limit",String(l.limit)),s(`api/search${Wr(f)}`,c)},node:(a,l)=>s(`api/node/${Ql(a)}`,l),nodes(a,l){const c=new URLSearchParams;for(const f of a)c.append("id",f);return s(`api/nodes${Wr(c)}`,l)},source(a,l){const c=new URLSearchParams({file:a.file,from:String(a.from)});return a.to!==void 0&&a.to>0&&c.set("to",String(a.to)),a.ondrift&&c.set("ondrift",a.ondrift),s(`api/source${Wr(c)}`,l)},file:(a,l)=>s(`api/file/${Ql(a)}`,l),fileCode:(a,l)=>s(`api/filecode/${Ql(a)}`,l),flow(a,l){const c=new URLSearchParams;a.from&&c.set("from",a.from),a.to&&c.set("to",a.to),a.symbols&&c.set("symbols",a.symbols);for(const f of a.trail??[])c.append("hop",f);return s(`api/flow${Wr(c)}`,l)},map(a={},l){const c=new URLSearchParams;return a.root!==void 0&&a.root!==null&&c.set("root",a.root),a.depth&&c.set("depth",String(a.depth)),s(`api/map${Wr(c)}`,l)},routes(a={},l){const c=new URLSearchParams;return a.limit&&c.set("limit",String(a.limit)),s(`api/routes${Wr(c)}`,l)},screens(a){return s("api/screens",a)},entryPoints(a={},l){const c=new URLSearchParams;return a.limit&&c.set("limit",String(a.limit)),a.routes&&c.set("routes",String(a.routes)),s(`api/entrypoints${Wr(c)}`,l)},deadCode(a={},l){const c=new URLSearchParams;return a.limit&&c.set("limit",String(a.limit)),a.kinds?.length&&c.set("kinds",a.kinds.join(",")),a.includeExported&&c.set("exported","1"),a.includeTests&&c.set("tests","1"),a.includeGenerated&&c.set("generated","1"),s(`api/deadcode${Wr(c)}`,l)},trails:a=>s("api/trails",a),saveTrail:(a,l)=>i("api/trails","POST",a,l),deleteTrail:(a,l)=>i(`api/trails/${encodeURIComponent(a)}`,"DELETE",void 0,l),events(a){if(typeof EventSource>"u")return()=>{};const l=new EventSource(`${t}api/events`);return l.addEventListener("hello",c=>a.hello(ji(c))),l.addEventListener("changed",c=>a.changed(ji(c))),l.addEventListener("index",c=>a.index(ji(c))),l.addEventListener("degraded",c=>a.degraded(ji(c))),l.addEventListener("error",()=>a.error()),()=>l.close()}}}function ji(e){const t=e.data;if(typeof t!="string")return null;try{return JSON.parse(t)}catch{return null}}let Jl=null;function Qt(){return Jl===null&&(Jl=r1()),Jl}function o1(e){return Qt().stats(e)}function s1(e,t){return Qt().node(e,t)}function i1(e,t={},r){return Qt().search(e,t,r)}const $l=60;async function a1(e,t){if(e.length<=$l)return Qt().nodes(e,t);const r={items:[],missing:[]};for(let o=0;o40?`${t.slice(0,8)}…`:/^[0-9a-f]{16,}$/.test(r)?`${r.slice(0,8)}…`:r}function Rr(e){return e.map(t=>y1[t.dir]+encodeURIComponent(t.id)).join(",")}function Ou(e){if(!e)return[];const t=[];for(const r of e.split(",")){if(r.length<2)continue;const o=w1[r[0]];if(!o)continue;let s;try{s=decodeURIComponent(r.slice(1))}catch{s=r.slice(1)}s&&t.push({id:s,name:null,kind:null,dir:o})}return t}let Vt=ae(un([]));const Ta=new Map;function ec(e,t){if(!t.name&&!t.kind)return;const r=Ta.get(e)??{name:null,kind:null};t.name&&(r.name=t.name),t.kind&&(r.kind=t.kind),Ta.set(e,r)}const zt={get hops(){return n(Vt)},get current(){return n(Vt).length>0?n(Vt)[n(Vt).length-1]:null},get encoded(){return Rr(n(Vt))},push(e){ec(e.id,e);const t=n(Vt).findIndex(r=>r.id===e.id);if(t>=0){L(Vt,n(Vt).slice(0,t+1),!0);const r=n(Vt)[t];e.name&&(r.name=e.name),e.kind&&(r.kind=e.kind);return}L(Vt,[...n(Vt),{id:e.id,name:e.name??null,kind:e.kind??null,dir:e.dir??(n(Vt).length===0?"start":"down")}].slice(-64),!0)},rename(e,t){const r=n(Vt).findIndex(s=>s.id===e);if(r<0)return;ec(t.id,t);const o=n(Vt)[r];L(Vt,[...n(Vt).slice(0,r),{...o,id:t.id,name:t.name??o.name,kind:t.kind??o.kind},...n(Vt).slice(r+1)],!0)},truncateTo(e){e<0||e>=n(Vt).length||L(Vt,n(Vt).slice(0,e+1),!0)},resolve(e,t){ec(e,t);const r=n(Vt).find(o=>o.id===e);r&&(t.name&&(r.name=t.name),t.kind&&(r.kind=t.kind))},clear(){L(Vt,[],!0)},hydrate(e){const t=Ou(e);Rr(t)!==Rr(n(Vt))&&L(Vt,t.slice(-64).map(r=>{const o=Ta.get(r.id);return o?{...r,name:o.name,kind:o.kind}:r}),!0)}},Id=new Set;async function x1(){const e=n(Vt).filter(t=>!t.name&&!Ta.get(t.id)?.name&&!Id.has(t.id)).map(t=>t.id);if(e.length!==0)try{const{items:t,missing:r}=await a1(e);for(const o of t)zt.resolve(o.id,{name:o.kind==="file"?o.file:o.name,kind:o.kind});for(const o of r)Id.add(o)}catch{}}const k1={function:"ƒ",method:"m",class:"C",interface:"I",struct:"S",type_alias:"T",enum:"E",enum_member:"e",constant:"k",variable:"v",property:"p",field:"p",file:"≡",route:"R",component:"⟨⟩",namespace:"N",module:"M",trait:"Tr",union:"U",protocol:"P",parameter:"pm",import:"im",export:"ex"},Zh=new Set(["class","interface","struct","type_alias","trait","protocol","union","enum"]);function Uh(e){return e?k1[e]??e.slice(0,1).toUpperCase():""}function Qh(e){return e?e.replace(/_/g," "):"symbol"}var E1=N(" ");function Pt(e,t){Ne(t,!0);let r=Ee(t,"titled",3,!1),o=S(()=>t.kind?Uh(t.kind):""),s=S(()=>t.kind?Zh.has(t.kind):!1),i=S(()=>t.kind==="file");var a=E1();let l;var c=v(a);P(f=>{l=Ce(a,1,"k svelte-rzcbio",null,l,{filled:n(s),dashed:n(i),wide:n(o).length>1}),se(a,"title",f),se(a,"aria-hidden",r()?void 0:"true"),x(c,n(o))},[()=>r()?Qh(t.kind):void 0]),_(e,a),Ie()}var S1=N(' '),M1=N(' ',1),T1=N(' ',1),Ad=N(' '),C1=N(' ',1),N1=N(' ',1),I1=N(''),A1=N('
',1);function Jh(e,t){Ne(t,!0);let r=Ee(t,"selected",19,()=>-1),o=Ee(t,"rowRole",3,void 0),s=Ee(t,"idPrefix",3,"palette-row");function i(c,f){let u=0;for(let h=0;ht.palette.sections,c=>c.title,(c,f,u)=>{var h=A1(),d=ye(h),g=v(d),p=v(g),y=m(g,2);{var w=I=>{var C=S1(),T=v(C);P(()=>x(T,n(f).note)),_(I,C)};V(y,I=>{n(f).note&&I(w)})}var M=m(d,2);xe(M,19,()=>n(f).items,I=>I.id,(I,C,T)=>{const A=S(()=>i(n(u),n(T)));var D=I1();let j;var R=v(D);{var z=E=>{var q=M1(),O=ye(q);Pt(O,{kind:"route"});var K=m(O,2),Y=v(K),G=v(Y),U=m(Y,2),X=v(U);P(()=>{x(G,n(C).url),x(X,n(C).handler)}),_(E,q)},W=E=>{var q=T1(),O=ye(q);Pt(O,{kind:"route"});var K=m(O,2),Y=v(K),G=v(Y);P(()=>x(G,n(C).name)),_(E,q)},H=E=>{var q=C1(),O=ye(q);Pt(O,{get kind(){return n(C).row.kind}});var K=m(O,2),Y=v(K),G=v(Y),U=m(Y,2);{var X=$=>{var Z=Ad(),Q=v(Z);P(()=>x(Q,n(C).meta)),_($,Z)};V(U,$=>{n(C).meta&&$(X)})}P(()=>{se(K,"title",n(C).row.title),x(G,n(C).name)}),_(E,q)},B=E=>{var q=N1(),O=ye(q);Pt(O,{get kind(){return n(C).node.kind}});var K=m(O,2),Y=v(K);let G;var U=v(Y),X=m(Y,2);{var $=Z=>{var Q=Ad(),F=v(Q);P(()=>x(F,n(C).meta)),_(Z,Q)};V(X,Z=>{n(C).meta&&Z($)})}P(()=>{se(K,"title",n(C).node.generated?`${n(C).name} — tool-generated`:void 0),G=Ce(Y,1,"nm svelte-14dv3uy",null,G,{gen:n(C).node.generated}),x(U,n(C).name)}),_(E,q)};V(R,E=>{n(C).type==="route"?E(z):n(C).type==="flow"?E(W,1):n(C).type==="entry"?E(H,2):E(B,-1)})}var k=m(R,2),b=v(k);P(()=>{j=Ce(D,1,"row svelte-14dv3uy",null,j,{sel:n(A)===r()}),se(D,"data-palette-row",n(A)),se(D,"id",`${s()}-${n(A)}`),se(D,"role",o()),se(D,"aria-selected",o()?n(A)===r():void 0),x(b,n(C).location)}),ke("mousedown",D,E=>{E.preventDefault(),t.onpick(n(C))}),Ge("mouseenter",D,()=>t.onhover?.(n(A))),_(I,D)}),P(()=>x(p,n(f).title)),_(c,h)}),_(e,a),Ie()}mt(["mousedown"]);const P1=260,O1=80,Pd=4,L1=2,D1=30,R1=80,z1=new Set(["file","module","namespace","class","struct","interface","trait","protocol","enum","union"]),H1=new Set(["property","field","enum_member","constant","variable"]);function $h(e){switch(e.kind){case"calls":return"";case"instantiates":return"creates";case"navigates":return"navigates to";case"references":return e.valueRef?"passes as value":"uses type";default:return e.kind}}function rl(e){const t=[];for(const r of e.edges){const o=$h(r);o&&!t.includes(o)&&t.push(o)}return t}function eg(e){const t=[];for(const r of e.edges)if(r.when&&!t.includes(r.when)&&t.push(r.when),t.length===3)break;return t}function Ci(e){if(!e.synthesized)return null;const t=e.edges.find(r=>r.provenance==="heuristic");return t?.synthesizedBy??t?.via??"synthesized"}function gn(e){return e.slice(e.lastIndexOf("/")+1)}function Lu(e){const t=e.lastIndexOf(".");return t<0?e:e.slice(t+1)}function Od(e,t,r){const o=e+t.length-1,s=(g,p)=>({start:g,lines:t.slice(g-e,p-e+1)});if(t.length<=P1)return{windows:t.length>0?[s(e,o)]:[],gapsAfter:[],tailGap:0,whole:!0};const i=Math.min(o,e+O1-1),a=[[e,i]],l=[...new Set(r)].filter(g=>g>i&&g<=o).sort((g,p)=>g-p);for(const g of l)a.push([Math.max(e,g-Pd),Math.min(o,g+Pd)]);const c=[];for(const g of a){const p=c[c.length-1];p&&g[0]<=p[1]+L1?p[1]=Math.max(p[1],g[1]):c.push([...g])}const f=c.slice(0,D1),u=f.map(([g,p])=>s(g,p)),h=f.slice(0,-1).map((g,p)=>f[p+1][0]-g[1]-1),d=f[f.length-1]?.[1]??o;return{windows:u,gapsAfter:h,tailGap:Math.max(0,o-d),whole:!1}}function q1(e){const t=new Map,r=(o,s)=>{const i=t.get(o);i?i.push(s):t.set(o,[s])};for(const o of[...e.outgoing.items,...e.typesUsed])for(const s of o.edges){if(!s.line)continue;const i=$h(s);r(s.line,{ident:Lu(o.node.name),col:typeof s.col=="number"?s.col:null,targetId:o.node.id,uncertain:o.uncertain,outside:!1,title:`${i||"calls"} ${o.node.qualifiedName} — ${o.node.file}:${o.node.line}`+(s.confidence!=null?` · confidence ${s.confidence}`:"")+(s.resolvedBy?` · resolved by ${s.resolvedBy}`:"")})}for(const o of F1(e.outsideIndex))r(o.line,o.ref);return t}function j1(e){const t=new Set;for(const r of[...e.outgoing.items,...e.typesUsed])for(const o of r.lines)t.add(o);return[...t].sort((r,o)=>r-o)}function F1(e){const t=[];for(const r of e.samples){if(!r.line)continue;const o=Lu(r.name??"");/^[A-Za-z_$][\w$]*$/.test(o)&&t.push({line:r.line,ref:{ident:o,col:typeof r.col=="number"?r.col:null,targetId:null,uncertain:!1,outside:!0,title:`${r.name} is not in the index — nothing here resolves it`}})}return t}function ol(e,t){const r=new Map;for(const o of t){const s=[];if(e.forEach((a,l)=>{a.cls==="comment"||a.cls==="string"||a.text===o.ident&&s.push(l)}),s.length===0)continue;let i;if(o.col!==null){const a=o.col;i=s.find(l=>{const c=e[l];return c.col<=a&&ae[l].col>=a))}i===void 0&&(i=s.find(a=>!r.has(a))),i===void 0&&(i=s[s.length-1]),!(i===void 0||r.has(i))&&r.set(i,o)}return r}function B1(e){const t=[],r=[];for(const s of e.outgoing.items){const i={relation:s,anchor:s.lines[0]??null,lines:s.lines,words:rl(s),via:Ci(s),when:eg(s)};s.uncertain?r.push(i):t.push(i)}const o=e.outsideIndex.byKind.references??0;return{rows:t,uncertain:r,hiddenGroups:e.outgoing.total-e.outgoing.shown,outsideCalls:Math.max(0,e.outsideIndex.total-o),outsideTypeRefs:o}}function V1(e){const t=e.node.file,r=new Map,o=[],s=[];for(const a of e.incoming.items){const l={relation:a,words:rl(a),lines:a.lines,via:Ci(a),when:eg(a)};if(a.uncertain){o.push(l);continue}if(a.node.test){s.push(l);continue}const c=r.get(a.node.file);c?c.push(l):r.set(a.node.file,[l])}return{groups:[...r.entries()].map(([a,l])=>({file:a,same:a===t,rows:l})).sort((a,l)=>a.same?-1:l.same?1:a.file.localeCompare(l.file)),uncertain:o,tests:{rows:s,calls:s.reduce((a,l)=>a+l.relation.edgeCount,0),files:[...new Set(s.map(a=>a.relation.node.file))].sort()},total:e.incoming.total,hiddenGroups:e.incoming.total-e.incoming.shown}}function W1(e){return e.members.items.map(t=>({member:t,nested:t.depth>1,dimmed:H1.has(t.kind)}))}function Ld(e,t){return!(z1.has(e)&&t>R1)}function K1(e){const t=[e.kind==="type_alias"?"type":e.kind.replace(/_/g," ")];return e.async&&t.push("async"),e.static&&t.push("static"),e.abstract&&t.push("abstract"),e.visibility&&e.visibility!=="public"&&t.push(e.visibility),t.join(" · ")}function st(e,t,r=`${t}s`){return`${e} ${e===1?t:r}`}function Dd(e){const t=e.lastIndexOf("/");return t<0?"project root":e.slice(0,t)}function Fi(e){const t=[],r=new Map;for(const{row:o,path:s,file:i}of e){let a=r.get(s);a||(a={path:s,file:i,rows:[]},r.set(s,a),t.push(a)),a.rows.push(o)}return t}function tg(e){const t=`${gn(e.file)}:${e.line}`;return{id:`route:${e.routeId}`,name:e.path,method:e.method,kind:"route",meta:e.handlerId?`${e.handler} · ${t}`:`${e.handler} · not in the index`,target:e.handlerId?{type:"symbol",id:e.handlerId,name:e.handler,kind:e.handlerKind}:null,flowFrom:e.handlerId?e.handler:null,title:`${e.url} → ${e.handler} (${e.file}:${e.line}), registered at ${e.routeFile}:${e.routeLine}`}}function ng(e){return{id:`file:${e.file}`,name:gn(e.file),method:null,kind:"file",meta:`${st(e.calls,"call")} at module level · reaches ${st(e.reaches,"file")}${e.dependents===0?" · nothing imports it":""}`,target:{type:"file",path:e.file},flowFrom:null,title:e.file}}function rg(e){return{id:`test:${e.file}`,name:gn(e.file),method:null,kind:"file",meta:`exercises ${st(e.reaches,"file")} · ${st(e.refs,"reference")}`,target:{type:"file",path:e.file},flowFrom:null,title:e.file}}function og(e){return{id:`hub:${e.id}`,name:e.name,method:null,kind:e.kind,meta:`${st(e.dependents,"dependent")} · ${gn(e.file)}:${e.line}`,target:{type:"symbol",id:e.id,name:e.name,kind:e.kind},flowFrom:e.name,title:`${e.qualifiedName} — ${e.file}:${e.line}`}}function Y1(e,t){return e.shown>=e.total?`${e.shown}`:`${e.shown} of ${t?"at least ":""}${e.total}`}function X1(e){return e.length===0?"":e.length===1?e[0]:e.length===2?`${e[0]} and ${e[1]}`:`${e.slice(0,-1).join(", ")} and ${e[e.length-1]}`}function Bi(e,t,r,o,s,i,a=""){const l=Y1(o,i);return{id:e,title:t,meta:a?`${l} · ${a}`:l,note:r,groups:s,shown:o.shown,total:o.total,floor:i}}function G1(e){if(!e)return{sections:[],rows:[],empty:null};const t=[];return e.routes.routed&&e.routes.items.items.length>0&&t.push(Bi("routes","Routes",e.routes.items.items.every(r=>!r.method)?"A screen of the app — its path, and the component that renders it.":"A request from outside arrives here — the URL, and the symbol that serves it.",e.routes.items,Fi(e.routes.items.items.map(r=>({row:tg(r),path:r.routeFile,file:r.routeFile}))),!1,X1(e.frameworks))),e.files.items.length>0&&t.push(Bi("files","Top-level files with calls","Statements at the top level of the file — a CLI, a worker entry, a script.",e.files,Fi(e.files.items.map(r=>({row:ng(r),path:Dd(r.file),file:null}))),!0)),e.tests.items.length>0&&t.push(Bi("tests","Tests","What already exercises this code, widest reach first.",e.tests,Fi(e.tests.items.map(r=>({row:rg(r),path:Dd(r.file),file:null}))),!1)),e.hubs.items.length>0&&t.push(Bi("hubs","Most depended on","Not where the project starts — where a change radiates furthest.",e.hubs,Fi(e.hubs.items.map(r=>({row:og(r),path:r.file,file:r.file}))),!0)),{sections:t,rows:t.flatMap(r=>r.groups.flatMap(o=>o.rows)),empty:t.length===0?"This index has no routes, no file that runs anything at module level, no test that reaches outside itself, and nothing depended on yet.":null}}function Z1(e,t,r){const o=t.trim().toLowerCase();if(!e||o==="")return[];const s=[["route",e.routes.routed?e.routes.items.items.map(tg):[]],["file",e.files.items.map(ng)],["test",e.tests.items.map(rg)],["hub",e.hubs.items.map(og)]],i=[];for(const[a,l]of s)for(const c of l){if(i.length>=r)return i;`${c.method??""} ${c.name} ${c.meta} ${c.title}`.toLowerCase().includes(o)&&i.push({row:c,origin:a})}return i}function U1(e){switch(e){case"route":return"route";case"file":return"runs at module level";case"test":return"test";case"hub":return"depended on"}}function Rd(e,t){const r=e.trim(),o=t.trim();return!r||!o||r.toLowerCase()===o.toLowerCase()?null:{from:r,to:o}}const Q1=/^\s*(?:how\s+(?:does|do|would|can)\s+)?([\w$.]+)\s+(?:reach|reaches|call|calls|hit|hits|get\s+to|end\s+up\s+(?:in|at))\s+([\w$.]+)\s*\??\s*$/i,J1=/^\s*([\w$.]+)\s*(?:->|→|=>)\s*([\w$.]+)\s*\??\s*$/;function zd(e){const t=e.lastIndexOf(".");return t<0?e:e.slice(t+1)}function sg(e){const t=Q1.exec(e)??J1.exec(e);if(!t)return null;const r=zd(t[1]),o=zd(t[2]);return!r||!o||r===o?null:{from:r,to:o}}function $1(e,t){const r=e.replace(/_/g," "),o=r.endsWith("s")?`${r}es`:`${r}s`,s=t===1?r:o;return s.charAt(0).toUpperCase()+s.slice(1)}function ey(e){if(e.kind!=="file")return`${gn(e.file)}:${e.line}`;const t=e.file.lastIndexOf("/");return t<0?"project root":e.file.slice(0,t)}function ca(e,t=""){return{type:"symbol",id:e.id,node:e,name:e.kind==="file"?gn(e.file):e.name,meta:t||ty(e),location:ey(e)}}function ty(e){if(!e.signature)return"";const t=e.signature.replace(/\s+/g," ").trim();return t.length>72?`${t.slice(0,71)}…`:t}function ny(e,t){const r=[],o=new Set;for(let s=0;s1?ny(e[0]?.results.items??[],e[1]?.results.items??[]):e[0]?.results.items??[],s=ry(o);if(t&&s.unshift({title:"Flow",note:"The call path between them, one card per hop.",items:[{type:"flow",id:`flow:${t.from}:${t.to}`,from:t.from,to:t.to,name:`${t.from} → ${t.to}`,meta:"",location:"read as a flow"}]}),r){const l=new Set(o.map(f=>f.id)),c=Z1(r.entries,r.query,r.entryRows).filter(f=>!(f.row.target?.type==="symbol"&&l.has(f.row.target.id)));c.length>0&&s.push({title:"Entry points",note:"Where a flow starts — routes, files that run something, tests.",items:c.map(({row:f,origin:u})=>({type:"entry",id:`entry:${f.id}`,row:f,name:f.method?`${f.method} ${f.name}`:f.name,meta:f.meta,location:U1(u)}))})}const i=s.flatMap(l=>l.items),a=t?`Reading the path from ${t.from} to ${t.to}. Below it, what each name matches.`:null;return{sections:s,items:i,hint:a,empty:i.length===0?"No symbol or file in the index matches that.":null}}function ig(e,t={}){if(!e)return{sections:[],items:[],hint:null,empty:null};const r=t.perSection??Number.POSITIVE_INFINITY,o=i=>Number.isFinite(r)?i.slice(0,r):[...i],s=[];return e.routes.routed&&e.routes.items.items.length>0&&s.push({title:"Routes",note:e.routes.items.items.every(i=>!i.method)?"A screen of the app.":"A request from outside arrives here.",items:o(e.routes.items.items).map(i=>({type:"route",id:`route:${i.routeId}`,url:i.url,handler:i.handler,location:`${gn(i.file)}:${i.line}`,nodeId:i.handlerId}))}),e.files.items.length>0&&s.push({title:"Files that run something",note:"Statements at the top level of the file — a CLI, a worker entry, a script.",items:o(e.files.items).map(i=>ca(i,`${st(i.calls,"call")} at module level · reaches ${st(i.reaches,"file")}`))}),e.tests.items.length>0&&s.push({title:"Tests",note:"What already exercises this code, widest reach first.",items:o(e.tests.items).map(i=>ca(i,`exercises ${st(i.reaches,"file")}`))}),e.hubs.items.length>0&&s.push({title:"Most depended on",note:"The symbols a change radiates furthest from.",items:o(e.hubs.items).map(i=>ca(i,`${st(i.dependents,"dependent")}`))}),{sections:s,items:s.flatMap(i=>i.items),hint:null,empty:s.length===0?"This index has no routes, no file that runs anything, no test that reaches outside itself, and nothing depended on yet.":null}}function sy(e,t,r){return r===0?0:((e+t)%r+r)%r}const iy=40,ay=24,ly=6,cy=200,uy=6,dy=90;let $r=ae(""),Vi=ae(!1),ho=ae(0),Zo=ae(!1),ui=ae(null),di=ae(un([])),fi=ae(null),ag=ae(!1),Bc=ae(null),Vc=null,Uo=null,ni=0,Gs=null;function tc(){return Gs||(Gs=l1({limit:ay,routes:cy}).then(e=>{L(fi,e,!0),L(Bc,null)}).catch(e=>{L(fi,null),L(Bc,e instanceof Error?e.message:String(e),!0)}).finally(()=>{L(ag,!0)}),Gs)}function lg(){Uo!==null&&(clearTimeout(Uo),Uo=null),Vc?.abort(),Vc=null}async function fy(e,t){const r=sg(e),o=new AbortController;Vc=o,L(Zo,!0);try{const s=r?[r.from,r.to]:[e],i=await Promise.all(s.map(a=>i1(a,{limit:iy},o.signal)));if(t!==ni)return;L(di,i,!0),L(ui,null)}catch(s){if(o.signal.aborted||t!==ni)return;L(di,[],!0),L(ui,s instanceof Error?s.message:String(s),!0)}finally{t===ni&&L(Zo,!1)}}function vy(e){lg();const t=ni+=1;if(e.trim()===""){L(di,[],!0),L(ui,null),L(Zo,!1);return}Uo=setTimeout(()=>{Uo=null,fy(e,t)},dy)}function nc(){return n($r).trim()===""?ig(n(fi),{perSection:ly}):oy(n(di),sg(n($r)),{entries:n(fi),query:n($r),entryRows:uy})}const yt={get query(){return n($r)},set query(e){e!==n($r)&&(L($r,e,!0),L(ho,0),vy(e))},get open(){return n(Vi)},get loading(){return n(Zo)},get failure(){return n(ui)},get view(){return nc()},get selected(){return n(ho)},get selectedItem(){const e=nc().items;return e[Math.min(n(ho),e.length-1)]??null},get pending(){return n($r).trim()!==""&&(n(Zo)||Uo!==null)},show(){L(Vi,!0),tc()},hide(){L(Vi,!1)},select(e){L(ho,e,!0)},move(e){L(ho,sy(n(ho),e,nc().items.length),!0)},reset(){lg(),ni+=1,L($r,""),L(di,[],!0),L(ui,null),L(Zo,!1),L(ho,0),L(Vi,!1)},ensureEntries:tc,reloadEntries(){return Gs=null,tc()},get entries(){return n(fi)},get entriesSettled(){return n(ag)},get entriesFailure(){return n(Bc)}};var hy=N('

'),Hd=N('

'),gy=N('

Searching…

'),py=N('
');function my(e,t){Ne(t,!0);let r=ae(null),o=S(()=>yt.view);et(()=>{const d=yt.selected;if(!n(r))return;n(r).querySelector(`[data-palette-row="${d}"]`)?.scrollIntoView({block:"nearest"})});var s=py(),i=v(s);{var a=d=>{var g=hy(),p=v(g);P(()=>x(p,n(o).hint)),_(d,g)};V(i,d=>{n(o).hint&&d(a)})}var l=m(i,2);Jh(l,{get palette(){return n(o)},get selected(){return yt.selected},rowRole:"option",get onpick(){return t.onpick},onhover:d=>yt.select(d)});var c=m(l,2);{var f=d=>{var g=Hd(),p=v(g);P(()=>x(p,yt.failure)),_(d,g)},u=d=>{var g=gy();_(d,g)},h=d=>{var g=Hd(),p=v(g);P(()=>x(p,n(o).empty)),_(d,g)};V(c,d=>{yt.failure?d(f):yt.pending&&n(o).items.length===0?d(u,1):n(o).empty&&d(h,2)})}Wt(s,d=>L(r,d),()=>n(r)),_(e,s),Ie()}function hr(e,t,r){zt.push({id:e.id,name:e.name??null,kind:e.kind??null,dir:t});const o=cn(e.id,{trail:Rr(zt.hops),...r?{line:r}:{}});Et(o)}function _y(){const e=zt.hops;if(e.length<2)return null;const t=e[e.length-1],r=e[e.length-2];return!t||!r?null:t.dir==="down"?{id:r.id,rail:"left"}:t.dir==="up"?{id:r.id,rail:"right"}:null}function Du(e){if(e){if(e.type==="file"){Et(nn(e.path));return}hr({id:e.id,name:e.name,kind:e.kind},"start")}}var yy=N('');function wy(e,t){Ne(t,!0);let r=Ee(t,"placeholder",3,"Search a symbol or file, or ask “how does execute reach getFile” — press / to focus"),o=Ee(t,"label",3,"Search symbols and files"),s=ae(null),i=ae(null);function a(){n(s)?.focus(),n(s)?.select(),yt.show()}function l(y){if(yt.reset(),n(s)?.blur(),t.onpick){t.onpick(y);return}if(y.type==="flow"){Et(Ho({from:y.from,to:y.to}));return}if(y.type==="entry"){y.row.target&&Du(y.row.target);return}const w=y.type==="route"?y.nodeId:y.id;if(w){if(y.type==="symbol"&&y.node.kind==="file"){Et(nn(y.node.file));return}hr(y.type==="route"?{id:w,name:y.handler,kind:null}:{id:w,name:y.node.name,kind:y.node.kind},"start")}}function c(y){if(y.key==="Escape"){y.preventDefault(),yt.hide(),n(s)?.blur();return}if(!yt.open){y.key!=="Tab"&&yt.show();return}switch(y.key){case"ArrowDown":y.preventDefault(),yt.move(1);break;case"ArrowUp":y.preventDefault(),yt.move(-1);break;case"Enter":{y.preventDefault();const w=yt.selectedItem;w&&l(w);break}}}function f(y){if(!yt.open)return;const w=y.target;w instanceof Node&&n(i)?.contains(w)||yt.hide()}var u={focus:a,pick:l},h=yy();Ge("pointerdown",fn,f);var d=v(h);Wt(d,y=>L(s,y),()=>n(s));var g=m(d,2);{var p=y=>{my(y,{onpick:l})};V(g,y=>{yt.open&&y(p)})}return Wt(h,y=>L(i,y),()=>n(i)),P(()=>{se(d,"placeholder",r()),se(d,"aria-label",o()),se(d,"aria-expanded",yt.open),se(d,"aria-activedescendant",yt.open?`palette-row-${yt.selected}`:void 0)}),ke("keydown",d,c),Ge("focus",d,()=>yt.show()),Iu(d,()=>yt.query,y=>yt.query=y),_(e,h),Ie(u)}mt(["keydown"]);const qd=[1e3,2e3,4e3,8e3,15e3,3e4],by=8;let Wc=ae(!1),vi=ae(!1),Kc=ae(null),cg=ae(null),is=ae(0),as=ae(0),ug=ae(null),Ru=ae(null),Ko=null,Wi=null,Yo=0,jd=!1,dg=!1,Yc=!1,Xc=!1;function zu(){return typeof document<"u"&&document.visibilityState==="hidden"}function fg(e){if(L(ug,e,!0),zu()){Yc=!0;return}L(is,n(is)+1)}function vg(e){if(L(Ru,e,!0),zu()){Xc=!0;return}L(as,n(as)+1)}function xy(){Yc&&(Yc=!1,L(is,n(is)+1)),Xc&&(Xc=!1,L(as,n(as)+1))}function ua(){if(Ko!==null)return;Wi!==null&&(clearTimeout(Wi),Wi=null),L(vi,!1);const e=Qt().events;if(!e){dg=!0;return}Ko=e({hello(t){const r=t;r&&(Yo=0,L(Wc,!0),L(cg,r.watching,!0),L(Kc,r.degraded,!0))},changed(t){const r=t;r&&vg(r)},index(t){const r=t;r&&fg(r)},degraded(t){const r=t;r&&L(Kc,r.reason,!0)},error(){L(Wc,!1);const t=Ko;if(Ko=null,t?.(),Yo+=1,Yo>=by){L(vi,!0);return}const r=qd[Math.min(Yo-1,qd.length-1)]??3e4;Wi=setTimeout(ua,r)}})}function ky(){jd||typeof window>"u"||(jd=!0,document.addEventListener("visibilitychange",()=>{zu()||(xy(),n(vi)&&(Yo=0,ua()))}),window.addEventListener("focus",()=>{n(vi)&&(Yo=0,ua())}),window.addEventListener("pagehide",()=>{Ko?.(),Ko=null}),ua())}const Rn={get connected(){return n(Wc)},get stopped(){return n(vi)},get degraded(){return n(Kc)},get watching(){return n(cg)},get indexTick(){return n(is)},get diskTick(){return n(as)},get lastIndex(){return n(ug)},get lastChanged(){return n(Ru)},get unsupported(){return dg},start:ky,signal(e,t={}){if(e==="index"){fg({type:"index",index:t.index??{lastIndexedAt:null,files:0},files:t.files??[],total:t.total??t.files?.length??0,truncated:t.truncated??!1,at:t.at??0});return}vg({type:"changed",files:t.files??[],total:t.total??t.files?.length??0,truncated:t.truncated??!1,scan:t.scan??(t.files===void 0||t.files.length===0),at:t.at??0})}};function Ey(e){const t=n(Ru);return t?t.scan||t.truncated?!0:e===null?!1:t.files.includes(e):!1}function Hu(e,t){let r=n(is),o=n(as);et(()=>{const s=Rn.indexTick,i=Rn.diskTick,a=e();Ut(()=>{if(s!==r){r=s,o=i,t("index");return}i!==o&&(o=i,Ey(a)&&t("disk"))})})}var Sy=N("Screens"),My=N(' '),Ty=N(' '),Cy=N(' '),Ny=N('
CodeGraph ui
');function Iy(e,t){Ne(t,!0);let r=Ee(t,"project",3,null),o=Ee(t,"stats",3,null),s=Ee(t,"showScreens",3,!1),i=ae(null),a=S(()=>ti.route.view),l=S(()=>{const Y=ti.route;if(Y.view==="symbol"&&Y.id!==null)return cn(Y.id);const G=zt.current;return cn(G?G.id:null)});function c(){n(i)?.focus()}let f=S(()=>Rn.degraded!==null?{text:"Live updates off",title:`${Rn.degraded} This page no longer refreshes itself — reload it after a sync.`}:Rn.stopped?{text:"Not live",title:"Lost the connection to codegraph ui and stopped retrying. Focus this tab to try again, or reload the page."}:null);var u={focusSearch:c},h=Ny(),d=m(v(h),2),g=v(d);{var p=Y=>{var G=Sy();let U;P(X=>{se(G,"href",X),U=Ce(G,1,"svelte-1h259us",null,U,{active:n(a)==="screens"||n(a)==="home"})},[()=>Kh()]),_(Y,G)};V(g,Y=>{s()&&Y(p)})}var y=m(g,2);let w;var M=m(y,2);let I;var C=m(M,2);let T;var A=m(C,2);let D;var j=m(A,2);let R;var z=m(j,2);let W;var H=m(d,2);Wt(wy(H,{}),Y=>L(i,Y,!0),()=>n(i));var B=m(H,2),k=v(B);{var b=Y=>{var G=My(),U=v(G);P(()=>{se(G,"title",n(f).title),x(U,n(f).text)}),_(Y,G)};V(k,Y=>{n(f)&&Y(b)})}var E=m(k,2);{var q=Y=>{var G=Ty(),U=v(G);P(()=>x(U,r())),_(Y,G)};V(E,Y=>{r()&&Y(q)})}var O=m(E,2);{var K=Y=>{var G=Cy(),U=v(G);P(()=>x(U,o())),_(Y,G)};V(O,Y=>{o()&&Y(K)})}return P((Y,G,U,X,$)=>{se(y,"href",Y),w=Ce(y,1,"svelte-1h259us",null,w,{active:n(a)==="steps"}),se(M,"href",G),I=Ce(M,1,"svelte-1h259us",null,I,{active:n(a)==="entry"}),se(C,"href",U),T=Ce(C,1,"svelte-1h259us",null,T,{active:n(a)==="map"}),se(A,"href",n(l)),D=Ce(A,1,"svelte-1h259us",null,D,{active:n(a)==="symbol"||n(a)==="home"&&!s()}),se(j,"href",X),R=Ce(j,1,"svelte-1h259us",null,R,{active:n(a)==="flow"}),se(z,"href",$),W=Ce(z,1,"svelte-1h259us",null,W,{active:n(a)==="dead"})},[()=>cr(),()=>Pu(),()=>ei(),()=>Ho(),()=>Sa()]),_(e,h),Ie(u)}let ar=ae(null),qu=ae(!1),yo=ae(null),Os=ae(!1),Xo=null;function Fd(){return Xo||(Xo=p1().then(e=>{L(ar,e,!0),L(yo,null)}).catch(e=>{L(ar,null),L(yo,e instanceof Error?e.message:String(e),!0)}).finally(()=>{L(qu,!0)}),Xo)}function Bd(e){L(ar,e,!0),L(yo,null),L(qu,!0),Xo=Promise.resolve()}const Rt={get list(){return n(ar)?.trails??[]},get payload(){return n(ar)},get settled(){return n(qu)},get failure(){return n(yo)},get busy(){return n(Os)},get canSave(){return Nd()?n(ar)===null||!n(ar).readOnly:!1},get readOnlyReason(){return n(ar)?.readOnly?n(ar).readOnlyReason??"This viewer is running read-only.":Nd()?null:"This viewer cannot save trails."},get directory(){return n(ar)?.directory??null},ensure:Fd,reload(){return Xo=null,Fd()},async save(e,t,r){L(Os,!0);try{const o=await m1({name:e,note:t,hops:r.map(s=>({dir:s.dir,id:s.id}))});return Bd(o),o.saved??null}catch(o){return L(yo,o instanceof Error?o.message:String(o),!0),null}finally{L(Os,!1)}},async remove(e){L(Os,!0);try{return Bd(await _1(e)),!0}catch(t){return L(yo,t instanceof Error?t.message:String(t),!0),!1}finally{L(Os,!1)}},clearFailure(){L(yo,null)}},Ay=3;function Py(e){const t=st(e.hops.length,"hop");return e.author?`${t} · ${e.author}`:t}function Oy(e){const t=e.hops.filter(s=>s.status==="missing"),r=e.hops.filter(s=>s.status==="ambiguous"),o=e.hops.filter(s=>s.status==="moved");return t.length>0?{tone:"warn",text:`${st(t.length,"hop")} moved or renamed since this was saved — ${oc(t)} no longer in the index.`}:r.length>0?{tone:"warn",text:`${oc(r)} now ${r.length===1?"names":"name"} more than one symbol — showing the closest match.`}:o.length>0?{tone:"note",text:`${oc(o)} moved to another file since this was saved.`}:null}function Ly(e){if(e.encoded===null)return"None of this trail resolves in the current index.";if(e.openCount===e.hops.length)return null;const t=e.openFrom+e.openCount-1;return`Opens ${e.openCount===1?`hop ${e.openFrom}`:`hops ${e.openFrom}–${t}`} of ${e.hops.length}.`}function rc(e){return e.encoded!==null&&e.openId!==null}function Dy(e){const t=e.hops.map((o,s)=>s===0?o.name:`${Ry(o)} ${o.name}`).join(" "),r=e.updatedAt?` — saved ${e.updatedAt.slice(0,10)}`:"";return`${t}${r}`}function Ry(e){return e.dir==="up"?"←":e.dir==="down"?"→":"·"}function oc(e){const t=e.slice(0,Ay).map(s=>s.name),r=e.length-t.length,o=t.length===1?t[0]:`${t.slice(0,-1).join(", ")} and ${t[t.length-1]}`;return r>0?`${o} and ${r} more`:o}function zy(e,t){const r=e.trim();return r===""?"Give the trail a name.":r.length>t?`That name is too long (max ${t} characters).`:null}function Hy(e,t){const r=e.trim().replace(/\s+/g," ");return t.find(o=>o.name===r)??null}function qy(e){return`${JSON.stringify({version:1,id:e.id,name:e.name,note:e.note,author:e.author,createdAt:e.createdAt,updatedAt:e.updatedAt,hops:e.hops.map(t=>({dir:t.dir,name:t.name,qualifiedName:t.qualifiedName,kind:t.kind,file:t.savedFile,line:t.savedLine,id:t.id??""}))},null,2)} -`}const jy=2600;let Ca=ae(null),wo=null;function Fy(e){wo!==null&&clearTimeout(wo),L(Ca,e,!0),wo=setTimeout(()=>{L(Ca,null),wo=null},jy)}function By(){wo!==null&&clearTimeout(wo),wo=null,L(Ca,null)}const no={get message(){return n(Ca)},show:Fy,clear:By};var Vy=N(`Step into a call on the right, or up to a caller on the left — the trail records the - path.`),Wy=N(''),Ky=N(' ',1),Yy=N(''),Xy=N(''),Gy=N(''),Zy=N(' '),Uy=N('
'),Qy=N('
Trail
');function Jy(e,t){Ne(t,!0);const r=120;let o=S(()=>zt.hops),s=ae(!1),i=ae(""),a=ae(null);et(()=>{n(s)&&Rt.ensure()});let l=S(()=>zy(n(i),r)),c=S(()=>n(s)?Hy(n(i),Rt.list):null);function f(){Rt.clearFailure(),L(s,!0),L(i,zt.current?.name??"",!0),queueMicrotask(()=>{n(a)?.focus(),n(a)?.select()})}function u(){L(s,!1),L(i,"")}async function h(k){if(k.preventDefault(),n(l)||Rt.busy)return;const b=n(c)!==null;await Rt.save(n(i),"",n(o))!==null&&(no.show(b?`Trail replaced · ${n(i).trim()}`:`Trail saved · ${n(i).trim()}`),u())}function d(k){k.key==="Escape"&&(k.preventDefault(),k.stopPropagation(),u())}function g(k){const b=n(o)[k];b&&(zt.truncateTo(k),Et(cn(b.id,{trail:Rr(zt.hops)})))}function p(){Et(Ho({trail:Rr(n(o))}))}function y(){const k=zt.current;if(zt.clear(),!k){Et("#/");return}zt.push({id:k.id,name:k.name,kind:k.kind,dir:"start"}),Et(cn(k.id,{trail:Rr(zt.hops)}),{replace:!0})}var w=Qy(),M=v(w),I=m(v(M),2);{var C=k=>{var b=Vy();_(k,b)},T=k=>{var b=St(),E=ye(b);xe(E,19,()=>n(o),q=>q.id,(q,O,K)=>{var Y=Ky(),G=ye(Y);{var U=J=>{var te=Wy();let ie;var ge=v(te);P(()=>{ie=Ce(te,1,"hop-arrow svelte-rju47z",null,ie,{up:n(O).dir==="up"}),se(te,"title",n(O).dir==="up"?"stepped up to a caller":n(O).dir==="down"?"stepped down into a call":"jumped here"),x(ge,n(O).dir==="up"?"←":n(O).dir==="down"?"→":"·")}),_(J,te)};V(G,J=>{n(K)>0&&J(U)})}var X=m(G,2);let $;var Z=v(X);Pt(Z,{get kind(){return n(O).kind}});var Q=m(Z,2),F=v(Q);P(J=>{$=Ce(X,1,"hop svelte-rju47z",null,$,{cur:n(K)===n(o).length-1}),se(X,"aria-current",n(K)===n(o).length-1?"true":void 0),x(F,J)},[()=>b1(n(O))]),ke("click",X,()=>g(n(K))),_(q,Y)}),_(k,b)};V(I,k=>{n(o).length===0?k(C):k(T,-1)})}var A=m(I,4);{var D=k=>{var b=Yy();ke("click",b,p),_(k,b)};V(A,k=>{n(o).length>1&&k(D)})}var j=m(A,2);{var R=k=>{var b=Xy();ke("click",b,f),_(k,b)};V(j,k=>{n(o).length>0&&Rt.canSave&&!n(s)&&k(R)})}var z=m(j,2);{var W=k=>{var b=Gy();ke("click",b,y),_(k,b)};V(z,k=>{n(o).length>0&&k(W)})}var H=m(M,2);{var B=k=>{var b=Uy(),E=m(v(b),2);se(E,"maxlength",r),Wt(E,J=>L(a,J),()=>n(a));var q=m(E,2),O=v(q),K=m(q,2),Y=m(K,2);let G;var U=v(Y);{var X=J=>{var te=wt("Replaces the saved trail of the same name.");_(J,te)},$=J=>{var te=wt();P(()=>x(te,`${n(o).length??""} hop${n(o).length===1?"":"s"} · saved to ${Rt.directory??""}`)),_(J,te)},Z=J=>{var te=wt();P(()=>x(te,`${n(o).length??""} hop${n(o).length===1?"":"s"}`)),_(J,te)};V(U,J=>{n(c)?J(X):Rt.directory?J($,1):J(Z,-1)})}var Q=m(Y,2);{var F=J=>{var te=Zy(),ie=v(te);P(()=>x(ie,Rt.failure)),_(J,te)};V(Q,J=>{Rt.failure&&J(F)})}P(()=>{q.disabled=n(l)!==null||Rt.busy,x(O,Rt.busy?"Saving…":n(c)?"Replace":"Save"),G=Ce(Y,1,"hint svelte-rju47z",null,G,{warn:n(c)!==null})}),Ge("submit",b,h),ke("keydown",E,d),Iu(E,()=>n(i),J=>L(i,J)),ke("click",K,u),_(k,b)};V(H,k=>{n(s)&&k(B)})}_(e,w),Ie()}mt(["click","keydown"]);var $y=N(' '),e0=N('

'),t0=N('

Reading saved trails…

'),n0=N("
",1),r0=N('

No saved trails yet. Walk a path through the code, then press Save trail on the trail bar to keep it.

'),o0=N(' '),s0=N(''),i0=N("

"),a0=N('
'),l0=N('

Only the first trails in the directory are listed.

'),c0=N('
',1),u0=N('

');function hg(e,t){Ne(t,!0);let r=Ee(t,"title",3,"Saved trails"),o=Ee(t,"hideWhenEmpty",3,!0);et(()=>{Rt.ensure()});let s=ae(null),i=S(()=>Rt.list);function a(d){if(!rc(d))return;const g=Ou(d.encoded);zt.clear();const p=d.hops.filter(y=>y.id!==null);for(const y of g){const w=p.find(M=>M.id===y.id);zt.push({id:y.id,name:w?.name??null,kind:w?.kind??null,dir:y.dir})}Et(cn(d.openId,{trail:d.encoded}))}async function l(d){if(n(s)!==d.id){L(s,d.id,!0);return}L(s,null),await Rt.remove(d.id)}function c(d){const g=new Blob([qy(d)],{type:"application/json"}),p=URL.createObjectURL(g),y=document.createElement("a");y.href=p,y.download=`${d.id}.json`,y.click(),URL.revokeObjectURL(p)}var f=St(),u=ye(f);{var h=d=>{var g=u0(),p=v(g),y=v(p),w=v(y),M=m(y,2);{var I=R=>{var z=$y(),W=v(z);P(()=>x(W,Rt.directory)),_(R,z)};V(M,R=>{Rt.directory&&R(I)})}var C=m(p,2);{var T=R=>{var z=e0(),W=v(z);P(()=>x(W,Rt.failure)),_(R,z)},A=R=>{var z=t0();_(R,z)},D=R=>{var z=r0(),W=m(v(z),3);{var H=B=>{var k=n0(),b=m(ye(k),1,!0);P(()=>x(b,Rt.readOnlyReason)),_(B,k)};V(W,B=>{Rt.readOnlyReason&&B(H)})}_(R,z)},j=R=>{var z=c0(),W=ye(z);xe(W,21,()=>n(i),k=>k.id,(k,b)=>{const E=S(()=>Oy(n(b))),q=S(()=>Ly(n(b)));var O=a0();let K;var Y=v(O),G=v(Y);{let ue=S(()=>n(b).hops[0]?.kind??null);Pt(G,{get kind(){return n(ue)}})}var U=m(G,2),X=v(U),$=v(X),Z=m(X,2);{var Q=ue=>{var ne=o0(),fe=v(ne);P(()=>x(fe,n(b).note)),_(ue,ne)};V(Z,ue=>{n(b).note&&ue(Q)})}var F=m(U,2),J=v(F),te=m(Y,2),ie=v(te),ge=m(ie,2);{var ve=ue=>{var ne=s0();let fe;var he=v(ne);P(()=>{fe=Ce(ne,1,"act svelte-1gyfjc6",null,fe,{armed:n(s)===n(b).id}),ne.disabled=Rt.busy,x(he,n(s)===n(b).id?"Delete?":"Delete")}),ke("click",ne,()=>l(n(b))),Ge("blur",ne,()=>L(s,n(s)===n(b).id?null:n(s),!0)),_(ue,ne)};V(ge,ue=>{Rt.canSave&&ue(ve)})}var re=m(te,2);{var ee=ue=>{var ne=i0();let fe;var he=v(ne);P(ce=>{fe=Ce(ne,1,"decay svelte-1gyfjc6",null,fe,{warn:n(E)?.tone==="warn"}),x(he,ce)},[()=>[n(E)?.text,n(q)].filter(Boolean).join(" ")]),_(ue,ne)};V(re,ue=>{(n(E)||n(q))&&ue(ee)})}P((ue,ne,fe,he)=>{K=Ce(O,1,"row svelte-1gyfjc6",null,K,ue),se(Y,"title",ne),Y.disabled=fe,x($,n(b).name),x(J,he)},[()=>({dead:!rc(n(b))}),()=>Dy(n(b)),()=>!rc(n(b)),()=>Py(n(b))]),ke("click",Y,()=>a(n(b))),ke("click",ie,()=>c(n(b))),_(k,O)});var H=m(W,2);{var B=k=>{var b=l0();_(k,b)};V(H,k=>{Rt.payload?.bounded&&k(B)})}_(R,z)};V(C,R=>{Rt.failure?R(T):Rt.settled?n(i).length===0?R(D,2):R(j,-1):R(A,1)})}P(()=>{se(g,"aria-label",r()),x(w,r())}),_(d,g)};V(u,d=>{o()&&n(i).length===0&&Rt.failure===null||d(h)})}_(e,f),Ie()}mt(["click"]);var d0=N('

Where to start

All entry points ›
'),f0=N(`

Nothing selected

/ to focus the search box.

Every symbol you open shows who calls it on the left, its verbatim source in the middle, and - what it calls on the right — each callee lined up with the line that makes the call.

`);function v0(e,t){Ne(t,!0);let r=Ee(t,"project",3,null);et(()=>{yt.ensureEntries()});let o=S(()=>ig(yt.entries));function s(g){if(g.type==="flow"){Et(Ho({from:g.from,to:g.to}));return}if(g.type==="entry"){Du(g.row.target);return}const p=g.type==="route"?g.nodeId:g.id;if(p){if(g.type==="symbol"&&g.node.kind==="file"){Et(nn(g.node.file));return}hr(g.type==="route"?{id:p,name:g.handler,kind:null}:{id:p,name:g.node.name,kind:g.node.kind},"start")}}var i=f0(),a=v(i),l=m(v(a),2),c=v(l),f=m(a,2),u=v(f);hg(u,{});var h=m(f,2);{var d=g=>{var p=d0(),y=v(p),w=m(v(y),2),M=m(y,2),I=v(M);Jh(I,{get palette(){return n(o)},onpick:s}),P(C=>se(w,"href",C),[()=>Pu()]),_(g,p)};V(h,g=>{n(o).sections.length>0&&g(d)})}P(()=>x(c,`Search for a symbol or a file to start reading${r()?` in ${r()}`:""}. Press `)),_(e,i),Ie()}let Ls=ae(null),Ds=ae("right"),Kr=ae(-1);const kt={get target(){return n(Ls)},is(e){return e!=null&&n(Ls)===e},set(e){L(Ls,e,!0)},clear(e){(e==null||n(Ls)===e)&&L(Ls,null)}},Hn={get rail(){return n(Ds)},get index(){return n(Kr)},at(e,t){return n(Ds)===e&&n(Kr)===t},move(e,t){L(Ds,e,!0),L(Kr,t,!0)},step(e,t){t!==0&&L(Kr,Math.max(0,Math.min(t-1,n(Kr)+e)),!0)},switchTo(e){L(Ds,e,!0),n(Kr)<0&&L(Kr,0)},reset(){L(Ds,"right"),L(Kr,-1)}};var h0=N(' '),Vd=N(" "),g0=N(' '),p0=N(' '),m0=N(' '),_0=N('
'),y0=N('
'),w0=N('
Uncertain
'),b0=N('
'),x0=N(" .",1),k0=N("
",1),E0=N("
"),S0=N('
Calls step down →
',1);function M0(e,t){Ne(t,!0);function r(p){return`${p.relation.node.qualifiedName} — ${p.relation.node.file}:${p.relation.node.line}`}var o=S0(),s=ye(o),i=v(s),a=m(v(i)),l=v(a),c=m(s,2);xe(c,19,()=>t.model.rows,p=>p.relation.node.id,(p,y,w)=>{const M=S(()=>n(y).relation.node);var I=_0();let C,T;var A=v(I);Pt(A,{get kind(){return n(M).kind}});var D=m(A,2),j=v(D),R=v(j),z=m(R);{var W=U=>{var X=h0(),$=v(X);P(()=>x($,`×${n(y).lines.length??""}`)),_(U,X)};V(z,U=>{n(y).lines.length>1&&U(W)})}var H=m(j,2),B=v(H),k=v(B),b=m(B,2);{var E=U=>{var X=Vd(),$=v(X);P(Z=>x($,Z),[()=>n(y).words.join(", ")]),_(U,X)};V(b,U=>{n(y).words.length>0&&U(E)})}var q=m(b,2);{var O=U=>{var X=g0(),$=v(X);P(()=>x($,`hub · ${n(y).relation.fanIn??""}`)),_(U,X)};V(q,U=>{n(y).relation.hub&&U(O)})}var K=m(q,2);{var Y=U=>{var X=p0(),$=v(X);P(()=>x($,`via ${n(y).via??""}`)),_(U,X)};V(K,U=>{n(y).via&&U(Y)})}var G=m(K,2);xe(G,16,()=>n(y).when,U=>U,(U,X)=>{var $=m0(),Z=v($);P(()=>x(Z,`when ${X??""}`)),_(U,$)}),P((U,X)=>{C=Ce(I,1,"rrow svelte-esi3sb",null,C,U),se(I,"data-target",n(M).id),se(I,"title",X),T=nt(I,"",T,{top:`${t.tops[n(w)]??0}px`}),x(R,n(M).name),x(k,n(M).file===t.focalFile?"same file":n(M).file)},[()=>({origin:n(M).id===t.originId,hot:kt.is(n(M).id),sel:Hn.at("right",n(w)),unplaced:!t.placed}),()=>r(n(y))]),ke("click",I,()=>t.onstepDown(n(M))),ke("keydown",I,U=>{(U.key==="Enter"||U.key===" ")&&(U.preventDefault(),t.onstepDown(n(M)))}),Ge("mouseenter",I,()=>kt.set(n(M).id)),Ge("mouseleave",I,()=>kt.clear(n(M).id)),_(p,I)});var f=m(c,2);{var u=p=>{var y=w0();let w,M;var I=v(y),C=m(v(I)),T=v(C),A=m(I,2);xe(A,21,()=>t.model.uncertain,D=>D.relation.node.id,(D,j)=>{const R=S(()=>n(j).relation.node);var z=y0();let W;var H=v(z);Pt(H,{get kind(){return n(R).kind}});var B=m(H,2),k=v(B),b=v(k),E=m(k,2),q=v(E),O=v(q),K=m(q,2);{var Y=G=>{var U=Vd(),X=v(U);P(()=>x(X,n(j).relation.confidence)),_(G,U)};V(K,G=>{n(j).relation.confidence!==null&&G(Y)})}P((G,U)=>{W=Ce(z,1,"rrow static uncertain svelte-esi3sb",null,W,G),se(z,"data-target",n(R).id),se(z,"title",U),x(b,n(R).name),x(O,n(R).file)},[()=>({hot:kt.is(n(R).id)}),()=>r(n(j))]),ke("click",z,()=>t.onstepDown(n(R))),ke("keydown",z,G=>{(G.key==="Enter"||G.key===" ")&&(G.preventDefault(),t.onstepDown(n(R)))}),Ge("mouseenter",z,()=>kt.set(n(R).id)),Ge("mouseleave",z,()=>kt.clear(n(R).id)),_(D,z)}),P(()=>{w=Ce(y,1,"rfold svelte-esi3sb",null,w,{unplaced:!t.placed}),M=nt(y,"",M,{top:`${t.foldTop}px`}),x(T,`· ${t.model.uncertain.length??""} name-only match${t.model.uncertain.length===1?"":"es"}, - confidence < 0.6`)}),_(p,y)};V(f,p=>{t.model.uncertain.length>0&&p(u)})}var h=m(f,2);{var d=p=>{var y=b0();nt(y,"",{},{top:"60px"});var w=v(y);P(()=>x(w,t.emptyReason)),_(p,y)},g=p=>{var y=E0();let w,M;var I=v(y);{var C=j=>{var R=x0(),z=ye(R),W=m(z);{var H=B=>{var k=wt();P(b=>x(k,` · - ${b??""}`),[()=>st(t.model.outsideTypeRefs,"type reference")]),_(B,k)};V(W,B=>{t.model.outsideTypeRefs>0&&B(H)})}P(B=>x(z,`+${B??""} into symbols outside the index`),[()=>st(t.model.outsideCalls,"more call")]),_(j,R)},T=j=>{var R=wt();P(z=>x(R,`${z??""} into symbols outside the index.`),[()=>st(t.model.outsideTypeRefs,"type reference")]),_(j,R)};V(I,j=>{t.model.outsideCalls>0?j(C):t.model.outsideTypeRefs>0&&j(T,1)})}var A=m(I,2);{var D=j=>{var R=k0(),z=m(ye(R));P(()=>x(z,`+${t.model.hiddenGroups??""} more callee${t.model.hiddenGroups===1?"":"s"} not shown.`)),_(j,R)};V(A,j=>{t.model.hiddenGroups>0&&j(D)})}P(()=>{w=Ce(y,1,"rnote svelte-esi3sb",null,w,{unplaced:!t.placed}),M=nt(y,"",M,{top:`${t.noteTop}px`})}),_(p,y)};V(h,p=>{t.model.rows.length===0&&t.model.uncertain.length===0?p(d):(t.model.outsideCalls>0||t.model.outsideTypeRefs>0||t.model.hiddenGroups>0)&&p(g,1)})}P(()=>x(l,t.model.rows.length)),_(e,o),Ie()}mt(["click","keydown"]);var Wd=N('
'),sc=N(' '),T0=N(' '),C0=N(''),N0=N('you came from here'),I0=N('
'),A0=N(''),P0=N('
'),O0=N('
Tests
'),L0=N('
'),D0=N('
Uncertain
'),R0=N('
Called by ← step up
',1);function z0(e,t){Ne(t,!0);function r(C){return C.kind==="file"?`${gn(C.file)} (top level)`:C.name}function o(C){return`${C.relation.node.qualifiedName} — ${C.relation.node.file}:${C.relation.node.line}`}function s(C,T){let A=0;for(let D=0;D{var T=Wd(),A=v(T);P(()=>x(A,`Nothing in the graph calls or references this symbol${t.exported?" — it is exported, so callers may live outside the index (or it is an entry point).":"."}`)),_(C,T)};V(u,C=>{t.model.total===0&&C(h)})}var d=m(u,2);xe(d,19,()=>t.model.groups,C=>C.file,(C,T,A)=>{var D=A0(),j=v(D),R=v(j),z=v(R),W=m(R,2),H=v(W),B=m(j,2);xe(B,19,()=>n(T).rows,k=>k.relation.node.id,(k,b,E)=>{const q=S(()=>n(b).relation.node),O=S(()=>n(q).id===t.originId);var K=I0();let Y;var G=v(K);Pt(G,{get kind(){return n(q).kind}});var U=m(G,2),X=v(U),$=v(X),Z=m(X,2),Q=v(Z);{var F=ee=>{var ue=sc(),ne=v(ue);P(fe=>x(ne,fe),[()=>n(b).words.join(", ")]),_(ee,ue)};V(Q,ee=>{n(b).words.length>0&&ee(F)})}var J=m(Q,2);xe(J,16,()=>n(b).when,ee=>ee,(ee,ue)=>{var ne=T0(),fe=v(ne);P(()=>x(fe,`when ${ue??""}`)),_(ee,ne)});var te=m(J,2);xe(te,16,()=>n(b).lines,ee=>ee,(ee,ue)=>{var ne=C0(),fe=v(ne);P(()=>{se(ne,"title",`Open ${n(q).name} at line ${ue}`),x(fe,`:${ue??""}`)}),ke("click",ne,he=>{he.stopPropagation(),t.onstepUp(n(q),ue)}),_(ee,ne)});var ie=m(te,2);{var ge=ee=>{var ue=sc(),ne=v(ue);P(()=>x(ne,`via ${n(b).via??""}`)),_(ee,ue)};V(ie,ee=>{n(b).via&&ee(ge)})}var ve=m(ie,2);{var re=ee=>{var ue=N0();_(ee,ue)};V(ve,ee=>{n(O)&&ee(re)})}P((ee,ue,ne)=>{Y=Ce(K,1,"row svelte-1g174kh",null,Y,ee),se(K,"data-target",n(q).id),se(K,"title",ue),x($,ne)},[()=>({origin:n(O),sel:Hn.at("left",s(n(A),n(E)))}),()=>o(n(b)),()=>r(n(q))]),ke("click",K,()=>t.onstepUp(n(q))),ke("keydown",K,ee=>{(ee.key==="Enter"||ee.key===" ")&&(ee.preventDefault(),t.onstepUp(n(q)))}),Ge("mouseenter",K,()=>kt.set(n(q).id)),Ge("mouseleave",K,()=>kt.clear(n(q).id)),_(k,K)}),P(k=>{se(R,"href",k),se(R,"title",n(T).file),x(z,n(T).same?"same file":n(T).file),x(H,n(T).rows.length)},[()=>nn(n(T).file)]),_(C,D)});var g=m(d,2);{var p=C=>{var T=O0(),A=v(T),D=m(v(A)),j=v(D),R=m(A,2);xe(R,21,()=>t.model.tests.rows,z=>z.relation.node.id,(z,W)=>{const H=S(()=>n(W).relation.node);var B=P0(),k=v(B);Pt(k,{get kind(){return n(H).kind}});var b=m(k,2),E=v(b),q=v(E),O=m(E,2),K=v(O),Y=v(K);P((G,U)=>{se(B,"title",G),x(q,U),x(Y,n(H).file)},[()=>o(n(W)),()=>r(n(H))]),ke("click",B,()=>t.onstepUp(n(H))),ke("keydown",B,G=>{(G.key==="Enter"||G.key===" ")&&(G.preventDefault(),t.onstepUp(n(H)))}),Ge("mouseenter",B,()=>kt.set(n(H).id)),Ge("mouseleave",B,()=>kt.clear(n(H).id)),_(z,B)}),P((z,W)=>x(j,`· ${z??""} from ${W??""}`),[()=>st(t.model.tests.calls,"call"),()=>st(t.model.tests.files.length,"file")]),_(C,T)};V(g,C=>{t.model.tests.rows.length>0&&C(p)})}var y=m(g,2);{var w=C=>{var T=D0(),A=v(T),D=m(v(A)),j=v(D),R=m(A,2);xe(R,21,()=>t.model.uncertain,z=>z.relation.node.id,(z,W)=>{const H=S(()=>n(W).relation.node);var B=L0(),k=v(B);Pt(k,{get kind(){return n(H).kind}});var b=m(k,2),E=v(b),q=v(E),O=m(E,2),K=v(O),Y=v(K),G=m(K,2);{var U=X=>{var $=sc(),Z=v($);P(()=>x(Z,n(W).relation.confidence)),_(X,$)};V(G,X=>{n(W).relation.confidence!==null&&X(U)})}P((X,$,Z)=>{se(B,"title",X),x(q,$),x(Y,Z)},[()=>o(n(W)),()=>r(n(H)),()=>gn(n(H).file)]),ke("click",B,()=>t.onstepUp(n(H))),ke("keydown",B,X=>{(X.key==="Enter"||X.key===" ")&&(X.preventDefault(),t.onstepUp(n(H)))}),Ge("mouseenter",B,()=>kt.set(n(H).id)),Ge("mouseleave",B,()=>kt.clear(n(H).id)),_(z,B)}),P(()=>x(j,`· ${t.model.uncertain.length??""} name-only match${t.model.uncertain.length===1?"":"es"}, - confidence < 0.6`)),_(C,T)};V(y,C=>{t.model.uncertain.length>0&&C(w)})}var M=m(y,2);{var I=C=>{var T=Wd(),A=v(T);P(()=>x(A,`+${t.model.hiddenGroups??""} more caller${t.model.hiddenGroups===1?"":"s"} not shown — this symbol - has more than the rail lists.`)),_(C,T)};V(M,C=>{t.model.hiddenGroups>0&&C(I)})}P(()=>x(f,t.model.total)),_(e,i),Ie()}mt(["click","keydown"]);var H0=Yt(""),q0=Yt('');function gg(e,t){Ne(t,!0);var r=q0();xe(r,23,()=>t.connectors,(o,s)=>`${o.targetId}:${s}`,(o,s)=>{var i=H0();let a;P(l=>{se(i,"d",n(s).d),a=Ce(i,0,"svelte-1x7maed",null,a,l)},[()=>({uncertain:n(s).uncertain,heur:n(s).heuristic,origin:n(s).origin,hot:kt.is(n(s).targetId)})]),_(o,i)}),P(()=>{se(r,"width",t.width),se(r,"height",t.height),se(r,"viewBox",`0 0 ${t.width} ${t.height}`)}),_(e,r),Ie()}var j0=N(' '),F0=N(' ',1),B0=N(''),V0=N('
'),W0=N('
'),K0=N('
What would need re-checking if this changed
'),Y0=N('
Blast radius
');function X0(e,t){Ne(t,!0);let r=S(()=>Math.max(1,t.scale?.maxDirect??0,t.blast.direct)),o=S(()=>Math.max(1,t.scale?.maxWithinHops??0,t.blast.withinHops));const s=(G,U)=>G<=0?0:Math.max(.5,Math.min(100,100*G/U));var i=Y0(),a=v(i),l=m(v(a),2),c=v(l),f=v(c),u=m(c),h=m(l,2),d=v(h),g=v(d),p=m(d),y=m(h,2),w=v(y),M=v(w),I=m(w),C=m(y,2),T=v(C),A=v(T),D=m(T),j=m(C,2);{var R=G=>{var U=j0(),X=v(U),$=v(X),Z=m(X);P(()=>{x($,t.blast.routes),x(Z,` route${t.blast.routes===1?"":"s"}`)}),_(G,U)};V(j,G=>{t.blast.routes>0&&G(R)})}var z=m(a,2),W=v(z);let H;var B=m(W,2);let k;var b=m(z,2),E=v(b),q=m(E);{var O=G=>{var U=F0(),X=ye(U,!0);X.nodeValue=" ";var $=m(X),Z=v($);P(()=>x(Z,`(measured across its ${t.scale.sampled??""} most-depended-on symbols)`)),_(G,U)};V(q,G=>{t.scale?.estimated&&G(O)})}var K=m(b,2);{var Y=G=>{var U=K0(),X=m(v(U),2),$=v(X);xe($,17,()=>t.blast.topFiles,te=>te.file,(te,ie)=>{var ge=B0(),ve=v(ge);let re;var ee=v(ve),ue=m(ve,2),ne=v(ue);P(fe=>{se(ve,"href",fe),re=Ce(ve,1,"svelte-149slox",null,re,{test:n(ie).test}),x(ee,n(ie).file),x(ne,n(ie).symbols)},[()=>nn(n(ie).file)]),_(te,ge)});var Z=m($,2);{var Q=te=>{var ie=V0(),ge=v(ie);P(()=>x(ge,`+${t.blast.files-t.blast.topFiles.length} more files`)),_(te,ie)};V(Z,te=>{t.blast.files>t.blast.topFiles.length&&te(Q)})}var F=m(Z,2);{var J=te=>{var ie=W0(),ge=v(ie);P((ve,re)=>x(ge,`plus ${ve??""} from ${re??""} — the tests that - would catch a regression.`),[()=>st(t.testCalls,"call"),()=>st(t.testFiles,"test file")]),_(te,ie)};V(F,te=>{t.testCalls>0&&te(J)})}_(G,U)};V(K,G=>{t.blast.topFiles.length>0&&G(Y)})}P((G,U)=>{x(f,t.blast.direct),x(u,` direct dependent${t.blast.direct===1?"":"s"}`),x(g,t.blast.withinHops),x(p,` within ${t.blast.hops??""} hops`),x(M,t.blast.files),x(I,` file${t.blast.files===1?"":"s"}`),x(A,t.blast.testFiles),x(D,` test file${t.blast.testFiles===1?"":"s"}`),se(z,"title",`Scaled to the widest radius in the index: ${n(o)} symbols within ${t.blast.hops} hops.`),H=nt(W,"",H,G),k=nt(B,"",k,U),x(E,`dark: direct dependents · light: within ${t.blast.hops??""} hops — scaled to the widest radius in the - index`)},[()=>({width:`${s(t.blast.withinHops,n(o))}%`}),()=>({width:`${s(t.blast.direct,n(r))}%`})]),_(e,i),Ie()}var G0=N(' '),Z0=N(''),U0=N('
'),Q0=N('
Members
',1);function J0(e,t){Ne(t,!0);function r(u){return u.relation==="implements"?`Declares a member ${u.baseTypeName} requires — matched by name.`:`Redeclares a member of ${u.baseTypeName} — matched by name.`}var o=Q0(),s=ye(o),i=m(v(s),2),a=v(i),l=m(s,2);xe(l,21,()=>t.rows,u=>u.member.id,(u,h)=>{var d=Z0();let g;var p=v(d);Pt(p,{get kind(){return n(h).member.kind}});var y=m(p,2),w=v(y),M=m(y,2),I=v(M);{var C=B=>{var k=G0(),b=v(k);P(E=>{se(k,"title",E),x(b,`${n(h).member.overrides.relation==="implements"?"satisfies":"overrides"} - ${n(h).member.overrides.baseTypeName??""}`)},[()=>r(n(h).member.overrides)]),_(B,k)};V(I,B=>{n(h).member.overrides&&B(C)})}var T=m(I,1,!0),A=m(M,2),D=v(A);{var j=B=>{var k=wt();P(()=>x(k,`← ${n(h).member.fanIn??""}`)),_(B,k)};V(D,B=>{n(h).member.fanIn&&B(j)})}var R=m(D);{var z=B=>{var k=wt(" ");_(B,k)};V(R,B=>{n(h).member.fanIn&&n(h).member.fanOut&&B(z)})}var W=m(R);{var H=B=>{var k=wt();P(()=>x(k,`→ ${n(h).member.fanOut??""}`)),_(B,k)};V(W,B=>{n(h).member.fanOut&&B(H)})}P(()=>{g=Ce(d,1,"orow svelte-rscx7m",null,g,{nested:n(h).nested,dimmed:n(h).dimmed}),se(d,"title",`${n(h).member.qualifiedName} — ${n(h).member.file}:${n(h).member.line}`),x(w,n(h).member.name),x(T,n(h).member.signature??"")}),ke("click",d,()=>t.onopen(n(h).member)),_(u,d)});var c=m(l,2);{var f=u=>{var h=U0(),d=v(h);P(()=>x(d,`Showing ${t.rows.length??""} of ${t.total??""} members — open the file to see the rest.`)),_(u,h)};V(c,u=>{t.truncated&&u(f)})}P(()=>x(a,t.total)),_(e,o),Ie()}mt(["click"]);const bo=24,$0=22,pg=18,ic=pg+8,Kd=12;function ew(e,t){const r=[],o=[...e.ancestors.items].sort((u,h)=>h.depth-u.depth||u.name.localeCompare(h.name));for(const u of o)r.push({entry:u,node:u,side:"ancestor",indent:0,index:r.length,word:u.relation});const s=r.length;r.push({entry:null,node:t,side:"focus",indent:0,index:s,word:""});for(const u of e.descendants.items)r.push({entry:u,node:u,side:"descendant",indent:u.depth*$0,index:r.length,word:u.relation});const i=new Map(r.filter(u=>u.side!=="ancestor").map(u=>[u.node.id,u])),a=[];for(let u=0;uKd?s+1+Kd:null,f=c===null?[]:r.slice(c);return{rows:r,connectors:a,focusIndex:s,foldFrom:c,foldCount:f.length,foldNoun:tw(f.map(u=>u.entry).filter(u=>!!u)),headline:nw(e,t),note:rw(e)}}function tw(e){if(e.length===0)return"subtypes";const t=e.filter(r=>r.relation==="implements").length;return t===e.length?"implementations":t===0?"subclasses":"subtypes"}function nw(e,t){return e.polymorphic?`A call through ${t.name} dispatches to ${e.implementers} implementations — no single static target.`:""}function rw(e){const t=[];return e.descendants.truncated?t.push(`Showing ${e.descendants.shown} of ${e.descendants.total} subtypes`):e.bounded&&t.push("Deeper subtypes exist below the levels walked"),e.ancestors.truncated&&t.push(`${e.ancestors.total-e.ancestors.shown} more supertypes above`),t.join(" · ")}function ow(e,t){const r=t||e.foldFrom===null?e.rows.length:e.foldFrom;return{rows:e.rows.slice(0,r),connectors:e.connectors.filter(o=>o.toIndex

'),aw=Yt(""),lw=N('
'),Yd=N(' '),cw=N(''),uw=N(''),dw=N('
'),fw=N('
Type hierarchy supertypes above · subtypes below
',1);function vw(e,t){Ne(t,!0);let r=ae(!1),o=S(()=>ew(t.hierarchy,t.focus)),s=S(()=>ow(n(o),n(r)));et(()=>{t.focus.id,L(r,!1)});let i=S(()=>[t.hierarchy.ancestors.total>0?`${t.hierarchy.ancestors.total} above`:"",t.hierarchy.direct>0?`${t.hierarchy.descendants.total} below`:""].filter(Boolean).join(" · "));function a(D){const j=`${D.node.file}:${D.node.line}`;if(!D.entry)return`${D.node.qualifiedName} — ${j}`;const R=D.entry.synthesized?` — matched by ${D.entry.via??"the resolver"}${D.entry.registeredAt?` at ${D.entry.registeredAt}`:""}`:"";return`${D.node.qualifiedName} — ${j}${R}`}var l=fw(),c=ye(l),f=m(v(c),2),u=v(f),h=m(c,2);{var d=D=>{var j=iw(),R=v(j);P(()=>x(R,n(o).headline)),_(D,j)};V(h,D=>{n(o).headline&&D(d)})}var g=m(h,2),p=v(g);let y;var w=v(p);xe(w,21,()=>n(s).connectors,Kn,(D,j)=>{var R=aw();let z;P(W=>{se(R,"d",W),z=Ce(R,0,"svelte-1ys4zlw",null,z,{dashed:n(j).relation==="implements",synth:n(j).synthesized})},[()=>sw(n(j))]),_(D,R)});var M=m(w,2);xe(M,17,()=>n(s).rows,D=>D.node.id+D.side,(D,j)=>{var R=St(),z=ye(R);{var W=B=>{var k=lw();let b;var E=v(k);Pt(E,{get kind(){return n(j).node.kind}});var q=m(E,2),O=v(q);P(()=>{b=nt(k,"",b,{top:`${n(j).index*bo}px`,"padding-left":`${n(j).indent+18}px`}),x(O,n(j).node.name)}),_(B,k)},H=B=>{var k=cw();let b;var E=v(k);Pt(E,{get kind(){return n(j).node.kind}});var q=m(E,2),O=v(q),K=m(q,2),Y=v(K),G=m(K,2);{var U=F=>{var J=Yd(),te=v(J);P(()=>{se(J,"title",n(j).entry.registeredAt??""),x(te,`via ${n(j).entry.via??"resolver"??""}`)}),_(F,J)};V(G,F=>{n(j).entry?.synthesized&&F(U)})}var X=m(G,2);{var $=F=>{var J=Yd(),te=v(J);P(()=>x(te,`+${n(j).entry.hiddenSubtypes??""} below`)),_(F,J)};V(X,F=>{n(j).entry&&n(j).entry.hiddenSubtypes>0&&F($)})}var Z=m(X,2),Q=v(Z);P(F=>{se(k,"title",F),b=nt(k,"",b,{top:`${n(j).index*bo}px`,"padding-left":`${n(j).indent+18}px`}),x(O,n(j).node.name),x(Y,n(j).word),x(Q,n(j).node.file===t.focus.file?"same file":n(j).node.file)},[()=>a(n(j))]),ke("click",k,()=>t.onopen(n(j).node)),_(B,k)};V(z,B=>{n(j).side==="focus"?B(W):B(H,-1)})}_(D,R)});var I=m(g,2);{var C=D=>{var j=uw(),R=v(j);P(()=>x(R,n(r)?"Fold":`+${n(o).foldCount} more ${n(o).foldNoun}`)),ke("click",j,()=>L(r,!n(r))),_(D,j)};V(I,D=>{n(o).foldFrom!==null&&D(C)})}var T=m(I,2);{var A=D=>{var j=dw(),R=v(j);P(()=>x(R,n(o).note)),_(D,j)};V(T,D=>{n(o).note&&D(A)})}P(()=>{x(u,n(i)),y=nt(p,"",y,{height:`${n(s).height}px`}),se(w,"height",n(s).height)}),_(e,l),Ie()}mt(["click"]);const hw=new Set(["other","ident","comment","string","keyword","number","type","def"]);function gw(e,t){const r=[];let o=0;for(const[s,i]of e){const a=t[s];r.push({cls:hw.has(a)?a:"other",text:i,col:o}),o+=i.length}return r}function pw(e){const t=[],r=/[A-Za-z_$À-￿][\w$À-￿]*/g;let o=0,s;for(;(s=r.exec(e))!==null;)s.index>o&&t.push({cls:"other",text:e.slice(o,s.index),col:o}),t.push({cls:"ident",text:s[0],col:s.index}),o=s.index+s[0].length;return o '),mw=N(' '),_w=N(' '),yw=N(' '),ww=N(" "),bw=N(""),xw=N('
'),kw=N(" ",1),Ew=N('
');function Sw(e,t){Ne(t,!0);let r=S(()=>t.block.windows.map((u,h)=>({gapBefore:h===0?0:t.block.gapsAfter[h-1]??0,lines:u.lines.map((d,g)=>{const p=u.start+g,y=t.tokens.get(p)??[{cls:"other",text:d,col:0}],w=t.refs.get(p)??[],M=ol(y,w);return{n:p,parts:o(y,M,p===t.defLine?t.defName:null),port:s(w),targets:[...new Set(w.map(I=>I.targetId).filter(I=>!!I))]}})})));function o(u,h,d){return u.map((g,p)=>{const y=h.get(p)??null;return{text:g.text,cls:y?null:ju(g.cls),ref:y,def:!y&&d!==null&&g.text===d&&g.cls!=="comment"&&g.cls!=="string"}})}function s(u){return u.length===0?null:u.some(h=>!h.uncertain&&!h.outside)?"sure":"unsure"}function i(u){return u.n===t.highlight||u.targets.some(h=>kt.is(h))}var a=Ew(),l=v(a);xe(l,17,()=>n(r),u=>u.lines[0]?.n??-1,(u,h)=>{var d=kw(),g=ye(d);{var p=w=>{var M=Xd(),I=v(M);P(()=>x(I,`⋯ ${n(h).gapBefore??""} lines without calls`)),_(w,M)};V(g,w=>{n(h).gapBefore>0&&w(p)})}var y=m(g,2);xe(y,17,()=>n(h).lines,w=>w.n,(w,M)=>{var I=xw();let C;var T=v(I),A=v(T),D=m(T,2);xe(D,21,()=>n(M).parts,Kn,(W,H)=>{var B=St(),k=ye(B);{var b=Y=>{const G=S(()=>n(H).ref);var U=mw();let X;var $=v(U);P(Z=>{X=Ce(U,1,"ref svelte-ikg4h3",null,X,Z),se(U,"title",n(G).title),x($,n(H).text)},[()=>({uncertain:n(G).uncertain,hot:kt.is(n(G).targetId)})]),ke("click",U,()=>t.onfollow(n(G))),ke("keydown",U,Z=>{(Z.key==="Enter"||Z.key===" ")&&(Z.preventDefault(),t.onfollow(n(G)))}),Ge("mouseenter",U,()=>kt.set(n(G).targetId)),Ge("mouseleave",U,()=>kt.clear(n(G).targetId)),_(Y,U)},E=Y=>{var G=_w(),U=v(G);P(()=>{se(G,"title",n(H).ref.title),x(U,n(H).text)}),_(Y,G)},q=Y=>{var G=yw(),U=v(G);P(()=>x(U,n(H).text)),_(Y,G)},O=Y=>{var G=ww(),U=v(G);P(()=>{Ce(G,1,zo(n(H).cls),"svelte-ikg4h3"),x(U,n(H).text)}),_(Y,G)},K=Y=>{var G=wt();P(()=>x(G,n(H).text)),_(Y,G)};V(k,Y=>{n(H).ref&&!n(H).ref.outside?Y(b):n(H).ref?Y(E,1):n(H).def?Y(q,2):n(H).cls?Y(O,3):Y(K,-1)})}_(W,B)});var j=m(D,2),R=v(j);{var z=W=>{var H=bw();let B;P(()=>B=Ce(H,1,"svelte-ikg4h3",null,B,{sure:n(M).port==="sure"})),_(W,H)};V(R,W=>{n(M).port&&W(z)})}P(W=>{C=Ce(I,1,"ln svelte-ikg4h3",null,C,W),se(I,"data-line",n(M).n),x(A,n(M).n)},[()=>({hot:i(n(M))})]),_(w,I)}),_(u,d)});var c=m(l,2);{var f=u=>{var h=Xd(),d=v(h);P(()=>x(d,`⋯ ${t.block.tailGap??""} more lines`)),_(u,h)};V(c,u=>{t.block.tailGap>0&&u(f)})}_(e,a),Ie()}mt(["click","keydown"]);var Mw=N('›'),Tw=N('',1),Cw=N('
in
'),Nw=N('exported'),Iw=N(' '),Aw=N('
'),Pw=N('
'),Ow=N(' ',1),Lw=N(''),Gd=N(''),Dw=N(' '),Rw=N(' '),zw=N('uses types '),Hw=N('
'),qw=N('
',1);function jw(e,t){Ne(t,!0);let r=Ee(t,"relationChips",3,!0),o=S(()=>t.payload.node),s=S(()=>t.payload.tests),i=S(()=>r()?t.payload.outgoing.items.filter(X=>X.edgeKinds.some($=>$==="extends"||$==="implements")):[]),a=S(()=>r()?t.payload.incoming.items.filter(X=>X.edgeKinds.some($=>$==="extends"||$==="implements")):[]);const l=12;let c=S(()=>t.payload.typesUsed.slice(0,l));function f(X){return X.edgeKinds.includes("implements")?"implements":"extends"}let u=S(()=>n(s).reached?{warn:!1,text:`Reached by tests · ${st(n(s).fileCount,"file")} within ${n(s).hopsSearched} hop${n(s).hopsSearched===1?"":"s"}`,title:n(s).files.join(", ")}:{warn:!0,text:n(s).exhaustive?`No test reaches this within ${n(s).hopsSearched} caller hops`:"No test calls this directly",title:n(s).exhaustive?"No test file reaches this symbol within the caller hops searched.":"The caller search ran out of budget — only direct callers were checked."});var h=qw(),d=ye(h),g=v(d);Pt(g,{get kind(){return n(o).kind},titled:!0});var p=m(g,2),y=v(p),w=m(p,2),M=v(w),I=m(w,2),C=v(I),T=v(C),A=m(C),D=m(d,2);{var j=X=>{var $=Cw(),Z=m(v($));xe(Z,19,()=>t.payload.ancestors,Q=>Q.id,(Q,F,J)=>{var te=Tw(),ie=ye(te);{var ge=ee=>{var ue=Mw();_(ee,ue)};V(ie,ee=>{n(J)>0&&ee(ge)})}var ve=m(ie),re=v(ve);P(()=>x(re,n(F).name)),ke("click",ve,()=>t.onopen(n(F))),_(Q,te)}),_(X,$)};V(D,X=>{t.payload.ancestors.length>0&&X(j)})}var R=m(D,2),z=v(R);{var W=X=>{var $=Nw();_(X,$)};V(z,X=>{n(o).exported&&X(W)})}var H=m(z,2);{var B=X=>{var $=Iw(),Z=v($);P(Q=>x(Z,`hub · ${Q??""}`),[()=>st(t.payload.counts.callers,"caller")]),_(X,$)};V(H,X=>{t.payload.counts.hub&&X(B)})}var k=m(H,2);let b;var E=m(v(k),1,!0),q=m(R,2);{var O=X=>{var $=Aw(),Z=v($);P(()=>x(Z,`${n(o).name??""}${n(o).signature??""}`)),_(X,$)};V(q,X=>{n(o).signature&&X(O)})}var K=m(q,2);{var Y=X=>{var $=Pw(),Z=v($);P(()=>x(Z,n(o).docstring)),_(X,$)};V(K,X=>{n(o).docstring&&X(Y)})}var G=m(K,2);{var U=X=>{var $=Hw(),Z=v($);{var Q=ge=>{var ve=Lw();xe(ve,21,()=>n(i),re=>re.node.id,(re,ee)=>{var ue=Ow(),ne=ye(ue),fe=m(ne),he=v(fe);P(ce=>{x(ne,`${ce??""} `),x(he,n(ee).node.name)},[()=>f(n(ee))]),ke("click",fe,()=>t.onopen(n(ee).node)),_(re,ue)}),_(ge,ve)};V(Z,ge=>{n(i).length>0&&ge(Q)})}var F=m(Z,2);{var J=ge=>{var ve=Dw(),re=v(ve),ee=m(re);xe(ee,17,()=>n(a),ue=>ue.node.id,(ue,ne)=>{var fe=Gd(),he=v(fe);P(()=>x(he,n(ne).node.name)),ke("click",fe,()=>t.onopen(n(ne).node)),_(ue,fe)}),P(ue=>x(re,`${ue??""} `),[()=>n(a)[0]?.edgeKinds.includes("implements")?"implemented by":"extended by"]),_(ge,ve)};V(F,ge=>{n(a).length>0&&ge(J)})}var te=m(F,2);{var ie=ge=>{var ve=zw(),re=m(v(ve));xe(re,17,()=>n(c),ne=>ne.node.id,(ne,fe)=>{var he=Gd(),ce=v(he);P(()=>x(ce,n(fe).node.name)),ke("click",he,()=>t.onopen(n(fe).node)),_(ne,he)});var ee=m(re,2);{var ue=ne=>{var fe=Rw(),he=v(fe);P(()=>x(he,`+${t.payload.typesUsed.length-l}`)),_(ne,fe)};V(ee,ne=>{t.payload.typesUsed.length>l&&ne(ue)})}_(ge,ve)};V(te,ge=>{n(c).length>0&&ge(ie)})}_(X,$)};V(G,X=>{(n(i).length>0||n(a).length>0||n(c).length>0)&&X(U)})}P((X,$,Z)=>{x(y,n(o).name),x(M,X),se(C,"href",$),x(T,n(o).file),x(A,`:${n(o).line??""}–${n(o).endLine??""} - · ${Z??""}`),b=Ce(k,1,"badge svelte-f6j7rg",null,b,{warn:n(u).warn}),se(k,"title",n(u).title),x(E,n(u).text)},[()=>K1(n(o)),()=>nn(n(o).file,{line:n(o).line}),()=>st(n(o).lines,"line")]),_(e,h),Ie()}mt(["click"]);var Fw=N('
changed on disk after the last index sync —
');function Na(e,t){var r=Fw(),o=m(v(r),2),s=v(o),i=v(s),a=m(s,2);Nn(a,()=>t.children),P(()=>x(i,t.file)),_(e,r)}let go=ae(null),Gc=ae(null),Zs=null;function Zd(){return Zs||(Zs=o1().then(e=>{L(go,e,!0),L(Gc,null)}).catch(e=>{L(Gc,e instanceof Error?e.message:String(e),!0)}),Zs)}const Ar={get stats(){return n(go)},get error(){return n(Gc)},get name(){return n(go)?.project.name??null},get summary(){if(!n(go))return null;const e=t=>t.toLocaleString();return`${e(n(go).graph.nodes)} symbols · ${e(n(go).graph.edges)} edges · ${e(n(go).graph.files)} files indexed`},ensure:Zd,reload(){return Zs=null,Zd()}};var Bw=N('

'),Vw=N('

'),Ww=N('

Loading…

'),Kw=N(`indexed line ranges may be shifted, and the file is too long to stand in for - this symbol's body here — open its current source. - The next sync picks it up.`,1),Yw=N(''),Xw=N('
'),Gw=N('
');function Zw(e,t){Ne(t,!0);const r=34,o=6,s=38,i=400,a=new Map;let l=ae(null),c=ae(null),f=ae(null),u=ae(!0),h=ae(null),d=ae(null),g=ae(null),p=ae(null),y=ae(un([])),w=ae(0),M=ae(0),I=ae(0),C=ae(un([])),T=ae(un({width:0,height:0})),A=ae(!1);et(()=>{const de=t.id,me=new AbortController;return Ut(()=>j(de,me.signal)),()=>me.abort()});let D=null;Hu(()=>n(l)?.node.file??null,()=>{const de=t.id;D?.abort(),D=new AbortController,j(de,D.signal,!0)});async function j(de,me,Te=!1){Te||(L(u,!0),L(f,null),L(l,null),L(c,null),Hn.reset(),kt.set(null),L(A,!1)),Ar.ensure();let Pe;try{Pe=await s1(de,me)}catch(Le){if(me.aborted)return;if(Te&&z(Le).code==="not-found"&&n(l)!==null){const Re=await R(n(l).node,me);if(me.aborted)return;if(Re!==null){zt.rename(de,Re),Et(cn(Re.id,{trail:Rr(zt.hops)}),{replace:!0});return}}L(f,z(Le),!0),L(u,!1);return}if(!me.aborted){if(L(l,Pe,!0),L(f,null),L(u,!1),zt.resolve(de,{name:Pe.node.name,kind:Pe.node.kind}),!Ld(Pe.node.kind,Pe.node.lines)){L(c,null);return}try{const Le=Pe.drift?await Fc(Pe.node.file,1,0,me,"current"):await Fc(Pe.node.file,Pe.node.line,Pe.node.endLine,me);me.aborted||L(c,Le,!0)}catch{me.aborted||L(c,null)}}}async function R(de,me){try{const Pe=(await Xh(de.file,me)).outline.items.filter(Le=>Le.name===de.name&&Le.kind===de.kind);return Pe.length===0?null:Pe.reduce((Le,Re)=>Math.abs(Re.line-de.line)n(l)?V1(n(l)):null),H=S(()=>n(l)?B1(n(l)):null),B=S(()=>n(l)?q1(n(l)):new Map),k=S(()=>n(l)?W1(n(l)):[]),b=S(()=>n(l)?Ld(n(l).node.kind,n(l).node.lines):!1),E=S(()=>n(c)?.showing==="current"),q=S(()=>n(l)?.drift===!0&&(n(c)===null||(n(c).totalLines??0)>i)),O=S(()=>{if(!n(l)||!n(c)?.lines)return null;if(n(E))return n(q)?null:Od(n(c).from??1,n(c).lines,[]);const de=n(c).from??n(l).node.line;return Od(de,n(c).lines,j1(n(l)))}),K=S(()=>n(c)?.lines?sl(n(c).lines,n(c).from??1,n(c).highlight):new Map),Y=S(_y),G=S(()=>n(Y)?.rail==="left"?n(Y).id:null),U=S(()=>n(Y)?.rail==="right"?n(Y).id:null),X=S(()=>n(l)?n(b)?"This symbol makes no resolved calls — a leaf.":`A ${n(l).node.kind.replace(/_/g," ")} makes no calls itself — its members do. Open one from the outline.`:"");function $(de){hr(de,"down")}function Z(de,me){hr(de,"up",me)}function Q(de){hr(de,"start")}function F(de){if(!de.targetId)return;const me=n(l)?.outgoing.items.find(Te=>Te.node.id===de.targetId)?.node??n(l)?.typesUsed.find(Te=>Te.node.id===de.targetId)?.node;me&&hr(me,"down")}function J(){return(n(W)?.groups??[]).flatMap(de=>de.rows.map(me=>me.relation.node))}function te(){return(n(H)?.rows??[]).map(de=>de.relation.node)}function ie(){return Hn.rail==="left"?J():te()}function ge(de){if(de.defaultPrevented||de.metaKey||de.ctrlKey||de.altKey)return;const me=de.target;if(!(me instanceof HTMLElement&&(me.isContentEditable||me instanceof HTMLInputElement||me instanceof HTMLTextAreaElement||me instanceof HTMLSelectElement))&&n(l)){switch(de.key){case"ArrowLeft":Hn.switchTo("left");break;case"ArrowRight":Hn.switchTo("right");break;case"ArrowDown":case"j":Hn.step(1,ie().length);break;case"ArrowUp":case"k":Hn.step(-1,ie().length);break;case"Enter":{const Te=ie()[Hn.index];Te&&(de.preventDefault(),Hn.rail==="left"?Z(Te):$(Te));return}default:return}de.preventDefault(),Ea().then(()=>{(Hn.rail==="left"?n(p):n(g))?.querySelectorAll('[role="button"]')[Hn.index]?.scrollIntoView({block:"nearest"})})}}function ve(){const de=n(h),me=n(d),Te=n(g),Pe=n(H)?.rows??[];if(!de||!me||!Te)return;const Le=Te.querySelector("[data-rail-header]")?.offsetHeight??s,Re=!n(E),Be=Fe=>{if(!Re)return null;const Xe=me.querySelector(`[data-line="${Fe}"]`);return Xe?Xe.offsetTop+Xe.offsetHeight/2:null};let je=Le+14;const tt=[],Ze=[];for(const Fe of Pe){const Xe=Fe.anchor!==null?Be(Fe.anchor):null,dt=Xe!==null?Xe-r/2:je;je=Math.max(dt,je),tt.push(je),Ze.push(je+r/2),je+=r+o}const at=je+8;if((n(H)?.uncertain.length??0)>0){const Fe=Te.querySelector("[data-rail-fold]");je=at+(Fe?.offsetHeight??30)}const Ye=je+14;L(y,tt,!0),L(w,at),L(M,Ye),L(I,Math.max(me.offsetHeight,Ye+60),!0);const le=me.offsetLeft+me.offsetWidth-10,oe=Te.offsetLeft+14,_e=(le+oe)/2,Me=[];Pe.forEach((Fe,Xe)=>{const dt=Ze[Xe];if(dt==null)return;const Ct=Ci(Fe.relation);for(const Ht of Fe.lines){const At=Be(Ht);At!==null&&Me.push({d:`M${le},${At} C${_e},${At} ${_e},${dt} ${oe},${dt}`,targetId:Fe.relation.node.id,uncertain:Fe.relation.uncertain,heuristic:Ct!==null,origin:Fe.relation.node.id===n(U)})}}),L(C,Me,!0),L(T,{width:de.scrollWidth,height:Math.max(de.offsetHeight,n(I))},!0),L(A,!0)}let re=!1;function ee(){re||(re=!0,requestAnimationFrame(()=>{re=!1,ve()}))}et(()=>{n(O),n(H),n(k),n(l),Ea().then(ee)}),et(()=>{const de=n(h),me=n(d),Te=n(g);if(!de||!me||!Te)return;const Pe=new ResizeObserver(ee);return Pe.observe(de),Pe.observe(me),Pe.observe(Te),de.addEventListener("toggle",ee,!0),document.fonts?.ready.then(ee),()=>{Pe.disconnect(),de.removeEventListener("toggle",ee,!0)}});let ue=null;et(()=>{const de=t.line===null?null:`${t.id}:${t.line}`,me=n(d);if(!de||!me||!n(O)||ue===de)return;const Te=me.querySelector(`[data-line="${t.line}"]`);Te&&(ue=de,Te.scrollIntoView({block:"center"}))});var ne=St();Ge("keydown",fn,ge);var fe=ye(ne);{var he=de=>{var me=Vw(),Te=v(me),Pe=v(Te),Le=v(Pe),Re=m(Pe,2),Be=v(Re),je=m(Re,2);{var tt=Ze=>{var at=Bw(),Ye=v(at);P(()=>x(Ye,n(f).guidance)),_(Ze,at)};V(je,Ze=>{n(f).guidance&&Ze(tt)})}P(()=>{x(Le,n(f).code==="not-found"?"No such symbol":"Could not load this symbol"),x(Be,n(f).message)}),_(de,me)},ce=de=>{var me=Ww();_(de,me)},we=de=>{var me=Gw(),Te=v(me),Pe=v(Te);{let be=S(()=>n(l).node.exported===!0);z0(Pe,{get model(){return n(W)},get originId(){return n(G)},get exported(){return n(be)},onstepUp:Z})}Wt(Te,be=>L(p,be),()=>n(p));var Le=m(Te,2),Re=v(Le);let Be;var je=v(Re);gg(je,{get connectors(){return n(C)},get width(){return n(T).width},get height(){return n(T).height}});var tt=m(je,2),Ze=v(tt);{let be=S(()=>!n(l).hierarchy);jw(Ze,{get payload(){return n(l)},onopen:Q,get relationChips(){return n(be)}})}var at=m(Ze,2);{var Ye=be=>{var qe=Yw(),He=v(qe);Na(He,{get file(){return n(l).node.file},children:(Lt,qt)=>{var Ue=St(),Je=ye(Ue);{var ft=_t=>{var bt=Kw(),dn=m(ye(bt));P(Jt=>se(dn,"href",Jt),[()=>nn(n(l).node.file,{source:!0})]),_(_t,bt)},Mt=_t=>{var bt=wt(`indexed line ranges may be shifted; showing the file's current source. The next - sync picks it up.`);_(_t,bt)};V(Je,_t=>{n(q)?_t(ft):_t(Mt,-1)})}_(Lt,Ue)}}),_(be,qe)};V(at,be=>{n(l).drift&&be(Ye)})}var le=m(at,2);{var oe=be=>{vw(be,{get hierarchy(){return n(l).hierarchy},get focus(){return n(l).node},onopen:Q})};V(le,be=>{n(l).hierarchy&&be(oe)})}var _e=m(le,2);{var Me=be=>{{let qe=S(()=>n(E)?a:n(B)),He=S(()=>n(E)?-1:n(l).node.line),Lt=S(()=>n(E)?"":n(l).node.name),qt=S(()=>n(E)?null:t.line);Sw(be,{get block(){return n(O)},get tokens(){return n(K)},get refs(){return n(qe)},get defLine(){return n(He)},get defName(){return n(Lt)},get highlight(){return n(qt)},onfollow:F})}},Fe=be=>{},Xe=be=>{},dt=be=>{var qe=Xw(),He=v(qe);P(()=>x(He,n(c).reason??"Source is not available for this symbol.")),_(be,qe)};V(_e,be=>{n(O)?be(Me):n(l).drift?be(Fe,1):n(b)?n(c)&&be(dt,3):be(Xe,2)})}var Ct=m(_e,2);{var Ht=be=>{J0(be,{get rows(){return n(k)},get total(){return n(l).members.total},get truncated(){return n(l).members.truncated},onopen:Q})};V(Ct,be=>{n(k).length>0&&be(Ht)})}var At=m(Ct,2);{var rt=be=>{{let qe=S(()=>Ar.stats?.blastScale??null);X0(be,{get blast(){return n(l).blast},get scale(){return n(qe)},get testCalls(){return n(W).tests.calls},get testFiles(){return n(W).tests.files.length}})}};V(At,be=>{n(l).blast&&be(rt)})}Wt(tt,be=>L(d,be),()=>n(d));var ct=m(tt,2),ze=v(ct);M0(ze,{get model(){return n(H)},get tops(){return n(y)},get foldTop(){return n(w)},get noteTop(){return n(M)},get placed(){return n(A)},get focalFile(){return n(l).node.file},get originId(){return n(U)},get emptyReason(){return n(X)},onstepDown:$}),Wt(ct,be=>L(g,be),()=>n(g)),Wt(Re,be=>L(h,be),()=>n(h)),P(()=>Be=nt(Re,"",Be,{"min-height":`${n(I)}px`})),_(de,me)};V(fe,de=>{n(f)?de(he):n(u)||!n(l)||!n(W)||!n(H)?de(ce,1):de(we,-1)})}_(e,ne),Ie()}const Uw=new Set(["property","field","enum_member","variable","constant"]),mg=250,Yr=28;function Qw(e){return e?e.symbols.filter(t=>t.kind!=="file"):[]}function Ud(e,t,r=[]){const o=new Map(t.map(a=>[a.file,a])),s=[...new Set(e)].map(a=>{const l=o.get(a),c=Qw(l);return{path:a,test:l?.test??Jw(a),imported:l!==void 0,symbols:c,symbolCount:c.length}});s.sort((a,l)=>Number(a.test)-Number(l.test)||a.path.localeCompare(l.path));const i=new Map;for(const a of r){const l=i.get(a.name);l?l.push(a.line):i.set(a.name,[a.line])}return{rows:s,total:s.length,testCount:s.filter(a=>a.test).length,outside:[...i.entries()].map(([a,l])=>({name:a,lines:[...l].sort((c,f)=>c-f)})).sort((a,l)=>a.name.localeCompare(l.name))}}function Jw(e){return/(^|\/)(__tests__|__mocks__|__fixtures__|tests?|spec|fixtures)(\/|$)/.test(e)||/\.(test|spec)\.[a-z0-9]+$/i.test(e)}function $w(e){return e.outline.items.map(t=>({entry:t,indent:Math.min(t.depth,3),dimmed:Uw.has(t.kind)}))}function _g(e){return!Number.isFinite(e)||e<0?"—":e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function eb(e){const t=[e.file.language,_g(e.file.size)];return t.push(`${e.outline.total} ${e.outline.total===1?"symbol":"symbols"}`),e.file.generated&&t.push("generated"),e.file.test&&t.push("test"),t.join(" · ")}var Qd=N("
"),tb=N(''),nb=N(`
Nothing was extracted from this file — it holds no symbols the graph - recognises, only top-level code, or a language without an extractor.
`),rb=N('
'),ob=N('
Outline in source order
',1);function sb(e,t){Ne(t,!0);let r=Ee(t,"scroller",7),o=Ee(t,"selected",19,()=>-1),s=ae(null),i=ae(0),a=ae(0),l=S(()=>t.rows.length>mg),c=S(()=>{if(!n(l))return{start:0,end:t.rows.length,before:0,after:0};const j=n(s)?n(s).offsetTop:0,R=Math.floor((n(i)-j)/Yr)-8,z=Math.ceil((n(a)||800)/Yr)+16,W=Math.max(0,Math.min(t.rows.length-1,R)),H=Math.max(W,Math.min(t.rows.length,W+z));return{start:W,end:H,before:W*Yr,after:(t.rows.length-H)*Yr}});et(()=>{if(o()<0||!r()||!n(s))return;const j=n(s).offsetTop+o()*Yr,R=j+Yr;jr().scrollTop+r().clientHeight&&(r().scrollTop=R-r().clientHeight+Yr)}),et(()=>{const j=r();if(!j)return;const R=()=>{L(i,j.scrollTop,!0),L(a,j.clientHeight,!0)};R(),j.addEventListener("scroll",R,{passive:!0});const z=new ResizeObserver(R);return z.observe(j),()=>{j.removeEventListener("scroll",R),z.disconnect()}});var f=ob(),u=ye(f),h=m(v(u),4),d=v(h),g=m(u,2),p=v(g);{var y=j=>{var R=Qd();let z;P(()=>z=nt(R,"",z,{height:`${n(c).before}px`})),_(j,R)};V(p,j=>{n(c).before>0&&j(y)})}var w=m(p,2);xe(w,19,()=>t.rows.slice(n(c).start,n(c).end),j=>j.entry.id,(j,R,z)=>{const W=S(()=>n(c).start+n(z));var H=tb();let B,k;var b=v(H);Pt(b,{get kind(){return n(R).entry.kind}});var E=m(b,2),q=v(E),O=m(E,2),K=v(O),Y=m(O,2),G=v(Y),U=m(G);{var X=Q=>{var F=wt();P(()=>x(F,` · ← ${n(R).entry.fanIn??""}`)),_(Q,F)};V(U,Q=>{n(R).entry.fanIn&&Q(X)})}var $=m(U);{var Z=Q=>{var F=wt();P(()=>x(F,` · - → ${n(R).entry.fanOut??""}`)),_(Q,F)};V($,Q=>{n(R).entry.fanOut&&Q(Z)})}P(()=>{B=Ce(H,1,"orow svelte-3o11pb",null,B,{dimmed:n(R).dimmed,sel:n(W)===o()}),se(H,"title",`${n(R).entry.qualifiedName} — line ${n(R).entry.line}`),k=nt(H,"",k,{"padding-left":`${4+n(R).indent*22}px`}),x(q,n(R).entry.name),x(K,n(R).entry.signature??""),x(G,n(R).entry.line)}),ke("click",H,()=>t.onopen(n(R).entry)),Ge("mouseenter",H,()=>t.onhover?.(n(W))),_(j,H)});var M=m(w,2);{var I=j=>{var R=Qd();let z;P(()=>z=nt(R,"",z,{height:`${n(c).after}px`})),_(j,R)};V(M,j=>{n(c).after>0&&j(I)})}Wt(g,j=>L(s,j),()=>n(s));var C=m(g,2);{var T=j=>{var R=nb();_(j,R)};V(C,j=>{t.rows.length===0&&j(T)})}var A=m(C,2);{var D=j=>{var R=rb(),z=v(R);P(()=>x(z,`Showing ${t.rows.length??""} of ${t.total??""} symbols. The rest are in the index; this - screen caps what it draws.`)),_(j,R)};V(A,j=>{t.truncated&&j(D)})}P(()=>x(d,t.total)),_(e,f),Ie()}mt(["click"]);var ib=N('
'),Jd=N(' '),ab=N(' '),lb=N('
'),cb=N('
'),ub=N(`
Outside the index
Packages and runtime modules — nothing was indexed for them, so this - viewer cannot open them.
`,1),db=N('
');function $d(e,t){Ne(t,!0);let r=Ee(t,"selected",19,()=>-1);function o(T){const A=T.lastIndexOf("/");return A<0?"":T.slice(0,A+1)}function s(T){return T.slice(T.lastIndexOf("/")+1)}function i(T){if(T.symbols.length===0)return T.path;const A=T.symbols.map(j=>j.name).join(", "),D=T.symbolCount>T.symbols.length?", …":"";return`${T.path} — ${A}${D}`}var a=db();let l;var c=v(a),f=v(c),u=v(f),h=m(u),d=v(h),g=m(c,2);{var p=T=>{var A=ib(),D=v(A);P(()=>x(D,t.emptyNote)),_(T,A)};V(g,T=>{t.model.rows.length===0&&T(p)})}var y=m(g,2);xe(y,19,()=>t.model.rows,T=>T.path,(T,A,D)=>{var j=ab();let R;var z=v(j),W=v(z),H=v(W),B=m(W),k=v(B),b=m(z,2);{var E=q=>{var O=Jd(),K=v(O);P(()=>x(K,n(A).symbolCount)),_(q,O)};V(b,q=>{n(A).symbolCount>0&&q(E)})}P((q,O,K,Y)=>{R=Ce(j,1,"filerow svelte-122bwap",null,R,{test:n(A).test,sel:n(D)===r()}),se(j,"href",q),se(j,"title",O),x(H,K),x(k,Y)},[()=>nn(n(A).path),()=>i(n(A)),()=>o(n(A).path),()=>s(n(A).path)]),Ge("mouseenter",j,()=>t.onhover?.(n(D))),_(T,j)});var w=m(y,2);{var M=T=>{var A=lb(),D=v(A);P(j=>x(D,`${j??""} at the end of the list.`),[()=>st(t.model.testCount,"test file")]),_(T,A)};V(w,T=>{t.model.testCount>0&&t.model.testCount{var A=ub(),D=ye(A),j=m(v(D)),R=v(j),z=m(D,2);xe(z,17,()=>t.model.outside,W=>W.name,(W,H)=>{var B=cb(),k=v(B),b=v(k),E=v(b),q=m(k,2);{var O=K=>{var Y=Jd(),G=v(Y);P(()=>x(G,`×${n(H).lines.length??""}`)),_(K,Y)};V(q,K=>{n(H).lines.length>1&&K(O)})}P(K=>{se(B,"title",K),x(E,n(H).name)},[()=>`imported at line ${n(H).lines.join(", ")}`]),_(W,B)}),P(()=>x(R,t.model.outside.length)),_(T,A)};V(I,T=>{t.model.outside.length>0&&T(C)})}P(()=>{l=Ce(a,1,"rail svelte-122bwap",null,l,{right:t.side==="right"}),se(a,"aria-label",t.title),x(u,`${t.title??""} `),x(d,t.model.total)}),_(e,a),Ie()}var fb=N('');function yg(e,t){Ne(t,!0);var r=fb(),o=v(r);let s;var i=m(o,2);let a;P((l,c)=>{s=Ce(o,1,"mode svelte-a9lqu6",null,s,{on:!t.source}),se(o,"href",l),se(o,"aria-current",t.source?void 0:"page"),a=Ce(i,1,"mode svelte-a9lqu6",null,a,{on:t.source}),se(i,"href",c),se(i,"aria-current",t.source?"page":void 0)},[()=>nn(t.path,t.line?{line:t.line}:{}),()=>nn(t.path,{source:!0,...t.line?{line:t.line}:{}})]),_(e,r),Ie()}var vb=N('

'),hb=N('

'),gb=N('

Loading…

'),pb=N(' '),mb=N('generated'),_b=N(' '),yb=N(`indexed line ranges may be shifted, so the outline below is the shape the file had - when it was indexed — read its current source. - The next sync picks it up.`,1),wb=N(''),bb=N('

');function xb(e,t){Ne(t,!0);let r=ae(null),o=ae(null),s=ae(!0),i=ae(null),a=null;et(()=>{const W=t.path,H=new AbortController;return Ut(()=>c(W,H.signal)),()=>H.abort()});let l=null;Hu(()=>n(r)?.file.path??t.path,()=>{const W=t.path;l?.abort(),l=new AbortController,c(W,l.signal,!0)});async function c(W,H,B=!1){B||(L(s,!0),L(o,null),L(r,null),L(y,"outline"),L(w,-1),a=null);try{const k=await Xh(W,H);if(H.aborted)return;L(r,k,!0),L(o,null)}catch(k){if(H.aborted)return;L(o,k instanceof Yn?k:new Yn(0,"error",k instanceof Error?k.message:String(k),null),!0)}finally{H.aborted||L(s,!1)}}let f=S(()=>n(r)?$w(n(r)):[]),u=S(()=>n(r)?Ud(n(r).dependents,n(r).importedBy.items):null),h=S(()=>n(r)?Ud(n(r).dependencies,n(r).imports.items,n(r).unresolvedImports):null);function d(W){hr({id:W.id,name:W.name,kind:W.kind},"start")}function g(){const W=n(r)?.file;W?.id&&hr({id:W.id,name:gn(W.path),kind:"file"},"start")}const p=["left","outline","right"];let y=ae("outline"),w=ae(-1);function M(W){return W==="left"?n(u)?.rows.length??0:W==="right"?n(h)?.rows.length??0:n(f).length}function I(){if(n(w)<0)return;if(n(y)==="outline"){const B=n(f)[n(w)];B&&d(B.entry);return}const H=(n(y)==="left"?n(u):n(h))?.rows[n(w)];H&&Et(nn(H.path))}function C(W){const H=p.indexOf(n(y)),B=p[Math.max(0,Math.min(p.length-1,H+W))];!B||B===n(y)||M(B)!==0&&(L(y,B,!0),L(w,0))}function T(W){if(W.defaultPrevented||W.metaKey||W.ctrlKey||W.altKey)return;const H=W.target;if(!(H instanceof HTMLElement&&(H.isContentEditable||H instanceof HTMLInputElement||H instanceof HTMLTextAreaElement||H instanceof HTMLSelectElement))&&n(r)){switch(W.key){case"ArrowLeft":C(-1);break;case"ArrowRight":C(1);break;case"ArrowDown":case"j":L(w,Math.max(0,Math.min(M(n(y))-1,n(w)+1)),!0);break;case"ArrowUp":case"k":L(w,Math.max(0,n(w)-1),!0);break;case"Enter":W.preventDefault(),I();return;default:return}W.preventDefault(),n(y)!=="outline"&&Ea().then(()=>{document.querySelector(n(y)==="left"?'[data-pane="left"]':'[data-pane="right"]')?.querySelectorAll(".filerow")[n(w)]?.scrollIntoView({block:"nearest"})})}}et(()=>{const W=t.line===null?null:`${t.path}:${t.line}`;if(!W||!n(r)||a===W||n(f).length===0)return;let H=-1;n(f).forEach((B,k)=>{B.entry.line<=t.line&&t.line<=B.entry.endLine&&(H=k)}),a=W,!(H<0)&&(L(y,"outline"),L(w,H,!0))});var A=St();Ge("keydown",fn,T);var D=ye(A);{var j=W=>{var H=hb(),B=v(H),k=v(B),b=v(k),E=m(k,2),q=v(E),O=m(E,2),K=v(O),Y=m(O,2);{var G=U=>{var X=vb(),$=v(X);P(()=>x($,n(o).guidance)),_(U,X)};V(Y,U=>{n(o).guidance&&U(G)})}P(()=>{x(b,n(o).code==="not-found"?"Not in the index":"Could not load this file"),x(q,t.path),x(K,n(o).message)}),_(W,H)},R=W=>{var H=gb();_(W,H)},z=W=>{var H=bb(),B=v(H),k=v(B);{let he=S(()=>n(y)==="left"?n(w):-1);$d(k,{title:"Imported by",get model(){return n(u)},side:"left",get selected(){return n(he)},onhover:ce=>{L(y,"left"),L(w,ce,!0)},emptyNote:"Nothing in the index reaches into this file. It is either an entry point, or nothing depends on it yet."})}var b=m(B,2),E=v(b),q=v(E);Pt(q,{kind:"file"});var O=m(q,2);let K;var Y=v(O),G=m(O,2),U=v(G),X=m(G,2),$=v(X),Z=m(X,4);yg(Z,{get path(){return n(r).file.path},get line(){return t.line},source:!1});var Q=m(E,2),F=v(Q);{var J=he=>{var ce=pb(),we=v(ce),de=m(we);P(me=>x(we,`Runs ${me??""} at the top level — `),[()=>st(n(r).topLevel.calls,"call")]),ke("click",de,g),_(he,ce)};V(F,he=>{n(r).topLevel.calls>0&&he(J)})}var te=m(F,2);{var ie=he=>{var ce=mb();_(he,ce)};V(te,he=>{n(r).file.generated&&he(ie)})}var ge=m(te,2);{var ve=he=>{var ce=_b(),we=v(ce);P(de=>x(we,`${de??""} — the outline may be - incomplete`),[()=>st(n(r).file.errors.length,"extraction error")]),_(he,ce)};V(ge,he=>{n(r).file.errors.length>0&&he(ve)})}var re=m(Q,2);{var ee=he=>{var ce=wb(),we=v(ce);Na(we,{get file(){return n(r).file.path},children:(de,me)=>{var Te=yb(),Pe=m(ye(Te));P(Le=>se(Pe,"href",Le),[()=>nn(n(r).file.path,{source:!0})]),_(de,Te)}}),_(he,ce)};V(re,he=>{n(r).drift&&he(ee)})}var ue=m(re,2);{let he=S(()=>n(y)==="outline"?n(w):-1);sb(ue,{get rows(){return n(f)},get total(){return n(r).outline.total},get truncated(){return n(r).outline.truncated},get scroller(){return n(i)},get selected(){return n(he)},onopen:d,onhover:ce=>{L(y,"outline"),L(w,ce,!0)}})}Wt(b,he=>L(i,he),()=>n(i));var ne=m(b,2),fe=v(ne);{let he=S(()=>n(y)==="right"?n(w):-1);$d(fe,{title:"Imports",get model(){return n(h)},side:"right",get selected(){return n(he)},onhover:ce=>{L(y,"right"),L(w,ce,!0)},emptyNote:"This file reaches nothing else in the index — it depends on nothing the graph holds."})}P((he,ce)=>{K=Ce(O,1,"svelte-1dtvc8r",null,K,{gen:n(r).file.generated}),x(Y,he),x(U,ce),x($,n(r).file.path)},[()=>gn(n(r).file.path),()=>eb(n(r))]),_(W,H)};V(D,W=>{n(o)?W(j):n(s)||!n(r)||!n(h)||!n(u)?W(R,1):W(z,-1)})}_(e,A),Ie()}mt(["click"]);const ls=20,Ni=10,wg=120,hi=56,Ia=34,kb=6,Xr=24,Eb=24,Zc=800,Sb=150,Mb=40,ef=7,Tb=hi-8;function Fu(e){return Ni+(e-1)*ls}function Aa(e){return Fu(e)+ls/2}function Cb(e){return Ni+Math.max(0,e)*ls+wg}function Nb(e,t){if(t<=0)return 1;const r=Math.floor((e-Ni)/ls)+1;return Math.max(1,Math.min(t,r))}function Ib(e,t,r,o=Eb){if(r<=0)return{first:1,last:0};const s=Math.floor((e-Ni)/ls)+1-o,i=Math.ceil((t||800)/ls)+o*2,a=Math.max(1,Math.min(r,s));return{first:a,last:Math.max(a-1,Math.min(r,a+i))}}function tf(e){return Math.floor((e-1)/Zc)}function Ab(e,t){const r=e*Zc+1;return{index:e,from:r,to:Math.min(t,r+Zc-1),requestFrom:Math.max(1,r-Sb)}}function Pb(e,t,r){if(r<=0||tt)break;t<=o.endLine&&(r=o.id)}return r}function Ob(e){const t=new Map,r=(o,s)=>{const i=t.get(o);i?i.push(s):t.set(o,[s])};for(const o of e.calls.items){const s=o.relation,i=Lu(s.node.name),a=rl(s),l=new Set;for(const c of s.edges)c.line&&(l.add(c.line),r(c.line,{ident:i,col:typeof c.col=="number"?c.col:null,targetId:s.node.id,uncertain:s.uncertain,outside:!1,title:`${a[0]||"calls"} ${s.node.qualifiedName} — ${s.node.file}:${s.node.line}`+(c.confidence!=null?` · confidence ${c.confidence}`:"")+(c.resolvedBy?` · resolved by ${c.resolvedBy}`:"")}));for(const c of s.lines)l.has(c)||r(c,{ident:i,col:null,targetId:s.node.id,uncertain:s.uncertain,outside:!1,title:`${a[0]||"calls"} ${s.node.qualifiedName} — ${s.node.file}:${s.node.line}`})}for(const o of e.outside.items)r(o.line,Lb(o));return t}function Lb(e){return{ident:e.name,col:e.col,targetId:null,uncertain:!1,outside:!0,title:`${e.name} is not in the index — nothing here resolves it`}}function Db(e){const t=e.calls.items.map(o=>({key:`${o.ownerId}>${o.relation.node.id}`,ownerId:o.ownerId,call:o,anchor:o.relation.lines[0]??null,lines:o.relation.lines,words:rl(o.relation),via:Ci(o.relation),top:0}));t.sort((o,s)=>(o.anchor??Number.MAX_SAFE_INTEGER)-(s.anchor??Number.MAX_SAFE_INTEGER)||o.call.ownerLine-s.call.ownerLine||o.call.relation.node.name.localeCompare(s.call.relation.node.name));let r=Ni;for(const o of t){const s=o.anchor===null?r:Aa(o.anchor)-Ia/2;r=Math.max(s,r),o.top=r,r+=Ia+kb}return t}function Rb(e,t,r){const o=[];for(const s of e){if(s.top>r)break;s.top+Ia>=t&&o.push(s)}return o}function zb(e){const t=e[e.length-1];return t?t.top+Ia+wg:0}function Hb(e,t){const r=e.file.path,o=[];let s=1;for(const a of t){const l=a.call.relation.node;if(l.file===r)for(const c of a.lines){if(c===l.line)continue;const f=Math.abs(l.line-c);f>s&&(s=f),o.push({key:`${a.key}:${c}`,fromLine:c,toLine:l.line,ownerId:a.ownerId,targetId:l.id,targetName:l.name,uncertain:a.call.relation.uncertain,synthesized:a.via!==null,d:"",minLine:Math.min(c,l.line),maxLine:Math.max(c,l.line)})}}const i=Math.log1p(s);for(const a of o){const l=a.maxLine-a.minLine,c=ef+(Tb-ef)*(i>0?Math.log1p(l)/i:0);a.d=qb(a.fromLine,a.toLine,c)}return o.sort((a,l)=>l.maxLine-l.minLine-(a.maxLine-a.minLine)),o}function qb(e,t,r){const o=Aa(e),s=Aa(t),i=Math.max(1,Math.abs(s-o)/2),a=s>o?0:1;return`M${hi},${o} A${r.toFixed(1)},${i.toFixed(1)} 0 0 ${a} ${hi},${s}`}function jb(e,t,r){return r?t?e.filter(o=>o.ownerId===t||o.targetId===t):[]:[...e]}function Fb(e,t,r){return e.filter(o=>o.minLine<=r&&o.maxLine>=t)}function Bb(e){return e===0?"No calls in this file reach another symbol in it.":`${e} ${e===1?"call stays":"calls stay"} within this file`}var Vb=Yt(' ',1),Wb=Yt('');function Kb(e,t){Ne(t,!0);function r(i){return kt.is(i.targetId)||i.fromLine===t.hoverLine||i.toLine===t.hoverLine}function o(i){const a=i.toLinet.arcs,i=>i.key,(i,a)=>{var l=Vb(),c=ye(l);let f;var u=m(c),h=v(u),d=v(h);P((g,p)=>{f=Ce(c,0,"arc svelte-7a2f5z",null,f,g),se(c,"d",n(a).d),se(u,"d",n(a).d),x(d,p)},[()=>({lit:r(n(a)),uncertain:n(a).uncertain,heur:n(a).synthesized}),()=>o(n(a))]),ke("click",u,()=>t.onfollow(n(a))),ke("keydown",u,g=>{(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),t.onfollow(n(a)))}),Ge("mouseenter",u,()=>kt.set(n(a).targetId)),Ge("mouseleave",u,()=>kt.clear(n(a).targetId)),_(i,l)}),P(()=>{se(s,"width",hi),se(s,"height",t.height),se(s,"viewBox",`0 0 ${hi} ${t.height}`)}),_(e,s),Ie()}mt(["click","keydown"]);var Yb=N(' '),Xb=N(' '),Gb=N(' '),Zb=N(" "),Ub=N(''),Qb=N(""),Jb=N('
'),$b=N('
');function ex(e,t){Ne(t,!0);let r=S(()=>{const l=[];for(let c=t.first;c<=t.last;c++){const f=t.refs.get(c)??[],u=t.tokensFor(c);l.push({n:c,top:Fu(c),parts:u?o(u,ol(u,f),t.defNames.get(c)??null):null,port:s(f),targets:[...new Set(f.map(h=>h.targetId).filter(h=>!!h))]})}return l});function o(l,c,f){return l.map((u,h)=>{const d=c.get(h)??null;return{text:u.text,cls:d?null:ju(u.cls),ref:d,def:!d&&f!==null&&u.text===f&&u.cls!=="comment"&&u.cls!=="string"}})}function s(l){return l.length===0?null:l.some(c=>!c.uncertain&&!c.outside)?"sure":"unsure"}function i(l){return l.n===t.highlight||l.targets.some(c=>kt.is(c))}var a=$b();xe(a,21,()=>n(r),l=>l.n,(l,c)=>{var f=Jb();let u,h;var d=v(f),g=v(d),p=m(d,2),y=v(p);{var w=A=>{var D=St(),j=ye(D);xe(j,17,()=>n(c).parts,Kn,(R,z)=>{var W=St(),H=ye(W);{var B=O=>{const K=S(()=>n(z).ref);var Y=Yb();let G;var U=v(Y);P(X=>{G=Ce(Y,1,"ref svelte-a7mbfv",null,G,X),se(Y,"title",n(K).title),x(U,n(z).text)},[()=>({uncertain:n(K).uncertain,hot:kt.is(n(K).targetId)})]),ke("click",Y,()=>t.onfollow(n(K))),ke("keydown",Y,X=>{(X.key==="Enter"||X.key===" ")&&(X.preventDefault(),t.onfollow(n(K)))}),Ge("mouseenter",Y,()=>kt.set(n(K).targetId)),Ge("mouseleave",Y,()=>kt.clear(n(K).targetId)),_(O,Y)},k=O=>{var K=Xb(),Y=v(K);P(()=>{se(K,"title",n(z).ref.title),x(Y,n(z).text)}),_(O,K)},b=O=>{var K=Gb(),Y=v(K);P(()=>x(Y,n(z).text)),_(O,K)},E=O=>{var K=Zb(),Y=v(K);P(()=>{Ce(K,1,zo(n(z).cls),"svelte-a7mbfv"),x(Y,n(z).text)}),_(O,K)},q=O=>{var K=wt();P(()=>x(K,n(z).text)),_(O,K)};V(H,O=>{n(z).ref&&!n(z).ref.outside?O(B):n(z).ref?O(k,1):n(z).def?O(b,2):n(z).cls?O(E,3):O(q,-1)})}_(R,W)}),_(A,D)},M=A=>{var D=Ub();_(A,D)};V(y,A=>{n(c).parts?A(w):A(M,-1)})}var I=m(p,2),C=v(I);{var T=A=>{var D=Qb();let j;P(()=>j=Ce(D,1,"svelte-a7mbfv",null,j,{sure:n(c).port==="sure"})),_(A,D)};V(C,A=>{n(c).port&&A(T)})}P(A=>{u=Ce(f,1,"ln svelte-a7mbfv",null,u,A),se(f,"data-line",n(c).n),h=nt(f,"",h,{top:`${n(c).top}px`}),x(g,n(c).n)},[()=>({hot:i(n(c))})]),Ge("mouseenter",f,()=>t.onhoverline(n(c).n)),_(l,f)}),_(e,a),Ie()}mt(["click","keydown"]);var rf=N("
"),tx=N(''),nx=N('
'),rx=N('');function ox(e,t){Ne(t,!0);let r=ae(null),o=ae(0),s=ae(0),i=S(()=>t.rows.length>mg),a=S(()=>{if(!n(i))return{start:0,end:t.rows.length,before:0,after:0};const T=Math.floor(n(o)/Xr)-8,A=Math.ceil((n(s)||800)/Xr)+16,D=Math.max(0,Math.min(t.rows.length-1,T)),j=Math.max(D,Math.min(t.rows.length,D+A));return{start:D,end:j,before:D*Xr,after:(t.rows.length-j)*Xr}});et(()=>{const T=t.currentId,A=n(r);if(!T||!A)return;const D=t.rows.findIndex(z=>z.entry.id===T);if(D<0)return;const j=D*Xr,R=A.parentElement;R&&(jR.scrollTop+R.clientHeight&&(R.scrollTop=j+Xr*3-R.clientHeight))}),et(()=>{const T=n(r)?.parentElement;if(!T)return;const A=()=>{L(o,T.scrollTop,!0),L(s,T.clientHeight,!0)};A(),T.addEventListener("scroll",A,{passive:!0});const D=new ResizeObserver(A);return D.observe(T),()=>{T.removeEventListener("scroll",A),D.disconnect()}});var l=rx(),c=v(l),f=m(v(c),2),u=v(f),h=m(c,2),d=v(h),g=v(d);{var p=T=>{var A=rf();let D;P(()=>D=nt(A,"",D,{height:`${n(a).before}px`})),_(T,A)};V(g,T=>{n(a).before>0&&T(p)})}var y=m(g,2);xe(y,17,()=>t.rows.slice(n(a).start,n(a).end),T=>T.entry.id,(T,A)=>{var D=tx();let j,R;var z=v(D);Pt(z,{get kind(){return n(A).entry.kind}});var W=m(z,2),H=v(W),B=m(W,2),k=v(B);P(()=>{j=Ce(D,1,"nrow svelte-3z23e6",null,j,{dimmed:n(A).dimmed,current:n(A).entry.id===t.currentId}),se(D,"title",`${n(A).entry.qualifiedName} — line ${n(A).entry.line}`),R=nt(D,"",R,{"padding-left":`${6+n(A).indent*14}px`}),x(H,n(A).entry.name),x(k,n(A).entry.line)}),ke("click",D,()=>t.ongo(n(A).entry.line,n(A).entry.id)),_(T,D)});var w=m(y,2);{var M=T=>{var A=rf();let D;P(()=>D=nt(A,"",D,{height:`${n(a).after}px`})),_(T,A)};V(w,T=>{n(a).after>0&&T(M)})}Wt(d,T=>L(r,T),()=>n(r));var I=m(h,2);{var C=T=>{var A=nx(),D=v(A);P(()=>x(D,`Showing ${t.rows.length??""} of ${t.total??""} symbols.`)),_(T,A)};V(I,T=>{t.truncated&&T(C)})}P(()=>x(u,t.total)),_(e,l),Ie()}mt(["click"]);var sx=N(' '),ix=N(" "),ax=N(' '),lx=N('
');function cx(e,t){Ne(t,!0);function r(i){const a=i.call.relation.node,l=i.lines.length>0?` · called from line ${i.lines.join(", ")}`:"";return`${a.qualifiedName} — ${a.file}:${a.line}${l}`}var o=St(),s=ye(o);xe(s,17,()=>t.rows,i=>i.key,(i,a)=>{const l=S(()=>n(a).call.relation.node);var c=lx();let f,u;var h=v(c);Pt(h,{get kind(){return n(l).kind}});var d=m(h,2),g=v(d),p=v(g),y=m(p);{var w=R=>{var z=sx(),W=v(z);P(()=>x(W,`×${n(a).lines.length??""}`)),_(R,z)};V(y,R=>{n(a).lines.length>1&&R(w)})}var M=m(g,2),I=v(M),C=v(I),T=m(I,2);{var A=R=>{var z=ix(),W=v(z);P(H=>x(W,H),[()=>n(a).words.join(", ")]),_(R,z)};V(T,R=>{n(a).words.length>0&&R(A)})}var D=m(T,2);{var j=R=>{var z=ax(),W=v(z);P(()=>x(W,`via ${n(a).via??""}`)),_(R,z)};V(D,R=>{n(a).via&&R(j)})}P((R,z)=>{f=Ce(c,1,"rrow svelte-325cso",null,f,R),se(c,"data-target",n(l).id),se(c,"title",z),u=nt(c,"",u,{top:`${n(a).top}px`}),x(p,n(l).name),x(C,n(l).file===t.focalFile?"same file":n(l).file)},[()=>({hot:kt.is(n(l).id),focused:t.focusId!==null&&(n(a).ownerId===t.focusId||n(l).id===t.focusId),uncertain:n(a).call.relation.uncertain}),()=>r(n(a))]),ke("click",c,()=>t.onopen(n(l))),ke("keydown",c,R=>{(R.key==="Enter"||R.key===" ")&&(R.preventDefault(),t.onopen(n(l)))}),Ge("mouseenter",c,()=>{kt.set(n(l).id),t.onhover(n(a))}),Ge("mouseleave",c,()=>{kt.clear(n(l).id),t.onhover(null)}),_(i,c)}),_(e,o),Ie()}mt(["click","keydown"]);var ux=N('

'),dx=N('

'),fx=N('

Loading…

'),vx=N(''),hx=N(' — showing the ones the symbol under the pointer takes part in',1),gx=N(' '),px=N(' ',1),of=N(''),mx=N('
'),_x=N(''),yx=N('

Calls
');function wx(e,t){Ne(t,!0);let r=ae(null),o=ae(null),s=ae(!0),i=ae(un(new Map)),a=new Set,l=new Set,c=ae(null),f=null;et(()=>{const ne=t.path,fe=new AbortController;return Ut(()=>h(ne,fe.signal)),()=>fe.abort()});let u=null;Hu(()=>n(r)?.file.path??t.path,()=>{const ne=t.path;u?.abort(),u=new AbortController,h(ne,u.signal,!0)});async function h(ne,fe,he=!1){he||(L(s,!0),L(o,null),L(r,null),ie=null,L(b,null),L(E,null),L(q,null),n(j)&&(n(j).scrollTop=0)),L(i,new Map,!0),a=new Set,l=new Set,L(c,null),f?.abort(),f=new AbortController;try{const ce=await d1(ne,fe);if(fe.aborted)return;L(r,ce,!0),L(o,null)}catch(ce){if(fe.aborted)return;L(o,ce instanceof Yn?ce:new Yn(0,"error",ce instanceof Error?ce.message:String(ce),null),!0)}finally{fe.aborted||L(s,!1)}}async function d(ne){const fe=n(r)?.file;if(!fe||fe.totalLines===null||a.has(ne)||l.has(ne))return;l.add(ne);const he=Ab(ne,fe.totalLines),ce=f?.signal;try{const we=await Fc(fe.path,he.requestFrom,he.to,ce,n(r)?.drift?"current":void 0);if(ce?.aborted||n(r)?.file.path!==fe.path)return;if(!we.lines){L(c,we.reason??"Source is not available for this file.",!0);return}const de=we.from??he.requestFrom,me=sl(we.lines,de,we.highlight),Te=new Map(n(i));for(const[Pe,Le]of me)Pe>=he.from&&Te.set(Pe,Le);L(i,Te,!0),a.add(ne)}catch(we){if(ce?.aborted)return;L(c,we instanceof Error?we.message:String(we),!0)}finally{l.delete(ne)}}let g=S(()=>n(r)?.drift===!0),p=S(()=>n(r)?.file.totalLines??0),y=S(()=>n(r)&&!n(g)?Ob(n(r)):new Map),w=S(()=>n(r)&&!n(g)?Db(n(r)):[]),M=S(()=>n(r)&&!n(g)?Hb(n(r),n(w)):[]),I=S(()=>n(M).length>Mb),C=S(()=>n(g)?[]:(n(r)?.outline.items??[]).map(ne=>({entry:ne,indent:Math.min(ne.depth,3),dimmed:T.has(ne.kind)})));const T=new Set(["property","field","enum_member","variable","constant"]);let A=S(()=>{const ne=new Map;if(n(g))return ne;for(const fe of n(r)?.outline.items??[])ne.has(fe.line)||ne.set(fe.line,fe.name);return ne}),D=S(()=>{const ne=new Map;for(const fe of n(w))ne.set(fe.call.relation.node.id,fe.call.relation.node);return ne}),j=ae(null),R=ae(null),z=ae(null),W=ae(0),H=ae(0),B=ae(un({x0:0,x1:0,width:0}));et(()=>{const ne=n(j);if(!ne)return;const fe=()=>{L(W,ne.scrollTop,!0),L(H,ne.clientHeight,!0)},he=()=>{fe();const we=n(R),de=n(z);!we||!de||L(B,{x0:we.offsetLeft+we.offsetWidth-10,x1:de.offsetLeft+14,width:ne.scrollWidth},!0)};he(),ne.addEventListener("scroll",fe,{passive:!0});const ce=new ResizeObserver(he);return ce.observe(ne),()=>{ne.removeEventListener("scroll",fe),ce.disconnect()}});let k=S(()=>Ib(n(W),n(H),n(p)));et(()=>{if(!n(r))return;const ne=Pb(n(k).first,n(k).last,n(p));Ut(()=>{for(const fe of ne)d(fe)})});let b=ae(null),E=ae(null),q=ae(null),O=S(()=>nf(n(r)?.outline.items??[],Nb(n(W)+8,n(p)))),K=S(()=>{if(n(E)!==null)return n(E);const ne=n(r)?.outline.items??[];return n(b)!==null?nf(ne,n(b)):n(O)}),Y=S(()=>jb(n(M),n(K),n(I))),G=S(()=>Fb(n(Y),n(k).first,n(k).last)),U=S(()=>Rb(n(w),n(W)-n(H),n(W)+n(H)*2)),X=S(()=>{const{x0:ne,x1:fe}=n(B);if(fe<=ne)return[];const he=(ne+fe)/2,ce=[];for(const we of n(U)){const de=we.top+17,me=Ci(we.call.relation);for(const Te of we.lines){const Pe=Aa(Te);ce.push({d:`M${ne},${Pe} C${he},${Pe} ${he},${de} ${fe},${de}`,targetId:we.call.relation.node.id,uncertain:we.call.relation.uncertain,heuristic:me!==null,origin:!1})}}return ce}),$=S(()=>Math.max(Cb(n(p)),zb(n(w))));function Z(ne){const fe=n(j);fe&&(fe.scrollTop=Math.max(0,Fu(ne)-fe.clientHeight/3),L(q,ne,!0))}function Q(ne){kt.set(ne.targetId),Z(ne.toLine)}function F(ne){if(ne.file===n(r)?.file.path){kt.set(ne.id),Z(ne.line);return}hr({id:ne.id,name:ne.name,kind:ne.kind},"start")}function J(ne){const fe=ne.targetId?n(D).get(ne.targetId):void 0;fe&&F(fe)}function te(ne){L(E,ne?ne.ownerId:null,!0)}let ie=null;et(()=>{const ne=t.line===null?null:`${t.path}:${t.line}`;!ne||!n(r)||ie===ne||!n(j)||n(p)===0||(ie=ne,Z(t.line))});var ge=St(),ve=ye(ge);{var re=ne=>{var fe=dx(),he=v(fe),ce=v(he),we=v(ce),de=m(ce,2),me=v(de),Te=m(de,2),Pe=v(Te),Le=m(Te,2);{var Re=Be=>{var je=ux(),tt=v(je);P(()=>x(tt,n(o).guidance)),_(Be,je)};V(Le,Be=>{n(o).guidance&&Be(Re)})}P(()=>{x(we,n(o).code==="not-found"?"Not in the index":"Could not load this file"),x(me,t.path),x(Pe,n(o).message)}),_(ne,fe)},ee=ne=>{var fe=fx();_(ne,fe)},ue=ne=>{var fe=yx();let he;var ce=v(fe);{var we=Ue=>{var Je=vx(),ft=v(Je);ox(ft,{get rows(){return n(C)},get total(){return n(r).outline.total},get truncated(){return n(r).outline.truncated},get currentId(){return n(O)},ongo:(Mt,_t)=>{kt.set(_t),Z(Mt)}}),_(Ue,Je)};V(ce,Ue=>{n(C).length>0&&Ue(we)})}var de=m(ce,2),me=v(de),Te=v(me),Pe=v(Te);Pt(Pe,{kind:"file"});var Le=m(Pe,2),Re=v(Le),Be=m(Le,2),je=v(Be),tt=m(Be,2),Ze=v(tt),at=m(tt,4);yg(at,{get path(){return n(r).file.path},get line(){return t.line},source:!0});var Ye=m(Te,2);let le;var oe=v(Ye),_e=v(oe),Me=m(_e);{var Fe=Ue=>{var Je=hx(),ft=ye(Je,!0);ft.nodeValue=" ",_(Ue,Je)};V(Me,Ue=>{n(I)&&Ue(Fe)})}var Xe=m(oe,2),dt=m(v(Xe)),Ct=v(dt),Ht=m(dt);{var At=Ue=>{var Je=gx(),ft=v(Je);P(()=>x(ft,`· showing ${n(r).calls.shown??""}`)),_(Ue,Je)};V(Ht,Ue=>{n(r).calls.truncated&&Ue(At)})}var rt=m(Ht);{var ct=Ue=>{var Je=px(),ft=ye(Je,!0);ft.nodeValue=" ";var Mt=m(ft),_t=v(Mt);P(bt=>x(_t,`· ${bt??""} outside the index`),[()=>st(n(r).outside.total,"reference")]),_(Ue,Je)};V(rt,Ue=>{n(r).outside.total>0&&Ue(ct)})}var ze=m(Ye,2);{var be=Ue=>{var Je=of(),ft=v(Je);Na(ft,{get file(){return n(r).file.path},children:(Mt,_t)=>{var bt=wt(`indexed line ranges may be shifted; showing the file's current source, with the - call arcs, ports and rail switched off — they are drawn from lines this file no - longer has. The next sync picks it up.`);_(Mt,bt)}}),_(Ue,Je)},qe=Ue=>{var Je=of(),ft=v(Je);Na(ft,{get file(){return n(r).file.path},children:(Mt,_t)=>{var bt=wt();P(()=>x(bt,n(r).reason??"it could not be read from disk.")),_(Mt,bt)}}),_(Ue,Je)},He=Ue=>{var Je=mx(),ft=v(Je);P(()=>x(ft,n(c))),_(Ue,Je)};V(ze,Ue=>{n(r).drift?Ue(be):n(r).file.totalLines===null?Ue(qe,1):n(c)&&Ue(He,2)})}var Lt=m(me,2);{var qt=Ue=>{var Je=_x(),ft=v(Je);let Mt;var _t=v(ft),bt=v(_t);{var dn=Ke=>{Kb(Ke,{get arcs(){return n(G)},get height(){return n($)},get hoverLine(){return n(b)},onfollow:Q})};V(bt,Ke=>{n(g)||Ke(dn)})}var Jt=m(_t,2),$e=v(Jt);ex($e,{get first(){return n(k).first},get last(){return n(k).last},tokensFor:Ke=>n(i).get(Ke)??null,get refs(){return n(y)},get defNames(){return n(A)},get highlight(){return n(q)},onfollow:J,onhoverline:Ke=>{L(b,Ke,!0)}}),Wt(Jt,Ke=>L(R,Ke),()=>n(R));var We=m(Jt,2),Nt=v(We);{var jt=Ke=>{cx(Ke,{get rows(){return n(U)},get focalFile(){return n(r).file.path},get focusId(){return n(K)},onopen:F,onhover:te})};V(Nt,Ke=>{n(g)||Ke(jt)})}Wt(We,Ke=>L(z,Ke),()=>n(z));var En=m(We,2);gg(En,{get connectors(){return n(X)},get width(){return n(B).width},get height(){return n($)}}),Wt(Je,Ke=>L(j,Ke),()=>n(j)),P(()=>Mt=nt(ft,"",Mt,{height:`${n($)}px`})),Ge("mouseleave",Je,()=>{L(b,null)}),_(Ue,Je)};V(Lt,Ue=>{n(r).file.totalLines!==null&&Ue(qt)})}P((Ue,Je,ft,Mt,_t)=>{he=Ce(fe,1,"codeview svelte-1ykko46",null,he,{wide:n(C).length>0}),x(Re,Ue),x(je,`${n(r).file.language??""} · ${Je??""} · - ${ft??""} · - ${Mt??""}`),x(Ze,n(r).file.path),le=Ce(Ye,1,"toolbar svelte-1ykko46",null,le,{hidden:n(g)}),x(_e,_t),x(Ct,n(r).calls.total)},[()=>gn(n(r).file.path),()=>_g(n(r).file.size),()=>n(r).file.totalLines===null?"length unknown":st(n(r).file.totalLines,"line"),()=>st(n(r).outline.total,"symbol"),()=>Bb(n(r).intraFileCalls)]),_(ne,fe)};V(ve,ne=>{n(o)?ne(re):n(s)||!n(r)?ne(ee,1):ne(ue,-1)})}_(e,ge),Ie()}var bx={value:()=>{}};function il(){for(var e=0,t=arguments.length,r={},o;e=0&&(o=r.slice(s+1),r=r.slice(0,s)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:o}})}da.prototype=il.prototype={constructor:da,on:function(e,t){var r=this._,o=xx(e+"",r),s,i=-1,a=o.length;if(arguments.length<2){for(;++i0)for(var r=new Array(s),o=0,s,i;o=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),af.hasOwnProperty(t)?{space:af[t],local:e}:e}function Ex(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Uc&&t.documentElement.namespaceURI===Uc?t.createElement(e):t.createElementNS(r,e)}}function Sx(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function bg(e){var t=al(e);return(t.local?Sx:Ex)(t)}function Mx(){}function Bu(e){return e==null?Mx:function(){return this.querySelector(e)}}function Tx(e){typeof e!="function"&&(e=Bu(e));for(var t=this._groups,r=t.length,o=new Array(r),s=0;s=C&&(C=I+1);!(A=w[C])&&++C=0;)(a=o[s])&&(i&&a.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(a,i),i=a);return this}function Jx(e){e||(e=$x);function t(h,d){return h&&d?e(h.__data__,d.__data__):!h-!d}for(var r=this._groups,o=r.length,s=new Array(o),i=0;it?1:e>=t?0:NaN}function e2(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function t2(){return Array.from(this)}function n2(){for(var e=this._groups,t=0,r=e.length;t1?this.each((t==null?v2:typeof t=="function"?g2:h2)(e,t,r??"")):cs(this.node(),e)}function cs(e,t){return e.style.getPropertyValue(t)||Mg(e).getComputedStyle(e,null).getPropertyValue(t)}function m2(e){return function(){delete this[e]}}function _2(e,t){return function(){this[e]=t}}function y2(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function w2(e,t){return arguments.length>1?this.each((t==null?m2:typeof t=="function"?y2:_2)(e,t)):this.node()[e]}function Tg(e){return e.trim().split(/^|\s+/)}function Vu(e){return e.classList||new Cg(e)}function Cg(e){this._node=e,this._names=Tg(e.getAttribute("class")||"")}Cg.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function Ng(e,t){for(var r=Vu(e),o=-1,s=t.length;++o=0&&(r=t.slice(o+1),t=t.slice(0,o)),{type:t,name:r}})}function G2(e){return function(){var t=this.__on;if(t){for(var r=0,o=-1,s=t.length,i;r()=>e;function Qc(e,{sourceEvent:t,subject:r,target:o,identifier:s,active:i,x:a,y:l,dx:c,dy:f,dispatch:u}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:o,enumerable:!0,configurable:!0},identifier:{value:s,enumerable:!0,configurable:!0},active:{value:i,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:f,enumerable:!0,configurable:!0},_:{value:u}})}Qc.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function ok(e){return!e.ctrlKey&&!e.button}function sk(){return this.parentNode}function ik(e,t){return t??{x:e.x,y:e.y}}function ak(){return navigator.maxTouchPoints||"ontouchstart"in this}function lk(){var e=ok,t=sk,r=ik,o=ak,s={},i=il("start","drag","end"),a=0,l,c,f,u,h=0;function d(T){T.on("mousedown.drag",g).filter(o).on("touchstart.drag",w).on("touchmove.drag",M,rk).on("touchend.drag touchcancel.drag",I).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(T,A){if(!(u||!e.call(this,T,A))){var D=C(this,t.call(this,T,A),T,A,"mouse");D&&(Un(T.view).on("mousemove.drag",p,gi).on("mouseup.drag",y,gi),Og(T.view),ac(T),f=!1,l=T.clientX,c=T.clientY,D("start",T))}}function p(T){if(Qo(T),!f){var A=T.clientX-l,D=T.clientY-c;f=A*A+D*D>h}s.mouse("drag",T)}function y(T){Un(T.view).on("mousemove.drag mouseup.drag",null),Lg(T.view,f),Qo(T),s.mouse("end",T)}function w(T,A){if(e.call(this,T,A)){var D=T.changedTouches,j=t.call(this,T,A),R=D.length,z,W;for(z=0;z>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Yi(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Yi(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=uk.exec(e))?new Cn(t[1],t[2],t[3],1):(t=dk.exec(e))?new Cn(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=fk.exec(e))?Yi(t[1],t[2],t[3],t[4]):(t=vk.exec(e))?Yi(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=hk.exec(e))?hf(t[1],t[2]/100,t[3]/100,1):(t=gk.exec(e))?hf(t[1],t[2]/100,t[3]/100,t[4]):lf.hasOwnProperty(e)?df(lf[e]):e==="transparent"?new Cn(NaN,NaN,NaN,0):null}function df(e){return new Cn(e>>16&255,e>>8&255,e&255,1)}function Yi(e,t,r,o){return o<=0&&(e=t=r=NaN),new Cn(e,t,r,o)}function _k(e){return e instanceof Ai||(e=Io(e)),e?(e=e.rgb(),new Cn(e.r,e.g,e.b,e.opacity)):new Cn}function Jc(e,t,r,o){return arguments.length===1?_k(e):new Cn(e,t,r,o??1)}function Cn(e,t,r,o){this.r=+e,this.g=+t,this.b=+r,this.opacity=+o}Wu(Cn,Jc,Dg(Ai,{brighter(e){return e=e==null?Oa:Math.pow(Oa,e),new Cn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?pi:Math.pow(pi,e),new Cn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Cn(Mo(this.r),Mo(this.g),Mo(this.b),La(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:ff,formatHex:ff,formatHex8:yk,formatRgb:vf,toString:vf}));function ff(){return`#${xo(this.r)}${xo(this.g)}${xo(this.b)}`}function yk(){return`#${xo(this.r)}${xo(this.g)}${xo(this.b)}${xo((isNaN(this.opacity)?1:this.opacity)*255)}`}function vf(){const e=La(this.opacity);return`${e===1?"rgb(":"rgba("}${Mo(this.r)}, ${Mo(this.g)}, ${Mo(this.b)}${e===1?")":`, ${e})`}`}function La(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Mo(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function xo(e){return e=Mo(e),(e<16?"0":"")+e.toString(16)}function hf(e,t,r,o){return o<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Qn(e,t,r,o)}function Rg(e){if(e instanceof Qn)return new Qn(e.h,e.s,e.l,e.opacity);if(e instanceof Ai||(e=Io(e)),!e)return new Qn;if(e instanceof Qn)return e;e=e.rgb();var t=e.r/255,r=e.g/255,o=e.b/255,s=Math.min(t,r,o),i=Math.max(t,r,o),a=NaN,l=i-s,c=(i+s)/2;return l?(t===i?a=(r-o)/l+(r0&&c<1?0:a,new Qn(a,l,c,e.opacity)}function wk(e,t,r,o){return arguments.length===1?Rg(e):new Qn(e,t,r,o??1)}function Qn(e,t,r,o){this.h=+e,this.s=+t,this.l=+r,this.opacity=+o}Wu(Qn,wk,Dg(Ai,{brighter(e){return e=e==null?Oa:Math.pow(Oa,e),new Qn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?pi:Math.pow(pi,e),new Qn(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,o=r+(r<.5?r:1-r)*t,s=2*r-o;return new Cn(lc(e>=240?e-240:e+120,s,o),lc(e,s,o),lc(e<120?e+240:e-120,s,o),this.opacity)},clamp(){return new Qn(gf(this.h),Xi(this.s),Xi(this.l),La(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=La(this.opacity);return`${e===1?"hsl(":"hsla("}${gf(this.h)}, ${Xi(this.s)*100}%, ${Xi(this.l)*100}%${e===1?")":`, ${e})`}`}}));function gf(e){return e=(e||0)%360,e<0?e+360:e}function Xi(e){return Math.max(0,Math.min(1,e||0))}function lc(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const Ku=e=>()=>e;function bk(e,t){return function(r){return e+r*t}}function xk(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(o){return Math.pow(e+o*t,r)}}function kk(e){return(e=+e)==1?zg:function(t,r){return r-t?xk(t,r,e):Ku(isNaN(t)?r:t)}}function zg(e,t){var r=t-e;return r?bk(e,r):Ku(isNaN(e)?t:e)}const Da=(function e(t){var r=kk(t);function o(s,i){var a=r((s=Jc(s)).r,(i=Jc(i)).r),l=r(s.g,i.g),c=r(s.b,i.b),f=zg(s.opacity,i.opacity);return function(u){return s.r=a(u),s.g=l(u),s.b=c(u),s.opacity=f(u),s+""}}return o.gamma=e,o})(1);function Ek(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,o=t.slice(),s;return function(i){for(s=0;sr&&(i=t.slice(r,i),l[a]?l[a]+=i:l[++a]=i),(o=o[0])===(s=s[0])?l[a]?l[a]+=s:l[++a]=s:(l[++a]=null,c.push({i:a,x:ur(o,s)})),r=cc.lastIndex;return r180?u+=360:u-f>180&&(f+=360),d.push({i:h.push(s(h)+"rotate(",null,o)-2,x:ur(f,u)})):u&&h.push(s(h)+"rotate("+u+o)}function l(f,u,h,d){f!==u?d.push({i:h.push(s(h)+"skewX(",null,o)-2,x:ur(f,u)}):u&&h.push(s(h)+"skewX("+u+o)}function c(f,u,h,d,g,p){if(f!==h||u!==d){var y=g.push(s(g)+"scale(",null,",",null,")");p.push({i:y-4,x:ur(f,h)},{i:y-2,x:ur(u,d)})}else(h!==1||d!==1)&&g.push(s(g)+"scale("+h+","+d+")")}return function(f,u){var h=[],d=[];return f=e(f),u=e(u),i(f.translateX,f.translateY,u.translateX,u.translateY,h,d),a(f.rotate,u.rotate,h,d),l(f.skewX,u.skewX,h,d),c(f.scaleX,f.scaleY,u.scaleX,u.scaleY,h,d),f=u=null,function(g){for(var p=-1,y=d.length,w;++p=0&&e._call.call(void 0,t),e=e._next;--us}function _f(){Ao=(za=_i.now())+ll,us=Us=0;try{qk()}finally{us=0,Fk(),Ao=0}}function jk(){var e=_i.now(),t=e-za;t>Fg&&(ll-=t,za=e)}function Fk(){for(var e,t=Ra,r,o=1/0;t;)t._call?(o>t._time&&(o=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:Ra=r);Qs=e,tu(o)}function tu(e){if(!us){Us&&(Us=clearTimeout(Us));var t=e-Ao;t>24?(e<1/0&&(Us=setTimeout(_f,e-_i.now()-ll)),Rs&&(Rs=clearInterval(Rs))):(Rs||(za=_i.now(),Rs=setInterval(jk,Fg)),us=1,Bg(_f))}}function yf(e,t,r){var o=new Ha;return t=t==null?0:+t,o.restart(s=>{o.stop(),e(s+t)},t,r),o}var Bk=il("start","end","cancel","interrupt"),Vk=[],Wg=0,wf=1,nu=2,va=3,bf=4,ru=5,ha=6;function cl(e,t,r,o,s,i){var a=e.__transition;if(!a)e.__transition={};else if(r in a)return;Wk(e,r,{name:t,index:o,group:s,on:Bk,tween:Vk,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:Wg})}function Xu(e,t){var r=sr(e,t);if(r.state>Wg)throw new Error("too late; already scheduled");return r}function Sr(e,t){var r=sr(e,t);if(r.state>va)throw new Error("too late; already running");return r}function sr(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function Wk(e,t,r){var o=e.__transition,s;o[t]=r,r.timer=Vg(i,0,r.time);function i(f){r.state=wf,r.timer.restart(a,r.delay,r.time),r.delay<=f&&a(f-r.delay)}function a(f){var u,h,d,g;if(r.state!==wf)return c();for(u in o)if(g=o[u],g.name===r.name){if(g.state===va)return yf(a);g.state===bf?(g.state=ha,g.timer.stop(),g.on.call("interrupt",e,e.__data__,g.index,g.group),delete o[u]):+unu&&o.state=0&&(t=t.slice(0,r)),!t||t==="start"})}function wE(e,t,r){var o,s,i=yE(t)?Xu:Sr;return function(){var a=i(this,e),l=a.on;l!==o&&(s=(o=l).copy()).on(t,r),a.on=s}}function bE(e,t){var r=this._id;return arguments.length<2?sr(this.node(),r).on.on(e):this.each(wE(r,e,t))}function xE(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function kE(){return this.on("end.remove",xE(this._id))}function EE(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Bu(e));for(var o=this._groups,s=o.length,i=new Array(s),a=0;a()=>e;function ZE(e,{sourceEvent:t,target:r,transform:o,dispatch:s}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},transform:{value:o,enumerable:!0,configurable:!0},_:{value:s}})}function Or(e,t,r){this.k=e,this.x=t,this.y=r}Or.prototype={constructor:Or,scale:function(e){return e===1?this:new Or(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Or(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var ul=new Or(1,0,0);Gg.prototype=Or.prototype;function Gg(e){for(;!e.__zoom;)if(!(e=e.parentNode))return ul;return e.__zoom}function uc(e){e.stopImmediatePropagation()}function zs(e){e.preventDefault(),e.stopImmediatePropagation()}function UE(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function QE(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function xf(){return this.__zoom||ul}function JE(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function $E(){return navigator.maxTouchPoints||"ontouchstart"in this}function eS(e,t,r){var o=e.invertX(t[0][0])-r[0][0],s=e.invertX(t[1][0])-r[1][0],i=e.invertY(t[0][1])-r[0][1],a=e.invertY(t[1][1])-r[1][1];return e.translate(s>o?(o+s)/2:Math.min(0,o)||Math.max(0,s),a>i?(i+a)/2:Math.min(0,i)||Math.max(0,a))}function tS(){var e=UE,t=QE,r=eS,o=JE,s=$E,i=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],l=250,c=fa,f=il("start","zoom","end"),u,h,d,g=500,p=150,y=0,w=10;function M(b){b.property("__zoom",xf).on("wheel.zoom",R,{passive:!1}).on("mousedown.zoom",z).on("dblclick.zoom",W).filter(s).on("touchstart.zoom",H).on("touchmove.zoom",B).on("touchend.zoom touchcancel.zoom",k).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}M.transform=function(b,E,q,O){var K=b.selection?b.selection():b;K.property("__zoom",xf),b!==K?A(b,E,q,O):K.interrupt().each(function(){D(this,arguments).event(O).start().zoom(null,typeof E=="function"?E.apply(this,arguments):E).end()})},M.scaleBy=function(b,E,q,O){M.scaleTo(b,function(){var K=this.__zoom.k,Y=typeof E=="function"?E.apply(this,arguments):E;return K*Y},q,O)},M.scaleTo=function(b,E,q,O){M.transform(b,function(){var K=t.apply(this,arguments),Y=this.__zoom,G=q==null?T(K):typeof q=="function"?q.apply(this,arguments):q,U=Y.invert(G),X=typeof E=="function"?E.apply(this,arguments):E;return r(C(I(Y,X),G,U),K,a)},q,O)},M.translateBy=function(b,E,q,O){M.transform(b,function(){return r(this.__zoom.translate(typeof E=="function"?E.apply(this,arguments):E,typeof q=="function"?q.apply(this,arguments):q),t.apply(this,arguments),a)},null,O)},M.translateTo=function(b,E,q,O,K){M.transform(b,function(){var Y=t.apply(this,arguments),G=this.__zoom,U=O==null?T(Y):typeof O=="function"?O.apply(this,arguments):O;return r(ul.translate(U[0],U[1]).scale(G.k).translate(typeof E=="function"?-E.apply(this,arguments):-E,typeof q=="function"?-q.apply(this,arguments):-q),Y,a)},O,K)};function I(b,E){return E=Math.max(i[0],Math.min(i[1],E)),E===b.k?b:new Or(E,b.x,b.y)}function C(b,E,q){var O=E[0]-q[0]*b.k,K=E[1]-q[1]*b.k;return O===b.x&&K===b.y?b:new Or(b.k,O,K)}function T(b){return[(+b[0][0]+ +b[1][0])/2,(+b[0][1]+ +b[1][1])/2]}function A(b,E,q,O){b.on("start.zoom",function(){D(this,arguments).event(O).start()}).on("interrupt.zoom end.zoom",function(){D(this,arguments).event(O).end()}).tween("zoom",function(){var K=this,Y=arguments,G=D(K,Y).event(O),U=t.apply(K,Y),X=q==null?T(U):typeof q=="function"?q.apply(K,Y):q,$=Math.max(U[1][0]-U[0][0],U[1][1]-U[0][1]),Z=K.__zoom,Q=typeof E=="function"?E.apply(K,Y):E,F=c(Z.invert(X).concat($/Z.k),Q.invert(X).concat($/Q.k));return function(J){if(J===1)J=Q;else{var te=F(J),ie=$/te[2];J=new Or(ie,X[0]-te[0]*ie,X[1]-te[1]*ie)}G.zoom(null,J)}})}function D(b,E,q){return!q&&b.__zooming||new j(b,E)}function j(b,E){this.that=b,this.args=E,this.active=0,this.sourceEvent=null,this.extent=t.apply(b,E),this.taps=0}j.prototype={event:function(b){return b&&(this.sourceEvent=b),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(b,E){return this.mouse&&b!=="mouse"&&(this.mouse[1]=E.invert(this.mouse[0])),this.touch0&&b!=="touch"&&(this.touch0[1]=E.invert(this.touch0[0])),this.touch1&&b!=="touch"&&(this.touch1[1]=E.invert(this.touch1[0])),this.that.__zoom=E,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(b){var E=Un(this.that).datum();f.call(b,this.that,new ZE(b,{sourceEvent:this.sourceEvent,target:M,transform:this.that.__zoom,dispatch:f}),E)}};function R(b,...E){if(!e.apply(this,arguments))return;var q=D(this,E).event(b),O=this.__zoom,K=Math.max(i[0],Math.min(i[1],O.k*Math.pow(2,o.apply(this,arguments)))),Y=lr(b);if(q.wheel)(q.mouse[0][0]!==Y[0]||q.mouse[0][1]!==Y[1])&&(q.mouse[1]=O.invert(q.mouse[0]=Y)),clearTimeout(q.wheel);else{if(O.k===K)return;q.mouse=[Y,O.invert(Y)],ga(this),q.start()}zs(b),q.wheel=setTimeout(G,p),q.zoom("mouse",r(C(I(O,K),q.mouse[0],q.mouse[1]),q.extent,a));function G(){q.wheel=null,q.end()}}function z(b,...E){if(d||!e.apply(this,arguments))return;var q=b.currentTarget,O=D(this,E,!0).event(b),K=Un(b.view).on("mousemove.zoom",X,!0).on("mouseup.zoom",$,!0),Y=lr(b,q),G=b.clientX,U=b.clientY;Og(b.view),uc(b),O.mouse=[Y,this.__zoom.invert(Y)],ga(this),O.start();function X(Z){if(zs(Z),!O.moved){var Q=Z.clientX-G,F=Z.clientY-U;O.moved=Q*Q+F*F>y}O.event(Z).zoom("mouse",r(C(O.that.__zoom,O.mouse[0]=lr(Z,q),O.mouse[1]),O.extent,a))}function $(Z){K.on("mousemove.zoom mouseup.zoom",null),Lg(Z.view,O.moved),zs(Z),O.event(Z).end()}}function W(b,...E){if(e.apply(this,arguments)){var q=this.__zoom,O=lr(b.changedTouches?b.changedTouches[0]:b,this),K=q.invert(O),Y=q.k*(b.shiftKey?.5:2),G=r(C(I(q,Y),O,K),t.apply(this,E),a);zs(b),l>0?Un(this).transition().duration(l).call(A,G,O,b):Un(this).call(M.transform,G,O,b)}}function H(b,...E){if(e.apply(this,arguments)){var q=b.touches,O=q.length,K=D(this,E,b.changedTouches.length===O).event(b),Y,G,U,X;for(uc(b),G=0;G`Seems like you have not used ${e==="svelte"?"SvelteFlowProvider":"ReactFlowProvider"} as an ancestor. Help: https://${e}flow.dev/error#001`,error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:t,sourceHandle:r,targetHandle:o})=>`Couldn't create edge for ${e} handle id: "${e==="source"?r:o}", edge id: ${t}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs.",error016:e=>`Edge with id "${e}" does not exist, it may have been removed. This can happen when an edge is deleted before the "onEdgeClick" handler is called.`},ou=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],Zg=["Enter"," ","Escape"],nS={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:e,x:t,y:r})=>`Moved selected node ${e}. New position, x: ${t}, y: ${r}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var ds;(function(e){e.Strict="strict",e.Loose="loose"})(ds||(ds={}));var $o;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})($o||($o={}));var qa;(function(e){e.Partial="partial",e.Full="full"})(qa||(qa={}));const su={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var eo;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(eo||(eo={}));var ja;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(ja||(ja={}));var Ve;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(Ve||(Ve={}));const kf={[Ve.Left]:Ve.Right,[Ve.Right]:Ve.Left,[Ve.Top]:Ve.Bottom,[Ve.Bottom]:Ve.Top},Ug=e=>!!e&&typeof e=="object"&&"id"in e&&"source"in e&&"target"in e,rS=e=>!!e&&typeof e=="object"&&"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),Zu=e=>!!e&&typeof e=="object"&&"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),Pi=(e,t=[0,0])=>{const{width:r,height:o}=Br(e),s=e.origin??t,i=r*s[0],a=o*s[1];return{x:e.position.x-i,y:e.position.y-a}},oS=(e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};let r=!1;const o=e.reduce((s,i)=>{const a=typeof i=="string";let l=!t.nodeLookup&&!a?i:void 0;return t.nodeLookup&&(l=a?t.nodeLookup.get(i):Zu(i)?i:t.nodeLookup.get(i.id)),l?(r=!0,fl(s,Fa(l,t.nodeOrigin))):s},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return r?vl(o):{x:0,y:0,width:0,height:0}},dl=(e,t={})=>{let r={x:1/0,y:1/0,x2:-1/0,y2:-1/0},o=!1;return e.forEach(s=>{(t.filter===void 0||t.filter(s))&&(r=fl(r,Fa(s)),o=!0)}),o?vl(r):{x:0,y:0,width:0,height:0}},Uu=(e,t,[r,o,s]=[0,0,1],i=!1,a=!1)=>{const l=(t.x-r)/s,c=(t.y-o)/s,f=t.width/s,u=t.height/s,h=[];for(const d of e.values()){const{measured:g,selectable:p=!0,hidden:y=!1}=d;if(a&&!p||y)continue;const w=g.width??d.width??d.initialWidth??0,M=g.height??d.height??d.initialHeight??0,{x:I,y:C}=d.internals.positionAbsolute,T=$g(l,c,f,u,I,C,w,M),A=w*M,D=i&&T>0;(!d.internals.handleBounds||D||T>=A||d.dragging)&&h.push(d)}return h},sS=(e,t)=>{const r=new Set;return e.forEach(o=>{r.add(o.id)}),t.filter(o=>r.has(o.source)||r.has(o.target))};function iS(e,t){const r=new Map,o=t?.nodes?new Set(t.nodes.map(s=>s.id)):null;return e.forEach(s=>{let i;if(t?.includeHiddenNodes){const{width:a,height:l}=Br(s);i=a>0&&l>0}else i=!!(s.measured.width&&s.measured.height&&!s.hidden);i&&(!o||o.has(s.id))&&r.set(s.id,s)}),r}async function aS({nodes:e,width:t,height:r,panZoom:o,minZoom:s,maxZoom:i},a){if(e.size===0)return!0;const l=iS(e,a),c=dl(l),f=Ju(c,t,r,a?.minZoom??s,a?.maxZoom??i,a?.padding??.1);return await o.setViewport(f,{duration:a?.duration,ease:a?.ease,interpolate:a?.interpolate}),!0}function Qg({nodeId:e,nextPosition:t,nodeLookup:r,nodeOrigin:o=[0,0],nodeExtent:s,onError:i}){const a=r.get(e),l=a.parentId?r.get(a.parentId):void 0,{x:c,y:f}=l?l.internals.positionAbsolute:{x:0,y:0},u=a.origin??o;let h=a.extent||s;if(a.extent==="parent"&&!a.expandParent)if(!l)i?.("005",Po.error005());else{const{width:g,height:p}=Br(l);g&&p&&(h=[[c,f],[c+g,f+p]])}else l&&hs(a.extent)&&(h=[[a.extent[0][0]+c,a.extent[0][1]+f],[a.extent[1][0]+c,a.extent[1][1]+f]]);const d=hs(h)?Oo(t,h,a.measured):t;return(a.measured.width===void 0||a.measured.height===void 0)&&i?.("015",Po.error015()),{position:{x:d.x-c+(a.measured.width??0)*u[0],y:d.y-f+(a.measured.height??0)*u[1]},positionAbsolute:d}}async function lS({nodesToRemove:e=[],edgesToRemove:t=[],nodes:r,edges:o,onBeforeDelete:s}){const i=new Set(e.map(d=>d.id)),a=[];for(const d of r){if(d.deletable===!1)continue;const g=i.has(d.id),p=!g&&d.parentId&&a.find(y=>y.id===d.parentId);(g||p)&&a.push(d)}const l=new Set(t.map(d=>d.id)),c=o.filter(d=>d.deletable!==!1),u=sS(a,c);for(const d of c)l.has(d.id)&&!u.find(p=>p.id===d.id)&&u.push(d);if(!s)return{edges:u,nodes:a};const h=await s({nodes:a,edges:u});return typeof h=="boolean"?h?{edges:u,nodes:a}:{edges:[],nodes:[]}:h}const fs=(e,t=0,r=1)=>Math.min(Math.max(e,t),r),Oo=(e={x:0,y:0},t,r)=>({x:fs(e.x,t[0][0],t[1][0]-(r?.width??0)),y:fs(e.y,t[0][1],t[1][1]-(r?.height??0))});function Jg(e,t,r){const{width:o,height:s}=Br(r),{x:i,y:a}=r.internals.positionAbsolute;return Oo(e,[[i,a],[i+o,a+s]],t)}const Ef=(e,t,r)=>er?-fs(Math.abs(e-r),1,t)/t:0,Qu=(e,t,r=15,o=40)=>{const s=Ef(e.x,o,t.width-o)*r,i=Ef(e.y,o,t.height-o)*r;return[s,i]},fl=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),iu=({x:e,y:t,width:r,height:o})=>({x:e,y:t,x2:e+r,y2:t+o}),vl=({x:e,y:t,x2:r,y2:o})=>({x:e,y:t,width:r-e,height:o-t}),yi=(e,t=[0,0])=>{const{x:r,y:o}=Zu(e)?e.internals.positionAbsolute:Pi(e,t);return{x:r,y:o,width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}},Fa=(e,t=[0,0])=>{const{x:r,y:o}=Zu(e)?e.internals.positionAbsolute:Pi(e,t);return{x:r,y:o,x2:r+(e.measured?.width??e.width??e.initialWidth??0),y2:o+(e.measured?.height??e.height??e.initialHeight??0)}},cS=(e,t)=>vl(fl(iu(e),iu(t))),$g=(e,t,r,o,s,i,a,l)=>{const c=Math.max(0,Math.min(e+r,s+a)-Math.max(e,s)),f=Math.max(0,Math.min(t+o,i+l)-Math.max(t,i));return Math.ceil(c*f)},Ba=(e,t)=>$g(e.x,e.y,e.width,e.height,t.x,t.y,t.width,t.height),Sf=e=>Lr(e.width)&&Lr(e.height)&&Lr(e.x)&&Lr(e.y),Lr=e=>!isNaN(e)&&isFinite(e),ep=(e,t)=>(r,o)=>{},Oi=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),Li=({x:e,y:t},[r,o,s],i=!1,a=[1,1])=>{const l={x:(e-r)/s,y:(t-o)/s};return i?Oi(l,a):l},vs=({x:e,y:t},[r,o,s])=>({x:e*s+r,y:t*s+o});function Bo(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const r=parseFloat(e);if(!Number.isNaN(r))return Math.floor(r)}if(typeof e=="string"&&e.endsWith("%")){const r=parseFloat(e);if(!Number.isNaN(r))return Math.floor(t*r*.01)}return console.error(`The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function uS(e,t,r){if(typeof e=="string"||typeof e=="number"){const o=Bo(e,r),s=Bo(e,t);return{top:o,right:s,bottom:o,left:s,x:s*2,y:o*2}}if(typeof e=="object"){const o=Bo(e.top??e.y??0,r),s=Bo(e.bottom??e.y??0,r),i=Bo(e.left??e.x??0,t),a=Bo(e.right??e.x??0,t);return{top:o,right:a,bottom:s,left:i,x:i+a,y:o+s}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function dS(e,t,r,o,s,i){const{x:a,y:l}=vs(e,[t,r,o]),{x:c,y:f}=vs({x:e.x+e.width,y:e.y+e.height},[t,r,o]),u=s-c,h=i-f;return{left:Math.floor(a),top:Math.floor(l),right:Math.floor(u),bottom:Math.floor(h)}}const Ju=(e,t,r,o,s,i)=>{const a=uS(i,t,r),l=(t-a.x)/e.width,c=(r-a.y)/e.height,f=Math.min(l,c),u=fs(f,o,s),h=e.x+e.width/2,d=e.y+e.height/2,g=t/2-h*u,p=r/2-d*u,y=dS(e,g,p,u,t,r),w={left:Math.min(y.left-a.left,0),top:Math.min(y.top-a.top,0),right:Math.min(y.right-a.right,0),bottom:Math.min(y.bottom-a.bottom,0)};return{x:g-w.left+w.right,y:p-w.top+w.bottom,zoom:u}},Va=()=>typeof navigator<"u"&&navigator?.userAgent?.indexOf("Mac")>=0;function hs(e){return e!=null&&e!=="parent"}function Br(e){return{width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}}function fS(e){return(e.measured?.width??e.width??e.initialWidth)!==void 0&&(e.measured?.height??e.height??e.initialHeight)!==void 0}function vS(e,t={width:0,height:0},r,o,s){const i={...e},a=o.get(r);if(a){const l=a.origin||s;i.x+=a.internals.positionAbsolute.x-(t.width??0)*l[0],i.y+=a.internals.positionAbsolute.y-(t.height??0)*l[1]}return i}function hS(e){return{...nS,...e||{}}}function gS(e,t){if(!e&&!t)return!0;if(!e||!t||e.size!==t.size)return!1;if(!e.size&&!t.size)return!0;for(const r of e.keys())if(!t.has(r))return!1;return!0}function Mf(e,t,r){if(!r)return;const o=[];e.forEach((s,i)=>{t?.has(i)||o.push(s)}),o.length&&r(o)}function pS(e){return e===null?null:e?"valid":"invalid"}function dc(e,{snapGrid:t=[0,0],snapToGrid:r=!1,transform:o,containerBounds:s}){const{x:i,y:a}=rr(e),l=Li({x:i-(s?.left??0),y:a-(s?.top??0)},o),{x:c,y:f}=r?Oi(l,t):l;return{xSnapped:c,ySnapped:f,...l}}const tp=e=>({width:e.offsetWidth,height:e.offsetHeight}),np=e=>e?.getRootNode?.()||window?.document,mS=["INPUT","SELECT","TEXTAREA"];function rp(e){const t=e.composedPath?.()?.[0]||e.target;return t?.nodeType!==1?!1:mS.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const op=e=>"clientX"in e,rr=(e,t)=>{const r=op(e),o=r?e.clientX:e.touches?.[0].clientX,s=r?e.clientY:e.touches?.[0].clientY;return{x:o-(t?.left??0),y:s-(t?.top??0)}},Tf=(e,t,r,o,s)=>{const i=t.querySelectorAll(`.${e}`);return!i||!i.length?null:Array.from(i).map(a=>{const l=a.getBoundingClientRect();return{id:a.getAttribute("data-handleid"),type:e,nodeId:s,position:a.getAttribute("data-handlepos"),x:(l.left-r.left)/o,y:(l.top-r.top)/o,...tp(a)}})};function _S({sourceX:e,sourceY:t,targetX:r,targetY:o,sourceControlX:s,sourceControlY:i,targetControlX:a,targetControlY:l}){const c=e*.125+s*.375+a*.375+r*.125,f=t*.125+i*.375+l*.375+o*.125,u=Math.abs(c-e),h=Math.abs(f-t);return[c,f,u,h]}function Ui(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function Cf({pos:e,x1:t,y1:r,x2:o,y2:s,c:i}){switch(e){case Ve.Left:return[t-Ui(t-o,i),r];case Ve.Right:return[t+Ui(o-t,i),r];case Ve.Top:return[t,r-Ui(r-s,i)];case Ve.Bottom:return[t,r+Ui(s-r,i)]}}function sp({sourceX:e,sourceY:t,sourcePosition:r=Ve.Bottom,targetX:o,targetY:s,targetPosition:i=Ve.Top,curvature:a=.25}){const[l,c]=Cf({pos:r,x1:e,y1:t,x2:o,y2:s,c:a}),[f,u]=Cf({pos:i,x1:o,y1:s,x2:e,y2:t,c:a}),[h,d,g,p]=_S({sourceX:e,sourceY:t,targetX:o,targetY:s,sourceControlX:l,sourceControlY:c,targetControlX:f,targetControlY:u});return[`M${e},${t} C${l},${c} ${f},${u} ${o},${s}`,h,d,g,p]}function ip({sourceX:e,sourceY:t,targetX:r,targetY:o}){const s=Math.abs(r-e)/2,i=r0}const bS=({source:e,sourceHandle:t,target:r,targetHandle:o})=>`xy-edge__${e}${t||""}-${r}${o||""}`,xS=(e,t)=>t.some(r=>r.source===e.source&&r.target===e.target&&(r.sourceHandle===e.sourceHandle||!r.sourceHandle&&!e.sourceHandle)&&(r.targetHandle===e.targetHandle||!r.targetHandle&&!e.targetHandle)),kS=(e,t,r={})=>{if(!e.source||!e.target)return r.onError?.("006",Po.error006()),t;const o=r.getEdgeId||bS;let s;return Ug(e)?s={...e}:s={...e,id:o(e)},xS(s,t)?t:(s.sourceHandle===null&&delete s.sourceHandle,s.targetHandle===null&&delete s.targetHandle,t.concat(s))};function ap({sourceX:e,sourceY:t,targetX:r,targetY:o}){const[s,i,a,l]=ip({sourceX:e,sourceY:t,targetX:r,targetY:o});return[`M ${e},${t}L ${r},${o}`,s,i,a,l]}const Nf={[Ve.Left]:{x:-1,y:0},[Ve.Right]:{x:1,y:0},[Ve.Top]:{x:0,y:-1},[Ve.Bottom]:{x:0,y:1}},ES=({source:e,sourcePosition:t=Ve.Bottom,target:r})=>t===Ve.Left||t===Ve.Right?e.xMath.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function SS({source:e,sourcePosition:t=Ve.Bottom,target:r,targetPosition:o=Ve.Top,center:s,offset:i,stepPosition:a}){const l=Nf[t],c=Nf[o],f={x:e.x+l.x*i,y:e.y+l.y*i},u={x:r.x+c.x*i,y:r.y+c.y*i},h=ES({source:f,sourcePosition:t,target:u}),d=h.x!==0?"x":"y",g=h[d];let p=[],y,w;const M={x:0,y:0},I={x:0,y:0},[,,C,T]=ip({sourceX:e.x,sourceY:e.y,targetX:r.x,targetY:r.y});if(l[d]*c[d]===-1){d==="x"?(y=s.x??f.x+(u.x-f.x)*a,w=s.y??(f.y+u.y)/2):(y=s.x??(f.x+u.x)/2,w=s.y??f.y+(u.y-f.y)*a);const R=[{x:y,y:f.y},{x:y,y:u.y}],z=[{x:f.x,y:w},{x:u.x,y:w}];l[d]===g?p=d==="x"?R:z:p=d==="x"?z:R}else{const R=[{x:f.x,y:u.y}],z=[{x:u.x,y:f.y}];if(d==="x"?p=l.x===g?z:R:p=l.y===g?R:z,t===o){const b=Math.abs(e[d]-r[d]);if(b<=i){const E=Math.min(i-1,i-b);l[d]===g?M[d]=(f[d]>e[d]?-1:1)*E:I[d]=(u[d]>r[d]?-1:1)*E}}if(t!==o){const b=d==="x"?"y":"x",E=l[d]===c[b],q=f[b]>u[b],O=f[b]=k?(y=(W.x+H.x)/2,w=p[0].y):(y=p[0].x,w=(W.y+H.y)/2)}const A={x:f.x+M.x,y:f.y+M.y},D={x:u.x+I.x,y:u.y+I.y};return[[e,...A.x!==p[0].x||A.y!==p[0].y?[A]:[],...p,...D.x!==p[p.length-1].x||D.y!==p[p.length-1].y?[D]:[],r],y,w,C,T]}function MS(e,t,r,o){const s=Math.min(If(e,t)/2,If(t,r)/2,o),{x:i,y:a}=t;if(e.x===i&&i===r.x||e.y===a&&a===r.y)return`L${i} ${a}`;if(e.y===a){const f=e.xr.id===t):e[0])||null}function au(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(o=>`${o}=${e[o]}`).join("&")}`:""}function CS(e,{id:t,defaultColor:r,defaultMarkerStart:o,defaultMarkerEnd:s}){const i=new Set;return e.reduce((a,l)=>([l.markerStart||o,l.markerEnd||s].forEach(c=>{if(c&&typeof c=="object"){const f=au(c,t);i.has(f)||(a.push({id:f,color:c.color||r,...c}),i.add(f))}}),a),[]).sort((a,l)=>a.id.localeCompare(l.id))}const lp=1e3,NS=10,ed={nodeOrigin:[0,0],nodeExtent:ou,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},IS={...ed,checkEquality:!0};function td(e,t){const r={...e};for(const o in t)t[o]!==void 0&&(r[o]=t[o]);return r}function AS(e,t,r){const o=td(ed,r);for(const s of e.values())if(s.parentId)rd(s,e,t,o);else{const i=Pi(s,o.nodeOrigin),a=hs(s.extent)?s.extent:o.nodeExtent,l=Oo(i,a,Br(s));s.internals.positionAbsolute=l}}function PS(e,t){if(!e.handles)return e.measured?t?.internals.handleBounds:void 0;const r=[],o=[];for(const s of e.handles){const i={id:s.id,width:s.width??1,height:s.height??1,nodeId:e.id,x:s.x,y:s.y,position:s.position,type:s.type};s.type==="source"?r.push(i):s.type==="target"&&o.push(i)}return{source:r,target:o}}function nd(e){return e==="manual"}function OS(e,t,r,o={}){const s=td(IS,o),i={i:0},a=new Map(t),l=s?.elevateNodesOnSelect&&!nd(s.zIndexMode)?lp:0;let c=e.length>0,f=!1;t.clear(),r.clear();for(const u of e){let h=a.get(u.id);if(s.checkEquality&&u===h?.internals.userNode)t.set(u.id,h);else{const d=Pi(u,s.nodeOrigin),g=hs(u.extent)?u.extent:s.nodeExtent,p=Oo(d,g,Br(u));h={...s.defaults,...u,measured:{width:u.measured?.width,height:u.measured?.height},internals:{positionAbsolute:p,handleBounds:PS(u,h),z:cp(u,l,s.zIndexMode),userNode:u}},t.set(u.id,h)}(h.measured===void 0||h.measured.width===void 0||h.measured.height===void 0)&&!h.hidden&&(c=!1),u.parentId&&rd(h,t,r,o,i),f||=u.selected??!1}return{nodesInitialized:c,hasSelectedNodes:f}}function LS(e,t){if(!e.parentId)return;const r=t.get(e.parentId);r?r.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function rd(e,t,r,o,s){const{elevateNodesOnSelect:i,nodeOrigin:a,nodeExtent:l,zIndexMode:c}=td(ed,o),f=e.parentId,u=t.get(f);if(!u){console.warn(`Parent node ${f} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}LS(e,r),s&&!u.parentId&&u.internals.rootParentIndex===void 0&&c==="auto"&&(u.internals.rootParentIndex=++s.i,u.internals.z=u.internals.z+s.i*NS),s&&u.internals.rootParentIndex!==void 0&&(s.i=u.internals.rootParentIndex);const h=i&&!nd(c)?lp:0,{x:d,y:g,z:p}=DS(e,u,a,l,h,c),{positionAbsolute:y}=e.internals,w=d!==y.x||g!==y.y;(w||p!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:w?{x:d,y:g}:y,z:p}})}function cp(e,t,r){const o=Lr(e.zIndex)?e.zIndex:0;return nd(r)?o:o+(e.selected?t:0)}function DS(e,t,r,o,s,i){const{x:a,y:l}=t.internals.positionAbsolute,c=Br(e),f=Pi(e,r),u=hs(e.extent)?Oo(f,e.extent,c):f;let h=Oo({x:a+u.x,y:l+u.y},o,c);e.extent==="parent"&&(h=Jg(h,c,t));const d=cp(e,s,i),g=t.internals.z??0;return{x:h.x,y:h.y,z:g>=d?g+1:d}}function RS(e,t,r,o=[0,0]){const s=[],i=new Map;for(const a of e){const l=t.get(a.parentId);if(!l)continue;const c=i.get(a.parentId)?.expandedRect??yi(l),f=cS(c,a.rect);i.set(a.parentId,{expandedRect:f,parent:l})}return i.size>0&&i.forEach(({expandedRect:a,parent:l},c)=>{const f=l.internals.positionAbsolute,u=Br(l),h=l.origin??o,d=a.x0||g>0||w||M)&&(s.push({id:c,type:"position",position:{x:l.position.x-d+w,y:l.position.y-g+M}}),r.get(c)?.forEach(I=>{e.some(C=>C.id===I.id)||s.push({id:I.id,type:"position",position:{x:I.position.x+d,y:I.position.y+g}})})),(u.width0){const g=RS(d,t,r,s);f.push(...g)}return{changes:f,updatedInternals:c}}async function HS({delta:e,panZoom:t,transform:r,translateExtent:o,width:s,height:i}){if(!t||!e.x&&!e.y)return!1;const a=await t.setViewportConstrained({x:r[0]+e.x,y:r[1]+e.y,zoom:r[2]},[[0,0],[s,i]],o);return!!a&&(a.x!==r[0]||a.y!==r[1]||a.k!==r[2])}function Lf(e,t,r,o,s,i){let a=s;const l=o.get(a)||new Map;o.set(a,l.set(r,t)),a=`${s}-${e}`;const c=o.get(a)||new Map;if(o.set(a,c.set(r,t)),i){a=`${s}-${e}-${i}`;const f=o.get(a)||new Map;o.set(a,f.set(r,t))}}function qS(e,t,r){e.clear(),t.clear();for(const o of r){const{source:s,target:i,sourceHandle:a=null,targetHandle:l=null}=o,c={edgeId:o.id,source:s,target:i,sourceHandle:a,targetHandle:l},f=`${s}-${a}--${i}-${l}`,u=`${i}-${l}--${s}-${a}`;Lf("source",c,u,e,s,a),Lf("target",c,f,e,i,l),t.set(o.id,o)}}function up(e,t){if(!e.parentId)return!1;const r=t.get(e.parentId);return r?r.selected?!0:up(r,t):!1}function Df(e,t,r){let o=e;do{if(o?.matches?.(t))return!0;if(o===r)return!1;o=o?.parentElement}while(o);return!1}function jS(e,t,r,o){const s=new Map;for(const[i,a]of e)if((a.selected||a.id===o)&&(!a.parentId||!up(a,e))&&(a.draggable||t&&typeof a.draggable>"u")){const l=e.get(i);l&&s.set(i,{id:i,position:l.position||{x:0,y:0},distance:{x:r.x-l.internals.positionAbsolute.x,y:r.y-l.internals.positionAbsolute.y},extent:l.extent,parentId:l.parentId,origin:l.origin,expandParent:l.expandParent,internals:{positionAbsolute:l.internals.positionAbsolute||{x:0,y:0}},measured:{width:l.measured.width??0,height:l.measured.height??0}})}return s}function fc({nodeId:e,dragItems:t,nodeLookup:r,dragging:o=!0}){const s=[];for(const[a,l]of t){const c=r.get(a)?.internals.userNode;c&&s.push({...c,position:l.position,dragging:o})}if(!e)return[s[0],s];const i=r.get(e)?.internals.userNode;return[i?{...i,position:t.get(e)?.position||i.position,dragging:o}:s[0],s]}function FS({dragItems:e,snapGrid:t,x:r,y:o}){const s=e.values().next().value;if(!s)return null;const i={x:r-s.distance.x,y:o-s.distance.y},a=Oi(i,t);return{x:a.x-i.x,y:a.y-i.y}}function BS({onNodeMouseDown:e,getStoreItems:t,onDragStart:r,onDrag:o,onDragStop:s}){let i={x:null,y:null},a=0,l=new Map,c=!1,f={x:0,y:0},u=null,h=!1,d=null,g=!1,p=!1,y=null;function w({noDragClassName:I,handleSelector:C,domNode:T,isSelectable:A,nodeId:D,nodeClickDistance:j=0}){d=Un(T);function R({x:B,y:k}){const{nodeLookup:b,nodeExtent:E,snapGrid:q,snapToGrid:O,nodeOrigin:K,onNodeDrag:Y,onSelectionDrag:G,onError:U,updateNodePositions:X}=t();i={x:B,y:k};let $=!1;const Z=l.size>1,Q=Z&&E?iu(dl(l)):null,F=Z&&O?FS({dragItems:l,snapGrid:q,x:B,y:k}):null;for(const[J,te]of l){if(!b.has(J))continue;let ie={x:B-te.distance.x,y:k-te.distance.y};O&&(ie=F?{x:Math.round(ie.x+F.x),y:Math.round(ie.y+F.y)}:Oi(ie,q));let ge=null;if(Z&&E&&!te.extent&&Q){const{positionAbsolute:ee}=te.internals,ue=ee.x-Q.x+E[0][0],ne=ee.x+te.measured.width-Q.x2+E[1][0],fe=ee.y-Q.y+E[0][1],he=ee.y+te.measured.height-Q.y2+E[1][1];ge=[[ue,fe],[ne,he]]}const{position:ve,positionAbsolute:re}=Qg({nodeId:J,nextPosition:ie,nodeLookup:b,nodeExtent:ge||E,nodeOrigin:K,onError:U});$=$||te.position.x!==ve.x||te.position.y!==ve.y,te.position=ve,te.internals.positionAbsolute=re}if(p=p||$,!!$&&(X(l,!0),y&&(o||Y||!D&&G))){const[J,te]=fc({nodeId:D,dragItems:l,nodeLookup:b});o?.(y,l,J,te),Y?.(y,J,te),D||G?.(y,te)}}async function z(){if(!u)return;const{transform:B,panBy:k,autoPanSpeed:b,autoPanOnNodeDrag:E}=t();if(!E){c=!1,cancelAnimationFrame(a);return}const[q,O]=Qu(f,u,b);(q!==0||O!==0)&&(i.x=(i.x??0)-q/B[2],i.y=(i.y??0)-O/B[2],await k({x:q,y:O})&&R(i)),a=requestAnimationFrame(z)}function W(B){const{nodeLookup:k,multiSelectionActive:b,nodesDraggable:E,transform:q,snapGrid:O,snapToGrid:K,selectNodesOnDrag:Y,onNodeDragStart:G,onSelectionDragStart:U,unselectNodesAndEdges:X}=t();h=!0,(!Y||!A)&&!b&&D&&(k.get(D)?.selected||X()),A&&Y&&D&&e?.(D);const $=dc(B.sourceEvent,{transform:q,snapGrid:O,snapToGrid:K,containerBounds:u});if(i=$,l=jS(k,E,$,D),l.size>0&&(r||G||!D&&U)){const[Z,Q]=fc({nodeId:D,dragItems:l,nodeLookup:k});r?.(B.sourceEvent,l,Z,Q),G?.(B.sourceEvent,Z,Q),D||U?.(B.sourceEvent,Q)}}const H=lk().clickDistance(j).on("start",B=>{const{domNode:k,nodeDragThreshold:b,transform:E,snapGrid:q,snapToGrid:O}=t();u=k?.getBoundingClientRect()||null,g=!1,p=!1,y=B.sourceEvent,b===0&&W(B),i=dc(B.sourceEvent,{transform:E,snapGrid:q,snapToGrid:O,containerBounds:u}),f=rr(B.sourceEvent,u)}).on("drag",B=>{const{autoPanOnNodeDrag:k,transform:b,snapGrid:E,snapToGrid:q,nodeDragThreshold:O,nodeLookup:K}=t(),Y=dc(B.sourceEvent,{transform:b,snapGrid:E,snapToGrid:q,containerBounds:u});if(y=B.sourceEvent,(B.sourceEvent.type==="touchmove"&&B.sourceEvent.touches.length>1||D&&!K.has(D))&&(g=!0),!g){if(!c&&k&&h&&(c=!0,z()),!h){const G=rr(B.sourceEvent,u),U=G.x-f.x,X=G.y-f.y;Math.sqrt(U*U+X*X)>O&&W(B)}(i.x!==Y.xSnapped||i.y!==Y.ySnapped)&&l&&h&&(f=rr(B.sourceEvent,u),R(Y))}}).on("end",B=>{if(!h||g){g&&l.size>0&&t().updateNodePositions(l,!1);return}if(c=!1,h=!1,cancelAnimationFrame(a),l.size>0){const{nodeLookup:k,updateNodePositions:b,onNodeDragStop:E,onSelectionDragStop:q}=t();if(p&&(b(l,!1),p=!1),s||E||!D&&q){const[O,K]=fc({nodeId:D,dragItems:l,nodeLookup:k,dragging:!1});s?.(B.sourceEvent,l,O,K),E?.(B.sourceEvent,O,K),D||q?.(B.sourceEvent,K)}}}).filter(B=>{const k=B.target;return!B.button&&(!I||!Df(k,`.${I}`,T))&&(!C||Df(k,C,T))});d.call(H)}function M(){d?.on(".drag",null)}return{update:w,destroy:M}}function VS(e,t,r){const o=[],s={x:e.x-r,y:e.y-r,width:r*2,height:r*2};for(const i of t.values())Ba(s,yi(i))>0&&o.push(i);return o}const WS=250;function KS(e,t,r,o){let s=[],i=1/0;const a=VS(e,r,t+WS);for(const l of a){const c=[...l.internals.handleBounds?.source??[],...l.internals.handleBounds?.target??[]];for(const f of c){if(o.nodeId===f.nodeId&&o.type===f.type&&o.id===f.id)continue;const{x:u,y:h}=Lo(l,f,f.position,!0),d=Math.sqrt(Math.pow(u-e.x,2)+Math.pow(h-e.y,2));d>t||(d1){const l=o.type==="source"?"target":"source";return s.find(c=>c.type===l)??s[0]}return s[0]}function dp(e,t,r,o,s,i=!1){const a=o.get(e);if(!a)return null;const l=s==="strict"?a.internals.handleBounds?.[t]:[...a.internals.handleBounds?.source??[],...a.internals.handleBounds?.target??[]],c=(r?l?.find(f=>f.id===r):l?.[0])??null;return c&&i?{...c,...Lo(a,c,c.position,!0)}:c}function fp(e,t){return e||(t?.classList.contains("target")?"target":t?.classList.contains("source")?"source":null)}function YS(e,t){let r=null;return t?r=!0:e&&!t&&(r=!1),r}const vp=()=>!0;function XS(e,{connectionMode:t,connectionRadius:r,handleId:o,nodeId:s,edgeUpdaterType:i,isTarget:a,domNode:l,nodeLookup:c,lib:f,autoPanOnConnect:u,flowId:h,panBy:d,cancelConnection:g,onConnectStart:p,onConnect:y,onConnectEnd:w,isValidConnection:M=vp,onReconnectEnd:I,updateConnection:C,getTransform:T,getFromHandle:A,autoPanSpeed:D,dragThreshold:j=1,handleDomNode:R}){const z=np(e.target);let W=0,H;const{x:B,y:k}=rr(e),b=fp(i,R),E=l?.getBoundingClientRect();let q=!1;if(!E||!b)return;const O=dp(s,b,o,c,t);if(!O)return;let K=rr(e,E),Y=!1,G=null,U=!1,X=null;function $(){if(!u||!E)return;const[ve,re]=Qu(K,E,D);d({x:ve,y:re}),W=requestAnimationFrame($)}const Z={...O,nodeId:s,type:b,position:O.position},Q=c.get(s);let J={inProgress:!0,isValid:null,from:Lo(Q,Z,Ve.Left,!0),fromHandle:Z,fromPosition:Z.position,fromNode:Q,to:K,toHandle:null,toPosition:kf[Z.position],toNode:null,pointer:K};function te(){q=!0,C(J),p?.(e,{nodeId:s,handleId:o,handleType:b})}j===0&&te();function ie(ve){if(!q){const{x:he,y:ce}=rr(ve),we=he-B,de=ce-k;if(!(we*we+de*de>j*j))return;te()}if(!A()||!Z){ge(ve);return}const re=T();K=rr(ve,E),H=KS(Li(K,re,!1,[1,1]),r,c,Z),Y||($(),Y=!0);const ee=hp(ve,{handle:H,connectionMode:t,fromNodeId:s,fromHandleId:o,fromType:a?"target":"source",isValidConnection:M,doc:z,lib:f,flowId:h,nodeLookup:c});X=ee.handleDomNode,G=ee.connection,U=YS(!!H,ee.isValid);const ue=c.get(s),ne=ue?Lo(ue,Z,Ve.Left,!0):J.from,fe={...J,from:ne,isValid:U,to:ee.toHandle&&U?vs({x:ee.toHandle.x,y:ee.toHandle.y},re):K,toHandle:ee.toHandle,toPosition:U&&ee.toHandle?ee.toHandle.position:kf[Z.position],toNode:ee.toHandle?c.get(ee.toHandle.nodeId):null,pointer:K};C(fe),J=fe}function ge(ve){if(!("touches"in ve&&ve.touches.length>0)){if(q){(H||X)&&G&&U&&y?.(G);const{inProgress:re,...ee}=J,ue={...ee,toPosition:J.toHandle?J.toPosition:null};w?.(ve,ue),i&&I?.(ve,ue)}g(),cancelAnimationFrame(W),Y=!1,U=!1,G=null,X=null,z.removeEventListener("mousemove",ie),z.removeEventListener("mouseup",ge),z.removeEventListener("touchmove",ie),z.removeEventListener("touchend",ge)}}z.addEventListener("mousemove",ie),z.addEventListener("mouseup",ge),z.addEventListener("touchmove",ie),z.addEventListener("touchend",ge)}function hp(e,{handle:t,connectionMode:r,fromNodeId:o,fromHandleId:s,fromType:i,doc:a,lib:l,flowId:c,isValidConnection:f=vp,nodeLookup:u}){const h=i==="target",d=t?a.querySelector(`.${l}-flow__handle[data-id="${c}-${t?.nodeId}-${t?.id}-${t?.type}"]`):null,{x:g,y:p}=rr(e),y=a.elementFromPoint(g,p),w=y?.classList.contains(`${l}-flow__handle`)?y:d,M={handleDomNode:w,isValid:!1,connection:null,toHandle:null};if(w){const I=fp(void 0,w),C=w.getAttribute("data-nodeid"),T=w.getAttribute("data-handleid"),A=w.classList.contains("connectable"),D=w.classList.contains("connectableend");if(!C||!I)return M;const j={source:h?C:o,sourceHandle:h?T:s,target:h?o:C,targetHandle:h?s:T};M.connection=j;const z=A&&D&&(r===ds.Strict?h&&I==="source"||!h&&I==="target":C!==o||T!==s);M.isValid=z&&f(j),M.toHandle=dp(C,I,T,u,r,!0)}return M}const Rf={onPointerDown:XS,isValid:hp},hl=e=>({x:e.x,y:e.y,zoom:e.k}),vc=({x:e,y:t,zoom:r})=>ul.translate(e,t).scale(r),Ur=(e,t)=>e.target.closest(`.${t}`),gp=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),GS=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,hc=(e,t=0,r=GS,o=()=>{})=>{const s=typeof t=="number"&&t>0;return s||o(),s?e.transition().duration(t).ease(r).on("end",o):e},pp=e=>{const t=e.ctrlKey&&Va()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function ZS({zoomPanValues:e,noWheelClassName:t,d3Selection:r,d3Zoom:o,panOnScrollMode:s,panOnScrollSpeed:i,zoomOnPinch:a,onPanZoomStart:l,onPanZoom:c,onPanZoomEnd:f}){return u=>{if(Ur(u,t))return u.ctrlKey&&u.preventDefault(),!1;u.preventDefault(),u.stopImmediatePropagation();const h=r.property("__zoom").k||1;if(u.ctrlKey&&a){const w=lr(u),M=pp(u),I=h*Math.pow(2,M);o.scaleTo(r,I,w,u);return}const d=u.deltaMode===1?20:1;let g=s===$o.Vertical?0:u.deltaX*d,p=s===$o.Horizontal?0:u.deltaY*d;!Va()&&u.shiftKey&&s!==$o.Vertical&&(g=u.deltaY*d,p=0),o.translateBy(r,-(g/h)*i,-(p/h)*i,{internal:!0});const y=hl(r.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?c?.(u,y):(e.isPanScrolling=!0,l?.(u,y)),e.panScrollTimeout=setTimeout(()=>{f?.(u,y),e.isPanScrolling=!1},150)}}function US({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:r}){return function(o,s){const i=o.type==="wheel",a=!t&&i&&!o.ctrlKey,l=Ur(o,e);if(o.ctrlKey&&i&&l&&o.preventDefault(),a||l)return null;o.preventDefault(),r.call(this,o,s)}}function QS({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:r}){return o=>{if(o.sourceEvent?.internal)return;const s=hl(o.transform);e.mouseButton=o.sourceEvent?.button||0,e.isZoomingOrPanning=!0,e.prevViewport=s,o.sourceEvent?.type==="mousedown"&&t(!0),r&&r?.(o.sourceEvent,s)}}function JS({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:r,onTransformChange:o,onPanZoom:s}){return i=>{e.usedRightMouseButton=!!(r&&gp(t,e.mouseButton??0)),i.sourceEvent?.sync||o([i.transform.x,i.transform.y,i.transform.k]),s&&!i.sourceEvent?.internal&&s?.(i.sourceEvent,hl(i.transform))}}function $S({zoomPanValues:e,panOnDrag:t,panOnScroll:r,onDraggingChange:o,onPanZoomEnd:s,onPaneContextMenu:i}){return a=>{if(!a.sourceEvent?.internal&&(e.isZoomingOrPanning=!1,i&&gp(t,e.mouseButton??0)&&!e.usedRightMouseButton&&a.sourceEvent&&i(a.sourceEvent),e.usedRightMouseButton=!1,o(!1),s)){const l=hl(a.transform);e.prevViewport=l,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{s?.(a.sourceEvent,l)},r?150:0)}}}function e3({panActivationKeyPressed:e,zoomActivationKeyPressed:t,zoomOnScroll:r,zoomOnPinch:o,panOnDrag:s,panOnScroll:i,zoomOnDoubleClick:a,userSelectionActive:l,noWheelClassName:c,noPanClassName:f,lib:u,connectionInProgress:h}){return d=>{const g=t||r,p=o&&d.ctrlKey,y=d.type==="wheel";if(d.button===1&&d.type==="mousedown"&&(Ur(d,`${u}-flow__node`)||Ur(d,`${u}-flow__edge`)||Ur(d,`${u}-flow__selection`)||Ur(d,`${u}-flow__nodesselection`)))return!0;if(!s&&!g&&!i&&!a&&!o||l||h&&!y||Ur(d,c)&&y||Ur(d,f)&&(!y||i&&y&&!t)||!o&&d.ctrlKey&&y)return!1;if(!o&&d.type==="touchstart"&&d.touches?.length>1)return d.preventDefault(),!1;if(!g&&!i&&!p&&y||!s&&(d.type==="mousedown"||d.type==="touchstart")||Array.isArray(s)&&!s.includes(d.button)&&d.type==="mousedown")return!1;const w=Array.isArray(s)&&s.includes(d.button)||!d.button||d.button<=1;return(!d.ctrlKey||y||e)&&w}}function t3({domNode:e,minZoom:t,maxZoom:r,translateExtent:o,viewport:s,onPanZoom:i,onPanZoomStart:a,onPanZoomEnd:l,onDraggingChange:c}){const f={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},u=e.getBoundingClientRect();let h=[[0,0],[u.width,u.height]];(typeof ResizeObserver<"u"?new ResizeObserver(k=>{const b=k[0];b&&(h=[[0,0],[b.contentRect.width,b.contentRect.height]])}):null)?.observe(e);const g=tS().extent(()=>h).scaleExtent([t,r]).translateExtent(o),p=Un(e).call(g);T({x:s.x,y:s.y,zoom:fs(s.zoom,t,r)},[[0,0],[u.width,u.height]],o);const y=p.on("wheel.zoom"),w=p.on("dblclick.zoom");g.wheelDelta(pp);async function M(k,b){return p?new Promise(E=>{g?.interpolate(b?.interpolate==="linear"?ri:fa).transform(hc(p,b?.duration,b?.ease,()=>E(!0)),k)}):!1}function I({noWheelClassName:k,noPanClassName:b,onPaneContextMenu:E,userSelectionActive:q,panOnScroll:O,panOnDrag:K,panOnScrollMode:Y,panOnScrollSpeed:G,preventScrolling:U,zoomOnPinch:X,zoomOnScroll:$,zoomOnDoubleClick:Z,panActivationKeyPressed:Q=!1,zoomActivationKeyPressed:F,lib:J,onTransformChange:te,connectionInProgress:ie,paneClickDistance:ge,selectionOnDrag:ve}){q&&!f.isZoomingOrPanning&&C();const re=O&&!F&&!q;g.clickDistance(ve?1/0:!Lr(ge)||ge<0?0:ge);const ee=re?ZS({zoomPanValues:f,noWheelClassName:k,d3Selection:p,d3Zoom:g,panOnScrollMode:Y,panOnScrollSpeed:G,zoomOnPinch:X,onPanZoomStart:a,onPanZoom:i,onPanZoomEnd:l}):US({noWheelClassName:k,preventScrolling:U,d3ZoomHandler:y});p.on("wheel.zoom",ee,{passive:!1});const ue=QS({zoomPanValues:f,onDraggingChange:c,onPanZoomStart:a});g.on("start",ue);const ne=JS({zoomPanValues:f,panOnDrag:K,onPaneContextMenu:!!E,onPanZoom:i,onTransformChange:te});g.on("zoom",ne);const fe=$S({zoomPanValues:f,panOnDrag:K,panOnScroll:O,onPaneContextMenu:E,onPanZoomEnd:l,onDraggingChange:c});g.on("end",fe);const he=e3({panActivationKeyPressed:Q,zoomActivationKeyPressed:F,panOnDrag:K,zoomOnScroll:$,panOnScroll:O,zoomOnDoubleClick:Z,zoomOnPinch:X,userSelectionActive:q,noPanClassName:b,noWheelClassName:k,lib:J,connectionInProgress:ie});g.filter(he),Z?p.on("dblclick.zoom",w):p.on("dblclick.zoom",null)}function C(){g.on("zoom",null)}async function T(k,b,E){const q=vc(k),O=g?.constrain()(q,b,E);return O&&await M(O),O}async function A(k,b){const E=vc(k);return await M(E,b),E}function D(k){if(p){const b=vc(k),E=p.property("__zoom");(E.k!==k.zoom||E.x!==k.x||E.y!==k.y)&&g?.transform(p,b,null,{sync:!0})}}function j(){const k=p?Gg(p.node()):{x:0,y:0,k:1};return{x:k.x,y:k.y,zoom:k.k}}async function R(k,b){return p?new Promise(E=>{g?.interpolate(b?.interpolate==="linear"?ri:fa).scaleTo(hc(p,b?.duration,b?.ease,()=>E(!0)),k)}):!1}async function z(k,b){return p?new Promise(E=>{g?.interpolate(b?.interpolate==="linear"?ri:fa).scaleBy(hc(p,b?.duration,b?.ease,()=>E(!0)),k)}):!1}function W(k){g?.scaleExtent(k)}function H(k){g?.translateExtent(k)}function B(k){const b=!Lr(k)||k<0?0:k;g?.clickDistance(b)}return{update:I,destroy:C,setViewport:A,setViewportConstrained:T,getViewport:j,scaleTo:R,scaleBy:z,setScaleExtent:W,setTranslateExtent:H,syncViewport:D,setClickDistance:B}}var zf;(function(e){e.Line="line",e.Handle="handle"})(zf||(zf={}));const n3=ep();function r3(e,t,r={}){return kS(e,t,{...r,onError:r.onError??n3})}function od(){const e={};return[t=>{if(t&&!Vm(e))throw new Error(t);return pu(e)},t=>th(e,t)]}const[o3,s3]=od(),[i3,a3]=od(),[l3,c3]=od();var u3=new Set(["$$slots","$$events","$$legacy","id","type","position","style","class","isConnectable","isConnectableStart","isConnectableEnd","isValidConnection","onconnect","ondisconnect","children"]),d3=N("
");function kn(e,t){Ne(t,!0);let r=Ee(t,"id",3,null),o=Ee(t,"type",3,"source"),s=Ee(t,"position",19,()=>Ve.Top),i=Ee(t,"isConnectableStart",3,!0),a=Ee(t,"isConnectableEnd",3,!0),l=ao(t,u3);const c=o3("Handle must be used within a Custom Node component"),f=i3("Handle must be used within a Custom Node component");let u=S(()=>o()==="target"),h=S(()=>t.isConnectable!==void 0?t.isConnectable:f.value),d=bs(),g=S(()=>d.ariaLabelConfig),p=null;xh(()=>{if(t.onconnect||t.ondisconnect){d.edges;let B=d.connectionLookup.get(`${c}-${o()}${r()?`-${r()}`:""}`);if(p&&!gS(B,p)){const k=B??new Map;Mf(p,k,t.ondisconnect),Mf(k,p,t.onconnect)}p=new Map(B)}});let y=S(()=>{if(!d.connection.inProgress)return[!1,!1,!1,!1,null];const{fromHandle:B,toHandle:k,isValid:b}=d.connection,E=B&&B.nodeId===c&&B.type===o()&&B.id===r(),q=k&&k.nodeId===c&&k.type===o()&&k.id===r(),O=d.connectionMode===ds.Strict?B?.type!==o():c!==B?.nodeId||r()!==B?.id;return[!0,E,q,O,q&&b]}),w=S(()=>wi(n(y),5)),M=S(()=>n(w)[0]),I=S(()=>n(w)[1]),C=S(()=>n(w)[2]),T=S(()=>n(w)[3]),A=S(()=>n(w)[4]);function D(B){const k=d.onbeforeconnect?d.onbeforeconnect(B):B;k&&(d.addEdge(k),d.onconnect?.(B))}function j(B){const k=op(B);B.currentTarget&&(k&&B.button===0||!k)&&Rf.onPointerDown(B,{handleId:r(),nodeId:c,isTarget:n(u),connectionRadius:d.connectionRadius,domNode:d.domNode,nodeLookup:d.nodeLookup,connectionMode:d.connectionMode,lib:"svelte",autoPanOnConnect:d.autoPanOnConnect,autoPanSpeed:d.autoPanSpeed,flowId:d.flowId,isValidConnection:t.isValidConnection||((...b)=>d.isValidConnection?.(...b)??!0),updateConnection:d.updateConnection,cancelConnection:d.cancelConnection,panBy:d.panBy,onConnect:D,onConnectStart:d.onconnectstart,onConnectEnd:(...b)=>d.onconnectend?.(...b),getTransform:()=>[d.viewport.x,d.viewport.y,d.viewport.zoom],getFromHandle:()=>d.connection.fromHandle,dragThreshold:d.connectionDragThreshold,handleDomNode:B.currentTarget})}function R(B){if(!c||!d.clickConnectStartHandle&&!i())return;if(!d.clickConnectStartHandle){d.onclickconnectstart?.(B,{nodeId:c,handleId:r(),handleType:o()}),d.clickConnectStartHandle={nodeId:c,type:o(),id:r()};return}const k=np(B.target),b=t.isValidConnection??d.isValidConnection,{connectionMode:E,clickConnectStartHandle:q,flowId:O,nodeLookup:K}=d,{connection:Y,isValid:G}=Rf.isValid(B,{handle:{nodeId:c,id:r(),type:o()},connectionMode:E,fromNodeId:q.nodeId,fromHandleId:q.id??null,fromType:q.type,isValidConnection:b,flowId:O,doc:k,lib:"svelte",nodeLookup:K});G&&Y&&D(Y);const U=structuredClone(eh(d.connection));delete U.inProgress,U.toPosition=U.toHandle?U.toHandle.position:null,d.onclickconnectend?.(B,U),d.clickConnectStartHandle=null}var z=d3(),W=()=>{};Fr(z,()=>({"data-handleid":r(),"data-nodeid":c,"data-handlepos":s(),"data-id":`${d.flowId??""}-${c??""}-${r()??"null"??""}-${o()??""}`,class:["svelte-flow__handle",`svelte-flow__handle-${s()}`,d.noDragClass,d.noPanClass,s(),t.class],onmousedown:j,ontouchstart:j,onclick:d.clickConnect?R:void 0,onkeypress:W,style:t.style,role:"button","aria-label":n(g)["handle.ariaLabel"],tabindex:"-1",...l,[Qr]:{valid:n(A),connectingto:n(C),connectingfrom:n(I),source:!n(u),target:n(u),connectablestart:i(),connectableend:a(),connectable:n(h),connectionindicator:n(h)&&(!n(M)||n(T))&&(n(M)||d.clickConnectStartHandle?a():i())}}));var H=v(z);Nn(H,()=>t.children??Ln),_(e,z),Ie()}var f3=N(" ",1);function mp(e,t){Ne(t,!0);let r=Ee(t,"targetPosition",19,()=>Ve.Top),o=Ee(t,"sourcePosition",19,()=>Ve.Bottom);var s=f3(),i=ye(s);kn(i,{type:"target",get position(){return r()}});var a=m(i),l=m(a);kn(l,{type:"source",get position(){return o()}}),P(()=>x(a,` ${t.data?.label??""} `)),_(e,s),Ie()}var v3=N(" ",1);function h3(e,t){Ne(t,!0);let r=Ee(t,"data",19,()=>({label:"Node"})),o=Ee(t,"sourcePosition",19,()=>Ve.Bottom);var s=v3(),i=ye(s),a=m(i);kn(a,{type:"source",get position(){return o()}}),P(()=>x(i,`${r()?.label??""} `)),_(e,s),Ie()}var g3=N(" ",1);function p3(e,t){Ne(t,!0);let r=Ee(t,"data",19,()=>({label:"Node"})),o=Ee(t,"targetPosition",19,()=>Ve.Top);var s=g3(),i=ye(s),a=m(i);kn(a,{type:"target",get position(){return o()}}),P(()=>x(i,`${r()?.label??""} `)),_(e,s),Ie()}function m3(e,t){}function gc(e,t,r){if(!r||!t)return;const o=r==="root"?t:t.querySelector(`.svelte-flow__${r}`);o&&o.appendChild(e)}function _p(e,t){const r=S(bs),o=S(()=>n(r).domNode);let s;return n(o)?gc(e,n(o),t):s=kh(()=>{et(()=>{gc(e,n(o),t),s?.()})}),{async update(i){gc(e,n(o),i)},destroy(){e.parentNode&&e.parentNode.removeChild(e),s?.()}}}function yp(){let e=ae(typeof window>"u");if(n(e)){const t=kh(()=>{et(()=>{L(e,!1),t?.()})})}return{get value(){return n(e)}}}const Hf=e=>rS(e),_3=e=>Ug(e);function kr(e){return e===void 0?void 0:`${e}px`}const Wa={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};var y3=new Set(["$$slots","$$events","$$legacy","x","y","width","height","selectEdgeOnClick","transparent","class","children"]),w3=N("
");function wp(e,t){Ne(t,!0);let r=Ee(t,"x",3,0),o=Ee(t,"y",3,0),s=Ee(t,"selectEdgeOnClick",3,!1),i=Ee(t,"transparent",3,!1),a=ao(t,y3);const l=bs(),c=l3("EdgeLabel must be used within a Custom Edge component");let f=S(()=>l.visible.edges.get(c)?.zIndex);var u=w3(),h=()=>{s()&&c&&l.handleEdgeSelection(c)};Fr(u,g=>({class:["svelte-flow__edge-label",{transparent:i()},t.class],tabindex:"-1",onclick:h,...a,[dr]:g}),[()=>({display:yp().value?"none":void 0,cursor:s()?"pointer":void 0,transform:`translate(-50%, -50%) translate(${r()??""}px,${o()??""}px)`,"pointer-events":"all",width:kr(t.width),height:kr(t.height),"z-index":n(f)})],void 0,void 0,"svelte-1wg91mu");var d=v(u);Nn(d,()=>t.children??Ln),bn(u,(g,p)=>_p?.(g,p),()=>"edge-labels"),_(e,u),Ie()}var b3=new Set(["$$slots","$$events","$$legacy","id","path","label","labelX","labelY","labelStyle","markerStart","markerEnd","style","interactionWidth","class"]),x3=Yt(""),k3=Yt('',1);function qo(e,t){let r=Ee(t,"interactionWidth",3,20),o=ao(t,b3);var s=k3(),i=ye(s),a=m(i);{var l=u=>{var h=x3();Fr(h,()=>({d:t.path,"stroke-opacity":0,"stroke-width":r(),fill:"none",class:"svelte-flow__edge-interaction",...o})),_(u,h)};V(a,u=>{r()>0&&u(l)})}var c=m(a);{var f=u=>{wp(u,{get x(){return t.labelX},get y(){return t.labelY},get style(){return t.labelStyle},selectEdgeOnClick:!0,children:(h,d)=>{var g=wt();P(()=>x(g,t.label)),_(h,g)},$$slots:{default:!0}})};V(c,u=>{t.label&&u(f)})}P(()=>{se(i,"id",t.id),se(i,"d",t.path),Ce(i,0,zo(["svelte-flow__edge-path",t.class])),se(i,"marker-start",t.markerStart),se(i,"marker-end",t.markerEnd),nt(i,t.style)}),_(e,s)}function bp(e,t){Ne(t,!0);let r=S(()=>sp({sourceX:t.sourceX,sourceY:t.sourceY,targetX:t.targetX,targetY:t.targetY,sourcePosition:t.sourcePosition,targetPosition:t.targetPosition,curvature:t.pathOptions?.curvature})),o=S(()=>wi(n(r),3)),s=S(()=>n(o)[0]),i=S(()=>n(o)[1]),a=S(()=>n(o)[2]);qo(e,{get id(){return t.id},get path(){return n(s)},get labelX(){return n(i)},get labelY(){return n(a)},get label(){return t.label},get labelStyle(){return t.labelStyle},get markerStart(){return t.markerStart},get markerEnd(){return t.markerEnd},get interactionWidth(){return t.interactionWidth},get style(){return t.style}}),Ie()}function E3(e,t){Ne(t,!0);let r=S(()=>$u({sourceX:t.sourceX,sourceY:t.sourceY,targetX:t.targetX,targetY:t.targetY,sourcePosition:t.sourcePosition,targetPosition:t.targetPosition})),o=S(()=>wi(n(r),3)),s=S(()=>n(o)[0]),i=S(()=>n(o)[1]),a=S(()=>n(o)[2]);qo(e,{get path(){return n(s)},get labelX(){return n(i)},get labelY(){return n(a)},get label(){return t.label},get labelStyle(){return t.labelStyle},get markerStart(){return t.markerStart},get markerEnd(){return t.markerEnd},get interactionWidth(){return t.interactionWidth},get style(){return t.style}}),Ie()}function S3(e,t){Ne(t,!0);let r=S(()=>ap({sourceX:t.sourceX,sourceY:t.sourceY,targetX:t.targetX,targetY:t.targetY})),o=S(()=>wi(n(r),3)),s=S(()=>n(o)[0]),i=S(()=>n(o)[1]),a=S(()=>n(o)[2]);qo(e,{get path(){return n(s)},get labelX(){return n(i)},get labelY(){return n(a)},get label(){return t.label},get labelStyle(){return t.labelStyle},get markerStart(){return t.markerStart},get markerEnd(){return t.markerEnd},get interactionWidth(){return t.interactionWidth},get style(){return t.style}}),Ie()}function M3(e,t){Ne(t,!0);let r=S(()=>$u({sourceX:t.sourceX,sourceY:t.sourceY,targetX:t.targetX,targetY:t.targetY,sourcePosition:t.sourcePosition,targetPosition:t.targetPosition,borderRadius:0})),o=S(()=>wi(n(r),3)),s=S(()=>n(o)[0]),i=S(()=>n(o)[1]),a=S(()=>n(o)[2]);qo(e,{get path(){return n(s)},get labelX(){return n(i)},get labelY(){return n(a)},get label(){return t.label},get labelStyle(){return t.labelStyle},get markerStart(){return t.markerStart},get markerEnd(){return t.markerEnd},get interactionWidth(){return t.interactionWidth},get style(){return t.style}}),Ie()}class T3{#e;#n;constructor(t,r){this.#e=t,this.#n=ih(r)}get current(){return this.#n(),this.#e()}}const C3=/\(.+\)/,N3=new Set(["all","print","screen","and","or","not","only"]);class I3 extends T3{constructor(t,r){let o=C3.test(t)||t.split(/[\s,]+/).some(i=>N3.has(i.trim()))?t:`(${t})`;const s=window.matchMedia(o);super(()=>s.matches,i=>zc(s,"change",i))}}function A3(e,t,r,o){const s=new Map;return Uu(e,{x:0,y:0,width:r,height:o},t,!0).forEach(i=>{s.set(i.id,i)}),s}function qf(e){const{edges:t,defaultEdgeOptions:r,nodeLookup:o,previousEdges:s,connectionMode:i,onerror:a,onlyRenderVisible:l,elevateEdgesOnSelect:c,zIndexMode:f}=e,u=new Map;for(const h of t){const d=o.get(h.source),g=o.get(h.target);if(!d||!g)continue;if(l){const{visibleNodes:w,transform:M,width:I,height:C}=e;if(wS({sourceNode:d,targetNode:g,width:I,height:C,transform:M}))w.set(d.id,d),w.set(g.id,g);else continue}const p=s.get(h.id);if(p&&h===p.edge&&d==p.sourceNode&&g==p.targetNode){u.set(h.id,p);continue}const y=TS({id:h.id,sourceNode:d,targetNode:g,sourceHandle:h.sourceHandle||null,targetHandle:h.targetHandle||null,connectionMode:i,onError:a});y&&u.set(h.id,{...r,...h,...y,zIndex:yS({selected:h.selected,zIndex:h.zIndex??r.zIndex,sourceNode:d,targetNode:g,elevateOnSelect:c,zIndexMode:f}),sourceNode:d,targetNode:g,edge:h})}return u}const P3=ep(),xp={input:h3,output:p3,default:mp,group:m3},kp={straight:S3,smoothstep:E3,default:bp,step:M3};function O3(e,t,r,o,s,i){if(t&&!r&&o&&s){const a=dl(i,{filter:l=>!!((l.width||l.initialWidth)&&(l.height||l.initialHeight))});return Ju(a,o,s,.5,2,.1)}else return r??{x:0,y:0,zoom:1}}function L3(e){class t{#e=S(()=>e.props.id??"1");get flowId(){return n(this.#e)}set flowId(o){L(this.#e,o)}#n=ae(null);get domNode(){return n(this.#n)}set domNode(o){L(this.#n,o)}#t=ae(null);get panZoom(){return n(this.#t)}set panZoom(o){L(this.#t,o)}#a=ae(e.width??0);get width(){return n(this.#a)}set width(o){L(this.#a,o)}#o=ae(e.height??0);get height(){return n(this.#o)}set height(o){L(this.#o,o)}#i=ae(e.props.zIndexMode??"basic");get zIndexMode(){return n(this.#i)}set zIndexMode(o){L(this.#i,o)}#r=S(()=>{const{nodesInitialized:o}=OS(e.nodes,this.nodeLookup,this.parentLookup,{nodeExtent:this.nodeExtent,nodeOrigin:this.nodeOrigin,elevateNodesOnSelect:e.props.elevateNodesOnSelect??!0,checkEquality:!0,zIndexMode:this.zIndexMode});return this.fitViewQueued&&o&&(this.fitViewOptions?.duration?this.resolveFitView():queueMicrotask(()=>{this.resolveFitView()})),o});get nodesInitialized(){return n(this.#r)}set nodesInitialized(o){L(this.#r,o)}#l=S(()=>this.panZoom!==null);get viewportInitialized(){return n(this.#l)}set viewportInitialized(o){L(this.#l,o)}#s=S(()=>(qS(this.connectionLookup,this.edgeLookup,e.edges),e.edges));get _edges(){return n(this.#s)}set _edges(o){L(this.#s,o)}get nodes(){return this.nodesInitialized,e.nodes}set nodes(o){e.nodes=o}get edges(){return this._edges}set edges(o){e.edges=o}_prevSelectedNodes=[];_prevSelectedNodeIds=new Set;#g=S(()=>{const o=this._prevSelectedNodeIds.size,s=new Set,i=this.nodes.filter(a=>(a.selected&&(s.add(a.id),this._prevSelectedNodeIds.delete(a.id)),a.selected));return(o!==s.size||this._prevSelectedNodeIds.size>0)&&(this._prevSelectedNodes=i),this._prevSelectedNodeIds=s,this._prevSelectedNodes});get selectedNodes(){return n(this.#g)}set selectedNodes(o){L(this.#g,o)}_prevSelectedEdges=[];_prevSelectedEdgeIds=new Set;#c=S(()=>{const o=this._prevSelectedEdgeIds.size,s=new Set,i=this.edges.filter(a=>(a.selected&&(s.add(a.id),this._prevSelectedEdgeIds.delete(a.id)),a.selected));return(o!==s.size||this._prevSelectedEdgeIds.size>0)&&(this._prevSelectedEdges=i),this._prevSelectedEdgeIds=s,this._prevSelectedEdges});get selectedEdges(){return n(this.#c)}set selectedEdges(o){L(this.#c,o)}selectionChangeHandlers=new Map;nodeLookup=new Map;parentLookup=new Map;connectionLookup=new Map;edgeLookup=new Map;_prevVisibleEdges=new Map;#u=S(()=>{const{nodes:o,_edges:s,_prevVisibleEdges:i,nodeLookup:a,connectionMode:l,onerror:c,onlyRenderVisibleElements:f,defaultEdgeOptions:u,zIndexMode:h}=this;let d,g;const p={edges:s,defaultEdgeOptions:u,previousEdges:i,nodeLookup:a,connectionMode:l,elevateEdgesOnSelect:e.props.elevateEdgesOnSelect??!0,zIndexMode:h,onerror:c};if(f){const{viewport:y,width:w,height:M}=this,I=[y.x,y.y,y.zoom];d=A3(a,I,w,M),g=qf({...p,onlyRenderVisible:!0,visibleNodes:d,transform:I,width:w,height:M})}else d=this.nodeLookup,g=qf(p);return this._prevVisibleEdges=g,{nodes:d,edges:g}});get visible(){return n(this.#u)}set visible(o){L(this.#u,o)}#f=S(()=>e.props.nodesDraggable??!0);get nodesDraggable(){return n(this.#f)}set nodesDraggable(o){L(this.#f,o)}#p=S(()=>e.props.nodesConnectable??!0);get nodesConnectable(){return n(this.#p)}set nodesConnectable(o){L(this.#p,o)}#d=S(()=>e.props.elementsSelectable??!0);get elementsSelectable(){return n(this.#d)}set elementsSelectable(o){L(this.#d,o)}#_=S(()=>e.props.nodesFocusable??!0);get nodesFocusable(){return n(this.#_)}set nodesFocusable(o){L(this.#_,o)}#m=S(()=>e.props.edgesFocusable??!0);get edgesFocusable(){return n(this.#m)}set edgesFocusable(o){L(this.#m,o)}#b=S(()=>e.props.disableKeyboardA11y??!1);get disableKeyboardA11y(){return n(this.#b)}set disableKeyboardA11y(o){L(this.#b,o)}#y=S(()=>e.props.minZoom??.5);get minZoom(){return n(this.#y)}set minZoom(o){L(this.#y,o)}#x=S(()=>e.props.maxZoom??2);get maxZoom(){return n(this.#x)}set maxZoom(o){L(this.#x,o)}#v=S(()=>e.props.nodeOrigin??[0,0]);get nodeOrigin(){return n(this.#v)}set nodeOrigin(o){L(this.#v,o)}#w=S(()=>e.props.nodeExtent??ou);get nodeExtent(){return n(this.#w)}set nodeExtent(o){L(this.#w,o)}#h=S(()=>e.props.translateExtent??ou);get translateExtent(){return n(this.#h)}set translateExtent(o){L(this.#h,o)}#k=S(()=>e.props.defaultEdgeOptions??{});get defaultEdgeOptions(){return n(this.#k)}set defaultEdgeOptions(o){L(this.#k,o)}#E=S(()=>e.props.nodeDragThreshold??1);get nodeDragThreshold(){return n(this.#E)}set nodeDragThreshold(o){L(this.#E,o)}#S=S(()=>e.props.autoPanOnNodeDrag??!0);get autoPanOnNodeDrag(){return n(this.#S)}set autoPanOnNodeDrag(o){L(this.#S,o)}#M=S(()=>e.props.autoPanOnConnect??!0);get autoPanOnConnect(){return n(this.#M)}set autoPanOnConnect(o){L(this.#M,o)}#T=S(()=>e.props.autoPanOnNodeFocus??!0);get autoPanOnNodeFocus(){return n(this.#T)}set autoPanOnNodeFocus(o){L(this.#T,o)}#C=S(()=>e.props.autoPanSpeed??15);get autoPanSpeed(){return n(this.#C)}set autoPanSpeed(o){L(this.#C,o)}#N=S(()=>e.props.connectionDragThreshold??1);get connectionDragThreshold(){return n(this.#N)}set connectionDragThreshold(o){L(this.#N,o)}fitViewQueued=e.props.fitView??!1;fitViewOptions=e.props.fitViewOptions;fitViewResolver=null;#I=S(()=>e.props.snapGrid??null);get snapGrid(){return n(this.#I)}set snapGrid(o){L(this.#I,o)}#A=ae(!1);get dragging(){return n(this.#A)}set dragging(o){L(this.#A,o)}#P=ae(null);get selectionRect(){return n(this.#P)}set selectionRect(o){L(this.#P,o)}#O=ae(!1);get selectionKeyPressed(){return n(this.#O)}set selectionKeyPressed(o){L(this.#O,o)}#L=ae(!1);get multiselectionKeyPressed(){return n(this.#L)}set multiselectionKeyPressed(o){L(this.#L,o)}#D=ae(!1);get deleteKeyPressed(){return n(this.#D)}set deleteKeyPressed(o){L(this.#D,o)}#R=ae(!1);get panActivationKeyPressed(){return n(this.#R)}set panActivationKeyPressed(o){L(this.#R,o)}#z=ae(!1);get zoomActivationKeyPressed(){return n(this.#z)}set zoomActivationKeyPressed(o){L(this.#z,o)}#H=ae(null);get selectionRectMode(){return n(this.#H)}set selectionRectMode(o){L(this.#H,o)}#q=ae("");get ariaLiveMessage(){return n(this.#q)}set ariaLiveMessage(o){L(this.#q,o)}#j=S(()=>e.props.selectionMode??qa.Partial);get selectionMode(){return n(this.#j)}set selectionMode(o){L(this.#j,o)}#F=S(()=>({...xp,...e.props.nodeTypes}));get nodeTypes(){return n(this.#F)}set nodeTypes(o){L(this.#F,o)}#B=S(()=>({...kp,...e.props.edgeTypes}));get edgeTypes(){return n(this.#B)}set edgeTypes(o){L(this.#B,o)}#V=S(()=>e.props.noPanClass??"nopan");get noPanClass(){return n(this.#V)}set noPanClass(o){L(this.#V,o)}#W=S(()=>e.props.noDragClass??"nodrag");get noDragClass(){return n(this.#W)}set noDragClass(o){L(this.#W,o)}#K=S(()=>e.props.noWheelClass??"nowheel");get noWheelClass(){return n(this.#K)}set noWheelClass(o){L(this.#K,o)}#Y=S(()=>hS(e.props.ariaLabelConfig));get ariaLabelConfig(){return n(this.#Y)}set ariaLabelConfig(o){L(this.#Y,o)}#X=ae(O3(this.nodesInitialized,e.props.fitView,e.props.initialViewport,this.width,this.height,this.nodeLookup));get _viewport(){return n(this.#X)}set _viewport(o){L(this.#X,o)}get viewport(){return e.viewport??this._viewport}set viewport(o){e.viewport&&(e.viewport=o),this._viewport=o}#G=ae(su);get _connection(){return n(this.#G)}set _connection(o){L(this.#G,o)}#Z=S(()=>this._connection.inProgress?{...this._connection,to:Li(this._connection.to,[this.viewport.x,this.viewport.y,this.viewport.zoom])}:this._connection);get connection(){return n(this.#Z)}set connection(o){L(this.#Z,o)}#U=S(()=>e.props.connectionMode??ds.Strict);get connectionMode(){return n(this.#U)}set connectionMode(o){L(this.#U,o)}#Q=S(()=>e.props.connectionRadius??20);get connectionRadius(){return n(this.#Q)}set connectionRadius(o){L(this.#Q,o)}#J=S(()=>e.props.isValidConnection??(()=>!0));get isValidConnection(){return n(this.#J)}set isValidConnection(o){L(this.#J,o)}#$=S(()=>e.props.selectNodesOnDrag??!0);get selectNodesOnDrag(){return n(this.#$)}set selectNodesOnDrag(o){L(this.#$,o)}#ee=S(()=>e.props.defaultMarkerColor===void 0?"#b1b1b7":e.props.defaultMarkerColor);get defaultMarkerColor(){return n(this.#ee)}set defaultMarkerColor(o){L(this.#ee,o)}#te=S(()=>CS(e.edges,{defaultColor:this.defaultMarkerColor,id:this.flowId,defaultMarkerStart:this.defaultEdgeOptions.markerStart,defaultMarkerEnd:this.defaultEdgeOptions.markerEnd}));get markers(){return n(this.#te)}set markers(o){L(this.#te,o)}#ne=S(()=>e.props.onlyRenderVisibleElements??!1);get onlyRenderVisibleElements(){return n(this.#ne)}set onlyRenderVisibleElements(o){L(this.#ne,o)}#re=S(()=>e.props.onflowerror??P3);get onerror(){return n(this.#re)}set onerror(o){L(this.#re,o)}#oe=S(()=>e.props.ondelete);get ondelete(){return n(this.#oe)}set ondelete(o){L(this.#oe,o)}#se=S(()=>e.props.onbeforedelete);get onbeforedelete(){return n(this.#se)}set onbeforedelete(o){L(this.#se,o)}#ie=S(()=>e.props.onbeforeconnect);get onbeforeconnect(){return n(this.#ie)}set onbeforeconnect(o){L(this.#ie,o)}#ae=S(()=>e.props.onconnect);get onconnect(){return n(this.#ae)}set onconnect(o){L(this.#ae,o)}#le=S(()=>e.props.onconnectstart);get onconnectstart(){return n(this.#le)}set onconnectstart(o){L(this.#le,o)}#ce=S(()=>e.props.onconnectend);get onconnectend(){return n(this.#ce)}set onconnectend(o){L(this.#ce,o)}#ue=S(()=>e.props.onbeforereconnect);get onbeforereconnect(){return n(this.#ue)}set onbeforereconnect(o){L(this.#ue,o)}#de=S(()=>e.props.onreconnect);get onreconnect(){return n(this.#de)}set onreconnect(o){L(this.#de,o)}#fe=S(()=>e.props.onreconnectstart);get onreconnectstart(){return n(this.#fe)}set onreconnectstart(o){L(this.#fe,o)}#ve=S(()=>e.props.onreconnectend);get onreconnectend(){return n(this.#ve)}set onreconnectend(o){L(this.#ve,o)}#he=S(()=>e.props.clickConnect??!0);get clickConnect(){return n(this.#he)}set clickConnect(o){L(this.#he,o)}#ge=S(()=>e.props.onclickconnectstart);get onclickconnectstart(){return n(this.#ge)}set onclickconnectstart(o){L(this.#ge,o)}#pe=S(()=>e.props.onclickconnectend);get onclickconnectend(){return n(this.#pe)}set onclickconnectend(o){L(this.#pe,o)}#me=ae(null);get clickConnectStartHandle(){return n(this.#me)}set clickConnectStartHandle(o){L(this.#me,o)}#_e=S(()=>e.props.onselectiondrag);get onselectiondrag(){return n(this.#_e)}set onselectiondrag(o){L(this.#_e,o)}#ye=S(()=>e.props.onselectiondragstart);get onselectiondragstart(){return n(this.#ye)}set onselectiondragstart(o){L(this.#ye,o)}#we=S(()=>e.props.onselectiondragstop);get onselectiondragstop(){return n(this.#we)}set onselectiondragstop(o){L(this.#we,o)}resolveFitView=async()=>{this.panZoom&&(await aS({nodes:this.nodeLookup,width:this.width,height:this.height,panZoom:this.panZoom,minZoom:this.minZoom,maxZoom:this.maxZoom},this.fitViewOptions),this.fitViewResolver?.resolve(!0),this.fitViewQueued=!1,this.fitViewOptions=void 0,this.fitViewResolver=null)};_prefersDark=new I3("(prefers-color-scheme: dark)",e.props.colorModeSSR==="dark");#be=S(()=>e.props.colorMode==="system"?this._prefersDark.current?"dark":"light":e.props.colorMode??"light");get colorMode(){return n(this.#be)}set colorMode(o){L(this.#be,o)}constructor(){}resetStoreValues(){this.dragging=!1,this.selectionRect=null,this.selectionRectMode=null,this.selectionKeyPressed=!1,this.multiselectionKeyPressed=!1,this.deleteKeyPressed=!1,this.panActivationKeyPressed=!1,this.zoomActivationKeyPressed=!1,this._connection=su,this.clickConnectStartHandle=null,this.viewport=e.props.initialViewport??{x:0,y:0,zoom:1},this.ariaLiveMessage=""}}return new t}const D3=Po.error001("svelte");function bs(){const e=pu(lu);if(!e)throw new Error(D3);return e.getStore()}const lu=Symbol();function R3(e){const t=L3(e);function r(H){t.nodeTypes={...xp,...H}}function o(H){t.edgeTypes={...kp,...H}}function s(H){t.edges=r3(H,t.edges,{onError:t.onerror})}const i=(H,B=!1)=>{t.nodes=t.nodes.map(k=>{if(t.connection.inProgress&&t.connection.fromNode.id===k.id){const E=t.nodeLookup.get(k.id);E&&(t.connection={...t.connection,from:Lo(E,t.connection.fromHandle,Ve.Left,!0)})}const b=H.get(k.id);return b?{...k,position:b.position,dragging:B}:k})};function a(H){const{changes:B,updatedInternals:k}=zS(H,t.nodeLookup,t.parentLookup,t.domNode,t.nodeOrigin,t.nodeExtent,t.zIndexMode);if(!k)return;AS(t.nodeLookup,t.parentLookup,{nodeOrigin:t.nodeOrigin,nodeExtent:t.nodeExtent,zIndexMode:t.zIndexMode}),t.fitViewQueued&&t.resolveFitView();const b=new Map;for(const E of B){const q=t.nodeLookup.get(E.id)?.internals.userNode;if(!q)continue;const O={...q};switch(E.type){case"dimensions":{const K={...O.measured,...E.dimensions};E.setAttributes&&(O.width=E.dimensions?.width??O.width,O.height=E.dimensions?.height??O.height),O.measured=K;break}case"position":O.position=E.position??O.position;break}b.set(E.id,O)}t.nodes=t.nodes.map(E=>b.get(E.id)??E)}function l(H){const B=t.fitViewResolver??Promise.withResolvers();return t.fitViewQueued=!0,t.fitViewOptions=H,t.fitViewResolver=B,t.nodes=[...t.nodes],B.promise}async function c(H,B,k){const b=typeof k?.zoom<"u"?k.zoom:t.maxZoom,E=t.panZoom;return E?(await E.setViewport({x:t.width/2-H*b,y:t.height/2-B*b,zoom:b},{duration:k?.duration,ease:k?.ease,interpolate:k?.interpolate}),!0):!1}async function f(H,B){const k=t.panZoom;return k?k.scaleBy(H,B):!1}async function u(H){return f(1.2,H)}function h(H){return f(1/1.2,H)}function d(H){const B=t.panZoom;B&&(B.setScaleExtent([H,t.maxZoom]),t.minZoom=H)}function g(H){const B=t.panZoom;B&&(B.setScaleExtent([t.minZoom,H]),t.maxZoom=H)}function p(H){const B=t.panZoom;B&&(B.setTranslateExtent(H),t.translateExtent=H)}function y(H,B=null){let k=!1;const b=H.map(E=>(B?B.has(E.id):!0)&&E.selected?(k=!0,{...E,selected:!1}):E);return[k,b]}function w(H){const B=H?.nodes?new Set(H.nodes.map(K=>K.id)):null,[k,b]=y(t.nodes,B);k&&(t.nodes=b);const E=H?.edges?new Set(H.edges.map(K=>K.id)):null,[q,O]=y(t.edges,E);q&&(t.edges=O)}function M(H){const B=t.multiselectionKeyPressed;t.nodes=t.nodes.map(k=>{const b=H.includes(k.id),E=B&&k.selected||b;return!!k.selected!==E?{...k,selected:E}:k}),B||w({nodes:[]})}function I(H){const B=t.multiselectionKeyPressed;t.edges=t.edges.map(k=>{const b=H.includes(k.id),E=B&&k.selected||b;return!!k.selected!==E?{...k,selected:E}:k}),B||w({edges:[]})}function C(H,B,k){const b=t.nodeLookup.get(H);if(!b){t.onerror("012",Po.error012(H));return}t.selectionRect=null,t.selectionRectMode=null,b.selected?(B||b.selected&&t.multiselectionKeyPressed)&&(w({nodes:[b.internals.userNode],edges:[]}),requestAnimationFrame(()=>k?.blur())):M([H])}function T(H){const B=t.edgeLookup.get(H);if(!B){t.onerror("016",Po.error016(H));return}(B.selectable||t.elementsSelectable&&typeof B.selectable>"u")&&(t.selectionRect=null,t.selectionRectMode=null,B.selected?B.selected&&t.multiselectionKeyPressed&&w({nodes:[],edges:[B]}):I([H]))}function A(H,B){const{nodeExtent:k,snapGrid:b,nodeOrigin:E,nodeLookup:q,nodesDraggable:O,onerror:K}=t,Y=new Map,G=b?.[0]??5,U=b?.[1]??5,X=H.x*G*B,$=H.y*U*B;for(const Z of q.values()){if(!(Z.selected&&(Z.draggable||O&&typeof Z.draggable>"u")))continue;let F={x:Z.internals.positionAbsolute.x+X,y:Z.internals.positionAbsolute.y+$};b&&(F=Oi(F,b));const{position:J,positionAbsolute:te}=Qg({nodeId:Z.id,nextPosition:F,nodeLookup:q,nodeExtent:k,nodeOrigin:E,onError:K});Z.position=J,Z.internals.positionAbsolute=te,Y.set(Z.id,Z)}i(Y)}function D(H){return HS({delta:H,panZoom:t.panZoom,transform:[t.viewport.x,t.viewport.y,t.viewport.zoom],translateExtent:t.translateExtent,width:t.width,height:t.height})}const j=H=>{t._connection={...H}};function R(){t._connection=su}function z(){t.resetStoreValues(),w()}return Object.assign(t,{setNodeTypes:r,setEdgeTypes:o,addEdge:s,updateNodePositions:i,updateNodeInternals:a,zoomIn:u,zoomOut:h,fitView:l,setCenter:c,setMinZoom:d,setMaxZoom:g,setTranslateExtent:p,unselectNodesAndEdges:w,addSelectedNodes:M,addSelectedEdges:I,handleNodeSelection:C,handleEdgeSelection:T,moveSelectedNodes:A,panBy:D,updateConnection:j,cancelConnection:R,reset:z})}function z3(e,t){const{minZoom:r,maxZoom:o,initialViewport:s,onPanZoomStart:i,onPanZoom:a,onPanZoomEnd:l,translateExtent:c,setPanZoomInstance:f,onDraggingChange:u,onTransformChange:h}=t,d=t3({domNode:e,minZoom:r,maxZoom:o,translateExtent:c,viewport:s,onPanZoom:a,onPanZoomStart:i,onPanZoomEnd:l,onDraggingChange:u}),g=d.getViewport();return(s.x!==g.x||s.y!==g.y||s.zoom!==g.zoom)&&h([g.x,g.y,g.zoom]),f(d),d.update(t),{update(p){d.update(p)}}}var H3=N('
');function q3(e,t){Ne(t,!0);let r=Ee(t,"store",15),o=S(()=>r().panActivationKeyPressed||t.panOnDrag),s=S(()=>r().panActivationKeyPressed||t.panOnScroll);const{viewport:i}=r();let a=!1;et(()=>{!a&&r().viewportInitialized&&(t.oninit?.(),a=!0)});var l=H3(),c=v(l);Nn(c,()=>t.children),bn(l,(f,u)=>z3?.(f,u),()=>({viewport:r().viewport,minZoom:r().minZoom,maxZoom:r().maxZoom,initialViewport:i,onDraggingChange:f=>{r(r().dragging=f,!0)},setPanZoomInstance:f=>{r(r().panZoom=f,!0)},onPanZoomStart:t.onmovestart,onPanZoom:t.onmove,onPanZoomEnd:t.onmoveend,zoomOnScroll:t.zoomOnScroll,zoomOnDoubleClick:t.zoomOnDoubleClick,zoomOnPinch:t.zoomOnPinch,panOnScroll:n(s),panOnDrag:n(o),panOnScrollSpeed:t.panOnScrollSpeed,panOnScrollMode:t.panOnScrollMode,panActivationKeyPressed:r().panActivationKeyPressed,zoomActivationKeyPressed:r().zoomActivationKeyPressed,preventScrolling:typeof t.preventScrolling=="boolean"?t.preventScrolling:!0,noPanClassName:r().noPanClass,noWheelClassName:r().noWheelClass,userSelectionActive:!!r().selectionRect,translateExtent:r().translateExtent,lib:"svelte",paneClickDistance:t.paneClickDistance,selectionOnDrag:t.selectionOnDrag,onTransformChange:f=>{r(r().viewport={x:f[0],y:f[1],zoom:f[2]},!0)},connectionInProgress:r().connection.inProgress})),_(e,l),Ie()}function jf(e,t){return r=>{r.target===t&&e?.(r)}}function Ff(e){return t=>{const r=e.has(t.id);return!!t.selected!==r?{...t,selected:r}:t}}function Bf(e,t){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}var j3=N("
");function F3(e,t){Ne(t,!0);let r=Ee(t,"store",15),o=Ee(t,"panOnDrag",3,!0),s=Ee(t,"paneClickDistance",3,1),i=Ee(t,"autoPanOnSelection",3,!0),a,l=null,c=!1,f=new Set,u=new Set,h=S(()=>r().panActivationKeyPressed||o()),d=S(()=>r().selectionKeyPressed||!!r().selectionRect||t.selectionOnDrag&&n(h)!==!0),g=S(()=>r().elementsSelectable&&(n(d)||r().selectionRectMode==="user")),p=!1,y=0,w={x:0,y:0},M=!1;function I(O){if(O.pointerType==="touch"&&n(h)!==!1&&!r().selectionKeyPressed||(l=a?.getBoundingClientRect(),!l))return;const K=O.target===a,Y=!K&&!!O.target.closest(".nokey"),G=t.selectionOnDrag&&K||r().selectionKeyPressed;if(Y||!n(d)||!G||O.button!==0||!O.isPrimary)return;O.target?.setPointerCapture?.(O.pointerId),p=!1,M=!1;const{x:U,y:X}=rr(O,l),$=Li({x:U,y:X},[r().viewport.x,r().viewport.y,r().viewport.zoom]);r(r().selectionRect={width:0,height:0,startX:$.x,startY:$.y,x:U,y:X},!0),K||(O.stopPropagation(),O.preventDefault())}function C(O,K){if(r().selectionRect?.startX===void 0||r().selectionRect.startY===void 0)return;const Y={x:r().selectionRect?.startX,y:r().selectionRect?.startY},G=vs(Y,[r().viewport.x,r().viewport.y,r().viewport.zoom]),U={startX:Y.x,startY:Y.y,x:OQ.id));const Z=r().defaultEdgeOptions.selectable??!0;u=new Set;for(const Q of f){const F=r().connectionLookup.get(Q);if(F)for(const{edgeId:J}of F.values()){const te=r().edgeLookup.get(J);te&&(te.selectable??Z)&&u.add(J)}}Bf(X,f)||r(r().nodes=r().nodes.map(Ff(f)),!0),Bf($,u)||r(r().edges=r().edges.map(Ff(u)),!0),r(r().selectionRectMode="user",!0),r(r().selectionRect=U,!0)}function T(){if(!i()||!l)return;const[O,K]=Qu(w,l,r().autoPanSpeed);r().panBy({x:O,y:K}).then(Y=>{if(!p||!Y){y=requestAnimationFrame(T);return}C(w.x,w.y),y=requestAnimationFrame(T)})}function A(){cancelAnimationFrame(y),y=0,M=!1}nl(()=>{typeof window<"u"&&A()});function D(O){if(!n(d)||!l||!r().selectionRect)return;const K=rr(O,l);w={x:K.x,y:K.y};const Y={x:r().selectionRect.startX,y:r().selectionRect.startY},G=vs(Y,[r().viewport.x,r().viewport.y,r().viewport.zoom]);if(!p){const U=r().selectionKeyPressed?0:s();if(Math.hypot(K.x-G.x,K.y-G.y)<=U)return;r().unselectNodesAndEdges(),t.onselectionstart?.(O)}p=!0,M||(T(),M=!0),C(K.x,K.y)}function j(O){if(!n(g)){O.target===a&&r().connection.inProgress&&(c=!0);return}O.button===0&&(O.target?.releasePointerCapture?.(O.pointerId),!p&&O.target===a&&H?.(O),r(r().selectionRect=null,!0),p&&r(r().selectionRectMode=f.size>0?"nodes":null,!0),p&&t.onselectionend?.(O),A())}function R(O){O.target?.releasePointerCapture?.(O.pointerId),A()}const z=O=>{if(Array.isArray(n(h))&&n(h).includes(2)){O.preventDefault();return}t.onpanecontextmenu?.({event:O})},W=O=>{p&&(O.stopPropagation(),p=!1)};function H(O){if(p||r().connection.inProgress||c){p=!1,c=!1;return}t.onpaneclick?.({event:O}),r().unselectNodesAndEdges(),r(r().selectionRectMode=null,!0),r(r().selectionRect=null,!0)}var B=j3();let k;var b=S(()=>n(g)?void 0:jf(H,a)),E=S(()=>jf(z,a)),q=v(B);Nn(q,()=>t.children),Wt(B,O=>a=O,()=>a),P(O=>k=Ce(B,1,"svelte-flow__pane svelte-flow__container",null,k,O),[()=>({draggable:o()===!0||Array.isArray(o())&&o().includes(0),dragging:r().dragging,selection:n(d)})]),ke("click",B,function(...O){n(b)?.apply(this,O)}),Ge("pointerdown",B,function(...O){(n(g)?I:void 0)?.apply(this,O)},!0),ke("pointermove",B,function(...O){(n(g)?D:void 0)?.apply(this,O)}),ke("pointerup",B,j),Ge("pointercancel",B,function(...O){(n(g)?R:void 0)?.apply(this,O)}),ke("contextmenu",B,function(...O){n(E)?.apply(this,O)}),Ge("click",B,function(...O){(n(g)?W:void 0)?.apply(this,O)},!0),_(e,B),Ie()}mt(["click","pointermove","pointerup","contextmenu"]);var B3=N('
');function V3(e,t){Ne(t,!0);var r=B3();let o;var s=v(r);Nn(s,()=>t.children),P(()=>o=nt(r,"",o,{transform:`translate(${t.store.viewport.x??""}px, ${t.store.viewport.y??""}px) scale(${t.store.viewport.zoom??""})`})),_(e,r),Ie()}function Ep(e,t){const{store:r,onDrag:o,onDragStart:s,onDragStop:i,onNodeMouseDown:a}=t,l=BS({onDrag:o,onDragStart:s,onDragStop:i,onNodeMouseDown:a,getStoreItems:()=>{const{snapGrid:f,viewport:u}=r;return{nodes:r.nodes,nodeLookup:r.nodeLookup,edges:r.edges,nodeExtent:r.nodeExtent,snapGrid:f||[0,0],snapToGrid:!!f,nodeOrigin:r.nodeOrigin,multiSelectionActive:r.multiselectionKeyPressed,domNode:r.domNode,transform:[u.x,u.y,u.zoom],autoPanOnNodeDrag:r.autoPanOnNodeDrag,nodesDraggable:r.nodesDraggable,selectNodesOnDrag:r.selectNodesOnDrag,nodeDragThreshold:r.nodeDragThreshold,unselectNodesAndEdges:r.unselectNodesAndEdges,updateNodePositions:r.updateNodePositions,onSelectionDrag:r.onselectiondrag,onSelectionDragStart:r.onselectiondragstart,onSelectionDragStop:r.onselectiondragstop,panBy:r.panBy}}});function c(f,u){if(u.disabled){l.destroy();return}l.update({domNode:f,noDragClassName:u.noDragClass,handleSelector:u.handleSelector,nodeId:u.nodeId,isSelectable:u.isSelectable,nodeClickDistance:u.nodeClickDistance})}return c(e,t),{update(f){c(e,f)},destroy(){l.destroy()}}}var W3=N('
'),K3=N('
',1);function Y3(e,t){Ne(t,!0);var r=K3(),o=ye(r),s=v(o),i=m(o,2),a=v(i),l=m(i,2);{var c=f=>{var u=W3(),h=v(u);P(()=>{se(u,"id",`${X3}-${t.store.flowId}`),x(h,t.store.ariaLiveMessage)}),_(f,u)};V(l,f=>{t.store.disableKeyboardA11y||f(c)})}P(()=>{se(o,"id",`${Sp}-${t.store.flowId}`),x(s,t.store.disableKeyboardA11y?t.store.ariaLabelConfig["node.a11yDescription.default"]:t.store.ariaLabelConfig["node.a11yDescription.keyboardDisabled"]),se(i,"id",`${Mp}-${t.store.flowId}`),x(a,t.store.ariaLabelConfig["edge.a11yDescription.default"])}),_(e,r),Ie()}const Sp="svelte-flow__node-desc",Mp="svelte-flow__edge-desc",X3="svelte-flow__aria-live";var G3=N("
");function Z3(e,t){Ne(t,!0);let r=Ee(t,"store",15),o=S(()=>wn(t.node.data,()=>({}),!0)),s=S(()=>wn(t.node.selected,!1)),i=S(()=>t.node.draggable),a=S(()=>t.node.selectable),l=S(()=>wn(t.node.deletable,!0)),c=S(()=>t.node.connectable),f=S(()=>t.node.focusable),u=S(()=>wn(t.node.hidden,!1)),h=S(()=>wn(t.node.dragging,!1)),d=S(()=>wn(t.node.style,"")),g=S(()=>t.node.class),p=S(()=>wn(t.node.type,"default")),y=S(()=>t.node.parentId),w=S(()=>t.node.sourcePosition),M=S(()=>t.node.targetPosition),I=S(()=>wn(t.node.measured,()=>({width:0,height:0}),!0).width),C=S(()=>wn(t.node.measured,()=>({width:0,height:0}),!0).height),T=S(()=>t.node.initialWidth),A=S(()=>t.node.initialHeight),D=S(()=>t.node.width),j=S(()=>t.node.height),R=S(()=>t.node.dragHandle),z=S(()=>wn(t.node.internals.z,0)),W=S(()=>t.node.internals.positionAbsolute.x),H=S(()=>t.node.internals.positionAbsolute.y),B=S(()=>t.node.internals.userNode),{id:k}=t.node,b=S(()=>n(i)??r().nodesDraggable),E=S(()=>n(a)??r().elementsSelectable),q=S(()=>n(c)??r().nodesConnectable),O=S(()=>fS(t.node)),K=S(()=>!!t.node.internals.handleBounds),Y=S(()=>n(O)&&n(K)),G=S(()=>n(f)??r().nodesFocusable);function U(ce){return r().parentLookup.has(ce)}let X=S(()=>U(k)),$=ae(null),Z=null,Q=n(p),F=n(w),J=n(M),te=S(()=>r().nodeTypes[n(p)]??mp),ie=S(()=>r().ariaLabelConfig),ge={get value(){return n(q)}};s3(k),a3(ge);let ve=S(()=>{const ce=n(I)===void 0?n(D)??n(T):n(D),we=n(C)===void 0?n(j)??n(A):n(j);if(!(ce===void 0&&we===void 0&&n(d)===void 0))return`${n(d)};${ce?`width:${kr(ce)};`:""}${we?`height:${kr(we)};`:""}`});et(()=>{(n(p)!==Q||n(w)!==F||n(M)!==J)&&n($)!==null&&requestAnimationFrame(()=>{n($)!==null&&r().updateNodeInternals(new Map([[k,{id:k,nodeElement:n($),force:!0}]]))}),Q=n(p),F=n(w),J=n(M)}),et(()=>{t.resizeObserver&&(!n(Y)||n($)!==Z)&&(Z&&t.resizeObserver.unobserve(Z),n($)&&t.resizeObserver.observe(n($)),Z=n($))}),nl(()=>{Z&&t.resizeObserver?.unobserve(Z)});function re(ce){n(E)&&(!r().selectNodesOnDrag||!n(b)||r().nodeDragThreshold>0)&&r().handleNodeSelection(k),t.onnodeclick?.({node:n(B),event:ce})}function ee(ce){if(!(rp(ce)||r().disableKeyboardA11y))if(Zg.includes(ce.key)&&n(E)){const we=ce.key==="Escape";r().handleNodeSelection(k,we,n($))}else n(b)&&t.node.selected&&Object.prototype.hasOwnProperty.call(Wa,ce.key)&&(ce.preventDefault(),r(r().ariaLiveMessage=n(ie)["node.a11yDescription.ariaLiveMessage"]({direction:ce.key.replace("Arrow","").toLowerCase(),x:~~t.node.internals.positionAbsolute.x,y:~~t.node.internals.positionAbsolute.y}),!0),r().moveSelectedNodes(Wa[ce.key],ce.shiftKey?4:1))}const ue=()=>{if(r().disableKeyboardA11y||!r().autoPanOnNodeFocus||!n($)?.matches(":focus-visible"))return;const{width:ce,height:we,viewport:de}=r();Uu(new Map([[k,t.node]]),{x:0,y:0,width:ce,height:we},[de.x,de.y,de.zoom],!0).length>0||r().setCenter(t.node.position.x+(t.node.measured.width??0)/2,t.node.position.y+(t.node.measured.height??0)/2,{zoom:de.zoom})};var ne=St(),fe=ye(ne);{var he=ce=>{var we=G3();Fr(we,()=>({"data-id":k,class:["svelte-flow__node",`svelte-flow__node-${n(p)}`,n(g)],style:n(ve),onclick:re,onpointerenter:t.onnodepointerenter?me=>t.onnodepointerenter({node:n(B),event:me}):void 0,onpointerleave:t.onnodepointerleave?me=>t.onnodepointerleave({node:n(B),event:me}):void 0,onpointermove:t.onnodepointermove?me=>t.onnodepointermove({node:n(B),event:me}):void 0,oncontextmenu:t.onnodecontextmenu?me=>t.onnodecontextmenu({node:n(B),event:me}):void 0,onkeydown:n(G)?ee:void 0,onfocus:n(G)?ue:void 0,tabIndex:n(G)?0:void 0,role:t.node.ariaRole??(n(G)?"group":void 0),"aria-label":t.node.ariaLabel,"aria-roledescription":"node","aria-describedby":r().disableKeyboardA11y?void 0:`${Sp}-${r().flowId}`,...t.node.domAttributes,[Qr]:{dragging:n(h),selected:n(s),draggable:n(b),connectable:n(q),selectable:n(E),nopan:n(b),parent:n(X)},[dr]:{"z-index":n(z),transform:`translate(${n(W)??""}px, ${n(H)??""}px)`,visibility:n(O)?"visible":"hidden"}}));var de=v(we);Cu(de,()=>n(te),(me,Te)=>{Te(me,{get data(){return n(o)},get id(){return k},get selected(){return n(s)},get selectable(){return n(E)},get deletable(){return n(l)},get sourcePosition(){return n(w)},get targetPosition(){return n(M)},get zIndex(){return n(z)},get dragging(){return n(h)},get draggable(){return n(b)},get dragHandle(){return n(R)},get parentId(){return n(y)},get type(){return n(p)},get isConnectable(){return n(q)},get positionAbsoluteX(){return n(W)},get positionAbsoluteY(){return n(H)},get width(){return n(D)},get height(){return n(j)}})}),bn(we,(me,Te)=>Ep?.(me,Te),()=>({nodeId:k,isSelectable:n(E),disabled:!n(b),handleSelector:n(R),noDragClass:r().noDragClass,nodeClickDistance:t.nodeClickDistance,onNodeMouseDown:r().handleNodeSelection,onDrag:(me,Te,Pe,Le)=>{t.onnodedrag?.({event:me,targetNode:Pe,nodes:Le})},onDragStart:(me,Te,Pe,Le)=>{t.onnodedragstart?.({event:me,targetNode:Pe,nodes:Le})},onDragStop:(me,Te,Pe,Le)=>{t.onnodedragstop?.({event:me,targetNode:Pe,nodes:Le})},store:r()})),Wt(we,me=>L($,me),()=>n($)),_(ce,we)};V(fe,ce=>{n(u)||ce(he)})}_(e,ne),Ie()}var U3=N('
');function Q3(e,t){Ne(t,!0);let r=Ee(t,"store",15);const o=typeof ResizeObserver>"u"?null:new ResizeObserver(i=>{const a=new Map;i.forEach(l=>{const c=l.target.getAttribute("data-id");a.set(c,{id:c,nodeElement:l.target,force:!0})}),r().updateNodeInternals(a)});nl(()=>{o?.disconnect()});var s=U3();xe(s,21,()=>r().visible.nodes.values(),i=>i.id,(i,a)=>{Z3(i,{get node(){return n(a)},get resizeObserver(){return o},get nodeClickDistance(){return t.nodeClickDistance},get onnodeclick(){return t.onnodeclick},get onnodepointerenter(){return t.onnodepointerenter},get onnodepointermove(){return t.onnodepointermove},get onnodepointerleave(){return t.onnodepointerleave},get onnodedrag(){return t.onnodedrag},get onnodedragstart(){return t.onnodedragstart},get onnodedragstop(){return t.onnodedragstop},get onnodecontextmenu(){return t.onnodecontextmenu},get store(){return r()},set store(l){r(l)}})}),_(e,s),Ie()}var J3=Yt('');function $3(e,t){Ne(t,!0);let r=S(()=>t.edge.id),o=S(()=>t.edge.source),s=S(()=>t.edge.target),i=S(()=>t.edge.sourceX),a=S(()=>t.edge.sourceY),l=S(()=>t.edge.targetX),c=S(()=>t.edge.targetY),f=S(()=>t.edge.sourcePosition),u=S(()=>t.edge.targetPosition),h=S(()=>wn(t.edge.animated,!1)),d=S(()=>wn(t.edge.selected,!1)),g=S(()=>t.edge.label),p=S(()=>t.edge.labelStyle),y=S(()=>wn(t.edge.data,()=>({}),!0)),w=S(()=>t.edge.style),M=S(()=>t.edge.interactionWidth),I=S(()=>wn(t.edge.type,"default")),C=S(()=>t.edge.sourceHandle),T=S(()=>t.edge.targetHandle),A=S(()=>t.edge.markerStart),D=S(()=>t.edge.markerEnd),j=S(()=>t.edge.selectable),R=S(()=>t.edge.focusable),z=S(()=>wn(t.edge.deletable,!0)),W=S(()=>t.edge.hidden),H=S(()=>t.edge.zIndex),B=S(()=>t.edge.class),k=S(()=>t.edge.ariaLabel);c3(n(r));let b=null,E=S(()=>n(j)??t.store.elementsSelectable),q=S(()=>n(R)??t.store.edgesFocusable),O=S(()=>t.store.edgeTypes[n(I)]??bp),K=S(()=>n(A)?`url('#${au(n(A),t.store.flowId)}')`:void 0),Y=S(()=>n(D)?`url('#${au(n(D),t.store.flowId)}')`:void 0);function G(F){const J=t.store.edgeLookup.get(n(r));J&&(n(E)&&t.store.handleEdgeSelection(n(r)),t.onedgeclick?.({event:F,edge:J}))}function U(F,J){const te=t.store.edgeLookup.get(n(r));te&&J({event:F,edge:te})}function X(F){if(!t.store.disableKeyboardA11y&&Zg.includes(F.key)&&n(E)){const{unselectNodesAndEdges:J,addSelectedEdges:te}=t.store;F.key==="Escape"?(b?.blur(),J({edges:[t.edge]})):te([n(r)])}}var $=St(),Z=ye($);{var Q=F=>{var J=J3();let te;var ie=v(J);Fr(ie,()=>({class:["svelte-flow__edge",n(B)],"data-id":n(r),onclick:G,oncontextmenu:t.onedgecontextmenu?ve=>{U(ve,t.onedgecontextmenu)}:void 0,onpointerenter:t.onedgepointerenter?ve=>{U(ve,t.onedgepointerenter)}:void 0,onpointerleave:t.onedgepointerleave?ve=>{U(ve,t.onedgepointerleave)}:void 0,"aria-label":n(k)===null?void 0:n(k)?n(k):`Edge from ${n(o)} to ${n(s)}`,"aria-describedby":n(q)?`${Mp}-${t.store.flowId}`:void 0,role:t.edge.ariaRole??(n(q)?"group":"img"),"aria-roledescription":"edge",onkeydown:n(q)?X:void 0,tabindex:n(q)?0:void 0,...t.edge.domAttributes,[Qr]:{animated:n(h),selected:n(d),selectable:n(E)}}));var ge=v(ie);Cu(ge,()=>n(O),(ve,re)=>{re(ve,{get id(){return n(r)},get source(){return n(o)},get target(){return n(s)},get sourceX(){return n(i)},get sourceY(){return n(a)},get targetX(){return n(l)},get targetY(){return n(c)},get sourcePosition(){return n(f)},get targetPosition(){return n(u)},get animated(){return n(h)},get selected(){return n(d)},get label(){return n(g)},get labelStyle(){return n(p)},get data(){return n(y)},get style(){return n(w)},get interactionWidth(){return n(M)},get selectable(){return n(E)},get deletable(){return n(z)},get type(){return n(I)},get sourceHandleId(){return n(C)},get targetHandleId(){return n(T)},get markerStart(){return n(K)},get markerEnd(){return n(Y)}})}),Wt(ie,ve=>b=ve,()=>b),P(()=>te=nt(J,"",te,{"z-index":n(H)})),_(F,J)};V(Z,F=>{n(W)||F(Q)})}_(e,$),Ie()}jm();var eM=Yt("");function tM(e,t){Ne(t,!1);const r=bs();Wh();var o=eM();xe(o,5,()=>r.markers,s=>s.id,(s,i)=>{sM(s,Jr(()=>n(i)))}),_(e,o),Ie()}var nM=Yt(''),rM=Yt(''),oM=Yt('');function sM(e,t){Ne(t,!0);let r=Ee(t,"width",3,12.5),o=Ee(t,"height",3,12.5),s=Ee(t,"markerUnits",3,"strokeWidth"),i=Ee(t,"orient",3,"auto-start-reverse"),a=Ee(t,"color",3,"none");var l=oM(),c=v(l);{var f=h=>{var d=nM();let g;P(()=>{se(d,"stroke-width",t.strokeWidth),g=nt(d,"",g,{stroke:a()})}),_(h,d)},u=h=>{var d=rM();let g;P(()=>{se(d,"stroke-width",t.strokeWidth),g=nt(d,"",g,{stroke:a(),fill:a()})}),_(h,d)};V(c,h=>{t.type===ja.Arrow?h(f):t.type===ja.ArrowClosed&&h(u,1)})}P(()=>{se(l,"id",t.id),se(l,"markerWidth",`${r()}`),se(l,"markerHeight",`${o()}`),se(l,"markerUnits",s()),se(l,"orient",i())}),_(e,l),Ie()}var iM=N('
');function aM(e,t){Ne(t,!0);let r=Ee(t,"store",15);var o=iM(),s=v(o),i=v(s);tM(i,{});var a=m(s,2);xe(a,17,()=>r().visible.edges.values(),l=>l.id,(l,c)=>{$3(l,{get edge(){return n(c)},get onedgeclick(){return t.onedgeclick},get onedgecontextmenu(){return t.onedgecontextmenu},get onedgepointerenter(){return t.onedgepointerenter},get onedgepointerleave(){return t.onedgepointerleave},get store(){return r()},set store(f){r(f)}})}),_(e,o),Ie()}var lM=N('
');function Tp(e,t){Ne(t,!0);let r=Ee(t,"x",3,0),o=Ee(t,"y",3,0),s=Ee(t,"width",3,0),i=Ee(t,"height",3,0),a=Ee(t,"isVisible",3,!0);var l=St(),c=ye(l);{var f=u=>{var h=lM();let d;P(g=>d=nt(h,"",d,g),[()=>({width:typeof s()=="string"?s():kr(s()),height:typeof i()=="string"?i():kr(i()),transform:`translate(${r()}px, ${o()}px)`})]),_(u,h)};V(c,u=>{a()&&u(f)})}_(e,l),Ie()}var cM=N("
");function uM(e,t){Ne(t,!0);let r=ae(void 0);et(()=>{t.store.disableKeyboardA11y||n(r)?.focus({preventScroll:!0})});let o=S(()=>{if(t.store.selectionRectMode==="nodes"){t.store.nodes;const h=dl(t.store.nodeLookup,{filter:d=>!!d.selected});if(h.width>0&&h.height>0)return h}return null});function s(h){const d=t.store.nodes.filter(g=>g.selected);t.onselectioncontextmenu?.({nodes:d,event:h})}function i(h){const d=t.store.nodes.filter(g=>g.selected);t.onselectionclick?.({nodes:d,event:h})}function a(h){Object.prototype.hasOwnProperty.call(Wa,h.key)&&(h.preventDefault(),t.store.moveSelectedNodes(Wa[h.key],h.shiftKey?4:1))}var l=St(),c=ye(l);{var f=h=>{var d=cM();let g;var p=v(d);Tp(p,{width:"100%",height:"100%",x:0,y:0}),bn(d,(y,w)=>Ep?.(y,w),()=>({disabled:!1,store:t.store,onDrag:(y,w,M,I)=>{t.onnodedrag?.({event:y,targetNode:null,nodes:I})},onDragStart:(y,w,M,I)=>{t.onnodedragstart?.({event:y,targetNode:null,nodes:I})},onDragStop:(y,w,M,I)=>{t.onnodedragstop?.({event:y,targetNode:null,nodes:I})}})),Wt(d,y=>L(r,y),()=>n(r)),P(y=>{Ce(d,1,zo(["svelte-flow__selection-wrapper",t.store.noPanClass]),"svelte-sf2y5e"),se(d,"role",t.store.disableKeyboardA11y?void 0:"button"),se(d,"tabindex",t.store.disableKeyboardA11y?void 0:-1),g=nt(d,"",g,y)},[()=>({width:kr(n(o).width),height:kr(n(o).height),transform:`translate(${n(o).x??""}px, ${n(o).y??""}px)`})]),ke("contextmenu",d,s),ke("click",d,i),ke("keydown",d,function(...y){(t.store.disableKeyboardA11y?void 0:a)?.apply(this,y)}),_(h,d)},u=S(()=>t.store.selectionRectMode==="nodes"&&n(o)&&Lr(n(o).x)&&Lr(n(o).y));V(c,h=>{n(u)&&h(f)})}_(e,l),Ie()}mt(["contextmenu","click","keydown"]);function dM(e){switch(e){case"none":return 0;case"ctrl":return 8;case"shift":return 4;case"alt":return 2;case"meta":return 1}}function ir(e,t){let{enabled:r=!0,trigger:o,type:s="keydown"}=t;function i(l){const c=Array.isArray(o)?o:[o],f=[l.metaKey,l.altKey,l.shiftKey,l.ctrlKey].reduce((u,h,d)=>h?u|1<0){const C=Array.isArray(d)?d:[d];let T=!1;for(const A of C)if((Array.isArray(A)?A:[A]).reduce((j,R)=>j|dM(R),0)===f){T=!0;break}if(!T)continue}w&&l.preventDefault();const I={node:e,trigger:h,originalEvent:l};e.dispatchEvent(new CustomEvent("shortcut",{detail:I})),y?.(I)}}}let a;return r&&(a=zc(e,s,i)),{update:l=>{const{enabled:c=!0,type:f="keydown"}=l;r&&(!c||s!==f)?a?.():!r&&c&&(a=zc(e,f,i)),r=c,s=f,o=l.trigger},destroy:()=>{a?.()}}}function fM(){const e=S(bs),t=i=>{const a=Hf(i)?i:n(e).nodeLookup.get(i.id),l=a.parentId?vS(a.position,a.measured,a.parentId,n(e).nodeLookup,n(e).nodeOrigin):a.position,c={...a,position:l,width:a.measured?.width??a.width,height:a.measured?.height??a.height};return yi(c)};function r(i,a,l={replace:!1}){n(e).nodes=Ut(()=>n(e).nodes).map(c=>{if(c.id===i){const f=typeof a=="function"?a(c):a;return l?.replace&&Hf(f)?f:{...c,...f}}return c})}function o(i,a,l={replace:!1}){n(e).edges=Ut(()=>n(e).edges).map(c=>{if(c.id===i){const f=typeof a=="function"?a(c):a;return l.replace&&_3(f)?f:{...c,...f}}return c})}const s=i=>n(e).nodeLookup.get(i);return{zoomIn:n(e).zoomIn,zoomOut:n(e).zoomOut,getInternalNode:s,getNode:i=>s(i)?.internals.userNode,getNodes:i=>i===void 0?n(e).nodes:Vf(n(e).nodeLookup,i),getEdge:i=>n(e).edgeLookup.get(i),getEdges:i=>i===void 0?n(e).edges:Vf(n(e).edgeLookup,i),setZoom:async(i,a)=>{const l=n(e).panZoom;return l?l.scaleTo(i,a):!1},getZoom:()=>n(e).viewport.zoom,setViewport:async(i,a)=>{const l=n(e).viewport;return n(e).panZoom?(await n(e).panZoom.setViewport({x:i.x??l.x,y:i.y??l.y,zoom:i.zoom??l.zoom},a),!0):!1},getViewport:()=>eh(n(e).viewport),setCenter:async(i,a,l)=>n(e).setCenter(i,a,l),fitView:i=>n(e).fitView(i),fitBounds:async(i,a)=>{if(!n(e).panZoom)return!1;const l=Ju(i,n(e).width,n(e).height,n(e).minZoom,n(e).maxZoom,a?.padding??.1);return await n(e).panZoom.setViewport(l,{duration:a?.duration,ease:a?.ease,interpolate:a?.interpolate}),!0},getIntersectingNodes:(i,a=!0,l)=>{const c=Sf(i),f=c?i:t(i);return f?(l||n(e).nodes).filter(u=>{const h=n(e).nodeLookup.get(u.id);if(!h||!c&&u.id===i.id)return!1;const d=yi(h),g=Ba(d,f);return a&&g>0||g>=d.width*d.height||g>=f.width*f.height}):[]},isNodeIntersecting:(i,a,l=!0)=>{const f=Sf(i)?i:t(i);if(!f)return!1;const u=Ba(f,a);return l&&u>0||u>=a.width*a.height||u>=f.width*f.height},deleteElements:async({nodes:i=[],edges:a=[]})=>{const{nodes:l,edges:c}=await lS({nodesToRemove:i,edgesToRemove:a,nodes:n(e).nodes,edges:n(e).edges,onBeforeDelete:n(e).onbeforedelete});return l&&(n(e).nodes=Ut(()=>n(e).nodes).filter(f=>!l.some(({id:u})=>u===f.id))),c&&(n(e).edges=Ut(()=>n(e).edges).filter(f=>!c.some(({id:u})=>u===f.id))),(l.length>0||c.length>0)&&n(e).ondelete?.({nodes:l,edges:c}),{deletedNodes:l,deletedEdges:c}},screenToFlowPosition:(i,a={snapToGrid:!0})=>{if(!n(e).domNode)return i;const l=a.snapToGrid?n(e).snapGrid:!1,{x:c,y:f,zoom:u}=n(e).viewport,{x:h,y:d}=n(e).domNode.getBoundingClientRect(),g={x:i.x-h,y:i.y-d};return Li(g,[c,f,u],l!==null,l||[1,1])},flowToScreenPosition:i=>{if(!n(e).domNode)return i;const{x:a,y:l,zoom:c}=n(e).viewport,{x:f,y:u}=n(e).domNode.getBoundingClientRect(),h=vs(i,[a,l,c]);return{x:h.x+f,y:h.y+u}},toObject:()=>structuredClone({nodes:[...n(e).nodes],edges:[...n(e).edges],viewport:{...n(e).viewport}}),updateNode:r,updateNodeData:(i,a,l)=>{const c=n(e).nodeLookup.get(i)?.internals.userNode;if(!c)return;const f=typeof a=="function"?a(c):a;r(i,u=>({...u,data:l?.replace?f:{...u.data,...f}}))},updateEdge:o,getNodesBounds:i=>oS(i,{nodeLookup:n(e).nodeLookup,nodeOrigin:n(e).nodeOrigin}),getHandleConnections:({type:i,id:a,nodeId:l})=>Array.from(n(e).connectionLookup.get(`${l}-${i}-${a??null}`)?.values()??[])}}function Vf(e,t){const r=[];for(const o of t){const s=e.get(o);if(s){const i="internals"in s?s.internals?.userNode:s;r.push(i)}}return r}function vM(e,t){Ne(t,!0);let r=Ee(t,"store",15),o=Ee(t,"selectionKey",3,"Shift"),s=Ee(t,"multiSelectionKey",19,()=>Va()?"Meta":"Control"),i=Ee(t,"deleteKey",3,"Backspace"),a=Ee(t,"panActivationKey",3," "),l=Ee(t,"zoomActivationKey",19,()=>Va()?"Meta":"Control"),{deleteElements:c}=fM();function f(y){return y!==null&&typeof y=="object"}function u(y){return f(y)?y.modifier||[]:[]}function h(y){return y==null?"":f(y)?y.key:y}function d(y,w){return(Array.isArray(y)?y:[y]).map(I=>{const C=h(I);return{key:C,modifier:u(I),enabled:C!==null,callback:w}})}function g(){r(r().selectionRect=null,!0),r(r().selectionKeyPressed=!1,!0),r(r().multiselectionKeyPressed=!1,!0),r(r().deleteKeyPressed=!1,!0),r(r().panActivationKeyPressed=!1,!0),r(r().zoomActivationKeyPressed=!1,!0)}function p(){const y=r().nodes.filter(M=>M.selected),w=r().edges.filter(M=>M.selected);c({nodes:y,edges:w})}Ge("blur",fn,g),Ge("contextmenu",fn,g),bn(fn,(y,w)=>ir?.(y,w),()=>({trigger:d(o(),()=>r(r().selectionKeyPressed=!0,!0)),type:"keydown"})),bn(fn,(y,w)=>ir?.(y,w),()=>({trigger:d(o(),()=>r(r().selectionKeyPressed=!1,!0)),type:"keyup"})),bn(fn,(y,w)=>ir?.(y,w),()=>({trigger:d(s(),()=>{r(r().multiselectionKeyPressed=!0,!0)}),type:"keydown"})),bn(fn,(y,w)=>ir?.(y,w),()=>({trigger:d(s(),()=>r(r().multiselectionKeyPressed=!1,!0)),type:"keyup"})),bn(fn,(y,w)=>ir?.(y,w),()=>({trigger:d(i(),y=>{!(y.originalEvent.ctrlKey||y.originalEvent.metaKey||y.originalEvent.shiftKey)&&!rp(y.originalEvent)&&(r(r().deleteKeyPressed=!0,!0),p())}),type:"keydown"})),bn(fn,(y,w)=>ir?.(y,w),()=>({trigger:d(i(),()=>r(r().deleteKeyPressed=!1,!0)),type:"keyup"})),bn(fn,(y,w)=>ir?.(y,w),()=>({trigger:d(a(),()=>r(r().panActivationKeyPressed=!0,!0)),type:"keydown"})),bn(fn,(y,w)=>ir?.(y,w),()=>({trigger:d(a(),()=>r(r().panActivationKeyPressed=!1,!0)),type:"keyup"})),bn(fn,(y,w)=>ir?.(y,w),()=>({trigger:d(l(),()=>r(r().zoomActivationKeyPressed=!0,!0)),type:"keydown"})),bn(fn,(y,w)=>ir?.(y,w),()=>({trigger:d(l(),()=>r(r().zoomActivationKeyPressed=!1,!0)),type:"keyup"})),Ie()}var hM=Yt(''),gM=Yt('');function pM(e,t){Ne(t,!0);let r=S(()=>{if(!t.store.connection.inProgress)return"";const a={sourceX:t.store.connection.from.x,sourceY:t.store.connection.from.y,sourcePosition:t.store.connection.fromPosition,targetX:t.store.connection.to.x,targetY:t.store.connection.to.y,targetPosition:t.store.connection.toPosition};switch(t.type){case eo.Bezier:{const[l]=sp(a);return l}case eo.Straight:{const[l]=ap(a);return l}case eo.Step:case eo.SmoothStep:{const[l]=$u({...a,borderRadius:t.type===eo.Step?0:void 0});return l}}});var o=St(),s=ye(o);{var i=a=>{var l=gM(),c=v(l),f=v(c);{var u=d=>{var g=St(),p=ye(g);Cu(p,()=>t.LineComponent,(y,w)=>{w(y,{})}),_(d,g)},h=d=>{var g=hM();P(()=>{se(g,"d",n(r)),nt(g,t.style)}),_(d,g)};V(f,d=>{t.LineComponent?d(u):d(h,-1)})}P(d=>{se(l,"width",t.store.width),se(l,"height",t.store.height),nt(l,t.containerStyle),Ce(c,0,d)},[()=>zo(["svelte-flow__connection",pS(t.store.connection.isValid)])]),_(a,l)};V(s,a=>{t.store.connection.inProgress&&a(i)})}_(e,o),Ie()}var mM=new Set(["$$slots","$$events","$$legacy","position","style","class","children"]),_M=N("
");function Cp(e,t){Ne(t,!0);let r=Ee(t,"position",3,"top-right"),o=ao(t,mM),s=S(()=>`${r()}`.split("-"));var i=_M();Fr(i,l=>({class:l,style:t.style,...o}),[()=>["svelte-flow__panel",t.class,...n(s)]]);var a=v(i);Nn(a,()=>t.children??Ln),_(e,i),Ie()}var yM=N('Svelte Flow');function wM(e,t){Ne(t,!0);let r=Ee(t,"position",3,"bottom-right");const o="https://svelteflow.dev?utm_source=attribution";et(()=>{});var s=St(),i=ye(s);{var a=l=>{{let c=S(()=>`Please only hide this attribution when you are subscribed to Svelte Flow Pro: ${o}`);Cp(l,{get position(){return r()},class:"svelte-flow__attribution",get"data-message"(){return n(c)},children:(f,u)=>{var h=yM();P(()=>se(h,"href",o)),_(f,h)},$$slots:{default:!0}})}};V(i,l=>{t.proOptions?.hideAttribution||l(a)})}_(e,s),Ie()}var bM=N("
");function xM(e,t){Ne(t,!0);let r=Ee(t,"domNode",15),o=Ee(t,"clientWidth",15),s=Ee(t,"clientHeight",15),i=S(()=>t.rest.class),a=S(()=>um(t.rest,["id","class","nodeTypes","edgeTypes","colorMode","isValidConnection","onmove","onmovestart","onmoveend","onflowerror","ondelete","onbeforedelete","onbeforeconnect","onconnect","onconnectstart","onconnectend","onbeforereconnect","onreconnect","onreconnectstart","onreconnectend","onclickconnectstart","onclickconnectend","oninit","onselectionchange","onselectiondragstart","onselectiondrag","onselectiondragstop","onselectionstart","onselectionend","clickConnect","fitView","fitViewOptions","nodeOrigin","nodeDragThreshold","connectionDragThreshold","minZoom","maxZoom","initialViewport","connectionRadius","connectionMode","selectionMode","selectNodesOnDrag","snapGrid","defaultMarkerColor","translateExtent","nodeExtent","onlyRenderVisibleElements","autoPanOnConnect","autoPanOnNodeDrag","colorModeSSR","defaultEdgeOptions","elevateNodesOnSelect","elevateEdgesOnSelect","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","elementsSelectable","nodesFocusable","edgesFocusable","disableKeyboardA11y","noDragClass","noPanClass","noWheelClass","ariaLabelConfig","autoPanSpeed","panOnScrollSpeed","zIndexMode","autoPanOnSelection"]));function l(u){u.currentTarget.scrollTo({top:0,left:0,behavior:"auto"}),t.rest.onscroll&&t.rest.onscroll(u)}var c=bM();Fr(c,u=>({class:["svelte-flow","svelte-flow__container",t.colorMode,n(i)],"data-testid":"svelte-flow__wrapper",role:"application",onscroll:l,...n(a),[dr]:u}),[()=>({width:kr(t.width),height:kr(t.height)})],void 0,void 0,"svelte-mkap6j");var f=v(c);Nn(f,()=>t.children??Ln),Wt(c,u=>r(u),()=>r()),Md(c,"clientHeight",s),Md(c,"clientWidth",o),_(e,c),Ie()}var kM=new Set(["$$slots","$$events","$$legacy","width","height","proOptions","selectionKey","deleteKey","panActivationKey","multiSelectionKey","zoomActivationKey","paneClickDistance","nodeClickDistance","onmovestart","onmoveend","onmove","oninit","onnodeclick","onnodecontextmenu","onnodedrag","onnodedragstart","onnodedragstop","onnodepointerenter","onnodepointermove","onnodepointerleave","onselectionclick","onselectioncontextmenu","onselectionstart","onselectionend","onedgeclick","onedgecontextmenu","onedgepointerenter","onedgepointerleave","onpaneclick","onpanecontextmenu","panOnScrollMode","preventScrolling","zoomOnScroll","zoomOnDoubleClick","zoomOnPinch","panOnScroll","panOnScrollSpeed","panOnDrag","selectionOnDrag","autoPanOnSelection","connectionLineComponent","connectionLineStyle","connectionLineContainerStyle","connectionLineType","attributionPosition","children","nodes","edges","viewport"]),EM=N('
',1),SM=N(" ",1),MM=N(" ",1);function gl(e,t){Ne(t,!0);let r=Ee(t,"paneClickDistance",3,1),o=Ee(t,"nodeClickDistance",3,1),s=Ee(t,"panOnScrollMode",19,()=>$o.Free),i=Ee(t,"preventScrolling",3,!0),a=Ee(t,"zoomOnScroll",3,!0),l=Ee(t,"zoomOnDoubleClick",3,!0),c=Ee(t,"zoomOnPinch",3,!0),f=Ee(t,"panOnScroll",3,!1),u=Ee(t,"panOnScrollSpeed",3,.5),h=Ee(t,"panOnDrag",3,!0),d=Ee(t,"selectionOnDrag",3,!1),g=Ee(t,"autoPanOnSelection",3,!0),p=Ee(t,"connectionLineType",19,()=>eo.Bezier),y=Ee(t,"nodes",31,()=>un([])),w=Ee(t,"edges",31,()=>un([])),M=Ee(t,"viewport",15,void 0),I=ao(t,kM),C=R3({props:I,width:t.width,height:t.height,get nodes(){return y()},set nodes(A){y(A)},get edges(){return w()},set edges(A){w(A)},get viewport(){return M()},set viewport(A){M(A)}});const T=pu(lu);T&&T.setStore&&T.setStore(C),th(lu,{provider:!1,getStore(){return C}}),et(()=>{const A={nodes:C.selectedNodes,edges:C.selectedEdges};Ut(()=>t.onselectionchange)?.(A);for(const D of C.selectionChangeHandlers.values())D(A)}),nl(()=>{C.reset()}),xM(e,{get colorMode(){return C.colorMode},get width(){return t.width},get height(){return t.height},get rest(){return I},get domNode(){return C.domNode},set domNode(A){C.domNode=A},get clientWidth(){return C.width},set clientWidth(A){C.width=A},get clientHeight(){return C.height},set clientHeight(A){C.height=A},children:(A,D)=>{var j=MM(),R=ye(j);vM(R,{get selectionKey(){return t.selectionKey},get deleteKey(){return t.deleteKey},get panActivationKey(){return t.panActivationKey},get multiSelectionKey(){return t.multiSelectionKey},get zoomActivationKey(){return t.zoomActivationKey},get store(){return C},set store(k){C=k}});var z=m(R,2);q3(z,{get panOnScrollMode(){return s()},get preventScrolling(){return i()},get zoomOnScroll(){return a()},get zoomOnDoubleClick(){return l()},get zoomOnPinch(){return c()},get panOnScroll(){return f()},get panOnScrollSpeed(){return u()},get panOnDrag(){return h()},get paneClickDistance(){return r()},get selectionOnDrag(){return d()},get onmovestart(){return t.onmovestart},get onmove(){return t.onmove},get onmoveend(){return t.onmoveend},get oninit(){return t.oninit},get store(){return C},set store(k){C=k},children:(k,b)=>{F3(k,{get onpaneclick(){return t.onpaneclick},get onpanecontextmenu(){return t.onpanecontextmenu},get onselectionstart(){return t.onselectionstart},get onselectionend(){return t.onselectionend},get panOnDrag(){return h()},get paneClickDistance(){return r()},get selectionOnDrag(){return d()},get autoPanOnSelection(){return g()},get store(){return C},set store(E){C=E},children:(E,q)=>{var O=SM(),K=ye(O);V3(K,{get store(){return C},set store(G){C=G},children:(G,U)=>{var X=EM(),$=m(ye(X),2);aM($,{get onedgeclick(){return t.onedgeclick},get onedgecontextmenu(){return t.onedgecontextmenu},get onedgepointerenter(){return t.onedgepointerenter},get onedgepointerleave(){return t.onedgepointerleave},get store(){return C},set store(J){C=J}});var Z=m($,4);pM(Z,{get type(){return p()},get LineComponent(){return t.connectionLineComponent},get containerStyle(){return t.connectionLineContainerStyle},get style(){return t.connectionLineStyle},get store(){return C},set store(J){C=J}});var Q=m(Z,2);Q3(Q,{get nodeClickDistance(){return o()},get onnodeclick(){return t.onnodeclick},get onnodecontextmenu(){return t.onnodecontextmenu},get onnodepointerenter(){return t.onnodepointerenter},get onnodepointermove(){return t.onnodepointermove},get onnodepointerleave(){return t.onnodepointerleave},get onnodedrag(){return t.onnodedrag},get onnodedragstart(){return t.onnodedragstart},get onnodedragstop(){return t.onnodedragstop},get store(){return C},set store(J){C=J}});var F=m(Q,2);uM(F,{get onselectionclick(){return t.onselectionclick},get onselectioncontextmenu(){return t.onselectioncontextmenu},get onnodedrag(){return t.onnodedrag},get onnodedragstart(){return t.onnodedragstart},get onnodedragstop(){return t.onnodedragstop},get store(){return C},set store(J){C=J}}),_(G,X)},$$slots:{default:!0}});var Y=m(K,2);{let G=S(()=>!!(C.selectionRect&&C.selectionRectMode==="user")),U=S(()=>C.selectionRect?.width),X=S(()=>C.selectionRect?.height),$=S(()=>C.selectionRect?.x),Z=S(()=>C.selectionRect?.y);Tp(Y,{get isVisible(){return n(G)},get width(){return n(U)},get height(){return n(X)},get x(){return n($)},get y(){return n(Z)}})}_(E,O)},$$slots:{default:!0}})},$$slots:{default:!0}});var W=m(z,2);wM(W,{get proOptions(){return t.proOptions},get position(){return t.attributionPosition}});var H=m(W,2);Y3(H,{get store(){return C}});var B=m(H,2);Nn(B,()=>t.children??Ln),_(A,j)},$$slots:{default:!0}}),Ie()}var TM=new Set(["$$slots","$$events","$$legacy","target","children"]),CM=N("
");function NM(e,t){Ne(t,!0);let r=Ee(t,"target",3,"front"),o=ao(t,TM);var s=CM();Fr(s,a=>({...o,[dr]:a}),[()=>({display:yp().value?"none":void 0})]);var i=v(s);Nn(i,()=>t.children??Ln),bn(s,(a,l)=>_p?.(a,l),()=>`viewport-${r()}`),_(e,s),Ie()}var IM=new Set(["$$slots","$$events","$$legacy","class","bgColor","bgColorHover","color","colorHover","borderColor","onclick","children"]),AM=N("");function Qi(e,t){let r=ao(t,IM);var o=AM();Fr(o,()=>({type:"button",onclick:t.onclick,class:["svelte-flow__controls-button",t.class],...r,[dr]:{"--xy-controls-button-background-color-props":t.bgColor,"--xy-controls-button-background-color-hover-props":t.bgColorHover,"--xy-controls-button-color-props":t.color,"--xy-controls-button-color-hover-props":t.colorHover,"--xy-controls-button-border-color-props":t.borderColor}}));var s=v(o);Nn(s,()=>t.children??Ln),_(e,o)}var PM=Yt('');function OM(e){var t=PM();_(e,t)}var LM=Yt('');function DM(e){var t=LM();_(e,t)}var RM=Yt('');function zM(e){var t=RM();_(e,t)}var HM=Yt('');function qM(e){var t=HM();_(e,t)}var jM=Yt('');function FM(e){var t=jM();_(e,t)}var BM=new Set(["$$slots","$$events","$$legacy","position","orientation","showZoom","showFitView","showLock","style","class","buttonBgColor","buttonBgColorHover","buttonColor","buttonColorHover","buttonBorderColor","fitViewOptions","children","before","after"]),VM=N(" ",1),WM=N(" ",1);function pl(e,t){Ne(t,!0);let r=Ee(t,"position",3,"bottom-left"),o=Ee(t,"orientation",3,"vertical"),s=Ee(t,"showZoom",3,!0),i=Ee(t,"showFitView",3,!0),a=Ee(t,"showLock",3,!0),l=ao(t,BM),c=S(bs);const f=S(()=>({bgColor:t.buttonBgColor,bgColorHover:t.buttonBgColorHover,color:t.buttonColor,colorHover:t.buttonColorHover,borderColor:t.buttonBorderColor}));let u=S(()=>n(c).nodesDraggable||n(c).nodesConnectable||n(c).elementsSelectable),h=S(()=>n(c).viewport.zoom<=n(c).minZoom),d=S(()=>n(c).viewport.zoom>=n(c).maxZoom),g=S(()=>n(c).ariaLabelConfig),p=S(()=>o()==="horizontal"?"horizontal":"vertical");const y=()=>{n(c).zoomIn()},w=()=>{n(c).zoomOut()},M=()=>{n(c).fitView(t.fitViewOptions)},I=()=>{let C=!n(u);n(c).nodesDraggable=C,n(c).nodesConnectable=C,n(c).elementsSelectable=C};{let C=S(()=>["svelte-flow__controls",n(p),t.class]);Cp(e,Jr({get class(){return n(C)},get position(){return r()},"data-testid":"svelte-flow__controls",get"aria-label"(){return n(g)["controls.ariaLabel"]},get style(){return t.style}},()=>l,{children:(T,A)=>{var D=WM(),j=ye(D);{var R=Y=>{var G=St(),U=ye(G);Nn(U,()=>t.before),_(Y,G)};V(j,Y=>{t.before&&Y(R)})}var z=m(j,2);{var W=Y=>{var G=VM(),U=ye(G);Qi(U,Jr({onclick:y,class:"svelte-flow__controls-zoomin",get title(){return n(g)["controls.zoomIn.ariaLabel"]},get"aria-label"(){return n(g)["controls.zoomIn.ariaLabel"]},get disabled(){return n(d)}},()=>n(f),{children:($,Z)=>{OM($)},$$slots:{default:!0}}));var X=m(U,2);Qi(X,Jr({onclick:w,class:"svelte-flow__controls-zoomout",get title(){return n(g)["controls.zoomOut.ariaLabel"]},get"aria-label"(){return n(g)["controls.zoomOut.ariaLabel"]},get disabled(){return n(h)}},()=>n(f),{children:($,Z)=>{DM($)},$$slots:{default:!0}})),_(Y,G)};V(z,Y=>{s()&&Y(W)})}var H=m(z,2);{var B=Y=>{Qi(Y,Jr({class:"svelte-flow__controls-fitview",onclick:M,get title(){return n(g)["controls.fitView.ariaLabel"]},get"aria-label"(){return n(g)["controls.fitView.ariaLabel"]}},()=>n(f),{children:(G,U)=>{zM(G)},$$slots:{default:!0}}))};V(H,Y=>{i()&&Y(B)})}var k=m(H,2);{var b=Y=>{Qi(Y,Jr({class:"svelte-flow__controls-interactive",onclick:I,get title(){return n(g)["controls.interactive.ariaLabel"]},get"aria-label"(){return n(g)["controls.interactive.ariaLabel"]}},()=>n(f),{children:(G,U)=>{var X=St(),$=ye(X);{var Z=F=>{FM(F)},Q=F=>{qM(F)};V($,F=>{n(u)?F(Z):F(Q,-1)})}_(G,X)},$$slots:{default:!0}}))};V(k,Y=>{a()&&Y(b)})}var E=m(k,2);{var q=Y=>{var G=St(),U=ye(G);Nn(U,()=>t.children),_(Y,G)};V(E,Y=>{t.children&&Y(q)})}var O=m(E,2);{var K=Y=>{var G=St(),U=ye(G);Nn(U,()=>t.after),_(Y,G)};V(O,Y=>{t.after&&Y(K)})}_(T,D)},$$slots:{default:!0}}))}Ie()}const Jn=40,KM=74,cu=34,_n=44,YM=230,ml=12,Np=110,XM=7.81,GM=22,ZM=4,UM=6,QM=.4,JM=5.9,$M=24;function Ip(e,t=""){return Math.max(Np,e.length*XM+GM,t.length*JM+$M)}function sd(e,t=!1){if(t)return"nothing depends on this";const r=`${e.symbols} symbol${e.symbols===1?"":"s"}`,o=`${e.files} file${e.files===1?"":"s"}`,s=e.dependents?.files??0,i=s>0?` · ${s} depend on it`:"";return`${r} · ${o}${i}`}function Ap(e){return Math.min(6,1+Math.log2(Math.max(1,e))*.7)}function zr(e){return`${e.source}\0${e.target}`}function _l(e,t){const r=e.modules.filter(F=>t.includeTests||!F.test),o=new Set(r.map(F=>F.id)),s=new Set(e.links.map(F=>F.target)),i=e.links.filter(F=>o.has(F.source)&&o.has(F.target)),a=t.minWeight??(t.includeTests?UM:ZM),l=t.layerGap??KM,c=t.portPitch??0,f=t.ports==="directional",u=i.filter(F=>F.declared>0),h=i.length>0&&u.length>=i.length*QM,d=F=>h?F.declared:F.count,g=h?u:i,p=new Map(g.map(F=>[zr(F),F])),y=[],w=[];for(const F of g){const J=p.get(zr({source:F.target,target:F.source}));if(!J){y.push(F);continue}const te=d(F),ie=d(J);if(ie>te||ie===te&&F.source>F.target){w.push({forward:J,back:F});continue}y.push(F)}const M=new Map(r.map(F=>[F.id,[]]));for(const F of y)M.get(F.source)?.push(F.target);for(const F of M.values())F.sort();const I=new Map;if(t.layering){for(const[F,J]of t.layering(r.map(te=>te.id),y))I.set(F,J);for(const F of r)I.has(F.id)||I.set(F.id,0)}else for(const F of r)Pp(F.id,M,I,new Set);const C=Math.max(1,...[...I.values()].map(F=>F+1)),T=Array.from({length:C},()=>[]);for(const F of r)T[I.get(F.id)??0].push(F.id);const A=t.order;for(const F of T)F.sort(A?(J,te)=>A(J)-A(te)||J.localeCompare(te):void 0);const D=new Map(r.map(F=>[F.id,[]]));for(const F of y)D.get(F.target)?.push(F.source),A||D.get(F.source)?.push(F.target);const j=new Map;for(const F of T)F.forEach((J,te)=>j.set(J,te));for(let F=0;F<3;F+=1)for(const J of T){const te=new Map(J.map(ie=>[ie,e4(ie,D,j)]));J.sort((ie,ge)=>{const ve=te.get(ie)??0,re=te.get(ge)??0;return ve!==re&&Number.isFinite(ve-re)?ve-re:ve!==re?vej.set(ie,ge))}const R=F=>{const J=I.get(F.source)??0,te=I.get(F.target)??0;return J>te?"down":J!f||F==="down"?{source:"bottom",target:"top"}:F==="up"?{source:"top",target:"bottom"}:{source:"top",target:"top"},W=new Map(r.map(F=>[F.id,{top:0,bottom:0}]));for(const F of i){const J=z(R(F));W.get(F.source)[J.source]+=1,W.get(F.target)[J.target]+=1}const H=new Set(r.filter(F=>!s.has(F.id)).map(F=>F.id)),B=new Map(r.map(F=>{const J=H.has(F.id),te=t.sizing?.(F,J)??{label:F.id,meta:sd(F,J)},ie=W.get(F.id)??{top:0,bottom:0},ge=(Math.max(ie.top,ie.bottom)+1)*c;return[F.id,Math.max(Ip(te.label,te.meta),ge)]})),k=T.map(F=>F.reduce((J,te)=>J+(B.get(te)??0),0)),b=T.map((F,J)=>(k[J]??0)+Math.max(0,F.length-1)*cu),E=Math.max(1,...b),q=T.map((F,J)=>Math.min(E,Math.max(b[J]??0,F.length*YM))),O=E+_n*2,K=C*(Jn+l)-l+_n*2,Y=new Map,G=new Map(r.map(F=>[F.id,F])),U=Math.max(0,...r.map(F=>F.dependents?.files??0));T.forEach((F,J)=>{const te=q[J]??0,ie=k[J]??0,ge=F.length>1?(te-ie)/(F.length-1):0;let ve=_n+(E-te)/2+(F.length===1?(te-ie)/2:0);const re=_n+(C-1-J)*(Jn+l);for(const ee of F){const ue=B.get(ee)??Np,ne=G.get(ee);Y.set(ee,{id:ee,module:ne,island:H.has(ee),generated:ne.files>0&&ne.generated===ne.files,weight:U===0?0:(ne.dependents?.files??0)/U,layer:J,x:ve,y:re,width:ue,height:Jn,sourceHandles:[],targetHandles:[],ports:{top:[],bottom:[]}}),ve+=ue+ge}});const X=[],$=new Map;for(const F of i){const J=Y.get(F.source),te=Y.get(F.target);if(!J||!te)continue;const ie=zr(F),ge=R(F),ve={id:ie,source:F.source,target:F.target,sourceHandle:`s:${ie}`,targetHandle:`t:${ie}`,link:F,width:Ap(F.count),back:J.layer<=te.layer,thin:F.countF.other-J.other||F.id.localeCompare(J.id);for(const[F,J]of $){const te=Y.get(F);te&&(J.top.sort(Z),J.bottom.sort(Z),te.ports={top:J.top.map(ie=>({id:ie.id,type:ie.type})),bottom:J.bottom.map(ie=>({id:ie.id,type:ie.type}))},te.sourceHandles=J.bottom.filter(ie=>ie.type==="source").map(ie=>ie.id),te.targetHandles=J.top.filter(ie=>ie.type==="target").map(ie=>ie.id))}const Q=T.map((F,J)=>({index:J,y:_n+(C-1-J)*(Jn+l)+Jn/2,label:C===1?null:J===C-1?"entry points":J===0?"foundations — depend on nothing below":null}));return{nodes:[...Y.values()],edges:X,layers:Q,width:O,height:K,basis:{kind:h?"declared":"all",declaredLinks:u.length,totalLinks:i.length},minWeight:a,hiddenLinks:X.filter(F=>F.thin||F.back).length,mutual:w.sort((F,J)=>J.back.count-F.back.count||F.back.source.localeCompare(J.back.source)),moduleCycles:t4(r.map(F=>F.id),X)}}function id(e,t){return t!==null?e.source===t||e.target===t:!e.thin&&!e.back}function uu(e,t,r){const o=e.ports.top.findIndex(i=>i.id===t&&i.type===r);if(o>=0)return{x:e.x+e.width*(o+1)/(e.ports.top.length+1),y:e.y};const s=e.ports.bottom.findIndex(i=>i.id===t&&i.type===r);return s>=0?{x:e.x+e.width*(s+1)/(e.ports.bottom.length+1),y:e.y+e.height}:{x:e.x+e.width/2,y:r==="source"?e.y+e.height:e.y}}function Wf(e,t){const r={top:[],bottom:[]};return e.set(t,r),r}function Kf(e,t){const r=e.get(t);return r?r.x+r.width/2:0}function e4(e,t,r){const o=t.get(e)??[];if(o.length===0)return Number.POSITIVE_INFINITY;let s=0;for(const i of o)s+=r.get(i)??0;return s/o.length}function Pp(e,t,r,o){const s=r.get(e);if(s!==void 0)return s;if(o.has(e))return 0;o.add(e);let i=0;for(const a of t.get(e)??[])i=Math.max(i,Pp(a,t,r,o)+1);return o.delete(e),r.set(e,i),i}function t4(e,t){const r=new Map(e.map(u=>[u,[]]));for(const u of t)r.get(u.source)?.push(u.target);for(const u of r.values())u.sort();const o=new Map,s=new Map,i=new Set,a=[],l=[];let c=0;const f=u=>{o.set(u,c),s.set(u,c),c+=1,a.push(u),i.add(u);for(const h of r.get(u)??[])o.has(h)?i.has(h)&&s.set(u,Math.min(s.get(u)??0,o.get(h)??0)):(f(h),s.set(u,Math.min(s.get(u)??0,s.get(h)??0)));if(s.get(u)===o.get(u)){const h=[];for(;;){const d=a.pop();if(d===void 0||(i.delete(d),h.push(d),d===u))break}h.length>2&&l.push(h.sort())}};for(const u of[...e].sort())o.has(u)||f(u);return l.sort((u,h)=>h.length-u.length||(u[0]??"").localeCompare(h[0]??""))}var n4=N(''),r4=N(' ',1);function o4(e,t){Ne(t,!0);const r=S(()=>t.data),o=S(()=>n(r).layout),s=S(()=>n(o).module);function i(I,C){return`left:${(I+1)/(C+1)*100}%`}var a=r4(),l=ye(a);xe(l,18,()=>n(o).targetHandles,I=>I,(I,C,T)=>{{let A=S(()=>`t:${C}`),D=S(()=>i(n(T),n(o).targetHandles.length));kn(I,{type:"target",get id(){return n(A)},get position(){return Ve.Top},get style(){return n(D)},isConnectable:!1})}});var c=m(l,2);let f;var u=v(c),h=v(u),d=m(u,2);let g;var p=v(d),y=m(d,2);{var w=I=>{var C=n4();P(T=>nt(C,T),[()=>`width:${(n(o).weight*100).toFixed(1)}%`]),_(I,C)};V(y,I=>{n(o).weight>0&&I(w)})}var M=m(c,2);xe(M,18,()=>n(o).sourceHandles,I=>I,(I,C,T)=>{{let A=S(()=>`s:${C}`),D=S(()=>i(n(T),n(o).sourceHandles.length));kn(I,{type:"source",get id(){return n(A)},get position(){return Ve.Bottom},get style(){return n(D)},isConnectable:!1})}}),P(I=>{f=Ce(c,1,"mnode svelte-1ymw5ah",null,f,{sel:n(r).selected,dimmed:n(r).dimmed,test:n(s).test,gen:n(o).generated}),nt(c,`width:${n(o).width}px;height:${n(o).height}px`),se(c,"aria-pressed",n(r).selected),se(c,"title",`${n(s).id} — ${n(s).symbols} symbols in ${n(s).files} file${n(s).files===1?"":"s"}${(n(s).dependents?.files??0)>0?`. ${n(s).dependents.files} file${n(s).dependents.files===1?"":"s"} outside it, across ${n(s).dependents.modules} module${n(s).dependents.modules===1?"":"s"}, reference into it.`:""}${n(o).island?". Nothing in the index depends on it.":""}${n(o).generated?". Every file in it is tool-generated.":""}`),x(h,n(s).id),g=Ce(d,1,"count svelte-1ymw5ah",null,g,{island:n(o).island}),x(p,I)},[()=>sd(n(s),n(o).island)]),ke("click",c,()=>n(r).onSelect(n(o).id)),_(e,a),Ie()}mt(["click"]);var s4=Yt('',1);function i4(e,t){const r=S(()=>t.data),o=S(()=>{const l=(t.sourceY+t.targetY)/2;return`M${t.sourceX},${t.sourceY} C${t.sourceX},${l} ${t.targetX},${l} ${t.targetX},${t.targetY}`});var s=s4(),i=ye(s);{let l=S(()=>`medge${n(r).edge.back?" back":""}${n(r).hot?" hot":""}${n(r).dimmed?" dimmed":""}`),c=S(()=>`stroke-width:${n(r).edge.width}px`);qo(i,{get path(){return n(o)},get class(){return n(l)},get style(){return n(c)}})}var a=m(i);P(()=>se(a,"d",n(o))),ke("mousemove",a,l=>n(r).onHover(n(r).edge,l)),Ge("mouseleave",a,()=>n(r).onHover(null,null)),_(e,s)}mt(["mousemove"]);const a4=2;function l4(e){return`data:image/svg+xml;charset=utf-8,${encodeURIComponent(e)}`}function c4(e){const t=Number(/\bwidth="(\d+(?:\.\d+)?)"/.exec(e)?.[1]??0),r=Number(/\bheight="(\d+(?:\.\d+)?)"/.exec(e)?.[1]??0);return{width:Math.max(1,Math.round(t)),height:Math.max(1,Math.round(r))}}function u4(e){return new Promise((t,r)=>{const o=new Image;o.onload=()=>t(o),o.onerror=()=>r(new Error("The image could not be rendered.")),o.src=e})}async function d4(e){const{width:t,height:r}=c4(e),o=await u4(l4(e)),s=document.createElement("canvas");s.width=t,s.height=r;const i=s.getContext("2d");if(i===null)throw new Error("This browser would not give up a 2D canvas.");return i.drawImage(o,0,0,t,r),await new Promise((a,l)=>{s.toBlob(c=>c?a(c):l(new Error("The image could not be encoded.")),"image/png")})}function Op(e,t){const r=URL.createObjectURL(e),o=document.createElement("a");o.href=r,o.download=t,document.body.appendChild(o),o.click(),o.remove(),setTimeout(()=>URL.revokeObjectURL(r),1e4)}function f4(e,t){Op(new Blob([e],{type:"image/svg+xml;charset=utf-8"}),t)}async function v4(e,t){if(typeof navigator.clipboard?.write=="function"&&typeof ClipboardItem=="function")try{return await navigator.clipboard.write([new ClipboardItem({"image/png":e()})]),"copied"}catch{}return Op(await e(),t),"downloaded"}var h4=N('
');function Lp(e,t){Ne(t,!0);let r=Ee(t,"disabled",3,!1),o=ae(!1);async function s(){if(!n(o)){L(o,!0);try{const u=await v4(()=>d4(t.build(a4)),`${t.filename}.png`);no.show(u==="copied"?"Image copied · paste it into a comment":"Clipboard unavailable · image saved instead")}catch(u){no.show(u instanceof Error?u.message:"The image could not be made.")}finally{L(o,!1)}}}function i(){try{f4(t.build(1),`${t.filename}.svg`),no.show("SVG saved")}catch(u){no.show(u instanceof Error?u.message:"The file could not be saved.")}}var a=h4(),l=v(a),c=v(l),f=m(l,2);P(()=>{l.disabled=r()||n(o),x(c,n(o)?"Rendering…":"Copy image"),f.disabled=r()}),ke("click",l,s),ke("click",f,i),_(e,a),Ie()}mt(["click"]);const Yf=(e,t=Ln,r=Ln,o=Ln)=>{var s=m4(),i=ye(s),a=v(i),l=m(i,2);{var c=u=>{var h=St(),d=ye(h);xe(d,17,r,g=>g.source+g.target,(g,p)=>{var y=g4(),w=v(y),M=v(w),I=m(w,2),C=v(I);P(()=>{x(M,o()==="target"?n(p).target:n(p).source),x(C,n(p).count)}),_(g,y)}),_(u,h)},f=u=>{var h=p4();_(u,h)};V(l,u=>{r().length>0?u(c):u(f,-1)})}P(()=>x(a,t())),_(e,s)};var g4=N('
'),p4=N('
nothing
'),m4=N('
',1),Xf=N(""),pc=N('

'),_4=N(`

Too few links here carry an import or a declared type, so the layering uses raw reference - counts. A name shared by two unrelated modules can move a box.

`),y4=N('
'),mc=N('
'),w4=N('
Mutual dependencies
'),b4=N('
'),x4=N('
Dependency cycles
'),k4=N(' '),E4=N('
',1),S4=N('
Circular imports between files
'),M4=N('

'),T4=N(`

Nothing in the index depends on this module — no import, call or reference crosses into - it. It may be an entry point, or reached in a way the graph cannot see.

`),C4=N(" "),N4=N('
no files in the index for this module
'),I4=N('

files
'),A4=N(`

Hover a link to see what crosses it — the counts by kind and the symbol pairs behind the - weight. Click a module to isolate its links and list its files.

`),P4=N(``);function O4(e,t){Ne(t,!0);const r=[1,2,3,4];function o(Z){return Z===1?"top-level folders":`${Z} folders deep`}const s=S(()=>t.selected===null?null:t.layout.nodes.find(Z=>Z.id===t.selected)??null),i=S(()=>n(s)?.module??null),a=S(()=>new Set(n(i)?.generatedFiles??[])),l=S(()=>t.selected===null?[]:t.layout.edges.filter(Z=>Z.source===t.selected).map(Z=>Z.link).sort((Z,Q)=>Q.count-Z.count||Z.target.localeCompare(Q.target))),c=S(()=>t.selected===null?[]:t.layout.edges.filter(Z=>Z.target===t.selected).map(Z=>Z.link).sort((Z,Q)=>Q.count-Z.count||Z.source.localeCompare(Q.source))),f=S(()=>t.layout.edges.filter(Z=>Z.thin&&!Z.back).length);var u=P4(),h=m(v(u),4);Lp(h,{get build(){return t.buildSvg},get filename(){return t.exportName}});var d=m(h,2),g=m(v(d),2);xe(g,21,()=>t.payload.roots,Z=>Z.root,(Z,Q)=>{var F=Xf(),J=v(F),te={};P(()=>{x(J,`${n(Q).label??""} · ${n(Q).files??""} files`),te!==(te=n(Q).root)&&(F.value=(F.__value=n(Q).root)??"")}),_(Z,F)});var p;ci(g);var y=m(d,2),w=m(v(y),2),M=v(w),I=v(M);M.value=M.__value="auto";var C=m(M);xe(C,16,()=>r,Z=>Z,(Z,Q)=>{var F=Xf(),J=v(F),te={};P((ie,ge)=>{x(J,ie),te!==(te=ge)&&(F.value=(F.__value=ge)??"")},[()=>o(Q),()=>String(Q)]),_(Z,F)});var T;ci(w);var A=m(y,2),D=v(A),j=m(A,2),R=v(j);{var z=Z=>{var Q=pc(),F=v(Q);P(J=>x(F,`${J??""} carrying fewer than ${t.layout.minWeight??""} references - ${n(f)===1?"is":"are"} hidden until you select a module ${n(f)===1?"it":"they"} touch.`),[()=>st(n(f),"link")]),_(Z,Q)};V(R,Z=>{n(f)>0&&Z(z)})}var W=m(R,2);{var H=Z=>{var Q=pc(),F=v(Q);P(()=>x(F,`The layering uses the ${t.layout.basis.declaredLinks??""} of ${t.layout.basis.totalLinks??""} links with an - import, a qualified name, an inheritance clause or a typed receiver behind them. Bare - name matches still count toward line weight, but they do not decide what sits above what.`)),_(Z,Q)},B=Z=>{var Q=_4();_(Z,Q)};V(W,Z=>{t.layout.basis.kind==="declared"?Z(H):Z(B,-1)})}var k=m(W,2);{var b=Z=>{var Q=pc(),F=v(Q);P(J=>x(F,`${J??""} below confidence ${t.payload.excluded.confidenceBelow??""} - ${t.payload.excluded.uncertainEdges===1?"is":"are"} excluded from every count on this - screen — they are name-only guesses.`),[()=>st(t.payload.excluded.uncertainEdges,"cross-module reference")]),_(Z,Q)};V(k,Z=>{t.payload.excluded.uncertainEdges>0&&Z(b)})}var E=m(j,2);{var q=Z=>{var Q=w4(),F=v(Q),J=m(v(F)),te=v(J),ie=m(F,2);xe(ie,17,()=>t.layout.mutual.slice(0,8),re=>re.back.source+re.back.target,(re,ee)=>{var ue=y4(),ne=v(ue),fe=v(ne),he=m(ne),ce=m(he),we=v(ce);P(()=>{x(fe,n(ee).back.source),x(he,` ⇄ ${n(ee).back.target??""} `),x(we,`(${n(ee).back.count??""} back-references)`)}),_(re,ue)});var ge=m(ie,2);{var ve=re=>{var ee=mc(),ue=v(ee);P(()=>x(ue,`+${t.layout.mutual.length-8} more`)),_(re,ee)};V(ge,re=>{t.layout.mutual.length>8&&re(ve)})}P(re=>x(te,`· ${re??""} — the lighter direction, dashed when - selected`),[()=>st(t.layout.mutual.length,"pair")]),_(Z,Q)};V(E,Z=>{t.layout.mutual.length>0&&Z(q)})}var O=m(E,2);{var K=Z=>{var Q=x4(),F=v(Q),J=m(v(F)),te=v(J),ie=m(F,2);xe(ie,17,()=>t.layout.moduleCycles.slice(0,6),Kn,(ge,ve)=>{var re=b4(),ee=v(re);P(ue=>x(ee,`${ue??""} → ${n(ve)[0]??""}`),[()=>n(ve).join(" → ")]),_(ge,re)}),P(ge=>x(te,`· ${ge??""} of three or more modules`),[()=>st(t.layout.moduleCycles.length,"loop")]),_(Z,Q)};V(O,Z=>{t.layout.moduleCycles.length>0&&Z(K)})}var Y=m(O,2);{var G=Z=>{var Q=S4(),F=v(Q),J=m(v(F)),te=v(J),ie=m(F,2);xe(ie,17,()=>t.payload.cycles.items.slice(0,6),Kn,(re,ee)=>{var ue=E4(),ne=ye(ue),fe=v(ne),he=v(fe),ce=m(fe),we=m(ne,2);xe(we,16,()=>n(ee).files,Te=>Te,(Te,Pe)=>{var Le=k4(),Re=v(Le);P(Be=>{se(Le,"href",Be),x(Re,Pe)},[()=>nn(Pe)]),_(Te,Le)});var de=m(we,2);{var me=Te=>{var Pe=mc(),Le=v(Pe);P(()=>x(Le,`+${n(ee).size-n(ee).files.length} more files in this group`)),_(Te,Pe)};V(de,Te=>{n(ee).size>n(ee).files.length&&Te(me)})}P(Te=>{x(he,`${n(ee).size??""} files ·`),x(ce,` ${Te??""}`)},[()=>n(ee).modules.join(", ")]),_(re,ue)});var ge=m(ie,2);{var ve=re=>{var ee=mc(),ue=v(ee);P(()=>x(ue,`+${t.payload.cycles.total-t.payload.cycles.shown} more groups`)),_(re,ee)};V(ge,re=>{t.payload.cycles.truncated&&re(ve)})}P(re=>x(te,`· ${re??""}`),[()=>st(t.payload.cycles.total,"group")]),_(Z,Q)};V(Y,Z=>{t.payload.cycles.total>0&&Z(G)})}var U=m(Y,2);{var X=Z=>{var Q=I4(),F=v(Q),J=v(F),te=v(J),ie=m(J,2),ge=m(F,2),ve=v(ge),re=m(ve);{var ee=Re=>{var Be=wt();P(je=>x(Be,`· ${je??""}`),[()=>n(i).languages.map(je=>`${je.language} ${je.files}`).join(", ")]),_(Re,Be)};V(re,Re=>{n(i).languages.length>0&&Re(ee)})}var ue=m(re,2);{var ne=Re=>{var Be=wt();P(()=>x(Be,`· ${n(i).generated===n(i).files?"all tool-generated":`${n(i).generated} tool-generated`}`)),_(Re,Be)};V(ue,Re=>{n(i).generated>0&&Re(ne)})}var fe=m(ge,2);{var he=Re=>{var Be=M4(),je=v(Be),tt=v(je),Ze=m(je);P((at,Ye)=>{x(tt,at),x(Ze,` outside it, across - ${Ye??""}, reference straight into it — the - floor on what a change here has to be checked against, and the bar along the bottom of - the box.`)},[()=>st(n(i).dependents.files,"file"),()=>st(n(i).dependents.modules,"module")]),_(Re,Be)};V(fe,Re=>{(n(i).dependents?.files??0)>0&&Re(he)})}var ce=m(fe,2);{var we=Re=>{var Be=T4();_(Re,Be)};V(ce,Re=>{n(s)?.island&&Re(we)})}var de=m(ce,2);Yf(de,()=>"depends on",()=>n(l),()=>"target");var me=m(de,2);Yf(me,()=>"depended on by",()=>n(c),()=>"source");var Te=m(me,4);{var Pe=Re=>{var Be=St(),je=ye(Be);xe(je,16,()=>t.files,tt=>tt,(tt,Ze)=>{var at=C4();let Ye;var le=v(at);P((oe,_e,Me)=>{Ye=Ce(at,1,"filerow svelte-dzmqqy",null,Ye,oe),se(at,"href",_e),se(at,"title",Me),x(le,Ze)},[()=>({gen:n(a).has(Ze)}),()=>nn(Ze),()=>n(a).has(Ze)?`${Ze} — tool-generated`:Ze]),_(tt,at)}),_(Re,Be)},Le=Re=>{var Be=N4();_(Re,Be)};V(Te,Re=>{t.files.length>0?Re(Pe):Re(Le,-1)})}P((Re,Be)=>{x(te,n(i).id),x(ve,`${Re??""} in ${Be??""} `)},[()=>st(n(i).symbols,"symbol"),()=>st(n(i).files,"file")]),ke("click",ie,()=>t.onSelect(null)),_(Z,Q)},$=Z=>{var Q=A4();_(Z,Q)};V(U,Z=>{n(i)?Z(X):Z($,-1)})}P((Z,Q)=>{p!==(p=t.payload.root)&&(g.value=(g.__value=t.payload.root)??"",No(g,t.payload.root)),x(I,`automatic — ${Z??""}`),T!==(T=Q)&&(w.value=(w.__value=Q)??"",No(w,Q)),Bh(D,t.includeTests)},[()=>o(t.payload.depth),()=>t.chosenDepth===null?"auto":String(t.chosenDepth)]),ke("change",g,Z=>t.onSelectRoot(Z.currentTarget.value)),ke("change",w,Z=>{const Q=Z.currentTarget.value;t.onSelectDepth(Q==="auto"?null:Number(Q))}),ke("change",D,Z=>t.onToggleTests(Z.currentTarget.checked)),_(e,u),Ie()}mt(["change","click"]);var L4=N('
'),D4=N(`
src/api A module — one directory, with the symbols and files in it
src/db The bar along the bottom is how much leans on it — files elsewhere that reference - straight into it, against the most depended-on box here. The count is on the box
Points back up — the lighter half of a mutual dependency, or a link with no import or - declared type behind it. Drawn only while a module it touches is selected
top / bottom A module sits one layer above everything it depends on, so entry points end up at the top - and the foundations — which depend on nothing below — at the bottom
src/api Selected: click a module to bring out its links and list its files; everything more than one hop away fades
nothing depends on this No link in the index arrives here — a script, a workflow, an unreferenced corner
__tests__ More than half its files are tests; off unless you turn tests on
gen Every file in it is tool-generated — nobody wrote it and nobody edits it
`),R4=N('
');function z4(e,t){Ne(t,!0);var r=R4();let o;var s=v(r),i=m(v(s)),a=v(i),l=m(s,2);{var c=f=>{var u=D4(),h=m(v(u),4),d=m(v(h),2),g=v(d),p=m(h,14);{var y=w=>{var M=L4(),I=v(M),C=v(I),T=m(I,2),A=v(T);P(()=>{x(C,`${t.thinCount??""} hidden`),x(A,`Links carrying fewer than ${t.minWeight??""} references wait until you select a module they - touch, so a weak coincidence never draws as a dependency`)}),_(w,M)};V(p,w=>{t.thinCount>0&&w(y)})}P(()=>x(g,`Depends on — the box above calls, imports, extends or names a type from the box below. - Thicker is more references${t.declaredBasis?"":"; here the layering had too few imports to trust, so it used raw counts"}`)),_(f,u)};V(l,f=>{t.open&&f(c)})}P(()=>{o=Ce(r,1,"legend svelte-148kree",null,o,{open:t.open}),se(s,"aria-expanded",t.open),x(a,t.open?"▾":"▸")}),ke("click",s,()=>t.onToggle(!t.open)),_(e,r),Ie()}mt(["click"]);const H4=380,q4=86,j4=6.65,F4=18,ko=35,Ka=19,ad=12,B4=Ka+ad,Gf=24,Ji=32;function V4(e){const t=e.source?.lines?.length??0,r=t>0?t*Ka+ad:B4;return ko+r}const W4=240,oi=12,Zn=17.4,si=18,po=8,K4=32;function Gr(e){return Math.max(1,Math.ceil(e.length/K4))}const $i=(e,t,r)=>e===1?t:r;function ld(e){const t=e.sites.map(o=>{const s=[];return o.key===null&&s.push("the key is a runtime value"),o.moreSites>0&&s.push(`+${o.moreSites} more such ${$i(o.moreSites,"site","sites")} here`),{headline:`${o.label} at line ${o.line}`,key:o.key,notes:s,candidates:o.candidates,candidateHeading:o.candidates.length>0?`${o.candidates.length} candidate ${$i(o.candidates.length,"target","targets")} ›`:null,candidateNote:o.candidateNote}}),r=e.missed.map(o=>o.name);return{intro:e.sites.length>0?`${e.node.name} chooses its next call at runtime.`:`${e.node.name} is the last symbol on this path.`,sites:t,quiet:e.sites.length>0?null:"No dynamic-dispatch site was detected in its body, so nothing here explains the break.",uncertainHeading:e.uncertain.total>0?`${e.uncertain.total} name-only ${$i(e.uncertain.total,"match","matches")} not followed (confidence < 0.6)`:null,uncertain:e.uncertain.items,further:e.further.total>0?`It makes ${e.further.total} further resolved ${$i(e.further.total,"call","calls")} this path does not need.`:null,missed:r.length>0?`Never reaches ${r.join(", ")}${e.missed.length`cap:${e}`,Dp=e=>e.startsWith("cap:"),Zf=e=>Dp(e)?e.slice(4):e,Uf=26;function U4(e){return e.replace(/[\w.@$/\\-]+[/\\]([\w.$-]+:\d+)/g,"$1")}function Q4(e){return U4(e.label).split(" · ").map(t=>t.trim()).filter(Boolean).map(t=>t.length>Uf?`${t.slice(0,Uf-1)}…`:t)}function J4(e){return typeof e.line=="number"&&e.line>0?`line ${e.line}`:null}function $4(e,t){const r=e.find(k=>k.id===t)??e[0]??null,o=new Map;r?.hops.forEach((k,b)=>o.set(k.node.id,b));const s=new Map,i=new Map,a=new Map,l=new Map;let c=0;for(const k of e)for(let b=0;b(u.get(k)??0)===0),d=new Set;for(;h.length>0;){const k=h.shift();d.add(k);for(const b of a.get(k)??[]){f.set(b,Math.max(f.get(b)??0,(f.get(k)??0)+1));const E=(u.get(b)??0)-1;u.set(b,E),E===0&&h.push(b)}}for(const k of s.keys()){if(d.has(k))continue;let b=0;for(const[E,q]of a)q.has(k)&&(b=Math.max(b,(f.get(E)??0)+1));f.set(k,b)}const g=new Map;for(const k of e){const b=k.boundary;if(!b||!s.has(b.node.id))continue;const E=g.get(b.node.id);E?E.flows.includes(k.id)||E.flows.push(k.id):g.set(b.node.id,{boundary:b,flows:[k.id]})}const p=new Map;for(const[k,b]of s)p.set(k,{id:k,width:H4,height:V4(b.hop),rank:b.order,onActive:o.has(k)});const y=new Map;let w=s.size;for(const[k,b]of g){const E=Z4(k);y.set(E,(f.get(k)??0)+1),p.set(E,{id:E,width:W4,height:Y4(b.boundary),rank:w++,onActive:o.has(k)})}const M=k=>y.get(k)??f.get(k)??0,I=new Map;for(const k of p.keys()){const b=M(k),E=I.get(b);E?E.push(k):I.set(b,[k])}for(const k of I.values())k.sort((b,E)=>{const q=p.get(b).onActive?0:1,O=p.get(E).onActive?0:1;return q!==O?q-O:p.get(b).rank-p.get(E).rank});const C=Math.max(...I.keys())+1,T=[...i.entries()].map(([k,b])=>({key:k,link:b,lines:Q4(b.edge),lineLabel:J4(b.edge)})),A=Array.from({length:Math.max(0,C-1)},()=>q4);for(const{link:k,lines:b,lineLabel:E}of T){const q=f.get(k.source)??0;if(q<0||q>=A.length)continue;const O=Math.max(0,...b.map(K=>K.length),E?.length??0);A[q]=Math.max(A[q],Math.ceil(O*j4)+F4)}const D=Array.from({length:C},()=>0);for(const[k,b]of I)D[k]=Math.max(...b.map(E=>p.get(E).width));const j=[Ji];for(let k=1;kE+p.get(q).height,0)+Gf*(b.length-1));const z=Math.max(...R.values()),W=new Map,H=[];for(const[k,b]of I){let E=Ji+(z-(R.get(k)??0))/2;for(const q of b){const O=p.get(q),K=g.get(Zf(q));if(K&&Dp(q))H.push({id:q,anchorId:Zf(q),boundary:K.boundary,x:j[k],y:E,width:O.width,height:O.height,column:k,flows:K.flows});else{const Y=s.get(q);W.set(q,{id:q,hop:Y.hop,x:j[k],y:E,width:O.width,height:O.height,column:k,flows:Y.flows,step:o.get(q)??-1,stopLine:g.get(q)?.boundary.sites[0]?.line??null})}E+=O.height+Gf}}const B=T.map(({link:k,lines:b,lineLabel:E})=>({id:`${k.source}->${k.target}`,source:k.source,target:k.target,edge:k.edge,flows:k.flows,label:k.edge.label,labelLines:b,lineLabel:E,dash:X4(k.edge),cap:!1}));for(const k of H)B.push({id:`${k.anchorId}->${k.id}`,source:k.anchorId,target:k.id,edge:null,flows:k.flows,label:"end of static path",labelLines:["end of","static path"],lineLabel:null,dash:G4,cap:!0});return{cards:[...W.values()].sort((k,b)=>k.column-b.column||k.y-b.y),endCaps:H.sort((k,b)=>k.column-b.column||k.y-b.y),links:B,width:j[C-1]+D[C-1]+Ji,height:Ji*2+z,columns:C,gaps:A}}const ot={paper:"#f7f6f2",press:"#e8e6dd",ink:"#16150f",ink2:"#56544a",ink3:"#87847a",ink4:"#b4b1a5",ruleSoft:"#d6d3c8",ruleFaint:"#e6e3d9",accent:"#7a2230",accentSoft:"#f0e3e5",accentLine:"#d9b3b9",codeComment:"#6a675d"},$n="'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace",cd="'Archivo Variable', 'Archivo', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif",Zr=24,eT=14,Hs=11,Qf="CodeGraph",yl=.6,ud=.53,pa=(e,t)=>e*t*yl;function Fn(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}function tT(e){const t=[`x="${Qe(e.x)}"`,`y="${Qe(e.y)}"`,`font-family="${e.family??cd}"`,`font-size="${e.size}"`,`fill="${e.fill}"`];return e.weight&&e.weight!==400&&t.push(`font-weight="${e.weight}"`),e.anchor&&e.anchor!=="start"&&t.push(`text-anchor="${e.anchor}"`),e.preserve&&t.push('xml:space="preserve"'),``}function Tn(e,t){return`${tT(e)}${t}`}function Qe(e){return Math.round(e*10)/10}function so(e,t,r,o,s={}){const i=[`x="${Qe(e)}"`,`y="${Qe(t)}"`,`width="${Qe(r)}"`,`height="${Qe(o)}"`,`fill="${s.fill??"none"}"`];return s.fillOpacity!==void 0&&i.push(`fill-opacity="${s.fillOpacity}"`),s.stroke&&(i.push(`stroke="${s.stroke}"`,`stroke-width="${s.strokeWidth??1}"`),s.dash&&i.push(`stroke-dasharray="${s.dash}"`)),``}function gs(e,t,r,o=yl){const s=r*o,i=Math.floor(t/s);return i>=e.length?e:i<=1?e.slice(0,Math.max(0,i)):`${e.slice(0,i-1)}…`}function nT(e,t){const r=e.split(/\s+/).filter(Boolean);if(r.length===0)return[""];const o=[];let s="";for(const i of r)s.length===0?s=i:s.length+1+i.length<=t?s=`${s} ${i}`:(o.push(s),s=i);return o.push(s),o}function Rp(e,t,r,o){const s=o.scale??1,i=eT+Hs,a=Math.max(1,Math.round(e.width+Zr*2)),l=Math.max(1,Math.round(e.height+Zr*2+i)),c=l-Zr,f=o.caption==null||o.caption===""?"":Tn({x:Zr,y:c,size:Hs,fill:ot.ink3,family:$n},Fn(gs(o.caption,a-Zr*2-pa(Qf.length+3,Hs),Hs)));return[``,t===""?"":`${t}`,so(0,0,a,l,{fill:ot.paper}),``,r,"",f,Tn({x:a-Zr,y:c,size:Hs,fill:ot.ink3,family:$n,anchor:"end"},Qf),""].filter(Boolean).join(` -`)}const qs=12,js=16,rT=9,Jf=21.5,$f=13,ev=11,_c=40,oT=6,Vo=12,Fs=13.5,sT=11,tv=11;function nv(e){return{right:[e.x+e.width,e.y+e.height/2],left:[e.x,e.y+e.height/2]}}function iT(e,t,r){const o=e.hop,s=o.source,i=[],a=`c${e.column}-${Math.round(e.y)}`;i.push(so(e.x,e.y,e.width,e.height,{fill:ot.paper,stroke:r?ot.accent:ot.ruleSoft}));const l=Uh(o.node.kind),c=e.x+qs,f=e.y+rT;if(i.push(so(c,f,js,js,{fill:Zh.has(o.node.kind)?ot.press:"none",stroke:ot.ink3,dash:o.node.kind==="file"?"2 2":void 0})),l!==""){const D=l.length>1?8.5:9.5;i.push(Tn({x:c+js/2,y:f+js/2+D*.36,size:D,fill:ot.ink2,family:$n,weight:500,anchor:"middle"},Fn(l)))}const u=`${gn(o.node.file)}:${o.node.line}`,h=pa(u.length,ev),d=c+js+8,g=e.x+e.width-qs-h-8-d;i.push(Tn({x:d,y:e.y+Jf,size:$f,fill:ot.ink,family:$n,weight:600},Fn(gs(o.node.name,g,$f))),Tn({x:e.x+e.width-qs,y:e.y+Jf,size:ev,fill:ot.ink3,family:$n,anchor:"end"},Fn(u)),``);const p=s?.lines??[];if(p.length===0){const D=s?.drift?"Changed on disk after the last index sync — source is not shown.":s?.reason??"Source outside this slice or this index.";return i.push(Tn({x:e.x+qs,y:e.y+ko+6+Fs,size:Vo,fill:ot.ink3},Fn(gs(D,e.width-qs*2,Vo,ud)))),`${i.join("")}`}const y=new Map,w=o.callRef;w&&y.set(w.line,[{ident:w.name,col:w.col,targetId:w.targetId,uncertain:!1,outside:!1,title:""}]);const M=sl(p,s?.from??1,s?.highlight),I=e.x+_c,C=e.width-_c-oT,T=Math.floor(C/(Vo*yl)),A=[];return p.forEach((D,j)=>{const R=(s?.from??1)+j,z=e.y+ko+ad/2+j*Ka,W=M.get(R)??[{cls:"other",text:D,col:0}],H=ol(W,y.get(R)??[]);(R===w?.line||R===e.stopLine)&&A.push(so(e.x,z,e.width,Ka,{fill:ot.accentSoft})),A.push(Tn({x:e.x+_c-10,y:z+Fs,size:sT,fill:ot.ink4,family:$n,anchor:"end"},String(R)));const B=[];let k=0,b=null;if(W.forEach((E,q)=>{if(k>=T)return;const O=T-k,Y=E.text.length>O?`${E.text.slice(0,Math.max(0,O-1))}…`:E.text,G=H.get(q)??null;G&&(b={from:k,length:Y.length}),B.push(aT(Y,E,G!==null)),k+=E.text.length}),A.push(Tn({x:I,y:z+Fs,size:Vo,fill:ot.ink,family:$n,preserve:!0},B.join(""))),b!==null){const E=b,q=I+pa(E.from,Vo);A.push(``)}}),i.push(`${A.join("")}`),`${i.join("")}`}function aT(e,t,r){if(e==="")return"";const o=Fn(e);if(r)return`${o}`;switch(t.cls){case"comment":return`${o}`;case"string":case"number":return`${o}`;case"keyword":return`${o}`;default:return`${o}`}}const lT=32,yc=26;function zp(e){const t=ld(e.boundary),r=[],o=(i,a,l=!1,c=lT)=>{nT(i,c).forEach((f,u)=>r.push({text:f,kind:a,gapBefore:l&&u===0}))};o("Where the graph stops.","lead"),o(t.intro,"body");for(const i of t.sites){o(i.headline,"form",!0),i.key!==null&&o(`key ${i.key}`,"mono",!1,yc);for(const a of i.notes)o(a,"soft");if(i.candidateHeading!==null){o(i.candidateHeading,"soft");for(const a of i.candidates)o(`${a.display} ${gn(a.node.file)}:${a.node.line}`,"mono",!1,yc)}else i.candidateNote!==null&&o(i.candidateNote,"soft")}if(t.quiet!==null&&o(t.quiet,"soft",!0),t.uncertainHeading!==null){o(t.uncertainHeading,"soft",!0);for(const i of t.uncertain)o(`${i.node.name} ${i.confidence===null?"":i.confidence.toFixed(2)}`,"mono",!1,yc)}t.further!==null&&o(t.further,"body",!0),t.missed!==null&&o(t.missed,"body",!0);let s=oi*2;for(const i of r)i.gapBefore&&(s+=po),s+=i.kind==="mono"?si:Zn;return{rows:r,height:Math.round(s)}}function cT(e,t){const{rows:r,height:o}=zp(e),s=[so(e.x,e.y,e.width,Math.max(e.height,o),{fill:ot.paper,stroke:ot.ruleSoft,dash:"3 3"})];let i=e.y+oi;const a=e.x+oi,l=e.width-oi*2;for(const c of r){c.gapBefore&&(i+=po);const f=c.kind==="mono",u=f?si:Zn,h=c.kind==="form"||c.kind==="lead"?ot.ink:c.kind==="soft"?ot.ink3:ot.ink2;s.push(Tn({x:a,y:i+u*.75,size:f?11.5:12,fill:h,family:f?$n:cd,weight:c.kind==="lead"?600:400},Fn(gs(c.text,l,f?11.5:12,f?yl:ud)))),i+=u}return`${s.join("")}`}function uT(e,t,r,o){const[s,i]=nv(t).right,[a,l]=nv(r).left,f=[``];e.cap||f.push(``);const u=(s+a)/2,h=(i+l)/2;return e.labelLines.forEach((d,g)=>{f.push(Tn({x:u,y:h-8-(e.labelLines.length-1-g)*13,size:tv,fill:ot.ink3,family:$n,anchor:"middle"},Fn(d)))}),e.lineLabel&&f.push(Tn({x:u,y:h+17,size:tv,fill:ot.ink3,family:$n,anchor:"middle"},Fn(e.lineLabel))),`${f.join("")}`}function dT(e,t={}){const r=t.showAll??!1,o=t.activeFlowId??null,s=p=>o===null||p.includes(o),i=new Map;for(const p of e.cards)i.set(p.id,p);const a=new Map;for(const p of e.endCaps){const y=Math.max(p.height,zp(p).height);a.set(p.id,y),i.set(p.id,{x:p.x,y:p.y,width:p.width,height:y})}const l=[],c=[];for(const p of e.links){const y=i.get(p.source),w=i.get(p.target);!y||!w||l.push(uT(p,y,w,r&&!s(p.flows)))}for(const p of e.endCaps)l.push(cT(p,r&&!s(p.flows)));for(const p of e.cards)c.push(`${so(p.x,p.y+ko,p.width,p.height-ko)}`),l.push(iT(p,r&&p.step<0,r&&p.step>=0));let f=1/0,u=1/0,h=-1/0,d=-1/0;const g=(p,y,w=0,M=0)=>{f=Math.min(f,p),u=Math.min(u,y),h=Math.max(h,p+w),d=Math.max(d,y+M)};for(const p of i.values())g(p.x,p.y,p.width,p.height);for(const p of e.links){const y=i.get(p.source),w=i.get(p.target);if(!y||!w)continue;const M=(y.y+y.height/2+w.y+w.height/2)/2;g((y.x+y.width+w.x)/2,M-8-p.labelLines.length*13),p.lineLabel&&g((y.x+y.width+w.x)/2,M+21)}return Number.isFinite(f)||(f=0,u=0,h=1,d=1),Rp({minX:f,minY:u,width:h-f,height:d-u},c.join(""),l.join(` -`),t)}const rv=13,ov=11,wc=9,sv=12,iv=12;function fT(e,t,r){const o=e.module,s=t?2:1,i=[so(e.x,e.y,e.width,e.height,{fill:t?ot.press:ot.paper,stroke:r?ot.ink4:o.test?ot.ink3:ot.ink,strokeWidth:s,dash:o.test?"4 3":void 0})],a=e.width-wc*2;return i.push(Tn({x:e.x+wc,y:e.y+17,size:rv,fill:r?ot.ink4:ot.ink,family:$n,weight:500},Fn(gs(o.id,a,rv))),Tn({x:e.x+wc,y:e.y+31.5,size:ov,fill:r?ot.ink4:ot.ink3},Fn(gs(sd(o,e.island),a,ov,ud)))),e.weight>0&&i.push(so(e.x,e.y+e.height-4,e.width*e.weight,4,{fill:ot.ink,fillOpacity:r?.1:.3})),i.join("")}function av(e,t,r){const o=t.indexOf(r),s=t.length;return o<0||s===0?e.x+e.width/2:e.x+e.width*(o+1)/(s+1)}function vT(e,t,r,o){const s=av(t,t.sourceHandles,e.id),i=t.y+t.height,a=av(r,r.targetHandles,e.id),l=r.y,c=(i+l)/2,f=`M${Qe(s)},${Qe(i)} C${Qe(s)},${Qe(c)} ${Qe(a)},${Qe(c)} ${Qe(a)},${Qe(l)}`;return e.back?``:``}function hT(e,t={}){const r=t.selected??null,o=new Map(e.nodes.map(d=>[d.id,d])),s=r===null?null:new Set([r,...e.edges.flatMap(d=>d.source===r?[d.target]:d.target===r?[d.source]:[])]);let i=1/0,a=1/0,l=-1/0,c=-1/0;for(const d of e.nodes)i=Math.min(i,d.x),a=Math.min(a,d.y),l=Math.max(l,d.x+d.width),c=Math.max(c,d.y+d.height);Number.isFinite(i)||(i=0,a=0,l=1,c=1);const f=i-iv,u=l+iv,h=[];for(const d of e.layers)if(h.push(``),d.label!==null){const g=d.index===0?d.y+40:d.y-36;h.push(Tn({x:f,y:g,size:sv,fill:ot.ink3},Fn(d.label))),a=Math.min(a,g-sv),c=Math.max(c,g+4)}for(const d of e.edges){if(!id(d,r))continue;const g=o.get(d.source),p=o.get(d.target);!g||!p||h.push(vT(d,g,p,r!==null&&!d.back))}for(const d of e.nodes)h.push(fT(d,r===d.id,s!==null&&!s.has(d.id)));return Rp({minX:f,minY:a,width:u-f,height:c-a},"",h.join(` -`),t)}function Hp(e,t){const r=t.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,60).replace(/-+$/g,"");return`codegraph-${e}${r?`-${r}`:""}`}var gT=N('

The map could not be built

'),pT=N('

Aggregating the graph by module…

'),mT=N('

Nothing to draw here

'),_T=N('
'),yT=N('
',1),wT=N(" ",1),bT=N('
'),xT=N('
'),kT=N('
'),ET=N(" ",1),ST=N('
');function MT(e,t){Ne(t,!0);let r=ae(null),o=ae(null),s=ae(!0),i=ae(null),a=ae(null),l=ae(null);const c={fitViewOptions:{padding:.12,maxZoom:1,minZoom:.45}},f="codegraph-ui:map-legend";let u=ae(un(h()));function h(){try{return localStorage.getItem(f)!=="closed"}catch{return!0}}et(()=>{try{localStorage.setItem(f,n(u)?"open":"closed")}catch{}});const d={module:o4},g={module:i4};et(()=>{const O=t.root,K=t.depth;Rn.indexTick;const Y=new AbortController;return L(s,!0),L(o,null),h1({root:O,depth:K??void 0},Y.signal).then(G=>{L(r,G,!0),L(s,!1)}).catch(G=>{Y.signal.aborted||(L(o,G instanceof Error?G.message:String(G),!0),L(s,!1))}),()=>Y.abort()});const p=S(()=>n(r)===null?null:_l(n(r),{includeTests:t.tests})),y=S(()=>{if(n(p)===null||n(i)===null)return null;const O=new Set([n(i)]);for(const K of n(p).edges)K.source===n(i)&&O.add(K.target),K.target===n(i)&&O.add(K.source);return O}),w=S(()=>n(p)===null?[]:n(p).nodes.map(O=>({id:O.id,type:"module",position:{x:O.x,y:O.y},draggable:!1,selectable:!1,connectable:!1,data:{layout:O,selected:n(i)===O.id,dimmed:n(y)!==null&&!n(y).has(O.id),onSelect:K=>{L(i,n(i)===K?null:K,!0),L(a,null)}}}))),M=S(()=>n(p)===null?[]:n(p).edges.filter(O=>id(O,n(i))).map(O=>({id:O.id,source:O.source,target:O.target,sourceHandle:O.sourceHandle,targetHandle:O.targetHandle,type:"module",selectable:!1,deletable:!1,data:{edge:O,hot:n(a)?.edge.id===O.id||n(i)!==null&&!O.back,dimmed:!1,onHover:C}}))),I=S(()=>n(i)===null||n(r)===null?[]:n(r).modules.find(O=>O.id===n(i))?.fileList.items??[]);function C(O,K){if(O===null||K===null||n(l)===null){L(a,null);return}const Y=n(l).getBoundingClientRect();L(a,{edge:O,x:Math.min(K.clientX-Y.left+14,Y.width-330),y:K.clientY-Y.top+14},!0)}function T(O){L(i,null),Et(ei({root:O,tests:t.tests}))}function A(O){L(i,null),Et(ei({root:t.root,depth:O,tests:t.tests}))}function D(O){if(n(p)===null)throw new Error("There is no map to export yet.");const K=n(r)?.root??"";return hT(n(p),{scale:O,selected:n(i),caption:`${K||"the project"} · ${n(p).nodes.length} modules${n(i)?` · ${n(i)} selected`:""}`})}function j(O){L(i,null),Et(ei({root:t.root,depth:t.depth,tests:O}))}var R=ST(),z=v(R),W=v(z);{var H=O=>{var K=gT(),Y=m(v(K),2),G=v(Y);P(()=>x(G,n(o))),_(O,K)},B=O=>{var K=pT();_(O,K)},k=O=>{var K=mT(),Y=m(v(K),2),G=v(Y);P(()=>x(G,`No indexed files sit under this root${t.tests?"":", or every module under it is test code"}. Pick another root on the right.`)),_(O,K)},b=O=>{var K=ET(),Y=ye(K);gl(Y,Jr({get nodes(){return n(w)},get edges(){return n(M)},get nodeTypes(){return d},get edgeTypes(){return g},fitView:!0},()=>c,{minZoom:.2,maxZoom:1.6,nodesDraggable:!1,nodesConnectable:!1,elementsSelectable:!1,panOnDrag:!0,proOptions:{hideAttribution:!0},onpaneclick:()=>{L(i,null),L(a,null)},children:($,Z)=>{var Q=wT(),F=ye(Q);NM(F,{target:"back",children:(te,ie)=>{var ge=St(),ve=ye(ge);xe(ve,17,()=>n(p).layers,re=>re.index,(re,ee)=>{var ue=yT(),ne=ye(ue),fe=m(ne,2);{var he=ce=>{var we=_T(),de=v(we);P(()=>{nt(we,`transform:translate(8px,${n(ee).index===0?n(ee).y+40:n(ee).y-36}px)`),x(de,n(ee).label)}),_(ce,we)};V(fe,ce=>{n(ee).label!==null&&ce(he)})}P(()=>nt(ne,`transform:translate(0px,${n(ee).y}px);width:${n(p).width}px`)),_(re,ue)}),_(te,ge)},$$slots:{default:!0}});var J=m(F,2);pl(J,{position:"bottom-right",showLock:!1}),_($,Q)},$$slots:{default:!0}}));var G=m(Y,2);{let $=S(()=>n(p).edges.filter(Q=>Q.thin&&!Q.back).length),Z=S(()=>n(p).basis.kind==="declared");z4(G,{get minWeight(){return n(p).minWeight},get thinCount(){return n($)},get declaredBasis(){return n(Z)},get open(){return n(u)},onToggle:Q=>L(u,Q,!0)})}var U=m(G,2);{var X=$=>{var Z=kT(),Q=v(Z),F=v(Q),J=v(F),te=m(F),ie=m(Q,2),ge=v(ie),ve=v(ge),re=m(ge,2),ee=v(re),ue=m(ie,2);{var ne=he=>{var ce=bT(),we=v(ce),de=v(we);P(()=>x(de,`${n(a).edge.link.declared??""} through an import or a declared type`)),_(he,ce)};V(ue,he=>{n(a).edge.link.declared!==n(a).edge.link.count&&he(ne)})}var fe=m(ue,2);xe(fe,17,()=>n(a).edge.link.topPairs,he=>he.from+he.to,(he,ce)=>{var we=xT(),de=v(we),me=v(de),Te=m(de),Pe=v(Te);P(()=>{x(me,`${n(ce).from??""} → ${n(ce).to??""}`),x(Pe,n(ce).count)}),_(he,we)}),P(he=>{nt(Z,`left:${n(a).x}px;top:${n(a).y}px`),x(J,n(a).edge.source),x(te,` → ${n(a).edge.target??""}`),x(ve,`${n(a).edge.link.count??""} edges`),x(ee,he)},[()=>n(a).edge.link.byKind.map(he=>`${he.kind} ${he.count}`).join(" · ")]),_($,Z)};V(U,$=>{n(a)!==null&&$(X)})}_(O,K)};V(W,O=>{n(o)!==null?O(H):n(s)&&n(r)===null?O(B,1):n(p)!==null&&n(p).nodes.length===0?O(k,2):n(p)!==null&&O(b,3)})}Wt(z,O=>L(l,O),()=>n(l));var E=m(z,2);{var q=O=>{{let K=S(()=>Hp("map",n(r).root??""));O4(O,{get payload(){return n(r)},get layout(){return n(p)},get selected(){return n(i)},get includeTests(){return t.tests},get files(){return n(I)},buildSvg:D,get exportName(){return n(K)},onToggleTests:j,onSelectRoot:T,get chosenDepth(){return t.depth},onSelectDepth:A,onSelect:Y=>L(i,Y,!0)})}};V(E,O=>{n(r)!==null&&n(p)!==null&&O(q)})}_(e,R),Ie()}var TT=N(''),CT=N(' ',1);function NT(e,t){Ne(t,!0);const r=S(()=>t.data),o=S(()=>n(r).layout),s=S(()=>n(r).info);function i(M,I){return`left:${(M+1)/(I+1)*100}%`}var a=CT(),l=ye(a);xe(l,19,()=>n(o).ports.top,M=>`${M.type}:${M.id}`,(M,I,C)=>{{let T=S(()=>`${n(I).type==="source"?"s":"t"}:${n(I).id}`),A=S(()=>i(n(C),n(o).ports.top.length));kn(M,{get type(){return n(I).type},get id(){return n(T)},get position(){return Ve.Top},get style(){return n(A)},isConnectable:!1})}});var c=m(l,2);let f;var u=v(c),h=v(u);{var d=M=>{var I=TT();_(M,I)};V(h,M=>{n(s).entry&&M(d)})}var g=m(h,1,!0),p=m(u,2),y=v(p),w=m(c,2);xe(w,19,()=>n(o).ports.bottom,M=>`${M.type}:${M.id}`,(M,I,C)=>{{let T=S(()=>`${n(I).type==="source"?"s":"t"}:${n(I).id}`),A=S(()=>i(n(C),n(o).ports.bottom.length));kn(M,{get type(){return n(I).type},get id(){return n(T)},get position(){return Ve.Bottom},get style(){return n(A)},isConnectable:!1})}}),P(()=>{f=Ce(c,1,"snode svelte-390foq",null,f,{sel:n(r).selected,dimmed:n(r).dimmed,origin:n(s).origin,entry:n(s).entry,unreached:n(s).unreached}),nt(c,`width:${n(o).width}px;height:${n(o).height}px`),se(c,"aria-pressed",n(r).selected),se(c,"title",(n(s).origin?`${n(s).label} — navigates, but no screen reaches it within the walk. In ${n(s).sub}.`:`${n(s).label} — rendered by ${n(s).sub}${n(s).entry?". The entry screen.":""}${n(s).unreached?". No transition in the graph reaches it from the entry.":""}`)+(n(r).onOpen?" Double-click for what happens here.":"")),x(g,n(s).label),x(y,n(s).sub)}),ke("click",c,()=>n(r).onSelect(n(s).id)),Ge("dblclick",c,M=>{M.stopPropagation(),n(r).onOpen?.(n(s).id)},!0),_(e,a),Ie()}mt(["click"]);function Ya(e,t){const r=[];let o=0,s=null,i=0;for(let a=0;aa.length>0)}function qp(e){return Ya(e," || ").length>1?[e.trim()]:Ya(e," && ")}const ps=e=>({kw:!0,text:e}),ii=e=>({kw:!1,text:e});function wl(e){const t=e.trim();return t.startsWith("!(")&&AT(t,1)?[ps("NOT"),ii(t.slice(1))]:/^![A-Za-z_$][\w$.?]*$/.test(t)?[ps("NOT"),ii(t.slice(1))]:[ii(t)]}function IT(e){return Di(wl(e))}function Xa(e,t){const r=[];return e.forEach((o,s)=>{s>0&&r.push(ps(t)),r.push(...o)}),r}function Di(e){return e.map(t=>t.text).join(" ")}function AT(e,t){let r=0,o=null;for(let s=t;se.indexOf(t)===r)}function bl(e){return e?Xa(Ya(e," || ").map(t=>Xa(jp(Ya(t," && ")).map(wl),"AND")),"OR"):[]}function dd(e){const t=bl(e);return t.length===0?[ii("always")]:[ps("WHEN"),...t]}function xl(e){return Di(bl(e))}function Ga(e){return e.length===0?[]:[ps("WHEN"),...Xa(e.map(wl),"AND")]}function Za(e){const t=e.map(o=>({site:o,all:o.when?jp(qp(o.when)):[]}));if(t.length===0)return{common:[],rows:[]};let r=t[0].all.slice();for(const{all:o}of t.slice(1)){let s=0;for(;s({site:o,rest:s.slice(r.length)}))}}function Ua(e,t){return e.length===0?[ii("always")]:[ps(t?"AND":"WHEN"),...Xa(e.map(wl),"AND")]}const wr=116,Fp=.66,PT=.26,Bp=24,OT=6.3,LT=12,ms=17,Vp=13,Wp=ms+4,DT=4,RT=2,Do=40;function zT(e,t,r){return o=>{const s=new Set(o),i=new Map(o.map(w=>[w,[]])),a=new Map(o.map(w=>[w,0]));for(const w of r)!s.has(w.source)||!s.has(w.target)||w.source===w.target||(i.get(w.source).push(w.target),a.set(w.target,(a.get(w.target)??0)+1));for(const w of i.values())w.sort();const l=new Map,c=w=>{const M=new Map,I=(T,A)=>{if(l.has(T))return;l.set(T,A);const D=M.get(A);D?D.push(T):M.set(A,[T])};let C=0;for(const[T,A]of w)I(T,A),C=Math.max(C,A);for(let T=0;T<=o.length+C;T++){const A=M.get(T);if(A)for(const D of A)for(const j of i.get(D)??[])I(j,T+1)}};e!==null&&s.has(e)&&c([[e,0]]);const f=[];for(const w of[...t].filter(M=>s.has(M)).sort()){const M=(i.get(w)??[]).map(I=>l.get(I)).filter(I=>I!==void 0);f.push([w,M.length>0?Math.max(0,Math.min(...M)-1):0])}c(f);const u=Math.max(0,...l.values()),h=o.filter(w=>!l.has(w)),d=new Map;if(h.length>0){const w=new Set(h),M=h.filter(T=>(a.get(T)??0)===0);let I=M.length>0?M:[h[0]];for(const T of I)d.set(T,0);let C=0;for(;I.length>0;){C++;const T=[];for(const A of I)for(const D of i.get(A)??[])d.has(D)||!w.has(D)||(d.set(D,C),T.push(D));I=T}for(const T of h)d.has(T)||d.set(T,0)}const g=Math.max(0,...d.values()),p=h.length>0?g+2:0,y=new Map;for(const[w,M]of l)y.set(w,p+u-M);for(const[w,M]of d)y.set(w,g-M);return y}}function Kp(e){const t=e.flatMap(o=>o.sites&&o.sites.length>1?o.sites.map(s=>s.when):[o.when]);if(t.length===1){const o=t[0];if(!o)return"";const s=qp(o),i=IT(s[s.length-1]??o),a=s.length>1?`…${i}`:i;return a.length>Do?`${a.slice(0,Do-1)}…`:a}const r=t.filter(o=>o).length;return r>0?`${t.length} ways · ${r} conditional`:`${t.length} ways`}function HT(e){const t=new Map,r=[];for(const d of e.screens){const g={id:d.id,label:d.path,sub:d.component?.name??d.file,screen:d,origin:!1,entry:e.entry===d.id,unreached:!1};t.set(d.id,g),r.push(lv(g,d.incoming+d.outgoing))}for(const d of e.origins){const g={id:d.id,label:d.node.kind==="component"?`<${d.node.name}>`:`${d.node.name}()`,sub:d.sharedBy?`on ${d.sharedBy} screens`:d.node.file,screen:null,origin:!0,entry:!1,unreached:!1};t.set(d.id,g),r.push(lv(g,d.outgoing))}const o=new Map;for(const d of e.links){const g=zr({source:d.from,target:d.to}),p=o.get(g)??[];p.push(d),o.set(g,p)}const s=[],i=new Map;for(const[d,g]of o){const p=g[0];!t.has(p.from)||!t.has(p.to)||p.from!==p.to&&(s.push({source:p.from,target:p.to,count:g.length,declared:g.length,byKind:[{kind:"navigates",count:g.length}],topPairs:[]}),i.set(d,{id:d,from:p.from,to:p.to,links:g,label:Kp(g),synthesized:g.every(y=>y.synthesized)}))}const a=e.origins.map(d=>d.id),l=new Set;{const d=new Map;for(const p of e.links)d.set(p.from,[...d.get(p.from)??[],p.to]);const g=[e.entry,...a].filter(p=>p!==null);for(;g.length>0;){const p=g.pop();if(!l.has(p)){l.add(p);for(const y of d.get(p)??[])g.push(y)}}}let c=0;for(const d of t.values())!d.origin&&!l.has(d.id)&&(d.unreached=!0,c++);const f=_l({modules:r,links:s},{includeTests:!0,minWeight:0,sizing:d=>{const g=t.get(d.id);return{label:g?.label??d.id,meta:g?.sub??""}},layering:zT(e.entry,a,s),layerGap:wr,portPitch:ml,ports:"directional"}),u=fd(f,wr),h=new Map;for(const[d,g]of u)h.set(d,vd(g,Bp));return{layout:f,nodes:t,edges:i,unreached:c,layerGap:wr,curves:u,polylines:h}}function lv(e,t){return{id:e.id,label:e.label,files:1,symbols:t,languages:[],test:!1,generated:0,generatedFiles:[],facade:!1,fileList:{total:1,shown:1,truncated:!1,items:[e.screen?.file??e.sub]},dependents:{files:0,modules:0}}}function qT(e,t){const r=e.links.filter(s=>s.to===t),o=e.links.filter(s=>s.from===t);return{opensFrom:r,goesTo:o}}function bc(e){return e.via.map(t=>t.name).join(" → ")}function cv(e){return e.from===e.to?null:zr({source:e.from,target:e.to})}function uv(e,t,r,o,s,i=wr,a){if(e==="level"){const c=a??Math.round(i*Fp);return{x0:t,y0:r,x1:t,y1:r-c,x2:o,y2:s-c,x3:o,y3:s}}const l=a??(r+s)/2;return{x0:t,y0:r,x1:t,y1:l,x2:o,y2:l,x3:o,y3:s}}function jT(e){return`M${e.x0},${e.y0} C${e.x1},${e.y1} ${e.x2},${e.y2} ${e.x3},${e.y3}`}function fd(e,t){const r=new Map(e.nodes.map(a=>[a.id,a])),o=(a,l)=>a.ports[l].length,s=new Map;for(const a of e.edges){const l=r.get(a.source),c=r.get(a.target);if(!l||!c)continue;const f=uu(l,a.id,"source"),u=uu(c,a.id,"target");let h,d,g,p=!0,y=f,w=u;if(a.route==="level")h=o(c,"top")>o(l,"top")?c:l,d="top",g=h===l?u:f;else{const T=a.route==="down",A=T?l:c,D=T?c:l;y=T?f:u,w=T?u:f,p=o(A,"bottom")>=o(D,"top"),h=p?A:D,d=p?"bottom":"top",g=p?w:y}const M=h.x+h.width/2,I=`${h.id}\0${d}\0${g.xf.reach-c.reach||c.edge.id.localeCompare(f.edge.id));const l=a.length;a.forEach((c,f)=>{const{edge:u,s:h,t:d}=c;if(u.route==="level"){const w=Math.round(t*(Fp-PT*f/Math.max(1,l-1)));i.set(u.id,uv("level",h.x,h.y,d.x,d.y,t,w));return}const g=(f+1)/(l+1),p=Math.min(c.lo.y-c.up.y,t),y=c.pivotUpper?c.up.y+p*g:c.lo.y-p*g;i.set(u.id,uv(u.route,h.x,h.y,d.x,d.y,t,y))})}return i}function vd(e,t=Bp){const r=[];for(let o=0;oo||(s===null||lMath.max(a,l)+1e-6)return null;const c=l>a;for(let f=0;f<40;f++){const u=(s+i)/2;ai(e,u).yl.height)return null;if(!a.some(C=>KT(C,I,DT)))return{pill:{edge:t.id,text:o,x:M,y,width:d,lane:g,end:r},rect:I}}return null}function Zp(e,t,r=!1){const o=new Map,s=d=>r===!0?!0:r!==!1&&r.has(d),i=r===!0||r!==!1&&r.size>0;if(t===null&&!i)return{pills:o,hidden:0};const a=new Map(e.layout.nodes.map(d=>[d.id,d])),l=Xp(e.layerGap),c={width:e.layout.width,height:e.layout.height},f=e.layout.nodes.map(d=>({x:d.x,y:d.y,w:d.width,h:d.height})),u=e.layout.edges.filter(d=>s(d.id)||d.source===t||d.target===t).map(d=>{const g=t!==null&&d.target===t?"source":"target",p=a.get(g==="source"?d.source:d.target),y=p?uu(p,d.id,g):{x:0,y:0};return{edge:d,end:g,anchor:y}}).sort((d,g)=>d.anchor.x-g.anchor.x||d.anchor.y-g.anchor.y||d.edge.id.localeCompare(g.edge.id));let h=0;for(const{edge:d,end:g}of u){const p=e.edges.get(d.id);if(!p)continue;const y=Gp(p,d,t);if(!y)continue;const w=du(e,d,g,y,a,l,f,c);if(w===null){h++;continue}o.set(d.id,w.pill),f.push(w.rect)}return{pills:o,hidden:h}}function Up(e,t,r,o,s){const i=e.layout.edges.find(d=>d.id===t),a=i?e.edges.get(i.id):void 0;if(!i||!a)return null;const l=o??Gp(a,i,r);if(!l)return null;const c=new Map(e.layout.nodes.map(d=>[d.id,d])),f=r!==null&&i.target===r&&i.source!==r?"source":"target",u={width:e.layout.width,height:e.layout.height},h=e.layout.nodes.map(d=>({x:d.x,y:d.y,w:d.width,h:d.height}));for(const d of s?.pills.values()??[])d.edge!==t&&h.push({x:d.x-d.width/2,y:d.y-ms/2,w:d.width,h:ms});return du(e,i,f,l,c,Xp(e.layerGap),h,u)?.pill??du(e,i,f,l,c,1,[],u)?.pill??null}var YT=N(" "),XT=N(" ",1);function Qp(e,t){Ne(t,!0);const r=S(()=>t.data),o=S(()=>jT(n(r).curve)),s=S(()=>`sedge${n(r).edge.back?" back":""}${n(r).info.synthesized?" synth":""}${n(r).hot?" hot":""}${n(r).soft?" soft":""}${n(r).focus?" focus":""}${n(r).dimmed?" dimmed":""}`);var i=XT(),a=ye(i);{let f=S(()=>`stroke-width:${Math.min(3,n(r).edge.width)}px`);qo(a,{get path(){return n(o)},get class(){return n(s)},get style(){return n(f)}})}var l=m(a,2);{var c=f=>{wp(f,{get x(){return n(r).pill.x},get y(){return n(r).pill.y},transparent:!0,class:"spill-anchor",onmousemove:u=>n(r).onHover(n(r).edge,u),onmouseleave:()=>n(r).onHover(null,null),children:(u,h)=>{var d=YT();let g;var p=v(d);P(()=>{g=Ce(d,1,"spill svelte-cf2s2p",null,g,{hot:n(r).hot,focus:n(r).focus,full:n(r).full!==null}),x(p,n(r).full??n(r).pill.text)}),_(u,d)},$$slots:{default:!0}})};V(l,f=>{n(r).pill!==null&&f(c)})}_(e,i),Ie()}const Bs=(e,t=Ln)=>{var r=St(),o=ye(r);xe(o,17,t,Kn,(s,i,a)=>{var l=ZT(),c=ye(l);{var f=g=>{var p=wt();p.nodeValue=" ",_(g,p)};V(c,g=>{a>0&&g(f)})}var u=m(c);{var h=g=>{var p=GT(),y=v(p);P(()=>x(y,n(i).text)),_(g,p)},d=g=>{var p=wt();P(()=>x(p,n(i).text)),_(g,p)};V(u,g=>{n(i).kw?g(h):g(d,-1)})}_(s,l)}),_(e,r)};var GT=N(' '),ZT=N("",1),UT=N('

The screens could not be read

'),QT=N('

Reading screens and transitions…

'),JT=N('

No screen navigation in this graph

'),$T=N(`
Transition — the destination is written at the call
Destination inferred from a helper's return value
Goes back up the picture (returning) — leaves the top of its box, arrives at the bottom of the other
→ …x The last condition checked before the transition, beside the screen at the other end of - the selected screen's line; ← when it arrives there. None = always
/path A screen — its path and the component that renders it
●/ The entry screen; each row down is one more transition away
fn() Not a screen: shared chrome, or a trigger no screen reaches — a row above what it opens
/path Nothing reaches it from the entry (bottom band)
`),eC=N(' '),tC=N(' '),nC=N('
'),rC=N('
'),oC=N('
'),sC=N('
',1),iC=N(' '),aC=N('navigates from outside any screen'),lC=N(' '),cC=N('

'),dv=N('

'),ea=N('
'),fv=N('
'),vv=N('
'),hv=N(''),gv=N('
'),uC=N('

No navigation leaves this screen.

'),dC=N('

Opens from

Goes to

',1),fC=N("· triggered outside a screen",1),vC=N('

'),hC=N(''),gC=N(`
Screens

screens · transitions.

● The entry screen is at the top; each row down is one more - transition away from it. Click a screen and each of its transitions is labelled at the far - end of its line — beside the screen it leads to or comes from — with the last condition - checked before it happens; hover the line, or its row here, for the whole chain and the - calls it travels through.

Solid: the destination is written at the call. Dashed grey: it comes back from a - helper's return value (inferred). Dashed accent: a transition back up the picture - (returning), drawn around the boxes rather than through them. Dashed box: a trigger that - is not a screen — shared chrome, or code no screen's render chain reaches.

Most connected

`,1),pC=N(''),mC=N('
');function _C(e,t){Ne(t,!0);let r=ae(null),o=ae(null),s=ae(!0),i=ae(null),a=ae(null),l=ae(null),c=ae(null),f=ae(void 0);const u=10,h="codegraph-ui:screens-legend";let d=ae(un(g()));function g(){try{return localStorage.getItem(h)!=="closed"}catch{return!0}}et(()=>{try{localStorage.setItem(h,n(d)?"open":"closed")}catch{}});const p={fitViewOptions:{padding:.1,maxZoom:1,minZoom:.4}},y=400;let w=null;const M={screen:NT},I={screen:Qp};et(()=>{Rn.indexTick;const re=new AbortController;return L(s,!0),L(o,null),Gh(re.signal).then(ee=>{L(r,ee,!0),L(s,!1)}).catch(ee=>{re.signal.aborted||(L(o,ee instanceof Error?ee.message:String(ee),!0),L(s,!1))}),()=>re.abort()});const C=S(()=>n(r)===null||!n(r).routed?null:HT(n(r))),T=S(()=>{if(n(C)===null||n(i)===null)return null;const re=new Set([n(i)]);for(const ee of n(C).layout.edges)ee.source===n(i)&&re.add(ee.target),ee.target===n(i)&&re.add(ee.source);return re}),A=S(()=>n(C)===null?null:Zp(n(C),n(i))),D=S(()=>n(a)?.edge.id??n(l)?.edge??null),j=S(()=>{if(n(C)===null||n(D)===null||n(A)?.pills.has(n(D)))return null;const re=n(l)?.edge===n(D)?Y(n(l).link):void 0;return Up(n(C),n(D),n(i),re,n(A)??void 0)}),R=S(()=>n(C)===null?[]:n(C).layout.nodes.map(re=>({id:re.id,type:"screen",position:{x:re.x,y:re.y},draggable:!1,selectable:!1,connectable:!1,data:{layout:re,info:n(C).nodes.get(re.id),selected:n(i)===re.id,dimmed:n(T)!==null&&!n(T).has(re.id),onSelect:ee=>{const ue=performance.now();if(w!==null&&w.id===ee&&ue-w.atEt(cr({anchor:ee}))}}))),z=S(()=>{if(n(C)===null)return[];const re=n(D);return n(C).layout.edges.filter(ee=>id(ee,n(i))).map(ee=>{const ue=n(i)!==null&&(ee.source===n(i)||ee.target===n(i)),ne=re===ee.id,fe=ne||ue;return{id:ee.id,source:ee.source,target:ee.target,sourceHandle:ee.sourceHandle,targetHandle:ee.targetHandle,type:"screen",selectable:!1,deletable:!1,zIndex:ne?3:fe?2:1,data:{edge:ee,info:n(C).edges.get(ee.id),curve:n(C).curves.get(ee.id),hot:fe,soft:fe&&re!==null&&!ne,focus:ne,dimmed:n(i)!==null&&!ue,pill:n(A)?.pills.get(ee.id)??(ne?n(j):null),full:n(l)?.edge===ee.id?Y(n(l).link):null,onHover:E}}})}),W=S(()=>n(i)===null||n(C)===null?null:n(C).nodes.get(n(i))??null),H=S(()=>n(i)===null||n(r)===null?null:qT(n(r),n(i))),B=S(()=>n(a)===null||n(C)===null?null:n(C).edges.get(n(a).edge.id)??null),k=S(()=>n(C)===null?new Map:new Map(n(C).layout.edges.map(re=>[re.id,re]))),b=S(()=>new Set(n(z).map(re=>re.id)));function E(re,ee){if(re===null||ee===null||n(c)===null){L(a,null);return}const ue=n(c).getBoundingClientRect();L(a,{edge:re,x:Math.min(ee.clientX-ue.left+14,ue.width-360),y:ee.clientY-ue.top+14},!0)}function q(re){if(n(C)===null||n(c)===null)return;const ee=re.target;if(ee?.closest(".spill"))return;if(ee?.closest(".snode, .legend, .tip, .svelte-flow__controls")){L(a,null);return}const ue=n(f)??O();if(!ue)return;const ne=n(c).getBoundingClientRect(),fe={x:(re.clientX-ne.left-ue.x)/ue.zoom,y:(re.clientY-ne.top-ue.y)/ue.zoom},he=Yp(n(C),fe,n(b),u/ue.zoom),ce=he===null?void 0:n(k).get(he.id);if(!ce){L(a,null);return}L(a,{edge:ce,x:Math.min(re.clientX-ne.left+14,ne.width-360),y:re.clientY-ne.top+14},!0)}function O(){const ee=n(c)?.querySelector(".svelte-flow__viewport")?.style.transform.match(/translate\(([-\d.]+)px,\s*([-\d.]+)px\)\s*scale\(([-\d.]+)\)/);return ee?{x:Number(ee[1]),y:Number(ee[2]),zoom:Number(ee[3])}:null}function K(re){const ee=re===null?null:cv(re);L(l,re===null||ee===null?null:{edge:ee,link:re},!0)}function Y(re){return`${n(i)!==null&&re.to===n(i)&&re.from!==n(i)?"←":"→"} ${xl(re.when)||"always"}`}function G(re){return n(l)!==null?n(l).link.id===re.id:n(a)!==null&&cv(re)===n(a).edge.id}function U(re){return n(C)?.nodes.get(re)?.label??re}function X(re,ee){return U(ee==="from"?re.from:re.to)}var $=mC(),Z=v($),Q=v(Z);{var F=re=>{var ee=UT(),ue=m(v(ee),2),ne=v(ue);P(()=>x(ne,n(o))),_(re,ee)},J=re=>{var ee=QT();_(re,ee)},te=re=>{var ee=JT(),ue=m(v(ee),2),ne=v(ue);P(()=>x(ne,`This view draws the routes a UI framework binds to components and the navigation calls - that reach them. The index has ${n(r).screens.length===0?"no routes":"routes"} but no - navigation between them — it is not an app with screens, or its router is one CodeGraph - does not read yet.`)),_(re,ee)},ie=re=>{var ee=sC(),ue=ye(ee);gl(ue,Jr({get nodes(){return n(R)},get edges(){return n(z)},get nodeTypes(){return M},get edgeTypes(){return I},fitView:!0},()=>p,{minZoom:.2,maxZoom:3,nodesDraggable:!1,nodesConnectable:!1,elementsSelectable:!1,panOnDrag:!0,proOptions:{hideAttribution:!0},onpaneclick:()=>{L(i,null),L(a,null),L(l,null)},get viewport(){return n(f)},set viewport(Le){L(f,Le,!0)},children:(Le,Re)=>{pl(Le,{position:"bottom-right",showLock:!1})},$$slots:{default:!0}}));var ne=m(ue,2);let fe;var he=v(ne),ce=m(v(he)),we=v(ce),de=m(he,2);{var me=Le=>{var Re=$T();_(Le,Re)};V(de,Le=>{n(d)&&Le(me)})}var Te=m(ne,2);{var Pe=Le=>{var Re=oC(),Be=v(Re),je=v(Be),tt=v(je),Ze=m(je),at=m(Be,2);xe(at,17,()=>n(B).links.slice(0,5),oe=>oe.id,(oe,_e)=>{var Me=nC(),Fe=v(Me);{var Xe=rt=>{var ct=eC(),ze=v(ct);P(()=>x(ze,`${n(_e).sites.length??""} ways`)),_(rt,ct)};V(Fe,rt=>{n(_e).sites.length>1&&rt(Xe)})}var dt=m(Fe,2),Ct=v(dt);{let rt=S(()=>dd(n(_e).when));Bs(Ct,()=>n(rt))}var Ht=m(dt,2);{var At=rt=>{var ct=tC(),ze=v(ct);P(be=>x(ze,`via ${be??""}`),[()=>bc(n(_e))]),_(rt,ct)};V(Ht,rt=>{n(_e).via.length>0&&rt(At)})}_(oe,Me)});var Ye=m(at,2);{var le=oe=>{var _e=rC(),Me=v(_e);P(()=>x(Me,`+${n(B).links.length-5} more`)),_(oe,_e)};V(Ye,oe=>{n(B).links.length>5&&oe(le)})}P((oe,_e)=>{nt(Re,`left:${n(a).x}px;top:${n(a).y}px`),x(tt,oe),x(Ze,` → ${_e??""}`)},[()=>U(n(B).from),()=>U(n(B).to)]),_(Le,Re)};V(Te,Le=>{n(a)!==null&&n(B)!==null&&Le(Pe)})}P(()=>{fe=Ce(ne,1,"legend svelte-1qt8k18",null,fe,{open:n(d)}),se(he,"aria-expanded",n(d)),x(we,n(d)?"▾":"▸")}),ke("click",he,()=>L(d,!n(d))),_(re,ee)};V(Q,re=>{n(o)!==null?re(F):n(s)&&n(r)===null?re(J,1):n(r)!==null&&!n(r).routed?re(te,2):n(C)!==null&&re(ie,3)})}Wt(Z,re=>L(c,re),()=>n(c));var ge=m(Z,2);{var ve=re=>{var ee=pC(),ue=v(ee);{var ne=he=>{var ce=dC(),we=ye(ce),de=v(we),me=v(de),Te=v(me),Pe=m(me,2);{var Le=ze=>{var be=iC(),qe=v(be);Pt(qe,{get kind(){return n(W).screen.component.kind}});var He=m(qe);P(Lt=>{se(be,"href",Lt),x(He,` ${n(W).screen.component.name??""}`)},[()=>cn(n(W).screen.component.id)]),_(ze,be)},Re=ze=>{var be=aC();_(ze,be)};V(Pe,ze=>{n(W).screen?.component?ze(Le):n(W).origin&&ze(Re,1)})}var Be=m(Pe,2);{var je=ze=>{var be=lC(),qe=v(be);P(He=>{se(be,"href",He),x(qe,n(W).screen.file)},[()=>nn(n(W).screen.file)]),_(ze,be)};V(Be,ze=>{n(W).screen&&ze(je)})}var tt=m(Be,2),Ze=m(de,2),at=m(we,2);{var Ye=ze=>{var be=cC(),qe=v(be);P(()=>x(qe,`${n(A).hidden??""} condition${n(A).hidden===1?"":"s"} not drawn on the picture for want of - room — hover a row below to see ${n(A).hidden===1?"it":"each"} on its line.`)),_(ze,be)};V(at,ze=>{n(A)!==null&&n(A).hidden>0&&ze(Ye)})}var le=m(at,2),oe=m(v(le)),_e=v(oe),Me=m(le,2);{var Fe=ze=>{var be=dv(),qe=v(be);P(()=>x(qe,n(W).entry?"The entry screen — the app starts here.":"Nothing in the graph navigates here.")),_(ze,be)};V(Me,ze=>{n(H).opensFrom.length===0&&ze(Fe)})}var Xe=m(Me,2);xe(Xe,17,()=>n(H).opensFrom,ze=>ze.id,(ze,be)=>{const qe=S(()=>Za(n(be).sites));var He=gv();let Lt;var qt=v(He),Ue=v(qt),Je=m(qt,2);{var ft=$e=>{var We=ea(),Nt=v(We);{let jt=S(()=>Ga(n(qe).common));Bs(Nt,()=>n(jt))}_($e,We)};V(Je,$e=>{n(qe).common.length>0&&$e(ft)})}var Mt=m(Je,2);{var _t=$e=>{var We=fv(),Nt=v(We);P(jt=>x(Nt,`via ${jt??""}`),[()=>bc(n(be))]),_($e,We)};V(Mt,$e=>{n(be).via.length>0&&$e(_t)})}var bt=m(Mt,2);{var dn=$e=>{var We=vv(),Nt=v(We);P(()=>x(Nt,`${n(qe).rows.length??""} ways`)),_($e,We)};V(bt,$e=>{n(qe).rows.length>1&&$e(dn)})}var Jt=m(bt,2);xe(Jt,17,()=>n(qe).rows,$e=>$e.site.file+$e.site.line,($e,We)=>{var Nt=hv();let jt;var En=v(Nt);{var Ke=Gt=>{var rn=ea(),pn=v(rn);{let In=S(()=>Ua(n(We).rest,n(qe).common.length>0));Bs(pn,()=>n(In))}_(Gt,rn)};V(En,Gt=>{n(qe).rows.length>1&&Gt(Ke)})}var Dt=m(En,2),Xt=v(Dt);P((Gt,rn)=>{jt=Ce(Nt,1,"scenario svelte-1qt8k18",null,jt,{many:n(qe).rows.length>1}),se(Dt,"href",Gt),x(Xt,`${n(We).site.method??""} ${n(We).site.href??""} · ${rn??""}:${n(We).site.line??""}`)},[()=>cn(n(be).via[n(be).via.length-1]?.id??n(W).id,{line:n(We).site.line}),()=>n(We).site.file.slice(n(We).site.file.lastIndexOf("/")+1)]),_($e,Nt)}),P(($e,We)=>{Lt=Ce(He,1,"row svelte-1qt8k18",null,Lt,$e),x(Ue,We)},[()=>({hot:G(n(be))}),()=>X(n(be),"from")]),Ge("mouseenter",He,()=>K(n(be))),Ge("mouseleave",He,()=>K(null)),ke("focusin",He,()=>K(n(be))),ke("focusout",He,()=>K(null)),ke("click",qt,()=>L(i,n(be).from,!0)),_(ze,He)});var dt=m(Xe,2),Ct=m(v(dt)),Ht=v(Ct),At=m(dt,2);{var rt=ze=>{var be=uC();_(ze,be)};V(At,ze=>{n(H).goesTo.length===0&&ze(rt)})}var ct=m(At,2);xe(ct,17,()=>n(H).goesTo,ze=>ze.id,(ze,be)=>{const qe=S(()=>Za(n(be).sites));var He=gv();let Lt;var qt=v(He),Ue=v(qt),Je=m(qt,2);{var ft=$e=>{var We=ea(),Nt=v(We);{let jt=S(()=>Ga(n(qe).common));Bs(Nt,()=>n(jt))}_($e,We)};V(Je,$e=>{n(qe).common.length>0&&$e(ft)})}var Mt=m(Je,2);{var _t=$e=>{var We=fv(),Nt=v(We);P(jt=>x(Nt,`via ${jt??""}`),[()=>bc(n(be))]),_($e,We)};V(Mt,$e=>{n(be).via.length>0&&$e(_t)})}var bt=m(Mt,2);{var dn=$e=>{var We=vv(),Nt=v(We);P(()=>x(Nt,`${n(qe).rows.length??""} ways`)),_($e,We)};V(bt,$e=>{n(qe).rows.length>1&&$e(dn)})}var Jt=m(bt,2);xe(Jt,17,()=>n(qe).rows,$e=>$e.site.file+$e.site.line,($e,We)=>{var Nt=hv();let jt;var En=v(Nt);{var Ke=Gt=>{var rn=ea(),pn=v(rn);{let In=S(()=>Ua(n(We).rest,n(qe).common.length>0));Bs(pn,()=>n(In))}_(Gt,rn)};V(En,Gt=>{n(qe).rows.length>1&&Gt(Ke)})}var Dt=m(En,2),Xt=v(Dt);P((Gt,rn)=>{jt=Ce(Nt,1,"scenario svelte-1qt8k18",null,jt,{many:n(qe).rows.length>1}),se(Dt,"href",Gt),x(Xt,`${n(We).site.method??""} ${n(We).site.href??""} · ${rn??""}:${n(We).site.line??""}`)},[()=>cn(n(be).via[n(be).via.length-1]?.id??n(W).screen?.component?.id??n(W).id,{line:n(We).site.line}),()=>n(We).site.file.slice(n(We).site.file.lastIndexOf("/")+1)]),_($e,Nt)}),P(($e,We)=>{Lt=Ce(He,1,"row svelte-1qt8k18",null,Lt,$e),x(Ue,We)},[()=>({hot:G(n(be))}),()=>X(n(be),"to")]),Ge("mouseenter",He,()=>K(n(be))),Ge("mouseleave",He,()=>K(null)),ke("focusin",He,()=>K(n(be))),ke("focusout",He,()=>K(null)),ke("click",qt,()=>L(i,n(be).to,!0)),_(ze,He)}),P(ze=>{x(Te,n(W).label),se(tt,"href",ze),x(_e,n(H).opensFrom.length),x(Ht,n(H).goesTo.length)},[()=>cr({anchor:n(W).id})]),ke("click",Ze,()=>L(i,null)),_(he,ce)},fe=he=>{var ce=gC(),we=m(ye(ce),2),de=v(we),me=v(de),Te=m(de,2),Pe=v(Te),Le=m(Te,2);{var Re=Ye=>{var le=fC(),oe=m(ye(le)),_e=v(oe);P(()=>x(_e,n(r).origins.length)),_(Ye,le)};V(Le,Ye=>{n(r).origins.length>0&&Ye(Re)})}var Be=m(we,6);{var je=Ye=>{var le=vC(),oe=v(le),_e=v(oe),Me=m(oe);P(()=>{x(_e,n(C).unreached),x(Me,` screen${n(C).unreached===1?"":"s"} in the band at the bottom: no - transition in the graph reaches ${n(C).unreached===1?"it":"them"} from the entry — opened - by something the graph cannot see (a layout's initial route, a deep link), or unused.`)}),_(Ye,le)};V(Be,Ye=>{n(C).unreached>0&&Ye(je)})}var tt=m(Be,2);{var Ze=Ye=>{var le=dv(),oe=v(le);P(()=>x(oe,`${n(r).dropped??""} navigation${n(r).dropped===1?"":"s"} could not be attributed: the walk back to a screen hit a hub.`)),_(Ye,le)};V(tt,Ye=>{n(r).dropped>0&&Ye(Ze)})}var at=m(tt,4);xe(at,17,()=>[...n(r).screens].sort((Ye,le)=>le.incoming+le.outgoing-(Ye.incoming+Ye.outgoing)).slice(0,8),Ye=>Ye.id,(Ye,le)=>{var oe=hC(),_e=v(oe),Me=m(_e),Fe=v(Me);P(()=>{x(_e,`${n(le).path??""} `),x(Fe,`←${n(le).incoming??""} →${n(le).outgoing??""}`)}),ke("click",oe,()=>L(i,n(le).id,!0)),_(Ye,oe)}),P(()=>{x(me,n(r).screens.length),x(Pe,n(r).links.length)}),_(he,ce)};V(ue,he=>{n(W)!==null&&n(H)!==null?he(ne):he(fe,-1)})}_(re,ee)};V(ge,re=>{n(r)!==null&&n(C)!==null&&re(ve)})}ke("mousemove",Z,q),Ge("mouseleave",Z,()=>L(a,null)),_(e,$),Ie()}mt(["mousemove","click","focusin","focusout"]);const yC=24;function gr(e,t="app",r){return ma(e,t,r)[0]}function ma(e,t="app",r){switch(e){case"screen":return r?.screen?.endpoint?["endpoint","endpoints"]:t==="api"?["endpoint","endpoints"]:t==="web"?["page","pages"]:["screen","screens"];case"trigger":return["handler","handlers"];case"bridge":return r?.screen?.endpoint?["call to the server","calls to the server"]:t==="app"?["native call","native calls"]:t==="web"?["call to the server","calls to the server"]:["call to another tier","calls to another tier"];case"event":return t==="app"?["native event","native events"]:t==="web"?["arrives from the server","arrive from the server"]:["arrives from a queue or bus","arrive from a queue or bus"];case"store":return t==="api"?["data call","data calls"]:["store action","store actions"];case"effect":return["outside the index","outside the index"];default:return["start","start"]}}function qn(e){const t=e.after&&e.after.length>0?` · after ${e.after.join(", ")}`:"";switch(e.kind){case"prop":return e.of?`${e.name} · <${e.of}>`:e.name;case"option":return e.of?`${e.name} · ${e.of}(…)`:e.name;case"request":return`${e.name} ${e.of??""}`.trim()+t;case"decorator":return`@${e.name}(${e.of??""})`+t;case"load":return`page load · ${e.of??e.name}`+t;default:return e.of?`${e.name}(${e.of})`:e.name}}function Jp(e){switch(e.kind){case"bridge":return`⇢ ${e.label}`;case"event":{const t=e.events??(e.event?[e.event]:[]);return t.length===0?`⇠ ${e.label}`:t.length===1?`⇠ ${t[0]}`:`⇠ ${t[0]} +${t.length-1}`}default:return e.label}}function $p(e,t="app"){const r=e.node?e.node.file.slice(e.node.file.lastIndexOf("/")+1):"";switch(e.kind){case"screen":return e.sub;case"trigger":return e.trigger?`${qn(e.trigger)} · ${r}`:`handler · ${r}`;case"bridge":return e.screen?e.sub:`${t==="app"?"native":t==="web"?"server":"another tier"} · ${r}`;case"event":return`${e.label} · ${r}`;case"store":return`${t==="api"?"data":"store"} · ${r}`;case"effect":return e.sub;default:return e.node&&e.sub===e.node.file?r:e.sub}}const pv=24,wC=15,bC=6.3,xC=320;function em(e){if(e.form==="if"||e.form==="ternary")return e.not?"no":"yes";if(e.not)return"else";let t=e.arm;return e.on&&t.startsWith(e.on)&&(t=t.slice(e.on.length).trim().replace(/^===?\s*/,"")),t?t.length>pv?`${t.slice(0,pv-1)}…`:t:"yes"}function kC(e){let t=null;for(const r of e.links)for(const o of r.sites){if(!o.decision)return null;if(t===null)t=o.decision;else if(t.branch!==o.decision.branch||t.arm!==o.decision.arm)return null}return t}function EC(e,t){const r=new Map;for(const a of e.values()){const l=kC(a);if(l===null)continue;const c=`${a.from}\0${l.branch}`,f=r.get(c)??[];f.push({info:a,decision:l}),r.set(c,f)}const o=new Map(t.nodes.map(a=>[a.id,a])),s=[],i=new Map;for(const[a,l]of r){if(new Set(l.map(g=>g.decision.arm)).size<2)continue;const c=o.get(l[0].info.from);if(!c)continue;for(const{info:g,decision:p}of l)g.arm=em(p),g.label=g.arm;const f=i.get(c.id)??0;i.set(c.id,f+1);const u=l[0].decision.on,h=`${xl(u)||u}?`,d=Math.max(c.width,Math.min(h.length*bC+8,xC));s.push({id:a,label:h,x:c.x+(c.width-d)/2,y:c.y+c.height+4+f*wC,width:d})}return s}function SC(e){const t=new Map,r=[],o={anchor:0,screen:0,trigger:0,bridge:0,event:0,store:0,effect:0},s=new Map;for(const M of e.links)s.set(M.from,(s.get(M.from)??0)+1),s.set(M.to,(s.get(M.to)??0)+1);for(const M of e.steps){o[M.kind]++;const I={id:M.id,step:M,label:Jp(M),sub:$p(M,e.project)};t.set(M.id,I),r.push({id:M.id,label:I.label,files:1,symbols:s.get(M.id)??0,languages:[],test:!1,generated:0,generatedFiles:[],facade:!1,fileList:{total:1,shown:1,truncated:!1,items:[M.node?.file??M.sub]},dependents:{files:0,modules:0}})}const i=new Map;for(const M of e.links){if(!t.has(M.from)||!t.has(M.to)||M.from===M.to)continue;const I=zr({source:M.from,target:M.to}),C=i.get(I)??[];C.push(M),i.set(I,C)}const a=[],l=new Map;for(const[M,I]of i){const C=I[0];a.push({source:C.from,target:C.to,count:I.length,declared:I.length,byKind:[{kind:"calls",count:I.length}],topPairs:[]});const T=I.length===1&&C.kind==="handler"&&C.trigger?C.trigger:null;l.set(M,{id:M,from:C.from,to:C.to,links:I,label:T?qn(T):Kp(I),synthesized:I.every(A=>A.synthesized),kind:I.every(A=>A.kind===C.kind)?C.kind:"calls"})}const c=e.steps.some(M=>M.region!==void 0);let f,u=null;if(c){const M=OC(e.steps,t,r,a);f=M.layout,u=M.zones}else{const M=new Map(e.steps.map(T=>[T.id,T.depth])),I=Math.max(0,...e.steps.map(T=>T.depth));f=_l({modules:r,links:a},{includeTests:!0,minWeight:0,sizing:T=>{const A=t.get(T.id),D=A?.step.cut!=null?" …":"";return{label:(A?.step.anchor?"● ":"")+(A?.label??T.id)+D,meta:A?.sub??""}},layering:T=>new Map(T.map(A=>[A,I-(M.get(A)??I)])),order:T=>t.get(T)?.step.order??Number.MAX_SAFE_INTEGER,layerGap:wr,portPitch:ml,ports:"directional"})}const h=c?tm:wr,d=fd(f,h),g=new Map;for(const[M,I]of d)g.set(M,vd(I,yC));const p=u===null?null:new Set(u.map(M=>M.entry)),{stubs:y,stubbed:w}=TC(f,t,h,p);return{layout:f,nodes:t,edges:l,layerGap:h,curves:d,polylines:g,counts:o,regions:u,regionEntries:p,forks:null,stubs:y,stubbed:w,decisions:EC(l,f)}}const MC=3;function mv(e){return e.startsWith("⇢ ")||e.startsWith("⇠ ")?e.slice(2):e}function TC(e,t,r,o){const s=new Map,i=new Set,a=new Map(e.nodes.map(u=>[u.id,u])),l=Jn+r,c=(u,h)=>{s.set(u,[...s.get(u)??[],h])};for(const u of e.edges){const h=a.get(u.source),d=a.get(u.target);if(!h||!d||o!==null&&t.get(u.source)?.step.anchor&&!o.has(u.target))continue;const g=Math.abs(d.y-h.y)/l,p=Math.abs(d.x+d.width/2-(h.x+h.width/2));!u.back&&!u.thin&&g<=MC+.01&&p<=nm||(i.add(u.id),c(u.source,{edge:u.id,other:u.target,label:mv(t.get(u.target)?.label??u.target),dir:"out"}),c(u.target,{edge:u.id,other:u.source,label:mv(t.get(u.source)?.label??u.source),dir:"in"}))}const f=u=>{const h=a.get(u);return h?h.y*1e5+h.x:0};for(const u of s.values())u.sort((h,d)=>h.dir===d.dir?f(h.other)-f(d.other):h.dir==="out"?-1:1);return{stubs:s,stubbed:i}}const tm=72,ta=Jn+tm,nm=720,CC=[nm,1e3,1300,1600,1900,2200,2600,3e3],NC=1.4;function _v(e){return Math.abs(Math.log(Math.max(1,e.width)/Math.max(1,e.height)/NC))}const yv=26,IC=6,AC=72,wv=84;function PC(e,t){return Math.max(t,Math.min(3400,Math.max(1440,Math.ceil(Math.sqrt(e*2.4)))))}function bv(e){const t=new Map,r=new Set;for(const a of e){r.add(a.source),r.add(a.target);const l=t.get(a.source);l?l.push(a):t.set(a.source,[a])}const o=new Map,s=new Set,i=a=>{const l=[{id:a,next:0}];for(o.set(a,1);l.length>0;){const c=l[l.length-1],f=t.get(c.id)??[];if(c.next>=f.length){o.set(c.id,2),l.pop();continue}const u=f[c.next++],h=o.get(u.target)??0;if(h===1){s.add(u);continue}h!==2&&(o.set(u.target,1),l.push({id:u.target,next:0}))}};for(const a of r)o.has(a)||i(a);return e.filter(a=>!s.has(a))}function OC(e,t,r,o){const s=e.find(E=>E.anchor),i=e.filter(E=>!E.anchor),a=new Map(r.map(E=>[E.id,E])),l=new Map;for(const E of o)l.set(E.source,(l.get(E.source)??0)+1),l.set(E.target,(l.get(E.target)??0)+1);const c=E=>{const q=t.get(E),O=q?.step.cut!=null?" …":"",K=q?.step.anchor?"● ":"";return Math.max(Ip(K+(q?.label??E)+O,q?.sub??""),((l.get(E)??0)+1)*ml)},f=new Map;for(const E of i){const q=E.region?.id??s.id,O=f.get(q)??{id:q,label:E.region?.label??s.label,members:[]};O.members.push(E),f.set(q,O)}const u=new Map(i.map(E=>[E.id,E.region?.id??s.id])),h=o.filter(E=>E.source!==s.id&&E.target!==s.id&&E.source!==E.target&&u.get(E.source)===u.get(E.target)),d=new Set(o.filter(E=>E.source===s.id).map(E=>E.target)),g=new Map;for(const E of bv(h)){const q=g.get(E.target)??[];q.push(E.source),g.set(E.target,q)}const p=new Map;{const E=new Map(i.map(Y=>[Y.id,Y.order??Number.MAX_SAFE_INTEGER])),q=new Map;for(const Y of bv(h))q.set(Y.source,[...q.get(Y.source)??[],Y.target]);const O=new Set,K=i.filter(Y=>(g.get(Y.id)??[]).length===0).map(Y=>Y.id);for(const Y of K)O.add(Y);for(;K.length>0;){const Y=K.shift(),G=[...new Set(q.get(Y)??[])].sort((U,X)=>(E.get(U)??0)-(E.get(X)??0)||U.localeCompare(X));for(const U of G)O.has(U)||(O.add(U),p.set(Y,[...p.get(Y)??[],U]),K.push(U))}}const y=_n,w=E=>{const q=new Map;for(const te of f.values()){const ie=new Set(te.members.map(ce=>ce.id)),ge=ce=>(p.get(ce)??[]).filter(we=>ie.has(we)),ve=te.members.filter(ce=>(g.get(ce.id)??[]).length===0).map(ce=>ce.id),re=ce=>{const we=je=>{const tt=new Map;let Ze=0,at=0;const Ye=(oe,_e)=>{if(oe.length===0)return;let Me=_e;for(const Fe of oe){const Xe=c(Fe);Me>_e&&Me+Xe-_e>ce&&(Ze+=1,Me=_e),tt.set(Fe,{x:Me,line:Ze}),at=Math.max(at,Me+Xe),Me+=Xe+cu}Ze+=1},le=(oe,_e)=>{const Me=Math.min(_e,IC)*yv;tt.set(oe,{x:Me,line:Ze}),at=Math.max(at,Me+c(oe)),Ze+=1;const Fe=ge(oe);Ye(Fe.filter(Xe=>ge(Xe).length===0),Me+yv);for(const Xe of Fe.filter(dt=>ge(dt).length>0))le(Xe,_e+1)};return le(je,0),{pos:tt,lines:Ze,width:at}},de=je=>{const tt=new Map;let Ze=0,at=0,Ye=0;for(const le of je){const oe=c(le);Ye>0&&Ye+oe>ce&&(Ze+=1,Ye=0),tt.set(le,{x:Ye,line:Ze}),at=Math.max(at,Ye+oe),Ye+=oe+cu}return{pos:tt,lines:je.length===0?0:Ze+1,width:at}},me=[],Te=ve.filter(je=>ge(je).length===0);Te.length>0&&me.push(de(Te));const Pe=new Set(Te);for(const je of ve){if(Pe.has(je))continue;const tt=we(je);for(const Ze of tt.pos.keys())Pe.add(Ze);me.push(tt)}for(const je of te.members){if(Pe.has(je.id))continue;const tt=we(je.id);for(const Ze of tt.pos.keys())Pe.add(Ze);me.push(tt)}const Le=new Map;let Re=0,Be=0;for(const je of me){for(const[tt,Ze]of je.pos)Le.set(tt,{x:Ze.x,line:Be+Ze.line});Re=Math.max(Re,je.width),Be+=je.lines}return{pos:Le,lines:Be,width:Re}},{pos:ee,lines:ue,width:ne}=re(E),fe=ce=>ce.filter(we=>ee.has(we)).sort((we,de)=>ee.get(we).line-ee.get(de).line||ee.get(we).x-ee.get(de).x)[0]??null,he=fe(te.members.filter(ce=>d.has(ce.id)).map(ce=>ce.id))??fe(te.members.map(ce=>ce.id))??te.members[0].id;q.set(te.id,{pos:ee,lines:ue,width:ne,entry:he})}let O=0,K=0;for(const te of f.values()){const ie=q.get(te.id);O+=ie.width*ie.lines*ta,K=Math.max(K,ie.width)}const Y=PC(O,K),G=new Map,U=[],X=y+Jn+wr+wv,$=[],Z=(te,ie)=>{let ge=X;for(const ve of $)ve.x1>te+1&&ve.x0ne.x1+AC)].filter((ne,fe,he)=>he.indexOf(ne)===fe&&ne+ie.width<=_n+Math.max(Y,ie.width)).sort((ne,fe)=>ne-fe);let re={x:_n,y:Z(_n,_n+ie.width)};for(const ne of ve){const fe=Z(ne,ne+ie.width);fete.x+te.width-_n));for(const te of G.values())te.line=Math.round((te.y-X)/ta);const F=Math.max(0,...[...G.values()].map(te=>te.line))+1,J=Math.max(y+Jn,...U.map(te=>te.y+te.height))+_n;return{at:G,zones:U,contentWidth:Q,globalLine:F,height:J,width:Q+_n*2}},M=CC.map(E=>w(E)),{at:I,zones:C,contentWidth:T,globalLine:A,height:D}=M.reduce((E,q)=>_v(E)<=_v(q)?E:q),j=E=>E===s.id?A+1:A-(I.get(E)?.line??0),R=new Map,z=(E,q,O)=>{R.set(E,{id:E,module:a.get(E),island:!1,generated:!1,weight:0,layer:j(E),x:q,y:O,width:c(E),height:Jn,sourceHandles:[],targetHandles:[],ports:{top:[],bottom:[]}})};z(s.id,_n+(T-c(s.id))/2,y);for(const[E,q]of I)z(E,q.x,q.y);const W=[],H=new Map,B=E=>{const q=R.get(E);return q?q.x+q.width/2:0};for(const E of o){const q=R.get(E.source),O=R.get(E.target);if(!q||!O)continue;const K=zr(E),Y=q.layer>O.layer?"down":q.layer{const $=H.get(X)??{top:[],bottom:[]};return H.set(X,$),$};U(E.source)[G.source].push({id:K,type:"source",other:B(E.target)}),U(E.target)[G.target].push({id:K,type:"target",other:B(E.source)})}const k=(E,q)=>E.other-q.other||E.id.localeCompare(q.id);for(const[E,q]of H){const O=R.get(E);O&&(q.top.sort(k),q.bottom.sort(k),O.ports={top:q.top.map(K=>({id:K.id,type:K.type})),bottom:q.bottom.map(K=>({id:K.id,type:K.type}))},O.sourceHandles=q.bottom.filter(K=>K.type==="source").map(K=>K.id),O.targetHandles=q.top.filter(K=>K.type==="target").map(K=>K.id))}return{layout:{nodes:[...R.values()],edges:W,layers:[],width:T+_n*2,height:D,basis:{kind:"all",declaredLinks:o.length,totalLinks:o.length},minWeight:0,hiddenLinks:0,mutual:[],moduleCycles:[]},zones:C}}function rm(e,t){const r=new Set([t]);if(e.forks===null||e.forks.size===0)return r;for(let o=!0;o;){o=!1;for(const s of e.layout.edges){const i=r.has(s.source),a=r.has(s.target);if(i===a)continue;const l=i?s.target:s.source;e.forks.has(l)&&!r.has(l)&&(r.add(l),o=!0)}}return r}function LC(e,t,r,o){if(r!==null){const i=o??rm(e,r);return i.has(t.source)||i.has(t.target)}return t.thin||t.back||e.stubbed.has(t.id)?!1:e.regions===null?!0:e.nodes.get(t.source)?.step?.anchor?e.regionEntries?.has(t.target)??!0:!0}function DC(e,t){return{arrivesFrom:e.links.filter(r=>r.to===t),leadsTo:e.links.filter(r=>r.from===t)}}function xc(e){return e.via.map(t=>t.name).join(" → ")}function xv(e){return e.from===e.to?null:zr({source:e.from,target:e.to})}var RC=N(''),zC=N(''),HC=N('');function qC(e,t){Ne(t,!0);let r=Ee(t,"size",3,null),o=Ee(t,"note",3,"");const s=S(()=>t.info.step),i=S(()=>{switch(n(s).cut){case"depth":return" More happens past the depth of this picture — start here to see it.";case"fan-out":return" It reaches more than the walk follows from one node.";case"folded":return" The walk folded as much plumbing as it allows from one step.";case"steps":return" The picture reached its size limit here.";case"screen":return` Another ${gr("screen",t.project,n(s))} — a chapter of its own. Start here to see what happens on it.`;case"component":return" The event lands in a component of another screen — a picture of its own. Start here to see it.";default:return""}});var a=HC();let l;var c=v(a),f=v(c);{var u=w=>{var M=RC();_(w,M)};V(f,w=>{n(s).anchor&&w(u)})}var h=m(f,1,!0),d=m(h);{var g=w=>{var M=zC();_(w,M)};V(d,w=>{n(s).cut!==null&&w(g)})}var p=m(c,2),y=v(p);P(w=>{l=Ce(a,1,`snode k-${n(s).kind}`,"svelte-1gxwpy3",l,{sel:t.selected,dimmed:t.dimmed,anchor:n(s).anchor,rail:r()===null}),nt(a,r()===null?void 0:`width:${r().width}px;height:${r().height}px`),se(a,"aria-pressed",t.selected),se(a,"title",w),x(h,t.info.label),x(y,t.info.sub)},[()=>`${t.info.label} — ${n(s).anchor?"where this picture starts; ":""}${gr(n(s).kind,t.project,n(s))}. ${t.info.sub}.${o()?` ${o()}`:""}${n(i)}${t.onStart&&!n(s).anchor?" Double-click to start here.":""}`]),ke("click",a,()=>t.onSelect(t.info.id)),Ge("dblclick",a,w=>{w.stopPropagation(),t.onStart?.(t.info.id)},!0),_(e,a),Ie()}mt(["click"]);var jC=N(" ",1);function FC(e,t){Ne(t,!0);const r=S(()=>t.data),o=S(()=>n(r).layout);function s(f,u){return`left:${(f+1)/(u+1)*100}%`}var i=jC(),a=ye(i);xe(a,19,()=>n(o).ports.top,f=>`${f.type}:${f.id}`,(f,u,h)=>{{let d=S(()=>`${n(u).type==="source"?"s":"t"}:${n(u).id}`),g=S(()=>s(n(h),n(o).ports.top.length));kn(f,{get type(){return n(u).type},get id(){return n(d)},get position(){return Ve.Top},get style(){return n(g)},isConnectable:!1})}});var l=m(a,2);qC(l,{get info(){return n(r).info},get project(){return n(r).project},get selected(){return n(r).selected},get dimmed(){return n(r).dimmed},get size(){return n(o)},get onSelect(){return n(r).onSelect},get onStart(){return n(r).onStart}});var c=m(l,2);xe(c,19,()=>n(o).ports.bottom,f=>`${f.type}:${f.id}`,(f,u,h)=>{{let d=S(()=>`${n(u).type==="source"?"s":"t"}:${n(u).id}`),g=S(()=>s(n(h),n(o).ports.bottom.length));kn(f,{get type(){return n(u).type},get id(){return n(d)},get position(){return Ve.Bottom},get style(){return n(g)},isConnectable:!1})}}),_(e,i),Ie()}var BC=N(' '),VC=N(' '),WC=N('');function KC(e,t){Ne(t,!0);const r=3,o=S(()=>t.data),s=S(()=>n(o).stubs),i=S(()=>n(o).width),a=S(()=>n(o).dimmed),l=S(()=>n(s).slice(0,r)),c=S(()=>n(s).length-n(l).length),f=S(()=>n(s).slice(r).map(y=>`${y.dir==="out"?"leads to":"arrives from"} ${y.label}`).join(` -`));var u=WC();let h;var d=v(u);xe(d,17,()=>n(l),y=>y.edge+y.dir,(y,w)=>{var M=BC(),I=v(M),C=v(I),T=m(I,1,!0);P(()=>{se(M,"title",`${n(w).dir==="out"?"Leads to":"Arrives from"} ${n(w).label} — too far across the picture to draw as a line. Click the box to draw it.`),x(C,n(w).dir==="out"?"→":"←"),x(T,n(w).label)}),_(y,M)});var g=m(d,2);{var p=y=>{var w=VC(),M=v(w);P(()=>{se(w,"title",n(f)),x(M,`+${n(c)??""} more`)}),_(y,w)};V(g,y=>{n(c)>0&&y(p)})}P(()=>{h=Ce(u,1,"stubs svelte-12qg1ij",null,h,{dimmed:n(a)}),nt(u,`width:${n(i)}px`)}),_(e,u),Ie()}var YC=N(' '),XC=N("",1),GC=N("?",1),ZC=N('
',1);function UC(e,t){Ne(t,!0);const r=S(()=>t.data),o=S(()=>n(r).layout),s=S(()=>bl(n(r).fork.on)),i=S(()=>n(s).length===0||Di(n(s)).length>Do);function a(w,M){return`left:${(w+1)/(M+1)*100}%`}var l=ZC(),c=ye(l);xe(c,19,()=>n(o).ports.top,w=>`${w.type}:${w.id}`,(w,M,I)=>{{let C=S(()=>`${n(M).type==="source"?"s":"t"}:${n(M).id}`),T=S(()=>a(n(I),n(o).ports.top.length));kn(w,{get type(){return n(M).type},get id(){return n(C)},get position(){return Ve.Top},get style(){return n(T)},isConnectable:!1})}});var f=m(c,2);let u;var h=v(f),d=v(h);{var g=w=>{var M=wt();P(()=>x(M,n(r).fork.label)),_(w,M)},p=w=>{var M=GC(),I=ye(M);xe(I,17,()=>n(s),Kn,(C,T,A)=>{var D=XC(),j=ye(D);{var R=B=>{var k=wt();k.nodeValue=" ",_(B,k)};V(j,B=>{A>0&&B(R)})}var z=m(j);{var W=B=>{var k=YC(),b=v(k);P(()=>x(b,n(T).text)),_(B,k)},H=B=>{var k=wt();P(()=>x(k,n(T).text)),_(B,k)};V(z,B=>{n(T).kw?B(W):B(H,-1)})}_(C,D)}),_(w,M)};V(d,w=>{n(i)?w(g):w(p,-1)})}var y=m(f,2);xe(y,19,()=>n(o).ports.bottom,w=>`${w.type}:${w.id}`,(w,M,I)=>{{let C=S(()=>`${n(M).type==="source"?"s":"t"}:${n(M).id}`),T=S(()=>a(n(I),n(o).ports.bottom.length));kn(w,{get type(){return n(M).type},get id(){return n(C)},get position(){return Ve.Bottom},get style(){return n(T)},isConnectable:!1})}}),P(()=>{u=Ce(f,1,"fpoint svelte-10oa9z2",null,u,{dimmed:n(r).dimmed}),nt(f,`width:${n(o).width}px;height:${n(o).height}px`),se(f,"title",n(r).fork.on?`${n(r).fork.on} — the code forks here; each line out is one arm.`:"The code forks here; each line out is one arm.")}),_(e,l),Ie()}var QC=N(' '),JC=N("",1),$C=N("?",1),eN=N("
");function tN(e,t){Ne(t,!0);const r=S(()=>t.data),o=S(()=>bl(n(r).label.replace(/\?$/,""))),s=S(()=>n(o).length===0||Di(n(o))!==n(r).label.replace(/\?$/,""));var i=eN();let a;var l=v(i);{var c=u=>{var h=wt();P(()=>x(h,n(r).label)),_(u,h)},f=u=>{var h=$C(),d=ye(h);xe(d,17,()=>n(o),Kn,(g,p,y)=>{var w=JC(),M=ye(w);{var I=D=>{var j=wt();j.nodeValue=" ",_(D,j)};V(M,D=>{y>0&&D(I)})}var C=m(M);{var T=D=>{var j=QC(),R=v(j);P(()=>x(R,n(p).text)),_(D,j)},A=D=>{var j=wt();P(()=>x(j,n(p).text)),_(D,j)};V(C,D=>{n(p).kw?D(T):D(A,-1)})}_(g,w)}),_(u,h)};V(l,u=>{n(s)?u(c):u(f,-1)})}P(()=>{a=Ce(i,1,"dcap svelte-1ham54o",null,a,{dimmed:n(r).dimmed}),nt(i,`width:${n(r).width}px`),se(i,"title",n(r).label)}),_(e,i),Ie()}var nN=N('
');function rN(e,t){const r=S(()=>t.data);var o=nN(),s=v(o);P(()=>{nt(o,`width:${n(r).width}px`),x(s,n(r).label)}),_(e,o)}var oN=N('
Name
no line
',1),sN=N(`
→ name What a box leads to, or what reaches it (←), when the two are too far apart for a line to be followed — said - in words under the box rather than drawn across the picture. Select the box and every one of its real lines - draws
`),iN=N('
POST /x An endpoint — its verb and path — or a handler: a function a request, a job, an event or a schedule fires; its line says which
⇢ fn The code crosses a tier: a call into another service or a job put on a queue (⇢), or a job, an event, a message arriving (⇠)
set A data call — a function in a store or state file
db A call that leaves the index: the database, the response, a queue, email, payments, a cache, auth, the network
',1),aN=N('
/path A page, an endpoint, or a handler — a function an event, a request or a page load fires; its line says which
⇢ fn The code crosses to the server (⇢ a request, a server action) or comes back from it (⇠ a push, a stream)
set A store action — a function in a store file
api A call that leaves the index: the network, the database, the response, storage, a queue, email
',1),lN=N('
/path A screen, or a handler — a function fired from a tap, an option, a listener; its line says the event
⇢ fn The code crosses into native (⇢ a bridge call) or comes back from it (⇠ an event)
set A store action — a function in a store file
api A call that leaves the index: the network, storage, the device, telemetry
',1),cN=N(`
And then — the step at the other end happens after this one; the plumbing between them is folded into the line
x? A decision both of whose ways are drawn: the box asks the condition once and each line out answers — yes, no, a case. An arm that answers or leaves ends there
WHEN x A lone guard — an early exit, an if with one drawn side: what has to hold for the step at the other end. No label = it happens either way
via x Written inside a helper drawn where it is called; later runs after this returns, together starts at once, for each repeats
Established by a synthesized hop (an event channel, a callback, a helper's return value)
name …
`,1),uN=N(`
Leads to — the plumbing between the two is folded into the line
Established by a synthesized hop (an event channel, a callback, a helper's return value)
Goes back up the picture — leaves the top of its box, arrives at the bottom of the other
x? · yes A decision made inside a box, both of whose ways are drawn: the condition is said once under the box and - each line out of it answers — yes, no, a case. These are - the only lines labelled before you select anything
→ …x The last condition checked before the step, beside the box at the other end of the selected step's line; ← when it arrives there. None = always
name … Not entered: another screen (a chapter of its own), or a cap the walk hit — start there to see on
`,1),dN=N('
●start
'),fN=N('
');function vN(e,t){Ne(t,!0);let r=Ee(t,"regions",3,!1);var o=fN();let s;var i=v(o),a=m(v(i)),l=v(a),c=m(i,2);{var f=u=>{var h=dN(),d=v(h),g=m(v(d),2),p=v(g),y=m(d,2);{var w=W=>{var H=oN(),B=ye(H),k=m(v(B),2),b=v(k),E=m(B,2),q=m(v(E),2),O=v(q);P((K,Y)=>{x(b,`A region — the component that owns the boxes under its rule, a box above what it sets in motion. One line from - the start into each region stands in for the ${K??""}'s whole fan-out; every other line - draws where it leads`),x(O,`A box nothing points at is the region's own doing — run on render or mount, or from a binding written inline. - Select it and its line from the ${Y??""} lights, with what fires it`)},[()=>gr("screen",t.project),()=>gr("screen",t.project)]),_(W,H)};V(y,W=>{r()&&!t.order&&W(w)})}var M=m(y,2);{var I=W=>{var H=sN();_(W,H)};V(M,W=>{t.order||W(I)})}var C=m(M,2);{var T=W=>{var H=iN();_(W,H)},A=W=>{var H=aN();_(W,H)},D=W=>{var H=lN();_(W,H)};V(C,W=>{t.project==="api"?W(T):t.project==="web"?W(A,1):W(D,-1)})}var j=m(C,2);{var R=W=>{var H=cN(),B=m(ye(H),10),k=m(v(B),2),b=v(k);P(E=>x(b,`Not entered: another ${E??""} (a chapter of its own), or a cap the walk hit — start there to see on`),[()=>gr("screen",t.project)]),_(W,H)},z=W=>{var H=uN();_(W,H)};V(j,W=>{t.order?W(R):W(z,-1)})}P(W=>x(p,W),[()=>t.order?"Where the picture starts; below it, what it does in the code’s own order":r()?"Where the picture starts; below it, the parts of the "+gr("screen",t.project)+", each with what happens there":"Where the picture starts; each row down is one more step away"]),_(u,h)};V(c,u=>{t.open&&u(f)})}P(()=>{s=Ce(o,1,"legend svelte-1jp07je",null,s,{open:t.open,flow:t.flow}),se(i,"aria-expanded",t.open),x(l,t.open?"▾":"▸")}),ke("click",i,()=>t.onToggle(!t.open)),_(e,o),Ie()}mt(["click"]);function hN(e){return dd(e)}function gN(e){switch(e.block){case"inline":return e.via?`via ${e.via.name}`:"via a helper";case"loop":return e.by?e.loop==="while"?`again while ${e.by}`:`for each ${e.by}`:e.loop==="while"?"again and again":"for each item";case"later":return e.by?`later · ${e.by}`:"later";default:return e.by?`together · ${e.by}`:"together"}}function pN(e,t){const r=[],o=new Set([t]),s=new Map,i=[],a=(f,u,h)=>{if(f===u)return;const d=`${f} ${u}`,g=h.when.filter((w,M)=>w&&h.when.indexOf(w)===M).join(" && "),p=s.get(d);if(p){g!==p.when&&(p.when=!g||!p.when?"":`${p.when} || ${g}`);for(const w of h.runs)p.runs.includes(w)||p.runs.push(w);p.arm!==h.arm&&delete p.arm;return}const y={from:f,to:u,when:g,runs:[...h.runs],...h.arm!==void 0?{arm:h.arm}:{}};s.set(d,y),r.push(y)},l=(f,u,h)=>{let d=[...u];for(const g of f)if(g.kind==="step"){o.add(g.step);for(const y of d)a(y.id,g.step,{...y,runs:[...y.runs,...h]});let p=[{id:g.step,when:[],runs:[]}];g.body&&g.body.length>0&&(p=l(g.body,p,[])),d=p}else if(g.kind==="fork"){const y=g.arms.filter(M=>Qa(M.body)).length>=2&&d.length>0?{id:`fork:${i.length}`,on:g.on,form:g.form}:null;if(y!==null){i.push(y);for(const M of d)a(M.id,y.id,{...M,runs:[...M.runs,...h]})}const w=[];for(const M of g.arms){const I=y!==null&&Qa(M.body)?[{id:y.id,when:[M.when],runs:[...h],arm:mN(g,M)}]:d.map(T=>({id:T.id,when:[...T.when,M.when],runs:[...T.runs,...h]})),C=l(M.body,I,[]);M.ends===null&&w.push(...C)}g.arms.length<2&&w.push(...d.map(M=>({...M,runs:[...M.runs,...h]}))),d=w}else if(g.kind==="block"){const p=gN(g),y=l(g.body,d,[...h,p]);d=(y.length>0?y:d).map(w=>w.runs.includes(p)?{...w,runs:w.runs.filter(M=>M!==p)}:w)}return d};l(e.root,[{id:t,when:[],runs:[]}],[]);for(const f of o)f!==t&&!r.some(u=>u.to===f)&&a(t,f,{when:[],runs:[]});const c=new Set(o);for(const f of i)c.add(f.id);return{edges:r,depth:_N(t,c,r),forks:i}}function Qa(e){return e.some(t=>t.kind==="step"?!0:t.kind==="fork"?t.arms.some(r=>Qa(r.body)):t.kind==="block"?Qa(t.body):!1)}function mN(e,t){return em({on:e.on,arm:t.when,form:e.form,not:t.not})}function _N(e,t,r){const o=yN(e,t,r),s=new Map;for(const i of t)s.set(i,0);s.set(e,0);for(let i=0;i(s.get(l.to)??0)&&(s.set(l.to,c),a=!0)}if(!a)break}return s}function yN(e,t,r){const o=new Map;for(const a of r){const l=o.get(a.from);l?l.push(a):o.set(a.from,[a])}const s=new Map,i=new Set;for(const a of[e,...t]){if(s.has(a))continue;s.set(a,1);const l=[{id:a,next:0}];for(;l.length>0;){const c=l[l.length-1],f=o.get(c.id)??[];if(c.next>=f.length){s.set(c.id,2),l.pop();continue}const u=f[c.next++],h=s.get(u.to);h===1?i.add(u):h===void 0&&(s.set(u.to,1),l.push({id:u.to,next:0}))}}return r.filter(a=>!i.has(a))}const wN=24;function bN(e){if(!e.program)return null;const t=e.steps.find(I=>I.anchor);if(!t)return null;const r=pN(e.program,t.id),o=new Map,s=new Map,i=[],a={anchor:0,screen:0,trigger:0,bridge:0,event:0,store:0,effect:0},l=new Map;for(const I of r.edges)l.set(I.from,(l.get(I.from)??0)+1),l.set(I.to,(l.get(I.to)??0)+1);const c=new Map(e.steps.map(I=>[I.id,I]));for(const I of[t.id,...r.depth.keys()]){if(o.has(I))continue;const C=c.get(I);if(!C)continue;a[C.kind]++;const T={id:I,step:C,label:Jp(C),sub:$p(C,e.project)};o.set(I,T),i.push({id:I,label:T.label,files:1,symbols:l.get(I)??0,languages:[],test:!1,generated:0,generatedFiles:[],facade:!1,fileList:{total:1,shown:1,truncated:!1,items:[C.node?.file??C.sub]},dependents:{files:0,modules:0}})}for(const I of r.forks){const C=kN(I.on);s.set(I.id,{id:I.id,on:I.on,form:I.form,label:C}),i.push({id:I.id,label:C,files:0,symbols:l.get(I.id)??0,languages:[],test:!1,generated:0,generatedFiles:[],facade:!1,fileList:{total:0,shown:0,truncated:!1,items:[]},dependents:{files:0,modules:0}})}const f=I=>o.has(I)||s.has(I),u=[],h=new Map;for(const I of r.edges){if(!f(I.from)||!f(I.to))continue;const C=zr({source:I.from,target:I.to});if(h.has(C))continue;u.push({source:I.from,target:I.to,count:1,declared:1,byKind:[{kind:"calls",count:1}],topPairs:[]});const T=e.links.filter(A=>A.to===I.to);h.set(C,{id:C,from:I.from,to:I.to,links:T,label:xN(I),synthesized:T.length>0&&T.every(A=>A.synthesized),kind:T[0]?.kind??"calls"})}const d=new Map;for(const I of r.edges){if(!s.has(I.from))continue;const C=c.get(I.to)?.order;C!==void 0&&d.set(I.from,Math.min(d.get(I.from)??Number.MAX_SAFE_INTEGER,C))}const g=Math.max(0,...r.depth.values()),y=_l({modules:i,links:u},{includeTests:!0,minWeight:0,sizing:I=>{const C=s.get(I.id);if(C)return{label:C.label,meta:""};const T=o.get(I.id),A=T?.step.cut!=null?" …":"";return{label:(T?.step.anchor?"● ":"")+(T?.label??I.id)+A,meta:T?.sub??""}},layering:I=>new Map(I.map(C=>[C,g-(r.depth.get(C)??g)])),order:I=>o.get(I)?.step.order??d.get(I)??Number.MAX_SAFE_INTEGER,layerGap:wr,portPitch:ml,ports:"directional"}),w=fd(y,wr),M=new Map;for(const[I,C]of w)M.set(I,vd(C,wN));return{layout:y,nodes:o,edges:h,layerGap:wr,curves:w,polylines:M,counts:a,regions:null,regionEntries:null,forks:s,decisions:[],stubs:new Map,stubbed:new Set}}function xN(e){if(e.arm)return e.arm;if(!e.when)return e.runs.length>0?e.runs[e.runs.length-1]:"";const t=Di(hN(e.when));return t.length>Do?`${t.slice(0,Do-1)}…`:t}function kN(e){const t=xl(e);return t?t.length>Do?`${t.slice(0,Do-1)}…?`:`${t}?`:"?"}const Vs=(e,t=Ln)=>{var r=St(),o=ye(r);xe(o,17,t,Kn,(s,i,a)=>{var l=SN(),c=ye(l);{var f=g=>{var p=wt();p.nodeValue=" ",_(g,p)};V(c,g=>{a>0&&g(f)})}var u=m(c);{var h=g=>{var p=EN(),y=v(p);P(()=>x(y,n(i).text)),_(g,p)},d=g=>{var p=wt();P(()=>x(p,n(i).text)),_(g,p)};V(u,g=>{n(i).kw?g(h):g(d,-1)})}_(s,l)}),_(e,r)};var EN=N(' '),SN=N("",1),MN=N('

This viewer cannot draw steps

The host it runs in has not wired the steps question. The Screens and Flow views still work.

'),TN=N(`

Pick an endpoint and this view draws everything it sets in motion — its handler and what runs - before it, the calls into the database, a queue, another service, and every response it can - send — one box per step, an arrow for every way one leads to the next, and on each arrow the - condition under which it happens. Or search a symbol and choose What happens from here.

`),CN=N(`

Pick a screen and this view draws everything it sets in motion — its handlers, the calls that - cross into native code, the events that come back, the state it writes, the requests that leave - the app — one box per step, an arrow for every way one leads to the next, and on each arrow the - condition under which it happens. Or search a symbol and choose What happens from here.

`),kc=N('

'),NN=N(`

No screens or endpoints in this graph. Open a symbol from the search box and follow What happens from here, - or link here directly with #/steps?symbol=<name>.

`),kv=N(' '),IN=N('
'),AN=N('
',1),PN=N('

What happens from where?

'),ON=N('

The steps could not be read

'),LN=N('

Walking from the anchor…

'),DN=N(`

This has no body to read in order

Nothing the picture holds is written inside this symbol — a screen renders handlers that fire on - events, and they have no order between them. Read it as what it sets in motion instead.

What it sets in motion →

`),RN=N('FIRES FROM '),zN=N(' '),Ec=N(' '),Ws=N(' ·',1),HN=N(' '),qN=N('
'),jN=N('
'),FN=N('
'),BN=N(" ",1),Sc=N('
FIRES FROM
'),Mc=N(' '),VN=N(' '),WN=N('Start here →'),na=N('

'),KN=N('

The event lands in a component of another screen — a picture of its own. Start here (or double-click its box) to see it, or continue through screens from the summary.

'),Ev=N('

'),Sv=N('
'),ra=N('
'),oa=N('
'),Mv=N('
'),Tv=N('
FIRES FROM
'),Cv=N(' '),Nv=N(' '),Iv=N("
"),Av=N('Open as a flow →'),Pv=N('
'),YN=N('

Arrives from

Leads to

',1),XN=N(" ",1),GN=N('

'),Ov=N(""),ZN=N(" "),UN=N(`

● The anchor is at the top, and each row down is what happens next: a line - means and then. Where the code forks both ways, a small box asks the condition once and each - line out of it answers — yes, no, a case; a lone - guard rides its line as WHEN. A call written inside another call's arguments - happens first — the token is signed before the reply that carries it — and an arm that answers, - returns or throws simply has nothing leaving it. Click a step for its sites and the whole condition; a - step is the next anchor.

`),QN=N(`

● The anchor is at the top; each row down is one more step away from - it. Click a step and each of its links is labelled at the far end of its line with the last - condition checked before it happens; hover the line, or its row here, for the whole chain and the - plumbing it travels through. A step is the next anchor, and any link opens as a Flow strip.

`),Lv=N(" ",1),JN=N(" into shared chrome.",1),$N=N('

Not drawn:

'),eI=N(''),tI=N('
What happens from

Read as: in order what it sets in motion

steps · links · depth

Most connected

',1),nI=N(''),rI=N('
');function oI(e,t){Ne(t,!0);let r=ae(null),o=ae(null),s=ae(!0),i=ae(null),a=ae(null),l=ae(null),c=ae(null),f=ae(void 0);const u=10;let h=ae(null),d=ae(null);const g=S(()=>n(h)===null?null:n(h).length>0?"screens":n(d)===null?null:n(d).length>0?"routes":"none");function p(le){const oe=new Map;for(const _e of le){const Me=oe.get(_e.routeFile)??[];Me.push(_e),oe.set(_e.routeFile,Me)}return[...oe].map(([_e,Me])=>({file:_e,entries:[...Me].sort((Fe,Xe)=>Fe.routeLine-Xe.routeLine)})).sort((_e,Me)=>Me.entries.length-_e.entries.length||_e.file.localeCompare(Me.file))}const y="codegraph-ui:steps-legend";let w=ae(un(M()));function M(){try{return localStorage.getItem(y)!=="closed"}catch{return!0}}et(()=>{try{localStorage.setItem(y,n(w)?"open":"closed")}catch{}});const I={step:FC,region:rN,fork:UC,decision:tN,stubs:KC},C=400;let T=null;function A(le){const oe=n(H)?.nodes.get(le)?.step;return!oe||!oe.node||oe.anchor?!1:(Et(cr({anchor:oe.node.id})),!0)}const D={screen:Qp},j=[4,6,8,10,12],R=S(()=>t.anchor!==null||t.symbol!==null),z=v1();et(()=>{Rn.indexTick;const le=t.anchor!==null?{anchor:t.anchor,depth:t.depth??void 0,through:t.through}:t.symbol!==null?{symbol:t.symbol,depth:t.depth??void 0,through:t.through}:null,oe=new AbortController;return L(i,null),L(a,null),L(l,null),le===null?(L(r,null),L(s,!1),L(o,null),Gh(oe.signal).then(async _e=>{if(L(h,_e.routed?_e.screens:[],!0),_e.routed){L(d,[],!0);return}const Me=await u1({limit:300},oe.signal);L(d,Me.routed?Me.entries:[],!0)}).catch(()=>{L(h,n(h)??[],!0),L(d,n(d)??[],!0)}),()=>oe.abort()):(L(s,!0),L(o,null),f1(le,oe.signal).then(_e=>{L(r,_e,!0),L(s,!1)}).catch(_e=>{oe.signal.aborted||(L(o,_e instanceof Error?_e.message:String(_e),!0),L(s,!1))}),()=>oe.abort())});const W=S(()=>t.reading??n(r)?.defaultView??"tree"),H=S(()=>n(r)===null?null:(n(W)==="order"?bN(n(r)):null)??SC(n(r))),B=S(()=>n(r)?.program!=null),k=S(()=>n(H)!==null&&n(H).layout.nodes.length<=24&&n(w)?{padding:{left:"440px",top:"32px",right:"32px",bottom:"32px"},maxZoom:1,minZoom:.4}:{padding:.1,maxZoom:1,minZoom:n(H)!==null&&n(H).regions!==null?.2:.4}),b=S(()=>n(H)===null||n(i)===null?null:rm(n(H),n(i))),E=S(()=>{if(n(H)===null||n(b)===null)return null;const le=new Set(n(b));for(const oe of n(H).layout.edges)n(b).has(oe.source)&&le.add(oe.target),n(b).has(oe.target)&&le.add(oe.source);return le}),q=S(()=>n(W)==="order"?!0:n(H)===null?!1:new Set([...n(H).edges.values()].filter(le=>le.arm!==void 0).map(le=>le.id))),O=S(()=>n(H)===null?null:Zp(n(H),n(i),n(q))),K=S(()=>n(a)?.edge.id??n(l)?.edge??null),Y=S(()=>{if(n(H)===null||n(K)===null||n(O)?.pills.has(n(K)))return null;const le=n(l)?.edge===n(K)?re(n(l).link):void 0;return Up(n(H),n(K),n(i),le,n(O)??void 0)}),G=S(()=>{if(n(H)===null)return[];const le=(n(H).regions??[]).map(oe=>({id:`region:${oe.id}`,type:"region",position:{x:oe.x,y:oe.y-32},draggable:!1,selectable:!1,connectable:!1,data:{label:oe.label,width:oe.width}}));for(const oe of n(H).decisions){const _e=oe.id.slice(0,oe.id.indexOf(" "));le.push({id:`decision:${oe.id}`,type:"decision",position:{x:oe.x,y:oe.y},draggable:!1,selectable:!1,connectable:!1,data:{label:oe.label,width:oe.width,dimmed:n(E)!==null&&!n(E).has(_e)}})}for(const oe of n(H).layout.nodes){const _e=n(H).stubs.get(oe.id);_e===void 0||_e.length===0||n(i)===oe.id||le.push({id:`stubs:${oe.id}`,type:"stubs",position:{x:oe.x,y:oe.y+oe.height},draggable:!1,selectable:!1,connectable:!1,data:{stubs:_e,width:oe.width,dimmed:n(E)!==null&&!n(E).has(oe.id)}})}return le.concat(n(H).layout.nodes.map(oe=>{const _e=n(H).forks?.get(oe.id);return _e?{id:oe.id,type:"fork",position:{x:oe.x,y:oe.y},draggable:!1,selectable:!1,connectable:!1,data:{layout:oe,fork:_e,dimmed:n(E)!==null&&!n(E).has(oe.id)}}:{id:oe.id,type:"step",position:{x:oe.x,y:oe.y},draggable:!1,selectable:!1,connectable:!1,data:{layout:oe,info:n(H).nodes.get(oe.id),project:n(r)?.project??"app",selected:n(i)===oe.id,dimmed:n(E)!==null&&!n(E).has(oe.id),onSelect:Me=>{const Fe=performance.now();T!==null&&T.id===Me&&Fe-T.at{if(n(H)===null)return[];const le=n(K);return n(H).layout.edges.filter(oe=>LC(n(H),oe,n(i),n(b)??void 0)).map(oe=>{const _e=n(b)!==null&&(n(b).has(oe.source)||n(b).has(oe.target)),Me=le===oe.id,Fe=Me||_e;return{id:oe.id,source:oe.source,target:oe.target,sourceHandle:oe.sourceHandle,targetHandle:oe.targetHandle,type:"screen",selectable:!1,deletable:!1,zIndex:Me?3:Fe?2:1,data:{edge:oe,info:n(H).edges.get(oe.id),curve:n(H).curves.get(oe.id),hot:Fe,soft:Fe&&le!==null&&!Me,focus:Me,dimmed:n(i)!==null&&!_e,pill:n(O)?.pills.get(oe.id)??(Me?n(Y):null),full:n(l)?.edge===oe.id?re(n(l).link):null,onHover:te}}})}),X=S(()=>n(i)===null||n(H)===null?null:n(H).nodes.get(n(i))??null),$=S(()=>n(i)===null||n(r)===null?null:DC(n(r),n(i))),Z=S(()=>n(a)===null||n(H)===null?null:n(H).edges.get(n(a).edge.id)??null),Q=S(()=>n(H)===null?new Map:new Map(n(H).layout.edges.map(le=>[le.id,le]))),F=S(()=>new Set(n(U).map(le=>le.id)));function J(le){return cr({anchor:t.anchor??void 0,symbol:t.anchor===null?t.symbol??void 0:void 0,depth:le.depth??t.depth??void 0,through:le.through??t.through,view:le.view??t.reading??void 0})}function te(le,oe){if(le===null||oe===null||n(c)===null){L(a,null);return}const _e=n(c).getBoundingClientRect();L(a,{edge:le,x:Math.min(oe.clientX-_e.left+14,_e.width-420),y:oe.clientY-_e.top+14},!0)}function ie(le){if(n(H)===null||n(c)===null)return;const oe=le.target;if(oe?.closest(".spill"))return;if(oe?.closest(".snode, .legend, .tip, .svelte-flow__controls")){L(a,null);return}const _e=n(f)??ge();if(!_e)return;const Me=n(c).getBoundingClientRect(),Fe={x:(le.clientX-Me.left-_e.x)/_e.zoom,y:(le.clientY-Me.top-_e.y)/_e.zoom},Xe=Yp(n(H),Fe,n(F),u/_e.zoom),dt=Xe===null?void 0:n(Q).get(Xe.id);if(!dt){L(a,null);return}L(a,{edge:dt,x:Math.min(le.clientX-Me.left+14,Me.width-420),y:le.clientY-Me.top+14},!0)}function ge(){const oe=n(c)?.querySelector(".svelte-flow__viewport")?.style.transform.match(/translate\(([-\d.]+)px,\s*([-\d.]+)px\)\s*scale\(([-\d.]+)\)/);return oe?{x:Number(oe[1]),y:Number(oe[2]),zoom:Number(oe[3])}:null}function ve(le){const oe=le===null?null:xv(le);L(l,le===null||oe===null?null:{edge:oe,link:le},!0)}function re(le){return`${n(i)!==null&&le.to===n(i)&&le.from!==n(i)?"←":"→"} ${xl(le.when)||"always"}`}function ee(le){return n(l)!==null?n(l).link.id===le.id:n(a)!==null&&xv(le)===n(a).edge.id}function ue(le){return n(H)?.nodes.get(le)?.label??n(H)?.forks?.get(le)?.label??le}function ne(le){const oe=n(r)?.steps.find(Me=>Me.id===le.from)?.node,_e=n(r)?.steps.find(Me=>Me.id===le.to)?.node;return!oe||!_e?null:Ho({from:oe.name,to:_e.name})}function fe(le,oe,_e){const Fe=le.via[le.via.length-1]?.id??_e;return Fe===null?null:cn(Fe,{line:oe.line})}function he(le){return le.slice(le.lastIndexOf("/")+1)}function ce(le){return le.args===void 0?le.text:`${le.text}(${le.args})`}var we=rI(),de=v(we),me=v(de);{var Te=le=>{var oe=MN();_(le,oe)},Pe=le=>{var oe=PN(),_e=m(v(oe),2);{var Me=rt=>{var ct=TN();_(rt,ct)},Fe=rt=>{var ct=CN();_(rt,ct)};V(_e,rt=>{n(g)==="routes"?rt(Me):rt(Fe,-1)})}var Xe=m(_e,2);{var dt=rt=>{var ct=kc(),ze=v(ct);P(()=>x(ze,`Reading ${n(h)===null?"screens":"endpoints"}…`)),_(rt,ct)},Ct=rt=>{var ct=NN();_(rt,ct)},Ht=rt=>{var ct=IN();xe(ct,21,()=>[...n(h)].sort((ze,be)=>be.outgoing+be.incoming-(ze.outgoing+ze.incoming)||ze.path.localeCompare(be.path)),ze=>ze.id,(ze,be)=>{var qe=kv(),He=v(qe),Lt=m(He),qt=v(Lt);P((Ue,Je)=>{se(qe,"href",Ue),x(He,`${n(be).path??""} `),x(qt,Je)},[()=>cr({anchor:n(be).id}),()=>n(be).component?.name??he(n(be).file)]),_(ze,qe)}),_(rt,ct)},At=rt=>{var ct=St(),ze=ye(ct);xe(ze,17,()=>p(n(d)),be=>be.file,(be,qe)=>{var He=AN(),Lt=ye(He),qt=v(Lt),Ue=v(qt),Je=m(qt),ft=v(Je),Mt=m(Lt,2);xe(Mt,21,()=>n(qe).entries,_t=>_t.routeId,(_t,bt)=>{var dn=kv(),Jt=v(dn),$e=m(Jt),We=v($e);P(Nt=>{se(dn,"href",Nt),x(Jt,`${n(bt).url??""} `),x(We,n(bt).handler)},[()=>cr({anchor:n(bt).routeId})]),_(_t,dn)}),P(()=>{x(Ue,n(qe).file),x(ft,n(qe).entries.length)}),_(be,He)}),_(rt,ct)};V(Xe,rt=>{n(g)===null?rt(dt):n(g)==="none"?rt(Ct,1):n(g)==="screens"&&n(h)!==null?rt(Ht,2):n(d)!==null&&rt(At,3)})}_(le,oe)},Le=le=>{var oe=ON(),_e=m(v(oe),2),Me=v(_e);P(()=>x(Me,n(o))),_(le,oe)},Re=le=>{var oe=LN();_(le,oe)},Be=le=>{var oe=DN(),_e=m(v(oe),4),Me=v(_e);P(Fe=>se(Me,"href",Fe),[()=>J({view:"tree"})]),_(le,oe)},je=le=>{var oe=BN(),_e=ye(oe);gl(_e,{get nodes(){return n(G)},get edges(){return n(U)},get nodeTypes(){return I},get edgeTypes(){return D},fitView:!0,get fitViewOptions(){return n(k)},minZoom:.2,maxZoom:3,nodesDraggable:!1,nodesConnectable:!1,elementsSelectable:!1,panOnDrag:!0,proOptions:{hideAttribution:!0},onpaneclick:()=>{L(i,null),L(a,null),L(l,null)},get viewport(){return n(f)},set viewport(Xe){L(f,Xe,!0)},children:(Xe,dt)=>{pl(Xe,{position:"bottom-right",showLock:!1})},$$slots:{default:!0}});var Me=m(_e,2);{var Fe=Xe=>{var dt=FN(),Ct=v(dt),Ht=v(Ct),At=v(Ht),rt=m(Ht),ct=m(Ct,2);xe(ct,17,()=>n(Z).links.slice(0,5),qe=>qe.id,(qe,He)=>{var Lt=qN(),qt=v(Lt);{var Ue=Ke=>{var Dt=RN(),Xt=m(v(Dt)),Gt=m(Xt),rn=v(Gt);P(pn=>{x(Xt,` ${pn??""} `),x(rn,`in ${n(He).trigger.in??""}`)},[()=>qn(n(He).trigger)]),_(Ke,Dt)};V(qt,Ke=>{n(He).trigger&&Ke(Ue)})}var Je=m(qt,2);{var ft=Ke=>{var Dt=zN(),Xt=v(Dt);P(Gt=>x(Xt,`via ${Gt??""}`),[()=>xc(n(He))]),_(Ke,Dt)};V(Je,Ke=>{n(He).via.length>0&&Ke(ft)})}var Mt=m(Je,2);{var _t=Ke=>{var Dt=Ec(),Xt=v(Dt);P(()=>x(Xt,`inside ${n(He).within??""}(…)`)),_(Ke,Dt)};V(Mt,Ke=>{n(He).within&&Ke(_t)})}var bt=m(Mt,2);{var dn=Ke=>{var Dt=Ec(),Xt=v(Dt);P(()=>x(Xt,`${n(He).sites.length??""} ways`)),_(Ke,Dt)};V(bt,Ke=>{n(He).sites.length>1&&Ke(dn)})}var Jt=m(bt,2),$e=v(Jt);{let Ke=S(()=>dd(n(He).when));Vs($e,()=>n(Ke))}var We=m(Jt,2);{var Nt=Ke=>{var Dt=Ec(),Xt=v(Dt);P(()=>x(Xt,n(He).label)),_(Ke,Dt)};V(We,Ke=>{n(He).label&&Ke(Nt)})}var jt=m(We,2);{var En=Ke=>{var Dt=HN(),Xt=v(Dt);{var Gt=pn=>{var In=Ws(),xs=ye(In),jo=v(xs);P(()=>x(jo,n(He).sites[0].status)),_(pn,In)};V(Xt,pn=>{n(He).sites[0].status&&pn(Gt)})}var rn=m(Xt,1,!0);P(pn=>x(rn,pn),[()=>ce(n(He).sites[0])]),_(Ke,Dt)};V(jt,Ke=>{n(He).sites[0]&&Ke(En)})}_(qe,Lt)});var ze=m(ct,2);{var be=qe=>{var He=jN(),Lt=v(He);P(()=>x(Lt,`+${n(Z).links.length-5} more`)),_(qe,He)};V(ze,qe=>{n(Z).links.length>5&&qe(be)})}P((qe,He)=>{nt(dt,`left:${n(a).x}px;top:${n(a).y}px`),x(At,qe),x(rt,` → ${He??""}`)},[()=>ue(n(Z).from),()=>ue(n(Z).to)]),_(Xe,dt)};V(Me,Xe=>{n(a)!==null&&n(Z)!==null&&Xe(Fe)})}_(le,oe)};V(me,le=>{z?n(R)?n(o)!==null?le(Le,2):n(s)&&n(r)===null?le(Re,3):n(H)!==null&&n(r)!==null&&n(W)==="order"&&!n(B)?le(Be,4):n(H)!==null&&n(r)!==null&&le(je,5):le(Pe,1):le(Te)})}var tt=m(me,2);{var Ze=le=>{{let oe=S(()=>n(W)==="order"),_e=S(()=>n(H).regions!==null);vN(le,{get project(){return n(r).project},get order(){return n(oe)},get regions(){return n(_e)},flow:!1,get open(){return n(w)},onToggle:Me=>L(w,Me,!0)})}};V(tt,le=>{n(r)!==null&&n(H)!==null&&(n(W)==="tree"||n(B))&&le(Ze)})}Wt(de,le=>L(c,le),()=>n(c));var at=m(de,2);{var Ye=le=>{var oe=nI(),_e=v(oe);{var Me=Xe=>{var dt=YN(),Ct=ye(dt),Ht=v(Ct),At=v(Ht),rt=v(At),ct=m(At,2),ze=v(ct),be=m(ze);{var qe=Se=>{var pe=wt("· where the picture starts");_(Se,pe)};V(be,Se=>{n(X).step.anchor&&Se(qe)})}var He=m(ct,2);{var Lt=Se=>{var pe=Sc(),De=m(v(pe)),Tt=m(De),ht=v(Tt);P(Ft=>{x(De,` ${Ft??""} `),x(ht,`in ${n(X).step.trigger.in??""}`)},[()=>qn(n(X).step.trigger)]),_(Se,pe)};V(He,Se=>{n(X).step.trigger&&Se(Lt)})}var qt=m(He,2);{var Ue=Se=>{var pe=Mc(),De=v(pe);Pt(De,{get kind(){return n(X).step.screen.component.kind}});var Tt=m(De);P(ht=>{se(pe,"href",ht),x(Tt,` ${n(X).step.screen.component.name??""}`)},[()=>cn(n(X).step.screen.component.id)]),_(Se,pe)},Je=Se=>{var pe=Mc(),De=v(pe);Pt(De,{get kind(){return n(X).step.node.kind}});var Tt=m(De);P(ht=>{se(pe,"href",ht),x(Tt,` ${n(X).step.node.name??""}`)},[()=>cn(n(X).step.node.id)]),_(Se,pe)};V(qt,Se=>{n(X).step.screen?.component?Se(Ue):n(X).step.node&&n(X).step.kind!=="screen"&&Se(Je,1)})}var ft=m(qt,2);{var Mt=Se=>{var pe=Mc(),De=v(pe);Pt(De,{get kind(){return n(X).step.effect.by.kind}});var Tt=m(De);P(ht=>{se(pe,"href",ht),x(Tt,` ${n(X).step.effect.by.name??""} · line ${n(X).step.effect.line??""}`)},[()=>cn(n(X).step.effect.by.id,{line:n(X).step.effect.line})]),_(Se,pe)};V(ft,Se=>{n(X).step.effect&&Se(Mt)})}var _t=m(ft,2);{var bt=Se=>{var pe=VN(),De=v(pe);P(Tt=>{se(pe,"href",Tt),x(De,n(X).step.node.file)},[()=>nn(n(X).step.node.file)]),_(Se,pe)};V(_t,Se=>{n(X).step.node&&Se(bt)})}var dn=m(_t,2);{var Jt=Se=>{var pe=WN();P(De=>se(pe,"href",De),[()=>cr({anchor:n(X).step.node.id})]),_(Se,pe)};V(dn,Se=>{n(X).step.node&&!n(X).step.anchor&&Se(Jt)})}var $e=m(Ht,2),We=m(Ct,2);{var Nt=Se=>{var pe=na(),De=v(pe);P((Tt,ht)=>x(De,`Another ${Tt??""} — a chapter of its own. Start here (or double-click its box) to see what happens on it, or continue through ${ht??""} from the summary.`),[()=>gr("screen",n(r).project,n(X).step),()=>ma("screen",n(r).project)[1]]),_(Se,pe)},jt=Se=>{var pe=KN();_(Se,pe)},En=Se=>{var pe=na(),De=v(pe);P(()=>x(De,`The walk was cut at this step (${n(X).step.cut==="depth"?"the picture’s depth":n(X).step.cut==="fan-out"?"more calls than the walk follows from one node":n(X).step.cut==="folded"?"as much plumbing as it folds from one step":"the picture’s size"}). Start here to see on.`)),_(Se,pe)};V(We,Se=>{n(X).step.cut==="screen"?Se(Nt):n(X).step.cut==="component"?Se(jt,1):n(X).step.cut!==null&&Se(En,2)})}var Ke=m(We,2);{var Dt=Se=>{var pe=Ev(),De=v(pe);P(Tt=>x(De,Tt),[()=>n(X).step.effect.apis.join(" · ")]),_(Se,pe)};V(Ke,Se=>{n(X).step.effect&&n(X).step.effect.apis.length>1&&Se(Dt)})}var Xt=m(Ke,2);{var Gt=Se=>{var pe=na(),De=v(pe);P(()=>x(De,n(X).step.effect.statuses?.length?"One way the endpoint answers — each row below is a site that sends it, with the condition it answers under; its other outcomes are the boxes beside it.":"Replies whose status the code does not spell out — each row below is one, with the condition it answers under.")),_(Se,pe)};V(Xt,Se=>{n(X).step.effect?.category==="response"&&Se(Gt)})}var rn=m(Xt,2);{var pn=Se=>{var pe=Ev(),De=v(pe);P(Tt=>x(De,`⇠ ${Tt??""}`),[()=>n(X).step.events.join(" · ")]),_(Se,pe)};V(rn,Se=>{n(X).step.events&&n(X).step.events.length>1&&Se(pn)})}var In=m(rn,2);{var xs=Se=>{var pe=na(),De=v(pe);P(()=>x(De,`${n(O).hidden??""} condition${n(O).hidden===1?"":"s"} not drawn on the picture for want of - room — hover a row below to see ${n(O).hidden===1?"it":"each"} on its line.`)),_(Se,pe)};V(In,Se=>{n(O)!==null&&n(O).hidden>0&&Se(xs)})}var jo=m(In,2),kl=m(v(jo)),Ri=v(kl),ks=m(jo,2);{var El=Se=>{var pe=kc(),De=v(pe);P(()=>x(De,n(X).step.anchor?"The anchor — the picture starts here.":"Nothing in the picture leads here.")),_(Se,pe)};V(ks,Se=>{n($).arrivesFrom.length===0&&Se(El)})}var zi=m(ks,2);xe(zi,17,()=>n($).arrivesFrom,Se=>Se.id,(Se,pe)=>{const De=S(()=>Za(n(pe).sites)),Tt=S(()=>n(r).steps.find(Oe=>Oe.id===n(pe).from)?.node?.id??null);var ht=Pv();let Ft;var $t=v(ht),mn=v($t),An=m($t,2);{var Pn=Oe=>{var Ae=Sc(),gt=m(v(Ae)),on=m(gt),Tr=v(on);P(Cr=>{x(gt,` ${Cr??""} `),x(Tr,`in ${n(pe).trigger.in??""}`)},[()=>qn(n(pe).trigger)]),_(Oe,Ae)};V(An,Oe=>{n(pe).trigger&&Oe(Pn)})}var Mr=m(An,2);{var Tl=Oe=>{var Ae=Sv(),gt=v(Ae);P(on=>x(gt,`via ${on??""}`),[()=>xc(n(pe))]),_(Oe,Ae)};V(Mr,Oe=>{n(pe).via.length>0&&Oe(Tl)})}var Ss=m(Mr,2);{var Cl=Oe=>{var Ae=ra(),gt=v(Ae);P(()=>x(gt,`inside ${n(pe).within??""}(…)`)),_(Oe,Ae)};V(Ss,Oe=>{n(pe).within&&Oe(Cl)})}var Ms=m(Ss,2);{var Nl=Oe=>{var Ae=oa(),gt=v(Ae);{let on=S(()=>Ga(n(De).common));Vs(gt,()=>n(on))}_(Oe,Ae)};V(Ms,Oe=>{n(De).common.length>0&&Oe(Nl)})}var Ts=m(Ms,2);{var Il=Oe=>{var Ae=ra(),gt=v(Ae);P(()=>x(gt,n(pe).label)),_(Oe,Ae)};V(Ts,Oe=>{n(pe).label&&Oe(Il)})}var Cs=m(Ts,2);{var Al=Oe=>{var Ae=Mv(),gt=v(Ae);P(()=>x(gt,`${n(De).rows.length??""} ways`)),_(Oe,Ae)};V(Cs,Oe=>{n(De).rows.length>1&&Oe(Al)})}var Ns=m(Cs,2);xe(Ns,17,()=>n(De).rows,Oe=>Oe.site.file+Oe.site.line,(Oe,Ae)=>{const gt=S(()=>fe(n(pe),n(Ae).site,n(Tt)));var on=Iv();let Tr;var Cr=v(on);{var Dl=It=>{var Bt=Tv(),sn=m(v(Bt));P(yn=>x(sn,` ${yn??""}`),[()=>qn(n(Ae).site.trigger)]),_(It,Bt)},Rl=S(()=>n(Ae).site.trigger&&qn(n(Ae).site.trigger)!==(n(pe).trigger?qn(n(pe).trigger):""));V(Cr,It=>{n(Rl)&&It(Dl)})}var Is=m(Cr,2);{var zl=It=>{var Bt=oa(),sn=v(Bt);{let yn=S(()=>Ua(n(Ae).rest,n(De).common.length>0));Vs(sn,()=>n(yn))}_(It,Bt)};V(Is,It=>{n(De).rows.length>1&&It(zl)})}var Hl=m(Is,2);{var ql=It=>{var Bt=Cv(),sn=v(Bt);{var yn=Kt=>{var an=Ws(),uo=ye(an),fo=v(uo);P(()=>x(fo,n(Ae).site.status)),_(Kt,an)};V(sn,Kt=>{n(Ae).site.status&&Kt(yn)})}var Gn=m(sn),lo=m(Gn),co=v(lo);P((Kt,an)=>{se(Bt,"href",n(gt)),x(Gn,`${Kt??""} `),x(co,`· ${an??""}:${n(Ae).site.line??""}`)},[()=>ce(n(Ae).site),()=>he(n(Ae).site.file)]),_(It,Bt)},jl=It=>{var Bt=Nv(),sn=v(Bt);{var yn=Kt=>{var an=Ws(),uo=ye(an),fo=v(uo);P(()=>x(fo,n(Ae).site.status)),_(Kt,an)};V(sn,Kt=>{n(Ae).site.status&&Kt(yn)})}var Gn=m(sn),lo=m(Gn),co=v(lo);P((Kt,an)=>{x(Gn,`${Kt??""} `),x(co,`· ${an??""}:${n(Ae).site.line??""}`)},[()=>ce(n(Ae).site),()=>he(n(Ae).site.file)]),_(It,Bt)};V(Hl,It=>{n(gt)?It(ql):It(jl,-1)})}P(()=>Tr=Ce(on,1,"scenario svelte-v5q9re",null,Tr,{many:n(De).rows.length>1})),_(Oe,on)});var Pl=m(Ns,2);{var Ol=Oe=>{var Ae=Av();P(gt=>se(Ae,"href",gt),[()=>ne(n(pe))]),_(Oe,Ae)},Ll=S(()=>ne(n(pe)));V(Pl,Oe=>{n(Ll)&&Oe(Ol)})}P((Oe,Ae)=>{Ft=Ce(ht,1,"row svelte-v5q9re",null,Ft,Oe),x(mn,Ae)},[()=>({hot:ee(n(pe))}),()=>ue(n(pe).from)]),Ge("mouseenter",ht,()=>ve(n(pe))),Ge("mouseleave",ht,()=>ve(null)),ke("focusin",ht,()=>ve(n(pe))),ke("focusout",ht,()=>ve(null)),ke("click",$t,()=>L(i,n(pe).from,!0)),_(Se,ht)});var Es=m(zi,2),Sl=m(v(Es)),Ml=v(Sl),it=m(Es,2);{var vt=Se=>{var pe=kc(),De=v(pe);P(()=>x(De,n(X).step.kind==="effect"?"Outside the index: the graph cannot follow it further.":n(X).step.cut==="screen"||n(X).step.cut==="component"?"Not entered — a boundary. Start here for its own picture, or continue through from the summary.":"Nothing the walk follows leaves this step.")),_(Se,pe)};V(it,Se=>{n($).leadsTo.length===0&&Se(vt)})}var xt=m(it,2);xe(xt,17,()=>n($).leadsTo,Se=>Se.id,(Se,pe)=>{const De=S(()=>Za(n(pe).sites)),Tt=S(()=>n(X).step.screen?.component?.id??n(X).step.node?.id??null);var ht=Pv();let Ft;var $t=v(ht),mn=v($t),An=m($t,2);{var Pn=Oe=>{var Ae=Sc(),gt=m(v(Ae)),on=m(gt),Tr=v(on);P(Cr=>{x(gt,` ${Cr??""} `),x(Tr,`in ${n(pe).trigger.in??""}`)},[()=>qn(n(pe).trigger)]),_(Oe,Ae)};V(An,Oe=>{n(pe).trigger&&Oe(Pn)})}var Mr=m(An,2);{var Tl=Oe=>{var Ae=Sv(),gt=v(Ae);P(on=>x(gt,`via ${on??""}`),[()=>xc(n(pe))]),_(Oe,Ae)};V(Mr,Oe=>{n(pe).via.length>0&&Oe(Tl)})}var Ss=m(Mr,2);{var Cl=Oe=>{var Ae=ra(),gt=v(Ae);P(()=>x(gt,`inside ${n(pe).within??""}(…)`)),_(Oe,Ae)};V(Ss,Oe=>{n(pe).within&&Oe(Cl)})}var Ms=m(Ss,2);{var Nl=Oe=>{var Ae=oa(),gt=v(Ae);{let on=S(()=>Ga(n(De).common));Vs(gt,()=>n(on))}_(Oe,Ae)};V(Ms,Oe=>{n(De).common.length>0&&Oe(Nl)})}var Ts=m(Ms,2);{var Il=Oe=>{var Ae=ra(),gt=v(Ae);P(()=>x(gt,n(pe).label)),_(Oe,Ae)};V(Ts,Oe=>{n(pe).label&&Oe(Il)})}var Cs=m(Ts,2);{var Al=Oe=>{var Ae=Mv(),gt=v(Ae);P(()=>x(gt,`${n(De).rows.length??""} ways`)),_(Oe,Ae)};V(Cs,Oe=>{n(De).rows.length>1&&Oe(Al)})}var Ns=m(Cs,2);xe(Ns,17,()=>n(De).rows,Oe=>Oe.site.file+Oe.site.line,(Oe,Ae)=>{const gt=S(()=>fe(n(pe),n(Ae).site,n(Tt)));var on=Iv();let Tr;var Cr=v(on);{var Dl=It=>{var Bt=Tv(),sn=m(v(Bt));P(yn=>x(sn,` ${yn??""}`),[()=>qn(n(Ae).site.trigger)]),_(It,Bt)},Rl=S(()=>n(Ae).site.trigger&&qn(n(Ae).site.trigger)!==(n(pe).trigger?qn(n(pe).trigger):""));V(Cr,It=>{n(Rl)&&It(Dl)})}var Is=m(Cr,2);{var zl=It=>{var Bt=oa(),sn=v(Bt);{let yn=S(()=>Ua(n(Ae).rest,n(De).common.length>0));Vs(sn,()=>n(yn))}_(It,Bt)};V(Is,It=>{n(De).rows.length>1&&It(zl)})}var Hl=m(Is,2);{var ql=It=>{var Bt=Cv(),sn=v(Bt);{var yn=Kt=>{var an=Ws(),uo=ye(an),fo=v(uo);P(()=>x(fo,n(Ae).site.status)),_(Kt,an)};V(sn,Kt=>{n(Ae).site.status&&Kt(yn)})}var Gn=m(sn),lo=m(Gn),co=v(lo);P((Kt,an)=>{se(Bt,"href",n(gt)),x(Gn,`${Kt??""} `),x(co,`· ${an??""}:${n(Ae).site.line??""}`)},[()=>ce(n(Ae).site),()=>he(n(Ae).site.file)]),_(It,Bt)},jl=It=>{var Bt=Nv(),sn=v(Bt);{var yn=Kt=>{var an=Ws(),uo=ye(an),fo=v(uo);P(()=>x(fo,n(Ae).site.status)),_(Kt,an)};V(sn,Kt=>{n(Ae).site.status&&Kt(yn)})}var Gn=m(sn),lo=m(Gn),co=v(lo);P((Kt,an)=>{x(Gn,`${Kt??""} `),x(co,`· ${an??""}:${n(Ae).site.line??""}`)},[()=>ce(n(Ae).site),()=>he(n(Ae).site.file)]),_(It,Bt)};V(Hl,It=>{n(gt)?It(ql):It(jl,-1)})}P(()=>Tr=Ce(on,1,"scenario svelte-v5q9re",null,Tr,{many:n(De).rows.length>1})),_(Oe,on)});var Pl=m(Ns,2);{var Ol=Oe=>{var Ae=Av();P(gt=>se(Ae,"href",gt),[()=>ne(n(pe))]),_(Oe,Ae)},Ll=S(()=>ne(n(pe)));V(Pl,Oe=>{n(Ll)&&Oe(Ol)})}P((Oe,Ae)=>{Ft=Ce(ht,1,"row svelte-v5q9re",null,Ft,Oe),x(mn,Ae)},[()=>({hot:ee(n(pe))}),()=>ue(n(pe).to)]),Ge("mouseenter",ht,()=>ve(n(pe))),Ge("mouseleave",ht,()=>ve(null)),ke("focusin",ht,()=>ve(n(pe))),ke("focusout",ht,()=>ve(null)),ke("click",$t,()=>L(i,n(pe).to,!0)),_(Se,ht)}),P(Se=>{x(rt,n(X).label),x(ze,Se),x(Ri,n($).arrivesFrom.length),x(Ml,n($).leadsTo.length)},[()=>gr(n(X).step.kind,n(r).project,n(X).step)]),ke("click",$e,()=>L(i,null)),_(Xe,dt)},Fe=Xe=>{var dt=tI(),Ct=ye(dt),Ht=v(Ct),At=v(Ht),rt=m(v(At)),ct=v(rt),ze=m(At,2),be=v(ze);Pt(be,{get kind(){return n(r).anchor.kind}});var qe=m(be),He=m(ze,2),Lt=v(He),qt=m(Ct,2);{var Ue=it=>{var vt=GN(),xt=v(vt),Se=m(xt);xe(Se,19,()=>n(r).ambiguous,pe=>pe.id,(pe,De,Tt)=>{var ht=XN(),Ft=ye(ht);{var $t=Pn=>{var Mr=wt(",");_(Pn,Mr)};V(Ft,Pn=>{n(Tt)>0&&Pn($t)})}var mn=m(Ft,2),An=v(mn);P((Pn,Mr)=>{se(mn,"href",Pn),x(An,`${n(De).kind??""} in ${Mr??""}`)},[()=>cr({anchor:n(De).id}),()=>he(n(De).file)]),_(pe,ht)}),P(()=>x(xt,`${n(r).ambiguous.length??""} other symbol${n(r).ambiguous.length===1?"":"s"} share this name: `)),_(it,vt)};V(qt,it=>{n(r).ambiguous.length>0&&it(Ue)})}var Je=m(qt,2),ft=m(v(Je));let Mt;var _t=m(ft,2);let bt;var dn=m(Je,2),Jt=v(dn),$e=v(Jt),We=m(Jt,2),Nt=v(We),jt=m(We,2),En=v(jt);xe(En,16,()=>j,it=>it,(it,vt)=>{var xt=Ov(),Se=v(xt),pe={};P(De=>{x(Se,vt),pe!==(pe=De)&&(xt.value=(xt.__value=De)??"")},[()=>String(vt)]),_(it,xt)});var Ke=m(En);{var Dt=it=>{var vt=Ov(),xt=v(vt),Se={};P(pe=>{x(xt,n(r).depth),Se!==(Se=pe)&&(vt.value=(vt.__value=pe)??"")},[()=>String(n(r).depth)]),_(it,vt)},Xt=S(()=>!j.includes(n(r).depth));V(Ke,it=>{n(Xt)&&it(Dt)})}var Gt;ci(jt);var rn=m(dn,2),pn=v(rn),In=v(pn),xs=m(In),jo=m(pn,2),kl=v(jo),Ri=m(rn,2);xe(Ri,20,()=>["screen","trigger","bridge","event","store","effect"],it=>it,(it,vt)=>{var xt=St(),Se=ye(xt);{var pe=De=>{const Tt=S(()=>ma(vt,n(r).project));var ht=ZN(),Ft=v(ht),$t=v(Ft),mn=m(Ft);P(()=>{x($t,n(H).counts[vt]),x(mn,` ${(n(H).counts[vt]===1?n(Tt)[0]:n(Tt)[1])??""}`)}),_(De,ht)};V(Se,De=>{n(H).counts[vt]>0&&De(pe)})}_(it,xt)});var ks=m(Ri,2);{var El=it=>{var vt=UN();_(it,vt)},zi=it=>{var vt=QN();_(it,vt)};V(ks,it=>{n(W)==="order"?it(El):it(zi,-1)})}var Es=m(ks,2);{var Sl=it=>{var vt=$N(),xt=m(v(vt));{var Se=Ft=>{var $t=Lv(),mn=ye($t),An=v(mn),Pn=m(mn);P(()=>{x(An,n(r).truncated.steps),x(Pn,` step${n(r).truncated.steps===1?"":"s"} past the picture’s size limit;`)}),_(Ft,$t)};V(xt,Ft=>{n(r).truncated.steps>0&&Ft(Se)})}var pe=m(xt,2);{var De=Ft=>{var $t=Lv(),mn=ye($t),An=v(mn),Pn=m(mn);P(()=>{x(An,n(r).truncated.hubs),x(Pn,` walk${n(r).truncated.hubs===1?"":"s"} that reached a hub;`)}),_(Ft,$t)};V(pe,Ft=>{n(r).truncated.hubs>0&&Ft(De)})}var Tt=m(pe,2);{var ht=Ft=>{var $t=JN(),mn=ye($t),An=v(mn);P(()=>x(An,n(r).truncated.chrome)),_(Ft,$t)};V(Tt,Ft=>{n(r).truncated.chrome>0&&Ft(ht)})}_(it,vt)};V(Es,it=>{(n(r).truncated.steps>0||n(r).truncated.hubs>0||n(r).truncated.chrome>0)&&it(Sl)})}var Ml=m(Es,4);xe(Ml,17,()=>[...n(r).steps].sort((it,vt)=>(n(H).layout.nodes.find(xt=>xt.id===vt.id)?.ports.top.length??0)+(n(H).layout.nodes.find(xt=>xt.id===vt.id)?.ports.bottom.length??0)-((n(H).layout.nodes.find(xt=>xt.id===it.id)?.ports.top.length??0)+(n(H).layout.nodes.find(xt=>xt.id===it.id)?.ports.bottom.length??0))).slice(0,8),it=>it.id,(it,vt)=>{var xt=eI(),Se=v(xt),pe=m(Se),De=v(pe);P((Tt,ht)=>{x(Se,`${Tt??""} `),x(De,ht)},[()=>n(H).nodes.get(n(vt).id)?.label??n(vt).label,()=>gr(n(vt).kind,n(r).project,n(vt))]),ke("click",xt,()=>L(i,n(vt).id,!0)),_(it,xt)}),P((it,vt,xt,Se,pe,De,Tt)=>{x(ct,n(r).anchor.name),se(ze,"href",it),x(qe,` ${n(r).anchor.qualifiedName??""}`),se(He,"href",vt),x(Lt,n(r).anchor.file),Mt=Ce(ft,1,"tab svelte-v5q9re",null,Mt,{on:n(W)==="order"}),se(ft,"href",xt),bt=Ce(_t,1,"tab svelte-v5q9re",null,bt,{on:n(W)==="tree"}),se(_t,"href",Se),x($e,n(r).steps.length),x(Nt,n(r).links.length),Gt!==(Gt=pe)&&(jt.value=(jt.__value=pe)??"",No(jt,pe)),Bh(In,n(r).through),x(xs,` Continue through ${De??""}`),x(kl,`— otherwise another ${Tt??""} is drawn as a boundary, and is a click from being the next anchor.`)},[()=>cn(n(r).anchor.id),()=>nn(n(r).anchor.file),()=>J({view:"order"}),()=>J({view:"tree"}),()=>String(n(r).depth),()=>ma("screen",n(r).project)[1],()=>gr("screen",n(r).project)]),ke("change",jt,it=>Et(J({depth:Number(it.currentTarget.value)}))),ke("change",In,it=>Et(J({through:it.currentTarget.checked}))),_(Xe,dt)};V(_e,Xe=>{n(X)!==null&&n($)!==null?Xe(Me):Xe(Fe,-1)})}_(le,oe)};V(at,le=>{n(r)!==null&&n(H)!==null&&le(Ye)})}ke("mousemove",de,ie),Ge("mouseleave",de,()=>L(a,null)),_(e,we),Ie()}mt(["mousemove","click","focusin","focusout","change"]);var sI=N(''),iI=N(" "),aI=N('
'),lI=N('
'),cI=N('

'),uI=N('
');function dI(e,t){Ne(t,!0);let r=S(()=>t.data.card),o=S(()=>n(r).hop),s=S(()=>n(o).source),i=S(()=>{const A=new Map,D=n(o).callRef;return D&&A.set(D.line,[{ident:D.name,col:D.col,targetId:D.targetId,uncertain:!1,outside:!1,title:D.backwards?`${n(o).node.name} calls ${D.name} here`:`calls ${D.name}`}]),A}),a=S(()=>n(s)?.lines?sl(n(s).lines,n(s).from,n(s).highlight):new Map),l=S(()=>n(s)?.lines?n(s).lines.map((A,D)=>{const j=n(s).from+D,R=n(a).get(j)??[{cls:"other",text:A,col:0}],z=ol(R,n(i).get(j)??[]);return{n:j,call:j===n(o).callRef?.line||j===n(r).stopLine,parts:R.map((W,H)=>{const B=z.get(H)??null;return{text:W.text,cls:B?null:ju(W.cls),ref:B}})}}):[]);var c=uI();let f;var u=v(c);kn(u,{type:"target",get position(){return Ve.Left},id:"in",isConnectable:!1});var h=m(u,2);kn(h,{type:"source",get position(){return Ve.Right},id:"out",isConnectable:!1});var d=m(h,2),g=v(d);Pt(g,{get kind(){return n(o).node.kind}});var p=m(g,2),y=v(p),w=m(p,2),M=v(w),I=m(d,2);{var C=A=>{var D=lI();xe(D,21,()=>n(l),j=>j.n,(j,R)=>{var z=aI();let W;var H=v(z),B=v(H),k=m(H,2);xe(k,21,()=>n(R).parts,Kn,(b,E)=>{var q=St(),O=ye(q);{var K=U=>{var X=sI(),$=v(X);P(()=>{se(X,"title",n(E).ref.title),x($,n(E).text)}),ke("click",X,()=>t.data.onFollow(n(r))),_(U,X)},Y=U=>{var X=iI(),$=v(X);P(()=>{Ce(X,1,zo(n(E).cls),"svelte-1c9ldo3"),x($,n(E).text)}),_(U,X)},G=U=>{var X=wt();P(()=>x(X,n(E).text)),_(U,X)};V(O,U=>{n(E).ref?U(K):n(E).cls?U(Y,1):U(G,-1)})}_(b,q)}),P(()=>{W=Ce(z,1,"ln svelte-1c9ldo3",null,W,{call:n(R).call}),x(B,n(R).n)}),_(j,z)}),_(A,D)},T=A=>{var D=cI(),j=v(D);P(()=>x(j,n(s)?.drift?"Changed on disk after the last index sync — source is not shown.":n(s)?.reason??"Source outside this slice or this index.")),_(A,D)};V(I,A=>{n(l).length>0?A(C):A(T,-1)})}P(A=>{f=Ce(c,1,"card svelte-1c9ldo3",null,f,{cur:t.data.current,dim:t.data.dimmed}),nt(c,`width:${n(r).width}px;height:${n(r).height}px`),x(y,n(o).node.name),x(M,`${A??""}:${n(o).node.line??""}`)},[()=>gn(n(o).node.file)]),ke("click",d,()=>t.data.onOpen(n(r))),_(e,c),Ie()}mt(["click"]);var fI=Yt(""),Dv=Yt(' '),vI=Yt(" ",1);function hI(e,t){const r=S(()=>t.data),o=S(()=>{if(Math.abs(t.sourceY-t.targetY)<.5)return`M${t.sourceX},${t.sourceY} L${t.targetX},${t.targetY}`;const C=(t.sourceX+t.targetX)/2;return`M${t.sourceX},${t.sourceY} C${C},${t.sourceY} ${C},${t.targetY} ${t.targetX},${t.targetY}`}),s=S(()=>`${t.targetX-10},${t.targetY-4} ${t.targetX-2},${t.targetY} ${t.targetX-10},${t.targetY+4}`),i=S(()=>(t.sourceX+t.targetX)/2),a=S(()=>(t.sourceY+t.targetY)/2),l=S(()=>n(r).link.dash?`stroke-dasharray:${n(r).link.dash}`:""),c=S(()=>n(r).link.labelLines);var f=vI(),u=ye(f);{let C=S(()=>`flink${n(r).dimmed?" dimmed":""}`);qo(u,{get path(){return n(o)},get class(){return n(C)},get style(){return n(l)}})}var h=m(u);{var d=C=>{var T=fI();P(()=>{Ce(T,0,`fhead${n(r).dimmed?" dimmed":""}`,"svelte-1gtjqth"),se(T,"points",n(s))}),_(C,T)};V(h,C=>{n(r).link.cap||C(d)})}var g=m(h),p=v(g),y=v(p),w=m(p);xe(w,17,()=>n(c),Kn,(C,T,A)=>{var D=Dv(),j=v(D);P(()=>{se(D,"x",n(i)),se(D,"y",n(a)-8-(n(c).length-1-A)*13),x(j,n(T))}),_(C,D)});var M=m(w);{var I=C=>{var T=Dv(),A=v(T);P(()=>{se(T,"x",n(i)),se(T,"y",n(a)+17),x(A,n(r).link.lineLabel)}),_(C,T)};V(M,C=>{n(r).link.lineLabel&&C(I)})}P(()=>{Ce(g,0,`flabel${n(r).dimmed?" dimmed":""}`,"svelte-1gtjqth"),x(y,`${n(r).link.label??""}${n(r).link.lineLabel?` (${n(r).link.lineLabel})`:""}`)}),_(e,f)}var gI=N('

key

'),Rv=N('

'),pI=N(''),mI=N('

',1),_I=N('

'),yI=N('

'),wI=N(''),bI=N('

'),zv=N('

'),xI=N('

Where the graph stops.

');function kI(e,t){Ne(t,!0);let r=S(()=>t.data.cap),o=S(()=>ld(n(r).boundary));var s=xI();let i;var a=v(s);kn(a,{type:"target",get position(){return Ve.Left},id:"in",isConnectable:!1});var l=m(a,2),c=m(v(l)),f=m(l,2);xe(f,17,()=>n(o).sites,Kn,(I,C)=>{var T=_I(),A=v(T),D=v(A),j=m(A,2);{var R=k=>{var b=gI(),E=m(v(b)),q=v(E);P(()=>x(q,n(C).key)),_(k,b)};V(j,k=>{n(C).key!==null&&k(R)})}var z=m(j,2);xe(z,16,()=>n(C).notes,k=>k,(k,b)=>{var E=Rv(),q=v(E);P(()=>x(q,b)),_(k,E)});var W=m(z,2);{var H=k=>{var b=mI(),E=ye(b),q=v(E),O=m(E,2);xe(O,17,()=>n(C).candidates,K=>K.node.id,(K,Y)=>{var G=pI(),U=v(G),X=v(U),$=m(U,2),Z=v($);P(Q=>{x(X,n(Y).display),x(Z,`${Q??""}:${n(Y).node.line??""}`)},[()=>gn(n(Y).node.file)]),ke("click",G,()=>t.data.onOpen(n(Y).node.id)),_(K,G)}),P(()=>x(q,n(C).candidateHeading)),_(k,b)},B=k=>{var b=Rv(),E=v(b);P(()=>x(E,n(C).candidateNote)),_(k,b)};V(W,k=>{n(C).candidateHeading!==null?k(H):n(C).candidateNote!==null&&k(B,1)})}P(()=>x(D,n(C).headline)),_(I,T)});var u=m(f,2);{var h=I=>{var C=yI(),T=v(C);P(()=>x(T,n(o).quiet)),_(I,C)};V(u,I=>{n(o).quiet!==null&&I(h)})}var d=m(u,2);{var g=I=>{var C=bI(),T=v(C),A=v(T),D=m(T,2);xe(D,17,()=>n(o).uncertain,j=>j.node.id,(j,R)=>{var z=wI(),W=v(z),H=v(W),B=m(W,2),k=v(B);P(b=>{x(H,n(R).node.name),x(k,b)},[()=>n(R).confidence===null?"":n(R).confidence.toFixed(2)]),ke("click",z,()=>t.data.onOpen(n(R).node.id)),_(j,z)}),P(()=>x(A,n(o).uncertainHeading)),_(I,C)};V(d,I=>{n(o).uncertainHeading!==null&&I(g)})}var p=m(d,2);{var y=I=>{var C=zv(),T=v(C);P(()=>x(T,n(o).further)),_(I,C)};V(p,I=>{n(o).further!==null&&I(y)})}var w=m(p,2);{var M=I=>{var C=zv(),T=v(C);P(()=>x(T,n(o).missed)),_(I,C)};V(w,I=>{n(o).missed!==null&&I(M)})}P(()=>{i=Ce(s,1,"endcap svelte-1f3e7uq",null,i,{dim:t.data.dimmed}),nt(s,`width:${n(r).width}px;min-height:${n(r).height}px`),x(c,` ${n(o).intro??""}`)}),_(e,s),Ie()}mt(["click"]);var Hv=N(""),EI=N(''),SI=N('

'),MI=N('

The flow could not be built

'),TI=N('

Following the calls…

'),CI=N('

Nothing to follow yet

Ask for a path in the search box — “how does execute reach getFile”, or execute -> getFile — or walk a trail and read it as a flow.

'),NI=N('

Asked: to .

'),II=N('

No path between them

'),AI=N('

'),PI=N('This path runs through the one in .',1),OI=N('

'),LI=N('

names nothing in this index.

'),DI=N('
'),RI=N('

Flow

');function zI(e,t){Ne(t,!0);let r=ae(null),o=ae(null),s=ae(!0),i=ae(null),a=ae(!1);const l="all-paths",c={x:0,y:0,zoom:1},f={flow:dI,cap:kI},u={flow:hI},h=S(()=>t.trailParam?Ou(t.trailParam):[]);et(()=>{const Q=t.trailParam?{trail:n(h).map(te=>`${te.dir==="start"?"s":te.dir==="up"?"u":"d"}${te.id}`)}:t.symbols?{symbols:t.symbols}:{from:t.from??"",to:t.to??""};if(!t.trailParam&&!t.symbols&&!(t.from&&t.to)){L(r,null),L(s,!1),L(o,null);return}Rn.indexTick;const F=new AbortController;L(s,!0),L(o,null);const J=n(i);return g1(Q,F.signal).then(te=>{L(r,te,!0),L(i,te.flows.some(ie=>ie.id===J)?J:te.flows[0]?.id??null,!0),L(s,!1)}).catch(te=>{F.signal.aborted||(L(o,te instanceof Error?te.message:String(te),!0),L(s,!1))}),()=>F.abort()});const d=S(()=>n(r)?.flows??[]),g=S(()=>n(a)?n(d):n(d).filter(Q=>Q.id===n(i)).slice(0,1)),p=S(()=>n(g).length===0?null:$4(n(a)?n(d):n(g),n(i))),y=S(()=>n(d).find(Q=>Q.id===n(i))??n(d)[0]??null),w=S(()=>n(p)===null?[]:[...n(p).endCaps.map(F=>({id:F.id,type:"cap",position:{x:F.x,y:F.y},draggable:!1,selectable:!1,connectable:!1,data:{cap:F,dimmed:n(a)&&n(i)!==null&&!F.flows.includes(n(i)),onOpen:C}})),...n(p).cards.map(F=>({id:F.id,type:"flow",position:{x:F.x,y:F.y},draggable:!1,selectable:!1,connectable:!1,data:{card:F,current:n(a)&&F.step>=0,dimmed:n(a)&&F.step<0,onOpen:I,onFollow:T}}))]),M=S(()=>n(p)===null?[]:n(p).links.map(Q=>({id:Q.id,source:Q.source,target:Q.target,sourceHandle:"out",targetHandle:"in",type:"flow",selectable:!1,deletable:!1,data:{link:Q,dimmed:n(a)&&n(i)!==null&&!Q.flows.includes(n(i))}})));function I(Q){const F=n(y)?.hops??[],J=F.findIndex(ie=>ie.node.id===Q.id),te=J>=0?F.slice(0,J+1):[];zt.clear(),te.forEach((ie,ge)=>zt.push({id:ie.node.id,name:ie.node.name,kind:ie.node.kind,dir:ge===0?"start":ie.edge?.upward?"up":"down"})),te.length===0&&zt.push({id:Q.id,name:Q.hop.node.name,kind:Q.hop.node.kind,dir:"start"}),Et(cn(Q.id,{trail:Rr(zt.hops),...Q.hop.callRef?{line:Q.hop.callRef.line}:{}}))}function C(Q){zt.clear(),Et(cn(Q))}function T(Q){const F=Q.hop.callRef?.targetId;if(!F)return;const J=n(p)?.cards.find(te=>te.id===F);J&&I(J)}function A(Q){return Q.query.kind==="trail"?"Your trail, read as a flow: each card is opened at the line that carried you to the next one.":Q.flows.some(F=>F.partial)?"No static path connects them. The card is where the looking stopped — a call whose target is chosen at runtime — and the cap names the form, the key and who could be on the other side.":Q.query.kind==="directed"?"Every card is a call the graph recorded. A dashed link is a hop no one can see in the source — a callback, an interface, a re-render — and it names where it was wired.":"The longest call path among the symbols you named, the same one codegraph_explore leads with."}const D=S(()=>n(a)&&n(d).length>1?`all ${n(d).length} paths`:n(y)?.label??"flow");function j(Q){if(n(p)===null)throw new Error("There is no strip to export yet.");const F=n(y)?.hops.length??0;return dT(n(p),{scale:Q,activeFlowId:n(i),showAll:n(a),caption:n(a)?n(D):`${n(D)}${F>1?` · ${F} hops`:""}`})}var R=RI(),z=v(R),W=m(v(z),2);{var H=Q=>{var F=EI(),J=v(F);xe(J,17,()=>n(d),ve=>ve.id,(ve,re)=>{var ee=Hv(),ue=v(ee),ne={};P(()=>{x(ue,`${n(re).label??""}${n(re).hops.length>1?` · ${n(re).hops.length} hops`:""}`),ne!==(ne=n(re).id)&&(ee.value=(ee.__value=n(re).id)??"")}),_(ve,ee)});var te=m(J);{var ie=ve=>{var re=Hv(),ee=v(re);re.value=re.__value=l,P(()=>x(ee,`All ${n(d).length??""} paths`)),_(ve,re)};V(te,ve=>{n(d).length>1&&ve(ie)})}var ge;ci(F),P(()=>{ge!==(ge=n(a)?l:n(i)??"")&&(F.value=(F.__value=n(a)?l:n(i)??"")??"",No(F,n(a)?l:n(i)??""))}),ke("change",F,ve=>{const re=ve.currentTarget.value;L(a,re===l),n(a)||L(i,re,!0)}),_(Q,F)};V(W,Q=>{n(d).length>0&&Q(H)})}var B=m(W,2);{var k=Q=>{var F=SI(),J=v(F);P(te=>x(J,te),[()=>A(n(r))]),_(Q,F)};V(B,Q=>{n(r)&&Q(k)})}var b=m(B,2);{var E=Q=>{{let F=S(()=>Hp("flow",n(D)));Lp(Q,{build:j,get filename(){return n(F)}})}};V(b,Q=>{n(p)!==null&&Q(E)})}var q=m(z,2),O=v(q);{var K=Q=>{var F=MI(),J=m(v(F),2),te=v(J);P(()=>x(te,n(o))),_(Q,F)},Y=Q=>{var F=TI();_(Q,F)},G=Q=>{var F=CI();_(Q,F)},U=Q=>{var F=II(),J=m(v(F),2),te=v(J),ie=m(J,2);{var ge=ve=>{var re=NI(),ee=m(v(re)),ue=v(ee),ne=m(ee,2),fe=v(ne);P(()=>{x(ue,n(r).query.from),x(fe,n(r).query.to)}),_(ve,re)};V(ie,ve=>{n(r).query.from&&n(r).query.to&&ve(ge)})}P(()=>x(te,n(r).reason)),_(Q,F)},X=Q=>{gl(Q,{get nodes(){return n(w)},get edges(){return n(M)},get nodeTypes(){return f},get edgeTypes(){return u},get initialViewport(){return c},fitViewOptions:{padding:.1,maxZoom:1,minZoom:.2},minZoom:.2,maxZoom:1.4,nodesDraggable:!1,nodesConnectable:!1,elementsSelectable:!1,panOnDrag:!0,proOptions:{hideAttribution:!0},children:(F,J)=>{pl(F,{position:"bottom-right",showLock:!1})},$$slots:{default:!0}})};V(O,Q=>{n(o)!==null?Q(K):n(s)&&n(r)===null?Q(Y,1):n(r)===null?Q(G,2):n(p)===null?Q(U,3):Q(X,-1)})}var $=m(q,2);{var Z=Q=>{var F=DI(),J=v(F);{var te=ve=>{var re=AI(),ee=v(re);P(()=>x(ee,n(r).reason)),_(ve,re)};V(J,ve=>{n(r).reason!==null&&ve(te)})}var ie=m(J,2);xe(ie,17,()=>n(r).ambiguous,ve=>ve.token,(ve,re)=>{var ee=OI(),ue=v(ee),ne=v(ue),fe=m(ue),he=m(fe);{var ce=de=>{var me=PI(),Te=m(ye(me)),Pe=v(Te);P(Le=>x(Pe,`${Le??""}:${n(re).chosen.line??""}`),[()=>gn(n(re).chosen.file)]),_(de,me)},we=de=>{var me=wt("None of them are on this path.");_(de,me)};V(he,de=>{n(re).chosen?de(ce):de(we,-1)})}P(()=>{x(ne,n(re).token),x(fe,` names ${n(re).others.length+1} definitions. `)}),_(ve,ee)});var ge=m(ie,2);xe(ge,16,()=>n(r).unresolved,ve=>ve,(ve,re)=>{var ee=LI(),ue=v(ee),ne=v(ue);P(()=>x(ne,re)),_(ve,ee)}),_(Q,F)};V($,Q=>{n(r)&&(n(r).reason!==null||n(r).ambiguous.length>0||n(r).unresolved.length>0)&&n(p)!==null&&Q(Z)})}_(e,R),Ie()}mt(["change"]);var HI=N(' '),qI=N(" "),qv=N(' '),jI=N(''),FI=N(' '),BI=N(''),VI=N('
'),WI=N('
'),KI=N('

'),YI=N('

');function XI(e,t){Ne(t,!0);var r=YI(),o=v(r),s=v(o),i=v(s),a=m(s,2),l=v(a),c=m(o,2),f=v(c),u=m(c,2);xe(u,17,()=>t.section.groups,g=>g.path,(g,p)=>{var y=WI(),w=v(y),M=v(w);{var I=j=>{var R=HI(),z=v(R);P(W=>{se(R,"href",W),se(R,"title",n(p).file),x(z,n(p).path)},[()=>nn(n(p).file)]),_(j,R)},C=j=>{var R=qI(),z=v(R);P(()=>{se(R,"title",n(p).path),x(z,n(p).path)}),_(j,R)};V(M,j=>{n(p).file?j(I):j(C,-1)})}var T=m(M,2),A=v(T),D=m(w,2);xe(D,17,()=>n(p).rows,j=>j.id,(j,R)=>{var z=VI();let W;var H=v(z);Pt(H,{get kind(){return n(R).kind}});var B=m(H,2),k=v(B),b=v(k);{var E=U=>{var X=jI(),$=v(X);{var Z=F=>{var J=qv(),te=v(J);P(()=>x(te,n(R).method)),_(F,J)};V($,F=>{n(R).method&&F(Z)})}var Q=m($,1,!0);P(()=>{se(X,"title",n(R).title),se(X,"data-entry-row",n(R).id),x(Q,n(R).name)}),ke("click",X,()=>t.onopen(n(R))),_(U,X)},q=U=>{var X=FI(),$=v(X);{var Z=F=>{var J=qv(),te=v(J);P(()=>x(te,n(R).method)),_(F,J)};V($,F=>{n(R).method&&F(Z)})}var Q=m($,1,!0);P(()=>{se(X,"title",n(R).title),x(Q,n(R).name)}),_(U,X)};V(b,U=>{n(R).target?U(E):U(q,-1)})}var O=m(b,2);{var K=U=>{const X=S(()=>t.armed===null?"Flow ›":t.armed===n(R).id?"Cancel":"→ here");var $=BI(),Z=v($);P(()=>{se($,"title",t.armed===null?`Start a flow from ${n(R).flowFrom}`:t.armed===n(R).id?"Stop drawing a flow from here":`Draw the path that ends at ${n(R).flowFrom}`),se($,"data-entry-flow",n(R).id),x(Z,n(X))}),ke("click",$,()=>t.onflow(n(R))),_(U,$)};V(O,U=>{n(R).flowFrom&&U(K)})}var Y=m(k,2),G=v(Y);P(()=>{W=Ce(z,1,"row svelte-skxuyu",null,W,{armed:t.armed===n(R).id,stub:!n(R).target}),x(G,n(R).meta)}),_(j,z)}),P(()=>x(A,n(p).rows.length)),_(g,y)});var h=m(u,2);{var d=g=>{var p=KI(),y=v(p);P(()=>x(y,`Showing ${t.section.shown??""} of ${t.section.floor?"at least ":""}${t.section.total??""} — the rest are in - the index, not on this list.`)),_(g,p)};V(h,g=>{t.section.shown{se(r,"aria-labelledby",`entry-${t.section.id}`),se(s,"id",`entry-${t.section.id}`),x(i,t.section.title),x(l,t.section.meta),x(f,t.section.note)}),_(e,r),Ie()}mt(["click"]);var GI=N('
or pick the other end with → here
'),jv=N('

'),ZI=N('

Reading the graph…

'),UI=N('
'),QI=N('

Entry points

Flow › to draw the path from it to a second symbol.

');function JI(e,t){Ne(t,!0);let r=Ee(t,"project",3,null);et(()=>{yt.ensureEntries()});let o=S(()=>G1(yt.entries)),s=ae(null),i=ae(""),a=ae(null);et(()=>{const R=n(s)?.id;R&&!n(o).rows.some(z=>z.id===R)&&L(s,null)});function l(R){Du(R.target)}function c(R,z){const W=Rd(R,z);W&&(L(s,null),L(i,""),Et(Ho(W)))}function f(R){if(R.flowFrom){if(n(s)===null){L(s,{id:R.id,name:R.flowFrom},!0),L(i,""),queueMicrotask(()=>n(a)?.focus());return}if(n(s).id===R.id){L(s,null);return}c(n(s).name,R.flowFrom)}}function u(R){R.key==="Escape"&&(R.preventDefault(),L(s,null))}var h=QI(),d=v(h),g=m(v(d),2),p=v(g),y=m(d,2);{var w=R=>{var z=GI(),W=v(z),H=v(W),B=m(W,4);Wt(B,E=>L(a,E),()=>n(a));var k=m(B,2),b=m(k,2);P(E=>{x(H,n(s).name),se(B,"aria-label",`The symbol ${n(s).name} should reach`),k.disabled=E},[()=>Rd(n(s).name,n(i))===null]),ke("keydown",B,u),Ge("keypress",B,E=>{E.key==="Enter"&&n(s)&&c(n(s).name,n(i))}),Iu(B,()=>n(i),E=>L(i,E)),ke("click",k,()=>n(s)&&c(n(s).name,n(i))),ke("click",b,()=>L(s,null)),_(R,z)};V(y,R=>{n(s)&&R(w)})}var M=m(y,2),I=v(M);hg(I,{hideWhenEmpty:!1});var C=m(M,2);{var T=R=>{var z=jv(),W=v(z);P(()=>x(W,`Could not read the entry points — ${yt.entriesFailure??""}`)),_(R,z)},A=R=>{var z=ZI();_(R,z)},D=R=>{var z=jv(),W=v(z);P(()=>x(W,n(o).empty)),_(R,z)},j=R=>{var z=UI();xe(z,21,()=>n(o).sections,W=>W.id,(W,H)=>{{let B=S(()=>n(s)?.id??null);XI(W,{get section(){return n(H)},get armed(){return n(B)},onopen:l,onflow:f})}}),_(R,z)};V(C,R=>{yt.entriesFailure?R(T):yt.entriesSettled?n(o).empty?R(D,2):R(j,-1):R(A,1)})}P(()=>x(p,`Where a flow starts${r()?` in ${r()}`:""} — every list below is read out of the - graph, not guessed from a filename. Open a row to read the code, or use `)),_(e,h),Ie()}mt(["keydown","click"]);const $I="No static reference in the index — dynamic use is possible.";function om(e,t){return e===1?t:`${t}s`}function eA(e){if(!e)return"";const{rows:t}=e;if(t.total===0)return"Nothing on this list.";const r=e.groups.reduce((s,i)=>s+i.lines,0);return`${t.truncated?`${t.shown} of ${t.total} ${om(t.total,"symbol")}`:st(t.total,"symbol")} in ${st(e.groups.length,"file")} · ${st(r,"line")}`}function tA(e){return!e||e.candidates===0?"":`${e.candidates.toLocaleString()} ${om(e.candidates,"symbol")} in this index carry no incoming reference at all; ${e.excludedTotal.toLocaleString()} of them were left off this list.`}function nA(e){return e?e.excluded.map(t=>`${t.count.toLocaleString()} ${t.label}`):[]}function rA(e){const t=[Qh(e.kind),st(e.lines,"line")];return e.members.total>0&&t.push(`${st(e.members.total,"member")} unreachable with it`),t.join(" · ")}function oA(e){const t=[st(e.rows.length,"symbol"),st(e.lines,"line")];return e.generated&&t.push("generated"),t.join(" · ")}function sA(e){return e.candidates===0?"Every symbol in this index is referenced by something. Nothing to show.":e.includeExported?`Every one of the ${e.candidates.toLocaleString()} symbols with no incoming reference has a reason to be reachable anyway — see the list of exclusions below.`:`All ${e.candidates.toLocaleString()} symbols with no incoming reference are either reachable from outside this repository or excluded for the reasons below. Turn on "including exported" to see the ones the index cannot check.`}var Fv=N('

'),iA=N('

Reading the graph…

'),aA=N(`

Exported symbols are on this list. Nothing in this repository references them, but anything - outside it can — a published package, another service, a script. Read each one before you - believe it.

`),lA=N('exported'),cA=N(' '),uA=N(' '),dA=N('
'),fA=N(''),vA=N(''),hA=N('

',1),gA=N("
  • "),pA=N('
      '),mA=N(`

      The rows were not checked against the text of the files that can reach them, so a - reference the extractor did not record would not have been caught.

      `),_A=N(`

      The scan stopped at its cap — this index holds more unreferenced symbols than were - considered.

      `),yA=N('

      '),wA=N('

      ',1),bA=N(`

      Dead code

      Symbols no import, call or reference in this index reaches, largest first. Everything below - is what the graph can see; the notes under the list are what it cannot.

      `);function xA(e,t){Ne(t,!0);let r=Ee(t,"exported",3,!1),o=ae(null),s=ae(null),i=ae(!0);et(()=>{const A=r();Rn.indexTick;const D=new AbortController;return L(i,!0),L(s,null),c1({includeExported:A},D.signal).then(j=>{L(o,j,!0),L(i,!1)}).catch(j=>{D.signal.aborted||(L(s,j instanceof Yn?j.message:"The list could not be read.",!0),L(i,!1))}),()=>D.abort()});let a=S(()=>eA(n(o))),l=S(()=>tA(n(o))),c=S(()=>nA(n(o)));function f(A){Et(cn(A.id,{line:A.line}))}var u=bA(),h=m(v(u),2),d=v(h),g=v(d),p=m(d,2);let y;var w=v(p),M=m(h,2);{var I=A=>{var D=Fv(),j=v(D);P(()=>x(j,`Could not read the list — ${n(s)??""}`)),_(A,D)},C=A=>{var D=iA();_(A,D)},T=A=>{var D=wA(),j=ye(D);{var R=$=>{var Z=aA();_($,Z)};V(j,$=>{r()&&$(R)})}var z=m(j,2);{var W=$=>{var Z=Fv(),Q=v(Z);P(F=>x(Q,F),[()=>sA(n(o))]),_($,Z)},H=$=>{var Z=hA(),Q=ye(Z),F=v(Q),J=m(Q,2);xe(J,21,()=>n(o).groups,te=>te.file,(te,ie)=>{var ge=vA();let ve;var re=v(ge),ee=v(re),ue=v(ee),ne=m(ee,2),fe=v(ne),he=m(re,2);xe(he,17,()=>n(ie).rows,ce=>ce.id,(ce,we)=>{var de=fA(),me=v(de);Pt(me,{get kind(){return n(we).kind}});var Te=m(me,2),Pe=v(Te),Le=v(Pe),Re=v(Le),Be=m(Le,2),je=v(Be),tt=m(Be,2);{var Ze=_e=>{var Me=lA();_(_e,Me)};V(tt,_e=>{n(we).exported&&_e(Ze)})}var at=m(Pe,2),Ye=v(at),le=m(at,2);{var oe=_e=>{var Me=dA(),Fe=v(Me);xe(Fe,17,()=>n(we).members.items,Ct=>Ct.id,(Ct,Ht)=>{var At=cA(),rt=v(At);P(ct=>{se(At,"href",ct),x(rt,n(Ht).name)},[()=>cn(n(Ht).id)]),_(Ct,At)});var Xe=m(Fe,2);{var dt=Ct=>{var Ht=uA(),At=v(Ht);P(()=>x(At,`+${n(we).members.total-n(we).members.shown} more`)),_(Ct,Ht)};V(Xe,Ct=>{n(we).members.truncated&&Ct(dt)})}_(_e,Me)};V(le,_e=>{n(we).members.items.length>0&&_e(oe)})}P((_e,Me)=>{se(Le,"title",n(we).qualifiedName),se(Le,"data-dead-row",n(we).id),x(Re,n(we).name),se(Be,"href",_e),x(je,`${n(we).file??""}:${n(we).line??""}`),x(Ye,Me)},[()=>nn(n(ie).file,{source:!0,line:n(we).line}),()=>rA(n(we))]),ke("click",Le,()=>f(n(we))),_(ce,de)}),P((ce,we)=>{ve=Ce(ge,1,"filegroup svelte-186vr2",null,ve,{gen:n(ie).generated}),se(ee,"href",ce),se(ee,"title",n(ie).file),x(ue,n(ie).file),x(fe,we)},[()=>nn(n(ie).file),()=>oA(n(ie))]),_(te,ge)}),P(()=>x(F,n(a))),_($,Z)};V(z,$=>{n(o).groups.length===0?$(W):$(H,-1)})}var B=m(z,2),k=v(B),b=v(k),E=m(k,2);{var q=$=>{var Z=pA();xe(Z,20,()=>n(c),Q=>Q,(Q,F)=>{var J=gA(),te=v(J);P(()=>x(te,F)),_(Q,J)}),_($,Z)};V(E,$=>{n(c).length>0&&$(q)})}var O=m(E,2);{var K=$=>{var Z=mA();_($,Z)};V(O,$=>{n(o).corroborated||$(K)})}var Y=m(O,2);{var G=$=>{var Z=_A();_($,Z)};V(Y,$=>{n(o).bounded&&$(G)})}var U=m(Y,2);{var X=$=>{var Z=yA(),Q=v(Z);P(()=>x(Q,`Showing ${n(o).rows.shown??""} of ${n(o).rows.total??""} — the rest are in the index, not on - this list.`)),_($,Z)};V(U,$=>{n(o).rows.truncated&&$(X)})}P(()=>x(b,n(l))),_(A,D)};V(M,A=>{n(s)?A(I):n(i)&&n(o)===null?A(C,1):n(o)&&A(T,2)})}P(A=>{x(g,$I),y=Ce(p,1,"toggle svelte-186vr2",null,y,{on:r()}),se(p,"href",A),se(p,"title",r()?"Back to symbols nothing outside this repository could import either":"Also list symbols something outside this repository could import — the index cannot check those"),x(w,r()?"Including exported":"Internal only")},[()=>Sa({exported:!r()})]),ke("click",p,A=>{A.preventDefault(),Et(Sa({exported:!r()}))}),_(e,u),Ie()}mt(["click"]);var kA=N('

      No such view

      does not match a view. Try the start.

      ');function EA(e,t){var r=kA(),o=v(r),s=m(v(o),2),i=v(s),a=v(i);P(()=>x(a,`#${t.path??""}`)),_(e,r)}var SA=N('
      '),MA=N('
      ');function TA(e,t){Ne(t,!1),Wh();var r=MA(),o=v(r);{var s=i=>{var a=SA(),l=v(a);P(()=>x(l,no.message)),_(i,a)};V(o,i=>{no.message&&i(s)})}_(e,r),Ie()}var CA=N('
      ',1);function NA(e,t){Ne(t,!0),et(()=>{Ar.ensure()}),et(()=>{Rn.start()});let r=Rn.indexTick;et(()=>{const z=Rn.indexTick;Ut(()=>{z!==r&&(r=z,Ar.reload(),yt.reloadEntries(),Rt.reload(),no.show("Index updated · reloaded"))})});let o=ae(null),s=S(()=>ti.route),i=S(()=>(Ar.stats?.graph.edgesByKind.navigates??0)>0);et(()=>{const z=ti.route,W=ti.params.get("t");Ut(()=>{zt.hydrate(W),z.view==="symbol"&&z.id!==null&&zt.current?.id!==z.id&&zt.push({id:z.id})})}),et(()=>{zt.hops.length,x1()});function a(z){return z instanceof HTMLElement?z.isContentEditable||z instanceof HTMLInputElement||z instanceof HTMLTextAreaElement||z instanceof HTMLSelectElement:!1}function l(z){if(!z.defaultPrevented){if((z.metaKey||z.ctrlKey)&&z.key.toLowerCase()==="k"){z.preventDefault(),n(o)?.focusSearch();return}if(!(z.metaKey||z.ctrlKey||z.altKey)&&!a(z.target))switch(z.key){case"/":z.preventDefault(),n(o)?.focusSearch();break;case"m":z.preventDefault(),Et(ei());break;case"f":z.preventDefault(),Et(Ho());break;case"e":z.preventDefault(),Et(Pu());break;case"s":z.preventDefault(),Et(Kh());break;case"d":z.preventDefault(),Et(Sa());break;case"Backspace":case"[":z.preventDefault(),J_();break}}}var c=CA();Ge("keydown",fn,l);var f=ye(c);Wt(Iy(f,{get project(){return Ar.name},get stats(){return Ar.summary},get showScreens(){return n(i)}}),z=>L(o,z,!0),()=>n(o));var u=m(f,2);Jy(u,{});var h=m(u,2),d=v(h);{var g=z=>{Zw(z,{get id(){return n(s).id},get line(){return n(s).line}})},p=z=>{wx(z,{get path(){return n(s).path},get line(){return n(s).line}})},y=z=>{xb(z,{get path(){return n(s).path},get line(){return n(s).line}})},w=z=>{MT(z,{get root(){return n(s).root},get depth(){return n(s).depth},get tests(){return n(s).tests}})},M=z=>{zI(z,{get from(){return n(s).from},get to(){return n(s).to},get symbols(){return n(s).symbols},get trailParam(){return n(s).trail}})},I=z=>{JI(z,{get project(){return Ar.name}})},C=z=>{_C(z,{})},T=z=>{oI(z,{get anchor(){return n(s).anchor},get symbol(){return n(s).symbol},get depth(){return n(s).depth},get through(){return n(s).through},get reading(){return n(s).reading}})},A=z=>{xA(z,{get exported(){return n(s).exported}})},D=z=>{EA(z,{get path(){return n(s).path}})},j=z=>{v0(z,{get project(){return Ar.name}})};V(d,z=>{n(s).view==="symbol"&&n(s).id!==null?z(g):n(s).view==="file"&&n(s).source?z(p,1):n(s).view==="file"?z(y,2):n(s).view==="map"?z(w,3):n(s).view==="flow"?z(M,4):n(s).view==="entry"?z(I,5):n(s).view==="screens"||n(s).view==="home"&&n(i)?z(C,6):n(s).view==="steps"?z(T,7):n(s).view==="dead"?z(A,8):n(s).view==="unknown"?z(D,9):z(j,-1)})}var R=m(h,2);TA(R,{}),_(e,c),Ie()}const sm=document.getElementById("app");if(!sm)throw new Error("codegraph ui: #app host element is missing from index.html");N_(NA,{target:sm}); diff --git a/crates/codegraph-ui/viewer/assets/index-CQkoLDwl.css b/crates/codegraph-ui/viewer/assets/index-CQkoLDwl.css new file mode 100644 index 0000000..381d28c --- /dev/null +++ b/crates/codegraph-ui/viewer/assets/index-CQkoLDwl.css @@ -0,0 +1 @@ +@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(./inter-cyrillic-ext-wght-normal-BOeWTOD4.woff2) format("woff2-variations");unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(./inter-cyrillic-wght-normal-DqGufNeO.woff2) format("woff2-variations");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(./inter-greek-ext-wght-normal-DlzME5K_.woff2) format("woff2-variations");unicode-range:U+1F00-1FFF}@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(./inter-greek-wght-normal-CkhJZR-_.woff2) format("woff2-variations");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(./inter-vietnamese-wght-normal-CBcvBZtf.woff2) format("woff2-variations");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(./inter-latin-ext-wght-normal-DO1Apj_S.woff2) format("woff2-variations");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(./inter-latin-wght-normal-Dx4kXJAl.woff2) format("woff2-variations");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(./jetbrains-mono-cyrillic-ext-wght-normal-EocZY2iu.woff2) format("woff2-variations");unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(./jetbrains-mono-cyrillic-wght-normal-D73BlboJ.woff2) format("woff2-variations");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(./jetbrains-mono-greek-wght-normal-Bw9x6K1M.woff2) format("woff2-variations");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(./jetbrains-mono-vietnamese-wght-normal-Bt-aOZkq.woff2) format("woff2-variations");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(./jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2) format("woff2-variations");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:JetBrains Mono Variable;font-style:normal;font-display:swap;font-weight:100 800;src:url(./jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2) format("woff2-variations");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}:root{--bg: #ebeef4;--rail: #e4e8f0;--panel: #ffffff;--card: #f7f8fb;--raised: #eef1f6;--overlay: #ffffff;--line: #d8dde7;--line-strong: #bcc4d3;--line-faint: #e6e9f0;--fg: #1a2130;--fg-2: #434d62;--fg-3: #5f687c;--fg-4: #98a1b3;--primary: #4155ee;--primary-2: #7640ed;--primary-soft: #e9edff;--primary-line: #b9c3f6;--primary-ink: #3340aa;--primary-deep: #4c5fe8;--primary-2-deep: #7a4fe6;--on-primary: #ffffff;--cyan: #0b7280;--cyan-soft: #dcf2f5;--cyan-line: #8accd6;--green: #187648;--green-soft: #ddf3e7;--green-deep: #1f9a5e;--amber: #975a00;--amber-soft: #fbeed6;--red: #bf332b;--red-soft: #fbe4e2;--violet: #7747df;--violet-soft: #efe8fd;--syn-kw: #7444da;--syn-str: #1b7943;--syn-num: #a15717;--syn-com: #626a7d;--syn-type: #0d7487;--syn-punct: #5f6a7e;--sh-card: 0 4px 14px 0 rgb(16 24 40 / 8%);--sh-pop: 0 12px 32px 0 rgb(16 24 40 / 16%);--glow-blur: 14px;--glow-k: .6;--glow-data-blur: 6px;--glow-data-k: .5;--canvas-base: var(--card);--dots: #d3d9e4;--ambient-1: #c7d0ff;--ambient-2: #e0d2ff;color-scheme:light dark}@media(prefers-color-scheme:dark){:root:not([data-theme=light]){--bg: #0a0c10;--rail: #0d1016;--panel: #10141b;--card: #151a23;--raised: #1b2130;--overlay: #1f2636;--line: #232a38;--line-strong: #303a4d;--line-faint: #191f29;--fg: #e8ecf4;--fg-2: #a9b2c4;--fg-3: #838da0;--fg-4: #4a5468;--primary: #7c93ff;--primary-2: #a07cff;--primary-soft: #1a2140;--primary-line: #3b4a8c;--primary-ink: #b9c6ff;--primary-deep: #4465ff;--primary-2-deep: #7f4eff;--on-primary: #ffffff;--cyan: #3dd6e8;--cyan-soft: #0e2a31;--cyan-line: #1f5966;--green: #3fd68e;--green-soft: #0e2a1f;--green-deep: #2bb673;--amber: #f5b544;--amber-soft: #2e240e;--red: #f2706b;--red-soft: #2f1517;--violet: #b48cff;--violet-soft: #231a3d;--syn-kw: #b79cff;--syn-str: #8fd9a8;--syn-num: #f5b57a;--syn-com: #808aa2;--syn-type: #7fcfe6;--syn-punct: #8c96ab;--sh-card: 0 6px 20px 0 rgb(0 0 0 / 32%);--sh-pop: 0 16px 40px 0 rgb(0 0 0 / 50%);--glow-blur: 18px;--glow-k: 1;--glow-data-blur: 8px;--glow-data-k: 1;--canvas-base: var(--panel);--dots: #2c3445;--ambient-1: #3a4ca8;--ambient-2: #553f9e;color-scheme:dark}}:root[data-theme=dark],[data-theme=dark]{--bg: #0a0c10;--rail: #0d1016;--panel: #10141b;--card: #151a23;--raised: #1b2130;--overlay: #1f2636;--line: #232a38;--line-strong: #303a4d;--line-faint: #191f29;--fg: #e8ecf4;--fg-2: #a9b2c4;--fg-3: #838da0;--fg-4: #4a5468;--primary: #7c93ff;--primary-2: #a07cff;--primary-soft: #1a2140;--primary-line: #3b4a8c;--primary-ink: #b9c6ff;--primary-deep: #4465ff;--primary-2-deep: #7f4eff;--on-primary: #ffffff;--cyan: #3dd6e8;--cyan-soft: #0e2a31;--cyan-line: #1f5966;--green: #3fd68e;--green-soft: #0e2a1f;--green-deep: #2bb673;--amber: #f5b544;--amber-soft: #2e240e;--red: #f2706b;--red-soft: #2f1517;--violet: #b48cff;--violet-soft: #231a3d;--syn-kw: #b79cff;--syn-str: #8fd9a8;--syn-num: #f5b57a;--syn-com: #808aa2;--syn-type: #7fcfe6;--syn-punct: #8c96ab;--sh-card: 0 6px 20px 0 rgb(0 0 0 / 32%);--sh-pop: 0 16px 40px 0 rgb(0 0 0 / 50%);--glow-blur: 18px;--glow-k: 1;--glow-data-blur: 8px;--glow-data-k: 1;--canvas-base: var(--panel);--dots: #2c3445;--ambient-1: #3a4ca8;--ambient-2: #553f9e;color-scheme:dark}[data-theme=light]{--bg: #ebeef4;--rail: #e4e8f0;--panel: #ffffff;--card: #f7f8fb;--raised: #eef1f6;--overlay: #ffffff;--line: #d8dde7;--line-strong: #bcc4d3;--line-faint: #e6e9f0;--fg: #1a2130;--fg-2: #434d62;--fg-3: #5f687c;--fg-4: #98a1b3;--primary: #4155ee;--primary-2: #7640ed;--primary-soft: #e9edff;--primary-line: #b9c3f6;--primary-ink: #3340aa;--primary-deep: #4c5fe8;--primary-2-deep: #7a4fe6;--on-primary: #ffffff;--cyan: #0b7280;--cyan-soft: #dcf2f5;--cyan-line: #8accd6;--green: #187648;--green-soft: #ddf3e7;--green-deep: #1f9a5e;--amber: #975a00;--amber-soft: #fbeed6;--red: #bf332b;--red-soft: #fbe4e2;--violet: #7747df;--violet-soft: #efe8fd;--syn-kw: #7444da;--syn-str: #1b7943;--syn-num: #a15717;--syn-com: #626a7d;--syn-type: #0d7487;--syn-punct: #5f6a7e;--sh-card: 0 4px 14px 0 rgb(16 24 40 / 8%);--sh-pop: 0 12px 32px 0 rgb(16 24 40 / 16%);--glow-blur: 14px;--glow-k: .6;--glow-data-blur: 6px;--glow-data-k: .5;--canvas-base: var(--card);--dots: #d3d9e4;--ambient-1: #c7d0ff;--ambient-2: #e0d2ff;color-scheme:light}:root,[data-theme]{--sans: "Inter Variable", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;--mono: "JetBrains Mono Variable", "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;--code-size: 12.5px;--code-lh: 20px;--t-display: 600 24px / 31.92px var(--sans);--t-h1: 600 20px / 28px var(--sans);--t-h2: 600 15px / 22.05px var(--sans);--t-label: 600 13px / 17.94px var(--sans);--t-body: 400 13px / 20.02px var(--sans);--t-body-500: 500 13px / 20.02px var(--sans);--t-small: 400 12px / 15.96px var(--sans);--t-small-500: 500 12px / 15.96px var(--sans);--t-micro: 600 10.5px / 13.97px var(--sans);--t-caption: 400 11px / 13.97px var(--sans);--t-big-num: 600 22px / 27.94px var(--sans);--t-title-mono: 600 20px / 28px var(--mono);--t-code: 400 12.5px / 20px var(--mono);--t-mono: 400 12px / 15.96px var(--mono);--t-mono-500: 500 12px / 15.96px var(--mono);--t-mono-sm: 400 11px / 13.97px var(--mono);--t-kbd: 500 10.5px / 13.97px var(--mono);--t-tile: 700 10px / 12px var(--mono);--t-lineno: 400 11px / 20px var(--mono);--glow-20: 0 0 var(--glow-blur) 0 color-mix(in srgb, var(--primary) calc(20% * var(--glow-k)), transparent);--glow-22: 0 0 var(--glow-blur) 0 color-mix(in srgb, var(--primary) calc(22% * var(--glow-k)), transparent);--glow-25: 0 0 var(--glow-blur) 0 color-mix(in srgb, var(--primary) calc(25% * var(--glow-k)), transparent);--glow-30: 0 0 var(--glow-blur) 0 color-mix(in srgb, var(--primary) calc(30% * var(--glow-k)), transparent);--glow-35: 0 0 var(--glow-blur) 0 color-mix(in srgb, var(--primary) calc(35% * var(--glow-k)), transparent);--glow-40: 0 0 var(--glow-blur) 0 color-mix(in srgb, var(--primary) calc(40% * var(--glow-k)), transparent);--glow-45: 0 0 var(--glow-blur) 0 color-mix(in srgb, var(--primary) calc(45% * var(--glow-k)), transparent);--glow-50: 0 0 var(--glow-blur) 0 color-mix(in srgb, var(--primary) calc(50% * var(--glow-k)), transparent);--glow-55: 0 0 var(--glow-blur) 0 color-mix(in srgb, var(--primary) calc(55% * var(--glow-k)), transparent);--glow-cyan-45: 0 0 var(--glow-data-blur) 0 color-mix(in srgb, var(--cyan) calc(45% * var(--glow-data-k)), transparent);--glow-cyan-55: 0 0 var(--glow-data-blur) 0 color-mix(in srgb, var(--cyan) calc(55% * var(--glow-data-k)), transparent);--glow-cyan-60: 0 0 var(--glow-data-blur) 0 color-mix(in srgb, var(--cyan) calc(60% * var(--glow-data-k)), transparent);--glow-cyan-80: 0 0 var(--glow-data-blur) 0 color-mix(in srgb, var(--cyan) calc(80% * var(--glow-data-k)), transparent);--glow-cyan-90: 0 0 var(--glow-data-blur) 0 color-mix(in srgb, var(--cyan) calc(90% * var(--glow-data-k)), transparent);--glow-green-60: 0 0 var(--glow-data-blur) 0 color-mix(in srgb, var(--green) calc(60% * var(--glow-data-k)), transparent);--glow-green-80: 0 0 var(--glow-data-blur) 0 color-mix(in srgb, var(--green) calc(80% * var(--glow-data-k)), transparent);--glow-cyan-45-f: drop-shadow(0 0 calc(var(--glow-data-blur) / 2) color-mix(in srgb, var(--cyan) calc(45% * var(--glow-data-k)), transparent));--glow-cyan-55-f: drop-shadow(0 0 calc(var(--glow-data-blur) / 2) color-mix(in srgb, var(--cyan) calc(55% * var(--glow-data-k)), transparent));--glow-cyan-60-f: drop-shadow(0 0 calc(var(--glow-data-blur) / 2) color-mix(in srgb, var(--cyan) calc(60% * var(--glow-data-k)), transparent));--glow-cyan-80-f: drop-shadow(0 0 calc(var(--glow-data-blur) / 2) color-mix(in srgb, var(--cyan) calc(80% * var(--glow-data-k)), transparent));--glow-cyan-90-f: drop-shadow(0 0 calc(var(--glow-data-blur) / 2) color-mix(in srgb, var(--cyan) calc(90% * var(--glow-data-k)), transparent));--glow-50-f: drop-shadow(0 0 calc(var(--glow-blur) / 2) color-mix(in srgb, var(--primary) calc(50% * var(--glow-k)), transparent));--grad-brand: linear-gradient(90deg, var(--primary), var(--primary-2));--grad-brand-v: linear-gradient(180deg, var(--primary), var(--primary-2));--grad-brand-d: linear-gradient(to bottom right, var(--primary), var(--primary-2));--grad-button: linear-gradient(to bottom right, var(--primary-deep), var(--primary-2-deep));--grad-data: linear-gradient(90deg, var(--cyan), var(--primary));--grad-green: linear-gradient(90deg, var(--green-deep), var(--green));--canvas: radial-gradient(ellipse 34% 60% at 10% 6%, color-mix(in srgb, var(--ambient-1) 35%, transparent), transparent), radial-gradient(ellipse 28% 50% at 95% 98%, color-mix(in srgb, var(--ambient-2) 35%, transparent), transparent), radial-gradient(circle, var(--dots) 1.05px, transparent 1.6px) 0 0 / 20px 20px, var(--canvas-base);--paper: var(--panel);--paper-2: var(--raised);--press: var(--raised);--press-2: var(--line);--ink: var(--fg);--ink-2: var(--fg-2);--ink-3: var(--fg-3);--ink-4: var(--fg-4);--rule: var(--line-strong);--rule-soft: var(--line);--rule-faint: var(--line-faint);--accent: var(--primary);--accent-soft: var(--primary-soft);--accent-line: var(--primary-line);--accent-ink: var(--primary-ink);--code-comment: var(--syn-com);--xy-background-color: transparent;--xy-background-pattern-color: var(--dots);--xy-edge-stroke: var(--line-strong);--xy-edge-stroke-selected: var(--cyan);--xy-edge-stroke-width: 1;--xy-connectionline-stroke: var(--fg-3);--xy-node-color: var(--fg);--xy-node-background-color: var(--card);--xy-node-border: 1px solid var(--line);--xy-node-boxshadow-hover: none;--xy-node-boxshadow-selected: none;--xy-selection-background-color: color-mix(in srgb, var(--primary-soft) 60%, transparent);--xy-selection-border: 1px solid var(--primary-line);--xy-handle-background-color: transparent;--xy-handle-border-color: transparent;--xy-controls-button-background-color: var(--overlay);--xy-controls-button-background-color-hover: var(--raised);--xy-controls-button-color: var(--fg-2);--xy-controls-button-color-hover: var(--fg);--xy-controls-button-border-color: var(--line);--xy-controls-box-shadow: var(--sh-pop);--xy-minimap-background-color: var(--overlay);--xy-minimap-mask-background-color: color-mix(in srgb, var(--bg) 60%, transparent);--xy-minimap-node-background-color: var(--line-strong);--xy-minimap-node-stroke-color: var(--fg-3);--xy-attribution-background-color: transparent;--xy-resize-background-color: var(--primary);--xy-error-color: var(--red)}html,body{height:100%}body{margin:0;background:var(--bg);color:var(--fg);font:var(--t-body);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}*,*:before,*:after{box-sizing:border-box}a{color:inherit;text-decoration:none}button{font:inherit;color:inherit;background:none;border:0;padding:0;cursor:pointer}input,select,textarea{font:inherit;color:inherit}h1,h2,h3{font-weight:600;text-wrap:balance}*,*:before,*:after{font-variant-ligatures:none!important}:focus-visible{outline:2px solid var(--primary);outline-offset:3px;box-shadow:var(--glow-45)}::selection{background:color-mix(in srgb,var(--primary) 30%,transparent)}::-webkit-scrollbar{width:10px;height:10px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{border:3px solid transparent;border-radius:999px;background:var(--line-strong) padding-box}::-webkit-scrollbar-thumb:hover{background:var(--grad-brand-v) padding-box}::-webkit-scrollbar-corner{background:transparent}@supports not selector(::-webkit-scrollbar){*{scrollbar-width:thin;scrollbar-color:var(--line-strong) transparent}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{transition:none!important;animation:none!important;scroll-behavior:auto!important}}:root{--nav-w: 64px;--topbar-h: 56px;--trailbar-h: 40px;--gap: 8px;--island-r: 12px}#app{height:100vh;height:100dvh;display:grid;grid-template-columns:var(--nav-w) minmax(0,1fr);grid-template-rows:var(--topbar-h) auto minmax(0,1fr);grid-template-areas:"nav top" "nav trail" "nav main";background:var(--bg)}@media(max-width:1023px){:root{--nav-w: 56px;--topbar-h: 52px;--trailbar-h: 36px}}@media(max-width:599px){:root{--nav-w: 0px;--topbar-h: 56px;--trailbar-h: 40px}#app{grid-template-columns:minmax(0,1fr);grid-template-rows:var(--topbar-h) auto minmax(0,1fr) auto;grid-template-areas:"top" "trail" "main" "tabs"}}.navbtn{position:relative;display:inline-flex;width:40px;height:40px;align-items:center;justify-content:center;border-radius:8px;color:var(--fg-3);transition:background-color .12s,color .12s}.navbtn:hover{background:var(--raised);color:var(--fg)}.navbtn.active{background:var(--primary-soft);color:var(--primary-ink)}.navbtn[data-tip]:after{position:absolute;top:50%;left:calc(100% + 12px);z-index:50;padding:6px 10px;border:1px solid var(--line-strong);border-radius:8px;background:var(--overlay);box-shadow:var(--sh-pop);color:var(--fg);content:attr(data-tip);font:var(--t-small-500);opacity:0;pointer-events:none;transform:translateY(-50%);transition:opacity .12s;white-space:nowrap}.navbtn[data-tip]:hover:after,.navbtn[data-tip]:focus-visible:after{opacity:1}.navbtn[aria-expanded=true]:after{opacity:0}@media(max-width:1023px){.navbtn{width:36px;height:36px}}.island{min-width:0;min-height:0;overflow:hidden;border:1px solid var(--line-faint);border-radius:var(--island-r);background:var(--panel)}.islands{display:grid;gap:var(--gap);height:100%;min-height:0}.island-h{display:flex;align-items:center;gap:8px;min-height:52px;padding:0 16px;font:var(--t-label)}.island-h .count{display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:20px;padding:0 7px;border-radius:10px;background:var(--raised);color:var(--fg-2);font:var(--t-mono-sm)}.mono{font-family:var(--mono)}.dim{color:var(--fg-3)}.tnum{font-variant-numeric:tabular-nums}.micro{color:var(--fg-3);font:var(--t-micro);letter-spacing:.6px;text-transform:uppercase}.pill{display:inline-flex;align-items:center;gap:6px;height:22px;padding:0 9px;border-radius:11px;background:var(--raised);color:var(--fg-2);font:var(--t-small-500);white-space:nowrap}.pill.bordered{border:1px solid var(--line)}.pill.mono{font:var(--t-mono-sm)}.pill.primary{background:var(--primary-soft);color:var(--primary-ink)}.pill.cyan{background:var(--cyan-soft);color:var(--cyan)}.pill.green{background:var(--green-soft);color:var(--green)}.pill.amber{background:var(--amber-soft);color:var(--amber)}.pill.red{background:var(--red-soft);color:var(--red)}.pill.violet{background:var(--violet-soft);color:var(--violet)}.pill .dot{width:6px;height:6px;flex:0 0 auto;border-radius:50%;background:currentColor}.pill.green .dot{box-shadow:var(--glow-green-60)}.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;height:30px;padding:0 12px;border:1px solid transparent;border-radius:8px;color:var(--fg-2);font:var(--t-small-500);white-space:nowrap;transition:background-color .12s,border-color .12s,box-shadow .12s}.btn:hover:not(:disabled){background:var(--raised);color:var(--fg)}.btn:active:not(:disabled){background:var(--overlay)}.btn.primary{background:var(--grad-button);box-shadow:var(--glow-35);color:var(--on-primary)}.btn.primary:hover:not(:disabled){background:var(--grad-button);box-shadow:var(--glow-55);color:var(--on-primary)}.btn.primary:active:not(:disabled){box-shadow:none}.btn.secondary{border-color:var(--line);background:var(--raised);color:var(--fg)}.btn.secondary:hover:not(:disabled){border-color:var(--line-strong);background:var(--overlay)}.btn.secondary:active:not(:disabled){background:var(--card)}.btn:disabled{cursor:default;opacity:.4;box-shadow:none}.btn.lg{height:32px}.iconbtn{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;flex:0 0 auto;border:1px solid transparent;border-radius:8px;color:var(--fg-3);transition:background-color .12s,color .12s}.iconbtn:hover{background:var(--raised);color:var(--fg)}.iconbtn.bordered{border-color:var(--line)}.iconbtn.active{background:var(--primary-soft);color:var(--primary-ink)}.kbd{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 5px;border:1px solid var(--line-strong);border-radius:5px;background:var(--overlay);color:var(--fg-2);font:var(--t-kbd)}.stat{position:relative;display:flex;min-width:0;min-height:64px;flex-direction:column;gap:2px;padding:12px 14px 16px;border:1px solid var(--line);border-radius:10px;background:var(--card)}.stat .label{color:var(--fg-3);font:var(--t-micro);letter-spacing:.6px;text-transform:uppercase}.stat .value{color:var(--fg);font:var(--t-big-num);font-variant-numeric:tabular-nums}.stat .value small{margin-left:4px;color:var(--fg-3);font:var(--t-small)}.bar{position:relative;display:block;height:4px;overflow:hidden;border-radius:2px;background:var(--raised)}.bar>i{position:absolute;inset:0 auto 0 0;border-radius:2px;background:var(--grad-data)}.bar.green>i{background:var(--grad-green)}.bar.brand>i{background:var(--grad-brand)}.stat .bar{position:absolute;right:14px;bottom:10px;left:14px}.skeleton{display:block;height:12px;border-radius:6px;background:var(--raised);animation:skeleton-pulse 1.4s ease-in-out infinite}@keyframes skeleton-pulse{50%{opacity:.55}}.callout{display:flex;align-items:center;gap:10px;min-height:36px;padding:9px 14px;border-radius:10px;background:var(--raised);color:var(--fg-2);font:var(--t-small)}.callout.amber{background:var(--amber-soft);color:var(--amber)}.callout.violet{background:var(--violet-soft);color:var(--fg)}.callout a{text-decoration:underline;text-underline-offset:2px}.emptystate{max-width:64ch;padding:32px;color:var(--fg-2);font:var(--t-body)}.emptystate h2{margin:0 0 8px;color:var(--fg);font:var(--t-h2)}.emptystate p{margin:0 0 10px}.emptystate code{padding:1px 6px;border-radius:5px;background:var(--raised);color:var(--fg);font:var(--t-mono-sm)}.errorcard{display:grid;grid-template-columns:40px minmax(0,1fr);gap:14px;max-width:640px;margin:24px;padding:20px;border:1px solid var(--line);border-radius:12px;background:var(--card);box-shadow:var(--sh-card);color:var(--fg-2)}.errorcard .tile{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:12px;background:var(--red-soft);color:var(--red)}.errorcard h2{margin:0 0 6px;color:var(--fg);font:var(--t-h2)}.errorcard p{margin:0 0 8px}.errorcard .actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}.icon.svelte-13so817{display:inline-block;flex:0 0 auto;background-color:currentColor;mask-position:center;mask-repeat:no-repeat;mask-size:contain;-webkit-mask-position:center;-webkit-mask-repeat:no-repeat;-webkit-mask-size:contain}.brand.svelte-13pjwcg{display:inline-flex;flex:0 0 auto;align-items:center;justify-content:center;background:var(--grad-brand-d);box-shadow:var(--glow-35);color:var(--on-primary)}svg.svelte-13pjwcg{display:block}.k.svelte-rzcbio{display:inline-flex;flex:0 0 auto;align-items:center;justify-content:center;background:var(--raised);color:var(--fg-2);font-family:var(--mono);font-weight:700;font-variant-ligatures:none;line-height:1;user-select:none}.k.cyan.svelte-rzcbio{background:var(--cyan-soft);color:var(--cyan)}.k.primary.svelte-rzcbio{background:var(--primary-soft);color:var(--primary-ink)}.k.green.svelte-rzcbio{background:var(--green-soft);color:var(--green)}.k.amber.svelte-rzcbio{background:var(--amber-soft);color:var(--amber)}.k.violet.svelte-rzcbio{background:var(--violet-soft);color:var(--violet)}.k.wide.svelte-rzcbio{letter-spacing:-.04em}.head.svelte-14dv3uy{display:flex;align-items:baseline;gap:8px;padding:8px 8px 4px;color:var(--fg-3);font:var(--t-micro);letter-spacing:.6px;text-transform:uppercase}.head-note.svelte-14dv3uy{overflow:hidden;color:var(--fg-4);font:var(--t-caption);letter-spacing:0;text-overflow:ellipsis;text-transform:none;white-space:nowrap}.row.svelte-14dv3uy{display:grid;width:100%;min-height:40px;align-items:center;margin:0 0 4px;padding:0 10px;border:1px solid var(--line-faint);border-radius:8px;background:var(--card);color:var(--fg);gap:10px;grid-template-columns:20px minmax(0,1fr) auto;text-align:left}.row.svelte-14dv3uy:hover{border-color:var(--line);background:var(--raised)}.row.sel.svelte-14dv3uy{border-color:var(--primary-line);background:var(--primary-soft);box-shadow:var(--glow-20)}.row.sel.svelte-14dv3uy .nm:where(.svelte-14dv3uy){color:var(--primary-ink)}.mid.svelte-14dv3uy{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.nm.svelte-14dv3uy{font:var(--t-mono-500)}.nm.gen.svelte-14dv3uy{color:var(--fg-4)}.sig.svelte-14dv3uy{margin-left:8px;color:var(--fg-3);font:var(--t-mono-sm)}.loc.svelte-14dv3uy{color:var(--fg-3);font:var(--t-mono-sm);white-space:nowrap}.panel.svelte-5pgva5{position:absolute;z-index:40;top:42px;right:0;left:0;display:flex;max-height:min(480px,calc(100vh - 80px));flex-direction:column;gap:2px;overflow:auto;padding:8px;border:1px solid var(--line-strong);border-radius:12px;background:var(--overlay);box-shadow:var(--sh-pop)}.hint.svelte-5pgva5{margin:0 0 4px;padding:8px 10px;border-radius:8px;background:var(--raised);color:var(--fg-2);font:var(--t-small)}.note.svelte-5pgva5{margin:0;padding:10px;color:var(--fg-3);font:var(--t-small)}.note.empty.svelte-5pgva5{color:var(--fg-2)}.keys.svelte-5pgva5{position:sticky;bottom:-8px;display:flex;gap:14px;margin:4px -8px -8px;padding:8px 12px;border-top:1px solid var(--line-faint);background:var(--overlay);color:var(--fg-3);font:var(--t-caption)}.keys.svelte-5pgva5>span:where(.svelte-5pgva5){display:inline-flex;align-items:center;gap:4px}.search.svelte-1625q67{position:relative;width:100%}.lead.svelte-1625q67{position:absolute;top:10px;left:12px;display:inline-flex;color:var(--fg-3);pointer-events:none}#q.svelte-1625q67{width:100%;height:36px;padding:0 64px 0 36px;border:1px solid var(--line);border-radius:10px;background:var(--raised);color:var(--fg);font:var(--t-small);transition:border-color .12s,box-shadow .12s}#q.svelte-1625q67:hover{border-color:var(--line-strong)}#q.svelte-1625q67:focus{border-color:var(--primary-line);outline:none;box-shadow:var(--glow-25)}#q.svelte-1625q67::placeholder{color:var(--fg-3)}#q.svelte-1625q67::-webkit-search-cancel-button{display:none}.keys.svelte-1625q67{position:absolute;top:9px;right:10px;display:inline-flex;gap:4px;pointer-events:none}.search.open.svelte-1625q67 .keys:where(.svelte-1625q67){display:none}.topbar.svelte-1h259us{grid-area:top;position:relative;z-index:30;display:grid;grid-template-columns:minmax(0,calc(50% - 282px)) 540px minmax(0,1fr);align-items:center;padding:0 16px 0 14px}.project.svelte-1h259us{display:inline-flex;min-width:0;align-items:center;gap:8px;color:var(--fg-2)}.project.svelte-1h259us .name:where(.svelte-1h259us){overflow:hidden;color:var(--fg);font:var(--t-body-500);text-overflow:ellipsis;white-space:nowrap}.cmd.svelte-1h259us{position:relative;min-width:0}.right.svelte-1h259us{display:flex;min-width:0;align-items:center;justify-content:flex-end;gap:8px}.status.svelte-1h259us{overflow:hidden;max-width:100%}.status.svelte-1h259us .long:where(.svelte-1h259us){overflow:hidden;text-overflow:ellipsis}.status.svelte-1h259us .short:where(.svelte-1h259us),.searchbtn.svelte-1h259us,.morebtn.svelte-1h259us,.phone-brand.svelte-1h259us,.phone-title.svelte-1h259us{display:none}.scrim.svelte-1h259us{position:fixed;inset:var(--topbar-h) 0 0 0;z-index:25;background:color-mix(in srgb,var(--bg) 60%,transparent)}@media(max-width:1023px){.topbar.svelte-1h259us{grid-template-columns:minmax(0,1fr) auto;padding:0 12px 0 16px}.cmd.svelte-1h259us{display:none}.cmd.unfolded.svelte-1h259us{position:absolute;top:8px;right:12px;left:12px;z-index:40;display:block}.searchbtn.svelte-1h259us{display:inline-flex;width:32px;height:32px}.status.svelte-1h259us .long:where(.svelte-1h259us){display:none}.status.svelte-1h259us .short:where(.svelte-1h259us){display:inline}}@media(max-width:599px){.topbar.svelte-1h259us{grid-template-columns:auto minmax(0,1fr) auto;gap:10px;padding:0 12px}.project.svelte-1h259us,.status.svelte-1h259us{display:none}.phone-brand.svelte-1h259us{display:inline-flex}.phone-title.svelte-1h259us{display:block;overflow:hidden;color:var(--fg);font:var(--t-mono-500);text-overflow:ellipsis;white-space:nowrap}.morebtn.svelte-1h259us{display:inline-flex;width:32px;height:32px}.cmd.unfolded.svelte-1h259us{top:10px}}.slot.svelte-14ttdid{position:relative}.menu.svelte-14ttdid{position:absolute;bottom:0;left:calc(100% + 12px);z-index:60;display:flex;width:220px;flex-direction:column;gap:2px;padding:8px;border:1px solid var(--line-strong);border-radius:12px;background:var(--overlay);box-shadow:var(--sh-pop)}.head.svelte-14ttdid{padding:4px 8px 6px}.item.svelte-14ttdid{display:flex;align-items:center;gap:10px;height:34px;padding:0 8px;border-radius:8px;color:var(--fg-2);font:var(--t-small-500);text-align:left}.item.svelte-14ttdid:hover{background:var(--raised);color:var(--fg)}.item.on.svelte-14ttdid{background:var(--primary-soft);color:var(--primary-ink)}.note.svelte-14ttdid{font:var(--t-caption)}.tick.svelte-14ttdid{display:inline-flex;margin-left:auto}.segmented.svelte-14ttdid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;padding:4px;border:1px solid var(--line);border-radius:10px;background:var(--card)}.segmented.svelte-14ttdid button:where(.svelte-14ttdid){display:inline-flex;height:34px;align-items:center;justify-content:center;gap:6px;border:1px solid transparent;border-radius:8px;color:var(--fg-2);font:var(--t-small-500)}.segmented.svelte-14ttdid button.on:where(.svelte-14ttdid){border-color:var(--primary-line);background:var(--primary-soft);color:var(--primary-ink)}.sheet.svelte-6ibmnt{display:flex;flex-direction:column;gap:6px;color:var(--fg-2);font:var(--t-small)}.second.svelte-6ibmnt{margin-top:8px}.row.svelte-6ibmnt{display:grid;grid-template-columns:64px minmax(0,1fr);align-items:center;gap:10px}.keys.svelte-6ibmnt{display:inline-flex;gap:4px}.info.svelte-gxt5fa{color:var(--fg-2);font:var(--t-small)}dl.svelte-gxt5fa{display:grid;grid-template-columns:56px minmax(0,1fr);gap:6px 10px;margin:8px 0 10px}dt.svelte-gxt5fa{color:var(--fg-3)}dd.svelte-gxt5fa{margin:0;overflow-wrap:anywhere;color:var(--fg)}dd.mono.svelte-gxt5fa{font:var(--t-mono-sm)}p.svelte-gxt5fa{margin:0;font:var(--t-caption)}code.svelte-gxt5fa{font:var(--t-mono-sm)}.navrail.svelte-a15fu9{grid-area:nav;position:relative;z-index:35;display:flex;min-height:0;flex-direction:column;align-items:center;padding:10px 0 14px}.brand.svelte-a15fu9{display:inline-flex;margin-bottom:20px;border-radius:10px}.dest.svelte-a15fu9{display:flex;flex-direction:column;gap:6px;margin:0;padding:0;list-style:none}.foot.svelte-a15fu9{display:flex;flex-direction:column;gap:6px;margin-top:auto}.slot.svelte-a15fu9{position:relative}.dest.svelte-a15fu9 .navbtn.active:where(.svelte-a15fu9):before{position:absolute;top:10px;left:-12px;width:3px;height:20px;border-radius:2px;background:var(--grad-brand-v);content:""}.pop.svelte-a15fu9{position:absolute;bottom:0;left:calc(100% + 12px);z-index:60;width:300px;padding:14px;border:1px solid var(--line-strong);border-radius:12px;background:var(--overlay);box-shadow:var(--sh-pop)}@media(max-width:1023px){.navrail.svelte-a15fu9{padding:10px 0 12px}.brand.svelte-a15fu9{margin-bottom:16px}.dest.svelte-a15fu9 .navbtn.active:where(.svelte-a15fu9):before{top:8px;left:-10px}}@media(max-width:599px){.navrail.svelte-a15fu9{display:none}}.tabbar.svelte-cs3flw{grid-area:tabs;display:none}@media(max-width:599px){.tabbar.svelte-cs3flw{position:relative;z-index:30;display:grid;height:64px;grid-template-columns:repeat(5,minmax(0,1fr));border-top:1px solid var(--line-faint);background:var(--rail)}}.tab.svelte-cs3flw{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;color:var(--fg-3);font:var(--t-caption)}.tab.active.svelte-cs3flw{color:var(--primary-ink)}.tab.active.svelte-cs3flw:before{position:absolute;top:-1px;left:50%;width:28px;height:3px;border-radius:0 0 2px 2px;background:var(--grad-brand);content:"";transform:translate(-50%)}.scrim.svelte-phd9v0{position:fixed;inset:0;z-index:70;background:color-mix(in srgb,var(--bg) 60%,transparent);cursor:default}.sheet.svelte-phd9v0{position:fixed;right:0;bottom:0;left:0;z-index:71;display:flex;max-height:80vh;flex-direction:column;gap:10px;overflow:auto;padding:18px 16px 24px;border:1px solid var(--line);border-bottom:0;border-radius:18px 18px 0 0;background:var(--overlay);box-shadow:var(--sh-pop)}.grabber.svelte-phd9v0{width:36px;height:4px;flex:0 0 auto;align-self:center;margin:-8px 0 4px;border-radius:2px;background:var(--line-strong)}ul.svelte-phd9v0{display:flex;flex-direction:column;gap:4px;margin:0;padding:0;list-style:none}.dest.svelte-phd9v0{display:flex;align-items:center;gap:12px;height:44px;padding:0 12px;border:1px solid var(--line-faint);border-radius:10px;background:var(--card);color:var(--fg);font:var(--t-body-500)}.dest.active.svelte-phd9v0{border-color:var(--primary-line);background:var(--primary-soft);color:var(--primary-ink)}.chev.svelte-phd9v0{display:inline-flex;margin-left:auto;color:var(--fg-3)}.info.svelte-phd9v0{margin-top:6px;padding:12px;border:1px solid var(--line-faint);border-radius:10px;background:var(--card)}.trailwrap.svelte-rju47z{grid-area:trail;display:flex;min-height:0;min-width:0;flex-direction:column;margin:0 var(--gap);border:1px solid var(--line-faint);border-radius:var(--island-r);background:var(--panel)}.trailwrap.empty.svelte-rju47z{display:none}.trailbar.svelte-rju47z{display:flex;height:calc(var(--trailbar-h, 40px) - 2px);min-width:0;align-items:center;flex:0 0 auto;gap:0;padding:0 10px 0 16px;white-space:nowrap}.label.svelte-rju47z{margin-right:12px}.hops.svelte-rju47z{display:flex;min-width:0;flex:1;align-items:center;overflow-x:auto;scrollbar-width:none}.hops.svelte-rju47z::-webkit-scrollbar{display:none}.more.svelte-rju47z{height:22px;flex:0 0 auto;margin-right:10px;padding:0 8px;border-radius:11px;background:var(--raised);color:var(--fg-2);font:var(--t-mono-sm)}.more.svelte-rju47z:hover{color:var(--fg)}.hop.svelte-rju47z{display:inline-flex;height:28px;flex:0 0 auto;align-items:center;gap:8px;padding:0 10px 0 8px;border:1px solid var(--line);border-radius:8px;background:var(--raised);color:var(--fg);font:var(--t-mono)}.hop.svelte-rju47z:hover{border-color:var(--line-strong)}.hop.cur.svelte-rju47z{border-color:var(--primary-line);background:var(--primary-soft);box-shadow:var(--glow-25);color:var(--primary-ink)}.hop-arrow.svelte-rju47z{display:inline-flex;width:20px;flex:0 0 auto;align-items:center;justify-content:center;color:var(--fg-4)}.hop-arrow.up.svelte-rju47z{color:var(--fg-3)}.jump.svelte-rju47z{width:3px;height:3px;border-radius:50%;background:currentColor}.actions.svelte-rju47z{display:flex;flex:0 0 auto;align-items:center;gap:6px;margin-left:12px}.ro.svelte-rju47z{color:var(--fg-2)}.phone.svelte-rju47z{display:none}.saveform.svelte-rju47z{display:flex;align-items:center;gap:8px;padding:8px 16px 10px;border-top:1px solid var(--line-faint);flex-wrap:wrap}.saveform.svelte-rju47z label:where(.svelte-rju47z){color:var(--fg-2);font:var(--t-small-500)}.saveform.svelte-rju47z input:where(.svelte-rju47z){width:320px;height:32px;max-width:100%;padding:0 12px;border:1px solid var(--line);border-radius:8px;background:var(--raised);color:var(--fg);font:var(--t-body)}.saveform.svelte-rju47z input:where(.svelte-rju47z):focus{border-color:var(--primary-line);outline:none;box-shadow:var(--glow-25)}.saveform.svelte-rju47z input:where(.svelte-rju47z)::placeholder{color:var(--fg-4)}.hint.svelte-rju47z{color:var(--fg-3);font:var(--t-caption)}.hint.warn.svelte-rju47z{color:var(--amber)}.err.svelte-rju47z{color:var(--red);font:var(--t-caption)}@media(max-width:1023px){.actions.svelte-rju47z .btn:where(.svelte-rju47z):not(.secondary){display:none}}@media(max-width:599px){.trailwrap.svelte-rju47z{border:0;background:transparent}.trailbar.svelte-rju47z{padding:0 4px}.label.svelte-rju47z,.hops.svelte-rju47z,.actions.svelte-rju47z{display:none}.phone.svelte-rju47z{display:flex;min-width:0;align-items:center;gap:10px}.back.svelte-rju47z{display:inline-flex;height:30px;min-width:0;align-items:center;gap:6px;padding:0 12px 0 8px;border:1px solid var(--line);border-radius:15px;background:var(--raised);color:var(--fg);font:var(--t-mono)}.back.svelte-rju47z span:where(.svelte-rju47z):last-child{overflow:hidden;text-overflow:ellipsis}.count.svelte-rju47z{color:var(--fg-3);font:var(--t-small)}}.trails.svelte-1gyfjc6{max-width:920px}.head.svelte-1gyfjc6{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:4px 12px;margin-bottom:10px}.trails.svelte-1gyfjc6 h3:where(.svelte-1gyfjc6){display:inline-flex;align-items:center;gap:8px;margin:0;color:var(--fg);font:var(--t-label)}.trails.svelte-1gyfjc6 h3:where(.svelte-1gyfjc6) .icon{color:var(--fg-3)}.where.svelte-1gyfjc6{color:var(--fg-4);font:var(--t-caption)}.msg.svelte-1gyfjc6{margin:0;padding:4px 0 0;color:var(--fg-3);font:var(--t-small);line-height:1.5}.msg.svelte-1gyfjc6 strong:where(.svelte-1gyfjc6){color:var(--fg)}.msg.err.svelte-1gyfjc6{color:var(--red)}.rows.svelte-1gyfjc6{display:flex;flex-direction:column;gap:8px}.row.svelte-1gyfjc6{position:relative;border:1px solid var(--line-faint);border-radius:10px;background:var(--card)}.row.svelte-1gyfjc6:hover{border-color:var(--line)}.pick.svelte-1gyfjc6{display:grid;width:100%;min-height:62px;align-items:center;padding:10px 14px;color:var(--fg);gap:12px;grid-template-columns:22px minmax(0,1fr) auto;text-align:left}.pick.svelte-1gyfjc6:disabled{color:var(--fg-3);cursor:default}.mid.svelte-1gyfjc6{display:flex;min-width:0;flex-direction:column}.nm.svelte-1gyfjc6{overflow:hidden;font:var(--t-body-500);text-overflow:ellipsis;white-space:nowrap}.pick.svelte-1gyfjc6:hover:not(:disabled) .nm:where(.svelte-1gyfjc6){color:var(--primary-ink)}.note.svelte-1gyfjc6{overflow:hidden;color:var(--fg-3);font:var(--t-caption);text-overflow:ellipsis;white-space:nowrap}.meta.svelte-1gyfjc6{padding-right:150px;color:var(--fg-3);font:var(--t-caption);white-space:nowrap}.acts.svelte-1gyfjc6{position:absolute;top:16px;right:12px;display:flex;gap:6px}.act.svelte-1gyfjc6{display:inline-flex;height:28px;align-items:center;gap:6px;padding:0 10px;border:1px solid var(--line);border-radius:8px;background:var(--raised);color:var(--fg-2);font:var(--t-small-500)}.act.svelte-1gyfjc6:hover:not(:disabled){border-color:var(--line-strong);color:var(--fg)}.act.armed.svelte-1gyfjc6{border-color:color-mix(in srgb,var(--red) 40%,transparent);background:var(--red-soft);color:var(--red)}.decay.svelte-1gyfjc6{display:flex;align-items:flex-start;gap:8px;margin:0 14px 12px 48px;padding:8px 12px;border-radius:8px;background:var(--raised);color:var(--fg-3);font:var(--t-caption);line-height:1.45}.decay.warn.svelte-1gyfjc6{background:var(--amber-soft);color:var(--amber)}@media(max-width:599px){.meta.svelte-1gyfjc6{display:none}.pick.svelte-1gyfjc6{grid-template-columns:22px minmax(0,1fr);padding-right:150px}}.start.svelte-y99goq{display:flex;height:100%;flex-direction:column;gap:var(--gap);overflow:auto}.project.svelte-y99goq{display:flex;flex:0 0 auto;flex-wrap:wrap;align-items:center;gap:14px 20px;min-height:84px;padding:18px 20px}.ptile.svelte-y99goq{display:inline-flex;width:48px;height:48px;flex:0 0 auto;align-items:center;justify-content:center;border:1px solid var(--line);border-radius:12px;background:var(--raised);color:var(--primary-ink)}.pt.svelte-y99goq{min-width:0;flex:1}.pn.svelte-y99goq{display:flex;align-items:center;gap:12px}.pn.svelte-y99goq h1:where(.svelte-y99goq){margin:0;overflow:hidden;color:var(--fg);font:var(--t-display);text-overflow:ellipsis;white-space:nowrap}.meta.svelte-y99goq{margin:4px 0 0;color:var(--fg-3);font:var(--t-small)}.actions.svelte-y99goq{display:flex;flex-wrap:wrap;gap:8px}.cards.svelte-y99goq{display:grid;flex:1 0 auto;grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-rows:minmax(352px,auto);gap:var(--gap)}.card.svelte-y99goq{padding:16px 18px 18px}.ch.svelte-y99goq{display:flex;align-items:center;gap:8px;color:var(--fg-3)}.ch.svelte-y99goq h2:where(.svelte-y99goq){margin:0;color:var(--fg);font:var(--t-label)}.sub.svelte-y99goq{margin:6px 0 14px;color:var(--fg-4);font:var(--t-caption)}.card.svelte-y99goq .trails{max-width:none}.tiles.svelte-y99goq{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-bottom:16px}.stk.svelte-y99goq{margin:12px 0 8px}.stack.svelte-y99goq{display:flex;height:8px;overflow:hidden;border-radius:4px;background:var(--raised)}.stack.svelte-y99goq i:where(.svelte-y99goq){height:100%}.legend.svelte-y99goq{display:flex;flex-wrap:wrap;gap:4px 14px;margin-top:8px;color:var(--fg-2);font:var(--t-small)}.legend.svelte-y99goq span:where(.svelte-y99goq){display:inline-flex;align-items:center;gap:6px}.legend.svelte-y99goq i:where(.svelte-y99goq){width:8px;height:8px;border-radius:2px}.barrow.svelte-y99goq{display:grid;width:100%;grid-template-columns:minmax(0,1fr) auto;gap:6px 10px;padding:4px 0 10px;color:var(--fg);text-align:left}button.barrow.svelte-y99goq:hover .nm:where(.svelte-y99goq){color:var(--primary-ink)}.bl.svelte-y99goq{display:flex;min-width:0;align-items:baseline;gap:8px}.bl.svelte-y99goq .nm:where(.svelte-y99goq){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mono.nm.svelte-y99goq{font:var(--t-mono-500)}.bl.svelte-y99goq .dim:where(.svelte-y99goq){color:var(--fg-4);font:var(--t-caption)}.bv.svelte-y99goq{color:var(--fg-2);font:var(--t-mono-sm)}.barrow.svelte-y99goq .bar:where(.svelte-y99goq){grid-column:1 / -1}.erow.svelte-y99goq{display:grid;grid-template-columns:22px minmax(0,1fr) auto;align-items:center;gap:12px;min-height:52px;margin-bottom:6px;padding:6px 10px 6px 12px;border:1px solid var(--line-faint);border-radius:10px;background:var(--card)}.erow.svelte-y99goq:hover{border-color:var(--line)}.et.svelte-y99goq{display:flex;min-width:0;flex-direction:column;text-align:left}.et.svelte-y99goq .nm:where(.svelte-y99goq),.et.svelte-y99goq .dim:where(.svelte-y99goq){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.et.svelte-y99goq .dim:where(.svelte-y99goq){color:var(--fg-3);font:var(--t-mono-sm)}.et.svelte-y99goq:hover .nm:where(.svelte-y99goq){color:var(--primary-ink)}.more.svelte-y99goq{display:inline-flex;align-items:center;gap:4px;margin-top:6px;color:var(--fg-2);font:var(--t-small-500)}.more.svelte-y99goq:hover{color:var(--fg)}.dim.svelte-y99goq{color:var(--fg-3)}.sk.svelte-y99goq{display:flex;flex-direction:column;gap:14px;padding-top:6px}@media(max-width:1279px){.cards.svelte-y99goq{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:767px){.cards.svelte-y99goq{grid-template-columns:minmax(0,1fr);grid-auto-rows:auto}.actions.svelte-y99goq{width:100%}.project.svelte-y99goq .btn:where(.svelte-y99goq){flex:1}}.rail-top.svelte-esi3sb{position:relative;z-index:2}.rail-h.svelte-esi3sb{display:flex;align-items:center;justify-content:space-between;gap:8px;height:52px;padding:0 16px}.title.svelte-esi3sb{display:inline-flex;align-items:center;gap:8px;font:var(--t-label)}.title.svelte-esi3sb .lead:where(.svelte-esi3sb){display:inline-flex;color:var(--cyan)}.count.svelte-esi3sb{display:inline-flex;min-width:22px;height:20px;align-items:center;justify-content:center;padding:0 7px;border-radius:10px;background:var(--raised);color:var(--fg-2);font:var(--t-mono-sm)}.hint.svelte-esi3sb{color:var(--fg-4);font:var(--t-caption)}.emptycard.svelte-esi3sb{display:grid;grid-template-columns:16px minmax(0,1fr);gap:10px;margin:0 12px 8px;padding:14px;border:1px solid var(--line-faint);border-radius:10px;background:var(--card);color:var(--fg-2);font:var(--t-small)}.emptycard.svelte-esi3sb .ic:where(.svelte-esi3sb){display:inline-flex;padding-top:1px;color:var(--fg-3)}.leaves.svelte-esi3sb{margin:0 12px 4px;padding:12px;border:1px solid var(--line-faint);border-radius:10px;background:var(--card)}.lh.svelte-esi3sb{display:flex;align-items:baseline;justify-content:space-between;margin-bottom:10px;font:var(--t-caption)}.pills.svelte-esi3sb{display:flex;flex-wrap:wrap;gap:6px}.unplaced.svelte-esi3sb{visibility:hidden}.rrow.svelte-esi3sb{position:absolute;right:12px;left:12px;display:grid;grid-template-columns:22px minmax(0,1fr);gap:9px;align-items:center;height:44px;padding:0 10px;border:1px solid var(--line-faint);border-radius:10px;background:var(--card);cursor:pointer;transition:background-color .12s,border-color .12s,box-shadow .12s}.rrow.static.svelte-esi3sb{position:static;height:auto;min-height:36px;margin-bottom:6px;padding:6px 10px}.rrow.svelte-esi3sb:hover{border-color:var(--line);background:var(--raised)}.rrow.sel.svelte-esi3sb{border-color:var(--fg-2)}.rrow.svelte-esi3sb:focus-visible{outline-offset:4px}.rrow.hot.svelte-esi3sb{border-color:var(--primary-line);background:var(--primary-soft);box-shadow:var(--glow-30)}.rrow.hot.svelte-esi3sb .nm:where(.svelte-esi3sb){color:var(--primary-ink)}.rrow.origin.svelte-esi3sb{border-color:var(--primary-line);background:var(--primary-soft);box-shadow:var(--glow-22)}.body.svelte-esi3sb{min-width:0}.nm.svelte-esi3sb{overflow:hidden;color:var(--fg);font:var(--t-mono-500);text-overflow:ellipsis;white-space:nowrap}.rrow.uncertain.svelte-esi3sb .nm:where(.svelte-esi3sb){color:var(--fg-2);text-decoration:underline dotted var(--fg-4);text-underline-offset:3px}.meta.svelte-esi3sb{display:flex;gap:8px;overflow:hidden;margin-top:2px;color:var(--fg-3);font:var(--t-caption);text-overflow:ellipsis;white-space:nowrap}.tag.svelte-esi3sb{flex:0 0 auto;padding:0 6px;border-radius:7px;background:var(--raised);color:var(--fg-2);font:var(--t-mono-sm)}.tag.when.svelte-esi3sb{background:var(--amber-soft);color:var(--amber)}.rfold.svelte-esi3sb{position:absolute;right:12px;left:12px;border:1px solid var(--line);border-radius:10px;background:var(--raised)}.rfold.svelte-esi3sb summary:where(.svelte-esi3sb){padding:10px 12px;color:var(--fg-2);cursor:pointer;font:var(--t-small);list-style:none}.rfold.svelte-esi3sb summary:where(.svelte-esi3sb)::-webkit-details-marker{display:none}.rfold.svelte-esi3sb summary:where(.svelte-esi3sb):before{color:var(--fg-3);content:"+ ";font-family:var(--mono)}.rfold[open].svelte-esi3sb summary:where(.svelte-esi3sb):before{content:"− "}.fold-body.svelte-esi3sb{padding:0 8px 2px}.rnote.svelte-esi3sb{position:absolute;right:12px;left:16px;color:var(--fg-3);font:var(--t-caption);line-height:1.45}.rail-h.svelte-1g174kh{position:sticky;top:0;z-index:2;display:flex;align-items:center;height:52px;padding:0 16px;background:var(--panel)}.title.svelte-1g174kh{display:inline-flex;align-items:center;gap:8px;font:var(--t-label)}.title.svelte-1g174kh .lead:where(.svelte-1g174kh){display:inline-flex;color:var(--cyan)}.count.svelte-1g174kh{display:inline-flex;min-width:22px;height:20px;align-items:center;justify-content:center;padding:0 7px;border-radius:10px;background:var(--raised);color:var(--fg-2);font:var(--t-mono-sm)}.filter.svelte-1g174kh{position:relative;display:block;margin:0 12px 6px}.filter.svelte-1g174kh .lead:where(.svelte-1g174kh){position:absolute;top:8px;left:12px;display:inline-flex;color:var(--fg-3);pointer-events:none}.filter.svelte-1g174kh input:where(.svelte-1g174kh){width:100%;height:32px;padding:0 10px 0 36px;border:1px solid var(--line);border-radius:8px;background:var(--raised);color:var(--fg);font:var(--t-small)}.filter.svelte-1g174kh input:where(.svelte-1g174kh):hover{border-color:var(--line-strong)}.filter.svelte-1g174kh input:where(.svelte-1g174kh):focus{border-color:var(--primary-line);outline:none;box-shadow:var(--glow-25)}.filter.svelte-1g174kh input:where(.svelte-1g174kh)::placeholder{color:var(--fg-3)}.filegroup.svelte-1g174kh{padding:10px 10px 2px}.fpath.svelte-1g174kh{display:flex;align-items:center;gap:8px;margin:0 6px 8px;color:var(--fg-3);font:var(--t-mono-sm)}.fpath.svelte-1g174kh a:where(.svelte-1g174kh){min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.fpath.svelte-1g174kh a:where(.svelte-1g174kh):hover{color:var(--fg);text-decoration:underline}.fpath.svelte-1g174kh b:where(.svelte-1g174kh){color:var(--fg-2);font-weight:500}.row.svelte-1g174kh{position:relative;display:grid;grid-template-columns:22px minmax(0,1fr);gap:10px;align-items:start;min-height:46px;margin-bottom:6px;padding:11px 12px 8px;border:1px solid var(--line-faint);border-radius:10px;background:var(--card);cursor:pointer;transition:background-color .12s,border-color .12s}.row.svelte-1g174kh:hover{border-color:var(--line);background:var(--raised)}.row.sel.svelte-1g174kh{border-color:var(--fg-2)}.row.svelte-1g174kh:focus-visible{outline-offset:4px}.row.origin.svelte-1g174kh{border-color:var(--primary-line);background:var(--primary-soft);box-shadow:var(--glow-22)}.row.origin.svelte-1g174kh:before{position:absolute;top:10px;bottom:10px;left:-1px;width:2px;border-radius:2px;background:var(--grad-brand-v);content:""}.txt.svelte-1g174kh{min-width:0}.nm.svelte-1g174kh{overflow:hidden;color:var(--fg);font:var(--t-mono-500);text-overflow:ellipsis;white-space:nowrap}.meta.svelte-1g174kh{display:flex;flex-wrap:wrap;gap:4px 8px;align-items:center;margin-top:3px;color:var(--fg-3);font:var(--t-caption)}.tag.svelte-1g174kh{flex:0 0 auto;height:18px;padding:0 7px;border-radius:9px;background:var(--amber-soft);color:var(--amber);font:var(--t-mono-sm);line-height:18px}.kindlbl.svelte-1g174kh{color:var(--fg-3)}.chip.svelte-1g174kh{height:18px;padding:0 7px;border-radius:9px;background:var(--raised);color:var(--fg-2);font:var(--t-mono-sm)}.row.svelte-1g174kh:hover .chip:where(.svelte-1g174kh){background:var(--overlay)}.chip.svelte-1g174kh:hover{color:var(--fg);box-shadow:inset 0 0 0 1px var(--line-strong)}.came.svelte-1g174kh{display:flex;align-items:center;gap:5px;margin-top:6px;color:var(--primary-ink);font:var(--t-caption)}.fold.svelte-1g174kh{margin:8px 10px;border:1px solid var(--line);border-radius:10px;background:var(--raised)}.fold.svelte-1g174kh>summary:where(.svelte-1g174kh){display:flex;align-items:center;gap:10px;min-height:44px;padding:0 12px;color:var(--fg-2);cursor:pointer;font:var(--t-caption);list-style:none}.fold.svelte-1g174kh>summary:where(.svelte-1g174kh)::-webkit-details-marker{display:none}.flask.svelte-1g174kh{display:inline-flex;color:var(--green)}.flask.dim.svelte-1g174kh{color:var(--fg-3)}.ft.svelte-1g174kh{color:var(--fg);font:var(--t-body-500)}.chev.svelte-1g174kh{display:inline-flex;margin-left:auto;color:var(--fg-3);transition:transform .12s}.fold[open].svelte-1g174kh .chev:where(.svelte-1g174kh){transform:rotate(90deg)}.fold.svelte-1g174kh .body:where(.svelte-1g174kh){display:flex;max-height:260px;flex-direction:column;overflow:auto;padding:0 8px 8px}.trow.svelte-1g174kh{display:grid;grid-template-columns:18px minmax(0,1fr) auto;align-items:center;gap:8px;min-height:26px;padding:0 6px;border-radius:6px;cursor:pointer}.trow.svelte-1g174kh:hover{background:var(--overlay)}.trow.svelte-1g174kh .nm:where(.svelte-1g174kh){font:var(--t-mono)}.trow.uncertain.svelte-1g174kh .nm:where(.svelte-1g174kh){color:var(--fg-2);text-decoration:underline dotted var(--fg-4);text-underline-offset:3px}.tf.svelte-1g174kh{overflow:hidden;color:var(--fg-3);font:var(--t-caption);text-overflow:ellipsis;white-space:nowrap}.note.svelte-1g174kh{padding:8px 16px;color:var(--fg-3);font:var(--t-caption);line-height:1.45}.overlay.svelte-1x7maed{position:absolute;inset:0;z-index:1;overflow:visible;pointer-events:none}path.svelte-1x7maed{fill:none;stroke:var(--cyan-line);stroke-width:1.5}path.uncertain.svelte-1x7maed{stroke:var(--fg-3);stroke-dasharray:2 3}path.heur.svelte-1x7maed{stroke:var(--fg-2);stroke-dasharray:6 3}path.origin.svelte-1x7maed{stroke:var(--primary)}path.hot.svelte-1x7maed{stroke:var(--cyan);stroke-width:2;filter:var(--glow-cyan-80-f)}.bh.svelte-149slox{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin-bottom:10px}.scale.svelte-149slox{color:var(--fg-3);font:var(--t-caption)}.tiles.svelte-149slox{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.routes.svelte-149slox{margin-top:8px;color:var(--fg-3);font:var(--t-caption)}details.svelte-149slox{margin-top:10px}summary.svelte-149slox{display:flex;align-items:center;gap:6px;color:var(--fg-2);cursor:pointer;font:var(--t-small);list-style:none}summary.svelte-149slox::-webkit-details-marker{display:none}summary.svelte-149slox:before{width:10px;color:var(--fg-3);content:"+";font-family:var(--mono)}details[open].svelte-149slox summary:where(.svelte-149slox):before{content:"−"}.body.svelte-149slox{padding-top:6px}.fp.svelte-149slox{display:flex;justify-content:space-between;gap:10px;padding:2px 0;color:var(--fg-2);font:var(--t-mono-sm)}.fp.svelte-149slox a:where(.svelte-149slox){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.fp.svelte-149slox a:where(.svelte-149slox):hover{color:var(--fg);text-decoration:underline}.fp.svelte-149slox a.test:where(.svelte-149slox){color:var(--fg-3)}.fp.svelte-149slox b:where(.svelte-149slox){color:var(--fg);font-weight:500;font-variant-numeric:tabular-nums}.note.svelte-149slox{padding-top:6px;color:var(--fg-3);font:var(--t-caption)}.mcard.svelte-rscx7m{margin-top:16px;padding:0 12px 10px;border:1px solid var(--line);border-radius:12px;background:var(--card)}.subh.svelte-rscx7m{display:flex;align-items:center;gap:8px;height:48px;padding:0 4px;font:var(--t-label)}.subh.svelte-rscx7m .lead:where(.svelte-rscx7m){display:inline-flex;color:var(--fg-3)}.subh.svelte-rscx7m .n:where(.svelte-rscx7m){color:var(--fg-3);font:var(--t-caption)}.orow.svelte-rscx7m{display:grid;grid-template-columns:20px minmax(120px,auto) minmax(0,1fr) auto;gap:10px;align-items:center;width:100%;min-height:34px;padding:0 6px;border-radius:8px;text-align:left}.orow.svelte-rscx7m:hover{background:var(--raised)}.orow.nested.svelte-rscx7m{padding-left:28px}.nm.svelte-rscx7m{color:var(--fg);font:var(--t-mono)}.orow.dimmed.svelte-rscx7m .nm:where(.svelte-rscx7m){color:var(--fg-3)}.ovr.svelte-rscx7m{margin-right:8px;padding:1px 7px;border-radius:9px;background:var(--violet-soft);color:var(--violet);font:var(--t-mono-sm);white-space:nowrap}.sig.svelte-rscx7m{overflow:hidden;color:var(--fg-4);font:var(--t-mono-sm);text-overflow:ellipsis;white-space:nowrap}.cnt.svelte-rscx7m{display:inline-flex;gap:12px;color:var(--fg-2);font:var(--t-mono-sm);font-variant-numeric:tabular-nums;white-space:nowrap}.cnt.svelte-rscx7m .zero:where(.svelte-rscx7m){color:var(--fg-4)}.note.svelte-rscx7m{padding:8px 6px 2px;color:var(--fg-3);font:var(--t-caption)}.headline.svelte-1ys4zlw{margin:20px 0 0;font:var(--t-body)}.zap.svelte-1ys4zlw{display:inline-flex;color:var(--violet)}.hcard.svelte-1ys4zlw{margin-top:16px;padding:0 16px 14px;border:1px solid var(--line);border-radius:12px;background:var(--card)}.subh.svelte-1ys4zlw{display:flex;align-items:center;gap:8px;height:48px;font:var(--t-label)}.subh.svelte-1ys4zlw .lead:where(.svelte-1ys4zlw){display:inline-flex;color:var(--fg-3)}.subh.svelte-1ys4zlw .n:where(.svelte-1ys4zlw){color:var(--fg-3);font:var(--t-caption)}.subh.svelte-1ys4zlw .hint:where(.svelte-1ys4zlw){margin-left:auto;color:var(--fg-3);font:var(--t-caption)}.tree.svelte-1ys4zlw{padding-top:2px}.canvas.svelte-1ys4zlw{position:relative}.wires.svelte-1ys4zlw{position:absolute;top:0;left:0;overflow:visible;pointer-events:none}.wires.svelte-1ys4zlw path:where(.svelte-1ys4zlw){fill:none;stroke:var(--line-strong);stroke-width:1.2}.wires.svelte-1ys4zlw path.dashed:where(.svelte-1ys4zlw){stroke-dasharray:4 3}.wires.svelte-1ys4zlw path.synth:where(.svelte-1ys4zlw){stroke:var(--fg-3);stroke-dasharray:6 3}.row.svelte-1ys4zlw{position:absolute;top:0;right:0;left:0;display:flex;align-items:center;gap:10px;height:26px;padding-right:6px;border-radius:6px;text-align:left}button.row.svelte-1ys4zlw:hover{background:var(--raised)}.nm.svelte-1ys4zlw{color:var(--fg);font:var(--t-mono);white-space:nowrap}.row.focus.svelte-1ys4zlw .nm:where(.svelte-1ys4zlw){color:var(--primary-ink);font:var(--t-mono-500)}.focustile.svelte-1ys4zlw{display:inline-flex;border-radius:6px;box-shadow:var(--glow-50)}.word.svelte-1ys4zlw{overflow:hidden;color:var(--fg-3);font:var(--t-caption);text-overflow:ellipsis;white-space:nowrap}.row.svelte-1ys4zlw .pill:where(.svelte-1ys4zlw){height:18px;padding:0 7px}.fold.svelte-1ys4zlw{height:28px;margin:10px 0 0 34px}.note.svelte-1ys4zlw{padding:10px 0 0;color:var(--fg-3);font:var(--t-caption)}.code.svelte-ikg4h3{margin-top:20px;overflow:hidden;border:1px solid var(--line);border-radius:12px;background:var(--card);box-shadow:var(--sh-card);font:var(--t-code);font-variant-ligatures:none}.ch.svelte-ikg4h3{display:flex;height:40px;align-items:center;gap:10px;padding:0 8px 0 16px;border-bottom:1px solid var(--line-faint)}.fi.svelte-ikg4h3{display:inline-flex;color:var(--fg-3)}.fname.svelte-ikg4h3{color:var(--fg);font:var(--t-mono-500)}.range.svelte-ikg4h3{color:var(--fg-3);font:var(--t-mono-sm);white-space:nowrap}.fname.svelte-ikg4h3{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sp.svelte-ikg4h3{flex:1}.lines.svelte-ikg4h3{padding:7px 0 14px}.ln.svelte-ikg4h3{position:relative;display:grid;grid-template-columns:48px minmax(0,1fr) 26px;align-items:stretch;height:20px}.ln.svelte-ikg4h3:hover{background:var(--raised)}.ln.hot.svelte-ikg4h3{background:var(--primary-soft)}.ln.hot.svelte-ikg4h3:before{position:absolute;top:0;bottom:0;left:0;width:2px;background:var(--grad-brand-v);content:""}.no.svelte-ikg4h3{padding-right:14px;color:var(--fg-4);font:var(--t-lineno);text-align:right;user-select:none}.tx.svelte-ikg4h3{white-space:pre;overflow-x:auto;scrollbar-width:none}.tx.svelte-ikg4h3::-webkit-scrollbar{display:none}.port.svelte-ikg4h3{position:relative}.port.svelte-ikg4h3 i:where(.svelte-ikg4h3){position:absolute;top:6.5px;left:8px;width:7px;height:7px;border:1px solid var(--cyan-line);border-radius:50%;background:transparent}.port.svelte-ikg4h3 i.sure:where(.svelte-ikg4h3){border-color:var(--cyan);background:var(--cyan)}.ln.hot.svelte-ikg4h3 .port:where(.svelte-ikg4h3) i:where(.svelte-ikg4h3){border-color:var(--cyan);background:var(--cyan);box-shadow:var(--glow-cyan-90)}.gap.svelte-ikg4h3{margin:4px 0;padding:2px 0 2px 48px;border-top:1px dashed var(--line);border-bottom:1px dashed var(--line);color:var(--fg-4);font:var(--t-caption)}.t-c.svelte-ikg4h3{color:var(--syn-com)}.t-s.svelte-ikg4h3{color:var(--syn-str)}.t-k.svelte-ikg4h3{color:var(--syn-kw);font-weight:500}.t-n.svelte-ikg4h3{color:var(--syn-num)}.t-t.svelte-ikg4h3{color:var(--syn-type)}.t-p.svelte-ikg4h3{color:var(--syn-punct)}.t-def.svelte-ikg4h3{color:var(--fg);font-weight:600}.ref.svelte-ikg4h3{margin:0 -3px;padding:1px 3px;border-radius:5px;background:color-mix(in srgb,var(--cyan-soft) 85%,transparent);color:var(--cyan);cursor:pointer}.ref.svelte-ikg4h3:hover,.ref.hot.svelte-ikg4h3,.ln.hot.svelte-ikg4h3 .ref:where(.svelte-ikg4h3){background:var(--cyan-soft);box-shadow:inset 0 0 0 1px var(--cyan-line)}.ref.uncertain.svelte-ikg4h3{background:transparent;color:var(--fg-2);text-decoration:underline dotted var(--fg-4);text-underline-offset:3px}.ref.stub.svelte-ikg4h3{background:transparent;color:var(--fg-2);cursor:default;text-decoration:underline dotted var(--line-strong);text-underline-offset:3px}.ref.stub.svelte-ikg4h3:hover{box-shadow:none}.crumb.svelte-f6j7rg{display:flex;flex-wrap:wrap;align-items:center;gap:2px;color:var(--fg-3);font:var(--t-small)}.crumb.svelte-f6j7rg .sep:where(.svelte-f6j7rg){display:inline-flex;margin:0 4px;color:var(--fg-4)}.crumb.svelte-f6j7rg a:where(.svelte-f6j7rg),.crumb.svelte-f6j7rg button:where(.svelte-f6j7rg){color:var(--fg-2);font:inherit}.crumb.svelte-f6j7rg a:where(.svelte-f6j7rg):hover,.crumb.svelte-f6j7rg button:where(.svelte-f6j7rg):hover{color:var(--fg);text-decoration:underline;text-underline-offset:2px}.titlerow.svelte-f6j7rg{position:relative;display:flex;min-width:0;align-items:center;gap:12px;margin-top:12px}h1.svelte-f6j7rg{min-width:0;margin:0;overflow:hidden;color:var(--fg);font:var(--t-title-mono);font-variant-ligatures:none;text-overflow:ellipsis;white-space:nowrap}h1.svelte-f6j7rg:focus-visible{outline-offset:2px}.kinds.svelte-f6j7rg{display:inline-flex;flex:0 0 auto;gap:6px}.actions.svelte-f6j7rg{display:inline-flex;flex:0 0 auto;gap:6px;margin-left:auto}.tip.svelte-f6j7rg{position:absolute;top:calc(100% + 8px);left:40px;z-index:20;max-width:calc(100% - 40px);padding:7px 12px;overflow-wrap:anywhere;border:1px solid var(--line-strong);border-radius:8px;background:var(--overlay);box-shadow:var(--sh-pop);color:var(--fg);font:var(--t-mono)}.metrics.svelte-f6j7rg{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}.sig.svelte-f6j7rg{margin-top:12px;color:var(--fg-2);font:400 12px / 18px var(--mono);font-variant-ligatures:none;white-space:pre-wrap;word-break:break-word}.doc.svelte-f6j7rg{max-width:78ch;margin-top:12px;color:var(--fg-2);font:var(--t-body);white-space:pre-wrap}.rel.svelte-f6j7rg{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-top:12px;color:var(--fg-3);font:var(--t-small)}.rel.svelte-f6j7rg>span:where(.svelte-f6j7rg){display:inline-flex;flex-wrap:wrap;align-items:center;gap:6px}.chip.svelte-f6j7rg{height:22px;padding:0 9px;border:1px solid var(--line);border-radius:11px;background:var(--raised);color:var(--fg-2);font:var(--t-mono-sm)}.chip.svelte-f6j7rg:hover{border-color:var(--line-strong);color:var(--fg)}@media(max-width:599px){.actions.svelte-f6j7rg,.kinds.svelte-f6j7rg{display:none}}.drift.svelte-lsm7el{display:grid;grid-template-columns:16px minmax(0,1fr);gap:10px;align-items:start;padding:11px 14px;border-radius:10px;background:var(--amber-soft);color:var(--amber);font:var(--t-small);line-height:1.5}.glyph.svelte-lsm7el{display:inline-flex;padding-top:1px}.body.svelte-lsm7el code{font:var(--t-mono-sm);font-weight:500}.body.svelte-lsm7el button,.body.svelte-lsm7el a{padding:0;border:0;background:none;color:inherit;cursor:pointer;font:inherit;font-weight:600;text-decoration:underline;text-underline-offset:3px}.cmd.svelte-r5pcoo{display:inline-flex;height:30px;align-items:center;padding:0 12px;border:1px solid var(--line);border-radius:8px;background:var(--raised);color:var(--fg);font:var(--t-mono)}.scroll.svelte-1cxnzx{height:100%;overflow:auto}.focus.svelte-1cxnzx{position:relative;display:grid;grid-template-columns:288px minmax(0,1fr);gap:var(--gap);height:100%;min-height:0}.rail-left.svelte-1cxnzx{display:flex;min-height:0;flex-direction:column}.callers-scroll.svelte-1cxnzx{min-height:0;flex:1;overflow:auto}.blast-foot.svelte-1cxnzx{flex:0 0 auto;padding:14px 16px 16px;border-top:1px solid var(--line-faint)}.stage.svelte-1cxnzx{position:relative;min-width:0;overflow:auto}.stage-inner.svelte-1cxnzx{position:relative;display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:var(--gap);min-height:100%}.center.svelte-1cxnzx,.rail-right.svelte-1cxnzx{min-width:0;border:1px solid var(--line-faint);border-radius:var(--island-r);background:var(--panel)}.center.svelte-1cxnzx{padding:20px 24px 32px}.rail-right.svelte-1cxnzx{position:relative}.banner.svelte-1cxnzx{margin:16px 0 4px}.note.svelte-1cxnzx{padding:12px 0;color:var(--fg-3);font:var(--t-small)}.legend.svelte-1cxnzx{display:flex;flex-wrap:wrap;align-items:center;gap:6px 18px;margin-top:14px;color:var(--fg-2);font:var(--t-small)}.key.svelte-1cxnzx{display:inline-flex;align-items:center;gap:8px}.key.svelte-1cxnzx i:where(.svelte-1cxnzx){width:24px;height:0;border-top:2px solid var(--cyan)}.key.svelte-1cxnzx i.dotted:where(.svelte-1cxnzx){border-top:2px dotted var(--fg-3)}.key.svelte-1cxnzx i.dashed:where(.svelte-1cxnzx){border-top:2px dashed var(--fg-2)}.calledby.svelte-1cxnzx,.segmented.svelte-1cxnzx,.drawer-scrim.svelte-1cxnzx{display:none}.sheet-scrim.svelte-1cxnzx{position:fixed;inset:0 0 64px;z-index:60;background:color-mix(in srgb,var(--bg) 50%,transparent)}.sheet.svelte-1cxnzx{position:fixed;right:0;bottom:64px;left:0;z-index:61;display:flex;max-height:70vh;flex-direction:column;gap:12px;overflow:auto;padding:14px 16px 24px;border:1px solid var(--line);border-bottom:0;border-radius:18px 18px 0 0;background:var(--overlay);box-shadow:var(--sh-pop)}.sheet.svelte-1cxnzx .grabber:where(.svelte-1cxnzx){width:36px;height:4px;align-self:center;border-radius:2px;background:var(--line-strong)}.sheet.svelte-1cxnzx h2:where(.svelte-1cxnzx){margin:0;color:var(--fg);font:var(--t-h2)}.sheetrow.svelte-1cxnzx{display:grid;grid-template-columns:22px minmax(0,1fr);align-items:center;gap:12px;padding:12px 14px;border:1px solid var(--primary-line);border-radius:12px;background:var(--primary-soft);box-shadow:var(--glow-25)}.sn.svelte-1cxnzx{color:var(--primary-ink);font:var(--t-mono-500)}.sm.svelte-1cxnzx{margin-top:2px;color:var(--fg-3);font:var(--t-caption)}.sheetacts.svelte-1cxnzx{display:flex;gap:8px}.sk-head.svelte-1cxnzx{display:flex;height:52px;align-items:center;padding:0 16px}.sk-row.svelte-1cxnzx{display:grid;grid-template-columns:22px 1fr;gap:10px;align-items:center;height:46px;margin:0 10px 6px;padding:0 12px;border:1px solid var(--line-faint);border-radius:10px;background:var(--card)}.skeleton.tile.svelte-1cxnzx{width:22px;height:22px;border-radius:7px}.skeleton.tile.lg.svelte-1cxnzx{width:28px;height:28px;border-radius:8px}.sk-title.svelte-1cxnzx{display:flex;align-items:center;gap:12px;margin-top:18px}.sk-code.svelte-1cxnzx{display:flex;flex-direction:column;gap:8px;margin-top:24px;padding:20px;border:1px solid var(--line);border-radius:12px;background:var(--card)}@media(max-width:1023px){.focus.svelte-1cxnzx{grid-template-columns:minmax(0,1fr)}.stage-inner.svelte-1cxnzx{grid-template-columns:minmax(0,1fr) 248px}.center.svelte-1cxnzx{padding:18px 20px 28px}.focus.svelte-1cxnzx:not(.loading) .rail-left:where(.svelte-1cxnzx){position:absolute;top:0;bottom:0;left:0;z-index:20;width:min(320px,90%);box-shadow:var(--sh-pop);transform:translate(calc(-100% - 16px));transition:transform .16s ease-out}.focus.loading.svelte-1cxnzx .rail-left:where(.svelte-1cxnzx){display:none}.focus.callers-open.svelte-1cxnzx .rail-left:where(.svelte-1cxnzx){transform:none}.drawer-scrim.svelte-1cxnzx{position:absolute;inset:0;z-index:19;display:block;border-radius:var(--island-r);background:color-mix(in srgb,var(--bg) 60%,transparent)}.calledby.svelte-1cxnzx{display:inline-flex;float:right;margin:0 0 8px 12px}}@media(max-width:599px){.segmented.svelte-1cxnzx{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;margin-bottom:var(--gap);padding:4px;border:1px solid var(--line);border-radius:12px;background:var(--card)}.segmented.svelte-1cxnzx button:where(.svelte-1cxnzx){height:34px;border:1px solid transparent;border-radius:9px;color:var(--fg-2);font:var(--t-small-500)}.segmented.svelte-1cxnzx button.on:where(.svelte-1cxnzx){border-color:var(--primary-line);background:var(--primary-soft);color:var(--primary-ink)}.focus.svelte-1cxnzx{height:calc(100% - 50px)}.calledby.svelte-1cxnzx{display:none}.focus.svelte-1cxnzx:not(.loading) .rail-left:where(.svelte-1cxnzx){position:static;width:auto;box-shadow:none;transform:none;transition:none}.focus.pane-callers.svelte-1cxnzx .rail-left:where(.svelte-1cxnzx){display:flex}.focus.svelte-1cxnzx:not(.pane-callers) .rail-left:where(.svelte-1cxnzx){display:none}.focus.pane-callers.svelte-1cxnzx .stage:where(.svelte-1cxnzx){display:none}.stage-inner.svelte-1cxnzx{grid-template-columns:minmax(0,1fr)}.focus.pane-code.svelte-1cxnzx .rail-right:where(.svelte-1cxnzx),.focus.pane-calls.svelte-1cxnzx .center:where(.svelte-1cxnzx){display:none}.focus.pane-calls.svelte-1cxnzx .stage-inner:where(.svelte-1cxnzx){min-height:0!important}.center.svelte-1cxnzx{padding:14px 14px 24px}.stage-inner.svelte-1cxnzx .overlay{display:none}}.ocard.svelte-3o11pb{margin-top:18px;padding:0 10px 8px;border:1px solid var(--line);border-radius:12px;background:var(--card)}.subh.svelte-3o11pb{display:flex;align-items:center;gap:8px;height:48px;padding:0 8px;font:var(--t-label)}.subh.svelte-3o11pb .lead:where(.svelte-3o11pb){display:inline-flex;color:var(--fg-3)}.subh.svelte-3o11pb .n:where(.svelte-3o11pb){color:var(--fg-3);font:var(--t-caption)}.cols.svelte-3o11pb{display:grid;grid-template-columns:80px 48px 44px;margin-left:auto;color:var(--fg-3);font:var(--t-micro);letter-spacing:.6px;text-transform:uppercase}.cols.svelte-3o11pb span:where(.svelte-3o11pb):last-child{text-align:right}.orow.svelte-3o11pb{display:grid;height:30px;box-sizing:border-box;grid-template-columns:20px minmax(140px,auto) minmax(0,1fr) 80px 48px 44px;width:100%;align-items:center;gap:10px;padding:1px 8px;border-radius:8px;background-clip:content-box;text-align:left}.orow.svelte-3o11pb:hover{background-color:var(--raised)}.orow.sel.svelte-3o11pb{background-color:var(--primary-soft);box-shadow:inset 0 0 0 1px var(--primary-line),var(--glow-20)}.orow.sel.svelte-3o11pb .nm:where(.svelte-3o11pb){color:var(--primary-ink)}.nm.svelte-3o11pb{overflow:hidden;color:var(--fg);font:var(--t-mono);text-overflow:ellipsis;white-space:nowrap}.orow.dimmed.svelte-3o11pb .nm:where(.svelte-3o11pb){color:var(--fg-2)}.sig.svelte-3o11pb{overflow:hidden;color:var(--fg-4);font:var(--t-mono-sm);text-overflow:ellipsis;white-space:nowrap}.in.svelte-3o11pb{display:inline-flex;align-items:center;gap:8px}.in.svelte-3o11pb b:where(.svelte-3o11pb),.out.svelte-3o11pb{color:var(--fg);font:var(--t-mono-sm);font-variant-numeric:tabular-nums}.in.svelte-3o11pb .bar:where(.svelte-3o11pb){width:36px;height:3px}.zero.svelte-3o11pb b:where(.svelte-3o11pb),.out.zero.svelte-3o11pb{color:var(--fg-4)}.ln.svelte-3o11pb{color:var(--fg-4);font:var(--t-mono-sm);font-variant-numeric:tabular-nums;text-align:right}.note.svelte-3o11pb{padding:10px 8px 4px;color:var(--fg-3);font:var(--t-caption);line-height:1.5}.rail.svelte-122bwap{height:100%;overflow:auto;padding-bottom:12px}.rail-h.svelte-122bwap{position:sticky;top:0;z-index:2;display:flex;align-items:center;height:52px;padding:0 16px;background:var(--panel)}.title.svelte-122bwap{display:inline-flex;align-items:center;gap:8px;font:var(--t-label)}.title.svelte-122bwap .lead:where(.svelte-122bwap){display:inline-flex;color:var(--cyan)}.count.svelte-122bwap{display:inline-flex;min-width:22px;height:20px;align-items:center;justify-content:center;padding:0 7px;border-radius:10px;background:var(--raised);color:var(--fg-2);font:var(--t-mono-sm)}.filerow.svelte-122bwap{display:grid;grid-template-columns:14px minmax(0,1fr) auto;gap:8px;align-items:center;height:28px;margin:0 10px 2px;padding:0 8px;border-radius:8px;color:var(--fg-2);font:var(--t-mono);text-decoration:none}a.filerow.svelte-122bwap:hover,a.filerow.sel.svelte-122bwap{background:var(--raised);color:var(--fg)}a.filerow.sel.svelte-122bwap{box-shadow:inset 0 0 0 1px var(--fg-2)}.fi.svelte-122bwap{display:inline-flex;color:var(--fg-4)}.p.svelte-122bwap{display:flex;min-width:0}.dir.svelte-122bwap{overflow:hidden;flex:0 1 auto;color:var(--fg-3);text-overflow:ellipsis;white-space:nowrap}.base.svelte-122bwap{flex:0 0 auto;color:var(--fg);white-space:nowrap}.filerow.test.svelte-122bwap .base:where(.svelte-122bwap){color:var(--fg-3)}.n2.svelte-122bwap{min-width:26px;padding:1px 7px;border-radius:9px;background:var(--raised);color:var(--fg-2);font:var(--t-mono-sm);font-variant-numeric:tabular-nums;text-align:center}.sub.svelte-122bwap{margin:18px 16px 10px}.outside.svelte-122bwap{display:flex;flex-wrap:wrap;gap:6px;padding:0 16px}.note.svelte-122bwap{padding:10px 16px;color:var(--fg-3);font:var(--t-caption);line-height:1.45}.note.dim.svelte-122bwap{color:var(--fg-4)}.modes.svelte-a9lqu6{display:inline-flex;gap:4px;padding:3px;border:1px solid var(--line);border-radius:10px;background:var(--card)}.mode.svelte-a9lqu6{display:inline-flex;height:28px;align-items:center;gap:6px;padding:0 10px;border:1px solid transparent;border-radius:8px;color:var(--fg-2);font:var(--t-small-500);text-decoration:none;white-space:nowrap}.mode.svelte-a9lqu6:hover{background:var(--raised);color:var(--fg)}.mode.on.svelte-a9lqu6{border-color:var(--primary-line);background:var(--primary-soft);color:var(--primary-ink)}.scroll.svelte-1dtvc8r{height:100%;overflow:auto}.fileview.svelte-1dtvc8r{display:grid;grid-template-columns:288px minmax(0,1fr) 320px;gap:var(--gap);height:100%;min-height:0}.pane.svelte-1dtvc8r{min-width:0}.pane.right.svelte-1dtvc8r{display:flex;flex-direction:column}.rail-scroll.svelte-1dtvc8r{min-height:0;flex:1;overflow:auto}.thisfile.svelte-1dtvc8r{flex:0 0 auto;padding:14px 16px 16px;border-top:1px solid var(--line-faint)}.tiles.svelte-1dtvc8r{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:10px}.tiles.svelte-1dtvc8r .value:where(.svelte-1dtvc8r){font-size:20px}.center.svelte-1dtvc8r{min-width:0;overflow:auto;padding:20px 24px 32px}.card-h.svelte-1dtvc8r{display:flex;align-items:center;gap:14px}.titles.svelte-1dtvc8r{min-width:0}.tl.svelte-1dtvc8r{display:flex;align-items:center;gap:10px}.card-h.svelte-1dtvc8r h1:where(.svelte-1dtvc8r){margin:0;overflow:hidden;color:var(--fg);font:var(--t-title-mono);font-variant-ligatures:none;text-overflow:ellipsis;white-space:nowrap}.card-h.svelte-1dtvc8r h1.gen:where(.svelte-1dtvc8r){color:var(--fg-4)}.spacer.svelte-1dtvc8r{flex:1 1 auto}.loc.svelte-1dtvc8r{display:flex;flex-wrap:wrap;gap:4px 12px;margin-top:4px;color:var(--fg-2);font:var(--t-mono-sm)}.badges.svelte-1dtvc8r{display:flex;flex-wrap:wrap;gap:8px}.badges.svelte-1dtvc8r:not(:empty){margin-top:14px}.linkish.svelte-1dtvc8r{color:inherit;font:inherit;font-weight:600;text-decoration:underline;text-underline-offset:3px}.banner.svelte-1dtvc8r{margin-top:14px}.sk-list.svelte-1dtvc8r{display:flex;flex-direction:column;gap:12px;padding:20px}@media(max-width:1023px){.fileview.svelte-1dtvc8r{grid-template-columns:minmax(0,1fr) 248px}.pane[data-pane=left].svelte-1dtvc8r{display:none}.center.svelte-1dtvc8r{padding:18px 20px 28px}}@media(max-width:599px){.fileview.svelte-1dtvc8r{grid-template-columns:minmax(0,1fr)}.pane.right.svelte-1dtvc8r{display:none}.card-h.svelte-1dtvc8r{flex-wrap:wrap}.center.svelte-1dtvc8r{padding:14px}}.arcs.svelte-7a2f5z{position:absolute;top:0;left:0;overflow:visible}.arc.svelte-7a2f5z{fill:none;stroke:var(--cyan-line);stroke-width:1;pointer-events:none}.arc.uncertain.svelte-7a2f5z{stroke-dasharray:2 3}.arc.heur.svelte-7a2f5z{stroke:var(--fg-2);stroke-dasharray:6 3}.arc.lit.svelte-7a2f5z{stroke:var(--cyan);filter:var(--glow-cyan-80-f);stroke-width:1.5}.hit.svelte-7a2f5z{fill:none;stroke:transparent;stroke-width:10;cursor:pointer}.code.svelte-a7mbfv{position:absolute;inset:0;font:var(--t-code)}.ln.svelte-a7mbfv{position:absolute;right:0;left:0;display:grid;height:20px;box-sizing:border-box;grid-template-columns:44px 1fr 18px;align-items:stretch}.ln.svelte-a7mbfv:hover{background:var(--raised)}.ln.hot.svelte-a7mbfv{background:var(--primary-soft)}.ln.hot.svelte-a7mbfv:before{position:absolute;top:0;bottom:0;left:0;width:2px;background:var(--grad-brand-v);content:""}.no.svelte-a7mbfv{padding-right:12px;color:var(--fg-4);font:var(--t-lineno);text-align:right;user-select:none}.tx.svelte-a7mbfv{overflow:hidden;color:var(--fg);white-space:pre}.pending.svelte-a7mbfv{display:inline-block;width:34%;height:8px;border-radius:4px;background:var(--raised);vertical-align:middle}.port.svelte-a7mbfv{position:relative}.port.svelte-a7mbfv i:where(.svelte-a7mbfv){position:absolute;top:6.5px;right:5px;width:7px;height:7px;border:1px solid var(--cyan-line);border-radius:50%;background:transparent}.port.svelte-a7mbfv i.sure:where(.svelte-a7mbfv){border-color:var(--cyan);background:var(--cyan)}.ln.hot.svelte-a7mbfv .port:where(.svelte-a7mbfv) i:where(.svelte-a7mbfv){border-color:var(--cyan);background:var(--cyan);box-shadow:var(--glow-cyan-90)}.t-c.svelte-a7mbfv{color:var(--syn-com)}.t-s.svelte-a7mbfv{color:var(--syn-str)}.t-k.svelte-a7mbfv{color:var(--syn-kw);font-weight:500}.t-n.svelte-a7mbfv{color:var(--syn-num)}.t-t.svelte-a7mbfv{color:var(--syn-type)}.t-p.svelte-a7mbfv{color:var(--syn-punct)}.t-def.svelte-a7mbfv{color:var(--fg);font-weight:600}.ref.svelte-a7mbfv{margin:0 -3px;padding:1px 3px;border-radius:5px;background:color-mix(in srgb,var(--cyan-soft) 85%,transparent);color:var(--cyan);cursor:pointer}.ref.svelte-a7mbfv:hover,.ref.hot.svelte-a7mbfv,.ln.hot.svelte-a7mbfv .ref:where(.svelte-a7mbfv){background:var(--cyan-soft);box-shadow:inset 0 0 0 1px var(--cyan-line)}.ref.uncertain.svelte-a7mbfv{background:transparent;color:var(--fg-2);text-decoration:underline dotted var(--fg-4);text-underline-offset:3px}.ref.stub.svelte-a7mbfv{background:transparent;color:var(--fg-2);cursor:default;text-decoration:underline dotted var(--line-strong);text-underline-offset:3px}.ref.stub.svelte-a7mbfv:hover{box-shadow:none}.navrail.svelte-3z23e6{display:grid;grid-template-rows:auto minmax(0,1fr) auto;height:100%;background:var(--panel)}.navh.svelte-3z23e6{display:flex;align-items:baseline;justify-content:space-between;padding:12px 12px 8px;border-bottom:1px solid var(--rule-soft);font-weight:600;font-size:13px}.navlist.svelte-3z23e6{min-height:0;overflow:auto}.nrow.svelte-3z23e6{border-radius:6px;display:grid;height:24px;box-sizing:border-box;grid-template-columns:14px minmax(0,1fr) auto;width:100%;align-items:center;gap:7px;padding-right:8px;text-align:left}.nrow.svelte-3z23e6:hover{background:var(--raised)}.nrow.current.svelte-3z23e6{background:var(--primary-soft);color:var(--primary-ink)}.nm.svelte-3z23e6{overflow:hidden;font:var(--t-mono);text-overflow:ellipsis;white-space:nowrap}.nrow.dimmed.svelte-3z23e6 .nm:where(.svelte-3z23e6){color:var(--ink-3)}.ln.svelte-3z23e6{color:var(--ink-4);font:10.5px var(--mono);font-variant-numeric:tabular-nums}.note.svelte-3z23e6{padding:8px 12px;border-top:1px solid var(--rule-faint);color:var(--ink-3);font-size:11px}.rrow.svelte-325cso{border-radius:10px;position:absolute;right:12px;left:14px;display:grid;height:34px;box-sizing:border-box;grid-template-columns:16px 1fr;gap:8px;align-items:center;padding:0 6px;border:1px solid transparent;background:var(--card);cursor:pointer}.rrow.svelte-325cso:hover{border-color:var(--line);background:var(--raised)}.rrow.focused.svelte-325cso{border-color:var(--fg-2)}.rrow.hot.svelte-325cso{border-color:var(--primary-line);background:var(--primary-soft);box-shadow:var(--glow-30)}.body.svelte-325cso{min-width:0}.nm.svelte-325cso{overflow:hidden;font:var(--t-mono-500);text-overflow:ellipsis;white-space:nowrap}.rrow.uncertain.svelte-325cso .nm:where(.svelte-325cso){color:var(--ink-2);text-decoration:underline dotted var(--ink-4);text-underline-offset:3px}.meta.svelte-325cso{display:flex;gap:8px;overflow:hidden;color:var(--ink-3);font-size:11px;text-overflow:ellipsis;white-space:nowrap}.tag.svelte-325cso{flex:0 0 auto;padding:0 4px;border:1px solid var(--rule-soft);color:var(--ink-3);font-size:10.5px}.scroll.svelte-1ykko46{height:100%;overflow:auto}.codeview.svelte-1ykko46{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--gap);height:100%;min-height:0}.loadingrow.svelte-1ykko46{padding:24px}@media(min-width:1400px){.codeview.wide.svelte-1ykko46{grid-template-columns:240px minmax(0,1fr)}}.nav.svelte-1ykko46{display:none;min-height:0}@media(min-width:1400px){.codeview.wide.svelte-1ykko46 .nav:where(.svelte-1ykko46){display:block}}.main.svelte-1ykko46{display:grid;grid-template-rows:auto minmax(0,1fr);min-width:0;min-height:0}.band.svelte-1ykko46{padding:16px 22px 10px;border-bottom:1px solid var(--line-faint);background:var(--panel)}.card-h.svelte-1ykko46{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px}.card-h.svelte-1ykko46 h1:where(.svelte-1ykko46){margin:0;color:var(--fg);font:var(--t-title-mono)}.spacer.svelte-1ykko46{flex:1 1 auto}.kindword.svelte-1ykko46{color:var(--fg-3);font:var(--t-small)}.loc.svelte-1ykko46{color:var(--fg-2);font:var(--t-mono-sm)}.toolbar.svelte-1ykko46{display:flex;justify-content:space-between;gap:16px;margin-top:10px;color:var(--fg-2);font:var(--t-caption)}.railnote.svelte-1ykko46 .n:where(.svelte-1ykko46){color:var(--fg-3)}.arcnote.svelte-1ykko46,.railnote.svelte-1ykko46{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.banner.svelte-1ykko46{margin-top:10px}.note.svelte-1ykko46{margin-top:10px;color:var(--fg-3);font:var(--t-small);line-height:1.5}.toolbar.hidden.svelte-1ykko46{display:none}.stage.svelte-1ykko46{position:relative;min-height:0;overflow:auto}.stage-inner.svelte-1ykko46{position:relative;display:grid;grid-template-columns:56px minmax(420px,1fr) 320px;min-width:100%}.arccol.svelte-1ykko46{position:relative;border-right:1px solid var(--line-faint)}.codecol.svelte-1ykko46{position:relative;min-width:0;padding-left:4px}.rail.svelte-1ykko46{position:relative;border-left:1px solid var(--line-faint)}@media(max-width:1100px){.stage-inner.svelte-1ykko46{grid-template-columns:56px minmax(320px,1fr) 260px}}.transparent.svelte-1wg91mu{background:transparent}.a11y-hidden.svelte-13pq11u{display:none}.a11y-live-msg.svelte-13pq11u{position:absolute;width:1px;height:1px;margin:-1px;border:0;padding:0;overflow:hidden;clip:rect(0px,0px,0px,0px);clip-path:inset(100%)}.svelte-flow__selection.svelte-1vr3gfi{position:absolute;top:0;left:0}.svelte-flow__selection-wrapper.svelte-sf2y5e{position:absolute;top:0;left:0;z-index:2000;pointer-events:all}.svelte-flow__selection-wrapper.svelte-sf2y5e:focus,.svelte-flow__selection-wrapper.svelte-sf2y5e:focus-visible{outline:none}.svelte-flow.svelte-mkap6j{width:100%;height:100%;overflow:hidden;position:relative;z-index:0}.svelte-flow{direction:ltr;--xy-edge-stroke-default: #b1b1b7;--xy-edge-stroke-width-default: 1;--xy-edge-stroke-selected-default: #555;--xy-connectionline-stroke-default: #b1b1b7;--xy-connectionline-stroke-width-default: 1;--xy-attribution-background-color-default: rgba(255, 255, 255, .5);--xy-minimap-background-color-default: #fff;--xy-minimap-mask-background-color-default: rgba(240, 240, 240, .6);--xy-minimap-mask-stroke-color-default: transparent;--xy-minimap-mask-stroke-width-default: 1;--xy-minimap-node-background-color-default: #e2e2e2;--xy-minimap-node-stroke-color-default: transparent;--xy-minimap-node-stroke-width-default: 2;--xy-background-color-default: transparent;--xy-background-pattern-dots-color-default: #91919a;--xy-background-pattern-lines-color-default: #eee;--xy-background-pattern-cross-color-default: #e2e2e2;background-color:var(--xy-background-color, var(--xy-background-color-default));--xy-node-color-default: inherit;--xy-node-border-default: 1px solid #1a192b;--xy-node-background-color-default: #fff;--xy-node-group-background-color-default: rgba(240, 240, 240, .25);--xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(0, 0, 0, .08);--xy-node-boxshadow-selected-default: 0 0 0 .5px #1a192b;--xy-node-border-radius-default: 3px;--xy-handle-background-color-default: #1a192b;--xy-handle-border-color-default: #fff;--xy-selection-background-color-default: rgba(0, 89, 220, .08);--xy-selection-border-default: 1px dotted rgba(0, 89, 220, .8);--xy-controls-button-background-color-default: #fefefe;--xy-controls-button-background-color-hover-default: #f4f4f4;--xy-controls-button-color-default: inherit;--xy-controls-button-color-hover-default: inherit;--xy-controls-button-border-color-default: #eee;--xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, .08);--xy-edge-label-background-color-default: #ffffff;--xy-edge-label-color-default: inherit;--xy-resize-background-color-default: #3367d9}.svelte-flow.dark{--xy-edge-stroke-default: #3e3e3e;--xy-edge-stroke-width-default: 1;--xy-edge-stroke-selected-default: #727272;--xy-connectionline-stroke-default: #b1b1b7;--xy-connectionline-stroke-width-default: 1;--xy-attribution-background-color-default: rgba(150, 150, 150, .25);--xy-minimap-background-color-default: #141414;--xy-minimap-mask-background-color-default: rgba(60, 60, 60, .6);--xy-minimap-mask-stroke-color-default: transparent;--xy-minimap-mask-stroke-width-default: 1;--xy-minimap-node-background-color-default: #2b2b2b;--xy-minimap-node-stroke-color-default: transparent;--xy-minimap-node-stroke-width-default: 2;--xy-background-color-default: #141414;--xy-background-pattern-dots-color-default: #555;--xy-background-pattern-lines-color-default: #333;--xy-background-pattern-cross-color-default: #333;--xy-node-color-default: #f8f8f8;--xy-node-border-default: 1px solid #3c3c3c;--xy-node-background-color-default: #1e1e1e;--xy-node-group-background-color-default: rgba(240, 240, 240, .25);--xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(255, 255, 255, .08);--xy-node-boxshadow-selected-default: 0 0 0 .5px #999;--xy-handle-background-color-default: #bebebe;--xy-handle-border-color-default: #1e1e1e;--xy-selection-background-color-default: rgba(200, 200, 220, .08);--xy-selection-border-default: 1px dotted rgba(200, 200, 220, .8);--xy-controls-button-background-color-default: #2b2b2b;--xy-controls-button-background-color-hover-default: #3e3e3e;--xy-controls-button-color-default: #f8f8f8;--xy-controls-button-color-hover-default: #fff;--xy-controls-button-border-color-default: #5b5b5b;--xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, .08);--xy-edge-label-background-color-default: #141414;--xy-edge-label-color-default: #f8f8f8}.svelte-flow__background{background-color:var(--xy-background-color-props, var(--xy-background-color, var(--xy-background-color-default)));pointer-events:none;z-index:-1}.svelte-flow__container{position:absolute;width:100%;height:100%;top:0;left:0}.svelte-flow__pane{z-index:1;touch-action:none}.svelte-flow__pane.draggable{cursor:grab}.svelte-flow__pane.dragging{cursor:grabbing}.svelte-flow__pane.selection{cursor:pointer}.svelte-flow__viewport{transform-origin:0 0;z-index:2;pointer-events:none}.svelte-flow__renderer{z-index:4}.svelte-flow__selection{z-index:6}.svelte-flow__nodesselection-rect:focus,.svelte-flow__nodesselection-rect:focus-visible{outline:none}.svelte-flow__edge-path{stroke:var(--xy-edge-stroke, var(--xy-edge-stroke-default));stroke-width:var(--xy-edge-stroke-width, var(--xy-edge-stroke-width-default));fill:none}.svelte-flow__connection-path{stroke:var(--xy-connectionline-stroke, var(--xy-connectionline-stroke-default));stroke-width:var(--xy-connectionline-stroke-width, var(--xy-connectionline-stroke-width-default));fill:none}.svelte-flow .svelte-flow__edges{position:absolute}.svelte-flow .svelte-flow__edges svg{overflow:visible;position:absolute;pointer-events:none}.svelte-flow__edge{pointer-events:visibleStroke}.svelte-flow__edge.selectable{cursor:pointer}.svelte-flow__edge.animated path{stroke-dasharray:5;animation:dashdraw .5s linear infinite}.svelte-flow__edge.animated path.svelte-flow__edge-interaction{stroke-dasharray:none;animation:none}.svelte-flow__edge.inactive{pointer-events:none}.svelte-flow__edge.selected,.svelte-flow__edge:focus,.svelte-flow__edge:focus-visible{outline:none}.svelte-flow__edge.selected .svelte-flow__edge-path,.svelte-flow__edge.selectable:focus .svelte-flow__edge-path,.svelte-flow__edge.selectable:focus-visible .svelte-flow__edge-path{stroke:var(--xy-edge-stroke-selected, var(--xy-edge-stroke-selected-default))}.svelte-flow__edge-textwrapper{pointer-events:all}.svelte-flow__edge .svelte-flow__edge-text{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.svelte-flow__arrowhead polyline{stroke:var(--xy-edge-stroke, var(--xy-edge-stroke-default))}.svelte-flow__arrowhead polyline.arrowclosed{fill:var(--xy-edge-stroke, var(--xy-edge-stroke-default))}.svelte-flow__connection{pointer-events:none}.svelte-flow__connection .animated{stroke-dasharray:5;animation:dashdraw .5s linear infinite}svg.svelte-flow__connectionline{z-index:1001;overflow:visible;position:absolute}.svelte-flow__nodes{pointer-events:none;transform-origin:0 0}.svelte-flow__node{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:all;transform-origin:0 0;box-sizing:border-box;cursor:default}.svelte-flow__node.selectable{cursor:pointer}.svelte-flow__node.draggable{cursor:grab;pointer-events:all}.svelte-flow__node.draggable.dragging{cursor:grabbing}.svelte-flow__nodesselection{z-index:3;transform-origin:left top;pointer-events:none}.svelte-flow__nodesselection-rect{position:absolute;pointer-events:all;cursor:grab}.svelte-flow__handle{position:absolute;pointer-events:none;min-width:5px;min-height:5px;width:6px;height:6px;background-color:var(--xy-handle-background-color, var(--xy-handle-background-color-default));border:1px solid var(--xy-handle-border-color, var(--xy-handle-border-color-default));border-radius:100%}.svelte-flow__handle.connectingfrom{pointer-events:all}.svelte-flow__handle.connectionindicator{pointer-events:all;cursor:crosshair}.svelte-flow__handle-bottom{top:auto;left:50%;bottom:0;transform:translate(-50%,50%)}.svelte-flow__handle-top{top:0;left:50%;transform:translate(-50%,-50%)}.svelte-flow__handle-left{top:50%;left:0;transform:translate(-50%,-50%)}.svelte-flow__handle-right{top:50%;right:0;transform:translate(50%,-50%)}.svelte-flow__edgeupdater{cursor:move;pointer-events:all}.svelte-flow__pane.selection .svelte-flow__panel{pointer-events:none}.svelte-flow__panel{position:absolute;z-index:5;margin:15px}.svelte-flow__panel.top{top:0}.svelte-flow__panel.bottom{bottom:0}.svelte-flow__panel.top.center,.svelte-flow__panel.bottom.center{left:50%;transform:translate(-15px) translate(-50%)}.svelte-flow__panel.left{left:0}.svelte-flow__panel.right{right:0}.svelte-flow__panel.left.center,.svelte-flow__panel.right.center{top:50%;transform:translateY(-15px) translateY(-50%)}.svelte-flow__attribution{font-size:10px;background:var(--xy-attribution-background-color, var(--xy-attribution-background-color-default));padding:2px 3px;margin:0}.svelte-flow__attribution a{text-decoration:none;color:#999}@keyframes dashdraw{0%{stroke-dashoffset:10}}.svelte-flow__edgelabel-renderer{position:absolute;width:100%;height:100%;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;left:0;top:0}.svelte-flow__viewport-portal{position:absolute;width:100%;height:100%;left:0;top:0;-webkit-user-select:none;-moz-user-select:none;user-select:none}.svelte-flow__minimap{background:var( --xy-minimap-background-color-props, var(--xy-minimap-background-color, var(--xy-minimap-background-color-default)) )}.svelte-flow__minimap-svg{display:block}.svelte-flow__minimap-mask{fill:var( --xy-minimap-mask-background-color-props, var(--xy-minimap-mask-background-color, var(--xy-minimap-mask-background-color-default)) );stroke:var( --xy-minimap-mask-stroke-color-props, var(--xy-minimap-mask-stroke-color, var(--xy-minimap-mask-stroke-color-default)) );stroke-width:var( --xy-minimap-mask-stroke-width-props, var(--xy-minimap-mask-stroke-width, var(--xy-minimap-mask-stroke-width-default)) )}.svelte-flow__minimap-node{fill:var( --xy-minimap-node-background-color-props, var(--xy-minimap-node-background-color, var(--xy-minimap-node-background-color-default)) );stroke:var( --xy-minimap-node-stroke-color-props, var(--xy-minimap-node-stroke-color, var(--xy-minimap-node-stroke-color-default)) );stroke-width:var( --xy-minimap-node-stroke-width-props, var(--xy-minimap-node-stroke-width, var(--xy-minimap-node-stroke-width-default)) )}.svelte-flow__background-pattern.dots{fill:var( --xy-background-pattern-color-props, var(--xy-background-pattern-color, var(--xy-background-pattern-dots-color-default)) )}.svelte-flow__background-pattern.lines{stroke:var( --xy-background-pattern-color-props, var(--xy-background-pattern-color, var(--xy-background-pattern-lines-color-default)) )}.svelte-flow__background-pattern.cross{stroke:var( --xy-background-pattern-color-props, var(--xy-background-pattern-color, var(--xy-background-pattern-cross-color-default)) )}.svelte-flow__controls{display:flex;flex-direction:column;box-shadow:var(--xy-controls-box-shadow, var(--xy-controls-box-shadow-default))}.svelte-flow__controls.horizontal{flex-direction:row}.svelte-flow__controls-button{display:flex;justify-content:center;align-items:center;height:26px;width:26px;padding:4px;border:none;background:var(--xy-controls-button-background-color, var(--xy-controls-button-background-color-default));border-bottom:1px solid var( --xy-controls-button-border-color-props, var(--xy-controls-button-border-color, var(--xy-controls-button-border-color-default)) );color:var( --xy-controls-button-color-props, var(--xy-controls-button-color, var(--xy-controls-button-color-default)) );cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.svelte-flow__controls-button svg{width:100%;max-width:12px;max-height:12px;fill:currentColor}.svelte-flow__edge.updating .svelte-flow__edge-path{stroke:#777}.svelte-flow__edge-text{font-size:10px}.svelte-flow__node.selectable:focus,.svelte-flow__node.selectable:focus-visible{outline:none}.svelte-flow__node-input,.svelte-flow__node-default,.svelte-flow__node-output,.svelte-flow__node-group{padding:10px;border-radius:var(--xy-node-border-radius, var(--xy-node-border-radius-default));width:150px;font-size:12px;color:var(--xy-node-color, var(--xy-node-color-default));text-align:center;border:var(--xy-node-border, var(--xy-node-border-default));background-color:var(--xy-node-background-color, var(--xy-node-background-color-default))}.svelte-flow__node-input.selectable:hover,.svelte-flow__node-default.selectable:hover,.svelte-flow__node-output.selectable:hover,.svelte-flow__node-group.selectable:hover{box-shadow:var(--xy-node-boxshadow-hover, var(--xy-node-boxshadow-hover-default))}.svelte-flow__node-input.selectable.selected,.svelte-flow__node-input.selectable:focus,.svelte-flow__node-input.selectable:focus-visible,.svelte-flow__node-default.selectable.selected,.svelte-flow__node-default.selectable:focus,.svelte-flow__node-default.selectable:focus-visible,.svelte-flow__node-output.selectable.selected,.svelte-flow__node-output.selectable:focus,.svelte-flow__node-output.selectable:focus-visible,.svelte-flow__node-group.selectable.selected,.svelte-flow__node-group.selectable:focus,.svelte-flow__node-group.selectable:focus-visible{box-shadow:var(--xy-node-boxshadow-selected, var(--xy-node-boxshadow-selected-default))}.svelte-flow__node-group{background-color:var(--xy-node-group-background-color, var(--xy-node-group-background-color-default))}.svelte-flow__nodesselection-rect,.svelte-flow__selection{background:var(--xy-selection-background-color, var(--xy-selection-background-color-default));border:var(--xy-selection-border, var(--xy-selection-border-default))}.svelte-flow__nodesselection-rect:focus,.svelte-flow__nodesselection-rect:focus-visible,.svelte-flow__selection:focus,.svelte-flow__selection:focus-visible{outline:none}.svelte-flow__controls-button:hover{background:var( --xy-controls-button-background-color-hover-props, var(--xy-controls-button-background-color-hover, var(--xy-controls-button-background-color-hover-default)) );color:var( --xy-controls-button-color-hover-props, var(--xy-controls-button-color-hover, var(--xy-controls-button-color-hover-default)) )}.svelte-flow__controls-button:disabled{pointer-events:none}.svelte-flow__controls-button:disabled svg{fill-opacity:.4}.svelte-flow__controls-button:last-child{border-bottom:none}.svelte-flow__controls.horizontal .svelte-flow__controls-button{border-bottom:none;border-right:1px solid var( --xy-controls-button-border-color-props, var(--xy-controls-button-border-color, var(--xy-controls-button-border-color-default)) )}.svelte-flow__controls.horizontal .svelte-flow__controls-button:last-child{border-right:none}.svelte-flow__resize-control{position:absolute}.svelte-flow__resize-control.left,.svelte-flow__resize-control.right{cursor:ew-resize}.svelte-flow__resize-control.top,.svelte-flow__resize-control.bottom{cursor:ns-resize}.svelte-flow__resize-control.top.left,.svelte-flow__resize-control.bottom.right{cursor:nwse-resize}.svelte-flow__resize-control.bottom.left,.svelte-flow__resize-control.top.right{cursor:nesw-resize}.svelte-flow__resize-control.handle{width:5px;height:5px;border:1px solid #fff;border-radius:1px;background-color:var(--xy-resize-background-color, var(--xy-resize-background-color-default));translate:-50% -50%}.svelte-flow__resize-control.handle.left{left:0;top:50%}.svelte-flow__resize-control.handle.right{left:100%;top:50%}.svelte-flow__resize-control.handle.top{left:50%;top:0}.svelte-flow__resize-control.handle.bottom{left:50%;top:100%}.svelte-flow__resize-control.handle.top.left,.svelte-flow__resize-control.handle.bottom.left{left:0}.svelte-flow__resize-control.handle.top.right,.svelte-flow__resize-control.handle.bottom.right{left:100%}.svelte-flow__resize-control.line{border-color:var(--xy-resize-background-color, var(--xy-resize-background-color-default));border-width:0;border-style:solid}.svelte-flow__resize-control.line.left,.svelte-flow__resize-control.line.right{width:1px;transform:translate(-50%);top:0;height:100%}.svelte-flow__resize-control.line.left{left:0;border-left-width:1px}.svelte-flow__resize-control.line.right{left:100%;border-right-width:1px}.svelte-flow__resize-control.line.top,.svelte-flow__resize-control.line.bottom{height:1px;transform:translateY(-50%);left:0;width:100%}.svelte-flow__resize-control.line.top{top:0;border-top-width:1px}.svelte-flow__resize-control.line.bottom{border-bottom-width:1px;top:100%}.svelte-flow__edge-label{text-align:center;position:absolute;padding:2px;font-size:10px;color:var(--xy-edge-label-color, var(--xy-edge-label-color-default));background:var(--xy-edge-label-background-color, var(--xy-edge-label-background-color-default))}.svelte-flow__container{-webkit-user-select:none;-moz-user-select:none;user-select:none}.mnode.svelte-1ymw5ah{position:relative;display:flex;flex-direction:column;justify-content:center;gap:2px;box-sizing:border-box;padding:0 18px 0 44px;overflow:hidden;border:1px solid var(--line);border-radius:12px;background:var(--card);box-shadow:var(--sh-card);color:var(--fg);cursor:pointer;font:inherit;text-align:left;transition:border-color .12s,background-color .12s,opacity .12s}.mnode.svelte-1ymw5ah:hover{border-color:var(--line-strong)}.mnode.sel.svelte-1ymw5ah{border:1.5px solid transparent;background:linear-gradient(var(--primary-soft),var(--primary-soft)) padding-box,var(--grad-brand) border-box;box-shadow:var(--glow-45)}.mnode.sel.svelte-1ymw5ah .name:where(.svelte-1ymw5ah){color:var(--primary-ink)}.mnode.dimmed.svelte-1ymw5ah{opacity:.45}.tile.svelte-1ymw5ah{position:absolute;top:14px;left:11px;display:inline-flex}.count.island.svelte-1ymw5ah{color:var(--amber)}.mnode.gen.svelte-1ymw5ah{color:var(--fg-4)}.mnode.gen.svelte-1ymw5ah .count:where(.svelte-1ymw5ah){color:var(--fg-4)}.mnode.test.svelte-1ymw5ah{border-style:dashed;border-color:var(--line-strong)}.mnode.svelte-1ymw5ah:focus-visible{outline-offset:4px}.weight.svelte-1ymw5ah{position:absolute;bottom:3px;left:12px;max-width:calc(100% - 24px);height:2px;border-radius:1px;background:var(--grad-data);pointer-events:none}.mnode.dimmed.svelte-1ymw5ah .weight:where(.svelte-1ymw5ah),.mnode.gen.svelte-1ymw5ah .weight:where(.svelte-1ymw5ah){opacity:.3}.name.svelte-1ymw5ah{overflow:hidden;font:var(--t-mono-500);text-overflow:ellipsis;white-space:nowrap}.count.svelte-1ymw5ah{overflow:hidden;color:var(--fg-3);font:var(--t-caption);text-overflow:ellipsis;white-space:nowrap}.svelte-flow__edge-path.medge{stroke:var(--line-strong);stroke-opacity:.7;fill:none}.svelte-flow__edge-path.medge.hot{stroke:var(--cyan);stroke-opacity:1;filter:var(--glow-cyan-55-f)}.svelte-flow__edge-path.medge.dimmed{stroke-opacity:.35}.svelte-flow__edge-path.medge.back{stroke:var(--violet);stroke-opacity:.8;stroke-dasharray:4 3}.hit.svelte-wy6r9a{stroke:transparent;stroke-width:12;fill:none;pointer-events:stroke;cursor:crosshair}.exp.svelte-14ndwen{display:flex;flex:0 0 auto;margin-left:auto;gap:6px}.mapside.svelte-dzmqqy{display:flex;min-height:0;flex-direction:column;color:var(--fg-2);font:var(--t-small)}.tabs.svelte-dzmqqy{display:flex;flex:0 0 auto;gap:18px;padding:0 16px;border-bottom:1px solid var(--line-faint)}.tabs.svelte-dzmqqy button:where(.svelte-dzmqqy){position:relative;height:46px;color:var(--fg-3);font:var(--t-body-500)}.tabs.svelte-dzmqqy button:where(.svelte-dzmqqy):hover{color:var(--fg)}.tabs.svelte-dzmqqy button.on:where(.svelte-dzmqqy){color:var(--fg)}.tabs.svelte-dzmqqy button.on:where(.svelte-dzmqqy):after{position:absolute;right:0;bottom:-1px;left:0;height:2px;border-radius:1px;background:var(--grad-brand);content:""}.body.svelte-dzmqqy{min-height:0;flex:1;overflow:auto;padding:14px 16px 16px}h2.svelte-dzmqqy{margin:0 0 8px;color:var(--fg);font:var(--t-h2)}p.svelte-dzmqqy{margin:0 0 10px;line-height:1.5}.dim.svelte-dzmqqy{color:var(--fg-3)}.mono.svelte-dzmqqy{font-family:var(--mono)}.mhead.svelte-dzmqqy{display:grid;grid-template-columns:32px minmax(0,1fr) auto;align-items:center;gap:12px;margin-bottom:14px}.mt.svelte-dzmqqy{display:flex;min-width:0;flex-direction:column}.mt.svelte-dzmqqy b:where(.svelte-dzmqqy){overflow:hidden;color:var(--fg);font:var(--t-mono-500);text-overflow:ellipsis;white-space:nowrap}.mt.svelte-dzmqqy .dim:where(.svelte-dzmqqy){font:var(--t-caption)}.tiles.svelte-dzmqqy{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-bottom:14px}.tiles.svelte-dzmqqy .value:where(.svelte-dzmqqy){font-size:20px}.reach.svelte-dzmqqy b:where(.svelte-dzmqqy){color:var(--fg)}.section.svelte-dzmqqy{display:flex;align-items:center;gap:6px;margin:16px 0 8px}.rank.svelte-dzmqqy{display:grid;width:100%;grid-template-columns:minmax(0,1fr) auto;gap:2px 8px;padding:6px 0;color:var(--fg);text-align:left}.rank.svelte-dzmqqy:hover .rn:where(.svelte-dzmqqy){color:var(--primary-ink)}.rn.svelte-dzmqqy{overflow:hidden;font:var(--t-mono);text-overflow:ellipsis;white-space:nowrap}.rc.svelte-dzmqqy{color:var(--fg-2);font:var(--t-mono-sm)}.rank.svelte-dzmqqy .bar:where(.svelte-dzmqqy){grid-column:1 / -1;height:3px}.field.svelte-dzmqqy{display:grid;grid-template-columns:72px minmax(0,1fr);align-items:center;gap:10px;margin-bottom:8px;color:var(--fg-3)}.field.svelte-dzmqqy select:where(.svelte-dzmqqy){height:32px;min-width:0;padding:0 10px;border:1px solid var(--line);border-radius:8px;background:var(--raised);color:var(--fg);font:var(--t-mono-sm)}.toggle.svelte-dzmqqy{position:relative;display:flex;align-items:center;gap:10px;margin-top:6px;color:var(--fg);cursor:pointer}.toggle.svelte-dzmqqy input:where(.svelte-dzmqqy){position:absolute;opacity:0}.switch.svelte-dzmqqy{position:relative;width:30px;height:18px;flex:0 0 auto;border-radius:9px;background:var(--raised);box-shadow:inset 0 0 0 1px var(--line-strong);transition:background-color .12s}.switch.svelte-dzmqqy:after{position:absolute;top:3px;left:3px;width:12px;height:12px;border-radius:50%;background:var(--fg-3);content:"";transition:transform .12s}.toggle.svelte-dzmqqy input:where(.svelte-dzmqqy):checked+.switch:where(.svelte-dzmqqy){background:var(--grad-button);box-shadow:none}.toggle.svelte-dzmqqy input:where(.svelte-dzmqqy):checked+.switch:where(.svelte-dzmqqy):after{background:var(--on-primary);transform:translate(12px)}.toggle.svelte-dzmqqy input:where(.svelte-dzmqqy):focus-visible+.switch:where(.svelte-dzmqqy){outline:2px solid var(--primary);outline-offset:3px}.notes.svelte-dzmqqy p:where(.svelte-dzmqqy){font:var(--t-caption)}details.svelte-dzmqqy{margin-top:10px;padding:10px 12px;border:1px solid var(--line-faint);border-radius:10px;background:var(--card)}summary.svelte-dzmqqy{color:var(--fg);cursor:pointer;font:var(--t-small-500)}summary.svelte-dzmqqy .dim:where(.svelte-dzmqqy){font-weight:400}.cyc.svelte-dzmqqy{padding:4px 0;font:var(--t-mono-sm)}.cyc.svelte-dzmqqy b:where(.svelte-dzmqqy){color:var(--fg)}.filerow.svelte-dzmqqy{display:flex;align-items:center;gap:8px;padding:5px 4px;overflow:hidden;border-radius:6px;color:var(--fg-2);font:var(--t-mono-sm);text-overflow:ellipsis;white-space:nowrap}.filerow.svelte-dzmqqy:hover{background:var(--raised);color:var(--fg)}.filerow.gen.svelte-dzmqqy{color:var(--fg-4)}.pair.svelte-dzmqqy{padding:4px 0;font:var(--t-mono-sm)}.foot.svelte-dzmqqy{display:flex;flex:0 0 auto;flex-wrap:wrap;gap:8px;padding:12px 16px;border-top:1px solid var(--line-faint)}.foot.svelte-dzmqqy .exp{margin-left:0}.legend.svelte-148kree{position:absolute;bottom:16px;left:16px;z-index:4;max-width:min(460px,calc(100% - 32px));overflow:hidden;border:1px solid var(--line);border-radius:10px;background:var(--overlay);box-shadow:var(--sh-pop);color:var(--fg-2);font:var(--t-caption)}.legend-h.svelte-148kree{display:flex;width:100%;min-height:34px;flex-wrap:nowrap;align-items:center;gap:6px 16px;padding:6px 12px;border:0;background:transparent;color:var(--fg-2);cursor:pointer;font:var(--t-caption);text-align:left}.kl.svelte-148kree{display:inline-flex;min-width:0;align-items:center;gap:6px;white-space:nowrap}.kl.dim.svelte-148kree{overflow:hidden;text-overflow:ellipsis}.chev.svelte-148kree{display:inline-flex;margin-left:auto;color:var(--fg-3)}.legend-body.svelte-148kree{padding:4px 12px 10px;border-top:1px solid var(--line-faint)}.lrow.svelte-148kree{display:flex;align-items:center;gap:10px;padding:4px 0}.lrow.svelte-148kree>:where(.svelte-148kree):first-child{display:inline-flex;flex:0 0 56px;justify-content:center}.k-line.svelte-148kree{fill:none;stroke:var(--line-strong);stroke-width:2}.k-line.k-hot.svelte-148kree{stroke:var(--cyan)}.k-line.k-back.svelte-148kree{stroke:var(--violet);stroke-dasharray:4 3}.k-label.svelte-148kree{color:var(--fg-3);font:var(--t-caption);line-height:1.2;text-align:center}.k-box.svelte-148kree{box-sizing:border-box;padding:1px 6px;border:1px solid var(--line);border-radius:6px;background:var(--card);color:var(--fg);font:var(--t-mono-sm);line-height:16px}.k-box.k-weight.svelte-148kree{position:relative}.k-box.k-weight.svelte-148kree:after{position:absolute;bottom:1px;left:4px;width:60%;height:2px;border-radius:1px;background:var(--grad-data);content:""}.k-box.k-sel.svelte-148kree{border-color:var(--primary-line);background:var(--primary-soft);color:var(--primary-ink)}.k-box.k-test.svelte-148kree{border-style:dashed;border-color:var(--line-strong);color:var(--fg-3)}.k-box.k-gen.svelte-148kree,.dim.svelte-148kree{color:var(--fg-4)}.mapview.svelte-1j33xh5{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:var(--gap);height:100%;min-height:0}.mapstage.svelte-1j33xh5{position:relative;background:var(--canvas)}.mapstage.svelte-1j33xh5 .svelte-flow{background:transparent}.mapstage.svelte-1j33xh5 .svelte-flow__handle{opacity:0;width:1px;height:1px;min-width:0;min-height:0;border:0;pointer-events:none}.mapstage.svelte-1j33xh5 .svelte-flow__controls{overflow:hidden;border:1px solid var(--line);border-radius:10px;box-shadow:var(--sh-pop)}.mapstage.svelte-1j33xh5 .svelte-flow__controls-button{border:0;border-bottom:1px solid var(--line);background:var(--overlay);box-shadow:none;fill:var(--fg-2)}.mapstage.svelte-1j33xh5 .svelte-flow__controls-button:hover{background:var(--raised);fill:var(--fg)}.mapstage.svelte-1j33xh5 .svelte-flow__node{cursor:default}.mapstage.svelte-1j33xh5 .svelte-flow__controls.horizontal{margin:14px 16px}.mapstage.svelte-1j33xh5 .svelte-flow__controls.horizontal .svelte-flow__controls-button{border-right:1px solid var(--line);border-bottom:0}.mapstage.svelte-1j33xh5 .svelte-flow__minimap{overflow:hidden;margin:16px;border:1px solid var(--line);border-radius:10px;box-shadow:var(--sh-pop)}.mapstage.svelte-1j33xh5 .svelte-flow__minimap-node{fill:var(--line-strong)}.layerline.svelte-1j33xh5{position:absolute;top:0;left:0;height:1px;background:var(--line-faint);pointer-events:none}.layerlbl.svelte-1j33xh5{position:absolute;top:0;left:0;color:var(--fg-4);font:var(--t-micro);letter-spacing:.6px;text-transform:uppercase;white-space:nowrap;pointer-events:none}.state.svelte-1j33xh5{max-width:52ch;padding:32px}.state.svelte-1j33xh5 h2:where(.svelte-1j33xh5){margin:0 0 8px;color:var(--fg);font:var(--t-h2)}.state.svelte-1j33xh5 p:where(.svelte-1j33xh5){margin:0;color:var(--fg-2);font:var(--t-body)}.dim.svelte-1j33xh5{color:var(--fg-3)}.tip.svelte-1j33xh5{position:absolute;z-index:6;max-width:340px;padding:10px 12px;border:1px solid var(--line-strong);border-radius:10px;background:var(--overlay);box-shadow:var(--sh-pop);color:var(--fg-2);font:var(--t-small);pointer-events:none}.tip.svelte-1j33xh5 .mono:where(.svelte-1j33xh5){margin-bottom:6px;color:var(--fg-2);font:var(--t-mono)}.tip.svelte-1j33xh5 .mono:where(.svelte-1j33xh5) b:where(.svelte-1j33xh5){color:var(--fg);font-weight:600}.tip.svelte-1j33xh5 .row2:where(.svelte-1j33xh5){display:flex;justify-content:space-between;gap:12px;padding:1px 0}.tip.svelte-1j33xh5 .row2.mono:where(.svelte-1j33xh5){margin:0;font:var(--t-mono-sm)}.tip.svelte-1j33xh5 .row2.dim:where(.svelte-1j33xh5){color:var(--fg-3)}@media(max-width:1023px){.mapview.svelte-1j33xh5{grid-template-columns:minmax(0,1fr) 260px}}@media(max-width:599px){.mapview.svelte-1j33xh5{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto}}.snode.svelte-390foq{display:flex;flex-direction:column;justify-content:center;gap:1px;box-sizing:border-box;padding:0 9px;border:1px solid var(--ink);border-radius:0;background:var(--paper);text-align:left;cursor:pointer;font:inherit;color:var(--ink);transition:background 90ms linear}.snode.svelte-390foq:hover,.snode.sel.svelte-390foq{border-width:2px;padding:0 8px;background:var(--press)}.snode.dimmed.svelte-390foq{border-color:var(--ink-4);color:var(--ink-4)}.snode.dimmed.svelte-390foq .sub:where(.svelte-390foq){color:var(--ink-4)}.snode.origin.svelte-390foq{border-style:dashed;border-color:var(--ink-3)}.snode.unreached.svelte-390foq{border-color:var(--ink-4);color:var(--ink-2)}.snode.svelte-390foq:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.name.svelte-390foq{font:500 13px var(--mono);line-height:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mark.svelte-390foq{color:var(--accent);margin-right:5px;font-size:9px;vertical-align:1px}.sub.svelte-390foq{font:400 11px var(--sans);line-height:13px;color:var(--ink-3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.svelte-flow__edge-path.sedge{stroke:var(--ink);stroke-opacity:.32;fill:none}.svelte-flow__edge-path.sedge.synth{stroke-dasharray:5 3}.svelte-flow__edge-path.sedge.back{stroke:var(--accent);stroke-opacity:.6;stroke-dasharray:4 3}.svelte-flow__edge-path.sedge.hot{stroke-opacity:.95}.svelte-flow__edge-path.sedge.back.hot{stroke-opacity:.85}.svelte-flow__edge-path.sedge.hot.soft{stroke-opacity:.38}.svelte-flow__edge-path.sedge.focus{stroke-opacity:1}.svelte-flow__edge-path.sedge.dimmed{stroke-opacity:.06}.svelte-flow__edge-label.spill-anchor{padding:0;line-height:0;font-size:0}.spill.svelte-cf2s2p{display:inline-block;box-sizing:border-box;height:17px;padding:0 5px;border:1px solid var(--rule);background:var(--paper);color:var(--ink-2);font:400 10.5px var(--mono);line-height:15px;white-space:nowrap;cursor:crosshair}.spill.hot.svelte-cf2s2p{border-color:var(--ink-3);color:var(--ink)}.spill.focus.svelte-cf2s2p{border-color:var(--ink);box-shadow:0 2px 8px #0000002e}.spill.full.svelte-cf2s2p{height:auto;max-width:360px;padding:2px 6px;line-height:13px;white-space:normal;text-align:left;overflow-wrap:anywhere}.screens.svelte-1qt8k18{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:var(--gap);height:100%;min-height:0}.screens.svelte-1qt8k18:not(:has(.side)){grid-template-columns:minmax(0,1fr)}.stage.svelte-1qt8k18{position:relative;overflow:hidden;border:1px solid var(--line-faint);border-radius:var(--island-r);background:var(--canvas)}.stage.svelte-1qt8k18 .svelte-flow{background:transparent}.stage.svelte-1qt8k18 .svelte-flow__handle{opacity:0;width:1px;height:1px;min-width:0;min-height:0;border:0;pointer-events:none}.stage.svelte-1qt8k18 .svelte-flow__edge-labels{pointer-events:none}.stage.svelte-1qt8k18 .svelte-flow__controls{overflow:hidden;border:1px solid var(--line);border-radius:10px;box-shadow:var(--sh-pop)}.stage.svelte-1qt8k18 .svelte-flow__controls-button{border:0;border-bottom:1px solid var(--line);background:var(--overlay);color:var(--fg-2)}.stage.svelte-1qt8k18 .svelte-flow__controls-button svg{fill:var(--fg-2)}.state.svelte-1qt8k18{max-width:600px;margin:32px;padding:22px 24px;border:1px solid var(--line);border-radius:12px;background:var(--card);box-shadow:var(--sh-card);color:var(--fg-2);font:var(--t-body)}.state.svelte-1qt8k18 h2:where(.svelte-1qt8k18){margin:12px 0 8px;color:var(--fg);font:var(--t-h2)}.stile.svelte-1qt8k18{display:inline-flex;width:40px;height:40px;align-items:center;justify-content:center;border-radius:12px;background:var(--primary-soft);color:var(--primary-ink)}.legend.svelte-1qt8k18{position:absolute;bottom:16px;left:16px;z-index:4;max-width:380px;overflow:hidden;border:1px solid var(--line);border-radius:10px;background:var(--overlay);box-shadow:var(--sh-pop);color:var(--fg-2);font:var(--t-caption)}.legend-h.svelte-1qt8k18{display:block;width:100%;padding:8px 12px;border:0;background:transparent;color:var(--fg);cursor:pointer;font:var(--t-small-500);text-align:left}.legend-body.svelte-1qt8k18{padding:4px 12px 10px;border-top:1px solid var(--line-faint)}.lrow.svelte-1qt8k18{display:flex;align-items:center;gap:10px;padding:3px 0}.lrow.svelte-1qt8k18>:where(.svelte-1qt8k18):first-child{flex:0 0 44px;display:inline-flex;justify-content:center}.k-line.svelte-1qt8k18{stroke:var(--ink);stroke-opacity:.6;stroke-width:1.5;fill:none}.k-line.k-synth.svelte-1qt8k18{stroke-dasharray:5 3}.k-line.k-back.svelte-1qt8k18{stroke:var(--accent);stroke-opacity:.8;stroke-dasharray:4 3}.k-label.svelte-1qt8k18{font-size:10.5px;color:var(--ink-3)}.k-box.svelte-1qt8k18{box-sizing:border-box;padding:1px 5px;border:1px solid var(--ink);font-size:10.5px;color:var(--ink);line-height:14px}.k-box.k-origin.svelte-1qt8k18{border-style:dashed;border-color:var(--ink-3)}.k-box.k-unreached.svelte-1qt8k18{border-color:var(--ink-4);color:var(--ink-2)}.k-entry.svelte-1qt8k18 .mark:where(.svelte-1qt8k18){font-size:8px;margin-right:3px;vertical-align:1px}.tip.svelte-1qt8k18{position:absolute;z-index:5;width:340px;padding:10px 12px;border:1px solid var(--line-strong);border-radius:10px;background:var(--overlay);box-shadow:var(--sh-pop);color:var(--fg-2);font:var(--t-small);pointer-events:none;overflow-wrap:anywhere}.tiprow.svelte-1qt8k18{display:flex;flex-direction:column;gap:1px;margin-top:6px;padding-top:6px;border-top:1px solid var(--rule-soft)}.side.svelte-1qt8k18{padding:16px;overflow:auto;border:1px solid var(--line-faint);border-radius:var(--island-r);background:var(--panel);color:var(--fg-2);font:var(--t-small)}.head.svelte-1qt8k18{display:flex;justify-content:space-between;align-items:flex-start;gap:8px;margin-bottom:10px}.big.svelte-1qt8k18{font-size:15px;font-weight:600}.sub.svelte-1qt8k18{display:flex;align-items:center;gap:5px;margin-top:3px;color:var(--ink-2);text-decoration:none}.sub.svelte-1qt8k18:hover{text-decoration:underline}.act.svelte-1qt8k18{color:var(--accent)}.clear.svelte-1qt8k18{border:1px solid var(--rule);background:transparent;color:var(--ink-2);font:inherit;font-size:11.5px;padding:1px 7px;cursor:pointer}.note.svelte-1qt8k18{margin:0 0 6px}h4.svelte-1qt8k18{margin:16px 0 6px;font:600 12.5px var(--sans)}.row.svelte-1qt8k18{padding:7px 8px;margin:0 -8px;border-top:1px solid var(--rule-soft);transition:background 90ms linear}.row.hot.svelte-1qt8k18{background:var(--press)}.peer.svelte-1qt8k18{display:block;width:100%;border:0;background:transparent;padding:2px 0;text-align:left;color:var(--ink);font:500 12.5px var(--mono);cursor:pointer}.peer.svelte-1qt8k18:hover{text-decoration:underline}.when.svelte-1qt8k18{color:var(--ink);font:400 11.5px var(--mono);margin-top:2px}.kw.svelte-1qt8k18{font-weight:600}.via.svelte-1qt8k18{color:var(--ink-2);font:400 11.5px var(--mono);margin-top:2px}.ways.svelte-1qt8k18{font:500 11px var(--sans);margin-top:6px}.scenario.many.svelte-1qt8k18{margin:4px 0 0 8px;padding-left:8px;border-left:1px solid var(--rule-soft)}.site.svelte-1qt8k18{display:block;font:400 11px var(--mono);margin-top:2px;text-decoration:none}.site.svelte-1qt8k18:hover{text-decoration:underline}.mono.svelte-1qt8k18{font-family:var(--mono)}.dim.svelte-1qt8k18{color:var(--ink-3)}.mark.svelte-1qt8k18{color:var(--accent)}@media(max-width:1023px){.screens.svelte-1qt8k18{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto}.side.svelte-1qt8k18{max-height:40vh}}.snode.svelte-1gxwpy3{display:flex;flex-direction:column;justify-content:center;gap:1px;box-sizing:border-box;padding:0 9px;border:1px solid var(--ink);border-radius:0;background:var(--paper);text-align:left;cursor:pointer;font:inherit;color:var(--ink);transition:background 90ms linear}.snode.rail.svelte-1gxwpy3{align-items:flex-start;padding:5px 9px;max-width:100%}.snode.svelte-1gxwpy3:hover,.snode.sel.svelte-1gxwpy3{border-width:2px;padding:0 8px}.snode.rail.svelte-1gxwpy3:hover,.snode.rail.sel.svelte-1gxwpy3{padding:4px 8px}.snode.svelte-1gxwpy3:hover,.snode.sel.svelte-1gxwpy3{background:var(--press)}.snode.dimmed.svelte-1gxwpy3{border-color:var(--ink-4);color:var(--ink-4)}.snode.dimmed.svelte-1gxwpy3 .sub:where(.svelte-1gxwpy3){color:var(--ink-4)}.snode.k-bridge.svelte-1gxwpy3,.snode.k-event.svelte-1gxwpy3{border-left:3px solid var(--accent);padding-left:7px}.snode.k-bridge.svelte-1gxwpy3:hover,.snode.k-bridge.sel.svelte-1gxwpy3,.snode.k-event.svelte-1gxwpy3:hover,.snode.k-event.sel.svelte-1gxwpy3{border-left-width:3px;padding-left:7px}.snode.k-bridge.dimmed.svelte-1gxwpy3,.snode.k-event.dimmed.svelte-1gxwpy3{border-left-color:var(--accent-line)}.snode.k-store.svelte-1gxwpy3{background:var(--paper-2)}.snode.k-store.svelte-1gxwpy3:hover,.snode.k-store.sel.svelte-1gxwpy3{background:var(--press)}.snode.k-effect.svelte-1gxwpy3{border-style:dashed;border-color:var(--ink-3)}.snode.svelte-1gxwpy3:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.name.svelte-1gxwpy3{font:500 13px var(--mono);line-height:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}.mark.svelte-1gxwpy3{color:var(--accent);margin-right:5px;font-size:9px;vertical-align:1px}.more.svelte-1gxwpy3{color:var(--ink-3)}.sub.svelte-1gxwpy3{font:400 11px var(--sans);line-height:13px;color:var(--ink-3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}.stubs.svelte-12qg1ij{display:flex;flex-direction:column;gap:1px;padding-top:3px;box-sizing:border-box;pointer-events:none;font-size:10.5px;line-height:13px;color:var(--ink-3)}.stubs.dimmed.svelte-12qg1ij{opacity:.25}.stub.svelte-12qg1ij{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--mono);pointer-events:auto}.arrow.svelte-12qg1ij{display:inline-block;width:11px;color:var(--ink-4)}.more.svelte-12qg1ij{color:var(--ink-4)}.fpoint.svelte-10oa9z2{display:flex;align-items:center;justify-content:center;box-sizing:border-box;padding:0 9px;border:1px solid var(--ink-2);background:var(--paper);color:var(--ink);user-select:none}.fpoint.dimmed.svelte-10oa9z2{border-color:var(--ink-4);color:var(--ink-4)}.q.svelte-10oa9z2{font:400 12px var(--mono);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}.kw.svelte-10oa9z2{font-weight:600}.dcap.svelte-1ham54o{box-sizing:border-box;font:400 10.5px/14px var(--mono);color:var(--ink-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center;pointer-events:none;user-select:none}.dcap.dimmed.svelte-1ham54o{color:var(--ink-4)}.kw.svelte-1ham54o{font-weight:600}.rcap.svelte-9iclwq{box-sizing:border-box;padding-bottom:4px;border-bottom:1px solid var(--rule-soft);font:500 11px/16px var(--mono);color:var(--ink-3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;pointer-events:none;user-select:none}.legend.svelte-1jp07je{position:absolute;left:12px;bottom:12px;z-index:4;max-width:400px;border:1px solid var(--rule);background:var(--paper);font-size:11.5px;color:var(--ink-2)}.legend-h.svelte-1jp07je{display:block;width:100%;border:0;background:transparent;padding:5px 10px;text-align:left;color:var(--ink);font:600 12px var(--sans);cursor:pointer}.legend-body.svelte-1jp07je{padding:2px 10px 8px;border-top:1px solid var(--rule-soft)}.lrow.svelte-1jp07je{display:flex;align-items:center;gap:10px;padding:3px 0}.lrow.svelte-1jp07je>:where(.svelte-1jp07je):first-child{flex:0 0 44px;display:inline-flex;justify-content:center}.k-line.svelte-1jp07je{stroke:var(--ink);stroke-opacity:.6;stroke-width:1.5;fill:none}.k-line.k-synth.svelte-1jp07je{stroke-dasharray:5 3}.k-line.k-back.svelte-1jp07je{stroke:var(--accent);stroke-opacity:.8;stroke-dasharray:4 3}.k-label.svelte-1jp07je{font-size:10.5px;color:var(--ink-3)}.k-cap.svelte-1jp07je{font-size:10.5px;color:var(--ink-3);border-bottom:1px solid var(--rule-soft);padding-bottom:2px}.k-box.svelte-1jp07je{box-sizing:border-box;padding:1px 5px;border:1px solid var(--ink);font-size:10.5px;color:var(--ink);line-height:14px}.k-box.k-cross.svelte-1jp07je{border-left:3px solid var(--accent)}.k-box.k-store.svelte-1jp07je{background:var(--paper-2)}.k-box.k-effect.svelte-1jp07je{border-style:dashed;border-color:var(--ink-3)}.k-box.k-fork.svelte-1jp07je{border-color:var(--ink-2)}.k-anchor.svelte-1jp07je .mark:where(.svelte-1jp07je){font-size:8px;margin-right:3px;vertical-align:1px}.legend.flow.svelte-1jp07je{position:static;margin:28px 0 0;max-width:520px}.steps.svelte-v5q9re{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:var(--gap);height:100%;min-height:0}.steps.svelte-v5q9re:not(:has(.side)){grid-template-columns:minmax(0,1fr)}.stage.svelte-v5q9re{position:relative;overflow:hidden;border:1px solid var(--line-faint);border-radius:var(--island-r);background:var(--canvas)}.stage.svelte-v5q9re .svelte-flow{background:transparent}.stage.svelte-v5q9re .svelte-flow__handle{opacity:0;width:1px;height:1px;min-width:0;min-height:0;border:0;pointer-events:none}.stage.svelte-v5q9re .svelte-flow__edge-labels{pointer-events:none}.stage.svelte-v5q9re .svelte-flow__controls{overflow:hidden;border:1px solid var(--line);border-radius:10px;box-shadow:var(--sh-pop)}.stage.svelte-v5q9re .svelte-flow__controls-button{border:0;border-bottom:1px solid var(--line);background:var(--overlay);color:var(--fg-2)}.stage.svelte-v5q9re .svelte-flow__controls-button svg{fill:var(--fg-2)}.state.svelte-v5q9re{max-width:600px;margin:32px;padding:22px 24px;border:1px solid var(--line);border-radius:12px;background:var(--card);box-shadow:var(--sh-card);color:var(--fg-2);font:var(--t-body)}.state.svelte-v5q9re h2:where(.svelte-v5q9re){margin:12px 0 8px;color:var(--fg);font:var(--t-h2)}.stile.svelte-v5q9re{display:inline-flex;width:40px;height:40px;align-items:center;justify-content:center;border-radius:12px;background:var(--primary-soft);color:var(--primary-ink)}.chooser.svelte-v5q9re{max-width:720px;overflow:auto;height:100%;box-sizing:border-box}.chooser-list.svelte-v5q9re{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:0;margin-top:12px;border-top:1px solid var(--rule-soft)}.group-h.svelte-v5q9re{display:flex;justify-content:space-between;align-items:baseline;gap:12px;margin-top:18px;font-size:11.5px;color:var(--ink-2)}.group-h.svelte-v5q9re+.chooser-list:where(.svelte-v5q9re){margin-top:6px}.pick.svelte-v5q9re{display:block;padding:7px 8px;border-bottom:1px solid var(--rule-soft);color:var(--ink);text-decoration:none;font-size:12.5px}.pick.svelte-v5q9re:hover{background:var(--press)}.tip.svelte-v5q9re{position:absolute;z-index:5;width:400px;padding:8px 10px;border:1px solid var(--ink);background:var(--paper);box-shadow:0 4px 14px #0000002e;font-size:12px;pointer-events:none;overflow-wrap:anywhere}.tip.svelte-v5q9re .mono:where(.svelte-v5q9re),.tip.svelte-v5q9re .when:where(.svelte-v5q9re),.tip.svelte-v5q9re .via:where(.svelte-v5q9re),.tip.svelte-v5q9re .fires:where(.svelte-v5q9re){overflow-wrap:anywhere}.tiprow.svelte-v5q9re{display:flex;flex-direction:column;gap:1px;margin-top:6px;padding-top:6px;border-top:1px solid var(--rule-soft)}.side.svelte-v5q9re{padding:16px;overflow:auto;border:1px solid var(--line-faint);border-radius:var(--island-r);background:var(--panel);color:var(--fg-2);font:var(--t-small)}.head.svelte-v5q9re{display:flex;justify-content:space-between;align-items:flex-start;gap:8px;margin-bottom:10px}.big.svelte-v5q9re{font-size:15px;font-weight:600;overflow-wrap:anywhere}.sub.svelte-v5q9re{display:flex;align-items:center;gap:5px;margin-top:3px;color:var(--ink-2);text-decoration:none}a.sub.svelte-v5q9re:hover{text-decoration:underline}.act.svelte-v5q9re{color:var(--accent)}.clear.svelte-v5q9re{border:1px solid var(--rule);background:transparent;color:var(--ink-2);font:inherit;font-size:11.5px;padding:1px 7px;cursor:pointer}.note.svelte-v5q9re{margin:0 0 6px}.opt.svelte-v5q9re{display:inline-flex;align-items:center;gap:5px;cursor:pointer}.opt.svelte-v5q9re input:where(.svelte-v5q9re){margin:0;accent-color:var(--accent)}.reading.svelte-v5q9re{display:flex;align-items:baseline;gap:8px;color:var(--ink-3)}.tab.svelte-v5q9re{color:var(--ink-2);text-decoration:none;border-bottom:1px solid var(--rule-soft);padding-bottom:1px}.tab.svelte-v5q9re:hover{color:var(--ink);border-bottom-color:var(--ink-3)}.tab.on.svelte-v5q9re{color:var(--ink);font-weight:600;border-bottom-color:var(--accent)}.depth.svelte-v5q9re{font:inherit;font-size:12px;border:1px solid var(--rule-soft);background:var(--paper-2);color:var(--ink);padding:0 4px}.counts.svelte-v5q9re{display:flex;flex-wrap:wrap;gap:4px 12px;color:var(--ink-2)}h4.svelte-v5q9re{margin:16px 0 6px;font:600 12.5px var(--sans)}.row.svelte-v5q9re{padding:7px 8px;margin:0 -8px;border-top:1px solid var(--rule-soft);transition:background 90ms linear}.row.hot.svelte-v5q9re{background:var(--press)}.peer.svelte-v5q9re{display:block;width:100%;border:0;background:transparent;padding:2px 0;text-align:left;color:var(--ink);font:500 12.5px var(--mono);cursor:pointer}.peer.svelte-v5q9re:hover{text-decoration:underline}.when.svelte-v5q9re{color:var(--ink);font:400 11.5px var(--mono);margin-top:2px}.kw.svelte-v5q9re{font-weight:600}.via.svelte-v5q9re{color:var(--ink-2);font:400 11.5px var(--mono);margin-top:2px}.via.dim.svelte-v5q9re{color:var(--ink-3);font-size:11px}.fires.svelte-v5q9re{color:var(--ink);font:400 11.5px var(--mono);margin-top:2px}.ways.svelte-v5q9re{font:500 11px var(--sans);margin-top:6px}.scenario.many.svelte-v5q9re{margin:4px 0 0 8px;padding-left:8px;border-left:1px solid var(--rule-soft)}.site.svelte-v5q9re{display:block;font:400 11px var(--mono);margin-top:2px;color:var(--ink-2);text-decoration:none;overflow-wrap:anywhere}.status.svelte-v5q9re{color:var(--ink);font-weight:600}a.site.svelte-v5q9re:hover{text-decoration:underline}.mono.svelte-v5q9re{font-family:var(--mono)}.sans.svelte-v5q9re{font-family:var(--sans)}.dim.svelte-v5q9re{color:var(--ink-3)}.mark.svelte-v5q9re{color:var(--accent)}@media(max-width:1023px){.steps.svelte-v5q9re{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto}.side.svelte-v5q9re{max-height:40vh}}.card.svelte-1c9ldo3{display:flex;flex-direction:column;overflow:hidden;border:1px solid var(--line);border-radius:12px;background:var(--card);box-shadow:var(--sh-card);text-align:left;transition:border-color .12s,box-shadow .12s}.card.svelte-1c9ldo3:hover{border-color:var(--line-strong)}.card.cur.svelte-1c9ldo3{border:1.5px solid transparent;background:linear-gradient(var(--card),var(--card)) padding-box,var(--grad-brand-d) border-box;box-shadow:var(--glow-40)}.card.dim.svelte-1c9ldo3{opacity:.45}.head.svelte-1c9ldo3{display:grid;align-items:center;padding:10px 12px 9px;border-bottom:1px solid var(--line-faint);background:none;color:var(--fg);gap:8px;grid-template-columns:auto 20px minmax(0,1fr) auto;text-align:left}.head.svelte-1c9ldo3:hover .nm:where(.svelte-1c9ldo3){color:var(--primary-ink)}.badge.svelte-1c9ldo3{display:inline-flex;width:22px;height:22px;align-items:center;justify-content:center;border-radius:11px;background:var(--raised);color:var(--fg-2);font:var(--t-mono-sm);font-weight:600}.card.cur.svelte-1c9ldo3 .badge:where(.svelte-1c9ldo3){background:var(--grad-button);box-shadow:var(--glow-50);color:var(--on-primary)}.nm.svelte-1c9ldo3{overflow:hidden;font:var(--t-mono-500);text-overflow:ellipsis;white-space:nowrap}.loc.svelte-1c9ldo3{color:var(--fg-3);font:var(--t-mono-sm);white-space:nowrap}.code.svelte-1c9ldo3{padding:6px 0;font:400 12px / 19px var(--mono)}.ln.svelte-1c9ldo3{position:relative;display:grid;align-items:stretch;grid-template-columns:40px 1fr 6px}.ln.call.svelte-1c9ldo3{background:var(--primary-soft)}.ln.call.svelte-1c9ldo3:before{position:absolute;top:0;bottom:0;left:0;width:2px;background:var(--grad-brand-v);content:""}.no.svelte-1c9ldo3{padding-right:10px;color:var(--fg-4);font:400 11px / 19px var(--mono);text-align:right;user-select:none}.tx.svelte-1c9ldo3{overflow:hidden;color:var(--fg);text-overflow:ellipsis;white-space:pre}.nosource.svelte-1c9ldo3{margin:0;padding:8px 12px;color:var(--fg-3);font:var(--t-small);line-height:19px}.t-c.svelte-1c9ldo3{color:var(--syn-com)}.t-s.svelte-1c9ldo3{color:var(--syn-str)}.t-k.svelte-1c9ldo3{color:var(--syn-kw);font-weight:500}.t-n.svelte-1c9ldo3{color:var(--syn-num)}.t-t.svelte-1c9ldo3{color:var(--syn-type)}.t-p.svelte-1c9ldo3{color:var(--syn-punct)}.t-def.svelte-1c9ldo3{color:var(--fg);font-weight:600}.ref.svelte-1c9ldo3{margin:0 -3px;padding:1px 3px;border:0;border-radius:5px;background:var(--cyan-soft);box-shadow:inset 0 0 0 1px var(--cyan-line);color:var(--cyan);cursor:pointer;font:inherit}.ref.svelte-1c9ldo3:hover{background:color-mix(in srgb,var(--cyan) 22%,var(--cyan-soft))}.svelte-flow__edge-path.flink{stroke:var(--cyan);stroke-width:1.5px;fill:none;filter:var(--glow-cyan-45-f)}.svelte-flow__edge-path.flink.dimmed{stroke-opacity:.3;filter:none}.fhead.svelte-1gtjqth{fill:var(--cyan)}.fhead.dimmed.svelte-1gtjqth{fill-opacity:.3}.flabel.svelte-1gtjqth text:where(.svelte-1gtjqth){fill:var(--fg-3);font:var(--t-mono-sm)}.flabel.dimmed.svelte-1gtjqth text:where(.svelte-1gtjqth){fill-opacity:.3}.endcap.svelte-1f3e7uq{box-sizing:border-box;padding:12px 14px;border:1px dashed var(--fg-4);border-radius:12px;background:color-mix(in srgb,var(--card) 70%,transparent);color:var(--fg-2);font:var(--t-small);line-height:1.45;text-align:left}.endcap.dim.svelte-1f3e7uq{opacity:.45}.lead.svelte-1f3e7uq{margin:0}.lead.svelte-1f3e7uq b:where(.svelte-1f3e7uq){color:var(--fg);font-weight:600}.site.svelte-1f3e7uq,.block.svelte-1f3e7uq{margin-top:10px}.endcap.svelte-1f3e7uq p:where(.svelte-1f3e7uq){margin:0}.form.svelte-1f3e7uq{color:var(--fg)}.soft.svelte-1f3e7uq{color:var(--fg-3)}.key.svelte-1f3e7uq .mono:where(.svelte-1f3e7uq),.mono.svelte-1f3e7uq{font-family:var(--mono)}.row.svelte-1f3e7uq{display:flex;width:100%;align-items:center;margin-top:4px;padding:4px 8px;border:0;border-radius:6px;background:var(--raised);color:var(--fg-2);cursor:pointer;font:var(--t-mono-sm);gap:8px;justify-content:space-between;text-align:left}.row.svelte-1f3e7uq:hover .nm:where(.svelte-1f3e7uq){color:var(--primary-ink)}.nm.svelte-1f3e7uq{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.unsure.svelte-1f3e7uq{text-decoration:underline dotted var(--fg-4);text-underline-offset:3px}.at.svelte-1f3e7uq{color:var(--fg-4);white-space:nowrap}.flowview.svelte-vl698p{display:grid;height:100%;min-height:0;gap:var(--gap);grid-template-rows:auto minmax(0,1fr) auto}.fhead.svelte-vl698p{display:flex;min-height:64px;flex-wrap:wrap;align-items:center;gap:10px 14px;padding:12px 16px;overflow:visible}.ftile.svelte-vl698p{display:inline-flex;width:32px;height:32px;flex:0 0 auto;align-items:center;justify-content:center;border-radius:10px;background:var(--primary-soft);color:var(--primary-ink)}.ftitle.svelte-vl698p{display:flex;min-width:0;flex-direction:column}.ftitle.svelte-vl698p h1:where(.svelte-vl698p){margin:0;color:var(--fg);font:var(--t-h1)}.sub.svelte-vl698p{color:var(--fg-3);font:var(--t-caption)}.route.svelte-vl698p{position:relative;display:inline-flex;align-items:center}.route.svelte-vl698p select:where(.svelte-vl698p){height:36px;max-width:440px;padding:0 34px 0 12px;appearance:none;border:1px solid var(--line);border-radius:10px;background:var(--raised);color:var(--fg);font:var(--t-mono)}.route.svelte-vl698p select:where(.svelte-vl698p):focus-visible{border-color:var(--primary-line)}.route.svelte-vl698p .chev:where(.svelte-vl698p){position:absolute;right:12px;display:inline-flex;color:var(--fg-3);pointer-events:none}.sr.svelte-vl698p{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}.sp.svelte-vl698p{flex:1}.fstage.svelte-vl698p{position:relative;background:var(--canvas)}.fstage.svelte-vl698p .svelte-flow{background:transparent}.fstage.svelte-vl698p .svelte-flow__handle{width:1px;height:1px;min-width:0;min-height:0;border:0;opacity:0;pointer-events:none}.fstage.svelte-vl698p .svelte-flow__node{cursor:default}.fstage.svelte-vl698p .svelte-flow__controls{overflow:hidden;border:1px solid var(--line);border-radius:10px;box-shadow:var(--sh-pop)}.fstage.svelte-vl698p .svelte-flow__controls-button{border:0;border-bottom:1px solid var(--line);background:var(--overlay);box-shadow:none;fill:var(--fg-2)}.fstage.svelte-vl698p .svelte-flow__controls-button:hover{background:var(--raised);fill:var(--fg)}.legend.svelte-vl698p{position:absolute;bottom:16px;left:16px;z-index:5;max-width:min(560px,calc(100% - 120px));margin:0;padding:9px 12px;border:1px solid var(--line);border-radius:10px;background:var(--overlay);box-shadow:var(--sh-pop);color:var(--fg-2);font:var(--t-caption);line-height:1.45}.state.svelte-vl698p{max-width:56ch;padding:32px}.state.svelte-vl698p h2:where(.svelte-vl698p){margin:0 0 8px;color:var(--fg);font:var(--t-h2)}.state.svelte-vl698p p:where(.svelte-vl698p){margin:0 0 8px;color:var(--fg-2);font:var(--t-body)}.dim.svelte-vl698p{color:var(--fg-3)}.mono.svelte-vl698p{font-family:var(--mono)}.hops.svelte-vl698p{max-height:320px;overflow:auto;padding:0 16px 12px}.hh.svelte-vl698p{position:sticky;top:0;z-index:1;display:flex;align-items:baseline;gap:12px;padding:16px 4px 10px;background:var(--panel);font:var(--t-caption)}.hh.svelte-vl698p .title:where(.svelte-vl698p){color:var(--fg);font:var(--t-label)}.fnote.svelte-vl698p{display:flex;flex-direction:column;gap:6px;margin-bottom:10px}.fnote.svelte-vl698p p:where(.svelte-vl698p){margin:0}.tr.svelte-vl698p{display:grid;width:100%;min-height:40px;align-items:center;gap:14px;padding:0 10px;border:1px solid transparent;border-radius:10px;color:var(--fg);grid-template-columns:28px minmax(260px,1.4fr) minmax(160px,1.2fr) 220px 240px;text-align:left}button.tr.svelte-vl698p:hover{border-color:var(--primary-line);background:color-mix(in srgb,var(--primary-soft) 85%,transparent)}.th.svelte-vl698p{min-height:30px;border-bottom:1px solid var(--line-faint);border-radius:0;color:var(--fg-3);font:var(--t-micro);letter-spacing:.6px;text-transform:uppercase}.badge.svelte-vl698p{display:inline-flex;width:22px;height:22px;align-items:center;justify-content:center;border-radius:11px;background:var(--raised);color:var(--fg-2);font:var(--t-mono-sm)}.call.svelte-vl698p{display:flex;min-width:0;align-items:center;gap:8px}.call.svelte-vl698p .nm:where(.svelte-vl698p){overflow:hidden;font:var(--t-mono);text-overflow:ellipsis;white-space:nowrap}.arrow.svelte-vl698p{display:inline-flex;color:var(--cyan)}.when.svelte-vl698p{min-width:0;overflow:hidden}.site.svelte-vl698p{overflow:hidden;color:var(--fg-2);font:var(--t-mono-sm);text-overflow:ellipsis;white-space:nowrap}.conf.svelte-vl698p{display:flex;align-items:center;gap:10px}.conf.svelte-vl698p .bar:where(.svelte-vl698p){width:56px}.conf.svelte-vl698p .mono:where(.svelte-vl698p){color:var(--fg);font:var(--t-mono-sm)}@media(max-width:1023px){.tr.svelte-vl698p{grid-template-columns:28px minmax(200px,1fr) 120px 200px}.when.svelte-vl698p{display:none}}@media(max-width:599px){.fhead.svelte-vl698p .pill:where(.svelte-vl698p),.fhead.svelte-vl698p .ftitle:where(.svelte-vl698p) .sub:where(.svelte-vl698p),.legend.svelte-vl698p{display:none}.route.svelte-vl698p select:where(.svelte-vl698p){max-width:calc(100vw - 120px)}.hops.svelte-vl698p{max-height:40vh}.tr.svelte-vl698p{grid-template-columns:24px minmax(0,1fr) 90px}.conf.svelte-vl698p{display:none}}.sec.svelte-skxuyu{padding:4px 18px 16px;border:1px solid var(--line-faint);border-radius:12px;background:var(--panel)}.sec-h.svelte-skxuyu{display:flex;align-items:baseline;justify-content:space-between;gap:12px;padding:14px 0 2px}.sec-h.svelte-skxuyu h3:where(.svelte-skxuyu){margin:0;color:var(--fg);font:var(--t-label)}.sec-h.svelte-skxuyu .meta:where(.svelte-skxuyu){color:var(--fg-3);font:var(--t-caption)}.note.svelte-skxuyu{margin:0;padding:2px 0 6px;color:var(--fg-3);font:var(--t-caption);line-height:1.45}.note.dim.svelte-skxuyu{color:var(--fg-4)}.filegroup.svelte-skxuyu{padding-top:10px}.fpath.svelte-skxuyu{display:flex;align-items:center;gap:8px;margin:0 2px 8px;color:var(--fg-3);font:var(--t-mono-sm)}.fpath.svelte-skxuyu a:where(.svelte-skxuyu),.fpath.svelte-skxuyu span:where(.svelte-skxuyu){min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.fpath.svelte-skxuyu a:where(.svelte-skxuyu):hover{color:var(--fg);text-decoration:underline}.fpath.svelte-skxuyu b:where(.svelte-skxuyu){flex:0 0 auto;color:var(--fg-2);font-weight:500}.row.svelte-skxuyu{position:relative;display:grid;grid-template-columns:22px minmax(0,1fr);gap:12px;align-items:center;margin-bottom:6px;padding:9px 12px;border:1px solid var(--line-faint);border-radius:10px;background:var(--card)}.row.svelte-skxuyu:hover{border-color:var(--line);background:var(--raised)}.row.armed.svelte-skxuyu{border-color:var(--primary-line);background:var(--primary-soft);box-shadow:var(--glow-25)}.body.svelte-skxuyu{min-width:0}.line.svelte-skxuyu{display:flex;align-items:center;gap:8px}.nm.svelte-skxuyu{min-width:0;flex:1;overflow:hidden;color:var(--fg);font:var(--t-mono-500);text-align:left;text-overflow:ellipsis;white-space:nowrap}.nm.svelte-skxuyu:not(.plain){cursor:pointer}.nm.svelte-skxuyu:not(.plain):hover{color:var(--primary-ink)}.row.stub.svelte-skxuyu .nm:where(.svelte-skxuyu){color:var(--fg-2)}.verb.svelte-skxuyu{margin-right:8px;color:var(--amber);font-weight:600}.meta.svelte-skxuyu{margin-top:2px;overflow:hidden;color:var(--fg-3);font:var(--t-mono-sm);text-overflow:ellipsis;white-space:nowrap}.chip.svelte-skxuyu{flex:none;height:28px;padding:0 10px}.scroll.svelte-gbjxaf{height:100%;overflow:auto;border:1px solid var(--line-faint);border-radius:var(--island-r);background:var(--bg)}.head.svelte-gbjxaf{display:grid;grid-template-columns:40px minmax(0,1fr);gap:4px 14px;max-width:920px;padding:22px 24px 4px}.etile.svelte-gbjxaf{display:inline-flex;width:40px;height:40px;grid-row:span 2;align-items:center;justify-content:center;border-radius:12px;background:var(--primary-soft);color:var(--primary-ink)}.head.svelte-gbjxaf h2:where(.svelte-gbjxaf){margin:0;color:var(--fg);font:var(--t-h1)}.head.svelte-gbjxaf p:where(.svelte-gbjxaf){margin:0;color:var(--fg-2);font:var(--t-body)}.chiplike.svelte-gbjxaf{padding:1px 7px;border:1px solid var(--line);border-radius:9px;color:var(--fg-2);font:var(--t-mono-sm)}.saved.svelte-gbjxaf{max-width:920px;padding:14px 24px 0}.arming.svelte-gbjxaf{position:sticky;top:0;z-index:4;display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:14px 24px 0;padding:10px 14px;border:1px solid var(--primary-line);border-radius:12px;background:var(--primary-soft);box-shadow:var(--sh-pop)}.arming.svelte-gbjxaf .from:where(.svelte-gbjxaf){color:var(--primary-ink);font:var(--t-mono-500)}.arming.svelte-gbjxaf .arrow:where(.svelte-gbjxaf){color:var(--fg-3)}.arming.svelte-gbjxaf input:where(.svelte-gbjxaf){width:240px;height:30px;padding:0 10px;border:1px solid var(--line);border-radius:8px;background:var(--raised);color:var(--fg);font:var(--t-mono)}.arming.svelte-gbjxaf input:where(.svelte-gbjxaf):focus{border-color:var(--primary-line);outline:none;box-shadow:var(--glow-25)}.arming.svelte-gbjxaf .hint:where(.svelte-gbjxaf){color:var(--fg-3);font:var(--t-caption)}.state.svelte-gbjxaf{max-width:760px;padding:16px 24px 40px;color:var(--fg-2);font:var(--t-body)}.sections.svelte-gbjxaf{display:grid;grid-template-columns:repeat(auto-fit,minmax(420px,1fr));gap:var(--gap);margin:14px 24px 32px}@media(max-width:599px){.head.svelte-gbjxaf,.saved.svelte-gbjxaf{padding-right:14px;padding-left:14px}.sections.svelte-gbjxaf{grid-template-columns:minmax(0,1fr);margin:12px 14px 24px}}.deadview.svelte-186vr2{display:grid;grid-template-columns:minmax(0,1fr) 428px;gap:var(--gap);height:100%;min-height:0}.scroll.svelte-186vr2{height:100%;overflow:auto;padding:20px 24px 28px}.head.svelte-186vr2{display:flex;flex-wrap:wrap;align-items:center;gap:12px 14px}.dtile.svelte-186vr2{display:inline-flex;width:40px;height:40px;align-items:center;justify-content:center;border-radius:12px;background:var(--raised);color:var(--fg-2)}.ht.svelte-186vr2{min-width:0;flex:1}.ht.svelte-186vr2 h1:where(.svelte-186vr2){margin:0;color:var(--fg);font:var(--t-h1)}.ht.svelte-186vr2 p:where(.svelte-186vr2){margin:0;color:var(--fg-3);font:var(--t-small)}.segmented.svelte-186vr2{display:inline-flex;gap:4px;padding:4px;border:1px solid var(--line);border-radius:12px;background:var(--card)}.segmented.svelte-186vr2 a:where(.svelte-186vr2){display:inline-flex;height:32px;align-items:center;padding:0 14px;border:1px solid transparent;border-radius:9px;color:var(--fg-2);font:var(--t-small-500);text-decoration:none;white-space:nowrap}.segmented.svelte-186vr2 a:where(.svelte-186vr2):hover{color:var(--fg)}.segmented.svelte-186vr2 a.on:where(.svelte-186vr2){border-color:var(--primary-line);background:var(--primary-soft);color:var(--primary-ink)}.caveat.svelte-186vr2{margin:18px 0 0;border:1px solid var(--line-faint);background:var(--card);color:var(--fg);font:var(--t-body)}.caveat.svelte-186vr2 .why:where(.svelte-186vr2){margin-left:auto;color:var(--fg-3);font:var(--t-caption)}.callout.amber.svelte-186vr2{margin:12px 0 0}.state.svelte-186vr2{padding:20px 0;color:var(--fg-2);font:var(--t-body)}.headline.svelte-186vr2{margin:16px 0 6px;color:var(--fg-3);font:var(--t-caption)}.filegroup.svelte-186vr2{margin-top:14px}.filegroup.gen.svelte-186vr2{opacity:.6}.fpath.svelte-186vr2{display:flex;align-items:center;gap:8px;margin:0 2px 8px;color:var(--fg-3);font:var(--t-mono-sm)}.fpath.svelte-186vr2 a:where(.svelte-186vr2){min-width:0;flex:1;overflow:hidden;color:var(--fg-2);text-overflow:ellipsis;white-space:nowrap}.fpath.svelte-186vr2 a:where(.svelte-186vr2):hover{color:var(--fg);text-decoration:underline}.fpath.svelte-186vr2 b:where(.svelte-186vr2){color:var(--fg-3);font:var(--t-caption)}.row.svelte-186vr2{display:grid;grid-template-columns:22px minmax(0,1fr) 140px;align-items:center;gap:12px;margin-bottom:6px;padding:10px 14px;border:1px solid var(--line-faint);border-radius:10px;background:var(--card)}.row.svelte-186vr2:hover{border-color:var(--line);background:var(--raised)}.body.svelte-186vr2{min-width:0}.line.svelte-186vr2{display:flex;min-width:0;flex-wrap:wrap;align-items:baseline;gap:4px 10px}.nm.svelte-186vr2{color:var(--fg);font:var(--t-mono-500);text-align:left}.nm.svelte-186vr2:hover{color:var(--primary-ink)}.ln.svelte-186vr2{color:var(--fg-4);font:var(--t-mono-sm)}.ln.svelte-186vr2:hover{color:var(--fg-2)}.meta.svelte-186vr2{margin-top:2px;color:var(--fg-3);font:var(--t-caption)}.members.svelte-186vr2{display:flex;flex-wrap:wrap;gap:4px 6px;margin-top:6px}.member.svelte-186vr2{padding:1px 7px;border-radius:9px;background:var(--raised);color:var(--fg-2);font:var(--t-mono-sm)}.member.more.svelte-186vr2{background:none;color:var(--fg-4)}.size.svelte-186vr2{height:4px}.foot.svelte-186vr2{margin:16px 0 0;color:var(--fg-2);font:var(--t-body)}.leftoff.svelte-186vr2{overflow:auto;padding:0 20px 20px}.lh.svelte-186vr2{display:flex;height:52px;align-items:center;gap:10px;color:var(--fg);font:var(--t-label)}.lh.svelte-186vr2 .icon{color:var(--fg-3)}.big.svelte-186vr2{padding:16px 18px;border:1px solid var(--line);border-radius:12px;background:var(--card)}.bn.svelte-186vr2{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px 12px;margin-bottom:14px;color:var(--fg-2);font:var(--t-small)}.bn.svelte-186vr2 b:where(.svelte-186vr2){color:var(--fg);font:600 28px / 34px var(--sans);font-variant-numeric:tabular-nums}.big.svelte-186vr2 .bar:where(.svelte-186vr2){height:8px;border-radius:4px}.split.svelte-186vr2{display:flex;gap:24px;margin-top:10px;color:var(--fg-2);font:var(--t-small)}.split.svelte-186vr2 span:where(.svelte-186vr2){display:inline-flex;align-items:center;gap:6px}.sw.svelte-186vr2{width:8px;height:8px;border-radius:2px;background:var(--line-strong)}.sw.on.svelte-186vr2{background:var(--primary)}.sec.svelte-186vr2{margin:22px 0 10px}.reason.svelte-186vr2{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 10px;margin-bottom:14px;color:var(--fg);font:var(--t-body)}.rc.svelte-186vr2{color:var(--fg-2);font:var(--t-mono-sm)}.reason.svelte-186vr2 .bar:where(.svelte-186vr2){grid-column:1 / -1;height:4px}.note.svelte-186vr2{margin:12px 0 0;font:var(--t-caption);line-height:1.5}.dim.svelte-186vr2{color:var(--fg-3)}.sr.svelte-186vr2{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}@media(max-width:1023px){.deadview.svelte-186vr2{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto}.leftoff.svelte-186vr2{max-height:40vh}}@media(max-width:599px){.scroll.svelte-186vr2{padding:14px}.row.svelte-186vr2{grid-template-columns:22px minmax(0,1fr)}.size.svelte-186vr2{display:none}.caveat.svelte-186vr2 .why:where(.svelte-186vr2){display:none}}.scroll.svelte-wjp3va{height:100%;overflow:auto}.link.svelte-wjp3va{color:var(--primary-ink);text-decoration:underline;text-decoration-color:var(--primary-line);text-underline-offset:3px}.toast.svelte-1ig2a9j{position:fixed;bottom:22px;left:50%;z-index:80;max-width:70ch;padding:9px 16px;border:1px solid var(--line-strong);border-radius:10px;background:var(--overlay);box-shadow:var(--sh-pop);color:var(--fg);font:var(--t-small-500);line-height:1.4;transform:translate(-50%);animation:svelte-1ig2a9j-rise .14s ease-out}@media(max-width:599px){.toast.svelte-1ig2a9j{bottom:80px}}@keyframes svelte-1ig2a9j-rise{0%{opacity:0;transform:translate(-50%,6px)}to{opacity:1;transform:translate(-50%)}}@media(prefers-reduced-motion:reduce){.toast.svelte-1ig2a9j{animation:none}}main.svelte-1n46o8q{grid-area:main;min-height:0;overflow:hidden;padding:var(--gap) var(--gap) var(--gap) var(--gap)}@media(max-width:599px){main.svelte-1n46o8q{padding:var(--gap)}} diff --git a/crates/codegraph-ui/viewer/assets/index-CfvuSGC9.css b/crates/codegraph-ui/viewer/assets/index-CfvuSGC9.css deleted file mode 100644 index 4a7be36..0000000 --- a/crates/codegraph-ui/viewer/assets/index-CfvuSGC9.css +++ /dev/null @@ -1 +0,0 @@ -@font-face{font-family:Archivo Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(./archivo-vietnamese-wght-normal-XAtsl5Q_.woff2) format("woff2-variations");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Archivo Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(./archivo-latin-ext-wght-normal-C4zznr8T.woff2) format("woff2-variations");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Archivo Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(./archivo-latin-wght-normal-E0tuGl4L.woff2) format("woff2-variations");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:IBM Plex Mono;font-style:normal;font-display:swap;font-weight:400;src:url(./ibm-plex-mono-cyrillic-ext-400-normal-xuaO2J-f.woff2) format("woff2"),url(./ibm-plex-mono-cyrillic-ext-400-normal-DMdlQ8Kv.woff) format("woff");unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:IBM Plex Mono;font-style:normal;font-display:swap;font-weight:400;src:url(./ibm-plex-mono-cyrillic-400-normal-BSMlKf0J.woff2) format("woff2"),url(./ibm-plex-mono-cyrillic-400-normal-CEL4l2ZJ.woff) format("woff");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:IBM Plex Mono;font-style:normal;font-display:swap;font-weight:400;src:url(./ibm-plex-mono-vietnamese-400-normal-BulugwFq.woff2) format("woff2"),url(./ibm-plex-mono-vietnamese-400-normal-DDuiU_S-.woff) format("woff");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:IBM Plex Mono;font-style:normal;font-display:swap;font-weight:400;src:url(./ibm-plex-mono-latin-ext-400-normal-BmRBH3aV.woff2) format("woff2"),url(./ibm-plex-mono-latin-ext-400-normal-D3D2R8hC.woff) format("woff");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:IBM Plex Mono;font-style:normal;font-display:swap;font-weight:400;src:url(./ibm-plex-mono-latin-400-normal-DMJ8VG8y.woff2) format("woff2"),url(./ibm-plex-mono-latin-400-normal-CvHOgSBP.woff) format("woff");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:IBM Plex Mono;font-style:italic;font-display:swap;font-weight:400;src:url(./ibm-plex-mono-cyrillic-ext-400-italic-CBjNughH.woff2) format("woff2"),url(./ibm-plex-mono-cyrillic-ext-400-italic-B4oTjJdl.woff) format("woff");unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:IBM Plex Mono;font-style:italic;font-display:swap;font-weight:400;src:url(./ibm-plex-mono-cyrillic-400-italic-CBJ8pzag.woff2) format("woff2"),url(./ibm-plex-mono-cyrillic-400-italic-2syK4fUT.woff) format("woff");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:IBM Plex Mono;font-style:italic;font-display:swap;font-weight:400;src:url(./ibm-plex-mono-vietnamese-400-italic-DRuN92E5.woff2) format("woff2"),url(./ibm-plex-mono-vietnamese-400-italic-D6eaYXMU.woff) format("woff");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:IBM Plex Mono;font-style:italic;font-display:swap;font-weight:400;src:url(./ibm-plex-mono-latin-ext-400-italic-B7_fu1kp.woff2) format("woff2"),url(./ibm-plex-mono-latin-ext-400-italic-Bg0ZHwF4.woff) format("woff");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:IBM Plex Mono;font-style:italic;font-display:swap;font-weight:400;src:url(./ibm-plex-mono-latin-400-italic-BqAiT5Ww.woff2) format("woff2"),url(./ibm-plex-mono-latin-400-italic-66oory27.woff) format("woff");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:IBM Plex Mono;font-style:normal;font-display:swap;font-weight:500;src:url(./ibm-plex-mono-cyrillic-ext-500-normal-BqneJy0T.woff2) format("woff2"),url(./ibm-plex-mono-cyrillic-ext-500-normal-BIfNGwUT.woff) format("woff");unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:IBM Plex Mono;font-style:normal;font-display:swap;font-weight:500;src:url(./ibm-plex-mono-cyrillic-500-normal-Bq9vWWag.woff2) format("woff2"),url(./ibm-plex-mono-cyrillic-500-normal-Ael50iVv.woff) format("woff");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:IBM Plex Mono;font-style:normal;font-display:swap;font-weight:500;src:url(./ibm-plex-mono-vietnamese-500-normal-DZ4AoWbu.woff2) format("woff2"),url(./ibm-plex-mono-vietnamese-500-normal-C8zxqsMH.woff) format("woff");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:IBM Plex Mono;font-style:normal;font-display:swap;font-weight:500;src:url(./ibm-plex-mono-latin-ext-500-normal-CAhNIIs5.woff2) format("woff2"),url(./ibm-plex-mono-latin-ext-500-normal-CZ70TYgx.woff) format("woff");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:IBM Plex Mono;font-style:normal;font-display:swap;font-weight:500;src:url(./ibm-plex-mono-latin-500-normal-DSY6xOcd.woff2) format("woff2"),url(./ibm-plex-mono-latin-500-normal-CB9ihrfo.woff) format("woff");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:IBM Plex Mono;font-style:normal;font-display:swap;font-weight:600;src:url(./ibm-plex-mono-cyrillic-ext-600-normal-V-xxqcpd.woff2) format("woff2"),url(./ibm-plex-mono-cyrillic-ext-600-normal-9HEixskS.woff) format("woff");unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:IBM Plex Mono;font-style:normal;font-display:swap;font-weight:600;src:url(./ibm-plex-mono-cyrillic-600-normal-CTOM6hUh.woff2) format("woff2"),url(./ibm-plex-mono-cyrillic-600-normal-fLZuRloM.woff) format("woff");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:IBM Plex Mono;font-style:normal;font-display:swap;font-weight:600;src:url(./ibm-plex-mono-vietnamese-600-normal-D2EvbN8M.woff2) format("woff2"),url(./ibm-plex-mono-vietnamese-600-normal-iLQfcSjf.woff) format("woff");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:IBM Plex Mono;font-style:normal;font-display:swap;font-weight:600;src:url(./ibm-plex-mono-latin-ext-600-normal-D38SheWl.woff2) format("woff2"),url(./ibm-plex-mono-latin-ext-600-normal-DmB0ttJJ.woff) format("woff");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:IBM Plex Mono;font-style:normal;font-display:swap;font-weight:600;src:url(./ibm-plex-mono-latin-600-normal-BgSNZQsw.woff2) format("woff2"),url(./ibm-plex-mono-latin-600-normal-DWFSQ4vo.woff) format("woff");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}:root{--paper: #f7f6f2;--paper-2: #f1efe8;--press: #e8e6dd;--press-2: #dedbd0;--ink: #16150f;--ink-2: #56544a;--ink-3: #87847a;--ink-4: #b4b1a5;--rule: #16150f;--rule-soft: #d6d3c8;--rule-faint: #e6e3d9;--accent: #7a2230;--accent-ink: #5e1a25;--accent-soft: #f0e3e5;--accent-line: #d9b3b9;--amber: #8a5a0b;--amber-soft: #f3e9d2;--code-comment: #6a675d;--sans: "Archivo Variable", "Archivo", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;--mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;--code-size: 12.5px;--code-lh: 20px;--topbar-h: 48px;--trailbar-h: 34px;color-scheme:light dark}@media(prefers-color-scheme:dark){:root:not([data-theme=light]){--paper: #16150f;--paper-2: #1c1a14;--press: #23211a;--press-2: #2c2a22;--ink: #f3f1ea;--ink-2: #b8b5a8;--ink-3: #87847a;--ink-4: #5d5b52;--rule: #f3f1ea;--rule-soft: #34322a;--rule-faint: #26241d;--accent: #d48b96;--accent-ink: #e5a5ae;--accent-soft: #33201f;--accent-line: #6b3a42;--amber: #d9a94a;--amber-soft: #2e2716;--code-comment: #8e8b81}}:root[data-theme=dark],[data-theme=dark]{--paper: #16150f;--paper-2: #1c1a14;--press: #23211a;--press-2: #2c2a22;--ink: #f3f1ea;--ink-2: #b8b5a8;--ink-3: #87847a;--ink-4: #5d5b52;--rule: #f3f1ea;--rule-soft: #34322a;--rule-faint: #26241d;--accent: #d48b96;--accent-ink: #e5a5ae;--accent-soft: #33201f;--accent-line: #6b3a42;--amber: #d9a94a;--amber-soft: #2e2716;--code-comment: #8e8b81;color-scheme:dark}[data-theme=light]{--paper: #f7f6f2;--paper-2: #f1efe8;--press: #e8e6dd;--press-2: #dedbd0;--ink: #16150f;--ink-2: #56544a;--ink-3: #87847a;--ink-4: #b4b1a5;--rule: #16150f;--rule-soft: #d6d3c8;--rule-faint: #e6e3d9;--accent: #7a2230;--accent-ink: #5e1a25;--accent-soft: #f0e3e5;--accent-line: #d9b3b9;--amber: #8a5a0b;--amber-soft: #f3e9d2;--code-comment: #6a675d;color-scheme:light}:root{--xy-background-color: var(--paper);--xy-background-pattern-color: var(--rule-faint);--xy-edge-stroke: var(--ink-3);--xy-edge-stroke-selected: var(--accent);--xy-edge-stroke-width: 1;--xy-connectionline-stroke: var(--ink-3);--xy-node-color: var(--ink);--xy-node-background-color: var(--paper);--xy-node-border: 1px solid var(--rule-soft);--xy-node-boxshadow-hover: none;--xy-node-boxshadow-selected: none;--xy-selection-background-color: var(--accent-soft);--xy-selection-border: 1px solid var(--accent-line);--xy-handle-background-color: transparent;--xy-handle-border-color: transparent;--xy-controls-button-background-color: var(--paper);--xy-controls-button-background-color-hover: var(--press);--xy-controls-button-color: var(--ink-2);--xy-controls-button-color-hover: var(--ink);--xy-controls-button-border-color: var(--rule-soft);--xy-controls-box-shadow: none;--xy-minimap-background-color: var(--paper-2);--xy-minimap-mask-background-color: var(--paper);--xy-minimap-node-background-color: var(--rule-soft);--xy-minimap-node-stroke-color: var(--ink-3);--xy-attribution-background-color: transparent;--xy-resize-background-color: var(--accent);--xy-error-color: var(--accent)}html,body{height:100%}body{margin:0;background:var(--paper);color:var(--ink);font-family:var(--sans);font-size:13px;line-height:1.45;-webkit-font-smoothing:antialiased}*,*:before,*:after{box-sizing:border-box;border-radius:0!important}a{color:inherit;text-decoration:none}button{font:inherit;color:inherit;background:none;border:0;padding:0;cursor:pointer}h1,h2,h3{font-weight:600;text-wrap:balance}:focus-visible{outline:2px solid var(--accent);outline-offset:1px}@media(prefers-reduced-motion:reduce){*,*:before,*:after{transition:none!important;animation:none!important;scroll-behavior:auto!important}}#app{height:100vh;display:grid;grid-template-rows:var(--topbar-h) auto 1fr}.mono{font-family:var(--mono)}.dim{color:var(--ink-3)}.tnum{font-variant-numeric:tabular-nums}.emptystate{padding:40px;max-width:60ch;color:var(--ink-2);line-height:1.5}.emptystate h2{margin:0 0 8px;font-size:16px;color:var(--ink)}.emptystate p{margin:0 0 10px}.emptystate code{font-family:var(--mono);font-size:12px;background:var(--press);padding:1px 4px}.k.svelte-rzcbio{display:inline-flex;width:16px;height:16px;flex:0 0 auto;align-items:center;justify-content:center;border:1px solid var(--ink-3);color:var(--ink-2);font:500 9.5px var(--mono);line-height:1;user-select:none}.k.filled.svelte-rzcbio{background:var(--press)}.k.dashed.svelte-rzcbio{border-style:dashed}.k.wide.svelte-rzcbio{font-size:8.5px;letter-spacing:-.02em}.head.svelte-14dv3uy{display:flex;align-items:baseline;gap:8px;padding:6px 10px 4px;border-bottom:1px solid var(--rule-faint);color:var(--ink-3);font-size:12px}.head-note.svelte-14dv3uy{overflow:hidden;color:var(--ink-4);font-size:11.5px;text-overflow:ellipsis;white-space:nowrap}.row.svelte-14dv3uy{display:grid;width:100%;align-items:baseline;padding:6px 10px;border-bottom:1px solid var(--rule-faint);color:var(--ink);gap:10px;grid-template-columns:18px 1fr auto;text-align:left}.row.svelte-14dv3uy:last-child{border-bottom:0}.row.svelte-14dv3uy:hover,.row.sel.svelte-14dv3uy{background:var(--press)}.mid.svelte-14dv3uy{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.nm.svelte-14dv3uy{font-family:var(--mono);font-size:12.5px}.nm.gen.svelte-14dv3uy{color:var(--ink-4)}.sig.svelte-14dv3uy{margin-left:6px;color:var(--ink-3);font-family:var(--mono);font-size:11.5px}.loc.svelte-14dv3uy{color:var(--ink-3);font-family:var(--mono);font-size:11px;white-space:nowrap}.panel.svelte-5pgva5{position:absolute;z-index:40;top:32px;right:0;left:0;max-height:420px;overflow:auto;background:var(--paper);border:1px solid var(--ink)}.hint.svelte-5pgva5{margin:0;padding:8px 10px;border-bottom:1px solid var(--rule-faint);background:var(--paper-2);color:var(--ink-2);font-size:12px}.note.svelte-5pgva5{margin:0;padding:8px 10px;color:var(--ink-3);font-size:12px}.search.svelte-1625q67{position:relative;width:100%;max-width:720px}#q.svelte-1625q67{width:100%;height:30px;padding:0 10px;border:1px solid var(--rule-soft);background:var(--paper-2);color:var(--ink);font:13px var(--sans)}#q.svelte-1625q67:focus{border-color:var(--ink);outline:none}#q.svelte-1625q67::placeholder{color:var(--ink-3)}.topbar.svelte-1h259us{display:grid;grid-template-columns:auto auto 1fr auto;align-items:center;gap:22px;padding:0 18px;background:var(--paper);border-bottom:1px solid var(--rule);position:relative;z-index:30}.brand.svelte-1h259us{display:flex;align-items:baseline;gap:8px}.brand-mark.svelte-1h259us{display:inline-block;width:10px;height:10px;align-self:center;border:1.5px solid var(--ink);background:var(--paper)}.brand-name.svelte-1h259us{font-weight:600;font-size:14px;letter-spacing:-.01em}.brand-sub.svelte-1h259us{color:var(--ink-3);font-size:12px}.views.svelte-1h259us{display:flex;gap:2px}.views.svelte-1h259us a:where(.svelte-1h259us){padding:5px 10px;color:var(--ink-2);border-bottom:2px solid transparent}.views.svelte-1h259us a:where(.svelte-1h259us):hover{color:var(--ink)}.views.svelte-1h259us a.active:where(.svelte-1h259us){color:var(--ink);border-bottom-color:var(--ink)}.project.svelte-1h259us{color:var(--ink-2);font-size:12px;white-space:nowrap}.offline.svelte-1h259us{padding:2px 6px;margin-right:8px;border:1px solid var(--rule-soft);background:var(--paper-2);color:var(--ink-3);font-size:11.5px}@media(max-width:1000px){.project.svelte-1h259us .mono:where(.svelte-1h259us),.project.svelte-1h259us .dim:where(.svelte-1h259us){display:none}}.trailwrap.svelte-rju47z{display:flex;min-height:0;flex-direction:column;background:var(--paper-2);border-bottom:1px solid var(--rule-soft)}.trailbar.svelte-rju47z{display:flex;height:var(--trailbar-h, 34px);align-items:center;flex:0 0 auto;gap:0;padding:0 18px;overflow-x:auto;white-space:nowrap;font-family:var(--mono);font-size:12px}.label.svelte-rju47z{margin-right:10px;color:var(--ink-3);font-family:var(--sans)}.empty.svelte-rju47z{color:var(--ink-3);font-family:var(--sans)}.hop.svelte-rju47z{display:inline-flex;align-items:center;gap:6px;padding:4px 8px;color:var(--ink-2);border:1px solid transparent;font-family:var(--mono);font-size:12px}.hop.svelte-rju47z:hover{color:var(--ink);background:var(--press)}.hop.cur.svelte-rju47z{color:var(--accent);border-color:var(--accent-line);background:var(--paper)}.hop-arrow.svelte-rju47z{padding:0 2px;color:var(--ink-3)}.hop-arrow.up.svelte-rju47z{color:var(--ink-2)}.spacer.svelte-rju47z{flex:1}.tb-btn.svelte-rju47z{margin-left:8px;padding:4px 8px;color:var(--ink-2);background:var(--paper);border:1px solid var(--rule-soft);font-family:var(--sans)}.tb-btn.svelte-rju47z:hover:not(:disabled){color:var(--ink);border-color:var(--ink)}.tb-btn.svelte-rju47z:disabled{color:var(--ink-4);border-color:var(--rule-faint)}.saveform.svelte-rju47z{display:flex;align-items:center;gap:8px;padding:6px 18px 8px;border-top:1px solid var(--rule-faint);flex-wrap:wrap}.saveform.svelte-rju47z label:where(.svelte-rju47z){color:var(--ink-2);font-family:var(--sans);font-size:12px}.saveform.svelte-rju47z input:where(.svelte-rju47z){width:320px;height:30px;max-width:100%;padding:0 10px;border:1px solid var(--rule-soft);background:var(--paper);color:var(--ink);font:13px var(--sans)}.saveform.svelte-rju47z input:where(.svelte-rju47z):focus{border-color:var(--ink);outline:none}.saveform.svelte-rju47z input:where(.svelte-rju47z)::placeholder{color:var(--ink-4)}.hint.svelte-rju47z{color:var(--ink-3);font-family:var(--sans);font-size:11.5px}.hint.warn.svelte-rju47z{color:var(--amber)}.err.svelte-rju47z{color:var(--accent);font-family:var(--sans);font-size:11.5px}.trails.svelte-1gyfjc6{max-width:720px}.head.svelte-1gyfjc6{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:8px}.trails.svelte-1gyfjc6 h3:where(.svelte-1gyfjc6){margin:0;font-size:14px;font-weight:600}.where.svelte-1gyfjc6{color:var(--ink-4);font-family:var(--mono);font-size:11px}.msg.svelte-1gyfjc6{margin:0;padding:8px 0 0;color:var(--ink-3);font-size:12px}.msg.err.svelte-1gyfjc6{color:var(--accent)}.rows.svelte-1gyfjc6{border:1px solid var(--rule-soft)}.row.svelte-1gyfjc6{position:relative;border-bottom:1px solid var(--rule-faint)}.row.svelte-1gyfjc6:last-child{border-bottom:0}.pick.svelte-1gyfjc6{display:grid;width:100%;align-items:baseline;padding:6px 10px;color:var(--ink);gap:10px;grid-template-columns:18px 1fr auto;text-align:left}.pick.svelte-1gyfjc6:hover:not(:disabled){background:var(--press)}.pick.svelte-1gyfjc6:disabled{color:var(--ink-3);cursor:default}.mid.svelte-1gyfjc6{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.nm.svelte-1gyfjc6{font-family:var(--mono);font-size:12.5px}.note.svelte-1gyfjc6{margin-left:6px;color:var(--ink-3);font-size:11.5px}.meta.svelte-1gyfjc6{padding-right:96px;color:var(--ink-3);font-family:var(--mono);font-size:11px;white-space:nowrap}.acts.svelte-1gyfjc6{position:absolute;top:4px;right:8px;display:flex;gap:4px}.act.svelte-1gyfjc6{padding:2px 6px;color:var(--ink-3);background:var(--paper);border:1px solid var(--rule-soft);font-family:var(--sans);font-size:11px}.act.svelte-1gyfjc6:hover:not(:disabled){color:var(--ink);border-color:var(--ink)}.act.armed.svelte-1gyfjc6{color:var(--accent);border-color:var(--accent-line);background:var(--accent-soft)}.decay.svelte-1gyfjc6{margin:0;padding:0 10px 6px 38px;color:var(--ink-3);font-size:11.5px}.decay.warn.svelte-1gyfjc6{color:var(--amber)}.scroll.svelte-y99goq{height:100%;overflow:auto}.scroll.svelte-y99goq .emptystate{padding-bottom:8px}.saved.svelte-y99goq{max-width:800px;padding:8px 40px 0}.entries.svelte-y99goq{max-width:720px;padding:8px 40px 48px}.entries-h.svelte-y99goq{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:8px}.entries.svelte-y99goq h3:where(.svelte-y99goq){margin:0;font-size:14px;font-weight:600}.entries-h.svelte-y99goq a:where(.svelte-y99goq){color:var(--ink-2);font-size:12px}.entries-h.svelte-y99goq a:where(.svelte-y99goq):hover{color:var(--ink);text-decoration:underline}.rows.svelte-y99goq{border:1px solid var(--rule-soft)}.rail-h.svelte-esi3sb{position:sticky;top:0;z-index:2;display:flex;align-items:baseline;justify-content:space-between;padding:12px 14px 8px;border-bottom:1px solid var(--rule-soft);background:var(--paper);font-weight:600;font-size:13px}.rail-h.svelte-esi3sb .n:where(.svelte-esi3sb){color:var(--ink-3);font-weight:400}.rail-h.svelte-esi3sb .hint:where(.svelte-esi3sb){color:var(--ink-3);font-weight:400;font-size:11.5px}.unplaced.svelte-esi3sb{visibility:hidden}.rrow.svelte-esi3sb{position:absolute;right:12px;left:14px;display:grid;grid-template-columns:16px 1fr;gap:8px;align-items:center;height:34px;padding:0 6px;border:1px solid transparent;cursor:pointer}.rrow.static.svelte-esi3sb{position:static;height:auto;padding:4px 6px}.rrow.svelte-esi3sb:hover{background:var(--press)}.rrow.sel.svelte-esi3sb{border-color:var(--ink)}.rrow.hot.svelte-esi3sb{border-color:var(--accent-line);background:var(--accent-soft)}.rrow.origin.svelte-esi3sb{background:var(--accent-soft)}.body.svelte-esi3sb{min-width:0}.nm.svelte-esi3sb{overflow:hidden;font:12.5px var(--mono);text-overflow:ellipsis;white-space:nowrap}.rrow.uncertain.svelte-esi3sb .nm:where(.svelte-esi3sb){color:var(--ink-2);text-decoration:underline dotted var(--ink-4);text-underline-offset:3px}.meta.svelte-esi3sb{display:flex;gap:8px;overflow:hidden;color:var(--ink-3);font-size:11px;text-overflow:ellipsis;white-space:nowrap}.tag.svelte-esi3sb{flex:0 0 auto;padding:0 4px;border:1px solid var(--rule-soft);color:var(--ink-3);font-size:10.5px}.tag.when.svelte-esi3sb{color:var(--ink-2)}.rfold.svelte-esi3sb{position:absolute;right:12px;left:14px}.rfold.svelte-esi3sb summary:where(.svelte-esi3sb){padding:6px;color:var(--ink-2);cursor:pointer;font-size:12px;list-style:none}.rfold.svelte-esi3sb summary:where(.svelte-esi3sb)::-webkit-details-marker{display:none}.rfold.svelte-esi3sb summary:where(.svelte-esi3sb):before{content:"+ ";color:var(--ink-3);font-family:var(--mono)}.rfold[open].svelte-esi3sb summary:where(.svelte-esi3sb):before{content:"− "}.rnote.svelte-esi3sb{position:absolute;right:12px;left:20px;color:var(--ink-3);font-size:11.5px;line-height:1.4}.rail-h.svelte-1g174kh{position:sticky;top:0;z-index:2;display:flex;align-items:baseline;justify-content:space-between;padding:12px 14px 8px;border-bottom:1px solid var(--rule-soft);background:var(--paper);font-weight:600;font-size:13px}.rail-h.svelte-1g174kh .n:where(.svelte-1g174kh){color:var(--ink-3);font-weight:400}.rail-h.svelte-1g174kh .hint:where(.svelte-1g174kh){color:var(--ink-3);font-weight:400;font-size:11.5px}.filegroup.svelte-1g174kh{padding:10px 14px 4px}.fpath.svelte-1g174kh{display:flex;justify-content:space-between;gap:8px;margin-bottom:4px;color:var(--ink-3);font:11px var(--mono)}.fpath.svelte-1g174kh a:where(.svelte-1g174kh):hover{color:var(--ink);text-decoration:underline}.fpath.svelte-1g174kh b:where(.svelte-1g174kh){color:var(--ink-2);font-weight:500}.row.svelte-1g174kh{position:relative;display:grid;grid-template-columns:16px 1fr;gap:8px;align-items:start;margin:0 -6px;padding:5px 6px 5px 4px;border:1px solid transparent;cursor:pointer}.row.svelte-1g174kh:hover{background:var(--press)}.row.sel.svelte-1g174kh{border-color:var(--ink)}.row.origin.svelte-1g174kh{border-color:var(--accent-line);background:var(--accent-soft)}.nm.svelte-1g174kh{overflow:hidden;color:var(--ink);font:12.5px var(--mono);text-overflow:ellipsis;white-space:nowrap}.row.uncertain.svelte-1g174kh .nm:where(.svelte-1g174kh){color:var(--ink-2);text-decoration:underline dotted var(--ink-4);text-underline-offset:3px}.meta.svelte-1g174kh{display:flex;flex-wrap:wrap;gap:4px 8px;align-items:baseline;margin-top:1px;color:var(--ink-3);font-size:11px}.tag.svelte-1g174kh{flex:0 0 auto;padding:0 4px;border:1px solid var(--rule-soft);color:var(--ink-3);font-size:10.5px}.tag.when.svelte-1g174kh{color:var(--ink-2)}.kindlbl.svelte-1g174kh{color:var(--ink-3)}.chip.svelte-1g174kh{padding:0 4px;border:1px solid var(--rule-soft);background:var(--paper);color:var(--ink-2);font:11px var(--mono)}.chip.svelte-1g174kh:hover{border-color:var(--ink);color:var(--ink)}.fold.svelte-1g174kh{padding:8px 14px}.fold.svelte-1g174kh>summary:where(.svelte-1g174kh){display:flex;gap:6px;align-items:baseline;color:var(--ink-2);cursor:pointer;font-size:12px;list-style:none}.fold.svelte-1g174kh>summary:where(.svelte-1g174kh)::-webkit-details-marker{display:none}.fold.svelte-1g174kh>summary:where(.svelte-1g174kh):before{content:"+";width:10px;color:var(--ink-3);font-family:var(--mono)}.fold[open].svelte-1g174kh>summary:where(.svelte-1g174kh):before{content:"−"}.fold.svelte-1g174kh .body:where(.svelte-1g174kh){padding:6px 0 0 16px}.note.svelte-1g174kh{padding:8px 14px;color:var(--ink-3);font-size:11.5px;line-height:1.4}.overlay.svelte-1x7maed{position:absolute;inset:0;overflow:visible;pointer-events:none}path.svelte-1x7maed{fill:none;stroke:var(--ink-4);stroke-width:1}path.uncertain.svelte-1x7maed{stroke-dasharray:2 3}path.heur.svelte-1x7maed{stroke:var(--ink-3);stroke-dasharray:6 3}path.origin.svelte-1x7maed{stroke:var(--accent)}path.hot.svelte-1x7maed{stroke:var(--accent);stroke-width:1.5}.blast.svelte-149slox{margin-top:22px;padding-top:10px;border-top:1px solid var(--rule)}.bh.svelte-149slox{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px 14px}.bh.svelte-149slox b:where(.svelte-149slox){font-weight:600}.stat.svelte-149slox{color:var(--ink-2);font-size:12.5px}.stat.svelte-149slox strong:where(.svelte-149slox){color:var(--ink);font-weight:600;font-variant-numeric:tabular-nums}.bar.svelte-149slox{position:relative;max-width:420px;height:6px;margin-top:8px;background:var(--press)}.bar.svelte-149slox i:where(.svelte-149slox){position:absolute;top:0;bottom:0;left:0;background:var(--ink-2)}.bar.svelte-149slox i.direct:where(.svelte-149slox){background:var(--ink)}.legend.svelte-149slox{margin-top:4px;color:var(--ink-3);font-size:11.5px}details.svelte-149slox{margin-top:8px}summary.svelte-149slox{color:var(--ink-2);cursor:pointer;font-size:12px;list-style:none}summary.svelte-149slox::-webkit-details-marker{display:none}summary.svelte-149slox:before{content:"+ ";color:var(--ink-3);font-family:var(--mono)}details[open].svelte-149slox summary:where(.svelte-149slox):before{content:"− "}.body.svelte-149slox{padding-top:6px}.fp.svelte-149slox{display:flex;justify-content:space-between;gap:10px;padding:2px 0;color:var(--ink-2);font:11px var(--mono)}.fp.svelte-149slox a:where(.svelte-149slox):hover{color:var(--ink);text-decoration:underline}.fp.svelte-149slox a.test:where(.svelte-149slox){color:var(--ink-3)}.fp.svelte-149slox b:where(.svelte-149slox){color:var(--ink);font-weight:500;font-variant-numeric:tabular-nums}.note.svelte-149slox{padding-top:6px;color:var(--ink-3);font-size:11.5px}.subh.svelte-rscx7m{display:flex;align-items:baseline;gap:8px;margin:18px 0 4px;font-weight:600;font-size:13px}.subh.svelte-rscx7m .n:where(.svelte-rscx7m){color:var(--ink-3);font-weight:400}.outline.svelte-rscx7m{border-top:1px solid var(--rule)}.orow.svelte-rscx7m{display:grid;grid-template-columns:16px minmax(160px,auto) 1fr auto;gap:10px;align-items:baseline;width:100%;padding:6px 4px;border-bottom:1px solid var(--rule-faint);text-align:left}.orow.svelte-rscx7m:hover{background:var(--press)}.orow.nested.svelte-rscx7m{padding-left:22px}.nm.svelte-rscx7m{font:12.5px var(--mono)}.orow.dimmed.svelte-rscx7m .nm:where(.svelte-rscx7m){color:var(--ink-3)}.ovr.svelte-rscx7m{margin-right:6px;padding:0 4px;border:1px solid var(--rule-soft);color:var(--ink-2);font:10.5px var(--mono);white-space:nowrap}.sig.svelte-rscx7m{overflow:hidden;color:var(--ink-3);font:11.5px var(--mono);text-overflow:ellipsis;white-space:nowrap}.cnt.svelte-rscx7m{color:var(--ink-3);font:11px var(--mono);font-variant-numeric:tabular-nums;white-space:nowrap}.note.svelte-rscx7m{padding:8px 0;color:var(--ink-3);font-size:11.5px}.subh.svelte-1ys4zlw{display:flex;align-items:baseline;gap:8px;margin:18px 0 4px;font-weight:600;font-size:13px}.subh.svelte-1ys4zlw .n:where(.svelte-1ys4zlw){color:var(--ink-3);font-weight:400}.subh.svelte-1ys4zlw .hint:where(.svelte-1ys4zlw){margin-left:auto;color:var(--ink-3);font-size:11.5px;font-weight:400}.headline.svelte-1ys4zlw{margin:0 0 6px;color:var(--ink-2);font-size:12px}.tree.svelte-1ys4zlw{border-top:1px solid var(--rule);padding-top:6px}.canvas.svelte-1ys4zlw{position:relative}.wires.svelte-1ys4zlw{position:absolute;top:0;left:0;overflow:visible;pointer-events:none}.wires.svelte-1ys4zlw path:where(.svelte-1ys4zlw){fill:none;stroke:var(--ink-4);stroke-width:1}.wires.svelte-1ys4zlw path.dashed:where(.svelte-1ys4zlw){stroke-dasharray:4 3}.wires.svelte-1ys4zlw path.synth:where(.svelte-1ys4zlw){stroke:var(--ink-3);stroke-dasharray:6 3}.row.svelte-1ys4zlw{position:absolute;top:0;right:0;left:0;display:flex;align-items:center;gap:8px;height:24px;padding-right:4px;border:1px solid transparent;text-align:left}button.row.svelte-1ys4zlw:hover{background:var(--press)}.nm.svelte-1ys4zlw{font:12.5px var(--mono);white-space:nowrap}.row.focus.svelte-1ys4zlw{color:var(--accent)}.row.focus.svelte-1ys4zlw .nm:where(.svelte-1ys4zlw){font-weight:600}.word.svelte-1ys4zlw{color:var(--ink-3);font-size:11px;white-space:nowrap}.pill.svelte-1ys4zlw{padding:0 4px;border:1px solid var(--rule-soft);color:var(--ink-3);font:10.5px var(--mono);white-space:nowrap}.file.svelte-1ys4zlw{overflow:hidden;margin-left:auto;padding-left:10px;color:var(--ink-3);font:11px var(--mono);text-overflow:ellipsis;white-space:nowrap}.fold.svelte-1ys4zlw{margin-top:6px;padding:3px 8px;border:1px solid var(--rule-soft);color:var(--ink-2);font-size:11.5px}.fold.svelte-1ys4zlw:hover{background:var(--press)}.note.svelte-1ys4zlw{padding:8px 0;color:var(--ink-3);font-size:11.5px}.code.svelte-ikg4h3{margin-top:16px;padding-top:6px;border-top:1px solid var(--rule);font:var(--code-size) / var(--code-lh) var(--mono)}.ln.svelte-ikg4h3{position:relative;display:grid;grid-template-columns:44px 1fr 18px;align-items:stretch}.ln.svelte-ikg4h3:hover{background:var(--paper-2)}.ln.hot.svelte-ikg4h3{background:var(--accent-soft)}.no.svelte-ikg4h3{padding-right:12px;color:var(--ink-4);font-size:11px;text-align:right;user-select:none}.tx.svelte-ikg4h3{white-space:pre;overflow-x:auto;scrollbar-width:none}.tx.svelte-ikg4h3::-webkit-scrollbar{display:none}.port.svelte-ikg4h3{position:relative}.port.svelte-ikg4h3 i:where(.svelte-ikg4h3){position:absolute;top:7px;right:4px;width:6px;height:6px;border:1px solid var(--ink-3);background:var(--paper)}.port.svelte-ikg4h3 i.sure:where(.svelte-ikg4h3){background:var(--ink-3)}.ln.hot.svelte-ikg4h3 .port:where(.svelte-ikg4h3) i:where(.svelte-ikg4h3){border-color:var(--accent);background:var(--accent)}.gap.svelte-ikg4h3{margin:2px 0;padding:2px 0 2px 44px;border-top:1px dashed var(--rule-soft);border-bottom:1px dashed var(--rule-soft);color:var(--ink-4);font-size:11px}.t-c.svelte-ikg4h3{color:var(--code-comment)}.t-s.svelte-ikg4h3{color:var(--ink-2)}.t-k.svelte-ikg4h3{font-weight:500}.t-n.svelte-ikg4h3{color:var(--ink-2)}.t-def.svelte-ikg4h3{font-weight:600}.ref.svelte-ikg4h3{color:var(--accent);cursor:pointer;text-decoration:underline;text-decoration-color:var(--accent-line);text-underline-offset:3px}.ref.svelte-ikg4h3:hover,.ref.hot.svelte-ikg4h3{background:var(--accent-soft);text-decoration-color:var(--accent)}.ref.uncertain.svelte-ikg4h3{color:var(--ink-2);text-decoration-style:dotted;text-decoration-color:var(--ink-4)}.ref.stub.svelte-ikg4h3{color:var(--ink-2);cursor:default;text-decoration-color:var(--rule-soft)}.ref.stub.svelte-ikg4h3:hover{background:none;text-decoration-color:var(--rule-soft)}.card-h.svelte-f6j7rg{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px 12px}.card-h.svelte-f6j7rg h1:where(.svelte-f6j7rg){margin:0;font:600 20px/1.2 var(--mono);letter-spacing:-.01em}.kindword.svelte-f6j7rg{color:var(--ink-3);font-size:12.5px}.loc.svelte-f6j7rg{color:var(--ink-2);font-size:11.5px}.loc.svelte-f6j7rg a:where(.svelte-f6j7rg):hover{text-decoration:underline}.parents.svelte-f6j7rg{margin-top:6px;color:var(--ink-3);font-size:11.5px}.parents.svelte-f6j7rg button:where(.svelte-f6j7rg){color:inherit;font:inherit}.parents.svelte-f6j7rg button:where(.svelte-f6j7rg):hover{color:var(--ink);text-decoration:underline}.parents.svelte-f6j7rg .sep:where(.svelte-f6j7rg){color:var(--ink-4)}.badges.svelte-f6j7rg{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}.badge.svelte-f6j7rg{display:inline-flex;align-items:center;gap:5px;padding:2px 7px;border:1px solid var(--rule-soft);background:var(--paper);color:var(--ink-2);font-size:11.5px}.badge.warn.svelte-f6j7rg{border-color:var(--amber);background:var(--amber-soft);color:var(--amber)}.badge.hub.svelte-f6j7rg{border-color:var(--ink)}.sw.svelte-f6j7rg{display:inline-block;width:8px;height:8px;border:1px solid currentColor}.badge.warn.svelte-f6j7rg .sw:where(.svelte-f6j7rg){background:currentColor}.sig.svelte-f6j7rg{margin-top:10px;color:var(--ink-2);font:12px var(--mono);white-space:pre-wrap;word-break:break-word}.doc.svelte-f6j7rg{margin-top:8px;max-width:70ch;color:var(--ink-2);font-size:12.5px;white-space:pre-wrap}.rel.svelte-f6j7rg{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px;margin-top:10px;color:var(--ink-3);font-size:12px}.rel.svelte-f6j7rg>span:where(.svelte-f6j7rg){display:inline-flex;flex-wrap:wrap;align-items:baseline;gap:6px}.chip.svelte-f6j7rg{padding:1px 6px;border:1px solid var(--rule-soft);background:var(--paper);color:var(--ink-2);font:11.5px var(--mono)}.chip.svelte-f6j7rg:hover{border-color:var(--ink);color:var(--ink)}.drift.svelte-lsm7el{display:grid;grid-template-columns:16px 1fr;gap:6px;align-items:start;padding:8px 12px;border:1px solid var(--rule-soft);background:var(--paper-2);color:var(--ink-2);font-size:12.5px;line-height:1.5}.glyph.svelte-lsm7el{color:var(--ink-3);font-size:12px;line-height:1.55}.body.svelte-lsm7el code{font-family:var(--mono);font-size:12px;color:var(--ink)}.body.svelte-lsm7el button{background:none;border:0;padding:0;color:var(--accent);font:inherit;cursor:pointer;text-decoration:underline;text-decoration-color:var(--accent-line);text-underline-offset:3px}.body.svelte-lsm7el a{color:var(--accent);text-decoration:underline;text-decoration-color:var(--accent-line);text-underline-offset:3px}.scroll.svelte-1cxnzx{height:100%;overflow:auto}.focus.svelte-1cxnzx{display:grid;grid-template-columns:300px minmax(520px,1fr);height:100%;min-height:0}.rail-left.svelte-1cxnzx{overflow:auto;border-right:1px solid var(--rule-soft);background:var(--paper)}.stage.svelte-1cxnzx{position:relative;overflow:auto}.stage-inner.svelte-1cxnzx{position:relative;display:grid;grid-template-columns:minmax(480px,1fr) 320px;min-height:100%}.center.svelte-1cxnzx{min-width:0;padding:18px 22px 40px}.rail-right.svelte-1cxnzx{position:relative;border-left:1px solid var(--rule-faint)}.banner.svelte-1cxnzx{margin:16px 0 4px}.note.svelte-1cxnzx{padding:12px 0;color:var(--ink-3);font-size:12px}@media(max-width:1100px){.focus.svelte-1cxnzx{grid-template-columns:240px minmax(360px,1fr)}.stage-inner.svelte-1cxnzx{grid-template-columns:minmax(360px,1fr) 260px}}.subh.svelte-3o11pb{display:flex;align-items:baseline;gap:8px;margin:18px 0 4px;font-weight:600;font-size:13px}.subh.svelte-3o11pb .n:where(.svelte-3o11pb){color:var(--ink-3);font-weight:400}.subh.svelte-3o11pb .count:where(.svelte-3o11pb){margin-left:auto;font-variant-numeric:tabular-nums}.outline.svelte-3o11pb{border-top:1px solid var(--rule)}.orow.svelte-3o11pb{display:grid;height:28px;box-sizing:border-box;grid-template-columns:16px minmax(160px,auto) 1fr auto;width:100%;align-items:center;gap:10px;padding:0 4px;border-bottom:1px solid var(--rule-faint);text-align:left}.orow.svelte-3o11pb:hover,.orow.sel.svelte-3o11pb{background:var(--press)}.nm.svelte-3o11pb{overflow:hidden;font:12.5px var(--mono);text-overflow:ellipsis;white-space:nowrap}.orow.dimmed.svelte-3o11pb .nm:where(.svelte-3o11pb){color:var(--ink-3)}.sig.svelte-3o11pb{overflow:hidden;color:var(--ink-3);font:11.5px var(--mono);text-overflow:ellipsis;white-space:nowrap}.cnt.svelte-3o11pb{color:var(--ink-3);font:11px var(--mono);font-variant-numeric:tabular-nums;white-space:nowrap}.note.svelte-3o11pb{padding:10px 0;color:var(--ink-3);font-size:11.5px;line-height:1.5}.rail.svelte-122bwap{overflow:auto;height:100%;border-right:1px solid var(--rule-soft);background:var(--paper)}.rail.right.svelte-122bwap{border-right:none;border-left:1px solid var(--rule-soft)}.rail-h.svelte-122bwap{position:sticky;top:0;z-index:2;display:flex;align-items:baseline;justify-content:space-between;padding:12px 14px 8px;border-bottom:1px solid var(--rule-soft);background:var(--paper);font-weight:600;font-size:13px}.rail-h.svelte-122bwap .n:where(.svelte-122bwap),.sub.svelte-122bwap .n:where(.svelte-122bwap){color:var(--ink-3);font-weight:400}.sub.svelte-122bwap{margin-top:14px;padding:10px 14px 4px;border-top:1px solid var(--rule-soft);color:var(--ink-2);font-size:12px}.filerow.svelte-122bwap{display:grid;grid-template-columns:1fr auto;gap:8px;align-items:baseline;padding:5px 14px;border-bottom:1px solid var(--rule-faint);color:var(--ink-2);font:12px var(--mono);text-decoration:none}a.filerow.svelte-122bwap:hover,a.filerow.sel.svelte-122bwap{background:var(--press);color:var(--ink)}.filerow.outside.svelte-122bwap{color:var(--ink-3);cursor:default}.p.svelte-122bwap{display:flex;min-width:0}.dir.svelte-122bwap{overflow:hidden;flex:0 1 auto;color:var(--ink-3);text-overflow:ellipsis;white-space:nowrap}.base.svelte-122bwap{flex:0 0 auto;white-space:nowrap}.filerow.test.svelte-122bwap .base:where(.svelte-122bwap){color:var(--ink-3)}.n2.svelte-122bwap{color:var(--ink-3);font-size:11px;font-variant-numeric:tabular-nums}.note.svelte-122bwap{padding:8px 14px;color:var(--ink-3);font-size:11.5px;line-height:1.4}.note.dim.svelte-122bwap{color:var(--ink-4)}.modes.svelte-a9lqu6{display:flex;gap:2px}.mode.svelte-a9lqu6{padding:3px 10px;border:1px solid var(--rule-soft);color:var(--ink-2);font-size:12.5px;text-decoration:none}.mode.svelte-a9lqu6:hover{background:var(--press)}.mode.on.svelte-a9lqu6{border-color:var(--ink);color:var(--ink)}.scroll.svelte-1dtvc8r{height:100%;overflow:auto}.fileview.svelte-1dtvc8r{display:grid;grid-template-columns:300px minmax(480px,1fr) 300px;height:100%;min-height:0}.pane.svelte-1dtvc8r{min-width:0;overflow:hidden}.center.svelte-1dtvc8r{min-width:0;overflow:auto;padding:18px 22px 40px}.card-h.svelte-1dtvc8r{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px 12px}.card-h.svelte-1dtvc8r h1:where(.svelte-1dtvc8r){margin:0;font:600 20px/1.2 var(--mono);letter-spacing:-.01em}.card-h.svelte-1dtvc8r h1.gen:where(.svelte-1dtvc8r){color:var(--ink-4)}.spacer.svelte-1dtvc8r{flex:1 1 auto}.kindword.svelte-1dtvc8r{color:var(--ink-3);font-size:12.5px}.loc.svelte-1dtvc8r{color:var(--ink-2);font:11.5px var(--mono)}.badges.svelte-1dtvc8r{display:flex;flex-wrap:wrap;gap:6px}.badges.svelte-1dtvc8r:not(:empty){margin-top:10px}.badge.svelte-1dtvc8r{display:inline-flex;align-items:center;gap:5px;padding:2px 7px;border:1px solid var(--rule-soft);background:var(--paper);color:var(--ink-2);font-size:11.5px}.badge.warn.svelte-1dtvc8r{border-color:var(--amber);background:var(--amber-soft);color:var(--amber)}.linkish.svelte-1dtvc8r{color:var(--accent);font:inherit;text-decoration:underline;text-decoration-color:var(--accent-line);text-underline-offset:3px}.banner.svelte-1dtvc8r{margin-top:12px}@media(max-width:1100px){.fileview.svelte-1dtvc8r{grid-template-columns:220px minmax(360px,1fr) 220px}}.arcs.svelte-7a2f5z{position:absolute;top:0;left:0;overflow:visible}.arc.svelte-7a2f5z{fill:none;stroke:var(--ink-4);stroke-width:1;pointer-events:none}.arc.uncertain.svelte-7a2f5z{stroke-dasharray:2 3}.arc.heur.svelte-7a2f5z{stroke:var(--ink-3);stroke-dasharray:6 3}.arc.lit.svelte-7a2f5z{stroke:var(--accent);stroke-width:1.5}.hit.svelte-7a2f5z{fill:none;stroke:transparent;stroke-width:10;cursor:pointer}.code.svelte-a7mbfv{position:absolute;inset:0;font:var(--code-size) / var(--code-lh) var(--mono)}.ln.svelte-a7mbfv{position:absolute;right:0;left:0;display:grid;height:20px;box-sizing:border-box;grid-template-columns:44px 1fr 18px;align-items:stretch}.ln.svelte-a7mbfv:hover{background:var(--paper-2)}.ln.hot.svelte-a7mbfv{background:var(--accent-soft)}.no.svelte-a7mbfv{padding-right:12px;color:var(--ink-4);font-size:11px;text-align:right;user-select:none}.tx.svelte-a7mbfv{overflow:hidden;white-space:pre}.pending.svelte-a7mbfv{display:inline-block;width:34%;height:8px;background:var(--rule-faint);vertical-align:middle}.port.svelte-a7mbfv{position:relative}.port.svelte-a7mbfv i:where(.svelte-a7mbfv){position:absolute;top:7px;right:4px;width:6px;height:6px;border:1px solid var(--ink-3);background:var(--paper)}.port.svelte-a7mbfv i.sure:where(.svelte-a7mbfv){background:var(--ink-3)}.ln.hot.svelte-a7mbfv .port:where(.svelte-a7mbfv) i:where(.svelte-a7mbfv){border-color:var(--accent);background:var(--accent)}.t-c.svelte-a7mbfv{color:var(--code-comment)}.t-s.svelte-a7mbfv{color:var(--ink-2)}.t-k.svelte-a7mbfv{font-weight:500}.t-n.svelte-a7mbfv{color:var(--ink-2)}.t-def.svelte-a7mbfv{font-weight:600}.ref.svelte-a7mbfv{color:var(--accent);cursor:pointer;text-decoration:underline;text-decoration-color:var(--accent-line);text-underline-offset:3px}.ref.svelte-a7mbfv:hover,.ref.hot.svelte-a7mbfv{background:var(--accent-soft);text-decoration-color:var(--accent)}.ref.uncertain.svelte-a7mbfv{color:var(--ink-2);text-decoration-style:dotted;text-decoration-color:var(--ink-4)}.ref.stub.svelte-a7mbfv{color:var(--ink-2);cursor:default;text-decoration-color:var(--rule-soft)}.ref.stub.svelte-a7mbfv:hover{background:none;text-decoration-color:var(--rule-soft)}.navrail.svelte-3z23e6{display:grid;grid-template-rows:auto minmax(0,1fr) auto;height:100%;border-right:1px solid var(--rule-soft);background:var(--paper)}.navh.svelte-3z23e6{display:flex;align-items:baseline;justify-content:space-between;padding:12px 12px 8px;border-bottom:1px solid var(--rule-soft);font-weight:600;font-size:13px}.navlist.svelte-3z23e6{min-height:0;overflow:auto}.nrow.svelte-3z23e6{display:grid;height:24px;box-sizing:border-box;grid-template-columns:14px minmax(0,1fr) auto;width:100%;align-items:center;gap:7px;padding-right:8px;text-align:left}.nrow.svelte-3z23e6:hover{background:var(--press)}.nrow.current.svelte-3z23e6{background:var(--accent-soft)}.nm.svelte-3z23e6{overflow:hidden;font:12px var(--mono);text-overflow:ellipsis;white-space:nowrap}.nrow.dimmed.svelte-3z23e6 .nm:where(.svelte-3z23e6){color:var(--ink-3)}.ln.svelte-3z23e6{color:var(--ink-4);font:10.5px var(--mono);font-variant-numeric:tabular-nums}.note.svelte-3z23e6{padding:8px 12px;border-top:1px solid var(--rule-faint);color:var(--ink-3);font-size:11px}.rrow.svelte-325cso{position:absolute;right:12px;left:14px;display:grid;height:34px;box-sizing:border-box;grid-template-columns:16px 1fr;gap:8px;align-items:center;padding:0 6px;border:1px solid transparent;background:var(--paper);cursor:pointer}.rrow.svelte-325cso:hover{background:var(--press)}.rrow.focused.svelte-325cso{border-color:var(--rule-soft)}.rrow.hot.svelte-325cso{border-color:var(--accent-line);background:var(--accent-soft)}.body.svelte-325cso{min-width:0}.nm.svelte-325cso{overflow:hidden;font:12.5px var(--mono);text-overflow:ellipsis;white-space:nowrap}.rrow.uncertain.svelte-325cso .nm:where(.svelte-325cso){color:var(--ink-2);text-decoration:underline dotted var(--ink-4);text-underline-offset:3px}.meta.svelte-325cso{display:flex;gap:8px;overflow:hidden;color:var(--ink-3);font-size:11px;text-overflow:ellipsis;white-space:nowrap}.tag.svelte-325cso{flex:0 0 auto;padding:0 4px;border:1px solid var(--rule-soft);color:var(--ink-3);font-size:10.5px}.scroll.svelte-1ykko46{height:100%;overflow:auto}.codeview.svelte-1ykko46{display:grid;grid-template-columns:minmax(0,1fr);height:100%;min-height:0}@media(min-width:1400px){.codeview.wide.svelte-1ykko46{grid-template-columns:240px minmax(0,1fr)}}.nav.svelte-1ykko46{display:none;min-height:0}@media(min-width:1400px){.codeview.wide.svelte-1ykko46 .nav:where(.svelte-1ykko46){display:block}}.main.svelte-1ykko46{display:grid;grid-template-rows:auto minmax(0,1fr);min-width:0;min-height:0}.band.svelte-1ykko46{padding:14px 22px 8px;border-bottom:1px solid var(--rule);background:var(--paper)}.card-h.svelte-1ykko46{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px 12px}.card-h.svelte-1ykko46 h1:where(.svelte-1ykko46){margin:0;font:600 20px/1.2 var(--mono);letter-spacing:-.01em}.spacer.svelte-1ykko46{flex:1 1 auto}.kindword.svelte-1ykko46{color:var(--ink-3);font-size:12.5px}.loc.svelte-1ykko46{color:var(--ink-2);font:11.5px var(--mono)}.toolbar.svelte-1ykko46{display:flex;justify-content:space-between;gap:16px;margin-top:8px;color:var(--ink-2);font-size:11.5px}.railnote.svelte-1ykko46 .n:where(.svelte-1ykko46){color:var(--ink-3)}.arcnote.svelte-1ykko46,.railnote.svelte-1ykko46{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.banner.svelte-1ykko46{margin-top:10px}.note.svelte-1ykko46{margin-top:10px;color:var(--ink-3);font-size:12.5px;line-height:1.5}.toolbar.hidden.svelte-1ykko46{display:none}.stage.svelte-1ykko46{position:relative;min-height:0;overflow:auto}.stage-inner.svelte-1ykko46{position:relative;display:grid;grid-template-columns:56px minmax(420px,1fr) 320px;min-width:100%}.arccol.svelte-1ykko46{position:relative;border-right:1px solid var(--rule-faint)}.codecol.svelte-1ykko46{position:relative;min-width:0;padding-left:4px}.rail.svelte-1ykko46{position:relative;border-left:1px solid var(--rule-faint)}@media(max-width:1100px){.stage-inner.svelte-1ykko46{grid-template-columns:56px minmax(320px,1fr) 260px}}.transparent.svelte-1wg91mu{background:transparent}.a11y-hidden.svelte-13pq11u{display:none}.a11y-live-msg.svelte-13pq11u{position:absolute;width:1px;height:1px;margin:-1px;border:0;padding:0;overflow:hidden;clip:rect(0px,0px,0px,0px);clip-path:inset(100%)}.svelte-flow__selection.svelte-1vr3gfi{position:absolute;top:0;left:0}.svelte-flow__selection-wrapper.svelte-sf2y5e{position:absolute;top:0;left:0;z-index:2000;pointer-events:all}.svelte-flow__selection-wrapper.svelte-sf2y5e:focus,.svelte-flow__selection-wrapper.svelte-sf2y5e:focus-visible{outline:none}.svelte-flow.svelte-mkap6j{width:100%;height:100%;overflow:hidden;position:relative;z-index:0}.svelte-flow{direction:ltr;--xy-edge-stroke-default: #b1b1b7;--xy-edge-stroke-width-default: 1;--xy-edge-stroke-selected-default: #555;--xy-connectionline-stroke-default: #b1b1b7;--xy-connectionline-stroke-width-default: 1;--xy-attribution-background-color-default: rgba(255, 255, 255, .5);--xy-minimap-background-color-default: #fff;--xy-minimap-mask-background-color-default: rgba(240, 240, 240, .6);--xy-minimap-mask-stroke-color-default: transparent;--xy-minimap-mask-stroke-width-default: 1;--xy-minimap-node-background-color-default: #e2e2e2;--xy-minimap-node-stroke-color-default: transparent;--xy-minimap-node-stroke-width-default: 2;--xy-background-color-default: transparent;--xy-background-pattern-dots-color-default: #91919a;--xy-background-pattern-lines-color-default: #eee;--xy-background-pattern-cross-color-default: #e2e2e2;background-color:var(--xy-background-color, var(--xy-background-color-default));--xy-node-color-default: inherit;--xy-node-border-default: 1px solid #1a192b;--xy-node-background-color-default: #fff;--xy-node-group-background-color-default: rgba(240, 240, 240, .25);--xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(0, 0, 0, .08);--xy-node-boxshadow-selected-default: 0 0 0 .5px #1a192b;--xy-node-border-radius-default: 3px;--xy-handle-background-color-default: #1a192b;--xy-handle-border-color-default: #fff;--xy-selection-background-color-default: rgba(0, 89, 220, .08);--xy-selection-border-default: 1px dotted rgba(0, 89, 220, .8);--xy-controls-button-background-color-default: #fefefe;--xy-controls-button-background-color-hover-default: #f4f4f4;--xy-controls-button-color-default: inherit;--xy-controls-button-color-hover-default: inherit;--xy-controls-button-border-color-default: #eee;--xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, .08);--xy-edge-label-background-color-default: #ffffff;--xy-edge-label-color-default: inherit;--xy-resize-background-color-default: #3367d9}.svelte-flow.dark{--xy-edge-stroke-default: #3e3e3e;--xy-edge-stroke-width-default: 1;--xy-edge-stroke-selected-default: #727272;--xy-connectionline-stroke-default: #b1b1b7;--xy-connectionline-stroke-width-default: 1;--xy-attribution-background-color-default: rgba(150, 150, 150, .25);--xy-minimap-background-color-default: #141414;--xy-minimap-mask-background-color-default: rgba(60, 60, 60, .6);--xy-minimap-mask-stroke-color-default: transparent;--xy-minimap-mask-stroke-width-default: 1;--xy-minimap-node-background-color-default: #2b2b2b;--xy-minimap-node-stroke-color-default: transparent;--xy-minimap-node-stroke-width-default: 2;--xy-background-color-default: #141414;--xy-background-pattern-dots-color-default: #555;--xy-background-pattern-lines-color-default: #333;--xy-background-pattern-cross-color-default: #333;--xy-node-color-default: #f8f8f8;--xy-node-border-default: 1px solid #3c3c3c;--xy-node-background-color-default: #1e1e1e;--xy-node-group-background-color-default: rgba(240, 240, 240, .25);--xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(255, 255, 255, .08);--xy-node-boxshadow-selected-default: 0 0 0 .5px #999;--xy-handle-background-color-default: #bebebe;--xy-handle-border-color-default: #1e1e1e;--xy-selection-background-color-default: rgba(200, 200, 220, .08);--xy-selection-border-default: 1px dotted rgba(200, 200, 220, .8);--xy-controls-button-background-color-default: #2b2b2b;--xy-controls-button-background-color-hover-default: #3e3e3e;--xy-controls-button-color-default: #f8f8f8;--xy-controls-button-color-hover-default: #fff;--xy-controls-button-border-color-default: #5b5b5b;--xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, .08);--xy-edge-label-background-color-default: #141414;--xy-edge-label-color-default: #f8f8f8}.svelte-flow__background{background-color:var(--xy-background-color-props, var(--xy-background-color, var(--xy-background-color-default)));pointer-events:none;z-index:-1}.svelte-flow__container{position:absolute;width:100%;height:100%;top:0;left:0}.svelte-flow__pane{z-index:1;touch-action:none}.svelte-flow__pane.draggable{cursor:grab}.svelte-flow__pane.dragging{cursor:grabbing}.svelte-flow__pane.selection{cursor:pointer}.svelte-flow__viewport{transform-origin:0 0;z-index:2;pointer-events:none}.svelte-flow__renderer{z-index:4}.svelte-flow__selection{z-index:6}.svelte-flow__nodesselection-rect:focus,.svelte-flow__nodesselection-rect:focus-visible{outline:none}.svelte-flow__edge-path{stroke:var(--xy-edge-stroke, var(--xy-edge-stroke-default));stroke-width:var(--xy-edge-stroke-width, var(--xy-edge-stroke-width-default));fill:none}.svelte-flow__connection-path{stroke:var(--xy-connectionline-stroke, var(--xy-connectionline-stroke-default));stroke-width:var(--xy-connectionline-stroke-width, var(--xy-connectionline-stroke-width-default));fill:none}.svelte-flow .svelte-flow__edges{position:absolute}.svelte-flow .svelte-flow__edges svg{overflow:visible;position:absolute;pointer-events:none}.svelte-flow__edge{pointer-events:visibleStroke}.svelte-flow__edge.selectable{cursor:pointer}.svelte-flow__edge.animated path{stroke-dasharray:5;animation:dashdraw .5s linear infinite}.svelte-flow__edge.animated path.svelte-flow__edge-interaction{stroke-dasharray:none;animation:none}.svelte-flow__edge.inactive{pointer-events:none}.svelte-flow__edge.selected,.svelte-flow__edge:focus,.svelte-flow__edge:focus-visible{outline:none}.svelte-flow__edge.selected .svelte-flow__edge-path,.svelte-flow__edge.selectable:focus .svelte-flow__edge-path,.svelte-flow__edge.selectable:focus-visible .svelte-flow__edge-path{stroke:var(--xy-edge-stroke-selected, var(--xy-edge-stroke-selected-default))}.svelte-flow__edge-textwrapper{pointer-events:all}.svelte-flow__edge .svelte-flow__edge-text{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.svelte-flow__arrowhead polyline{stroke:var(--xy-edge-stroke, var(--xy-edge-stroke-default))}.svelte-flow__arrowhead polyline.arrowclosed{fill:var(--xy-edge-stroke, var(--xy-edge-stroke-default))}.svelte-flow__connection{pointer-events:none}.svelte-flow__connection .animated{stroke-dasharray:5;animation:dashdraw .5s linear infinite}svg.svelte-flow__connectionline{z-index:1001;overflow:visible;position:absolute}.svelte-flow__nodes{pointer-events:none;transform-origin:0 0}.svelte-flow__node{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:all;transform-origin:0 0;box-sizing:border-box;cursor:default}.svelte-flow__node.selectable{cursor:pointer}.svelte-flow__node.draggable{cursor:grab;pointer-events:all}.svelte-flow__node.draggable.dragging{cursor:grabbing}.svelte-flow__nodesselection{z-index:3;transform-origin:left top;pointer-events:none}.svelte-flow__nodesselection-rect{position:absolute;pointer-events:all;cursor:grab}.svelte-flow__handle{position:absolute;pointer-events:none;min-width:5px;min-height:5px;width:6px;height:6px;background-color:var(--xy-handle-background-color, var(--xy-handle-background-color-default));border:1px solid var(--xy-handle-border-color, var(--xy-handle-border-color-default));border-radius:100%}.svelte-flow__handle.connectingfrom{pointer-events:all}.svelte-flow__handle.connectionindicator{pointer-events:all;cursor:crosshair}.svelte-flow__handle-bottom{top:auto;left:50%;bottom:0;transform:translate(-50%,50%)}.svelte-flow__handle-top{top:0;left:50%;transform:translate(-50%,-50%)}.svelte-flow__handle-left{top:50%;left:0;transform:translate(-50%,-50%)}.svelte-flow__handle-right{top:50%;right:0;transform:translate(50%,-50%)}.svelte-flow__edgeupdater{cursor:move;pointer-events:all}.svelte-flow__pane.selection .svelte-flow__panel{pointer-events:none}.svelte-flow__panel{position:absolute;z-index:5;margin:15px}.svelte-flow__panel.top{top:0}.svelte-flow__panel.bottom{bottom:0}.svelte-flow__panel.top.center,.svelte-flow__panel.bottom.center{left:50%;transform:translate(-15px) translate(-50%)}.svelte-flow__panel.left{left:0}.svelte-flow__panel.right{right:0}.svelte-flow__panel.left.center,.svelte-flow__panel.right.center{top:50%;transform:translateY(-15px) translateY(-50%)}.svelte-flow__attribution{font-size:10px;background:var(--xy-attribution-background-color, var(--xy-attribution-background-color-default));padding:2px 3px;margin:0}.svelte-flow__attribution a{text-decoration:none;color:#999}@keyframes dashdraw{0%{stroke-dashoffset:10}}.svelte-flow__edgelabel-renderer{position:absolute;width:100%;height:100%;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;left:0;top:0}.svelte-flow__viewport-portal{position:absolute;width:100%;height:100%;left:0;top:0;-webkit-user-select:none;-moz-user-select:none;user-select:none}.svelte-flow__minimap{background:var( --xy-minimap-background-color-props, var(--xy-minimap-background-color, var(--xy-minimap-background-color-default)) )}.svelte-flow__minimap-svg{display:block}.svelte-flow__minimap-mask{fill:var( --xy-minimap-mask-background-color-props, var(--xy-minimap-mask-background-color, var(--xy-minimap-mask-background-color-default)) );stroke:var( --xy-minimap-mask-stroke-color-props, var(--xy-minimap-mask-stroke-color, var(--xy-minimap-mask-stroke-color-default)) );stroke-width:var( --xy-minimap-mask-stroke-width-props, var(--xy-minimap-mask-stroke-width, var(--xy-minimap-mask-stroke-width-default)) )}.svelte-flow__minimap-node{fill:var( --xy-minimap-node-background-color-props, var(--xy-minimap-node-background-color, var(--xy-minimap-node-background-color-default)) );stroke:var( --xy-minimap-node-stroke-color-props, var(--xy-minimap-node-stroke-color, var(--xy-minimap-node-stroke-color-default)) );stroke-width:var( --xy-minimap-node-stroke-width-props, var(--xy-minimap-node-stroke-width, var(--xy-minimap-node-stroke-width-default)) )}.svelte-flow__background-pattern.dots{fill:var( --xy-background-pattern-color-props, var(--xy-background-pattern-color, var(--xy-background-pattern-dots-color-default)) )}.svelte-flow__background-pattern.lines{stroke:var( --xy-background-pattern-color-props, var(--xy-background-pattern-color, var(--xy-background-pattern-lines-color-default)) )}.svelte-flow__background-pattern.cross{stroke:var( --xy-background-pattern-color-props, var(--xy-background-pattern-color, var(--xy-background-pattern-cross-color-default)) )}.svelte-flow__controls{display:flex;flex-direction:column;box-shadow:var(--xy-controls-box-shadow, var(--xy-controls-box-shadow-default))}.svelte-flow__controls.horizontal{flex-direction:row}.svelte-flow__controls-button{display:flex;justify-content:center;align-items:center;height:26px;width:26px;padding:4px;border:none;background:var(--xy-controls-button-background-color, var(--xy-controls-button-background-color-default));border-bottom:1px solid var( --xy-controls-button-border-color-props, var(--xy-controls-button-border-color, var(--xy-controls-button-border-color-default)) );color:var( --xy-controls-button-color-props, var(--xy-controls-button-color, var(--xy-controls-button-color-default)) );cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.svelte-flow__controls-button svg{width:100%;max-width:12px;max-height:12px;fill:currentColor}.svelte-flow__edge.updating .svelte-flow__edge-path{stroke:#777}.svelte-flow__edge-text{font-size:10px}.svelte-flow__node.selectable:focus,.svelte-flow__node.selectable:focus-visible{outline:none}.svelte-flow__node-input,.svelte-flow__node-default,.svelte-flow__node-output,.svelte-flow__node-group{padding:10px;border-radius:var(--xy-node-border-radius, var(--xy-node-border-radius-default));width:150px;font-size:12px;color:var(--xy-node-color, var(--xy-node-color-default));text-align:center;border:var(--xy-node-border, var(--xy-node-border-default));background-color:var(--xy-node-background-color, var(--xy-node-background-color-default))}.svelte-flow__node-input.selectable:hover,.svelte-flow__node-default.selectable:hover,.svelte-flow__node-output.selectable:hover,.svelte-flow__node-group.selectable:hover{box-shadow:var(--xy-node-boxshadow-hover, var(--xy-node-boxshadow-hover-default))}.svelte-flow__node-input.selectable.selected,.svelte-flow__node-input.selectable:focus,.svelte-flow__node-input.selectable:focus-visible,.svelte-flow__node-default.selectable.selected,.svelte-flow__node-default.selectable:focus,.svelte-flow__node-default.selectable:focus-visible,.svelte-flow__node-output.selectable.selected,.svelte-flow__node-output.selectable:focus,.svelte-flow__node-output.selectable:focus-visible,.svelte-flow__node-group.selectable.selected,.svelte-flow__node-group.selectable:focus,.svelte-flow__node-group.selectable:focus-visible{box-shadow:var(--xy-node-boxshadow-selected, var(--xy-node-boxshadow-selected-default))}.svelte-flow__node-group{background-color:var(--xy-node-group-background-color, var(--xy-node-group-background-color-default))}.svelte-flow__nodesselection-rect,.svelte-flow__selection{background:var(--xy-selection-background-color, var(--xy-selection-background-color-default));border:var(--xy-selection-border, var(--xy-selection-border-default))}.svelte-flow__nodesselection-rect:focus,.svelte-flow__nodesselection-rect:focus-visible,.svelte-flow__selection:focus,.svelte-flow__selection:focus-visible{outline:none}.svelte-flow__controls-button:hover{background:var( --xy-controls-button-background-color-hover-props, var(--xy-controls-button-background-color-hover, var(--xy-controls-button-background-color-hover-default)) );color:var( --xy-controls-button-color-hover-props, var(--xy-controls-button-color-hover, var(--xy-controls-button-color-hover-default)) )}.svelte-flow__controls-button:disabled{pointer-events:none}.svelte-flow__controls-button:disabled svg{fill-opacity:.4}.svelte-flow__controls-button:last-child{border-bottom:none}.svelte-flow__controls.horizontal .svelte-flow__controls-button{border-bottom:none;border-right:1px solid var( --xy-controls-button-border-color-props, var(--xy-controls-button-border-color, var(--xy-controls-button-border-color-default)) )}.svelte-flow__controls.horizontal .svelte-flow__controls-button:last-child{border-right:none}.svelte-flow__resize-control{position:absolute}.svelte-flow__resize-control.left,.svelte-flow__resize-control.right{cursor:ew-resize}.svelte-flow__resize-control.top,.svelte-flow__resize-control.bottom{cursor:ns-resize}.svelte-flow__resize-control.top.left,.svelte-flow__resize-control.bottom.right{cursor:nwse-resize}.svelte-flow__resize-control.bottom.left,.svelte-flow__resize-control.top.right{cursor:nesw-resize}.svelte-flow__resize-control.handle{width:5px;height:5px;border:1px solid #fff;border-radius:1px;background-color:var(--xy-resize-background-color, var(--xy-resize-background-color-default));translate:-50% -50%}.svelte-flow__resize-control.handle.left{left:0;top:50%}.svelte-flow__resize-control.handle.right{left:100%;top:50%}.svelte-flow__resize-control.handle.top{left:50%;top:0}.svelte-flow__resize-control.handle.bottom{left:50%;top:100%}.svelte-flow__resize-control.handle.top.left,.svelte-flow__resize-control.handle.bottom.left{left:0}.svelte-flow__resize-control.handle.top.right,.svelte-flow__resize-control.handle.bottom.right{left:100%}.svelte-flow__resize-control.line{border-color:var(--xy-resize-background-color, var(--xy-resize-background-color-default));border-width:0;border-style:solid}.svelte-flow__resize-control.line.left,.svelte-flow__resize-control.line.right{width:1px;transform:translate(-50%);top:0;height:100%}.svelte-flow__resize-control.line.left{left:0;border-left-width:1px}.svelte-flow__resize-control.line.right{left:100%;border-right-width:1px}.svelte-flow__resize-control.line.top,.svelte-flow__resize-control.line.bottom{height:1px;transform:translateY(-50%);left:0;width:100%}.svelte-flow__resize-control.line.top{top:0;border-top-width:1px}.svelte-flow__resize-control.line.bottom{border-bottom-width:1px;top:100%}.svelte-flow__edge-label{text-align:center;position:absolute;padding:2px;font-size:10px;color:var(--xy-edge-label-color, var(--xy-edge-label-color-default));background:var(--xy-edge-label-background-color, var(--xy-edge-label-background-color-default))}.svelte-flow__container{-webkit-user-select:none;-moz-user-select:none;user-select:none}.mnode.svelte-1ymw5ah{position:relative;display:flex;flex-direction:column;justify-content:center;gap:1px;box-sizing:border-box;padding:0 9px;border:1px solid var(--ink);border-radius:0;background:var(--paper);text-align:left;cursor:pointer;font:inherit;color:var(--ink);transition:background 90ms linear}.mnode.svelte-1ymw5ah:hover,.mnode.sel.svelte-1ymw5ah{border-width:2px;padding:0 8px;background:var(--press)}.mnode.dimmed.svelte-1ymw5ah{border-color:var(--ink-4);color:var(--ink-4)}.mnode.dimmed.svelte-1ymw5ah .count:where(.svelte-1ymw5ah){color:var(--ink-4)}.count.island.svelte-1ymw5ah{color:var(--ink-2)}.mnode.gen.svelte-1ymw5ah{color:var(--ink-4);border-color:var(--rule-soft)}.mnode.gen.svelte-1ymw5ah .count:where(.svelte-1ymw5ah){color:var(--ink-4)}.mnode.test.svelte-1ymw5ah{border-style:dashed;border-color:var(--ink-3)}.mnode.svelte-1ymw5ah:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.weight.svelte-1ymw5ah{position:absolute;left:0;bottom:0;height:4px;background:var(--ink);opacity:.3;pointer-events:none}.mnode.svelte-1ymw5ah:hover .weight:where(.svelte-1ymw5ah),.mnode.sel.svelte-1ymw5ah .weight:where(.svelte-1ymw5ah){opacity:.55}.mnode.dimmed.svelte-1ymw5ah .weight:where(.svelte-1ymw5ah),.mnode.gen.svelte-1ymw5ah .weight:where(.svelte-1ymw5ah){opacity:.1}.name.svelte-1ymw5ah{font:500 13px var(--mono);line-height:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.count.svelte-1ymw5ah{font:400 11px var(--sans);line-height:13px;color:var(--ink-3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.svelte-flow__edge-path.medge{stroke:var(--ink);stroke-opacity:.28;fill:none}.svelte-flow__edge-path.medge.hot{stroke-opacity:.95}.svelte-flow__edge-path.medge.dimmed{stroke-opacity:.06}.svelte-flow__edge-path.medge.back{stroke:var(--accent);stroke-opacity:.6;stroke-dasharray:4 3}.hit.svelte-wy6r9a{stroke:transparent;stroke-width:12;fill:none;pointer-events:stroke;cursor:crosshair}.exp.svelte-14ndwen{display:flex;flex:0 0 auto;margin-left:auto;gap:6px}.exp.svelte-14ndwen button:where(.svelte-14ndwen){padding:3px 8px;background:var(--paper-2);border:1px solid var(--rule-soft);border-radius:0;color:var(--ink-2);cursor:pointer;font:12.5px var(--sans);white-space:nowrap}.exp.svelte-14ndwen button:where(.svelte-14ndwen):hover:not(:disabled){background:var(--press);border-color:var(--ink-3);color:var(--ink)}.exp.svelte-14ndwen button:where(.svelte-14ndwen):disabled{color:var(--ink-4);cursor:default}.exp.svelte-14ndwen button:where(.svelte-14ndwen):focus-visible{outline:2px solid var(--accent);outline-offset:1px}.mapside.svelte-dzmqqy{border-left:1px solid var(--rule-soft);overflow:auto;padding:14px 16px;background:var(--paper)}h2.svelte-dzmqqy{margin:0 0 6px;font-size:15px;font-weight:600}p.svelte-dzmqqy{margin:0 0 10px;color:var(--ink-2);font-size:12.5px;line-height:1.5;max-width:40ch}.dim.svelte-dzmqqy{color:var(--ink-3)}.notes.svelte-dzmqqy p:where(.svelte-dzmqqy){font-size:11.5px;margin-bottom:8px}.reach.svelte-dzmqqy{font-size:11.5px;margin:0 0 8px}.field.svelte-dzmqqy{display:flex;gap:8px;align-items:center;font-size:12.5px;color:var(--ink-2);margin:12px 0 8px}.field.svelte-dzmqqy select:where(.svelte-dzmqqy){flex:1 1 auto;min-width:0;font:12px var(--mono);color:var(--ink);background:var(--paper);border:1px solid var(--rule-soft);border-radius:0;padding:3px 4px}.toggle.svelte-dzmqqy{display:flex;gap:8px;align-items:center;font-size:12.5px;color:var(--ink-2);margin:0 0 12px;cursor:pointer}.toggle.svelte-dzmqqy input:where(.svelte-dzmqqy){margin:0;accent-color:var(--ink)}details.svelte-dzmqqy{margin:4px 0 10px}summary.svelte-dzmqqy{cursor:pointer;font-weight:600;font-size:12.5px;list-style:none}summary.svelte-dzmqqy::-webkit-details-marker{display:none}summary.svelte-dzmqqy .dim:where(.svelte-dzmqqy){font-weight:400}.cyc.svelte-dzmqqy{font:11.5px var(--mono);color:var(--ink-2);padding:3px 0}.cyc.svelte-dzmqqy b:where(.svelte-dzmqqy){color:var(--accent);font-weight:500}.edgeinfo.svelte-dzmqqy{margin-top:12px;border-top:1px solid var(--rule-soft);padding-top:10px}.head.svelte-dzmqqy{display:flex;align-items:baseline;justify-content:space-between;gap:8px}.mono.svelte-dzmqqy{font:500 12.5px var(--mono)}.clear.svelte-dzmqqy{border:0;background:none;padding:0;font:11.5px var(--sans);color:var(--ink-3);cursor:pointer;text-decoration:underline}.clear.svelte-dzmqqy:hover{color:var(--accent)}.pair.svelte-dzmqqy{font:11.5px var(--mono);color:var(--ink-2);padding:2px 0;display:flex;justify-content:space-between;gap:10px}.pair.svelte-dzmqqy b:where(.svelte-dzmqqy){color:var(--ink);font-weight:500}.pair.label.svelte-dzmqqy{font:400 11.5px var(--sans);color:var(--ink-3);margin-top:8px}.filerow.svelte-dzmqqy{display:block;font:11.5px var(--mono);color:var(--ink-2);padding:2px 0;text-decoration:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.filerow.svelte-dzmqqy:hover{color:var(--accent);text-decoration:underline}.filerow.gen.svelte-dzmqqy{color:var(--ink-4)}.island.svelte-dzmqqy{margin:6px 0 0;color:var(--ink-2);font-size:11.5px;line-height:1.45}.legend.svelte-148kree{position:absolute;left:12px;bottom:12px;z-index:4;max-width:400px;border:1px solid var(--rule);background:var(--paper);font-size:11.5px;color:var(--ink-2)}.legend-h.svelte-148kree{display:block;width:100%;border:0;background:transparent;padding:5px 10px;text-align:left;color:var(--ink);font:600 12px var(--sans);cursor:pointer}.legend-body.svelte-148kree{padding:2px 10px 8px;border-top:1px solid var(--rule-soft)}.lrow.svelte-148kree{display:flex;align-items:center;gap:10px;padding:3px 0}.lrow.svelte-148kree>:where(.svelte-148kree):first-child{flex:0 0 52px;display:inline-flex;justify-content:center}.k-line.svelte-148kree{stroke:var(--ink);stroke-opacity:.6;stroke-width:1.5;fill:none}.k-line.k-back.svelte-148kree{stroke:var(--accent);stroke-opacity:.8;stroke-dasharray:4 3}.k-label.svelte-148kree{font-size:10px;color:var(--ink-3);text-align:center;line-height:1.2}.k-box.svelte-148kree{box-sizing:border-box;padding:1px 5px;border:1px solid var(--ink);font-size:10.5px;color:var(--ink);line-height:14px}.k-box.k-weight.svelte-148kree{position:relative}.k-box.k-weight.svelte-148kree:after{content:"";position:absolute;left:0;bottom:0;width:68%;height:4px;background:var(--ink);opacity:.3}.k-box.k-sel.svelte-148kree{border-width:2px;background:var(--press)}.k-box.k-test.svelte-148kree{border-style:dashed;border-color:var(--ink-3);color:var(--ink-3)}.k-box.k-gen.svelte-148kree{border-color:var(--ink-4);color:var(--ink-4)}.dim.svelte-148kree{color:var(--ink-3)}.mapview.svelte-1j33xh5{display:grid;grid-template-columns:minmax(600px,1fr) 320px;height:100%;min-height:0}.mapstage.svelte-1j33xh5{position:relative;overflow:hidden;background:var(--paper)}.mapstage.svelte-1j33xh5 .svelte-flow{background:var(--paper)}.mapstage.svelte-1j33xh5 .svelte-flow__handle{opacity:0;width:1px;height:1px;min-width:0;min-height:0;border:0;pointer-events:none}.mapstage.svelte-1j33xh5 .svelte-flow__controls-button{background:var(--paper);border:0;border-bottom:1px solid var(--rule-soft);border-radius:0;box-shadow:none;fill:var(--ink-2)}.mapstage.svelte-1j33xh5 .svelte-flow__controls{box-shadow:none;border:1px solid var(--rule-soft)}.mapstage.svelte-1j33xh5 .svelte-flow__node{cursor:default}.layerline.svelte-1j33xh5{position:absolute;top:0;left:0;height:1px;background:var(--rule-faint);pointer-events:none}.layerlbl.svelte-1j33xh5{position:absolute;top:0;left:0;font:12px var(--sans);color:var(--ink-3);white-space:nowrap;pointer-events:none}.state.svelte-1j33xh5{padding:40px;max-width:46ch}.state.svelte-1j33xh5 h2:where(.svelte-1j33xh5){margin:0 0 8px;font-size:15px;font-weight:600}.state.svelte-1j33xh5 p:where(.svelte-1j33xh5){margin:0;color:var(--ink-2);font-size:12.5px;line-height:1.5}.dim.svelte-1j33xh5{color:var(--ink-3)}.tip.svelte-1j33xh5{position:absolute;z-index:6;max-width:320px;background:var(--paper);border:1px solid var(--ink);padding:8px 10px;font-size:12px;color:var(--ink-2);pointer-events:none}.tip.svelte-1j33xh5 .mono:where(.svelte-1j33xh5){font:12px var(--mono);color:var(--ink-2);margin-bottom:4px}.tip.svelte-1j33xh5 .mono:where(.svelte-1j33xh5) b:where(.svelte-1j33xh5){color:var(--ink);font-weight:600}.tip.svelte-1j33xh5 .row2:where(.svelte-1j33xh5){display:flex;justify-content:space-between;gap:12px;padding:1px 0}.tip.svelte-1j33xh5 .row2.mono:where(.svelte-1j33xh5){font:11.5px var(--mono)}.tip.svelte-1j33xh5 .row2.dim:where(.svelte-1j33xh5){color:var(--ink-3)}@media(max-width:1100px){.mapview.svelte-1j33xh5{grid-template-columns:1fr 260px}}.snode.svelte-390foq{display:flex;flex-direction:column;justify-content:center;gap:1px;box-sizing:border-box;padding:0 9px;border:1px solid var(--ink);border-radius:0;background:var(--paper);text-align:left;cursor:pointer;font:inherit;color:var(--ink);transition:background 90ms linear}.snode.svelte-390foq:hover,.snode.sel.svelte-390foq{border-width:2px;padding:0 8px;background:var(--press)}.snode.dimmed.svelte-390foq{border-color:var(--ink-4);color:var(--ink-4)}.snode.dimmed.svelte-390foq .sub:where(.svelte-390foq){color:var(--ink-4)}.snode.origin.svelte-390foq{border-style:dashed;border-color:var(--ink-3)}.snode.unreached.svelte-390foq{border-color:var(--ink-4);color:var(--ink-2)}.snode.svelte-390foq:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.name.svelte-390foq{font:500 13px var(--mono);line-height:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mark.svelte-390foq{color:var(--accent);margin-right:5px;font-size:9px;vertical-align:1px}.sub.svelte-390foq{font:400 11px var(--sans);line-height:13px;color:var(--ink-3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.svelte-flow__edge-path.sedge{stroke:var(--ink);stroke-opacity:.32;fill:none}.svelte-flow__edge-path.sedge.synth{stroke-dasharray:5 3}.svelte-flow__edge-path.sedge.back{stroke:var(--accent);stroke-opacity:.6;stroke-dasharray:4 3}.svelte-flow__edge-path.sedge.hot{stroke-opacity:.95}.svelte-flow__edge-path.sedge.back.hot{stroke-opacity:.85}.svelte-flow__edge-path.sedge.hot.soft{stroke-opacity:.38}.svelte-flow__edge-path.sedge.focus{stroke-opacity:1}.svelte-flow__edge-path.sedge.dimmed{stroke-opacity:.06}.svelte-flow__edge-label.spill-anchor{padding:0;line-height:0;font-size:0}.spill.svelte-cf2s2p{display:inline-block;box-sizing:border-box;height:17px;padding:0 5px;border:1px solid var(--rule);background:var(--paper);color:var(--ink-2);font:400 10.5px var(--mono);line-height:15px;white-space:nowrap;cursor:crosshair}.spill.hot.svelte-cf2s2p{border-color:var(--ink-3);color:var(--ink)}.spill.focus.svelte-cf2s2p{border-color:var(--ink);box-shadow:0 2px 8px #0000002e}.spill.full.svelte-cf2s2p{height:auto;max-width:360px;padding:2px 6px;line-height:13px;white-space:normal;text-align:left;overflow-wrap:anywhere}.screens.svelte-1qt8k18{display:grid;grid-template-columns:minmax(600px,1fr) 340px;height:100%;min-height:0}.stage.svelte-1qt8k18{position:relative;overflow:hidden;background:var(--paper)}.stage.svelte-1qt8k18 .svelte-flow{background:var(--paper)}.stage.svelte-1qt8k18 .svelte-flow__handle{opacity:0;width:1px;height:1px;min-width:0;min-height:0;border:0;pointer-events:none}.stage.svelte-1qt8k18 .svelte-flow__edge-labels{pointer-events:none}.stage.svelte-1qt8k18 .svelte-flow__controls-button{background:var(--paper);border:0;border-bottom:1px solid var(--rule-soft);border-radius:0;color:var(--ink-2)}.stage.svelte-1qt8k18 .svelte-flow__controls-button svg{fill:var(--ink-2)}.state.svelte-1qt8k18{padding:48px 40px;max-width:560px}.state.svelte-1qt8k18 h2:where(.svelte-1qt8k18){font:600 20px var(--sans);margin:0 0 8px}.legend.svelte-1qt8k18{position:absolute;left:12px;bottom:12px;z-index:4;max-width:380px;border:1px solid var(--rule);background:var(--paper);font-size:11.5px;color:var(--ink-2)}.legend-h.svelte-1qt8k18{display:block;width:100%;border:0;background:transparent;padding:5px 10px;text-align:left;color:var(--ink);font:600 12px var(--sans);cursor:pointer}.legend-body.svelte-1qt8k18{padding:2px 10px 8px;border-top:1px solid var(--rule-soft)}.lrow.svelte-1qt8k18{display:flex;align-items:center;gap:10px;padding:3px 0}.lrow.svelte-1qt8k18>:where(.svelte-1qt8k18):first-child{flex:0 0 44px;display:inline-flex;justify-content:center}.k-line.svelte-1qt8k18{stroke:var(--ink);stroke-opacity:.6;stroke-width:1.5;fill:none}.k-line.k-synth.svelte-1qt8k18{stroke-dasharray:5 3}.k-line.k-back.svelte-1qt8k18{stroke:var(--accent);stroke-opacity:.8;stroke-dasharray:4 3}.k-label.svelte-1qt8k18{font-size:10.5px;color:var(--ink-3)}.k-box.svelte-1qt8k18{box-sizing:border-box;padding:1px 5px;border:1px solid var(--ink);font-size:10.5px;color:var(--ink);line-height:14px}.k-box.k-origin.svelte-1qt8k18{border-style:dashed;border-color:var(--ink-3)}.k-box.k-unreached.svelte-1qt8k18{border-color:var(--ink-4);color:var(--ink-2)}.k-entry.svelte-1qt8k18 .mark:where(.svelte-1qt8k18){font-size:8px;margin-right:3px;vertical-align:1px}.tip.svelte-1qt8k18{position:absolute;z-index:5;width:340px;padding:8px 10px;border:1px solid var(--ink);background:var(--paper);box-shadow:0 4px 14px #0000002e;font-size:12px;pointer-events:none;overflow-wrap:anywhere}.tiprow.svelte-1qt8k18{display:flex;flex-direction:column;gap:1px;margin-top:6px;padding-top:6px;border-top:1px solid var(--rule-soft)}.side.svelte-1qt8k18{border-left:1px solid var(--rule);padding:14px 16px;overflow:auto;font-size:12.5px}.head.svelte-1qt8k18{display:flex;justify-content:space-between;align-items:flex-start;gap:8px;margin-bottom:10px}.big.svelte-1qt8k18{font-size:15px;font-weight:600}.sub.svelte-1qt8k18{display:flex;align-items:center;gap:5px;margin-top:3px;color:var(--ink-2);text-decoration:none}.sub.svelte-1qt8k18:hover{text-decoration:underline}.act.svelte-1qt8k18{color:var(--accent)}.clear.svelte-1qt8k18{border:1px solid var(--rule);background:transparent;color:var(--ink-2);font:inherit;font-size:11.5px;padding:1px 7px;cursor:pointer}.note.svelte-1qt8k18{margin:0 0 6px}h4.svelte-1qt8k18{margin:16px 0 6px;font:600 12.5px var(--sans)}.row.svelte-1qt8k18{padding:7px 8px;margin:0 -8px;border-top:1px solid var(--rule-soft);transition:background 90ms linear}.row.hot.svelte-1qt8k18{background:var(--press)}.peer.svelte-1qt8k18{display:block;width:100%;border:0;background:transparent;padding:2px 0;text-align:left;color:var(--ink);font:500 12.5px var(--mono);cursor:pointer}.peer.svelte-1qt8k18:hover{text-decoration:underline}.when.svelte-1qt8k18{color:var(--ink);font:400 11.5px var(--mono);margin-top:2px}.kw.svelte-1qt8k18{font-weight:600}.via.svelte-1qt8k18{color:var(--ink-2);font:400 11.5px var(--mono);margin-top:2px}.ways.svelte-1qt8k18{font:500 11px var(--sans);margin-top:6px}.scenario.many.svelte-1qt8k18{margin:4px 0 0 8px;padding-left:8px;border-left:1px solid var(--rule-soft)}.site.svelte-1qt8k18{display:block;font:400 11px var(--mono);margin-top:2px;text-decoration:none}.site.svelte-1qt8k18:hover{text-decoration:underline}.mono.svelte-1qt8k18{font-family:var(--mono)}.dim.svelte-1qt8k18{color:var(--ink-3)}.mark.svelte-1qt8k18{color:var(--accent)}.snode.svelte-1gxwpy3{display:flex;flex-direction:column;justify-content:center;gap:1px;box-sizing:border-box;padding:0 9px;border:1px solid var(--ink);border-radius:0;background:var(--paper);text-align:left;cursor:pointer;font:inherit;color:var(--ink);transition:background 90ms linear}.snode.rail.svelte-1gxwpy3{align-items:flex-start;padding:5px 9px;max-width:100%}.snode.svelte-1gxwpy3:hover,.snode.sel.svelte-1gxwpy3{border-width:2px;padding:0 8px}.snode.rail.svelte-1gxwpy3:hover,.snode.rail.sel.svelte-1gxwpy3{padding:4px 8px}.snode.svelte-1gxwpy3:hover,.snode.sel.svelte-1gxwpy3{background:var(--press)}.snode.dimmed.svelte-1gxwpy3{border-color:var(--ink-4);color:var(--ink-4)}.snode.dimmed.svelte-1gxwpy3 .sub:where(.svelte-1gxwpy3){color:var(--ink-4)}.snode.k-bridge.svelte-1gxwpy3,.snode.k-event.svelte-1gxwpy3{border-left:3px solid var(--accent);padding-left:7px}.snode.k-bridge.svelte-1gxwpy3:hover,.snode.k-bridge.sel.svelte-1gxwpy3,.snode.k-event.svelte-1gxwpy3:hover,.snode.k-event.sel.svelte-1gxwpy3{border-left-width:3px;padding-left:7px}.snode.k-bridge.dimmed.svelte-1gxwpy3,.snode.k-event.dimmed.svelte-1gxwpy3{border-left-color:var(--accent-line)}.snode.k-store.svelte-1gxwpy3{background:var(--paper-2)}.snode.k-store.svelte-1gxwpy3:hover,.snode.k-store.sel.svelte-1gxwpy3{background:var(--press)}.snode.k-effect.svelte-1gxwpy3{border-style:dashed;border-color:var(--ink-3)}.snode.svelte-1gxwpy3:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.name.svelte-1gxwpy3{font:500 13px var(--mono);line-height:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}.mark.svelte-1gxwpy3{color:var(--accent);margin-right:5px;font-size:9px;vertical-align:1px}.more.svelte-1gxwpy3{color:var(--ink-3)}.sub.svelte-1gxwpy3{font:400 11px var(--sans);line-height:13px;color:var(--ink-3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}.stubs.svelte-12qg1ij{display:flex;flex-direction:column;gap:1px;padding-top:3px;box-sizing:border-box;pointer-events:none;font-size:10.5px;line-height:13px;color:var(--ink-3)}.stubs.dimmed.svelte-12qg1ij{opacity:.25}.stub.svelte-12qg1ij{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--mono);pointer-events:auto}.arrow.svelte-12qg1ij{display:inline-block;width:11px;color:var(--ink-4)}.more.svelte-12qg1ij{color:var(--ink-4)}.fpoint.svelte-10oa9z2{display:flex;align-items:center;justify-content:center;box-sizing:border-box;padding:0 9px;border:1px solid var(--ink-2);background:var(--paper);color:var(--ink);user-select:none}.fpoint.dimmed.svelte-10oa9z2{border-color:var(--ink-4);color:var(--ink-4)}.q.svelte-10oa9z2{font:400 12px var(--mono);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}.kw.svelte-10oa9z2{font-weight:600}.dcap.svelte-1ham54o{box-sizing:border-box;font:400 10.5px/14px var(--mono);color:var(--ink-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center;pointer-events:none;user-select:none}.dcap.dimmed.svelte-1ham54o{color:var(--ink-4)}.kw.svelte-1ham54o{font-weight:600}.rcap.svelte-9iclwq{box-sizing:border-box;padding-bottom:4px;border-bottom:1px solid var(--rule-soft);font:500 11px/16px var(--mono);color:var(--ink-3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;pointer-events:none;user-select:none}.legend.svelte-1jp07je{position:absolute;left:12px;bottom:12px;z-index:4;max-width:400px;border:1px solid var(--rule);background:var(--paper);font-size:11.5px;color:var(--ink-2)}.legend-h.svelte-1jp07je{display:block;width:100%;border:0;background:transparent;padding:5px 10px;text-align:left;color:var(--ink);font:600 12px var(--sans);cursor:pointer}.legend-body.svelte-1jp07je{padding:2px 10px 8px;border-top:1px solid var(--rule-soft)}.lrow.svelte-1jp07je{display:flex;align-items:center;gap:10px;padding:3px 0}.lrow.svelte-1jp07je>:where(.svelte-1jp07je):first-child{flex:0 0 44px;display:inline-flex;justify-content:center}.k-line.svelte-1jp07je{stroke:var(--ink);stroke-opacity:.6;stroke-width:1.5;fill:none}.k-line.k-synth.svelte-1jp07je{stroke-dasharray:5 3}.k-line.k-back.svelte-1jp07je{stroke:var(--accent);stroke-opacity:.8;stroke-dasharray:4 3}.k-label.svelte-1jp07je{font-size:10.5px;color:var(--ink-3)}.k-cap.svelte-1jp07je{font-size:10.5px;color:var(--ink-3);border-bottom:1px solid var(--rule-soft);padding-bottom:2px}.k-box.svelte-1jp07je{box-sizing:border-box;padding:1px 5px;border:1px solid var(--ink);font-size:10.5px;color:var(--ink);line-height:14px}.k-box.k-cross.svelte-1jp07je{border-left:3px solid var(--accent)}.k-box.k-store.svelte-1jp07je{background:var(--paper-2)}.k-box.k-effect.svelte-1jp07je{border-style:dashed;border-color:var(--ink-3)}.k-box.k-fork.svelte-1jp07je{border-color:var(--ink-2)}.k-anchor.svelte-1jp07je .mark:where(.svelte-1jp07je){font-size:8px;margin-right:3px;vertical-align:1px}.legend.flow.svelte-1jp07je{position:static;margin:28px 0 0;max-width:520px}.steps.svelte-v5q9re{display:grid;grid-template-columns:minmax(600px,1fr) 340px;height:100%;min-height:0}.stage.svelte-v5q9re{position:relative;overflow:hidden;background:var(--paper)}.stage.svelte-v5q9re .svelte-flow{background:var(--paper)}.stage.svelte-v5q9re .svelte-flow__handle{opacity:0;width:1px;height:1px;min-width:0;min-height:0;border:0;pointer-events:none}.stage.svelte-v5q9re .svelte-flow__edge-labels{pointer-events:none}.stage.svelte-v5q9re .svelte-flow__controls-button{background:var(--paper);border:0;border-bottom:1px solid var(--rule-soft);border-radius:0;color:var(--ink-2)}.stage.svelte-v5q9re .svelte-flow__controls-button svg{fill:var(--ink-2)}.state.svelte-v5q9re{padding:48px 40px;max-width:560px}.state.svelte-v5q9re h2:where(.svelte-v5q9re){font:600 20px var(--sans);margin:0 0 8px}.chooser.svelte-v5q9re{max-width:720px;overflow:auto;height:100%;box-sizing:border-box}.chooser-list.svelte-v5q9re{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:0;margin-top:12px;border-top:1px solid var(--rule-soft)}.group-h.svelte-v5q9re{display:flex;justify-content:space-between;align-items:baseline;gap:12px;margin-top:18px;font-size:11.5px;color:var(--ink-2)}.group-h.svelte-v5q9re+.chooser-list:where(.svelte-v5q9re){margin-top:6px}.pick.svelte-v5q9re{display:block;padding:7px 8px;border-bottom:1px solid var(--rule-soft);color:var(--ink);text-decoration:none;font-size:12.5px}.pick.svelte-v5q9re:hover{background:var(--press)}.tip.svelte-v5q9re{position:absolute;z-index:5;width:400px;padding:8px 10px;border:1px solid var(--ink);background:var(--paper);box-shadow:0 4px 14px #0000002e;font-size:12px;pointer-events:none;overflow-wrap:anywhere}.tip.svelte-v5q9re .mono:where(.svelte-v5q9re),.tip.svelte-v5q9re .when:where(.svelte-v5q9re),.tip.svelte-v5q9re .via:where(.svelte-v5q9re),.tip.svelte-v5q9re .fires:where(.svelte-v5q9re){overflow-wrap:anywhere}.tiprow.svelte-v5q9re{display:flex;flex-direction:column;gap:1px;margin-top:6px;padding-top:6px;border-top:1px solid var(--rule-soft)}.side.svelte-v5q9re{border-left:1px solid var(--rule);padding:14px 16px;overflow:auto;font-size:12.5px}.head.svelte-v5q9re{display:flex;justify-content:space-between;align-items:flex-start;gap:8px;margin-bottom:10px}.big.svelte-v5q9re{font-size:15px;font-weight:600;overflow-wrap:anywhere}.sub.svelte-v5q9re{display:flex;align-items:center;gap:5px;margin-top:3px;color:var(--ink-2);text-decoration:none}a.sub.svelte-v5q9re:hover{text-decoration:underline}.act.svelte-v5q9re{color:var(--accent)}.clear.svelte-v5q9re{border:1px solid var(--rule);background:transparent;color:var(--ink-2);font:inherit;font-size:11.5px;padding:1px 7px;cursor:pointer}.note.svelte-v5q9re{margin:0 0 6px}.opt.svelte-v5q9re{display:inline-flex;align-items:center;gap:5px;cursor:pointer}.opt.svelte-v5q9re input:where(.svelte-v5q9re){margin:0;accent-color:var(--accent)}.reading.svelte-v5q9re{display:flex;align-items:baseline;gap:8px;color:var(--ink-3)}.tab.svelte-v5q9re{color:var(--ink-2);text-decoration:none;border-bottom:1px solid var(--rule-soft);padding-bottom:1px}.tab.svelte-v5q9re:hover{color:var(--ink);border-bottom-color:var(--ink-3)}.tab.on.svelte-v5q9re{color:var(--ink);font-weight:600;border-bottom-color:var(--accent)}.depth.svelte-v5q9re{font:inherit;font-size:12px;border:1px solid var(--rule-soft);background:var(--paper-2);color:var(--ink);padding:0 4px}.counts.svelte-v5q9re{display:flex;flex-wrap:wrap;gap:4px 12px;color:var(--ink-2)}h4.svelte-v5q9re{margin:16px 0 6px;font:600 12.5px var(--sans)}.row.svelte-v5q9re{padding:7px 8px;margin:0 -8px;border-top:1px solid var(--rule-soft);transition:background 90ms linear}.row.hot.svelte-v5q9re{background:var(--press)}.peer.svelte-v5q9re{display:block;width:100%;border:0;background:transparent;padding:2px 0;text-align:left;color:var(--ink);font:500 12.5px var(--mono);cursor:pointer}.peer.svelte-v5q9re:hover{text-decoration:underline}.when.svelte-v5q9re{color:var(--ink);font:400 11.5px var(--mono);margin-top:2px}.kw.svelte-v5q9re{font-weight:600}.via.svelte-v5q9re{color:var(--ink-2);font:400 11.5px var(--mono);margin-top:2px}.via.dim.svelte-v5q9re{color:var(--ink-3);font-size:11px}.fires.svelte-v5q9re{color:var(--ink);font:400 11.5px var(--mono);margin-top:2px}.ways.svelte-v5q9re{font:500 11px var(--sans);margin-top:6px}.scenario.many.svelte-v5q9re{margin:4px 0 0 8px;padding-left:8px;border-left:1px solid var(--rule-soft)}.site.svelte-v5q9re{display:block;font:400 11px var(--mono);margin-top:2px;color:var(--ink-2);text-decoration:none;overflow-wrap:anywhere}.status.svelte-v5q9re{color:var(--ink);font-weight:600}a.site.svelte-v5q9re:hover{text-decoration:underline}.mono.svelte-v5q9re{font-family:var(--mono)}.sans.svelte-v5q9re{font-family:var(--sans)}.dim.svelte-v5q9re{color:var(--ink-3)}.mark.svelte-v5q9re{color:var(--accent)}.card.svelte-1c9ldo3{display:flex;flex-direction:column;overflow:hidden;background:var(--paper);border:1px solid var(--rule-soft);text-align:left}.card.svelte-1c9ldo3:hover{border-color:var(--ink)}.card.cur.svelte-1c9ldo3{border-color:var(--accent)}.card.dim.svelte-1c9ldo3{opacity:.4}.head.svelte-1c9ldo3{display:grid;align-items:baseline;padding:10px 12px 6px;border-bottom:1px solid var(--rule-faint);background:none;color:var(--ink);gap:8px;grid-template-columns:16px 1fr auto;text-align:left}.head.svelte-1c9ldo3:hover .nm:where(.svelte-1c9ldo3){color:var(--accent)}.nm.svelte-1c9ldo3{overflow:hidden;font:600 13px var(--mono);text-overflow:ellipsis;white-space:nowrap}.loc.svelte-1c9ldo3{color:var(--ink-3);font:11px var(--mono);white-space:nowrap}.code.svelte-1c9ldo3{padding:6px 0;font:12px / 19px var(--mono)}.ln.svelte-1c9ldo3{display:grid;align-items:stretch;grid-template-columns:40px 1fr 6px}.ln.call.svelte-1c9ldo3{background:var(--accent-soft)}.no.svelte-1c9ldo3{padding-right:10px;color:var(--ink-4);font-size:11px;text-align:right;user-select:none}.tx.svelte-1c9ldo3{overflow:hidden;text-overflow:ellipsis;white-space:pre}.nosource.svelte-1c9ldo3{margin:0;padding:6px 12px;color:var(--ink-3);font-size:12px;line-height:19px}.t-c.svelte-1c9ldo3{color:var(--code-comment)}.t-s.svelte-1c9ldo3{color:var(--ink-2)}.t-k.svelte-1c9ldo3{font-weight:500}.t-n.svelte-1c9ldo3{color:var(--ink-2)}.t-def.svelte-1c9ldo3{font-weight:600}.ref.svelte-1c9ldo3{padding:0;background:none;color:var(--accent);border:0;cursor:pointer;font:inherit;text-decoration:underline;text-decoration-color:var(--accent-line);text-underline-offset:3px}.ref.svelte-1c9ldo3:hover{text-decoration-color:var(--accent)}.svelte-flow__edge-path.flink{stroke:var(--ink-3);stroke-width:1px;fill:none}.svelte-flow__edge-path.flink.dimmed{stroke-opacity:.25}.fhead.svelte-1gtjqth{fill:var(--ink-3)}.fhead.dimmed.svelte-1gtjqth{fill-opacity:.25}.flabel.svelte-1gtjqth text:where(.svelte-1gtjqth){fill:var(--ink-3);font:11px var(--mono)}.flabel.dimmed.svelte-1gtjqth text:where(.svelte-1gtjqth){fill-opacity:.25}.endcap.svelte-1f3e7uq{box-sizing:border-box;padding:12px;background:var(--paper);border:1px dashed var(--rule-soft);color:var(--ink-2);font-size:12px;line-height:1.45;text-align:left}.endcap.dim.svelte-1f3e7uq{opacity:.4}.lead.svelte-1f3e7uq{margin:0}.lead.svelte-1f3e7uq b:where(.svelte-1f3e7uq){color:var(--ink);font-weight:600}.site.svelte-1f3e7uq,.block.svelte-1f3e7uq{margin-top:8px}.endcap.svelte-1f3e7uq p:where(.svelte-1f3e7uq){margin:0}.form.svelte-1f3e7uq{color:var(--ink)}.soft.svelte-1f3e7uq{color:var(--ink-3)}.key.svelte-1f3e7uq .mono:where(.svelte-1f3e7uq),.mono.svelte-1f3e7uq{font-family:var(--mono)}.row.svelte-1f3e7uq{display:flex;width:100%;align-items:baseline;padding:0;background:none;border:0;color:var(--ink-2);cursor:pointer;font:11.5px / 18px var(--mono);gap:8px;justify-content:space-between;text-align:left}.row.svelte-1f3e7uq:hover .nm:where(.svelte-1f3e7uq){color:var(--accent)}.nm.svelte-1f3e7uq{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.unsure.svelte-1f3e7uq{text-decoration:underline dotted var(--ink-4);text-underline-offset:3px}.at.svelte-1f3e7uq{color:var(--ink-4);font-size:11px;white-space:nowrap}.flowview.svelte-vl698p{display:grid;height:100%;min-height:0;grid-template-rows:auto minmax(0,1fr) auto}.fhead.svelte-vl698p{display:flex;align-items:center;padding:12px 18px;border-bottom:1px solid var(--rule-soft);gap:12px}.fhead.svelte-vl698p h1:where(.svelte-vl698p){margin:0;font-size:16px;font-weight:600}.fhead.svelte-vl698p select:where(.svelte-vl698p){padding:3px 6px;background:var(--paper-2);color:var(--ink);border:1px solid var(--rule-soft);border-radius:0;font:12.5px var(--sans)}.note.svelte-vl698p{max-width:78ch;margin:0;color:var(--ink-3);font-size:12px}.fstage.svelte-vl698p{position:relative;overflow:hidden;background:var(--paper)}.fstage.svelte-vl698p .svelte-flow{background:var(--paper)}.fstage.svelte-vl698p .svelte-flow__handle{width:1px;height:1px;min-width:0;min-height:0;border:0;opacity:0;pointer-events:none}.fstage.svelte-vl698p .svelte-flow__node{cursor:default}.fstage.svelte-vl698p .svelte-flow__controls{border:1px solid var(--rule-soft);box-shadow:none}.fstage.svelte-vl698p .svelte-flow__controls-button{background:var(--paper);border:0;border-bottom:1px solid var(--rule-soft);border-radius:0;box-shadow:none;fill:var(--ink-2)}.state.svelte-vl698p{max-width:52ch;padding:40px}.state.svelte-vl698p h2:where(.svelte-vl698p){margin:0 0 8px;font-size:15px;font-weight:600}.state.svelte-vl698p p:where(.svelte-vl698p){margin:0 0 8px;color:var(--ink-2);font-size:12.5px;line-height:1.5}.dim.svelte-vl698p{color:var(--ink-3)}.mono.svelte-vl698p{font-family:var(--mono)}.fnote.svelte-vl698p{padding:8px 18px;border-top:1px solid var(--rule-soft);background:var(--paper-2);color:var(--ink-2);font-size:12px}.fnote.svelte-vl698p p:where(.svelte-vl698p){margin:0 0 2px}.sec.svelte-skxuyu{padding:0 0 18px;border-bottom:1px solid var(--rule-faint)}.sec.svelte-skxuyu:last-child{border-bottom:0}.sec-h.svelte-skxuyu{display:flex;align-items:baseline;justify-content:space-between;gap:12px;padding:14px 14px 2px}.sec-h.svelte-skxuyu h3:where(.svelte-skxuyu){margin:0;font-size:15px;font-weight:600}.sec-h.svelte-skxuyu .meta:where(.svelte-skxuyu){color:var(--ink-3);font-size:11.5px}.note.svelte-skxuyu{margin:0;padding:2px 14px 4px;color:var(--ink-3);font-size:11.5px;line-height:1.4}.note.dim.svelte-skxuyu{color:var(--ink-4)}.filegroup.svelte-skxuyu{padding:10px 14px 4px}.fpath.svelte-skxuyu{display:flex;justify-content:space-between;gap:8px;margin-bottom:4px;color:var(--ink-3);font:11px var(--mono)}.fpath.svelte-skxuyu a:where(.svelte-skxuyu):hover{color:var(--ink);text-decoration:underline}.fpath.svelte-skxuyu b:where(.svelte-skxuyu){color:var(--ink-2);font-weight:500}.row.svelte-skxuyu{position:relative;display:grid;grid-template-columns:16px 1fr;gap:8px;align-items:start;margin:0 -6px;padding:5px 6px 5px 4px;border:1px solid transparent}.row.svelte-skxuyu:hover{background:var(--press)}.row.armed.svelte-skxuyu{border-color:var(--accent-line);background:var(--accent-soft)}.body.svelte-skxuyu{min-width:0}.line.svelte-skxuyu{display:flex;align-items:baseline;gap:8px}.nm.svelte-skxuyu{overflow:hidden;min-width:0;color:var(--ink);font:12.5px var(--mono);text-align:left;text-overflow:ellipsis;white-space:nowrap}.nm.svelte-skxuyu:not(.plain){cursor:pointer}.row.stub.svelte-skxuyu .nm:where(.svelte-skxuyu){color:var(--ink-2)}.verb.svelte-skxuyu{margin-right:6px;color:var(--ink-2);font-weight:500}.meta.svelte-skxuyu{margin-top:1px;overflow:hidden;color:var(--ink-3);font-size:11px;text-overflow:ellipsis;white-space:nowrap}.chip.svelte-skxuyu{flex:none;padding:0 4px;border:1px solid var(--rule-soft);background:var(--paper);color:var(--ink-2);font:11px var(--mono)}.chip.svelte-skxuyu:hover{border-color:var(--ink);color:var(--ink)}.scroll.svelte-gbjxaf{height:100%;overflow:auto}.head.svelte-gbjxaf{max-width:760px;padding:26px 40px 6px}.saved.svelte-gbjxaf{max-width:800px;padding:14px 40px 0}.head.svelte-gbjxaf h2:where(.svelte-gbjxaf){margin:0 0 6px;font-size:20px;font-weight:600;letter-spacing:-.01em}.head.svelte-gbjxaf p:where(.svelte-gbjxaf){margin:0;color:var(--ink-2);font-size:13px;line-height:1.45}.chiplike.svelte-gbjxaf{padding:0 4px;border:1px solid var(--rule-soft);color:var(--ink-2);font:11px var(--mono)}.arming.svelte-gbjxaf{position:sticky;top:0;z-index:4;display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:12px 40px 0;padding:8px 12px;border:1px solid var(--accent-line);background:var(--accent-soft)}.arming.svelte-gbjxaf .from:where(.svelte-gbjxaf){color:var(--ink);font:500 12.5px var(--mono)}.arming.svelte-gbjxaf .arrow:where(.svelte-gbjxaf){color:var(--ink-3)}.arming.svelte-gbjxaf input:where(.svelte-gbjxaf){width:220px;height:26px;padding:0 8px;border:1px solid var(--rule-soft);background:var(--paper);color:var(--ink);font:12.5px var(--mono)}.arming.svelte-gbjxaf input:where(.svelte-gbjxaf):focus{border-color:var(--ink);outline:none}.arming.svelte-gbjxaf button:where(.svelte-gbjxaf){height:26px;padding:0 10px;border:1px solid var(--rule-soft);background:var(--paper);color:var(--ink-2);font-size:12px}.arming.svelte-gbjxaf button:where(.svelte-gbjxaf):hover:not(:disabled){border-color:var(--ink);color:var(--ink)}.arming.svelte-gbjxaf button:where(.svelte-gbjxaf):disabled{color:var(--ink-4);cursor:default}.arming.svelte-gbjxaf .hint:where(.svelte-gbjxaf){color:var(--ink-3);font-size:11.5px}.state.svelte-gbjxaf{max-width:760px;padding:16px 40px 40px;color:var(--ink-3);font-size:12.5px;line-height:1.5}.sections.svelte-gbjxaf{max-width:760px;margin:14px 40px 48px;border:1px solid var(--rule-soft)}.scroll.svelte-186vr2{height:100%;overflow:auto}.head.svelte-186vr2{max-width:760px;padding:26px 40px 6px}.head.svelte-186vr2 h2:where(.svelte-186vr2){margin:0 0 6px;font-size:20px;font-weight:600;letter-spacing:-.01em}.head.svelte-186vr2 p:where(.svelte-186vr2){margin:0;color:var(--ink-2);font-size:13px;line-height:1.45}.bar.svelte-186vr2{display:flex;align-items:baseline;justify-content:space-between;gap:16px;max-width:760px;margin:14px 40px 0;padding:6px 0;border-top:1px solid var(--rule-soft);border-bottom:1px solid var(--rule-soft)}.caveat.svelte-186vr2{margin:0;color:var(--ink-3);font-size:11.5px;line-height:1.4}.toggle.svelte-186vr2{flex:none;padding:1px 6px;border:1px solid var(--rule-soft);color:var(--ink-2);font:11px var(--mono);text-decoration:none}.toggle.svelte-186vr2:hover{border-color:var(--ink);color:var(--ink)}.toggle.on.svelte-186vr2{border-color:var(--accent-line);background:var(--accent-soft);color:var(--accent)}.warn.svelte-186vr2{max-width:760px;margin:12px 40px 0;padding:8px 12px;border:1px solid var(--accent-line);background:var(--accent-soft);color:var(--ink-2);font-size:11.5px;line-height:1.45}.headline.svelte-186vr2{max-width:760px;margin:14px 40px 0;color:var(--ink-2);font-size:12.5px}.state.svelte-186vr2{max-width:760px;padding:16px 40px 40px;color:var(--ink-3);font-size:12.5px;line-height:1.5}.groups.svelte-186vr2{max-width:760px;margin:8px 40px 0;border:1px solid var(--rule-soft)}.filegroup.svelte-186vr2{padding:10px 14px 6px;border-bottom:1px solid var(--rule-faint)}.filegroup.svelte-186vr2:last-child{border-bottom:0}.fpath.svelte-186vr2{display:flex;justify-content:space-between;gap:8px;margin-bottom:4px;color:var(--ink-3);font:11px var(--mono)}.fpath.svelte-186vr2 a:where(.svelte-186vr2){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.fpath.svelte-186vr2 a:where(.svelte-186vr2):hover{color:var(--ink);text-decoration:underline}.fpath.svelte-186vr2 b:where(.svelte-186vr2){flex:none;color:var(--ink-2);font-weight:500}.filegroup.gen.svelte-186vr2 .fpath:where(.svelte-186vr2),.filegroup.gen.svelte-186vr2 .fpath:where(.svelte-186vr2) b:where(.svelte-186vr2),.filegroup.gen.svelte-186vr2 .nm:where(.svelte-186vr2),.filegroup.gen.svelte-186vr2 .meta:where(.svelte-186vr2){color:var(--ink-4)}.row.svelte-186vr2{display:grid;grid-template-columns:16px 1fr;gap:8px;align-items:start;margin:0 -6px;padding:5px 6px 5px 4px;border:1px solid transparent}.row.svelte-186vr2:hover{background:var(--press)}.body.svelte-186vr2{min-width:0}.line.svelte-186vr2{display:flex;align-items:baseline;gap:8px}.nm.svelte-186vr2{overflow:hidden;min-width:0;color:var(--ink);font:12.5px var(--mono);text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}.ln.svelte-186vr2{flex:none;color:var(--ink-3);font:11px var(--mono);text-decoration:none}.ln.svelte-186vr2:hover{color:var(--accent);text-decoration:underline}.chip.svelte-186vr2{flex:none;padding:0 4px;border:1px solid var(--accent-line);background:var(--accent-soft);color:var(--accent);font:11px var(--mono)}.meta.svelte-186vr2{margin-top:1px;overflow:hidden;color:var(--ink-3);font-size:11px;text-overflow:ellipsis;white-space:nowrap}.members.svelte-186vr2{display:flex;flex-wrap:wrap;gap:4px 8px;margin-top:3px}.member.svelte-186vr2{color:var(--ink-3);font:11px var(--mono);text-decoration:none}.member.svelte-186vr2:hover{color:var(--accent);text-decoration:underline}.member.more.svelte-186vr2{color:var(--ink-4)}.notes.svelte-186vr2{max-width:760px;margin:14px 40px 48px;color:var(--ink-3);font-size:11.5px;line-height:1.5}.notes.svelte-186vr2 p:where(.svelte-186vr2){margin:0 0 6px}.notes.svelte-186vr2 ul:where(.svelte-186vr2){margin:0;padding-left:16px}.scroll.svelte-wjp3va{height:100%;overflow:auto}.link.svelte-wjp3va{color:var(--accent);text-decoration:underline;text-decoration-color:var(--accent-line);text-underline-offset:3px}.toast.svelte-1ig2a9j{position:fixed;left:50%;bottom:22px;transform:translate(-50%);background:var(--ink);color:var(--paper);padding:8px 14px;font-size:12.5px;line-height:1.4;max-width:70ch;z-index:50;animation:svelte-1ig2a9j-rise .14s ease-out}@keyframes svelte-1ig2a9j-rise{0%{opacity:0;transform:translate(-50%,6px)}to{opacity:1;transform:translate(-50%)}}@media(prefers-reduced-motion:reduce){.toast.svelte-1ig2a9j{animation:none}}main.svelte-1n46o8q{min-height:0;overflow:hidden} diff --git a/crates/codegraph-ui/viewer/assets/index-Cvst5APO.js b/crates/codegraph-ui/viewer/assets/index-Cvst5APO.js new file mode 100644 index 0000000..affd1e2 --- /dev/null +++ b/crates/codegraph-ui/viewer/assets/index-Cvst5APO.js @@ -0,0 +1,94 @@ +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))s(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&s(o)}).observe(document,{childList:!0,subtree:!0});function r(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function s(a){if(a.ep)return;a.ep=!0;const i=r(a);fetch(a.href,i)}})();const Om=1,qm=2,uh=4,Dm=8,Rm=16,Hm=1,jm=2,Fm=4,Bm=8,Vm=16,fh=1,Wm=2,vn=Symbol("uninitialized"),Km="http://www.w3.org/1999/xhtml",Ym="@attach",vh=!1;var ul=Array.isArray,Xm=Array.prototype.indexOf,zi=Array.prototype.includes,fl=Array.from,Gm=Object.defineProperty,gs=Object.getOwnPropertyDescriptor,hh=Object.getOwnPropertyDescriptors,ph=Object.prototype,Zm=Array.prototype,vl=Object.getPrototypeOf,Pu=Object.isExtensible;function Ba(e){return typeof e=="function"}const kn=()=>{};function Um(e){return e()}function jc(e){for(var t=0;t{e=s,t=a});return{promise:r,resolve:e,reject:t}}function Pn(e,t,r=!1){return e===void 0?r?t():t:e}function Fs(e,t){if(Array.isArray(e))return e;if(t===void 0||!(Symbol.iterator in e))return Array.from(e);const r=[];for(const s of e)if(r.push(s),r.length===t)break;return r}function Qm(e,t){var r={};for(var s in e)t.includes(s)||(r[s]=e[s]);for(var a of Object.getOwnPropertySymbols(e))Object.propertyIsEnumerable.call(e,a)&&!t.includes(a)&&(r[a]=e[a]);return r}const Sn=2,pa=4,Po=8,Id=1<<24,vr=16,tr=32,Or=64,Fc=128,er=512,bn=1024,hn=2048,_r=4096,Ln=8192,Wn=16384,Pa=32768,Bc=1<<25,ys=65536,Pi=1<<17,Jm=1<<18,Qs=1<<19,mh=1<<20,Cr=1<<25,Bs=65536,Li=1<<21,la=1<<22,ms=1<<23,Ar=Symbol("$state"),_h=Symbol("legacy props"),$m=Symbol(""),yh=Symbol("attributes"),Vc=Symbol("class"),Wc=Symbol("style"),Kc=Symbol("text"),yi=Symbol("form reset"),Lo=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},hl=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml");function Ad(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function e1(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function t1(e,t,r){throw new Error("https://svelte.dev/e/each_key_duplicate")}function n1(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function r1(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function s1(e){throw new Error("https://svelte.dev/e/effect_orphan")}function a1(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function o1(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function i1(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function l1(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function c1(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function d1(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}function u1(){console.warn("https://svelte.dev/e/derived_inert")}function f1(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function v1(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function bh(e){return e===this.v}function wh(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function xh(e){return!wh(e,this.v)}let La=!1,h1=!1;function p1(){La=!0}const g1=[];function kh(e,t=!1,r=!1){return bi(e,new Map,"",g1,null,r)}function bi(e,t,r,s,a=null,i=!1){if(typeof e=="object"&&e!==null){var o=t.get(e);if(o!==void 0)return o;if(e instanceof Map)return new Map(e);if(e instanceof Set)return new Set(e);if(ul(e)){var l=Array(e.length);t.set(e,l),a!==null&&t.set(a,l);for(var c=0;c{t===Ns&&Eh()})}Ns.push(e)}function y1(){for(;Ns.length>0;)Eh()}function Mh(e){var t=zt;if(t===null)return Rt.f|=ms,e;if((t.f&Pa)===0&&(t.f&pa)===0)throw e;ps(e,t)}function ps(e,t){if(!(t!==null&&(t.f&Wn)!==0)){for(;t!==null;){if((t.f&Fc)!==0){if((t.f&Pa)===0)throw e;try{t.b.error(e);return}catch(r){e=r}}t=t.parent}throw e}}const b1=-7169;function on(e,t){e.f=e.f&b1|t}function Pd(e){(e.f&er)!==0||e.deps===null?on(e,bn):on(e,_r)}function Ch(e){if(e!==null)for(const t of e)(t.f&Sn)===0||(t.f&Bs)===0||(t.f^=Bs,Ch(t.deps))}function Th(e,t,r){(e.f&hn)!==0?t.add(e):(e.f&_r)!==0&&r.add(e),Ch(e.deps),on(e,bn)}let Uo=!1;function w1(e){var t=Uo;try{return Uo=!1,[e(),Uo]}finally{Uo=t}}function x1(e,t){if(t){const r=document.body;e.autofocus=!0,Tr(()=>{document.activeElement===r&&e.focus()})}}let Lu=!1;function k1(){Lu||(Lu=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t[yi]?.()})},{capture:!0}))}function Oa(e){var t=Rt,r=zt;nr(null),qr(null);try{return e()}finally{nr(t),qr(r)}}function S1(e,t,r,s=r){e.addEventListener(t,()=>Oa(r));const a=e[yi];a?e[yi]=()=>{a(),s(!0)}:e[yi]=()=>s(!0),k1()}function Ih(e){let t=0,r=Vs(0),s;return()=>{Rd()&&(n(r),Ro(()=>(t===0&&(s=nn(()=>e(()=>fo(r)))),t+=1,()=>{Tr(()=>{t-=1,t===0&&(s?.(),s=void 0,fo(r))})})))}}var E1=ys|Qs;function M1(e,t,r,s){new C1(e,t,r,s)}class C1{parent;is_pending=!1;transform_error;#e;#n=null;#t;#i;#s;#o=null;#r=null;#l=null;#a=null;#p=0;#c=0;#d=!1;#f=new Set;#g=new Set;#u=null;#_=Ih(()=>(this.#u=Vs(this.#p),()=>{this.#u=null}));constructor(t,r,s,a){this.#e=t,this.#t=r,this.#i=i=>{var o=zt;o.b=this,o.f|=Fc,s(i)},this.parent=zt.b,this.transform_error=a??this.parent?.transform_error??(i=>i),this.#s=Ho(()=>{this.#v()},E1)}#m(){try{this.#o=Dn(()=>this.#i(this.#e))}catch(t){this.error(t)}}#w(t){const r=this.#t.failed,{reset:s,invoke_onerror:a}=this.#y(t);Tr(a),r&&(this.#l=Dn(()=>{r(this.#e,()=>t,()=>s)}))}#y(t){var r=!1,s=!1;const a=()=>{if(r){v1();return}r=!0,s&&d1(),this.#l!==null&&Rs(this.#l,()=>{this.#l=null}),this.#h(()=>{this.#v()})};return{reset:a,invoke_onerror:()=>{try{s=!0,this.#t.onerror?.(t,a),s=!1}catch(o){ps(o,this.#s&&this.#s.parent)}}}}#x(){const t=this.#t.pending;t&&(this.is_pending=!0,this.#r=Dn(()=>t(this.#e)),Tr(()=>{var r=this.#a=document.createDocumentFragment(),s=Ur();r.append(s),this.#o=this.#h(()=>Dn(()=>this.#i(s))),this.#c===0&&(this.#e.before(r),this.#a=null,Rs(this.#r,()=>{this.#r=null}),this.#b(It))}))}#v(){try{if(this.is_pending=this.has_pending_snippet(),this.#c=0,this.#p=0,this.#o=Dn(()=>{this.#i(this.#e)}),this.#c>0){var t=this.#a=document.createDocumentFragment();Fd(this.#o,t);const r=this.#t.pending;this.#r=Dn(()=>r(this.#e))}else this.#b(It)}catch(r){this.error(r)}}#b(t){this.is_pending=!1,t.transfer_effects(this.#f,this.#g)}defer_effect(t){Th(t,this.#f,this.#g)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#t.pending}#h(t){var r=zt,s=Rt,a=Gt;qr(this.#s),nr(this.#s),ga(this.#s.ctx);try{return $r.ensure(),t()}catch(i){return Mh(i),null}finally{qr(r),nr(s),ga(a)}}#k(t,r){if(!this.has_pending_snippet()){this.parent&&this.parent.#k(t,r);return}this.#c+=t,this.#c===0&&(this.#b(r),this.#r&&Rs(this.#r,()=>{this.#r=null}),this.#a&&(this.#e.before(this.#a),this.#a=null))}update_pending_count(t,r){this.#k(t,r),this.#p+=t,!(!this.#u||this.#d)&&(this.#d=!0,Tr(()=>{this.#d=!1,this.#u&&_a(this.#u,this.#p)}))}get_effect_pending(){return this.#_(),n(this.#u)}error(t){if(!this.#t.onerror&&!this.#t.failed)throw t;It?.is_fork?(this.#o&&It.skip_effect(this.#o),this.#r&&It.skip_effect(this.#r),this.#l&&It.skip_effect(this.#l),It.oncommit(()=>{this.#S(t)})):this.#S(t)}#S(t){this.#o&&(En(this.#o),this.#o=null),this.#r&&(En(this.#r),this.#r=null),this.#l&&(En(this.#l),this.#l=null);let r=this.#t.failed;const s=a=>{const{reset:i,invoke_onerror:o}=this.#y(a);o(),r&&(this.#l=this.#h(()=>{try{return Dn(()=>{var l=zt;l.b=this,l.f|=Fc,r(this.#e,()=>a,()=>i)})}catch(l){return ps(l,this.#s.parent),null}}))};Tr(()=>{var a;try{a=this.transform_error(t)}catch(i){ps(i,this.#s&&this.#s.parent);return}a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(s,i=>ps(i,this.#s&&this.#s.parent)):s(a)})}}function Ah(e,t,r,s){const a=Oo()?ma:Ld;var i=e.filter(g=>!g.settled),o=t.map(a);if(r.length===0&&i.length===0){s(o);return}var l=zt,c=T1(),u=i.length===1?i[0].promise:i.length>1?Promise.all(i.map(g=>g.promise)):null;function v(g){if((l.f&Wn)===0){c();try{s([...o,...g])}catch(_){ps(_,l)}Oi()}}var p=Nh();if(r.length===0){u.then(()=>v([])).finally(p);return}function f(){Promise.all(r.map(g=>I1(g))).then(v).catch(g=>ps(g,l)).finally(p)}u?u.then(()=>{c(),f(),Oi()}):f()}function T1(){var e=zt,t=Rt,r=Gt,s=It;return function(i=!0){qr(e),nr(t),ga(r),i&&(e.f&Wn)===0&&(s?.activate(),s?.apply())}}function Oi(e=!0){qr(null),nr(null),ga(null),e&&It?.deactivate()}function Nh(){var e=zt,t=e.b,r=It,s=!!t?.is_rendered();return t?.update_pending_count(1,r),r.increment(s,e),()=>{t?.update_pending_count(-1,r),r.decrement(s,e)}}function ma(e){var t=Sn|hn;return zt!==null&&(zt.f|=Qs),{ctx:Gt,deps:null,effects:null,equals:bh,f:t,fn:e,reactions:null,rv:0,v:vn,wv:0,parent:zt,ac:null}}const ro=Symbol("obsolete");function I1(e,t,r){let s=zt;s===null&&e1();var a=void 0,i=Vs(vn),o=!Rt,l=new Set;return V1(()=>{var c=zt,u=gh();a=u.promise;try{Promise.resolve(e()).then(u.resolve,g=>{g!==Lo&&u.reject(g)}).finally(Oi)}catch(g){u.reject(g),Oi()}var v=It;if(o){if((c.f&Pa)!==0)var p=Nh();if(s.b?.is_rendered())v.async_deriveds.get(c)?.reject(ro);else for(const g of l.values())g.reject(ro);l.add(u),v.async_deriveds.set(c,u)}const f=(g,_=void 0)=>{p?.(),l.delete(u),_!==ro&&(v.activate(),_?(i.f|=ms,_a(i,_)):((i.f&ms)!==0&&(i.f^=ms),_a(i,g)),v.deactivate())};u.promise.then(f,g=>f(null,g||"unknown"))}),Hd(()=>{for(const c of l)c.reject(ro)}),new Promise(c=>{function u(v){function p(){v===a?c(i):u(a)}v.then(p,p)}u(a)})}function b(e){const t=ma(e);return Jh(t),t}function Ld(e){const t=ma(e);return t.equals=xh,t}function A1(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r{t.ac.abort(Lo),t.ac=null}),t.fn!==null&&(t.teardown=kn),bo(t,0),jd(t))}function Ph(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&t.fn!==null&&ya(t)}let Ql=null,$s=null,It=null,Yc=null,hr=null,Xc=null,uo=!1,Jl=!1,na=null,wi=null;var Ou=0;let z1=1;class $r{id=z1++;#e=!1;linked=!0;#n=null;#t=null;async_deriveds=new Map;current=new Map;previous=new Map;#i=new Set;#s=new Set;#o=0;#r=new Map;#l=null;#a=[];#p=[];#c=new Set;#d=new Set;#f=new Map;#g=new Set;is_fork=!1;#u=!1;constructor(){$s===null?Ql=$s=this:($s.#t=this,this.#n=$s),$s=this}#_(){if(this.is_fork)return!0;for(const s of this.#r.keys()){for(var t=s,r=!1;t.parent!==null;){if(this.#f.has(t)){r=!0;break}t=t.parent}if(!r)return!0}return!1}skip_effect(t){this.#f.has(t)||this.#f.set(t,{d:[],m:[]}),this.#g.delete(t)}unskip_effect(t,r=s=>this.schedule(s)){var s=this.#f.get(t);if(s){this.#f.delete(t);for(var a of s.d)on(a,hn),r(a);for(a of s.m)on(a,_r),r(a)}this.#g.add(t)}#m(){this.#e=!0,Ou++>1e3&&(this.#h(),L1());for(const c of this.#c)this.#d.delete(c),on(c,hn),this.schedule(c);for(const c of this.#d)on(c,_r),this.schedule(c);const t=this.#a;this.#a=[],this.apply();var r=na=[],s=[],a=wi=[];for(const c of t)try{this.#w(c,r,s)}catch(u){throw qh(c),this.#_()||this.discard(),u}if(It=null,a.length>0){var i=$r.ensure();for(const c of a)i.schedule(c)}if(na=null,wi=null,this.#_()){this.#v(s),this.#v(r);for(const[c,u]of this.#f)Oh(c,u);a.length>0&&It.#m();return}const o=this.#y();if(o){this.#v(s),this.#v(r),o.#x(this);return}this.#c.clear(),this.#d.clear();for(const c of this.#i)c(this);this.#i.clear(),Yc=this,qu(s),qu(r),Yc=null,this.#l?.resolve();var l=It;if(this.#o===0&&(this.#a.length===0||l!==null)&&this.#h(),this.#a.length>0)if(l!==null){const c=l;c.#a.push(...this.#a.filter(u=>!c.#a.includes(u)))}else l=this;l!==null&&(Nr.clear(),l.#m())}#w(t,r,s){t.f^=bn;for(var a=t.first;a!==null;){var i=a.f,o=(i&(tr|Or))!==0,l=o&&(i&bn)!==0,c=l||(i&Ln)!==0||this.#f.has(a);if(!c&&a.fn!==null){o?a.f^=bn:(i&pa)!==0?r.push(a):jo(a)&&((i&vr)!==0&&this.#d.add(a),ya(a));var u=a.first;if(u!==null){a=u;continue}}for(;a!==null;){var v=a.next;if(v!==null){a=v;break}a=a.parent}}}#y(){for(var t=this.#n;t!==null;){if(!t.is_fork){for(const[r,[,s]]of this.current)if(t.current.has(r)&&!s)return t}t=t.#n}return null}#x(t){for(const[s,a]of t.current)!this.previous.has(s)&&t.previous.has(s)&&this.previous.set(s,t.previous.get(s)),this.current.set(s,a);for(const[s,a]of t.async_deriveds){const i=this.async_deriveds.get(s);i&&a.promise.then(i.resolve).catch(i.reject)}t.async_deriveds.clear(),this.transfer_effects(t.#c,t.#d);const r=s=>{var a=s.reactions;if(a!==null&&!((s.f&Sn)!==0&&(s.f&(hn|_r))===0))for(const l of a){var i=l.f;if((i&Sn)!==0)r(l);else{var o=l;i&(la|vr)&&!this.async_deriveds.has(o)&&(this.#d.delete(o),on(o,hn),this.schedule(o))}}};for(const s of this.current.keys())r(s);this.oncommit(()=>t.discard()),t.#h(),It=this,this.#m()}#v(t){for(var r=0;r!p.current.get(f)[1]);if(!(!p.#e||a.length===0)){var i=a.filter(f=>!this.current.has(f));if(i.length===0)t&&p.discard();else if(r.length>0){if(t)for(const f of this.#g)p.unskip_effect(f,g=>{(g.f&(vr|la))!==0?p.schedule(g):p.#v([g])});p.activate();var o=new Set,l=new Map;for(var c of r)Lh(c,i,o,l);l=new Map;var u=[...p.current].filter(([f,g])=>{const _=this.current.get(f);return _?_[0]!==g[0]||_[1]!==g[1]:!0}).map(([f])=>f);if(u.length>0)for(const f of this.#p)(f.f&(Wn|Ln|Pi))===0&&qd(f,u,l)&&((f.f&(la|vr))!==0?(on(f,hn),p.schedule(f)):p.#c.add(f));if(p.#a.length>0&&!p.#u){p.apply();for(var v of p.#a)p.#w(v,[],[]);p.#a=[]}p.deactivate()}}}}increment(t,r){if(this.#o+=1,t){let s=this.#r.get(r)??0;this.#r.set(r,s+1)}}decrement(t,r){if(this.#o-=1,t){let s=this.#r.get(r)??0;s===1?this.#r.delete(r):this.#r.set(r,s-1)}this.#u||(this.#u=!0,Tr(()=>{this.#u=!1,this.linked&&this.flush()}))}transfer_effects(t,r){for(const s of t)this.#c.add(s);for(const s of r)this.#d.add(s);t.clear(),r.clear()}oncommit(t){this.#i.add(t)}ondiscard(t){this.#s.add(t)}settled(){return(this.#l??=gh()).promise}static ensure(){if(It===null){const t=It=new $r;!Jl&&!uo&&Tr(()=>{t.#e||t.flush()})}return It}apply(){{hr=null;return}}schedule(t){if(Xc=t,t.b?.is_pending&&(t.f&(pa|Po|Id))!==0&&(t.f&Pa)===0){t.b.defer_effect(t);return}for(var r=t;r.parent!==null;){r=r.parent;var s=r.f;if(na!==null&&r===zt&&(Rt===null||(Rt.f&Sn)===0))return;if((s&(Or|tr))!==0){if((s&bn)===0)return;r.f^=bn}}this.#a.push(r)}#h(){if(this.linked){var t=this.#n,r=this.#t;t===null?Ql=r:t.#t=r,r===null?$s=t:r.#n=t,this.linked=!1}}}function P1(e){var t=uo;uo=!0;try{for(var r;;){if(y1(),It===null)return r;It.flush()}}finally{uo=t}}function L1(){try{a1()}catch(e){ps(e,Xc)}}let Kr=null;function qu(e){var t=e.length;if(t!==0){for(var r=0;r0)){Nr.clear();for(const a of Kr){if((a.f&(Wn|Ln))!==0)continue;const i=[a];let o=a.parent;for(;o!==null;)Kr.has(o)&&(Kr.delete(o),i.push(o)),o=o.parent;for(let l=i.length-1;l>=0;l--){const c=i[l];(c.f&(Wn|Ln))===0&&ya(c)}}Kr.clear()}}Kr=null}}function Lh(e,t,r,s){if(!r.has(e)&&(r.add(e),e.reactions!==null))for(const a of e.reactions){const i=a.f;(i&Sn)!==0?Lh(a,t,r,s):(i&(la|vr))!==0&&(i&hn)===0&&qd(a,t,s)&&(on(a,hn),Dd(a))}}function qd(e,t,r){const s=r.get(e);if(s!==void 0)return s;if(e.deps!==null)for(const a of e.deps){if(zi.call(t,a))return!0;if((a.f&Sn)!==0&&qd(a,t,r))return r.set(a,!0),!0}return r.set(e,!1),!1}function Dd(e){It.schedule(e)}function Oh(e,t){if(!((e.f&tr)!==0&&(e.f&bn)!==0)){(e.f&hn)!==0?t.d.push(e):(e.f&_r)!==0&&t.m.push(e),on(e,bn);for(var r=e.first;r!==null;)Oh(r,t),r=r.next}}function qh(e){on(e,bn);for(var t=e.first;t!==null;)qh(t),t=t.next}let qi=new Set;const Nr=new Map;let Dh=!1;function Vs(e,t){var r={f:0,v:e,reactions:null,equals:bh,rv:0,wv:0};return r}function he(e,t){const r=Vs(e);return Jh(r),r}function O1(e,t=!1,r=!0){const s=Vs(e);return t||(s.equals=xh),La&&r&&Gt!==null&&Gt.l!==null&&(Gt.l.s??=[]).push(s),s}function q(e,t,r=!1){Rt!==null&&(!pr||(Rt.f&Pi)!==0)&&Oo()&&(Rt.f&(Sn|vr|la|Pi))!==0&&(zr===null||!zr.has(e))&&c1();let s=r?gn(t):t;return _a(e,s,wi)}function _a(e,t,r=null){if(!e.equals(t)){es?Nr.set(e,t):Nr.has(e)||Nr.set(e,e.v);var s=$r.ensure();if(s.capture(e,t),(e.f&Sn)!==0){const a=e;(e.f&hn)!==0&&Od(a),hr===null&&Pd(a)}e.wv=ep(),Rh(e,hn,r),Oo()&&zt!==null&&(zt.f&bn)!==0&&(zt.f&(tr|Or))===0&&(Un===null?Y1([e]):Un.push(e)),!s.is_fork&&qi.size>0&&!Dh&&q1()}return t}function q1(){Dh=!1;for(const e of qi){(e.f&bn)!==0&&on(e,_r);let t;try{t=jo(e)}catch{t=!0}t&&ya(e)}qi.clear()}function fo(e){q(e,e.v+1)}function Rh(e,t,r){var s=e.reactions;if(s!==null)for(var a=Oo(),i=s.length,o=0;o{if(Hs===i)return l();var c=Rt,u=Hs;nr(null),Hu(i);var v=l();return nr(c),Hu(u),v};return s&&r.set("length",he(e.length)),new Proxy(e,{defineProperty(l,c,u){(!("value"in u)||u.configurable===!1||u.enumerable===!1||u.writable===!1)&&i1();var v=r.get(c);return v===void 0?o(()=>{var p=he(u.value);return r.set(c,p),p}):q(v,u.value,!0),!0},deleteProperty(l,c){var u=r.get(c);if(u===void 0){if(c in l){const v=o(()=>he(vn));r.set(c,v),fo(a)}}else q(u,vn),fo(a);return!0},get(l,c,u){if(c===Ar)return e;var v=r.get(c),p=c in l;if(v===void 0&&(!p||gs(l,c)?.writable)&&(v=o(()=>{var g=gn(p?l[c]:vn),_=he(g);return _}),r.set(c,v)),v!==void 0){var f=n(v);return f===vn?void 0:f}return Reflect.get(l,c,u)},getOwnPropertyDescriptor(l,c){var u=Reflect.getOwnPropertyDescriptor(l,c);if(u&&"value"in u){var v=r.get(c);v&&(u.value=n(v))}else if(u===void 0){var p=r.get(c),f=p?.v;if(p!==void 0&&f!==vn)return{enumerable:!0,configurable:!0,value:f,writable:!0}}return u},has(l,c){if(c===Ar)return!0;var u=r.get(c),v=u!==void 0&&u.v!==vn||Reflect.has(l,c);if(u!==void 0||zt!==null&&(!v||gs(l,c)?.writable)){u===void 0&&(u=o(()=>{var f=v?gn(l[c]):vn,g=he(f);return g}),r.set(c,u));var p=n(u);if(p===vn)return!1}return v},set(l,c,u,v){var p=r.get(c),f=c in l;if(s&&c==="length")for(var g=u;ghe(vn)),r.set(g+"",_))}if(p===void 0)(!f||gs(l,c)?.writable)&&(p=o(()=>he(void 0)),q(p,gn(u)),r.set(c,p));else{f=p.v!==vn;var x=o(()=>gn(u));q(p,x)}var k=Reflect.getOwnPropertyDescriptor(l,c);if(k?.set&&k.set.call(v,u),!f){if(s&&typeof c=="string"){var C=r.get("length"),T=Number(c);Number.isInteger(T)&&T>=C.v&&q(C,T+1)}fo(a)}return!0},ownKeys(l){n(a);var c=Reflect.ownKeys(l).filter(p=>{var f=r.get(p);return f===void 0||f.v!==vn});for(var[u,v]of r)v.v!==vn&&!(u in l)&&c.push(u);return c},setPrototypeOf(){l1()}})}function Du(e){try{if(e!==null&&typeof e=="object"&&Ar in e)return e[Ar]}catch{}return e}function D1(e,t){return Object.is(Du(e),Du(t))}var cn,Hh,jh,Fh;function R1(){if(cn===void 0){cn=window,Hh=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;jh=gs(t,"firstChild").get,Fh=gs(t,"nextSibling").get,Pu(e)&&(e[Vc]=void 0,e[yh]=null,e[Wc]=void 0,e.__e=void 0),Pu(r)&&(r[Kc]=void 0)}}function Ur(e=""){return document.createTextNode(e)}function Yr(e){return jh.call(e)}function qo(e){return Fh.call(e)}function d(e,t){return Yr(e)}function _e(e,t=!1){{var r=Yr(e);return r instanceof Comment&&r.data===""?qo(r):r}}function h(e,t=1,r=!1){let s=e;for(;t--;)s=qo(s);return s}function H1(e){e.textContent=""}function Bh(){return!1}function j1(e,t,r){return r?document.createElement(e,{is:r}):document.createElement(e)}function Vh(e){zt===null&&(Rt===null&&s1(),r1()),es&&n1()}function F1(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function sr(e,t){var r=zt;r!==null&&(r.f&Ln)!==0&&(e|=Ln);var s={ctx:Gt,deps:null,nodes:null,f:e|hn|er,first:null,fn:t,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};It?.register_created_effect(s);var a=s;if((e&pa)!==0)na!==null?na.push(s):$r.ensure().schedule(s);else if(t!==null){try{ya(s)}catch(o){throw En(s),o}a.deps===null&&a.teardown===null&&a.nodes===null&&a.first===a.last&&(a.f&Qs)===0&&(a=a.first,(e&vr)!==0&&(e&ys)!==0&&a!==null&&(a.f|=ys))}if(a!==null&&(a.parent=r,r!==null&&F1(a,r),Rt!==null&&(Rt.f&Sn)!==0&&(e&Or)===0)){var i=Rt;(i.effects??=[]).push(a)}return s}function Rd(){return Rt!==null&&!pr}function Hd(e){const t=sr(Po,null);return on(t,bn),t.teardown=e,t}function vt(e){Vh();var t=zt.f,r=!Rt&&(t&tr)!==0&&Gt!==null&&!Gt.i;if(r){var s=Gt;(s.e??=[]).push(e)}else return Wh(e)}function Wh(e){return sr(pa|mh,e)}function Kh(e){return Vh(),sr(Po|mh,e)}function Yh(e){$r.ensure();const t=sr(Or|Qs,e);return()=>{En(t)}}function B1(e){$r.ensure();const t=sr(Or|Qs,e);return(r={})=>new Promise(s=>{r.outro?Rs(t,()=>{En(t),s(void 0)}):(En(t),s(void 0))})}function Do(e){return sr(pa,e)}function V1(e){return sr(la|Qs,e)}function Ro(e,t=0){return sr(Po|t,e)}function I(e,t=[],r=[],s=[]){Ah(s,t,r,a=>{sr(Po,()=>{e(...a.map(n))})})}function Ho(e,t=0){var r=sr(vr|t,e);return r}function Xh(e,t=0){var r=sr(Id|t,e);return r}function Dn(e){return sr(tr|Qs,e)}function Gh(e){var t=e.teardown;if(t!==null){const r=es,s=Rt;Ru(!0),nr(null);try{t.call(null)}finally{Ru(r),nr(s)}}}function jd(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){const a=r.ac;a!==null&&Oa(()=>{a.abort(Lo)});var s=r.next;(r.f&Or)!==0?r.parent=null:En(r,t),r=s}}function W1(e){for(var t=e.first;t!==null;){var r=t.next;(t.f&tr)===0&&En(t),t=r}}function En(e,t=!0){var r=!1;(t||(e.f&Jm)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(K1(e.nodes.start,e.nodes.end),r=!0),e.f|=Bc,jd(e,t&&!r),bo(e,0);var s=e.nodes&&e.nodes.t;if(s!==null)for(const i of s)i.stop();Gh(e),e.f^=Bc,e.f|=Wn;var a=e.parent;a!==null&&a.first!==null&&Zh(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function K1(e,t){for(;e!==null;){var r=e===t?null:qo(e);e.remove(),e=r}}function Zh(e){var t=e.parent,r=e.prev,s=e.next;r!==null&&(r.next=s),s!==null&&(s.prev=r),t!==null&&(t.first===e&&(t.first=s),t.last===e&&(t.last=r))}function Rs(e,t,r=!0){var s=[];Uh(e,s,!0);var a=()=>{r&&En(e),t&&t()},i=s.length;if(i>0){var o=()=>--i||a();for(var l of s)l.out(o)}else a()}function Uh(e,t,r){if((e.f&Ln)===0){e.f^=Ln;var s=e.nodes&&e.nodes.t;if(s!==null)for(const l of s)(l.is_global||r)&&t.push(l);for(var a=e.first;a!==null;){var i=a.next;if((a.f&Or)===0){var o=(a.f&ys)!==0||(a.f&tr)!==0&&(e.f&vr)!==0;Uh(a,t,o?r:!1)}a=i}}}function Di(e){Qh(e,!0)}function Qh(e,t){if((e.f&Ln)!==0){e.f^=Ln,(e.f&bn)===0&&(on(e,hn),$r.ensure().schedule(e));for(var r=e.first;r!==null;){var s=r.next,a=(r.f&ys)!==0||(r.f&tr)!==0;Qh(r,a?t:!1),r=s}var i=e.nodes&&e.nodes.t;if(i!==null)for(const o of i)(o.is_global||t)&&o.in()}}function Fd(e,t){if(e.nodes)for(var r=e.nodes.start,s=e.nodes.end;r!==null;){var a=r===s?null:qo(r);t.append(r),r=a}}let xi=!1,es=!1;function Ru(e){es=e}let Rt=null,pr=!1;function nr(e){Rt=e}let zt=null;function qr(e){zt=e}let zr=null;function Jh(e){Rt!==null&&(zr??=new Set).add(e)}let qn=null,Vn=0,Un=null;function Y1(e){Un=e}let $h=1,zs=0,Hs=zs;function Hu(e){Hs=e}function ep(){return++$h}function jo(e){var t=e.f;if((t&hn)!==0)return!0;if(t&Sn&&(e.f&=~Bs),(t&_r)!==0){for(var r=e.deps,s=r.length,a=0;ae.wv)return!0}(t&er)!==0&&hr===null&&on(e,bn)}return!1}function tp(e,t,r=!0){var s=e.reactions;if(s!==null&&!(zr!==null&&zr.has(e)))for(var a=0;a{e.ac.abort(Lo)}),e.ac=null);try{e.f|=Li;var v=e.fn,p=v();e.f|=Pa;var f=e.deps,g=It?.is_fork;if(qn!==null){var _;if(g||bo(e,Vn),f!==null&&Vn>0)for(f.length=Vn+qn.length,_=0;_{i.ac.abort(Lo),i.ac=null,on(i,hn)}),N1(i),bo(i,0)}}function bo(e,t){var r=e.deps;if(r!==null)for(var s=t;sr?.call(this,i))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?Tr(()=>{t.addEventListener(e,a,s)}):t.addEventListener(e,a,s),a}function Uc(e,t,r,s={}){var a=Bd(t,e,r,s);return()=>{e.removeEventListener(t,a,s)}}function ft(e,t,r,s,a){var i={capture:s,passive:a},o=Bd(e,t,r,i);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Hd(()=>{t.removeEventListener(e,o,i)})}function xe(e,t,r){(t[so]??={})[e]=r}function St(e){for(var t=0;t{ec=!1,$l=null}));var o=0,l=$l===e&&e[so];if(l){var c=a.indexOf(l);if(c!==-1&&(t===document||t===window)){e[so]=t;return}var u=a.indexOf(t);if(u===-1)return;c<=u&&(o=c)}if(i=a[o]||e.target,i!==t){Gm(e,"currentTarget",{configurable:!0,get(){return i||r}});var v=Rt,p=zt;nr(null),qr(null);try{for(var f,g=[];i!==null&&i!==t;){try{var _=i[so]?.[s];_!=null&&(!i.disabled||e.target===i)&&_.call(i,e)}catch(x){f?g.push(x):f=x}if(e.cancelBubble)break;o++,i=o{throw x});throw f}}finally{e[so]=t,delete e.currentTarget,nr(v),qr(p)}}}const G1=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function Z1(e){return G1?.createHTML(e)??e}function ip(e){var t=j1("template");return t.innerHTML=Z1(e.replaceAll("","")),t.content}function ba(e,t){var r=zt;r.nodes===null&&(r.nodes={start:e,end:t,a:null,t:null})}function S(e,t){var r=(t&fh)!==0,s=(t&Wm)!==0,a,i=!e.startsWith("");return()=>{a===void 0&&(a=ip(i?e:""+e),r||(a=Yr(a)));var o=s||Hh?document.importNode(a,!0):a.cloneNode(!0);if(r){var l=Yr(o),c=o.lastChild;ba(l,c)}else ba(o,o);return o}}function U1(e,t,r="svg"){var s=!e.startsWith(""),a=(t&fh)!==0,i=`<${r}>${s?e:""+e}`,o;return()=>{if(!o){var l=ip(i),c=Yr(l);if(a)for(o=document.createDocumentFragment();Yr(c);)o.appendChild(Yr(c));else o=Yr(c)}var u=o.cloneNode(!0);if(a){var v=Yr(u),p=u.lastChild;ba(v,p)}else ba(u,u);return u}}function Jt(e,t){return U1(e,t,"svg")}function Yt(e=""){{var t=Ur(e+"");return ba(t,t),t}}function Et(){var e=document.createDocumentFragment(),t=document.createComment(""),r=Ur();return e.append(t,r),ba(t,r),e}function m(e,t){e!==null&&e.before(t)}function Q1(e){return e.endsWith("capture")&&e!=="gotpointercapture"&&e!=="lostpointercapture"}const J1=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function $1(e){return J1.includes(e)}const e_={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function t_(e){return e=e.toLowerCase(),e_[e]??e}const n_=["touchstart","touchmove"];function r_(e){return n_.includes(e)}function w(e,t){var r=t==null?"":typeof t=="object"?`${t}`:t;r!==(e[Kc]??=e.nodeValue)&&(e[Kc]=r,e.nodeValue=`${r}`)}function s_(e,t){return a_(e,t)}const Qo=new Map;function a_(e,{target:t,anchor:r,props:s={},events:a,context:i,intro:o=!0,transformError:l}){R1();var c=void 0,u=B1(()=>{var v=r??t.appendChild(Ur());M1(v,{pending:()=>{}},g=>{We({});var _=Gt;i&&(_.c=i),a&&(s.$$events=a),c=e(g,s)||{},Ke()},l);var p=new Set,f=g=>{for(var _=0;_{for(var g of p)for(const k of[t,document]){var _=Qo.get(k),x=_.get(g);--x==0?(k.removeEventListener(g,Qc),_.delete(g),_.size===0&&Qo.delete(k)):_.set(g,x)}Zc.delete(f),v!==r&&v.parentNode?.removeChild(v)}});return o_.set(c,u),c}let o_=new WeakMap;class Vd{anchor;#e=new Map;#n=new Map;#t=new Map;#i=new Set;#s=!0;constructor(t,r=!0){this.anchor=t,this.#s=r}#o=t=>{if(this.#e.has(t)){var r=this.#e.get(t),s=this.#n.get(r);if(s)Di(s),this.#i.delete(r);else{var a=this.#t.get(r);a&&(Di(a.effect),this.#n.set(r,a.effect),this.#t.delete(r),a.fragment.lastChild.remove(),this.anchor.before(a.fragment),s=a.effect)}for(const[i,o]of this.#e){if(this.#e.delete(i),i===t)break;const l=this.#t.get(o);l&&(En(l.effect),this.#t.delete(o))}for(const[i,o]of this.#n){if(i===r||this.#i.has(i))continue;const l=()=>{if(Array.from(this.#e.values()).includes(i)){var u=document.createDocumentFragment();Fd(o,u),u.append(Ur()),this.#t.set(i,{effect:o,fragment:u})}else En(o);this.#i.delete(i),this.#n.delete(i)};this.#s||!s?(this.#i.add(i),Rs(o,l,!1)):l()}}};#r=t=>{this.#e.delete(t);const r=Array.from(this.#e.values());for(const[s,a]of this.#t)r.includes(s)||(En(a.effect),this.#t.delete(s))};ensure(t,r){var s=It,a=Bh();if(r&&!this.#n.has(t)&&!this.#t.has(t))if(a){var i=document.createDocumentFragment(),o=Ur();i.append(o),this.#t.set(t,{effect:Dn(()=>r(o)),fragment:i})}else this.#n.set(t,Dn(()=>r(this.anchor)));if(this.#e.set(s,t),a){for(const[l,c]of this.#n)l===t?s.unskip_effect(c):s.skip_effect(c);for(const[l,c]of this.#t)l===t?s.unskip_effect(c.effect):s.skip_effect(c.effect);s.oncommit(this.#o),s.ondiscard(this.#r)}else this.#o(s)}}function Fn(e,t,...r){var s=new Vd(e);Ho(()=>{const a=t()??null;s.ensure(a,a&&(i=>a(i,...r)))},ys)}function i_(e){Gt===null&&Ad(),La&&Gt.l!==null?l_(Gt).m.push(e):vt(()=>{const t=nn(e);if(typeof t=="function")return t})}function pl(e){Gt===null&&Ad(),i_(()=>()=>nn(e))}function l_(e){var t=e.l;return t.u??={a:[],b:[],m:[]}}function F(e,t,r=!1){var s=new Vd(e),a=r?ys:0;function i(o,l){s.ensure(o,l)}Ho(()=>{var o=!1;t((l,c=0)=>{o=!0,i(c,l)}),o||i(-1,null)},a)}function c_(e,t){Ro(()=>{var r=t();for(var s in r){var a=r[s];a==null||a===""?e.style.removeProperty(s):e.style.setProperty(s,a)}})}function Kn(e,t){return t}function d_(e,t,r){for(var s=[],a=t.length,i,o=t.length,l=0;l{if(i){if(i.pending.delete(p),i.done.add(p),i.pending.size===0){var f=e.outrogroups;Jc(e,fl(i.done)),f.delete(i),f.size===0&&(e.outrogroups=null)}}else o-=1},!1)}if(o===0){var c=s.length===0&&r!==null&&e.pending.size===0;if(c){var u=r,v=u.parentNode;H1(v),v.append(u),e.items.clear()}Jc(e,t,!c)}else i={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(i)}function Jc(e,t,r=!0){var s;if(e.pending.size>0){s=new Set;for(const o of e.pending.values())for(const l of o)s.add(e.items.get(l).e)}for(var a=0;a{var M=r();return ul(M)?M:M==null?[]:fl(M)}),f,g=new Map,_=!0;function x(M){(T.effect.f&Wn)===0&&(T.pending.delete(M),T.fallback=v,u_(T,f,o,t,s),v!==null&&(f.length===0?(v.f&Cr)===0?Di(v):(v.f^=Cr,ao(v,null,o)):Rs(v,()=>{v=null})))}function k(M){T.pending.delete(M)}var C=Ho(()=>{f=n(p);for(var M=f.length,z=new Set,R=It,D=Bh(),V=0;Vi(o)):(v=Dn(()=>i(ju??=Ur())),v.f|=Cr)),M>z.size&&t1(),!_)if(g.set(R,z),D){for(const[A,H]of l)z.has(A)||R.skip_effect(H.e);R.oncommit(x),R.ondiscard(k)}else x(R);n(p)}),T={effect:C,items:l,pending:g,outrogroups:null,fallback:v};_=!1}function Va(e){for(;e!==null&&(e.f&tr)===0;)e=e.next;return e}function u_(e,t,r,s,a){var i=(s&Dm)!==0,o=t.length,l=e.items,c=Va(e.effect.first),u,v=null,p,f=[],g=[],_,x,k,C;if(i)for(C=0;C0){var j=(s&uh)!==0&&o===0?r:null;if(i){for(C=0;C{if(p!==void 0)for(k of p)k.nodes?.a?.apply()})}function f_(e,t,r,s,a,i,o,l){var c=(o&Om)!==0?(o&Rm)===0?O1(r,!1,!1):Vs(r):null,u=(o&qm)!==0?Vs(a):null;return{v:c,i:u,e:Dn(()=>(i(t,c??r,u??a,l),()=>{e.delete(s)}))}}function ao(e,t,r){if(e.nodes)for(var s=e.nodes.start,a=e.nodes.end,i=t&&(t.f&Cr)===0?t.nodes.start:r;s!==null;){var o=qo(s);if(i.before(s),s===a)return;s=o}}function ss(e,t,r){t===null?e.effect.first=r:t.next=r,r===null?e.effect.last=t:r.prev=t}function gl(e,t,r){var s=new Vd(e);Ho(()=>{var a=t()??null;s.ensure(a,a&&(i=>r(i,a)))},ys)}function In(e,t,r){Do(()=>{var s=nn(()=>t(e,r?.())||{});if(r&&s?.update){var a=!1,i={};Ro(()=>{var o=r();ap(o),a&&wh(i,o)&&(i=o,s.update(o))}),a=!0}if(s?.destroy)return()=>s.destroy()})}function v_(e,t){var r=void 0,s;Xh(()=>{r!==(r=t())&&(s&&(En(s),s=null),r&&(s=Dn(()=>{Do(()=>r(e))})))})}function lp(e){var t,r,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t=0;){var l=o+i;(o===0||Fu.includes(s[o-1]))&&(l===s.length||Fu.includes(s[l]))?s=(o===0?"":s.substring(0,o))+s.substring(l+1):o=l}}return s===""?null:s}function Bu(e,t=!1){var r=t?" !important;":";",s="";for(var a of Object.keys(e)){var i=e[a];i!=null&&i!==""&&(s+=" "+a+": "+i+r)}return s}function tc(e){return e[0]!=="-"||e[1]!=="-"?e.toLowerCase():e}function g_(e,t){if(t){var r="",s,a;if(Array.isArray(t)?(s=t[0],a=t[1]):s=t,e){e=String(e).replaceAll(/\/\*.*?\*\//g,"").trim();var i=!1,o=0,l=!1,c=[];s&&c.push(...Object.keys(s).map(tc)),a&&c.push(...Object.keys(a).map(tc));var u=0,v=-1;const x=e.length;for(var p=0;p{"__value"in e&&Ws(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Hd(()=>{t.disconnect()})}function Vu(e){return"__value"in e?e.__value:e.value}const fs=Symbol("class"),Mr=Symbol("style"),cp=Symbol("is custom element"),dp=Symbol("is html"),m_=hl?"input":"INPUT",__=hl?"option":"OPTION",y_=hl?"select":"SELECT",b_=hl?"progress":"PROGRESS";function w_(e,t){var r=ml(e);r.value===(r.value=t??void 0)||e.value===t&&(t!==0||e.nodeName!==b_)||(e.value=t??"")}function up(e,t){var r=ml(e);r.checked!==(r.checked=t??void 0)&&(e.checked=t)}function x_(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function se(e,t,r,s){var a=ml(e);a[t]!==(a[t]=r)&&(t==="loading"&&(e[$m]=r),r==null?e.removeAttribute(t):typeof r!="string"&&fp(e).includes(t)?e[t]=r:e.setAttribute(t,r))}function k_(e,t,r,s,a=!1,i=!1){var o=ml(e),l=o[cp],c=!o[dp],u=t||{},v=e.nodeName===__;for(var p in t)!(p in r)&&p[0]+p[1]!=="$$"&&(r[p]=null);r.class?r.class=bs(r.class):(s||r[fs])&&(r.class=null),r[Mr]&&(r.style??=null);var f=fp(e);if(e.nodeName===m_&&"type"in r&&("value"in r||"__value"in r)){var g=r.type;(g!==u.type||g===void 0&&e.hasAttribute("type"))&&(u.type=g,se(e,"type",g))}for(const R in r){let D=r[R];if(v&&R==="value"&&D==null){e.value=e.__value="",u[R]=D;continue}if(R==="class"){var _=e.namespaceURI==="http://www.w3.org/1999/xhtml";qe(e,_,D,s,t?.[fs],r[fs]),u[R]=D,u[fs]=r[fs];continue}if(R==="style"){rt(e,D,t?.[Mr],r[Mr]),u[R]=D,u[Mr]=r[Mr];continue}var x=u[R];if(!(D===x&&!(D===void 0&&e.hasAttribute(R)))){u[R]=D;var k=R[0]+R[1];if(k!=="$$")if(k==="on"){const V={},X="$$"+R;let j=R.slice(2);var C=$1(j);if(Q1(j)&&(j=j.slice(0,-7),V.capture=!0),!C&&x){if(D!=null)continue;e.removeEventListener(j,u[X],V),u[X]=null}if(C)xe(j,e,D),St([j]);else if(D!=null){let P=function(A){u[R].call(this,A)};var z=P;u[X]=Bd(j,e,P,V)}}else if(R==="style")se(e,R,D);else if(R==="autofocus")x1(e,!!D);else if(!l&&(R==="__value"||R==="value"&&D!=null))e.value=e.__value=D;else if(R==="selected"&&v)x_(e,D);else{var T=R;c||(T=t_(T));var M=T==="defaultValue"||T==="defaultChecked";if(D==null&&!l&&!M)if(o[R]=null,T==="value"||T==="checked"){let V=e;const X=t===void 0;if(T==="value"){let j=V.defaultValue;V.removeAttribute(T),V.defaultValue=j,V.value=V.__value=X?j:null}else{let j=V.defaultChecked;V.removeAttribute(T),V.defaultChecked=j,V.checked=X?j:!1}}else e.removeAttribute(R);else M||f.includes(T)&&(l||typeof D!="string")?(e[T]=D,T in o&&(o[T]=vn)):typeof D!="function"&&se(e,T,D)}}}return u}function ns(e,t,r=[],s=[],a=[],i,o=!1,l=!1){Ah(a,r,s,c=>{var u=void 0,v={},p=e.nodeName===y_,f=!1;if(Xh(()=>{var _=t(...c.map(n)),x=k_(e,u,_,i,o,l);f&&p&&"value"in _&&Ws(e,_.value);for(let C of Object.getOwnPropertySymbols(v))_[C]||En(v[C]);for(let C of Object.getOwnPropertySymbols(_)){var k=_[C];C.description===Ym&&(!u||k!==u[C])&&(v[C]&&En(v[C]),v[C]=Dn(()=>v_(e,()=>k))),x[C]=k}u=x}),p){var g=e;Do(()=>{Ws(g,u.value,!0),wo(g)})}f=!0})}function ml(e){return e[yh]??={[cp]:e.nodeName.includes("-"),[dp]:e.namespaceURI===Km}}var Wu=new Map;function fp(e){var t=e.getAttribute("is")||e.nodeName,r=Wu.get(t);if(r)return r;Wu.set(t,r=[]);for(var s,a=e,i=Element.prototype;i!==a;){s=hh(a);for(var o in s)s[o].set&&o!=="innerHTML"&&o!=="textContent"&&o!=="innerText"&&r.push(o);a=vl(a)}return r}function Wd(e,t,r=t){var s=new WeakSet;S1(e,"input",async a=>{var i=a?e.defaultValue:e.value;if(i=rc(e)?sc(i):i,r(i),It!==null&&s.add(It),await Ri(),i!==(i=t())){var o=e.selectionStart,l=e.selectionEnd,c=e.value.length;if(e.value=i??"",l!==null){var u=e.value.length;o===l&&l===c&&u>c?(e.selectionStart=u,e.selectionEnd=u):(e.selectionStart=o,e.selectionEnd=Math.min(l,u))}}}),nn(t)==null&&e.value&&(r(rc(e)?sc(e.value):e.value),It!==null&&s.add(It)),Ro(()=>{var a=t();if(e===document.activeElement){var i=It;if(s.has(i))return}rc(e)&&a===sc(e.value)||e.type==="date"&&!a&&!e.value||a!==e.value&&(e.value=a??"")})}function rc(e){var t=e.type;return t==="number"||t==="range"}function sc(e){return e===""?null:+e}class Kd{#e=new WeakMap;#n;#t;static entries=new WeakMap;constructor(t){this.#t=t}observe(t,r){var s=this.#e.get(t)||new Set;return s.add(r),this.#e.set(t,s),this.#i().observe(t,this.#t),()=>{var a=this.#e.get(t);a.delete(r),a.size===0&&(this.#e.delete(t),this.#n.unobserve(t))}}#i(){return this.#n??(this.#n=new ResizeObserver(t=>{for(var r of t){Kd.entries.set(r.target,r);for(var s of this.#e.get(r.target)||[])s(r)}}))}}var S_=new Kd({box:"border-box"});function $c(e,t,r){var s=S_.observe(e,()=>r(e[t]));Do(()=>(nn(()=>r(e[t])),s))}function ac(e,t){return e===t||e?.[Ar]===t}function Ut(e={},t,r,s){var a=Gt.r,i=zt;return Do(()=>{var o,l;return Ro(()=>{o=l,l=[],nn(()=>{ac(r(...l),e)||(t(e,...l),o&&ac(r(...o),e)&&t(null,...o))})}),()=>{let c=i;for(;c!==a&&c.parent!==null&&c.parent.f&Bc;)c=c.parent;const u=()=>{l&&ac(r(...l),e)&&t(null,...l)},v=c.teardown;c.teardown=()=>{u(),v?.()}}}),e}function Yd(e=!1){const t=Gt,r=t.l.u;if(!r)return;let s=()=>ap(t.s);if(e){let a=0,i={};const o=ma(()=>{let l=!1;const c=t.s;for(const u in c)c[u]!==i[u]&&(i[u]=c[u],l=!0);return l&&a++,a});s=()=>n(o)}r.b.length&&Kh(()=>{Ku(t,s),jc(r.b)}),vt(()=>{const a=nn(()=>r.m.map(Um));return()=>{for(const i of a)typeof i=="function"&&i()}}),r.a.length&&vt(()=>{Ku(t,s),jc(r.a)})}function Ku(e,t){if(e.l.s)for(const r of e.l.s)n(r);t()}const E_={get(e,t){if(!e.exclude.has(t))return e.props[t]},set(e,t){return!1},getOwnPropertyDescriptor(e,t){if(!e.exclude.has(t)&&t in e.props)return{enumerable:!0,configurable:!0,value:e.props[t]}},has(e,t){return e.exclude.has(t)?!1:t in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(t=>!e.exclude.has(t))}};function rs(e,t,r){return new Proxy({props:e,exclude:t},E_)}const M_={get(e,t){let r=e.props.length;for(;r--;){let s=e.props[r];if(Ba(s)&&(s=s()),typeof s=="object"&&s!==null&&t in s)return s[t]}},set(e,t,r){let s=e.props.length;for(;s--;){let a=e.props[s];Ba(a)&&(a=a());const i=gs(a,t);if(i&&i.set)return i.set(r),!0}return!1},getOwnPropertyDescriptor(e,t){let r=e.props.length;for(;r--;){let s=e.props[r];if(Ba(s)&&(s=s()),typeof s=="object"&&s!==null&&t in s){const a=gs(s,t);return a&&!a.configurable&&(a.configurable=!0),a}}},has(e,t){if(t===Ar||t===_h)return!1;for(let r of e.props)if(Ba(r)&&(r=r()),r!=null&&t in r)return!0;return!1},ownKeys(e){const t=[];for(let r of e.props)if(Ba(r)&&(r=r()),!!r){for(const s in r)t.includes(s)||t.push(s);for(const s of Object.getOwnPropertySymbols(r))t.includes(s)||t.push(s)}return t}};function Xr(...e){return new Proxy({props:e},M_)}function Ie(e,t,r,s){var a=!La||(r&jm)!==0,i=(r&Bm)!==0,o=(r&Vm)!==0,l=s,c=!0,u=void 0,v=()=>o&&a?(u??=ma(s),n(u)):(c&&(c=!1,l=o?nn(s):s),l);let p;if(i){var f=Ar in e||_h in e;p=gs(e,t)?.set??(f&&t in e?z=>e[t]=z:void 0)}var g,_=!1;i?[g,_]=w1(()=>e[t]):g=e[t],g===void 0&&s!==void 0&&(g=v(),p&&(a&&o1(),p(g)));var x;if(a?x=()=>{var z=e[t];return z===void 0?v():(c=!0,z)}:x=()=>{var z=e[t];return z!==void 0&&(l=void 0),z===void 0?l:z},a&&(r&Fm)===0)return x;if(p){var k=e.$$legacy;return(function(z,R){return arguments.length>0?((!a||!R||k||_)&&p(R?x():z),z):x()})}var C=!1,T=((r&Hm)!==0?ma:Ld)(()=>(C=!1,x()));i&&n(T);var M=zt;return(function(z,R){if(arguments.length>0){const D=R?n(T):a&&i?gn(z):z;return q(T,D),C=!0,l!==void 0&&(l=D),z}return es&&C||(M.f&Wn)!==0?T.v:n(T)})}const ed="codegraph-ui.theme",vo=["system","dark","light"],oc={system:"System",dark:"Dark",light:"Light"};function C_(e){return e==="system"||e==="dark"||e==="light"}function vp(){try{const e=globalThis.localStorage?.getItem(ed);return C_(e)?e:"system"}catch{return"system"}}function T_(e){try{e==="system"?globalThis.localStorage?.removeItem(ed):globalThis.localStorage?.setItem(ed,e)}catch{}}function hp(e){const t=globalThis.document?.documentElement;t&&(e==="system"?t.removeAttribute("data-theme"):t.setAttribute("data-theme",e))}function pp(e){return e!=="system"?e:globalThis.matchMedia?.("(prefers-color-scheme: dark)").matches??!1?"dark":"light"}class I_{#e=he(gn(vp()));get choice(){return n(this.#e)}set choice(t){q(this.#e,t,!0)}set(t){this.choice=t,T_(t),hp(t)}cycle(){const t=vo.indexOf(this.choice);this.set(vo[(t+1)%vo.length]??"system")}}const xr=new I_;function A_(){hp(vp())}const N_="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(N_);const z_={activity:"","arrow-left":" ","arrow-right":" ",bookmark:"",box:" ",braces:" ",check:"","chevron-down":"","chevron-left":"","chevron-right":"","circle-alert":" ","circle-check":" ","circle-dashed":" ","circle-x":" ",command:"",copy:" ","corner-down-right":" ","corner-left-up":" ","corner-up-left":" ",database:" ",ellipsis:" ","external-link":" ","eye-off":" ",file:" ","file-code-2":" ",filter:"","flask-conical":" ",folder:"",footprints:" ",ghost:" ","git-branch":" ","git-commit-horizontal":" ","git-fork":" ",info:" ","key-round":" ",keyboard:" ",layers:" ","layout-dashboard":" ",link:" ","list-tree":" ",lock:" ",maximize:" ",menu:" ",minus:"",monitor:" ","monitor-smartphone":" ",moon:"","mouse-pointer-click":" ",network:" ",package:" ",plus:" ",radio:" ","refresh-cw":" ",route:" ",search:" ",send:" ",server:" ",settings:" ",shield:"",sparkles:" ",sun:" ","triangle-alert":" ",users:" ",workflow:" ",x:" ",zap:""},Yu=new Map;function P_(e){let t=Yu.get(e);if(!t){const r=""+z_[e]+"";t=`url("data:image/svg+xml,${encodeURIComponent(r)}")`,Yu.set(e,t)}return t}var L_=S('');function Ne(e,t){We(t,!0);let r=Ie(t,"size",3,16),s=b(()=>P_(t.name));var a=L_();let i;I(()=>{se(a,"role",t.label?"img":void 0),se(a,"aria-label",t.label),se(a,"aria-hidden",t.label?void 0:"true"),i=rt(a,"",i,{width:`${r()}px`,height:`${r()}px`,"mask-image":n(s),"-webkit-mask-image":n(s)})}),m(e,a),Ke()}var O_=S('');function gp(e,t){let r=Ie(t,"size",3,36);var s=O_();let a;var i=d(s);I(o=>{a=rt(s,"",a,o),se(i,"width",r()),se(i,"height",r())},[()=>({width:`${r()}px`,height:`${r()}px`,"border-radius":`${Math.round(r()*.28)}px`})]),m(e,s)}const q_={function:"ƒ",method:"m",class:"C",interface:"I",struct:"S",type_alias:"T",enum:"E",enum_member:"e",constant:"k",variable:"v",property:"p",field:"p",file:"≡",route:"R",component:"⟨⟩",namespace:"N",module:"M",trait:"Tr",union:"U",protocol:"P",parameter:"pm",import:"im",export:"ex"},D_=new Set(["class","interface","struct","type_alias","trait","protocol","union","enum"]);function mp(e){return e?q_[e]??e.slice(0,1).toUpperCase():""}function Xd(e){return e?e.replace(/_/g," "):"symbol"}const R_={function:"cyan",component:"cyan",module:"cyan",method:"primary",struct:"green",class:"green",union:"green",type_alias:"green",enum:"amber",enum_member:"amber",route:"amber",trait:"violet",interface:"violet",protocol:"violet"},H_={file:"file-code-2",module:"package"};var j_=S("");function Lt(e,t){We(t,!0);let r=Ie(t,"titled",3,!1),s=Ie(t,"size",3,18),a=b(()=>t.kind?mp(t.kind):""),i=b(()=>t.kind&&R_[t.kind]||"neutral"),o=b(()=>t.kind?H_[t.kind]:void 0),l=b(()=>Math.round(s()*.3)),c=b(()=>s()>=26?12:s()>=22?10.5:10);var u=j_();let v,p;var f=d(u);{var g=x=>{Ne(x,{get name(){return n(o)},size:12})},_=x=>{var k=Yt();I(()=>w(k,n(a))),m(x,k)};F(f,x=>{n(o)?x(g):x(_,-1)})}I(x=>{v=qe(u,1,`k ${n(i)??""}`,"svelte-rzcbio",v,{wide:n(a).length>1}),se(u,"title",x),se(u,"aria-hidden",r()?void 0:"true"),p=rt(u,"",p,{width:`${s()}px`,height:`${s()}px`,"border-radius":`${n(l)}px`,"font-size":`${n(c)}px`})},[()=>r()?Xd(t.kind):void 0]),m(e,u),Ke()}var F_=S(' '),B_=S(' ',1),V_=S(' ',1),Xu=S(' '),W_=S(' ',1),K_=S(' ',1),Y_=S(''),X_=S('
      ',1);function G_(e,t){We(t,!0);let r=Ie(t,"selected",19,()=>-1),s=Ie(t,"rowRole",3,void 0),a=Ie(t,"idPrefix",3,"palette-row");function i(c,u){let v=0;for(let p=0;pt.palette.sections,c=>c.title,(c,u,v)=>{var p=X_(),f=_e(p),g=d(f),_=d(g),x=h(g,2);{var k=T=>{var M=F_(),z=d(M);I(()=>w(z,n(u).note)),m(T,M)};F(x,T=>{n(u).note&&T(k)})}var C=h(f,2);ke(C,19,()=>n(u).items,T=>T.id,(T,M,z)=>{const R=b(()=>i(n(v),n(z)));var D=Y_();let V;var X=d(D);{var j=y=>{var O=B_(),N=_e(O);Lt(N,{kind:"route"});var B=h(N,2),W=d(B),Y=d(W),J=h(W,2),G=d(J);I(()=>{w(Y,n(M).url),w(G,n(M).handler)}),m(y,O)},P=y=>{var O=V_(),N=_e(O);Lt(N,{kind:"route"});var B=h(N,2),W=d(B),Y=d(W);I(()=>w(Y,n(M).name)),m(y,O)},A=y=>{var O=W_(),N=_e(O);Lt(N,{get kind(){return n(M).row.kind}});var B=h(N,2),W=d(B),Y=d(W),J=h(W,2);{var G=ee=>{var oe=Xu(),ge=d(oe);I(()=>w(ge,n(M).meta)),m(ee,oe)};F(J,ee=>{n(M).meta&&ee(G)})}I(()=>{se(B,"title",n(M).row.title),w(Y,n(M).name)}),m(y,O)},H=y=>{var O=K_(),N=_e(O);Lt(N,{get kind(){return n(M).node.kind}});var B=h(N,2),W=d(B);let Y;var J=d(W),G=h(W,2);{var ee=oe=>{var ge=Xu(),U=d(ge);I(()=>w(U,n(M).meta)),m(oe,ge)};F(G,oe=>{n(M).meta&&oe(ee)})}I(()=>{se(B,"title",n(M).node.generated?`${n(M).name} — tool-generated`:void 0),Y=qe(W,1,"nm svelte-14dv3uy",null,Y,{gen:n(M).node.generated}),w(J,n(M).name)}),m(y,O)};F(X,y=>{n(M).type==="route"?y(j):n(M).type==="flow"?y(P,1):n(M).type==="entry"?y(A,2):y(H,-1)})}var L=h(X,2),E=d(L);I(()=>{V=qe(D,1,"row svelte-14dv3uy",null,V,{sel:n(R)===r()}),se(D,"data-palette-row",n(R)),se(D,"id",`${a()}-${n(R)}`),se(D,"role",s()),se(D,"aria-selected",s()?n(R)===r():void 0),w(E,n(M).location)}),xe("mousedown",D,y=>{y.preventDefault(),t.onpick(n(M))}),ft("mouseenter",D,()=>t.onhover?.(n(R))),m(T,D)}),I(()=>w(_,n(u).title)),m(c,p)}),m(e,o),Ke()}St(["mousedown"]);class rr extends Error{status;code;guidance;constructor(t,r,s,a){super(s),this.name="ApiFailure",this.status=t,this.code=r,this.guidance=a}}function ic(e){return e.split("/").map(encodeURIComponent).join("/")}function as(e){const t=e.toString();return t?`?${t}`:""}const Z_="X-CodeGraph-UI";function U_(e={}){const t=e.baseUrl??"",r=e.fetch??((...o)=>globalThis.fetch(...o));async function s(o,l,c){let u;try{u=await r(`${t}${o}`,{...l,signal:c})}catch(p){throw c?.aborted?p:new rr(0,"unreachable","The codegraph ui server is not answering.","It may have been stopped — restart it with `codegraph ui` and reload this page.")}const v=await u.json().catch(()=>null);if(!u.ok){const p=v??{};throw new rr(u.status,p.code??"error",p.error??`The server answered ${u.status}.`,p.hint??null)}return v}function a(o,l){return s(o,{headers:{accept:"application/json"}},l)}function i(o,l,c,u){const v={accept:"application/json",[Z_]:"1"};return c!==void 0&&(v["content-type"]="application/json"),s(o,{method:l,headers:v,...c===void 0?{}:{body:JSON.stringify(c)}},u)}return{stats:o=>a("api/stats",o),search(o,l={},c){const u=new URLSearchParams({q:o});return l.limit&&u.set("limit",String(l.limit)),a(`api/search${as(u)}`,c)},node:(o,l)=>a(`api/node/${ic(o)}`,l),nodes(o,l){const c=new URLSearchParams;for(const u of o)c.append("id",u);return a(`api/nodes${as(c)}`,l)},source(o,l){const c=new URLSearchParams({file:o.file,from:String(o.from)});return o.to!==void 0&&o.to>0&&c.set("to",String(o.to)),o.ondrift&&c.set("ondrift",o.ondrift),a(`api/source${as(c)}`,l)},file:(o,l)=>a(`api/file/${ic(o)}`,l),fileCode:(o,l)=>a(`api/filecode/${ic(o)}`,l),flow(o,l){const c=new URLSearchParams;o.from&&c.set("from",o.from),o.to&&c.set("to",o.to),o.symbols&&c.set("symbols",o.symbols);for(const u of o.trail??[])c.append("hop",u);return a(`api/flow${as(c)}`,l)},map(o={},l){const c=new URLSearchParams;return o.root!==void 0&&o.root!==null&&c.set("root",o.root),o.depth&&c.set("depth",String(o.depth)),a(`api/map${as(c)}`,l)},routes(o={},l){const c=new URLSearchParams;return o.limit&&c.set("limit",String(o.limit)),a(`api/routes${as(c)}`,l)},screens(o){return a("api/screens",o)},entryPoints(o={},l){const c=new URLSearchParams;return o.limit&&c.set("limit",String(o.limit)),o.routes&&c.set("routes",String(o.routes)),a(`api/entrypoints${as(c)}`,l)},deadCode(o={},l){const c=new URLSearchParams;return o.limit&&c.set("limit",String(o.limit)),o.kinds?.length&&c.set("kinds",o.kinds.join(",")),o.includeExported&&c.set("exported","1"),o.includeTests&&c.set("tests","1"),o.includeGenerated&&c.set("generated","1"),a(`api/deadcode${as(c)}`,l)},trails:o=>a("api/trails",o),saveTrail:(o,l)=>i("api/trails","POST",o,l),deleteTrail:(o,l)=>i(`api/trails/${encodeURIComponent(o)}`,"DELETE",void 0,l),events(o){if(typeof EventSource>"u")return()=>{};const l=new EventSource(`${t}api/events`);return l.addEventListener("hello",c=>o.hello(Jo(c))),l.addEventListener("changed",c=>o.changed(Jo(c))),l.addEventListener("index",c=>o.index(Jo(c))),l.addEventListener("degraded",c=>o.degraded(Jo(c))),l.addEventListener("error",()=>o.error()),()=>l.close()}}}function Jo(e){const t=e.data;if(typeof t!="string")return null;try{return JSON.parse(t)}catch{return null}}let lc=null;function dn(){return lc===null&&(lc=U_()),lc}function Q_(e){return dn().stats(e)}function J_(e,t){return dn().node(e,t)}function $_(e,t={},r){return dn().search(e,t,r)}const cc=60;async function e0(e,t){if(e.length<=cc)return dn().nodes(e,t);const r={items:[],missing:[]};for(let s=0;sr.provenance==="heuristic");return t?.synthesizedBy??t?.via??"synthesized"}function wn(e){return e.slice(e.lastIndexOf("/")+1)}function Gd(e){const t=e.lastIndexOf(".");return t<0?e:e.slice(t+1)}function Uu(e,t,r){const s=e+t.length-1,a=(g,_)=>({start:g,lines:t.slice(g-e,_-e+1)});if(t.length<=f0)return{windows:t.length>0?[a(e,s)]:[],gapsAfter:[],tailGap:0,whole:!0};const i=Math.min(s,e+v0-1),o=[[e,i]],l=[...new Set(r)].filter(g=>g>i&&g<=s).sort((g,_)=>g-_);for(const g of l)o.push([Math.max(e,g-Zu),Math.min(s,g+Zu)]);const c=[];for(const g of o){const _=c[c.length-1];_&&g[0]<=_[1]+h0?_[1]=Math.max(_[1],g[1]):c.push([...g])}const u=c.slice(0,p0),v=u.map(([g,_])=>a(g,_)),p=u.slice(0,-1).map((g,_)=>u[_+1][0]-g[1]-1),f=u[u.length-1]?.[1]??s;return{windows:v,gapsAfter:p,tailGap:Math.max(0,s-f),whole:!1}}function y0(e){const t=new Map,r=(s,a)=>{const i=t.get(s);i?i.push(a):t.set(s,[a])};for(const s of[...e.outgoing.items,...e.typesUsed])for(const a of s.edges){if(!a.line)continue;const i=bp(a);r(a.line,{ident:Gd(s.node.name),col:typeof a.col=="number"?a.col:null,targetId:s.node.id,uncertain:s.uncertain,outside:!1,title:`${i||"calls"} ${s.node.qualifiedName} — ${s.node.file}:${s.node.line}`+(a.confidence!=null?` · confidence ${a.confidence}`:"")+(a.resolvedBy?` · resolved by ${a.resolvedBy}`:"")})}for(const s of w0(e.outsideIndex))r(s.line,s.ref);return t}function b0(e){const t=new Set;for(const r of[...e.outgoing.items,...e.typesUsed])for(const s of r.lines)t.add(s);return[...t].sort((r,s)=>r-s)}function w0(e){const t=[];for(const r of e.samples){if(!r.line)continue;const s=Gd(r.name??"");/^[A-Za-z_$][\w$]*$/.test(s)&&t.push({line:r.line,ref:{ident:s,col:typeof r.col=="number"?r.col:null,targetId:null,uncertain:!1,outside:!0,title:`${r.name} is not in the index — nothing here resolves it`}})}return t}function yl(e,t){const r=new Map;for(const s of t){const a=[];if(e.forEach((o,l)=>{o.cls==="comment"||o.cls==="string"||o.text===s.ident&&a.push(l)}),a.length===0)continue;let i;if(s.col!==null){const o=s.col;i=a.find(l=>{const c=e[l];return c.col<=o&&oe[l].col>=o))}i===void 0&&(i=a.find(o=>!r.has(o))),i===void 0&&(i=a[a.length-1]),!(i===void 0||r.has(i))&&r.set(i,s)}return r}function x0(e){const t=[],r=[];for(const a of e.outgoing.items){const i={relation:a,anchor:a.lines[0]??null,lines:a.lines,words:_l(a),via:Fo(a),when:wp(a)};a.uncertain?r.push(i):t.push(i)}const s=e.outsideIndex.byKind.references??0;return{rows:t,uncertain:r,hiddenGroups:e.outgoing.total-e.outgoing.shown,outsideCalls:Math.max(0,e.outsideIndex.total-s),outsideTypeRefs:s}}function k0(e){const t=e.node.file,r=new Map,s=[],a=[];for(const o of e.incoming.items){const l={relation:o,words:_l(o),lines:o.lines,via:Fo(o),when:wp(o)};if(o.uncertain){s.push(l);continue}if(o.node.test){a.push(l);continue}const c=r.get(o.node.file);c?c.push(l):r.set(o.node.file,[l])}return{groups:[...r.entries()].map(([o,l])=>({file:o,same:o===t,rows:l})).sort((o,l)=>o.same?-1:l.same?1:o.file.localeCompare(l.file)),uncertain:s,tests:{rows:a,calls:a.reduce((o,l)=>o+l.relation.edgeCount,0),files:[...new Set(a.map(o=>o.relation.node.file))].sort()},total:e.incoming.total,hiddenGroups:e.incoming.total-e.incoming.shown}}function S0(e,t){const r=t.trim().toLowerCase();if(r==="")return e;const s=i=>{const o=i.relation.node;return o.name.toLowerCase().includes(r)||o.qualifiedName.toLowerCase().includes(r)||o.file.toLowerCase().includes(r)},a=e.tests.rows.filter(s);return{...e,groups:e.groups.map(i=>({...i,rows:i.rows.filter(s)})).filter(i=>i.rows.length>0),uncertain:e.uncertain.filter(s),tests:{rows:a,calls:a.reduce((i,o)=>i+o.relation.edgeCount,0),files:[...new Set(a.map(i=>i.relation.node.file))].sort()}}}const Hi=44,xp=8;function E0(e,t){const r=[];let s=t;for(const a of e){const i=a!==null?a-Hi/2:s;s=Math.max(i,s),r.push(s),s+=Hi+xp}return r}function M0(e){return e.members.items.map(t=>({member:t,nested:t.depth>1,dimmed:_0.has(t.kind)}))}function Qu(e,t){return!(m0.has(e)&&t>g0)}function bt(e,t,r=`${t}s`){return`${e} ${e===1?t:r}`}function Ju(e){const t=e.lastIndexOf("/");return t<0?"project root":e.slice(0,t)}function $o(e){const t=[],r=new Map;for(const{row:s,path:a,file:i}of e){let o=r.get(a);o||(o={path:a,file:i,rows:[]},r.set(a,o),t.push(o)),o.rows.push(s)}return t}function kp(e){const t=`${wn(e.file)}:${e.line}`;return{id:`route:${e.routeId}`,name:e.path,method:e.method,kind:"route",meta:e.handlerId?`${e.handler} · ${t}`:`${e.handler} · not in the index`,target:e.handlerId?{type:"symbol",id:e.handlerId,name:e.handler,kind:e.handlerKind}:null,flowFrom:e.handlerId?e.handler:null,title:`${e.url} → ${e.handler} (${e.file}:${e.line}), registered at ${e.routeFile}:${e.routeLine}`}}function Sp(e){return{id:`file:${e.file}`,name:wn(e.file),method:null,kind:"file",meta:`${bt(e.calls,"call")} at module level · reaches ${bt(e.reaches,"file")}${e.dependents===0?" · nothing imports it":""}`,target:{type:"file",path:e.file},flowFrom:null,title:e.file}}function Ep(e){return{id:`test:${e.file}`,name:wn(e.file),method:null,kind:"file",meta:`exercises ${bt(e.reaches,"file")} · ${bt(e.refs,"reference")}`,target:{type:"file",path:e.file},flowFrom:null,title:e.file}}function Mp(e){return{id:`hub:${e.id}`,name:e.name,method:null,kind:e.kind,meta:`${bt(e.dependents,"dependent")} · ${wn(e.file)}:${e.line}`,target:{type:"symbol",id:e.id,name:e.name,kind:e.kind},flowFrom:e.name,title:`${e.qualifiedName} — ${e.file}:${e.line}`}}function C0(e,t){return e.shown>=e.total?`${e.shown}`:`${e.shown} of ${t?"at least ":""}${e.total}`}function T0(e){return e.length===0?"":e.length===1?e[0]:e.length===2?`${e[0]} and ${e[1]}`:`${e.slice(0,-1).join(", ")} and ${e[e.length-1]}`}function ei(e,t,r,s,a,i,o=""){const l=C0(s,i);return{id:e,title:t,meta:o?`${l} · ${o}`:l,note:r,groups:a,shown:s.shown,total:s.total,floor:i}}function I0(e){if(!e)return{sections:[],rows:[],empty:null};const t=[];return e.routes.routed&&e.routes.items.items.length>0&&t.push(ei("routes","Routes",e.routes.items.items.every(r=>!r.method)?"A screen of the app — its path, and the component that renders it.":"A request from outside arrives here — the URL, and the symbol that serves it.",e.routes.items,$o(e.routes.items.items.map(r=>({row:kp(r),path:r.routeFile,file:r.routeFile}))),!1,T0(e.frameworks))),e.files.items.length>0&&t.push(ei("files","Top-level files with calls","Statements at the top level of the file — a CLI, a worker entry, a script.",e.files,$o(e.files.items.map(r=>({row:Sp(r),path:Ju(r.file),file:null}))),!0)),e.tests.items.length>0&&t.push(ei("tests","Tests","What already exercises this code, widest reach first.",e.tests,$o(e.tests.items.map(r=>({row:Ep(r),path:Ju(r.file),file:null}))),!1)),e.hubs.items.length>0&&t.push(ei("hubs","Most depended on","Not where the project starts — where a change radiates furthest.",e.hubs,$o(e.hubs.items.map(r=>({row:Mp(r),path:r.file,file:r.file}))),!0)),{sections:t,rows:t.flatMap(r=>r.groups.flatMap(s=>s.rows)),empty:t.length===0?"This index has no routes, no file that runs anything at module level, no test that reaches outside itself, and nothing depended on yet.":null}}function A0(e,t,r){const s=t.trim().toLowerCase();if(!e||s==="")return[];const a=[["route",e.routes.routed?e.routes.items.items.map(kp):[]],["file",e.files.items.map(Sp)],["test",e.tests.items.map(Ep)],["hub",e.hubs.items.map(Mp)]],i=[];for(const[o,l]of a)for(const c of l){if(i.length>=r)return i;`${c.method??""} ${c.name} ${c.meta} ${c.title}`.toLowerCase().includes(s)&&i.push({row:c,origin:o})}return i}function N0(e){switch(e){case"route":return"route";case"file":return"runs at module level";case"test":return"test";case"hub":return"depended on"}}function $u(e,t){const r=e.trim(),s=t.trim();return!r||!s||r.toLowerCase()===s.toLowerCase()?null:{from:r,to:s}}const z0=/^\s*(?:how\s+(?:does|do|would|can)\s+)?([\w$.]+)\s+(?:reach|reaches|call|calls|hit|hits|get\s+to|end\s+up\s+(?:in|at))\s+([\w$.]+)\s*\??\s*$/i,P0=/^\s*([\w$.]+)\s*(?:->|→|=>)\s*([\w$.]+)\s*\??\s*$/;function ef(e){const t=e.lastIndexOf(".");return t<0?e:e.slice(t+1)}function Cp(e){const t=z0.exec(e)??P0.exec(e);if(!t)return null;const r=ef(t[1]),s=ef(t[2]);return!r||!s||r===s?null:{from:r,to:s}}function L0(e,t){const r=e.replace(/_/g," "),s=r.endsWith("s")?`${r}es`:`${r}s`,a=t===1?r:s;return a.charAt(0).toUpperCase()+a.slice(1)}function O0(e){if(e.kind!=="file")return`${wn(e.file)}:${e.line}`;const t=e.file.lastIndexOf("/");return t<0?"project root":e.file.slice(0,t)}function ki(e,t=""){return{type:"symbol",id:e.id,node:e,name:e.kind==="file"?wn(e.file):e.name,meta:t||q0(e),location:O0(e)}}function q0(e){if(!e.signature)return"";const t=e.signature.replace(/\s+/g," ").trim();return t.length>72?`${t.slice(0,71)}…`:t}function D0(e,t){const r=[],s=new Set;for(let a=0;a1?D0(e[0]?.results.items??[],e[1]?.results.items??[]):e[0]?.results.items??[],a=R0(s);if(t&&a.unshift({title:"Flow",note:"The call path between them, one card per hop.",items:[{type:"flow",id:`flow:${t.from}:${t.to}`,from:t.from,to:t.to,name:`${t.from} → ${t.to}`,meta:"",location:"read as a flow"}]}),r){const l=new Set(s.map(u=>u.id)),c=A0(r.entries,r.query,r.entryRows).filter(u=>!(u.row.target?.type==="symbol"&&l.has(u.row.target.id)));c.length>0&&a.push({title:"Entry points",note:"Where a flow starts — routes, files that run something, tests.",items:c.map(({row:u,origin:v})=>({type:"entry",id:`entry:${u.id}`,row:u,name:u.method?`${u.method} ${u.name}`:u.name,meta:u.meta,location:N0(v)}))})}const i=a.flatMap(l=>l.items),o=t?`Reading the path from ${t.from} to ${t.to}. Below it, what each name matches.`:null;return{sections:a,items:i,hint:o,empty:i.length===0?"No symbol or file in the index matches that.":null}}function j0(e,t={}){if(!e)return{sections:[],items:[],hint:null,empty:null};const r=t.perSection??Number.POSITIVE_INFINITY,s=i=>Number.isFinite(r)?i.slice(0,r):[...i],a=[];return e.routes.routed&&e.routes.items.items.length>0&&a.push({title:"Routes",note:e.routes.items.items.every(i=>!i.method)?"A screen of the app.":"A request from outside arrives here.",items:s(e.routes.items.items).map(i=>({type:"route",id:`route:${i.routeId}`,url:i.url,handler:i.handler,location:`${wn(i.file)}:${i.line}`,nodeId:i.handlerId}))}),e.files.items.length>0&&a.push({title:"Files that run something",note:"Statements at the top level of the file — a CLI, a worker entry, a script.",items:s(e.files.items).map(i=>ki(i,`${bt(i.calls,"call")} at module level · reaches ${bt(i.reaches,"file")}`))}),e.tests.items.length>0&&a.push({title:"Tests",note:"What already exercises this code, widest reach first.",items:s(e.tests.items).map(i=>ki(i,`exercises ${bt(i.reaches,"file")}`))}),e.hubs.items.length>0&&a.push({title:"Most depended on",note:"The symbols a change radiates furthest from.",items:s(e.hubs.items).map(i=>ki(i,`${bt(i.dependents,"dependent")}`))}),{sections:a,items:a.flatMap(i=>i.items),hint:null,empty:a.length===0?"This index has no routes, no file that runs anything, no test that reaches outside itself, and nothing depended on yet.":null}}function F0(e,t,r){return r===0?0:((e+t)%r+r)%r}const B0=40,V0=24,W0=6,K0=200,Y0=6,X0=90;let vs=he(""),ti=he(!1),Cs=he(0),ca=he(!1),xo=he(null),ko=he(gn([])),So=he(null),Tp=he(!1),nd=he(null),rd=null,da=null,ho=0,oo=null;function dc(){return oo||(oo=t0({limit:V0,routes:K0}).then(e=>{q(So,e,!0),q(nd,null)}).catch(e=>{q(So,null),q(nd,e instanceof Error?e.message:String(e),!0)}).finally(()=>{q(Tp,!0)}),oo)}function Ip(){da!==null&&(clearTimeout(da),da=null),rd?.abort(),rd=null}async function G0(e,t){const r=Cp(e),s=new AbortController;rd=s,q(ca,!0);try{const a=r?[r.from,r.to]:[e],i=await Promise.all(a.map(o=>$_(o,{limit:B0},s.signal)));if(t!==ho)return;q(ko,i,!0),q(xo,null)}catch(a){if(s.signal.aborted||t!==ho)return;q(ko,[],!0),q(xo,a instanceof Error?a.message:String(a),!0)}finally{t===ho&&q(ca,!1)}}function Z0(e){Ip();const t=ho+=1;if(e.trim()===""){q(ko,[],!0),q(xo,null),q(ca,!1);return}da=setTimeout(()=>{da=null,G0(e,t)},X0)}function uc(){return n(vs).trim()===""?j0(n(So),{perSection:W0}):H0(n(ko),Cp(n(vs)),{entries:n(So),query:n(vs),entryRows:Y0})}const qt={get query(){return n(vs)},set query(e){e!==n(vs)&&(q(vs,e,!0),q(Cs,0),Z0(e))},get open(){return n(ti)},get loading(){return n(ca)},get failure(){return n(xo)},get view(){return uc()},get selected(){return n(Cs)},get selectedItem(){const e=uc().items;return e[Math.min(n(Cs),e.length-1)]??null},get pending(){return n(vs).trim()!==""&&(n(ca)||da!==null)},show(){q(ti,!0),dc()},hide(){q(ti,!1)},select(e){q(Cs,e,!0)},move(e){q(Cs,F0(n(Cs),e,uc().items.length),!0)},reset(){Ip(),ho+=1,q(vs,""),q(ko,[],!0),q(xo,null),q(ca,!1),q(Cs,0),q(ti,!1)},ensureEntries:dc,reloadEntries(){return oo=null,dc()},get entries(){return n(So)},get entriesSettled(){return n(Tp)},get entriesFailure(){return n(nd)}};var U0=S('

      '),Q0=S('

      '),J0=S('

      Searching…

      '),$0=S('

      '),ey=S('
      ');function ty(e,t){We(t,!0);let r=he(null),s=b(()=>qt.view);vt(()=>{const f=qt.selected;if(!n(r))return;n(r).querySelector(`[data-palette-row="${f}"]`)?.scrollIntoView({block:"nearest"})});var a=ey(),i=d(a);{var o=f=>{var g=U0(),_=d(g);I(()=>w(_,n(s).hint)),m(f,g)};F(i,f=>{n(s).hint&&f(o)})}var l=h(i,2);G_(l,{get palette(){return n(s)},get selected(){return qt.selected},rowRole:"option",get onpick(){return t.onpick},onhover:f=>qt.select(f)});var c=h(l,2);{var u=f=>{var g=Q0(),_=d(g);I(()=>w(_,qt.failure)),m(f,g)},v=f=>{var g=J0();m(f,g)},p=f=>{var g=$0(),_=d(g);I(()=>w(_,n(s).empty)),m(f,g)};F(c,f=>{qt.failure?f(u):qt.pending&&n(s).items.length===0?f(v,1):n(s).empty&&f(p,2)})}Ut(a,f=>q(r,f),()=>n(r)),m(e,a),Ke()}function tf(e){return e.split("/").map(encodeURIComponent).join("/")}function Ts(e){const t=e.toString();return t?`?${t}`:""}const ny={symbolHref(e,t={}){const r=new URLSearchParams;return t.trail&&r.set("t",t.trail),t.line&&r.set("hl",String(t.line)),e?`#/s/${tf(e)}${Ts(r)}`:`#/s${Ts(r)}`},fileHref(e,t={}){const r=new URLSearchParams;return t.source&&r.set("src","1"),t.line&&r.set("hl",String(t.line)),`#/file/${tf(e)}${Ts(r)}`},mapHref(e={}){const t=new URLSearchParams;return e.root!==void 0&&e.root!==null&&t.set("root",e.root),e.depth&&t.set("depth",String(e.depth)),e.tests&&t.set("tests","1"),`#/map${Ts(t)}`},flowHref(e={}){const t=new URLSearchParams;return e.from&&t.set("from",e.from),e.to&&t.set("to",e.to),e.symbols&&t.set("symbols",e.symbols),e.trail&&t.set("t",e.trail),`#/flow${Ts(t)}`},entryHref(){return"#/entry"},screensHref(){return"#/screens"},stepsHref(e={}){const t=new URLSearchParams;return e.anchor?t.set("anchor",e.anchor):e.symbol&&t.set("symbol",e.symbol),e.depth&&t.set("depth",String(e.depth)),e.through&&t.set("through","1"),e.view&&t.set("view",e.view),`#/steps${Ts(t)}`},deadHref(e={}){const t=new URLSearchParams;return e.exported&&t.set("exported","1"),`#/dead${Ts(t)}`},navigate(e,t={}){const r=e.startsWith("#")?e:`#${e}`;if(t.replace){history.replaceState(history.state,"",r),sd();return}location.hash!==r&&(location.hash=r,sd())},back(){history.back()}};let sd=()=>{};function ry(e){sd=e}let Rr=ny;function pn(e,t={}){return Rr.symbolHref(e,t)}function rn(e,t={}){return Rr.fileHref(e,t)}function ua(e={}){return Rr.mapHref(e)}function ws(e={}){return Rr.flowHref(e)}function Zd(){return Rr.entryHref()}function Ap(){return Rr.screensHref()}function Sr(e={}){return Rr.stepsHref(e)}function ra(e={}){return Rr.deadHref(e)}function jt(e,t={}){Rr.navigate(e,t)}function sy(){Rr.back()}const ay={start:"s",down:"d",up:"u"},oy={s:"start",d:"down",u:"up"};function ni(e){if(e.name)return e.name;const t=e.id.includes(":")?e.id.slice(e.id.indexOf(":")+1):e.id,r=t.slice(t.lastIndexOf("/")+1);return r.length===0||r.length>40?`${t.slice(0,8)}…`:/^[0-9a-f]{16,}$/.test(r)?`${r.slice(0,8)}…`:r}function Qr(e){return e.map(t=>ay[t.dir]+encodeURIComponent(t.id)).join(",")}function Ud(e){if(!e)return[];const t=[];for(const r of e.split(",")){if(r.length<2)continue;const s=oy[r[0]];if(!s)continue;let a;try{a=decodeURIComponent(r.slice(1))}catch{a=r.slice(1)}a&&t.push({id:a,name:null,kind:null,dir:s})}return t}let en=he(gn([]));const ji=new Map;function fc(e,t){if(!t.name&&!t.kind)return;const r=ji.get(e)??{name:null,kind:null};t.name&&(r.name=t.name),t.kind&&(r.kind=t.kind),ji.set(e,r)}const Wt={get hops(){return n(en)},get current(){return n(en).length>0?n(en)[n(en).length-1]:null},get encoded(){return Qr(n(en))},push(e){fc(e.id,e);const t=n(en).findIndex(r=>r.id===e.id);if(t>=0){q(en,n(en).slice(0,t+1),!0);const r=n(en)[t];e.name&&(r.name=e.name),e.kind&&(r.kind=e.kind);return}q(en,[...n(en),{id:e.id,name:e.name??null,kind:e.kind??null,dir:e.dir??(n(en).length===0?"start":"down")}].slice(-64),!0)},rename(e,t){const r=n(en).findIndex(a=>a.id===e);if(r<0)return;fc(t.id,t);const s=n(en)[r];q(en,[...n(en).slice(0,r),{...s,id:t.id,name:t.name??s.name,kind:t.kind??s.kind},...n(en).slice(r+1)],!0)},truncateTo(e){e<0||e>=n(en).length||q(en,n(en).slice(0,e+1),!0)},resolve(e,t){fc(e,t);const r=n(en).find(s=>s.id===e);r&&(t.name&&(r.name=t.name),t.kind&&(r.kind=t.kind))},clear(){q(en,[],!0)},hydrate(e){const t=Ud(e);Qr(t)!==Qr(n(en))&&q(en,t.slice(-64).map(r=>{const s=ji.get(r.id);return s?{...r,name:s.name,kind:s.kind}:r}),!0)}},nf=new Set;async function iy(){const e=n(en).filter(t=>!t.name&&!ji.get(t.id)?.name&&!nf.has(t.id)).map(t=>t.id);if(e.length!==0)try{const{items:t,missing:r}=await e0(e);for(const s of t)Wt.resolve(s.id,{name:s.kind==="file"?s.file:s.name,kind:s.kind});for(const s of r)nf.add(s)}catch{}}function gr(e,t,r){Wt.push({id:e.id,name:e.name??null,kind:e.kind??null,dir:t});const s=pn(e.id,{trail:Qr(Wt.hops),...r?{line:r}:{}});jt(s)}function ly(){const e=Wt.hops;if(e.length<2)return null;const t=e[e.length-1],r=e[e.length-2];return!t||!r?null:t.dir==="down"?{id:r.id,rail:"left"}:t.dir==="up"?{id:r.id,rail:"right"}:null}function Np(e){if(e){if(e.type==="file"){jt(rn(e.path));return}gr({id:e.id,name:e.name,kind:e.kind},"start")}}var cy=S('
      ');function dy(e,t){We(t,!0);let r=Ie(t,"placeholder",3,"Search symbols and files — or ask “how does X reach Y”"),s=Ie(t,"label",3,"Search symbols and files"),a=he(null);const i=/Mac|iPhone|iPad/.test(globalThis.navigator?.platform??"")?"⌘":"Ctrl";let o=he(null);function l(){n(a)?.focus(),n(a)?.select(),qt.show()}function c(D){if(qt.reset(),n(a)?.blur(),t.onpick){t.onpick(D);return}if(D.type==="flow"){jt(ws({from:D.from,to:D.to}));return}if(D.type==="entry"){D.row.target&&Np(D.row.target);return}const V=D.type==="route"?D.nodeId:D.id;if(V){if(D.type==="symbol"&&D.node.kind==="file"){jt(rn(D.node.file));return}gr(D.type==="route"?{id:V,name:D.handler,kind:null}:{id:V,name:D.node.name,kind:D.node.kind},"start")}}function u(D){if(D.key==="Escape"){D.preventDefault(),qt.hide(),n(a)?.blur();return}if(!qt.open){D.key!=="Tab"&&qt.show();return}switch(D.key){case"ArrowDown":D.preventDefault(),qt.move(1);break;case"ArrowUp":D.preventDefault(),qt.move(-1);break;case"Enter":{D.preventDefault();const V=qt.selectedItem;V&&c(V);break}}}function v(D){if(!qt.open)return;const V=D.target;V instanceof Node&&n(o)?.contains(V)||qt.hide()}var p={focus:l,pick:c},f=cy();ft("pointerdown",cn,v);let g;var _=d(f),x=d(_);Ne(x,{name:"search"});var k=h(_,2);Ut(k,D=>q(a,D),()=>n(a));var C=h(k,2),T=d(C),M=d(T),z=h(C,2);{var R=D=>{ty(D,{onpick:c})};F(z,D=>{qt.open&&D(R)})}return Ut(f,D=>q(o,D),()=>n(o)),I(()=>{g=qe(f,1,"search svelte-1625q67",null,g,{open:qt.open}),se(k,"placeholder",r()),se(k,"aria-label",s()),se(k,"aria-expanded",qt.open),se(k,"aria-activedescendant",qt.open?`palette-row-${qt.selected}`:void 0),w(M,i)}),xe("keydown",k,u),ft("focus",k,()=>qt.show()),Wd(k,()=>qt.query,D=>qt.query=D),m(e,f),Ke(p)}St(["keydown"]);function uy(e){try{return decodeURIComponent(e)}catch{return e}}function fy(e){const t=e.get("hl");if(t===null)return null;const r=Number.parseInt(t,10);return Number.isFinite(r)&&r>0?r:null}function zp(e){const t=e.startsWith("#")?e.slice(1):e,r=t.indexOf("?"),s=r<0?t:t.slice(0,r),a=new URLSearchParams(r<0?"":t.slice(r+1)),i=s.split("/").filter(Boolean).map(uy),o=fy(a),[l,...c]=i;let u;if(l===void 0)u={view:"home"};else if(l==="s")u={view:"symbol",id:c.length>0?c.join("/"):null,line:o};else if(l==="file"&&c.length>0)u={view:"file",path:c.join("/"),line:o,source:a.get("src")==="1"};else if(l==="map"&&c.length===0){const v=a.get("root"),p=Number.parseInt(a.get("depth")??"",10);u={view:"map",root:v===null?null:v,depth:Number.isFinite(p)&&p>=1&&p<=4?p:null,tests:a.get("tests")==="1"}}else if(l==="entry"&&c.length===0)u={view:"entry"};else if(l==="screens"&&c.length===0)u={view:"screens"};else if(l==="steps"&&c.length===0){const v=Number.parseInt(a.get("depth")??"",10),p=a.get("view");u={view:"steps",anchor:a.get("anchor"),symbol:a.get("symbol"),depth:Number.isFinite(v)&&v>=1&&v<=14?v:null,through:a.get("through")==="1",reading:p==="order"||p==="tree"?p:null}}else l==="dead"&&c.length===0?u={view:"dead",exported:a.get("exported")==="1"}:l==="flow"&&c.length===0?u={view:"flow",from:a.get("from"),to:a.get("to"),symbols:a.get("symbols"),trail:a.get("t")}:u={view:"unknown",path:s};return{route:u,params:a,raw:t}}const vy=zp(typeof location>"u"?"":location.hash);let Fi=he(gn(vy));function vc(){const e=zp(location.hash);e.raw!==n(Fi).raw&&q(Fi,e,!0)}typeof window<"u"&&(window.addEventListener("hashchange",vc),window.addEventListener("popstate",vc),ry(vc));const sa={get route(){return n(Fi).route},get params(){return n(Fi).params}},rf=[1e3,2e3,4e3,8e3,15e3,3e4],hy=8;let ad=he(!1),Eo=he(!1),od=he(null),Pp=he(null),wa=he(0),xa=he(0),Lp=he(null),Qd=he(null),aa=null,ri=null,oa=0,sf=!1,Op=!1,id=!1,ld=!1;function Jd(){return typeof document<"u"&&document.visibilityState==="hidden"}function qp(e){if(q(Lp,e,!0),Jd()){id=!0;return}q(wa,n(wa)+1)}function Dp(e){if(q(Qd,e,!0),Jd()){ld=!0;return}q(xa,n(xa)+1)}function py(){id&&(id=!1,q(wa,n(wa)+1)),ld&&(ld=!1,q(xa,n(xa)+1))}function Si(){if(aa!==null)return;ri!==null&&(clearTimeout(ri),ri=null),q(Eo,!1);const e=dn().events;if(!e){Op=!0;return}aa=e({hello(t){const r=t;r&&(oa=0,q(ad,!0),q(Pp,r.watching,!0),q(od,r.degraded,!0))},changed(t){const r=t;r&&Dp(r)},index(t){const r=t;r&&qp(r)},degraded(t){const r=t;r&&q(od,r.reason,!0)},error(){q(ad,!1);const t=aa;if(aa=null,t?.(),oa+=1,oa>=hy){q(Eo,!0);return}const r=rf[Math.min(oa-1,rf.length-1)]??3e4;ri=setTimeout(Si,r)}})}function gy(){sf||typeof window>"u"||(sf=!0,document.addEventListener("visibilitychange",()=>{Jd()||(py(),n(Eo)&&(oa=0,Si()))}),window.addEventListener("focus",()=>{n(Eo)&&(oa=0,Si())}),window.addEventListener("pagehide",()=>{aa?.(),aa=null}),Si())}const An={get connected(){return n(ad)},get stopped(){return n(Eo)},get degraded(){return n(od)},get watching(){return n(Pp)},get indexTick(){return n(wa)},get diskTick(){return n(xa)},get lastIndex(){return n(Lp)},get lastChanged(){return n(Qd)},get unsupported(){return Op},start:gy,signal(e,t={}){if(e==="index"){qp({type:"index",index:t.index??{lastIndexedAt:null,files:0},files:t.files??[],total:t.total??t.files?.length??0,truncated:t.truncated??!1,at:t.at??0});return}Dp({type:"changed",files:t.files??[],total:t.total??t.files?.length??0,truncated:t.truncated??!1,scan:t.scan??(t.files===void 0||t.files.length===0),at:t.at??0})}};function my(e){const t=n(Qd);return t?t.scan||t.truncated?!0:e===null?!1:t.files.includes(e):!1}function $d(e,t){let r=n(wa),s=n(xa);vt(()=>{const a=An.indexTick,i=An.diskTick,o=e();nn(()=>{if(a!==r){r=a,s=i,t("index");return}i!==s&&(s=i,my(o)&&t("disk"))})})}let Is=he(null),cd=he(null),io=null;function af(){return io||(io=Q_().then(e=>{q(Is,e,!0),q(cd,null)}).catch(e=>{q(cd,e instanceof Error?e.message:String(e),!0)}),io)}const Qn={get stats(){return n(Is)},get error(){return n(cd)},get name(){return n(Is)?.project.name??null},get summary(){if(!n(Is))return null;const e=t=>t.toLocaleString();return`${e(n(Is).graph.nodes)} symbols · ${e(n(Is).graph.edges)} edges · ${e(n(Is).graph.files)} files indexed`},ensure:af,reload(){return io=null,af()}};var _y=S(' '),yy=S(''),by=S('
      ',1);function wy(e,t){We(t,!0);let r=Ie(t,"project",3,null),s=he(null),a=he(!1);function i(){q(a,!0),queueMicrotask(()=>n(s)?.focus())}vt(()=>{qt.open||q(a,!1)});let o=b(()=>Qn.stats),l=N=>N.toLocaleString(),c=b(()=>{if(An.degraded!==null)return{tone:"amber",short:"Live updates off",text:"Live updates off",title:`${An.degraded} This page no longer refreshes itself — reload it after a sync.`};if(An.stopped)return{tone:"amber",short:"Not live",text:"Not live",title:"Lost the connection to codegraph ui and stopped retrying. Focus this tab to try again, or reload the page."};if(!n(o))return null;const N=n(o).index.stale||n(o).index.state!==null&&n(o).index.state!=="complete",B=`${l(n(o).graph.files)} files · ${l(n(o).graph.nodes)} nodes`;return N?{tone:"amber",short:"Stale",text:`Index stale · ${B}`,title:"Files changed since the last index. Run codegraph sync to bring the graph up to date."}:{tone:"green",short:"Current",text:`Index current · ${B}`,title:`${l(n(o).graph.edges)} edges · extraction version ${n(o).index.extractionVersion??"?"}`}}),u=b(()=>{const N=sa.route;return N.view==="symbol"&&N.id!==null?Wt.current?.name??"Symbol":N.view==="file"?N.path.split("/").pop()??"File":{home:r()??"Start",map:"Map",flow:"Flow",entry:"Entry points",screens:"Screens",steps:"Steps",dead:"Dead code",symbol:"Symbol",unknown:"Not found"}[N.view]??"CodeGraph"});var v={focusSearch:i},p=by(),f=_e(p),g=d(f),_=d(g);gp(_,{size:30});var x=h(g,2),k=d(x),C=h(x,2),T=d(C);Ne(T,{name:"box"});var M=h(T,2),z=d(M),R=h(C,2);let D;var V=d(R);Ut(dy(V,{}),N=>q(s,N,!0),()=>n(s));var X=h(R,2),j=d(X),P=d(j);Ne(P,{name:"search"});var A=h(j,2);{var H=N=>{var B=_y(),W=h(d(B),2),Y=d(W),J=h(W,2),G=d(J);I(()=>{qe(B,1,`pill status ${n(c).tone??""}`,"svelte-1h259us"),se(B,"title",n(c).title),w(Y,n(c).text),w(G,n(c).short)}),m(N,B)};F(A,N=>{n(c)&&N(H)})}var L=h(A,2),E=d(L);Ne(E,{name:"ellipsis"});var y=h(f,2);{var O=N=>{var B=yy();m(N,B)};F(y,N=>{qt.open&&N(O)})}return I(()=>{w(k,n(u)),se(C,"title",n(o)?.project.root??"Indexed project"),w(z,r()??"…"),D=qe(R,1,"cmd svelte-1h259us",null,D,{unfolded:n(a)})}),xe("click",j,i),xe("click",L,()=>t.onmore?.()),m(e,p),Ke(v)}St(["click"]);var xy=S('follows the OS'),ky=S(''),Sy=S(''),Ey=S(''),My=S('
      '),Cy=S(''),Ty=S('
      ');function Rp(e,t){We(t,!0);let r=Ie(t,"variant",3,"rail"),s=Ie(t,"open",3,!1);const a={system:"monitor",dark:"moon",light:"sun"};let i=b(()=>`Theme: ${oc[xr.choice]}`);function o(p){xr.set(p),t.onclose?.()}var l=Et(),c=_e(l);{var u=p=>{var f=My(),g=d(f);let _;var x=d(g);Ne(x,{get name(){return a[xr.choice]}});var k=h(g,2);{var C=T=>{var M=Ey(),z=h(d(M),2);ke(z,16,()=>vo,R=>R,(R,D)=>{var V=Sy();let X;var j=d(V);Ne(j,{get name(){return a[D]}});var P=h(j,2),A=d(P),H=h(P,2);{var L=O=>{var N=xy();m(O,N)};F(H,O=>{D==="system"&&O(L)})}var E=h(H,2);{var y=O=>{var N=ky(),B=d(N);Ne(B,{name:"check",size:14}),m(O,N)};F(E,O=>{xr.choice===D&&O(y)})}I(()=>{se(V,"aria-checked",xr.choice===D),X=qe(V,1,"item svelte-14ttdid",null,X,{on:xr.choice===D}),w(A,oc[D])}),xe("click",V,()=>o(D)),m(R,V)}),m(T,M)};F(k,T=>{s()&&T(C)})}I(()=>{_=qe(g,1,"navbtn",null,_,{active:s()}),se(g,"aria-label",n(i)),se(g,"aria-expanded",s()),se(g,"data-tip",n(i))}),xe("click",g,()=>t.ontoggle?.()),m(p,f)},v=p=>{var f=Ty();ke(f,20,()=>vo,g=>g,(g,_)=>{var x=Cy();let k;var C=d(x);Ne(C,{get name(){return a[_]},size:14});var T=h(C);I(()=>{se(x,"aria-checked",xr.choice===_),k=qe(x,1,"svelte-14ttdid",null,k,{on:xr.choice===_}),w(T,` ${oc[_]??""}`)}),xe("click",x,()=>o(_)),m(g,x)}),m(p,f)};F(c,p=>{r()==="rail"?p(u):p(v,-1)})}m(e,l),Ke()}St(["click"]);p1();var of=S(' '),lf=S('
      '),Iy=S('
      Everywhere
      On a symbol
      ');function Ay(e,t){We(t,!1);const r=/Mac|iPhone|iPad/.test(globalThis.navigator?.platform??"")?"⌘":"Ctrl",s=[[["/"],"Search symbols and files"],[[r,"K"],"Search, from anywhere"],[["m"],"Map"],[["f"],"Flow"],[["e"],"Entry points and saved trails"],[["s"],"Screens"],[["d"],"Dead code"],[["⌫"],"Back one step"]],a=[[["↑","↓"],"Move through a rail"],[["←","→"],"Switch between Called by and Calls"],[["⏎"],"Follow the selected row"]];Yd();var i=Iy(),o=h(d(i),2);ke(o,1,()=>s,([c,u])=>u,(c,u)=>{var v=b(()=>Fs(n(u),2));let p=()=>n(v)[0],f=()=>n(v)[1];var g=lf(),_=d(g);ke(_,5,p,C=>C,(C,T)=>{var M=of(),z=d(M);I(()=>w(z,n(T))),m(C,M)});var x=h(_,2),k=d(x);I(()=>w(k,f())),m(c,g)});var l=h(o,4);ke(l,1,()=>a,([c,u])=>u,(c,u)=>{var v=b(()=>Fs(n(u),2));let p=()=>n(v)[0],f=()=>n(v)[1];var g=lf(),_=d(g);ke(_,5,p,C=>C,(C,T)=>{var M=of(),z=d(M);I(()=>w(z,n(T))),m(C,M)});var x=h(_,2),k=d(x);I(()=>w(k,f())),m(c,g)}),m(e,i),Ke()}let kr=he(null),eu=he(!1),Ps=he(null),Wa=he(!1),ia=null;function cf(){return ia||(ia=c0().then(e=>{q(kr,e,!0),q(Ps,null)}).catch(e=>{q(kr,null),q(Ps,e instanceof Error?e.message:String(e),!0)}).finally(()=>{q(eu,!0)}),ia)}function df(e){q(kr,e,!0),q(Ps,null),q(eu,!0),ia=Promise.resolve()}const Dt={get list(){return n(kr)?.trails??[]},get payload(){return n(kr)},get settled(){return n(eu)},get failure(){return n(Ps)},get busy(){return n(Wa)},get canSave(){return Gu()?n(kr)===null||!n(kr).readOnly:!1},get readOnlyReason(){return n(kr)?.readOnly?n(kr).readOnlyReason??"This viewer is running read-only.":Gu()?null:"This viewer cannot save trails."},get directory(){return n(kr)?.directory??null},ensure:cf,reload(){return ia=null,cf()},async save(e,t,r){q(Wa,!0);try{const s=await d0({name:e,note:t,hops:r.map(a=>({dir:a.dir,id:a.id}))});return df(s),s.saved??null}catch(s){return q(Ps,s instanceof Error?s.message:String(s),!0),null}finally{q(Wa,!1)}},async remove(e){q(Wa,!0);try{return df(await u0(e)),!0}catch(t){return q(Ps,t instanceof Error?t.message:String(t),!0),!1}finally{q(Wa,!1)}},clearFailure(){q(Ps,null)}};var Ny=S('
      This viewer
      Project
      Index
      Live
      Trails

      Port, read-only and watching are set on the command line: codegraph ui --help.

      ');function Hp(e,t){We(t,!0),vt(()=>{Dt.ensure()});let r=b(()=>Qn.stats),s=b(()=>{const C=n(r)?.index.lastIndexedAt;return C?new Date(C).toISOString().slice(0,16).replace("T"," "):null}),a=b(()=>n(r)?[n(r).index.state??"unknown",n(r).index.extractionVersion!==null?`extraction ${n(r).index.extractionVersion}`:null,n(s)?`${n(s)} UTC`:null].filter(Boolean).join(" · "):"…"),i=b(()=>An.degraded!==null?`off — ${An.degraded}`:An.stopped?"not connected — focus this tab to try again":"on — screens refresh when the index or a file changes"),o=b(()=>Dt.canSave?`saved to ${Dt.directory??".codegraph/ui/trails"}`:Dt.readOnlyReason??"not saved");var l=Ny(),c=h(d(l),2),u=h(d(c),2),v=d(u),p=h(u,4),f=d(p),g=h(p,4),_=d(g),x=h(g,4),k=d(x);I(()=>{w(v,n(r)?.project.root??"…"),w(f,n(a)),w(_,n(i)),w(k,n(o))}),m(e,l),Ke()}function tu(e){const t=sa.route,r=t.view;let s;return t.view==="symbol"&&t.id!==null?s=pn(t.id):s=pn(Wt.current?Wt.current.id:null),[{id:"start",label:"Start",short:"Start",icon:"layout-dashboard",href:"#/",active:r==="home"&&!e},{id:"map",label:"Map",short:"Map",icon:"network",href:ua(),active:r==="map"},{id:"symbol",label:"Symbol",short:"Symbol",icon:"braces",href:s,active:r==="symbol"||r==="file"},{id:"flow",label:"Flow",short:"Flow",icon:"workflow",href:ws(),active:r==="flow"},{id:"screens",label:"Screens",short:"Screens",icon:"monitor-smartphone",href:Ap(),active:r==="screens"||r==="home"&&e},{id:"steps",label:"Steps",short:"Steps",icon:"footprints",href:Sr(),active:r==="steps"},{id:"dead",label:"Dead code",short:"Dead code",icon:"ghost",href:ra(),active:r==="dead"},{id:"trails",label:"Saved trails and entry points",short:"Trails",icon:"bookmark",href:Zd(),active:r==="entry"}]}const zy=(e,t=kn)=>{var r=Py(),s=d(r);let a;var i=d(s);Ne(i,{get name(){return t().icon}}),I(()=>{a=qe(s,1,"navbtn svelte-a15fu9",null,a,{active:t().active}),se(s,"href",t().href),se(s,"aria-label",t().label),se(s,"aria-current",t().active?"page":void 0),se(s,"data-tip",t().label)}),m(e,r)};var Py=S("
    • "),Ly=S(''),Oy=S('
      '),qy=S('');function Dy(e,t){We(t,!0);let r=Ie(t,"hasScreens",3,!1),s=b(()=>tu(r())),a=he(null),i=he(null);function o(C){q(a,n(a)===C?null:C,!0)}function l(C){n(a)!==null&&(C.target instanceof Node&&n(i)?.contains(C.target)||q(a,null))}function c(C){n(a)!==null&&C.key==="Escape"&&(C.preventDefault(),q(a,null))}const u=[{panel:"keys",icon:"keyboard",label:"Keyboard shortcuts"},{panel:"about",icon:"settings",label:"Viewer settings"}];var v=qy();ft("pointerdown",cn,l),ft("keydown",cn,c);var p=d(v),f=d(p);gp(f,{});var g=h(p,2);ke(g,21,()=>n(s),C=>C.id,(C,T)=>{zy(C,()=>n(T))});var _=h(g,2),x=d(_);{let C=b(()=>n(a)==="theme");Rp(x,{get open(){return n(C)},ontoggle:()=>o("theme"),onclose:()=>q(a,null)})}var k=h(x,2);ke(k,17,()=>u,C=>C.panel,(C,T)=>{var M=Oy(),z=d(M);let R;var D=d(z);Ne(D,{get name(){return n(T).icon}});var V=h(z,2);{var X=j=>{var P=Ly(),A=d(P);{var H=E=>{Ay(E,{})},L=E=>{Hp(E,{})};F(A,E=>{n(T).panel==="keys"?E(H):E(L,-1)})}I(()=>se(P,"aria-label",n(T).label)),m(j,P)};F(V,j=>{n(a)===n(T).panel&&j(X)})}I(()=>{R=qe(z,1,"navbtn",null,R,{active:n(a)===n(T).panel}),se(z,"aria-label",n(T).label),se(z,"aria-expanded",n(a)===n(T).panel),se(z,"data-tip",n(T).label)}),xe("click",z,()=>o(n(T).panel)),m(C,M)}),Ut(_,C=>q(i,C),()=>n(i)),m(e,v),Ke()}St(["click"]);var Ry=S(" "),Hy=S('');function jy(e,t){We(t,!0);let r=Ie(t,"hasScreens",3,!1),s=Ie(t,"moreOpen",3,!1);const a=new Set(["start","map","symbol","flow"]);let i=b(()=>tu(r())),o=b(()=>n(i).filter(g=>a.has(g.id))),l=b(()=>s()||n(i).some(g=>!a.has(g.id)&&g.active));var c=Hy(),u=d(c);ke(u,17,()=>n(o),g=>g.id,(g,_)=>{var x=Ry();let k;var C=d(x);Ne(C,{get name(){return n(_).icon},size:20});var T=h(C,2),M=d(T);I(()=>{k=qe(x,1,"tab svelte-cs3flw",null,k,{active:n(_).active&&!s()}),se(x,"href",n(_).href),se(x,"aria-current",n(_).active?"page":void 0),w(M,n(_).short)}),m(g,x)});var v=h(u,2);let p;var f=d(v);Ne(f,{name:"menu",size:20}),I(()=>{p=qe(v,1,"tab svelte-cs3flw",null,p,{active:n(l)}),se(v,"aria-expanded",s())}),xe("click",v,function(...g){t.onmore?.apply(this,g)}),m(e,c),Ke()}St(["click"]);var Fy=S('
    • '),By=S(' ',1);function Vy(e,t){We(t,!0);let r=Ie(t,"hasScreens",3,!1);const s=new Set(["start","map","symbol","flow"]);let a=b(()=>tu(r()).filter(g=>!s.has(g.id)));function i(g){g.key==="Escape"&&(g.preventDefault(),t.onclose())}var o=By();ft("keydown",cn,i);var l=_e(o),c=h(l,2),u=h(d(c),4);ke(u,21,()=>n(a),g=>g.id,(g,_)=>{var x=Fy(),k=d(x);let C;var T=d(k);Ne(T,{get name(){return n(_).icon}});var M=h(T,2),z=d(M),R=h(M,2),D=d(R);Ne(D,{name:"chevron-right",size:14}),I(()=>{C=qe(k,1,"dest svelte-phd9v0",null,C,{active:n(_).active}),se(k,"href",n(_).href),w(z,n(_).label)}),xe("click",k,function(...V){t.onclose?.apply(this,V)}),m(g,x)});var v=h(u,4);Rp(v,{variant:"segmented"});var p=h(v,2),f=d(p);Hp(f,{}),xe("click",l,function(...g){t.onclose?.apply(this,g)}),m(e,o),Ke()}St(["click"]);const Wy=3;function Ky(e){const t=bt(e.hops.length,"hop");return e.author?`${t} · ${e.author}`:t}function Yy(e){const t=e.hops.filter(a=>a.status==="missing"),r=e.hops.filter(a=>a.status==="ambiguous"),s=e.hops.filter(a=>a.status==="moved");return t.length>0?{tone:"warn",text:`${bt(t.length,"hop")} moved or renamed since this was saved — ${pc(t)} no longer in the index.`}:r.length>0?{tone:"warn",text:`${pc(r)} now ${r.length===1?"names":"name"} more than one symbol — showing the closest match.`}:s.length>0?{tone:"note",text:`${pc(s)} moved to another file since this was saved.`}:null}function Xy(e){if(e.encoded===null)return"None of this trail resolves in the current index.";if(e.openCount===e.hops.length)return null;const t=e.openFrom+e.openCount-1;return`Opens ${e.openCount===1?`hop ${e.openFrom}`:`hops ${e.openFrom}–${t}`} of ${e.hops.length}.`}function hc(e){return e.encoded!==null&&e.openId!==null}function Gy(e){const t=e.hops.map((s,a)=>a===0?s.name:`${Zy(s)} ${s.name}`).join(" "),r=e.updatedAt?` — saved ${e.updatedAt.slice(0,10)}`:"";return`${t}${r}`}function Zy(e){return e.dir==="up"?"←":e.dir==="down"?"→":"·"}function pc(e){const t=e.slice(0,Wy).map(a=>a.name),r=e.length-t.length,s=t.length===1?t[0]:`${t.slice(0,-1).join(", ")} and ${t[t.length-1]}`;return r>0?`${s} and ${r} more`:s}function Uy(e,t){const r=e.trim();return r===""?"Give the trail a name.":r.length>t?`That name is too long (max ${t} characters).`:null}function Qy(e,t){const r=e.trim().replace(/\s+/g," ");return t.find(s=>s.name===r)??null}function Jy(e){return`${JSON.stringify({version:1,id:e.id,name:e.name,note:e.note,author:e.author,createdAt:e.createdAt,updatedAt:e.updatedAt,hops:e.hops.map(t=>({dir:t.dir,name:t.name,qualifiedName:t.qualifiedName,kind:t.kind,file:t.savedFile,line:t.savedLine,id:t.id??""}))},null,2)} +`}const $y=2600;let Bi=he(null),Ls=null;function eb(e){Ls!==null&&clearTimeout(Ls),q(Bi,e,!0),Ls=setTimeout(()=>{q(Bi,null),Ls=null},$y)}function tb(){Ls!==null&&clearTimeout(Ls),Ls=null,q(Bi,null)}const Hn={get message(){return n(Bi)},show:eb,clear:tb};var nb=S(''),rb=S(''),sb=S(''),ab=S(''),ob=S(' ',1),ib=S(''),lb=S(''),cb=S(' '),db=S('
      Trail
      '),ub=S(' '),fb=S('
      '),vb=S("
      ");function hb(e,t){We(t,!0);const r=120;let s=b(()=>Wt.hops);vt(()=>{n(s).length>0&&Dt.ensure()});const a=44,i=7.2,o=20,l=44;let c=he(0),u=he(!1);function v(y){const O=n(s)[y];return(O?a+ni(O).length*i:0)+(y>0?o:0)}let p=b(()=>{if(n(u)||n(c)===0)return 0;let y=0;for(let B=0;B=0;B--){const W=v(B);if(O+W>n(c)&&N>0)break;O+=W,N+=1}return n(s).length-N});vt(()=>{n(s).length,q(u,!1)});let f=b(()=>n(s).length>1?n(s)[n(s).length-2]:null),g=he(!1),_=he(""),x=he(null);vt(()=>{n(g)&&Dt.ensure()});let k=b(()=>Uy(n(_),r)),C=b(()=>n(g)?Qy(n(_),Dt.list):null);function T(){Dt.clearFailure(),q(g,!0),q(_,Wt.current?.name??"",!0),queueMicrotask(()=>{n(x)?.focus(),n(x)?.select()})}function M(){q(g,!1),q(_,"")}async function z(y){if(y.preventDefault(),n(k)||Dt.busy)return;const O=n(C)!==null;await Dt.save(n(_),"",n(s))!==null&&(Hn.show(O?`Trail replaced · ${n(_).trim()}`:`Trail saved · ${n(_).trim()}`),M())}function R(y){y.key==="Escape"&&(y.preventDefault(),y.stopPropagation(),M())}function D(y){const O=n(s)[y];O&&(Wt.truncateTo(y),jt(pn(O.id,{trail:Qr(Wt.hops)})))}function V(){jt(ws({trail:Qr(n(s))}))}function X(){const y=Wt.current;if(Wt.clear(),!y){jt("#/");return}Wt.push({id:y.id,name:y.name,kind:y.kind,dir:"start"}),jt(pn(y.id,{trail:Qr(Wt.hops)}),{replace:!0})}var j=vb();let P;var A=d(j);{var H=y=>{var O=db(),N=h(d(O),2),B=d(N);{var W=Z=>{var ce=nb(),te=d(ce);Ne(te,{name:"chevron-left",size:14});var ie=h(te,2);Lt(ie,{get kind(){return n(f).kind}});var ve=h(ie,2),fe=d(ve);I((pe,ye)=>{se(ce,"title",`Step back to ${pe??""}`),w(fe,ye)},[()=>ni(n(f)),()=>ni(n(f))]),xe("click",ce,()=>D(n(s).length-2)),m(Z,ce)};F(B,Z=>{n(f)&&Z(W)})}var Y=h(B,2),J=d(Y),G=h(N,2),ee=d(G);{var oe=Z=>{var ce=rb(),te=d(ce);I(()=>{se(ce,"title",`Show the ${n(p)??""} earlier hop${n(p)===1?"":"s"}`),w(te,`+${n(p)??""}`)}),xe("click",ce,()=>q(u,!0)),m(Z,ce)};F(ee,Z=>{n(p)>0&&Z(oe)})}var ge=h(ee,2);ke(ge,19,()=>n(s),Z=>Z.id,(Z,ce,te)=>{var ie=Et(),ve=_e(ie);{var fe=pe=>{var ye=ob(),Pe=_e(ye);{var de=De=>{var Le=ab();let Ze;var Re=d(Le);{var ue=Ce=>{Ne(Ce,{name:"corner-left-up",size:14})},le=Ce=>{Ne(Ce,{name:"chevron-right",size:14})},we=Ce=>{var $e=sb();m(Ce,$e)};F(Re,Ce=>{n(ce).dir==="up"?Ce(ue):n(ce).dir==="down"?Ce(le,1):Ce(we,-1)})}I(()=>{Ze=qe(Le,1,"hop-arrow svelte-rju47z",null,Ze,{up:n(ce).dir==="up"}),se(Le,"title",n(ce).dir==="up"?"stepped up to a caller":n(ce).dir==="down"?"stepped down into a call":"jumped here")}),m(De,Le)};F(Pe,De=>{n(te)>n(p)&&De(de)})}var be=h(Pe,2);let Ee;var Ge=d(be);Lt(Ge,{get kind(){return n(ce).kind}});var me=h(Ge,2),ze=d(me);I(De=>{Ee=qe(be,1,"hop svelte-rju47z",null,Ee,{cur:n(te)===n(s).length-1}),se(be,"aria-current",n(te)===n(s).length-1?"true":void 0),w(ze,De)},[()=>ni(n(ce))]),xe("click",be,()=>D(n(te))),m(pe,ye)};F(ve,pe=>{n(te)>=n(p)&&pe(fe)})}m(Z,ie)});var U=h(G,2),$=d(U);{var ae=Z=>{var ce=ib(),te=d(ce);Ne(te,{name:"workflow"}),xe("click",ce,V),m(Z,ce)};F($,Z=>{n(s).length>1&&Z(ae)})}var ne=h($,2);{var re=Z=>{var ce=lb(),te=d(ce);Ne(te,{name:"bookmark"}),xe("click",ce,T),m(Z,ce)},Q=Z=>{var ce=cb(),te=d(ce);Ne(te,{name:"lock",size:14});var ie=h(te,1,!0);I(()=>{se(ce,"title",Dt.readOnlyReason??void 0),w(ie,Dt.payload?.readOnly?"Read-only (--read-only) · trails not saved":"Read-only · trails not saved")}),m(Z,ce)};F(ne,Z=>{Dt.canSave&&!n(g)?Z(re):Dt.canSave||Z(Q,1)})}var K=h(ne,2);I(()=>w(J,`trail · ${n(s).length??""} hop${n(s).length===1?"":"s"}`)),$c(G,"clientWidth",Z=>q(c,Z)),xe("click",K,X),m(y,O)};F(A,y=>{n(s).length>0&&y(H)})}var L=h(A,2);{var E=y=>{var O=fb(),N=h(d(O),2);se(N,"maxlength",r),Ut(N,ne=>q(x,ne),()=>n(x));var B=h(N,2),W=d(B),Y=h(B,2),J=h(Y,2);let G;var ee=d(J);{var oe=ne=>{var re=Yt("Replaces the saved trail of the same name.");m(ne,re)},ge=ne=>{var re=Yt();I(()=>w(re,`${n(s).length??""} hop${n(s).length===1?"":"s"} · saved to ${Dt.directory??""}`)),m(ne,re)},U=ne=>{var re=Yt();I(()=>w(re,`${n(s).length??""} hop${n(s).length===1?"":"s"}`)),m(ne,re)};F(ee,ne=>{n(C)?ne(oe):Dt.directory?ne(ge,1):ne(U,-1)})}var $=h(J,2);{var ae=ne=>{var re=ub(),Q=d(re);I(()=>w(Q,Dt.failure)),m(ne,re)};F($,ne=>{Dt.failure&&ne(ae)})}I(()=>{B.disabled=n(k)!==null||Dt.busy,w(W,Dt.busy?"Saving…":n(C)?"Replace":"Save"),G=qe(J,1,"hint svelte-rju47z",null,G,{warn:n(C)!==null})}),ft("submit",O,z),xe("keydown",N,R),Wd(N,()=>n(_),ne=>q(_,ne)),xe("click",Y,M),m(y,O)};F(L,y=>{n(g)&&y(E)})}I(()=>P=qe(j,1,"trailwrap svelte-rju47z",null,P,{empty:n(s).length===0})),m(e,j),Ke()}St(["click","keydown"]);var pb=S(' '),gb=S('

      '),mb=S('

      Reading saved trails…

      '),_b=S("
      ",1),yb=S('

      No saved trails yet. Walk a path through the code, then press Save trail on the trail bar to keep it.

      '),bb=S(' '),wb=S(''),xb=S("

      "),kb=S('
      '),Sb=S('

      Only the first trails in the directory are listed.

      '),Eb=S('
      ',1),Mb=S('

      ');function jp(e,t){We(t,!0);let r=Ie(t,"title",3,"Saved trails"),s=Ie(t,"hideWhenEmpty",3,!0);vt(()=>{Dt.ensure()});let a=he(null),i=b(()=>Dt.list);function o(f){if(!hc(f))return;const g=Ud(f.encoded);Wt.clear();const _=f.hops.filter(x=>x.id!==null);for(const x of g){const k=_.find(C=>C.id===x.id);Wt.push({id:x.id,name:k?.name??null,kind:k?.kind??null,dir:x.dir})}jt(pn(f.openId,{trail:f.encoded}))}async function l(f){if(n(a)!==f.id){q(a,f.id,!0);return}q(a,null),await Dt.remove(f.id)}function c(f){const g=new Blob([Jy(f)],{type:"application/json"}),_=URL.createObjectURL(g),x=document.createElement("a");x.href=_,x.download=`${f.id}.json`,x.click(),URL.revokeObjectURL(_)}var u=Et(),v=_e(u);{var p=f=>{var g=Mb(),_=d(g),x=d(_),k=d(x);Ne(k,{name:"bookmark"});var C=h(k,1,!0),T=h(x,2);{var M=j=>{var P=pb(),A=d(P);I(()=>w(A,`newest first · stored in ${Dt.directory??""}`)),m(j,P)};F(T,j=>{Dt.directory&&j(M)})}var z=h(_,2);{var R=j=>{var P=gb(),A=d(P);I(()=>w(A,Dt.failure)),m(j,P)},D=j=>{var P=mb();m(j,P)},V=j=>{var P=yb(),A=h(d(P),3);{var H=L=>{var E=_b(),y=h(_e(E),1,!0);I(()=>w(y,Dt.readOnlyReason)),m(L,E)};F(A,L=>{Dt.readOnlyReason&&L(H)})}m(j,P)},X=j=>{var P=Eb(),A=_e(P);ke(A,21,()=>n(i),E=>E.id,(E,y)=>{const O=b(()=>Yy(n(y))),N=b(()=>Xy(n(y)));var B=kb();let W;var Y=d(B),J=d(Y);{let ie=b(()=>n(y).hops[0]?.kind??null);Lt(J,{get kind(){return n(ie)},size:22})}var G=h(J,2),ee=d(G),oe=d(ee),ge=h(ee,2);{var U=ie=>{var ve=bb(),fe=d(ve);I(()=>w(fe,n(y).note)),m(ie,ve)};F(ge,ie=>{n(y).note&&ie(U)})}var $=h(G,2),ae=d($),ne=h(Y,2),re=d(ne),Q=d(re);Ne(Q,{name:"external-link",size:14});var K=h(re,2);{var Z=ie=>{var ve=wb();let fe;var pe=d(ve);I(()=>{fe=qe(ve,1,"act svelte-1gyfjc6",null,fe,{armed:n(a)===n(y).id}),ve.disabled=Dt.busy,w(pe,n(a)===n(y).id?"Delete?":"Delete")}),xe("click",ve,()=>l(n(y))),ft("blur",ve,()=>q(a,n(a)===n(y).id?null:n(a),!0)),m(ie,ve)};F(K,ie=>{Dt.canSave&&ie(Z)})}var ce=h(ne,2);{var te=ie=>{var ve=xb();let fe;var pe=d(ve);{var ye=be=>{Ne(be,{name:"triangle-alert",size:14})};F(pe,be=>{n(O)?.tone==="warn"&&be(ye)})}var Pe=h(pe),de=d(Pe);I(be=>{fe=qe(ve,1,"decay svelte-1gyfjc6",null,fe,{warn:n(O)?.tone==="warn"}),w(de,be)},[()=>[n(O)?.text,n(N)].filter(Boolean).join(" ")]),m(ie,ve)};F(ce,ie=>{(n(O)||n(N))&&ie(te)})}I((ie,ve,fe,pe)=>{W=qe(B,1,"row svelte-1gyfjc6",null,W,ie),se(Y,"title",ve),Y.disabled=fe,w(oe,n(y).name),w(ae,pe)},[()=>({dead:!hc(n(y))}),()=>Gy(n(y)),()=>!hc(n(y)),()=>Ky(n(y))]),xe("click",Y,()=>o(n(y))),xe("click",re,()=>c(n(y))),m(E,B)});var H=h(A,2);{var L=E=>{var y=Sb();m(E,y)};F(H,E=>{Dt.payload?.bounded&&E(L)})}m(j,P)};F(z,j=>{Dt.failure?j(R):Dt.settled?n(i).length===0?j(V,2):j(X,-1):j(D,1)})}I(()=>{se(g,"aria-label",r()),w(C,r())}),m(f,g)};F(v,f=>{s()&&n(i).length===0&&Dt.failure===null||f(p)})}m(e,u),Ke()}St(["click"]);let gc=he(0);const dd={get searchTick(){return n(gc)},requestSearch(){q(gc,n(gc)+1)}},Ka=(e,t=kn)=>{var r=Nb();ke(r,20,()=>Array.from({length:t()},(s,a)=>a),s=>s,(s,a)=>{var i=Ab();let o;I(()=>o=rt(i,"",o,{width:`${45+a*37%50}%`})),m(s,i)}),m(e,r)};var Cb=S(''),Tb=S(' '),Ib=S('
      ',1),Ab=S(''),Nb=S('
      '),zb=S('Current'),Pb=S('Stale'),Lb=S('

      '),Ob=S('
      Files
      Nodes
      Edges
      ',1),qb=S(''),Db=S('

      Nothing in this index is depended on yet.

      '),Rb=S(' '),Hb=S('
      '),jb=S('
      '),Fb=S('

      No file in this index runs anything at its top level.

      '),Bb=S(' All entry points ',1),Vb=S(''),Wb=S('

      No test file reaches into the rest of the index.

      '),Kb=S('
      '),Yb=S('

      '),Xb=S(" ",1),Gb=S('

      Index composition

      what the graph holds, by node and edge kind

      Most depended on

      production symbols the most code reaches into

      Tests by reach

      Files by language

      every indexed file, fixtures included

      ');function Zb(e,t){We(t,!0);const r=(Me,Ue=kn,Ye=kn)=>{var He=Ib(),Xe=_e(He),Qe=d(Xe),ut=h(Xe,2);ke(ut,21,Ye,it=>it.label,(it,xt)=>{var et=Cb();let Ve;I(()=>Ve=rt(et,"",Ve,{width:`${n(xt).share}%`,background:n(xt).colour})),m(it,et)});var ot=h(ut,2);ke(ot,21,Ye,it=>it.label,(it,xt)=>{var et=Tb(),Ve=d(et);let gt;var _t=h(Ve);I(At=>{gt=rt(Ve,"",gt,{background:n(xt).colour}),w(_t,`${n(xt).label??""} ${At??""}`)},[()=>o(n(xt).count)]),m(it,et)}),I(it=>{w(Qe,Ue()),se(ut,"aria-label",it)},[()=>`${Ue()}: ${Ye().map(it=>`${it.label} ${it.count}`).join(", ")}`]),m(Me,He)};let s=Ie(t,"project",3,null);vt(()=>{qt.ensureEntries(),Qn.ensure()});let a=b(()=>Qn.stats),i=b(()=>qt.entries);const o=Me=>Me.toLocaleString(),l=["var(--cyan)","var(--primary)","var(--violet)","var(--amber)","var(--green)"],c=["var(--cyan)","var(--line-strong)","var(--primary)","var(--violet)","var(--green)"],u="var(--fg-4)";function v(Me,Ue){if(!Me)return[];const Ye=Object.entries(Me).filter(([,ot])=>ot>0).sort((ot,it)=>it[1]-ot[1]||ot[0].localeCompare(it[0])),He=Ye.reduce((ot,[,it])=>ot+it,0)||1,Xe=Ye.slice(0,Ue.length),Qe=Ye.slice(Ue.length).reduce((ot,[,it])=>ot+it,0),ut=Xe.map(([ot,it],xt)=>({label:ot.replace(/_/g," "),count:it,colour:Ue[xt]??u,share:100*it/He}));return Qe>0&&ut.push({label:"other",count:Qe,colour:u,share:100*Qe/He}),ut}let p=b(()=>v(n(a)?.graph.nodesByKind,l)),f=b(()=>v(n(a)?.graph.edgesByKind,c)),g=b(()=>{const Me=Object.entries(n(a)?.graph.filesByLanguage??{}).sort((Xe,Qe)=>Qe[1]-Xe[1]||Xe[0].localeCompare(Qe[0])),Ue=Me.slice(0,7),Ye=Me.slice(7),He=Math.max(1,...Ue.map(([,Xe])=>Xe));return{top:Ue.map(([Xe,Qe])=>({language:Xe,count:Qe,share:100*Qe/He})),more:Ye.length,moreFiles:Ye.reduce((Xe,[,Qe])=>Xe+Qe,0)}}),_=b(()=>(n(i)?.hubs.items??[]).slice(0,6)),x=b(()=>Math.max(1,...n(_).map(Me=>Me.dependents))),k=b(()=>(n(i)?.tests.items??[]).slice(0,5)),C=b(()=>Math.max(1,...n(k).map(Me=>Me.reaches))),T=b(()=>n(i)?.routes.routed?{kind:"routes",routes:n(i).routes.items.items.slice(0,4),files:[]}:{kind:"files",routes:[],files:(n(i)?.files.items??[]).slice(0,4)}),M=b(()=>{const Me=n(a)?.index.lastIndexedAt;return Me?new Date(Me).toISOString().slice(0,10):null}),z=b(()=>n(a)!==null&&!n(a).index.stale&&(n(a).index.state===null||n(a).index.state==="complete"));function R(Me){const Ue=Me.split("/");return Ue.length>2?Ue[Ue.length-3]??Ue[0]??"":Ue[0]??""}function D(Me){gr({id:Me.id,name:Me.name,kind:Me.kind},"start")}function V(Me){jt(rn(Me.file))}function X(Me){jt(rn(Me.file))}function j(Me){Me.handlerId&&gr({id:Me.handlerId,name:Me.handler,kind:null},"start")}var P=Gb(),A=d(P),H=d(A),L=d(H);Ne(L,{name:"box",size:20});var E=h(H,2),y=d(E),O=d(y),N=d(O),B=h(O,2);{var W=Me=>{var Ue=Et(),Ye=_e(Ue);{var He=Qe=>{var ut=zb();m(Qe,ut)},Xe=Qe=>{var ut=Pb();m(Qe,ut)};F(Ye,Qe=>{n(z)?Qe(He):Qe(Xe,-1)})}m(Me,Ue)};F(B,Me=>{n(a)&&Me(W)})}var Y=h(y,2);{var J=Me=>{var Ue=Lb(),Ye=d(Ue);I(He=>w(Ye,He),[()=>[n(M)?`indexed ${n(M)}`:null,`extraction version ${n(a).index.extractionVersion??"?"}`,`${o(n(a).graph.files)} files`,`${o(n(a).graph.nodes)} nodes`,`${o(n(a).graph.edges)} edges`].filter(Boolean).join(" · ")]),m(Me,Ue)};F(Y,Me=>{n(a)&&Me(J)})}var G=h(E,2),ee=d(G),oe=d(ee);Ne(oe,{name:"network"});var ge=h(ee,2),U=d(ge);Ne(U,{name:"search"});var $=h(ge,2),ae=d($);Ne(ae,{name:"workflow"});var ne=h(A,2),re=d(ne),Q=d(re),K=d(Q);Ne(K,{name:"layers"});var Z=h(Q,4);{var ce=Me=>{var Ue=Ob(),Ye=_e(Ue),He=d(Ye),Xe=h(d(He)),Qe=d(Xe),ut=h(He,2),ot=h(d(ut)),it=d(ot),xt=h(ut,2),et=h(d(xt)),Ve=d(et),gt=h(Ye,2);r(gt,()=>"Nodes by kind",()=>n(p));var _t=h(gt,2);r(_t,()=>"Edges by kind",()=>n(f)),I((At,tt,Ct)=>{w(Qe,At),w(it,tt),w(Ve,Ct)},[()=>o(n(a).graph.files),()=>o(n(a).graph.nodes),()=>o(n(a).graph.edges)]),m(Me,Ue)},te=Me=>{Ka(Me,()=>5)};F(Z,Me=>{n(a)?Me(ce):Me(te,-1)})}var ie=h(re,2),ve=d(ie);jp(ve,{hideWhenEmpty:!1});var fe=h(ie,2),pe=d(fe),ye=d(pe);Ne(ye,{name:"zap"});var Pe=h(pe,4);{var de=Me=>{var Ue=Et(),Ye=_e(Ue);ke(Ye,17,()=>n(_),He=>He.id,(He,Xe)=>{var Qe=qb(),ut=d(Qe),ot=d(ut),it=d(ot),xt=h(ot),et=d(xt),Ve=h(ut,2),gt=d(Ve),_t=h(Ve,2),At=d(_t);let tt;I((Ct,Ht,Ft)=>{se(Qe,"title",`${n(Xe).qualifiedName} — ${n(Xe).file}:${n(Xe).line}`),w(it,n(Xe).name),w(et,Ct),w(gt,Ht),tt=rt(At,"",tt,Ft)},[()=>R(n(Xe).file),()=>o(n(Xe).dependents),()=>({width:`${Math.max(2,Math.round(100*n(Xe).dependents/n(x)))}%`})]),xe("click",Qe,()=>D(n(Xe))),m(He,Qe)},He=>{var Xe=Db();m(He,Xe)}),m(Me,Ue)},be=Me=>{Ka(Me,()=>6)};F(Pe,Me=>{n(i)?Me(de):Me(be,-1)})}var Ee=h(fe,2),Ge=d(Ee),me=d(Ge);Ne(me,{name:"command"});var ze=h(me),De=d(ze),Le=h(Ge,2),Ze=d(Le),Re=h(Le,2);{var ue=Me=>{var Ue=Bb(),Ye=_e(Ue);{var He=ot=>{var it=Et(),xt=_e(it);ke(xt,17,()=>n(T).routes,et=>et.routeId,(et,Ve)=>{var gt=Hb(),_t=d(gt);Lt(_t,{kind:"route",size:22});var At=h(_t,2),tt=d(At),Ct=d(tt),Ht=h(tt,2),Ft=d(Ht),Qt=h(At,2);{var sn=ln=>{var br=Rb(),lt=d(br);I(()=>w(lt,n(Ve).method)),m(ln,br)};F(Qt,ln=>{n(Ve).method&&ln(sn)})}I(ln=>{At.disabled=!n(Ve).handlerId,w(Ct,n(Ve).url),w(Ft,`${n(Ve).handler??""} · ${ln??""}:${n(Ve).line??""}`)},[()=>n(Ve).file.split("/").pop()]),xe("click",At,()=>j(n(Ve))),m(et,gt)}),m(ot,it)},Xe=ot=>{var it=Et(),xt=_e(it);ke(xt,17,()=>n(T).files,et=>et.id,(et,Ve)=>{var gt=jb(),_t=d(gt);Lt(_t,{kind:"file",size:22});var At=h(_t,2),tt=d(At),Ct=d(tt),Ht=h(tt,2),Ft=d(Ht),Qt=h(At,2),sn=d(Qt);I(()=>{w(Ct,n(Ve).name),w(Ft,n(Ve).file),w(sn,`${n(Ve).calls??""} call${n(Ve).calls===1?"":"s"}`)}),xe("click",At,()=>X(n(Ve))),m(et,gt)},et=>{var Ve=Fb();m(et,Ve)}),m(ot,it)};F(Ye,ot=>{n(T).kind==="routes"?ot(He):ot(Xe,-1)})}var Qe=h(Ye,2),ut=h(d(Qe));Ne(ut,{name:"chevron-right",size:14}),I(ot=>se(Qe,"href",ot),[()=>Zd()]),m(Me,Ue)},le=Me=>{Ka(Me,()=>4)};F(Re,Me=>{n(i)?Me(ue):Me(le,-1)})}var we=h(Ee,2),Ce=d(we),$e=d(Ce);Ne($e,{name:"flask-conical"});var Oe=h(Ce,2),at=d(Oe),wt=h(Oe,2);{var Mt=Me=>{var Ue=Et(),Ye=_e(Ue);ke(Ye,17,()=>n(k),He=>He.id,(He,Xe)=>{var Qe=Vb(),ut=d(Qe),ot=d(ut),it=d(ot),xt=h(ot),et=d(xt),Ve=h(ut,2),gt=d(Ve),_t=h(Ve,2),At=d(_t);let tt;I((Ct,Ht,Ft)=>{se(Qe,"title",n(Xe).file),w(it,n(Xe).name),w(et,Ct),w(gt,Ht),tt=rt(At,"",tt,Ft)},[()=>R(n(Xe).file),()=>o(n(Xe).reaches),()=>({width:`${Math.max(2,Math.round(100*n(Xe).reaches/n(C)))}%`})]),xe("click",Qe,()=>V(n(Xe))),m(He,Qe)},He=>{var Xe=Wb();m(He,Xe)}),m(Me,Ue)},Tt=Me=>{Ka(Me,()=>5)};F(wt,Me=>{n(i)?Me(Mt):Me(Tt,-1)})}var ct=h(we,2),pt=d(ct),Se=d(pt);Ne(Se,{name:"file-code-2"});var Ae=h(pt,4);{var je=Me=>{var Ue=Xb(),Ye=_e(Ue);ke(Ye,17,()=>n(g).top,Qe=>Qe.language,(Qe,ut)=>{var ot=Kb(),it=d(ot),xt=d(it),et=d(xt),Ve=h(it,2),gt=d(Ve),_t=h(Ve,2),At=d(_t);let tt;I((Ct,Ht)=>{w(et,n(ut).language),w(gt,Ct),tt=rt(At,"",tt,Ht)},[()=>o(n(ut).count),()=>({width:`${Math.max(2,Math.round(n(ut).share))}%`})]),m(Qe,ot)});var He=h(Ye,2);{var Xe=Qe=>{var ut=Yb(),ot=d(ut);I(it=>w(ot,`+${n(g).more??""} more language${n(g).more===1?"":"s"} · ${it??""} files`),[()=>o(n(g).moreFiles)]),m(Qe,ut)};F(He,Qe=>{n(g).more>0&&Qe(Xe)})}m(Me,Ue)},Fe=Me=>{Ka(Me,()=>6)};F(Ae,Me=>{n(a)?Me(je):Me(Fe,-1)})}I((Me,Ue,Ye,He)=>{w(N,s()??n(a)?.project.name??"…"),se(ee,"href",Me),se($,"href",Ue),w(De,n(T).kind==="routes"?"Routes":"Where it starts"),w(Ze,Ye),w(at,`${He??""}how many other files each reaches`)},[()=>ua(),()=>ws(),()=>n(T).kind==="routes"?`the URLs a request arrives on · ${n(i)?.frameworks.join(", ")??""}`:"files that run something at their top level",()=>n(i)?`${o(n(i).tests.total)} test files · `:""]),xe("click",ge,()=>dd.requestSearch()),m(e,P),Ke()}St(["click"]);let Ya=he(null),Xa=he("right"),os=he(-1);const Vt={get target(){return n(Ya)},is(e){return e!=null&&n(Ya)===e},set(e){q(Ya,e,!0)},clear(e){(e==null||n(Ya)===e)&&q(Ya,null)}},Gn={get rail(){return n(Xa)},get index(){return n(os)},at(e,t){return n(Xa)===e&&n(os)===t},move(e,t){q(Xa,e,!0),q(os,t,!0)},step(e,t){t!==0&&q(os,Math.max(0,Math.min(t-1,n(os)+e)),!0)},switchTo(e){q(Xa,e,!0),n(os)<0&&q(os,0)},reset(){q(Xa,"right"),q(os,-1)}};var Ub=S(' '),Qb=S('
      '),Jb=S(' '),$b=S('
      Leaves the indexnot followed
      '),ew=S(' '),uf=S(" "),tw=S(' '),nw=S(' '),rw=S(' '),sw=S('
      '),aw=S('
      '),ow=S('
      Uncertain
      '),iw=S(" .",1),lw=S("
      ",1),cw=S("
      "),dw=S('
      Calls
      ',1);function uw(e,t){We(t,!0);let r=Ie(t,"outside",3,null),s=b(()=>{if(!r())return[];const j=new Set,P=[];for(const A of r().samples)A.kind!=="calls"||j.has(A.name)||(j.add(A.name),P.push(A.name));return P.slice(0,8)});function a(j){return j.slice(j.lastIndexOf("/")+1)}function i(j){return`${j.relation.node.qualifiedName} — ${j.relation.node.file}:${j.relation.node.line}`}var o=dw(),l=_e(o),c=d(l),u=d(c),v=d(u),p=d(v);Ne(p,{name:"arrow-right"});var f=h(v,2),g=d(f),_=h(u,2);{var x=j=>{var P=Ub(),A=d(P);I(()=>w(A,`+${t.model.outsideCalls??""} leave the index`)),m(j,P)};F(_,j=>{t.model.outsideCalls>0&&j(x)})}var k=h(c,2);{var C=j=>{var P=Qb(),A=d(P),H=d(A);Ne(H,{name:"info"});var L=h(A,2),E=d(L);I(()=>w(E,t.emptyReason)),m(j,P)};F(k,j=>{t.model.rows.length===0&&t.model.uncertain.length===0&&j(C)})}var T=h(k,2);{var M=j=>{var P=$b(),A=h(d(P),2);ke(A,20,()=>n(s),H=>H,(H,L)=>{var E=Jb(),y=d(E);I(()=>w(y,L)),m(H,E)}),m(j,P)};F(T,j=>{n(s).length>0&&j(M)})}var z=h(l,2);ke(z,19,()=>t.model.rows,j=>j.relation.node.id,(j,P,A)=>{const H=b(()=>n(P).relation.node);var L=sw();let E,y;var O=d(L);Lt(O,{get kind(){return n(H).kind},size:22});var N=h(O,2),B=d(N),W=d(B),Y=h(W);{var J=K=>{var Z=ew(),ce=d(Z);I(()=>w(ce,`×${n(P).lines.length??""}`)),m(K,Z)};F(Y,K=>{n(P).lines.length>1&&K(J)})}var G=h(B,2),ee=d(G),oe=d(ee),ge=h(ee,2);{var U=K=>{var Z=uf(),ce=d(Z);I(te=>w(ce,te),[()=>n(P).words.join(", ")]),m(K,Z)};F(ge,K=>{n(P).words.length>0&&K(U)})}var $=h(ge,2);{var ae=K=>{var Z=tw(),ce=d(Z);I(()=>w(ce,`hub · ${n(P).relation.fanIn??""}`)),m(K,Z)};F($,K=>{n(P).relation.hub&&K(ae)})}var ne=h($,2);{var re=K=>{var Z=nw(),ce=d(Z);I(()=>w(ce,`via ${n(P).via??""}`)),m(K,Z)};F(ne,K=>{n(P).via&&K(re)})}var Q=h(ne,2);ke(Q,16,()=>n(P).when,K=>K,(K,Z)=>{var ce=rw(),te=d(ce);I(()=>w(te,`when ${Z??""}`)),m(K,ce)}),I((K,Z,ce)=>{E=qe(L,1,"rrow svelte-esi3sb",null,E,K),se(L,"data-target",n(H).id),se(L,"title",Z),y=rt(L,"",y,{top:`${t.tops[n(A)]??0}px`}),w(W,n(H).name),w(oe,ce)},[()=>({origin:n(H).id===t.originId,hot:Vt.is(n(H).id),sel:Gn.at("right",n(A)),unplaced:!t.placed}),()=>i(n(P)),()=>`${n(H).file===t.focalFile?"same file":a(n(H).file)}${n(P).anchor!==null?` · :${n(P).anchor}`:""}`]),xe("click",L,()=>t.onstepDown(n(H))),xe("keydown",L,K=>{(K.key==="Enter"||K.key===" ")&&(K.preventDefault(),t.onstepDown(n(H)))}),ft("mouseenter",L,()=>Vt.set(n(H).id)),ft("mouseleave",L,()=>Vt.clear(n(H).id)),m(j,L)});var R=h(z,2);{var D=j=>{var P=ow();let A,H;var L=d(P),E=h(d(L)),y=d(E),O=h(L,2);ke(O,21,()=>t.model.uncertain,N=>N.relation.node.id,(N,B)=>{const W=b(()=>n(B).relation.node);var Y=aw();let J;var G=d(Y);Lt(G,{get kind(){return n(W).kind}});var ee=h(G,2),oe=d(ee),ge=d(oe),U=h(oe,2),$=d(U),ae=d($),ne=h($,2);{var re=Q=>{var K=uf(),Z=d(K);I(()=>w(Z,n(B).relation.confidence)),m(Q,K)};F(ne,Q=>{n(B).relation.confidence!==null&&Q(re)})}I((Q,K)=>{J=qe(Y,1,"rrow static uncertain svelte-esi3sb",null,J,Q),se(Y,"data-target",n(W).id),se(Y,"title",K),w(ge,n(W).name),w(ae,n(W).file)},[()=>({hot:Vt.is(n(W).id)}),()=>i(n(B))]),xe("click",Y,()=>t.onstepDown(n(W))),xe("keydown",Y,Q=>{(Q.key==="Enter"||Q.key===" ")&&(Q.preventDefault(),t.onstepDown(n(W)))}),ft("mouseenter",Y,()=>Vt.set(n(W).id)),ft("mouseleave",Y,()=>Vt.clear(n(W).id)),m(N,Y)}),I(()=>{A=qe(P,1,"rfold svelte-esi3sb",null,A,{unplaced:!t.placed}),H=rt(P,"",H,{top:`${t.foldTop}px`}),w(y,`· ${t.model.uncertain.length??""} name-only match${t.model.uncertain.length===1?"":"es"}, + confidence < 0.6`)}),m(j,P)};F(R,j=>{t.model.uncertain.length>0&&j(D)})}var V=h(R,2);{var X=j=>{var P=Et(),A=_e(P);{var H=L=>{var E=cw();let y,O;var N=d(E);{var B=G=>{var ee=iw(),oe=_e(ee),ge=h(oe);{var U=$=>{var ae=Yt();I(ne=>w(ae,` · + ${ne??""}`),[()=>bt(t.model.outsideTypeRefs,"type reference")]),m($,ae)};F(ge,$=>{t.model.outsideTypeRefs>0&&$(U)})}I($=>w(oe,`+${$??""} into symbols outside the index`),[()=>bt(t.model.outsideCalls,"more call")]),m(G,ee)},W=G=>{var ee=Yt();I(oe=>w(ee,`${oe??""} into symbols outside the index.`),[()=>bt(t.model.outsideTypeRefs,"type reference")]),m(G,ee)};F(N,G=>{t.model.outsideCalls>0?G(B):t.model.outsideTypeRefs>0&&G(W,1)})}var Y=h(N,2);{var J=G=>{var ee=lw(),oe=h(_e(ee));I(()=>w(oe,`+${t.model.hiddenGroups??""} more callee${t.model.hiddenGroups===1?"":"s"} not shown.`)),m(G,ee)};F(Y,G=>{t.model.hiddenGroups>0&&G(J)})}I(()=>{y=qe(E,1,"rnote svelte-esi3sb",null,y,{unplaced:!t.placed}),O=rt(E,"",O,{top:`${t.noteTop}px`})}),m(L,E)};F(A,L=>{(t.model.outsideCalls>0||t.model.outsideTypeRefs>0||t.model.hiddenGroups>0)&&L(H)})}m(j,P)};F(V,j=>{(t.model.rows.length>0||t.model.uncertain.length>0)&&j(X)})}I(()=>w(g,t.model.rows.length)),m(e,o),Ke()}St(["click","keydown"]);var fw=S(''),mc=S('
      '),ff=S(' '),vw=S(' '),hw=S(''),pw=S('
      you came from here
      '),gw=S('
      '),mw=S(''),_w=S('
      '),yw=S('
      Tests
      '),bw=S('
      '),ww=S('
      Uncertain
      '),xw=S('
      Called by
      ',1);function kw(e,t){We(t,!0);let r=Ie(t,"query",3,""),s=b(()=>r().trim()!==""),a=b(()=>t.model.groups.reduce((A,H)=>A+H.rows.length,0)+t.model.tests.rows.length+t.model.uncertain.length);function i(A){return A.kind==="file"?`${wn(A.file)} (top level)`:A.name}function o(A){return`${A.relation.node.qualifiedName} — ${A.relation.node.file}:${A.relation.node.line}`}function l(A,H){let L=0;for(let E=0;E{var H=fw(),L=d(H),E=d(L);Ne(E,{name:"filter"});var y=h(L,2);I(()=>w_(y,r())),xe("input",y,O=>t.onquery?.(O.currentTarget.value)),m(A,H)};F(x,A=>{t.model.total>0&&A(k)})}var C=h(x,2);{var T=A=>{var H=mc(),L=d(H);I(()=>w(L,`Nothing in the graph calls or references this symbol${t.exported?" — it is exported, so callers may live outside the index (or it is an entry point).":"."}`)),m(A,H)},M=A=>{var H=mc(),L=d(H);I(E=>w(L,`No caller matches “${E??""}”.`),[()=>r().trim()]),m(A,H)};F(C,A=>{t.model.total===0?A(T):n(s)&&n(a)===0&&A(M,1)})}var z=h(C,2);ke(z,19,()=>t.model.groups,A=>A.file,(A,H,L)=>{var E=mw(),y=d(E),O=d(y);Ne(O,{name:"folder",size:14});var N=h(O,2),B=d(N),W=h(N,2),Y=d(W),J=h(y,2);ke(J,19,()=>n(H).rows,G=>G.relation.node.id,(G,ee,oe)=>{const ge=b(()=>n(ee).relation.node),U=b(()=>n(ge).id===t.originId);var $=gw();let ae;var ne=d($);Lt(ne,{get kind(){return n(ge).kind},size:22});var re=h(ne,2),Q=d(re),K=d(Q),Z=h(Q,2),ce=d(Z);{var te=de=>{var be=ff(),Ee=d(be);I(Ge=>w(Ee,Ge),[()=>n(ee).words.join(", ")]),m(de,be)};F(ce,de=>{n(ee).words.length>0&&de(te)})}var ie=h(ce,2);ke(ie,16,()=>n(ee).when,de=>de,(de,be)=>{var Ee=vw(),Ge=d(Ee);I(()=>w(Ge,`when ${be??""}`)),m(de,Ee)});var ve=h(ie,2);ke(ve,16,()=>n(ee).lines,de=>de,(de,be)=>{var Ee=hw(),Ge=d(Ee);I(()=>{se(Ee,"title",`Open ${n(ge).name} at line ${be}`),w(Ge,`:${be??""}`)}),xe("click",Ee,me=>{me.stopPropagation(),t.onstepUp(n(ge),be)}),m(de,Ee)});var fe=h(ve,2);{var pe=de=>{var be=ff(),Ee=d(be);I(()=>w(Ee,`via ${n(ee).via??""}`)),m(de,be)};F(fe,de=>{n(ee).via&&de(pe)})}var ye=h(Z,2);{var Pe=de=>{var be=pw(),Ee=d(be);Ne(Ee,{name:"corner-up-left",size:12}),m(de,be)};F(ye,de=>{n(U)&&de(Pe)})}I((de,be,Ee)=>{ae=qe($,1,"row svelte-1g174kh",null,ae,de),se($,"data-target",n(ge).id),se($,"title",be),w(K,Ee)},[()=>({origin:n(U),sel:Gn.at("left",l(n(L),n(oe)))}),()=>o(n(ee)),()=>i(n(ge))]),xe("click",$,()=>t.onstepUp(n(ge))),xe("keydown",$,de=>{(de.key==="Enter"||de.key===" ")&&(de.preventDefault(),t.onstepUp(n(ge)))}),ft("mouseenter",$,()=>Vt.set(n(ge).id)),ft("mouseleave",$,()=>Vt.clear(n(ge).id)),m(G,$)}),I(G=>{se(N,"href",G),se(N,"title",n(H).file),w(B,n(H).same?"same file":n(H).file),w(Y,n(H).rows.length)},[()=>rn(n(H).file)]),m(A,E)});var R=h(z,2);{var D=A=>{var H=yw(),L=d(H),E=d(L),y=d(E);Ne(y,{name:"flask-conical"});var O=h(E,4),N=d(O),B=h(O,2),W=d(B);Ne(W,{name:"chevron-right",size:14});var Y=h(L,2);ke(Y,21,()=>t.model.tests.rows,J=>J.relation.node.id,(J,G)=>{const ee=b(()=>n(G).relation.node);var oe=_w(),ge=d(oe);Lt(ge,{get kind(){return n(ee).kind}});var U=h(ge,2),$=d(U),ae=h(U,2),ne=d(ae);I((re,Q,K)=>{se(oe,"title",re),w($,Q),w(ne,K)},[()=>o(n(G)),()=>i(n(ee)),()=>wn(n(ee).file)]),xe("click",oe,()=>t.onstepUp(n(ee))),xe("keydown",oe,re=>{(re.key==="Enter"||re.key===" ")&&(re.preventDefault(),t.onstepUp(n(ee)))}),ft("mouseenter",oe,()=>Vt.set(n(ee).id)),ft("mouseleave",oe,()=>Vt.clear(n(ee).id)),m(J,oe)}),I((J,G)=>{H.open=n(s)||void 0,w(N,`${J??""} · ${G??""}`)},[()=>bt(t.model.tests.calls,"call"),()=>bt(t.model.tests.files.length,"file")]),m(A,H)};F(R,A=>{t.model.tests.rows.length>0&&A(D)})}var V=h(R,2);{var X=A=>{var H=ww(),L=d(H),E=d(L),y=d(E);Ne(y,{name:"circle-dashed"});var O=h(E,4),N=d(O),B=h(O,2),W=d(B);Ne(W,{name:"chevron-right",size:14});var Y=h(L,2);ke(Y,21,()=>t.model.uncertain,J=>J.relation.node.id,(J,G)=>{const ee=b(()=>n(G).relation.node);var oe=bw(),ge=d(oe);Lt(ge,{get kind(){return n(ee).kind}});var U=h(ge,2),$=d(U),ae=h(U,2),ne=d(ae),re=h(ne);{var Q=K=>{var Z=Yt();I(()=>w(Z,`· ${n(G).relation.confidence??""}`)),m(K,Z)};F(re,K=>{n(G).relation.confidence!==null&&K(Q)})}I((K,Z,ce)=>{se(oe,"title",K),w($,Z),w(ne,ce)},[()=>o(n(G)),()=>i(n(ee)),()=>wn(n(ee).file)]),xe("click",oe,()=>t.onstepUp(n(ee))),xe("keydown",oe,K=>{(K.key==="Enter"||K.key===" ")&&(K.preventDefault(),t.onstepUp(n(ee)))}),ft("mouseenter",oe,()=>Vt.set(n(ee).id)),ft("mouseleave",oe,()=>Vt.clear(n(ee).id)),m(J,oe)}),I(()=>{H.open=n(s)||void 0,w(N,`${t.model.uncertain.length??""} name-only match${t.model.uncertain.length===1?"":"es"} · < 0.6`)}),m(A,H)};F(V,A=>{t.model.uncertain.length>0&&A(X)})}var j=h(V,2);{var P=A=>{var H=mc(),L=d(H);I(()=>w(L,`+${t.model.hiddenGroups??""} more caller${t.model.hiddenGroups===1?"":"s"} not shown — this symbol + has more than the rail lists.`)),m(A,H)};F(j,A=>{t.model.hiddenGroups>0&&A(P)})}I(()=>w(_,t.model.total)),m(e,c),Ke()}St(["input","click","keydown"]);var Sw=Jt(""),Ew=Jt('');function Fp(e,t){We(t,!0);let r=b(()=>{const a=[],i=[];return t.connectors.forEach((o,l)=>{const c={connector:o,key:`${o.targetId}:${l}`};(Vt.is(o.targetId)?i:a).push(c)}),[...a,...i]});var s=Ew();ke(s,21,()=>n(r),({connector:a,key:i})=>i,(a,i)=>{let o=()=>n(i).connector;var l=Sw();let c;I(u=>{se(l,"d",o().d),c=qe(l,0,"svelte-1x7maed",null,c,u)},[()=>({uncertain:o().uncertain,heur:o().heuristic,origin:o().origin,hot:Vt.is(o().targetId)})]),m(a,l)}),I(()=>{se(s,"width",t.width),se(s,"height",t.height),se(s,"viewBox",`0 0 ${t.width} ${t.height}`)}),m(e,s),Ke()}var Mw=S('
      '),Cw=S(''),Tw=S('
      '),Iw=S('
      '),Aw=S('
      What would need re-checking
      '),Nw=S('
      Blast radius
      Direct
      Prod files
      Test files
      ');function zw(e,t){We(t,!0);let r=b(()=>Math.max(1,t.scale?.maxDirect??0,t.blast.direct)),s=b(()=>Math.max(1,t.scale?.maxWithinHops??0,t.blast.withinHops));const a=(J,G)=>J<=0?0:Math.max(.5,Math.min(100,100*J/G));var i=Nw(),o=d(i),l=h(d(o),2),c=d(l),u=h(o,2),v=d(u),p=h(d(v),2),f=d(p),g=h(p,2),_=d(g);let x;var k=h(v,2),C=d(k),T=d(C),M=h(C,2),z=d(M),R=h(M,2),D=d(R);let V;var X=h(k,2),j=h(d(X),2),P=d(j),A=h(X,2),H=h(d(A),2),L=d(H),E=h(H,2),y=d(E);let O;var N=h(u,2);{var B=J=>{var G=Mw(),ee=d(G);I(oe=>w(ee,`${oe??""} within reach`),[()=>bt(t.blast.routes,"route")]),m(J,G)};F(N,J=>{t.blast.routes>0&&J(B)})}var W=h(N,2);{var Y=J=>{var G=Aw(),ee=h(d(G),2),oe=d(ee);ke(oe,17,()=>t.blast.topFiles,ne=>ne.file,(ne,re)=>{var Q=Cw(),K=d(Q);let Z;var ce=d(K),te=h(K,2),ie=d(te);I(ve=>{se(K,"href",ve),Z=qe(K,1,"svelte-149slox",null,Z,{test:n(re).test}),w(ce,n(re).file),w(ie,n(re).symbols)},[()=>rn(n(re).file)]),m(ne,Q)});var ge=h(oe,2);{var U=ne=>{var re=Tw(),Q=d(re);I(()=>w(Q,`+${t.blast.files-t.blast.topFiles.length} more files`)),m(ne,re)};F(ge,ne=>{t.blast.files>t.blast.topFiles.length&&ne(U)})}var $=h(ge,2);{var ae=ne=>{var re=Iw(),Q=d(re);I((K,Z)=>w(Q,`plus ${K??""} from ${Z??""} — the tests that + would catch a regression.`),[()=>bt(t.testCalls,"call"),()=>bt(t.testFiles,"test file")]),m(ne,re)};F($,ne=>{t.testCalls>0&&ne(ae)})}m(J,G)};F(W,J=>{t.blast.topFiles.length>0&&J(Y)})}I((J,G,ee,oe,ge,U,$,ae)=>{se(l,"title",t.scale?.estimated?`Scaled to the widest radius in the index, measured across its ${t.scale.sampled} most-depended-on symbols.`:"Scaled to the widest radius in the index."),w(c,`vs widest ${J??""}`),w(f,G),x=rt(_,"",x,ee),se(k,"title",`Symbols within ${t.blast.hops} hops`),w(T,`≤ ${t.blast.hops??""} hops`),w(z,oe),V=rt(D,"",V,ge),w(P,U),w(L,$),O=rt(y,"",O,ae)},[()=>n(s).toLocaleString(),()=>t.blast.direct.toLocaleString(),()=>({width:`${a(t.blast.direct,n(r))}%`}),()=>t.blast.withinHops.toLocaleString(),()=>({width:`${a(t.blast.withinHops,n(s))}%`}),()=>Math.max(0,t.blast.files-t.blast.testFiles).toLocaleString(),()=>t.blast.testFiles.toLocaleString(),()=>({width:`${a(t.blast.testFiles,Math.max(1,t.blast.files))}%`})]),m(e,i),Ke()}var Pw=S(' '),Lw=S(''),Ow=S('
      '),qw=S('
      Members
      ');function Dw(e,t){We(t,!0);function r(f){return f.relation==="implements"?`Declares a member ${f.baseTypeName} requires — matched by name.`:`Redeclares a member of ${f.baseTypeName} — matched by name.`}var s=qw(),a=d(s),i=d(a),o=d(i);Ne(o,{name:"braces"});var l=h(i,4),c=d(l),u=h(a,2);ke(u,21,()=>t.rows,f=>f.member.id,(f,g)=>{var _=Lw();let x;var k=d(_);Lt(k,{get kind(){return n(g).member.kind},size:20});var C=h(k,2),T=d(C),M=h(C,2),z=d(M);{var R=E=>{var y=Pw(),O=d(y);I(N=>{se(y,"title",N),w(O,`${n(g).member.overrides.relation==="implements"?"satisfies":"overrides"} + ${n(g).member.overrides.baseTypeName??""}`)},[()=>r(n(g).member.overrides)]),m(E,y)};F(z,E=>{n(g).member.overrides&&E(R)})}var D=h(z,1,!0),V=h(M,2),X=d(V);let j;var P=d(X),A=h(X);let H;var L=d(A);I(()=>{x=qe(_,1,"orow svelte-rscx7m",null,x,{nested:n(g).nested,dimmed:n(g).dimmed}),se(_,"title",`${n(g).member.qualifiedName} — ${n(g).member.file}:${n(g).member.line}`),w(T,n(g).member.name),w(D,n(g).member.signature??""),j=qe(X,1,"svelte-rscx7m",null,j,{zero:!n(g).member.fanIn}),w(P,`← ${n(g).member.fanIn??""}`),H=qe(A,1,"svelte-rscx7m",null,H,{zero:!n(g).member.fanOut}),w(L,`→ ${n(g).member.fanOut??""}`)}),xe("click",_,()=>t.onopen(n(g).member)),m(f,_)});var v=h(u,2);{var p=f=>{var g=Ow(),_=d(g);I(()=>w(_,`Showing ${t.rows.length??""} of ${t.total??""} members — open the file to see the rest.`)),m(f,g)};F(v,f=>{t.truncated&&f(p)})}I(()=>w(c,`${t.total??""} · ← in → out`)),m(e,s),Ke()}St(["click"]);const Os=26,Rw=28,Bp=18,ud=20,_c=Bp+ud/2,vf=12;function Hw(e,t){const r=[],s=[...e.ancestors.items].sort((v,p)=>p.depth-v.depth||v.name.localeCompare(p.name));for(const v of s)r.push({entry:v,node:v,side:"ancestor",indent:0,index:r.length,word:v.relation});const a=r.length;r.push({entry:null,node:t,side:"focus",indent:0,index:a,word:""});for(const v of e.descendants.items)r.push({entry:v,node:v,side:"descendant",indent:v.depth*Rw,index:r.length,word:v.relation});const i=new Map(r.filter(v=>v.side!=="ancestor").map(v=>[v.node.id,v])),o=[];for(let v=0;vvf?a+1+vf:null,u=c===null?[]:r.slice(c);return{rows:r,connectors:o,focusIndex:a,foldFrom:c,foldCount:u.length,foldNoun:jw(u.map(v=>v.entry).filter(v=>!!v)),headline:Fw(e,t),note:Bw(e)}}function jw(e){if(e.length===0)return"subtypes";const t=e.filter(r=>r.relation==="implements").length;return t===e.length?"implementations":t===0?"subclasses":"subtypes"}function Fw(e,t){return e.polymorphic?`A call through ${t.name} dispatches to ${e.implementers} implementations — no single static target.`:""}function Bw(e){const t=[];return e.descendants.truncated?t.push(`Showing ${e.descendants.shown} of ${e.descendants.total} subtypes`):e.bounded&&t.push("Deeper subtypes exist below the levels walked"),e.ancestors.truncated&&t.push(`${e.ancestors.total-e.ancestors.shown} more supertypes above`),t.join(" · ")}function Vw(e,t){const r=t||e.foldFrom===null?e.rows.length:e.foldFrom;return{rows:e.rows.slice(0,r),connectors:e.connectors.filter(s=>s.toIndex

      '),Yw=S(' '),Xw=Jt(""),Gw=S('
      '),hf=S(' '),Zw=S(''),Uw=S(''),Qw=S('
      '),Jw=S('
      Type hierarchy supertypes above · subtypes below
      ',1);function $w(e,t){We(t,!0);let r=he(!1),s=b(()=>Hw(t.hierarchy,t.focus)),a=b(()=>Vw(n(s),n(r)));vt(()=>{t.focus.id,q(r,!1)});let i=b(()=>[t.hierarchy.ancestors.total>0?`${t.hierarchy.ancestors.total} above`:"",t.hierarchy.direct>0?`${t.hierarchy.descendants.total} below`:""].filter(Boolean).join(" · "));function o(j){const P=`${j.node.file}:${j.node.line}`;if(!j.entry)return`${j.node.qualifiedName} — ${P}`;const A=j.entry.synthesized?` — matched by ${j.entry.via??"the resolver"}${j.entry.registeredAt?` at ${j.entry.registeredAt}`:""}`:"";return`${j.node.qualifiedName} — ${P}${A}`}var l=Jw(),c=_e(l);{var u=j=>{var P=Kw(),A=d(P),H=d(A);Ne(H,{name:"zap"});var L=h(A,1,!0);I(()=>w(L,n(s).headline)),m(j,P)};F(c,j=>{n(s).headline&&j(u)})}var v=h(c,2),p=d(v),f=d(p),g=d(f);Ne(g,{name:"list-tree"});var _=h(f,4);{var x=j=>{var P=Yw(),A=d(P);I(()=>w(A,n(i))),m(j,P)};F(_,j=>{n(i)&&j(x)})}var k=h(p,2),C=d(k);let T;var M=d(C);ke(M,21,()=>n(a).connectors,Kn,(j,P)=>{var A=Xw();let H;I(L=>{se(A,"d",L),H=qe(A,0,"svelte-1ys4zlw",null,H,{dashed:n(P).relation==="implements",synth:n(P).synthesized})},[()=>Ww(n(P))]),m(j,A)});var z=h(M,2);ke(z,17,()=>n(a).rows,j=>j.node.id+j.side,(j,P)=>{var A=Et(),H=_e(A);{var L=y=>{var O=Gw();let N;var B=d(O),W=d(B);Lt(W,{get kind(){return n(P).node.kind},get size(){return ud}});var Y=h(B,2),J=d(Y);I(()=>{N=rt(O,"",N,{top:`${n(P).index*Os}px`,"padding-left":`${n(P).indent+18}px`}),w(J,n(P).node.name)}),m(y,O)},E=y=>{var O=Zw();let N;var B=d(O);Lt(B,{get kind(){return n(P).node.kind},get size(){return ud}});var W=h(B,2),Y=d(W),J=h(W,2),G=d(J),ee=h(J,2);{var oe=$=>{var ae=hf(),ne=d(ae);I(()=>{se(ae,"title",n(P).entry.registeredAt??""),w(ne,`via ${n(P).entry.via??"resolver"??""}`)}),m($,ae)};F(ee,$=>{n(P).entry?.synthesized&&$(oe)})}var ge=h(ee,2);{var U=$=>{var ae=hf(),ne=d(ae);I(()=>w(ne,`+${n(P).entry.hiddenSubtypes??""} below`)),m($,ae)};F(ge,$=>{n(P).entry&&n(P).entry.hiddenSubtypes>0&&$(U)})}I(($,ae)=>{se(O,"title",$),N=rt(O,"",N,{top:`${n(P).index*Os}px`,"padding-left":`${n(P).indent+18}px`}),w(Y,n(P).node.name),w(G,`${n(P).word??""} · ${ae??""}`)},[()=>o(n(P)),()=>n(P).node.file===t.focus.file?"same file":n(P).node.file.slice(n(P).node.file.lastIndexOf("/")+1)]),xe("click",O,()=>t.onopen(n(P).node)),m(y,O)};F(H,y=>{n(P).side==="focus"?y(L):y(E,-1)})}m(j,A)});var R=h(k,2);{var D=j=>{var P=Uw(),A=d(P);{let L=b(()=>n(r)?"minus":"plus");Ne(A,{get name(){return n(L)}})}var H=h(A,1,!0);I(()=>w(H,n(r)?"Fold":`+${n(s).foldCount} more ${n(s).foldNoun}`)),xe("click",P,()=>q(r,!n(r))),m(j,P)};F(R,j=>{n(s).foldFrom!==null&&j(D)})}var V=h(R,2);{var X=j=>{var P=Qw(),A=d(P);I(()=>w(A,n(s).note)),m(j,P)};F(V,j=>{n(s).note&&j(X)})}I(()=>{T=rt(C,"",T,{height:`${n(a).height}px`}),se(M,"height",n(a).height)}),m(e,l),Ke()}St(["click"]);const e2=new Set(["other","ident","comment","string","keyword","number","type","def"]);function t2(e,t){const r=[];let s=0;for(const[a,i]of e){const o=t[a];r.push({cls:e2.has(o)?o:"other",text:i,col:s}),s+=i.length}return r}function n2(e){const t=[],r=/[A-Za-z_$À-￿][\w$À-￿]*/g;let s=0,a;for(;(a=r.exec(e))!==null;)a.index>s&&t.push({cls:"other",text:e.slice(s,a.index),col:s}),t.push({cls:"ident",text:a[0],col:a.index}),s=a.index+a[0].length;return s=+\-*/&|!?^%~@#$\\'"`]+$/;function nu(e){return e.cls==="type"?"t-t":e.cls==="other"?e.text.trim()!==""&&r2.test(e.text)?"t-p":null:s2(e.cls)}function s2(e){switch(e){case"comment":return"t-c";case"string":return"t-s";case"keyword":return"t-k";case"number":return"t-n";case"def":return"t-def";default:return null}}var a2=S(' '),o2=S('
      '),pf=S('
      '),i2=S(' '),l2=S(' '),c2=S(' '),d2=S(" "),u2=S(""),f2=S('
      '),v2=S(" ",1),h2=S('
      ');function p2(e,t){We(t,!0);let r=Ie(t,"file",3,null),s=b(()=>{const T=t.block.windows[0],M=t.block.windows[t.block.windows.length-1];if(!T||!M)return"";const z=M.start+M.lines.length-1;return`L${T.start}–${z}`}),a=b(()=>{const T=new Set;for(const M of t.refs.values())for(const z of M)z.targetId&&!z.outside&&!z.uncertain&&T.add(z.targetId);return T.size});async function i(){const T=t.block.windows.map(M=>M.lines.join(` +`)).join(` +… +`);try{await navigator.clipboard.writeText(T),Hn.show("Copied the source")}catch{Hn.show("Copy is not available in this browser")}}let o=b(()=>t.block.windows.map((T,M)=>({gapBefore:M===0?0:t.block.gapsAfter[M-1]??0,lines:T.lines.map((z,R)=>{const D=T.start+R,V=t.tokens.get(D)??[{cls:"other",text:z,col:0}],X=t.refs.get(D)??[],j=yl(V,X);return{n:D,parts:l(V,j,D===t.defLine?t.defName:null),port:c(X),targets:[...new Set(X.map(P=>P.targetId).filter(P=>!!P))]}})})));function l(T,M,z){return T.map((R,D)=>{const V=M.get(D)??null;return{text:R.text,cls:V?null:nu(R),ref:V,def:!V&&z!==null&&R.text===z&&R.cls!=="comment"&&R.cls!=="string"}})}function c(T){return T.length===0?null:T.some(M=>!M.uncertain&&!M.outside)?"sure":"unsure"}function u(T){return T.n===t.highlight||T.targets.some(M=>Vt.is(M))}let v=b(()=>n(o).reduce((T,M)=>T+M.lines.filter(z=>u(z)).length,0));var p=h2(),f=d(p);{var g=T=>{var M=o2(),z=d(M),R=d(z);Ne(R,{name:"file-code-2"});var D=h(z,2),V=d(D),X=h(D,2),j=d(X),P=h(X,4);{var A=E=>{var y=a2(),O=d(y),N=h(O);{var B=W=>{var Y=Yt();I(()=>w(Y,`· ${n(v)??""} hot`)),m(W,Y)};F(N,W=>{n(v)>0&&W(B)})}I(()=>w(O,`${n(a)??""} call${n(a)===1?"":"s"}`)),m(E,y)};F(P,E=>{n(a)>0&&E(A)})}var H=h(P,2),L=d(H);Ne(L,{name:"copy"}),I(E=>{w(V,E),w(j,n(s))},[()=>r().slice(r().lastIndexOf("/")+1)]),xe("click",H,i),m(T,M)};F(f,T=>{r()&&T(g)})}var _=h(f,2),x=d(_);ke(x,17,()=>n(o),T=>T.lines[0]?.n??-1,(T,M)=>{var z=v2(),R=_e(z);{var D=X=>{var j=pf(),P=d(j);I(()=>w(P,`⋯ ${n(M).gapBefore??""} lines without calls`)),m(X,j)};F(R,X=>{n(M).gapBefore>0&&X(D)})}var V=h(R,2);ke(V,17,()=>n(M).lines,X=>X.n,(X,j)=>{var P=f2();let A;var H=d(P),L=d(H),E=h(H,2);ke(E,21,()=>n(j).parts,Kn,(B,W)=>{var Y=Et(),J=_e(Y);{var G=$=>{const ae=b(()=>n(W).ref);var ne=i2();let re;var Q=d(ne);I(K=>{re=qe(ne,1,"ref svelte-ikg4h3",null,re,K),se(ne,"title",n(ae).title),w(Q,n(W).text)},[()=>({uncertain:n(ae).uncertain,hot:Vt.is(n(ae).targetId)})]),xe("click",ne,()=>t.onfollow(n(ae),n(j).n)),xe("keydown",ne,K=>{(K.key==="Enter"||K.key===" ")&&(K.preventDefault(),t.onfollow(n(ae),n(j).n))}),ft("mouseenter",ne,()=>Vt.set(n(ae).targetId)),ft("mouseleave",ne,()=>Vt.clear(n(ae).targetId)),m($,ne)},ee=$=>{var ae=l2(),ne=d(ae);I(()=>{se(ae,"title",n(W).ref.title),w(ne,n(W).text)}),m($,ae)},oe=$=>{var ae=c2(),ne=d(ae);I(()=>w(ne,n(W).text)),m($,ae)},ge=$=>{var ae=d2(),ne=d(ae);I(()=>{qe(ae,1,bs(n(W).cls),"svelte-ikg4h3"),w(ne,n(W).text)}),m($,ae)},U=$=>{var ae=Yt();I(()=>w(ae,n(W).text)),m($,ae)};F(J,$=>{n(W).ref&&!n(W).ref.outside?$(G):n(W).ref?$(ee,1):n(W).def?$(oe,2):n(W).cls?$(ge,3):$(U,-1)})}m(B,Y)});var y=h(E,2),O=d(y);{var N=B=>{var W=u2();let Y;I(()=>Y=qe(W,1,"svelte-ikg4h3",null,Y,{sure:n(j).port==="sure"})),m(B,W)};F(O,B=>{n(j).port&&B(N)})}I(B=>{A=qe(P,1,"ln svelte-ikg4h3",null,A,B),se(P,"data-line",n(j).n),w(L,n(j).n)},[()=>({hot:u(n(j))})]),m(X,P)}),m(T,z)});var k=h(x,2);{var C=T=>{var M=pf(),z=d(M);I(()=>w(z,`⋯ ${t.block.tailGap??""} more lines`)),m(T,M)};F(k,T=>{t.block.tailGap>0&&T(C)})}m(e,p),Ke()}St(["click","keydown"]);var g2=S(' ',1),m2=S('',1),_2=S(' '),y2=S(''),b2=S(' '),w2=S(' '),x2=S(' '),k2=S(' '),S2=S('
      '),E2=S('
      '),M2=S(' ',1),C2=S(''),gf=S(''),T2=S(' '),I2=S(' '),A2=S('uses types '),N2=S('
      '),z2=S('

      ',1);function P2(e,t){We(t,!0);let r=Ie(t,"relationChips",3,!0),s=Ie(t,"signature",3,!0),a=b(()=>t.payload.node),i=b(()=>t.payload.tests),o=b(()=>{const de=n(a).file.split("/"),be=t.payload.ancestors.filter(Ee=>Ee.kind!=="file");return{dirs:de.slice(0,-1),file:de[de.length-1]??n(a).file,owners:be}}),l=b(()=>r()?t.payload.outgoing.items.filter(de=>de.edgeKinds.some(be=>be==="extends"||be==="implements")):[]),c=b(()=>r()?t.payload.incoming.items.filter(de=>de.edgeKinds.some(be=>be==="extends"||be==="implements")):[]);const u=12;let v=b(()=>t.payload.typesUsed.slice(0,u));function p(de){return de.edgeKinds.includes("implements")?"implements":"extends"}let f=b(()=>{const de=[n(a).kind==="type_alias"?"type":Xd(n(a).kind)];return n(a).async&&de.push("async"),n(a).static&&de.push("static"),n(a).abstract&&de.push("abstract"),n(a).visibility&&n(a).visibility!=="public"&&de.push(n(a).visibility),(n(a).language==="rust"?n(a).exported||n(a).visibility==="public":n(a).exported)&&de.push(n(a).language==="rust"?"pub":"exported"),de}),g=b(()=>n(i).reached?{warn:!1,text:`Tests reach · ${bt(n(i).fileCount,"file")}`,title:`Reached by tests within ${n(i).hopsSearched} hop${n(i).hopsSearched===1?"":"s"}: ${n(i).files.join(", ")}`}:{warn:!0,text:n(i).exhaustive?`No test reaches this within ${n(i).hopsSearched} caller hops`:"No test calls this directly",title:n(i).exhaustive?"No test file reaches this symbol within the caller hops searched.":"The caller search ran out of budget — only direct callers were checked."}),_=he(null),x=he(!1),k=he(!1);vt(()=>{const de=n(_);if(n(a).name,!de)return;const be=()=>q(x,de.scrollWidth>de.clientWidth+1);be();const Ee=new ResizeObserver(be);return Ee.observe(de),document.fonts?.ready.then(be),()=>Ee.disconnect()});async function C(){const de=n(a).qualifiedName||n(a).name;try{await navigator.clipboard.writeText(de),Hn.show(`Copied · ${de}`)}catch{Hn.show("Copy is not available in this browser")}}var T=z2(),M=_e(T),z=d(M);ke(z,17,()=>n(o).dirs,Kn,(de,be)=>{var Ee=g2(),Ge=_e(Ee),me=d(Ge),ze=h(Ge),De=d(ze);Ne(De,{name:"chevron-right",size:12}),I(()=>w(me,n(be))),m(de,Ee)});var R=h(z),D=d(R),V=h(R);ke(V,17,()=>n(o).owners,de=>de.id,(de,be)=>{var Ee=m2(),Ge=_e(Ee),me=d(Ge);Ne(me,{name:"chevron-right",size:12});var ze=h(Ge),De=d(ze);I(()=>w(De,n(be).name)),xe("click",ze,()=>t.onopen(n(be))),m(de,Ee)});var X=h(M,2),j=d(X);Lt(j,{get kind(){return n(a).kind},titled:!0,size:28});var P=h(j,2),A=d(P);Ut(P,de=>q(_,de),()=>n(_));var H=h(P,2);ke(H,20,()=>n(f),de=>de,(de,be)=>{var Ee=_2(),Ge=d(Ee);I(()=>w(Ge,be)),m(de,Ee)});var L=h(H,2),E=d(L),y=d(E);Ne(y,{name:"copy"});var O=h(E,2),N=d(O);Ne(N,{name:"external-link"});var B=h(L,2);{var W=de=>{var be=y2(),Ee=d(be);I(()=>w(Ee,n(a).qualifiedName||n(a).name)),m(de,be)};F(B,de=>{n(k)&&de(W)})}var Y=h(X,2),J=d(Y);{var G=de=>{var be=b2(),Ee=d(be);Ne(Ee,{name:"layers",size:14});var Ge=h(Ee);I(me=>w(Ge,`Polymorphic · ${me??""}`),[()=>bt(t.payload.hierarchy.implementers,"implementation")]),m(de,be)};F(J,de=>{t.payload.hierarchy?.polymorphic&&de(G)})}var ee=h(J,2);{var oe=de=>{var be=w2(),Ee=d(be);Ne(Ee,{name:"list-tree",size:14});var Ge=h(Ee,1,!0);I(me=>w(Ge,me),[()=>bt(t.payload.members.total,"member")]),m(de,be)};F(ee,de=>{t.payload.members.total>0&&de(oe)})}var ge=h(ee,2);{var U=de=>{var be=x2(),Ee=d(be);Ne(Ee,{name:"zap",size:14});var Ge=h(Ee);I(me=>w(Ge,`Hub · ${me??""}`),[()=>bt(t.payload.counts.callers,"caller")]),m(de,be)};F(ge,de=>{t.payload.counts.hub&&de(U)})}var $=h(ge,2);{var ae=de=>{var be=k2(),Ee=d(be);Ne(Ee,{name:"arrow-right",size:14});var Ge=h(Ee,1,!0);I(me=>w(Ge,me),[()=>bt(t.payload.counts.callees,"callee")]),m(de,be)};F($,de=>{t.payload.counts.callees>0&&de(ae)})}var ne=h($,2);let re;var Q=d(ne);{let de=b(()=>n(g).warn?"triangle-alert":"flask-conical");Ne(Q,{get name(){return n(de)},size:14})}var K=h(Q,1,!0),Z=h(ne,2),ce=d(Z);Ne(ce,{name:"file-code-2",size:14});var te=h(ce),ie=h(Y,2);{var ve=de=>{var be=S2(),Ee=d(be);I(()=>w(Ee,`${n(a).name??""}${n(a).signature??""}`)),m(de,be)};F(ie,de=>{s()&&n(a).signature&&de(ve)})}var fe=h(ie,2);{var pe=de=>{var be=E2(),Ee=d(be);I(()=>w(Ee,n(a).docstring)),m(de,be)};F(fe,de=>{n(a).docstring&&de(pe)})}var ye=h(fe,2);{var Pe=de=>{var be=N2(),Ee=d(be);{var Ge=Ze=>{var Re=C2();ke(Re,21,()=>n(l),ue=>ue.node.id,(ue,le)=>{var we=M2(),Ce=_e(we),$e=h(Ce),Oe=d($e);I(at=>{w(Ce,`${at??""} `),w(Oe,n(le).node.name)},[()=>p(n(le))]),xe("click",$e,()=>t.onopen(n(le).node)),m(ue,we)}),m(Ze,Re)};F(Ee,Ze=>{n(l).length>0&&Ze(Ge)})}var me=h(Ee,2);{var ze=Ze=>{var Re=T2(),ue=d(Re),le=h(ue);ke(le,17,()=>n(c),we=>we.node.id,(we,Ce)=>{var $e=gf(),Oe=d($e);I(()=>w(Oe,n(Ce).node.name)),xe("click",$e,()=>t.onopen(n(Ce).node)),m(we,$e)}),I(we=>w(ue,`${we??""} `),[()=>n(c)[0]?.edgeKinds.includes("implements")?"implemented by":"extended by"]),m(Ze,Re)};F(me,Ze=>{n(c).length>0&&Ze(ze)})}var De=h(me,2);{var Le=Ze=>{var Re=A2(),ue=h(d(Re));ke(ue,17,()=>n(v),Ce=>Ce.node.id,(Ce,$e)=>{var Oe=gf(),at=d(Oe);I(()=>w(at,n($e).node.name)),xe("click",Oe,()=>t.onopen(n($e).node)),m(Ce,Oe)});var le=h(ue,2);{var we=Ce=>{var $e=I2(),Oe=d($e);I(()=>w(Oe,`+${t.payload.typesUsed.length-u}`)),m(Ce,$e)};F(le,Ce=>{t.payload.typesUsed.length>u&&Ce(we)})}m(Ze,Re)};F(De,Ze=>{n(v).length>0&&Ze(Le)})}m(de,be)};F(ye,de=>{(n(l).length>0||n(c).length>0||n(v).length>0)&&de(Pe)})}I((de,be,Ee)=>{se(R,"href",de),w(D,n(o).file),se(P,"tabindex",n(x)?0:void 0),se(P,"aria-describedby",n(k)?"symbol-fullname":void 0),w(A,n(a).name),se(O,"href",be),re=qe(ne,1,"pill",null,re,{green:!n(g).warn,amber:n(g).warn}),se(ne,"title",n(g).title),w(K,n(g).text),w(te,`${Ee??""} · ${n(a).line??""}–${n(a).endLine??""}`)},[()=>rn(n(a).file,{line:n(a).line}),()=>rn(n(a).file,{line:n(a).line}),()=>bt(n(a).lines,"line")]),ft("mouseenter",P,()=>q(k,n(x),!0)),ft("mouseleave",P,()=>q(k,!1)),ft("focus",P,()=>q(k,n(x),!0)),ft("blur",P,()=>q(k,!1)),xe("click",E,C),m(e,T),Ke()}St(["click"]);var L2=S('
      changed on disk after the last index sync —
      ');function Vi(e,t){var r=L2(),s=d(r),a=d(s);Ne(a,{name:"triangle-alert"});var i=h(s,2),o=d(i),l=d(o),c=h(o,2);Fn(c,()=>t.children),I(()=>w(l,t.file)),m(e,r)}var O2=S('

      '),q2=S(' ',1),D2=S(''),R2=S('
      '),H2=S('');function ru(e,t){We(t,!0);let r=Ie(t,"guidance",3,null),s=Ie(t,"onretry",3,null),a=b(()=>{if(!r())return null;const T=r().match(/`(codegraph[^`]*)`|\b(codegraph (?:init|sync|index)[^.;\n]*)/);return(T?.[1]??T?.[2]??"").trim()||null});async function i(T){try{await navigator.clipboard.writeText(T),Hn.show(`Copied · ${T}`)}catch{Hn.show("Copy is not available in this browser")}}var o=H2(),l=d(o),c=d(l);Ne(c,{name:"circle-x",size:20});var u=h(l,2),v=d(u),p=d(v),f=h(v,2),g=d(f),_=h(f,2);{var x=T=>{var M=O2(),z=d(M);I(()=>w(z,r())),m(T,M)};F(_,T=>{r()&&T(x)})}var k=h(_,2);{var C=T=>{var M=R2(),z=d(M);{var R=X=>{var j=q2(),P=_e(j),A=d(P),H=h(P,2),L=d(H);Ne(L,{name:"copy"}),I(()=>w(A,n(a))),xe("click",H,()=>i(n(a))),m(X,j)};F(z,X=>{n(a)&&X(R)})}var D=h(z,2);{var V=X=>{var j=D2(),P=d(j);Ne(P,{name:"refresh-cw"}),xe("click",j,()=>s()?.()),m(X,j)};F(D,X=>{s()&&X(V)})}m(T,M)};F(k,T=>{(n(a)||s())&&T(C)})}I(()=>{w(p,t.title),w(g,t.message)}),m(e,o),Ke()}St(["click"]);var j2=S('
      '),mf=S('
      '),_f=S(''),F2=S('
      Reading the symbol from the index…
      '),B2=S('
      '),V2=S(''),W2=S(`indexed line ranges may be shifted, and the file is too long to stand in for + this symbol's body here — open its current source. + The next sync picks it up.`,1),K2=S(''),Y2=S('
      Confidence resolved name-only < 0.6 synthesized
      '),X2=S(" ",1),G2=S('
      '),Z2=S('
      '),U2=S('
      ',1),Q2=S(' ',1),J2=S('
      ',1);function $2(e,t){We(t,!0);const r=52,s=11,a=12,i=400,o=new Map;let l=he(null),c=he(!1),u=he(null),v=he(null),p=he(!0),f=he(null),g=he(null),_=he(null),x=he(null),k=he(gn([])),C=he(0),T=he(0),M=he(0),z=he(gn([])),R=he(gn({width:0,height:0})),D=he(!1),V=he(""),X=he(!1),j=he("code");vt(()=>{const me=t.id,ze=new AbortController;return nn(()=>A(me,ze.signal)),()=>ze.abort()});let P=null;$d(()=>n(l)?.node.file??null,()=>{const me=t.id;P?.abort(),P=new AbortController,A(me,P.signal,!0)});async function A(me,ze,De=!1){De||(q(p,!0),q(v,null),q(l,null),q(u,null),q(c,!1),Gn.reset(),Vt.set(null),q(D,!1),q(V,""),q(X,!1),q(j,"code"),q(K,null)),Qn.ensure();let Le;try{Le=await J_(me,ze)}catch(Ze){if(ze.aborted)return;if(De&&L(Ze).code==="not-found"&&n(l)!==null){const Re=await H(n(l).node,ze);if(ze.aborted)return;if(Re!==null){Wt.rename(me,Re),jt(pn(Re.id,{trail:Qr(Wt.hops)}),{replace:!0});return}}q(v,L(Ze),!0),q(p,!1);return}if(!ze.aborted){if(q(l,Le,!0),q(v,null),q(p,!1),Wt.resolve(me,{name:Le.node.name,kind:Le.node.kind}),!Qu(Le.node.kind,Le.node.lines)){q(u,null);return}try{De||q(c,!0);const Ze=Le.drift?await td(Le.node.file,1,0,ze,"current"):await td(Le.node.file,Le.node.line,Le.node.endLine,ze);ze.aborted||q(u,Ze,!0)}catch{ze.aborted||q(u,null)}finally{ze.aborted||q(c,!1)}}}async function H(me,ze){try{const Le=(await _p(me.file,ze)).outline.items.filter(Ze=>Ze.name===me.name&&Ze.kind===me.kind);return Le.length===0?null:Le.reduce((Ze,Re)=>Math.abs(Re.line-me.line)n(l)?k0(n(l)):null),y=b(()=>n(E)?S0(n(E),n(V)):null),O=b(()=>n(l)?x0(n(l)):null),N=b(()=>n(l)?y0(n(l)):new Map),B=b(()=>n(l)?M0(n(l)):[]),W=b(()=>n(l)?Qu(n(l).node.kind,n(l).node.lines):!1),Y=b(()=>n(u)?.showing==="current"),J=b(()=>n(l)?.drift===!0&&(n(u)===null||(n(u).totalLines??0)>i)),G=b(()=>{if(!n(l)||!n(u)?.lines)return null;if(n(Y))return n(J)?null:Uu(n(u).from??1,n(u).lines,[]);const me=n(u).from??n(l).node.line;return Uu(me,n(u).lines,b0(n(l)))}),ee=b(()=>n(u)?.lines?bl(n(u).lines,n(u).from??1,n(u).highlight):new Map),oe=b(ly),ge=b(()=>n(oe)?.rail==="left"?n(oe).id:null),U=b(()=>n(oe)?.rail==="right"?n(oe).id:null),$=b(()=>n(l)?n(W)?"This symbol makes no resolved calls — a leaf.":`A ${n(l).node.kind.replace(/_/g," ")} makes no calls itself — its members do. Open one from the outline.`:"");function ae(me){gr(me,"down")}function ne(me,ze){gr(me,"up",ze)}function re(me){gr(me,"start")}function Q(me,ze){if(!me.targetId)return;if(globalThis.matchMedia?.("(max-width: 599px)").matches){const Le=(n(O)?.rows??[]).filter(Ze=>Ze.lines.includes(ze));if(Le.length>0){q(K,{line:ze,rows:Le},!0);return}}const De=n(l)?.outgoing.items.find(Le=>Le.node.id===me.targetId)?.node??n(l)?.typesUsed.find(Le=>Le.node.id===me.targetId)?.node;De&&gr(De,"down")}let K=he(null);function Z(){return(n(y)?.groups??[]).flatMap(me=>me.rows.map(ze=>ze.relation.node))}function ce(){return(n(O)?.rows??[]).map(me=>me.relation.node)}function te(){return Gn.rail==="left"?Z():ce()}function ie(me){if(me.defaultPrevented||me.metaKey||me.ctrlKey||me.altKey)return;const ze=me.target;if(!(ze instanceof HTMLElement&&(ze.isContentEditable||ze instanceof HTMLInputElement||ze instanceof HTMLTextAreaElement||ze instanceof HTMLSelectElement))&&n(l)){switch(me.key){case"ArrowLeft":Gn.switchTo("left");break;case"ArrowRight":Gn.switchTo("right");break;case"ArrowDown":case"j":Gn.step(1,te().length);break;case"ArrowUp":case"k":Gn.step(-1,te().length);break;case"Enter":{const De=te()[Gn.index];De&&(me.preventDefault(),Gn.rail==="left"?ne(De):ae(De));return}default:return}me.preventDefault(),Ri().then(()=>{(Gn.rail==="left"?n(x):n(_))?.querySelectorAll('[role="button"]')[Gn.index]?.scrollIntoView({block:"nearest"})})}}function ve(){const me=n(f),ze=n(g),De=n(_),Le=n(O)?.rows??[];if(!me||!ze||!De)return;const Ze=De.querySelector("[data-rail-header]")?.offsetHeight??r,Re=!n(Y),ue=Se=>{if(!Re)return null;const Ae=ze.querySelector(`[data-line="${Se}"]`);return Ae?Ae.offsetTop+Ae.offsetHeight/2:null},le=Ze+12,we=E0(Le.map(Se=>Se.anchor!==null?ue(Se.anchor):null),le),Ce=we.map(Se=>Se+Hi/2);let $e=we.length>0?we[we.length-1]+Hi+xp:le;const Oe=$e+8;if((n(O)?.uncertain.length??0)>0){const Se=De.querySelector("[data-rail-fold]");$e=Oe+(Se?.offsetHeight??30)}const at=$e+14;q(k,we,!0),q(C,Oe),q(T,at),q(M,Math.max(ze.offsetHeight,at+60),!0);const wt=ze.querySelector("[data-code-card]"),Mt=wt?wt.offsetLeft+wt.offsetWidth-s:ze.offsetLeft+ze.offsetWidth-s,Tt=De.offsetLeft+a,ct=(Mt+Tt)/2,pt=[];Le.forEach((Se,Ae)=>{const je=Ce[Ae];if(je==null)return;const Fe=Fo(Se.relation);for(const Me of Se.lines){const Ue=ue(Me);Ue!==null&&pt.push({d:`M${Mt},${Ue} C${ct},${Ue} ${ct},${je} ${Tt},${je}`,targetId:Se.relation.node.id,uncertain:Se.relation.uncertain,heuristic:Fe!==null,origin:Se.relation.node.id===n(U)})}}),q(z,pt,!0),q(R,{width:me.scrollWidth,height:Math.max(me.offsetHeight,n(M))},!0),q(D,!0)}let fe=!1;function pe(){fe||(fe=!0,requestAnimationFrame(()=>{fe=!1,ve()}))}vt(()=>{n(G),n(O),n(B),n(l),Ri().then(pe)}),vt(()=>{const me=n(f),ze=n(g),De=n(_);if(!me||!ze||!De)return;const Le=new ResizeObserver(pe);return Le.observe(me),Le.observe(ze),Le.observe(De),me.addEventListener("toggle",pe,!0),document.fonts?.ready.then(pe),()=>{Le.disconnect(),me.removeEventListener("toggle",pe,!0)}});let ye=null;vt(()=>{const me=t.line===null?null:`${t.id}:${t.line}`,ze=n(g);if(!me||!ze||!n(G)||ye===me)return;const De=ze.querySelector(`[data-line="${t.line}"]`);De&&(ye=me,De.scrollIntoView({block:"center"}))});var Pe=Et();ft("keydown",cn,ie);var de=_e(Pe);{var be=me=>{var ze=j2(),De=d(ze);{let Le=b(()=>n(v).code==="not-found"?"No such symbol":"Could not load this symbol"),Ze=b(()=>n(v).code==="not-found"?null:()=>{const Re=new AbortController;A(t.id,Re.signal)});ru(De,{get title(){return n(Le)},get message(){return n(v).message},get guidance(){return n(v).guidance},get onretry(){return n(Ze)}})}m(me,ze)},Ee=me=>{var ze=F2(),De=d(ze),Le=d(De),Ze=d(Le);rt(Ze,"",{},{width:"96px"});var Re=h(Le,2);ke(Re,16,()=>[0,1,2,3],Se=>Se,(Se,Ae)=>{var je=mf(),Fe=h(d(je));let Me;I(()=>Me=rt(Fe,"",Me,{width:`${120+Ae*37%60}px`})),m(Se,je)});var ue=h(De,2),le=d(ue),we=d(le),Ce=d(we),$e=d(Ce);Ne($e,{name:"refresh-cw",size:14});var Oe=h(Ce,2),at=h(d(Oe));rt(at,"",{},{width:"280px",height:"18px"});var wt=h(Oe,2);ke(wt,20,()=>[0,1,2,3,4,5,6,7,8,9],Se=>Se,(Se,Ae)=>{var je=_f();let Fe;I(()=>Fe=rt(je,"",Fe,{width:`${30+Ae*53%55}%`})),m(Se,je)});var Mt=h(we,2),Tt=d(Mt),ct=d(Tt);rt(ct,"",{},{width:"64px"});var pt=h(Tt,2);ke(pt,16,()=>[0,1,2],Se=>Se,(Se,Ae)=>{var je=mf(),Fe=h(d(je));let Me;I(()=>Me=rt(Fe,"",Me,{width:`${110+Ae*20}px`})),m(Se,je)}),m(me,ze)},Ge=me=>{var ze=J2(),De=_e(ze),Le=d(De);let Ze;var Re=h(Le,2);let ue;var le=d(Re),we=h(Re,2);let Ce;var $e=d(we),Oe=h(De,2);let at;var wt=d(Oe),Mt=d(wt),Tt=d(Mt);{let lt=b(()=>n(l).node.exported===!0);kw(Tt,{get model(){return n(y)},get query(){return n(V)},onquery:Xt=>q(V,Xt,!0),get originId(){return n(ge)},get exported(){return n(lt)},onstepUp:ne})}var ct=h(Mt,2);{var pt=lt=>{var Xt=B2(),un=d(Xt);{let Mn=b(()=>Qn.stats?.blastScale??null);zw(un,{get blast(){return n(l).blast},get scale(){return n(Mn)},get testCalls(){return n(E).tests.calls},get testFiles(){return n(E).tests.files.length}})}m(lt,Xt)};F(ct,lt=>{n(l).blast&<(pt)})}Ut(wt,lt=>q(x,lt),()=>n(x));var Se=h(wt,2);{var Ae=lt=>{var Xt=V2();xe("click",Xt,()=>q(X,!1)),m(lt,Xt)};F(Se,lt=>{n(X)&<(Ae)})}var je=h(Se,2),Fe=d(je);let Me;var Ue=d(Fe);Fp(Ue,{get connectors(){return n(z)},get width(){return n(R).width},get height(){return n(R).height}});var Ye=h(Ue,2),He=d(Ye),Xe=d(He);Ne(Xe,{name:"corner-down-right"});var Qe=h(Xe),ut=h(He,2);{let lt=b(()=>!n(l).hierarchy),Xt=b(()=>!n(G));P2(ut,{get payload(){return n(l)},onopen:re,get relationChips(){return n(lt)},get signature(){return n(Xt)}})}var ot=h(ut,2);{var it=lt=>{var Xt=K2(),un=d(Xt);Vi(un,{get file(){return n(l).node.file},children:(Mn,Xn)=>{var xn=Et(),Bn=_e(xn);{var ar=dt=>{var kt=W2(),Pt=h(_e(kt));I(Be=>se(Pt,"href",Be),[()=>rn(n(l).node.file,{source:!0})]),m(dt,kt)},Fr=dt=>{var kt=Yt(`indexed line ranges may be shifted; showing the file's current source. The next + sync picks it up.`);m(dt,kt)};F(Bn,dt=>{n(J)?dt(ar):dt(Fr,-1)})}m(Mn,xn)}}),m(lt,Xt)};F(ot,lt=>{n(l).drift&<(it)})}var xt=h(ot,2);{var et=lt=>{$w(lt,{get hierarchy(){return n(l).hierarchy},get focus(){return n(l).node},onopen:re})};F(xt,lt=>{n(l).hierarchy&<(et)})}var Ve=h(xt,2);{var gt=lt=>{var Xt=X2(),un=_e(Xt);{let xn=b(()=>n(Y)?o:n(N)),Bn=b(()=>n(Y)?-1:n(l).node.line),ar=b(()=>n(Y)?"":n(l).node.name),Fr=b(()=>n(Y)?null:t.line);p2(un,{get block(){return n(G)},get tokens(){return n(ee)},get refs(){return n(xn)},get defLine(){return n(Bn)},get defName(){return n(ar)},get highlight(){return n(Fr)},onfollow:Q,get file(){return n(l).node.file}})}var Mn=h(un,2);{var Xn=xn=>{var Bn=Y2();m(xn,Bn)};F(Mn,xn=>{n(Y)||xn(Xn)})}m(lt,Xt)},_t=lt=>{var Xt=G2();ke(Xt,20,()=>[0,1,2,3,4,5,6,7],un=>un,(un,Mn)=>{var Xn=_f();let xn;I(()=>xn=rt(Xn,"",xn,{width:`${30+Mn*53%55}%`})),m(un,Xn)}),m(lt,Xt)},At=lt=>{},tt=lt=>{},Ct=lt=>{var Xt=Z2(),un=d(Xt);I(()=>w(un,n(u).reason??"Source is not available for this symbol.")),m(lt,Xt)};F(Ve,lt=>{n(G)?lt(gt):n(c)&&n(W)?lt(_t,1):n(l).drift?lt(At,2):n(W)?n(u)&<(Ct,4):lt(tt,3)})}var Ht=h(Ve,2);{var Ft=lt=>{Dw(lt,{get rows(){return n(B)},get total(){return n(l).members.total},get truncated(){return n(l).members.truncated},onopen:re})};F(Ht,lt=>{n(B).length>0&<(Ft)})}Ut(Ye,lt=>q(g,lt),()=>n(g));var Qt=h(Ye,2),sn=d(Qt);uw(sn,{get model(){return n(O)},get tops(){return n(k)},get foldTop(){return n(C)},get noteTop(){return n(T)},get placed(){return n(D)},get focalFile(){return n(l).node.file},get originId(){return n(U)},get emptyReason(){return n($)},get outside(){return n(l).outsideIndex},onstepDown:ae}),Ut(Qt,lt=>q(_,lt),()=>n(_)),Ut(Fe,lt=>q(f,lt),()=>n(f));var ln=h(Oe,2);{var br=lt=>{var Xt=Q2(),un=_e(Xt),Mn=h(un,2),Xn=h(d(Mn),2),xn=d(Xn),Bn=h(Xn,2);ke(Bn,17,()=>n(K).rows,ar=>ar.relation.node.id,(ar,Fr)=>{const dt=b(()=>n(Fr).relation.node);var kt=U2(),Pt=_e(kt),Be=d(Pt);Lt(Be,{get kind(){return n(dt).kind},size:22});var Te=h(Be,2),st=d(Te),Bt=d(st),Nt=h(st,2),Zt=d(Nt),an=h(Pt,2),fn=d(an),Nn=d(fn);Ne(Nn,{name:"external-link"});var Cn=h(fn,2),or=d(Cn);Ne(or,{name:"workflow"}),I(()=>{w(Bt,n(dt).name),w(Zt,`${(n(dt).file===n(l).node.file?"same file":n(dt).file)??""} · defined at line ${n(dt).line??""}`)}),xe("click",fn,()=>{q(K,null),ae(n(dt))}),xe("click",Cn,()=>{q(K,null),jt(ws({from:n(l)?.node.name??"",to:n(dt).name}))}),m(ar,kt)}),I(()=>{se(Mn,"aria-label",`Calls on line ${n(K).line}`),w(xn,`Calls on line ${n(K).line??""}`)}),xe("click",un,()=>q(K,null)),m(lt,Xt)};F(ln,lt=>{n(K)&<(br)})}I(()=>{se(Le,"aria-selected",n(j)==="code"),Ze=qe(Le,1,"svelte-1cxnzx",null,Ze,{on:n(j)==="code"}),se(Re,"aria-selected",n(j)==="callers"),ue=qe(Re,1,"svelte-1cxnzx",null,ue,{on:n(j)==="callers"}),w(le,`Called by ${n(E).total??""}`),se(we,"aria-selected",n(j)==="calls"),Ce=qe(we,1,"svelte-1cxnzx",null,Ce,{on:n(j)==="calls"}),w($e,`Calls ${n(O).rows.length??""}`),at=qe(Oe,1,`focus pane-${n(j)??""}`,"svelte-1cxnzx",at,{"callers-open":n(X)}),Me=rt(Fe,"",Me,{"min-height":`${n(M)}px`}),se(He,"aria-expanded",n(X)),w(Qe,`Called by ${n(E).total??""}`)}),xe("click",Le,()=>q(j,"code")),xe("click",Re,()=>q(j,"callers")),xe("click",we,()=>q(j,"calls")),xe("click",He,()=>q(X,!n(X))),m(me,ze)};F(de,me=>{n(v)?me(be):n(p)||!n(l)||!n(E)||!n(O)||!n(y)?me(Ee,1):me(Ge,-1)})}m(e,Pe),Ke()}St(["click"]);const ex=new Set(["property","field","enum_member","variable","constant"]),Vp=250,is=30;function tx(e){return e?e.symbols.filter(t=>t.kind!=="file"):[]}function yf(e,t,r=[]){const s=new Map(t.map(o=>[o.file,o])),a=[...new Set(e)].map(o=>{const l=s.get(o),c=tx(l);return{path:o,test:l?.test??nx(o),imported:l!==void 0,symbols:c,symbolCount:c.length}});a.sort((o,l)=>Number(o.test)-Number(l.test)||o.path.localeCompare(l.path));const i=new Map;for(const o of r){const l=i.get(o.name);l?l.push(o.line):i.set(o.name,[o.line])}return{rows:a,total:a.length,testCount:a.filter(o=>o.test).length,outside:[...i.entries()].map(([o,l])=>({name:o,lines:[...l].sort((c,u)=>c-u)})).sort((o,l)=>o.name.localeCompare(l.name))}}function nx(e){return/(^|\/)(__tests__|__mocks__|__fixtures__|tests?|spec|fixtures)(\/|$)/.test(e)||/\.(test|spec)\.[a-z0-9]+$/i.test(e)}function rx(e){return e.outline.items.map(t=>({entry:t,indent:Math.min(t.depth,3),dimmed:ex.has(t.kind)}))}function su(e){return!Number.isFinite(e)||e<0?"—":e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function sx(e){const t=[e.file.language,su(e.file.size)];return t.push(`${e.outline.total} ${e.outline.total===1?"symbol":"symbols"}`),e.file.generated&&t.push("generated"),e.file.test&&t.push("test"),t.join(" · ")}var bf=S("
      "),ax=S(''),ox=S(`
      Nothing was extracted from this file — it holds no symbols the graph + recognises, only top-level code, or a language without an extractor.
      `),ix=S('
      '),lx=S('
      Outline
      ');function cx(e,t){We(t,!0);let r=Ie(t,"scroller",7),s=Ie(t,"selected",19,()=>-1),a=b(()=>t.rows.reduce((P,A)=>Math.max(P,A.entry.fanIn??0),1)),i=he(null),o=he(0),l=he(0),c=b(()=>t.rows.length>Vp),u=b(()=>{if(!n(c))return{start:0,end:t.rows.length,before:0,after:0};const P=n(i)?n(i).offsetTop:0,A=Math.floor((n(o)-P)/is)-8,H=Math.ceil((n(l)||800)/is)+16,L=Math.max(0,Math.min(t.rows.length-1,A)),E=Math.max(L,Math.min(t.rows.length,L+H));return{start:L,end:E,before:L*is,after:(t.rows.length-E)*is}});vt(()=>{if(s()<0||!r()||!n(i))return;const P=n(i).offsetTop+s()*is,A=P+is;Pr().scrollTop+r().clientHeight&&(r().scrollTop=A-r().clientHeight+is)}),vt(()=>{const P=r();if(!P)return;const A=()=>{q(o,P.scrollTop,!0),q(l,P.clientHeight,!0)};A(),P.addEventListener("scroll",A,{passive:!0});const H=new ResizeObserver(A);return H.observe(P),()=>{P.removeEventListener("scroll",A),H.disconnect()}});var v=lx(),p=d(v),f=d(p),g=d(f);Ne(g,{name:"list-tree"});var _=h(f,4),x=d(_),k=h(p,2),C=d(k);{var T=P=>{var A=bf();let H;I(()=>H=rt(A,"",H,{height:`${n(u).before}px`})),m(P,A)};F(C,P=>{n(u).before>0&&P(T)})}var M=h(C,2);ke(M,19,()=>t.rows.slice(n(u).start,n(u).end),P=>P.entry.id,(P,A,H)=>{const L=b(()=>n(u).start+n(H));var E=ax();let y,O;var N=d(E);Lt(N,{get kind(){return n(A).entry.kind},size:20});var B=h(N,2),W=d(B),Y=h(B,2),J=d(Y),G=h(Y,2);let ee;var oe=d(G),ge=d(oe),U=h(oe,2),$=d(U);let ae;var ne=h(G,2);let re;var Q=d(ne),K=h(ne,2),Z=d(K);I(ce=>{y=qe(E,1,"orow svelte-3o11pb",null,y,{dimmed:n(A).dimmed,sel:n(L)===s()}),se(E,"title",`${n(A).entry.qualifiedName} — line ${n(A).entry.line}`),O=rt(E,"",O,{"padding-left":`${8+n(A).indent*28}px`}),w(W,n(A).entry.name),w(J,n(A).entry.signature??""),ee=qe(G,1,"in svelte-3o11pb",null,ee,{zero:!n(A).entry.fanIn}),w(ge,n(A).entry.fanIn??0),ae=rt($,"",ae,ce),re=qe(ne,1,"out svelte-3o11pb",null,re,{zero:!n(A).entry.fanOut}),w(Q,n(A).entry.fanOut??0),w(Z,n(A).entry.line)},[()=>({width:`${Math.max(n(A).entry.fanIn?8:0,Math.round(100*(n(A).entry.fanIn??0)/n(a)))}%`})]),xe("click",E,()=>t.onopen(n(A).entry)),ft("mouseenter",E,()=>t.onhover?.(n(L))),m(P,E)});var z=h(M,2);{var R=P=>{var A=bf();let H;I(()=>H=rt(A,"",H,{height:`${n(u).after}px`})),m(P,A)};F(z,P=>{n(u).after>0&&P(R)})}Ut(k,P=>q(i,P),()=>n(i));var D=h(k,2);{var V=P=>{var A=ox();m(P,A)};F(D,P=>{t.rows.length===0&&P(V)})}var X=h(D,2);{var j=P=>{var A=ix(),H=d(A);I(()=>w(H,`Showing ${t.rows.length??""} of ${t.total??""} symbols. The rest are in the index; this + screen caps what it draws.`)),m(P,A)};F(X,P=>{t.truncated&&P(j)})}I(()=>w(x,`source order · nested by owner · ${t.total??""}`)),m(e,v),Ke()}St(["click"]);var dx=S('
      '),ux=S(' '),fx=S(' '),vx=S('
      '),hx=S(' '),px=S(' '),gx=S('
      Listed, not linked — packages and runtime modules the index does not contain.
      ',1),mx=S('
      ');function wf(e,t){We(t,!0);let r=Ie(t,"selected",19,()=>-1);function s(D){const V=D.lastIndexOf("/");return V<0?"":D.slice(0,V+1)}function a(D){return D.slice(D.lastIndexOf("/")+1)}function i(D){if(D.symbols.length===0)return D.path;const V=D.symbols.map(j=>j.name).join(", "),X=D.symbolCount>D.symbols.length?", …":"";return`${D.path} — ${V}${X}`}var o=mx();let l;var c=d(o),u=d(c),v=d(u),p=d(v);{let D=b(()=>t.side==="left"?"corner-down-right":"arrow-right");Ne(p,{get name(){return n(D)}})}var f=h(v),g=h(f),_=d(g),x=h(c,2);{var k=D=>{var V=dx(),X=d(V);I(()=>w(X,t.emptyNote)),m(D,V)};F(x,D=>{t.model.rows.length===0&&D(k)})}var C=h(x,2);ke(C,19,()=>t.model.rows,D=>D.path,(D,V,X)=>{var j=fx();let P;var A=d(j),H=d(A);Ne(H,{name:"file-code-2",size:14});var L=h(A,2),E=d(L),y=d(E),O=h(E),N=d(O),B=h(L,2);{var W=Y=>{var J=ux(),G=d(J);I(()=>w(G,n(V).symbolCount)),m(Y,J)};F(B,Y=>{n(V).symbolCount>0&&Y(W)})}I((Y,J,G,ee)=>{P=qe(j,1,"filerow svelte-122bwap",null,P,{test:n(V).test,sel:n(X)===r()}),se(j,"href",Y),se(j,"title",J),w(y,G),w(N,ee)},[()=>rn(n(V).path),()=>i(n(V)),()=>s(n(V).path),()=>a(n(V).path)]),ft("mouseenter",j,()=>t.onhover?.(n(X))),m(D,j)});var T=h(C,2);{var M=D=>{var V=vx(),X=d(V);I(j=>w(X,`${j??""} at the end of the list.`),[()=>bt(t.model.testCount,"test file")]),m(D,V)};F(T,D=>{t.model.testCount>0&&t.model.testCount{var V=gx(),X=_e(V),j=d(X),P=h(X,2);ke(P,21,()=>t.model.outside,A=>A.name,(A,H)=>{var L=px(),E=d(L),y=h(E);{var O=N=>{var B=hx(),W=d(B);I(()=>w(W,`×${n(H).lines.length??""}`)),m(N,B)};F(y,N=>{n(H).lines.length>1&&N(O)})}I(N=>{se(L,"title",N),w(E,n(H).name)},[()=>`imported at line ${n(H).lines.join(", ")}`]),m(A,L)}),I(()=>w(j,`Outside the index · ${t.model.outside.length??""}`)),m(D,V)};F(z,D=>{t.model.outside.length>0&&D(R)})}I(()=>{l=qe(o,1,"rail svelte-122bwap",null,l,{right:t.side==="right"}),se(o,"aria-label",t.title),w(f,`${t.title??""} `),w(_,t.model.total)}),m(e,o),Ke()}var _x=S('');function Wp(e,t){We(t,!0);var r=_x(),s=d(r);let a;var i=d(s);Ne(i,{name:"list-tree"});var o=h(s,2);let l;var c=d(o);Ne(c,{name:"file-code-2"}),I((u,v)=>{a=qe(s,1,"mode svelte-a9lqu6",null,a,{on:!t.source}),se(s,"href",u),se(s,"aria-current",t.source?void 0:"page"),l=qe(o,1,"mode svelte-a9lqu6",null,l,{on:t.source}),se(o,"href",v),se(o,"aria-current",t.source?"page":void 0)},[()=>rn(t.path,t.line?{line:t.line}:{}),()=>rn(t.path,{source:!0,...t.line?{line:t.line}:{}})]),m(e,r),Ke()}var yx=S('
      '),yc=S(''),bx=S('
      Reading the file from the index…
      '),wx=S(' '),xx=S('generated'),kx=S(' '),Sx=S(`indexed line ranges may be shifted, so the outline below is the shape the file had + when it was indexed — read its current source. + The next sync picks it up.`,1),Ex=S(''),Mx=S('

      This file
      Depended on by files
      Depends on files
      Symbols
      Size
      ');function Cx(e,t){We(t,!0);let r=he(null),s=he(null),a=he(!0),i=he(null),o=null;vt(()=>{const P=t.path,A=new AbortController;return nn(()=>c(P,A.signal)),()=>A.abort()});let l=null;$d(()=>n(r)?.file.path??t.path,()=>{const P=t.path;l?.abort(),l=new AbortController,c(P,l.signal,!0)});async function c(P,A,H=!1){H||(q(a,!0),q(s,null),q(r,null),q(x,"outline"),q(k,-1),o=null);try{const L=await _p(P,A);if(A.aborted)return;q(r,L,!0),q(s,null)}catch(L){if(A.aborted)return;q(s,L instanceof rr?L:new rr(0,"error",L instanceof Error?L.message:String(L),null),!0)}finally{A.aborted||q(a,!1)}}let u=b(()=>n(r)?rx(n(r)):[]),v=b(()=>n(r)?yf(n(r).dependents,n(r).importedBy.items):null),p=b(()=>n(r)?yf(n(r).dependencies,n(r).imports.items,n(r).unresolvedImports):null);function f(P){gr({id:P.id,name:P.name,kind:P.kind},"start")}function g(){const P=n(r)?.file;P?.id&&gr({id:P.id,name:wn(P.path),kind:"file"},"start")}const _=["left","outline","right"];let x=he("outline"),k=he(-1);function C(P){return P==="left"?n(v)?.rows.length??0:P==="right"?n(p)?.rows.length??0:n(u).length}function T(){if(n(k)<0)return;if(n(x)==="outline"){const H=n(u)[n(k)];H&&f(H.entry);return}const A=(n(x)==="left"?n(v):n(p))?.rows[n(k)];A&&jt(rn(A.path))}function M(P){const A=_.indexOf(n(x)),H=_[Math.max(0,Math.min(_.length-1,A+P))];!H||H===n(x)||C(H)!==0&&(q(x,H,!0),q(k,0))}function z(P){if(P.defaultPrevented||P.metaKey||P.ctrlKey||P.altKey)return;const A=P.target;if(!(A instanceof HTMLElement&&(A.isContentEditable||A instanceof HTMLInputElement||A instanceof HTMLTextAreaElement||A instanceof HTMLSelectElement))&&n(r)){switch(P.key){case"ArrowLeft":M(-1);break;case"ArrowRight":M(1);break;case"ArrowDown":case"j":q(k,Math.max(0,Math.min(C(n(x))-1,n(k)+1)),!0);break;case"ArrowUp":case"k":q(k,Math.max(0,n(k)-1),!0);break;case"Enter":P.preventDefault(),T();return;default:return}P.preventDefault(),n(x)!=="outline"&&Ri().then(()=>{document.querySelector(n(x)==="left"?'[data-pane="left"]':'[data-pane="right"]')?.querySelectorAll(".filerow")[n(k)]?.scrollIntoView({block:"nearest"})})}}vt(()=>{const P=t.line===null?null:`${t.path}:${t.line}`;if(!P||!n(r)||o===P||n(u).length===0)return;let A=-1;n(u).forEach((H,L)=>{H.entry.line<=t.line&&t.line<=H.entry.endLine&&(A=L)}),o=P,!(A<0)&&(q(x,"outline"),q(k,A,!0))});var R=Et();ft("keydown",cn,z);var D=_e(R);{var V=P=>{var A=yx(),H=d(A);{let L=b(()=>n(s).code==="not-found"?"Not in the index":"Could not load this file"),E=b(()=>`${t.path} — ${n(s).message}`);ru(H,{get title(){return n(L)},get message(){return n(E)},get guidance(){return n(s).guidance}})}m(P,A)},X=P=>{var A=bx(),H=d(A),L=d(H);ke(L,20,()=>[0,1,2,3,4,5],Y=>Y,(Y,J)=>{var G=yc();let ee;I(()=>ee=rt(G,"",ee,{width:`${60+J*29%35}%`})),m(Y,G)});var E=h(H,2),y=d(E),O=d(y);Ne(O,{name:"refresh-cw",size:14});var N=h(y,2);ke(N,20,()=>[0,1,2,3,4,5,6,7],Y=>Y,(Y,J)=>{var G=yc();let ee;I(()=>ee=rt(G,"",ee,{width:`${40+J*41%50}%`})),m(Y,G)});var B=h(E,2),W=d(B);ke(W,20,()=>[0,1,2],Y=>Y,(Y,J)=>{var G=yc();let ee;I(()=>ee=rt(G,"",ee,{width:`${50+J*15}%`})),m(Y,G)}),m(P,A)},j=P=>{var A=Mx(),H=d(A),L=d(H);{let Oe=b(()=>n(x)==="left"?n(k):-1);wf(L,{title:"Imported by",get model(){return n(v)},side:"left",get selected(){return n(Oe)},onhover:at=>{q(x,"left"),q(k,at,!0)},emptyNote:"Nothing in the index reaches into this file. It is either an entry point, or nothing depends on it yet."})}var E=h(H,2),y=d(E),O=d(y);Lt(O,{kind:"file",size:26});var N=h(O,2),B=d(N),W=d(B);let Y;var J=d(W),G=h(W,2),ee=d(G),oe=h(B,2),ge=d(oe),U=d(ge),$=h(ge),ae=d($),ne=h(N,4);Wp(ne,{get path(){return n(r).file.path},get line(){return t.line},source:!1});var re=h(y,2),Q=d(re);{var K=Oe=>{var at=wx(),wt=d(at);Ne(wt,{name:"activity",size:14});var Mt=h(wt),Tt=h(Mt);I(ct=>w(Mt,`Runs ${ct??""} at the top level — `),[()=>bt(n(r).topLevel.calls,"call")]),xe("click",Tt,g),m(Oe,at)};F(Q,Oe=>{n(r).topLevel.calls>0&&Oe(K)})}var Z=h(Q,2);{var ce=Oe=>{var at=xx();m(Oe,at)};F(Z,Oe=>{n(r).file.generated&&Oe(ce)})}var te=h(Z,2);{var ie=Oe=>{var at=kx(),wt=d(at);Ne(wt,{name:"triangle-alert",size:14});var Mt=h(wt);I(Tt=>w(Mt,`${Tt??""} — the outline may be + incomplete`),[()=>bt(n(r).file.errors.length,"extraction error")]),m(Oe,at)};F(te,Oe=>{n(r).file.errors.length>0&&Oe(ie)})}var ve=h(re,2);{var fe=Oe=>{var at=Ex(),wt=d(at);Vi(wt,{get file(){return n(r).file.path},children:(Mt,Tt)=>{var ct=Sx(),pt=h(_e(ct));I(Se=>se(pt,"href",Se),[()=>rn(n(r).file.path,{source:!0})]),m(Mt,ct)}}),m(Oe,at)};F(ve,Oe=>{n(r).drift&&Oe(fe)})}var pe=h(ve,2);{let Oe=b(()=>n(x)==="outline"?n(k):-1);cx(pe,{get rows(){return n(u)},get total(){return n(r).outline.total},get truncated(){return n(r).outline.truncated},get scroller(){return n(i)},get selected(){return n(Oe)},onopen:f,onhover:at=>{q(x,"outline"),q(k,at,!0)}})}Ut(E,Oe=>q(i,Oe),()=>n(i));var ye=h(E,2),Pe=d(ye),de=d(Pe);{let Oe=b(()=>n(x)==="right"?n(k):-1);wf(de,{title:"Imports",get model(){return n(p)},side:"right",get selected(){return n(Oe)},onhover:at=>{q(x,"right"),q(k,at,!0)},emptyNote:"This file reaches nothing else in the index — it depends on nothing the graph holds."})}var be=h(Pe,2),Ee=h(d(be),2),Ge=d(Ee),me=h(d(Ge)),ze=d(me),De=h(Ge,2),Le=h(d(De)),Ze=d(Le),Re=h(De,2),ue=h(d(Re)),le=d(ue),we=h(Re,2),Ce=h(d(we)),$e=d(Ce);I((Oe,at,wt)=>{Y=qe(W,1,"svelte-1dtvc8r",null,Y,{gen:n(r).file.generated}),w(J,Oe),w(ee,n(r).file.language),w(U,n(r).file.path),w(ae,at),w(ze,n(r).dependents.length),w(Ze,n(r).dependencies.length),w(le,n(r).outline.total),w($e,wt)},[()=>wn(n(r).file.path),()=>sx(n(r)),()=>su(n(r).file.size)]),m(P,A)};F(D,P=>{n(s)?P(V):n(a)||!n(r)||!n(p)||!n(v)?P(X,1):P(j,-1)})}m(e,R),Ke()}St(["click"]);const ka=20,Bo=10,Kp=120,Mo=56,Wi=34,Tx=6,ls=24,Ix=24,fd=800,Ax=150,Nx=40,xf=7,zx=Mo-8;function au(e){return Bo+(e-1)*ka}function Ki(e){return au(e)+ka/2}function Px(e){return Bo+Math.max(0,e)*ka+Kp}function Lx(e,t){if(t<=0)return 1;const r=Math.floor((e-Bo)/ka)+1;return Math.max(1,Math.min(t,r))}function Ox(e,t,r,s=Ix){if(r<=0)return{first:1,last:0};const a=Math.floor((e-Bo)/ka)+1-s,i=Math.ceil((t||800)/ka)+s*2,o=Math.max(1,Math.min(r,a));return{first:o,last:Math.max(o-1,Math.min(r,o+i))}}function kf(e){return Math.floor((e-1)/fd)}function qx(e,t){const r=e*fd+1;return{index:e,from:r,to:Math.min(t,r+fd-1),requestFrom:Math.max(1,r-Ax)}}function Dx(e,t,r){if(r<=0||tt)break;t<=s.endLine&&(r=s.id)}return r}function Rx(e){const t=new Map,r=(s,a)=>{const i=t.get(s);i?i.push(a):t.set(s,[a])};for(const s of e.calls.items){const a=s.relation,i=Gd(a.node.name),o=_l(a),l=new Set;for(const c of a.edges)c.line&&(l.add(c.line),r(c.line,{ident:i,col:typeof c.col=="number"?c.col:null,targetId:a.node.id,uncertain:a.uncertain,outside:!1,title:`${o[0]||"calls"} ${a.node.qualifiedName} — ${a.node.file}:${a.node.line}`+(c.confidence!=null?` · confidence ${c.confidence}`:"")+(c.resolvedBy?` · resolved by ${c.resolvedBy}`:"")}));for(const c of a.lines)l.has(c)||r(c,{ident:i,col:null,targetId:a.node.id,uncertain:a.uncertain,outside:!1,title:`${o[0]||"calls"} ${a.node.qualifiedName} — ${a.node.file}:${a.node.line}`})}for(const s of e.outside.items)r(s.line,Hx(s));return t}function Hx(e){return{ident:e.name,col:e.col,targetId:null,uncertain:!1,outside:!0,title:`${e.name} is not in the index — nothing here resolves it`}}function jx(e){const t=e.calls.items.map(s=>({key:`${s.ownerId}>${s.relation.node.id}`,ownerId:s.ownerId,call:s,anchor:s.relation.lines[0]??null,lines:s.relation.lines,words:_l(s.relation),via:Fo(s.relation),top:0}));t.sort((s,a)=>(s.anchor??Number.MAX_SAFE_INTEGER)-(a.anchor??Number.MAX_SAFE_INTEGER)||s.call.ownerLine-a.call.ownerLine||s.call.relation.node.name.localeCompare(a.call.relation.node.name));let r=Bo;for(const s of t){const a=s.anchor===null?r:Ki(s.anchor)-Wi/2;r=Math.max(a,r),s.top=r,r+=Wi+Tx}return t}function Fx(e,t,r){const s=[];for(const a of e){if(a.top>r)break;a.top+Wi>=t&&s.push(a)}return s}function Bx(e){const t=e[e.length-1];return t?t.top+Wi+Kp:0}function Vx(e,t){const r=e.file.path,s=[];let a=1;for(const o of t){const l=o.call.relation.node;if(l.file===r)for(const c of o.lines){if(c===l.line)continue;const u=Math.abs(l.line-c);u>a&&(a=u),s.push({key:`${o.key}:${c}`,fromLine:c,toLine:l.line,ownerId:o.ownerId,targetId:l.id,targetName:l.name,uncertain:o.call.relation.uncertain,synthesized:o.via!==null,d:"",minLine:Math.min(c,l.line),maxLine:Math.max(c,l.line)})}}const i=Math.log1p(a);for(const o of s){const l=o.maxLine-o.minLine,c=xf+(zx-xf)*(i>0?Math.log1p(l)/i:0);o.d=Wx(o.fromLine,o.toLine,c)}return s.sort((o,l)=>l.maxLine-l.minLine-(o.maxLine-o.minLine)),s}function Wx(e,t,r){const s=Ki(e),a=Ki(t),i=Math.max(1,Math.abs(a-s)/2),o=a>s?0:1;return`M${Mo},${s} A${r.toFixed(1)},${i.toFixed(1)} 0 0 ${o} ${Mo},${a}`}function Kx(e,t,r){return r?t?e.filter(s=>s.ownerId===t||s.targetId===t):[]:[...e]}function Yx(e,t,r){return e.filter(s=>s.minLine<=r&&s.maxLine>=t)}function Xx(e){return e===0?"No calls in this file reach another symbol in it.":`${e} ${e===1?"call stays":"calls stay"} within this file`}var Gx=Jt(' ',1),Zx=Jt('');function Ux(e,t){We(t,!0);function r(i){return Vt.is(i.targetId)||i.fromLine===t.hoverLine||i.toLine===t.hoverLine}function s(i){const o=i.toLinet.arcs,i=>i.key,(i,o)=>{var l=Gx(),c=_e(l);let u;var v=h(c),p=d(v),f=d(p);I((g,_)=>{u=qe(c,0,"arc svelte-7a2f5z",null,u,g),se(c,"d",n(o).d),se(v,"d",n(o).d),w(f,_)},[()=>({lit:r(n(o)),uncertain:n(o).uncertain,heur:n(o).synthesized}),()=>s(n(o))]),xe("click",v,()=>t.onfollow(n(o))),xe("keydown",v,g=>{(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),t.onfollow(n(o)))}),ft("mouseenter",v,()=>Vt.set(n(o).targetId)),ft("mouseleave",v,()=>Vt.clear(n(o).targetId)),m(i,l)}),I(()=>{se(a,"width",Mo),se(a,"height",t.height),se(a,"viewBox",`0 0 ${Mo} ${t.height}`)}),m(e,a),Ke()}St(["click","keydown"]);var Qx=S(' '),Jx=S(' '),$x=S(' '),ek=S(" "),tk=S(''),nk=S(""),rk=S('
      '),sk=S('
      ');function ak(e,t){We(t,!0);let r=b(()=>{const l=[];for(let c=t.first;c<=t.last;c++){const u=t.refs.get(c)??[],v=t.tokensFor(c);l.push({n:c,top:au(c),parts:v?s(v,yl(v,u),t.defNames.get(c)??null):null,port:a(u),targets:[...new Set(u.map(p=>p.targetId).filter(p=>!!p))]})}return l});function s(l,c,u){return l.map((v,p)=>{const f=c.get(p)??null;return{text:v.text,cls:f?null:nu(v),ref:f,def:!f&&u!==null&&v.text===u&&v.cls!=="comment"&&v.cls!=="string"}})}function a(l){return l.length===0?null:l.some(c=>!c.uncertain&&!c.outside)?"sure":"unsure"}function i(l){return l.n===t.highlight||l.targets.some(c=>Vt.is(c))}var o=sk();ke(o,21,()=>n(r),l=>l.n,(l,c)=>{var u=rk();let v,p;var f=d(u),g=d(f),_=h(f,2),x=d(_);{var k=R=>{var D=Et(),V=_e(D);ke(V,17,()=>n(c).parts,Kn,(X,j)=>{var P=Et(),A=_e(P);{var H=N=>{const B=b(()=>n(j).ref);var W=Qx();let Y;var J=d(W);I(G=>{Y=qe(W,1,"ref svelte-a7mbfv",null,Y,G),se(W,"title",n(B).title),w(J,n(j).text)},[()=>({uncertain:n(B).uncertain,hot:Vt.is(n(B).targetId)})]),xe("click",W,()=>t.onfollow(n(B))),xe("keydown",W,G=>{(G.key==="Enter"||G.key===" ")&&(G.preventDefault(),t.onfollow(n(B)))}),ft("mouseenter",W,()=>Vt.set(n(B).targetId)),ft("mouseleave",W,()=>Vt.clear(n(B).targetId)),m(N,W)},L=N=>{var B=Jx(),W=d(B);I(()=>{se(B,"title",n(j).ref.title),w(W,n(j).text)}),m(N,B)},E=N=>{var B=$x(),W=d(B);I(()=>w(W,n(j).text)),m(N,B)},y=N=>{var B=ek(),W=d(B);I(()=>{qe(B,1,bs(n(j).cls),"svelte-a7mbfv"),w(W,n(j).text)}),m(N,B)},O=N=>{var B=Yt();I(()=>w(B,n(j).text)),m(N,B)};F(A,N=>{n(j).ref&&!n(j).ref.outside?N(H):n(j).ref?N(L,1):n(j).def?N(E,2):n(j).cls?N(y,3):N(O,-1)})}m(X,P)}),m(R,D)},C=R=>{var D=tk();m(R,D)};F(x,R=>{n(c).parts?R(k):R(C,-1)})}var T=h(_,2),M=d(T);{var z=R=>{var D=nk();let V;I(()=>V=qe(D,1,"svelte-a7mbfv",null,V,{sure:n(c).port==="sure"})),m(R,D)};F(M,R=>{n(c).port&&R(z)})}I(R=>{v=qe(u,1,"ln svelte-a7mbfv",null,v,R),se(u,"data-line",n(c).n),p=rt(u,"",p,{top:`${n(c).top}px`}),w(g,n(c).n)},[()=>({hot:i(n(c))})]),ft("mouseenter",u,()=>t.onhoverline(n(c).n)),m(l,u)}),m(e,o),Ke()}St(["click","keydown"]);var Ef=S("
      "),ok=S(''),ik=S('
      '),lk=S('');function ck(e,t){We(t,!0);let r=he(null),s=he(0),a=he(0),i=b(()=>t.rows.length>Vp),o=b(()=>{if(!n(i))return{start:0,end:t.rows.length,before:0,after:0};const z=Math.floor(n(s)/ls)-8,R=Math.ceil((n(a)||800)/ls)+16,D=Math.max(0,Math.min(t.rows.length-1,z)),V=Math.max(D,Math.min(t.rows.length,D+R));return{start:D,end:V,before:D*ls,after:(t.rows.length-V)*ls}});vt(()=>{const z=t.currentId,R=n(r);if(!z||!R)return;const D=t.rows.findIndex(j=>j.entry.id===z);if(D<0)return;const V=D*ls,X=R.parentElement;X&&(VX.scrollTop+X.clientHeight&&(X.scrollTop=V+ls*3-X.clientHeight))}),vt(()=>{const z=n(r)?.parentElement;if(!z)return;const R=()=>{q(s,z.scrollTop,!0),q(a,z.clientHeight,!0)};R(),z.addEventListener("scroll",R,{passive:!0});const D=new ResizeObserver(R);return D.observe(z),()=>{z.removeEventListener("scroll",R),D.disconnect()}});var l=lk(),c=d(l),u=h(d(c),2),v=d(u),p=h(c,2),f=d(p),g=d(f);{var _=z=>{var R=Ef();let D;I(()=>D=rt(R,"",D,{height:`${n(o).before}px`})),m(z,R)};F(g,z=>{n(o).before>0&&z(_)})}var x=h(g,2);ke(x,17,()=>t.rows.slice(n(o).start,n(o).end),z=>z.entry.id,(z,R)=>{var D=ok();let V,X;var j=d(D);Lt(j,{get kind(){return n(R).entry.kind}});var P=h(j,2),A=d(P),H=h(P,2),L=d(H);I(()=>{V=qe(D,1,"nrow svelte-3z23e6",null,V,{dimmed:n(R).dimmed,current:n(R).entry.id===t.currentId}),se(D,"title",`${n(R).entry.qualifiedName} — line ${n(R).entry.line}`),X=rt(D,"",X,{"padding-left":`${6+n(R).indent*14}px`}),w(A,n(R).entry.name),w(L,n(R).entry.line)}),xe("click",D,()=>t.ongo(n(R).entry.line,n(R).entry.id)),m(z,D)});var k=h(x,2);{var C=z=>{var R=Ef();let D;I(()=>D=rt(R,"",D,{height:`${n(o).after}px`})),m(z,R)};F(k,z=>{n(o).after>0&&z(C)})}Ut(f,z=>q(r,z),()=>n(r));var T=h(p,2);{var M=z=>{var R=ik(),D=d(R);I(()=>w(D,`Showing ${t.rows.length??""} of ${t.total??""} symbols.`)),m(z,R)};F(T,z=>{t.truncated&&z(M)})}I(()=>w(v,t.total)),m(e,l),Ke()}St(["click"]);var dk=S(' '),uk=S(" "),fk=S(' '),vk=S('
      ');function hk(e,t){We(t,!0);function r(i){const o=i.call.relation.node,l=i.lines.length>0?` · called from line ${i.lines.join(", ")}`:"";return`${o.qualifiedName} — ${o.file}:${o.line}${l}`}var s=Et(),a=_e(s);ke(a,17,()=>t.rows,i=>i.key,(i,o)=>{const l=b(()=>n(o).call.relation.node);var c=vk();let u,v;var p=d(c);Lt(p,{get kind(){return n(l).kind}});var f=h(p,2),g=d(f),_=d(g),x=h(_);{var k=X=>{var j=dk(),P=d(j);I(()=>w(P,`×${n(o).lines.length??""}`)),m(X,j)};F(x,X=>{n(o).lines.length>1&&X(k)})}var C=h(g,2),T=d(C),M=d(T),z=h(T,2);{var R=X=>{var j=uk(),P=d(j);I(A=>w(P,A),[()=>n(o).words.join(", ")]),m(X,j)};F(z,X=>{n(o).words.length>0&&X(R)})}var D=h(z,2);{var V=X=>{var j=fk(),P=d(j);I(()=>w(P,`via ${n(o).via??""}`)),m(X,j)};F(D,X=>{n(o).via&&X(V)})}I((X,j)=>{u=qe(c,1,"rrow svelte-325cso",null,u,X),se(c,"data-target",n(l).id),se(c,"title",j),v=rt(c,"",v,{top:`${n(o).top}px`}),w(_,n(l).name),w(M,n(l).file===t.focalFile?"same file":n(l).file)},[()=>({hot:Vt.is(n(l).id),focused:t.focusId!==null&&(n(o).ownerId===t.focusId||n(l).id===t.focusId),uncertain:n(o).call.relation.uncertain}),()=>r(n(o))]),xe("click",c,()=>t.onopen(n(l))),xe("keydown",c,X=>{(X.key==="Enter"||X.key===" ")&&(X.preventDefault(),t.onopen(n(l)))}),ft("mouseenter",c,()=>{Vt.set(n(l).id),t.onhover(n(o))}),ft("mouseleave",c,()=>{Vt.clear(n(l).id),t.onhover(null)}),m(i,c)}),m(e,s),Ke()}St(["click","keydown"]);var pk=S('
      '),gk=S('
      Reading the file from the index…
      '),mk=S(''),_k=S(' — showing the ones the symbol under the pointer takes part in',1),yk=S(' '),bk=S(' ',1),Mf=S(''),wk=S('
      '),xk=S(''),kk=S('

      Calls
      ');function Sk(e,t){We(t,!0);let r=he(null),s=he(null),a=he(!0),i=he(gn(new Map)),o=new Set,l=new Set,c=he(null),u=null;vt(()=>{const te=t.path,ie=new AbortController;return nn(()=>p(te,ie.signal)),()=>ie.abort()});let v=null;$d(()=>n(r)?.file.path??t.path,()=>{const te=t.path;v?.abort(),v=new AbortController,p(te,v.signal,!0)});async function p(te,ie,ve=!1){ve||(q(a,!0),q(s,null),q(r,null),ne=null,q(E,null),q(y,null),q(O,null),n(V)&&(n(V).scrollTop=0)),q(i,new Map,!0),o=new Set,l=new Set,q(c,null),u?.abort(),u=new AbortController;try{const fe=await s0(te,ie);if(ie.aborted)return;q(r,fe,!0),q(s,null)}catch(fe){if(ie.aborted)return;q(s,fe instanceof rr?fe:new rr(0,"error",fe instanceof Error?fe.message:String(fe),null),!0)}finally{ie.aborted||q(a,!1)}}async function f(te){const ie=n(r)?.file;if(!ie||ie.totalLines===null||o.has(te)||l.has(te))return;l.add(te);const ve=qx(te,ie.totalLines),fe=u?.signal;try{const pe=await td(ie.path,ve.requestFrom,ve.to,fe,n(r)?.drift?"current":void 0);if(fe?.aborted||n(r)?.file.path!==ie.path)return;if(!pe.lines){q(c,pe.reason??"Source is not available for this file.",!0);return}const ye=pe.from??ve.requestFrom,Pe=bl(pe.lines,ye,pe.highlight),de=new Map(n(i));for(const[be,Ee]of Pe)be>=ve.from&&de.set(be,Ee);q(i,de,!0),o.add(te)}catch(pe){if(fe?.aborted)return;q(c,pe instanceof Error?pe.message:String(pe),!0)}finally{l.delete(te)}}let g=b(()=>n(r)?.drift===!0),_=b(()=>n(r)?.file.totalLines??0),x=b(()=>n(r)&&!n(g)?Rx(n(r)):new Map),k=b(()=>n(r)&&!n(g)?jx(n(r)):[]),C=b(()=>n(r)&&!n(g)?Vx(n(r),n(k)):[]),T=b(()=>n(C).length>Nx),M=b(()=>n(g)?[]:(n(r)?.outline.items??[]).map(te=>({entry:te,indent:Math.min(te.depth,3),dimmed:z.has(te.kind)})));const z=new Set(["property","field","enum_member","variable","constant"]);let R=b(()=>{const te=new Map;if(n(g))return te;for(const ie of n(r)?.outline.items??[])te.has(ie.line)||te.set(ie.line,ie.name);return te}),D=b(()=>{const te=new Map;for(const ie of n(k))te.set(ie.call.relation.node.id,ie.call.relation.node);return te}),V=he(null),X=he(null),j=he(null),P=he(0),A=he(0),H=he(gn({x0:0,x1:0,width:0}));vt(()=>{const te=n(V);if(!te)return;const ie=()=>{q(P,te.scrollTop,!0),q(A,te.clientHeight,!0)},ve=()=>{ie();const pe=n(X),ye=n(j);!pe||!ye||q(H,{x0:pe.offsetLeft+pe.offsetWidth-10,x1:ye.offsetLeft+14,width:te.scrollWidth},!0)};ve(),te.addEventListener("scroll",ie,{passive:!0});const fe=new ResizeObserver(ve);return fe.observe(te),()=>{te.removeEventListener("scroll",ie),fe.disconnect()}});let L=b(()=>Ox(n(P),n(A),n(_)));vt(()=>{if(!n(r))return;const te=Dx(n(L).first,n(L).last,n(_));nn(()=>{for(const ie of te)f(ie)})});let E=he(null),y=he(null),O=he(null),N=b(()=>Sf(n(r)?.outline.items??[],Lx(n(P)+8,n(_)))),B=b(()=>{if(n(y)!==null)return n(y);const te=n(r)?.outline.items??[];return n(E)!==null?Sf(te,n(E)):n(N)}),W=b(()=>Kx(n(C),n(B),n(T))),Y=b(()=>Yx(n(W),n(L).first,n(L).last)),J=b(()=>Fx(n(k),n(P)-n(A),n(P)+n(A)*2)),G=b(()=>{const{x0:te,x1:ie}=n(H);if(ie<=te)return[];const ve=(te+ie)/2,fe=[];for(const pe of n(J)){const ye=pe.top+17,Pe=Fo(pe.call.relation);for(const de of pe.lines){const be=Ki(de);fe.push({d:`M${te},${be} C${ve},${be} ${ve},${ye} ${ie},${ye}`,targetId:pe.call.relation.node.id,uncertain:pe.call.relation.uncertain,heuristic:Pe!==null,origin:!1})}}return fe}),ee=b(()=>Math.max(Px(n(_)),Bx(n(k))));function oe(te){const ie=n(V);ie&&(ie.scrollTop=Math.max(0,au(te)-ie.clientHeight/3),q(O,te,!0))}function ge(te){Vt.set(te.targetId),oe(te.toLine)}function U(te){if(te.file===n(r)?.file.path){Vt.set(te.id),oe(te.line);return}gr({id:te.id,name:te.name,kind:te.kind},"start")}function $(te){const ie=te.targetId?n(D).get(te.targetId):void 0;ie&&U(ie)}function ae(te){q(y,te?te.ownerId:null,!0)}let ne=null;vt(()=>{const te=t.line===null?null:`${t.path}:${t.line}`;!te||!n(r)||ne===te||!n(V)||n(_)===0||(ne=te,oe(t.line))});var re=Et(),Q=_e(re);{var K=te=>{var ie=pk(),ve=d(ie);{let fe=b(()=>n(s).code==="not-found"?"Not in the index":"Could not load this file"),pe=b(()=>`${t.path} — ${n(s).message}`);ru(ve,{get title(){return n(fe)},get message(){return n(pe)},get guidance(){return n(s).guidance}})}m(te,ie)},Z=te=>{var ie=gk(),ve=d(ie),fe=d(ve),pe=d(fe);Ne(pe,{name:"refresh-cw",size:14}),m(te,ie)},ce=te=>{var ie=kk();let ve;var fe=d(ie);{var pe=Ye=>{var He=mk(),Xe=d(He);ck(Xe,{get rows(){return n(M)},get total(){return n(r).outline.total},get truncated(){return n(r).outline.truncated},get currentId(){return n(N)},ongo:(Qe,ut)=>{Vt.set(ut),oe(Qe)}}),m(Ye,He)};F(fe,Ye=>{n(M).length>0&&Ye(pe)})}var ye=h(fe,2),Pe=d(ye),de=d(Pe),be=d(de);Lt(be,{kind:"file",size:26});var Ee=h(be,2),Ge=d(Ee),me=h(Ee,2),ze=d(me),De=h(me,2),Le=d(De),Ze=h(De,4);Wp(Ze,{get path(){return n(r).file.path},get line(){return t.line},source:!0});var Re=h(de,2);let ue;var le=d(Re),we=d(le),Ce=h(we);{var $e=Ye=>{var He=_k(),Xe=_e(He,!0);Xe.nodeValue=" ",m(Ye,He)};F(Ce,Ye=>{n(T)&&Ye($e)})}var Oe=h(le,2),at=h(d(Oe)),wt=d(at),Mt=h(at);{var Tt=Ye=>{var He=yk(),Xe=d(He);I(()=>w(Xe,`· showing ${n(r).calls.shown??""}`)),m(Ye,He)};F(Mt,Ye=>{n(r).calls.truncated&&Ye(Tt)})}var ct=h(Mt);{var pt=Ye=>{var He=bk(),Xe=_e(He,!0);Xe.nodeValue=" ";var Qe=h(Xe),ut=d(Qe);I(ot=>w(ut,`· ${ot??""} outside the index`),[()=>bt(n(r).outside.total,"reference")]),m(Ye,He)};F(ct,Ye=>{n(r).outside.total>0&&Ye(pt)})}var Se=h(Re,2);{var Ae=Ye=>{var He=Mf(),Xe=d(He);Vi(Xe,{get file(){return n(r).file.path},children:(Qe,ut)=>{var ot=Yt(`indexed line ranges may be shifted; showing the file's current source, with the + call arcs, ports and rail switched off — they are drawn from lines this file no + longer has. The next sync picks it up.`);m(Qe,ot)}}),m(Ye,He)},je=Ye=>{var He=Mf(),Xe=d(He);Vi(Xe,{get file(){return n(r).file.path},children:(Qe,ut)=>{var ot=Yt();I(()=>w(ot,n(r).reason??"it could not be read from disk.")),m(Qe,ot)}}),m(Ye,He)},Fe=Ye=>{var He=wk(),Xe=d(He);I(()=>w(Xe,n(c))),m(Ye,He)};F(Se,Ye=>{n(r).drift?Ye(Ae):n(r).file.totalLines===null?Ye(je,1):n(c)&&Ye(Fe,2)})}var Me=h(Pe,2);{var Ue=Ye=>{var He=xk(),Xe=d(He);let Qe;var ut=d(Xe),ot=d(ut);{var it=tt=>{Ux(tt,{get arcs(){return n(Y)},get height(){return n(ee)},get hoverLine(){return n(E)},onfollow:ge})};F(ot,tt=>{n(g)||tt(it)})}var xt=h(ut,2),et=d(xt);ak(et,{get first(){return n(L).first},get last(){return n(L).last},tokensFor:tt=>n(i).get(tt)??null,get refs(){return n(x)},get defNames(){return n(R)},get highlight(){return n(O)},onfollow:$,onhoverline:tt=>{q(E,tt,!0)}}),Ut(xt,tt=>q(X,tt),()=>n(X));var Ve=h(xt,2),gt=d(Ve);{var _t=tt=>{hk(tt,{get rows(){return n(J)},get focalFile(){return n(r).file.path},get focusId(){return n(B)},onopen:U,onhover:ae})};F(gt,tt=>{n(g)||tt(_t)})}Ut(Ve,tt=>q(j,tt),()=>n(j));var At=h(Ve,2);Fp(At,{get connectors(){return n(G)},get width(){return n(H).width},get height(){return n(ee)}}),Ut(He,tt=>q(V,tt),()=>n(V)),I(()=>Qe=rt(Xe,"",Qe,{height:`${n(ee)}px`})),ft("mouseleave",He,()=>{q(E,null)}),m(Ye,He)};F(Me,Ye=>{n(r).file.totalLines!==null&&Ye(Ue)})}I((Ye,He,Xe,Qe,ut)=>{ve=qe(ie,1,"codeview svelte-1ykko46",null,ve,{wide:n(M).length>0}),w(Ge,Ye),w(ze,`${n(r).file.language??""} · ${He??""} · + ${Xe??""} · + ${Qe??""}`),w(Le,n(r).file.path),ue=qe(Re,1,"toolbar svelte-1ykko46",null,ue,{hidden:n(g)}),w(we,ut),w(wt,n(r).calls.total)},[()=>wn(n(r).file.path),()=>su(n(r).file.size),()=>n(r).file.totalLines===null?"length unknown":bt(n(r).file.totalLines,"line"),()=>bt(n(r).outline.total,"symbol"),()=>Xx(n(r).intraFileCalls)]),m(te,ie)};F(Q,te=>{n(s)?te(K):n(a)||!n(r)?te(Z,1):te(ce,-1)})}m(e,re),Ke()}var Ek={value:()=>{}};function wl(){for(var e=0,t=arguments.length,r={},s;e=0&&(s=r.slice(a+1),r=r.slice(0,a)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:s}})}Ei.prototype=wl.prototype={constructor:Ei,on:function(e,t){var r=this._,s=Mk(e+"",r),a,i=-1,o=s.length;if(arguments.length<2){for(;++i0)for(var r=new Array(a),s=0,a,i;s=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),Tf.hasOwnProperty(t)?{space:Tf[t],local:e}:e}function Tk(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===vd&&t.documentElement.namespaceURI===vd?t.createElement(e):t.createElementNS(r,e)}}function Ik(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Yp(e){var t=xl(e);return(t.local?Ik:Tk)(t)}function Ak(){}function ou(e){return e==null?Ak:function(){return this.querySelector(e)}}function Nk(e){typeof e!="function"&&(e=ou(e));for(var t=this._groups,r=t.length,s=new Array(r),a=0;a=M&&(M=T+1);!(R=k[M])&&++M<_;);z._next=R||null}}return o=new Yn(o,s),o._enter=l,o._exit=c,o}function Qk(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Jk(){return new Yn(this._exit||this._groups.map(Up),this._parents)}function $k(e,t,r){var s=this.enter(),a=this,i=this.exit();return typeof e=="function"?(s=e(s),s&&(s=s.selection())):s=s.append(e+""),t!=null&&(a=t(a),a&&(a=a.selection())),r==null?i.remove():r(i),s&&a?s.merge(a).order():a}function e3(e){for(var t=e.selection?e.selection():e,r=this._groups,s=t._groups,a=r.length,i=s.length,o=Math.min(a,i),l=new Array(a),c=0;c=0;)(o=s[a])&&(i&&o.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(o,i),i=o);return this}function n3(e){e||(e=r3);function t(p,f){return p&&f?e(p.__data__,f.__data__):!p-!f}for(var r=this._groups,s=r.length,a=new Array(s),i=0;it?1:e>=t?0:NaN}function s3(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function a3(){return Array.from(this)}function o3(){for(var e=this._groups,t=0,r=e.length;t1?this.each((t==null?m3:typeof t=="function"?y3:_3)(e,t,r??"")):Sa(this.node(),e)}function Sa(e,t){return e.style.getPropertyValue(t)||Qp(e).getComputedStyle(e,null).getPropertyValue(t)}function w3(e){return function(){delete this[e]}}function x3(e,t){return function(){this[e]=t}}function k3(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function S3(e,t){return arguments.length>1?this.each((t==null?w3:typeof t=="function"?k3:x3)(e,t)):this.node()[e]}function Jp(e){return e.trim().split(/^|\s+/)}function iu(e){return e.classList||new $p(e)}function $p(e){this._node=e,this._names=Jp(e.getAttribute("class")||"")}$p.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function eg(e,t){for(var r=iu(e),s=-1,a=t.length;++s=0&&(r=t.slice(s+1),t=t.slice(0,s)),{type:t,name:r}})}function J3(e){return function(){var t=this.__on;if(t){for(var r=0,s=-1,a=t.length,i;r()=>e;function hd(e,{sourceEvent:t,subject:r,target:s,identifier:a,active:i,x:o,y:l,dx:c,dy:u,dispatch:v}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:s,enumerable:!0,configurable:!0},identifier:{value:a,enumerable:!0,configurable:!0},active:{value:i,enumerable:!0,configurable:!0},x:{value:o,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:v}})}hd.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function l4(e){return!e.ctrlKey&&!e.button}function c4(){return this.parentNode}function d4(e,t){return t??{x:e.x,y:e.y}}function u4(){return navigator.maxTouchPoints||"ontouchstart"in this}function f4(){var e=l4,t=c4,r=d4,s=u4,a={},i=wl("start","drag","end"),o=0,l,c,u,v,p=0;function f(z){z.on("mousedown.drag",g).filter(s).on("touchstart.drag",k).on("touchmove.drag",C,i4).on("touchend.drag touchcancel.drag",T).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(z,R){if(!(v||!e.call(this,z,R))){var D=M(this,t.call(this,z,R),z,R,"mouse");D&&(Jn(z.view).on("mousemove.drag",_,Co).on("mouseup.drag",x,Co),sg(z.view),bc(z),u=!1,l=z.clientX,c=z.clientY,D("start",z))}}function _(z){if(fa(z),!u){var R=z.clientX-l,D=z.clientY-c;u=R*R+D*D>p}a.mouse("drag",z)}function x(z){Jn(z.view).on("mousemove.drag mouseup.drag",null),ag(z.view,u),fa(z),a.mouse("end",z)}function k(z,R){if(e.call(this,z,R)){var D=z.changedTouches,V=t.call(this,z,R),X=D.length,j,P;for(j=0;j>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?ai(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?ai(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=h4.exec(e))?new jn(t[1],t[2],t[3],1):(t=p4.exec(e))?new jn(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=g4.exec(e))?ai(t[1],t[2],t[3],t[4]):(t=m4.exec(e))?ai(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=_4.exec(e))?Of(t[1],t[2]/100,t[3]/100,1):(t=y4.exec(e))?Of(t[1],t[2]/100,t[3]/100,t[4]):If.hasOwnProperty(e)?zf(If[e]):e==="transparent"?new jn(NaN,NaN,NaN,0):null}function zf(e){return new jn(e>>16&255,e>>8&255,e&255,1)}function ai(e,t,r,s){return s<=0&&(e=t=r=NaN),new jn(e,t,r,s)}function x4(e){return e instanceof Wo||(e=Ks(e)),e?(e=e.rgb(),new jn(e.r,e.g,e.b,e.opacity)):new jn}function pd(e,t,r,s){return arguments.length===1?x4(e):new jn(e,t,r,s??1)}function jn(e,t,r,s){this.r=+e,this.g=+t,this.b=+r,this.opacity=+s}lu(jn,pd,og(Wo,{brighter(e){return e=e==null?Xi:Math.pow(Xi,e),new jn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?To:Math.pow(To,e),new jn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new jn(js(this.r),js(this.g),js(this.b),Gi(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Pf,formatHex:Pf,formatHex8:k4,formatRgb:Lf,toString:Lf}));function Pf(){return`#${qs(this.r)}${qs(this.g)}${qs(this.b)}`}function k4(){return`#${qs(this.r)}${qs(this.g)}${qs(this.b)}${qs((isNaN(this.opacity)?1:this.opacity)*255)}`}function Lf(){const e=Gi(this.opacity);return`${e===1?"rgb(":"rgba("}${js(this.r)}, ${js(this.g)}, ${js(this.b)}${e===1?")":`, ${e})`}`}function Gi(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function js(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function qs(e){return e=js(e),(e<16?"0":"")+e.toString(16)}function Of(e,t,r,s){return s<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new dr(e,t,r,s)}function ig(e){if(e instanceof dr)return new dr(e.h,e.s,e.l,e.opacity);if(e instanceof Wo||(e=Ks(e)),!e)return new dr;if(e instanceof dr)return e;e=e.rgb();var t=e.r/255,r=e.g/255,s=e.b/255,a=Math.min(t,r,s),i=Math.max(t,r,s),o=NaN,l=i-a,c=(i+a)/2;return l?(t===i?o=(r-s)/l+(r0&&c<1?0:o,new dr(o,l,c,e.opacity)}function S4(e,t,r,s){return arguments.length===1?ig(e):new dr(e,t,r,s??1)}function dr(e,t,r,s){this.h=+e,this.s=+t,this.l=+r,this.opacity=+s}lu(dr,S4,og(Wo,{brighter(e){return e=e==null?Xi:Math.pow(Xi,e),new dr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?To:Math.pow(To,e),new dr(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,s=r+(r<.5?r:1-r)*t,a=2*r-s;return new jn(wc(e>=240?e-240:e+120,a,s),wc(e,a,s),wc(e<120?e+240:e-120,a,s),this.opacity)},clamp(){return new dr(qf(this.h),oi(this.s),oi(this.l),Gi(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Gi(this.opacity);return`${e===1?"hsl(":"hsla("}${qf(this.h)}, ${oi(this.s)*100}%, ${oi(this.l)*100}%${e===1?")":`, ${e})`}`}}));function qf(e){return e=(e||0)%360,e<0?e+360:e}function oi(e){return Math.max(0,Math.min(1,e||0))}function wc(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const cu=e=>()=>e;function E4(e,t){return function(r){return e+r*t}}function M4(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(s){return Math.pow(e+s*t,r)}}function C4(e){return(e=+e)==1?lg:function(t,r){return r-t?M4(t,r,e):cu(isNaN(t)?r:t)}}function lg(e,t){var r=t-e;return r?E4(e,r):cu(isNaN(e)?t:e)}const Zi=(function e(t){var r=C4(t);function s(a,i){var o=r((a=pd(a)).r,(i=pd(i)).r),l=r(a.g,i.g),c=r(a.b,i.b),u=lg(a.opacity,i.opacity);return function(v){return a.r=o(v),a.g=l(v),a.b=c(v),a.opacity=u(v),a+""}}return s.gamma=e,s})(1);function T4(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,s=t.slice(),a;return function(i){for(a=0;ar&&(i=t.slice(r,i),l[o]?l[o]+=i:l[++o]=i),(s=s[0])===(a=a[0])?l[o]?l[o]+=a:l[++o]=a:(l[++o]=null,c.push({i:o,x:Er(s,a)})),r=xc.lastIndex;return r180?v+=360:v-u>180&&(u+=360),f.push({i:p.push(a(p)+"rotate(",null,s)-2,x:Er(u,v)})):v&&p.push(a(p)+"rotate("+v+s)}function l(u,v,p,f){u!==v?f.push({i:p.push(a(p)+"skewX(",null,s)-2,x:Er(u,v)}):v&&p.push(a(p)+"skewX("+v+s)}function c(u,v,p,f,g,_){if(u!==p||v!==f){var x=g.push(a(g)+"scale(",null,",",null,")");_.push({i:x-4,x:Er(u,p)},{i:x-2,x:Er(v,f)})}else(p!==1||f!==1)&&g.push(a(g)+"scale("+p+","+f+")")}return function(u,v){var p=[],f=[];return u=e(u),v=e(v),i(u.translateX,u.translateY,v.translateX,v.translateY,p,f),o(u.rotate,v.rotate,p,f),l(u.skewX,v.skewX,p,f),c(u.scaleX,u.scaleY,v.scaleX,v.scaleY,p,f),u=v=null,function(g){for(var _=-1,x=f.length,k;++_=0&&e._call.call(void 0,t),e=e._next;--Ea}function Hf(){Ys=(Qi=Ao.now())+kl,Ea=lo=0;try{V4()}finally{Ea=0,K4(),Ys=0}}function W4(){var e=Ao.now(),t=e-Qi;t>fg&&(kl-=t,Qi=e)}function K4(){for(var e,t=Ui,r,s=1/0;t;)t._call?(s>t._time&&(s=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:Ui=r);co=e,_d(s)}function _d(e){if(!Ea){lo&&(lo=clearTimeout(lo));var t=e-Ys;t>24?(e<1/0&&(lo=setTimeout(Hf,e-Ao.now()-kl)),Ga&&(Ga=clearInterval(Ga))):(Ga||(Qi=Ao.now(),Ga=setInterval(W4,fg)),Ea=1,vg(Hf))}}function jf(e,t,r){var s=new Ji;return t=t==null?0:+t,s.restart(a=>{s.stop(),e(a+t)},t,r),s}var Y4=wl("start","end","cancel","interrupt"),X4=[],pg=0,Ff=1,yd=2,Ci=3,Bf=4,bd=5,Ti=6;function Sl(e,t,r,s,a,i){var o=e.__transition;if(!o)e.__transition={};else if(r in o)return;G4(e,r,{name:t,index:s,group:a,on:Y4,tween:X4,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:pg})}function uu(e,t){var r=yr(e,t);if(r.state>pg)throw new Error("too late; already scheduled");return r}function Hr(e,t){var r=yr(e,t);if(r.state>Ci)throw new Error("too late; already running");return r}function yr(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function G4(e,t,r){var s=e.__transition,a;s[t]=r,r.timer=hg(i,0,r.time);function i(u){r.state=Ff,r.timer.restart(o,r.delay,r.time),r.delay<=u&&o(u-r.delay)}function o(u){var v,p,f,g;if(r.state!==Ff)return c();for(v in s)if(g=s[v],g.name===r.name){if(g.state===Ci)return jf(o);g.state===Bf?(g.state=Ti,g.timer.stop(),g.on.call("interrupt",e,e.__data__,g.index,g.group),delete s[v]):+vyd&&s.state=0&&(t=t.slice(0,r)),!t||t==="start"})}function SS(e,t,r){var s,a,i=kS(t)?uu:Hr;return function(){var o=i(this,e),l=o.on;l!==s&&(a=(s=l).copy()).on(t,r),o.on=a}}function ES(e,t){var r=this._id;return arguments.length<2?yr(this.node(),r).on.on(e):this.each(SS(r,e,t))}function MS(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function CS(){return this.on("end.remove",MS(this._id))}function TS(e){var t=this._name,r=this._id;typeof e!="function"&&(e=ou(e));for(var s=this._groups,a=s.length,i=new Array(a),o=0;o()=>e;function $S(e,{sourceEvent:t,target:r,transform:s,dispatch:a}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},transform:{value:s,enumerable:!0,configurable:!0},_:{value:a}})}function Gr(e,t,r){this.k=e,this.x=t,this.y=r}Gr.prototype={constructor:Gr,scale:function(e){return e===1?this:new Gr(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Gr(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var El=new Gr(1,0,0);yg.prototype=Gr.prototype;function yg(e){for(;!e.__zoom;)if(!(e=e.parentNode))return El;return e.__zoom}function kc(e){e.stopImmediatePropagation()}function Za(e){e.preventDefault(),e.stopImmediatePropagation()}function eE(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function tE(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function Vf(){return this.__zoom||El}function nE(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function rE(){return navigator.maxTouchPoints||"ontouchstart"in this}function sE(e,t,r){var s=e.invertX(t[0][0])-r[0][0],a=e.invertX(t[1][0])-r[1][0],i=e.invertY(t[0][1])-r[0][1],o=e.invertY(t[1][1])-r[1][1];return e.translate(a>s?(s+a)/2:Math.min(0,s)||Math.max(0,a),o>i?(i+o)/2:Math.min(0,i)||Math.max(0,o))}function bg(){var e=eE,t=tE,r=sE,s=nE,a=rE,i=[0,1/0],o=[[-1/0,-1/0],[1/0,1/0]],l=250,c=Mi,u=wl("start","zoom","end"),v,p,f,g=500,_=150,x=0,k=10;function C(E){E.property("__zoom",Vf).on("wheel.zoom",X,{passive:!1}).on("mousedown.zoom",j).on("dblclick.zoom",P).filter(a).on("touchstart.zoom",A).on("touchmove.zoom",H).on("touchend.zoom touchcancel.zoom",L).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}C.transform=function(E,y,O,N){var B=E.selection?E.selection():E;B.property("__zoom",Vf),E!==B?R(E,y,O,N):B.interrupt().each(function(){D(this,arguments).event(N).start().zoom(null,typeof y=="function"?y.apply(this,arguments):y).end()})},C.scaleBy=function(E,y,O,N){C.scaleTo(E,function(){var B=this.__zoom.k,W=typeof y=="function"?y.apply(this,arguments):y;return B*W},O,N)},C.scaleTo=function(E,y,O,N){C.transform(E,function(){var B=t.apply(this,arguments),W=this.__zoom,Y=O==null?z(B):typeof O=="function"?O.apply(this,arguments):O,J=W.invert(Y),G=typeof y=="function"?y.apply(this,arguments):y;return r(M(T(W,G),Y,J),B,o)},O,N)},C.translateBy=function(E,y,O,N){C.transform(E,function(){return r(this.__zoom.translate(typeof y=="function"?y.apply(this,arguments):y,typeof O=="function"?O.apply(this,arguments):O),t.apply(this,arguments),o)},null,N)},C.translateTo=function(E,y,O,N,B){C.transform(E,function(){var W=t.apply(this,arguments),Y=this.__zoom,J=N==null?z(W):typeof N=="function"?N.apply(this,arguments):N;return r(El.translate(J[0],J[1]).scale(Y.k).translate(typeof y=="function"?-y.apply(this,arguments):-y,typeof O=="function"?-O.apply(this,arguments):-O),W,o)},N,B)};function T(E,y){return y=Math.max(i[0],Math.min(i[1],y)),y===E.k?E:new Gr(y,E.x,E.y)}function M(E,y,O){var N=y[0]-O[0]*E.k,B=y[1]-O[1]*E.k;return N===E.x&&B===E.y?E:new Gr(E.k,N,B)}function z(E){return[(+E[0][0]+ +E[1][0])/2,(+E[0][1]+ +E[1][1])/2]}function R(E,y,O,N){E.on("start.zoom",function(){D(this,arguments).event(N).start()}).on("interrupt.zoom end.zoom",function(){D(this,arguments).event(N).end()}).tween("zoom",function(){var B=this,W=arguments,Y=D(B,W).event(N),J=t.apply(B,W),G=O==null?z(J):typeof O=="function"?O.apply(B,W):O,ee=Math.max(J[1][0]-J[0][0],J[1][1]-J[0][1]),oe=B.__zoom,ge=typeof y=="function"?y.apply(B,W):y,U=c(oe.invert(G).concat(ee/oe.k),ge.invert(G).concat(ee/ge.k));return function($){if($===1)$=ge;else{var ae=U($),ne=ee/ae[2];$=new Gr(ne,G[0]-ae[0]*ne,G[1]-ae[1]*ne)}Y.zoom(null,$)}})}function D(E,y,O){return!O&&E.__zooming||new V(E,y)}function V(E,y){this.that=E,this.args=y,this.active=0,this.sourceEvent=null,this.extent=t.apply(E,y),this.taps=0}V.prototype={event:function(E){return E&&(this.sourceEvent=E),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(E,y){return this.mouse&&E!=="mouse"&&(this.mouse[1]=y.invert(this.mouse[0])),this.touch0&&E!=="touch"&&(this.touch0[1]=y.invert(this.touch0[0])),this.touch1&&E!=="touch"&&(this.touch1[1]=y.invert(this.touch1[0])),this.that.__zoom=y,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(E){var y=Jn(this.that).datum();u.call(E,this.that,new $S(E,{sourceEvent:this.sourceEvent,target:C,transform:this.that.__zoom,dispatch:u}),y)}};function X(E,...y){if(!e.apply(this,arguments))return;var O=D(this,y).event(E),N=this.__zoom,B=Math.max(i[0],Math.min(i[1],N.k*Math.pow(2,s.apply(this,arguments)))),W=cr(E);if(O.wheel)(O.mouse[0][0]!==W[0]||O.mouse[0][1]!==W[1])&&(O.mouse[1]=N.invert(O.mouse[0]=W)),clearTimeout(O.wheel);else{if(N.k===B)return;O.mouse=[W,N.invert(W)],Ii(this),O.start()}Za(E),O.wheel=setTimeout(Y,_),O.zoom("mouse",r(M(T(N,B),O.mouse[0],O.mouse[1]),O.extent,o));function Y(){O.wheel=null,O.end()}}function j(E,...y){if(f||!e.apply(this,arguments))return;var O=E.currentTarget,N=D(this,y,!0).event(E),B=Jn(E.view).on("mousemove.zoom",G,!0).on("mouseup.zoom",ee,!0),W=cr(E,O),Y=E.clientX,J=E.clientY;sg(E.view),kc(E),N.mouse=[W,this.__zoom.invert(W)],Ii(this),N.start();function G(oe){if(Za(oe),!N.moved){var ge=oe.clientX-Y,U=oe.clientY-J;N.moved=ge*ge+U*U>x}N.event(oe).zoom("mouse",r(M(N.that.__zoom,N.mouse[0]=cr(oe,O),N.mouse[1]),N.extent,o))}function ee(oe){B.on("mousemove.zoom mouseup.zoom",null),ag(oe.view,N.moved),Za(oe),N.event(oe).end()}}function P(E,...y){if(e.apply(this,arguments)){var O=this.__zoom,N=cr(E.changedTouches?E.changedTouches[0]:E,this),B=O.invert(N),W=O.k*(E.shiftKey?.5:2),Y=r(M(T(O,W),N,B),t.apply(this,y),o);Za(E),l>0?Jn(this).transition().duration(l).call(R,Y,N,E):Jn(this).call(C.transform,Y,N,E)}}function A(E,...y){if(e.apply(this,arguments)){var O=E.touches,N=O.length,B=D(this,y,E.changedTouches.length===N).event(E),W,Y,J,G;for(kc(E),Y=0;Y`Seems like you have not used ${e==="svelte"?"SvelteFlowProvider":"ReactFlowProvider"} as an ancestor. Help: https://${e}flow.dev/error#001`,error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:t,sourceHandle:r,targetHandle:s})=>`Couldn't create edge for ${e} handle id: "${e==="source"?r:s}", edge id: ${t}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs.",error016:e=>`Edge with id "${e}" does not exist, it may have been removed. This can happen when an edge is deleted before the "onEdgeClick" handler is called.`},wd=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],wg=["Enter"," ","Escape"],aE={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:e,x:t,y:r})=>`Moved selected node ${e}. New position, x: ${t}, y: ${r}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var Ma;(function(e){e.Strict="strict",e.Loose="loose"})(Ma||(Ma={}));var ha;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(ha||(ha={}));var $i;(function(e){e.Partial="partial",e.Full="full"})($i||($i={}));const xd={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var hs;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(hs||(hs={}));var el;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(el||(el={}));var ht;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(ht||(ht={}));const Wf={[ht.Left]:ht.Right,[ht.Right]:ht.Left,[ht.Top]:ht.Bottom,[ht.Bottom]:ht.Top},xg=e=>!!e&&typeof e=="object"&&"id"in e&&"source"in e&&"target"in e,oE=e=>!!e&&typeof e=="object"&&"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),vu=e=>!!e&&typeof e=="object"&&"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),Ko=(e,t=[0,0])=>{const{width:r,height:s}=jr(e),a=e.origin??t,i=r*a[0],o=s*a[1];return{x:e.position.x-i,y:e.position.y-o}},iE=(e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};let r=!1;const s=e.reduce((a,i)=>{const o=typeof i=="string";let l=!t.nodeLookup&&!o?i:void 0;return t.nodeLookup&&(l=o?t.nodeLookup.get(i):vu(i)?i:t.nodeLookup.get(i.id)),l?(r=!0,Ml(a,tl(l,t.nodeOrigin))):a},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return r?Cl(s):{x:0,y:0,width:0,height:0}},Yo=(e,t={})=>{let r={x:1/0,y:1/0,x2:-1/0,y2:-1/0},s=!1;return e.forEach(a=>{(t.filter===void 0||t.filter(a))&&(r=Ml(r,tl(a)),s=!0)}),s?Cl(r):{x:0,y:0,width:0,height:0}},hu=(e,t,[r,s,a]=[0,0,1],i=!1,o=!1)=>{const l=(t.x-r)/a,c=(t.y-s)/a,u=t.width/a,v=t.height/a,p=[];for(const f of e.values()){const{measured:g,selectable:_=!0,hidden:x=!1}=f;if(o&&!_||x)continue;const k=g.width??f.width??f.initialWidth??0,C=g.height??f.height??f.initialHeight??0,{x:T,y:M}=f.internals.positionAbsolute,z=Mg(l,c,u,v,T,M,k,C),R=k*C,D=i&&z>0;(!f.internals.handleBounds||D||z>=R||f.dragging)&&p.push(f)}return p},lE=(e,t)=>{const r=new Set;return e.forEach(s=>{r.add(s.id)}),t.filter(s=>r.has(s.source)||r.has(s.target))};function cE(e,t){const r=new Map,s=t?.nodes?new Set(t.nodes.map(a=>a.id)):null;return e.forEach(a=>{let i;if(t?.includeHiddenNodes){const{width:o,height:l}=jr(a);i=o>0&&l>0}else i=!!(a.measured.width&&a.measured.height&&!a.hidden);i&&(!s||s.has(a.id))&&r.set(a.id,a)}),r}async function dE({nodes:e,width:t,height:r,panZoom:s,minZoom:a,maxZoom:i},o){if(e.size===0)return!0;const l=cE(e,o),c=Yo(l),u=gu(c,t,r,o?.minZoom??a,o?.maxZoom??i,o?.padding??.1);return await s.setViewport(u,{duration:o?.duration,ease:o?.ease,interpolate:o?.interpolate}),!0}function kg({nodeId:e,nextPosition:t,nodeLookup:r,nodeOrigin:s=[0,0],nodeExtent:a,onError:i}){const o=r.get(e),l=o.parentId?r.get(o.parentId):void 0,{x:c,y:u}=l?l.internals.positionAbsolute:{x:0,y:0},v=o.origin??s;let p=o.extent||a;if(o.extent==="parent"&&!o.expandParent)if(!l)i?.("005",Xs.error005());else{const{width:g,height:_}=jr(l);g&&_&&(p=[[c,u],[c+g,u+_]])}else l&&Ia(o.extent)&&(p=[[o.extent[0][0]+c,o.extent[0][1]+u],[o.extent[1][0]+c,o.extent[1][1]+u]]);const f=Ia(p)?Gs(t,p,o.measured):t;return(o.measured.width===void 0||o.measured.height===void 0)&&i?.("015",Xs.error015()),{position:{x:f.x-c+(o.measured.width??0)*v[0],y:f.y-u+(o.measured.height??0)*v[1]},positionAbsolute:f}}async function uE({nodesToRemove:e=[],edgesToRemove:t=[],nodes:r,edges:s,onBeforeDelete:a}){const i=new Set(e.map(f=>f.id)),o=[];for(const f of r){if(f.deletable===!1)continue;const g=i.has(f.id),_=!g&&f.parentId&&o.find(x=>x.id===f.parentId);(g||_)&&o.push(f)}const l=new Set(t.map(f=>f.id)),c=s.filter(f=>f.deletable!==!1),v=lE(o,c);for(const f of c)l.has(f.id)&&!v.find(_=>_.id===f.id)&&v.push(f);if(!a)return{edges:v,nodes:o};const p=await a({nodes:o,edges:v});return typeof p=="boolean"?p?{edges:v,nodes:o}:{edges:[],nodes:[]}:p}const Ca=(e,t=0,r=1)=>Math.min(Math.max(e,t),r),Gs=(e={x:0,y:0},t,r)=>({x:Ca(e.x,t[0][0],t[1][0]-(r?.width??0)),y:Ca(e.y,t[0][1],t[1][1]-(r?.height??0))});function Sg(e,t,r){const{width:s,height:a}=jr(r),{x:i,y:o}=r.internals.positionAbsolute;return Gs(e,[[i,o],[i+s,o+a]],t)}const Kf=(e,t,r)=>er?-Ca(Math.abs(e-r),1,t)/t:0,pu=(e,t,r=15,s=40)=>{const a=Kf(e.x,s,t.width-s)*r,i=Kf(e.y,s,t.height-s)*r;return[a,i]},Ml=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),kd=({x:e,y:t,width:r,height:s})=>({x:e,y:t,x2:e+r,y2:t+s}),Cl=({x:e,y:t,x2:r,y2:s})=>({x:e,y:t,width:r-e,height:s-t}),No=(e,t=[0,0])=>{const{x:r,y:s}=vu(e)?e.internals.positionAbsolute:Ko(e,t);return{x:r,y:s,width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}},tl=(e,t=[0,0])=>{const{x:r,y:s}=vu(e)?e.internals.positionAbsolute:Ko(e,t);return{x:r,y:s,x2:r+(e.measured?.width??e.width??e.initialWidth??0),y2:s+(e.measured?.height??e.height??e.initialHeight??0)}},Eg=(e,t)=>Cl(Ml(kd(e),kd(t))),Mg=(e,t,r,s,a,i,o,l)=>{const c=Math.max(0,Math.min(e+r,a+o)-Math.max(e,a)),u=Math.max(0,Math.min(t+s,i+l)-Math.max(t,i));return Math.ceil(c*u)},nl=(e,t)=>Mg(e.x,e.y,e.width,e.height,t.x,t.y,t.width,t.height),Yf=e=>Zr(e.width)&&Zr(e.height)&&Zr(e.x)&&Zr(e.y),Zr=e=>!isNaN(e)&&isFinite(e),Cg=(e,t)=>(r,s)=>{},Xo=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),Go=({x:e,y:t},[r,s,a],i=!1,o=[1,1])=>{const l={x:(e-r)/a,y:(t-s)/a};return i?Xo(l,o):l},Ta=({x:e,y:t},[r,s,a])=>({x:e*a+r,y:t*a+s});function ea(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const r=parseFloat(e);if(!Number.isNaN(r))return Math.floor(r)}if(typeof e=="string"&&e.endsWith("%")){const r=parseFloat(e);if(!Number.isNaN(r))return Math.floor(t*r*.01)}return console.error(`The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function fE(e,t,r){if(typeof e=="string"||typeof e=="number"){const s=ea(e,r),a=ea(e,t);return{top:s,right:a,bottom:s,left:a,x:a*2,y:s*2}}if(typeof e=="object"){const s=ea(e.top??e.y??0,r),a=ea(e.bottom??e.y??0,r),i=ea(e.left??e.x??0,t),o=ea(e.right??e.x??0,t);return{top:s,right:o,bottom:a,left:i,x:i+o,y:s+a}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function vE(e,t,r,s,a,i){const{x:o,y:l}=Ta(e,[t,r,s]),{x:c,y:u}=Ta({x:e.x+e.width,y:e.y+e.height},[t,r,s]),v=a-c,p=i-u;return{left:Math.floor(o),top:Math.floor(l),right:Math.floor(v),bottom:Math.floor(p)}}const gu=(e,t,r,s,a,i)=>{const o=fE(i,t,r),l=(t-o.x)/e.width,c=(r-o.y)/e.height,u=Math.min(l,c),v=Ca(u,s,a),p=e.x+e.width/2,f=e.y+e.height/2,g=t/2-p*v,_=r/2-f*v,x=vE(e,g,_,v,t,r),k={left:Math.min(x.left-o.left,0),top:Math.min(x.top-o.top,0),right:Math.min(x.right-o.right,0),bottom:Math.min(x.bottom-o.bottom,0)};return{x:g-k.left+k.right,y:_-k.top+k.bottom,zoom:v}},zo=()=>typeof navigator<"u"&&navigator?.userAgent?.indexOf("Mac")>=0;function Ia(e){return e!=null&&e!=="parent"}function jr(e){return{width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}}function Tg(e){return(e.measured?.width??e.width??e.initialWidth)!==void 0&&(e.measured?.height??e.height??e.initialHeight)!==void 0}function hE(e,t={width:0,height:0},r,s,a){const i={...e},o=s.get(r);if(o){const l=o.origin||a;i.x+=o.internals.positionAbsolute.x-(t.width??0)*l[0],i.y+=o.internals.positionAbsolute.y-(t.height??0)*l[1]}return i}function pE(e){return{...aE,...e||{}}}function gE(e,t){if(!e&&!t)return!0;if(!e||!t||e.size!==t.size)return!1;if(!e.size&&!t.size)return!0;for(const r of e.keys())if(!t.has(r))return!1;return!0}function Xf(e,t,r){if(!r)return;const s=[];e.forEach((a,i)=>{t?.has(i)||s.push(a)}),s.length&&r(s)}function mE(e){return e===null?null:e?"valid":"invalid"}function Sc(e,{snapGrid:t=[0,0],snapToGrid:r=!1,transform:s,containerBounds:a}){const{x:i,y:o}=mr(e),l=Go({x:i-(a?.left??0),y:o-(a?.top??0)},s),{x:c,y:u}=r?Xo(l,t):l;return{xSnapped:c,ySnapped:u,...l}}const Ig=e=>({width:e.offsetWidth,height:e.offsetHeight}),Ag=e=>e?.getRootNode?.()||window?.document,_E=["INPUT","SELECT","TEXTAREA"];function Ng(e){const t=e.composedPath?.()?.[0]||e.target;return t?.nodeType!==1?!1:_E.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const zg=e=>"clientX"in e,mr=(e,t)=>{const r=zg(e),s=r?e.clientX:e.touches?.[0].clientX,a=r?e.clientY:e.touches?.[0].clientY;return{x:s-(t?.left??0),y:a-(t?.top??0)}},Gf=(e,t,r,s,a)=>{const i=t.querySelectorAll(`.${e}`);return!i||!i.length?null:Array.from(i).map(o=>{const l=o.getBoundingClientRect();return{id:o.getAttribute("data-handleid"),type:e,nodeId:a,position:o.getAttribute("data-handlepos"),x:(l.left-r.left)/s,y:(l.top-r.top)/s,...Ig(o)}})};function yE({sourceX:e,sourceY:t,targetX:r,targetY:s,sourceControlX:a,sourceControlY:i,targetControlX:o,targetControlY:l}){const c=e*.125+a*.375+o*.375+r*.125,u=t*.125+i*.375+l*.375+s*.125,v=Math.abs(c-e),p=Math.abs(u-t);return[c,u,v,p]}function ci(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function Zf({pos:e,x1:t,y1:r,x2:s,y2:a,c:i}){switch(e){case ht.Left:return[t-ci(t-s,i),r];case ht.Right:return[t+ci(s-t,i),r];case ht.Top:return[t,r-ci(r-a,i)];case ht.Bottom:return[t,r+ci(a-r,i)]}}function Pg({sourceX:e,sourceY:t,sourcePosition:r=ht.Bottom,targetX:s,targetY:a,targetPosition:i=ht.Top,curvature:o=.25}){const[l,c]=Zf({pos:r,x1:e,y1:t,x2:s,y2:a,c:o}),[u,v]=Zf({pos:i,x1:s,y1:a,x2:e,y2:t,c:o}),[p,f,g,_]=yE({sourceX:e,sourceY:t,targetX:s,targetY:a,sourceControlX:l,sourceControlY:c,targetControlX:u,targetControlY:v});return[`M${e},${t} C${l},${c} ${u},${v} ${s},${a}`,p,f,g,_]}function Lg({sourceX:e,sourceY:t,targetX:r,targetY:s}){const a=Math.abs(r-e)/2,i=r0}const xE=({source:e,sourceHandle:t,target:r,targetHandle:s})=>`xy-edge__${e}${t||""}-${r}${s||""}`,kE=(e,t)=>t.some(r=>r.source===e.source&&r.target===e.target&&(r.sourceHandle===e.sourceHandle||!r.sourceHandle&&!e.sourceHandle)&&(r.targetHandle===e.targetHandle||!r.targetHandle&&!e.targetHandle)),SE=(e,t,r={})=>{if(!e.source||!e.target)return r.onError?.("006",Xs.error006()),t;const s=r.getEdgeId||xE;let a;return xg(e)?a={...e}:a={...e,id:s(e)},kE(a,t)?t:(a.sourceHandle===null&&delete a.sourceHandle,a.targetHandle===null&&delete a.targetHandle,t.concat(a))};function Og({sourceX:e,sourceY:t,targetX:r,targetY:s}){const[a,i,o,l]=Lg({sourceX:e,sourceY:t,targetX:r,targetY:s});return[`M ${e},${t}L ${r},${s}`,a,i,o,l]}const Uf={[ht.Left]:{x:-1,y:0},[ht.Right]:{x:1,y:0},[ht.Top]:{x:0,y:-1},[ht.Bottom]:{x:0,y:1}},EE=({source:e,sourcePosition:t=ht.Bottom,target:r})=>t===ht.Left||t===ht.Right?e.xMath.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function ME({source:e,sourcePosition:t=ht.Bottom,target:r,targetPosition:s=ht.Top,center:a,offset:i,stepPosition:o}){const l=Uf[t],c=Uf[s],u={x:e.x+l.x*i,y:e.y+l.y*i},v={x:r.x+c.x*i,y:r.y+c.y*i},p=EE({source:u,sourcePosition:t,target:v}),f=p.x!==0?"x":"y",g=p[f];let _=[],x,k;const C={x:0,y:0},T={x:0,y:0},[,,M,z]=Lg({sourceX:e.x,sourceY:e.y,targetX:r.x,targetY:r.y});if(l[f]*c[f]===-1){f==="x"?(x=a.x??u.x+(v.x-u.x)*o,k=a.y??(u.y+v.y)/2):(x=a.x??(u.x+v.x)/2,k=a.y??u.y+(v.y-u.y)*o);const X=[{x,y:u.y},{x,y:v.y}],j=[{x:u.x,y:k},{x:v.x,y:k}];l[f]===g?_=f==="x"?X:j:_=f==="x"?j:X}else{const X=[{x:u.x,y:v.y}],j=[{x:v.x,y:u.y}];if(f==="x"?_=l.x===g?j:X:_=l.y===g?X:j,t===s){const E=Math.abs(e[f]-r[f]);if(E<=i){const y=Math.min(i-1,i-E);l[f]===g?C[f]=(u[f]>e[f]?-1:1)*y:T[f]=(v[f]>r[f]?-1:1)*y}}if(t!==s){const E=f==="x"?"y":"x",y=l[f]===c[E],O=u[E]>v[E],N=u[E]=L?(x=(P.x+A.x)/2,k=_[0].y):(x=_[0].x,k=(P.y+A.y)/2)}const R={x:u.x+C.x,y:u.y+C.y},D={x:v.x+T.x,y:v.y+T.y};return[[e,...R.x!==_[0].x||R.y!==_[0].y?[R]:[],..._,...D.x!==_[_.length-1].x||D.y!==_[_.length-1].y?[D]:[],r],x,k,M,z]}function CE(e,t,r,s){const a=Math.min(Qf(e,t)/2,Qf(t,r)/2,s),{x:i,y:o}=t;if(e.x===i&&i===r.x||e.y===o&&o===r.y)return`L${i} ${o}`;if(e.y===o){const u=e.xr.id===t):e[0])||null}function Sd(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(s=>`${s}=${e[s]}`).join("&")}`:""}function IE(e,{id:t,defaultColor:r,defaultMarkerStart:s,defaultMarkerEnd:a}){const i=new Set;return e.reduce((o,l)=>([l.markerStart||s,l.markerEnd||a].forEach(c=>{if(c&&typeof c=="object"){const u=Sd(c,t);i.has(u)||(o.push({id:u,color:c.color||r,...c}),i.add(u))}}),o),[]).sort((o,l)=>o.id.localeCompare(l.id))}const qg=1e3,AE=10,_u={nodeOrigin:[0,0],nodeExtent:wd,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},NE={..._u,checkEquality:!0};function yu(e,t){const r={...e};for(const s in t)t[s]!==void 0&&(r[s]=t[s]);return r}function zE(e,t,r){const s=yu(_u,r);for(const a of e.values())if(a.parentId)wu(a,e,t,s);else{const i=Ko(a,s.nodeOrigin),o=Ia(a.extent)?a.extent:s.nodeExtent,l=Gs(i,o,jr(a));a.internals.positionAbsolute=l}}function PE(e,t){if(!e.handles)return e.measured?t?.internals.handleBounds:void 0;const r=[],s=[];for(const a of e.handles){const i={id:a.id,width:a.width??1,height:a.height??1,nodeId:e.id,x:a.x,y:a.y,position:a.position,type:a.type};a.type==="source"?r.push(i):a.type==="target"&&s.push(i)}return{source:r,target:s}}function bu(e){return e==="manual"}function LE(e,t,r,s={}){const a=yu(NE,s),i={i:0},o=new Map(t),l=a?.elevateNodesOnSelect&&!bu(a.zIndexMode)?qg:0;let c=e.length>0,u=!1;t.clear(),r.clear();for(const v of e){let p=o.get(v.id);if(a.checkEquality&&v===p?.internals.userNode)t.set(v.id,p);else{const f=Ko(v,a.nodeOrigin),g=Ia(v.extent)?v.extent:a.nodeExtent,_=Gs(f,g,jr(v));p={...a.defaults,...v,measured:{width:v.measured?.width,height:v.measured?.height},internals:{positionAbsolute:_,handleBounds:PE(v,p),z:Dg(v,l,a.zIndexMode),userNode:v}},t.set(v.id,p)}(p.measured===void 0||p.measured.width===void 0||p.measured.height===void 0)&&!p.hidden&&(c=!1),v.parentId&&wu(p,t,r,s,i),u||=v.selected??!1}return{nodesInitialized:c,hasSelectedNodes:u}}function OE(e,t){if(!e.parentId)return;const r=t.get(e.parentId);r?r.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function wu(e,t,r,s,a){const{elevateNodesOnSelect:i,nodeOrigin:o,nodeExtent:l,zIndexMode:c}=yu(_u,s),u=e.parentId,v=t.get(u);if(!v){console.warn(`Parent node ${u} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}OE(e,r),a&&!v.parentId&&v.internals.rootParentIndex===void 0&&c==="auto"&&(v.internals.rootParentIndex=++a.i,v.internals.z=v.internals.z+a.i*AE),a&&v.internals.rootParentIndex!==void 0&&(a.i=v.internals.rootParentIndex);const p=i&&!bu(c)?qg:0,{x:f,y:g,z:_}=qE(e,v,o,l,p,c),{positionAbsolute:x}=e.internals,k=f!==x.x||g!==x.y;(k||_!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:k?{x:f,y:g}:x,z:_}})}function Dg(e,t,r){const s=Zr(e.zIndex)?e.zIndex:0;return bu(r)?s:s+(e.selected?t:0)}function qE(e,t,r,s,a,i){const{x:o,y:l}=t.internals.positionAbsolute,c=jr(e),u=Ko(e,r),v=Ia(e.extent)?Gs(u,e.extent,c):u;let p=Gs({x:o+v.x,y:l+v.y},s,c);e.extent==="parent"&&(p=Sg(p,c,t));const f=Dg(e,a,i),g=t.internals.z??0;return{x:p.x,y:p.y,z:g>=f?g+1:f}}function DE(e,t,r,s=[0,0]){const a=[],i=new Map;for(const o of e){const l=t.get(o.parentId);if(!l)continue;const c=i.get(o.parentId)?.expandedRect??No(l),u=Eg(c,o.rect);i.set(o.parentId,{expandedRect:u,parent:l})}return i.size>0&&i.forEach(({expandedRect:o,parent:l},c)=>{const u=l.internals.positionAbsolute,v=jr(l),p=l.origin??s,f=o.x0||g>0||k||C)&&(a.push({id:c,type:"position",position:{x:l.position.x-f+k,y:l.position.y-g+C}}),r.get(c)?.forEach(T=>{e.some(M=>M.id===T.id)||a.push({id:T.id,type:"position",position:{x:T.position.x+f,y:T.position.y+g}})})),(v.width0){const g=DE(f,t,r,a);u.push(...g)}return{changes:u,updatedInternals:c}}async function HE({delta:e,panZoom:t,transform:r,translateExtent:s,width:a,height:i}){if(!t||!e.x&&!e.y)return!1;const o=await t.setViewportConstrained({x:r[0]+e.x,y:r[1]+e.y,zoom:r[2]},[[0,0],[a,i]],s);return!!o&&(o.x!==r[0]||o.y!==r[1]||o.k!==r[2])}function tv(e,t,r,s,a,i){let o=a;const l=s.get(o)||new Map;s.set(o,l.set(r,t)),o=`${a}-${e}`;const c=s.get(o)||new Map;if(s.set(o,c.set(r,t)),i){o=`${a}-${e}-${i}`;const u=s.get(o)||new Map;s.set(o,u.set(r,t))}}function jE(e,t,r){e.clear(),t.clear();for(const s of r){const{source:a,target:i,sourceHandle:o=null,targetHandle:l=null}=s,c={edgeId:s.id,source:a,target:i,sourceHandle:o,targetHandle:l},u=`${a}-${o}--${i}-${l}`,v=`${i}-${l}--${a}-${o}`;tv("source",c,v,e,a,o),tv("target",c,u,e,i,l),t.set(s.id,s)}}function Rg(e,t){if(!e.parentId)return!1;const r=t.get(e.parentId);return r?r.selected?!0:Rg(r,t):!1}function nv(e,t,r){let s=e;do{if(s?.matches?.(t))return!0;if(s===r)return!1;s=s?.parentElement}while(s);return!1}function FE(e,t,r,s){const a=new Map;for(const[i,o]of e)if((o.selected||o.id===s)&&(!o.parentId||!Rg(o,e))&&(o.draggable||t&&typeof o.draggable>"u")){const l=e.get(i);l&&a.set(i,{id:i,position:l.position||{x:0,y:0},distance:{x:r.x-l.internals.positionAbsolute.x,y:r.y-l.internals.positionAbsolute.y},extent:l.extent,parentId:l.parentId,origin:l.origin,expandParent:l.expandParent,internals:{positionAbsolute:l.internals.positionAbsolute||{x:0,y:0}},measured:{width:l.measured.width??0,height:l.measured.height??0}})}return a}function Ec({nodeId:e,dragItems:t,nodeLookup:r,dragging:s=!0}){const a=[];for(const[o,l]of t){const c=r.get(o)?.internals.userNode;c&&a.push({...c,position:l.position,dragging:s})}if(!e)return[a[0],a];const i=r.get(e)?.internals.userNode;return[i?{...i,position:t.get(e)?.position||i.position,dragging:s}:a[0],a]}function BE({dragItems:e,snapGrid:t,x:r,y:s}){const a=e.values().next().value;if(!a)return null;const i={x:r-a.distance.x,y:s-a.distance.y},o=Xo(i,t);return{x:o.x-i.x,y:o.y-i.y}}function VE({onNodeMouseDown:e,getStoreItems:t,onDragStart:r,onDrag:s,onDragStop:a}){let i={x:null,y:null},o=0,l=new Map,c=!1,u={x:0,y:0},v=null,p=!1,f=null,g=!1,_=!1,x=null;function k({noDragClassName:T,handleSelector:M,domNode:z,isSelectable:R,nodeId:D,nodeClickDistance:V=0}){f=Jn(z);function X({x:H,y:L}){const{nodeLookup:E,nodeExtent:y,snapGrid:O,snapToGrid:N,nodeOrigin:B,onNodeDrag:W,onSelectionDrag:Y,onError:J,updateNodePositions:G}=t();i={x:H,y:L};let ee=!1;const oe=l.size>1,ge=oe&&y?kd(Yo(l)):null,U=oe&&N?BE({dragItems:l,snapGrid:O,x:H,y:L}):null;for(const[$,ae]of l){if(!E.has($))continue;let ne={x:H-ae.distance.x,y:L-ae.distance.y};N&&(ne=U?{x:Math.round(ne.x+U.x),y:Math.round(ne.y+U.y)}:Xo(ne,O));let re=null;if(oe&&y&&!ae.extent&&ge){const{positionAbsolute:Z}=ae.internals,ce=Z.x-ge.x+y[0][0],te=Z.x+ae.measured.width-ge.x2+y[1][0],ie=Z.y-ge.y+y[0][1],ve=Z.y+ae.measured.height-ge.y2+y[1][1];re=[[ce,ie],[te,ve]]}const{position:Q,positionAbsolute:K}=kg({nodeId:$,nextPosition:ne,nodeLookup:E,nodeExtent:re||y,nodeOrigin:B,onError:J});ee=ee||ae.position.x!==Q.x||ae.position.y!==Q.y,ae.position=Q,ae.internals.positionAbsolute=K}if(_=_||ee,!!ee&&(G(l,!0),x&&(s||W||!D&&Y))){const[$,ae]=Ec({nodeId:D,dragItems:l,nodeLookup:E});s?.(x,l,$,ae),W?.(x,$,ae),D||Y?.(x,ae)}}async function j(){if(!v)return;const{transform:H,panBy:L,autoPanSpeed:E,autoPanOnNodeDrag:y}=t();if(!y){c=!1,cancelAnimationFrame(o);return}const[O,N]=pu(u,v,E);(O!==0||N!==0)&&(i.x=(i.x??0)-O/H[2],i.y=(i.y??0)-N/H[2],await L({x:O,y:N})&&X(i)),o=requestAnimationFrame(j)}function P(H){const{nodeLookup:L,multiSelectionActive:E,nodesDraggable:y,transform:O,snapGrid:N,snapToGrid:B,selectNodesOnDrag:W,onNodeDragStart:Y,onSelectionDragStart:J,unselectNodesAndEdges:G}=t();p=!0,(!W||!R)&&!E&&D&&(L.get(D)?.selected||G()),R&&W&&D&&e?.(D);const ee=Sc(H.sourceEvent,{transform:O,snapGrid:N,snapToGrid:B,containerBounds:v});if(i=ee,l=FE(L,y,ee,D),l.size>0&&(r||Y||!D&&J)){const[oe,ge]=Ec({nodeId:D,dragItems:l,nodeLookup:L});r?.(H.sourceEvent,l,oe,ge),Y?.(H.sourceEvent,oe,ge),D||J?.(H.sourceEvent,ge)}}const A=f4().clickDistance(V).on("start",H=>{const{domNode:L,nodeDragThreshold:E,transform:y,snapGrid:O,snapToGrid:N}=t();v=L?.getBoundingClientRect()||null,g=!1,_=!1,x=H.sourceEvent,E===0&&P(H),i=Sc(H.sourceEvent,{transform:y,snapGrid:O,snapToGrid:N,containerBounds:v}),u=mr(H.sourceEvent,v)}).on("drag",H=>{const{autoPanOnNodeDrag:L,transform:E,snapGrid:y,snapToGrid:O,nodeDragThreshold:N,nodeLookup:B}=t(),W=Sc(H.sourceEvent,{transform:E,snapGrid:y,snapToGrid:O,containerBounds:v});if(x=H.sourceEvent,(H.sourceEvent.type==="touchmove"&&H.sourceEvent.touches.length>1||D&&!B.has(D))&&(g=!0),!g){if(!c&&L&&p&&(c=!0,j()),!p){const Y=mr(H.sourceEvent,v),J=Y.x-u.x,G=Y.y-u.y;Math.sqrt(J*J+G*G)>N&&P(H)}(i.x!==W.xSnapped||i.y!==W.ySnapped)&&l&&p&&(u=mr(H.sourceEvent,v),X(W))}}).on("end",H=>{if(!p||g){g&&l.size>0&&t().updateNodePositions(l,!1);return}if(c=!1,p=!1,cancelAnimationFrame(o),l.size>0){const{nodeLookup:L,updateNodePositions:E,onNodeDragStop:y,onSelectionDragStop:O}=t();if(_&&(E(l,!1),_=!1),a||y||!D&&O){const[N,B]=Ec({nodeId:D,dragItems:l,nodeLookup:L,dragging:!1});a?.(H.sourceEvent,l,N,B),y?.(H.sourceEvent,N,B),D||O?.(H.sourceEvent,B)}}}).filter(H=>{const L=H.target;return!H.button&&(!T||!nv(L,`.${T}`,z))&&(!M||nv(L,M,z))});f.call(A)}function C(){f?.on(".drag",null)}return{update:k,destroy:C}}function WE(e,t,r){const s=[],a={x:e.x-r,y:e.y-r,width:r*2,height:r*2};for(const i of t.values())nl(a,No(i))>0&&s.push(i);return s}const KE=250;function YE(e,t,r,s){let a=[],i=1/0;const o=WE(e,r,t+KE);for(const l of o){const c=[...l.internals.handleBounds?.source??[],...l.internals.handleBounds?.target??[]];for(const u of c){if(s.nodeId===u.nodeId&&s.type===u.type&&s.id===u.id)continue;const{x:v,y:p}=Zs(l,u,u.position,!0),f=Math.sqrt(Math.pow(v-e.x,2)+Math.pow(p-e.y,2));f>t||(f1){const l=s.type==="source"?"target":"source";return a.find(c=>c.type===l)??a[0]}return a[0]}function Hg(e,t,r,s,a,i=!1){const o=s.get(e);if(!o)return null;const l=a==="strict"?o.internals.handleBounds?.[t]:[...o.internals.handleBounds?.source??[],...o.internals.handleBounds?.target??[]],c=(r?l?.find(u=>u.id===r):l?.[0])??null;return c&&i?{...c,...Zs(o,c,c.position,!0)}:c}function jg(e,t){return e||(t?.classList.contains("target")?"target":t?.classList.contains("source")?"source":null)}function XE(e,t){let r=null;return t?r=!0:e&&!t&&(r=!1),r}const Fg=()=>!0;function GE(e,{connectionMode:t,connectionRadius:r,handleId:s,nodeId:a,edgeUpdaterType:i,isTarget:o,domNode:l,nodeLookup:c,lib:u,autoPanOnConnect:v,flowId:p,panBy:f,cancelConnection:g,onConnectStart:_,onConnect:x,onConnectEnd:k,isValidConnection:C=Fg,onReconnectEnd:T,updateConnection:M,getTransform:z,getFromHandle:R,autoPanSpeed:D,dragThreshold:V=1,handleDomNode:X}){const j=Ag(e.target);let P=0,A;const{x:H,y:L}=mr(e),E=jg(i,X),y=l?.getBoundingClientRect();let O=!1;if(!y||!E)return;const N=Hg(a,E,s,c,t);if(!N)return;let B=mr(e,y),W=!1,Y=null,J=!1,G=null;function ee(){if(!v||!y)return;const[Q,K]=pu(B,y,D);f({x:Q,y:K}),P=requestAnimationFrame(ee)}const oe={...N,nodeId:a,type:E,position:N.position},ge=c.get(a);let $={inProgress:!0,isValid:null,from:Zs(ge,oe,ht.Left,!0),fromHandle:oe,fromPosition:oe.position,fromNode:ge,to:B,toHandle:null,toPosition:Wf[oe.position],toNode:null,pointer:B};function ae(){O=!0,M($),_?.(e,{nodeId:a,handleId:s,handleType:E})}V===0&&ae();function ne(Q){if(!O){const{x:ve,y:fe}=mr(Q),pe=ve-H,ye=fe-L;if(!(pe*pe+ye*ye>V*V))return;ae()}if(!R()||!oe){re(Q);return}const K=z();B=mr(Q,y),A=YE(Go(B,K,!1,[1,1]),r,c,oe),W||(ee(),W=!0);const Z=Bg(Q,{handle:A,connectionMode:t,fromNodeId:a,fromHandleId:s,fromType:o?"target":"source",isValidConnection:C,doc:j,lib:u,flowId:p,nodeLookup:c});G=Z.handleDomNode,Y=Z.connection,J=XE(!!A,Z.isValid);const ce=c.get(a),te=ce?Zs(ce,oe,ht.Left,!0):$.from,ie={...$,from:te,isValid:J,to:Z.toHandle&&J?Ta({x:Z.toHandle.x,y:Z.toHandle.y},K):B,toHandle:Z.toHandle,toPosition:J&&Z.toHandle?Z.toHandle.position:Wf[oe.position],toNode:Z.toHandle?c.get(Z.toHandle.nodeId):null,pointer:B};M(ie),$=ie}function re(Q){if(!("touches"in Q&&Q.touches.length>0)){if(O){(A||G)&&Y&&J&&x?.(Y);const{inProgress:K,...Z}=$,ce={...Z,toPosition:$.toHandle?$.toPosition:null};k?.(Q,ce),i&&T?.(Q,ce)}g(),cancelAnimationFrame(P),W=!1,J=!1,Y=null,G=null,j.removeEventListener("mousemove",ne),j.removeEventListener("mouseup",re),j.removeEventListener("touchmove",ne),j.removeEventListener("touchend",re)}}j.addEventListener("mousemove",ne),j.addEventListener("mouseup",re),j.addEventListener("touchmove",ne),j.addEventListener("touchend",re)}function Bg(e,{handle:t,connectionMode:r,fromNodeId:s,fromHandleId:a,fromType:i,doc:o,lib:l,flowId:c,isValidConnection:u=Fg,nodeLookup:v}){const p=i==="target",f=t?o.querySelector(`.${l}-flow__handle[data-id="${c}-${t?.nodeId}-${t?.id}-${t?.type}"]`):null,{x:g,y:_}=mr(e),x=o.elementFromPoint(g,_),k=x?.classList.contains(`${l}-flow__handle`)?x:f,C={handleDomNode:k,isValid:!1,connection:null,toHandle:null};if(k){const T=jg(void 0,k),M=k.getAttribute("data-nodeid"),z=k.getAttribute("data-handleid"),R=k.classList.contains("connectable"),D=k.classList.contains("connectableend");if(!M||!T)return C;const V={source:p?M:s,sourceHandle:p?z:a,target:p?s:M,targetHandle:p?a:z};C.connection=V;const j=R&&D&&(r===Ma.Strict?p&&T==="source"||!p&&T==="target":M!==s||z!==a);C.isValid=j&&u(V),C.toHandle=Hg(M,T,z,v,r,!0)}return C}const rv={onPointerDown:GE,isValid:Bg};function ZE({domNode:e,panZoom:t,getTransform:r,getViewScale:s}){const a=Jn(e);function i({translateExtent:l,width:c,height:u,zoomStep:v=1,pannable:p=!0,zoomable:f=!0,inversePan:g=!1}){const _=M=>{if(M.sourceEvent.type!=="wheel"||!t)return;const z=r(),R=M.sourceEvent.ctrlKey&&zo()?10:1,D=-M.sourceEvent.deltaY*(M.sourceEvent.deltaMode===1?.05:M.sourceEvent.deltaMode?1:.002)*v,V=z[2]*Math.pow(2,D*R);t.scaleTo(V)};let x=[0,0];const k=M=>{(M.sourceEvent.type==="mousedown"||M.sourceEvent.type==="touchstart")&&(x=[M.sourceEvent.clientX??M.sourceEvent.touches[0].clientX,M.sourceEvent.clientY??M.sourceEvent.touches[0].clientY])},C=M=>{const z=r();if(M.sourceEvent.type!=="mousemove"&&M.sourceEvent.type!=="touchmove"||!t)return;const R=[M.sourceEvent.clientX??M.sourceEvent.touches[0].clientX,M.sourceEvent.clientY??M.sourceEvent.touches[0].clientY],D=[R[0]-x[0],R[1]-x[1]];x=R;const V=s()*Math.max(z[2],Math.log(z[2]))*(g?-1:1),X={x:z[0]-D[0]*V,y:z[1]-D[1]*V},j=[[0,0],[c,u]];t.setViewportConstrained({x:X.x,y:X.y,zoom:z[2]},j,l)},T=bg().on("start",k).on("zoom",p?C:null).on("zoom.wheel",f?_:null);a.call(T,{})}function o(){a.on("zoom",null)}return{update:i,destroy:o,pointer:cr}}const Tl=e=>({x:e.x,y:e.y,zoom:e.k}),Mc=({x:e,y:t,zoom:r})=>El.translate(e,t).scale(r),us=(e,t)=>e.target.closest(`.${t}`),Vg=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),UE=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,Cc=(e,t=0,r=UE,s=()=>{})=>{const a=typeof t=="number"&&t>0;return a||s(),a?e.transition().duration(t).ease(r).on("end",s):e},Wg=e=>{const t=e.ctrlKey&&zo()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function QE({zoomPanValues:e,noWheelClassName:t,d3Selection:r,d3Zoom:s,panOnScrollMode:a,panOnScrollSpeed:i,zoomOnPinch:o,onPanZoomStart:l,onPanZoom:c,onPanZoomEnd:u}){return v=>{if(us(v,t))return v.ctrlKey&&v.preventDefault(),!1;v.preventDefault(),v.stopImmediatePropagation();const p=r.property("__zoom").k||1;if(v.ctrlKey&&o){const k=cr(v),C=Wg(v),T=p*Math.pow(2,C);s.scaleTo(r,T,k,v);return}const f=v.deltaMode===1?20:1;let g=a===ha.Vertical?0:v.deltaX*f,_=a===ha.Horizontal?0:v.deltaY*f;!zo()&&v.shiftKey&&a!==ha.Vertical&&(g=v.deltaY*f,_=0),s.translateBy(r,-(g/p)*i,-(_/p)*i,{internal:!0});const x=Tl(r.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?c?.(v,x):(e.isPanScrolling=!0,l?.(v,x)),e.panScrollTimeout=setTimeout(()=>{u?.(v,x),e.isPanScrolling=!1},150)}}function JE({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:r}){return function(s,a){const i=s.type==="wheel",o=!t&&i&&!s.ctrlKey,l=us(s,e);if(s.ctrlKey&&i&&l&&s.preventDefault(),o||l)return null;s.preventDefault(),r.call(this,s,a)}}function $E({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:r}){return s=>{if(s.sourceEvent?.internal)return;const a=Tl(s.transform);e.mouseButton=s.sourceEvent?.button||0,e.isZoomingOrPanning=!0,e.prevViewport=a,s.sourceEvent?.type==="mousedown"&&t(!0),r&&r?.(s.sourceEvent,a)}}function eM({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:r,onTransformChange:s,onPanZoom:a}){return i=>{e.usedRightMouseButton=!!(r&&Vg(t,e.mouseButton??0)),i.sourceEvent?.sync||s([i.transform.x,i.transform.y,i.transform.k]),a&&!i.sourceEvent?.internal&&a?.(i.sourceEvent,Tl(i.transform))}}function tM({zoomPanValues:e,panOnDrag:t,panOnScroll:r,onDraggingChange:s,onPanZoomEnd:a,onPaneContextMenu:i}){return o=>{if(!o.sourceEvent?.internal&&(e.isZoomingOrPanning=!1,i&&Vg(t,e.mouseButton??0)&&!e.usedRightMouseButton&&o.sourceEvent&&i(o.sourceEvent),e.usedRightMouseButton=!1,s(!1),a)){const l=Tl(o.transform);e.prevViewport=l,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{a?.(o.sourceEvent,l)},r?150:0)}}}function nM({panActivationKeyPressed:e,zoomActivationKeyPressed:t,zoomOnScroll:r,zoomOnPinch:s,panOnDrag:a,panOnScroll:i,zoomOnDoubleClick:o,userSelectionActive:l,noWheelClassName:c,noPanClassName:u,lib:v,connectionInProgress:p}){return f=>{const g=t||r,_=s&&f.ctrlKey,x=f.type==="wheel";if(f.button===1&&f.type==="mousedown"&&(us(f,`${v}-flow__node`)||us(f,`${v}-flow__edge`)||us(f,`${v}-flow__selection`)||us(f,`${v}-flow__nodesselection`)))return!0;if(!a&&!g&&!i&&!o&&!s||l||p&&!x||us(f,c)&&x||us(f,u)&&(!x||i&&x&&!t)||!s&&f.ctrlKey&&x)return!1;if(!s&&f.type==="touchstart"&&f.touches?.length>1)return f.preventDefault(),!1;if(!g&&!i&&!_&&x||!a&&(f.type==="mousedown"||f.type==="touchstart")||Array.isArray(a)&&!a.includes(f.button)&&f.type==="mousedown")return!1;const k=Array.isArray(a)&&a.includes(f.button)||!f.button||f.button<=1;return(!f.ctrlKey||x||e)&&k}}function rM({domNode:e,minZoom:t,maxZoom:r,translateExtent:s,viewport:a,onPanZoom:i,onPanZoomStart:o,onPanZoomEnd:l,onDraggingChange:c}){const u={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},v=e.getBoundingClientRect();let p=[[0,0],[v.width,v.height]];(typeof ResizeObserver<"u"?new ResizeObserver(L=>{const E=L[0];E&&(p=[[0,0],[E.contentRect.width,E.contentRect.height]])}):null)?.observe(e);const g=bg().extent(()=>p).scaleExtent([t,r]).translateExtent(s),_=Jn(e).call(g);z({x:a.x,y:a.y,zoom:Ca(a.zoom,t,r)},[[0,0],[v.width,v.height]],s);const x=_.on("wheel.zoom"),k=_.on("dblclick.zoom");g.wheelDelta(Wg);async function C(L,E){return _?new Promise(y=>{g?.interpolate(E?.interpolate==="linear"?po:Mi).transform(Cc(_,E?.duration,E?.ease,()=>y(!0)),L)}):!1}function T({noWheelClassName:L,noPanClassName:E,onPaneContextMenu:y,userSelectionActive:O,panOnScroll:N,panOnDrag:B,panOnScrollMode:W,panOnScrollSpeed:Y,preventScrolling:J,zoomOnPinch:G,zoomOnScroll:ee,zoomOnDoubleClick:oe,panActivationKeyPressed:ge=!1,zoomActivationKeyPressed:U,lib:$,onTransformChange:ae,connectionInProgress:ne,paneClickDistance:re,selectionOnDrag:Q}){O&&!u.isZoomingOrPanning&&M();const K=N&&!U&&!O;g.clickDistance(Q?1/0:!Zr(re)||re<0?0:re);const Z=K?QE({zoomPanValues:u,noWheelClassName:L,d3Selection:_,d3Zoom:g,panOnScrollMode:W,panOnScrollSpeed:Y,zoomOnPinch:G,onPanZoomStart:o,onPanZoom:i,onPanZoomEnd:l}):JE({noWheelClassName:L,preventScrolling:J,d3ZoomHandler:x});_.on("wheel.zoom",Z,{passive:!1});const ce=$E({zoomPanValues:u,onDraggingChange:c,onPanZoomStart:o});g.on("start",ce);const te=eM({zoomPanValues:u,panOnDrag:B,onPaneContextMenu:!!y,onPanZoom:i,onTransformChange:ae});g.on("zoom",te);const ie=tM({zoomPanValues:u,panOnDrag:B,panOnScroll:N,onPaneContextMenu:y,onPanZoomEnd:l,onDraggingChange:c});g.on("end",ie);const ve=nM({panActivationKeyPressed:ge,zoomActivationKeyPressed:U,panOnDrag:B,zoomOnScroll:ee,panOnScroll:N,zoomOnDoubleClick:oe,zoomOnPinch:G,userSelectionActive:O,noPanClassName:E,noWheelClassName:L,lib:$,connectionInProgress:ne});g.filter(ve),oe?_.on("dblclick.zoom",k):_.on("dblclick.zoom",null)}function M(){g.on("zoom",null)}async function z(L,E,y){const O=Mc(L),N=g?.constrain()(O,E,y);return N&&await C(N),N}async function R(L,E){const y=Mc(L);return await C(y,E),y}function D(L){if(_){const E=Mc(L),y=_.property("__zoom");(y.k!==L.zoom||y.x!==L.x||y.y!==L.y)&&g?.transform(_,E,null,{sync:!0})}}function V(){const L=_?yg(_.node()):{x:0,y:0,k:1};return{x:L.x,y:L.y,zoom:L.k}}async function X(L,E){return _?new Promise(y=>{g?.interpolate(E?.interpolate==="linear"?po:Mi).scaleTo(Cc(_,E?.duration,E?.ease,()=>y(!0)),L)}):!1}async function j(L,E){return _?new Promise(y=>{g?.interpolate(E?.interpolate==="linear"?po:Mi).scaleBy(Cc(_,E?.duration,E?.ease,()=>y(!0)),L)}):!1}function P(L){g?.scaleExtent(L)}function A(L){g?.translateExtent(L)}function H(L){const E=!Zr(L)||L<0?0:L;g?.clickDistance(E)}return{update:T,destroy:M,setViewport:R,setViewportConstrained:z,getViewport:V,scaleTo:X,scaleBy:j,setScaleExtent:P,setTranslateExtent:A,syncViewport:D,setClickDistance:H}}var sv;(function(e){e.Line="line",e.Handle="handle"})(sv||(sv={}));const sM=Cg();function aM(e,t,r={}){return SE(e,t,{...r,onError:r.onError??sM})}function xu(){const e={};return[t=>{if(t&&!_1(e))throw new Error(t);return zd(e)},t=>Sh(e,t)]}const[oM,iM]=xu(),[lM,cM]=xu(),[dM,uM]=xu();var fM=new Set(["$$slots","$$events","$$legacy","id","type","position","style","class","isConnectable","isConnectableStart","isConnectableEnd","isValidConnection","onconnect","ondisconnect","children"]),vM=S("
      ");function On(e,t){We(t,!0);let r=Ie(t,"id",3,null),s=Ie(t,"type",3,"source"),a=Ie(t,"position",19,()=>ht.Top),i=Ie(t,"isConnectableStart",3,!0),o=Ie(t,"isConnectableEnd",3,!0),l=rs(t,fM);const c=oM("Handle must be used within a Custom Node component"),u=lM("Handle must be used within a Custom Node component");let v=b(()=>s()==="target"),p=b(()=>t.isConnectable!==void 0?t.isConnectable:u.value),f=xs(),g=b(()=>f.ariaLabelConfig),_=null;Kh(()=>{if(t.onconnect||t.ondisconnect){f.edges;let H=f.connectionLookup.get(`${c}-${s()}${r()?`-${r()}`:""}`);if(_&&!gE(H,_)){const L=H??new Map;Xf(_,L,t.ondisconnect),Xf(L,_,t.onconnect)}_=new Map(H)}});let x=b(()=>{if(!f.connection.inProgress)return[!1,!1,!1,!1,null];const{fromHandle:H,toHandle:L,isValid:E}=f.connection,y=H&&H.nodeId===c&&H.type===s()&&H.id===r(),O=L&&L.nodeId===c&&L.type===s()&&L.id===r(),N=f.connectionMode===Ma.Strict?H?.type!==s():c!==H?.nodeId||r()!==H?.id;return[!0,y,O,N,O&&E]}),k=b(()=>Fs(n(x),5)),C=b(()=>n(k)[0]),T=b(()=>n(k)[1]),M=b(()=>n(k)[2]),z=b(()=>n(k)[3]),R=b(()=>n(k)[4]);function D(H){const L=f.onbeforeconnect?f.onbeforeconnect(H):H;L&&(f.addEdge(L),f.onconnect?.(H))}function V(H){const L=zg(H);H.currentTarget&&(L&&H.button===0||!L)&&rv.onPointerDown(H,{handleId:r(),nodeId:c,isTarget:n(v),connectionRadius:f.connectionRadius,domNode:f.domNode,nodeLookup:f.nodeLookup,connectionMode:f.connectionMode,lib:"svelte",autoPanOnConnect:f.autoPanOnConnect,autoPanSpeed:f.autoPanSpeed,flowId:f.flowId,isValidConnection:t.isValidConnection||((...E)=>f.isValidConnection?.(...E)??!0),updateConnection:f.updateConnection,cancelConnection:f.cancelConnection,panBy:f.panBy,onConnect:D,onConnectStart:f.onconnectstart,onConnectEnd:(...E)=>f.onconnectend?.(...E),getTransform:()=>[f.viewport.x,f.viewport.y,f.viewport.zoom],getFromHandle:()=>f.connection.fromHandle,dragThreshold:f.connectionDragThreshold,handleDomNode:H.currentTarget})}function X(H){if(!c||!f.clickConnectStartHandle&&!i())return;if(!f.clickConnectStartHandle){f.onclickconnectstart?.(H,{nodeId:c,handleId:r(),handleType:s()}),f.clickConnectStartHandle={nodeId:c,type:s(),id:r()};return}const L=Ag(H.target),E=t.isValidConnection??f.isValidConnection,{connectionMode:y,clickConnectStartHandle:O,flowId:N,nodeLookup:B}=f,{connection:W,isValid:Y}=rv.isValid(H,{handle:{nodeId:c,id:r(),type:s()},connectionMode:y,fromNodeId:O.nodeId,fromHandleId:O.id??null,fromType:O.type,isValidConnection:E,flowId:N,doc:L,lib:"svelte",nodeLookup:B});Y&&W&&D(W);const J=structuredClone(kh(f.connection));delete J.inProgress,J.toPosition=J.toHandle?J.toHandle.position:null,f.onclickconnectend?.(H,J),f.clickConnectStartHandle=null}var j=vM(),P=()=>{};ns(j,()=>({"data-handleid":r(),"data-nodeid":c,"data-handlepos":a(),"data-id":`${f.flowId??""}-${c??""}-${r()??"null"??""}-${s()??""}`,class:["svelte-flow__handle",`svelte-flow__handle-${a()}`,f.noDragClass,f.noPanClass,a(),t.class],onmousedown:V,ontouchstart:V,onclick:f.clickConnect?X:void 0,onkeypress:P,style:t.style,role:"button","aria-label":n(g)["handle.ariaLabel"],tabindex:"-1",...l,[fs]:{valid:n(R),connectingto:n(M),connectingfrom:n(T),source:!n(v),target:n(v),connectablestart:i(),connectableend:o(),connectable:n(p),connectionindicator:n(p)&&(!n(C)||n(z))&&(n(C)||f.clickConnectStartHandle?o():i())}}));var A=d(j);Fn(A,()=>t.children??kn),m(e,j),Ke()}var hM=S(" ",1);function Kg(e,t){We(t,!0);let r=Ie(t,"targetPosition",19,()=>ht.Top),s=Ie(t,"sourcePosition",19,()=>ht.Bottom);var a=hM(),i=_e(a);On(i,{type:"target",get position(){return r()}});var o=h(i),l=h(o);On(l,{type:"source",get position(){return s()}}),I(()=>w(o,` ${t.data?.label??""} `)),m(e,a),Ke()}var pM=S(" ",1);function gM(e,t){We(t,!0);let r=Ie(t,"data",19,()=>({label:"Node"})),s=Ie(t,"sourcePosition",19,()=>ht.Bottom);var a=pM(),i=_e(a),o=h(i);On(o,{type:"source",get position(){return s()}}),I(()=>w(i,`${r()?.label??""} `)),m(e,a),Ke()}var mM=S(" ",1);function _M(e,t){We(t,!0);let r=Ie(t,"data",19,()=>({label:"Node"})),s=Ie(t,"targetPosition",19,()=>ht.Top);var a=mM(),i=_e(a),o=h(i);On(o,{type:"target",get position(){return s()}}),I(()=>w(i,`${r()?.label??""} `)),m(e,a),Ke()}function yM(e,t){}function Tc(e,t,r){if(!r||!t)return;const s=r==="root"?t:t.querySelector(`.svelte-flow__${r}`);s&&s.appendChild(e)}function Yg(e,t){const r=b(xs),s=b(()=>n(r).domNode);let a;return n(s)?Tc(e,n(s),t):a=Yh(()=>{vt(()=>{Tc(e,n(s),t),a?.()})}),{async update(i){Tc(e,n(s),i)},destroy(){e.parentNode&&e.parentNode.removeChild(e),a?.()}}}function Xg(){let e=he(typeof window>"u");if(n(e)){const t=Yh(()=>{vt(()=>{q(e,!1),t?.()})})}return{get value(){return n(e)}}}const av=e=>oE(e),bM=e=>xg(e);function Dr(e){return e===void 0?void 0:`${e}px`}const rl={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};var wM=new Set(["$$slots","$$events","$$legacy","x","y","width","height","selectEdgeOnClick","transparent","class","children"]),xM=S("
      ");function Gg(e,t){We(t,!0);let r=Ie(t,"x",3,0),s=Ie(t,"y",3,0),a=Ie(t,"selectEdgeOnClick",3,!1),i=Ie(t,"transparent",3,!1),o=rs(t,wM);const l=xs(),c=dM("EdgeLabel must be used within a Custom Edge component");let u=b(()=>l.visible.edges.get(c)?.zIndex);var v=xM(),p=()=>{a()&&c&&l.handleEdgeSelection(c)};ns(v,g=>({class:["svelte-flow__edge-label",{transparent:i()},t.class],tabindex:"-1",onclick:p,...o,[Mr]:g}),[()=>({display:Xg().value?"none":void 0,cursor:a()?"pointer":void 0,transform:`translate(-50%, -50%) translate(${r()??""}px,${s()??""}px)`,"pointer-events":"all",width:Dr(t.width),height:Dr(t.height),"z-index":n(u)})],void 0,void 0,"svelte-1wg91mu");var f=d(v);Fn(f,()=>t.children??kn),In(v,(g,_)=>Yg?.(g,_),()=>"edge-labels"),m(e,v),Ke()}var kM=new Set(["$$slots","$$events","$$legacy","id","path","label","labelX","labelY","labelStyle","markerStart","markerEnd","style","interactionWidth","class"]),SM=Jt(""),EM=Jt('',1);function Js(e,t){let r=Ie(t,"interactionWidth",3,20),s=rs(t,kM);var a=EM(),i=_e(a),o=h(i);{var l=v=>{var p=SM();ns(p,()=>({d:t.path,"stroke-opacity":0,"stroke-width":r(),fill:"none",class:"svelte-flow__edge-interaction",...s})),m(v,p)};F(o,v=>{r()>0&&v(l)})}var c=h(o);{var u=v=>{Gg(v,{get x(){return t.labelX},get y(){return t.labelY},get style(){return t.labelStyle},selectEdgeOnClick:!0,children:(p,f)=>{var g=Yt();I(()=>w(g,t.label)),m(p,g)},$$slots:{default:!0}})};F(c,v=>{t.label&&v(u)})}I(()=>{se(i,"id",t.id),se(i,"d",t.path),qe(i,0,bs(["svelte-flow__edge-path",t.class])),se(i,"marker-start",t.markerStart),se(i,"marker-end",t.markerEnd),rt(i,t.style)}),m(e,a)}function Zg(e,t){We(t,!0);let r=b(()=>Pg({sourceX:t.sourceX,sourceY:t.sourceY,targetX:t.targetX,targetY:t.targetY,sourcePosition:t.sourcePosition,targetPosition:t.targetPosition,curvature:t.pathOptions?.curvature})),s=b(()=>Fs(n(r),3)),a=b(()=>n(s)[0]),i=b(()=>n(s)[1]),o=b(()=>n(s)[2]);Js(e,{get id(){return t.id},get path(){return n(a)},get labelX(){return n(i)},get labelY(){return n(o)},get label(){return t.label},get labelStyle(){return t.labelStyle},get markerStart(){return t.markerStart},get markerEnd(){return t.markerEnd},get interactionWidth(){return t.interactionWidth},get style(){return t.style}}),Ke()}function MM(e,t){We(t,!0);let r=b(()=>mu({sourceX:t.sourceX,sourceY:t.sourceY,targetX:t.targetX,targetY:t.targetY,sourcePosition:t.sourcePosition,targetPosition:t.targetPosition})),s=b(()=>Fs(n(r),3)),a=b(()=>n(s)[0]),i=b(()=>n(s)[1]),o=b(()=>n(s)[2]);Js(e,{get path(){return n(a)},get labelX(){return n(i)},get labelY(){return n(o)},get label(){return t.label},get labelStyle(){return t.labelStyle},get markerStart(){return t.markerStart},get markerEnd(){return t.markerEnd},get interactionWidth(){return t.interactionWidth},get style(){return t.style}}),Ke()}function CM(e,t){We(t,!0);let r=b(()=>Og({sourceX:t.sourceX,sourceY:t.sourceY,targetX:t.targetX,targetY:t.targetY})),s=b(()=>Fs(n(r),3)),a=b(()=>n(s)[0]),i=b(()=>n(s)[1]),o=b(()=>n(s)[2]);Js(e,{get path(){return n(a)},get labelX(){return n(i)},get labelY(){return n(o)},get label(){return t.label},get labelStyle(){return t.labelStyle},get markerStart(){return t.markerStart},get markerEnd(){return t.markerEnd},get interactionWidth(){return t.interactionWidth},get style(){return t.style}}),Ke()}function TM(e,t){We(t,!0);let r=b(()=>mu({sourceX:t.sourceX,sourceY:t.sourceY,targetX:t.targetX,targetY:t.targetY,sourcePosition:t.sourcePosition,targetPosition:t.targetPosition,borderRadius:0})),s=b(()=>Fs(n(r),3)),a=b(()=>n(s)[0]),i=b(()=>n(s)[1]),o=b(()=>n(s)[2]);Js(e,{get path(){return n(a)},get labelX(){return n(i)},get labelY(){return n(o)},get label(){return t.label},get labelStyle(){return t.labelStyle},get markerStart(){return t.markerStart},get markerEnd(){return t.markerEnd},get interactionWidth(){return t.interactionWidth},get style(){return t.style}}),Ke()}class IM{#e;#n;constructor(t,r){this.#e=t,this.#n=Ih(r)}get current(){return this.#n(),this.#e()}}const AM=/\(.+\)/,NM=new Set(["all","print","screen","and","or","not","only"]);class zM extends IM{constructor(t,r){let s=AM.test(t)||t.split(/[\s,]+/).some(i=>NM.has(i.trim()))?t:`(${t})`;const a=window.matchMedia(s);super(()=>a.matches,i=>Uc(a,"change",i))}}function PM(e,t,r,s){const a=new Map;return hu(e,{x:0,y:0,width:r,height:s},t,!0).forEach(i=>{a.set(i.id,i)}),a}function ov(e){const{edges:t,defaultEdgeOptions:r,nodeLookup:s,previousEdges:a,connectionMode:i,onerror:o,onlyRenderVisible:l,elevateEdgesOnSelect:c,zIndexMode:u}=e,v=new Map;for(const p of t){const f=s.get(p.source),g=s.get(p.target);if(!f||!g)continue;if(l){const{visibleNodes:k,transform:C,width:T,height:M}=e;if(wE({sourceNode:f,targetNode:g,width:T,height:M,transform:C}))k.set(f.id,f),k.set(g.id,g);else continue}const _=a.get(p.id);if(_&&p===_.edge&&f==_.sourceNode&&g==_.targetNode){v.set(p.id,_);continue}const x=TE({id:p.id,sourceNode:f,targetNode:g,sourceHandle:p.sourceHandle||null,targetHandle:p.targetHandle||null,connectionMode:i,onError:o});x&&v.set(p.id,{...r,...p,...x,zIndex:bE({selected:p.selected,zIndex:p.zIndex??r.zIndex,sourceNode:f,targetNode:g,elevateOnSelect:c,zIndexMode:u}),sourceNode:f,targetNode:g,edge:p})}return v}const LM=Cg(),Ug={input:gM,output:_M,default:Kg,group:yM},Qg={straight:CM,smoothstep:MM,default:Zg,step:TM};function OM(e,t,r,s,a,i){if(t&&!r&&s&&a){const o=Yo(i,{filter:l=>!!((l.width||l.initialWidth)&&(l.height||l.initialHeight))});return gu(o,s,a,.5,2,.1)}else return r??{x:0,y:0,zoom:1}}function qM(e){class t{#e=b(()=>e.props.id??"1");get flowId(){return n(this.#e)}set flowId(s){q(this.#e,s)}#n=he(null);get domNode(){return n(this.#n)}set domNode(s){q(this.#n,s)}#t=he(null);get panZoom(){return n(this.#t)}set panZoom(s){q(this.#t,s)}#i=he(e.width??0);get width(){return n(this.#i)}set width(s){q(this.#i,s)}#s=he(e.height??0);get height(){return n(this.#s)}set height(s){q(this.#s,s)}#o=he(e.props.zIndexMode??"basic");get zIndexMode(){return n(this.#o)}set zIndexMode(s){q(this.#o,s)}#r=b(()=>{const{nodesInitialized:s}=LE(e.nodes,this.nodeLookup,this.parentLookup,{nodeExtent:this.nodeExtent,nodeOrigin:this.nodeOrigin,elevateNodesOnSelect:e.props.elevateNodesOnSelect??!0,checkEquality:!0,zIndexMode:this.zIndexMode});return this.fitViewQueued&&s&&(this.fitViewOptions?.duration?this.resolveFitView():queueMicrotask(()=>{this.resolveFitView()})),s});get nodesInitialized(){return n(this.#r)}set nodesInitialized(s){q(this.#r,s)}#l=b(()=>this.panZoom!==null);get viewportInitialized(){return n(this.#l)}set viewportInitialized(s){q(this.#l,s)}#a=b(()=>(jE(this.connectionLookup,this.edgeLookup,e.edges),e.edges));get _edges(){return n(this.#a)}set _edges(s){q(this.#a,s)}get nodes(){return this.nodesInitialized,e.nodes}set nodes(s){e.nodes=s}get edges(){return this._edges}set edges(s){e.edges=s}_prevSelectedNodes=[];_prevSelectedNodeIds=new Set;#p=b(()=>{const s=this._prevSelectedNodeIds.size,a=new Set,i=this.nodes.filter(o=>(o.selected&&(a.add(o.id),this._prevSelectedNodeIds.delete(o.id)),o.selected));return(s!==a.size||this._prevSelectedNodeIds.size>0)&&(this._prevSelectedNodes=i),this._prevSelectedNodeIds=a,this._prevSelectedNodes});get selectedNodes(){return n(this.#p)}set selectedNodes(s){q(this.#p,s)}_prevSelectedEdges=[];_prevSelectedEdgeIds=new Set;#c=b(()=>{const s=this._prevSelectedEdgeIds.size,a=new Set,i=this.edges.filter(o=>(o.selected&&(a.add(o.id),this._prevSelectedEdgeIds.delete(o.id)),o.selected));return(s!==a.size||this._prevSelectedEdgeIds.size>0)&&(this._prevSelectedEdges=i),this._prevSelectedEdgeIds=a,this._prevSelectedEdges});get selectedEdges(){return n(this.#c)}set selectedEdges(s){q(this.#c,s)}selectionChangeHandlers=new Map;nodeLookup=new Map;parentLookup=new Map;connectionLookup=new Map;edgeLookup=new Map;_prevVisibleEdges=new Map;#d=b(()=>{const{nodes:s,_edges:a,_prevVisibleEdges:i,nodeLookup:o,connectionMode:l,onerror:c,onlyRenderVisibleElements:u,defaultEdgeOptions:v,zIndexMode:p}=this;let f,g;const _={edges:a,defaultEdgeOptions:v,previousEdges:i,nodeLookup:o,connectionMode:l,elevateEdgesOnSelect:e.props.elevateEdgesOnSelect??!0,zIndexMode:p,onerror:c};if(u){const{viewport:x,width:k,height:C}=this,T=[x.x,x.y,x.zoom];f=PM(o,T,k,C),g=ov({..._,onlyRenderVisible:!0,visibleNodes:f,transform:T,width:k,height:C})}else f=this.nodeLookup,g=ov(_);return this._prevVisibleEdges=g,{nodes:f,edges:g}});get visible(){return n(this.#d)}set visible(s){q(this.#d,s)}#f=b(()=>e.props.nodesDraggable??!0);get nodesDraggable(){return n(this.#f)}set nodesDraggable(s){q(this.#f,s)}#g=b(()=>e.props.nodesConnectable??!0);get nodesConnectable(){return n(this.#g)}set nodesConnectable(s){q(this.#g,s)}#u=b(()=>e.props.elementsSelectable??!0);get elementsSelectable(){return n(this.#u)}set elementsSelectable(s){q(this.#u,s)}#_=b(()=>e.props.nodesFocusable??!0);get nodesFocusable(){return n(this.#_)}set nodesFocusable(s){q(this.#_,s)}#m=b(()=>e.props.edgesFocusable??!0);get edgesFocusable(){return n(this.#m)}set edgesFocusable(s){q(this.#m,s)}#w=b(()=>e.props.disableKeyboardA11y??!1);get disableKeyboardA11y(){return n(this.#w)}set disableKeyboardA11y(s){q(this.#w,s)}#y=b(()=>e.props.minZoom??.5);get minZoom(){return n(this.#y)}set minZoom(s){q(this.#y,s)}#x=b(()=>e.props.maxZoom??2);get maxZoom(){return n(this.#x)}set maxZoom(s){q(this.#x,s)}#v=b(()=>e.props.nodeOrigin??[0,0]);get nodeOrigin(){return n(this.#v)}set nodeOrigin(s){q(this.#v,s)}#b=b(()=>e.props.nodeExtent??wd);get nodeExtent(){return n(this.#b)}set nodeExtent(s){q(this.#b,s)}#h=b(()=>e.props.translateExtent??wd);get translateExtent(){return n(this.#h)}set translateExtent(s){q(this.#h,s)}#k=b(()=>e.props.defaultEdgeOptions??{});get defaultEdgeOptions(){return n(this.#k)}set defaultEdgeOptions(s){q(this.#k,s)}#S=b(()=>e.props.nodeDragThreshold??1);get nodeDragThreshold(){return n(this.#S)}set nodeDragThreshold(s){q(this.#S,s)}#E=b(()=>e.props.autoPanOnNodeDrag??!0);get autoPanOnNodeDrag(){return n(this.#E)}set autoPanOnNodeDrag(s){q(this.#E,s)}#M=b(()=>e.props.autoPanOnConnect??!0);get autoPanOnConnect(){return n(this.#M)}set autoPanOnConnect(s){q(this.#M,s)}#C=b(()=>e.props.autoPanOnNodeFocus??!0);get autoPanOnNodeFocus(){return n(this.#C)}set autoPanOnNodeFocus(s){q(this.#C,s)}#T=b(()=>e.props.autoPanSpeed??15);get autoPanSpeed(){return n(this.#T)}set autoPanSpeed(s){q(this.#T,s)}#I=b(()=>e.props.connectionDragThreshold??1);get connectionDragThreshold(){return n(this.#I)}set connectionDragThreshold(s){q(this.#I,s)}fitViewQueued=e.props.fitView??!1;fitViewOptions=e.props.fitViewOptions;fitViewResolver=null;#A=b(()=>e.props.snapGrid??null);get snapGrid(){return n(this.#A)}set snapGrid(s){q(this.#A,s)}#N=he(!1);get dragging(){return n(this.#N)}set dragging(s){q(this.#N,s)}#z=he(null);get selectionRect(){return n(this.#z)}set selectionRect(s){q(this.#z,s)}#P=he(!1);get selectionKeyPressed(){return n(this.#P)}set selectionKeyPressed(s){q(this.#P,s)}#L=he(!1);get multiselectionKeyPressed(){return n(this.#L)}set multiselectionKeyPressed(s){q(this.#L,s)}#O=he(!1);get deleteKeyPressed(){return n(this.#O)}set deleteKeyPressed(s){q(this.#O,s)}#q=he(!1);get panActivationKeyPressed(){return n(this.#q)}set panActivationKeyPressed(s){q(this.#q,s)}#D=he(!1);get zoomActivationKeyPressed(){return n(this.#D)}set zoomActivationKeyPressed(s){q(this.#D,s)}#R=he(null);get selectionRectMode(){return n(this.#R)}set selectionRectMode(s){q(this.#R,s)}#H=he("");get ariaLiveMessage(){return n(this.#H)}set ariaLiveMessage(s){q(this.#H,s)}#j=b(()=>e.props.selectionMode??$i.Partial);get selectionMode(){return n(this.#j)}set selectionMode(s){q(this.#j,s)}#F=b(()=>({...Ug,...e.props.nodeTypes}));get nodeTypes(){return n(this.#F)}set nodeTypes(s){q(this.#F,s)}#B=b(()=>({...Qg,...e.props.edgeTypes}));get edgeTypes(){return n(this.#B)}set edgeTypes(s){q(this.#B,s)}#V=b(()=>e.props.noPanClass??"nopan");get noPanClass(){return n(this.#V)}set noPanClass(s){q(this.#V,s)}#W=b(()=>e.props.noDragClass??"nodrag");get noDragClass(){return n(this.#W)}set noDragClass(s){q(this.#W,s)}#K=b(()=>e.props.noWheelClass??"nowheel");get noWheelClass(){return n(this.#K)}set noWheelClass(s){q(this.#K,s)}#Y=b(()=>pE(e.props.ariaLabelConfig));get ariaLabelConfig(){return n(this.#Y)}set ariaLabelConfig(s){q(this.#Y,s)}#X=he(OM(this.nodesInitialized,e.props.fitView,e.props.initialViewport,this.width,this.height,this.nodeLookup));get _viewport(){return n(this.#X)}set _viewport(s){q(this.#X,s)}get viewport(){return e.viewport??this._viewport}set viewport(s){e.viewport&&(e.viewport=s),this._viewport=s}#G=he(xd);get _connection(){return n(this.#G)}set _connection(s){q(this.#G,s)}#Z=b(()=>this._connection.inProgress?{...this._connection,to:Go(this._connection.to,[this.viewport.x,this.viewport.y,this.viewport.zoom])}:this._connection);get connection(){return n(this.#Z)}set connection(s){q(this.#Z,s)}#U=b(()=>e.props.connectionMode??Ma.Strict);get connectionMode(){return n(this.#U)}set connectionMode(s){q(this.#U,s)}#Q=b(()=>e.props.connectionRadius??20);get connectionRadius(){return n(this.#Q)}set connectionRadius(s){q(this.#Q,s)}#J=b(()=>e.props.isValidConnection??(()=>!0));get isValidConnection(){return n(this.#J)}set isValidConnection(s){q(this.#J,s)}#$=b(()=>e.props.selectNodesOnDrag??!0);get selectNodesOnDrag(){return n(this.#$)}set selectNodesOnDrag(s){q(this.#$,s)}#ee=b(()=>e.props.defaultMarkerColor===void 0?"#b1b1b7":e.props.defaultMarkerColor);get defaultMarkerColor(){return n(this.#ee)}set defaultMarkerColor(s){q(this.#ee,s)}#te=b(()=>IE(e.edges,{defaultColor:this.defaultMarkerColor,id:this.flowId,defaultMarkerStart:this.defaultEdgeOptions.markerStart,defaultMarkerEnd:this.defaultEdgeOptions.markerEnd}));get markers(){return n(this.#te)}set markers(s){q(this.#te,s)}#ne=b(()=>e.props.onlyRenderVisibleElements??!1);get onlyRenderVisibleElements(){return n(this.#ne)}set onlyRenderVisibleElements(s){q(this.#ne,s)}#re=b(()=>e.props.onflowerror??LM);get onerror(){return n(this.#re)}set onerror(s){q(this.#re,s)}#se=b(()=>e.props.ondelete);get ondelete(){return n(this.#se)}set ondelete(s){q(this.#se,s)}#ae=b(()=>e.props.onbeforedelete);get onbeforedelete(){return n(this.#ae)}set onbeforedelete(s){q(this.#ae,s)}#oe=b(()=>e.props.onbeforeconnect);get onbeforeconnect(){return n(this.#oe)}set onbeforeconnect(s){q(this.#oe,s)}#ie=b(()=>e.props.onconnect);get onconnect(){return n(this.#ie)}set onconnect(s){q(this.#ie,s)}#le=b(()=>e.props.onconnectstart);get onconnectstart(){return n(this.#le)}set onconnectstart(s){q(this.#le,s)}#ce=b(()=>e.props.onconnectend);get onconnectend(){return n(this.#ce)}set onconnectend(s){q(this.#ce,s)}#de=b(()=>e.props.onbeforereconnect);get onbeforereconnect(){return n(this.#de)}set onbeforereconnect(s){q(this.#de,s)}#ue=b(()=>e.props.onreconnect);get onreconnect(){return n(this.#ue)}set onreconnect(s){q(this.#ue,s)}#fe=b(()=>e.props.onreconnectstart);get onreconnectstart(){return n(this.#fe)}set onreconnectstart(s){q(this.#fe,s)}#ve=b(()=>e.props.onreconnectend);get onreconnectend(){return n(this.#ve)}set onreconnectend(s){q(this.#ve,s)}#he=b(()=>e.props.clickConnect??!0);get clickConnect(){return n(this.#he)}set clickConnect(s){q(this.#he,s)}#pe=b(()=>e.props.onclickconnectstart);get onclickconnectstart(){return n(this.#pe)}set onclickconnectstart(s){q(this.#pe,s)}#ge=b(()=>e.props.onclickconnectend);get onclickconnectend(){return n(this.#ge)}set onclickconnectend(s){q(this.#ge,s)}#me=he(null);get clickConnectStartHandle(){return n(this.#me)}set clickConnectStartHandle(s){q(this.#me,s)}#_e=b(()=>e.props.onselectiondrag);get onselectiondrag(){return n(this.#_e)}set onselectiondrag(s){q(this.#_e,s)}#ye=b(()=>e.props.onselectiondragstart);get onselectiondragstart(){return n(this.#ye)}set onselectiondragstart(s){q(this.#ye,s)}#be=b(()=>e.props.onselectiondragstop);get onselectiondragstop(){return n(this.#be)}set onselectiondragstop(s){q(this.#be,s)}resolveFitView=async()=>{this.panZoom&&(await dE({nodes:this.nodeLookup,width:this.width,height:this.height,panZoom:this.panZoom,minZoom:this.minZoom,maxZoom:this.maxZoom},this.fitViewOptions),this.fitViewResolver?.resolve(!0),this.fitViewQueued=!1,this.fitViewOptions=void 0,this.fitViewResolver=null)};_prefersDark=new zM("(prefers-color-scheme: dark)",e.props.colorModeSSR==="dark");#we=b(()=>e.props.colorMode==="system"?this._prefersDark.current?"dark":"light":e.props.colorMode??"light");get colorMode(){return n(this.#we)}set colorMode(s){q(this.#we,s)}constructor(){}resetStoreValues(){this.dragging=!1,this.selectionRect=null,this.selectionRectMode=null,this.selectionKeyPressed=!1,this.multiselectionKeyPressed=!1,this.deleteKeyPressed=!1,this.panActivationKeyPressed=!1,this.zoomActivationKeyPressed=!1,this._connection=xd,this.clickConnectStartHandle=null,this.viewport=e.props.initialViewport??{x:0,y:0,zoom:1},this.ariaLiveMessage=""}}return new t}const DM=Xs.error001("svelte");function xs(){const e=zd(Ed);if(!e)throw new Error(DM);return e.getStore()}const Ed=Symbol();function RM(e){const t=qM(e);function r(A){t.nodeTypes={...Ug,...A}}function s(A){t.edgeTypes={...Qg,...A}}function a(A){t.edges=aM(A,t.edges,{onError:t.onerror})}const i=(A,H=!1)=>{t.nodes=t.nodes.map(L=>{if(t.connection.inProgress&&t.connection.fromNode.id===L.id){const y=t.nodeLookup.get(L.id);y&&(t.connection={...t.connection,from:Zs(y,t.connection.fromHandle,ht.Left,!0)})}const E=A.get(L.id);return E?{...L,position:E.position,dragging:H}:L})};function o(A){const{changes:H,updatedInternals:L}=RE(A,t.nodeLookup,t.parentLookup,t.domNode,t.nodeOrigin,t.nodeExtent,t.zIndexMode);if(!L)return;zE(t.nodeLookup,t.parentLookup,{nodeOrigin:t.nodeOrigin,nodeExtent:t.nodeExtent,zIndexMode:t.zIndexMode}),t.fitViewQueued&&t.resolveFitView();const E=new Map;for(const y of H){const O=t.nodeLookup.get(y.id)?.internals.userNode;if(!O)continue;const N={...O};switch(y.type){case"dimensions":{const B={...N.measured,...y.dimensions};y.setAttributes&&(N.width=y.dimensions?.width??N.width,N.height=y.dimensions?.height??N.height),N.measured=B;break}case"position":N.position=y.position??N.position;break}E.set(y.id,N)}t.nodes=t.nodes.map(y=>E.get(y.id)??y)}function l(A){const H=t.fitViewResolver??Promise.withResolvers();return t.fitViewQueued=!0,t.fitViewOptions=A,t.fitViewResolver=H,t.nodes=[...t.nodes],H.promise}async function c(A,H,L){const E=typeof L?.zoom<"u"?L.zoom:t.maxZoom,y=t.panZoom;return y?(await y.setViewport({x:t.width/2-A*E,y:t.height/2-H*E,zoom:E},{duration:L?.duration,ease:L?.ease,interpolate:L?.interpolate}),!0):!1}async function u(A,H){const L=t.panZoom;return L?L.scaleBy(A,H):!1}async function v(A){return u(1.2,A)}function p(A){return u(1/1.2,A)}function f(A){const H=t.panZoom;H&&(H.setScaleExtent([A,t.maxZoom]),t.minZoom=A)}function g(A){const H=t.panZoom;H&&(H.setScaleExtent([t.minZoom,A]),t.maxZoom=A)}function _(A){const H=t.panZoom;H&&(H.setTranslateExtent(A),t.translateExtent=A)}function x(A,H=null){let L=!1;const E=A.map(y=>(H?H.has(y.id):!0)&&y.selected?(L=!0,{...y,selected:!1}):y);return[L,E]}function k(A){const H=A?.nodes?new Set(A.nodes.map(B=>B.id)):null,[L,E]=x(t.nodes,H);L&&(t.nodes=E);const y=A?.edges?new Set(A.edges.map(B=>B.id)):null,[O,N]=x(t.edges,y);O&&(t.edges=N)}function C(A){const H=t.multiselectionKeyPressed;t.nodes=t.nodes.map(L=>{const E=A.includes(L.id),y=H&&L.selected||E;return!!L.selected!==y?{...L,selected:y}:L}),H||k({nodes:[]})}function T(A){const H=t.multiselectionKeyPressed;t.edges=t.edges.map(L=>{const E=A.includes(L.id),y=H&&L.selected||E;return!!L.selected!==y?{...L,selected:y}:L}),H||k({edges:[]})}function M(A,H,L){const E=t.nodeLookup.get(A);if(!E){t.onerror("012",Xs.error012(A));return}t.selectionRect=null,t.selectionRectMode=null,E.selected?(H||E.selected&&t.multiselectionKeyPressed)&&(k({nodes:[E.internals.userNode],edges:[]}),requestAnimationFrame(()=>L?.blur())):C([A])}function z(A){const H=t.edgeLookup.get(A);if(!H){t.onerror("016",Xs.error016(A));return}(H.selectable||t.elementsSelectable&&typeof H.selectable>"u")&&(t.selectionRect=null,t.selectionRectMode=null,H.selected?H.selected&&t.multiselectionKeyPressed&&k({nodes:[],edges:[H]}):T([A]))}function R(A,H){const{nodeExtent:L,snapGrid:E,nodeOrigin:y,nodeLookup:O,nodesDraggable:N,onerror:B}=t,W=new Map,Y=E?.[0]??5,J=E?.[1]??5,G=A.x*Y*H,ee=A.y*J*H;for(const oe of O.values()){if(!(oe.selected&&(oe.draggable||N&&typeof oe.draggable>"u")))continue;let U={x:oe.internals.positionAbsolute.x+G,y:oe.internals.positionAbsolute.y+ee};E&&(U=Xo(U,E));const{position:$,positionAbsolute:ae}=kg({nodeId:oe.id,nextPosition:U,nodeLookup:O,nodeExtent:L,nodeOrigin:y,onError:B});oe.position=$,oe.internals.positionAbsolute=ae,W.set(oe.id,oe)}i(W)}function D(A){return HE({delta:A,panZoom:t.panZoom,transform:[t.viewport.x,t.viewport.y,t.viewport.zoom],translateExtent:t.translateExtent,width:t.width,height:t.height})}const V=A=>{t._connection={...A}};function X(){t._connection=xd}function j(){t.resetStoreValues(),k()}return Object.assign(t,{setNodeTypes:r,setEdgeTypes:s,addEdge:a,updateNodePositions:i,updateNodeInternals:o,zoomIn:v,zoomOut:p,fitView:l,setCenter:c,setMinZoom:f,setMaxZoom:g,setTranslateExtent:_,unselectNodesAndEdges:k,addSelectedNodes:C,addSelectedEdges:T,handleNodeSelection:M,handleEdgeSelection:z,moveSelectedNodes:R,panBy:D,updateConnection:V,cancelConnection:X,reset:j})}function HM(e,t){const{minZoom:r,maxZoom:s,initialViewport:a,onPanZoomStart:i,onPanZoom:o,onPanZoomEnd:l,translateExtent:c,setPanZoomInstance:u,onDraggingChange:v,onTransformChange:p}=t,f=rM({domNode:e,minZoom:r,maxZoom:s,translateExtent:c,viewport:a,onPanZoom:o,onPanZoomStart:i,onPanZoomEnd:l,onDraggingChange:v}),g=f.getViewport();return(a.x!==g.x||a.y!==g.y||a.zoom!==g.zoom)&&p([g.x,g.y,g.zoom]),u(f),f.update(t),{update(_){f.update(_)}}}var jM=S('
      ');function FM(e,t){We(t,!0);let r=Ie(t,"store",15),s=b(()=>r().panActivationKeyPressed||t.panOnDrag),a=b(()=>r().panActivationKeyPressed||t.panOnScroll);const{viewport:i}=r();let o=!1;vt(()=>{!o&&r().viewportInitialized&&(t.oninit?.(),o=!0)});var l=jM(),c=d(l);Fn(c,()=>t.children),In(l,(u,v)=>HM?.(u,v),()=>({viewport:r().viewport,minZoom:r().minZoom,maxZoom:r().maxZoom,initialViewport:i,onDraggingChange:u=>{r(r().dragging=u,!0)},setPanZoomInstance:u=>{r(r().panZoom=u,!0)},onPanZoomStart:t.onmovestart,onPanZoom:t.onmove,onPanZoomEnd:t.onmoveend,zoomOnScroll:t.zoomOnScroll,zoomOnDoubleClick:t.zoomOnDoubleClick,zoomOnPinch:t.zoomOnPinch,panOnScroll:n(a),panOnDrag:n(s),panOnScrollSpeed:t.panOnScrollSpeed,panOnScrollMode:t.panOnScrollMode,panActivationKeyPressed:r().panActivationKeyPressed,zoomActivationKeyPressed:r().zoomActivationKeyPressed,preventScrolling:typeof t.preventScrolling=="boolean"?t.preventScrolling:!0,noPanClassName:r().noPanClass,noWheelClassName:r().noWheelClass,userSelectionActive:!!r().selectionRect,translateExtent:r().translateExtent,lib:"svelte",paneClickDistance:t.paneClickDistance,selectionOnDrag:t.selectionOnDrag,onTransformChange:u=>{r(r().viewport={x:u[0],y:u[1],zoom:u[2]},!0)},connectionInProgress:r().connection.inProgress})),m(e,l),Ke()}function iv(e,t){return r=>{r.target===t&&e?.(r)}}function lv(e){return t=>{const r=e.has(t.id);return!!t.selected!==r?{...t,selected:r}:t}}function cv(e,t){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}var BM=S("
      ");function VM(e,t){We(t,!0);let r=Ie(t,"store",15),s=Ie(t,"panOnDrag",3,!0),a=Ie(t,"paneClickDistance",3,1),i=Ie(t,"autoPanOnSelection",3,!0),o,l=null,c=!1,u=new Set,v=new Set,p=b(()=>r().panActivationKeyPressed||s()),f=b(()=>r().selectionKeyPressed||!!r().selectionRect||t.selectionOnDrag&&n(p)!==!0),g=b(()=>r().elementsSelectable&&(n(f)||r().selectionRectMode==="user")),_=!1,x=0,k={x:0,y:0},C=!1;function T(N){if(N.pointerType==="touch"&&n(p)!==!1&&!r().selectionKeyPressed||(l=o?.getBoundingClientRect(),!l))return;const B=N.target===o,W=!B&&!!N.target.closest(".nokey"),Y=t.selectionOnDrag&&B||r().selectionKeyPressed;if(W||!n(f)||!Y||N.button!==0||!N.isPrimary)return;N.target?.setPointerCapture?.(N.pointerId),_=!1,C=!1;const{x:J,y:G}=mr(N,l),ee=Go({x:J,y:G},[r().viewport.x,r().viewport.y,r().viewport.zoom]);r(r().selectionRect={width:0,height:0,startX:ee.x,startY:ee.y,x:J,y:G},!0),B||(N.stopPropagation(),N.preventDefault())}function M(N,B){if(r().selectionRect?.startX===void 0||r().selectionRect.startY===void 0)return;const W={x:r().selectionRect?.startX,y:r().selectionRect?.startY},Y=Ta(W,[r().viewport.x,r().viewport.y,r().viewport.zoom]),J={startX:W.x,startY:W.y,x:Nge.id));const oe=r().defaultEdgeOptions.selectable??!0;v=new Set;for(const ge of u){const U=r().connectionLookup.get(ge);if(U)for(const{edgeId:$}of U.values()){const ae=r().edgeLookup.get($);ae&&(ae.selectable??oe)&&v.add($)}}cv(G,u)||r(r().nodes=r().nodes.map(lv(u)),!0),cv(ee,v)||r(r().edges=r().edges.map(lv(v)),!0),r(r().selectionRectMode="user",!0),r(r().selectionRect=J,!0)}function z(){if(!i()||!l)return;const[N,B]=pu(k,l,r().autoPanSpeed);r().panBy({x:N,y:B}).then(W=>{if(!_||!W){x=requestAnimationFrame(z);return}M(k.x,k.y),x=requestAnimationFrame(z)})}function R(){cancelAnimationFrame(x),x=0,C=!1}pl(()=>{typeof window<"u"&&R()});function D(N){if(!n(f)||!l||!r().selectionRect)return;const B=mr(N,l);k={x:B.x,y:B.y};const W={x:r().selectionRect.startX,y:r().selectionRect.startY},Y=Ta(W,[r().viewport.x,r().viewport.y,r().viewport.zoom]);if(!_){const J=r().selectionKeyPressed?0:a();if(Math.hypot(B.x-Y.x,B.y-Y.y)<=J)return;r().unselectNodesAndEdges(),t.onselectionstart?.(N)}_=!0,C||(z(),C=!0),M(B.x,B.y)}function V(N){if(!n(g)){N.target===o&&r().connection.inProgress&&(c=!0);return}N.button===0&&(N.target?.releasePointerCapture?.(N.pointerId),!_&&N.target===o&&A?.(N),r(r().selectionRect=null,!0),_&&r(r().selectionRectMode=u.size>0?"nodes":null,!0),_&&t.onselectionend?.(N),R())}function X(N){N.target?.releasePointerCapture?.(N.pointerId),R()}const j=N=>{if(Array.isArray(n(p))&&n(p).includes(2)){N.preventDefault();return}t.onpanecontextmenu?.({event:N})},P=N=>{_&&(N.stopPropagation(),_=!1)};function A(N){if(_||r().connection.inProgress||c){_=!1,c=!1;return}t.onpaneclick?.({event:N}),r().unselectNodesAndEdges(),r(r().selectionRectMode=null,!0),r(r().selectionRect=null,!0)}var H=BM();let L;var E=b(()=>n(g)?void 0:iv(A,o)),y=b(()=>iv(j,o)),O=d(H);Fn(O,()=>t.children),Ut(H,N=>o=N,()=>o),I(N=>L=qe(H,1,"svelte-flow__pane svelte-flow__container",null,L,N),[()=>({draggable:s()===!0||Array.isArray(s())&&s().includes(0),dragging:r().dragging,selection:n(f)})]),xe("click",H,function(...N){n(E)?.apply(this,N)}),ft("pointerdown",H,function(...N){(n(g)?T:void 0)?.apply(this,N)},!0),xe("pointermove",H,function(...N){(n(g)?D:void 0)?.apply(this,N)}),xe("pointerup",H,V),ft("pointercancel",H,function(...N){(n(g)?X:void 0)?.apply(this,N)}),xe("contextmenu",H,function(...N){n(y)?.apply(this,N)}),ft("click",H,function(...N){(n(g)?P:void 0)?.apply(this,N)},!0),m(e,H),Ke()}St(["click","pointermove","pointerup","contextmenu"]);var WM=S('
      ');function KM(e,t){We(t,!0);var r=WM();let s;var a=d(r);Fn(a,()=>t.children),I(()=>s=rt(r,"",s,{transform:`translate(${t.store.viewport.x??""}px, ${t.store.viewport.y??""}px) scale(${t.store.viewport.zoom??""})`})),m(e,r),Ke()}function Jg(e,t){const{store:r,onDrag:s,onDragStart:a,onDragStop:i,onNodeMouseDown:o}=t,l=VE({onDrag:s,onDragStart:a,onDragStop:i,onNodeMouseDown:o,getStoreItems:()=>{const{snapGrid:u,viewport:v}=r;return{nodes:r.nodes,nodeLookup:r.nodeLookup,edges:r.edges,nodeExtent:r.nodeExtent,snapGrid:u||[0,0],snapToGrid:!!u,nodeOrigin:r.nodeOrigin,multiSelectionActive:r.multiselectionKeyPressed,domNode:r.domNode,transform:[v.x,v.y,v.zoom],autoPanOnNodeDrag:r.autoPanOnNodeDrag,nodesDraggable:r.nodesDraggable,selectNodesOnDrag:r.selectNodesOnDrag,nodeDragThreshold:r.nodeDragThreshold,unselectNodesAndEdges:r.unselectNodesAndEdges,updateNodePositions:r.updateNodePositions,onSelectionDrag:r.onselectiondrag,onSelectionDragStart:r.onselectiondragstart,onSelectionDragStop:r.onselectiondragstop,panBy:r.panBy}}});function c(u,v){if(v.disabled){l.destroy();return}l.update({domNode:u,noDragClassName:v.noDragClass,handleSelector:v.handleSelector,nodeId:v.nodeId,isSelectable:v.isSelectable,nodeClickDistance:v.nodeClickDistance})}return c(e,t),{update(u){c(e,u)},destroy(){l.destroy()}}}var YM=S('
      '),XM=S('
      ',1);function GM(e,t){We(t,!0);var r=XM(),s=_e(r),a=d(s),i=h(s,2),o=d(i),l=h(i,2);{var c=u=>{var v=YM(),p=d(v);I(()=>{se(v,"id",`${ZM}-${t.store.flowId}`),w(p,t.store.ariaLiveMessage)}),m(u,v)};F(l,u=>{t.store.disableKeyboardA11y||u(c)})}I(()=>{se(s,"id",`${$g}-${t.store.flowId}`),w(a,t.store.disableKeyboardA11y?t.store.ariaLabelConfig["node.a11yDescription.default"]:t.store.ariaLabelConfig["node.a11yDescription.keyboardDisabled"]),se(i,"id",`${em}-${t.store.flowId}`),w(o,t.store.ariaLabelConfig["edge.a11yDescription.default"])}),m(e,r),Ke()}const $g="svelte-flow__node-desc",em="svelte-flow__edge-desc",ZM="svelte-flow__aria-live";var UM=S("
      ");function QM(e,t){We(t,!0);let r=Ie(t,"store",15),s=b(()=>Pn(t.node.data,()=>({}),!0)),a=b(()=>Pn(t.node.selected,!1)),i=b(()=>t.node.draggable),o=b(()=>t.node.selectable),l=b(()=>Pn(t.node.deletable,!0)),c=b(()=>t.node.connectable),u=b(()=>t.node.focusable),v=b(()=>Pn(t.node.hidden,!1)),p=b(()=>Pn(t.node.dragging,!1)),f=b(()=>Pn(t.node.style,"")),g=b(()=>t.node.class),_=b(()=>Pn(t.node.type,"default")),x=b(()=>t.node.parentId),k=b(()=>t.node.sourcePosition),C=b(()=>t.node.targetPosition),T=b(()=>Pn(t.node.measured,()=>({width:0,height:0}),!0).width),M=b(()=>Pn(t.node.measured,()=>({width:0,height:0}),!0).height),z=b(()=>t.node.initialWidth),R=b(()=>t.node.initialHeight),D=b(()=>t.node.width),V=b(()=>t.node.height),X=b(()=>t.node.dragHandle),j=b(()=>Pn(t.node.internals.z,0)),P=b(()=>t.node.internals.positionAbsolute.x),A=b(()=>t.node.internals.positionAbsolute.y),H=b(()=>t.node.internals.userNode),{id:L}=t.node,E=b(()=>n(i)??r().nodesDraggable),y=b(()=>n(o)??r().elementsSelectable),O=b(()=>n(c)??r().nodesConnectable),N=b(()=>Tg(t.node)),B=b(()=>!!t.node.internals.handleBounds),W=b(()=>n(N)&&n(B)),Y=b(()=>n(u)??r().nodesFocusable);function J(fe){return r().parentLookup.has(fe)}let G=b(()=>J(L)),ee=he(null),oe=null,ge=n(_),U=n(k),$=n(C),ae=b(()=>r().nodeTypes[n(_)]??Kg),ne=b(()=>r().ariaLabelConfig),re={get value(){return n(O)}};iM(L),cM(re);let Q=b(()=>{const fe=n(T)===void 0?n(D)??n(z):n(D),pe=n(M)===void 0?n(V)??n(R):n(V);if(!(fe===void 0&&pe===void 0&&n(f)===void 0))return`${n(f)};${fe?`width:${Dr(fe)};`:""}${pe?`height:${Dr(pe)};`:""}`});vt(()=>{(n(_)!==ge||n(k)!==U||n(C)!==$)&&n(ee)!==null&&requestAnimationFrame(()=>{n(ee)!==null&&r().updateNodeInternals(new Map([[L,{id:L,nodeElement:n(ee),force:!0}]]))}),ge=n(_),U=n(k),$=n(C)}),vt(()=>{t.resizeObserver&&(!n(W)||n(ee)!==oe)&&(oe&&t.resizeObserver.unobserve(oe),n(ee)&&t.resizeObserver.observe(n(ee)),oe=n(ee))}),pl(()=>{oe&&t.resizeObserver?.unobserve(oe)});function K(fe){n(y)&&(!r().selectNodesOnDrag||!n(E)||r().nodeDragThreshold>0)&&r().handleNodeSelection(L),t.onnodeclick?.({node:n(H),event:fe})}function Z(fe){if(!(Ng(fe)||r().disableKeyboardA11y))if(wg.includes(fe.key)&&n(y)){const pe=fe.key==="Escape";r().handleNodeSelection(L,pe,n(ee))}else n(E)&&t.node.selected&&Object.prototype.hasOwnProperty.call(rl,fe.key)&&(fe.preventDefault(),r(r().ariaLiveMessage=n(ne)["node.a11yDescription.ariaLiveMessage"]({direction:fe.key.replace("Arrow","").toLowerCase(),x:~~t.node.internals.positionAbsolute.x,y:~~t.node.internals.positionAbsolute.y}),!0),r().moveSelectedNodes(rl[fe.key],fe.shiftKey?4:1))}const ce=()=>{if(r().disableKeyboardA11y||!r().autoPanOnNodeFocus||!n(ee)?.matches(":focus-visible"))return;const{width:fe,height:pe,viewport:ye}=r();hu(new Map([[L,t.node]]),{x:0,y:0,width:fe,height:pe},[ye.x,ye.y,ye.zoom],!0).length>0||r().setCenter(t.node.position.x+(t.node.measured.width??0)/2,t.node.position.y+(t.node.measured.height??0)/2,{zoom:ye.zoom})};var te=Et(),ie=_e(te);{var ve=fe=>{var pe=UM();ns(pe,()=>({"data-id":L,class:["svelte-flow__node",`svelte-flow__node-${n(_)}`,n(g)],style:n(Q),onclick:K,onpointerenter:t.onnodepointerenter?Pe=>t.onnodepointerenter({node:n(H),event:Pe}):void 0,onpointerleave:t.onnodepointerleave?Pe=>t.onnodepointerleave({node:n(H),event:Pe}):void 0,onpointermove:t.onnodepointermove?Pe=>t.onnodepointermove({node:n(H),event:Pe}):void 0,oncontextmenu:t.onnodecontextmenu?Pe=>t.onnodecontextmenu({node:n(H),event:Pe}):void 0,onkeydown:n(Y)?Z:void 0,onfocus:n(Y)?ce:void 0,tabIndex:n(Y)?0:void 0,role:t.node.ariaRole??(n(Y)?"group":void 0),"aria-label":t.node.ariaLabel,"aria-roledescription":"node","aria-describedby":r().disableKeyboardA11y?void 0:`${$g}-${r().flowId}`,...t.node.domAttributes,[fs]:{dragging:n(p),selected:n(a),draggable:n(E),connectable:n(O),selectable:n(y),nopan:n(E),parent:n(G)},[Mr]:{"z-index":n(j),transform:`translate(${n(P)??""}px, ${n(A)??""}px)`,visibility:n(N)?"visible":"hidden"}}));var ye=d(pe);gl(ye,()=>n(ae),(Pe,de)=>{de(Pe,{get data(){return n(s)},get id(){return L},get selected(){return n(a)},get selectable(){return n(y)},get deletable(){return n(l)},get sourcePosition(){return n(k)},get targetPosition(){return n(C)},get zIndex(){return n(j)},get dragging(){return n(p)},get draggable(){return n(E)},get dragHandle(){return n(X)},get parentId(){return n(x)},get type(){return n(_)},get isConnectable(){return n(O)},get positionAbsoluteX(){return n(P)},get positionAbsoluteY(){return n(A)},get width(){return n(D)},get height(){return n(V)}})}),In(pe,(Pe,de)=>Jg?.(Pe,de),()=>({nodeId:L,isSelectable:n(y),disabled:!n(E),handleSelector:n(X),noDragClass:r().noDragClass,nodeClickDistance:t.nodeClickDistance,onNodeMouseDown:r().handleNodeSelection,onDrag:(Pe,de,be,Ee)=>{t.onnodedrag?.({event:Pe,targetNode:be,nodes:Ee})},onDragStart:(Pe,de,be,Ee)=>{t.onnodedragstart?.({event:Pe,targetNode:be,nodes:Ee})},onDragStop:(Pe,de,be,Ee)=>{t.onnodedragstop?.({event:Pe,targetNode:be,nodes:Ee})},store:r()})),Ut(pe,Pe=>q(ee,Pe),()=>n(ee)),m(fe,pe)};F(ie,fe=>{n(v)||fe(ve)})}m(e,te),Ke()}var JM=S('
      ');function $M(e,t){We(t,!0);let r=Ie(t,"store",15);const s=typeof ResizeObserver>"u"?null:new ResizeObserver(i=>{const o=new Map;i.forEach(l=>{const c=l.target.getAttribute("data-id");o.set(c,{id:c,nodeElement:l.target,force:!0})}),r().updateNodeInternals(o)});pl(()=>{s?.disconnect()});var a=JM();ke(a,21,()=>r().visible.nodes.values(),i=>i.id,(i,o)=>{QM(i,{get node(){return n(o)},get resizeObserver(){return s},get nodeClickDistance(){return t.nodeClickDistance},get onnodeclick(){return t.onnodeclick},get onnodepointerenter(){return t.onnodepointerenter},get onnodepointermove(){return t.onnodepointermove},get onnodepointerleave(){return t.onnodepointerleave},get onnodedrag(){return t.onnodedrag},get onnodedragstart(){return t.onnodedragstart},get onnodedragstop(){return t.onnodedragstop},get onnodecontextmenu(){return t.onnodecontextmenu},get store(){return r()},set store(l){r(l)}})}),m(e,a),Ke()}var e5=Jt('');function t5(e,t){We(t,!0);let r=b(()=>t.edge.id),s=b(()=>t.edge.source),a=b(()=>t.edge.target),i=b(()=>t.edge.sourceX),o=b(()=>t.edge.sourceY),l=b(()=>t.edge.targetX),c=b(()=>t.edge.targetY),u=b(()=>t.edge.sourcePosition),v=b(()=>t.edge.targetPosition),p=b(()=>Pn(t.edge.animated,!1)),f=b(()=>Pn(t.edge.selected,!1)),g=b(()=>t.edge.label),_=b(()=>t.edge.labelStyle),x=b(()=>Pn(t.edge.data,()=>({}),!0)),k=b(()=>t.edge.style),C=b(()=>t.edge.interactionWidth),T=b(()=>Pn(t.edge.type,"default")),M=b(()=>t.edge.sourceHandle),z=b(()=>t.edge.targetHandle),R=b(()=>t.edge.markerStart),D=b(()=>t.edge.markerEnd),V=b(()=>t.edge.selectable),X=b(()=>t.edge.focusable),j=b(()=>Pn(t.edge.deletable,!0)),P=b(()=>t.edge.hidden),A=b(()=>t.edge.zIndex),H=b(()=>t.edge.class),L=b(()=>t.edge.ariaLabel);uM(n(r));let E=null,y=b(()=>n(V)??t.store.elementsSelectable),O=b(()=>n(X)??t.store.edgesFocusable),N=b(()=>t.store.edgeTypes[n(T)]??Zg),B=b(()=>n(R)?`url('#${Sd(n(R),t.store.flowId)}')`:void 0),W=b(()=>n(D)?`url('#${Sd(n(D),t.store.flowId)}')`:void 0);function Y(U){const $=t.store.edgeLookup.get(n(r));$&&(n(y)&&t.store.handleEdgeSelection(n(r)),t.onedgeclick?.({event:U,edge:$}))}function J(U,$){const ae=t.store.edgeLookup.get(n(r));ae&&$({event:U,edge:ae})}function G(U){if(!t.store.disableKeyboardA11y&&wg.includes(U.key)&&n(y)){const{unselectNodesAndEdges:$,addSelectedEdges:ae}=t.store;U.key==="Escape"?(E?.blur(),$({edges:[t.edge]})):ae([n(r)])}}var ee=Et(),oe=_e(ee);{var ge=U=>{var $=e5();let ae;var ne=d($);ns(ne,()=>({class:["svelte-flow__edge",n(H)],"data-id":n(r),onclick:Y,oncontextmenu:t.onedgecontextmenu?Q=>{J(Q,t.onedgecontextmenu)}:void 0,onpointerenter:t.onedgepointerenter?Q=>{J(Q,t.onedgepointerenter)}:void 0,onpointerleave:t.onedgepointerleave?Q=>{J(Q,t.onedgepointerleave)}:void 0,"aria-label":n(L)===null?void 0:n(L)?n(L):`Edge from ${n(s)} to ${n(a)}`,"aria-describedby":n(O)?`${em}-${t.store.flowId}`:void 0,role:t.edge.ariaRole??(n(O)?"group":"img"),"aria-roledescription":"edge",onkeydown:n(O)?G:void 0,tabindex:n(O)?0:void 0,...t.edge.domAttributes,[fs]:{animated:n(p),selected:n(f),selectable:n(y)}}));var re=d(ne);gl(re,()=>n(N),(Q,K)=>{K(Q,{get id(){return n(r)},get source(){return n(s)},get target(){return n(a)},get sourceX(){return n(i)},get sourceY(){return n(o)},get targetX(){return n(l)},get targetY(){return n(c)},get sourcePosition(){return n(u)},get targetPosition(){return n(v)},get animated(){return n(p)},get selected(){return n(f)},get label(){return n(g)},get labelStyle(){return n(_)},get data(){return n(x)},get style(){return n(k)},get interactionWidth(){return n(C)},get selectable(){return n(y)},get deletable(){return n(j)},get type(){return n(T)},get sourceHandleId(){return n(M)},get targetHandleId(){return n(z)},get markerStart(){return n(B)},get markerEnd(){return n(W)}})}),Ut(ne,Q=>E=Q,()=>E),I(()=>ae=rt($,"",ae,{"z-index":n(A)})),m(U,$)};F(oe,U=>{n(P)||U(ge)})}m(e,ee),Ke()}var n5=Jt("");function r5(e,t){We(t,!1);const r=xs();Yd();var s=n5();ke(s,5,()=>r.markers,a=>a.id,(a,i)=>{i5(a,Xr(()=>n(i)))}),m(e,s),Ke()}var s5=Jt(''),a5=Jt(''),o5=Jt('');function i5(e,t){We(t,!0);let r=Ie(t,"width",3,12.5),s=Ie(t,"height",3,12.5),a=Ie(t,"markerUnits",3,"strokeWidth"),i=Ie(t,"orient",3,"auto-start-reverse"),o=Ie(t,"color",3,"none");var l=o5(),c=d(l);{var u=p=>{var f=s5();let g;I(()=>{se(f,"stroke-width",t.strokeWidth),g=rt(f,"",g,{stroke:o()})}),m(p,f)},v=p=>{var f=a5();let g;I(()=>{se(f,"stroke-width",t.strokeWidth),g=rt(f,"",g,{stroke:o(),fill:o()})}),m(p,f)};F(c,p=>{t.type===el.Arrow?p(u):t.type===el.ArrowClosed&&p(v,1)})}I(()=>{se(l,"id",t.id),se(l,"markerWidth",`${r()}`),se(l,"markerHeight",`${s()}`),se(l,"markerUnits",a()),se(l,"orient",i())}),m(e,l),Ke()}var l5=S('
      ');function c5(e,t){We(t,!0);let r=Ie(t,"store",15);var s=l5(),a=d(s),i=d(a);r5(i,{});var o=h(a,2);ke(o,17,()=>r().visible.edges.values(),l=>l.id,(l,c)=>{t5(l,{get edge(){return n(c)},get onedgeclick(){return t.onedgeclick},get onedgecontextmenu(){return t.onedgecontextmenu},get onedgepointerenter(){return t.onedgepointerenter},get onedgepointerleave(){return t.onedgepointerleave},get store(){return r()},set store(u){r(u)}})}),m(e,s),Ke()}var d5=S('
      ');function tm(e,t){We(t,!0);let r=Ie(t,"x",3,0),s=Ie(t,"y",3,0),a=Ie(t,"width",3,0),i=Ie(t,"height",3,0),o=Ie(t,"isVisible",3,!0);var l=Et(),c=_e(l);{var u=v=>{var p=d5();let f;I(g=>f=rt(p,"",f,g),[()=>({width:typeof a()=="string"?a():Dr(a()),height:typeof i()=="string"?i():Dr(i()),transform:`translate(${r()}px, ${s()}px)`})]),m(v,p)};F(c,v=>{o()&&v(u)})}m(e,l),Ke()}var u5=S("
      ");function f5(e,t){We(t,!0);let r=he(void 0);vt(()=>{t.store.disableKeyboardA11y||n(r)?.focus({preventScroll:!0})});let s=b(()=>{if(t.store.selectionRectMode==="nodes"){t.store.nodes;const p=Yo(t.store.nodeLookup,{filter:f=>!!f.selected});if(p.width>0&&p.height>0)return p}return null});function a(p){const f=t.store.nodes.filter(g=>g.selected);t.onselectioncontextmenu?.({nodes:f,event:p})}function i(p){const f=t.store.nodes.filter(g=>g.selected);t.onselectionclick?.({nodes:f,event:p})}function o(p){Object.prototype.hasOwnProperty.call(rl,p.key)&&(p.preventDefault(),t.store.moveSelectedNodes(rl[p.key],p.shiftKey?4:1))}var l=Et(),c=_e(l);{var u=p=>{var f=u5();let g;var _=d(f);tm(_,{width:"100%",height:"100%",x:0,y:0}),In(f,(x,k)=>Jg?.(x,k),()=>({disabled:!1,store:t.store,onDrag:(x,k,C,T)=>{t.onnodedrag?.({event:x,targetNode:null,nodes:T})},onDragStart:(x,k,C,T)=>{t.onnodedragstart?.({event:x,targetNode:null,nodes:T})},onDragStop:(x,k,C,T)=>{t.onnodedragstop?.({event:x,targetNode:null,nodes:T})}})),Ut(f,x=>q(r,x),()=>n(r)),I(x=>{qe(f,1,bs(["svelte-flow__selection-wrapper",t.store.noPanClass]),"svelte-sf2y5e"),se(f,"role",t.store.disableKeyboardA11y?void 0:"button"),se(f,"tabindex",t.store.disableKeyboardA11y?void 0:-1),g=rt(f,"",g,x)},[()=>({width:Dr(n(s).width),height:Dr(n(s).height),transform:`translate(${n(s).x??""}px, ${n(s).y??""}px)`})]),xe("contextmenu",f,a),xe("click",f,i),xe("keydown",f,function(...x){(t.store.disableKeyboardA11y?void 0:o)?.apply(this,x)}),m(p,f)},v=b(()=>t.store.selectionRectMode==="nodes"&&n(s)&&Zr(n(s).x)&&Zr(n(s).y));F(c,p=>{n(v)&&p(u)})}m(e,l),Ke()}St(["contextmenu","click","keydown"]);function v5(e){switch(e){case"none":return 0;case"ctrl":return 8;case"shift":return 4;case"alt":return 2;case"meta":return 1}}function wr(e,t){let{enabled:r=!0,trigger:s,type:a="keydown"}=t;function i(l){const c=Array.isArray(s)?s:[s],u=[l.metaKey,l.altKey,l.shiftKey,l.ctrlKey].reduce((v,p,f)=>p?v|1<0){const M=Array.isArray(f)?f:[f];let z=!1;for(const R of M)if((Array.isArray(R)?R:[R]).reduce((V,X)=>V|v5(X),0)===u){z=!0;break}if(!z)continue}k&&l.preventDefault();const T={node:e,trigger:p,originalEvent:l};e.dispatchEvent(new CustomEvent("shortcut",{detail:T})),x?.(T)}}}let o;return r&&(o=Uc(e,a,i)),{update:l=>{const{enabled:c=!0,type:u="keydown"}=l;r&&(!c||a!==u)?o?.():!r&&c&&(o=Uc(e,u,i)),r=c,a=u,s=l.trigger},destroy:()=>{o?.()}}}function h5(){const e=b(xs),t=i=>{const o=av(i)?i:n(e).nodeLookup.get(i.id),l=o.parentId?hE(o.position,o.measured,o.parentId,n(e).nodeLookup,n(e).nodeOrigin):o.position,c={...o,position:l,width:o.measured?.width??o.width,height:o.measured?.height??o.height};return No(c)};function r(i,o,l={replace:!1}){n(e).nodes=nn(()=>n(e).nodes).map(c=>{if(c.id===i){const u=typeof o=="function"?o(c):o;return l?.replace&&av(u)?u:{...c,...u}}return c})}function s(i,o,l={replace:!1}){n(e).edges=nn(()=>n(e).edges).map(c=>{if(c.id===i){const u=typeof o=="function"?o(c):o;return l.replace&&bM(u)?u:{...c,...u}}return c})}const a=i=>n(e).nodeLookup.get(i);return{zoomIn:n(e).zoomIn,zoomOut:n(e).zoomOut,getInternalNode:a,getNode:i=>a(i)?.internals.userNode,getNodes:i=>i===void 0?n(e).nodes:dv(n(e).nodeLookup,i),getEdge:i=>n(e).edgeLookup.get(i),getEdges:i=>i===void 0?n(e).edges:dv(n(e).edgeLookup,i),setZoom:async(i,o)=>{const l=n(e).panZoom;return l?l.scaleTo(i,o):!1},getZoom:()=>n(e).viewport.zoom,setViewport:async(i,o)=>{const l=n(e).viewport;return n(e).panZoom?(await n(e).panZoom.setViewport({x:i.x??l.x,y:i.y??l.y,zoom:i.zoom??l.zoom},o),!0):!1},getViewport:()=>kh(n(e).viewport),setCenter:async(i,o,l)=>n(e).setCenter(i,o,l),fitView:i=>n(e).fitView(i),fitBounds:async(i,o)=>{if(!n(e).panZoom)return!1;const l=gu(i,n(e).width,n(e).height,n(e).minZoom,n(e).maxZoom,o?.padding??.1);return await n(e).panZoom.setViewport(l,{duration:o?.duration,ease:o?.ease,interpolate:o?.interpolate}),!0},getIntersectingNodes:(i,o=!0,l)=>{const c=Yf(i),u=c?i:t(i);return u?(l||n(e).nodes).filter(v=>{const p=n(e).nodeLookup.get(v.id);if(!p||!c&&v.id===i.id)return!1;const f=No(p),g=nl(f,u);return o&&g>0||g>=f.width*f.height||g>=u.width*u.height}):[]},isNodeIntersecting:(i,o,l=!0)=>{const u=Yf(i)?i:t(i);if(!u)return!1;const v=nl(u,o);return l&&v>0||v>=o.width*o.height||v>=u.width*u.height},deleteElements:async({nodes:i=[],edges:o=[]})=>{const{nodes:l,edges:c}=await uE({nodesToRemove:i,edgesToRemove:o,nodes:n(e).nodes,edges:n(e).edges,onBeforeDelete:n(e).onbeforedelete});return l&&(n(e).nodes=nn(()=>n(e).nodes).filter(u=>!l.some(({id:v})=>v===u.id))),c&&(n(e).edges=nn(()=>n(e).edges).filter(u=>!c.some(({id:v})=>v===u.id))),(l.length>0||c.length>0)&&n(e).ondelete?.({nodes:l,edges:c}),{deletedNodes:l,deletedEdges:c}},screenToFlowPosition:(i,o={snapToGrid:!0})=>{if(!n(e).domNode)return i;const l=o.snapToGrid?n(e).snapGrid:!1,{x:c,y:u,zoom:v}=n(e).viewport,{x:p,y:f}=n(e).domNode.getBoundingClientRect(),g={x:i.x-p,y:i.y-f};return Go(g,[c,u,v],l!==null,l||[1,1])},flowToScreenPosition:i=>{if(!n(e).domNode)return i;const{x:o,y:l,zoom:c}=n(e).viewport,{x:u,y:v}=n(e).domNode.getBoundingClientRect(),p=Ta(i,[o,l,c]);return{x:p.x+u,y:p.y+v}},toObject:()=>structuredClone({nodes:[...n(e).nodes],edges:[...n(e).edges],viewport:{...n(e).viewport}}),updateNode:r,updateNodeData:(i,o,l)=>{const c=n(e).nodeLookup.get(i)?.internals.userNode;if(!c)return;const u=typeof o=="function"?o(c):o;r(i,v=>({...v,data:l?.replace?u:{...v.data,...u}}))},updateEdge:s,getNodesBounds:i=>iE(i,{nodeLookup:n(e).nodeLookup,nodeOrigin:n(e).nodeOrigin}),getHandleConnections:({type:i,id:o,nodeId:l})=>Array.from(n(e).connectionLookup.get(`${l}-${i}-${o??null}`)?.values()??[])}}function dv(e,t){const r=[];for(const s of t){const a=e.get(s);if(a){const i="internals"in a?a.internals?.userNode:a;r.push(i)}}return r}function p5(e,t){We(t,!0);let r=Ie(t,"store",15),s=Ie(t,"selectionKey",3,"Shift"),a=Ie(t,"multiSelectionKey",19,()=>zo()?"Meta":"Control"),i=Ie(t,"deleteKey",3,"Backspace"),o=Ie(t,"panActivationKey",3," "),l=Ie(t,"zoomActivationKey",19,()=>zo()?"Meta":"Control"),{deleteElements:c}=h5();function u(x){return x!==null&&typeof x=="object"}function v(x){return u(x)?x.modifier||[]:[]}function p(x){return x==null?"":u(x)?x.key:x}function f(x,k){return(Array.isArray(x)?x:[x]).map(T=>{const M=p(T);return{key:M,modifier:v(T),enabled:M!==null,callback:k}})}function g(){r(r().selectionRect=null,!0),r(r().selectionKeyPressed=!1,!0),r(r().multiselectionKeyPressed=!1,!0),r(r().deleteKeyPressed=!1,!0),r(r().panActivationKeyPressed=!1,!0),r(r().zoomActivationKeyPressed=!1,!0)}function _(){const x=r().nodes.filter(C=>C.selected),k=r().edges.filter(C=>C.selected);c({nodes:x,edges:k})}ft("blur",cn,g),ft("contextmenu",cn,g),In(cn,(x,k)=>wr?.(x,k),()=>({trigger:f(s(),()=>r(r().selectionKeyPressed=!0,!0)),type:"keydown"})),In(cn,(x,k)=>wr?.(x,k),()=>({trigger:f(s(),()=>r(r().selectionKeyPressed=!1,!0)),type:"keyup"})),In(cn,(x,k)=>wr?.(x,k),()=>({trigger:f(a(),()=>{r(r().multiselectionKeyPressed=!0,!0)}),type:"keydown"})),In(cn,(x,k)=>wr?.(x,k),()=>({trigger:f(a(),()=>r(r().multiselectionKeyPressed=!1,!0)),type:"keyup"})),In(cn,(x,k)=>wr?.(x,k),()=>({trigger:f(i(),x=>{!(x.originalEvent.ctrlKey||x.originalEvent.metaKey||x.originalEvent.shiftKey)&&!Ng(x.originalEvent)&&(r(r().deleteKeyPressed=!0,!0),_())}),type:"keydown"})),In(cn,(x,k)=>wr?.(x,k),()=>({trigger:f(i(),()=>r(r().deleteKeyPressed=!1,!0)),type:"keyup"})),In(cn,(x,k)=>wr?.(x,k),()=>({trigger:f(o(),()=>r(r().panActivationKeyPressed=!0,!0)),type:"keydown"})),In(cn,(x,k)=>wr?.(x,k),()=>({trigger:f(o(),()=>r(r().panActivationKeyPressed=!1,!0)),type:"keyup"})),In(cn,(x,k)=>wr?.(x,k),()=>({trigger:f(l(),()=>r(r().zoomActivationKeyPressed=!0,!0)),type:"keydown"})),In(cn,(x,k)=>wr?.(x,k),()=>({trigger:f(l(),()=>r(r().zoomActivationKeyPressed=!1,!0)),type:"keyup"})),Ke()}var g5=Jt(''),m5=Jt('');function _5(e,t){We(t,!0);let r=b(()=>{if(!t.store.connection.inProgress)return"";const o={sourceX:t.store.connection.from.x,sourceY:t.store.connection.from.y,sourcePosition:t.store.connection.fromPosition,targetX:t.store.connection.to.x,targetY:t.store.connection.to.y,targetPosition:t.store.connection.toPosition};switch(t.type){case hs.Bezier:{const[l]=Pg(o);return l}case hs.Straight:{const[l]=Og(o);return l}case hs.Step:case hs.SmoothStep:{const[l]=mu({...o,borderRadius:t.type===hs.Step?0:void 0});return l}}});var s=Et(),a=_e(s);{var i=o=>{var l=m5(),c=d(l),u=d(c);{var v=f=>{var g=Et(),_=_e(g);gl(_,()=>t.LineComponent,(x,k)=>{k(x,{})}),m(f,g)},p=f=>{var g=g5();I(()=>{se(g,"d",n(r)),rt(g,t.style)}),m(f,g)};F(u,f=>{t.LineComponent?f(v):f(p,-1)})}I(f=>{se(l,"width",t.store.width),se(l,"height",t.store.height),rt(l,t.containerStyle),qe(c,0,f)},[()=>bs(["svelte-flow__connection",mE(t.store.connection.isValid)])]),m(o,l)};F(a,o=>{t.store.connection.inProgress&&o(i)})}m(e,s),Ke()}var y5=new Set(["$$slots","$$events","$$legacy","position","style","class","children"]),b5=S("
      ");function ku(e,t){We(t,!0);let r=Ie(t,"position",3,"top-right"),s=rs(t,y5),a=b(()=>`${r()}`.split("-"));var i=b5();ns(i,l=>({class:l,style:t.style,...s}),[()=>["svelte-flow__panel",t.class,...n(a)]]);var o=d(i);Fn(o,()=>t.children??kn),m(e,i),Ke()}var w5=S('Svelte Flow');function x5(e,t){We(t,!0);let r=Ie(t,"position",3,"bottom-right");const s="https://svelteflow.dev?utm_source=attribution";vt(()=>{});var a=Et(),i=_e(a);{var o=l=>{{let c=b(()=>`Please only hide this attribution when you are subscribed to Svelte Flow Pro: ${s}`);ku(l,{get position(){return r()},class:"svelte-flow__attribution",get"data-message"(){return n(c)},children:(u,v)=>{var p=w5();I(()=>se(p,"href",s)),m(u,p)},$$slots:{default:!0}})}};F(i,l=>{t.proOptions?.hideAttribution||l(o)})}m(e,a),Ke()}var k5=S("
      ");function S5(e,t){We(t,!0);let r=Ie(t,"domNode",15),s=Ie(t,"clientWidth",15),a=Ie(t,"clientHeight",15),i=b(()=>t.rest.class),o=b(()=>Qm(t.rest,["id","class","nodeTypes","edgeTypes","colorMode","isValidConnection","onmove","onmovestart","onmoveend","onflowerror","ondelete","onbeforedelete","onbeforeconnect","onconnect","onconnectstart","onconnectend","onbeforereconnect","onreconnect","onreconnectstart","onreconnectend","onclickconnectstart","onclickconnectend","oninit","onselectionchange","onselectiondragstart","onselectiondrag","onselectiondragstop","onselectionstart","onselectionend","clickConnect","fitView","fitViewOptions","nodeOrigin","nodeDragThreshold","connectionDragThreshold","minZoom","maxZoom","initialViewport","connectionRadius","connectionMode","selectionMode","selectNodesOnDrag","snapGrid","defaultMarkerColor","translateExtent","nodeExtent","onlyRenderVisibleElements","autoPanOnConnect","autoPanOnNodeDrag","colorModeSSR","defaultEdgeOptions","elevateNodesOnSelect","elevateEdgesOnSelect","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","elementsSelectable","nodesFocusable","edgesFocusable","disableKeyboardA11y","noDragClass","noPanClass","noWheelClass","ariaLabelConfig","autoPanSpeed","panOnScrollSpeed","zIndexMode","autoPanOnSelection"]));function l(v){v.currentTarget.scrollTo({top:0,left:0,behavior:"auto"}),t.rest.onscroll&&t.rest.onscroll(v)}var c=k5();ns(c,v=>({class:["svelte-flow","svelte-flow__container",t.colorMode,n(i)],"data-testid":"svelte-flow__wrapper",role:"application",onscroll:l,...n(o),[Mr]:v}),[()=>({width:Dr(t.width),height:Dr(t.height)})],void 0,void 0,"svelte-mkap6j");var u=d(c);Fn(u,()=>t.children??kn),Ut(c,v=>r(v),()=>r()),$c(c,"clientHeight",a),$c(c,"clientWidth",s),m(e,c),Ke()}var E5=new Set(["$$slots","$$events","$$legacy","width","height","proOptions","selectionKey","deleteKey","panActivationKey","multiSelectionKey","zoomActivationKey","paneClickDistance","nodeClickDistance","onmovestart","onmoveend","onmove","oninit","onnodeclick","onnodecontextmenu","onnodedrag","onnodedragstart","onnodedragstop","onnodepointerenter","onnodepointermove","onnodepointerleave","onselectionclick","onselectioncontextmenu","onselectionstart","onselectionend","onedgeclick","onedgecontextmenu","onedgepointerenter","onedgepointerleave","onpaneclick","onpanecontextmenu","panOnScrollMode","preventScrolling","zoomOnScroll","zoomOnDoubleClick","zoomOnPinch","panOnScroll","panOnScrollSpeed","panOnDrag","selectionOnDrag","autoPanOnSelection","connectionLineComponent","connectionLineStyle","connectionLineContainerStyle","connectionLineType","attributionPosition","children","nodes","edges","viewport"]),M5=S('
      ',1),C5=S(" ",1),T5=S(" ",1);function Il(e,t){We(t,!0);let r=Ie(t,"paneClickDistance",3,1),s=Ie(t,"nodeClickDistance",3,1),a=Ie(t,"panOnScrollMode",19,()=>ha.Free),i=Ie(t,"preventScrolling",3,!0),o=Ie(t,"zoomOnScroll",3,!0),l=Ie(t,"zoomOnDoubleClick",3,!0),c=Ie(t,"zoomOnPinch",3,!0),u=Ie(t,"panOnScroll",3,!1),v=Ie(t,"panOnScrollSpeed",3,.5),p=Ie(t,"panOnDrag",3,!0),f=Ie(t,"selectionOnDrag",3,!1),g=Ie(t,"autoPanOnSelection",3,!0),_=Ie(t,"connectionLineType",19,()=>hs.Bezier),x=Ie(t,"nodes",31,()=>gn([])),k=Ie(t,"edges",31,()=>gn([])),C=Ie(t,"viewport",15,void 0),T=rs(t,E5),M=RM({props:T,width:t.width,height:t.height,get nodes(){return x()},set nodes(R){x(R)},get edges(){return k()},set edges(R){k(R)},get viewport(){return C()},set viewport(R){C(R)}});const z=zd(Ed);z&&z.setStore&&z.setStore(M),Sh(Ed,{provider:!1,getStore(){return M}}),vt(()=>{const R={nodes:M.selectedNodes,edges:M.selectedEdges};nn(()=>t.onselectionchange)?.(R);for(const D of M.selectionChangeHandlers.values())D(R)}),pl(()=>{M.reset()}),S5(e,{get colorMode(){return M.colorMode},get width(){return t.width},get height(){return t.height},get rest(){return T},get domNode(){return M.domNode},set domNode(R){M.domNode=R},get clientWidth(){return M.width},set clientWidth(R){M.width=R},get clientHeight(){return M.height},set clientHeight(R){M.height=R},children:(R,D)=>{var V=T5(),X=_e(V);p5(X,{get selectionKey(){return t.selectionKey},get deleteKey(){return t.deleteKey},get panActivationKey(){return t.panActivationKey},get multiSelectionKey(){return t.multiSelectionKey},get zoomActivationKey(){return t.zoomActivationKey},get store(){return M},set store(L){M=L}});var j=h(X,2);FM(j,{get panOnScrollMode(){return a()},get preventScrolling(){return i()},get zoomOnScroll(){return o()},get zoomOnDoubleClick(){return l()},get zoomOnPinch(){return c()},get panOnScroll(){return u()},get panOnScrollSpeed(){return v()},get panOnDrag(){return p()},get paneClickDistance(){return r()},get selectionOnDrag(){return f()},get onmovestart(){return t.onmovestart},get onmove(){return t.onmove},get onmoveend(){return t.onmoveend},get oninit(){return t.oninit},get store(){return M},set store(L){M=L},children:(L,E)=>{VM(L,{get onpaneclick(){return t.onpaneclick},get onpanecontextmenu(){return t.onpanecontextmenu},get onselectionstart(){return t.onselectionstart},get onselectionend(){return t.onselectionend},get panOnDrag(){return p()},get paneClickDistance(){return r()},get selectionOnDrag(){return f()},get autoPanOnSelection(){return g()},get store(){return M},set store(y){M=y},children:(y,O)=>{var N=C5(),B=_e(N);KM(B,{get store(){return M},set store(Y){M=Y},children:(Y,J)=>{var G=M5(),ee=h(_e(G),2);c5(ee,{get onedgeclick(){return t.onedgeclick},get onedgecontextmenu(){return t.onedgecontextmenu},get onedgepointerenter(){return t.onedgepointerenter},get onedgepointerleave(){return t.onedgepointerleave},get store(){return M},set store($){M=$}});var oe=h(ee,4);_5(oe,{get type(){return _()},get LineComponent(){return t.connectionLineComponent},get containerStyle(){return t.connectionLineContainerStyle},get style(){return t.connectionLineStyle},get store(){return M},set store($){M=$}});var ge=h(oe,2);$M(ge,{get nodeClickDistance(){return s()},get onnodeclick(){return t.onnodeclick},get onnodecontextmenu(){return t.onnodecontextmenu},get onnodepointerenter(){return t.onnodepointerenter},get onnodepointermove(){return t.onnodepointermove},get onnodepointerleave(){return t.onnodepointerleave},get onnodedrag(){return t.onnodedrag},get onnodedragstart(){return t.onnodedragstart},get onnodedragstop(){return t.onnodedragstop},get store(){return M},set store($){M=$}});var U=h(ge,2);f5(U,{get onselectionclick(){return t.onselectionclick},get onselectioncontextmenu(){return t.onselectioncontextmenu},get onnodedrag(){return t.onnodedrag},get onnodedragstart(){return t.onnodedragstart},get onnodedragstop(){return t.onnodedragstop},get store(){return M},set store($){M=$}}),m(Y,G)},$$slots:{default:!0}});var W=h(B,2);{let Y=b(()=>!!(M.selectionRect&&M.selectionRectMode==="user")),J=b(()=>M.selectionRect?.width),G=b(()=>M.selectionRect?.height),ee=b(()=>M.selectionRect?.x),oe=b(()=>M.selectionRect?.y);tm(W,{get isVisible(){return n(Y)},get width(){return n(J)},get height(){return n(G)},get x(){return n(ee)},get y(){return n(oe)}})}m(y,N)},$$slots:{default:!0}})},$$slots:{default:!0}});var P=h(j,2);x5(P,{get proOptions(){return t.proOptions},get position(){return t.attributionPosition}});var A=h(P,2);GM(A,{get store(){return M}});var H=h(A,2);Fn(H,()=>t.children??kn),m(R,V)},$$slots:{default:!0}}),Ke()}var I5=new Set(["$$slots","$$events","$$legacy","target","children"]),A5=S("
      ");function N5(e,t){We(t,!0);let r=Ie(t,"target",3,"front"),s=rs(t,I5);var a=A5();ns(a,o=>({...s,[Mr]:o}),[()=>({display:Xg().value?"none":void 0})]);var i=d(a);Fn(i,()=>t.children??kn),In(a,(o,l)=>Yg?.(o,l),()=>`viewport-${r()}`),m(e,a),Ke()}var z5=new Set(["$$slots","$$events","$$legacy","class","bgColor","bgColorHover","color","colorHover","borderColor","onclick","children"]),P5=S("");function di(e,t){let r=rs(t,z5);var s=P5();ns(s,()=>({type:"button",onclick:t.onclick,class:["svelte-flow__controls-button",t.class],...r,[Mr]:{"--xy-controls-button-background-color-props":t.bgColor,"--xy-controls-button-background-color-hover-props":t.bgColorHover,"--xy-controls-button-color-props":t.color,"--xy-controls-button-color-hover-props":t.colorHover,"--xy-controls-button-border-color-props":t.borderColor}}));var a=d(s);Fn(a,()=>t.children??kn),m(e,s)}var L5=Jt('');function O5(e){var t=L5();m(e,t)}var q5=Jt('');function D5(e){var t=q5();m(e,t)}var R5=Jt('');function H5(e){var t=R5();m(e,t)}var j5=Jt('');function F5(e){var t=j5();m(e,t)}var B5=Jt('');function V5(e){var t=B5();m(e,t)}var W5=new Set(["$$slots","$$events","$$legacy","position","orientation","showZoom","showFitView","showLock","style","class","buttonBgColor","buttonBgColorHover","buttonColor","buttonColorHover","buttonBorderColor","fitViewOptions","children","before","after"]),K5=S(" ",1),Y5=S(" ",1);function Al(e,t){We(t,!0);let r=Ie(t,"position",3,"bottom-left"),s=Ie(t,"orientation",3,"vertical"),a=Ie(t,"showZoom",3,!0),i=Ie(t,"showFitView",3,!0),o=Ie(t,"showLock",3,!0),l=rs(t,W5),c=b(xs);const u=b(()=>({bgColor:t.buttonBgColor,bgColorHover:t.buttonBgColorHover,color:t.buttonColor,colorHover:t.buttonColorHover,borderColor:t.buttonBorderColor}));let v=b(()=>n(c).nodesDraggable||n(c).nodesConnectable||n(c).elementsSelectable),p=b(()=>n(c).viewport.zoom<=n(c).minZoom),f=b(()=>n(c).viewport.zoom>=n(c).maxZoom),g=b(()=>n(c).ariaLabelConfig),_=b(()=>s()==="horizontal"?"horizontal":"vertical");const x=()=>{n(c).zoomIn()},k=()=>{n(c).zoomOut()},C=()=>{n(c).fitView(t.fitViewOptions)},T=()=>{let M=!n(v);n(c).nodesDraggable=M,n(c).nodesConnectable=M,n(c).elementsSelectable=M};{let M=b(()=>["svelte-flow__controls",n(_),t.class]);ku(e,Xr({get class(){return n(M)},get position(){return r()},"data-testid":"svelte-flow__controls",get"aria-label"(){return n(g)["controls.ariaLabel"]},get style(){return t.style}},()=>l,{children:(z,R)=>{var D=Y5(),V=_e(D);{var X=W=>{var Y=Et(),J=_e(Y);Fn(J,()=>t.before),m(W,Y)};F(V,W=>{t.before&&W(X)})}var j=h(V,2);{var P=W=>{var Y=K5(),J=_e(Y);di(J,Xr({onclick:x,class:"svelte-flow__controls-zoomin",get title(){return n(g)["controls.zoomIn.ariaLabel"]},get"aria-label"(){return n(g)["controls.zoomIn.ariaLabel"]},get disabled(){return n(f)}},()=>n(u),{children:(ee,oe)=>{O5(ee)},$$slots:{default:!0}}));var G=h(J,2);di(G,Xr({onclick:k,class:"svelte-flow__controls-zoomout",get title(){return n(g)["controls.zoomOut.ariaLabel"]},get"aria-label"(){return n(g)["controls.zoomOut.ariaLabel"]},get disabled(){return n(p)}},()=>n(u),{children:(ee,oe)=>{D5(ee)},$$slots:{default:!0}})),m(W,Y)};F(j,W=>{a()&&W(P)})}var A=h(j,2);{var H=W=>{di(W,Xr({class:"svelte-flow__controls-fitview",onclick:C,get title(){return n(g)["controls.fitView.ariaLabel"]},get"aria-label"(){return n(g)["controls.fitView.ariaLabel"]}},()=>n(u),{children:(Y,J)=>{H5(Y)},$$slots:{default:!0}}))};F(A,W=>{i()&&W(H)})}var L=h(A,2);{var E=W=>{di(W,Xr({class:"svelte-flow__controls-interactive",onclick:T,get title(){return n(g)["controls.interactive.ariaLabel"]},get"aria-label"(){return n(g)["controls.interactive.ariaLabel"]}},()=>n(u),{children:(Y,J)=>{var G=Et(),ee=_e(G);{var oe=U=>{V5(U)},ge=U=>{F5(U)};F(ee,U=>{n(v)?U(oe):U(ge,-1)})}m(Y,G)},$$slots:{default:!0}}))};F(L,W=>{o()&&W(E)})}var y=h(L,2);{var O=W=>{var Y=Et(),J=_e(Y);Fn(J,()=>t.children),m(W,Y)};F(y,W=>{t.children&&W(O)})}var N=h(y,2);{var B=W=>{var Y=Et(),J=_e(Y);Fn(J,()=>t.after),m(W,Y)};F(N,W=>{t.after&&W(B)})}m(z,D)},$$slots:{default:!0}}))}Ke()}function X5(e){const t=b(xs),r=b(()=>n(t).nodeLookup),s=b(()=>n(t).nodes),a=b(()=>(n(s),n(r).get(e)));return{get current(){return n(a)}}}var G5=Jt("");function Z5(e,t){We(t,!0);let r=Ie(t,"borderRadius",3,5),s=Ie(t,"strokeWidth",3,2),a=b(()=>X5(t.id)),i=b(()=>{if(!n(a).current)return{width:0,height:0,x:0,y:0};const{width:_,height:x}=jr(n(a).current);return{width:t.width??_,height:t.height??x,x:t.x??n(a).current.internals.positionAbsolute.x,y:t.y??n(a).current.internals.positionAbsolute.y}}),o=b(()=>n(i).width),l=b(()=>n(i).height),c=b(()=>n(i).x),u=b(()=>n(i).y);var v=Et(),p=_e(v);{var f=_=>{const x=b(()=>t.nodeComponent);var k=Et(),C=_e(k);gl(C,()=>n(x),(T,M)=>{M(T,{get id(){return t.id},get x(){return n(c)},get y(){return n(u)},get width(){return n(o)},get height(){return n(l)},get borderRadius(){return r()},get class(){return t.class},get color(){return t.color},get shapeRendering(){return t.shapeRendering},get strokeColor(){return t.strokeColor},get strokeWidth(){return s()},get selected(){return t.selected}})}),m(_,k)},g=_=>{var x=G5();let k,C;I(()=>{k=qe(x,0,bs(["svelte-flow__minimap-node",t.class]),null,k,{selected:t.selected}),se(x,"x",n(c)),se(x,"y",n(u)),se(x,"rx",r()),se(x,"ry",r()),se(x,"width",n(o)),se(x,"height",n(l)),se(x,"shape-rendering",t.shapeRendering),C=rt(x,"",C,{fill:t.color,stroke:t.strokeColor,"stroke-width":s()})}),m(_,x)};F(p,_=>{t.nodeComponent?_(f):_(g,-1)})}m(e,v),Ke()}function U5(e,t){const r=ZE({domNode:e,panZoom:t.panZoom,getTransform:()=>{const{viewport:a}=t.store;return[a.x,a.y,a.zoom]},getViewScale:t.getViewScale});r.update({translateExtent:t.translateExtent,width:t.width,height:t.height,inversePan:t.inversePan,zoomStep:t.zoomStep,pannable:t.pannable,zoomable:t.zoomable});function s(a){r.update({translateExtent:a.translateExtent,width:a.width,height:a.height,inversePan:a.inversePan,zoomStep:a.zoomStep,pannable:a.pannable,zoomable:a.zoomable})}return{update:s,destroy(){r.destroy()}}}const Ic=e=>e instanceof Function?e:()=>e;var Q5=new Set(["$$slots","$$events","$$legacy","position","ariaLabel","nodeStrokeColor","nodeColor","nodeClass","nodeBorderRadius","nodeStrokeWidth","nodeComponent","bgColor","maskColor","maskStrokeColor","maskStrokeWidth","width","height","pannable","zoomable","inversePan","zoomStep","class"]),J5=Jt(" "),$5=Jt(''),e8=S('',1);function t8(e,t){We(t,!0);let r=Ie(t,"position",3,"bottom-right"),s=Ie(t,"nodeStrokeColor",3,"transparent"),a=Ie(t,"nodeClass",3,""),i=Ie(t,"nodeBorderRadius",3,5),o=Ie(t,"nodeStrokeWidth",3,2),l=Ie(t,"width",3,200),c=Ie(t,"height",3,150),u=Ie(t,"pannable",3,!0),v=Ie(t,"zoomable",3,!0),p=rs(t,Q5),f=b(xs),g=b(()=>n(f).ariaLabelConfig);const _=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";let x=b(()=>`svelte-flow__minimap-desc-${n(f).flowId}`),k=b(()=>({x:-n(f).viewport.x/n(f).viewport.zoom,y:-n(f).viewport.y/n(f).viewport.zoom,width:n(f).width/n(f).viewport.zoom,height:n(f).height/n(f).viewport.zoom})),C=b(()=>n(f).nodes.some(O=>!O.hidden)),T=b(()=>n(C)?Eg(Yo(n(f).nodeLookup,{filter:O=>!O.hidden}),n(k)):n(k)),M=b(()=>n(T).width/l()),z=b(()=>n(T).height/c()),R=b(()=>Math.max(n(M),n(z))),D=b(()=>n(R)*l()),V=b(()=>n(R)*c()),X=b(()=>5*n(R)),j=b(()=>n(T).x-(n(D)-n(T).width)/2-n(X)),P=b(()=>n(T).y-(n(V)-n(T).height)/2-n(X)),A=b(()=>n(D)+n(X)*2),H=b(()=>n(V)+n(X)*2);const L=()=>n(R);var E=e8(),y=_e(E);{let O=b(()=>["svelte-flow__minimap",t.class]);c_(y,()=>({"--xy-minimap-background-color-props":t.bgColor})),ku(y.lastChild,Xr({get position(){return r()},get class(){return n(O)},"data-testid":"svelte-flow__minimap"},()=>p,{children:(N,B)=>{var W=Et(),Y=_e(W);{var J=G=>{var ee=$5();let oe;var ge=d(ee);{var U=ne=>{var re=J5(),Q=d(re);I(()=>{se(re,"id",n(x)),w(Q,t.ariaLabel??n(g)["minimap.ariaLabel"])}),m(ne,re)};F(ge,ne=>{(t.ariaLabel??n(g)["minimap.ariaLabel"])&&ne(U)})}var $=h(ge);ke($,17,()=>n(f).nodes,ne=>ne.id,(ne,re)=>{const Q=b(()=>n(f).nodeLookup.get(n(re).id));var K=Et(),Z=_e(K);{var ce=ie=>{{let ve=b(()=>t.nodeColor===void 0?void 0:Ic(t.nodeColor)(n(re))),fe=b(()=>Ic(s())(n(re))),pe=b(()=>Ic(a())(n(re)));Z5(ie,{get id(){return n(Q).id},get selected(){return n(Q).selected},get nodeComponent(){return t.nodeComponent},get color(){return n(ve)},get borderRadius(){return i()},get strokeColor(){return n(fe)},get strokeWidth(){return o()},get shapeRendering(){return _},get class(){return n(pe)}})}},te=b(()=>n(Q)&&Tg(n(Q))&&!n(Q).hidden);F(Z,ie=>{n(te)&&ie(ce)})}m(ne,K)});var ae=h($);In(ee,(ne,re)=>U5?.(ne,re),()=>({store:n(f),panZoom:n(f).panZoom,getViewScale:L,translateExtent:n(f).translateExtent,width:n(f).width,height:n(f).height,inversePan:t.inversePan,zoomStep:t.zoomStep,pannable:u(),zoomable:v()})),I(()=>{se(ee,"width",l()),se(ee,"height",c()),se(ee,"viewBox",`${n(j)??""} ${n(P)??""} ${n(A)??""} ${n(H)??""}`),se(ee,"aria-labelledby",n(x)),oe=rt(ee,"",oe,{"--xy-minimap-mask-background-color-props":t.maskColor,"--xy-minimap-mask-stroke-color-props":t.maskStrokeColor,"--xy-minimap-mask-stroke-width-props":t.maskStrokeWidth?t.maskStrokeWidth*n(R):void 0}),se(ae,"d",`M${n(j)-n(X)},${n(P)-n(X)}h${n(A)+n(X)*2}v${n(H)+n(X)*2}h${-n(A)-n(X)*2}z + M${n(k).x??""},${n(k).y??""}h${n(k).width??""}v${n(k).height??""}h${-n(k).width}z`)}),m(G,ee)};F(Y,G=>{n(f).panZoom&&G(J)})}m(N,W)},$$slots:{default:!0}}))}m(e,E),Ke()}const ur=52,n8=44,Md=28,Tn=44,r8=230,Nl=12,nm=110,s8=7.2,a8=62,o8=4,i8=6,l8=.4,c8=5.5,d8=62;function rm(e,t=""){return Math.max(nm,e.length*s8+a8,t.length*c8+d8)}function Su(e,t=!1){if(t)return"nothing depends on this";const r=`${e.symbols} symbol${e.symbols===1?"":"s"}`,s=`${e.files} file${e.files===1?"":"s"}`,a=e.dependents?.files??0,i=a>0?` · ${a} depend on it`:"";return`${r} · ${s}${i}`}function sm(e){return Math.min(6,1+Math.log2(Math.max(1,e))*.7)}function Jr(e){return`${e.source}\0${e.target}`}function zl(e,t){const r=e.modules.filter(U=>t.includeTests||!U.test),s=new Set(r.map(U=>U.id)),a=new Set(e.links.map(U=>U.target)),i=e.links.filter(U=>s.has(U.source)&&s.has(U.target)),o=t.minWeight??(t.includeTests?i8:o8),l=t.layerGap??n8,c=t.portPitch??0,u=t.ports==="directional",v=i.filter(U=>U.declared>0),p=i.length>0&&v.length>=i.length*l8,f=U=>p?U.declared:U.count,g=p?v:i,_=new Map(g.map(U=>[Jr(U),U])),x=[],k=[];for(const U of g){const $=_.get(Jr({source:U.target,target:U.source}));if(!$){x.push(U);continue}const ae=f(U),ne=f($);if(ne>ae||ne===ae&&U.source>U.target){k.push({forward:$,back:U});continue}x.push(U)}const C=new Map(r.map(U=>[U.id,[]]));for(const U of x)C.get(U.source)?.push(U.target);for(const U of C.values())U.sort();const T=new Map;if(t.layering){for(const[U,$]of t.layering(r.map(ae=>ae.id),x))T.set(U,$);for(const U of r)T.has(U.id)||T.set(U.id,0)}else for(const U of r)am(U.id,C,T,new Set);const M=Math.max(1,...[...T.values()].map(U=>U+1)),z=Array.from({length:M},()=>[]);for(const U of r)z[T.get(U.id)??0].push(U.id);const R=t.order;for(const U of z)U.sort(R?($,ae)=>R($)-R(ae)||$.localeCompare(ae):void 0);const D=new Map(r.map(U=>[U.id,[]]));for(const U of x)D.get(U.target)?.push(U.source),R||D.get(U.source)?.push(U.target);const V=new Map;for(const U of z)U.forEach(($,ae)=>V.set($,ae));for(let U=0;U<3;U+=1)for(const $ of z){const ae=new Map($.map(ne=>[ne,u8(ne,D,V)]));$.sort((ne,re)=>{const Q=ae.get(ne)??0,K=ae.get(re)??0;return Q!==K&&Number.isFinite(Q-K)?Q-K:Q!==K?QV.set(ne,re))}const X=U=>{const $=T.get(U.source)??0,ae=T.get(U.target)??0;return $>ae?"down":$!u||U==="down"?{source:"bottom",target:"top"}:U==="up"?{source:"top",target:"bottom"}:{source:"top",target:"top"},P=new Map(r.map(U=>[U.id,{top:0,bottom:0}]));for(const U of i){const $=j(X(U));P.get(U.source)[$.source]+=1,P.get(U.target)[$.target]+=1}const A=new Set(r.filter(U=>!a.has(U.id)).map(U=>U.id)),H=new Map(r.map(U=>{const $=A.has(U.id),ae=t.sizing?.(U,$)??{label:U.id,meta:Su(U,$)},ne=P.get(U.id)??{top:0,bottom:0},re=(Math.max(ne.top,ne.bottom)+1)*c;return[U.id,Math.max(rm(ae.label,ae.meta),re)]})),L=z.map(U=>U.reduce(($,ae)=>$+(H.get(ae)??0),0)),E=z.map((U,$)=>(L[$]??0)+Math.max(0,U.length-1)*Md),y=Math.max(1,...E),O=z.map((U,$)=>Math.min(y,Math.max(E[$]??0,U.length*r8))),N=y+Tn*2,B=M*(ur+l)-l+Tn*2,W=new Map,Y=new Map(r.map(U=>[U.id,U])),J=Math.max(0,...r.map(U=>U.dependents?.files??0));z.forEach((U,$)=>{const ae=O[$]??0,ne=L[$]??0,re=U.length>1?(ae-ne)/(U.length-1):0;let Q=Tn+(y-ae)/2+(U.length===1?(ae-ne)/2:0);const K=Tn+(M-1-$)*(ur+l);for(const Z of U){const ce=H.get(Z)??nm,te=Y.get(Z);W.set(Z,{id:Z,module:te,island:A.has(Z),generated:te.files>0&&te.generated===te.files,weight:J===0?0:(te.dependents?.files??0)/J,layer:$,x:Q,y:K,width:ce,height:ur,sourceHandles:[],targetHandles:[],ports:{top:[],bottom:[]}}),Q+=ce+re}});const G=[],ee=new Map;for(const U of i){const $=W.get(U.source),ae=W.get(U.target);if(!$||!ae)continue;const ne=Jr(U),re=X(U),Q={id:ne,source:U.source,target:U.target,sourceHandle:`s:${ne}`,targetHandle:`t:${ne}`,link:U,width:sm(U.count),back:$.layer<=ae.layer,thin:U.countU.other-$.other||U.id.localeCompare($.id);for(const[U,$]of ee){const ae=W.get(U);ae&&($.top.sort(oe),$.bottom.sort(oe),ae.ports={top:$.top.map(ne=>({id:ne.id,type:ne.type})),bottom:$.bottom.map(ne=>({id:ne.id,type:ne.type}))},ae.sourceHandles=$.bottom.filter(ne=>ne.type==="source").map(ne=>ne.id),ae.targetHandles=$.top.filter(ne=>ne.type==="target").map(ne=>ne.id))}const ge=z.map((U,$)=>({index:$,y:Tn+(M-1-$)*(ur+l)+ur/2,label:M===1?null:$===M-1?"entry points":$===0?"foundations — depend on nothing below":null}));return{nodes:[...W.values()],edges:G,layers:ge,width:N,height:B,basis:{kind:p?"declared":"all",declaredLinks:v.length,totalLinks:i.length},minWeight:o,hiddenLinks:G.filter(U=>U.thin||U.back).length,mutual:k.sort((U,$)=>$.back.count-U.back.count||U.back.source.localeCompare($.back.source)),moduleCycles:f8(r.map(U=>U.id),G)}}function Eu(e,t){return t!==null?e.source===t||e.target===t:!e.thin&&!e.back}function Cd(e,t,r){const s=e.ports.top.findIndex(i=>i.id===t&&i.type===r);if(s>=0)return{x:e.x+e.width*(s+1)/(e.ports.top.length+1),y:e.y};const a=e.ports.bottom.findIndex(i=>i.id===t&&i.type===r);return a>=0?{x:e.x+e.width*(a+1)/(e.ports.bottom.length+1),y:e.y+e.height}:{x:e.x+e.width/2,y:r==="source"?e.y+e.height:e.y}}function uv(e,t){const r={top:[],bottom:[]};return e.set(t,r),r}function fv(e,t){const r=e.get(t);return r?r.x+r.width/2:0}function u8(e,t,r){const s=t.get(e)??[];if(s.length===0)return Number.POSITIVE_INFINITY;let a=0;for(const i of s)a+=r.get(i)??0;return a/s.length}function am(e,t,r,s){const a=r.get(e);if(a!==void 0)return a;if(s.has(e))return 0;s.add(e);let i=0;for(const o of t.get(e)??[])i=Math.max(i,am(o,t,r,s)+1);return s.delete(e),r.set(e,i),i}function f8(e,t){const r=new Map(e.map(v=>[v,[]]));for(const v of t)r.get(v.source)?.push(v.target);for(const v of r.values())v.sort();const s=new Map,a=new Map,i=new Set,o=[],l=[];let c=0;const u=v=>{s.set(v,c),a.set(v,c),c+=1,o.push(v),i.add(v);for(const p of r.get(v)??[])s.has(p)?i.has(p)&&a.set(v,Math.min(a.get(v)??0,s.get(p)??0)):(u(p),a.set(v,Math.min(a.get(v)??0,a.get(p)??0)));if(a.get(v)===s.get(v)){const p=[];for(;;){const f=o.pop();if(f===void 0||(i.delete(f),p.push(f),f===v))break}p.length>2&&l.push(p.sort())}};for(const v of[...e].sort())s.has(v)||u(v);return l.sort((v,p)=>p.length-v.length||(v[0]??"").localeCompare(p[0]??""))}var v8=S(''),h8=S(' ',1);function p8(e,t){We(t,!0);const r=b(()=>t.data),s=b(()=>n(r).layout),a=b(()=>n(s).module);function i(z,R){return`left:${(z+1)/(R+1)*100}%`}var o=h8(),l=_e(o);ke(l,18,()=>n(s).targetHandles,z=>z,(z,R,D)=>{{let V=b(()=>`t:${R}`),X=b(()=>i(n(D),n(s).targetHandles.length));On(z,{type:"target",get id(){return n(V)},get position(){return ht.Top},get style(){return n(X)},isConnectable:!1})}});var c=h(l,2);let u;var v=d(c),p=d(v);Lt(p,{kind:"module",size:22});var f=h(v,2),g=d(f),_=h(f,2);let x;var k=d(_),C=h(_,2);{var T=z=>{var R=v8();I(D=>rt(R,D),[()=>`width:${(n(s).weight*100).toFixed(1)}%`]),m(z,R)};F(C,z=>{n(s).weight>0&&z(T)})}var M=h(c,2);ke(M,18,()=>n(s).sourceHandles,z=>z,(z,R,D)=>{{let V=b(()=>`s:${R}`),X=b(()=>i(n(D),n(s).sourceHandles.length));On(z,{type:"source",get id(){return n(V)},get position(){return ht.Bottom},get style(){return n(X)},isConnectable:!1})}}),I(z=>{u=qe(c,1,"mnode svelte-1ymw5ah",null,u,{sel:n(r).selected,dimmed:n(r).dimmed,test:n(a).test,gen:n(s).generated}),rt(c,`width:${n(s).width}px;height:${n(s).height}px`),se(c,"aria-pressed",n(r).selected),se(c,"title",`${n(a).id} — ${n(a).symbols} symbols in ${n(a).files} file${n(a).files===1?"":"s"}${(n(a).dependents?.files??0)>0?`. ${n(a).dependents.files} file${n(a).dependents.files===1?"":"s"} outside it, across ${n(a).dependents.modules} module${n(a).dependents.modules===1?"":"s"}, reference into it.`:""}${n(s).island?". Nothing in the index depends on it.":""}${n(s).generated?". Every file in it is tool-generated.":""}`),w(g,n(a).id),x=qe(_,1,"count svelte-1ymw5ah",null,x,{island:n(s).island}),w(k,z)},[()=>Su(n(a),n(s).island)]),xe("click",c,()=>n(r).onSelect(n(s).id)),m(e,o),Ke()}St(["click"]);var g8=Jt('',1);function m8(e,t){const r=b(()=>t.data),s=b(()=>{const l=(t.sourceY+t.targetY)/2;return`M${t.sourceX},${t.sourceY} C${t.sourceX},${l} ${t.targetX},${l} ${t.targetX},${t.targetY}`});var a=g8(),i=_e(a);{let l=b(()=>`medge${n(r).edge.back?" back":""}${n(r).hot?" hot":""}${n(r).dimmed?" dimmed":""}`),c=b(()=>`stroke-width:${n(r).edge.width}px`);Js(i,{get path(){return n(s)},get class(){return n(l)},get style(){return n(c)}})}var o=h(i);I(()=>se(o,"d",n(s))),xe("mousemove",o,l=>n(r).onHover(n(r).edge,l)),ft("mouseleave",o,()=>n(r).onHover(null,null)),m(e,a)}St(["mousemove"]);const _8=2;function y8(e){return`data:image/svg+xml;charset=utf-8,${encodeURIComponent(e)}`}function b8(e){const t=Number(/\bwidth="(\d+(?:\.\d+)?)"/.exec(e)?.[1]??0),r=Number(/\bheight="(\d+(?:\.\d+)?)"/.exec(e)?.[1]??0);return{width:Math.max(1,Math.round(t)),height:Math.max(1,Math.round(r))}}function w8(e){return new Promise((t,r)=>{const s=new Image;s.onload=()=>t(s),s.onerror=()=>r(new Error("The image could not be rendered.")),s.src=e})}async function x8(e){const{width:t,height:r}=b8(e),s=await w8(y8(e)),a=document.createElement("canvas");a.width=t,a.height=r;const i=a.getContext("2d");if(i===null)throw new Error("This browser would not give up a 2D canvas.");return i.drawImage(s,0,0,t,r),await new Promise((o,l)=>{a.toBlob(c=>c?o(c):l(new Error("The image could not be encoded.")),"image/png")})}function om(e,t){const r=URL.createObjectURL(e),s=document.createElement("a");s.href=r,s.download=t,document.body.appendChild(s),s.click(),s.remove(),setTimeout(()=>URL.revokeObjectURL(r),1e4)}function k8(e,t){om(new Blob([e],{type:"image/svg+xml;charset=utf-8"}),t)}async function S8(e,t){if(typeof navigator.clipboard?.write=="function"&&typeof ClipboardItem=="function")try{return await navigator.clipboard.write([new ClipboardItem({"image/png":e()})]),"copied"}catch{}return om(await e(),t),"downloaded"}var E8=S('
      ');function im(e,t){We(t,!0);let r=Ie(t,"disabled",3,!1),s=he(!1);async function a(){if(!n(s)){q(s,!0);try{const p=await S8(()=>x8(t.build(_8)),`${t.filename}.png`);Hn.show(p==="copied"?"Image copied · paste it into a comment":"Clipboard unavailable · image saved instead")}catch(p){Hn.show(p instanceof Error?p.message:"The image could not be made.")}finally{q(s,!1)}}}function i(){try{k8(t.build(1),`${t.filename}.svg`),Hn.show("SVG saved")}catch(p){Hn.show(p instanceof Error?p.message:"The file could not be saved.")}}var o=E8(),l=d(o),c=d(l);Ne(c,{name:"copy"});var u=h(c,1,!0),v=h(l,2);I(()=>{l.disabled=r()||n(s),w(u,n(s)?"Rendering…":"Copy image"),v.disabled=r()}),xe("click",l,a),xe("click",v,i),m(e,o),Ke()}St(["click"]);var M8=S(''),C8=S('
      '),T8=S(" ",1),I8=S('
      nothing
      '),vv=S('
      ',1),ui=S('

      '),A8=S('

      '),N8=S(`

      Nothing in the index depends on this module — no import, call or reference crosses into + it. It may be an entry point, or reached in a way the graph cannot see.

      `),z8=S('
      Symbols
      Files
      Dependents files
      ',1),P8=S(`

      Architecture map

      Derived from the graph, not drawn by hand: each module sits one layer above the modules it + depends on, so reading top to bottom follows the dependency direction. Line weight is how many + calls, imports and type references cross the link.

      Hover a link to see what crosses it — the counts by kind and the symbol pairs behind the + weight. Click a module to isolate its links and list its files.

      `,1),hv=S(""),L8=S('
      View
      ',1),O8=S(`

      Too few links here carry an import or a declared type, so the layering uses raw reference + counts. A name shared by two unrelated modules can move a box.

      `),q8=S('
      '),Ac=S('
      '),D8=S('
      Mutual dependencies
      '),R8=S('
      '),H8=S('
      Dependency cycles
      '),j8=S(' '),F8=S('
      ',1),B8=S('
      Circular imports between files
      '),V8=S('
      ',1),W8=S(" "),K8=S('
      no files in the index for this module
      '),Y8=S('

      Click a module on the map to list its files.

      '),X8=S('Open first file'),G8=S('');function Z8(e,t){We(t,!0);const r=(y,O=kn,N=kn,B=kn,W=kn)=>{var Y=vv(),J=_e(Y),G=d(J);{let $=b(()=>B()==="target"?"arrow-right":"corner-down-right");Ne(G,{get name(){return n($)},size:14})}var ee=h(G),oe=h(J,2);{var ge=$=>{var ae=T8(),ne=_e(ae);ke(ne,17,()=>N().slice(0,8),K=>K.source+K.target,(K,Z)=>{var ce=M8(),te=d(ce),ie=d(te),ve=h(te,2),fe=d(ve),pe=h(ve,2),ye=d(pe);let Pe;I(de=>{w(ie,B()==="target"?n(Z).target:n(Z).source),w(fe,n(Z).count),Pe=rt(ye,"",Pe,de)},[()=>({width:`${Math.max(4,Math.round(100*n(Z).count/W()))}%`})]),xe("click",ce,()=>t.onSelect(B()==="target"?n(Z).target:n(Z).source)),m(K,ce)});var re=h(ne,2);{var Q=K=>{var Z=C8(),ce=d(Z);I(()=>w(ce,`+${N().length-8} more`)),m(K,Z)};F(re,K=>{N().length>8&&K(Q)})}m($,ae)},U=$=>{var ae=I8();m($,ae)};F(oe,$=>{N().length>0?$(ge):$(U,-1)})}I(()=>w(ee,`${O()??""} · ${N().length??""}`)),m(y,Y)},s=[1,2,3,4];function a(y){return y===1?"top-level folders":`${y} folders deep`}const i=b(()=>t.selected===null?null:t.layout.nodes.find(y=>y.id===t.selected)??null),o=b(()=>n(i)?.module??null),l=b(()=>new Set(n(o)?.generatedFiles??[])),c=b(()=>t.selected===null?[]:t.layout.edges.filter(y=>y.source===t.selected).map(y=>y.link).sort((y,O)=>O.count-y.count||y.target.localeCompare(O.target))),u=b(()=>t.selected===null?[]:t.layout.edges.filter(y=>y.target===t.selected).map(y=>y.link).sort((y,O)=>O.count-y.count||y.source.localeCompare(O.source))),v=b(()=>t.layout.edges.filter(y=>y.thin&&!y.back).length);let p=he("overview");vt(()=>{t.selected,q(p,"overview")});const f=b(()=>Math.max(1,...n(c).map(y=>y.count))),g=b(()=>Math.max(1,...n(u).map(y=>y.count)));var _=G8(),x=d(_),k=d(x);let C;var T=h(k,2);let M;var z=h(T,2);let R;var D=h(x,2),V=d(D);{var X=y=>{var O=L8(),N=_e(O);{var B=Q=>{var K=z8(),Z=_e(K),ce=d(Z);Lt(ce,{kind:"module",size:32});var te=h(ce,2),ie=d(te),ve=d(ie),fe=h(ie,2),pe=d(fe),ye=h(pe);{var Pe=ct=>{var pt=Yt();I(Se=>w(pt,`· ${Se??""}`),[()=>n(o).languages.map(Se=>Se.language).join(", ")]),m(ct,pt)};F(ye,ct=>{n(o).languages.length>0&&ct(Pe)})}var de=h(te,2),be=d(de);Ne(be,{name:"x"});var Ee=h(Z,2),Ge=d(Ee),me=h(d(Ge)),ze=d(me),De=h(Ge,2),Le=h(d(De)),Ze=d(Le),Re=h(De,2),ue=h(d(Re)),le=d(ue),we=h(Ee,2);{var Ce=ct=>{var pt=ui(),Se=d(pt);I(()=>w(Se,n(o).generated===n(o).files?"Every file in it is tool-generated.":`${n(o).generated} of its files are tool-generated.`)),m(ct,pt)};F(we,ct=>{n(o).generated>0&&ct(Ce)})}var $e=h(we,2);{var Oe=ct=>{var pt=A8(),Se=d(pt),Ae=d(Se),je=h(Se);I((Fe,Me)=>{w(Ae,Fe),w(je,` outside it, across + ${Me??""}, reference straight into it — the + floor on what a change here has to be checked against, and the bar along the bottom of + the box.`)},[()=>bt(n(o).dependents.files,"file"),()=>bt(n(o).dependents.modules,"module")]),m(ct,pt)};F($e,ct=>{(n(o).dependents?.files??0)>0&&ct(Oe)})}var at=h($e,2);{var wt=ct=>{var pt=N8();m(ct,pt)};F(at,ct=>{n(i)?.island&&ct(wt)})}var Mt=h(at,2);r(Mt,()=>"Depends on",()=>n(c),()=>"target",()=>n(f));var Tt=h(Mt,2);r(Tt,()=>"Depended on by",()=>n(u),()=>"source",()=>n(g)),I((ct,pt,Se,Ae)=>{w(ve,n(o).id),w(pe,ct),w(ze,pt),w(Ze,Se),w(le,Ae)},[()=>bt(n(o).files,"file"),()=>n(o).symbols.toLocaleString(),()=>n(o).files.toLocaleString(),()=>(n(o).dependents?.files??0).toLocaleString()]),xe("click",de,()=>t.onSelect(null)),m(Q,K)},W=Q=>{var K=P8();m(Q,K)};F(N,Q=>{n(o)?Q(B):Q(W,-1)})}var Y=h(N,4),J=h(d(Y),2);ke(J,21,()=>t.payload.roots,Q=>Q.root,(Q,K)=>{var Z=hv(),ce=d(Z),te={};I(()=>{w(ce,`${n(K).label??""} · ${n(K).files??""} files`),te!==(te=n(K).root)&&(Z.value=(Z.__value=n(K).root)??"")}),m(Q,Z)});var G;wo(J);var ee=h(Y,2),oe=h(d(ee),2),ge=d(oe),U=d(ge);ge.value=ge.__value="auto";var $=h(ge);ke($,16,()=>s,Q=>Q,(Q,K)=>{var Z=hv(),ce=d(Z),te={};I((ie,ve)=>{w(ce,ie),te!==(te=ve)&&(Z.value=(Z.__value=ve)??"")},[()=>a(K),()=>String(K)]),m(Q,Z)});var ae;wo(oe);var ne=h(ee,2),re=d(ne);I((Q,K)=>{G!==(G=t.payload.root)&&(J.value=(J.__value=t.payload.root)??"",Ws(J,t.payload.root)),w(U,`automatic — ${Q??""}`),ae!==(ae=K)&&(oe.value=(oe.__value=K)??"",Ws(oe,K)),up(re,t.includeTests)},[()=>a(t.payload.depth),()=>t.chosenDepth===null?"auto":String(t.chosenDepth)]),xe("change",J,Q=>t.onSelectRoot(Q.currentTarget.value)),xe("change",oe,Q=>{const K=Q.currentTarget.value;t.onSelectDepth(K==="auto"?null:Number(K))}),xe("change",re,Q=>t.onToggleTests(Q.currentTarget.checked)),m(y,O)},j=y=>{var O=V8(),N=_e(O),B=d(N);{var W=Q=>{var K=ui(),Z=d(K);I(ce=>w(Z,`${ce??""} carrying fewer than ${t.layout.minWeight??""} references + ${n(v)===1?"is":"are"} hidden until you select a module ${n(v)===1?"it":"they"} touch.`),[()=>bt(n(v),"link")]),m(Q,K)};F(B,Q=>{n(v)>0&&Q(W)})}var Y=h(B,2);{var J=Q=>{var K=ui(),Z=d(K);I(()=>w(Z,`The layering uses the ${t.layout.basis.declaredLinks??""} of ${t.layout.basis.totalLinks??""} links with an + import, a qualified name, an inheritance clause or a typed receiver behind them. Bare + name matches still count toward line weight, but they do not decide what sits above what.`)),m(Q,K)},G=Q=>{var K=O8();m(Q,K)};F(Y,Q=>{t.layout.basis.kind==="declared"?Q(J):Q(G,-1)})}var ee=h(Y,2);{var oe=Q=>{var K=ui(),Z=d(K);I(ce=>w(Z,`${ce??""} below confidence ${t.payload.excluded.confidenceBelow??""} + ${t.payload.excluded.uncertainEdges===1?"is":"are"} excluded from every count on this + screen — they are name-only guesses.`),[()=>bt(t.payload.excluded.uncertainEdges,"cross-module reference")]),m(Q,K)};F(ee,Q=>{t.payload.excluded.uncertainEdges>0&&Q(oe)})}var ge=h(N,2);{var U=Q=>{var K=D8(),Z=d(K),ce=h(d(Z)),te=d(ce),ie=h(Z,2);ke(ie,17,()=>t.layout.mutual.slice(0,8),pe=>pe.back.source+pe.back.target,(pe,ye)=>{var Pe=q8(),de=d(Pe),be=d(de),Ee=h(de),Ge=h(Ee),me=d(Ge);I(()=>{w(be,n(ye).back.source),w(Ee,` ⇄ ${n(ye).back.target??""} `),w(me,`(${n(ye).back.count??""} back-references)`)}),m(pe,Pe)});var ve=h(ie,2);{var fe=pe=>{var ye=Ac(),Pe=d(ye);I(()=>w(Pe,`+${t.layout.mutual.length-8} more`)),m(pe,ye)};F(ve,pe=>{t.layout.mutual.length>8&&pe(fe)})}I(pe=>w(te,`· ${pe??""} — the lighter direction, dashed when + selected`),[()=>bt(t.layout.mutual.length,"pair")]),m(Q,K)};F(ge,Q=>{t.layout.mutual.length>0&&Q(U)})}var $=h(ge,2);{var ae=Q=>{var K=H8(),Z=d(K),ce=h(d(Z)),te=d(ce),ie=h(Z,2);ke(ie,17,()=>t.layout.moduleCycles.slice(0,6),Kn,(ve,fe)=>{var pe=R8(),ye=d(pe);I(Pe=>w(ye,`${Pe??""} → ${n(fe)[0]??""}`),[()=>n(fe).join(" → ")]),m(ve,pe)}),I(ve=>w(te,`· ${ve??""} of three or more modules`),[()=>bt(t.layout.moduleCycles.length,"loop")]),m(Q,K)};F($,Q=>{t.layout.moduleCycles.length>0&&Q(ae)})}var ne=h($,2);{var re=Q=>{var K=B8(),Z=d(K),ce=h(d(Z)),te=d(ce),ie=h(Z,2);ke(ie,17,()=>t.payload.cycles.items.slice(0,6),Kn,(pe,ye)=>{var Pe=F8(),de=_e(Pe),be=d(de),Ee=d(be),Ge=h(be),me=h(de,2);ke(me,16,()=>n(ye).files,Le=>Le,(Le,Ze)=>{var Re=j8(),ue=d(Re);I(le=>{se(Re,"href",le),w(ue,Ze)},[()=>rn(Ze)]),m(Le,Re)});var ze=h(me,2);{var De=Le=>{var Ze=Ac(),Re=d(Ze);I(()=>w(Re,`+${n(ye).size-n(ye).files.length} more files in this group`)),m(Le,Ze)};F(ze,Le=>{n(ye).size>n(ye).files.length&&Le(De)})}I(Le=>{w(Ee,`${n(ye).size??""} files ·`),w(Ge,` ${Le??""}`)},[()=>n(ye).modules.join(", ")]),m(pe,Pe)});var ve=h(ie,2);{var fe=pe=>{var ye=Ac(),Pe=d(ye);I(()=>w(Pe,`+${t.payload.cycles.total-t.payload.cycles.shown} more groups`)),m(pe,ye)};F(ve,pe=>{t.payload.cycles.truncated&&pe(fe)})}I(pe=>w(te,`· ${pe??""}`),[()=>bt(t.payload.cycles.total,"group")]),m(Q,K)};F(ne,Q=>{t.payload.cycles.total>0&&Q(re)})}m(y,O)},P=y=>{var O=Et(),N=_e(O);{var B=Y=>{var J=vv(),G=_e(J),ee=d(G);Ne(ee,{name:"folder",size:14});var oe=h(ee),ge=h(G,2);{var U=ae=>{var ne=Et(),re=_e(ne);ke(re,16,()=>t.files,Q=>Q,(Q,K)=>{var Z=W8();let ce;var te=d(Z);Ne(te,{name:"file-code-2",size:14});var ie=h(te,1,!0);I((ve,fe,pe)=>{ce=qe(Z,1,"filerow svelte-dzmqqy",null,ce,ve),se(Z,"href",fe),se(Z,"title",pe),w(ie,K)},[()=>({gen:n(l).has(K)}),()=>rn(K),()=>n(l).has(K)?`${K} — tool-generated`:K]),m(Q,Z)}),m(ae,ne)},$=ae=>{var ne=K8();m(ae,ne)};F(ge,ae=>{t.files.length>0?ae(U):ae($,-1)})}I(()=>w(oe,`Files · ${n(o).fileList?.total??t.files.length??""}`)),m(Y,J)},W=Y=>{var J=Y8();m(Y,J)};F(N,Y=>{n(o)?Y(B):Y(W,-1)})}m(y,O)};F(V,y=>{n(p)==="overview"?y(X):n(p)==="dependencies"?y(j,1):y(P,-1)})}var A=h(D,2),H=d(A);{var L=y=>{var O=X8(),N=d(O);Ne(N,{name:"external-link"}),I(B=>se(O,"href",B),[()=>rn(t.files[0]??"")]),m(y,O)};F(H,y=>{n(o)&&t.files.length>0&&y(L)})}var E=h(H,2);im(E,{get build(){return t.buildSvg},get filename(){return t.exportName}}),I(()=>{se(k,"aria-selected",n(p)==="overview"),C=qe(k,1,"svelte-dzmqqy",null,C,{on:n(p)==="overview"}),se(T,"aria-selected",n(p)==="dependencies"),M=qe(T,1,"svelte-dzmqqy",null,M,{on:n(p)==="dependencies"}),se(z,"aria-selected",n(p)==="files"),R=qe(z,1,"svelte-dzmqqy",null,R,{on:n(p)==="files"})}),xe("click",k,()=>q(p,"overview")),xe("click",T,()=>q(p,"dependencies")),xe("click",z,()=>q(p,"files")),m(e,_),Ke()}St(["click","change"]);var U8=S(' '),Q8=S('
      '),J8=S(`
      src/api A module — one directory, with the symbols and files in it
      src/db The bar along the bottom is how much leans on it — files elsewhere that reference + straight into it, against the most depended-on box here. The count is on the box
      Points back up — the lighter half of a mutual dependency, or a link with no import or + declared type behind it. Drawn only while a module it touches is selected
      top / bottom A module sits one layer above everything it depends on, so entry points end up at the top + and the foundations — which depend on nothing below — at the bottom
      src/api Selected: click a module to bring out its links and list its files; everything more than one hop away fades
      nothing depends on this No link in the index arrives here — a script, a workflow, an unreferenced corner
      __tests__ More than half its files are tests; off unless you turn tests on
      gen Every file in it is tool-generated — nobody wrote it and nobody edits it
      `),$8=S('
      ');function e6(e,t){We(t,!0);var r=$8();let s;var a=d(r),i=h(d(a),4);{var o=p=>{var f=U8(),g=d(f);I(()=>w(g,`${t.thinCount??""} link${t.thinCount===1?"":"s"} < ${t.minWeight??""} calls hidden`)),m(p,f)};F(i,p=>{t.thinCount>0&&p(o)})}var l=h(i,2),c=d(l);{let p=b(()=>t.open?"chevron-down":"chevron-right");Ne(c,{get name(){return n(p)},size:14})}var u=h(a,2);{var v=p=>{var f=J8(),g=h(d(f),4),_=h(d(g),2),x=d(_),k=h(g,14);{var C=T=>{var M=Q8(),z=d(M),R=d(z),D=h(z,2),V=d(D);I(()=>{w(R,`${t.thinCount??""} hidden`),w(V,`Links carrying fewer than ${t.minWeight??""} references wait until you select a module they + touch, so a weak coincidence never draws as a dependency`)}),m(T,M)};F(k,T=>{t.thinCount>0&&T(C)})}I(()=>w(x,`Depends on — the box above calls, imports, extends or names a type from the box below. + Thicker is more references${t.declaredBasis?"":"; here the layering had too few imports to trust, so it used raw counts"}`)),m(p,f)};F(u,p=>{t.open&&p(v)})}I(()=>{s=qe(r,1,"legend svelte-148kree",null,s,{open:t.open}),se(a,"aria-expanded",t.open),se(a,"title",t.open?"Fold the key":"Open the full key")}),xe("click",a,()=>t.onToggle(!t.open)),m(e,r),Ke()}St(["click"]);const t6=380,n6=86,r6=6.6,s6=18,Ds=35,sl=19,Mu=12,a6=sl+Mu,pv=24,fi=32;function o6(e){const t=e.source?.lines?.length??0,r=t>0?t*sl+Mu:a6;return Ds+r}const i6=240,go=12,lr=17.4,mo=18,As=8,l6=32;function cs(e){return Math.max(1,Math.ceil(e.length/l6))}const vi=(e,t,r)=>e===1?t:r;function Cu(e){const t=e.sites.map(s=>{const a=[];return s.key===null&&a.push("the key is a runtime value"),s.moreSites>0&&a.push(`+${s.moreSites} more such ${vi(s.moreSites,"site","sites")} here`),{headline:`${s.label} at line ${s.line}`,key:s.key,notes:a,candidates:s.candidates,candidateHeading:s.candidates.length>0?`${s.candidates.length} candidate ${vi(s.candidates.length,"target","targets")} ›`:null,candidateNote:s.candidateNote}}),r=e.missed.map(s=>s.name);return{intro:e.sites.length>0?`${e.node.name} chooses its next call at runtime.`:`${e.node.name} is the last symbol on this path.`,sites:t,quiet:e.sites.length>0?null:"No dynamic-dispatch site was detected in its body, so nothing here explains the break.",uncertainHeading:e.uncertain.total>0?`${e.uncertain.total} name-only ${vi(e.uncertain.total,"match","matches")} not followed (confidence < 0.6)`:null,uncertain:e.uncertain.items,further:e.further.total>0?`It makes ${e.further.total} further resolved ${vi(e.further.total,"call","calls")} this path does not need.`:null,missed:r.length>0?`Never reaches ${r.join(", ")}${e.missed.length`cap:${e}`,lm=e=>e.startsWith("cap:"),gv=e=>lm(e)?e.slice(4):e,mv=26;function v6(e){return e.replace(/[\w.@$/\\-]+[/\\]([\w.$-]+:\d+)/g,"$1")}function h6(e){return v6(e.label).split(" · ").map(t=>t.trim()).filter(Boolean).map(t=>t.length>mv?`${t.slice(0,mv-1)}…`:t)}function p6(e){return typeof e.line=="number"&&e.line>0?`line ${e.line}`:null}function g6(e,t){const r=e.find(L=>L.id===t)??e[0]??null,s=new Map;r?.hops.forEach((L,E)=>s.set(L.node.id,E));const a=new Map,i=new Map,o=new Map,l=new Map;let c=0;for(const L of e)for(let E=0;E(v.get(L)??0)===0),f=new Set;for(;p.length>0;){const L=p.shift();f.add(L);for(const E of o.get(L)??[]){u.set(E,Math.max(u.get(E)??0,(u.get(L)??0)+1));const y=(v.get(E)??0)-1;v.set(E,y),y===0&&p.push(E)}}for(const L of a.keys()){if(f.has(L))continue;let E=0;for(const[y,O]of o)O.has(L)&&(E=Math.max(E,(u.get(y)??0)+1));u.set(L,E)}const g=new Map;for(const L of e){const E=L.boundary;if(!E||!a.has(E.node.id))continue;const y=g.get(E.node.id);y?y.flows.includes(L.id)||y.flows.push(L.id):g.set(E.node.id,{boundary:E,flows:[L.id]})}const _=new Map;for(const[L,E]of a)_.set(L,{id:L,width:t6,height:o6(E.hop),rank:E.order,onActive:s.has(L)});const x=new Map;let k=a.size;for(const[L,E]of g){const y=f6(L);x.set(y,(u.get(L)??0)+1),_.set(y,{id:y,width:i6,height:c6(E.boundary),rank:k++,onActive:s.has(L)})}const C=L=>x.get(L)??u.get(L)??0,T=new Map;for(const L of _.keys()){const E=C(L),y=T.get(E);y?y.push(L):T.set(E,[L])}for(const L of T.values())L.sort((E,y)=>{const O=_.get(E).onActive?0:1,N=_.get(y).onActive?0:1;return O!==N?O-N:_.get(E).rank-_.get(y).rank});const M=Math.max(...T.keys())+1,z=[...i.entries()].map(([L,E])=>({key:L,link:E,lines:h6(E.edge),lineLabel:p6(E.edge)})),R=Array.from({length:Math.max(0,M-1)},()=>n6);for(const{link:L,lines:E,lineLabel:y}of z){const O=u.get(L.source)??0;if(O<0||O>=R.length)continue;const N=Math.max(0,...E.map(B=>B.length),y?.length??0);R[O]=Math.max(R[O],Math.ceil(N*r6)+s6)}const D=Array.from({length:M},()=>0);for(const[L,E]of T)D[L]=Math.max(...E.map(y=>_.get(y).width));const V=[fi];for(let L=1;Ly+_.get(O).height,0)+pv*(E.length-1));const j=Math.max(...X.values()),P=new Map,A=[];for(const[L,E]of T){let y=fi+(j-(X.get(L)??0))/2;for(const O of E){const N=_.get(O),B=g.get(gv(O));if(B&&lm(O))A.push({id:O,anchorId:gv(O),boundary:B.boundary,x:V[L],y,width:N.width,height:N.height,column:L,flows:B.flows});else{const W=a.get(O);P.set(O,{id:O,hop:W.hop,x:V[L],y,width:N.width,height:N.height,column:L,flows:W.flows,step:s.get(O)??-1,stopLine:g.get(O)?.boundary.sites[0]?.line??null})}y+=N.height+pv}}const H=z.map(({link:L,lines:E,lineLabel:y})=>({id:`${L.source}->${L.target}`,source:L.source,target:L.target,edge:L.edge,flows:L.flows,label:L.edge.label,labelLines:E,lineLabel:y,dash:d6(L.edge),cap:!1}));for(const L of A)H.push({id:`${L.anchorId}->${L.id}`,source:L.anchorId,target:L.id,edge:null,flows:L.flows,label:"end of static path",labelLines:["end of","static path"],lineLabel:null,dash:u6,cap:!0});return{cards:[...P.values()].sort((L,E)=>L.column-E.column||L.y-E.y),endCaps:A.sort((L,E)=>L.column-E.column||L.y-E.y),links:H,width:V[M-1]+D[M-1]+fi,height:fi*2+j,columns:M,gaps:R}}const cm={light:{paper:"#ffffff",paper2:"#eef1f6",press:"#eef1f6",ink:"#1a2130",ink2:"#434d62",ink3:"#5f687c",ink4:"#98a1b3",ruleSoft:"#d8dde7",ruleFaint:"#e6e9f0",accent:"#4155ee",accentSoft:"#e9edff",accentLine:"#b9c3f6",codeComment:"#626a7d"},dark:{paper:"#10141b",paper2:"#1b2130",press:"#1b2130",ink:"#e8ecf4",ink2:"#a9b2c4",ink3:"#838da0",ink4:"#4a5468",ruleSoft:"#232a38",ruleFaint:"#191f29",accent:"#7c93ff",accentSoft:"#1a2140",accentLine:"#3b4a8c",codeComment:"#808aa2"}},m6=cm.light;let yt=m6;function dm(e,t){const r=yt;yt=cm[e??"light"];try{return t()}finally{yt=r}}const fr="'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace",Tu="'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif",ds=24,_6=14,Ua=11,_v="CodeGraph",Pl=.6,Iu=.53,Ai=(e,t)=>e*t*Pl;function $n(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}function y6(e){const t=[`x="${mt(e.x)}"`,`y="${mt(e.y)}"`,`font-family="${e.family??Tu}"`,`font-size="${e.size}"`,`fill="${e.fill}"`];return e.weight&&e.weight!==400&&t.push(`font-weight="${e.weight}"`),e.anchor&&e.anchor!=="start"&&t.push(`text-anchor="${e.anchor}"`),e.preserve&&t.push('xml:space="preserve"'),``}function Rn(e,t){return`${y6(e)}${t}`}function mt(e){return Math.round(e*10)/10}function _s(e,t,r,s,a={}){const i=[`x="${mt(e)}"`,`y="${mt(t)}"`,`width="${mt(r)}"`,`height="${mt(s)}"`,`fill="${a.fill??"none"}"`];return a.fillOpacity!==void 0&&i.push(`fill-opacity="${a.fillOpacity}"`),a.stroke&&(i.push(`stroke="${a.stroke}"`,`stroke-width="${a.strokeWidth??1}"`),a.dash&&i.push(`stroke-dasharray="${a.dash}"`)),``}function Aa(e,t,r,s=Pl){const a=r*s,i=Math.floor(t/a);return i>=e.length?e:i<=1?e.slice(0,Math.max(0,i)):`${e.slice(0,i-1)}…`}function b6(e,t){const r=e.split(/\s+/).filter(Boolean);if(r.length===0)return[""];const s=[];let a="";for(const i of r)a.length===0?a=i:a.length+1+i.length<=t?a=`${a} ${i}`:(s.push(a),a=i);return s.push(a),s}function um(e,t,r,s){const a=s.scale??1,i=_6+Ua,o=Math.max(1,Math.round(e.width+ds*2)),l=Math.max(1,Math.round(e.height+ds*2+i)),c=l-ds,u=s.caption==null||s.caption===""?"":Rn({x:ds,y:c,size:Ua,fill:yt.ink3,family:fr},$n(Aa(s.caption,o-ds*2-Ai(_v.length+3,Ua),Ua)));return[``,t===""?"":`${t}`,_s(0,0,o,l,{fill:yt.paper}),``,r,"",u,Rn({x:o-ds,y:c,size:Ua,fill:yt.ink3,family:fr,anchor:"end"},_v),""].filter(Boolean).join(` +`)}const Qa=12,Ja=16,w6=9,yv=21.5,bv=13,wv=11,Nc=40,x6=6,ta=12,$a=13.5,k6=11,xv=11;function kv(e){return{right:[e.x+e.width,e.y+e.height/2],left:[e.x,e.y+e.height/2]}}function S6(e,t,r){const s=e.hop,a=s.source,i=[],o=`c${e.column}-${Math.round(e.y)}`;i.push(_s(e.x,e.y,e.width,e.height,{fill:yt.paper,stroke:r?yt.accent:yt.ruleSoft}));const l=mp(s.node.kind),c=e.x+Qa,u=e.y+w6;if(i.push(_s(c,u,Ja,Ja,{fill:D_.has(s.node.kind)?yt.press:"none",stroke:yt.ink3,dash:s.node.kind==="file"?"2 2":void 0})),l!==""){const D=l.length>1?8.5:9.5;i.push(Rn({x:c+Ja/2,y:u+Ja/2+D*.36,size:D,fill:yt.ink2,family:fr,weight:500,anchor:"middle"},$n(l)))}const v=`${wn(s.node.file)}:${s.node.line}`,p=Ai(v.length,wv),f=c+Ja+8,g=e.x+e.width-Qa-p-8-f;i.push(Rn({x:f,y:e.y+yv,size:bv,fill:yt.ink,family:fr,weight:600},$n(Aa(s.node.name,g,bv))),Rn({x:e.x+e.width-Qa,y:e.y+yv,size:wv,fill:yt.ink3,family:fr,anchor:"end"},$n(v)),``);const _=a?.lines??[];if(_.length===0){const D=a?.drift?"Changed on disk after the last index sync — source is not shown.":a?.reason??"Source outside this slice or this index.";return i.push(Rn({x:e.x+Qa,y:e.y+Ds+6+$a,size:ta,fill:yt.ink3},$n(Aa(D,e.width-Qa*2,ta,Iu)))),`${i.join("")}`}const x=new Map,k=s.callRef;k&&x.set(k.line,[{ident:k.name,col:k.col,targetId:k.targetId,uncertain:!1,outside:!1,title:""}]);const C=bl(_,a?.from??1,a?.highlight),T=e.x+Nc,M=e.width-Nc-x6,z=Math.floor(M/(ta*Pl)),R=[];return _.forEach((D,V)=>{const X=(a?.from??1)+V,j=e.y+Ds+Mu/2+V*sl,P=C.get(X)??[{cls:"other",text:D,col:0}],A=yl(P,x.get(X)??[]);(X===k?.line||X===e.stopLine)&&R.push(_s(e.x,j,e.width,sl,{fill:yt.accentSoft})),R.push(Rn({x:e.x+Nc-10,y:j+$a,size:k6,fill:yt.ink4,family:fr,anchor:"end"},String(X)));const H=[];let L=0,E=null;if(P.forEach((y,O)=>{if(L>=z)return;const N=z-L,W=y.text.length>N?`${y.text.slice(0,Math.max(0,N-1))}…`:y.text,Y=A.get(O)??null;Y&&(E={from:L,length:W.length}),H.push(E6(W,y,Y!==null)),L+=y.text.length}),R.push(Rn({x:T,y:j+$a,size:ta,fill:yt.ink,family:fr,preserve:!0},H.join(""))),E!==null){const y=E,O=T+Ai(y.from,ta);R.push(``)}}),i.push(`${R.join("")}`),`${i.join("")}`}function E6(e,t,r){if(e==="")return"";const s=$n(e);if(r)return`${s}`;switch(t.cls){case"comment":return`${s}`;case"string":case"number":return`${s}`;case"keyword":return`${s}`;default:return`${s}`}}const M6=32,zc=26;function fm(e){const t=Cu(e.boundary),r=[],s=(i,o,l=!1,c=M6)=>{b6(i,c).forEach((u,v)=>r.push({text:u,kind:o,gapBefore:l&&v===0}))};s("Where the graph stops.","lead"),s(t.intro,"body");for(const i of t.sites){s(i.headline,"form",!0),i.key!==null&&s(`key ${i.key}`,"mono",!1,zc);for(const o of i.notes)s(o,"soft");if(i.candidateHeading!==null){s(i.candidateHeading,"soft");for(const o of i.candidates)s(`${o.display} ${wn(o.node.file)}:${o.node.line}`,"mono",!1,zc)}else i.candidateNote!==null&&s(i.candidateNote,"soft")}if(t.quiet!==null&&s(t.quiet,"soft",!0),t.uncertainHeading!==null){s(t.uncertainHeading,"soft",!0);for(const i of t.uncertain)s(`${i.node.name} ${i.confidence===null?"":i.confidence.toFixed(2)}`,"mono",!1,zc)}t.further!==null&&s(t.further,"body",!0),t.missed!==null&&s(t.missed,"body",!0);let a=go*2;for(const i of r)i.gapBefore&&(a+=As),a+=i.kind==="mono"?mo:lr;return{rows:r,height:Math.round(a)}}function C6(e,t){const{rows:r,height:s}=fm(e),a=[_s(e.x,e.y,e.width,Math.max(e.height,s),{fill:yt.paper,stroke:yt.ruleSoft,dash:"3 3"})];let i=e.y+go;const o=e.x+go,l=e.width-go*2;for(const c of r){c.gapBefore&&(i+=As);const u=c.kind==="mono",v=u?mo:lr,p=c.kind==="form"||c.kind==="lead"?yt.ink:c.kind==="soft"?yt.ink3:yt.ink2;a.push(Rn({x:o,y:i+v*.75,size:u?11.5:12,fill:p,family:u?fr:Tu,weight:c.kind==="lead"?600:400},$n(Aa(c.text,l,u?11.5:12,u?Pl:Iu)))),i+=v}return`${a.join("")}`}function T6(e,t,r,s){const[a,i]=kv(t).right,[o,l]=kv(r).left,u=[``];e.cap||u.push(``);const v=(a+o)/2,p=(i+l)/2;return e.labelLines.forEach((f,g)=>{u.push(Rn({x:v,y:p-8-(e.labelLines.length-1-g)*13,size:xv,fill:yt.ink3,family:fr,anchor:"middle"},$n(f)))}),e.lineLabel&&u.push(Rn({x:v,y:p+17,size:xv,fill:yt.ink3,family:fr,anchor:"middle"},$n(e.lineLabel))),`${u.join("")}`}function I6(e,t={}){return dm(t.theme,()=>A6(e,t))}function A6(e,t){const r=t.showAll??!1,s=t.activeFlowId??null,a=_=>s===null||_.includes(s),i=new Map;for(const _ of e.cards)i.set(_.id,_);const o=new Map;for(const _ of e.endCaps){const x=Math.max(_.height,fm(_).height);o.set(_.id,x),i.set(_.id,{x:_.x,y:_.y,width:_.width,height:x})}const l=[],c=[];for(const _ of e.links){const x=i.get(_.source),k=i.get(_.target);!x||!k||l.push(T6(_,x,k,r&&!a(_.flows)))}for(const _ of e.endCaps)l.push(C6(_,r&&!a(_.flows)));for(const _ of e.cards)c.push(`${_s(_.x,_.y+Ds,_.width,_.height-Ds)}`),l.push(S6(_,r&&_.step<0,r&&_.step>=0));let u=1/0,v=1/0,p=-1/0,f=-1/0;const g=(_,x,k=0,C=0)=>{u=Math.min(u,_),v=Math.min(v,x),p=Math.max(p,_+k),f=Math.max(f,x+C)};for(const _ of i.values())g(_.x,_.y,_.width,_.height);for(const _ of e.links){const x=i.get(_.source),k=i.get(_.target);if(!x||!k)continue;const C=(x.y+x.height/2+k.y+k.height/2)/2;g((x.x+x.width+k.x)/2,C-8-_.labelLines.length*13),_.lineLabel&&g((x.x+x.width+k.x)/2,C+21)}return Number.isFinite(u)||(u=0,v=0,p=1,f=1),um({minX:u,minY:v,width:p-u,height:f-v},c.join(""),l.join(` +`),t)}const Sv=13,Ev=11,Pc=9,Mv=12,Cv=12;function N6(e,t,r){const s=e.module,a=t?2:1,i=[_s(e.x,e.y,e.width,e.height,{fill:t?yt.press:yt.paper,stroke:r?yt.ink4:s.test?yt.ink3:yt.ink,strokeWidth:a,dash:s.test?"4 3":void 0})],o=e.width-Pc*2;return i.push(Rn({x:e.x+Pc,y:e.y+17,size:Sv,fill:r?yt.ink4:yt.ink,family:fr,weight:500},$n(Aa(s.id,o,Sv))),Rn({x:e.x+Pc,y:e.y+31.5,size:Ev,fill:r?yt.ink4:yt.ink3},$n(Aa(Su(s,e.island),o,Ev,Iu)))),e.weight>0&&i.push(_s(e.x,e.y+e.height-4,e.width*e.weight,4,{fill:yt.ink,fillOpacity:r?.1:.3})),i.join("")}function Tv(e,t,r){const s=t.indexOf(r),a=t.length;return s<0||a===0?e.x+e.width/2:e.x+e.width*(s+1)/(a+1)}function z6(e,t,r,s){const a=Tv(t,t.sourceHandles,e.id),i=t.y+t.height,o=Tv(r,r.targetHandles,e.id),l=r.y,c=(i+l)/2,u=`M${mt(a)},${mt(i)} C${mt(a)},${mt(c)} ${mt(o)},${mt(c)} ${mt(o)},${mt(l)}`;return e.back?``:``}function P6(e,t={}){return dm(t.theme,()=>L6(e,t))}function L6(e,t){const r=t.selected??null,s=new Map(e.nodes.map(f=>[f.id,f])),a=r===null?null:new Set([r,...e.edges.flatMap(f=>f.source===r?[f.target]:f.target===r?[f.source]:[])]);let i=1/0,o=1/0,l=-1/0,c=-1/0;for(const f of e.nodes)i=Math.min(i,f.x),o=Math.min(o,f.y),l=Math.max(l,f.x+f.width),c=Math.max(c,f.y+f.height);Number.isFinite(i)||(i=0,o=0,l=1,c=1);const u=i-Cv,v=l+Cv,p=[];for(const f of e.layers)if(p.push(``),f.label!==null){const g=f.index===0?f.y+40:f.y-36;p.push(Rn({x:u,y:g,size:Mv,fill:yt.ink3},$n(f.label))),o=Math.min(o,g-Mv),c=Math.max(c,g+4)}for(const f of e.edges){if(!Eu(f,r))continue;const g=s.get(f.source),_=s.get(f.target);!g||!_||p.push(z6(f,g,_,r!==null&&!f.back))}for(const f of e.nodes)p.push(N6(f,r===f.id,a!==null&&!a.has(f.id)));return um({minX:u,minY:o,width:v-u,height:c-o},"",p.join(` +`),t)}function vm(e,t){const r=t.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,60).replace(/-+$/g,"");return`codegraph-${e}${r?`-${r}`:""}`}var O6=S('

      The map could not be built

      '),q6=S('
      Aggregating the graph by module…
      '),D6=S('

      Nothing to draw here

      '),R6=S('
      '),H6=S('
      ',1),Iv=S(" ",1),j6=S('
      '),F6=S('
      '),B6=S('
      '),V6=S('
      ');function W6(e,t){We(t,!0);let r=he(null),s=he(null),a=he(!0),i=he(null),o=he(null),l=he(null);const c={fitViewOptions:{padding:.12,maxZoom:1,minZoom:.45}},u="codegraph-ui:map-legend";let v=he(gn(p()));function p(){try{return localStorage.getItem(u)==="open"}catch{return!1}}vt(()=>{try{localStorage.setItem(u,n(v)?"open":"closed")}catch{}});const f={module:p8},g={module:m8};vt(()=>{const N=t.root,B=t.depth;An.indexTick;const W=new AbortController;return q(a,!0),q(s,null),i0({root:N,depth:B??void 0},W.signal).then(Y=>{q(r,Y,!0),q(a,!1)}).catch(Y=>{W.signal.aborted||(q(s,Y instanceof Error?Y.message:String(Y),!0),q(a,!1))}),()=>W.abort()});const _=b(()=>n(r)===null?null:zl(n(r),{includeTests:t.tests})),x=b(()=>{if(n(_)===null||n(i)===null)return null;const N=new Set([n(i)]);for(const B of n(_).edges)B.source===n(i)&&N.add(B.target),B.target===n(i)&&N.add(B.source);return N}),k=b(()=>n(_)===null?[]:n(_).nodes.map(N=>({id:N.id,type:"module",position:{x:N.x,y:N.y},draggable:!1,selectable:!1,connectable:!1,data:{layout:N,selected:n(i)===N.id,dimmed:n(x)!==null&&!n(x).has(N.id),onSelect:B=>{q(i,n(i)===B?null:B,!0),q(o,null)}}}))),C=b(()=>n(_)===null?[]:n(_).edges.filter(N=>Eu(N,n(i))).map(N=>({id:N.id,source:N.source,target:N.target,sourceHandle:N.sourceHandle,targetHandle:N.targetHandle,type:"module",selectable:!1,deletable:!1,data:{edge:N,hot:n(o)?.edge.id===N.id||n(i)!==null&&!N.back,dimmed:!1,onHover:M}}))),T=b(()=>n(i)===null||n(r)===null?[]:n(r).modules.find(N=>N.id===n(i))?.fileList.items??[]);function M(N,B){if(N===null||B===null||n(l)===null){q(o,null);return}const W=n(l).getBoundingClientRect();q(o,{edge:N,x:Math.min(B.clientX-W.left+14,W.width-330),y:B.clientY-W.top+14},!0)}function z(N){q(i,null),jt(ua({root:N,tests:t.tests}))}function R(N){q(i,null),jt(ua({root:t.root,depth:N,tests:t.tests}))}function D(N){if(n(_)===null)throw new Error("There is no map to export yet.");const B=n(r)?.root??"";return P6(n(_),{scale:N,theme:pp(xr.choice),selected:n(i),caption:`${B||"the project"} · ${n(_).nodes.length} modules${n(i)?` · ${n(i)} selected`:""}`})}function V(N){q(i,null),jt(ua({root:t.root,depth:t.depth,tests:N}))}var X=V6(),j=d(X),P=d(j);{var A=N=>{var B=O6(),W=h(d(B),2),Y=d(W);I(()=>w(Y,n(s))),m(N,B)},H=N=>{var B=q6();m(N,B)},L=N=>{var B=D6(),W=h(d(B),2),Y=d(W);I(()=>w(Y,`No indexed files sit under this root${t.tests?"":", or every module under it is test code"}. Pick another root on the right.`)),m(N,B)},E=N=>{var B=Iv(),W=_e(B);Il(W,Xr({get nodes(){return n(k)},get edges(){return n(C)},get nodeTypes(){return f},get edgeTypes(){return g},fitView:!0},()=>c,{minZoom:.2,maxZoom:1.6,nodesDraggable:!1,nodesConnectable:!1,elementsSelectable:!1,panOnDrag:!0,proOptions:{hideAttribution:!0},onpaneclick:()=>{q(i,null),q(o,null)},children:(ee,oe)=>{var ge=Iv(),U=_e(ge);N5(U,{target:"back",children:(ne,re)=>{var Q=Et(),K=_e(Q);ke(K,17,()=>n(_).layers,Z=>Z.index,(Z,ce)=>{var te=H6(),ie=_e(te),ve=h(ie,2);{var fe=pe=>{var ye=R6(),Pe=d(ye);I(()=>{rt(ye,`transform:translate(8px,${n(ce).index===0?n(ce).y+40:n(ce).y-36}px)`),w(Pe,n(ce).label)}),m(pe,ye)};F(ve,pe=>{n(ce).label!==null&&pe(fe)})}I(()=>rt(ie,`transform:translate(0px,${n(ce).y}px);width:${n(_).width}px`)),m(Z,te)}),m(ne,Q)},$$slots:{default:!0}});var $=h(U,2);Al($,{position:"top-right",orientation:"horizontal",showLock:!1});var ae=h($,2);t8(ae,{position:"bottom-right",width:176,height:116,pannable:!0,zoomable:!0}),m(ee,ge)},$$slots:{default:!0}}));var Y=h(W,2);{let ee=b(()=>n(_).edges.filter(ge=>ge.thin&&!ge.back).length),oe=b(()=>n(_).basis.kind==="declared");e6(Y,{get minWeight(){return n(_).minWeight},get thinCount(){return n(ee)},get declaredBasis(){return n(oe)},get open(){return n(v)},onToggle:ge=>q(v,ge,!0)})}var J=h(Y,2);{var G=ee=>{var oe=B6(),ge=d(oe),U=d(ge),$=d(U),ae=h(U),ne=h(ge,2),re=d(ne),Q=d(re),K=h(re,2),Z=d(K),ce=h(ne,2);{var te=ve=>{var fe=j6(),pe=d(fe),ye=d(pe);I(()=>w(ye,`${n(o).edge.link.declared??""} through an import or a declared type`)),m(ve,fe)};F(ce,ve=>{n(o).edge.link.declared!==n(o).edge.link.count&&ve(te)})}var ie=h(ce,2);ke(ie,17,()=>n(o).edge.link.topPairs,ve=>ve.from+ve.to,(ve,fe)=>{var pe=F6(),ye=d(pe),Pe=d(ye),de=h(ye),be=d(de);I(()=>{w(Pe,`${n(fe).from??""} → ${n(fe).to??""}`),w(be,n(fe).count)}),m(ve,pe)}),I(ve=>{rt(oe,`left:${n(o).x}px;top:${n(o).y}px`),w($,n(o).edge.source),w(ae,` → ${n(o).edge.target??""}`),w(Q,`${n(o).edge.link.count??""} edges`),w(Z,ve)},[()=>n(o).edge.link.byKind.map(ve=>`${ve.kind} ${ve.count}`).join(" · ")]),m(ee,oe)};F(J,ee=>{n(o)!==null&&ee(G)})}m(N,B)};F(P,N=>{n(s)!==null?N(A):n(a)&&n(r)===null?N(H,1):n(_)!==null&&n(_).nodes.length===0?N(L,2):n(_)!==null&&N(E,3)})}Ut(j,N=>q(l,N),()=>n(l));var y=h(j,2);{var O=N=>{{let B=b(()=>vm("map",n(r).root??""));Z8(N,{get payload(){return n(r)},get layout(){return n(_)},get selected(){return n(i)},get includeTests(){return t.tests},get files(){return n(T)},buildSvg:D,get exportName(){return n(B)},onToggleTests:V,onSelectRoot:z,get chosenDepth(){return t.depth},onSelectDepth:R,onSelect:W=>q(i,W,!0)})}};F(y,N=>{n(r)!==null&&n(_)!==null&&N(O)})}m(e,X),Ke()}var K6=S(''),Y6=S(' ',1);function X6(e,t){We(t,!0);const r=b(()=>t.data),s=b(()=>n(r).layout),a=b(()=>n(r).info);function i(C,T){return`left:${(C+1)/(T+1)*100}%`}var o=Y6(),l=_e(o);ke(l,19,()=>n(s).ports.top,C=>`${C.type}:${C.id}`,(C,T,M)=>{{let z=b(()=>`${n(T).type==="source"?"s":"t"}:${n(T).id}`),R=b(()=>i(n(M),n(s).ports.top.length));On(C,{get type(){return n(T).type},get id(){return n(z)},get position(){return ht.Top},get style(){return n(R)},isConnectable:!1})}});var c=h(l,2);let u;var v=d(c),p=d(v);{var f=C=>{var T=K6();m(C,T)};F(p,C=>{n(a).entry&&C(f)})}var g=h(p,1,!0),_=h(v,2),x=d(_),k=h(c,2);ke(k,19,()=>n(s).ports.bottom,C=>`${C.type}:${C.id}`,(C,T,M)=>{{let z=b(()=>`${n(T).type==="source"?"s":"t"}:${n(T).id}`),R=b(()=>i(n(M),n(s).ports.bottom.length));On(C,{get type(){return n(T).type},get id(){return n(z)},get position(){return ht.Bottom},get style(){return n(R)},isConnectable:!1})}}),I(()=>{u=qe(c,1,"snode svelte-390foq",null,u,{sel:n(r).selected,dimmed:n(r).dimmed,origin:n(a).origin,entry:n(a).entry,unreached:n(a).unreached}),rt(c,`width:${n(s).width}px;height:${n(s).height}px`),se(c,"aria-pressed",n(r).selected),se(c,"title",(n(a).origin?`${n(a).label} — navigates, but no screen reaches it within the walk. In ${n(a).sub}.`:`${n(a).label} — rendered by ${n(a).sub}${n(a).entry?". The entry screen.":""}${n(a).unreached?". No transition in the graph reaches it from the entry.":""}`)+(n(r).onOpen?" Double-click for what happens here.":"")),w(g,n(a).label),w(x,n(a).sub)}),xe("click",c,()=>n(r).onSelect(n(a).id)),ft("dblclick",c,C=>{C.stopPropagation(),n(r).onOpen?.(n(a).id)},!0),m(e,o),Ke()}St(["click"]);function al(e,t){const r=[];let s=0,a=null,i=0;for(let o=0;oo.length>0)}function hm(e){return al(e," || ").length>1?[e.trim()]:al(e," && ")}const Na=e=>({kw:!0,text:e}),_o=e=>({kw:!1,text:e});function Ll(e){const t=e.trim();return t.startsWith("!(")&&Z6(t,1)?[Na("NOT"),_o(t.slice(1))]:/^![A-Za-z_$][\w$.?]*$/.test(t)?[Na("NOT"),_o(t.slice(1))]:[_o(t)]}function G6(e){return Zo(Ll(e))}function ol(e,t){const r=[];return e.forEach((s,a)=>{a>0&&r.push(Na(t)),r.push(...s)}),r}function Zo(e){return e.map(t=>t.text).join(" ")}function Z6(e,t){let r=0,s=null;for(let a=t;ae.indexOf(t)===r)}function Ol(e){return e?ol(al(e," || ").map(t=>ol(pm(al(t," && ")).map(Ll),"AND")),"OR"):[]}function Au(e){const t=Ol(e);return t.length===0?[_o("always")]:[Na("WHEN"),...t]}function ql(e){return Zo(Ol(e))}function il(e){return e.length===0?[]:[Na("WHEN"),...ol(e.map(Ll),"AND")]}function ll(e){const t=e.map(s=>({site:s,all:s.when?pm(hm(s.when)):[]}));if(t.length===0)return{common:[],rows:[]};let r=t[0].all.slice();for(const{all:s}of t.slice(1)){let a=0;for(;a({site:s,rest:a.slice(r.length)}))}}function cl(e,t){return e.length===0?[_o("always")]:[Na(t?"AND":"WHEN"),...ol(e.map(Ll),"AND")]}const Lr=116,gm=.66,U6=.26,mm=24,Q6=6.3,J6=12,za=17,_m=13,ym=za+4,$6=4,e9=2,Us=40;function t9(e,t,r){return s=>{const a=new Set(s),i=new Map(s.map(k=>[k,[]])),o=new Map(s.map(k=>[k,0]));for(const k of r)!a.has(k.source)||!a.has(k.target)||k.source===k.target||(i.get(k.source).push(k.target),o.set(k.target,(o.get(k.target)??0)+1));for(const k of i.values())k.sort();const l=new Map,c=k=>{const C=new Map,T=(z,R)=>{if(l.has(z))return;l.set(z,R);const D=C.get(R);D?D.push(z):C.set(R,[z])};let M=0;for(const[z,R]of k)T(z,R),M=Math.max(M,R);for(let z=0;z<=s.length+M;z++){const R=C.get(z);if(R)for(const D of R)for(const V of i.get(D)??[])T(V,z+1)}};e!==null&&a.has(e)&&c([[e,0]]);const u=[];for(const k of[...t].filter(C=>a.has(C)).sort()){const C=(i.get(k)??[]).map(T=>l.get(T)).filter(T=>T!==void 0);u.push([k,C.length>0?Math.max(0,Math.min(...C)-1):0])}c(u);const v=Math.max(0,...l.values()),p=s.filter(k=>!l.has(k)),f=new Map;if(p.length>0){const k=new Set(p),C=p.filter(z=>(o.get(z)??0)===0);let T=C.length>0?C:[p[0]];for(const z of T)f.set(z,0);let M=0;for(;T.length>0;){M++;const z=[];for(const R of T)for(const D of i.get(R)??[])f.has(D)||!k.has(D)||(f.set(D,M),z.push(D));T=z}for(const z of p)f.has(z)||f.set(z,0)}const g=Math.max(0,...f.values()),_=p.length>0?g+2:0,x=new Map;for(const[k,C]of l)x.set(k,_+v-C);for(const[k,C]of f)x.set(k,g-C);return x}}function bm(e){const t=e.flatMap(s=>s.sites&&s.sites.length>1?s.sites.map(a=>a.when):[s.when]);if(t.length===1){const s=t[0];if(!s)return"";const a=hm(s),i=G6(a[a.length-1]??s),o=a.length>1?`…${i}`:i;return o.length>Us?`${o.slice(0,Us-1)}…`:o}const r=t.filter(s=>s).length;return r>0?`${t.length} ways · ${r} conditional`:`${t.length} ways`}function n9(e){const t=new Map,r=[];for(const f of e.screens){const g={id:f.id,label:f.path,sub:f.component?.name??f.file,screen:f,origin:!1,entry:e.entry===f.id,unreached:!1};t.set(f.id,g),r.push(Av(g,f.incoming+f.outgoing))}for(const f of e.origins){const g={id:f.id,label:f.node.kind==="component"?`<${f.node.name}>`:`${f.node.name}()`,sub:f.sharedBy?`on ${f.sharedBy} screens`:f.node.file,screen:null,origin:!0,entry:!1,unreached:!1};t.set(f.id,g),r.push(Av(g,f.outgoing))}const s=new Map;for(const f of e.links){const g=Jr({source:f.from,target:f.to}),_=s.get(g)??[];_.push(f),s.set(g,_)}const a=[],i=new Map;for(const[f,g]of s){const _=g[0];!t.has(_.from)||!t.has(_.to)||_.from!==_.to&&(a.push({source:_.from,target:_.to,count:g.length,declared:g.length,byKind:[{kind:"navigates",count:g.length}],topPairs:[]}),i.set(f,{id:f,from:_.from,to:_.to,links:g,label:bm(g),synthesized:g.every(x=>x.synthesized)}))}const o=e.origins.map(f=>f.id),l=new Set;{const f=new Map;for(const _ of e.links)f.set(_.from,[...f.get(_.from)??[],_.to]);const g=[e.entry,...o].filter(_=>_!==null);for(;g.length>0;){const _=g.pop();if(!l.has(_)){l.add(_);for(const x of f.get(_)??[])g.push(x)}}}let c=0;for(const f of t.values())!f.origin&&!l.has(f.id)&&(f.unreached=!0,c++);const u=zl({modules:r,links:a},{includeTests:!0,minWeight:0,sizing:f=>{const g=t.get(f.id);return{label:g?.label??f.id,meta:g?.sub??""}},layering:t9(e.entry,o,a),layerGap:Lr,portPitch:Nl,ports:"directional"}),v=Nu(u,Lr),p=new Map;for(const[f,g]of v)p.set(f,zu(g,mm));return{layout:u,nodes:t,edges:i,unreached:c,layerGap:Lr,curves:v,polylines:p}}function Av(e,t){return{id:e.id,label:e.label,files:1,symbols:t,languages:[],test:!1,generated:0,generatedFiles:[],facade:!1,fileList:{total:1,shown:1,truncated:!1,items:[e.screen?.file??e.sub]},dependents:{files:0,modules:0}}}function r9(e,t){const r=e.links.filter(a=>a.to===t),s=e.links.filter(a=>a.from===t);return{opensFrom:r,goesTo:s}}function Lc(e){return e.via.map(t=>t.name).join(" → ")}function Nv(e){return e.from===e.to?null:Jr({source:e.from,target:e.to})}function zv(e,t,r,s,a,i=Lr,o){if(e==="level"){const c=o??Math.round(i*gm);return{x0:t,y0:r,x1:t,y1:r-c,x2:s,y2:a-c,x3:s,y3:a}}const l=o??(r+a)/2;return{x0:t,y0:r,x1:t,y1:l,x2:s,y2:l,x3:s,y3:a}}function s9(e){return`M${e.x0},${e.y0} C${e.x1},${e.y1} ${e.x2},${e.y2} ${e.x3},${e.y3}`}function Nu(e,t){const r=new Map(e.nodes.map(o=>[o.id,o])),s=(o,l)=>o.ports[l].length,a=new Map;for(const o of e.edges){const l=r.get(o.source),c=r.get(o.target);if(!l||!c)continue;const u=Cd(l,o.id,"source"),v=Cd(c,o.id,"target");let p,f,g,_=!0,x=u,k=v;if(o.route==="level")p=s(c,"top")>s(l,"top")?c:l,f="top",g=p===l?v:u;else{const z=o.route==="down",R=z?l:c,D=z?c:l;x=z?u:v,k=z?v:u,_=s(R,"bottom")>=s(D,"top"),p=_?R:D,f=_?"bottom":"top",g=_?k:x}const C=p.x+p.width/2,T=`${p.id}\0${f}\0${g.xu.reach-c.reach||c.edge.id.localeCompare(u.edge.id));const l=o.length;o.forEach((c,u)=>{const{edge:v,s:p,t:f}=c;if(v.route==="level"){const k=Math.round(t*(gm-U6*u/Math.max(1,l-1)));i.set(v.id,zv("level",p.x,p.y,f.x,f.y,t,k));return}const g=(u+1)/(l+1),_=Math.min(c.lo.y-c.up.y,t),x=c.pivotUpper?c.up.y+_*g:c.lo.y-_*g;i.set(v.id,zv(v.route,p.x,p.y,f.x,f.y,t,x))})}return i}function zu(e,t=mm){const r=[];for(let s=0;ss||(a===null||lMath.max(o,l)+1e-6)return null;const c=l>o;for(let u=0;u<40;u++){const v=(a+i)/2;yo(e,v).yl.height)return null;if(!o.some(M=>c9(M,T,$6)))return{pill:{edge:t.id,text:s,x:C,y:x,width:f,lane:g,end:r},rect:T}}return null}function Sm(e,t,r=!1){const s=new Map,a=f=>r===!0?!0:r!==!1&&r.has(f),i=r===!0||r!==!1&&r.size>0;if(t===null&&!i)return{pills:s,hidden:0};const o=new Map(e.layout.nodes.map(f=>[f.id,f])),l=xm(e.layerGap),c={width:e.layout.width,height:e.layout.height},u=e.layout.nodes.map(f=>({x:f.x,y:f.y,w:f.width,h:f.height})),v=e.layout.edges.filter(f=>a(f.id)||f.source===t||f.target===t).map(f=>{const g=t!==null&&f.target===t?"source":"target",_=o.get(g==="source"?f.source:f.target),x=_?Cd(_,f.id,g):{x:0,y:0};return{edge:f,end:g,anchor:x}}).sort((f,g)=>f.anchor.x-g.anchor.x||f.anchor.y-g.anchor.y||f.edge.id.localeCompare(g.edge.id));let p=0;for(const{edge:f,end:g}of v){const _=e.edges.get(f.id);if(!_)continue;const x=km(_,f,t);if(!x)continue;const k=Td(e,f,g,x,o,l,u,c);if(k===null){p++;continue}s.set(f.id,k.pill),u.push(k.rect)}return{pills:s,hidden:p}}function Em(e,t,r,s,a){const i=e.layout.edges.find(f=>f.id===t),o=i?e.edges.get(i.id):void 0;if(!i||!o)return null;const l=s??km(o,i,r);if(!l)return null;const c=new Map(e.layout.nodes.map(f=>[f.id,f])),u=r!==null&&i.target===r&&i.source!==r?"source":"target",v={width:e.layout.width,height:e.layout.height},p=e.layout.nodes.map(f=>({x:f.x,y:f.y,w:f.width,h:f.height}));for(const f of a?.pills.values()??[])f.edge!==t&&p.push({x:f.x-f.width/2,y:f.y-za/2,w:f.width,h:za});return Td(e,i,u,l,c,xm(e.layerGap),p,v)?.pill??Td(e,i,u,l,c,1,[],v)?.pill??null}var d9=S(" "),u9=S(" ",1);function Mm(e,t){We(t,!0);const r=b(()=>t.data),s=b(()=>s9(n(r).curve)),a=b(()=>`sedge${n(r).edge.back?" back":""}${n(r).info.synthesized?" synth":""}${n(r).hot?" hot":""}${n(r).soft?" soft":""}${n(r).focus?" focus":""}${n(r).dimmed?" dimmed":""}`);var i=u9(),o=_e(i);{let u=b(()=>`stroke-width:${Math.min(3,n(r).edge.width)}px`);Js(o,{get path(){return n(s)},get class(){return n(a)},get style(){return n(u)}})}var l=h(o,2);{var c=u=>{Gg(u,{get x(){return n(r).pill.x},get y(){return n(r).pill.y},transparent:!0,class:"spill-anchor",onmousemove:v=>n(r).onHover(n(r).edge,v),onmouseleave:()=>n(r).onHover(null,null),children:(v,p)=>{var f=d9();let g;var _=d(f);I(()=>{g=qe(f,1,"spill svelte-cf2s2p",null,g,{hot:n(r).hot,focus:n(r).focus,full:n(r).full!==null}),w(_,n(r).full??n(r).pill.text)}),m(v,f)},$$slots:{default:!0}})};F(l,u=>{n(r).pill!==null&&u(c)})}m(e,i),Ke()}const eo=(e,t=kn)=>{var r=Et(),s=_e(r);ke(s,17,t,Kn,(a,i,o)=>{var l=v9(),c=_e(l);{var u=g=>{var _=Yt();_.nodeValue=" ",m(g,_)};F(c,g=>{o>0&&g(u)})}var v=h(c);{var p=g=>{var _=f9(),x=d(_);I(()=>w(x,n(i).text)),m(g,_)},f=g=>{var _=Yt();I(()=>w(_,n(i).text)),m(g,_)};F(v,g=>{n(i).kw?g(p):g(f,-1)})}m(a,l)}),m(e,r)};var f9=S(' '),v9=S("",1),h9=S('

      The screens could not be read

      '),p9=S('

      Reading screens and transitions…

      '),g9=S('

      No screen navigation in this graph

      '),m9=S(`
      Transition — the destination is written at the call
      Destination inferred from a helper's return value
      Goes back up the picture (returning) — leaves the top of its box, arrives at the bottom of the other
      → …x The last condition checked before the transition, beside the screen at the other end of + the selected screen's line; ← when it arrives there. None = always
      /path A screen — its path and the component that renders it
      ●/ The entry screen; each row down is one more transition away
      fn() Not a screen: shared chrome, or a trigger no screen reaches — a row above what it opens
      /path Nothing reaches it from the entry (bottom band)
      `),_9=S(' '),y9=S(' '),b9=S('
      '),w9=S('
      '),x9=S('
      '),k9=S('
      ',1),S9=S(' '),E9=S('navigates from outside any screen'),M9=S(' '),C9=S('

      '),Pv=S('

      '),hi=S('
      '),Lv=S('
      '),Ov=S('
      '),qv=S(''),Dv=S('
      '),T9=S('

      No navigation leaves this screen.

      '),I9=S('

      Opens from

      Goes to

      ',1),A9=S("· triggered outside a screen",1),N9=S('

      '),z9=S(''),P9=S(`
      Screens

      screens · transitions.

      ● The entry screen is at the top; each row down is one more + transition away from it. Click a screen and each of its transitions is labelled at the far + end of its line — beside the screen it leads to or comes from — with the last condition + checked before it happens; hover the line, or its row here, for the whole chain and the + calls it travels through.

      Solid: the destination is written at the call. Dashed grey: it comes back from a + helper's return value (inferred). Dashed accent: a transition back up the picture + (returning), drawn around the boxes rather than through them. Dashed box: a trigger that + is not a screen — shared chrome, or code no screen's render chain reaches.

      Most connected

      `,1),L9=S(''),O9=S('
      ');function q9(e,t){We(t,!0);let r=he(null),s=he(null),a=he(!0),i=he(null),o=he(null),l=he(null),c=he(null),u=he(void 0);const v=10,p="codegraph-ui:screens-legend";let f=he(gn(g()));function g(){try{return localStorage.getItem(p)!=="closed"}catch{return!0}}vt(()=>{try{localStorage.setItem(p,n(f)?"open":"closed")}catch{}});const _={fitViewOptions:{padding:.1,maxZoom:1,minZoom:.4}},x=400;let k=null;const C={screen:X6},T={screen:Mm};vt(()=>{An.indexTick;const K=new AbortController;return q(a,!0),q(s,null),yp(K.signal).then(Z=>{q(r,Z,!0),q(a,!1)}).catch(Z=>{K.signal.aborted||(q(s,Z instanceof Error?Z.message:String(Z),!0),q(a,!1))}),()=>K.abort()});const M=b(()=>n(r)===null||!n(r).routed?null:n9(n(r))),z=b(()=>{if(n(M)===null||n(i)===null)return null;const K=new Set([n(i)]);for(const Z of n(M).layout.edges)Z.source===n(i)&&K.add(Z.target),Z.target===n(i)&&K.add(Z.source);return K}),R=b(()=>n(M)===null?null:Sm(n(M),n(i))),D=b(()=>n(o)?.edge.id??n(l)?.edge??null),V=b(()=>{if(n(M)===null||n(D)===null||n(R)?.pills.has(n(D)))return null;const K=n(l)?.edge===n(D)?W(n(l).link):void 0;return Em(n(M),n(D),n(i),K,n(R)??void 0)}),X=b(()=>n(M)===null?[]:n(M).layout.nodes.map(K=>({id:K.id,type:"screen",position:{x:K.x,y:K.y},draggable:!1,selectable:!1,connectable:!1,data:{layout:K,info:n(M).nodes.get(K.id),selected:n(i)===K.id,dimmed:n(z)!==null&&!n(z).has(K.id),onSelect:Z=>{const ce=performance.now();if(k!==null&&k.id===Z&&ce-k.atjt(Sr({anchor:Z}))}}))),j=b(()=>{if(n(M)===null)return[];const K=n(D);return n(M).layout.edges.filter(Z=>Eu(Z,n(i))).map(Z=>{const ce=n(i)!==null&&(Z.source===n(i)||Z.target===n(i)),te=K===Z.id,ie=te||ce;return{id:Z.id,source:Z.source,target:Z.target,sourceHandle:Z.sourceHandle,targetHandle:Z.targetHandle,type:"screen",selectable:!1,deletable:!1,zIndex:te?3:ie?2:1,data:{edge:Z,info:n(M).edges.get(Z.id),curve:n(M).curves.get(Z.id),hot:ie,soft:ie&&K!==null&&!te,focus:te,dimmed:n(i)!==null&&!ce,pill:n(R)?.pills.get(Z.id)??(te?n(V):null),full:n(l)?.edge===Z.id?W(n(l).link):null,onHover:y}}})}),P=b(()=>n(i)===null||n(M)===null?null:n(M).nodes.get(n(i))??null),A=b(()=>n(i)===null||n(r)===null?null:r9(n(r),n(i))),H=b(()=>n(o)===null||n(M)===null?null:n(M).edges.get(n(o).edge.id)??null),L=b(()=>n(M)===null?new Map:new Map(n(M).layout.edges.map(K=>[K.id,K]))),E=b(()=>new Set(n(j).map(K=>K.id)));function y(K,Z){if(K===null||Z===null||n(c)===null){q(o,null);return}const ce=n(c).getBoundingClientRect();q(o,{edge:K,x:Math.min(Z.clientX-ce.left+14,ce.width-360),y:Z.clientY-ce.top+14},!0)}function O(K){if(n(M)===null||n(c)===null)return;const Z=K.target;if(Z?.closest(".spill"))return;if(Z?.closest(".snode, .legend, .tip, .svelte-flow__controls")){q(o,null);return}const ce=n(u)??N();if(!ce)return;const te=n(c).getBoundingClientRect(),ie={x:(K.clientX-te.left-ce.x)/ce.zoom,y:(K.clientY-te.top-ce.y)/ce.zoom},ve=wm(n(M),ie,n(E),v/ce.zoom),fe=ve===null?void 0:n(L).get(ve.id);if(!fe){q(o,null);return}q(o,{edge:fe,x:Math.min(K.clientX-te.left+14,te.width-360),y:K.clientY-te.top+14},!0)}function N(){const Z=n(c)?.querySelector(".svelte-flow__viewport")?.style.transform.match(/translate\(([-\d.]+)px,\s*([-\d.]+)px\)\s*scale\(([-\d.]+)\)/);return Z?{x:Number(Z[1]),y:Number(Z[2]),zoom:Number(Z[3])}:null}function B(K){const Z=K===null?null:Nv(K);q(l,K===null||Z===null?null:{edge:Z,link:K},!0)}function W(K){return`${n(i)!==null&&K.to===n(i)&&K.from!==n(i)?"←":"→"} ${ql(K.when)||"always"}`}function Y(K){return n(l)!==null?n(l).link.id===K.id:n(o)!==null&&Nv(K)===n(o).edge.id}function J(K){return n(M)?.nodes.get(K)?.label??K}function G(K,Z){return J(Z==="from"?K.from:K.to)}var ee=O9(),oe=d(ee),ge=d(oe);{var U=K=>{var Z=h9(),ce=d(Z),te=d(ce);Ne(te,{name:"monitor-smartphone",size:20});var ie=h(ce,4),ve=d(ie);I(()=>w(ve,n(s))),m(K,Z)},$=K=>{var Z=p9();m(K,Z)},ae=K=>{var Z=g9(),ce=d(Z),te=d(ce);Ne(te,{name:"monitor-smartphone",size:20});var ie=h(ce,4),ve=d(ie);I(()=>w(ve,`This view draws the routes a UI framework binds to components and the navigation calls + that reach them. The index has ${n(r).screens.length===0?"no routes":"routes"} but no + navigation between them — it is not an app with screens, or its router is one CodeGraph + does not read yet.`)),m(K,Z)},ne=K=>{var Z=k9(),ce=_e(Z);Il(ce,Xr({get nodes(){return n(X)},get edges(){return n(j)},get nodeTypes(){return C},get edgeTypes(){return T},fitView:!0},()=>_,{minZoom:.2,maxZoom:3,nodesDraggable:!1,nodesConnectable:!1,elementsSelectable:!1,panOnDrag:!0,proOptions:{hideAttribution:!0},onpaneclick:()=>{q(i,null),q(o,null),q(l,null)},get viewport(){return n(u)},set viewport(Ee){q(u,Ee,!0)},children:(Ee,Ge)=>{Al(Ee,{position:"bottom-right",showLock:!1})},$$slots:{default:!0}}));var te=h(ce,2);let ie;var ve=d(te),fe=h(d(ve)),pe=d(fe),ye=h(ve,2);{var Pe=Ee=>{var Ge=m9();m(Ee,Ge)};F(ye,Ee=>{n(f)&&Ee(Pe)})}var de=h(te,2);{var be=Ee=>{var Ge=x9(),me=d(Ge),ze=d(me),De=d(ze),Le=h(ze),Ze=h(me,2);ke(Ze,17,()=>n(H).links.slice(0,5),le=>le.id,(le,we)=>{var Ce=b9(),$e=d(Ce);{var Oe=ct=>{var pt=_9(),Se=d(pt);I(()=>w(Se,`${n(we).sites.length??""} ways`)),m(ct,pt)};F($e,ct=>{n(we).sites.length>1&&ct(Oe)})}var at=h($e,2),wt=d(at);{let ct=b(()=>Au(n(we).when));eo(wt,()=>n(ct))}var Mt=h(at,2);{var Tt=ct=>{var pt=y9(),Se=d(pt);I(Ae=>w(Se,`via ${Ae??""}`),[()=>Lc(n(we))]),m(ct,pt)};F(Mt,ct=>{n(we).via.length>0&&ct(Tt)})}m(le,Ce)});var Re=h(Ze,2);{var ue=le=>{var we=w9(),Ce=d(we);I(()=>w(Ce,`+${n(H).links.length-5} more`)),m(le,we)};F(Re,le=>{n(H).links.length>5&&le(ue)})}I((le,we)=>{rt(Ge,`left:${n(o).x}px;top:${n(o).y}px`),w(De,le),w(Le,` → ${we??""}`)},[()=>J(n(H).from),()=>J(n(H).to)]),m(Ee,Ge)};F(de,Ee=>{n(o)!==null&&n(H)!==null&&Ee(be)})}I(()=>{ie=qe(te,1,"legend svelte-1qt8k18",null,ie,{open:n(f)}),se(ve,"aria-expanded",n(f)),w(pe,n(f)?"▾":"▸")}),xe("click",ve,()=>q(f,!n(f))),m(K,Z)};F(ge,K=>{n(s)!==null?K(U):n(a)&&n(r)===null?K($,1):n(r)!==null&&!n(r).routed?K(ae,2):n(M)!==null&&K(ne,3)})}Ut(oe,K=>q(c,K),()=>n(c));var re=h(oe,2);{var Q=K=>{var Z=L9(),ce=d(Z);{var te=ve=>{var fe=I9(),pe=_e(fe),ye=d(pe),Pe=d(ye),de=d(Pe),be=h(Pe,2);{var Ee=Se=>{var Ae=S9(),je=d(Ae);Lt(je,{get kind(){return n(P).screen.component.kind}});var Fe=h(je);I(Me=>{se(Ae,"href",Me),w(Fe,` ${n(P).screen.component.name??""}`)},[()=>pn(n(P).screen.component.id)]),m(Se,Ae)},Ge=Se=>{var Ae=E9();m(Se,Ae)};F(be,Se=>{n(P).screen?.component?Se(Ee):n(P).origin&&Se(Ge,1)})}var me=h(be,2);{var ze=Se=>{var Ae=M9(),je=d(Ae);I(Fe=>{se(Ae,"href",Fe),w(je,n(P).screen.file)},[()=>rn(n(P).screen.file)]),m(Se,Ae)};F(me,Se=>{n(P).screen&&Se(ze)})}var De=h(me,2),Le=h(ye,2),Ze=h(pe,2);{var Re=Se=>{var Ae=C9(),je=d(Ae);I(()=>w(je,`${n(R).hidden??""} condition${n(R).hidden===1?"":"s"} not drawn on the picture for want of + room — hover a row below to see ${n(R).hidden===1?"it":"each"} on its line.`)),m(Se,Ae)};F(Ze,Se=>{n(R)!==null&&n(R).hidden>0&&Se(Re)})}var ue=h(Ze,2),le=h(d(ue)),we=d(le),Ce=h(ue,2);{var $e=Se=>{var Ae=Pv(),je=d(Ae);I(()=>w(je,n(P).entry?"The entry screen — the app starts here.":"Nothing in the graph navigates here.")),m(Se,Ae)};F(Ce,Se=>{n(A).opensFrom.length===0&&Se($e)})}var Oe=h(Ce,2);ke(Oe,17,()=>n(A).opensFrom,Se=>Se.id,(Se,Ae)=>{const je=b(()=>ll(n(Ae).sites));var Fe=Dv();let Me;var Ue=d(Fe),Ye=d(Ue),He=h(Ue,2);{var Xe=et=>{var Ve=hi(),gt=d(Ve);{let _t=b(()=>il(n(je).common));eo(gt,()=>n(_t))}m(et,Ve)};F(He,et=>{n(je).common.length>0&&et(Xe)})}var Qe=h(He,2);{var ut=et=>{var Ve=Lv(),gt=d(Ve);I(_t=>w(gt,`via ${_t??""}`),[()=>Lc(n(Ae))]),m(et,Ve)};F(Qe,et=>{n(Ae).via.length>0&&et(ut)})}var ot=h(Qe,2);{var it=et=>{var Ve=Ov(),gt=d(Ve);I(()=>w(gt,`${n(je).rows.length??""} ways`)),m(et,Ve)};F(ot,et=>{n(je).rows.length>1&&et(it)})}var xt=h(ot,2);ke(xt,17,()=>n(je).rows,et=>et.site.file+et.site.line,(et,Ve)=>{var gt=qv();let _t;var At=d(gt);{var tt=Ft=>{var Qt=hi(),sn=d(Qt);{let ln=b(()=>cl(n(Ve).rest,n(je).common.length>0));eo(sn,()=>n(ln))}m(Ft,Qt)};F(At,Ft=>{n(je).rows.length>1&&Ft(tt)})}var Ct=h(At,2),Ht=d(Ct);I((Ft,Qt)=>{_t=qe(gt,1,"scenario svelte-1qt8k18",null,_t,{many:n(je).rows.length>1}),se(Ct,"href",Ft),w(Ht,`${n(Ve).site.method??""} ${n(Ve).site.href??""} · ${Qt??""}:${n(Ve).site.line??""}`)},[()=>pn(n(Ae).via[n(Ae).via.length-1]?.id??n(P).id,{line:n(Ve).site.line}),()=>n(Ve).site.file.slice(n(Ve).site.file.lastIndexOf("/")+1)]),m(et,gt)}),I((et,Ve)=>{Me=qe(Fe,1,"row svelte-1qt8k18",null,Me,et),w(Ye,Ve)},[()=>({hot:Y(n(Ae))}),()=>G(n(Ae),"from")]),ft("mouseenter",Fe,()=>B(n(Ae))),ft("mouseleave",Fe,()=>B(null)),xe("focusin",Fe,()=>B(n(Ae))),xe("focusout",Fe,()=>B(null)),xe("click",Ue,()=>q(i,n(Ae).from,!0)),m(Se,Fe)});var at=h(Oe,2),wt=h(d(at)),Mt=d(wt),Tt=h(at,2);{var ct=Se=>{var Ae=T9();m(Se,Ae)};F(Tt,Se=>{n(A).goesTo.length===0&&Se(ct)})}var pt=h(Tt,2);ke(pt,17,()=>n(A).goesTo,Se=>Se.id,(Se,Ae)=>{const je=b(()=>ll(n(Ae).sites));var Fe=Dv();let Me;var Ue=d(Fe),Ye=d(Ue),He=h(Ue,2);{var Xe=et=>{var Ve=hi(),gt=d(Ve);{let _t=b(()=>il(n(je).common));eo(gt,()=>n(_t))}m(et,Ve)};F(He,et=>{n(je).common.length>0&&et(Xe)})}var Qe=h(He,2);{var ut=et=>{var Ve=Lv(),gt=d(Ve);I(_t=>w(gt,`via ${_t??""}`),[()=>Lc(n(Ae))]),m(et,Ve)};F(Qe,et=>{n(Ae).via.length>0&&et(ut)})}var ot=h(Qe,2);{var it=et=>{var Ve=Ov(),gt=d(Ve);I(()=>w(gt,`${n(je).rows.length??""} ways`)),m(et,Ve)};F(ot,et=>{n(je).rows.length>1&&et(it)})}var xt=h(ot,2);ke(xt,17,()=>n(je).rows,et=>et.site.file+et.site.line,(et,Ve)=>{var gt=qv();let _t;var At=d(gt);{var tt=Ft=>{var Qt=hi(),sn=d(Qt);{let ln=b(()=>cl(n(Ve).rest,n(je).common.length>0));eo(sn,()=>n(ln))}m(Ft,Qt)};F(At,Ft=>{n(je).rows.length>1&&Ft(tt)})}var Ct=h(At,2),Ht=d(Ct);I((Ft,Qt)=>{_t=qe(gt,1,"scenario svelte-1qt8k18",null,_t,{many:n(je).rows.length>1}),se(Ct,"href",Ft),w(Ht,`${n(Ve).site.method??""} ${n(Ve).site.href??""} · ${Qt??""}:${n(Ve).site.line??""}`)},[()=>pn(n(Ae).via[n(Ae).via.length-1]?.id??n(P).screen?.component?.id??n(P).id,{line:n(Ve).site.line}),()=>n(Ve).site.file.slice(n(Ve).site.file.lastIndexOf("/")+1)]),m(et,gt)}),I((et,Ve)=>{Me=qe(Fe,1,"row svelte-1qt8k18",null,Me,et),w(Ye,Ve)},[()=>({hot:Y(n(Ae))}),()=>G(n(Ae),"to")]),ft("mouseenter",Fe,()=>B(n(Ae))),ft("mouseleave",Fe,()=>B(null)),xe("focusin",Fe,()=>B(n(Ae))),xe("focusout",Fe,()=>B(null)),xe("click",Ue,()=>q(i,n(Ae).to,!0)),m(Se,Fe)}),I(Se=>{w(de,n(P).label),se(De,"href",Se),w(we,n(A).opensFrom.length),w(Mt,n(A).goesTo.length)},[()=>Sr({anchor:n(P).id})]),xe("click",Le,()=>q(i,null)),m(ve,fe)},ie=ve=>{var fe=P9(),pe=h(_e(fe),2),ye=d(pe),Pe=d(ye),de=h(ye,2),be=d(de),Ee=h(de,2);{var Ge=Re=>{var ue=A9(),le=h(_e(ue)),we=d(le);I(()=>w(we,n(r).origins.length)),m(Re,ue)};F(Ee,Re=>{n(r).origins.length>0&&Re(Ge)})}var me=h(pe,6);{var ze=Re=>{var ue=N9(),le=d(ue),we=d(le),Ce=h(le);I(()=>{w(we,n(M).unreached),w(Ce,` screen${n(M).unreached===1?"":"s"} in the band at the bottom: no + transition in the graph reaches ${n(M).unreached===1?"it":"them"} from the entry — opened + by something the graph cannot see (a layout's initial route, a deep link), or unused.`)}),m(Re,ue)};F(me,Re=>{n(M).unreached>0&&Re(ze)})}var De=h(me,2);{var Le=Re=>{var ue=Pv(),le=d(ue);I(()=>w(le,`${n(r).dropped??""} navigation${n(r).dropped===1?"":"s"} could not be attributed: the walk back to a screen hit a hub.`)),m(Re,ue)};F(De,Re=>{n(r).dropped>0&&Re(Le)})}var Ze=h(De,4);ke(Ze,17,()=>[...n(r).screens].sort((Re,ue)=>ue.incoming+ue.outgoing-(Re.incoming+Re.outgoing)).slice(0,8),Re=>Re.id,(Re,ue)=>{var le=z9(),we=d(le),Ce=h(we),$e=d(Ce);I(()=>{w(we,`${n(ue).path??""} `),w($e,`←${n(ue).incoming??""} →${n(ue).outgoing??""}`)}),xe("click",le,()=>q(i,n(ue).id,!0)),m(Re,le)}),I(()=>{w(Pe,n(r).screens.length),w(be,n(r).links.length)}),m(ve,fe)};F(ce,ve=>{n(P)!==null&&n(A)!==null?ve(te):ve(ie,-1)})}m(K,Z)};F(re,K=>{n(r)!==null&&n(M)!==null&&K(Q)})}xe("mousemove",oe,O),ft("mouseleave",oe,()=>q(o,null)),m(e,ee),Ke()}St(["mousemove","click","focusin","focusout"]);const D9=24;function Ir(e,t="app",r){return Ni(e,t,r)[0]}function Ni(e,t="app",r){switch(e){case"screen":return r?.screen?.endpoint?["endpoint","endpoints"]:t==="api"?["endpoint","endpoints"]:t==="web"?["page","pages"]:["screen","screens"];case"trigger":return["handler","handlers"];case"bridge":return r?.screen?.endpoint?["call to the server","calls to the server"]:t==="app"?["native call","native calls"]:t==="web"?["call to the server","calls to the server"]:["call to another tier","calls to another tier"];case"event":return t==="app"?["native event","native events"]:t==="web"?["arrives from the server","arrive from the server"]:["arrives from a queue or bus","arrive from a queue or bus"];case"store":return t==="api"?["data call","data calls"]:["store action","store actions"];case"effect":return["outside the index","outside the index"];default:return["start","start"]}}function Zn(e){const t=e.after&&e.after.length>0?` · after ${e.after.join(", ")}`:"";switch(e.kind){case"prop":return e.of?`${e.name} · <${e.of}>`:e.name;case"option":return e.of?`${e.name} · ${e.of}(…)`:e.name;case"request":return`${e.name} ${e.of??""}`.trim()+t;case"decorator":return`@${e.name}(${e.of??""})`+t;case"load":return`page load · ${e.of??e.name}`+t;default:return e.of?`${e.name}(${e.of})`:e.name}}function Cm(e){switch(e.kind){case"bridge":return`⇢ ${e.label}`;case"event":{const t=e.events??(e.event?[e.event]:[]);return t.length===0?`⇠ ${e.label}`:t.length===1?`⇠ ${t[0]}`:`⇠ ${t[0]} +${t.length-1}`}default:return e.label}}function Tm(e,t="app"){const r=e.node?e.node.file.slice(e.node.file.lastIndexOf("/")+1):"";switch(e.kind){case"screen":return e.sub;case"trigger":return e.trigger?`${Zn(e.trigger)} · ${r}`:`handler · ${r}`;case"bridge":return e.screen?e.sub:`${t==="app"?"native":t==="web"?"server":"another tier"} · ${r}`;case"event":return`${e.label} · ${r}`;case"store":return`${t==="api"?"data":"store"} · ${r}`;case"effect":return e.sub;default:return e.node&&e.sub===e.node.file?r:e.sub}}const Rv=24,R9=15,H9=6.3,j9=320;function Im(e){if(e.form==="if"||e.form==="ternary")return e.not?"no":"yes";if(e.not)return"else";let t=e.arm;return e.on&&t.startsWith(e.on)&&(t=t.slice(e.on.length).trim().replace(/^===?\s*/,"")),t?t.length>Rv?`${t.slice(0,Rv-1)}…`:t:"yes"}function F9(e){let t=null;for(const r of e.links)for(const s of r.sites){if(!s.decision)return null;if(t===null)t=s.decision;else if(t.branch!==s.decision.branch||t.arm!==s.decision.arm)return null}return t}function B9(e,t){const r=new Map;for(const o of e.values()){const l=F9(o);if(l===null)continue;const c=`${o.from}\0${l.branch}`,u=r.get(c)??[];u.push({info:o,decision:l}),r.set(c,u)}const s=new Map(t.nodes.map(o=>[o.id,o])),a=[],i=new Map;for(const[o,l]of r){if(new Set(l.map(g=>g.decision.arm)).size<2)continue;const c=s.get(l[0].info.from);if(!c)continue;for(const{info:g,decision:_}of l)g.arm=Im(_),g.label=g.arm;const u=i.get(c.id)??0;i.set(c.id,u+1);const v=l[0].decision.on,p=`${ql(v)||v}?`,f=Math.max(c.width,Math.min(p.length*H9+8,j9));a.push({id:o,label:p,x:c.x+(c.width-f)/2,y:c.y+c.height+4+u*R9,width:f})}return a}function V9(e){const t=new Map,r=[],s={anchor:0,screen:0,trigger:0,bridge:0,event:0,store:0,effect:0},a=new Map;for(const C of e.links)a.set(C.from,(a.get(C.from)??0)+1),a.set(C.to,(a.get(C.to)??0)+1);for(const C of e.steps){s[C.kind]++;const T={id:C.id,step:C,label:Cm(C),sub:Tm(C,e.project)};t.set(C.id,T),r.push({id:C.id,label:T.label,files:1,symbols:a.get(C.id)??0,languages:[],test:!1,generated:0,generatedFiles:[],facade:!1,fileList:{total:1,shown:1,truncated:!1,items:[C.node?.file??C.sub]},dependents:{files:0,modules:0}})}const i=new Map;for(const C of e.links){if(!t.has(C.from)||!t.has(C.to)||C.from===C.to)continue;const T=Jr({source:C.from,target:C.to}),M=i.get(T)??[];M.push(C),i.set(T,M)}const o=[],l=new Map;for(const[C,T]of i){const M=T[0];o.push({source:M.from,target:M.to,count:T.length,declared:T.length,byKind:[{kind:"calls",count:T.length}],topPairs:[]});const z=T.length===1&&M.kind==="handler"&&M.trigger?M.trigger:null;l.set(C,{id:C,from:M.from,to:M.to,links:T,label:z?Zn(z):bm(T),synthesized:T.every(R=>R.synthesized),kind:T.every(R=>R.kind===M.kind)?M.kind:"calls"})}const c=e.steps.some(C=>C.region!==void 0);let u,v=null;if(c){const C=Q9(e.steps,t,r,o);u=C.layout,v=C.zones}else{const C=new Map(e.steps.map(z=>[z.id,z.depth])),T=Math.max(0,...e.steps.map(z=>z.depth));u=zl({modules:r,links:o},{includeTests:!0,minWeight:0,sizing:z=>{const R=t.get(z.id),D=R?.step.cut!=null?" …":"";return{label:(R?.step.anchor?"● ":"")+(R?.label??z.id)+D,meta:R?.sub??""}},layering:z=>new Map(z.map(R=>[R,T-(C.get(R)??T)])),order:z=>t.get(z)?.step.order??Number.MAX_SAFE_INTEGER,layerGap:Lr,portPitch:Nl,ports:"directional"})}const p=c?Am:Lr,f=Nu(u,p),g=new Map;for(const[C,T]of f)g.set(C,zu(T,D9));const _=v===null?null:new Set(v.map(C=>C.entry)),{stubs:x,stubbed:k}=K9(u,t,p,_);return{layout:u,nodes:t,edges:l,layerGap:p,curves:f,polylines:g,counts:s,regions:v,regionEntries:_,forks:null,stubs:x,stubbed:k,decisions:B9(l,u)}}const W9=3;function Hv(e){return e.startsWith("⇢ ")||e.startsWith("⇠ ")?e.slice(2):e}function K9(e,t,r,s){const a=new Map,i=new Set,o=new Map(e.nodes.map(v=>[v.id,v])),l=ur+r,c=(v,p)=>{a.set(v,[...a.get(v)??[],p])};for(const v of e.edges){const p=o.get(v.source),f=o.get(v.target);if(!p||!f||s!==null&&t.get(v.source)?.step.anchor&&!s.has(v.target))continue;const g=Math.abs(f.y-p.y)/l,_=Math.abs(f.x+f.width/2-(p.x+p.width/2));!v.back&&!v.thin&&g<=W9+.01&&_<=Nm||(i.add(v.id),c(v.source,{edge:v.id,other:v.target,label:Hv(t.get(v.target)?.label??v.target),dir:"out"}),c(v.target,{edge:v.id,other:v.source,label:Hv(t.get(v.source)?.label??v.source),dir:"in"}))}const u=v=>{const p=o.get(v);return p?p.y*1e5+p.x:0};for(const v of a.values())v.sort((p,f)=>p.dir===f.dir?u(p.other)-u(f.other):p.dir==="out"?-1:1);return{stubs:a,stubbed:i}}const Am=72,pi=ur+Am,Nm=720,Y9=[Nm,1e3,1300,1600,1900,2200,2600,3e3],X9=1.4;function jv(e){return Math.abs(Math.log(Math.max(1,e.width)/Math.max(1,e.height)/X9))}const Fv=26,G9=6,Z9=72,Bv=84;function U9(e,t){return Math.max(t,Math.min(3400,Math.max(1440,Math.ceil(Math.sqrt(e*2.4)))))}function Vv(e){const t=new Map,r=new Set;for(const o of e){r.add(o.source),r.add(o.target);const l=t.get(o.source);l?l.push(o):t.set(o.source,[o])}const s=new Map,a=new Set,i=o=>{const l=[{id:o,next:0}];for(s.set(o,1);l.length>0;){const c=l[l.length-1],u=t.get(c.id)??[];if(c.next>=u.length){s.set(c.id,2),l.pop();continue}const v=u[c.next++],p=s.get(v.target)??0;if(p===1){a.add(v);continue}p!==2&&(s.set(v.target,1),l.push({id:v.target,next:0}))}};for(const o of r)s.has(o)||i(o);return e.filter(o=>!a.has(o))}function Q9(e,t,r,s){const a=e.find(y=>y.anchor),i=e.filter(y=>!y.anchor),o=new Map(r.map(y=>[y.id,y])),l=new Map;for(const y of s)l.set(y.source,(l.get(y.source)??0)+1),l.set(y.target,(l.get(y.target)??0)+1);const c=y=>{const O=t.get(y),N=O?.step.cut!=null?" …":"",B=O?.step.anchor?"● ":"";return Math.max(rm(B+(O?.label??y)+N,O?.sub??""),((l.get(y)??0)+1)*Nl)},u=new Map;for(const y of i){const O=y.region?.id??a.id,N=u.get(O)??{id:O,label:y.region?.label??a.label,members:[]};N.members.push(y),u.set(O,N)}const v=new Map(i.map(y=>[y.id,y.region?.id??a.id])),p=s.filter(y=>y.source!==a.id&&y.target!==a.id&&y.source!==y.target&&v.get(y.source)===v.get(y.target)),f=new Set(s.filter(y=>y.source===a.id).map(y=>y.target)),g=new Map;for(const y of Vv(p)){const O=g.get(y.target)??[];O.push(y.source),g.set(y.target,O)}const _=new Map;{const y=new Map(i.map(W=>[W.id,W.order??Number.MAX_SAFE_INTEGER])),O=new Map;for(const W of Vv(p))O.set(W.source,[...O.get(W.source)??[],W.target]);const N=new Set,B=i.filter(W=>(g.get(W.id)??[]).length===0).map(W=>W.id);for(const W of B)N.add(W);for(;B.length>0;){const W=B.shift(),Y=[...new Set(O.get(W)??[])].sort((J,G)=>(y.get(J)??0)-(y.get(G)??0)||J.localeCompare(G));for(const J of Y)N.has(J)||(N.add(J),_.set(W,[..._.get(W)??[],J]),B.push(J))}}const x=Tn,k=y=>{const O=new Map;for(const ae of u.values()){const ne=new Set(ae.members.map(fe=>fe.id)),re=fe=>(_.get(fe)??[]).filter(pe=>ne.has(pe)),Q=ae.members.filter(fe=>(g.get(fe.id)??[]).length===0).map(fe=>fe.id),K=fe=>{const pe=ze=>{const De=new Map;let Le=0,Ze=0;const Re=(le,we)=>{if(le.length===0)return;let Ce=we;for(const $e of le){const Oe=c($e);Ce>we&&Ce+Oe-we>fe&&(Le+=1,Ce=we),De.set($e,{x:Ce,line:Le}),Ze=Math.max(Ze,Ce+Oe),Ce+=Oe+Md}Le+=1},ue=(le,we)=>{const Ce=Math.min(we,G9)*Fv;De.set(le,{x:Ce,line:Le}),Ze=Math.max(Ze,Ce+c(le)),Le+=1;const $e=re(le);Re($e.filter(Oe=>re(Oe).length===0),Ce+Fv);for(const Oe of $e.filter(at=>re(at).length>0))ue(Oe,we+1)};return ue(ze,0),{pos:De,lines:Le,width:Ze}},ye=ze=>{const De=new Map;let Le=0,Ze=0,Re=0;for(const ue of ze){const le=c(ue);Re>0&&Re+le>fe&&(Le+=1,Re=0),De.set(ue,{x:Re,line:Le}),Ze=Math.max(Ze,Re+le),Re+=le+Md}return{pos:De,lines:ze.length===0?0:Le+1,width:Ze}},Pe=[],de=Q.filter(ze=>re(ze).length===0);de.length>0&&Pe.push(ye(de));const be=new Set(de);for(const ze of Q){if(be.has(ze))continue;const De=pe(ze);for(const Le of De.pos.keys())be.add(Le);Pe.push(De)}for(const ze of ae.members){if(be.has(ze.id))continue;const De=pe(ze.id);for(const Le of De.pos.keys())be.add(Le);Pe.push(De)}const Ee=new Map;let Ge=0,me=0;for(const ze of Pe){for(const[De,Le]of ze.pos)Ee.set(De,{x:Le.x,line:me+Le.line});Ge=Math.max(Ge,ze.width),me+=ze.lines}return{pos:Ee,lines:me,width:Ge}},{pos:Z,lines:ce,width:te}=K(y),ie=fe=>fe.filter(pe=>Z.has(pe)).sort((pe,ye)=>Z.get(pe).line-Z.get(ye).line||Z.get(pe).x-Z.get(ye).x)[0]??null,ve=ie(ae.members.filter(fe=>f.has(fe.id)).map(fe=>fe.id))??ie(ae.members.map(fe=>fe.id))??ae.members[0].id;O.set(ae.id,{pos:Z,lines:ce,width:te,entry:ve})}let N=0,B=0;for(const ae of u.values()){const ne=O.get(ae.id);N+=ne.width*ne.lines*pi,B=Math.max(B,ne.width)}const W=U9(N,B),Y=new Map,J=[],G=x+ur+Lr+Bv,ee=[],oe=(ae,ne)=>{let re=G;for(const Q of ee)Q.x1>ae+1&&Q.x0te.x1+Z9)].filter((te,ie,ve)=>ve.indexOf(te)===ie&&te+ne.width<=Tn+Math.max(W,ne.width)).sort((te,ie)=>te-ie);let K={x:Tn,y:oe(Tn,Tn+ne.width)};for(const te of Q){const ie=oe(te,te+ne.width);ieae.x+ae.width-Tn));for(const ae of Y.values())ae.line=Math.round((ae.y-G)/pi);const U=Math.max(0,...[...Y.values()].map(ae=>ae.line))+1,$=Math.max(x+ur,...J.map(ae=>ae.y+ae.height))+Tn;return{at:Y,zones:J,contentWidth:ge,globalLine:U,height:$,width:ge+Tn*2}},C=Y9.map(y=>k(y)),{at:T,zones:M,contentWidth:z,globalLine:R,height:D}=C.reduce((y,O)=>jv(y)<=jv(O)?y:O),V=y=>y===a.id?R+1:R-(T.get(y)?.line??0),X=new Map,j=(y,O,N)=>{X.set(y,{id:y,module:o.get(y),island:!1,generated:!1,weight:0,layer:V(y),x:O,y:N,width:c(y),height:ur,sourceHandles:[],targetHandles:[],ports:{top:[],bottom:[]}})};j(a.id,Tn+(z-c(a.id))/2,x);for(const[y,O]of T)j(y,O.x,O.y);const P=[],A=new Map,H=y=>{const O=X.get(y);return O?O.x+O.width/2:0};for(const y of s){const O=X.get(y.source),N=X.get(y.target);if(!O||!N)continue;const B=Jr(y),W=O.layer>N.layer?"down":O.layer{const ee=A.get(G)??{top:[],bottom:[]};return A.set(G,ee),ee};J(y.source)[Y.source].push({id:B,type:"source",other:H(y.target)}),J(y.target)[Y.target].push({id:B,type:"target",other:H(y.source)})}const L=(y,O)=>y.other-O.other||y.id.localeCompare(O.id);for(const[y,O]of A){const N=X.get(y);N&&(O.top.sort(L),O.bottom.sort(L),N.ports={top:O.top.map(B=>({id:B.id,type:B.type})),bottom:O.bottom.map(B=>({id:B.id,type:B.type}))},N.sourceHandles=O.bottom.filter(B=>B.type==="source").map(B=>B.id),N.targetHandles=O.top.filter(B=>B.type==="target").map(B=>B.id))}return{layout:{nodes:[...X.values()],edges:P,layers:[],width:z+Tn*2,height:D,basis:{kind:"all",declaredLinks:s.length,totalLinks:s.length},minWeight:0,hiddenLinks:0,mutual:[],moduleCycles:[]},zones:M}}function zm(e,t){const r=new Set([t]);if(e.forks===null||e.forks.size===0)return r;for(let s=!0;s;){s=!1;for(const a of e.layout.edges){const i=r.has(a.source),o=r.has(a.target);if(i===o)continue;const l=i?a.target:a.source;e.forks.has(l)&&!r.has(l)&&(r.add(l),s=!0)}}return r}function J9(e,t,r,s){if(r!==null){const i=s??zm(e,r);return i.has(t.source)||i.has(t.target)}return t.thin||t.back||e.stubbed.has(t.id)?!1:e.regions===null?!0:e.nodes.get(t.source)?.step?.anchor?e.regionEntries?.has(t.target)??!0:!0}function $9(e,t){return{arrivesFrom:e.links.filter(r=>r.to===t),leadsTo:e.links.filter(r=>r.from===t)}}function Oc(e){return e.via.map(t=>t.name).join(" → ")}function Wv(e){return e.from===e.to?null:Jr({source:e.from,target:e.to})}var eC=S(''),tC=S(''),nC=S('');function rC(e,t){We(t,!0);let r=Ie(t,"size",3,null),s=Ie(t,"note",3,"");const a=b(()=>t.info.step),i=b(()=>{switch(n(a).cut){case"depth":return" More happens past the depth of this picture — start here to see it.";case"fan-out":return" It reaches more than the walk follows from one node.";case"folded":return" The walk folded as much plumbing as it allows from one step.";case"steps":return" The picture reached its size limit here.";case"screen":return` Another ${Ir("screen",t.project,n(a))} — a chapter of its own. Start here to see what happens on it.`;case"component":return" The event lands in a component of another screen — a picture of its own. Start here to see it.";default:return""}});var o=nC();let l;var c=d(o),u=d(c);{var v=k=>{var C=eC();m(k,C)};F(u,k=>{n(a).anchor&&k(v)})}var p=h(u,1,!0),f=h(p);{var g=k=>{var C=tC();m(k,C)};F(f,k=>{n(a).cut!==null&&k(g)})}var _=h(c,2),x=d(_);I(k=>{l=qe(o,1,`snode k-${n(a).kind}`,"svelte-1gxwpy3",l,{sel:t.selected,dimmed:t.dimmed,anchor:n(a).anchor,rail:r()===null}),rt(o,r()===null?void 0:`width:${r().width}px;height:${r().height}px`),se(o,"aria-pressed",t.selected),se(o,"title",k),w(p,t.info.label),w(x,t.info.sub)},[()=>`${t.info.label} — ${n(a).anchor?"where this picture starts; ":""}${Ir(n(a).kind,t.project,n(a))}. ${t.info.sub}.${s()?` ${s()}`:""}${n(i)}${t.onStart&&!n(a).anchor?" Double-click to start here.":""}`]),xe("click",o,()=>t.onSelect(t.info.id)),ft("dblclick",o,k=>{k.stopPropagation(),t.onStart?.(t.info.id)},!0),m(e,o),Ke()}St(["click"]);var sC=S(" ",1);function aC(e,t){We(t,!0);const r=b(()=>t.data),s=b(()=>n(r).layout);function a(u,v){return`left:${(u+1)/(v+1)*100}%`}var i=sC(),o=_e(i);ke(o,19,()=>n(s).ports.top,u=>`${u.type}:${u.id}`,(u,v,p)=>{{let f=b(()=>`${n(v).type==="source"?"s":"t"}:${n(v).id}`),g=b(()=>a(n(p),n(s).ports.top.length));On(u,{get type(){return n(v).type},get id(){return n(f)},get position(){return ht.Top},get style(){return n(g)},isConnectable:!1})}});var l=h(o,2);rC(l,{get info(){return n(r).info},get project(){return n(r).project},get selected(){return n(r).selected},get dimmed(){return n(r).dimmed},get size(){return n(s)},get onSelect(){return n(r).onSelect},get onStart(){return n(r).onStart}});var c=h(l,2);ke(c,19,()=>n(s).ports.bottom,u=>`${u.type}:${u.id}`,(u,v,p)=>{{let f=b(()=>`${n(v).type==="source"?"s":"t"}:${n(v).id}`),g=b(()=>a(n(p),n(s).ports.bottom.length));On(u,{get type(){return n(v).type},get id(){return n(f)},get position(){return ht.Bottom},get style(){return n(g)},isConnectable:!1})}}),m(e,i),Ke()}var oC=S(' '),iC=S(' '),lC=S('');function cC(e,t){We(t,!0);const r=3,s=b(()=>t.data),a=b(()=>n(s).stubs),i=b(()=>n(s).width),o=b(()=>n(s).dimmed),l=b(()=>n(a).slice(0,r)),c=b(()=>n(a).length-n(l).length),u=b(()=>n(a).slice(r).map(x=>`${x.dir==="out"?"leads to":"arrives from"} ${x.label}`).join(` +`));var v=lC();let p;var f=d(v);ke(f,17,()=>n(l),x=>x.edge+x.dir,(x,k)=>{var C=oC(),T=d(C),M=d(T),z=h(T,1,!0);I(()=>{se(C,"title",`${n(k).dir==="out"?"Leads to":"Arrives from"} ${n(k).label} — too far across the picture to draw as a line. Click the box to draw it.`),w(M,n(k).dir==="out"?"→":"←"),w(z,n(k).label)}),m(x,C)});var g=h(f,2);{var _=x=>{var k=iC(),C=d(k);I(()=>{se(k,"title",n(u)),w(C,`+${n(c)??""} more`)}),m(x,k)};F(g,x=>{n(c)>0&&x(_)})}I(()=>{p=qe(v,1,"stubs svelte-12qg1ij",null,p,{dimmed:n(o)}),rt(v,`width:${n(i)}px`)}),m(e,v),Ke()}var dC=S(' '),uC=S("",1),fC=S("?",1),vC=S('
      ',1);function hC(e,t){We(t,!0);const r=b(()=>t.data),s=b(()=>n(r).layout),a=b(()=>Ol(n(r).fork.on)),i=b(()=>n(a).length===0||Zo(n(a)).length>Us);function o(k,C){return`left:${(k+1)/(C+1)*100}%`}var l=vC(),c=_e(l);ke(c,19,()=>n(s).ports.top,k=>`${k.type}:${k.id}`,(k,C,T)=>{{let M=b(()=>`${n(C).type==="source"?"s":"t"}:${n(C).id}`),z=b(()=>o(n(T),n(s).ports.top.length));On(k,{get type(){return n(C).type},get id(){return n(M)},get position(){return ht.Top},get style(){return n(z)},isConnectable:!1})}});var u=h(c,2);let v;var p=d(u),f=d(p);{var g=k=>{var C=Yt();I(()=>w(C,n(r).fork.label)),m(k,C)},_=k=>{var C=fC(),T=_e(C);ke(T,17,()=>n(a),Kn,(M,z,R)=>{var D=uC(),V=_e(D);{var X=H=>{var L=Yt();L.nodeValue=" ",m(H,L)};F(V,H=>{R>0&&H(X)})}var j=h(V);{var P=H=>{var L=dC(),E=d(L);I(()=>w(E,n(z).text)),m(H,L)},A=H=>{var L=Yt();I(()=>w(L,n(z).text)),m(H,L)};F(j,H=>{n(z).kw?H(P):H(A,-1)})}m(M,D)}),m(k,C)};F(f,k=>{n(i)?k(g):k(_,-1)})}var x=h(u,2);ke(x,19,()=>n(s).ports.bottom,k=>`${k.type}:${k.id}`,(k,C,T)=>{{let M=b(()=>`${n(C).type==="source"?"s":"t"}:${n(C).id}`),z=b(()=>o(n(T),n(s).ports.bottom.length));On(k,{get type(){return n(C).type},get id(){return n(M)},get position(){return ht.Bottom},get style(){return n(z)},isConnectable:!1})}}),I(()=>{v=qe(u,1,"fpoint svelte-10oa9z2",null,v,{dimmed:n(r).dimmed}),rt(u,`width:${n(s).width}px;height:${n(s).height}px`),se(u,"title",n(r).fork.on?`${n(r).fork.on} — the code forks here; each line out is one arm.`:"The code forks here; each line out is one arm.")}),m(e,l),Ke()}var pC=S(' '),gC=S("",1),mC=S("?",1),_C=S("
      ");function yC(e,t){We(t,!0);const r=b(()=>t.data),s=b(()=>Ol(n(r).label.replace(/\?$/,""))),a=b(()=>n(s).length===0||Zo(n(s))!==n(r).label.replace(/\?$/,""));var i=_C();let o;var l=d(i);{var c=v=>{var p=Yt();I(()=>w(p,n(r).label)),m(v,p)},u=v=>{var p=mC(),f=_e(p);ke(f,17,()=>n(s),Kn,(g,_,x)=>{var k=gC(),C=_e(k);{var T=D=>{var V=Yt();V.nodeValue=" ",m(D,V)};F(C,D=>{x>0&&D(T)})}var M=h(C);{var z=D=>{var V=pC(),X=d(V);I(()=>w(X,n(_).text)),m(D,V)},R=D=>{var V=Yt();I(()=>w(V,n(_).text)),m(D,V)};F(M,D=>{n(_).kw?D(z):D(R,-1)})}m(g,k)}),m(v,p)};F(l,v=>{n(a)?v(c):v(u,-1)})}I(()=>{o=qe(i,1,"dcap svelte-1ham54o",null,o,{dimmed:n(r).dimmed}),rt(i,`width:${n(r).width}px`),se(i,"title",n(r).label)}),m(e,i),Ke()}var bC=S('
      ');function wC(e,t){const r=b(()=>t.data);var s=bC(),a=d(s);I(()=>{rt(s,`width:${n(r).width}px`),w(a,n(r).label)}),m(e,s)}var xC=S('
      Name
      no line
      ',1),kC=S(`
      → name What a box leads to, or what reaches it (←), when the two are too far apart for a line to be followed — said + in words under the box rather than drawn across the picture. Select the box and every one of its real lines + draws
      `),SC=S('
      POST /x An endpoint — its verb and path — or a handler: a function a request, a job, an event or a schedule fires; its line says which
      ⇢ fn The code crosses a tier: a call into another service or a job put on a queue (⇢), or a job, an event, a message arriving (⇠)
      set A data call — a function in a store or state file
      db A call that leaves the index: the database, the response, a queue, email, payments, a cache, auth, the network
      ',1),EC=S('
      /path A page, an endpoint, or a handler — a function an event, a request or a page load fires; its line says which
      ⇢ fn The code crosses to the server (⇢ a request, a server action) or comes back from it (⇠ a push, a stream)
      set A store action — a function in a store file
      api A call that leaves the index: the network, the database, the response, storage, a queue, email
      ',1),MC=S('
      /path A screen, or a handler — a function fired from a tap, an option, a listener; its line says the event
      ⇢ fn The code crosses into native (⇢ a bridge call) or comes back from it (⇠ an event)
      set A store action — a function in a store file
      api A call that leaves the index: the network, storage, the device, telemetry
      ',1),CC=S(`
      And then — the step at the other end happens after this one; the plumbing between them is folded into the line
      x? A decision both of whose ways are drawn: the box asks the condition once and each line out answers — yes, no, a case. An arm that answers or leaves ends there
      WHEN x A lone guard — an early exit, an if with one drawn side: what has to hold for the step at the other end. No label = it happens either way
      via x Written inside a helper drawn where it is called; later runs after this returns, together starts at once, for each repeats
      Established by a synthesized hop (an event channel, a callback, a helper's return value)
      name …
      `,1),TC=S(`
      Leads to — the plumbing between the two is folded into the line
      Established by a synthesized hop (an event channel, a callback, a helper's return value)
      Goes back up the picture — leaves the top of its box, arrives at the bottom of the other
      x? · yes A decision made inside a box, both of whose ways are drawn: the condition is said once under the box and + each line out of it answers — yes, no, a case. These are + the only lines labelled before you select anything
      → …x The last condition checked before the step, beside the box at the other end of the selected step's line; ← when it arrives there. None = always
      name … Not entered: another screen (a chapter of its own), or a cap the walk hit — start there to see on
      `,1),IC=S('
      ●start
      '),AC=S('
      ');function NC(e,t){We(t,!0);let r=Ie(t,"regions",3,!1);var s=AC();let a;var i=d(s),o=h(d(i)),l=d(o),c=h(i,2);{var u=v=>{var p=IC(),f=d(p),g=h(d(f),2),_=d(g),x=h(f,2);{var k=P=>{var A=xC(),H=_e(A),L=h(d(H),2),E=d(L),y=h(H,2),O=h(d(y),2),N=d(O);I((B,W)=>{w(E,`A region — the component that owns the boxes under its rule, a box above what it sets in motion. One line from + the start into each region stands in for the ${B??""}'s whole fan-out; every other line + draws where it leads`),w(N,`A box nothing points at is the region's own doing — run on render or mount, or from a binding written inline. + Select it and its line from the ${W??""} lights, with what fires it`)},[()=>Ir("screen",t.project),()=>Ir("screen",t.project)]),m(P,A)};F(x,P=>{r()&&!t.order&&P(k)})}var C=h(x,2);{var T=P=>{var A=kC();m(P,A)};F(C,P=>{t.order||P(T)})}var M=h(C,2);{var z=P=>{var A=SC();m(P,A)},R=P=>{var A=EC();m(P,A)},D=P=>{var A=MC();m(P,A)};F(M,P=>{t.project==="api"?P(z):t.project==="web"?P(R,1):P(D,-1)})}var V=h(M,2);{var X=P=>{var A=CC(),H=h(_e(A),10),L=h(d(H),2),E=d(L);I(y=>w(E,`Not entered: another ${y??""} (a chapter of its own), or a cap the walk hit — start there to see on`),[()=>Ir("screen",t.project)]),m(P,A)},j=P=>{var A=TC();m(P,A)};F(V,P=>{t.order?P(X):P(j,-1)})}I(P=>w(_,P),[()=>t.order?"Where the picture starts; below it, what it does in the code’s own order":r()?"Where the picture starts; below it, the parts of the "+Ir("screen",t.project)+", each with what happens there":"Where the picture starts; each row down is one more step away"]),m(v,p)};F(c,v=>{t.open&&v(u)})}I(()=>{a=qe(s,1,"legend svelte-1jp07je",null,a,{open:t.open,flow:t.flow}),se(i,"aria-expanded",t.open),w(l,t.open?"▾":"▸")}),xe("click",i,()=>t.onToggle(!t.open)),m(e,s),Ke()}St(["click"]);function zC(e){return Au(e)}function PC(e){switch(e.block){case"inline":return e.via?`via ${e.via.name}`:"via a helper";case"loop":return e.by?e.loop==="while"?`again while ${e.by}`:`for each ${e.by}`:e.loop==="while"?"again and again":"for each item";case"later":return e.by?`later · ${e.by}`:"later";default:return e.by?`together · ${e.by}`:"together"}}function LC(e,t){const r=[],s=new Set([t]),a=new Map,i=[],o=(u,v,p)=>{if(u===v)return;const f=`${u} ${v}`,g=p.when.filter((k,C)=>k&&p.when.indexOf(k)===C).join(" && "),_=a.get(f);if(_){g!==_.when&&(_.when=!g||!_.when?"":`${_.when} || ${g}`);for(const k of p.runs)_.runs.includes(k)||_.runs.push(k);_.arm!==p.arm&&delete _.arm;return}const x={from:u,to:v,when:g,runs:[...p.runs],...p.arm!==void 0?{arm:p.arm}:{}};a.set(f,x),r.push(x)},l=(u,v,p)=>{let f=[...v];for(const g of u)if(g.kind==="step"){s.add(g.step);for(const x of f)o(x.id,g.step,{...x,runs:[...x.runs,...p]});let _=[{id:g.step,when:[],runs:[]}];g.body&&g.body.length>0&&(_=l(g.body,_,[])),f=_}else if(g.kind==="fork"){const x=g.arms.filter(C=>dl(C.body)).length>=2&&f.length>0?{id:`fork:${i.length}`,on:g.on,form:g.form}:null;if(x!==null){i.push(x);for(const C of f)o(C.id,x.id,{...C,runs:[...C.runs,...p]})}const k=[];for(const C of g.arms){const T=x!==null&&dl(C.body)?[{id:x.id,when:[C.when],runs:[...p],arm:OC(g,C)}]:f.map(z=>({id:z.id,when:[...z.when,C.when],runs:[...z.runs,...p]})),M=l(C.body,T,[]);C.ends===null&&k.push(...M)}g.arms.length<2&&k.push(...f.map(C=>({...C,runs:[...C.runs,...p]}))),f=k}else if(g.kind==="block"){const _=PC(g),x=l(g.body,f,[...p,_]);f=(x.length>0?x:f).map(k=>k.runs.includes(_)?{...k,runs:k.runs.filter(C=>C!==_)}:k)}return f};l(e.root,[{id:t,when:[],runs:[]}],[]);for(const u of s)u!==t&&!r.some(v=>v.to===u)&&o(t,u,{when:[],runs:[]});const c=new Set(s);for(const u of i)c.add(u.id);return{edges:r,depth:qC(t,c,r),forks:i}}function dl(e){return e.some(t=>t.kind==="step"?!0:t.kind==="fork"?t.arms.some(r=>dl(r.body)):t.kind==="block"?dl(t.body):!1)}function OC(e,t){return Im({on:e.on,arm:t.when,form:e.form,not:t.not})}function qC(e,t,r){const s=DC(e,t,r),a=new Map;for(const i of t)a.set(i,0);a.set(e,0);for(let i=0;i(a.get(l.to)??0)&&(a.set(l.to,c),o=!0)}if(!o)break}return a}function DC(e,t,r){const s=new Map;for(const o of r){const l=s.get(o.from);l?l.push(o):s.set(o.from,[o])}const a=new Map,i=new Set;for(const o of[e,...t]){if(a.has(o))continue;a.set(o,1);const l=[{id:o,next:0}];for(;l.length>0;){const c=l[l.length-1],u=s.get(c.id)??[];if(c.next>=u.length){a.set(c.id,2),l.pop();continue}const v=u[c.next++],p=a.get(v.to);p===1?i.add(v):p===void 0&&(a.set(v.to,1),l.push({id:v.to,next:0}))}}return r.filter(o=>!i.has(o))}const RC=24;function HC(e){if(!e.program)return null;const t=e.steps.find(T=>T.anchor);if(!t)return null;const r=LC(e.program,t.id),s=new Map,a=new Map,i=[],o={anchor:0,screen:0,trigger:0,bridge:0,event:0,store:0,effect:0},l=new Map;for(const T of r.edges)l.set(T.from,(l.get(T.from)??0)+1),l.set(T.to,(l.get(T.to)??0)+1);const c=new Map(e.steps.map(T=>[T.id,T]));for(const T of[t.id,...r.depth.keys()]){if(s.has(T))continue;const M=c.get(T);if(!M)continue;o[M.kind]++;const z={id:T,step:M,label:Cm(M),sub:Tm(M,e.project)};s.set(T,z),i.push({id:T,label:z.label,files:1,symbols:l.get(T)??0,languages:[],test:!1,generated:0,generatedFiles:[],facade:!1,fileList:{total:1,shown:1,truncated:!1,items:[M.node?.file??M.sub]},dependents:{files:0,modules:0}})}for(const T of r.forks){const M=FC(T.on);a.set(T.id,{id:T.id,on:T.on,form:T.form,label:M}),i.push({id:T.id,label:M,files:0,symbols:l.get(T.id)??0,languages:[],test:!1,generated:0,generatedFiles:[],facade:!1,fileList:{total:0,shown:0,truncated:!1,items:[]},dependents:{files:0,modules:0}})}const u=T=>s.has(T)||a.has(T),v=[],p=new Map;for(const T of r.edges){if(!u(T.from)||!u(T.to))continue;const M=Jr({source:T.from,target:T.to});if(p.has(M))continue;v.push({source:T.from,target:T.to,count:1,declared:1,byKind:[{kind:"calls",count:1}],topPairs:[]});const z=e.links.filter(R=>R.to===T.to);p.set(M,{id:M,from:T.from,to:T.to,links:z,label:jC(T),synthesized:z.length>0&&z.every(R=>R.synthesized),kind:z[0]?.kind??"calls"})}const f=new Map;for(const T of r.edges){if(!a.has(T.from))continue;const M=c.get(T.to)?.order;M!==void 0&&f.set(T.from,Math.min(f.get(T.from)??Number.MAX_SAFE_INTEGER,M))}const g=Math.max(0,...r.depth.values()),x=zl({modules:i,links:v},{includeTests:!0,minWeight:0,sizing:T=>{const M=a.get(T.id);if(M)return{label:M.label,meta:""};const z=s.get(T.id),R=z?.step.cut!=null?" …":"";return{label:(z?.step.anchor?"● ":"")+(z?.label??T.id)+R,meta:z?.sub??""}},layering:T=>new Map(T.map(M=>[M,g-(r.depth.get(M)??g)])),order:T=>s.get(T)?.step.order??f.get(T)??Number.MAX_SAFE_INTEGER,layerGap:Lr,portPitch:Nl,ports:"directional"}),k=Nu(x,Lr),C=new Map;for(const[T,M]of k)C.set(T,zu(M,RC));return{layout:x,nodes:s,edges:p,layerGap:Lr,curves:k,polylines:C,counts:o,regions:null,regionEntries:null,forks:a,decisions:[],stubs:new Map,stubbed:new Set}}function jC(e){if(e.arm)return e.arm;if(!e.when)return e.runs.length>0?e.runs[e.runs.length-1]:"";const t=Zo(zC(e.when));return t.length>Us?`${t.slice(0,Us-1)}…`:t}function FC(e){const t=ql(e);return t?t.length>Us?`${t.slice(0,Us-1)}…?`:`${t}?`:"?"}const to=(e,t=kn)=>{var r=Et(),s=_e(r);ke(s,17,t,Kn,(a,i,o)=>{var l=VC(),c=_e(l);{var u=g=>{var _=Yt();_.nodeValue=" ",m(g,_)};F(c,g=>{o>0&&g(u)})}var v=h(c);{var p=g=>{var _=BC(),x=d(_);I(()=>w(x,n(i).text)),m(g,_)},f=g=>{var _=Yt();I(()=>w(_,n(i).text)),m(g,_)};F(v,g=>{n(i).kw?g(p):g(f,-1)})}m(a,l)}),m(e,r)};var BC=S(' '),VC=S("",1),WC=S('

      This viewer cannot draw steps

      The host it runs in has not wired the steps question. The Screens and Flow views still work.

      '),KC=S(`

      Pick an endpoint and this view draws everything it sets in motion — its handler and what runs + before it, the calls into the database, a queue, another service, and every response it can + send — one box per step, an arrow for every way one leads to the next, and on each arrow the + condition under which it happens. Or search a symbol and choose What happens from here.

      `),YC=S(`

      Pick a screen and this view draws everything it sets in motion — its handlers, the calls that + cross into native code, the events that come back, the state it writes, the requests that leave + the app — one box per step, an arrow for every way one leads to the next, and on each arrow the + condition under which it happens. Or search a symbol and choose What happens from here.

      `),qc=S('

      '),XC=S(`

      No screens or endpoints in this graph. Open a symbol from the search box and follow What happens from here, + or link here directly with #/steps?symbol=<name>.

      `),Kv=S(' '),GC=S('
      '),ZC=S('
      ',1),UC=S('

      What happens from where?

      '),QC=S('

      The steps could not be read

      '),JC=S('

      Walking from the anchor…

      '),$C=S(`

      This has no body to read in order

      Nothing the picture holds is written inside this symbol — a screen renders handlers that fire on + events, and they have no order between them. Read it as what it sets in motion instead.

      What it sets in motion →

      `),eT=S('FIRES FROM '),tT=S(' '),Dc=S(' '),no=S(' ·',1),nT=S(' '),rT=S('
      '),sT=S('
      '),aT=S('
      '),oT=S(" ",1),Rc=S('
      FIRES FROM
      '),Hc=S(' '),iT=S(' '),lT=S('Start here →'),gi=S('

      '),cT=S('

      The event lands in a component of another screen — a picture of its own. Start here (or double-click its box) to see it, or continue through screens from the summary.

      '),Yv=S('

      '),Xv=S('
      '),mi=S('
      '),_i=S('
      '),Gv=S('
      '),Zv=S('
      FIRES FROM
      '),Uv=S(' '),Qv=S(' '),Jv=S("
      "),$v=S('Open as a flow →'),eh=S('
      '),dT=S('

      Arrives from

      Leads to

      ',1),uT=S(" ",1),fT=S('

      '),th=S(""),vT=S(" "),hT=S(`

      ● The anchor is at the top, and each row down is what happens next: a line + means and then. Where the code forks both ways, a small box asks the condition once and each + line out of it answers — yes, no, a case; a lone + guard rides its line as WHEN. A call written inside another call's arguments + happens first — the token is signed before the reply that carries it — and an arm that answers, + returns or throws simply has nothing leaving it. Click a step for its sites and the whole condition; a + step is the next anchor.

      `),pT=S(`

      ● The anchor is at the top; each row down is one more step away from + it. Click a step and each of its links is labelled at the far end of its line with the last + condition checked before it happens; hover the line, or its row here, for the whole chain and the + plumbing it travels through. A step is the next anchor, and any link opens as a Flow strip.

      `),nh=S(" ",1),gT=S(" into shared chrome.",1),mT=S('

      Not drawn:

      '),_T=S(''),yT=S('
      What happens from

      Read as: in order what it sets in motion

      steps · links · depth

      Most connected

      ',1),bT=S(''),wT=S('
      ');function xT(e,t){We(t,!0);let r=he(null),s=he(null),a=he(!0),i=he(null),o=he(null),l=he(null),c=he(null),u=he(void 0);const v=10;let p=he(null),f=he(null);const g=b(()=>n(p)===null?null:n(p).length>0?"screens":n(f)===null?null:n(f).length>0?"routes":"none");function _(ue){const le=new Map;for(const we of ue){const Ce=le.get(we.routeFile)??[];Ce.push(we),le.set(we.routeFile,Ce)}return[...le].map(([we,Ce])=>({file:we,entries:[...Ce].sort(($e,Oe)=>$e.routeLine-Oe.routeLine)})).sort((we,Ce)=>Ce.entries.length-we.entries.length||we.file.localeCompare(Ce.file))}const x="codegraph-ui:steps-legend";let k=he(gn(C()));function C(){try{return localStorage.getItem(x)!=="closed"}catch{return!0}}vt(()=>{try{localStorage.setItem(x,n(k)?"open":"closed")}catch{}});const T={step:aC,region:wC,fork:hC,decision:yC,stubs:cC},M=400;let z=null;function R(ue){const le=n(A)?.nodes.get(ue)?.step;return!le||!le.node||le.anchor?!1:(jt(Sr({anchor:le.node.id})),!0)}const D={screen:Mm},V=[4,6,8,10,12],X=b(()=>t.anchor!==null||t.symbol!==null),j=o0();vt(()=>{An.indexTick;const ue=t.anchor!==null?{anchor:t.anchor,depth:t.depth??void 0,through:t.through}:t.symbol!==null?{symbol:t.symbol,depth:t.depth??void 0,through:t.through}:null,le=new AbortController;return q(i,null),q(o,null),q(l,null),ue===null?(q(r,null),q(a,!1),q(s,null),yp(le.signal).then(async we=>{if(q(p,we.routed?we.screens:[],!0),we.routed){q(f,[],!0);return}const Ce=await r0({limit:300},le.signal);q(f,Ce.routed?Ce.entries:[],!0)}).catch(()=>{q(p,n(p)??[],!0),q(f,n(f)??[],!0)}),()=>le.abort()):(q(a,!0),q(s,null),a0(ue,le.signal).then(we=>{q(r,we,!0),q(a,!1)}).catch(we=>{le.signal.aborted||(q(s,we instanceof Error?we.message:String(we),!0),q(a,!1))}),()=>le.abort())});const P=b(()=>t.reading??n(r)?.defaultView??"tree"),A=b(()=>n(r)===null?null:(n(P)==="order"?HC(n(r)):null)??V9(n(r))),H=b(()=>n(r)?.program!=null),L=b(()=>n(A)!==null&&n(A).layout.nodes.length<=24&&n(k)?{padding:{left:"440px",top:"32px",right:"32px",bottom:"32px"},maxZoom:1,minZoom:.4}:{padding:.1,maxZoom:1,minZoom:n(A)!==null&&n(A).regions!==null?.2:.4}),E=b(()=>n(A)===null||n(i)===null?null:zm(n(A),n(i))),y=b(()=>{if(n(A)===null||n(E)===null)return null;const ue=new Set(n(E));for(const le of n(A).layout.edges)n(E).has(le.source)&&ue.add(le.target),n(E).has(le.target)&&ue.add(le.source);return ue}),O=b(()=>n(P)==="order"?!0:n(A)===null?!1:new Set([...n(A).edges.values()].filter(ue=>ue.arm!==void 0).map(ue=>ue.id))),N=b(()=>n(A)===null?null:Sm(n(A),n(i),n(O))),B=b(()=>n(o)?.edge.id??n(l)?.edge??null),W=b(()=>{if(n(A)===null||n(B)===null||n(N)?.pills.has(n(B)))return null;const ue=n(l)?.edge===n(B)?K(n(l).link):void 0;return Em(n(A),n(B),n(i),ue,n(N)??void 0)}),Y=b(()=>{if(n(A)===null)return[];const ue=(n(A).regions??[]).map(le=>({id:`region:${le.id}`,type:"region",position:{x:le.x,y:le.y-32},draggable:!1,selectable:!1,connectable:!1,data:{label:le.label,width:le.width}}));for(const le of n(A).decisions){const we=le.id.slice(0,le.id.indexOf(" "));ue.push({id:`decision:${le.id}`,type:"decision",position:{x:le.x,y:le.y},draggable:!1,selectable:!1,connectable:!1,data:{label:le.label,width:le.width,dimmed:n(y)!==null&&!n(y).has(we)}})}for(const le of n(A).layout.nodes){const we=n(A).stubs.get(le.id);we===void 0||we.length===0||n(i)===le.id||ue.push({id:`stubs:${le.id}`,type:"stubs",position:{x:le.x,y:le.y+le.height},draggable:!1,selectable:!1,connectable:!1,data:{stubs:we,width:le.width,dimmed:n(y)!==null&&!n(y).has(le.id)}})}return ue.concat(n(A).layout.nodes.map(le=>{const we=n(A).forks?.get(le.id);return we?{id:le.id,type:"fork",position:{x:le.x,y:le.y},draggable:!1,selectable:!1,connectable:!1,data:{layout:le,fork:we,dimmed:n(y)!==null&&!n(y).has(le.id)}}:{id:le.id,type:"step",position:{x:le.x,y:le.y},draggable:!1,selectable:!1,connectable:!1,data:{layout:le,info:n(A).nodes.get(le.id),project:n(r)?.project??"app",selected:n(i)===le.id,dimmed:n(y)!==null&&!n(y).has(le.id),onSelect:Ce=>{const $e=performance.now();z!==null&&z.id===Ce&&$e-z.at{if(n(A)===null)return[];const ue=n(B);return n(A).layout.edges.filter(le=>J9(n(A),le,n(i),n(E)??void 0)).map(le=>{const we=n(E)!==null&&(n(E).has(le.source)||n(E).has(le.target)),Ce=ue===le.id,$e=Ce||we;return{id:le.id,source:le.source,target:le.target,sourceHandle:le.sourceHandle,targetHandle:le.targetHandle,type:"screen",selectable:!1,deletable:!1,zIndex:Ce?3:$e?2:1,data:{edge:le,info:n(A).edges.get(le.id),curve:n(A).curves.get(le.id),hot:$e,soft:$e&&ue!==null&&!Ce,focus:Ce,dimmed:n(i)!==null&&!we,pill:n(N)?.pills.get(le.id)??(Ce?n(W):null),full:n(l)?.edge===le.id?K(n(l).link):null,onHover:ae}}})}),G=b(()=>n(i)===null||n(A)===null?null:n(A).nodes.get(n(i))??null),ee=b(()=>n(i)===null||n(r)===null?null:$9(n(r),n(i))),oe=b(()=>n(o)===null||n(A)===null?null:n(A).edges.get(n(o).edge.id)??null),ge=b(()=>n(A)===null?new Map:new Map(n(A).layout.edges.map(ue=>[ue.id,ue]))),U=b(()=>new Set(n(J).map(ue=>ue.id)));function $(ue){return Sr({anchor:t.anchor??void 0,symbol:t.anchor===null?t.symbol??void 0:void 0,depth:ue.depth??t.depth??void 0,through:ue.through??t.through,view:ue.view??t.reading??void 0})}function ae(ue,le){if(ue===null||le===null||n(c)===null){q(o,null);return}const we=n(c).getBoundingClientRect();q(o,{edge:ue,x:Math.min(le.clientX-we.left+14,we.width-420),y:le.clientY-we.top+14},!0)}function ne(ue){if(n(A)===null||n(c)===null)return;const le=ue.target;if(le?.closest(".spill"))return;if(le?.closest(".snode, .legend, .tip, .svelte-flow__controls")){q(o,null);return}const we=n(u)??re();if(!we)return;const Ce=n(c).getBoundingClientRect(),$e={x:(ue.clientX-Ce.left-we.x)/we.zoom,y:(ue.clientY-Ce.top-we.y)/we.zoom},Oe=wm(n(A),$e,n(U),v/we.zoom),at=Oe===null?void 0:n(ge).get(Oe.id);if(!at){q(o,null);return}q(o,{edge:at,x:Math.min(ue.clientX-Ce.left+14,Ce.width-420),y:ue.clientY-Ce.top+14},!0)}function re(){const le=n(c)?.querySelector(".svelte-flow__viewport")?.style.transform.match(/translate\(([-\d.]+)px,\s*([-\d.]+)px\)\s*scale\(([-\d.]+)\)/);return le?{x:Number(le[1]),y:Number(le[2]),zoom:Number(le[3])}:null}function Q(ue){const le=ue===null?null:Wv(ue);q(l,ue===null||le===null?null:{edge:le,link:ue},!0)}function K(ue){return`${n(i)!==null&&ue.to===n(i)&&ue.from!==n(i)?"←":"→"} ${ql(ue.when)||"always"}`}function Z(ue){return n(l)!==null?n(l).link.id===ue.id:n(o)!==null&&Wv(ue)===n(o).edge.id}function ce(ue){return n(A)?.nodes.get(ue)?.label??n(A)?.forks?.get(ue)?.label??ue}function te(ue){const le=n(r)?.steps.find(Ce=>Ce.id===ue.from)?.node,we=n(r)?.steps.find(Ce=>Ce.id===ue.to)?.node;return!le||!we?null:ws({from:le.name,to:we.name})}function ie(ue,le,we){const $e=ue.via[ue.via.length-1]?.id??we;return $e===null?null:pn($e,{line:le.line})}function ve(ue){return ue.slice(ue.lastIndexOf("/")+1)}function fe(ue){return ue.args===void 0?ue.text:`${ue.text}(${ue.args})`}var pe=wT(),ye=d(pe),Pe=d(ye);{var de=ue=>{var le=WC(),we=d(le),Ce=d(we);Ne(Ce,{name:"footprints",size:20}),m(ue,le)},be=ue=>{var le=UC(),we=d(le),Ce=d(we);Ne(Ce,{name:"footprints",size:20});var $e=h(we,4);{var Oe=Se=>{var Ae=KC();m(Se,Ae)},at=Se=>{var Ae=YC();m(Se,Ae)};F($e,Se=>{n(g)==="routes"?Se(Oe):Se(at,-1)})}var wt=h($e,2);{var Mt=Se=>{var Ae=qc(),je=d(Ae);I(()=>w(je,`Reading ${n(p)===null?"screens":"endpoints"}…`)),m(Se,Ae)},Tt=Se=>{var Ae=XC();m(Se,Ae)},ct=Se=>{var Ae=GC();ke(Ae,21,()=>[...n(p)].sort((je,Fe)=>Fe.outgoing+Fe.incoming-(je.outgoing+je.incoming)||je.path.localeCompare(Fe.path)),je=>je.id,(je,Fe)=>{var Me=Kv(),Ue=d(Me),Ye=h(Ue),He=d(Ye);I((Xe,Qe)=>{se(Me,"href",Xe),w(Ue,`${n(Fe).path??""} `),w(He,Qe)},[()=>Sr({anchor:n(Fe).id}),()=>n(Fe).component?.name??ve(n(Fe).file)]),m(je,Me)}),m(Se,Ae)},pt=Se=>{var Ae=Et(),je=_e(Ae);ke(je,17,()=>_(n(f)),Fe=>Fe.file,(Fe,Me)=>{var Ue=ZC(),Ye=_e(Ue),He=d(Ye),Xe=d(He),Qe=h(He),ut=d(Qe),ot=h(Ye,2);ke(ot,21,()=>n(Me).entries,it=>it.routeId,(it,xt)=>{var et=Kv(),Ve=d(et),gt=h(Ve),_t=d(gt);I(At=>{se(et,"href",At),w(Ve,`${n(xt).url??""} `),w(_t,n(xt).handler)},[()=>Sr({anchor:n(xt).routeId})]),m(it,et)}),I(()=>{w(Xe,n(Me).file),w(ut,n(Me).entries.length)}),m(Fe,Ue)}),m(Se,Ae)};F(wt,Se=>{n(g)===null?Se(Mt):n(g)==="none"?Se(Tt,1):n(g)==="screens"&&n(p)!==null?Se(ct,2):n(f)!==null&&Se(pt,3)})}m(ue,le)},Ee=ue=>{var le=QC(),we=d(le),Ce=d(we);Ne(Ce,{name:"footprints",size:20});var $e=h(we,4),Oe=d($e);I(()=>w(Oe,n(s))),m(ue,le)},Ge=ue=>{var le=JC();m(ue,le)},me=ue=>{var le=$C(),we=d(le),Ce=d(we);Ne(Ce,{name:"footprints",size:20});var $e=h(we,6),Oe=d($e);I(at=>se(Oe,"href",at),[()=>$({view:"tree"})]),m(ue,le)},ze=ue=>{var le=oT(),we=_e(le);Il(we,{get nodes(){return n(Y)},get edges(){return n(J)},get nodeTypes(){return T},get edgeTypes(){return D},fitView:!0,get fitViewOptions(){return n(L)},minZoom:.2,maxZoom:3,nodesDraggable:!1,nodesConnectable:!1,elementsSelectable:!1,panOnDrag:!0,proOptions:{hideAttribution:!0},onpaneclick:()=>{q(i,null),q(o,null),q(l,null)},get viewport(){return n(u)},set viewport(Oe){q(u,Oe,!0)},children:(Oe,at)=>{Al(Oe,{position:"bottom-right",showLock:!1})},$$slots:{default:!0}});var Ce=h(we,2);{var $e=Oe=>{var at=aT(),wt=d(at),Mt=d(wt),Tt=d(Mt),ct=h(Mt),pt=h(wt,2);ke(pt,17,()=>n(oe).links.slice(0,5),je=>je.id,(je,Fe)=>{var Me=rT(),Ue=d(Me);{var Ye=tt=>{var Ct=eT(),Ht=h(d(Ct)),Ft=h(Ht),Qt=d(Ft);I(sn=>{w(Ht,` ${sn??""} `),w(Qt,`in ${n(Fe).trigger.in??""}`)},[()=>Zn(n(Fe).trigger)]),m(tt,Ct)};F(Ue,tt=>{n(Fe).trigger&&tt(Ye)})}var He=h(Ue,2);{var Xe=tt=>{var Ct=tT(),Ht=d(Ct);I(Ft=>w(Ht,`via ${Ft??""}`),[()=>Oc(n(Fe))]),m(tt,Ct)};F(He,tt=>{n(Fe).via.length>0&&tt(Xe)})}var Qe=h(He,2);{var ut=tt=>{var Ct=Dc(),Ht=d(Ct);I(()=>w(Ht,`inside ${n(Fe).within??""}(…)`)),m(tt,Ct)};F(Qe,tt=>{n(Fe).within&&tt(ut)})}var ot=h(Qe,2);{var it=tt=>{var Ct=Dc(),Ht=d(Ct);I(()=>w(Ht,`${n(Fe).sites.length??""} ways`)),m(tt,Ct)};F(ot,tt=>{n(Fe).sites.length>1&&tt(it)})}var xt=h(ot,2),et=d(xt);{let tt=b(()=>Au(n(Fe).when));to(et,()=>n(tt))}var Ve=h(xt,2);{var gt=tt=>{var Ct=Dc(),Ht=d(Ct);I(()=>w(Ht,n(Fe).label)),m(tt,Ct)};F(Ve,tt=>{n(Fe).label&&tt(gt)})}var _t=h(Ve,2);{var At=tt=>{var Ct=nT(),Ht=d(Ct);{var Ft=sn=>{var ln=no(),br=_e(ln),lt=d(br);I(()=>w(lt,n(Fe).sites[0].status)),m(sn,ln)};F(Ht,sn=>{n(Fe).sites[0].status&&sn(Ft)})}var Qt=h(Ht,1,!0);I(sn=>w(Qt,sn),[()=>fe(n(Fe).sites[0])]),m(tt,Ct)};F(_t,tt=>{n(Fe).sites[0]&&tt(At)})}m(je,Me)});var Se=h(pt,2);{var Ae=je=>{var Fe=sT(),Me=d(Fe);I(()=>w(Me,`+${n(oe).links.length-5} more`)),m(je,Fe)};F(Se,je=>{n(oe).links.length>5&&je(Ae)})}I((je,Fe)=>{rt(at,`left:${n(o).x}px;top:${n(o).y}px`),w(Tt,je),w(ct,` → ${Fe??""}`)},[()=>ce(n(oe).from),()=>ce(n(oe).to)]),m(Oe,at)};F(Ce,Oe=>{n(o)!==null&&n(oe)!==null&&Oe($e)})}m(ue,le)};F(Pe,ue=>{j?n(X)?n(s)!==null?ue(Ee,2):n(a)&&n(r)===null?ue(Ge,3):n(A)!==null&&n(r)!==null&&n(P)==="order"&&!n(H)?ue(me,4):n(A)!==null&&n(r)!==null&&ue(ze,5):ue(be,1):ue(de)})}var De=h(Pe,2);{var Le=ue=>{{let le=b(()=>n(P)==="order"),we=b(()=>n(A).regions!==null);NC(ue,{get project(){return n(r).project},get order(){return n(le)},get regions(){return n(we)},flow:!1,get open(){return n(k)},onToggle:Ce=>q(k,Ce,!0)})}};F(De,ue=>{n(r)!==null&&n(A)!==null&&(n(P)==="tree"||n(H))&&ue(Le)})}Ut(ye,ue=>q(c,ue),()=>n(c));var Ze=h(ye,2);{var Re=ue=>{var le=bT(),we=d(le);{var Ce=Oe=>{var at=dT(),wt=_e(at),Mt=d(wt),Tt=d(Mt),ct=d(Tt),pt=h(Tt,2),Se=d(pt),Ae=h(Se);{var je=Be=>{var Te=Yt("· where the picture starts");m(Be,Te)};F(Ae,Be=>{n(G).step.anchor&&Be(je)})}var Fe=h(pt,2);{var Me=Be=>{var Te=Rc(),st=h(d(Te)),Bt=h(st),Nt=d(Bt);I(Zt=>{w(st,` ${Zt??""} `),w(Nt,`in ${n(G).step.trigger.in??""}`)},[()=>Zn(n(G).step.trigger)]),m(Be,Te)};F(Fe,Be=>{n(G).step.trigger&&Be(Me)})}var Ue=h(Fe,2);{var Ye=Be=>{var Te=Hc(),st=d(Te);Lt(st,{get kind(){return n(G).step.screen.component.kind}});var Bt=h(st);I(Nt=>{se(Te,"href",Nt),w(Bt,` ${n(G).step.screen.component.name??""}`)},[()=>pn(n(G).step.screen.component.id)]),m(Be,Te)},He=Be=>{var Te=Hc(),st=d(Te);Lt(st,{get kind(){return n(G).step.node.kind}});var Bt=h(st);I(Nt=>{se(Te,"href",Nt),w(Bt,` ${n(G).step.node.name??""}`)},[()=>pn(n(G).step.node.id)]),m(Be,Te)};F(Ue,Be=>{n(G).step.screen?.component?Be(Ye):n(G).step.node&&n(G).step.kind!=="screen"&&Be(He,1)})}var Xe=h(Ue,2);{var Qe=Be=>{var Te=Hc(),st=d(Te);Lt(st,{get kind(){return n(G).step.effect.by.kind}});var Bt=h(st);I(Nt=>{se(Te,"href",Nt),w(Bt,` ${n(G).step.effect.by.name??""} · line ${n(G).step.effect.line??""}`)},[()=>pn(n(G).step.effect.by.id,{line:n(G).step.effect.line})]),m(Be,Te)};F(Xe,Be=>{n(G).step.effect&&Be(Qe)})}var ut=h(Xe,2);{var ot=Be=>{var Te=iT(),st=d(Te);I(Bt=>{se(Te,"href",Bt),w(st,n(G).step.node.file)},[()=>rn(n(G).step.node.file)]),m(Be,Te)};F(ut,Be=>{n(G).step.node&&Be(ot)})}var it=h(ut,2);{var xt=Be=>{var Te=lT();I(st=>se(Te,"href",st),[()=>Sr({anchor:n(G).step.node.id})]),m(Be,Te)};F(it,Be=>{n(G).step.node&&!n(G).step.anchor&&Be(xt)})}var et=h(Mt,2),Ve=h(wt,2);{var gt=Be=>{var Te=gi(),st=d(Te);I((Bt,Nt)=>w(st,`Another ${Bt??""} — a chapter of its own. Start here (or double-click its box) to see what happens on it, or continue through ${Nt??""} from the summary.`),[()=>Ir("screen",n(r).project,n(G).step),()=>Ni("screen",n(r).project)[1]]),m(Be,Te)},_t=Be=>{var Te=cT();m(Be,Te)},At=Be=>{var Te=gi(),st=d(Te);I(()=>w(st,`The walk was cut at this step (${n(G).step.cut==="depth"?"the picture’s depth":n(G).step.cut==="fan-out"?"more calls than the walk follows from one node":n(G).step.cut==="folded"?"as much plumbing as it folds from one step":"the picture’s size"}). Start here to see on.`)),m(Be,Te)};F(Ve,Be=>{n(G).step.cut==="screen"?Be(gt):n(G).step.cut==="component"?Be(_t,1):n(G).step.cut!==null&&Be(At,2)})}var tt=h(Ve,2);{var Ct=Be=>{var Te=Yv(),st=d(Te);I(Bt=>w(st,Bt),[()=>n(G).step.effect.apis.join(" · ")]),m(Be,Te)};F(tt,Be=>{n(G).step.effect&&n(G).step.effect.apis.length>1&&Be(Ct)})}var Ht=h(tt,2);{var Ft=Be=>{var Te=gi(),st=d(Te);I(()=>w(st,n(G).step.effect.statuses?.length?"One way the endpoint answers — each row below is a site that sends it, with the condition it answers under; its other outcomes are the boxes beside it.":"Replies whose status the code does not spell out — each row below is one, with the condition it answers under.")),m(Be,Te)};F(Ht,Be=>{n(G).step.effect?.category==="response"&&Be(Ft)})}var Qt=h(Ht,2);{var sn=Be=>{var Te=Yv(),st=d(Te);I(Bt=>w(st,`⇠ ${Bt??""}`),[()=>n(G).step.events.join(" · ")]),m(Be,Te)};F(Qt,Be=>{n(G).step.events&&n(G).step.events.length>1&&Be(sn)})}var ln=h(Qt,2);{var br=Be=>{var Te=gi(),st=d(Te);I(()=>w(st,`${n(N).hidden??""} condition${n(N).hidden===1?"":"s"} not drawn on the picture for want of + room — hover a row below to see ${n(N).hidden===1?"it":"each"} on its line.`)),m(Be,Te)};F(ln,Be=>{n(N)!==null&&n(N).hidden>0&&Be(br)})}var lt=h(ln,2),Xt=h(d(lt)),un=d(Xt),Mn=h(lt,2);{var Xn=Be=>{var Te=qc(),st=d(Te);I(()=>w(st,n(G).step.anchor?"The anchor — the picture starts here.":"Nothing in the picture leads here.")),m(Be,Te)};F(Mn,Be=>{n(ee).arrivesFrom.length===0&&Be(Xn)})}var xn=h(Mn,2);ke(xn,17,()=>n(ee).arrivesFrom,Be=>Be.id,(Be,Te)=>{const st=b(()=>ll(n(Te).sites)),Bt=b(()=>n(r).steps.find(nt=>nt.id===n(Te).from)?.node?.id??null);var Nt=eh();let Zt;var an=d(Nt),fn=d(an),Nn=h(an,2);{var Cn=nt=>{var Je=Rc(),Ot=h(d(Je)),mn=h(Ot),Br=d(mn);I(Vr=>{w(Ot,` ${Vr??""} `),w(Br,`in ${n(Te).trigger.in??""}`)},[()=>Zn(n(Te).trigger)]),m(nt,Je)};F(Nn,nt=>{n(Te).trigger&&nt(Cn)})}var or=h(Nn,2);{var Dl=nt=>{var Je=Xv(),Ot=d(Je);I(mn=>w(Ot,`via ${mn??""}`),[()=>Oc(n(Te))]),m(nt,Je)};F(or,nt=>{n(Te).via.length>0&&nt(Dl)})}var qa=h(or,2);{var Rl=nt=>{var Je=mi(),Ot=d(Je);I(()=>w(Ot,`inside ${n(Te).within??""}(…)`)),m(nt,Je)};F(qa,nt=>{n(Te).within&&nt(Rl)})}var Da=h(qa,2);{var Hl=nt=>{var Je=_i(),Ot=d(Je);{let mn=b(()=>il(n(st).common));to(Ot,()=>n(mn))}m(nt,Je)};F(Da,nt=>{n(st).common.length>0&&nt(Hl)})}var Ra=h(Da,2);{var jl=nt=>{var Je=mi(),Ot=d(Je);I(()=>w(Ot,n(Te).label)),m(nt,Je)};F(Ra,nt=>{n(Te).label&&nt(jl)})}var Ha=h(Ra,2);{var Fl=nt=>{var Je=Gv(),Ot=d(Je);I(()=>w(Ot,`${n(st).rows.length??""} ways`)),m(nt,Je)};F(Ha,nt=>{n(st).rows.length>1&&nt(Fl)})}var ja=h(Ha,2);ke(ja,17,()=>n(st).rows,nt=>nt.site.file+nt.site.line,(nt,Je)=>{const Ot=b(()=>ie(n(Te),n(Je).site,n(Bt)));var mn=Jv();let Br;var Vr=d(mn);{var Kl=Kt=>{var $t=Zv(),_n=h(d($t));I(zn=>w(_n,` ${zn??""}`),[()=>Zn(n(Je).site.trigger)]),m(Kt,$t)},Yl=b(()=>n(Je).site.trigger&&Zn(n(Je).site.trigger)!==(n(Te).trigger?Zn(n(Te).trigger):""));F(Vr,Kt=>{n(Yl)&&Kt(Kl)})}var Fa=h(Vr,2);{var Xl=Kt=>{var $t=_i(),_n=d($t);{let zn=b(()=>cl(n(Je).rest,n(st).common.length>0));to(_n,()=>n(zn))}m(Kt,$t)};F(Fa,Kt=>{n(st).rows.length>1&&Kt(Xl)})}var Gl=h(Fa,2);{var Zl=Kt=>{var $t=Uv(),_n=d($t);{var zn=tn=>{var yn=no(),Es=_e(yn),Ms=d(Es);I(()=>w(Ms,n(Je).site.status)),m(tn,yn)};F(_n,tn=>{n(Je).site.status&&tn(zn)})}var ir=h(_n),ks=h(ir),Ss=d(ks);I((tn,yn)=>{se($t,"href",n(Ot)),w(ir,`${tn??""} `),w(Ss,`· ${yn??""}:${n(Je).site.line??""}`)},[()=>fe(n(Je).site),()=>ve(n(Je).site.file)]),m(Kt,$t)},Ul=Kt=>{var $t=Qv(),_n=d($t);{var zn=tn=>{var yn=no(),Es=_e(yn),Ms=d(Es);I(()=>w(Ms,n(Je).site.status)),m(tn,yn)};F(_n,tn=>{n(Je).site.status&&tn(zn)})}var ir=h(_n),ks=h(ir),Ss=d(ks);I((tn,yn)=>{w(ir,`${tn??""} `),w(Ss,`· ${yn??""}:${n(Je).site.line??""}`)},[()=>fe(n(Je).site),()=>ve(n(Je).site.file)]),m(Kt,$t)};F(Gl,Kt=>{n(Ot)?Kt(Zl):Kt(Ul,-1)})}I(()=>Br=qe(mn,1,"scenario svelte-v5q9re",null,Br,{many:n(st).rows.length>1})),m(nt,mn)});var Bl=h(ja,2);{var Vl=nt=>{var Je=$v();I(Ot=>se(Je,"href",Ot),[()=>te(n(Te))]),m(nt,Je)},Wl=b(()=>te(n(Te)));F(Bl,nt=>{n(Wl)&&nt(Vl)})}I((nt,Je)=>{Zt=qe(Nt,1,"row svelte-v5q9re",null,Zt,nt),w(fn,Je)},[()=>({hot:Z(n(Te))}),()=>ce(n(Te).from)]),ft("mouseenter",Nt,()=>Q(n(Te))),ft("mouseleave",Nt,()=>Q(null)),xe("focusin",Nt,()=>Q(n(Te))),xe("focusout",Nt,()=>Q(null)),xe("click",an,()=>q(i,n(Te).from,!0)),m(Be,Nt)});var Bn=h(xn,2),ar=h(d(Bn)),Fr=d(ar),dt=h(Bn,2);{var kt=Be=>{var Te=qc(),st=d(Te);I(()=>w(st,n(G).step.kind==="effect"?"Outside the index: the graph cannot follow it further.":n(G).step.cut==="screen"||n(G).step.cut==="component"?"Not entered — a boundary. Start here for its own picture, or continue through from the summary.":"Nothing the walk follows leaves this step.")),m(Be,Te)};F(dt,Be=>{n(ee).leadsTo.length===0&&Be(kt)})}var Pt=h(dt,2);ke(Pt,17,()=>n(ee).leadsTo,Be=>Be.id,(Be,Te)=>{const st=b(()=>ll(n(Te).sites)),Bt=b(()=>n(G).step.screen?.component?.id??n(G).step.node?.id??null);var Nt=eh();let Zt;var an=d(Nt),fn=d(an),Nn=h(an,2);{var Cn=nt=>{var Je=Rc(),Ot=h(d(Je)),mn=h(Ot),Br=d(mn);I(Vr=>{w(Ot,` ${Vr??""} `),w(Br,`in ${n(Te).trigger.in??""}`)},[()=>Zn(n(Te).trigger)]),m(nt,Je)};F(Nn,nt=>{n(Te).trigger&&nt(Cn)})}var or=h(Nn,2);{var Dl=nt=>{var Je=Xv(),Ot=d(Je);I(mn=>w(Ot,`via ${mn??""}`),[()=>Oc(n(Te))]),m(nt,Je)};F(or,nt=>{n(Te).via.length>0&&nt(Dl)})}var qa=h(or,2);{var Rl=nt=>{var Je=mi(),Ot=d(Je);I(()=>w(Ot,`inside ${n(Te).within??""}(…)`)),m(nt,Je)};F(qa,nt=>{n(Te).within&&nt(Rl)})}var Da=h(qa,2);{var Hl=nt=>{var Je=_i(),Ot=d(Je);{let mn=b(()=>il(n(st).common));to(Ot,()=>n(mn))}m(nt,Je)};F(Da,nt=>{n(st).common.length>0&&nt(Hl)})}var Ra=h(Da,2);{var jl=nt=>{var Je=mi(),Ot=d(Je);I(()=>w(Ot,n(Te).label)),m(nt,Je)};F(Ra,nt=>{n(Te).label&&nt(jl)})}var Ha=h(Ra,2);{var Fl=nt=>{var Je=Gv(),Ot=d(Je);I(()=>w(Ot,`${n(st).rows.length??""} ways`)),m(nt,Je)};F(Ha,nt=>{n(st).rows.length>1&&nt(Fl)})}var ja=h(Ha,2);ke(ja,17,()=>n(st).rows,nt=>nt.site.file+nt.site.line,(nt,Je)=>{const Ot=b(()=>ie(n(Te),n(Je).site,n(Bt)));var mn=Jv();let Br;var Vr=d(mn);{var Kl=Kt=>{var $t=Zv(),_n=h(d($t));I(zn=>w(_n,` ${zn??""}`),[()=>Zn(n(Je).site.trigger)]),m(Kt,$t)},Yl=b(()=>n(Je).site.trigger&&Zn(n(Je).site.trigger)!==(n(Te).trigger?Zn(n(Te).trigger):""));F(Vr,Kt=>{n(Yl)&&Kt(Kl)})}var Fa=h(Vr,2);{var Xl=Kt=>{var $t=_i(),_n=d($t);{let zn=b(()=>cl(n(Je).rest,n(st).common.length>0));to(_n,()=>n(zn))}m(Kt,$t)};F(Fa,Kt=>{n(st).rows.length>1&&Kt(Xl)})}var Gl=h(Fa,2);{var Zl=Kt=>{var $t=Uv(),_n=d($t);{var zn=tn=>{var yn=no(),Es=_e(yn),Ms=d(Es);I(()=>w(Ms,n(Je).site.status)),m(tn,yn)};F(_n,tn=>{n(Je).site.status&&tn(zn)})}var ir=h(_n),ks=h(ir),Ss=d(ks);I((tn,yn)=>{se($t,"href",n(Ot)),w(ir,`${tn??""} `),w(Ss,`· ${yn??""}:${n(Je).site.line??""}`)},[()=>fe(n(Je).site),()=>ve(n(Je).site.file)]),m(Kt,$t)},Ul=Kt=>{var $t=Qv(),_n=d($t);{var zn=tn=>{var yn=no(),Es=_e(yn),Ms=d(Es);I(()=>w(Ms,n(Je).site.status)),m(tn,yn)};F(_n,tn=>{n(Je).site.status&&tn(zn)})}var ir=h(_n),ks=h(ir),Ss=d(ks);I((tn,yn)=>{w(ir,`${tn??""} `),w(Ss,`· ${yn??""}:${n(Je).site.line??""}`)},[()=>fe(n(Je).site),()=>ve(n(Je).site.file)]),m(Kt,$t)};F(Gl,Kt=>{n(Ot)?Kt(Zl):Kt(Ul,-1)})}I(()=>Br=qe(mn,1,"scenario svelte-v5q9re",null,Br,{many:n(st).rows.length>1})),m(nt,mn)});var Bl=h(ja,2);{var Vl=nt=>{var Je=$v();I(Ot=>se(Je,"href",Ot),[()=>te(n(Te))]),m(nt,Je)},Wl=b(()=>te(n(Te)));F(Bl,nt=>{n(Wl)&&nt(Vl)})}I((nt,Je)=>{Zt=qe(Nt,1,"row svelte-v5q9re",null,Zt,nt),w(fn,Je)},[()=>({hot:Z(n(Te))}),()=>ce(n(Te).to)]),ft("mouseenter",Nt,()=>Q(n(Te))),ft("mouseleave",Nt,()=>Q(null)),xe("focusin",Nt,()=>Q(n(Te))),xe("focusout",Nt,()=>Q(null)),xe("click",an,()=>q(i,n(Te).to,!0)),m(Be,Nt)}),I(Be=>{w(ct,n(G).label),w(Se,Be),w(un,n(ee).arrivesFrom.length),w(Fr,n(ee).leadsTo.length)},[()=>Ir(n(G).step.kind,n(r).project,n(G).step)]),xe("click",et,()=>q(i,null)),m(Oe,at)},$e=Oe=>{var at=yT(),wt=_e(at),Mt=d(wt),Tt=d(Mt),ct=h(d(Tt)),pt=d(ct),Se=h(Tt,2),Ae=d(Se);Lt(Ae,{get kind(){return n(r).anchor.kind}});var je=h(Ae),Fe=h(Se,2),Me=d(Fe),Ue=h(wt,2);{var Ye=dt=>{var kt=fT(),Pt=d(kt),Be=h(Pt);ke(Be,19,()=>n(r).ambiguous,Te=>Te.id,(Te,st,Bt)=>{var Nt=uT(),Zt=_e(Nt);{var an=Cn=>{var or=Yt(",");m(Cn,or)};F(Zt,Cn=>{n(Bt)>0&&Cn(an)})}var fn=h(Zt,2),Nn=d(fn);I((Cn,or)=>{se(fn,"href",Cn),w(Nn,`${n(st).kind??""} in ${or??""}`)},[()=>Sr({anchor:n(st).id}),()=>ve(n(st).file)]),m(Te,Nt)}),I(()=>w(Pt,`${n(r).ambiguous.length??""} other symbol${n(r).ambiguous.length===1?"":"s"} share this name: `)),m(dt,kt)};F(Ue,dt=>{n(r).ambiguous.length>0&&dt(Ye)})}var He=h(Ue,2),Xe=h(d(He));let Qe;var ut=h(Xe,2);let ot;var it=h(He,2),xt=d(it),et=d(xt),Ve=h(xt,2),gt=d(Ve),_t=h(Ve,2),At=d(_t);ke(At,16,()=>V,dt=>dt,(dt,kt)=>{var Pt=th(),Be=d(Pt),Te={};I(st=>{w(Be,kt),Te!==(Te=st)&&(Pt.value=(Pt.__value=st)??"")},[()=>String(kt)]),m(dt,Pt)});var tt=h(At);{var Ct=dt=>{var kt=th(),Pt=d(kt),Be={};I(Te=>{w(Pt,n(r).depth),Be!==(Be=Te)&&(kt.value=(kt.__value=Te)??"")},[()=>String(n(r).depth)]),m(dt,kt)},Ht=b(()=>!V.includes(n(r).depth));F(tt,dt=>{n(Ht)&&dt(Ct)})}var Ft;wo(_t);var Qt=h(it,2),sn=d(Qt),ln=d(sn),br=h(ln),lt=h(sn,2),Xt=d(lt),un=h(Qt,2);ke(un,20,()=>["screen","trigger","bridge","event","store","effect"],dt=>dt,(dt,kt)=>{var Pt=Et(),Be=_e(Pt);{var Te=st=>{const Bt=b(()=>Ni(kt,n(r).project));var Nt=vT(),Zt=d(Nt),an=d(Zt),fn=h(Zt);I(()=>{w(an,n(A).counts[kt]),w(fn,` ${(n(A).counts[kt]===1?n(Bt)[0]:n(Bt)[1])??""}`)}),m(st,Nt)};F(Be,st=>{n(A).counts[kt]>0&&st(Te)})}m(dt,Pt)});var Mn=h(un,2);{var Xn=dt=>{var kt=hT();m(dt,kt)},xn=dt=>{var kt=pT();m(dt,kt)};F(Mn,dt=>{n(P)==="order"?dt(Xn):dt(xn,-1)})}var Bn=h(Mn,2);{var ar=dt=>{var kt=mT(),Pt=h(d(kt));{var Be=Zt=>{var an=nh(),fn=_e(an),Nn=d(fn),Cn=h(fn);I(()=>{w(Nn,n(r).truncated.steps),w(Cn,` step${n(r).truncated.steps===1?"":"s"} past the picture’s size limit;`)}),m(Zt,an)};F(Pt,Zt=>{n(r).truncated.steps>0&&Zt(Be)})}var Te=h(Pt,2);{var st=Zt=>{var an=nh(),fn=_e(an),Nn=d(fn),Cn=h(fn);I(()=>{w(Nn,n(r).truncated.hubs),w(Cn,` walk${n(r).truncated.hubs===1?"":"s"} that reached a hub;`)}),m(Zt,an)};F(Te,Zt=>{n(r).truncated.hubs>0&&Zt(st)})}var Bt=h(Te,2);{var Nt=Zt=>{var an=gT(),fn=_e(an),Nn=d(fn);I(()=>w(Nn,n(r).truncated.chrome)),m(Zt,an)};F(Bt,Zt=>{n(r).truncated.chrome>0&&Zt(Nt)})}m(dt,kt)};F(Bn,dt=>{(n(r).truncated.steps>0||n(r).truncated.hubs>0||n(r).truncated.chrome>0)&&dt(ar)})}var Fr=h(Bn,4);ke(Fr,17,()=>[...n(r).steps].sort((dt,kt)=>(n(A).layout.nodes.find(Pt=>Pt.id===kt.id)?.ports.top.length??0)+(n(A).layout.nodes.find(Pt=>Pt.id===kt.id)?.ports.bottom.length??0)-((n(A).layout.nodes.find(Pt=>Pt.id===dt.id)?.ports.top.length??0)+(n(A).layout.nodes.find(Pt=>Pt.id===dt.id)?.ports.bottom.length??0))).slice(0,8),dt=>dt.id,(dt,kt)=>{var Pt=_T(),Be=d(Pt),Te=h(Be),st=d(Te);I((Bt,Nt)=>{w(Be,`${Bt??""} `),w(st,Nt)},[()=>n(A).nodes.get(n(kt).id)?.label??n(kt).label,()=>Ir(n(kt).kind,n(r).project,n(kt))]),xe("click",Pt,()=>q(i,n(kt).id,!0)),m(dt,Pt)}),I((dt,kt,Pt,Be,Te,st,Bt)=>{w(pt,n(r).anchor.name),se(Se,"href",dt),w(je,` ${n(r).anchor.qualifiedName??""}`),se(Fe,"href",kt),w(Me,n(r).anchor.file),Qe=qe(Xe,1,"tab svelte-v5q9re",null,Qe,{on:n(P)==="order"}),se(Xe,"href",Pt),ot=qe(ut,1,"tab svelte-v5q9re",null,ot,{on:n(P)==="tree"}),se(ut,"href",Be),w(et,n(r).steps.length),w(gt,n(r).links.length),Ft!==(Ft=Te)&&(_t.value=(_t.__value=Te)??"",Ws(_t,Te)),up(ln,n(r).through),w(br,` Continue through ${st??""}`),w(Xt,`— otherwise another ${Bt??""} is drawn as a boundary, and is a click from being the next anchor.`)},[()=>pn(n(r).anchor.id),()=>rn(n(r).anchor.file),()=>$({view:"order"}),()=>$({view:"tree"}),()=>String(n(r).depth),()=>Ni("screen",n(r).project)[1],()=>Ir("screen",n(r).project)]),xe("change",_t,dt=>jt($({depth:Number(dt.currentTarget.value)}))),xe("change",ln,dt=>jt($({through:dt.currentTarget.checked}))),m(Oe,at)};F(we,Oe=>{n(G)!==null&&n(ee)!==null?Oe(Ce):Oe($e,-1)})}m(ue,le)};F(Ze,ue=>{n(r)!==null&&n(A)!==null&&ue(Re)})}xe("mousemove",ye,ne),ft("mouseleave",ye,()=>q(o,null)),m(e,pe),Ke()}St(["mousemove","click","focusin","focusout","change"]);var kT=S(' '),ST=S(''),ET=S(" "),MT=S('
      '),CT=S('
      '),TT=S('

      '),IT=S('
      ');function AT(e,t){We(t,!0);let r=b(()=>t.data.card),s=b(()=>n(r).hop),a=b(()=>n(s).source),i=b(()=>{const V=new Map,X=n(s).callRef;return X&&V.set(X.line,[{ident:X.name,col:X.col,targetId:X.targetId,uncertain:!1,outside:!1,title:X.backwards?`${n(s).node.name} calls ${X.name} here`:`calls ${X.name}`}]),V}),o=b(()=>n(a)?.lines?bl(n(a).lines,n(a).from,n(a).highlight):new Map),l=b(()=>n(a)?.lines?n(a).lines.map((V,X)=>{const j=n(a).from+X,P=n(o).get(j)??[{cls:"other",text:V,col:0}],A=yl(P,n(i).get(j)??[]);return{n:j,call:j===n(s).callRef?.line||j===n(r).stopLine,parts:P.map((H,L)=>{const E=A.get(L)??null;return{text:H.text,cls:E?null:nu(H),ref:E}})}}):[]);var c=IT();let u;var v=d(c);On(v,{type:"target",get position(){return ht.Left},id:"in",isConnectable:!1});var p=h(v,2);On(p,{type:"source",get position(){return ht.Right},id:"out",isConnectable:!1});var f=h(p,2),g=d(f);{var _=V=>{var X=kT(),j=d(X);I(()=>w(j,n(r).step+1)),m(V,X)};F(g,V=>{n(r).step>=0&&V(_)})}var x=h(g,2);Lt(x,{get kind(){return n(s).node.kind},size:20});var k=h(x,2),C=d(k),T=h(k,2),M=d(T),z=h(f,2);{var R=V=>{var X=CT();ke(X,21,()=>n(l),j=>j.n,(j,P)=>{var A=MT();let H;var L=d(A),E=d(L),y=h(L,2);ke(y,21,()=>n(P).parts,Kn,(O,N)=>{var B=Et(),W=_e(B);{var Y=ee=>{var oe=ST(),ge=d(oe);I(()=>{se(oe,"title",n(N).ref.title),w(ge,n(N).text)}),xe("click",oe,()=>t.data.onFollow(n(r))),m(ee,oe)},J=ee=>{var oe=ET(),ge=d(oe);I(()=>{qe(oe,1,bs(n(N).cls),"svelte-1c9ldo3"),w(ge,n(N).text)}),m(ee,oe)},G=ee=>{var oe=Yt();I(()=>w(oe,n(N).text)),m(ee,oe)};F(W,ee=>{n(N).ref?ee(Y):n(N).cls?ee(J,1):ee(G,-1)})}m(O,B)}),I(()=>{H=qe(A,1,"ln svelte-1c9ldo3",null,H,{call:n(P).call}),w(E,n(P).n)}),m(j,A)}),m(V,X)},D=V=>{var X=TT(),j=d(X);I(()=>w(j,n(a)?.drift?"Changed on disk after the last index sync — source is not shown.":n(a)?.reason??"Source outside this slice or this index.")),m(V,X)};F(z,V=>{n(l).length>0?V(R):V(D,-1)})}I(V=>{u=qe(c,1,"card svelte-1c9ldo3",null,u,{cur:t.data.current,dim:t.data.dimmed}),rt(c,`width:${n(r).width}px;height:${n(r).height}px`),w(C,n(s).node.name),w(M,`${V??""}:${n(s).node.line??""}`)},[()=>wn(n(s).node.file)]),xe("click",f,()=>t.data.onOpen(n(r))),m(e,c),Ke()}St(["click"]);var NT=Jt(""),rh=Jt(' '),zT=Jt(" ",1);function PT(e,t){const r=b(()=>t.data),s=b(()=>{if(Math.abs(t.sourceY-t.targetY)<.5)return`M${t.sourceX},${t.sourceY} L${t.targetX},${t.targetY}`;const M=(t.sourceX+t.targetX)/2;return`M${t.sourceX},${t.sourceY} C${M},${t.sourceY} ${M},${t.targetY} ${t.targetX},${t.targetY}`}),a=b(()=>`${t.targetX-10},${t.targetY-4} ${t.targetX-2},${t.targetY} ${t.targetX-10},${t.targetY+4}`),i=b(()=>(t.sourceX+t.targetX)/2),o=b(()=>(t.sourceY+t.targetY)/2),l=b(()=>n(r).link.dash?`stroke-dasharray:${n(r).link.dash}`:""),c=b(()=>n(r).link.labelLines);var u=zT(),v=_e(u);{let M=b(()=>`flink${n(r).dimmed?" dimmed":""}`);Js(v,{get path(){return n(s)},get class(){return n(M)},get style(){return n(l)}})}var p=h(v);{var f=M=>{var z=NT();I(()=>{qe(z,0,`fhead${n(r).dimmed?" dimmed":""}`,"svelte-1gtjqth"),se(z,"points",n(a))}),m(M,z)};F(p,M=>{n(r).link.cap||M(f)})}var g=h(p),_=d(g),x=d(_),k=h(_);ke(k,17,()=>n(c),Kn,(M,z,R)=>{var D=rh(),V=d(D);I(()=>{se(D,"x",n(i)),se(D,"y",n(o)-8-(n(c).length-1-R)*13),w(V,n(z))}),m(M,D)});var C=h(k);{var T=M=>{var z=rh(),R=d(z);I(()=>{se(z,"x",n(i)),se(z,"y",n(o)+17),w(R,n(r).link.lineLabel)}),m(M,z)};F(C,M=>{n(r).link.lineLabel&&M(T)})}I(()=>{qe(g,0,`flabel${n(r).dimmed?" dimmed":""}`,"svelte-1gtjqth"),w(x,`${n(r).link.label??""}${n(r).link.lineLabel?` (${n(r).link.lineLabel})`:""}`)}),m(e,u)}var LT=S('

      key

      '),sh=S('

      '),OT=S(''),qT=S('

      ',1),DT=S('

      '),RT=S('

      '),HT=S(''),jT=S('

      '),ah=S('

      '),FT=S('

      Where the graph stops.

      ');function BT(e,t){We(t,!0);let r=b(()=>t.data.cap),s=b(()=>Cu(n(r).boundary));var a=FT();let i;var o=d(a);On(o,{type:"target",get position(){return ht.Left},id:"in",isConnectable:!1});var l=h(o,2),c=h(d(l)),u=h(l,2);ke(u,17,()=>n(s).sites,Kn,(T,M)=>{var z=DT(),R=d(z),D=d(R),V=h(R,2);{var X=L=>{var E=LT(),y=h(d(E)),O=d(y);I(()=>w(O,n(M).key)),m(L,E)};F(V,L=>{n(M).key!==null&&L(X)})}var j=h(V,2);ke(j,16,()=>n(M).notes,L=>L,(L,E)=>{var y=sh(),O=d(y);I(()=>w(O,E)),m(L,y)});var P=h(j,2);{var A=L=>{var E=qT(),y=_e(E),O=d(y),N=h(y,2);ke(N,17,()=>n(M).candidates,B=>B.node.id,(B,W)=>{var Y=OT(),J=d(Y),G=d(J),ee=h(J,2),oe=d(ee);I(ge=>{w(G,n(W).display),w(oe,`${ge??""}:${n(W).node.line??""}`)},[()=>wn(n(W).node.file)]),xe("click",Y,()=>t.data.onOpen(n(W).node.id)),m(B,Y)}),I(()=>w(O,n(M).candidateHeading)),m(L,E)},H=L=>{var E=sh(),y=d(E);I(()=>w(y,n(M).candidateNote)),m(L,E)};F(P,L=>{n(M).candidateHeading!==null?L(A):n(M).candidateNote!==null&&L(H,1)})}I(()=>w(D,n(M).headline)),m(T,z)});var v=h(u,2);{var p=T=>{var M=RT(),z=d(M);I(()=>w(z,n(s).quiet)),m(T,M)};F(v,T=>{n(s).quiet!==null&&T(p)})}var f=h(v,2);{var g=T=>{var M=jT(),z=d(M),R=d(z),D=h(z,2);ke(D,17,()=>n(s).uncertain,V=>V.node.id,(V,X)=>{var j=HT(),P=d(j),A=d(P),H=h(P,2),L=d(H);I(E=>{w(A,n(X).node.name),w(L,E)},[()=>n(X).confidence===null?"":n(X).confidence.toFixed(2)]),xe("click",j,()=>t.data.onOpen(n(X).node.id)),m(V,j)}),I(()=>w(R,n(s).uncertainHeading)),m(T,M)};F(f,T=>{n(s).uncertainHeading!==null&&T(g)})}var _=h(f,2);{var x=T=>{var M=ah(),z=d(M);I(()=>w(z,n(s).further)),m(T,M)};F(_,T=>{n(s).further!==null&&T(x)})}var k=h(_,2);{var C=T=>{var M=ah(),z=d(M);I(()=>w(z,n(s).missed)),m(T,M)};F(k,T=>{n(s).missed!==null&&T(C)})}I(()=>{i=qe(a,1,"endcap svelte-1f3e7uq",null,i,{dim:t.data.dimmed}),rt(a,`width:${n(r).width}px;min-height:${n(r).height}px`),w(c,` ${n(s).intro??""}`)}),m(e,a),Ke()}St(["click"]);var oh=S(""),VT=S(''),WT=S(' '),KT=S(' ',1),YT=S('

      The flow could not be built

      '),XT=S('
      Following the calls…
      '),GT=S('

      Nothing to follow yet

      Ask for a path in the search box — “how does execute reach getFile”, or execute -> getFile — or walk a trail and read it as a flow.

      '),ZT=S('

      Asked: to .

      '),UT=S('

      No path between them

      '),QT=S('

      ',1),JT=S('

      '),$T=S('This path runs through the one in .',1),e7=S('

      '),t7=S('

      names nothing in this index.

      '),n7=S('
      '),r7=S(' '),ih=S('—'),s7=S(' ',1),a7=S(' '),o7=S(''),i7=S('
      # Call Runs when Site Confidence
      '),l7=S('
      Every hop the calls on this path, in order · conditions arrive with the branch-guard port
      '),c7=S('

      Flow

      how one symbol reaches another, opened at each call
      ');function d7(e,t){We(t,!0);let r=he(null),s=he(null),a=he(!0),i=he(null),o=he(!1);const l="all-paths",c={x:0,y:0,zoom:1},u={flow:AT,cap:BT},v={flow:PT},p=b(()=>t.trailParam?Ud(t.trailParam):[]);vt(()=>{const re=t.trailParam?{trail:n(p).map(Z=>`${Z.dir==="start"?"s":Z.dir==="up"?"u":"d"}${Z.id}`)}:t.symbols?{symbols:t.symbols}:{from:t.from??"",to:t.to??""};if(!t.trailParam&&!t.symbols&&!(t.from&&t.to)){q(r,null),q(a,!1),q(s,null);return}An.indexTick;const Q=new AbortController;q(a,!0),q(s,null);const K=n(i);return l0(re,Q.signal).then(Z=>{q(r,Z,!0),q(i,Z.flows.some(ce=>ce.id===K)?K:Z.flows[0]?.id??null,!0),q(a,!1)}).catch(Z=>{Q.signal.aborted||(q(s,Z instanceof Error?Z.message:String(Z),!0),q(a,!1))}),()=>Q.abort()});const f=b(()=>n(r)?.flows??[]),g=b(()=>n(o)?n(f):n(f).filter(re=>re.id===n(i)).slice(0,1)),_=b(()=>n(g).length===0?null:g6(n(o)?n(f):n(g),n(i))),x=b(()=>n(f).find(re=>re.id===n(i))??n(f)[0]??null),k=b(()=>n(_)===null?[]:[...n(_).endCaps.map(Q=>({id:Q.id,type:"cap",position:{x:Q.x,y:Q.y},draggable:!1,selectable:!1,connectable:!1,data:{cap:Q,dimmed:n(o)&&n(i)!==null&&!Q.flows.includes(n(i)),onOpen:M}})),...n(_).cards.map(Q=>({id:Q.id,type:"flow",position:{x:Q.x,y:Q.y},draggable:!1,selectable:!1,connectable:!1,data:{card:Q,current:n(o)&&Q.step>=0,dimmed:n(o)&&Q.step<0,onOpen:T,onFollow:z}}))]),C=b(()=>n(_)===null?[]:n(_).links.map(re=>({id:re.id,source:re.source,target:re.target,sourceHandle:"out",targetHandle:"in",type:"flow",selectable:!1,deletable:!1,data:{link:re,dimmed:n(o)&&n(i)!==null&&!re.flows.includes(n(i))}})));function T(re){const Q=n(x)?.hops??[],K=Q.findIndex(ce=>ce.node.id===re.id),Z=K>=0?Q.slice(0,K+1):[];Wt.clear(),Z.forEach((ce,te)=>Wt.push({id:ce.node.id,name:ce.node.name,kind:ce.node.kind,dir:te===0?"start":ce.edge?.upward?"up":"down"})),Z.length===0&&Wt.push({id:re.id,name:re.hop.node.name,kind:re.hop.node.kind,dir:"start"}),jt(pn(re.id,{trail:Qr(Wt.hops),...re.hop.callRef?{line:re.hop.callRef.line}:{}}))}function M(re){Wt.clear(),jt(pn(re))}function z(re){const Q=re.hop.callRef?.targetId;if(!Q)return;const K=n(_)?.cards.find(Z=>Z.id===Q);K&&T(K)}function R(re){return re.query.kind==="trail"?"Your trail, read as a flow: each card is opened at the line that carried you to the next one.":re.flows.some(Q=>Q.partial)?"No static path connects them. The card is where the looking stopped — a call whose target is chosen at runtime — and the cap names the form, the key and who could be on the other side.":re.query.kind==="directed"?"Every card is a call the graph recorded. A dashed link is a hop no one can see in the source — a callback, an interface, a re-render — and it names where it was wired.":"The longest call path among the symbols you named, the same one codegraph_explore leads with."}const D=b(()=>n(o)&&n(f).length>1?`all ${n(f).length} paths`:n(x)?.label??"flow"),V=b(()=>{const re=n(x)?.hops??[],Q=[];for(let K=1;Kn(V).length);function j(re){const Q=re.to.edge?.upward?re.to:re.from;Wt.clear(),jt(pn(Q.node.id,re.line!==null?{line:re.line}:{}))}function P(re){if(n(_)===null)throw new Error("There is no strip to export yet.");const Q=n(x)?.hops.length??0;return I6(n(_),{scale:re,theme:pp(xr.choice),activeFlowId:n(i),showAll:n(o),caption:n(o)?n(D):`${n(D)}${Q>1?` · ${Q} hops`:""}`})}var A=c7(),H=d(A),L=d(H),E=d(L);Ne(E,{name:"workflow"});var y=h(L,4);{var O=re=>{var Q=VT(),K=h(d(Q),2),Z=d(K);ke(Z,17,()=>n(f),pe=>pe.id,(pe,ye)=>{var Pe=oh(),de=d(Pe),be={};I(()=>{w(de,`${n(ye).label??""}${n(ye).hops.length>1?` · ${n(ye).hops.length} hops`:""}`),be!==(be=n(ye).id)&&(Pe.value=(Pe.__value=n(ye).id)??"")}),m(pe,Pe)});var ce=h(Z);{var te=pe=>{var ye=oh(),Pe=d(ye);ye.value=ye.__value=l,I(()=>w(Pe,`All ${n(f).length??""} paths`)),m(pe,ye)};F(ce,pe=>{n(f).length>1&&pe(te)})}var ie;wo(K);var ve=h(K,2),fe=d(ve);Ne(fe,{name:"chevron-down",size:14}),I(()=>{ie!==(ie=n(o)?l:n(i)??"")&&(K.value=(K.__value=n(o)?l:n(i)??"")??"",Ws(K,n(o)?l:n(i)??""))}),xe("change",K,pe=>{const ye=pe.currentTarget.value;q(o,ye===l),n(o)||q(i,ye,!0)}),m(re,Q)};F(y,re=>{n(f).length>0&&re(O)})}var N=h(y,2);{var B=re=>{var Q=KT(),K=_e(Q),Z=d(K),ce=h(K,2);{var te=ie=>{var ve=WT(),fe=d(ve);Ne(fe,{name:"arrow-right",size:14});var pe=h(fe);I(()=>w(pe,`${n(X)??""} call${n(X)===1?"":"s"}`)),m(ie,ve)};F(ce,ie=>{n(X)>0&&ie(te)})}I(()=>w(Z,`${n(x).hops.length??""} symbol${n(x).hops.length===1?"":"s"}`)),m(re,Q)};F(N,re=>{n(x)&&n(_)!==null&&re(B)})}var W=h(N,4);{var Y=re=>{{let Q=b(()=>vm("flow",n(D)));im(re,{build:P,get filename(){return n(Q)}})}};F(W,re=>{n(_)!==null&&re(Y)})}var J=h(H,2),G=d(J);{var ee=re=>{var Q=YT(),K=h(d(Q),2),Z=d(K);I(()=>w(Z,n(s))),m(re,Q)},oe=re=>{var Q=XT(),K=d(Q),Z=d(K);Ne(Z,{name:"refresh-cw",size:14}),m(re,Q)},ge=re=>{var Q=GT();m(re,Q)},U=re=>{var Q=UT(),K=h(d(Q),2),Z=d(K),ce=h(K,2);{var te=ie=>{var ve=ZT(),fe=h(d(ve)),pe=d(fe),ye=h(fe,2),Pe=d(ye);I(()=>{w(pe,n(r).query.from),w(Pe,n(r).query.to)}),m(ie,ve)};F(ce,ie=>{n(r).query.from&&n(r).query.to&&ie(te)})}I(()=>w(Z,n(r).reason)),m(re,Q)},$=re=>{var Q=QT(),K=_e(Q);Il(K,{get nodes(){return n(k)},get edges(){return n(C)},get nodeTypes(){return u},get edgeTypes(){return v},get initialViewport(){return c},fitViewOptions:{padding:.1,maxZoom:1,minZoom:.2},minZoom:.2,maxZoom:1.4,nodesDraggable:!1,nodesConnectable:!1,elementsSelectable:!1,panOnDrag:!0,proOptions:{hideAttribution:!0},children:(te,ie)=>{Al(te,{position:"bottom-right",showLock:!1})},$$slots:{default:!0}});var Z=h(K,2),ce=d(Z);I(te=>w(ce,te),[()=>R(n(r))]),m(re,Q)};F(G,re=>{n(s)!==null?re(ee):n(a)&&n(r)===null?re(oe,1):n(r)===null?re(ge,2):n(_)===null?re(U,3):re($,-1)})}var ae=h(J,2);{var ne=re=>{var Q=l7(),K=h(d(Q),2);{var Z=ie=>{var ve=n7(),fe=d(ve);{var pe=de=>{var be=JT(),Ee=d(be);Ne(Ee,{name:"info"});var Ge=h(Ee,1,!0);I(()=>w(Ge,n(r).reason)),m(de,be)};F(fe,de=>{n(r).reason!==null&&de(pe)})}var ye=h(fe,2);ke(ye,17,()=>n(r).ambiguous,de=>de.token,(de,be)=>{var Ee=e7(),Ge=d(Ee);Ne(Ge,{name:"circle-alert"});var me=h(Ge),ze=d(me),De=d(ze),Le=h(ze),Ze=h(Le);{var Re=le=>{var we=$T(),Ce=h(_e(we)),$e=d(Ce);I(Oe=>w($e,`${Oe??""}:${n(be).chosen.line??""}`),[()=>wn(n(be).chosen.file)]),m(le,we)},ue=le=>{var we=Yt("None of them are on this path.");m(le,we)};F(Ze,le=>{n(be).chosen?le(Re):le(ue,-1)})}I(()=>{w(De,n(be).token),w(Le,` names ${n(be).others.length+1} definitions. `)}),m(de,Ee)});var Pe=h(ye,2);ke(Pe,16,()=>n(r).unresolved,de=>de,(de,be)=>{var Ee=t7(),Ge=d(Ee);Ne(Ge,{name:"circle-dashed"});var me=h(Ge),ze=d(me),De=d(ze);I(()=>w(De,be)),m(de,Ee)}),m(ie,ve)};F(K,ie=>{(n(r).reason!==null||n(r).ambiguous.length>0||n(r).unresolved.length>0)&&ie(Z)})}var ce=h(K,2);{var te=ie=>{var ve=i7(),fe=h(d(ve),2);ke(fe,17,()=>n(V),pe=>pe.step,(pe,ye)=>{var Pe=o7(),de=d(Pe),be=d(de),Ee=h(de,2),Ge=d(Ee);Lt(Ge,{get kind(){return n(ye).from.node.kind}});var me=h(Ge,2),ze=d(me),De=h(me,2),Le=d(De);{let Ae=b(()=>n(ye).to.edge?.upward?"corner-left-up":"arrow-right");Ne(Le,{get name(){return n(Ae)},size:14})}var Ze=h(De,2);Lt(Ze,{get kind(){return n(ye).to.node.kind}});var Re=h(Ze,2),ue=d(Re),le=h(Ee,2),we=d(le);{var Ce=Ae=>{var je=r7(),Fe=d(je);Ne(Fe,{name:"route",size:14});var Me=h(Fe);I(()=>w(Me,`when ${n(ye).when??""}`)),m(Ae,je)},$e=Ae=>{var je=ih();m(Ae,je)};F(we,Ae=>{n(ye).when?Ae(Ce):Ae($e,-1)})}var Oe=h(le,2),at=d(Oe),wt=h(Oe,2),Mt=d(wt);{var Tt=Ae=>{var je=s7(),Fe=_e(je),Me=d(Fe);let Ue;var Ye=h(Fe,2),He=d(Ye);I((Xe,Qe)=>{Ue=rt(Me,"",Ue,Xe),w(He,Qe)},[()=>({width:`${Math.round(n(ye).confidence*100)}%`}),()=>n(ye).confidence.toFixed(2)]),m(Ae,je)},ct=Ae=>{var je=ih();m(Ae,je)};F(Mt,Ae=>{n(ye).confidence!==null?Ae(Tt):Ae(ct,-1)})}var pt=h(Mt,2);{var Se=Ae=>{var je=a7(),Fe=d(je);I(()=>w(Fe,n(ye).resolvedBy)),m(Ae,je)};F(pt,Ae=>{n(ye).resolvedBy&&Ae(Se)})}I(()=>{se(Pe,"title",`Open ${n(ye).site}`),w(be,n(ye).step),w(ze,n(ye).from.node.name),w(ue,n(ye).to.node.name),w(at,n(ye).site)}),xe("click",Pe,()=>j(n(ye))),m(pe,Pe)}),m(ie,ve)};F(ce,ie=>{n(V).length>0&&ie(te)})}m(re,Q)};F(ae,re=>{n(r)&&n(_)!==null&&(n(V).length>0||n(r).reason!==null||n(r).ambiguous.length>0||n(r).unresolved.length>0)&&re(ne)})}m(e,A),Ke()}St(["change","click"]);var u7=S(' '),f7=S(' '),lh=S(' '),v7=S(''),h7=S(' '),p7=S(''),g7=S('
      '),m7=S('
      '),_7=S('

      '),y7=S('

      ');function b7(e,t){We(t,!0);var r=y7(),s=d(r),a=d(s),i=d(a),o=h(a,2),l=d(o),c=h(s,2),u=d(c),v=h(c,2);ke(v,17,()=>t.section.groups,g=>g.path,(g,_)=>{var x=m7(),k=d(x),C=d(k);Ne(C,{name:"folder",size:14});var T=h(C,2);{var M=X=>{var j=u7(),P=d(j);I(A=>{se(j,"href",A),se(j,"title",n(_).file),w(P,n(_).path)},[()=>rn(n(_).file)]),m(X,j)},z=X=>{var j=f7(),P=d(j);I(()=>{se(j,"title",n(_).path),w(P,n(_).path)}),m(X,j)};F(T,X=>{n(_).file?X(M):X(z,-1)})}var R=h(T,2),D=d(R),V=h(k,2);ke(V,17,()=>n(_).rows,X=>X.id,(X,j)=>{var P=g7();let A;var H=d(P);Lt(H,{get kind(){return n(j).kind},size:22});var L=h(H,2),E=d(L),y=d(E);{var O=G=>{var ee=v7(),oe=d(ee);{var ge=$=>{var ae=lh(),ne=d(ae);I(()=>w(ne,n(j).method)),m($,ae)};F(oe,$=>{n(j).method&&$(ge)})}var U=h(oe,1,!0);I(()=>{se(ee,"title",n(j).title),se(ee,"data-entry-row",n(j).id),w(U,n(j).name)}),xe("click",ee,()=>t.onopen(n(j))),m(G,ee)},N=G=>{var ee=h7(),oe=d(ee);{var ge=$=>{var ae=lh(),ne=d(ae);I(()=>w(ne,n(j).method)),m($,ae)};F(oe,$=>{n(j).method&&$(ge)})}var U=h(oe,1,!0);I(()=>{se(ee,"title",n(j).title),w(U,n(j).name)}),m(G,ee)};F(y,G=>{n(j).target?G(O):G(N,-1)})}var B=h(y,2);{var W=G=>{const ee=b(()=>t.armed===null?"Flow ›":t.armed===n(j).id?"Cancel":"→ here");var oe=p7(),ge=d(oe);{var U=ae=>{Ne(ae,{name:"workflow"})};F(ge,ae=>{t.armed===null&&ae(U)})}var $=h(ge,1,!0);I(()=>{se(oe,"title",t.armed===null?`Start a flow from ${n(j).flowFrom}`:t.armed===n(j).id?"Stop drawing a flow from here":`Draw the path that ends at ${n(j).flowFrom}`),se(oe,"data-entry-flow",n(j).id),w($,n(ee))}),xe("click",oe,()=>t.onflow(n(j))),m(G,oe)};F(B,G=>{n(j).flowFrom&&G(W)})}var Y=h(E,2),J=d(Y);I(()=>{A=qe(P,1,"row svelte-skxuyu",null,A,{armed:t.armed===n(j).id,stub:!n(j).target}),w(J,n(j).meta)}),m(X,P)}),I(()=>w(D,n(_).rows.length)),m(g,x)});var p=h(v,2);{var f=g=>{var _=_7(),x=d(_);I(()=>w(x,`Showing ${t.section.shown??""} of ${t.section.floor?"at least ":""}${t.section.total??""} — the rest are in + the index, not on this list.`)),m(g,_)};F(p,g=>{t.section.shown{se(r,"aria-labelledby",`entry-${t.section.id}`),se(a,"id",`entry-${t.section.id}`),w(i,t.section.title),w(l,t.section.meta),w(u,t.section.note)}),m(e,r),Ke()}St(["click"]);var w7=S('
      or pick the other end with → here
      '),ch=S('

      '),x7=S('

      Reading the graph…

      '),k7=S('
      '),S7=S('

      Saved trails and entry points

      Flow to draw the path from it to a second symbol.

      ');function E7(e,t){We(t,!0);let r=Ie(t,"project",3,null);vt(()=>{qt.ensureEntries()});let s=b(()=>I0(qt.entries)),a=he(null),i=he(""),o=he(null);vt(()=>{const P=n(a)?.id;P&&!n(s).rows.some(A=>A.id===P)&&q(a,null)});function l(P){Np(P.target)}function c(P,A){const H=$u(P,A);H&&(q(a,null),q(i,""),jt(ws(H)))}function u(P){if(P.flowFrom){if(n(a)===null){q(a,{id:P.id,name:P.flowFrom},!0),q(i,""),queueMicrotask(()=>n(o)?.focus());return}if(n(a).id===P.id){q(a,null);return}c(n(a).name,P.flowFrom)}}function v(P){P.key==="Escape"&&(P.preventDefault(),q(a,null))}var p=S7(),f=d(p),g=d(f),_=d(g);Ne(_,{name:"bookmark"});var x=h(g,4),k=d(x),C=h(f,2);{var T=P=>{var A=w7(),H=d(A),L=d(H),E=h(H,4);Ut(E,B=>q(o,B),()=>n(o));var y=h(E,2),O=d(y);Ne(O,{name:"workflow"});var N=h(y,2);I(B=>{w(L,n(a).name),se(E,"aria-label",`The symbol ${n(a).name} should reach`),y.disabled=B},[()=>$u(n(a).name,n(i))===null]),xe("keydown",E,v),ft("keypress",E,B=>{B.key==="Enter"&&n(a)&&c(n(a).name,n(i))}),Wd(E,()=>n(i),B=>q(i,B)),xe("click",y,()=>n(a)&&c(n(a).name,n(i))),xe("click",N,()=>q(a,null)),m(P,A)};F(C,P=>{n(a)&&P(T)})}var M=h(C,2),z=d(M);jp(z,{hideWhenEmpty:!1});var R=h(M,2);{var D=P=>{var A=ch(),H=d(A);I(()=>w(H,`Could not read the entry points — ${qt.entriesFailure??""}`)),m(P,A)},V=P=>{var A=x7(),H=d(A),L=d(H);Ne(L,{name:"refresh-cw",size:14}),m(P,A)},X=P=>{var A=ch(),H=d(A);I(()=>w(H,n(s).empty)),m(P,A)},j=P=>{var A=k7();ke(A,21,()=>n(s).sections,H=>H.id,(H,L)=>{{let E=b(()=>n(a)?.id??null);b7(H,{get section(){return n(L)},get armed(){return n(E)},onopen:l,onflow:u})}}),m(P,A)};F(R,P=>{qt.entriesFailure?P(D):qt.entriesSettled?n(s).empty?P(X,2):P(j,-1):P(V,1)})}I(()=>w(k,`Where a flow starts${r()?` in ${r()}`:""} — every list below is read out of the + graph, not guessed from a filename. Open a row to read the code, or use `)),m(e,p),Ke()}St(["keydown","click"]);const M7="No static reference in the index — dynamic use is possible.";function Pm(e,t){return e===1?t:`${t}s`}function C7(e){if(!e)return"";const{rows:t}=e;if(t.total===0)return"Nothing on this list.";const r=e.groups.reduce((a,i)=>a+i.lines,0);return`${t.truncated?`${t.shown} of ${t.total} ${Pm(t.total,"symbol")}`:bt(t.total,"symbol")} in ${bt(e.groups.length,"file")} · ${bt(r,"line")}`}function T7(e){return!e||e.candidates===0?"":`${e.candidates.toLocaleString()} ${Pm(e.candidates,"symbol")} in this index carry no incoming reference at all; ${e.excludedTotal.toLocaleString()} of them were left off this list.`}function I7(e){return e?e.excluded.map(t=>`${t.count.toLocaleString()} ${t.label}`):[]}function A7(e){const t=[Xd(e.kind),bt(e.lines,"line")];return e.members.total>0&&t.push(`${bt(e.members.total,"member")} unreachable with it`),t.join(" · ")}function N7(e){const t=[bt(e.rows.length,"symbol"),bt(e.lines,"line")];return e.generated&&t.push("generated"),t.join(" · ")}function z7(e){return e.candidates===0?"Every symbol in this index is referenced by something. Nothing to show.":e.includeExported?`Every one of the ${e.candidates.toLocaleString()} symbols with no incoming reference has a reason to be reachable anyway — see the list of exclusions below.`:`All ${e.candidates.toLocaleString()} symbols with no incoming reference are either reachable from outside this repository or excluded for the reasons below. Turn on "including exported" to see the ones the index cannot check.`}var dh=S('

      '),P7=S('
      Reading the graph…
      '),L7=S(`

      Exported symbols are on this list. Nothing in this repository references them, but anything + outside it can — a published package, another service, a script. Read each one before you + believe it.

      `),O7=S('exported'),q7=S(' '),D7=S(' '),R7=S('
      '),H7=S(''),j7=S(''),F7=S('

      ',1),B7=S('

      '),V7=S(" ",1),W7=S('
      symbols carry no incoming reference at all
      '),K7=S('

      '),Y7=S('
      '),X7=S('
      Why they were left off
      ',1),G7=S(`

      The rows were not checked against the text of the files that can reach them, so a + reference the extractor did not record would not have been caught.

      `),Z7=S(`

      The scan stopped at its cap — this index holds more unreferenced symbols than were + considered.

      `),U7=S("
    • "),Q7=S("
        "),J7=S(`

        Every rule removes a symbol something could still reach. What remains has no static + reference — not proof that it is unused.

        `,1),$7=S('

        Dead code

        symbols nothing in the index reaches · largest first · grouped by file

        macros, trait objects and reflection leave no edge

        ');function eI(e,t){We(t,!0);let r=Ie(t,"exported",3,!1),s=he(null),a=he(null),i=he(!0);vt(()=>{const Y=r();An.indexTick;const J=new AbortController;return q(i,!0),q(a,null),n0({includeExported:Y},J.signal).then(G=>{q(s,G,!0),q(i,!1)}).catch(G=>{J.signal.aborted||(q(a,G instanceof rr?G.message:"The list could not be read.",!0),q(i,!1))}),()=>J.abort()});let o=b(()=>C7(n(s))),l=b(()=>T7(n(s))),c=b(()=>I7(n(s))),u=b(()=>Math.max(1,...(n(s)?.groups??[]).flatMap(Y=>Y.rows.map(J=>J.lines)))),v=b(()=>Math.max(1,...(n(s)?.excluded??[]).map(Y=>Y.count))),p=b(()=>n(s)&&n(s).candidates>0?100*n(s).rows.total/n(s).candidates:0);function f(Y){jt(pn(Y.id,{line:Y.line}))}var g=$7(),_=d(g),x=d(_),k=d(x),C=d(k);Ne(C,{name:"ghost"});var T=h(k,4),M=d(T);let z;var R=h(M,2);let D;var V=h(x,2),X=d(V);Ne(X,{name:"circle-alert"});var j=h(X),P=d(j),A=h(V,2);{var H=Y=>{var J=dh(),G=d(J);I(()=>w(G,`Could not read the list — ${n(a)??""}`)),m(Y,J)},L=Y=>{var J=P7(),G=d(J),ee=d(G);Ne(ee,{name:"refresh-cw",size:14}),m(Y,J)},E=Y=>{var J=V7(),G=_e(J);{var ee=ne=>{var re=L7(),Q=d(re);Ne(Q,{name:"triangle-alert"}),m(ne,re)};F(G,ne=>{r()&&ne(ee)})}var oe=h(G,2);{var ge=ne=>{var re=dh(),Q=d(re);I(K=>w(Q,K),[()=>z7(n(s))]),m(ne,re)},U=ne=>{var re=F7(),Q=_e(re),K=d(Q),Z=h(Q,2);ke(Z,21,()=>n(s).groups,ce=>ce.file,(ce,te)=>{var ie=j7();let ve;var fe=d(ie),pe=d(fe);Ne(pe,{name:"folder",size:14});var ye=h(pe,2),Pe=d(ye),de=h(ye,2),be=d(de),Ee=h(fe,2);ke(Ee,17,()=>n(te).rows,Ge=>Ge.id,(Ge,me)=>{var ze=H7(),De=d(ze);Lt(De,{get kind(){return n(me).kind},size:22});var Le=h(De,2),Ze=d(Le),Re=d(Ze),ue=d(Re),le=h(Re,2),we=d(le),Ce=h(le,2);{var $e=Se=>{var Ae=O7();m(Se,Ae)};F(Ce,Se=>{n(me).exported&&Se($e)})}var Oe=h(Ze,2),at=d(Oe),wt=h(Oe,2);{var Mt=Se=>{var Ae=R7(),je=d(Ae);ke(je,17,()=>n(me).members.items,Ue=>Ue.id,(Ue,Ye)=>{var He=q7(),Xe=d(He);I(Qe=>{se(He,"href",Qe),w(Xe,n(Ye).name)},[()=>pn(n(Ye).id)]),m(Ue,He)});var Fe=h(je,2);{var Me=Ue=>{var Ye=D7(),He=d(Ye);I(()=>w(He,`+${n(me).members.total-n(me).members.shown} more`)),m(Ue,Ye)};F(Fe,Ue=>{n(me).members.truncated&&Ue(Me)})}m(Se,Ae)};F(wt,Se=>{n(me).members.items.length>0&&Se(Mt)})}var Tt=h(Le,2),ct=d(Tt);let pt;I((Se,Ae,je,Fe)=>{se(Re,"title",n(me).qualifiedName),se(Re,"data-dead-row",n(me).id),w(ue,n(me).name),se(le,"href",Se),w(we,`${Ae??""}:${n(me).line??""}`),w(at,je),se(Tt,"title",`${n(me).lines} lines`),pt=rt(ct,"",pt,Fe)},[()=>rn(n(te).file,{source:!0,line:n(me).line}),()=>n(me).file.slice(n(me).file.lastIndexOf("/")+1),()=>A7(n(me)),()=>({width:`${Math.max(3,Math.round(100*n(me).lines/n(u)))}%`})]),xe("click",Re,()=>f(n(me))),m(Ge,ze)}),I((Ge,me)=>{ve=qe(ie,1,"filegroup svelte-186vr2",null,ve,{gen:n(te).generated}),se(ye,"href",Ge),se(ye,"title",n(te).file),w(Pe,n(te).file),w(be,me)},[()=>rn(n(te).file),()=>N7(n(te))]),m(ce,ie)}),I(()=>w(K,n(o))),m(ne,re)};F(oe,ne=>{n(s).groups.length===0?ne(ge):ne(U,-1)})}var $=h(oe,2);{var ae=ne=>{var re=B7(),Q=d(re);I(()=>w(Q,`Showing ${n(s).rows.shown??""} of ${n(s).rows.total??""} — the rest are in the index, not on + this list.`)),m(ne,re)};F($,ne=>{n(s).rows.truncated&&ne(ae)})}m(Y,J)};F(A,Y=>{n(a)?Y(H):n(i)&&n(s)===null?Y(L,1):n(s)&&Y(E,2)})}var y=h(_,2),O=d(y),N=d(O);Ne(N,{name:"eye-off"});var B=h(O,2);{var W=Y=>{var J=J7(),G=_e(J);{var ee=ie=>{var ve=W7(),fe=d(ve),pe=d(fe),ye=d(pe),Pe=h(fe,2),de=d(Pe);let be;var Ee=h(Pe,2),Ge=d(Ee),me=h(d(Ge)),ze=h(Ge,2),De=h(d(ze));I((Le,Ze,Re,ue)=>{w(ye,Le),be=rt(de,"",be,Ze),w(me,`${Re??""} listed`),w(De,`${ue??""} left off`)},[()=>n(s).candidates.toLocaleString(),()=>({width:`${Math.max(1,n(p))}%`}),()=>n(s).rows.total.toLocaleString(),()=>n(s).excludedTotal.toLocaleString()]),m(ie,ve)},oe=ie=>{var ve=K7(),fe=d(ve);I(()=>w(fe,n(l)||"Every symbol in this index is referenced by something.")),m(ie,ve)};F(G,ie=>{n(s).candidates>0?ie(ee):ie(oe,-1)})}var ge=h(G,2);{var U=ie=>{var ve=X7(),fe=h(_e(ve),2);ke(fe,17,()=>n(s).excluded,pe=>pe.reason,(pe,ye)=>{var Pe=Y7(),de=d(Pe),be=d(de),Ee=h(de,2),Ge=d(Ee),me=h(Ee,2),ze=d(me);let De;I((Le,Ze)=>{w(be,n(ye).label),w(Ge,Le),De=rt(ze,"",De,Ze)},[()=>n(ye).count.toLocaleString(),()=>({width:`${Math.max(2,Math.round(100*n(ye).count/n(v)))}%`})]),m(pe,Pe)}),m(ie,ve)};F(ge,ie=>{n(s).excluded.length>0&&ie(U)})}var $=h(ge,2);{var ae=ie=>{var ve=G7();m(ie,ve)};F($,ie=>{n(s).corroborated||ie(ae)})}var ne=h($,2);{var re=ie=>{var ve=Z7();m(ie,ve)};F(ne,ie=>{n(s).bounded&&ie(re)})}var Q=h(ne,4),K=d(Q),Z=d(K),ce=h(K,2);{var te=ie=>{var ve=Q7();ke(ve,20,()=>n(c),fe=>fe,(fe,pe)=>{var ye=U7(),Pe=d(ye);I(()=>w(Pe,pe)),m(fe,ye)}),m(ie,ve)};F(ce,ie=>{n(c).length>0&&ie(te)})}I(()=>w(Z,n(l))),m(Y,J)};F(B,Y=>{n(s)&&Y(W)})}I((Y,J)=>{se(M,"aria-checked",!r()),se(M,"href",Y),z=qe(M,1,"svelte-186vr2",null,z,{on:!r()}),se(R,"aria-checked",r()),se(R,"href",J),D=qe(R,1,"svelte-186vr2",null,D,{on:r()}),w(P,M7)},[()=>ra({exported:!1}),()=>ra({exported:!0})]),xe("click",M,Y=>{Y.preventDefault(),jt(ra({exported:!1}))}),xe("click",R,Y=>{Y.preventDefault(),jt(ra({exported:!0}))}),m(e,g),Ke()}St(["click"]);var tI=S('

        No such view

        does not match a view. Try the start.

        ');function nI(e,t){var r=tI(),s=d(r),a=h(d(s),2),i=d(a),o=d(i);I(()=>w(o,`#${t.path??""}`)),m(e,r)}var rI=S('
        '),sI=S('
        ');function aI(e,t){We(t,!1),Yd();var r=sI(),s=d(r);{var a=i=>{var o=rI(),l=d(o);I(()=>w(l,Hn.message)),m(i,o)};F(s,i=>{Hn.message&&i(a)})}m(e,r),Ke()}var oI=S('
        ',1);function iI(e,t){We(t,!0),vt(()=>{Qn.ensure()}),vt(()=>{An.start()});let r=An.indexTick;vt(()=>{const y=An.indexTick;nn(()=>{y!==r&&(r=y,Qn.reload(),qt.reloadEntries(),Dt.reload(),Hn.show("Index updated · reloaded"))})});let s=he(null),a=dd.searchTick;vt(()=>{const y=dd.searchTick;nn(()=>{y!==a&&(a=y,n(s)?.focusSearch())})});let i=he(!1);vt(()=>{sa.route,nn(()=>q(i,!1))});let o=b(()=>sa.route),l=b(()=>(Qn.stats?.graph.edgesByKind.navigates??0)>0);vt(()=>{const y=sa.route,O=sa.params.get("t");nn(()=>{Wt.hydrate(O),y.view==="symbol"&&y.id!==null&&Wt.current?.id!==y.id&&Wt.push({id:y.id})})}),vt(()=>{Wt.hops.length,iy()});function c(y){return y instanceof HTMLElement?y.isContentEditable||y instanceof HTMLInputElement||y instanceof HTMLTextAreaElement||y instanceof HTMLSelectElement:!1}function u(y){if(!y.defaultPrevented){if((y.metaKey||y.ctrlKey)&&y.key.toLowerCase()==="k"){y.preventDefault(),n(s)?.focusSearch();return}if(!(y.metaKey||y.ctrlKey||y.altKey)&&!c(y.target))switch(y.key){case"/":y.preventDefault(),n(s)?.focusSearch();break;case"m":y.preventDefault(),jt(ua());break;case"f":y.preventDefault(),jt(ws());break;case"e":y.preventDefault(),jt(Zd());break;case"s":y.preventDefault(),jt(Ap());break;case"d":y.preventDefault(),jt(ra());break;case"Backspace":case"[":y.preventDefault(),sy();break}}}var v=oI();ft("keydown",cn,u);var p=_e(v);Dy(p,{get hasScreens(){return n(l)}});var f=h(p,2);Ut(wy(f,{get project(){return Qn.name},onmore:()=>q(i,!0)}),y=>q(s,y,!0),()=>n(s));var g=h(f,2);hb(g,{});var _=h(g,2),x=d(_);{var k=y=>{$2(y,{get id(){return n(o).id},get line(){return n(o).line}})},C=y=>{Sk(y,{get path(){return n(o).path},get line(){return n(o).line}})},T=y=>{Cx(y,{get path(){return n(o).path},get line(){return n(o).line}})},M=y=>{W6(y,{get root(){return n(o).root},get depth(){return n(o).depth},get tests(){return n(o).tests}})},z=y=>{d7(y,{get from(){return n(o).from},get to(){return n(o).to},get symbols(){return n(o).symbols},get trailParam(){return n(o).trail}})},R=y=>{E7(y,{get project(){return Qn.name}})},D=y=>{q9(y,{})},V=y=>{xT(y,{get anchor(){return n(o).anchor},get symbol(){return n(o).symbol},get depth(){return n(o).depth},get through(){return n(o).through},get reading(){return n(o).reading}})},X=y=>{eI(y,{get exported(){return n(o).exported}})},j=y=>{nI(y,{get path(){return n(o).path}})},P=y=>{Zb(y,{get project(){return Qn.name}})};F(x,y=>{n(o).view==="symbol"&&n(o).id!==null?y(k):n(o).view==="file"&&n(o).source?y(C,1):n(o).view==="file"?y(T,2):n(o).view==="map"?y(M,3):n(o).view==="flow"?y(z,4):n(o).view==="entry"?y(R,5):n(o).view==="screens"||n(o).view==="home"&&n(l)?y(D,6):n(o).view==="steps"?y(V,7):n(o).view==="dead"?y(X,8):n(o).view==="unknown"?y(j,9):y(P,-1)})}var A=h(_,2);jy(A,{get hasScreens(){return n(l)},get moreOpen(){return n(i)},onmore:()=>q(i,!n(i))});var H=h(A,2);{var L=y=>{Vy(y,{get hasScreens(){return n(l)},onclose:()=>q(i,!1)})};F(H,y=>{n(i)&&y(L)})}var E=h(H,2);aI(E,{}),m(e,v),Ke()}A_();const Lm=document.getElementById("app");if(!Lm)throw new Error("codegraph ui: #app host element is missing from index.html");s_(iI,{target:Lm}); diff --git a/crates/codegraph-ui/viewer/assets/inter-cyrillic-ext-wght-normal-BOeWTOD4.woff2 b/crates/codegraph-ui/viewer/assets/inter-cyrillic-ext-wght-normal-BOeWTOD4.woff2 new file mode 100644 index 0000000..de83a9c Binary files /dev/null and b/crates/codegraph-ui/viewer/assets/inter-cyrillic-ext-wght-normal-BOeWTOD4.woff2 differ diff --git a/crates/codegraph-ui/viewer/assets/inter-cyrillic-wght-normal-DqGufNeO.woff2 b/crates/codegraph-ui/viewer/assets/inter-cyrillic-wght-normal-DqGufNeO.woff2 new file mode 100644 index 0000000..d750914 Binary files /dev/null and b/crates/codegraph-ui/viewer/assets/inter-cyrillic-wght-normal-DqGufNeO.woff2 differ diff --git a/crates/codegraph-ui/viewer/assets/inter-greek-ext-wght-normal-DlzME5K_.woff2 b/crates/codegraph-ui/viewer/assets/inter-greek-ext-wght-normal-DlzME5K_.woff2 new file mode 100644 index 0000000..6e7141f Binary files /dev/null and b/crates/codegraph-ui/viewer/assets/inter-greek-ext-wght-normal-DlzME5K_.woff2 differ diff --git a/crates/codegraph-ui/viewer/assets/inter-greek-wght-normal-CkhJZR-_.woff2 b/crates/codegraph-ui/viewer/assets/inter-greek-wght-normal-CkhJZR-_.woff2 new file mode 100644 index 0000000..024f077 Binary files /dev/null and b/crates/codegraph-ui/viewer/assets/inter-greek-wght-normal-CkhJZR-_.woff2 differ diff --git a/crates/codegraph-ui/viewer/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2 b/crates/codegraph-ui/viewer/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2 new file mode 100644 index 0000000..479d010 Binary files /dev/null and b/crates/codegraph-ui/viewer/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2 differ diff --git a/crates/codegraph-ui/viewer/assets/inter-latin-wght-normal-Dx4kXJAl.woff2 b/crates/codegraph-ui/viewer/assets/inter-latin-wght-normal-Dx4kXJAl.woff2 new file mode 100644 index 0000000..d15208d Binary files /dev/null and b/crates/codegraph-ui/viewer/assets/inter-latin-wght-normal-Dx4kXJAl.woff2 differ diff --git a/crates/codegraph-ui/viewer/assets/inter-vietnamese-wght-normal-CBcvBZtf.woff2 b/crates/codegraph-ui/viewer/assets/inter-vietnamese-wght-normal-CBcvBZtf.woff2 new file mode 100644 index 0000000..a40c469 Binary files /dev/null and b/crates/codegraph-ui/viewer/assets/inter-vietnamese-wght-normal-CBcvBZtf.woff2 differ diff --git a/crates/codegraph-ui/viewer/assets/jetbrains-mono-cyrillic-ext-wght-normal-EocZY2iu.woff2 b/crates/codegraph-ui/viewer/assets/jetbrains-mono-cyrillic-ext-wght-normal-EocZY2iu.woff2 new file mode 100644 index 0000000..8d83f99 Binary files /dev/null and b/crates/codegraph-ui/viewer/assets/jetbrains-mono-cyrillic-ext-wght-normal-EocZY2iu.woff2 differ diff --git a/crates/codegraph-ui/viewer/assets/jetbrains-mono-cyrillic-wght-normal-D73BlboJ.woff2 b/crates/codegraph-ui/viewer/assets/jetbrains-mono-cyrillic-wght-normal-D73BlboJ.woff2 new file mode 100644 index 0000000..8ee2d70 Binary files /dev/null and b/crates/codegraph-ui/viewer/assets/jetbrains-mono-cyrillic-wght-normal-D73BlboJ.woff2 differ diff --git a/crates/codegraph-ui/viewer/assets/jetbrains-mono-greek-wght-normal-Bw9x6K1M.woff2 b/crates/codegraph-ui/viewer/assets/jetbrains-mono-greek-wght-normal-Bw9x6K1M.woff2 new file mode 100644 index 0000000..6084d39 Binary files /dev/null and b/crates/codegraph-ui/viewer/assets/jetbrains-mono-greek-wght-normal-Bw9x6K1M.woff2 differ diff --git a/crates/codegraph-ui/viewer/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2 b/crates/codegraph-ui/viewer/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2 new file mode 100644 index 0000000..01769d9 Binary files /dev/null and b/crates/codegraph-ui/viewer/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2 differ diff --git a/crates/codegraph-ui/viewer/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2 b/crates/codegraph-ui/viewer/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2 new file mode 100644 index 0000000..cd5102a Binary files /dev/null and b/crates/codegraph-ui/viewer/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2 differ diff --git a/crates/codegraph-ui/viewer/assets/jetbrains-mono-vietnamese-wght-normal-Bt-aOZkq.woff2 b/crates/codegraph-ui/viewer/assets/jetbrains-mono-vietnamese-wght-normal-Bt-aOZkq.woff2 new file mode 100644 index 0000000..b6a3fa1 Binary files /dev/null and b/crates/codegraph-ui/viewer/assets/jetbrains-mono-vietnamese-wght-normal-Bt-aOZkq.woff2 differ diff --git a/crates/codegraph-ui/viewer/index.html b/crates/codegraph-ui/viewer/index.html index 4f809bb..c49f9ca 100644 --- a/crates/codegraph-ui/viewer/index.html +++ b/crates/codegraph-ui/viewer/index.html @@ -7,8 +7,8 @@ CodeGraph - - + +
        diff --git a/docs/ui.md b/docs/ui.md index d1bf9a9..0d07792 100644 --- a/docs/ui.md +++ b/docs/ui.md @@ -6,8 +6,9 @@ outline and imports, the call path between two symbols, the repository as a map of modules, a type's hierarchy, the code nothing reaches, and the places to start reading an unfamiliar project. It is a Rust port of the upstream colbymchenry/codegraph `v1.6.1` viewer: the frontend is upstream's `ui/` (Svelte -5 + Vite, MIT, see [`ui/LICENSE`](../ui/LICENSE)) and the JSON API behind it is -the `codegraph-ui` crate. +5 + Vite, MIT, see [`ui/LICENSE`](../ui/LICENSE)), restyled to the selected +design ([`design/viewer-d.md`](design/viewer-d.md), direction D) with a dark and +a light theme, and the JSON API behind it is the `codegraph-ui` crate. The viewer is a **preview**, gated exactly as upstream gates it: unless `CODEGRAPH_UI=1` is set, `ui`, its alias `web`, `help ui` and `ui --help` are @@ -142,10 +143,66 @@ the Rust graph holds different facts, the viewer shows what this index holds: - The bundle is embedded in the binary, so upstream's `CODEGRAPH_VIEWER_PATH` has no counterpart. +## Look and themes + +The viewer is drawn in direction D of [`design/viewer-d.md`](design/viewer-d.md): +an icon nav rail on the left, a command bar with the `⌘K` / `Ctrl+K` search +palette, the trail ribbon under it while a trail exists, and each view as +rounded islands 8 px apart. Below 1024 px wide the rail narrows and the Symbol +view's Called by rail becomes a drawer behind a header button; below 600 px a +bottom tab bar (Start, Map, Symbol, Flow, More) replaces the rail, the Symbol +view shows one pane at a time (Code, Called by, Calls), and tapping a call in +the code opens a sheet with that line's calls. + +There are two themes with the same token names: **Nebula** (dark, §3.1 of the +spec) and **Daylight** (light, §3.6). The viewer follows the operating system's +`prefers-color-scheme` until the reader picks one: the theme control — System, +Dark, Light — sits in the nav rail's foot on desktop and tablet and in the More +sheet on the phone. The choice is stored in the browser's `localStorage` under +`codegraph-ui.theme` and applied as `data-theme` on the page; System removes +it. Copy image and Download SVG on the Flow and Map views paint the theme on +screen. `ui/tests/theme-contrast.test.ts` reads both token sets out of +`ui/src/lib/theme.css` and fails if any pair the spec declares falls below +4.5:1. + +Interface text is set in Inter, code and names in JetBrains Mono, both bundled +(OFL) so the viewer never fetches a font; ligatures are off, so `->` reads as +written. The icons are Lucide (ISC) geometry, copied into +`ui/src/lib/icons.ts` with its notice. + +### Direction D as built — 偏离(画板 vs 落地,供 owner 复核) + +| item | board | landed | +| ------------------------ | ---------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| project switch | name, chevron and a `main · ` branch pill | the name alone: one project per viewer, and the API carries no git branch | +| rail foot | keyboard and settings | the theme switch above them; keyboard opens the shortcut sheet, settings a panel of what this viewer reads (port, read-only and watching are command-line choices) | +| Saved trails destination | a trails screen | opens Entry points, which lists saved trails first | +| Start, entry card | "Entry functions" with Flow buttons | "Where it starts" — routes when the project is routed, else the files that run something at their top level — opening the row; a flow starts from Entry points | +| Flow | 190 × 168 step cards and a step-detail panel | upstream's cards opened at each call window, restyled; Every hop table below; its Runs when column reads "—" until conditions are ported | +| Map toolbar | zoom readout and an Include tests switch | the zoom controls; Include tests lives in the inspector's View section; Open crate is Open first file | +| Map key | the one-line legend | the same, opening to upstream's full key on request (upstream opened the full key by default) | +| File, This file | edges in and out, prod and test files | how many files depend on it and it on them, its symbols, its size — no edge totals in the payload | +| hierarchy | a supertrait outside the index drawn at 50 % | not drawn: the payload carries no outside-index supertypes | +| code lines | a long line ends in `…` | a long line scrolls sideways, as upstream's did | +| trail hops | qualified names | the symbol's name, as upstream labels a hop | +| SVG export | — (upstream: always light) | the theme on screen | +| ligatures | the boards show `->` as an arrow | off (§13 left it open; source fidelity decides) | +| tablet Symbol | blast radius as two stat tiles under the code | the four tiles stay at the foot of the Called by drawer | + +Layout constants the components measure against moved with the design; the +suites pin them by name: hierarchy rows 24 → 26 and indent 22 → 28; file +outline rows at a 30 px pitch; map nodes 40 → 52 high, layers 74 → 44 and boxes +34 → 28 apart; callee rows 34 → 44 high with a 52 px pitch. Character advances +were re-measured in Chrome against the bundled fonts: the map label (12 px +JetBrains Mono 500) 7.81 → 7.2, the map meta line (11 px Inter) 5.9 → 5.5, the +flow link label (11 px mono) 6.65 → 6.6, the Screens pill (10.5 px mono) 6.3, +unchanged. + ## Developing the frontend The frontend lives in `ui/` with its own pinned dependencies and a committed -`ui/package-lock.json`; `npm ci` is the only install path. `npm run build` writes +`ui/package-lock.json`; `npm ci` is the only install path. `npm run build` (or +`make ui`, which runs `npm ci` first) writes the production bundle into `crates/codegraph-ui/viewer/`, which the crate's `build.rs` embeds at compile time, so `cargo build` and `cargo install --git` never need Node. The bundle is committed, and `make ui-check` (the CI `UI` job) diff --git a/docs/upstream-sync/UPSTREAM.md b/docs/upstream-sync/UPSTREAM.md index 9756240..f29c605 100644 --- a/docs/upstream-sync/UPSTREAM.md +++ b/docs/upstream-sync/UPSTREAM.md @@ -148,6 +148,21 @@ below remain immutable historical evidence. ## Sync log +### 2026-10-03 — browser viewer RESTYLED: direction D, a local design layer + +The ported viewer's frontend now carries the design the owner selected +([`../design/viewer-d.md`](../design/viewer-d.md), direction D) on top of the +`v1.6.1` import: tokens, type, shell, view layouts, states, responsive layouts +and a second, light token set (§3.6). This is codegraph-rs's own design, not an +upstream change: the wire contract, the routes and the server are untouched, and +the frontend's models keep upstream's behaviour — only the layout constants the +components measure against moved, each pinned by name in the suites. + +A later sync of upstream `ui/` therefore re-applies this layer rather than +taking upstream's paper/ink look. The visual differences from the boards, and +from upstream where they matter, are listed in [`../ui.md`](../ui.md) under +"Direction D as built". + ### 2026-10-02 — browser viewer PORTED: UI family phase 1 (`codegraph ui`, `CODEGRAPH_UI=1`) The viewer upstream ships in `v1.6.1` — `src/ui-server/**` (the loopback JSON diff --git a/ui/README.md b/ui/README.md index 5f5dd18..e1168e3 100644 --- a/ui/README.md +++ b/ui/README.md @@ -1,5 +1,13 @@ # ui/ — the `codegraph ui` viewer, and `@colbymchenry/codegraph-ui` +> **In codegraph-rs.** This tree was imported from upstream colbymchenry/codegraph +> `v1.6.1` and is built here by `make ui` into `crates/codegraph-ui/viewer/`, +> which the Rust binary embeds — see [`../docs/ui.md`](../docs/ui.md), the +> canonical reference. Its look is direction D +> ([`../docs/design/viewer-d.md`](../docs/design/viewer-d.md)) with a dark and a +> light theme. The build, packaging and release passages below describe +> upstream's npm monorepo, not this repository. + One source tree, two builds. - **The app** — the browser reader for an indexed project: Svelte 5 + Vite, @@ -16,8 +24,9 @@ each other in a review. An npm workspace of the engine, so `npm ci` at the repo root installs the toolchain for both. -Design spec (every token, size and measurement): -`../docs/design/codegraph-ui-design-spec.md`. +Design spec (every token, size and measurement): upstream's +`docs/design/codegraph-ui-design-spec.md`; in codegraph-rs, +[`../docs/design/viewer-d.md`](../docs/design/viewer-d.md). ## Build @@ -133,7 +142,7 @@ the screen is explained rather than silently missing. context, so one page reads one project. `` installs them during initialisation, once — swapping projects means re-mounting the subtree (`{#key project}`), not swapping the prop. -3. **Geometry is not themable.** 34px rail rows, the 300/320px rails, the 20px +3. **Geometry is not themable.** 44px callee rows, the 288/320px rails, the 20px code line: the Symbol view measures these against each other to put a callee row beside the line that calls it. Colour and type are yours. @@ -191,21 +200,22 @@ src/ lib/export-image.ts rasterising that SVG to PNG, clipboard and download lib/live.svelte.ts /api/events: two counters every screen refreshes from lib/toast.svelte.ts the one transient note ("Index updated · reloaded") - components/ TopBar, TrailBar, SavedTrails, KindGlyph, DriftBanner, Toast, ExportButtons, map/, flow/, symbol/, file/, entry/, screens/ + components/ NavRail, TopBar (the command bar), TrailBar, PhoneTabBar, MoreSheet, SavedTrails, KindGlyph, Icon, DriftBanner, ErrorCard, Toast, ExportButtons, map/, flow/, symbol/, file/, entry/, screens/ views/ one component per route ``` -Fonts (Archivo Variable, IBM Plex Mono) are vendored through `@fontsource*` and -emitted into `dist/viewer/assets`: a local reader must work offline and must not -announce the project to a font CDN. +Fonts (Inter and JetBrains Mono, both variable) are vendored through +`@fontsource-variable` and emitted with the bundle's assets — never inlined, so +the server's `font-src 'self'` policy holds: a local reader must work offline +and must not announce the project to a font CDN. ## Export The Flow strip's header and the Map's side panel carry **Copy image** (a PNG on the clipboard) and **Download SVG** (a file for a README). Both render the -**light** theme whatever the viewer is set to — an image is read on somebody -else's screen — with 24px of paper around the drawing, a caption naming the path -or the root, and a "CodeGraph" mark in the corner. +theme on screen (light when the exporter is called without one), with 24px of +paper around the drawing, a caption naming the path or the root, and a +"CodeGraph" mark in the corner. `export-svg.ts` **serialises the layout object**; it does not scrape the DOM. `buildFlowLayout` and `buildMapLayout` already compute every rectangle, port and @@ -217,7 +227,7 @@ will render in a README. Fonts travel as `font-family` stacks rather than embedded bytes. An SVG loaded as an image may not fetch a webfont, so a raster falls back to the platform's -own monospace; every fallback in the stack advances at ~0.6em like IBM Plex +own monospace; every fallback in the stack advances at ~0.6em like JetBrains Mono, so the code grid survives and only the letterforms change. ## Routes diff --git a/ui/package-lock.json b/ui/package-lock.json index 2e6258a..7200e56 100644 --- a/ui/package-lock.json +++ b/ui/package-lock.json @@ -12,8 +12,8 @@ "@xyflow/svelte": "1.6.5" }, "devDependencies": { - "@fontsource-variable/archivo": "5.3.0", - "@fontsource/ibm-plex-mono": "5.3.0", + "@fontsource-variable/inter": "5.3.0", + "@fontsource-variable/jetbrains-mono": "5.3.0", "@sveltejs/vite-plugin-svelte": "6.2.4", "@types/node": "20.19.33", "jsdom": "25.0.1", @@ -598,20 +598,20 @@ "node": ">=18" } }, - "node_modules/@fontsource-variable/archivo": { + "node_modules/@fontsource-variable/inter": { "version": "5.3.0", - "resolved": "https://registry.npmmirror.com/@fontsource-variable/archivo/-/archivo-5.3.0.tgz", - "integrity": "sha512-HogK8FJelrD1o7TlZlkIVtHgc20bO5PZRWE7mUeUTdMN055alznQV6/00J00IBeu8FQAH4s3zW9UJNvKExXf+g==", + "resolved": "https://registry.npmmirror.com/@fontsource-variable/inter/-/inter-5.3.0.tgz", + "integrity": "sha512-OupL48va4JNofb97w6NYeF9S7W/kHNKM0Er8Dem5nqi4jeOLrVJDoE8tZEpnMJmtkvNbB1EIPPwHcdkF6b1oUA==", "dev": true, "license": "OFL-1.1", "funding": { "url": "https://github.com/sponsors/ayuhito" } }, - "node_modules/@fontsource/ibm-plex-mono": { + "node_modules/@fontsource-variable/jetbrains-mono": { "version": "5.3.0", - "resolved": "https://registry.npmmirror.com/@fontsource/ibm-plex-mono/-/ibm-plex-mono-5.3.0.tgz", - "integrity": "sha512-eTgnZjZEGk1QtD3ZstF+Vclo2HLAni8YMy34/DxllwZvyz1lR/1RF/xTiAquOBO7MvqBx8D2Ig2WCPMVfdZu7Q==", + "resolved": "https://registry.npmmirror.com/@fontsource-variable/jetbrains-mono/-/jetbrains-mono-5.3.0.tgz", + "integrity": "sha512-F32xpS2NsGYoQi2ADSkKTgpJj7ozajsGgDJ8woTnqjmIB+dxDIqImjl4pXZVEExu8UFZ2ndhmX18EBS/hdz3Lw==", "dev": true, "license": "OFL-1.1", "funding": { diff --git a/ui/package.json b/ui/package.json index db1f719..99370bd 100644 --- a/ui/package.json +++ b/ui/package.json @@ -30,8 +30,8 @@ "@xyflow/svelte": "1.6.5" }, "devDependencies": { - "@fontsource-variable/archivo": "5.3.0", - "@fontsource/ibm-plex-mono": "5.3.0", + "@fontsource-variable/inter": "5.3.0", + "@fontsource-variable/jetbrains-mono": "5.3.0", "@sveltejs/vite-plugin-svelte": "6.2.4", "@types/node": "20.19.33", "jsdom": "25.0.1", diff --git a/ui/src/App.svelte b/ui/src/App.svelte index ba7d829..5e69810 100644 --- a/ui/src/App.svelte +++ b/ui/src/App.svelte @@ -1,6 +1,9 @@ + + + + + + diff --git a/ui/src/components/DriftBanner.svelte b/ui/src/components/DriftBanner.svelte index 5a44021..b158925 100644 --- a/ui/src/components/DriftBanner.svelte +++ b/ui/src/components/DriftBanner.svelte @@ -1,18 +1,19 @@
        - + {file} changed on disk after the last index sync — {@render children()}
        diff --git a/ui/src/components/ErrorCard.svelte b/ui/src/components/ErrorCard.svelte new file mode 100644 index 0000000..b88630f --- /dev/null +++ b/ui/src/components/ErrorCard.svelte @@ -0,0 +1,76 @@ + + + + + + diff --git a/ui/src/components/ExportButtons.svelte b/ui/src/components/ExportButtons.svelte index ca698c6..4289a73 100644 --- a/ui/src/components/ExportButtons.svelte +++ b/ui/src/components/ExportButtons.svelte @@ -12,6 +12,7 @@ until it is pressed. -->
        - - +
        diff --git a/ui/src/components/Icon.svelte b/ui/src/components/Icon.svelte new file mode 100644 index 0000000..740a600 --- /dev/null +++ b/ui/src/components/Icon.svelte @@ -0,0 +1,67 @@ + + + + + + + diff --git a/ui/src/components/KindGlyph.svelte b/ui/src/components/KindGlyph.svelte index e5e9c1b..9783f4c 100644 --- a/ui/src/components/KindGlyph.svelte +++ b/ui/src/components/KindGlyph.svelte @@ -1,57 +1,110 @@ + + 1} + style:width={`${size}px`} + style:height={`${size}px`} + style:border-radius={`${radius}px`} + style:font-size={`${fontSize}px`} title={titled ? kindWord(kind) : undefined} aria-hidden={titled ? undefined : 'true'} ->{letter} + >{#if icon}{:else}{letter}{/if} diff --git a/ui/src/components/MoreSheet.svelte b/ui/src/components/MoreSheet.svelte new file mode 100644 index 0000000..0cc1d8e --- /dev/null +++ b/ui/src/components/MoreSheet.svelte @@ -0,0 +1,132 @@ + + + + + + + + + diff --git a/ui/src/components/NavRail.svelte b/ui/src/components/NavRail.svelte new file mode 100644 index 0000000..2205096 --- /dev/null +++ b/ui/src/components/NavRail.svelte @@ -0,0 +1,197 @@ + + + + + + + +{#snippet destination(item: Destination)} +
      • + + + +
      • +{/snippet} + + diff --git a/ui/src/components/PalettePanel.svelte b/ui/src/components/PalettePanel.svelte index 2d23aab..5854aa7 100644 --- a/ui/src/components/PalettePanel.svelte +++ b/ui/src/components/PalettePanel.svelte @@ -4,7 +4,7 @@ * * It renders whatever `palette.view` is: the entry points when the box is * empty, the ranked kind groups when it is not. The keyboard lives in - * `TopBar` (the keys are pressed in the input, not here) and arrives as the + * `SearchPalette` (the keys are pressed in the input, not here) and arrives as the * `selected` index; this component's only job beyond drawing is keeping that * row in view when the selection moves past the panel's edge. */ @@ -47,36 +47,73 @@ {:else if palette.pending && view.items.length === 0}

        Searching…

        {:else if view.empty} -

        {view.empty}

        +

        {view.empty}

        {/if} + + diff --git a/ui/src/components/PaletteRows.svelte b/ui/src/components/PaletteRows.svelte index a872ffe..acd320b 100644 --- a/ui/src/components/PaletteRows.svelte +++ b/ui/src/components/PaletteRows.svelte @@ -101,39 +101,53 @@ display: flex; align-items: baseline; gap: 8px; - padding: 6px 10px 4px; - border-bottom: 1px solid var(--rule-faint); - color: var(--ink-3); - font-size: 12px; + padding: 8px 8px 4px; + color: var(--fg-3); + font: var(--t-micro); + letter-spacing: 0.6px; + text-transform: uppercase; } .head-note { overflow: hidden; - color: var(--ink-4); - font-size: 11.5px; + color: var(--fg-4); + font: var(--t-caption); + letter-spacing: 0; text-overflow: ellipsis; + text-transform: none; white-space: nowrap; } + /* §7: result rows 40 high, `card` + `line-faint`, r 8. */ .row { display: grid; width: 100%; - align-items: baseline; - padding: 6px 10px; - border-bottom: 1px solid var(--rule-faint); - color: var(--ink); + min-height: 40px; + align-items: center; + margin: 0 0 4px; + padding: 0 10px; + border: 1px solid var(--line-faint); + border-radius: 8px; + background: var(--card); + color: var(--fg); gap: 10px; - grid-template-columns: 18px 1fr auto; + grid-template-columns: 20px minmax(0, 1fr) auto; text-align: left; } - .row:last-child { - border-bottom: 0; + .row:hover { + border-color: var(--line); + background: var(--raised); } - .row:hover, .row.sel { - background: var(--press); + border-color: var(--primary-line); + background: var(--primary-soft); + box-shadow: var(--glow-20); + } + + .row.sel .nm { + color: var(--primary-ink); } .mid { @@ -143,25 +157,22 @@ } .nm { - font-family: var(--mono); - font-size: 12.5px; + font: var(--t-mono-500); } .nm.gen { - color: var(--ink-4); + color: var(--fg-4); } .sig { - margin-left: 6px; - color: var(--ink-3); - font-family: var(--mono); - font-size: 11.5px; + margin-left: 8px; + color: var(--fg-3); + font: var(--t-mono-sm); } .loc { - color: var(--ink-3); - font-family: var(--mono); - font-size: 11px; + color: var(--fg-3); + font: var(--t-mono-sm); white-space: nowrap; } diff --git a/ui/src/components/PhoneTabBar.svelte b/ui/src/components/PhoneTabBar.svelte new file mode 100644 index 0000000..ecfa69f --- /dev/null +++ b/ui/src/components/PhoneTabBar.svelte @@ -0,0 +1,84 @@ + + + + + + diff --git a/ui/src/components/SavedTrails.svelte b/ui/src/components/SavedTrails.svelte index cf36ac2..99a01df 100644 --- a/ui/src/components/SavedTrails.svelte +++ b/ui/src/components/SavedTrails.svelte @@ -1,4 +1,5 @@ + +
        +
        Everywhere
        + {#each GLOBAL as [keys, what] (what)} +
        + {#each keys as key (key)}{key}{/each} + {what} +
        + {/each} +
        On a symbol
        + {#each SYMBOL as [keys, what] (what)} +
        + {#each keys as key (key)}{key}{/each} + {what} +
        + {/each} +
        + + diff --git a/ui/src/components/ThemeSwitch.svelte b/ui/src/components/ThemeSwitch.svelte new file mode 100644 index 0000000..d3512d3 --- /dev/null +++ b/ui/src/components/ThemeSwitch.svelte @@ -0,0 +1,174 @@ + + + +{#if variant === 'rail'} +
        + + {#if open} + + {/if} +
        +{:else} +
        + {#each THEME_CHOICES as choice (choice)} + + {/each} +
        +{/if} + + diff --git a/ui/src/components/Toast.svelte b/ui/src/components/Toast.svelte index 66bce70..5b3f5b6 100644 --- a/ui/src/components/Toast.svelte +++ b/ui/src/components/Toast.svelte @@ -15,21 +15,31 @@ diff --git a/ui/src/components/TrailBar.svelte b/ui/src/components/TrailBar.svelte index c0ec462..3d0e5e6 100644 --- a/ui/src/components/TrailBar.svelte +++ b/ui/src/components/TrailBar.svelte @@ -7,6 +7,7 @@ * having; anything modal would stop the reading to ask about filing. */ import KindGlyph from './KindGlyph.svelte'; + import Icon from './Icon.svelte'; import { trail, hopLabel, encodeTrail } from '../lib/trail.svelte'; import { navigate, symbolHref, flowHref } from '../lib/navigation'; import { trails } from '../lib/trails.svelte'; @@ -18,6 +19,54 @@ let hops = $derived(trail.hops); + // The read-only pill needs to know before Save is pressed whether saving is + // on at all, so the list is asked for as soon as there is a trail to keep. + $effect(() => { + if (hops.length > 0) void trails.ensure(); + }); + + /* ---- fitting the hops: the earliest collapse into a `+N` pill (§2) ---- + JetBrains Mono advances 0.6 em, so a hop's width is arithmetic: 8 + tile + 18 + 8 + 7.2 per character + 10, and 20 for the chevron before it. */ + const HOP_CHROME = 44; + const CHAR_W = 7.2; + const SEP_W = 20; + const MORE_W = 44; + + let hopsWidth = $state(0); + let expanded = $state(false); + + function hopWidth(index: number): number { + const hop = hops[index]; + return (hop ? HOP_CHROME + hopLabel(hop).length * CHAR_W : 0) + (index > 0 ? SEP_W : 0); + } + + /** How many of the earliest hops fold into the `+N` pill. */ + let hidden = $derived.by(() => { + if (expanded || hopsWidth === 0) return 0; + let total = 0; + for (let i = 0; i < hops.length; i++) total += hopWidth(i); + if (total <= hopsWidth) return 0; + let used = MORE_W; + let shown = 0; + for (let i = hops.length - 1; i >= 0; i--) { + const width = hopWidth(i); + if (used + width > hopsWidth && shown > 0) break; + used += width; + shown += 1; + } + return hops.length - shown; + }); + + // A new walk starts folded again. + $effect(() => { + void hops.length; + expanded = false; + }); + + /** The phone's back chip steps to the hop before the current one. */ + let previous = $derived(hops.length > 1 ? hops[hops.length - 2] : null); + let naming = $state(false); let name = $state(''); let nameInput: HTMLInputElement | null = $state(null); @@ -105,57 +154,84 @@ -
        + whose height grows only while the form is open. With no trail there is + nothing to draw, and the islands move up under the command bar (§2). --> +
        +{#if hops.length > 0}
        - Trail - - {#if hops.length === 0} - Step into a call on the right, or up to a caller on the left — the trail records the - path. - {:else} - {#each hops as hop, i (hop.id)} - {#if i > 0} - - {/if} + Trail + + + + {#if previous} + + {/if} + trail · {hops.length} hop{hops.length === 1 ? '' : 's'} + + +
        + {#if hidden > 0} - - {hopLabel(hop)} - + {/if} + {#each hops as hop, i (hop.id)} + {#if i >= hidden} + {#if i > hidden} + + {/if} + + {/if} {/each} - {/if} - - - - {#if hops.length > 1} - - {/if} - {#if hops.length > 0 && trails.canSave && !naming} - - {/if} - {#if hops.length > 0} - - {/if} +
        + +
        + {#if hops.length > 1} + + {/if} + {#if trails.canSave && !naming} + + {:else if !trails.canSave} + + {trails.payload?.readOnly + ? 'Read-only (--read-only) · trails not saved' + : 'Read-only · trails not saved'} + + {/if} + +
        +{/if} {#if naming}
        @@ -171,10 +247,10 @@ spellcheck="false" placeholder="How a request reaches the handler" /> - - + @@ -194,90 +270,127 @@
        diff --git a/ui/src/components/ViewerInfo.svelte b/ui/src/components/ViewerInfo.svelte new file mode 100644 index 0000000..b3bc6b7 --- /dev/null +++ b/ui/src/components/ViewerInfo.svelte @@ -0,0 +1,99 @@ + + + +
        +
        This viewer
        +
        +
        Project
        +
        {stats?.project.root ?? '…'}
        +
        Index
        +
        {indexLine}
        +
        Live
        +
        {liveLine}
        +
        Trails
        +
        {trailsLine}
        +
        +

        Port, read-only and watching are set on the command line: codegraph ui --help.

        +
        + + diff --git a/ui/src/components/entry/EntrySection.svelte b/ui/src/components/entry/EntrySection.svelte index 49cbc78..125fda7 100644 --- a/ui/src/components/entry/EntrySection.svelte +++ b/ui/src/components/entry/EntrySection.svelte @@ -13,6 +13,7 @@ look up. --> +
        + Outline - in source order - {total} + source order · nested by owner · {total} +
        @@ -114,18 +120,20 @@ class="orow" class:dimmed={row.dimmed} class:sel={index === selected} - style:padding-left={`${4 + row.indent * 22}px`} + style:padding-left={`${8 + row.indent * 28}px`} onclick={() => onopen(row.entry)} onmouseenter={() => onhover?.(index)} title={`${row.entry.qualifiedName} — line ${row.entry.line}`} > - + {row.entry.name} {row.entry.signature ?? ''} - - {row.entry.line}{#if row.entry.fanIn} · ← {row.entry.fanIn}{/if}{#if row.entry.fanOut} · - → {row.entry.fanOut}{/if} + + {row.entry.fanIn ?? 0} + + {row.entry.fanOut ?? 0} + {row.entry.line} {/each} {#if window_.after > 0}
        {/if} @@ -144,81 +152,137 @@ screen caps what it draws.
        {/if} +
        diff --git a/ui/src/components/file/FileRail.svelte b/ui/src/components/file/FileRail.svelte index 002e29c..176d844 100644 --- a/ui/src/components/file/FileRail.svelte +++ b/ui/src/components/file/FileRail.svelte @@ -14,6 +14,7 @@ read as broken. -->
        - {#if open}
        @@ -93,97 +97,126 @@
        diff --git a/ui/src/components/map/MapSidePanel.svelte b/ui/src/components/map/MapSidePanel.svelte index fdc056a..c64d0f4 100644 --- a/ui/src/components/map/MapSidePanel.svelte +++ b/ui/src/components/map/MapSidePanel.svelte @@ -12,6 +12,8 @@ --> -
        + + +
        + {#if selectedModule && files.length > 0} + Open first file + {/if} + +
        -{#snippet linkList(label: string, links: WireMapLink[], side: 'source' | 'target')} -
        {label}
        +{#snippet linkList(label: string, links: WireMapLink[], side: 'source' | 'target', max: number)} +
        {label} · {links.length}
        {#if links.length > 0} - {#each links as link (link.source + link.target)} -
        - {side === 'target' ? link.target : link.source} - {link.count} -
        + {#each links.slice(0, 8) as link (link.source + link.target)} + {/each} + {#if links.length > 8}
        +{links.length - 8} more
        {/if} {:else}
        nothing
        {/if} {/snippet} diff --git a/ui/src/components/map/ModuleEdge.svelte b/ui/src/components/map/ModuleEdge.svelte index e372c9b..f8a09ec 100644 --- a/ui/src/components/map/ModuleEdge.svelte +++ b/ui/src/components/map/ModuleEdge.svelte @@ -49,20 +49,25 @@ /> diff --git a/ui/src/components/symbol/BlastStrip.svelte b/ui/src/components/symbol/BlastStrip.svelte index f9923b4..923087b 100644 --- a/ui/src/components/symbol/BlastStrip.svelte +++ b/ui/src/components/symbol/BlastStrip.svelte @@ -35,34 +35,43 @@
        - Blast radius - {blast.direct} direct dependent{blast.direct === 1 ? '' : 's'} - {blast.withinHops} within {blast.hops} hops - {blast.files} file{blast.files === 1 ? '' : 's'} - {blast.testFiles} test file{blast.testFiles === 1 ? '' : 's'} - {#if blast.routes > 0} - {blast.routes} route{blast.routes === 1 ? '' : 's'} - {/if} + Blast radius + vs widest {maxWithin.toLocaleString()}
        -
        - - -
        - -
        - dark: direct dependents · light: within {blast.hops} hops — scaled to the widest radius in the - index{#if scale?.estimated}{' '}(measured across its {scale.sampled} most-depended-on symbols){/if} +
        +
        + Direct + {blast.direct.toLocaleString()} + +
        +
        + ≤ {blast.hops} hops + {blast.withinHops.toLocaleString()} + +
        +
        + Prod files + {Math.max(0, blast.files - blast.testFiles).toLocaleString()} +
        +
        + Test files + {blast.testFiles.toLocaleString()} + +
        + {#if blast.routes > 0} +
        {plural(blast.routes, 'route')} within reach
        + {/if} {#if blast.topFiles.length > 0}
        - What would need re-checking if this changed + What would need re-checking
        {#each blast.topFiles as entry (entry.file)}
        @@ -85,70 +94,42 @@
        diff --git a/ui/src/components/symbol/CalleeRail.svelte b/ui/src/components/symbol/CalleeRail.svelte index af1e454..bffd742 100644 --- a/ui/src/components/symbol/CalleeRail.svelte +++ b/ui/src/components/symbol/CalleeRail.svelte @@ -11,10 +11,11 @@ where a line ended up. This component draws what it is told. --> -
        - Calls {model.rows.length} - step down → + +
        +
        + Calls {model.rows.length} + {#if model.outsideCalls > 0}+{model.outsideCalls} leave the index{/if} +
        + {#if model.rows.length === 0 && model.uncertain.length === 0} +
        + + {emptyReason} +
        + {/if} + {#if leaving.length > 0} +
        +
        Leaves the indexnot followed
        +
        + {#each leaving as name (name)}{name}{/each} +
        +
        + {/if}
        {#each model.rows as row, i (row.relation.node.id)} @@ -69,13 +117,13 @@ onmouseenter={() => hot.set(node.id)} onmouseleave={() => hot.clear(node.id)} > - +
        {node.name}{#if row.lines.length > 1} ×{row.lines.length}{/if}
        - {node.file === focalFile ? 'same file' : node.file} + {`${node.file === focalFile ? 'same file' : baseName(node.file)}${row.anchor !== null ? ` · :${row.anchor}` : ''}`} {#if row.words.length > 0}{row.words.join(', ')}{/if} {#if row.relation.hub}hub · {row.relation.fanIn}{/if} {#if row.via} {/if} -{#if model.rows.length === 0 && model.uncertain.length === 0} -
        {emptyReason}
        -{:else if model.outsideCalls > 0 || model.outsideTypeRefs > 0 || model.hiddenGroups > 0} +{#if model.rows.length > 0 || model.uncertain.length > 0}{#if model.outsideCalls > 0 || model.outsideTypeRefs > 0 || model.hiddenGroups > 0}
        {#if model.outsideCalls > 0} +{plural(model.outsideCalls, 'more call')} into symbols outside the index{#if model.outsideTypeRefs > 0}{' '}· @@ -145,32 +191,94 @@
        +{model.hiddenGroups} more callee{model.hiddenGroups === 1 ? '' : 's'} not shown. {/if}
        -{/if} +{/if}{/if} diff --git a/ui/src/components/symbol/CallersRail.svelte b/ui/src/components/symbol/CallersRail.svelte index da0f966..b1b6f95 100644 --- a/ui/src/components/symbol/CallersRail.svelte +++ b/ui/src/components/symbol/CallersRail.svelte @@ -12,6 +12,7 @@ side moved. -->
        - Called by {model.total} - ← step up + Called by {model.total}
        +{#if model.total > 0} + +{/if} + {#if model.total === 0}
        Nothing in the graph calls or references this symbol{exported ? ' — it is exported, so callers may live outside the index (or it is an entry point).' : '.'}
        +{:else if filtering && listed === 0} +
        No caller matches “{query.trim()}”.
        {/if} {#each model.groups as group, groupIndex (group.file)}
        @@ -91,8 +117,8 @@ onmouseenter={() => hot.set(node.id)} onmouseleave={() => hot.clear(node.id)} > - -
        + +
        {rowName(node)}
        {#if row.words.length > 0}{row.words.join(', ')}{/if} @@ -111,8 +137,8 @@ > {/each} {#if row.via}via {row.via}{/if} - {#if isOrigin}you came from here{/if}
        + {#if isOrigin}
        you came from here
        {/if}
        {/each} @@ -120,17 +146,18 @@ {/each} {#if model.tests.rows.length > 0} -
        +
        - Tests · {plural(model.tests.calls, 'call')} from {plural(model.tests.files.length, 'file')} + + Tests + {plural(model.tests.calls, 'call')} · {plural(model.tests.files.length, 'file')} +
        {#each model.tests.rows as row (row.relation.node.id)} {@const node = row.relation.node}
        hot.clear(node.id)} > -
        -
        {rowName(node)}
        -
        {node.file}
        -
        + {rowName(node)} + {basename(node.file)}
        {/each}
        @@ -156,18 +181,20 @@ {/if} {#if model.uncertain.length > 0} -
        +
        - Uncertain · {model.uncertain.length} name-only match{model.uncertain.length === 1 ? '' : 'es'}, - confidence < 0.6 + Uncertain + {model.uncertain.length} name-only match{model.uncertain.length === 1 ? '' : 'es'} · < 0.6 +
        {#each model.uncertain as row (row.relation.node.id)} {@const node = row.relation.node}
        hot.clear(node.id)} > -
        -
        {rowName(node)}
        -
        - {basename(node.file)} - {#if row.relation.confidence !== null} - {row.relation.confidence} - {/if} -
        -
        + {rowName(node)} + {basename(node.file)}{#if row.relation.confidence !== null} · {row.relation.confidence}{/if}
        {/each}
        @@ -205,143 +225,246 @@ {/if} diff --git a/ui/src/components/symbol/Connectors.svelte b/ui/src/components/symbol/Connectors.svelte index d0ef9f7..17027bb 100644 --- a/ui/src/components/symbol/Connectors.svelte +++ b/ui/src/components/symbol/Connectors.svelte @@ -21,6 +21,17 @@ } let { connectors, width, height }: Props = $props(); + + // §7: the hot connector is drawn last, so it crosses over the resting ones. + let ordered = $derived.by(() => { + const resting: Array<{ connector: Connector; key: string }> = []; + const lit: Array<{ connector: Connector; key: string }> = []; + connectors.forEach((connector, i) => { + const entry = { connector, key: `${connector.targetId}:${i}` }; + (hot.is(connector.targetId) ? lit : resting).push(entry); + }); + return [...resting, ...lit]; + });
        + Members - {total} + {total} · ← in → out
        @@ -50,7 +53,7 @@ onclick={() => onopen(row.member)} title={`${row.member.qualifiedName} — ${row.member.file}:${row.member.line}`} > - + {row.member.name} {#if row.member.overrides} @@ -59,10 +62,7 @@ {row.member.overrides.baseTypeName} {/if}{row.member.signature ?? ''} - - {#if row.member.fanIn}← {row.member.fanIn}{/if}{#if row.member.fanIn && row.member.fanOut}  - {/if}{#if row.member.fanOut}→ {row.member.fanOut}{/if} - + ← {row.member.fanIn}→ {row.member.fanOut} {/each}
        @@ -72,80 +72,101 @@ Showing {rows.length} of {total} members — open the file to see the rest.
        {/if} +
        diff --git a/ui/src/components/symbol/SourceBlock.svelte b/ui/src/components/symbol/SourceBlock.svelte index e888794..cf500eb 100644 --- a/ui/src/components/symbol/SourceBlock.svelte +++ b/ui/src/components/symbol/SourceBlock.svelte @@ -16,7 +16,9 @@ callee's own name whatever boundaries a grammar chose. --> -
        +
        + {#if file} +
        + + {file.slice(file.lastIndexOf('/') + 1)} + {range} + + {#if calls > 0} + {calls} call{calls === 1 ? '' : 's'}{#if hotLines > 0} · {hotLines} hot{/if} + {/if} + +
        + {/if} +
        {#each chunks as chunk (chunk.lines[0]?.n ?? -1)} {#if chunk.gapBefore > 0}
        ⋯ {chunk.gapBefore} lines without calls
        @@ -123,11 +174,11 @@ role="link" tabindex="0" title={ref.title} - onclick={() => onfollow(ref)} + onclick={() => onfollow(ref, line.n)} onkeydown={(e) => { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); - onfollow(ref); + onfollow(ref, line.n); } }} onmouseenter={() => hot.set(ref.targetId)} @@ -147,37 +198,96 @@ {#if block.tailGap > 0}
        ⋯ {block.tailGap} more lines
        {/if} +
        diff --git a/ui/src/components/symbol/SymbolHeader.svelte b/ui/src/components/symbol/SymbolHeader.svelte index bc0658e..7fd5d24 100644 --- a/ui/src/components/symbol/SymbolHeader.svelte +++ b/ui/src/components/symbol/SymbolHeader.svelte @@ -1,17 +1,24 @@ -
        - -

        {node.name}

        - {kindPhrase(node)} - - {node.file}:{node.line}–{node.endLine} - · {plural(node.lines, 'line')} + + +
        + + +

        (tipOpen = cut)} + onmouseleave={() => (tipOpen = false)} + onfocus={() => (tipOpen = cut)} + onblur={() => (tipOpen = false)} + > + {node.name} +

        + + {#each kindPills as pill (pill)}{pill}{/each} + + + + + + + {#if tipOpen} + + {/if}
        -{#if payload.ancestors.length > 0} -
        - in {#each payload.ancestors as ancestor, i (ancestor.id)}{#if i > 0} › {/if}{/each} -
        -{/if} - -
        - {#if node.exported}exported{/if} +
        + {#if payload.hierarchy?.polymorphic} + + Polymorphic · {plural(payload.hierarchy.implementers, 'implementation')} + + {/if} + {#if payload.members.total > 0} + {plural(payload.members.total, 'member')} + {/if} {#if payload.counts.hub} - - hub · {plural(payload.counts.callers, 'caller')} + + Hub · {plural(payload.counts.callers, 'caller')} {/if} - - {testBadge.text} + {#if payload.counts.callees > 0} + {plural(payload.counts.callees, 'callee')} + {/if} + + {testBadge.text} + + + {plural(node.lines, 'line')} · {node.line}–{node.endLine}
        -{#if node.signature} +{#if signature && node.signature}
        {node.name}{node.signature}
        {/if} @@ -163,136 +253,149 @@ {/if} diff --git a/ui/src/components/symbol/TypeHierarchy.svelte b/ui/src/components/symbol/TypeHierarchy.svelte index 8ba659d..495edcd 100644 --- a/ui/src/components/symbol/TypeHierarchy.svelte +++ b/ui/src/components/symbol/TypeHierarchy.svelte @@ -16,6 +16,7 @@ synthesized hop. --> -
        - Type hierarchy - {counts} - supertypes above · subtypes below -
        - {#if model.headline} -

        {model.headline}

        + +

        {model.headline}

        {/if} -
        -
        -
        +
        + + Type hierarchy + {#if counts}{counts}{/if} + supertypes above · subtypes below +
        + +
        +
        + + + {#each view.rows as row (row.node.id + row.side)} + {#if row.side === 'focus'} +
        + + {row.node.name} +
        + {:else} + + {/if} {/each} - - - {#each view.rows as row (row.node.id + row.side)} - {#if row.side === 'focus'} -
        - - {row.node.name} -
        - {:else} - - {/if} - {/each} -
        +
        +
        + + {#if model.foldFrom !== null} + + {/if} + + {#if model.note} +
        {model.note}
        + {/if}
        -{#if model.foldFrom !== null} - -{/if} + diff --git a/ui/src/index.ts b/ui/src/index.ts index df9930f..8aa3cc9 100644 --- a/ui/src/index.ts +++ b/ui/src/index.ts @@ -30,8 +30,8 @@ * 2. **The adapter is module-level, not context.** The pure model modules are * plain TypeScript and cannot read a component's context, so one page reads * one project. `` installs it during initialisation. - * 3. **Geometry is not themable.** 34px rail rows, 300/320px rails, the 20px - * code line: the Symbol view measures these against each other to put a + * 3. **Geometry is not themable.** 44px callee rows, the 288/320px rails, the + * 20px code line: the Symbol view measures these against each other to put a * callee row beside the line that calls it. Colour and type are yours. */ diff --git a/ui/src/lib/command.svelte.ts b/ui/src/lib/command.svelte.ts new file mode 100644 index 0000000..d02024f --- /dev/null +++ b/ui/src/lib/command.svelte.ts @@ -0,0 +1,20 @@ +/** + * A request for the command palette from somewhere that does not own it. + * + * The palette lives in the command bar, which App owns; a Start-screen + * "Search" button is in a view. A counter rather than a callback, for the same + * reason the live channel uses one: App's effect reads it and focuses the + * palette when it moves, and nothing else has to hold a reference to the bar. + */ + +let searchTick = $state(0); + +export const command = { + get searchTick(): number { + return searchTick; + }, + /** Open the ⌘K palette with the cursor in it. */ + requestSearch(): void { + searchTick += 1; + }, +}; diff --git a/ui/src/lib/destinations.ts b/ui/src/lib/destinations.ts new file mode 100644 index 0000000..b1cc3f5 --- /dev/null +++ b/ui/src/lib/destinations.ts @@ -0,0 +1,97 @@ +/** + * The viewer's destinations, in the nav rail's order (docs/design/viewer-d.md + * §2: Start, Map, Symbol, Flow, Screens, Steps, Dead code, Saved trails). + * + * One list for the rail, the phone's tab bar and its More sheet, so the three + * can never disagree about where a destination goes or when it is the current + * one. Reads the live route, so callers derive from it inside a component. + */ + +import type { IconName } from './icons'; +import { + deadHref, + entryHref, + flowHref, + mapHref, + router, + screensHref, + stepsHref, + symbolHref, +} from './router.svelte'; +import { trail } from './trail.svelte'; + +export type DestinationId = + | 'start' + | 'map' + | 'symbol' + | 'flow' + | 'screens' + | 'steps' + | 'dead' + | 'trails'; + +export interface Destination { + id: DestinationId; + label: string; + /** The phone tab bar's caption — the label, shortened where it must be. */ + short: string; + icon: IconName; + href: string; + active: boolean; +} + +/** + * @param hasScreens the graph holds screen navigation, so `#/` renders the + * Screens view (upstream's rule) and Start is not what `#/` shows. + */ +export function destinations(hasScreens: boolean): Destination[] { + const route = router.route; + const view = route.view; + + // The Symbol destination returns you to where you were reading, not to a + // blank view: the current symbol, else the trail's last hop, else the + // view's own empty screen. Never `#/`, which may render Screens. + let symbolTarget: string; + if (route.view === 'symbol' && route.id !== null) symbolTarget = symbolHref(route.id); + else symbolTarget = symbolHref(trail.current ? trail.current.id : null); + + return [ + { + id: 'start', + label: 'Start', + short: 'Start', + icon: 'layout-dashboard', + href: '#/', + active: view === 'home' && !hasScreens, + }, + { id: 'map', label: 'Map', short: 'Map', icon: 'network', href: mapHref(), active: view === 'map' }, + { + id: 'symbol', + label: 'Symbol', + short: 'Symbol', + icon: 'braces', + href: symbolTarget, + // The File view is reading code too; the boards light Symbol for it. + active: view === 'symbol' || view === 'file', + }, + { id: 'flow', label: 'Flow', short: 'Flow', icon: 'workflow', href: flowHref(), active: view === 'flow' }, + { + id: 'screens', + label: 'Screens', + short: 'Screens', + icon: 'monitor-smartphone', + href: screensHref(), + active: view === 'screens' || (view === 'home' && hasScreens), + }, + { id: 'steps', label: 'Steps', short: 'Steps', icon: 'footprints', href: stepsHref(), active: view === 'steps' }, + { id: 'dead', label: 'Dead code', short: 'Dead code', icon: 'ghost', href: deadHref(), active: view === 'dead' }, + { + id: 'trails', + label: 'Saved trails and entry points', + short: 'Trails', + icon: 'bookmark', + href: entryHref(), + active: view === 'entry', + }, + ]; +} diff --git a/ui/src/lib/export-svg.ts b/ui/src/lib/export-svg.ts index a534c1f..8d7ed95 100644 --- a/ui/src/lib/export-svg.ts +++ b/ui/src/lib/export-svg.ts @@ -27,24 +27,27 @@ * The measurements that actually place things — heights, widths, columns — are * NOT restated; they are imported from the layout models. * - * ## Light, always + * ## In the theme on screen, as literal hex * - * An image pasted into a PR is read by people whose editors are set both ways, - * and a dark-mode screenshot on GitHub's white comment background reads as a - * mistake. So the export inlines the light token set as literal hex regardless - * of the viewer's theme — there is no `prefers-color-scheme` in a file someone - * else opens. + * Direction D (docs/design/viewer-d.md §3, §3.6) has two token sets, and the + * export paints the one the reader is looking at: the caller passes `theme` + * (the viewer passes the effective theme, System resolved). Light is the + * default, upstream's reasoning for a file read on someone else's page. Either + * way the colours are inlined as literal hex — there is no + * `prefers-color-scheme` in a file someone else opens, and an export must not + * depend on a stylesheet having loaded. `ui/tests/theme-contrast.test.ts` + * checks both palettes against `lib/theme.css`, so the two cannot drift. * * ## Fonts are stacks, not bytes * * Per the spec: no embedding. The consequence is honest and worth stating — - * an exported SVG opened on a machine without IBM Plex Mono falls back through - * the stack to the platform's own monospace, and a PNG rasterised through an - * `` always does, because an SVG loaded as an image may not fetch a - * webfont. Every fallback in the mono stack advances at ~0.6em like Plex Mono - * does, so the monospace grid the code windows depend on survives the swap; - * only the letterforms change. Embedding Plex Mono would add ~90 kB of base64 - * to every export and put us over the PNG budget for nothing. + * an exported SVG opened on a machine without JetBrains Mono falls back + * through the stack to the platform's own monospace, and a PNG rasterised + * through an `` always does, because an SVG loaded as an image may not + * fetch a webfont. Every fallback in the mono stack advances at ~0.6em like + * JetBrains Mono does, so the monospace grid the code windows depend on + * survives the swap; only the letterforms change. Embedding the font would add + * tens of kB of base64 to every export for nothing. * * Tested in `__tests__/ui-export-svg.test.ts`. */ @@ -77,32 +80,89 @@ import { kindLetter, FILLED_KINDS } from './kinds'; /* ---------------------------------------------------------------- tokens -- */ +/** The colours an export paints with, named as upstream's tokens were. */ +export interface ExportPalette { + paper: string; + paper2: string; + press: string; + ink: string; + ink2: string; + ink3: string; + ink4: string; + ruleSoft: string; + ruleFaint: string; + accent: string; + accentSoft: string; + accentLine: string; + codeComment: string; +} + /** - * The light token set (`ui/src/app.css`, the bare `:root` block), as literal - * hex. Copied deliberately rather than read from `getComputedStyle`: an export - * must not depend on a stylesheet having loaded, and must not follow the - * reader's theme into a dark image on a white page. + * Both D token sets (`lib/theme.css`), as literal hex under upstream's names — + * the §3.2 aliases: paper = panel, paper-2 = raised, press = raised, ink = fg, + * ink-2..4 = fg-2..4, rule-soft = line, rule-faint = line-faint, accent = + * primary, accent-soft = primary-soft, accent-line = primary-line, + * code-comment = syn-com. */ -export const EXPORT_COLORS = { - paper: '#f7f6f2', - paper2: '#f1efe8', - press: '#e8e6dd', - ink: '#16150f', - ink2: '#56544a', - ink3: '#87847a', - ink4: '#b4b1a5', - ruleSoft: '#d6d3c8', - ruleFaint: '#e6e3d9', - accent: '#7a2230', - accentSoft: '#f0e3e5', - accentLine: '#d9b3b9', - codeComment: '#6a675d', -} as const; +export const EXPORT_PALETTES: Record<'light' | 'dark', ExportPalette> = { + // D · Daylight (§3.6) + light: { + paper: '#ffffff', + paper2: '#eef1f6', + press: '#eef1f6', + ink: '#1a2130', + ink2: '#434d62', + ink3: '#5f687c', + ink4: '#98a1b3', + ruleSoft: '#d8dde7', + ruleFaint: '#e6e9f0', + accent: '#4155ee', + accentSoft: '#e9edff', + accentLine: '#b9c3f6', + codeComment: '#626a7d', + }, + // D · Nebula (§3.1) + dark: { + paper: '#10141b', + paper2: '#1b2130', + press: '#1b2130', + ink: '#e8ecf4', + ink2: '#a9b2c4', + ink3: '#838da0', + ink4: '#4a5468', + ruleSoft: '#232a38', + ruleFaint: '#191f29', + accent: '#7c93ff', + accentSoft: '#1a2140', + accentLine: '#3b4a8c', + codeComment: '#808aa2', + }, +}; + +/** The light palette — what an export paints when no theme is asked for. */ +export const EXPORT_COLORS: ExportPalette = EXPORT_PALETTES.light; + +/** + * The palette the drawing in progress paints with. Set by `flowSvg` and + * `mapSvg` for the length of one call (they are synchronous), so the drawing + * helpers below need no extra parameter. + */ +let C: ExportPalette = EXPORT_COLORS; + +function withPalette(theme: 'light' | 'dark' | undefined, draw: () => T): T { + const previous = C; + C = EXPORT_PALETTES[theme ?? 'light']; + try { + return draw(); + } finally { + C = previous; + } +} export const MONO_STACK = - "'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace"; + "'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace"; export const SANS_STACK = - "'Archivo Variable', 'Archivo', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif"; + "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif"; /** Clear space between the drawing and the edge of the image (design spec §3.9). */ export const EXPORT_PADDING = 24; @@ -250,6 +310,8 @@ export interface ExportOptions { scale?: number; /** A line of context under the drawing, left of the mark. */ caption?: string | null; + /** Which token set to paint with; light when omitted. */ + theme?: 'light' | 'dark'; } interface Frame { @@ -281,7 +343,7 @@ function document_(frame: Frame, defs: string, body: string, options: ExportOpti x: EXPORT_PADDING, y: markY, size: MARK_SIZE, - fill: EXPORT_COLORS.ink3, + fill: C.ink3, family: MONO_STACK, }, esc( @@ -296,7 +358,7 @@ function document_(frame: Frame, defs: string, body: string, options: ExportOpti return [ ``, defs === '' ? '' : `${defs}`, - rect(0, 0, width, height, { fill: EXPORT_COLORS.paper }), + rect(0, 0, width, height, { fill: C.paper }), ``, body, '', @@ -306,7 +368,7 @@ function document_(frame: Frame, defs: string, body: string, options: ExportOpti x: width - EXPORT_PADDING, y: markY, size: MARK_SIZE, - fill: EXPORT_COLORS.ink3, + fill: C.ink3, family: MONO_STACK, anchor: 'end', }, @@ -362,8 +424,8 @@ function flowCardSvg(card: FlowCardLayout, dimmed: boolean, current: boolean): s out.push( rect(card.x, card.y, card.width, card.height, { - fill: EXPORT_COLORS.paper, - stroke: current ? EXPORT_COLORS.accent : EXPORT_COLORS.ruleSoft, + fill: C.paper, + stroke: current ? C.accent : C.ruleSoft, }) ); @@ -373,8 +435,8 @@ function flowCardSvg(card: FlowCardLayout, dimmed: boolean, current: boolean): s const gy = card.y + GLYPH_TOP; out.push( rect(gx, gy, GLYPH_SIZE, GLYPH_SIZE, { - fill: FILLED_KINDS.has(hop.node.kind) ? EXPORT_COLORS.press : 'none', - stroke: EXPORT_COLORS.ink3, + fill: FILLED_KINDS.has(hop.node.kind) ? C.press : 'none', + stroke: C.ink3, dash: hop.node.kind === 'file' ? '2 2' : undefined, }) ); @@ -386,7 +448,7 @@ function flowCardSvg(card: FlowCardLayout, dimmed: boolean, current: boolean): s x: gx + GLYPH_SIZE / 2, y: gy + GLYPH_SIZE / 2 + glyphSize * 0.36, size: glyphSize, - fill: EXPORT_COLORS.ink2, + fill: C.ink2, family: MONO_STACK, weight: 500, anchor: 'middle', @@ -406,7 +468,7 @@ function flowCardSvg(card: FlowCardLayout, dimmed: boolean, current: boolean): s x: nameX, y: card.y + HEAD_BASELINE, size: NAME_SIZE, - fill: EXPORT_COLORS.ink, + fill: C.ink, family: MONO_STACK, weight: 600, }, @@ -417,13 +479,13 @@ function flowCardSvg(card: FlowCardLayout, dimmed: boolean, current: boolean): s x: card.x + card.width - CARD_PAD_X, y: card.y + HEAD_BASELINE, size: LOC_SIZE, - fill: EXPORT_COLORS.ink3, + fill: C.ink3, family: MONO_STACK, anchor: 'end', }, esc(loc) ), - `` + `` ); // --- source window ------------------------------------------------------- @@ -438,7 +500,7 @@ function flowCardSvg(card: FlowCardLayout, dimmed: boolean, current: boolean): s x: card.x + CARD_PAD_X, y: card.y + HEADER_HEIGHT + 6 + CODE_BASELINE, size: CODE_SIZE, - fill: EXPORT_COLORS.ink3, + fill: C.ink3, }, esc(truncate(why, card.width - CARD_PAD_X * 2, CODE_SIZE, SANS_ADVANCE)) ) @@ -473,7 +535,7 @@ function flowCardSvg(card: FlowCardLayout, dimmed: boolean, current: boolean): s const claimed = assignRefs(lineTokens, refs.get(n) ?? []); if (n === callRef?.line || n === card.stopLine) { body.push( - rect(card.x, top, card.width, CODE_LINE_HEIGHT, { fill: EXPORT_COLORS.accentSoft }) + rect(card.x, top, card.width, CODE_LINE_HEIGHT, { fill: C.accentSoft }) ); } body.push( @@ -482,7 +544,7 @@ function flowCardSvg(card: FlowCardLayout, dimmed: boolean, current: boolean): s x: card.x + GUTTER - 10, y: top + CODE_BASELINE, size: LINE_NO_SIZE, - fill: EXPORT_COLORS.ink4, + fill: C.ink4, family: MONO_STACK, anchor: 'end', }, @@ -512,7 +574,7 @@ function flowCardSvg(card: FlowCardLayout, dimmed: boolean, current: boolean): s x: textX, y: top + CODE_BASELINE, size: CODE_SIZE, - fill: EXPORT_COLORS.ink, + fill: C.ink, family: MONO_STACK, preserve: true, }, @@ -526,7 +588,7 @@ function flowCardSvg(card: FlowCardLayout, dimmed: boolean, current: boolean): s const u = underline as { from: number; length: number }; const x1 = textX + monoWidth(u.from, CODE_SIZE); body.push( - `` + `` ); } }); @@ -539,13 +601,13 @@ function flowCardSvg(card: FlowCardLayout, dimmed: boolean, current: boolean): s function tokenSpan(text: string, token: Token, isRef: boolean): string { if (text === '') return ''; const escaped = esc(text); - if (isRef) return `${escaped}`; + if (isRef) return `${escaped}`; switch (token.cls) { case 'comment': - return `${escaped}`; + return `${escaped}`; case 'string': case 'number': - return `${escaped}`; + return `${escaped}`; case 'keyword': return `${escaped}`; default: @@ -626,8 +688,8 @@ function flowCapSvg(cap: FlowEndCapLayout, dimmed: boolean): string { const { rows, height } = capRows(cap); const out: string[] = [ rect(cap.x, cap.y, cap.width, Math.max(cap.height, height), { - fill: EXPORT_COLORS.paper, - stroke: EXPORT_COLORS.ruleSoft, + fill: C.paper, + stroke: C.ruleSoft, dash: '3 3', }), ]; @@ -640,10 +702,10 @@ function flowCapSvg(cap: FlowEndCapLayout, dimmed: boolean): string { const step = mono ? END_CAP_ROW : END_CAP_LINE; const fill = row.kind === 'form' || row.kind === 'lead' - ? EXPORT_COLORS.ink + ? C.ink : row.kind === 'soft' - ? EXPORT_COLORS.ink3 - : EXPORT_COLORS.ink2; + ? C.ink3 + : C.ink2; out.push( textEl( { @@ -676,11 +738,11 @@ function flowLinkSvg( : `M${round(sx)},${round(sy)} C${round((sx + tx) / 2)},${round(sy)} ${round((sx + tx) / 2)},${round(ty)} ${round(tx)},${round(ty)}`; const out: string[] = [ - ``, + ``, ]; if (!link.cap) { out.push( - `` + `` ); } const labelX = (sx + tx) / 2; @@ -692,7 +754,7 @@ function flowLinkSvg( x: labelX, y: labelY - 8 - (link.labelLines.length - 1 - i) * 13, size: LINK_LABEL_SIZE, - fill: EXPORT_COLORS.ink3, + fill: C.ink3, family: MONO_STACK, anchor: 'middle', }, @@ -707,7 +769,7 @@ function flowLinkSvg( x: labelX, y: labelY + 17, size: LINK_LABEL_SIZE, - fill: EXPORT_COLORS.ink3, + fill: C.ink3, family: MONO_STACK, anchor: 'middle', }, @@ -720,6 +782,10 @@ function flowLinkSvg( /** The Flow strip as a standalone SVG. */ export function flowSvg(layout: FlowLayout, options: FlowExportOptions = {}): string { + return withPalette(options.theme, () => drawFlowSvg(layout, options)); +} + +function drawFlowSvg(layout: FlowLayout, options: FlowExportOptions): string { const showAll = options.showAll ?? false; const active = options.activeFlowId ?? null; const onActive = (flows: string[]): boolean => active === null || flows.includes(active); @@ -809,12 +875,12 @@ function mapNodeSvg(node: MapNodeLayout, selected: boolean, dimmed: boolean): st const strokeWidth = selected ? 2 : 1; const out: string[] = [ rect(node.x, node.y, node.width, node.height, { - fill: selected ? EXPORT_COLORS.press : EXPORT_COLORS.paper, + fill: selected ? C.press : C.paper, stroke: dimmed - ? EXPORT_COLORS.ink4 + ? C.ink4 : module.test - ? EXPORT_COLORS.ink3 - : EXPORT_COLORS.ink, + ? C.ink3 + : C.ink, strokeWidth, dash: module.test ? '4 3' : undefined, }), @@ -826,7 +892,7 @@ function mapNodeSvg(node: MapNodeLayout, selected: boolean, dimmed: boolean): st x: node.x + MODULE_PAD_X, y: node.y + 17, size: MODULE_NAME_SIZE, - fill: dimmed ? EXPORT_COLORS.ink4 : EXPORT_COLORS.ink, + fill: dimmed ? C.ink4 : C.ink, family: MONO_STACK, weight: 500, }, @@ -837,7 +903,7 @@ function mapNodeSvg(node: MapNodeLayout, selected: boolean, dimmed: boolean): st x: node.x + MODULE_PAD_X, y: node.y + 31.5, size: MODULE_META_SIZE, - fill: dimmed ? EXPORT_COLORS.ink4 : EXPORT_COLORS.ink3, + fill: dimmed ? C.ink4 : C.ink3, }, // `node.island`, matching the canvas: an exported map that counts a // module the screen said nothing depends on is a different picture. @@ -848,7 +914,7 @@ function mapNodeSvg(node: MapNodeLayout, selected: boolean, dimmed: boolean): st if (node.weight > 0) { out.push( rect(node.x, node.y + node.height - 4, node.width * node.weight, 4, { - fill: EXPORT_COLORS.ink, + fill: C.ink, fillOpacity: dimmed ? 0.1 : 0.3, }) ); @@ -877,13 +943,17 @@ function mapEdgeSvg( const midY = (sy + ty) / 2; const path = `M${round(sx)},${round(sy)} C${round(sx)},${round(midY)} ${round(tx)},${round(midY)} ${round(tx)},${round(ty)}`; if (edge.back) { - return ``; + return ``; } - return ``; + return ``; } /** The Map as a standalone SVG. */ export function mapSvg(layout: MapLayout, options: MapExportOptions = {}): string { + return withPalette(options.theme, () => drawMapSvg(layout, options)); +} + +function drawMapSvg(layout: MapLayout, options: MapExportOptions): string { const selected = options.selected ?? null; const nodes = new Map(layout.nodes.map((n) => [n.id, n])); const neighbours = @@ -924,13 +994,13 @@ export function mapSvg(layout: MapLayout, options: MapExportOptions = {}): strin // canvas' back viewport portal puts them. for (const row of layout.layers) { body.push( - `` + `` ); if (row.label !== null) { const y = row.index === 0 ? row.y + 40 : row.y - 36; body.push( textEl( - { x: ruleLeft, y, size: LAYER_LABEL_SIZE, fill: EXPORT_COLORS.ink3 }, + { x: ruleLeft, y, size: LAYER_LABEL_SIZE, fill: C.ink3 }, esc(row.label) ) ); diff --git a/ui/src/lib/file-model.ts b/ui/src/lib/file-model.ts index 258be47..57c2037 100644 --- a/ui/src/lib/file-model.ts +++ b/ui/src/lib/file-model.ts @@ -29,8 +29,11 @@ const QUIET_KINDS = new Set(['property', 'field', 'enum_member', 'variable', 'co /** Above this many rows the outline is windowed rather than fully rendered. */ export const OUTLINE_VIRTUAL_THRESHOLD = 250; -/** Fixed row height the windowed outline measures with — pinned in the CSS. */ -export const OUTLINE_ROW_HEIGHT = 28; +/** + * Fixed row pitch the windowed outline measures with — pinned in the CSS. + * Direction D draws 28px rows at a 30px pitch (docs/design/viewer-d.md §8 D-03). + */ +export const OUTLINE_ROW_HEIGHT = 30; /* ----------------------------------------------------------------- rails -- */ diff --git a/ui/src/lib/flow-model.ts b/ui/src/lib/flow-model.ts index 16031f9..f5a56c7 100644 --- a/ui/src/lib/flow-model.ts +++ b/ui/src/lib/flow-model.ts @@ -42,8 +42,10 @@ export const LINK_WIDTH = 86; export const COLUMN_PITCH = CARD_WIDTH + LINK_WIDTH; /** - * Advance of IBM Plex Mono at the 11px a connector label is set in, and the - * clear space kept either side of the longest line. + * Advance of JetBrains Mono at the 11px a connector label is set in (`mono-sm`, + * 0.6 em: 6.60px, measured in Chrome with the bundled font on 2026-10-03; + * upstream's IBM Plex Mono measured 6.65), and the clear space kept either side + * of the longest line. * * A gap only ever GROWS past {@link LINK_WIDTH}: 86px holds `calls` and * `line 2029` comfortably, but a synthesized hop's `registered at App.tsx:3764` @@ -52,7 +54,7 @@ export const COLUMN_PITCH = CARD_WIDTH + LINK_WIDTH; * the very card the label was explaining. The label is the evidence for a hop * nobody can see in the source, so the picture makes room for it. */ -const LABEL_CHAR_WIDTH = 6.65; +const LABEL_CHAR_WIDTH = 6.6; const LABEL_PAD = 18; /** Card header: `10px 12px 6px` padding around one 18px row, plus a rule. */ @@ -88,7 +90,10 @@ export const END_CAP_ROW = 18; export const END_CAP_GAP = 8; /** - * Characters of 12px Archivo that fit across the cap's 216px of content. + * Characters of the cap's 12px text that fit across its 216px of content. + * Upstream sized it for Archivo; direction D sets the cap in Inter, measured in + * Chrome on 2026-10-03 at 5.81px a character on cap prose — about 37 to the + * line — so 32 stays on the pessimistic side the rule below asks for. * * The cap's height has to be known before it renders, for the same reason a * card's does — the layout packs columns with it. So the text is built here diff --git a/ui/src/lib/hierarchy-model.ts b/ui/src/lib/hierarchy-model.ts index 0580b33..11649e9 100644 --- a/ui/src/lib/hierarchy-model.ts +++ b/ui/src/lib/hierarchy-model.ts @@ -15,21 +15,27 @@ import type { WireHierarchy, WireHierarchyNode, WireNodeDetail, WireNodeRef } from './wire'; -/** Row height, in px. Fixed, so connector geometry is arithmetic. */ -export const HIER_ROW_H = 24; +/** + * Row height, in px. Fixed, so connector geometry is arithmetic. Direction D + * draws 26 (docs/design/viewer-d.md §8 D-06; upstream's spec drew 24). + */ +export const HIER_ROW_H = 26; -/** Indent per descendant level, in px (design spec §3.10). */ -export const HIER_INDENT = 22; +/** Indent per descendant level, in px — 28 in D (§8 D-06; upstream 22). */ +export const HIER_INDENT = 28; -/** Left edge of a row's kind glyph, measured from the row's own indent. */ +/** Left edge of a row's kind tile, measured from the row's own indent. */ export const HIER_GLYPH_X = 18; +/** The kind tile's edge in the tree — 20 in D (upstream's glyph was 16). */ +export const HIER_TILE = 20; + /** - * Where a row's connector leaves it: the centre of its 16px kind glyph. Lines - * hang off the glyph rather than off the row, so the trunk of a fan reads as - * coming out of the type rather than out of the margin. + * Where a row's connector leaves it: the centre of its kind tile. Lines hang + * off the tile rather than off the row, so the trunk of a fan reads as coming + * out of the type rather than out of the margin. */ -export const HIER_PORT_X = HIER_GLYPH_X + 8; +export const HIER_PORT_X = HIER_GLYPH_X + HIER_TILE / 2; /** * Subtypes drawn before the rest fold away. diff --git a/ui/src/lib/highlight.ts b/ui/src/lib/highlight.ts index 3c9344e..298a290 100644 --- a/ui/src/lib/highlight.ts +++ b/ui/src/lib/highlight.ts @@ -139,6 +139,25 @@ export function tokensByLine( * is free once the tree has been walked, and re-deriving it in a consumer would * not be. */ +/** Text that is nothing but punctuation and operators — `syn-punct` in D. */ +const PUNCTUATION = /^[\s(){}[\];,.:<>=+\-*/&|!?^%~@#$\\'"`]+$/; + +/** + * The class a rendered token takes in direction D (docs/design/viewer-d.md §3: + * `syn-kw`, `syn-str`, `syn-num`, `syn-com`, `syn-type`, `syn-punct`). + * + * {@link tokenClass} plus the two D colours it leaves out: a `type` token, and + * an `other` token that is only punctuation. An `other` token holding anything + * else — whitespace, or a whole unclassified line from a plain answer — stays + * unclassed, so an unhighlighted file reads in plain ink rather than in the + * punctuation colour. + */ +export function tokenClassFor(token: Pick): string | null { + if (token.cls === 'type') return 't-t'; + if (token.cls === 'other') return token.text.trim() !== '' && PUNCTUATION.test(token.text) ? 't-p' : null; + return tokenClass(token.cls); +} + export function tokenClass(cls: TokenClass): string | null { switch (cls) { case 'comment': diff --git a/ui/src/lib/icons.ts b/ui/src/lib/icons.ts new file mode 100644 index 0000000..e6f9e04 --- /dev/null +++ b/ui/src/lib/icons.ts @@ -0,0 +1,116 @@ +/*! + * Icon geometry from Lucide 0.544.0 (lucide-static), the set docs/design/viewer-d.md §6 + * names. Copied, not imported: the viewer needs 66 shapes, not a dependency. + * + * ISC License + * + * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2023 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2025. + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * --- + * + * The MIT License (MIT) (for portions derived from Feather) + * + * Copyright (c) 2013-2023 Cole Bemis + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +/** Inner SVG of each icon on a 24 x 24 viewBox, stroked by the caller. */ +export const ICON_SHAPES = { + 'activity': "", + 'arrow-left': " ", + 'arrow-right': " ", + 'bookmark': "", + 'box': " ", + 'braces': " ", + 'check': "", + 'chevron-down': "", + 'chevron-left': "", + 'chevron-right': "", + 'circle-alert': " ", + 'circle-check': " ", + 'circle-dashed': " ", + 'circle-x': " ", + 'command': "", + 'copy': " ", + 'corner-down-right': " ", + 'corner-left-up': " ", + 'corner-up-left': " ", + 'database': " ", + 'ellipsis': " ", + 'external-link': " ", + 'eye-off': " ", + 'file': " ", + 'file-code-2': " ", + 'filter': "", + 'flask-conical': " ", + 'folder': "", + 'footprints': " ", + 'ghost': " ", + 'git-branch': " ", + 'git-commit-horizontal': " ", + 'git-fork': " ", + 'info': " ", + 'key-round': " ", + 'keyboard': " ", + 'layers': " ", + 'layout-dashboard': " ", + 'link': " ", + 'list-tree': " ", + 'lock': " ", + 'maximize': " ", + 'menu': " ", + 'minus': "", + 'monitor': " ", + 'monitor-smartphone': " ", + 'moon': "", + 'mouse-pointer-click': " ", + 'network': " ", + 'package': " ", + 'plus': " ", + 'radio': " ", + 'refresh-cw': " ", + 'route': " ", + 'search': " ", + 'send': " ", + 'server': " ", + 'settings': " ", + 'shield': "", + 'sparkles': " ", + 'sun': " ", + 'triangle-alert': " ", + 'users': " ", + 'workflow': " ", + 'x': " ", + 'zap': "", +} as const; + +export type IconName = keyof typeof ICON_SHAPES; diff --git a/ui/src/lib/kinds.ts b/ui/src/lib/kinds.ts index 0aa5f0f..7fb6ebf 100644 --- a/ui/src/lib/kinds.ts +++ b/ui/src/lib/kinds.ts @@ -1,8 +1,10 @@ /** - * Kind glyphs — design spec §2.3. + * Kind letters — the character a kind tile carries. * - * A 16x16 hollow square with a mono letter. Container/type kinds get a - * --press fill so a class reads as a box and a function as an outline. + * Direction D draws them as soft filled tiles coloured by kind family + * (docs/design/viewer-d.md §7; `KindGlyph.svelte`). `FILLED_KINDS` is + * upstream's container/type split, which the SVG export still draws with: a + * filled box for a type, an outline for a function. */ /** NodeKind values the engine emits (src/types.ts). */ diff --git a/ui/src/lib/map-model.ts b/ui/src/lib/map-model.ts index 2249109..cfeddd1 100644 --- a/ui/src/lib/map-model.ts +++ b/ui/src/lib/map-model.ts @@ -45,9 +45,10 @@ import type { WireMapLink, WireMapModule, WireMapPayload } from './api'; // Geometry, from the design spec. Changing these changes the picture. -export const NODE_HEIGHT = 40; -export const LAYER_GAP = 74; -export const NODE_GAP = 34; +/** Direction D map node: 52 high, rows 96 apart (52 + 44), 28 between boxes (§8 D-05). */ +export const NODE_HEIGHT = 52; +export const LAYER_GAP = 44; +export const NODE_GAP = 28; export const PADDING = 44; /** Least horizontal room a layer gets per module, so a sparse row still spreads. */ const MIN_SLOT = 230; @@ -59,16 +60,16 @@ const MIN_SLOT = 230; export const PORT_PITCH = 12; const MIN_NODE_WIDTH = 110; /** - * IBM Plex Mono's real advance at 13px (0.6em), not the spec's 7.3 estimate. + * JetBrains Mono's real advance for the D label (`mono-500`, 12px): 0.6 em, + * measured in Chrome with the bundled variable font on 2026-10-03 — 7.20px + * a character. (Upstream measured IBM Plex Mono at 13px: 7.81.) * - * The prototype drew labels as SVG text that spilled harmlessly past the - * rectangle, so 7.3 was close enough there. An HTML box clips instead, and at - * 7.3 a 27-character id like `src/resolution/(root files)` lost its last - * characters to an ellipsis — measured in the browser: 211px of text in 205px - * of box. Padding is the box's own 9px each side plus its 1px borders. + * The box clips, so an under-estimate costs a label its last characters to an + * ellipsis. Padding is the D-05 recipe: the label starts at 44 (tile 22 at 12, + * then 10), and the box ends 18 past the text. */ -const CHAR_WIDTH = 7.81; -const LABEL_PADDING = 22; +const CHAR_WIDTH = 7.2; +const LABEL_PADDING = 62; /** Links below this weight stay hidden until a module they touch is selected. */ export const MIN_WEIGHT = 4; @@ -87,9 +88,14 @@ export const MIN_WEIGHT_WITH_TESTS = 6; */ const DECLARED_BASIS_COVERAGE = 0.4; -/** Approximate advance of the 11px sans meta line, measured against Archivo. */ -const META_CHAR_WIDTH = 5.9; -const META_PADDING = 24; +/** + * Advance of the 11px meta line in Inter (`caption`), measured in Chrome on + * 2026-10-03: 4.96–5.45px a character across this repository's meta strings, + * lower-case-heavy ones widest. 5.5 keeps every one inside its box. (Upstream + * measured Archivo: 5.9.) Same left inset as the label. + */ +const META_CHAR_WIDTH = 5.5; +const META_PADDING = 62; /** * A box wide enough for BOTH of its lines. diff --git a/ui/src/lib/screens-model.ts b/ui/src/lib/screens-model.ts index b3aa0db..4db388b 100644 --- a/ui/src/lib/screens-model.ts +++ b/ui/src/lib/screens-model.ts @@ -57,7 +57,11 @@ const LEVEL_NEST = 0.26; /** Points a curve is sampled at for hit-testing; at 116px tall, under a pixel off. */ const HIT_SAMPLES = 24; -/** IBM Plex Mono at 10.5px advances ~6.3px per character; the pill adds 6px each side. */ +/** + * JetBrains Mono at 10.5px (`pill`) advances 6.30px per character — 0.6 em, + * measured in Chrome with the bundled font on 2026-10-03, the same as + * upstream's IBM Plex Mono figure. The pill adds 6px each side. + */ export const PILL_CHAR_WIDTH = 6.3; export const PILL_PADDING = 12; export const PILL_HEIGHT = 17; diff --git a/ui/src/lib/symbol-model.ts b/ui/src/lib/symbol-model.ts index de15087..8b048ac 100644 --- a/ui/src/lib/symbol-model.ts +++ b/ui/src/lib/symbol-model.ts @@ -471,8 +471,68 @@ export function buildCallerRail(payload: WireSymbolPayload): CallerRailModel { }; } +/** + * The Called by rail narrowed to the rows a "Filter callers" query names + * (docs/design/viewer-d.md §8 D-02): a row stays when its name, qualified name + * or file contains the query, case-insensitively, and a file group with no row + * left goes. The headline `total` does not move — the filter narrows what is + * listed, not what the graph says calls this. + */ +export function filterCallerRail(model: CallerRailModel, query: string): CallerRailModel { + const needle = query.trim().toLowerCase(); + if (needle === '') return model; + const keep = (row: CallerRow): boolean => { + const node = row.relation.node; + return ( + node.name.toLowerCase().includes(needle) || + node.qualifiedName.toLowerCase().includes(needle) || + node.file.toLowerCase().includes(needle) + ); + }; + const testRows = model.tests.rows.filter(keep); + return { + ...model, + groups: model.groups + .map((group) => ({ ...group, rows: group.rows.filter(keep) })) + .filter((group) => group.rows.length > 0), + uncertain: model.uncertain.filter(keep), + tests: { + rows: testRows, + calls: testRows.reduce((sum, row) => sum + row.relation.edgeCount, 0), + files: [...new Set(testRows.map((row) => row.relation.node.file))].sort(), + }, + }; +} + /* ----------------------------------------------------------- connectors -- */ +/** §7 callee row: 44 high, and at least 8 between two rows pushed apart. */ +export const CALLEE_ROW_HEIGHT = 44; +export const CALLEE_ROW_GAP = 8; + +/** + * Where each callee row sits: centred on its call-site line, never above the + * row before it — `y = max(lineY − 22, previous + 52)` (§8 D-02). A row with no + * line to point at (`null`) stacks under its predecessor. Order beats exactness: + * a rail whose rows jump around relative to the body stops being a reading of + * the code, and the connector still runs to the line. + * + * @param centres the call-site line's vertical centre per row, in rail space + * @param start where the first row may begin (under the rail header) + */ +export function calleeRowTops(centres: ReadonlyArray, start: number): number[] { + const tops: number[] = []; + let y = start; + for (const centre of centres) { + const wanted = centre !== null ? centre - CALLEE_ROW_HEIGHT / 2 : y; + y = Math.max(wanted, y); + tops.push(y); + y += CALLEE_ROW_HEIGHT + CALLEE_ROW_GAP; + } + return tops; +} + + /** One hairline from a gutter port to a callee row. Geometry comes from the view. */ export interface Connector { /** SVG path data — a single cubic from the port to the row. */ diff --git a/ui/src/lib/theme-choice.svelte.ts b/ui/src/lib/theme-choice.svelte.ts new file mode 100644 index 0000000..5ebc420 --- /dev/null +++ b/ui/src/lib/theme-choice.svelte.ts @@ -0,0 +1,86 @@ +/** + * The reader's theme choice — System, Dark or Light (docs/design/viewer-d.md + * §3.6, "Switching"). + * + * The tokens already follow `prefers-color-scheme` on their own; this only + * records an explicit choice and applies it as `data-theme` on , the + * attribute `lib/theme.css` lets win over the OS. System removes the attribute + * again, which hands the decision back to the media query. + * + * The choice lives in `localStorage` under one key. A browser that refuses + * storage (a locked-down profile, a private window that throws) still gets a + * working switch for the session; it just does not remember it. + */ + +export type ThemeChoice = 'system' | 'dark' | 'light'; + +/** The storage key, named in the design spec. */ +export const THEME_STORAGE_KEY = 'codegraph-ui.theme'; + +export const THEME_CHOICES: readonly ThemeChoice[] = ['system', 'dark', 'light']; + +/** The label a control shows for each choice. */ +export const THEME_LABEL: Record = { + system: 'System', + dark: 'Dark', + light: 'Light', +}; + +function isChoice(value: unknown): value is ThemeChoice { + return value === 'system' || value === 'dark' || value === 'light'; +} + +function readStored(): ThemeChoice { + try { + const value = globalThis.localStorage?.getItem(THEME_STORAGE_KEY); + return isChoice(value) ? value : 'system'; + } catch { + return 'system'; + } +} + +function writeStored(choice: ThemeChoice): void { + try { + if (choice === 'system') globalThis.localStorage?.removeItem(THEME_STORAGE_KEY); + else globalThis.localStorage?.setItem(THEME_STORAGE_KEY, choice); + } catch { + // Storage refused: the choice holds for this page only. + } +} + +function applyToDocument(choice: ThemeChoice): void { + const root = globalThis.document?.documentElement; + if (!root) return; + if (choice === 'system') root.removeAttribute('data-theme'); + else root.setAttribute('data-theme', choice); +} + +/** What the page is painted in right now, the OS preference included. */ +export function effectiveTheme(choice: ThemeChoice): 'dark' | 'light' { + if (choice !== 'system') return choice; + const dark = globalThis.matchMedia?.('(prefers-color-scheme: dark)').matches ?? false; + return dark ? 'dark' : 'light'; +} + +class ThemeState { + choice = $state(readStored()); + + set(choice: ThemeChoice): void { + this.choice = choice; + writeStored(choice); + applyToDocument(choice); + } + + /** The next choice in System → Dark → Light order, for a one-button control. */ + cycle(): void { + const at = THEME_CHOICES.indexOf(this.choice); + this.set(THEME_CHOICES[(at + 1) % THEME_CHOICES.length] ?? 'system'); + } +} + +export const theme = new ThemeState(); + +/** Applies the stored choice before the app mounts (see `main.ts`). */ +export function applyStoredTheme(): void { + applyToDocument(readStored()); +} diff --git a/ui/src/lib/theme.css b/ui/src/lib/theme.css index 2d755c3..9a5bcde 100644 --- a/ui/src/lib/theme.css +++ b/ui/src/lib/theme.css @@ -1,120 +1,195 @@ /* ===================================================================== - @colbymchenry/codegraph-ui — design tokens - - The engine's paper/ink editorial system, as specified in - docs/design/codegraph-ui-design-spec.md §2.2: flat, hairline rules, - square corners everywhere, no shadows, no gradients, sentence case, - one oxblood accent, one amber (the "untested" badge). - - This file is the package's whole theming surface. Import it once and - override any variable on a narrower selector — the components read - nothing else. What is NOT themable is geometry: 34px rail rows, the - 300/320px rails, the 20px code line. Those are measured against each - other by the Symbol view's layout pass, and a host that moves one of - them moves a callee row away from the line it points at. - - Colour and type only. Every token is defined once on the bare :root - below and only REDEFINED in the two dark blocks, so a host that sets - `--accent` on its own container gets it in both schemes. + codegraph ui — design tokens, direction D "Modern Tech" + + The numbers are docs/design/viewer-d.md: §3 colour (`D · Nebula`, dark), + §3.6 the light set (`D · Daylight`), §4 effects, §5 type. Every component + paints from these names; nothing below a token picks its own hex. + + Two sets, one mechanism (upstream's): the bare :root carries Daylight, + `prefers-color-scheme: dark` swaps in Nebula unless the reader chose light, + and an explicit `data-theme` — on for the viewer's own switch, on a + wrapper for a host that embeds a reader — wins over the OS either way. + + Derived values (effects, gradients, the 15 aliases, Svelte Flow's + variables) are declared on `:root, [data-theme]` rather than on :root + alone. A custom property resolves its var() references where it is + declared, so a derived value declared only on :root would carry :root's + palette into a subtree that asked for the other one. + + Geometry is not themable: the 20px code line, the 64px nav rail, the rail + widths. The Symbol view measures those against each other. ===================================================================== */ -/* ---------- tokens: light / paper (the bare :root set) ---------- */ +/* ---------- D · Daylight (light) — the bare :root set ---------- */ :root { - --paper: #f7f6f2; - --paper-2: #f1efe8; - --press: #e8e6dd; - --press-2: #dedbd0; - --ink: #16150f; - --ink-2: #56544a; - --ink-3: #87847a; - --ink-4: #b4b1a5; - --rule: #16150f; - --rule-soft: #d6d3c8; - --rule-faint: #e6e3d9; - --accent: #7a2230; - --accent-ink: #5e1a25; - --accent-soft: #f0e3e5; - --accent-line: #d9b3b9; - --amber: #8a5a0b; - --amber-soft: #f3e9d2; - - /* The one code colour that is not a plain re-use of the ink ramp. - The spec asks for comments at --ink-3; measured against --paper that - is 3.46:1 and against the hot-line tint --accent-soft it is 3.00:1, - both under the 4.5:1 an AA reading of 12.5px body text needs. This is - the smallest step DOWN the same warm-grey ramp that clears 4.5:1 on - all three backgrounds a code line can have (paper 5.23, paper-2 4.92, - accent-soft 4.53) while staying quieter than --ink-2, which strings - and numbers use — so the recession order the spec describes is - unchanged, only legible. Dark needed the mirror step UP (4.51 on - accent-soft, where --ink-3 was 4.10). */ - --code-comment: #6a675d; - - --sans: 'Archivo Variable', 'Archivo', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif; - --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace; - --code-size: 12.5px; - --code-lh: 20px; + --bg: #ebeef4; + --rail: #e4e8f0; + --panel: #ffffff; + --card: #f7f8fb; + --raised: #eef1f6; + --overlay: #ffffff; + --line: #d8dde7; + --line-strong: #bcc4d3; + --line-faint: #e6e9f0; + --fg: #1a2130; + --fg-2: #434d62; + --fg-3: #5f687c; + --fg-4: #98a1b3; + --primary: #4155ee; + --primary-2: #7640ed; + --primary-soft: #e9edff; + --primary-line: #b9c3f6; + --primary-ink: #3340aa; + --primary-deep: #4c5fe8; + --primary-2-deep: #7a4fe6; + --on-primary: #ffffff; + --cyan: #0b7280; + --cyan-soft: #dcf2f5; + --cyan-line: #8accd6; + --green: #187648; + --green-soft: #ddf3e7; + --green-deep: #1f9a5e; + --amber: #975a00; + --amber-soft: #fbeed6; + --red: #bf332b; + --red-soft: #fbe4e2; + --violet: #7747df; + --violet-soft: #efe8fd; + --syn-kw: #7444da; + --syn-str: #1b7943; + --syn-num: #a15717; + --syn-com: #626a7d; + --syn-type: #0d7487; + --syn-punct: #5f6a7e; - /* App-shell geometry, shared by the grid and by anything that has to - offset itself under the bars (sticky rail headers, SVG overlays). */ - --topbar-h: 48px; - --trailbar-h: 34px; + /* §3.6 effects: softer shadows, glows at 0.6x (primary) and 0.5x (data). */ + --sh-card: 0 4px 14px 0 rgb(16 24 40 / 8%); + --sh-pop: 0 12px 32px 0 rgb(16 24 40 / 16%); + --glow-blur: 14px; + --glow-k: 0.6; + --glow-data-blur: 6px; + --glow-data-k: 0.5; + --canvas-base: var(--card); + --dots: #d3d9e4; + --ambient-1: #c7d0ff; + --ambient-2: #e0d2ff; color-scheme: light dark; } -/* ---------- tokens: dark / ink ---------- - Every colour is defined on the bare :root above; these blocks only - redefine. `:not([data-theme="light"])` lets an explicit light choice - win over the OS preference. */ +/* ---------- D · Nebula (dark) ---------- + The same names redefined. `:not([data-theme='light'])` lets an explicit + light choice win over the OS preference. */ @media (prefers-color-scheme: dark) { :root:not([data-theme='light']) { - --paper: #16150f; - --paper-2: #1c1a14; - --press: #23211a; - --press-2: #2c2a22; - --ink: #f3f1ea; - --ink-2: #b8b5a8; - --ink-3: #87847a; - --ink-4: #5d5b52; - --rule: #f3f1ea; - --rule-soft: #34322a; - --rule-faint: #26241d; - --accent: #d48b96; - --accent-ink: #e5a5ae; - --accent-soft: #33201f; - --accent-line: #6b3a42; - --amber: #d9a94a; - --amber-soft: #2e2716; - --code-comment: #8e8b81; + --bg: #0a0c10; + --rail: #0d1016; + --panel: #10141b; + --card: #151a23; + --raised: #1b2130; + --overlay: #1f2636; + --line: #232a38; + --line-strong: #303a4d; + --line-faint: #191f29; + --fg: #e8ecf4; + --fg-2: #a9b2c4; + --fg-3: #838da0; + --fg-4: #4a5468; + --primary: #7c93ff; + --primary-2: #a07cff; + --primary-soft: #1a2140; + --primary-line: #3b4a8c; + --primary-ink: #b9c6ff; + --primary-deep: #4465ff; + --primary-2-deep: #7f4eff; + --on-primary: #ffffff; + --cyan: #3dd6e8; + --cyan-soft: #0e2a31; + --cyan-line: #1f5966; + --green: #3fd68e; + --green-soft: #0e2a1f; + --green-deep: #2bb673; + --amber: #f5b544; + --amber-soft: #2e240e; + --red: #f2706b; + --red-soft: #2f1517; + --violet: #b48cff; + --violet-soft: #231a3d; + --syn-kw: #b79cff; + --syn-str: #8fd9a8; + --syn-num: #f5b57a; + --syn-com: #808aa2; + --syn-type: #7fcfe6; + --syn-punct: #8c96ab; + --sh-card: 0 6px 20px 0 rgb(0 0 0 / 32%); + --sh-pop: 0 16px 40px 0 rgb(0 0 0 / 50%); + --glow-blur: 18px; + --glow-k: 1; + --glow-data-blur: 8px; + --glow-data-k: 1; + --canvas-base: var(--panel); + --dots: #2c3445; + --ambient-1: #3a4ca8; + --ambient-2: #553f9e; + color-scheme: dark; } } /* An explicit choice, wherever it is made. `:root[data-theme]` is the viewer's own switch; the bare attribute selector is what `` - sets on its wrapper — custom properties inherit, so redefining them on a - container re-themes that subtree without touching :root. A host can therefore - put a light reader inside a dark application, and the reverse. */ + sets on its wrapper, so a host can put a dark reader inside a light page and + the reverse. */ :root[data-theme='dark'], [data-theme='dark'] { - --paper: #16150f; - --paper-2: #1c1a14; - --press: #23211a; - --press-2: #2c2a22; - --ink: #f3f1ea; - --ink-2: #b8b5a8; - --ink-3: #87847a; - --ink-4: #5d5b52; - --rule: #f3f1ea; - --rule-soft: #34322a; - --rule-faint: #26241d; - --accent: #d48b96; - --accent-ink: #e5a5ae; - --accent-soft: #33201f; - --accent-line: #6b3a42; - --amber: #d9a94a; - --amber-soft: #2e2716; - --code-comment: #8e8b81; + --bg: #0a0c10; + --rail: #0d1016; + --panel: #10141b; + --card: #151a23; + --raised: #1b2130; + --overlay: #1f2636; + --line: #232a38; + --line-strong: #303a4d; + --line-faint: #191f29; + --fg: #e8ecf4; + --fg-2: #a9b2c4; + --fg-3: #838da0; + --fg-4: #4a5468; + --primary: #7c93ff; + --primary-2: #a07cff; + --primary-soft: #1a2140; + --primary-line: #3b4a8c; + --primary-ink: #b9c6ff; + --primary-deep: #4465ff; + --primary-2-deep: #7f4eff; + --on-primary: #ffffff; + --cyan: #3dd6e8; + --cyan-soft: #0e2a31; + --cyan-line: #1f5966; + --green: #3fd68e; + --green-soft: #0e2a1f; + --green-deep: #2bb673; + --amber: #f5b544; + --amber-soft: #2e240e; + --red: #f2706b; + --red-soft: #2f1517; + --violet: #b48cff; + --violet-soft: #231a3d; + --syn-kw: #b79cff; + --syn-str: #8fd9a8; + --syn-num: #f5b57a; + --syn-com: #808aa2; + --syn-type: #7fcfe6; + --syn-punct: #8c96ab; + --sh-card: 0 6px 20px 0 rgb(0 0 0 / 32%); + --sh-pop: 0 16px 40px 0 rgb(0 0 0 / 50%); + --glow-blur: 18px; + --glow-k: 1; + --glow-data-blur: 8px; + --glow-data-k: 1; + --canvas-base: var(--panel); + --dots: #2c3445; + --ambient-1: #3a4ca8; + --ambient-2: #553f9e; color-scheme: dark; } @@ -122,71 +197,184 @@ the OS is painting dark. `:root[data-theme='light']` needs no block — the media query above already excludes it. */ [data-theme='light'] { - --paper: #f7f6f2; - --paper-2: #f1efe8; - --press: #e8e6dd; - --press-2: #dedbd0; - --ink: #16150f; - --ink-2: #56544a; - --ink-3: #87847a; - --ink-4: #b4b1a5; - --rule: #16150f; - --rule-soft: #d6d3c8; - --rule-faint: #e6e3d9; - --accent: #7a2230; - --accent-ink: #5e1a25; - --accent-soft: #f0e3e5; - --accent-line: #d9b3b9; - --amber: #8a5a0b; - --amber-soft: #f3e9d2; - --code-comment: #6a675d; + --bg: #ebeef4; + --rail: #e4e8f0; + --panel: #ffffff; + --card: #f7f8fb; + --raised: #eef1f6; + --overlay: #ffffff; + --line: #d8dde7; + --line-strong: #bcc4d3; + --line-faint: #e6e9f0; + --fg: #1a2130; + --fg-2: #434d62; + --fg-3: #5f687c; + --fg-4: #98a1b3; + --primary: #4155ee; + --primary-2: #7640ed; + --primary-soft: #e9edff; + --primary-line: #b9c3f6; + --primary-ink: #3340aa; + --primary-deep: #4c5fe8; + --primary-2-deep: #7a4fe6; + --on-primary: #ffffff; + --cyan: #0b7280; + --cyan-soft: #dcf2f5; + --cyan-line: #8accd6; + --green: #187648; + --green-soft: #ddf3e7; + --green-deep: #1f9a5e; + --amber: #975a00; + --amber-soft: #fbeed6; + --red: #bf332b; + --red-soft: #fbe4e2; + --violet: #7747df; + --violet-soft: #efe8fd; + --syn-kw: #7444da; + --syn-str: #1b7943; + --syn-num: #a15717; + --syn-com: #626a7d; + --syn-type: #0d7487; + --syn-punct: #5f6a7e; + --sh-card: 0 4px 14px 0 rgb(16 24 40 / 8%); + --sh-pop: 0 12px 32px 0 rgb(16 24 40 / 16%); + --glow-blur: 14px; + --glow-k: 0.6; + --glow-data-blur: 6px; + --glow-data-k: 0.5; + --canvas-base: var(--card); + --dots: #d3d9e4; + --ambient-1: #c7d0ff; + --ambient-2: #e0d2ff; color-scheme: light; } -/* ---------- Svelte Flow ---------- - The Map and the Flow strip draw on @xyflow/svelte, which ships its own - blue-on-white palette in `--xy-*` variables. Mapping them onto the ink - ramp here — rather than in each canvas — is what stops a host from - seeing library defaults in the gaps our custom node and edge - components do not paint: the pane behind the cards, the controls, the - minimap, the selection ring, the attribution. +/* ---------- derived: type, effects, gradients, aliases ---------- */ +:root, +[data-theme] { + /* §5: Inter for the interface, JetBrains Mono for code, names and numbers. */ + --sans: 'Inter Variable', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, + 'Helvetica Neue', Arial, sans-serif; + --mono: 'JetBrains Mono Variable', 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, + monospace; + --code-size: 12.5px; + --code-lh: 20px; - Set on :root so it reaches the portalled panes too. A host that wants - the library's own look overrides these after importing this file. */ -:root { - --xy-background-color: var(--paper); - --xy-background-pattern-color: var(--rule-faint); + /* §5 type roles, as `font` shorthands: `font: var(--t-label)`. */ + --t-display: 600 24px / 31.92px var(--sans); + --t-h1: 600 20px / 28px var(--sans); + --t-h2: 600 15px / 22.05px var(--sans); + --t-label: 600 13px / 17.94px var(--sans); + --t-body: 400 13px / 20.02px var(--sans); + --t-body-500: 500 13px / 20.02px var(--sans); + --t-small: 400 12px / 15.96px var(--sans); + --t-small-500: 500 12px / 15.96px var(--sans); + --t-micro: 600 10.5px / 13.97px var(--sans); + --t-caption: 400 11px / 13.97px var(--sans); + --t-big-num: 600 22px / 27.94px var(--sans); + --t-title-mono: 600 20px / 28px var(--mono); + --t-code: 400 12.5px / 20px var(--mono); + --t-mono: 400 12px / 15.96px var(--mono); + --t-mono-500: 500 12px / 15.96px var(--mono); + --t-mono-sm: 400 11px / 13.97px var(--mono); + --t-kbd: 500 10.5px / 13.97px var(--mono); + --t-tile: 700 10px / 12px var(--mono); + --t-lineno: 400 11px / 20px var(--mono); - --xy-edge-stroke: var(--ink-3); - --xy-edge-stroke-selected: var(--accent); - --xy-edge-stroke-width: 1; - --xy-connectionline-stroke: var(--ink-3); + /* §4 SH.glow(op) — 0 0 18 0 primary @ op (Daylight: blur 14, 0.6 x op). One + variable per opacity the spec uses, so a component names its glow. */ + --glow-20: 0 0 var(--glow-blur) 0 color-mix(in srgb, var(--primary) calc(20% * var(--glow-k)), transparent); + --glow-22: 0 0 var(--glow-blur) 0 color-mix(in srgb, var(--primary) calc(22% * var(--glow-k)), transparent); + --glow-25: 0 0 var(--glow-blur) 0 color-mix(in srgb, var(--primary) calc(25% * var(--glow-k)), transparent); + --glow-30: 0 0 var(--glow-blur) 0 color-mix(in srgb, var(--primary) calc(30% * var(--glow-k)), transparent); + --glow-35: 0 0 var(--glow-blur) 0 color-mix(in srgb, var(--primary) calc(35% * var(--glow-k)), transparent); + --glow-40: 0 0 var(--glow-blur) 0 color-mix(in srgb, var(--primary) calc(40% * var(--glow-k)), transparent); + --glow-45: 0 0 var(--glow-blur) 0 color-mix(in srgb, var(--primary) calc(45% * var(--glow-k)), transparent); + --glow-50: 0 0 var(--glow-blur) 0 color-mix(in srgb, var(--primary) calc(50% * var(--glow-k)), transparent); + --glow-55: 0 0 var(--glow-blur) 0 color-mix(in srgb, var(--primary) calc(55% * var(--glow-k)), transparent); + /* SH.glowCyan(op) / SH.glowGreen(op) — 0 0 8 0 @ op (Daylight: blur 6, 0.5 x op). */ + --glow-cyan-45: 0 0 var(--glow-data-blur) 0 color-mix(in srgb, var(--cyan) calc(45% * var(--glow-data-k)), transparent); + --glow-cyan-55: 0 0 var(--glow-data-blur) 0 color-mix(in srgb, var(--cyan) calc(55% * var(--glow-data-k)), transparent); + --glow-cyan-60: 0 0 var(--glow-data-blur) 0 color-mix(in srgb, var(--cyan) calc(60% * var(--glow-data-k)), transparent); + --glow-cyan-80: 0 0 var(--glow-data-blur) 0 color-mix(in srgb, var(--cyan) calc(80% * var(--glow-data-k)), transparent); + --glow-cyan-90: 0 0 var(--glow-data-blur) 0 color-mix(in srgb, var(--cyan) calc(90% * var(--glow-data-k)), transparent); + --glow-green-60: 0 0 var(--glow-data-blur) 0 color-mix(in srgb, var(--green) calc(60% * var(--glow-data-k)), transparent); + --glow-green-80: 0 0 var(--glow-data-blur) 0 color-mix(in srgb, var(--green) calc(80% * var(--glow-data-k)), transparent); + /* The same cyan glows for SVG strokes, which take no box-shadow: a + drop-shadow() deviation is half a box-shadow blur radius. */ + --glow-cyan-45-f: drop-shadow(0 0 calc(var(--glow-data-blur) / 2) color-mix(in srgb, var(--cyan) calc(45% * var(--glow-data-k)), transparent)); + --glow-cyan-55-f: drop-shadow(0 0 calc(var(--glow-data-blur) / 2) color-mix(in srgb, var(--cyan) calc(55% * var(--glow-data-k)), transparent)); + --glow-cyan-60-f: drop-shadow(0 0 calc(var(--glow-data-blur) / 2) color-mix(in srgb, var(--cyan) calc(60% * var(--glow-data-k)), transparent)); + --glow-cyan-80-f: drop-shadow(0 0 calc(var(--glow-data-blur) / 2) color-mix(in srgb, var(--cyan) calc(80% * var(--glow-data-k)), transparent)); + --glow-cyan-90-f: drop-shadow(0 0 calc(var(--glow-data-blur) / 2) color-mix(in srgb, var(--cyan) calc(90% * var(--glow-data-k)), transparent)); + --glow-50-f: drop-shadow(0 0 calc(var(--glow-blur) / 2) color-mix(in srgb, var(--primary) calc(50% * var(--glow-k)), transparent)); - --xy-node-color: var(--ink); - --xy-node-background-color: var(--paper); - --xy-node-border: 1px solid var(--rule-soft); + /* §4 gradients. GRAD.brand runs left to right on a horizontal bar and corner + to corner on anything else; GRAD.button is the only one text sits on. */ + --grad-brand: linear-gradient(90deg, var(--primary), var(--primary-2)); + --grad-brand-v: linear-gradient(180deg, var(--primary), var(--primary-2)); + --grad-brand-d: linear-gradient(to bottom right, var(--primary), var(--primary-2)); + --grad-button: linear-gradient(to bottom right, var(--primary-deep), var(--primary-2-deep)); + --grad-data: linear-gradient(90deg, var(--cyan), var(--primary)); + --grad-green: linear-gradient(90deg, var(--green-deep), var(--green)); + + /* The canvas behind Map, Flow, Screens and Steps: a dot grid at pitch 20 and + two ambient glows, top left and bottom right. */ + --canvas: radial-gradient(ellipse 34% 60% at 10% 6%, color-mix(in srgb, var(--ambient-1) 35%, transparent), transparent), + radial-gradient(ellipse 28% 50% at 95% 98%, color-mix(in srgb, var(--ambient-2) 35%, transparent), transparent), + radial-gradient(circle, var(--dots) 1.05px, transparent 1.6px) 0 0 / 20px 20px, + var(--canvas-base); + + /* §3.2 — the 15 aliases, so a rule written against upstream's names paints + with D's. New rules use the token names. `--accent-ink` is upstream's + sixteenth name; it maps the way §3.2 maps `--accent`. */ + --paper: var(--panel); + --paper-2: var(--raised); + --press: var(--raised); + --press-2: var(--line); + --ink: var(--fg); + --ink-2: var(--fg-2); + --ink-3: var(--fg-3); + --ink-4: var(--fg-4); + --rule: var(--line-strong); + --rule-soft: var(--line); + --rule-faint: var(--line-faint); + --accent: var(--primary); + --accent-soft: var(--primary-soft); + --accent-line: var(--primary-line); + --accent-ink: var(--primary-ink); + --code-comment: var(--syn-com); + + /* ---------- Svelte Flow ---------- + @xyflow/svelte ships its own palette in `--xy-*`; mapping it here keeps + library defaults out of the gaps our node and edge components do not + paint: the pane, the controls, the minimap, the selection ring. */ + --xy-background-color: transparent; + --xy-background-pattern-color: var(--dots); + --xy-edge-stroke: var(--line-strong); + --xy-edge-stroke-selected: var(--cyan); + --xy-edge-stroke-width: 1; + --xy-connectionline-stroke: var(--fg-3); + --xy-node-color: var(--fg); + --xy-node-background-color: var(--card); + --xy-node-border: 1px solid var(--line); --xy-node-boxshadow-hover: none; --xy-node-boxshadow-selected: none; - --xy-selection-background-color: var(--accent-soft); - --xy-selection-border: 1px solid var(--accent-line); - + --xy-selection-background-color: color-mix(in srgb, var(--primary-soft) 60%, transparent); + --xy-selection-border: 1px solid var(--primary-line); --xy-handle-background-color: transparent; --xy-handle-border-color: transparent; - - --xy-controls-button-background-color: var(--paper); - --xy-controls-button-background-color-hover: var(--press); - --xy-controls-button-color: var(--ink-2); - --xy-controls-button-color-hover: var(--ink); - --xy-controls-button-border-color: var(--rule-soft); - --xy-controls-box-shadow: none; - - --xy-minimap-background-color: var(--paper-2); - --xy-minimap-mask-background-color: var(--paper); - --xy-minimap-node-background-color: var(--rule-soft); - --xy-minimap-node-stroke-color: var(--ink-3); - + --xy-controls-button-background-color: var(--overlay); + --xy-controls-button-background-color-hover: var(--raised); + --xy-controls-button-color: var(--fg-2); + --xy-controls-button-color-hover: var(--fg); + --xy-controls-button-border-color: var(--line); + --xy-controls-box-shadow: var(--sh-pop); + --xy-minimap-background-color: var(--overlay); + --xy-minimap-mask-background-color: color-mix(in srgb, var(--bg) 60%, transparent); + --xy-minimap-node-background-color: var(--line-strong); + --xy-minimap-node-stroke-color: var(--fg-3); --xy-attribution-background-color: transparent; - - --xy-resize-background-color: var(--accent); - --xy-error-color: var(--accent); + --xy-resize-background-color: var(--primary); + --xy-error-color: var(--red); } diff --git a/ui/src/main.ts b/ui/src/main.ts index 1dde3df..173f2c5 100644 --- a/ui/src/main.ts +++ b/ui/src/main.ts @@ -1,15 +1,20 @@ // Fonts are vendored, not fetched: a loopback reader for a local index must // work with the network off, and must not announce the project to a CDN. -import '@fontsource-variable/archivo/wght.css'; -import '@fontsource/ibm-plex-mono/400.css'; -import '@fontsource/ibm-plex-mono/400-italic.css'; -import '@fontsource/ibm-plex-mono/500.css'; -import '@fontsource/ibm-plex-mono/600.css'; +// +// Inter for the interface, JetBrains Mono for code (docs/design/viewer-d.md §5), +// both variable, normal style only: the design sets nothing in italic. +import '@fontsource-variable/inter/wght.css'; +import '@fontsource-variable/jetbrains-mono/wght.css'; import './app.css'; +import { applyStoredTheme } from './lib/theme-choice.svelte'; import { mount } from 'svelte'; import App from './App.svelte'; +// Before the first paint of the app, so a stored Dark or Light choice never +// flashes the OS scheme first. (The CSP forbids an inline script in the head.) +applyStoredTheme(); + const target = document.getElementById('app'); if (!target) throw new Error('codegraph ui: #app host element is missing from index.html'); diff --git a/ui/src/views/DeadCodeView.svelte b/ui/src/views/DeadCodeView.svelte index 1206cdd..c982acc 100644 --- a/ui/src/views/DeadCodeView.svelte +++ b/ui/src/views/DeadCodeView.svelte @@ -21,6 +21,7 @@ * says so in its own count line. See `lib/map-model.ts`. */ import KindGlyph from '../components/KindGlyph.svelte'; + import Icon from '../components/Icon.svelte'; import { fetchDeadCode, ApiFailure, type WireDeadCode, type WireDeadCodeRow } from '../lib/api'; import { deadHref, fileHref, navigate, symbolHref } from '../lib/navigation'; import { live } from '../lib/live.svelte'; @@ -70,46 +71,69 @@ let scale = $derived(deadCodeScale(payload)); let phrases = $derived(exclusionPhrases(payload)); + /** Size bars (§8 D-07): each row against the largest one listed, 140px wide. */ + let maxLines = $derived( + Math.max(1, ...(payload?.groups ?? []).flatMap((g) => g.rows.map((r) => r.lines))) + ); + let maxExcluded = $derived(Math.max(1, ...(payload?.excluded ?? []).map((e) => e.count))); + let listedShare = $derived( + payload && payload.candidates > 0 ? (100 * payload.rows.total) / payload.candidates : 0 + ); + function open(row: WireDeadCodeRow): void { navigate(symbolHref(row.id, { line: row.line })); } -
        +
        +
        -

        Dead code

        -

        - Symbols no import, call or reference in this index reaches, largest first. Everything below - is what the graph can see; the notes under the list are what it cannot. -

        + +
        +

        Dead code

        +

        symbols nothing in the index reaches · largest first · grouped by file

        +
        + +
        - + +

        {DEAD_CODE_CAVEAT}macros, trait objects and reflection leave no edge

        {#if failure}

        Could not read the list — {failure}

        {:else if loading && payload === null} -

        Reading the graph…

        +
        Reading the graph…
        {:else if payload} {#if exported} -

        - Exported symbols are on this list. Nothing in this repository references them, but anything +

        + Exported symbols are on this list. Nothing in this repository references them, but anything outside it can — a published package, another service, a script. Read each one before you - believe it. + believe it.

        {/if} @@ -121,12 +145,13 @@ {#each payload.groups as group (group.file)}
        + {group.file} {groupMeta(group)}
        {#each group.rows as row (row.id)}
        - +
        {row.file}:{row.line}{row.file.slice(row.file.lastIndexOf('/') + 1)}:{row.line} - {#if row.exported}exported{/if} + {#if row.exported}exported{/if}
        {deadCodeRowMeta(row)}
        {#if row.members.items.length > 0} @@ -155,6 +180,7 @@
        {/if}
        +
        {/each}
        @@ -162,190 +188,233 @@
        {/if} -
        + {#if payload.rows.truncated} +

        + Showing {payload.rows.shown} of {payload.rows.total} — the rest are in the index, not on + this list. +

        + {/if} + {/if} +
        + + +
        diff --git a/ui/src/views/EntryView.svelte b/ui/src/views/EntryView.svelte index 0eba6fe..40c4b9e 100644 --- a/ui/src/views/EntryView.svelte +++ b/ui/src/views/EntryView.svelte @@ -17,6 +17,7 @@ * at rest, the empty screen and this panel, so all three agree on the order. */ import EntrySection from '../components/entry/EntrySection.svelte'; + import Icon from '../components/Icon.svelte'; import SavedTrails from '../components/SavedTrails.svelte'; import { palette } from '../lib/palette.svelte'; import { buildEntryPanel, flowPair, type EntryRow } from '../lib/entry-model'; @@ -85,11 +86,12 @@
        -

        Entry points

        + +

        Saved trails and entry points

        Where a flow starts{project ? ` in ${project}` : ''} — every list below is read out of the graph, not guessed from a filename. Open a row to read the code, or use - Flow › to draw the path from it to a second symbol. + Flow to draw the path from it to a second symbol.

        @@ -112,11 +114,11 @@ /> armed && draw(armed.name, reaches)}>Draw the flow - + or pick the other end with → here
        {/if} @@ -131,7 +133,7 @@ {#if palette.entriesFailure}

        Could not read the entry points — {palette.entriesFailure}

        {:else if !palette.entriesSettled} -

        Reading the graph…

        +

        Reading the graph…

        {:else if panel.empty}

        {panel.empty}

        {:else} @@ -144,40 +146,58 @@
        diff --git a/ui/src/views/FileCodeView.svelte b/ui/src/views/FileCodeView.svelte index b5337a5..2de6d86 100644 --- a/ui/src/views/FileCodeView.svelte +++ b/ui/src/views/FileCodeView.svelte @@ -30,6 +30,8 @@ import FileCodeRail from '../components/file/FileCodeRail.svelte'; import FileModeTabs from '../components/file/FileModeTabs.svelte'; import KindGlyph from '../components/KindGlyph.svelte'; + import Icon from '../components/Icon.svelte'; + import ErrorCard from '../components/ErrorCard.svelte'; import DriftBanner from '../components/DriftBanner.svelte'; import { ApiFailure, @@ -425,22 +427,21 @@ {#if failure} -
        -
        -

        {failure.code === 'not-found' ? 'Not in the index' : 'Could not load this file'}

        -

        {path}

        -

        {failure.message}

        - {#if failure.guidance}

        {failure.guidance}

        {/if} -
        +
        +
        {:else if loading || !payload} -
        -

        Loading…

        +
        +
        Reading the file from the index…
        {:else}
        0}> {#if outlineRows.length > 0} -