@skill-map/cli 0.41.0 → 0.43.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -408,20 +408,15 @@ CREATE TABLE scan_contributions (
408
408
  CREATE INDEX ix_scan_contributions_node_path ON scan_contributions(node_path);
409
409
  CREATE INDEX ix_scan_contributions_plugin_id ON scan_contributions(plugin_id);
410
410
 
411
- -- scan_node_tags: dual-source tag system (Phase 2 `tags` decision).
412
- -- One row per (node_path, tag, source) triple. Projected at persist
413
- -- time from `frontmatter.tags` (source='author') and
414
- -- `sidecar.annotations.tags` (source='user'). Drives `sm list --tag`
415
- -- and the UI's tag-faceted search; the (tag) index keeps lookups
416
- -- O(log n). The same tag string MAY appear under both sources for the
417
- -- same node (the PK accepts the pair); search returns the node once
418
- -- via DISTINCT, the UI renders both chips with their attribution.
411
+ -- scan_node_tags: tag system. One row per (node_path, tag) pair.
412
+ -- Projected at persist time from `sidecar.annotations.tags`. Tags are
413
+ -- a skill-map concept (no vendor carries `tags` in frontmatter), so the
414
+ -- sidecar is the single source. Drives `sm list --tag` and the UI's
415
+ -- tag-faceted search; the (tag) index keeps lookups O(log n).
419
416
  CREATE TABLE scan_node_tags (
420
417
  node_path TEXT NOT NULL,
421
418
  tag TEXT NOT NULL,
422
- source TEXT NOT NULL,
423
- PRIMARY KEY (node_path, tag, source),
424
- CONSTRAINT ck_scan_node_tags_source CHECK (source IN ('author','user'))
419
+ PRIMARY KEY (node_path, tag)
425
420
  );
426
421
  CREATE INDEX ix_scan_node_tags_tag ON scan_node_tags(tag);
427
422
  CREATE INDEX ix_scan_node_tags_node_path ON scan_node_tags(node_path);
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@skill-map/cli",
3
- "version": "0.41.0",
3
+ "version": "0.43.0",
4
4
  "description": "skill-map reference implementation — kernel + CLI + adapters.",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
- "homepage": "https://skill-map.dev",
7
+ "homepage": "https://skill-map.ai",
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "git+https://github.com/crystian/skill-map.git",
@@ -59,7 +59,7 @@
59
59
  "smol-toml": "1.6.1",
60
60
  "typanion": "3.14.0",
61
61
  "ws": "8.21.0",
62
- "@skill-map/spec": "0.38.0"
62
+ "@skill-map/spec": "0.40.0"
63
63
  },
64
64
  "devDependencies": {
65
65
  "@eslint/js": "10.0.1",
@@ -1,123 +0,0 @@
1
- import{b as Nt,c as w,d as Lt,e as Te}from"./chunk-JWI3M5RV.js";import{a as yt,b as Ct,c as ke,d as Se,e as Et}from"./chunk-HEJCH7BA.js";import"./chunk-HP375T2O.js";import{e as Mt,f as It,g as Tt,h as Ot,l as jt,m as Dt,n as Ft,o as At,p as ge,q as pe}from"./chunk-5WJRN3LD.js";import{a as Me,b as Ie}from"./chunk-IUDL3NDH.js";import{e as Pt,f as kt,g as St}from"./chunk-XOHD5XWA.js";import{$ as nt,Ab as C,Ba as it,Ca as Z,Cb as d,Ed as W,Fa as o,Fb as dt,Fd as $,Gb as ct,H as Ye,Hb as ve,I as be,Ib as xe,J as Je,Kd as wt,L as Ze,Ld as Ee,N as k,Nb as Be,Nc as ht,Nd as le,Ob as K,Oc as _t,Od as de,Pb as gt,Pd as ce,Qb as he,Ra as F,Rb as l,S as et,Sa as ot,Sb as u,T as S,Tb as p,U as E,Ua as rt,Ub as T,Va as at,Wa as ie,Wc as ae,Z as tt,ac as re,bd as Ce,cc as pt,cd as we,db as v,ea as m,ed as ft,ga as L,gb as _,hb as f,hd as bt,ia as ze,ib as st,jb as ee,jc as mt,kb as O,lb as j,mb as h,mc as y,nb as a,nd as vt,ob as s,od as _e,pb as I,pc as ye,pd as xt,qb as b,qc as V,rb as x,sb as oe,vb as lt,vd as Pe,wd as se,yb as D,yc as Ke,zb as q,zc as ut}from"./chunk-YL6SWAFJ.js";import"./chunk-C2YUQODZ.js";import{a as U,b as J}from"./chunk-VB56BUGO.js";function cn(t,n){if(t&1&&(b(0,"p",6),l(1),x()),t&2){let e=d();o(),T(" ",e.texts.aboutErrorPrefix," ",e.loadError()," ")}}var Oe=class t{dataSource=k(W);updateCheck=k(Nt);theme=k(Te);visible=V.required();texts=w;health=m(null);loadError=m(null);markSrc=y(()=>this.theme.resolved()==="dark"?"skill-map-mark-light.svg":"skill-map-mark-dark.svg");cliVersion=y(()=>this.updateCheck.current()??this.health()?.implVersion??this.texts.aboutUnknown);specVersion=y(()=>this.health()?.specVersion??this.texts.aboutLoading);schemaVersion=y(()=>this.health()?.schemaVersion??this.texts.aboutLoading);cwd=y(()=>this.health()?.cwd??this.texts.aboutLoading);dbDisplay=y(()=>{let n=this.health();return n?this.texts.aboutDbValue(n.db,gn(n.dbPath,n.cwd)):this.texts.aboutLoading});constructor(){L(()=>{this.visible()&&this.health()===null&&this.load()})}async load(){this.loadError.set(null);try{let n=await this.dataSource.health();this.health.set(n)}catch(n){let e=n instanceof $||n instanceof Error?n.message:String(n);this.loadError.set(e)}}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=F({type:t,selectors:[["sm-settings-about"]],inputs:{visible:[1,"visible"]},decls:57,vars:25,consts:[["aria-labelledby","settings-about-heading","data-testid","settings-about",1,"settings-about"],[1,"settings-about__header"],["alt","","aria-hidden","true","data-testid","settings-about-logo",1,"settings-about__logo",3,"src"],[1,"settings-about__heading-text"],["id","settings-about-heading",1,"settings-about__title"],[1,"settings-about__intro"],["data-testid","settings-about-error",1,"settings-about__error"],["target","_blank","rel","noopener noreferrer","data-testid","settings-about-star",1,"settings-about__star",3,"href"],["aria-hidden","true",1,"fa-solid","fa-star","settings-about__star-icon"],[1,"settings-about__star-text"],[1,"settings-about__star-heading"],[1,"settings-about__star-body"],[1,"settings-about__star-cta"],["aria-hidden","true",1,"fa-solid","fa-star"],[1,"settings-about__list"],[1,"settings-about__row"],[1,"settings-about__label"],[1,"settings-about__value"],["target","_blank","rel","noopener noreferrer","data-testid","settings-about-website",1,"settings-about__link",3,"href"],["target","_blank","rel","noopener noreferrer","data-testid","settings-about-github",1,"settings-about__link",3,"href"],["data-testid","settings-about-cli",1,"settings-about__value"],["data-testid","settings-about-spec",1,"settings-about__value"],["data-testid","settings-about-schema",1,"settings-about__value"],["data-testid","settings-about-cwd",1,"settings-about__value"],["data-testid","settings-about-db",1,"settings-about__value"]],template:function(e,i){e&1&&(b(0,"section",0)(1,"header",1),oe(2,"img",2),b(3,"div",3)(4,"h2",4),l(5),x(),b(6,"p",5),l(7),x()()(),_(8,cn,2,2,"p",6),b(9,"a",7),oe(10,"i",8),b(11,"span",9)(12,"span",10),l(13),x(),b(14,"span",11),l(15),x()(),b(16,"span",12),oe(17,"i",13),l(18),x()(),b(19,"dl",14)(20,"div",15)(21,"dt",16),l(22),x(),b(23,"dd",17)(24,"a",18),l(25),x()()(),b(26,"div",15)(27,"dt",16),l(28),x(),b(29,"dd",17)(30,"a",19),l(31),x()()(),b(32,"div",15)(33,"dt",16),l(34),x(),b(35,"dd",20),l(36),x()(),b(37,"div",15)(38,"dt",16),l(39),x(),b(40,"dd",21),l(41),x()(),b(42,"div",15)(43,"dt",16),l(44),x(),b(45,"dd",22),l(46),x()(),b(47,"div",15)(48,"dt",16),l(49),x(),b(50,"dd",23),l(51),x()(),b(52,"div",15)(53,"dt",16),l(54),x(),b(55,"dd",24),l(56),x()()()()),e&2&&(o(2),q("src",i.markSrc(),Z),o(3),p(" ",i.texts.aboutHeading," "),o(2),u(i.texts.aboutIntro),o(),f(i.loadError()?8:-1),o(),q("href",i.texts.aboutGithubUrl,Z),v("aria-label",i.texts.aboutStarA11y),o(4),u(i.texts.aboutStarHeading),o(2),u(i.texts.aboutStarBody),o(3),p(" ",i.texts.aboutStarCta," "),o(4),u(i.texts.aboutWebsiteLabel),o(2),q("href",i.texts.aboutWebsiteUrl,Z),o(),u(i.texts.aboutWebsiteUrl),o(3),u(i.texts.aboutGithubLabel),o(2),q("href",i.texts.aboutGithubUrl,Z),o(),u(i.texts.aboutGithubUrl),o(3),u(i.texts.aboutCliLabel),o(2),p(" ",i.cliVersion()," "),o(3),u(i.texts.aboutSpecLabel),o(2),p(" ",i.specVersion()," "),o(3),u(i.texts.aboutSchemaLabel),o(2),p(" ",i.schemaVersion()," "),o(3),u(i.texts.aboutFolderLabel),o(2),p(" ",i.cwd()," "),o(3),u(i.texts.aboutDbLabel),o(2),p(" ",i.dbDisplay()," "))},styles:["[_nghost-%COMP%]{display:block;height:100%;overflow-y:auto;padding:1.25rem 1.5rem}.settings-about[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.75rem}.settings-about__header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem}.settings-about__logo[_ngcontent-%COMP%]{width:64px;height:64px;flex-shrink:0}.settings-about__heading-text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;min-width:0}.settings-about__title[_ngcontent-%COMP%]{font-size:1.15rem;font-weight:600;margin:0}.settings-about__intro[_ngcontent-%COMP%]{margin:0;color:var(--p-text-muted-color);font-size:.875rem}.settings-about__error[_ngcontent-%COMP%]{margin:0;padding:.5rem .75rem;border-radius:var(--p-border-radius);background:var(--p-message-error-background);color:var(--p-message-error-color);font-size:.875rem}.settings-about__list[_ngcontent-%COMP%]{margin:0;padding:0;display:flex;flex-direction:column;gap:.25rem}.settings-about__row[_ngcontent-%COMP%]{display:grid;grid-template-columns:180px 1fr;align-items:baseline;gap:.75rem;padding:.5rem .75rem;border-radius:var(--p-border-radius)}.settings-about__row[_ngcontent-%COMP%]:nth-child(odd){background:var(--p-content-hover-background)}.settings-about__label[_ngcontent-%COMP%]{margin:0;font-size:.875rem;color:var(--p-text-muted-color)}.settings-about__value[_ngcontent-%COMP%]{margin:0;font-family:var(--p-monospace-font-family);font-size:.875rem;word-break:break-all}.settings-about__link[_ngcontent-%COMP%]{color:var(--p-primary-color);text-decoration:none}.settings-about__link[_ngcontent-%COMP%]:hover, .settings-about__link[_ngcontent-%COMP%]:focus-visible{text-decoration:underline}.settings-about__star[_ngcontent-%COMP%]{--star-accent: #f4b400;display:flex;align-items:center;gap:.875rem;padding:.875rem 1rem;border-radius:var(--p-border-radius);border:1px solid color-mix(in oklab,var(--star-accent) 45%,transparent);background:color-mix(in oklab,var(--star-accent) 12%,transparent);color:var(--p-text-color);text-decoration:none;cursor:pointer;transition:background .15s ease,border-color .15s ease,transform .15s ease}.settings-about__star[_ngcontent-%COMP%]:hover, .settings-about__star[_ngcontent-%COMP%]:focus-visible{background:color-mix(in oklab,var(--star-accent) 22%,transparent);border-color:color-mix(in oklab,var(--star-accent) 70%,transparent);transform:translateY(-1px);outline:none}.app-dark[_nghost-%COMP%] .settings-about__star[_ngcontent-%COMP%], .app-dark [_nghost-%COMP%] .settings-about__star[_ngcontent-%COMP%]{background:color-mix(in oklab,var(--star-accent) 18%,transparent);border-color:color-mix(in oklab,var(--star-accent) 55%,transparent)}.app-dark[_nghost-%COMP%] .settings-about__star[_ngcontent-%COMP%]:hover, .app-dark [_nghost-%COMP%] .settings-about__star[_ngcontent-%COMP%]:hover, .app-dark[_nghost-%COMP%] .settings-about__star[_ngcontent-%COMP%]:focus-visible, .app-dark [_nghost-%COMP%] .settings-about__star[_ngcontent-%COMP%]:focus-visible{background:color-mix(in oklab,var(--star-accent) 30%,transparent);border-color:var(--star-accent)}.settings-about__star-icon[_ngcontent-%COMP%]{font-size:1.5rem;color:var(--star-accent);flex-shrink:0}.settings-about__star-text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.125rem;flex:1;min-width:0}.settings-about__star-heading[_ngcontent-%COMP%]{font-weight:600;font-size:.95rem}.settings-about__star-body[_ngcontent-%COMP%]{font-size:.8125rem;color:var(--p-text-muted-color);line-height:1.4}.settings-about__star-cta[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.375rem;padding:.375rem .75rem;border-radius:var(--sm-radius-pill);background:var(--star-accent);color:#1a1a1a;font-weight:600;font-size:.8125rem;white-space:nowrap;flex-shrink:0}.settings-about__star[_ngcontent-%COMP%]:hover .settings-about__star-cta[_ngcontent-%COMP%], .settings-about__star[_ngcontent-%COMP%]:focus-visible .settings-about__star-cta[_ngcontent-%COMP%]{background:color-mix(in oklab,var(--star-accent) 88%,white)}"],changeDetection:0})};function gn(t,n){if(!t||!n)return t;let e=n.replace(/[/\\]+$/,"");return t.startsWith(e)?t.slice(e.length).replace(/^[/\\]+/,""):t}var me=class t{ownerSig=m(null);dirtyCount=y(()=>{let n=this.ownerSig();return n?n.dirtyIds().size:0});register(n){this.ownerSig.set(n)}deregister(n){this.ownerSig()===n&&this.ownerSig.set(null)}async applyChanges(){let n=this.ownerSig();return n?n.applyChanges():{ok:!1}}discardChanges(){this.ownerSig()?.discardChanges()}static \u0275fac=function(e){return new(e||t)};static \u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"})};var Vt={schemaVersion:1,entries:[{version:"0.41.0",date:"2026-05-27",kind:"user-facing",highlights:[{body:"New `--max-nodes <N>` on `sm scan` / `sm watch` / `sm serve` caps how many files the walker accepts (default 256, bidirectional). Past the limit, a persistent banner links to **Settings \u2192 Project** to trim `.skillmapignore`.",packages:["@skill-map/cli","@skill-map/spec"]},{body:"`sm -version` and `sm -help` now suggest `--version` / `--help` consistently, even from a directory with no skill-map project.",packages:["@skill-map/cli"]}]},{version:"0.40.1",date:"2026-05-26",kind:"user-facing",highlights:[{body:"Update chip copies the install command on click. Settings copy polished across General + Project. Path is now the second column in the list view. Filtered-empty views unified across List + Graph with a Reset button. Matrix theme retints dropdowns and toggle buttons.",packages:["@skill-map/cli"]}]},{version:"0.40.0",date:"2026-05-26",kind:"user-facing",highlights:[{body:"**Changelog tab is now bounded.** The Settings \u2192 Changelog tab shows the most recent 10 releases and links out to the full changelog on GitHub for older entries.",packages:["@skill-map/cli"]},{body:"Plugins no longer have a bundle-level switch; each extension toggles on its own. `sm plugins disable <bundle>` cascades across the bundle's extensions (multi-extension bundles need `--yes`). The kind filter narrows extensions inside matched bundles instead of leaking siblings.",packages:["@skill-map/cli","@skill-map/spec"]},{body:"**Cleaner Plugins view.** Settings \u2192 Plugins and `sm plugins show <bundle>` no longer print a per-extension version chip for built-in plugins (they all share the CLI version). External (user-authored) plugins are unchanged and still show per-extension semver.",packages:["@skill-map/cli"]},{body:'`sm scan` summary now splits findings per severity (`N errors \xB7 M warnings \xB7 K info`), colored and collapsed when zero. The graph view gains a third palette to filter cards with errors / warnings; the perf-HUD says "links" instead of "edges".',packages:["@skill-map/cli"]},{body:"**List view** is live. Click **List** in the topbar for a sortable, filterable table of every node (Kind, Name, Tags, Path, Tokens, Stability, Stale, Issues). Click a row to inspect on the graph. Graph card chips now share the same icons as the list.",packages:["@skill-map/cli"]},{body:'Graph cards drop the corner badge for routine warnings; count + tooltip stay on the footer chip. Broken refs now escalate `sm scan` to exit 1 (were exit 0). `sm init` prints the "no provider markers" advisory as a two-line yellow `\u26A0` block.',packages:["@skill-map/cli","@skill-map/spec"]},{body:'`sm check --analyzers <id>` now errors with the valid id list when mistyped, instead of silently saying "No issues." `/invoke` and `@mention` links from any markdown body now contribute to the target\'s `IN`. `sm plugins doctor` summary spells out its bundle + extension split.',packages:["@skill-map/cli","@skill-map/spec"]}]},{version:"0.39.0",date:"2026-05-25",kind:"user-facing",highlights:[{body:"Renamed `core/field-unknown` to `core/annotation-field-unknown` so the sidecar typo-guard rule groups with the other `core/annotation-*` rules. Update references in `settings.json` or `sm check --analyzers <id>` to the new name.",packages:["@skill-map/cli","@skill-map/spec"]},{body:"Renamed 14 built-in extension ids to a `<area>-<detail>` shape (e.g. `core/broken-ref` is now `core/reference-broken`). If you reference these by qualified id in `settings.json` or via `sm check --analyzers <id>`, update to the new names.",packages:["@skill-map/cli","@skill-map/spec"]},{body:"In dev builds the topbar and the `sm serve` banner now show only the `dev` marker instead of pairing it with the published version number.",packages:["@skill-map/cli"]},{body:"When a scan adds or removes nodes, the graph view animates the camera to frame the new layout, refreshes auto positions so nodes never land on top of each other, and keeps your manually-dragged pins where you put them.",packages:["@skill-map/cli"]},{body:"`sm` log lines now lead with a coloured glyph per level (`\u26A0 WARN`, `\u2715 ERROR`, `\u2139 INFO`) so advisories stand out from the rest of the output.",packages:["@skill-map/cli"]},{body:"In Settings, expanding a bundle plugin (claude, antigravity, openai, agent-skills) now shows the correct per-extension state and the toggles persist, the next scan honours them. `sm plugins list` reflects effective state too.",packages:["@skill-map/cli","@skill-map/spec"]},{body:"Plugins always list `core` first across CLI, BFF, and Settings; the project path stays visible in the topbar (truncated with `\u2026` on the LEFT so the project name reaches the eye); and the SPA reconnects on its own when `sm serve` restarts.",packages:["@skill-map/cli"]},{body:'`sm list` IN counts and the inspector\'s "Linked nodes \u2192 INCOMING" now include every `@mention` and `/invoke`, not just markdown links. `sm plugins doctor` no longer raises a spurious `claude/agent` warning on a clean install.',packages:["@skill-map/cli"]}]},{version:"0.38.0",date:"2026-05-24",kind:"user-facing",highlights:[{body:"`sm <verb> --json` now also suppresses info banners on stderr, keeping both streams clean for piping into `jq`.",packages:["@skill-map/cli"]}]},{version:"0.37.0",date:"2026-05-23",kind:"user-facing",highlights:[{body:"`sm scan` now warns once when provider markers on disk drifted since `activeProvider` was set (e.g. you added `.codex/` after picking the `claude` lens). Run `sm config set activeProvider <id>` to switch the lens, or ignore the warn and keep going, it never blocks the scan.",packages:["@skill-map/cli","@skill-map/spec"]},{body:"**Clearer CLI errors.** Errors from `sm serve`, `bump`, `db`, `plugins`, `refresh`, `list`, `watch`, `graph`, `hooks`, and `sidecar` now print a `\u2715` headline plus a dim hint on the next line. Fixes a `sm refresh` persist-failure that rendered `{{glyph}}` literally.",packages:["@skill-map/cli"]},{body:"`sm` now detects when the local `.skill-map/` DB was written by an incompatible CLI version: newer minor or different major refuses to open with a clear hint; older same-major prints a one-shot warning and continues. Defensive parse errors include the same hint.",packages:["@skill-map/cli"]},{body:'`sm init --force` now also resets the DB (was overwriting only the config files). Solves the "Failed to read scan rows" crash on the first auto-scan when re-initialising a project that already had a DB from an older CLI version.',packages:["@skill-map/cli"]},{body:"**Two scan-time bugs fixed.** Resolved `/slash` and `@mention` links now correctly land at confidence `1.0` (were stuck at the emit floor), and the markdown-link extractor no longer flags `[label](path)` shown inside backticks or fenced code blocks as broken references.",packages:["@skill-map/cli"]},{body:"Cross-provider files (e.g. a `.codex/agents/*.toml` while the lens is `claude`) are no longer claimed by the foreign provider. They surface as plain markdown / unclassified instead, matching how the agent itself would see them at runtime.",packages:["@skill-map/cli","@skill-map/spec"]},{body:"Card chips for incoming / outgoing links no longer count self-loops, so a node that links back to itself stops showing inflated 1 in / 1 out. The `core/self-loop` analyzer still surfaces the self-reference as a warning, only the misleading count goes away.",packages:["@skill-map/cli"]},{body:"**CLI + inspector polish.** `sm init` now prompts for the active lens when markers compete; `sm config set activeProvider` rejects unknown ids upfront; error blocks across the CLI gain a `\u2715` glyph + hint; the inspector hides self-loops and paints kinds in their canonical colour.",packages:["@skill-map/cli"]},{body:'**Inspector overhaul.** Links show numeric confidence, a Findings list, per-row issue chips, and per-site "Occurs at" lines. New "External references" section. Self-loops hidden by default. Two new analyzers flag redundant multi-form references and self-loops.',packages:["@skill-map/cli","@skill-map/spec"]},{body:"`sm scan` now warns when two extractors detect overlapping byte ranges. The graph keeps the winner; the issue panel explains which detection lost and why, so a markdown link wrapping an `@`-directive no longer looks like silent disappearing intent.",packages:["@skill-map/cli","@skill-map/spec"]}]},{version:"0.36.0",date:"2026-05-22",kind:"user-facing",highlights:[{body:"**Gemini CLI support retired.** Antigravity CLI projects (Google's May 2026 replacement) scan via the open-standard `.agents/skills/` paths under the existing `agent-skills` lens. Run `sm config set activeProvider antigravity` to flag a project as Antigravity-flavoured.",packages:["@skill-map/cli","@skill-map/spec"]},{body:"**Files whose name shadows a built-in are flagged.** A file like `.claude/commands/help.md` now emits a `warn` (Claude's runtime ignores it for its own `/help`), and incoming `/help` edges resolve to it at confidence `0.1` instead of `1.0`.",packages:["@skill-map/cli","@skill-map/spec"]}]}]};var Rt=Vt;var mn=(t,n)=>n.version;function un(t,n){if(t&1&&(b(0,"p",3),l(1),x()),t&2){let e=d();o(),p(" ",e.texts.changelogEmpty," ")}}function hn(t,n){if(t&1&&(b(0,"p",12),l(1),x()),t&2){let e=d(3);o(),p(" ",e.texts.changelogInternalRelease," ")}}function _n(t,n){if(t&1&&(b(0,"li",17),l(1),x()),t&2){let e=n.$implicit;o(),u(e)}}function fn(t,n){if(t&1&&(b(0,"ul",16),O(1,_n,2,1,"li",17,ee),x()),t&2){let e=d().$implicit,i=d(4);v("aria-label",i.texts.changelogAffectedPackages),o(),j(e.packages)}}function bn(t,n){if(t&1&&(b(0,"li",14),oe(1,"div",15),_(2,fn,3,1,"ul",16),x()),t&2){let e=n.$implicit;o(),q("innerHTML",e.bodyHtml,it),o(),f(e.packages.length?2:-1)}}function vn(t,n){if(t&1&&(b(0,"ul",13),O(1,bn,3,2,"li",14,st),x()),t&2){let e=d().$implicit;o(),j(e.highlights)}}function xn(t,n){if(t&1&&(b(0,"li",8)(1,"header",9)(2,"span",10),l(3),x(),b(4,"span",11),l(5),x()(),_(6,hn,2,1,"p",12)(7,vn,3,0,"ul",13),x()),t&2){let e=n.$implicit;K("settings-changelog__entry--internal",e.kind==="internal"),v("data-testid","settings-changelog-entry-"+e.version),o(3),p("v",e.version),o(2),u(e.date),o(),f(e.kind==="internal"?6:7)}}function yn(t,n){if(t&1&&(b(0,"ol",4),O(1,xn,8,6,"li",7,mn),x()),t&2){let e=d();o(),j(e.entries())}}var Cn=10,je=class t{markdown=k(Et);texts=w;entries=m([]);hasEntries=y(()=>this.entries().length>0);ngOnInit(){this.renderAll()}async renderAll(){let n=[],e=Rt.entries.slice(0,Cn);for(let i of e){let r=[];for(let c of i.highlights)r.push({bodyHtml:await this.markdown.render(c.body),packages:c.packages});n.push({version:i.version,date:this.formatDate(i.date),kind:i.kind,highlights:r})}this.entries.set(n)}formatDate(n){let e=new Date(n+"T00:00:00Z");return Number.isNaN(e.getTime())?n:new Intl.DateTimeFormat("en-GB",{day:"numeric",month:"long",year:"numeric",timeZone:"UTC"}).format(e)}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=F({type:t,selectors:[["sm-settings-changelog"]],decls:11,vars:7,consts:[["data-testid","settings-changelog",1,"settings-changelog"],["id","settings-changelog-heading",1,"settings-changelog__title"],[1,"settings-changelog__intro"],["data-testid","settings-changelog-empty",1,"settings-changelog__empty"],["role","list",1,"settings-changelog__list"],["data-testid","settings-changelog-footer",1,"settings-changelog__footer"],["target","_blank","rel","noopener noreferrer",1,"settings-changelog__footer-link",3,"href"],[1,"settings-changelog__entry",3,"settings-changelog__entry--internal"],[1,"settings-changelog__entry"],[1,"settings-changelog__entry-header"],[1,"settings-changelog__version"],[1,"settings-changelog__date"],[1,"settings-changelog__internal-body"],["role","list",1,"settings-changelog__highlights"],[1,"settings-changelog__highlight"],[1,"settings-changelog__highlight-body",3,"innerHTML"],["role","list",1,"settings-changelog__packages"],[1,"settings-changelog__package"]],template:function(e,i){e&1&&(b(0,"section",0)(1,"h2",1),l(2),x(),b(3,"p",2),l(4),x(),_(5,un,2,1,"p",3)(6,yn,3,0,"ol",4),b(7,"p",5),l(8),b(9,"a",6),l(10),x()()()),e&2&&(v("aria-labelledby","settings-changelog-heading"),o(2),p(" ",i.texts.changelogHeading," "),o(2),u(i.texts.changelogIntro),o(),f(i.hasEntries()?6:5),o(3),p(" ",i.texts.changelogFooterText," "),o(),q("href",i.texts.changelogFooterUrl,Z),o(),p(" ",i.texts.changelogFooterLinkLabel," "))},styles:["[_nghost-%COMP%]{display:block;height:100%;overflow-y:auto;padding:1.25rem 1.5rem}.settings-changelog__title[_ngcontent-%COMP%]{margin:0 0 .25rem;font-size:1.05rem;font-weight:600;color:var(--p-text-color)}.settings-changelog__intro[_ngcontent-%COMP%]{margin:0 0 1.25rem;font-size:.85rem;color:var(--sm-text-muted);line-height:1.5}.settings-changelog__empty[_ngcontent-%COMP%]{margin:1.5rem 0 0;font-size:.9rem;color:var(--sm-text-muted);font-style:italic}.settings-changelog__list[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:1.25rem}.settings-changelog__entry[_ngcontent-%COMP%]{border-left:2px solid var(--p-primary-color);padding:.25rem 0 .25rem .85rem}.settings-changelog__entry--internal[_ngcontent-%COMP%]{border-left-color:var(--sm-border)}.settings-changelog__entry-header[_ngcontent-%COMP%]{display:flex;align-items:baseline;gap:.6rem;margin-bottom:.45rem}.settings-changelog__version[_ngcontent-%COMP%]{font-family:var(--sm-font-mono);font-size:.95rem;font-weight:600;color:var(--p-text-color)}.settings-changelog__date[_ngcontent-%COMP%]{font-size:.78rem;color:var(--sm-text-muted)}.settings-changelog__internal-body[_ngcontent-%COMP%]{margin:0;font-size:.85rem;color:var(--sm-text-muted);font-style:italic}.settings-changelog__highlights[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.7rem}.settings-changelog__highlight[_ngcontent-%COMP%]{font-size:.88rem;line-height:1.5;color:var(--p-text-color)}.settings-changelog__highlight-body[_ngcontent-%COMP%]{margin:0}[_nghost-%COMP%] .settings-changelog__highlight-body p{margin:0}[_nghost-%COMP%] .settings-changelog__highlight-body p+p{margin-top:.45rem}[_nghost-%COMP%] .settings-changelog__highlight-body code{font-family:var(--sm-font-mono);font-size:.82rem;padding:.05rem .3rem;border-radius:var(--sm-radius-sm);background:var(--sm-bg-hover);color:var(--p-text-color)}[_nghost-%COMP%] .settings-changelog__highlight-body a{color:var(--p-primary-color);text-decoration:underline}[_nghost-%COMP%] .settings-changelog__highlight-body strong{font-weight:600}.settings-changelog__packages[_ngcontent-%COMP%]{list-style:none;margin:.4rem 0 0;padding:0;display:flex;flex-wrap:wrap;gap:.3rem}.settings-changelog__package[_ngcontent-%COMP%]{font-family:var(--sm-font-mono);font-size:.7rem;padding:.1rem .4rem;border-radius:var(--sm-radius-sm);background:var(--sm-bg-hover);color:var(--sm-text-muted);border:1px solid var(--sm-border);line-height:1.4}.settings-changelog__footer[_ngcontent-%COMP%]{margin:1.75rem 0 0;padding-top:1rem;border-top:1px solid var(--sm-border);font-size:.82rem;color:var(--sm-text-muted);text-align:center}.settings-changelog__footer-link[_ngcontent-%COMP%]{margin-left:.3rem;color:var(--p-primary-color);text-decoration:none;font-weight:500}.settings-changelog__footer-link[_ngcontent-%COMP%]:hover{text-decoration:underline}"],changeDetection:0})};var zt=`
2
- .p-toggleswitch {
3
- display: inline-block;
4
- width: dt('toggleswitch.width');
5
- height: dt('toggleswitch.height');
6
- }
7
-
8
- .p-toggleswitch-input {
9
- cursor: pointer;
10
- appearance: none;
11
- position: absolute;
12
- top: 0;
13
- inset-inline-start: 0;
14
- width: 100%;
15
- height: 100%;
16
- padding: 0;
17
- margin: 0;
18
- opacity: 0;
19
- z-index: 1;
20
- outline: 0 none;
21
- border-radius: dt('toggleswitch.border.radius');
22
- }
23
-
24
- .p-toggleswitch-slider {
25
- cursor: pointer;
26
- width: 100%;
27
- height: 100%;
28
- border-width: dt('toggleswitch.border.width');
29
- border-style: solid;
30
- border-color: dt('toggleswitch.border.color');
31
- background: dt('toggleswitch.background');
32
- transition:
33
- background dt('toggleswitch.transition.duration'),
34
- color dt('toggleswitch.transition.duration'),
35
- border-color dt('toggleswitch.transition.duration'),
36
- outline-color dt('toggleswitch.transition.duration'),
37
- box-shadow dt('toggleswitch.transition.duration');
38
- border-radius: dt('toggleswitch.border.radius');
39
- outline-color: transparent;
40
- box-shadow: dt('toggleswitch.shadow');
41
- }
42
-
43
- .p-toggleswitch-handle {
44
- position: absolute;
45
- top: 50%;
46
- display: flex;
47
- justify-content: center;
48
- align-items: center;
49
- background: dt('toggleswitch.handle.background');
50
- color: dt('toggleswitch.handle.color');
51
- width: dt('toggleswitch.handle.size');
52
- height: dt('toggleswitch.handle.size');
53
- inset-inline-start: dt('toggleswitch.gap');
54
- margin-block-start: calc(-1 * calc(dt('toggleswitch.handle.size') / 2));
55
- border-radius: dt('toggleswitch.handle.border.radius');
56
- transition:
57
- background dt('toggleswitch.transition.duration'),
58
- color dt('toggleswitch.transition.duration'),
59
- inset-inline-start dt('toggleswitch.slide.duration'),
60
- box-shadow dt('toggleswitch.slide.duration');
61
- }
62
-
63
- .p-toggleswitch.p-toggleswitch-checked .p-toggleswitch-slider {
64
- background: dt('toggleswitch.checked.background');
65
- border-color: dt('toggleswitch.checked.border.color');
66
- }
67
-
68
- .p-toggleswitch.p-toggleswitch-checked .p-toggleswitch-handle {
69
- background: dt('toggleswitch.handle.checked.background');
70
- color: dt('toggleswitch.handle.checked.color');
71
- inset-inline-start: calc(dt('toggleswitch.width') - calc(dt('toggleswitch.handle.size') + dt('toggleswitch.gap')));
72
- }
73
-
74
- .p-toggleswitch:not(.p-disabled):has(.p-toggleswitch-input:hover) .p-toggleswitch-slider {
75
- background: dt('toggleswitch.hover.background');
76
- border-color: dt('toggleswitch.hover.border.color');
77
- }
78
-
79
- .p-toggleswitch:not(.p-disabled):has(.p-toggleswitch-input:hover) .p-toggleswitch-handle {
80
- background: dt('toggleswitch.handle.hover.background');
81
- color: dt('toggleswitch.handle.hover.color');
82
- }
83
-
84
- .p-toggleswitch:not(.p-disabled):has(.p-toggleswitch-input:hover).p-toggleswitch-checked .p-toggleswitch-slider {
85
- background: dt('toggleswitch.checked.hover.background');
86
- border-color: dt('toggleswitch.checked.hover.border.color');
87
- }
88
-
89
- .p-toggleswitch:not(.p-disabled):has(.p-toggleswitch-input:hover).p-toggleswitch-checked .p-toggleswitch-handle {
90
- background: dt('toggleswitch.handle.checked.hover.background');
91
- color: dt('toggleswitch.handle.checked.hover.color');
92
- }
93
-
94
- .p-toggleswitch:not(.p-disabled):has(.p-toggleswitch-input:focus-visible) .p-toggleswitch-slider {
95
- box-shadow: dt('toggleswitch.focus.ring.shadow');
96
- outline: dt('toggleswitch.focus.ring.width') dt('toggleswitch.focus.ring.style') dt('toggleswitch.focus.ring.color');
97
- outline-offset: dt('toggleswitch.focus.ring.offset');
98
- }
99
-
100
- .p-toggleswitch.p-invalid > .p-toggleswitch-slider {
101
- border-color: dt('toggleswitch.invalid.border.color');
102
- }
103
-
104
- .p-toggleswitch.p-disabled {
105
- opacity: 1;
106
- }
107
-
108
- .p-toggleswitch.p-disabled .p-toggleswitch-slider {
109
- background: dt('toggleswitch.disabled.background');
110
- }
111
-
112
- .p-toggleswitch.p-disabled .p-toggleswitch-handle {
113
- background: dt('toggleswitch.handle.disabled.background');
114
- }
115
- `;var wn=["handle"],Pn=["input"],kn=t=>({checked:t});function Sn(t,n){t&1&&lt(0)}function En(t,n){if(t&1&&ie(0,Sn,1,0,"ng-container",3),t&2){let e=d();h("ngTemplateOutlet",e.handleTemplate||e._handleTemplate)("ngTemplateOutletContext",pt(2,kn,e.checked()))}}var Mn=`
116
- ${zt}
117
-
118
- p-toggleswitch.ng-invalid.ng-dirty > .p-toggleswitch-slider {
119
- border-color: dt('toggleswitch.invalid.border.color');
120
- }
121
- `,In={root:{position:"relative"}},Tn={root:({instance:t})=>["p-toggleswitch p-component",{"p-toggleswitch p-component":!0,"p-toggleswitch-checked":t.checked(),"p-disabled":t.$disabled(),"p-invalid":t.invalid()}],input:"p-toggleswitch-input",slider:"p-toggleswitch-slider",handle:"p-toggleswitch-handle"},Bt=(()=>{class t extends ft{name="toggleswitch";style=Mn;classes=Tn;inlineStyles=In;static \u0275fac=(()=>{let e;return function(r){return(e||(e=ze(t)))(r||t)}})();static \u0275prov=be({token:t,factory:t.\u0275fac})}return t})();var Kt=new Ze("TOGGLESWITCH_INSTANCE"),On={provide:wt,useExisting:Ye(()=>ue),multi:!0},ue=(()=>{class t extends Pt{componentName="ToggleSwitch";$pcToggleSwitch=k(Kt,{optional:!0,skipSelf:!0})??void 0;bindDirectiveInstance=k(_e,{self:!0});onAfterViewChecked(){this.bindDirectiveInstance.setAttrs(this.ptms(["host","root"]))}styleClass;tabindex;inputId;readonly;trueValue=!0;falseValue=!1;ariaLabel;size=V();ariaLabelledBy;autofocus;onChange=new nt;input;handleTemplate;_handleTemplate;focused=!1;_componentStyle=k(Bt);templates;onHostClick(e){this.onClick(e)}onAfterContentInit(){this.templates.forEach(e=>{e.getType()==="handle"?this._handleTemplate=e.template:this._handleTemplate=e.template})}onClick(e){!this.$disabled()&&!this.readonly&&(this.writeModelValue(this.checked()?this.falseValue:this.trueValue),this.onModelChange(this.modelValue()),this.onChange.emit({originalEvent:e,checked:this.modelValue()}),this.input.nativeElement.focus())}onFocus(){this.focused=!0}onBlur(){this.focused=!1,this.onModelTouched()}checked(){return this.modelValue()===this.trueValue}writeControlValue(e,i){i(e),this.cd.markForCheck()}get dataP(){return this.cn({checked:this.checked(),disabled:this.$disabled(),invalid:this.invalid()})}static \u0275fac=(()=>{let e;return function(r){return(e||(e=ze(t)))(r||t)}})();static \u0275cmp=F({type:t,selectors:[["p-toggleswitch"],["p-toggleSwitch"],["p-toggle-switch"]],contentQueries:function(i,r,c){if(i&1&&dt(c,wn,4)(c,Ce,4),i&2){let g;ve(g=xe())&&(r.handleTemplate=g.first),ve(g=xe())&&(r.templates=g)}},viewQuery:function(i,r){if(i&1&&ct(Pn,5),i&2){let c;ve(c=xe())&&(r.input=c.first)}},hostVars:7,hostBindings:function(i,r){i&1&&C("click",function(g){return r.onHostClick(g)}),i&2&&(v("data-p-checked",r.checked())("data-p-disabled",r.$disabled())("data-p",r.dataP),gt(r.sx("root")),he(r.cn(r.cx("root"),r.styleClass)))},inputs:{styleClass:"styleClass",tabindex:[2,"tabindex","tabindex",ut],inputId:"inputId",readonly:[2,"readonly","readonly",Ke],trueValue:"trueValue",falseValue:"falseValue",ariaLabel:"ariaLabel",size:[1,"size"],ariaLabelledBy:"ariaLabelledBy",autofocus:[2,"autofocus","autofocus",Ke]},outputs:{onChange:"onChange"},features:[re([On,Bt,{provide:Kt,useExisting:t},{provide:bt,useExisting:t}]),rt([_e]),at],decls:5,vars:22,consts:[["input",""],["type","checkbox","role","switch",3,"focus","blur","checked","pAutoFocus","pBind"],[3,"pBind"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(i,r){i&1&&(a(0,"input",1,0),C("focus",function(){return r.onFocus()})("blur",function(){return r.onBlur()}),s(),a(2,"div",2)(3,"div",2),_(4,En,1,4,"ng-container"),s()()),i&2&&(he(r.cx("input")),h("checked",r.checked())("pAutoFocus",r.autofocus)("pBind",r.ptm("input")),v("id",r.inputId)("required",r.required()?"":void 0)("disabled",r.$disabled()?"":void 0)("aria-checked",r.checked())("aria-labelledby",r.ariaLabelledBy)("aria-label",r.ariaLabel)("name",r.name())("tabindex",r.tabindex),o(2),he(r.cx("slider")),h("pBind",r.ptm("slider")),v("data-p",r.dataP),o(),he(r.cx("handle")),h("pBind",r.ptm("handle")),v("data-p",r.dataP),o(),f(r.handleTemplate||r._handleTemplate?4:-1))},dependencies:[_t,ht,vt,we,xt,_e],encapsulation:2,changeDetection:0})}return t})(),De=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=ot({type:t});static \u0275inj=Je({imports:[ue,we,we]})}return t})();var jn=(t,n)=>n.key;function Dn(t,n){if(t&1&&(a(0,"p-message",3),l(1),s()),t&2){let e=d();h("closable",!1),o(),T(" ",e.texts.general.loadErrorPrefix," ",n," ")}}function Fn(t,n){if(t&1&&(a(0,"p-message",4),l(1),s()),t&2){let e=d();h("closable",!1),o(),T(" ",e.texts.general.saveErrorPrefix," ",n," ")}}function An(t,n){if(t&1){let e=D();a(0,"li",6)(1,"div",8)(2,"div",9),l(3),s(),a(4,"div",10),l(5),s()(),a(6,"p-toggleswitch",15),C("ngModelChange",function(r){let c=S(e).$implicit,g=d();return E(g.onToggle(c,r))}),s()()}if(t&2){let e=n.$implicit,i=d();v("data-testid","settings-general-row-"+e.key),o(3),u(i.toggleLabel(e.key)),o(2),p(" ",i.toggleDescription(e.key)," "),o(),h("ngModel",i.valueOf(e))("disabled",i.loading()||i.isPending(e.key)||i.preferences()===null),v("data-testid","settings-general-toggle-"+e.key)}}function Nn(t,n){if(t&1&&(a(0,"span",16),l(1),s()),t&2){let e=n.$implicit,i=d();o(),p(" ",i.extraThemeLabel(e.labelKey)," ")}}var Ln=[{key:"updateCheck.enabled",read:t=>t.updateCheck.enabled,patch:t=>({updateCheck:{enabled:t}})}],Vn=[{value:"none",labelKey:"none"},{value:"matrix",labelKey:"matrix"}];function Rn(t){return t==="matrix"?"matrix":"none"}function zn(t){return t==="matrix"?"matrix":null}var Fe=class t{dataSource=k(W);themeService=k(Te);visible=V.required();texts=w;toggles=Ln;extraThemeOptions=Vn;extraThemeWire=y(()=>Rn(this.themeService.extraTheme()));loading=m(!1);loadError=m(null);saveError=m(null);preferences=m(null);pending=m(new Set);constructor(){L(()=>{this.visible()&&this.refresh()})}toggleLabel(n){return w.general.toggles[n].label}toggleDescription(n){return w.general.toggles[n].description}valueOf(n){let e=this.preferences();return e?n.read(e):!1}isPending(n){return this.pending().has(n)}onToggle(n,e){this.runToggle(n,e)}onExtraThemeChange(n){this.themeService.setExtraTheme(zn(n??"none"))}extraThemeLabel(n){return w.general.extraTheme.options[n].label}async refresh(){this.loading.set(!0),this.loadError.set(null),this.saveError.set(null);try{let n=await this.dataSource.getPreferences();this.preferences.set(n)}catch(n){this.loadError.set(Gt(n)),this.preferences.set(null)}finally{this.loading.set(!1)}}async runToggle(n,e){if(this.pending().has(n.key))return;let i=new Set(this.pending());i.add(n.key),this.pending.set(i),this.saveError.set(null);try{let r=await this.dataSource.setPreferences(n.patch(e));this.preferences.set(r)}catch(r){this.saveError.set(Gt(r))}finally{let r=new Set(this.pending());r.delete(n.key),this.pending.set(r)}}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=F({type:t,selectors:[["sm-settings-general"]],inputs:{visible:[1,"visible"]},decls:22,vars:12,consts:[["data-testid","settings-general",1,"settings-general"],["id","settings-general-heading",1,"settings-general__title"],[1,"settings-general__intro"],["severity","error","data-testid","settings-general-load-error",3,"closable"],["severity","error","data-testid","settings-general-save-error",3,"closable"],["role","list",1,"settings-general__list"],[1,"settings-general__row"],["data-testid","settings-general-row-extra-theme",1,"settings-general__row"],[1,"settings-general__row-text"],[1,"settings-general__row-label"],[1,"settings-general__row-description"],["optionLabel","labelKey","optionValue","value","data-testid","settings-general-extra-theme",3,"ngModelChange","options","ngModel","allowEmpty"],["pTemplate","item"],["data-testid","settings-general-storage-hint",1,"settings-general__storage-hint"],[1,"settings-general__storage-hint-path"],[3,"ngModelChange","ngModel","disabled"],["data-testid","settings-general-extra-theme-option"]],template:function(e,i){if(e&1&&(a(0,"section",0)(1,"h2",1),l(2),s(),a(3,"p",2),l(4),s(),_(5,Dn,2,3,"p-message",3),_(6,Fn,2,3,"p-message",4),a(7,"ul",5),O(8,An,7,6,"li",6,jn),a(10,"li",7)(11,"div",8)(12,"div",9),l(13),s(),a(14,"div",10),l(15),s()(),a(16,"p-selectbutton",11),C("ngModelChange",function(c){return i.onExtraThemeChange(c)}),ie(17,Nn,2,1,"ng-template",12),s()()(),a(18,"p",13),l(19),a(20,"code",14),l(21),s()()()),e&2){let r,c;v("aria-labelledby","settings-general-heading"),o(2),p(" ",i.texts.general.heading," "),o(2),u(i.texts.general.intro),o(),f((r=i.loadError())?5:-1,r),o(),f((c=i.saveError())?6:-1,c),o(2),j(i.toggles),o(5),p(" ",i.texts.general.extraTheme.label," "),o(2),p(" ",i.texts.general.extraTheme.description," "),o(),h("options",i.extraThemeOptions)("ngModel",i.extraThemeWire())("allowEmpty",!1),o(3),p(" ",i.texts.general.storageHintLabel," "),o(2),u(i.texts.general.storageHintPath)}},dependencies:[ce,le,de,pe,ge,Ce,At,Ft,De,ue],styles:["[_nghost-%COMP%]{display:block;height:100%;overflow-y:auto;padding:1.25rem 1.5rem}.settings-general__title[_ngcontent-%COMP%]{margin:0 0 .25rem;font-size:1.05rem;font-weight:600;color:var(--p-text-color)}.settings-general__intro[_ngcontent-%COMP%]{margin:0 0 1.25rem;font-size:.85rem;color:var(--sm-text-muted);line-height:1.5}.settings-general__list[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:1rem}.settings-general__row[_ngcontent-%COMP%]{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;padding:.85rem 1rem;border:1px solid var(--p-content-border-color);border-radius:.5rem;background:var(--p-content-background)}.settings-general__row-text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;flex:1 1 auto;min-width:0}.settings-general__row-label[_ngcontent-%COMP%]{font-size:.9rem;font-weight:600;color:var(--p-text-color)}.settings-general__row-description[_ngcontent-%COMP%]{font-size:.8rem;color:var(--sm-text-muted);line-height:1.45}.settings-general__storage-hint[_ngcontent-%COMP%]{margin:2rem 0 0;font-size:.75rem;line-height:1.5;color:var(--sm-text-muted);opacity:.65}.settings-general__storage-hint-path[_ngcontent-%COMP%]{font-family:var(--p-monospace-font-family);font-size:.72rem;padding:.05rem .3rem;border-radius:.25rem;background:var(--p-content-background);border:1px solid var(--p-content-border-color)}"],changeDetection:0})};function Gt(t){return t instanceof $||t instanceof Error?t.message:String(t)}var $e={provider:"#7C3AED",extractor:"#A78BFA",analyzer:"#5FD17C",action:"#00C853",formatter:"#5BC0EB",hook:"#FFB627"};function qt(t){let n=t.toLowerCase();return $e[n]??"currentColor"}var Ne=["all",...Object.keys($e)],Ae=["core","claude","antigravity","openai","agent-skills"];function X(t,n){return`${t}/${n}`}function Ge(t){let n=new Map;for(let e of t)if(!Le(e.status)&&e.extensions)for(let i of e.extensions)n.set(X(e.id,i.id),i.enabled);return n}function He(t){let n=t.target;return!n||typeof n.closest!="function"?!1:n.closest('label, button, input, [role="switch"], p-toggleswitch')!==null}function Wt(t,n){if(Bn(t,n))return[t];if(!t.extensions)return[];let e=t.extensions.filter(i=>Kn(i,n));return e.length===0?[]:[J(U({},t),{extensions:e})]}function Xt(t,n){if(!t.extensions)return[];let e=t.extensions.filter(i=>i.kind.toLowerCase()===n);return e.length===0?[]:[J(U({},t),{extensions:e})]}function Qt(t){if(t.locked)return[];if(!t.extensions)return[t];let n=t.extensions.filter(e=>!e.locked);return n.length===0?[]:[J(U({},t),{extensions:n})]}function Yt(t){return t.slice().sort((e,i)=>{let r=Ae.indexOf(e.id),c=Ae.indexOf(i.id),g=r>=0?r:Ae.length,P=c>=0?c:Ae.length;return g!==P?g-P:e.id.localeCompare(i.id)}).map(e=>{if(!e.extensions)return e;let i=e.extensions.slice().sort((r,c)=>r.id.localeCompare(c.id));return J(U({},e),{extensions:i})})}function Bn(t,n){return!!(t.id.toLowerCase().includes(n)||t.description&&t.description.toLowerCase().includes(n))}function Kn(t,n){return!!(t.id.toLowerCase().includes(n)||t.description&&t.description.toLowerCase().includes(n))}function Le(t){return t==="incompatible-spec"||t==="invalid-manifest"||t==="load-error"||t==="id-collision"}function Ue(t){return t instanceof $||t instanceof Error?t.message:String(t)}function Jt(t,n){return Le(t.status)?n.statusFailure[t.status]??t.status:t.status==="enabled"?n.enabledLabel:n.disabledLabel}function Zt(t,n){switch(t){case"built-in":return n.sourceBuiltIn;case"project":return n.sourceProject}}var qe="sm.settings.plugins.collapsed",We="sm.settings.plugins.kind-filter";function en(){let t=null;try{t=localStorage.getItem(qe)}catch{return new Set}if(!t)return new Set;let n;try{n=JSON.parse(t)}catch{return new Set}if(!Array.isArray(n))return new Set;let e=new Set;for(let i of n)typeof i=="string"&&i.length>0&&e.add(i);return e}function tn(t){try{if(t.size===0){localStorage.removeItem(qe);return}localStorage.setItem(qe,JSON.stringify([...t]))}catch{}}function nn(){let t=null;try{t=localStorage.getItem(We)}catch{return"all"}return t&&Ne.includes(t)?t:"all"}function on(t){try{if(t==="all"){localStorage.removeItem(We);return}localStorage.setItem(We,t)}catch{}}function Xe(){et(Xe);let t=m(en());L(()=>tn(t()));let n=i=>{let r=new Set(t());r.has(i)?r.delete(i):r.add(i),t.set(r)},e=i=>!t().has(i);return{collapsed:t.asReadonly(),toggleExpanded:n,isExpanded:e}}function rn(t){let n=m(""),e=y(()=>n().trim().length>0),i=m(nn()),r=y(()=>i()!=="all");L(()=>on(i()));let c=y(()=>Yt(t.plugins().flatMap(Qt))),g=y(()=>{let R=n().trim().toLowerCase(),Q=i(),z=c();return Q!=="all"&&(z=z.flatMap(Y=>Xt(Y,Q))),R.length>0&&(z=z.flatMap(Y=>Wt(Y,R))),z});return{searchText:n,searchActive:e,kindFilter:i,setKindFilter:R=>{i.set(R)},isKindFilterActive:R=>i()===R,kindFilterActive:r,kindFilterOptions:Ne,visiblePlugins:c,filteredPlugins:g}}function an(t){let n=m(!1),e=m(null),i=m(null),r=m([]),c=m(new Map),g=m(new Map),P=m(!1),G=y(()=>{let M=c(),A=g(),H=new Set;for(let[B,N]of A)M.get(B)!==N&&H.add(B);return H}),R=y(()=>G().size>0),Q=y(()=>r().some(M=>Le(M.status))),z=y(()=>{let M=g();for(let A of r()){if(A.startsAsDisabled!==!0)continue;let H=A.extensions??[];for(let B of H)if(M.get(X(A.id,B.id))===!0)return!0}return!1});return{plugins:r,loading:n,loadError:e,toggleError:i,applying:P,hasFailureRows:Q,originalState:c,pendingState:g,dirtyIds:G,hasPendingChanges:R,restartRecommended:z,pendingEnabled:M=>g().get(M)??!1,isDirty:M=>G().has(M),refresh:async()=>{n.set(!0),e.set(null),i.set(null);try{let M=await t.dataSource.listPlugins();r.set([...M.items]);let A=Ge(M.items);c.set(A),g.set(new Map(A))}catch(M){e.set(Ue(M)),r.set([]),c.set(new Map),g.set(new Map)}finally{n.set(!1)}},onExtensionToggle:(M,A,H)=>{if(P())return;let B=X(M,A.id),N=new Map(g());N.set(B,H),g.set(N)},applyChanges:async()=>{if(P())return{ok:!1};let M=G();if(M.size===0)return{ok:!1};let A=[],H=g();for(let N of M)A.push({id:N,enabled:H.get(N)??!1});P.set(!0),i.set(null);let B=!1;try{let N=await t.dataSource.applyPluginChanges(A);r.set([...N.items]);let Qe=Ge(N.items);c.set(Qe),g.set(new Map(Qe)),t.scanTrigger.run(),B=!0}catch(N){i.set(Ue(N))}finally{P.set(!1)}return{ok:B}},discardChanges:()=>{g.set(new Map(c())),i.set(null)}}}var sn=(t,n)=>n.id;function Hn(t,n){if(t&1&&l(0),t&2){let e=d().$implicit,i=d();p(" ",e==="all"?i.texts.pluginsKindFilterAll:e," ")}}function Un(t,n){if(t&1){let e=D();a(0,"p-togglebutton",16),C("ngModelChange",function(){let r=S(e).$implicit,c=d();return E(c.setKindFilter(r))}),ie(1,Hn,1,1,"ng-template",null,0,mt),s()}if(t&2){let e=n.$implicit,i=d();Be("--kind-color",e==="all"?null:i.kindTint(e)),h("ngModel",i.isKindFilterActive(e))("styleClass","settings-plugins__kind-chip"+(e==="all"?" is-all":""))("ariaLabel",i.texts.pluginsKindFilterOptionA11y(e,!i.isKindFilterActive(e))),v("data-testid","settings-plugins-kind-chip-"+e)}}function qn(t,n){if(t&1&&(a(0,"p-message",11),l(1),s()),t&2){let e=d();h("closable",!1),o(),p(" ",e.texts.unsavedChangesMessage(e.dirtyIds().size)," ")}}function Wn(t,n){if(t&1&&(a(0,"p",12),I(1,"i",17),l(2),s()),t&2){let e=d();o(2),p(" ",e.texts.loading," ")}}function Xn(t,n){if(t&1&&(a(0,"p-message",13),l(1),s()),t&2){let e=d();h("closable",!1),o(),T(" ",e.texts.errorPrefix," ",e.loadError()," ")}}function Qn(t,n){if(t&1&&(a(0,"p",14),l(1),s()),t&2){let e=d();o(),p(" ",e.texts.empty," ")}}function Yn(t,n){if(t&1){let e=D();a(0,"p-message",22),C("onClose",function(){S(e);let r=d(2);return E(r.toggleError.set(null))}),l(1),s()}if(t&2){let e=d(2);h("closable",!0),o(),T(" ",e.texts.toggleErrorPrefix," ",e.toggleError()," ")}}function Jn(t,n){if(t&1&&(a(0,"p",19),I(1,"i",23),l(2),s()),t&2){let e=d(2);o(2),p(" ",e.texts.pluginsSearchEmpty(e.searchText())," ")}}function Zn(t,n){if(t&1){let e=D();a(0,"button",38),C("click",function(r){S(e);let c=d().$implicit;return d(2).toggleExpanded(c.id),E(r.stopPropagation())}),I(1,"i",39),s()}if(t&2){let e=d().$implicit,i=d(2);v("aria-expanded",i.isExpanded(e.id))("aria-label",i.isExpanded(e.id)?i.texts.collapseLabel:i.texts.expandLabel)("data-testid","settings-bundle-expand-"+e.id),o(),K("fa-chevron-down",i.isExpanded(e.id))("fa-chevron-right",!i.isExpanded(e.id))}}function ei(t,n){t&1&&I(0,"span",27)}function ti(t,n){if(t&1&&(a(0,"span",32),l(1),s()),t&2){let e=d().$implicit;o(),p("v",e.version)}}function ni(t,n){if(t&1&&(a(0,"span",33),I(1,"i",40),l(2),s()),t&2){let e=d().$implicit,i=d(2);h("title",i.texts.lockedTooltip),v("data-testid","settings-row-locked-"+e.id),o(2),p(" ",i.texts.lockedLabel," ")}}function ii(t,n){if(t&1&&(a(0,"p",34),l(1),s()),t&2){let e=d().$implicit;o(),u(e.description)}}function oi(t,n){if(t&1&&(a(0,"span",35),l(1),s()),t&2){let e=d().$implicit;o(),u(e.reason)}}function ri(t,n){if(t&1&&(a(0,"p",36),I(1,"i",41),l(2),s()),t&2){let e=d().$implicit,i=d(2);v("data-testid","settings-row-starts-disabled-"+e.id),o(2),p(" ",i.texts.startsAsDisabledRowHint," ")}}function ai(t,n){if(t&1&&(a(0,"span",49),l(1),s()),t&2){let e=d().$implicit;o(),p("v",e.version)}}function si(t,n){if(t&1&&(a(0,"span",33),I(1,"i",40),l(2),s()),t&2){let e=d().$implicit,i=d(2).$implicit,r=d(2);h("title",r.texts.lockedTooltip),v("data-testid","settings-extrow-locked-"+i.id+"-"+e.id),o(2),p(" ",r.texts.lockedLabel," ")}}function li(t,n){if(t&1&&(a(0,"p",50),l(1),s()),t&2){let e=d().$implicit;o(),u(e.description)}}function di(t,n){if(t&1){let e=D();a(0,"li",43),C("click",function(r){let c=S(e).$implicit,g=d(2).$implicit,P=d(2);return E(P.onSubrowClick(g.id,c,r))})("keydown.enter",function(r){let c=S(e).$implicit,g=d(2).$implicit,P=d(2);return E(P.onSubrowClick(g.id,c,r))})("keydown.space",function(r){let c=S(e).$implicit,g=d(2).$implicit,P=d(2);return r.preventDefault(),E(P.onSubrowClick(g.id,c,r))}),a(1,"div",44)(2,"div",45),I(3,"span",46),a(4,"span",47),l(5),s(),a(6,"span",48),l(7),s(),_(8,ai,2,1,"span",49),_(9,si,3,3,"span",33),s(),_(10,li,2,1,"p",50),s(),a(11,"p-toggleswitch",51),C("ngModelChange",function(r){let c=S(e).$implicit,g=d(2).$implicit,P=d(2);return E(P.onExtensionToggle(g.id,c,r))}),s()()}if(t&2){let e=n.$implicit,i=d(2).$implicit,r=d(2);K("is-clickable",r.extensionToggleInteractive(e))("is-dirty",r.isDirty(r.qualifiedExt(i.id,e.id))),v("aria-label",r.texts.a11y.extensionRow(r.qualifiedExt(i.id,e.id)))("data-testid","settings-extrow-"+i.id+"-"+e.id),o(3),K("settings-plugins__dirty-dot--visible",r.isDirty(r.qualifiedExt(i.id,e.id))),v("data-testid","settings-extrow-dirty-"+i.id+"-"+e.id),o(2),u(e.id),o(),Be("--kind-color",r.kindTint(e.kind)),o(),u(e.kind),o(),f(i.source==="project"?8:-1),o(),f(e.locked?9:-1),o(),f(e.description?10:-1),o(),h("ngModel",r.pendingEnabled(r.qualifiedExt(i.id,e.id)))("disabled",r.applying()||!!e.locked)("ariaLabel",r.texts.a11y.extensionToggle(r.qualifiedExt(i.id,e.id),!r.pendingEnabled(r.qualifiedExt(i.id,e.id)))),v("data-testid","settings-ext-toggle-"+i.id+"-"+e.id)}}function ci(t,n){if(t&1&&(a(0,"ul",37),O(1,di,12,20,"li",42,sn),s()),t&2){let e=d().$implicit;v("data-testid","settings-extensions-"+e.id),o(),j(e.extensions)}}function gi(t,n){if(t&1){let e=D();a(0,"li",24)(1,"div",25),C("click",function(r){let c=S(e).$implicit,g=d(2);return E(g.onRowClick(c,r))})("keydown.enter",function(r){let c=S(e).$implicit,g=d(2);return E(g.onRowClick(c,r))})("keydown.space",function(r){let c=S(e).$implicit,g=d(2);return r.preventDefault(),E(g.onRowClick(c,r))}),_(2,Zn,2,7,"button",26)(3,ei,1,0,"span",27),a(4,"div",28)(5,"div",29)(6,"span",30),l(7),s(),a(8,"span",31),l(9),s(),_(10,ti,2,1,"span",32),_(11,ni,3,3,"span",33),s(),_(12,ii,2,1,"p",34),_(13,oi,2,1,"span",35),_(14,ri,3,2,"p",36),s()(),_(15,ci,3,1,"ul",37),s()}if(t&2){let e=n.$implicit,i=d(2);K("is-clickable",i.rowIsClickable(e)),v("data-testid","settings-row-"+e.id),o(),v("aria-label",i.texts.a11y.pluginRow(e.id)),o(),f(i.canExpandExtensions(e)?2:3),o(5),u(e.id),o(2),u(i.sourceLabel(e.source)),o(),f(e.source==="project"&&e.version?10:-1),o(),f(e.locked?11:-1),o(),f(e.description?12:-1),o(),f(e.reason?13:-1),o(),f(i.showStartsAsDisabledHint(e)?14:-1),o(),f(i.canExpandExtensions(e)&&i.isExpanded(e.id)?15:-1)}}function pi(t,n){if(t&1&&(_(0,Yn,2,3,"p-message",18),_(1,Jn,3,1,"p",19),a(2,"ul",20),O(3,gi,16,13,"li",21,sn),s()),t&2){let e=d();f(e.toggleError()?0:-1),o(),f(e.searchActive()&&e.filteredPlugins().length===0?1:-1),o(2),j(e.filteredPlugins())}}function mi(t,n){if(t&1&&(a(0,"em",52),l(1),s()),t&2){let e=d(2);o(),p(" ",e.texts.startsAsDisabledFooterHint," ")}}function ui(t,n){if(t&1){let e=D();a(0,"footer",15),_(1,mi,2,1,"em",52),a(2,"p-button",53),C("onClick",function(){S(e);let r=d();return E(r.discardChanges())}),s(),a(3,"p-button",54),C("onClick",function(){S(e);let r=d();return E(r.applyChanges())}),s()()}if(t&2){let e=d();o(),f(e.restartRecommended()?1:-1),o(),h("text",!0)("label",e.texts.discardChanges)("ariaLabel",e.texts.discardA11y)("disabled",e.applying()),o(),h("label",e.texts.applyAndClose)("ariaLabel",e.texts.applyA11y)("disabled",e.applying())("loading",e.applying())}}var Ve=class t{dataSource=k(W);scanTrigger=k(Lt);buffer=k(me);destroyRef=k(tt);visible=V.required();applied=ye();texts=w;pluginState=an({dataSource:this.dataSource,scanTrigger:this.scanTrigger});plugins=this.pluginState.plugins;loading=this.pluginState.loading;loadError=this.pluginState.loadError;toggleError=this.pluginState.toggleError;applying=this.pluginState.applying;hasFailureRows=this.pluginState.hasFailureRows;originalState=this.pluginState.originalState;pendingState=this.pluginState.pendingState;dirtyIds=this.pluginState.dirtyIds;hasPendingChanges=this.pluginState.hasPendingChanges;restartRecommended=this.pluginState.restartRecommended;pluginCollapse=Xe();collapsed=this.pluginCollapse.collapsed;pluginFilter=rn({plugins:this.plugins});searchText=this.pluginFilter.searchText;searchActive=this.pluginFilter.searchActive;kindFilter=this.pluginFilter.kindFilter;kindFilterActive=this.pluginFilter.kindFilterActive;kindFilterOptions=this.pluginFilter.kindFilterOptions;visiblePlugins=this.pluginFilter.visiblePlugins;filteredPlugins=this.pluginFilter.filteredPlugins;constructor(){L(()=>{this.visible()&&this.pluginState.refresh()});let n={dirtyIds:this.pluginState.dirtyIds,applyChanges:async()=>{let e=await this.pluginState.applyChanges();return e.ok&&this.applied.emit(),e},discardChanges:()=>this.pluginState.discardChanges()};this.buffer.register(n),this.destroyRef.onDestroy(()=>this.buffer.deregister(n))}setKindFilter(n){this.pluginFilter.setKindFilter(n)}isKindFilterActive(n){return this.pluginFilter.isKindFilterActive(n)}toggleExpanded(n){this.pluginCollapse.toggleExpanded(n)}isExpanded(n){return this.pluginCollapse.isExpanded(n)}pendingEnabled(n){return this.pluginState.pendingEnabled(n)}isDirty(n){return this.pluginState.isDirty(n)}showStartsAsDisabledHint(n){return!n.startsAsDisabled||!n.extensions?!1:n.extensions.some(e=>this.pendingEnabled(X(n.id,e.id)))}onExtensionToggle(n,e,i){this.pluginState.onExtensionToggle(n,e,i)}async applyChanges(){(await this.pluginState.applyChanges()).ok&&this.applied.emit()}discardChanges(){this.pluginState.discardChanges()}canExpandExtensions(n){return(n.extensions?.length??0)>0}extensionToggleInteractive(n){return!n.locked}rowIsClickable(n){return this.canExpandExtensions(n)}onRowClick(n,e){He(e)||this.canExpandExtensions(n)&&this.toggleExpanded(n.id)}onSubrowClick(n,e,i){if(He(i)||!this.extensionToggleInteractive(e))return;let r=X(n,e.id);this.onExtensionToggle(n,e,!this.pendingEnabled(r))}statusLabel(n){return Jt(n,this.texts)}sourceLabel(n){return Zt(n,this.texts)}qualifiedExt(n,e){return X(n,e)}kindTint(n){return qt(n)}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=F({type:t,selectors:[["sm-settings-plugins"]],inputs:{visible:[1,"visible"]},outputs:{applied:"applied"},decls:19,vars:9,consts:[["content",""],["aria-labelledby","settings-plugins-heading",1,"settings-plugins"],[1,"settings-plugins__scroll"],[1,"settings-plugins__header"],["id","settings-plugins-heading",1,"settings-plugins__title"],[1,"settings-plugins__intro"],["iconPosition","left",1,"settings-plugins__search"],["styleClass","fa-solid fa-magnifying-glass"],["pInputText","","type","text","data-testid","settings-plugins-search",3,"ngModelChange","placeholder","ngModel"],["role","group","data-testid","settings-plugins-kind-filter",1,"settings-plugins__kind-filter"],[3,"ngModel","styleClass","--kind-color","ariaLabel"],["severity","warn","styleClass","settings-plugins__banner","data-testid","settings-banner-unsaved",3,"closable"],["data-testid","settings-loading",1,"settings-plugins__hint"],["severity","error","data-testid","settings-error",3,"closable"],["data-testid","settings-empty",1,"settings-plugins__hint"],["data-testid","settings-plugins-footer",1,"settings-plugins__footer"],[3,"ngModelChange","ngModel","styleClass","ariaLabel"],["aria-hidden","true",1,"fa-solid","fa-spinner","fa-spin"],["severity","error","data-testid","settings-toggle-error",3,"closable"],["data-testid","settings-search-empty",1,"settings-plugins__hint"],["role","list",1,"settings-plugins__list"],[1,"settings-plugins__row",3,"is-clickable"],["severity","error","data-testid","settings-toggle-error",3,"onClose","closable"],["aria-hidden","true",1,"fa-solid","fa-magnifying-glass"],[1,"settings-plugins__row"],["role","button","tabindex","0",1,"settings-plugins__row-main",3,"click","keydown.enter","keydown.space"],["type","button",1,"settings-plugins__expand"],["aria-hidden","true",1,"settings-plugins__expand-spacer"],[1,"settings-plugins__row-text"],[1,"settings-plugins__row-headline"],[1,"settings-plugins__row-id"],[1,"settings-plugins__row-source"],[1,"settings-plugins__row-version"],[1,"settings-plugins__row-locked",3,"title"],[1,"settings-plugins__row-description"],[1,"settings-plugins__row-reason"],[1,"settings-plugins__row-hint"],["role","list",1,"settings-plugins__sublist"],["type","button",1,"settings-plugins__expand",3,"click"],["aria-hidden","true",1,"fa-solid"],["aria-hidden","true",1,"fa-solid","fa-lock"],["aria-hidden","true",1,"fa-solid","fa-triangle-exclamation"],["role","button","tabindex","0",1,"settings-plugins__subrow",3,"is-clickable","is-dirty"],["role","button","tabindex","0",1,"settings-plugins__subrow",3,"click","keydown.enter","keydown.space"],[1,"settings-plugins__subrow-text"],[1,"settings-plugins__subrow-headline"],["aria-hidden","true",1,"settings-plugins__dirty-dot"],[1,"settings-plugins__subrow-id"],[1,"settings-plugins__subrow-kind"],[1,"settings-plugins__subrow-version"],[1,"settings-plugins__subrow-description"],[3,"ngModelChange","ngModel","disabled","ariaLabel"],["data-testid","settings-plugins-restart-hint",1,"settings-plugins__footer-hint"],["severity","secondary","data-testid","settings-plugins-discard",3,"onClick","text","label","ariaLabel","disabled"],["data-testid","settings-plugins-apply",3,"onClick","label","ariaLabel","disabled","loading"]],template:function(e,i){e&1&&(a(0,"section",1)(1,"div",2)(2,"header",3)(3,"h2",4),l(4),s(),a(5,"p",5),l(6),s()(),a(7,"p-iconfield",6),I(8,"p-inputicon",7),a(9,"input",8),C("ngModelChange",function(c){return i.searchText.set(c)}),s()(),a(10,"div",9),O(11,Un,3,6,"p-togglebutton",10,ee),s(),_(13,qn,2,2,"p-message",11),_(14,Wn,3,1,"p",12)(15,Xn,2,3,"p-message",13)(16,Qn,2,1,"p",14)(17,pi,5,2),s(),_(18,ui,4,9,"footer",15),s()),e&2&&(o(4),p(" ",i.texts.pluginsHeading," "),o(2),u(i.texts.pluginsIntro),o(3),h("placeholder",i.texts.pluginsSearchPlaceholder)("ngModel",i.searchText()),v("aria-label",i.texts.pluginsSearchA11y),o(),v("aria-label",i.texts.pluginsKindFilterA11y),o(),j(i.kindFilterOptions),o(2),f(i.hasPendingChanges()?13:-1),o(),f(i.loading()?14:i.loadError()?15:i.plugins().length===0?16:17),o(4),f(i.hasPendingChanges()?18:-1))},dependencies:[ce,Ee,le,de,se,Pe,It,Mt,Ot,Tt,Ie,Me,pe,ge,St,kt,De,ue],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%;overflow:hidden;--kind-color: var(--p-text-color)}.settings-plugins[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1;min-height:0}.settings-plugins__scroll[_ngcontent-%COMP%]{flex:1;overflow-y:auto;padding:1.25rem 1.5rem;display:flex;flex-direction:column;gap:.75rem;min-height:0}.settings-plugins__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.settings-plugins__title[_ngcontent-%COMP%]{font-size:1.15rem;font-weight:600;margin:0}.settings-plugins__intro[_ngcontent-%COMP%]{margin:0;color:var(--p-text-muted-color);font-size:.875rem}.settings-plugins__search[_ngcontent-%COMP%]{display:block;width:100%}.settings-plugins__search[_ngcontent-%COMP%] :where(input[_ngcontent-%COMP%]){width:100%}.settings-plugins__kind-filter[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:.375rem}.settings-plugins__kind-chip[_ngcontent-%COMP%]{--chip-accent: var(--kind-color);--p-togglebutton-padding: .25rem .625rem;--p-togglebutton-content-padding: 0;--p-togglebutton-content-checked-background: transparent;--p-togglebutton-content-checked-shadow: none;--p-togglebutton-border-radius: var(--sm-radius-pill);--p-togglebutton-background: color-mix(in oklab, var(--chip-accent) 8%, transparent);--p-togglebutton-hover-background: color-mix(in oklab, var(--chip-accent) 18%, transparent);--p-togglebutton-checked-background: color-mix(in oklab, var(--chip-accent) 80%, transparent);--p-togglebutton-border-color: color-mix(in oklab, var(--chip-accent) 35%, transparent);--p-togglebutton-hover-border-color: color-mix(in oklab, var(--chip-accent) 55%, transparent);--p-togglebutton-checked-border-color: var(--chip-accent);--p-togglebutton-color: color-mix(in oklab, var(--chip-accent) 70%, var(--p-text-color));--p-togglebutton-hover-color: color-mix(in oklab, var(--chip-accent) 70%, var(--p-text-color));--p-togglebutton-checked-color: var(--p-surface-50);font-size:.75rem;font-weight:500;letter-spacing:.02em;text-transform:lowercase}.app-dark[_nghost-%COMP%] .settings-plugins__kind-chip[_ngcontent-%COMP%], .app-dark [_nghost-%COMP%] .settings-plugins__kind-chip[_ngcontent-%COMP%]{--p-togglebutton-background: color-mix(in oklab, var(--chip-accent) 14%, transparent);--p-togglebutton-hover-background: color-mix(in oklab, var(--chip-accent) 26%, transparent);--p-togglebutton-checked-background: color-mix(in oklab, var(--chip-accent) 70%, transparent);--p-togglebutton-border-color: color-mix(in oklab, var(--chip-accent) 50%, transparent);--p-togglebutton-hover-border-color: color-mix(in oklab, var(--chip-accent) 70%, transparent);--p-togglebutton-color: color-mix(in oklab, var(--chip-accent) 80%, var(--p-text-color));--p-togglebutton-hover-color: color-mix(in oklab, var(--chip-accent) 80%, var(--p-text-color));--p-togglebutton-checked-color: var(--p-surface-900)}.settings-plugins__banner[_ngcontent-%COMP%]{display:block}.settings-plugins__banner-body[_ngcontent-%COMP%]{font-weight:400}.settings-plugins__hint[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;margin:0;padding:1rem 0;color:var(--p-text-muted-color);font-size:.875rem}.settings-plugins__list[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.25rem}.settings-plugins__row[_ngcontent-%COMP%]{border:1px solid var(--p-content-border-color);border-radius:var(--p-border-radius);background:var(--p-content-background);padding:.75rem .875rem;display:flex;flex-direction:column;gap:.5rem}.settings-plugins__row.is-clickable[_ngcontent-%COMP%]{cursor:pointer;transition:background .12s ease}.settings-plugins__row.is-clickable[_ngcontent-%COMP%]:hover{background:var(--p-content-hover-background)}.settings-plugins__row.is-failed[_ngcontent-%COMP%]{border-color:var(--p-message-error-border-color);background:var(--p-message-error-background)}.settings-plugins__row.is-extension-bundle[_ngcontent-%COMP%]{background:var(--p-content-background)}.settings-plugins__row-main[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.75rem}.settings-plugins__expand[_ngcontent-%COMP%], .settings-plugins__expand-spacer[_ngcontent-%COMP%]{width:1.75rem;height:1.75rem;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}.settings-plugins__expand[_ngcontent-%COMP%]{border:none;background:transparent;cursor:pointer;color:var(--p-text-muted-color);border-radius:var(--p-border-radius)}.settings-plugins__expand[_ngcontent-%COMP%]:hover{color:var(--p-text-color);background:var(--p-content-hover-background)}.settings-plugins__row-text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.125rem;flex:1;min-width:0}.settings-plugins__row-headline[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:baseline;gap:.5rem .75rem;position:relative}.settings-plugins__row-id[_ngcontent-%COMP%]{font-weight:600;font-family:var(--p-monospace-font-family)}.settings-plugins__row-source[_ngcontent-%COMP%], .settings-plugins__row-version[_ngcontent-%COMP%], .settings-plugins__subrow-kind[_ngcontent-%COMP%], .settings-plugins__subrow-version[_ngcontent-%COMP%]{display:inline-flex;align-items:center;font-size:.7rem;font-weight:500;letter-spacing:.02em;padding:.125rem .5rem;border-radius:var(--sm-radius-pill);white-space:nowrap}.settings-plugins__row-version[_ngcontent-%COMP%], .settings-plugins__subrow-version[_ngcontent-%COMP%]{font-family:var(--p-monospace-font-family)}.settings-plugins__row-source[_ngcontent-%COMP%], .settings-plugins__row-version[_ngcontent-%COMP%], .settings-plugins__subrow-version[_ngcontent-%COMP%]{background:color-mix(in oklab,var(--p-text-color) 8%,transparent);border:1px solid color-mix(in oklab,var(--p-text-color) 18%,transparent);color:var(--p-text-color)}.app-dark[_nghost-%COMP%] .settings-plugins__row-source[_ngcontent-%COMP%], .app-dark [_nghost-%COMP%] .settings-plugins__row-source[_ngcontent-%COMP%], .app-dark[_nghost-%COMP%] .settings-plugins__row-version[_ngcontent-%COMP%], .app-dark [_nghost-%COMP%] .settings-plugins__row-version[_ngcontent-%COMP%], .app-dark[_nghost-%COMP%] .settings-plugins__subrow-version[_ngcontent-%COMP%], .app-dark [_nghost-%COMP%] .settings-plugins__subrow-version[_ngcontent-%COMP%]{background:color-mix(in oklab,var(--p-text-color) 14%,transparent);border-color:color-mix(in oklab,var(--p-text-color) 28%,transparent)}.settings-plugins__subrow-kind[_ngcontent-%COMP%]{background:color-mix(in oklab,var(--kind-color) 14%,transparent);border:1px solid color-mix(in oklab,var(--kind-color) 38%,transparent);color:color-mix(in oklab,var(--kind-color) 70%,var(--p-surface-900))}.app-dark[_nghost-%COMP%] .settings-plugins__subrow-kind[_ngcontent-%COMP%], .app-dark [_nghost-%COMP%] .settings-plugins__subrow-kind[_ngcontent-%COMP%]{background:color-mix(in oklab,var(--kind-color) 22%,transparent);border-color:color-mix(in oklab,var(--kind-color) 55%,transparent);color:color-mix(in oklab,var(--kind-color) 80%,var(--p-surface-50))}.settings-plugins__row-status[_ngcontent-%COMP%]{font-weight:500}.settings-plugins__row-locked[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.25rem;font-size:.7rem;font-weight:500;letter-spacing:.02em;padding:.125rem .5rem;border-radius:var(--sm-radius-pill);white-space:nowrap;background:color-mix(in oklab,var(--p-message-warn-color) 14%,transparent);border:1px solid color-mix(in oklab,var(--p-message-warn-color) 35%,transparent);color:color-mix(in oklab,var(--p-message-warn-color) 70%,var(--p-surface-900))}.settings-plugins__row-locked[_ngcontent-%COMP%] > .pi[_ngcontent-%COMP%]{font-size:.7rem}.app-dark[_nghost-%COMP%] .settings-plugins__row-locked[_ngcontent-%COMP%], .app-dark [_nghost-%COMP%] .settings-plugins__row-locked[_ngcontent-%COMP%]{background:color-mix(in oklab,var(--p-message-warn-color) 22%,transparent);border-color:color-mix(in oklab,var(--p-message-warn-color) 55%,transparent);color:color-mix(in oklab,var(--p-message-warn-color) 85%,var(--p-surface-50))}.settings-plugins__row-description[_ngcontent-%COMP%]{margin:.25rem 0 0;font-size:.8125rem;line-height:1.4;color:var(--p-text-muted-color)}.settings-plugins__row-reason[_ngcontent-%COMP%]{font-size:.8125rem;color:var(--p-message-error-color);font-family:var(--p-monospace-font-family);margin-top:.25rem}.settings-plugins__sublist[_ngcontent-%COMP%]{list-style:none;margin:0;padding:.5rem 0 0 1.75rem;display:flex;flex-direction:column;gap:.25rem;border-top:1px dashed var(--p-content-border-color)}.settings-plugins__subrow[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding:.375rem .5rem;border-radius:var(--p-border-radius)}.settings-plugins__subrow.is-clickable[_ngcontent-%COMP%]{cursor:pointer;transition:background .12s ease}.settings-plugins__subrow.is-clickable[_ngcontent-%COMP%]:hover{background:var(--p-content-hover-background)}.settings-plugins__subrow-text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.125rem;flex:1;min-width:0}.settings-plugins__subrow-headline[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:baseline;gap:.5rem .75rem;position:relative}.settings-plugins__subrow-id[_ngcontent-%COMP%]{font-family:var(--p-monospace-font-family);font-size:.875rem}.settings-plugins__subrow-description[_ngcontent-%COMP%]{margin:.25rem 0 0;font-size:.75rem;line-height:1.4;color:var(--p-text-muted-color)}.settings-plugins__dirty-dot[_ngcontent-%COMP%]{position:absolute;left:-.75rem;top:50%;transform:translateY(-50%);width:.5rem;height:.5rem;border-radius:50%;background:var(--p-warn-color);visibility:hidden}.settings-plugins__dirty-dot--visible[_ngcontent-%COMP%]{visibility:visible}.settings-plugins__row-hint[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:.5rem;margin:.25rem 0 0;font-size:.75rem;line-height:1.4;color:var(--p-warn-color)}.settings-plugins__row-hint[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{margin-top:.125rem}.settings-plugins__footer[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;align-items:center;gap:.5rem;padding:.75rem 1.5rem;border-top:1px solid var(--p-content-border-color);background:var(--p-content-background)}.settings-plugins__footer-hint[_ngcontent-%COMP%]{font-style:italic;font-size:.75rem;line-height:1.4;color:var(--p-warn-color);margin-right:auto}"],changeDetection:0})};function _i(t,n){if(t&1&&(a(0,"p-message",4),l(1),s()),t&2){let e=d();h("closable",!1),o(),T(" ",e.texts.project.loadErrorPrefix," ",n," ")}}function fi(t,n){if(t&1&&(a(0,"p-message",5),l(1),s()),t&2){let e=d();h("closable",!1),o(),T(" ",e.texts.project.saveErrorPrefix," ",n," ")}}function bi(t,n){t&1&&(a(0,"p-message",6),l(1),s()),t&2&&(h("closable",!1),o(),p(" ",n," "))}function vi(t,n){if(t&1&&(a(0,"span",12),l(1),s()),t&2){let e=d();o(),u(e.texts.project.activeProviderSourceAutodetect)}}function xi(t,n){if(t&1&&(a(0,"span",12),l(1),s()),t&2){let e=d();o(),u(e.texts.project.activeProviderSourceNone)}}function yi(t,n){if(t&1&&(a(0,"span",12),l(1),s()),t&2){let e=d(),i=d();o(),T(" ",i.texts.project.activeProviderDetectedPrefix," ",e," ")}}function Ci(t,n){t&1&&_(0,yi,2,2,"span",12),t&2&&f(n.length>0?0:-1)}function wi(t,n){if(t&1&&(a(0,"p-message",15),l(1),s()),t&2){let e=d();h("closable",!1),o(),T(" ",e.texts.project.loadErrorPrefix," ",n," ")}}function Pi(t,n){if(t&1&&(a(0,"p-message",16),l(1),s()),t&2){let e=d();h("closable",!1),o(),T(" ",e.texts.project.saveErrorPrefix," ",n," ")}}function ki(t,n){if(t&1){let e=D();a(0,"li",19)(1,"span",27),l(2),s(),a(3,"p-button",28),C("onClick",function(){let r=S(e).$implicit,c=d();return E(c.onReferencePathRemove(r))}),s()()}if(t&2){let e=n.$implicit,i=d();o(2),u(e),o(),h("label",i.texts.project.removePathLabel)("outlined",!0)("disabled",i.isPending("scan.referencePaths")),v("data-testid","settings-project-reference-paths-remove")}}function Si(t,n){if(t&1&&(a(0,"p-message",22),l(1),s()),t&2){let e=d();h("closable",!1),o(),T(" ",e.texts.project.loadErrorPrefix," ",n," ")}}function Ei(t,n){if(t&1&&(a(0,"p-message",23),l(1),s()),t&2){let e=d();h("closable",!1),o(),T(" ",e.texts.project.saveErrorPrefix," ",n," ")}}function Mi(t,n){if(t&1){let e=D();a(0,"li",19)(1,"span",27),l(2),s(),a(3,"p-button",28),C("onClick",function(){let r=S(e).$implicit,c=d();return E(c.onIgnorePatternRemove(r))}),s()()}if(t&2){let e=n.$implicit,i=d();o(2),u(e),o(),h("label",i.texts.project.removeIgnorePatternLabel)("outlined",!0)("disabled",i.isPending("ignore.patterns")),v("data-testid","settings-project-ignore-patterns-remove")}}var ln=[{id:"claude",label:"Claude Code"},{id:"gemini",label:"Gemini CLI"},{id:"openai",label:"OpenAI Codex"},{id:"cursor",label:"Cursor"}],Ii=/[\n\r\x00-\x1F\x7F]/,Re=class t{dataSource=k(W);confirmation=k(ae);visible=V.required();texts=w;loading=m(!1);loadError=m(null);saveError=m(null);preferences=m(null);pending=m(new Set);newReferencePath=m("");referencePaths=y(()=>this.preferences()?.scan.referencePaths??[]);ignoreLoadError=m(null);ignoreSaveError=m(null);ignoreEnvelope=m(null);newIgnorePattern=m("");ignorePatterns=y(()=>this.ignoreEnvelope()?.patterns??[]);activeProviderEnvelope=m(null);activeProviderLoadError=m(null);activeProviderSaveError=m(null);activeProviderSwitchAnnouncement=m(null);knownProviders=ln;providerOptions=[{id:"",label:w.project.activeProviderEmptyOption},...ln];activeProviderValue=y(()=>this.activeProviderEnvelope()?.activeProvider??"");activeProviderDetectedLabel=y(()=>(this.activeProviderEnvelope()?.detected??[]).join(", "));activeProviderSource=y(()=>this.activeProviderEnvelope()?.source??"none");constructor(){L(()=>{this.visible()&&(this.refresh(),this.refreshIgnore(),this.refreshActiveProvider())})}isPending(n){return this.pending().has(n)}onReferencePathAdd(){let n=this.newReferencePath().trim();if(n.length===0)return;if(n.includes(",")){this.saveError.set(this.texts.project.commaForbidden);return}let e=[...this.referencePaths(),n];this.runPatch("scan.referencePaths",{scan:{referencePaths:e}}).then(i=>{i&&this.newReferencePath.set("")})}onReferencePathRemove(n){let e=this.referencePaths().filter(i=>i!==n);this.runPatch("scan.referencePaths",{scan:{referencePaths:[...e]}})}onIgnorePatternAdd(){let n=this.newIgnorePattern().trim();if(n.length===0){this.ignoreSaveError.set(this.texts.project.ignorePatternEmpty);return}if(Ii.test(n)){this.ignoreSaveError.set(this.texts.project.ignorePatternHasControlChar);return}let e=this.ignorePatterns();if(e.includes(n)){this.ignoreSaveError.set(this.texts.project.ignorePatternDuplicate);return}let i=[...e,n];this.runIgnorePatch({patterns:i}).then(r=>{r&&this.newIgnorePattern.set("")})}onIgnorePatternRemove(n){let e=this.ignorePatterns().filter(i=>i!==n);this.runIgnorePatch({patterns:[...e]})}onActiveProviderChange(n){n===""||n===this.activeProviderValue()||this.confirmActiveProviderSwitch(n,async()=>{await this.runActiveProviderSwitch(n)})}async refresh(){this.loading.set(!0),this.loadError.set(null),this.saveError.set(null);try{let n=await this.dataSource.getProjectPreferences();this.preferences.set(n)}catch(n){this.loadError.set(ne(n)),this.preferences.set(null)}finally{this.loading.set(!1)}}async refreshIgnore(){this.ignoreLoadError.set(null),this.ignoreSaveError.set(null);try{let n=await this.dataSource.getProjectIgnore();this.ignoreEnvelope.set(n)}catch(n){this.ignoreLoadError.set(ne(n)),this.ignoreEnvelope.set(null)}}async refreshActiveProvider(){this.activeProviderLoadError.set(null),this.activeProviderSaveError.set(null);try{let n=await this.dataSource.getActiveProvider();this.activeProviderEnvelope.set(n)}catch(n){this.activeProviderLoadError.set(ne(n)),this.activeProviderEnvelope.set(null)}}async runActiveProviderSwitch(n){this.activeProviderSaveError.set(null),this.activeProviderSwitchAnnouncement.set(null);try{let e=await this.dataSource.setActiveProvider(n);this.activeProviderEnvelope.set({activeProvider:e.activeProvider,detected:e.detected,source:e.source});let i=e.switch.dropped;if(i===null)this.activeProviderSwitchAnnouncement.set(this.texts.project.activeProviderSwitchedNoDb);else{let r=this.texts.project;this.activeProviderSwitchAnnouncement.set(`${r.activeProviderSwitchedPrefix} ${i.tableCount} ${r.activeProviderSwitchedSuffix}`)}}catch(e){this.activeProviderSaveError.set(ne(e))}}confirmActiveProviderSwitch(n,e){this.confirmation.confirm({header:this.texts.project.activeProviderConfirmHeader,message:this.texts.project.activeProviderConfirmIntro,acceptLabel:this.texts.project.activeProviderConfirmAccept,rejectLabel:this.texts.project.activeProviderConfirmReject,acceptButtonProps:{severity:"primary"},rejectButtonProps:{severity:"secondary"},accept:()=>{e()},reject:()=>{let i=this.activeProviderEnvelope();i&&this.activeProviderEnvelope.set(U({},i))}})}async runPatch(n,e){if(this.pending().has(n))return!1;let i=new Set(this.pending());i.add(n),this.pending.set(i),this.saveError.set(null);let r=!1;try{let c=await this.dataSource.setProjectPreferences(e);this.preferences.set(c),r=!0}catch(c){if(c instanceof $&&c.code==="confirm-required"){let g=c.paths??[];this.confirmDialog(g,async()=>{try{let P=await this.dataSource.setProjectPreferences(J(U({},e),{confirm:!0}));this.preferences.set(P),this.newReferencePath.set("")}catch(P){this.saveError.set(ne(P))}})}else this.saveError.set(ne(c))}finally{let c=new Set(this.pending());c.delete(n),this.pending.set(c)}return r}async runIgnorePatch(n){let e="ignore.patterns";if(this.pending().has(e))return!1;let i=new Set(this.pending());i.add(e),this.pending.set(i),this.ignoreSaveError.set(null);let r=!1;try{let c=await this.dataSource.setProjectIgnore(n);this.ignoreEnvelope.set(c),r=!0}catch(c){this.ignoreSaveError.set(ne(c))}finally{let c=new Set(this.pending());c.delete(e),this.pending.set(c)}return r}confirmDialog(n,e){this.confirmation.confirm({header:w.project.confirmDialogHeader,message:w.project.confirmDialogIntro+`
122
- `+n.map(i=>`\u2022 ${i}`).join(`
123
- `),acceptLabel:w.project.confirmDialogAccept,rejectLabel:w.project.confirmDialogReject,acceptButtonProps:{severity:"primary"},rejectButtonProps:{severity:"secondary"},accept:()=>{e()}})}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=F({type:t,selectors:[["sm-settings-project"]],inputs:{visible:[1,"visible"]},features:[re([ae])],decls:58,vars:36,consts:[["data-testid","settings-project",1,"settings-project"],["id","settings-project-heading",1,"settings-project__title"],[1,"settings-project__intro"],[1,"settings-project__intro-path"],["severity","error","data-testid","settings-project-active-provider-load-error",3,"closable"],["severity","error","data-testid","settings-project-active-provider-save-error",3,"closable"],["severity","info","data-testid","settings-project-active-provider-switch-announce",3,"closable"],["data-testid","settings-project-active-provider-row",1,"settings-project__list-row"],[1,"settings-project__row-text"],[1,"settings-project__row-label"],[1,"settings-project__row-description"],[1,"settings-project__row-meta"],[1,"settings-project__meta-line"],[1,"settings-project__add-row"],["optionLabel","label","optionValue","id","appendTo","body","data-testid","settings-project-active-provider-select",1,"settings-project__provider-select",3,"ngModelChange","options","ngModel"],["severity","error","data-testid","settings-project-load-error",3,"closable"],["severity","error","data-testid","settings-project-save-error",3,"closable"],["data-testid","settings-project-reference-paths-row",1,"settings-project__list-row"],["role","list",1,"settings-project__path-list"],[1,"settings-project__path-item"],["type","text","pInputText","","data-testid","settings-project-reference-paths-input",3,"ngModelChange","keydown.enter","ngModel","placeholder","disabled"],["severity","primary","size","small","data-testid","settings-project-reference-paths-add",3,"onClick","label","disabled"],["severity","error","data-testid","settings-project-ignore-load-error",3,"closable"],["severity","error","data-testid","settings-project-ignore-save-error",3,"closable"],["data-testid","settings-project-ignore-patterns-row",1,"settings-project__list-row"],["type","text","pInputText","","data-testid","settings-project-ignore-patterns-input",3,"ngModelChange","keydown.enter","ngModel","placeholder","disabled"],["severity","primary","size","small","data-testid","settings-project-ignore-patterns-add",3,"onClick","label","disabled"],[1,"settings-project__path-text"],["severity","secondary","size","small",3,"onClick","label","outlined","disabled"]],template:function(e,i){if(e&1&&(a(0,"section",0)(1,"h2",1),l(2),s(),a(3,"p",2),l(4),a(5,"code",3),l(6),s(),l(7),s(),_(8,_i,2,3,"p-message",4),_(9,fi,2,3,"p-message",5),_(10,bi,2,2,"p-message",6),a(11,"div",7)(12,"div",8)(13,"div",9),l(14),s(),a(15,"div",10),l(16),s(),a(17,"div",11),_(18,vi,2,1,"span",12)(19,xi,2,1,"span",12),_(20,Ci,1,1),s()(),a(21,"div",13)(22,"p-select",14),C("ngModelChange",function(c){return i.onActiveProviderChange(c)}),s()()(),_(23,wi,2,3,"p-message",15),_(24,Pi,2,3,"p-message",16),a(25,"div",17)(26,"div",8)(27,"div",9),l(28),s(),a(29,"div",10),l(30),s()(),a(31,"ul",18),O(32,ki,4,5,"li",19,ee),s(),a(34,"div",13)(35,"input",20),C("ngModelChange",function(c){return i.newReferencePath.set(c)})("keydown.enter",function(){return i.onReferencePathAdd()}),s(),a(36,"p-button",21),C("onClick",function(){return i.onReferencePathAdd()}),s()()(),_(37,Si,2,3,"p-message",22),_(38,Ei,2,3,"p-message",23),a(39,"div",24)(40,"div",8)(41,"div",9),l(42),s(),a(43,"div",10),l(44),a(45,"code",3),l(46),s(),l(47),a(48,"code",3),l(49),s(),l(50),s()(),a(51,"ul",18),O(52,Mi,4,5,"li",19,ee),s(),a(54,"div",13)(55,"input",25),C("ngModelChange",function(c){return i.newIgnorePattern.set(c)})("keydown.enter",function(){return i.onIgnorePatternAdd()}),s(),a(56,"p-button",26),C("onClick",function(){return i.onIgnorePatternAdd()}),s()()(),I(57,"p-confirmdialog"),s()),e&2){let r,c,g,P,G,R,Q,z,Y;v("aria-labelledby","settings-project-heading"),o(2),p(" ",i.texts.project.heading," "),o(2),p(" ",i.texts.project.introPrefix," "),o(2),u(i.texts.project.introPath),o(),p("",i.texts.project.introSuffix," "),o(),f((r=i.activeProviderLoadError())?8:-1,r),o(),f((c=i.activeProviderSaveError())?9:-1,c),o(),f((g=i.activeProviderSwitchAnnouncement())?10:-1,g),o(4),u(i.texts.project.activeProviderLabel),o(2),p(" ",i.texts.project.activeProviderDescription," "),o(2),f((P=i.activeProviderSource())==="autodetect"?18:P==="none"?19:-1),o(2),f((G=i.activeProviderDetectedLabel())?20:-1,G),o(2),h("options",i.providerOptions)("ngModel",i.activeProviderValue()),o(),f((R=i.loadError())?23:-1,R),o(),f((Q=i.saveError())?24:-1,Q),o(4),u(i.texts.project.referencePathsLabel),o(2),p(" ",i.texts.project.referencePathsDescription," "),o(2),j(i.referencePaths()),o(3),h("ngModel",i.newReferencePath())("placeholder",i.texts.project.referencePathsPlaceholder)("disabled",i.isPending("scan.referencePaths")),o(),h("label",i.texts.project.addPathLabel)("disabled",i.isPending("scan.referencePaths")||i.newReferencePath().trim().length===0),o(),f((z=i.ignoreLoadError())?37:-1,z),o(),f((Y=i.ignoreSaveError())?38:-1,Y),o(4),u(i.texts.project.ignorePatternsLabel),o(2),p(" ",i.texts.project.ignorePatternsDescriptionPrefix," "),o(2),u(i.texts.project.ignorePatternsDescriptionFile),o(),p(" ",i.texts.project.ignorePatternsDescriptionMiddle," "),o(2),u(i.texts.project.ignorePatternsDescriptionGitignore),o(),p(" ",i.texts.project.ignorePatternsDescriptionSuffix," "),o(2),j(i.ignorePatterns()),o(3),h("ngModel",i.newIgnorePattern())("placeholder",i.texts.project.ignorePatternsPlaceholder)("disabled",i.isPending("ignore.patterns")),o(),h("label",i.texts.project.addIgnorePatternLabel)("disabled",i.isPending("ignore.patterns")||i.newIgnorePattern().trim().length===0)}},dependencies:[ce,Ee,le,de,se,Pe,Se,ke,Ie,Me,pe,ge,Dt,jt],styles:["[_nghost-%COMP%]{display:block;height:100%;overflow-y:auto;padding:1.25rem 1.5rem}.settings-project__title[_ngcontent-%COMP%]{margin:0 0 .25rem;font-size:1.05rem;font-weight:600;color:var(--p-text-color)}.settings-project__intro[_ngcontent-%COMP%]{margin:0 0 1.25rem;font-size:.85rem;color:var(--sm-text-muted);line-height:1.5}.settings-project__intro-path[_ngcontent-%COMP%]{font-family:var(--p-monospace-font-family);font-size:.8rem;padding:.05rem .3rem;border-radius:.25rem;background:var(--p-content-background);border:1px solid var(--p-content-border-color)}[_nghost-%COMP%] p-message[_ngcontent-%COMP%]{display:block;margin-bottom:1rem}.settings-project__row[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.85rem 1rem;border:1px solid var(--p-content-border-color);border-radius:.5rem;background:var(--p-content-background);margin-bottom:1rem}.settings-project__row[_ngcontent-%COMP%] > p-toggleswitch[_ngcontent-%COMP%]{flex:0 0 auto;align-self:center}.settings-project__list-row[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.75rem;padding:.85rem 1rem;border:1px solid var(--p-content-border-color);border-radius:.5rem;background:var(--p-content-background);margin-bottom:1rem}.settings-project__row-text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;flex:1 1 auto;min-width:0}.settings-project__row-label[_ngcontent-%COMP%]{font-size:.9rem;font-weight:600;color:var(--p-text-color)}.settings-project__row-description[_ngcontent-%COMP%]{font-size:.8rem;color:var(--sm-text-muted);line-height:1.45}.settings-project__path-list[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.4rem}.settings-project__path-item[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding:.4rem .6rem;border-radius:.35rem;background:var(--p-content-hover-background)}.settings-project__path-text[_ngcontent-%COMP%]{font-family:var(--p-font-family-mono);font-size:.8rem;word-break:break-all;flex:1 1 auto}.settings-project__add-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.settings-project__add-row[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{flex:1 1 auto;font-family:var(--p-font-family-mono);font-size:.8rem}.settings-project__row-meta[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.15rem;font-size:.75rem;color:var(--p-text-muted-color)}.settings-project__meta-line[_ngcontent-%COMP%]{line-height:1.3}.settings-project__provider-select[_ngcontent-%COMP%]{flex:1 1 auto}.settings-project__provider-select[_ngcontent-%COMP%] .p-select[_ngcontent-%COMP%]{width:100%}"],changeDetection:0})};function ne(t){return t instanceof $||t instanceof Error?t.message:String(t)}var Ti=(t,n)=>n.id;function Oi(t,n){if(t&1){let e=D();a(0,"li")(1,"button",6),C("click",function(){let r=S(e).$implicit,c=d();return E(c.selectSection(r.id))}),a(2,"span",7),l(3),s()()()}if(t&2){let e=n.$implicit,i=d();o(),K("is-active",i.activeSection()===e.id),v("aria-current",i.activeSection()===e.id?"page":null)("data-testid","settings-nav-"+e.id),o(2),u(e.label)}}function ji(t,n){if(t&1){let e=D();a(0,"sm-settings-plugins",8),C("applied",function(){S(e);let r=d();return E(r.onPluginsApplied())}),s()}if(t&2){let e=d();h("visible",e.pluginsVisible())}}function Di(t,n){if(t&1&&I(0,"sm-settings-general",5),t&2){let e=d();h("visible",e.generalVisible())}}function Fi(t,n){if(t&1&&I(0,"sm-settings-project",5),t&2){let e=d();h("visible",e.projectVisible())}}function Ai(t,n){if(t&1&&I(0,"sm-settings-about",5),t&2){let e=d();h("visible",e.aboutVisible())}}function Ni(t,n){t&1&&I(0,"sm-settings-changelog")}var Li=[{id:"general",label:w.sections.general},{id:"project",label:w.sections.project},{id:"plugins",label:w.sections.plugins},{id:"changelog",label:w.sections.changelog},{id:"about",label:w.sections.about}],dn=class t{visible=V.required();visibleChange=ye();confirmation=k(ae);buffer=k(me);texts=w;sections=Li;activeSection=m("plugins");pluginsVisible=y(()=>this.visible()&&this.activeSection()==="plugins");generalVisible=y(()=>this.visible()&&this.activeSection()==="general");projectVisible=y(()=>this.visible()&&this.activeSection()==="project");aboutVisible=y(()=>this.visible()&&this.activeSection()==="about");onVisibleChange(n){if(n){this.visibleChange.emit(!0);return}let e=this.buffer.dirtyCount();if(e===0){this.visibleChange.emit(!1);return}this.confirmation.confirm({header:this.texts.confirmCloseTitle,message:this.texts.confirmCloseBody(e),acceptLabel:this.texts.applyAndClose,rejectLabel:this.texts.discardChanges,acceptButtonProps:{severity:"primary"},rejectButtonProps:{severity:"secondary"},accept:()=>{this.buffer.applyChanges()},reject:()=>{this.buffer.discardChanges(),this.visibleChange.emit(!1)}})}selectSection(n){this.activeSection.set(n)}onPluginsApplied(){this.visibleChange.emit(!1)}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=F({type:t,selectors:[["sm-settings-modal"]],inputs:{visible:[1,"visible"]},outputs:{visibleChange:"visibleChange"},features:[re([ae])],decls:13,vars:10,consts:[["styleClass","settings-modal__dialog","contentStyleClass","settings-modal__content","data-testid","settings-modal",3,"visibleChange","visible","modal","draggable","resizable","closable","closeOnEscape","dismissableMask","header"],[1,"settings-modal__layout"],["data-testid","settings-modal-sidebar",1,"settings-modal__sidebar"],["role","list",1,"settings-modal__sidebar-list"],["data-testid","settings-modal-main",1,"settings-modal__main"],[3,"visible"],["type","button",1,"settings-modal__sidebar-item",3,"click"],[1,"settings-modal__sidebar-label"],[3,"applied","visible"]],template:function(e,i){if(e&1&&(a(0,"p-dialog",0),C("visibleChange",function(c){return i.onVisibleChange(c)}),a(1,"div",1)(2,"nav",2)(3,"ul",3),O(4,Oi,4,5,"li",null,Ti),s()(),a(6,"div",4),_(7,ji,1,1,"sm-settings-plugins",5)(8,Di,1,1,"sm-settings-general",5)(9,Fi,1,1,"sm-settings-project",5)(10,Ai,1,1,"sm-settings-about",5)(11,Ni,1,0,"sm-settings-changelog"),s()(),I(12,"p-confirmdialog"),s()),e&2){let r;h("visible",i.visible())("modal",!0)("draggable",!1)("resizable",!1)("closable",!0)("closeOnEscape",!0)("dismissableMask",!0)("header",i.texts.modalTitle),o(2),v("aria-label",i.texts.modalTitle),o(2),j(i.sections),o(3),f((r=i.activeSection())==="plugins"?7:r==="general"?8:r==="project"?9:r==="about"?10:r==="changelog"?11:-1)}},dependencies:[se,Se,ke,Ct,yt,Oe,je,Fe,Ve,Re],styles:["[_nghost-%COMP%]{display:contents;--p-message-error-color: #fca5a5;--p-message-error-background: color-mix(in srgb, #ef4444 14%, transparent);--p-message-error-border-color: color-mix(in srgb, #ef4444 45%, transparent)}[_nghost-%COMP%] .settings-modal__dialog{width:1024px;height:720px;max-width:92vw;max-height:90vh}[_nghost-%COMP%] .settings-modal__content{padding:0;height:100%;display:flex;flex-direction:column;overflow:hidden}.settings-modal__layout[_ngcontent-%COMP%]{flex:1;display:grid;grid-template-columns:200px 1fr;min-height:0}.settings-modal__sidebar[_ngcontent-%COMP%]{border-right:1px solid var(--p-content-border-color);background:var(--p-content-background);padding:.5rem;overflow-y:auto}.settings-modal__sidebar-list[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.125rem}.settings-modal__sidebar-item[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:.5rem;width:100%;padding:.5rem .75rem;border:none;border-radius:var(--p-border-radius);background:transparent;color:var(--p-text-color);font:inherit;text-align:left;cursor:pointer;transition:background .15s ease,color .15s ease}.settings-modal__sidebar-item[_ngcontent-%COMP%]:hover{background:var(--p-content-hover-background)}.settings-modal__sidebar-item.is-active[_ngcontent-%COMP%]{background:var(--p-highlight-background);color:var(--p-highlight-color)}.settings-modal__sidebar-label[_ngcontent-%COMP%]{flex:1;font-size:.9rem;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.settings-modal__main[_ngcontent-%COMP%]{min-width:0;min-height:0;overflow:hidden;display:flex;flex-direction:column}.settings-modal__main[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1;min-height:0}"],changeDetection:0})};export{dn as SettingsModal};
@@ -1 +0,0 @@
1
- import{I as f,N as x,Y as _,ea as l,mc as y}from"./chunk-YL6SWAFJ.js";var P=new Set(["stale-body","stale-frontmatter","stale-both"]);function p(t){return t?P.has(t.status??null):!1}function u(t){let e=t.metadata;return e&&typeof e=="object"&&!Array.isArray(e)?e:null}function te(t){if(!t)return null;let e=t.sidecar?.annotations;if(e&&typeof e.version=="number")return`v${e.version}`;let n=u(t.frontmatter)?.version;return typeof n=="string"&&n.length>0?`v${n}`:null}function v(t){if(!t)return null;let n=t.sidecar?.annotations?.stability;if(n==="stable"||n==="experimental"||n==="deprecated")return n;let r=u(t.frontmatter)?.stability;return r==="stable"||r==="experimental"||r==="deprecated"?r:null}function ne(t){if(!t)return[];let e=t.frontmatter,n=[];if(t.kind==="agent"&&Array.isArray(e.tools))for(let r of e.tools)typeof r=="string"&&r.length>0&&n.push(r);if(t.kind==="skill"||t.kind==="command"){let r=e["allowed-tools"];if(Array.isArray(r))for(let i of r)typeof i=="string"&&i.length>0&&n.push(i);else typeof r=="string"&&r.length>0&&n.push(r)}return n}function re(t){return p(t?.sidecar)}function S(t){if(!t)return null;let n=t.sidecar?.annotations?.supersededBy;if(typeof n=="string"&&n.length>0)return n;let r=u(t.frontmatter)?.supersededBy;return typeof r=="string"&&r.length>0?r:null}function A(t){if(!t)return[];let n=t.sidecar?.annotations?.tags;if(Array.isArray(n))return n.filter(i=>typeof i=="string"&&i.length>0);let r=u(t.frontmatter)?.tags;return Array.isArray(r)?r.filter(i=>typeof i=="string"&&i.length>0):[]}function ie(t,e){switch(t?.sidecar?.status){case"stale-body":return e.staleBody;case"stale-frontmatter":return e.staleFrontmatter;case"stale-both":return e.staleBoth;default:return""}}function se(t){return t<1e3?`${t}`:t<1e4?`${(t/1e3).toFixed(1).replace(/\.0$/,"")}k`:`${Math.round(t/1e3)}k`}function oe(t){let e=new Date(t);if(isNaN(e.getTime()))return t;let n=Date.now()-e.getTime(),r=Math.floor(n/1e3);if(r<60)return"just now";let i=Math.floor(r/60);if(i<60)return`${i} minute${i===1?"":"s"} ago`;let o=Math.floor(i/60);if(o<24)return`${o} hour${o===1?"":"s"} ago`;let s=Math.floor(o/24);if(s<30)return`${s} day${s===1?"":"s"} ago`;let a=Math.floor(s/30);if(a<12)return`${a} month${a===1?"":"s"} ago`;let g=Math.floor(s/365);return`${g} year${g===1?"":"s"} ago`}var ge=["stable","experimental","deprecated"],E=["invokes","references","mentions","supersedes"],N=class t{_searchText=l("");_selectedKinds=l([]);_kindToggleExplicitEmpty=l(!1);_selectedStabilities=l([]);_hasIssuesOnly=l(!1);_staleOnly=l(!1);_favoritesOnly=l(!1);_selectedLinkKinds=l([]);_severityErrorActive=l(!1);_severityWarnActive=l(!1);searchText=this._searchText.asReadonly();selectedKinds=this._selectedKinds.asReadonly();selectedStabilities=this._selectedStabilities.asReadonly();hasIssuesOnly=this._hasIssuesOnly.asReadonly();staleOnly=this._staleOnly.asReadonly();favoritesOnly=this._favoritesOnly.asReadonly();selectedLinkKinds=this._selectedLinkKinds.asReadonly();severityErrorActive=this._severityErrorActive.asReadonly();severityWarnActive=this._severityWarnActive.asReadonly();kindToggleExplicitEmpty=this._kindToggleExplicitEmpty.asReadonly();isActive=y(()=>this._searchText().trim().length>0||this._selectedKinds().length>0||this._kindToggleExplicitEmpty()||this._selectedStabilities().length>0||this._hasIssuesOnly()||this._staleOnly()||this._favoritesOnly()||this._selectedLinkKinds().length>0||this._severityErrorActive()||this._severityWarnActive());setSearchText(e){this._searchText.set(e)}setKinds(e){this._kindToggleExplicitEmpty.set(!1),this._selectedKinds.set([...e])}toggleKind(e,n){let r=this._selectedKinds(),i=n,s=this._kindToggleExplicitEmpty()?new Set:r.length===0?new Set(i):new Set(r);s.has(e)?s.delete(e):s.add(e),s.size===i.length?(this._selectedKinds.set([]),this._kindToggleExplicitEmpty.set(!1)):s.size===0?(this._selectedKinds.set([]),this._kindToggleExplicitEmpty.set(!0)):(this._selectedKinds.set([...s]),this._kindToggleExplicitEmpty.set(!1))}isKindActive(e){if(this._kindToggleExplicitEmpty())return!1;let n=this._selectedKinds();return n.length===0?!0:n.includes(e)}setStabilities(e){this._selectedStabilities.set([...e])}setHasIssuesOnly(e){this._hasIssuesOnly.set(e)}setStaleOnly(e){this._staleOnly.set(e)}setFavoritesOnly(e){this._favoritesOnly.set(e)}setLinkKinds(e){this._selectedLinkKinds.set([...e])}toggleLinkKind(e){let n=this._selectedLinkKinds(),r=n.length===0?new Set(E):new Set(n);r.has(e)?r.delete(e):r.add(e),r.size===E.length?this._selectedLinkKinds.set([]):this._selectedLinkKinds.set([...r])}isLinkKindActive(e){let n=this._selectedLinkKinds();return n.length===0?!0:n.includes(e)}toggleSeverity(e){e==="error"?this._severityErrorActive.set(!this._severityErrorActive()):this._severityWarnActive.set(!this._severityWarnActive())}isSeverityActive(e){return e==="error"?this._severityErrorActive():this._severityWarnActive()}setSeverityFilters(e){let n=new Set(e);this._severityErrorActive.set(n.has("error")),this._severityWarnActive.set(n.has("warn"))}reset(){this._searchText.set(""),this._selectedKinds.set([]),this._kindToggleExplicitEmpty.set(!1),this._selectedStabilities.set([]),this._hasIssuesOnly.set(!1),this._staleOnly.set(!1),this._favoritesOnly.set(!1),this._selectedLinkKinds.set([]),this._severityErrorActive.set(!1),this._severityWarnActive.set(!1)}apply(e,n){let r=this.searchText().trim().toLowerCase(),i=this.selectedKinds(),o=this._kindToggleExplicitEmpty(),s=this.selectedStabilities(),a=this.hasIssuesOnly(),g=this.staleOnly(),D=this.favoritesOnly(),k=this._severityErrorActive(),T=this._severityWarnActive(),F=(k||T)&&n!==void 0;return e.filter(d=>{if(r){let c=d.frontmatter,B=(Array.isArray(c.tags)?c.tags:[]).filter(C=>typeof C=="string").join(" "),j=A(d).join(" ");if(![d.path,d.frontmatter.name??"",d.frontmatter.description??"",B,j].join(" ").toLowerCase().includes(r))return!1}if(o||i.length>0&&!i.includes(d.kind))return!1;if(s.length>0){let c=v(d);if(!c||!s.includes(c))return!1}return!(a&&!W(d,n)||g&&!p(d.sidecar)||D&&d.isFavorite!==!0||F&&(k&&!n.errors.has(d.path)||T&&!n.warns.has(d.path)))})}static \u0275fac=function(n){return new(n||t)};static \u0275prov=f({token:t,factory:t.\u0275fac,providedIn:"root"})};function W(t,e){return!!(v(t)==="deprecated"||S(t)!==null||e&&(e.errors.has(t.path)||e.warns.has(t.path)))}function b(t){let e=t.normalize("NFD");return e=e.replace(new RegExp("\\p{Mn}+","gu"),""),e=e.toLowerCase(),e=e.replace(/[-_\s]+/g," "),e=e.replace(/\s+/g," "),e.trim()}function ye(t){let e=new Map;return H(t,e),U(t,e),e}function H(t,e){for(let n of t){let r=w(n);if(r===null)continue;let i=b(r);e.has(i)||e.set(i,n.path)}}function U(t,e){for(let n of t){if(w(n)!==null)continue;let r=z(n.path);if(r.length===0)continue;let i=b(r);e.has(i)||e.set(i,n.path)}}function w(t){let e=t.frontmatter?.name;return typeof e!="string"||e.length===0?null:e}function z(t){let e=t.split("/").filter(r=>r.length>0);if(e.length===0)return t;let n=e[e.length-1];return n==="SKILL.md"&&e.length>=2?e[e.length-2]:n.replace(/\.md$/,"")}function pe(t,e,n){let r=t.charAt(0);if(r!=="/"&&r!=="@")return t;let i=e!==null?e.replace(/^[/@]/,"").trim():b(t.slice(1));return n.get(i)??t}var K={invalidHex:t=>`deriveTints: invalid hex color "${t}" (expected #RRGGBB)`};function m(t,e,n){return[Math.round(t[0]+(e[0]-t[0])*n),Math.round(t[1]+(e[1]-t[1])*n),Math.round(t[2]+(e[2]-t[2])*n)]}function q(t){let e=/^#([0-9a-f]{6})$/i.exec(t);if(!e)throw new Error(K.invalidHex(t));let n=parseInt(e[1],16);return[n>>16&255,n>>8&255,n&255]}function h([t,e,n]){let r=i=>Math.max(0,Math.min(255,i)).toString(16).padStart(2,"0");return`#${r(t)}${r(e)}${r(n)}`}var R=[255,255,255],O=[0,0,0];function I(t,e){let n=q(t);return e==="light"?{bg:h(m(n,R,.85)),fg:h(m(n,O,.5))}:{bg:h(m(n,O,.7)),fg:h(m(n,R,.6))}}var X=/^[a-zA-Z][a-zA-Z0-9_-]{0,63}$/,L=/^#[0-9a-f]{6}$/i,M=class t{doc=x(_);_entries=l([]);kinds=this._entries.asReadonly();index=y(()=>{let e=new Map;for(let n of this._entries())e.set(n.name,n);return e});ingest(e){if(!e)return;let n=[];for(let[i,o]of Object.entries(e)){if(!X.test(i))continue;let s=o.providers[o.primaryProviderId];if(!s)continue;let a={name:i,primaryProviderId:o.primaryProviderId,providers:o.providers,label:s.label,color:s.color};s.colorDark!==void 0&&(a.colorDark=s.colorDark),s.emoji!==void 0&&(a.emoji=s.emoji),s.icon!==void 0&&(a.icon=s.icon),n.push(a)}let r=this._entries();J(r,n)||(this._entries.set(n),this.applyCssVars())}lookup(e){return this.index().get(e)}labelOf(e){return this.lookup(e)?.label??e}colorOf(e,n="light"){let r=this.lookup(e);return r?n==="dark"?r.colorDark??r.color:r.color:"#9ca3af"}iconOf(e){return this.lookup(e)?.icon}emojiOf(e){return this.lookup(e)?.emoji}providersOf(e){return this.lookup(e)?.providers}applyCssVars(){if(!this.doc.head)return;let e=G(this.doc),n=[],r=[];for(let i of this._entries()){if(!L.test(i.color))continue;let o=i.colorDark??i.color;if(L.test(o))try{let s=I(i.color,"light"),a=I(o,"dark");n.push(`--sm-kind-${i.name}: ${i.color};`),n.push(`--sm-kind-${i.name}-bg: ${s.bg};`),n.push(`--sm-kind-${i.name}-fg: ${s.fg};`),r.push(`--sm-kind-${i.name}: ${o};`),r.push(`--sm-kind-${i.name}-bg: ${a.bg};`),r.push(`--sm-kind-${i.name}-fg: ${a.fg};`)}catch{continue}}e.textContent=`:root { ${n.join(" ")} } .app-dark { ${r.join(" ")} }`}static \u0275fac=function(n){return new(n||t)};static \u0275prov=f({token:t,factory:t.\u0275fac,providedIn:"root"})},$="sm-kind-vars";function G(t){let e=t.getElementById($);return e||(e=t.createElement("style"),e.id=$,t.head.appendChild(e)),e}function J(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++){let r=t[n],i=e[n];if(r.name!==i.name||r.primaryProviderId!==i.primaryProviderId||JSON.stringify(r.providers)!==JSON.stringify(i.providers))return!1}return!0}export{p as a,te as b,v as c,ne as d,re as e,S as f,A as g,ie as h,se as i,oe as j,ge as k,E as l,N as m,M as n,ye as o,z as p,pe as q};
@@ -1 +0,0 @@
1
- import{Ed as c,Fd as m,I as o,Jd as f,N as i,Y as g,Z as h,ea as r,ga as u,mc as n}from"./chunk-YL6SWAFJ.js";var F={triggerLabel:"Settings",triggerTooltip:"Settings",modalTitle:"Settings",closeLabel:"Close",sections:{plugins:"Plugins",general:"General",project:"Project",changelog:"Changelog",about:"About"},general:{heading:"General",intro:"Per-machine preferences.",loadErrorPrefix:"Could not load preferences:",saveErrorPrefix:"Could not save preferences:",toggles:{"updateCheck.enabled":{label:"Check for updates",description:"Check npm for newer @skill-map/cli releases."}},extraTheme:{label:"Theme",description:"Pick a specialty theme.",options:{none:{label:"None",description:"Use the topbar dark/light toggle."},matrix:{label:"Matrix",description:"Cyber-green retint on the dark palette."}}},storageHintLabel:"Settings are stored in:",storageHintPath:"~/.skill-map/settings.json"},project:{heading:"Project",introPrefix:"These settings apply only to this project and are saved in",introPath:".skill-map/settings.local.json",introSuffix:".",loadErrorPrefix:"Could not load project settings:",saveErrorPrefix:"Could not save project settings:",referencePathsLabel:"Folders for link validation",referencePathsDescription:"If your notes link to files outside this project, list those folders here. Skill-map checks them only to confirm the links work, nothing from these folders shows up in the map.",referencePathsPlaceholder:"~/Documents/research",commaForbidden:"Add one path at a time, without commas.",addPathLabel:"Add path",removePathLabel:"Remove",confirmDialogHeader:"Allow access to folders outside this project?",confirmDialogIntro:"This change lets the scan read files in:",confirmDialogAccept:"Allow access",confirmDialogReject:"Cancel",ignorePatternsLabel:"Ignored patterns",ignorePatternsDescriptionPrefix:"Patterns that exclude files and folders from the scan, stored in",ignorePatternsDescriptionFile:".skillmapignore",ignorePatternsDescriptionMiddle:"at the project root. Same syntax as",ignorePatternsDescriptionGitignore:".gitignore",ignorePatternsDescriptionSuffix:"(one pattern per line).",ignorePatternsPlaceholder:"secrets.md",ignorePatternEmpty:"Pattern cannot be empty or whitespace-only.",ignorePatternHasControlChar:"Pattern must be a single line without control characters.",ignorePatternDuplicate:"This pattern is already in the list.",addIgnorePatternLabel:"Add pattern",removeIgnorePatternLabel:"Remove",activeProviderLabel:"Active provider",activeProviderDescription:"Selects which provider sees this project. The map reflects how the chosen provider interprets your files.",activeProviderSourceAutodetect:"Auto-detected from your files (no value saved yet).",activeProviderSourceNone:"No provider detected. Install or enable a provider to start.",activeProviderDetectedPrefix:"Detected:",activeProviderEmptyOption:"(none)",activeProviderConfirmHeader:"Switch the active provider?",activeProviderConfirmIntro:"Switching will clear the persisted scan (nodes, links, issues). Jobs and history are kept. You will need to run `sm scan` after the switch.",activeProviderConfirmAccept:"Switch and clear scan",activeProviderConfirmReject:"Cancel",activeProviderSwitchedPrefix:"Lens switched. Cleared",activeProviderSwitchedSuffix:"scan table(s). Run `sm scan` to repopulate.",activeProviderSwitchedNoDb:"Lens switched. Run `sm scan` to populate the map under the new lens."},changelogHeading:"Changelog",changelogIntro:"What's new in skill-map. Each entry covers a release of @skill-map/cli (the CLI + bundled UI) and lists the user-facing changes plus the workspace(s) each one affects.",changelogEmpty:"No release notes yet. Future releases will populate this list automatically from the changesets shipped in each PR.",changelogInternalRelease:"Internal release. Focus on stability, infra, and refactors. No user-facing changes this time.",changelogAffectedPackages:"Affected packages",changelogFooterText:"Want the full changelog?",changelogFooterLinkLabel:"See it on GitHub \u2192",changelogFooterUrl:"https://github.com/crystian/skill-map/blob/main/src/CHANGELOG.md",aboutHeading:"About",aboutIntro:"Version information for the running CLI / server.",aboutCliLabel:"skill-map CLI",aboutSpecLabel:"Spec version",aboutSchemaLabel:"Schema version",aboutFolderLabel:"Project folder",aboutDbLabel:"Project DB",aboutDbValue:(t,e)=>t==="present"?e:`${t} \xB7 ${e}`,aboutLoading:"Loading\u2026",aboutUnknown:"-",aboutErrorPrefix:"Could not read health endpoint:",aboutLinksHeading:"Links",aboutWebsiteLabel:"Website",aboutGithubLabel:"GitHub",aboutWebsiteUrl:"https://skill-map.dev/",aboutGithubUrl:"https://github.com/crystian/skill-map",aboutStarHeading:"Enjoying skill-map?",aboutStarBody:"If it's useful to you, drop us a star on GitHub, it helps a lot and keeps the project alive.",aboutStarCta:"Star on GitHub",aboutStarA11y:"Open the skill-map repository on GitHub to give it a star",pluginsHeading:"Plugins",pluginsIntro:"Enable or disable installed plugins.",pluginsSearchPlaceholder:"Filter by name\u2026",pluginsSearchA11y:"Filter plugins by name",pluginsSearchEmpty:t=>`No plugins match "${t}".`,pluginsKindFilterAll:"All",pluginsKindFilterA11y:"Filter plugins by kind",pluginsKindFilterOptionA11y:(t,e)=>e?`Show only ${t} extensions`:"Show all kinds",unsavedChangesMessage:t=>t===1?'1 unsaved change. Click "Apply" to persist it.':`${t} unsaved changes. Click "Apply" to persist them.`,startsAsDisabledRowHint:"This plugin started disabled and is not loaded in memory. Restart `sm serve` for the change to take effect.",startsAsDisabledFooterHint:"Some plugins were disabled when the server started. Consider restarting `sm serve` so they take effect.",discardChanges:"Discard",applyAndClose:"Apply",discardA11y:"Discard pending plugin changes",applyA11y:"Apply pending plugin changes and refresh the map",confirmCloseTitle:"Apply pending changes?",confirmCloseBody:t=>t===1?"You have 1 unsaved change.":`You have ${t} unsaved changes.`,keepEditing:"Keep editing",sourceBuiltIn:"Built-in",sourceProject:"Project",enabledLabel:"Enabled",disabledLabel:"Disabled",lockedLabel:"Locked",lockedTooltip:"Locked by the host (cannot be toggled).",expandLabel:"Show extensions",collapseLabel:"Hide extensions",statusFailure:{"incompatible-spec":"Incompatible spec version","invalid-manifest":"Invalid manifest","load-error":"Failed to load","id-collision":"Plugin id collision"},loading:"Loading plugins\u2026",empty:"No plugins installed.",errorPrefix:"Could not load plugins:",toggleErrorPrefix:"Toggle failed:",a11y:{triggerLabel:"Open settings",pluginToggle:(t,e)=>e?`Enable plugin ${t}`:`Disable plugin ${t}`,extensionToggle:(t,e)=>e?`Enable ${t}`:`Disable ${t}`,pluginRow:t=>`Plugin ${t} row`,extensionRow:t=>`Extension ${t} row`}};var b={available:"Update available",copiedLabel:"Copied!",tooltip:t=>`v${t} is available. Click to copy the install command.`,copyCommand:"npm i -g @skill-map/cli@latest",copiedTooltip:"Copied! Paste it in your terminal.",npmLinkUrl:"https://www.npmjs.com/package/@skill-map/cli",npmLinkTooltip:"Open on npm",npmLinkA11y:"Open the @skill-map/cli package page on npm",a11yLabel:t=>`Update available: version ${t}, click to copy the install command`,versionLabel:t=>`v${t}`,versionTooltip:t=>`skill-map CLI v${t}`,versionA11yLabel:t=>`Running version ${t}`,fetchFailed:t=>`UpdateCheckService: fetch failed (${t})`};var v=class t{dataSource=i(c);status=r(null);isOutdated=n(()=>this.status()?.isOutdated===!0);latest=n(()=>this.status()?.latest??null);current=n(()=>this.status()?.current??null);async load(){try{let e=await this.dataSource.getUpdateStatus();this.status.set(e)}catch(e){let a=e instanceof Error?e.message:String(e);console.warn(b.fetchFailed(a))}}static \u0275fac=function(a){return new(a||t)};static \u0275prov=o({token:t,factory:t.\u0275fac,providedIn:"root"})};var k={scanFailed:t=>`scan-trigger failed: ${t}`};var S=class t{dataSource=i(c);loader=i(f);scanning=r(!1);scanError=r(null);async run(){if(!this.scanning()){this.scanning.set(!0),this.scanError.set(null);try{await this.dataSource.runScan(),await this.loader.load()}catch(e){let a=e instanceof m||e instanceof Error?e.message:String(e);this.scanError.set(a),console.warn(k.scanFailed(a))}finally{this.scanning.set(!1)}}}static \u0275fac=function(a){return new(a||t)};static \u0275prov=o({token:t,factory:t.\u0275fac,providedIn:"root"})};var P="skill-map.ui.theme",p="skill-map.ui.extra-theme",A="app-dark",C="dark",L="app-matrix",T="(prefers-color-scheme: dark)",D="favicon.svg",I="favicon-matrix.svg",w='link[rel="icon"][type="image/svg+xml"]',R="https://fonts.googleapis.com/css2?family=JetBrains+Mono&display=swap",E="sm-matrix-font",x=class t{doc=i(g);destroyRef=i(h);mode=r(this.readInitialMode());extraTheme=r(this.readInitialExtra());systemPrefersDark=r(this.readSystemPref());resolved=n(()=>{let e=this.mode();return e==="auto"?this.systemPrefersDark()?"dark":"light":e});constructor(){this.subscribeToSystemPref(),u(()=>{let e=this.extraTheme(),s=this.resolved()==="dark"||e==="matrix",l=this.doc.documentElement;l.classList.toggle(A,s),l.classList.toggle(C,s),l.classList.toggle(L,e==="matrix"),this.applyFavicon(e==="matrix"?I:D),e==="matrix"&&this.ensureMatrixFont();try{let d=this.doc.defaultView?.localStorage;d?.setItem(P,this.mode()),e===null?d?.removeItem(p):d?.setItem(p,e)}catch{}})}toggle(){this.extraTheme()!==null&&this.extraTheme.set(null),this.mode.update(e=>e==="auto"?"light":e==="light"?"dark":"auto")}set(e){this.mode.set(e)}setExtraTheme(e){this.extraTheme.set(e)}readInitialMode(){try{let e=this.doc.defaultView?.localStorage.getItem(P);if(e==="auto"||e==="light"||e==="dark")return e}catch{}return"auto"}readInitialExtra(){try{let e=this.doc.defaultView?.localStorage.getItem(p);if(e==="matrix")return e}catch{}return null}readSystemPref(){try{return this.doc.defaultView?.matchMedia(T).matches??!1}catch{return!1}}ensureMatrixFont(){if(this.doc.getElementById(E))return;let e=this.doc.head;if(!e)return;let a=this.doc.createElement("link");a.id=E,a.rel="stylesheet",a.href=R,e.appendChild(a)}applyFavicon(e){let a=this.doc.querySelector(w);a&&a.getAttribute("href")!==e&&a.setAttribute("href",e)}subscribeToSystemPref(){let e=this.doc.defaultView;if(!e||typeof e.matchMedia!="function")return;let a=e.matchMedia(T),s=l=>{this.systemPrefersDark.set(l.matches)};a.addEventListener("change",s),this.destroyRef.onDestroy(()=>a.removeEventListener("change",s))}static \u0275fac=function(a){return new(a||t)};static \u0275prov=o({token:t,factory:t.\u0275fac,providedIn:"root"})};export{b as a,v as b,F as c,S as d,x as e};