1"use strict";(self.webpackChunkfaqally=self.webpackChunkfaqally||[]).push([[8925],{58925(K,S,p){p.d(S,{KnowledgeSnippetsComponent:()=>_t});var k=p(72200),w=p(89417),E=p(38132),M=p(88834),l=p(12629),u=p(19295),D=p(71228),O=p(33746),C=p(96183),P=p(9183),e=p(86156),n=p(90882),r=p(82765),g=p(27468),f=p(70980),h=p(2615),t=p(73664),R=p(58375),I=p(58892),$=p(98125),x=p(41119),v=p(83243),F=p(22598),j=p(69588),y=p(23029),A=p(40455);function b(a,_){if(1&a&&(t.j41(0,"mat-option",53),t.EFF(1),t.k0s()),2&a){const c=_.$implicit;t.Y8G("value",c._id),t.R7$(),t.JRh(c.name)}}function B(a,_){if(1&a&&(t.j41(0,"mat-option",53),t.EFF(1),t.k0s()),2&a){const c=_.$implicit,i=t.XpG();t.Y8G("value",c),t.R7$(),t.JRh(i.statusLabel(c))}}function L(a,_){if(1&a&&(t.j41(0,"mat-option",53),t.EFF(1),t.k0s()),2&a){const c=_.$implicit,i=t.XpG();t.Y8G("value",c),t.R7$(),t.JRh(i.statusLabel(c))}}function z(a,_){1&a&&(t.j41(0,"div",54),t.nrm(1,"mat-progress-spinner",55),t.j41(2,"span"),t.EFF(3,"Loading\u2026"),t.k0s()())}function N(a,_){if(1&a&&(t.j41(0,"p",56),t.EFF(1),t.k0s()),2&a){const c=t.XpG();t.R7$(),t.JRh(c.loadError)}}function G(a,_){1&a&&(t.j41(0,"div",57)(1,"mat-icon"),t.EFF(2,"content_paste"),t.k0s(),t.j41(3,"p"),t.EFF(4,"No snippets yet. Create one to add text your agents can retrieve after training."),t.k0s()())}function W(a,_){1&a&&(t.j41(0,"th",73),t.EFF(1,"Name"),t.k0s())}function H(a,_){if(1&a&&(t.j41(0,"td",74),t.EFF(1),t.k0s()),2&a){const c=_.$implicit;t.R7$(),t.JRh(c.name)}}function Y(a,_){1&a&&(t.j41(0,"th",73),t.EFF(1,"Status"),t.k0s())}function V(a,_){if(1&a&&(t.j41(0,"td",74)(1,"span",75),t.EFF(2),t.k0s()()),2&a){const c=_.$implicit,i=t.XpG(2);t.R7$(),t.BMQ("data-status",c.status),t.R7$(),t.JRh(i.statusLabel(c.status))}}function X(a,_){if(1&a&&(t.j41(0,"th",76)(1,"mat-icon",77),t.EFF(2,"star"),t.k0s()()),2&a){const c=t.XpG(2);t.Y8G("matTooltip",c.authoritativeSourceTooltip)}}function J(a,_){if(1&a){const c=t.RV6();t.j41(0,"td",78)(1,"button",79),t.bIt("click",function(){const s=h.eBV(c).$implicit,o=t.XpG(2);return h.Njj(o.toggleAuthoritativeSource(s))}),t.j41(2,"mat-icon"),t.EFF(3),t.k0s()()()}if(2&a){const c=_.$implicit,i=t.XpG(2);t.R7$(),t.Y8G("disabled",i.togglingAuthoritativeId===c._id),t.R7$(),t.AVh("knowledge-snippets__authority-active",i.isAuthoritativeSource(c)),t.R7$(),t.SpI(" ",i.isAuthoritativeSource(c)?"star":"star_border"," ")}}function Q(a,_){1&a&&(t.j41(0,"th",73),t.EFF(1,"Source"),t.k0s())}function Z(a,_){if(1&a&&(t.j41(0,"span",81)(1,"mat-icon",82),t.EFF(2,"chat"),t.k0s(),t.EFF(3," Slack "),t.k0s()),2&a){const c=t.XpG().$implicit,i=t.XpG(2);t.Y8G("matTooltip",i.slackSourceTooltip(c))}}function q(a,_){1&a&&(t.j41(0,"span",83)(1,"mat-icon",82),t.EFF(2,"edit_note"),t.k0s(),t.EFF(3," Manual "),t.k0s())}function tt(a,_){if(1&a&&(t.j41(0,"td",74),t.DNE(1,Z,4,1,"span",80)(2,q,4,0,"ng-template",null,0,t.C5r),t.k0s()),2&a){const c=_.$implicit,i=t.sdS(3);t.R7$(),t.Y8G("ngIf","slack"===(null==c.source?null:c.source.type))("ngIfElse",i)}}function et(a,_){1&a&&(t.j41(0,"th",73),t.EFF(1,"Tags"),t.k0s())}function nt(a,_){1&a&&(t.j41(0,"span"),t.EFF(1,"\u2014"),t.k0s())}function ot(a,_){if(1&a&&(t.j41(0,"span"),t.EFF(1),t.k0s()),2&a){const c=_.$implicit,i=_.last,s=t.XpG(3);t.R7$(),t.Lme("",s.tagLabel(c),"",i?"":", ")}}function it(a,_){if(1&a&&(t.j41(0,"td",74),t.DNE(1,nt,2,0,"span",84)(2,ot,2,2,"span",85),t.k0s()),2&a){const c=_.$implicit;t.R7$(),t.Y8G("ngIf",!(null!=c.tag_ids&&c.tag_ids.length)),t.R7$(),t.Y8G("ngForOf",c.tag_ids)}}function at(a,_){1&a&&(t.j41(0,"th",73),t.EFF(1,"Updated"),t.k0s())}function rt(a,_){if(1&a&&(t.j41(0,"td",74),t.EFF(1),t.nI1(2,"date"),t.k0s()),2&a){const c=_.$implicit;t.R7$(),t.JRh(t.i5U(2,1,c.updated_at,"medium"))}}function st(a,_){1&a&&t.nrm(0,"th",73)}function lt(a,_){if(1&a){const c=t.RV6();t.j41(0,"td",74)(1,"button",86),t.bIt("click",function(){const s=h.eBV(c).$implicit,o=t.XpG(2);return h.Njj(o.editSnippet(s))}),t.j41(2,"mat-icon"),t.EFF(3,"edit"),t.k0s()(),t.j41(4,"button",87),t.bIt("click",function(){const s=h.eBV(c).$implicit,o=t.XpG(2);return h.Njj(o.deleteSnippet(s))}),t.j41(5,"mat-icon"),t.EFF(6,"delete"),t.k0s()()()}}function dt(a,_){1&a&&t.nrm(0,"tr",88)}function pt(a,_){1&a&&t.nrm(0,"tr",89)}function ct(a,_){if(1&a&&(t.j41(0,"div",58)(1,"table",59),t.qex(2,60),t.DNE(3,W,2,0,"th",61)(4,H,2,1,"td",62),t.bVm(),t.qex(5,63),t.DNE(6,Y,2,0,"th",61)(7,V,3,2,"td",62),t.bVm(),t.qex(8,64),t.DNE(9,X,3,1,"th",65)(10,J,4,4,"td",66),t.bVm(),t.qex(11,67),t.DNE(12,Q,2,0,"th",61)(13,tt,4,2,"td",62),t.bVm(),t.qex(14,68),t.DNE(15,et,2,0,"th",61)(16,it,3,2,"td",62),t.bVm(),t.qex(17,69),t.DNE(18,at,2,0,"th",61)(19,rt,3,4,"td",62),t.bVm(),t.qex(20,70),t.DNE(21,st,1,0,"th",61)(22,lt,7,0,"td",62),t.bVm(),t.DNE(23,dt,1,0,"tr",71)(24,pt,1,0,"tr",72),t.k0s()()),2&a){const c=t.XpG();t.R7$(),t.Y8G("dataSource",c.snippets),t.R7$(22),t.Y8G("matHeaderRowDef",c.displayedColumns),t.R7$(),t.Y8G("matRowDefColumns",c.displayedColumns)}}let _t=(()=>{var a;class _{constructor(i,s,o,m,d,T){this.snippetsApi=i,this.filesApi=s,this.toast=o,this.confirmDialog=m,this.route=d,this.router=T,this.displayedColumns=["name","status","authoritative_source","source","tags","updated_at","actions"],this.authoritativeSourceTooltip="Official trusted company knowledge. FAQ Ally gives it more weight in retrieval and prefers it over non-authoritative sources when sources disagree or conflict.",this.snippets=[],this.tags=[],this.loading=!1,this.loadError=null,this.statusFilter="",this.authoritativeFilter="all",this.sortFilter="default",this.searchInput="",this.togglingAuthoritativeId=null,this.statuses=["draft","review","training_ready","archived"],this.formOpen=!1,this.editing=null,this.draftName="",this.draftDe
1scription="",this.draftTagIds=[],this.draftStatus="draft",this.draftAuthoritativeSource=!1,this.saving=!1,this.routeRequestedSnippetId=null}ngOnInit(){this.routeQuerySub=this.route.queryParamMap.subscribe(i=>{const s=i.get("open");s?this.routeRequestedSnippetId===s&&this.formOpen&&this.editing?._id===s||(this.routeRequestedSnippetId=s,this.openSnippetFromRoute(s)):this.routeRequestedSnippetId=null}),this.reload()}ngOnDestroy(){this.routeQuerySub?.unsubscribe()}tagLabel(i){return this.tags.find(o=>o._id===i)?.name||i}slackSourceTooltip(i){const s=i&&i.source&&i.source.slack;if(!s)return"Saved from Slack";const o=["Saved from Slack"];return s.channel_name&&o.push(`#${s.channel_name}`),s.author_name&&o.push(`by ${s.author_name}`),o.join(" \xb7 ")}statusLabel(i){return{draft:"Draft",review:"Review",training_ready:"Training ready",archived:"Archived"}[i]||i}reload(){this.loading=!0,this.loadError=null,(0,g.p)({snippets:this.snippetsApi.list({status:this.statusFilter||void 0,search:this.searchInput.trim()||void 0,authoritativeSource:"authoritative"===this.authoritativeFilter||"normal"!==this.authoritativeFilter&&void 0,sort:"authoritative"===this.sortFilter?"authoritative":void 0}),tags:this.filesApi.getTags()}).pipe((0,f.j)(()=>this.loading=!1)).subscribe({next:({snippets:i,tags:s})=>{this.snippets=i||[],this.tags=s||[]},error:i=>{const s=i?.error?.error||i?.error?.message||i?.message||"Could not load snippets.";this.loadError=s,this.toast.error(s)}})}applyFilters(){this.reload()}newSnippet(){this.formOpen=!0,this.editing=null,this.draftName="",this.draftDescription="",this.draftTagIds=[],this.draftStatus="draft",this.draftAuthoritativeSource=!1}editSnippet(i){this.formOpen=!0,this.editing=i,this.draftName=i.name,this.draftDescription=i.description||"",this.draftTagIds=[...i.tag_ids||[]],this.draftStatus=i.status,this.draftAuthoritativeSource=!0===i.authoritative_source}cancelEdit(){this.formOpen=!1,this.clearDraft(),this.clearOpenSnippetQueryParam()}onDrawerOpenedChange(i){this.formOpen=i,i||(this.clearDraft(),this.clearOpenSnippetQueryParam())}clearDraft(){this.editing=null,this.draftName="",this.draftDescription="",this.draftTagIds=[],this.draftStatus="draft",this.draftAuthoritativeSource=!1}openSnippetFromRoute(i){this.snippetsApi.get(i).subscribe({next:s=>{this.editSnippet(s)},error:s=>{this.toast.error(s?.error?.error||s?.error?.message||s?.message||"Could not open snippet."),this.clearOpenSnippetQueryParam()}})}clearOpenSnippetQueryParam(){this.route.snapshot.queryParamMap.has("open")&&(this.routeRequestedSnippetId=null,this.router.navigate([],{relativeTo:this.route,queryParams:{open:null},queryParamsHandling:"merge",replaceUrl:!0}))}save(){const i=this.draftName.trim();if(!i)return void this.toast.error("Name is required");const s=this.editing?._id,o=!!s,m=o?this.editing.authoritative_source!==this.draftAuthoritativeSource:this.draftAuthoritativeSource;this.saving=!0;const d={name:i,description:this.draftDescription,tag_ids:this.draftTagIds,status:this.draftStatus,authoritative_source:this.draftAuthoritativeSource};(s?this.snippetsApi.update(s,d):this.snippetsApi.create(d)).pipe((0,f.j)(()=>this.saving=!1)).subscribe({next:()=>{this.toast.success(m?(o?"Snippet updated":"Snippet created")+". Authoritative-source changes apply after the next train/retrain.":o?"Snippet updated":"Snippet created"),this.formOpen=!1,this.clearDraft(),this.clearOpenSnippetQueryParam(),this.reload()},error:U=>{this.toast.error(U?.error?.error||U?.error?.message||U?.message||"Save failed")}})}toggleAuthoritativeSource(i){const s=!i.authoritative_source;this.togglingAuthoritativeId=i._id,this.snippetsApi.update(i._id,{authoritative_source:s}).pipe((0,f.j)(()=>this.togglingAuthoritativeId=null)).subscribe({next:o=>{if(o?.authoritative_source!==s)return this.reload(),void this.toast.error("Authoritative-source update did not persist. Check that the authoritative-source schema update has been applied.");this.applyUpdatedSnippet(o),this.toast.success((s?"Marked as authoritative source":"Marked as
1normal source")+". Applies after the next train/retrain.")},error:o=>{this.toast.error(o?.error?.error||o?.error?.message||o?.message||"Update failed")}})}applyUpdatedSnippet(i){const s="all"===this.authoritativeFilter||("authoritative"===this.authoritativeFilter?!0===i.authoritative_source:!0!==i.authoritative_source),o=this.snippets.map(m=>m._id===i._id?{...m,...i}:m).filter(m=>m._id!==i._id||s);this.snippets="authoritative"===this.sortFilter?o.sort((m,d)=>{const T=+(!0===d.authoritative_source)-+(!0===m.authoritative_source);return 0!==T?T:new Date(d.updated_at).getTime()-new Date(m.updated_at).getTime()}):o,this.editing?._id===i._id&&(this.editing={...this.editing,...i},this.draftAuthoritativeSource=!0===i.authoritative_source)}isAuthoritativeSource(i){return!0===i?.authoritative_source}deleteSnippet(i){this.confirmDialog.confirm({title:"Delete Snippet",message:`Delete snippet "${i.name}"? This removes it from future training when tags no longer match.`,confirmText:"Delete",cancelText:"Cancel",type:"danger"}).subscribe(s=>{s&&this.snippetsApi.delete(i._id).subscribe({next:()=>{this.toast.success("Snippet deleted"),this.editing?._id===i._id&&(this.formOpen=!1,this.clearDraft()),this.reload()},error:o=>{this.toast.error(o?.error?.error||o?.message||"Delete failed")}})})}static#t=a=()=>(this.\u0275fac=function(s){return new(s||_)(t.rXU(R.D),t.rXU(I.d),t.rXU($.f),t.rXU(x.g),t.rXU(v.nX),t.rXU(v.Ix))},this.\u0275cmp=t.VBU({type:_,selectors:[["app-knowledge-snippets"]],decls:135,vars:24,consts:[["manualSource",""],[1,"knowledge-snippets"],[1,"app-page-header","app-page-header--compact"],[1,"app-page-header__content"],[1,"app-page-header__left","knowledge-snippets__header-row"],["mat-icon-button","","type","button","routerLink","/knowledge","aria-label","Back to knowledge home",1,"app-page-header__back"],[1,"knowledge-snippets__title-block"],[1,"knowledge-snippets__subtitle"],[1,"knowledge-snippets__shell",3,"hasBackdrop"],["mode","over","position","end","aria-labelledby","knowledge-snippets-drawer-title",1,"knowledge-snippets__drawer",3,"openedChange","opened","disableClose"],[1,"knowledge-snippets__drawer-inner"],[1,"knowledge-snippets__drawer-head"],["id","knowledge-snippets-drawer-title"],["mat-icon-button","","type","button","aria-label","Close snippet editor",3,"click","disabled"],[1,"knowledge-snippets__form-row"],[1,"knowledge-snippets__field-block"],[1,"knowledge-snippets__field-guide"],["appearance","outline","subscriptSizing","dynamic","floatLabel","always"],["matInput","","placeholder","e.g. Q4 travel cap reminder","autocomplete","off",3,"ngModelChange","ngModel"],["appearance","outline","subscriptSizing","dynamic","floatLabel","always",1,"knowledge-snippets__field-body"],["matInput","","rows","10","placeholder","Paste the full text you want available in answers\u2026",3,"ngModelChange","ngModel"],["appearance","outline","subscriptSizing","dynamic"],["multiple","",3,"ngModelChange","ngModel"],[3,"value",4,"ngFor","ngForOf"],[3,"ngModelChange","ngModel"],[1,"knowledge-snippets__authority-field"],[1,"knowledge-snippets__authority-label"],[1,"knowledge-snippets__actions"],["mat-flat-button","","color","primary","type","button",3,"click","disabled"],["mat-stroked-button","","type","button",3,"click","disabled"],[1,"knowledge-snippets__main"],[1,"knowledge-snippets__body"],[1,"knowledge-snippets__lede"],[1,"knowledge-snippets__panel"],[1,"knowledge-snippets__filters-guide"],[1,"knowledge-snippets__toolbar"],[1,"knowledge-snippets__toolbar-search-row"],["appearance","outline","subscriptSizing","dynamic",1,"knowledge-snippets__search"],["matInput","","placeholder","e.g. travel, PTO, onboarding","autocomplete","off",3,"ngModelChange","keyup.enter","ngModel"],[1,"knowledge-snippets__toolbar-controls-row"],[1,"knowledge-snippets__toolbar-filters"],["value",""],["value","all"],["value","authoritative"],["value","normal"],["value","default"],[1,"knowledge-snippets__toolbar-actions"],["mat-stroked-button","","type","button",3,"click"],["mat-flat-button","","color","primary","type","button",3,"click"],["class","knowledge-snippets__loading",4,"ngIf"],["class","knowledge-sni
1ppets__error","role","alert",4,"ngIf"],["class","knowledge-snippets__empty",4,"ngIf"],["class","knowledge-snippets__table-wrap",4,"ngIf"],[3,"value"],[1,"knowledge-snippets__loading"],["diameter","40","mode","indeterminate"],["role","alert",1,"knowledge-snippets__error"],[1,"knowledge-snippets__empty"],[1,"knowledge-snippets__table-wrap"],["mat-table","",1,"knowledge-snippets__table",3,"dataSource"],["matColumnDef","name"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","status"],["matColumnDef","authoritative_source"],["mat-header-cell","","class","knowledge-snippets__authority-column-header","matTooltipPosition","above",3,"matTooltip",4,"matHeaderCellDef"],["mat-cell","","class","knowledge-snippets__authority-column-cell",4,"matCellDef"],["matColumnDef","source"],["matColumnDef","tags"],["matColumnDef","updated_at"],["matColumnDef","actions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],[1,"knowledge-snippets__status"],["mat-header-cell","","matTooltipPosition","above",1,"knowledge-snippets__authority-column-header",3,"matTooltip"],[1,"knowledge-snippets__authority-icon"],["mat-cell","",1,"knowledge-snippets__authority-column-cell"],["mat-icon-button","","type","button","aria-label","Toggle authoritative source",3,"click","disabled"],["class","knowledge-snippets__source-badge knowledge-snippets__source-badge--slack","matTooltipPosition","above",3,"matTooltip",4,"ngIf","ngIfElse"],["matTooltipPosition","above",1,"knowledge-snippets__source-badge","knowledge-snippets__source-badge--slack",3,"matTooltip"],[1,"knowledge-snippets__source-icon"],[1,"knowledge-snippets__source-badge","knowledge-snippets__source-badge--manual"],[4,"ngIf"],[4,"ngFor","ngForOf"],["mat-icon-button","","type","button","matTooltip","Edit",3,"click"],["mat-icon-button","","type","button","matTooltip","Delete",3,"click"],["mat-header-row",""],["mat-row",""]],template:function(s,o){1&s&&(t.j41(0,"div",1)(1,"header",2)(2,"div",3)(3,"div",4)(4,"button",5)(5,"mat-icon"),t.EFF(6,"arrow_back"),t.k0s()(),t.j41(7,"div",6)(8,"h2"),t.EFF(9,"Snippets"),t.k0s(),t.j41(10,"p",7),t.EFF(11,"Reusable notes tagged for agent training"),t.k0s()()()()(),t.j41(12,"mat-drawer-container",8)(13,"mat-drawer",9),t.bIt("openedChange",function(d){return o.onDrawerOpenedChange(d)}),t.j41(14,"div",10)(15,"div",11)(16,"h3",12),t.EFF(17),t.k0s(),t.j41(18,"button",13),t.bIt("click",function(){return o.cancelEdit()}),t.j41(19,"mat-icon"),t.EFF(20,"close"),t.k0s()()(),t.j41(21,"div",14)(22,"div",15)(23,"p",16)(24,"strong"),t.EFF(25,"Name"),t.k0s(),t.EFF(26," is only the row title in this list. It is not sent to the model as snippet content. "),t.k0s(),t.j41(27,"mat-form-field",17)(28,"mat-label"),t.EFF(29,"Name"),t.k0s(),t.j41(30,"input",18),t.mxI("ngModelChange",function(d){return t.DH7(o.draftName,d)||(o.draftName=d),d}),t.k0s()()(),t.j41(31,"div",15)(32,"p",16)(33,"strong"),t.EFF(34,"Description"),t.k0s(),t.EFF(35," is the snippet body\u2014paste policy text, steps, FAQs, or anything you want agents to retrieve after training. "),t.k0s(),t.j41(36,"mat-form-field",19)(37,"mat-label"),t.EFF(38,"Description (snippet body)"),t.k0s(),t.j41(39,"textarea",20),t.mxI("ngModelChange",function(d){return t.DH7(o.draftDescription,d)||(o.draftDescription=d),d}),t.k0s()()(),t.j41(40,"mat-form-field",21)(41,"mat-label"),t.EFF(42,"Tags"),t.k0s(),t.j41(43,"mat-select",22),t.mxI("ngModelChange",function(d){return t.DH7(o.draftTagIds,d)||(o.draftTagIds=d),d}),t.DNE(44,b,2,2,"mat-option",23),t.k0s()(),t.j41(45,"mat-form-field",21)(46,"mat-label"),t.EFF(47,"Status"),t.k0s(),t.j41(48,"mat-select",24),t.mxI("ngModelChange",function(d){return t.DH7(o.draftStatus,d)||(o.draftStatus=d),d}),t.DNE(49,B,2,2,"mat-option",23),t.k0s()(),t.j41(50,"div",25)(51,"label",26)(52,"mat-icon"),t.EFF(53,"star"),t.k0s(),t.EFF(54," Authoritative Source "),t.k0s(),t.j41(55,"mat-checkbox",24),t.mxI("ngModelChange",function(d){return t.DH7(o.draftAuthoritativeSource,d)||(o.draftAuthoritativeSource=d),d}),t.EFF(56," Prioritize this snippet as an official trusted source. "),t.k0s()()(),t.j41(57,"div",27)(58,"button",28),t.bIt("click",function(){return o.save()}),t.EFF(59),t.k0s(),t.j41(60,"button",29),t.bIt("click",function(){return o.cancelEdit()}),t.EFF(61,"Cancel"),t.k0s()()()(),t.j41(62,"mat-drawer-content",30)(63,"div",31)(64,"p",32),t.EFF(65," Short reusable notes with tags. Set status to "),t.j41(66,"strong"),t.EFF(67,"Training Ready"),t.k0s(),t.EFF(68," and match an agent\u2019s document tags so snippets are included when you train\u2014same rules as files. "),t.k0s(),t.j41(69,"div",33)(70,"p",34)(71,"strong"),t.EFF(72,"Search"),t.k0s(),t.EFF(73," matches snippet "),t.j41(74,"em"),t.EFF(75,"names"),t.k0s(),t.EFF(76," only (not description body). "),t.j41(77,"strong"),t.EFF(78,"Status"),t.k0s(),t.EFF(79," limits the table to one workflow state, or "),t.j41(80,"strong"),t.EFF(81,"All statuses"),t.k0s(),t.EFF(82," for every row. Press "),t.j41(83,"kbd"),t.EFF(84,"Enter"),t.k0s(),t.EFF(85," in Search or click "),t.j41(86,"strong"),t.EFF(87,"Apply"),t.k0s(),t.EFF(88," to reload. "),t.k0s(),t.j41(89,"div",35)(90,"div",36)(91,"mat-form-field",37)(92,"mat-label"),t.EFF(93,"Search"),t.k0s(),t.j41(94,"input",38),t.mxI("ngModelChange",function(d){return t.DH7(o.searchInput,d)||(o.searchInput=d),d}),t.bIt("keyup.enter",function(){return o.applyFilters()}),t.k0s()()(),t.j41(95,"div",39)(96,"div",40)(97,"mat-form-field",21)(98,"mat-label"),t.EFF(99,"Status"),t.k0s(),t.j41(100,"mat-select",24),t.mxI("ngModelChange",function(d){return t.DH7(o.statusFilter,d)||(o.statusFilter=d),d}),t.j41(101,"mat-option",41),t.EFF(102,"All statuses"),t.k0s(),t.DNE(103,L,2,2,"mat-option",23),t.k0s()(),t.j41(104,"mat-form-field",21)(105,"mat-label"),t.EFF(106,"Authority"),t.k0s(),t.j41(107,"mat-select",24),t.mxI("ngModelChange",function(d){return t.DH7(o.authoritativeFilter,d)||(o.authoritativeFilter=d),d}),t.j41(108,"mat-option",42),t.EFF(109,"All sources"),t.k0s(),t.j41(110,"mat-option",43),t.EFF(111,"Authoritative only"),t.k0s(),t.j41(112,"mat-option",44),t.EFF(113,"Normal only"),t.k0s()()(),t.j41(114,"mat-form-field",21)(115,"mat-label"),t.EFF(116,"Sort"),t.k0s(),t.j41(117,"mat-select",24),t.mxI("ngModelChange",function(d){return t.DH7(o.sortFilter,d)||(o.sortFilter=d),d}),t.j41(118,"mat-option",45),t.EFF(119,"Newest first"),t.k0s(),t.j41(120,"mat-option",43),t.EFF(121,"Authoritative first"),t.k0s()()()(),t.j41(122,"span",46)(123,"button",47),t.bIt("click",function(){return o.applyFilters()}),t.j41(124,"mat-icon"),t.EFF(125,"filter_list"),t.k0s(),t.EFF(126," Ap
1ply "),t.k0s(),t.j41(127,"button",48),t.bIt("click",function(){return o.newSnippet()}),t.j41(128,"mat-icon"),t.EFF(129,"add"),t.k0s(),t.EFF(130," New snippet "),t.k0s()()()(),t.DNE(131,z,4,0,"div",49)(132,N,2,1,"p",50)(133,G,5,0,"div",51)(134,ct,25,3,"div",52),t.k0s()()()()()),2&s&&(t.R7$(12),t.Y8G("hasBackdrop",!0),t.R7$(),t.Y8G("opened",o.formOpen)("disableClose",o.saving),t.R7$(4),t.JRh(o.editing?"Edit snippet":"New snippet"),t.R7$(),t.Y8G("disabled",o.saving),t.R7$(12),t.R50("ngModel",o.draftName),t.R7$(9),t.R50("ngModel",o.draftDescription),t.R7$(4),t.R50("ngModel",o.draftTagIds),t.R7$(),t.Y8G("ngForOf",o.tags),t.R7$(4),t.R50("ngModel",o.draftStatus),t.R7$(),t.Y8G("ngForOf",o.statuses),t.R7$(6),t.R50("ngModel",o.draftAuthoritativeSource),t.R7$(3),t.Y8G("disabled",o.saving),t.R7$(),t.SpI(" ",o.saving?"Saving\u2026":"Save"," "),t.R7$(),t.Y8G("disabled",o.saving),t.R7$(34),t.R50("ngModel",o.searchInput),t.R7$(6),t.R50("ngModel",o.statusFilter),t.R7$(3),t.Y8G("ngForOf",o.statuses),t.R7$(4),t.R50("ngModel",o.authoritativeFilter),t.R7$(10),t.R50("ngModel",o.sortFilter),t.R7$(14),t.Y8G("ngIf",o.loading),t.R7$(),t.Y8G("ngIf",o.loadError&&!o.loading),t.R7$(),t.Y8G("ngIf",!o.loading&&!o.loadError&&0===o.snippets.length),t.R7$(),t.Y8G("ngIf",!o.loading&&o.snippets.length>0))},dependencies:[k.MD,k.Sq,k.bT,w.YN,w.me,w.BC,w.vS,E.Wk,M.Hl,M.$z,F.iY,l.m_,l.An,u.tP,u.Zl,u.tL,u.ji,u.cC,u.YV,u.iL,u.KS,u.$R,u.YZ,u.NB,D.R,j.rl,j.nJ,O.fS,O.fg,C.Ve,C.VO,y.wT,P.D6,P.LG,e.u,A.oV,n.vg,n.qe,n.$C,n.$l,r.g7,r.So,k.vh],styles:['@charset "UTF-8";[_nghost-%COMP%]{display:block;min-height:100%}.knowledge-snippets[_ngcontent-%COMP%]{display:flex;flex-direction:column;min-height:100dvh;min-height:100vh;padding:0;max-width:none;margin:0;color:#f3f4f6}.knowledge-snippets__shell[_ngcontent-%COMP%]{flex:1 1 auto;display:flex;flex-direction:column;min-height:0;background:transparent}.knowledge-snippets__main[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1 1 auto;min-height:0;height:100%;background:transparent}[_nghost-%COMP%] .knowledge-snippets__shell.mat-drawer-container>.mat-drawer-backdrop{z-index:3}[_nghost-%COMP%] .knowledge-snippets__shell.mat-drawer-container>.knowledge-snippets__drawer.mat-drawer{z-index:4}.knowledge-snippets__drawer.mat-drawer[_ngcontent-%COMP%]{width:min(440px,100vw - 12px);height:100%;max-height:none;top:0;bottom:0;border-left:1px solid rgba(255,255,255,.12);border-radius:0;box-sizing:border-box;background:#0c0e16fa!important;color:#f8fafc;box-shadow:-16px 0 48px #00000073}.knowledge-snippets__drawer-inner[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;height:100%;min-height:0;padding:.75rem .75rem 1rem 1rem;box-sizing:border-box;overflow:hidden}.knowledge-snippets__drawer-inner[_ngcontent-%COMP%] .knowledge-snippets__form-row[_ngcontent-%COMP%]{flex:1 1 auto;min-height:0;overflow-y:auto;margin-bottom:0;padding-right:.25rem}.knowledge-snippets__drawer-inner[_ngcontent-%COMP%] .mat-mdc-form-field .mat-mdc-text-field-wrapper{background:#ffffff0f}.knowledge-snippets__drawer-inner[_ngcontent-%COMP%] .mat-mdc-form-field .mdc-text-field__input, .knowledge-snippets__drawer-inner[_ngcontent-%COMP%] .mat-mdc-form-field .mat-mdc-input-element{color:#fff!important;caret-color:#fff}.knowledge-snippets__drawer-inner[_ngcontent-%COMP%] .mat-mdc-form-field .mdc-text-field__input::placeholder, .knowledge-snippets__drawer-inner[_ngcontent-%COMP%] .mat-mdc-form-field .mat-mdc-input-element::placeholder{color:#ffffff80!important}.knowledge-snippets__drawer-inner[_ngcontent-%COMP%] .mat-mdc-form-field .mat-mdc-floating-label, .knowledge-snippets__drawer-inner[_ngcontent-%COMP%] .mat-mdc-form-field .mdc-floating-label, .knowledge-snippets__drawer-inner[_ngcontent-%COMP%] .mat-mdc-form-field .mat-mdc-form-field-label, .knowledge-snippets__drawer-inner[_ngcontent-%COMP%] .mat-mdc-form-field mat-label{color:#ffffffe0!important}.knowledge-snippets__drawer-inner[_ngcontent-%COMP%] .mat-mdc-form-field.mat-focused .mat-mdc-floating-label, .knowledge-snippets__drawer-inner[_ngcontent-%COMP%] .mat-mdc-form-field.mat-focused .mdc-floating-label--float-above, .knowledge-sni
1ppets__drawer-inner[_ngcontent-%COMP%] .mat-mdc-form-field.mat-focused .mat-mdc-form-field-label{color:#fff!important}.knowledge-snippets__drawer-inner[_ngcontent-%COMP%] .mat-mdc-form-field .mat-mdc-select, .knowledge-snippets__drawer-inner[_ngcontent-%COMP%] .mat-mdc-form-field .mat-mdc-select-value, .knowledge-snippets__drawer-inner[_ngcontent-%COMP%] .mat-mdc-form-field .mat-mdc-select-value-text, .knowledge-snippets__drawer-inner[_ngcontent-%COMP%] .mat-mdc-form-field .mat-mdc-select-min-line{color:#fff!important}.knowledge-snippets__drawer-inner[_ngcontent-%COMP%] .mat-mdc-form-field .mat-mdc-select-arrow{color:#ffffffe6!important}.knowledge-snippets__drawer-inner[_ngcontent-%COMP%] mat-checkbox[_ngcontent-%COMP%]{color:#e5e7ebeb}.knowledge-snippets__drawer-inner[_ngcontent-%COMP%] .mat-mdc-checkbox .mdc-form-field{color:#e5e7ebeb}.knowledge-snippets__drawer-inner[_ngcontent-%COMP%] .mat-mdc-checkbox .mdc-label, .knowledge-snippets__drawer-inner[_ngcontent-%COMP%] .mat-mdc-checkbox .mdc-form-field>label, .knowledge-snippets__drawer-inner[_ngcontent-%COMP%] .mat-mdc-checkbox .mdc-form-field__label, .knowledge-snippets__drawer-inner[_ngcontent-%COMP%] .mat-mdc-checkbox .mdc-form-field__label-text{color:#e5e7ebeb!important;font-size:.9rem;line-height:1.45;font-weight:400}.knowledge-snippets__drawer-inner[_ngcontent-%COMP%] .mat-mdc-checkbox .mdc-checkbox__background{border-color:#ffffff73!important}.knowledge-snippets__drawer-inner[_ngcontent-%COMP%] .mat-mdc-checkbox.mat-mdc-checkbox-checked .mdc-checkbox__background{border-color:#6366f1e6!important;background-color:#6366f1d9!important}.knowledge-snippets__drawer-inner[_ngcontent-%COMP%] .mat-mdc-checkbox .mdc-checkbox__checkmark{color:#fff!important}.knowledge-snippets__drawer-inner[_ngcontent-%COMP%] .mat-mdc-checkbox .mdc-checkbox__checkmark-path{stroke:#fff!important}[_nghost-%COMP%] .knowledge-snippets__shell>.mat-drawer{height:100%;max-height:none}.knowledge-snippets__drawer-head[_ngcontent-%COMP%]{display:flex;align-items:flex-start;justify-content:space-between;gap:.5rem;flex-shrink:0}.knowledge-snippets__drawer-head[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0;font-size:1.1rem;font-weight:600;color:#f8fafc;flex:1;min-width:0;padding-top:.35rem;line-height:1.3}.knowledge-snippets__drawer-head[_ngcontent-%COMP%] .mat-mdc-icon-button[_ngcontent-%COMP%]{color:#e2e8f0e6;flex-shrink:0}.knowledge-snippets__body[_ngcontent-%COMP%]{flex:1 1 auto;min-height:0;padding:1.25rem 1.5rem 2.5rem;max-width:var(--shell-page-body-max-width, 1200px);width:100%;margin:0 auto;box-sizing:border-box}@media(max-width:768px){.knowledge-snippets__body[_ngcontent-%COMP%]{padding:1rem 1rem 2rem}}.knowledge-snippets__lede[_ngcontent-%COMP%]{margin:0 0 1rem;font-size:.92rem;color:#94a3b8f2;line-height:1.55;max-width:42rem}.knowledge-snippets__lede[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:#e2e8f0fa;font-weight:600}.knowledge-snippets__panel[_ngcontent-%COMP%]{background:#181a26eb;border:1px solid rgba(255,255,255,.08);border-radius:16px;padding:1rem 1.25rem 1.25rem;min-height:200px}.knowledge-snippets__filters-guide[_ngcontent-%COMP%]{margin:0 0 .85rem;font-size:.8125rem;line-height:1.5;color:#cbd5e1fa;max-width:52rem}.knowledge-snippets__filters-guide[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:#f8fafc;font-weight:600}.knowledge-snippets__filters-guide[_ngcontent-%COMP%] em[_ngcontent-%COMP%]{color:#e2e8f0f2;font-style:italic}.knowledge-snippets__filters-guide[_ngcontent-%COMP%] kbd[_ngcontent-%COMP%]{display:inline-block;font-size:.7rem;font-family:inherit;padding:.08em .4em .12em;border-radius:4px;background:#ffffff1a;border:1px solid rgba(255,255,255,.22);color:#f8fafc;vertical-align:text-bottom}.knowledge-snippets__toolbar[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.75rem;
1align-items:stretch;padding-bottom:1rem;margin-bottom:1rem;border-bottom:1px solid rgba(255,255,255,.06)}.knowledge-snippets__toolbar[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#fff}.knowledge-snippets__toolbar[_ngcontent-%COMP%] .mat-mdc-form-field{margin:0;height:40px;box-sizing:border-box}.knowledge-snippets__toolbar[_ngcontent-%COMP%] .mat-mdc-form-field .mat-mdc-text-field-wrapper{background:#ffffff0f;height:40px;overflow:hidden}.knowledge-snippets__toolbar[_ngcontent-%COMP%] .mat-mdc-form-field .mat-mdc-form-field-flex{height:40px;align-items:center}.knowledge-snippets__toolbar[_ngcontent-%COMP%] .mat-mdc-form-field .mat-mdc-form-field-infix{padding-top:0!important;padding-bottom:0!important;min-height:40px!important;display:flex;align-items:center}.knowledge-snippets__toolbar[_ngcontent-%COMP%] .mat-mdc-form-field .mat-mdc-select-trigger{height:40px}.knowledge-snippets__toolbar[_ngcontent-%COMP%] .mat-mdc-form-field .mat-mdc-form-field-subscript-wrapper{display:none}.knowledge-snippets__toolbar[_ngcontent-%COMP%] .mat-mdc-form-field .mdc-notched-outline .mdc-notched-outline__leading, .knowledge-snippets__toolbar[_ngcontent-%COMP%] .mat-mdc-form-field .mdc-notched-outline .mdc-notched-outline__notch, .knowledge-snippets__toolbar[_ngcontent-%COMP%] .mat-mdc-form-field .mdc-notched-outline .mdc-notched-outline__trailing{border-color:#94a3b873!important}.knowledge-snippets__toolbar[_ngcontent-%COMP%] .mat-mdc-form-field.mat-focused .mdc-notched-outline .mdc-notched-outline__leading, .knowledge-snippets__toolbar[_ngcontent-%COMP%] .mat-mdc-form-field.mat-focused .mdc-notched-outline .mdc-notched-outline__notch, .knowledge-snippets__toolbar[_ngcontent-%COMP%] .mat-mdc-form-field.mat-focused .mdc-notched-outline .mdc-notched-outline__trailing{border-color:#6366f1bf!important}.knowledge-snippets__toolbar[_ngcontent-%COMP%] .mat-mdc-form-field .mdc-text-field__input, .knowledge-snippets__toolbar[_ngcontent-%COMP%] .mat-mdc-form-field .mat-mdc-input-element{color:#fff!important;caret-color:#fff}.knowledge-snippets__toolbar[_ngcontent-%COMP%] .mat-mdc-form-field .mdc-text-field__input::placeholder, .knowledge-snippets__toolbar[_ngcontent-%COMP%] .mat-mdc-form-field .mat-mdc-input-element::placeholder{color:#ffffff80!important}.knowledge-snippets__toolbar[_ngcontent-%COMP%] .mat-mdc-form-field .mat-mdc-floating-label, .knowledge-snippets__toolbar[_ngcontent-%COMP%] .mat-mdc-form-field .mdc-floating-label, .knowledge-snippets__toolbar[_ngcontent-%COMP%] .mat-mdc-form-field .mat-mdc-form-field-label, .knowledge-snippets__toolbar[_ngcontent-%COMP%] .mat-mdc-form-field mat-label{color:#ffffffe0!important}.knowledge-snippets__toolbar[_ngcontent-%COMP%] .mat-mdc-form-field.mat-focused .mat-mdc-floating-label, .knowledge-snippets__toolbar[_ngcontent-%COMP%] .mat-mdc-form-field.mat-focused .mdc-floating-label--float-above, .knowledge-snippets__toolbar[_ngcontent-%COMP%] .mat-mdc-form-field.mat-focused .mat-mdc-form-field-label{color:#fff!important}.knowledge-snippets__toolbar[_ngcontent-%COMP%] .mat-mdc-form-field .mat-mdc-select, .knowledge-snippets__toolbar[_ngcontent-%COMP%] .mat-mdc-form-field .mat-mdc-select-value, .knowledge-snippets__toolbar[_ngcontent-%COMP%] .mat-mdc-form-field .mat-mdc-select-value-text, .knowledge-snippets__toolbar[_ngcontent-%COMP%] .mat-mdc-form-field .mat-mdc-select-min-line{color:#fff!important}.knowledge-snippets__toolbar[_ngcontent-%COMP%] .mat-mdc-form-field .mat-mdc-select-arrow{color:#ffffffe6!important}.knowledge-snippets__toolbar-search-row[_ngcontent-%COMP%]{width:100%}.knowledge-snippets__toolbar-controls-row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;gap:.75rem;width:100%}.knowledge-snippets__toolbar-filters[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;gap:.65rem;flex:1 1 auto;min-width:0;overflow-x:visible;overflow-y:visible}.knowledge-snippets__toolbar-filters[_ngcontent-%COMP%] > mat-form-field[_ngcontent-%COMP%]{height:40px;flex:1 1 8rem;min-width:min(100%,8.5rem);max-width:100%}
1@media(max-width:560px){.knowledge-snippets__toolbar-filters[_ngcontent-%COMP%]{flex-direction:column;align-items:stretch}.knowledge-snippets__toolbar-filters[_ngcontent-%COMP%] > mat-form-field[_ngcontent-%COMP%]{width:100%;max-width:none;flex:1 1 auto;min-width:0}.knowledge-snippets__authority-field[_ngcontent-%COMP%] mat-checkbox[_ngcontent-%COMP%]{display:block;width:100%}.knowledge-snippets__authority-field[_ngcontent-%COMP%] .mdc-form-field{align-items:flex-start;white-space:normal}.knowledge-snippets__authority-field[_ngcontent-%COMP%] .mdc-label{white-space:normal;line-height:1.35}}.knowledge-snippets__authority-field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.35rem;padding:.35rem 0 .6rem}.knowledge-snippets__authority-label[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.35rem;color:#f8fafc;font-size:.9rem;font-weight:600}.knowledge-snippets__authority-label[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#fbbf24;font-size:18px;width:18px;height:18px}.knowledge-snippets__authority-column-header[_ngcontent-%COMP%], .knowledge-snippets__authority-column-cell[_ngcontent-%COMP%]{width:56px;text-align:center;vertical-align:middle;padding-top:0;padding-bottom:0}.knowledge-snippets__authority-column-header[_ngcontent-%COMP%] .knowledge-snippets__authority-icon[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;vertical-align:middle}.knowledge-snippets__authority-column-cell[_ngcontent-%COMP%] .mat-mdc-icon-button[_ngcontent-%COMP%], .knowledge-snippets__authority-column-cell[_ngcontent-%COMP%] .mat-icon-button[_ngcontent-%COMP%]{vertical-align:middle}.knowledge-snippets__authority-icon[_ngcontent-%COMP%]{color:#fbbf24;font-size:18px;width:18px;height:18px}.knowledge-snippets__authority-active[_ngcontent-%COMP%]{color:#fbbf24}.knowledge-snippets__toolbar-actions[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center;flex-shrink:0;margin-left:auto}@media(max-width:600px){.knowledge-snippets__toolbar-actions[_ngcontent-%COMP%]{margin-left:0;width:100%;justify-content:flex-start}}.knowledge-snippets__toolbar-actions[_ngcontent-%COMP%] .mat-mdc-outlined-button, .knowledge-snippets__toolbar-actions[_ngcontent-%COMP%] .mat-mdc-unelevated-button{height:40px}.knowledge-snippets__toolbar-actions[_ngcontent-%COMP%] .mat-mdc-outlined-button{--mdc-outlined-button-label-text-color: #fff;--mat-outlined-button-state-layer-color: #fff;--mat-outlined-button-ripple-color: rgba(255, 255, 255, .12);color:#fff!important}.knowledge-snippets__toolbar-actions[_ngcontent-%COMP%] .mat-mdc-outlined-button .mdc-button__label, .knowledge-snippets__toolbar-actions[_ngcontent-%COMP%] .mat-mdc-outlined-button .mat-icon{color:#fff!important}.knowledge-snippets__toolbar-actions[_ngcontent-%COMP%] .mat-mdc-outlined-button .mdc-notched-outline .mdc-notched-outline__leading, .knowledge-snippets__toolbar-actions[_ngcontent-%COMP%] .mat-mdc-outlined-button .mdc-notched-outline .mdc-notched-outline__notch, .knowledge-snippets__toolbar-actions[_ngcontent-%COMP%] .mat-mdc-outlined-button .mdc-notched-outline .mdc-notched-outline__trailing{border-color:#fff6!important}.knowledge-snippets__toolbar-actions[_ngcontent-%COMP%] .mat-mdc-outlined-button:hover{background:#ffffff14}.knowledge-snippets__toolbar-actions[_ngcontent-%COMP%] .mat-mdc-unelevated-button.mat-primary .mdc-button__label, .knowledge-snippets__toolbar-actions[_ngcontent-%COMP%] .mat-mdc-unelevated-button.mat-primary .mat-icon{color:#fff!important}.knowledge-snippets__search[_ngcontent-%COMP%]{width:100%;max-width:none}.knowledge-snippets__loading[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;justify-content:center;padding:2rem;color:#cbd5e1f2}.knowledge-snippets__empty[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;text-align:center;gap:.75rem;padding:2rem 1rem;color:#cbd5e1f2}.knowledge-snippets__empty[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:40px;width:40px;height:40px;opacity:.65;color:#94a3b8f2}
1.knowledge-snippets__empty[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;max-width:28rem;line-height:1.5;color:#94a3b8f2}.knowledge-snippets__error[_ngcontent-%COMP%]{margin:0;padding:1rem 0;color:#fca5a5}.knowledge-snippets__table-wrap[_ngcontent-%COMP%]{overflow:auto;margin:0 -.25rem;padding:0 .25rem}.knowledge-snippets__table[_ngcontent-%COMP%]{width:100%;background:transparent}.knowledge-snippets__table[_ngcontent-%COMP%] th.mat-header-cell[_ngcontent-%COMP%], .knowledge-snippets__table[_ngcontent-%COMP%] th.mat-mdc-header-cell[_ngcontent-%COMP%]{color:#e2e8f0f2;font-weight:600;border-bottom-color:#ffffff1a}.knowledge-snippets__table[_ngcontent-%COMP%] td.mat-cell[_ngcontent-%COMP%], .knowledge-snippets__table[_ngcontent-%COMP%] td.mat-mdc-cell[_ngcontent-%COMP%]{color:#f1f5f9f2;border-bottom-color:#ffffff0f}.knowledge-snippets__table[_ngcontent-%COMP%] .mat-mdc-icon-button[_ngcontent-%COMP%]{color:#e2e8f0e0}.knowledge-snippets__table[_ngcontent-%COMP%] .mat-mdc-icon-button[_ngcontent-%COMP%]:hover{color:#f8fafc;background:#ffffff0f}.knowledge-snippets__desc-preview[_ngcontent-%COMP%]{max-width:280px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.knowledge-snippets__status[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:#e2e8f0f2}.knowledge-snippets__status[data-status=training_ready][_ngcontent-%COMP%]{color:#6ee7b7}.knowledge-snippets__status[data-status=draft][_ngcontent-%COMP%]{color:#94a3b8fa}.knowledge-snippets__status[data-status=review][_ngcontent-%COMP%]{color:#fcd34d}.knowledge-snippets__status[data-status=archived][_ngcontent-%COMP%]{color:#94a3b8bf}.knowledge-snippets__source-badge[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.3rem;font-size:.78rem;font-weight:500;padding:.15rem .55rem;border-radius:999px;background:#94a3b82e;color:#e2e8f0f2;border:1px solid rgba(255,255,255,.06);white-space:nowrap;line-height:1.2}.knowledge-snippets__source-badge--slack[_ngcontent-%COMP%]{background:#4a154b66;color:#f3a7d5;border-color:#f3a7d540}.knowledge-snippets__source-badge--manual[_ngcontent-%COMP%]{background:#6366f129;color:#c7d2fe;border-color:#a5b4fc2e}.knowledge-snippets__source-icon[_ngcontent-%COMP%]{font-size:14px!important;width:14px!important;height:14px!important;line-height:14px!important}.knowledge-snippets__field-block[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.35rem}.knowledge-snippets__field-guide[_ngcontent-%COMP%]{margin:0;font-size:.8125rem;line-height:1.45;color:#cbd5e1fa;flex-shrink:0}.knowledge-snippets__field-guide[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:#f8fafc;font-weight:600}.knowledge-snippets__field-body[_ngcontent-%COMP%]{width:100%}.knowledge-snippets__form-row[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.1rem;margin-bottom:.75rem}.knowledge-snippets__actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;margin-top:auto;padding-top:1rem;flex-wrap:wrap;flex-shrink:0;border-top:1px solid rgba(255,255,255,.06)}.knowledge-snippets__actions[_ngcontent-%COMP%] .mat-mdc-outlined-button{--mdc-outlined-button-label-text-color: #fff;color:#fff!important}.knowledge-snippets__actions[_ngcontent-%COMP%] .mat-mdc-outlined-button .mdc-button__label{color:#fff!important}.knowledge-snippets__actions[_ngcontent-%COMP%] .mat-mdc-outlined-button .mdc-notched-outline .mdc-notched-outline__leading, .knowledge-snippets__actions[_ngcontent-%COMP%] .mat-mdc-outlined-button .mdc-notched-outline .mdc-notched-outline__notch, .knowledge-snippets__actions[_ngcontent-%COMP%] .mat-mdc-outlined-button .mdc-notched-outline .mdc-notched-outline__trailing{border-color:#fff6!important}.knowledge-snippets__actions[_ngcontent-%COMP%] .mat-mdc-outlined-button:hover{background:#ffffff14}.knowledge-snippets__actions[_ngcontent-%COMP%] .mat-mdc-unelevated-button.mat-primary .mdc-button__label{color:#fff!important}.knowledge-snippets__header-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem;width:100%}.knowledge-snippets__header-row[_ngcontent-%COMP%] .app-page-header__back[_ngcontent-%COMP%]{margin-top:0}
1@media(max-width:768px){.knowledge-snippets__header-row[_ngcontent-%COMP%]{justify-content:flex-start!important}}.knowledge-snippets__title-block[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.15rem;min-width:0}.knowledge-snippets__title-block[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0}.knowledge-snippets__subtitle[_ngcontent-%COMP%]{margin:0;font-size:.875rem;font-weight:400;color:#94a3b8f2;line-height:1.4;max-width:56rem}']}))}return a(),_})()},41119(K,S,p){p.d(S,{g:()=>C});var k=p(51585),w=p(88834),E=p(12629),M=p(72200),l=p(73664),u=p(17705);let D=(()=>{var P;class e{constructor(r,g,f){this.dialogRef=r,this.data=g,this.cdr=f}ngOnInit(){this.cdr.detectChanges()}getIcon(){switch(this.data?.type||"info"){case"danger":return"error";case"warning":return"warning";default:return"info"}}getButtonColor(){switch(this.data?.type||"info"){case"danger":return"warn";case"warning":return"accent";default:return"primary"}}onCancel(){this.dialogRef.close(!1)}onConfirm(){this.dialogRef.close(!0)}static#t=P=()=>(this.\u0275fac=function(g){return new(g||e)(l.rXU(k.CP),l.rXU(k.Vh),l.rXU(u.gRc))},this.\u0275cmp=l.VBU({type:e,selectors:[["app-confirm-dialog"]],decls:14,vars:8,consts:[[1,"confirm-dialog-container"],[1,"confirm-dialog-header"],[1,"dialog-icon"],[1,"confirm-dialog-content"],[1,"confirm-dialog-actions"],["mat-button","",3,"click"],["mat-raised-button","",3,"click","color"]],template:function(g,f){1&g&&(l.j41(0,"div",0)(1,"div",1)(2,"mat-icon",2),l.EFF(3),l.k0s(),l.j41(4,"h2"),l.EFF(5),l.k0s()(),l.j41(6,"div",3)(7,"p"),l.EFF(8),l.k0s()(),l.j41(9,"div",4)(10,"button",5),l.bIt("click",function(){return f.onCancel()}),l.EFF(11),l.k0s(),l.j41(12,"button",6),l.bIt("click",function(){return f.onConfirm()}),l.EFF(13),l.k0s()()()),2&g&&(l.R7$(2),l.HbH("icon-"+(f.data.type||"info")),l.R7$(),l.JRh(f.getIcon()),l.R7$(2),l.JRh(f.data.title||"Confirm Action"),l.R7$(3),l.JRh(f.data.message||"Are you sure?"),l.R7$(3),l.SpI(" ",f.data.cancelText||"Cancel"," "),l.R7$(),l.Y8G("color",f.getButtonColor()),l.R7$(),l.SpI(" ",f.data.confirmText||"Confirm"," "))},dependencies:[M.MD,w.Hl,w.$z,E.m_,E.An],styles:[".confirm-dialog-container[_ngcontent-%COMP%]{padding:24px;min-width:400px;max-width:500px;background:transparent;position:relative;z-index:1}.confirm-dialog-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:16px;margin-bottom:20px}.confirm-dialog-header[_ngcontent-%COMP%] .dialog-icon[_ngcontent-%COMP%]{font-size:32px;width:32px;height:32px;color:#3b82f6}.confirm-dialog-header[_ngcontent-%COMP%] .dialog-icon.icon-warning[_ngcontent-%COMP%]{color:#f59e0b}.confirm-dialog-header[_ngcontent-%COMP%] .dialog-icon.icon-danger[_ngcontent-%COMP%]{color:#ef4444}.confirm-dialog-header[_ngcontent-%COMP%] .dialog-icon.icon-info[_ngcontent-%COMP%]{color:#3b82f6}.confirm-dialog-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0;font-size:20px;font-weight:600;color:#fff!important}.confirm-dialog-content[_ngcontent-%COMP%]{margin-bottom:24px}.confirm-dialog-content[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;color:#ffffffe6!important;line-height:1.6;font-size:14px}.confirm-dialog-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:12px}.confirm-dialog-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{min-width:80px}.confirm-dialog-actions[_ngcontent-%COMP%] button[mat-button][_ngcontent-%COMP%], .confirm-dialog-actions[_ngcontent-%COMP%] button[mat-raised-button][_ngcontent-%COMP%]{color:#fff!important}"]}))}return P(),e})();var O=p(2615);let C=(()=>{var P;class e{constructor(r){this.dialog=r}confirm(r){return this.dialog.open(D,{data:r,width:"450px",disableClose:!1,panelClass:"confirm-dialog-panel",hasBackdrop:!0,autoFocus:!0}).afterClosed()}static#t=P=()=>(this.\u0275fac=function(g){return new(g||e)(O.KVO(k.bZ))},this.\u0275prov=O.jDH({token:e,factory:e.\u0275fac,providedIn:"root"}))}return P(),e})()},58892(K,S,p){p.d(S,{d:()=>D});var k=p(10467),w=p(29330),E=p(71985),M=p(84412),l=p(45312),u=p(2615);let D=(()=>{var O;class C{constructor(e){this.http=e,this.apiUrl=`${l.c.apiUrl}
1/files`,this.filesSubject=new M.t([]),this.foldersSubject=new M.t([]),this.tagsSubject=new M.t([]),this.files$=this.filesSubject.asObservable(),this.folders$=this.foldersSubject.asObservable(),this.tags$=this.tagsSubject.asObservable(),this.optimizedContentCache=new Map}getAuthHeaders(){const e=localStorage.getItem("token");return new w.Lr({"Content-Type":"application/json",Authorization:`Bearer ${e}`})}uploadFile(e,n={}){const r=new FormData;r.append("file",e),n.folderId&&r.append("folderId",n.folderId);const g=Array.isArray(n.tags)?n.tags:[];r.append("tags",JSON.stringify(g)),n.description&&r.append("description",n.description),r.append("status",n.status||"draft"),void 0!==n.authoritativeSource&&r.append("authoritativeSource",String(n.authoritativeSource)),void 0!==n.createdWithDocxBuilder&&r.append("createdWithDocxBuilder",String(n.createdWithDocxBuilder)),void 0!==n.createdWithAiBuilder&&r.append("createdWithAiBuilder",String(n.createdWithAiBuilder));const f=localStorage.getItem("token"),h=new w.Lr({Authorization:`Bearer ${f}`});return this.http.post(`${this.apiUrl}/upload`,r,{headers:h})}ocrImage(e){const n=new FormData;return n.append("image",e),this.http.post(`${this.apiUrl}/ocr-image`,n)}getFiles(e={}){const n=new URLSearchParams;return e.status&&n.append("status",e.status),e.search&&n.append("search",e.search),void 0!==e.authoritativeSource&&n.append("authoritativeSource",String(e.authoritativeSource)),e.sort&&n.append("sort",e.sort),e.tags&&e.tags.length>0&&n.append("tags",e.tags.join(",")),e.folderId&&n.append("folderId",e.folderId),e.dateRange&&(n.append("startDate",e.dateRange.start),n.append("endDate",e.dateRange.end)),this.http.get(`${this.apiUrl}?${n.toString()}`,{headers:this.getAuthHeaders()})}getFileById(e,n=!1){let r=`${this.apiUrl}/${e}`;return n&&(r+=`?_t=${Date.now()}`),this.http.get(r,{headers:this.getAuthHeaders()})}updateFile(e,n){return this.http.put(`${this.apiUrl}/${e}`,n)}deleteFile(e){return this.http.delete(`${this.apiUrl}/${e}`)}reuploadFile(e,n){const r=localStorage.getItem("token"),g=new w.Lr({Authorization:`Bearer ${r}`});return this.http.post(`${this.apiUrl}/${e}/reupload`,n,{headers:g})}updateFileStatus(e,n){return this.http.patch(`${this.apiUrl}/${e}/status`,{status:n})}addTagsToFile(e,n){return this.http.post(`${this.apiUrl}/${e}/tags`,{tagIds:n})}removeTagsFromFile(e,n){return this.http.delete(`${this.apiUrl}/${e}/tags`,{body:{tagIds:n}})}uploadNewVersion(e,n){const r=new FormData;return r.append("file",n),this.http.post(`${this.apiUrl}/${e}/versions`,r)}getFileDownloadUrl(e){return this.http.get(`${this.apiUrl}/${e}/download`)}getFilePreviewUrl(e,n=!1,r=!1){const g=this.getAuthHeaders();let f=n?"?asText=true":"";return r&&(f+=(f?"&":"?")+`_t=${Date.now()}`),this.http.get(`${this.apiUrl}/${e}/preview${f}`,n?{headers:g,responseType:"text"}:{headers:g,responseType:"blob"})}createFolder(e){return this.http.post(`${l.c.apiUrl}/files/folders`,e)}getFolders(e){return this.http.get(`${l.c.apiUrl}/files/folders${e?`?parentId=${e}`:""}`,{headers:this.getAuthHeaders()})}updateFolder(e,n){return this.http.put(`${l.c.apiUrl}/files/folders/${e}`,n)}deleteFolder(e){return this.http.delete(`${l.c.apiUrl}/files/folders/${e}`)}getFolderTree(){return this.http.get(`${l.c.apiUrl}/files/folders/tree`)}createTag(e){return this.http.post(`${l.c.apiUrl}/files/tags`,e)}getTags(){return this.http.get(`${l.c.apiUrl}/files/tags`,{headers:this.getAuthHeaders()})}updateTag(e,n){return this.http.put(`${l.c.apiUrl}/files/tags/${e}`,n)}deleteTag(e){return this.http.delete(`${l.c.apiUrl}/files/tags/${e}`)}bulkUpdateStatus(e,n){return this.http.patch(`${this.apiUrl}/bulk/status`,{fileIds:e,status:n})}bulkAddTags(e,n){return this.http.patch(`${this.apiUrl}/bulk/tags`,{fileIds:e,tagIds:n})}bulkMoveFiles(e,n){return this.http.patch(`${this.apiUrl}/bulk/move`,{fileIds:e,folderId:n})}bulkDeleteFiles(e){return this.http.delete(`${this.apiUrl}/bulk`,{body:{fileIds:e}})}getFileAnalytics(e){return this.http.get(`${this.apiUrl}/analytics${e?`?startDate=${e.start}&endDate=${e.end}`:""}`,{headers:this.getAuthHeaders()})}getFileUsageStats(e){return this.http.get(`${this.apiUrl}/${e}/stats`)}searchFiles(e,n={}
1){const r=new URLSearchParams;return r.append("q",e),n.status&&r.append("status",n.status),n.tags&&n.tags.length>0&&n.tags.forEach(g=>r.append("tags",g)),n.folderId&&r.append("folderId",n.folderId),this.http.get(`${this.apiUrl}/search?${r.toString()}`)}updateFilesList(e){this.filesSubject.next(e)}updateFoldersList(e){this.foldersSubject.next(e)}updateTagsList(e){this.tagsSubject.next(e)}addFileToList(e){this.filesSubject.next([e,...this.filesSubject.value])}updateFileInList(e){const n=this.filesSubject.value,r=n.findIndex(g=>g.id===e.id);-1!==r&&(n[r]=e,this.filesSubject.next([...n]))}removeFileFromList(e){const r=this.filesSubject.value.filter(g=>g.id!==e);this.filesSubject.next(r)}formatFileSize(e){if(0===e)return"0 Bytes";const g=Math.floor(Math.log(e)/Math.log(1024));return parseFloat((e/Math.pow(1024,g)).toFixed(2))+" "+["Bytes","KB","MB","GB"][g]}getFileIcon(e){return e.includes("pdf")?"picture_as_pdf":e.includes("word")||e.includes("document")||e.includes("wordprocessingml")?"description":e.includes("excel")||e.includes("spreadsheet")||e.includes("spreadsheetml")?"table_chart":e.includes("powerpoint")||e.includes("presentation")?"slideshow":e.includes("image")?"image":e.includes("text")?"text_snippet":e.includes("csv")?"table_view":"insert_drive_file"}getStatusColor(e){switch(e){case"draft":default:return"#6B7280";case"review":return"#F59E0B";case"training_ready":return"#10B981";case"archived":return"#EF4444"}}getFileVersions(e){return this.http.get(`${this.apiUrl}/${e}/versions`)}makeVersionCurrent(e,n){return this.http.post(`${this.apiUrl}/${e}/versions/${n}/make-current`,{})}deleteFileVersion(e,n){return this.http.delete(`${this.apiUrl}/${e}/versions/${n}`)}scanFile(e){return new E.c(n=>{const r=localStorage.getItem("token");if(!r)return void n.error(new Error("Missing authentication token"));const g=new AbortController;return fetch(`${this.apiUrl}/${e}/scan`,{method:"GET",headers:{Accept:"text/event-stream",Authorization:`Bearer ${r}`},signal:g.signal}).then(function(){var h=(0,k.A)(function*(t){if(!t.ok){const x=yield t.text();let v=x||`HTTP ${t.status}`;try{const F=JSON.parse(x);v=F.message||F.error||v}catch{}throw new Error(v)}const R=t.body?.getReader();if(!R)throw new Error("No response body");const I=new TextDecoder;let $="";for(;;){const{done:x,value:v}=yield R.read();if(x)return void n.complete();$+=I.decode(v,{stream:!0});const F=$.split("\n");$=F.pop()||"";for(const j of F){const y=j.trim();if(!y.startsWith("data:"))continue;const A=y.startsWith("data: ")?y.slice(6):y.slice(5);try{const b=JSON.parse(A);if(b.error)return void n.error(new Error(b.message||b.error));if(b.complete)return n.next(b),void n.complete();n.next(b)}catch(b){return void n.error(b instanceof Error?b:new Error(String(b)))}}}});return function(t){return h.apply(this,arguments)}}()).catch(h=>n.error(h)),()=>g.abort()})}downloadScanResultsAsPDF(e,n){const r=this.getAuthHeaders();return this.http.post(`${this.apiUrl}/${e}/scan/pdf`,n,{headers:r,responseType:"blob"})}optimizeFile(e,n){const r=this.getAuthHeaders();return this.http.post(`${this.apiUrl}/${e}/optimize`,n,{headers:r})}setOptimizedContent(e,n){this.optimizedContentCache.set(e,n)}getOptimizedContent(e){const n=this.optimizedContentCache.get(e);return n?(this.optimizedContentCache.delete(e),n):null}static#t=O=()=>(this.\u0275fac=function(n){return new(n||C)(u.KVO(w.Qq))},this.\u0275prov=u.jDH({token:C,factory:C.\u0275fac,providedIn:"root"}))}return O(),C})()}}]);
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.