1import{s as n}from"./chunk-J46DYIXO.js";import{d as s}from"./chunk-PLC6FGDG.js";import{ka as c,pa as m,za as a}from"./chunk-TG5FOCBJ.js";var f=(()=>{class o{injector=m(a);logger=s("CommandService");commands=[];component;pendingOpen=!1;showCommandPalette(){if(!this.component){this.pendingOpen=!0;return}this.component.open()}registerCommandPalette(e){this.component=e,this.pendingOpen&&(this.pendingOpen=!1,this.component.open())}registerCommand(e){this.commands.push(e)}getCommands(){return this.commands}execute(e){let t=this.commands.find(r=>r.name===e);if(!t){this.logger.error("Command not found",{name:e});return}this.addItemToRecentCommands(e);try{let r=t.executeFactory(this.injector)();r instanceof Promise&&r.catch(i=>{this.logger.error("Error executing command",{name:e,error:i})})}catch(r){this.logger.error("Error executing command",{name:e,error:r})}}async addItemToRecentCommands(e){try{let t=JSON.parse(localStorage.getItem(n.RecentCommands)||"[]");t.unshift(e),t=Array.from(new Set(t)),t.length>20&&t.pop(),localStorage.setItem(n.RecentCommands,JSON.stringify(t))}catch(t){this.logger.debug("Unable to persist recent commands",{error:t})}}getRecentCommands(){try{return JSON.parse(localStorage.getItem(n.RecentCommands)||"[]")}catch(e){return this.logger.debug("Unable to read recent commands",{error:e}),[]}}clearRecentCommands(){try{localStorage.removeItem(n.RecentCommands)}catch(e){this.logger.debug("Unable to clear recent commands",{error:e})}}static \u0275fac=function(t){return new(t||o)};static \u0275prov=c({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();export{f as a}; 2/**i18n:0f1fade16046009adad02f3fd9ac957882d03995a783f16776cfd917e99ccbcd*/
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.