@skill-map/cli 0.43.0 → 0.45.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.
Files changed (46) hide show
  1. package/dist/cli/tutorial/sm-master/SKILL.md +7 -9
  2. package/dist/cli/tutorial/sm-master/references/fixture-templates.md +1 -1
  3. package/dist/cli/tutorial/sm-master/references/tour-plugins.md +10 -9
  4. package/dist/cli/tutorial/sm-master/references/tour-settings.md +4 -4
  5. package/dist/cli/tutorial/sm-tutorial/SKILL.md +263 -369
  6. package/dist/cli.js +945 -256
  7. package/dist/cli.js.map +1 -1
  8. package/dist/index.js +21 -15
  9. package/dist/index.js.map +1 -1
  10. package/dist/kernel/index.d.ts +43 -6
  11. package/dist/kernel/index.js +21 -15
  12. package/dist/kernel/index.js.map +1 -1
  13. package/dist/ui/chunk-27WQPOXP.js +1 -0
  14. package/dist/ui/{chunk-DZBSELHN.js → chunk-43S72FTV.js} +1 -1
  15. package/dist/ui/chunk-555ST76V.js +1 -0
  16. package/dist/ui/{chunk-JPYAASHN.js → chunk-5AD5ZV4I.js} +3 -3
  17. package/dist/ui/{chunk-CFJBTDAA.js → chunk-5ITZXW3A.js} +1 -1
  18. package/dist/ui/chunk-A7PRWMQD.js +1021 -0
  19. package/dist/ui/chunk-CBI77N5U.js +123 -0
  20. package/dist/ui/chunk-F7I6KMHX.js +1 -0
  21. package/dist/ui/{chunk-77J7XU3Y.js → chunk-I5AX4U2N.js} +28 -28
  22. package/dist/ui/chunk-IUZRAD7S.js +1 -0
  23. package/dist/ui/{chunk-XOHD5XWA.js → chunk-IYM26L3O.js} +1 -1
  24. package/dist/ui/{chunk-SBCO7ZSP.js → chunk-LGFABCIA.js} +1 -1
  25. package/dist/ui/{chunk-IUDL3NDH.js → chunk-MFLFIA7C.js} +1 -1
  26. package/dist/ui/chunk-MS6B7344.js +315 -0
  27. package/dist/ui/chunk-P3SNMV4X.js +2 -0
  28. package/dist/ui/chunk-PZQHB7GS.js +4 -0
  29. package/dist/ui/chunk-QDUSFOBE.js +1 -0
  30. package/dist/ui/{chunk-YCR3XCIW.js → chunk-QNTAOR2L.js} +5 -5
  31. package/dist/ui/{chunk-CR3AANNX.js → chunk-S4S5ZMXJ.js} +1 -1
  32. package/dist/ui/{chunk-5WJRN3LD.js → chunk-T3IVIRRJ.js} +1 -1
  33. package/dist/ui/{chunk-HP375T2O.js → chunk-VGPYYAVI.js} +1 -1
  34. package/dist/ui/chunk-X227ITGS.js +499 -0
  35. package/dist/ui/index.html +1 -1
  36. package/dist/ui/main-ERCTR2PR.js +3 -0
  37. package/package.json +10 -9
  38. package/dist/ui/chunk-2IF446BS.js +0 -1
  39. package/dist/ui/chunk-DIKPNZUZ.js +0 -315
  40. package/dist/ui/chunk-KGCJINI6.js +0 -1
  41. package/dist/ui/chunk-PPE3P2JD.js +0 -1
  42. package/dist/ui/chunk-UOCACZLI.js +0 -123
  43. package/dist/ui/chunk-YL6SWAFJ.js +0 -1024
  44. package/dist/ui/main-VHFB7Q2D.js +0 -3
  45. /package/dist/ui/{chunk-C2YUQODZ.js → chunk-4SG4352Z.js} +0 -0
  46. /package/dist/ui/{chunk-VB56BUGO.js → chunk-WCABR6TI.js} +0 -0
@@ -0,0 +1,123 @@
1
+ import{a as Nt,c as Lt,d as y,e as At}from"./chunk-IUZRAD7S.js";import{a as bt,b as vt,c as ye,d as ke,e as kt}from"./chunk-QNTAOR2L.js";import{d as Pt,f as St,g as Se}from"./chunk-F7I6KMHX.js";import{e as Et,f as Mt,g as Tt,h as Ot,l as It,m as jt,n as Dt,o as Ft,p as ge,q as pe}from"./chunk-T3IVIRRJ.js";import{a as Ee,b as Me}from"./chunk-MFLFIA7C.js";import{e as Ct,f as wt,g as yt}from"./chunk-IYM26L3O.js";import{D as we,E as se,M as W,N as H,S as xt,T as Pe,V as le,W as de,X as ce,c as ae,j as xe,k as Ce,m as ut,p as ht,v as _t,w as he,x as ft}from"./chunk-A7PRWMQD.js";import"./chunk-4SG4352Z.js";import"./chunk-VGPYYAVI.js";import{Bb as N,Bc as Ve,Cb as q,Cc as gt,Db as w,Ea as et,Fa as Z,Fb as c,Ia as o,Ib as at,Jb as st,K as We,Kb as fe,L as _e,Lb as be,M as Xe,O as Qe,Q as k,Qb as Ae,Qc as pt,Rb as G,Rc as mt,Sb as lt,Tb as ue,Ua as L,Ub as l,V as Ye,Va as tt,Vb as m,W as S,Wb as p,X as E,Xa as nt,Xb as I,Ya as it,Za as ie,aa as Je,ca as Ze,dc as re,fc as dt,gb as v,ha as u,ja as V,jb as h,kb as _,la as Le,lb as ot,mb as ee,mc as ct,nb as D,ob as F,pb as f,pc as C,qb as s,rb as a,sb as O,sc as ve,tb as b,tc as R,ub as x,vb as oe,yb as rt}from"./chunk-PZQHB7GS.js";import{a as K,b as J}from"./chunk-WCABR6TI.js";function mn(t,r){if(t&1&&(b(0,"p",6),l(1),x()),t&2){let e=c();o(),I(" ",e.texts.aboutErrorPrefix," ",e.loadError()," ")}}var Vt=(()=>{class t{dataSource=k(W);updateCheck=k(Lt);theme=k(Se);visible=R.required();texts=y;health=u(null);loadError=u(null);markSrc=C(()=>this.theme.resolved()==="dark"?"skill-map-mark-light.svg":"skill-map-mark-dark.svg");cliVersion=C(()=>this.updateCheck.current()??this.health()?.implVersion??this.texts.aboutUnknown);specVersion=C(()=>this.health()?.specVersion??this.texts.aboutLoading);schemaVersion=C(()=>this.health()?.schemaVersion??this.texts.aboutLoading);cwd=C(()=>this.health()?.cwd??this.texts.aboutLoading);dbDisplay=C(()=>{let e=this.health();return e?this.texts.aboutDbValue(e.db,un(e.dbPath,e.cwd)):this.texts.aboutLoading});constructor(){V(()=>{this.visible()&&this.health()===null&&this.load()})}async load(){this.loadError.set(null);try{let e=await this.dataSource.health();this.health.set(e)}catch(e){let i=e instanceof H||e instanceof Error?e.message:String(e);this.loadError.set(i)}}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=L({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(i,n){i&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()()(),h(8,mn,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()()()()),i&2&&(o(2),q("src",n.markSrc(),Z),o(3),p(" ",n.texts.aboutHeading," "),o(2),m(n.texts.aboutIntro),o(),_(n.loadError()?8:-1),o(),q("href",n.texts.aboutGithubUrl,Z),v("aria-label",n.texts.aboutStarA11y),o(4),m(n.texts.aboutStarHeading),o(2),m(n.texts.aboutStarBody),o(3),p(" ",n.texts.aboutStarCta," "),o(4),m(n.texts.aboutWebsiteLabel),o(2),q("href",n.texts.aboutWebsiteUrl,Z),o(),m(n.texts.aboutWebsiteUrl),o(3),m(n.texts.aboutGithubLabel),o(2),q("href",n.texts.aboutGithubUrl,Z),o(),m(n.texts.aboutGithubUrl),o(3),m(n.texts.aboutCliLabel),o(2),p(" ",n.cliVersion()," "),o(3),m(n.texts.aboutSpecLabel),o(2),p(" ",n.specVersion()," "),o(3),m(n.texts.aboutSchemaLabel),o(2),p(" ",n.schemaVersion()," "),o(3),m(n.texts.aboutFolderLabel),o(2),p(" ",n.cwd()," "),o(3),m(n.texts.aboutDbLabel),o(2),p(" ",n.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})}return t})();function un(t,r){if(!t||!r)return t;let e=r.replace(/[/\\]+$/,"");return t.startsWith(e)?t.slice(e.length).replace(/^[/\\]+/,""):t}var Te=(()=>{class t{ownerSig=u(null);dirtyCount=C(()=>{let e=this.ownerSig();return e?e.dirtyIds().size:0});register(e){this.ownerSig.set(e)}deregister(e){this.ownerSig()===e&&this.ownerSig.set(null)}async applyChanges(){let e=this.ownerSig();return e?e.applyChanges():{ok:!1}}discardChanges(){this.ownerSig()?.discardChanges()}static \u0275fac=function(i){return new(i||t)};static \u0275prov=_e({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Rt={schemaVersion:1,entries:[{version:"0.45.0",date:"2026-05-30",kind:"user-facing",highlights:[{body:"`sm tutorial` can now target other agents: `--for agent-skills` (open-standard layout, used by Antigravity and OpenAI Codex) or `--for claude` (default). It now requires an empty directory: run it in a fresh folder, or pass `--force` to seed into the current one.",packages:["@skill-map/cli","@skill-map/spec"]}]},{version:"0.44.0",date:"2026-05-30",kind:"user-facing",highlights:[{body:"Under the Antigravity lens, `sm scan` now warns when a `.agents/skills` skill shadows a built-in `agy` slash command (e.g. a skill named `goal` collides with `/goal`), so you can rename it before the runtime silently ignores the file.",packages:["@skill-map/cli","@skill-map/spec"]},{body:"skill-map can now report crashes anonymously to help fix bugs, and it is OFF by default. Turn it on or off in Settings, or set `SKILL_MAP_TELEMETRY=0` to force it off. File contents, paths, and your settings are never sent.",packages:["@skill-map/cli","@skill-map/spec"]},{body:"skill-map can now share anonymous usage (which commands and views you use) to guide development, OFF by default. Toggle CLI usage, UI usage, and error reports independently in Settings, or set `SKILL_MAP_TELEMETRY=0` to force all off. Files and paths are never sent.",packages:["@skill-map/cli","@skill-map/spec"]}]},{version:"0.43.0",date:"2026-05-29",kind:"user-facing",highlights:[{body:"The skill-map website and in-app links (Settings, About and the demo banner) now point to **skill-map.ai** (previously skill-map.dev). Spec schema URLs are now `https://skill-map.ai/spec/v0/...`.",packages:["@skill-map/cli","@skill-map/spec","@skill-map/web"]},{body:"Claude skills and commands now show their `disallowed-tools` in the inspector. Tags come only from `.sm` sidecars now: the `sm list --tag-source` flag is removed and cards show a single tag style. Agent Skills `license` / `compatibility` / `metadata` fields are recognized.",packages:["@skill-map/cli","@skill-map/spec"]},{body:"After updating skill-map, the next `sm scan` rebuilds the local database when it was created by an older version (your `.sm` sidecar files are never touched). On a terminal it asks first; pass `--yes` to skip the prompt.",packages:["@skill-map/cli","@skill-map/spec"]}]},{version:"0.42.0",date:"2026-05-28",kind:"user-facing",highlights:[{body:"The lens picker in **Settings \u2192 Project** now lists exactly the providers installed in your project. The phantom **Gemini** and **Cursor** options are gone, and **OpenAI Codex** / **Antigravity** now show their correct name and colour on node cards.",packages:["@skill-map/cli","@skill-map/spec"]}]},{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 zt=Rt;var _n=(t,r)=>r.version;function fn(t,r){if(t&1&&(b(0,"p",3),l(1),x()),t&2){let e=c();o(),p(" ",e.texts.changelogEmpty," ")}}function bn(t,r){if(t&1&&(b(0,"p",12),l(1),x()),t&2){let e=c(3);o(),p(" ",e.texts.changelogInternalRelease," ")}}function vn(t,r){if(t&1&&(b(0,"li",17),l(1),x()),t&2){let e=r.$implicit;o(),m(e)}}function xn(t,r){if(t&1&&(b(0,"ul",16),D(1,vn,2,1,"li",17,ee),x()),t&2){let e=c().$implicit,i=c(4);v("aria-label",i.texts.changelogAffectedPackages),o(),F(e.packages)}}function Cn(t,r){if(t&1&&(b(0,"li",14),oe(1,"div",15),h(2,xn,3,1,"ul",16),x()),t&2){let e=r.$implicit;o(),q("innerHTML",e.bodyHtml,et),o(),_(e.packages.length?2:-1)}}function wn(t,r){if(t&1&&(b(0,"ul",13),D(1,Cn,3,2,"li",14,ot),x()),t&2){let e=c().$implicit;o(),F(e.highlights)}}function yn(t,r){if(t&1&&(b(0,"li",8)(1,"header",9)(2,"span",10),l(3),x(),b(4,"span",11),l(5),x()(),h(6,bn,2,1,"p",12)(7,wn,3,0,"ul",13),x()),t&2){let e=r.$implicit;G("settings-changelog__entry--internal",e.kind==="internal"),v("data-testid","settings-changelog-entry-"+e.version),o(3),p("v",e.version),o(2),m(e.date),o(),_(e.kind==="internal"?6:7)}}function kn(t,r){if(t&1&&(b(0,"ol",4),D(1,yn,8,6,"li",7,_n),x()),t&2){let e=c();o(),F(e.entries())}}var Pn=10,Bt=(()=>{class t{markdown=k(kt);texts=y;entries=u([]);hasEntries=C(()=>this.entries().length>0);ngOnInit(){this.renderAll()}async renderAll(){let e=[],i=zt.entries.slice(0,Pn);for(let n of i){let d=[];for(let g of n.highlights)d.push({bodyHtml:await this.markdown.render(g.body),packages:g.packages});e.push({version:n.version,date:this.formatDate(n.date),kind:n.kind,highlights:d})}this.entries.set(e)}formatDate(e){let i=new Date(e+"T00:00:00Z");return Number.isNaN(i.getTime())?e:new Intl.DateTimeFormat("en-GB",{day:"numeric",month:"long",year:"numeric",timeZone:"UTC"}).format(i)}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=L({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(i,n){i&1&&(b(0,"section",0)(1,"h2",1),l(2),x(),b(3,"p",2),l(4),x(),h(5,fn,2,1,"p",3)(6,kn,3,0,"ol",4),b(7,"p",5),l(8),b(9,"a",6),l(10),x()()()),i&2&&(v("aria-labelledby","settings-changelog-heading"),o(2),p(" ",n.texts.changelogHeading," "),o(2),m(n.texts.changelogIntro),o(),_(n.hasEntries()?6:5),o(3),p(" ",n.texts.changelogFooterText," "),o(),q("href",n.texts.changelogFooterUrl,Z),o(),p(" ",n.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})}return t})();var $t=`
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 Sn=["handle"],En=["input"],Mn=t=>({checked:t});function Tn(t,r){t&1&&rt(0)}function On(t,r){if(t&1&&ie(0,Tn,1,0,"ng-container",3),t&2){let e=c();f("ngTemplateOutlet",e.handleTemplate||e._handleTemplate)("ngTemplateOutletContext",dt(2,Mn,e.checked()))}}var In=`
116
+ ${$t}
117
+
118
+ p-toggleswitch.ng-invalid.ng-dirty > .p-toggleswitch-slider {
119
+ border-color: dt('toggleswitch.invalid.border.color');
120
+ }
121
+ `,jn={root:{position:"relative"}},Dn={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"},Gt=(()=>{class t extends ut{name="toggleswitch";style=In;classes=Dn;inlineStyles=jn;static \u0275fac=(()=>{let e;return function(n){return(e||(e=Le(t)))(n||t)}})();static \u0275prov=_e({token:t,factory:t.\u0275fac})}return t})();var Ht=new Qe("TOGGLESWITCH_INSTANCE"),Fn={provide:xt,useExisting:We(()=>me),multi:!0},me=(()=>{class t extends Ct{componentName="ToggleSwitch";$pcToggleSwitch=k(Ht,{optional:!0,skipSelf:!0})??void 0;bindDirectiveInstance=k(he,{self:!0});onAfterViewChecked(){this.bindDirectiveInstance.setAttrs(this.ptms(["host","root"]))}styleClass;tabindex;inputId;readonly;trueValue=!0;falseValue=!1;ariaLabel;size=R();ariaLabelledBy;autofocus;onChange=new Ze;input;handleTemplate;_handleTemplate;focused=!1;_componentStyle=k(Gt);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(n){return(e||(e=Le(t)))(n||t)}})();static \u0275cmp=L({type:t,selectors:[["p-toggleswitch"],["p-toggleSwitch"],["p-toggle-switch"]],contentQueries:function(i,n,d){if(i&1&&at(d,Sn,4)(d,xe,4),i&2){let g;fe(g=be())&&(n.handleTemplate=g.first),fe(g=be())&&(n.templates=g)}},viewQuery:function(i,n){if(i&1&&st(En,5),i&2){let d;fe(d=be())&&(n.input=d.first)}},hostVars:7,hostBindings:function(i,n){i&1&&w("click",function(g){return n.onHostClick(g)}),i&2&&(v("data-p-checked",n.checked())("data-p-disabled",n.$disabled())("data-p",n.dataP),lt(n.sx("root")),ue(n.cn(n.cx("root"),n.styleClass)))},inputs:{styleClass:"styleClass",tabindex:[2,"tabindex","tabindex",gt],inputId:"inputId",readonly:[2,"readonly","readonly",Ve],trueValue:"trueValue",falseValue:"falseValue",ariaLabel:"ariaLabel",size:[1,"size"],ariaLabelledBy:"ariaLabelledBy",autofocus:[2,"autofocus","autofocus",Ve]},outputs:{onChange:"onChange"},features:[re([Fn,Gt,{provide:Ht,useExisting:t},{provide:ht,useExisting:t}]),nt([he]),it],decls:5,vars:22,consts:[["input",""],["type","checkbox","role","switch",3,"focus","blur","checked","pAutoFocus","pBind"],[3,"pBind"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(i,n){i&1&&(s(0,"input",1,0),w("focus",function(){return n.onFocus()})("blur",function(){return n.onBlur()}),a(),s(2,"div",2)(3,"div",2),h(4,On,1,4,"ng-container"),a()()),i&2&&(ue(n.cx("input")),f("checked",n.checked())("pAutoFocus",n.autofocus)("pBind",n.ptm("input")),v("id",n.inputId)("required",n.required()?"":void 0)("disabled",n.$disabled()?"":void 0)("aria-checked",n.checked())("aria-labelledby",n.ariaLabelledBy)("aria-label",n.ariaLabel)("name",n.name())("tabindex",n.tabindex),o(2),ue(n.cx("slider")),f("pBind",n.ptm("slider")),v("data-p",n.dataP),o(),ue(n.cx("handle")),f("pBind",n.ptm("handle")),v("data-p",n.dataP),o(),_(n.handleTemplate||n._handleTemplate?4:-1))},dependencies:[mt,pt,_t,Ce,ft,he],encapsulation:2,changeDetection:0})}return t})(),Oe=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=tt({type:t});static \u0275inj=Xe({imports:[me,Ce,Ce]})}return t})();var Nn=(t,r)=>r.key;function Ln(t,r){if(t&1&&(s(0,"p-message",3),l(1),a()),t&2){let e=c();f("closable",!1),o(),I(" ",e.texts.general.loadErrorPrefix," ",r," ")}}function An(t,r){if(t&1&&(s(0,"p-message",4),l(1),a()),t&2){let e=c();f("closable",!1),o(),I(" ",e.texts.general.saveErrorPrefix," ",r," ")}}function Vn(t,r){t&1&&(s(0,"div",15),l(1),a()),t&2&&(o(),m(r))}function Rn(t,r){if(t&1){let e=N();s(0,"li",6)(1,"div",8)(2,"div",9),l(3),a(),s(4,"div",10),l(5),a(),h(6,Vn,2,1,"div",15),a(),s(7,"p-toggleswitch",16),w("ngModelChange",function(n){let d=S(e).$implicit,g=c();return E(g.onToggle(d,n))}),a()()}if(t&2){let e,i=r.$implicit,n=c();v("data-testid","settings-general-row-"+i.key),o(3),m(n.toggleLabel(i.key)),o(2),p(" ",n.toggleDescription(i.key)," "),o(),_((e=n.toggleHint(i.key))?6:-1,e),o(),f("ngModel",n.valueOf(i))("disabled",n.loading()||n.isPending(i.key)||n.preferences()===null),v("data-testid","settings-general-toggle-"+i.key)}}function zn(t,r){if(t&1&&(s(0,"span",17),l(1),a()),t&2){let e=r.$implicit;o(),p(" ",e.label," ")}}var Bn=[{key:"updateCheck.enabled",read:t=>t.updateCheck.enabled,patch:t=>({updateCheck:{enabled:t}})},{key:"telemetry",read:t=>t.telemetry.errorsEnabled&&t.telemetry.usageCliEnabled&&t.telemetry.usageUiEnabled,patch:t=>({telemetry:{errorsEnabled:t,usageCliEnabled:t,usageUiEnabled:t}})}],Ie="none";function $n(t){return t===null?Ie:t}function Gn(t){return t===Ie?null:t}var Xt=(()=>{class t{dataSource=k(W);themeService=k(Se);visible=R.required();texts=y;toggles=Bn;extraThemeOptions=[{value:Ie,label:y.general.extraTheme.options.none.label,description:y.general.extraTheme.options.none.description},...St.map(e=>({value:e.id,label:e.label,description:e.description}))];extraThemeWire=C(()=>$n(this.themeService.extraTheme()));loading=u(!1);loadError=u(null);saveError=u(null);preferences=u(null);pending=u(new Set);constructor(){V(()=>{this.visible()&&this.refresh()})}toggleLabel(e){return y.general.toggles[e].label}toggleDescription(e){return y.general.toggles[e].description}toggleHint(e){let i=y.general.toggles[e];return"hint"in i?i.hint:null}valueOf(e){let i=this.preferences();return i?e.read(i):!1}isPending(e){return this.pending().has(e)}onToggle(e,i){this.runToggle(e,i)}onExtraThemeChange(e){this.themeService.setExtraTheme(Gn(e??Ie))}async refresh(){this.loading.set(!0),this.loadError.set(null),this.saveError.set(null);try{let e=await this.dataSource.getPreferences();this.preferences.set(e)}catch(e){this.loadError.set(Kt(e)),this.preferences.set(null)}finally{this.loading.set(!1)}}async runToggle(e,i){if(this.pending().has(e.key))return;let n=new Set(this.pending());n.add(e.key),this.pending.set(n),this.saveError.set(null);try{let d=await this.dataSource.setPreferences(e.patch(i));this.preferences.set(d)}catch(d){this.saveError.set(Kt(d))}finally{let d=new Set(this.pending());d.delete(e.key),this.pending.set(d)}}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=L({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","label","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"],[1,"settings-general__row-hint"],[3,"ngModelChange","ngModel","disabled"],["data-testid","settings-general-extra-theme-option"]],template:function(i,n){if(i&1&&(s(0,"section",0)(1,"h2",1),l(2),a(),s(3,"p",2),l(4),a(),h(5,Ln,2,3,"p-message",3),h(6,An,2,3,"p-message",4),s(7,"ul",5),D(8,Rn,8,7,"li",6,Nn),s(10,"li",7)(11,"div",8)(12,"div",9),l(13),a(),s(14,"div",10),l(15),a()(),s(16,"p-selectbutton",11),w("ngModelChange",function(g){return n.onExtraThemeChange(g)}),ie(17,zn,2,1,"ng-template",12),a()()(),s(18,"p",13),l(19),s(20,"code",14),l(21),a()()()),i&2){let d,g;v("aria-labelledby","settings-general-heading"),o(2),p(" ",n.texts.general.heading," "),o(2),m(n.texts.general.intro),o(),_((d=n.loadError())?5:-1,d),o(),_((g=n.saveError())?6:-1,g),o(2),F(n.toggles),o(5),p(" ",n.texts.general.extraTheme.label," "),o(2),p(" ",n.texts.general.extraTheme.description," "),o(),f("options",n.extraThemeOptions)("ngModel",n.extraThemeWire())("allowEmpty",!1),o(3),p(" ",n.texts.general.storageHintLabel," "),o(2),m(n.texts.general.storageHintPath)}},dependencies:[ce,le,de,pe,ge,xe,Ft,Dt,Oe,me],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[_ngcontent-%COMP%] p-toggleswitch[_ngcontent-%COMP%]{flex-shrink: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__row-hint[_ngcontent-%COMP%]{margin-top:.2rem;font-size:.75rem;font-style:italic;color:var(--sm-text-muted)}.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})}return t})();function Kt(t){return t instanceof H||t instanceof Error?t.message:String(t)}var Re={provider:"#7C3AED",extractor:"#A78BFA",analyzer:"#5FD17C",action:"#00C853",formatter:"#5BC0EB",hook:"#FFB627"};function Qt(t){let r=t.toLowerCase();return Re[r]??"currentColor"}var De=["all",...Object.keys(Re)],je=["core","claude","antigravity","openai","agent-skills"];function X(t,r){return`${t}/${r}`}function ze(t){let r=new Map;for(let e of t)if(!Fe(e.status)&&e.extensions)for(let i of e.extensions)r.set(X(e.id,i.id),i.enabled);return r}function Be(t){let r=t.target;return!r||typeof r.closest!="function"?!1:r.closest('label, button, input, [role="switch"], p-toggleswitch')!==null}function Yt(t,r){if(Hn(t,r))return[t];if(!t.extensions)return[];let e=t.extensions.filter(i=>Un(i,r));return e.length===0?[]:[J(K({},t),{extensions:e})]}function Jt(t,r){if(!t.extensions)return[];let e=t.extensions.filter(i=>i.kind.toLowerCase()===r);return e.length===0?[]:[J(K({},t),{extensions:e})]}function Zt(t){if(t.locked)return[];if(!t.extensions)return[t];let r=t.extensions.filter(e=>!e.locked);return r.length===0?[]:[J(K({},t),{extensions:r})]}function en(t){return t.slice().sort((e,i)=>{let n=je.indexOf(e.id),d=je.indexOf(i.id),g=n>=0?n:je.length,P=d>=0?d:je.length;return g!==P?g-P:e.id.localeCompare(i.id)}).map(e=>{if(!e.extensions)return e;let i=e.extensions.slice().sort((n,d)=>n.id.localeCompare(d.id));return J(K({},e),{extensions:i})})}function Hn(t,r){return!!(t.id.toLowerCase().includes(r)||t.description&&t.description.toLowerCase().includes(r))}function Un(t,r){return!!(t.id.toLowerCase().includes(r)||t.description&&t.description.toLowerCase().includes(r))}function Fe(t){return t==="incompatible-spec"||t==="invalid-manifest"||t==="load-error"||t==="id-collision"}function $e(t){return t instanceof H||t instanceof Error?t.message:String(t)}function tn(t,r){return Fe(t.status)?r.statusFailure[t.status]??t.status:t.status==="enabled"?r.enabledLabel:r.disabledLabel}function nn(t,r){switch(t){case"built-in":return r.sourceBuiltIn;case"project":return r.sourceProject}}var Ge="sm.settings.plugins.collapsed",He="sm.settings.plugins.kind-filter";function on(){let t=null;try{t=localStorage.getItem(Ge)}catch{return new Set}if(!t)return new Set;let r;try{r=JSON.parse(t)}catch{return new Set}if(!Array.isArray(r))return new Set;let e=new Set;for(let i of r)typeof i=="string"&&i.length>0&&e.add(i);return e}function rn(t){try{if(t.size===0){localStorage.removeItem(Ge);return}localStorage.setItem(Ge,JSON.stringify([...t]))}catch{}}function an(){let t=null;try{t=localStorage.getItem(He)}catch{return"all"}return t&&De.includes(t)?t:"all"}function sn(t){try{if(t==="all"){localStorage.removeItem(He);return}localStorage.setItem(He,t)}catch{}}function Ue(){Ye(Ue);let t=u(on());V(()=>rn(t()));let r=i=>{let n=new Set(t());n.has(i)?n.delete(i):n.add(i),t.set(n)},e=i=>!t().has(i);return{collapsed:t.asReadonly(),toggleExpanded:r,isExpanded:e}}function ln(t){let r=u(""),e=C(()=>r().trim().length>0),i=u(an()),n=C(()=>i()!=="all");V(()=>sn(i()));let d=C(()=>en(t.plugins().flatMap(Zt))),g=C(()=>{let z=r().trim().toLowerCase(),Q=i(),B=d();return Q!=="all"&&(B=B.flatMap(Y=>Jt(Y,Q))),z.length>0&&(B=B.flatMap(Y=>Yt(Y,z))),B});return{searchText:r,searchActive:e,kindFilter:i,setKindFilter:z=>{i.set(z)},isKindFilterActive:z=>i()===z,kindFilterActive:n,kindFilterOptions:De,visiblePlugins:d,filteredPlugins:g}}var Kn=new Set(["claude","antigravity","openai","agent-skills","core"]),qn="external_plugin";function Wn(t){let r=t.indexOf("/"),e=r>0?t.slice(0,r):t;return Kn.has(e)?t:qn}function Ke(t){let r=new Set;for(let e of t)r.add(Wn(e));return[...r].sort()}function dn(t){let r=u(!1),e=u(null),i=u(null),n=u([]),d=u(new Map),g=u(new Map),P=u(!1),A=C(()=>{let T=d(),j=g(),U=new Set;for(let[$,M]of j)T.get($)!==M&&U.add($);return U}),z=C(()=>A().size>0),Q=C(()=>n().some(T=>Fe(T.status))),B=C(()=>{let T=g();for(let j of n()){if(j.startsAsDisabled!==!0)continue;let U=j.extensions??[];for(let $ of U)if(T.get(X(j.id,$.id))===!0)return!0}return!1});return{plugins:n,loading:r,loadError:e,toggleError:i,applying:P,hasFailureRows:Q,originalState:d,pendingState:g,dirtyIds:A,hasPendingChanges:z,restartRecommended:B,pendingEnabled:T=>g().get(T)??!1,isDirty:T=>A().has(T),refresh:async()=>{r.set(!0),e.set(null),i.set(null);try{let T=await t.dataSource.listPlugins();n.set([...T.items]);let j=ze(T.items);d.set(j),g.set(new Map(j))}catch(T){e.set($e(T)),n.set([]),d.set(new Map),g.set(new Map)}finally{r.set(!1)}},onExtensionToggle:(T,j,U)=>{if(P())return;let $=X(T,j.id),M=new Map(g());M.set($,U),g.set(M)},applyChanges:async()=>{if(P())return{ok:!1};let T=A();if(T.size===0)return{ok:!1};let j=[],U=g();for(let M of T)j.push({id:M,enabled:U.get(M)??!1});P.set(!0),i.set(null);let $=!1;try{let M=await t.dataSource.applyPluginChanges(j);n.set([...M.items]);let qe=ze(M.items);d.set(qe),g.set(new Map(qe)),t.scanTrigger.run(),$=!0}catch(M){i.set($e(M))}finally{P.set(!1)}return $&&Pt("plugin.apply",{enabled:Ke(j.filter(M=>M.enabled).map(M=>M.id)),disabled:Ke(j.filter(M=>!M.enabled).map(M=>M.id))}),{ok:$}},discardChanges:()=>{g.set(new Map(d())),i.set(null)}}}var cn=(t,r)=>r.id;function Yn(t,r){if(t&1&&l(0),t&2){let e=c().$implicit,i=c();p(" ",e==="all"?i.texts.pluginsKindFilterAll:e," ")}}function Jn(t,r){if(t&1){let e=N();s(0,"p-togglebutton",16),w("ngModelChange",function(){let n=S(e).$implicit,d=c();return E(d.setKindFilter(n))}),ie(1,Yn,1,1,"ng-template",null,0,ct),a()}if(t&2){let e=r.$implicit,i=c();Ae("--kind-color",e==="all"?null:i.kindTint(e)),f("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 Zn(t,r){if(t&1&&(s(0,"p-message",11),l(1),a()),t&2){let e=c();f("closable",!1),o(),p(" ",e.texts.unsavedChangesMessage(e.dirtyIds().size)," ")}}function ei(t,r){if(t&1&&(s(0,"p",12),O(1,"i",17),l(2),a()),t&2){let e=c();o(2),p(" ",e.texts.loading," ")}}function ti(t,r){if(t&1&&(s(0,"p-message",13),l(1),a()),t&2){let e=c();f("closable",!1),o(),I(" ",e.texts.errorPrefix," ",e.loadError()," ")}}function ni(t,r){if(t&1&&(s(0,"p",14),l(1),a()),t&2){let e=c();o(),p(" ",e.texts.empty," ")}}function ii(t,r){if(t&1){let e=N();s(0,"p-message",22),w("onClose",function(){S(e);let n=c(2);return E(n.toggleError.set(null))}),l(1),a()}if(t&2){let e=c(2);f("closable",!0),o(),I(" ",e.texts.toggleErrorPrefix," ",e.toggleError()," ")}}function oi(t,r){if(t&1&&(s(0,"p",19),O(1,"i",23),l(2),a()),t&2){let e=c(2);o(2),p(" ",e.texts.pluginsSearchEmpty(e.searchText())," ")}}function ri(t,r){if(t&1){let e=N();s(0,"button",38),w("click",function(n){S(e);let d=c().$implicit;return c(2).toggleExpanded(d.id),E(n.stopPropagation())}),O(1,"i",39),a()}if(t&2){let e=c().$implicit,i=c(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(),G("fa-chevron-down",i.isExpanded(e.id))("fa-chevron-right",!i.isExpanded(e.id))}}function ai(t,r){t&1&&O(0,"span",27)}function si(t,r){if(t&1&&(s(0,"span",32),l(1),a()),t&2){let e=c().$implicit;o(),p("v",e.version)}}function li(t,r){if(t&1&&(s(0,"span",33),O(1,"i",40),l(2),a()),t&2){let e=c().$implicit,i=c(2);f("title",i.texts.lockedTooltip),v("data-testid","settings-row-locked-"+e.id),o(2),p(" ",i.texts.lockedLabel," ")}}function di(t,r){if(t&1&&(s(0,"p",34),l(1),a()),t&2){let e=c().$implicit;o(),m(e.description)}}function ci(t,r){if(t&1&&(s(0,"span",35),l(1),a()),t&2){let e=c().$implicit;o(),m(e.reason)}}function gi(t,r){if(t&1&&(s(0,"p",36),O(1,"i",41),l(2),a()),t&2){let e=c().$implicit,i=c(2);v("data-testid","settings-row-starts-disabled-"+e.id),o(2),p(" ",i.texts.startsAsDisabledRowHint," ")}}function pi(t,r){if(t&1&&(s(0,"span",49),l(1),a()),t&2){let e=c().$implicit;o(),p("v",e.version)}}function mi(t,r){if(t&1&&(s(0,"span",33),O(1,"i",40),l(2),a()),t&2){let e=c().$implicit,i=c(2).$implicit,n=c(2);f("title",n.texts.lockedTooltip),v("data-testid","settings-extrow-locked-"+i.id+"-"+e.id),o(2),p(" ",n.texts.lockedLabel," ")}}function ui(t,r){if(t&1&&(s(0,"p",50),l(1),a()),t&2){let e=c().$implicit;o(),m(e.description)}}function hi(t,r){if(t&1){let e=N();s(0,"li",43),w("click",function(n){let d=S(e).$implicit,g=c(2).$implicit,P=c(2);return E(P.onSubrowClick(g.id,d,n))})("keydown.enter",function(n){let d=S(e).$implicit,g=c(2).$implicit,P=c(2);return E(P.onSubrowClick(g.id,d,n))})("keydown.space",function(n){let d=S(e).$implicit,g=c(2).$implicit,P=c(2);return n.preventDefault(),E(P.onSubrowClick(g.id,d,n))}),s(1,"div",44)(2,"div",45),O(3,"span",46),s(4,"span",47),l(5),a(),s(6,"span",48),l(7),a(),h(8,pi,2,1,"span",49),h(9,mi,3,3,"span",33),a(),h(10,ui,2,1,"p",50),a(),s(11,"p-toggleswitch",51),w("ngModelChange",function(n){let d=S(e).$implicit,g=c(2).$implicit,P=c(2);return E(P.onExtensionToggle(g.id,d,n))}),a()()}if(t&2){let e=r.$implicit,i=c(2).$implicit,n=c(2);G("is-clickable",n.extensionToggleInteractive(e))("is-dirty",n.isDirty(n.qualifiedExt(i.id,e.id))),v("aria-label",n.texts.a11y.extensionRow(n.qualifiedExt(i.id,e.id)))("data-testid","settings-extrow-"+i.id+"-"+e.id),o(3),G("settings-plugins__dirty-dot--visible",n.isDirty(n.qualifiedExt(i.id,e.id))),v("data-testid","settings-extrow-dirty-"+i.id+"-"+e.id),o(2),m(e.id),o(),Ae("--kind-color",n.kindTint(e.kind)),o(),m(e.kind),o(),_(i.source==="project"?8:-1),o(),_(e.locked?9:-1),o(),_(e.description?10:-1),o(),f("ngModel",n.pendingEnabled(n.qualifiedExt(i.id,e.id)))("disabled",n.applying()||!!e.locked)("ariaLabel",n.texts.a11y.extensionToggle(n.qualifiedExt(i.id,e.id),!n.pendingEnabled(n.qualifiedExt(i.id,e.id)))),v("data-testid","settings-ext-toggle-"+i.id+"-"+e.id)}}function _i(t,r){if(t&1&&(s(0,"ul",37),D(1,hi,12,20,"li",42,cn),a()),t&2){let e=c().$implicit;v("data-testid","settings-extensions-"+e.id),o(),F(e.extensions)}}function fi(t,r){if(t&1){let e=N();s(0,"li",24)(1,"div",25),w("click",function(n){let d=S(e).$implicit,g=c(2);return E(g.onRowClick(d,n))})("keydown.enter",function(n){let d=S(e).$implicit,g=c(2);return E(g.onRowClick(d,n))})("keydown.space",function(n){let d=S(e).$implicit,g=c(2);return n.preventDefault(),E(g.onRowClick(d,n))}),h(2,ri,2,7,"button",26)(3,ai,1,0,"span",27),s(4,"div",28)(5,"div",29)(6,"span",30),l(7),a(),s(8,"span",31),l(9),a(),h(10,si,2,1,"span",32),h(11,li,3,3,"span",33),a(),h(12,di,2,1,"p",34),h(13,ci,2,1,"span",35),h(14,gi,3,2,"p",36),a()(),h(15,_i,3,1,"ul",37),a()}if(t&2){let e=r.$implicit,i=c(2);G("is-clickable",i.rowIsClickable(e)),v("data-testid","settings-row-"+e.id),o(),v("aria-label",i.texts.a11y.pluginRow(e.id)),o(),_(i.canExpandExtensions(e)?2:3),o(5),m(e.id),o(2),m(i.sourceLabel(e.source)),o(),_(e.source==="project"&&e.version?10:-1),o(),_(e.locked?11:-1),o(),_(e.description?12:-1),o(),_(e.reason?13:-1),o(),_(i.showStartsAsDisabledHint(e)?14:-1),o(),_(i.canExpandExtensions(e)&&i.isExpanded(e.id)?15:-1)}}function bi(t,r){if(t&1&&(h(0,ii,2,3,"p-message",18),h(1,oi,3,1,"p",19),s(2,"ul",20),D(3,fi,16,13,"li",21,cn),a()),t&2){let e=c();_(e.toggleError()?0:-1),o(),_(e.searchActive()&&e.filteredPlugins().length===0?1:-1),o(2),F(e.filteredPlugins())}}function vi(t,r){if(t&1&&(s(0,"em",52),l(1),a()),t&2){let e=c(2);o(),p(" ",e.texts.startsAsDisabledFooterHint," ")}}function xi(t,r){if(t&1){let e=N();s(0,"footer",15),h(1,vi,2,1,"em",52),s(2,"p-button",53),w("onClick",function(){S(e);let n=c();return E(n.discardChanges())}),a(),s(3,"p-button",54),w("onClick",function(){S(e);let n=c();return E(n.applyChanges())}),a()()}if(t&2){let e=c();o(),_(e.restartRecommended()?1:-1),o(),f("text",!0)("label",e.texts.discardChanges)("ariaLabel",e.texts.discardA11y)("disabled",e.applying()),o(),f("label",e.texts.applyAndClose)("ariaLabel",e.texts.applyA11y)("disabled",e.applying())("loading",e.applying())}}var gn=(()=>{class t{dataSource=k(W);scanTrigger=k(At);buffer=k(Te);destroyRef=k(Je);visible=R.required();applied=ve();texts=y;pluginState=dn({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=Ue();collapsed=this.pluginCollapse.collapsed;pluginFilter=ln({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(){V(()=>{this.visible()&&this.pluginState.refresh()});let e={dirtyIds:this.pluginState.dirtyIds,applyChanges:async()=>{let i=await this.pluginState.applyChanges();return i.ok&&this.applied.emit(),i},discardChanges:()=>this.pluginState.discardChanges()};this.buffer.register(e),this.destroyRef.onDestroy(()=>this.buffer.deregister(e))}setKindFilter(e){this.pluginFilter.setKindFilter(e)}isKindFilterActive(e){return this.pluginFilter.isKindFilterActive(e)}toggleExpanded(e){this.pluginCollapse.toggleExpanded(e)}isExpanded(e){return this.pluginCollapse.isExpanded(e)}pendingEnabled(e){return this.pluginState.pendingEnabled(e)}isDirty(e){return this.pluginState.isDirty(e)}showStartsAsDisabledHint(e){return!e.startsAsDisabled||!e.extensions?!1:e.extensions.some(i=>this.pendingEnabled(X(e.id,i.id)))}onExtensionToggle(e,i,n){this.pluginState.onExtensionToggle(e,i,n)}async applyChanges(){(await this.pluginState.applyChanges()).ok&&this.applied.emit()}discardChanges(){this.pluginState.discardChanges()}canExpandExtensions(e){return(e.extensions?.length??0)>0}extensionToggleInteractive(e){return!e.locked}rowIsClickable(e){return this.canExpandExtensions(e)}onRowClick(e,i){Be(i)||this.canExpandExtensions(e)&&this.toggleExpanded(e.id)}onSubrowClick(e,i,n){if(Be(n)||!this.extensionToggleInteractive(i))return;let d=X(e,i.id);this.onExtensionToggle(e,i,!this.pendingEnabled(d))}statusLabel(e){return tn(e,this.texts)}sourceLabel(e){return nn(e,this.texts)}qualifiedExt(e,i){return X(e,i)}kindTint(e){return Qt(e)}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=L({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(i,n){i&1&&(s(0,"section",1)(1,"div",2)(2,"header",3)(3,"h2",4),l(4),a(),s(5,"p",5),l(6),a()(),s(7,"p-iconfield",6),O(8,"p-inputicon",7),s(9,"input",8),w("ngModelChange",function(g){return n.searchText.set(g)}),a()(),s(10,"div",9),D(11,Jn,3,6,"p-togglebutton",10,ee),a(),h(13,Zn,2,2,"p-message",11),h(14,ei,3,1,"p",12)(15,ti,2,3,"p-message",13)(16,ni,2,1,"p",14)(17,bi,5,2),a(),h(18,xi,4,9,"footer",15),a()),i&2&&(o(4),p(" ",n.texts.pluginsHeading," "),o(2),m(n.texts.pluginsIntro),o(3),f("placeholder",n.texts.pluginsSearchPlaceholder)("ngModel",n.searchText()),v("aria-label",n.texts.pluginsSearchA11y),o(),v("aria-label",n.texts.pluginsKindFilterA11y),o(),F(n.kindFilterOptions),o(2),_(n.hasPendingChanges()?13:-1),o(),_(n.loading()?14:n.loadError()?15:n.plugins().length===0?16:17),o(4),_(n.hasPendingChanges()?18:-1))},dependencies:[ce,Pe,le,de,se,we,Mt,Et,Ot,Tt,Me,Ee,pe,ge,yt,wt,Oe,me],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})}return t})();function wi(t,r){if(t&1&&(s(0,"p-message",4),l(1),a()),t&2){let e=c();f("closable",!1),o(),I(" ",e.texts.project.loadErrorPrefix," ",r," ")}}function yi(t,r){if(t&1&&(s(0,"p-message",5),l(1),a()),t&2){let e=c();f("closable",!1),o(),I(" ",e.texts.project.saveErrorPrefix," ",r," ")}}function ki(t,r){t&1&&(s(0,"p-message",6),l(1),a()),t&2&&(f("closable",!1),o(),p(" ",r," "))}function Pi(t,r){if(t&1&&(s(0,"span",12),l(1),a()),t&2){let e=c();o(),m(e.texts.project.activeProviderSourceAutodetect)}}function Si(t,r){if(t&1&&(s(0,"span",12),l(1),a()),t&2){let e=c();o(),m(e.texts.project.activeProviderSourceNone)}}function Ei(t,r){if(t&1&&(s(0,"span",12),l(1),a()),t&2){let e=c(),i=c();o(),I(" ",i.texts.project.activeProviderDetectedPrefix," ",e," ")}}function Mi(t,r){t&1&&h(0,Ei,2,2,"span",12),t&2&&_(r.length>0?0:-1)}function Ti(t,r){if(t&1&&(s(0,"p-message",15),l(1),a()),t&2){let e=c();f("closable",!1),o(),I(" ",e.texts.project.loadErrorPrefix," ",r," ")}}function Oi(t,r){if(t&1&&(s(0,"p-message",16),l(1),a()),t&2){let e=c();f("closable",!1),o(),I(" ",e.texts.project.saveErrorPrefix," ",r," ")}}function Ii(t,r){if(t&1){let e=N();s(0,"li",19)(1,"span",27),l(2),a(),s(3,"p-button",28),w("onClick",function(){let n=S(e).$implicit,d=c();return E(d.onReferencePathRemove(n))}),a()()}if(t&2){let e=r.$implicit,i=c();o(2),m(e),o(),f("label",i.texts.project.removePathLabel)("outlined",!0)("disabled",i.isPending("scan.referencePaths")),v("data-testid","settings-project-reference-paths-remove")}}function ji(t,r){if(t&1&&(s(0,"p-message",22),l(1),a()),t&2){let e=c();f("closable",!1),o(),I(" ",e.texts.project.loadErrorPrefix," ",r," ")}}function Di(t,r){if(t&1&&(s(0,"p-message",23),l(1),a()),t&2){let e=c();f("closable",!1),o(),I(" ",e.texts.project.saveErrorPrefix," ",r," ")}}function Fi(t,r){if(t&1){let e=N();s(0,"li",19)(1,"span",27),l(2),a(),s(3,"p-button",28),w("onClick",function(){let n=S(e).$implicit,d=c();return E(d.onIgnorePatternRemove(n))}),a()()}if(t&2){let e=r.$implicit,i=c();o(2),m(e),o(),f("label",i.texts.project.removeIgnorePatternLabel)("outlined",!0)("disabled",i.isPending("ignore.patterns")),v("data-testid","settings-project-ignore-patterns-remove")}}var Ni=/[\n\r\x00-\x1F\x7F]/,pn=(()=>{class t{dataSource=k(W);confirmation=k(ae);providerRegistry=k(Nt);visible=R.required();texts=y;loading=u(!1);loadError=u(null);saveError=u(null);preferences=u(null);pending=u(new Set);newReferencePath=u("");referencePaths=C(()=>this.preferences()?.scan.referencePaths??[]);ignoreLoadError=u(null);ignoreSaveError=u(null);ignoreEnvelope=u(null);newIgnorePattern=u("");ignorePatterns=C(()=>this.ignoreEnvelope()?.patterns??[]);activeProviderEnvelope=u(null);activeProviderLoadError=u(null);activeProviderSaveError=u(null);activeProviderSwitchAnnouncement=u(null);providerOptions=C(()=>[{id:"",label:y.project.activeProviderEmptyOption},...this.providerRegistry.providers().map(e=>({id:e.id,label:e.label}))]);activeProviderValue=C(()=>this.activeProviderEnvelope()?.activeProvider??"");activeProviderDetectedLabel=C(()=>(this.activeProviderEnvelope()?.detected??[]).join(", "));activeProviderSource=C(()=>this.activeProviderEnvelope()?.source??"none");constructor(){V(()=>{this.visible()&&(this.refresh(),this.refreshIgnore(),this.refreshActiveProvider())})}isPending(e){return this.pending().has(e)}onReferencePathAdd(){let e=this.newReferencePath().trim();if(e.length===0)return;if(e.includes(",")){this.saveError.set(this.texts.project.commaForbidden);return}let i=[...this.referencePaths(),e];this.runPatch("scan.referencePaths",{scan:{referencePaths:i}}).then(n=>{n&&this.newReferencePath.set("")})}onReferencePathRemove(e){let i=this.referencePaths().filter(n=>n!==e);this.runPatch("scan.referencePaths",{scan:{referencePaths:[...i]}})}onIgnorePatternAdd(){let e=this.newIgnorePattern().trim();if(e.length===0){this.ignoreSaveError.set(this.texts.project.ignorePatternEmpty);return}if(Ni.test(e)){this.ignoreSaveError.set(this.texts.project.ignorePatternHasControlChar);return}let i=this.ignorePatterns();if(i.includes(e)){this.ignoreSaveError.set(this.texts.project.ignorePatternDuplicate);return}let n=[...i,e];this.runIgnorePatch({patterns:n}).then(d=>{d&&this.newIgnorePattern.set("")})}onIgnorePatternRemove(e){let i=this.ignorePatterns().filter(n=>n!==e);this.runIgnorePatch({patterns:[...i]})}onActiveProviderChange(e){e===""||e===this.activeProviderValue()||this.confirmActiveProviderSwitch(e,async()=>{await this.runActiveProviderSwitch(e)})}async refresh(){this.loading.set(!0),this.loadError.set(null),this.saveError.set(null);try{let e=await this.dataSource.getProjectPreferences();this.preferences.set(e)}catch(e){this.loadError.set(ne(e)),this.preferences.set(null)}finally{this.loading.set(!1)}}async refreshIgnore(){this.ignoreLoadError.set(null),this.ignoreSaveError.set(null);try{let e=await this.dataSource.getProjectIgnore();this.ignoreEnvelope.set(e)}catch(e){this.ignoreLoadError.set(ne(e)),this.ignoreEnvelope.set(null)}}async refreshActiveProvider(){this.activeProviderLoadError.set(null),this.activeProviderSaveError.set(null);try{let e=await this.dataSource.getActiveProvider();this.activeProviderEnvelope.set(e)}catch(e){this.activeProviderLoadError.set(ne(e)),this.activeProviderEnvelope.set(null)}}async runActiveProviderSwitch(e){this.activeProviderSaveError.set(null),this.activeProviderSwitchAnnouncement.set(null);try{let i=await this.dataSource.setActiveProvider(e);this.activeProviderEnvelope.set({activeProvider:i.activeProvider,detected:i.detected,source:i.source});let n=i.switch.dropped;if(n===null)this.activeProviderSwitchAnnouncement.set(this.texts.project.activeProviderSwitchedNoDb);else{let d=this.texts.project;this.activeProviderSwitchAnnouncement.set(`${d.activeProviderSwitchedPrefix} ${n.tableCount} ${d.activeProviderSwitchedSuffix}`)}}catch(i){this.activeProviderSaveError.set(ne(i))}}confirmActiveProviderSwitch(e,i){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:()=>{i()},reject:()=>{let n=this.activeProviderEnvelope();n&&this.activeProviderEnvelope.set(K({},n))}})}async runPatch(e,i){if(this.pending().has(e))return!1;let n=new Set(this.pending());n.add(e),this.pending.set(n),this.saveError.set(null);let d=!1;try{let g=await this.dataSource.setProjectPreferences(i);this.preferences.set(g),d=!0}catch(g){if(g instanceof H&&g.code==="confirm-required"){let P=g.paths??[];this.confirmDialog(P,async()=>{try{let A=await this.dataSource.setProjectPreferences(J(K({},i),{confirm:!0}));this.preferences.set(A),this.newReferencePath.set("")}catch(A){this.saveError.set(ne(A))}})}else this.saveError.set(ne(g))}finally{let g=new Set(this.pending());g.delete(e),this.pending.set(g)}return d}async runIgnorePatch(e){let i="ignore.patterns";if(this.pending().has(i))return!1;let n=new Set(this.pending());n.add(i),this.pending.set(n),this.ignoreSaveError.set(null);let d=!1;try{let g=await this.dataSource.setProjectIgnore(e);this.ignoreEnvelope.set(g),d=!0}catch(g){this.ignoreSaveError.set(ne(g))}finally{let g=new Set(this.pending());g.delete(i),this.pending.set(g)}return d}confirmDialog(e,i){this.confirmation.confirm({header:y.project.confirmDialogHeader,message:y.project.confirmDialogIntro+`
122
+ `+e.map(n=>`\u2022 ${n}`).join(`
123
+ `),acceptLabel:y.project.confirmDialogAccept,rejectLabel:y.project.confirmDialogReject,acceptButtonProps:{severity:"primary"},rejectButtonProps:{severity:"secondary"},accept:()=>{i()}})}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=L({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(i,n){if(i&1&&(s(0,"section",0)(1,"h2",1),l(2),a(),s(3,"p",2),l(4),s(5,"code",3),l(6),a(),l(7),a(),h(8,wi,2,3,"p-message",4),h(9,yi,2,3,"p-message",5),h(10,ki,2,2,"p-message",6),s(11,"div",7)(12,"div",8)(13,"div",9),l(14),a(),s(15,"div",10),l(16),a(),s(17,"div",11),h(18,Pi,2,1,"span",12)(19,Si,2,1,"span",12),h(20,Mi,1,1),a()(),s(21,"div",13)(22,"p-select",14),w("ngModelChange",function(g){return n.onActiveProviderChange(g)}),a()()(),h(23,Ti,2,3,"p-message",15),h(24,Oi,2,3,"p-message",16),s(25,"div",17)(26,"div",8)(27,"div",9),l(28),a(),s(29,"div",10),l(30),a()(),s(31,"ul",18),D(32,Ii,4,5,"li",19,ee),a(),s(34,"div",13)(35,"input",20),w("ngModelChange",function(g){return n.newReferencePath.set(g)})("keydown.enter",function(){return n.onReferencePathAdd()}),a(),s(36,"p-button",21),w("onClick",function(){return n.onReferencePathAdd()}),a()()(),h(37,ji,2,3,"p-message",22),h(38,Di,2,3,"p-message",23),s(39,"div",24)(40,"div",8)(41,"div",9),l(42),a(),s(43,"div",10),l(44),s(45,"code",3),l(46),a(),l(47),s(48,"code",3),l(49),a(),l(50),a()(),s(51,"ul",18),D(52,Fi,4,5,"li",19,ee),a(),s(54,"div",13)(55,"input",25),w("ngModelChange",function(g){return n.newIgnorePattern.set(g)})("keydown.enter",function(){return n.onIgnorePatternAdd()}),a(),s(56,"p-button",26),w("onClick",function(){return n.onIgnorePatternAdd()}),a()()(),O(57,"p-confirmdialog"),a()),i&2){let d,g,P,A,z,Q,B,Y,Ne;v("aria-labelledby","settings-project-heading"),o(2),p(" ",n.texts.project.heading," "),o(2),p(" ",n.texts.project.introPrefix," "),o(2),m(n.texts.project.introPath),o(),p("",n.texts.project.introSuffix," "),o(),_((d=n.activeProviderLoadError())?8:-1,d),o(),_((g=n.activeProviderSaveError())?9:-1,g),o(),_((P=n.activeProviderSwitchAnnouncement())?10:-1,P),o(4),m(n.texts.project.activeProviderLabel),o(2),p(" ",n.texts.project.activeProviderDescription," "),o(2),_((A=n.activeProviderSource())==="autodetect"?18:A==="none"?19:-1),o(2),_((z=n.activeProviderDetectedLabel())?20:-1,z),o(2),f("options",n.providerOptions())("ngModel",n.activeProviderValue()),o(),_((Q=n.loadError())?23:-1,Q),o(),_((B=n.saveError())?24:-1,B),o(4),m(n.texts.project.referencePathsLabel),o(2),p(" ",n.texts.project.referencePathsDescription," "),o(2),F(n.referencePaths()),o(3),f("ngModel",n.newReferencePath())("placeholder",n.texts.project.referencePathsPlaceholder)("disabled",n.isPending("scan.referencePaths")),o(),f("label",n.texts.project.addPathLabel)("disabled",n.isPending("scan.referencePaths")||n.newReferencePath().trim().length===0),o(),_((Y=n.ignoreLoadError())?37:-1,Y),o(),_((Ne=n.ignoreSaveError())?38:-1,Ne),o(4),m(n.texts.project.ignorePatternsLabel),o(2),p(" ",n.texts.project.ignorePatternsDescriptionPrefix," "),o(2),m(n.texts.project.ignorePatternsDescriptionFile),o(),p(" ",n.texts.project.ignorePatternsDescriptionMiddle," "),o(2),m(n.texts.project.ignorePatternsDescriptionGitignore),o(),p(" ",n.texts.project.ignorePatternsDescriptionSuffix," "),o(2),F(n.ignorePatterns()),o(3),f("ngModel",n.newIgnorePattern())("placeholder",n.texts.project.ignorePatternsPlaceholder)("disabled",n.isPending("ignore.patterns")),o(),f("label",n.texts.project.addIgnorePatternLabel)("disabled",n.isPending("ignore.patterns")||n.newIgnorePattern().trim().length===0)}},dependencies:[ce,Pe,le,de,se,we,ke,ye,Me,Ee,pe,ge,jt,It],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})}return t})();function ne(t){return t instanceof H||t instanceof Error?t.message:String(t)}var Li=(t,r)=>r.id;function Ai(t,r){if(t&1){let e=N();s(0,"li")(1,"button",6),w("click",function(){let n=S(e).$implicit,d=c();return E(d.selectSection(n.id))}),s(2,"span",7),l(3),a()()()}if(t&2){let e=r.$implicit,i=c();o(),G("is-active",i.activeSection()===e.id),v("aria-current",i.activeSection()===e.id?"page":null)("data-testid","settings-nav-"+e.id),o(2),m(e.label)}}function Vi(t,r){if(t&1){let e=N();s(0,"sm-settings-plugins",8),w("applied",function(){S(e);let n=c();return E(n.onPluginsApplied())}),a()}if(t&2){let e=c();f("visible",e.pluginsVisible())}}function Ri(t,r){if(t&1&&O(0,"sm-settings-general",5),t&2){let e=c();f("visible",e.generalVisible())}}function zi(t,r){if(t&1&&O(0,"sm-settings-project",5),t&2){let e=c();f("visible",e.projectVisible())}}function Bi(t,r){if(t&1&&O(0,"sm-settings-about",5),t&2){let e=c();f("visible",e.aboutVisible())}}function $i(t,r){t&1&&O(0,"sm-settings-changelog")}var Gi=[{id:"general",label:y.sections.general},{id:"project",label:y.sections.project},{id:"plugins",label:y.sections.plugins},{id:"changelog",label:y.sections.changelog},{id:"about",label:y.sections.about}],ya=(()=>{class t{visible=R.required();visibleChange=ve();confirmation=k(ae);buffer=k(Te);texts=y;sections=Gi;activeSection=u("plugins");pluginsVisible=C(()=>this.visible()&&this.activeSection()==="plugins");generalVisible=C(()=>this.visible()&&this.activeSection()==="general");projectVisible=C(()=>this.visible()&&this.activeSection()==="project");aboutVisible=C(()=>this.visible()&&this.activeSection()==="about");onVisibleChange(e){if(e){this.visibleChange.emit(!0);return}let i=this.buffer.dirtyCount();if(i===0){this.visibleChange.emit(!1);return}this.confirmation.confirm({header:this.texts.confirmCloseTitle,message:this.texts.confirmCloseBody(i),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(e){this.activeSection.set(e)}onPluginsApplied(){this.visibleChange.emit(!1)}static \u0275fac=function(i){return new(i||t)};static \u0275cmp=L({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(i,n){if(i&1&&(s(0,"p-dialog",0),w("visibleChange",function(g){return n.onVisibleChange(g)}),s(1,"div",1)(2,"nav",2)(3,"ul",3),D(4,Ai,4,5,"li",null,Li),a()(),s(6,"div",4),h(7,Vi,1,1,"sm-settings-plugins",5)(8,Ri,1,1,"sm-settings-general",5)(9,zi,1,1,"sm-settings-project",5)(10,Bi,1,1,"sm-settings-about",5)(11,$i,1,0,"sm-settings-changelog"),a()(),O(12,"p-confirmdialog"),a()),i&2){let d;f("visible",n.visible())("modal",!0)("draggable",!1)("resizable",!1)("closable",!0)("closeOnEscape",!0)("dismissableMask",!0)("header",n.texts.modalTitle),o(2),v("aria-label",n.texts.modalTitle),o(2),F(n.sections),o(3),_((d=n.activeSection())==="plugins"?7:d==="general"?8:d==="project"?9:d==="about"?10:d==="changelog"?11:-1)}},dependencies:[se,ke,ye,vt,bt,Vt,Bt,Xt,gn,pn],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})}return t})();export{ya as SettingsModal};
@@ -0,0 +1 @@
1
+ import{$ as E,L as g,Q as f,aa as y,ha as c,ja as x,pc as _}from"./chunk-PZQHB7GS.js";var L="https://bb9dce0fd2cb4ab27ac0475aa394aeb4@o4511475590037504.ingest.de.sentry.io/4511475725959248",u="phc_vMX3PcNeDsacWNg2hYEbKVXDijSWcjKFzabCkzU7RNEr",b="https://eu.i.posthog.com";var D="<HOME>",O=["server_name","user"],A=[/[A-Za-z]:[\\/]Users[\\/][^\\/\s:*?"<>|]+/g,/\/(?:home|Users)\/[^/\s:]+/g,/\/root(?=\/|\b)/g];function v(t){let o=t;for(let e of A)o=o.replace(e,D);return o}function T(t){let o=m(t);if(o!==null&&typeof o=="object"&&!Array.isArray(o)){let e=o;for(let r of O)r in e&&delete e[r]}return o}function m(t){if(typeof t=="string")return v(t);if(Array.isArray(t))return t.map(o=>m(o));if(t!==null&&typeof t=="object"){let o={};for(let[e,r]of Object.entries(t))o[e]=m(r);return o}return t}var k=!1,i=null;async function K(t){if(k||u===""||!t.consentEnabled||t.distinctId===null)return;let{default:o}=await import("./chunk-P3SNMV4X.js");o.init(u,{api_host:b,autocapture:!1,capture_pageview:!1,capture_pageleave:!1,disable_session_recording:!0,person_profiles:"identified_only",bootstrap:{distinctID:t.distinctId},before_send:e=>e===null?null:T(e)}),i=o,k=!0}function F(t,o={}){i!==null&&i.capture(t,o)}function V(t){i!==null&&i.register(t)}var h=[{id:"matrix",htmlClass:"app-matrix",forcesDark:!0,favicon:"favicon-matrix.svg",fontHref:"https://fonts.googleapis.com/css2?family=JetBrains+Mono&display=swap",fontLinkId:"sm-matrix-font",label:"Matrix",description:"Cyber-green retint on the dark palette."}];function l(t){return t?h.find(o=>o.id===t)??null:null}var S="skill-map.ui.theme",p="skill-map.ui.extra-theme",M="app-dark",P="dark",I="(prefers-color-scheme: dark)",R="favicon.svg",U='link[rel="icon"][type="image/svg+xml"]',W=(()=>{class t{doc=f(E);destroyRef=f(y);mode=c(this.readInitialMode());extraTheme=c(this.readInitialExtra());systemPrefersDark=c(this.readSystemPref());resolved=_(()=>{let e=this.mode();return e==="auto"?this.systemPrefersDark()?"dark":"light":e});constructor(){this.subscribeToSystemPref(),x(()=>{let e=this.extraTheme(),r=l(e),a=this.resolved()==="dark"||r?.forcesDark===!0,d=this.doc.documentElement;d.classList.toggle(M,a),d.classList.toggle(P,a);for(let n of h)d.classList.toggle(n.htmlClass,r?.id===n.id);this.applyFavicon(r?.favicon??R),r&&this.ensureExtraThemeFont(r);try{let n=this.doc.defaultView?.localStorage;n?.setItem(S,this.mode()),r===null?n?.removeItem(p):n?.setItem(p,r.id)}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(l(e)?.id??null)}readInitialMode(){try{let e=this.doc.defaultView?.localStorage.getItem(S);if(e==="auto"||e==="light"||e==="dark")return e}catch{}return"auto"}readInitialExtra(){try{let e=this.doc.defaultView?.localStorage.getItem(p);return l(e)?.id??null}catch{return null}}readSystemPref(){try{return this.doc.defaultView?.matchMedia(I).matches??!1}catch{return!1}}ensureExtraThemeFont(e){if(!e.fontHref||!e.fontLinkId||this.doc.getElementById(e.fontLinkId))return;let r=this.doc.head;if(!r)return;let s=this.doc.createElement("link");s.id=e.fontLinkId,s.rel="stylesheet",s.href=e.fontHref,r.appendChild(s)}applyFavicon(e){let r=this.doc.querySelector(U);r&&r.getAttribute("href")!==e&&r.setAttribute("href",e)}subscribeToSystemPref(){let e=this.doc.defaultView;if(!e||typeof e.matchMedia!="function")return;let r=e.matchMedia(I),s=a=>{this.systemPrefersDark.set(a.matches)};r.addEventListener("change",s),this.destroyRef.onDestroy(()=>r.removeEventListener("change",s))}static \u0275fac=function(r){return new(r||t)};static \u0275prov=g({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();export{L as a,T as b,K as c,F as d,V as e,h as f,W as g};