@jefuriiij/synthra 0.9.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +36 -0
- package/dist/cli/index.js +362 -34
- package/dist/cli/index.js.map +1 -1
- package/dist/dashboard/index.js +31 -7
- package/dist/dashboard/index.js.map +1 -1
- package/dist/server/index.js +326 -24
- package/dist/server/index.js.map +1 -1
- package/package.json +1 -1
package/dist/dashboard/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import { Hono } from "hono";
|
|
|
5
5
|
// package.json
|
|
6
6
|
var package_default = {
|
|
7
7
|
name: "@jefuriiij/synthra",
|
|
8
|
-
version: "0.
|
|
8
|
+
version: "0.11.0",
|
|
9
9
|
publishConfig: {
|
|
10
10
|
access: "public"
|
|
11
11
|
},
|
|
@@ -427,6 +427,7 @@ function resolvePaths(projectRoot) {
|
|
|
427
427
|
activityLog: join2(graphDir, "activity.jsonl"),
|
|
428
428
|
tokenLog: join2(graphDir, "token_log.jsonl"),
|
|
429
429
|
gateLog: join2(graphDir, "gate_log.jsonl"),
|
|
430
|
+
bashLog: join2(graphDir, "bash_log.jsonl"),
|
|
430
431
|
toolLog: join2(graphDir, "tool_log.jsonl"),
|
|
431
432
|
accessLog: join2(graphDir, "access_log.jsonl"),
|
|
432
433
|
learnStore: join2(graphDir, "learn_store.json"),
|
|
@@ -562,6 +563,8 @@ function summarize(p) {
|
|
|
562
563
|
estimated_cost_usd: Math.round(costUsd * 100) / 100,
|
|
563
564
|
total_tool_calls: p.tools.length,
|
|
564
565
|
tool_calls: countToolCalls(p.tools),
|
|
566
|
+
bash_explorations: p.bash.length,
|
|
567
|
+
bash_avoidable: p.bash.filter((b) => b.avoidable).length,
|
|
565
568
|
hot_files: topHotFiles(p.learn, now),
|
|
566
569
|
hot_files_total: effectiveScores(p.learn, now).size,
|
|
567
570
|
models
|
|
@@ -573,14 +576,15 @@ function dedupeEnabled() {
|
|
|
573
576
|
}
|
|
574
577
|
async function loadProjectFiles(path, name, lastSeen) {
|
|
575
578
|
const paths = resolvePaths(path);
|
|
576
|
-
const [rawTokens, gates, tools, learn] = await Promise.all([
|
|
579
|
+
const [rawTokens, gates, tools, bash, learn] = await Promise.all([
|
|
577
580
|
readJsonl(paths.tokenLog),
|
|
578
581
|
readJsonl(paths.gateLog),
|
|
579
582
|
readJsonl(paths.toolLog),
|
|
583
|
+
readJsonl(paths.bashLog),
|
|
580
584
|
readLearnStore(paths.learnStore)
|
|
581
585
|
]);
|
|
582
586
|
const tokens = dedupeEnabled() ? dedupeTokens(rawTokens) : rawTokens;
|
|
583
|
-
return { path, name, last_seen: lastSeen, tokens, gates, tools, learn };
|
|
587
|
+
return { path, name, last_seen: lastSeen, tokens, gates, tools, bash, learn };
|
|
584
588
|
}
|
|
585
589
|
function dedupeTokens(entries) {
|
|
586
590
|
const score = (model) => {
|
|
@@ -644,10 +648,11 @@ async function computeDashboardData(activePaths, recentN = 500) {
|
|
|
644
648
|
tokens: [],
|
|
645
649
|
gates: [],
|
|
646
650
|
tools: [],
|
|
651
|
+
bash: [],
|
|
647
652
|
learn: emptyStore()
|
|
648
653
|
};
|
|
649
654
|
const activeStats = summarize(activeFiles);
|
|
650
|
-
let g_in = 0, g_out = 0, g_cr = 0, g_cc = 0, g_gate = 0, g_block = 0, g_cost = 0, g_turns = 0, g_tools = 0;
|
|
655
|
+
let g_in = 0, g_out = 0, g_cr = 0, g_cc = 0, g_gate = 0, g_block = 0, g_cost = 0, g_turns = 0, g_tools = 0, g_bash = 0, g_bash_avoid = 0;
|
|
651
656
|
const g_tool_calls = {};
|
|
652
657
|
for (const s of projects) {
|
|
653
658
|
g_turns += s.total_turns;
|
|
@@ -659,6 +664,8 @@ async function computeDashboardData(activePaths, recentN = 500) {
|
|
|
659
664
|
g_block += s.blocked_count;
|
|
660
665
|
g_cost += s.estimated_cost_usd;
|
|
661
666
|
g_tools += s.total_tool_calls;
|
|
667
|
+
g_bash += s.bash_explorations;
|
|
668
|
+
g_bash_avoid += s.bash_avoidable;
|
|
662
669
|
for (const [k, v] of Object.entries(s.tool_calls)) g_tool_calls[k] = (g_tool_calls[k] ?? 0) + v;
|
|
663
670
|
}
|
|
664
671
|
const g_saved = g_block * AVG_TOKENS_PER_BLOCKED_GREP;
|
|
@@ -666,7 +673,20 @@ async function computeDashboardData(activePaths, recentN = 500) {
|
|
|
666
673
|
const g_saved_pct = g_used + g_saved > 0 ? g_saved / (g_used + g_saved) * 100 : 0;
|
|
667
674
|
const allTurns = [];
|
|
668
675
|
const allGates = [];
|
|
676
|
+
const allBash = [];
|
|
669
677
|
for (const p of loaded) {
|
|
678
|
+
for (const b of p.bash) {
|
|
679
|
+
allBash.push({
|
|
680
|
+
ts: b.ts,
|
|
681
|
+
project_name: p.name,
|
|
682
|
+
project_path: p.path,
|
|
683
|
+
kind: b.kind,
|
|
684
|
+
tool: b.tool,
|
|
685
|
+
query: b.query,
|
|
686
|
+
confidence: b.confidence,
|
|
687
|
+
avoidable: b.avoidable
|
|
688
|
+
});
|
|
689
|
+
}
|
|
670
690
|
for (const t of p.tokens) {
|
|
671
691
|
allTurns.push({
|
|
672
692
|
// Fall back to written_at — the Stop hook today posts entries without
|
|
@@ -695,6 +715,7 @@ async function computeDashboardData(activePaths, recentN = 500) {
|
|
|
695
715
|
}
|
|
696
716
|
allTurns.sort((a, b) => a.ts < b.ts ? 1 : a.ts > b.ts ? -1 : 0);
|
|
697
717
|
allGates.sort((a, b) => a.ts < b.ts ? 1 : a.ts > b.ts ? -1 : 0);
|
|
718
|
+
allBash.sort((a, b) => a.ts < b.ts ? 1 : a.ts > b.ts ? -1 : 0);
|
|
698
719
|
return {
|
|
699
720
|
active: {
|
|
700
721
|
project_root: activePath,
|
|
@@ -714,16 +735,19 @@ async function computeDashboardData(activePaths, recentN = 500) {
|
|
|
714
735
|
saved_percent: Math.round(g_saved_pct * 10) / 10,
|
|
715
736
|
estimated_cost_usd: Math.round(g_cost * 100) / 100,
|
|
716
737
|
total_tool_calls: g_tools,
|
|
717
|
-
tool_calls: g_tool_calls
|
|
738
|
+
tool_calls: g_tool_calls,
|
|
739
|
+
bash_explorations: g_bash,
|
|
740
|
+
bash_avoidable: g_bash_avoid
|
|
718
741
|
},
|
|
719
742
|
projects,
|
|
720
743
|
recent_turns: allTurns.slice(0, recentN),
|
|
721
|
-
recent_gates: allGates.slice(0, recentN)
|
|
744
|
+
recent_gates: allGates.slice(0, recentN),
|
|
745
|
+
recent_bash: allBash.slice(0, recentN)
|
|
722
746
|
};
|
|
723
747
|
}
|
|
724
748
|
|
|
725
749
|
// src/dashboard/built/index.html
|
|
726
|
-
var built_default = '<!doctype html>\n<html lang="en" class="dark">\n <head>\n <meta charset="UTF-8" />\n <meta name="viewport" content="width=device-width, initial-scale=1.0" />\n <title>Synthra \xB7 Dashboard</title>\n <link rel="icon" href="/favicon.svg" type="image/svg+xml" />\n <link rel="preconnect" href="https://fonts.googleapis.com" />\n <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />\n <link\n href="https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Geist:wght@400;500;600;700&family=Geist+Mono:wght@400;500&display=swap"\n rel="stylesheet"\n />\n <script type="module" crossorigin>(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e=Array.isArray,t=Array.prototype.indexOf,n=Array.prototype.includes,r=Array.from,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyDescriptors,s=Object.prototype,c=Array.prototype,l=Object.getPrototypeOf,u=Object.isExtensible;function d(e){return typeof e==`function`}var f=()=>{};function p(e){for(var t=0;t<e.length;t++)e[t]()}function m(){var e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}function h(e,t){if(Array.isArray(e))return e;if(t===void 0||!(Symbol.iterator in e))return Array.from(e);let n=[];for(let r of e)if(n.push(r),n.length===t)break;return n}var g=1<<24,_=1024,v=2048,y=4096,b=8192,ee=16384,x=32768,te=1<<25,ne=65536,re=1<<19,ie=1<<20,ae=1<<25,oe=65536,se=1<<21,ce=1<<22,le=1<<23,ue=Symbol(`$state`),de=Symbol(`legacy props`),fe=Symbol(``),pe=Symbol(`attributes`),me=Symbol(`class`),he=Symbol(`style`),ge=Symbol(`text`),_e=Symbol(`form reset`),ve=new class extends Error{name=`StaleReactionError`;message="The reaction that called `getAbortSignal()` was re-run or destroyed"},ye=!!globalThis.document?.contentType&&globalThis.document.contentType.includes(`xml`);function be(e){throw Error(`https://svelte.dev/e/lifecycle_outside_component`)}function xe(){throw Error(`https://svelte.dev/e/async_derived_orphan`)}function Se(e,t,n){throw Error(`https://svelte.dev/e/each_key_duplicate`)}function Ce(e){throw Error(`https://svelte.dev/e/effect_in_teardown`)}function we(){throw Error(`https://svelte.dev/e/effect_in_unowned_derived`)}function Te(e){throw Error(`https://svelte.dev/e/effect_orphan`)}function Ee(){throw Error(`https://svelte.dev/e/effect_update_depth_exceeded`)}function De(e){throw Error(`https://svelte.dev/e/props_invalid_value`)}function Oe(){throw Error(`https://svelte.dev/e/set_context_after_init`)}function ke(){throw Error(`https://svelte.dev/e/state_descriptors_fixed`)}function Ae(){throw Error(`https://svelte.dev/e/state_prototype_fixed`)}function je(){throw Error(`https://svelte.dev/e/state_unsafe_mutation`)}function Me(){throw Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`)}var Ne={},S=Symbol(`uninitialized`),Pe=`http://www.w3.org/1999/xhtml`,Fe=`http://www.w3.org/2000/svg`,Ie=`@attach`;function Le(){console.warn(`https://svelte.dev/e/derived_inert`)}function Re(e){console.warn(`https://svelte.dev/e/hydration_mismatch`)}function ze(){console.warn(`https://svelte.dev/e/select_multiple_invalid_value`)}function Be(){console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`)}var C=!1;function Ve(e){C=e}var w;function T(e){if(e===null)throw Re(),Ne;return w=e}function He(){return T(Cn(w))}function E(e){if(C){if(Cn(w)!==null)throw Re(),Ne;w=e}}function Ue(e=1){if(C){for(var t=e,n=w;t--;)n=Cn(n);w=n}}function We(e=!0){for(var t=0,n=w;;){if(n.nodeType===8){var r=n.data;if(r===`]`){if(t===0)return n;--t}else (r===`[`||r===`[!`||r[0]===`[`&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=Cn(n);e&&n.remove(),n=i}}function Ge(e){if(!e||e.nodeType!==8)throw Re(),Ne;return e.data}function Ke(e){return e===this.v}function qe(e,t){return e==e?e!==t||typeof e==`object`&&!!e||typeof e==`function`:t==t}function Je(e){return!qe(e,this.v)}var Ye=!1,Xe=!1;function Ze(){Xe=!0}var D=null;function Qe(e){D=e}function $e(e){return it(`getContext`).get(e)}function et(e,t){let n=it(`setContext`);if(Ye){var r=V.f;!B&&r&32&&!D.i||Oe()}return n.set(e,t),t}function tt(e){return it(`hasContext`).has(e)}function nt(){return it(`getAllContexts`)}function O(e,t=!1,n){D={p:D,i:!1,c:null,e:null,s:e,x:null,r:V,l:Xe&&!t?{s:null,u:null,$:[]}:null}}function k(e){var t=D,n=t.e;if(n!==null){t.e=null;for(var r of n)zn(r)}return e!==void 0&&(t.x=e),t.i=!0,D=t.p,e??{}}function rt(){return!Xe||D!==null&&D.l===null}function it(e){return D===null&&be(e),D.c??=new Map(at(D)||void 0)}function at(e){let t=e.p;for(;t!==null;){let e=t.c;if(e!==null)return e;t=t.p}return null}var ot=[];function st(){var e=ot;ot=[],p(e)}function ct(e){if(ot.length===0&&!Vt){var t=ot;queueMicrotask(()=>{t===ot&&st()})}ot.push(e)}function lt(){for(;ot.length>0;)st()}function ut(e){var t=V;if(t===null)return B.f|=le,e;if(!(t.f&32768)&&!(t.f&4))throw e;dt(e,t)}function dt(e,t){if(!(t!==null&&t.f&16384)){for(;t!==null;){if(t.f&128){if(!(t.f&32768))throw e;try{t.b.error(e);return}catch(t){e=t}}t=t.parent}throw e}}var ft=~(v|y|_);function A(e,t){e.f=e.f&ft|t}function pt(e){e.f&512||e.deps===null?A(e,_):A(e,y)}function mt(e){if(e!==null)for(let t of e)!(t.f&2)||!(t.f&65536)||(t.f^=oe,mt(t.deps))}function ht(e,t,n){e.f&2048?t.add(e):e.f&4096&&n.add(e),mt(e.deps),A(e,_)}var gt=!1,_t=!1;function vt(e){var t=_t;try{return _t=!1,[e(),_t]}finally{_t=t}}function yt(e){let t=0,n=sn(0),r;return()=>{In()&&(H(n),Gn(()=>(t===0&&(r=Mr(()=>e(()=>dn(n)))),t+=1,()=>{ct(()=>{--t,t===0&&(r?.(),r=void 0,dn(n))})})))}}var bt=ne|re;function xt(e,t,n,r){new St(e,t,n,r)}var St=class{parent;is_pending=!1;transform_error;#e;#t=C?w:null;#n;#r;#i;#a=null;#o=null;#s=null;#c=null;#l=0;#u=0;#d=!1;#f=new Set;#p=new Set;#m=null;#h=yt(()=>(this.#m=sn(this.#l),()=>{this.#m=null}));constructor(e,t,n,r){this.#e=e,this.#n=t,this.#r=e=>{var t=V;t.b=this,t.f|=128,n(e)},this.parent=V.b,this.transform_error=r??this.parent?.transform_error??(e=>e),this.#i=Kn(()=>{if(C){let e=this.#t;He();let t=e.data===`[!`;if(e.data.startsWith(`[?`)){let t=JSON.parse(e.data.slice(2));this.#_(t)}else t?this.#v():this.#g()}else this.#y()},bt),C&&(this.#e=w)}#g(){try{this.#a=Jn(()=>this.#r(this.#e))}catch(e){this.error(e)}}#_(e){let t=this.#n.failed;t&&(this.#s=Jn(()=>{t(this.#e,()=>e,()=>()=>{})}))}#v(){let e=this.#n.pending;e&&(this.is_pending=!0,this.#o=Jn(()=>e(this.#e)),ct(()=>{var e=this.#c=document.createDocumentFragment(),t=xn();e.append(t),this.#a=this.#x(()=>Jn(()=>this.#r(t))),this.#u===0&&(this.#e.before(e),this.#c=null,er(this.#o,()=>{this.#o=null}),this.#b(M))}))}#y(){try{if(this.is_pending=this.has_pending_snippet(),this.#u=0,this.#l=0,this.#a=Jn(()=>{this.#r(this.#e)}),this.#u>0){var e=this.#c=document.createDocumentFragment();ir(this.#a,e);let t=this.#n.pending;this.#o=Jn(()=>t(this.#e))}else this.#b(M)}catch(e){this.error(e)}}#b(e){this.is_pending=!1,e.transfer_effects(this.#f,this.#p)}defer_effect(e){ht(e,this.#f,this.#p)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#n.pending}#x(e){var t=V,n=B,r=D;dr(this.#i),ur(this.#i),Qe(this.#i.ctx);try{return qt.ensure(),e()}catch(e){return ut(e),null}finally{dr(t),ur(n),Qe(r)}}#S(e,t){if(!this.has_pending_snippet()){this.parent&&this.parent.#S(e,t);return}this.#u+=e,this.#u===0&&(this.#b(t),this.#o&&er(this.#o,()=>{this.#o=null}),this.#c&&=(this.#e.before(this.#c),null))}update_pending_count(e,t){this.#S(e,t),this.#l+=e,!(!this.#m||this.#d)&&(this.#d=!0,ct(()=>{this.#d=!1,this.#m&&ln(this.#m,this.#l)}))}get_effect_pending(){return this.#h(),H(this.#m)}error(e){if(!this.#n.onerror&&!this.#n.failed)throw e;M?.is_fork?(this.#a&&M.skip_effect(this.#a),this.#o&&M.skip_effect(this.#o),this.#s&&M.skip_effect(this.#s),M.oncommit(()=>{this.#C(e)})):this.#C(e)}#C(e){this.#a&&=(z(this.#a),null),this.#o&&=(z(this.#o),null),this.#s&&=(z(this.#s),null),C&&(T(this.#t),Ue(),T(We()));var t=this.#n.onerror;let n=this.#n.failed;var r=!1,i=!1;let a=()=>{if(r){Be();return}r=!0,i&&Me(),this.#s!==null&&er(this.#s,()=>{this.#s=null}),this.#x(()=>{this.#y()})},o=e=>{try{i=!0,t?.(e,a),i=!1}catch(e){dt(e,this.#i&&this.#i.parent)}n&&(this.#s=this.#x(()=>{try{return Jn(()=>{var t=V;t.b=this,t.f|=128,n(this.#e,()=>e,()=>a)})}catch(e){return dt(e,this.#i.parent),null}}))};ct(()=>{var t;try{t=this.transform_error(e)}catch(e){dt(e,this.#i&&this.#i.parent);return}typeof t==`object`&&t&&typeof t.then==`function`?t.then(o,e=>dt(e,this.#i&&this.#i.parent)):o(t)})}};function Ct(e,t,n,r){let i=rt()?Dt:At;var a=e.filter(e=>!e.settled),o=t.map(i);if(n.length===0&&a.length===0){r(o);return}var s=V,c=wt(),l=a.length===1?a[0].promise:a.length>1?Promise.all(a.map(e=>e.promise)):null;function u(e){if(!(s.f&16384)){c();try{r([...o,...e])}catch(e){dt(e,s)}Tt()}}var d=Et();if(n.length===0){l.then(()=>u([])).finally(d);return}function f(){Promise.all(n.map(e=>kt(e))).then(u).catch(e=>dt(e,s)).finally(d)}l?l.then(()=>{c(),f(),Tt()}):f()}function wt(){var e=V,t=B,n=D,r=M;return function(i=!0){dr(e),ur(t),Qe(n),i&&!(e.f&16384)&&(r?.activate(),r?.apply())}}function Tt(e=!0){dr(null),ur(null),Qe(null),e&&M?.deactivate()}function Et(){var e=V,t=e.b,n=M,r=!!t?.is_rendered();return t?.update_pending_count(1,n),n.increment(r,e),()=>{t?.update_pending_count(-1,n),n.decrement(r,e)}}function Dt(e){var t=2|v;return V!==null&&(V.f|=re),{ctx:D,deps:null,effects:null,equals:Ke,f:t,fn:e,reactions:null,rv:0,v:S,wv:0,parent:V,ac:null}}var Ot=Symbol(`obsolete`);function kt(e,t,n){let r=V;r===null&&xe();var i=void 0,a=sn(S),o=!B,s=new Set;return Wn(()=>{var t=V,n=m();i=n.promise;try{Promise.resolve(e()).then(n.resolve,e=>{e!==ve&&n.reject(e)}).finally(Tt)}catch(e){n.reject(e),Tt()}var c=M;if(o){if(t.f&32768)var l=Et();if(r.b?.is_rendered())c.async_deriveds.get(t)?.reject(Ot);else for(let e of s.values())e.reject(Ot);s.add(n),c.async_deriveds.set(t,n)}let u=(e,t=void 0)=>{l?.(),s.delete(n),t!==Ot&&(c.activate(),t?(a.f|=le,ln(a,t)):(a.f&8388608&&(a.f^=le),ln(a,e)),c.deactivate())};n.promise.then(u,e=>u(null,e||`unknown`))}),Ln(()=>{for(let e of s)e.reject(Ot)}),new Promise(e=>{function t(n){function r(){n===i?e(a):t(i)}n.then(r,r)}t(i)})}function j(e){let t=Dt(e);return Ye||pr(t),t}function At(e){let t=Dt(e);return t.equals=Je,t}function jt(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)z(t[n])}}function Mt(e){var t,n=V,r=e.parent;if(!sr&&r!==null&&e.v!==S&&r.f&24576)return Le(),e.v;dr(r);try{e.f&=~oe,jt(e),t=Tr(e)}finally{dr(n)}return t}function Nt(e){var t=Mt(e);if(!e.equals(t)&&(e.wv=Sr(),(!M?.is_fork||e.deps===null)&&(M===null?e.v=t:(M.capture(e,t,!0),Rt?.capture(e,t,!0)),e.deps===null))){A(e,_);return}sr||(zt===null?pt(e):(In()||M?.is_fork)&&zt.set(e,t))}function Pt(e){if(e.effects!==null)for(let t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(ve),t.fn!==null&&(t.teardown=f),t.ac=null,Dr(t,0),Xn(t))}function Ft(e){if(e.effects!==null)for(let t of e.effects)t.teardown&&t.fn!==null&&Or(t)}var It=null,Lt=null,M=null,Rt=null,zt=null,Bt=null,Vt=!1,Ht=!1,Ut=null,Wt=null,Gt=0,Kt=1,qt=class e{id=Kt++;#e=!1;linked=!0;#t=null;#n=null;async_deriveds=new Map;current=new Map;previous=new Map;#r=new Set;#i=new Set;#a=0;#o=new Map;#s=null;#c=[];#l=[];#u=new Set;#d=new Set;#f=new Map;#p=new Set;is_fork=!1;#m=!1;constructor(){Lt===null?It=Lt=this:(Lt.#n=this,this.#t=Lt),Lt=this}#h(){if(this.is_fork)return!0;for(let n of this.#o.keys()){for(var e=n,t=!1;e.parent!==null;){if(this.#f.has(e)){t=!0;break}e=e.parent}if(!t)return!0}return!1}skip_effect(e){this.#f.has(e)||this.#f.set(e,{d:[],m:[]}),this.#p.delete(e)}unskip_effect(e,t=e=>this.schedule(e)){var n=this.#f.get(e);if(n){this.#f.delete(e);for(var r of n.d)A(r,v),t(r);for(r of n.m)A(r,y),t(r)}this.#p.add(e)}#g(){this.#e=!0,Gt++>1e3&&(this.#S(),Yt());for(let e of this.#u)this.#d.delete(e),A(e,v),this.schedule(e);for(let e of this.#d)A(e,y),this.schedule(e);let t=this.#c;this.#c=[],this.apply();var n=Ut=[],r=[],i=Wt=[];for(let e of t)try{this.#_(e,n,r)}catch(t){throw nn(e),this.#h()||this.discard(),t}if(M=null,i.length>0){var a=e.ensure();for(let e of i)a.schedule(e)}if(Ut=null,Wt=null,this.#h()){this.#b(r),this.#b(n);for(let[e,t]of this.#f)tn(e,t);i.length>0&&M.#g();return}let o=this.#v();if(o){this.#b(r),this.#b(n),o.#y(this);return}this.#u.clear(),this.#d.clear();for(let e of this.#r)e(this);this.#r.clear(),Rt=this,Zt(r),Zt(n),Rt=null,this.#s?.resolve();var s=M;if(this.#a===0&&(this.#c.length===0||s!==null)&&(this.#S(),Ye&&(this.#x(),M=s)),this.#c.length>0)if(s!==null){let e=s;e.#c.push(...this.#c.filter(t=>!e.#c.includes(t)))}else s=this;s!==null&&s.#g()}#_(e,t,n){e.f^=_;for(var r=e.first;r!==null;){var i=r.f,a=(i&96)!=0;if(!(a&&i&1024||i&8192||this.#f.has(r))&&r.fn!==null){a?r.f^=_:i&4?t.push(r):Ye&&i&16777224?n.push(r):Cr(r)&&(i&16&&this.#d.add(r),Or(r));var o=r.first;if(o!==null){r=o;continue}}for(;r!==null;){var s=r.next;if(s!==null){r=s;break}r=r.parent}}}#v(){for(var e=this.#t;e!==null;){if(!e.is_fork){for(let[t,[,n]]of this.current)if(e.current.has(t)&&!n)return e}e=e.#t}return null}#y(e){for(let[t,n]of e.current)!this.previous.has(t)&&e.previous.has(t)&&this.previous.set(t,e.previous.get(t)),this.current.set(t,n);for(let[t,n]of e.async_deriveds){let e=this.async_deriveds.get(t);e&&n.promise.then(e.resolve).catch(e.reject)}e.async_deriveds.clear(),this.transfer_effects(e.#u,e.#d);let t=e=>{var n=e.reactions;if(n!==null)for(let e of n){var r=e.f;if(r&2)t(e);else{var i=e;r&4194320&&!this.async_deriveds.has(i)&&(this.#d.delete(i),A(i,v),this.schedule(i))}}};for(let e of this.current.keys())t(e);this.oncommit(()=>e.discard()),e.#S(),M=this,this.#g()}#b(e){for(var t=0;t<e.length;t+=1)ht(e[t],this.#u,this.#d)}capture(e,t,n=!1){e.v!==S&&!this.previous.has(e)&&this.previous.set(e,e.v),e.f&8388608||(this.current.set(e,[t,n]),zt?.set(e,t)),this.is_fork||(e.v=t)}activate(){M=this}deactivate(){M=null,zt=null}flush(){try{Ht=!0,M=this,this.#g()}finally{Gt=0,Bt=null,Ut=null,Wt=null,Ht=!1,M=null,zt=null,an.clear()}}discard(){for(let e of this.#i)e(this);this.#i.clear();for(let e of this.async_deriveds.values())e.reject(Ot);this.#S(),this.#s?.resolve()}register_created_effect(e){this.#l.push(e)}#x(){for(let u=It;u!==null;u=u.#n){var e=u.id<this.id,t=[];for(let[r,[i,a]]of this.current){if(u.current.has(r)){var n=u.current.get(r)[0];if(e&&i!==n)u.current.set(r,[i,a]);else continue}t.push(r)}if(e)for(let[e,t]of this.async_deriveds){let n=u.async_deriveds.get(e);n&&t.promise.then(n.resolve).catch(n.reject)}var r=[...u.current.keys()].filter(e=>!u.current.get(e)[1]);if(!(!u.#e||r.length===0)){var i=r.filter(e=>!this.current.has(e));if(i.length===0)e&&u.discard();else if(t.length>0){if(e)for(let e of this.#p)u.unskip_effect(e,e=>{e.f&4194320?u.schedule(e):u.#b([e])});u.activate();var a=new Set,o=new Map;for(var s of t)Qt(s,i,a,o);o=new Map;var c=[...u.current].filter(([e,t])=>{let n=this.current.get(e);return n?n[0]!==t[0]||n[1]!==t[1]:!0}).map(([e])=>e);if(c.length>0)for(let e of this.#l)!(e.f&155648)&&$t(e,c,o)&&(e.f&4194320?(A(e,v),u.schedule(e)):u.#u.add(e));if(u.#c.length>0&&!u.#m){u.apply();for(var l of u.#c)u.#_(l,[],[]);u.#c=[]}u.deactivate()}}}}increment(e,t){if(this.#a+=1,e){let e=this.#o.get(t)??0;this.#o.set(t,e+1)}}decrement(e,t){if(--this.#a,e){let e=this.#o.get(t)??0;e===1?this.#o.delete(t):this.#o.set(t,e-1)}this.#m||(this.#m=!0,ct(()=>{this.#m=!1,this.linked&&this.flush()}))}transfer_effects(e,t){for(let t of e)this.#u.add(t);for(let e of t)this.#d.add(e);e.clear(),t.clear()}oncommit(e){this.#r.add(e)}ondiscard(e){this.#i.add(e)}settled(){return(this.#s??=m()).promise}static ensure(){if(M===null){let t=M=new e;!Ht&&!Vt&&ct(()=>{t.#e||t.flush()})}return M}apply(){if(!Ye||!this.is_fork&&this.#t===null&&this.#n===null){zt=null;return}zt=new Map;for(let[e,[t]]of this.current)zt.set(e,t);for(let t=It;t!==null;t=t.#n)if(!(t===this||t.is_fork)){var e=!1;if(t.id<this.id){for(let[n,[,r]]of t.current)if(!r&&this.current.has(n)){e=!0;break}}if(!e)for(let[e,n]of t.previous)zt.has(e)||zt.set(e,n)}}schedule(e){if(Bt=e,e.b?.is_pending&&e.f&16777228&&!(e.f&32768)){e.b.defer_effect(e);return}for(var t=e;t.parent!==null;){t=t.parent;var n=t.f;if(Ut!==null&&t===V&&(Ye||(B===null||!(B.f&2))&&!gt))return;if(n&96){if(!(n&1024))return;t.f^=_}}this.#c.push(t)}#S(){if(this.linked){var e=this.#t,t=this.#n;e===null?It=t:e.#n=t,t===null?Lt=e:t.#t=e,this.linked=!1}}};function Jt(e){var t=Vt;Vt=!0;try{var n;for(e&&(M!==null&&!M.is_fork&&M.flush(),n=e());;){if(lt(),M===null)return n;M.flush()}}finally{Vt=t}}function Yt(){try{Ee()}catch(e){dt(e,Bt)}}var Xt=null;function Zt(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if(!(r.f&24576)&&Cr(r)&&(Xt=new Set,Or(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&$n(r),Xt?.size>0)){an.clear();for(let e of Xt){if(e.f&24576)continue;let t=[e],n=e.parent;for(;n!==null;)Xt.has(n)&&(Xt.delete(n),t.push(n)),n=n.parent;for(let e=t.length-1;e>=0;e--){let n=t[e];n.f&24576||Or(n)}}Xt.clear()}}Xt=null}}function Qt(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(let i of e.reactions){let e=i.f;e&2?Qt(i,t,n,r):e&4194320&&!(e&2048)&&$t(i,t,r)&&(A(i,v),en(i))}}function $t(e,t,r){let i=r.get(e);if(i!==void 0)return i;if(e.deps!==null)for(let i of e.deps){if(n.call(t,i))return!0;if(i.f&2&&$t(i,t,r))return r.set(i,!0),!0}return r.set(e,!1),!1}function en(e){M.schedule(e)}function tn(e,t){if(!(e.f&32&&e.f&1024)){e.f&2048?t.d.push(e):e.f&4096&&t.m.push(e),A(e,_);for(var n=e.first;n!==null;)tn(n,t),n=n.next}}function nn(e){A(e,_);for(var t=e.first;t!==null;)nn(t),t=t.next}var rn=new Set,an=new Map,on=!1;function sn(e,t){return{f:0,v:e,reactions:null,equals:Ke,rv:0,wv:0}}function N(e,t){let n=sn(e,t);return pr(n),n}function cn(e,t=!1,n=!0){let r=sn(e);return t||(r.equals=Je),Xe&&n&&D!==null&&D.l!==null&&(D.l.s??=[]).push(r),r}function P(e,t,n=!1){return B!==null&&(!lr||B.f&131072)&&rt()&&B.f&4325394&&(fr===null||!fr.has(e))&&je(),ln(e,n?pn(t):t,Wt)}function ln(e,t,n=null){if(!e.equals(t)){an.set(e,sr?t:e.v);var r=qt.ensure();if(r.capture(e,t),e.f&2){let t=e;e.f&2048&&Mt(t),zt===null&&pt(t)}e.wv=Sr(),fn(e,v,n),rt()&&V!==null&&V.f&1024&&!(V.f&96)&&(gr===null?_r([e]):gr.push(e)),!r.is_fork&&rn.size>0&&!on&&un()}return t}function un(){on=!1;for(let e of rn){e.f&1024&&A(e,y);let t;try{t=Cr(e)}catch{t=!0}t&&Or(e)}rn.clear()}function dn(e){P(e,e.v+1)}function fn(e,t,n){var r=e.reactions;if(r!==null)for(var i=rt(),a=r.length,o=0;o<a;o++){var s=r[o],c=s.f;if(!(!i&&s===V)){var l=(c&v)===0;if(l&&A(s,t),c&131072)rn.add(s);else if(c&2){var u=s;zt?.delete(u),c&65536||(c&512&&(V===null||!(V.f&2097152))&&(s.f|=oe),fn(u,y,n))}else if(l){var d=s;c&16&&Xt!==null&&Xt.add(d),n===null?en(d):n.push(d)}}}}function pn(t){if(typeof t!=`object`||!t||ue in t)return t;let n=l(t);if(n!==s&&n!==c)return t;var r=new Map,i=e(t),o=N(0),u=null,d=br,f=e=>{if(br===d)return e();var t=B,n=br;ur(null),xr(d);var r=e();return ur(t),xr(n),r};return i&&r.set(`length`,N(t.length,u)),new Proxy(t,{defineProperty(e,t,n){(!(`value`in n)||n.configurable===!1||n.enumerable===!1||n.writable===!1)&&ke();var i=r.get(t);return i===void 0?f(()=>{var e=N(n.value,u);return r.set(t,e),e}):P(i,n.value,!0),!0},deleteProperty(e,t){var n=r.get(t);if(n===void 0){if(t in e){let e=f(()=>N(S,u));r.set(t,e),dn(o)}}else P(n,S),dn(o);return!0},get(e,n,i){if(n===ue)return t;var o=r.get(n),s=n in e;if(o===void 0&&(!s||a(e,n)?.writable)&&(o=f(()=>N(pn(s?e[n]:S),u)),r.set(n,o)),o!==void 0){var c=H(o);return c===S?void 0:c}return Reflect.get(e,n,i)},getOwnPropertyDescriptor(e,t){var n=Reflect.getOwnPropertyDescriptor(e,t);if(n&&`value`in n){var i=r.get(t);i&&(n.value=H(i))}else if(n===void 0){var a=r.get(t),o=a?.v;if(a!==void 0&&o!==S)return{enumerable:!0,configurable:!0,value:o,writable:!0}}return n},has(e,t){if(t===ue)return!0;var n=r.get(t),i=n!==void 0&&n.v!==S||Reflect.has(e,t);return(n!==void 0||V!==null&&(!i||a(e,t)?.writable))&&(n===void 0&&(n=f(()=>N(i?pn(e[t]):S,u)),r.set(t,n)),H(n)===S)?!1:i},set(e,t,n,s){var c=r.get(t),l=t in e;if(i&&t===`length`)for(var d=n;d<c.v;d+=1){var p=r.get(d+``);p===void 0?d in e&&(p=f(()=>N(S,u)),r.set(d+``,p)):P(p,S)}if(c===void 0)(!l||a(e,t)?.writable)&&(c=f(()=>N(void 0,u)),P(c,pn(n)),r.set(t,c));else{l=c.v!==S;var m=f(()=>pn(n));P(c,m)}var h=Reflect.getOwnPropertyDescriptor(e,t);if(h?.set&&h.set.call(s,n),!l){if(i&&typeof t==`string`){var g=r.get(`length`),_=Number(t);Number.isInteger(_)&&_>=g.v&&P(g,_+1)}dn(o)}return!0},ownKeys(e){H(o);var t=Reflect.ownKeys(e).filter(e=>{var t=r.get(e);return t===void 0||t.v!==S});for(var[n,i]of r)i.v!==S&&!(n in e)&&t.push(n);return t},setPrototypeOf(){Ae()}})}function mn(e){try{if(typeof e==`object`&&e&&ue in e)return e[ue]}catch{}return e}function hn(e,t){return Object.is(mn(e),mn(t))}new Set([`copyWithin`,`fill`,`pop`,`push`,`reverse`,`shift`,`sort`,`splice`,`unshift`]);var gn,_n,vn,yn;function bn(){if(gn===void 0){gn=window,_n=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;vn=a(t,`firstChild`).get,yn=a(t,`nextSibling`).get,u(e)&&(e[me]=void 0,e[pe]=null,e[he]=void 0,e.__e=void 0),u(n)&&(n[ge]=void 0)}}function xn(e=``){return document.createTextNode(e)}function Sn(e){return vn.call(e)}function Cn(e){return yn.call(e)}function F(e,t){if(!C)return Sn(e);var n=Sn(w);if(n===null)n=w.appendChild(xn());else if(t&&n.nodeType!==3){var r=xn();return n?.before(r),T(r),r}return t&&Dn(n),T(n),n}function I(e,t=!1){if(!C){var n=Sn(e);return n instanceof Comment&&n.data===``?Cn(n):n}if(t){if(w?.nodeType!==3){var r=xn();return w?.before(r),T(r),r}Dn(w)}return w}function L(e,t=1,n=!1){let r=C?w:e;for(var i;t--;)i=r,r=Cn(r);if(!C)return r;if(n){if(r?.nodeType!==3){var a=xn();return r===null?i?.after(a):r.before(a),T(a),a}Dn(r)}return T(r),r}function wn(e){e.textContent=``}function Tn(){return!Ye||Xt!==null?!1:(V.f&x)!==0}function En(e,t,n){return t==null||t===`http://www.w3.org/1999/xhtml`?n?document.createElement(e,{is:n}):document.createElement(e):n?document.createElementNS(t,e,{is:n}):document.createElementNS(t,e)}function Dn(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===3;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function On(e,t){if(t){let t=document.body;e.autofocus=!0,ct(()=>{document.activeElement===t&&e.focus()})}}var kn=!1;function An(){kn||(kn=!0,document.addEventListener(`reset`,e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(let t of e.target.elements)t[_e]?.()})},{capture:!0}))}function jn(e){var t=B,n=V;ur(null),dr(null);try{return e()}finally{ur(t),dr(n)}}function Mn(e,t,n,r=n){e.addEventListener(t,()=>jn(n));let i=e[_e];i?e[_e]=()=>{i(),r(!0)}:e[_e]=()=>r(!0),An()}function Nn(e){V===null&&(B===null&&Te(e),we()),sr&&Ce(e)}function Pn(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function Fn(e,t){var n=V;n!==null&&n.f&8192&&(e|=b);var r={ctx:D,deps:null,nodes:null,f:e|v|512,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};M?.register_created_effect(r);var i=r;if(e&4)Ut===null?qt.ensure().schedule(r):Ut.push(r);else if(t!==null){try{Or(r)}catch(e){throw z(r),e}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&!(i.f&524288)&&(i=i.first,e&16&&e&65536&&i!==null&&(i.f|=ne))}if(i!==null&&(i.parent=n,n!==null&&Pn(i,n),B!==null&&B.f&2&&!(e&64))){var a=B;(a.effects??=[]).push(i)}return r}function In(){return B!==null&&!lr}function Ln(e){let t=Fn(8,null);return A(t,_),t.teardown=e,t}function Rn(e){Nn(`$effect`);var t=V.f;if(!B&&t&32&&D!==null&&!D.i){var n=D;(n.e??=[]).push(e)}else return zn(e)}function zn(e){return Fn(4|ie,e)}function Bn(e){return Nn(`$effect.pre`),Fn(8|ie,e)}function Vn(e){qt.ensure();let t=Fn(64|re,e);return()=>{z(t)}}function Hn(e){qt.ensure();let t=Fn(64|re,e);return(e={})=>new Promise(n=>{e.outro?er(t,()=>{z(t),n(void 0)}):(z(t),n(void 0))})}function Un(e){return Fn(4,e)}function Wn(e){return Fn(ce|re,e)}function Gn(e,t=0){return Fn(8|t,e)}function R(e,t=[],n=[],r=[]){Ct(r,t,n,t=>{Fn(8,()=>{e(...t.map(H))})})}function Kn(e,t=0){return Fn(16|t,e)}function qn(e,t=0){return Fn(g|t,e)}function Jn(e){return Fn(32|re,e)}function Yn(e){var t=e.teardown;if(t!==null){let e=sr,n=B;cr(!0),ur(null);try{t.call(null)}finally{cr(e),ur(n)}}}function Xn(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){let e=n.ac;e!==null&&jn(()=>{e.abort(ve)});var r=n.next;n.f&64?n.parent=null:z(n,t),n=r}}function Zn(e){for(var t=e.first;t!==null;){var n=t.next;t.f&32||z(t),t=n}}function z(e,t=!0){var n=!1;(t||e.f&262144)&&e.nodes!==null&&e.nodes.end!==null&&(Qn(e.nodes.start,e.nodes.end),n=!0),e.f|=te,Xn(e,t&&!n),Dr(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)e.stop();Yn(e),e.f^=te,e.f|=ee;var i=e.parent;i!==null&&i.first!==null&&$n(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Qn(e,t){for(;e!==null;){var n=e===t?null:Cn(e);e.remove(),e=n}}function $n(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function er(e,t,n=!0){var r=[];tr(e,r,!0);var i=()=>{n&&z(e),t&&t()},a=r.length;if(a>0){var o=()=>--a||i();for(var s of r)s.out(o)}else i()}function tr(e,t,n){if(!(e.f&8192)){e.f^=b;var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)(e.is_global||n)&&t.push(e);for(var i=e.first;i!==null;){var a=i.next;if(!(i.f&64)){var o=(i.f&65536)!=0||(i.f&32)!=0&&(e.f&16)!=0;tr(i,t,o?n:!1)}i=a}}}function nr(e){rr(e,!0)}function rr(e,t){if(e.f&8192){e.f^=b,e.f&1024||(A(e,v),qt.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&65536)!=0||(n.f&32)!=0;rr(n,i?t:!1),n=r}var a=e.nodes&&e.nodes.t;if(a!==null)for(let e of a)(e.is_global||t)&&e.in()}}function ir(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:Cn(n);t.append(n),n=i}}var ar=null,or=!1,sr=!1;function cr(e){sr=e}var B=null,lr=!1;function ur(e){B=e}var V=null;function dr(e){V=e}var fr=null;function pr(e){B!==null&&(!Ye||B.f&2)&&(fr??=new Set).add(e)}var mr=null,hr=0,gr=null;function _r(e){gr=e}var vr=1,yr=0,br=yr;function xr(e){br=e}function Sr(){return++vr}function Cr(e){var t=e.f;if(t&2048)return!0;if(t&2&&(e.f&=~oe),t&4096){for(var n=e.deps,r=n.length,i=0;i<r;i++){var a=n[i];if(Cr(a)&&Nt(a),a.wv>e.wv)return!0}t&512&&zt===null&&A(e,_)}return!1}function wr(e,t,n=!0){var r=e.reactions;if(r!==null&&!(!Ye&&fr!==null&&fr.has(e)))for(var i=0;i<r.length;i++){var a=r[i];a.f&2?wr(a,t,!1):t===a&&(n?A(a,v):a.f&1024&&A(a,y),en(a))}}function Tr(e){var t=mr,n=hr,r=gr,i=B,a=fr,o=D,s=lr,c=br,l=e.f;mr=null,hr=0,gr=null,B=l&96?null:e,fr=null,Qe(e.ctx),lr=!1,br=++yr,e.ac!==null&&(jn(()=>{e.ac.abort(ve)}),e.ac=null);try{e.f|=se;var u=e.fn,d=u();e.f|=x;var f=e.deps,p=M?.is_fork;if(mr!==null){var m;if(p||Dr(e,hr),f!==null&&hr>0)for(f.length=hr+mr.length,m=0;m<mr.length;m++)f[hr+m]=mr[m];else e.deps=f=mr;if(In()&&e.f&512)for(m=hr;m<f.length;m++)(f[m].reactions??=[]).push(e)}else !p&&f!==null&&hr<f.length&&(Dr(e,hr),f.length=hr);if(rt()&&gr!==null&&!lr&&f!==null&&!(e.f&6146))for(m=0;m<gr.length;m++)wr(gr[m],e);if(i!==null&&i!==e){if(yr++,i.deps!==null)for(let e=0;e<n;e+=1)i.deps[e].rv=yr;if(t!==null)for(let e of t)e.rv=yr;gr!==null&&(r===null?r=gr:r.push(...gr))}return e.f&8388608&&(e.f^=le),d}catch(e){return ut(e)}finally{e.f^=se,mr=t,hr=n,gr=r,B=i,fr=a,Qe(o),lr=s,br=c}}function Er(e,r){let i=r.reactions;if(i!==null){var a=t.call(i,e);if(a!==-1){var o=i.length-1;o===0?i=r.reactions=null:(i[a]=i[o],i.pop())}}if(i===null&&r.f&2&&(mr===null||!n.call(mr,r))){var s=r;s.f&512&&(s.f^=512,s.f&=~oe),s.v!==S&&pt(s),Pt(s),Dr(s,0)}}function Dr(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Er(e,n[r])}function Or(e){var t=e.f;if(!(t&16384)){A(e,_);var n=V,r=or;V=e,or=!0;try{t&16777232?Zn(e):Xn(e),Yn(e);var i=Tr(e);e.teardown=typeof i==`function`?i:null,e.wv=vr}finally{or=r,V=n}}}async function kr(){if(Ye)return new Promise(e=>{requestAnimationFrame(()=>e()),setTimeout(()=>e())});await Promise.resolve(),Jt()}function H(e){var t=(e.f&2)!=0;if(ar?.add(e),B!==null&&!lr&&!(V!==null&&V.f&16384)&&(fr===null||!fr.has(e))){var r=B.deps;if(B.f&2097152)e.rv<yr&&(e.rv=yr,mr===null&&r!==null&&r[hr]===e?hr++:mr===null?mr=[e]:mr.push(e));else{B.deps??=[],n.call(B.deps,e)||B.deps.push(e);var i=e.reactions;i===null?e.reactions=[B]:n.call(i,B)||i.push(B)}}if(sr&&an.has(e))return an.get(e);if(t){var a=e;if(sr){var o=a.v;return(!(a.f&1024)&&a.reactions!==null||jr(a))&&(o=Mt(a)),an.set(a,o),o}var s=(a.f&512)==0&&!lr&&B!==null&&(or||(B.f&512)!=0),c=(a.f&x)===0;Cr(a)&&(s&&(a.f|=512),Nt(a)),s&&!c&&(Ft(a),Ar(a))}if(zt?.has(e))return zt.get(e);if(e.f&8388608)throw e.v;return e.v}function Ar(e){if(e.f|=512,e.deps!==null)for(let t of e.deps)(t.reactions??=[]).push(e),t.f&2&&!(t.f&512)&&(Ft(t),Ar(t))}function jr(e){if(e.v===S)return!0;if(e.deps===null)return!1;for(let t of e.deps)if(an.has(t)||t.f&2&&jr(t))return!0;return!1}function Mr(e){var t=lr;try{return lr=!0,e()}finally{lr=t}}function Nr(){return Symbol(Ie)}function Pr(e){return e.endsWith(`capture`)&&e!==`gotpointercapture`&&e!==`lostpointercapture`}var Fr=[`beforeinput`,`click`,`change`,`dblclick`,`contextmenu`,`focusin`,`focusout`,`input`,`keydown`,`keyup`,`mousedown`,`mousemove`,`mouseout`,`mouseover`,`mouseup`,`pointerdown`,`pointermove`,`pointerout`,`pointerover`,`pointerup`,`touchend`,`touchmove`,`touchstart`];function Ir(e){return Fr.includes(e)}var Lr=`allowfullscreen.async.autofocus.autoplay.checked.controls.default.disabled.formnovalidate.indeterminate.inert.ismap.loop.multiple.muted.nomodule.novalidate.open.playsinline.readonly.required.reversed.seamless.selected.webkitdirectory.defer.disablepictureinpicture.disableremoteplayback`.split(`.`),Rr={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 zr(e){return e=e.toLowerCase(),Rr[e]??e}[...Lr];var Br=[`touchstart`,`touchmove`];function Vr(e){return Br.includes(e)}var Hr=[`textarea`,`script`,`style`,`title`];function Ur(e){return Hr.includes(e)}var Wr=Symbol(`events`),Gr=new Set,Kr=new Set;function qr(e,t,n,r={}){function i(e){if(r.capture||Qr.call(t,e),!e.cancelBubble)return jn(()=>n?.call(this,e))}return e.startsWith(`pointer`)||e.startsWith(`touch`)||e===`wheel`?ct(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function Jr(e,t,n,r={}){var i=qr(t,e,n,r);return()=>{e.removeEventListener(t,i,r)}}function Yr(e,t,n){(t[Wr]??={})[e]=n}function Xr(e){for(var t=0;t<e.length;t++)Gr.add(e[t]);for(var n of Kr)n(e)}var Zr=null;function Qr(e){var t=this,n=t.ownerDocument,r=e.type,a=e.composedPath?.()||[],o=a[0]||e.target;Zr=e;var s=0,c=Zr===e&&e[Wr];if(c){var l=a.indexOf(c);if(l!==-1&&(t===document||t===window)){e[Wr]=t;return}var u=a.indexOf(t);if(u===-1)return;l<=u&&(s=l)}if(o=a[s]||e.target,o!==t){i(e,`currentTarget`,{configurable:!0,get(){return o||n}});var d=B,f=V;ur(null),dr(null);try{for(var p,m=[];o!==null&&o!==t;){try{var h=o[Wr]?.[r];h!=null&&(!o.disabled||e.target===o)&&h.call(o,e)}catch(e){p?m.push(e):p=e}if(e.cancelBubble)break;s++,o=s<a.length?a[s]:null}if(p){for(let e of m)queueMicrotask(()=>{throw e});throw p}}finally{e[Wr]=t,delete e.currentTarget,ur(d),dr(f)}}}var $r=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy(`svelte-trusted-html`,{createHTML:e=>e});function ei(e){return $r?.createHTML(e)??e}function ti(e){var t=En(`template`);return t.innerHTML=ei(e.replaceAll(`<!>`,`\\x3C!---->`)),t.content}function ni(e,t){var n=V;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function U(e,t){var n=(t&1)!=0,r=(t&2)!=0,i,a=!e.startsWith(`<!>`);return()=>{if(C)return ni(w,null),w;i===void 0&&(i=ti(a?e:`<!>`+e),n||(i=Sn(i)));var t=r||_n?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=Sn(t),s=t.lastChild;ni(o,s)}else ni(t,t);return t}}function ri(e,t,n=`svg`){var r=!e.startsWith(`<!>`),i=(t&1)!=0,a=`<${n}>${r?e:`<!>`+e}</${n}>`,o;return()=>{if(C)return ni(w,null),w;if(!o){var e=Sn(ti(a));if(i)for(o=document.createDocumentFragment();Sn(e);)o.appendChild(Sn(e));else o=Sn(e)}var t=o.cloneNode(!0);if(i){var n=Sn(t),r=t.lastChild;ni(n,r)}else ni(t,t);return t}}function ii(e,t){return ri(e,t,`svg`)}function ai(e=``){if(!C){var t=xn(e+``);return ni(t,t),t}var n=w;return n.nodeType===3?Dn(n):(n.before(n=xn()),T(n)),ni(n,n),n}function W(){if(C)return ni(w,null),w;var e=document.createDocumentFragment(),t=document.createComment(``),n=xn();return e.append(t,n),ni(t,n),e}function G(e,t){if(C){var n=V;(!(n.f&32768)||n.nodes.end===null)&&(n.nodes.end=w),He();return}e!==null&&e.before(t)}function oi(){if(C&&w&&w.nodeType===8&&w.textContent?.startsWith(`$`)){let e=w.textContent.substring(1);return He(),e}return(window.__svelte??={}).uid??=1,`c${window.__svelte.uid++}`}function K(e,t){var n=t==null?``:typeof t==`object`?`${t}`:t;n!==(e[ge]??=e.nodeValue)&&(e[ge]=n,e.nodeValue=`${n}`)}function si(e,t){return li(e,t)}var ci=new Map;function li(e,{target:t,anchor:n,props:i={},events:a,context:o,intro:s=!0,transformError:c}){bn();var l=void 0,u=Hn(()=>{var s=n??t.appendChild(xn());xt(s,{pending:()=>{}},t=>{O({});var n=D;if(o&&(n.c=o),a&&(i.$$events=a),C&&ni(t,null),l=e(t,i)||{},C&&(V.nodes.end=w,w===null||w.nodeType!==8||w.data!==`]`))throw Re(),Ne;k()},c);var u=new Set,d=e=>{for(var n=0;n<e.length;n++){var r=e[n];if(!u.has(r)){u.add(r);var i=Vr(r);for(let e of[t,document]){var a=ci.get(e);a===void 0&&(a=new Map,ci.set(e,a));var o=a.get(r);o===void 0?(e.addEventListener(r,Qr,{passive:i}),a.set(r,1)):a.set(r,o+1)}}}};return d(r(Gr)),Kr.add(d),()=>{for(var e of u)for(let n of[t,document]){var r=ci.get(n),i=r.get(e);--i==0?(n.removeEventListener(e,Qr),r.delete(e),r.size===0&&ci.delete(n)):r.set(e,i)}Kr.delete(d),s!==n&&s.parentNode?.removeChild(s)}});return ui.set(l,u),l}var ui=new WeakMap;function di(e,t){let n=ui.get(e);return n?(ui.delete(e),n(t)):Promise.resolve()}var fi=class{anchor;#e=new Map;#t=new Map;#n=new Map;#r=new Set;#i=!0;constructor(e,t=!0){this.anchor=e,this.#i=t}#a=e=>{if(this.#e.has(e)){var t=this.#e.get(e),n=this.#t.get(t);if(n)nr(n),this.#r.delete(t);else{var r=this.#n.get(t);r&&(nr(r.effect),this.#t.set(t,r.effect),this.#n.delete(t),r.fragment.lastChild.remove(),this.anchor.before(r.fragment),n=r.effect)}for(let[t,n]of this.#e){if(this.#e.delete(t),t===e)break;let r=this.#n.get(n);r&&(z(r.effect),this.#n.delete(n))}for(let[e,r]of this.#t){if(e===t||this.#r.has(e))continue;let i=()=>{if(Array.from(this.#e.values()).includes(e)){var t=document.createDocumentFragment();ir(r,t),t.append(xn()),this.#n.set(e,{effect:r,fragment:t})}else z(r);this.#r.delete(e),this.#t.delete(e)};this.#i||!n?(this.#r.add(e),er(r,i,!1)):i()}}};#o=e=>{this.#e.delete(e);let t=Array.from(this.#e.values());for(let[e,n]of this.#n)t.includes(e)||(z(n.effect),this.#n.delete(e))};ensure(e,t){var n=M,r=Tn();if(t&&!this.#t.has(e)&&!this.#n.has(e))if(r){var i=document.createDocumentFragment(),a=xn();i.append(a),this.#n.set(e,{effect:Jn(()=>t(a)),fragment:i})}else this.#t.set(e,Jn(()=>t(this.anchor)));if(this.#e.set(n,e),r){for(let[t,r]of this.#t)t===e?n.unskip_effect(r):n.skip_effect(r);for(let[t,r]of this.#n)t===e?n.unskip_effect(r.effect):n.skip_effect(r.effect);n.oncommit(this.#a),n.ondiscard(this.#o)}else C&&(this.anchor=w),this.#a(n)}};function q(e,t,n=!1){var r;C&&(r=w,He());var i=new fi(e),a=n?ne:0;function o(e,t){if(C){var n=Ge(r);if(e!==parseInt(n.substring(1))){var a=We();T(a),i.anchor=a,Ve(!1),i.ensure(e,t),Ve(!0);return}}i.ensure(e,t)}Kn(()=>{var e=!1;t((t,n=0)=>{e=!0,o(n,t)}),e||o(-1,null)},a)}var pi=Symbol(`NaN`);function mi(e,t,n){C&&He();var r=new fi(e),i=!rt();Kn(()=>{var e=t();e!==e&&(e=pi),i&&typeof e==`object`&&e&&(e={}),r.ensure(e,n)})}function hi(e,t){return t}function gi(e,t,n){for(var i=[],a=t.length,o,s=t.length,c=0;c<a;c++){let n=t[c];er(n,()=>{if(o){if(o.pending.delete(n),o.done.add(n),o.pending.size===0){var t=e.outrogroups;_i(e,r(o.done)),t.delete(o),t.size===0&&(e.outrogroups=null)}}else --s},!1)}if(s===0){var l=i.length===0&&n!==null;if(l){var u=n,d=u.parentNode;wn(d),d.append(u),e.items.clear()}_i(e,t,!l)}else o={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(o)}function _i(e,t,n=!0){var r;if(e.pending.size>0){r=new Set;for(let t of e.pending.values())for(let n of t)r.add(e.items.get(n).e)}for(var i=0;i<t.length;i++){var a=t[i];r?.has(a)?(a.f|=ae,ir(a,document.createDocumentFragment())):z(t[i],n)}}var vi;function yi(t,n,i,a,o,s=null){var c=t,l=new Map;if(n&4){var u=t;c=C?T(Sn(u)):u.appendChild(xn())}C&&He();var d=null,f=At(()=>{var t=i();return e(t)?t:t==null?[]:r(t)}),p,m=new Map,h=!0;function g(e){v.effect.f&16384||(v.pending.delete(e),v.fallback=d,xi(v,p,c,n,a),d!==null&&(p.length===0?d.f&33554432?(d.f^=ae,Ci(d,null,c)):nr(d):er(d,()=>{d=null})))}function _(e){v.pending.delete(e)}var v={effect:Kn(()=>{p=H(f);var e=p.length;let t=!1;C&&Ge(c)===`[!`!=(e===0)&&(c=We(),T(c),Ve(!1),t=!0);for(var r=new Set,u=M,v=Tn(),y=0;y<e;y+=1){C&&w.nodeType===8&&w.data===`]`&&(c=w,t=!0,Ve(!1));var b=p[y],ee=a(b,y),x=h?null:l.get(ee);x?(x.v&&ln(x.v,b),x.i&&ln(x.i,y),v&&u.unskip_effect(x.e)):(x=Si(l,h?c:vi??=xn(),b,ee,y,o,n,i),h||(x.e.f|=ae),l.set(ee,x)),r.add(ee)}if(e===0&&s&&!d&&(h?d=Jn(()=>s(c)):(d=Jn(()=>s(vi??=xn())),d.f|=ae)),e>r.size&&Se(``,``,``),C&&e>0&&T(We()),!h)if(m.set(u,r),v){for(let[e,t]of l)r.has(e)||u.skip_effect(t.e);u.oncommit(g),u.ondiscard(_)}else g(u);t&&Ve(!0),H(f)}),flags:n,items:l,pending:m,outrogroups:null,fallback:d};h=!1,C&&(c=w)}function bi(e){for(;e!==null&&!(e.f&32);)e=e.next;return e}function xi(e,t,n,i,a){var o=(i&8)!=0,s=t.length,c=e.items,l=bi(e.effect.first),u,d=null,f,p=[],m=[],h,g,_,v;if(o)for(v=0;v<s;v+=1)h=t[v],g=a(h,v),_=c.get(g).e,_.f&33554432||(_.nodes?.a?.measure(),(f??=new Set).add(_));for(v=0;v<s;v+=1){if(h=t[v],g=a(h,v),_=c.get(g).e,e.outrogroups!==null)for(let t of e.outrogroups)t.pending.delete(_),t.done.delete(_);if(_.f&8192&&(nr(_),o&&(_.nodes?.a?.unfix(),(f??=new Set).delete(_))),_.f&33554432)if(_.f^=ae,_===l)Ci(_,null,n);else{var y=d?d.next:l;_===e.effect.last&&(e.effect.last=_.prev),_.prev&&(_.prev.next=_.next),_.next&&(_.next.prev=_.prev),wi(e,d,_),wi(e,_,y),Ci(_,y,n),d=_,p=[],m=[],l=bi(d.next);continue}if(_!==l){if(u!==void 0&&u.has(_)){if(p.length<m.length){var b=m[0],ee;d=b.prev;var x=p[0],te=p[p.length-1];for(ee=0;ee<p.length;ee+=1)Ci(p[ee],b,n);for(ee=0;ee<m.length;ee+=1)u.delete(m[ee]);wi(e,x.prev,te.next),wi(e,d,x),wi(e,te,b),l=b,d=te,--v,p=[],m=[]}else u.delete(_),Ci(_,l,n),wi(e,_.prev,_.next),wi(e,_,d===null?e.effect.first:d.next),wi(e,d,_),d=_;continue}for(p=[],m=[];l!==null&&l!==_;)(u??=new Set).add(l),m.push(l),l=bi(l.next);if(l===null)continue}_.f&33554432||p.push(_),d=_,l=bi(_.next)}if(e.outrogroups!==null){for(let t of e.outrogroups)t.pending.size===0&&(_i(e,r(t.done)),e.outrogroups?.delete(t));e.outrogroups.size===0&&(e.outrogroups=null)}if(l!==null||u!==void 0){var ne=[];if(u!==void 0)for(_ of u)_.f&8192||ne.push(_);for(;l!==null;)!(l.f&8192)&&l!==e.fallback&&ne.push(l),l=bi(l.next);var re=ne.length;if(re>0){var ie=i&4&&s===0?n:null;if(o){for(v=0;v<re;v+=1)ne[v].nodes?.a?.measure();for(v=0;v<re;v+=1)ne[v].nodes?.a?.fix()}gi(e,ne,ie)}}o&&ct(()=>{if(f!==void 0)for(_ of f)_.nodes?.a?.apply()})}function Si(e,t,n,r,i,a,o,s){var c=o&1?o&16?sn(n):cn(n,!1,!1):null,l=o&2?sn(i):null;return{v:c,i:l,e:Jn(()=>(a(t,c??n,l??i,s),()=>{e.delete(r)}))}}function Ci(e,t,n){if(e.nodes)for(var r=e.nodes.start,i=e.nodes.end,a=t&&!(t.f&33554432)?t.nodes.start:n;r!==null;){var o=Cn(r);if(a.before(r),r===i)return;r=o}}function wi(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}function J(e,t,...n){var r=new fi(e);Kn(()=>{let e=t()??null;r.ensure(e,e&&(t=>e(t,...n)))},ne)}function Ti(e,t,n){var r;C&&(r=w,He());var i=new fi(e);Kn(()=>{var e=t()??null;if(C&&Ge(r)===`[`!=(e!==null)){var a=We();T(a),i.anchor=a,Ve(!1),i.ensure(e,e&&(t=>n(t,e))),Ve(!0);return}i.ensure(e,e&&(t=>n(t,e)))},ne)}function Ei(e,t,n,r,i,a){let o=C;C&&He();var s=null;C&&w.nodeType===1&&(s=w,He());var c=C?w:e,l=new fi(c,!1);Kn(()=>{let e=t()||null;var a=i?i():n||e===`svg`?Fe:void 0;if(e===null){l.ensure(null,null);return}return l.ensure(e,t=>{if(e){if(s=C?s:En(e,a),ni(s,s),r){var n=null;C&&Ur(e)&&s.append(n=document.createComment(``));var i=C?Sn(s):s.appendChild(xn());C&&(i===null?Ve(!1):T(i)),r(s,i),n?.remove()}V.nodes.end=s,t.before(s)}C&&T(t)}),()=>{}},ne),Ln(()=>{}),o&&(Ve(!0),T(c))}function Di(e,t){var n=void 0,r;qn(()=>{n!==(n=t())&&(r&&=(z(r),null),n&&(r=Jn(()=>{Un(()=>n(e))})))})}function Oi(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Oi(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function ki(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Oi(e))&&(r&&(r+=` `),r+=t);return r}function Ai(e){return typeof e==`object`?ki(e):e??``}var ji=[...` \n\\r\\f\\xA0\\v\uFEFF`];function Mi(e,t,n){var r=e==null?``:``+e;if(t&&(r=r?r+` `+t:t),n){for(var i of Object.keys(n))if(n[i])r=r?r+` `+i:i;else if(r.length)for(var a=i.length,o=0;(o=r.indexOf(i,o))>=0;){var s=o+a;(o===0||ji.includes(r[o-1]))&&(s===r.length||ji.includes(r[s]))?r=(o===0?``:r.substring(0,o))+r.substring(s+1):o=s}}return r===``?null:r}function Ni(e,t=!1){var n=t?` !important;`:`;`,r=``;for(var i of Object.keys(e)){var a=e[i];a!=null&&a!==``&&(r+=` `+i+`: `+a+n)}return r}function Pi(e){return e[0]!==`-`||e[1]!==`-`?e.toLowerCase():e}function Fi(e,t){if(t){var n=``,r,i;if(Array.isArray(t)?(r=t[0],i=t[1]):r=t,e){e=String(e).replaceAll(/\\s*\\/\\*.*?\\*\\/\\s*/g,``).trim();var a=!1,o=0,s=!1,c=[];r&&c.push(...Object.keys(r).map(Pi)),i&&c.push(...Object.keys(i).map(Pi));var l=0,u=-1;let t=e.length;for(var d=0;d<t;d++){var f=e[d];if(s?f===`/`&&e[d-1]===`*`&&(s=!1):a?a===f&&(a=!1):f===`/`&&e[d+1]===`*`?s=!0:f===`"`||f===`\'`?a=f:f===`(`?o++:f===`)`&&o--,!s&&a===!1&&o===0){if(f===`:`&&u===-1)u=d;else if(f===`;`||d===t-1){if(u!==-1){var p=Pi(e.substring(l,u).trim());if(!c.includes(p)){f!==`;`&&d++;var m=e.substring(l,d).trim();n+=` `+m+`;`}}l=d+1,u=-1}}}}return r&&(n+=Ni(r)),i&&(n+=Ni(i,!0)),n=n.trim(),n===``?null:n}return e==null?null:String(e)}function Ii(e,t,n,r,i,a){var o=e[me];if(C||o!==n||o===void 0){var s=Mi(n,r,a);(!C||s!==e.getAttribute(`class`))&&(s==null?e.removeAttribute(`class`):t?e.className=s:e.setAttribute(`class`,s)),e[me]=n}else if(a&&i!==a)for(var c in a){var l=!!a[c];(i==null||l!==!!i[c])&&e.classList.toggle(c,l)}return a}function Li(e,t={},n,r){for(var i in n){var a=n[i];t[i]!==a&&(n[i]==null?e.style.removeProperty(i):e.style.setProperty(i,a,r))}}function Ri(e,t,n,r){var i=e[he];if(C||i!==t){var a=Fi(t,r);(!C||a!==e.getAttribute(`style`))&&(a==null?e.removeAttribute(`style`):e.style.cssText=a),e[he]=t}else r&&(Array.isArray(r)?(Li(e,n?.[0],r[0]),Li(e,n?.[1],r[1],`important`)):Li(e,n,r));return r}function zi(t,n,r=!1){if(t.multiple){if(n==null)return;if(!e(n))return ze();for(var i of t.options)i.selected=n.includes(Vi(i));return}for(i of t.options)if(hn(Vi(i),n)){i.selected=!0;return}(!r||n!==void 0)&&(t.selectedIndex=-1)}function Bi(e){var t=new MutationObserver(()=>{zi(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`value`]}),Ln(()=>{t.disconnect()})}function Vi(e){return`__value`in e?e.__value:e.value}var Hi=Symbol(`class`),Ui=Symbol(`style`),Wi=Symbol(`is custom element`),Gi=Symbol(`is html`),Ki=ye?`link`:`LINK`,qi=ye?`input`:`INPUT`,Ji=ye?`option`:`OPTION`,Yi=ye?`select`:`SELECT`;function Xi(e){if(C){var t=!1,n=()=>{if(!t){if(t=!0,e.hasAttribute(`value`)){var n=e.value;Qi(e,`value`,null),e.value=n}if(e.hasAttribute(`checked`)){var r=e.checked;Qi(e,`checked`,null),e.checked=r}}};e[_e]=n,ct(n),An()}}function Zi(e,t){t?e.hasAttribute(`selected`)||e.setAttribute(`selected`,``):e.removeAttribute(`selected`)}function Qi(e,t,n,r){var i=ta(e);C&&(i[t]=e.getAttribute(t),t===`src`||t===`srcset`||t===`href`&&e.nodeName===Ki)||i[t]!==(i[t]=n)&&(t===`loading`&&(e[fe]=n),n==null?e.removeAttribute(t):typeof n!=`string`&&ra(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function $i(e,t,n,r,i=!1,a=!1){if(C&&i&&e.nodeName===qi){var o=e;(o.type===`checkbox`?`defaultChecked`:`defaultValue`)in n||Xi(o)}var s=ta(e),c=s[Wi],l=!s[Gi];let u=C&&c;u&&Ve(!1);var d=t||{},f=e.nodeName===Ji;for(var p in t)p in n||(n[p]=null);n.class?n.class=Ai(n.class):(r||n[Hi])&&(n.class=null),n[Ui]&&(n.style??=null);var m=ra(e);if(e.nodeName===qi&&`type`in n&&(`value`in n||`__value`in n)){var h=n.type;(h!==d.type||h===void 0&&e.hasAttribute(`type`))&&(d.type=h,Qi(e,`type`,h,a))}for(let i in n){let o=n[i];if(f&&i===`value`&&o==null){e.value=e.__value=``,d[i]=o;continue}if(i===`class`){Ii(e,e.namespaceURI===`http://www.w3.org/1999/xhtml`,o,r,t?.[Hi],n[Hi]),d[i]=o,d[Hi]=n[Hi];continue}if(i===`style`){Ri(e,o,t?.[Ui],n[Ui]),d[i]=o,d[Ui]=n[Ui];continue}var g=d[i];if(!(o===g&&!(o===void 0&&e.hasAttribute(i)))){d[i]=o;var _=i[0]+i[1];if(_!==`$$`)if(_===`on`){let t={},n=`$$`+i,r=i.slice(2);var v=Ir(r);if(Pr(r)&&(r=r.slice(0,-7),t.capture=!0),!v&&g){if(o!=null)continue;e.removeEventListener(r,d[n],t),d[n]=null}if(v)Yr(r,e,o),Xr([r]);else if(o!=null){function a(e){d[i].call(this,e)}d[n]=qr(r,e,a,t)}}else if(i===`style`)Qi(e,i,o);else if(i===`autofocus`)On(e,!!o);else if(!c&&(i===`__value`||i===`value`&&o!=null))e.value=e.__value=o;else if(i===`selected`&&f)Zi(e,o);else{var y=i;l||(y=zr(y));var b=y===`defaultValue`||y===`defaultChecked`;if(o==null&&!c&&!b)if(s[i]=null,y===`value`||y===`checked`){let n=e,r=t===void 0;if(y===`value`){let e=n.defaultValue;n.removeAttribute(y),n.defaultValue=e,n.value=n.__value=r?e:null}else{let e=n.defaultChecked;n.removeAttribute(y),n.defaultChecked=e,n.checked=r?e:!1}}else e.removeAttribute(i);else b||m.includes(y)&&(c||typeof o!=`string`)?(e[y]=o,y in s&&(s[y]=S)):typeof o!=`function`&&Qi(e,y,o,a)}}}return u&&Ve(!0),d}function ea(e,t,n=[],r=[],i=[],a,o=!1,s=!1){Ct(i,n,r,n=>{var r=void 0,i={},c=e.nodeName===Yi,l=!1;if(qn(()=>{var u=t(...n.map(H)),d=$i(e,r,u,a,o,s);l&&c&&`value`in u&&zi(e,u.value);for(let e of Object.getOwnPropertySymbols(i))u[e]||z(i[e]);for(let t of Object.getOwnPropertySymbols(u)){var f=u[t];t.description===`@attach`&&(!r||f!==r[t])&&(i[t]&&z(i[t]),i[t]=Jn(()=>Di(e,()=>f))),d[t]=f}r=d}),c){var u=e;Un(()=>{zi(u,r.value,!0),Bi(u)})}l=!0})}function ta(e){return e[pe]??={[Wi]:e.nodeName.includes(`-`),[Gi]:e.namespaceURI===Pe}}var na=new Map;function ra(e){var t=e.getAttribute(`is`)||e.nodeName,n=na.get(t);if(n)return n;na.set(t,n=[]);for(var r,i=e,a=Element.prototype;a!==i;){for(var s in r=o(i),r)r[s].set&&s!==`innerHTML`&&s!==`textContent`&&s!==`innerText`&&n.push(s);i=l(i)}return n}function ia(e,t,n=t){var r=new WeakSet;Mn(e,`input`,async i=>{var a=i?e.defaultValue:e.value;if(a=aa(e)?oa(a):a,n(a),M!==null&&r.add(M),await kr(),a!==(a=t())){var o=e.selectionStart,s=e.selectionEnd,c=e.value.length;if(e.value=a??``,s!==null){var l=e.value.length;o===s&&s===c&&l>c?(e.selectionStart=l,e.selectionEnd=l):(e.selectionStart=o,e.selectionEnd=Math.min(s,l))}}}),(C&&e.defaultValue!==e.value||Mr(t)==null&&e.value)&&(n(aa(e)?oa(e.value):e.value),M!==null&&r.add(M)),Gn(()=>{var n=t();if(e===document.activeElement){var i=Ye?Rt:M;if(r.has(i))return}aa(e)&&n===oa(e.value)||e.type===`date`&&!n&&!e.value||n!==e.value&&(e.value=n??``)})}function aa(e){var t=e.type;return t===`number`||t===`range`}function oa(e){return e===``?null:+e}var sa={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 ca(e,t,n){return new Proxy({props:e,exclude:t},sa)}var la={get(e,t){let n=e.props.length;for(;n--;){let r=e.props[n];if(d(r)&&(r=r()),typeof r==`object`&&r&&t in r)return r[t]}},set(e,t,n){let r=e.props.length;for(;r--;){let i=e.props[r];d(i)&&(i=i());let o=a(i,t);if(o&&o.set)return o.set(n),!0}return!1},getOwnPropertyDescriptor(e,t){let n=e.props.length;for(;n--;){let r=e.props[n];if(d(r)&&(r=r()),typeof r==`object`&&r&&t in r){let e=a(r,t);return e&&!e.configurable&&(e.configurable=!0),e}}},has(e,t){if(t===ue||t===de)return!1;for(let n of e.props)if(d(n)&&(n=n()),n!=null&&t in n)return!0;return!1},ownKeys(e){let t=[];for(let n of e.props)if(d(n)&&(n=n()),n){for(let e in n)t.includes(e)||t.push(e);for(let e of Object.getOwnPropertySymbols(n))t.includes(e)||t.push(e)}return t}};function ua(...e){return new Proxy({props:e},la)}function Y(e,t,n,r){var i=!Xe||(n&2)!=0,o=(n&8)!=0,s=(n&16)!=0,c=r,l=!0,u=void 0,d=()=>s&&i?(u??=Dt(r),H(u)):(l&&(l=!1,c=s?Mr(r):r),c);let f;if(o){var p=ue in e||de in e;f=a(e,t)?.set??(p&&t in e?n=>e[t]=n:void 0)}var m,h=!1;o?[m,h]=vt(()=>e[t]):m=e[t],m===void 0&&r!==void 0&&(m=d(),f&&(i&&De(t),f(m)));var g=i?()=>{var n=e[t];return n===void 0?d():(l=!0,n)}:()=>{var n=e[t];return n!==void 0&&(c=void 0),n===void 0?c:n};if(i&&!(n&4))return g;if(f){var _=e.$$legacy;return(function(e,t){return arguments.length>0?((!i||!t||_||h)&&f(t?g():e),e):g()})}var v=!1,y=(n&1?Dt:At)(()=>(v=!1,g()));o&&H(y);var b=V;return(function(e,t){if(arguments.length>0){let n=t?H(y):i&&o?pn(e):e;return P(y,n),v=!0,c!==void 0&&(c=n),e}return sr&&v||b.f&16384?y.v:H(y)})}function da(e){D===null&&be(`onMount`),Xe&&D.l!==null?fa(D).m.push(e):Rn(()=>{let t=Mr(e);if(typeof t==`function`)return t})}function fa(e){var t=e.l;return t.u??={a:[],b:[],m:[]}}typeof window<`u`&&((window.__svelte??={}).v??=new Set).add(`5`);var X=new class{#e=N(null);get data(){return H(this.#e)}set data(e){P(this.#e,e,!0)}#t=N(null);get arsenal(){return H(this.#t)}set arsenal(e){P(this.#t,e,!0)}#n=N(`connecting`);get status(){return H(this.#n)}set status(e){P(this.#n,e,!0)}#r=N(``);get clock(){return H(this.#r)}set clock(e){P(this.#r,e,!0)}#i=N(`overview`);get view(){return H(this.#i)}set view(e){P(this.#i,e,!0)}#a=N(!1);get arsenalLoading(){return H(this.#a)}set arsenalLoading(e){P(this.#a,e,!0)}#o=!1;#s=null;async tick(){try{let e=await fetch(`/data`);if(!e.ok)throw Error(`HTTP ${e.status}`);this.data=await e.json(),this.status=`live`,this.clock=new Date().toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`})}catch{this.status=`offline`}}start(){this.tick(),this.#s=setInterval(()=>void this.tick(),1e4)}stop(){this.#s&&clearInterval(this.#s)}async loadArsenal(e=!1){if(!(this.#o&&!e)){this.arsenalLoading=!0;try{let e=await fetch(`/arsenal`);e.ok&&(this.arsenal=await e.json(),this.#o=!0)}catch{}finally{this.arsenalLoading=!1}}}go(e){this.view=e,e===`arsenal`&&this.loadArsenal()}};function Z(e){return typeof e!=`number`||!Number.isFinite(e)?`0`:e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}k`:String(Math.round(e))}function pa(e){return typeof e!=`number`||!Number.isFinite(e)?`$0.00`:`$${e.toLocaleString(`en-US`,{minimumFractionDigits:2,maximumFractionDigits:2})}`}function ma(e){if(!e)return`\u2014`;let t=new Date(e);if(Number.isNaN(t.getTime()))return`\u2014`;let n=new Date;return t.getFullYear()===n.getFullYear()&&t.getMonth()===n.getMonth()&&t.getDate()===n.getDate()?t.toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`}):t.toLocaleDateString([],{month:`short`,day:`numeric`})}function ha(e){if(!e)return`unknown`;let t=e.toLowerCase();return t===`<synthetic>`?`unknown`:t.includes(`fable`)?`fable`:t.includes(`opus`)?`opus`:t.includes(`sonnet`)?`sonnet`:t.includes(`haiku`)?`haiku`:`unknown`}function ga(e){return!e||e===`<synthetic>`?`synthetic`:e.replace(/^claude-/,``)}function _a(e){if(!e)return``;let t=e.split(/[/\\\\]/).filter(Boolean);return t.length<=2?t.join(`/`):`\u2026/${t.slice(-2).join(`/`)}`}var va=[220,75,20,155,285,330,250,45];function ya(e){let t=0;for(let n=0;n<e.length;n++)t=t*31+e.charCodeAt(n)>>>0;return`oklch(72% 0.15 ${va[t%va.length]})`}var ba={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`},xa=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Sa=Symbol(`lucide-context`),Ca=()=>$e(Sa),wa=new Set([`$$slots`,`$$events`,`$$legacy`,`name`,`color`,`size`,`strokeWidth`,`absoluteStrokeWidth`,`iconNode`,`children`]),Ta=ii(`<svg><!><!></svg>`);function Ea(e,t){O(t,!0);let n=Ca()??{},r=Y(t,`color`,19,()=>n.color??`currentColor`),i=Y(t,`size`,19,()=>n.size??24),a=Y(t,`strokeWidth`,19,()=>n.strokeWidth??2),o=Y(t,`absoluteStrokeWidth`,19,()=>n.absoluteStrokeWidth??!1),s=Y(t,`iconNode`,19,()=>[]),c=ca(t,wa),l=j(()=>o()?Number(a())*24/Number(i()):a());var u=Ta();ea(u,e=>({...ba,...e,...c,width:i(),height:i(),stroke:r(),"stroke-width":H(l),class:[`lucide-icon lucide`,n.class,t.name&&`lucide-${t.name}`,t.class]}),[()=>!t.children&&!xa(c)&&{"aria-hidden":`true`}]);var d=F(u);yi(d,17,s,hi,(e,t)=>{var n=j(()=>h(H(t),2));let r=()=>H(n)[0],i=()=>H(n)[1];var a=W();Ei(I(a),r,!0,(e,t)=>{ea(e,()=>({...i()}))}),G(e,a)}),J(L(d),()=>t.children??f),E(u),G(e,u),k()}var Da=new Set([`$$slots`,`$$events`,`$$legacy`]);function Oa(e,t){let n=ca(t,Da),r=[[`rect`,{width:`7`,height:`9`,x:`3`,y:`3`,rx:`1`}],[`rect`,{width:`7`,height:`5`,x:`14`,y:`3`,rx:`1`}],[`rect`,{width:`7`,height:`9`,x:`14`,y:`12`,rx:`1`}],[`rect`,{width:`7`,height:`5`,x:`3`,y:`16`,rx:`1`}]];Ea(e,ua({name:`layout-dashboard`},()=>n,{get iconNode(){return r}}))}var ka=new Set([`$$slots`,`$$events`,`$$legacy`]);function Aa(e,t){let n=ca(t,ka),r=[[`polyline`,{points:`14.5 17.5 3 6 3 3 6 3 17.5 14.5`}],[`line`,{x1:`13`,x2:`19`,y1:`19`,y2:`13`}],[`line`,{x1:`16`,x2:`20`,y1:`16`,y2:`20`}],[`line`,{x1:`19`,x2:`21`,y1:`21`,y2:`19`}],[`polyline`,{points:`14.5 6.5 18 3 21 3 21 6 17.5 9.5`}],[`line`,{x1:`5`,x2:`9`,y1:`14`,y2:`18`}],[`line`,{x1:`7`,x2:`4`,y1:`17`,y2:`20`}],[`line`,{x1:`3`,x2:`5`,y1:`19`,y2:`21`}]];Ea(e,ua({name:`swords`},()=>n,{get iconNode(){return r}}))}var ja=new Set([`$$slots`,`$$events`,`$$legacy`]);function Ma(e,t){let n=ca(t,ja),r=[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`}],[`path`,{d:`M12 17h.01`}]];Ea(e,ua({name:`circle-question-mark`},()=>n,{get iconNode(){return r}}))}var Na=new Set([`$$slots`,`$$events`,`$$legacy`]);function Pa(e,t){let n=ca(t,Na),r=[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}],[`path`,{d:`M9 3v18`}]];Ea(e,ua({name:`panel-left`},()=>n,{get iconNode(){return r}}))}var Fa=U(`<div class="min-w-0"><div class="font-serif text-lg leading-none text-foreground">Synth<em>ra</em></div> <div class="font-mono text-[10px] uppercase tracking-[0.18em] text-muted-foreground">Dashboard</div></div>`),Ia=U(`<span class="font-mono text-sm text-muted-foreground"> </span>`),La=U(`<span> </span>`),Ra=U(`<button><!> <!></button>`),za=U(`<span>FAQ</span>`),Ba=U(`<div class="flex flex-col gap-1 rounded-lg bg-sidebar-accent/40 p-2.5"><div class="font-mono text-[10px] uppercase tracking-[0.14em] text-muted-foreground">Active</div> <div class="truncate font-mono text-sm text-sidebar-foreground"> </div> <div class="mt-1 flex items-center justify-between font-mono text-[10px] text-muted-foreground"><span> </span> <span>v__SYN_VERSION__</span></div></div>`),Va=U(`<span class="text-xs">Collapse</span>`),Ha=U(`<aside><div class="flex items-center gap-2.5 px-1 py-2"><div class="grid size-8 shrink-0 place-items-center rounded-lg bg-primary/90 font-serif text-lg italic text-primary-foreground">S</div> <!></div> <div><span></span> <!></div> <div class="my-1 h-px bg-sidebar-border"></div> <nav class="flex flex-col gap-1"><!> <button title="FAQ"><!> <!></button></nav> <div class="flex-1"></div> <!> <button title="Toggle sidebar"><!> <!></button></aside>`);function Ua(e,t){O(t,!0);let n=N(!1),r=typeof window<`u`&&window.location.port||`8901`,i=[{id:`overview`,label:`Overview`,icon:Oa},{id:`arsenal`,label:`Arsenal`,icon:Aa}];var a=Ha(),o=F(a),s=L(F(o),2),c=e=>{G(e,Fa())};q(s,e=>{H(n)||e(c)}),E(o);var l=L(o,2),u=F(l);let d;var f=L(u,2),p=e=>{var t=Ia(),n=F(t,!0);E(t),R(()=>K(n,X.status===`live`?`live \xB7 ${X.clock}`:X.status)),G(e,t)};q(f,e=>{H(n)||e(p)}),E(l);var m=L(l,4),h=F(m);yi(h,17,()=>i,e=>e.id,(e,t)=>{var r=Ra(),i=F(r);Ti(i,()=>H(t).icon,(e,t)=>{t(e,{class:`size-4 shrink-0`})});var a=L(i,2),o=e=>{var n=La(),r=F(n,!0);E(n),R(()=>K(r,H(t).label)),G(e,n)};q(a,e=>{H(n)||e(o)}),E(r),R(()=>{Qi(r,`title`,H(t).label),Ii(r,1,`flex items-center gap-2.5 rounded-lg px-2.5 py-2 text-sm transition-colors `+(X.view===H(t).id?`bg-sidebar-accent text-sidebar-accent-foreground`:`text-sidebar-foreground/75 hover:bg-sidebar-accent/50 hover:text-sidebar-foreground`)+(H(n)?` justify-center`:``))}),Yr(`click`,r,()=>X.go(H(t).id)),G(e,r)});var g=L(h,2),_=F(g);Ma(_,{class:`size-4 shrink-0`});var v=L(_,2),y=e=>{G(e,za())};q(v,e=>{H(n)||e(y)}),E(g),E(m);var b=L(m,4),ee=e=>{var t=Ba(),n=L(F(t),2),i=F(n,!0);E(n);var a=L(n,2),o=F(a),s=F(o);E(o),Ue(2),E(a),E(t),R(()=>{Qi(n,`title`,X.data?.active?.project_root??`\u2014`),K(i,X.data?.active?.project_name??`\u2014`),K(s,`port ${r??``}`)}),G(e,t)};q(b,e=>{H(n)||e(ee)});var x=L(b,2),te=F(x);Pa(te,{class:`size-4 shrink-0`});var ne=L(te,2),re=e=>{G(e,Va())};q(ne,e=>{H(n)||e(re)}),E(x),E(a),R(()=>{Ii(a,1,`flex h-screen shrink-0 flex-col gap-1 border-r border-sidebar-border bg-sidebar p-3 transition-[width] duration-200 `+(H(n)?`w-[64px] items-center`:`w-[248px]`)),Ii(l,1,`flex items-center gap-2 rounded-md px-2 py-1.5 `+(H(n)?`justify-center`:``)),d=Ii(u,1,`size-2 shrink-0 rounded-full `+(X.status===`live`?`bg-[var(--c-fable)]`:X.status===`offline`?`bg-destructive`:`bg-muted-foreground`),null,d,{"animate-pulse":X.status===`live`}),Ii(g,1,`flex items-center gap-2.5 rounded-lg px-2.5 py-2 text-sm text-sidebar-foreground/75 transition-colors hover:bg-sidebar-accent/50 hover:text-sidebar-foreground `+(H(n)?`justify-center`:``)),Ii(x,1,`mt-1 flex items-center gap-2.5 rounded-lg px-2.5 py-2 text-sidebar-foreground/60 transition-colors hover:bg-sidebar-accent/50 hover:text-sidebar-foreground `+(H(n)?`justify-center`:``))}),Yr(`click`,g,function(...e){t.onFaq?.apply(this,e)}),Yr(`click`,x,()=>P(n,!H(n))),G(e,a),k()}Xr([`click`]),Ze();var Wa=U(`<div class="flex flex-col gap-1 bg-card/70 p-4"><span class="font-mono text-xs uppercase tracking-[0.12em] text-muted-foreground"> </span> <span class="font-mono text-2xl tabular-nums text-foreground"> </span></div>`),Ga=U(`<div class="grid grid-cols-2 gap-px overflow-hidden rounded-xl border bg-border sm:grid-cols-3 lg:grid-cols-5"></div>`);function Ka(e,t){O(t,!0);let n=j(()=>{let e=X.data?.global;return[{label:`Turns`,v:e?.total_turns??0},{label:`\u2193 Input`,v:e?.total_input_tokens??0},{label:`\u2191 Output`,v:e?.total_output_tokens??0},{label:`\u27F2 Cache R`,v:e?.total_cache_read??0},{label:`\uFF0B Cache W`,v:e?.total_cache_create??0}]});var r=Ga();yi(r,21,()=>H(n),e=>e.label,(e,t)=>{var n=Wa(),r=F(n),i=F(r,!0);E(r);var a=L(r,2),o=F(a,!0);E(a),E(n),R(e=>{K(i,H(t).label),K(o,e)},[()=>Z(H(t).v)]),G(e,n)}),E(r),G(e,r),k()}var qa=U(`<span class="font-mono text-[10px] uppercase tracking-[0.12em] text-muted-foreground"> </span>`),Ja=U(`<header class="flex items-baseline justify-between gap-3"><span class="font-mono text-xs uppercase tracking-[0.14em] text-muted-foreground"> </span> <!></header>`),Ya=U(`<section><!> <!></section>`);function Xa(e,t){let n=Y(t,`class`,3,``);var r=Ya(),i=F(r),a=e=>{var n=Ja(),r=F(n),i=F(r,!0);E(r);var a=L(r,2),o=e=>{var n=qa(),r=F(n,!0);E(n),R(()=>K(r,t.meta)),G(e,n)};q(a,e=>{t.meta&&e(o)}),E(n),R(()=>K(i,t.title)),G(e,n)};q(i,e=>{t.title&&e(a)}),J(L(i,2),()=>t.children??f),E(r),R(()=>Ii(r,1,`flex h-full min-h-0 flex-col gap-3 rounded-xl border bg-card/55 p-4 transition-colors hover:bg-card/80 `+n())),G(e,r)}var Za=U(`<div class="flex flex-col gap-3"><div><div class="font-mono text-3xl text-[var(--money)]"> </div> <div class="font-mono text-sm text-muted-foreground"> </div></div> <div class="flex h-2 overflow-hidden rounded-full bg-border"><div class="h-full bg-muted-foreground/40"></div> <div class="h-full bg-[var(--money)]"></div></div> <div class="flex justify-between font-mono text-xs text-muted-foreground"><span>you paid <b class="text-foreground"> </b></span> <span>baseline <b class="text-foreground"> </b></span></div> <div class="rounded-md border border-dashed border-border px-3 py-2 text-center font-mono text-xs text-muted-foreground"><b class="text-foreground"> </b> blocks \xD7 <b class="text-foreground">500</b> tokens \xD7 <b class="text-foreground">$3</b>/M = <b class="text-[var(--money)]"> </b></div></div>`);function Qa(e,t){O(t,!0);let n=j(()=>{let e=X.data?.global,t=e?.blocked_count??0,n=t*500*3/1e6,r=e?.estimated_cost_usd??0,i=r+n;return{blocks:t,money:n,paid:r,baseline:i,pct:i>0?n/i*100:0,tokens:e?.estimated_tokens_saved??0,paidWidth:i>0?r/i*100:100}});{let t=j(()=>`${H(n).pct.toFixed(1)}% off \xB7 floor`);Xa(e,{title:`Synthra savings`,get meta(){return H(t)},children:(e,t)=>{var r=Za(),i=F(r),a=F(i),o=F(a,!0);E(a);var s=L(a,2),c=F(s);E(s),E(i);var l=L(i,2),u=F(l),d=L(u,2);E(l);var f=L(l,2),p=F(f),m=L(F(p)),h=F(m,!0);E(m),E(p);var g=L(p,2),_=L(F(g)),v=F(_,!0);E(_),E(g),E(f);var y=L(f,2),b=F(y),ee=F(b,!0);E(b);var x=L(b,6),te=F(x,!0);E(x),E(y),E(r),R((e,t,r,i,a)=>{K(o,e),K(c,`${t??``} tokens avoided`),Ri(u,`width:${H(n).paidWidth}%`),Ri(d,`width:${100-H(n).paidWidth}%`),K(h,r),K(v,i),K(ee,H(n).blocks),K(te,a)},[()=>pa(H(n).money),()=>Z(H(n).tokens),()=>pa(H(n).paid),()=>pa(H(n).baseline),()=>pa(H(n).money)]),G(e,r)},$$slots:{default:!0}})}k()}var $a=U(`<div class="font-mono text-3xl text-[var(--money)]"> </div> <div class="mt-1 flex flex-col gap-1 font-mono text-sm text-muted-foreground"><div class="flex justify-between"><span>Tokens (in+out)</span><span class="text-foreground"> </span></div> <div class="flex justify-between"><span>Avg / turn</span><span class="text-foreground"> </span></div></div>`,1);function eo(e,t){O(t,!0);let n=j(()=>{let e=X.data?.global,t=e?.total_turns??0,n=e?.estimated_cost_usd??0;return{cost:n,tokens:(e?.total_input_tokens??0)+(e?.total_output_tokens??0),avg:t>0?n/t:0}});Xa(e,{title:`Total spend`,meta:`all time`,children:(e,t)=>{var r=$a(),i=I(r),a=F(i,!0);E(i);var o=L(i,2),s=F(o),c=L(F(s)),l=F(c,!0);E(c),E(s);var u=L(s,2),d=L(F(u)),f=F(d,!0);E(d),E(u),E(o),R((e,t,n)=>{K(a,e),K(l,t),K(f,n)},[()=>pa(H(n).cost),()=>Z(H(n).tokens),()=>pa(H(n).avg)]),G(e,r)},$$slots:{default:!0}}),k()}var to=ii(`<circle cx="70" cy="70" r="52" fill="none" stroke-width="14"></circle>`),no=U(`<div class="flex items-center gap-2 font-mono text-sm"><span class="size-2 rounded-sm"></span> <span class="flex-1 text-muted-foreground"> </span> <span class="tabular-nums text-foreground"> </span> <span class="w-9 text-right tabular-nums text-muted-foreground"> </span></div>`),ro=U(`<div class="text-sm text-muted-foreground">No turns yet.</div>`),io=U(`<div class="flex items-center gap-4"><div class="relative size-[116px] shrink-0"><svg viewBox="0 0 140 140" class="size-full -rotate-90"><circle cx="70" cy="70" r="52" fill="none" stroke="var(--border)" stroke-width="14"></circle><!></svg> <div class="absolute inset-0 grid place-items-center"><div class="text-center"><div class="font-mono text-2xl text-foreground"> </div> <div class="font-mono text-[10px] uppercase text-muted-foreground">turns</div></div></div></div> <div class="flex min-w-0 flex-1 flex-col gap-1.5"></div></div>`);function ao(e,t){O(t,!0);let n=[{fam:`fable`,label:`Fable`,color:`var(--c-fable)`},{fam:`opus`,label:`Opus`,color:`var(--c-opus)`},{fam:`sonnet`,label:`Sonnet`,color:`var(--c-sonnet)`},{fam:`haiku`,label:`Haiku`,color:`var(--c-haiku)`},{fam:`unknown`,label:`Other`,color:`var(--c-unknown)`}],r=2*Math.PI*52,i=j(()=>{let e={fable:0,opus:0,sonnet:0,haiku:0,unknown:0};for(let t of X.data?.projects??[])for(let[n,r]of Object.entries(t.models??{}))e[ha(n)]+=r;let t=n.reduce((t,n)=>t+e[n.fam],0),i=0;return{arcs:n.filter(t=>e[t.fam]>0).map(n=>{let a=e[n.fam],o=t>0?a/t*r:0,s={...n,n:a,len:o,offset:i,pct:t>0?Math.round(a/t*100):0};return i+=o,s}),total:t}});Xa(e,{title:`Model usage`,meta:`by turns`,children:(e,t)=>{var n=io(),a=F(n),o=F(a);yi(L(F(o)),17,()=>H(i).arcs,e=>e.fam,(e,t)=>{var n=to();R(()=>{Qi(n,`stroke`,H(t).color),Qi(n,`stroke-dasharray`,`${H(t).len} ${r}`),Qi(n,`stroke-dashoffset`,-H(t).offset),Qi(n,`stroke-linecap`,H(i).arcs.length===1?`round`:`butt`)}),G(e,n)}),E(o);var s=L(o,2),c=F(s),l=F(c),u=F(l,!0);E(l),Ue(2),E(c),E(s),E(a);var d=L(a,2);yi(d,21,()=>H(i).arcs,e=>e.fam,(e,t)=>{var n=no(),r=F(n),i=L(r,2),a=F(i,!0);E(i);var o=L(i,2),s=F(o,!0);E(o);var c=L(o,2),l=F(c);E(c),E(n),R(()=>{Ri(r,`background:${H(t).color}`),K(a,H(t).label),K(s,H(t).n),K(l,`${H(t).pct??``}%`)}),G(e,n)},e=>{G(e,ro())}),E(d),E(n),R(()=>K(u,H(i).total)),G(e,n)},$$slots:{default:!0}}),k()}function oo(e){return typeof e==`object`&&!!e}var so=[`string`,`number`,`bigint`,`boolean`];function co(e){return e==null||so.includes(typeof e)?!0:Array.isArray(e)?e.every(e=>co(e)):typeof e==`object`?Object.getPrototypeOf(e)===Object.prototype:!1}var lo=Symbol(`box`),uo=Symbol(`is-writable`);function Q(e,t){let n=j(e);return t?{[lo]:!0,[uo]:!0,get current(){return H(n)},set current(e){t(e)}}:{[lo]:!0,get current(){return e()}}}function fo(e){return oo(e)&&lo in e}function po(e){let t=N(pn(e));return{[lo]:!0,[uo]:!0,get current(){return H(t)},set current(e){P(t,e,!0)}}}function mo(...e){return function(t){for(let n of e)if(n){if(t.defaultPrevented)return;typeof n==`function`?n.call(this,t):n.current?.call(this,t)}}}var ho=/\\/\\*[^*]*\\*+([^/*][^*]*\\*+)*\\//g,go=/\\n/g,_o=/^\\s*/,vo=/^(\\*?[-#/*\\\\\\w]+(\\[[0-9a-z_-]+\\])?)\\s*/,yo=/^:\\s*/,bo=/^((?:\'(?:\\\\\'|.)*?\'|"(?:\\\\"|.)*?"|\\([^)]*?\\)|[^};])+)/,xo=/^[;\\s]*/,So=/^\\s+|\\s+$/g,Co=`\n`,wo=`/`,To=`*`,Eo=``,Do=`comment`,Oo=`declaration`;function ko(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var n=1,r=1;function i(e){var t=e.match(go);t&&(n+=t.length);var i=e.lastIndexOf(Co);r=~i?e.length-i:r+e.length}function a(){var e={line:n,column:r};return function(t){return t.position=new o(e),l(),t}}function o(e){this.start=e,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function s(i){var a=Error(t.source+`:`+n+`:`+r+`: `+i);if(a.reason=i,a.filename=t.source,a.line=n,a.column=r,a.source=e,!t.silent)throw a}function c(t){var n=t.exec(e);if(n){var r=n[0];return i(r),e=e.slice(r.length),n}}function l(){c(_o)}function u(e){var t;for(e||=[];t=d();)t!==!1&&e.push(t);return e}function d(){var t=a();if(!(wo!=e.charAt(0)||To!=e.charAt(1))){for(var n=2;Eo!=e.charAt(n)&&(To!=e.charAt(n)||wo!=e.charAt(n+1));)++n;if(n+=2,Eo===e.charAt(n-1))return s(`End of comment missing`);var o=e.slice(2,n-2);return r+=2,i(o),e=e.slice(n),r+=2,t({type:Do,comment:o})}}function f(){var e=a(),t=c(vo);if(t){if(d(),!c(yo))return s(`property missing \':\'`);var n=c(bo),r=e({type:Oo,property:Ao(t[0].replace(ho,Eo)),value:n?Ao(n[0].replace(ho,Eo)):Eo});return c(xo),r}}function p(){var e=[];u(e);for(var t;t=f();)t!==!1&&(e.push(t),u(e));return e}return l(),p()}function Ao(e){return e?e.replace(So,Eo):Eo}function jo(e,t){let n=null;if(!e||typeof e!=`string`)return n;let r=ko(e),i=typeof t==`function`;return r.forEach(e=>{if(e.type!==`declaration`)return;let{property:r,value:a}=e;i?t(r,a,e):a&&(n||={},n[r]=a)}),n}var Mo=/\\d/,No=[`-`,`_`,`/`,`.`];function Po(e=``){if(!Mo.test(e))return e!==e.toLowerCase()}function Fo(e){let t=[],n=``,r,i;for(let a of e){let e=No.includes(a);if(e===!0){t.push(n),n=``,r=void 0;continue}let o=Po(a);if(i===!1){if(r===!1&&o===!0){t.push(n),n=a,r=o;continue}if(r===!0&&o===!1&&n.length>1){let e=n.at(-1);t.push(n.slice(0,Math.max(0,n.length-1))),n=e+a,r=o;continue}}n+=a,r=o,i=e}return t.push(n),t}function Io(e){return e?Fo(e).map(e=>Ro(e)).join(``):``}function Lo(e){return zo(Io(e||``))}function Ro(e){return e?e[0].toUpperCase()+e.slice(1):``}function zo(e){return e?e[0].toLowerCase()+e.slice(1):``}function Bo(e){if(!e)return{};let t={};function n(e,n){if(e.startsWith(`-moz-`)||e.startsWith(`-webkit-`)||e.startsWith(`-ms-`)||e.startsWith(`-o-`)){t[Io(e)]=n;return}if(e.startsWith(`--`)){t[e]=n;return}t[Lo(e)]=n}return jo(e,n),t}function Vo(...e){return(...t)=>{for(let n of e)typeof n==`function`&&n(...t)}}function Ho(e,t){let n=RegExp(e,`g`);return e=>{if(typeof e!=`string`)throw TypeError(`expected an argument of type string, but got ${typeof e}`);return e.match(n)?e.replace(n,t):e}}var Uo=Ho(/[A-Z]/,e=>`-${e.toLowerCase()}`);function Wo(e){if(!e||typeof e!=`object`||Array.isArray(e))throw TypeError(`expected an argument of type object, but got ${typeof e}`);return Object.keys(e).map(t=>`${Uo(t)}: ${e[t]};`).join(`\n`)}function Go(e={}){return Wo(e).replace(`\n`,` `)}var Ko=new Set(`onabort.onanimationcancel.onanimationend.onanimationiteration.onanimationstart.onauxclick.onbeforeinput.onbeforetoggle.onblur.oncancel.oncanplay.oncanplaythrough.onchange.onclick.onclose.oncompositionend.oncompositionstart.oncompositionupdate.oncontextlost.oncontextmenu.oncontextrestored.oncopy.oncuechange.oncut.ondblclick.ondrag.ondragend.ondragenter.ondragleave.ondragover.ondragstart.ondrop.ondurationchange.onemptied.onended.onerror.onfocus.onfocusin.onfocusout.onformdata.ongotpointercapture.oninput.oninvalid.onkeydown.onkeypress.onkeyup.onload.onloadeddata.onloadedmetadata.onloadstart.onlostpointercapture.onmousedown.onmouseenter.onmouseleave.onmousemove.onmouseout.onmouseover.onmouseup.onpaste.onpause.onplay.onplaying.onpointercancel.onpointerdown.onpointerenter.onpointerleave.onpointermove.onpointerout.onpointerover.onpointerup.onprogress.onratechange.onreset.onresize.onscroll.onscrollend.onsecuritypolicyviolation.onseeked.onseeking.onselect.onselectionchange.onselectstart.onslotchange.onstalled.onsubmit.onsuspend.ontimeupdate.ontoggle.ontouchcancel.ontouchend.ontouchmove.ontouchstart.ontransitioncancel.ontransitionend.ontransitionrun.ontransitionstart.onvolumechange.onwaiting.onwebkitanimationend.onwebkitanimationiteration.onwebkitanimationstart.onwebkittransitionend.onwheel`.split(`.`));function qo(e){return Ko.has(e)}function Jo(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let r=e[n];if(r){for(let e of Object.keys(r)){let n=t[e],i=r[e],a=typeof n==`function`,o=typeof i==`function`;if(a&&typeof o&&qo(e))t[e]=mo(n,i);else if(a&&o)t[e]=Vo(n,i);else if(e===`class`){let r=co(n),a=co(i);r&&a?t[e]=ki(n,i):r?t[e]=ki(n):a&&(t[e]=ki(i))}else if(e===`style`){let r=typeof n==`object`,a=typeof i==`object`,o=typeof n==`string`,s=typeof i==`string`;if(r&&a)t[e]={...n,...i};else if(r&&s){let r=Bo(i);t[e]={...n,...r}}else if(o&&a)t[e]={...Bo(n),...i};else if(o&&s){let r=Bo(n),a=Bo(i);t[e]={...r,...a}}else r?t[e]=n:a?t[e]=i:o?t[e]=n:s&&(t[e]=i)}else t[e]=i===void 0?n:i}for(let e of Object.getOwnPropertySymbols(r)){let n=t[e],i=r[e];t[e]=i===void 0?n:i}}}return typeof t.style==`object`&&(t.style=Go(t.style).replaceAll(`\n`,` `)),t.hidden===!1&&(t.hidden=void 0,delete t.hidden),t.disabled===!1&&(t.disabled=void 0,delete t.disabled),t}var Yo=typeof window<`u`?window:void 0;typeof window<`u`&&window.document,typeof window<`u`&&window.navigator,typeof window<`u`&&window.location;function Xo(e){let t=e.activeElement;for(;t?.shadowRoot;){let e=t.shadowRoot.activeElement;if(e===t)break;t=e}return t}var Zo=class extends Map{#e=new Map;#t=N(0);#n=N(0);#r=br||-1;constructor(e){if(super(),e){for(var[t,n]of e)super.set(t,n);this.#n.v=super.size}}#i(e){return br===this.#r?N(e):sn(e)}has(e){var t=this.#e,n=t.get(e);if(n===void 0)if(super.has(e))n=this.#i(0),t.set(e,n);else return H(this.#t),!1;return H(n),!0}forEach(e,t){this.#a(),super.forEach(e,t)}get(e){var t=this.#e,n=t.get(e);if(n===void 0)if(super.has(e))n=this.#i(0),t.set(e,n);else{H(this.#t);return}return H(n),super.get(e)}set(e,t){var n=this.#e,r=n.get(e),i=super.get(e),a=super.set(e,t),o=this.#t;if(r===void 0)r=this.#i(0),n.set(e,r),P(this.#n,super.size),dn(o);else if(i!==t){dn(r);var s=o.reactions===null?null:new Set(o.reactions);(s===null||!r.reactions?.every(e=>s.has(e)))&&dn(o)}return a}delete(e){var t=this.#e,n=t.get(e),r=super.delete(e);return n!==void 0&&(t.delete(e),P(n,-1)),r&&(P(this.#n,super.size),dn(this.#t)),r}clear(){if(super.size!==0){super.clear();var e=this.#e;P(this.#n,0);for(var t of e.values())P(t,-1);dn(this.#t),e.clear()}}#a(){H(this.#t);var e=this.#e;if(this.#n.v!==e.size){for(var t of super.keys())if(!e.has(t)){var n=this.#i(0);e.set(t,n)}}for([,n]of this.#e)H(n)}keys(){return H(this.#t),super.keys()}values(){return this.#a(),super.values()}entries(){return this.#a(),super.entries()}[Symbol.iterator](){return this.entries()}get size(){return H(this.#n),super.size}};new class{#e;#t;constructor(e={}){let{window:t=Yo,document:n=t?.document}=e;t!==void 0&&(this.#e=n,this.#t=yt(e=>{let n=Jr(t,`focusin`,e),r=Jr(t,`focusout`,e);return()=>{n(),r()}}))}get current(){return this.#t?.(),this.#e?Xo(this.#e):null}};var Qo=class{#e;#t;constructor(e){this.#e=e,this.#t=Symbol(e)}get key(){return this.#t}exists(){return tt(this.#t)}get(){let e=$e(this.#t);if(e===void 0)throw Error(`Context "${this.#e}" not found`);return e}getOr(e){let t=$e(this.#t);return t===void 0?e:t}set(e){return et(this.#t,e)}};function $o(e,t){switch(e){case`post`:Rn(t);break;case`pre`:Bn(t);break}}function es(e,t,n,r={}){let{lazy:i=!1}=r,a=!i,o=Array.isArray(e)?[]:void 0;$o(t,()=>{let t=Array.isArray(e)?e.map(e=>e()):e();if(!a){a=!0,o=t;return}let r=Mr(()=>n(t,o));return o=t,r})}function ts(e,t,n){let r=Vn(()=>{let i=!1;es(e,t,(e,t)=>{if(i){r();return}let a=n(e,t);return i=!0,a},{lazy:!0})});Rn(()=>r)}function ns(e,t,n){es(e,`post`,t,n)}function rs(e,t,n){es(e,`pre`,t,n)}ns.pre=rs;function is(e,t){ts(e,`post`,t)}function as(e,t){ts(e,`pre`,t)}is.pre=as;function os(e,t){let n,r=null;return(...i)=>new Promise(a=>{r&&r(void 0),r=a,clearTimeout(n),n=setTimeout(async()=>{let t=await e(...i);r&&=(r(t),null)},t)})}function ss(e,t){let n=0,r=null;return(...i)=>{let a=Date.now();return n&&a-n<t?r??Promise.resolve(void 0):(n=a,r=e(...i),r)}}function cs(e,t,n={},r){let{lazy:i=!1,once:a=!1,initialValue:o,debounce:s,throttle:c}=n,l=N(pn(o)),u=N(!1),d=N(void 0),f=N(pn([])),p=()=>{H(f).forEach(e=>e()),P(f,[],!0)},m=e=>{P(f,[...H(f),e],!0)},h=async(e,n,r=!1)=>{try{P(u,!0),P(d,void 0),p();let i=new AbortController;m(()=>i.abort());let a=await t(e,n,{data:H(l),refetching:r,onCleanup:m,signal:i.signal});return P(l,a,!0),a}catch(e){e instanceof DOMException&&e.name===`AbortError`||P(d,e,!0);return}finally{P(u,!1)}},g=s?os(h,s):c?ss(h,c):h,_=Array.isArray(e)?e:[e],v;return r((t,n)=>{a&&v||(v=t,g(Array.isArray(e)?t:t[0],Array.isArray(e)?n:n?.[0]))},{lazy:i}),{get current(){return H(l)},get loading(){return H(u)},get error(){return H(d)},mutate:e=>{P(l,e,!0)},refetch:t=>{let n=_.map(e=>e());return g(Array.isArray(e)?n:n[0],Array.isArray(e)?n:n[0],t??!0)}}}function ls(e,t,n){return cs(e,t,n,(t,n)=>{let r=Array.isArray(e)?e:[e];ns(()=>r.map(e=>e()),(e,n)=>{t(e,n??[])},n)})}function us(e,t,n){return cs(e,t,n,(t,n)=>{let r=Array.isArray(e)?e:[e];ns.pre(()=>r.map(e=>e()),(e,n)=>{t(e,n??[])},n)})}ls.pre=us;function ds(e){Rn(()=>()=>{e()})}function fs(e,t){return setTimeout(t,e)}function ps(e){kr().then(e)}var ms=1,hs=9,gs=11;function _s(e){return oo(e)&&e.nodeType===ms&&typeof e.nodeName==`string`}function vs(e){return oo(e)&&e.nodeType===hs}function ys(e){return oo(e)&&e.constructor?.name===`VisualViewport`}function bs(e){return oo(e)&&e.nodeType!==void 0}function xs(e){return bs(e)&&e.nodeType===gs&&`host`in e}function Ss(e,t){if(!e||!t||!_s(e)||!_s(t))return!1;let n=t.getRootNode?.();if(e===t||e.contains(t))return!0;if(n&&xs(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Cs(e){return vs(e)?e:ys(e)?e.document:e?.ownerDocument??document}function ws(e){let t=e.activeElement;for(;t?.shadowRoot;){let e=t.shadowRoot.activeElement;if(e===t)break;t=e}return t}var Ts=class{element;#e=j(()=>this.element.current?this.element.current.getRootNode()??document:document);get root(){return H(this.#e)}set root(e){P(this.#e,e)}constructor(e){typeof e==`function`?this.element=Q(e):this.element=e}getDocument=()=>Cs(this.root);getWindow=()=>this.getDocument().defaultView??window;getActiveElement=()=>ws(this.root);isActiveElement=e=>e===this.getActiveElement();getElementById(e){return this.root.getElementById(e)}querySelector=e=>this.root?this.root.querySelector(e):null;querySelectorAll=e=>this.root?this.root.querySelectorAll(e):[];setTimeout=(e,t)=>this.getWindow().setTimeout(e,t);clearTimeout=e=>this.getWindow().clearTimeout(e)};function Es(e,t){return{[Nr()]:n=>fo(e)?(e.current=n,Mr(()=>t?.(n)),()=>{`isConnected`in n&&n.isConnected||(e.current=null,t?.(null))}):(e(n),Mr(()=>t?.(n)),()=>{`isConnected`in n&&n.isConnected||(e(null),t?.(null))})}}function Ds(e){return e?``:void 0}function Os(e){return e?`open`:`closed`}function ks(e){return e===`starting`?{"data-starting-style":``}:e===`ending`?{"data-ending-style":``}:{}}var As=class{#e;#t;attrs;constructor(e){this.#e=e.getVariant?e.getVariant():null,this.#t=this.#e?`data-${this.#e}-`:`data-${e.component}-`,this.getAttr=this.getAttr.bind(this),this.selector=this.selector.bind(this),this.attrs=Object.fromEntries(e.parts.map(e=>[e,this.getAttr(e)]))}getAttr(e,t){return t?`data-${t}-${e}`:`${this.#t}${e}`}selector(e,t){return`[${this.getAttr(e,t)}]`}};function js(e){let t=new As(e);return{...t.attrs,selector:t.selector,getAttr:t.getAttr}}var Ms=typeof document<`u`,Ns=Ps();function Ps(){return Ms&&window?.navigator?.userAgent&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||window?.navigator?.maxTouchPoints>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function Fs(e){return e instanceof HTMLElement}function Is(e){return e instanceof Element||e instanceof SVGElement}var Ls=class{#e;#t=null;#n=null;#r=0;constructor(e){this.#e=e,ds(()=>this.#i())}#i(){this.#t!==null&&(window.cancelAnimationFrame(this.#t),this.#t=null),this.#n?.disconnect(),this.#n=null,this.#r++}run(e){this.#i();let t=this.#e.ref.current;if(!t)return;if(typeof t.getAnimations!=`function`){this.#a(e);return}let n=this.#r,r=()=>{n===this.#r&&this.#a(e)},i=()=>{if(n!==this.#r)return;let e=t.getAnimations();if(e.length===0){r();return}Promise.all(e.map(e=>e.finished)).then(()=>{r()}).catch(()=>{if(n===this.#r){if(t.getAnimations().some(e=>e.pending||e.playState!==`finished`)){i();return}r()}})},a=()=>{this.#t=window.requestAnimationFrame(()=>{this.#t=null,i()})};if(!this.#e.afterTick.current){a();return}this.#t=window.requestAnimationFrame(()=>{this.#t=null;let e=`data-starting-style`;if(!t.hasAttribute(e)){a();return}this.#n=new MutationObserver(()=>{n===this.#r&&(t.hasAttribute(e)||(this.#n?.disconnect(),this.#n=null,a()))}),this.#n.observe(t,{attributes:!0,attributeFilter:[e]})})}#a(e){let t=()=>{e()};this.#e.afterTick?ps(t):t()}},Rs=class{#e;#t;#n;#r=N(!1);#i=N(void 0);#a=!1;#o=null;constructor(e){this.#e=e,P(this.#r,e.open.current,!0),this.#t=e.enabled??!0,this.#n=new Ls({ref:this.#e.ref,afterTick:this.#e.open}),ds(()=>this.#s()),ns(()=>this.#e.open.current,e=>{if(!this.#a){this.#a=!0;return}if(this.#s(),!e&&this.#e.shouldSkipExitAnimation?.()){P(this.#r,!1),P(this.#i,void 0),this.#e.onComplete?.();return}if(e&&P(this.#r,!0),P(this.#i,e?`starting`:`ending`,!0),e&&(this.#o=window.requestAnimationFrame(()=>{this.#o=null,this.#e.open.current&&P(this.#i,void 0)})),!this.#t){e||P(this.#r,!1),P(this.#i,void 0),this.#e.onComplete?.();return}this.#n.run(()=>{e===this.#e.open.current&&(this.#e.open.current||P(this.#r,!1),P(this.#i,void 0),this.#e.onComplete?.())})})}get shouldRender(){return H(this.#r)}get transitionStatus(){return H(this.#i)}#s(){this.#o!==null&&(window.cancelAnimationFrame(this.#o),this.#o=null)}};function $(){}function zs(e,t){return t===void 0?`bits-${e}`:`bits-${e}-${t}`}var Bs=js({component:`dialog`,parts:[`content`,`trigger`,`overlay`,`title`,`description`,`close`,`cancel`,`action`]}),Vs=new Qo(`Dialog.Root | AlertDialog.Root`),Hs=class e{static create(t){let n=Vs.getOr(null);return Vs.set(new e(t,n))}opts;#e=N(null);get triggerNode(){return H(this.#e)}set triggerNode(e){P(this.#e,e,!0)}#t=N(null);get contentNode(){return H(this.#t)}set contentNode(e){P(this.#t,e,!0)}#n=N(null);get overlayNode(){return H(this.#n)}set overlayNode(e){P(this.#n,e,!0)}#r=N(null);get descriptionNode(){return H(this.#r)}set descriptionNode(e){P(this.#r,e,!0)}#i=N(void 0);get contentId(){return H(this.#i)}set contentId(e){P(this.#i,e,!0)}#a=N(void 0);get titleId(){return H(this.#a)}set titleId(e){P(this.#a,e,!0)}#o=N(void 0);get triggerId(){return H(this.#o)}set triggerId(e){P(this.#o,e,!0)}#s=N(void 0);get descriptionId(){return H(this.#s)}set descriptionId(e){P(this.#s,e,!0)}#c=N(null);get cancelNode(){return H(this.#c)}set cancelNode(e){P(this.#c,e,!0)}#l=N(0);get nestedOpenCount(){return H(this.#l)}set nestedOpenCount(e){P(this.#l,e,!0)}depth;parent;contentPresence;overlayPresence;constructor(e,t){this.opts=e,this.parent=t,this.depth=t?t.depth+1:0,this.handleOpen=this.handleOpen.bind(this),this.handleClose=this.handleClose.bind(this),this.contentPresence=new Rs({ref:Q(()=>this.contentNode),open:this.opts.open,enabled:!0,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),this.overlayPresence=new Rs({ref:Q(()=>this.overlayNode),open:this.opts.open,enabled:!0}),ns(()=>this.opts.open.current,e=>{this.parent&&(e?this.parent.incrementNested():this.parent.decrementNested())},{lazy:!0}),ds(()=>{this.opts.open.current&&this.parent?.decrementNested()})}handleOpen(){this.opts.open.current||(this.opts.open.current=!0)}handleClose(){this.opts.open.current&&(this.opts.open.current=!1)}getBitsAttr=e=>Bs.getAttr(e,this.opts.variant.current);incrementNested(){this.nestedOpenCount++,this.parent?.incrementNested()}decrementNested(){this.nestedOpenCount!==0&&(this.nestedOpenCount--,this.parent?.decrementNested())}#u=j(()=>({"data-state":Os(this.opts.open.current)}));get sharedProps(){return H(this.#u)}set sharedProps(e){P(this.#u,e)}},Us=class e{static create(t){return new e(t,Vs.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=Es(this.opts.ref),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}onclick(e){this.opts.disabled.current||e.button>0||this.root.handleClose()}onkeydown(e){this.opts.disabled.current||(e.key===` `||e.key===`Enter`)&&(e.preventDefault(),this.root.handleClose())}#e=j(()=>({id:this.opts.id.current,[this.root.getBitsAttr(this.opts.variant.current)]:``,onclick:this.onclick,onkeydown:this.onkeydown,disabled:this.opts.disabled.current?!0:void 0,tabindex:0,...this.root.sharedProps,...this.attachment}));get props(){return H(this.#e)}set props(e){P(this.#e,e)}},Ws=class e{static create(t){return new e(t,Vs.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.root.titleId=this.opts.id.current,this.attachment=Es(this.opts.ref),ns.pre(()=>this.opts.id.current,e=>{this.root.titleId=e})}#e=j(()=>({id:this.opts.id.current,role:`heading`,"aria-level":this.opts.level.current,[this.root.getBitsAttr(`title`)]:``,...this.root.sharedProps,...this.attachment}));get props(){return H(this.#e)}set props(e){P(this.#e,e)}},Gs=class e{static create(t){return new e(t,Vs.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.root.descriptionId=this.opts.id.current,this.attachment=Es(this.opts.ref,e=>{this.root.descriptionNode=e}),ns.pre(()=>this.opts.id.current,e=>{this.root.descriptionId=e})}#e=j(()=>({id:this.opts.id.current,[this.root.getBitsAttr(`description`)]:``,...this.root.sharedProps,...this.attachment}));get props(){return H(this.#e)}set props(e){P(this.#e,e)}},Ks=class e{static create(t){return new e(t,Vs.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=Es(this.opts.ref,e=>{this.root.contentNode=e,this.root.contentId=e?.id})}#e=j(()=>({open:this.root.opts.open.current}));get snippetProps(){return H(this.#e)}set snippetProps(e){P(this.#e,e)}#t=j(()=>({id:this.opts.id.current,role:this.root.opts.variant.current===`alert-dialog`?`alertdialog`:`dialog`,"aria-modal":`true`,"aria-describedby":this.root.descriptionId,"aria-labelledby":this.root.titleId,[this.root.getBitsAttr(`content`)]:``,style:{pointerEvents:`auto`,outline:this.root.opts.variant.current===`alert-dialog`?`none`:void 0,"--bits-dialog-depth":this.root.depth,"--bits-dialog-nested-count":this.root.nestedOpenCount,contain:`layout style`},tabindex:this.root.opts.variant.current===`alert-dialog`?-1:void 0,"data-nested-open":Ds(this.root.nestedOpenCount>0),"data-nested":Ds(this.root.parent!==null),...ks(this.root.contentPresence.transitionStatus),...this.root.sharedProps,...this.attachment}));get props(){return H(this.#t)}set props(e){P(this.#t,e)}get shouldRender(){return this.root.contentPresence.shouldRender}},qs=class e{static create(t){return new e(t,Vs.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=Es(this.opts.ref,e=>this.root.overlayNode=e)}#e=j(()=>({open:this.root.opts.open.current}));get snippetProps(){return H(this.#e)}set snippetProps(e){P(this.#e,e)}#t=j(()=>({id:this.opts.id.current,[this.root.getBitsAttr(`overlay`)]:``,style:{pointerEvents:`auto`,"--bits-dialog-depth":this.root.depth,"--bits-dialog-nested-count":this.root.nestedOpenCount},"data-nested-open":Ds(this.root.nestedOpenCount>0),"data-nested":Ds(this.root.parent!==null),...ks(this.root.overlayPresence.transitionStatus),...this.root.sharedProps,...this.attachment}));get props(){return H(this.#t)}set props(e){P(this.#t,e)}get shouldRender(){return this.root.overlayPresence.shouldRender}},Js=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`child`,`children`,`level`]),Ys=U(`<div><!></div>`);function Xs(e,t){let n=oi();O(t,!0);let r=Y(t,`id`,19,()=>zs(n)),i=Y(t,`ref`,15,null),a=Y(t,`level`,3,2),o=ca(t,Js),s=Ws.create({id:Q(()=>r()),level:Q(()=>a()),ref:Q(()=>i(),e=>i(e))}),c=j(()=>Jo(o,s.props));var l=W(),u=I(l),d=e=>{var n=W();J(I(n),()=>t.child,()=>({props:H(c)})),G(e,n)},p=e=>{var n=Ys();ea(n,()=>({...H(c)})),J(F(n),()=>t.children??f),E(n),G(e,n)};q(u,e=>{t.child?e(d):e(p,-1)}),G(e,l),k()}function Zs(e,t){var n=W();mi(I(n),()=>t.children,e=>{var n=W();J(I(n),()=>t.children??f),G(e,n)}),G(e,n)}var Qs=new Qo(`BitsConfig`);function $s(){let e=new ec(null,{});return Qs.getOr(e).opts}var ec=class{opts;constructor(e,t){let n=tc(e,t);this.opts={defaultPortalTo:n(e=>e.defaultPortalTo),defaultLocale:n(e=>e.defaultLocale)}}};function tc(e,t){return n=>Q(()=>{let r=n(t)?.current;if(r!==void 0)return r;if(e!==null)return n(e.opts)?.current})}function nc(e,t){return n=>{let r=$s();return Q(()=>{let i=n();if(i!==void 0)return i;let a=e(r).current;return a===void 0?t:a})}}var rc=nc(e=>e.defaultPortalTo,`body`);function ic(e,t){O(t,!0);let n=rc(()=>t.to),r=nt(),i=j(a);function a(){if(!Ms||t.disabled)return null;let e=null;return e=typeof n.current==`string`?document.querySelector(n.current):n.current,e}let o;function s(){o&&=(di(o),null)}ns([()=>H(i),()=>t.disabled],([e,n])=>{if(!e||n){s();return}return o=si(Zs,{target:e,props:{children:t.children},context:r}),()=>{s()}});var c=W(),l=I(c),u=e=>{var n=W();J(I(n),()=>t.children??f),G(e,n)};q(l,e=>{t.disabled&&e(u)}),G(e,c),k()}var ac=class{eventName;options;constructor(e,t={bubbles:!0,cancelable:!0}){this.eventName=e,this.options=t}createEvent(e){return new CustomEvent(this.eventName,{...this.options,detail:e})}dispatch(e,t){let n=this.createEvent(t);return e.dispatchEvent(n),n}listen(e,t,n){return Jr(e,this.eventName,e=>{t(e)},n)}};function oc(e,t=500){let n=null,r=(...r)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{e(...r)},t)};return r.destroy=()=>{n!==null&&(clearTimeout(n),n=null)},r}function sc(e,t){return e===t||e.contains(t)}function cc(e){return e?.ownerDocument??document}function lc(e,t){let{clientX:n,clientY:r}=e,i=t.getBoundingClientRect();return n<i.left||n>i.right||r<i.top||r>i.bottom}var uc=[`input:not([inert]):not([inert] *)`,`select:not([inert]):not([inert] *)`,`textarea:not([inert]):not([inert] *)`,`a[href]:not([inert]):not([inert] *)`,`button:not([inert]):not([inert] *)`,`[tabindex]:not(slot):not([inert]):not([inert] *)`,`audio[controls]:not([inert]):not([inert] *)`,`video[controls]:not([inert]):not([inert] *)`,`[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)`,`details>summary:first-of-type:not([inert]):not([inert] *)`,`details:not([inert]):not([inert] *)`],dc=uc.join(`,`),fc=typeof Element>`u`,pc=fc?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,mc=!fc&&Element.prototype.getRootNode?function(e){return e?.getRootNode?.call(e)}:function(e){return e?.ownerDocument},hc=function(e,t){t===void 0&&(t=!0);var n=e?.getAttribute?.call(e,`inert`);return n===``||n===`true`||t&&e&&(typeof e.closest==`function`?e.closest(`[inert]`):hc(e.parentNode))},gc=function(e){var t=e?.getAttribute?.call(e,`contenteditable`);return t===``||t===`true`},_c=function(e,t,n){if(hc(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(dc));return t&&pc.call(e,dc)&&r.unshift(e),r=r.filter(n),r},vc=function(e,t,n){for(var r=[],i=Array.from(e);i.length;){var a=i.shift();if(!hc(a,!1))if(a.tagName===`SLOT`){var o=a.assignedElements(),s=vc(o.length?o:a.children,!0,n);n.flatten?r.push.apply(r,s):r.push({scopeParent:a,candidates:s})}else{pc.call(a,dc)&&n.filter(a)&&(t||!e.includes(a))&&r.push(a);var c=a.shadowRoot||typeof n.getShadowRoot==`function`&&n.getShadowRoot(a),l=!hc(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(a));if(c&&l){var u=vc(c===!0?a.children:c.children,!0,n);n.flatten?r.push.apply(r,u):r.push({scopeParent:a,candidates:u})}else i.unshift.apply(i,a.children)}}return r},yc=function(e){return!isNaN(parseInt(e.getAttribute(`tabindex`),10))},bc=function(e){if(!e)throw Error(`No node provided`);return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||gc(e))&&!yc(e)?0:e.tabIndex},xc=function(e,t){var n=bc(e);return n<0&&t&&!yc(e)?0:n},Sc=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},Cc=function(e){return e.tagName===`INPUT`},wc=function(e){return Cc(e)&&e.type===`hidden`},Tc=function(e){return e.tagName===`DETAILS`&&Array.prototype.slice.apply(e.children).some(function(e){return e.tagName===`SUMMARY`})},Ec=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},Dc=function(e){if(!e.name)return!0;var t=e.form||mc(e),n=function(e){return t.querySelectorAll(`input[type="radio"][name="`+e+`"]`)},r;if(typeof window<`u`&&window.CSS!==void 0&&typeof window.CSS.escape==`function`)r=n(window.CSS.escape(e.name));else try{r=n(e.name)}catch(e){return console.error(`Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s`,e.message),!1}var i=Ec(r,e.form);return!i||i===e},Oc=function(e){return Cc(e)&&e.type===`radio`},kc=function(e){return Oc(e)&&!Dc(e)},Ac=function(e){var t=e&&mc(e),n=t?.host,r=!1;if(t&&t!==e){var i,a,o;for(r=!!((i=n)!=null&&(a=i.ownerDocument)!=null&&a.contains(n)||e!=null&&(o=e.ownerDocument)!=null&&o.contains(e));!r&&n;){var s,c;t=mc(n),n=t?.host,r=!!((s=n)!=null&&(c=s.ownerDocument)!=null&&c.contains(n))}}return r},jc=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return n===0&&r===0},Mc=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if(n===`full-native`&&`checkVisibility`in e)return!e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});if(getComputedStyle(e).visibility===`hidden`)return!0;var i=pc.call(e,`details>summary:first-of-type`)?e.parentElement:e;if(pc.call(i,`details:not([open]) *`))return!0;if(!n||n===`full`||n===`full-native`||n===`legacy-full`){if(typeof r==`function`){for(var a=e;e;){var o=e.parentElement,s=mc(e);if(o&&!o.shadowRoot&&r(o)===!0)return jc(e);e=e.assignedSlot?e.assignedSlot:!o&&s!==e.ownerDocument?s.host:o}e=a}if(Ac(e))return!e.getClientRects().length;if(n!==`legacy-full`)return!0}else if(n===`non-zero-area`)return jc(e);return!1},Nc=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName===`FIELDSET`&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if(r.tagName===`LEGEND`)return pc.call(t,`fieldset[disabled] *`)?!0:!r.contains(e)}return!0}t=t.parentElement}return!1},Pc=function(e,t){return!(t.disabled||wc(t)||Mc(t,e)||Tc(t)||Nc(t))},Fc=function(e,t){return!(kc(t)||bc(t)<0||!Pc(e,t))},Ic=function(e){var t=parseInt(e.getAttribute(`tabindex`),10);return!!(isNaN(t)||t>=0)},Lc=function(e){var t=[],n=[];return e.forEach(function(e,r){var i=!!e.scopeParent,a=i?e.scopeParent:e,o=xc(a,i),s=i?Lc(e.candidates):a;o===0?i?t.push.apply(t,s):t.push(a):n.push({documentOrder:r,tabIndex:o,item:e,isScope:i,content:s})}),n.sort(Sc).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},Rc=function(e,t){return t||={},Lc(t.getShadowRoot?vc([e],t.includeContainer,{filter:Fc.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:Ic}):_c(e,t.includeContainer,Fc.bind(null,t)))},zc=function(e,t){return t||={},t.getShadowRoot?vc([e],t.includeContainer,{filter:Pc.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):_c(e,t.includeContainer,Pc.bind(null,t))},Bc=uc.concat(`iframe:not([inert]):not([inert] *)`).join(`,`),Vc=function(e,t){if(t||={},!e)throw Error(`No node provided`);return pc.call(e,Bc)===!1?!1:Pc(t,e)},Hc=`data-context-menu-trigger`,Uc=`data-context-menu-content`;new Qo(`Menu.Root`),new Qo(`Menu.Root | Menu.Sub`),new Qo(`Menu.Content`),new Qo(`Menu.Group | Menu.RadioGroup`),new Qo(`Menu.RadioGroup`),new Qo(`Menu.CheckboxGroup`),new ac(`bitsmenuopen`,{bubbles:!1,cancelable:!0}),js({component:`menu`,parts:[`trigger`,`content`,`sub-trigger`,`item`,`group`,`group-heading`,`checkbox-group`,`checkbox-item`,`radio-group`,`radio-item`,`separator`,`sub-content`,`arrow`]}),globalThis.bitsDismissableLayers??=new Map;var Wc=class e{static create(t){return new e(t)}opts;#e;#t;#n={pointerdown:!1};#r=!1;#i=!1;#a=void 0;#o;#s=$;constructor(e){this.opts=e,this.#t=e.interactOutsideBehavior,this.#e=e.onInteractOutside,this.#o=e.onFocusOutside,Rn(()=>{this.#a=cc(this.opts.ref.current)});let t=$,n=()=>{this.#g(),globalThis.bitsDismissableLayers.delete(this),this.#d.destroy(),t()};ns([()=>this.opts.enabled.current,()=>this.opts.ref.current],()=>{if(!(!this.opts.enabled.current||!this.opts.ref.current))return fs(1,()=>{this.opts.ref.current&&(globalThis.bitsDismissableLayers.set(this,this.#t),t(),t=this.#l())}),n}),ds(()=>{this.#g.destroy(),globalThis.bitsDismissableLayers.delete(this),this.#d.destroy(),this.#s(),t()})}#c=e=>{e.defaultPrevented||this.opts.ref.current&&ps(()=>{!this.opts.ref.current||this.#h(e.target)||e.target&&!this.#i&&this.#o.current?.(e)})};#l(){return Vo(Jr(this.#a,`pointerdown`,Vo(this.#f,this.#m),{capture:!0}),Jr(this.#a,`pointerdown`,Vo(this.#p,this.#d)),Jr(this.#a,`focusin`,this.#c))}#u=e=>{let t=e;t.defaultPrevented&&(t=Jc(e)),this.#e.current(e)};#d=oc(e=>{if(!this.opts.ref.current){this.#s();return}let t=this.opts.isValidEvent.current(e,this.opts.ref.current)||qc(e,this.opts.ref.current);if(!this.#r||this.#_()||!t){this.#s();return}let n=e;if(n.defaultPrevented&&(n=Jc(n)),this.#t.current!==`close`&&this.#t.current!==`defer-otherwise-close`){this.#s();return}e.pointerType===`touch`?(this.#s(),this.#s=Jr(this.#a,`click`,this.#u,{once:!0})):this.#e.current(n)},10);#f=e=>{this.#n[e.type]=!0};#p=e=>{this.#n[e.type]=!1};#m=()=>{this.opts.ref.current&&(this.#r=Kc(this.opts.ref.current))};#h=e=>this.opts.ref.current?sc(this.opts.ref.current,e):!1;#g=oc(()=>{for(let e in this.#n)this.#n[e]=!1;this.#r=!1},20);#_(){return Object.values(this.#n).some(Boolean)}#v=()=>{this.#i=!0};#y=()=>{this.#i=!1};props={onfocuscapture:this.#v,onblurcapture:this.#y}};function Gc(e=[...globalThis.bitsDismissableLayers]){return e.findLast(([e,{current:t}])=>t===`close`||t===`ignore`)}function Kc(e){let t=[...globalThis.bitsDismissableLayers],n=Gc(t);if(n)return n[0].opts.ref.current===e;let[r]=t[0];return r.opts.ref.current===e}function qc(e,t){let n=e.target;if(!Is(n))return!1;let r=!!n.closest(`[${Hc}]`),i=!!t.closest(`[${Uc}]`);return`button`in e&&e.button>0&&!r?!1:`button`in e&&e.button===0&&r&&i?!0:r&&i?!1:cc(n).documentElement.contains(n)&&!sc(t,n)&&lc(e,t)}function Jc(e){let t=e.currentTarget,n=e.target,r;r=e instanceof PointerEvent?new PointerEvent(e.type,e):new PointerEvent(`pointerdown`,e);let i=!1;return new Proxy(r,{get:(r,a)=>a===`currentTarget`?t:a===`target`?n:a===`preventDefault`?()=>{i=!0,typeof r.preventDefault==`function`&&r.preventDefault()}:a===`defaultPrevented`?i:a in r?r[a]:e[a]})}function Yc(e,t){O(t,!0);let n=Y(t,`interactOutsideBehavior`,3,`close`),r=Y(t,`onInteractOutside`,3,$),i=Y(t,`onFocusOutside`,3,$),a=Y(t,`isValidEvent`,3,()=>!1),o=Wc.create({id:Q(()=>t.id),interactOutsideBehavior:Q(()=>n()),onInteractOutside:Q(()=>r()),enabled:Q(()=>t.enabled),onFocusOutside:Q(()=>i()),isValidEvent:Q(()=>a()),ref:t.ref});var s=W();J(I(s),()=>t.children??f,()=>({props:o.props})),G(e,s),k()}globalThis.bitsEscapeLayers??=new Map;var Xc=class e{static create(t){return new e(t)}opts;domContext;constructor(e){this.opts=e,this.domContext=new Ts(this.opts.ref);let t=$;ns(()=>e.enabled.current,n=>(n&&(globalThis.bitsEscapeLayers.set(this,e.escapeKeydownBehavior),t=this.#e()),()=>{t(),globalThis.bitsEscapeLayers.delete(this)}))}#e=()=>Jr(this.domContext.getDocument(),`keydown`,this.#t,{passive:!1});#t=e=>{if(e.key!==`Escape`||!Zc(this))return;let t=new KeyboardEvent(e.type,e);e.preventDefault();let n=this.opts.escapeKeydownBehavior.current;n!==`close`&&n!==`defer-otherwise-close`||this.opts.onEscapeKeydown.current(t)}};function Zc(e){let t=[...globalThis.bitsEscapeLayers],n=t.findLast(([e,{current:t}])=>t===`close`||t===`ignore`);if(n)return n[0]===e;let[r]=t[0];return r===e}function Qc(e,t){O(t,!0);let n=Y(t,`escapeKeydownBehavior`,3,`close`),r=Y(t,`onEscapeKeydown`,3,$);Xc.create({escapeKeydownBehavior:Q(()=>n()),onEscapeKeydown:Q(()=>r()),enabled:Q(()=>t.enabled),ref:t.ref});var i=W();J(I(i),()=>t.children??f),G(e,i),k()}var $c=class e{static instance;#e=po([]);#t=new WeakMap;#n=new WeakMap;static getInstance(){return this.instance||=new e,this.instance}register(e){let t=this.getActive();t&&t!==e&&t.pause();let n=document.activeElement;n&&n!==document.body&&this.#n.set(e,n),this.#e.current=this.#e.current.filter(t=>t!==e),this.#e.current.unshift(e)}unregister(e){this.#e.current=this.#e.current.filter(t=>t!==e);let t=this.getActive();t&&t.resume()}getActive(){return this.#e.current[0]}setFocusMemory(e,t){this.#t.set(e,t)}getFocusMemory(e){return this.#t.get(e)}isActiveScope(e){return this.getActive()===e}setPreFocusMemory(e,t){this.#n.set(e,t)}getPreFocusMemory(e){return this.#n.get(e)}clearPreFocusMemory(e){this.#n.delete(e)}},el=class e{#e=!1;#t=null;#n=$c.getInstance();#r=[];#i;constructor(e){this.#i=e}get paused(){return this.#e}pause(){this.#e=!0}resume(){this.#e=!1}#a(){for(let e of this.#r)e();this.#r=[]}mount(e){this.#t&&this.unmount(),this.#t=e,this.#n.register(this),this.#c(),this.#o()}unmount(){this.#t&&=(this.#a(),this.#s(),this.#n.unregister(this),this.#n.clearPreFocusMemory(this),null)}#o(){if(!this.#t)return;let e=new CustomEvent(`focusScope.onOpenAutoFocus`,{bubbles:!1,cancelable:!0});this.#i.onOpenAutoFocus.current(e),e.defaultPrevented||requestAnimationFrame(()=>{if(!this.#t)return;let e=this.#u();e?(e.focus(),this.#n.setFocusMemory(this,e)):this.#t.focus()})}#s(){let e=new CustomEvent(`focusScope.onCloseAutoFocus`,{bubbles:!1,cancelable:!0});if(this.#i.onCloseAutoFocus.current?.(e),!e.defaultPrevented){let e=this.#n.getPreFocusMemory(this);if(e&&document.contains(e))try{e.focus()}catch{document.body.focus()}}}#c(){if(!this.#t||!this.#i.trap.current)return;let e=this.#t,t=e.ownerDocument;this.#r.push(Jr(t,`focusin`,t=>{if(this.#e||!this.#n.isActiveScope(this))return;let n=t.target;if(n)if(e.contains(n))this.#n.setFocusMemory(this,n);else{let n=this.#n.getFocusMemory(this);if(n&&e.contains(n)&&Vc(n))t.preventDefault(),n.focus();else{let t=this.#u(),n=this.#d()[0];(t||n||e).focus()}}},{capture:!0}),Jr(e,`keydown`,e=>{if(!this.#i.loop||this.#e||e.key!==`Tab`||!this.#n.isActiveScope(this))return;let n=this.#l();if(n.length===0)return;let r=n[0],i=n[n.length-1];!e.shiftKey&&t.activeElement===i?(e.preventDefault(),r.focus()):e.shiftKey&&t.activeElement===r&&(e.preventDefault(),i.focus())}));let n=new MutationObserver(()=>{let t=this.#n.getFocusMemory(this);if(t&&!e.contains(t)){let t=this.#u(),n=this.#d()[0],r=t||n;r?(r.focus(),this.#n.setFocusMemory(this,r)):e.focus()}});n.observe(e,{childList:!0,subtree:!0}),this.#r.push(()=>n.disconnect())}#l(){return this.#t?Rc(this.#t,{includeContainer:!1,getShadowRoot:!0}):[]}#u(){return this.#l()[0]||null}#d(){return this.#t?zc(this.#t,{includeContainer:!1,getShadowRoot:!0}):[]}static use(t){let n=null;return ns([()=>t.ref.current,()=>t.enabled.current],([r,i])=>{r&&i?(n||=new e(t),n.mount(r)):n&&=(n.unmount(),null)}),ds(()=>{n?.unmount()}),{get props(){return{tabindex:-1}}}}};function tl(e,t){O(t,!0);let n=Y(t,`enabled`,3,!1),r=Y(t,`trapFocus`,3,!1),i=Y(t,`loop`,3,!1),a=Y(t,`onCloseAutoFocus`,3,$),o=Y(t,`onOpenAutoFocus`,3,$),s=el.use({enabled:Q(()=>n()),trap:Q(()=>r()),loop:i(),onCloseAutoFocus:Q(()=>a()),onOpenAutoFocus:Q(()=>o()),ref:t.ref});var c=W();J(I(c),()=>t.focusScope??f,()=>({props:s.props})),G(e,c),k()}var nl=()=>{};globalThis.bitsTextSelectionLayers??=new Map;var rl=class e{static create(t){return new e(t)}opts;domContext;#e=$;#t=!1;#n=nl;#r=nl;constructor(e){this.opts=e,this.domContext=new Ts(e.ref);let t=$;ns(()=>[this.opts.enabled.current,this.opts.onPointerDown.current,this.opts.onPointerUp.current],([e,n,r])=>(this.#t=e,this.#n=n,this.#r=r,e&&(globalThis.bitsTextSelectionLayers.set(this,this.opts.enabled),t(),t=this.#i()),()=>{this.#t=!1,t(),this.#s(),globalThis.bitsTextSelectionLayers.delete(this)}))}#i(){return Vo(Jr(this.domContext.getDocument(),`pointerdown`,this.#o),Jr(this.domContext.getDocument(),`pointerup`,mo(this.#s,this.#a)))}#a=e=>{this.#r(e)};#o=e=>{let t=this.opts.ref.current,n=e.target;!Fs(t)||!Fs(n)||!this.#t||!sl(this)||!Ss(t,n)||(this.#n(e),!e.defaultPrevented&&(this.#e=al(t,this.domContext.getDocument().body)))};#s=()=>{this.#e(),this.#e=$}},il=e=>e.style.userSelect||e.style.webkitUserSelect;function al(e,t){let n=il(t),r=il(e);return ol(t,`none`),ol(e,`text`),()=>{ol(t,n),ol(e,r)}}function ol(e,t){e.style.userSelect=t,e.style.webkitUserSelect=t}function sl(e){let t=[...globalThis.bitsTextSelectionLayers];if(!t.length)return!1;let n=t.at(-1);return n?n[0]===e:!1}function cl(e,t){O(t,!0);let n=Y(t,`preventOverflowTextSelection`,3,!0),r=Y(t,`onPointerDown`,3,$),i=Y(t,`onPointerUp`,3,$);rl.create({id:Q(()=>t.id),onPointerDown:Q(()=>r()),onPointerUp:Q(()=>i()),enabled:Q(()=>t.enabled&&n()),ref:t.ref});var a=W();J(I(a),()=>t.children??f),G(e,a),k()}globalThis.bitsIdCounter??={current:0};function ll(e=`bits`){return globalThis.bitsIdCounter.current++,`${e}-${globalThis.bitsIdCounter.current}`}var ul=class{#e;#t=0;#n=N();#r;constructor(e){this.#e=e}#i(){--this.#t,this.#r&&this.#t<=0&&(this.#r(),P(this.#n,void 0),this.#r=void 0)}get(...e){return this.#t+=1,H(this.#n)===void 0&&(this.#r=Vn(()=>{P(this.#n,this.#e(...e),!0)})),Rn(()=>()=>{this.#i()}),H(this.#n)}},dl=new Zo,fl=N(null),pl=null,ml=null,hl=!1,gl=Q(()=>{for(let e of dl.values())if(e)return!0;return!1}),_l=null,vl=new ul(()=>{function e(){document.body.setAttribute(`style`,H(fl)??``),document.body.style.removeProperty(`--scrollbar-width`),Ns&&pl?.(),P(fl,null)}function t(){ml!==null&&(window.clearTimeout(ml),ml=null)}function n(e,n){t(),hl=!0,_l=Date.now();let r=_l,i=()=>{ml=null,_l===r&&(bl(dl)?hl=!1:(hl=!1,n()))},a=e===null?24:e;ml=window.setTimeout(i,a)}function r(){H(fl)===null&&dl.size===0&&!hl&&P(fl,document.body.getAttribute(`style`),!0)}return ns(()=>gl.current,()=>{if(!gl.current)return;r(),hl=!1;let e=getComputedStyle(document.documentElement),t=getComputedStyle(document.body),n=e.scrollbarGutter?.includes(`stable`)||t.scrollbarGutter?.includes(`stable`),i=window.innerWidth-document.documentElement.clientWidth,a={padding:Number.parseInt(t.paddingRight??`0`,10)+i,margin:Number.parseInt(t.marginRight??`0`,10)};i>0&&!n&&(document.body.style.paddingRight=`${a.padding}px`,document.body.style.marginRight=`${a.margin}px`,document.body.style.setProperty(`--scrollbar-width`,`${i}px`)),document.body.style.overflow=`hidden`,Ns&&(pl=Jr(document,`touchmove`,e=>{e.target===document.documentElement&&(e.touches.length>1||e.preventDefault())},{passive:!1})),ps(()=>{document.body.style.pointerEvents=`none`,document.body.style.overflow=`hidden`})}),ds(()=>()=>{pl?.()}),{get lockMap(){return dl},resetBodyStyle:e,scheduleCleanupIfNoNewLocks:n,cancelPendingCleanup:t,ensureInitialStyleCaptured:r}}),yl=class{#e=ll();#t;#n=()=>null;#r;locked;constructor(e,t=()=>null){this.#t=e,this.#n=t,this.#r=vl.get(),this.#r&&(this.#r.cancelPendingCleanup(),this.#r.ensureInitialStyleCaptured(),this.#r.lockMap.set(this.#e,this.#t??!1),this.locked=Q(()=>this.#r.lockMap.get(this.#e)??!1,e=>this.#r.lockMap.set(this.#e,e)),ds(()=>{if(this.#r.lockMap.delete(this.#e),bl(this.#r.lockMap))return;let e=this.#n();this.#r.scheduleCleanupIfNoNewLocks(e,()=>{this.#r.resetBodyStyle()})}))}};function bl(e){for(let[t,n]of e)if(n)return!0;return!1}function xl(e,t){O(t,!0);let n=Y(t,`preventScroll`,3,!0),r=Y(t,`restoreScrollDelay`,3,null);n()&&new yl(n(),()=>r()),k()}var Sl=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`forceMount`,`child`,`children`,`ref`]),Cl=U(`<div><!></div>`);function wl(e,t){let n=oi();O(t,!0);let r=Y(t,`id`,19,()=>zs(n)),i=Y(t,`forceMount`,3,!1),a=Y(t,`ref`,15,null),o=ca(t,Sl),s=qs.create({id:Q(()=>r()),ref:Q(()=>a(),e=>a(e))}),c=j(()=>Jo(o,s.props));var l=W(),u=I(l),d=e=>{var n=W(),r=I(n),i=e=>{var n=W(),r=I(n);{let e=j(()=>({props:Jo(H(c)),...s.snippetProps}));J(r,()=>t.child,()=>H(e))}G(e,n)},a=e=>{var n=Cl();ea(n,e=>({...e}),[()=>Jo(H(c))]),J(F(n),()=>t.children??f,()=>s.snippetProps),E(n),G(e,n)};q(r,e=>{t.child?e(i):e(a,-1)}),G(e,n)};q(u,e=>{(s.shouldRender||i())&&e(d)}),G(e,l),k()}var Tl=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`children`,`child`,`ref`]),El=U(`<div><!></div>`);function Dl(e,t){let n=oi();O(t,!0);let r=Y(t,`id`,19,()=>zs(n)),i=Y(t,`ref`,15,null),a=ca(t,Tl),o=Gs.create({id:Q(()=>r()),ref:Q(()=>i(),e=>i(e))}),s=j(()=>Jo(a,o.props));var c=W(),l=I(c),u=e=>{var n=W();J(I(n),()=>t.child,()=>({props:H(s)})),G(e,n)},d=e=>{var n=El();ea(n,()=>({...H(s)})),J(F(n),()=>t.children??f),E(n),G(e,n)};q(l,e=>{t.child?e(u):e(d,-1)}),G(e,c),k()}function Ol(e,t){O(t,!0);let n=Y(t,`open`,15,!1),r=Y(t,`onOpenChange`,3,$),i=Y(t,`onOpenChangeComplete`,3,$);Hs.create({variant:Q(()=>`dialog`),open:Q(()=>n(),e=>{n(e),r()(e)}),onOpenChangeComplete:Q(()=>i())});var a=W();J(I(a),()=>t.children??f),G(e,a),k()}var kl=new Set([`$$slots`,`$$events`,`$$legacy`,`children`,`child`,`id`,`ref`,`disabled`]),Al=U(`<button><!></button>`);function jl(e,t){let n=oi();O(t,!0);let r=Y(t,`id`,19,()=>zs(n)),i=Y(t,`ref`,15,null),a=Y(t,`disabled`,3,!1),o=ca(t,kl),s=Us.create({variant:Q(()=>`close`),id:Q(()=>r()),ref:Q(()=>i(),e=>i(e)),disabled:Q(()=>!!a())}),c=j(()=>Jo(o,s.props));var l=W(),u=I(l),d=e=>{var n=W();J(I(n),()=>t.child,()=>({props:H(c)})),G(e,n)},p=e=>{var n=Al();ea(n,()=>({...H(c)})),J(F(n),()=>t.children??f),E(n),G(e,n)};q(u,e=>{t.child?e(d):e(p,-1)}),G(e,l),k()}var Ml=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`children`,`child`,`ref`,`forceMount`,`onCloseAutoFocus`,`onOpenAutoFocus`,`onEscapeKeydown`,`onInteractOutside`,`trapFocus`,`preventScroll`,`restoreScrollDelay`]),Nl=U(`<!> <!>`,1),Pl=U(`<!> <div><!></div>`,1);function Fl(e,t){let n=oi();O(t,!0);let r=Y(t,`id`,19,()=>zs(n)),i=Y(t,`ref`,15,null),a=Y(t,`forceMount`,3,!1),o=Y(t,`onCloseAutoFocus`,3,$),s=Y(t,`onOpenAutoFocus`,3,$),c=Y(t,`onEscapeKeydown`,3,$),l=Y(t,`onInteractOutside`,3,$),u=Y(t,`trapFocus`,3,!0),d=Y(t,`preventScroll`,3,!0),p=Y(t,`restoreScrollDelay`,3,null),m=ca(t,Ml),h=Ks.create({id:Q(()=>r()),ref:Q(()=>i(),e=>i(e))}),g=j(()=>Jo(m,h.props));var _=W(),v=I(_),y=e=>{tl(e,{get ref(){return h.opts.ref},loop:!0,get trapFocus(){return u()},get enabled(){return h.root.opts.open.current},get onOpenAutoFocus(){return s()},get onCloseAutoFocus(){return o()},focusScope:(e,n)=>{let r=()=>n?.().props;Qc(e,ua(()=>H(g),{get enabled(){return h.root.opts.open.current},get ref(){return h.opts.ref},onEscapeKeydown:e=>{c()(e),!e.defaultPrevented&&h.root.handleClose()},children:(e,n)=>{Yc(e,ua(()=>H(g),{get ref(){return h.opts.ref},get enabled(){return h.root.opts.open.current},onInteractOutside:e=>{l()(e),!e.defaultPrevented&&h.root.handleClose()},children:(e,n)=>{cl(e,ua(()=>H(g),{get ref(){return h.opts.ref},get enabled(){return h.root.opts.open.current},children:(e,n)=>{var i=W(),a=I(i),o=e=>{var n=Nl(),i=I(n),a=e=>{xl(e,{get preventScroll(){return d()},get restoreScrollDelay(){return p()}})};q(i,e=>{h.root.opts.open.current&&e(a)});var o=L(i,2);{let e=j(()=>({props:Jo(H(g),r()),...h.snippetProps}));J(o,()=>t.child,()=>H(e))}G(e,n)},s=e=>{var n=Pl(),i=I(n);xl(i,{get preventScroll(){return d()}});var a=L(i,2);ea(a,e=>({...e}),[()=>Jo(H(g),r())]),J(F(a),()=>t.children??f),E(a),G(e,n)};q(a,e=>{t.child?e(o):e(s,-1)}),G(e,i)},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{focusScope:!0}})};q(v,e=>{(h.shouldRender||a())&&e(y)}),G(e,_),k()}var Il=U(`<button class="flex flex-col gap-1 text-left"><div class="flex items-center gap-2 font-mono text-sm"><span class="size-2 shrink-0 rounded-sm"></span> <span class="flex-1 truncate text-foreground"> </span> <span class="tabular-nums text-muted-foreground"> </span></div> <div class="h-1 overflow-hidden rounded-full bg-border"><div class="h-full"></div></div></button>`),Ll=U(`<div class="text-sm text-muted-foreground">No projects tracked yet \u2014 run <code class="text-foreground">syn .</code></div>`),Rl=U(`<div class="flex max-h-[260px] flex-col gap-2 overflow-y-auto pr-1"></div>`),zl=U(`<div class="flex flex-col gap-0.5 bg-card p-3"><span class="font-mono text-[10px] uppercase tracking-[0.1em] text-muted-foreground"> </span> <span class="font-mono text-sm text-foreground"> </span></div>`),Bl=U(`<!> <!> <div class="mt-4 grid grid-cols-2 gap-px overflow-hidden rounded-lg border bg-border"></div> <!>`,1),Vl=U(`<!> <!>`,1);function Hl(e,t){O(t,!0);let n=N(!1),r=N(null),i=j(()=>X.data?.projects??[]),a=j(()=>Math.max(1,...H(i).map(e=>e.total_turns)));function o(e){let t=(X.data?.recent_turns??[]).find(t=>t.project_path===e.path);return t?ma(t.ts):e.last_seen?ma(e.last_seen):`\u2014`}function s(e){return[[`Cost`,pa(e.estimated_cost_usd)],[`Turns`,Z(e.total_turns)],[`Input`,Z(e.total_input_tokens)],[`Output`,Z(e.total_output_tokens)],[`Cache R`,Z(e.total_cache_read)],[`Cache W`,Z(e.total_cache_create)],[`Blocks`,Z(e.blocked_count)],[`Last active`,o(e)]]}var c=Vl(),l=I(c);Xa(l,{title:`Projects`,meta:`by turns`,children:(e,t)=>{var o=Rl();yi(o,21,()=>H(i),e=>e.path,(e,t)=>{var i=Il(),o=F(i),s=F(o),c=L(s,2),l=F(c,!0);E(c);var u=L(c,2),d=F(u,!0);E(u),E(o);var f=L(o,2),p=F(f);E(f),E(i),R((e,n,r)=>{Ri(s,e),K(l,H(t).name),K(d,n),Ri(p,r)},[()=>`background:${ya(H(t).name)}`,()=>Z(H(t).total_turns),()=>`width:${H(t).total_turns/H(a)*100}%; background:${ya(H(t).name)}`]),Yr(`click`,i,()=>{P(r,H(t),!0),P(n,!0)}),G(e,i)},e=>{G(e,Ll())}),E(o),G(e,o)},$$slots:{default:!0}}),Ti(L(l,2),()=>Ol,(e,t)=>{t(e,{get open(){return H(n)},set open(e){P(n,e,!0)},children:(e,t)=>{var n=W();Ti(I(n),()=>ic,(e,t)=>{t(e,{children:(e,t)=>{var n=Vl(),i=I(n);Ti(i,()=>wl,(e,t)=>{t(e,{class:`fixed inset-0 z-50 bg-black/60`})}),Ti(L(i,2),()=>Fl,(e,t)=>{t(e,{class:`fixed left-1/2 top-1/2 z-50 w-[min(440px,92vw)] -translate-x-1/2 -translate-y-1/2 rounded-xl border bg-card p-5 text-card-foreground shadow-2xl`,children:(e,t)=>{var n=W(),i=I(n),a=e=>{var t=Bl(),n=I(t);{let e=j(()=>`color:${ya(H(r).name)}`);Ti(n,()=>Xs,(t,n)=>{n(t,{class:`font-serif text-xl`,get style(){return H(e)},children:(e,t)=>{Ue();var n=ai();R(()=>K(n,H(r).name)),G(e,n)},$$slots:{default:!0}})})}var i=L(n,2);Ti(i,()=>Dl,(e,t)=>{t(e,{class:`truncate font-mono text-xs text-muted-foreground`,children:(e,t)=>{Ue();var n=ai();R(()=>K(n,H(r).path)),G(e,n)},$$slots:{default:!0}})});var a=L(i,2);yi(a,21,()=>s(H(r)),([e,t])=>e,(e,t)=>{var n=j(()=>h(H(t),2));let r=()=>H(n)[0],i=()=>H(n)[1];var a=zl(),o=F(a),s=F(o,!0);E(o);var c=L(o,2),l=F(c,!0);E(c),E(a),R(()=>{K(s,r()),K(l,i())}),G(e,a)}),E(a),Ti(L(a,2),()=>jl,(e,t)=>{t(e,{class:`mt-4 w-full rounded-md border py-2 text-sm text-muted-foreground transition-colors hover:text-foreground`,children:(e,t)=>{Ue(),G(e,ai(`Close`))},$$slots:{default:!0}})}),G(e,t)};q(i,e=>{H(r)&&e(a)}),G(e,n)},$$slots:{default:!0}})}),G(e,n)},$$slots:{default:!0}})}),G(e,n)},$$slots:{default:!0}})}),G(e,c),k()}Xr([`click`]);var Ul=U(`<div class="flex items-baseline justify-between font-mono text-sm"><span class="text-muted-foreground"> </span> <span class="tabular-nums text-foreground"> </span></div>`),Wl=U(`<div class="text-sm text-muted-foreground">No graph-tool calls yet.</div>`),Gl=U(`<div class="font-mono text-2xl text-foreground"> <span class="text-sm text-muted-foreground">calls</span></div> <div class="flex flex-col gap-1.5"></div>`,1);function Kl(e,t){O(t,!0);let n=j(()=>{let e=X.data?.global?.tool_calls??{};return Object.entries(e).sort((e,t)=>t[1]-e[1]).slice(0,8)}),r=j(()=>X.data?.global?.total_tool_calls??0);Xa(e,{title:`Graph tools used`,meta:`all projects`,children:(e,t)=>{var i=Gl(),a=I(i),o=F(a);Ue(),E(a);var s=L(a,2);yi(s,21,()=>H(n),([e,t])=>e,(e,t)=>{var n=j(()=>h(H(t),2));let r=()=>H(n)[0],i=()=>H(n)[1];var a=Ul(),o=F(a),s=F(o,!0);E(o);var c=L(o,2),l=F(c,!0);E(c),E(a),R(()=>{K(s,r()),K(l,i())}),G(e,a)},e=>{G(e,Wl())}),E(s),R(e=>K(o,`${e??``} `),[()=>Z(H(r))]),G(e,i)},$$slots:{default:!0}}),k()}var ql=U(`<tr class="border-t border-border/60"><td class="py-1.5 pr-2 text-muted-foreground"> </td><td class="max-w-[120px] truncate py-1.5 pr-2 text-foreground"> </td><td class="py-1.5 pr-2"><span class="inline-flex items-center gap-1.5 rounded px-1.5 py-0.5"><span class="size-1.5 rounded-sm"></span> </span></td><td class="py-1.5 pr-2 text-right tabular-nums text-foreground"> </td><td class="py-1.5 pr-2 text-right tabular-nums text-foreground"> </td><td class="py-1.5 pr-2 text-right tabular-nums text-muted-foreground"> </td><td class="py-1.5 text-right tabular-nums text-[var(--money)]"> </td></tr>`),Jl=U(`<tr><td colspan="7" class="py-6 text-center text-muted-foreground">No turns recorded yet.</td></tr>`),Yl=U(`<div class="flex items-center justify-end gap-3 pt-1 font-mono text-sm text-muted-foreground"><button class="rounded border px-2 py-1 disabled:opacity-40 enabled:hover:text-foreground">\u2039 Prev</button> <span> </span> <button class="rounded border px-2 py-1 disabled:opacity-40 enabled:hover:text-foreground">Next \u203A</button></div>`),Xl=U(`<div class="min-h-0 flex-1 overflow-x-auto"><table class="w-full border-collapse font-mono text-sm"><thead><tr class="text-left text-[10px] uppercase tracking-[0.1em] text-muted-foreground"><th class="py-1.5 pr-2 font-medium">Time</th><th class="py-1.5 pr-2 font-medium">Project</th><th class="py-1.5 pr-2 font-medium">Model</th><th class="py-1.5 pr-2 text-right font-medium">In</th><th class="py-1.5 pr-2 text-right font-medium">Out</th><th class="py-1.5 pr-2 text-right font-medium">Cache R/W</th><th class="py-1.5 text-right font-medium">Cost</th></tr></thead><tbody></tbody></table></div> <!>`,1);function Zl(e,t){O(t,!0);let n=N(1),r=j(()=>X.data?.recent_turns??[]),i=j(()=>Math.max(1,Math.ceil(H(r).length/25)));Rn(()=>{H(n)>H(i)&&P(n,H(i),!0)});let a=j(()=>H(r).slice((H(n)-1)*25,(H(n)-1)*25+25)),o=j(()=>H(r).length?(H(n)-1)*25+1:0),s=j(()=>Math.min(H(n)*25,H(r).length));{let t=j(()=>`showing ${H(o)}\u2013${H(s)} of ${H(r).length}`);Xa(e,{title:`Recent turns`,get meta(){return H(t)},children:(e,t)=>{var r=Xl(),o=I(r),s=F(o),c=L(F(s));yi(c,21,()=>H(a),e=>e.ts+e.project_path+e.model,(e,t)=>{var n=ql(),r=F(n),i=F(r,!0);E(r);var a=L(r),o=F(a,!0);E(a);var s=L(a),c=F(s),l=F(c),u=L(l);E(c),E(s);var d=L(s),f=F(d,!0);E(d);var p=L(d),m=F(p,!0);E(p);var h=L(p),g=F(h);E(h);var _=L(h),v=F(_,!0);E(_),E(n),R((e,n,r,s,d,p,h,_,y)=>{K(i,e),Qi(a,`title`,H(t).project_name),K(o,H(t).project_name),Ri(c,n),Ri(l,r),K(u,` ${s??``}`),K(f,d),K(m,p),K(g,`${h??``} / ${_??``}`),K(v,y)},[()=>ma(H(t).ts),()=>`color: var(--c-${ha(H(t).model)})`,()=>`background: var(--c-${ha(H(t).model)})`,()=>ga(H(t).model),()=>Z(H(t).input),()=>Z(H(t).output),()=>Z(H(t).cache_read),()=>Z(H(t).cache_create),()=>pa(H(t).cost_usd)]),G(e,n)},e=>{G(e,Jl())}),E(c),E(s),E(o);var l=L(o,2),u=e=>{var t=Yl(),r=F(t),a=L(r,2),o=F(a);E(a);var s=L(a,2);E(t),R(()=>{r.disabled=H(n)<=1,K(o,`page ${H(n)??``} of ${H(i)??``}`),s.disabled=H(n)>=H(i)}),Yr(`click`,r,()=>P(n,Math.max(1,H(n)-1),!0)),Yr(`click`,s,()=>P(n,Math.min(H(i),H(n)+1),!0)),G(e,t)};q(l,e=>{H(i)>1&&e(u)}),G(e,r)},$$slots:{default:!0}})}k()}Xr([`click`]);var Ql=U(`<div class="flex items-baseline gap-2 font-mono text-xs"><span class="shrink-0 text-muted-foreground"> </span> <span> </span> <span class="truncate text-foreground/80"> </span></div>`),$l=U(`<div class="text-sm text-muted-foreground">No gate decisions yet.</div>`),eu=U(`<div class="font-mono text-2xl text-foreground"> <span class="text-sm text-muted-foreground">blocks</span></div> <div class="flex min-h-0 flex-1 flex-col gap-1 overflow-y-auto"></div>`,1);function tu(e,t){O(t,!0);let n=j(()=>(X.data?.recent_gates??[]).slice(0,50)),r=j(()=>X.data?.global?.blocked_count??0);Xa(e,{title:`The Moat`,meta:`PreToolUse`,children:(e,t)=>{var i=eu(),a=I(i),o=F(a);Ue(),E(a);var s=L(a,2);yi(s,21,()=>H(n),e=>e.ts+e.query,(e,t)=>{var n=Ql(),r=F(n),i=F(r,!0);E(r);var a=L(r,2),o=F(a,!0);E(a);var s=L(a,2),c=F(s,!0);E(s),E(n),R(e=>{K(i,e),Ii(a,1,`shrink-0 rounded px-1 text-[10px] uppercase `+(H(t).decision===`block`?`bg-destructive/15 text-destructive`:`bg-[var(--c-fable)]/12 text-[var(--c-fable)]`)),K(o,H(t).decision),Qi(s,`title`,H(t).query??``),K(c,H(t).query??`\u2014`)},[()=>ma(H(t).ts)]),G(e,n)},e=>{G(e,$l())}),E(s),R(e=>K(o,`${e??``} `),[()=>Z(H(r))]),G(e,i)},$$slots:{default:!0}}),k()}var nu=U(`<div class="flex items-baseline justify-between gap-3 font-mono text-sm"><span class="truncate text-muted-foreground"> </span> <span class="tabular-nums text-foreground"> </span></div>`),ru=U(`<div class="text-sm text-muted-foreground">No usage learned yet \u2014 Synthra learns as you read/edit files.</div>`),iu=U(`<div class="font-mono text-2xl text-foreground"> <span class="text-sm text-muted-foreground">tracked</span></div> <div class="flex max-h-[190px] flex-col gap-1.5 overflow-y-auto"></div>`,1);function au(e,t){O(t,!0);let n=j(()=>X.data?.active),r=j(()=>H(n)?.stats?.hot_files??[]);{let t=j(()=>H(n)?.project_name??`active project`);Xa(e,{title:`Hot files`,get meta(){return H(t)},children:(e,t)=>{var i=iu(),a=I(i),o=F(a);Ue(),E(a);var s=L(a,2);yi(s,21,()=>H(r),e=>e.path,(e,t)=>{var n=nu(),r=F(n),i=F(r,!0);E(r);var a=L(r,2),o=F(a,!0);E(a),E(n),R(e=>{Qi(n,`title`,H(t).path),K(i,e),K(o,H(t).score)},[()=>_a(H(t).path)]),G(e,n)},e=>{G(e,ru())}),E(s),R(e=>K(o,`${e??``} `),[()=>Z(H(n)?.stats?.hot_files_total??0)]),G(e,i)},$$slots:{default:!0}})}k()}var ou=U(`<div class="grid grid-cols-1 gap-4 p-5 lg:grid-cols-3"><div class="lg:col-span-3 lg:row-start-1"><!></div> <div class="lg:col-start-1 lg:row-start-2"><!></div> <div class="lg:col-start-2 lg:row-start-2"><!></div> <div class="lg:col-start-1 lg:row-start-3"><!></div> <div class="lg:col-start-2 lg:row-start-3"><!></div> <div class="lg:col-start-1 lg:row-start-4"><!></div> <div class="lg:col-start-2 lg:row-start-4"><!></div> <div class="relative lg:col-start-3 lg:row-start-2 lg:row-span-3"><div class="lg:absolute lg:inset-0"><!></div></div> <div class="lg:col-span-3 lg:row-start-5"><!></div></div>`);function su(e){var t=ou(),n=F(t);Ka(F(n),{}),E(n);var r=L(n,2);Qa(F(r),{}),E(r);var i=L(r,2);eo(F(i),{}),E(i);var a=L(i,2);ao(F(a),{}),E(a);var o=L(a,2);au(F(o),{}),E(o);var s=L(o,2);Hl(F(s),{}),E(s);var c=L(s,2);Kl(F(c),{}),E(c);var l=L(c,2),u=F(l);tu(F(u),{}),E(u),E(l);var d=L(l,2);Zl(F(d),{}),E(d),E(t),G(e,t)}var cu=U(`<p> </p>`),lu=U(`<div class="break-all"><span class="text-foreground/70"> </span> </div>`),uu=U(`<div class="mt-1 flex flex-col gap-0.5 font-mono text-xs text-muted-foreground/80"></div>`),du=U(`<button class="flex flex-col gap-1.5 rounded-lg border bg-card/55 p-3 text-left transition-colors hover:bg-card/85"><div class="flex items-center gap-2"><span class="min-w-0 flex-1 truncate font-mono text-sm text-foreground"> </span> <span> </span></div> <!> <!></button>`);function fu(e,t){O(t,!0);let n=N(!1),r=j(()=>t.item.scope===`plugin`?t.item.source??`plugin`:t.item.scope),i=j(()=>t.item.scope===`project`?`var(--c-fable)`:t.item.scope===`personal`?`var(--c-sonnet)`:`#9bc2ef`),a=j(()=>Object.entries(t.item.meta??{}));var o=du(),s=F(o),c=F(s),l=F(c,!0);E(c);var u=L(c,2);let d;var f=F(u);E(u),E(s);var p=L(s,2),m=e=>{var r=cu(),i=F(r,!0);E(r),R(()=>{Ii(r,1,`text-sm leading-snug text-muted-foreground `+(H(n)?``:`line-clamp-2`)),K(i,t.item.description)}),G(e,r)};q(p,e=>{t.item.description&&e(m)});var g=L(p,2),_=e=>{var t=uu();yi(t,21,()=>H(a),([e,t])=>e,(e,t)=>{var n=j(()=>h(H(t),2));let r=()=>H(n)[0],i=()=>H(n)[1];var a=lu(),o=F(a),s=F(o);E(o);var c=L(o);E(a),R(()=>{K(s,`${r()??``}:`),K(c,` ${i()??``}`)}),G(e,a)}),E(t),G(e,t)};q(g,e=>{H(n)&&H(a).length&&e(_)}),E(o),R(()=>{K(l,t.item.name),d=Ii(u,1,`shrink-0 rounded border px-1.5 py-0.5 font-mono text-[9px] uppercase tracking-wide`,null,d,{"opacity-50":t.item.enabled===!1}),Ri(u,`color:${H(i)}; border-color:color-mix(in oklab, ${H(i)} 35%, transparent)`),K(f,`${H(r)??``}${t.item.enabled===!1?` \xB7 off`:``}`)}),Yr(`click`,o,()=>P(n,!H(n))),G(e,o),k()}Xr([`click`]);var pu=U(`<span> </span>`),mu=U(`<button> <span class="opacity-60"> </span></button>`),hu=U(`<div class="text-sm text-muted-foreground">Scanning your arsenal\u2026</div>`),gu=U(`<div class="text-sm text-muted-foreground"> </div>`),_u=U(`<section class="flex flex-col gap-2"><div class="flex items-center gap-3 border-b border-border pb-1.5"><span class="size-1.5 shrink-0 rounded-sm"></span> <span class="font-mono text-xs uppercase tracking-[0.14em]"> </span> <span class="font-mono text-xs tracking-[0.1em] text-muted-foreground"> </span></div> <div class="grid grid-cols-1 gap-2 md:grid-cols-2 2xl:grid-cols-3"></div></section>`),vu=U(`<div class="flex flex-col gap-6"></div>`),yu=U(`<div class="flex h-full flex-col gap-4 p-5"><div class="flex flex-wrap items-center justify-between gap-3"><h1 class="font-serif text-2xl text-foreground">\u2694 Arsenal</h1> <div class="flex items-center gap-2 font-mono text-xs text-muted-foreground"><!> <button class="rounded border px-2 py-1 transition-colors hover:text-foreground">\u21BB Rescan</button></div></div> <div class="flex flex-wrap items-center gap-2"><!> <input placeholder="Filter by name or description\u2026" autocomplete="off" class="ml-auto w-full max-w-72 rounded-md border bg-card/60 px-3 py-1.5 text-sm outline-none transition-colors focus:border-ring"/></div> <!></div>`);function bu(e,t){O(t,!0);let n=N(`skills`),r=N(``),i=j(()=>X.arsenal),a=[{id:`skills`,label:`Skills`},{id:`agents`,label:`Agents`},{id:`mcp`,label:`MCP`}],o=j(()=>{let e=H(i)?H(i)[H(n)]:[],t=H(r).toLowerCase().trim();return t?e.filter(e=>e.name.toLowerCase().includes(t)||(e.description??``).toLowerCase().includes(t)||(e.source??``).toLowerCase().includes(t)):e}),s=j(()=>{let e=new Map;for(let t of H(o)){let n=t.scope===`plugin`?`plugin:${t.source??`plugin`}`:t.scope,r=e.get(n);r||(r={label:t.scope===`plugin`?t.source??`plugin`:t.scope===`project`?`In this project`:`Personal \xB7 this machine`,scope:t.scope,items:[]},e.set(n,r)),r.items.push(t)}return[...e.values()]});function c(e){return e===`project`?`var(--c-fable)`:e===`personal`?`var(--c-sonnet)`:`#9bc2ef`}let l=j(()=>H(i)?new Date(H(i).scanned_at).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`}):``);var u=yu(),d=F(u),f=L(F(d),2),p=F(f),m=e=>{var t=pu(),n=F(t);E(t),R(()=>K(n,`${H(i).counts.plugins??``} plugins \xB7 scanned ${H(l)??``}`)),G(e,t)};q(p,e=>{H(i)&&e(m)});var h=L(p,2);E(f),E(d);var g=L(d,2),_=F(g);yi(_,17,()=>a,e=>e.id,(e,t)=>{var r=mu(),a=F(r),o=L(a),s=F(o,!0);E(o),E(r),R(()=>{Ii(r,1,`rounded-lg px-3 py-1.5 font-mono text-xs transition-colors `+(H(n)===H(t).id?`bg-accent text-accent-foreground`:`text-muted-foreground hover:text-foreground`)),K(a,`${H(t).label??``} `),K(s,H(i)?.counts?.[H(t).id]??0)}),Yr(`click`,r,()=>P(n,H(t).id,!0)),G(e,r)});var v=L(_,2);Xi(v),E(g);var y=L(g,2),b=e=>{G(e,hu())},ee=e=>{var t=gu(),n=F(t,!0);E(t),R(()=>K(n,H(r)?`No matches.`:`Nothing installed in this category.`)),G(e,t)},x=e=>{var t=vu();yi(t,21,()=>H(s),e=>e.label+e.scope,(e,t)=>{var n=_u(),r=F(n),i=F(r),a=L(i,2),o=F(a,!0);E(a);var s=L(a,2),l=F(s,!0);E(s),E(r);var u=L(r,2);yi(u,21,()=>H(t).items,e=>e.scope+(e.source??``)+e.name,(e,t)=>{fu(e,{get item(){return H(t)}})}),E(u),E(n),R((e,n)=>{Ri(i,e),Ri(a,n),K(o,H(t).label),K(l,H(t).items.length)},[()=>`background:${c(H(t).scope)}`,()=>`color:${c(H(t).scope)}`]),G(e,n)}),E(t),G(e,t)};q(y,e=>{X.arsenalLoading&&!H(i)?e(b):H(s).length?e(x,-1):e(ee,1)}),E(u),Yr(`click`,h,()=>X.loadArsenal(!0)),ia(v,()=>H(r),e=>P(r,e)),G(e,u),k()}Xr([`click`]);var xu=U(`<details class="rounded-lg border bg-card/50 p-3"><summary class="cursor-pointer text-sm font-medium text-foreground"> </summary> <p class="mt-2 text-[13px] leading-relaxed text-muted-foreground"> </p></details>`),Su=U(`<!> <!> <div class="mt-4 flex flex-col gap-2"></div> <!>`,1),Cu=U(`<!> <!>`,1);function wu(e,t){O(t,!0);let n=Y(t,`open`,15,!1),r=[{q:`Where do these numbers come from?`,a:`Synthra\'s Stop hook reads Claude Code\'s transcript JSONL after each turn and logs token usage to .synthra-graph/token_log.jsonl. The gate logs to gate_log.jsonl, tool calls to tool_log.jsonl. The dashboard reads those \u2014 it never feeds back into retrieval.`},{q:`How is cost calculated?`,a:`Token counts \xD7 Anthropic\'s published per-model rates (in src/shared/pricing.ts), summed across input, output, cache-read and cache-write. These are API-equivalent estimates, not your plan billing \u2014 useful for comparing sessions.`},{q:`What is the savings floor?`,a:`Each time the Moat blocks an exploratory Grep/Glob, we credit a deliberately conservative 500 tokens \xD7 $3/M input rate. Real savings are usually higher (it ignores cache thrash and follow-up reads the block also prevents). It\'s a floor, not a guess.`},{q:`What is the Moat?`,a:`A PreToolUse hook that intercepts Grep/Glob and, when the graph has confident context, blocks them and hands back the exact graph_read targets + signatures \u2014 so the agent reads ~50-token slices instead of whole files.`},{q:`What is the Arsenal view?`,a:`A scan of every skill, subagent, and MCP server available to you \u2014 project, personal (~/.claude), and plugin \u2014 with descriptions, so you never have to drop to the CLI to recall what\'s installed. MCP entries show name/type/url only; auth tokens are never read.`},{q:`What\'s the codebase graph?`,a:`tree-sitter parses your project into a symbol graph (files, symbols, imports, call edges). graph_read returns a symbol\'s source plus its dependency surface; graph_continue packs a context bundle.`},{q:`Where is everything stored?`,a:`.synthra-graph/ (machine-local, gitignored) holds the graph + logs; .synthra/ (git-tracked) holds branch-aware memory. Nothing leaves your machine.`},{q:`Why is my bill not lower already?`,a:`Savings land only when the agent actually uses the cheap path. v0.4\u20130.6 push the answer to the point of use (block payloads, edit recipes, dependency footers); a real dogfood session on the latest version is the true test.`}];var i=W();Ti(I(i),()=>Ol,(e,t)=>{t(e,{get open(){return n()},set open(e){n(e)},children:(e,t)=>{var n=W();Ti(I(n),()=>ic,(e,t)=>{t(e,{children:(e,t)=>{var n=Cu(),i=I(n);Ti(i,()=>wl,(e,t)=>{t(e,{class:`fixed inset-0 z-50 bg-black/60`})}),Ti(L(i,2),()=>Fl,(e,t)=>{t(e,{class:`fixed left-1/2 top-1/2 z-50 max-h-[85vh] w-[min(640px,92vw)] -translate-x-1/2 -translate-y-1/2 overflow-y-auto rounded-xl border bg-card p-6 text-card-foreground shadow-2xl`,children:(e,t)=>{var n=Su(),i=I(n);Ti(i,()=>Xs,(e,t)=>{t(e,{class:`font-serif text-2xl`,children:(e,t)=>{Ue(),G(e,ai(`FAQ`))},$$slots:{default:!0}})});var a=L(i,2);Ti(a,()=>Dl,(e,t)=>{t(e,{class:`text-xs text-muted-foreground`,children:(e,t)=>{Ue(),G(e,ai(`Where every number on this dashboard comes from.`))},$$slots:{default:!0}})});var o=L(a,2);yi(o,21,()=>r,e=>e.q,(e,t)=>{var n=xu(),r=F(n),i=F(r,!0);E(r);var a=L(r,2),o=F(a,!0);E(a),E(n),R(()=>{K(i,H(t).q),K(o,H(t).a)}),G(e,n)}),E(o),Ti(L(o,2),()=>jl,(e,t)=>{t(e,{class:`mt-4 w-full rounded-md border py-2 text-sm text-muted-foreground transition-colors hover:text-foreground`,children:(e,t)=>{Ue(),G(e,ai(`Close`))},$$slots:{default:!0}})}),G(e,n)},$$slots:{default:!0}})}),G(e,n)},$$slots:{default:!0}})}),G(e,n)},$$slots:{default:!0}})}),G(e,i),k()}var Tu=U(`<div class="flex h-screen w-screen overflow-hidden"><!> <main class="min-w-0 flex-1 overflow-y-auto"><!></main></div> <!>`,1);function Eu(e,t){O(t,!0);let n=N(!1);da(()=>(X.start(),()=>X.stop()));var r=Tu(),i=I(r),a=F(i);Ua(a,{onFaq:()=>P(n,!0)});var o=L(a,2),s=F(o),c=e=>{su(e,{})},l=e=>{bu(e,{})};q(s,e=>{X.view===`overview`?e(c):e(l,-1)}),E(o),E(i),wu(L(i,2),{get open(){return H(n)},set open(e){P(n,e,!0)}}),G(e,r),k()}var Du=document.getElementById(`app`);if(!Du)throw Error(`missing #app mount node`);si(Eu,{target:Du});</script>\n <style rel="stylesheet" crossorigin>/*! tailwindcss v4.3.1 | MIT License | https://tailwindcss.com */\n@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial;--tw-animation-delay:0s;--tw-animation-direction:normal;--tw-animation-duration:initial;--tw-animation-fill-mode:none;--tw-animation-iteration-count:1;--tw-enter-blur:0;--tw-enter-opacity:1;--tw-enter-rotate:0;--tw-enter-scale:1;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-exit-blur:0;--tw-exit-opacity:1;--tw-exit-rotate:0;--tw-exit-scale:1;--tw-exit-translate-x:0;--tw-exit-translate-y:0}}}@layer theme{:root,:host{--font-sans:var(--font-sans);--font-serif:var(--font-serif);--font-mono:var(--font-mono);--color-black:#000;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--text-3xl:1.875rem;--text-3xl--line-height:calc(2.25 / 1.875);--font-weight-medium:500;--tracking-wide:.025em;--leading-snug:1.375;--leading-relaxed:1.625;--radius-xl:.75rem;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*{border-color:var(--border)}html,body{height:100%}body{background:radial-gradient(1200px 800px at 14% 16%, #2c5db81f, transparent 60%), var(--background);color:var(--foreground);font-family:var(--font-sans);-webkit-font-smoothing:antialiased}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-thumb{background:var(--border);border-radius:999px}::-webkit-scrollbar-track{background:0 0}}@layer components;@layer utilities{.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.inset-0{inset:0}.top-1\\/2{top:50%}.left-1\\/2{left:50%}.z-50{z-index:50}.my-1{margin-block:var(--spacing)}.mt-1{margin-top:var(--spacing)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-4{margin-top:calc(var(--spacing) * 4)}.ml-auto{margin-left:auto}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.flex{display:flex}.grid{display:grid}.inline{display:inline}.inline-flex{display:inline-flex}.size-1\\.5{width:calc(var(--spacing) * 1.5);height:calc(var(--spacing) * 1.5)}.size-2{width:calc(var(--spacing) * 2);height:calc(var(--spacing) * 2)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-8{width:calc(var(--spacing) * 8);height:calc(var(--spacing) * 8)}.size-\\[116px\\]{width:116px;height:116px}.size-full{width:100%;height:100%}.h-1{height:var(--spacing)}.h-2{height:calc(var(--spacing) * 2)}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-\\[85vh\\]{max-height:85vh}.max-h-\\[190px\\]{max-height:190px}.max-h-\\[260px\\]{max-height:260px}.min-h-0{min-height:0}.w-9{width:calc(var(--spacing) * 9)}.w-\\[64px\\]{width:64px}.w-\\[248px\\]{width:248px}.w-\\[min\\(440px\\,92vw\\)\\]{width:min(440px,92vw)}.w-\\[min\\(640px\\,92vw\\)\\]{width:min(640px,92vw)}.w-full{width:100%}.w-screen{width:100vw}.max-w-72{max-width:calc(var(--spacing) * 72)}.max-w-\\[120px\\]{max-width:120px}.min-w-0{min-width:0}.flex-1{flex:1}.shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.-translate-x-1\\/2{--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.-rotate-90{rotate:-90deg}.animate-pulse{animation:var(--animate-pulse)}.cursor-pointer{cursor:pointer}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.place-items-center{place-items:center}.items-baseline{align-items:baseline}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0\\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-6{gap:calc(var(--spacing) * 6)}.gap-px{gap:1px}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-border,.border-border\\/60{border-color:var(--border)}@supports (color:color-mix(in lab, red, red)){.border-border\\/60{border-color:color-mix(in oklab, var(--border) 60%, transparent)}}.border-sidebar-border{border-color:var(--sidebar-border)}.bg-\\[var\\(--c-fable\\)\\],.bg-\\[var\\(--c-fable\\)\\]\\/12{background-color:var(--c-fable)}@supports (color:color-mix(in lab, red, red)){.bg-\\[var\\(--c-fable\\)\\]\\/12{background-color:color-mix(in oklab, var(--c-fable) 12%, transparent)}}.bg-\\[var\\(--money\\)\\]{background-color:var(--money)}.bg-accent{background-color:var(--accent)}.bg-black\\/60{background-color:#0009}@supports (color:color-mix(in lab, red, red)){.bg-black\\/60{background-color:color-mix(in oklab, var(--color-black) 60%, transparent)}}.bg-border{background-color:var(--border)}.bg-card,.bg-card\\/50{background-color:var(--card)}@supports (color:color-mix(in lab, red, red)){.bg-card\\/50{background-color:color-mix(in oklab, var(--card) 50%, transparent)}}.bg-card\\/55{background-color:var(--card)}@supports (color:color-mix(in lab, red, red)){.bg-card\\/55{background-color:color-mix(in oklab, var(--card) 55%, transparent)}}.bg-card\\/60{background-color:var(--card)}@supports (color:color-mix(in lab, red, red)){.bg-card\\/60{background-color:color-mix(in oklab, var(--card) 60%, transparent)}}.bg-card\\/70{background-color:var(--card)}@supports (color:color-mix(in lab, red, red)){.bg-card\\/70{background-color:color-mix(in oklab, var(--card) 70%, transparent)}}.bg-destructive,.bg-destructive\\/15{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.bg-destructive\\/15{background-color:color-mix(in oklab, var(--destructive) 15%, transparent)}}.bg-muted-foreground,.bg-muted-foreground\\/40{background-color:var(--muted-foreground)}@supports (color:color-mix(in lab, red, red)){.bg-muted-foreground\\/40{background-color:color-mix(in oklab, var(--muted-foreground) 40%, transparent)}}.bg-primary\\/90{background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.bg-primary\\/90{background-color:color-mix(in oklab, var(--primary) 90%, transparent)}}.bg-sidebar{background-color:var(--sidebar)}.bg-sidebar-accent,.bg-sidebar-accent\\/40{background-color:var(--sidebar-accent)}@supports (color:color-mix(in lab, red, red)){.bg-sidebar-accent\\/40{background-color:color-mix(in oklab, var(--sidebar-accent) 40%, transparent)}}.bg-sidebar-border{background-color:var(--sidebar-border)}.p-2\\.5{padding:calc(var(--spacing) * 2.5)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.px-1{padding-inline:var(--spacing)}.px-1\\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.py-0\\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-6{padding-block:calc(var(--spacing) * 6)}.pt-1{padding-top:var(--spacing)}.pr-1{padding-right:var(--spacing)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pb-1\\.5{padding-bottom:calc(var(--spacing) * 1.5)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.font-serif{font-family:var(--font-serif)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[9px\\]{font-size:9px}.text-\\[10px\\]{font-size:10px}.text-\\[13px\\]{font-size:13px}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.tracking-\\[0\\.1em\\]{--tw-tracking:.1em;letter-spacing:.1em}.tracking-\\[0\\.12em\\]{--tw-tracking:.12em;letter-spacing:.12em}.tracking-\\[0\\.14em\\]{--tw-tracking:.14em;letter-spacing:.14em}.tracking-\\[0\\.18em\\]{--tw-tracking:.18em;letter-spacing:.18em}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.break-all{word-break:break-all}.text-\\[var\\(--c-fable\\)\\]{color:var(--c-fable)}.text-\\[var\\(--money\\)\\]{color:var(--money)}.text-accent-foreground{color:var(--accent-foreground)}.text-card-foreground{color:var(--card-foreground)}.text-destructive{color:var(--destructive)}.text-foreground,.text-foreground\\/70{color:var(--foreground)}@supports (color:color-mix(in lab, red, red)){.text-foreground\\/70{color:color-mix(in oklab, var(--foreground) 70%, transparent)}}.text-foreground\\/80{color:var(--foreground)}@supports (color:color-mix(in lab, red, red)){.text-foreground\\/80{color:color-mix(in oklab, var(--foreground) 80%, transparent)}}.text-muted-foreground,.text-muted-foreground\\/80{color:var(--muted-foreground)}@supports (color:color-mix(in lab, red, red)){.text-muted-foreground\\/80{color:color-mix(in oklab, var(--muted-foreground) 80%, transparent)}}.text-primary-foreground{color:var(--primary-foreground)}.text-sidebar-accent-foreground{color:var(--sidebar-accent-foreground)}.text-sidebar-foreground,.text-sidebar-foreground\\/60{color:var(--sidebar-foreground)}@supports (color:color-mix(in lab, red, red)){.text-sidebar-foreground\\/60{color:color-mix(in oklab, var(--sidebar-foreground) 60%, transparent)}}.text-sidebar-foreground\\/75{color:var(--sidebar-foreground)}@supports (color:color-mix(in lab, red, red)){.text-sidebar-foreground\\/75{color:color-mix(in oklab, var(--sidebar-foreground) 75%, transparent)}}.uppercase{text-transform:uppercase}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.transition-\\[width\\]{transition-property:width;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.outline-none{--tw-outline-style:none;outline-style:none}@media (hover:hover){.hover\\:bg-card\\/80:hover{background-color:var(--card)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-card\\/80:hover{background-color:color-mix(in oklab, var(--card) 80%, transparent)}}.hover\\:bg-card\\/85:hover{background-color:var(--card)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-card\\/85:hover{background-color:color-mix(in oklab, var(--card) 85%, transparent)}}.hover\\:bg-sidebar-accent\\/50:hover{background-color:var(--sidebar-accent)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-sidebar-accent\\/50:hover{background-color:color-mix(in oklab, var(--sidebar-accent) 50%, transparent)}}.hover\\:text-foreground:hover{color:var(--foreground)}.hover\\:text-sidebar-foreground:hover{color:var(--sidebar-foreground)}}.focus\\:border-ring:focus{border-color:var(--ring)}@media (hover:hover){.enabled\\:hover\\:text-foreground:enabled:hover{color:var(--foreground)}}.disabled\\:opacity-40:disabled{opacity:.4}@media (width>=40rem){.sm\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (width>=48rem){.md\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (width>=64rem){.lg\\:absolute{position:absolute}.lg\\:inset-0{inset:0}.lg\\:col-span-3{grid-column:span 3/span 3}.lg\\:col-start-1{grid-column-start:1}.lg\\:col-start-2{grid-column-start:2}.lg\\:col-start-3{grid-column-start:3}.lg\\:row-span-3{grid-row:span 3/span 3}.lg\\:row-start-1{grid-row-start:1}.lg\\:row-start-2{grid-row-start:2}.lg\\:row-start-3{grid-row-start:3}.lg\\:row-start-4{grid-row-start:4}.lg\\:row-start-5{grid-row-start:5}.lg\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}}@media (width>=96rem){.\\32 xl\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}}@property --tw-animation-delay{syntax:"*";inherits:false;initial-value:0s}@property --tw-animation-direction{syntax:"*";inherits:false;initial-value:normal}@property --tw-animation-duration{syntax:"*";inherits:false}@property --tw-animation-fill-mode{syntax:"*";inherits:false;initial-value:none}@property --tw-animation-iteration-count{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-translate-y{syntax:"*";inherits:false;initial-value:0}:root{--radius:.75rem;--background:#04081a;--foreground:#ecf2fb;--card:#0a1733;--card-foreground:#ecf2fb;--popover:#0a1733;--popover-foreground:#ecf2fb;--primary:#2c5db8;--primary-foreground:#f4f7fc;--secondary:#122549;--secondary-foreground:#d7e6f7;--muted:#102146;--muted-foreground:#8ba0c2;--accent:#1b3a78;--accent-foreground:#ecf2fb;--destructive:#ff5d5d;--destructive-foreground:#fff5f5;--border:#9bc2ef24;--input:#9bc2ef2e;--ring:#5c8fe6;--sidebar:#081226;--sidebar-foreground:#d7e6f7;--sidebar-primary:#2c5db8;--sidebar-primary-foreground:#f4f7fc;--sidebar-accent:#122549;--sidebar-accent-foreground:#ecf2fb;--sidebar-border:#9bc2ef1f;--sidebar-ring:#5c8fe6;--c-fable:#2ee08f;--c-opus:#ff6338;--c-sonnet:#ffb938;--c-haiku:#7438ff;--c-unknown:#12cbf5;--money:#4ade9b;--font-sans:"Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;--font-serif:"Instrument Serif", "Times New Roman", serif;--font-mono:"Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-duration{syntax:"*";inherits:false}@keyframes pulse{50%{opacity:.5}}\n/*$vite$:1*/</style>\n </head>\n <body>\n <div id="app"></div>\n </body>\n</html>\n';
|
|
750
|
+
var built_default = '<!doctype html>\n<html lang="en" class="dark">\n <head>\n <meta charset="UTF-8" />\n <meta name="viewport" content="width=device-width, initial-scale=1.0" />\n <title>Synthra \xB7 Dashboard</title>\n <link rel="icon" href="/favicon.svg" type="image/svg+xml" />\n <link rel="preconnect" href="https://fonts.googleapis.com" />\n <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />\n <link\n href="https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Geist:wght@400;500;600;700&family=Geist+Mono:wght@400;500&display=swap"\n rel="stylesheet"\n />\n <script type="module" crossorigin>(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e=Array.isArray,t=Array.prototype.indexOf,n=Array.prototype.includes,r=Array.from,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyDescriptors,s=Object.prototype,c=Array.prototype,l=Object.getPrototypeOf,u=Object.isExtensible;function d(e){return typeof e==`function`}var f=()=>{};function p(e){for(var t=0;t<e.length;t++)e[t]()}function m(){var e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}function h(e,t){if(Array.isArray(e))return e;if(t===void 0||!(Symbol.iterator in e))return Array.from(e);let n=[];for(let r of e)if(n.push(r),n.length===t)break;return n}var g=1<<24,_=1024,v=2048,y=4096,b=8192,ee=16384,x=32768,te=1<<25,ne=65536,re=1<<19,ie=1<<20,ae=1<<25,oe=65536,se=1<<21,ce=1<<22,le=1<<23,ue=Symbol(`$state`),de=Symbol(`legacy props`),fe=Symbol(``),pe=Symbol(`attributes`),me=Symbol(`class`),he=Symbol(`style`),ge=Symbol(`text`),_e=Symbol(`form reset`),ve=new class extends Error{name=`StaleReactionError`;message="The reaction that called `getAbortSignal()` was re-run or destroyed"},ye=!!globalThis.document?.contentType&&globalThis.document.contentType.includes(`xml`);function be(e){throw Error(`https://svelte.dev/e/lifecycle_outside_component`)}function xe(){throw Error(`https://svelte.dev/e/async_derived_orphan`)}function Se(e,t,n){throw Error(`https://svelte.dev/e/each_key_duplicate`)}function Ce(e){throw Error(`https://svelte.dev/e/effect_in_teardown`)}function we(){throw Error(`https://svelte.dev/e/effect_in_unowned_derived`)}function Te(e){throw Error(`https://svelte.dev/e/effect_orphan`)}function Ee(){throw Error(`https://svelte.dev/e/effect_update_depth_exceeded`)}function De(e){throw Error(`https://svelte.dev/e/props_invalid_value`)}function Oe(){throw Error(`https://svelte.dev/e/set_context_after_init`)}function ke(){throw Error(`https://svelte.dev/e/state_descriptors_fixed`)}function Ae(){throw Error(`https://svelte.dev/e/state_prototype_fixed`)}function je(){throw Error(`https://svelte.dev/e/state_unsafe_mutation`)}function Me(){throw Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`)}var Ne={},S=Symbol(`uninitialized`),Pe=`http://www.w3.org/1999/xhtml`,Fe=`http://www.w3.org/2000/svg`,Ie=`@attach`;function Le(){console.warn(`https://svelte.dev/e/derived_inert`)}function Re(e){console.warn(`https://svelte.dev/e/hydration_mismatch`)}function ze(){console.warn(`https://svelte.dev/e/select_multiple_invalid_value`)}function Be(){console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`)}var C=!1;function Ve(e){C=e}var w;function T(e){if(e===null)throw Re(),Ne;return w=e}function He(){return T(Cn(w))}function E(e){if(C){if(Cn(w)!==null)throw Re(),Ne;w=e}}function Ue(e=1){if(C){for(var t=e,n=w;t--;)n=Cn(n);w=n}}function We(e=!0){for(var t=0,n=w;;){if(n.nodeType===8){var r=n.data;if(r===`]`){if(t===0)return n;--t}else (r===`[`||r===`[!`||r[0]===`[`&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=Cn(n);e&&n.remove(),n=i}}function Ge(e){if(!e||e.nodeType!==8)throw Re(),Ne;return e.data}function Ke(e){return e===this.v}function qe(e,t){return e==e?e!==t||typeof e==`object`&&!!e||typeof e==`function`:t==t}function Je(e){return!qe(e,this.v)}var Ye=!1,Xe=!1;function Ze(){Xe=!0}var D=null;function Qe(e){D=e}function $e(e){return it(`getContext`).get(e)}function et(e,t){let n=it(`setContext`);if(Ye){var r=V.f;!B&&r&32&&!D.i||Oe()}return n.set(e,t),t}function tt(e){return it(`hasContext`).has(e)}function nt(){return it(`getAllContexts`)}function O(e,t=!1,n){D={p:D,i:!1,c:null,e:null,s:e,x:null,r:V,l:Xe&&!t?{s:null,u:null,$:[]}:null}}function k(e){var t=D,n=t.e;if(n!==null){t.e=null;for(var r of n)zn(r)}return e!==void 0&&(t.x=e),t.i=!0,D=t.p,e??{}}function rt(){return!Xe||D!==null&&D.l===null}function it(e){return D===null&&be(e),D.c??=new Map(at(D)||void 0)}function at(e){let t=e.p;for(;t!==null;){let e=t.c;if(e!==null)return e;t=t.p}return null}var ot=[];function st(){var e=ot;ot=[],p(e)}function ct(e){if(ot.length===0&&!Vt){var t=ot;queueMicrotask(()=>{t===ot&&st()})}ot.push(e)}function lt(){for(;ot.length>0;)st()}function ut(e){var t=V;if(t===null)return B.f|=le,e;if(!(t.f&32768)&&!(t.f&4))throw e;dt(e,t)}function dt(e,t){if(!(t!==null&&t.f&16384)){for(;t!==null;){if(t.f&128){if(!(t.f&32768))throw e;try{t.b.error(e);return}catch(t){e=t}}t=t.parent}throw e}}var ft=~(v|y|_);function A(e,t){e.f=e.f&ft|t}function pt(e){e.f&512||e.deps===null?A(e,_):A(e,y)}function mt(e){if(e!==null)for(let t of e)!(t.f&2)||!(t.f&65536)||(t.f^=oe,mt(t.deps))}function ht(e,t,n){e.f&2048?t.add(e):e.f&4096&&n.add(e),mt(e.deps),A(e,_)}var gt=!1,_t=!1;function vt(e){var t=_t;try{return _t=!1,[e(),_t]}finally{_t=t}}function yt(e){let t=0,n=sn(0),r;return()=>{In()&&(H(n),Gn(()=>(t===0&&(r=Mr(()=>e(()=>dn(n)))),t+=1,()=>{ct(()=>{--t,t===0&&(r?.(),r=void 0,dn(n))})})))}}var bt=ne|re;function xt(e,t,n,r){new St(e,t,n,r)}var St=class{parent;is_pending=!1;transform_error;#e;#t=C?w:null;#n;#r;#i;#a=null;#o=null;#s=null;#c=null;#l=0;#u=0;#d=!1;#f=new Set;#p=new Set;#m=null;#h=yt(()=>(this.#m=sn(this.#l),()=>{this.#m=null}));constructor(e,t,n,r){this.#e=e,this.#n=t,this.#r=e=>{var t=V;t.b=this,t.f|=128,n(e)},this.parent=V.b,this.transform_error=r??this.parent?.transform_error??(e=>e),this.#i=Kn(()=>{if(C){let e=this.#t;He();let t=e.data===`[!`;if(e.data.startsWith(`[?`)){let t=JSON.parse(e.data.slice(2));this.#_(t)}else t?this.#v():this.#g()}else this.#y()},bt),C&&(this.#e=w)}#g(){try{this.#a=Jn(()=>this.#r(this.#e))}catch(e){this.error(e)}}#_(e){let t=this.#n.failed;t&&(this.#s=Jn(()=>{t(this.#e,()=>e,()=>()=>{})}))}#v(){let e=this.#n.pending;e&&(this.is_pending=!0,this.#o=Jn(()=>e(this.#e)),ct(()=>{var e=this.#c=document.createDocumentFragment(),t=xn();e.append(t),this.#a=this.#x(()=>Jn(()=>this.#r(t))),this.#u===0&&(this.#e.before(e),this.#c=null,er(this.#o,()=>{this.#o=null}),this.#b(M))}))}#y(){try{if(this.is_pending=this.has_pending_snippet(),this.#u=0,this.#l=0,this.#a=Jn(()=>{this.#r(this.#e)}),this.#u>0){var e=this.#c=document.createDocumentFragment();ir(this.#a,e);let t=this.#n.pending;this.#o=Jn(()=>t(this.#e))}else this.#b(M)}catch(e){this.error(e)}}#b(e){this.is_pending=!1,e.transfer_effects(this.#f,this.#p)}defer_effect(e){ht(e,this.#f,this.#p)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#n.pending}#x(e){var t=V,n=B,r=D;dr(this.#i),ur(this.#i),Qe(this.#i.ctx);try{return qt.ensure(),e()}catch(e){return ut(e),null}finally{dr(t),ur(n),Qe(r)}}#S(e,t){if(!this.has_pending_snippet()){this.parent&&this.parent.#S(e,t);return}this.#u+=e,this.#u===0&&(this.#b(t),this.#o&&er(this.#o,()=>{this.#o=null}),this.#c&&=(this.#e.before(this.#c),null))}update_pending_count(e,t){this.#S(e,t),this.#l+=e,!(!this.#m||this.#d)&&(this.#d=!0,ct(()=>{this.#d=!1,this.#m&&ln(this.#m,this.#l)}))}get_effect_pending(){return this.#h(),H(this.#m)}error(e){if(!this.#n.onerror&&!this.#n.failed)throw e;M?.is_fork?(this.#a&&M.skip_effect(this.#a),this.#o&&M.skip_effect(this.#o),this.#s&&M.skip_effect(this.#s),M.oncommit(()=>{this.#C(e)})):this.#C(e)}#C(e){this.#a&&=(z(this.#a),null),this.#o&&=(z(this.#o),null),this.#s&&=(z(this.#s),null),C&&(T(this.#t),Ue(),T(We()));var t=this.#n.onerror;let n=this.#n.failed;var r=!1,i=!1;let a=()=>{if(r){Be();return}r=!0,i&&Me(),this.#s!==null&&er(this.#s,()=>{this.#s=null}),this.#x(()=>{this.#y()})},o=e=>{try{i=!0,t?.(e,a),i=!1}catch(e){dt(e,this.#i&&this.#i.parent)}n&&(this.#s=this.#x(()=>{try{return Jn(()=>{var t=V;t.b=this,t.f|=128,n(this.#e,()=>e,()=>a)})}catch(e){return dt(e,this.#i.parent),null}}))};ct(()=>{var t;try{t=this.transform_error(e)}catch(e){dt(e,this.#i&&this.#i.parent);return}typeof t==`object`&&t&&typeof t.then==`function`?t.then(o,e=>dt(e,this.#i&&this.#i.parent)):o(t)})}};function Ct(e,t,n,r){let i=rt()?Dt:At;var a=e.filter(e=>!e.settled),o=t.map(i);if(n.length===0&&a.length===0){r(o);return}var s=V,c=wt(),l=a.length===1?a[0].promise:a.length>1?Promise.all(a.map(e=>e.promise)):null;function u(e){if(!(s.f&16384)){c();try{r([...o,...e])}catch(e){dt(e,s)}Tt()}}var d=Et();if(n.length===0){l.then(()=>u([])).finally(d);return}function f(){Promise.all(n.map(e=>kt(e))).then(u).catch(e=>dt(e,s)).finally(d)}l?l.then(()=>{c(),f(),Tt()}):f()}function wt(){var e=V,t=B,n=D,r=M;return function(i=!0){dr(e),ur(t),Qe(n),i&&!(e.f&16384)&&(r?.activate(),r?.apply())}}function Tt(e=!0){dr(null),ur(null),Qe(null),e&&M?.deactivate()}function Et(){var e=V,t=e.b,n=M,r=!!t?.is_rendered();return t?.update_pending_count(1,n),n.increment(r,e),()=>{t?.update_pending_count(-1,n),n.decrement(r,e)}}function Dt(e){var t=2|v;return V!==null&&(V.f|=re),{ctx:D,deps:null,effects:null,equals:Ke,f:t,fn:e,reactions:null,rv:0,v:S,wv:0,parent:V,ac:null}}var Ot=Symbol(`obsolete`);function kt(e,t,n){let r=V;r===null&&xe();var i=void 0,a=sn(S),o=!B,s=new Set;return Wn(()=>{var t=V,n=m();i=n.promise;try{Promise.resolve(e()).then(n.resolve,e=>{e!==ve&&n.reject(e)}).finally(Tt)}catch(e){n.reject(e),Tt()}var c=M;if(o){if(t.f&32768)var l=Et();if(r.b?.is_rendered())c.async_deriveds.get(t)?.reject(Ot);else for(let e of s.values())e.reject(Ot);s.add(n),c.async_deriveds.set(t,n)}let u=(e,t=void 0)=>{l?.(),s.delete(n),t!==Ot&&(c.activate(),t?(a.f|=le,ln(a,t)):(a.f&8388608&&(a.f^=le),ln(a,e)),c.deactivate())};n.promise.then(u,e=>u(null,e||`unknown`))}),Ln(()=>{for(let e of s)e.reject(Ot)}),new Promise(e=>{function t(n){function r(){n===i?e(a):t(i)}n.then(r,r)}t(i)})}function j(e){let t=Dt(e);return Ye||pr(t),t}function At(e){let t=Dt(e);return t.equals=Je,t}function jt(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)z(t[n])}}function Mt(e){var t,n=V,r=e.parent;if(!sr&&r!==null&&e.v!==S&&r.f&24576)return Le(),e.v;dr(r);try{e.f&=~oe,jt(e),t=Tr(e)}finally{dr(n)}return t}function Nt(e){var t=Mt(e);if(!e.equals(t)&&(e.wv=Sr(),(!M?.is_fork||e.deps===null)&&(M===null?e.v=t:(M.capture(e,t,!0),Rt?.capture(e,t,!0)),e.deps===null))){A(e,_);return}sr||(zt===null?pt(e):(In()||M?.is_fork)&&zt.set(e,t))}function Pt(e){if(e.effects!==null)for(let t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(ve),t.fn!==null&&(t.teardown=f),t.ac=null,Dr(t,0),Xn(t))}function Ft(e){if(e.effects!==null)for(let t of e.effects)t.teardown&&t.fn!==null&&Or(t)}var It=null,Lt=null,M=null,Rt=null,zt=null,Bt=null,Vt=!1,Ht=!1,Ut=null,Wt=null,Gt=0,Kt=1,qt=class e{id=Kt++;#e=!1;linked=!0;#t=null;#n=null;async_deriveds=new Map;current=new Map;previous=new Map;#r=new Set;#i=new Set;#a=0;#o=new Map;#s=null;#c=[];#l=[];#u=new Set;#d=new Set;#f=new Map;#p=new Set;is_fork=!1;#m=!1;constructor(){Lt===null?It=Lt=this:(Lt.#n=this,this.#t=Lt),Lt=this}#h(){if(this.is_fork)return!0;for(let n of this.#o.keys()){for(var e=n,t=!1;e.parent!==null;){if(this.#f.has(e)){t=!0;break}e=e.parent}if(!t)return!0}return!1}skip_effect(e){this.#f.has(e)||this.#f.set(e,{d:[],m:[]}),this.#p.delete(e)}unskip_effect(e,t=e=>this.schedule(e)){var n=this.#f.get(e);if(n){this.#f.delete(e);for(var r of n.d)A(r,v),t(r);for(r of n.m)A(r,y),t(r)}this.#p.add(e)}#g(){this.#e=!0,Gt++>1e3&&(this.#S(),Yt());for(let e of this.#u)this.#d.delete(e),A(e,v),this.schedule(e);for(let e of this.#d)A(e,y),this.schedule(e);let t=this.#c;this.#c=[],this.apply();var n=Ut=[],r=[],i=Wt=[];for(let e of t)try{this.#_(e,n,r)}catch(t){throw nn(e),this.#h()||this.discard(),t}if(M=null,i.length>0){var a=e.ensure();for(let e of i)a.schedule(e)}if(Ut=null,Wt=null,this.#h()){this.#b(r),this.#b(n);for(let[e,t]of this.#f)tn(e,t);i.length>0&&M.#g();return}let o=this.#v();if(o){this.#b(r),this.#b(n),o.#y(this);return}this.#u.clear(),this.#d.clear();for(let e of this.#r)e(this);this.#r.clear(),Rt=this,Zt(r),Zt(n),Rt=null,this.#s?.resolve();var s=M;if(this.#a===0&&(this.#c.length===0||s!==null)&&(this.#S(),Ye&&(this.#x(),M=s)),this.#c.length>0)if(s!==null){let e=s;e.#c.push(...this.#c.filter(t=>!e.#c.includes(t)))}else s=this;s!==null&&s.#g()}#_(e,t,n){e.f^=_;for(var r=e.first;r!==null;){var i=r.f,a=(i&96)!=0;if(!(a&&i&1024||i&8192||this.#f.has(r))&&r.fn!==null){a?r.f^=_:i&4?t.push(r):Ye&&i&16777224?n.push(r):Cr(r)&&(i&16&&this.#d.add(r),Or(r));var o=r.first;if(o!==null){r=o;continue}}for(;r!==null;){var s=r.next;if(s!==null){r=s;break}r=r.parent}}}#v(){for(var e=this.#t;e!==null;){if(!e.is_fork){for(let[t,[,n]]of this.current)if(e.current.has(t)&&!n)return e}e=e.#t}return null}#y(e){for(let[t,n]of e.current)!this.previous.has(t)&&e.previous.has(t)&&this.previous.set(t,e.previous.get(t)),this.current.set(t,n);for(let[t,n]of e.async_deriveds){let e=this.async_deriveds.get(t);e&&n.promise.then(e.resolve).catch(e.reject)}e.async_deriveds.clear(),this.transfer_effects(e.#u,e.#d);let t=e=>{var n=e.reactions;if(n!==null)for(let e of n){var r=e.f;if(r&2)t(e);else{var i=e;r&4194320&&!this.async_deriveds.has(i)&&(this.#d.delete(i),A(i,v),this.schedule(i))}}};for(let e of this.current.keys())t(e);this.oncommit(()=>e.discard()),e.#S(),M=this,this.#g()}#b(e){for(var t=0;t<e.length;t+=1)ht(e[t],this.#u,this.#d)}capture(e,t,n=!1){e.v!==S&&!this.previous.has(e)&&this.previous.set(e,e.v),e.f&8388608||(this.current.set(e,[t,n]),zt?.set(e,t)),this.is_fork||(e.v=t)}activate(){M=this}deactivate(){M=null,zt=null}flush(){try{Ht=!0,M=this,this.#g()}finally{Gt=0,Bt=null,Ut=null,Wt=null,Ht=!1,M=null,zt=null,an.clear()}}discard(){for(let e of this.#i)e(this);this.#i.clear();for(let e of this.async_deriveds.values())e.reject(Ot);this.#S(),this.#s?.resolve()}register_created_effect(e){this.#l.push(e)}#x(){for(let u=It;u!==null;u=u.#n){var e=u.id<this.id,t=[];for(let[r,[i,a]]of this.current){if(u.current.has(r)){var n=u.current.get(r)[0];if(e&&i!==n)u.current.set(r,[i,a]);else continue}t.push(r)}if(e)for(let[e,t]of this.async_deriveds){let n=u.async_deriveds.get(e);n&&t.promise.then(n.resolve).catch(n.reject)}var r=[...u.current.keys()].filter(e=>!u.current.get(e)[1]);if(!(!u.#e||r.length===0)){var i=r.filter(e=>!this.current.has(e));if(i.length===0)e&&u.discard();else if(t.length>0){if(e)for(let e of this.#p)u.unskip_effect(e,e=>{e.f&4194320?u.schedule(e):u.#b([e])});u.activate();var a=new Set,o=new Map;for(var s of t)Qt(s,i,a,o);o=new Map;var c=[...u.current].filter(([e,t])=>{let n=this.current.get(e);return n?n[0]!==t[0]||n[1]!==t[1]:!0}).map(([e])=>e);if(c.length>0)for(let e of this.#l)!(e.f&155648)&&$t(e,c,o)&&(e.f&4194320?(A(e,v),u.schedule(e)):u.#u.add(e));if(u.#c.length>0&&!u.#m){u.apply();for(var l of u.#c)u.#_(l,[],[]);u.#c=[]}u.deactivate()}}}}increment(e,t){if(this.#a+=1,e){let e=this.#o.get(t)??0;this.#o.set(t,e+1)}}decrement(e,t){if(--this.#a,e){let e=this.#o.get(t)??0;e===1?this.#o.delete(t):this.#o.set(t,e-1)}this.#m||(this.#m=!0,ct(()=>{this.#m=!1,this.linked&&this.flush()}))}transfer_effects(e,t){for(let t of e)this.#u.add(t);for(let e of t)this.#d.add(e);e.clear(),t.clear()}oncommit(e){this.#r.add(e)}ondiscard(e){this.#i.add(e)}settled(){return(this.#s??=m()).promise}static ensure(){if(M===null){let t=M=new e;!Ht&&!Vt&&ct(()=>{t.#e||t.flush()})}return M}apply(){if(!Ye||!this.is_fork&&this.#t===null&&this.#n===null){zt=null;return}zt=new Map;for(let[e,[t]]of this.current)zt.set(e,t);for(let t=It;t!==null;t=t.#n)if(!(t===this||t.is_fork)){var e=!1;if(t.id<this.id){for(let[n,[,r]]of t.current)if(!r&&this.current.has(n)){e=!0;break}}if(!e)for(let[e,n]of t.previous)zt.has(e)||zt.set(e,n)}}schedule(e){if(Bt=e,e.b?.is_pending&&e.f&16777228&&!(e.f&32768)){e.b.defer_effect(e);return}for(var t=e;t.parent!==null;){t=t.parent;var n=t.f;if(Ut!==null&&t===V&&(Ye||(B===null||!(B.f&2))&&!gt))return;if(n&96){if(!(n&1024))return;t.f^=_}}this.#c.push(t)}#S(){if(this.linked){var e=this.#t,t=this.#n;e===null?It=t:e.#n=t,t===null?Lt=e:t.#t=e,this.linked=!1}}};function Jt(e){var t=Vt;Vt=!0;try{var n;for(e&&(M!==null&&!M.is_fork&&M.flush(),n=e());;){if(lt(),M===null)return n;M.flush()}}finally{Vt=t}}function Yt(){try{Ee()}catch(e){dt(e,Bt)}}var Xt=null;function Zt(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if(!(r.f&24576)&&Cr(r)&&(Xt=new Set,Or(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&$n(r),Xt?.size>0)){an.clear();for(let e of Xt){if(e.f&24576)continue;let t=[e],n=e.parent;for(;n!==null;)Xt.has(n)&&(Xt.delete(n),t.push(n)),n=n.parent;for(let e=t.length-1;e>=0;e--){let n=t[e];n.f&24576||Or(n)}}Xt.clear()}}Xt=null}}function Qt(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(let i of e.reactions){let e=i.f;e&2?Qt(i,t,n,r):e&4194320&&!(e&2048)&&$t(i,t,r)&&(A(i,v),en(i))}}function $t(e,t,r){let i=r.get(e);if(i!==void 0)return i;if(e.deps!==null)for(let i of e.deps){if(n.call(t,i))return!0;if(i.f&2&&$t(i,t,r))return r.set(i,!0),!0}return r.set(e,!1),!1}function en(e){M.schedule(e)}function tn(e,t){if(!(e.f&32&&e.f&1024)){e.f&2048?t.d.push(e):e.f&4096&&t.m.push(e),A(e,_);for(var n=e.first;n!==null;)tn(n,t),n=n.next}}function nn(e){A(e,_);for(var t=e.first;t!==null;)nn(t),t=t.next}var rn=new Set,an=new Map,on=!1;function sn(e,t){return{f:0,v:e,reactions:null,equals:Ke,rv:0,wv:0}}function N(e,t){let n=sn(e,t);return pr(n),n}function cn(e,t=!1,n=!0){let r=sn(e);return t||(r.equals=Je),Xe&&n&&D!==null&&D.l!==null&&(D.l.s??=[]).push(r),r}function P(e,t,n=!1){return B!==null&&(!lr||B.f&131072)&&rt()&&B.f&4325394&&(fr===null||!fr.has(e))&&je(),ln(e,n?pn(t):t,Wt)}function ln(e,t,n=null){if(!e.equals(t)){an.set(e,sr?t:e.v);var r=qt.ensure();if(r.capture(e,t),e.f&2){let t=e;e.f&2048&&Mt(t),zt===null&&pt(t)}e.wv=Sr(),fn(e,v,n),rt()&&V!==null&&V.f&1024&&!(V.f&96)&&(gr===null?_r([e]):gr.push(e)),!r.is_fork&&rn.size>0&&!on&&un()}return t}function un(){on=!1;for(let e of rn){e.f&1024&&A(e,y);let t;try{t=Cr(e)}catch{t=!0}t&&Or(e)}rn.clear()}function dn(e){P(e,e.v+1)}function fn(e,t,n){var r=e.reactions;if(r!==null)for(var i=rt(),a=r.length,o=0;o<a;o++){var s=r[o],c=s.f;if(!(!i&&s===V)){var l=(c&v)===0;if(l&&A(s,t),c&131072)rn.add(s);else if(c&2){var u=s;zt?.delete(u),c&65536||(c&512&&(V===null||!(V.f&2097152))&&(s.f|=oe),fn(u,y,n))}else if(l){var d=s;c&16&&Xt!==null&&Xt.add(d),n===null?en(d):n.push(d)}}}}function pn(t){if(typeof t!=`object`||!t||ue in t)return t;let n=l(t);if(n!==s&&n!==c)return t;var r=new Map,i=e(t),o=N(0),u=null,d=br,f=e=>{if(br===d)return e();var t=B,n=br;ur(null),xr(d);var r=e();return ur(t),xr(n),r};return i&&r.set(`length`,N(t.length,u)),new Proxy(t,{defineProperty(e,t,n){(!(`value`in n)||n.configurable===!1||n.enumerable===!1||n.writable===!1)&&ke();var i=r.get(t);return i===void 0?f(()=>{var e=N(n.value,u);return r.set(t,e),e}):P(i,n.value,!0),!0},deleteProperty(e,t){var n=r.get(t);if(n===void 0){if(t in e){let e=f(()=>N(S,u));r.set(t,e),dn(o)}}else P(n,S),dn(o);return!0},get(e,n,i){if(n===ue)return t;var o=r.get(n),s=n in e;if(o===void 0&&(!s||a(e,n)?.writable)&&(o=f(()=>N(pn(s?e[n]:S),u)),r.set(n,o)),o!==void 0){var c=H(o);return c===S?void 0:c}return Reflect.get(e,n,i)},getOwnPropertyDescriptor(e,t){var n=Reflect.getOwnPropertyDescriptor(e,t);if(n&&`value`in n){var i=r.get(t);i&&(n.value=H(i))}else if(n===void 0){var a=r.get(t),o=a?.v;if(a!==void 0&&o!==S)return{enumerable:!0,configurable:!0,value:o,writable:!0}}return n},has(e,t){if(t===ue)return!0;var n=r.get(t),i=n!==void 0&&n.v!==S||Reflect.has(e,t);return(n!==void 0||V!==null&&(!i||a(e,t)?.writable))&&(n===void 0&&(n=f(()=>N(i?pn(e[t]):S,u)),r.set(t,n)),H(n)===S)?!1:i},set(e,t,n,s){var c=r.get(t),l=t in e;if(i&&t===`length`)for(var d=n;d<c.v;d+=1){var p=r.get(d+``);p===void 0?d in e&&(p=f(()=>N(S,u)),r.set(d+``,p)):P(p,S)}if(c===void 0)(!l||a(e,t)?.writable)&&(c=f(()=>N(void 0,u)),P(c,pn(n)),r.set(t,c));else{l=c.v!==S;var m=f(()=>pn(n));P(c,m)}var h=Reflect.getOwnPropertyDescriptor(e,t);if(h?.set&&h.set.call(s,n),!l){if(i&&typeof t==`string`){var g=r.get(`length`),_=Number(t);Number.isInteger(_)&&_>=g.v&&P(g,_+1)}dn(o)}return!0},ownKeys(e){H(o);var t=Reflect.ownKeys(e).filter(e=>{var t=r.get(e);return t===void 0||t.v!==S});for(var[n,i]of r)i.v!==S&&!(n in e)&&t.push(n);return t},setPrototypeOf(){Ae()}})}function mn(e){try{if(typeof e==`object`&&e&&ue in e)return e[ue]}catch{}return e}function hn(e,t){return Object.is(mn(e),mn(t))}new Set([`copyWithin`,`fill`,`pop`,`push`,`reverse`,`shift`,`sort`,`splice`,`unshift`]);var gn,_n,vn,yn;function bn(){if(gn===void 0){gn=window,_n=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;vn=a(t,`firstChild`).get,yn=a(t,`nextSibling`).get,u(e)&&(e[me]=void 0,e[pe]=null,e[he]=void 0,e.__e=void 0),u(n)&&(n[ge]=void 0)}}function xn(e=``){return document.createTextNode(e)}function Sn(e){return vn.call(e)}function Cn(e){return yn.call(e)}function F(e,t){if(!C)return Sn(e);var n=Sn(w);if(n===null)n=w.appendChild(xn());else if(t&&n.nodeType!==3){var r=xn();return n?.before(r),T(r),r}return t&&Dn(n),T(n),n}function I(e,t=!1){if(!C){var n=Sn(e);return n instanceof Comment&&n.data===``?Cn(n):n}if(t){if(w?.nodeType!==3){var r=xn();return w?.before(r),T(r),r}Dn(w)}return w}function L(e,t=1,n=!1){let r=C?w:e;for(var i;t--;)i=r,r=Cn(r);if(!C)return r;if(n){if(r?.nodeType!==3){var a=xn();return r===null?i?.after(a):r.before(a),T(a),a}Dn(r)}return T(r),r}function wn(e){e.textContent=``}function Tn(){return!Ye||Xt!==null?!1:(V.f&x)!==0}function En(e,t,n){return t==null||t===`http://www.w3.org/1999/xhtml`?n?document.createElement(e,{is:n}):document.createElement(e):n?document.createElementNS(t,e,{is:n}):document.createElementNS(t,e)}function Dn(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===3;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function On(e,t){if(t){let t=document.body;e.autofocus=!0,ct(()=>{document.activeElement===t&&e.focus()})}}var kn=!1;function An(){kn||(kn=!0,document.addEventListener(`reset`,e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(let t of e.target.elements)t[_e]?.()})},{capture:!0}))}function jn(e){var t=B,n=V;ur(null),dr(null);try{return e()}finally{ur(t),dr(n)}}function Mn(e,t,n,r=n){e.addEventListener(t,()=>jn(n));let i=e[_e];i?e[_e]=()=>{i(),r(!0)}:e[_e]=()=>r(!0),An()}function Nn(e){V===null&&(B===null&&Te(e),we()),sr&&Ce(e)}function Pn(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function Fn(e,t){var n=V;n!==null&&n.f&8192&&(e|=b);var r={ctx:D,deps:null,nodes:null,f:e|v|512,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};M?.register_created_effect(r);var i=r;if(e&4)Ut===null?qt.ensure().schedule(r):Ut.push(r);else if(t!==null){try{Or(r)}catch(e){throw z(r),e}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&!(i.f&524288)&&(i=i.first,e&16&&e&65536&&i!==null&&(i.f|=ne))}if(i!==null&&(i.parent=n,n!==null&&Pn(i,n),B!==null&&B.f&2&&!(e&64))){var a=B;(a.effects??=[]).push(i)}return r}function In(){return B!==null&&!lr}function Ln(e){let t=Fn(8,null);return A(t,_),t.teardown=e,t}function Rn(e){Nn(`$effect`);var t=V.f;if(!B&&t&32&&D!==null&&!D.i){var n=D;(n.e??=[]).push(e)}else return zn(e)}function zn(e){return Fn(4|ie,e)}function Bn(e){return Nn(`$effect.pre`),Fn(8|ie,e)}function Vn(e){qt.ensure();let t=Fn(64|re,e);return()=>{z(t)}}function Hn(e){qt.ensure();let t=Fn(64|re,e);return(e={})=>new Promise(n=>{e.outro?er(t,()=>{z(t),n(void 0)}):(z(t),n(void 0))})}function Un(e){return Fn(4,e)}function Wn(e){return Fn(ce|re,e)}function Gn(e,t=0){return Fn(8|t,e)}function R(e,t=[],n=[],r=[]){Ct(r,t,n,t=>{Fn(8,()=>{e(...t.map(H))})})}function Kn(e,t=0){return Fn(16|t,e)}function qn(e,t=0){return Fn(g|t,e)}function Jn(e){return Fn(32|re,e)}function Yn(e){var t=e.teardown;if(t!==null){let e=sr,n=B;cr(!0),ur(null);try{t.call(null)}finally{cr(e),ur(n)}}}function Xn(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){let e=n.ac;e!==null&&jn(()=>{e.abort(ve)});var r=n.next;n.f&64?n.parent=null:z(n,t),n=r}}function Zn(e){for(var t=e.first;t!==null;){var n=t.next;t.f&32||z(t),t=n}}function z(e,t=!0){var n=!1;(t||e.f&262144)&&e.nodes!==null&&e.nodes.end!==null&&(Qn(e.nodes.start,e.nodes.end),n=!0),e.f|=te,Xn(e,t&&!n),Dr(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)e.stop();Yn(e),e.f^=te,e.f|=ee;var i=e.parent;i!==null&&i.first!==null&&$n(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Qn(e,t){for(;e!==null;){var n=e===t?null:Cn(e);e.remove(),e=n}}function $n(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function er(e,t,n=!0){var r=[];tr(e,r,!0);var i=()=>{n&&z(e),t&&t()},a=r.length;if(a>0){var o=()=>--a||i();for(var s of r)s.out(o)}else i()}function tr(e,t,n){if(!(e.f&8192)){e.f^=b;var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)(e.is_global||n)&&t.push(e);for(var i=e.first;i!==null;){var a=i.next;if(!(i.f&64)){var o=(i.f&65536)!=0||(i.f&32)!=0&&(e.f&16)!=0;tr(i,t,o?n:!1)}i=a}}}function nr(e){rr(e,!0)}function rr(e,t){if(e.f&8192){e.f^=b,e.f&1024||(A(e,v),qt.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&65536)!=0||(n.f&32)!=0;rr(n,i?t:!1),n=r}var a=e.nodes&&e.nodes.t;if(a!==null)for(let e of a)(e.is_global||t)&&e.in()}}function ir(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:Cn(n);t.append(n),n=i}}var ar=null,or=!1,sr=!1;function cr(e){sr=e}var B=null,lr=!1;function ur(e){B=e}var V=null;function dr(e){V=e}var fr=null;function pr(e){B!==null&&(!Ye||B.f&2)&&(fr??=new Set).add(e)}var mr=null,hr=0,gr=null;function _r(e){gr=e}var vr=1,yr=0,br=yr;function xr(e){br=e}function Sr(){return++vr}function Cr(e){var t=e.f;if(t&2048)return!0;if(t&2&&(e.f&=~oe),t&4096){for(var n=e.deps,r=n.length,i=0;i<r;i++){var a=n[i];if(Cr(a)&&Nt(a),a.wv>e.wv)return!0}t&512&&zt===null&&A(e,_)}return!1}function wr(e,t,n=!0){var r=e.reactions;if(r!==null&&!(!Ye&&fr!==null&&fr.has(e)))for(var i=0;i<r.length;i++){var a=r[i];a.f&2?wr(a,t,!1):t===a&&(n?A(a,v):a.f&1024&&A(a,y),en(a))}}function Tr(e){var t=mr,n=hr,r=gr,i=B,a=fr,o=D,s=lr,c=br,l=e.f;mr=null,hr=0,gr=null,B=l&96?null:e,fr=null,Qe(e.ctx),lr=!1,br=++yr,e.ac!==null&&(jn(()=>{e.ac.abort(ve)}),e.ac=null);try{e.f|=se;var u=e.fn,d=u();e.f|=x;var f=e.deps,p=M?.is_fork;if(mr!==null){var m;if(p||Dr(e,hr),f!==null&&hr>0)for(f.length=hr+mr.length,m=0;m<mr.length;m++)f[hr+m]=mr[m];else e.deps=f=mr;if(In()&&e.f&512)for(m=hr;m<f.length;m++)(f[m].reactions??=[]).push(e)}else !p&&f!==null&&hr<f.length&&(Dr(e,hr),f.length=hr);if(rt()&&gr!==null&&!lr&&f!==null&&!(e.f&6146))for(m=0;m<gr.length;m++)wr(gr[m],e);if(i!==null&&i!==e){if(yr++,i.deps!==null)for(let e=0;e<n;e+=1)i.deps[e].rv=yr;if(t!==null)for(let e of t)e.rv=yr;gr!==null&&(r===null?r=gr:r.push(...gr))}return e.f&8388608&&(e.f^=le),d}catch(e){return ut(e)}finally{e.f^=se,mr=t,hr=n,gr=r,B=i,fr=a,Qe(o),lr=s,br=c}}function Er(e,r){let i=r.reactions;if(i!==null){var a=t.call(i,e);if(a!==-1){var o=i.length-1;o===0?i=r.reactions=null:(i[a]=i[o],i.pop())}}if(i===null&&r.f&2&&(mr===null||!n.call(mr,r))){var s=r;s.f&512&&(s.f^=512,s.f&=~oe),s.v!==S&&pt(s),Pt(s),Dr(s,0)}}function Dr(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Er(e,n[r])}function Or(e){var t=e.f;if(!(t&16384)){A(e,_);var n=V,r=or;V=e,or=!0;try{t&16777232?Zn(e):Xn(e),Yn(e);var i=Tr(e);e.teardown=typeof i==`function`?i:null,e.wv=vr}finally{or=r,V=n}}}async function kr(){if(Ye)return new Promise(e=>{requestAnimationFrame(()=>e()),setTimeout(()=>e())});await Promise.resolve(),Jt()}function H(e){var t=(e.f&2)!=0;if(ar?.add(e),B!==null&&!lr&&!(V!==null&&V.f&16384)&&(fr===null||!fr.has(e))){var r=B.deps;if(B.f&2097152)e.rv<yr&&(e.rv=yr,mr===null&&r!==null&&r[hr]===e?hr++:mr===null?mr=[e]:mr.push(e));else{B.deps??=[],n.call(B.deps,e)||B.deps.push(e);var i=e.reactions;i===null?e.reactions=[B]:n.call(i,B)||i.push(B)}}if(sr&&an.has(e))return an.get(e);if(t){var a=e;if(sr){var o=a.v;return(!(a.f&1024)&&a.reactions!==null||jr(a))&&(o=Mt(a)),an.set(a,o),o}var s=(a.f&512)==0&&!lr&&B!==null&&(or||(B.f&512)!=0),c=(a.f&x)===0;Cr(a)&&(s&&(a.f|=512),Nt(a)),s&&!c&&(Ft(a),Ar(a))}if(zt?.has(e))return zt.get(e);if(e.f&8388608)throw e.v;return e.v}function Ar(e){if(e.f|=512,e.deps!==null)for(let t of e.deps)(t.reactions??=[]).push(e),t.f&2&&!(t.f&512)&&(Ft(t),Ar(t))}function jr(e){if(e.v===S)return!0;if(e.deps===null)return!1;for(let t of e.deps)if(an.has(t)||t.f&2&&jr(t))return!0;return!1}function Mr(e){var t=lr;try{return lr=!0,e()}finally{lr=t}}function Nr(){return Symbol(Ie)}function Pr(e){return e.endsWith(`capture`)&&e!==`gotpointercapture`&&e!==`lostpointercapture`}var Fr=[`beforeinput`,`click`,`change`,`dblclick`,`contextmenu`,`focusin`,`focusout`,`input`,`keydown`,`keyup`,`mousedown`,`mousemove`,`mouseout`,`mouseover`,`mouseup`,`pointerdown`,`pointermove`,`pointerout`,`pointerover`,`pointerup`,`touchend`,`touchmove`,`touchstart`];function Ir(e){return Fr.includes(e)}var Lr=`allowfullscreen.async.autofocus.autoplay.checked.controls.default.disabled.formnovalidate.indeterminate.inert.ismap.loop.multiple.muted.nomodule.novalidate.open.playsinline.readonly.required.reversed.seamless.selected.webkitdirectory.defer.disablepictureinpicture.disableremoteplayback`.split(`.`),Rr={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 zr(e){return e=e.toLowerCase(),Rr[e]??e}[...Lr];var Br=[`touchstart`,`touchmove`];function Vr(e){return Br.includes(e)}var Hr=[`textarea`,`script`,`style`,`title`];function Ur(e){return Hr.includes(e)}var Wr=Symbol(`events`),Gr=new Set,Kr=new Set;function qr(e,t,n,r={}){function i(e){if(r.capture||Qr.call(t,e),!e.cancelBubble)return jn(()=>n?.call(this,e))}return e.startsWith(`pointer`)||e.startsWith(`touch`)||e===`wheel`?ct(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function Jr(e,t,n,r={}){var i=qr(t,e,n,r);return()=>{e.removeEventListener(t,i,r)}}function Yr(e,t,n){(t[Wr]??={})[e]=n}function Xr(e){for(var t=0;t<e.length;t++)Gr.add(e[t]);for(var n of Kr)n(e)}var Zr=null;function Qr(e){var t=this,n=t.ownerDocument,r=e.type,a=e.composedPath?.()||[],o=a[0]||e.target;Zr=e;var s=0,c=Zr===e&&e[Wr];if(c){var l=a.indexOf(c);if(l!==-1&&(t===document||t===window)){e[Wr]=t;return}var u=a.indexOf(t);if(u===-1)return;l<=u&&(s=l)}if(o=a[s]||e.target,o!==t){i(e,`currentTarget`,{configurable:!0,get(){return o||n}});var d=B,f=V;ur(null),dr(null);try{for(var p,m=[];o!==null&&o!==t;){try{var h=o[Wr]?.[r];h!=null&&(!o.disabled||e.target===o)&&h.call(o,e)}catch(e){p?m.push(e):p=e}if(e.cancelBubble)break;s++,o=s<a.length?a[s]:null}if(p){for(let e of m)queueMicrotask(()=>{throw e});throw p}}finally{e[Wr]=t,delete e.currentTarget,ur(d),dr(f)}}}var $r=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy(`svelte-trusted-html`,{createHTML:e=>e});function ei(e){return $r?.createHTML(e)??e}function ti(e){var t=En(`template`);return t.innerHTML=ei(e.replaceAll(`<!>`,`\\x3C!---->`)),t.content}function ni(e,t){var n=V;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function U(e,t){var n=(t&1)!=0,r=(t&2)!=0,i,a=!e.startsWith(`<!>`);return()=>{if(C)return ni(w,null),w;i===void 0&&(i=ti(a?e:`<!>`+e),n||(i=Sn(i)));var t=r||_n?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=Sn(t),s=t.lastChild;ni(o,s)}else ni(t,t);return t}}function ri(e,t,n=`svg`){var r=!e.startsWith(`<!>`),i=(t&1)!=0,a=`<${n}>${r?e:`<!>`+e}</${n}>`,o;return()=>{if(C)return ni(w,null),w;if(!o){var e=Sn(ti(a));if(i)for(o=document.createDocumentFragment();Sn(e);)o.appendChild(Sn(e));else o=Sn(e)}var t=o.cloneNode(!0);if(i){var n=Sn(t),r=t.lastChild;ni(n,r)}else ni(t,t);return t}}function ii(e,t){return ri(e,t,`svg`)}function ai(e=``){if(!C){var t=xn(e+``);return ni(t,t),t}var n=w;return n.nodeType===3?Dn(n):(n.before(n=xn()),T(n)),ni(n,n),n}function W(){if(C)return ni(w,null),w;var e=document.createDocumentFragment(),t=document.createComment(``),n=xn();return e.append(t,n),ni(t,n),e}function G(e,t){if(C){var n=V;(!(n.f&32768)||n.nodes.end===null)&&(n.nodes.end=w),He();return}e!==null&&e.before(t)}function oi(){if(C&&w&&w.nodeType===8&&w.textContent?.startsWith(`$`)){let e=w.textContent.substring(1);return He(),e}return(window.__svelte??={}).uid??=1,`c${window.__svelte.uid++}`}function K(e,t){var n=t==null?``:typeof t==`object`?`${t}`:t;n!==(e[ge]??=e.nodeValue)&&(e[ge]=n,e.nodeValue=`${n}`)}function si(e,t){return li(e,t)}var ci=new Map;function li(e,{target:t,anchor:n,props:i={},events:a,context:o,intro:s=!0,transformError:c}){bn();var l=void 0,u=Hn(()=>{var s=n??t.appendChild(xn());xt(s,{pending:()=>{}},t=>{O({});var n=D;if(o&&(n.c=o),a&&(i.$$events=a),C&&ni(t,null),l=e(t,i)||{},C&&(V.nodes.end=w,w===null||w.nodeType!==8||w.data!==`]`))throw Re(),Ne;k()},c);var u=new Set,d=e=>{for(var n=0;n<e.length;n++){var r=e[n];if(!u.has(r)){u.add(r);var i=Vr(r);for(let e of[t,document]){var a=ci.get(e);a===void 0&&(a=new Map,ci.set(e,a));var o=a.get(r);o===void 0?(e.addEventListener(r,Qr,{passive:i}),a.set(r,1)):a.set(r,o+1)}}}};return d(r(Gr)),Kr.add(d),()=>{for(var e of u)for(let n of[t,document]){var r=ci.get(n),i=r.get(e);--i==0?(n.removeEventListener(e,Qr),r.delete(e),r.size===0&&ci.delete(n)):r.set(e,i)}Kr.delete(d),s!==n&&s.parentNode?.removeChild(s)}});return ui.set(l,u),l}var ui=new WeakMap;function di(e,t){let n=ui.get(e);return n?(ui.delete(e),n(t)):Promise.resolve()}var fi=class{anchor;#e=new Map;#t=new Map;#n=new Map;#r=new Set;#i=!0;constructor(e,t=!0){this.anchor=e,this.#i=t}#a=e=>{if(this.#e.has(e)){var t=this.#e.get(e),n=this.#t.get(t);if(n)nr(n),this.#r.delete(t);else{var r=this.#n.get(t);r&&(nr(r.effect),this.#t.set(t,r.effect),this.#n.delete(t),r.fragment.lastChild.remove(),this.anchor.before(r.fragment),n=r.effect)}for(let[t,n]of this.#e){if(this.#e.delete(t),t===e)break;let r=this.#n.get(n);r&&(z(r.effect),this.#n.delete(n))}for(let[e,r]of this.#t){if(e===t||this.#r.has(e))continue;let i=()=>{if(Array.from(this.#e.values()).includes(e)){var t=document.createDocumentFragment();ir(r,t),t.append(xn()),this.#n.set(e,{effect:r,fragment:t})}else z(r);this.#r.delete(e),this.#t.delete(e)};this.#i||!n?(this.#r.add(e),er(r,i,!1)):i()}}};#o=e=>{this.#e.delete(e);let t=Array.from(this.#e.values());for(let[e,n]of this.#n)t.includes(e)||(z(n.effect),this.#n.delete(e))};ensure(e,t){var n=M,r=Tn();if(t&&!this.#t.has(e)&&!this.#n.has(e))if(r){var i=document.createDocumentFragment(),a=xn();i.append(a),this.#n.set(e,{effect:Jn(()=>t(a)),fragment:i})}else this.#t.set(e,Jn(()=>t(this.anchor)));if(this.#e.set(n,e),r){for(let[t,r]of this.#t)t===e?n.unskip_effect(r):n.skip_effect(r);for(let[t,r]of this.#n)t===e?n.unskip_effect(r.effect):n.skip_effect(r.effect);n.oncommit(this.#a),n.ondiscard(this.#o)}else C&&(this.anchor=w),this.#a(n)}};function q(e,t,n=!1){var r;C&&(r=w,He());var i=new fi(e),a=n?ne:0;function o(e,t){if(C){var n=Ge(r);if(e!==parseInt(n.substring(1))){var a=We();T(a),i.anchor=a,Ve(!1),i.ensure(e,t),Ve(!0);return}}i.ensure(e,t)}Kn(()=>{var e=!1;t((t,n=0)=>{e=!0,o(n,t)}),e||o(-1,null)},a)}var pi=Symbol(`NaN`);function mi(e,t,n){C&&He();var r=new fi(e),i=!rt();Kn(()=>{var e=t();e!==e&&(e=pi),i&&typeof e==`object`&&e&&(e={}),r.ensure(e,n)})}function hi(e,t){return t}function gi(e,t,n){for(var i=[],a=t.length,o,s=t.length,c=0;c<a;c++){let n=t[c];er(n,()=>{if(o){if(o.pending.delete(n),o.done.add(n),o.pending.size===0){var t=e.outrogroups;_i(e,r(o.done)),t.delete(o),t.size===0&&(e.outrogroups=null)}}else --s},!1)}if(s===0){var l=i.length===0&&n!==null;if(l){var u=n,d=u.parentNode;wn(d),d.append(u),e.items.clear()}_i(e,t,!l)}else o={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(o)}function _i(e,t,n=!0){var r;if(e.pending.size>0){r=new Set;for(let t of e.pending.values())for(let n of t)r.add(e.items.get(n).e)}for(var i=0;i<t.length;i++){var a=t[i];r?.has(a)?(a.f|=ae,ir(a,document.createDocumentFragment())):z(t[i],n)}}var vi;function yi(t,n,i,a,o,s=null){var c=t,l=new Map;if(n&4){var u=t;c=C?T(Sn(u)):u.appendChild(xn())}C&&He();var d=null,f=At(()=>{var t=i();return e(t)?t:t==null?[]:r(t)}),p,m=new Map,h=!0;function g(e){v.effect.f&16384||(v.pending.delete(e),v.fallback=d,xi(v,p,c,n,a),d!==null&&(p.length===0?d.f&33554432?(d.f^=ae,Ci(d,null,c)):nr(d):er(d,()=>{d=null})))}function _(e){v.pending.delete(e)}var v={effect:Kn(()=>{p=H(f);var e=p.length;let t=!1;C&&Ge(c)===`[!`!=(e===0)&&(c=We(),T(c),Ve(!1),t=!0);for(var r=new Set,u=M,v=Tn(),y=0;y<e;y+=1){C&&w.nodeType===8&&w.data===`]`&&(c=w,t=!0,Ve(!1));var b=p[y],ee=a(b,y),x=h?null:l.get(ee);x?(x.v&&ln(x.v,b),x.i&&ln(x.i,y),v&&u.unskip_effect(x.e)):(x=Si(l,h?c:vi??=xn(),b,ee,y,o,n,i),h||(x.e.f|=ae),l.set(ee,x)),r.add(ee)}if(e===0&&s&&!d&&(h?d=Jn(()=>s(c)):(d=Jn(()=>s(vi??=xn())),d.f|=ae)),e>r.size&&Se(``,``,``),C&&e>0&&T(We()),!h)if(m.set(u,r),v){for(let[e,t]of l)r.has(e)||u.skip_effect(t.e);u.oncommit(g),u.ondiscard(_)}else g(u);t&&Ve(!0),H(f)}),flags:n,items:l,pending:m,outrogroups:null,fallback:d};h=!1,C&&(c=w)}function bi(e){for(;e!==null&&!(e.f&32);)e=e.next;return e}function xi(e,t,n,i,a){var o=(i&8)!=0,s=t.length,c=e.items,l=bi(e.effect.first),u,d=null,f,p=[],m=[],h,g,_,v;if(o)for(v=0;v<s;v+=1)h=t[v],g=a(h,v),_=c.get(g).e,_.f&33554432||(_.nodes?.a?.measure(),(f??=new Set).add(_));for(v=0;v<s;v+=1){if(h=t[v],g=a(h,v),_=c.get(g).e,e.outrogroups!==null)for(let t of e.outrogroups)t.pending.delete(_),t.done.delete(_);if(_.f&8192&&(nr(_),o&&(_.nodes?.a?.unfix(),(f??=new Set).delete(_))),_.f&33554432)if(_.f^=ae,_===l)Ci(_,null,n);else{var y=d?d.next:l;_===e.effect.last&&(e.effect.last=_.prev),_.prev&&(_.prev.next=_.next),_.next&&(_.next.prev=_.prev),wi(e,d,_),wi(e,_,y),Ci(_,y,n),d=_,p=[],m=[],l=bi(d.next);continue}if(_!==l){if(u!==void 0&&u.has(_)){if(p.length<m.length){var b=m[0],ee;d=b.prev;var x=p[0],te=p[p.length-1];for(ee=0;ee<p.length;ee+=1)Ci(p[ee],b,n);for(ee=0;ee<m.length;ee+=1)u.delete(m[ee]);wi(e,x.prev,te.next),wi(e,d,x),wi(e,te,b),l=b,d=te,--v,p=[],m=[]}else u.delete(_),Ci(_,l,n),wi(e,_.prev,_.next),wi(e,_,d===null?e.effect.first:d.next),wi(e,d,_),d=_;continue}for(p=[],m=[];l!==null&&l!==_;)(u??=new Set).add(l),m.push(l),l=bi(l.next);if(l===null)continue}_.f&33554432||p.push(_),d=_,l=bi(_.next)}if(e.outrogroups!==null){for(let t of e.outrogroups)t.pending.size===0&&(_i(e,r(t.done)),e.outrogroups?.delete(t));e.outrogroups.size===0&&(e.outrogroups=null)}if(l!==null||u!==void 0){var ne=[];if(u!==void 0)for(_ of u)_.f&8192||ne.push(_);for(;l!==null;)!(l.f&8192)&&l!==e.fallback&&ne.push(l),l=bi(l.next);var re=ne.length;if(re>0){var ie=i&4&&s===0?n:null;if(o){for(v=0;v<re;v+=1)ne[v].nodes?.a?.measure();for(v=0;v<re;v+=1)ne[v].nodes?.a?.fix()}gi(e,ne,ie)}}o&&ct(()=>{if(f!==void 0)for(_ of f)_.nodes?.a?.apply()})}function Si(e,t,n,r,i,a,o,s){var c=o&1?o&16?sn(n):cn(n,!1,!1):null,l=o&2?sn(i):null;return{v:c,i:l,e:Jn(()=>(a(t,c??n,l??i,s),()=>{e.delete(r)}))}}function Ci(e,t,n){if(e.nodes)for(var r=e.nodes.start,i=e.nodes.end,a=t&&!(t.f&33554432)?t.nodes.start:n;r!==null;){var o=Cn(r);if(a.before(r),r===i)return;r=o}}function wi(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}function J(e,t,...n){var r=new fi(e);Kn(()=>{let e=t()??null;r.ensure(e,e&&(t=>e(t,...n)))},ne)}function Ti(e,t,n){var r;C&&(r=w,He());var i=new fi(e);Kn(()=>{var e=t()??null;if(C&&Ge(r)===`[`!=(e!==null)){var a=We();T(a),i.anchor=a,Ve(!1),i.ensure(e,e&&(t=>n(t,e))),Ve(!0);return}i.ensure(e,e&&(t=>n(t,e)))},ne)}function Ei(e,t,n,r,i,a){let o=C;C&&He();var s=null;C&&w.nodeType===1&&(s=w,He());var c=C?w:e,l=new fi(c,!1);Kn(()=>{let e=t()||null;var a=i?i():n||e===`svg`?Fe:void 0;if(e===null){l.ensure(null,null);return}return l.ensure(e,t=>{if(e){if(s=C?s:En(e,a),ni(s,s),r){var n=null;C&&Ur(e)&&s.append(n=document.createComment(``));var i=C?Sn(s):s.appendChild(xn());C&&(i===null?Ve(!1):T(i)),r(s,i),n?.remove()}V.nodes.end=s,t.before(s)}C&&T(t)}),()=>{}},ne),Ln(()=>{}),o&&(Ve(!0),T(c))}function Di(e,t){var n=void 0,r;qn(()=>{n!==(n=t())&&(r&&=(z(r),null),n&&(r=Jn(()=>{Un(()=>n(e))})))})}function Oi(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Oi(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function ki(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Oi(e))&&(r&&(r+=` `),r+=t);return r}function Ai(e){return typeof e==`object`?ki(e):e??``}var ji=[...` \n\\r\\f\\xA0\\v\uFEFF`];function Mi(e,t,n){var r=e==null?``:``+e;if(t&&(r=r?r+` `+t:t),n){for(var i of Object.keys(n))if(n[i])r=r?r+` `+i:i;else if(r.length)for(var a=i.length,o=0;(o=r.indexOf(i,o))>=0;){var s=o+a;(o===0||ji.includes(r[o-1]))&&(s===r.length||ji.includes(r[s]))?r=(o===0?``:r.substring(0,o))+r.substring(s+1):o=s}}return r===``?null:r}function Ni(e,t=!1){var n=t?` !important;`:`;`,r=``;for(var i of Object.keys(e)){var a=e[i];a!=null&&a!==``&&(r+=` `+i+`: `+a+n)}return r}function Pi(e){return e[0]!==`-`||e[1]!==`-`?e.toLowerCase():e}function Fi(e,t){if(t){var n=``,r,i;if(Array.isArray(t)?(r=t[0],i=t[1]):r=t,e){e=String(e).replaceAll(/\\s*\\/\\*.*?\\*\\/\\s*/g,``).trim();var a=!1,o=0,s=!1,c=[];r&&c.push(...Object.keys(r).map(Pi)),i&&c.push(...Object.keys(i).map(Pi));var l=0,u=-1;let t=e.length;for(var d=0;d<t;d++){var f=e[d];if(s?f===`/`&&e[d-1]===`*`&&(s=!1):a?a===f&&(a=!1):f===`/`&&e[d+1]===`*`?s=!0:f===`"`||f===`\'`?a=f:f===`(`?o++:f===`)`&&o--,!s&&a===!1&&o===0){if(f===`:`&&u===-1)u=d;else if(f===`;`||d===t-1){if(u!==-1){var p=Pi(e.substring(l,u).trim());if(!c.includes(p)){f!==`;`&&d++;var m=e.substring(l,d).trim();n+=` `+m+`;`}}l=d+1,u=-1}}}}return r&&(n+=Ni(r)),i&&(n+=Ni(i,!0)),n=n.trim(),n===``?null:n}return e==null?null:String(e)}function Ii(e,t,n,r,i,a){var o=e[me];if(C||o!==n||o===void 0){var s=Mi(n,r,a);(!C||s!==e.getAttribute(`class`))&&(s==null?e.removeAttribute(`class`):t?e.className=s:e.setAttribute(`class`,s)),e[me]=n}else if(a&&i!==a)for(var c in a){var l=!!a[c];(i==null||l!==!!i[c])&&e.classList.toggle(c,l)}return a}function Li(e,t={},n,r){for(var i in n){var a=n[i];t[i]!==a&&(n[i]==null?e.style.removeProperty(i):e.style.setProperty(i,a,r))}}function Ri(e,t,n,r){var i=e[he];if(C||i!==t){var a=Fi(t,r);(!C||a!==e.getAttribute(`style`))&&(a==null?e.removeAttribute(`style`):e.style.cssText=a),e[he]=t}else r&&(Array.isArray(r)?(Li(e,n?.[0],r[0]),Li(e,n?.[1],r[1],`important`)):Li(e,n,r));return r}function zi(t,n,r=!1){if(t.multiple){if(n==null)return;if(!e(n))return ze();for(var i of t.options)i.selected=n.includes(Vi(i));return}for(i of t.options)if(hn(Vi(i),n)){i.selected=!0;return}(!r||n!==void 0)&&(t.selectedIndex=-1)}function Bi(e){var t=new MutationObserver(()=>{zi(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`value`]}),Ln(()=>{t.disconnect()})}function Vi(e){return`__value`in e?e.__value:e.value}var Hi=Symbol(`class`),Ui=Symbol(`style`),Wi=Symbol(`is custom element`),Gi=Symbol(`is html`),Ki=ye?`link`:`LINK`,qi=ye?`input`:`INPUT`,Ji=ye?`option`:`OPTION`,Yi=ye?`select`:`SELECT`;function Xi(e){if(C){var t=!1,n=()=>{if(!t){if(t=!0,e.hasAttribute(`value`)){var n=e.value;Qi(e,`value`,null),e.value=n}if(e.hasAttribute(`checked`)){var r=e.checked;Qi(e,`checked`,null),e.checked=r}}};e[_e]=n,ct(n),An()}}function Zi(e,t){t?e.hasAttribute(`selected`)||e.setAttribute(`selected`,``):e.removeAttribute(`selected`)}function Qi(e,t,n,r){var i=ta(e);C&&(i[t]=e.getAttribute(t),t===`src`||t===`srcset`||t===`href`&&e.nodeName===Ki)||i[t]!==(i[t]=n)&&(t===`loading`&&(e[fe]=n),n==null?e.removeAttribute(t):typeof n!=`string`&&ra(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function $i(e,t,n,r,i=!1,a=!1){if(C&&i&&e.nodeName===qi){var o=e;(o.type===`checkbox`?`defaultChecked`:`defaultValue`)in n||Xi(o)}var s=ta(e),c=s[Wi],l=!s[Gi];let u=C&&c;u&&Ve(!1);var d=t||{},f=e.nodeName===Ji;for(var p in t)p in n||(n[p]=null);n.class?n.class=Ai(n.class):(r||n[Hi])&&(n.class=null),n[Ui]&&(n.style??=null);var m=ra(e);if(e.nodeName===qi&&`type`in n&&(`value`in n||`__value`in n)){var h=n.type;(h!==d.type||h===void 0&&e.hasAttribute(`type`))&&(d.type=h,Qi(e,`type`,h,a))}for(let i in n){let o=n[i];if(f&&i===`value`&&o==null){e.value=e.__value=``,d[i]=o;continue}if(i===`class`){Ii(e,e.namespaceURI===`http://www.w3.org/1999/xhtml`,o,r,t?.[Hi],n[Hi]),d[i]=o,d[Hi]=n[Hi];continue}if(i===`style`){Ri(e,o,t?.[Ui],n[Ui]),d[i]=o,d[Ui]=n[Ui];continue}var g=d[i];if(!(o===g&&!(o===void 0&&e.hasAttribute(i)))){d[i]=o;var _=i[0]+i[1];if(_!==`$$`)if(_===`on`){let t={},n=`$$`+i,r=i.slice(2);var v=Ir(r);if(Pr(r)&&(r=r.slice(0,-7),t.capture=!0),!v&&g){if(o!=null)continue;e.removeEventListener(r,d[n],t),d[n]=null}if(v)Yr(r,e,o),Xr([r]);else if(o!=null){function a(e){d[i].call(this,e)}d[n]=qr(r,e,a,t)}}else if(i===`style`)Qi(e,i,o);else if(i===`autofocus`)On(e,!!o);else if(!c&&(i===`__value`||i===`value`&&o!=null))e.value=e.__value=o;else if(i===`selected`&&f)Zi(e,o);else{var y=i;l||(y=zr(y));var b=y===`defaultValue`||y===`defaultChecked`;if(o==null&&!c&&!b)if(s[i]=null,y===`value`||y===`checked`){let n=e,r=t===void 0;if(y===`value`){let e=n.defaultValue;n.removeAttribute(y),n.defaultValue=e,n.value=n.__value=r?e:null}else{let e=n.defaultChecked;n.removeAttribute(y),n.defaultChecked=e,n.checked=r?e:!1}}else e.removeAttribute(i);else b||m.includes(y)&&(c||typeof o!=`string`)?(e[y]=o,y in s&&(s[y]=S)):typeof o!=`function`&&Qi(e,y,o,a)}}}return u&&Ve(!0),d}function ea(e,t,n=[],r=[],i=[],a,o=!1,s=!1){Ct(i,n,r,n=>{var r=void 0,i={},c=e.nodeName===Yi,l=!1;if(qn(()=>{var u=t(...n.map(H)),d=$i(e,r,u,a,o,s);l&&c&&`value`in u&&zi(e,u.value);for(let e of Object.getOwnPropertySymbols(i))u[e]||z(i[e]);for(let t of Object.getOwnPropertySymbols(u)){var f=u[t];t.description===`@attach`&&(!r||f!==r[t])&&(i[t]&&z(i[t]),i[t]=Jn(()=>Di(e,()=>f))),d[t]=f}r=d}),c){var u=e;Un(()=>{zi(u,r.value,!0),Bi(u)})}l=!0})}function ta(e){return e[pe]??={[Wi]:e.nodeName.includes(`-`),[Gi]:e.namespaceURI===Pe}}var na=new Map;function ra(e){var t=e.getAttribute(`is`)||e.nodeName,n=na.get(t);if(n)return n;na.set(t,n=[]);for(var r,i=e,a=Element.prototype;a!==i;){for(var s in r=o(i),r)r[s].set&&s!==`innerHTML`&&s!==`textContent`&&s!==`innerText`&&n.push(s);i=l(i)}return n}function ia(e,t,n=t){var r=new WeakSet;Mn(e,`input`,async i=>{var a=i?e.defaultValue:e.value;if(a=aa(e)?oa(a):a,n(a),M!==null&&r.add(M),await kr(),a!==(a=t())){var o=e.selectionStart,s=e.selectionEnd,c=e.value.length;if(e.value=a??``,s!==null){var l=e.value.length;o===s&&s===c&&l>c?(e.selectionStart=l,e.selectionEnd=l):(e.selectionStart=o,e.selectionEnd=Math.min(s,l))}}}),(C&&e.defaultValue!==e.value||Mr(t)==null&&e.value)&&(n(aa(e)?oa(e.value):e.value),M!==null&&r.add(M)),Gn(()=>{var n=t();if(e===document.activeElement){var i=Ye?Rt:M;if(r.has(i))return}aa(e)&&n===oa(e.value)||e.type===`date`&&!n&&!e.value||n!==e.value&&(e.value=n??``)})}function aa(e){var t=e.type;return t===`number`||t===`range`}function oa(e){return e===``?null:+e}var sa={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 ca(e,t,n){return new Proxy({props:e,exclude:t},sa)}var la={get(e,t){let n=e.props.length;for(;n--;){let r=e.props[n];if(d(r)&&(r=r()),typeof r==`object`&&r&&t in r)return r[t]}},set(e,t,n){let r=e.props.length;for(;r--;){let i=e.props[r];d(i)&&(i=i());let o=a(i,t);if(o&&o.set)return o.set(n),!0}return!1},getOwnPropertyDescriptor(e,t){let n=e.props.length;for(;n--;){let r=e.props[n];if(d(r)&&(r=r()),typeof r==`object`&&r&&t in r){let e=a(r,t);return e&&!e.configurable&&(e.configurable=!0),e}}},has(e,t){if(t===ue||t===de)return!1;for(let n of e.props)if(d(n)&&(n=n()),n!=null&&t in n)return!0;return!1},ownKeys(e){let t=[];for(let n of e.props)if(d(n)&&(n=n()),n){for(let e in n)t.includes(e)||t.push(e);for(let e of Object.getOwnPropertySymbols(n))t.includes(e)||t.push(e)}return t}};function ua(...e){return new Proxy({props:e},la)}function Y(e,t,n,r){var i=!Xe||(n&2)!=0,o=(n&8)!=0,s=(n&16)!=0,c=r,l=!0,u=void 0,d=()=>s&&i?(u??=Dt(r),H(u)):(l&&(l=!1,c=s?Mr(r):r),c);let f;if(o){var p=ue in e||de in e;f=a(e,t)?.set??(p&&t in e?n=>e[t]=n:void 0)}var m,h=!1;o?[m,h]=vt(()=>e[t]):m=e[t],m===void 0&&r!==void 0&&(m=d(),f&&(i&&De(t),f(m)));var g=i?()=>{var n=e[t];return n===void 0?d():(l=!0,n)}:()=>{var n=e[t];return n!==void 0&&(c=void 0),n===void 0?c:n};if(i&&!(n&4))return g;if(f){var _=e.$$legacy;return(function(e,t){return arguments.length>0?((!i||!t||_||h)&&f(t?g():e),e):g()})}var v=!1,y=(n&1?Dt:At)(()=>(v=!1,g()));o&&H(y);var b=V;return(function(e,t){if(arguments.length>0){let n=t?H(y):i&&o?pn(e):e;return P(y,n),v=!0,c!==void 0&&(c=n),e}return sr&&v||b.f&16384?y.v:H(y)})}function da(e){D===null&&be(`onMount`),Xe&&D.l!==null?fa(D).m.push(e):Rn(()=>{let t=Mr(e);if(typeof t==`function`)return t})}function fa(e){var t=e.l;return t.u??={a:[],b:[],m:[]}}typeof window<`u`&&((window.__svelte??={}).v??=new Set).add(`5`);var X=new class{#e=N(null);get data(){return H(this.#e)}set data(e){P(this.#e,e,!0)}#t=N(null);get arsenal(){return H(this.#t)}set arsenal(e){P(this.#t,e,!0)}#n=N(`connecting`);get status(){return H(this.#n)}set status(e){P(this.#n,e,!0)}#r=N(``);get clock(){return H(this.#r)}set clock(e){P(this.#r,e,!0)}#i=N(`overview`);get view(){return H(this.#i)}set view(e){P(this.#i,e,!0)}#a=N(!1);get arsenalLoading(){return H(this.#a)}set arsenalLoading(e){P(this.#a,e,!0)}#o=!1;#s=null;async tick(){try{let e=await fetch(`/data`);if(!e.ok)throw Error(`HTTP ${e.status}`);this.data=await e.json(),this.status=`live`,this.clock=new Date().toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`})}catch{this.status=`offline`}}start(){this.tick(),this.#s=setInterval(()=>void this.tick(),1e4)}stop(){this.#s&&clearInterval(this.#s)}async loadArsenal(e=!1){if(!(this.#o&&!e)){this.arsenalLoading=!0;try{let e=await fetch(`/arsenal`);e.ok&&(this.arsenal=await e.json(),this.#o=!0)}catch{}finally{this.arsenalLoading=!1}}}go(e){this.view=e,e===`arsenal`&&this.loadArsenal()}};function Z(e){return typeof e!=`number`||!Number.isFinite(e)?`0`:e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}k`:String(Math.round(e))}function pa(e){return typeof e!=`number`||!Number.isFinite(e)?`$0.00`:`$${e.toLocaleString(`en-US`,{minimumFractionDigits:2,maximumFractionDigits:2})}`}function ma(e){if(!e)return`\u2014`;let t=new Date(e);if(Number.isNaN(t.getTime()))return`\u2014`;let n=new Date;return t.getFullYear()===n.getFullYear()&&t.getMonth()===n.getMonth()&&t.getDate()===n.getDate()?t.toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`}):t.toLocaleDateString([],{month:`short`,day:`numeric`})}function ha(e){if(!e)return`unknown`;let t=e.toLowerCase();return t===`<synthetic>`?`unknown`:t.includes(`fable`)?`fable`:t.includes(`opus`)?`opus`:t.includes(`sonnet`)?`sonnet`:t.includes(`haiku`)?`haiku`:`unknown`}function ga(e){return!e||e===`<synthetic>`?`synthetic`:e.replace(/^claude-/,``)}function _a(e){if(!e)return``;let t=e.split(/[/\\\\]/).filter(Boolean);return t.length<=2?t.join(`/`):`\u2026/${t.slice(-2).join(`/`)}`}var va=[220,75,20,155,285,330,250,45];function ya(e){let t=0;for(let n=0;n<e.length;n++)t=t*31+e.charCodeAt(n)>>>0;return`oklch(72% 0.15 ${va[t%va.length]})`}var ba={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`},xa=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Sa=Symbol(`lucide-context`),Ca=()=>$e(Sa),wa=new Set([`$$slots`,`$$events`,`$$legacy`,`name`,`color`,`size`,`strokeWidth`,`absoluteStrokeWidth`,`iconNode`,`children`]),Ta=ii(`<svg><!><!></svg>`);function Ea(e,t){O(t,!0);let n=Ca()??{},r=Y(t,`color`,19,()=>n.color??`currentColor`),i=Y(t,`size`,19,()=>n.size??24),a=Y(t,`strokeWidth`,19,()=>n.strokeWidth??2),o=Y(t,`absoluteStrokeWidth`,19,()=>n.absoluteStrokeWidth??!1),s=Y(t,`iconNode`,19,()=>[]),c=ca(t,wa),l=j(()=>o()?Number(a())*24/Number(i()):a());var u=Ta();ea(u,e=>({...ba,...e,...c,width:i(),height:i(),stroke:r(),"stroke-width":H(l),class:[`lucide-icon lucide`,n.class,t.name&&`lucide-${t.name}`,t.class]}),[()=>!t.children&&!xa(c)&&{"aria-hidden":`true`}]);var d=F(u);yi(d,17,s,hi,(e,t)=>{var n=j(()=>h(H(t),2));let r=()=>H(n)[0],i=()=>H(n)[1];var a=W();Ei(I(a),r,!0,(e,t)=>{ea(e,()=>({...i()}))}),G(e,a)}),J(L(d),()=>t.children??f),E(u),G(e,u),k()}var Da=new Set([`$$slots`,`$$events`,`$$legacy`]);function Oa(e,t){let n=ca(t,Da),r=[[`rect`,{width:`7`,height:`9`,x:`3`,y:`3`,rx:`1`}],[`rect`,{width:`7`,height:`5`,x:`14`,y:`3`,rx:`1`}],[`rect`,{width:`7`,height:`9`,x:`14`,y:`12`,rx:`1`}],[`rect`,{width:`7`,height:`5`,x:`3`,y:`16`,rx:`1`}]];Ea(e,ua({name:`layout-dashboard`},()=>n,{get iconNode(){return r}}))}var ka=new Set([`$$slots`,`$$events`,`$$legacy`]);function Aa(e,t){let n=ca(t,ka),r=[[`polyline`,{points:`14.5 17.5 3 6 3 3 6 3 17.5 14.5`}],[`line`,{x1:`13`,x2:`19`,y1:`19`,y2:`13`}],[`line`,{x1:`16`,x2:`20`,y1:`16`,y2:`20`}],[`line`,{x1:`19`,x2:`21`,y1:`21`,y2:`19`}],[`polyline`,{points:`14.5 6.5 18 3 21 3 21 6 17.5 9.5`}],[`line`,{x1:`5`,x2:`9`,y1:`14`,y2:`18`}],[`line`,{x1:`7`,x2:`4`,y1:`17`,y2:`20`}],[`line`,{x1:`3`,x2:`5`,y1:`19`,y2:`21`}]];Ea(e,ua({name:`swords`},()=>n,{get iconNode(){return r}}))}var ja=new Set([`$$slots`,`$$events`,`$$legacy`]);function Ma(e,t){let n=ca(t,ja),r=[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`}],[`path`,{d:`M12 17h.01`}]];Ea(e,ua({name:`circle-question-mark`},()=>n,{get iconNode(){return r}}))}var Na=new Set([`$$slots`,`$$events`,`$$legacy`]);function Pa(e,t){let n=ca(t,Na),r=[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}],[`path`,{d:`M9 3v18`}]];Ea(e,ua({name:`panel-left`},()=>n,{get iconNode(){return r}}))}var Fa=U(`<div class="min-w-0"><div class="font-serif text-lg leading-none text-foreground">Synth<em>ra</em></div> <div class="font-mono text-[10px] uppercase tracking-[0.18em] text-muted-foreground">Dashboard</div></div>`),Ia=U(`<span class="font-mono text-sm text-muted-foreground"> </span>`),La=U(`<span> </span>`),Ra=U(`<button><!> <!></button>`),za=U(`<span>FAQ</span>`),Ba=U(`<div class="flex flex-col gap-1 rounded-lg bg-sidebar-accent/40 p-2.5"><div class="font-mono text-[10px] uppercase tracking-[0.14em] text-muted-foreground">Active</div> <div class="truncate font-mono text-sm text-sidebar-foreground"> </div> <div class="mt-1 flex items-center justify-between font-mono text-[10px] text-muted-foreground"><span> </span> <span>v__SYN_VERSION__</span></div></div>`),Va=U(`<span class="text-xs">Collapse</span>`),Ha=U(`<aside><div class="flex items-center gap-2.5 px-1 py-2"><div class="grid size-8 shrink-0 place-items-center rounded-lg bg-primary/90 font-serif text-lg italic text-primary-foreground">S</div> <!></div> <div><span></span> <!></div> <div class="my-1 h-px bg-sidebar-border"></div> <nav class="flex flex-col gap-1"><!> <button title="FAQ"><!> <!></button></nav> <div class="flex-1"></div> <!> <button title="Toggle sidebar"><!> <!></button></aside>`);function Ua(e,t){O(t,!0);let n=N(!1),r=typeof window<`u`&&window.location.port||`8901`,i=[{id:`overview`,label:`Overview`,icon:Oa},{id:`arsenal`,label:`Arsenal`,icon:Aa}];var a=Ha(),o=F(a),s=L(F(o),2),c=e=>{G(e,Fa())};q(s,e=>{H(n)||e(c)}),E(o);var l=L(o,2),u=F(l);let d;var f=L(u,2),p=e=>{var t=Ia(),n=F(t,!0);E(t),R(()=>K(n,X.status===`live`?`live \xB7 ${X.clock}`:X.status)),G(e,t)};q(f,e=>{H(n)||e(p)}),E(l);var m=L(l,4),h=F(m);yi(h,17,()=>i,e=>e.id,(e,t)=>{var r=Ra(),i=F(r);Ti(i,()=>H(t).icon,(e,t)=>{t(e,{class:`size-4 shrink-0`})});var a=L(i,2),o=e=>{var n=La(),r=F(n,!0);E(n),R(()=>K(r,H(t).label)),G(e,n)};q(a,e=>{H(n)||e(o)}),E(r),R(()=>{Qi(r,`title`,H(t).label),Ii(r,1,`flex items-center gap-2.5 rounded-lg px-2.5 py-2 text-sm transition-colors `+(X.view===H(t).id?`bg-sidebar-accent text-sidebar-accent-foreground`:`text-sidebar-foreground/75 hover:bg-sidebar-accent/50 hover:text-sidebar-foreground`)+(H(n)?` justify-center`:``))}),Yr(`click`,r,()=>X.go(H(t).id)),G(e,r)});var g=L(h,2),_=F(g);Ma(_,{class:`size-4 shrink-0`});var v=L(_,2),y=e=>{G(e,za())};q(v,e=>{H(n)||e(y)}),E(g),E(m);var b=L(m,4),ee=e=>{var t=Ba(),n=L(F(t),2),i=F(n,!0);E(n);var a=L(n,2),o=F(a),s=F(o);E(o),Ue(2),E(a),E(t),R(()=>{Qi(n,`title`,X.data?.active?.project_root??`\u2014`),K(i,X.data?.active?.project_name??`\u2014`),K(s,`port ${r??``}`)}),G(e,t)};q(b,e=>{H(n)||e(ee)});var x=L(b,2),te=F(x);Pa(te,{class:`size-4 shrink-0`});var ne=L(te,2),re=e=>{G(e,Va())};q(ne,e=>{H(n)||e(re)}),E(x),E(a),R(()=>{Ii(a,1,`flex h-screen shrink-0 flex-col gap-1 border-r border-sidebar-border bg-sidebar p-3 transition-[width] duration-200 `+(H(n)?`w-[64px] items-center`:`w-[248px]`)),Ii(l,1,`flex items-center gap-2 rounded-md px-2 py-1.5 `+(H(n)?`justify-center`:``)),d=Ii(u,1,`size-2 shrink-0 rounded-full `+(X.status===`live`?`bg-[var(--c-fable)]`:X.status===`offline`?`bg-destructive`:`bg-muted-foreground`),null,d,{"animate-pulse":X.status===`live`}),Ii(g,1,`flex items-center gap-2.5 rounded-lg px-2.5 py-2 text-sm text-sidebar-foreground/75 transition-colors hover:bg-sidebar-accent/50 hover:text-sidebar-foreground `+(H(n)?`justify-center`:``)),Ii(x,1,`mt-1 flex items-center gap-2.5 rounded-lg px-2.5 py-2 text-sidebar-foreground/60 transition-colors hover:bg-sidebar-accent/50 hover:text-sidebar-foreground `+(H(n)?`justify-center`:``))}),Yr(`click`,g,function(...e){t.onFaq?.apply(this,e)}),Yr(`click`,x,()=>P(n,!H(n))),G(e,a),k()}Xr([`click`]),Ze();var Wa=U(`<div class="flex flex-col gap-1 bg-card/70 p-4"><span class="font-mono text-xs uppercase tracking-[0.12em] text-muted-foreground"> </span> <span class="font-mono text-2xl tabular-nums text-foreground"> </span></div>`),Ga=U(`<div class="grid grid-cols-2 gap-px overflow-hidden rounded-xl border bg-border sm:grid-cols-3 lg:grid-cols-5"></div>`);function Ka(e,t){O(t,!0);let n=j(()=>{let e=X.data?.global;return[{label:`Turns`,v:e?.total_turns??0},{label:`\u2193 Input`,v:e?.total_input_tokens??0},{label:`\u2191 Output`,v:e?.total_output_tokens??0},{label:`\u27F2 Cache R`,v:e?.total_cache_read??0},{label:`\uFF0B Cache W`,v:e?.total_cache_create??0}]});var r=Ga();yi(r,21,()=>H(n),e=>e.label,(e,t)=>{var n=Wa(),r=F(n),i=F(r,!0);E(r);var a=L(r,2),o=F(a,!0);E(a),E(n),R(e=>{K(i,H(t).label),K(o,e)},[()=>Z(H(t).v)]),G(e,n)}),E(r),G(e,r),k()}var qa=U(`<span class="font-mono text-[10px] uppercase tracking-[0.12em] text-muted-foreground"> </span>`),Ja=U(`<header class="flex items-baseline justify-between gap-3"><span class="font-mono text-xs uppercase tracking-[0.14em] text-muted-foreground"> </span> <!></header>`),Ya=U(`<section><!> <!></section>`);function Xa(e,t){let n=Y(t,`class`,3,``);var r=Ya(),i=F(r),a=e=>{var n=Ja(),r=F(n),i=F(r,!0);E(r);var a=L(r,2),o=e=>{var n=qa(),r=F(n,!0);E(n),R(()=>K(r,t.meta)),G(e,n)};q(a,e=>{t.meta&&e(o)}),E(n),R(()=>K(i,t.title)),G(e,n)};q(i,e=>{t.title&&e(a)}),J(L(i,2),()=>t.children??f),E(r),R(()=>Ii(r,1,`flex h-full min-h-0 flex-col gap-3 rounded-xl border bg-card/55 p-4 transition-colors hover:bg-card/80 `+n())),G(e,r)}var Za=U(`<div class="flex flex-col gap-3"><div><div class="font-mono text-3xl text-[var(--money)]"> </div> <div class="font-mono text-sm text-muted-foreground"> </div></div> <div class="flex h-2 overflow-hidden rounded-full bg-border"><div class="h-full bg-muted-foreground/40"></div> <div class="h-full bg-[var(--money)]"></div></div> <div class="flex justify-between font-mono text-xs text-muted-foreground"><span>you paid <b class="text-foreground"> </b></span> <span>baseline <b class="text-foreground"> </b></span></div> <div class="rounded-md border border-dashed border-border px-3 py-2 text-center font-mono text-xs text-muted-foreground"><b class="text-foreground"> </b> blocks \xD7 <b class="text-foreground">500</b> tokens \xD7 <b class="text-foreground">$3</b>/M = <b class="text-[var(--money)]"> </b></div></div>`);function Qa(e,t){O(t,!0);let n=j(()=>{let e=X.data?.global,t=e?.blocked_count??0,n=t*500*3/1e6,r=e?.estimated_cost_usd??0,i=r+n;return{blocks:t,money:n,paid:r,baseline:i,pct:i>0?n/i*100:0,tokens:e?.estimated_tokens_saved??0,paidWidth:i>0?r/i*100:100}});{let t=j(()=>`${H(n).pct.toFixed(1)}% off \xB7 floor`);Xa(e,{title:`Synthra savings`,get meta(){return H(t)},children:(e,t)=>{var r=Za(),i=F(r),a=F(i),o=F(a,!0);E(a);var s=L(a,2),c=F(s);E(s),E(i);var l=L(i,2),u=F(l),d=L(u,2);E(l);var f=L(l,2),p=F(f),m=L(F(p)),h=F(m,!0);E(m),E(p);var g=L(p,2),_=L(F(g)),v=F(_,!0);E(_),E(g),E(f);var y=L(f,2),b=F(y),ee=F(b,!0);E(b);var x=L(b,6),te=F(x,!0);E(x),E(y),E(r),R((e,t,r,i,a)=>{K(o,e),K(c,`${t??``} tokens avoided`),Ri(u,`width:${H(n).paidWidth}%`),Ri(d,`width:${100-H(n).paidWidth}%`),K(h,r),K(v,i),K(ee,H(n).blocks),K(te,a)},[()=>pa(H(n).money),()=>Z(H(n).tokens),()=>pa(H(n).paid),()=>pa(H(n).baseline),()=>pa(H(n).money)]),G(e,r)},$$slots:{default:!0}})}k()}var $a=U(`<div class="font-mono text-3xl text-[var(--money)]"> </div> <div class="mt-1 flex flex-col gap-1 font-mono text-sm text-muted-foreground"><div class="flex justify-between"><span>Tokens (in+out)</span><span class="text-foreground"> </span></div> <div class="flex justify-between"><span>Avg / turn</span><span class="text-foreground"> </span></div></div>`,1);function eo(e,t){O(t,!0);let n=j(()=>{let e=X.data?.global,t=e?.total_turns??0,n=e?.estimated_cost_usd??0;return{cost:n,tokens:(e?.total_input_tokens??0)+(e?.total_output_tokens??0),avg:t>0?n/t:0}});Xa(e,{title:`Total spend`,meta:`all time`,children:(e,t)=>{var r=$a(),i=I(r),a=F(i,!0);E(i);var o=L(i,2),s=F(o),c=L(F(s)),l=F(c,!0);E(c),E(s);var u=L(s,2),d=L(F(u)),f=F(d,!0);E(d),E(u),E(o),R((e,t,n)=>{K(a,e),K(l,t),K(f,n)},[()=>pa(H(n).cost),()=>Z(H(n).tokens),()=>pa(H(n).avg)]),G(e,r)},$$slots:{default:!0}}),k()}var to=ii(`<circle cx="70" cy="70" r="52" fill="none" stroke-width="14"></circle>`),no=U(`<div class="flex items-center gap-2 font-mono text-sm"><span class="size-2 rounded-sm"></span> <span class="flex-1 text-muted-foreground"> </span> <span class="tabular-nums text-foreground"> </span> <span class="w-9 text-right tabular-nums text-muted-foreground"> </span></div>`),ro=U(`<div class="text-sm text-muted-foreground">No turns yet.</div>`),io=U(`<div class="flex items-center gap-4"><div class="relative size-[116px] shrink-0"><svg viewBox="0 0 140 140" class="size-full -rotate-90"><circle cx="70" cy="70" r="52" fill="none" stroke="var(--border)" stroke-width="14"></circle><!></svg> <div class="absolute inset-0 grid place-items-center"><div class="text-center"><div class="font-mono text-2xl text-foreground"> </div> <div class="font-mono text-[10px] uppercase text-muted-foreground">turns</div></div></div></div> <div class="flex min-w-0 flex-1 flex-col gap-1.5"></div></div>`);function ao(e,t){O(t,!0);let n=[{fam:`fable`,label:`Fable`,color:`var(--c-fable)`},{fam:`opus`,label:`Opus`,color:`var(--c-opus)`},{fam:`sonnet`,label:`Sonnet`,color:`var(--c-sonnet)`},{fam:`haiku`,label:`Haiku`,color:`var(--c-haiku)`},{fam:`unknown`,label:`Other`,color:`var(--c-unknown)`}],r=2*Math.PI*52,i=j(()=>{let e={fable:0,opus:0,sonnet:0,haiku:0,unknown:0};for(let t of X.data?.projects??[])for(let[n,r]of Object.entries(t.models??{}))e[ha(n)]+=r;let t=n.reduce((t,n)=>t+e[n.fam],0),i=0;return{arcs:n.filter(t=>e[t.fam]>0).map(n=>{let a=e[n.fam],o=t>0?a/t*r:0,s={...n,n:a,len:o,offset:i,pct:t>0?Math.round(a/t*100):0};return i+=o,s}),total:t}});Xa(e,{title:`Model usage`,meta:`by turns`,children:(e,t)=>{var n=io(),a=F(n),o=F(a);yi(L(F(o)),17,()=>H(i).arcs,e=>e.fam,(e,t)=>{var n=to();R(()=>{Qi(n,`stroke`,H(t).color),Qi(n,`stroke-dasharray`,`${H(t).len} ${r}`),Qi(n,`stroke-dashoffset`,-H(t).offset),Qi(n,`stroke-linecap`,H(i).arcs.length===1?`round`:`butt`)}),G(e,n)}),E(o);var s=L(o,2),c=F(s),l=F(c),u=F(l,!0);E(l),Ue(2),E(c),E(s),E(a);var d=L(a,2);yi(d,21,()=>H(i).arcs,e=>e.fam,(e,t)=>{var n=no(),r=F(n),i=L(r,2),a=F(i,!0);E(i);var o=L(i,2),s=F(o,!0);E(o);var c=L(o,2),l=F(c);E(c),E(n),R(()=>{Ri(r,`background:${H(t).color}`),K(a,H(t).label),K(s,H(t).n),K(l,`${H(t).pct??``}%`)}),G(e,n)},e=>{G(e,ro())}),E(d),E(n),R(()=>K(u,H(i).total)),G(e,n)},$$slots:{default:!0}}),k()}function oo(e){return typeof e==`object`&&!!e}var so=[`string`,`number`,`bigint`,`boolean`];function co(e){return e==null||so.includes(typeof e)?!0:Array.isArray(e)?e.every(e=>co(e)):typeof e==`object`?Object.getPrototypeOf(e)===Object.prototype:!1}var lo=Symbol(`box`),uo=Symbol(`is-writable`);function Q(e,t){let n=j(e);return t?{[lo]:!0,[uo]:!0,get current(){return H(n)},set current(e){t(e)}}:{[lo]:!0,get current(){return e()}}}function fo(e){return oo(e)&&lo in e}function po(e){let t=N(pn(e));return{[lo]:!0,[uo]:!0,get current(){return H(t)},set current(e){P(t,e,!0)}}}function mo(...e){return function(t){for(let n of e)if(n){if(t.defaultPrevented)return;typeof n==`function`?n.call(this,t):n.current?.call(this,t)}}}var ho=/\\/\\*[^*]*\\*+([^/*][^*]*\\*+)*\\//g,go=/\\n/g,_o=/^\\s*/,vo=/^(\\*?[-#/*\\\\\\w]+(\\[[0-9a-z_-]+\\])?)\\s*/,yo=/^:\\s*/,bo=/^((?:\'(?:\\\\\'|.)*?\'|"(?:\\\\"|.)*?"|\\([^)]*?\\)|[^};])+)/,xo=/^[;\\s]*/,So=/^\\s+|\\s+$/g,Co=`\n`,wo=`/`,To=`*`,Eo=``,Do=`comment`,Oo=`declaration`;function ko(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var n=1,r=1;function i(e){var t=e.match(go);t&&(n+=t.length);var i=e.lastIndexOf(Co);r=~i?e.length-i:r+e.length}function a(){var e={line:n,column:r};return function(t){return t.position=new o(e),l(),t}}function o(e){this.start=e,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function s(i){var a=Error(t.source+`:`+n+`:`+r+`: `+i);if(a.reason=i,a.filename=t.source,a.line=n,a.column=r,a.source=e,!t.silent)throw a}function c(t){var n=t.exec(e);if(n){var r=n[0];return i(r),e=e.slice(r.length),n}}function l(){c(_o)}function u(e){var t;for(e||=[];t=d();)t!==!1&&e.push(t);return e}function d(){var t=a();if(!(wo!=e.charAt(0)||To!=e.charAt(1))){for(var n=2;Eo!=e.charAt(n)&&(To!=e.charAt(n)||wo!=e.charAt(n+1));)++n;if(n+=2,Eo===e.charAt(n-1))return s(`End of comment missing`);var o=e.slice(2,n-2);return r+=2,i(o),e=e.slice(n),r+=2,t({type:Do,comment:o})}}function f(){var e=a(),t=c(vo);if(t){if(d(),!c(yo))return s(`property missing \':\'`);var n=c(bo),r=e({type:Oo,property:Ao(t[0].replace(ho,Eo)),value:n?Ao(n[0].replace(ho,Eo)):Eo});return c(xo),r}}function p(){var e=[];u(e);for(var t;t=f();)t!==!1&&(e.push(t),u(e));return e}return l(),p()}function Ao(e){return e?e.replace(So,Eo):Eo}function jo(e,t){let n=null;if(!e||typeof e!=`string`)return n;let r=ko(e),i=typeof t==`function`;return r.forEach(e=>{if(e.type!==`declaration`)return;let{property:r,value:a}=e;i?t(r,a,e):a&&(n||={},n[r]=a)}),n}var Mo=/\\d/,No=[`-`,`_`,`/`,`.`];function Po(e=``){if(!Mo.test(e))return e!==e.toLowerCase()}function Fo(e){let t=[],n=``,r,i;for(let a of e){let e=No.includes(a);if(e===!0){t.push(n),n=``,r=void 0;continue}let o=Po(a);if(i===!1){if(r===!1&&o===!0){t.push(n),n=a,r=o;continue}if(r===!0&&o===!1&&n.length>1){let e=n.at(-1);t.push(n.slice(0,Math.max(0,n.length-1))),n=e+a,r=o;continue}}n+=a,r=o,i=e}return t.push(n),t}function Io(e){return e?Fo(e).map(e=>Ro(e)).join(``):``}function Lo(e){return zo(Io(e||``))}function Ro(e){return e?e[0].toUpperCase()+e.slice(1):``}function zo(e){return e?e[0].toLowerCase()+e.slice(1):``}function Bo(e){if(!e)return{};let t={};function n(e,n){if(e.startsWith(`-moz-`)||e.startsWith(`-webkit-`)||e.startsWith(`-ms-`)||e.startsWith(`-o-`)){t[Io(e)]=n;return}if(e.startsWith(`--`)){t[e]=n;return}t[Lo(e)]=n}return jo(e,n),t}function Vo(...e){return(...t)=>{for(let n of e)typeof n==`function`&&n(...t)}}function Ho(e,t){let n=RegExp(e,`g`);return e=>{if(typeof e!=`string`)throw TypeError(`expected an argument of type string, but got ${typeof e}`);return e.match(n)?e.replace(n,t):e}}var Uo=Ho(/[A-Z]/,e=>`-${e.toLowerCase()}`);function Wo(e){if(!e||typeof e!=`object`||Array.isArray(e))throw TypeError(`expected an argument of type object, but got ${typeof e}`);return Object.keys(e).map(t=>`${Uo(t)}: ${e[t]};`).join(`\n`)}function Go(e={}){return Wo(e).replace(`\n`,` `)}var Ko=new Set(`onabort.onanimationcancel.onanimationend.onanimationiteration.onanimationstart.onauxclick.onbeforeinput.onbeforetoggle.onblur.oncancel.oncanplay.oncanplaythrough.onchange.onclick.onclose.oncompositionend.oncompositionstart.oncompositionupdate.oncontextlost.oncontextmenu.oncontextrestored.oncopy.oncuechange.oncut.ondblclick.ondrag.ondragend.ondragenter.ondragleave.ondragover.ondragstart.ondrop.ondurationchange.onemptied.onended.onerror.onfocus.onfocusin.onfocusout.onformdata.ongotpointercapture.oninput.oninvalid.onkeydown.onkeypress.onkeyup.onload.onloadeddata.onloadedmetadata.onloadstart.onlostpointercapture.onmousedown.onmouseenter.onmouseleave.onmousemove.onmouseout.onmouseover.onmouseup.onpaste.onpause.onplay.onplaying.onpointercancel.onpointerdown.onpointerenter.onpointerleave.onpointermove.onpointerout.onpointerover.onpointerup.onprogress.onratechange.onreset.onresize.onscroll.onscrollend.onsecuritypolicyviolation.onseeked.onseeking.onselect.onselectionchange.onselectstart.onslotchange.onstalled.onsubmit.onsuspend.ontimeupdate.ontoggle.ontouchcancel.ontouchend.ontouchmove.ontouchstart.ontransitioncancel.ontransitionend.ontransitionrun.ontransitionstart.onvolumechange.onwaiting.onwebkitanimationend.onwebkitanimationiteration.onwebkitanimationstart.onwebkittransitionend.onwheel`.split(`.`));function qo(e){return Ko.has(e)}function Jo(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let r=e[n];if(r){for(let e of Object.keys(r)){let n=t[e],i=r[e],a=typeof n==`function`,o=typeof i==`function`;if(a&&typeof o&&qo(e))t[e]=mo(n,i);else if(a&&o)t[e]=Vo(n,i);else if(e===`class`){let r=co(n),a=co(i);r&&a?t[e]=ki(n,i):r?t[e]=ki(n):a&&(t[e]=ki(i))}else if(e===`style`){let r=typeof n==`object`,a=typeof i==`object`,o=typeof n==`string`,s=typeof i==`string`;if(r&&a)t[e]={...n,...i};else if(r&&s){let r=Bo(i);t[e]={...n,...r}}else if(o&&a)t[e]={...Bo(n),...i};else if(o&&s){let r=Bo(n),a=Bo(i);t[e]={...r,...a}}else r?t[e]=n:a?t[e]=i:o?t[e]=n:s&&(t[e]=i)}else t[e]=i===void 0?n:i}for(let e of Object.getOwnPropertySymbols(r)){let n=t[e],i=r[e];t[e]=i===void 0?n:i}}}return typeof t.style==`object`&&(t.style=Go(t.style).replaceAll(`\n`,` `)),t.hidden===!1&&(t.hidden=void 0,delete t.hidden),t.disabled===!1&&(t.disabled=void 0,delete t.disabled),t}var Yo=typeof window<`u`?window:void 0;typeof window<`u`&&window.document,typeof window<`u`&&window.navigator,typeof window<`u`&&window.location;function Xo(e){let t=e.activeElement;for(;t?.shadowRoot;){let e=t.shadowRoot.activeElement;if(e===t)break;t=e}return t}var Zo=class extends Map{#e=new Map;#t=N(0);#n=N(0);#r=br||-1;constructor(e){if(super(),e){for(var[t,n]of e)super.set(t,n);this.#n.v=super.size}}#i(e){return br===this.#r?N(e):sn(e)}has(e){var t=this.#e,n=t.get(e);if(n===void 0)if(super.has(e))n=this.#i(0),t.set(e,n);else return H(this.#t),!1;return H(n),!0}forEach(e,t){this.#a(),super.forEach(e,t)}get(e){var t=this.#e,n=t.get(e);if(n===void 0)if(super.has(e))n=this.#i(0),t.set(e,n);else{H(this.#t);return}return H(n),super.get(e)}set(e,t){var n=this.#e,r=n.get(e),i=super.get(e),a=super.set(e,t),o=this.#t;if(r===void 0)r=this.#i(0),n.set(e,r),P(this.#n,super.size),dn(o);else if(i!==t){dn(r);var s=o.reactions===null?null:new Set(o.reactions);(s===null||!r.reactions?.every(e=>s.has(e)))&&dn(o)}return a}delete(e){var t=this.#e,n=t.get(e),r=super.delete(e);return n!==void 0&&(t.delete(e),P(n,-1)),r&&(P(this.#n,super.size),dn(this.#t)),r}clear(){if(super.size!==0){super.clear();var e=this.#e;P(this.#n,0);for(var t of e.values())P(t,-1);dn(this.#t),e.clear()}}#a(){H(this.#t);var e=this.#e;if(this.#n.v!==e.size){for(var t of super.keys())if(!e.has(t)){var n=this.#i(0);e.set(t,n)}}for([,n]of this.#e)H(n)}keys(){return H(this.#t),super.keys()}values(){return this.#a(),super.values()}entries(){return this.#a(),super.entries()}[Symbol.iterator](){return this.entries()}get size(){return H(this.#n),super.size}};new class{#e;#t;constructor(e={}){let{window:t=Yo,document:n=t?.document}=e;t!==void 0&&(this.#e=n,this.#t=yt(e=>{let n=Jr(t,`focusin`,e),r=Jr(t,`focusout`,e);return()=>{n(),r()}}))}get current(){return this.#t?.(),this.#e?Xo(this.#e):null}};var Qo=class{#e;#t;constructor(e){this.#e=e,this.#t=Symbol(e)}get key(){return this.#t}exists(){return tt(this.#t)}get(){let e=$e(this.#t);if(e===void 0)throw Error(`Context "${this.#e}" not found`);return e}getOr(e){let t=$e(this.#t);return t===void 0?e:t}set(e){return et(this.#t,e)}};function $o(e,t){switch(e){case`post`:Rn(t);break;case`pre`:Bn(t);break}}function es(e,t,n,r={}){let{lazy:i=!1}=r,a=!i,o=Array.isArray(e)?[]:void 0;$o(t,()=>{let t=Array.isArray(e)?e.map(e=>e()):e();if(!a){a=!0,o=t;return}let r=Mr(()=>n(t,o));return o=t,r})}function ts(e,t,n){let r=Vn(()=>{let i=!1;es(e,t,(e,t)=>{if(i){r();return}let a=n(e,t);return i=!0,a},{lazy:!0})});Rn(()=>r)}function ns(e,t,n){es(e,`post`,t,n)}function rs(e,t,n){es(e,`pre`,t,n)}ns.pre=rs;function is(e,t){ts(e,`post`,t)}function as(e,t){ts(e,`pre`,t)}is.pre=as;function os(e,t){let n,r=null;return(...i)=>new Promise(a=>{r&&r(void 0),r=a,clearTimeout(n),n=setTimeout(async()=>{let t=await e(...i);r&&=(r(t),null)},t)})}function ss(e,t){let n=0,r=null;return(...i)=>{let a=Date.now();return n&&a-n<t?r??Promise.resolve(void 0):(n=a,r=e(...i),r)}}function cs(e,t,n={},r){let{lazy:i=!1,once:a=!1,initialValue:o,debounce:s,throttle:c}=n,l=N(pn(o)),u=N(!1),d=N(void 0),f=N(pn([])),p=()=>{H(f).forEach(e=>e()),P(f,[],!0)},m=e=>{P(f,[...H(f),e],!0)},h=async(e,n,r=!1)=>{try{P(u,!0),P(d,void 0),p();let i=new AbortController;m(()=>i.abort());let a=await t(e,n,{data:H(l),refetching:r,onCleanup:m,signal:i.signal});return P(l,a,!0),a}catch(e){e instanceof DOMException&&e.name===`AbortError`||P(d,e,!0);return}finally{P(u,!1)}},g=s?os(h,s):c?ss(h,c):h,_=Array.isArray(e)?e:[e],v;return r((t,n)=>{a&&v||(v=t,g(Array.isArray(e)?t:t[0],Array.isArray(e)?n:n?.[0]))},{lazy:i}),{get current(){return H(l)},get loading(){return H(u)},get error(){return H(d)},mutate:e=>{P(l,e,!0)},refetch:t=>{let n=_.map(e=>e());return g(Array.isArray(e)?n:n[0],Array.isArray(e)?n:n[0],t??!0)}}}function ls(e,t,n){return cs(e,t,n,(t,n)=>{let r=Array.isArray(e)?e:[e];ns(()=>r.map(e=>e()),(e,n)=>{t(e,n??[])},n)})}function us(e,t,n){return cs(e,t,n,(t,n)=>{let r=Array.isArray(e)?e:[e];ns.pre(()=>r.map(e=>e()),(e,n)=>{t(e,n??[])},n)})}ls.pre=us;function ds(e){Rn(()=>()=>{e()})}function fs(e,t){return setTimeout(t,e)}function ps(e){kr().then(e)}var ms=1,hs=9,gs=11;function _s(e){return oo(e)&&e.nodeType===ms&&typeof e.nodeName==`string`}function vs(e){return oo(e)&&e.nodeType===hs}function ys(e){return oo(e)&&e.constructor?.name===`VisualViewport`}function bs(e){return oo(e)&&e.nodeType!==void 0}function xs(e){return bs(e)&&e.nodeType===gs&&`host`in e}function Ss(e,t){if(!e||!t||!_s(e)||!_s(t))return!1;let n=t.getRootNode?.();if(e===t||e.contains(t))return!0;if(n&&xs(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Cs(e){return vs(e)?e:ys(e)?e.document:e?.ownerDocument??document}function ws(e){let t=e.activeElement;for(;t?.shadowRoot;){let e=t.shadowRoot.activeElement;if(e===t)break;t=e}return t}var Ts=class{element;#e=j(()=>this.element.current?this.element.current.getRootNode()??document:document);get root(){return H(this.#e)}set root(e){P(this.#e,e)}constructor(e){typeof e==`function`?this.element=Q(e):this.element=e}getDocument=()=>Cs(this.root);getWindow=()=>this.getDocument().defaultView??window;getActiveElement=()=>ws(this.root);isActiveElement=e=>e===this.getActiveElement();getElementById(e){return this.root.getElementById(e)}querySelector=e=>this.root?this.root.querySelector(e):null;querySelectorAll=e=>this.root?this.root.querySelectorAll(e):[];setTimeout=(e,t)=>this.getWindow().setTimeout(e,t);clearTimeout=e=>this.getWindow().clearTimeout(e)};function Es(e,t){return{[Nr()]:n=>fo(e)?(e.current=n,Mr(()=>t?.(n)),()=>{`isConnected`in n&&n.isConnected||(e.current=null,t?.(null))}):(e(n),Mr(()=>t?.(n)),()=>{`isConnected`in n&&n.isConnected||(e(null),t?.(null))})}}function Ds(e){return e?``:void 0}function Os(e){return e?`open`:`closed`}function ks(e){return e===`starting`?{"data-starting-style":``}:e===`ending`?{"data-ending-style":``}:{}}var As=class{#e;#t;attrs;constructor(e){this.#e=e.getVariant?e.getVariant():null,this.#t=this.#e?`data-${this.#e}-`:`data-${e.component}-`,this.getAttr=this.getAttr.bind(this),this.selector=this.selector.bind(this),this.attrs=Object.fromEntries(e.parts.map(e=>[e,this.getAttr(e)]))}getAttr(e,t){return t?`data-${t}-${e}`:`${this.#t}${e}`}selector(e,t){return`[${this.getAttr(e,t)}]`}};function js(e){let t=new As(e);return{...t.attrs,selector:t.selector,getAttr:t.getAttr}}var Ms=typeof document<`u`,Ns=Ps();function Ps(){return Ms&&window?.navigator?.userAgent&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||window?.navigator?.maxTouchPoints>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function Fs(e){return e instanceof HTMLElement}function Is(e){return e instanceof Element||e instanceof SVGElement}var Ls=class{#e;#t=null;#n=null;#r=0;constructor(e){this.#e=e,ds(()=>this.#i())}#i(){this.#t!==null&&(window.cancelAnimationFrame(this.#t),this.#t=null),this.#n?.disconnect(),this.#n=null,this.#r++}run(e){this.#i();let t=this.#e.ref.current;if(!t)return;if(typeof t.getAnimations!=`function`){this.#a(e);return}let n=this.#r,r=()=>{n===this.#r&&this.#a(e)},i=()=>{if(n!==this.#r)return;let e=t.getAnimations();if(e.length===0){r();return}Promise.all(e.map(e=>e.finished)).then(()=>{r()}).catch(()=>{if(n===this.#r){if(t.getAnimations().some(e=>e.pending||e.playState!==`finished`)){i();return}r()}})},a=()=>{this.#t=window.requestAnimationFrame(()=>{this.#t=null,i()})};if(!this.#e.afterTick.current){a();return}this.#t=window.requestAnimationFrame(()=>{this.#t=null;let e=`data-starting-style`;if(!t.hasAttribute(e)){a();return}this.#n=new MutationObserver(()=>{n===this.#r&&(t.hasAttribute(e)||(this.#n?.disconnect(),this.#n=null,a()))}),this.#n.observe(t,{attributes:!0,attributeFilter:[e]})})}#a(e){let t=()=>{e()};this.#e.afterTick?ps(t):t()}},Rs=class{#e;#t;#n;#r=N(!1);#i=N(void 0);#a=!1;#o=null;constructor(e){this.#e=e,P(this.#r,e.open.current,!0),this.#t=e.enabled??!0,this.#n=new Ls({ref:this.#e.ref,afterTick:this.#e.open}),ds(()=>this.#s()),ns(()=>this.#e.open.current,e=>{if(!this.#a){this.#a=!0;return}if(this.#s(),!e&&this.#e.shouldSkipExitAnimation?.()){P(this.#r,!1),P(this.#i,void 0),this.#e.onComplete?.();return}if(e&&P(this.#r,!0),P(this.#i,e?`starting`:`ending`,!0),e&&(this.#o=window.requestAnimationFrame(()=>{this.#o=null,this.#e.open.current&&P(this.#i,void 0)})),!this.#t){e||P(this.#r,!1),P(this.#i,void 0),this.#e.onComplete?.();return}this.#n.run(()=>{e===this.#e.open.current&&(this.#e.open.current||P(this.#r,!1),P(this.#i,void 0),this.#e.onComplete?.())})})}get shouldRender(){return H(this.#r)}get transitionStatus(){return H(this.#i)}#s(){this.#o!==null&&(window.cancelAnimationFrame(this.#o),this.#o=null)}};function $(){}function zs(e,t){return t===void 0?`bits-${e}`:`bits-${e}-${t}`}var Bs=js({component:`dialog`,parts:[`content`,`trigger`,`overlay`,`title`,`description`,`close`,`cancel`,`action`]}),Vs=new Qo(`Dialog.Root | AlertDialog.Root`),Hs=class e{static create(t){let n=Vs.getOr(null);return Vs.set(new e(t,n))}opts;#e=N(null);get triggerNode(){return H(this.#e)}set triggerNode(e){P(this.#e,e,!0)}#t=N(null);get contentNode(){return H(this.#t)}set contentNode(e){P(this.#t,e,!0)}#n=N(null);get overlayNode(){return H(this.#n)}set overlayNode(e){P(this.#n,e,!0)}#r=N(null);get descriptionNode(){return H(this.#r)}set descriptionNode(e){P(this.#r,e,!0)}#i=N(void 0);get contentId(){return H(this.#i)}set contentId(e){P(this.#i,e,!0)}#a=N(void 0);get titleId(){return H(this.#a)}set titleId(e){P(this.#a,e,!0)}#o=N(void 0);get triggerId(){return H(this.#o)}set triggerId(e){P(this.#o,e,!0)}#s=N(void 0);get descriptionId(){return H(this.#s)}set descriptionId(e){P(this.#s,e,!0)}#c=N(null);get cancelNode(){return H(this.#c)}set cancelNode(e){P(this.#c,e,!0)}#l=N(0);get nestedOpenCount(){return H(this.#l)}set nestedOpenCount(e){P(this.#l,e,!0)}depth;parent;contentPresence;overlayPresence;constructor(e,t){this.opts=e,this.parent=t,this.depth=t?t.depth+1:0,this.handleOpen=this.handleOpen.bind(this),this.handleClose=this.handleClose.bind(this),this.contentPresence=new Rs({ref:Q(()=>this.contentNode),open:this.opts.open,enabled:!0,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),this.overlayPresence=new Rs({ref:Q(()=>this.overlayNode),open:this.opts.open,enabled:!0}),ns(()=>this.opts.open.current,e=>{this.parent&&(e?this.parent.incrementNested():this.parent.decrementNested())},{lazy:!0}),ds(()=>{this.opts.open.current&&this.parent?.decrementNested()})}handleOpen(){this.opts.open.current||(this.opts.open.current=!0)}handleClose(){this.opts.open.current&&(this.opts.open.current=!1)}getBitsAttr=e=>Bs.getAttr(e,this.opts.variant.current);incrementNested(){this.nestedOpenCount++,this.parent?.incrementNested()}decrementNested(){this.nestedOpenCount!==0&&(this.nestedOpenCount--,this.parent?.decrementNested())}#u=j(()=>({"data-state":Os(this.opts.open.current)}));get sharedProps(){return H(this.#u)}set sharedProps(e){P(this.#u,e)}},Us=class e{static create(t){return new e(t,Vs.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=Es(this.opts.ref),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}onclick(e){this.opts.disabled.current||e.button>0||this.root.handleClose()}onkeydown(e){this.opts.disabled.current||(e.key===` `||e.key===`Enter`)&&(e.preventDefault(),this.root.handleClose())}#e=j(()=>({id:this.opts.id.current,[this.root.getBitsAttr(this.opts.variant.current)]:``,onclick:this.onclick,onkeydown:this.onkeydown,disabled:this.opts.disabled.current?!0:void 0,tabindex:0,...this.root.sharedProps,...this.attachment}));get props(){return H(this.#e)}set props(e){P(this.#e,e)}},Ws=class e{static create(t){return new e(t,Vs.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.root.titleId=this.opts.id.current,this.attachment=Es(this.opts.ref),ns.pre(()=>this.opts.id.current,e=>{this.root.titleId=e})}#e=j(()=>({id:this.opts.id.current,role:`heading`,"aria-level":this.opts.level.current,[this.root.getBitsAttr(`title`)]:``,...this.root.sharedProps,...this.attachment}));get props(){return H(this.#e)}set props(e){P(this.#e,e)}},Gs=class e{static create(t){return new e(t,Vs.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.root.descriptionId=this.opts.id.current,this.attachment=Es(this.opts.ref,e=>{this.root.descriptionNode=e}),ns.pre(()=>this.opts.id.current,e=>{this.root.descriptionId=e})}#e=j(()=>({id:this.opts.id.current,[this.root.getBitsAttr(`description`)]:``,...this.root.sharedProps,...this.attachment}));get props(){return H(this.#e)}set props(e){P(this.#e,e)}},Ks=class e{static create(t){return new e(t,Vs.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=Es(this.opts.ref,e=>{this.root.contentNode=e,this.root.contentId=e?.id})}#e=j(()=>({open:this.root.opts.open.current}));get snippetProps(){return H(this.#e)}set snippetProps(e){P(this.#e,e)}#t=j(()=>({id:this.opts.id.current,role:this.root.opts.variant.current===`alert-dialog`?`alertdialog`:`dialog`,"aria-modal":`true`,"aria-describedby":this.root.descriptionId,"aria-labelledby":this.root.titleId,[this.root.getBitsAttr(`content`)]:``,style:{pointerEvents:`auto`,outline:this.root.opts.variant.current===`alert-dialog`?`none`:void 0,"--bits-dialog-depth":this.root.depth,"--bits-dialog-nested-count":this.root.nestedOpenCount,contain:`layout style`},tabindex:this.root.opts.variant.current===`alert-dialog`?-1:void 0,"data-nested-open":Ds(this.root.nestedOpenCount>0),"data-nested":Ds(this.root.parent!==null),...ks(this.root.contentPresence.transitionStatus),...this.root.sharedProps,...this.attachment}));get props(){return H(this.#t)}set props(e){P(this.#t,e)}get shouldRender(){return this.root.contentPresence.shouldRender}},qs=class e{static create(t){return new e(t,Vs.get())}opts;root;attachment;constructor(e,t){this.opts=e,this.root=t,this.attachment=Es(this.opts.ref,e=>this.root.overlayNode=e)}#e=j(()=>({open:this.root.opts.open.current}));get snippetProps(){return H(this.#e)}set snippetProps(e){P(this.#e,e)}#t=j(()=>({id:this.opts.id.current,[this.root.getBitsAttr(`overlay`)]:``,style:{pointerEvents:`auto`,"--bits-dialog-depth":this.root.depth,"--bits-dialog-nested-count":this.root.nestedOpenCount},"data-nested-open":Ds(this.root.nestedOpenCount>0),"data-nested":Ds(this.root.parent!==null),...ks(this.root.overlayPresence.transitionStatus),...this.root.sharedProps,...this.attachment}));get props(){return H(this.#t)}set props(e){P(this.#t,e)}get shouldRender(){return this.root.overlayPresence.shouldRender}},Js=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`ref`,`child`,`children`,`level`]),Ys=U(`<div><!></div>`);function Xs(e,t){let n=oi();O(t,!0);let r=Y(t,`id`,19,()=>zs(n)),i=Y(t,`ref`,15,null),a=Y(t,`level`,3,2),o=ca(t,Js),s=Ws.create({id:Q(()=>r()),level:Q(()=>a()),ref:Q(()=>i(),e=>i(e))}),c=j(()=>Jo(o,s.props));var l=W(),u=I(l),d=e=>{var n=W();J(I(n),()=>t.child,()=>({props:H(c)})),G(e,n)},p=e=>{var n=Ys();ea(n,()=>({...H(c)})),J(F(n),()=>t.children??f),E(n),G(e,n)};q(u,e=>{t.child?e(d):e(p,-1)}),G(e,l),k()}function Zs(e,t){var n=W();mi(I(n),()=>t.children,e=>{var n=W();J(I(n),()=>t.children??f),G(e,n)}),G(e,n)}var Qs=new Qo(`BitsConfig`);function $s(){let e=new ec(null,{});return Qs.getOr(e).opts}var ec=class{opts;constructor(e,t){let n=tc(e,t);this.opts={defaultPortalTo:n(e=>e.defaultPortalTo),defaultLocale:n(e=>e.defaultLocale)}}};function tc(e,t){return n=>Q(()=>{let r=n(t)?.current;if(r!==void 0)return r;if(e!==null)return n(e.opts)?.current})}function nc(e,t){return n=>{let r=$s();return Q(()=>{let i=n();if(i!==void 0)return i;let a=e(r).current;return a===void 0?t:a})}}var rc=nc(e=>e.defaultPortalTo,`body`);function ic(e,t){O(t,!0);let n=rc(()=>t.to),r=nt(),i=j(a);function a(){if(!Ms||t.disabled)return null;let e=null;return e=typeof n.current==`string`?document.querySelector(n.current):n.current,e}let o;function s(){o&&=(di(o),null)}ns([()=>H(i),()=>t.disabled],([e,n])=>{if(!e||n){s();return}return o=si(Zs,{target:e,props:{children:t.children},context:r}),()=>{s()}});var c=W(),l=I(c),u=e=>{var n=W();J(I(n),()=>t.children??f),G(e,n)};q(l,e=>{t.disabled&&e(u)}),G(e,c),k()}var ac=class{eventName;options;constructor(e,t={bubbles:!0,cancelable:!0}){this.eventName=e,this.options=t}createEvent(e){return new CustomEvent(this.eventName,{...this.options,detail:e})}dispatch(e,t){let n=this.createEvent(t);return e.dispatchEvent(n),n}listen(e,t,n){return Jr(e,this.eventName,e=>{t(e)},n)}};function oc(e,t=500){let n=null,r=(...r)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{e(...r)},t)};return r.destroy=()=>{n!==null&&(clearTimeout(n),n=null)},r}function sc(e,t){return e===t||e.contains(t)}function cc(e){return e?.ownerDocument??document}function lc(e,t){let{clientX:n,clientY:r}=e,i=t.getBoundingClientRect();return n<i.left||n>i.right||r<i.top||r>i.bottom}var uc=[`input:not([inert]):not([inert] *)`,`select:not([inert]):not([inert] *)`,`textarea:not([inert]):not([inert] *)`,`a[href]:not([inert]):not([inert] *)`,`button:not([inert]):not([inert] *)`,`[tabindex]:not(slot):not([inert]):not([inert] *)`,`audio[controls]:not([inert]):not([inert] *)`,`video[controls]:not([inert]):not([inert] *)`,`[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)`,`details>summary:first-of-type:not([inert]):not([inert] *)`,`details:not([inert]):not([inert] *)`],dc=uc.join(`,`),fc=typeof Element>`u`,pc=fc?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,mc=!fc&&Element.prototype.getRootNode?function(e){return e?.getRootNode?.call(e)}:function(e){return e?.ownerDocument},hc=function(e,t){t===void 0&&(t=!0);var n=e?.getAttribute?.call(e,`inert`);return n===``||n===`true`||t&&e&&(typeof e.closest==`function`?e.closest(`[inert]`):hc(e.parentNode))},gc=function(e){var t=e?.getAttribute?.call(e,`contenteditable`);return t===``||t===`true`},_c=function(e,t,n){if(hc(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(dc));return t&&pc.call(e,dc)&&r.unshift(e),r=r.filter(n),r},vc=function(e,t,n){for(var r=[],i=Array.from(e);i.length;){var a=i.shift();if(!hc(a,!1))if(a.tagName===`SLOT`){var o=a.assignedElements(),s=vc(o.length?o:a.children,!0,n);n.flatten?r.push.apply(r,s):r.push({scopeParent:a,candidates:s})}else{pc.call(a,dc)&&n.filter(a)&&(t||!e.includes(a))&&r.push(a);var c=a.shadowRoot||typeof n.getShadowRoot==`function`&&n.getShadowRoot(a),l=!hc(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(a));if(c&&l){var u=vc(c===!0?a.children:c.children,!0,n);n.flatten?r.push.apply(r,u):r.push({scopeParent:a,candidates:u})}else i.unshift.apply(i,a.children)}}return r},yc=function(e){return!isNaN(parseInt(e.getAttribute(`tabindex`),10))},bc=function(e){if(!e)throw Error(`No node provided`);return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||gc(e))&&!yc(e)?0:e.tabIndex},xc=function(e,t){var n=bc(e);return n<0&&t&&!yc(e)?0:n},Sc=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},Cc=function(e){return e.tagName===`INPUT`},wc=function(e){return Cc(e)&&e.type===`hidden`},Tc=function(e){return e.tagName===`DETAILS`&&Array.prototype.slice.apply(e.children).some(function(e){return e.tagName===`SUMMARY`})},Ec=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},Dc=function(e){if(!e.name)return!0;var t=e.form||mc(e),n=function(e){return t.querySelectorAll(`input[type="radio"][name="`+e+`"]`)},r;if(typeof window<`u`&&window.CSS!==void 0&&typeof window.CSS.escape==`function`)r=n(window.CSS.escape(e.name));else try{r=n(e.name)}catch(e){return console.error(`Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s`,e.message),!1}var i=Ec(r,e.form);return!i||i===e},Oc=function(e){return Cc(e)&&e.type===`radio`},kc=function(e){return Oc(e)&&!Dc(e)},Ac=function(e){var t=e&&mc(e),n=t?.host,r=!1;if(t&&t!==e){var i,a,o;for(r=!!((i=n)!=null&&(a=i.ownerDocument)!=null&&a.contains(n)||e!=null&&(o=e.ownerDocument)!=null&&o.contains(e));!r&&n;){var s,c;t=mc(n),n=t?.host,r=!!((s=n)!=null&&(c=s.ownerDocument)!=null&&c.contains(n))}}return r},jc=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return n===0&&r===0},Mc=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if(n===`full-native`&&`checkVisibility`in e)return!e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});if(getComputedStyle(e).visibility===`hidden`)return!0;var i=pc.call(e,`details>summary:first-of-type`)?e.parentElement:e;if(pc.call(i,`details:not([open]) *`))return!0;if(!n||n===`full`||n===`full-native`||n===`legacy-full`){if(typeof r==`function`){for(var a=e;e;){var o=e.parentElement,s=mc(e);if(o&&!o.shadowRoot&&r(o)===!0)return jc(e);e=e.assignedSlot?e.assignedSlot:!o&&s!==e.ownerDocument?s.host:o}e=a}if(Ac(e))return!e.getClientRects().length;if(n!==`legacy-full`)return!0}else if(n===`non-zero-area`)return jc(e);return!1},Nc=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName===`FIELDSET`&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if(r.tagName===`LEGEND`)return pc.call(t,`fieldset[disabled] *`)?!0:!r.contains(e)}return!0}t=t.parentElement}return!1},Pc=function(e,t){return!(t.disabled||wc(t)||Mc(t,e)||Tc(t)||Nc(t))},Fc=function(e,t){return!(kc(t)||bc(t)<0||!Pc(e,t))},Ic=function(e){var t=parseInt(e.getAttribute(`tabindex`),10);return!!(isNaN(t)||t>=0)},Lc=function(e){var t=[],n=[];return e.forEach(function(e,r){var i=!!e.scopeParent,a=i?e.scopeParent:e,o=xc(a,i),s=i?Lc(e.candidates):a;o===0?i?t.push.apply(t,s):t.push(a):n.push({documentOrder:r,tabIndex:o,item:e,isScope:i,content:s})}),n.sort(Sc).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},Rc=function(e,t){return t||={},Lc(t.getShadowRoot?vc([e],t.includeContainer,{filter:Fc.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:Ic}):_c(e,t.includeContainer,Fc.bind(null,t)))},zc=function(e,t){return t||={},t.getShadowRoot?vc([e],t.includeContainer,{filter:Pc.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):_c(e,t.includeContainer,Pc.bind(null,t))},Bc=uc.concat(`iframe:not([inert]):not([inert] *)`).join(`,`),Vc=function(e,t){if(t||={},!e)throw Error(`No node provided`);return pc.call(e,Bc)===!1?!1:Pc(t,e)},Hc=`data-context-menu-trigger`,Uc=`data-context-menu-content`;new Qo(`Menu.Root`),new Qo(`Menu.Root | Menu.Sub`),new Qo(`Menu.Content`),new Qo(`Menu.Group | Menu.RadioGroup`),new Qo(`Menu.RadioGroup`),new Qo(`Menu.CheckboxGroup`),new ac(`bitsmenuopen`,{bubbles:!1,cancelable:!0}),js({component:`menu`,parts:[`trigger`,`content`,`sub-trigger`,`item`,`group`,`group-heading`,`checkbox-group`,`checkbox-item`,`radio-group`,`radio-item`,`separator`,`sub-content`,`arrow`]}),globalThis.bitsDismissableLayers??=new Map;var Wc=class e{static create(t){return new e(t)}opts;#e;#t;#n={pointerdown:!1};#r=!1;#i=!1;#a=void 0;#o;#s=$;constructor(e){this.opts=e,this.#t=e.interactOutsideBehavior,this.#e=e.onInteractOutside,this.#o=e.onFocusOutside,Rn(()=>{this.#a=cc(this.opts.ref.current)});let t=$,n=()=>{this.#g(),globalThis.bitsDismissableLayers.delete(this),this.#d.destroy(),t()};ns([()=>this.opts.enabled.current,()=>this.opts.ref.current],()=>{if(!(!this.opts.enabled.current||!this.opts.ref.current))return fs(1,()=>{this.opts.ref.current&&(globalThis.bitsDismissableLayers.set(this,this.#t),t(),t=this.#l())}),n}),ds(()=>{this.#g.destroy(),globalThis.bitsDismissableLayers.delete(this),this.#d.destroy(),this.#s(),t()})}#c=e=>{e.defaultPrevented||this.opts.ref.current&&ps(()=>{!this.opts.ref.current||this.#h(e.target)||e.target&&!this.#i&&this.#o.current?.(e)})};#l(){return Vo(Jr(this.#a,`pointerdown`,Vo(this.#f,this.#m),{capture:!0}),Jr(this.#a,`pointerdown`,Vo(this.#p,this.#d)),Jr(this.#a,`focusin`,this.#c))}#u=e=>{let t=e;t.defaultPrevented&&(t=Jc(e)),this.#e.current(e)};#d=oc(e=>{if(!this.opts.ref.current){this.#s();return}let t=this.opts.isValidEvent.current(e,this.opts.ref.current)||qc(e,this.opts.ref.current);if(!this.#r||this.#_()||!t){this.#s();return}let n=e;if(n.defaultPrevented&&(n=Jc(n)),this.#t.current!==`close`&&this.#t.current!==`defer-otherwise-close`){this.#s();return}e.pointerType===`touch`?(this.#s(),this.#s=Jr(this.#a,`click`,this.#u,{once:!0})):this.#e.current(n)},10);#f=e=>{this.#n[e.type]=!0};#p=e=>{this.#n[e.type]=!1};#m=()=>{this.opts.ref.current&&(this.#r=Kc(this.opts.ref.current))};#h=e=>this.opts.ref.current?sc(this.opts.ref.current,e):!1;#g=oc(()=>{for(let e in this.#n)this.#n[e]=!1;this.#r=!1},20);#_(){return Object.values(this.#n).some(Boolean)}#v=()=>{this.#i=!0};#y=()=>{this.#i=!1};props={onfocuscapture:this.#v,onblurcapture:this.#y}};function Gc(e=[...globalThis.bitsDismissableLayers]){return e.findLast(([e,{current:t}])=>t===`close`||t===`ignore`)}function Kc(e){let t=[...globalThis.bitsDismissableLayers],n=Gc(t);if(n)return n[0].opts.ref.current===e;let[r]=t[0];return r.opts.ref.current===e}function qc(e,t){let n=e.target;if(!Is(n))return!1;let r=!!n.closest(`[${Hc}]`),i=!!t.closest(`[${Uc}]`);return`button`in e&&e.button>0&&!r?!1:`button`in e&&e.button===0&&r&&i?!0:r&&i?!1:cc(n).documentElement.contains(n)&&!sc(t,n)&&lc(e,t)}function Jc(e){let t=e.currentTarget,n=e.target,r;r=e instanceof PointerEvent?new PointerEvent(e.type,e):new PointerEvent(`pointerdown`,e);let i=!1;return new Proxy(r,{get:(r,a)=>a===`currentTarget`?t:a===`target`?n:a===`preventDefault`?()=>{i=!0,typeof r.preventDefault==`function`&&r.preventDefault()}:a===`defaultPrevented`?i:a in r?r[a]:e[a]})}function Yc(e,t){O(t,!0);let n=Y(t,`interactOutsideBehavior`,3,`close`),r=Y(t,`onInteractOutside`,3,$),i=Y(t,`onFocusOutside`,3,$),a=Y(t,`isValidEvent`,3,()=>!1),o=Wc.create({id:Q(()=>t.id),interactOutsideBehavior:Q(()=>n()),onInteractOutside:Q(()=>r()),enabled:Q(()=>t.enabled),onFocusOutside:Q(()=>i()),isValidEvent:Q(()=>a()),ref:t.ref});var s=W();J(I(s),()=>t.children??f,()=>({props:o.props})),G(e,s),k()}globalThis.bitsEscapeLayers??=new Map;var Xc=class e{static create(t){return new e(t)}opts;domContext;constructor(e){this.opts=e,this.domContext=new Ts(this.opts.ref);let t=$;ns(()=>e.enabled.current,n=>(n&&(globalThis.bitsEscapeLayers.set(this,e.escapeKeydownBehavior),t=this.#e()),()=>{t(),globalThis.bitsEscapeLayers.delete(this)}))}#e=()=>Jr(this.domContext.getDocument(),`keydown`,this.#t,{passive:!1});#t=e=>{if(e.key!==`Escape`||!Zc(this))return;let t=new KeyboardEvent(e.type,e);e.preventDefault();let n=this.opts.escapeKeydownBehavior.current;n!==`close`&&n!==`defer-otherwise-close`||this.opts.onEscapeKeydown.current(t)}};function Zc(e){let t=[...globalThis.bitsEscapeLayers],n=t.findLast(([e,{current:t}])=>t===`close`||t===`ignore`);if(n)return n[0]===e;let[r]=t[0];return r===e}function Qc(e,t){O(t,!0);let n=Y(t,`escapeKeydownBehavior`,3,`close`),r=Y(t,`onEscapeKeydown`,3,$);Xc.create({escapeKeydownBehavior:Q(()=>n()),onEscapeKeydown:Q(()=>r()),enabled:Q(()=>t.enabled),ref:t.ref});var i=W();J(I(i),()=>t.children??f),G(e,i),k()}var $c=class e{static instance;#e=po([]);#t=new WeakMap;#n=new WeakMap;static getInstance(){return this.instance||=new e,this.instance}register(e){let t=this.getActive();t&&t!==e&&t.pause();let n=document.activeElement;n&&n!==document.body&&this.#n.set(e,n),this.#e.current=this.#e.current.filter(t=>t!==e),this.#e.current.unshift(e)}unregister(e){this.#e.current=this.#e.current.filter(t=>t!==e);let t=this.getActive();t&&t.resume()}getActive(){return this.#e.current[0]}setFocusMemory(e,t){this.#t.set(e,t)}getFocusMemory(e){return this.#t.get(e)}isActiveScope(e){return this.getActive()===e}setPreFocusMemory(e,t){this.#n.set(e,t)}getPreFocusMemory(e){return this.#n.get(e)}clearPreFocusMemory(e){this.#n.delete(e)}},el=class e{#e=!1;#t=null;#n=$c.getInstance();#r=[];#i;constructor(e){this.#i=e}get paused(){return this.#e}pause(){this.#e=!0}resume(){this.#e=!1}#a(){for(let e of this.#r)e();this.#r=[]}mount(e){this.#t&&this.unmount(),this.#t=e,this.#n.register(this),this.#c(),this.#o()}unmount(){this.#t&&=(this.#a(),this.#s(),this.#n.unregister(this),this.#n.clearPreFocusMemory(this),null)}#o(){if(!this.#t)return;let e=new CustomEvent(`focusScope.onOpenAutoFocus`,{bubbles:!1,cancelable:!0});this.#i.onOpenAutoFocus.current(e),e.defaultPrevented||requestAnimationFrame(()=>{if(!this.#t)return;let e=this.#u();e?(e.focus(),this.#n.setFocusMemory(this,e)):this.#t.focus()})}#s(){let e=new CustomEvent(`focusScope.onCloseAutoFocus`,{bubbles:!1,cancelable:!0});if(this.#i.onCloseAutoFocus.current?.(e),!e.defaultPrevented){let e=this.#n.getPreFocusMemory(this);if(e&&document.contains(e))try{e.focus()}catch{document.body.focus()}}}#c(){if(!this.#t||!this.#i.trap.current)return;let e=this.#t,t=e.ownerDocument;this.#r.push(Jr(t,`focusin`,t=>{if(this.#e||!this.#n.isActiveScope(this))return;let n=t.target;if(n)if(e.contains(n))this.#n.setFocusMemory(this,n);else{let n=this.#n.getFocusMemory(this);if(n&&e.contains(n)&&Vc(n))t.preventDefault(),n.focus();else{let t=this.#u(),n=this.#d()[0];(t||n||e).focus()}}},{capture:!0}),Jr(e,`keydown`,e=>{if(!this.#i.loop||this.#e||e.key!==`Tab`||!this.#n.isActiveScope(this))return;let n=this.#l();if(n.length===0)return;let r=n[0],i=n[n.length-1];!e.shiftKey&&t.activeElement===i?(e.preventDefault(),r.focus()):e.shiftKey&&t.activeElement===r&&(e.preventDefault(),i.focus())}));let n=new MutationObserver(()=>{let t=this.#n.getFocusMemory(this);if(t&&!e.contains(t)){let t=this.#u(),n=this.#d()[0],r=t||n;r?(r.focus(),this.#n.setFocusMemory(this,r)):e.focus()}});n.observe(e,{childList:!0,subtree:!0}),this.#r.push(()=>n.disconnect())}#l(){return this.#t?Rc(this.#t,{includeContainer:!1,getShadowRoot:!0}):[]}#u(){return this.#l()[0]||null}#d(){return this.#t?zc(this.#t,{includeContainer:!1,getShadowRoot:!0}):[]}static use(t){let n=null;return ns([()=>t.ref.current,()=>t.enabled.current],([r,i])=>{r&&i?(n||=new e(t),n.mount(r)):n&&=(n.unmount(),null)}),ds(()=>{n?.unmount()}),{get props(){return{tabindex:-1}}}}};function tl(e,t){O(t,!0);let n=Y(t,`enabled`,3,!1),r=Y(t,`trapFocus`,3,!1),i=Y(t,`loop`,3,!1),a=Y(t,`onCloseAutoFocus`,3,$),o=Y(t,`onOpenAutoFocus`,3,$),s=el.use({enabled:Q(()=>n()),trap:Q(()=>r()),loop:i(),onCloseAutoFocus:Q(()=>a()),onOpenAutoFocus:Q(()=>o()),ref:t.ref});var c=W();J(I(c),()=>t.focusScope??f,()=>({props:s.props})),G(e,c),k()}var nl=()=>{};globalThis.bitsTextSelectionLayers??=new Map;var rl=class e{static create(t){return new e(t)}opts;domContext;#e=$;#t=!1;#n=nl;#r=nl;constructor(e){this.opts=e,this.domContext=new Ts(e.ref);let t=$;ns(()=>[this.opts.enabled.current,this.opts.onPointerDown.current,this.opts.onPointerUp.current],([e,n,r])=>(this.#t=e,this.#n=n,this.#r=r,e&&(globalThis.bitsTextSelectionLayers.set(this,this.opts.enabled),t(),t=this.#i()),()=>{this.#t=!1,t(),this.#s(),globalThis.bitsTextSelectionLayers.delete(this)}))}#i(){return Vo(Jr(this.domContext.getDocument(),`pointerdown`,this.#o),Jr(this.domContext.getDocument(),`pointerup`,mo(this.#s,this.#a)))}#a=e=>{this.#r(e)};#o=e=>{let t=this.opts.ref.current,n=e.target;!Fs(t)||!Fs(n)||!this.#t||!sl(this)||!Ss(t,n)||(this.#n(e),!e.defaultPrevented&&(this.#e=al(t,this.domContext.getDocument().body)))};#s=()=>{this.#e(),this.#e=$}},il=e=>e.style.userSelect||e.style.webkitUserSelect;function al(e,t){let n=il(t),r=il(e);return ol(t,`none`),ol(e,`text`),()=>{ol(t,n),ol(e,r)}}function ol(e,t){e.style.userSelect=t,e.style.webkitUserSelect=t}function sl(e){let t=[...globalThis.bitsTextSelectionLayers];if(!t.length)return!1;let n=t.at(-1);return n?n[0]===e:!1}function cl(e,t){O(t,!0);let n=Y(t,`preventOverflowTextSelection`,3,!0),r=Y(t,`onPointerDown`,3,$),i=Y(t,`onPointerUp`,3,$);rl.create({id:Q(()=>t.id),onPointerDown:Q(()=>r()),onPointerUp:Q(()=>i()),enabled:Q(()=>t.enabled&&n()),ref:t.ref});var a=W();J(I(a),()=>t.children??f),G(e,a),k()}globalThis.bitsIdCounter??={current:0};function ll(e=`bits`){return globalThis.bitsIdCounter.current++,`${e}-${globalThis.bitsIdCounter.current}`}var ul=class{#e;#t=0;#n=N();#r;constructor(e){this.#e=e}#i(){--this.#t,this.#r&&this.#t<=0&&(this.#r(),P(this.#n,void 0),this.#r=void 0)}get(...e){return this.#t+=1,H(this.#n)===void 0&&(this.#r=Vn(()=>{P(this.#n,this.#e(...e),!0)})),Rn(()=>()=>{this.#i()}),H(this.#n)}},dl=new Zo,fl=N(null),pl=null,ml=null,hl=!1,gl=Q(()=>{for(let e of dl.values())if(e)return!0;return!1}),_l=null,vl=new ul(()=>{function e(){document.body.setAttribute(`style`,H(fl)??``),document.body.style.removeProperty(`--scrollbar-width`),Ns&&pl?.(),P(fl,null)}function t(){ml!==null&&(window.clearTimeout(ml),ml=null)}function n(e,n){t(),hl=!0,_l=Date.now();let r=_l,i=()=>{ml=null,_l===r&&(bl(dl)?hl=!1:(hl=!1,n()))},a=e===null?24:e;ml=window.setTimeout(i,a)}function r(){H(fl)===null&&dl.size===0&&!hl&&P(fl,document.body.getAttribute(`style`),!0)}return ns(()=>gl.current,()=>{if(!gl.current)return;r(),hl=!1;let e=getComputedStyle(document.documentElement),t=getComputedStyle(document.body),n=e.scrollbarGutter?.includes(`stable`)||t.scrollbarGutter?.includes(`stable`),i=window.innerWidth-document.documentElement.clientWidth,a={padding:Number.parseInt(t.paddingRight??`0`,10)+i,margin:Number.parseInt(t.marginRight??`0`,10)};i>0&&!n&&(document.body.style.paddingRight=`${a.padding}px`,document.body.style.marginRight=`${a.margin}px`,document.body.style.setProperty(`--scrollbar-width`,`${i}px`)),document.body.style.overflow=`hidden`,Ns&&(pl=Jr(document,`touchmove`,e=>{e.target===document.documentElement&&(e.touches.length>1||e.preventDefault())},{passive:!1})),ps(()=>{document.body.style.pointerEvents=`none`,document.body.style.overflow=`hidden`})}),ds(()=>()=>{pl?.()}),{get lockMap(){return dl},resetBodyStyle:e,scheduleCleanupIfNoNewLocks:n,cancelPendingCleanup:t,ensureInitialStyleCaptured:r}}),yl=class{#e=ll();#t;#n=()=>null;#r;locked;constructor(e,t=()=>null){this.#t=e,this.#n=t,this.#r=vl.get(),this.#r&&(this.#r.cancelPendingCleanup(),this.#r.ensureInitialStyleCaptured(),this.#r.lockMap.set(this.#e,this.#t??!1),this.locked=Q(()=>this.#r.lockMap.get(this.#e)??!1,e=>this.#r.lockMap.set(this.#e,e)),ds(()=>{if(this.#r.lockMap.delete(this.#e),bl(this.#r.lockMap))return;let e=this.#n();this.#r.scheduleCleanupIfNoNewLocks(e,()=>{this.#r.resetBodyStyle()})}))}};function bl(e){for(let[t,n]of e)if(n)return!0;return!1}function xl(e,t){O(t,!0);let n=Y(t,`preventScroll`,3,!0),r=Y(t,`restoreScrollDelay`,3,null);n()&&new yl(n(),()=>r()),k()}var Sl=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`forceMount`,`child`,`children`,`ref`]),Cl=U(`<div><!></div>`);function wl(e,t){let n=oi();O(t,!0);let r=Y(t,`id`,19,()=>zs(n)),i=Y(t,`forceMount`,3,!1),a=Y(t,`ref`,15,null),o=ca(t,Sl),s=qs.create({id:Q(()=>r()),ref:Q(()=>a(),e=>a(e))}),c=j(()=>Jo(o,s.props));var l=W(),u=I(l),d=e=>{var n=W(),r=I(n),i=e=>{var n=W(),r=I(n);{let e=j(()=>({props:Jo(H(c)),...s.snippetProps}));J(r,()=>t.child,()=>H(e))}G(e,n)},a=e=>{var n=Cl();ea(n,e=>({...e}),[()=>Jo(H(c))]),J(F(n),()=>t.children??f,()=>s.snippetProps),E(n),G(e,n)};q(r,e=>{t.child?e(i):e(a,-1)}),G(e,n)};q(u,e=>{(s.shouldRender||i())&&e(d)}),G(e,l),k()}var Tl=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`children`,`child`,`ref`]),El=U(`<div><!></div>`);function Dl(e,t){let n=oi();O(t,!0);let r=Y(t,`id`,19,()=>zs(n)),i=Y(t,`ref`,15,null),a=ca(t,Tl),o=Gs.create({id:Q(()=>r()),ref:Q(()=>i(),e=>i(e))}),s=j(()=>Jo(a,o.props));var c=W(),l=I(c),u=e=>{var n=W();J(I(n),()=>t.child,()=>({props:H(s)})),G(e,n)},d=e=>{var n=El();ea(n,()=>({...H(s)})),J(F(n),()=>t.children??f),E(n),G(e,n)};q(l,e=>{t.child?e(u):e(d,-1)}),G(e,c),k()}function Ol(e,t){O(t,!0);let n=Y(t,`open`,15,!1),r=Y(t,`onOpenChange`,3,$),i=Y(t,`onOpenChangeComplete`,3,$);Hs.create({variant:Q(()=>`dialog`),open:Q(()=>n(),e=>{n(e),r()(e)}),onOpenChangeComplete:Q(()=>i())});var a=W();J(I(a),()=>t.children??f),G(e,a),k()}var kl=new Set([`$$slots`,`$$events`,`$$legacy`,`children`,`child`,`id`,`ref`,`disabled`]),Al=U(`<button><!></button>`);function jl(e,t){let n=oi();O(t,!0);let r=Y(t,`id`,19,()=>zs(n)),i=Y(t,`ref`,15,null),a=Y(t,`disabled`,3,!1),o=ca(t,kl),s=Us.create({variant:Q(()=>`close`),id:Q(()=>r()),ref:Q(()=>i(),e=>i(e)),disabled:Q(()=>!!a())}),c=j(()=>Jo(o,s.props));var l=W(),u=I(l),d=e=>{var n=W();J(I(n),()=>t.child,()=>({props:H(c)})),G(e,n)},p=e=>{var n=Al();ea(n,()=>({...H(c)})),J(F(n),()=>t.children??f),E(n),G(e,n)};q(u,e=>{t.child?e(d):e(p,-1)}),G(e,l),k()}var Ml=new Set([`$$slots`,`$$events`,`$$legacy`,`id`,`children`,`child`,`ref`,`forceMount`,`onCloseAutoFocus`,`onOpenAutoFocus`,`onEscapeKeydown`,`onInteractOutside`,`trapFocus`,`preventScroll`,`restoreScrollDelay`]),Nl=U(`<!> <!>`,1),Pl=U(`<!> <div><!></div>`,1);function Fl(e,t){let n=oi();O(t,!0);let r=Y(t,`id`,19,()=>zs(n)),i=Y(t,`ref`,15,null),a=Y(t,`forceMount`,3,!1),o=Y(t,`onCloseAutoFocus`,3,$),s=Y(t,`onOpenAutoFocus`,3,$),c=Y(t,`onEscapeKeydown`,3,$),l=Y(t,`onInteractOutside`,3,$),u=Y(t,`trapFocus`,3,!0),d=Y(t,`preventScroll`,3,!0),p=Y(t,`restoreScrollDelay`,3,null),m=ca(t,Ml),h=Ks.create({id:Q(()=>r()),ref:Q(()=>i(),e=>i(e))}),g=j(()=>Jo(m,h.props));var _=W(),v=I(_),y=e=>{tl(e,{get ref(){return h.opts.ref},loop:!0,get trapFocus(){return u()},get enabled(){return h.root.opts.open.current},get onOpenAutoFocus(){return s()},get onCloseAutoFocus(){return o()},focusScope:(e,n)=>{let r=()=>n?.().props;Qc(e,ua(()=>H(g),{get enabled(){return h.root.opts.open.current},get ref(){return h.opts.ref},onEscapeKeydown:e=>{c()(e),!e.defaultPrevented&&h.root.handleClose()},children:(e,n)=>{Yc(e,ua(()=>H(g),{get ref(){return h.opts.ref},get enabled(){return h.root.opts.open.current},onInteractOutside:e=>{l()(e),!e.defaultPrevented&&h.root.handleClose()},children:(e,n)=>{cl(e,ua(()=>H(g),{get ref(){return h.opts.ref},get enabled(){return h.root.opts.open.current},children:(e,n)=>{var i=W(),a=I(i),o=e=>{var n=Nl(),i=I(n),a=e=>{xl(e,{get preventScroll(){return d()},get restoreScrollDelay(){return p()}})};q(i,e=>{h.root.opts.open.current&&e(a)});var o=L(i,2);{let e=j(()=>({props:Jo(H(g),r()),...h.snippetProps}));J(o,()=>t.child,()=>H(e))}G(e,n)},s=e=>{var n=Pl(),i=I(n);xl(i,{get preventScroll(){return d()}});var a=L(i,2);ea(a,e=>({...e}),[()=>Jo(H(g),r())]),J(F(a),()=>t.children??f),E(a),G(e,n)};q(a,e=>{t.child?e(o):e(s,-1)}),G(e,i)},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{focusScope:!0}})};q(v,e=>{(h.shouldRender||a())&&e(y)}),G(e,_),k()}var Il=U(`<button class="flex flex-col gap-1 text-left"><div class="flex items-center gap-2 font-mono text-sm"><span class="size-2 shrink-0 rounded-sm"></span> <span class="flex-1 truncate text-foreground"> </span> <span class="tabular-nums text-muted-foreground"> </span></div> <div class="h-1 overflow-hidden rounded-full bg-border"><div class="h-full"></div></div></button>`),Ll=U(`<div class="text-sm text-muted-foreground">No projects tracked yet \u2014 run <code class="text-foreground">syn .</code></div>`),Rl=U(`<div class="flex max-h-[260px] flex-col gap-2 overflow-y-auto pr-1"></div>`),zl=U(`<div class="flex flex-col gap-0.5 bg-card p-3"><span class="font-mono text-[10px] uppercase tracking-[0.1em] text-muted-foreground"> </span> <span class="font-mono text-sm text-foreground"> </span></div>`),Bl=U(`<!> <!> <div class="mt-4 grid grid-cols-2 gap-px overflow-hidden rounded-lg border bg-border"></div> <!>`,1),Vl=U(`<!> <!>`,1);function Hl(e,t){O(t,!0);let n=N(!1),r=N(null),i=j(()=>X.data?.projects??[]),a=j(()=>Math.max(1,...H(i).map(e=>e.total_turns)));function o(e){let t=(X.data?.recent_turns??[]).find(t=>t.project_path===e.path);return t?ma(t.ts):e.last_seen?ma(e.last_seen):`\u2014`}function s(e){return[[`Cost`,pa(e.estimated_cost_usd)],[`Turns`,Z(e.total_turns)],[`Input`,Z(e.total_input_tokens)],[`Output`,Z(e.total_output_tokens)],[`Cache R`,Z(e.total_cache_read)],[`Cache W`,Z(e.total_cache_create)],[`Blocks`,Z(e.blocked_count)],[`Last active`,o(e)]]}var c=Vl(),l=I(c);Xa(l,{title:`Projects`,meta:`by turns`,children:(e,t)=>{var o=Rl();yi(o,21,()=>H(i),e=>e.path,(e,t)=>{var i=Il(),o=F(i),s=F(o),c=L(s,2),l=F(c,!0);E(c);var u=L(c,2),d=F(u,!0);E(u),E(o);var f=L(o,2),p=F(f);E(f),E(i),R((e,n,r)=>{Ri(s,e),K(l,H(t).name),K(d,n),Ri(p,r)},[()=>`background:${ya(H(t).name)}`,()=>Z(H(t).total_turns),()=>`width:${H(t).total_turns/H(a)*100}%; background:${ya(H(t).name)}`]),Yr(`click`,i,()=>{P(r,H(t),!0),P(n,!0)}),G(e,i)},e=>{G(e,Ll())}),E(o),G(e,o)},$$slots:{default:!0}}),Ti(L(l,2),()=>Ol,(e,t)=>{t(e,{get open(){return H(n)},set open(e){P(n,e,!0)},children:(e,t)=>{var n=W();Ti(I(n),()=>ic,(e,t)=>{t(e,{children:(e,t)=>{var n=Vl(),i=I(n);Ti(i,()=>wl,(e,t)=>{t(e,{class:`fixed inset-0 z-50 bg-black/60`})}),Ti(L(i,2),()=>Fl,(e,t)=>{t(e,{class:`fixed left-1/2 top-1/2 z-50 w-[min(440px,92vw)] -translate-x-1/2 -translate-y-1/2 rounded-xl border bg-card p-5 text-card-foreground shadow-2xl`,children:(e,t)=>{var n=W(),i=I(n),a=e=>{var t=Bl(),n=I(t);{let e=j(()=>`color:${ya(H(r).name)}`);Ti(n,()=>Xs,(t,n)=>{n(t,{class:`font-serif text-xl`,get style(){return H(e)},children:(e,t)=>{Ue();var n=ai();R(()=>K(n,H(r).name)),G(e,n)},$$slots:{default:!0}})})}var i=L(n,2);Ti(i,()=>Dl,(e,t)=>{t(e,{class:`truncate font-mono text-xs text-muted-foreground`,children:(e,t)=>{Ue();var n=ai();R(()=>K(n,H(r).path)),G(e,n)},$$slots:{default:!0}})});var a=L(i,2);yi(a,21,()=>s(H(r)),([e,t])=>e,(e,t)=>{var n=j(()=>h(H(t),2));let r=()=>H(n)[0],i=()=>H(n)[1];var a=zl(),o=F(a),s=F(o,!0);E(o);var c=L(o,2),l=F(c,!0);E(c),E(a),R(()=>{K(s,r()),K(l,i())}),G(e,a)}),E(a),Ti(L(a,2),()=>jl,(e,t)=>{t(e,{class:`mt-4 w-full rounded-md border py-2 text-sm text-muted-foreground transition-colors hover:text-foreground`,children:(e,t)=>{Ue(),G(e,ai(`Close`))},$$slots:{default:!0}})}),G(e,t)};q(i,e=>{H(r)&&e(a)}),G(e,n)},$$slots:{default:!0}})}),G(e,n)},$$slots:{default:!0}})}),G(e,n)},$$slots:{default:!0}})}),G(e,c),k()}Xr([`click`]);var Ul=U(`<div class="flex items-baseline justify-between font-mono text-sm"><span class="text-muted-foreground"> </span> <span class="tabular-nums text-foreground"> </span></div>`),Wl=U(`<div class="text-sm text-muted-foreground">No graph-tool calls yet.</div>`),Gl=U(`<div class="font-mono text-2xl text-foreground"> <span class="text-sm text-muted-foreground">calls</span></div> <div class="flex flex-col gap-1.5"></div>`,1);function Kl(e,t){O(t,!0);let n=j(()=>{let e=X.data?.global?.tool_calls??{};return Object.entries(e).sort((e,t)=>t[1]-e[1]).slice(0,8)}),r=j(()=>X.data?.global?.total_tool_calls??0);Xa(e,{title:`Graph tools used`,meta:`all projects`,children:(e,t)=>{var i=Gl(),a=I(i),o=F(a);Ue(),E(a);var s=L(a,2);yi(s,21,()=>H(n),([e,t])=>e,(e,t)=>{var n=j(()=>h(H(t),2));let r=()=>H(n)[0],i=()=>H(n)[1];var a=Ul(),o=F(a),s=F(o,!0);E(o);var c=L(o,2),l=F(c,!0);E(c),E(a),R(()=>{K(s,r()),K(l,i())}),G(e,a)},e=>{G(e,Wl())}),E(s),R(e=>K(o,`${e??``} `),[()=>Z(H(r))]),G(e,i)},$$slots:{default:!0}}),k()}var ql=U(`<tr class="border-t border-border/60"><td class="py-1.5 pr-2 text-muted-foreground"> </td><td class="max-w-[120px] truncate py-1.5 pr-2 text-foreground"> </td><td class="py-1.5 pr-2"><span class="inline-flex items-center gap-1.5 rounded px-1.5 py-0.5"><span class="size-1.5 rounded-sm"></span> </span></td><td class="py-1.5 pr-2 text-right tabular-nums text-foreground"> </td><td class="py-1.5 pr-2 text-right tabular-nums text-foreground"> </td><td class="py-1.5 pr-2 text-right tabular-nums text-muted-foreground"> </td><td class="py-1.5 text-right tabular-nums text-[var(--money)]"> </td></tr>`),Jl=U(`<tr><td colspan="7" class="py-6 text-center text-muted-foreground">No turns recorded yet.</td></tr>`),Yl=U(`<div class="flex items-center justify-end gap-3 pt-1 font-mono text-sm text-muted-foreground"><button class="rounded border px-2 py-1 disabled:opacity-40 enabled:hover:text-foreground">\u2039 Prev</button> <span> </span> <button class="rounded border px-2 py-1 disabled:opacity-40 enabled:hover:text-foreground">Next \u203A</button></div>`),Xl=U(`<div class="min-h-0 flex-1 overflow-x-auto"><table class="w-full border-collapse font-mono text-sm"><thead><tr class="text-left text-[10px] uppercase tracking-[0.1em] text-muted-foreground"><th class="py-1.5 pr-2 font-medium">Time</th><th class="py-1.5 pr-2 font-medium">Project</th><th class="py-1.5 pr-2 font-medium">Model</th><th class="py-1.5 pr-2 text-right font-medium">In</th><th class="py-1.5 pr-2 text-right font-medium">Out</th><th class="py-1.5 pr-2 text-right font-medium">Cache R/W</th><th class="py-1.5 text-right font-medium">Cost</th></tr></thead><tbody></tbody></table></div> <!>`,1);function Zl(e,t){O(t,!0);let n=N(1),r=j(()=>X.data?.recent_turns??[]),i=j(()=>Math.max(1,Math.ceil(H(r).length/25)));Rn(()=>{H(n)>H(i)&&P(n,H(i),!0)});let a=j(()=>H(r).slice((H(n)-1)*25,(H(n)-1)*25+25)),o=j(()=>H(r).length?(H(n)-1)*25+1:0),s=j(()=>Math.min(H(n)*25,H(r).length));{let t=j(()=>`showing ${H(o)}\u2013${H(s)} of ${H(r).length}`);Xa(e,{title:`Recent turns`,get meta(){return H(t)},children:(e,t)=>{var r=Xl(),o=I(r),s=F(o),c=L(F(s));yi(c,21,()=>H(a),e=>e.ts+e.project_path+e.model,(e,t)=>{var n=ql(),r=F(n),i=F(r,!0);E(r);var a=L(r),o=F(a,!0);E(a);var s=L(a),c=F(s),l=F(c),u=L(l);E(c),E(s);var d=L(s),f=F(d,!0);E(d);var p=L(d),m=F(p,!0);E(p);var h=L(p),g=F(h);E(h);var _=L(h),v=F(_,!0);E(_),E(n),R((e,n,r,s,d,p,h,_,y)=>{K(i,e),Qi(a,`title`,H(t).project_name),K(o,H(t).project_name),Ri(c,n),Ri(l,r),K(u,` ${s??``}`),K(f,d),K(m,p),K(g,`${h??``} / ${_??``}`),K(v,y)},[()=>ma(H(t).ts),()=>`color: var(--c-${ha(H(t).model)})`,()=>`background: var(--c-${ha(H(t).model)})`,()=>ga(H(t).model),()=>Z(H(t).input),()=>Z(H(t).output),()=>Z(H(t).cache_read),()=>Z(H(t).cache_create),()=>pa(H(t).cost_usd)]),G(e,n)},e=>{G(e,Jl())}),E(c),E(s),E(o);var l=L(o,2),u=e=>{var t=Yl(),r=F(t),a=L(r,2),o=F(a);E(a);var s=L(a,2);E(t),R(()=>{r.disabled=H(n)<=1,K(o,`page ${H(n)??``} of ${H(i)??``}`),s.disabled=H(n)>=H(i)}),Yr(`click`,r,()=>P(n,Math.max(1,H(n)-1),!0)),Yr(`click`,s,()=>P(n,Math.min(H(i),H(n)+1),!0)),G(e,t)};q(l,e=>{H(i)>1&&e(u)}),G(e,r)},$$slots:{default:!0}})}k()}Xr([`click`]);var Ql=U(`<div class="font-mono text-xs text-muted-foreground" title="Codebase exploration via the terminal (rg / cat / find) \u2014 observe-only, not yet blocked"> <span> </span></div>`),$l=U(`<div class="flex items-baseline gap-2 font-mono text-xs"><span class="shrink-0 text-muted-foreground"> </span> <span> </span> <span class="truncate text-foreground/80"> </span></div>`),eu=U(`<div class="text-sm text-muted-foreground">No gate decisions yet.</div>`),tu=U(`<div class="mt-2 border-t border-border pt-2 text-[10px] uppercase tracking-wide text-muted-foreground">Terminal hunts (observe-only)</div> <!>`,1),nu=U(`<div class="font-mono text-2xl text-foreground"> <span class="text-sm text-muted-foreground">blocks</span></div> <!> <div class="flex min-h-0 flex-1 flex-col gap-1 overflow-y-auto"><!> <!></div>`,1);function ru(e,t){O(t,!0);let n=j(()=>(X.data?.recent_gates??[]).slice(0,50)),r=j(()=>X.data?.global?.blocked_count??0),i=j(()=>X.data?.global?.bash_explorations??0),a=j(()=>X.data?.global?.bash_avoidable??0),o=j(()=>(X.data?.recent_bash??[]).slice(0,12));Xa(e,{title:`The Moat`,meta:`PreToolUse`,children:(e,t)=>{var s=nu(),c=I(s),l=F(c);Ue(),E(c);var u=L(c,2),d=e=>{var t=Ql(),n=F(t),r=L(n),o=F(r);E(r),E(t),R((e,t)=>{K(n,`\u21B3 ${e??``} terminal hunts \xB7 `),Ii(r,1,Ai(H(a)>0?`text-destructive`:``)),K(o,`${t??``} the graph could answer`)},[()=>Z(H(i)),()=>Z(H(a))]),G(e,t)};q(u,e=>{H(i)>0&&e(d)});var f=L(u,2),p=F(f);yi(p,17,()=>H(n),e=>e.ts+e.query,(e,t)=>{var n=$l(),r=F(n),i=F(r,!0);E(r);var a=L(r,2),o=F(a,!0);E(a);var s=L(a,2),c=F(s,!0);E(s),E(n),R(e=>{K(i,e),Ii(a,1,`shrink-0 rounded px-1 text-[10px] uppercase `+(H(t).decision===`block`?`bg-destructive/15 text-destructive`:`bg-[var(--c-fable)]/12 text-[var(--c-fable)]`)),K(o,H(t).decision),Qi(s,`title`,H(t).query??``),K(c,H(t).query??`\u2014`)},[()=>ma(H(t).ts)]),G(e,n)},e=>{G(e,eu())});var m=L(p,2),h=e=>{var t=tu();yi(L(I(t),2),17,()=>H(o),e=>e.ts+e.query,(e,t)=>{var n=$l(),r=F(n),i=F(r,!0);E(r);var a=L(r,2),o=F(a,!0);E(a);var s=L(a,2),c=F(s,!0);E(s),E(n),R(e=>{K(i,e),Ii(a,1,`shrink-0 rounded px-1 text-[10px] uppercase `+(H(t).avoidable?`bg-destructive/15 text-destructive`:`bg-muted text-muted-foreground`)),K(o,H(t).tool),Qi(s,`title`,H(t).query??``),K(c,H(t).query??`\u2014`)},[()=>ma(H(t).ts)]),G(e,n)}),G(e,t)};q(m,e=>{H(o).length>0&&e(h)}),E(f),R(e=>K(l,`${e??``} `),[()=>Z(H(r))]),G(e,s)},$$slots:{default:!0}}),k()}var iu=U(`<div class="flex items-baseline justify-between gap-3 font-mono text-sm"><span class="truncate text-muted-foreground"> </span> <span class="tabular-nums text-foreground"> </span></div>`),au=U(`<div class="text-sm text-muted-foreground">No usage learned yet \u2014 Synthra learns as you read/edit files.</div>`),ou=U(`<div class="font-mono text-2xl text-foreground"> <span class="text-sm text-muted-foreground">tracked</span></div> <div class="flex max-h-[190px] flex-col gap-1.5 overflow-y-auto"></div>`,1);function su(e,t){O(t,!0);let n=j(()=>X.data?.active),r=j(()=>H(n)?.stats?.hot_files??[]);{let t=j(()=>H(n)?.project_name??`active project`);Xa(e,{title:`Hot files`,get meta(){return H(t)},children:(e,t)=>{var i=ou(),a=I(i),o=F(a);Ue(),E(a);var s=L(a,2);yi(s,21,()=>H(r),e=>e.path,(e,t)=>{var n=iu(),r=F(n),i=F(r,!0);E(r);var a=L(r,2),o=F(a,!0);E(a),E(n),R(e=>{Qi(n,`title`,H(t).path),K(i,e),K(o,H(t).score)},[()=>_a(H(t).path)]),G(e,n)},e=>{G(e,au())}),E(s),R(e=>K(o,`${e??``} `),[()=>Z(H(n)?.stats?.hot_files_total??0)]),G(e,i)},$$slots:{default:!0}})}k()}var cu=U(`<div class="grid grid-cols-1 gap-4 p-5 lg:grid-cols-3"><div class="lg:col-span-3 lg:row-start-1"><!></div> <div class="lg:col-start-1 lg:row-start-2"><!></div> <div class="lg:col-start-2 lg:row-start-2"><!></div> <div class="lg:col-start-1 lg:row-start-3"><!></div> <div class="lg:col-start-2 lg:row-start-3"><!></div> <div class="lg:col-start-1 lg:row-start-4"><!></div> <div class="lg:col-start-2 lg:row-start-4"><!></div> <div class="relative lg:col-start-3 lg:row-start-2 lg:row-span-3"><div class="lg:absolute lg:inset-0"><!></div></div> <div class="lg:col-span-3 lg:row-start-5"><!></div></div>`);function lu(e){var t=cu(),n=F(t);Ka(F(n),{}),E(n);var r=L(n,2);Qa(F(r),{}),E(r);var i=L(r,2);eo(F(i),{}),E(i);var a=L(i,2);ao(F(a),{}),E(a);var o=L(a,2);su(F(o),{}),E(o);var s=L(o,2);Hl(F(s),{}),E(s);var c=L(s,2);Kl(F(c),{}),E(c);var l=L(c,2),u=F(l);ru(F(u),{}),E(u),E(l);var d=L(l,2);Zl(F(d),{}),E(d),E(t),G(e,t)}var uu=U(`<p> </p>`),du=U(`<div class="break-all"><span class="text-foreground/70"> </span> </div>`),fu=U(`<div class="mt-1 flex flex-col gap-0.5 font-mono text-xs text-muted-foreground/80"></div>`),pu=U(`<button class="flex flex-col gap-1.5 rounded-lg border bg-card/55 p-3 text-left transition-colors hover:bg-card/85"><div class="flex items-center gap-2"><span class="min-w-0 flex-1 truncate font-mono text-sm text-foreground"> </span> <span> </span></div> <!> <!></button>`);function mu(e,t){O(t,!0);let n=N(!1),r=j(()=>t.item.scope===`plugin`?t.item.source??`plugin`:t.item.scope),i=j(()=>t.item.scope===`project`?`var(--c-fable)`:t.item.scope===`personal`?`var(--c-sonnet)`:`#9bc2ef`),a=j(()=>Object.entries(t.item.meta??{}));var o=pu(),s=F(o),c=F(s),l=F(c,!0);E(c);var u=L(c,2);let d;var f=F(u);E(u),E(s);var p=L(s,2),m=e=>{var r=uu(),i=F(r,!0);E(r),R(()=>{Ii(r,1,`text-sm leading-snug text-muted-foreground `+(H(n)?``:`line-clamp-2`)),K(i,t.item.description)}),G(e,r)};q(p,e=>{t.item.description&&e(m)});var g=L(p,2),_=e=>{var t=fu();yi(t,21,()=>H(a),([e,t])=>e,(e,t)=>{var n=j(()=>h(H(t),2));let r=()=>H(n)[0],i=()=>H(n)[1];var a=du(),o=F(a),s=F(o);E(o);var c=L(o);E(a),R(()=>{K(s,`${r()??``}:`),K(c,` ${i()??``}`)}),G(e,a)}),E(t),G(e,t)};q(g,e=>{H(n)&&H(a).length&&e(_)}),E(o),R(()=>{K(l,t.item.name),d=Ii(u,1,`shrink-0 rounded border px-1.5 py-0.5 font-mono text-[9px] uppercase tracking-wide`,null,d,{"opacity-50":t.item.enabled===!1}),Ri(u,`color:${H(i)}; border-color:color-mix(in oklab, ${H(i)} 35%, transparent)`),K(f,`${H(r)??``}${t.item.enabled===!1?` \xB7 off`:``}`)}),Yr(`click`,o,()=>P(n,!H(n))),G(e,o),k()}Xr([`click`]);var hu=U(`<span> </span>`),gu=U(`<button> <span class="opacity-60"> </span></button>`),_u=U(`<div class="text-sm text-muted-foreground">Scanning your arsenal\u2026</div>`),vu=U(`<div class="text-sm text-muted-foreground"> </div>`),yu=U(`<section class="flex flex-col gap-2"><div class="flex items-center gap-3 border-b border-border pb-1.5"><span class="size-1.5 shrink-0 rounded-sm"></span> <span class="font-mono text-xs uppercase tracking-[0.14em]"> </span> <span class="font-mono text-xs tracking-[0.1em] text-muted-foreground"> </span></div> <div class="grid grid-cols-1 gap-2 md:grid-cols-2 2xl:grid-cols-3"></div></section>`),bu=U(`<div class="flex flex-col gap-6"></div>`),xu=U(`<div class="flex h-full flex-col gap-4 p-5"><div class="flex flex-wrap items-center justify-between gap-3"><h1 class="font-serif text-2xl text-foreground">\u2694 Arsenal</h1> <div class="flex items-center gap-2 font-mono text-xs text-muted-foreground"><!> <button class="rounded border px-2 py-1 transition-colors hover:text-foreground">\u21BB Rescan</button></div></div> <div class="flex flex-wrap items-center gap-2"><!> <input placeholder="Filter by name or description\u2026" autocomplete="off" class="ml-auto w-full max-w-72 rounded-md border bg-card/60 px-3 py-1.5 text-sm outline-none transition-colors focus:border-ring"/></div> <!></div>`);function Su(e,t){O(t,!0);let n=N(`skills`),r=N(``),i=j(()=>X.arsenal),a=[{id:`skills`,label:`Skills`},{id:`agents`,label:`Agents`},{id:`mcp`,label:`MCP`}],o=j(()=>{let e=H(i)?H(i)[H(n)]:[],t=H(r).toLowerCase().trim();return t?e.filter(e=>e.name.toLowerCase().includes(t)||(e.description??``).toLowerCase().includes(t)||(e.source??``).toLowerCase().includes(t)):e}),s=j(()=>{let e=new Map;for(let t of H(o)){let n=t.scope===`plugin`?`plugin:${t.source??`plugin`}`:t.scope,r=e.get(n);r||(r={label:t.scope===`plugin`?t.source??`plugin`:t.scope===`project`?`In this project`:`Personal \xB7 this machine`,scope:t.scope,items:[]},e.set(n,r)),r.items.push(t)}return[...e.values()]});function c(e){return e===`project`?`var(--c-fable)`:e===`personal`?`var(--c-sonnet)`:`#9bc2ef`}let l=j(()=>H(i)?new Date(H(i).scanned_at).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`}):``);var u=xu(),d=F(u),f=L(F(d),2),p=F(f),m=e=>{var t=hu(),n=F(t);E(t),R(()=>K(n,`${H(i).counts.plugins??``} plugins \xB7 scanned ${H(l)??``}`)),G(e,t)};q(p,e=>{H(i)&&e(m)});var h=L(p,2);E(f),E(d);var g=L(d,2),_=F(g);yi(_,17,()=>a,e=>e.id,(e,t)=>{var r=gu(),a=F(r),o=L(a),s=F(o,!0);E(o),E(r),R(()=>{Ii(r,1,`rounded-lg px-3 py-1.5 font-mono text-xs transition-colors `+(H(n)===H(t).id?`bg-accent text-accent-foreground`:`text-muted-foreground hover:text-foreground`)),K(a,`${H(t).label??``} `),K(s,H(i)?.counts?.[H(t).id]??0)}),Yr(`click`,r,()=>P(n,H(t).id,!0)),G(e,r)});var v=L(_,2);Xi(v),E(g);var y=L(g,2),b=e=>{G(e,_u())},ee=e=>{var t=vu(),n=F(t,!0);E(t),R(()=>K(n,H(r)?`No matches.`:`Nothing installed in this category.`)),G(e,t)},x=e=>{var t=bu();yi(t,21,()=>H(s),e=>e.label+e.scope,(e,t)=>{var n=yu(),r=F(n),i=F(r),a=L(i,2),o=F(a,!0);E(a);var s=L(a,2),l=F(s,!0);E(s),E(r);var u=L(r,2);yi(u,21,()=>H(t).items,e=>e.scope+(e.source??``)+e.name,(e,t)=>{mu(e,{get item(){return H(t)}})}),E(u),E(n),R((e,n)=>{Ri(i,e),Ri(a,n),K(o,H(t).label),K(l,H(t).items.length)},[()=>`background:${c(H(t).scope)}`,()=>`color:${c(H(t).scope)}`]),G(e,n)}),E(t),G(e,t)};q(y,e=>{X.arsenalLoading&&!H(i)?e(b):H(s).length?e(x,-1):e(ee,1)}),E(u),Yr(`click`,h,()=>X.loadArsenal(!0)),ia(v,()=>H(r),e=>P(r,e)),G(e,u),k()}Xr([`click`]);var Cu=U(`<details class="rounded-lg border bg-card/50 p-3"><summary class="cursor-pointer text-sm font-medium text-foreground"> </summary> <p class="mt-2 text-[13px] leading-relaxed text-muted-foreground"> </p></details>`),wu=U(`<!> <!> <div class="mt-4 flex flex-col gap-2"></div> <!>`,1),Tu=U(`<!> <!>`,1);function Eu(e,t){O(t,!0);let n=Y(t,`open`,15,!1),r=[{q:`Where do these numbers come from?`,a:`Synthra\'s Stop hook reads Claude Code\'s transcript JSONL after each turn and logs token usage to .synthra-graph/token_log.jsonl. The gate logs to gate_log.jsonl, tool calls to tool_log.jsonl. The dashboard reads those \u2014 it never feeds back into retrieval.`},{q:`How is cost calculated?`,a:`Token counts \xD7 Anthropic\'s published per-model rates (in src/shared/pricing.ts), summed across input, output, cache-read and cache-write. These are API-equivalent estimates, not your plan billing \u2014 useful for comparing sessions.`},{q:`What is the savings floor?`,a:`Each time the Moat blocks an exploratory Grep/Glob, we credit a deliberately conservative 500 tokens \xD7 $3/M input rate. Real savings are usually higher (it ignores cache thrash and follow-up reads the block also prevents). It\'s a floor, not a guess.`},{q:`What is the Moat?`,a:`A PreToolUse hook that intercepts Grep/Glob and, when the graph has confident context, blocks them and hands back the exact graph_read targets + signatures \u2014 so the agent reads ~50-token slices instead of whole files.`},{q:`What is the Arsenal view?`,a:`A scan of every skill, subagent, and MCP server available to you \u2014 project, personal (~/.claude), and plugin \u2014 with descriptions, so you never have to drop to the CLI to recall what\'s installed. MCP entries show name/type/url only; auth tokens are never read.`},{q:`What\'s the codebase graph?`,a:`tree-sitter parses your project into a symbol graph (files, symbols, imports, call edges). graph_read returns a symbol\'s source plus its dependency surface; graph_continue packs a context bundle.`},{q:`Where is everything stored?`,a:`.synthra-graph/ (machine-local, gitignored) holds the graph + logs; .synthra/ (git-tracked) holds branch-aware memory. Nothing leaves your machine.`},{q:`Why is my bill not lower already?`,a:`Savings land only when the agent actually uses the cheap path. v0.4\u20130.6 push the answer to the point of use (block payloads, edit recipes, dependency footers); a real dogfood session on the latest version is the true test.`}];var i=W();Ti(I(i),()=>Ol,(e,t)=>{t(e,{get open(){return n()},set open(e){n(e)},children:(e,t)=>{var n=W();Ti(I(n),()=>ic,(e,t)=>{t(e,{children:(e,t)=>{var n=Tu(),i=I(n);Ti(i,()=>wl,(e,t)=>{t(e,{class:`fixed inset-0 z-50 bg-black/60`})}),Ti(L(i,2),()=>Fl,(e,t)=>{t(e,{class:`fixed left-1/2 top-1/2 z-50 max-h-[85vh] w-[min(640px,92vw)] -translate-x-1/2 -translate-y-1/2 overflow-y-auto rounded-xl border bg-card p-6 text-card-foreground shadow-2xl`,children:(e,t)=>{var n=wu(),i=I(n);Ti(i,()=>Xs,(e,t)=>{t(e,{class:`font-serif text-2xl`,children:(e,t)=>{Ue(),G(e,ai(`FAQ`))},$$slots:{default:!0}})});var a=L(i,2);Ti(a,()=>Dl,(e,t)=>{t(e,{class:`text-xs text-muted-foreground`,children:(e,t)=>{Ue(),G(e,ai(`Where every number on this dashboard comes from.`))},$$slots:{default:!0}})});var o=L(a,2);yi(o,21,()=>r,e=>e.q,(e,t)=>{var n=Cu(),r=F(n),i=F(r,!0);E(r);var a=L(r,2),o=F(a,!0);E(a),E(n),R(()=>{K(i,H(t).q),K(o,H(t).a)}),G(e,n)}),E(o),Ti(L(o,2),()=>jl,(e,t)=>{t(e,{class:`mt-4 w-full rounded-md border py-2 text-sm text-muted-foreground transition-colors hover:text-foreground`,children:(e,t)=>{Ue(),G(e,ai(`Close`))},$$slots:{default:!0}})}),G(e,n)},$$slots:{default:!0}})}),G(e,n)},$$slots:{default:!0}})}),G(e,n)},$$slots:{default:!0}})}),G(e,i),k()}var Du=U(`<div class="flex h-screen w-screen overflow-hidden"><!> <main class="min-w-0 flex-1 overflow-y-auto"><!></main></div> <!>`,1);function Ou(e,t){O(t,!0);let n=N(!1);da(()=>(X.start(),()=>X.stop()));var r=Du(),i=I(r),a=F(i);Ua(a,{onFaq:()=>P(n,!0)});var o=L(a,2),s=F(o),c=e=>{lu(e,{})},l=e=>{Su(e,{})};q(s,e=>{X.view===`overview`?e(c):e(l,-1)}),E(o),E(i),Eu(L(i,2),{get open(){return H(n)},set open(e){P(n,e,!0)}}),G(e,r),k()}var ku=document.getElementById(`app`);if(!ku)throw Error(`missing #app mount node`);si(Ou,{target:ku});</script>\n <style rel="stylesheet" crossorigin>/*! tailwindcss v4.3.1 | MIT License | https://tailwindcss.com */\n@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial;--tw-animation-delay:0s;--tw-animation-direction:normal;--tw-animation-duration:initial;--tw-animation-fill-mode:none;--tw-animation-iteration-count:1;--tw-enter-blur:0;--tw-enter-opacity:1;--tw-enter-rotate:0;--tw-enter-scale:1;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-exit-blur:0;--tw-exit-opacity:1;--tw-exit-rotate:0;--tw-exit-scale:1;--tw-exit-translate-x:0;--tw-exit-translate-y:0}}}@layer theme{:root,:host{--font-sans:var(--font-sans);--font-serif:var(--font-serif);--font-mono:var(--font-mono);--color-black:#000;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--text-3xl:1.875rem;--text-3xl--line-height:calc(2.25 / 1.875);--font-weight-medium:500;--tracking-wide:.025em;--leading-snug:1.375;--leading-relaxed:1.625;--radius-xl:.75rem;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*{border-color:var(--border)}html,body{height:100%}body{background:radial-gradient(1200px 800px at 14% 16%, #2c5db81f, transparent 60%), var(--background);color:var(--foreground);font-family:var(--font-sans);-webkit-font-smoothing:antialiased}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-thumb{background:var(--border);border-radius:999px}::-webkit-scrollbar-track{background:0 0}}@layer components;@layer utilities{.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.inset-0{inset:0}.top-1\\/2{top:50%}.left-1\\/2{left:50%}.z-50{z-index:50}.my-1{margin-block:var(--spacing)}.mt-1{margin-top:var(--spacing)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-4{margin-top:calc(var(--spacing) * 4)}.ml-auto{margin-left:auto}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.flex{display:flex}.grid{display:grid}.inline{display:inline}.inline-flex{display:inline-flex}.size-1\\.5{width:calc(var(--spacing) * 1.5);height:calc(var(--spacing) * 1.5)}.size-2{width:calc(var(--spacing) * 2);height:calc(var(--spacing) * 2)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-8{width:calc(var(--spacing) * 8);height:calc(var(--spacing) * 8)}.size-\\[116px\\]{width:116px;height:116px}.size-full{width:100%;height:100%}.h-1{height:var(--spacing)}.h-2{height:calc(var(--spacing) * 2)}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-\\[85vh\\]{max-height:85vh}.max-h-\\[190px\\]{max-height:190px}.max-h-\\[260px\\]{max-height:260px}.min-h-0{min-height:0}.w-9{width:calc(var(--spacing) * 9)}.w-\\[64px\\]{width:64px}.w-\\[248px\\]{width:248px}.w-\\[min\\(440px\\,92vw\\)\\]{width:min(440px,92vw)}.w-\\[min\\(640px\\,92vw\\)\\]{width:min(640px,92vw)}.w-full{width:100%}.w-screen{width:100vw}.max-w-72{max-width:calc(var(--spacing) * 72)}.max-w-\\[120px\\]{max-width:120px}.min-w-0{min-width:0}.flex-1{flex:1}.shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.-translate-x-1\\/2{--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.-rotate-90{rotate:-90deg}.animate-pulse{animation:var(--animate-pulse)}.cursor-pointer{cursor:pointer}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.place-items-center{place-items:center}.items-baseline{align-items:baseline}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0\\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-6{gap:calc(var(--spacing) * 6)}.gap-px{gap:1px}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-border,.border-border\\/60{border-color:var(--border)}@supports (color:color-mix(in lab, red, red)){.border-border\\/60{border-color:color-mix(in oklab, var(--border) 60%, transparent)}}.border-sidebar-border{border-color:var(--sidebar-border)}.bg-\\[var\\(--c-fable\\)\\],.bg-\\[var\\(--c-fable\\)\\]\\/12{background-color:var(--c-fable)}@supports (color:color-mix(in lab, red, red)){.bg-\\[var\\(--c-fable\\)\\]\\/12{background-color:color-mix(in oklab, var(--c-fable) 12%, transparent)}}.bg-\\[var\\(--money\\)\\]{background-color:var(--money)}.bg-accent{background-color:var(--accent)}.bg-black\\/60{background-color:#0009}@supports (color:color-mix(in lab, red, red)){.bg-black\\/60{background-color:color-mix(in oklab, var(--color-black) 60%, transparent)}}.bg-border{background-color:var(--border)}.bg-card,.bg-card\\/50{background-color:var(--card)}@supports (color:color-mix(in lab, red, red)){.bg-card\\/50{background-color:color-mix(in oklab, var(--card) 50%, transparent)}}.bg-card\\/55{background-color:var(--card)}@supports (color:color-mix(in lab, red, red)){.bg-card\\/55{background-color:color-mix(in oklab, var(--card) 55%, transparent)}}.bg-card\\/60{background-color:var(--card)}@supports (color:color-mix(in lab, red, red)){.bg-card\\/60{background-color:color-mix(in oklab, var(--card) 60%, transparent)}}.bg-card\\/70{background-color:var(--card)}@supports (color:color-mix(in lab, red, red)){.bg-card\\/70{background-color:color-mix(in oklab, var(--card) 70%, transparent)}}.bg-destructive,.bg-destructive\\/15{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.bg-destructive\\/15{background-color:color-mix(in oklab, var(--destructive) 15%, transparent)}}.bg-muted{background-color:var(--muted)}.bg-muted-foreground,.bg-muted-foreground\\/40{background-color:var(--muted-foreground)}@supports (color:color-mix(in lab, red, red)){.bg-muted-foreground\\/40{background-color:color-mix(in oklab, var(--muted-foreground) 40%, transparent)}}.bg-primary\\/90{background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.bg-primary\\/90{background-color:color-mix(in oklab, var(--primary) 90%, transparent)}}.bg-sidebar{background-color:var(--sidebar)}.bg-sidebar-accent,.bg-sidebar-accent\\/40{background-color:var(--sidebar-accent)}@supports (color:color-mix(in lab, red, red)){.bg-sidebar-accent\\/40{background-color:color-mix(in oklab, var(--sidebar-accent) 40%, transparent)}}.bg-sidebar-border{background-color:var(--sidebar-border)}.p-2\\.5{padding:calc(var(--spacing) * 2.5)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.px-1{padding-inline:var(--spacing)}.px-1\\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.py-0\\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-6{padding-block:calc(var(--spacing) * 6)}.pt-1{padding-top:var(--spacing)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pr-1{padding-right:var(--spacing)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pb-1\\.5{padding-bottom:calc(var(--spacing) * 1.5)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.font-serif{font-family:var(--font-serif)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[9px\\]{font-size:9px}.text-\\[10px\\]{font-size:10px}.text-\\[13px\\]{font-size:13px}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.tracking-\\[0\\.1em\\]{--tw-tracking:.1em;letter-spacing:.1em}.tracking-\\[0\\.12em\\]{--tw-tracking:.12em;letter-spacing:.12em}.tracking-\\[0\\.14em\\]{--tw-tracking:.14em;letter-spacing:.14em}.tracking-\\[0\\.18em\\]{--tw-tracking:.18em;letter-spacing:.18em}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.break-all{word-break:break-all}.text-\\[var\\(--c-fable\\)\\]{color:var(--c-fable)}.text-\\[var\\(--money\\)\\]{color:var(--money)}.text-accent-foreground{color:var(--accent-foreground)}.text-card-foreground{color:var(--card-foreground)}.text-destructive{color:var(--destructive)}.text-foreground,.text-foreground\\/70{color:var(--foreground)}@supports (color:color-mix(in lab, red, red)){.text-foreground\\/70{color:color-mix(in oklab, var(--foreground) 70%, transparent)}}.text-foreground\\/80{color:var(--foreground)}@supports (color:color-mix(in lab, red, red)){.text-foreground\\/80{color:color-mix(in oklab, var(--foreground) 80%, transparent)}}.text-muted-foreground,.text-muted-foreground\\/80{color:var(--muted-foreground)}@supports (color:color-mix(in lab, red, red)){.text-muted-foreground\\/80{color:color-mix(in oklab, var(--muted-foreground) 80%, transparent)}}.text-primary-foreground{color:var(--primary-foreground)}.text-sidebar-accent-foreground{color:var(--sidebar-accent-foreground)}.text-sidebar-foreground,.text-sidebar-foreground\\/60{color:var(--sidebar-foreground)}@supports (color:color-mix(in lab, red, red)){.text-sidebar-foreground\\/60{color:color-mix(in oklab, var(--sidebar-foreground) 60%, transparent)}}.text-sidebar-foreground\\/75{color:var(--sidebar-foreground)}@supports (color:color-mix(in lab, red, red)){.text-sidebar-foreground\\/75{color:color-mix(in oklab, var(--sidebar-foreground) 75%, transparent)}}.uppercase{text-transform:uppercase}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.transition-\\[width\\]{transition-property:width;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.outline-none{--tw-outline-style:none;outline-style:none}@media (hover:hover){.hover\\:bg-card\\/80:hover{background-color:var(--card)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-card\\/80:hover{background-color:color-mix(in oklab, var(--card) 80%, transparent)}}.hover\\:bg-card\\/85:hover{background-color:var(--card)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-card\\/85:hover{background-color:color-mix(in oklab, var(--card) 85%, transparent)}}.hover\\:bg-sidebar-accent\\/50:hover{background-color:var(--sidebar-accent)}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-sidebar-accent\\/50:hover{background-color:color-mix(in oklab, var(--sidebar-accent) 50%, transparent)}}.hover\\:text-foreground:hover{color:var(--foreground)}.hover\\:text-sidebar-foreground:hover{color:var(--sidebar-foreground)}}.focus\\:border-ring:focus{border-color:var(--ring)}@media (hover:hover){.enabled\\:hover\\:text-foreground:enabled:hover{color:var(--foreground)}}.disabled\\:opacity-40:disabled{opacity:.4}@media (width>=40rem){.sm\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (width>=48rem){.md\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (width>=64rem){.lg\\:absolute{position:absolute}.lg\\:inset-0{inset:0}.lg\\:col-span-3{grid-column:span 3/span 3}.lg\\:col-start-1{grid-column-start:1}.lg\\:col-start-2{grid-column-start:2}.lg\\:col-start-3{grid-column-start:3}.lg\\:row-span-3{grid-row:span 3/span 3}.lg\\:row-start-1{grid-row-start:1}.lg\\:row-start-2{grid-row-start:2}.lg\\:row-start-3{grid-row-start:3}.lg\\:row-start-4{grid-row-start:4}.lg\\:row-start-5{grid-row-start:5}.lg\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}}@media (width>=96rem){.\\32 xl\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}}@property --tw-animation-delay{syntax:"*";inherits:false;initial-value:0s}@property --tw-animation-direction{syntax:"*";inherits:false;initial-value:normal}@property --tw-animation-duration{syntax:"*";inherits:false}@property --tw-animation-fill-mode{syntax:"*";inherits:false;initial-value:none}@property --tw-animation-iteration-count{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-translate-y{syntax:"*";inherits:false;initial-value:0}:root{--radius:.75rem;--background:#04081a;--foreground:#ecf2fb;--card:#0a1733;--card-foreground:#ecf2fb;--popover:#0a1733;--popover-foreground:#ecf2fb;--primary:#2c5db8;--primary-foreground:#f4f7fc;--secondary:#122549;--secondary-foreground:#d7e6f7;--muted:#102146;--muted-foreground:#8ba0c2;--accent:#1b3a78;--accent-foreground:#ecf2fb;--destructive:#ff5d5d;--destructive-foreground:#fff5f5;--border:#9bc2ef24;--input:#9bc2ef2e;--ring:#5c8fe6;--sidebar:#081226;--sidebar-foreground:#d7e6f7;--sidebar-primary:#2c5db8;--sidebar-primary-foreground:#f4f7fc;--sidebar-accent:#122549;--sidebar-accent-foreground:#ecf2fb;--sidebar-border:#9bc2ef1f;--sidebar-ring:#5c8fe6;--c-fable:#2ee08f;--c-opus:#ff6338;--c-sonnet:#ffb938;--c-haiku:#7438ff;--c-unknown:#12cbf5;--money:#4ade9b;--font-sans:"Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;--font-serif:"Instrument Serif", "Times New Roman", serif;--font-mono:"Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-duration{syntax:"*";inherits:false}@keyframes pulse{50%{opacity:.5}}\n/*$vite$:1*/</style>\n </head>\n <body>\n <div id="app"></div>\n </body>\n</html>\n';
|
|
727
751
|
|
|
728
752
|
// src/dashboard/public/favicon.svg
|
|
729
753
|
var favicon_default = '<svg width="107" height="107" viewBox="0 0 107 107" fill="none" xmlns="http://www.w3.org/2000/svg">\n<rect x="0.5" y="0.5" width="106" height="106" rx="7.5" fill="url(#paint0_radial_21_11)"/>\n<rect x="0.5" y="0.5" width="106" height="106" rx="7.5" stroke="url(#paint1_linear_21_11)"/>\n<path d="M26.408 72.558C25.5813 72.558 24.6513 72.4753 23.618 72.31C22.626 72.1447 21.6753 71.938 20.766 71.69C19.898 71.442 19.216 71.1733 18.72 70.884C18.4307 70.7187 18.2033 70.5533 18.038 70.388C17.914 70.1813 17.852 69.8507 17.852 69.396L17.542 59.662C17.542 58.8353 17.8107 58.422 18.348 58.422C18.8027 58.422 19.1127 58.794 19.278 59.538L19.836 61.894C21.2413 67.8047 23.866 70.76 27.71 70.76C29.7767 70.76 31.4093 70.078 32.608 68.714C33.848 67.3087 34.468 65.3453 34.468 62.824C34.468 60.3853 33.8273 58.112 32.546 56.004C31.306 53.896 29.3013 51.8087 26.532 49.742C23.4733 47.5513 21.2413 45.4433 19.836 43.418C18.4307 41.3513 17.728 39.1607 17.728 36.846C17.728 33.7873 18.782 31.3487 20.89 29.53C23.0393 27.67 25.7673 26.74 29.074 26.74C30.314 26.74 31.5127 26.8847 32.67 27.174C33.8273 27.4633 34.778 27.8767 35.522 28.414C35.77 28.5793 35.956 28.7653 36.08 28.972C36.2453 29.1787 36.328 29.4473 36.328 29.778L36.514 39.14C36.514 39.8427 36.2453 40.194 35.708 40.194C35.336 40.194 35.0673 39.9047 34.902 39.326L34.468 37.776C33.5587 34.5933 32.608 32.2787 31.616 30.832C30.6653 29.344 29.2807 28.6 27.462 28.6C25.6847 28.6 24.2587 29.1787 23.184 30.336C22.1507 31.4933 21.634 33.126 21.634 35.234C21.634 37.0113 22.2127 38.706 23.37 40.318C24.5273 41.93 26.5527 43.8933 29.446 46.208C32.546 48.7293 34.7987 51.168 36.204 53.524C37.6507 55.8387 38.374 58.3187 38.374 60.964C38.374 63.2787 37.8573 65.304 36.824 67.04C35.7907 68.776 34.3647 70.14 32.546 71.132C30.7687 72.0827 28.7227 72.558 26.408 72.558ZM44.1831 84.71C43.0671 84.71 42.1784 84.3173 41.5171 83.532C40.8558 82.788 40.5251 81.92 40.5251 80.928C40.5251 80.1427 40.7524 79.4813 41.2071 78.944C41.6618 78.4067 42.2818 78.138 43.0671 78.138C43.7284 78.138 44.2038 78.2827 44.4931 78.572C44.7824 78.8613 44.9891 79.192 45.1131 79.564C45.2371 79.936 45.3611 80.2667 45.4851 80.556C45.6091 80.8453 45.8571 80.99 46.2291 80.99C46.6838 80.99 47.0971 80.6593 47.4691 79.998C47.8411 79.378 48.3578 78.0347 49.0191 75.968C49.4324 74.728 49.6804 73.6533 49.7631 72.744C49.8871 71.8347 49.8664 70.8633 49.7011 69.83C49.5771 68.7967 49.2671 67.536 48.7711 66.048L42.0131 44.534C41.7238 43.542 41.4344 42.9013 41.1451 42.612C40.8971 42.3227 40.4838 42.116 39.9051 41.992L38.9751 41.806C38.4378 41.682 38.1691 41.4133 38.1691 41C38.1691 40.5867 38.4584 40.38 39.0371 40.38H49.2671C49.8458 40.38 50.1351 40.5867 50.1351 41C50.1351 41.4547 49.8664 41.7233 49.3291 41.806L48.3371 41.93C47.3451 42.054 46.7044 42.302 46.4151 42.674C46.1671 43.0047 46.1878 43.6247 46.4771 44.534L51.9331 62.7C52.0571 63.1133 52.2431 63.32 52.4911 63.32C52.7804 63.32 52.9871 63.1133 53.1111 62.7L58.3811 45.65C58.7118 44.534 58.7944 43.7073 58.6291 43.17C58.5051 42.5913 57.9264 42.2193 56.8931 42.054L55.5911 41.806C55.0538 41.682 54.7851 41.4133 54.7851 41C54.7851 40.5867 55.0744 40.38 55.6531 40.38H63.5271C64.1058 40.38 64.3951 40.6073 64.3951 41.062C64.3951 41.4753 64.1471 41.7647 63.6511 41.93L63.0931 42.116C62.4731 42.3227 61.9564 42.6947 61.5431 43.232C61.1298 43.7693 60.6958 44.6993 60.2411 46.022L51.0031 74.852C50.0938 77.7453 49.2671 79.8947 48.5231 81.3C47.8204 82.7053 47.1384 83.6147 46.4771 84.028C45.8158 84.4827 45.0511 84.71 44.1831 84.71ZM64.9342 72C64.3142 72 64.0042 71.7727 64.0042 71.318C64.0042 70.946 64.2729 70.698 64.8102 70.574L65.5542 70.45C66.4222 70.2847 66.9802 70.0367 67.2282 69.706C67.5176 69.334 67.6622 68.714 67.6622 67.846V47.014C67.6622 46.27 67.5382 45.774 67.2902 45.526C67.0836 45.2367 66.6909 45.0507 66.1122 44.968L64.8102 44.782C64.2729 44.7407 64.0042 44.5133 64.0042 44.1C64.0042 43.7693 64.3349 43.542 64.9962 43.418C66.2776 43.2113 67.2489 42.8807 67.9102 42.426C68.6129 41.9713 69.3362 41.4133 70.0802 40.752C70.4522 40.38 70.7622 40.194 71.0102 40.194C71.3822 40.194 71.5682 40.442 71.5682 40.938V43.728C71.5682 44.1 71.6922 44.348 71.9402 44.472C72.2296 44.5547 72.5396 44.4307 72.8702 44.1C74.5236 42.5293 75.9702 41.4547 77.2102 40.876C78.4916 40.2973 79.8349 40.008 81.2402 40.008C83.1002 40.008 84.5882 40.6693 85.7042 41.992C86.8202 43.2733 87.3782 45.1747 87.3782 47.696V67.846C87.3782 68.714 87.5022 69.334 87.7502 69.706C88.0396 70.0367 88.6182 70.264 89.4862 70.388L90.8502 70.574C91.3049 70.6567 91.5322 70.9047 91.5322 71.318C91.5322 71.7727 91.2842 72 90.7882 72H80.3722C79.7936 72 79.5042 71.7727 79.5042 71.318C79.5042 70.9047 79.7316 70.6567 80.1862 70.574L81.0542 70.45C81.9222 70.326 82.4802 70.078 82.7282 69.706C83.0176 69.334 83.1622 68.714 83.1622 67.846V48.378C83.1622 46.3527 82.7902 44.9267 82.0462 44.1C81.3022 43.2733 80.2482 42.86 78.8842 42.86C77.5616 42.86 76.3629 43.2527 75.2882 44.038C74.2549 44.782 73.4282 45.7947 72.8082 47.076C72.1882 48.316 71.8782 49.7007 71.8782 51.23V67.846C71.8782 68.714 72.0022 69.334 72.2502 69.706C72.5396 70.078 73.1182 70.3053 73.9862 70.388L75.6602 70.574C76.1149 70.6567 76.3422 70.884 76.3422 71.256C76.3422 71.752 76.0322 72 75.4122 72H64.9342Z" fill="white"/>\n<defs>\n<radialGradient id="paint0_radial_21_11" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(14 16) rotate(43.5498) scale(167.638 156.2)">\n<stop stop-color="#2C5DB8"/>\n<stop offset="1" stop-color="#04081A"/>\n</radialGradient>\n<linearGradient id="paint1_linear_21_11" x1="1.77511" y1="1.50277e-06" x2="105.225" y2="107" gradientUnits="userSpaceOnUse">\n<stop stop-color="#5C8FE6"/>\n<stop offset="1" stop-color="#335080"/>\n</linearGradient>\n</defs>\n</svg>\n';
|