@skill-map/cli 0.40.1 → 0.42.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/tutorial/sm-tutorial/SKILL.md +10 -1
- package/dist/cli.js +429 -95
- package/dist/cli.js.map +1 -1
- package/dist/index.js +39 -29
- package/dist/index.js.map +1 -1
- package/dist/kernel/index.d.ts +101 -0
- package/dist/kernel/index.js +39 -29
- package/dist/kernel/index.js.map +1 -1
- package/dist/migrations/001_initial.sql +8 -0
- package/dist/ui/chunk-5GD2GBPS.js +2190 -0
- package/dist/ui/{chunk-4HTOYDCM.js → chunk-5WJRN3LD.js} +1 -1
- package/dist/ui/{chunk-3SI3TVER.js → chunk-C2YUQODZ.js} +2 -2
- package/dist/ui/{chunk-NGIFGXW7.js → chunk-CFJBTDAA.js} +1 -1
- package/dist/ui/{chunk-YWWD62BR.js → chunk-HEJCH7BA.js} +1 -1
- package/dist/ui/chunk-HFPA56IM.js +1 -0
- package/dist/ui/chunk-HHPSCDLM.js +315 -0
- package/dist/ui/chunk-HP375T2O.js +2 -0
- package/dist/ui/chunk-HWP3HM55.js +123 -0
- package/dist/ui/{chunk-ZAEGBMF7.js → chunk-IUDL3NDH.js} +1 -1
- package/dist/ui/{chunk-Z3C2OSRL.js → chunk-JPYAASHN.js} +1 -1
- package/dist/ui/chunk-PZ6Q5AOT.js +1 -0
- package/dist/ui/chunk-XJL4DZ4M.js +1 -0
- package/dist/ui/{chunk-W2JMLJCF.js → chunk-XOHD5XWA.js} +1 -1
- package/dist/ui/chunk-YL6SWAFJ.js +1024 -0
- package/dist/ui/index.html +2 -2
- package/dist/ui/main-7VYTTJP7.js +3 -0
- package/dist/ui/{styles-6H4GSOHY.css → styles-HI4A6IWA.css} +1 -1
- package/migrations/001_initial.sql +8 -0
- package/package.json +2 -2
- package/dist/ui/chunk-4X4GYACU.js +0 -123
- package/dist/ui/chunk-7Q3IO77R.js +0 -317
- package/dist/ui/chunk-FL6RV2IG.js +0 -2
- package/dist/ui/chunk-HGNE4UVQ.js +0 -1
- package/dist/ui/chunk-IS5ULQSF.js +0 -1
- package/dist/ui/chunk-KVWYVO6I.js +0 -1
- package/dist/ui/chunk-N4XX4WPE.js +0 -2190
- package/dist/ui/chunk-P7TXZKUX.js +0 -2
- package/dist/ui/chunk-UVVXMEZT.js +0 -1025
- package/dist/ui/main-F7N5RV4Y.js +0 -3
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Aa as k,C as ze,Cc as G,Dc as ot,Ec as st,F as g,Fc as it,Ga as $,Ha as tt,I as m,Ia as te,L as R,La as rt,M as l,N as v,O as Ee,P as He,Pc as re,Q as Te,Qc as ne,R as Ve,Rc as at,Y as M,Z as $e,aa as V,ba as we,c as ge,fa as Ge,i as ve,la as Xe,ma as Re,n as H,na as Je,oa as q,pa as Q,qa as ee,ra as L,sa as j,ta as Ye,u as Ue,ua as Ke,va as We,w as Fe,wa as Ze,xa as qe,xc as nt,y as Be,ya as Qe,za as et}from"./chunk-YL6SWAFJ.js";import{a as x}from"./chunk-VB56BUGO.js";var X=class{_doc;constructor(t){this._doc=t}manager},oe=(()=>{class n extends X{constructor(e){super(e)}supports(e){return!0}addEventListener(e,r,o,s){return e.addEventListener(r,o,s),()=>this.removeEventListener(e,r,o,s)}removeEventListener(e,r,o,s){return e.removeEventListener(r,o,s)}static \u0275fac=function(r){return new(r||n)(l(M))};static \u0275prov=m({token:n,factory:n.\u0275fac})}return n})(),ae=new R(""),Pe=(()=>{class n{_zone;_plugins;_eventNameToPlugin=new Map;constructor(e,r){this._zone=r,e.forEach(i=>{i.manager=this});let o=e.filter(i=>!(i instanceof oe));this._plugins=o.slice().reverse();let s=e.find(i=>i instanceof oe);s&&this._plugins.push(s)}addEventListener(e,r,o,s){return this._findPluginFor(r).addEventListener(e,r,o,s)}getZone(){return this._zone}_findPluginFor(e){let r=this._eventNameToPlugin.get(e);if(r)return r;if(r=this._plugins.find(s=>s.supports(e)),!r)throw new g(5101,!1);return this._eventNameToPlugin.set(e,r),r}static \u0275fac=function(r){return new(r||n)(l(ae),l(V))};static \u0275prov=m({token:n,factory:n.\u0275fac})}return n})(),Me="ng-app-id";function ct(n){for(let t of n)t.remove()}function dt(n,t){let e=t.createElement("style");return e.textContent=n,e}function It(n,t,e,r){let o=n.head?.querySelectorAll(`style[${Me}="${t}"],link[${Me}="${t}"]`);if(o)for(let s of o)s.removeAttribute(Me),s instanceof HTMLLinkElement?r.set(s.href.slice(s.href.lastIndexOf("/")+1),{usage:0,elements:[s]}):s.textContent&&e.set(s.textContent,{usage:0,elements:[s]})}function De(n,t){let e=t.createElement("link");return e.setAttribute("rel","stylesheet"),e.setAttribute("href",n),e}var Oe=(()=>{class n{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;constructor(e,r,o,s={}){this.doc=e,this.appId=r,this.nonce=o,It(e,r,this.inline,this.external),this.hosts.add(e.head)}addStyles(e,r){for(let o of e)this.addUsage(o,this.inline,dt);r?.forEach(o=>this.addUsage(o,this.external,De))}removeStyles(e,r){for(let o of e)this.removeUsage(o,this.inline);r?.forEach(o=>this.removeUsage(o,this.external))}addUsage(e,r,o){let s=r.get(e);s?s.usage++:r.set(e,{usage:1,elements:[...this.hosts].map(i=>this.addElement(i,o(e,this.doc)))})}removeUsage(e,r){let o=r.get(e);o&&(o.usage--,o.usage<=0&&(ct(o.elements),r.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])ct(e);this.hosts.clear()}addHost(e){this.hosts.add(e);for(let[r,{elements:o}]of this.inline)o.push(this.addElement(e,dt(r,this.doc)));for(let[r,{elements:o}]of this.external)o.push(this.addElement(e,De(r,this.doc)))}removeHost(e){this.hosts.delete(e)}addElement(e,r){return this.nonce&&r.setAttribute("nonce",this.nonce),e.appendChild(r)}static \u0275fac=function(r){return new(r||n)(l(M),l(Re),l(Q,8),l(q))};static \u0275prov=m({token:n,factory:n.\u0275fac})}return n})(),be={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/Math/MathML"},Se=/%COMP%/g;var ut="%COMP%",Nt=`_nghost-${ut}`,Ct=`_ngcontent-${ut}`,kt=!0,xt=new R("",{factory:()=>kt});function Lt(n){return Ct.replace(Se,n)}function jt(n){return Nt.replace(Se,n)}function ft(n,t){return t.map(e=>e.replace(Se,n))}var Ae=(()=>{class n{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;constructor(e,r,o,s,i,c,a=null,d=null){this.eventManager=e,this.sharedStylesHost=r,this.appId=o,this.removeStylesOnCompDestroy=s,this.doc=i,this.ngZone=c,this.nonce=a,this.tracingService=d,this.defaultRenderer=new J(e,i,c,this.tracingService)}createRenderer(e,r){if(!e||!r)return this.defaultRenderer;let o=this.getOrCreateRenderer(e,r);return o instanceof ie?o.applyToHost(e):o instanceof Y&&o.applyStyles(),o}getOrCreateRenderer(e,r){let o=this.rendererByCompId,s=o.get(r.id);if(!s){let i=this.doc,c=this.ngZone,a=this.eventManager,d=this.sharedStylesHost,h=this.removeStylesOnCompDestroy,p=this.tracingService;switch(r.encapsulation){case ee.Emulated:s=new ie(a,d,r,this.appId,h,i,c,p);break;case ee.ShadowDom:return new se(a,e,r,i,c,this.nonce,p,d);case ee.ExperimentalIsolatedShadowDom:return new se(a,e,r,i,c,this.nonce,p);default:s=new Y(a,d,r,h,i,c,p);break}o.set(r.id,s)}return s}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(e){this.rendererByCompId.delete(e)}static \u0275fac=function(r){return new(r||n)(l(Pe),l(Oe),l(Re),l(xt),l(M),l(V),l(Q),l(te,8))};static \u0275prov=m({token:n,factory:n.\u0275fac})}return n})(),J=class{eventManager;doc;ngZone;tracingService;data=Object.create(null);throwOnSyntheticProps=!0;constructor(t,e,r,o){this.eventManager=t,this.doc=e,this.ngZone=r,this.tracingService=o}destroy(){}destroyNode=null;createElement(t,e){return e?this.doc.createElementNS(be[e]||e,t):this.doc.createElement(t)}createComment(t){return this.doc.createComment(t)}createText(t){return this.doc.createTextNode(t)}appendChild(t,e){(lt(t)?t.content:t).appendChild(e)}insertBefore(t,e,r){t&&(lt(t)?t.content:t).insertBefore(e,r)}removeChild(t,e){e.remove()}selectRootElement(t,e){let r=typeof t=="string"?this.doc.querySelector(t):t;if(!r)throw new g(-5104,!1);return e||(r.textContent=""),r}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,e,r,o){if(o){e=o+":"+e;let s=be[o];s?t.setAttributeNS(s,e,r):t.setAttribute(e,r)}else t.setAttribute(e,r)}removeAttribute(t,e,r){if(r){let o=be[r];o?t.removeAttributeNS(o,e):t.removeAttribute(`${r}:${e}`)}else t.removeAttribute(e)}addClass(t,e){t.classList.add(e)}removeClass(t,e){t.classList.remove(e)}setStyle(t,e,r,o){o&($.DashCase|$.Important)?t.style.setProperty(e,r,o&$.Important?"important":""):t.style[e]=r}removeStyle(t,e,r){r&$.DashCase?t.style.removeProperty(e):t.style[e]=""}setProperty(t,e,r){t!=null&&(t[e]=r)}setValue(t,e){t.nodeValue=e}listen(t,e,r,o){if(typeof t=="string"&&(t=G().getGlobalEventTarget(this.doc,t),!t))throw new g(5102,!1);let s=this.decoratePreventDefault(r);return this.tracingService?.wrapEventListener&&(s=this.tracingService.wrapEventListener(t,e,s)),this.eventManager.addEventListener(t,e,s,o)}decoratePreventDefault(t){return e=>{if(e==="__ngUnwrap__")return t;t(e)===!1&&e.preventDefault()}}};function lt(n){return n.tagName==="TEMPLATE"&&n.content!==void 0}var se=class extends J{hostEl;sharedStylesHost;shadowRoot;constructor(t,e,r,o,s,i,c,a){super(t,o,s,c),this.hostEl=e,this.sharedStylesHost=a,this.shadowRoot=e.attachShadow({mode:"open"}),this.sharedStylesHost&&this.sharedStylesHost.addHost(this.shadowRoot);let d=r.styles;d=ft(r.id,d);for(let p of d){let T=document.createElement("style");i&&T.setAttribute("nonce",i),T.textContent=p,this.shadowRoot.appendChild(T)}let h=r.getExternalStyles?.();if(h)for(let p of h){let T=De(p,o);i&&T.setAttribute("nonce",i),this.shadowRoot.appendChild(T)}}nodeOrShadowRoot(t){return t===this.hostEl?this.shadowRoot:t}appendChild(t,e){return super.appendChild(this.nodeOrShadowRoot(t),e)}insertBefore(t,e,r){return super.insertBefore(this.nodeOrShadowRoot(t),e,r)}removeChild(t,e){return super.removeChild(null,e)}parentNode(t){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(t)))}destroy(){this.sharedStylesHost&&this.sharedStylesHost.removeHost(this.shadowRoot)}},Y=class extends J{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(t,e,r,o,s,i,c,a){super(t,s,i,c),this.sharedStylesHost=e,this.removeStylesOnCompDestroy=o;let d=r.styles;this.styles=a?ft(a,d):d,this.styleUrls=r.getExternalStyles?.(a)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&tt.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},ie=class extends Y{contentAttr;hostAttr;constructor(t,e,r,o,s,i,c,a){let d=o+"-"+r.id;super(t,e,r,s,i,c,a,d),this.contentAttr=Lt(d),this.hostAttr=jt(d)}applyToHost(t){this.applyStyles(),this.setAttribute(t,this.hostAttr,"")}createElement(t,e){let r=super.createElement(t,e);return super.setAttribute(r,this.contentAttr,""),r}};var ce=class n extends st{supportsDOMEvents=!0;static makeCurrent(){ot(new n)}onAndCancel(t,e,r,o){return t.addEventListener(e,r,o),()=>{t.removeEventListener(e,r,o)}}dispatchEvent(t,e){t.dispatchEvent(e)}remove(t){t.remove()}createElement(t,e){return e=e||this.getDefaultDocument(),e.createElement(t)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}isShadowRoot(t){return t instanceof DocumentFragment}getGlobalEventTarget(t,e){return e==="window"?window:e==="document"?t:e==="body"?t.body:null}getBaseHref(t){let e=Ft();return e==null?null:Bt(e)}resetBaseElement(){K=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return re(document.cookie,t)}},K=null;function Ft(){return K=K||document.head.querySelector("base"),K?K.getAttribute("href"):null}function Bt(n){return new URL(n,document.baseURI).pathname}var zt=(()=>{class n{build(){return new XMLHttpRequest}static \u0275fac=function(r){return new(r||n)};static \u0275prov=m({token:n,factory:n.\u0275fac})}return n})(),ht=["alt","control","meta","shift"],Ht={"\b":"Backspace"," ":"Tab","\x7F":"Delete","\x1B":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},Vt={alt:n=>n.altKey,control:n=>n.ctrlKey,meta:n=>n.metaKey,shift:n=>n.shiftKey},mt=(()=>{class n extends X{constructor(e){super(e)}supports(e){return n.parseEventName(e)!=null}addEventListener(e,r,o,s){let i=n.parseEventName(r),c=n.eventCallback(i.fullKey,o,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>G().onAndCancel(e,i.domEventName,c,s))}static parseEventName(e){let r=e.toLowerCase().split("."),o=r.shift();if(r.length===0||!(o==="keydown"||o==="keyup"))return null;let s=n._normalizeKey(r.pop()),i="",c=r.indexOf("code");if(c>-1&&(r.splice(c,1),i="code."),ht.forEach(d=>{let h=r.indexOf(d);h>-1&&(r.splice(h,1),i+=d+".")}),i+=s,r.length!=0||s.length===0)return null;let a={};return a.domEventName=o,a.fullKey=i,a}static matchEventFullKeyCode(e,r){let o=Ht[e.key]||e.key,s="";return r.indexOf("code.")>-1&&(o=e.code,s="code."),o==null||!o?!1:(o=o.toLowerCase(),o===" "?o="space":o==="."&&(o="dot"),ht.forEach(i=>{if(i!==o){let c=Vt[i];c(e)&&(s+=i+".")}}),s+=o,s===r)}static eventCallback(e,r,o){return s=>{n.matchEventFullKeyCode(s,e)&&o.runGuarded(()=>r(s))}}static _normalizeKey(e){return e==="esc"?"escape":e}static \u0275fac=function(r){return new(r||n)(l(M))};static \u0275prov=m({token:n,factory:n.\u0275fac})}return n})();async function $t(n,t,e){let r=x({rootComponent:n},Gt(t,e));return nt(r)}function Gt(n,t){return{platformRef:t?.platformRef,appProviders:[...Wt,...n?.providers??[]],platformProviders:Kt}}function Xt(){ce.makeCurrent()}function Jt(){return new we}function Yt(){return Xe(document),document}var Kt=[{provide:q,useValue:at},{provide:Je,useValue:Xt,multi:!0},{provide:M,useFactory:Yt}];var Wt=[{provide:He,useValue:"root"},{provide:we,useFactory:Jt},{provide:ae,useClass:oe,multi:!0},{provide:ae,useClass:mt,multi:!0},Ae,Oe,Pe,{provide:rt,useExisting:Ae},{provide:ne,useClass:zt},[]];var D=class n{headers;normalizedNames=new Map;lazyInit;lazyUpdate=null;constructor(t){t?typeof t=="string"?this.lazyInit=()=>{this.headers=new Map,t.split(`
|
|
2
|
+
`).forEach(e=>{let r=e.indexOf(":");if(r>0){let o=e.slice(0,r),s=e.slice(r+1).trim();this.addHeaderEntry(o,s)}})}:typeof Headers<"u"&&t instanceof Headers?(this.headers=new Map,t.forEach((e,r)=>{this.addHeaderEntry(r,e)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(t).forEach(([e,r])=>{this.setHeaderEntries(e,r)})}:this.headers=new Map}has(t){return this.init(),this.headers.has(t.toLowerCase())}get(t){this.init();let e=this.headers.get(t.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(t){return this.init(),this.headers.get(t.toLowerCase())||null}append(t,e){return this.clone({name:t,value:e,op:"a"})}set(t,e){return this.clone({name:t,value:e,op:"s"})}delete(t,e){return this.clone({name:t,value:e,op:"d"})}maybeSetNormalizedName(t,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,t)}init(){this.lazyInit&&(this.lazyInit instanceof n?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(t=>this.applyUpdate(t)),this.lazyUpdate=null))}copyFrom(t){t.init(),Array.from(t.headers.keys()).forEach(e=>{this.headers.set(e,t.headers.get(e)),this.normalizedNames.set(e,t.normalizedNames.get(e))})}clone(t){let e=new n;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof n?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([t]),e}applyUpdate(t){let e=t.name.toLowerCase();switch(t.op){case"a":case"s":let r=t.value;if(typeof r=="string"&&(r=[r]),r.length===0)return;this.maybeSetNormalizedName(t.name,e);let o=(t.op==="a"?this.headers.get(e):void 0)||[];o.push(...r),this.headers.set(e,o);break;case"d":let s=t.value;if(!s)this.headers.delete(e),this.normalizedNames.delete(e);else{let i=this.headers.get(e);if(!i)return;i=i.filter(c=>s.indexOf(c)===-1),i.length===0?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,i)}break}}addHeaderEntry(t,e){let r=t.toLowerCase();this.maybeSetNormalizedName(t,r),this.headers.has(r)?this.headers.get(r).push(e):this.headers.set(r,[e])}setHeaderEntries(t,e){let r=(Array.isArray(e)?e:[e]).map(s=>s.toString()),o=t.toLowerCase();this.headers.set(o,r),this.maybeSetNormalizedName(t,o)}forEach(t){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>t(this.normalizedNames.get(e),this.headers.get(e)))}};var ue=class{map=new Map;set(t,e){return this.map.set(t,e),this}get(t){return this.map.has(t)||this.map.set(t,t.defaultValue()),this.map.get(t)}delete(t){return this.map.delete(t),this}has(t){return this.map.has(t)}keys(){return this.map.keys()}},fe=class{encodeKey(t){return gt(t)}encodeValue(t){return gt(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}};function qt(n,t){let e=new Map;return n.length>0&&n.replace(/^\?/,"").split("&").forEach(o=>{let s=o.indexOf("="),[i,c]=s==-1?[t.decodeKey(o),""]:[t.decodeKey(o.slice(0,s)),t.decodeValue(o.slice(s+1))],a=e.get(i)||[];a.push(c),e.set(i,a)}),e}var Qt=/%(\d[a-f0-9])/gi,er={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function gt(n){return encodeURIComponent(n).replace(Qt,(t,e)=>er[e]??t)}function de(n){return`${n}`}var P=class n{map;encoder;updates=null;cloneFrom=null;constructor(t={}){if(this.encoder=t.encoder||new fe,t.fromString){if(t.fromObject)throw new g(2805,!1);this.map=qt(t.fromString,this.encoder)}else t.fromObject?(this.map=new Map,Object.keys(t.fromObject).forEach(e=>{let r=t.fromObject[e],o=Array.isArray(r)?r.map(de):[de(r)];this.map.set(e,o)})):this.map=null}has(t){return this.init(),this.map.has(t)}get(t){this.init();let e=this.map.get(t);return e?e[0]:null}getAll(t){return this.init(),this.map.get(t)||null}keys(){return this.init(),Array.from(this.map.keys())}append(t,e){return this.clone({param:t,value:e,op:"a"})}appendAll(t){let e=[];return Object.keys(t).forEach(r=>{let o=t[r];Array.isArray(o)?o.forEach(s=>{e.push({param:r,value:s,op:"a"})}):e.push({param:r,value:o,op:"a"})}),this.clone(e)}set(t,e){return this.clone({param:t,value:e,op:"s"})}delete(t,e){return this.clone({param:t,value:e,op:"d"})}toString(){return this.init(),this.keys().map(t=>{let e=this.encoder.encodeKey(t);return this.map.get(t).map(r=>e+"="+this.encoder.encodeValue(r)).join("&")}).filter(t=>t!=="").join("&")}clone(t){let e=new n({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat(t),e}init(){this.map===null&&(this.map=new Map),this.cloneFrom!==null&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(t=>this.map.set(t,this.cloneFrom.map.get(t))),this.updates.forEach(t=>{switch(t.op){case"a":case"s":let e=(t.op==="a"?this.map.get(t.param):void 0)||[];e.push(de(t.value)),this.map.set(t.param,e);break;case"d":if(t.value!==void 0){let r=this.map.get(t.param)||[],o=r.indexOf(de(t.value));o!==-1&&r.splice(o,1),r.length>0?this.map.set(t.param,r):this.map.delete(t.param)}else{this.map.delete(t.param);break}}}),this.cloneFrom=this.updates=null)}};function tr(n){switch(n){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function vt(n){return typeof ArrayBuffer<"u"&&n instanceof ArrayBuffer}function Et(n){return typeof Blob<"u"&&n instanceof Blob}function Tt(n){return typeof FormData<"u"&&n instanceof FormData}function rr(n){return typeof URLSearchParams<"u"&&n instanceof URLSearchParams}var W="Content-Type",he="Accept",wt="text/plain",Rt="application/json",Mt=`${Rt}, ${wt}, */*`,U=class n{url;body=null;headers;context;reportProgress=!1;withCredentials=!1;credentials;keepalive=!1;cache;priority;mode;redirect;referrer;integrity;referrerPolicy;responseType="json";method;params;urlWithParams;transferCache;timeout;constructor(t,e,r,o){this.url=e,this.method=t.toUpperCase();let s;if(tr(this.method)||o?(this.body=r!==void 0?r:null,s=o):s=r,s){if(this.reportProgress=!!s.reportProgress,this.withCredentials=!!s.withCredentials,this.keepalive=!!s.keepalive,s.responseType&&(this.responseType=s.responseType),s.headers&&(this.headers=s.headers),s.context&&(this.context=s.context),s.params&&(this.params=s.params),s.priority&&(this.priority=s.priority),s.cache&&(this.cache=s.cache),s.credentials&&(this.credentials=s.credentials),typeof s.timeout=="number"){if(s.timeout<1||!Number.isInteger(s.timeout))throw new g(2822,"");this.timeout=s.timeout}s.mode&&(this.mode=s.mode),s.redirect&&(this.redirect=s.redirect),s.integrity&&(this.integrity=s.integrity),s.referrer&&(this.referrer=s.referrer),s.referrerPolicy&&(this.referrerPolicy=s.referrerPolicy),this.transferCache=s.transferCache}if(this.headers??=new D,this.context??=new ue,!this.params)this.params=new P,this.urlWithParams=e;else{let i=this.params.toString();if(i.length===0)this.urlWithParams=e;else{let c=e.indexOf("?"),a=c===-1?"?":c<e.length-1?"&":"";this.urlWithParams=e+a+i}}}serializeBody(){return this.body===null?null:typeof this.body=="string"||vt(this.body)||Et(this.body)||Tt(this.body)||rr(this.body)?this.body:this.body instanceof P?this.body.toString():typeof this.body=="object"||typeof this.body=="boolean"||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()}detectContentTypeHeader(){return this.body===null||Tt(this.body)?null:Et(this.body)?this.body.type||null:vt(this.body)?null:typeof this.body=="string"?wt:this.body instanceof P?"application/x-www-form-urlencoded;charset=UTF-8":typeof this.body=="object"||typeof this.body=="number"||typeof this.body=="boolean"?Rt:null}clone(t={}){let e=t.method||this.method,r=t.url||this.url,o=t.responseType||this.responseType,s=t.keepalive??this.keepalive,i=t.priority||this.priority,c=t.cache||this.cache,a=t.mode||this.mode,d=t.redirect||this.redirect,h=t.credentials||this.credentials,p=t.referrer||this.referrer,T=t.integrity||this.integrity,N=t.referrerPolicy||this.referrerPolicy,C=t.transferCache??this.transferCache,E=t.timeout??this.timeout,u=t.body!==void 0?t.body:this.body,f=t.withCredentials??this.withCredentials,w=t.reportProgress??this.reportProgress,S=t.headers||this.headers,y=t.params||this.params,A=t.context??this.context;return t.setHeaders!==void 0&&(S=Object.keys(t.setHeaders).reduce((I,_)=>I.set(_,t.setHeaders[_]),S)),t.setParams&&(y=Object.keys(t.setParams).reduce((I,_)=>I.set(_,t.setParams[_]),y)),new n(e,r,u,{params:y,headers:S,context:A,reportProgress:w,responseType:o,withCredentials:f,transferCache:C,keepalive:s,cache:c,priority:i,timeout:E,mode:a,redirect:d,credentials:h,referrer:p,integrity:T,referrerPolicy:N})}},O=(function(n){return n[n.Sent=0]="Sent",n[n.UploadProgress=1]="UploadProgress",n[n.ResponseHeader=2]="ResponseHeader",n[n.DownloadProgress=3]="DownloadProgress",n[n.Response=4]="Response",n[n.User=5]="User",n})(O||{}),F=class{headers;status;statusText;url;ok;type;redirected;responseType;constructor(t,e=200,r="OK"){this.headers=t.headers||new D,this.status=t.status!==void 0?t.status:e,this.statusText=t.statusText||r,this.url=t.url||null,this.redirected=t.redirected,this.responseType=t.responseType,this.ok=this.status>=200&&this.status<300}},Z=class n extends F{constructor(t={}){super(t)}type=O.ResponseHeader;clone(t={}){return new n({headers:t.headers||this.headers,status:t.status!==void 0?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}},B=class n extends F{body;constructor(t={}){super(t),this.body=t.body!==void 0?t.body:null}type=O.Response;clone(t={}){return new n({body:t.body!==void 0?t.body:this.body,headers:t.headers||this.headers,status:t.status!==void 0?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0,redirected:t.redirected??this.redirected,responseType:t.responseType??this.responseType})}},b=class extends F{name="HttpErrorResponse";message;error;ok=!1;constructor(t){super(t,0,"Unknown Error"),this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${t.url||"(unknown url)"}`:this.message=`Http failure response for ${t.url||"(unknown url)"}: ${t.status} ${t.statusText}`,this.error=t.error||null}},bt=200,nr=204;var or=/^\)\]\}',?\n/,Dt=new R(""),le=(()=>{class n{fetchImpl=v(Ne,{optional:!0})?.fetch??((...e)=>globalThis.fetch(...e));ngZone=v(V);destroyRef=v($e);handle(e){return new ge(r=>{let o=new AbortController;this.doRequest(e,o.signal,r).then(Ce,i=>r.error(new b({error:i})));let s;return e.timeout&&(s=this.ngZone.runOutsideAngular(()=>setTimeout(()=>{o.signal.aborted||o.abort(new DOMException("signal timed out","TimeoutError"))},e.timeout))),()=>{s!==void 0&&clearTimeout(s),o.abort()}})}async doRequest(e,r,o){let s=this.createRequestInit(e),i;try{let E=this.ngZone.runOutsideAngular(()=>this.fetchImpl(e.urlWithParams,x({signal:r},s)));sr(E),o.next({type:O.Sent}),i=await E}catch(E){o.error(new b({error:E,status:E.status??0,statusText:E.statusText,url:e.urlWithParams,headers:E.headers}));return}let c=new D(i.headers),a=i.statusText,d=i.url||e.urlWithParams,h=i.status,p=null;if(e.reportProgress&&o.next(new Z({headers:c,status:h,statusText:a,url:d})),i.body){let E=i.headers.get("content-length"),u=[],f=i.body.getReader(),w=0,S,y,A=typeof Zone<"u"&&Zone.current,I=!1;if(await this.ngZone.runOutsideAngular(async()=>{for(;;){if(this.destroyRef.destroyed){await f.cancel(),I=!0;break}let{done:z,value:me}=await f.read();if(z)break;if(u.push(me),w+=me.length,e.reportProgress){y=e.responseType==="text"?(y??"")+(S??=new TextDecoder).decode(me,{stream:!0}):void 0;let je=()=>o.next({type:O.DownloadProgress,total:E?+E:void 0,loaded:w,partialText:y});A?A.run(je):je()}}}),I){o.complete();return}let _=this.concatChunks(u,w);try{let z=i.headers.get(W)??"";p=this.parseBody(e,_,z,h)}catch(z){o.error(new b({error:z,headers:new D(i.headers),status:i.status,statusText:i.statusText,url:i.url||e.urlWithParams}));return}}h===0&&(h=p?bt:0);let T=h>=200&&h<300,N=i.redirected,C=i.type;T?(o.next(new B({body:p,headers:c,status:h,statusText:a,url:d,redirected:N,responseType:C})),o.complete()):o.error(new b({error:p,headers:c,status:h,statusText:a,url:d,redirected:N,responseType:C}))}parseBody(e,r,o,s){switch(e.responseType){case"json":let i=new TextDecoder().decode(r).replace(or,"");if(i==="")return null;try{return JSON.parse(i)}catch(c){if(s<200||s>=300)return i;throw c}case"text":return new TextDecoder().decode(r);case"blob":return new Blob([r],{type:o});case"arraybuffer":return r.buffer}}createRequestInit(e){let r={},o;if(o=e.credentials,e.withCredentials&&(o="include"),e.headers.forEach((s,i)=>r[s]=i.join(",")),e.headers.has(he)||(r[he]=Mt),!e.headers.has(W)){let s=e.detectContentTypeHeader();s!==null&&(r[W]=s)}return{body:e.serializeBody(),method:e.method,headers:r,credentials:o,keepalive:e.keepalive,cache:e.cache,priority:e.priority,mode:e.mode,redirect:e.redirect,referrer:e.referrer,integrity:e.integrity,referrerPolicy:e.referrerPolicy}}concatChunks(e,r){let o=new Uint8Array(r),s=0;for(let i of e)o.set(i,s),s+=i.length;return o}static \u0275fac=function(r){return new(r||n)};static \u0275prov=m({token:n,factory:n.\u0275fac})}return n})(),Ne=class{};function Ce(){}function sr(n){n.then(Ce,Ce)}var ir=/^\)\]\}',?\n/;var ke=(()=>{class n{xhrFactory;tracingService=v(te,{optional:!0});constructor(e){this.xhrFactory=e}maybePropagateTrace(e){return this.tracingService?.propagate?this.tracingService.propagate(e):e}handle(e){if(e.method==="JSONP")throw new g(-2800,!1);let r=this.xhrFactory;return ve(null).pipe(ze(()=>new ge(s=>{let i=r.build();if(i.open(e.method,e.urlWithParams),e.withCredentials&&(i.withCredentials=!0),e.headers.forEach((u,f)=>i.setRequestHeader(u,f.join(","))),e.headers.has(he)||i.setRequestHeader(he,Mt),!e.headers.has(W)){let u=e.detectContentTypeHeader();u!==null&&i.setRequestHeader(W,u)}if(e.timeout&&(i.timeout=e.timeout),e.responseType){let u=e.responseType.toLowerCase();i.responseType=u!=="json"?u:"text"}let c=e.serializeBody(),a=null,d=()=>{if(a!==null)return a;let u=i.statusText||"OK",f=new D(i.getAllResponseHeaders()),w=i.responseURL||e.url;return a=new Z({headers:f,status:i.status,statusText:u,url:w}),a},h=this.maybePropagateTrace(()=>{let{headers:u,status:f,statusText:w,url:S}=d(),y=null;f!==nr&&(y=typeof i.response>"u"?i.responseText:i.response),f===0&&(f=y?bt:0);let A=f>=200&&f<300;if(e.responseType==="json"&&typeof y=="string"){let I=y;y=y.replace(ir,"");try{y=y!==""?JSON.parse(y):null}catch(_){y=I,A&&(A=!1,y={error:_,text:y})}}A?(s.next(new B({body:y,headers:u,status:f,statusText:w,url:S||void 0})),s.complete()):s.error(new b({error:y,headers:u,status:f,statusText:w,url:S||void 0}))}),p=this.maybePropagateTrace(u=>{let{url:f}=d(),w=new b({error:u,status:i.status||0,statusText:i.statusText||"Unknown Error",url:f||void 0});s.error(w)}),T=p;e.timeout&&(T=this.maybePropagateTrace(u=>{let{url:f}=d(),w=new b({error:new DOMException("Request timed out","TimeoutError"),status:i.status||0,statusText:i.statusText||"Request timeout",url:f||void 0});s.error(w)}));let N=!1,C=this.maybePropagateTrace(u=>{N||(s.next(d()),N=!0);let f={type:O.DownloadProgress,loaded:u.loaded};u.lengthComputable&&(f.total=u.total),e.responseType==="text"&&i.responseText&&(f.partialText=i.responseText),s.next(f)}),E=this.maybePropagateTrace(u=>{let f={type:O.UploadProgress,loaded:u.loaded};u.lengthComputable&&(f.total=u.total),s.next(f)});return i.addEventListener("load",h),i.addEventListener("error",p),i.addEventListener("timeout",T),i.addEventListener("abort",p),e.reportProgress&&(i.addEventListener("progress",C),c!==null&&i.upload&&i.upload.addEventListener("progress",E)),i.send(c),s.next({type:O.Sent}),()=>{i.removeEventListener("error",p),i.removeEventListener("abort",p),i.removeEventListener("load",h),i.removeEventListener("timeout",T),e.reportProgress&&(i.removeEventListener("progress",C),c!==null&&i.upload&&i.upload.removeEventListener("progress",E)),i.readyState!==i.DONE&&i.abort()}})))}static \u0275fac=function(r){return new(r||n)(l(ne))};static \u0275prov=m({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function ar(n,t){return t(n)}function cr(n,t,e){return(r,o)=>Ve(e,()=>t(r,s=>n(s,o)))}var _t=new R("",{factory:()=>[]}),Pt=new R(""),Ot=new R("",{factory:()=>!0});var ye=(()=>{class n{static \u0275fac=function(r){return new(r||n)};static \u0275prov=m({token:n,factory:function(r){let o=null;return r?o=new(r||n):o=l(ke),o},providedIn:"root"})}return n})();var pe=(()=>{class n{backend;injector;chain=null;pendingTasks=v(Ge);contributeToStability=v(Ot);constructor(e,r){this.backend=e,this.injector=r}handle(e){if(this.chain===null){let r=Array.from(new Set([...this.injector.get(_t),...this.injector.get(Pt,[])]));this.chain=r.reduceRight((o,s)=>cr(o,s,this.injector),ar)}if(this.contributeToStability){let r=this.pendingTasks.add();return this.chain(e,o=>this.backend.handle(o)).pipe(Be(r))}else return this.chain(e,r=>this.backend.handle(r))}static \u0275fac=function(r){return new(r||n)(l(ye),l(Te))};static \u0275prov=m({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),xe=(()=>{class n{static \u0275fac=function(r){return new(r||n)};static \u0275prov=m({token:n,factory:function(r){let o=null;return r?o=new(r||n):o=l(pe),o},providedIn:"root"})}return n})();function Ie(n,t){return{body:t,headers:n.headers,context:n.context,observe:n.observe,params:n.params,reportProgress:n.reportProgress,responseType:n.responseType,withCredentials:n.withCredentials,credentials:n.credentials,transferCache:n.transferCache,timeout:n.timeout,keepalive:n.keepalive,priority:n.priority,cache:n.cache,mode:n.mode,redirect:n.redirect,integrity:n.integrity,referrer:n.referrer,referrerPolicy:n.referrerPolicy}}var St=(()=>{class n{handler;constructor(e){this.handler=e}request(e,r,o={}){let s;if(e instanceof U)s=e;else{let a;o.headers instanceof D?a=o.headers:a=new D(o.headers);let d;o.params&&(o.params instanceof P?d=o.params:d=new P({fromObject:o.params})),s=new U(e,r,o.body!==void 0?o.body:null,{headers:a,context:o.context,params:d,reportProgress:o.reportProgress,responseType:o.responseType||"json",withCredentials:o.withCredentials,transferCache:o.transferCache,keepalive:o.keepalive,priority:o.priority,cache:o.cache,mode:o.mode,redirect:o.redirect,credentials:o.credentials,referrer:o.referrer,referrerPolicy:o.referrerPolicy,integrity:o.integrity,timeout:o.timeout})}let i=ve(s).pipe(Fe(a=>this.handler.handle(a)));if(e instanceof U||o.observe==="events")return i;let c=i.pipe(Ue(a=>a instanceof B));switch(o.observe||"body"){case"body":switch(s.responseType){case"arraybuffer":return c.pipe(H(a=>{if(a.body!==null&&!(a.body instanceof ArrayBuffer))throw new g(2806,!1);return a.body}));case"blob":return c.pipe(H(a=>{if(a.body!==null&&!(a.body instanceof Blob))throw new g(2807,!1);return a.body}));case"text":return c.pipe(H(a=>{if(a.body!==null&&typeof a.body!="string")throw new g(2808,!1);return a.body}));default:return c.pipe(H(a=>a.body))}case"response":return c;default:throw new g(2809,!1)}}delete(e,r={}){return this.request("DELETE",e,r)}get(e,r={}){return this.request("GET",e,r)}head(e,r={}){return this.request("HEAD",e,r)}jsonp(e,r){return this.request("JSONP",e,{params:new P().append(r,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(e,r={}){return this.request("OPTIONS",e,r)}patch(e,r,o={}){return this.request("PATCH",e,Ie(o,r))}post(e,r,o={}){return this.request("POST",e,Ie(o,r))}put(e,r,o={}){return this.request("PUT",e,Ie(o,r))}static \u0275fac=function(r){return new(r||n)(l(xe))};static \u0275prov=m({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var dr=new R("",{factory:()=>!0}),lr="XSRF-TOKEN",ur=new R("",{factory:()=>lr}),fr="X-XSRF-TOKEN",hr=new R("",{factory:()=>fr}),pr=(()=>{class n{cookieName=v(ur);doc=v(M);lastCookieString="";lastToken=null;parseCount=0;getToken(){let e=this.doc.cookie||"";return e!==this.lastCookieString&&(this.parseCount++,this.lastToken=re(e,this.cookieName),this.lastCookieString=e),this.lastToken}static \u0275fac=function(r){return new(r||n)};static \u0275prov=m({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),At=(()=>{class n{static \u0275fac=function(r){return new(r||n)};static \u0275prov=m({token:n,factory:function(r){let o=null;return r?o=new(r||n):o=l(pr),o},providedIn:"root"})}return n})();function yr(n,t){if(!v(dr)||n.method==="GET"||n.method==="HEAD")return t(n);try{let o=v(it).href,{origin:s}=new URL(o),{origin:i}=new URL(n.url,s);if(s!==i)return t(n)}catch{return t(n)}let e=v(At).getToken(),r=v(hr);return e!=null&&!n.headers.has(r)&&(n=n.clone({headers:n.headers.set(r,e)})),t(n)}var Le=(function(n){return n[n.Interceptors=0]="Interceptors",n[n.LegacyInterceptors=1]="LegacyInterceptors",n[n.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",n[n.NoXsrfProtection=3]="NoXsrfProtection",n[n.JsonpSupport=4]="JsonpSupport",n[n.RequestsMadeViaParent=5]="RequestsMadeViaParent",n[n.Fetch=6]="Fetch",n})(Le||{});function mr(n,t){return{\u0275kind:n,\u0275providers:t}}function gr(...n){let t=[St,pe,{provide:xe,useExisting:pe},{provide:ye,useFactory:()=>v(Dt,{optional:!0})??v(ke)},{provide:_t,useValue:yr,multi:!0}];for(let e of n)t.push(...e.\u0275providers);return Ee(t)}function vr(){return mr(Le.Fetch,[le,{provide:Dt,useExisting:le},{provide:ye,useExisting:le}])}var Yn=(()=>{class n{_doc;constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}static \u0275fac=function(r){return new(r||n)(l(M))};static \u0275prov=m({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var Tr=(()=>{class n{static \u0275fac=function(r){return new(r||n)};static \u0275prov=m({token:n,factory:function(r){let o=null;return r?o=new(r||n):o=l(wr),o},providedIn:"root"})}return n})(),wr=(()=>{class n extends Tr{_doc;constructor(e){super(),this._doc=e}sanitize(e,r){if(r==null)return null;switch(e){case k.NONE:return r;case k.HTML:return j(r,"HTML")?L(r):et(this._doc,String(r)).toString();case k.STYLE:return j(r,"Style")?L(r):r;case k.SCRIPT:if(j(r,"Script"))return L(r);throw new g(5200,!1);case k.URL:return j(r,"URL")?L(r):Qe(String(r));case k.RESOURCE_URL:if(j(r,"ResourceURL"))return L(r);throw new g(5201,!1);default:throw new g(5202,!1)}}bypassSecurityTrustHtml(e){return Ye(e)}bypassSecurityTrustStyle(e){return Ke(e)}bypassSecurityTrustScript(e){return We(e)}bypassSecurityTrustUrl(e){return Ze(e)}bypassSecurityTrustResourceUrl(e){return qe(e)}static \u0275fac=function(r){return new(r||n)(l(M))};static \u0275prov=m({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();export{$t as a,b,St as c,gr as d,vr as e,Yn as f,Tr as g};
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import{a as Lt,c as Rt,d as w,e as Vt,f as zt,g as Te}from"./chunk-PZ6Q5AOT.js";import{a as Ct,b as wt,c as ke,d as Se,e as Mt}from"./chunk-HEJCH7BA.js";import"./chunk-HP375T2O.js";import{e as It,f as Tt,g as Ot,h as jt,l as Dt,m as Ft,n as At,o as Nt,p as ge,q as pe}from"./chunk-5WJRN3LD.js";import{a as Me,b as Ie}from"./chunk-IUDL3NDH.js";import{e as kt,f as St,g as Et}from"./chunk-XOHD5XWA.js";import{$ as it,Ab as C,Ba as ot,Ca as Z,Cb as c,Ed as q,Fa as o,Fb as ct,Fd as $,Gb as gt,H as Je,Hb as ve,I as be,Ib as xe,J as Ze,Kd as Pt,L as et,Ld as Ee,N as P,Nb as Ke,Nc as _t,Nd as le,Ob as K,Oc as ft,Od as de,Pb as pt,Pd as ce,Qb as he,Ra as F,Rb as l,S as tt,Sa as rt,Sb as u,T as S,Tb as p,U as E,Ua as at,Ub as T,Va as st,Wa as ie,Wc as ae,Z as nt,ac as re,bd as Ce,cc as mt,cd as we,db as v,ea as m,ed as bt,ga as L,gb as _,hb as f,hd as vt,ia as Be,ib as lt,jb as ee,jc as ut,kb as O,lb as j,mb as h,mc as y,nb as a,nd as xt,ob as s,od as _e,pb as I,pc as ye,pd as yt,qb as b,qc as R,rb as x,sb as oe,vb as dt,vd as Pe,wd as se,yb as D,yc as $e,zb as W,zc as ht}from"./chunk-YL6SWAFJ.js";import"./chunk-C2YUQODZ.js";import{a as U,b as J}from"./chunk-VB56BUGO.js";function pn(t,n){if(t&1&&(b(0,"p",6),l(1),x()),t&2){let e=c();o(),T(" ",e.texts.aboutErrorPrefix," ",e.loadError()," ")}}var Oe=class t{dataSource=P(q);updateCheck=P(Rt);theme=P(Te);visible=R.required();texts=w;health=m(null);loadError=m(null);markSrc=y(()=>this.theme.resolved()==="dark"?"skill-map-mark-light.svg":"skill-map-mark-dark.svg");cliVersion=y(()=>this.updateCheck.current()??this.health()?.implVersion??this.texts.aboutUnknown);specVersion=y(()=>this.health()?.specVersion??this.texts.aboutLoading);schemaVersion=y(()=>this.health()?.schemaVersion??this.texts.aboutLoading);cwd=y(()=>this.health()?.cwd??this.texts.aboutLoading);dbDisplay=y(()=>{let n=this.health();return n?this.texts.aboutDbValue(n.db,mn(n.dbPath,n.cwd)):this.texts.aboutLoading});constructor(){L(()=>{this.visible()&&this.health()===null&&this.load()})}async load(){this.loadError.set(null);try{let n=await this.dataSource.health();this.health.set(n)}catch(n){let e=n instanceof $||n instanceof Error?n.message:String(n);this.loadError.set(e)}}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=F({type:t,selectors:[["sm-settings-about"]],inputs:{visible:[1,"visible"]},decls:57,vars:25,consts:[["aria-labelledby","settings-about-heading","data-testid","settings-about",1,"settings-about"],[1,"settings-about__header"],["alt","","aria-hidden","true","data-testid","settings-about-logo",1,"settings-about__logo",3,"src"],[1,"settings-about__heading-text"],["id","settings-about-heading",1,"settings-about__title"],[1,"settings-about__intro"],["data-testid","settings-about-error",1,"settings-about__error"],["target","_blank","rel","noopener noreferrer","data-testid","settings-about-star",1,"settings-about__star",3,"href"],["aria-hidden","true",1,"fa-solid","fa-star","settings-about__star-icon"],[1,"settings-about__star-text"],[1,"settings-about__star-heading"],[1,"settings-about__star-body"],[1,"settings-about__star-cta"],["aria-hidden","true",1,"fa-solid","fa-star"],[1,"settings-about__list"],[1,"settings-about__row"],[1,"settings-about__label"],[1,"settings-about__value"],["target","_blank","rel","noopener noreferrer","data-testid","settings-about-website",1,"settings-about__link",3,"href"],["target","_blank","rel","noopener noreferrer","data-testid","settings-about-github",1,"settings-about__link",3,"href"],["data-testid","settings-about-cli",1,"settings-about__value"],["data-testid","settings-about-spec",1,"settings-about__value"],["data-testid","settings-about-schema",1,"settings-about__value"],["data-testid","settings-about-cwd",1,"settings-about__value"],["data-testid","settings-about-db",1,"settings-about__value"]],template:function(e,i){e&1&&(b(0,"section",0)(1,"header",1),oe(2,"img",2),b(3,"div",3)(4,"h2",4),l(5),x(),b(6,"p",5),l(7),x()()(),_(8,pn,2,2,"p",6),b(9,"a",7),oe(10,"i",8),b(11,"span",9)(12,"span",10),l(13),x(),b(14,"span",11),l(15),x()(),b(16,"span",12),oe(17,"i",13),l(18),x()(),b(19,"dl",14)(20,"div",15)(21,"dt",16),l(22),x(),b(23,"dd",17)(24,"a",18),l(25),x()()(),b(26,"div",15)(27,"dt",16),l(28),x(),b(29,"dd",17)(30,"a",19),l(31),x()()(),b(32,"div",15)(33,"dt",16),l(34),x(),b(35,"dd",20),l(36),x()(),b(37,"div",15)(38,"dt",16),l(39),x(),b(40,"dd",21),l(41),x()(),b(42,"div",15)(43,"dt",16),l(44),x(),b(45,"dd",22),l(46),x()(),b(47,"div",15)(48,"dt",16),l(49),x(),b(50,"dd",23),l(51),x()(),b(52,"div",15)(53,"dt",16),l(54),x(),b(55,"dd",24),l(56),x()()()()),e&2&&(o(2),W("src",i.markSrc(),Z),o(3),p(" ",i.texts.aboutHeading," "),o(2),u(i.texts.aboutIntro),o(),f(i.loadError()?8:-1),o(),W("href",i.texts.aboutGithubUrl,Z),v("aria-label",i.texts.aboutStarA11y),o(4),u(i.texts.aboutStarHeading),o(2),u(i.texts.aboutStarBody),o(3),p(" ",i.texts.aboutStarCta," "),o(4),u(i.texts.aboutWebsiteLabel),o(2),W("href",i.texts.aboutWebsiteUrl,Z),o(),u(i.texts.aboutWebsiteUrl),o(3),u(i.texts.aboutGithubLabel),o(2),W("href",i.texts.aboutGithubUrl,Z),o(),u(i.texts.aboutGithubUrl),o(3),u(i.texts.aboutCliLabel),o(2),p(" ",i.cliVersion()," "),o(3),u(i.texts.aboutSpecLabel),o(2),p(" ",i.specVersion()," "),o(3),u(i.texts.aboutSchemaLabel),o(2),p(" ",i.schemaVersion()," "),o(3),u(i.texts.aboutFolderLabel),o(2),p(" ",i.cwd()," "),o(3),u(i.texts.aboutDbLabel),o(2),p(" ",i.dbDisplay()," "))},styles:["[_nghost-%COMP%]{display:block;height:100%;overflow-y:auto;padding:1.25rem 1.5rem}.settings-about[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.75rem}.settings-about__header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem}.settings-about__logo[_ngcontent-%COMP%]{width:64px;height:64px;flex-shrink:0}.settings-about__heading-text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;min-width:0}.settings-about__title[_ngcontent-%COMP%]{font-size:1.15rem;font-weight:600;margin:0}.settings-about__intro[_ngcontent-%COMP%]{margin:0;color:var(--p-text-muted-color);font-size:.875rem}.settings-about__error[_ngcontent-%COMP%]{margin:0;padding:.5rem .75rem;border-radius:var(--p-border-radius);background:var(--p-message-error-background);color:var(--p-message-error-color);font-size:.875rem}.settings-about__list[_ngcontent-%COMP%]{margin:0;padding:0;display:flex;flex-direction:column;gap:.25rem}.settings-about__row[_ngcontent-%COMP%]{display:grid;grid-template-columns:180px 1fr;align-items:baseline;gap:.75rem;padding:.5rem .75rem;border-radius:var(--p-border-radius)}.settings-about__row[_ngcontent-%COMP%]:nth-child(odd){background:var(--p-content-hover-background)}.settings-about__label[_ngcontent-%COMP%]{margin:0;font-size:.875rem;color:var(--p-text-muted-color)}.settings-about__value[_ngcontent-%COMP%]{margin:0;font-family:var(--p-monospace-font-family);font-size:.875rem;word-break:break-all}.settings-about__link[_ngcontent-%COMP%]{color:var(--p-primary-color);text-decoration:none}.settings-about__link[_ngcontent-%COMP%]:hover, .settings-about__link[_ngcontent-%COMP%]:focus-visible{text-decoration:underline}.settings-about__star[_ngcontent-%COMP%]{--star-accent: #f4b400;display:flex;align-items:center;gap:.875rem;padding:.875rem 1rem;border-radius:var(--p-border-radius);border:1px solid color-mix(in oklab,var(--star-accent) 45%,transparent);background:color-mix(in oklab,var(--star-accent) 12%,transparent);color:var(--p-text-color);text-decoration:none;cursor:pointer;transition:background .15s ease,border-color .15s ease,transform .15s ease}.settings-about__star[_ngcontent-%COMP%]:hover, .settings-about__star[_ngcontent-%COMP%]:focus-visible{background:color-mix(in oklab,var(--star-accent) 22%,transparent);border-color:color-mix(in oklab,var(--star-accent) 70%,transparent);transform:translateY(-1px);outline:none}.app-dark[_nghost-%COMP%] .settings-about__star[_ngcontent-%COMP%], .app-dark [_nghost-%COMP%] .settings-about__star[_ngcontent-%COMP%]{background:color-mix(in oklab,var(--star-accent) 18%,transparent);border-color:color-mix(in oklab,var(--star-accent) 55%,transparent)}.app-dark[_nghost-%COMP%] .settings-about__star[_ngcontent-%COMP%]:hover, .app-dark [_nghost-%COMP%] .settings-about__star[_ngcontent-%COMP%]:hover, .app-dark[_nghost-%COMP%] .settings-about__star[_ngcontent-%COMP%]:focus-visible, .app-dark [_nghost-%COMP%] .settings-about__star[_ngcontent-%COMP%]:focus-visible{background:color-mix(in oklab,var(--star-accent) 30%,transparent);border-color:var(--star-accent)}.settings-about__star-icon[_ngcontent-%COMP%]{font-size:1.5rem;color:var(--star-accent);flex-shrink:0}.settings-about__star-text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.125rem;flex:1;min-width:0}.settings-about__star-heading[_ngcontent-%COMP%]{font-weight:600;font-size:.95rem}.settings-about__star-body[_ngcontent-%COMP%]{font-size:.8125rem;color:var(--p-text-muted-color);line-height:1.4}.settings-about__star-cta[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.375rem;padding:.375rem .75rem;border-radius:var(--sm-radius-pill);background:var(--star-accent);color:#1a1a1a;font-weight:600;font-size:.8125rem;white-space:nowrap;flex-shrink:0}.settings-about__star[_ngcontent-%COMP%]:hover .settings-about__star-cta[_ngcontent-%COMP%], .settings-about__star[_ngcontent-%COMP%]:focus-visible .settings-about__star-cta[_ngcontent-%COMP%]{background:color-mix(in oklab,var(--star-accent) 88%,white)}"],changeDetection:0})};function mn(t,n){if(!t||!n)return t;let e=n.replace(/[/\\]+$/,"");return t.startsWith(e)?t.slice(e.length).replace(/^[/\\]+/,""):t}var me=class t{ownerSig=m(null);dirtyCount=y(()=>{let n=this.ownerSig();return n?n.dirtyIds().size:0});register(n){this.ownerSig.set(n)}deregister(n){this.ownerSig()===n&&this.ownerSig.set(null)}async applyChanges(){let n=this.ownerSig();return n?n.applyChanges():{ok:!1}}discardChanges(){this.ownerSig()?.discardChanges()}static \u0275fac=function(e){return new(e||t)};static \u0275prov=be({token:t,factory:t.\u0275fac,providedIn:"root"})};var Bt={schemaVersion:1,entries:[{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 Kt=Bt;var hn=(t,n)=>n.version;function _n(t,n){if(t&1&&(b(0,"p",3),l(1),x()),t&2){let e=c();o(),p(" ",e.texts.changelogEmpty," ")}}function fn(t,n){if(t&1&&(b(0,"p",12),l(1),x()),t&2){let e=c(3);o(),p(" ",e.texts.changelogInternalRelease," ")}}function bn(t,n){if(t&1&&(b(0,"li",17),l(1),x()),t&2){let e=n.$implicit;o(),u(e)}}function vn(t,n){if(t&1&&(b(0,"ul",16),O(1,bn,2,1,"li",17,ee),x()),t&2){let e=c().$implicit,i=c(4);v("aria-label",i.texts.changelogAffectedPackages),o(),j(e.packages)}}function xn(t,n){if(t&1&&(b(0,"li",14),oe(1,"div",15),_(2,vn,3,1,"ul",16),x()),t&2){let e=n.$implicit;o(),W("innerHTML",e.bodyHtml,ot),o(),f(e.packages.length?2:-1)}}function yn(t,n){if(t&1&&(b(0,"ul",13),O(1,xn,3,2,"li",14,lt),x()),t&2){let e=c().$implicit;o(),j(e.highlights)}}function Cn(t,n){if(t&1&&(b(0,"li",8)(1,"header",9)(2,"span",10),l(3),x(),b(4,"span",11),l(5),x()(),_(6,fn,2,1,"p",12)(7,yn,3,0,"ul",13),x()),t&2){let e=n.$implicit;K("settings-changelog__entry--internal",e.kind==="internal"),v("data-testid","settings-changelog-entry-"+e.version),o(3),p("v",e.version),o(2),u(e.date),o(),f(e.kind==="internal"?6:7)}}function wn(t,n){if(t&1&&(b(0,"ol",4),O(1,Cn,8,6,"li",7,hn),x()),t&2){let e=c();o(),j(e.entries())}}var Pn=10,je=class t{markdown=P(Mt);texts=w;entries=m([]);hasEntries=y(()=>this.entries().length>0);ngOnInit(){this.renderAll()}async renderAll(){let n=[],e=Kt.entries.slice(0,Pn);for(let i of e){let r=[];for(let d of i.highlights)r.push({bodyHtml:await this.markdown.render(d.body),packages:d.packages});n.push({version:i.version,date:this.formatDate(i.date),kind:i.kind,highlights:r})}this.entries.set(n)}formatDate(n){let e=new Date(n+"T00:00:00Z");return Number.isNaN(e.getTime())?n:new Intl.DateTimeFormat("en-GB",{day:"numeric",month:"long",year:"numeric",timeZone:"UTC"}).format(e)}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=F({type:t,selectors:[["sm-settings-changelog"]],decls:11,vars:7,consts:[["data-testid","settings-changelog",1,"settings-changelog"],["id","settings-changelog-heading",1,"settings-changelog__title"],[1,"settings-changelog__intro"],["data-testid","settings-changelog-empty",1,"settings-changelog__empty"],["role","list",1,"settings-changelog__list"],["data-testid","settings-changelog-footer",1,"settings-changelog__footer"],["target","_blank","rel","noopener noreferrer",1,"settings-changelog__footer-link",3,"href"],[1,"settings-changelog__entry",3,"settings-changelog__entry--internal"],[1,"settings-changelog__entry"],[1,"settings-changelog__entry-header"],[1,"settings-changelog__version"],[1,"settings-changelog__date"],[1,"settings-changelog__internal-body"],["role","list",1,"settings-changelog__highlights"],[1,"settings-changelog__highlight"],[1,"settings-changelog__highlight-body",3,"innerHTML"],["role","list",1,"settings-changelog__packages"],[1,"settings-changelog__package"]],template:function(e,i){e&1&&(b(0,"section",0)(1,"h2",1),l(2),x(),b(3,"p",2),l(4),x(),_(5,_n,2,1,"p",3)(6,wn,3,0,"ol",4),b(7,"p",5),l(8),b(9,"a",6),l(10),x()()()),e&2&&(v("aria-labelledby","settings-changelog-heading"),o(2),p(" ",i.texts.changelogHeading," "),o(2),u(i.texts.changelogIntro),o(),f(i.hasEntries()?6:5),o(3),p(" ",i.texts.changelogFooterText," "),o(),W("href",i.texts.changelogFooterUrl,Z),o(),p(" ",i.texts.changelogFooterLinkLabel," "))},styles:["[_nghost-%COMP%]{display:block;height:100%;overflow-y:auto;padding:1.25rem 1.5rem}.settings-changelog__title[_ngcontent-%COMP%]{margin:0 0 .25rem;font-size:1.05rem;font-weight:600;color:var(--p-text-color)}.settings-changelog__intro[_ngcontent-%COMP%]{margin:0 0 1.25rem;font-size:.85rem;color:var(--sm-text-muted);line-height:1.5}.settings-changelog__empty[_ngcontent-%COMP%]{margin:1.5rem 0 0;font-size:.9rem;color:var(--sm-text-muted);font-style:italic}.settings-changelog__list[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:1.25rem}.settings-changelog__entry[_ngcontent-%COMP%]{border-left:2px solid var(--p-primary-color);padding:.25rem 0 .25rem .85rem}.settings-changelog__entry--internal[_ngcontent-%COMP%]{border-left-color:var(--sm-border)}.settings-changelog__entry-header[_ngcontent-%COMP%]{display:flex;align-items:baseline;gap:.6rem;margin-bottom:.45rem}.settings-changelog__version[_ngcontent-%COMP%]{font-family:var(--sm-font-mono);font-size:.95rem;font-weight:600;color:var(--p-text-color)}.settings-changelog__date[_ngcontent-%COMP%]{font-size:.78rem;color:var(--sm-text-muted)}.settings-changelog__internal-body[_ngcontent-%COMP%]{margin:0;font-size:.85rem;color:var(--sm-text-muted);font-style:italic}.settings-changelog__highlights[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.7rem}.settings-changelog__highlight[_ngcontent-%COMP%]{font-size:.88rem;line-height:1.5;color:var(--p-text-color)}.settings-changelog__highlight-body[_ngcontent-%COMP%]{margin:0}[_nghost-%COMP%] .settings-changelog__highlight-body p{margin:0}[_nghost-%COMP%] .settings-changelog__highlight-body p+p{margin-top:.45rem}[_nghost-%COMP%] .settings-changelog__highlight-body code{font-family:var(--sm-font-mono);font-size:.82rem;padding:.05rem .3rem;border-radius:var(--sm-radius-sm);background:var(--sm-bg-hover);color:var(--p-text-color)}[_nghost-%COMP%] .settings-changelog__highlight-body a{color:var(--p-primary-color);text-decoration:underline}[_nghost-%COMP%] .settings-changelog__highlight-body strong{font-weight:600}.settings-changelog__packages[_ngcontent-%COMP%]{list-style:none;margin:.4rem 0 0;padding:0;display:flex;flex-wrap:wrap;gap:.3rem}.settings-changelog__package[_ngcontent-%COMP%]{font-family:var(--sm-font-mono);font-size:.7rem;padding:.1rem .4rem;border-radius:var(--sm-radius-sm);background:var(--sm-bg-hover);color:var(--sm-text-muted);border:1px solid var(--sm-border);line-height:1.4}.settings-changelog__footer[_ngcontent-%COMP%]{margin:1.75rem 0 0;padding-top:1rem;border-top:1px solid var(--sm-border);font-size:.82rem;color:var(--sm-text-muted);text-align:center}.settings-changelog__footer-link[_ngcontent-%COMP%]{margin-left:.3rem;color:var(--p-primary-color);text-decoration:none;font-weight:500}.settings-changelog__footer-link[_ngcontent-%COMP%]:hover{text-decoration:underline}"],changeDetection:0})};var $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 kn=["handle"],Sn=["input"],En=t=>({checked:t});function Mn(t,n){t&1&&dt(0)}function In(t,n){if(t&1&&ie(0,Mn,1,0,"ng-container",3),t&2){let e=c();h("ngTemplateOutlet",e.handleTemplate||e._handleTemplate)("ngTemplateOutletContext",mt(2,En,e.checked()))}}var Tn=`
|
|
116
|
+
${$t}
|
|
117
|
+
|
|
118
|
+
p-toggleswitch.ng-invalid.ng-dirty > .p-toggleswitch-slider {
|
|
119
|
+
border-color: dt('toggleswitch.invalid.border.color');
|
|
120
|
+
}
|
|
121
|
+
`,On={root:{position:"relative"}},jn={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 bt{name="toggleswitch";style=Tn;classes=jn;inlineStyles=On;static \u0275fac=(()=>{let e;return function(r){return(e||(e=Be(t)))(r||t)}})();static \u0275prov=be({token:t,factory:t.\u0275fac})}return t})();var Ht=new et("TOGGLESWITCH_INSTANCE"),Dn={provide:Pt,useExisting:Je(()=>ue),multi:!0},ue=(()=>{class t extends kt{componentName="ToggleSwitch";$pcToggleSwitch=P(Ht,{optional:!0,skipSelf:!0})??void 0;bindDirectiveInstance=P(_e,{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 it;input;handleTemplate;_handleTemplate;focused=!1;_componentStyle=P(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(r){return(e||(e=Be(t)))(r||t)}})();static \u0275cmp=F({type:t,selectors:[["p-toggleswitch"],["p-toggleSwitch"],["p-toggle-switch"]],contentQueries:function(i,r,d){if(i&1&&ct(d,kn,4)(d,Ce,4),i&2){let g;ve(g=xe())&&(r.handleTemplate=g.first),ve(g=xe())&&(r.templates=g)}},viewQuery:function(i,r){if(i&1&>(Sn,5),i&2){let d;ve(d=xe())&&(r.input=d.first)}},hostVars:7,hostBindings:function(i,r){i&1&&C("click",function(g){return r.onHostClick(g)}),i&2&&(v("data-p-checked",r.checked())("data-p-disabled",r.$disabled())("data-p",r.dataP),pt(r.sx("root")),he(r.cn(r.cx("root"),r.styleClass)))},inputs:{styleClass:"styleClass",tabindex:[2,"tabindex","tabindex",ht],inputId:"inputId",readonly:[2,"readonly","readonly",$e],trueValue:"trueValue",falseValue:"falseValue",ariaLabel:"ariaLabel",size:[1,"size"],ariaLabelledBy:"ariaLabelledBy",autofocus:[2,"autofocus","autofocus",$e]},outputs:{onChange:"onChange"},features:[re([Dn,Gt,{provide:Ht,useExisting:t},{provide:vt,useExisting:t}]),at([_e]),st],decls:5,vars:22,consts:[["input",""],["type","checkbox","role","switch",3,"focus","blur","checked","pAutoFocus","pBind"],[3,"pBind"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(i,r){i&1&&(a(0,"input",1,0),C("focus",function(){return r.onFocus()})("blur",function(){return r.onBlur()}),s(),a(2,"div",2)(3,"div",2),_(4,In,1,4,"ng-container"),s()()),i&2&&(he(r.cx("input")),h("checked",r.checked())("pAutoFocus",r.autofocus)("pBind",r.ptm("input")),v("id",r.inputId)("required",r.required()?"":void 0)("disabled",r.$disabled()?"":void 0)("aria-checked",r.checked())("aria-labelledby",r.ariaLabelledBy)("aria-label",r.ariaLabel)("name",r.name())("tabindex",r.tabindex),o(2),he(r.cx("slider")),h("pBind",r.ptm("slider")),v("data-p",r.dataP),o(),he(r.cx("handle")),h("pBind",r.ptm("handle")),v("data-p",r.dataP),o(),f(r.handleTemplate||r._handleTemplate?4:-1))},dependencies:[ft,_t,xt,we,yt,_e],encapsulation:2,changeDetection:0})}return t})(),De=(()=>{class t{static \u0275fac=function(i){return new(i||t)};static \u0275mod=rt({type:t});static \u0275inj=Ze({imports:[ue,we,we]})}return t})();var Fn=(t,n)=>n.key;function An(t,n){if(t&1&&(a(0,"p-message",3),l(1),s()),t&2){let e=c();h("closable",!1),o(),T(" ",e.texts.general.loadErrorPrefix," ",n," ")}}function Nn(t,n){if(t&1&&(a(0,"p-message",4),l(1),s()),t&2){let e=c();h("closable",!1),o(),T(" ",e.texts.general.saveErrorPrefix," ",n," ")}}function Ln(t,n){if(t&1){let e=D();a(0,"li",6)(1,"div",8)(2,"div",9),l(3),s(),a(4,"div",10),l(5),s()(),a(6,"p-toggleswitch",15),C("ngModelChange",function(r){let d=S(e).$implicit,g=c();return E(g.onToggle(d,r))}),s()()}if(t&2){let e=n.$implicit,i=c();v("data-testid","settings-general-row-"+e.key),o(3),u(i.toggleLabel(e.key)),o(2),p(" ",i.toggleDescription(e.key)," "),o(),h("ngModel",i.valueOf(e))("disabled",i.loading()||i.isPending(e.key)||i.preferences()===null),v("data-testid","settings-general-toggle-"+e.key)}}function Rn(t,n){if(t&1&&(a(0,"span",16),l(1),s()),t&2){let e=n.$implicit;o(),p(" ",e.label," ")}}var Vn=[{key:"updateCheck.enabled",read:t=>t.updateCheck.enabled,patch:t=>({updateCheck:{enabled:t}})}],Fe="none";function zn(t){return t===null?Fe:t}function Bn(t){return t===Fe?null:t}var Ae=class t{dataSource=P(q);themeService=P(Te);visible=R.required();texts=w;toggles=Vn;extraThemeOptions=[{value:Fe,label:w.general.extraTheme.options.none.label,description:w.general.extraTheme.options.none.description},...zt.map(n=>({value:n.id,label:n.label,description:n.description}))];extraThemeWire=y(()=>zn(this.themeService.extraTheme()));loading=m(!1);loadError=m(null);saveError=m(null);preferences=m(null);pending=m(new Set);constructor(){L(()=>{this.visible()&&this.refresh()})}toggleLabel(n){return w.general.toggles[n].label}toggleDescription(n){return w.general.toggles[n].description}valueOf(n){let e=this.preferences();return e?n.read(e):!1}isPending(n){return this.pending().has(n)}onToggle(n,e){this.runToggle(n,e)}onExtraThemeChange(n){this.themeService.setExtraTheme(Bn(n??Fe))}async refresh(){this.loading.set(!0),this.loadError.set(null),this.saveError.set(null);try{let n=await this.dataSource.getPreferences();this.preferences.set(n)}catch(n){this.loadError.set(Wt(n)),this.preferences.set(null)}finally{this.loading.set(!1)}}async runToggle(n,e){if(this.pending().has(n.key))return;let i=new Set(this.pending());i.add(n.key),this.pending.set(i),this.saveError.set(null);try{let r=await this.dataSource.setPreferences(n.patch(e));this.preferences.set(r)}catch(r){this.saveError.set(Wt(r))}finally{let r=new Set(this.pending());r.delete(n.key),this.pending.set(r)}}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=F({type:t,selectors:[["sm-settings-general"]],inputs:{visible:[1,"visible"]},decls:22,vars:12,consts:[["data-testid","settings-general",1,"settings-general"],["id","settings-general-heading",1,"settings-general__title"],[1,"settings-general__intro"],["severity","error","data-testid","settings-general-load-error",3,"closable"],["severity","error","data-testid","settings-general-save-error",3,"closable"],["role","list",1,"settings-general__list"],[1,"settings-general__row"],["data-testid","settings-general-row-extra-theme",1,"settings-general__row"],[1,"settings-general__row-text"],[1,"settings-general__row-label"],[1,"settings-general__row-description"],["optionLabel","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"],[3,"ngModelChange","ngModel","disabled"],["data-testid","settings-general-extra-theme-option"]],template:function(e,i){if(e&1&&(a(0,"section",0)(1,"h2",1),l(2),s(),a(3,"p",2),l(4),s(),_(5,An,2,3,"p-message",3),_(6,Nn,2,3,"p-message",4),a(7,"ul",5),O(8,Ln,7,6,"li",6,Fn),a(10,"li",7)(11,"div",8)(12,"div",9),l(13),s(),a(14,"div",10),l(15),s()(),a(16,"p-selectbutton",11),C("ngModelChange",function(d){return i.onExtraThemeChange(d)}),ie(17,Rn,2,1,"ng-template",12),s()()(),a(18,"p",13),l(19),a(20,"code",14),l(21),s()()()),e&2){let r,d;v("aria-labelledby","settings-general-heading"),o(2),p(" ",i.texts.general.heading," "),o(2),u(i.texts.general.intro),o(),f((r=i.loadError())?5:-1,r),o(),f((d=i.saveError())?6:-1,d),o(2),j(i.toggles),o(5),p(" ",i.texts.general.extraTheme.label," "),o(2),p(" ",i.texts.general.extraTheme.description," "),o(),h("options",i.extraThemeOptions)("ngModel",i.extraThemeWire())("allowEmpty",!1),o(3),p(" ",i.texts.general.storageHintLabel," "),o(2),u(i.texts.general.storageHintPath)}},dependencies:[ce,le,de,pe,ge,Ce,Nt,At,De,ue],styles:["[_nghost-%COMP%]{display:block;height:100%;overflow-y:auto;padding:1.25rem 1.5rem}.settings-general__title[_ngcontent-%COMP%]{margin:0 0 .25rem;font-size:1.05rem;font-weight:600;color:var(--p-text-color)}.settings-general__intro[_ngcontent-%COMP%]{margin:0 0 1.25rem;font-size:.85rem;color:var(--sm-text-muted);line-height:1.5}.settings-general__list[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:1rem}.settings-general__row[_ngcontent-%COMP%]{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;padding:.85rem 1rem;border:1px solid var(--p-content-border-color);border-radius:.5rem;background:var(--p-content-background)}.settings-general__row-text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;flex:1 1 auto;min-width:0}.settings-general__row-label[_ngcontent-%COMP%]{font-size:.9rem;font-weight:600;color:var(--p-text-color)}.settings-general__row-description[_ngcontent-%COMP%]{font-size:.8rem;color:var(--sm-text-muted);line-height:1.45}.settings-general__storage-hint[_ngcontent-%COMP%]{margin:2rem 0 0;font-size:.75rem;line-height:1.5;color:var(--sm-text-muted);opacity:.65}.settings-general__storage-hint-path[_ngcontent-%COMP%]{font-family:var(--p-monospace-font-family);font-size:.72rem;padding:.05rem .3rem;border-radius:.25rem;background:var(--p-content-background);border:1px solid var(--p-content-border-color)}"],changeDetection:0})};function Wt(t){return t instanceof $||t instanceof Error?t.message:String(t)}var Ge={provider:"#7C3AED",extractor:"#A78BFA",analyzer:"#5FD17C",action:"#00C853",formatter:"#5BC0EB",hook:"#FFB627"};function Qt(t){let n=t.toLowerCase();return Ge[n]??"currentColor"}var Le=["all",...Object.keys(Ge)],Ne=["core","claude","antigravity","openai","agent-skills"];function X(t,n){return`${t}/${n}`}function He(t){let n=new Map;for(let e of t)if(!Re(e.status)&&e.extensions)for(let i of e.extensions)n.set(X(e.id,i.id),i.enabled);return n}function Ue(t){let n=t.target;return!n||typeof n.closest!="function"?!1:n.closest('label, button, input, [role="switch"], p-toggleswitch')!==null}function Yt(t,n){if(Kn(t,n))return[t];if(!t.extensions)return[];let e=t.extensions.filter(i=>$n(i,n));return e.length===0?[]:[J(U({},t),{extensions:e})]}function Jt(t,n){if(!t.extensions)return[];let e=t.extensions.filter(i=>i.kind.toLowerCase()===n);return e.length===0?[]:[J(U({},t),{extensions:e})]}function Zt(t){if(t.locked)return[];if(!t.extensions)return[t];let n=t.extensions.filter(e=>!e.locked);return n.length===0?[]:[J(U({},t),{extensions:n})]}function en(t){return t.slice().sort((e,i)=>{let r=Ne.indexOf(e.id),d=Ne.indexOf(i.id),g=r>=0?r:Ne.length,k=d>=0?d:Ne.length;return g!==k?g-k:e.id.localeCompare(i.id)}).map(e=>{if(!e.extensions)return e;let i=e.extensions.slice().sort((r,d)=>r.id.localeCompare(d.id));return J(U({},e),{extensions:i})})}function Kn(t,n){return!!(t.id.toLowerCase().includes(n)||t.description&&t.description.toLowerCase().includes(n))}function $n(t,n){return!!(t.id.toLowerCase().includes(n)||t.description&&t.description.toLowerCase().includes(n))}function Re(t){return t==="incompatible-spec"||t==="invalid-manifest"||t==="load-error"||t==="id-collision"}function We(t){return t instanceof $||t instanceof Error?t.message:String(t)}function tn(t,n){return Re(t.status)?n.statusFailure[t.status]??t.status:t.status==="enabled"?n.enabledLabel:n.disabledLabel}function nn(t,n){switch(t){case"built-in":return n.sourceBuiltIn;case"project":return n.sourceProject}}var qe="sm.settings.plugins.collapsed",Xe="sm.settings.plugins.kind-filter";function on(){let t=null;try{t=localStorage.getItem(qe)}catch{return new Set}if(!t)return new Set;let n;try{n=JSON.parse(t)}catch{return new Set}if(!Array.isArray(n))return new Set;let e=new Set;for(let i of n)typeof i=="string"&&i.length>0&&e.add(i);return e}function rn(t){try{if(t.size===0){localStorage.removeItem(qe);return}localStorage.setItem(qe,JSON.stringify([...t]))}catch{}}function an(){let t=null;try{t=localStorage.getItem(Xe)}catch{return"all"}return t&&Le.includes(t)?t:"all"}function sn(t){try{if(t==="all"){localStorage.removeItem(Xe);return}localStorage.setItem(Xe,t)}catch{}}function Qe(){tt(Qe);let t=m(on());L(()=>rn(t()));let n=i=>{let r=new Set(t());r.has(i)?r.delete(i):r.add(i),t.set(r)},e=i=>!t().has(i);return{collapsed:t.asReadonly(),toggleExpanded:n,isExpanded:e}}function ln(t){let n=m(""),e=y(()=>n().trim().length>0),i=m(an()),r=y(()=>i()!=="all");L(()=>sn(i()));let d=y(()=>en(t.plugins().flatMap(Zt))),g=y(()=>{let V=n().trim().toLowerCase(),Q=i(),z=d();return Q!=="all"&&(z=z.flatMap(Y=>Jt(Y,Q))),V.length>0&&(z=z.flatMap(Y=>Yt(Y,V))),z});return{searchText:n,searchActive:e,kindFilter:i,setKindFilter:V=>{i.set(V)},isKindFilterActive:V=>i()===V,kindFilterActive:r,kindFilterOptions:Le,visiblePlugins:d,filteredPlugins:g}}function dn(t){let n=m(!1),e=m(null),i=m(null),r=m([]),d=m(new Map),g=m(new Map),k=m(!1),G=y(()=>{let M=d(),A=g(),H=new Set;for(let[B,N]of A)M.get(B)!==N&&H.add(B);return H}),V=y(()=>G().size>0),Q=y(()=>r().some(M=>Re(M.status))),z=y(()=>{let M=g();for(let A of r()){if(A.startsAsDisabled!==!0)continue;let H=A.extensions??[];for(let B of H)if(M.get(X(A.id,B.id))===!0)return!0}return!1});return{plugins:r,loading:n,loadError:e,toggleError:i,applying:k,hasFailureRows:Q,originalState:d,pendingState:g,dirtyIds:G,hasPendingChanges:V,restartRecommended:z,pendingEnabled:M=>g().get(M)??!1,isDirty:M=>G().has(M),refresh:async()=>{n.set(!0),e.set(null),i.set(null);try{let M=await t.dataSource.listPlugins();r.set([...M.items]);let A=He(M.items);d.set(A),g.set(new Map(A))}catch(M){e.set(We(M)),r.set([]),d.set(new Map),g.set(new Map)}finally{n.set(!1)}},onExtensionToggle:(M,A,H)=>{if(k())return;let B=X(M,A.id),N=new Map(g());N.set(B,H),g.set(N)},applyChanges:async()=>{if(k())return{ok:!1};let M=G();if(M.size===0)return{ok:!1};let A=[],H=g();for(let N of M)A.push({id:N,enabled:H.get(N)??!1});k.set(!0),i.set(null);let B=!1;try{let N=await t.dataSource.applyPluginChanges(A);r.set([...N.items]);let Ye=He(N.items);d.set(Ye),g.set(new Map(Ye)),t.scanTrigger.run(),B=!0}catch(N){i.set(We(N))}finally{k.set(!1)}return{ok:B}},discardChanges:()=>{g.set(new Map(d())),i.set(null)}}}var cn=(t,n)=>n.id;function Un(t,n){if(t&1&&l(0),t&2){let e=c().$implicit,i=c();p(" ",e==="all"?i.texts.pluginsKindFilterAll:e," ")}}function Wn(t,n){if(t&1){let e=D();a(0,"p-togglebutton",16),C("ngModelChange",function(){let r=S(e).$implicit,d=c();return E(d.setKindFilter(r))}),ie(1,Un,1,1,"ng-template",null,0,ut),s()}if(t&2){let e=n.$implicit,i=c();Ke("--kind-color",e==="all"?null:i.kindTint(e)),h("ngModel",i.isKindFilterActive(e))("styleClass","settings-plugins__kind-chip"+(e==="all"?" is-all":""))("ariaLabel",i.texts.pluginsKindFilterOptionA11y(e,!i.isKindFilterActive(e))),v("data-testid","settings-plugins-kind-chip-"+e)}}function qn(t,n){if(t&1&&(a(0,"p-message",11),l(1),s()),t&2){let e=c();h("closable",!1),o(),p(" ",e.texts.unsavedChangesMessage(e.dirtyIds().size)," ")}}function Xn(t,n){if(t&1&&(a(0,"p",12),I(1,"i",17),l(2),s()),t&2){let e=c();o(2),p(" ",e.texts.loading," ")}}function Qn(t,n){if(t&1&&(a(0,"p-message",13),l(1),s()),t&2){let e=c();h("closable",!1),o(),T(" ",e.texts.errorPrefix," ",e.loadError()," ")}}function Yn(t,n){if(t&1&&(a(0,"p",14),l(1),s()),t&2){let e=c();o(),p(" ",e.texts.empty," ")}}function Jn(t,n){if(t&1){let e=D();a(0,"p-message",22),C("onClose",function(){S(e);let r=c(2);return E(r.toggleError.set(null))}),l(1),s()}if(t&2){let e=c(2);h("closable",!0),o(),T(" ",e.texts.toggleErrorPrefix," ",e.toggleError()," ")}}function Zn(t,n){if(t&1&&(a(0,"p",19),I(1,"i",23),l(2),s()),t&2){let e=c(2);o(2),p(" ",e.texts.pluginsSearchEmpty(e.searchText())," ")}}function ei(t,n){if(t&1){let e=D();a(0,"button",38),C("click",function(r){S(e);let d=c().$implicit;return c(2).toggleExpanded(d.id),E(r.stopPropagation())}),I(1,"i",39),s()}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(),K("fa-chevron-down",i.isExpanded(e.id))("fa-chevron-right",!i.isExpanded(e.id))}}function ti(t,n){t&1&&I(0,"span",27)}function ni(t,n){if(t&1&&(a(0,"span",32),l(1),s()),t&2){let e=c().$implicit;o(),p("v",e.version)}}function ii(t,n){if(t&1&&(a(0,"span",33),I(1,"i",40),l(2),s()),t&2){let e=c().$implicit,i=c(2);h("title",i.texts.lockedTooltip),v("data-testid","settings-row-locked-"+e.id),o(2),p(" ",i.texts.lockedLabel," ")}}function oi(t,n){if(t&1&&(a(0,"p",34),l(1),s()),t&2){let e=c().$implicit;o(),u(e.description)}}function ri(t,n){if(t&1&&(a(0,"span",35),l(1),s()),t&2){let e=c().$implicit;o(),u(e.reason)}}function ai(t,n){if(t&1&&(a(0,"p",36),I(1,"i",41),l(2),s()),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 si(t,n){if(t&1&&(a(0,"span",49),l(1),s()),t&2){let e=c().$implicit;o(),p("v",e.version)}}function li(t,n){if(t&1&&(a(0,"span",33),I(1,"i",40),l(2),s()),t&2){let e=c().$implicit,i=c(2).$implicit,r=c(2);h("title",r.texts.lockedTooltip),v("data-testid","settings-extrow-locked-"+i.id+"-"+e.id),o(2),p(" ",r.texts.lockedLabel," ")}}function di(t,n){if(t&1&&(a(0,"p",50),l(1),s()),t&2){let e=c().$implicit;o(),u(e.description)}}function ci(t,n){if(t&1){let e=D();a(0,"li",43),C("click",function(r){let d=S(e).$implicit,g=c(2).$implicit,k=c(2);return E(k.onSubrowClick(g.id,d,r))})("keydown.enter",function(r){let d=S(e).$implicit,g=c(2).$implicit,k=c(2);return E(k.onSubrowClick(g.id,d,r))})("keydown.space",function(r){let d=S(e).$implicit,g=c(2).$implicit,k=c(2);return r.preventDefault(),E(k.onSubrowClick(g.id,d,r))}),a(1,"div",44)(2,"div",45),I(3,"span",46),a(4,"span",47),l(5),s(),a(6,"span",48),l(7),s(),_(8,si,2,1,"span",49),_(9,li,3,3,"span",33),s(),_(10,di,2,1,"p",50),s(),a(11,"p-toggleswitch",51),C("ngModelChange",function(r){let d=S(e).$implicit,g=c(2).$implicit,k=c(2);return E(k.onExtensionToggle(g.id,d,r))}),s()()}if(t&2){let e=n.$implicit,i=c(2).$implicit,r=c(2);K("is-clickable",r.extensionToggleInteractive(e))("is-dirty",r.isDirty(r.qualifiedExt(i.id,e.id))),v("aria-label",r.texts.a11y.extensionRow(r.qualifiedExt(i.id,e.id)))("data-testid","settings-extrow-"+i.id+"-"+e.id),o(3),K("settings-plugins__dirty-dot--visible",r.isDirty(r.qualifiedExt(i.id,e.id))),v("data-testid","settings-extrow-dirty-"+i.id+"-"+e.id),o(2),u(e.id),o(),Ke("--kind-color",r.kindTint(e.kind)),o(),u(e.kind),o(),f(i.source==="project"?8:-1),o(),f(e.locked?9:-1),o(),f(e.description?10:-1),o(),h("ngModel",r.pendingEnabled(r.qualifiedExt(i.id,e.id)))("disabled",r.applying()||!!e.locked)("ariaLabel",r.texts.a11y.extensionToggle(r.qualifiedExt(i.id,e.id),!r.pendingEnabled(r.qualifiedExt(i.id,e.id)))),v("data-testid","settings-ext-toggle-"+i.id+"-"+e.id)}}function gi(t,n){if(t&1&&(a(0,"ul",37),O(1,ci,12,20,"li",42,cn),s()),t&2){let e=c().$implicit;v("data-testid","settings-extensions-"+e.id),o(),j(e.extensions)}}function pi(t,n){if(t&1){let e=D();a(0,"li",24)(1,"div",25),C("click",function(r){let d=S(e).$implicit,g=c(2);return E(g.onRowClick(d,r))})("keydown.enter",function(r){let d=S(e).$implicit,g=c(2);return E(g.onRowClick(d,r))})("keydown.space",function(r){let d=S(e).$implicit,g=c(2);return r.preventDefault(),E(g.onRowClick(d,r))}),_(2,ei,2,7,"button",26)(3,ti,1,0,"span",27),a(4,"div",28)(5,"div",29)(6,"span",30),l(7),s(),a(8,"span",31),l(9),s(),_(10,ni,2,1,"span",32),_(11,ii,3,3,"span",33),s(),_(12,oi,2,1,"p",34),_(13,ri,2,1,"span",35),_(14,ai,3,2,"p",36),s()(),_(15,gi,3,1,"ul",37),s()}if(t&2){let e=n.$implicit,i=c(2);K("is-clickable",i.rowIsClickable(e)),v("data-testid","settings-row-"+e.id),o(),v("aria-label",i.texts.a11y.pluginRow(e.id)),o(),f(i.canExpandExtensions(e)?2:3),o(5),u(e.id),o(2),u(i.sourceLabel(e.source)),o(),f(e.source==="project"&&e.version?10:-1),o(),f(e.locked?11:-1),o(),f(e.description?12:-1),o(),f(e.reason?13:-1),o(),f(i.showStartsAsDisabledHint(e)?14:-1),o(),f(i.canExpandExtensions(e)&&i.isExpanded(e.id)?15:-1)}}function mi(t,n){if(t&1&&(_(0,Jn,2,3,"p-message",18),_(1,Zn,3,1,"p",19),a(2,"ul",20),O(3,pi,16,13,"li",21,cn),s()),t&2){let e=c();f(e.toggleError()?0:-1),o(),f(e.searchActive()&&e.filteredPlugins().length===0?1:-1),o(2),j(e.filteredPlugins())}}function ui(t,n){if(t&1&&(a(0,"em",52),l(1),s()),t&2){let e=c(2);o(),p(" ",e.texts.startsAsDisabledFooterHint," ")}}function hi(t,n){if(t&1){let e=D();a(0,"footer",15),_(1,ui,2,1,"em",52),a(2,"p-button",53),C("onClick",function(){S(e);let r=c();return E(r.discardChanges())}),s(),a(3,"p-button",54),C("onClick",function(){S(e);let r=c();return E(r.applyChanges())}),s()()}if(t&2){let e=c();o(),f(e.restartRecommended()?1:-1),o(),h("text",!0)("label",e.texts.discardChanges)("ariaLabel",e.texts.discardA11y)("disabled",e.applying()),o(),h("label",e.texts.applyAndClose)("ariaLabel",e.texts.applyA11y)("disabled",e.applying())("loading",e.applying())}}var Ve=class t{dataSource=P(q);scanTrigger=P(Vt);buffer=P(me);destroyRef=P(nt);visible=R.required();applied=ye();texts=w;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=Qe();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(){L(()=>{this.visible()&&this.pluginState.refresh()});let n={dirtyIds:this.pluginState.dirtyIds,applyChanges:async()=>{let e=await this.pluginState.applyChanges();return e.ok&&this.applied.emit(),e},discardChanges:()=>this.pluginState.discardChanges()};this.buffer.register(n),this.destroyRef.onDestroy(()=>this.buffer.deregister(n))}setKindFilter(n){this.pluginFilter.setKindFilter(n)}isKindFilterActive(n){return this.pluginFilter.isKindFilterActive(n)}toggleExpanded(n){this.pluginCollapse.toggleExpanded(n)}isExpanded(n){return this.pluginCollapse.isExpanded(n)}pendingEnabled(n){return this.pluginState.pendingEnabled(n)}isDirty(n){return this.pluginState.isDirty(n)}showStartsAsDisabledHint(n){return!n.startsAsDisabled||!n.extensions?!1:n.extensions.some(e=>this.pendingEnabled(X(n.id,e.id)))}onExtensionToggle(n,e,i){this.pluginState.onExtensionToggle(n,e,i)}async applyChanges(){(await this.pluginState.applyChanges()).ok&&this.applied.emit()}discardChanges(){this.pluginState.discardChanges()}canExpandExtensions(n){return(n.extensions?.length??0)>0}extensionToggleInteractive(n){return!n.locked}rowIsClickable(n){return this.canExpandExtensions(n)}onRowClick(n,e){Ue(e)||this.canExpandExtensions(n)&&this.toggleExpanded(n.id)}onSubrowClick(n,e,i){if(Ue(i)||!this.extensionToggleInteractive(e))return;let r=X(n,e.id);this.onExtensionToggle(n,e,!this.pendingEnabled(r))}statusLabel(n){return tn(n,this.texts)}sourceLabel(n){return nn(n,this.texts)}qualifiedExt(n,e){return X(n,e)}kindTint(n){return Qt(n)}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=F({type:t,selectors:[["sm-settings-plugins"]],inputs:{visible:[1,"visible"]},outputs:{applied:"applied"},decls:19,vars:9,consts:[["content",""],["aria-labelledby","settings-plugins-heading",1,"settings-plugins"],[1,"settings-plugins__scroll"],[1,"settings-plugins__header"],["id","settings-plugins-heading",1,"settings-plugins__title"],[1,"settings-plugins__intro"],["iconPosition","left",1,"settings-plugins__search"],["styleClass","fa-solid fa-magnifying-glass"],["pInputText","","type","text","data-testid","settings-plugins-search",3,"ngModelChange","placeholder","ngModel"],["role","group","data-testid","settings-plugins-kind-filter",1,"settings-plugins__kind-filter"],[3,"ngModel","styleClass","--kind-color","ariaLabel"],["severity","warn","styleClass","settings-plugins__banner","data-testid","settings-banner-unsaved",3,"closable"],["data-testid","settings-loading",1,"settings-plugins__hint"],["severity","error","data-testid","settings-error",3,"closable"],["data-testid","settings-empty",1,"settings-plugins__hint"],["data-testid","settings-plugins-footer",1,"settings-plugins__footer"],[3,"ngModelChange","ngModel","styleClass","ariaLabel"],["aria-hidden","true",1,"fa-solid","fa-spinner","fa-spin"],["severity","error","data-testid","settings-toggle-error",3,"closable"],["data-testid","settings-search-empty",1,"settings-plugins__hint"],["role","list",1,"settings-plugins__list"],[1,"settings-plugins__row",3,"is-clickable"],["severity","error","data-testid","settings-toggle-error",3,"onClose","closable"],["aria-hidden","true",1,"fa-solid","fa-magnifying-glass"],[1,"settings-plugins__row"],["role","button","tabindex","0",1,"settings-plugins__row-main",3,"click","keydown.enter","keydown.space"],["type","button",1,"settings-plugins__expand"],["aria-hidden","true",1,"settings-plugins__expand-spacer"],[1,"settings-plugins__row-text"],[1,"settings-plugins__row-headline"],[1,"settings-plugins__row-id"],[1,"settings-plugins__row-source"],[1,"settings-plugins__row-version"],[1,"settings-plugins__row-locked",3,"title"],[1,"settings-plugins__row-description"],[1,"settings-plugins__row-reason"],[1,"settings-plugins__row-hint"],["role","list",1,"settings-plugins__sublist"],["type","button",1,"settings-plugins__expand",3,"click"],["aria-hidden","true",1,"fa-solid"],["aria-hidden","true",1,"fa-solid","fa-lock"],["aria-hidden","true",1,"fa-solid","fa-triangle-exclamation"],["role","button","tabindex","0",1,"settings-plugins__subrow",3,"is-clickable","is-dirty"],["role","button","tabindex","0",1,"settings-plugins__subrow",3,"click","keydown.enter","keydown.space"],[1,"settings-plugins__subrow-text"],[1,"settings-plugins__subrow-headline"],["aria-hidden","true",1,"settings-plugins__dirty-dot"],[1,"settings-plugins__subrow-id"],[1,"settings-plugins__subrow-kind"],[1,"settings-plugins__subrow-version"],[1,"settings-plugins__subrow-description"],[3,"ngModelChange","ngModel","disabled","ariaLabel"],["data-testid","settings-plugins-restart-hint",1,"settings-plugins__footer-hint"],["severity","secondary","data-testid","settings-plugins-discard",3,"onClick","text","label","ariaLabel","disabled"],["data-testid","settings-plugins-apply",3,"onClick","label","ariaLabel","disabled","loading"]],template:function(e,i){e&1&&(a(0,"section",1)(1,"div",2)(2,"header",3)(3,"h2",4),l(4),s(),a(5,"p",5),l(6),s()(),a(7,"p-iconfield",6),I(8,"p-inputicon",7),a(9,"input",8),C("ngModelChange",function(d){return i.searchText.set(d)}),s()(),a(10,"div",9),O(11,Wn,3,6,"p-togglebutton",10,ee),s(),_(13,qn,2,2,"p-message",11),_(14,Xn,3,1,"p",12)(15,Qn,2,3,"p-message",13)(16,Yn,2,1,"p",14)(17,mi,5,2),s(),_(18,hi,4,9,"footer",15),s()),e&2&&(o(4),p(" ",i.texts.pluginsHeading," "),o(2),u(i.texts.pluginsIntro),o(3),h("placeholder",i.texts.pluginsSearchPlaceholder)("ngModel",i.searchText()),v("aria-label",i.texts.pluginsSearchA11y),o(),v("aria-label",i.texts.pluginsKindFilterA11y),o(),j(i.kindFilterOptions),o(2),f(i.hasPendingChanges()?13:-1),o(),f(i.loading()?14:i.loadError()?15:i.plugins().length===0?16:17),o(4),f(i.hasPendingChanges()?18:-1))},dependencies:[ce,Ee,le,de,se,Pe,Tt,It,jt,Ot,Ie,Me,pe,ge,Et,St,De,ue],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%;overflow:hidden;--kind-color: var(--p-text-color)}.settings-plugins[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1;min-height:0}.settings-plugins__scroll[_ngcontent-%COMP%]{flex:1;overflow-y:auto;padding:1.25rem 1.5rem;display:flex;flex-direction:column;gap:.75rem;min-height:0}.settings-plugins__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.settings-plugins__title[_ngcontent-%COMP%]{font-size:1.15rem;font-weight:600;margin:0}.settings-plugins__intro[_ngcontent-%COMP%]{margin:0;color:var(--p-text-muted-color);font-size:.875rem}.settings-plugins__search[_ngcontent-%COMP%]{display:block;width:100%}.settings-plugins__search[_ngcontent-%COMP%] :where(input[_ngcontent-%COMP%]){width:100%}.settings-plugins__kind-filter[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:.375rem}.settings-plugins__kind-chip[_ngcontent-%COMP%]{--chip-accent: var(--kind-color);--p-togglebutton-padding: .25rem .625rem;--p-togglebutton-content-padding: 0;--p-togglebutton-content-checked-background: transparent;--p-togglebutton-content-checked-shadow: none;--p-togglebutton-border-radius: var(--sm-radius-pill);--p-togglebutton-background: color-mix(in oklab, var(--chip-accent) 8%, transparent);--p-togglebutton-hover-background: color-mix(in oklab, var(--chip-accent) 18%, transparent);--p-togglebutton-checked-background: color-mix(in oklab, var(--chip-accent) 80%, transparent);--p-togglebutton-border-color: color-mix(in oklab, var(--chip-accent) 35%, transparent);--p-togglebutton-hover-border-color: color-mix(in oklab, var(--chip-accent) 55%, transparent);--p-togglebutton-checked-border-color: var(--chip-accent);--p-togglebutton-color: color-mix(in oklab, var(--chip-accent) 70%, var(--p-text-color));--p-togglebutton-hover-color: color-mix(in oklab, var(--chip-accent) 70%, var(--p-text-color));--p-togglebutton-checked-color: var(--p-surface-50);font-size:.75rem;font-weight:500;letter-spacing:.02em;text-transform:lowercase}.app-dark[_nghost-%COMP%] .settings-plugins__kind-chip[_ngcontent-%COMP%], .app-dark [_nghost-%COMP%] .settings-plugins__kind-chip[_ngcontent-%COMP%]{--p-togglebutton-background: color-mix(in oklab, var(--chip-accent) 14%, transparent);--p-togglebutton-hover-background: color-mix(in oklab, var(--chip-accent) 26%, transparent);--p-togglebutton-checked-background: color-mix(in oklab, var(--chip-accent) 70%, transparent);--p-togglebutton-border-color: color-mix(in oklab, var(--chip-accent) 50%, transparent);--p-togglebutton-hover-border-color: color-mix(in oklab, var(--chip-accent) 70%, transparent);--p-togglebutton-color: color-mix(in oklab, var(--chip-accent) 80%, var(--p-text-color));--p-togglebutton-hover-color: color-mix(in oklab, var(--chip-accent) 80%, var(--p-text-color));--p-togglebutton-checked-color: var(--p-surface-900)}.settings-plugins__banner[_ngcontent-%COMP%]{display:block}.settings-plugins__banner-body[_ngcontent-%COMP%]{font-weight:400}.settings-plugins__hint[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;margin:0;padding:1rem 0;color:var(--p-text-muted-color);font-size:.875rem}.settings-plugins__list[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.25rem}.settings-plugins__row[_ngcontent-%COMP%]{border:1px solid var(--p-content-border-color);border-radius:var(--p-border-radius);background:var(--p-content-background);padding:.75rem .875rem;display:flex;flex-direction:column;gap:.5rem}.settings-plugins__row.is-clickable[_ngcontent-%COMP%]{cursor:pointer;transition:background .12s ease}.settings-plugins__row.is-clickable[_ngcontent-%COMP%]:hover{background:var(--p-content-hover-background)}.settings-plugins__row.is-failed[_ngcontent-%COMP%]{border-color:var(--p-message-error-border-color);background:var(--p-message-error-background)}.settings-plugins__row.is-extension-bundle[_ngcontent-%COMP%]{background:var(--p-content-background)}.settings-plugins__row-main[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.75rem}.settings-plugins__expand[_ngcontent-%COMP%], .settings-plugins__expand-spacer[_ngcontent-%COMP%]{width:1.75rem;height:1.75rem;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}.settings-plugins__expand[_ngcontent-%COMP%]{border:none;background:transparent;cursor:pointer;color:var(--p-text-muted-color);border-radius:var(--p-border-radius)}.settings-plugins__expand[_ngcontent-%COMP%]:hover{color:var(--p-text-color);background:var(--p-content-hover-background)}.settings-plugins__row-text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.125rem;flex:1;min-width:0}.settings-plugins__row-headline[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:baseline;gap:.5rem .75rem;position:relative}.settings-plugins__row-id[_ngcontent-%COMP%]{font-weight:600;font-family:var(--p-monospace-font-family)}.settings-plugins__row-source[_ngcontent-%COMP%], .settings-plugins__row-version[_ngcontent-%COMP%], .settings-plugins__subrow-kind[_ngcontent-%COMP%], .settings-plugins__subrow-version[_ngcontent-%COMP%]{display:inline-flex;align-items:center;font-size:.7rem;font-weight:500;letter-spacing:.02em;padding:.125rem .5rem;border-radius:var(--sm-radius-pill);white-space:nowrap}.settings-plugins__row-version[_ngcontent-%COMP%], .settings-plugins__subrow-version[_ngcontent-%COMP%]{font-family:var(--p-monospace-font-family)}.settings-plugins__row-source[_ngcontent-%COMP%], .settings-plugins__row-version[_ngcontent-%COMP%], .settings-plugins__subrow-version[_ngcontent-%COMP%]{background:color-mix(in oklab,var(--p-text-color) 8%,transparent);border:1px solid color-mix(in oklab,var(--p-text-color) 18%,transparent);color:var(--p-text-color)}.app-dark[_nghost-%COMP%] .settings-plugins__row-source[_ngcontent-%COMP%], .app-dark [_nghost-%COMP%] .settings-plugins__row-source[_ngcontent-%COMP%], .app-dark[_nghost-%COMP%] .settings-plugins__row-version[_ngcontent-%COMP%], .app-dark [_nghost-%COMP%] .settings-plugins__row-version[_ngcontent-%COMP%], .app-dark[_nghost-%COMP%] .settings-plugins__subrow-version[_ngcontent-%COMP%], .app-dark [_nghost-%COMP%] .settings-plugins__subrow-version[_ngcontent-%COMP%]{background:color-mix(in oklab,var(--p-text-color) 14%,transparent);border-color:color-mix(in oklab,var(--p-text-color) 28%,transparent)}.settings-plugins__subrow-kind[_ngcontent-%COMP%]{background:color-mix(in oklab,var(--kind-color) 14%,transparent);border:1px solid color-mix(in oklab,var(--kind-color) 38%,transparent);color:color-mix(in oklab,var(--kind-color) 70%,var(--p-surface-900))}.app-dark[_nghost-%COMP%] .settings-plugins__subrow-kind[_ngcontent-%COMP%], .app-dark [_nghost-%COMP%] .settings-plugins__subrow-kind[_ngcontent-%COMP%]{background:color-mix(in oklab,var(--kind-color) 22%,transparent);border-color:color-mix(in oklab,var(--kind-color) 55%,transparent);color:color-mix(in oklab,var(--kind-color) 80%,var(--p-surface-50))}.settings-plugins__row-status[_ngcontent-%COMP%]{font-weight:500}.settings-plugins__row-locked[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.25rem;font-size:.7rem;font-weight:500;letter-spacing:.02em;padding:.125rem .5rem;border-radius:var(--sm-radius-pill);white-space:nowrap;background:color-mix(in oklab,var(--p-message-warn-color) 14%,transparent);border:1px solid color-mix(in oklab,var(--p-message-warn-color) 35%,transparent);color:color-mix(in oklab,var(--p-message-warn-color) 70%,var(--p-surface-900))}.settings-plugins__row-locked[_ngcontent-%COMP%] > .pi[_ngcontent-%COMP%]{font-size:.7rem}.app-dark[_nghost-%COMP%] .settings-plugins__row-locked[_ngcontent-%COMP%], .app-dark [_nghost-%COMP%] .settings-plugins__row-locked[_ngcontent-%COMP%]{background:color-mix(in oklab,var(--p-message-warn-color) 22%,transparent);border-color:color-mix(in oklab,var(--p-message-warn-color) 55%,transparent);color:color-mix(in oklab,var(--p-message-warn-color) 85%,var(--p-surface-50))}.settings-plugins__row-description[_ngcontent-%COMP%]{margin:.25rem 0 0;font-size:.8125rem;line-height:1.4;color:var(--p-text-muted-color)}.settings-plugins__row-reason[_ngcontent-%COMP%]{font-size:.8125rem;color:var(--p-message-error-color);font-family:var(--p-monospace-font-family);margin-top:.25rem}.settings-plugins__sublist[_ngcontent-%COMP%]{list-style:none;margin:0;padding:.5rem 0 0 1.75rem;display:flex;flex-direction:column;gap:.25rem;border-top:1px dashed var(--p-content-border-color)}.settings-plugins__subrow[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding:.375rem .5rem;border-radius:var(--p-border-radius)}.settings-plugins__subrow.is-clickable[_ngcontent-%COMP%]{cursor:pointer;transition:background .12s ease}.settings-plugins__subrow.is-clickable[_ngcontent-%COMP%]:hover{background:var(--p-content-hover-background)}.settings-plugins__subrow-text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.125rem;flex:1;min-width:0}.settings-plugins__subrow-headline[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:baseline;gap:.5rem .75rem;position:relative}.settings-plugins__subrow-id[_ngcontent-%COMP%]{font-family:var(--p-monospace-font-family);font-size:.875rem}.settings-plugins__subrow-description[_ngcontent-%COMP%]{margin:.25rem 0 0;font-size:.75rem;line-height:1.4;color:var(--p-text-muted-color)}.settings-plugins__dirty-dot[_ngcontent-%COMP%]{position:absolute;left:-.75rem;top:50%;transform:translateY(-50%);width:.5rem;height:.5rem;border-radius:50%;background:var(--p-warn-color);visibility:hidden}.settings-plugins__dirty-dot--visible[_ngcontent-%COMP%]{visibility:visible}.settings-plugins__row-hint[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:.5rem;margin:.25rem 0 0;font-size:.75rem;line-height:1.4;color:var(--p-warn-color)}.settings-plugins__row-hint[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{margin-top:.125rem}.settings-plugins__footer[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;align-items:center;gap:.5rem;padding:.75rem 1.5rem;border-top:1px solid var(--p-content-border-color);background:var(--p-content-background)}.settings-plugins__footer-hint[_ngcontent-%COMP%]{font-style:italic;font-size:.75rem;line-height:1.4;color:var(--p-warn-color);margin-right:auto}"],changeDetection:0})};function fi(t,n){if(t&1&&(a(0,"p-message",4),l(1),s()),t&2){let e=c();h("closable",!1),o(),T(" ",e.texts.project.loadErrorPrefix," ",n," ")}}function bi(t,n){if(t&1&&(a(0,"p-message",5),l(1),s()),t&2){let e=c();h("closable",!1),o(),T(" ",e.texts.project.saveErrorPrefix," ",n," ")}}function vi(t,n){t&1&&(a(0,"p-message",6),l(1),s()),t&2&&(h("closable",!1),o(),p(" ",n," "))}function xi(t,n){if(t&1&&(a(0,"span",12),l(1),s()),t&2){let e=c();o(),u(e.texts.project.activeProviderSourceAutodetect)}}function yi(t,n){if(t&1&&(a(0,"span",12),l(1),s()),t&2){let e=c();o(),u(e.texts.project.activeProviderSourceNone)}}function Ci(t,n){if(t&1&&(a(0,"span",12),l(1),s()),t&2){let e=c(),i=c();o(),T(" ",i.texts.project.activeProviderDetectedPrefix," ",e," ")}}function wi(t,n){t&1&&_(0,Ci,2,2,"span",12),t&2&&f(n.length>0?0:-1)}function Pi(t,n){if(t&1&&(a(0,"p-message",15),l(1),s()),t&2){let e=c();h("closable",!1),o(),T(" ",e.texts.project.loadErrorPrefix," ",n," ")}}function ki(t,n){if(t&1&&(a(0,"p-message",16),l(1),s()),t&2){let e=c();h("closable",!1),o(),T(" ",e.texts.project.saveErrorPrefix," ",n," ")}}function Si(t,n){if(t&1){let e=D();a(0,"li",19)(1,"span",27),l(2),s(),a(3,"p-button",28),C("onClick",function(){let r=S(e).$implicit,d=c();return E(d.onReferencePathRemove(r))}),s()()}if(t&2){let e=n.$implicit,i=c();o(2),u(e),o(),h("label",i.texts.project.removePathLabel)("outlined",!0)("disabled",i.isPending("scan.referencePaths")),v("data-testid","settings-project-reference-paths-remove")}}function Ei(t,n){if(t&1&&(a(0,"p-message",22),l(1),s()),t&2){let e=c();h("closable",!1),o(),T(" ",e.texts.project.loadErrorPrefix," ",n," ")}}function Mi(t,n){if(t&1&&(a(0,"p-message",23),l(1),s()),t&2){let e=c();h("closable",!1),o(),T(" ",e.texts.project.saveErrorPrefix," ",n," ")}}function Ii(t,n){if(t&1){let e=D();a(0,"li",19)(1,"span",27),l(2),s(),a(3,"p-button",28),C("onClick",function(){let r=S(e).$implicit,d=c();return E(d.onIgnorePatternRemove(r))}),s()()}if(t&2){let e=n.$implicit,i=c();o(2),u(e),o(),h("label",i.texts.project.removeIgnorePatternLabel)("outlined",!0)("disabled",i.isPending("ignore.patterns")),v("data-testid","settings-project-ignore-patterns-remove")}}var Ti=/[\n\r\x00-\x1F\x7F]/,ze=class t{dataSource=P(q);confirmation=P(ae);providerRegistry=P(Lt);visible=R.required();texts=w;loading=m(!1);loadError=m(null);saveError=m(null);preferences=m(null);pending=m(new Set);newReferencePath=m("");referencePaths=y(()=>this.preferences()?.scan.referencePaths??[]);ignoreLoadError=m(null);ignoreSaveError=m(null);ignoreEnvelope=m(null);newIgnorePattern=m("");ignorePatterns=y(()=>this.ignoreEnvelope()?.patterns??[]);activeProviderEnvelope=m(null);activeProviderLoadError=m(null);activeProviderSaveError=m(null);activeProviderSwitchAnnouncement=m(null);providerOptions=y(()=>[{id:"",label:w.project.activeProviderEmptyOption},...this.providerRegistry.providers().map(n=>({id:n.id,label:n.label}))]);activeProviderValue=y(()=>this.activeProviderEnvelope()?.activeProvider??"");activeProviderDetectedLabel=y(()=>(this.activeProviderEnvelope()?.detected??[]).join(", "));activeProviderSource=y(()=>this.activeProviderEnvelope()?.source??"none");constructor(){L(()=>{this.visible()&&(this.refresh(),this.refreshIgnore(),this.refreshActiveProvider())})}isPending(n){return this.pending().has(n)}onReferencePathAdd(){let n=this.newReferencePath().trim();if(n.length===0)return;if(n.includes(",")){this.saveError.set(this.texts.project.commaForbidden);return}let e=[...this.referencePaths(),n];this.runPatch("scan.referencePaths",{scan:{referencePaths:e}}).then(i=>{i&&this.newReferencePath.set("")})}onReferencePathRemove(n){let e=this.referencePaths().filter(i=>i!==n);this.runPatch("scan.referencePaths",{scan:{referencePaths:[...e]}})}onIgnorePatternAdd(){let n=this.newIgnorePattern().trim();if(n.length===0){this.ignoreSaveError.set(this.texts.project.ignorePatternEmpty);return}if(Ti.test(n)){this.ignoreSaveError.set(this.texts.project.ignorePatternHasControlChar);return}let e=this.ignorePatterns();if(e.includes(n)){this.ignoreSaveError.set(this.texts.project.ignorePatternDuplicate);return}let i=[...e,n];this.runIgnorePatch({patterns:i}).then(r=>{r&&this.newIgnorePattern.set("")})}onIgnorePatternRemove(n){let e=this.ignorePatterns().filter(i=>i!==n);this.runIgnorePatch({patterns:[...e]})}onActiveProviderChange(n){n===""||n===this.activeProviderValue()||this.confirmActiveProviderSwitch(n,async()=>{await this.runActiveProviderSwitch(n)})}async refresh(){this.loading.set(!0),this.loadError.set(null),this.saveError.set(null);try{let n=await this.dataSource.getProjectPreferences();this.preferences.set(n)}catch(n){this.loadError.set(ne(n)),this.preferences.set(null)}finally{this.loading.set(!1)}}async refreshIgnore(){this.ignoreLoadError.set(null),this.ignoreSaveError.set(null);try{let n=await this.dataSource.getProjectIgnore();this.ignoreEnvelope.set(n)}catch(n){this.ignoreLoadError.set(ne(n)),this.ignoreEnvelope.set(null)}}async refreshActiveProvider(){this.activeProviderLoadError.set(null),this.activeProviderSaveError.set(null);try{let n=await this.dataSource.getActiveProvider();this.activeProviderEnvelope.set(n)}catch(n){this.activeProviderLoadError.set(ne(n)),this.activeProviderEnvelope.set(null)}}async runActiveProviderSwitch(n){this.activeProviderSaveError.set(null),this.activeProviderSwitchAnnouncement.set(null);try{let e=await this.dataSource.setActiveProvider(n);this.activeProviderEnvelope.set({activeProvider:e.activeProvider,detected:e.detected,source:e.source});let i=e.switch.dropped;if(i===null)this.activeProviderSwitchAnnouncement.set(this.texts.project.activeProviderSwitchedNoDb);else{let r=this.texts.project;this.activeProviderSwitchAnnouncement.set(`${r.activeProviderSwitchedPrefix} ${i.tableCount} ${r.activeProviderSwitchedSuffix}`)}}catch(e){this.activeProviderSaveError.set(ne(e))}}confirmActiveProviderSwitch(n,e){this.confirmation.confirm({header:this.texts.project.activeProviderConfirmHeader,message:this.texts.project.activeProviderConfirmIntro,acceptLabel:this.texts.project.activeProviderConfirmAccept,rejectLabel:this.texts.project.activeProviderConfirmReject,acceptButtonProps:{severity:"primary"},rejectButtonProps:{severity:"secondary"},accept:()=>{e()},reject:()=>{let i=this.activeProviderEnvelope();i&&this.activeProviderEnvelope.set(U({},i))}})}async runPatch(n,e){if(this.pending().has(n))return!1;let i=new Set(this.pending());i.add(n),this.pending.set(i),this.saveError.set(null);let r=!1;try{let d=await this.dataSource.setProjectPreferences(e);this.preferences.set(d),r=!0}catch(d){if(d instanceof $&&d.code==="confirm-required"){let g=d.paths??[];this.confirmDialog(g,async()=>{try{let k=await this.dataSource.setProjectPreferences(J(U({},e),{confirm:!0}));this.preferences.set(k),this.newReferencePath.set("")}catch(k){this.saveError.set(ne(k))}})}else this.saveError.set(ne(d))}finally{let d=new Set(this.pending());d.delete(n),this.pending.set(d)}return r}async runIgnorePatch(n){let e="ignore.patterns";if(this.pending().has(e))return!1;let i=new Set(this.pending());i.add(e),this.pending.set(i),this.ignoreSaveError.set(null);let r=!1;try{let d=await this.dataSource.setProjectIgnore(n);this.ignoreEnvelope.set(d),r=!0}catch(d){this.ignoreSaveError.set(ne(d))}finally{let d=new Set(this.pending());d.delete(e),this.pending.set(d)}return r}confirmDialog(n,e){this.confirmation.confirm({header:w.project.confirmDialogHeader,message:w.project.confirmDialogIntro+`
|
|
122
|
+
`+n.map(i=>`\u2022 ${i}`).join(`
|
|
123
|
+
`),acceptLabel:w.project.confirmDialogAccept,rejectLabel:w.project.confirmDialogReject,acceptButtonProps:{severity:"primary"},rejectButtonProps:{severity:"secondary"},accept:()=>{e()}})}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=F({type:t,selectors:[["sm-settings-project"]],inputs:{visible:[1,"visible"]},features:[re([ae])],decls:58,vars:36,consts:[["data-testid","settings-project",1,"settings-project"],["id","settings-project-heading",1,"settings-project__title"],[1,"settings-project__intro"],[1,"settings-project__intro-path"],["severity","error","data-testid","settings-project-active-provider-load-error",3,"closable"],["severity","error","data-testid","settings-project-active-provider-save-error",3,"closable"],["severity","info","data-testid","settings-project-active-provider-switch-announce",3,"closable"],["data-testid","settings-project-active-provider-row",1,"settings-project__list-row"],[1,"settings-project__row-text"],[1,"settings-project__row-label"],[1,"settings-project__row-description"],[1,"settings-project__row-meta"],[1,"settings-project__meta-line"],[1,"settings-project__add-row"],["optionLabel","label","optionValue","id","appendTo","body","data-testid","settings-project-active-provider-select",1,"settings-project__provider-select",3,"ngModelChange","options","ngModel"],["severity","error","data-testid","settings-project-load-error",3,"closable"],["severity","error","data-testid","settings-project-save-error",3,"closable"],["data-testid","settings-project-reference-paths-row",1,"settings-project__list-row"],["role","list",1,"settings-project__path-list"],[1,"settings-project__path-item"],["type","text","pInputText","","data-testid","settings-project-reference-paths-input",3,"ngModelChange","keydown.enter","ngModel","placeholder","disabled"],["severity","primary","size","small","data-testid","settings-project-reference-paths-add",3,"onClick","label","disabled"],["severity","error","data-testid","settings-project-ignore-load-error",3,"closable"],["severity","error","data-testid","settings-project-ignore-save-error",3,"closable"],["data-testid","settings-project-ignore-patterns-row",1,"settings-project__list-row"],["type","text","pInputText","","data-testid","settings-project-ignore-patterns-input",3,"ngModelChange","keydown.enter","ngModel","placeholder","disabled"],["severity","primary","size","small","data-testid","settings-project-ignore-patterns-add",3,"onClick","label","disabled"],[1,"settings-project__path-text"],["severity","secondary","size","small",3,"onClick","label","outlined","disabled"]],template:function(e,i){if(e&1&&(a(0,"section",0)(1,"h2",1),l(2),s(),a(3,"p",2),l(4),a(5,"code",3),l(6),s(),l(7),s(),_(8,fi,2,3,"p-message",4),_(9,bi,2,3,"p-message",5),_(10,vi,2,2,"p-message",6),a(11,"div",7)(12,"div",8)(13,"div",9),l(14),s(),a(15,"div",10),l(16),s(),a(17,"div",11),_(18,xi,2,1,"span",12)(19,yi,2,1,"span",12),_(20,wi,1,1),s()(),a(21,"div",13)(22,"p-select",14),C("ngModelChange",function(d){return i.onActiveProviderChange(d)}),s()()(),_(23,Pi,2,3,"p-message",15),_(24,ki,2,3,"p-message",16),a(25,"div",17)(26,"div",8)(27,"div",9),l(28),s(),a(29,"div",10),l(30),s()(),a(31,"ul",18),O(32,Si,4,5,"li",19,ee),s(),a(34,"div",13)(35,"input",20),C("ngModelChange",function(d){return i.newReferencePath.set(d)})("keydown.enter",function(){return i.onReferencePathAdd()}),s(),a(36,"p-button",21),C("onClick",function(){return i.onReferencePathAdd()}),s()()(),_(37,Ei,2,3,"p-message",22),_(38,Mi,2,3,"p-message",23),a(39,"div",24)(40,"div",8)(41,"div",9),l(42),s(),a(43,"div",10),l(44),a(45,"code",3),l(46),s(),l(47),a(48,"code",3),l(49),s(),l(50),s()(),a(51,"ul",18),O(52,Ii,4,5,"li",19,ee),s(),a(54,"div",13)(55,"input",25),C("ngModelChange",function(d){return i.newIgnorePattern.set(d)})("keydown.enter",function(){return i.onIgnorePatternAdd()}),s(),a(56,"p-button",26),C("onClick",function(){return i.onIgnorePatternAdd()}),s()()(),I(57,"p-confirmdialog"),s()),e&2){let r,d,g,k,G,V,Q,z,Y;v("aria-labelledby","settings-project-heading"),o(2),p(" ",i.texts.project.heading," "),o(2),p(" ",i.texts.project.introPrefix," "),o(2),u(i.texts.project.introPath),o(),p("",i.texts.project.introSuffix," "),o(),f((r=i.activeProviderLoadError())?8:-1,r),o(),f((d=i.activeProviderSaveError())?9:-1,d),o(),f((g=i.activeProviderSwitchAnnouncement())?10:-1,g),o(4),u(i.texts.project.activeProviderLabel),o(2),p(" ",i.texts.project.activeProviderDescription," "),o(2),f((k=i.activeProviderSource())==="autodetect"?18:k==="none"?19:-1),o(2),f((G=i.activeProviderDetectedLabel())?20:-1,G),o(2),h("options",i.providerOptions())("ngModel",i.activeProviderValue()),o(),f((V=i.loadError())?23:-1,V),o(),f((Q=i.saveError())?24:-1,Q),o(4),u(i.texts.project.referencePathsLabel),o(2),p(" ",i.texts.project.referencePathsDescription," "),o(2),j(i.referencePaths()),o(3),h("ngModel",i.newReferencePath())("placeholder",i.texts.project.referencePathsPlaceholder)("disabled",i.isPending("scan.referencePaths")),o(),h("label",i.texts.project.addPathLabel)("disabled",i.isPending("scan.referencePaths")||i.newReferencePath().trim().length===0),o(),f((z=i.ignoreLoadError())?37:-1,z),o(),f((Y=i.ignoreSaveError())?38:-1,Y),o(4),u(i.texts.project.ignorePatternsLabel),o(2),p(" ",i.texts.project.ignorePatternsDescriptionPrefix," "),o(2),u(i.texts.project.ignorePatternsDescriptionFile),o(),p(" ",i.texts.project.ignorePatternsDescriptionMiddle," "),o(2),u(i.texts.project.ignorePatternsDescriptionGitignore),o(),p(" ",i.texts.project.ignorePatternsDescriptionSuffix," "),o(2),j(i.ignorePatterns()),o(3),h("ngModel",i.newIgnorePattern())("placeholder",i.texts.project.ignorePatternsPlaceholder)("disabled",i.isPending("ignore.patterns")),o(),h("label",i.texts.project.addIgnorePatternLabel)("disabled",i.isPending("ignore.patterns")||i.newIgnorePattern().trim().length===0)}},dependencies:[ce,Ee,le,de,se,Pe,Se,ke,Ie,Me,pe,ge,Ft,Dt],styles:["[_nghost-%COMP%]{display:block;height:100%;overflow-y:auto;padding:1.25rem 1.5rem}.settings-project__title[_ngcontent-%COMP%]{margin:0 0 .25rem;font-size:1.05rem;font-weight:600;color:var(--p-text-color)}.settings-project__intro[_ngcontent-%COMP%]{margin:0 0 1.25rem;font-size:.85rem;color:var(--sm-text-muted);line-height:1.5}.settings-project__intro-path[_ngcontent-%COMP%]{font-family:var(--p-monospace-font-family);font-size:.8rem;padding:.05rem .3rem;border-radius:.25rem;background:var(--p-content-background);border:1px solid var(--p-content-border-color)}[_nghost-%COMP%] p-message[_ngcontent-%COMP%]{display:block;margin-bottom:1rem}.settings-project__row[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.85rem 1rem;border:1px solid var(--p-content-border-color);border-radius:.5rem;background:var(--p-content-background);margin-bottom:1rem}.settings-project__row[_ngcontent-%COMP%] > p-toggleswitch[_ngcontent-%COMP%]{flex:0 0 auto;align-self:center}.settings-project__list-row[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.75rem;padding:.85rem 1rem;border:1px solid var(--p-content-border-color);border-radius:.5rem;background:var(--p-content-background);margin-bottom:1rem}.settings-project__row-text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;flex:1 1 auto;min-width:0}.settings-project__row-label[_ngcontent-%COMP%]{font-size:.9rem;font-weight:600;color:var(--p-text-color)}.settings-project__row-description[_ngcontent-%COMP%]{font-size:.8rem;color:var(--sm-text-muted);line-height:1.45}.settings-project__path-list[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.4rem}.settings-project__path-item[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding:.4rem .6rem;border-radius:.35rem;background:var(--p-content-hover-background)}.settings-project__path-text[_ngcontent-%COMP%]{font-family:var(--p-font-family-mono);font-size:.8rem;word-break:break-all;flex:1 1 auto}.settings-project__add-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.settings-project__add-row[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{flex:1 1 auto;font-family:var(--p-font-family-mono);font-size:.8rem}.settings-project__row-meta[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.15rem;font-size:.75rem;color:var(--p-text-muted-color)}.settings-project__meta-line[_ngcontent-%COMP%]{line-height:1.3}.settings-project__provider-select[_ngcontent-%COMP%]{flex:1 1 auto}.settings-project__provider-select[_ngcontent-%COMP%] .p-select[_ngcontent-%COMP%]{width:100%}"],changeDetection:0})};function ne(t){return t instanceof $||t instanceof Error?t.message:String(t)}var Oi=(t,n)=>n.id;function ji(t,n){if(t&1){let e=D();a(0,"li")(1,"button",6),C("click",function(){let r=S(e).$implicit,d=c();return E(d.selectSection(r.id))}),a(2,"span",7),l(3),s()()()}if(t&2){let e=n.$implicit,i=c();o(),K("is-active",i.activeSection()===e.id),v("aria-current",i.activeSection()===e.id?"page":null)("data-testid","settings-nav-"+e.id),o(2),u(e.label)}}function Di(t,n){if(t&1){let e=D();a(0,"sm-settings-plugins",8),C("applied",function(){S(e);let r=c();return E(r.onPluginsApplied())}),s()}if(t&2){let e=c();h("visible",e.pluginsVisible())}}function Fi(t,n){if(t&1&&I(0,"sm-settings-general",5),t&2){let e=c();h("visible",e.generalVisible())}}function Ai(t,n){if(t&1&&I(0,"sm-settings-project",5),t&2){let e=c();h("visible",e.projectVisible())}}function Ni(t,n){if(t&1&&I(0,"sm-settings-about",5),t&2){let e=c();h("visible",e.aboutVisible())}}function Li(t,n){t&1&&I(0,"sm-settings-changelog")}var Ri=[{id:"general",label:w.sections.general},{id:"project",label:w.sections.project},{id:"plugins",label:w.sections.plugins},{id:"changelog",label:w.sections.changelog},{id:"about",label:w.sections.about}],gn=class t{visible=R.required();visibleChange=ye();confirmation=P(ae);buffer=P(me);texts=w;sections=Ri;activeSection=m("plugins");pluginsVisible=y(()=>this.visible()&&this.activeSection()==="plugins");generalVisible=y(()=>this.visible()&&this.activeSection()==="general");projectVisible=y(()=>this.visible()&&this.activeSection()==="project");aboutVisible=y(()=>this.visible()&&this.activeSection()==="about");onVisibleChange(n){if(n){this.visibleChange.emit(!0);return}let e=this.buffer.dirtyCount();if(e===0){this.visibleChange.emit(!1);return}this.confirmation.confirm({header:this.texts.confirmCloseTitle,message:this.texts.confirmCloseBody(e),acceptLabel:this.texts.applyAndClose,rejectLabel:this.texts.discardChanges,acceptButtonProps:{severity:"primary"},rejectButtonProps:{severity:"secondary"},accept:()=>{this.buffer.applyChanges()},reject:()=>{this.buffer.discardChanges(),this.visibleChange.emit(!1)}})}selectSection(n){this.activeSection.set(n)}onPluginsApplied(){this.visibleChange.emit(!1)}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=F({type:t,selectors:[["sm-settings-modal"]],inputs:{visible:[1,"visible"]},outputs:{visibleChange:"visibleChange"},features:[re([ae])],decls:13,vars:10,consts:[["styleClass","settings-modal__dialog","contentStyleClass","settings-modal__content","data-testid","settings-modal",3,"visibleChange","visible","modal","draggable","resizable","closable","closeOnEscape","dismissableMask","header"],[1,"settings-modal__layout"],["data-testid","settings-modal-sidebar",1,"settings-modal__sidebar"],["role","list",1,"settings-modal__sidebar-list"],["data-testid","settings-modal-main",1,"settings-modal__main"],[3,"visible"],["type","button",1,"settings-modal__sidebar-item",3,"click"],[1,"settings-modal__sidebar-label"],[3,"applied","visible"]],template:function(e,i){if(e&1&&(a(0,"p-dialog",0),C("visibleChange",function(d){return i.onVisibleChange(d)}),a(1,"div",1)(2,"nav",2)(3,"ul",3),O(4,ji,4,5,"li",null,Oi),s()(),a(6,"div",4),_(7,Di,1,1,"sm-settings-plugins",5)(8,Fi,1,1,"sm-settings-general",5)(9,Ai,1,1,"sm-settings-project",5)(10,Ni,1,1,"sm-settings-about",5)(11,Li,1,0,"sm-settings-changelog"),s()(),I(12,"p-confirmdialog"),s()),e&2){let r;h("visible",i.visible())("modal",!0)("draggable",!1)("resizable",!1)("closable",!0)("closeOnEscape",!0)("dismissableMask",!0)("header",i.texts.modalTitle),o(2),v("aria-label",i.texts.modalTitle),o(2),j(i.sections),o(3),f((r=i.activeSection())==="plugins"?7:r==="general"?8:r==="project"?9:r==="about"?10:r==="changelog"?11:-1)}},dependencies:[se,Se,ke,wt,Ct,Oe,je,Ae,Ve,ze],styles:["[_nghost-%COMP%]{display:contents;--p-message-error-color: #fca5a5;--p-message-error-background: color-mix(in srgb, #ef4444 14%, transparent);--p-message-error-border-color: color-mix(in srgb, #ef4444 45%, transparent)}[_nghost-%COMP%] .settings-modal__dialog{width:1024px;height:720px;max-width:92vw;max-height:90vh}[_nghost-%COMP%] .settings-modal__content{padding:0;height:100%;display:flex;flex-direction:column;overflow:hidden}.settings-modal__layout[_ngcontent-%COMP%]{flex:1;display:grid;grid-template-columns:200px 1fr;min-height:0}.settings-modal__sidebar[_ngcontent-%COMP%]{border-right:1px solid var(--p-content-border-color);background:var(--p-content-background);padding:.5rem;overflow-y:auto}.settings-modal__sidebar-list[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.125rem}.settings-modal__sidebar-item[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:.5rem;width:100%;padding:.5rem .75rem;border:none;border-radius:var(--p-border-radius);background:transparent;color:var(--p-text-color);font:inherit;text-align:left;cursor:pointer;transition:background .15s ease,color .15s ease}.settings-modal__sidebar-item[_ngcontent-%COMP%]:hover{background:var(--p-content-hover-background)}.settings-modal__sidebar-item.is-active[_ngcontent-%COMP%]{background:var(--p-highlight-background);color:var(--p-highlight-color)}.settings-modal__sidebar-label[_ngcontent-%COMP%]{flex:1;font-size:.9rem;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.settings-modal__main[_ngcontent-%COMP%]{min-width:0;min-height:0;overflow:hidden;display:flex;flex-direction:column}.settings-modal__main[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1;min-height:0}"],changeDetection:0})};export{gn as SettingsModal};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Ab as m,I as a,J as l,L as s,Md as k,N as o,Qb as b,Qd as D,Sa as f,Ta as x,Ua as g,Va as v,ac as I,db as h,ed as y,ga as p,hd as N,ia as c,mc as T,od as r,qc as i,rd as M,yc as u}from"./chunk-YL6SWAFJ.js";var w=`
|
|
2
2
|
.p-inputtext {
|
|
3
3
|
font-family: inherit;
|
|
4
4
|
font-feature-settings: inherit;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{$ as W,Ab as M,Ca as ne,Cb as c,Db as P,Eb as R,Fa as s,Fb as j,Hb as T,I as b,Ib as w,Ic as Q,J as L,Jd as de,L as A,Lc as K,Mb as oe,N as m,Nc as H,Oc as q,Pb as re,Qb as p,Ra as I,Rb as z,Sa as V,Sb as O,T as h,U as y,Ua as N,Uc as se,V as D,Va as x,Wa as l,ac as $,bd as G,cd as C,db as f,dd as pe,ed as U,hd as Y,ia as v,id as Z,jc as ae,mb as r,mc as ce,nb as u,ob as _,od as g,pb as F,qb as X,rb as J,sb as ee,sd as le,tb as k,ub as S,yb as E,yc as B,zb as ie}from"./chunk-YL6SWAFJ.js";var me=class e{loader=m(de);bySeverity=ce(()=>{let a=this.loader.scan(),t=new Set,i=new Set;if(!a)return{errors:t,warns:i};for(let n of a.issues){let o=n.severity==="error"?t:n.severity==="warn"?i:null;if(o)for(let d of n.nodeIds)o.add(d)}return{errors:t,warns:i}});static \u0275fac=function(t){return new(t||e)};static \u0275prov=b({token:e,factory:e.\u0275fac,providedIn:"root"})};var Je={llm:{when:{label:"when",tooltip:"When to use (LLM-inferred)"},style:{label:"style",tooltip:"Interaction style (LLM-inferred)"},does:{label:"does",tooltip:"Capabilities (LLM-inferred)"},steps:{label:"steps",tooltip:"Recipe / ordered steps (LLM-inferred)"},pre:{label:"pre",tooltip:"Preconditions (LLM-inferred)"},out:{label:"out",tooltip:"Outputs / produced artifacts (LLM-inferred)"},fx:{label:"fx",tooltip:"Side effects (LLM-inferred)"},eg:{label:"eg",tooltip:"Invocation example (LLM-inferred)"},topics:{label:"topics",tooltip:"Topics covered (LLM-inferred)"},facts:{label:"facts",tooltip:"Key facts (LLM-inferred discrete claims)"}},meta:{model:"model",allowed:"allowed",tags:"tags"},stats:{errors:e=>`${e} error${e===1?"":"s"}`,warns:e=>`${e} warning${e===1?"":"s"}`,bytes:e=>`${e.toLocaleString("en-US")} bytes`,tokens:e=>`${e.toLocaleString("en-US")} tokens`},stability:{experimental:"experimental",deprecated:"deprecated"},sidecar:{staleBody:"Stale: body content changed since the last bump.",staleFrontmatter:"Stale: frontmatter changed since the last bump.",staleBoth:"Stale: body and frontmatter changed since the last bump."},tagOverflow:e=>`+${e} more`,ariaExpand:"Expand",ariaFavoriteAdd:"Add to favorites",ariaFavoriteRemove:"Remove from favorites",favoriteAddTooltip:"Mark as favorite",favoriteRemoveTooltip:"Unfavorite"};var ge=`
|
|
2
2
|
.p-tag {
|
|
3
3
|
display: inline-flex;
|
|
4
4
|
align-items: center;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Ed as d,Fd as k,I as o,Jd as E,N as a,Y as y,Z as v,ea as i,ga as b,mc as s}from"./chunk-YL6SWAFJ.js";import{a as f}from"./chunk-VB56BUGO.js";var U={triggerLabel:"Settings",triggerTooltip:"Settings",modalTitle:"Settings",closeLabel:"Close",sections:{plugins:"Plugins",general:"General",project:"Project",changelog:"Changelog",about:"About"},general:{heading:"General",intro:"Per-machine preferences.",loadErrorPrefix:"Could not load preferences:",saveErrorPrefix:"Could not save preferences:",toggles:{"updateCheck.enabled":{label:"Check for updates",description:"Check npm for newer @skill-map/cli releases."}},extraTheme:{label:"Theme",description:"Pick a specialty theme.",options:{none:{label:"None",description:"Use the topbar dark/light toggle."}}},storageHintLabel:"Settings are stored in:",storageHintPath:"~/.skill-map/settings.json"},project:{heading:"Project",introPrefix:"These settings apply only to this project and are saved in",introPath:".skill-map/settings.local.json",introSuffix:".",loadErrorPrefix:"Could not load project settings:",saveErrorPrefix:"Could not save project settings:",referencePathsLabel:"Folders for link validation",referencePathsDescription:"If your notes link to files outside this project, list those folders here. Skill-map checks them only to confirm the links work, nothing from these folders shows up in the map.",referencePathsPlaceholder:"~/Documents/research",commaForbidden:"Add one path at a time, without commas.",addPathLabel:"Add path",removePathLabel:"Remove",confirmDialogHeader:"Allow access to folders outside this project?",confirmDialogIntro:"This change lets the scan read files in:",confirmDialogAccept:"Allow access",confirmDialogReject:"Cancel",ignorePatternsLabel:"Ignored patterns",ignorePatternsDescriptionPrefix:"Patterns that exclude files and folders from the scan, stored in",ignorePatternsDescriptionFile:".skillmapignore",ignorePatternsDescriptionMiddle:"at the project root. Same syntax as",ignorePatternsDescriptionGitignore:".gitignore",ignorePatternsDescriptionSuffix:"(one pattern per line).",ignorePatternsPlaceholder:"secrets.md",ignorePatternEmpty:"Pattern cannot be empty or whitespace-only.",ignorePatternHasControlChar:"Pattern must be a single line without control characters.",ignorePatternDuplicate:"This pattern is already in the list.",addIgnorePatternLabel:"Add pattern",removeIgnorePatternLabel:"Remove",activeProviderLabel:"Active provider",activeProviderDescription:"Selects which provider sees this project. The map reflects how the chosen provider interprets your files.",activeProviderSourceAutodetect:"Auto-detected from your files (no value saved yet).",activeProviderSourceNone:"No provider detected. Install or enable a provider to start.",activeProviderDetectedPrefix:"Detected:",activeProviderEmptyOption:"(none)",activeProviderConfirmHeader:"Switch the active provider?",activeProviderConfirmIntro:"Switching will clear the persisted scan (nodes, links, issues). Jobs and history are kept. You will need to run `sm scan` after the switch.",activeProviderConfirmAccept:"Switch and clear scan",activeProviderConfirmReject:"Cancel",activeProviderSwitchedPrefix:"Lens switched. Cleared",activeProviderSwitchedSuffix:"scan table(s). Run `sm scan` to repopulate.",activeProviderSwitchedNoDb:"Lens switched. Run `sm scan` to populate the map under the new lens."},changelogHeading:"Changelog",changelogIntro:"What's new in skill-map. Each entry covers a release of @skill-map/cli (the CLI + bundled UI) and lists the user-facing changes plus the workspace(s) each one affects.",changelogEmpty:"No release notes yet. Future releases will populate this list automatically from the changesets shipped in each PR.",changelogInternalRelease:"Internal release. Focus on stability, infra, and refactors. No user-facing changes this time.",changelogAffectedPackages:"Affected packages",changelogFooterText:"Want the full changelog?",changelogFooterLinkLabel:"See it on GitHub \u2192",changelogFooterUrl:"https://github.com/crystian/skill-map/blob/main/src/CHANGELOG.md",aboutHeading:"About",aboutIntro:"Version information for the running CLI / server.",aboutCliLabel:"skill-map CLI",aboutSpecLabel:"Spec version",aboutSchemaLabel:"Schema version",aboutFolderLabel:"Project folder",aboutDbLabel:"Project DB",aboutDbValue:(t,e)=>t==="present"?e:`${t} \xB7 ${e}`,aboutLoading:"Loading\u2026",aboutUnknown:"-",aboutErrorPrefix:"Could not read health endpoint:",aboutLinksHeading:"Links",aboutWebsiteLabel:"Website",aboutGithubLabel:"GitHub",aboutWebsiteUrl:"https://skill-map.dev/",aboutGithubUrl:"https://github.com/crystian/skill-map",aboutStarHeading:"Enjoying skill-map?",aboutStarBody:"If it's useful to you, drop us a star on GitHub, it helps a lot and keeps the project alive.",aboutStarCta:"Star on GitHub",aboutStarA11y:"Open the skill-map repository on GitHub to give it a star",pluginsHeading:"Plugins",pluginsIntro:"Enable or disable installed plugins.",pluginsSearchPlaceholder:"Filter by name\u2026",pluginsSearchA11y:"Filter plugins by name",pluginsSearchEmpty:t=>`No plugins match "${t}".`,pluginsKindFilterAll:"All",pluginsKindFilterA11y:"Filter plugins by kind",pluginsKindFilterOptionA11y:(t,e)=>e?`Show only ${t} extensions`:"Show all kinds",unsavedChangesMessage:t=>t===1?'1 unsaved change. Click "Apply" to persist it.':`${t} unsaved changes. Click "Apply" to persist them.`,startsAsDisabledRowHint:"This plugin started disabled and is not loaded in memory. Restart `sm serve` for the change to take effect.",startsAsDisabledFooterHint:"Some plugins were disabled when the server started. Consider restarting `sm serve` so they take effect.",discardChanges:"Discard",applyAndClose:"Apply",discardA11y:"Discard pending plugin changes",applyA11y:"Apply pending plugin changes and refresh the map",confirmCloseTitle:"Apply pending changes?",confirmCloseBody:t=>t===1?"You have 1 unsaved change.":`You have ${t} unsaved changes.`,keepEditing:"Keep editing",sourceBuiltIn:"Built-in",sourceProject:"Project",enabledLabel:"Enabled",disabledLabel:"Disabled",lockedLabel:"Locked",lockedTooltip:"Locked by the host (cannot be toggled).",expandLabel:"Show extensions",collapseLabel:"Hide extensions",statusFailure:{"incompatible-spec":"Incompatible spec version","invalid-manifest":"Invalid manifest","load-error":"Failed to load","id-collision":"Plugin id collision"},loading:"Loading plugins\u2026",empty:"No plugins installed.",errorPrefix:"Could not load plugins:",toggleErrorPrefix:"Toggle failed:",a11y:{triggerLabel:"Open settings",pluginToggle:(t,e)=>e?`Enable plugin ${t}`:`Disable plugin ${t}`,extensionToggle:(t,e)=>e?`Enable ${t}`:`Disable ${t}`,pluginRow:t=>`Plugin ${t} row`,extensionRow:t=>`Extension ${t} row`}};var R="#9ca3af",F="#6b7280",P=class t{_entries=i([]);providers=this._entries.asReadonly();index=s(()=>{let e=new Map;for(let r of this._entries())e.set(r.id,r);return e});ingest(e){if(!e)return;let r=[];for(let[n,l]of Object.entries(e))r.push(f({id:n},l));j(this._entries(),r)||this._entries.set(r)}lookup(e){return this.index().get(e)}cardChip(e){if(!e)return null;let r=this.lookup(e);return r?r.hideChip?null:T(r):I(e)}lensChip(e){if(!e)return null;let r=this.lookup(e);return r?T(r):I(e)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=o({token:t,factory:t.\u0275fac,providedIn:"root"})};function T(t){let e={label:t.label,color:t.color};return t.colorDark!==void 0&&(e.colorDark=t.colorDark),e}function I(t){return{label:t,color:R,colorDark:F}}function j(t,e){if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++)if(JSON.stringify(t[r])!==JSON.stringify(e[r]))return!1;return!0}var S={available:"Update available",copiedLabel:"Copied!",tooltip:t=>`v${t} is available. Click to copy the install command.`,copyCommand:"npm i -g @skill-map/cli@latest",copiedTooltip:"Copied! Paste it in your terminal.",npmLinkUrl:"https://www.npmjs.com/package/@skill-map/cli",npmLinkTooltip:"Open on npm",npmLinkA11y:"Open the @skill-map/cli package page on npm",a11yLabel:t=>`Update available: version ${t}, click to copy the install command`,versionLabel:t=>`v${t}`,versionTooltip:t=>`skill-map CLI v${t}`,versionA11yLabel:t=>`Running version ${t}`,fetchFailed:t=>`UpdateCheckService: fetch failed (${t})`};var x=class t{dataSource=a(d);status=i(null);isOutdated=s(()=>this.status()?.isOutdated===!0);latest=s(()=>this.status()?.latest??null);current=s(()=>this.status()?.current??null);async load(){try{let e=await this.dataSource.getUpdateStatus();this.status.set(e)}catch(e){let r=e instanceof Error?e.message:String(e);console.warn(S.fetchFailed(r))}}static \u0275fac=function(r){return new(r||t)};static \u0275prov=o({token:t,factory:t.\u0275fac,providedIn:"root"})};var D={scanFailed:t=>`scan-trigger failed: ${t}`};var C=class t{dataSource=a(d);loader=a(E);scanning=i(!1);scanError=i(null);async run(){if(!this.scanning()){this.scanning.set(!0),this.scanError.set(null);try{await this.dataSource.runScan(),await this.loader.load()}catch(e){let r=e instanceof k||e instanceof Error?e.message:String(e);this.scanError.set(r),console.warn(D.scanFailed(r))}finally{this.scanning.set(!1)}}}static \u0275fac=function(r){return new(r||t)};static \u0275prov=o({token:t,factory:t.\u0275fac,providedIn:"root"})};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 p(t){return t?h.find(e=>e.id===t)??null:null}var L="skill-map.ui.theme",m="skill-map.ui.extra-theme",M="app-dark",N="dark",A="(prefers-color-scheme: dark)",H="favicon.svg",O='link[rel="icon"][type="image/svg+xml"]',w=class t{doc=a(y);destroyRef=a(v);mode=i(this.readInitialMode());extraTheme=i(this.readInitialExtra());systemPrefersDark=i(this.readSystemPref());resolved=s(()=>{let e=this.mode();return e==="auto"?this.systemPrefersDark()?"dark":"light":e});constructor(){this.subscribeToSystemPref(),b(()=>{let e=this.extraTheme(),r=p(e),l=this.resolved()==="dark"||r?.forcesDark===!0,g=this.doc.documentElement;g.classList.toggle(M,l),g.classList.toggle(N,l);for(let c of h)g.classList.toggle(c.htmlClass,r?.id===c.id);this.applyFavicon(r?.favicon??H),r&&this.ensureExtraThemeFont(r);try{let c=this.doc.defaultView?.localStorage;c?.setItem(L,this.mode()),r===null?c?.removeItem(m):c?.setItem(m,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(p(e)?.id??null)}readInitialMode(){try{let e=this.doc.defaultView?.localStorage.getItem(L);if(e==="auto"||e==="light"||e==="dark")return e}catch{}return"auto"}readInitialExtra(){try{let e=this.doc.defaultView?.localStorage.getItem(m);return p(e)?.id??null}catch{return null}}readSystemPref(){try{return this.doc.defaultView?.matchMedia(A).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 n=this.doc.createElement("link");n.id=e.fontLinkId,n.rel="stylesheet",n.href=e.fontHref,r.appendChild(n)}applyFavicon(e){let r=this.doc.querySelector(O);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(A),n=l=>{this.systemPrefersDark.set(l.matches)};r.addEventListener("change",n),this.destroyRef.onDestroy(()=>r.removeEventListener("change",n))}static \u0275fac=function(r){return new(r||t)};static \u0275prov=o({token:t,factory:t.\u0275fac,providedIn:"root"})};export{P as a,S as b,x as c,U as d,C as e,h as f,w as g};
|