1import{a as J,b as R}from"./chunk-PTD4BQDF.js";import{Cc as Bt,Ce as zt,Ec as G,Gb as W,Gc as Nt,Hc as $t,Hd as Gt,Kb as Ut,Mb as Vt,Ob as Mt,Qc as Ht,Qd as K,Vb as z,Wb as Ft,Wc as Wt,Xb as Y,b as N,d as $,k as H,kh as Yt,m as Tt,nc as Lt,pc as Rt,re as jt,sc as Ot,se as Qt,ve as qt,x as wt,xb as Pt}from"./chunk-X5J6QTCG.js";import{$ as it,$a as c,Ad as dt,Fa as s,Fb as ht,Gb as Q,Hb as ft,Ib as t,Jb as f,Ka as w,Kb as E,Lb as at,Lc as vt,Ma as M,Na as nt,Qb as k,Rb as P,Sa as T,Sb as U,Th as Dt,U as S,Wc as St,Xa as ot,Xb as bt,Yc as Et,_ as gt,_c as yt,ba as Ct,bb as p,be as X,bg as At,cc as q,d as V,db as j,dc as tt,eb as O,fa as g,fb as B,fi as kt,ga as C,gb as x,hb as i,ib as n,jb as u,lc as h,mc as y,nc as I,pj as L,qb as b,qc as F,sb as _,tb as m,vd as It,x as _t}from"./chunk-SMW7PHYX.js";import"./chunk-BMIYOSOG.js";var ne=()=>({"min-width":"500px","min-height":"500px"});function oe(o,r){o&1&&(t(0,` 2 `),u(1,"span",7),t(2,` 3 `))}function ae(o,r){if(o&1&&(t(0,` 4 `),i(1,"th"),t(2),n(),t(3,` 5 `)),o&2){let e=r.$implicit;s(2),E(` 6 `,e.header,` 7 `)}}function le(o,r){if(o&1&&(t(0,` 8 `),i(1,"tr"),t(2,` 9 `),O(3,ae,4,1,null,null,j),n(),t(5,` 10 `)),o&2){let e=m(2);s(3),B(e.columns)}}function re(o,r){if(o&1){let e=b();t(0,` 11 `),i(1,"tr"),t(2,` 12 `),i(3,"td"),t(4),n(),t(5,` 13 `),i(6,"td"),t(7),n(),t(8,` 14 `),i(9,"td"),t(10,` 15 `),i(11,"a",11),_("click",function(){let a=g(e).$implicit,d=m(2);return C(d.editSuggestion(a))}),t(12),h(13,"ellipsis"),n(),t(14,` 16 `),n(),t(15,` 17 `),i(16,"td"),t(17,` 18 `),i(18,"a",11),_("click",function(){let a=g(e).$implicit,d=m(2);return C(d.deleteSuggestion(a))}),t(19,` 19 Delete 20 `),n(),t(20,` 21 `),n(),t(21,` 22 `),n(),t(22,` 23 `)}if(o&2){let e=r.$implicit;s(4),f(e.chatCategory==null?null:e.chatCategory.chatCategoryName),s(3),f(e.role==null?null:e.role.name),s(5),E(` 24 `,I(13,3,e.messageSuggestion,100),` 25 `)}}function se(o,r){if(o&1&&(t(0,` 26 `),i(1,"p-table",8),t(2,` 27 `),T(3,le,6,0,"ng-template",9),t(4,` 28 `),T(5,re,23,6,"ng-template",10),t(6,` 29 `),n(),t(7,` 30 `)),o&2){let e=m();s(),x("columns",e.columns)("lazy",!1)("loading",e.loading)("paginator",!1)("value",e.copilotChatMessageSuggestions)}}function de(o,r){if(o&1){let e=b();t(0,` 31 `),i(1,"div",14),t(2,` 32 `),i(3,"p-select",21),U("ngModelChange",function(a){g(e);let d=m(2);return P(d.currentCopilotChatMessageSuggestionToEdit.chatCategoryID,a)||(d.currentCopilotChatMessageSuggestionToEdit.chatCategoryID=a),C(a)}),n(),t(4,` 33 `),n(),t(5,` 34 `)}if(o&2){let e=m(2);s(3),x("options",e.chatCategoryOptions()),k("ngModel",e.currentCopilotChatMessageSuggestionToEdit.chatCategoryID)}}function me(o,r){o&1&&(t(0,` 35 `),u(1,"span",7),t(2,` 36 `))}function ce(o,r){if(o&1){let e=b();t(0,` 37 `),i(1,"p-dialog",12),t(2,` 38 `),i(3,"h3",13),t(4),n(),t(5,` 39 `),c(6,de,6,2),i(7,"div",14),t(8,` 40 `),i(9,"p-select",15),U("ngModelChange",function(a){g(e);let d=m();return P(d.currentCopilotChatMessageSuggestionToEdit.roleID,a)||(d.currentCopilotChatMessageSuggestionToEdit.roleID=a),C(a)}),n(),t(10,` 41 `),n(),t(11,` 42 `),i(12,"div",16),t(13,` 43 `),i(14,"textarea",17),U("ngModelChange",function(a){g(e);let d=m();return P(d.currentCopilotChatMessageSuggestionToEdit.messageSuggestion,a)||(d.currentCopilotChatMessageSuggestionToEdit.messageSuggestion=a),C(a)}),n(),t(15,` 44 `),n(),t(16,` 45 `),i(17,"div",18),t(18,` 46 `),i(19,"a",19),_("click",function(){g(e);let a=m();return C(a.cancelSuggestionEdit())}),t(20,` 47 Cancel 48 `),n(),t(21,` 49 `),i(22,"a",20),_("click",function(){g(e);let a=m();return C(a.saveSuggestion())}),t(23,` 50 `),c(24,me,3,0),t(25,` 51 Save 52 `),n(),t(26,` 53 `),n(),t(27,` 54 `),n(),t(28,` 55 `)}if(o&2){let e=m();s(),x("draggable",!1)("modal",!0)("visible",!!e.currentCopilotChatMessageSuggestionToEdit)("closable",!1),s(3),E(` 56 `,e.currentCopilotChatMessageSuggestionToEdit.copilotChatMessageSuggestionsID>0?"Edit":"Create",` 57 Suggestion 58 `),s(2),p(e.currentCopilotChatMessageSuggestionToEdit.copilotChatMessageSuggestionsID>0?-1:6),s(3),x("options",e.roleOptions),k("ngModel",e.currentCopilotChatMessageSuggestionToEdit.roleID),s(3),Q(q(12,ne)),s(2),k("ngModel",e.currentCopilotChatMessageSuggestionToEdit.messageSuggestion),s(10),p(e.saving?24:-1)}}var Kt=(()=>
58{let r=class r{constructor(l,a){this.copilotAdminService=l,this.siteDataService=a,this.unsubscribe$=new V,this.roleOptions=[],this.columns=[{field:"chatCategoryName",header:"Category"},{field:"role",header:"Role"},{field:"messageSuggestion",header:"Message Suggestion"},{field:"messageSuggestion",header:""}],this.Permission=Dt,this.AriaLabels=At}ngOnInit(){this.search(),this.copilotAdminService.getMessageSuggestionRoles().pipe(S(this.unsubscribe$)).subscribe({next:l=>{this.roleOptions=l}})}search(l=null){this.loading=!0,this.copilotAdminService.getCopilotChatMessageSuggestions().pipe(S(this.unsubscribe$)).subscribe({next:a=>{this.copilotChatMessageSuggestions=a,this.loading=!1,this.showTable=!0},error:a=>{this.loading=!1,this.siteDataService.showSiteErrorAlert("Error getting copilot chat suggestions.")}})}createNewSuggestion(){this.currentCopilotChatMessageSuggestionToEdit={copilotChatMessageSuggestionsID:0,chatCategoryID:null,messageSuggestion:"",chatCategory:null,roleID:null}}editSuggestion(l){this.currentCopilotChatMessageSuggestionToEdit=l}cancelSuggestionEdit(){this.currentCopilotChatMessageSuggestionToEdit=null}saveSuggestion(){if(this.currentCopilotChatMessageSuggestionToEdit.copilotChatMessageSuggestionsID>0)this.saving=!0,this.copilotAdminService.updateCopilotChatMessageSuggestion(this.currentCopilotChatMessageSuggestionToEdit.copilotChatMessageSuggestionsID,this.currentCopilotChatMessageSuggestionToEdit).pipe(S(this.unsubscribe$)).subscribe({next:()=>{this.saving=!1,this.currentCopilotChatMessageSuggestionToEdit=null,this.search(),this.siteDataService.showSiteSuccessAlert("Copilot chat suggestion updated.")},error:()=>{this.saving=!1,this.siteDataService.showSiteErrorAlert("Error updating copilot chat suggestion.")}});else{if(!(this.currentCopilotChatMessageSuggestionToEdit.chatCategoryID>0)){this.siteDataService.showSiteErrorAlert("Please select a category.");return}this.saving=!0;let l={copilotChatMessageSuggestionsID:0,chatCategoryID:this.currentCopilotChatMessageSuggestionToEdit.chatCategoryID,messageSuggestion:this.currentCopilotChatMessageSuggestionToEdit.messageSuggestion,chatCategory:null,roleID:this.currentCopilotChatMessageSuggestionToEdit.roleID??null};this.copilotAdminService.createCopilotChatMessageSuggestion(l).pipe(S(this.unsubscribe$)).subscribe({next:()=>{this.saving=!1,this.currentCopilotChatMessageSuggestionToEdit=null,this.search(),this.siteDataService.showSiteSuccessAlert("Copilot chat suggestion created.")},error:()=>{this.saving=!1,this.siteDataService.showSiteErrorAlert("Error creating copilot chat suggestion.")}})}}chatCategoryOptions(){return this.copilotAdminService.chatCategoryOptions()}deleteSuggestion(l){this.saving=!0,this.copilotAdminService.deleteCopilotChatMessageSuggestion(l.copilotChatMessageSuggestionsID).pipe(S(this.unsubscribe$)).subscribe({next:()=>{this.saving=!1,this.search(),this.siteDataService.showSiteSuccessAlert("Copilot chat suggestion deleted.")},error:()=>{this.saving=!1,this.siteDataService.showSiteErrorAlert("Error deleting copilot chat suggestion.")}})}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}};r.\u0275fac=function(a){return new(a||r)(w(R),w(L))},r.\u0275cmp=M({type:r,selectors:[["app-copilot-suggestions-edit"]],standalone:!1,decls:25,vars:3,consts:[[1,"card"],[1,"row","m-1","mb-3"],[1,"col-md-10","pl-0"],[1,"col-md-2","align-right","pr-0"],[1,"btn","btn-sm","btn-icon-table",3,"click"],[1,"btn","btn-sm","btn-icon-down-arrow","ml-1",3,"click"],[1,"table-responsive"],["aria-hidden","true","role","status",1,"spinner-border","spinner-border-sm"],["responsiveLayout","scroll",1,"table","table-striped","table-sm",3,"columns","lazy","loading","paginator","value"],["pTemplate","header"],["pTemplate","body"],[3,"click"],[3,"draggable","modal","visible","closable"],[1,"text-center"],[1,"row","mb-1"],["optionLabel","label","optionValue","value","placeholder","All Roles (no filter)",3,"ngModelChange","options","ngModel"],[1,"row"],[3,"ngModelChange","ngModel"],[1,"row","form-action","no-gutters"],["href","javascript:void(0);",1,"btn","btn-lg","btn-blank",3,"click"],["href","javascript:void(0);",1,"btn","btn-lg","btn-primary",3,"click"],[3,"ngModelChange","options","ngModel"]],template:function(a,d){a&1&&(i(0,"section",0),t(1,` 59 60 61 `),i(2,"div",1),t(3,` 62 `),i(4,"div",2),t(5,` 63 `),n(),t(6,` 64 `),i(7,"div",3),t(8,` 65 `),i(9,"a",4),_("click",function(){return d.search()}),t(10,` 66 `),c(11,oe,3,0),t(12,"\xA0 Refresh Results"),n(),t(13,` 67 `),i(14,"a",5),_("click",function(){return d.createNewSuggestion()}),t(15,` 68 Create Suggestion 69 `),n(),t(16,` 70 `),n(),t(17,` 71 72 `),n(),t(18,` 73 `),i(19,"div",6),t(20,` 74 `),c(21,se,8,5),n(),t(22,` 75 `),n(),t(23,` 76 77 78 `),c(24,ce,29,13)),a&2&&(s(11),p(d.loading?11:-1),s(10),p(d.showTable?21:-1),s(3),p(d.currentCopilotChatMessageSuggestionToEdit?24:-1))},dependencies:[N,$,H,X,G,W,Pt,K],encapsulation:2});let o=r;return o}
78)();var ue=()=>({height:"300px","overflow-y":"scroll"}),xe=()=>({"min-width":"500px","min-height":"500px"});function _e(o,r){o&1&&(t(0,` 79 `),u(1,"span",6),t(2,` 80 `))}function ge(o,r){if(o&1&&(t(0,` 81 `),i(1,"th"),t(2),n(),t(3,` 82 `)),o&2){let e=r.$implicit;s(2),E(` 83 `,e.header,` 84 `)}}function Ce(o,r){if(o&1&&(t(0,` 85 `),i(1,"tr"),t(2,` 86 `),O(3,ge,4,1,null,null,j),n(),t(5,` 87 `)),o&2){let e=m(2);s(3),B(e.columns)}}function he(o,r){o&1&&(t(0,` 88 `),i(1,"a",17),t(2,"Promote"),n(),t(3,` 89 `))}function fe(o,r){if(o&1){let e=b();t(0,` 90 `),i(1,"tr"),t(2,` 91 `),i(3,"td"),t(4),h(5,"ellipsis"),n(),t(6,` 92 `),i(7,"td"),t(8),n(),t(9,` 93 `),i(10,"td"),t(11,` 94 `),i(12,"div",15),t(13,` 95 `),i(14,"a",16),_("click",function(){let a=g(e).$implicit,d=m(4);return C(d.editPrompt(a))}),t(15,"Edit"),n(),t(16,` 96 `),c(17,he,4,0),n(),t(18,` 97 `),n(),t(19,` 98 `),n(),t(20,` 99 `)}if(o&2){let e=r.$implicit;s(4),E(` 100 `,I(5,3,e.prompt,100),` 101 `),s(4),E(` 102 `,e.isPublished?"Yes":"No",` 103 `),s(9),p(e.isPublished===!1?17:-1)}}function be(o,r){if(o&1&&(t(0,` 104 `),i(1,"tr",11),t(2,` 105 `),i(3,"td"),t(4,` 106 `),i(5,"div",12),t(6,` 107 `),i(7,"table",11),t(8,` 108 `),i(9,"thead"),t(10,` 109 `),i(11,"tr",13),t(12,` 110 `),i(13,"th"),t(14,"Prompt"),n(),t(15,` 111 `),i(16,"th"),t(17,"Published"),n(),t(18,` 112 `),u(19,"th"),t(20,` 113 `),n(),t(21,` 114 `),n(),t(22,` 115 `),i(23,"tbody",14),t(24,` 116 `),O(25,fe,21,6,null,null,j),n(),t(27,` 117 `),n(),t(28,` 118 `),n(),t(29,` 119 `),n(),t(30,` 120 `),n(),t(31,` 121 `)),o&2){let e=m().$implicit;s(3),ot("colspan",3),s(2),Q(q(3,ue)),s(20),B(e.copilotPrompts)}}function ve(o,r){if(o&1){let e=b();t(0,` 122 `),i(1,"tr"),t(2,` 123 `),i(3,"td"),t(4),n(),t(5,` 124 `),i(6,"td"),t(7),h(8,"ellipsis"),n(),t(9,` 125 `),i(10,"td"),t(11,` 126 `),i(12,"a",10),_("click",function(){let a=g(e).$implicit,d=m(2);return C(d.toggleCategoryPromptVersions(a.copilotPromptTypeID))}),t(13,` 127 `),i(14,"span"),t(15),n(),t(16,` 128 `),n(),t(17,` 129 `),n(),t(18,` 130 `),n(),t(19,` 131 `),c(20,be,32,4)}if(o&2){let e=r.$implicit;s(4),f(e.publishedPrompt==null||e.publishedPrompt.copilotPromptType==null?null:e.publishedPrompt.copilotPromptType.description),s(3),f(I(8,4,e.publishedPrompt==null?null:e.publishedPrompt.prompt,100)),s(8),E(` 132 `,e.expanded===!0?"Collapse Versions":"View Versions",` 133 `),s(5),p(e.expanded===!0?20:-1)}}function Se(o,r){if(o&1&&(t(0,` 134 `),i(1,"p-table",7),t(2,` 135 `),T(3,Ce,6,0,"ng-template",8),t(4,` 136 `),T(5,ve,21,7,"ng-template",9),t(6,` 137 `),n(),t(7,` 138 `)),o&2){let e=m();s(),x("value",e.copilotPromptsByCategory)("columns",e.columns)("lazy",!1)("loading",e.loading)("paginator",!1)}}function Ee(o,r){o&1&&(t(0,` 139 `),u(1,"span",6),t(2,` 140 `))}function ye(o,r){if(o&1){let e=b();t(0,` 141 `),i(1,"p-dialog",18),t(2,` 142 `),i(3,"h3",19),t(4,"Edit Prompt"),n(),t(5,` 143 `),i(6,"div",15),t(7,` 144 `),i(8,"textarea",20),U("ngModelChange",function(a){g(e);let d=m();return P(d.currentPromptToEdit.prompt,a)||(d.currentPromptToEdit.prompt=a
144),C(a)}),n(),t(9,` 145 `),n(),t(10,` 146 `),i(11,"div",21),t(12,` 147 `),i(13,"a",22),_("click",function(){g(e);let a=m();return C(a.cancelPromptEdit())}),t(14,` 148 Cancel 149 `),n(),t(15,` 150 `),i(16,"a",23),_("click",function(){g(e);let a=m();return C(a.updatePrompt())}),t(17,` 151 `),c(18,Ee,3,0),t(19,` 152 Save 153 `),n(),t(20,` 154 `),n(),t(21,` 155 `),n(),t(22,` 156 `)}if(o&2){let e=m();s(),x("draggable",!1)("modal",!0)("visible",!!e.currentPromptToEdit)("closable",!1),s(5),Q(q(8,xe)),s(2),k("ngModel",e.currentPromptToEdit.prompt),s(10),p(e.saving?18:-1)}}var Jt=(()=>{let r=class r{constructor(l,a){this.siteDataService=l,this.copilotService=a,this.unsubscribe$=new V,this.columns=[{field:"categoryName",header:"Category"},{field:"publishedPrompt",header:"Published Prompt"},{field:"viewVersions",header:"View Versions"}]}ngOnInit(){this.search()}search(l=null){this.loading=!0,this.copilotService.getCopilotPrompts().pipe(S(this.unsubscribe$)).subscribe({next:a=>{this.copilotPrompts=a,this.copilotPromptsByCategory=a.reduce((d,v)=>{let D=d.find(A=>A.copilotPromptTypeID===v.copilotPromptTypeID);return D?D.copilotPrompts.push(v):d.push({copilotPromptTypeID:v.copilotPromptTypeID,copilotPrompts:[v],expanded:!1}),d},[]),this.copilotPromptsByCategory.forEach(d=>{d.publishedPrompt=d.copilotPrompts.find(v=>v.isPublished)}),this.loading=!1,this.showTable=!0},error:()=>{this.loading=!1,this.siteDataService.showSiteErrorAlert("Error getting copilot prompts.")}})}toggleCategoryPromptVersions(l){this.copilotPromptsByCategory.forEach(a=>{a.copilotPromptTypeID===l&&(a.expanded=!a.expanded)})}editPrompt(l){this.currentPromptToEdit=l}cancelPromptEdit(){this.currentPromptToEdit=null}updatePrompt(){this.saving||(this.saving=!0,this.copilotService.updateCopilotPrompt(this.currentPromptToEdit.copilotPromptID,this.currentPromptToEdit).pipe(S(this.unsubscribe$)).subscribe({next:()=>{this.saving=!1,this.currentPromptToEdit=null,this.search(),this.siteDataService.showSiteSuccessAlert("Copilot prompt updated.")},error:()=>{this.saving=!1,this.siteDataService.showSiteErrorAlert("Error updating copilot prompt.")}}))}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}};r.\u0275fac=function(a){return new(a||r)(w(L),w(R))},r.\u0275cmp=M({type:r,selectors:[["app-copilot-prompt-edit"]],standalone:!1,decls:22,vars:3,consts:[[1,"card"],[1,"row","m-1","mb-3"],[1,"col-md-10","pl-0"],[1,"col-md-2","align-right","pr-0"],[1,"btn","btn-sm","btn-icon-table",3,"click"],[1,"table-responsive"],["aria-hidden","true","role","status",1,"spinner-border","spinner-border-sm"],["responsiveLayout","scroll",1,"table","table-striped","table-sm",3,"value","columns","lazy","loading","paginator"],["pTemplate","header"],["pTemplate","body"],[1,"ml-2",3,"click"],[1,"bg-grey-lt"],[1,"p-2"],[1,"text-left"],[1,"p-element","p-datatable-tbody"],[1,"row"],[1,"col",3,"click"],[1,"col"],[3,"draggable","modal","visible","closable"],[1,"text-center"],[3,"ngModelChange","ngModel"],[1,"row","form-action","no-gutters"],["href","javascript:void(0);",1,"btn","btn-lg","btn-blank",3,"click"],["href","javascript:void(0);",1,"btn","btn-lg","btn-primary",3,"click"]],template:function(a,d){a&1&&(i(0,"section",0),t(1,` 157 158 `),i(2,"div",1),t(3,` 159 `),i(4,"div",2),t(5,` 160 `),n(),t(6,` 161 `),i(7,"div",3),t(8,` 162 `),i(9,"a",4),_("click",function(){return d.search()}),t(10,` 163 `),c(11,_e,3,0),t(12,"\xA0 Refresh Results"),n(),t(13,` 164 `),n(),t(14,` 165 `),n(),t(15,` 166 `),i(16,"div",5),t(17,` 167 `),c(18,Se,8,5),n(),t(19,` 168 `),n(),t(20,` 169 170 171 `),c(21,ye,23,9)),a&2&&(s(11),p(d.loading?11:-1),s(7),p(d.showTable?18:-1),s(3),p(d.currentPromptToEdit?21:-1))},dependencies:[N,$,H,X,G,W,K],encapsulation:2});let o=r;return o})();var we=()=>({"min-width":"500px","min-height":"500px"});function Ie(o,r){o&1&&(t(0,` 172 `),u(1,"span",6),t(2,` 173 `))}function Ae(o,r){if(o&1&&(t(0,` 174 `),i(1,"th"),t(2),n(),t(3,` 175 `)),o&2){let e=r.$implicit;s(2),E(` 176 `,e.header,` 177 `)}}function De(o,r){if(o&1&&(t(0,` 178 `),i(1,"tr"),t(2,` 179 `),O(3,Ae,4,1,null,null,j),n(),t(5,` 180 `)),o&2){let e=m(2);s(3),B(e.columns)}}function ke(o,r){if(o&1){let e=b();t(0,` 181 `),i(1,"tr"),t(2,` 182 `),i(3,"td"),t(4),n(),t(5,` 183 `),i(6,"td"),t(7,` 184 `),i(8,"a",10),_("click",function(){let a=g(e).$implicit,d=m(2);return C(d.editGreeting(a))}),t(9),h(10,"ellipsis"),n(),t(11,` 185 `),n(),t(12,` 186 `),n(),t(13,` 187 `)}if(o&2){let e=r.$implicit;s(4),E(` 188 `,e.chatCategory==null?null:e.chatCategory.chatCategoryName,` 189 `),s(5),E(` 190 `,I(10,2,e.prompt,100),` 191 `)}}function Pe(o,r){if(o&1&&(t(0,` 192 `),i(1,"p-table",7),t(2,` 193 `),T(3,De,6,0,"ng-template",8),t(4,` 194 `),T(5,ke,14,5,"ng-template",9),t(6,` 195 `),n(),t(7,` 196 `)),o&2){let e=m();s(),x("value",e.copilotGreetings)("columns",e.columns)("lazy",!1)("loading",e.loading)("paginator",!1)}}function Ue(o,r){o&1&&(t(0,` 197 `),u(1,"span",6),t(2,` 198 `))}function Ve(o,r){if(o&1){let e=b();t(0,` 199 `),i(1,"p-dialog",11),t(2,` 200 `),i(3,"h3",12),t(4,"Edit Greeting"),n(),t(5,` 201 `),i(6,"div",13),t(7,` 202 `),i(8,"textarea",14),U("ngModelChange",function(a){g(e);let d=m();return P(d.currentGreetingToEdit.prompt,a)||(d.currentGreetingToEdit.prompt=a
202),C(a)}),n(),t(9,` 203 `),n(),t(10,` 204 `),i(11,"div",15),t(12,` 205 `),i(13,"a",16),_("click",function(){g(e);let a=m();return C(a.cancelGreetingEdit())}),t(14,` 206 Cancel 207 `),n(),t(15,` 208 `),i(16,"a",17),_("click",function(){g(e);let a=m();return C(a.updateGreeting())}),t(17,` 209 `),c(18,Ue,3,0),t(19,` 210 Save 211 `),n(),t(20,` 212 `),n(),t(21,` 213 `),n(),t(22,` 214 `)}if(o&2){let e=m();s(),x("draggable",!1)("modal",!0)("visible",!!e.currentGreetingToEdit)("closable",!1),s(5),Q(q(8,we)),s(2),k("ngModel",e.currentGreetingToEdit.prompt),s(10),p(e.saving?18:-1)}}var te=(()=>{let r=class r{constructor(l,a){this.siteDataService=l,this.copilotService=a,this.unsubscribe$=new V,this.fields=[new Y({dynamicFormFieldTypeID:z.HTML_TEXT,key:"prompt",controlName:"prompt",name:"prompt",label:"Prompt",required:!0,maxLength:1e4})],this.columns=[{field:"chatCategoryName",header:"Category"},{field:"prompt",header:"Greeting"}]}ngOnInit(){this.search()}search(l=null){this.loading=!0,this.copilotService.getCopilotGreetings().pipe(S(this.unsubscribe$)).subscribe({next:a=>{this.copilotGreetings=a,this.loading=!1,this.showTable=!0},error:()=>{this.loading=!1,this.siteDataService.showSiteErrorAlert("Error getting copilot greetings.")}})}editGreeting(l){this.currentGreetingToEdit=l}cancelGreetingEdit(){this.currentGreetingToEdit=null}updateGreeting(){this.saving||(this.saving=!0,this.copilotService.updateCopilotGreeting(this.currentGreetingToEdit.copilotGreetingID,this.currentGreetingToEdit).pipe(S(this.unsubscribe$)).subscribe({next:()=>{this.saving=!1,this.currentGreetingToEdit=null,this.search(),this.siteDataService.showSiteSuccessAlert("Copilot greeting updated.")},error:()=>{this.saving=!1,this.siteDataService.showSiteErrorAlert("Error updating copilot greeting.")}}))}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}};r.\u0275fac=function(a){return new(a||r)(w(L),w(R))},r.\u0275cmp=M({type:r,selectors:[["app-copilot-greeting-edit"]],standalone:!1,decls:22,vars:3,consts:[[1,"card"],[1,"row","m-1","mb-3"],[1,"col-md-10","pl-0"],[1,"col-md-2","align-right","pr-0"],[1,"btn","btn-sm","btn-icon-table",3,"click"],[1,"table-responsive"],["aria-hidden","true","role","status",1,"spinner-border","spinner-border-sm"],["responsiveLayout","scroll",1,"table","table-striped","table-sm",3,"value","columns","lazy","loading","paginator"],["pTemplate","header"],["pTemplate","body"],[3,"click"],[3,"draggable","modal","visible","closable"],[1,"text-center"],[1,"row"],[3,"ngModelChange","ngModel"],[1,"row","form-action","no-gutters"],["href","javascript:void(0);",1,"btn","btn-lg","btn-blank",3,"click"],["href","javascript:void(0);",1,"btn","btn-lg","btn-primary",3,"click"]],template:function(a,d){a&1&&(i(0,"section",0),t(1,` 215 216 `),i(2,"div",1),t(3,` 217 `),i(4,"div",2),t(5,` 218 `),n(),t(6,` 219 `),i(7,"div",3),t(8,` 220 `),i(9,"a",4),_("click",function(){return d.search()}),t(10,` 221 `),c(11,Ie,3,0),t(12,"\xA0 Refresh Results"),n(),t(13,` 222 `),n(),t(14,` 223 `),n(),t(15,` 224 `),i(16,"div",5),t(17,` 225 `),c(18,Pe,8,5),n(),t(19,` 226 `),n(),t(20,` 227 228 229 `),c(21,Ve,23,9)),a&2&&(s(11),p(d.loading?11:-1),s(7),p(d.showTable?18:-1),s(3),p(d.currentGreetingToEdit?21:-1))},dependencies:[N,$,H,X,G,W,K],encapsulation:2});let o=r;return o})();var rt=(()=>{let r=class r{constructor(l){this.webApi=l,this.baseUrl="admin/ai-usage"}getSummary(){return this.webApi.getData(`${this.baseUrl}/summary`)}getFleet(l){return this.webApi.getData(`${this.baseUrl}/fleet?windowDays=${l}`)}getClubDetail(l,a){return this.webApi.getData(`${this.baseUrl}/clubs/${l}?windowDays=${a}`)}getExternalRegistrationUsage(){return this.webApi.getData(`${this.baseUrl}/external-registration`)}updateExternalRegistrationLimit(l){return this.webApi.putData(`${this.baseUrl}/external-registration/limit`,l)}getOverrideHistory(l){return this.webApi.getData(`${this.baseUrl}/clubs/${l}/overrides`)}createOverride(l,a){return this.webApi.postData(`${this.baseUrl}/clubs/${l}/overrides`,a)}revokeOverride(l,a){return this.webApi.deleteData(`${this.baseUrl}/clubs/${l}/overrides/${a}`)}};r.\u0275fac=function(a){return new(a||r)(Ct(kt))},r.\u0275prov=gt({token:r,factory:r.\u0275fac});let o=r;return o}
229)();var Re=(o,r)=>r.clubID;function Oe(o,r){if(o&1){let e=b();t(0,` 230 `),i(1,"span",12),t(2,` 231 `),i(3,"a",13),_("click",function(){let a=g(e).$implicit,d=m(2);return C(d.selectClub(a))}),t(4),n(),t(5),n(),t(6,` 232 `)}if(o&2){let e=r.$implicit,l=m(2);s(4),f(e.clubName||"Club "+e.clubID),s(),E(` 233 (`,l.atQuotaFeatureNames(e),`) 234 `)}}function Be(o,r){if(o&1&&(t(0,` 235 `),i(1,"app-inline-alert",11),t(2,` 236 `),i(3,"strong"),t(4),n(),t(5,` 237 `),O(6,Oe,7,2,null,null,Re),n(),t(8,` 238`)),o&2){let e=m();s(4),at("",e.clubsAtQuota.length," ",e.clubsAtQuota.length===1?"club is":"clubs are"," at an AI quota right now:"),s(2),B(e.clubsAtQuota)}}function Ne(o,r){if(o&1){let e=b();t(0,` 239 `),i(1,"app-inline-alert",14),t(2,` 240 Unable to load the AI usage summary. 241 `),i(3,"button",15),_("click",function(){g(e);let a=m(2);return C(a.loadSummary())}),t(4,` 242 `),u(5,"i",16),t(6,`Retry 243 `),n(),t(7,` 244 `),n(),t(8,` 245 `)}o&2&&(s(),x("isInline",!0))}function $e(o,r){if(o&1&&(t(0,` 246 `),i(1,"div",23),t(2),h(3,"currency"),n(),t(4,` 247 `)),o&2){let e=m(3);s(2),E("\u2248 ",y(3,1,e.summary.estimatedCostToday))}}function He(o,r){if(o&1&&(t(0,` 248 `),i(1,"div",17),t(2,` 249 `),i(3,"div",18),t(4,` 250 `),i(5,"div",19),t(6,` 251 `),i(7,"span",20),t(8,"Clubs At Quota"),n(),t(9,` 252 `),i(10,"div",21),t(11),n(),t(12,` 253 `),n(),t(13,` 254 `),n(),t(14,` 255 `),i(15,"div",18),t(16,` 256 `),i(17,"div",19),t(18,` 257 `),i(19,"span",20),t(20,"Limit Hits (24h)"),n(),t(21,` 258 `),i(22,"div",21),t(23),h(24,"number"),n(),t(25,` 259 `),n(),t(26,` 260 `),n(),t(27,` 261 `),i(28,"div",18),t(29,` 262 `),i(30,"div",19),t(31,` 263 `),i(32,"span",20),t(33,"Agent Sessions Today"),n(),t(34,` 264 `),i(35,"div",21),t(36),h(37,"number"),n(),t(38,` 265 `),n(),t(39,` 266 `),n(),t(40,` 267 `),i(41,"div",18),t(42,` 268 `),i(43,"div",19),t(44,` 269 `),i(45,"span",20),t(46,"Tokens Today"),n(),t(47,` 270 `),i(48,"div",21),t(49),h(50,"number"),n(),t(51,` 271 `),c(52,$e,5,3),n(),t(53,` 272 `),n(),t(54,` 273 `),i(55,"div",18),t(56,` 274 `),i(57,"div",19),t(58,` 275 `),i(59,"span",20),t(60,"Content Drafts Today"),n(),t(61,` 276 `),i(62,"div",21),t(63),h(64,"number"),n(),t(65,` 277 `),n(),t(66,` 278 `),n(),t(67,` 279 `),i(68,"div",22),t(69,` 280 `),i(70,"div",19),t(71,` 281 `),i(72,"span",20),t(73,"Chat Questions Today"),n(),t(74,` 282 `),i(75,"div",21),t(76),h(77,"number"),n(),t(78,` 283 `),n(),t(79,` 284 `),n(),t(80,` 285 `),n(),t(81,` 286 `)),o&2){let e=m(2);s(10),ht("text-danger",e.summary.clubsAtQuotaNow>0),s(),f(e.summary.clubsAtQuotaNow),s(12),f(y(24,9,e.summary.hitsLast24Hours)),s(13),f(y(37,11,e.summary.agentSessionsToday)),s(13),f(y(50,13,e.summary.tokensToday)),s(3),p(e.summary.estimatedCostToday!==null?52:-1),s(11),f(y(64,15,e.summary.contentDraftsToday)),s(13),f(y(77,17,e.summary.assistantMessagesToday))}}function We(o,r){if(o&1&&(t(0,` 287 `),c(1,Ne,9,1)(2,He,82,19)),o&2){let e=m();s(),p(e.summaryError&&!e.summary?1:e.summary?2:-1)}}function Ge(o,r){if(o&1){let e=b();t(0,` 288 `),i(1,"app-inline-alert",14),t(2,` 289 Unable to load the club fleet. 290 `),i(3,"button",15),_("click",function(){g(e);let a=m(2);return C(a.loadFleet())}),t(4,` 291 `),u(5,"i",16),t(6,`Retry 292 `),n(),t(7,` 293 `),n(),t(8,` 294 `)}o&2&&(s(),x("isInline",!0))}function je(o,r){o&1&&(t(0,` 295 `),i(1,"th",35),t(2,"Est. Cost "),u(3,"p-sortIcon",36),n(),t(4,` 296 `))}function Qe(o,r){if(o&1&&(t(0,` 297 `),i(1,"tr"),t(2,` 298 `),i(3,"th",25),t(4,"Club "),u(5,"p-sortIcon",26),n(),t(6,` 299 `),i(7,"th"),t(8,"Status"),n(),t(9,` 300 `),i(10,"th",27),t(11,"Limit Hits "),u(12,"p-sortIcon",28),n(),t(13,` 301 `),i(14,"th",29),t(15,"Usage "),u(16,"p-sortIcon",30),n(),t(17,` 302 `),i(18,"th",31),t(19,"Tokens "),u(20,"p-sortIcon",32),n(),t(21,` 303 `),c(22,je,5,0),i(23,"th",33),t(24,"Last Activity "),u(25,"p-sortIcon",34),n(),t(26,` 304 `),n(),t(27,` 305 `)),o&2){let e=m(3);s(22),p(e.costConfigured?22:-1)}}function qe(o,r){o&1&&(t(0,` 306 `),u(1,"app-pill",39),t(2,` 307 `))}function ze(o,r){o&1&&(t(0,` 308 `),u(1,"app-pill",40),t(2,` 309 `))}function Ye(o,r){o&1&&(t(0,` 310 `),u(1,"app-pill",41),t(2,` 311 `))}function Ze(o,r){if(o&1&&(t(0,` 312 `),i(1,"td",38),t(2),h(3,"currency"),n(),t(4,` 313 `)),o&2){let e=m().$implicit;s(2),f(e.estimatedCostUsd!==null?y(3,1,e.estimatedCostUsd):"\u2014")}}function Xe(o,r){if(o&1){let e=b();t(0,` 314 `),i(1,"tr",37),_("click",function(){let a=g(e).$implicit,d=m(3);return C(d.selectClub(a))}),t(2,` 315 `),i(3,"td"),t(4,` 316 `),i(5,"a",13),_("click",function(a){let d=g(e).$implicit;return m(3).selectClub(d),C(a.stopPropagation())}),t(6),n(),t(7,` 317 `),n(),t(8,` 318 `),i(9,"td"),t(10,` 319 `),c(11,qe,3,0)(12,ze,3,0)(13,Ye,3,0),n(),t(14,` 320 `),i(15,"td",38),t(16),h(17,"number"),n(),t(18,` 321 `),i(19,"td",38),t(20),h(21,"number"),n(),t(22,` 322 `),i(23,"td",38),t(24),h(25,"number"),n(),t(26,` 323 `),c(27,Ze,5,3),i(28,"td",38),t(29),h(30,"date"),n(),t(31,` 324 `),n(),t(32,` 325 `)}if(o&2){let e=r.$implicit,l=m(3);s(6),E(` 326 `,e.clubName||"Club "+e.clubID,` 327 `),s(5),p(e.atQuotaNow?11:e.hitsInWindow>
3270?12:13),s(5),f(y(17,7,e.hitsInWindow)),s(4),f(y(21,9,e.unitsInWindow)),s(4),f(y(25,11,e.tokensInWindow)),s(3),p(l.costConfigured?27:-1),s(2),f(e.lastActivityOn?I(30,13,e.lastActivityOn+"Z","short"):"\u2014")}}function Ke(o,r){if(o&1&&(t(0,` 328 `),i(1,"tr"),t(2,` 329 `),i(3,"td",42),t(4,"No AI activity, hits, or enabled clubs in this window."),n(),t(5,` 330 `),n(),t(6,` 331 `)),o&2){let e=m(3);s(3),ot("colspan",e.costConfigured?7:6)}}function Je(o,r){if(o&1&&(t(0,` 332 `),i(1,"p-table",24),t(2,` 333 `),T(3,Qe,28,1,"ng-template",null,0,F),t(5,` 334 `),T(6,Xe,33,16,"ng-template",null,1,F),t(8,` 335 `),T(9,Ke,7,1,"ng-template",null,2,F),t(11,` 336 `),n(),t(12,` 337 `)),o&2){let e=m(2);s(),x("value",e.fleet.clubs)("paginator",e.fleet.clubs.length>15)("rows",15)}}function ti(o,r){if(o&1&&(t(0,` 338 `),c(1,Ge,9,1)(2,Je,13,3)),o&2){let e=m();s(),p(e.fleetError&&!e.fleet?1:e.fleet?2:-1)}}function ei(o,r){if(o&1){let e=b();t(0,` 339 `),i(1,"app-inline-alert",14),t(2,` 340 Unable to load this club's detail. 341 `),i(3,"button",15),_("click",function(){g(e);let a=m(3);return C(a.loadDetail(a.selectedClub))}),t(4,` 342 `),u(5,"i",16),t(6,`Retry 343 `),n(),t(7,` 344 `),n(),t(8,` 345 `)}o&2&&(s(),x("isInline",!0))}function ii(o,r){if(o&1&&(t(0,` 346 `),i(1,"tr"),t(2,` 347 `),i(3,"th"),t(4,"Feature"),n(),t(5,` 348 `),i(6,"th"),t(7,"Enabled"),n(),t(8,` 349 `),i(9,"th"),t(10,"Limit Source"),n(),t(11,` 350 `),i(12,"th",38),t(13,"This Hour"),n(),t(14,` 351 `),i(15,"th",52),t(16,"Of Limit"),n(),t(17,` 352 `),i(18,"th",38),t(19),n(),t(20,` 353 `),i(21,"th",38),t(22,"Tokens"),n(),t(23,` 354 `),i(24,"th",38),t(25,"Limit Hits"),n(),t(26,` 355 `),i(27,"th",38),t(28,"Last Activity"),n(),t(29,` 356 `),u(30,"th"),t(31,` 357 `),n(),t(32,` 358 `)),o&2){let e=m(4);s(19),E("Usage (",e.detail.windowDays,"d)")}}function ni(o,r){o&1&&(t(0,` 359 `),u(1,"app-pill",55),t(2,` 360 `))}function oi(o,r){o&1&&(t(0,` 361 `),u(1,"app-pill",56),t(2,` 362 `))}function ai(o,r){o&1&&(t(0,` 363 `),i(1,"span",57),t(2,"Default"),n(),t(3,` 364 `))}function li(o,r){if(o&1&&(i(0,"span"),t(1),h(2,"number"),n()),o&2){let e=m().$implicit;s(),E(" / ",y(2,1,e.limitPerHour))}}function ri(o,r){o&1&&(t(0,` 365 `),i(1,"span",57),t(2,"No limit"),n(),t(3,` 366 `))}function si(o,r){o&1&&(t(0,` 367 `),i(1,"span",58),t(2,"Blocked"),n(),t(3,` 368 `))}function di(o,r){if(o&1&&(t(0,` 369 `),u(1,"p-progressBar",59),t(2,` 370 `)),o&2){let e=m().$implicit,l=m(4);s(),x("value",l.usagePercent(e.usedThisHour,e.limitPerHour))("showValue",!1)("styleClass","progress-"
370+l.progressClass(e.atQuota,e.usedThisHour,e.limitPerHour))}}function mi(o,r){if(o&1){let e=b();t(0,` 371 `),i(1,"tr"),t(2,` 372 `),i(3,"td"),t(4),n(),t(5,` 373 `),i(6,"td"),t(7,` 374 `),u(8,"app-pill",53),t(9,` 375 `),n(),t(10,` 376 `),i(11,"td"),t(12,` 377 `),c(13,ni,3,0)(14,oi,3,0)(15,ai,4,0),n(),t(16,` 378 `),i(17,"td",38),t(18),h(19,"number"),c(20,li,3,3,"span"),n(),t(21,` 379 `),i(22,"td"),t(23,` 380 `),c(24,ri,4,0)(25,si,4,0)(26,di,3,3),n(),t(27,` 381 `),i(28,"td",38),t(29),h(30,"number"),n(),t(31,` 382 `),i(32,"td",38),t(33),h(34,"number"),n(),t(35,` 383 `),i(36,"td",38),t(37),h(38,"number"),n(),t(39,` 384 `),i(40,"td",38),t(41),h(42,"date"),n(),t(43,` 385 `),i(44,"td",38),t(45,` 386 `),i(46,"button",54),_("click",function(){let a=g(e).$implicit,d=m(4);return C(d.openOverrideDialog(a))}),t(47,` 387 Adjust 388 `),n(),t(48,` 389 `),n(),t(49,` 390 `),n(),t(50,` 391 `)}if(o&2){let e=r.$implicit;s(4),f(e.featureName),s(4),x("text",e.enabled?"On":"Off")("status",e.enabled?"success":"default"),s(5),p(e.hasActiveOverride&&e.limitPerHour===0?13:e.hasActiveOverride?14:15),s(5),E(` 392 `,y(19,11,e.usedThisHour)),s(2),p(e.limitPerHour?20:-1),s(4),p(e.limitPerHour===null?24:e.limitPerHour===0?25:26),s(5),f(y(30,13,e.unitsInWindow)),s(4),f(y(34,15,e.inputTokensInWindow+e.outputTokensInWindow)),s(4),f(y(38,17,e.hitsInWindow)),s(4),f(e.lastActivityOn?I(42,19,e.lastActivityOn+"Z","short"):"\u2014")}}function ci(o,r){o&1&&(t(0,` 393 `),u(1,"app-skeleton-template",60),t(2,` 394 `))}function pi(o,r){o&1&&(t(0,` 395 `),i(1,"p",57),t(2,"No overrides have ever been set for this club \u2014 all limits are the platform defaults."),n(),t(3,` 396 `))}function ui(o,r){o&1&&(t(0,` 397 `),i(1,"tr"),t(2,` 398 `),i(3,"th"),t(4,"Feature"),n(),t(5,` 399 `),i(6,"th",38),t(7,"Limit"),n(),t(8,` 400 `),i(9,"th"),t(10,"Status"),n(),t(11,` 401 `),i(12,"th"),t(13,"Reason"),n(),t(14,` 402 `),i(15,"th"),t(16,"Set By"),n(),t(17,` 403 `),i(18,"th"),t(19,"Expires"),n(),t(20,` 404 `),i(21,"th"),t(22,"Revoked"),n(),t(23,` 405 `),u(24,"th"),t(25,` 406 `),n(),t(26,` 407 `))}function xi(o,r){if(o&1){let e=b();t(0,` 408 `),i(1,"button",61),_("click",function(){g(e);let a=m().$implicit,d=m(5);return C(d.confirmRevoke(a))}),t(2,` 409 Revoke 410 `),n(),t(3,` 411 `)}}function _i(o,r){if(o&1&&(t(0,` 412 `),i(1,"tr"),t(2,` 413 `),i(3,"td"),t(4),n(),t(5,` 414 `),i(6,"td",38),t(7),h(8,"number"),n(),t(9,` 415 `),i(10,"td"),t(11,` 416 `),u(12,"app-pill",53),t(13,` 417 `),n(),t(14,` 418 `),i(15,"td"),t(16),n(),t(17,` 419 `),i(18,"td"),t(19),h(20,"date"),n(),t(21,` 420 `),i(22,"td"),t(23),h(24,"date"),n(),t(25,` 421 `),i(26,"td"),t(27),h(28,"date"),n(),t(29,` 422 `),i(30,"td",38),t(31,` 423 `),c(32,xi,4,0),n(),t(33,` 424 `),n(),t(34,` 425 `)),o&2){let e=r.$implicit;s(4),f(e.featureName),s(3),f(e.limitPerHour===0?"Blocked":y(8,10,e.limitPerHour)+"/hr"),s(5),x("text",e.isActive?"Active":"Inactive")("status",e.isActive?"success":"default"),s(4),f(e.reason),s(3),at("",e.createdByName||e.createdByClubUserID," \xB7 ",I(20,12,e.createdOn+"Z","short")),s(4),f(e.expiresOn?I(24,15,e.expiresOn+"Z","short"):"Never"),s(4),f(e.revokedOn?(e.revokedByName||e.revokedByClubUserID)+" \xB7 "+I(28,18,e.revokedOn+"Z","short"):"\u2014"),s(5),p(e.isActive?32:-1)}}function gi(o,r){if(o&1&&(t(0,` 426 `),i(1,"p-table",24),t(2,` 427 `),T(3,ui,27,0,"ng-template",null,0,F),t(5,` 428 `),T(6,_i,35,21,"ng-template",null,1,F),t(8,` 429 `),n(),t(9,` 430 `)),o&2){let e=m(4);s(),x("value",e.overrides)("paginator",e.overrides.length>10)("rows",10)}}function Ci(o,r){o&1&&(t(0,` 431 `),i(1,"tr"),t(2,` 432 `),i(3,"th"),t(4,"When"),n(),t(5,` 433 `),i(6,"th"),t(7,"Feature"),n(),t(8,` 434 `),i(9,"th",38),t(10,"Limit At Breach"),n(),t(11,` 435 `),n(),t(12,` 436 `))}function hi(o,r){if(o&1&&(t(0,` 437 `),i(1,"tr"),t(2,` 438 `),i(3,"td"),t(4),h(5,"date"),n(),t(6,` 439 `),i(7,"td"),t(8),n(),t(9,` 440 `),i(10,"td",38),t(11),h(12,"number"),n(),t(13,` 441 `),n(),t(14,` 442 `)),o&2){let e=r.$implicit,l=m(5);s(4),f(I(5,3,e.occurredOn+"Z","medium")),s(4),f(l.featureNameFor(e.featureID)),s(3),f(y(12,6,e.limitAtBreach))}}function fi(o,r){if(o&1&&(t(0,` 443 `),i(1,"h3",62),t(2,"Recent rate-limit hits"),n(),t(3,` 444 `),i(4,"p-table",24),t(5,` 445 `),T(6,Ci,13,0,"ng-template",null,0,F),t(8,` 446 `),T(9,hi,15,8,"ng-template",null,1,F),t(11,` 447 `),n(),t(12,` 448 `)),o&2){let e=m(4);s(4),x("value",e.detail.recentHits)("paginator",e.detail.recentHits.length>10)("rows",10)}}function bi(o,r){if(o&1){let e=b();t(0,` 449 `),i(1,"p-table",47),t(2,` 450 `),T(3,ii,33,1,"ng-template",null,0,F),t(5,` 451 `),T(6,mi,51,22,"ng-template",null,1,F),t(8,` 452 `),n(),t(9,` 453 454 `),i(10,"div",48),t(11,` 455 `),i(12,"h3",49),t(13,"Quota overrides"),n(),t(14,` 456 `),i(15,"button",50),_("click",function(){g(e);let a=m(3);return C(a.openOverrideDialog())}),t(16,` 457 `),u(17,"i",51),t(18,`Open Quota 458 `),n(),t(19,` 459 `),n(),t(20,` 460 `),c(21,ci,3,0)(22,pi,4,0)(23,gi,10,3),c(24,fi,13,3)}
460if(o&2){let e=m(3);s(),x("value",e.detail.features),s(20),p(e.overridesLoading?21:e.overrides.length===0?22:23),s(3),p(e.detail.recentHits.length>0?24:-1)}}function vi(o,r){if(o&1&&(t(0,` 461 `),c(1,ei,9,1)(2,bi,25,3)),o&2){let e=m(2);s(),p(e.detailError&&!e.detail?1:e.detail?2:-1)}}function Si(o,r){if(o&1){let e=b();t(0,` 462 `),i(1,"app-admin-dashboard-card",43),t(2,` 463 `),i(3,"div",44),t(4,` 464 `),i(5,"button",45),_("click",function(){g(e);let a=m();return C(a.closeDetail())}),t(6,` 465 `),u(7,"i",46),t(8,`Close 466 `),n(),t(9,` 467 `),n(),t(10,` 468 `),c(11,vi,3,1),n(),t(12,` 469`)}if(o&2){let e=m();s(),x("panelTitle","Club Detail \u2014 "+((e.detail==null?null:e.detail.clubName)||e.selectedClub.clubName||"Club "+e.selectedClub.clubID))("loading",e.detailLoading),s(10),p(e.detailLoading?-1:11)}}function Ei(o,r){if(o&1){let e=b();t(0,` 470 `),i(1,"button",54),_("click",function(){g(e);let a=m(2);return C(a.externalRegistrationEditLimit=a.externalRegistration.dailyLimit)}),t(2,` 471 Edit Limit 472 `),n(),t(3,` 473 `)}}function yi(o,r){if(o&1){let e=b();t(0,` 474 `),i(1,"input",69),U("ngModelChange",function(a){g(e);let d=m(2);return P(d.externalRegistrationEditLimit,a)||(d.externalRegistrationEditLimit=a),C(a)}),n(),t(2,` 475 `),i(3,"button",70),_("click",function(){g(e);let a=m(2);return C(a.saveExternalRegistrationLimit())}),t(4,` 476 `),u(5,"i"),t(6,`Save 477 `),n(),t(7,` 478 `),i(8,"button",71),_("click",function(){g(e);let a=m(2);return C(a.externalRegistrationEditLimit=null)}),t(9,` 479 Cancel 480 `),n(),t(10,` 481 `)}if(o&2){let e=m(2);s(),k("ngModel",e.externalRegistrationEditLimit),x("disabled",e.externalRegistrationSaving),s(2),x("disabled",e.externalRegistrationSaving),s(2),ft(e.externalRegistrationSaving?"fa fa-spinner fa-spin mr-1":"fa-regular fa-check mr-1"),s(3),x("disabled",e.externalRegistrationSaving)}}function Ti(o,r){if(o&1&&(t(0,` 482 `),i(1,"app-admin-dashboard-card",63),t(2,` 483 `),u(3,"app-tooltip",64),t(4,` 484 `),i(5,"div",65),t(6,` 485 `),i(7,"span",66),t(8),h(9,"number"),h(10,"number"),n(),t(11,` 486 `),i(12,"div",67),t(13,` 487 `),u(14,"p-progressBar",68),t(15,` 488 `),n(),t(16,` 489 `),c(17,Ei,4,0)(18,yi,11,6),n(),t(19,` 490 `),n(),t(20,` 491`)),o&2){let e=m();s(),x("loading",!1),s(2),x("renderAsLink",!1),s(5),at("",y(9,7,e.externalRegistration.currentUsage)," / ",y(10,9,e.externalRegistration.dailyLimit)," calls today"),s(6),x("value",e.usagePercent(e.externalRegistration.currentUsage,e.externalRegistration.dailyLimit))("showValue",!1),s(3),p(e.externalRegistrationEditLimit===null?17:18)}}function wi(o,r){if(o&1){let e=b();t(0,` 492 `),i(1,"p-dialog",72),_("onHide",function(){g(e);let a=m();return C(a.closeOverrideDialog())}),t(2,` 493 `),i(3,"p",57),t(4,` 494 The new limit replaces the default for this club only and takes effect within a minute. 495 Creating an override retires any active one for the same feature. 496 `),n(),t(5,` 497 `),i(6,"app-dynamic-form",73),_("onSubmit",function(a){g(e);let d=m();return C(d.submitOverride(a))})("onCancel",function(){g(e);let a=m();return C(a.closeOverrideDialog())}),n(),t(7,` 498 `),n(),t(8,` 499`)}if(o&2){let e=m();s(),x("header",bt("Open Quota \u2014 ",(e.detail==null?null:e.detail.clubName)||"Club "+(e.selectedClub==null?null:e.selectedClub.clubID)))("visible",!0)("modal",!0)("closable",!e.overrideSaving),s(5),x("fields",e.overrideFields)("entity",e.overrideEntity)("showCancelButton",!0)}}function Ii(o,r){if(o&1){let e=b();t(0,` 500 `),i(1,"app-yes-no-modal",74),_("onYesSelect",function(){g(e);let a=m();return C(a.revokeConfirmed())})("onNoSelect",function(){g(e);let a=m();return C(a.revokeTarget=null)}),n(),t(2,` 501`)}if(o&2){let e=m();s(),x("modalText","Revoke the "+e.revokeTarget.featureName+" override ("+(e.revokeTarget.limitPerHour===0?"Blocked":e.revokeTarget.limitPerHour+"/hr")+")? The platform default applies within a minute.")}}var ee=(()=>
501{let r=class r{constructor(l,a){this.aiUsageService=l,this.siteDataService=a,this.unsubscribe$=new V,this.windowOptions=[{label:"24h",value:1},{label:"7d",value:7},{label:"30d",value:30}],this.windowDays=7,this.summary=null,this.summaryLoading=!0,this.summaryError=!1,this.summaryInFlight=!1,this.fleet=null,this.fleetLoading=!0,this.fleetError=!1,this.fleetInFlight=!1,this.selectedClub=null,this.detail=null,this.detailLoading=!1,this.detailError=!1,this.detailInFlight=!1,this.overridesClubID=null,this.externalRegistration=null,this.externalRegistrationEditLimit=null,this.externalRegistrationSaving=!1,this.overrides=[],this.overridesLoading=!1,this.showOverrideDialog=!1,this.overrideSaving=!1,this.overrideFields=[],this.overrideEntity=null,this.revokeTarget=null}ngOnInit(){this.siteDataService.hideSiteLoader(),this.loadSummary(),this.loadFleet(),this.loadExternalRegistration(),_t(r.RefreshMs).pipe(S(this.unsubscribe$)).subscribe({next:()=>{this.summaryInFlight||this.loadSummary(),this.fleetInFlight||this.loadFleet(),this.selectedClub&&!this.detailInFlight&&this.loadDetail(this.selectedClub)},error:()=>{}})}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}get clubsAtQuota(){return this.fleet?.clubs.filter(l=>l.atQuotaNow)??[]}atQuotaFeatureNames(l){return l.features.filter(a=>a.atQuota).map(a=>a.featureName).join(", ")}onWindowChange(){this.loadFleet(),this.selectedClub&&this.loadDetail(this.selectedClub)}selectClub(l){this.selectedClub=l,this.loadDetail(l)}closeDetail(){this.selectedClub=null,this.detail=null,this.overrides=[],this.overridesClubID=null}loadSummary(){this.summaryLoading=this.summary===null,this.summaryInFlight=!0,this.aiUsageService.getSummary().pipe(S(this.unsubscribe$)).subscribe({next:l=>{this.summary=l,this.summaryLoading=!1,this.summaryError=!1,this.summaryInFlight=!1},error:()=>{this.summaryLoading=!1,this.summaryError=!0,this.summaryInFlight=!1}})}loadFleet(){this.fleetLoading=this.fleet===null,this.fleetInFlight=!0;let l=this.windowDays;this.aiUsageService.getFleet(l).pipe(S(this.unsubscribe$)).subscribe({next:a=>{this.fleetInFlight=!1,l===this.windowDays&&(this.fleet=a,this.fleetLoading=!1,this.fleetError=!1,this.selectedClub&&(this.selectedClub=a.clubs.find(d=>d.clubID===this.selectedClub.clubID)??this.selectedClub))},error:()=>{this.fleetInFlight=!1,this.fleetLoading=!1,this.fleetError=!0}})}loadDetail(l){this.detailLoading=this.detail?.clubID!==l.clubID,this.detailInFlight=!0,this.aiUsageService.getClubDetail(l.clubID,this.windowDays).pipe(S(this.unsubscribe$)).subscribe({next:a=>{this.detailInFlight=!1,a.clubID===this.selectedClub?.clubID&&(this.detail=a,this.detailLoading=!1,this.detailError=!1)},error:()=>{this.detailInFlight=!1,l.clubID===this.selectedClub?.clubID&&(this.detailLoading=!1,this.detailError=!0,this.siteDataService.showSiteErrorAlertDefaultGET())}}),this.loadOverrides(l.clubID)}loadOverrides(l){this.overridesLoading=this.overridesClubID!==l,this.aiUsageService.getOverrideHistory(l).pipe(S(this.unsubscribe$)).subscribe({next:a=>{l===this.selectedClub?.clubID&&(this.overrides=a,this.overridesClubID=l,this.overridesLoading=!1)},error:()=>{l===this.selectedClub?.clubID&&(this.overrides=[],this.overridesLoading=!1,this.siteDataService.showSiteErrorAlertDefaultGET())}})}openOverrideDialog(l=null){let a=(this.detail?.features??[]).map(d=>({label:d.featureName,value:d.featureID}));this.overrideEntity={featureID:l?.featureID??a[0]?.value,limitPerHour:l?.limitPerHour||null,durationHours:24,reason:""},this.overrideFields=[new Y({dynamicFormFieldTypeID:z.DROPDOWN,key:"featureID",controlName:"featureID",name:"featureID",label:"Feature",required:!0,options:a}),new Y({dynamicFormFieldTypeID:z.TEXT,dynamicFormFieldTextBoxTypeID:Ft.NUMBER,key:"limitPerHour",controlName:"limitPerHour",name:"limitPerHour",label:"Hourly limit (0 blocks the feature)",required:!0,validators:[{validatorType:Mt.MIN,values:[0]}]}),new Y({dynamicFormFieldTypeID:z.DROPDOWN,key:"durationHours",controlName:"durationHours",name:"durationHours",label:"Duration",required:!0,options:r.DurationOptions}),new Y({dynamicFormFieldTypeID:z.TEXT_AREA,key:"reason",controlName:"reason",name:"reason",label:"Reason (audited)",required:!0,maxLength:500})],this.showOverrideDialog=!0}closeOverrideDialog(){this.showOverrideDialog=!1,this.overrideEntity=null}submitOverride(l){if(!this.selectedClub)return;let a=this.selectedClub.clubID,d=Number(l.durationHours);this.overrideSaving=!0,this.aiUsageService.createOverride(a,{featureID:Number(l.featureID),limitPerHour:Number(l.limitPerHour),expiresOn:d>0?new Date(Date.now()+d*36e5).toISOString():null,reason:l.reason}).pipe(S(this.unsubscribe$)).subscribe({next:()=>{this.overrideSaving=!1,this.closeOverrideDialog(),this.siteDataService.showSiteSuccessAlert("Quota override applied. It takes effect within a minute."),this.loadFleet(),this.selectedClub&&this.loadDetail(this.selectedClub)},error:v=>{this.overrideSaving=!1,this.siteDataService.showSiteErrorAlert(v?.error||"The override could not be applied.")}})}confirmRevoke(l){this.revokeTarget=l}revokeConfirmed(){if(!this.revokeTarget||!this.selectedClub)return;let l=this.selectedClub.clubID,a=this.revokeTarget.id;this.revokeTarget=null,this.aiUsageService.revokeOverride(l,a).pipe(S(this.unsubscribe$)).subscribe({next:()=>{this.siteDataService.showSiteSuccessAlert("Override revoked; the default limit applies within a minute."),this.loadFleet(),this.selectedClub&&this.loadDetail(this.selectedClub)},error:d=>{this.siteDataService.showSiteErrorAlert(d?.error||"The override could not be revoked.")}})}saveExternalRegistrationLimit(){this.externalRegistrationEditLimit==null||this.externalRegistrationEditLimit<0||(this.externalRegistrationSaving=!0,this.aiUsageService.updateExter
501nalRegistrationLimit(this.externalRegistrationEditLimit).pipe(S(this.unsubscribe$)).subscribe({next:l=>{this.externalRegistration=l,this.externalRegistrationEditLimit=null,this.externalRegistrationSaving=!1,this.siteDataService.showSiteSuccessAlert("Daily limit updated.")},error:l=>{this.externalRegistrationSaving=!1,this.siteDataService.showSiteErrorAlert(l?.error||"The daily limit could not be updated.")}}))}loadExternalRegistration(){this.aiUsageService.getExternalRegistrationUsage().pipe(S(this.unsubscribe$)).subscribe({next:l=>this.externalRegistration=l,error:()=>{this.externalRegistration=null}})}usagePercent(l,a){return a?Math.min(100,Math.round(l/a*100)):0}progressClass(l,a,d){return l?"danger":d&&a>=d*.75?"warning":"info"}featureNameFor(l){return this.detail?.features.find(a=>a.featureID===l)?.featureName??`Feature ${l}`}get costConfigured(){return this.fleet?.clubs.some(l=>l.estimatedCostUsd!==null)===!0}exportFleetCsv(){if(!this.fleet)return;let l=A=>{let et=String(A??"");return/^[=+\-@]/.test(et)&&(et=`'${et}`),`"${et.replace(/"/g,'""')}"`},a=["Club ID","Club","At Quota","Limit Hits","Usage","Tokens","Est. Cost USD","Last Activity"],d=this.fleet.clubs.map(A=>[A.clubID,l(A.clubName||`Club ${A.clubID}`),A.atQuotaNow?"yes":"no",A.hitsInWindow,A.unitsInWindow,A.tokensInWindow,A.estimatedCostUsd??"",l(A.lastActivityOn??"")].join(",")),v=new Blob([[a.join(","),...d].join(`\r 502`)],{type:"text/csv"}),D=document.createElement("a");D.href=URL.createObjectURL(v),D.download=`ai-usage-fleet-${this.windowDays}d.csv`,D.click(),URL.revokeObjectURL(D.href)}};r.RefreshMs=6e4,r.DurationOptions=[{label:"24 hours",value:24},{label:"7 days",value:168},{label:"30 days",value:720},{label:"Permanent (until revoked)",value:0}],r.\u0275fac=function(a){return new(a||r)(w(rt),w(L))},r.\u0275cmp=M({type:r,selectors:[["app-ai-usage"]],standalone:!1,decls:27,vars:14,consts:[["header",""],["body",""],["emptymessage",""],["panelTitle","Platform KPIs","skeletonHeight","140px",3,"loading"],["slot","titleSuffix","tooltipPosition","top","tooltipText","Live platform-wide AI numbers computed from the database \u2014 never sampled telemetry. Refreshes every minute.",3,"renderAsLink"],["panelTitle","Club Fleet","skeletonHeight","420px",3,"loading"],["slot","titleSuffix","tooltipPosition","top","tooltipText","Every club with AI activity, a rate-limit hit, or an AI feature enabled in the window. At Quota uses the exact rolling-hour count the API's 429 enforcement uses. Click a row for the per-feature drill-down.",3,"renderAsLink"],["slot","filters",1,"d-flex","align-items-center","px-4","pb-2"],["optionLabel","label","optionValue","value",1,"mr-3",3,"ngModelChange","onChange","options","ngModel"],["type","button",1,"btn","btn-sm",3,"click","disabled"],[1,"fa-regular","fa-download","mr-1"],["alertType","warning"],[1,"mr-2"],["href","javascript:void(0)",3,"click"],["alertType","error",3,"isInline"],["type","button",1,"btn","btn-red","btn-sm","ml-2",3,"click"],[1,"fa-regular","fa-rotate-right","mr-1"],[1,"row"],[1,"col-lg-2","col-md-4","col-6","border-right"],[1,"full-height","py-2","text-center"],[1,"dashboard-big-number--title","mb-2"],[1,"dashboard-big-number"],[1,"col-lg-2","col-md-4","col-6"],[1,"text-smallest","mt-2"],["styleClass","p-datatable-sm",3,"value","paginator","rows"],["pSortableColumn","clubName"],["field","clubName"],["pSortableColumn","hitsInWindow",1,"text-right"],["field","hitsInWindow"],["pSortableColumn","unitsInWindow",1,"text-right"],["field","unitsInWindow"],["pSortableColumn","tokensInWindow",1,"text-right"],["field","tokensInWindow"],["pSortableColumn","lastActivityOn",1,"text-right"],["field","lastActivityOn"],["pSortableColumn","estimatedCostUsd",1,"text-right"],["field","estimatedCostUsd"],[1,"cursor-pointer",3,"click"],[1,"text-right"],["text","At Quota","status","error"],["text","Hit Limits","status","warning"],["text","OK","status","success"],[1,"text-center","py-4"],["skeletonHeight","300px",3,"panelTitle","loading"],["slot","filters",1,"px-4","pb-2"],["type","button",1,"btn","btn-naked","btn-sm",3,"click"],[1,"fa-regular","fa-times","mr-1"],["styleClass","p-datatable-sm",3,"value"],[1,"d-flex","align-items-center","mt-4","mb-2"],[1,"mb-0","mr-3"],["type","button",1,"btn","btn-primary","btn-sm",3,"click"],[1,"fa-regular","fa-unlock","mr-1"],[1,"w-25"],[3,"text","status"],["type","button",1,"btn","btn-sm",3,"click"],["text","Blocked","status","error"],["text","Override","status","info"],[1,"text-medium"],[1,"text-danger"],[3,"value","showValue","styleClass"],["height","80px"],["type","button",1,"btn","btn-red","btn-sm",3,"click"],[1,"mt-4","mb-2"],["panelTitle","External Tournament Registration (platform daily counter)",3,"loading"],["slot","titleSuffix","tooltipPosition","top","tooltipText","The one platform-wide (not per-club) AI counter: external tournament registration lookups, reset daily at midnight UTC. New days inherit the most recent limit.",3,"renderAsLink"],[1,"d-flex","align-items-center","flex-wrap","px-2","pb-2"],[1,"mr-3"],[1,"w-25","mr-4"],[3,"value","showValue"],["type","number","min","0","aria-label","Daily limit",1,"form-control","form-control-sm","w-25","mr-2",3,"ngModelChange","ngModel","disabled"],["type","button",1,"btn","btn-primary","btn-sm","mr-2",3,"click","disabled"],["type","button",1,"btn","btn-naked","btn-sm",3,"click","disabled"],["styleClass","standardWidthDialog",3,"onHide","header","visible","modal","closable"],["formID","ai-quota-override-form","submitButtonText","Apply Override",3,"onSubmit","onCancel","fields","entity","showCancelButton"],["alertType","warning",3,"onYesSelect","onNoSelect","modalText"]],template:function(a,d){a&1&&(c(0,Be,9,2),i(1,"app-admin-dashboard-card",3),t(2,` 503 `),u(3,"app-tooltip",4),t(4,` 504 `),c(5,We,3,1),n(),t(6,` 505 506`),i(7,"app-admin-dashboard-card",5),t(8,` 507 `),u(9,"app-tooltip",6),t(10,` 508 `),i(11,"div",7),t(12,` 509 `),i(13,"p-selectButton",8),U("ngModelChange",function(D){return P(d.windowDays,D)||(d.windowDays=D),D}),_("onChange",function(){return d.onWindowChange()}),n(),t(14,` 510 `),i(15,"button",9),_("click",function(){return d.exportFleetCsv()}),t(16,` 511 `),u(17,"i",10),t(18,`Export CSV 512 `),n(),t(19,` 513 `),n(),t(20,` 514 `),c(21,ti,3,1),n(),t(22,` 515 516`),c(23,Si,13,3),c(24,Ti,21,11),c(25,wi,9,8),c(26,Ii,3,1)),a&2&&(p(d.clubsAtQuota.length>0?0:-1),s(),x("loading",d.summaryLoading),s(2),x("renderAsLink",!1),s(2),p(d.summaryLoading?-1:5),s(2),x("loading",d.fleetLoading),s(2),x("renderAsLink",!1),s(4),x("options",d.windowOptions),k("ngModel",d.windowDays),s(2),x("disabled",!d.fleet||d.fleetLoading),s(6),p(d.fleetLoading?-1:21),s(2),p(d.selectedClub?23:-1),s(),p(d.externalRegistration?24:-1),s(),p(d.showOverrideDialog&&d.overrideEntity?25:-1),s(),p(d.revokeTarget?26:-1))},dependencies:[Gt,N,Tt,$,wt,H,Ht,Ut,Wt,Vt,Qt,jt,zt,G,Nt,$t,W,Ot,Bt,Et,yt,St],encapsulation:2});let o=r;return o}
516)();var st=o=>({active:o});function Di(o,r){o&1&&(t(0,` 517 `),u(1,"app-copilot-greeting-edit"),t(2,` 518 `))}function ki(o,r){o&1&&(t(0,` 519 `),u(1,"app-copilot-prompt-edit"),t(2,` 520 `))}function Pi(o,r){o&1&&(t(0,` 521 `),u(1,"app-copilot-suggestions-edit"),t(2,` 522 `))}function Ui(o,r){o&1&&(t(0,` 523 `),u(1,"app-ai-usage"),t(2,` 524 `))}var xt=(()=>{let r=class r{constructor(l,a,d){this.siteDataService=l,this.copilotService=a,this.route=d,this.unsubscribe$=new V,this.activeTab=J.CopilotPrompts,this.CopilotAdminTab=J}ngOnInit(){this.activeTab=this.route.snapshot.data.tab??J.CopilotPrompts,this.siteDataService.hideSiteLoader()}switchActiveTab(l){this.activeTab=l}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}};r.\u0275fac=function(a){return new(a||r)(w(L),w(R),w(It))},r.\u0275cmp=M({type:r,selectors:[["ng-component"]],standalone:!1,decls:45,vars:17,consts:[["role","main"],[3,"pageTitle"],[1,"tabs","d-print-none"],["role","tablist",1,"tab-nav","no-bullets","inline-list"],[1,"nav-item",3,"ngClass"],["aria-controls","home","role","tab",1,"nav-link",3,"click"],[1,"row"],[1,"col"]],template:function(a,d){a&1&&(i(0,"main",0),t(1,` 525 `),u(2,"app-admin-header",1),t(3,` 526 527 `),i(4,"div",2),t(5,` 528 `),i(6,"ul",3),t(7,` 529 `),i(8,"li",4),t(9,` 530 `),i(10,"a",5),_("click",function(){return d.switchActiveTab(d.CopilotAdminTab.CopilotPrompts)}),t(11,"System Prompts"),n(),t(12,` 531 `),n(),t(13,` 532 `),i(14,"li",4),t(15,` 533 `),i(16,"a",5),_("click",function(){return d.switchActiveTab(d.CopilotAdminTab.CopilotGreeting)}),t(17,"Greetings"),n(),t(18,` 534 `),n(),t(19,` 535 `),i(20,"li",4),t(21,` 536 `),i(22,"a",5),_("click",function(){return d.switchActiveTab(d.CopilotAdminTab.CopilotChatMessageSuggestions)}),t(23,"Message Suggestions"),n(),t(24,` 537 `),n(),t(25,` 538 `),i(26,"li",4),t(27,` 539 `),i(28,"a",5),_("click",function(){return d.switchActiveTab(d.CopilotAdminTab.AIUsage)}),t(29,"Usage"),n(),t(30,` 540 `),n(),t(31,` 541 `),n(),t(32,` 542 `),n(),t(33,` 543 `),i(34,"div",6),t(35,` 544 `),i(36,"div",7),t(37,` 545 `),c(38,Di,3,0),c(39,ki,3,0),c(40,Pi,3,0),c(41,Ui,3,0),n(),t(42,` 546 `),n(),t(43,` 547`),n(),t(44,` 548`)),a&2&&(s(2),x("pageTitle","AI Admin"),s(6),x("ngClass",tt(9,st,d.activeTab===d.CopilotAdminTab.CopilotPrompts)),s(6),x("ngClass",tt(11,st,d.activeTab===d.CopilotAdminTab.CopilotGreeting)),s(6),x("ngClass",tt(13,st,d.activeTab===d.CopilotAdminTab.CopilotChatMessageSuggestions)),s(6),x("ngClass",tt(15,st,d.activeTab===d.CopilotAdminTab.AIUsage)),s(12),p(d.activeTab===d.CopilotAdminTab.CopilotGreeting?38:-1),s(),p(d.activeTab===d.CopilotAdminTab.CopilotPrompts?39:-1),s(),p(d.activeTab===d.CopilotAdminTab.CopilotChatMessageSuggestions?40:-1),s(),p(d.activeTab===d.CopilotAdminTab.AIUsage?41:-1))},dependencies:[vt,qt,Kt,Jt,te,ee],encapsulation:2});let o=r;return o})();var ie=(()=>{let r=class r{};r.\u0275fac=function(a){return new(a||r)},r.\u0275mod=nt({type:r}),r.\u0275inj=it({imports:[dt.forChild([{path:"",component:xt},{path:"usage",component:xt,data:{tab:J.AIUsage}}]),dt]});let o=r;return o})();var Xn=(()=>{let r=class r{};r.\u0275fac=function(a){return new(a||r)},r.\u0275mod=nt({type:r}),r.\u0275inj=it({providers:[R,rt,{provide:Lt,useValue:"tinymce/tinymce.min.js"}],imports:[Yt,ie,Rt]});let o=r;return o})();export{Xn as CopilotAdminModule};
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.