@shahmilsaari/memory-core 1.0.5 → 1.0.7
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/dist/{chunk-WJG77BPO.js → chunk-VF2GJEJP.js} +25 -5
- package/dist/cli.js +2 -2
- package/dist/dashboard/assets/index-CbN3F0rB.js +2 -0
- package/dist/dashboard/index.html +1 -1
- package/dist/{dashboard-server-OEDFMSFB.js → dashboard-server-ONGEIYYG.js} +3 -2
- package/package.json +1 -1
- package/dist/dashboard/assets/index-D7EPH82B.js +0 -2
|
@@ -967,7 +967,7 @@ var seeds = [
|
|
|
967
967
|
import { watch } from "chokidar";
|
|
968
968
|
import { spawnSync } from "child_process";
|
|
969
969
|
import { existsSync as existsSync6, readdirSync as readdirSync3, readFileSync as readFileSync5, statSync as statSync2, writeFileSync as writeFileSync3 } from "fs";
|
|
970
|
-
import { join as join7, relative as relative2, resolve as resolve4, sep } from "path";
|
|
970
|
+
import { dirname as dirname4, join as join7, relative as relative2, resolve as resolve4, sep } from "path";
|
|
971
971
|
import chalk from "chalk";
|
|
972
972
|
|
|
973
973
|
// src/generator.ts
|
|
@@ -2292,6 +2292,28 @@ var SOURCE_EXTENSIONS3 = /\.(ts|tsx|js|jsx|py|php|rb|go|java|cs|swift|kt|rs|vue|
|
|
|
2292
2292
|
var reasonMap = new Map(
|
|
2293
2293
|
seeds.filter((s) => s.reason).map((s) => [s.content, s.reason])
|
|
2294
2294
|
);
|
|
2295
|
+
function findProjectRoot(startPath) {
|
|
2296
|
+
let current = resolve4(startPath);
|
|
2297
|
+
while (true) {
|
|
2298
|
+
if (existsSync6(join7(current, ".memory-core.json"))) return current;
|
|
2299
|
+
const parent = dirname4(current);
|
|
2300
|
+
if (parent === current) return null;
|
|
2301
|
+
current = parent;
|
|
2302
|
+
}
|
|
2303
|
+
}
|
|
2304
|
+
function resolveWatchPaths(pathOption, projectRootOption) {
|
|
2305
|
+
if (projectRootOption) {
|
|
2306
|
+
const projectRoot2 = resolve4(projectRootOption);
|
|
2307
|
+
return {
|
|
2308
|
+
projectRoot: projectRoot2,
|
|
2309
|
+
watchPath: resolve4(projectRoot2, pathOption ?? ".")
|
|
2310
|
+
};
|
|
2311
|
+
}
|
|
2312
|
+
const cwdRoot = resolve4(process.cwd());
|
|
2313
|
+
const watchPath = resolve4(cwdRoot, pathOption ?? ".");
|
|
2314
|
+
const projectRoot = findProjectRoot(watchPath) ?? findProjectRoot(cwdRoot) ?? cwdRoot;
|
|
2315
|
+
return { projectRoot, watchPath };
|
|
2316
|
+
}
|
|
2295
2317
|
function readStatsFile(statsPath) {
|
|
2296
2318
|
if (!existsSync6(statsPath)) return { rules: {}, files: {} };
|
|
2297
2319
|
try {
|
|
@@ -2718,8 +2740,7 @@ ${inputToSend}`;
|
|
|
2718
2740
|
}
|
|
2719
2741
|
}
|
|
2720
2742
|
async function scanFiles(options = {}) {
|
|
2721
|
-
const projectRoot =
|
|
2722
|
-
const watchPath = resolve4(projectRoot, options.path ?? ".");
|
|
2743
|
+
const { projectRoot, watchPath } = resolveWatchPaths(options.path, options.projectRoot);
|
|
2723
2744
|
const config2 = loadConfig(projectRoot);
|
|
2724
2745
|
if (!config2) {
|
|
2725
2746
|
throw new Error("No .memory-core.json found. Run: memory-core init");
|
|
@@ -2758,8 +2779,7 @@ async function scanFiles(options = {}) {
|
|
|
2758
2779
|
return summary;
|
|
2759
2780
|
}
|
|
2760
2781
|
async function startWatch(options = {}) {
|
|
2761
|
-
const projectRoot =
|
|
2762
|
-
const watchPath = resolve4(projectRoot, options.path ?? ".");
|
|
2782
|
+
const { projectRoot, watchPath } = resolveWatchPaths(options.path, options.projectRoot);
|
|
2763
2783
|
const config2 = loadConfig(projectRoot);
|
|
2764
2784
|
const exitOnSetupFailure = options.exitOnSetupFailure ?? true;
|
|
2765
2785
|
if (!config2) {
|
package/dist/cli.js
CHANGED
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
retrieveMemorySelection,
|
|
21
21
|
runMigrations,
|
|
22
22
|
seeds
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-VF2GJEJP.js";
|
|
24
24
|
|
|
25
25
|
// src/cli.ts
|
|
26
26
|
import { Command } from "commander";
|
|
@@ -2127,7 +2127,7 @@ program.command("stats").description("Show violation counters recorded by check
|
|
|
2127
2127
|
}
|
|
2128
2128
|
});
|
|
2129
2129
|
program.command("dashboard").description("Start the live Svelte dashboard with WebSocket watch events").option("-p, --port <port>", "Dashboard port", "5178").option("--path <dir>", "Directory to watch (default: current directory)").option("--no-watch", "Serve the dashboard without starting file watch").action(async (opts) => {
|
|
2130
|
-
const { startDashboard } = await import("./dashboard-server-
|
|
2130
|
+
const { startDashboard } = await import("./dashboard-server-ONGEIYYG.js");
|
|
2131
2131
|
await startDashboard({
|
|
2132
2132
|
port: parseInt(opts.port, 10),
|
|
2133
2133
|
path: opts.path,
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var $l=Object.defineProperty;var zn=e=>{throw TypeError(e)};var Wl=(e,t,s)=>t in e?$l(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var Fe=(e,t,s)=>Wl(e,typeof t!="symbol"?t+"":t,s),ar=(e,t,s)=>t.has(e)||zn("Cannot "+s);var c=(e,t,s)=>(ar(e,t,"read from private field"),s?s.call(e):t.get(e)),C=(e,t,s)=>t.has(e)?zn("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),D=(e,t,s,r)=>(ar(e,t,"write to private field"),r?r.call(e,s):t.set(e,s),s),U=(e,t,s)=>(ar(e,t,"access private method"),s);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))r(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const f of i.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&r(f)}).observe(document,{childList:!0,subtree:!0});function s(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(a){if(a.ep)return;a.ep=!0;const i=s(a);fetch(a.href,i)}})();const ql=!1;var Sr=Array.isArray,Ul=Array.prototype.indexOf,Kt=Array.prototype.includes,zs=Array.from,Vl=Object.defineProperty,us=Object.getOwnPropertyDescriptor,ua=Object.getOwnPropertyDescriptors,zl=Object.prototype,Hl=Array.prototype,Tr=Object.getPrototypeOf,Hn=Object.isExtensible;const Bl=()=>{};function Kl(e){return e()}function ur(e){for(var t=0;t<e.length;t++)e[t]()}function va(){var e,t,s=new Promise((r,a)=>{e=r,t=a});return{promise:s,resolve:e,reject:t}}const le=2,Yt=4,xs=8,da=1<<24,Ye=16,$e=32,dt=64,vr=128,Ae=512,Z=1024,ne=2048,We=4096,fe=8192,Re=16384,It=32768,Bn=1<<25,Gt=65536,dr=1<<17,Yl=1<<18,Xt=1<<19,pa=1<<20,Ke=1<<25,Nt=65536,$s=1<<21,_s=1<<22,ut=1<<23,Tt=Symbol("$state"),Xe=new class extends Error{constructor(){super(...arguments);Fe(this,"name","StaleReactionError");Fe(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};function _a(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Gl(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Jl(e,t,s){throw new Error("https://svelte.dev/e/each_key_duplicate")}function Ql(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Xl(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Zl(e){throw new Error("https://svelte.dev/e/effect_orphan")}function eo(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function to(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function so(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function ro(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function no(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const ao=1,io=2,ha=4,lo=8,oo=16,co=2,te=Symbol(),ga="http://www.w3.org/1999/xhtml";function fo(){console.warn("https://svelte.dev/e/derived_inert")}function uo(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function vo(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function ba(e){return e===this.v}function po(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function ma(e){return!po(e,this.v)}let ks=!1,_o=!1;function ho(){ks=!0}let H=null;function Jt(e){H=e}function ya(e,t=!1,s){H={p:H,i:!1,c:null,e:null,s:e,x:null,r:O,l:ks&&!t?{s:null,u:null,$:[]}:null}}function wa(e){var t=H,s=t.e;if(s!==null){t.e=null;for(var r of s)Ua(r)}return t.i=!0,H=t.p,{}}function Ss(){return!ks||H!==null&&H.l===null}let mt=[];function Ea(){var e=mt;mt=[],ur(e)}function vt(e){if(mt.length===0&&!vs){var t=mt;queueMicrotask(()=>{t===mt&&Ea()})}mt.push(e)}function go(){for(;mt.length>0;)Ea()}function xa(e){var t=O;if(t===null)return I.f|=ut,e;if(!(t.f&It)&&!(t.f&Yt))throw e;ft(e,t)}function ft(e,t){for(;t!==null;){if(t.f&vr){if(!(t.f&It))throw e;try{t.b.error(e);return}catch(s){e=s}}t=t.parent}throw e}const bo=-7169;function G(e,t){e.f=e.f&bo|t}function Ar(e){e.f&Ae||e.deps===null?G(e,Z):G(e,We)}function ka(e){if(e!==null)for(const t of e)!(t.f&le)||!(t.f&Nt)||(t.f^=Nt,ka(t.deps))}function Sa(e,t,s){e.f&ne?t.add(e):e.f&We&&s.add(e),ka(e.deps),G(e,Z)}const bt=new Set;let S=null,re=null,pr=null,vs=!1,ir=!1,qt=null,Ds=null;var Kn=0;let mo=1;var Ut,Vt,wt,Ze,ze,gs,be,bs,ot,et,He,zt,Ht,Et,ee,Os,Ta,Is,_r,Fs,yo;const qs=class qs{constructor(){C(this,ee);Fe(this,"id",mo++);Fe(this,"current",new Map);Fe(this,"previous",new Map);C(this,Ut,new Set);C(this,Vt,new Set);C(this,wt,new Set);C(this,Ze,new Map);C(this,ze,new Map);C(this,gs,null);C(this,be,[]);C(this,bs,[]);C(this,ot,new Set);C(this,et,new Set);C(this,He,new Map);C(this,zt,new Set);Fe(this,"is_fork",!1);C(this,Ht,!1);C(this,Et,new Set)}skip_effect(t){c(this,He).has(t)||c(this,He).set(t,{d:[],m:[]}),c(this,zt).delete(t)}unskip_effect(t,s=r=>this.schedule(r)){var r=c(this,He).get(t);if(r){c(this,He).delete(t);for(var a of r.d)G(a,ne),s(a);for(a of r.m)G(a,We),s(a)}c(this,zt).add(t)}capture(t,s,r=!1){t.v!==te&&!this.previous.has(t)&&this.previous.set(t,t.v),t.f&ut||(this.current.set(t,[s,r]),re==null||re.set(t,s)),this.is_fork||(t.v=s)}activate(){S=this}deactivate(){S=null,re=null}flush(){try{ir=!0,S=this,U(this,ee,Is).call(this)}finally{Kn=0,pr=null,qt=null,Ds=null,ir=!1,S=null,re=null,At.clear()}}discard(){for(const t of c(this,Vt))t(this);c(this,Vt).clear(),c(this,wt).clear(),bt.delete(this)}register_created_effect(t){c(this,bs).push(t)}increment(t,s){let r=c(this,Ze).get(s)??0;if(c(this,Ze).set(s,r+1),t){let a=c(this,ze).get(s)??0;c(this,ze).set(s,a+1)}}decrement(t,s,r){let a=c(this,Ze).get(s)??0;if(a===1?c(this,Ze).delete(s):c(this,Ze).set(s,a-1),t){let i=c(this,ze).get(s)??0;i===1?c(this,ze).delete(s):c(this,ze).set(s,i-1)}c(this,Ht)||r||(D(this,Ht,!0),vt(()=>{D(this,Ht,!1),this.flush()}))}transfer_effects(t,s){for(const r of t)c(this,ot).add(r);for(const r of s)c(this,et).add(r);t.clear(),s.clear()}oncommit(t){c(this,Ut).add(t)}ondiscard(t){c(this,Vt).add(t)}on_fork_commit(t){c(this,wt).add(t)}run_fork_commit_callbacks(){for(const t of c(this,wt))t(this);c(this,wt).clear()}settled(){return(c(this,gs)??D(this,gs,va())).promise}static ensure(){if(S===null){const t=S=new qs;ir||(bt.add(S),vs||vt(()=>{S===t&&t.flush()}))}return S}apply(){{re=null;return}}schedule(t){var a;if(pr=t,(a=t.b)!=null&&a.is_pending&&t.f&(Yt|xs|da)&&!(t.f&It)){t.b.defer_effect(t);return}for(var s=t;s.parent!==null;){s=s.parent;var r=s.f;if(qt!==null&&s===O&&(I===null||!(I.f&le)))return;if(r&(dt|$e)){if(!(r&Z))return;s.f^=Z}}c(this,be).push(s)}};Ut=new WeakMap,Vt=new WeakMap,wt=new WeakMap,Ze=new WeakMap,ze=new WeakMap,gs=new WeakMap,be=new WeakMap,bs=new WeakMap,ot=new WeakMap,et=new WeakMap,He=new WeakMap,zt=new WeakMap,Ht=new WeakMap,Et=new WeakMap,ee=new WeakSet,Os=function(){return this.is_fork||c(this,ze).size>0},Ta=function(){for(const r of c(this,Et))for(const a of c(r,ze).keys()){for(var t=!1,s=a;s.parent!==null;){if(c(this,He).has(s)){t=!0;break}s=s.parent}if(!t)return!0}return!1},Is=function(){var v,u;if(Kn++>1e3&&(bt.delete(this),Eo()),!U(this,ee,Os).call(this)){for(const p of c(this,ot))c(this,et).delete(p),G(p,ne),this.schedule(p);for(const p of c(this,et))G(p,We),this.schedule(p)}const t=c(this,be);D(this,be,[]),this.apply();var s=qt=[],r=[],a=Ds=[];for(const p of t)try{U(this,ee,_r).call(this,p,s,r)}catch(g){throw Ca(p),g}if(S=null,a.length>0){var i=qs.ensure();for(const p of a)i.schedule(p)}if(qt=null,Ds=null,U(this,ee,Os).call(this)||U(this,ee,Ta).call(this)){U(this,ee,Fs).call(this,r),U(this,ee,Fs).call(this,s);for(const[p,g]of c(this,He))Ra(p,g)}else{c(this,Ze).size===0&&bt.delete(this),c(this,ot).clear(),c(this,et).clear();for(const p of c(this,Ut))p(this);c(this,Ut).clear(),Yn(r),Yn(s),(v=c(this,gs))==null||v.resolve()}var f=S;if(c(this,be).length>0){const p=f??(f=this);c(p,be).push(...c(this,be).filter(g=>!c(p,be).includes(g)))}f!==null&&(bt.add(f),U(u=f,ee,Is).call(u))},_r=function(t,s,r){t.f^=Z;for(var a=t.first;a!==null;){var i=a.f,f=(i&($e|dt))!==0,v=f&&(i&Z)!==0,u=v||(i&fe)!==0||c(this,He).has(a);if(!u&&a.fn!==null){f?a.f^=Z:i&Yt?s.push(a):Zt(a)&&(i&Ye&&c(this,et).add(a),Ot(a));var p=a.first;if(p!==null){a=p;continue}}for(;a!==null;){var g=a.next;if(g!==null){a=g;break}a=a.parent}}},Fs=function(t){for(var s=0;s<t.length;s+=1)Sa(t[s],c(this,ot),c(this,et))},yo=function(){var g,E,w;for(const y of bt){var t=y.id<this.id,s=[];for(const[o,[T,m]]of this.current){if(y.current.has(o)){var r=y.current.get(o)[0];if(t&&T!==r)y.current.set(o,[T,m]);else continue}s.push(o)}var a=[...y.current.keys()].filter(o=>!this.current.has(o));if(a.length===0)t&&y.discard();else if(s.length>0){if(t)for(const o of c(this,zt))y.unskip_effect(o,T=>{var m;T.f&(Ye|_s)?y.schedule(T):U(m=y,ee,Fs).call(m,[T])});y.activate();var i=new Set,f=new Map;for(var v of s)Aa(v,a,i,f);f=new Map;var u=[...y.current.keys()].filter(o=>this.current.has(o)?this.current.get(o)[0]!==o:!0);for(const o of c(this,bs))!(o.f&(Re|fe|dr))&&Rr(o,u,f)&&(o.f&(_s|Ye)?(G(o,ne),y.schedule(o)):c(y,ot).add(o));if(c(y,be).length>0){y.apply();for(var p of c(y,be))U(g=y,ee,_r).call(g,p,[],[]);D(y,be,[])}y.deactivate()}}for(const y of bt)c(y,Et).has(this)&&(c(y,Et).delete(this),c(y,Et).size===0&&!U(E=y,ee,Os).call(E)&&(y.activate(),U(w=y,ee,Is).call(w)))};let Mt=qs;function wo(e){var t=vs;vs=!0;try{for(var s;;){if(go(),S===null)return s;S.flush()}}finally{vs=t}}function Eo(){try{eo()}catch(e){ft(e,pr)}}let Le=null;function Yn(e){var t=e.length;if(t!==0){for(var s=0;s<t;){var r=e[s++];if(!(r.f&(Re|fe))&&Zt(r)&&(Le=new Set,Ot(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&za(r),(Le==null?void 0:Le.size)>0)){At.clear();for(const a of Le){if(a.f&(Re|fe))continue;const i=[a];let f=a.parent;for(;f!==null;)Le.has(f)&&(Le.delete(f),i.push(f)),f=f.parent;for(let v=i.length-1;v>=0;v--){const u=i[v];u.f&(Re|fe)||Ot(u)}}Le.clear()}}Le=null}}function Aa(e,t,s,r){if(!s.has(e)&&(s.add(e),e.reactions!==null))for(const a of e.reactions){const i=a.f;i&le?Aa(a,t,s,r):i&(_s|Ye)&&!(i&ne)&&Rr(a,t,r)&&(G(a,ne),Cr(a))}}function Rr(e,t,s){const r=s.get(e);if(r!==void 0)return r;if(e.deps!==null)for(const a of e.deps){if(Kt.call(t,a))return!0;if(a.f&le&&Rr(a,t,s))return s.set(a,!0),!0}return s.set(e,!1),!1}function Cr(e){S.schedule(e)}function Ra(e,t){if(!(e.f&$e&&e.f&Z)){e.f&ne?t.d.push(e):e.f&We&&t.m.push(e),G(e,Z);for(var s=e.first;s!==null;)Ra(s,t),s=s.next}}function Ca(e){G(e,Z);for(var t=e.first;t!==null;)Ca(t),t=t.next}function xo(e){let t=0,s=Dt(0),r;return()=>{Or()&&(n(s),Bs(()=>(t===0&&(r=b(()=>e(()=>ds(s)))),t+=1,()=>{vt(()=>{t-=1,t===0&&(r==null||r(),r=void 0,ds(s))})})))}}var ko=Gt|Xt;function So(e,t,s,r){new To(e,t,s,r)}var xe,kr,ke,xt,de,Se,ce,me,tt,kt,ct,Bt,ms,ys,st,Us,J,Ao,Ro,Co,hr,Ls,Ps,gr,br;class To{constructor(t,s,r,a){C(this,J);Fe(this,"parent");Fe(this,"is_pending",!1);Fe(this,"transform_error");C(this,xe);C(this,kr,null);C(this,ke);C(this,xt);C(this,de);C(this,Se,null);C(this,ce,null);C(this,me,null);C(this,tt,null);C(this,kt,0);C(this,ct,0);C(this,Bt,!1);C(this,ms,new Set);C(this,ys,new Set);C(this,st,null);C(this,Us,xo(()=>(D(this,st,Dt(c(this,kt))),()=>{D(this,st,null)})));var i;D(this,xe,t),D(this,ke,s),D(this,xt,f=>{var v=O;v.b=this,v.f|=vr,r(f)}),this.parent=O.b,this.transform_error=a??((i=this.parent)==null?void 0:i.transform_error)??(f=>f),D(this,de,Fr(()=>{U(this,J,hr).call(this)},ko))}defer_effect(t){Sa(t,c(this,ms),c(this,ys))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!c(this,ke).pending}update_pending_count(t,s){U(this,J,gr).call(this,t,s),D(this,kt,c(this,kt)+t),!(!c(this,st)||c(this,Bt))&&(D(this,Bt,!0),vt(()=>{D(this,Bt,!1),c(this,st)&&Qt(c(this,st),c(this,kt))}))}get_effect_pending(){return c(this,Us).call(this),n(c(this,st))}error(t){if(!c(this,ke).onerror&&!c(this,ke).failed)throw t;S!=null&&S.is_fork?(c(this,Se)&&S.skip_effect(c(this,Se)),c(this,ce)&&S.skip_effect(c(this,ce)),c(this,me)&&S.skip_effect(c(this,me)),S.on_fork_commit(()=>{U(this,J,br).call(this,t)})):U(this,J,br).call(this,t)}}xe=new WeakMap,kr=new WeakMap,ke=new WeakMap,xt=new WeakMap,de=new WeakMap,Se=new WeakMap,ce=new WeakMap,me=new WeakMap,tt=new WeakMap,kt=new WeakMap,ct=new WeakMap,Bt=new WeakMap,ms=new WeakMap,ys=new WeakMap,st=new WeakMap,Us=new WeakMap,J=new WeakSet,Ao=function(){try{D(this,Se,Te(()=>c(this,xt).call(this,c(this,xe))))}catch(t){this.error(t)}},Ro=function(t){const s=c(this,ke).failed;s&&D(this,me,Te(()=>{s(c(this,xe),()=>t,()=>()=>{})}))},Co=function(){const t=c(this,ke).pending;t&&(this.is_pending=!0,D(this,ce,Te(()=>t(c(this,xe)))),vt(()=>{var s=D(this,tt,document.createDocumentFragment()),r=rt();s.append(r),D(this,Se,U(this,J,Ps).call(this,()=>Te(()=>c(this,xt).call(this,r)))),c(this,ct)===0&&(c(this,xe).before(s),D(this,tt,null),Rt(c(this,ce),()=>{D(this,ce,null)}),U(this,J,Ls).call(this,S))}))},hr=function(){try{if(this.is_pending=this.has_pending_snippet(),D(this,ct,0),D(this,kt,0),D(this,Se,Te(()=>{c(this,xt).call(this,c(this,xe))})),c(this,ct)>0){var t=D(this,tt,document.createDocumentFragment());jr(c(this,Se),t);const s=c(this,ke).pending;D(this,ce,Te(()=>s(c(this,xe))))}else U(this,J,Ls).call(this,S)}catch(s){this.error(s)}},Ls=function(t){this.is_pending=!1,t.transfer_effects(c(this,ms),c(this,ys))},Ps=function(t){var s=O,r=I,a=H;Me(c(this,de)),Ne(c(this,de)),Jt(c(this,de).ctx);try{return Mt.ensure(),t()}catch(i){return xa(i),null}finally{Me(s),Ne(r),Jt(a)}},gr=function(t,s){var r;if(!this.has_pending_snippet()){this.parent&&U(r=this.parent,J,gr).call(r,t,s);return}D(this,ct,c(this,ct)+t),c(this,ct)===0&&(U(this,J,Ls).call(this,s),c(this,ce)&&Rt(c(this,ce),()=>{D(this,ce,null)}),c(this,tt)&&(c(this,xe).before(c(this,tt)),D(this,tt,null)))},br=function(t){c(this,Se)&&(_e(c(this,Se)),D(this,Se,null)),c(this,ce)&&(_e(c(this,ce)),D(this,ce,null)),c(this,me)&&(_e(c(this,me)),D(this,me,null));var s=c(this,ke).onerror;let r=c(this,ke).failed;var a=!1,i=!1;const f=()=>{if(a){vo();return}a=!0,i&&no(),c(this,me)!==null&&Rt(c(this,me),()=>{D(this,me,null)}),U(this,J,Ps).call(this,()=>{U(this,J,hr).call(this)})},v=u=>{try{i=!0,s==null||s(u,f),i=!1}catch(p){ft(p,c(this,de)&&c(this,de).parent)}r&&D(this,me,U(this,J,Ps).call(this,()=>{try{return Te(()=>{var p=O;p.b=this,p.f|=vr,r(c(this,xe),()=>u,()=>f)})}catch(p){return ft(p,c(this,de).parent),null}}))};vt(()=>{var u;try{u=this.transform_error(t)}catch(p){ft(p,c(this,de)&&c(this,de).parent);return}u!==null&&typeof u=="object"&&typeof u.then=="function"?u.then(v,p=>ft(p,c(this,de)&&c(this,de).parent)):v(u)})};function No(e,t,s,r){const a=Ss()?Nr:Ma;var i=e.filter(w=>!w.settled);if(s.length===0&&i.length===0){r(t.map(a));return}var f=O,v=Mo(),u=i.length===1?i[0].promise:i.length>1?Promise.all(i.map(w=>w.promise)):null;function p(w){v();try{r(w)}catch(y){f.f&Re||ft(y,f)}Ws()}if(s.length===0){u.then(()=>p(t.map(a)));return}var g=Na();function E(){Promise.all(s.map(w=>Do(w))).then(w=>p([...t.map(a),...w])).catch(w=>ft(w,f)).finally(()=>g())}u?u.then(()=>{v(),E(),Ws()}):E()}function Mo(){var e=O,t=I,s=H,r=S;return function(i=!0){Me(e),Ne(t),Jt(s),i&&!(e.f&Re)&&(r==null||r.activate(),r==null||r.apply())}}function Ws(e=!0){Me(null),Ne(null),Jt(null),e&&(S==null||S.deactivate())}function Na(){var e=O,t=e.b,s=S,r=t.is_rendered();return t.update_pending_count(1,s),s.increment(r,e),(a=!1)=>{t.update_pending_count(-1,s),s.decrement(r,e,a)}}function Nr(e){var t=le|ne;return O!==null&&(O.f|=Xt),{ctx:H,deps:null,effects:null,equals:ba,f:t,fn:e,reactions:null,rv:0,v:te,wv:0,parent:O,ac:null}}function Do(e,t,s){let r=O;r===null&&Gl();var a=void 0,i=Dt(te),f=!I,v=new Map;return Ko(()=>{var y;var u=O,p=va();a=p.promise;try{Promise.resolve(e()).then(p.resolve,p.reject).finally(Ws)}catch(o){p.reject(o),Ws()}var g=S;if(f){if(u.f&It)var E=Na();if(r.b.is_rendered())(y=v.get(g))==null||y.reject(Xe),v.delete(g);else{for(const o of v.values())o.reject(Xe);v.clear()}v.set(g,p)}const w=(o,T=void 0)=>{if(E){var m=T===Xe;E(m)}if(!(T===Xe||u.f&Re)){if(g.activate(),T)i.f|=ut,Qt(i,T);else{i.f&ut&&(i.f^=ut),Qt(i,o);for(const[R,$]of v){if(v.delete(R),R===g)break;$.reject(Xe)}}g.deactivate()}};p.promise.then(w,o=>w(null,o||"unknown"))}),Ir(()=>{for(const u of v.values())u.reject(Xe)}),new Promise(u=>{function p(g){function E(){g===a?u(i):p(a)}g.then(E,E)}p(a)})}function Ma(e){const t=Nr(e);return t.equals=ma,t}function Oo(e){var t=e.effects;if(t!==null){e.effects=null;for(var s=0;s<t.length;s+=1)_e(t[s])}}function Mr(e){var t,s=O,r=e.parent;if(!pt&&r!==null&&r.f&(Re|fe))return fo(),e.v;Me(r);try{e.f&=~Nt,Oo(e),t=Ja(e)}finally{Me(s)}return t}function Da(e){var t=Mr(e);if(!e.equals(t)&&(e.wv=Ya(),(!(S!=null&&S.is_fork)||e.deps===null)&&(S!==null?S.capture(e,t,!0):e.v=t,e.deps===null))){G(e,Z);return}pt||(re!==null?(Or()||S!=null&&S.is_fork)&&re.set(e,t):Ar(e))}function Io(e){var t,s;if(e.effects!==null)for(const r of e.effects)(r.teardown||r.ac)&&((t=r.teardown)==null||t.call(r),(s=r.ac)==null||s.abort(Xe),r.teardown=Bl,r.ac=null,hs(r,0),Lr(r))}function Oa(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&Ot(t)}let mr=new Set;const At=new Map;let Ia=!1;function Dt(e,t){var s={f:0,v:e,reactions:null,equals:ba,rv:0,wv:0};return s}function it(e,t){const s=Dt(e);return Jo(s),s}function X(e,t=!1,s=!0){var a;const r=Dt(e);return t||(r.equals=ma),ks&&s&&H!==null&&H.l!==null&&((a=H.l).s??(a.s=[])).push(r),r}function is(e,t){return M(e,b(()=>n(e))),t}function M(e,t,s=!1){I!==null&&(!je||I.f&dr)&&Ss()&&I.f&(le|Ye|_s|dr)&&(Ce===null||!Kt.call(Ce,e))&&ro();let r=s?cs(t):t;return Qt(e,r,Ds)}function Qt(e,t,s=null){if(!e.equals(t)){At.set(e,pt?t:e.v);var r=Mt.ensure();if(r.capture(e,t),e.f&le){const a=e;e.f&ne&&Mr(a),re===null&&Ar(a)}e.wv=Ya(),Fa(e,ne,s),Ss()&&O!==null&&O.f&Z&&!(O.f&($e|dt))&&(Ee===null?Qo([e]):Ee.push(e)),!r.is_fork&&mr.size>0&&!Ia&&Fo()}return t}function Fo(){Ia=!1;for(const e of mr)e.f&Z&&G(e,We),Zt(e)&&Ot(e);mr.clear()}function ds(e){M(e,e.v+1)}function Fa(e,t,s){var r=e.reactions;if(r!==null)for(var a=Ss(),i=r.length,f=0;f<i;f++){var v=r[f],u=v.f;if(!(!a&&v===O)){var p=(u&ne)===0;if(p&&G(v,t),u&le){var g=v;re==null||re.delete(g),u&Nt||(u&Ae&&(O===null||!(O.f&$s))&&(v.f|=Nt),Fa(g,We,s))}else if(p){var E=v;u&Ye&&Le!==null&&Le.add(E),s!==null?s.push(E):Cr(E)}}}}function cs(e){if(typeof e!="object"||e===null||Tt in e)return e;const t=Tr(e);if(t!==zl&&t!==Hl)return e;var s=new Map,r=Sr(e),a=it(0),i=Ct,f=v=>{if(Ct===i)return v();var u=I,p=Ct;Ne(null),Zn(i);var g=v();return Ne(u),Zn(p),g};return r&&s.set("length",it(e.length)),new Proxy(e,{defineProperty(v,u,p){(!("value"in p)||p.configurable===!1||p.enumerable===!1||p.writable===!1)&&to();var g=s.get(u);return g===void 0?f(()=>{var E=it(p.value);return s.set(u,E),E}):M(g,p.value,!0),!0},deleteProperty(v,u){var p=s.get(u);if(p===void 0){if(u in v){const g=f(()=>it(te));s.set(u,g),ds(a)}}else M(p,te),ds(a);return!0},get(v,u,p){var y;if(u===Tt)return e;var g=s.get(u),E=u in v;if(g===void 0&&(!E||(y=us(v,u))!=null&&y.writable)&&(g=f(()=>{var o=cs(E?v[u]:te),T=it(o);return T}),s.set(u,g)),g!==void 0){var w=n(g);return w===te?void 0:w}return Reflect.get(v,u,p)},getOwnPropertyDescriptor(v,u){var p=Reflect.getOwnPropertyDescriptor(v,u);if(p&&"value"in p){var g=s.get(u);g&&(p.value=n(g))}else if(p===void 0){var E=s.get(u),w=E==null?void 0:E.v;if(E!==void 0&&w!==te)return{enumerable:!0,configurable:!0,value:w,writable:!0}}return p},has(v,u){var w;if(u===Tt)return!0;var p=s.get(u),g=p!==void 0&&p.v!==te||Reflect.has(v,u);if(p!==void 0||O!==null&&(!g||(w=us(v,u))!=null&&w.writable)){p===void 0&&(p=f(()=>{var y=g?cs(v[u]):te,o=it(y);return o}),s.set(u,p));var E=n(p);if(E===te)return!1}return g},set(v,u,p,g){var P;var E=s.get(u),w=u in v;if(r&&u==="length")for(var y=p;y<E.v;y+=1){var o=s.get(y+"");o!==void 0?M(o,te):y in v&&(o=f(()=>it(te)),s.set(y+"",o))}if(E===void 0)(!w||(P=us(v,u))!=null&&P.writable)&&(E=f(()=>it(void 0)),M(E,cs(p)),s.set(u,E));else{w=E.v!==te;var T=f(()=>cs(p));M(E,T)}var m=Reflect.getOwnPropertyDescriptor(v,u);if(m!=null&&m.set&&m.set.call(g,p),!w){if(r&&typeof u=="string"){var R=s.get("length"),$=Number(u);Number.isInteger($)&&$>=R.v&&M(R,$+1)}ds(a)}return!0},ownKeys(v){n(a);var u=Reflect.ownKeys(v).filter(E=>{var w=s.get(E);return w===void 0||w.v!==te});for(var[p,g]of s)g.v!==te&&!(p in v)&&u.push(p);return u},setPrototypeOf(){so()}})}function Gn(e){try{if(e!==null&&typeof e=="object"&&Tt in e)return e[Tt]}catch{}return e}function Lo(e,t){return Object.is(Gn(e),Gn(t))}var Jn,La,Pa,ja;function Po(){if(Jn===void 0){Jn=window,La=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,s=Text.prototype;Pa=us(t,"firstChild").get,ja=us(t,"nextSibling").get,Hn(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),Hn(s)&&(s.__t=void 0)}}function rt(e=""){return document.createTextNode(e)}function Dr(e){return Pa.call(e)}function Ts(e){return ja.call(e)}function _(e,t){return Dr(e)}function jo(e,t=!1){{var s=Dr(e);return s instanceof Comment&&s.data===""?Ts(s):s}}function h(e,t=1,s=!1){let r=e;for(;t--;)r=Ts(r);return r}function $o(e){e.textContent=""}function $a(){return!1}function Wo(e,t,s){return document.createElementNS(ga,e,void 0)}let Qn=!1;function qo(){Qn||(Qn=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{var t;if(!e.defaultPrevented)for(const s of e.target.elements)(t=s.__on_r)==null||t.call(s)})},{capture:!0}))}function Hs(e){var t=I,s=O;Ne(null),Me(null);try{return e()}finally{Ne(t),Me(s)}}function Wa(e,t,s,r=s){e.addEventListener(t,()=>Hs(s));const a=e.__on_r;a?e.__on_r=()=>{a(),r(!0)}:e.__on_r=()=>r(!0),qo()}function qa(e){O===null&&(I===null&&Zl(),Xl()),pt&&Ql()}function Uo(e,t){var s=t.last;s===null?t.last=t.first=e:(s.next=e,e.prev=s,t.last=e)}function Ge(e,t){var s=O;s!==null&&s.f&fe&&(e|=fe);var r={ctx:H,deps:null,nodes:null,f:e|ne|Ae,first:null,fn:t,last:null,next:null,parent:s,b:s&&s.b,prev:null,teardown:null,wv:0,ac:null};S==null||S.register_created_effect(r);var a=r;if(e&Yt)qt!==null?qt.push(r):Mt.ensure().schedule(r);else if(t!==null){try{Ot(r)}catch(f){throw _e(r),f}a.deps===null&&a.teardown===null&&a.nodes===null&&a.first===a.last&&!(a.f&Xt)&&(a=a.first,e&Ye&&e&Gt&&a!==null&&(a.f|=Gt))}if(a!==null&&(a.parent=s,s!==null&&Uo(a,s),I!==null&&I.f&le&&!(e&dt))){var i=I;(i.effects??(i.effects=[])).push(a)}return r}function Or(){return I!==null&&!je}function Ir(e){const t=Ge(xs,null);return G(t,Z),t.teardown=e,t}function yr(e){qa();var t=O.f,s=!I&&(t&$e)!==0&&(t&It)===0;if(s){var r=H;(r.e??(r.e=[])).push(e)}else return Ua(e)}function Ua(e){return Ge(Yt|pa,e)}function Vo(e){return qa(),Ge(xs|pa,e)}function zo(e){Mt.ensure();const t=Ge(dt|Xt,e);return(s={})=>new Promise(r=>{s.outro?Rt(t,()=>{_e(t),r(void 0)}):(_e(t),r(void 0))})}function Ho(e){return Ge(Yt,e)}function we(e,t){var s=H,r={effect:null,ran:!1,deps:e};s.l.$.push(r),r.effect=Bs(()=>{if(e(),!r.ran){r.ran=!0;var a=O;try{Me(a.parent),b(t)}finally{Me(a)}}})}function Bo(){var e=H;Bs(()=>{for(var t of e.l.$){t.deps();var s=t.effect;s.f&Z&&s.deps!==null&&G(s,We),Zt(s)&&Ot(s),t.ran=!1}})}function Ko(e){return Ge(_s|Xt,e)}function Bs(e,t=0){return Ge(xs|t,e)}function V(e,t=[],s=[],r=[]){No(r,t,s,a=>{Ge(xs,()=>e(...a.map(n)))})}function Fr(e,t=0){var s=Ge(Ye|t,e);return s}function Te(e){return Ge($e|Xt,e)}function Va(e){var t=e.teardown;if(t!==null){const s=pt,r=I;Xn(!0),Ne(null);try{t.call(null)}finally{Xn(s),Ne(r)}}}function Lr(e,t=!1){var s=e.first;for(e.first=e.last=null;s!==null;){const a=s.ac;a!==null&&Hs(()=>{a.abort(Xe)});var r=s.next;s.f&dt?s.parent=null:_e(s,t),s=r}}function Yo(e){for(var t=e.first;t!==null;){var s=t.next;t.f&$e||_e(t),t=s}}function _e(e,t=!0){var s=!1;(t||e.f&Yl)&&e.nodes!==null&&e.nodes.end!==null&&(Go(e.nodes.start,e.nodes.end),s=!0),G(e,Bn),Lr(e,t&&!s),hs(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(const i of r)i.stop();Va(e),e.f^=Bn,e.f|=Re;var a=e.parent;a!==null&&a.first!==null&&za(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Go(e,t){for(;e!==null;){var s=e===t?null:Ts(e);e.remove(),e=s}}function za(e){var t=e.parent,s=e.prev,r=e.next;s!==null&&(s.next=r),r!==null&&(r.prev=s),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=s))}function Rt(e,t,s=!0){var r=[];Ha(e,r,!0);var a=()=>{s&&_e(e),t&&t()},i=r.length;if(i>0){var f=()=>--i||a();for(var v of r)v.out(f)}else a()}function Ha(e,t,s){if(!(e.f&fe)){e.f^=fe;var r=e.nodes&&e.nodes.t;if(r!==null)for(const v of r)(v.is_global||s)&&t.push(v);for(var a=e.first;a!==null;){var i=a.next;if(!(a.f&dt)){var f=(a.f&Gt)!==0||(a.f&$e)!==0&&(e.f&Ye)!==0;Ha(a,t,f?s:!1)}a=i}}}function Pr(e){Ba(e,!0)}function Ba(e,t){if(e.f&fe){e.f^=fe,e.f&Z||(G(e,ne),Mt.ensure().schedule(e));for(var s=e.first;s!==null;){var r=s.next,a=(s.f&Gt)!==0||(s.f&$e)!==0;Ba(s,a?t:!1),s=r}var i=e.nodes&&e.nodes.t;if(i!==null)for(const f of i)(f.is_global||t)&&f.in()}}function jr(e,t){if(e.nodes)for(var s=e.nodes.start,r=e.nodes.end;s!==null;){var a=s===r?null:Ts(s);t.append(s),s=a}}let js=!1,pt=!1;function Xn(e){pt=e}let I=null,je=!1;function Ne(e){I=e}let O=null;function Me(e){O=e}let Ce=null;function Jo(e){I!==null&&(Ce===null?Ce=[e]:Ce.push(e))}let pe=null,ge=0,Ee=null;function Qo(e){Ee=e}let Ka=1,yt=0,Ct=yt;function Zn(e){Ct=e}function Ya(){return++Ka}function Zt(e){var t=e.f;if(t&ne)return!0;if(t&le&&(e.f&=~Nt),t&We){for(var s=e.deps,r=s.length,a=0;a<r;a++){var i=s[a];if(Zt(i)&&Da(i),i.wv>e.wv)return!0}t&Ae&&re===null&&G(e,Z)}return!1}function Ga(e,t,s=!0){var r=e.reactions;if(r!==null&&!(Ce!==null&&Kt.call(Ce,e)))for(var a=0;a<r.length;a++){var i=r[a];i.f&le?Ga(i,t,!1):t===i&&(s?G(i,ne):i.f&Z&&G(i,We),Cr(i))}}function Ja(e){var T;var t=pe,s=ge,r=Ee,a=I,i=Ce,f=H,v=je,u=Ct,p=e.f;pe=null,ge=0,Ee=null,I=p&($e|dt)?null:e,Ce=null,Jt(e.ctx),je=!1,Ct=++yt,e.ac!==null&&(Hs(()=>{e.ac.abort(Xe)}),e.ac=null);try{e.f|=$s;var g=e.fn,E=g();e.f|=It;var w=e.deps,y=S==null?void 0:S.is_fork;if(pe!==null){var o;if(y||hs(e,ge),w!==null&&ge>0)for(w.length=ge+pe.length,o=0;o<pe.length;o++)w[ge+o]=pe[o];else e.deps=w=pe;if(Or()&&e.f&Ae)for(o=ge;o<w.length;o++)((T=w[o]).reactions??(T.reactions=[])).push(e)}else!y&&w!==null&&ge<w.length&&(hs(e,ge),w.length=ge);if(Ss()&&Ee!==null&&!je&&w!==null&&!(e.f&(le|We|ne)))for(o=0;o<Ee.length;o++)Ga(Ee[o],e);if(a!==null&&a!==e){if(yt++,a.deps!==null)for(let m=0;m<s;m+=1)a.deps[m].rv=yt;if(t!==null)for(const m of t)m.rv=yt;Ee!==null&&(r===null?r=Ee:r.push(...Ee))}return e.f&ut&&(e.f^=ut),E}catch(m){return xa(m)}finally{e.f^=$s,pe=t,ge=s,Ee=r,I=a,Ce=i,Jt(f),je=v,Ct=u}}function Xo(e,t){let s=t.reactions;if(s!==null){var r=Ul.call(s,e);if(r!==-1){var a=s.length-1;a===0?s=t.reactions=null:(s[r]=s[a],s.pop())}}if(s===null&&t.f&le&&(pe===null||!Kt.call(pe,t))){var i=t;i.f&Ae&&(i.f^=Ae,i.f&=~Nt),i.v!==te&&Ar(i),Io(i),hs(i,0)}}function hs(e,t){var s=e.deps;if(s!==null)for(var r=t;r<s.length;r++)Xo(e,s[r])}function Ot(e){var t=e.f;if(!(t&Re)){G(e,Z);var s=O,r=js;O=e,js=!0;try{t&(Ye|da)?Yo(e):Lr(e),Va(e);var a=Ja(e);e.teardown=typeof a=="function"?a:null,e.wv=Ka;var i;ql&&_o&&e.f&ne&&e.deps}finally{js=r,O=s}}}async function Zo(){await Promise.resolve(),wo()}function n(e){var t=e.f,s=(t&le)!==0;if(I!==null&&!je){var r=O!==null&&(O.f&Re)!==0;if(!r&&(Ce===null||!Kt.call(Ce,e))){var a=I.deps;if(I.f&$s)e.rv<yt&&(e.rv=yt,pe===null&&a!==null&&a[ge]===e?ge++:pe===null?pe=[e]:pe.push(e));else{(I.deps??(I.deps=[])).push(e);var i=e.reactions;i===null?e.reactions=[I]:Kt.call(i,I)||i.push(I)}}}if(pt&&At.has(e))return At.get(e);if(s){var f=e;if(pt){var v=f.v;return(!(f.f&Z)&&f.reactions!==null||Xa(f))&&(v=Mr(f)),At.set(f,v),v}var u=(f.f&Ae)===0&&!je&&I!==null&&(js||(I.f&Ae)!==0),p=(f.f&It)===0;Zt(f)&&(u&&(f.f|=Ae),Da(f)),u&&!p&&(Oa(f),Qa(f))}if(re!=null&&re.has(e))return re.get(e);if(e.f&ut)throw e.v;return e.v}function Qa(e){if(e.f|=Ae,e.deps!==null)for(const t of e.deps)(t.reactions??(t.reactions=[])).push(e),t.f&le&&!(t.f&Ae)&&(Oa(t),Qa(t))}function Xa(e){if(e.v===te)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(At.has(t)||t.f&le&&Xa(t))return!0;return!1}function b(e){var t=je;try{return je=!0,e()}finally{je=t}}function ec(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(Tt in e)wr(e);else if(!Array.isArray(e))for(let t in e){const s=e[t];typeof s=="object"&&s&&Tt in s&&wr(s)}}}function wr(e,t=new Set){if(typeof e=="object"&&e!==null&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let r in e)try{wr(e[r],t)}catch{}const s=Tr(e);if(s!==Object.prototype&&s!==Array.prototype&&s!==Map.prototype&&s!==Set.prototype&&s!==Date.prototype){const r=ua(s);for(let a in r){const i=r[a].get;if(i)try{i.call(e)}catch{}}}}}const tc=["touchstart","touchmove"];function sc(e){return tc.includes(e)}const Cs=Symbol("events"),rc=new Set,ea=new Set;function nc(e,t,s,r={}){function a(i){if(r.capture||Er.call(t,i),!i.cancelBubble)return Hs(()=>s==null?void 0:s.call(this,i))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?vt(()=>{t.addEventListener(e,a,r)}):t.addEventListener(e,a,r),a}function ta(e,t,s,r,a){var i={capture:r,passive:a},f=nc(e,t,s,i);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Ir(()=>{t.removeEventListener(e,f,i)})}let sa=null;function Er(e){var m,R;var t=this,s=t.ownerDocument,r=e.type,a=((m=e.composedPath)==null?void 0:m.call(e))||[],i=a[0]||e.target;sa=e;var f=0,v=sa===e&&e[Cs];if(v){var u=a.indexOf(v);if(u!==-1&&(t===document||t===window)){e[Cs]=t;return}var p=a.indexOf(t);if(p===-1)return;u<=p&&(f=u)}if(i=a[f]||e.target,i!==t){Vl(e,"currentTarget",{configurable:!0,get(){return i||s}});var g=I,E=O;Ne(null),Me(null);try{for(var w,y=[];i!==null;){var o=i.assignedSlot||i.parentNode||i.host||null;try{var T=(R=i[Cs])==null?void 0:R[r];T!=null&&(!i.disabled||e.target===i)&&T.call(i,e)}catch($){w?y.push($):w=$}if(e.cancelBubble||o===t||o===null)break;i=o}if(w){for(let $ of y)queueMicrotask(()=>{throw $});throw w}}finally{e[Cs]=t,delete e.currentTarget,Ne(g),Me(E)}}}var ca;const lr=((ca=globalThis==null?void 0:globalThis.window)==null?void 0:ca.trustedTypes)&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function ac(e){return(lr==null?void 0:lr.createHTML(e))??e}function ic(e){var t=Wo("template");return t.innerHTML=ac(e.replaceAll("<!>","<!---->")),t.content}function $r(e,t){var s=O;s.nodes===null&&(s.nodes={start:e,end:t,a:null,t:null})}function W(e,t){var s=(t&co)!==0,r,a=!e.startsWith("<!>");return()=>{r===void 0&&(r=ic(a?e:"<!>"+e),r=Dr(r));var i=s||La?document.importNode(r,!0):r.cloneNode(!0);return $r(i,i),i}}function ra(e=""){{var t=rt(e+"");return $r(t,t),t}}function lc(){var e=document.createDocumentFragment(),t=document.createComment(""),s=rt();return e.append(t,s),$r(t,s),e}function j(e,t){e!==null&&e.before(t)}function x(e,t){var s=t==null?"":typeof t=="object"?`${t}`:t;s!==(e.__t??(e.__t=e.nodeValue))&&(e.__t=s,e.nodeValue=`${s}`)}function oc(e,t){return cc(e,t)}const Ns=new Map;function cc(e,{target:t,anchor:s,props:r={},events:a,context:i,intro:f=!0,transformError:v}){Po();var u=void 0,p=zo(()=>{var g=s??t.appendChild(rt());So(g,{pending:()=>{}},y=>{ya({});var o=H;i&&(o.c=i),a&&(r.$$events=a),u=e(y,r)||{},wa()},v);var E=new Set,w=y=>{for(var o=0;o<y.length;o++){var T=y[o];if(!E.has(T)){E.add(T);var m=sc(T);for(const P of[t,document]){var R=Ns.get(P);R===void 0&&(R=new Map,Ns.set(P,R));var $=R.get(T);$===void 0?(P.addEventListener(T,Er,{passive:m}),R.set(T,1)):R.set(T,$+1)}}}};return w(zs(rc)),ea.add(w),()=>{var m;for(var y of E)for(const R of[t,document]){var o=Ns.get(R),T=o.get(y);--T==0?(R.removeEventListener(y,Er),o.delete(y),o.size===0&&Ns.delete(R)):o.set(y,T)}ea.delete(w),g!==s&&((m=g.parentNode)==null||m.removeChild(g))}});return fc.set(u,p),u}let fc=new WeakMap;var Pe,Be,ye,St,ws,Es,Vs;class uc{constructor(t,s=!0){Fe(this,"anchor");C(this,Pe,new Map);C(this,Be,new Map);C(this,ye,new Map);C(this,St,new Set);C(this,ws,!0);C(this,Es,t=>{if(c(this,Pe).has(t)){var s=c(this,Pe).get(t),r=c(this,Be).get(s);if(r)Pr(r),c(this,St).delete(s);else{var a=c(this,ye).get(s);a&&(c(this,Be).set(s,a.effect),c(this,ye).delete(s),a.fragment.lastChild.remove(),this.anchor.before(a.fragment),r=a.effect)}for(const[i,f]of c(this,Pe)){if(c(this,Pe).delete(i),i===t)break;const v=c(this,ye).get(f);v&&(_e(v.effect),c(this,ye).delete(f))}for(const[i,f]of c(this,Be)){if(i===s||c(this,St).has(i))continue;const v=()=>{if(Array.from(c(this,Pe).values()).includes(i)){var p=document.createDocumentFragment();jr(f,p),p.append(rt()),c(this,ye).set(i,{effect:f,fragment:p})}else _e(f);c(this,St).delete(i),c(this,Be).delete(i)};c(this,ws)||!r?(c(this,St).add(i),Rt(f,v,!1)):v()}}});C(this,Vs,t=>{c(this,Pe).delete(t);const s=Array.from(c(this,Pe).values());for(const[r,a]of c(this,ye))s.includes(r)||(_e(a.effect),c(this,ye).delete(r))});this.anchor=t,D(this,ws,s)}ensure(t,s){var r=S,a=$a();if(s&&!c(this,Be).has(t)&&!c(this,ye).has(t))if(a){var i=document.createDocumentFragment(),f=rt();i.append(f),c(this,ye).set(t,{effect:Te(()=>s(f)),fragment:i})}else c(this,Be).set(t,Te(()=>s(this.anchor)));if(c(this,Pe).set(r,t),a){for(const[v,u]of c(this,Be))v===t?r.unskip_effect(u):r.skip_effect(u);for(const[v,u]of c(this,ye))v===t?r.unskip_effect(u.effect):r.skip_effect(u.effect);r.oncommit(c(this,Es)),r.ondiscard(c(this,Vs))}else c(this,Es).call(this,r)}}Pe=new WeakMap,Be=new WeakMap,ye=new WeakMap,St=new WeakMap,ws=new WeakMap,Es=new WeakMap,Vs=new WeakMap;function oe(e,t,s=!1){var r=new uc(e),a=s?Gt:0;function i(f,v){r.ensure(f,v)}Fr(()=>{var f=!1;t((v,u=0)=>{f=!0,i(u,v)}),f||i(-1,null)},a)}function vc(e,t,s){for(var r=[],a=t.length,i,f=t.length,v=0;v<a;v++){let E=t[v];Rt(E,()=>{if(i){if(i.pending.delete(E),i.done.add(E),i.pending.size===0){var w=e.outrogroups;xr(e,zs(i.done)),w.delete(i),w.size===0&&(e.outrogroups=null)}}else f-=1},!1)}if(f===0){var u=r.length===0&&s!==null;if(u){var p=s,g=p.parentNode;$o(g),g.append(p),e.items.clear()}xr(e,t,!u)}else i={pending:new Set(t),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(i)}function xr(e,t,s=!0){var r;if(e.pending.size>0){r=new Set;for(const f of e.pending.values())for(const v of f)r.add(e.items.get(v).e)}for(var a=0;a<t.length;a++){var i=t[a];if(r!=null&&r.has(i)){i.f|=Ke;const f=document.createDocumentFragment();jr(i,f)}else _e(t[a],s)}}var na;function Wt(e,t,s,r,a,i=null){var f=e,v=new Map,u=(t&ha)!==0;if(u){var p=e;f=p.appendChild(rt())}var g=null,E=Ma(()=>{var P=s();return Sr(P)?P:P==null?[]:zs(P)}),w,y=new Map,o=!0;function T(P){$.effect.f&Re||($.pending.delete(P),$.fallback=g,dc($,w,f,t,r),g!==null&&(w.length===0?g.f&Ke?(g.f^=Ke,fs(g,null,f)):Pr(g):Rt(g,()=>{g=null})))}function m(P){$.pending.delete(P)}var R=Fr(()=>{w=n(E);for(var P=w.length,Q=new Set,ae=S,qe=$a(),F=0;F<P;F+=1){var Je=w[F],nt=r(Je,F),ue=o?null:v.get(nt);ue?(ue.v&&Qt(ue.v,Je),ue.i&&Qt(ue.i,F),qe&&ae.unskip_effect(ue.e)):(ue=pc(v,o?f:na??(na=rt()),Je,nt,F,a,t,s),o||(ue.e.f|=Ke),v.set(nt,ue)),Q.add(nt)}if(P===0&&i&&!g&&(o?g=Te(()=>i(f)):(g=Te(()=>i(na??(na=rt()))),g.f|=Ke)),P>Q.size&&Jl(),!o)if(y.set(ae,Q),qe){for(const[at,_t]of v)Q.has(at)||ae.skip_effect(_t.e);ae.oncommit(T),ae.ondiscard(m)}else T(ae);n(E)}),$={effect:R,items:v,pending:y,outrogroups:null,fallback:g};o=!1}function ls(e){for(;e!==null&&!(e.f&$e);)e=e.next;return e}function dc(e,t,s,r,a){var ue,at,_t,ht,As,es,ts,ss,rs;var i=(r&lo)!==0,f=t.length,v=e.items,u=ls(e.effect.first),p,g=null,E,w=[],y=[],o,T,m,R;if(i)for(R=0;R<f;R+=1)o=t[R],T=a(o,R),m=v.get(T).e,m.f&Ke||((at=(ue=m.nodes)==null?void 0:ue.a)==null||at.measure(),(E??(E=new Set)).add(m));for(R=0;R<f;R+=1){if(o=t[R],T=a(o,R),m=v.get(T).e,e.outrogroups!==null)for(const De of e.outrogroups)De.pending.delete(m),De.done.delete(m);if(m.f&fe&&(Pr(m),i&&((ht=(_t=m.nodes)==null?void 0:_t.a)==null||ht.unfix(),(E??(E=new Set)).delete(m))),m.f&Ke)if(m.f^=Ke,m===u)fs(m,null,s);else{var $=g?g.next:u;m===e.effect.last&&(e.effect.last=m.prev),m.prev&&(m.prev.next=m.next),m.next&&(m.next.prev=m.prev),lt(e,g,m),lt(e,m,$),fs(m,$,s),g=m,w=[],y=[],u=ls(g.next);continue}if(m!==u){if(p!==void 0&&p.has(m)){if(w.length<y.length){var P=y[0],Q;g=P.prev;var ae=w[0],qe=w[w.length-1];for(Q=0;Q<w.length;Q+=1)fs(w[Q],P,s);for(Q=0;Q<y.length;Q+=1)p.delete(y[Q]);lt(e,ae.prev,qe.next),lt(e,g,ae),lt(e,qe,P),u=P,g=qe,R-=1,w=[],y=[]}else p.delete(m),fs(m,u,s),lt(e,m.prev,m.next),lt(e,m,g===null?e.effect.first:g.next),lt(e,g,m),g=m;continue}for(w=[],y=[];u!==null&&u!==m;)(p??(p=new Set)).add(u),y.push(u),u=ls(u.next);if(u===null)continue}m.f&Ke||w.push(m),g=m,u=ls(m.next)}if(e.outrogroups!==null){for(const De of e.outrogroups)De.pending.size===0&&(xr(e,zs(De.done)),(As=e.outrogroups)==null||As.delete(De));e.outrogroups.size===0&&(e.outrogroups=null)}if(u!==null||p!==void 0){var F=[];if(p!==void 0)for(m of p)m.f&fe||F.push(m);for(;u!==null;)!(u.f&fe)&&u!==e.fallback&&F.push(u),u=ls(u.next);var Je=F.length;if(Je>0){var nt=r&ha&&f===0?s:null;if(i){for(R=0;R<Je;R+=1)(ts=(es=F[R].nodes)==null?void 0:es.a)==null||ts.measure();for(R=0;R<Je;R+=1)(rs=(ss=F[R].nodes)==null?void 0:ss.a)==null||rs.fix()}vc(e,F,nt)}}i&&vt(()=>{var De,Ft;if(E!==void 0)for(m of E)(Ft=(De=m.nodes)==null?void 0:De.a)==null||Ft.apply()})}function pc(e,t,s,r,a,i,f,v){var u=f&ao?f&oo?Dt(s):X(s,!1,!1):null,p=f&io?Dt(a):null;return{v:u,i:p,e:Te(()=>(i(t,u??s,p??a,v),()=>{e.delete(r)}))}}function fs(e,t,s){if(e.nodes)for(var r=e.nodes.start,a=e.nodes.end,i=t&&!(t.f&Ke)?t.nodes.start:s;r!==null;){var f=Ts(r);if(i.before(r),r===a)return;r=f}}function lt(e,t,s){t===null?e.effect.first=s:t.next=s,s===null?e.effect.last=t:s.prev=t}const aa=[...`
|
|
2
|
+
\r\f \v\uFEFF`];function _c(e,t,s){var r=e==null?"":""+e;if(s){for(var a of Object.keys(s))if(s[a])r=r?r+" "+a:a;else if(r.length)for(var i=a.length,f=0;(f=r.indexOf(a,f))>=0;){var v=f+i;(f===0||aa.includes(r[f-1]))&&(v===r.length||aa.includes(r[v]))?r=(f===0?"":r.substring(0,f))+r.substring(v+1):f=v}}return r===""?null:r}function hc(e,t){return e==null?null:String(e)}function os(e,t,s,r,a,i){var f=e.__className;if(f!==s||f===void 0){var v=_c(s,r,i);v==null?e.removeAttribute("class"):e.className=v,e.__className=s}else if(i&&a!==i)for(var u in i){var p=!!i[u];(a==null||p!==!!a[u])&&e.classList.toggle(u,p)}return i}function ia(e,t,s,r){var a=e.__style;if(a!==t){var i=hc(t);i==null?e.removeAttribute("style"):e.style.cssText=i,e.__style=t}return r}function Za(e,t,s=!1){if(e.multiple){if(t==null)return;if(!Sr(t))return uo();for(var r of e.options)r.selected=t.includes(ps(r));return}for(r of e.options){var a=ps(r);if(Lo(a,t)){r.selected=!0;return}}(!s||t!==void 0)&&(e.selectedIndex=-1)}function gc(e){var t=new MutationObserver(()=>{Za(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Ir(()=>{t.disconnect()})}function or(e,t,s=t){var r=new WeakSet,a=!0;Wa(e,"change",i=>{var f=i?"[selected]":":checked",v;if(e.multiple)v=[].map.call(e.querySelectorAll(f),ps);else{var u=e.querySelector(f)??e.querySelector("option:not([disabled])");v=u&&ps(u)}s(v),e.__value=v,S!==null&&r.add(S)}),Ho(()=>{var i=t();if(e===document.activeElement){var f=S;if(r.has(f))return}if(Za(e,i,a),a&&i===void 0){var v=e.querySelector(":checked");v!==null&&(i=ps(v),s(i))}e.__value=i,a=!1}),gc(e)}function ps(e){return"__value"in e?e.__value:e.value}const bc=Symbol("is custom element"),mc=Symbol("is html");function yc(e,t,s,r){var a=wc(e);a[t]!==(a[t]=s)&&(s==null?e.removeAttribute(t):typeof s!="string"&&Ec(e).includes(t)?e[t]=s:e.setAttribute(t,s))}function wc(e){return e.__attributes??(e.__attributes={[bc]:e.nodeName.includes("-"),[mc]:e.namespaceURI===ga})}var la=new Map;function Ec(e){var t=e.getAttribute("is")||e.nodeName,s=la.get(t);if(s)return s;la.set(t,s=[]);for(var r,a=e,i=Element.prototype;i!==a;){r=ua(a);for(var f in r)r[f].set&&s.push(f);a=Tr(a)}return s}function Ms(e,t,s=t){var r=new WeakSet;Wa(e,"input",async a=>{var i=a?e.defaultValue:e.value;if(i=cr(e)?fr(i):i,s(i),S!==null&&r.add(S),await Zo(),i!==(i=t())){var f=e.selectionStart,v=e.selectionEnd,u=e.value.length;if(e.value=i??"",v!==null){var p=e.value.length;f===v&&v===u&&p>u?(e.selectionStart=p,e.selectionEnd=p):(e.selectionStart=f,e.selectionEnd=Math.min(v,p))}}}),b(t)==null&&e.value&&(s(cr(e)?fr(e.value):e.value),S!==null&&r.add(S)),Bs(()=>{var a=t();if(e===document.activeElement){var i=S;if(r.has(i))return}cr(e)&&a===fr(e.value)||e.type==="date"&&!a&&!e.value||a!==e.value&&(e.value=a??"")})}function cr(e){var t=e.type;return t==="number"||t==="range"}function fr(e){return e===""?null:+e}function xc(e){return function(...t){var s=t[0];return s.preventDefault(),e==null?void 0:e.apply(this,t)}}function kc(e=!1){const t=H,s=t.l.u;if(!s)return;let r=()=>ec(t.s);if(e){let a=0,i={};const f=Nr(()=>{let v=!1;const u=t.s;for(const p in u)u[p]!==i[p]&&(i[p]=u[p],v=!0);return v&&a++,a});r=()=>n(f)}s.b.length&&Vo(()=>{oa(t,r),ur(s.b)}),yr(()=>{const a=b(()=>s.m.map(Kl));return()=>{for(const i of a)typeof i=="function"&&i()}}),s.a.length&&yr(()=>{oa(t,r),ur(s.a)})}function oa(e,t){if(e.l.s)for(const s of e.l.s)n(s);t()}function Sc(e){H===null&&_a(),ks&&H.l!==null?Ac(H).m.push(e):yr(()=>{const t=b(e);if(typeof t=="function")return t})}function Tc(e){H===null&&_a(),Sc(()=>()=>b(e))}function Ac(e){var t=e.l;return t.u??(t.u={a:[],b:[],m:[]})}const Rc="5";var fa;typeof window<"u"&&((fa=window.__svelte??(window.__svelte={})).v??(fa.v=new Set)).add(Rc);ho();var Cc=W('<div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Watch issue</span><strong class="status-warn svelte-d3ct2b"> </strong></div>'),Nc=W('<section class="notice svelte-d3ct2b"> </section>'),Mc=W('<section class="notice danger svelte-d3ct2b"> </section>'),Dc=W('<p class="terminal-line svelte-d3ct2b"><time class="svelte-d3ct2b">--:--:--</time><span class="sys svelte-d3ct2b">SYS</span><strong class="svelte-d3ct2b">Waiting for memory-core watch output...</strong></p>'),Oc=W('<strong class="svelte-d3ct2b"> </strong>'),Ic=W('<strong class="svelte-d3ct2b"> </strong>'),Fc=W('<strong class="svelte-d3ct2b"> </strong>'),Lc=W('<strong class="svelte-d3ct2b"> </strong>'),Pc=W('<strong class="svelte-d3ct2b"> </strong>'),jc=W('<p class="svelte-d3ct2b"><b class="svelte-d3ct2b">Why:</b> </p>'),$c=W('<p class="svelte-d3ct2b"><b class="svelte-d3ct2b">Issue:</b> </p>'),Wc=W('<p class="svelte-d3ct2b"><b class="svelte-d3ct2b">Fix:</b> </p>'),qc=W('<pre class="svelte-d3ct2b"> </pre>'),Uc=W('<div class="terminal-detail svelte-d3ct2b"><p class="svelte-d3ct2b"> </p> <p class="svelte-d3ct2b"><b class="svelte-d3ct2b">Rule:</b> </p> <!> <!> <!> <!></div>'),Vc=W('<section><p class="terminal-line svelte-d3ct2b"><time class="svelte-d3ct2b"> </time> <span class="svelte-d3ct2b"> </span> <!></p> <!></section>'),zc=W('<div class="metric-row svelte-d3ct2b"><div class="svelte-d3ct2b"><span class="svelte-d3ct2b"> </span> <strong class="svelte-d3ct2b"> </strong></div> <i class="svelte-d3ct2b"></i></div>'),Hc=W('<p class="empty svelte-d3ct2b">No rule counters yet.</p>'),Bc=W('<div class="metric-row warning svelte-d3ct2b"><div class="svelte-d3ct2b"><span class="svelte-d3ct2b"> </span> <strong class="svelte-d3ct2b"> </strong></div> <i class="svelte-d3ct2b"></i></div>'),Kc=W('<p class="empty svelte-d3ct2b">No file counters yet.</p>'),Yc=W('<small class="svelte-d3ct2b"> </small>'),Gc=W('<small class="svelte-d3ct2b"> </small>'),Jc=W('<section class="commit-item svelte-d3ct2b"><div class="commit-meta svelte-d3ct2b"><span> </span> <time> </time></div> <strong class="svelte-d3ct2b"> </strong> <p class="svelte-d3ct2b"> </p> <!> <!></section>'),Qc=W('<article class="glass-panel commit-watch svelte-d3ct2b"><div class="card-head svelte-d3ct2b"><h2 class="svelte-d3ct2b">Commit Watch</h2> <span class="svelte-d3ct2b"> </span></div> <div class="commit-list svelte-d3ct2b"></div></article>'),Xc=W('<small class="svelte-d3ct2b"> </small>'),Zc=W('<div class="rule-item svelte-d3ct2b"><div><div class="rule-meta svelte-d3ct2b"><span class="svelte-d3ct2b"> </span> <code class="svelte-d3ct2b"> </code></div> <p class="svelte-d3ct2b"> </p> <!></div> <button class="svelte-d3ct2b">Delete</button></div>'),ef=W('<p class="empty svelte-d3ct2b">No rules match the current filters.</p>'),tf=W('<div class="command-center svelte-d3ct2b"><aside class="sidebar svelte-d3ct2b"><div class="brand svelte-d3ct2b"><h1 class="svelte-d3ct2b">memory-core</h1> <span class="svelte-d3ct2b">command center</span></div> <nav aria-label="Dashboard navigation" class="svelte-d3ct2b"><a class="nav-item active svelte-d3ct2b" href="/"><span class="nav-icon svelte-d3ct2b">[]</span> <span>Command Center</span></a></nav> <div class="sidebar-footer svelte-d3ct2b"><div><i class="svelte-d3ct2b"></i> </div> <small class="svelte-d3ct2b"> </small></div></aside> <div class="workspace svelte-d3ct2b"><header class="topbar svelte-d3ct2b"><div class="topbar-left svelte-d3ct2b"><button class="icon-button mobile-menu svelte-d3ct2b" aria-label="Menu">=</button> <div><i class="svelte-d3ct2b"></i> <span> </span></div></div> <div class="header-metrics svelte-d3ct2b" aria-label="Global metrics"><div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Violations</span> <strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Files</span> <strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Rules</span> <strong class="svelte-d3ct2b"> </strong></div></div> <div class="top-actions svelte-d3ct2b" aria-label="Status shortcuts"><button class="icon-button svelte-d3ct2b" title="Warnings" aria-label="Warnings">!</button> <button class="icon-button svelte-d3ct2b" title="Rules" aria-label="Rules">R</button> <button class="icon-button svelte-d3ct2b" title="Database" aria-label="Database">DB</button> <button class="icon-button svelte-d3ct2b" title="Network" aria-label="Network">LAN</button></div></header> <main class="canvas svelte-d3ct2b"><section class="status-grid svelte-d3ct2b"><article class="glass-panel status-card svelte-d3ct2b"><div class="card-head svelte-d3ct2b"><h2 class="svelte-d3ct2b">Project</h2> <span class="svelte-d3ct2b"> </span></div> <div class="data-list svelte-d3ct2b"><div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Name</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Type</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Language</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Architecture</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Watcher</span><strong class="svelte-d3ct2b"> </strong></div> <!></div></article> <article class="glass-panel status-card svelte-d3ct2b"><div class="card-head svelte-d3ct2b"><h2 class="svelte-d3ct2b">Runtime</h2> <span class="svelte-d3ct2b"> </span></div> <div class="data-list svelte-d3ct2b"><div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Provider</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Check model</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Check status</span> <strong><!></strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Embedding</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Ollama URL</span><strong class="svelte-d3ct2b"> </strong></div></div></article> <article class="glass-panel status-card svelte-d3ct2b"><div class="card-head svelte-d3ct2b"><h2 class="svelte-d3ct2b">PostgreSQL</h2> <span> </span></div> <div class="data-list svelte-d3ct2b"><div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Database</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">User</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Host</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">URL</span><strong class="svelte-d3ct2b"> </strong></div></div></article></section> <!> <!> <section class="terminal-panel glass-panel svelte-d3ct2b"><div class="terminal-head svelte-d3ct2b"><div class="svelte-d3ct2b"><span class="terminal-icon svelte-d3ct2b">>_</span> <h2 class="svelte-d3ct2b">Live Feed</h2></div> <div class="window-dots svelte-d3ct2b" aria-hidden="true"><i class="svelte-d3ct2b"></i><i class="svelte-d3ct2b"></i><i class="svelte-d3ct2b"></i></div></div> <div class="terminal-body svelte-d3ct2b"><!> <!></div></section> <section class="content-grid svelte-d3ct2b"><article class="glass-panel stats-panel svelte-d3ct2b"><div class="card-head svelte-d3ct2b"><h2 class="svelte-d3ct2b">Stats</h2> <span class="svelte-d3ct2b">Recorded</span></div> <div class="stat-block svelte-d3ct2b"><h3 class="svelte-d3ct2b">Most Violated Rules</h3> <!></div> <div class="stat-block svelte-d3ct2b"><h3 class="svelte-d3ct2b">Problem Files</h3> <!></div> <div class="summary-strip svelte-d3ct2b"><div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Clean</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Issues</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Events</span><strong class="svelte-d3ct2b"> </strong></div></div></article> <!> <article class="glass-panel rule-engine svelte-d3ct2b"><div class="card-head svelte-d3ct2b"><h2 class="svelte-d3ct2b">Rule Engine</h2> <span class="svelte-d3ct2b"> </span></div> <form class="rule-form svelte-d3ct2b"><div class="control-grid svelte-d3ct2b"><select class="svelte-d3ct2b"><option>Rule</option><option>Decision</option><option>Pattern</option><option>Ignore</option></select> <select class="svelte-d3ct2b"><option>Project</option><option>Global</option></select></div> <textarea rows="3" placeholder="Rule or decision" class="svelte-d3ct2b"></textarea> <div class="control-grid svelte-d3ct2b"><input placeholder="Reason" class="svelte-d3ct2b"/> <input placeholder="Tags" class="svelte-d3ct2b"/></div> <button class="svelte-d3ct2b"> </button></form> <div class="control-grid filters svelte-d3ct2b"><select class="svelte-d3ct2b"><option>All types</option><option>Rules</option><option>Decisions</option><option>Patterns</option><option>Ignores</option></select> <input placeholder="Search rules..." class="svelte-d3ct2b"/></div> <div class="rule-list svelte-d3ct2b"></div></article></section></main></div></div>');function sf(e,t){ya(t,!1);const s=X(),r=X(),a=X(),i=X(),f=X(),v=X(),u=X(),p=X(),g=X(),E=X(),w=X(),y=X();let o=X({config:null,stats:{rules:{},files:{},topRules:[],topFiles:[]},files:[],memories:[]}),T=X([]),m=X(!1),R=X("all"),$=X(""),P=X(!1),Q=X(""),ae,qe=!1,F=X({type:"rule",scope:"project",content:"",reason:"",tags:"dashboard"});const Je=24*60*60*1e3,nt=()=>{var l;return((l=n(o).runtime)==null?void 0:l.project.name)??"memory-core"},ue=()=>{var A,N;const l=((A=n(o).runtime)==null?void 0:A.project.declaredArchitectures)??[],d=((N=n(o).runtime)==null?void 0:N.project.activeArchitectures)??[];return l.length>0?l.join(", "):d.length>0?d.join(", "):"none"};function at(l){M(T,[{...l,id:crypto.randomUUID()},...n(T)].slice(0,80))}function _t(l){return l.type==="saved"?{type:"saved",timestamp:l.timestamp,file:l.file}:l.type==="clean"?{type:"clean",timestamp:l.timestamp,file:l.file}:l.type==="skipped"?{type:"skipped",timestamp:l.timestamp,file:l.file,reason:l.reason}:l.type==="violations"?{type:"violations",timestamp:l.timestamp,file:l.file,violations:l.violations}:l.type==="error"?{type:"error",timestamp:l.timestamp,message:l.message}:l.type==="ready"?{type:"system",timestamp:l.timestamp,message:`Watching ${l.path} | ${l.rules} rules | ${l.model}`}:{type:"system",timestamp:l.timestamp,message:"Watch stopped"}}function ht(l){const d=n(o).files??[],A=d.findIndex(K=>K.file===l.file),N=d.slice();return A===-1?N.push(l):N[A]=l,N.sort((K,ie)=>ie.lastSeen.localeCompare(K.lastSeen))}function As(l){const d=n(o).watcher??{enabled:!0,running:!1,path:void 0,model:void 0,rules:void 0,lastEventAt:void 0,error:void 0};let A=n(o).files,N={...d,lastEventAt:l.timestamp,enabled:!0};l.type==="ready"&&(N={...N,running:!0,error:void 0,path:l.path,model:l.model,rules:l.rules}),l.type==="saved"&&(A=ht({file:l.file,status:"checking",lastSeen:l.timestamp,violations:[]})),l.type==="clean"&&(A=ht({file:l.file,status:"clean",lastSeen:l.timestamp,violations:[]})),l.type==="skipped"&&(A=ht({file:l.file,status:"skipped",lastSeen:l.timestamp,violations:[],message:l.reason})),l.type==="violations"&&(A=ht({file:l.file,status:"violations",lastSeen:l.timestamp,violations:l.violations})),l.type==="error"&&(N={...N,running:!1,error:l.message}),l.type==="stopped"&&(N={...N,running:!1});const K=[l,...n(o).events??[]].slice(0,100);M(o,{...n(o),files:A,events:K,watcher:N})}function es(l=[]){M(T,l.map(_t).map(d=>({...d,id:crypto.randomUUID()})).reverse().slice(0,80))}function ts(l){return new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date(l))}function ss(l){return Math.max(1,...l.map(d=>d.count))}function rs(l,d){const A=l.file||d;return l.line?`${A}:${l.line}`:A}function De(l){return l.type==="saved"?"SAVE":l.type==="clean"?"OK":l.type==="skipped"?"SKIP":l.type==="violations"?"FAIL":l.type==="error"?"WARN":"SYS"}async function Ft(){const l=await fetch("/api/snapshot");M(o,await l.json()),es(n(o).events)}async function ei(){if(!qe&&document.visibilityState!=="hidden"){qe=!0;try{const l=await fetch("/api/stats",{cache:"no-store"});if(!l.ok)return;const d=await l.json();if(!d.stats)return;M(o,{...n(o),stats:d.stats})}catch{}finally{qe=!1}}}function ti(){ae&&clearInterval(ae),ae=setInterval(()=>{ei()},2e3)}function Wr(){const l=location.protocol==="https:"?"wss:":"ws:",d=new WebSocket(`${l}//${location.host}/ws`);d.addEventListener("open",()=>{M(m,!0),at({type:"system",timestamp:new Date().toISOString(),message:"Dashboard connected"})}),d.addEventListener("close",()=>{M(m,!1),at({type:"error",timestamp:new Date().toISOString(),message:"Dashboard disconnected"}),setTimeout(Wr,1500)}),d.addEventListener("message",A=>{const N=JSON.parse(A.data);if(N.type==="snapshot"){M(o,N.snapshot),n(T).length===0&&es(n(o).events);return}N.type==="watch"&&(As(N.event),at(_t(N.event)))})}async function si(){if(n(F).content.trim()){M(P,!0),M(Q,"");try{const l=await fetch("/api/memories",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n(F))});if(!l.ok)throw new Error((await l.json()).error??"Save failed");M(F,{type:"rule",scope:"project",content:"",reason:"",tags:"dashboard"}),await Ft()}catch(l){M(Q,l.message)}finally{M(P,!1)}}}async function ri(l){M(Q,"");const d=await fetch(`/api/memories/${l}`,{method:"DELETE"});if(!d.ok){M(Q,(await d.json()).error??"Delete failed");return}await Ft()}Ft().catch(l=>{M(Q,l.message)}),Wr(),ti(),Tc(()=>{ae&&(clearInterval(ae),ae=void 0)}),we(()=>(n(o),n(R),n($)),()=>{M(s,n(o).memories.filter(l=>{const d=n(R)==="all"||l.type===n(R),A=`${l.type} ${l.scope} ${l.content} ${l.reason??""} ${l.tags.join(" ")}`.toLowerCase();return d&&A.includes(n($).toLowerCase())}))}),we(()=>n(o),()=>{M(r,Object.values(n(o).stats.files??{}).reduce((l,d)=>l+d,0))}),we(()=>n(o),()=>{M(a,n(o).files.filter(l=>l.status==="clean").length)}),we(()=>n(o),()=>{M(i,Object.values(n(o).stats.rules).reduce((l,d)=>l+d,0))}),we(()=>n(o),()=>{M(f,n(o).stats.recentViolations??[])}),we(()=>n(f),()=>{M(v,n(f).filter(l=>{if(!(l.source==="hook"||l.source==="ci"))return!1;const d=Date.parse(l.timestamp);return Number.isNaN(d)?!1:Date.now()-d<=Je}))}),we(()=>n(r),()=>{M(u,n(r))}),we(()=>n(o),()=>{M(p,Object.keys(n(o).stats.files??{}).length)}),we(()=>n(o),()=>{M(g,n(o).memories.filter(l=>["rule","pattern","decision"].includes(l.type)).length)}),we(()=>n(o),()=>{var l;M(E,((l=n(o).memoryCount)==null?void 0:l.total)??n(o).memories.length)}),we(()=>n(o),()=>{var l;M(w,((l=n(o).memoryCount)==null?void 0:l.relevant)??n(o).memories.length)}),we(()=>(n(m),n(o)),()=>{var l,d;M(y,n(m)?((l=n(o).watcher)==null?void 0:l.enabled)===!1?{live:!1,label:"Watch off"}:(d=n(o).watcher)!=null&&d.running?{live:!0,label:"Watcher live"}:{live:!1,label:"Watcher idle"}:{live:!1,label:"Disconnected"})}),Bo(),kc();var qr=tf(),Ur=_(qr),ni=h(_(Ur),4),Ks=_(ni);let Vr;var ai=h(_(Ks)),ii=h(Ks,2),li=_(ii),oi=h(Ur,2),zr=_(oi),Hr=_(zr),Br=h(_(Hr),2);let Kr;var ci=h(_(Br),2),fi=_(ci),ui=h(Hr,2),Yr=_(ui),vi=h(_(Yr),2),di=_(vi),Gr=h(Yr,2),pi=h(_(Gr),2),_i=_(pi),hi=h(Gr,2),gi=h(_(hi),2),bi=_(gi),mi=h(zr,2),Jr=_(mi),Qr=_(Jr),Xr=_(Qr),yi=h(_(Xr),2),wi=_(yi),Ei=h(Xr,2),Zr=_(Ei),xi=h(_(Zr)),ki=_(xi),en=h(Zr,2),Si=h(_(en)),Ti=_(Si),tn=h(en,2),Ai=h(_(tn)),Ri=_(Ai),sn=h(tn,2),Ci=h(_(sn)),Ni=_(Ci),rn=h(sn,2),Mi=h(_(rn)),Di=_(Mi),Oi=h(rn,2);{var Ii=l=>{var d=Cc(),A=h(_(d)),N=_(A);V(()=>x(N,(n(o),b(()=>n(o).watcher.error)))),j(l,d)};oe(Oi,l=>{n(o),b(()=>{var d;return(d=n(o).watcher)==null?void 0:d.error})&&l(Ii)})}var nn=h(Qr,2),an=_(nn),Fi=h(_(an),2),Li=_(Fi),Pi=h(an,2),ln=_(Pi),ji=h(_(ln)),$i=_(ji),on=h(ln,2),Wi=h(_(on)),qi=_(Wi),cn=h(on,2),fn=h(_(cn),2);let un;var Ui=_(fn);{var Vi=l=>{var d=ra();V(()=>x(d,(n(o),b(()=>{var A;return(A=n(o).runtime)!=null&&A.model.checkModelInstalled?"installed":"missing"})))),j(l,d)},zi=l=>{var d=ra();V(()=>x(d,(n(o),b(()=>{var A;return(A=n(o).runtime)!=null&&A.model.apiKeyConfigured?"api key set":"api key missing"})))),j(l,d)};oe(Ui,l=>{n(o),b(()=>{var d;return((d=n(o).runtime)==null?void 0:d.model.provider)==="ollama"})?l(Vi):l(zi,-1)})}var vn=h(cn,2),Hi=h(_(vn)),Bi=_(Hi),Ki=h(vn,2),Yi=h(_(Ki)),Gi=_(Yi),Ji=h(nn,2),dn=_(Ji),pn=h(_(dn),2);let _n;var Qi=_(pn),Xi=h(dn,2),hn=_(Xi),Zi=h(_(hn)),el=_(Zi),gn=h(hn,2),tl=h(_(gn)),sl=_(tl),bn=h(gn,2),rl=h(_(bn)),nl=_(rl),al=h(bn,2),il=h(_(al)),ll=_(il),mn=h(Jr,2);{var ol=l=>{var d=Nc(),A=_(d);V(()=>x(A,(n(o),b(()=>n(o).dbError)))),j(l,d)};oe(mn,l=>{n(o),b(()=>n(o).dbError)&&l(ol)})}var yn=h(mn,2);{var cl=l=>{var d=Mc(),A=_(d);V(()=>x(A,n(Q))),j(l,d)};oe(yn,l=>{n(Q)&&l(cl)})}var wn=h(yn,2),fl=h(_(wn),2),En=_(fl);{var ul=l=>{var d=Dc();j(l,d)};oe(En,l=>{n(T),b(()=>n(T).length===0)&&l(ul)})}var vl=h(En,2);Wt(vl,1,()=>(n(T),b(()=>[...n(T)].reverse())),l=>l.id,(l,d)=>{var A=Vc();let N;var K=_(A),ie=_(K),ve=_(ie),L=h(ie,2),k=_(L),q=h(L,2);{var Qe=B=>{var Y=Oc(),he=_(Y);V(()=>x(he,(n(d),b(()=>n(d).message)))),j(B,Y)},ns=B=>{var Y=Ic(),he=_(Y);V(()=>x(he,`saved: ${n(d),b(()=>n(d).file)??""}`)),j(B,Y)},as=B=>{var Y=Fc(),he=_(Y);V(()=>x(he,`${n(d),b(()=>n(d).file)??""} - no violations`)),j(B,Y)},Lt=B=>{var Y=Lc(),he=_(Y);V(()=>x(he,`${n(d),b(()=>n(d).file)??""} - skipped: ${n(d),b(()=>n(d).reason)??""}`)),j(B,Y)},Ue=B=>{var Y=Pc(),he=_(Y);V(()=>x(he,`${n(d),b(()=>n(d).violations.length)??""} violation${n(d),b(()=>n(d).violations.length===1?"":"s")??""} in ${n(d),b(()=>n(d).file)??""}`)),j(B,Y)};oe(q,B=>{n(d),b(()=>n(d).type==="system"||n(d).type==="error")?B(Qe):(n(d),b(()=>n(d).type==="saved")?B(ns,1):(n(d),b(()=>n(d).type==="clean")?B(as,2):(n(d),b(()=>n(d).type==="skipped")?B(Lt,3):B(Ue,-1))))})}var Pt=h(K,2);{var jt=B=>{var Y=lc(),he=jo(Y);Wt(he,3,()=>(n(d),b(()=>n(d).violations)),(Rs,z)=>`${n(d).id}-${z}`,(Rs,z,Oe)=>{var Ve=Uc(),$t=_(Ve),Dl=_($t),Wn=h($t,2),Ol=h(_(Wn)),qn=h(Wn,2);{var Il=se=>{var Ie=jc(),gt=h(_(Ie));V(()=>x(gt,` ${n(z),b(()=>n(z).reason)??""}`)),j(se,Ie)};oe(qn,se=>{n(z),b(()=>n(z).reason)&&se(Il)})}var Un=h(qn,2);{var Fl=se=>{var Ie=$c(),gt=h(_(Ie));V(()=>x(gt,` ${n(z),b(()=>n(z).issue)??""}`)),j(se,Ie)};oe(Un,se=>{n(z),b(()=>n(z).issue)&&se(Fl)})}var Vn=h(Un,2);{var Ll=se=>{var Ie=Wc(),gt=h(_(Ie));V(()=>x(gt,` ${n(z),b(()=>n(z).suggestion)??""}`)),j(se,Ie)};oe(Vn,se=>{n(z),b(()=>n(z).suggestion)&&se(Ll)})}var Pl=h(Vn,2);{var jl=se=>{var Ie=qc(),gt=_(Ie);V(()=>x(gt,(n(z),b(()=>n(z).code)))),j(se,Ie)};oe(Pl,se=>{n(z),b(()=>n(z).code)&&se(jl)})}V(se=>{x(Dl,`[${n(Oe)+1}] ${se??""}`),x(Ol,` ${n(z),b(()=>n(z).rule)??""}`)},[()=>(n(z),n(d),b(()=>rs(n(z),n(d).file)))]),j(Rs,Ve)}),j(B,Y)};oe(Pt,B=>{n(d),b(()=>n(d).type==="violations")&&B(jt)})}V((B,Y)=>{N=os(A,1,"svelte-d3ct2b",null,N,{"error-line":n(d).type==="error","ok-line":n(d).type==="clean","violation-line":n(d).type==="violations"}),x(ve,B),x(k,Y)},[()=>(n(d),b(()=>ts(n(d).timestamp))),()=>(n(d),b(()=>De(n(d))))]),j(l,A)});var dl=h(wn,2),xn=_(dl),kn=h(_(xn),2),pl=h(_(kn),2);Wt(pl,1,()=>(n(o),b(()=>n(o).stats.topRules.slice(0,5))),l=>l.name,(l,d)=>{var A=zc(),N=_(A),K=_(N),ie=_(K),ve=h(K,2),L=_(ve),k=h(N,2);V(q=>{x(ie,(n(d),b(()=>n(d).name))),x(L,(n(d),b(()=>n(d).count))),ia(k,q)},[()=>(n(d),n(o),b(()=>`width: ${n(d).count/ss(n(o).stats.topRules)*100}%`))]),j(l,A)},l=>{var d=Hc();j(l,d)});var Sn=h(kn,2),_l=h(_(Sn),2);Wt(_l,1,()=>(n(o),b(()=>n(o).stats.topFiles.slice(0,5))),l=>l.name,(l,d)=>{var A=Bc(),N=_(A),K=_(N),ie=_(K),ve=h(K,2),L=_(ve),k=h(N,2);V(q=>{x(ie,(n(d),b(()=>n(d).name))),x(L,(n(d),b(()=>n(d).count))),ia(k,q)},[()=>(n(d),n(o),b(()=>`width: ${n(d).count/ss(n(o).stats.topFiles)*100}%`))]),j(l,A)},l=>{var d=Kc();j(l,d)});var hl=h(Sn,2),Tn=_(hl),gl=h(_(Tn)),bl=_(gl),An=h(Tn,2),ml=h(_(An)),yl=_(ml),wl=h(An,2),El=h(_(wl)),xl=_(El),Rn=h(xn,2);{var kl=l=>{var d=Qc(),A=_(d),N=h(_(A),2),K=_(N),ie=h(A,2);Wt(ie,7,()=>(n(v),b(()=>n(v).slice(0,8))),(ve,L)=>`${ve.timestamp}-${L}`,(ve,L)=>{var k=Jc(),q=_(k),Qe=_(q),ns=_(Qe),as=h(Qe,2),Lt=_(as),Ue=h(q,2),Pt=_(Ue),jt=h(Ue,2),B=_(jt),Y=h(jt,2);{var he=Oe=>{var Ve=Yc(),$t=_(Ve);V(()=>x($t,(n(L),b(()=>n(L).issue)))),j(Oe,Ve)};oe(Y,Oe=>{n(L),b(()=>n(L).issue)&&Oe(he)})}var Rs=h(Y,2);{var z=Oe=>{var Ve=Gc(),$t=_(Ve);V(()=>x($t,(n(L),b(()=>n(L).suggestion)))),j(Oe,Ve)};oe(Rs,Oe=>{n(L),b(()=>n(L).suggestion)&&Oe(z)})}V((Oe,Ve)=>{x(ns,(n(L),b(()=>n(L).source==="ci"?"CI":"Hook"))),x(Lt,Oe),x(Pt,(n(L),b(()=>n(L).rule))),x(B,Ve)},[()=>(n(L),b(()=>ts(n(L).timestamp))),()=>(n(L),b(()=>rs(n(L),n(L).file||"staged diff")))]),j(ve,k)}),V(()=>x(K,`${n(v),b(()=>n(v).length)??""} in 24h`)),j(l,d)};oe(Rn,l=>{n(v),b(()=>n(v).length>0)&&l(kl)})}var Sl=h(Rn,2),Cn=_(Sl),Tl=h(_(Cn),2),Al=_(Tl),Ys=h(Cn,2),Nn=_(Ys),Gs=_(Nn),Js=_(Gs);Js.value=Js.__value="rule";var Qs=h(Js);Qs.value=Qs.__value="decision";var Xs=h(Qs);Xs.value=Xs.__value="pattern";var Mn=h(Xs);Mn.value=Mn.__value="ignore";var Dn=h(Gs,2),Zs=_(Dn);Zs.value=Zs.__value="project";var On=h(Zs);On.value=On.__value="global";var In=h(Nn,2),Fn=h(In,2),Ln=_(Fn),Rl=h(Ln,2),Pn=h(Fn,2),Cl=_(Pn),jn=h(Ys,2),er=_(jn),tr=_(er);tr.value=tr.__value="all";var sr=h(tr);sr.value=sr.__value="rule";var rr=h(sr);rr.value=rr.__value="decision";var nr=h(rr);nr.value=nr.__value="pattern";var $n=h(nr);$n.value=$n.__value="ignore";var Nl=h(er,2),Ml=h(jn,2);Wt(Ml,5,()=>n(s),l=>l.id,(l,d)=>{var A=Zc(),N=_(A),K=_(N),ie=_(K),ve=_(ie),L=h(ie,2),k=_(L),q=h(K,2),Qe=_(q),ns=h(q,2);{var as=Ue=>{var Pt=Xc(),jt=_(Pt);V(()=>x(jt,(n(d),b(()=>n(d).reason)))),j(Ue,Pt)};oe(ns,Ue=>{n(d),b(()=>n(d).reason)&&Ue(as)})}var Lt=h(N,2);V(Ue=>{x(ve,(n(d),b(()=>n(d).scope))),x(k,`Rule-${Ue??""}`),x(Qe,(n(d),b(()=>n(d).content))),yc(Lt,"aria-label",(n(d),b(()=>`Delete ${n(d).id}`)))},[()=>(n(d),b(()=>String(n(d).id).padStart(3,"0")))]),ta("click",Lt,()=>ri(n(d).id)),j(l,A)},l=>{var d=ef();j(l,d)}),V((l,d,A)=>{var N,K,ie,ve,L;Vr=os(Ks,1,"status-chip svelte-d3ct2b",null,Vr,{live:n(y).live}),x(ai,` ${n(y),b(()=>n(y).label)??""}`),x(li,(n(o),b(()=>{var k;return((k=n(o).runtime)==null?void 0:k.model.label)??"runtime pending"}))),Kr=os(Br,1,"live-label svelte-d3ct2b",null,Kr,{live:n(y).live}),x(fi,(n(y),b(()=>n(y).label))),x(di,n(u)),x(_i,n(p)),x(bi,n(g)),x(wi,(n(o),b(()=>{var k;return(k=n(o).runtime)!=null&&k.project.initialized?"Initialized":"Not initialized"}))),x(ki,l),x(Ti,(n(o),b(()=>{var k;return((k=n(o).runtime)==null?void 0:k.project.type)??"unknown"}))),x(Ri,(n(o),b(()=>{var k;return((k=n(o).runtime)==null?void 0:k.project.language)??"unknown"}))),x(Ni,d),x(Di,(n(o),b(()=>{var k,q;return((k=n(o).watcher)==null?void 0:k.enabled)===!1?"disabled":(q=n(o).watcher)!=null&&q.running?"running":"idle"}))),x(Li,(n(o),b(()=>{var k;return((k=n(o).runtime)==null?void 0:k.model.label)??"pending"}))),x($i,(n(o),b(()=>{var k;return((k=n(o).runtime)==null?void 0:k.model.provider)??"unknown"}))),x(qi,(n(o),b(()=>{var k,q,Qe;return((k=n(o).runtime)==null?void 0:k.model.checkModelResolved)??((q=n(o).runtime)==null?void 0:q.model.checkModel)??((Qe=n(o).runtime)==null?void 0:Qe.model.chatModel)??"unknown"}))),un=os(fn,1,"svelte-d3ct2b",null,un,{"status-ok":((N=n(o).runtime)==null?void 0:N.model.checkModelInstalled)||((K=n(o).runtime)==null?void 0:K.model.apiKeyConfigured),"status-warn":((ie=n(o).runtime)==null?void 0:ie.model.checkModelInstalled)===!1||((ve=n(o).runtime)==null?void 0:ve.model.error)}),x(Bi,(n(o),b(()=>{var k,q;return((k=n(o).runtime)==null?void 0:k.model.embeddingModelResolved)??((q=n(o).runtime)==null?void 0:q.model.embeddingModel)??"unknown"}))),x(Gi,(n(o),b(()=>{var k;return((k=n(o).runtime)==null?void 0:k.model.ollamaUrl)??"unknown"}))),_n=os(pn,1,"svelte-d3ct2b",null,_n,{success:(L=n(o).runtime)==null?void 0:L.postgres.connected}),x(Qi,(n(o),b(()=>{var k;return(k=n(o).runtime)!=null&&k.postgres.connected?"Connected":"Not connected"}))),x(el,(n(o),b(()=>{var k,q;return((k=n(o).runtime)==null?void 0:k.postgres.serverDatabase)??((q=n(o).runtime)==null?void 0:q.postgres.database)??"unknown"}))),x(sl,(n(o),b(()=>{var k,q;return((k=n(o).runtime)==null?void 0:k.postgres.serverUser)??((q=n(o).runtime)==null?void 0:q.postgres.user)??"unknown"}))),x(nl,`${n(o),b(()=>{var k;return((k=n(o).runtime)==null?void 0:k.postgres.host)??"unknown"})??""}${n(o),b(()=>{var k;return(k=n(o).runtime)!=null&&k.postgres.port?`:${n(o).runtime.postgres.port}`:""})??""}`),x(ll,(n(o),b(()=>{var k;return((k=n(o).runtime)==null?void 0:k.postgres.url)??"(not set)"}))),x(bl,n(a)),x(yl,n(u)),x(xl,n(i)),x(Al,`${n(g)??""} rules active`),Pn.disabled=A,x(Cl,n(P)?"Saving...":"Add New Architecture Rule")},[()=>b(nt),()=>b(ue),()=>(n(P),n(F),b(()=>n(P)||!n(F).content.trim()))]),or(Gs,()=>n(F).type,l=>is(F,n(F).type=l)),or(Dn,()=>n(F).scope,l=>is(F,n(F).scope=l)),Ms(In,()=>n(F).content,l=>is(F,n(F).content=l)),Ms(Ln,()=>n(F).reason,l=>is(F,n(F).reason=l)),Ms(Rl,()=>n(F).tags,l=>is(F,n(F).tags=l)),ta("submit",Ys,xc(si)),or(er,()=>n(R),l=>M(R,l)),Ms(Nl,()=>n($),l=>M($,l)),j(e,qr),wa()}oc(sf,{target:document.getElementById("app")});
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>Memory Core Dashboard</title>
|
|
7
|
-
<script type="module" crossorigin src="/assets/index-
|
|
7
|
+
<script type="module" crossorigin src="/assets/index-CbN3F0rB.js"></script>
|
|
8
8
|
<link rel="stylesheet" crossorigin href="/assets/index-CJyZEmIe.css">
|
|
9
9
|
</head>
|
|
10
10
|
<body>
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
saveMemory,
|
|
13
13
|
startWatch,
|
|
14
14
|
updateMemory
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-VF2GJEJP.js";
|
|
16
16
|
|
|
17
17
|
// src/dashboard-server.ts
|
|
18
18
|
import { createHash } from "crypto";
|
|
@@ -696,7 +696,8 @@ async function startDashboard(options = {}) {
|
|
|
696
696
|
if (options.watch ?? true) {
|
|
697
697
|
watcherStatus.enabled = true;
|
|
698
698
|
void startWatch({
|
|
699
|
-
|
|
699
|
+
projectRoot,
|
|
700
|
+
path: ".",
|
|
700
701
|
onEvent: handleWatchEvent,
|
|
701
702
|
exitOnSetupFailure: false
|
|
702
703
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shahmilsaari/memory-core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"description": "Universal AI memory core — generate AI context files from architecture profiles with RAG support",
|
|
5
5
|
"homepage": "https://memory-core.shahmilsaari.my/",
|
|
6
6
|
"type": "module",
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var ql=Object.defineProperty;var zn=e=>{throw TypeError(e)};var Ul=(e,t,s)=>t in e?ql(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var Fe=(e,t,s)=>Ul(e,typeof t!="symbol"?t+"":t,s),tr=(e,t,s)=>t.has(e)||zn("Cannot "+s);var c=(e,t,s)=>(tr(e,t,"read from private field"),s?s.call(e):t.get(e)),N=(e,t,s)=>t.has(e)?zn("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),D=(e,t,s,r)=>(tr(e,t,"write to private field"),r?r.call(e,s):t.set(e,s),s),U=(e,t,s)=>(tr(e,t,"access private method"),s);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))r(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const u of i.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&r(u)}).observe(document,{childList:!0,subtree:!0});function s(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(a){if(a.ep)return;a.ep=!0;const i=s(a);fetch(a.href,i)}})();const Vl=!1;var wr=Array.isArray,zl=Array.prototype.indexOf,Vt=Array.prototype.includes,Ws=Array.from,Hl=Object.defineProperty,is=Object.getOwnPropertyDescriptor,ua=Object.getOwnPropertyDescriptors,Bl=Object.prototype,Kl=Array.prototype,Er=Object.getPrototypeOf,Hn=Object.isExtensible;const Yl=()=>{};function Gl(e){return e()}function lr(e){for(var t=0;t<e.length;t++)e[t]()}function va(){var e,t,s=new Promise((r,a)=>{e=r,t=a});return{promise:s,resolve:e,reject:t}}const le=2,zt=4,bs=8,da=1<<24,Be=16,$e=32,vt=64,or=128,Re=512,X=1024,re=2048,We=4096,ce=8192,Ce=16384,Dt=32768,Bn=1<<25,Ht=65536,cr=1<<17,Jl=1<<18,Yt=1<<19,pa=1<<20,He=1<<25,Rt=65536,Fs=1<<21,fs=1<<22,ft=1<<23,kt=Symbol("$state"),Xe=new class extends Error{constructor(){super(...arguments);Fe(this,"name","StaleReactionError");Fe(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};function _a(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Ql(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Xl(e,t,s){throw new Error("https://svelte.dev/e/each_key_duplicate")}function Zl(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function eo(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function to(e){throw new Error("https://svelte.dev/e/effect_orphan")}function so(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function ro(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function no(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function ao(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function io(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const lo=1,oo=2,ha=4,co=8,fo=16,uo=2,ee=Symbol(),ga="http://www.w3.org/1999/xhtml";function vo(){console.warn("https://svelte.dev/e/derived_inert")}function po(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function _o(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function ba(e){return e===this.v}function ho(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function ma(e){return!ho(e,this.v)}let ms=!1,go=!1;function bo(){ms=!0}let z=null;function Bt(e){z=e}function ya(e,t=!1,s){z={p:z,i:!1,c:null,e:null,s:e,x:null,r:O,l:ms&&!t?{s:null,u:null,$:[]}:null}}function wa(e){var t=z,s=t.e;if(s!==null){t.e=null;for(var r of s)Ua(r)}return t.i=!0,z=t.p,{}}function ys(){return!ms||z!==null&&z.l===null}let gt=[];function Ea(){var e=gt;gt=[],lr(e)}function ut(e){if(gt.length===0&&!ls){var t=gt;queueMicrotask(()=>{t===gt&&Ea()})}gt.push(e)}function mo(){for(;gt.length>0;)Ea()}function xa(e){var t=O;if(t===null)return I.f|=ft,e;if(!(t.f&Dt)&&!(t.f&zt))throw e;ct(e,t)}function ct(e,t){for(;t!==null;){if(t.f&or){if(!(t.f&Dt))throw e;try{t.b.error(e);return}catch(s){e=s}}t=t.parent}throw e}const yo=-7169;function Y(e,t){e.f=e.f&yo|t}function xr(e){e.f&Re||e.deps===null?Y(e,X):Y(e,We)}function ka(e){if(e!==null)for(const t of e)!(t.f&le)||!(t.f&Rt)||(t.f^=Rt,ka(t.deps))}function Sa(e,t,s){e.f&re?t.add(e):e.f&We&&s.add(e),ka(e.deps),Y(e,X)}const ht=new Set;let S=null,se=null,fr=null,ls=!1,sr=!1,Pt=null,Rs=null;var Kn=0;let wo=1;var jt,$t,mt,Ze,Ue,vs,be,ds,lt,et,Ve,Wt,qt,yt,Z,Cs,Ta,Ns,ur,Ms,Eo;const Ps=class Ps{constructor(){N(this,Z);Fe(this,"id",wo++);Fe(this,"current",new Map);Fe(this,"previous",new Map);N(this,jt,new Set);N(this,$t,new Set);N(this,mt,new Set);N(this,Ze,new Map);N(this,Ue,new Map);N(this,vs,null);N(this,be,[]);N(this,ds,[]);N(this,lt,new Set);N(this,et,new Set);N(this,Ve,new Map);N(this,Wt,new Set);Fe(this,"is_fork",!1);N(this,qt,!1);N(this,yt,new Set)}skip_effect(t){c(this,Ve).has(t)||c(this,Ve).set(t,{d:[],m:[]}),c(this,Wt).delete(t)}unskip_effect(t,s=r=>this.schedule(r)){var r=c(this,Ve).get(t);if(r){c(this,Ve).delete(t);for(var a of r.d)Y(a,re),s(a);for(a of r.m)Y(a,We),s(a)}c(this,Wt).add(t)}capture(t,s,r=!1){t.v!==ee&&!this.previous.has(t)&&this.previous.set(t,t.v),t.f&ft||(this.current.set(t,[s,r]),se==null||se.set(t,s)),this.is_fork||(t.v=s)}activate(){S=this}deactivate(){S=null,se=null}flush(){try{sr=!0,S=this,U(this,Z,Ns).call(this)}finally{Kn=0,fr=null,Pt=null,Rs=null,sr=!1,S=null,se=null,St.clear()}}discard(){for(const t of c(this,$t))t(this);c(this,$t).clear(),c(this,mt).clear(),ht.delete(this)}register_created_effect(t){c(this,ds).push(t)}increment(t,s){let r=c(this,Ze).get(s)??0;if(c(this,Ze).set(s,r+1),t){let a=c(this,Ue).get(s)??0;c(this,Ue).set(s,a+1)}}decrement(t,s,r){let a=c(this,Ze).get(s)??0;if(a===1?c(this,Ze).delete(s):c(this,Ze).set(s,a-1),t){let i=c(this,Ue).get(s)??0;i===1?c(this,Ue).delete(s):c(this,Ue).set(s,i-1)}c(this,qt)||r||(D(this,qt,!0),ut(()=>{D(this,qt,!1),this.flush()}))}transfer_effects(t,s){for(const r of t)c(this,lt).add(r);for(const r of s)c(this,et).add(r);t.clear(),s.clear()}oncommit(t){c(this,jt).add(t)}ondiscard(t){c(this,$t).add(t)}on_fork_commit(t){c(this,mt).add(t)}run_fork_commit_callbacks(){for(const t of c(this,mt))t(this);c(this,mt).clear()}settled(){return(c(this,vs)??D(this,vs,va())).promise}static ensure(){if(S===null){const t=S=new Ps;sr||(ht.add(S),ls||ut(()=>{S===t&&t.flush()}))}return S}apply(){{se=null;return}}schedule(t){var a;if(fr=t,(a=t.b)!=null&&a.is_pending&&t.f&(zt|bs|da)&&!(t.f&Dt)){t.b.defer_effect(t);return}for(var s=t;s.parent!==null;){s=s.parent;var r=s.f;if(Pt!==null&&s===O&&(I===null||!(I.f&le)))return;if(r&(vt|$e)){if(!(r&X))return;s.f^=X}}c(this,be).push(s)}};jt=new WeakMap,$t=new WeakMap,mt=new WeakMap,Ze=new WeakMap,Ue=new WeakMap,vs=new WeakMap,be=new WeakMap,ds=new WeakMap,lt=new WeakMap,et=new WeakMap,Ve=new WeakMap,Wt=new WeakMap,qt=new WeakMap,yt=new WeakMap,Z=new WeakSet,Cs=function(){return this.is_fork||c(this,Ue).size>0},Ta=function(){for(const r of c(this,yt))for(const a of c(r,Ue).keys()){for(var t=!1,s=a;s.parent!==null;){if(c(this,Ve).has(s)){t=!0;break}s=s.parent}if(!t)return!0}return!1},Ns=function(){var d,v;if(Kn++>1e3&&(ht.delete(this),ko()),!U(this,Z,Cs).call(this)){for(const p of c(this,lt))c(this,et).delete(p),Y(p,re),this.schedule(p);for(const p of c(this,et))Y(p,We),this.schedule(p)}const t=c(this,be);D(this,be,[]),this.apply();var s=Pt=[],r=[],a=Rs=[];for(const p of t)try{U(this,Z,ur).call(this,p,s,r)}catch(g){throw Ca(p),g}if(S=null,a.length>0){var i=Ps.ensure();for(const p of a)i.schedule(p)}if(Pt=null,Rs=null,U(this,Z,Cs).call(this)||U(this,Z,Ta).call(this)){U(this,Z,Ms).call(this,r),U(this,Z,Ms).call(this,s);for(const[p,g]of c(this,Ve))Ra(p,g)}else{c(this,Ze).size===0&&ht.delete(this),c(this,lt).clear(),c(this,et).clear();for(const p of c(this,jt))p(this);c(this,jt).clear(),Yn(r),Yn(s),(d=c(this,vs))==null||d.resolve()}var u=S;if(c(this,be).length>0){const p=u??(u=this);c(p,be).push(...c(this,be).filter(g=>!c(p,be).includes(g)))}u!==null&&(ht.add(u),U(v=u,Z,Ns).call(v))},ur=function(t,s,r){t.f^=X;for(var a=t.first;a!==null;){var i=a.f,u=(i&($e|vt))!==0,d=u&&(i&X)!==0,v=d||(i&ce)!==0||c(this,Ve).has(a);if(!v&&a.fn!==null){u?a.f^=X:i&zt?s.push(a):Gt(a)&&(i&Be&&c(this,et).add(a),Mt(a));var p=a.first;if(p!==null){a=p;continue}}for(;a!==null;){var g=a.next;if(g!==null){a=g;break}a=a.parent}}},Ms=function(t){for(var s=0;s<t.length;s+=1)Sa(t[s],c(this,lt),c(this,et))},Eo=function(){var g,E,w;for(const y of ht){var t=y.id<this.id,s=[];for(const[o,[T,m]]of this.current){if(y.current.has(o)){var r=y.current.get(o)[0];if(t&&T!==r)y.current.set(o,[T,m]);else continue}s.push(o)}var a=[...y.current.keys()].filter(o=>!this.current.has(o));if(a.length===0)t&&y.discard();else if(s.length>0){if(t)for(const o of c(this,Wt))y.unskip_effect(o,T=>{var m;T.f&(Be|fs)?y.schedule(T):U(m=y,Z,Ms).call(m,[T])});y.activate();var i=new Set,u=new Map;for(var d of s)Aa(d,a,i,u);u=new Map;var v=[...y.current.keys()].filter(o=>this.current.has(o)?this.current.get(o)[0]!==o:!0);for(const o of c(this,ds))!(o.f&(Ce|ce|cr))&&kr(o,v,u)&&(o.f&(fs|Be)?(Y(o,re),y.schedule(o)):c(y,lt).add(o));if(c(y,be).length>0){y.apply();for(var p of c(y,be))U(g=y,Z,ur).call(g,p,[],[]);D(y,be,[])}y.deactivate()}}for(const y of ht)c(y,yt).has(this)&&(c(y,yt).delete(this),c(y,yt).size===0&&!U(E=y,Z,Cs).call(E)&&(y.activate(),U(w=y,Z,Ns).call(w)))};let Ct=Ps;function xo(e){var t=ls;ls=!0;try{for(var s;;){if(mo(),S===null)return s;S.flush()}}finally{ls=t}}function ko(){try{so()}catch(e){ct(e,fr)}}let Le=null;function Yn(e){var t=e.length;if(t!==0){for(var s=0;s<t;){var r=e[s++];if(!(r.f&(Ce|ce))&&Gt(r)&&(Le=new Set,Mt(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&za(r),(Le==null?void 0:Le.size)>0)){St.clear();for(const a of Le){if(a.f&(Ce|ce))continue;const i=[a];let u=a.parent;for(;u!==null;)Le.has(u)&&(Le.delete(u),i.push(u)),u=u.parent;for(let d=i.length-1;d>=0;d--){const v=i[d];v.f&(Ce|ce)||Mt(v)}}Le.clear()}}Le=null}}function Aa(e,t,s,r){if(!s.has(e)&&(s.add(e),e.reactions!==null))for(const a of e.reactions){const i=a.f;i&le?Aa(a,t,s,r):i&(fs|Be)&&!(i&re)&&kr(a,t,r)&&(Y(a,re),Sr(a))}}function kr(e,t,s){const r=s.get(e);if(r!==void 0)return r;if(e.deps!==null)for(const a of e.deps){if(Vt.call(t,a))return!0;if(a.f&le&&kr(a,t,s))return s.set(a,!0),!0}return s.set(e,!1),!1}function Sr(e){S.schedule(e)}function Ra(e,t){if(!(e.f&$e&&e.f&X)){e.f&re?t.d.push(e):e.f&We&&t.m.push(e),Y(e,X);for(var s=e.first;s!==null;)Ra(s,t),s=s.next}}function Ca(e){Y(e,X);for(var t=e.first;t!==null;)Ca(t),t=t.next}function So(e){let t=0,s=Nt(0),r;return()=>{Cr()&&(n(s),Us(()=>(t===0&&(r=b(()=>e(()=>os(s)))),t+=1,()=>{ut(()=>{t-=1,t===0&&(r==null||r(),r=void 0,os(s))})})))}}var To=Ht|Yt;function Ao(e,t,s,r){new Ro(e,t,s,r)}var ke,yr,Se,wt,ue,Te,oe,me,tt,Et,ot,Ut,ps,_s,st,js,G,Co,No,Mo,vr,Ds,Os,dr,pr;class Ro{constructor(t,s,r,a){N(this,G);Fe(this,"parent");Fe(this,"is_pending",!1);Fe(this,"transform_error");N(this,ke);N(this,yr,null);N(this,Se);N(this,wt);N(this,ue);N(this,Te,null);N(this,oe,null);N(this,me,null);N(this,tt,null);N(this,Et,0);N(this,ot,0);N(this,Ut,!1);N(this,ps,new Set);N(this,_s,new Set);N(this,st,null);N(this,js,So(()=>(D(this,st,Nt(c(this,Et))),()=>{D(this,st,null)})));var i;D(this,ke,t),D(this,Se,s),D(this,wt,u=>{var d=O;d.b=this,d.f|=or,r(u)}),this.parent=O.b,this.transform_error=a??((i=this.parent)==null?void 0:i.transform_error)??(u=>u),D(this,ue,Mr(()=>{U(this,G,vr).call(this)},To))}defer_effect(t){Sa(t,c(this,ps),c(this,_s))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!c(this,Se).pending}update_pending_count(t,s){U(this,G,dr).call(this,t,s),D(this,Et,c(this,Et)+t),!(!c(this,st)||c(this,Ut))&&(D(this,Ut,!0),ut(()=>{D(this,Ut,!1),c(this,st)&&Kt(c(this,st),c(this,Et))}))}get_effect_pending(){return c(this,js).call(this),n(c(this,st))}error(t){if(!c(this,Se).onerror&&!c(this,Se).failed)throw t;S!=null&&S.is_fork?(c(this,Te)&&S.skip_effect(c(this,Te)),c(this,oe)&&S.skip_effect(c(this,oe)),c(this,me)&&S.skip_effect(c(this,me)),S.on_fork_commit(()=>{U(this,G,pr).call(this,t)})):U(this,G,pr).call(this,t)}}ke=new WeakMap,yr=new WeakMap,Se=new WeakMap,wt=new WeakMap,ue=new WeakMap,Te=new WeakMap,oe=new WeakMap,me=new WeakMap,tt=new WeakMap,Et=new WeakMap,ot=new WeakMap,Ut=new WeakMap,ps=new WeakMap,_s=new WeakMap,st=new WeakMap,js=new WeakMap,G=new WeakSet,Co=function(){try{D(this,Te,Ae(()=>c(this,wt).call(this,c(this,ke))))}catch(t){this.error(t)}},No=function(t){const s=c(this,Se).failed;s&&D(this,me,Ae(()=>{s(c(this,ke),()=>t,()=>()=>{})}))},Mo=function(){const t=c(this,Se).pending;t&&(this.is_pending=!0,D(this,oe,Ae(()=>t(c(this,ke)))),ut(()=>{var s=D(this,tt,document.createDocumentFragment()),r=rt();s.append(r),D(this,Te,U(this,G,Os).call(this,()=>Ae(()=>c(this,wt).call(this,r)))),c(this,ot)===0&&(c(this,ke).before(s),D(this,tt,null),Tt(c(this,oe),()=>{D(this,oe,null)}),U(this,G,Ds).call(this,S))}))},vr=function(){try{if(this.is_pending=this.has_pending_snippet(),D(this,ot,0),D(this,Et,0),D(this,Te,Ae(()=>{c(this,wt).call(this,c(this,ke))})),c(this,ot)>0){var t=D(this,tt,document.createDocumentFragment());Ir(c(this,Te),t);const s=c(this,Se).pending;D(this,oe,Ae(()=>s(c(this,ke))))}else U(this,G,Ds).call(this,S)}catch(s){this.error(s)}},Ds=function(t){this.is_pending=!1,t.transfer_effects(c(this,ps),c(this,_s))},Os=function(t){var s=O,r=I,a=z;De(c(this,ue)),Me(c(this,ue)),Bt(c(this,ue).ctx);try{return Ct.ensure(),t()}catch(i){return xa(i),null}finally{De(s),Me(r),Bt(a)}},dr=function(t,s){var r;if(!this.has_pending_snippet()){this.parent&&U(r=this.parent,G,dr).call(r,t,s);return}D(this,ot,c(this,ot)+t),c(this,ot)===0&&(U(this,G,Ds).call(this,s),c(this,oe)&&Tt(c(this,oe),()=>{D(this,oe,null)}),c(this,tt)&&(c(this,ke).before(c(this,tt)),D(this,tt,null)))},pr=function(t){c(this,Te)&&(de(c(this,Te)),D(this,Te,null)),c(this,oe)&&(de(c(this,oe)),D(this,oe,null)),c(this,me)&&(de(c(this,me)),D(this,me,null));var s=c(this,Se).onerror;let r=c(this,Se).failed;var a=!1,i=!1;const u=()=>{if(a){_o();return}a=!0,i&&io(),c(this,me)!==null&&Tt(c(this,me),()=>{D(this,me,null)}),U(this,G,Os).call(this,()=>{U(this,G,vr).call(this)})},d=v=>{try{i=!0,s==null||s(v,u),i=!1}catch(p){ct(p,c(this,ue)&&c(this,ue).parent)}r&&D(this,me,U(this,G,Os).call(this,()=>{try{return Ae(()=>{var p=O;p.b=this,p.f|=or,r(c(this,ke),()=>v,()=>u)})}catch(p){return ct(p,c(this,ue).parent),null}}))};ut(()=>{var v;try{v=this.transform_error(t)}catch(p){ct(p,c(this,ue)&&c(this,ue).parent);return}v!==null&&typeof v=="object"&&typeof v.then=="function"?v.then(d,p=>ct(p,c(this,ue)&&c(this,ue).parent)):d(v)})};function Do(e,t,s,r){const a=ys()?Tr:Ma;var i=e.filter(w=>!w.settled);if(s.length===0&&i.length===0){r(t.map(a));return}var u=O,d=Oo(),v=i.length===1?i[0].promise:i.length>1?Promise.all(i.map(w=>w.promise)):null;function p(w){d();try{r(w)}catch(y){u.f&Ce||ct(y,u)}Ls()}if(s.length===0){v.then(()=>p(t.map(a)));return}var g=Na();function E(){Promise.all(s.map(w=>Io(w))).then(w=>p([...t.map(a),...w])).catch(w=>ct(w,u)).finally(()=>g())}v?v.then(()=>{d(),E(),Ls()}):E()}function Oo(){var e=O,t=I,s=z,r=S;return function(i=!0){De(e),Me(t),Bt(s),i&&!(e.f&Ce)&&(r==null||r.activate(),r==null||r.apply())}}function Ls(e=!0){De(null),Me(null),Bt(null),e&&(S==null||S.deactivate())}function Na(){var e=O,t=e.b,s=S,r=t.is_rendered();return t.update_pending_count(1,s),s.increment(r,e),(a=!1)=>{t.update_pending_count(-1,s),s.decrement(r,e,a)}}function Tr(e){var t=le|re;return O!==null&&(O.f|=Yt),{ctx:z,deps:null,effects:null,equals:ba,f:t,fn:e,reactions:null,rv:0,v:ee,wv:0,parent:O,ac:null}}function Io(e,t,s){let r=O;r===null&&Ql();var a=void 0,i=Nt(ee),u=!I,d=new Map;return Go(()=>{var y;var v=O,p=va();a=p.promise;try{Promise.resolve(e()).then(p.resolve,p.reject).finally(Ls)}catch(o){p.reject(o),Ls()}var g=S;if(u){if(v.f&Dt)var E=Na();if(r.b.is_rendered())(y=d.get(g))==null||y.reject(Xe),d.delete(g);else{for(const o of d.values())o.reject(Xe);d.clear()}d.set(g,p)}const w=(o,T=void 0)=>{if(E){var m=T===Xe;E(m)}if(!(T===Xe||v.f&Ce)){if(g.activate(),T)i.f|=ft,Kt(i,T);else{i.f&ft&&(i.f^=ft),Kt(i,o);for(const[R,$]of d){if(d.delete(R),R===g)break;$.reject(Xe)}}g.deactivate()}};p.promise.then(w,o=>w(null,o||"unknown"))}),Nr(()=>{for(const v of d.values())v.reject(Xe)}),new Promise(v=>{function p(g){function E(){g===a?v(i):p(a)}g.then(E,E)}p(a)})}function Ma(e){const t=Tr(e);return t.equals=ma,t}function Fo(e){var t=e.effects;if(t!==null){e.effects=null;for(var s=0;s<t.length;s+=1)de(t[s])}}function Ar(e){var t,s=O,r=e.parent;if(!dt&&r!==null&&r.f&(Ce|ce))return vo(),e.v;De(r);try{e.f&=~Rt,Fo(e),t=Ja(e)}finally{De(s)}return t}function Da(e){var t=Ar(e);if(!e.equals(t)&&(e.wv=Ya(),(!(S!=null&&S.is_fork)||e.deps===null)&&(S!==null?S.capture(e,t,!0):e.v=t,e.deps===null))){Y(e,X);return}dt||(se!==null?(Cr()||S!=null&&S.is_fork)&&se.set(e,t):xr(e))}function Lo(e){var t,s;if(e.effects!==null)for(const r of e.effects)(r.teardown||r.ac)&&((t=r.teardown)==null||t.call(r),(s=r.ac)==null||s.abort(Xe),r.teardown=Yl,r.ac=null,us(r,0),Dr(r))}function Oa(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&Mt(t)}let _r=new Set;const St=new Map;let Ia=!1;function Nt(e,t){var s={f:0,v:e,reactions:null,equals:ba,rv:0,wv:0};return s}function at(e,t){const s=Nt(e);return Xo(s),s}function Q(e,t=!1,s=!0){var a;const r=Nt(e);return t||(r.equals=ma),ms&&s&&z!==null&&z.l!==null&&((a=z.l).s??(a.s=[])).push(r),r}function ts(e,t){return M(e,b(()=>n(e))),t}function M(e,t,s=!1){I!==null&&(!je||I.f&cr)&&ys()&&I.f&(le|Be|fs|cr)&&(Ne===null||!Vt.call(Ne,e))&&ao();let r=s?ns(t):t;return Kt(e,r,Rs)}function Kt(e,t,s=null){if(!e.equals(t)){St.set(e,dt?t:e.v);var r=Ct.ensure();if(r.capture(e,t),e.f&le){const a=e;e.f&re&&Ar(a),se===null&&xr(a)}e.wv=Ya(),Fa(e,re,s),ys()&&O!==null&&O.f&X&&!(O.f&($e|vt))&&(xe===null?Zo([e]):xe.push(e)),!r.is_fork&&_r.size>0&&!Ia&&Po()}return t}function Po(){Ia=!1;for(const e of _r)e.f&X&&Y(e,We),Gt(e)&&Mt(e);_r.clear()}function os(e){M(e,e.v+1)}function Fa(e,t,s){var r=e.reactions;if(r!==null)for(var a=ys(),i=r.length,u=0;u<i;u++){var d=r[u],v=d.f;if(!(!a&&d===O)){var p=(v&re)===0;if(p&&Y(d,t),v&le){var g=d;se==null||se.delete(g),v&Rt||(v&Re&&(O===null||!(O.f&Fs))&&(d.f|=Rt),Fa(g,We,s))}else if(p){var E=d;v&Be&&Le!==null&&Le.add(E),s!==null?s.push(E):Sr(E)}}}}function ns(e){if(typeof e!="object"||e===null||kt in e)return e;const t=Er(e);if(t!==Bl&&t!==Kl)return e;var s=new Map,r=wr(e),a=at(0),i=At,u=d=>{if(At===i)return d();var v=I,p=At;Me(null),Zn(i);var g=d();return Me(v),Zn(p),g};return r&&s.set("length",at(e.length)),new Proxy(e,{defineProperty(d,v,p){(!("value"in p)||p.configurable===!1||p.enumerable===!1||p.writable===!1)&&ro();var g=s.get(v);return g===void 0?u(()=>{var E=at(p.value);return s.set(v,E),E}):M(g,p.value,!0),!0},deleteProperty(d,v){var p=s.get(v);if(p===void 0){if(v in d){const g=u(()=>at(ee));s.set(v,g),os(a)}}else M(p,ee),os(a);return!0},get(d,v,p){var y;if(v===kt)return e;var g=s.get(v),E=v in d;if(g===void 0&&(!E||(y=is(d,v))!=null&&y.writable)&&(g=u(()=>{var o=ns(E?d[v]:ee),T=at(o);return T}),s.set(v,g)),g!==void 0){var w=n(g);return w===ee?void 0:w}return Reflect.get(d,v,p)},getOwnPropertyDescriptor(d,v){var p=Reflect.getOwnPropertyDescriptor(d,v);if(p&&"value"in p){var g=s.get(v);g&&(p.value=n(g))}else if(p===void 0){var E=s.get(v),w=E==null?void 0:E.v;if(E!==void 0&&w!==ee)return{enumerable:!0,configurable:!0,value:w,writable:!0}}return p},has(d,v){var w;if(v===kt)return!0;var p=s.get(v),g=p!==void 0&&p.v!==ee||Reflect.has(d,v);if(p!==void 0||O!==null&&(!g||(w=is(d,v))!=null&&w.writable)){p===void 0&&(p=u(()=>{var y=g?ns(d[v]):ee,o=at(y);return o}),s.set(v,p));var E=n(p);if(E===ee)return!1}return g},set(d,v,p,g){var L;var E=s.get(v),w=v in d;if(r&&v==="length")for(var y=p;y<E.v;y+=1){var o=s.get(y+"");o!==void 0?M(o,ee):y in d&&(o=u(()=>at(ee)),s.set(y+"",o))}if(E===void 0)(!w||(L=is(d,v))!=null&&L.writable)&&(E=u(()=>at(void 0)),M(E,ns(p)),s.set(v,E));else{w=E.v!==ee;var T=u(()=>ns(p));M(E,T)}var m=Reflect.getOwnPropertyDescriptor(d,v);if(m!=null&&m.set&&m.set.call(g,p),!w){if(r&&typeof v=="string"){var R=s.get("length"),$=Number(v);Number.isInteger($)&&$>=R.v&&M(R,$+1)}os(a)}return!0},ownKeys(d){n(a);var v=Reflect.ownKeys(d).filter(E=>{var w=s.get(E);return w===void 0||w.v!==ee});for(var[p,g]of s)g.v!==ee&&!(p in d)&&v.push(p);return v},setPrototypeOf(){no()}})}function Gn(e){try{if(e!==null&&typeof e=="object"&&kt in e)return e[kt]}catch{}return e}function jo(e,t){return Object.is(Gn(e),Gn(t))}var Jn,La,Pa,ja;function $o(){if(Jn===void 0){Jn=window,La=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,s=Text.prototype;Pa=is(t,"firstChild").get,ja=is(t,"nextSibling").get,Hn(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),Hn(s)&&(s.__t=void 0)}}function rt(e=""){return document.createTextNode(e)}function Rr(e){return Pa.call(e)}function ws(e){return ja.call(e)}function _(e,t){return Rr(e)}function Wo(e,t=!1){{var s=Rr(e);return s instanceof Comment&&s.data===""?ws(s):s}}function h(e,t=1,s=!1){let r=e;for(;t--;)r=ws(r);return r}function qo(e){e.textContent=""}function $a(){return!1}function Uo(e,t,s){return document.createElementNS(ga,e,void 0)}let Qn=!1;function Vo(){Qn||(Qn=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{var t;if(!e.defaultPrevented)for(const s of e.target.elements)(t=s.__on_r)==null||t.call(s)})},{capture:!0}))}function qs(e){var t=I,s=O;Me(null),De(null);try{return e()}finally{Me(t),De(s)}}function Wa(e,t,s,r=s){e.addEventListener(t,()=>qs(s));const a=e.__on_r;a?e.__on_r=()=>{a(),r(!0)}:e.__on_r=()=>r(!0),Vo()}function qa(e){O===null&&(I===null&&to(),eo()),dt&&Zl()}function zo(e,t){var s=t.last;s===null?t.last=t.first=e:(s.next=e,e.prev=s,t.last=e)}function Ke(e,t){var s=O;s!==null&&s.f&ce&&(e|=ce);var r={ctx:z,deps:null,nodes:null,f:e|re|Re,first:null,fn:t,last:null,next:null,parent:s,b:s&&s.b,prev:null,teardown:null,wv:0,ac:null};S==null||S.register_created_effect(r);var a=r;if(e&zt)Pt!==null?Pt.push(r):Ct.ensure().schedule(r);else if(t!==null){try{Mt(r)}catch(u){throw de(r),u}a.deps===null&&a.teardown===null&&a.nodes===null&&a.first===a.last&&!(a.f&Yt)&&(a=a.first,e&Be&&e&Ht&&a!==null&&(a.f|=Ht))}if(a!==null&&(a.parent=s,s!==null&&zo(a,s),I!==null&&I.f&le&&!(e&vt))){var i=I;(i.effects??(i.effects=[])).push(a)}return r}function Cr(){return I!==null&&!je}function Nr(e){const t=Ke(bs,null);return Y(t,X),t.teardown=e,t}function hr(e){qa();var t=O.f,s=!I&&(t&$e)!==0&&(t&Dt)===0;if(s){var r=z;(r.e??(r.e=[])).push(e)}else return Ua(e)}function Ua(e){return Ke(zt|pa,e)}function Ho(e){return qa(),Ke(bs|pa,e)}function Bo(e){Ct.ensure();const t=Ke(vt|Yt,e);return(s={})=>new Promise(r=>{s.outro?Tt(t,()=>{de(t),r(void 0)}):(de(t),r(void 0))})}function Ko(e){return Ke(zt,e)}function Ee(e,t){var s=z,r={effect:null,ran:!1,deps:e};s.l.$.push(r),r.effect=Us(()=>{if(e(),!r.ran){r.ran=!0;var a=O;try{De(a.parent),b(t)}finally{De(a)}}})}function Yo(){var e=z;Us(()=>{for(var t of e.l.$){t.deps();var s=t.effect;s.f&X&&s.deps!==null&&Y(s,We),Gt(s)&&Mt(s),t.ran=!1}})}function Go(e){return Ke(fs|Yt,e)}function Us(e,t=0){return Ke(bs|t,e)}function V(e,t=[],s=[],r=[]){Do(r,t,s,a=>{Ke(bs,()=>e(...a.map(n)))})}function Mr(e,t=0){var s=Ke(Be|t,e);return s}function Ae(e){return Ke($e|Yt,e)}function Va(e){var t=e.teardown;if(t!==null){const s=dt,r=I;Xn(!0),Me(null);try{t.call(null)}finally{Xn(s),Me(r)}}}function Dr(e,t=!1){var s=e.first;for(e.first=e.last=null;s!==null;){const a=s.ac;a!==null&&qs(()=>{a.abort(Xe)});var r=s.next;s.f&vt?s.parent=null:de(s,t),s=r}}function Jo(e){for(var t=e.first;t!==null;){var s=t.next;t.f&$e||de(t),t=s}}function de(e,t=!0){var s=!1;(t||e.f&Jl)&&e.nodes!==null&&e.nodes.end!==null&&(Qo(e.nodes.start,e.nodes.end),s=!0),Y(e,Bn),Dr(e,t&&!s),us(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(const i of r)i.stop();Va(e),e.f^=Bn,e.f|=Ce;var a=e.parent;a!==null&&a.first!==null&&za(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Qo(e,t){for(;e!==null;){var s=e===t?null:ws(e);e.remove(),e=s}}function za(e){var t=e.parent,s=e.prev,r=e.next;s!==null&&(s.next=r),r!==null&&(r.prev=s),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=s))}function Tt(e,t,s=!0){var r=[];Ha(e,r,!0);var a=()=>{s&&de(e),t&&t()},i=r.length;if(i>0){var u=()=>--i||a();for(var d of r)d.out(u)}else a()}function Ha(e,t,s){if(!(e.f&ce)){e.f^=ce;var r=e.nodes&&e.nodes.t;if(r!==null)for(const d of r)(d.is_global||s)&&t.push(d);for(var a=e.first;a!==null;){var i=a.next;if(!(a.f&vt)){var u=(a.f&Ht)!==0||(a.f&$e)!==0&&(e.f&Be)!==0;Ha(a,t,u?s:!1)}a=i}}}function Or(e){Ba(e,!0)}function Ba(e,t){if(e.f&ce){e.f^=ce,e.f&X||(Y(e,re),Ct.ensure().schedule(e));for(var s=e.first;s!==null;){var r=s.next,a=(s.f&Ht)!==0||(s.f&$e)!==0;Ba(s,a?t:!1),s=r}var i=e.nodes&&e.nodes.t;if(i!==null)for(const u of i)(u.is_global||t)&&u.in()}}function Ir(e,t){if(e.nodes)for(var s=e.nodes.start,r=e.nodes.end;s!==null;){var a=s===r?null:ws(s);t.append(s),s=a}}let Is=!1,dt=!1;function Xn(e){dt=e}let I=null,je=!1;function Me(e){I=e}let O=null;function De(e){O=e}let Ne=null;function Xo(e){I!==null&&(Ne===null?Ne=[e]:Ne.push(e))}let ve=null,ge=0,xe=null;function Zo(e){xe=e}let Ka=1,bt=0,At=bt;function Zn(e){At=e}function Ya(){return++Ka}function Gt(e){var t=e.f;if(t&re)return!0;if(t&le&&(e.f&=~Rt),t&We){for(var s=e.deps,r=s.length,a=0;a<r;a++){var i=s[a];if(Gt(i)&&Da(i),i.wv>e.wv)return!0}t&Re&&se===null&&Y(e,X)}return!1}function Ga(e,t,s=!0){var r=e.reactions;if(r!==null&&!(Ne!==null&&Vt.call(Ne,e)))for(var a=0;a<r.length;a++){var i=r[a];i.f&le?Ga(i,t,!1):t===i&&(s?Y(i,re):i.f&X&&Y(i,We),Sr(i))}}function Ja(e){var T;var t=ve,s=ge,r=xe,a=I,i=Ne,u=z,d=je,v=At,p=e.f;ve=null,ge=0,xe=null,I=p&($e|vt)?null:e,Ne=null,Bt(e.ctx),je=!1,At=++bt,e.ac!==null&&(qs(()=>{e.ac.abort(Xe)}),e.ac=null);try{e.f|=Fs;var g=e.fn,E=g();e.f|=Dt;var w=e.deps,y=S==null?void 0:S.is_fork;if(ve!==null){var o;if(y||us(e,ge),w!==null&&ge>0)for(w.length=ge+ve.length,o=0;o<ve.length;o++)w[ge+o]=ve[o];else e.deps=w=ve;if(Cr()&&e.f&Re)for(o=ge;o<w.length;o++)((T=w[o]).reactions??(T.reactions=[])).push(e)}else!y&&w!==null&&ge<w.length&&(us(e,ge),w.length=ge);if(ys()&&xe!==null&&!je&&w!==null&&!(e.f&(le|We|re)))for(o=0;o<xe.length;o++)Ga(xe[o],e);if(a!==null&&a!==e){if(bt++,a.deps!==null)for(let m=0;m<s;m+=1)a.deps[m].rv=bt;if(t!==null)for(const m of t)m.rv=bt;xe!==null&&(r===null?r=xe:r.push(...xe))}return e.f&ft&&(e.f^=ft),E}catch(m){return xa(m)}finally{e.f^=Fs,ve=t,ge=s,xe=r,I=a,Ne=i,Bt(u),je=d,At=v}}function ec(e,t){let s=t.reactions;if(s!==null){var r=zl.call(s,e);if(r!==-1){var a=s.length-1;a===0?s=t.reactions=null:(s[r]=s[a],s.pop())}}if(s===null&&t.f&le&&(ve===null||!Vt.call(ve,t))){var i=t;i.f&Re&&(i.f^=Re,i.f&=~Rt),i.v!==ee&&xr(i),Lo(i),us(i,0)}}function us(e,t){var s=e.deps;if(s!==null)for(var r=t;r<s.length;r++)ec(e,s[r])}function Mt(e){var t=e.f;if(!(t&Ce)){Y(e,X);var s=O,r=Is;O=e,Is=!0;try{t&(Be|da)?Jo(e):Dr(e),Va(e);var a=Ja(e);e.teardown=typeof a=="function"?a:null,e.wv=Ka;var i;Vl&&go&&e.f&re&&e.deps}finally{Is=r,O=s}}}async function tc(){await Promise.resolve(),xo()}function n(e){var t=e.f,s=(t&le)!==0;if(I!==null&&!je){var r=O!==null&&(O.f&Ce)!==0;if(!r&&(Ne===null||!Vt.call(Ne,e))){var a=I.deps;if(I.f&Fs)e.rv<bt&&(e.rv=bt,ve===null&&a!==null&&a[ge]===e?ge++:ve===null?ve=[e]:ve.push(e));else{(I.deps??(I.deps=[])).push(e);var i=e.reactions;i===null?e.reactions=[I]:Vt.call(i,I)||i.push(I)}}}if(dt&&St.has(e))return St.get(e);if(s){var u=e;if(dt){var d=u.v;return(!(u.f&X)&&u.reactions!==null||Xa(u))&&(d=Ar(u)),St.set(u,d),d}var v=(u.f&Re)===0&&!je&&I!==null&&(Is||(I.f&Re)!==0),p=(u.f&Dt)===0;Gt(u)&&(v&&(u.f|=Re),Da(u)),v&&!p&&(Oa(u),Qa(u))}if(se!=null&&se.has(e))return se.get(e);if(e.f&ft)throw e.v;return e.v}function Qa(e){if(e.f|=Re,e.deps!==null)for(const t of e.deps)(t.reactions??(t.reactions=[])).push(e),t.f&le&&!(t.f&Re)&&(Oa(t),Qa(t))}function Xa(e){if(e.v===ee)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(St.has(t)||t.f&le&&Xa(t))return!0;return!1}function b(e){var t=je;try{return je=!0,e()}finally{je=t}}function sc(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(kt in e)gr(e);else if(!Array.isArray(e))for(let t in e){const s=e[t];typeof s=="object"&&s&&kt in s&&gr(s)}}}function gr(e,t=new Set){if(typeof e=="object"&&e!==null&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let r in e)try{gr(e[r],t)}catch{}const s=Er(e);if(s!==Object.prototype&&s!==Array.prototype&&s!==Map.prototype&&s!==Set.prototype&&s!==Date.prototype){const r=ua(s);for(let a in r){const i=r[a].get;if(i)try{i.call(e)}catch{}}}}}const rc=["touchstart","touchmove"];function nc(e){return rc.includes(e)}const Ss=Symbol("events"),ac=new Set,ea=new Set;function ic(e,t,s,r={}){function a(i){if(r.capture||br.call(t,i),!i.cancelBubble)return qs(()=>s==null?void 0:s.call(this,i))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?ut(()=>{t.addEventListener(e,a,r)}):t.addEventListener(e,a,r),a}function ta(e,t,s,r,a){var i={capture:r,passive:a},u=ic(e,t,s,i);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Nr(()=>{t.removeEventListener(e,u,i)})}let sa=null;function br(e){var m,R;var t=this,s=t.ownerDocument,r=e.type,a=((m=e.composedPath)==null?void 0:m.call(e))||[],i=a[0]||e.target;sa=e;var u=0,d=sa===e&&e[Ss];if(d){var v=a.indexOf(d);if(v!==-1&&(t===document||t===window)){e[Ss]=t;return}var p=a.indexOf(t);if(p===-1)return;v<=p&&(u=v)}if(i=a[u]||e.target,i!==t){Hl(e,"currentTarget",{configurable:!0,get(){return i||s}});var g=I,E=O;Me(null),De(null);try{for(var w,y=[];i!==null;){var o=i.assignedSlot||i.parentNode||i.host||null;try{var T=(R=i[Ss])==null?void 0:R[r];T!=null&&(!i.disabled||e.target===i)&&T.call(i,e)}catch($){w?y.push($):w=$}if(e.cancelBubble||o===t||o===null)break;i=o}if(w){for(let $ of y)queueMicrotask(()=>{throw $});throw w}}finally{e[Ss]=t,delete e.currentTarget,Me(g),De(E)}}}var ca;const rr=((ca=globalThis==null?void 0:globalThis.window)==null?void 0:ca.trustedTypes)&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function lc(e){return(rr==null?void 0:rr.createHTML(e))??e}function oc(e){var t=Uo("template");return t.innerHTML=lc(e.replaceAll("<!>","<!---->")),t.content}function Fr(e,t){var s=O;s.nodes===null&&(s.nodes={start:e,end:t,a:null,t:null})}function W(e,t){var s=(t&uo)!==0,r,a=!e.startsWith("<!>");return()=>{r===void 0&&(r=oc(a?e:"<!>"+e),r=Rr(r));var i=s||La?document.importNode(r,!0):r.cloneNode(!0);return Fr(i,i),i}}function ra(e=""){{var t=rt(e+"");return Fr(t,t),t}}function cc(){var e=document.createDocumentFragment(),t=document.createComment(""),s=rt();return e.append(t,s),Fr(t,s),e}function P(e,t){e!==null&&e.before(t)}function x(e,t){var s=t==null?"":typeof t=="object"?`${t}`:t;s!==(e.__t??(e.__t=e.nodeValue))&&(e.__t=s,e.nodeValue=`${s}`)}function fc(e,t){return uc(e,t)}const Ts=new Map;function uc(e,{target:t,anchor:s,props:r={},events:a,context:i,intro:u=!0,transformError:d}){$o();var v=void 0,p=Bo(()=>{var g=s??t.appendChild(rt());Ao(g,{pending:()=>{}},y=>{ya({});var o=z;i&&(o.c=i),a&&(r.$$events=a),v=e(y,r)||{},wa()},d);var E=new Set,w=y=>{for(var o=0;o<y.length;o++){var T=y[o];if(!E.has(T)){E.add(T);var m=nc(T);for(const L of[t,document]){var R=Ts.get(L);R===void 0&&(R=new Map,Ts.set(L,R));var $=R.get(T);$===void 0?(L.addEventListener(T,br,{passive:m}),R.set(T,1)):R.set(T,$+1)}}}};return w(Ws(ac)),ea.add(w),()=>{var m;for(var y of E)for(const R of[t,document]){var o=Ts.get(R),T=o.get(y);--T==0?(R.removeEventListener(y,br),o.delete(y),o.size===0&&Ts.delete(R)):o.set(y,T)}ea.delete(w),g!==s&&((m=g.parentNode)==null||m.removeChild(g))}});return vc.set(v,p),v}let vc=new WeakMap;var Pe,ze,ye,xt,hs,gs,$s;class dc{constructor(t,s=!0){Fe(this,"anchor");N(this,Pe,new Map);N(this,ze,new Map);N(this,ye,new Map);N(this,xt,new Set);N(this,hs,!0);N(this,gs,t=>{if(c(this,Pe).has(t)){var s=c(this,Pe).get(t),r=c(this,ze).get(s);if(r)Or(r),c(this,xt).delete(s);else{var a=c(this,ye).get(s);a&&(c(this,ze).set(s,a.effect),c(this,ye).delete(s),a.fragment.lastChild.remove(),this.anchor.before(a.fragment),r=a.effect)}for(const[i,u]of c(this,Pe)){if(c(this,Pe).delete(i),i===t)break;const d=c(this,ye).get(u);d&&(de(d.effect),c(this,ye).delete(u))}for(const[i,u]of c(this,ze)){if(i===s||c(this,xt).has(i))continue;const d=()=>{if(Array.from(c(this,Pe).values()).includes(i)){var p=document.createDocumentFragment();Ir(u,p),p.append(rt()),c(this,ye).set(i,{effect:u,fragment:p})}else de(u);c(this,xt).delete(i),c(this,ze).delete(i)};c(this,hs)||!r?(c(this,xt).add(i),Tt(u,d,!1)):d()}}});N(this,$s,t=>{c(this,Pe).delete(t);const s=Array.from(c(this,Pe).values());for(const[r,a]of c(this,ye))s.includes(r)||(de(a.effect),c(this,ye).delete(r))});this.anchor=t,D(this,hs,s)}ensure(t,s){var r=S,a=$a();if(s&&!c(this,ze).has(t)&&!c(this,ye).has(t))if(a){var i=document.createDocumentFragment(),u=rt();i.append(u),c(this,ye).set(t,{effect:Ae(()=>s(u)),fragment:i})}else c(this,ze).set(t,Ae(()=>s(this.anchor)));if(c(this,Pe).set(r,t),a){for(const[d,v]of c(this,ze))d===t?r.unskip_effect(v):r.skip_effect(v);for(const[d,v]of c(this,ye))d===t?r.unskip_effect(v.effect):r.skip_effect(v.effect);r.oncommit(c(this,gs)),r.ondiscard(c(this,$s))}else c(this,gs).call(this,r)}}Pe=new WeakMap,ze=new WeakMap,ye=new WeakMap,xt=new WeakMap,hs=new WeakMap,gs=new WeakMap,$s=new WeakMap;function fe(e,t,s=!1){var r=new dc(e),a=s?Ht:0;function i(u,d){r.ensure(u,d)}Mr(()=>{var u=!1;t((d,v=0)=>{u=!0,i(v,d)}),u||i(-1,null)},a)}function pc(e,t,s){for(var r=[],a=t.length,i,u=t.length,d=0;d<a;d++){let E=t[d];Tt(E,()=>{if(i){if(i.pending.delete(E),i.done.add(E),i.pending.size===0){var w=e.outrogroups;mr(e,Ws(i.done)),w.delete(i),w.size===0&&(e.outrogroups=null)}}else u-=1},!1)}if(u===0){var v=r.length===0&&s!==null;if(v){var p=s,g=p.parentNode;qo(g),g.append(p),e.items.clear()}mr(e,t,!v)}else i={pending:new Set(t),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(i)}function mr(e,t,s=!0){var r;if(e.pending.size>0){r=new Set;for(const u of e.pending.values())for(const d of u)r.add(e.items.get(d).e)}for(var a=0;a<t.length;a++){var i=t[a];if(r!=null&&r.has(i)){i.f|=He;const u=document.createDocumentFragment();Ir(i,u)}else de(t[a],s)}}var na;function Lt(e,t,s,r,a,i=null){var u=e,d=new Map,v=(t&ha)!==0;if(v){var p=e;u=p.appendChild(rt())}var g=null,E=Ma(()=>{var L=s();return wr(L)?L:L==null?[]:Ws(L)}),w,y=new Map,o=!0;function T(L){$.effect.f&Ce||($.pending.delete(L),$.fallback=g,_c($,w,u,t,r),g!==null&&(w.length===0?g.f&He?(g.f^=He,as(g,null,u)):Or(g):Tt(g,()=>{g=null})))}function m(L){$.pending.delete(L)}var R=Mr(()=>{w=n(E);for(var L=w.length,J=new Set,ne=S,qe=$a(),F=0;F<L;F+=1){var Ye=w[F],nt=r(Ye,F),ae=o?null:d.get(nt);ae?(ae.v&&Kt(ae.v,Ye),ae.i&&Kt(ae.i,F),qe&&ne.unskip_effect(ae.e)):(ae=hc(d,o?u:na??(na=rt()),Ye,nt,F,a,t,s),o||(ae.e.f|=He),d.set(nt,ae)),J.add(nt)}if(L===0&&i&&!g&&(o?g=Ae(()=>i(u)):(g=Ae(()=>i(na??(na=rt()))),g.f|=He)),L>J.size&&Xl(),!o)if(y.set(ne,J),qe){for(const[pt,Ge]of d)J.has(pt)||ne.skip_effect(Ge.e);ne.oncommit(T),ne.ondiscard(m)}else T(ne);n(E)}),$={effect:R,items:d,pending:y,outrogroups:null,fallback:g};o=!1}function ss(e){for(;e!==null&&!(e.f&$e);)e=e.next;return e}function _c(e,t,s,r,a){var ae,pt,Ge,Es,Jt,Qt,Xt,Zt,xs;var i=(r&co)!==0,u=t.length,d=e.items,v=ss(e.effect.first),p,g=null,E,w=[],y=[],o,T,m,R;if(i)for(R=0;R<u;R+=1)o=t[R],T=a(o,R),m=d.get(T).e,m.f&He||((pt=(ae=m.nodes)==null?void 0:ae.a)==null||pt.measure(),(E??(E=new Set)).add(m));for(R=0;R<u;R+=1){if(o=t[R],T=a(o,R),m=d.get(T).e,e.outrogroups!==null)for(const pe of e.outrogroups)pe.pending.delete(m),pe.done.delete(m);if(m.f&ce&&(Or(m),i&&((Es=(Ge=m.nodes)==null?void 0:Ge.a)==null||Es.unfix(),(E??(E=new Set)).delete(m))),m.f&He)if(m.f^=He,m===v)as(m,null,s);else{var $=g?g.next:v;m===e.effect.last&&(e.effect.last=m.prev),m.prev&&(m.prev.next=m.next),m.next&&(m.next.prev=m.prev),it(e,g,m),it(e,m,$),as(m,$,s),g=m,w=[],y=[],v=ss(g.next);continue}if(m!==v){if(p!==void 0&&p.has(m)){if(w.length<y.length){var L=y[0],J;g=L.prev;var ne=w[0],qe=w[w.length-1];for(J=0;J<w.length;J+=1)as(w[J],L,s);for(J=0;J<y.length;J+=1)p.delete(y[J]);it(e,ne.prev,qe.next),it(e,g,ne),it(e,qe,L),v=L,g=qe,R-=1,w=[],y=[]}else p.delete(m),as(m,v,s),it(e,m.prev,m.next),it(e,m,g===null?e.effect.first:g.next),it(e,g,m),g=m;continue}for(w=[],y=[];v!==null&&v!==m;)(p??(p=new Set)).add(v),y.push(v),v=ss(v.next);if(v===null)continue}m.f&He||w.push(m),g=m,v=ss(m.next)}if(e.outrogroups!==null){for(const pe of e.outrogroups)pe.pending.size===0&&(mr(e,Ws(pe.done)),(Jt=e.outrogroups)==null||Jt.delete(pe));e.outrogroups.size===0&&(e.outrogroups=null)}if(v!==null||p!==void 0){var F=[];if(p!==void 0)for(m of p)m.f&ce||F.push(m);for(;v!==null;)!(v.f&ce)&&v!==e.fallback&&F.push(v),v=ss(v.next);var Ye=F.length;if(Ye>0){var nt=r&ha&&u===0?s:null;if(i){for(R=0;R<Ye;R+=1)(Xt=(Qt=F[R].nodes)==null?void 0:Qt.a)==null||Xt.measure();for(R=0;R<Ye;R+=1)(xs=(Zt=F[R].nodes)==null?void 0:Zt.a)==null||xs.fix()}pc(e,F,nt)}}i&&ut(()=>{var pe,ks;if(E!==void 0)for(m of E)(ks=(pe=m.nodes)==null?void 0:pe.a)==null||ks.apply()})}function hc(e,t,s,r,a,i,u,d){var v=u&lo?u&fo?Nt(s):Q(s,!1,!1):null,p=u&oo?Nt(a):null;return{v,i:p,e:Ae(()=>(i(t,v??s,p??a,d),()=>{e.delete(r)}))}}function as(e,t,s){if(e.nodes)for(var r=e.nodes.start,a=e.nodes.end,i=t&&!(t.f&He)?t.nodes.start:s;r!==null;){var u=ws(r);if(i.before(r),r===a)return;r=u}}function it(e,t,s){t===null?e.effect.first=s:t.next=s,s===null?e.effect.last=t:s.prev=t}const aa=[...`
|
|
2
|
-
\r\f \v\uFEFF`];function gc(e,t,s){var r=e==null?"":""+e;if(s){for(var a of Object.keys(s))if(s[a])r=r?r+" "+a:a;else if(r.length)for(var i=a.length,u=0;(u=r.indexOf(a,u))>=0;){var d=u+i;(u===0||aa.includes(r[u-1]))&&(d===r.length||aa.includes(r[d]))?r=(u===0?"":r.substring(0,u))+r.substring(d+1):u=d}}return r===""?null:r}function bc(e,t){return e==null?null:String(e)}function rs(e,t,s,r,a,i){var u=e.__className;if(u!==s||u===void 0){var d=gc(s,r,i);d==null?e.removeAttribute("class"):e.className=d,e.__className=s}else if(i&&a!==i)for(var v in i){var p=!!i[v];(a==null||p!==!!a[v])&&e.classList.toggle(v,p)}return i}function ia(e,t,s,r){var a=e.__style;if(a!==t){var i=bc(t);i==null?e.removeAttribute("style"):e.style.cssText=i,e.__style=t}return r}function Za(e,t,s=!1){if(e.multiple){if(t==null)return;if(!wr(t))return po();for(var r of e.options)r.selected=t.includes(cs(r));return}for(r of e.options){var a=cs(r);if(jo(a,t)){r.selected=!0;return}}(!s||t!==void 0)&&(e.selectedIndex=-1)}function mc(e){var t=new MutationObserver(()=>{Za(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Nr(()=>{t.disconnect()})}function nr(e,t,s=t){var r=new WeakSet,a=!0;Wa(e,"change",i=>{var u=i?"[selected]":":checked",d;if(e.multiple)d=[].map.call(e.querySelectorAll(u),cs);else{var v=e.querySelector(u)??e.querySelector("option:not([disabled])");d=v&&cs(v)}s(d),e.__value=d,S!==null&&r.add(S)}),Ko(()=>{var i=t();if(e===document.activeElement){var u=S;if(r.has(u))return}if(Za(e,i,a),a&&i===void 0){var d=e.querySelector(":checked");d!==null&&(i=cs(d),s(i))}e.__value=i,a=!1}),mc(e)}function cs(e){return"__value"in e?e.__value:e.value}const yc=Symbol("is custom element"),wc=Symbol("is html");function Ec(e,t,s,r){var a=xc(e);a[t]!==(a[t]=s)&&(s==null?e.removeAttribute(t):typeof s!="string"&&kc(e).includes(t)?e[t]=s:e.setAttribute(t,s))}function xc(e){return e.__attributes??(e.__attributes={[yc]:e.nodeName.includes("-"),[wc]:e.namespaceURI===ga})}var la=new Map;function kc(e){var t=e.getAttribute("is")||e.nodeName,s=la.get(t);if(s)return s;la.set(t,s=[]);for(var r,a=e,i=Element.prototype;i!==a;){r=ua(a);for(var u in r)r[u].set&&s.push(u);a=Er(a)}return s}function As(e,t,s=t){var r=new WeakSet;Wa(e,"input",async a=>{var i=a?e.defaultValue:e.value;if(i=ar(e)?ir(i):i,s(i),S!==null&&r.add(S),await tc(),i!==(i=t())){var u=e.selectionStart,d=e.selectionEnd,v=e.value.length;if(e.value=i??"",d!==null){var p=e.value.length;u===d&&d===v&&p>v?(e.selectionStart=p,e.selectionEnd=p):(e.selectionStart=u,e.selectionEnd=Math.min(d,p))}}}),b(t)==null&&e.value&&(s(ar(e)?ir(e.value):e.value),S!==null&&r.add(S)),Us(()=>{var a=t();if(e===document.activeElement){var i=S;if(r.has(i))return}ar(e)&&a===ir(e.value)||e.type==="date"&&!a&&!e.value||a!==e.value&&(e.value=a??"")})}function ar(e){var t=e.type;return t==="number"||t==="range"}function ir(e){return e===""?null:+e}function Sc(e){return function(...t){var s=t[0];return s.preventDefault(),e==null?void 0:e.apply(this,t)}}function Tc(e=!1){const t=z,s=t.l.u;if(!s)return;let r=()=>sc(t.s);if(e){let a=0,i={};const u=Tr(()=>{let d=!1;const v=t.s;for(const p in v)v[p]!==i[p]&&(i[p]=v[p],d=!0);return d&&a++,a});r=()=>n(u)}s.b.length&&Ho(()=>{oa(t,r),lr(s.b)}),hr(()=>{const a=b(()=>s.m.map(Gl));return()=>{for(const i of a)typeof i=="function"&&i()}}),s.a.length&&hr(()=>{oa(t,r),lr(s.a)})}function oa(e,t){if(e.l.s)for(const s of e.l.s)n(s);t()}function Ac(e){z===null&&_a(),ms&&z.l!==null?Cc(z).m.push(e):hr(()=>{const t=b(e);if(typeof t=="function")return t})}function Rc(e){z===null&&_a(),Ac(()=>()=>b(e))}function Cc(e){var t=e.l;return t.u??(t.u={a:[],b:[],m:[]})}const Nc="5";var fa;typeof window<"u"&&((fa=window.__svelte??(window.__svelte={})).v??(fa.v=new Set)).add(Nc);bo();var Mc=W('<div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Watch issue</span><strong class="status-warn svelte-d3ct2b"> </strong></div>'),Dc=W('<section class="notice svelte-d3ct2b"> </section>'),Oc=W('<section class="notice danger svelte-d3ct2b"> </section>'),Ic=W('<p class="terminal-line svelte-d3ct2b"><time class="svelte-d3ct2b">--:--:--</time><span class="sys svelte-d3ct2b">SYS</span><strong class="svelte-d3ct2b">Waiting for memory-core watch output...</strong></p>'),Fc=W('<strong class="svelte-d3ct2b"> </strong>'),Lc=W('<strong class="svelte-d3ct2b"> </strong>'),Pc=W('<strong class="svelte-d3ct2b"> </strong>'),jc=W('<strong class="svelte-d3ct2b"> </strong>'),$c=W('<strong class="svelte-d3ct2b"> </strong>'),Wc=W('<p class="svelte-d3ct2b"><b class="svelte-d3ct2b">Why:</b> </p>'),qc=W('<p class="svelte-d3ct2b"><b class="svelte-d3ct2b">Issue:</b> </p>'),Uc=W('<p class="svelte-d3ct2b"><b class="svelte-d3ct2b">Fix:</b> </p>'),Vc=W('<pre class="svelte-d3ct2b"> </pre>'),zc=W('<div class="terminal-detail svelte-d3ct2b"><p class="svelte-d3ct2b"> </p> <p class="svelte-d3ct2b"><b class="svelte-d3ct2b">Rule:</b> </p> <!> <!> <!> <!></div>'),Hc=W('<section><p class="terminal-line svelte-d3ct2b"><time class="svelte-d3ct2b"> </time> <span class="svelte-d3ct2b"> </span> <!></p> <!></section>'),Bc=W('<div class="metric-row svelte-d3ct2b"><div class="svelte-d3ct2b"><span class="svelte-d3ct2b"> </span> <strong class="svelte-d3ct2b"> </strong></div> <i class="svelte-d3ct2b"></i></div>'),Kc=W('<p class="empty svelte-d3ct2b">No rule counters yet.</p>'),Yc=W('<div class="metric-row warning svelte-d3ct2b"><div class="svelte-d3ct2b"><span class="svelte-d3ct2b"> </span> <strong class="svelte-d3ct2b"> </strong></div> <i class="svelte-d3ct2b"></i></div>'),Gc=W('<p class="empty svelte-d3ct2b">No file counters yet.</p>'),Jc=W('<small class="svelte-d3ct2b"> </small>'),Qc=W('<small class="svelte-d3ct2b"> </small>'),Xc=W('<section class="commit-item svelte-d3ct2b"><div class="commit-meta svelte-d3ct2b"><span> </span> <time> </time></div> <strong class="svelte-d3ct2b"> </strong> <p class="svelte-d3ct2b"> </p> <!> <!></section>'),Zc=W('<p class="empty svelte-d3ct2b">No commit hook violations recorded yet.</p>'),ef=W('<small class="svelte-d3ct2b"> </small>'),tf=W('<div class="rule-item svelte-d3ct2b"><div><div class="rule-meta svelte-d3ct2b"><span class="svelte-d3ct2b"> </span> <code class="svelte-d3ct2b"> </code></div> <p class="svelte-d3ct2b"> </p> <!></div> <button class="svelte-d3ct2b">Delete</button></div>'),sf=W('<p class="empty svelte-d3ct2b">No rules match the current filters.</p>'),rf=W('<div class="command-center svelte-d3ct2b"><aside class="sidebar svelte-d3ct2b"><div class="brand svelte-d3ct2b"><h1 class="svelte-d3ct2b">memory-core</h1> <span class="svelte-d3ct2b">command center</span></div> <nav aria-label="Dashboard navigation" class="svelte-d3ct2b"><a class="nav-item active svelte-d3ct2b" href="/"><span class="nav-icon svelte-d3ct2b">[]</span> <span>Command Center</span></a></nav> <div class="sidebar-footer svelte-d3ct2b"><div><i class="svelte-d3ct2b"></i> </div> <small class="svelte-d3ct2b"> </small></div></aside> <div class="workspace svelte-d3ct2b"><header class="topbar svelte-d3ct2b"><div class="topbar-left svelte-d3ct2b"><button class="icon-button mobile-menu svelte-d3ct2b" aria-label="Menu">=</button> <div><i class="svelte-d3ct2b"></i> <span> </span></div></div> <div class="header-metrics svelte-d3ct2b" aria-label="Global metrics"><div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Violations</span> <strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Files</span> <strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Rules</span> <strong class="svelte-d3ct2b"> </strong></div></div> <div class="top-actions svelte-d3ct2b" aria-label="Status shortcuts"><button class="icon-button svelte-d3ct2b" title="Warnings" aria-label="Warnings">!</button> <button class="icon-button svelte-d3ct2b" title="Rules" aria-label="Rules">R</button> <button class="icon-button svelte-d3ct2b" title="Database" aria-label="Database">DB</button> <button class="icon-button svelte-d3ct2b" title="Network" aria-label="Network">LAN</button></div></header> <main class="canvas svelte-d3ct2b"><section class="status-grid svelte-d3ct2b"><article class="glass-panel status-card svelte-d3ct2b"><div class="card-head svelte-d3ct2b"><h2 class="svelte-d3ct2b">Project</h2> <span class="svelte-d3ct2b"> </span></div> <div class="data-list svelte-d3ct2b"><div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Name</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Type</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Language</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Architecture</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Watcher</span><strong class="svelte-d3ct2b"> </strong></div> <!></div></article> <article class="glass-panel status-card svelte-d3ct2b"><div class="card-head svelte-d3ct2b"><h2 class="svelte-d3ct2b">Runtime</h2> <span class="svelte-d3ct2b"> </span></div> <div class="data-list svelte-d3ct2b"><div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Provider</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Check model</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Check status</span> <strong><!></strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Embedding</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Ollama URL</span><strong class="svelte-d3ct2b"> </strong></div></div></article> <article class="glass-panel status-card svelte-d3ct2b"><div class="card-head svelte-d3ct2b"><h2 class="svelte-d3ct2b">PostgreSQL</h2> <span> </span></div> <div class="data-list svelte-d3ct2b"><div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Database</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">User</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Host</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">URL</span><strong class="svelte-d3ct2b"> </strong></div></div></article></section> <!> <!> <section class="terminal-panel glass-panel svelte-d3ct2b"><div class="terminal-head svelte-d3ct2b"><div class="svelte-d3ct2b"><span class="terminal-icon svelte-d3ct2b">>_</span> <h2 class="svelte-d3ct2b">Live Feed</h2></div> <div class="window-dots svelte-d3ct2b" aria-hidden="true"><i class="svelte-d3ct2b"></i><i class="svelte-d3ct2b"></i><i class="svelte-d3ct2b"></i></div></div> <div class="terminal-body svelte-d3ct2b"><!> <!></div></section> <section class="content-grid svelte-d3ct2b"><article class="glass-panel stats-panel svelte-d3ct2b"><div class="card-head svelte-d3ct2b"><h2 class="svelte-d3ct2b">Stats</h2> <span class="svelte-d3ct2b">Recorded</span></div> <div class="stat-block svelte-d3ct2b"><h3 class="svelte-d3ct2b">Most Violated Rules</h3> <!></div> <div class="stat-block svelte-d3ct2b"><h3 class="svelte-d3ct2b">Problem Files</h3> <!></div> <div class="summary-strip svelte-d3ct2b"><div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Clean</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Issues</span><strong class="svelte-d3ct2b"> </strong></div> <div class="svelte-d3ct2b"><span class="svelte-d3ct2b">Events</span><strong class="svelte-d3ct2b"> </strong></div></div></article> <article class="glass-panel commit-watch svelte-d3ct2b"><div class="card-head svelte-d3ct2b"><h2 class="svelte-d3ct2b">Commit Watch</h2> <span class="svelte-d3ct2b"> </span></div> <div class="commit-list svelte-d3ct2b"></div></article> <article class="glass-panel rule-engine svelte-d3ct2b"><div class="card-head svelte-d3ct2b"><h2 class="svelte-d3ct2b">Rule Engine</h2> <span class="svelte-d3ct2b"> </span></div> <form class="rule-form svelte-d3ct2b"><div class="control-grid svelte-d3ct2b"><select class="svelte-d3ct2b"><option>Rule</option><option>Decision</option><option>Pattern</option><option>Ignore</option></select> <select class="svelte-d3ct2b"><option>Project</option><option>Global</option></select></div> <textarea rows="3" placeholder="Rule or decision" class="svelte-d3ct2b"></textarea> <div class="control-grid svelte-d3ct2b"><input placeholder="Reason" class="svelte-d3ct2b"/> <input placeholder="Tags" class="svelte-d3ct2b"/></div> <button class="svelte-d3ct2b"> </button></form> <div class="control-grid filters svelte-d3ct2b"><select class="svelte-d3ct2b"><option>All types</option><option>Rules</option><option>Decisions</option><option>Patterns</option><option>Ignores</option></select> <input placeholder="Search rules..." class="svelte-d3ct2b"/></div> <div class="rule-list svelte-d3ct2b"></div></article></section></main></div></div>');function nf(e,t){ya(t,!1);const s=Q(),r=Q(),a=Q(),i=Q(),u=Q(),d=Q(),v=Q(),p=Q(),g=Q(),E=Q(),w=Q(),y=Q();let o=Q({config:null,stats:{rules:{},files:{},topRules:[],topFiles:[]},files:[],memories:[]}),T=Q([]),m=Q(!1),R=Q("all"),$=Q(""),L=Q(!1),J=Q(""),ne,qe=!1,F=Q({type:"rule",scope:"project",content:"",reason:"",tags:"dashboard"});const Ye=()=>{var l;return((l=n(o).runtime)==null?void 0:l.project.name)??"memory-core"},nt=()=>{var A,C;const l=((A=n(o).runtime)==null?void 0:A.project.declaredArchitectures)??[],f=((C=n(o).runtime)==null?void 0:C.project.activeArchitectures)??[];return l.length>0?l.join(", "):f.length>0?f.join(", "):"none"};function ae(l){M(T,[{...l,id:crypto.randomUUID()},...n(T)].slice(0,80))}function pt(l){return l.type==="saved"?{type:"saved",timestamp:l.timestamp,file:l.file}:l.type==="clean"?{type:"clean",timestamp:l.timestamp,file:l.file}:l.type==="skipped"?{type:"skipped",timestamp:l.timestamp,file:l.file,reason:l.reason}:l.type==="violations"?{type:"violations",timestamp:l.timestamp,file:l.file,violations:l.violations}:l.type==="error"?{type:"error",timestamp:l.timestamp,message:l.message}:l.type==="ready"?{type:"system",timestamp:l.timestamp,message:`Watching ${l.path} | ${l.rules} rules | ${l.model}`}:{type:"system",timestamp:l.timestamp,message:"Watch stopped"}}function Ge(l){const f=n(o).files??[],A=f.findIndex(H=>H.file===l.file),C=f.slice();return A===-1?C.push(l):C[A]=l,C.sort((H,ie)=>ie.lastSeen.localeCompare(H.lastSeen))}function Es(l){const f=n(o).watcher??{enabled:!0,running:!1,path:void 0,model:void 0,rules:void 0,lastEventAt:void 0,error:void 0};let A=n(o).files,C={...f,lastEventAt:l.timestamp,enabled:!0};l.type==="ready"&&(C={...C,running:!0,error:void 0,path:l.path,model:l.model,rules:l.rules}),l.type==="saved"&&(A=Ge({file:l.file,status:"checking",lastSeen:l.timestamp,violations:[]})),l.type==="clean"&&(A=Ge({file:l.file,status:"clean",lastSeen:l.timestamp,violations:[]})),l.type==="skipped"&&(A=Ge({file:l.file,status:"skipped",lastSeen:l.timestamp,violations:[],message:l.reason})),l.type==="violations"&&(A=Ge({file:l.file,status:"violations",lastSeen:l.timestamp,violations:l.violations})),l.type==="error"&&(C={...C,running:!1,error:l.message}),l.type==="stopped"&&(C={...C,running:!1});const H=[l,...n(o).events??[]].slice(0,100);M(o,{...n(o),files:A,events:H,watcher:C})}function Jt(l=[]){M(T,l.map(pt).map(f=>({...f,id:crypto.randomUUID()})).reverse().slice(0,80))}function Qt(l){return new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date(l))}function Xt(l){return Math.max(1,...l.map(f=>f.count))}function Zt(l,f){const A=l.file||f;return l.line?`${A}:${l.line}`:A}function xs(l){return l.type==="saved"?"SAVE":l.type==="clean"?"OK":l.type==="skipped"?"SKIP":l.type==="violations"?"FAIL":l.type==="error"?"WARN":"SYS"}async function pe(){const l=await fetch("/api/snapshot");M(o,await l.json()),Jt(n(o).events)}async function ks(){if(!qe&&document.visibilityState!=="hidden"){qe=!0;try{const l=await fetch("/api/stats",{cache:"no-store"});if(!l.ok)return;const f=await l.json();if(!f.stats)return;M(o,{...n(o),stats:f.stats})}catch{}finally{qe=!1}}}function ei(){ne&&clearInterval(ne),ne=setInterval(()=>{ks()},2e3)}function Lr(){const l=location.protocol==="https:"?"wss:":"ws:",f=new WebSocket(`${l}//${location.host}/ws`);f.addEventListener("open",()=>{M(m,!0),ae({type:"system",timestamp:new Date().toISOString(),message:"Dashboard connected"})}),f.addEventListener("close",()=>{M(m,!1),ae({type:"error",timestamp:new Date().toISOString(),message:"Dashboard disconnected"}),setTimeout(Lr,1500)}),f.addEventListener("message",A=>{const C=JSON.parse(A.data);if(C.type==="snapshot"){M(o,C.snapshot),n(T).length===0&&Jt(n(o).events);return}C.type==="watch"&&(Es(C.event),ae(pt(C.event)))})}async function ti(){if(n(F).content.trim()){M(L,!0),M(J,"");try{const l=await fetch("/api/memories",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n(F))});if(!l.ok)throw new Error((await l.json()).error??"Save failed");M(F,{type:"rule",scope:"project",content:"",reason:"",tags:"dashboard"}),await pe()}catch(l){M(J,l.message)}finally{M(L,!1)}}}async function si(l){M(J,"");const f=await fetch(`/api/memories/${l}`,{method:"DELETE"});if(!f.ok){M(J,(await f.json()).error??"Delete failed");return}await pe()}pe().catch(l=>{M(J,l.message)}),Lr(),ei(),Rc(()=>{ne&&(clearInterval(ne),ne=void 0)}),Ee(()=>(n(o),n(R),n($)),()=>{M(s,n(o).memories.filter(l=>{const f=n(R)==="all"||l.type===n(R),A=`${l.type} ${l.scope} ${l.content} ${l.reason??""} ${l.tags.join(" ")}`.toLowerCase();return f&&A.includes(n($).toLowerCase())}))}),Ee(()=>n(o),()=>{M(r,Object.values(n(o).stats.files??{}).reduce((l,f)=>l+f,0))}),Ee(()=>n(o),()=>{M(a,n(o).files.filter(l=>l.status==="clean").length)}),Ee(()=>n(o),()=>{M(i,Object.values(n(o).stats.rules).reduce((l,f)=>l+f,0))}),Ee(()=>n(o),()=>{M(u,n(o).stats.recentViolations??[])}),Ee(()=>n(u),()=>{M(d,n(u).filter(l=>l.source==="hook"||l.source==="ci"))}),Ee(()=>n(r),()=>{M(v,n(r))}),Ee(()=>n(o),()=>{M(p,Object.keys(n(o).stats.files??{}).length)}),Ee(()=>n(o),()=>{M(g,n(o).memories.filter(l=>["rule","pattern","decision"].includes(l.type)).length)}),Ee(()=>n(o),()=>{var l;M(E,((l=n(o).memoryCount)==null?void 0:l.total)??n(o).memories.length)}),Ee(()=>n(o),()=>{var l;M(w,((l=n(o).memoryCount)==null?void 0:l.relevant)??n(o).memories.length)}),Ee(()=>(n(m),n(o)),()=>{var l,f;M(y,n(m)?((l=n(o).watcher)==null?void 0:l.enabled)===!1?{live:!1,label:"Watch off"}:(f=n(o).watcher)!=null&&f.running?{live:!0,label:"Watcher live"}:{live:!1,label:"Watcher idle"}:{live:!1,label:"Disconnected"})}),Yo(),Tc();var Pr=rf(),jr=_(Pr),ri=h(_(jr),4),Vs=_(ri);let $r;var ni=h(_(Vs)),ai=h(Vs,2),ii=_(ai),li=h(jr,2),Wr=_(li),qr=_(Wr),Ur=h(_(qr),2);let Vr;var oi=h(_(Ur),2),ci=_(oi),fi=h(qr,2),zr=_(fi),ui=h(_(zr),2),vi=_(ui),Hr=h(zr,2),di=h(_(Hr),2),pi=_(di),_i=h(Hr,2),hi=h(_(_i),2),gi=_(hi),bi=h(Wr,2),Br=_(bi),Kr=_(Br),Yr=_(Kr),mi=h(_(Yr),2),yi=_(mi),wi=h(Yr,2),Gr=_(wi),Ei=h(_(Gr)),xi=_(Ei),Jr=h(Gr,2),ki=h(_(Jr)),Si=_(ki),Qr=h(Jr,2),Ti=h(_(Qr)),Ai=_(Ti),Xr=h(Qr,2),Ri=h(_(Xr)),Ci=_(Ri),Zr=h(Xr,2),Ni=h(_(Zr)),Mi=_(Ni),Di=h(Zr,2);{var Oi=l=>{var f=Mc(),A=h(_(f)),C=_(A);V(()=>x(C,(n(o),b(()=>n(o).watcher.error)))),P(l,f)};fe(Di,l=>{n(o),b(()=>{var f;return(f=n(o).watcher)==null?void 0:f.error})&&l(Oi)})}var en=h(Kr,2),tn=_(en),Ii=h(_(tn),2),Fi=_(Ii),Li=h(tn,2),sn=_(Li),Pi=h(_(sn)),ji=_(Pi),rn=h(sn,2),$i=h(_(rn)),Wi=_($i),nn=h(rn,2),an=h(_(nn),2);let ln;var qi=_(an);{var Ui=l=>{var f=ra();V(()=>x(f,(n(o),b(()=>{var A;return(A=n(o).runtime)!=null&&A.model.checkModelInstalled?"installed":"missing"})))),P(l,f)},Vi=l=>{var f=ra();V(()=>x(f,(n(o),b(()=>{var A;return(A=n(o).runtime)!=null&&A.model.apiKeyConfigured?"api key set":"api key missing"})))),P(l,f)};fe(qi,l=>{n(o),b(()=>{var f;return((f=n(o).runtime)==null?void 0:f.model.provider)==="ollama"})?l(Ui):l(Vi,-1)})}var on=h(nn,2),zi=h(_(on)),Hi=_(zi),Bi=h(on,2),Ki=h(_(Bi)),Yi=_(Ki),Gi=h(en,2),cn=_(Gi),fn=h(_(cn),2);let un;var Ji=_(fn),Qi=h(cn,2),vn=_(Qi),Xi=h(_(vn)),Zi=_(Xi),dn=h(vn,2),el=h(_(dn)),tl=_(el),pn=h(dn,2),sl=h(_(pn)),rl=_(sl),nl=h(pn,2),al=h(_(nl)),il=_(al),_n=h(Br,2);{var ll=l=>{var f=Dc(),A=_(f);V(()=>x(A,(n(o),b(()=>n(o).dbError)))),P(l,f)};fe(_n,l=>{n(o),b(()=>n(o).dbError)&&l(ll)})}var hn=h(_n,2);{var ol=l=>{var f=Oc(),A=_(f);V(()=>x(A,n(J))),P(l,f)};fe(hn,l=>{n(J)&&l(ol)})}var gn=h(hn,2),cl=h(_(gn),2),bn=_(cl);{var fl=l=>{var f=Ic();P(l,f)};fe(bn,l=>{n(T),b(()=>n(T).length===0)&&l(fl)})}var ul=h(bn,2);Lt(ul,1,()=>(n(T),b(()=>[...n(T)].reverse())),l=>l.id,(l,f)=>{var A=Hc();let C;var H=_(A),ie=_(H),we=_(ie),_e=h(ie,2),k=_(_e),q=h(_e,2);{var Je=j=>{var B=Fc(),Oe=_(B);V(()=>x(Oe,(n(f),b(()=>n(f).message)))),P(j,B)},es=j=>{var B=Lc(),Oe=_(B);V(()=>x(Oe,`saved: ${n(f),b(()=>n(f).file)??""}`)),P(j,B)},Ot=j=>{var B=Pc(),Oe=_(B);V(()=>x(Oe,`${n(f),b(()=>n(f).file)??""} - no violations`)),P(j,B)},It=j=>{var B=jc(),Oe=_(B);V(()=>x(Oe,`${n(f),b(()=>n(f).file)??""} - skipped: ${n(f),b(()=>n(f).reason)??""}`)),P(j,B)},Qe=j=>{var B=$c(),Oe=_(B);V(()=>x(Oe,`${n(f),b(()=>n(f).violations.length)??""} violation${n(f),b(()=>n(f).violations.length===1?"":"s")??""} in ${n(f),b(()=>n(f).file)??""}`)),P(j,B)};fe(q,j=>{n(f),b(()=>n(f).type==="system"||n(f).type==="error")?j(Je):(n(f),b(()=>n(f).type==="saved")?j(es,1):(n(f),b(()=>n(f).type==="clean")?j(Ot,2):(n(f),b(()=>n(f).type==="skipped")?j(It,3):j(Qe,-1))))})}var Ft=h(H,2);{var he=j=>{var B=cc(),Oe=Wo(B);Lt(Oe,3,()=>(n(f),b(()=>n(f).violations)),(Pn,K)=>`${n(f).id}-${K}`,(Pn,K,Ol)=>{var jn=zc(),$n=_(jn),Il=_($n),Wn=h($n,2),Fl=h(_(Wn)),qn=h(Wn,2);{var Ll=te=>{var Ie=Wc(),_t=h(_(Ie));V(()=>x(_t,` ${n(K),b(()=>n(K).reason)??""}`)),P(te,Ie)};fe(qn,te=>{n(K),b(()=>n(K).reason)&&te(Ll)})}var Un=h(qn,2);{var Pl=te=>{var Ie=qc(),_t=h(_(Ie));V(()=>x(_t,` ${n(K),b(()=>n(K).issue)??""}`)),P(te,Ie)};fe(Un,te=>{n(K),b(()=>n(K).issue)&&te(Pl)})}var Vn=h(Un,2);{var jl=te=>{var Ie=Uc(),_t=h(_(Ie));V(()=>x(_t,` ${n(K),b(()=>n(K).suggestion)??""}`)),P(te,Ie)};fe(Vn,te=>{n(K),b(()=>n(K).suggestion)&&te(jl)})}var $l=h(Vn,2);{var Wl=te=>{var Ie=Vc(),_t=_(Ie);V(()=>x(_t,(n(K),b(()=>n(K).code)))),P(te,Ie)};fe($l,te=>{n(K),b(()=>n(K).code)&&te(Wl)})}V(te=>{x(Il,`[${n(Ol)+1}] ${te??""}`),x(Fl,` ${n(K),b(()=>n(K).rule)??""}`)},[()=>(n(K),n(f),b(()=>Zt(n(K),n(f).file)))]),P(Pn,jn)}),P(j,B)};fe(Ft,j=>{n(f),b(()=>n(f).type==="violations")&&j(he)})}V((j,B)=>{C=rs(A,1,"svelte-d3ct2b",null,C,{"error-line":n(f).type==="error","ok-line":n(f).type==="clean","violation-line":n(f).type==="violations"}),x(we,j),x(k,B)},[()=>(n(f),b(()=>Qt(n(f).timestamp))),()=>(n(f),b(()=>xs(n(f))))]),P(l,A)});var vl=h(gn,2),mn=_(vl),yn=h(_(mn),2),dl=h(_(yn),2);Lt(dl,1,()=>(n(o),b(()=>n(o).stats.topRules.slice(0,5))),l=>l.name,(l,f)=>{var A=Bc(),C=_(A),H=_(C),ie=_(H),we=h(H,2),_e=_(we),k=h(C,2);V(q=>{x(ie,(n(f),b(()=>n(f).name))),x(_e,(n(f),b(()=>n(f).count))),ia(k,q)},[()=>(n(f),n(o),b(()=>`width: ${n(f).count/Xt(n(o).stats.topRules)*100}%`))]),P(l,A)},l=>{var f=Kc();P(l,f)});var wn=h(yn,2),pl=h(_(wn),2);Lt(pl,1,()=>(n(o),b(()=>n(o).stats.topFiles.slice(0,5))),l=>l.name,(l,f)=>{var A=Yc(),C=_(A),H=_(C),ie=_(H),we=h(H,2),_e=_(we),k=h(C,2);V(q=>{x(ie,(n(f),b(()=>n(f).name))),x(_e,(n(f),b(()=>n(f).count))),ia(k,q)},[()=>(n(f),n(o),b(()=>`width: ${n(f).count/Xt(n(o).stats.topFiles)*100}%`))]),P(l,A)},l=>{var f=Gc();P(l,f)});var _l=h(wn,2),En=_(_l),hl=h(_(En)),gl=_(hl),xn=h(En,2),bl=h(_(xn)),ml=_(bl),yl=h(xn,2),wl=h(_(yl)),El=_(wl),kn=h(mn,2),Sn=_(kn),xl=h(_(Sn),2),kl=_(xl),Sl=h(Sn,2);Lt(Sl,7,()=>(n(d),b(()=>n(d).slice(0,8))),(l,f)=>`${l.timestamp}-${f}`,(l,f)=>{var A=Xc(),C=_(A),H=_(C),ie=_(H),we=h(H,2),_e=_(we),k=h(C,2),q=_(k),Je=h(k,2),es=_(Je),Ot=h(Je,2);{var It=he=>{var j=Jc(),B=_(j);V(()=>x(B,(n(f),b(()=>n(f).issue)))),P(he,j)};fe(Ot,he=>{n(f),b(()=>n(f).issue)&&he(It)})}var Qe=h(Ot,2);{var Ft=he=>{var j=Qc(),B=_(j);V(()=>x(B,(n(f),b(()=>n(f).suggestion)))),P(he,j)};fe(Qe,he=>{n(f),b(()=>n(f).suggestion)&&he(Ft)})}V((he,j)=>{x(ie,(n(f),b(()=>n(f).source==="ci"?"CI":"Hook"))),x(_e,he),x(q,(n(f),b(()=>n(f).rule))),x(es,j)},[()=>(n(f),b(()=>Qt(n(f).timestamp))),()=>(n(f),b(()=>Zt(n(f),n(f).file||"staged diff")))]),P(l,A)},l=>{var f=Zc();P(l,f)});var Tl=h(kn,2),Tn=_(Tl),Al=h(_(Tn),2),Rl=_(Al),zs=h(Tn,2),An=_(zs),Hs=_(An),Bs=_(Hs);Bs.value=Bs.__value="rule";var Ks=h(Bs);Ks.value=Ks.__value="decision";var Ys=h(Ks);Ys.value=Ys.__value="pattern";var Rn=h(Ys);Rn.value=Rn.__value="ignore";var Cn=h(Hs,2),Gs=_(Cn);Gs.value=Gs.__value="project";var Nn=h(Gs);Nn.value=Nn.__value="global";var Mn=h(An,2),Dn=h(Mn,2),On=_(Dn),Cl=h(On,2),In=h(Dn,2),Nl=_(In),Fn=h(zs,2),Js=_(Fn),Qs=_(Js);Qs.value=Qs.__value="all";var Xs=h(Qs);Xs.value=Xs.__value="rule";var Zs=h(Xs);Zs.value=Zs.__value="decision";var er=h(Zs);er.value=er.__value="pattern";var Ln=h(er);Ln.value=Ln.__value="ignore";var Ml=h(Js,2),Dl=h(Fn,2);Lt(Dl,5,()=>n(s),l=>l.id,(l,f)=>{var A=tf(),C=_(A),H=_(C),ie=_(H),we=_(ie),_e=h(ie,2),k=_(_e),q=h(H,2),Je=_(q),es=h(q,2);{var Ot=Qe=>{var Ft=ef(),he=_(Ft);V(()=>x(he,(n(f),b(()=>n(f).reason)))),P(Qe,Ft)};fe(es,Qe=>{n(f),b(()=>n(f).reason)&&Qe(Ot)})}var It=h(C,2);V(Qe=>{x(we,(n(f),b(()=>n(f).scope))),x(k,`Rule-${Qe??""}`),x(Je,(n(f),b(()=>n(f).content))),Ec(It,"aria-label",(n(f),b(()=>`Delete ${n(f).id}`)))},[()=>(n(f),b(()=>String(n(f).id).padStart(3,"0")))]),ta("click",It,()=>si(n(f).id)),P(l,A)},l=>{var f=sf();P(l,f)}),V((l,f,A)=>{var C,H,ie,we,_e;$r=rs(Vs,1,"status-chip svelte-d3ct2b",null,$r,{live:n(y).live}),x(ni,` ${n(y),b(()=>n(y).label)??""}`),x(ii,(n(o),b(()=>{var k;return((k=n(o).runtime)==null?void 0:k.model.label)??"runtime pending"}))),Vr=rs(Ur,1,"live-label svelte-d3ct2b",null,Vr,{live:n(y).live}),x(ci,(n(y),b(()=>n(y).label))),x(vi,n(v)),x(pi,n(p)),x(gi,n(g)),x(yi,(n(o),b(()=>{var k;return(k=n(o).runtime)!=null&&k.project.initialized?"Initialized":"Not initialized"}))),x(xi,l),x(Si,(n(o),b(()=>{var k;return((k=n(o).runtime)==null?void 0:k.project.type)??"unknown"}))),x(Ai,(n(o),b(()=>{var k;return((k=n(o).runtime)==null?void 0:k.project.language)??"unknown"}))),x(Ci,f),x(Mi,(n(o),b(()=>{var k,q;return((k=n(o).watcher)==null?void 0:k.enabled)===!1?"disabled":(q=n(o).watcher)!=null&&q.running?"running":"idle"}))),x(Fi,(n(o),b(()=>{var k;return((k=n(o).runtime)==null?void 0:k.model.label)??"pending"}))),x(ji,(n(o),b(()=>{var k;return((k=n(o).runtime)==null?void 0:k.model.provider)??"unknown"}))),x(Wi,(n(o),b(()=>{var k,q,Je;return((k=n(o).runtime)==null?void 0:k.model.checkModelResolved)??((q=n(o).runtime)==null?void 0:q.model.checkModel)??((Je=n(o).runtime)==null?void 0:Je.model.chatModel)??"unknown"}))),ln=rs(an,1,"svelte-d3ct2b",null,ln,{"status-ok":((C=n(o).runtime)==null?void 0:C.model.checkModelInstalled)||((H=n(o).runtime)==null?void 0:H.model.apiKeyConfigured),"status-warn":((ie=n(o).runtime)==null?void 0:ie.model.checkModelInstalled)===!1||((we=n(o).runtime)==null?void 0:we.model.error)}),x(Hi,(n(o),b(()=>{var k,q;return((k=n(o).runtime)==null?void 0:k.model.embeddingModelResolved)??((q=n(o).runtime)==null?void 0:q.model.embeddingModel)??"unknown"}))),x(Yi,(n(o),b(()=>{var k;return((k=n(o).runtime)==null?void 0:k.model.ollamaUrl)??"unknown"}))),un=rs(fn,1,"svelte-d3ct2b",null,un,{success:(_e=n(o).runtime)==null?void 0:_e.postgres.connected}),x(Ji,(n(o),b(()=>{var k;return(k=n(o).runtime)!=null&&k.postgres.connected?"Connected":"Not connected"}))),x(Zi,(n(o),b(()=>{var k,q;return((k=n(o).runtime)==null?void 0:k.postgres.serverDatabase)??((q=n(o).runtime)==null?void 0:q.postgres.database)??"unknown"}))),x(tl,(n(o),b(()=>{var k,q;return((k=n(o).runtime)==null?void 0:k.postgres.serverUser)??((q=n(o).runtime)==null?void 0:q.postgres.user)??"unknown"}))),x(rl,`${n(o),b(()=>{var k;return((k=n(o).runtime)==null?void 0:k.postgres.host)??"unknown"})??""}${n(o),b(()=>{var k;return(k=n(o).runtime)!=null&&k.postgres.port?`:${n(o).runtime.postgres.port}`:""})??""}`),x(il,(n(o),b(()=>{var k;return((k=n(o).runtime)==null?void 0:k.postgres.url)??"(not set)"}))),x(gl,n(a)),x(ml,n(v)),x(El,n(i)),x(kl,`${n(d),b(()=>n(d).length)??""} recent`),x(Rl,`${n(g)??""} rules active`),In.disabled=A,x(Nl,n(L)?"Saving...":"Add New Architecture Rule")},[()=>b(Ye),()=>b(nt),()=>(n(L),n(F),b(()=>n(L)||!n(F).content.trim()))]),nr(Hs,()=>n(F).type,l=>ts(F,n(F).type=l)),nr(Cn,()=>n(F).scope,l=>ts(F,n(F).scope=l)),As(Mn,()=>n(F).content,l=>ts(F,n(F).content=l)),As(On,()=>n(F).reason,l=>ts(F,n(F).reason=l)),As(Cl,()=>n(F).tags,l=>ts(F,n(F).tags=l)),ta("submit",zs,Sc(ti)),nr(Js,()=>n(R),l=>M(R,l)),As(Ml,()=>n($),l=>M($,l)),P(e,Pr),wa()}fc(nf,{target:document.getElementById("app")});
|