export const __webpack_esm_id__=37949;export const __webpack_esm_ids__=[35197,37949,57578];export const __webpack_esm_modules__={37949(e,t,E){var n=E(35197),a=E(82385);function _(e,t){return{restrict:"E",templateUrl:"js/angular/ttyg/templates/no-agents-view.html",scope:{},link:E=>{E.canModifyAgent=!1,E.talkToGraphDocumentationLink=a.m.getDocumentationUrl(t.productShortVersion,"talk-to-graph.html"),E.onCreateAgent=()=>{e.emit(n.I.OPEN_AGENT_SETTINGS)};const _=[];_.push(e.onCanUpdateAgentUpdated(e=>{E.canModifyAgent=e})),E.$on("$destroy",()=>{_.forEach(e=>e())})}}}angular.module("graphdb.framework.ttyg.directives.no-agents-view",[]).directive("noAgentsView",_),_.$inject=["TTYGContextService","productInfo"]},35197(e,t,E){E.d(t,{I:()=>_});var n=E(22723);function a(e){let t,E,a,A,C,T={},o=!1;const i=()=>(0,n.cloneDeep)(t),c=()=>(0,n.cloneDeep)(E),d=e=>{E=(0,n.cloneDeep)(e),N(_.CHAT_LIST_UPDATED,c())},s=e=>{E.appendChat(e),d(E)},S=()=>(0,n.cloneDeep)(a),l=e=>{a&&a.id===e.id||(a=(0,n.cloneDeep)(e),N(_.SELECT_CHAT,S()))},D=()=>(0,n.cloneDeep)(A),g=()=>(0,n.cloneDeep)(T),r=e=>!!T[e],p=()=>o,N=(t,E)=>{e.emitSync(t,(0,n.cloneDeep)(E))},L=(t,E)=>e.subscribeSync(t,e=>E(e));return{resetContext:()=>{t=void 0,E=void 0,a=void 0,A=void 0,T={},C=void 0,o=!1},emit:N,subscribe:L,getChats:c,updateChats:d,addChat:s,replaceChat:(e,t)=>{E.replaceChat(e,t),d(E)},createChat:e=>{s(e),l(e),N(_.CREATE_CHAT_SUCCESSFUL,e)},onChatsListChanged:e=>(E&&angular.isFunction(e)&&e(c()),L(_.CHAT_LIST_UPDATED,t=>e(t))),getSelectedChat:S,selectChat:l,deselectChat:()=>{a=void 0,N(_.SELECT_CHAT,S())},deleteChat:e=>{E.deleteChat(e),d(E)},onSelectedChatChanged:e=>(angular.isFunction(e)&&e(S()),L(_.SELECT_CHAT,t=>e(t))),updateSelectedChat:e=>{a&&a.id&&e&&a.id!==e.id||(a=(0,n.cloneDeep)(e),N(_.SELECTED_CHAT_UPDATED,S()))},onSelectedChatUpdated:e=>(a&&angular.isFunction(e)&&e(S()),L(_.SELECTED_CHAT_UPDATED,t=>e(t))),onLastMessageReceived:e=>(a&&angular.isFunction(e)&&e(S()),L(_.LAST_MESSAGE_RECEIVED,t=>e(t))),updateAgents:e=>{t=(0,n.cloneDeep)(e),N(_.AGENT_LIST_UPDATED,i())},onAgentsListChanged:e=>(t&&angular.isFunction(e)&&e(i()),L(_.AGENT_LIST_UPDATED,t=>e(t))),getAgents:i,getAgent:e=>{if(t)return(0,n.cloneDeep)(t.getAgent(e))},selectAgent:e=>{A=(0,n.cloneDeep)(e),N(_.AGENT_SELECTED,D())},getSelectedAgent:D,onSelectedAgentChanged:e=>(A&&angular.isFunction(e)&&e(D()),L(_.AGENT_SELECTED,t=>e(t))),getDefaultAgent:()=>(0,n.cloneDeep)(C),setDefaultAgent:e=>{C=e},setCanModifyAgent:e=>{o=(0,n.cloneDeep)(e),N(_.CAN_MODIFY_AGENT_UPDATED,p())},getCanModifyAgent:p,onCanUpdateAgentUpdated:e=>(angular.isFunction(e)&&e(p()),L(_.CAN_MODIFY_AGENT_UPDATED,t=>e(t))),hasExplainResponse:r,toggleExplainResponse:e=>{r(e)&&(T[e].expanded=!T[e].expanded,N(_.EXPLAIN_RESPONSE_CACHE_UPDATED,g()))},getExplainResponse:e=>(0,n.cloneDeep)(T[e]),addExplainResponseCache:e=>{T[e.answerId]=(0,n.cloneDeep)(e),N(_.EXPLAIN_RESPONSE_CACHE_UPDATED,g())},onExplainResponseCacheUpdated:e=>(angular.isFunction(e)&&e(g()),L(_.EXPLAIN_RESPONSE_CACHE_UPDATED,t=>e(t)))}}angular.module("graphdb.framework.ttyg.services.ttygcontext",[]).factory("TTYGContextService",a),a.$inject=["EventEmitterService","TTYGService"];const _={CREATE_CHAT:"createChat",CREATE_CHAT_SUCCESSFUL:"chatCreated",CREATE_CHAT_FAILURE:"chatCreationFailed",RENAME_CHAT:"renameChat",RENAME_CHAT_SUCCESSFUL:"chatRenamed",RENAME_CHAT_FAILURE:"chatRenamedFailure",SELECT_CHAT:"selectChat",SELECTED_CHAT_UPDATED:"selectChatUpdated",LAST_MESSAGE_RECEIVED:"lastMessageReceived",DELETING_CHAT:"deletingChat",DELETE_CHAT:"deleteChat",DELETE_CHAT_SUCCESSFUL:"chatDeleted",DELETE_CHAT_FAILURE:"chatDeletedFailure",CHAT_EXPORT:"chatExport",CHAT_EXPORT_SUCCESSFUL:"chatExportSuccess",CHAT_EXPORT_FAILURE:"chatExportFailure",CHAT_LIST_UPDATED:"chatListUpdated",ASK_QUESTION:"askQuestion",ASK_QUESTION_FAILURE:"askQuestionFailure",CONTINUE_CHAT_RUN:"continueChatRun",CANCEL_PENDING_QUESTION:"cancelPendingQuestion",PENDING_QUESTION_CANCELED_SUCCESSFUL:"pendingQuestionCanceledSuccessful",CANCEL_PENDING_QUESTION_FAILURE:"cancelPendingQuestionFailed",ASK_QUESTION_STARTING:"askQuestionStarting",LOAD_CHATS:"loadChats",LOAD_CHAT_SUCCESSFUL:"loadChatSuccess",LOAD_CHAT_FAILURE:"loadChatFailure",AGENT_LIST_UPDATED:"agentListUpdated",OPEN_AGENT_SETTINGS:"openAgentSettings",EDIT_AGENT:"editAgent",CLONE_AGENT:"cloneAgent",DELETE_AGENT:"deleteAgent",AGENT_DELETED:"agentDeleted",DELETING_AGENT:"deletingAgent",AGENT_SELECTED:"agentSelected",GO_TO_CREATE_SIMILARITY_VIEW:"goToCreateSimilarityView",GO_TO_CONNECTORS_VIEW:"goToConnectorsView",GO_TO_AUTOCOMPLETE_INDEX_VIEW:"goToAutocompleteIndexView",EXPLAIN_RESPONSE:"explainResponse",EXPLAIN_RESPONSE_CACHE_UPDATED:"explainResponseCacheUpdated",GO_TO_SPARQL_EDITOR:"openQueryInSparqlEditor",CAN_MODIFY_AGENT_UPDATED:"canModifyAgentUpdated",ASK_QUESTION_STATE_CHANGED:"askQuestionStateChanged"}}};
//# sourceMappingURL=37949.da9ccf3e5729a15fc252.bundle.js.map