@ckeditor/ckeditor5-ai 47.6.1-alpha.1 → 47.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (149) hide show
  1. package/build/ai.js +1 -1
  2. package/dist/index.js +5 -5
  3. package/package.json +15 -15
  4. package/src/aiactions/aiactions.js +1 -1
  5. package/src/aiactions/model/aiactionsinteraction.js +1 -1
  6. package/src/aiactions/model/aiactionsreply.js +1 -1
  7. package/src/aiassistant/adapters/aiadapter.js +1 -1
  8. package/src/aiassistant/adapters/aitextadapter.js +1 -1
  9. package/src/aiassistant/adapters/awstextadapter.js +1 -1
  10. package/src/aiassistant/adapters/openaitextadapter.js +1 -1
  11. package/src/aiassistant/aiassistant.js +1 -1
  12. package/src/aiassistant/aiassistantediting.js +1 -1
  13. package/src/aiassistant/aiassistantui.js +1 -1
  14. package/src/aiassistant/ui/aiassistantcontroller.js +2 -2
  15. package/src/aiassistant/ui/form/aiformcontentarea.js +1 -1
  16. package/src/aiassistant/ui/form/aiformerrorview.js +1 -1
  17. package/src/aiassistant/ui/form/aiformpromptview.js +1 -1
  18. package/src/aiassistant/ui/form/aiformtoolbarview.js +1 -1
  19. package/src/aiassistant/ui/form/aiformview.js +1 -1
  20. package/src/aiassistant/ui/form/aihistorylistitemview.js +1 -1
  21. package/src/aiassistant/ui/form/aihistorylistview.js +1 -1
  22. package/src/aiassistant/ui/form/prompthistory.js +1 -1
  23. package/src/aiassistant/ui/showaiassistantcommand.js +1 -1
  24. package/src/aiballoon/aiballoon.js +1 -1
  25. package/src/aichat/aichat.js +1 -1
  26. package/src/aichat/aichatballoon.js +1 -1
  27. package/src/aichat/aichatcontroller.js +1 -1
  28. package/src/aichat/aichatui.js +1 -1
  29. package/src/aichat/model/aichatcontext.js +1 -1
  30. package/src/aichat/model/aichatconversation.js +1 -1
  31. package/src/aichat/model/aichatinteraction.js +1 -1
  32. package/src/aichat/ui/aichatballoonview.js +1 -1
  33. package/src/aichat/ui/aichatcontrolsview.js +1 -1
  34. package/src/aichat/ui/aichatfeedview.js +1 -1
  35. package/src/aichat/ui/aichatheaderview.js +1 -1
  36. package/src/aichat/ui/aichatview.js +1 -1
  37. package/src/aichat/ui/controls/aichatchipsoverflowmanager.js +1 -1
  38. package/src/aichat/ui/controls/aichatcontextitembuttonview.js +1 -1
  39. package/src/aichat/ui/controls/aichatcontextpanelurlinputview.js +1 -1
  40. package/src/aichat/ui/controls/aichatcontextpanelview.js +1 -1
  41. package/src/aichat/ui/controls/aichatcontrolsloaderview.js +1 -1
  42. package/src/aichat/ui/controls/aichatpromptcapabilitiesview.js +1 -1
  43. package/src/aichat/ui/controls/aichatpromptinputview.js +1 -1
  44. package/src/aichat/ui/controls/aichatpromptsuggestionslistview.js +1 -1
  45. package/src/aichat/ui/controls/resources/aichatcontextresourceslistview.js +1 -1
  46. package/src/aichat/ui/controls/resources/aichatcontextresourcesview.js +1 -1
  47. package/src/aichat/ui/controls/resources/aichatresourcelistitemview.js +1 -1
  48. package/src/aichat/ui/controls/resources/aichatresourcesballoonview.js +1 -1
  49. package/src/aichat/ui/controls/resources/aichatresourcessearchinputview.js +1 -1
  50. package/src/aichat/ui/feed/aichatfeedcontextchipsview.js +1 -1
  51. package/src/aichat/ui/feed/aichatfeedcustomelementview.js +1 -1
  52. package/src/aichat/ui/feed/aichatfeederroritemview.js +1 -1
  53. package/src/aichat/ui/feed/aichatfeedinteractionheaderview.js +1 -1
  54. package/src/aichat/ui/feed/aichatfeedreplyitemview.js +1 -1
  55. package/src/aichat/ui/feed/aichatfeedsuggestionitemactionsview.js +1 -1
  56. package/src/aichat/ui/feed/aichatfeedsuggestionitemview.js +1 -1
  57. package/src/aichat/ui/feed/aichatfeedusermessageitem.js +1 -1
  58. package/src/aichat/utils/eventnames.js +1 -1
  59. package/src/aichat/utils/promisequeue.js +1 -1
  60. package/src/aichathistory/aichathistory.js +1 -1
  61. package/src/aichathistory/aichathistorycontroller.js +1 -1
  62. package/src/aichathistory/aichathistoryui.js +1 -1
  63. package/src/aichathistory/model/aichathistoryconversations.js +1 -1
  64. package/src/aichathistory/model/aichathistoryitem.js +1 -1
  65. package/src/aichathistory/ui/aichathistorylistitemview.js +2 -2
  66. package/src/aichathistory/ui/aichathistorylistview.js +1 -1
  67. package/src/aichathistory/ui/aichathistorysectionlistview.js +1 -1
  68. package/src/aichathistory/ui/aichathistoryview.js +1 -1
  69. package/src/aichatshortcuts/aichatshortcuts.js +1 -1
  70. package/src/aichatshortcuts/ui/aichatshortcutsview.js +1 -1
  71. package/src/aichatshortcuts/ui/aichatshortcutview.js +1 -1
  72. package/src/aicore/aiconnector.js +1 -1
  73. package/src/aicore/aiediting.js +1 -1
  74. package/src/aicore/model/aicapabilities.js +1 -1
  75. package/src/aicore/model/aiinteraction.js +1 -1
  76. package/src/aicore/model/aimodels.js +1 -1
  77. package/src/aicore/model/aireply.js +1 -1
  78. package/src/aicore/pipeline/airesponseapplier.js +2 -2
  79. package/src/aicore/pipeline/airesponseparser.js +2 -2
  80. package/src/aicore/ui/aidisclaimerview.js +1 -1
  81. package/src/aicore/ui/aispinner.js +1 -1
  82. package/src/aicore/ui/suggestioncontainer/aiminitoolbarview.js +1 -1
  83. package/src/aicore/ui/suggestioncontainer/aisuggestionbodyview.js +1 -1
  84. package/src/aicore/ui/suggestioncontainer/aisuggestioncontainerview.js +1 -1
  85. package/src/aicore/ui/suggestioncontainer/aisuggestioncontentpartheaderview.js +1 -1
  86. package/src/aicore/ui/suggestioncontainer/aisuggestioncontentpartstateview.js +1 -1
  87. package/src/aicore/ui/suggestioncontainer/aisuggestioncontentparttoolbarview.js +1 -1
  88. package/src/aicore/ui/suggestioncontainer/aisuggestioncontentpartview.js +1 -1
  89. package/src/aicore/ui/suggestioncontainer/aisuggestionheaderview.js +1 -1
  90. package/src/aicore/ui/suggestioncontainer/aisuggestionloaderview.js +1 -1
  91. package/src/aicore/ui/suggestioncontainer/aisuggestionstreamablecontentview.js +1 -1
  92. package/src/aicore/ui/suggestioncontainer/aiwebsourcesview.js +1 -1
  93. package/src/aicore/utils/createresizebutton.js +1 -1
  94. package/src/aicore/utils/documentrange.js +1 -1
  95. package/src/aicore/utils/geteditorfromcontext.js +1 -1
  96. package/src/aicore/utils/getoperationsfromreply.js +1 -1
  97. package/src/aicore/utils/getsuggestionpartsfromreply.js +1 -1
  98. package/src/aicore/utils/htmlparser.js +1 -1
  99. package/src/aicore/utils/htmlstreamer.js +1 -1
  100. package/src/aieditorintegration/aieditorintegration.js +1 -1
  101. package/src/aieditorintegration/aitogglebutton/aitogglebuttonui.js +1 -1
  102. package/src/aieditorintegration/aitogglebutton/toggleaicommand.js +1 -1
  103. package/src/aiquickactions/aiquickactions.js +1 -1
  104. package/src/aiquickactions/aiquickactionscommand.js +1 -1
  105. package/src/aiquickactions/aiquickactionsediting.js +1 -1
  106. package/src/aiquickactions/aiquickactionsui.js +1 -1
  107. package/src/aiquickactions/ui/aiquickactionsbuttoncreator.js +1 -1
  108. package/src/aiquickactions/ui/aiquickactionsdropdowncontentview.js +1 -1
  109. package/src/aiquickactions/ui/aiquickactionsdropdowncreator.js +1 -1
  110. package/src/aiquickactions/ui/aiquickactionsfilteredlistview.js +1 -1
  111. package/src/aiquickactions/ui/balloon/aiactionsballoondisclaimerview.js +1 -1
  112. package/src/aiquickactions/ui/balloon/aiactionsballoontoolbarview.js +1 -1
  113. package/src/aiquickactions/ui/balloon/aiactionsballoonview.js +1 -1
  114. package/src/aiquickactions/ui/dropdownmenubuttonwithhighlightview.js +1 -1
  115. package/src/aireviewcore/aireviewcorecontroller.js +1 -1
  116. package/src/aireviewcore/aireviewcoreediting.js +1 -1
  117. package/src/aireviewcore/aireviewcoreui.js +1 -1
  118. package/src/aireviewcore/model/aireviewchecklist.js +1 -1
  119. package/src/aireviewcore/model/aireviewcheckresult.js +1 -1
  120. package/src/aireviewcore/model/aireviewcheckresultchange.js +1 -1
  121. package/src/aireviewcore/model/aireviewcheckrun.js +1 -1
  122. package/src/aireviewcore/model/aireviewsystemcheckrun.js +1 -1
  123. package/src/aireviewcore/ui/aireviewcoreballoonsuggestionview.js +1 -1
  124. package/src/aireviewcore/ui/aireviewcorechecklistitemresultview.js +1 -1
  125. package/src/aireviewcore/ui/aireviewcorecustomcheckview.js +1 -1
  126. package/src/aireviewcore/ui/aireviewcorefinishreviewbuttonview.js +1 -1
  127. package/src/aireviewcore/ui/aireviewcorepromptinputview.js +1 -1
  128. package/src/aireviewcore/ui/aireviewcorereviewchecklistview.js +1 -1
  129. package/src/aireviewcore/ui/aireviewcorereviewcommandlistitemview.js +1 -1
  130. package/src/aireviewcore/ui/aireviewcoreuicheckresultsview.js +1 -1
  131. package/src/aireviewcore/ui/aireviewcoreview.js +1 -1
  132. package/src/aireviewcore/ui/form/aireviewcoreformdropdown.js +1 -1
  133. package/src/aireviewmode/aireviewmode.js +1 -1
  134. package/src/aireviewmode/aireviewmodecontroller.js +1 -1
  135. package/src/aireviewmode/aireviewmodeui.js +1 -1
  136. package/src/aireviewmode/model/aireviewcheckcustom.js +1 -1
  137. package/src/aireviewmode/model/aireviewcheckextra.js +1 -1
  138. package/src/aireviewmode/model/aireviewcustomcheckrun.js +1 -1
  139. package/src/aireviewmode/model/aireviewextracheckrun.js +1 -1
  140. package/src/aireviewmode/model/aireviewmodechecklist.js +1 -1
  141. package/src/aitabs/aitabs.js +1 -1
  142. package/src/aitabs/tabs/tabbuttonview.js +1 -1
  143. package/src/aitranslate/aitranslate.js +1 -1
  144. package/src/aitranslate/aitranslatecontroller.js +1 -1
  145. package/src/aitranslate/aitranslateui.js +1 -1
  146. package/src/aitranslate/model/aitranslatecheck.js +1 -1
  147. package/src/aitranslate/model/aitranslatecheckrun.js +1 -1
  148. package/src/aitranslate/ui/aitranslatechecklistview.js +1 -1
  149. package/src/aitranslate/ui/aitranslatecheckresultsview.js +1 -1
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x55d179=_0x5c3e;(function(_0x4a6efe,_0x8df7b){const _0x303738=_0x5c3e,_0x15b64b=_0x4a6efe();while(!![]){try{const _0x53bf88=-parseInt(_0x303738(0x108))/0x1+parseInt(_0x303738(0x1a2))/0x2*(parseInt(_0x303738(0x104))/0x3)+parseInt(_0x303738(0x229))/0x4*(parseInt(_0x303738(0x217))/0x5)+parseInt(_0x303738(0x110))/0x6*(-parseInt(_0x303738(0x1ae))/0x7)+parseInt(_0x303738(0x216))/0x8*(parseInt(_0x303738(0x268))/0x9)+parseInt(_0x303738(0x237))/0xa*(-parseInt(_0x303738(0x155))/0xb)+-parseInt(_0x303738(0x135))/0xc*(-parseInt(_0x303738(0x1f7))/0xd);if(_0x53bf88===_0x8df7b)break;else _0x15b64b['push'](_0x15b64b['shift']());}catch(_0x1fff9e){_0x15b64b['push'](_0x15b64b['shift']());}}}(_0x3663,0xe31e0));import{ContextPlugin as _0xed94bd,Editor as _0x2f62e5}from'ckeditor5/src/core.js';import{BodyCollection as _0x4d04e1}from'ckeditor5/src/ui.js';import{CKEditorError as _0x15792e,logError as _0x419030,scrollViewportToShowTarget as _0x2bcda0,uid as _0x4e0318}from'ckeditor5/src/utils.js';import{AIConnector as _0x593d3e}from'../aicore/aiconnector.js';import{AITabs as _0x3cd74b}from'../aitabs/aitabs.js';function _0x3663(){const _0xb73f68=['stop','fetchConversations','alignToTop','addUrlToContext','_rejectSuggestion','afterInit','55876OZkBDe','changeGroups','howMany','new','sourceId','isCurrentDocumentInConversation','_aiChatModels','createConversation','AITabs','_registerToolDataCallback','filter','ai-conversation-','interactionFinished','createRange','20dUYFNj','getChildAtOffset','redo','AI_CHAT_CONTEXT_UNABLE_TO_LOAD_RESOURCES','areActionsDisabled','AI_CHAT_GENERIC_ERROR','undo','cloneNode','version','_removeFromContext','mouseOverSuggestion','toggleReasoning','createdAt','model','AI_CHAT_CONTEXT_UNSUPPORTED_TYPE','uid','set','end','maxOffset','_applyOperationsAsSuggestions','removeSelectionFromContext','Liked\x20response','updateFeedItemAIReplyContent','documentContextContent','loadSourceResources','uploadProgressChanged','rejectSuggestion','getReply','getSelectionText','setState','uiId','_insertSuggestion','resetWebSearchState','loadConversation','source','applySuggestion','reasoningStarted','accepted','resourceStateChanged','disableControls','resetMessageInput','marker','AI_BALLOON_HEADER_TITLE','commands','text','selectModel','resourceId','ai-chat-invalid-request','addFeedItemError','306rGLdfD','ai.models','setConversationTitle','startAutoScroll','isPremiumPlugin','messageId','isModelAvailable','activeConversation','toggleLoadingSkeleton','handleRemovedConversation','remove','detachFromDom','addFeedInteractionHeader','AIConnector','start','abortPromptStream','isUploadInProgress','add','_startConversationSafely','_getUserPresentableContentPartDocumentRange','rootName','lastInteraction','config','error','addFileToContext','resizedTabs','delegate','DocumentCompare','isStarted','ai-chat-context-file-too-many-pages','_aiChatUi','addFilesToContext','getPath','setAddContextOptions','_scrollToSuggestionRange','next','AI_CHAT_CONTEXT_FORM_DATA_SIZE_LIMITS_EXCEEDED','_applySuggestion','AI_CHAT_CONTEXT_FILE_TOO_LARGE','getOperations','indexes','chat','ai-chat-controller-mouse-over','663tyngGQ','Undo','conversationInitialized','isInContext','327278DAxYBT','ai-chat-conversation-start-failed','getDocumentContext','enableControls','finishInteraction','createPositionFromPath','_getDocumentRangeForReplyChanges','root','414UDDVJP','clearConversationContextUI','getContentParts','like','addCurrentDocumentToContext','removeSelectionFromChatContext','setIsUploadInProgress','closeSourceResourceBalloon','ai-chat-context-invalid-data','ai-chat-missing-channel-id','main','addFeedItemAISuggestion','getDiff','removeFromContext','activateTab','upsertAIChatRating','selection','showPrevious','updateCurrentDocumentInContext','change','addSelectionToContext','interactionDestroyed','addFeedItemStaticMessage','_integrateEditor','Disliked\x20response','sendMessage','forEach','_aiChatBalloon','from','AIChatBalloon','AI_CHAT_RESOURCE_LOAD_FAILED','TrackChangesEditing','data','indexOf','requires','resetConversationTitle','getChildren','36DlIHIM','getFirstRange','getGroupId','_createFromRanges','getRanges','index','aiChatBalloon','streaming','toViewRange','replyChangeGroupStateUpdated','addContextOptionsChanged','_aiEditing','populateSourceResourceBalloon','has','AIChatController','createPositionAt','locale','AIEditing','setFeedItemAIReplySuggestionPartActive','done','addFeedItemCustomElement','children','AI_CHAT_CONTEXT_CURRENT_DOCUMENT','getInteractionAndReplyById','isLoading','collaboration.channelId','startsWith','replyId','toolDataReceived','dialogClosed','ai-chat-context-form-data-size-limits-exceeded','clearPendingContextUI','7168183qUUYaZ','path','callback','_currentPreviewedChangeGroup','_updateRatings','AIChatUI','resources','current-document','ai.chat.initialConversation','ai-chat-url-upload-failed','showFakeVisualSelection','_handleStartConversation','ai-chat-context-unsupported-type','_handleUIUserMessage','ai-chat-conversation-init-failed','unshift','changes','AI_CHAT_UNABLE_TO_START_CONVERSATION','listenTo','updateResourceState','_toggleWebSearch','startConversation','executeCustomItemCallback','currentReply','setLoadingMessage','mapper','getAll','selectedModel','view','getChild','removeContextItem','getRoot','resizeTabs','addOperation','_batchToChanges','length','init','resource','hideFakeVisualSelection','find','plugins','reasoningFinished','data-id','contextItemAdded','revert','interactionCreated','node','partIndex','addContextItem','resize','ai-chat-context-file-too-large','query','sourcePosition','AI_CHAT_INVALID_REQUEST','close','setContextItemLoading','_toggleReasoning','AI_CHAT_CONTEXT_UNABLE_TO_UPLOAD_URL','startInteraction','bind','pending','options','_bodyCollection','delete','updateFeedItemAIReplySources','ready','load','handleUserInteraction','toggleSuggestionDisplayMode','insertSuggestion','nextSibling','interactionStarted','_showConversationHistory','showNext','ai-chat-source-resources-load-failed','removeFeedInteraction','resetReasoningState','10652TlleOo','createReply','domConverter','batch','hasChanges','_aiConnector','includes','ai-chat-controller-no-active-conversation','document','getConversation','prepareLoadingMessage','getTransformedByOperation','130291TSZFMB','AI_CHAT_ABORTED_MESSAGE','slice','pluginName','log','content','ai.models.defaultModelId','parse','editing','outdated','AI_CHAT_UNTITLED_CONVERSATION','Showing\x20conversation\x20history...','ai.chat.context','addFeedItemAIReply','contextSent','modification','showDiff','AI_CHAT_CONTEXT_INVALID_DATA','setSelectedModel','getInteraction','AI_CHAT_CONTEXT_UNABLE_TO_UPLOAD_FILE','lastCreated','setIsMaximized','_flushLastInteractionUI','capabilitiesUpdated','map','webSearchFinished','_getPresentableSiblingContentPartIndex','updateContent','ai-chat-resource-load-failed','history','baseVersion','contextItemLoadingEnded','addDocumentToContext','editors','ai-request-aborted','addResourceToContext','updateConversationTitle','replies','sendUserMessage','contextItemRemoved','removed','_aiChatBalloonShowDiff','_updateReplyContent','sessionId','setChangeGroupState','interactionId','clearLoadingMessage','anchorId','_getLastCreatedConversationId','isDocumentOperation','get','setConversationContext','split','replyCreated','ai-chat-conversation-not-found','destroy','context','replyContentUpdated','fetchConversation','ai-no-track-changes','contextItem','mouseLeaveSuggestion','isCurrentDocumentInContext','addSelectionToChatContext','applyOperation','AI_CHAT_CONTEXT_UNSUPPORTED_FILE_TYPE','focusPromptInput','findIndex','modelSelected','contextItems','rejected','isDisabled','9943531mLudFU','setFeedItemRenderingStrategy','_setIsMaximized','_stopLastInteraction','showChangeInText','isOfficialPlugin','viewRangeToDom','webSearchStarted','dislike','ai-chat-file-upload-failed','type','ai-chat-context-unsupported-file-type','updateCapabilities','range','AI_CHAT_UNABLE_TO_LOAD_CONVERSATION','push','updateFeedItemAIReplySuggestionContent','toggleWebSearch','addCurrentDocumentToChatContext','_openBalloonFor','$graveyard','state','attachToDom','sources','scrollFeedToSuggestion','_logError','getConversations','addFeedItemUserMessage','sourceResourcesLoaded','getAttribute','AI_CHAT_CONTEXT_FILE_TOO_MANY_PAGES','81296qPWXbj','10aVswdm','TrackChanges','getDocumentData','toString','updateFeedItemAIReplySuggestionPartState','_getAIChatInteractionAPI','stopInteraction','message','open','setModel','previous','static'];_0x3663=function(){return _0xb73f68;};return _0x3663();}import{AIChatConversation as _0x1e4d8d}from'./model/aichatconversation.js';import{getTranslation as _0x2aaeb3}from'../aicore/utils/common-translations.js';import{AIModels as _0x170d37}from'../aicore/model/aimodels.js';import{getEditorFromContext as _0x5aac2c}from'../aicore/utils/geteditorfromcontext.js';import{DocumentCompare as _0x4a5630,DATA_ID_MODEL_ATTRIBUTE as _0x249de1}from'ckeditor5-collaboration/src/collaboration-core.js';import{fixMarkerOperationOldRange as _0x2aac5b,getOperationsFromReply as _0x371b51}from'../aicore/utils/getoperationsfromreply.js';import{expandSelectionWithContext as _0x272146,getMinimalSelection as _0x9fa59a}from'../aicore/utils/getsuggestionpartsfromreply.js';import{ModelRange as _0xf156c3,_DetachOperation as _0x14e20e}from'ckeditor5/src/engine.js';import{findOne as _0x3f070c,getAttribute as _0x1f28be,serialize as _0x49efa6,Document as _0x2608ef,findByAttribute as _0x25394c}from'../aicore/utils/htmlparser.js';function _0x5c3e(_0x5f384b,_0x5418e6){const _0x36639a=_0x3663();return _0x5c3e=function(_0x5c3e2b,_0xe4d69b){_0x5c3e2b=_0x5c3e2b-0xf5;let _0x17f47d=_0x36639a[_0x5c3e2b];return _0x17f47d;},_0x5c3e(_0x5f384b,_0x5418e6);}export class AIChatController extends _0xed94bd{[_0x55d179(0x140)];[_0x55d179(0x1a7)];[_0x55d179(0xf7)];[_0x55d179(0x22f)];[_0x55d179(0x12b)];[_0x55d179(0x177)]=new Map();[_0x55d179(0x158)]=null;[_0x55d179(0x193)];static get[_0x55d179(0x132)](){return[_0x593d3e,_0x4a5630];}static get[_0x55d179(0x1b1)](){const _0x547acb=_0x55d179;return _0x547acb(0x143);}static get[_0x55d179(0x1fc)](){return!0x0;}static get[_0x55d179(0x26c)](){return!0x0;}[_0x55d179(0x179)](){const _0x85fb75=_0x55d179;this[_0x85fb75(0x193)]=new _0x4d04e1(this[_0x85fb75(0x1e7)][_0x85fb75(0x145)]),this[_0x85fb75(0x193)][_0x85fb75(0x20d)](),this[_0x85fb75(0x1a7)]=this[_0x85fb75(0x1e7)][_0x85fb75(0x17d)][_0x85fb75(0x1e1)](_0x85fb75(0x275)),this[_0x85fb75(0xf7)]=this[_0x85fb75(0x1e7)][_0x85fb75(0x17d)][_0x85fb75(0x1e1)](_0x85fb75(0x15a)),this[_0x85fb75(0x140)]=this[_0x85fb75(0x1e7)][_0x85fb75(0x17d)][_0x85fb75(0x1e1)](_0x85fb75(0x146)),this[_0x85fb75(0x22f)]=new _0x170d37({'connector':this[_0x85fb75(0x1a7)],'config':this[_0x85fb75(0x1e7)][_0x85fb75(0x27e)][_0x85fb75(0x1e1)](_0x85fb75(0x269)),'locale':this[_0x85fb75(0x1e7)][_0x85fb75(0x145)]});const _0x5bb29c=this[_0x85fb75(0x1e7)][_0x85fb75(0x17d)][_0x85fb75(0x1e1)](_0x85fb75(0x231));this[_0x85fb75(0x167)](this[_0x85fb75(0xf7)],_0x85fb75(0x16a),()=>{const _0x4b3c00=_0x85fb75;this[_0x4b3c00(0x27a)]();}),this[_0x85fb75(0x167)](this[_0x85fb75(0xf7)],_0x85fb75(0x1d5),(_0x38a936,_0x17f645)=>{const _0x329af6=_0x85fb75;this[_0x329af6(0x162)]({'userMessage':_0x17f645});}),this[_0x85fb75(0x167)](_0x5bb29c,_0x85fb75(0x281),(_0x3ae2bb,_0x5939d5)=>{const _0x30bf07=_0x85fb75;this[_0x30bf07(0x1f9)](_0x5939d5);}),this[_0x85fb75(0x167)](this[_0x85fb75(0xf7)],_0x85fb75(0x175),()=>{const _0x1d2d6f=_0x85fb75;_0x5bb29c[_0x1d2d6f(0x186)]();}),this[_0x85fb75(0x167)](this[_0x85fb75(0xf7)],_0x85fb75(0x277),async()=>{const _0x58c2dc=_0x85fb75;await this[_0x58c2dc(0x1fa)](),await this[_0x58c2dc(0x1c5)](),this[_0x58c2dc(0x115)]();}),this[_0x85fb75(0x167)](this[_0x85fb75(0xf7)],_0x85fb75(0x1cf),()=>{const _0xfdfc42=_0x85fb75;this[_0xfdfc42(0x209)]();}),this[_0x85fb75(0x167)](this[_0x85fb75(0xf7)],_0x85fb75(0x280),(_0x5ebef7,_0x5a34e7)=>{const _0xf5fefc=_0x85fb75;this[_0xf5fefc(0x26f)]?.[_0xf5fefc(0xf8)](Array[_0xf5fefc(0x12c)](_0x5a34e7));}),this[_0x85fb75(0x167)](this[_0x85fb75(0xf7)],_0x85fb75(0x226),(_0x45af9c,_0xaedead)=>{const _0xb4b91=_0x85fb75;this[_0xb4b91(0x26f)]?.[_0xb4b91(0x226)](_0xaedead);}),this[_0x85fb75(0x167)](this[_0x85fb75(0xf7)],_0x85fb75(0x16b),(_0x19682b,_0x5bce34)=>{const _0x2f1159=_0x85fb75;_0x5bce34[_0x2f1159(0x157)](this[_0x2f1159(0x1e7)]);}),this[_0x85fb75(0x167)](this[_0x85fb75(0xf7)],_0x85fb75(0x1d2),(_0x122c7f,_0x2ad0b8)=>{const _0x21b650=_0x85fb75;this[_0x21b650(0x26f)]?.[_0x21b650(0x1d2)](_0x2ad0b8[_0x21b650(0x259)],_0x2ad0b8[_0x21b650(0x17a)]);}),this[_0x85fb75(0x167)](this[_0x85fb75(0xf7)],_0x85fb75(0x173),(_0x3707eb,_0x34ee3e)=>{const _0x266b6e=_0x85fb75;this[_0x266b6e(0x240)](_0x34ee3e);}),this[_0x85fb75(0x167)](this[_0x85fb75(0xf7)],_0x85fb75(0x24f),(_0x1b17ad,_0x7c6cc0)=>{const _0x1b5724=_0x85fb75;this[_0x1b5724(0x26f)]?.[_0x1b5724(0x24f)](_0x7c6cc0[_0x1b5724(0x22d)],_0x7c6cc0[_0x1b5724(0x188)],_0x7c6cc0[_0x1b5724(0x246)]);}),this[_0x85fb75(0x167)](this[_0x85fb75(0xf7)],_0x85fb75(0x208),()=>{const _0x4ec4b6=_0x85fb75;this[_0x4ec4b6(0x169)]();}),this[_0x85fb75(0x167)](this[_0x85fb75(0xf7)],_0x85fb75(0x242),()=>{const _0x15b6f3=_0x85fb75;this[_0x15b6f3(0x18d)]();}),this[_0x85fb75(0x167)](this[_0x85fb75(0xf7)],_0x85fb75(0x264),(_0x436b36,_0x3cd2c8)=>{const _0x3e1af4=_0x85fb75;this[_0x3e1af4(0x26f)]?.[_0x3e1af4(0x220)](_0x3cd2c8);}),this[_0x85fb75(0x167)](this[_0x85fb75(0xf7)],_0x85fb75(0x113),(_0x52a695,{replyId:_0x16e652})=>{const _0x79a936=_0x85fb75;console[_0x79a936(0x1b2)](_0x79a936(0x24c),_0x16e652);}),this[_0x85fb75(0x167)](this[_0x85fb75(0xf7)],_0x85fb75(0x1ff),(_0x2fcaf3,{replyId:_0x324a5f})=>{const _0x3f4772=_0x85fb75;console[_0x3f4772(0x1b2)](_0x3f4772(0x128),_0x324a5f);}),this[_0x85fb75(0x167)](this[_0x85fb75(0xf7)],_0x85fb75(0x19a),(_0x11573a,_0x2cb3e5)=>{const _0x1cba0d=_0x85fb75;this[_0x1cba0d(0x256)](_0x2cb3e5);}),this[_0x85fb75(0x167)](this[_0x85fb75(0xf7)],_0x85fb75(0x1fb),(_0x2dc69f,{replyId:_0x2c8290,partIndex:_0x3fca00})=>{const _0x24edd1=_0x85fb75;this[_0x24edd1(0x1d8)]=this[_0x24edd1(0xf7)][_0x24edd1(0x1be)],this[_0x24edd1(0x20a)](_0x2c8290,_0x3fca00);}),this[_0x85fb75(0x167)](this[_0x85fb75(0xf7)],_0x85fb75(0x241),(_0x15220f,{replyId:_0x550cca,partIndex:_0x360b27})=>{const _0x19e893=_0x85fb75,_0x2cece3=this[_0x19e893(0x10e)](_0x550cca,_0x360b27);_0x2cece3&&_0x19e893(0x20b)!=_0x2cece3[_0x19e893(0x204)][_0x19e893(0x10f)][_0x19e893(0x27c)]&&this[_0x19e893(0x140)][_0x19e893(0x15f)]([_0x2cece3[_0x19e893(0x204)]],_0x19e893(0x103));}),this[_0x85fb75(0x167)](this[_0x85fb75(0xf7)],_0x85fb75(0x1ec),()=>{const _0x44c9ce=_0x85fb75;this[_0x44c9ce(0x140)][_0x44c9ce(0x17b)](_0x44c9ce(0x103));}),this[_0x85fb75(0x167)](this[_0x85fb75(0xf7)],_0x85fb75(0x25a),(_0x44252c,_0x44939c)=>{const _0x57671b=_0x85fb75;this[_0x57671b(0x140)][_0x57671b(0x17b)](_0x57671b(0x103)),this[_0x57671b(0xfe)](_0x44939c);}),this[_0x85fb75(0x167)](this[_0x85fb75(0xf7)],_0x85fb75(0x199),async(_0x112a7a,{replyId:_0x48d5f2,showDiff:_0xaf2059})=>{const _0x391d64=_0x85fb75,{reply:_0x3a3b62}=this[_0x391d64(0x14c)](_0x48d5f2),_0x186462=_0x3a3b62[_0x391d64(0x112)]({'showDiff':_0xaf2059});await this[_0x391d64(0xf7)][_0x391d64(0x207)]({'id':_0x3a3b62['id'],'parts':_0x186462,'renderingStrategy':_0x391d64(0x222)});}),this[_0x85fb75(0x167)](this[_0x85fb75(0xf7)],_0x85fb75(0x251),(_0x4596b3,{replyId:_0x56b53a,partIndex:_0x449586})=>{const _0x3f1013=_0x85fb75;this[_0x3f1013(0x227)]({'replyId':_0x56b53a,'partIndex':_0x449586}),this[_0x3f1013(0x140)][_0x3f1013(0x17b)](_0x3f1013(0x103));}),this[_0x85fb75(0x1e7)][_0x85fb75(0x17d)][_0x85fb75(0x142)](_0x85fb75(0x12d))&&(this[_0x85fb75(0x12b)]=this[_0x85fb75(0x1e7)][_0x85fb75(0x17d)][_0x85fb75(0x1e1)](_0x85fb75(0x12d)),this[_0x85fb75(0x247)](_0x85fb75(0x1d8),!0x1),this[_0x85fb75(0x12b)][_0x85fb75(0x190)](_0x85fb75(0x1be))['to'](this,_0x85fb75(0x1d8)),this[_0x85fb75(0x167)](this[_0x85fb75(0x12b)],_0x85fb75(0x199),()=>{const _0x1e6dfd=_0x85fb75,{replyId:_0x1e1057,partIndex:_0x2b20cf}=this[_0x1e6dfd(0x158)];this[_0x1e6dfd(0x1d8)]=!this[_0x1e6dfd(0x1d8)];const {reply:_0x3555d5}=this[_0x1e6dfd(0x14c)](_0x1e1057),_0xca83af=_0x3555d5[_0x1e6dfd(0x112)]({'showDiff':this[_0x1e6dfd(0x1d8)],'groupIndex':_0x2b20cf});this[_0x1e6dfd(0x12b)][_0x1e6dfd(0x1ca)]({'part':_0xca83af[0x0],'renderingStrategy':_0x1e6dfd(0x222),'keepErrors':!0x0});}),this[_0x85fb75(0x167)](this[_0x85fb75(0x12b)],_0x85fb75(0x25a),()=>{const _0x42820f=_0x85fb75,{replyId:_0x285ab7,partIndex:_0x377856}=this[_0x42820f(0x158)];this[_0x42820f(0xfe)]({'replyId':_0x285ab7,'partIndex':_0x377856}),this[_0x42820f(0x12b)][_0x42820f(0x254)](_0x42820f(0x25c));}),this[_0x85fb75(0x167)](this[_0x85fb75(0x12b)],_0x85fb75(0x19a),()=>{const _0x4bbb33=_0x85fb75,{replyId:_0x2f5928,partIndex:_0x4e5a05}=this[_0x4bbb33(0x158)];this[_0x4bbb33(0x256)]({'replyId':_0x2f5928,'partIndex':_0x4e5a05}),this[_0x4bbb33(0x12b)][_0x4bbb33(0x254)](_0x4bbb33(0x25c));}),this[_0x85fb75(0x167)](this[_0x85fb75(0x12b)],_0x85fb75(0x251),()=>{const _0x23f310=_0x85fb75,{replyId:_0x31e81b,partIndex:_0x15ec51}=this[_0x23f310(0x158)];this[_0x23f310(0x227)]({'replyId':_0x31e81b,'partIndex':_0x15ec51}),this[_0x23f310(0x12b)][_0x23f310(0x254)](_0x23f310(0x1f5));}),this[_0x85fb75(0x167)](this[_0x85fb75(0x12b)],_0x85fb75(0x19e),()=>{const _0x209a63=_0x85fb75,{replyId:_0x16352d,partIndex:_0x482f85}=this[_0x209a63(0x158)],_0x50ea03=this[_0x209a63(0x1c9)](_0x16352d,_0x482f85,_0x209a63(0xfc));null!==_0x50ea03&&this[_0x209a63(0x20a)](_0x16352d,_0x50ea03);}),this[_0x85fb75(0x167)](this[_0x85fb75(0x12b)],_0x85fb75(0x121),()=>{const _0x35ea45=_0x85fb75,{replyId:_0x15015c,partIndex:_0x1432d4}=this[_0x35ea45(0x158)],_0x4402e0=this[_0x35ea45(0x1c9)](_0x15015c,_0x1432d4,_0x35ea45(0x221));null!==_0x4402e0&&this[_0x35ea45(0x20a)](_0x15015c,_0x4402e0);}),this[_0x85fb75(0x167)](this[_0x85fb75(0x12b)],_0x85fb75(0x152),(_0x1906d0,{id:_0x4765a0})=>{const _0x3a933e=_0x85fb75;if(_0x3a933e(0x13b)!==_0x4765a0)return;const {replyId:_0x39ef4b,partIndex:_0x289455}=this[_0x3a933e(0x158)];this[_0x3a933e(0x158)]=null,this[_0x3a933e(0xf7)][_0x3a933e(0x147)]({'id':_0x39ef4b,'index':_0x289455,'isActive':!0x1});}));}async[_0x55d179(0x228)](){const _0x5ae7f3=_0x55d179;this[_0x5ae7f3(0x1e7)]instanceof _0x2f62e5?this[_0x5ae7f3(0x127)](this[_0x5ae7f3(0x1e7)]):this[_0x5ae7f3(0x167)](this[_0x5ae7f3(0x1e7)][_0x5ae7f3(0x1d0)],_0x5ae7f3(0x279),(_0x1713ee,_0x2b2fc8)=>{const _0xa13a1=_0x5ae7f3;_0x2b2fc8['on'](_0xa13a1(0x196),()=>{const _0x4dbf26=_0xa13a1;this[_0x4dbf26(0x127)](_0x2b2fc8);});});const _0x2907d1=this[_0x5ae7f3(0x1e7)][_0x5ae7f3(0x27e)][_0x5ae7f3(0x1e1)](_0x5ae7f3(0x15d));let _0x569937=_0x2907d1;if(_0x5ae7f3(0x1c3)!=_0x2907d1||(_0x569937=await this[_0x5ae7f3(0x1df)](),_0x569937))return _0x5ae7f3(0x22c)==_0x569937?this[_0x5ae7f3(0x27a)]():this[_0x5ae7f3(0x258)](_0x569937);}async[_0x55d179(0x1e6)](){const _0x56d1dd=_0x55d179;return await this[_0x56d1dd(0x1fa)](),this[_0x56d1dd(0x193)][_0x56d1dd(0x273)](),super[_0x56d1dd(0x1e6)]();}[_0x55d179(0x256)](_0x4f3a70){const _0x3301bc=_0x55d179,_0x5225f4=_0x5aac2c(this[_0x3301bc(0x1e7)]);if(!_0x5225f4[_0x3301bc(0x17d)][_0x3301bc(0x142)](_0x3301bc(0x218)))throw new _0x15792e(_0x3301bc(0x1ea),null);const _0x35e033=this[_0x3301bc(0x1e7)][_0x3301bc(0x17d)][_0x3301bc(0x1e1)](_0x3301bc(0x283)),{reply:_0x4e179b,interaction:_0x363af2}=this[_0x3301bc(0x14c)](_0x4f3a70[_0x3301bc(0x150)]),_0x2ebd9a=this[_0x3301bc(0x10e)](_0x4f3a70[_0x3301bc(0x150)],_0x4f3a70[_0x3301bc(0x184)]),_0x2aad4b=void 0x0!==_0x4f3a70[_0x3301bc(0x184)]?[_0x4e179b[_0x3301bc(0x22a)][_0x4f3a70[_0x3301bc(0x184)]]]:_0x4e179b[_0x3301bc(0x22a)][_0x3301bc(0x233)](_0x2c8585=>_0x3301bc(0x191)==_0x2c8585[_0x3301bc(0x20c)]),_0x542760=_0x2aad4b[_0x3301bc(0x1c7)](_0x35df06=>_0x4e179b[_0x3301bc(0x22a)][_0x3301bc(0x131)](_0x35df06));if(!_0x2ebd9a||_0x3301bc(0x20b)==_0x2ebd9a[_0x3301bc(0x204)][_0x3301bc(0x10f)][_0x3301bc(0x27c)])return void _0x542760[_0x3301bc(0x12a)](_0x191b46=>_0x4e179b[_0x3301bc(0x1db)](_0x191b46,_0x3301bc(0x1b7)));_0x542760[_0x3301bc(0x12a)](_0x1b4d77=>_0x4e179b[_0x3301bc(0x1db)](_0x1b4d77,_0x3301bc(0x25c)));const _0x3efb49=_0x371b51({'editor':_0x5225f4,'reply':_0x4e179b,'interaction':_0x363af2,'groups':_0x2aad4b,'transform':!0x0,'documentCompare':_0x35e033,'documentCompareOptions':{'anchor':_0x3301bc(0x11a),'markDeletions':!0x0}});let _0x1bb534;_0x2ebd9a&&this[_0x3301bc(0xfb)](_0x2ebd9a[_0x3301bc(0x204)]),_0x5225f4[_0x3301bc(0x244)][_0x3301bc(0x123)](_0x905ff1=>{const _0x213465=_0x3301bc;_0x1bb534=_0x905ff1[_0x213465(0x1a5)],_0x5225f4[_0x213465(0x17d)][_0x213465(0x1e1)](_0x213465(0x12f))[_0x213465(0x24a)](_0x3efb49),this[_0x213465(0x140)][_0x213465(0x17b)](_0x213465(0x103));}),this[_0x3301bc(0x177)][_0x3301bc(0x247)](_0x1bb534,{'interactionId':_0x363af2['id'],'replyId':_0x4e179b['id'],'indexes':_0x542760[_0x3301bc(0x1b0)]()}),this[_0x3301bc(0x159)](_0x4e179b);}[_0x55d179(0xfe)](_0x4ce3e5){const _0x1c7d73=_0x55d179,_0x3e07e2=_0x5aac2c(this[_0x1c7d73(0x1e7)]),_0x349c60=this[_0x1c7d73(0x1e7)][_0x1c7d73(0x17d)][_0x1c7d73(0x1e1)](_0x4a5630),{reply:_0x211700,interaction:_0x4b543c}=this[_0x1c7d73(0x14c)](_0x4ce3e5[_0x1c7d73(0x150)]),_0x41dde9=this[_0x1c7d73(0x10e)](_0x4ce3e5[_0x1c7d73(0x150)],_0x4ce3e5[_0x1c7d73(0x184)]),_0x2f0772=void 0x0!==_0x4ce3e5[_0x1c7d73(0x184)]?[_0x211700[_0x1c7d73(0x22a)][_0x4ce3e5[_0x1c7d73(0x184)]]]:_0x211700[_0x1c7d73(0x22a)][_0x1c7d73(0x233)](_0x53a8d4=>_0x1c7d73(0x191)==_0x53a8d4[_0x1c7d73(0x20c)]),_0x488ba3=_0x2f0772[_0x1c7d73(0x1c7)](_0x4978ac=>_0x211700[_0x1c7d73(0x22a)][_0x1c7d73(0x131)](_0x4978ac));if(!_0x41dde9||_0x1c7d73(0x20b)==_0x41dde9[_0x1c7d73(0x204)][_0x1c7d73(0x10f)][_0x1c7d73(0x27c)])return void _0x488ba3[_0x1c7d73(0x12a)](_0x4a9bda=>_0x211700[_0x1c7d73(0x1db)](_0x4a9bda,_0x1c7d73(0x1b7)));_0x488ba3[_0x1c7d73(0x12a)](_0x4064a8=>_0x211700[_0x1c7d73(0x1db)](_0x4064a8,_0x1c7d73(0x25c)));const _0x1783ea=_0x371b51({'editor':_0x3e07e2,'reply':_0x211700,'interaction':_0x4b543c,'groups':_0x2f0772,'transform':!0x0,'documentCompare':_0x349c60,'documentCompareOptions':{'anchor':_0x1c7d73(0x11a),'markDeletions':!0x1}});let _0x765134;_0x41dde9&&this[_0x1c7d73(0xfb)](_0x41dde9[_0x1c7d73(0x204)]),_0x3e07e2[_0x1c7d73(0x244)][_0x1c7d73(0x123)](_0x27fc7c=>{const _0x32d4ed=_0x1c7d73;_0x765134=_0x27fc7c[_0x32d4ed(0x1a5)];for(const _0x52b6c1 of _0x1783ea)_0x52b6c1[_0x32d4ed(0x1cd)]=_0x3e07e2[_0x32d4ed(0x244)][_0x32d4ed(0x1aa)][_0x32d4ed(0x23f)],_0x2aac5b(_0x3e07e2,_0x52b6c1),_0x27fc7c[_0x32d4ed(0x1a5)][_0x32d4ed(0x176)](_0x52b6c1),_0x3e07e2[_0x32d4ed(0x244)][_0x32d4ed(0x1ef)](_0x52b6c1);}),this[_0x1c7d73(0x177)][_0x1c7d73(0x247)](_0x765134,{'interactionId':_0x4b543c['id'],'replyId':_0x211700['id'],'indexes':_0x488ba3[_0x1c7d73(0x1b0)]()}),this[_0x1c7d73(0x159)](_0x211700);}[_0x55d179(0x227)](_0x833daf){const _0x1b371c=_0x55d179,{reply:_0x59ba91}=this[_0x1b371c(0x14c)](_0x833daf[_0x1b371c(0x150)]);_0x59ba91[_0x1b371c(0x1db)](_0x833daf[_0x1b371c(0x184)],_0x1b371c(0x1f5));}[_0x55d179(0x20a)](_0x395c8b,_0x5e11ce){const _0x5d0551=_0x55d179;if(!this[_0x5d0551(0x12b)])return;const {reply:_0x52216a}=this[_0x5d0551(0x14c)](_0x395c8b),_0x3f4dc1=_0x52216a[_0x5d0551(0x112)]({'showDiff':this[_0x5d0551(0x1d8)]});let _0x1eddf5,_0x2e64b3;if(void 0x0!==_0x5e11ce?(_0x2e64b3=_0x3f4dc1[_0x5d0551(0x17c)](_0x4a388a=>_0x4a388a[_0x5d0551(0x13a)]==_0x5e11ce),_0x1eddf5=_0x2e64b3?.[_0x5d0551(0x13a)]):(_0x2e64b3=_0x3f4dc1[0x0],_0x1eddf5=_0x2e64b3[_0x5d0551(0x13a)]),this[_0x5d0551(0x158)]?.[_0x5d0551(0x150)]==_0x395c8b&&this[_0x5d0551(0x158)]?.[_0x5d0551(0x184)]==_0x1eddf5)return;const _0x490013=this[_0x5d0551(0x27b)](_0x395c8b,_0x52216a,_0x2e64b3);if(!_0x490013)return void this[_0x5d0551(0x12b)][_0x5d0551(0x18b)]();this[_0x5d0551(0x158)]={'replyId':_0x395c8b,'partIndex':_0x1eddf5},this[_0x5d0551(0xfb)](_0x490013,!0x0);const _0x2a4055=this[_0x5d0551(0x1c9)](_0x395c8b,_0x1eddf5,_0x5d0551(0xfc));this[_0x5d0551(0x12b)][_0x5d0551(0x1ca)]({'part':_0x2e64b3,'renderingStrategy':_0x5d0551(0x222)}),this[_0x5d0551(0x12b)][_0x5d0551(0x21f)]({'index':_0x1eddf5,'title':_0x2aaeb3(this[_0x5d0551(0x1e7)][_0x5d0551(0x145)],_0x5d0551(0x261),(_0x1eddf5+0x1)[_0x5d0551(0x21a)]()),'showRotator':null!==_0x2a4055,'ranges':[_0x490013],'areActionsDisabled':_0x52216a[_0x5d0551(0x23b)]}),this[_0x5d0551(0x12b)][_0x5d0551(0x254)](_0x5d0551(0x191)),this[_0x5d0551(0xf7)][_0x5d0551(0x20f)](_0x395c8b,_0x1eddf5),this[_0x5d0551(0xf7)][_0x5d0551(0x147)]({'id':_0x395c8b,'index':_0x1eddf5,'isActive':!0x0});}[_0x55d179(0x1c9)](_0x251ee2,_0x2caf1a,_0x544a3e){const _0x5d83e1=_0x55d179,{reply:_0x572bea}=this[_0x5d83e1(0x14c)](_0x251ee2),_0x219a0d=_0x572bea[_0x5d83e1(0x112)]({'showDiff':this[_0x5d83e1(0x1d8)]});if(0x1==_0x219a0d[_0x5d83e1(0x178)])return null;const _0x337a7c=_0x219a0d[_0x5d83e1(0x1f2)](_0x16ec5a=>_0x16ec5a[_0x5d83e1(0x13a)]==_0x2caf1a),_0x2b2ad6=_0x5d83e1(0xfc)==_0x544a3e?0x1:-0x1;let _0x1d65f3=_0x219a0d['at']((_0x337a7c+_0x2b2ad6)%_0x219a0d[_0x5d83e1(0x178)])[_0x5d83e1(0x13a)],_0xddda5a=_0x219a0d[_0x1d65f3];for(;!this[_0x5d83e1(0x27b)](_0x251ee2,_0x572bea,_0xddda5a);){if(_0x1d65f3=_0x219a0d['at']((_0x1d65f3+_0x2b2ad6)%_0x219a0d[_0x5d83e1(0x178)])[_0x5d83e1(0x13a)],_0x1d65f3===_0x337a7c)return null;_0xddda5a=_0x219a0d[_0x1d65f3];}return _0x1d65f3;}[_0x55d179(0x27b)](_0x29dab3,_0x46c40c,_0x3624ab){const _0x2398bf=_0x55d179,_0x3feb09=_0x46c40c[_0x2398bf(0x22a)];if(!_0x3624ab[_0x2398bf(0x1a6)])return null;const _0xbeb4a0=_0x3feb09[_0x2398bf(0x17c)](_0x1af8bc=>_0x1af8bc[_0x2398bf(0x13a)]==_0x3624ab[_0x2398bf(0x13a)]);if(_0x2398bf(0x191)!==_0xbeb4a0?.[_0x2398bf(0x20c)])return null;const _0x48560d=this[_0x2398bf(0x10e)](_0x29dab3,_0x3624ab[_0x2398bf(0x13a)]);if(!_0x48560d)return null;const {range:_0x1321bc,currentIndex:_0xdf1d12}=_0x48560d;return _0x2398bf(0x20b)==_0x1321bc[_0x2398bf(0x10f)][_0x2398bf(0x27c)]?(_0x46c40c[_0x2398bf(0x1db)](_0xdf1d12,_0x2398bf(0x1b7)),null):_0x48560d[_0x2398bf(0x204)];}[_0x55d179(0x10e)](_0x1df945,_0x4d91c7){const _0x5cb07c=_0x55d179,_0xb105b9=_0x5aac2c(this[_0x5cb07c(0x1e7)]),{reply:_0x252700,interaction:_0x3bcdb5}=this[_0x5cb07c(0x14c)](_0x1df945),_0x4e14dd=_0x252700[_0x5cb07c(0x22a)][_0x5cb07c(0x233)](_0x1c80cc=>_0x5cb07c(0x191)==_0x1c80cc[_0x5cb07c(0x20c)]),_0x482ad7=_0x4e14dd[_0x5cb07c(0x1c7)](_0x20e6cc=>_0x252700[_0x5cb07c(0x22a)][_0x5cb07c(0x131)](_0x20e6cc));void 0x0===_0x4d91c7&&(_0x4d91c7=_0x482ad7[0x0]);const _0x4cbf81=_0x482ad7[_0x5cb07c(0x131)](_0x4d91c7);if(-0x1==_0x4cbf81)return null;const _0x4fd1c8=_0x4e14dd[_0x4cbf81],_0x2d108e=new _0x2608ef([]),_0x42d8cf=new _0x2608ef([]);for(const _0x1e6686 of _0x4fd1c8[_0x5cb07c(0x165)])if(_0x5cb07c(0x1d7)!=_0x1e6686[_0x5cb07c(0x201)]&&_0x42d8cf[_0x5cb07c(0x14a)][_0x5cb07c(0x206)](_0x1e6686[_0x5cb07c(0x183)][_0x5cb07c(0x23e)](!0x0)),_0x5cb07c(0x22c)!=_0x1e6686[_0x5cb07c(0x201)]){const _0x185ef=_0x3f070c(_0x5675fd=>_0x1f28be(_0x5675fd,_0x5cb07c(0x17f))==_0x1e6686['id'],_0x252700[_0x5cb07c(0x24e)],!0x0);_0x2d108e[_0x5cb07c(0x14a)][_0x5cb07c(0x206)](_0x185ef[_0x5cb07c(0x23e)](!0x0));}if(0x0==_0x2d108e[_0x5cb07c(0x14a)][_0x5cb07c(0x178)]){if(_0x4fd1c8[_0x5cb07c(0x165)][0x0][_0x5cb07c(0x1de)]){const _0x19c740=_0x25394c(_0x5cb07c(0x17f),_0x4fd1c8[_0x5cb07c(0x165)][0x0][_0x5cb07c(0x1de)],_0x252700[_0x5cb07c(0x24e)]);_0x2d108e[_0x5cb07c(0x14a)][_0x5cb07c(0x164)](_0x19c740[_0x5cb07c(0x23e)](!0x0)),_0x42d8cf[_0x5cb07c(0x14a)][_0x5cb07c(0x164)](_0x19c740[_0x5cb07c(0x23e)](!0x0)),_0x19c740[_0x5cb07c(0x19b)]&&(_0x2d108e[_0x5cb07c(0x14a)][_0x5cb07c(0x206)](_0x19c740[_0x5cb07c(0x19b)][_0x5cb07c(0x23e)](!0x0)),_0x42d8cf[_0x5cb07c(0x14a)][_0x5cb07c(0x206)](_0x19c740[_0x5cb07c(0x19b)][_0x5cb07c(0x23e)](!0x0)));}else{const _0x24a4a6=_0x252700[_0x5cb07c(0x24e)][_0x5cb07c(0x14a)][0x0];if(!_0x24a4a6)return null;_0x2d108e[_0x5cb07c(0x14a)][_0x5cb07c(0x206)](_0x24a4a6[_0x5cb07c(0x23e)](!0x0)),_0x42d8cf[_0x5cb07c(0x14a)][_0x5cb07c(0x206)](_0x24a4a6[_0x5cb07c(0x23e)](!0x0));}}const _0x5b4caf=_0x3bcdb5[_0x5cb07c(0x10a)](),_0x3d3262=_0xb105b9[_0x5cb07c(0x130)][_0x5cb07c(0x1b5)](_0x5b4caf[_0x5cb07c(0x1b3)]),_0x2c5a29=_0x49efa6(_0x2d108e),_0x307e98=_0xb105b9[_0x5cb07c(0x130)][_0x5cb07c(0x1b5)](_0x2c5a29),_0xd308d2=_0xb105b9[_0x5cb07c(0x130)][_0x5cb07c(0x1b5)](_0x2c5a29),_0x753272=_0xb105b9[_0x5cb07c(0x244)][_0x5cb07c(0x144)](_0x307e98,0x0),_0x4e2195=_0x49efa6(_0x42d8cf),_0x4622bb={'anchor':_0x753272,'markDeletions':!0x1},_0xf0343e=_0xb105b9[_0x5cb07c(0x17d)][_0x5cb07c(0x1e1)](_0x4a5630)[_0x5cb07c(0x11c)](_0x2c5a29,_0x4e2195,_0x4622bb)[_0x5cb07c(0x100)]();if(!_0xf0343e[_0x5cb07c(0x178)])return null;_0xb105b9[_0x5cb07c(0x244)][_0x5cb07c(0x123)](_0x202ef6=>{const _0x3c76f1=_0x5cb07c;for(const _0x3092ab of _0xf0343e)if(_0x3c76f1(0x272)==_0x3092ab[_0x3c76f1(0x201)]){const _0x34d19a=_0x3092ab[_0x3c76f1(0x189)],_0x4e1a62=_0x3092ab[_0x3c76f1(0x22b)],_0x54991a=new _0x14e20e(_0x34d19a,_0x4e1a62);_0x202ef6[_0x3c76f1(0x1a5)][_0x3c76f1(0x176)](_0x54991a),_0xb105b9[_0x3c76f1(0x244)][_0x3c76f1(0x1ef)](_0x54991a);}else _0x3c76f1(0x260)!==_0x3092ab[_0x3c76f1(0x201)]&&(_0x3092ab[_0x3c76f1(0x1cd)]=null,_0x3092ab[_0x3c76f1(0x1e0)]=!0x1,_0x202ef6[_0x3c76f1(0x1a5)][_0x3c76f1(0x176)](_0x3092ab),_0xb105b9[_0x3c76f1(0x244)][_0x3c76f1(0x1ef)](_0x3092ab));});const _0x5d87fa=_0x9fa59a(_0xb105b9,_0xf0343e,_0x307e98);_0x272146(_0xb105b9[_0x5cb07c(0x244)],_0x5d87fa);const _0x230054=_0x5d87fa[_0x5cb07c(0x136)]()[_0x5cb07c(0x276)][_0x5cb07c(0x156)][_0x5cb07c(0x1b0)](),_0x1a4c79=_0x5d87fa[_0x5cb07c(0x136)]()[_0x5cb07c(0x248)][_0x5cb07c(0x156)][_0x5cb07c(0x1b0)](),_0x3724b7=[];let _0x19968b=_0x307e98,_0x45b481=_0xd308d2;for(let _0x7cebbe=0x0;_0x7cebbe<_0x1a4c79[_0x5cb07c(0x178)];_0x7cebbe++){const _0x162c85=_0x19968b[_0x5cb07c(0x249)]-_0x1a4c79[_0x7cebbe];_0x3724b7[_0x7cebbe]=_0x45b481[_0x5cb07c(0x249)]-_0x162c85,_0x19968b=_0x19968b[_0x5cb07c(0x238)](_0x1a4c79[_0x7cebbe]),_0x45b481=_0x45b481[_0x5cb07c(0x238)](_0x3724b7[_0x7cebbe]);}const _0x4db8dc=_0xb105b9[_0x5cb07c(0x244)][_0x5cb07c(0x236)](_0xb105b9[_0x5cb07c(0x244)][_0x5cb07c(0x10d)](_0xd308d2,_0x230054),_0xb105b9[_0x5cb07c(0x244)][_0x5cb07c(0x10d)](_0xd308d2,_0x3724b7)),_0xba932b=_0xd308d2[_0x5cb07c(0x172)](0x0)[_0x5cb07c(0x214)](_0x249de1),_0x3878c9=Array[_0x5cb07c(0x12c)](_0x3d3262[_0x5cb07c(0x134)]())[_0x5cb07c(0x17c)](_0x3ce7d4=>_0x3ce7d4[_0x5cb07c(0x214)](_0x249de1)==_0xba932b)[_0x5cb07c(0xf9)](),_0x4c9e12=_0x4db8dc[_0x5cb07c(0x276)][_0x5cb07c(0x156)][_0x5cb07c(0x1b0)](),_0x2141fc=_0x4db8dc[_0x5cb07c(0x248)][_0x5cb07c(0x156)][_0x5cb07c(0x1b0)]();_0x4c9e12[0x0]=_0x3878c9[0x0]+_0x4c9e12[0x0],_0x2141fc[0x0]=_0x3878c9[0x0]+_0x2141fc[0x0];let _0x5b3eb5=_0xb105b9[_0x5cb07c(0x244)][_0x5cb07c(0x236)](_0xb105b9[_0x5cb07c(0x244)][_0x5cb07c(0x10d)](_0xb105b9[_0x5cb07c(0x244)][_0x5cb07c(0x1aa)][_0x5cb07c(0x174)](),_0x4c9e12),_0xb105b9[_0x5cb07c(0x244)][_0x5cb07c(0x10d)](_0xb105b9[_0x5cb07c(0x244)][_0x5cb07c(0x1aa)][_0x5cb07c(0x174)](),_0x2141fc));const _0x305ee5=_0xb105b9[_0x5cb07c(0x244)][_0x5cb07c(0x1aa)][_0x5cb07c(0x1cc)][_0x5cb07c(0x100)](_0x5b4caf[_0x5cb07c(0x23f)]);for(const _0x4342e5 of _0x305ee5)_0x5b3eb5=_0xf156c3[_0x5cb07c(0x138)](_0x5b3eb5[_0x5cb07c(0x1ad)](_0x4342e5));return{'range':_0x5b3eb5,'currentIndex':_0x4d91c7};}[_0x55d179(0x127)](_0xbdf839){const _0x320692=_0x55d179;if(!_0xbdf839[_0x320692(0x17d)][_0x320692(0x142)](_0x320692(0x105)))return;const _0x5c482d=_0xbdf839[_0x320692(0x262)][_0x320692(0x1e1)](_0x320692(0x23d)),_0x571546=_0xbdf839[_0x320692(0x262)][_0x320692(0x1e1)](_0x320692(0x239));this[_0x320692(0x167)](_0x5c482d,_0x320692(0x181),(_0x31bcdc,_0x373bff,_0xcd87f7)=>{const _0x3fdbf5=_0x320692,_0x14d7c0=this[_0x3fdbf5(0x177)][_0x3fdbf5(0x1e1)](_0x373bff);if(!_0x14d7c0)return;const _0x2139a6=this[_0x3fdbf5(0x26f)][_0x3fdbf5(0x1c1)](_0x14d7c0[_0x3fdbf5(0x1dc)])[_0x3fdbf5(0x252)](_0x14d7c0[_0x3fdbf5(0x150)]);_0x14d7c0[_0x3fdbf5(0x101)][_0x3fdbf5(0x12a)](_0x4fe051=>_0x2139a6[_0x3fdbf5(0x1db)](_0x4fe051,_0x3fdbf5(0x191))),this[_0x3fdbf5(0x177)][_0x3fdbf5(0x194)](_0x373bff),this[_0x3fdbf5(0x177)][_0x3fdbf5(0x247)](_0xcd87f7,_0x14d7c0);}),this[_0x320692(0x167)](_0x571546,_0x320692(0x181),(_0x2a6557,_0x25c914,_0x37c904)=>{const _0x25e617=_0x320692,_0x3d2881=this[_0x25e617(0x177)][_0x25e617(0x1e1)](_0x25c914);if(!_0x3d2881)return;const _0x19d613=this[_0x25e617(0x26f)][_0x25e617(0x1c1)](_0x3d2881[_0x25e617(0x1dc)])[_0x25e617(0x252)](_0x3d2881[_0x25e617(0x150)]);_0x3d2881[_0x25e617(0x101)][_0x25e617(0x12a)](_0x3a0481=>_0x19d613[_0x25e617(0x1db)](_0x3a0481,_0x25e617(0x25c))),this[_0x25e617(0x177)][_0x25e617(0x194)](_0x25c914),this[_0x25e617(0x177)][_0x25e617(0x247)](_0x37c904,_0x3d2881);});}async[_0x55d179(0x258)](_0x325190){const _0x3094ea=_0x55d179;this[_0x3094ea(0x1e7)][_0x3094ea(0x17d)][_0x3094ea(0x142)](_0x3094ea(0x12d))&&this[_0x3094ea(0x1e7)][_0x3094ea(0x17d)][_0x3094ea(0x1e1)](_0x3094ea(0x12d))[_0x3094ea(0x18b)](),(this[_0x3094ea(0x1e7)][_0x3094ea(0x17d)][_0x3094ea(0x1e1)](_0x3cd74b)[_0x3094ea(0x171)][_0x3094ea(0x11e)](_0x3094ea(0x102)),this[_0x3094ea(0xf7)][_0x3094ea(0x1f8)](_0x3094ea(0x222)),this[_0x3094ea(0xf7)][_0x3094ea(0x270)](!0x0),await this[_0x3094ea(0x1fa)]());try{await this[_0x3094ea(0x1a7)][_0x3094ea(0x1e9)](_0x325190)[_0x3094ea(0x1ab)](),await this[_0x3094ea(0x27a)](_0x325190),this[_0x3094ea(0x1d3)]('\x20'),await this[_0x3094ea(0x26f)][_0x3094ea(0x197)](_0x325190,this[_0x3094ea(0x140)][_0x3094ea(0x1da)]),this[_0x3094ea(0x26f)][_0x3094ea(0x22e)]()&&this[_0x3094ea(0x209)]();}catch(_0x5b2f54){this[_0x3094ea(0xf7)][_0x3094ea(0x267)]({'errorMessage':_0x2aaeb3(this[_0x3094ea(0x1e7)][_0x3094ea(0x145)],_0x3094ea(0x205)),'id':_0x325190}),this[_0x3094ea(0x210)](new _0x15792e(_0x3094ea(0x1e5),this,{'error':_0x5b2f54}));}finally{this[_0x3094ea(0xf7)][_0x3094ea(0x26b)](),this[_0x3094ea(0xf7)][_0x3094ea(0x1f8)](_0x3094ea(0x13c)),this[_0x3094ea(0xf7)][_0x3094ea(0x270)](!0x1);}}async[_0x55d179(0x1df)](){const _0x3edae8=_0x55d179,_0x5a7bd7=this[_0x3edae8(0x1a7)][_0x3edae8(0x224)](this[_0x3edae8(0x137)](),{'limit':0x1,'sortBy':_0x3edae8(0x243)});try{const _0x12f88e=await _0x5a7bd7[_0x3edae8(0x211)]();return _0x12f88e[_0x3edae8(0x178)]?_0x12f88e[0x0]['id']:_0x3edae8(0x22c);}catch(_0x319f85){return this[_0x3edae8(0xf7)][_0x3edae8(0x267)]({'errorMessage':_0x2aaeb3(this[_0x3edae8(0x1e7)][_0x3edae8(0x145)],_0x3edae8(0x205)),'id':_0x4e0318()}),this[_0x3edae8(0x210)](new _0x15792e(_0x3edae8(0x163),this,{'error':_0x319f85})),this[_0x3edae8(0xf7)][_0x3edae8(0x270)](!0x1),this[_0x3edae8(0xf7)][_0x3edae8(0x25e)](),null;}}[_0x55d179(0x271)](_0x16361c){const _0x4a695c=_0x55d179;this[_0x4a695c(0x26f)]['id']===_0x16361c&&this[_0x4a695c(0x27a)]();}[_0x55d179(0x209)](){const _0x2b2135=_0x55d179;this[_0x2b2135(0x26f)]?.[_0x2b2135(0x114)](_0x2aaeb3(this[_0x2b2135(0x1e7)][_0x2b2135(0x145)],_0x2b2135(0x14b)));}async[_0x55d179(0x1ee)](){const _0x48f11b=_0x55d179,_0x532fd5=this[_0x48f11b(0x140)][_0x48f11b(0x253)]();this[_0x48f11b(0x26f)]?.[_0x48f11b(0x124)](_0x532fd5),this[_0x48f11b(0x209)]();}[_0x55d179(0x115)](){const _0x3ac447=_0x55d179;this[_0x3ac447(0x26f)]?.[_0x3ac447(0x24b)]();}[_0x55d179(0x1f1)](){const _0x31cd3a=_0x55d179;this[_0x31cd3a(0xf7)][_0x31cd3a(0x1f1)]();}async[_0x55d179(0x16a)](){const _0x2f6aa3=_0x55d179;await this[_0x2f6aa3(0x27a)]();}async[_0x55d179(0x129)]({message:_0x5c6f89,attributes:_0x290175}){const _0x57a9c5=_0x55d179;await this[_0x57a9c5(0x162)]({'userMessage':_0x5c6f89,'attributes':_0x290175});}[_0x55d179(0x137)](){const _0x87bc2c=_0x55d179,_0x303a8d=this[_0x87bc2c(0x1e7)][_0x87bc2c(0x27e)][_0x87bc2c(0x1e1)](_0x87bc2c(0x14e));if(!_0x303a8d)throw new _0x15792e(_0x87bc2c(0x119),this);return _0x303a8d;}async[_0x55d179(0x27a)](_0x362c88){const _0x163193=_0x55d179;try{this[_0x163193(0xf7)][_0x163193(0x10b)](),await this[_0x163193(0x160)](_0x362c88);}catch(_0x165db0){this[_0x163193(0xf7)][_0x163193(0x267)]({'errorMessage':_0x2aaeb3(this[_0x163193(0x1e7)][_0x163193(0x145)],_0x163193(0x166)),'id':_0x362c88||_0x4e0318()}),console[_0x163193(0x27f)](_0x165db0),this[_0x163193(0x26f)]=void 0x0,this[_0x163193(0xf7)][_0x163193(0x25e)]();}}async[_0x55d179(0x160)](_0x48dbde){const _0x3dd803=_0x55d179;let _0x222122;this[_0x3dd803(0x1e7)][_0x3dd803(0x17d)][_0x3dd803(0x142)](_0x3dd803(0x12d))&&this[_0x3dd803(0x1e7)][_0x3dd803(0x17d)][_0x3dd803(0x1e1)](_0x3dd803(0x12d))[_0x3dd803(0x18b)](),_0x48dbde||!this[_0x3dd803(0x26f)]?_0x222122=this[_0x3dd803(0x1e7)][_0x3dd803(0x27e)][_0x3dd803(0x1e1)](_0x3dd803(0x1b4)):this[_0x3dd803(0xf7)][_0x3dd803(0x26e)]&&(_0x222122=this[_0x3dd803(0x26f)][_0x3dd803(0x170)]['id']),await this[_0x3dd803(0x1fa)]();const _0x48abe4=this[_0x3dd803(0x137)](),_0x2887a3=_0x48dbde||_0x4e0318();this[_0x3dd803(0x26f)]=new _0x1e4d8d({'connector':this[_0x3dd803(0x1a7)],'chatModels':this[_0x3dd803(0x22f)],'selectedModelId':_0x222122,'conversationId':_0x2887a3,'group':_0x48abe4,'getEditor':()=>_0x5aac2c(this[_0x3dd803(0x1e7)]),'isFromHistory':!!_0x48dbde}),this[_0x3dd803(0x26f)][_0x3dd803(0x282)](_0x3dd803(0x151),_0x3dd803(0x19c))['to'](this),this[_0x3dd803(0x26f)]['on'](_0x3dd803(0x106),(_0xdc2336,_0x380faf)=>{const _0x3d3176=_0x3dd803;this[_0x3d3176(0xf7)][_0x3d3176(0x230)](_0x380faf),this[_0x3d3176(0xf7)][_0x3d3176(0x25f)](),this[_0x3d3176(0xf7)][_0x3d3176(0x154)](),this[_0x3d3176(0xf7)][_0x3d3176(0x111)](),_0x48dbde||(this[_0x3d3176(0xf7)][_0x3d3176(0x133)](),this[_0x3d3176(0x209)]());}),this[_0x3dd803(0x26f)]['on'](_0x3dd803(0x250),(_0x58b8e4,_0x227d4e)=>{const _0x37820f=_0x3dd803;this[_0x37820f(0xf7)][_0x37820f(0x116)](_0x227d4e[_0x37820f(0x278)]);}),this[_0x3dd803(0x26f)]['on'](_0x3dd803(0x182),(_0x3cbded,_0x47ec58)=>{const _0x144bbd=_0x3dd803;this[_0x144bbd(0xf7)][_0x144bbd(0x212)](_0x47ec58);}),this[_0x3dd803(0x26f)]['on'](_0x3dd803(0x1fe),()=>{const _0x1373e2=_0x3dd803,_0x3a5cb3=this[_0x1373e2(0xf7)][_0x1373e2(0x1ac)]({'isWebSearchEnabled':!0x0,'isReasoningEnabled':!0x1});this[_0x1373e2(0xf7)][_0x1373e2(0x16d)](_0x3a5cb3);}),this[_0x3dd803(0x26f)]['on'](_0x3dd803(0x25b),()=>{const _0x92fae4=_0x3dd803,_0x2840ab=this[_0x92fae4(0xf7)][_0x92fae4(0x1ac)]({'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x0});this[_0x92fae4(0xf7)][_0x92fae4(0x16d)](_0x2840ab);}),this[_0x3dd803(0x26f)]['on'](_0x3dd803(0x1c8),(_0x149253,_0x30e2bd)=>{const _0x257b04=_0x3dd803;this[_0x257b04(0xf7)][_0x257b04(0x274)](_0x30e2bd,{'isWebSearchEnabled':!0x0,'isReasoningEnabled':!0x1});}),this[_0x3dd803(0x26f)]['on'](_0x3dd803(0x17e),(_0x4158ca,_0x292bf1)=>{const _0x4d6e99=_0x3dd803;this[_0x4d6e99(0xf7)][_0x4d6e99(0x274)](_0x292bf1,{'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x0});}),this[_0x3dd803(0x26f)]['on'](_0x3dd803(0x19c),()=>{const _0x4eb9b2=_0x3dd803;this[_0x4eb9b2(0xf7)][_0x4eb9b2(0x18f)]();}),this[_0x3dd803(0x26f)]['on'](_0x3dd803(0x235),async()=>{const _0xf1e6b0=_0x3dd803;await this[_0xf1e6b0(0xf7)][_0xf1e6b0(0x10c)]();}),this[_0x3dd803(0x26f)]['on'](_0x3dd803(0x125),(_0x57c124,_0x153496)=>{const _0x3578bc=_0x3dd803;this[_0x3578bc(0xf7)][_0x3578bc(0x1a0)](_0x153496['id']);}),this[_0x3dd803(0x26f)]['on'](_0x3dd803(0x26a),(_0x2d697d,_0x739de9,_0x1c584f)=>{const _0x3daf7f=_0x3dd803;this[_0x3daf7f(0x1d3)](_0x739de9,_0x1c584f);}),this[_0x3dd803(0x26f)]['on'](_0x3dd803(0x1e4),(_0xf18b53,_0x3f9c31)=>{const _0x4d97db=_0x3dd803;_0x4d97db(0x263)===_0x3f9c31[_0x4d97db(0x201)]?this[_0x4d97db(0xf7)][_0x4d97db(0x1bb)](_0x3f9c31):this[_0x4d97db(0xf7)][_0x4d97db(0x11b)](_0x3f9c31);}),this[_0x3dd803(0x26f)]['on'](_0x3dd803(0x1e8),async(_0x91cba6,_0xea4fe8)=>{const _0x3a67fc=_0x3dd803;await this[_0x3a67fc(0x1d9)]({'reply':_0xea4fe8});}),this[_0x3dd803(0x26f)]['on'](_0x3dd803(0x13e),(_0x239728,{reply:_0x262b4c,index:_0x3b1034,state:_0x560ad5})=>{const _0x1c2e2b=_0x3dd803;this[_0x1c2e2b(0xf7)][_0x1c2e2b(0x21b)]({'id':_0x262b4c['id'],'index':_0x3b1034,'state':_0x560ad5}),this[_0x1c2e2b(0x158)]?.[_0x1c2e2b(0x150)][_0x1c2e2b(0x1a8)](_0x262b4c['id'])&&this[_0x1c2e2b(0x158)]?.[_0x1c2e2b(0x184)]==_0x3b1034&&this[_0x1c2e2b(0x12b)]?.[_0x1c2e2b(0x254)](_0x560ad5);}),this[_0x3dd803(0x26f)]['on'](_0x3dd803(0x180),(_0x1e1783,_0x2cd8c7)=>{const _0x3ca34f=_0x3dd803;if(this[_0x3ca34f(0xf7)][_0x3ca34f(0x185)](_0x2cd8c7[_0x3ca34f(0x1eb)],_0x2cd8c7[_0x3ca34f(0x14d)]),_0x3ca34f(0x120)===_0x2cd8c7[_0x3ca34f(0x1eb)][_0x3ca34f(0x201)]){const _0x20009e=[..._0x5aac2c(this[_0x3ca34f(0x1e7)])[_0x3ca34f(0x244)][_0x3ca34f(0x1aa)][_0x3ca34f(0x120)][_0x3ca34f(0x139)]()];this[_0x3ca34f(0x140)][_0x3ca34f(0x15f)](_0x20009e,_0x3ca34f(0x234)+this[_0x3ca34f(0x26f)]?.['id']);}}),this[_0x3dd803(0x26f)]['on'](_0x3dd803(0x1d6),(_0x3951fc,_0x32eccb)=>{const _0x540778=_0x3dd803;this[_0x540778(0xf7)][_0x540778(0x173)](_0x32eccb[_0x540778(0x255)]),_0x540778(0x15c)==_0x32eccb[_0x540778(0x255)]&&this[_0x540778(0x115)](),_0x540778(0x120)===_0x32eccb[_0x540778(0x201)]&&this[_0x540778(0x140)][_0x540778(0x17b)](_0x540778(0x234)+this[_0x540778(0x26f)]?.['id']);}),this[_0x3dd803(0x26f)]['on'](_0x3dd803(0x1ce),(_0xdaa874,_0x56b31d)=>{const _0x38a582=_0x3dd803;this[_0x38a582(0xf7)][_0x38a582(0x18c)](_0x56b31d[_0x38a582(0x1eb)][_0x38a582(0x255)],_0x56b31d[_0x38a582(0x14d)]);}),this[_0x3dd803(0x26f)]['on'](_0x3dd803(0x1bc),(_0x2452dd,_0x2d4acd)=>{const _0x10a82b=_0x3dd803;this[_0x10a82b(0xf7)][_0x10a82b(0x1e2)](_0x2d4acd[_0x10a82b(0x1f4)]);}),this[_0x3dd803(0x26f)]['on'](_0x3dd803(0x13f),(_0x2e86a7,_0x54a7ad)=>{const _0x4dfd30=_0x3dd803;this[_0x4dfd30(0xf7)][_0x4dfd30(0xfa)](_0x54a7ad[_0x4dfd30(0x192)]);}),this[_0x3dd803(0x26f)]['on'](_0x3dd803(0x213),(_0x8ce64e,_0x533e93)=>{const _0x4f428d=_0x3dd803;this[_0x4f428d(0xf7)][_0x4f428d(0x141)](_0x533e93[_0x4f428d(0x22d)],_0x533e93[_0x4f428d(0x259)],_0x533e93[_0x4f428d(0x15b)],_0x533e93[_0x4f428d(0x246)]);}),this[_0x3dd803(0x26f)]['on'](_0x3dd803(0x25d),(_0x16c267,_0x91c48e)=>{const _0x5e5732=_0x3dd803;this[_0x5e5732(0xf7)][_0x5e5732(0x168)](_0x91c48e[_0x5e5732(0x22d)],_0x91c48e[_0x5e5732(0x265)],_0x91c48e[_0x5e5732(0x107)]);}),this[_0x3dd803(0x26f)]['on'](_0x3dd803(0x1c6),(_0x18b3ef,_0x47561e)=>{const _0x421cad=_0x3dd803;this[_0x421cad(0xf7)][_0x421cad(0x203)](_0x47561e);}),this[_0x3dd803(0x26f)]['on'](_0x3dd803(0x1f3),async(_0x14a27c,_0x56d675)=>{const _0x377a72=_0x3dd803,_0x31541b=(await this[_0x377a72(0x22f)][_0x377a72(0x16f)]())[_0x377a72(0x17c)](_0x1a87d8=>_0x1a87d8['id']===_0x56d675[_0x377a72(0x170)]?.['id'])||null;this[_0x377a72(0xf7)][_0x377a72(0x1c0)](_0x31541b,_0x56d675[_0x377a72(0x1f6)]);}),this[_0x3dd803(0x26f)]['on'](_0x3dd803(0x27f),(_0x2b2b39,{error:_0xdf9b19,interactionId:_0x18e8e6,fileName:_0x47986a,url:_0x4de841,sourceId:_0x301dac,sourceLabel:_0x1f040d})=>{const _0x7c3cdd=_0x3dd803,_0x1ea7a1=_0x18e8e6?_0x18e8e6+':'+_0x4e0318():_0x4e0318();_0xdf9b19[_0x7c3cdd(0x21e)][_0x7c3cdd(0x14f)](_0x7c3cdd(0x1d1))?this[_0x7c3cdd(0xf7)][_0x7c3cdd(0x126)]({'staticMessage':_0x2aaeb3(this[_0x7c3cdd(0x1e7)][_0x7c3cdd(0x145)],_0x7c3cdd(0x1af)),'id':_0x1ea7a1}):_0xdf9b19[_0x7c3cdd(0x21e)][_0x7c3cdd(0x14f)](_0x7c3cdd(0x163))||_0xdf9b19[_0x7c3cdd(0x21e)][_0x7c3cdd(0x14f)](_0x7c3cdd(0x109))?(this[_0x7c3cdd(0xf7)][_0x7c3cdd(0x267)]({'errorMessage':_0x2aaeb3(this[_0x7c3cdd(0x1e7)][_0x7c3cdd(0x145)],_0x7c3cdd(0x166)),'id':_0x1ea7a1}),this[_0x7c3cdd(0x210)](_0xdf9b19)):_0xdf9b19[_0x7c3cdd(0x21e)][_0x7c3cdd(0x14f)](_0x7c3cdd(0x200))?this[_0x7c3cdd(0xf7)][_0x7c3cdd(0x267)]({'errorMessage':_0x2aaeb3(this[_0x7c3cdd(0x1e7)][_0x7c3cdd(0x145)],_0x7c3cdd(0x1c2),_0x47986a),'id':_0x1ea7a1}):_0xdf9b19[_0x7c3cdd(0x21e)][_0x7c3cdd(0x14f)](_0x7c3cdd(0x15e))?this[_0x7c3cdd(0xf7)][_0x7c3cdd(0x267)]({'errorMessage':_0x2aaeb3(this[_0x7c3cdd(0x1e7)][_0x7c3cdd(0x145)],_0x7c3cdd(0x18e),_0x4de841),'id':_0x1ea7a1}):_0xdf9b19[_0x7c3cdd(0x21e)][_0x7c3cdd(0x14f)](_0x7c3cdd(0x118))?this[_0x7c3cdd(0xf7)][_0x7c3cdd(0x267)]({'errorMessage':_0x2aaeb3(this[_0x7c3cdd(0x1e7)][_0x7c3cdd(0x145)],_0x7c3cdd(0x1bf)),'id':_0x1ea7a1}):_0xdf9b19[_0x7c3cdd(0x21e)][_0x7c3cdd(0x14f)](_0x7c3cdd(0x161))?this[_0x7c3cdd(0xf7)][_0x7c3cdd(0x267)]({'errorMessage':_0x2aaeb3(this[_0x7c3cdd(0x1e7)][_0x7c3cdd(0x145)],_0x7c3cdd(0x245)),'id':_0x1ea7a1}):_0xdf9b19[_0x7c3cdd(0x21e)][_0x7c3cdd(0x14f)](_0x7c3cdd(0x19f))?(_0x301dac&&this[_0x7c3cdd(0xf7)][_0x7c3cdd(0x117)](_0x301dac),this[_0x7c3cdd(0xf7)][_0x7c3cdd(0x267)]({'errorMessage':_0x2aaeb3(this[_0x7c3cdd(0x1e7)][_0x7c3cdd(0x145)],_0x7c3cdd(0x23a),_0x1f040d||_0x7c3cdd(0x259)),'id':_0x1ea7a1}),this[_0x7c3cdd(0x210)](_0xdf9b19)):_0xdf9b19[_0x7c3cdd(0x21e)][_0x7c3cdd(0x14f)](_0x7c3cdd(0x1cb))?(this[_0x7c3cdd(0xf7)][_0x7c3cdd(0x267)]({'errorMessage':_0x2aaeb3(this[_0x7c3cdd(0x1e7)][_0x7c3cdd(0x145)],_0x7c3cdd(0x12e)),'id':_0x1ea7a1}),this[_0x7c3cdd(0x210)](_0xdf9b19)):_0xdf9b19[_0x7c3cdd(0x21e)][_0x7c3cdd(0x14f)](_0x7c3cdd(0x266))?(this[_0x7c3cdd(0xf7)][_0x7c3cdd(0x267)]({'errorMessage':_0x2aaeb3(this[_0x7c3cdd(0x1e7)][_0x7c3cdd(0x145)],_0x7c3cdd(0x18a)),'id':_0x1ea7a1}),this[_0x7c3cdd(0x210)](_0xdf9b19)):_0xdf9b19[_0x7c3cdd(0x21e)][_0x7c3cdd(0x14f)](_0x7c3cdd(0x202))?(this[_0x7c3cdd(0xf7)][_0x7c3cdd(0x267)]({'errorMessage':_0x2aaeb3(this[_0x7c3cdd(0x1e7)][_0x7c3cdd(0x145)],_0x7c3cdd(0x1f0)),'id':_0x1ea7a1}),this[_0x7c3cdd(0x210)](_0xdf9b19)):_0xdf9b19[_0x7c3cdd(0x21e)][_0x7c3cdd(0x14f)](_0x7c3cdd(0x187))?(this[_0x7c3cdd(0xf7)][_0x7c3cdd(0x267)]({'errorMessage':_0x2aaeb3(this[_0x7c3cdd(0x1e7)][_0x7c3cdd(0x145)],_0x7c3cdd(0xff)),'id':_0x1ea7a1}),this[_0x7c3cdd(0x210)](_0xdf9b19)):_0xdf9b19[_0x7c3cdd(0x21e)][_0x7c3cdd(0x14f)](_0x7c3cdd(0xf6))?(this[_0x7c3cdd(0xf7)][_0x7c3cdd(0x267)]({'errorMessage':_0x2aaeb3(this[_0x7c3cdd(0x1e7)][_0x7c3cdd(0x145)],_0x7c3cdd(0x215)),'id':_0x1ea7a1}),this[_0x7c3cdd(0x210)](_0xdf9b19)):_0xdf9b19[_0x7c3cdd(0x21e)][_0x7c3cdd(0x14f)](_0x7c3cdd(0x153))?(this[_0x7c3cdd(0xf7)][_0x7c3cdd(0x267)]({'errorMessage':_0x2aaeb3(this[_0x7c3cdd(0x1e7)][_0x7c3cdd(0x145)],_0x7c3cdd(0xfd)),'id':_0x1ea7a1}),this[_0x7c3cdd(0x210)](_0xdf9b19)):(this[_0x7c3cdd(0xf7)][_0x7c3cdd(0x267)]({'errorMessage':_0x2aaeb3(this[_0x7c3cdd(0x1e7)][_0x7c3cdd(0x145)],_0x7c3cdd(0x23c)),'id':_0x1ea7a1}),this[_0x7c3cdd(0x210)](_0xdf9b19));}),await this[_0x3dd803(0x26f)][_0x3dd803(0x179)](this[_0x3dd803(0x1e7)][_0x3dd803(0x27e)][_0x3dd803(0x1e1)](_0x3dd803(0x1ba))),_0x48dbde||await this[_0x3dd803(0x26f)][_0x3dd803(0x276)]();}async[_0x55d179(0x162)]({userMessage:_0x4778ae,attributes:_0x43ddc9}){const _0x25cb13=_0x55d179;if(!this[_0x25cb13(0x26f)])throw new _0x15792e(_0x25cb13(0x1a9));if(this[_0x25cb13(0x26f)][_0x25cb13(0x1ed)]()){const _0x54cdb5=await this[_0x25cb13(0x140)][_0x25cb13(0x219)]();await this[_0x25cb13(0x26f)][_0x25cb13(0x122)](_0x54cdb5);}this[_0x25cb13(0x26f)]['id']&&this[_0x25cb13(0x26f)][_0x25cb13(0xf5)]&&await this[_0x25cb13(0x26f)][_0x25cb13(0x198)]({'userMessage':_0x4778ae,'attributes':_0x43ddc9});}[_0x55d179(0x19d)](){const _0x4003ca=_0x55d179;console[_0x4003ca(0x1b2)](_0x4003ca(0x1b9));}[_0x55d179(0x1f9)](_0x15d786){const _0x57f015=_0x55d179;this[_0x57f015(0xf7)][_0x57f015(0x1c4)](_0x15d786);}[_0x55d179(0x210)](_0xd5c84c){const _0x5b9473=_0x55d179;_0x419030(_0xd5c84c[_0x5b9473(0x21e)]);}[_0x55d179(0x240)](_0x27d2f9){const _0x533cec=_0x55d179;this[_0x533cec(0x26f)]?.[_0x533cec(0x11d)](_0x27d2f9);}[_0x55d179(0x169)](){const _0x42977c=_0x55d179;this[_0x42977c(0x26f)]?.[_0x42977c(0x208)]();}[_0x55d179(0x18d)](){const _0x578e7a=_0x55d179;this[_0x578e7a(0x26f)]?.[_0x578e7a(0x242)]();}[_0x55d179(0x14c)](_0x3cb50a){const _0x205b94=_0x55d179,[_0x3f7e53,_0x50b01c]=_0x3cb50a[_0x205b94(0x1e3)](':'),_0x1331b2=this[_0x205b94(0x26f)][_0x205b94(0x1c1)](_0x3f7e53),_0xe28887=_0x1331b2[_0x205b94(0x252)](_0x50b01c);return{'interaction':_0x1331b2,'reply':_0xe28887};}[_0x55d179(0xfb)](_0x2bc480,_0x2cf551=!0x1){const _0x427208=_0x55d179,_0x1287a2=_0x5aac2c(this[_0x427208(0x1e7)]),_0xe10e26={'target':_0x1287a2[_0x427208(0x1b6)][_0x427208(0x171)][_0x427208(0x1a4)][_0x427208(0x1fd)](_0x1287a2[_0x427208(0x1b6)][_0x427208(0x16e)][_0x427208(0x13d)](_0x2bc480)),'viewportOffset':{'top':0x96,'left':0x0,'bottom':0x32,'right':0x0},'ancestorOffset':0x14,'alignToTop':_0x2cf551};_0x2cf551&&(_0xe10e26[_0x427208(0x225)]=!0x0),_0x2bcda0(_0xe10e26);}[_0x55d179(0x1d3)](_0x13c623,_0x3a7d49=!0x1){const _0x37bf79=_0x55d179;this[_0x37bf79(0xf7)][_0x37bf79(0x26a)](_0x13c623||_0x2aaeb3(this[_0x37bf79(0x1e7)][_0x37bf79(0x145)],_0x37bf79(0x1b8)),_0x3a7d49);}async[_0x55d179(0x1d9)]({reply:_0x4da3bb,renderingStrategy:_0x5169bf}){const _0x2448d1=_0x55d179,{id:_0x31de91,interactionId:_0xca75ab,isDone:_0x724dff,type:_0x384f20,parsedContent:_0x345991}=_0x4da3bb,_0x384986=_0xca75ab+':'+_0x31de91;if(_0x2448d1(0x1bd)===_0x384f20){const _0x1a67d7=_0x4da3bb[_0x2448d1(0x112)]({'showDiff':this[_0x2448d1(0xf7)][_0x2448d1(0x1be)]});await this[_0x2448d1(0xf7)][_0x2448d1(0x207)]({'id':_0x384986,'parts':_0x1a67d7,'renderingStrategy':_0x5169bf,'isDone':_0x724dff});}else _0x2448d1(0x263)===_0x384f20&&await this[_0x2448d1(0xf7)][_0x2448d1(0x24d)]({'id':_0x384986,'parsedContent':_0x345991,'renderingStrategy':_0x5169bf,'isDone':_0x724dff});_0x724dff&&_0x4da3bb[_0x2448d1(0x20e)][_0x2448d1(0x178)]>0x0&&this[_0x2448d1(0xf7)][_0x2448d1(0x195)](_0x384986,_0x4da3bb[_0x2448d1(0x20e)]);}async[_0x55d179(0x1fa)](){const _0x3a6987=_0x55d179,_0x414699=this[_0x3a6987(0x26f)]?.[_0x3a6987(0x27d)];_0x414699&&(_0x414699[_0x3a6987(0x223)](),this[_0x3a6987(0xf7)][_0x3a6987(0x21d)](_0x414699));}async[_0x55d179(0x1c5)](){const _0x5c149f=_0x55d179,_0x1259f6=this[_0x5c149f(0x26f)]?.[_0x5c149f(0x27d)];if(_0x1259f6){for await(const _0xac658b of _0x1259f6[_0x5c149f(0x1d4)])await this[_0x5c149f(0x1d9)]({'reply':_0xac658b,'renderingStrategy':_0x5c149f(0x222)});}}[_0x55d179(0x159)](_0x1e2401){const _0x463f46=_0x55d179,_0x1837b5={'positiveCount':_0x1e2401[_0x463f46(0x22a)][_0x463f46(0x233)](_0x591c8b=>_0x463f46(0x25c)===_0x591c8b[_0x463f46(0x20c)])[_0x463f46(0x178)],'totalCount':_0x1e2401[_0x463f46(0x22a)][_0x463f46(0x178)],'modificationId':_0x1e2401['id']},_0x23a243=this[_0x463f46(0x26f)][_0x463f46(0x1c1)](_0x1e2401[_0x463f46(0x1dc)])[_0x463f46(0x26d)];_0x23a243&&this[_0x463f46(0x1a7)][_0x463f46(0x11f)](this[_0x463f46(0x26f)]['id'],_0x23a243,_0x1837b5);}[_0x55d179(0x232)](_0x19febd){const _0xf612f6=_0x55d179;let _0x1e83c6=null,_0x3b91eb=null;this['on'](_0xf612f6(0x151),(_0x56efbb,_0x275ffa,_0x37bfb8)=>{const _0x58c384=_0xf612f6;_0x37bfb8['id']!==_0x1e83c6&&(_0x1e83c6=_0x37bfb8['id'],_0x3b91eb=this[_0x58c384(0x21c)](_0x37bfb8)),_0x19febd(_0x275ffa,_0x3b91eb);});}[_0x55d179(0x21c)](_0x2a7f58){const _0xb8638=_0x55d179,_0x37d192=this[_0xb8638(0xf7)],_0x2d57cd=()=>{const _0x313d7c=_0xb8638;_0x2a7f58[_0x313d7c(0x257)](),_0x2a7f58[_0x313d7c(0x1a1)](),_0x37d192[_0x313d7c(0x1dd)]();},_0xab5c1=()=>{const _0x4f78c2=_0xb8638;_0x2a7f58[_0x4f78c2(0x16c)]&&(_0x2a7f58[_0x4f78c2(0x16c)][_0x4f78c2(0x148)](),_0x2a7f58[_0x4f78c2(0x16c)]=void 0x0);};return{'insertTextReply':(_0x22875b,_0x1c8a60)=>{const _0x3dbf44=_0xb8638;_0xab5c1(),_0x2d57cd();const _0x3a0887=_0x2a7f58[_0x3dbf44(0x16c)]=_0x2a7f58[_0x3dbf44(0x1a3)]({'type':_0x3dbf44(0x263),'interactionId':_0x2a7f58['id'],'content':_0x22875b,'id':_0x1c8a60||_0x4e0318()});return _0xab5c1(),_0x3a0887;},'insertCustomElement':async(_0x2c3880,_0x130af4)=>(_0xab5c1(),_0x2d57cd(),_0x37d192[_0xb8638(0x149)](_0x2c3880,_0x130af4||_0x4e0318())),'setLoadingMessage':_0x584557=>{const _0x15706f=_0xb8638;_0x37d192[_0x15706f(0x16d)](_0x584557);},'clearLoadingMessage':()=>{const _0xb38146=_0xb8638;_0x37d192[_0xb38146(0x1dd)]();}};}}
23
+ const _0x5445bf=_0x2146;(function(_0x1edd6d,_0x289f68){const _0x29ec1a=_0x2146,_0x24b769=_0x1edd6d();while(!![]){try{const _0x2515d8=-parseInt(_0x29ec1a(0x1e5))/0x1+-parseInt(_0x29ec1a(0x1d7))/0x2+-parseInt(_0x29ec1a(0x2b2))/0x3+-parseInt(_0x29ec1a(0x2ad))/0x4*(parseInt(_0x29ec1a(0x255))/0x5)+parseInt(_0x29ec1a(0x2ab))/0x6+parseInt(_0x29ec1a(0x1e8))/0x7+parseInt(_0x29ec1a(0x24c))/0x8;if(_0x2515d8===_0x289f68)break;else _0x24b769['push'](_0x24b769['shift']());}catch(_0x8fef1c){_0x24b769['push'](_0x24b769['shift']());}}}(_0x41bf,0x33bd9));import{ContextPlugin as _0x4c1f5f,Editor as _0xa6309}from'ckeditor5/src/core.js';import{BodyCollection as _0x1a2c57}from'ckeditor5/src/ui.js';import{CKEditorError as _0x37642f,logError as _0x32f4ac,scrollViewportToShowTarget as _0x2cdfe0,uid as _0xafb963}from'ckeditor5/src/utils.js';function _0x41bf(){const _0x285269=['ai-chat-context-form-data-size-limits-exceeded','removeSelectionFromChatContext','get','children','config','handleRemovedConversation','handleUserInteraction','ai.models.defaultModelId','clearConversationContextUI','indexes','AI_CHAT_CONTEXT_INVALID_DATA','showChangeInText','partIndex','conversationInitialized','_getPresentableSiblingContentPartIndex','setFeedItemRenderingStrategy','ai-chat-conversation-not-found','_bodyCollection','$graveyard','_aiChatUi','main','applySuggestion','rejected','prepareLoadingMessage','focusPromptInput','AI_CHAT_CONTEXT_UNABLE_TO_UPLOAD_URL','sourceResourcesLoaded','interactionDestroyed','_logError','setSelectedModel','applyOperation','addCurrentDocumentToContext','replyChangeGroupStateUpdated','change','stop','ai-chat-invalid-request','getConversation','removeSelectionFromContext','find','getPath','getTransformedByOperation','getChildAtOffset','batch','message','areActionsDisabled','updateFeedItemAIReplySources','collaboration.channelId','resetMessageInput','finishInteraction','_insertSuggestion','index','_rejectSuggestion','activeConversation','isPremiumPlugin','setModel','AI_CHAT_ABORTED_MESSAGE','ai-chat-conversation-start-failed','filter','contextItemAdded','mouseOverSuggestion','data','AI_CHAT_UNABLE_TO_LOAD_CONVERSATION','_aiChatBalloon','rootName','ai-chat-context-file-too-large','getDiff','howMany','next','history','ai.chat.context','accepted','setIsUploadInProgress','domConverter','getGroupId','createRange','range','capabilitiesUpdated','_showConversationHistory','uid','ai-request-aborted','Undo','callback','AI_CHAT_CONTEXT_UNABLE_TO_LOAD_RESOURCES','ai-chat-source-resources-load-failed','forEach','aiChatBalloon','closeSourceResourceBalloon','ai-chat-controller-mouse-over','type','delete','dislike','getInteractionAndReplyById','webSearchStarted','cloneNode','_stopLastInteraction','updateContent','static','contextItemRemoved','editors','_openBalloonFor','getInteraction','AIChatBalloon','populateSourceResourceBalloon','startsWith','log','version','like','getConversations','toggleReasoning','Showing\x20conversation\x20history...','getRanges','ai-chat-context-unsupported-type','sourceId','resourceStateChanged','createdAt','contextSent','addFeedItemUserMessage','query','root','_toggleReasoning','fetchConversation','createConversation','updateResourceState','createReply','loadConversation','context','node','modelSelected','addFeedItemStaticMessage','close','updateConversationTitle','AI_CHAT_UNABLE_TO_START_CONVERSATION','isOfficialPlugin','clearLoadingMessage','toggleWebSearch','ai-chat-resource-load-failed','_batchToChanges','ai-chat-context-invalid-data','addFeedItemAIReply','sendUserMessage','setContextItemLoading','model','updateCapabilities','reasoningFinished','_getAIChatInteractionAPI','length','getDocumentContext','isDisabled','changes','webSearchFinished','_aiChatModels','currentReply','sources','_registerToolDataCallback','AIChatUI','outdated','AI_CHAT_CONTEXT_UNSUPPORTED_TYPE','AI_CHAT_CONTEXT_CURRENT_DOCUMENT','addContextOptionsChanged','530446BqAMXK','removeFromContext','enableControls','source','addUrlToContext','updateFeedItemAIReplySuggestionPartState','load','_updateRatings','showPrevious','AI_BALLOON_HEADER_TITLE','getSelectionText','getAttribute','contextItemLoadingEnded','toggleSuggestionDisplayMode','339703SKLuiL','findIndex','detachFromDom','2481255JoeTWX','open','_flushLastInteractionUI','maxOffset','_getUserPresentableContentPartDocumentRange','editing','plugins','interactionStarted','sourcePosition','scrollFeedToSuggestion','done','toViewRange','toString','loadSourceResources','clearPendingContextUI','resizedTabs','showFakeVisualSelection','ai-chat-file-upload-failed','streaming','_startConversationSafely','stopInteraction','updateCurrentDocumentInContext','ai-chat-context-unsupported-file-type','contextItems','isLoading','setIsMaximized','remove','addOperation','ready','options','push','_handleStartConversation','isModelAvailable','isCurrentDocumentInConversation','AI_CHAT_CONTEXT_UNSUPPORTED_FILE_TYPE','listenTo','revert','addCurrentDocumentToChatContext','new','Liked\x20response','resetConversationTitle','toolDataReceived','start','setConversationTitle','anchorId','dialogClosed','getReply','_updateReplyContent','slice','lastInteraction','modification','replies','AI_CHAT_CONTEXT_UNABLE_TO_UPLOAD_FILE','disableControls','nextSibling','ai-no-track-changes','uiId','Disliked\x20response','addDocumentToContext','AIEditing','split','ai-chat-url-upload-failed','resource','AI_CHAT_CONTEXT_FORM_DATA_SIZE_LIMITS_EXCEEDED','addSelectionToContext','destroy','parse','pending','isUploadInProgress','selection','insertSuggestion','redo','from','AI_CHAT_UNTITLED_CONVERSATION','getDocumentData','state','chat','_setIsMaximized','lastCreated','showNext','activateTab','addFeedItemCustomElement','AI_CHAT_INVALID_REQUEST','ai.models','fetchConversations','_getDocumentRangeForReplyChanges','afterInit','mapper','createPositionAt','rejectSuggestion','addFilesToContext','setConversationContext','AI_CHAT_RESOURCE_LOAD_FAILED','showDiff','_getLastCreatedConversationId','getAll','baseVersion','AITabs','resourceId','AI_CHAT_CONTEXT_FILE_TOO_LARGE','7740760FrmJCa','TrackChanges','uploadProgressChanged','removeFeedInteraction','isStarted','bind','startInteraction','has','updateFeedItemAIReplySuggestionContent','5uWzbeW','resources','ai-chat-controller-no-active-conversation','replyId','ai-chat-missing-channel-id','toggleLoadingSkeleton','changeGroups','selectModel','TrackChangesEditing','reasoningStarted','_currentPreviewedChangeGroup','setState','viewRangeToDom','abortPromptStream','includes','setFeedItemAIReplySuggestionPartActive','getOperations','undo','selectedModel','_aiConnector','set','setChangeGroupState','delegate','resize','resetWebSearchState','AIConnector','map','init','upsertAIChatRating','ai.chat.initialConversation','_aiEditing','DocumentCompare','contextItem','sendMessage','executeCustomItemCallback','hideFakeVisualSelection','AIChatController','removeContextItem','resetReasoningState','addResourceToContext','ai-conversation-','_applyOperationsAsSuggestions','end','path','ai-chat-context-file-too-many-pages','requires','error','attachToDom','startAutoScroll','setAddContextOptions','interactionFinished','ai-chat-conversation-init-failed','marker','hasChanges','locale','view','text','unshift','add','commands','isDocumentOperation','previous','AI_CHAT_GENERIC_ERROR','addFileToContext','interactionCreated','data-id','_scrollToSuggestionRange','messageId','addFeedItemAISuggestion','isInContext','_integrateEditor','_applySuggestion','addContextItem','alignToTop','_aiChatBalloonShowDiff','_handleUIUserMessage','getFirstRange','_toggleWebSearch','pluginName','resizeTabs','replyContentUpdated','interactionId','getChild','removed','createPositionFromPath','AI_CHAT_CONTEXT_FILE_TOO_MANY_PAGES','535398iWICFo','content','1592356HxSftW','isCurrentDocumentInContext','addFeedItemError','addSelectionToChatContext','startConversation','589047zVzCfM','document','_createFromRanges','addFeedInteractionHeader','getChildren','getRoot','getContentParts','indexOf','sessionId','setLoadingMessage','current-document','_removeFromContext','documentContextContent','replyCreated','updateFeedItemAIReplyContent','mouseLeaveSuggestion'];_0x41bf=function(){return _0x285269;};return _0x41bf();}import{AIConnector as _0x134032}from'../aicore/aiconnector.js';import{AITabs as _0x3608de}from'../aitabs/aitabs.js';import{AIChatConversation as _0x5eeb0c}from'./model/aichatconversation.js';import{getTranslation as _0x130df6}from'../aicore/utils/common-translations.js';import{AIModels as _0x10fadd}from'../aicore/model/aimodels.js';import{getEditorFromContext as _0x1cd8a8}from'../aicore/utils/geteditorfromcontext.js';import{DocumentCompare as _0x2dafad,DATA_ID_MODEL_ATTRIBUTE as _0x4e7f6b}from'ckeditor5-collaboration/src/collaboration-core.js';import{fixMarkerOperationOldRange as _0x56c479,getOperationsFromReply as _0x2de689}from'../aicore/utils/getoperationsfromreply.js';import{expandSelectionWithContext as _0x4341ca,getMinimalSelection as _0x591691}from'../aicore/utils/getsuggestionpartsfromreply.js';function _0x2146(_0x152081,_0x85cccf){const _0x41bf5d=_0x41bf();return _0x2146=function(_0x2146c3,_0xd3aaaf){_0x2146c3=_0x2146c3-0x1d6;let _0x19f801=_0x41bf5d[_0x2146c3];return _0x19f801;},_0x2146(_0x152081,_0x85cccf);}import{ModelRange as _0x7d7dfd,_DetachOperation as _0x21ef70}from'ckeditor5/src/engine.js';import{findOne as _0x11fefc,getAttribute as _0x4280bc,serialize as _0x2b61cd,Document as _0x1d4d3c,findByAttribute as _0x183569}from'../aicore/utils/htmlparser.js';export class AIChatController extends _0x4c1f5f{[_0x5445bf(0x273)];[_0x5445bf(0x268)];[_0x5445bf(0x2d5)];[_0x5445bf(0x358)];[_0x5445bf(0x300)];[_0x5445bf(0x34a)]=new Map();[_0x5445bf(0x25f)]=null;[_0x5445bf(0x2d3)];static get[_0x5445bf(0x282)](){return[_0x134032,_0x2dafad];}static get[_0x5445bf(0x2a3)](){const _0x1bc913=_0x5445bf;return _0x1bc913(0x279);}static get[_0x5445bf(0x346)](){return!0x0;}static get[_0x5445bf(0x2f7)](){return!0x0;}[_0x5445bf(0x270)](){const _0x7a8a69=_0x5445bf;this[_0x7a8a69(0x2d3)]=new _0x1a2c57(this[_0x7a8a69(0x33f)][_0x7a8a69(0x28b)]),this[_0x7a8a69(0x2d3)][_0x7a8a69(0x284)](),this[_0x7a8a69(0x268)]=this[_0x7a8a69(0x33f)][_0x7a8a69(0x1ee)][_0x7a8a69(0x2c4)](_0x7a8a69(0x26e)),this[_0x7a8a69(0x2d5)]=this[_0x7a8a69(0x33f)][_0x7a8a69(0x1ee)][_0x7a8a69(0x2c4)](_0x7a8a69(0x35c)),this[_0x7a8a69(0x273)]=this[_0x7a8a69(0x33f)][_0x7a8a69(0x1ee)][_0x7a8a69(0x2c4)](_0x7a8a69(0x223)),this[_0x7a8a69(0x358)]=new _0x10fadd({'connector':this[_0x7a8a69(0x268)],'config':this[_0x7a8a69(0x33f)][_0x7a8a69(0x2c6)][_0x7a8a69(0x2c4)](_0x7a8a69(0x23b)),'locale':this[_0x7a8a69(0x33f)][_0x7a8a69(0x28b)]});const _0x446b1a=this[_0x7a8a69(0x33f)][_0x7a8a69(0x1ee)][_0x7a8a69(0x2c4)](_0x7a8a69(0x249));this[_0x7a8a69(0x20b)](this[_0x7a8a69(0x2d5)],_0x7a8a69(0x2b1),()=>{const _0x3e2b68=_0x7a8a69;this[_0x3e2b68(0x1fb)]();}),this[_0x7a8a69(0x20b)](this[_0x7a8a69(0x2d5)],_0x7a8a69(0x34d),(_0x6434cd,_0x549643)=>{const _0xdd29e7=_0x7a8a69;this[_0xdd29e7(0x2a0)]({'userMessage':_0x549643});}),this[_0x7a8a69(0x20b)](_0x446b1a,_0x7a8a69(0x1f7),(_0x5a82c5,_0x4799c2)=>{const _0x2fac8a=_0x7a8a69;this[_0x2fac8a(0x235)](_0x4799c2);}),this[_0x7a8a69(0x20b)](this[_0x7a8a69(0x2d5)],_0x7a8a69(0x2a4),()=>{const _0x9c1e24=_0x7a8a69;_0x446b1a[_0x9c1e24(0x26c)]();}),this[_0x7a8a69(0x20b)](this[_0x7a8a69(0x2d5)],_0x7a8a69(0x262),async()=>{const _0x5f4478=_0x7a8a69;await this[_0x5f4478(0x320)](),await this[_0x5f4478(0x1ea)](),this[_0x5f4478(0x2c3)]();}),this[_0x7a8a69(0x20b)](this[_0x7a8a69(0x2d5)],_0x7a8a69(0x222),()=>{const _0x2089b9=_0x7a8a69;this[_0x2089b9(0x20d)]();}),this[_0x7a8a69(0x20b)](this[_0x7a8a69(0x2d5)],_0x7a8a69(0x294),(_0x547721,_0x2a2762)=>{const _0x14a781=_0x7a8a69;this[_0x14a781(0x2f6)]?.[_0x14a781(0x242)](Array[_0x14a781(0x230)](_0x2a2762));}),this[_0x7a8a69(0x20b)](this[_0x7a8a69(0x2d5)],_0x7a8a69(0x1db),(_0x230acd,_0x27d9fe)=>{const _0x2995e7=_0x7a8a69;this[_0x2995e7(0x2f6)]?.[_0x2995e7(0x1db)](_0x27d9fe);}),this[_0x7a8a69(0x20b)](this[_0x7a8a69(0x2d5)],_0x7a8a69(0x277),(_0x30dedd,_0x59ec4a)=>{const _0x3a8cb4=_0x7a8a69;_0x59ec4a[_0x3a8cb4(0x313)](this[_0x3a8cb4(0x33f)]);}),this[_0x7a8a69(0x20b)](this[_0x7a8a69(0x2d5)],_0x7a8a69(0x27c),(_0x50b055,_0x3e3b93)=>{const _0x9422af=_0x7a8a69;this[_0x9422af(0x2f6)]?.[_0x9422af(0x27c)](_0x3e3b93[_0x9422af(0x1da)],_0x3e3b93[_0x9422af(0x226)]);}),this[_0x7a8a69(0x20b)](this[_0x7a8a69(0x2d5)],_0x7a8a69(0x27a),(_0x202090,_0xb5131b)=>{const _0xced8f8=_0x7a8a69;this[_0xced8f8(0x2bd)](_0xb5131b);}),this[_0x7a8a69(0x20b)](this[_0x7a8a69(0x2d5)],_0x7a8a69(0x1f5),(_0x582c75,_0x572e3c)=>{const _0xd66d66=_0x7a8a69;this[_0xd66d66(0x2f6)]?.[_0xd66d66(0x1f5)](_0x572e3c[_0xd66d66(0x332)],_0x572e3c[_0xd66d66(0x337)],_0x572e3c[_0xd66d66(0x310)]);}),this[_0x7a8a69(0x20b)](this[_0x7a8a69(0x2d5)],_0x7a8a69(0x348),()=>{const _0x5ad86f=_0x7a8a69;this[_0x5ad86f(0x2a2)]();}),this[_0x7a8a69(0x20b)](this[_0x7a8a69(0x2d5)],_0x7a8a69(0x32e),()=>{const _0x20b5f9=_0x7a8a69;this[_0x20b5f9(0x339)]();}),this[_0x7a8a69(0x20b)](this[_0x7a8a69(0x2d5)],_0x7a8a69(0x25c),(_0xfab047,_0x2714ae)=>{const _0x46c1a1=_0x7a8a69;this[_0x46c1a1(0x2f6)]?.[_0x46c1a1(0x2f8)](_0x2714ae);}),this[_0x7a8a69(0x20b)](this[_0x7a8a69(0x2d5)],_0x7a8a69(0x32c),(_0x35dfe6,{replyId:_0x492f2c})=>{const _0x17d017=_0x7a8a69;console[_0x17d017(0x32a)](_0x17d017(0x20f),_0x492f2c);}),this[_0x7a8a69(0x20b)](this[_0x7a8a69(0x2d5)],_0x7a8a69(0x31c),(_0x21815c,{replyId:_0xad8fd5})=>{const _0x543ab1=_0x7a8a69;console[_0x543ab1(0x32a)](_0x543ab1(0x221),_0xad8fd5);}),this[_0x7a8a69(0x20b)](this[_0x7a8a69(0x2d5)],_0x7a8a69(0x22e),(_0x35338c,_0x5a6ad5)=>{const _0x5e538f=_0x7a8a69;this[_0x5e538f(0x2f3)](_0x5a6ad5);}),this[_0x7a8a69(0x20b)](this[_0x7a8a69(0x2d5)],_0x7a8a69(0x2cd),(_0x5b7fe9,{replyId:_0x1d4593,partIndex:_0x4c0c78})=>{const _0x53bfb6=_0x7a8a69;this[_0x53bfb6(0x29f)]=this[_0x53bfb6(0x2d5)][_0x53bfb6(0x245)],this[_0x53bfb6(0x325)](_0x1d4593,_0x4c0c78);}),this[_0x7a8a69(0x20b)](this[_0x7a8a69(0x2d5)],_0x7a8a69(0x2fd),(_0x16108f,{replyId:_0x3504f4,partIndex:_0x393d44})=>{const _0x1c4285=_0x7a8a69,_0x5c151b=this[_0x1c4285(0x23d)](_0x3504f4,_0x393d44);_0x5c151b&&_0x1c4285(0x2d4)!=_0x5c151b[_0x1c4285(0x30d)][_0x1c4285(0x338)][_0x1c4285(0x301)]&&this[_0x1c4285(0x273)][_0x1c4285(0x1f8)]([_0x5c151b[_0x1c4285(0x30d)]],_0x1c4285(0x319));}),this[_0x7a8a69(0x20b)](this[_0x7a8a69(0x2d5)],_0x7a8a69(0x2c1),()=>{const _0x456d69=_0x7a8a69;this[_0x456d69(0x273)][_0x456d69(0x278)](_0x456d69(0x319));}),this[_0x7a8a69(0x20b)](this[_0x7a8a69(0x2d5)],_0x7a8a69(0x2d7),(_0x12d711,_0xff4fb6)=>{const _0x419441=_0x7a8a69;this[_0x419441(0x273)][_0x419441(0x278)](_0x419441(0x319)),this[_0x419441(0x29c)](_0xff4fb6);}),this[_0x7a8a69(0x20b)](this[_0x7a8a69(0x2d5)],_0x7a8a69(0x1e4),async(_0x128ecf,{replyId:_0x1f03c9,showDiff:_0x2453c1})=>{const _0x2d87b4=_0x7a8a69,{reply:_0x375286}=this[_0x2d87b4(0x31d)](_0x1f03c9),_0x5f2de7=_0x375286[_0x2d87b4(0x2b8)]({'showDiff':_0x2453c1});await this[_0x2d87b4(0x2d5)][_0x2d87b4(0x254)]({'id':_0x375286['id'],'parts':_0x5f2de7,'renderingStrategy':_0x2d87b4(0x322)});}),this[_0x7a8a69(0x20b)](this[_0x7a8a69(0x2d5)],_0x7a8a69(0x241),(_0x55728c,{replyId:_0x4d850d,partIndex:_0x1487fa})=>{const _0x155821=_0x7a8a69;this[_0x155821(0x2f5)]({'replyId':_0x4d850d,'partIndex':_0x1487fa}),this[_0x155821(0x273)][_0x155821(0x278)](_0x155821(0x319));}),this[_0x7a8a69(0x33f)][_0x7a8a69(0x1ee)][_0x7a8a69(0x253)](_0x7a8a69(0x327))&&(this[_0x7a8a69(0x300)]=this[_0x7a8a69(0x33f)][_0x7a8a69(0x1ee)][_0x7a8a69(0x2c4)](_0x7a8a69(0x327)),this[_0x7a8a69(0x269)](_0x7a8a69(0x29f),!0x1),this[_0x7a8a69(0x300)][_0x7a8a69(0x251)](_0x7a8a69(0x245))['to'](this,_0x7a8a69(0x29f)),this[_0x7a8a69(0x20b)](this[_0x7a8a69(0x300)],_0x7a8a69(0x1e4),()=>{const _0x571499=_0x7a8a69,{replyId:_0x5ac10e,partIndex:_0x2f1ab1}=this[_0x571499(0x25f)];this[_0x571499(0x29f)]=!this[_0x571499(0x29f)];const {reply:_0x5a02c8}=this[_0x571499(0x31d)](_0x5ac10e),_0x3d665a=_0x5a02c8[_0x571499(0x2b8)]({'showDiff':this[_0x571499(0x29f)],'groupIndex':_0x2f1ab1});this[_0x571499(0x300)][_0x571499(0x321)]({'part':_0x3d665a[0x0],'renderingStrategy':_0x571499(0x322),'keepErrors':!0x0});}),this[_0x7a8a69(0x20b)](this[_0x7a8a69(0x300)],_0x7a8a69(0x2d7),()=>{const _0x57f03b=_0x7a8a69,{replyId:_0x3121ce,partIndex:_0x253b06}=this[_0x57f03b(0x25f)];this[_0x57f03b(0x29c)]({'replyId':_0x3121ce,'partIndex':_0x253b06}),this[_0x57f03b(0x300)][_0x57f03b(0x260)](_0x57f03b(0x308));}),this[_0x7a8a69(0x20b)](this[_0x7a8a69(0x300)],_0x7a8a69(0x22e),()=>{const _0x379185=_0x7a8a69,{replyId:_0x1338df,partIndex:_0x25d180}=this[_0x379185(0x25f)];this[_0x379185(0x2f3)]({'replyId':_0x1338df,'partIndex':_0x25d180}),this[_0x379185(0x300)][_0x379185(0x260)](_0x379185(0x308));}),this[_0x7a8a69(0x20b)](this[_0x7a8a69(0x300)],_0x7a8a69(0x241),()=>{const _0x375f83=_0x7a8a69,{replyId:_0x298cd9,partIndex:_0x545de0}=this[_0x375f83(0x25f)];this[_0x375f83(0x2f5)]({'replyId':_0x298cd9,'partIndex':_0x545de0}),this[_0x375f83(0x300)][_0x375f83(0x260)](_0x375f83(0x2d8));}),this[_0x7a8a69(0x20b)](this[_0x7a8a69(0x300)],_0x7a8a69(0x237),()=>{const _0x389a01=_0x7a8a69,{replyId:_0x94fe4c,partIndex:_0x182638}=this[_0x389a01(0x25f)],_0x2c93eb=this[_0x389a01(0x2d0)](_0x94fe4c,_0x182638,_0x389a01(0x305));null!==_0x2c93eb&&this[_0x389a01(0x325)](_0x94fe4c,_0x2c93eb);}),this[_0x7a8a69(0x20b)](this[_0x7a8a69(0x300)],_0x7a8a69(0x1df),()=>{const _0x2a3416=_0x7a8a69,{replyId:_0x428451,partIndex:_0x398890}=this[_0x2a3416(0x25f)],_0x18f096=this[_0x2a3416(0x2d0)](_0x428451,_0x398890,_0x2a3416(0x292));null!==_0x18f096&&this[_0x2a3416(0x325)](_0x428451,_0x18f096);}),this[_0x7a8a69(0x20b)](this[_0x7a8a69(0x300)],_0x7a8a69(0x215),(_0x27b690,{id:_0x3c1d3d})=>{const _0x2cd8c6=_0x7a8a69;if(_0x2cd8c6(0x317)!==_0x3c1d3d)return;const {replyId:_0x8459dd,partIndex:_0x3278d0}=this[_0x2cd8c6(0x25f)];this[_0x2cd8c6(0x25f)]=null,this[_0x2cd8c6(0x2d5)][_0x2cd8c6(0x264)]({'id':_0x8459dd,'index':_0x3278d0,'isActive':!0x1});}));}async[_0x5445bf(0x23e)](){const _0x5094da=_0x5445bf;this[_0x5094da(0x33f)]instanceof _0xa6309?this[_0x5094da(0x29b)](this[_0x5094da(0x33f)]):this[_0x5094da(0x20b)](this[_0x5094da(0x33f)][_0x5094da(0x324)],_0x5094da(0x28f),(_0x54a511,_0x19ae5b)=>{const _0x735f21=_0x5094da;_0x19ae5b['on'](_0x735f21(0x204),()=>{const _0x54d4d3=_0x735f21;this[_0x54d4d3(0x29b)](_0x19ae5b);});});const _0x33c4e2=this[_0x5094da(0x33f)][_0x5094da(0x2c6)][_0x5094da(0x2c4)](_0x5094da(0x272));let _0x20b4d6=_0x33c4e2;if(_0x5094da(0x236)!=_0x33c4e2||(_0x20b4d6=await this[_0x5094da(0x246)](),_0x20b4d6))return _0x5094da(0x20e)==_0x20b4d6?this[_0x5094da(0x1fb)]():this[_0x5094da(0x33e)](_0x20b4d6);}async[_0x5445bf(0x229)](){const _0x1288b8=_0x5445bf;return await this[_0x1288b8(0x320)](),this[_0x1288b8(0x2d3)][_0x1288b8(0x1e7)](),super[_0x1288b8(0x229)]();}[_0x5445bf(0x2f3)](_0x49f652){const _0xaa027b=_0x5445bf,_0xf23b17=_0x1cd8a8(this[_0xaa027b(0x33f)]);if(!_0xf23b17[_0xaa027b(0x1ee)][_0xaa027b(0x253)](_0xaa027b(0x24d)))throw new _0x37642f(_0xaa027b(0x21f),null);const _0x15de9e=this[_0xaa027b(0x33f)][_0xaa027b(0x1ee)][_0xaa027b(0x2c4)](_0xaa027b(0x274)),{reply:_0x2446fb,interaction:_0x267378}=this[_0xaa027b(0x31d)](_0x49f652[_0xaa027b(0x258)]),_0x4a3a1e=this[_0xaa027b(0x23d)](_0x49f652[_0xaa027b(0x258)],_0x49f652[_0xaa027b(0x2ce)]),_0x58e0c7=void 0x0!==_0x49f652[_0xaa027b(0x2ce)]?[_0x2446fb[_0xaa027b(0x25b)][_0x49f652[_0xaa027b(0x2ce)]]]:_0x2446fb[_0xaa027b(0x25b)][_0xaa027b(0x2fb)](_0x16c42c=>_0xaa027b(0x22b)==_0x16c42c[_0xaa027b(0x233)]),_0x2b0e2c=_0x58e0c7[_0xaa027b(0x26f)](_0x4a7430=>_0x2446fb[_0xaa027b(0x25b)][_0xaa027b(0x2b9)](_0x4a7430));if(!_0x4a3a1e||_0xaa027b(0x2d4)==_0x4a3a1e[_0xaa027b(0x30d)][_0xaa027b(0x338)][_0xaa027b(0x301)])return void _0x2b0e2c[_0xaa027b(0x316)](_0x59a1ef=>_0x2446fb[_0xaa027b(0x26a)](_0x59a1ef,_0xaa027b(0x35d)));_0x2b0e2c[_0xaa027b(0x316)](_0x121129=>_0x2446fb[_0xaa027b(0x26a)](_0x121129,_0xaa027b(0x308)));const _0x5ca64c=_0x2de689({'editor':_0xf23b17,'reply':_0x2446fb,'interaction':_0x267378,'groups':_0x58e0c7,'transform':!0x0,'documentCompare':_0x15de9e,'documentCompareOptions':{'anchor':_0xaa027b(0x2d6),'markDeletions':!0x0}});let _0x245057;_0x4a3a1e&&this[_0xaa027b(0x297)](_0x4a3a1e[_0xaa027b(0x30d)]),_0xf23b17[_0xaa027b(0x34f)][_0xaa027b(0x2e3)](_0x109217=>{const _0x4691ee=_0xaa027b;_0x245057=_0x109217[_0x4691ee(0x2ec)],_0xf23b17[_0x4691ee(0x1ee)][_0x4691ee(0x2c4)](_0x4691ee(0x25d))[_0x4691ee(0x27e)](_0x5ca64c),this[_0x4691ee(0x273)][_0x4691ee(0x278)](_0x4691ee(0x319));}),this[_0xaa027b(0x34a)][_0xaa027b(0x269)](_0x245057,{'interactionId':_0x267378['id'],'replyId':_0x2446fb['id'],'indexes':_0x2b0e2c[_0xaa027b(0x218)]()}),this[_0xaa027b(0x1de)](_0x2446fb);}[_0x5445bf(0x29c)](_0x509a45){const _0x192207=_0x5445bf,_0x47a044=_0x1cd8a8(this[_0x192207(0x33f)]),_0x1693f0=this[_0x192207(0x33f)][_0x192207(0x1ee)][_0x192207(0x2c4)](_0x2dafad),{reply:_0x357039,interaction:_0x38f5fa}=this[_0x192207(0x31d)](_0x509a45[_0x192207(0x258)]),_0x11bb40=this[_0x192207(0x23d)](_0x509a45[_0x192207(0x258)],_0x509a45[_0x192207(0x2ce)]),_0x18d0be=void 0x0!==_0x509a45[_0x192207(0x2ce)]?[_0x357039[_0x192207(0x25b)][_0x509a45[_0x192207(0x2ce)]]]:_0x357039[_0x192207(0x25b)][_0x192207(0x2fb)](_0x522777=>_0x192207(0x22b)==_0x522777[_0x192207(0x233)]),_0x331d70=_0x18d0be[_0x192207(0x26f)](_0x20f6fb=>_0x357039[_0x192207(0x25b)][_0x192207(0x2b9)](_0x20f6fb));if(!_0x11bb40||_0x192207(0x2d4)==_0x11bb40[_0x192207(0x30d)][_0x192207(0x338)][_0x192207(0x301)])return void _0x331d70[_0x192207(0x316)](_0x3a3027=>_0x357039[_0x192207(0x26a)](_0x3a3027,_0x192207(0x35d)));_0x331d70[_0x192207(0x316)](_0x7255ea=>_0x357039[_0x192207(0x26a)](_0x7255ea,_0x192207(0x308)));const _0x34dd2a=_0x2de689({'editor':_0x47a044,'reply':_0x357039,'interaction':_0x38f5fa,'groups':_0x18d0be,'transform':!0x0,'documentCompare':_0x1693f0,'documentCompareOptions':{'anchor':_0x192207(0x2d6),'markDeletions':!0x1}});let _0xb24e28;_0x11bb40&&this[_0x192207(0x297)](_0x11bb40[_0x192207(0x30d)]),_0x47a044[_0x192207(0x34f)][_0x192207(0x2e3)](_0x457ed0=>{const _0x498aa8=_0x192207;_0xb24e28=_0x457ed0[_0x498aa8(0x2ec)];for(const _0x1fa324 of _0x34dd2a)_0x1fa324[_0x498aa8(0x248)]=_0x47a044[_0x498aa8(0x34f)][_0x498aa8(0x2b3)][_0x498aa8(0x32b)],_0x56c479(_0x47a044,_0x1fa324),_0x457ed0[_0x498aa8(0x2ec)][_0x498aa8(0x203)](_0x1fa324),_0x47a044[_0x498aa8(0x34f)][_0x498aa8(0x2e0)](_0x1fa324);}),this[_0x192207(0x34a)][_0x192207(0x269)](_0xb24e28,{'interactionId':_0x38f5fa['id'],'replyId':_0x357039['id'],'indexes':_0x331d70[_0x192207(0x218)]()}),this[_0x192207(0x1de)](_0x357039);}[_0x5445bf(0x2f5)](_0x23738b){const _0x747454=_0x5445bf,{reply:_0x288e35}=this[_0x747454(0x31d)](_0x23738b[_0x747454(0x258)]);_0x288e35[_0x747454(0x26a)](_0x23738b[_0x747454(0x2ce)],_0x747454(0x2d8));}[_0x5445bf(0x325)](_0x39afd5,_0x48ce9b){const _0x10712f=_0x5445bf;if(!this[_0x10712f(0x300)])return;const {reply:_0x58e9c9}=this[_0x10712f(0x31d)](_0x39afd5),_0x552edb=_0x58e9c9[_0x10712f(0x2b8)]({'showDiff':this[_0x10712f(0x29f)]});let _0x4a999b,_0x2b7a68;if(void 0x0!==_0x48ce9b?(_0x2b7a68=_0x552edb[_0x10712f(0x2e8)](_0x33520c=>_0x33520c[_0x10712f(0x2f4)]==_0x48ce9b),_0x4a999b=_0x2b7a68?.[_0x10712f(0x2f4)]):(_0x2b7a68=_0x552edb[0x0],_0x4a999b=_0x2b7a68[_0x10712f(0x2f4)]),this[_0x10712f(0x25f)]?.[_0x10712f(0x258)]==_0x39afd5&&this[_0x10712f(0x25f)]?.[_0x10712f(0x2ce)]==_0x4a999b)return;const _0x23a9b9=this[_0x10712f(0x1ec)](_0x39afd5,_0x58e9c9,_0x2b7a68);if(!_0x23a9b9)return void this[_0x10712f(0x300)][_0x10712f(0x343)]();this[_0x10712f(0x25f)]={'replyId':_0x39afd5,'partIndex':_0x4a999b},this[_0x10712f(0x297)](_0x23a9b9,!0x0);const _0x36328c=this[_0x10712f(0x2d0)](_0x39afd5,_0x4a999b,_0x10712f(0x305));this[_0x10712f(0x300)][_0x10712f(0x321)]({'part':_0x2b7a68,'renderingStrategy':_0x10712f(0x322)}),this[_0x10712f(0x300)][_0x10712f(0x1e9)]({'index':_0x4a999b,'title':_0x130df6(this[_0x10712f(0x33f)][_0x10712f(0x28b)],_0x10712f(0x1e0),(_0x4a999b+0x1)[_0x10712f(0x1f4)]()),'showRotator':null!==_0x36328c,'ranges':[_0x23a9b9],'areActionsDisabled':_0x58e9c9[_0x10712f(0x2ee)]}),this[_0x10712f(0x300)][_0x10712f(0x260)](_0x10712f(0x22b)),this[_0x10712f(0x2d5)][_0x10712f(0x1f1)](_0x39afd5,_0x4a999b),this[_0x10712f(0x2d5)][_0x10712f(0x264)]({'id':_0x39afd5,'index':_0x4a999b,'isActive':!0x0});}[_0x5445bf(0x2d0)](_0x5dff48,_0x469bd2,_0x3948ff){const _0x318563=_0x5445bf,{reply:_0x324131}=this[_0x318563(0x31d)](_0x5dff48),_0x59db41=_0x324131[_0x318563(0x2b8)]({'showDiff':this[_0x318563(0x29f)]});if(0x1==_0x59db41[_0x318563(0x353)])return null;const _0x9dd389=_0x59db41[_0x318563(0x1e6)](_0x1728ce=>_0x1728ce[_0x318563(0x2f4)]==_0x469bd2),_0x1d7e85=_0x318563(0x305)==_0x3948ff?0x1:-0x1;let _0x58e3a2=_0x59db41['at']((_0x9dd389+_0x1d7e85)%_0x59db41[_0x318563(0x353)])[_0x318563(0x2f4)],_0x286fb9=_0x59db41[_0x58e3a2];for(;!this[_0x318563(0x1ec)](_0x5dff48,_0x324131,_0x286fb9);){if(_0x58e3a2=_0x59db41['at']((_0x58e3a2+_0x1d7e85)%_0x59db41[_0x318563(0x353)])[_0x318563(0x2f4)],_0x58e3a2===_0x9dd389)return null;_0x286fb9=_0x59db41[_0x58e3a2];}return _0x58e3a2;}[_0x5445bf(0x1ec)](_0x2489e2,_0x35fa81,_0x1d1a0f){const _0x475fbf=_0x5445bf,_0x3b769b=_0x35fa81[_0x475fbf(0x25b)];if(!_0x1d1a0f[_0x475fbf(0x28a)])return null;const _0x1e76d6=_0x3b769b[_0x475fbf(0x2e8)](_0x3a0de7=>_0x3a0de7[_0x475fbf(0x2f4)]==_0x1d1a0f[_0x475fbf(0x2f4)]);if(_0x475fbf(0x22b)!==_0x1e76d6?.[_0x475fbf(0x233)])return null;const _0x3004de=this[_0x475fbf(0x23d)](_0x2489e2,_0x1d1a0f[_0x475fbf(0x2f4)]);if(!_0x3004de)return null;const {range:_0x35f72a,currentIndex:_0x2c818c}=_0x3004de;return _0x475fbf(0x2d4)==_0x35f72a[_0x475fbf(0x338)][_0x475fbf(0x301)]?(_0x35fa81[_0x475fbf(0x26a)](_0x2c818c,_0x475fbf(0x35d)),null):_0x3004de[_0x475fbf(0x30d)];}[_0x5445bf(0x23d)](_0x4886d6,_0x4b9c8c){const _0x3544f7=_0x5445bf,_0x14cd2e=_0x1cd8a8(this[_0x3544f7(0x33f)]),{reply:_0x936479,interaction:_0x40ffc4}=this[_0x3544f7(0x31d)](_0x4886d6),_0x31e661=_0x936479[_0x3544f7(0x25b)][_0x3544f7(0x2fb)](_0x11d8b4=>_0x3544f7(0x22b)==_0x11d8b4[_0x3544f7(0x233)]),_0x37aa35=_0x31e661[_0x3544f7(0x26f)](_0x26dfaf=>_0x936479[_0x3544f7(0x25b)][_0x3544f7(0x2b9)](_0x26dfaf));void 0x0===_0x4b9c8c&&(_0x4b9c8c=_0x37aa35[0x0]);const _0x73b7ad=_0x37aa35[_0x3544f7(0x2b9)](_0x4b9c8c);if(-0x1==_0x73b7ad)return null;const _0x1650d2=_0x31e661[_0x73b7ad],_0x67dead=new _0x1d4d3c([]),_0x36b646=new _0x1d4d3c([]);for(const _0x2ac54c of _0x1650d2[_0x3544f7(0x356)])if(_0x3544f7(0x2a8)!=_0x2ac54c[_0x3544f7(0x31a)]&&_0x36b646[_0x3544f7(0x2c5)][_0x3544f7(0x206)](_0x2ac54c[_0x3544f7(0x340)][_0x3544f7(0x31f)](!0x0)),_0x3544f7(0x20e)!=_0x2ac54c[_0x3544f7(0x31a)]){const _0x483479=_0x11fefc(_0x449ad4=>_0x4280bc(_0x449ad4,_0x3544f7(0x296))==_0x2ac54c['id'],_0x936479[_0x3544f7(0x2be)],!0x0);_0x67dead[_0x3544f7(0x2c5)][_0x3544f7(0x206)](_0x483479[_0x3544f7(0x31f)](!0x0));}if(0x0==_0x67dead[_0x3544f7(0x2c5)][_0x3544f7(0x353)]){if(_0x1650d2[_0x3544f7(0x356)][0x0][_0x3544f7(0x214)]){const _0x1fb2e4=_0x183569(_0x3544f7(0x296),_0x1650d2[_0x3544f7(0x356)][0x0][_0x3544f7(0x214)],_0x936479[_0x3544f7(0x2be)]);_0x67dead[_0x3544f7(0x2c5)][_0x3544f7(0x28e)](_0x1fb2e4[_0x3544f7(0x31f)](!0x0)),_0x36b646[_0x3544f7(0x2c5)][_0x3544f7(0x28e)](_0x1fb2e4[_0x3544f7(0x31f)](!0x0)),_0x1fb2e4[_0x3544f7(0x21e)]&&(_0x67dead[_0x3544f7(0x2c5)][_0x3544f7(0x206)](_0x1fb2e4[_0x3544f7(0x21e)][_0x3544f7(0x31f)](!0x0)),_0x36b646[_0x3544f7(0x2c5)][_0x3544f7(0x206)](_0x1fb2e4[_0x3544f7(0x21e)][_0x3544f7(0x31f)](!0x0)));}else{const _0x4a818b=_0x936479[_0x3544f7(0x2be)][_0x3544f7(0x2c5)][0x0];if(!_0x4a818b)return null;_0x67dead[_0x3544f7(0x2c5)][_0x3544f7(0x206)](_0x4a818b[_0x3544f7(0x31f)](!0x0)),_0x36b646[_0x3544f7(0x2c5)][_0x3544f7(0x206)](_0x4a818b[_0x3544f7(0x31f)](!0x0));}}const _0x3c7bb5=_0x40ffc4[_0x3544f7(0x354)](),_0x26c5de=_0x14cd2e[_0x3544f7(0x2fe)][_0x3544f7(0x22a)](_0x3c7bb5[_0x3544f7(0x2ac)]),_0x52b672=_0x2b61cd(_0x67dead),_0x400b65=_0x14cd2e[_0x3544f7(0x2fe)][_0x3544f7(0x22a)](_0x52b672),_0xdf2cb8=_0x14cd2e[_0x3544f7(0x2fe)][_0x3544f7(0x22a)](_0x52b672),_0x22b1c3=_0x14cd2e[_0x3544f7(0x34f)][_0x3544f7(0x240)](_0x400b65,0x0),_0x22ac21=_0x2b61cd(_0x36b646),_0x301d02={'anchor':_0x22b1c3,'markDeletions':!0x1},_0x59995f=_0x14cd2e[_0x3544f7(0x1ee)][_0x3544f7(0x2c4)](_0x2dafad)[_0x3544f7(0x303)](_0x52b672,_0x22ac21,_0x301d02)[_0x3544f7(0x265)]();if(!_0x59995f[_0x3544f7(0x353)])return null;_0x14cd2e[_0x3544f7(0x34f)][_0x3544f7(0x2e3)](_0x4e9119=>{const _0x378f73=_0x3544f7;for(const _0x57771a of _0x59995f)if(_0x378f73(0x202)==_0x57771a[_0x378f73(0x31a)]){const _0x57a3c4=_0x57771a[_0x378f73(0x1f0)],_0x445997=_0x57771a[_0x378f73(0x304)],_0x58f936=new _0x21ef70(_0x57a3c4,_0x445997);_0x4e9119[_0x378f73(0x2ec)][_0x378f73(0x203)](_0x58f936),_0x14cd2e[_0x378f73(0x34f)][_0x378f73(0x2e0)](_0x58f936);}else _0x378f73(0x289)!==_0x57771a[_0x378f73(0x31a)]&&(_0x57771a[_0x378f73(0x248)]=null,_0x57771a[_0x378f73(0x291)]=!0x1,_0x4e9119[_0x378f73(0x2ec)][_0x378f73(0x203)](_0x57771a),_0x14cd2e[_0x378f73(0x34f)][_0x378f73(0x2e0)](_0x57771a));});const _0x4c130b=_0x591691(_0x14cd2e,_0x59995f,_0x400b65);_0x4341ca(_0x14cd2e[_0x3544f7(0x34f)],_0x4c130b);const _0x5db813=_0x4c130b[_0x3544f7(0x2a1)]()[_0x3544f7(0x212)][_0x3544f7(0x280)][_0x3544f7(0x218)](),_0x36ebd3=_0x4c130b[_0x3544f7(0x2a1)]()[_0x3544f7(0x27f)][_0x3544f7(0x280)][_0x3544f7(0x218)](),_0x11aa64=[];let _0x26ed0e=_0x400b65,_0x44fbfa=_0xdf2cb8;for(let _0x225939=0x0;_0x225939<_0x36ebd3[_0x3544f7(0x353)];_0x225939++){const _0x50b2e0=_0x26ed0e[_0x3544f7(0x1eb)]-_0x36ebd3[_0x225939];_0x11aa64[_0x225939]=_0x44fbfa[_0x3544f7(0x1eb)]-_0x50b2e0,_0x26ed0e=_0x26ed0e[_0x3544f7(0x2eb)](_0x36ebd3[_0x225939]),_0x44fbfa=_0x44fbfa[_0x3544f7(0x2eb)](_0x11aa64[_0x225939]);}const _0x34c615=_0x14cd2e[_0x3544f7(0x34f)][_0x3544f7(0x30c)](_0x14cd2e[_0x3544f7(0x34f)][_0x3544f7(0x2a9)](_0xdf2cb8,_0x5db813),_0x14cd2e[_0x3544f7(0x34f)][_0x3544f7(0x2a9)](_0xdf2cb8,_0x11aa64)),_0x1aaae9=_0xdf2cb8[_0x3544f7(0x2a7)](0x0)[_0x3544f7(0x1e2)](_0x4e7f6b),_0x1ff5fa=Array[_0x3544f7(0x230)](_0x26c5de[_0x3544f7(0x2b6)]())[_0x3544f7(0x2e8)](_0x1283de=>_0x1283de[_0x3544f7(0x1e2)](_0x4e7f6b)==_0x1aaae9)[_0x3544f7(0x2e9)](),_0x572f92=_0x34c615[_0x3544f7(0x212)][_0x3544f7(0x280)][_0x3544f7(0x218)](),_0x56003e=_0x34c615[_0x3544f7(0x27f)][_0x3544f7(0x280)][_0x3544f7(0x218)]();_0x572f92[0x0]=_0x1ff5fa[0x0]+_0x572f92[0x0],_0x56003e[0x0]=_0x1ff5fa[0x0]+_0x56003e[0x0];let _0x1a39d3=_0x14cd2e[_0x3544f7(0x34f)][_0x3544f7(0x30c)](_0x14cd2e[_0x3544f7(0x34f)][_0x3544f7(0x2a9)](_0x14cd2e[_0x3544f7(0x34f)][_0x3544f7(0x2b3)][_0x3544f7(0x2b7)](),_0x572f92),_0x14cd2e[_0x3544f7(0x34f)][_0x3544f7(0x2a9)](_0x14cd2e[_0x3544f7(0x34f)][_0x3544f7(0x2b3)][_0x3544f7(0x2b7)](),_0x56003e));const _0x571d74=_0x14cd2e[_0x3544f7(0x34f)][_0x3544f7(0x2b3)][_0x3544f7(0x306)][_0x3544f7(0x265)](_0x3c7bb5[_0x3544f7(0x32b)]);for(const _0x103298 of _0x571d74)_0x1a39d3=_0x7d7dfd[_0x3544f7(0x2b4)](_0x1a39d3[_0x3544f7(0x2ea)](_0x103298));return{'range':_0x1a39d3,'currentIndex':_0x4b9c8c};}[_0x5445bf(0x29b)](_0x43ab24){const _0x2f91b9=_0x5445bf;if(!_0x43ab24[_0x2f91b9(0x1ee)][_0x2f91b9(0x253)](_0x2f91b9(0x312)))return;const _0x4f9ca2=_0x43ab24[_0x2f91b9(0x290)][_0x2f91b9(0x2c4)](_0x2f91b9(0x266)),_0x4ae406=_0x43ab24[_0x2f91b9(0x290)][_0x2f91b9(0x2c4)](_0x2f91b9(0x22f));this[_0x2f91b9(0x20b)](_0x4f9ca2,_0x2f91b9(0x20c),(_0x32daf9,_0x7cec32,_0x2c0139)=>{const _0x371371=_0x2f91b9,_0x5724c1=this[_0x371371(0x34a)][_0x371371(0x2c4)](_0x7cec32);if(!_0x5724c1)return;const _0x2e3ef3=this[_0x371371(0x2f6)][_0x371371(0x326)](_0x5724c1[_0x371371(0x2a6)])[_0x371371(0x216)](_0x5724c1[_0x371371(0x258)]);_0x5724c1[_0x371371(0x2cb)][_0x371371(0x316)](_0x8e461d=>_0x2e3ef3[_0x371371(0x26a)](_0x8e461d,_0x371371(0x22b))),this[_0x371371(0x34a)][_0x371371(0x31b)](_0x7cec32),this[_0x371371(0x34a)][_0x371371(0x269)](_0x2c0139,_0x5724c1);}),this[_0x2f91b9(0x20b)](_0x4ae406,_0x2f91b9(0x20c),(_0x3a912c,_0x44c9ee,_0x27cec3)=>{const _0x20e71d=_0x2f91b9,_0x2fe3fa=this[_0x20e71d(0x34a)][_0x20e71d(0x2c4)](_0x44c9ee);if(!_0x2fe3fa)return;const _0x4d5441=this[_0x20e71d(0x2f6)][_0x20e71d(0x326)](_0x2fe3fa[_0x20e71d(0x2a6)])[_0x20e71d(0x216)](_0x2fe3fa[_0x20e71d(0x258)]);_0x2fe3fa[_0x20e71d(0x2cb)][_0x20e71d(0x316)](_0x105cec=>_0x4d5441[_0x20e71d(0x26a)](_0x105cec,_0x20e71d(0x308))),this[_0x20e71d(0x34a)][_0x20e71d(0x31b)](_0x44c9ee),this[_0x20e71d(0x34a)][_0x20e71d(0x269)](_0x27cec3,_0x2fe3fa);});}async[_0x5445bf(0x33e)](_0x5b7db5){const _0x623681=_0x5445bf;this[_0x623681(0x33f)][_0x623681(0x1ee)][_0x623681(0x253)](_0x623681(0x327))&&this[_0x623681(0x33f)][_0x623681(0x1ee)][_0x623681(0x2c4)](_0x623681(0x327))[_0x623681(0x343)](),(this[_0x623681(0x33f)][_0x623681(0x1ee)][_0x623681(0x2c4)](_0x3608de)[_0x623681(0x28c)][_0x623681(0x238)](_0x623681(0x234)),this[_0x623681(0x2d5)][_0x623681(0x2d1)](_0x623681(0x322)),this[_0x623681(0x2d5)][_0x623681(0x25a)](!0x0),await this[_0x623681(0x320)]());try{await this[_0x623681(0x268)][_0x623681(0x33a)](_0x5b7db5)[_0x623681(0x2e6)](),await this[_0x623681(0x1fb)](_0x5b7db5),this[_0x623681(0x344)]('\x20'),await this[_0x623681(0x2f6)][_0x623681(0x1dd)](_0x5b7db5,this[_0x623681(0x273)][_0x623681(0x2ba)]),this[_0x623681(0x2f6)][_0x623681(0x209)]()&&this[_0x623681(0x20d)]();}catch(_0x39343c){this[_0x623681(0x2d5)][_0x623681(0x2af)]({'errorMessage':_0x130df6(this[_0x623681(0x33f)][_0x623681(0x28b)],_0x623681(0x2ff)),'id':_0x5b7db5}),this[_0x623681(0x2de)](new _0x37642f(_0x623681(0x2d2),this,{'error':_0x39343c}));}finally{this[_0x623681(0x2d5)][_0x623681(0x285)](),this[_0x623681(0x2d5)][_0x623681(0x2d1)](_0x623681(0x1fa)),this[_0x623681(0x2d5)][_0x623681(0x25a)](!0x1);}}async[_0x5445bf(0x246)](){const _0x5e2803=_0x5445bf,_0x2c3fdf=this[_0x5e2803(0x268)][_0x5e2803(0x23c)](this[_0x5e2803(0x30b)](),{'limit':0x1,'sortBy':_0x5e2803(0x334)});try{const _0x23d801=await _0x2c3fdf[_0x5e2803(0x32d)]();return _0x23d801[_0x5e2803(0x353)]?_0x23d801[0x0]['id']:_0x5e2803(0x20e);}catch(_0x2f8b87){return this[_0x5e2803(0x2d5)][_0x5e2803(0x2af)]({'errorMessage':_0x130df6(this[_0x5e2803(0x33f)][_0x5e2803(0x28b)],_0x5e2803(0x2ff)),'id':_0xafb963()}),this[_0x5e2803(0x2de)](new _0x37642f(_0x5e2803(0x288),this,{'error':_0x2f8b87})),this[_0x5e2803(0x2d5)][_0x5e2803(0x25a)](!0x1),this[_0x5e2803(0x2d5)][_0x5e2803(0x21d)](),null;}}[_0x5445bf(0x2c7)](_0x38d607){const _0x14bb86=_0x5445bf;this[_0x14bb86(0x2f6)]['id']===_0x38d607&&this[_0x14bb86(0x1fb)]();}[_0x5445bf(0x20d)](){const _0x1b13e7=_0x5445bf;this[_0x1b13e7(0x2f6)]?.[_0x1b13e7(0x2e1)](_0x130df6(this[_0x1b13e7(0x33f)][_0x1b13e7(0x28b)],_0x1b13e7(0x35f)));}async[_0x5445bf(0x2b0)](){const _0x42c6ba=_0x5445bf,_0x1f14d8=this[_0x42c6ba(0x273)][_0x42c6ba(0x1e1)]();this[_0x42c6ba(0x2f6)]?.[_0x42c6ba(0x228)](_0x1f14d8),this[_0x42c6ba(0x20d)]();}[_0x5445bf(0x2c3)](){const _0x33f41e=_0x5445bf;this[_0x33f41e(0x2f6)]?.[_0x33f41e(0x2e7)]();}[_0x5445bf(0x2da)](){const _0x49ba28=_0x5445bf;this[_0x49ba28(0x2d5)][_0x49ba28(0x2da)]();}async[_0x5445bf(0x2b1)](){const _0x1cf49f=_0x5445bf;await this[_0x1cf49f(0x1fb)]();}async[_0x5445bf(0x276)]({message:_0x4b7182,attributes:_0x2c1132}){const _0x34f5b2=_0x5445bf;await this[_0x34f5b2(0x2a0)]({'userMessage':_0x4b7182,'attributes':_0x2c1132});}[_0x5445bf(0x30b)](){const _0x2d3fb0=_0x5445bf,_0x3a2904=this[_0x2d3fb0(0x33f)][_0x2d3fb0(0x2c6)][_0x2d3fb0(0x2c4)](_0x2d3fb0(0x2f0));if(!_0x3a2904)throw new _0x37642f(_0x2d3fb0(0x259),this);return _0x3a2904;}async[_0x5445bf(0x1fb)](_0x274eb8){const _0x48060b=_0x5445bf;try{this[_0x48060b(0x2d5)][_0x48060b(0x1d9)](),await this[_0x48060b(0x207)](_0x274eb8);}catch(_0xb08eda){this[_0x48060b(0x2d5)][_0x48060b(0x2af)]({'errorMessage':_0x130df6(this[_0x48060b(0x33f)][_0x48060b(0x28b)],_0x48060b(0x345)),'id':_0x274eb8||_0xafb963()}),console[_0x48060b(0x283)](_0xb08eda),this[_0x48060b(0x2f6)]=void 0x0,this[_0x48060b(0x2d5)][_0x48060b(0x21d)]();}}async[_0x5445bf(0x207)](_0x32852c){const _0x52ff67=_0x5445bf;let _0x802c71;this[_0x52ff67(0x33f)][_0x52ff67(0x1ee)][_0x52ff67(0x253)](_0x52ff67(0x327))&&this[_0x52ff67(0x33f)][_0x52ff67(0x1ee)][_0x52ff67(0x2c4)](_0x52ff67(0x327))[_0x52ff67(0x343)](),_0x32852c||!this[_0x52ff67(0x2f6)]?_0x802c71=this[_0x52ff67(0x33f)][_0x52ff67(0x2c6)][_0x52ff67(0x2c4)](_0x52ff67(0x2c9)):this[_0x52ff67(0x2d5)][_0x52ff67(0x208)]&&(_0x802c71=this[_0x52ff67(0x2f6)][_0x52ff67(0x267)]['id']),await this[_0x52ff67(0x320)]();const _0x150435=this[_0x52ff67(0x30b)](),_0x460c18=_0x32852c||_0xafb963();this[_0x52ff67(0x2f6)]=new _0x5eeb0c({'connector':this[_0x52ff67(0x268)],'chatModels':this[_0x52ff67(0x358)],'selectedModelId':_0x802c71,'conversationId':_0x460c18,'group':_0x150435,'getEditor':()=>_0x1cd8a8(this[_0x52ff67(0x33f)]),'isFromHistory':!!_0x32852c}),this[_0x52ff67(0x2f6)][_0x52ff67(0x26b)](_0x52ff67(0x211),_0x52ff67(0x1ef))['to'](this),this[_0x52ff67(0x2f6)]['on'](_0x52ff67(0x2cf),(_0x1c0576,_0x4f1f2b)=>{const _0x2ba663=_0x52ff67;this[_0x2ba663(0x2d5)][_0x2ba663(0x33b)](_0x4f1f2b),this[_0x2ba663(0x2d5)][_0x2ba663(0x2f1)](),this[_0x2ba663(0x2d5)][_0x2ba663(0x1f6)](),this[_0x2ba663(0x2d5)][_0x2ba663(0x2ca)](),_0x32852c||(this[_0x2ba663(0x2d5)][_0x2ba663(0x210)](),this[_0x2ba663(0x20d)]());}),this[_0x52ff67(0x2f6)]['on'](_0x52ff67(0x24e),(_0x48d576,_0x2c50df)=>{const _0x3284ca=_0x52ff67;this[_0x3284ca(0x2d5)][_0x3284ca(0x309)](_0x2c50df[_0x3284ca(0x22c)]);}),this[_0x52ff67(0x2f6)]['on'](_0x52ff67(0x295),(_0x16455d,_0x3567e4)=>{const _0x15e33f=_0x52ff67;this[_0x15e33f(0x2d5)][_0x15e33f(0x336)](_0x3567e4);}),this[_0x52ff67(0x2f6)]['on'](_0x52ff67(0x31e),()=>{const _0x25ade6=_0x52ff67,_0x58cbc7=this[_0x25ade6(0x2d5)][_0x25ade6(0x2d9)]({'isWebSearchEnabled':!0x0,'isReasoningEnabled':!0x1});this[_0x25ade6(0x2d5)][_0x25ade6(0x2bb)](_0x58cbc7);}),this[_0x52ff67(0x2f6)]['on'](_0x52ff67(0x25e),()=>{const _0x4c9eb3=_0x52ff67,_0x4f717d=this[_0x4c9eb3(0x2d5)][_0x4c9eb3(0x2d9)]({'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x0});this[_0x4c9eb3(0x2d5)][_0x4c9eb3(0x2bb)](_0x4f717d);}),this[_0x52ff67(0x2f6)]['on'](_0x52ff67(0x357),(_0x24d8d6,_0x223ea9)=>{const _0x5ba58a=_0x52ff67;this[_0x5ba58a(0x2d5)][_0x5ba58a(0x2b5)](_0x223ea9,{'isWebSearchEnabled':!0x0,'isReasoningEnabled':!0x1});}),this[_0x52ff67(0x2f6)]['on'](_0x52ff67(0x351),(_0x47b948,_0x20f066)=>{const _0x30fa33=_0x52ff67;this[_0x30fa33(0x2d5)][_0x30fa33(0x2b5)](_0x20f066,{'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x0});}),this[_0x52ff67(0x2f6)]['on'](_0x52ff67(0x1ef),()=>{const _0x4e874e=_0x52ff67;this[_0x4e874e(0x2d5)][_0x4e874e(0x252)]();}),this[_0x52ff67(0x2f6)]['on'](_0x52ff67(0x287),async()=>{const _0x176cde=_0x52ff67;await this[_0x176cde(0x2d5)][_0x176cde(0x2f2)]();}),this[_0x52ff67(0x2f6)]['on'](_0x52ff67(0x2dd),(_0x35e3bc,_0x2dc0e8)=>{const _0x44841e=_0x52ff67;this[_0x44841e(0x2d5)][_0x44841e(0x24f)](_0x2dc0e8['id']);}),this[_0x52ff67(0x2f6)]['on'](_0x52ff67(0x213),(_0x40055b,_0x1593bd,_0x1ce365)=>{const _0x481b05=_0x52ff67;this[_0x481b05(0x344)](_0x1593bd,_0x1ce365);}),this[_0x52ff67(0x2f6)]['on'](_0x52ff67(0x2bf),(_0x3694bb,_0x57d008)=>{const _0x450b8c=_0x52ff67;_0x450b8c(0x28d)===_0x57d008[_0x450b8c(0x31a)]?this[_0x450b8c(0x2d5)][_0x450b8c(0x34c)](_0x57d008):this[_0x450b8c(0x2d5)][_0x450b8c(0x299)](_0x57d008);}),this[_0x52ff67(0x2f6)]['on'](_0x52ff67(0x2a5),async(_0xb1f475,_0x3ae628)=>{const _0x5618ce=_0x52ff67;await this[_0x5618ce(0x217)]({'reply':_0x3ae628});}),this[_0x52ff67(0x2f6)]['on'](_0x52ff67(0x2e2),(_0x2692b9,{reply:_0x3bb131,index:_0x359d28,state:_0x5bfee9})=>{const _0x4f0bab=_0x52ff67;this[_0x4f0bab(0x2d5)][_0x4f0bab(0x1dc)]({'id':_0x3bb131['id'],'index':_0x359d28,'state':_0x5bfee9}),this[_0x4f0bab(0x25f)]?.[_0x4f0bab(0x258)][_0x4f0bab(0x263)](_0x3bb131['id'])&&this[_0x4f0bab(0x25f)]?.[_0x4f0bab(0x2ce)]==_0x359d28&&this[_0x4f0bab(0x300)]?.[_0x4f0bab(0x260)](_0x5bfee9);}),this[_0x52ff67(0x2f6)]['on'](_0x52ff67(0x2fc),(_0xd54f8a,_0x3517ed)=>{const _0x47b122=_0x52ff67;if(this[_0x47b122(0x2d5)][_0x47b122(0x29d)](_0x3517ed[_0x47b122(0x275)],_0x3517ed[_0x47b122(0x200)]),_0x47b122(0x22d)===_0x3517ed[_0x47b122(0x275)][_0x47b122(0x31a)]){const _0x293909=[..._0x1cd8a8(this[_0x47b122(0x33f)])[_0x47b122(0x34f)][_0x47b122(0x2b3)][_0x47b122(0x22d)][_0x47b122(0x330)]()];this[_0x47b122(0x273)][_0x47b122(0x1f8)](_0x293909,_0x47b122(0x27d)+this[_0x47b122(0x2f6)]?.['id']);}}),this[_0x52ff67(0x2f6)]['on'](_0x52ff67(0x323),(_0x55c86b,_0x20ffc1)=>{const _0x125f40=_0x52ff67;this[_0x125f40(0x2d5)][_0x125f40(0x27a)](_0x20ffc1[_0x125f40(0x220)]),_0x125f40(0x2bc)==_0x20ffc1[_0x125f40(0x220)]&&this[_0x125f40(0x2c3)](),_0x125f40(0x22d)===_0x20ffc1[_0x125f40(0x31a)]&&this[_0x125f40(0x273)][_0x125f40(0x278)](_0x125f40(0x27d)+this[_0x125f40(0x2f6)]?.['id']);}),this[_0x52ff67(0x2f6)]['on'](_0x52ff67(0x1e3),(_0x22583a,_0x4c7ff)=>{const _0x3435e1=_0x52ff67;this[_0x3435e1(0x2d5)][_0x3435e1(0x34e)](_0x4c7ff[_0x3435e1(0x275)][_0x3435e1(0x220)],_0x4c7ff[_0x3435e1(0x200)]);}),this[_0x52ff67(0x2f6)]['on'](_0x52ff67(0x335),(_0xcf9b66,_0x12f119)=>{const _0x25ffe9=_0x52ff67;this[_0x25ffe9(0x2d5)][_0x25ffe9(0x243)](_0x12f119[_0x25ffe9(0x1ff)]);}),this[_0x52ff67(0x2f6)]['on'](_0x52ff67(0x1d6),(_0x5dd0ce,_0x3f9a2d)=>{const _0x4e6054=_0x52ff67;this[_0x4e6054(0x2d5)][_0x4e6054(0x286)](_0x3f9a2d[_0x4e6054(0x205)]);}),this[_0x52ff67(0x2f6)]['on'](_0x52ff67(0x2dc),(_0x23c67a,_0xddabe6)=>{const _0x68fba7=_0x52ff67;this[_0x68fba7(0x2d5)][_0x68fba7(0x328)](_0xddabe6[_0x68fba7(0x332)],_0xddabe6[_0x68fba7(0x1da)],_0xddabe6[_0x68fba7(0x256)],_0xddabe6[_0x68fba7(0x310)]);}),this[_0x52ff67(0x2f6)]['on'](_0x52ff67(0x333),(_0x194f1b,_0xacdb15)=>{const _0x1d82aa=_0x52ff67;this[_0x1d82aa(0x2d5)][_0x1d82aa(0x33c)](_0xacdb15[_0x1d82aa(0x332)],_0xacdb15[_0x1d82aa(0x24a)],_0xacdb15[_0x1d82aa(0x29a)]);}),this[_0x52ff67(0x2f6)]['on'](_0x52ff67(0x30e),(_0x595c4a,_0xfb731e)=>{const _0x25d49e=_0x52ff67;this[_0x25d49e(0x2d5)][_0x25d49e(0x350)](_0xfb731e);}),this[_0x52ff67(0x2f6)]['on'](_0x52ff67(0x341),async(_0x37fa8d,_0x404b62)=>{const _0x452b71=_0x52ff67,_0x2fdf07=(await this[_0x452b71(0x358)][_0x452b71(0x247)]())[_0x452b71(0x2e8)](_0xa2e5e=>_0xa2e5e['id']===_0x404b62[_0x452b71(0x267)]?.['id'])||null;this[_0x452b71(0x2d5)][_0x452b71(0x2df)](_0x2fdf07,_0x404b62[_0x452b71(0x355)]);}),this[_0x52ff67(0x2f6)]['on'](_0x52ff67(0x283),(_0x139538,{error:_0x39c011,interactionId:_0x2c0600,fileName:_0x5c4aea,url:_0x29b41d,sourceId:_0x410d69,sourceLabel:_0x51d190})=>{const _0x3bdf1d=_0x52ff67,_0xaee724=_0x2c0600?_0x2c0600+':'+_0xafb963():_0xafb963();_0x39c011[_0x3bdf1d(0x2ed)][_0x3bdf1d(0x329)](_0x3bdf1d(0x311))?this[_0x3bdf1d(0x2d5)][_0x3bdf1d(0x342)]({'staticMessage':_0x130df6(this[_0x3bdf1d(0x33f)][_0x3bdf1d(0x28b)],_0x3bdf1d(0x2f9)),'id':_0xaee724}):_0x39c011[_0x3bdf1d(0x2ed)][_0x3bdf1d(0x329)](_0x3bdf1d(0x288))||_0x39c011[_0x3bdf1d(0x2ed)][_0x3bdf1d(0x329)](_0x3bdf1d(0x2fa))?(this[_0x3bdf1d(0x2d5)][_0x3bdf1d(0x2af)]({'errorMessage':_0x130df6(this[_0x3bdf1d(0x33f)][_0x3bdf1d(0x28b)],_0x3bdf1d(0x345)),'id':_0xaee724}),this[_0x3bdf1d(0x2de)](_0x39c011)):_0x39c011[_0x3bdf1d(0x2ed)][_0x3bdf1d(0x329)](_0x3bdf1d(0x1f9))?this[_0x3bdf1d(0x2d5)][_0x3bdf1d(0x2af)]({'errorMessage':_0x130df6(this[_0x3bdf1d(0x33f)][_0x3bdf1d(0x28b)],_0x3bdf1d(0x21c),_0x5c4aea),'id':_0xaee724}):_0x39c011[_0x3bdf1d(0x2ed)][_0x3bdf1d(0x329)](_0x3bdf1d(0x225))?this[_0x3bdf1d(0x2d5)][_0x3bdf1d(0x2af)]({'errorMessage':_0x130df6(this[_0x3bdf1d(0x33f)][_0x3bdf1d(0x28b)],_0x3bdf1d(0x2db),_0x29b41d),'id':_0xaee724}):_0x39c011[_0x3bdf1d(0x2ed)][_0x3bdf1d(0x329)](_0x3bdf1d(0x34b))?this[_0x3bdf1d(0x2d5)][_0x3bdf1d(0x2af)]({'errorMessage':_0x130df6(this[_0x3bdf1d(0x33f)][_0x3bdf1d(0x28b)],_0x3bdf1d(0x2cc)),'id':_0xaee724}):_0x39c011[_0x3bdf1d(0x2ed)][_0x3bdf1d(0x329)](_0x3bdf1d(0x331))?this[_0x3bdf1d(0x2d5)][_0x3bdf1d(0x2af)]({'errorMessage':_0x130df6(this[_0x3bdf1d(0x33f)][_0x3bdf1d(0x28b)],_0x3bdf1d(0x35e)),'id':_0xaee724}):_0x39c011[_0x3bdf1d(0x2ed)][_0x3bdf1d(0x329)](_0x3bdf1d(0x315))?(_0x410d69&&this[_0x3bdf1d(0x2d5)][_0x3bdf1d(0x318)](_0x410d69),this[_0x3bdf1d(0x2d5)][_0x3bdf1d(0x2af)]({'errorMessage':_0x130df6(this[_0x3bdf1d(0x33f)][_0x3bdf1d(0x28b)],_0x3bdf1d(0x314),_0x51d190||_0x3bdf1d(0x1da)),'id':_0xaee724}),this[_0x3bdf1d(0x2de)](_0x39c011)):_0x39c011[_0x3bdf1d(0x2ed)][_0x3bdf1d(0x329)](_0x3bdf1d(0x349))?(this[_0x3bdf1d(0x2d5)][_0x3bdf1d(0x2af)]({'errorMessage':_0x130df6(this[_0x3bdf1d(0x33f)][_0x3bdf1d(0x28b)],_0x3bdf1d(0x244)),'id':_0xaee724}),this[_0x3bdf1d(0x2de)](_0x39c011)):_0x39c011[_0x3bdf1d(0x2ed)][_0x3bdf1d(0x329)](_0x3bdf1d(0x2e5))?(this[_0x3bdf1d(0x2d5)][_0x3bdf1d(0x2af)]({'errorMessage':_0x130df6(this[_0x3bdf1d(0x33f)][_0x3bdf1d(0x28b)],_0x3bdf1d(0x23a)),'id':_0xaee724}),this[_0x3bdf1d(0x2de)](_0x39c011)):_0x39c011[_0x3bdf1d(0x2ed)][_0x3bdf1d(0x329)](_0x3bdf1d(0x1fe))?(this[_0x3bdf1d(0x2d5)][_0x3bdf1d(0x2af)]({'errorMessage':_0x130df6(this[_0x3bdf1d(0x33f)][_0x3bdf1d(0x28b)],_0x3bdf1d(0x20a)),'id':_0xaee724}),this[_0x3bdf1d(0x2de)](_0x39c011)):_0x39c011[_0x3bdf1d(0x2ed)][_0x3bdf1d(0x329)](_0x3bdf1d(0x302))?(this[_0x3bdf1d(0x2d5)][_0x3bdf1d(0x2af)]({'errorMessage':_0x130df6(this[_0x3bdf1d(0x33f)][_0x3bdf1d(0x28b)],_0x3bdf1d(0x24b)),'id':_0xaee724}),this[_0x3bdf1d(0x2de)](_0x39c011)):_0x39c011[_0x3bdf1d(0x2ed)][_0x3bdf1d(0x329)](_0x3bdf1d(0x281))?(this[_0x3bdf1d(0x2d5)][_0x3bdf1d(0x2af)]({'errorMessage':_0x130df6(this[_0x3bdf1d(0x33f)][_0x3bdf1d(0x28b)],_0x3bdf1d(0x2aa)),'id':_0xaee724}),this[_0x3bdf1d(0x2de)](_0x39c011)):_0x39c011[_0x3bdf1d(0x2ed)][_0x3bdf1d(0x329)](_0x3bdf1d(0x2c2))?(this[_0x3bdf1d(0x2d5)][_0x3bdf1d(0x2af)]({'errorMessage':_0x130df6(this[_0x3bdf1d(0x33f)][_0x3bdf1d(0x28b)],_0x3bdf1d(0x227)),'id':_0xaee724}),this[_0x3bdf1d(0x2de)](_0x39c011)):(this[_0x3bdf1d(0x2d5)][_0x3bdf1d(0x2af)]({'errorMessage':_0x130df6(this[_0x3bdf1d(0x33f)][_0x3bdf1d(0x28b)],_0x3bdf1d(0x293)),'id':_0xaee724}),this[_0x3bdf1d(0x2de)](_0x39c011));}),await this[_0x52ff67(0x2f6)][_0x52ff67(0x270)](this[_0x52ff67(0x33f)][_0x52ff67(0x2c6)][_0x52ff67(0x2c4)](_0x52ff67(0x307))),_0x32852c||await this[_0x52ff67(0x2f6)][_0x52ff67(0x212)]();}async[_0x5445bf(0x2a0)]({userMessage:_0x5988f8,attributes:_0x3cbaef}){const _0x5ad005=_0x5445bf;if(!this[_0x5ad005(0x2f6)])throw new _0x37642f(_0x5ad005(0x257));if(this[_0x5ad005(0x2f6)][_0x5ad005(0x2ae)]()){const _0x368720=await this[_0x5ad005(0x273)][_0x5ad005(0x232)]();await this[_0x5ad005(0x2f6)][_0x5ad005(0x1fd)](_0x368720);}this[_0x5ad005(0x2f6)]['id']&&this[_0x5ad005(0x2f6)][_0x5ad005(0x250)]&&await this[_0x5ad005(0x2f6)][_0x5ad005(0x2c8)]({'userMessage':_0x5988f8,'attributes':_0x3cbaef});}[_0x5445bf(0x30f)](){const _0x5ada8b=_0x5445bf;console[_0x5ada8b(0x32a)](_0x5ada8b(0x32f));}[_0x5445bf(0x235)](_0xbbcbe){const _0x6bdb51=_0x5445bf;this[_0x6bdb51(0x2d5)][_0x6bdb51(0x201)](_0xbbcbe);}[_0x5445bf(0x2de)](_0x3b3c09){const _0x57c951=_0x5445bf;_0x32f4ac(_0x3b3c09[_0x57c951(0x2ed)]);}[_0x5445bf(0x2bd)](_0x3c6be9){const _0x32ebb5=_0x5445bf;this[_0x32ebb5(0x2f6)]?.[_0x32ebb5(0x1d8)](_0x3c6be9);}[_0x5445bf(0x2a2)](){const _0x49913e=_0x5445bf;this[_0x49913e(0x2f6)]?.[_0x49913e(0x348)]();}[_0x5445bf(0x339)](){const _0x29bfaf=_0x5445bf;this[_0x29bfaf(0x2f6)]?.[_0x29bfaf(0x32e)]();}[_0x5445bf(0x31d)](_0x5e32d5){const _0x51f207=_0x5445bf,[_0x5dc2fa,_0x174bfd]=_0x5e32d5[_0x51f207(0x224)](':'),_0x1dd281=this[_0x51f207(0x2f6)][_0x51f207(0x326)](_0x5dc2fa),_0x37bf47=_0x1dd281[_0x51f207(0x216)](_0x174bfd);return{'interaction':_0x1dd281,'reply':_0x37bf47};}[_0x5445bf(0x297)](_0x418ff7,_0xba7568=!0x1){const _0x134fe7=_0x5445bf,_0x1fc5df=_0x1cd8a8(this[_0x134fe7(0x33f)]),_0x1a2bf4={'target':_0x1fc5df[_0x134fe7(0x1ed)][_0x134fe7(0x28c)][_0x134fe7(0x30a)][_0x134fe7(0x261)](_0x1fc5df[_0x134fe7(0x1ed)][_0x134fe7(0x23f)][_0x134fe7(0x1f3)](_0x418ff7)),'viewportOffset':{'top':0x96,'left':0x0,'bottom':0x32,'right':0x0},'ancestorOffset':0x14,'alignToTop':_0xba7568};_0xba7568&&(_0x1a2bf4[_0x134fe7(0x29e)]=!0x0),_0x2cdfe0(_0x1a2bf4);}[_0x5445bf(0x344)](_0x5e8014,_0x5cfb55=!0x1){const _0xfd4766=_0x5445bf;this[_0xfd4766(0x2d5)][_0xfd4766(0x213)](_0x5e8014||_0x130df6(this[_0xfd4766(0x33f)][_0xfd4766(0x28b)],_0xfd4766(0x231)),_0x5cfb55);}async[_0x5445bf(0x217)]({reply:_0x31488a,renderingStrategy:_0x321bd8}){const _0x1190ba=_0x5445bf,{id:_0x1e4ccf,interactionId:_0x3f7284,isDone:_0x4cc20e,type:_0x33b7ba,parsedContent:_0xaee533}=_0x31488a,_0x4996e1=_0x3f7284+':'+_0x1e4ccf;if(_0x1190ba(0x21a)===_0x33b7ba){const _0x5f0f29=_0x31488a[_0x1190ba(0x2b8)]({'showDiff':this[_0x1190ba(0x2d5)][_0x1190ba(0x245)]});await this[_0x1190ba(0x2d5)][_0x1190ba(0x254)]({'id':_0x4996e1,'parts':_0x5f0f29,'renderingStrategy':_0x321bd8,'isDone':_0x4cc20e});}else _0x1190ba(0x28d)===_0x33b7ba&&await this[_0x1190ba(0x2d5)][_0x1190ba(0x2c0)]({'id':_0x4996e1,'parsedContent':_0xaee533,'renderingStrategy':_0x321bd8,'isDone':_0x4cc20e});_0x4cc20e&&_0x31488a[_0x1190ba(0x35a)][_0x1190ba(0x353)]>0x0&&this[_0x1190ba(0x2d5)][_0x1190ba(0x2ef)](_0x4996e1,_0x31488a[_0x1190ba(0x35a)]);}async[_0x5445bf(0x320)](){const _0x5c17a9=_0x5445bf,_0x57a9f6=this[_0x5c17a9(0x2f6)]?.[_0x5c17a9(0x219)];_0x57a9f6&&(_0x57a9f6[_0x5c17a9(0x2e4)](),this[_0x5c17a9(0x2d5)][_0x5c17a9(0x1fc)](_0x57a9f6));}async[_0x5445bf(0x1ea)](){const _0xb648e5=_0x5445bf,_0x4b70d4=this[_0xb648e5(0x2f6)]?.[_0xb648e5(0x219)];if(_0x4b70d4){for await(const _0x3c2e03 of _0x4b70d4[_0xb648e5(0x21b)])await this[_0xb648e5(0x217)]({'reply':_0x3c2e03,'renderingStrategy':_0xb648e5(0x322)});}}[_0x5445bf(0x1de)](_0x459059){const _0x5d0f8c=_0x5445bf,_0x123361={'positiveCount':_0x459059[_0x5d0f8c(0x25b)][_0x5d0f8c(0x2fb)](_0x11a6e1=>_0x5d0f8c(0x308)===_0x11a6e1[_0x5d0f8c(0x233)])[_0x5d0f8c(0x353)],'totalCount':_0x459059[_0x5d0f8c(0x25b)][_0x5d0f8c(0x353)],'modificationId':_0x459059['id']},_0x58f5d3=this[_0x5d0f8c(0x2f6)][_0x5d0f8c(0x326)](_0x459059[_0x5d0f8c(0x2a6)])[_0x5d0f8c(0x298)];_0x58f5d3&&this[_0x5d0f8c(0x268)][_0x5d0f8c(0x271)](this[_0x5d0f8c(0x2f6)]['id'],_0x58f5d3,_0x123361);}[_0x5445bf(0x35b)](_0x15e102){const _0x252c05=_0x5445bf;let _0x1e41a7=null,_0x352990=null;this['on'](_0x252c05(0x211),(_0x5c2eaf,_0x5b4627,_0x55cc76)=>{const _0x55fb83=_0x252c05;_0x55cc76['id']!==_0x1e41a7&&(_0x1e41a7=_0x55cc76['id'],_0x352990=this[_0x55fb83(0x352)](_0x55cc76)),_0x15e102(_0x5b4627,_0x352990);});}[_0x5445bf(0x352)](_0xe1385e){const _0x18df21=_0x5445bf,_0x51b94a=this[_0x18df21(0x2d5)],_0x40b1b6=()=>{const _0x18a0f1=_0x18df21;_0xe1385e[_0x18a0f1(0x26d)](),_0xe1385e[_0x18a0f1(0x27b)](),_0x51b94a[_0x18a0f1(0x347)]();},_0x4a9911=()=>{const _0x51c142=_0x18df21;_0xe1385e[_0x51c142(0x359)]&&(_0xe1385e[_0x51c142(0x359)][_0x51c142(0x1f2)](),_0xe1385e[_0x51c142(0x359)]=void 0x0);};return{'insertTextReply':(_0x54ec78,_0x1036b5)=>{const _0x182aa5=_0x18df21;_0x4a9911(),_0x40b1b6();const _0x58b1a0=_0xe1385e[_0x182aa5(0x359)]=_0xe1385e[_0x182aa5(0x33d)]({'type':_0x182aa5(0x28d),'interactionId':_0xe1385e['id'],'content':_0x54ec78,'id':_0x1036b5||_0xafb963()});return _0x4a9911(),_0x58b1a0;},'insertCustomElement':async(_0x489810,_0x566778)=>(_0x4a9911(),_0x40b1b6(),_0x51b94a[_0x18df21(0x239)](_0x489810,_0x566778||_0xafb963())),'setLoadingMessage':_0x5149c6=>{const _0x22cd4d=_0x18df21;_0x51b94a[_0x22cd4d(0x2bb)](_0x5149c6);},'clearLoadingMessage':()=>{const _0x166166=_0x18df21;_0x51b94a[_0x166166(0x347)]();}};}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0xe28811=_0x4cea;(function(_0x3dc0fd,_0x495654){const _0x3759a6=_0x4cea,_0x4b79ff=_0x3dc0fd();while(!![]){try{const _0x551522=-parseInt(_0x3759a6(0x152))/0x1*(parseInt(_0x3759a6(0x150))/0x2)+-parseInt(_0x3759a6(0x18c))/0x3+parseInt(_0x3759a6(0x169))/0x4*(-parseInt(_0x3759a6(0x1fb))/0x5)+-parseInt(_0x3759a6(0x195))/0x6*(-parseInt(_0x3759a6(0x1a4))/0x7)+-parseInt(_0x3759a6(0x1be))/0x8*(parseInt(_0x3759a6(0x1a6))/0x9)+-parseInt(_0x3759a6(0x1e4))/0xa*(parseInt(_0x3759a6(0x182))/0xb)+parseInt(_0x3759a6(0x1c2))/0xc;if(_0x551522===_0x495654)break;else _0x4b79ff['push'](_0x4b79ff['shift']());}catch(_0x880ddc){_0x4b79ff['push'](_0x4b79ff['shift']());}}}(_0x14e9,0x67849));function _0x4cea(_0x2a9f7f,_0x2b73b9){const _0x14e92b=_0x14e9();return _0x4cea=function(_0x4ceae8,_0x4274f5){_0x4ceae8=_0x4ceae8-0x14d;let _0x41060e=_0x14e92b[_0x4ceae8];return _0x41060e;},_0x4cea(_0x2a9f7f,_0x2b73b9);}import{ContextPlugin as _0x14d162}from'ckeditor5/src/core.js';import{_isMotionReduced as _0x140a1c}from'ckeditor5/src/utils.js';import{AIChatView as _0x31b1c0}from'./ui/aichatview.js';import{AITabs as _0x1ca5d9}from'../aitabs/aitabs.js';import{getTranslation as _0x43b0a6}from'../aicore/utils/common-translations.js';import{IconAIChat as _0x2d062d}from'ckeditor5/src/icons.js';import{AIChatFeedInteractionHeaderView as _0x30b8f9}from'./ui/feed/aichatfeedinteractionheaderview.js';import{PromiseQueue as _0x59fa61}from'./utils/promisequeue.js';import{AI_CHAT_UI_EVENT_NAMES as _0x328b22}from'./utils/eventnames.js';import'../../theme/aichat/aichat.css';import{getEditorFromContext as _0x485934}from'../aicore/utils/geteditorfromcontext.js';import{AI_REPLY_ACTIONS as _0x4da602}from'./ui/feed/aichatfeedsuggestionitemactionsview.js';function _0x14e9(){const _0x57f402=['1uRGbvh','interaction-header','populateSourceResourceBalloon','ai-suggestion-reply','set','label','isMaximized','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REASONING','removeItem','isModelAvailable','addFeedItemAISuggestion','enableModelSelector','AI_CHAT_HEADING','disableControls','availableModels','hasFeedItem','renderingStrategy','scrollToSuggestion','conversation-start','isReasoningEnabled','clearConversationContextUI','updateWebSources','has','853112fmBmUj','AITabs','enqueue','addFeedItemCustomElement','setFeedItemAIReplySuggestionPartActive','clear','from','AI_CHAT_WELCOME_MESSAGE','createConversation','pluginName','closeSourceResourceBalloon','areActionsDisabled','fire','focusPromptInput','toggleLoadingSkeleton','setWebSearch','contextItems','setInputPlaceholder','chat','isLoading','forEach','updateCapabilities','showDiff','_view','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH','2981XBdrvy','scrollFeedToSuggestion','getItemIds','displayedPrompt','_interactionPromiseResolver','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REGULAR','setSuggestionPartActive','length','resetMessageInput','ai.chat.welcomeMessage','2265105wauhxl','feedItemRenderingStrategy','destroy','streaming','resetConversationTitle','locale','showResizeButton','TrackChanges','addItem','102aMIQhF','children','chatFeed','setConversationTitle','setLoadingMessage','setConversationContext','addFeedItemStaticMessage','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH_REASONING','values','stopInteraction','removeContextItem','capabilities','updateFeedItemAIReplySuggestionPartState','isPending','clearPendingContextUI','21329qxvZIR','AI_CHAT_FEED_LOADING_MESSAGE_REGULAR','9chqgpC','AIChatUI','setAddContextOptions','conversationCreated','_titleAnimationInterval','then','addContextItem','addFeedItemAIReply','finishInteraction','setModelList','plugins','delegate','error-message','disableModelSelector','isTrackChangesOn','updateFeedInteractionHeader','userMessage','hasItem','isDisabled','removeFeedInteraction','startInteraction','queueEmptyPromise','addTab','setFeedItemRenderingStrategy','6275896rClYLr','updateSuggestionItem','setIsUploadInProgress','requires','34709856QNfbOE','trackChanges','options','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH','removeFeedItem','</p>','ai.models.showModelSelector','setIsMaximized','isPremiumPlugin','markFeedItemAsDone','addFeedItemError','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH_REASONING','chatHeader','commands','config','stopAutoScroll','ai.chat.context.searchInputVisibleFrom','startAutoScroll','setPromptInputValue','updateFeedItemAIReplySuggestionContent','get','addFeedItemUserMessage','abort','isBusy','context','user-message','_isTrackChangesCommandValueBound','setContextItemLoading','markItemAsDone','_promiseQueue','updateReplyItem','setModel','insertSuggestion','updateFeedItemAIReplyContent','7270bmnOsC','remove','prepareLoadingMessage','view','interactionId','ai-reply','last','updateFeedItemAIReplySources','isOfficialPlugin','_animateConversationTitle','updateResourceState','clearLoadingMessage','attributes','setSelectedModel','<p>','filter','startsWith','addFeedInteractionHeader','toggleSuggestionDisplayMode','isWebSearchEnabled','isDone','_getInputPlaceholder','chatControls','10TnsRqM','isVisible','setReasoning','updateSuggestionPartState','AI_CHAT_FEED_LOADING_MESSAGE_REASONING','find','enableControls','ai.availableReplyActions','bind','custom-element','714366HZtqUD','value'];_0x14e9=function(){return _0x57f402;};return _0x14e9();}export class AIChatUI extends _0x14d162{static get[_0xe28811(0x1c1)](){return[_0x1ca5d9];}[_0xe28811(0x180)];static get[_0xe28811(0x172)](){const _0x24bdd0=_0xe28811;return _0x24bdd0(0x1a7);}static get[_0xe28811(0x1ec)](){return!0x0;}static get[_0xe28811(0x1ca)](){return!0x0;}[_0xe28811(0x18d)]=_0xe28811(0x18f);[_0xe28811(0x17f)]=!0x0;[_0xe28811(0x1df)];[_0xe28811(0x186)];[_0xe28811(0x1aa)]=void 0x0;[_0xe28811(0x1dc)]=!0x1;constructor(_0x3f4ffb){const _0x486b14=_0xe28811;super(_0x3f4ffb);const _0xfb0e72=this[_0x486b14(0x1da)][_0x486b14(0x1b0)][_0x486b14(0x1d6)](_0x486b14(0x16a));this[_0x486b14(0x156)](_0x486b14(0x1d9),!0x1),this[_0x486b14(0x1df)]=new _0x59fa61(),this[_0x486b14(0x180)]=new _0x31b1c0(this[_0x486b14(0x1da)][_0x486b14(0x191)],{'showResizeButton':_0xfb0e72[_0x486b14(0x192)],'contextResourcesSearchInputVisibleFrom':this[_0x486b14(0x1da)][_0x486b14(0x1d0)][_0x486b14(0x1d6)](_0x486b14(0x1d2))}),this[_0x486b14(0x180)][_0x486b14(0x1b1)](..._0x328b22)['to'](this),this[_0x486b14(0x180)]['on'](_0x486b14(0x1f6),(_0x39b0d0,{showDiff:_0x1e48a3})=>{const _0x1bcf24=_0x486b14;this[_0x1bcf24(0x17f)]=_0x1e48a3;}),_0xfb0e72[_0x486b14(0x1e7)][_0x486b14(0x1bc)]({'id':_0x486b14(0x17b),'buttonLabel':_0x43b0a6(this[_0x486b14(0x1da)][_0x486b14(0x191)],_0x486b14(0x15e)),'buttonIcon':_0x2d062d,'order':0x0,'content':this[_0x486b14(0x180)]}),this[_0x486b14(0x180)][_0x486b14(0x1fa)][_0x486b14(0x14e)](_0x486b14(0x17c))['to'](this,_0x486b14(0x1d9),_0x5f5bdb=>_0x5f5bdb),this[_0x486b14(0x180)][_0x486b14(0x197)][_0x486b14(0x14e)](_0x486b14(0x1a2))['to'](this,_0x486b14(0x1d9),_0x1470cd=>_0x1470cd),this[_0x486b14(0x180)][_0x486b14(0x1fa)][_0x486b14(0x17a)](this[_0x486b14(0x1f9)]()),this[_0x486b14(0x14e)](_0x486b14(0x15b))['to'](this[_0x486b14(0x180)][_0x486b14(0x1fa)],_0x486b14(0x15b));}[_0xe28811(0x18e)](){const _0x4f35cd=_0xe28811;super[_0x4f35cd(0x18e)](),this[_0x4f35cd(0x1aa)]&&clearInterval(this[_0x4f35cd(0x1aa)]);}[_0xe28811(0x171)](_0x324c4b){const _0x3b5233=_0xe28811,_0x17a28e=this[_0x3b5233(0x1da)][_0x3b5233(0x1d0)][_0x3b5233(0x1d6)](_0x3b5233(0x18b))??_0x43b0a6(this[_0x3b5233(0x1da)][_0x3b5233(0x191)],_0x3b5233(0x170));this[_0x3b5233(0x180)][_0x3b5233(0x197)][_0x3b5233(0x16e)](),this[_0x3b5233(0x180)][_0x3b5233(0x1fa)][_0x3b5233(0x15d)](),this[_0x3b5233(0x180)][_0x3b5233(0x1fa)][_0x3b5233(0x1af)](_0x324c4b[_0x3b5233(0x160)],!this[_0x3b5233(0x1da)][_0x3b5233(0x1d0)][_0x3b5233(0x1d6)](_0x3b5233(0x1c8))),this[_0x3b5233(0x19b)]({'id':_0x3b5233(0x164),'staticMessage':_0x17a28e}),this[_0x3b5233(0x175)](_0x3b5233(0x1a9));}[_0xe28811(0x19b)]({id:_0x53f823,staticMessage:_0x216c98}){const _0x26c390=_0xe28811;this[_0x26c390(0x180)][_0x26c390(0x197)][_0x26c390(0x194)](_0x26c390(0x1e9),{'id':_0x53f823,'initialContent':_0x26c390(0x1f2)+_0x216c98+_0x26c390(0x1c7)});}[_0xe28811(0x1d7)](_0x330ae9){const _0x1e6d16=_0xe28811,_0x39111b=_0x330ae9[_0x1e6d16(0x1f0)]?.[_0x1e6d16(0x185)]||_0x330ae9[_0x1e6d16(0x1b6)];this[_0x1e6d16(0x180)][_0x1e6d16(0x197)][_0x1e6d16(0x194)](_0x1e6d16(0x1db),{'contextItems':Array[_0x1e6d16(0x16f)](_0x330ae9[_0x1e6d16(0x179)][_0x1e6d16(0x19d)]()),'initialContent':_0x1e6d16(0x1f2)+_0x39111b+_0x1e6d16(0x1c7),'id':_0x330ae9['id']});}[_0xe28811(0x1cc)]({errorMessage:_0x10fc7a,id:_0x21a7bc}){const _0xbab9d3=_0xe28811;this[_0xbab9d3(0x180)][_0xbab9d3(0x197)][_0xbab9d3(0x194)](_0xbab9d3(0x1b2),{'initialContent':_0xbab9d3(0x1f2)+_0x10fc7a+_0xbab9d3(0x1c7),'id':_0x21a7bc});}[_0xe28811(0x1ad)](_0x329f29){const _0x4a04d0=_0xe28811;return this[_0x4a04d0(0x1df)][_0x4a04d0(0x16b)](async()=>{const _0x1d447c=_0x4a04d0;this[_0x1d447c(0x180)][_0x1d447c(0x197)][_0x1d447c(0x194)](_0x1d447c(0x1e9),{'id':_0x329f29[_0x1d447c(0x1e8)]+':'+_0x329f29['id']}),this[_0x1d447c(0x1ef)]();});}async[_0xe28811(0x15c)](_0x32e39a){const _0x5b2d57=_0xe28811,_0x39708f=_0x485934(this[_0x5b2d57(0x1da)]);let _0x1f95ff=_0x39708f[_0x5b2d57(0x1d0)][_0x5b2d57(0x1d6)](_0x5b2d57(0x14d))||[..._0x4da602];if(_0x39708f[_0x5b2d57(0x1b0)][_0x5b2d57(0x168)](_0x5b2d57(0x193))){if(!this[_0x5b2d57(0x1dc)]){this[_0x5b2d57(0x1dc)]=!0x0;const _0x2f6a42=_0x39708f[_0x5b2d57(0x1cf)][_0x5b2d57(0x1d6)](_0x5b2d57(0x1c3));this[_0x5b2d57(0x180)][_0x5b2d57(0x197)][_0x5b2d57(0x14e)](_0x5b2d57(0x1b4))['to'](_0x2f6a42,_0x5b2d57(0x151));}}else _0x1f95ff=_0x1f95ff[_0x5b2d57(0x1f3)](_0x12dfea=>_0x5b2d57(0x1e2)!=_0x12dfea);return this[_0x5b2d57(0x1df)][_0x5b2d57(0x16b)](async()=>{const _0x396b3b=_0x5b2d57;this[_0x396b3b(0x180)][_0x396b3b(0x197)][_0x396b3b(0x194)](_0x396b3b(0x155),{'id':_0x32e39a[_0x396b3b(0x1e8)]+':'+_0x32e39a['id'],'areActionsDisabled':_0x32e39a[_0x396b3b(0x174)],'showDiff':this[_0x396b3b(0x17f)],'availableActions':_0x1f95ff}),this[_0x396b3b(0x1ef)]();});}[_0xe28811(0x1f5)](_0x3852f4,_0x22e882){const _0x43a3c7=_0xe28811,_0x1a0dd8=this[_0x43a3c7(0x180)][_0x43a3c7(0x197)][_0x43a3c7(0x196)][_0x43a3c7(0x1ea)];if(_0x1a0dd8 instanceof _0x30b8f9)return this[_0x43a3c7(0x180)][_0x43a3c7(0x197)][_0x43a3c7(0x196)][_0x43a3c7(0x1e5)](_0x1a0dd8),void this[_0x43a3c7(0x180)][_0x43a3c7(0x197)][_0x43a3c7(0x194)](_0x43a3c7(0x153),{'id':_0x3852f4['id'],'capabilities':{'isWebSearchEnabled':_0x1a0dd8[_0x43a3c7(0x1a0)][_0x43a3c7(0x1f7)]||_0x22e882[_0x43a3c7(0x1f7)],'isReasoningEnabled':_0x1a0dd8[_0x43a3c7(0x1a0)][_0x43a3c7(0x165)]||_0x22e882[_0x43a3c7(0x165)]}});this[_0x43a3c7(0x180)][_0x43a3c7(0x197)][_0x43a3c7(0x194)](_0x43a3c7(0x153),{'id':_0x3852f4['id'],'capabilities':_0x22e882});}async[_0xe28811(0x16c)](_0x3f80b4,_0x92c826){const _0x149593=_0xe28811;let _0x1c69eb;return await this[_0x149593(0x1df)][_0x149593(0x16b)](async()=>{const _0x34270b=_0x149593;_0x1c69eb=this[_0x34270b(0x180)][_0x34270b(0x197)][_0x34270b(0x194)](_0x34270b(0x14f),{'content':_0x3f80b4,'id':_0x92c826});}),_0x1c69eb;}[_0xe28811(0x1c6)](_0x3abed5){const _0x87c35f=_0xe28811;this[_0x87c35f(0x180)][_0x87c35f(0x197)][_0x87c35f(0x15a)](_0x3abed5);}[_0xe28811(0x161)](_0xa1fec){const _0x429064=_0xe28811;return this[_0x429064(0x180)][_0x429064(0x197)][_0x429064(0x1b7)](_0xa1fec);}[_0xe28811(0x1b5)](_0xef2939){const _0x3293cb=_0xe28811,_0x3ff96a=this[_0x3293cb(0x180)][_0x3293cb(0x197)][_0x3293cb(0x196)][_0x3293cb(0x200)](_0x22920d=>_0x22920d[_0x3293cb(0x1c4)]['id']==_0xef2939['id']&&_0x22920d instanceof _0x30b8f9);_0x3ff96a&&_0x3ff96a[_0x3293cb(0x156)](_0x3293cb(0x1fc),_0xef2939[_0x3293cb(0x1fc)]);}async[_0xe28811(0x1e3)](_0x2d3749){const _0x1244a8=_0xe28811,_0x3a4131=_0x2d3749[_0x1244a8(0x162)]||this[_0x1244a8(0x18d)];return this[_0x1244a8(0x1df)][_0x1244a8(0x16b)](async _0xaf7184=>{const _0x2abc08=_0x1244a8;await this[_0x2abc08(0x180)][_0x2abc08(0x197)][_0x2abc08(0x1e0)]({..._0x2d3749,'abortSignal':_0xaf7184,'renderingStrategy':_0x3a4131}),_0x2d3749[_0x2abc08(0x1f8)]&&this[_0x2abc08(0x1cb)](_0x2d3749['id']);});}[_0xe28811(0x1eb)](_0x2e47d1,_0x5c847e){const _0x1f9c88=_0xe28811;this[_0x1f9c88(0x180)][_0x1f9c88(0x197)][_0x1f9c88(0x167)](_0x2e47d1,_0x5c847e);}async[_0xe28811(0x1d5)](_0x4fd832){const _0xe0098b=_0xe28811,_0x468aea=_0x4fd832[_0xe0098b(0x162)]||this[_0xe0098b(0x18d)];return this[_0xe0098b(0x1df)][_0xe0098b(0x16b)](async _0x52d934=>{const _0x17bc55=_0xe0098b;await this[_0x17bc55(0x180)][_0x17bc55(0x197)][_0x17bc55(0x1bf)]({..._0x4fd832,'abortSignal':_0x52d934,'renderingStrategy':_0x468aea}),_0x4fd832[_0x17bc55(0x1f8)]&&this[_0x17bc55(0x1cb)](_0x4fd832['id']);});}[_0xe28811(0x1a1)](_0x1d3de4){const _0x357e3f=_0xe28811;this[_0x357e3f(0x180)][_0x357e3f(0x197)][_0x357e3f(0x1fe)](_0x1d3de4);}[_0xe28811(0x16d)](_0x57aecb){const _0x4040c5=_0xe28811;this[_0x4040c5(0x180)][_0x4040c5(0x197)][_0x4040c5(0x188)](_0x57aecb);}[_0xe28811(0x1cb)](_0x816e9d){const _0x343928=_0xe28811;this[_0x343928(0x180)][_0x343928(0x197)][_0x343928(0x1de)](_0x816e9d);}[_0xe28811(0x1b9)](_0x31c978){const _0x127a3f=_0xe28811;this[_0x127a3f(0x180)][_0x127a3f(0x197)][_0x127a3f(0x184)]()[_0x127a3f(0x1f3)](_0x100254=>_0x100254[_0x127a3f(0x1f4)](_0x31c978))[_0x127a3f(0x17d)](_0x35fd43=>this[_0x127a3f(0x180)][_0x127a3f(0x197)][_0x127a3f(0x15a)](_0x35fd43));}[_0xe28811(0x1ba)](){const _0x436a63=_0xe28811,_0x5f64ef=this[_0x436a63(0x1e6)]({'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x1});this[_0x436a63(0x199)](_0x5f64ef),this[_0x436a63(0x180)][_0x436a63(0x1fa)][_0x436a63(0x1b3)](!this[_0x436a63(0x1da)][_0x436a63(0x1d0)][_0x436a63(0x1d6)](_0x436a63(0x1c8))),this[_0x436a63(0x1d9)]=!0x0,this[_0x436a63(0x180)][_0x436a63(0x197)][_0x436a63(0x1d3)]();}[_0xe28811(0x19e)](_0x3438bc){const _0x4668c6=_0xe28811;this[_0x4668c6(0x1df)][_0x4668c6(0x1d8)](),this[_0x4668c6(0x180)][_0x4668c6(0x197)][_0x4668c6(0x184)]()[_0x4668c6(0x1f3)](_0x33c26a=>_0x33c26a[_0x4668c6(0x1f4)](_0x3438bc['id']))[_0x4668c6(0x17d)](_0x1011d2=>this[_0x4668c6(0x1cb)](_0x1011d2)),this[_0x4668c6(0x1d9)]=!0x1,this[_0x4668c6(0x180)][_0x4668c6(0x197)][_0x4668c6(0x1d1)]();}async[_0xe28811(0x1ae)](){const _0x1351b4=_0xe28811;return this[_0x1351b4(0x1df)][_0x1351b4(0x1bb)][_0x1351b4(0x1ab)](()=>{const _0x568075=_0x1351b4;this[_0x568075(0x1d9)]=!0x1,this[_0x568075(0x180)][_0x568075(0x197)][_0x568075(0x1d1)]();});}[_0xe28811(0x1ac)](_0x44ea04,_0x5f5758){const _0x4c7f11=_0xe28811;this[_0x4c7f11(0x180)][_0x4c7f11(0x1fa)][_0x4c7f11(0x1ac)](_0x44ea04,_0x5f5758);}[_0xe28811(0x19f)](_0x9b3631){const _0x250653=_0xe28811;this[_0x250653(0x180)][_0x250653(0x1fa)][_0x250653(0x19f)](_0x9b3631);}[_0xe28811(0x1dd)](_0x1e7166,_0x188903){const _0x4ca598=_0xe28811;this[_0x4ca598(0x180)][_0x4ca598(0x1fa)][_0x4ca598(0x1dd)](_0x1e7166,_0x188903);}[_0xe28811(0x1c0)](_0x185fb5){const _0xfe82be=_0xe28811;this[_0xfe82be(0x180)][_0xfe82be(0x1fa)][_0xfe82be(0x1c0)](_0x185fb5);}[_0xe28811(0x19a)](_0x4724c5){const _0x49ae21=_0xe28811;this[_0x49ae21(0x180)][_0x49ae21(0x1fa)][_0x49ae21(0x19a)](_0x4724c5);}[_0xe28811(0x1a3)](){const _0x4f1c87=_0xe28811;this[_0x4f1c87(0x180)][_0x4f1c87(0x1fa)][_0x4f1c87(0x1a3)]();}[_0xe28811(0x166)](){const _0x487782=_0xe28811;this[_0x487782(0x180)][_0x487782(0x1fa)][_0x487782(0x166)]();}[_0xe28811(0x1ee)](_0x397d80,_0x28c990,_0x107606){const _0x57e84d=_0xe28811;this[_0x57e84d(0x180)][_0x57e84d(0x1fa)][_0x57e84d(0x1ee)](_0x397d80,_0x28c990,_0x107606);}[_0xe28811(0x18a)](){const _0x511c47=_0xe28811;this[_0x511c47(0x180)][_0x511c47(0x1fa)][_0x511c47(0x18a)](),this[_0x511c47(0x180)][_0x511c47(0x1fa)][_0x511c47(0x17a)](this[_0x511c47(0x1f9)]());}[_0xe28811(0x1a8)](_0x227f4a){const _0x11c8dd=_0xe28811;this[_0x11c8dd(0x180)][_0x11c8dd(0x1fa)][_0x11c8dd(0x1a8)](_0x227f4a);}[_0xe28811(0x17e)](_0x12a33d){const _0x1e0eca=_0xe28811;this[_0x1e0eca(0x180)][_0x1e0eca(0x1fa)][_0x1e0eca(0x178)](_0x12a33d[_0x1e0eca(0x1f7)]),this[_0x1e0eca(0x180)][_0x1e0eca(0x1fa)][_0x1e0eca(0x1fd)](_0x12a33d[_0x1e0eca(0x165)]),this[_0x1e0eca(0x180)][_0x1e0eca(0x1fa)][_0x1e0eca(0x17a)](this[_0x1e0eca(0x1f9)](_0x12a33d));}[_0xe28811(0x1f1)](_0x1a6243,_0x5add5e){const _0x2ebef2=_0xe28811;this[_0x2ebef2(0x180)][_0x2ebef2(0x1fa)][_0x2ebef2(0x1e1)](_0x1a6243),_0x5add5e&&this[_0x2ebef2(0x180)][_0x2ebef2(0x1fa)][_0x2ebef2(0x1b3)](!0x1);}[_0xe28811(0x1bd)](_0x25352c){const _0x1c2a20=_0xe28811;this[_0x1c2a20(0x18d)]=_0x25352c;}[_0xe28811(0x177)](_0x535e85){const _0x4489f2=_0xe28811;this[_0x4489f2(0x180)][_0x4489f2(0x197)][_0x4489f2(0x177)](_0x535e85);}[_0xe28811(0x190)](){const _0x29846a=_0xe28811;this[_0x29846a(0x198)](_0x43b0a6(this[_0x29846a(0x1da)][_0x29846a(0x191)],_0x29846a(0x15e)));}[_0xe28811(0x198)](_0x1515e9,_0x14f235=!0x1){const _0x35a7b8=_0xe28811;if(_0x14f235&&!_0x140a1c()&&_0x1515e9[_0x35a7b8(0x189)])return this[_0x35a7b8(0x180)][_0x35a7b8(0x1ce)][_0x35a7b8(0x157)]='',void this[_0x35a7b8(0x1ed)](_0x1515e9);this[_0x35a7b8(0x180)][_0x35a7b8(0x1ce)][_0x35a7b8(0x157)]=_0x1515e9;}[_0xe28811(0x199)](_0x1581c8){const _0x3c2ae4=_0xe28811;this[_0x3c2ae4(0x180)][_0x3c2ae4(0x197)][_0x3c2ae4(0x199)](_0x1581c8);}[_0xe28811(0x1ef)](){const _0x10d8ec=_0xe28811;this[_0x10d8ec(0x180)][_0x10d8ec(0x197)][_0x10d8ec(0x199)]('');}[_0xe28811(0x1ed)](_0x58bca1){const _0x3e8a3f=_0xe28811;let _0x16268c=0x0;clearInterval(this[_0x3e8a3f(0x1aa)]),this[_0x3e8a3f(0x1aa)]=setInterval(()=>{const _0x5f39fa=_0x3e8a3f;this[_0x5f39fa(0x180)][_0x5f39fa(0x1ce)][_0x5f39fa(0x157)]=this[_0x5f39fa(0x180)][_0x5f39fa(0x1ce)][_0x5f39fa(0x157)]+_0x58bca1[_0x16268c],_0x16268c++,_0x16268c===_0x58bca1[_0x5f39fa(0x189)]&&clearInterval(this[_0x5f39fa(0x1aa)]);},0x1e);}[_0xe28811(0x1c9)](_0x4a77f9){const _0x145335=_0xe28811;this[_0x145335(0x180)][_0x145335(0x1ce)][_0x145335(0x158)]=_0x4a77f9;}[_0xe28811(0x1e6)](_0x36c89f){const _0x128a8f=_0xe28811;return _0x36c89f[_0x128a8f(0x1f7)]&&_0x36c89f[_0x128a8f(0x165)]?_0x43b0a6(this[_0x128a8f(0x1da)][_0x128a8f(0x191)],_0x128a8f(0x1cd)):_0x36c89f[_0x128a8f(0x1f7)]?_0x43b0a6(this[_0x128a8f(0x1da)][_0x128a8f(0x191)],_0x128a8f(0x1c5)):_0x36c89f[_0x128a8f(0x165)]?_0x43b0a6(this[_0x128a8f(0x1da)][_0x128a8f(0x191)],_0x128a8f(0x1ff)):_0x43b0a6(this[_0x128a8f(0x1da)][_0x128a8f(0x191)],_0x128a8f(0x1a5));}[_0xe28811(0x1f9)](_0x230fd0){const _0x678ff0=_0xe28811;return _0x230fd0?_0x230fd0[_0x678ff0(0x1f7)]&&_0x230fd0[_0x678ff0(0x165)]?_0x43b0a6(this[_0x678ff0(0x1da)][_0x678ff0(0x191)],_0x678ff0(0x19c)):_0x230fd0[_0x678ff0(0x1f7)]?_0x43b0a6(this[_0x678ff0(0x1da)][_0x678ff0(0x191)],_0x678ff0(0x181)):_0x230fd0[_0x678ff0(0x165)]?_0x43b0a6(this[_0x678ff0(0x1da)][_0x678ff0(0x191)],_0x678ff0(0x159)):_0x43b0a6(this[_0x678ff0(0x1da)][_0x678ff0(0x191)],_0x678ff0(0x187)):_0x43b0a6(this[_0x678ff0(0x1da)][_0x678ff0(0x191)],_0x678ff0(0x187));}[_0xe28811(0x154)](_0x3f6118,_0x23e53c,_0x6d23c4,_0x420330){const _0x33fca4=_0xe28811;this[_0x33fca4(0x180)][_0x33fca4(0x154)](_0x3f6118,_0x23e53c,_0x6d23c4,_0x420330);}[_0xe28811(0x173)](_0x4381d9){const _0x402591=_0xe28811;this[_0x402591(0x180)][_0x402591(0x173)](_0x4381d9);}[_0xe28811(0x1d4)](_0x4f10c9){const _0x256972=_0xe28811;this[_0x256972(0x180)][_0x256972(0x1fa)][_0x256972(0x1d4)](_0x4f10c9);}[_0xe28811(0x176)](_0x5bdfd1=!0x1){const _0x5db883=_0xe28811;this[_0x5db883(0x180)][_0x5db883(0x1fa)][_0x5db883(0x176)](_0x5bdfd1);}[_0xe28811(0x183)](_0x4e084e,_0x3e6d54){const _0x50cad8=_0xe28811;this[_0x50cad8(0x180)][_0x50cad8(0x197)][_0x50cad8(0x163)](_0x4e084e,_0x3e6d54);}[_0xe28811(0x1d3)](){const _0x5a7904=_0xe28811;this[_0x5a7904(0x180)][_0x5a7904(0x197)][_0x5a7904(0x1d3)]();}[_0xe28811(0x15f)](){const _0x16058c=_0xe28811;this[_0x16058c(0x180)][_0x16058c(0x1fa)][_0x16058c(0x1b8)]=!0x0;}[_0xe28811(0x201)](){const _0x2a1932=_0xe28811;this[_0x2a1932(0x180)][_0x2a1932(0x1fa)][_0x2a1932(0x1b8)]=!0x1;}}
23
+ const _0x4b8d0e=_0x2ae9;(function(_0x3cb24f,_0x8bd20a){const _0x4aeb7d=_0x2ae9,_0x1a95d=_0x3cb24f();while(!![]){try{const _0x154e41=parseInt(_0x4aeb7d(0x1f4))/0x1+-parseInt(_0x4aeb7d(0x1d0))/0x2+-parseInt(_0x4aeb7d(0x252))/0x3*(parseInt(_0x4aeb7d(0x1c0))/0x4)+parseInt(_0x4aeb7d(0x231))/0x5*(-parseInt(_0x4aeb7d(0x256))/0x6)+parseInt(_0x4aeb7d(0x24d))/0x7+parseInt(_0x4aeb7d(0x245))/0x8+parseInt(_0x4aeb7d(0x244))/0x9*(parseInt(_0x4aeb7d(0x23c))/0xa);if(_0x154e41===_0x8bd20a)break;else _0x1a95d['push'](_0x1a95d['shift']());}catch(_0x1b4cba){_0x1a95d['push'](_0x1a95d['shift']());}}}(_0x3128,0xb8669));import{ContextPlugin as _0x257589}from'ckeditor5/src/core.js';import{_isMotionReduced as _0x2ec60e}from'ckeditor5/src/utils.js';import{AIChatView as _0x1c009d}from'./ui/aichatview.js';function _0x2ae9(_0x5ecc10,_0x4b577a){const _0x312863=_0x3128();return _0x2ae9=function(_0x2ae9df,_0x33e581){_0x2ae9df=_0x2ae9df-0x1aa;let _0x584781=_0x312863[_0x2ae9df];return _0x584781;},_0x2ae9(_0x5ecc10,_0x4b577a);}function _0x3128(){const _0x4d08fa=['set','disableControls','capabilities','find','enableControls','isOfficialPlugin','finishInteraction','updateSuggestionItem','abort','clearPendingContextUI','_promiseQueue','5eahwtY','setSelectedModel','isWebSearchEnabled','displayedPrompt','AI_CHAT_WELCOME_MESSAGE','AITabs','setModelList','addFeedItemAIReply','removeContextItem','showDiff','createConversation','642650UzavHj','updateCapabilities','setReasoning','error-message','user-message','isModelAvailable','ai.models.showModelSelector','addFeedInteractionHeader','315TriQoR','1034352UYBcnc','interactionId','stopAutoScroll','addTab','conversationCreated','from','resetMessageInput','AI_CHAT_FEED_LOADING_MESSAGE_REASONING','1750287MYOJlG','AIChatUI','_animateConversationTitle','disableModelSelector','markFeedItemAsDone','7485aNjuKN','addFeedItemAISuggestion','updateFeedInteractionHeader','prepareLoadingMessage','7058322ovMnfd','length','forEach','setFeedItemRenderingStrategy','custom-element','populateSourceResourceBalloon','isDone','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH_REASONING','chatHeader','removeFeedInteraction','updateFeedItemAIReplySuggestionContent','requires','isDisabled','removeFeedItem','renderingStrategy','TrackChanges','view','attributes','_getInputPlaceholder','<p>','ai.chat.welcomeMessage','insertSuggestion','_titleAnimationInterval','getItemIds','setIsMaximized','isMaximized','has','fire','value','1424vGJAuQ','scrollFeedToSuggestion','clear','startAutoScroll','focusPromptInput','enableModelSelector','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH','showResizeButton','setPromptInputValue','setConversationContext','_view','hasItem','conversation-start','setInputPlaceholder','feedItemRenderingStrategy','removeItem','1676506JKNdtM','_isTrackChangesCommandValueBound','addContextItem','contextItems','closeSourceResourceBalloon','setContextItemLoading','addItem','options','clearConversationContextUI','</p>','delegate','chatControls','isPremiumPlugin','addFeedItemError','setIsUploadInProgress','pluginName','chat','filter','ai-reply','get','addFeedItemStaticMessage','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH','queueEmptyPromise','markItemAsDone','isBusy','remove','interaction-header','plugins','label','AI_CHAT_FEED_LOADING_MESSAGE_REGULAR','resetConversationTitle','setLoadingMessage','clearLoadingMessage','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REASONING','trackChanges','children','1029555QfPpKq','last','isPending','ai.availableReplyActions','destroy','hasFeedItem','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REGULAR','ai-suggestion-reply','availableModels','updateFeedItemAIReplyContent','then','updateFeedItemAIReplySuggestionPartState','stopInteraction','streaming','updateResourceState','setConversationTitle','startsWith','setSuggestionPartActive','scrollToSuggestion','setWebSearch','setAddContextOptions','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH_REASONING','isTrackChangesOn','_interactionPromiseResolver','toggleLoadingSkeleton','AI_CHAT_HEADING','updateFeedItemAIReplySources','enqueue','values','addFeedItemUserMessage','setFeedItemAIReplySuggestionPartActive','context','toggleSuggestionDisplayMode','isReasoningEnabled','areActionsDisabled','ai.chat.context.searchInputVisibleFrom','setModel','isVisible','config','commands','updateWebSources','updateReplyItem','userMessage','isLoading','chatFeed','startInteraction','updateSuggestionPartState','addFeedItemCustomElement','locale','bind'];_0x3128=function(){return _0x4d08fa;};return _0x3128();}import{AITabs as _0x571281}from'../aitabs/aitabs.js';import{getTranslation as _0x1e499c}from'../aicore/utils/common-translations.js';import{IconAIChat as _0x51b551}from'ckeditor5/src/icons.js';import{AIChatFeedInteractionHeaderView as _0xdd15a5}from'./ui/feed/aichatfeedinteractionheaderview.js';import{PromiseQueue as _0x1b679b}from'./utils/promisequeue.js';import{AI_CHAT_UI_EVENT_NAMES as _0x259c61}from'./utils/eventnames.js';import'../../theme/aichat/aichat.css';import{getEditorFromContext as _0x16cdc4}from'../aicore/utils/geteditorfromcontext.js';import{AI_REPLY_ACTIONS as _0x3a212b}from'./ui/feed/aichatfeedsuggestionitemactionsview.js';export class AIChatUI extends _0x257589{static get[_0x4b8d0e(0x1ae)](){return[_0x571281];}[_0x4b8d0e(0x1ca)];static get[_0x4b8d0e(0x1df)](){const _0x32a3a1=_0x4b8d0e;return _0x32a3a1(0x24e);}static get[_0x4b8d0e(0x22b)](){return!0x0;}static get[_0x4b8d0e(0x1dc)](){return!0x0;}[_0x4b8d0e(0x1ce)]=_0x4b8d0e(0x201);[_0x4b8d0e(0x23a)]=!0x0;[_0x4b8d0e(0x230)];[_0x4b8d0e(0x20b)];[_0x4b8d0e(0x1b9)]=void 0x0;[_0x4b8d0e(0x1d1)]=!0x1;constructor(_0x4f429d){const _0x49cf6c=_0x4b8d0e;super(_0x4f429d);const _0x53eaff=this[_0x49cf6c(0x213)][_0x49cf6c(0x1eb)][_0x49cf6c(0x1e3)](_0x49cf6c(0x236));this[_0x49cf6c(0x226)](_0x49cf6c(0x1e8),!0x1),this[_0x49cf6c(0x230)]=new _0x1b679b(),this[_0x49cf6c(0x1ca)]=new _0x1c009d(this[_0x49cf6c(0x213)][_0x49cf6c(0x224)],{'showResizeButton':_0x53eaff[_0x49cf6c(0x1c7)],'contextResourcesSearchInputVisibleFrom':this[_0x49cf6c(0x213)][_0x49cf6c(0x21a)][_0x49cf6c(0x1e3)](_0x49cf6c(0x217))}),this[_0x49cf6c(0x1ca)][_0x49cf6c(0x1da)](..._0x259c61)['to'](this),this[_0x49cf6c(0x1ca)]['on'](_0x49cf6c(0x214),(_0x545ffa,{showDiff:_0x4bd23f})=>{const _0x547b89=_0x49cf6c;this[_0x547b89(0x23a)]=_0x4bd23f;}),_0x53eaff[_0x49cf6c(0x1b3)][_0x49cf6c(0x248)]({'id':_0x49cf6c(0x1e0),'buttonLabel':_0x1e499c(this[_0x49cf6c(0x213)][_0x49cf6c(0x224)],_0x49cf6c(0x20d)),'buttonIcon':_0x51b551,'order':0x0,'content':this[_0x49cf6c(0x1ca)]}),this[_0x49cf6c(0x1ca)][_0x49cf6c(0x1db)][_0x49cf6c(0x225)](_0x49cf6c(0x21f))['to'](this,_0x49cf6c(0x1e8),_0x5d2a5a=>_0x5d2a5a),this[_0x49cf6c(0x1ca)][_0x49cf6c(0x220)][_0x49cf6c(0x225)](_0x49cf6c(0x1f6))['to'](this,_0x49cf6c(0x1e8),_0x35525a=>_0x35525a),this[_0x49cf6c(0x1ca)][_0x49cf6c(0x1db)][_0x49cf6c(0x1cd)](this[_0x49cf6c(0x1b5)]()),this[_0x49cf6c(0x225)](_0x49cf6c(0x241))['to'](this[_0x49cf6c(0x1ca)][_0x49cf6c(0x1db)],_0x49cf6c(0x241));}[_0x4b8d0e(0x1f8)](){const _0x29ac61=_0x4b8d0e;super[_0x29ac61(0x1f8)](),this[_0x29ac61(0x1b9)]&&clearInterval(this[_0x29ac61(0x1b9)]);}[_0x4b8d0e(0x23b)](_0x26a2ab){const _0x124174=_0x4b8d0e,_0x1aabd4=this[_0x124174(0x213)][_0x124174(0x21a)][_0x124174(0x1e3)](_0x124174(0x1b7))??_0x1e499c(this[_0x124174(0x213)][_0x124174(0x224)],_0x124174(0x235));this[_0x124174(0x1ca)][_0x124174(0x220)][_0x124174(0x1c2)](),this[_0x124174(0x1ca)][_0x124174(0x1db)][_0x124174(0x1c5)](),this[_0x124174(0x1ca)][_0x124174(0x1db)][_0x124174(0x237)](_0x26a2ab[_0x124174(0x1fc)],!this[_0x124174(0x213)][_0x124174(0x21a)][_0x124174(0x1e3)](_0x124174(0x242))),this[_0x124174(0x1e4)]({'id':_0x124174(0x1cc),'staticMessage':_0x1aabd4}),this[_0x124174(0x1be)](_0x124174(0x249));}[_0x4b8d0e(0x1e4)]({id:_0x530cec,staticMessage:_0x420523}){const _0x2ab45d=_0x4b8d0e;this[_0x2ab45d(0x1ca)][_0x2ab45d(0x220)][_0x2ab45d(0x1d6)](_0x2ab45d(0x1e2),{'id':_0x530cec,'initialContent':_0x2ab45d(0x1b6)+_0x420523+_0x2ab45d(0x1d9)});}[_0x4b8d0e(0x211)](_0x19aeb9){const _0x90b99=_0x4b8d0e,_0x445b88=_0x19aeb9[_0x90b99(0x1b4)]?.[_0x90b99(0x234)]||_0x19aeb9[_0x90b99(0x21e)];this[_0x90b99(0x1ca)][_0x90b99(0x220)][_0x90b99(0x1d6)](_0x90b99(0x240),{'contextItems':Array[_0x90b99(0x24a)](_0x19aeb9[_0x90b99(0x1d3)][_0x90b99(0x210)]()),'initialContent':_0x90b99(0x1b6)+_0x445b88+_0x90b99(0x1d9),'id':_0x19aeb9['id']});}[_0x4b8d0e(0x1dd)]({errorMessage:_0x207677,id:_0x15a642}){const _0x5b9bc6=_0x4b8d0e;this[_0x5b9bc6(0x1ca)][_0x5b9bc6(0x220)][_0x5b9bc6(0x1d6)](_0x5b9bc6(0x23f),{'initialContent':_0x5b9bc6(0x1b6)+_0x207677+_0x5b9bc6(0x1d9),'id':_0x15a642});}[_0x4b8d0e(0x238)](_0x3bd849){const _0x3c8f47=_0x4b8d0e;return this[_0x3c8f47(0x230)][_0x3c8f47(0x20f)](async()=>{const _0x4b846e=_0x3c8f47;this[_0x4b846e(0x1ca)][_0x4b846e(0x220)][_0x4b846e(0x1d6)](_0x4b846e(0x1e2),{'id':_0x3bd849[_0x4b846e(0x246)]+':'+_0x3bd849['id']}),this[_0x4b846e(0x1f0)]();});}async[_0x4b8d0e(0x253)](_0x6d43f2){const _0x29e74b=_0x4b8d0e,_0x47bf44=_0x16cdc4(this[_0x29e74b(0x213)]);let _0x25f5da=_0x47bf44[_0x29e74b(0x21a)][_0x29e74b(0x1e3)](_0x29e74b(0x1f7))||[..._0x3a212b];if(_0x47bf44[_0x29e74b(0x1eb)][_0x29e74b(0x1bd)](_0x29e74b(0x1b2))){if(!this[_0x29e74b(0x1d1)]){this[_0x29e74b(0x1d1)]=!0x0;const _0x22aae5=_0x47bf44[_0x29e74b(0x21b)][_0x29e74b(0x1e3)](_0x29e74b(0x1f2));this[_0x29e74b(0x1ca)][_0x29e74b(0x220)][_0x29e74b(0x225)](_0x29e74b(0x20a))['to'](_0x22aae5,_0x29e74b(0x1bf));}}else _0x25f5da=_0x25f5da[_0x29e74b(0x1e1)](_0x46a944=>_0x29e74b(0x1b8)!=_0x46a944);return this[_0x29e74b(0x230)][_0x29e74b(0x20f)](async()=>{const _0x5cad94=_0x29e74b;this[_0x5cad94(0x1ca)][_0x5cad94(0x220)][_0x5cad94(0x1d6)](_0x5cad94(0x1fb),{'id':_0x6d43f2[_0x5cad94(0x246)]+':'+_0x6d43f2['id'],'areActionsDisabled':_0x6d43f2[_0x5cad94(0x216)],'showDiff':this[_0x5cad94(0x23a)],'availableActions':_0x25f5da}),this[_0x5cad94(0x1f0)]();});}[_0x4b8d0e(0x243)](_0x541e10,_0x484587){const _0xd8d50b=_0x4b8d0e,_0x3020bb=this[_0xd8d50b(0x1ca)][_0xd8d50b(0x220)][_0xd8d50b(0x1f3)][_0xd8d50b(0x1f5)];if(_0x3020bb instanceof _0xdd15a5)return this[_0xd8d50b(0x1ca)][_0xd8d50b(0x220)][_0xd8d50b(0x1f3)][_0xd8d50b(0x1e9)](_0x3020bb),void this[_0xd8d50b(0x1ca)][_0xd8d50b(0x220)][_0xd8d50b(0x1d6)](_0xd8d50b(0x1ea),{'id':_0x541e10['id'],'capabilities':{'isWebSearchEnabled':_0x3020bb[_0xd8d50b(0x228)][_0xd8d50b(0x233)]||_0x484587[_0xd8d50b(0x233)],'isReasoningEnabled':_0x3020bb[_0xd8d50b(0x228)][_0xd8d50b(0x215)]||_0x484587[_0xd8d50b(0x215)]}});this[_0xd8d50b(0x1ca)][_0xd8d50b(0x220)][_0xd8d50b(0x1d6)](_0xd8d50b(0x1ea),{'id':_0x541e10['id'],'capabilities':_0x484587});}async[_0x4b8d0e(0x223)](_0x3d8bb8,_0x21cca3){const _0x26a2dd=_0x4b8d0e;let _0x371c7a;return await this[_0x26a2dd(0x230)][_0x26a2dd(0x20f)](async()=>{const _0x15ca84=_0x26a2dd;_0x371c7a=this[_0x15ca84(0x1ca)][_0x15ca84(0x220)][_0x15ca84(0x1d6)](_0x15ca84(0x25a),{'content':_0x3d8bb8,'id':_0x21cca3});}),_0x371c7a;}[_0x4b8d0e(0x1b0)](_0x553891){const _0x260a43=_0x4b8d0e;this[_0x260a43(0x1ca)][_0x260a43(0x220)][_0x260a43(0x1cf)](_0x553891);}[_0x4b8d0e(0x1f9)](_0x4e4362){const _0x19c009=_0x4b8d0e;return this[_0x19c009(0x1ca)][_0x19c009(0x220)][_0x19c009(0x1cb)](_0x4e4362);}[_0x4b8d0e(0x254)](_0x28ff0a){const _0x383a40=_0x4b8d0e,_0x46758d=this[_0x383a40(0x1ca)][_0x383a40(0x220)][_0x383a40(0x1f3)][_0x383a40(0x229)](_0x45efc0=>_0x45efc0[_0x383a40(0x1d7)]['id']==_0x28ff0a['id']&&_0x45efc0 instanceof _0xdd15a5);_0x46758d&&_0x46758d[_0x383a40(0x226)](_0x383a40(0x219),_0x28ff0a[_0x383a40(0x219)]);}async[_0x4b8d0e(0x1fd)](_0x3421bb){const _0x3c0fb9=_0x4b8d0e,_0x230880=_0x3421bb[_0x3c0fb9(0x1b1)]||this[_0x3c0fb9(0x1ce)];return this[_0x3c0fb9(0x230)][_0x3c0fb9(0x20f)](async _0xc3c62=>{const _0x19bea6=_0x3c0fb9;await this[_0x19bea6(0x1ca)][_0x19bea6(0x220)][_0x19bea6(0x21d)]({..._0x3421bb,'abortSignal':_0xc3c62,'renderingStrategy':_0x230880}),_0x3421bb[_0x19bea6(0x25c)]&&this[_0x19bea6(0x251)](_0x3421bb['id']);});}[_0x4b8d0e(0x20e)](_0x2ec758,_0x576b66){const _0x1ab056=_0x4b8d0e;this[_0x1ab056(0x1ca)][_0x1ab056(0x220)][_0x1ab056(0x21c)](_0x2ec758,_0x576b66);}async[_0x4b8d0e(0x1ad)](_0xa5a820){const _0x3740b0=_0x4b8d0e,_0x168d5e=_0xa5a820[_0x3740b0(0x1b1)]||this[_0x3740b0(0x1ce)];return this[_0x3740b0(0x230)][_0x3740b0(0x20f)](async _0x1e238f=>{const _0x19811e=_0x3740b0;await this[_0x19811e(0x1ca)][_0x19811e(0x220)][_0x19811e(0x22d)]({..._0xa5a820,'abortSignal':_0x1e238f,'renderingStrategy':_0x168d5e}),_0xa5a820[_0x19811e(0x25c)]&&this[_0x19811e(0x251)](_0xa5a820['id']);});}[_0x4b8d0e(0x1ff)](_0x281aa6){const _0x1d17e6=_0x4b8d0e;this[_0x1d17e6(0x1ca)][_0x1d17e6(0x220)][_0x1d17e6(0x222)](_0x281aa6);}[_0x4b8d0e(0x212)](_0x358e4e){const _0x59abbb=_0x4b8d0e;this[_0x59abbb(0x1ca)][_0x59abbb(0x220)][_0x59abbb(0x205)](_0x358e4e);}[_0x4b8d0e(0x251)](_0x4f5442){const _0x3eae04=_0x4b8d0e;this[_0x3eae04(0x1ca)][_0x3eae04(0x220)][_0x3eae04(0x1e7)](_0x4f5442);}[_0x4b8d0e(0x1ac)](_0x7c8b57){const _0xc1c6ae=_0x4b8d0e;this[_0xc1c6ae(0x1ca)][_0xc1c6ae(0x220)][_0xc1c6ae(0x1ba)]()[_0xc1c6ae(0x1e1)](_0x13a621=>_0x13a621[_0xc1c6ae(0x204)](_0x7c8b57))[_0xc1c6ae(0x258)](_0x466095=>this[_0xc1c6ae(0x1ca)][_0xc1c6ae(0x220)][_0xc1c6ae(0x1cf)](_0x466095));}[_0x4b8d0e(0x221)](){const _0x580e3a=_0x4b8d0e,_0x3dcf80=this[_0x580e3a(0x255)]({'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x1});this[_0x580e3a(0x1ef)](_0x3dcf80),this[_0x580e3a(0x1ca)][_0x580e3a(0x1db)][_0x580e3a(0x250)](!this[_0x580e3a(0x213)][_0x580e3a(0x21a)][_0x580e3a(0x1e3)](_0x580e3a(0x242))),this[_0x580e3a(0x1e8)]=!0x0,this[_0x580e3a(0x1ca)][_0x580e3a(0x220)][_0x580e3a(0x1c3)]();}[_0x4b8d0e(0x200)](_0x177714){const _0x1ae527=_0x4b8d0e;this[_0x1ae527(0x230)][_0x1ae527(0x22e)](),this[_0x1ae527(0x1ca)][_0x1ae527(0x220)][_0x1ae527(0x1ba)]()[_0x1ae527(0x1e1)](_0x3adaa9=>_0x3adaa9[_0x1ae527(0x204)](_0x177714['id']))[_0x1ae527(0x258)](_0x366f7a=>this[_0x1ae527(0x251)](_0x366f7a)),this[_0x1ae527(0x1e8)]=!0x1,this[_0x1ae527(0x1ca)][_0x1ae527(0x220)][_0x1ae527(0x247)]();}async[_0x4b8d0e(0x22c)](){const _0x3b0597=_0x4b8d0e;return this[_0x3b0597(0x230)][_0x3b0597(0x1e6)][_0x3b0597(0x1fe)](()=>{const _0x5adad5=_0x3b0597;this[_0x5adad5(0x1e8)]=!0x1,this[_0x5adad5(0x1ca)][_0x5adad5(0x220)][_0x5adad5(0x247)]();});}[_0x4b8d0e(0x1d2)](_0x12fe76,_0x33d8a4){const _0x2bce2a=_0x4b8d0e;this[_0x2bce2a(0x1ca)][_0x2bce2a(0x1db)][_0x2bce2a(0x1d2)](_0x12fe76,_0x33d8a4);}[_0x4b8d0e(0x239)](_0xc91bf6){const _0x13dfbb=_0x4b8d0e;this[_0x13dfbb(0x1ca)][_0x13dfbb(0x1db)][_0x13dfbb(0x239)](_0xc91bf6);}[_0x4b8d0e(0x1d5)](_0x33dbab,_0x33759e){const _0x4d5bea=_0x4b8d0e;this[_0x4d5bea(0x1ca)][_0x4d5bea(0x1db)][_0x4d5bea(0x1d5)](_0x33dbab,_0x33759e);}[_0x4b8d0e(0x1de)](_0x25d0b4){const _0x29df50=_0x4b8d0e;this[_0x29df50(0x1ca)][_0x29df50(0x1db)][_0x29df50(0x1de)](_0x25d0b4);}[_0x4b8d0e(0x1c9)](_0x143998){const _0x18d695=_0x4b8d0e;this[_0x18d695(0x1ca)][_0x18d695(0x1db)][_0x18d695(0x1c9)](_0x143998);}[_0x4b8d0e(0x22f)](){const _0x21bc19=_0x4b8d0e;this[_0x21bc19(0x1ca)][_0x21bc19(0x1db)][_0x21bc19(0x22f)]();}[_0x4b8d0e(0x1d8)](){const _0x49c82b=_0x4b8d0e;this[_0x49c82b(0x1ca)][_0x49c82b(0x1db)][_0x49c82b(0x1d8)]();}[_0x4b8d0e(0x202)](_0x5e212f,_0x5a52af,_0x401449){const _0x3f24b8=_0x4b8d0e;this[_0x3f24b8(0x1ca)][_0x3f24b8(0x1db)][_0x3f24b8(0x202)](_0x5e212f,_0x5a52af,_0x401449);}[_0x4b8d0e(0x24b)](){const _0x478ed5=_0x4b8d0e;this[_0x478ed5(0x1ca)][_0x478ed5(0x1db)][_0x478ed5(0x24b)](),this[_0x478ed5(0x1ca)][_0x478ed5(0x1db)][_0x478ed5(0x1cd)](this[_0x478ed5(0x1b5)]());}[_0x4b8d0e(0x208)](_0x3c9058){const _0xd60797=_0x4b8d0e;this[_0xd60797(0x1ca)][_0xd60797(0x1db)][_0xd60797(0x208)](_0x3c9058);}[_0x4b8d0e(0x23d)](_0x3aca51){const _0x27dd63=_0x4b8d0e;this[_0x27dd63(0x1ca)][_0x27dd63(0x1db)][_0x27dd63(0x207)](_0x3aca51[_0x27dd63(0x233)]),this[_0x27dd63(0x1ca)][_0x27dd63(0x1db)][_0x27dd63(0x23e)](_0x3aca51[_0x27dd63(0x215)]),this[_0x27dd63(0x1ca)][_0x27dd63(0x1db)][_0x27dd63(0x1cd)](this[_0x27dd63(0x1b5)](_0x3aca51));}[_0x4b8d0e(0x232)](_0x117f6c,_0x4c19b9){const _0xe374ff=_0x4b8d0e;this[_0xe374ff(0x1ca)][_0xe374ff(0x1db)][_0xe374ff(0x218)](_0x117f6c),_0x4c19b9&&this[_0xe374ff(0x1ca)][_0xe374ff(0x1db)][_0xe374ff(0x250)](!0x1);}[_0x4b8d0e(0x259)](_0x6200bc){const _0xab12c8=_0x4b8d0e;this[_0xab12c8(0x1ce)]=_0x6200bc;}[_0x4b8d0e(0x20c)](_0x253181){const _0xa46919=_0x4b8d0e;this[_0xa46919(0x1ca)][_0xa46919(0x220)][_0xa46919(0x20c)](_0x253181);}[_0x4b8d0e(0x1ee)](){const _0x2fac73=_0x4b8d0e;this[_0x2fac73(0x203)](_0x1e499c(this[_0x2fac73(0x213)][_0x2fac73(0x224)],_0x2fac73(0x20d)));}[_0x4b8d0e(0x203)](_0x4ef57e,_0x12ab01=!0x1){const _0x52f247=_0x4b8d0e;if(_0x12ab01&&!_0x2ec60e()&&_0x4ef57e[_0x52f247(0x257)])return this[_0x52f247(0x1ca)][_0x52f247(0x1ab)][_0x52f247(0x1ec)]='',void this[_0x52f247(0x24f)](_0x4ef57e);this[_0x52f247(0x1ca)][_0x52f247(0x1ab)][_0x52f247(0x1ec)]=_0x4ef57e;}[_0x4b8d0e(0x1ef)](_0x15a567){const _0x2d2586=_0x4b8d0e;this[_0x2d2586(0x1ca)][_0x2d2586(0x220)][_0x2d2586(0x1ef)](_0x15a567);}[_0x4b8d0e(0x1f0)](){const _0x517e07=_0x4b8d0e;this[_0x517e07(0x1ca)][_0x517e07(0x220)][_0x517e07(0x1ef)]('');}[_0x4b8d0e(0x24f)](_0x5031b7){const _0x3fd8c7=_0x4b8d0e;let _0x30915d=0x0;clearInterval(this[_0x3fd8c7(0x1b9)]),this[_0x3fd8c7(0x1b9)]=setInterval(()=>{const _0x4df098=_0x3fd8c7;this[_0x4df098(0x1ca)][_0x4df098(0x1ab)][_0x4df098(0x1ec)]=this[_0x4df098(0x1ca)][_0x4df098(0x1ab)][_0x4df098(0x1ec)]+_0x5031b7[_0x30915d],_0x30915d++,_0x30915d===_0x5031b7[_0x4df098(0x257)]&&clearInterval(this[_0x4df098(0x1b9)]);},0x1e);}[_0x4b8d0e(0x1bb)](_0x134846){const _0xc4e580=_0x4b8d0e;this[_0xc4e580(0x1ca)][_0xc4e580(0x1ab)][_0xc4e580(0x1bc)]=_0x134846;}[_0x4b8d0e(0x255)](_0x28f787){const _0x4752d3=_0x4b8d0e;return _0x28f787[_0x4752d3(0x233)]&&_0x28f787[_0x4752d3(0x215)]?_0x1e499c(this[_0x4752d3(0x213)][_0x4752d3(0x224)],_0x4752d3(0x1aa)):_0x28f787[_0x4752d3(0x233)]?_0x1e499c(this[_0x4752d3(0x213)][_0x4752d3(0x224)],_0x4752d3(0x1c6)):_0x28f787[_0x4752d3(0x215)]?_0x1e499c(this[_0x4752d3(0x213)][_0x4752d3(0x224)],_0x4752d3(0x24c)):_0x1e499c(this[_0x4752d3(0x213)][_0x4752d3(0x224)],_0x4752d3(0x1ed));}[_0x4b8d0e(0x1b5)](_0x1d3ef2){const _0x295164=_0x4b8d0e;return _0x1d3ef2?_0x1d3ef2[_0x295164(0x233)]&&_0x1d3ef2[_0x295164(0x215)]?_0x1e499c(this[_0x295164(0x213)][_0x295164(0x224)],_0x295164(0x209)):_0x1d3ef2[_0x295164(0x233)]?_0x1e499c(this[_0x295164(0x213)][_0x295164(0x224)],_0x295164(0x1e5)):_0x1d3ef2[_0x295164(0x215)]?_0x1e499c(this[_0x295164(0x213)][_0x295164(0x224)],_0x295164(0x1f1)):_0x1e499c(this[_0x295164(0x213)][_0x295164(0x224)],_0x295164(0x1fa)):_0x1e499c(this[_0x295164(0x213)][_0x295164(0x224)],_0x295164(0x1fa));}[_0x4b8d0e(0x25b)](_0x48d89b,_0x13d7b9,_0x115f82,_0x50f88b){const _0x36cedb=_0x4b8d0e;this[_0x36cedb(0x1ca)][_0x36cedb(0x25b)](_0x48d89b,_0x13d7b9,_0x115f82,_0x50f88b);}[_0x4b8d0e(0x1d4)](_0x11acfd){const _0x1ba230=_0x4b8d0e;this[_0x1ba230(0x1ca)][_0x1ba230(0x1d4)](_0x11acfd);}[_0x4b8d0e(0x1c8)](_0x310f85){const _0x376e59=_0x4b8d0e;this[_0x376e59(0x1ca)][_0x376e59(0x1db)][_0x376e59(0x1c8)](_0x310f85);}[_0x4b8d0e(0x1c4)](_0xb9b35c=!0x1){const _0x19164e=_0x4b8d0e;this[_0x19164e(0x1ca)][_0x19164e(0x1db)][_0x19164e(0x1c4)](_0xb9b35c);}[_0x4b8d0e(0x1c1)](_0x203636,_0x894655){const _0x1cd549=_0x4b8d0e;this[_0x1cd549(0x1ca)][_0x1cd549(0x220)][_0x1cd549(0x206)](_0x203636,_0x894655);}[_0x4b8d0e(0x1c3)](){const _0xc344df=_0x4b8d0e;this[_0xc344df(0x1ca)][_0xc344df(0x220)][_0xc344df(0x1c3)]();}[_0x4b8d0e(0x227)](){const _0x186f00=_0x4b8d0e;this[_0x186f00(0x1ca)][_0x186f00(0x1db)][_0x186f00(0x1af)]=!0x0;}[_0x4b8d0e(0x22a)](){const _0x1eeb8d=_0x4b8d0e;this[_0x1eeb8d(0x1ca)][_0x1eeb8d(0x1db)][_0x1eeb8d(0x1af)]=!0x1;}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0xaa15a6=_0x1e28;(function(_0x3f7ac9,_0x459f9f){const _0x58d36f=_0x1e28,_0x1c55e3=_0x3f7ac9();while(!![]){try{const _0x4aa53d=-parseInt(_0x58d36f(0x195))/0x1*(parseInt(_0x58d36f(0x207))/0x2)+parseInt(_0x58d36f(0x1f6))/0x3+parseInt(_0x58d36f(0x1e6))/0x4+-parseInt(_0x58d36f(0x1df))/0x5+parseInt(_0x58d36f(0x200))/0x6+parseInt(_0x58d36f(0x1c7))/0x7+-parseInt(_0x58d36f(0x1eb))/0x8;if(_0x4aa53d===_0x459f9f)break;else _0x1c55e3['push'](_0x1c55e3['shift']());}catch(_0x2abb42){_0x1c55e3['push'](_0x1c55e3['shift']());}}}(_0xab59,0x4de1a));import{CKEditorError as _0x376154,ObservableMixin as _0x12c65e,uid as _0x2c2382}from'ckeditor5/src/utils.js';function _0x1e28(_0x312586,_0x1472c3){const _0xab59f2=_0xab59();return _0x1e28=function(_0x1e285b,_0x391ae0){_0x1e285b=_0x1e285b-0x191;let _0x46bd3c=_0xab59f2[_0x1e285b];return _0x46bd3c;},_0x1e28(_0x312586,_0x1472c3);}function _0xab59(){const _0x390c1d=['label','loadSourceResources','sourceResourcesLoaded','ai-chat-resource-load-failed','_getCustomSourcesInitialState','addToConversationContext','push','ai-chat-url-upload-failed','_config','_convertTextResourceToFile','end','isSelectionInContext','current-document','removeFromContext','clearPendingContextItems','init','FILE','code','files','SELECTION','type','784406JrJXHj','getResources','isCurrentDocumentInContext','_ownerId','ai-chat-resource-no-data','find','uploadProgressChanged','addFilesToContext','version','_setAddContextOptionsDefaultState','ai-chat-context-unsupported-type','ai-request-aborted','toolName','text/plain','getData','attributes','_createContextItemFromContent','url-','abort','isCurrentDocumentInConversation','contextSent','_toggleAddCurrentDocumentOptionVisibility','_ongoingUploads','ai-chat-source-not-found','136125klQwiG','isReadOnly','_removeContextItem','customItems','populateFromMessage','object\x20with\x20content\x20and\x20type\x20properties','contextItemRemoved','1450428WfoXqI','removeSelectionFromContext','mapContextItemsToRequestData','isHidden','_finishContextItemLoading','4146376hprCMk','message','isInContext','files-','startsWith','text/markdown','fire','object','_isResourceInContext','start','addToolItemToContext','1163244jrdMbb','hidden','sessionId','ai-chat-file-upload-failed','addSelectionToContext','_connector','_finishUploadOperation','urls','url','addUrlToContext','3227490WlYXAx','map','file-','error','Current\x20document','abortController','resourceStateChanged','1071608qUMAky','addCurrentDocumentToContext','_mapContextItemToRequestData','get','ai-chat-source-resources-load-failed','substring','_startUploadOperation','fetchDocument','all','text/html','size','TEXT','filter','forEach','_findSourceIdsByResourceId','URL','ai-chat-context-invalid-data','getPendingContextItems','HTML','content','uploadUrl','length','string','name','uploadFile','contextItemAdded','addResourceToContext','_conversationContextItems','_addContextOptionsState','getId','values','document','contextItemLoadingEnded','1XKKOgj','set','ai-chat-document-upload-failed','getSentContextItems','selection','enabled','getDocument','DOCUMENT','addContextOptionsChanged','MARKDOWN','updateCurrentDocument','stack','_addContextItem','has','_pendingContextItems','mcpServerName','uiId','uploadDocument','_ongoingUploadOperations','_updateResourceInContextState','sources','TOOL','resources','data','from','delete','resourceId','_addToConversationContextItem','File'];_0xab59=function(){return _0x390c1d;};return _0xab59();}import{AIContextItemType as _0x1fb19b,AIContextTextResourceType as _0x14d817}from'../../aicore/model/aicontext.js';import{escape as _0x25df55}from'es-toolkit/compat';import{errorsMap as _0x28d69b}from'../../errorsmap.js';export const AI_CONTEXT_MODEL_EVENT_NAMES=[_0xaa15a6(0x220),_0xaa15a6(0x1e5),_0xaa15a6(0x194),_0xaa15a6(0x1db),_0xaa15a6(0x203),_0xaa15a6(0x19d),_0xaa15a6(0x1b4),_0xaa15a6(0x206),_0xaa15a6(0x1cd)];export class AIChatContext extends _0x12c65e(){[_0xaa15a6(0x1fb)];[_0xaa15a6(0x1ba)];[_0xaa15a6(0x1ca)];constructor({connector:_0x24178e,config:_0x5717dd,ownerId:_0x489a29}){const _0xb2a556=_0xaa15a6;super(),this[_0xb2a556(0x1fb)]=_0x24178e,this[_0xb2a556(0x1ba)]=_0x5717dd,this[_0xb2a556(0x1ca)]=_0x489a29;}[_0xaa15a6(0x1c1)](){const _0x2d1468=_0xaa15a6;this[_0x2d1468(0x1a3)]=new Map(),this[_0x2d1468(0x222)]=new Map(),this[_0x2d1468(0x1dd)]=new Map(),this[_0x2d1468(0x1a7)]=new Map(),this[_0x2d1468(0x1d0)]();}[_0xaa15a6(0x218)](){const _0x1102b9=_0xaa15a6;return this[_0x1102b9(0x1a3)];}async[_0xaa15a6(0x1e3)](_0x3c952e){const _0x36de12=_0xaa15a6,_0x23bfd7=await this[_0x36de12(0x1d7)](_0x3c952e);return this[_0x36de12(0x1b0)](_0x23bfd7),_0x36de12(0x1be)===_0x23bfd7[_0x36de12(0x1a5)]&&this[_0x36de12(0x1dc)](),_0x23bfd7;}async[_0xaa15a6(0x1d7)](_0x220b2b){const _0x54f7c7=_0xaa15a6;if(_0x220b2b[_0x54f7c7(0x1c6)]===_0x1fb19b[_0x54f7c7(0x19c)]){const _0x32267b=await this[_0x54f7c7(0x1fb)][_0x54f7c7(0x20e)](this[_0x54f7c7(0x1ca)],_0x220b2b['id'])[_0x54f7c7(0x19b)]();return{'id':_0x54f7c7(0x1be),'uiId':_0x54f7c7(0x1be),'label':_0x54f7c7(0x204),'type':_0x220b2b[_0x54f7c7(0x1c6)],'content':_0x32267b[_0x54f7c7(0x21a)],'hidden':this[_0x54f7c7(0x222)][_0x54f7c7(0x1a2)](_0x54f7c7(0x1be)),'version':_0x32267b[_0x54f7c7(0x1d6)]?.[_0x54f7c7(0x1cf)],'sessionId':_0x32267b[_0x54f7c7(0x1d6)]?.[_0x54f7c7(0x1f8)]};}if(_0x220b2b[_0x54f7c7(0x1c6)]===_0x1fb19b[_0x54f7c7(0x1aa)])return{'id':_0x220b2b['id'],'uiId':_0x220b2b['id'],'label':_0x220b2b[_0x54f7c7(0x1ac)]?.[_0x54f7c7(0x1b2)]||_0x220b2b['id'],'type':_0x1fb19b[_0x54f7c7(0x1aa)],'mcpServerName':_0x220b2b[_0x54f7c7(0x1a4)],'toolName':_0x220b2b[_0x54f7c7(0x1d3)],'data':_0x220b2b[_0x54f7c7(0x1ac)]||{}};return{'id':_0x220b2b['id'],'uiId':_0x220b2b['id'],'label':_0x220b2b[_0x54f7c7(0x1d6)]?.[_0x54f7c7(0x1b2)]||_0x220b2b[_0x54f7c7(0x21e)]||_0x220b2b[_0x54f7c7(0x1fe)]||_0x220b2b['id'],'type':_0x220b2b[_0x54f7c7(0x1c6)],..._0x220b2b?.[_0x54f7c7(0x1d6)]?.[_0x54f7c7(0x1af)]?{'resourceId':_0x220b2b[_0x54f7c7(0x1d6)]?.[_0x54f7c7(0x1af)]}:{}};}[_0xaa15a6(0x198)](){const _0x409be8=_0xaa15a6;return new Map(this[_0x409be8(0x222)]);}[_0xaa15a6(0x1bf)](_0x59ddb2){const _0x328871=_0xaa15a6,_0xc5f8ca=this[_0x328871(0x1a3)][_0x328871(0x20a)](_0x59ddb2);_0xc5f8ca?.[_0x328871(0x1e0)]||this[_0x328871(0x1e1)](_0x59ddb2);}[_0xaa15a6(0x1c0)](){const _0x2ccc17=_0xaa15a6;if(0x0===this[_0x2ccc17(0x1a3)][_0x2ccc17(0x211)])return;for(const _0x409ac8 of this[_0x2ccc17(0x1a3)][_0x2ccc17(0x192)]())this[_0x2ccc17(0x1e1)](_0x409ac8[_0x2ccc17(0x1a5)]);const _0xcc9099=this[_0x2ccc17(0x222)][_0x2ccc17(0x20a)](_0x2ccc17(0x1be))||this[_0x2ccc17(0x1a3)][_0x2ccc17(0x20a)](_0x2ccc17(0x1be));_0xcc9099&&this[_0x2ccc17(0x1a1)]({..._0xcc9099,'isReadOnly':!0x0,'hidden':!0x0});}[_0xaa15a6(0x1b7)](_0x300ff7){const _0x23945f=_0xaa15a6;for(const _0x4f3e1b of _0x300ff7[_0x23945f(0x192)]())this[_0x23945f(0x1b0)](_0x4f3e1b);this[_0x23945f(0x1c0)](),this[_0x23945f(0x1f1)](_0x23945f(0x1db),{'contextItems':Array[_0x23945f(0x1ad)](this[_0x23945f(0x198)]()[_0x23945f(0x192)]())});}[_0xaa15a6(0x1c9)](){const _0x1491b2=_0xaa15a6;return this[_0x1491b2(0x1a3)][_0x1491b2(0x1a2)](_0x1491b2(0x1be));}[_0xaa15a6(0x1bd)](){const _0x57a124=_0xaa15a6;return this[_0x57a124(0x1a3)][_0x57a124(0x1a2)](_0x57a124(0x199));}[_0xaa15a6(0x1da)](){const _0x499c22=_0xaa15a6;return this[_0x499c22(0x222)][_0x499c22(0x1a2)](_0x499c22(0x1be));}static[_0xaa15a6(0x1e8)](_0x228cf5){const _0x588757=_0xaa15a6;return Array[_0x588757(0x1ad)](_0x228cf5[_0x588757(0x192)]())[_0x588757(0x201)](_0x4db105=>this[_0x588757(0x209)](_0x4db105))[_0x588757(0x213)](_0x78c11e=>null!==_0x78c11e);}async[_0xaa15a6(0x1ce)](_0x286d6e,_0x181464,_0x359232=_0x1fb19b[_0xaa15a6(0x1c2)]){const _0x365bdf=_0xaa15a6,_0x4bdeb8=_0x365bdf(0x1ee)+_0x2c2382();this[_0x365bdf(0x20d)](_0x4bdeb8);try{await Promise[_0x365bdf(0x20f)](_0x286d6e[_0x365bdf(0x201)](async _0x4c0022=>{const _0x267d9a=_0x365bdf,_0x4da4bc=_0x267d9a(0x202)+_0x2c2382(),_0x2568dc=_0x25df55(_0x4c0022[_0x267d9a(0x21e)]);try{this[_0x267d9a(0x1a1)]({'type':_0x359232,'label':_0x181464?.[_0x267d9a(0x1b2)]||_0x2568dc,'uiId':_0x4da4bc,'resourceId':_0x181464?.[_0x267d9a(0x1af)]},!0x0);const _0x75932b=this[_0x267d9a(0x1fb)][_0x267d9a(0x21f)](this[_0x267d9a(0x1ca)],_0x4c0022,_0x181464);this[_0x267d9a(0x1dd)][_0x267d9a(0x196)](_0x4da4bc,_0x75932b[_0x267d9a(0x205)]);const {id:_0x3da961}=await _0x75932b[_0x267d9a(0x191)]();this[_0x267d9a(0x1dd)][_0x267d9a(0x1ae)](_0x4da4bc),this[_0x267d9a(0x1ea)]({'type':_0x359232,'id':_0x3da961,'label':_0x181464?.[_0x267d9a(0x1b2)]||_0x2568dc,'uiId':_0x4da4bc,'resourceId':_0x181464?.[_0x267d9a(0x1af)]},!0x1);}catch(_0x565343){this[_0x267d9a(0x1dd)][_0x267d9a(0x1ae)](_0x4da4bc);if(!(_0x565343 instanceof _0x376154&&_0x565343[_0x267d9a(0x1ec)][_0x267d9a(0x1ef)](_0x267d9a(0x1d2)))){const _0x323760=_0x28d69b[_0x267d9a(0x20a)](_0x565343[_0x267d9a(0x1c3)])||_0x267d9a(0x1f9),_0x393edd=new _0x376154(_0x323760,null,{'fileName':_0x2568dc,..._0x565343});_0x393edd[_0x267d9a(0x1a0)]=_0x565343[_0x267d9a(0x1a0)],this[_0x267d9a(0x1f1)](_0x267d9a(0x203),{'error':_0x393edd});}this[_0x267d9a(0x1e1)](_0x4da4bc);}}));}finally{this[_0x365bdf(0x1fc)](_0x4bdeb8);}}[_0xaa15a6(0x208)](_0x3bc379){const _0xb5aadb=_0xaa15a6;if(this[_0xb5aadb(0x1c9)]()||!this[_0xb5aadb(0x223)][_0xb5aadb(0x193)][_0xb5aadb(0x19a)])return;const _0x28487a={'type':_0x1fb19b[_0xb5aadb(0x19c)],'uiId':_0xb5aadb(0x1be),'label':_0x3bc379,'isReadOnly':this[_0xb5aadb(0x222)][_0xb5aadb(0x1a2)](_0xb5aadb(0x1be)),'hidden':this[_0xb5aadb(0x222)][_0xb5aadb(0x1a2)](_0xb5aadb(0x1be))};this[_0xb5aadb(0x1a1)](_0x28487a);}async[_0xaa15a6(0x19f)](_0x12ef1a,_0x1a04f8,_0x1d625d,_0x2529f6){const _0x55715a=_0xaa15a6,_0x349421=this[_0x55715a(0x1a3)][_0x55715a(0x20a)](_0x55715a(0x1be));if(_0x349421&&_0x12ef1a){_0x349421[_0x55715a(0x199)]=_0x2529f6?_0x2529f6[_0x55715a(0x201)](_0x20299d=>({'start':_0x20299d[_0x55715a(0x1f4)],'end':_0x20299d[_0x55715a(0x1bc)]})):[];try{if(_0x349421[_0x55715a(0x1cf)]===_0x1a04f8)return;const {id:_0x356528}=await this[_0x55715a(0x1fb)][_0x55715a(0x1a6)](this[_0x55715a(0x1ca)],_0x12ef1a,{'version':_0x1a04f8,'sessionId':_0x1d625d})[_0x55715a(0x191)]();_0x349421['id']=_0x356528,_0x349421[_0x55715a(0x21a)]=_0x12ef1a,_0x349421[_0x55715a(0x1cf)]=_0x1a04f8,_0x349421[_0x55715a(0x1f8)]=_0x1d625d;}catch(_0xa8b1b1){const _0x3534d1=new _0x376154(_0x55715a(0x197),null);_0x3534d1[_0x55715a(0x1a0)]=_0xa8b1b1[_0x55715a(0x1a0)],this[_0x55715a(0x1f1)](_0x55715a(0x203),{'error':_0x3534d1});}}}[_0xaa15a6(0x1fa)](_0x41e622){const _0x3cb6bd=_0xaa15a6;this[_0x3cb6bd(0x1a1)]({'type':_0x1fb19b[_0x3cb6bd(0x1c5)],'label':_0x41e622,'uiId':_0x3cb6bd(0x199),'content':_0x41e622});}[_0xaa15a6(0x1e7)](){const _0x3d17a6=_0xaa15a6;this[_0x3d17a6(0x1e1)](_0x3d17a6(0x199));}async[_0xaa15a6(0x1ff)](_0x3358bb,_0x53d5a6){const _0x8807a2=_0xaa15a6,_0xe75b89=_0x8807a2(0x1d8)+_0x2c2382();this[_0x8807a2(0x20d)](_0xe75b89);const _0x82b333=_0x8807a2(0x1d8)+_0x2c2382();try{this[_0x8807a2(0x1a1)]({'type':_0x1fb19b[_0x8807a2(0x216)],'label':_0x53d5a6?.[_0x8807a2(0x1b2)]||_0x3358bb,'uiId':_0x82b333,'resourceId':_0x53d5a6?.[_0x8807a2(0x1af)]},!0x0);const _0x2efc36=this[_0x8807a2(0x1fb)][_0x8807a2(0x21b)](this[_0x8807a2(0x1ca)],_0x3358bb,_0x53d5a6);this[_0x8807a2(0x1dd)][_0x8807a2(0x196)](_0x82b333,_0x2efc36[_0x8807a2(0x205)]);const {id:_0x3f7011}=await _0x2efc36[_0x8807a2(0x191)]();this[_0x8807a2(0x1dd)][_0x8807a2(0x1ae)](_0x82b333),this[_0x8807a2(0x1ea)]({'type':_0x1fb19b[_0x8807a2(0x216)],'id':_0x3f7011,'label':_0x53d5a6?.[_0x8807a2(0x1b2)]||_0x3358bb,'uiId':_0x82b333,'resourceId':_0x53d5a6?.[_0x8807a2(0x1af)]},!0x1);}catch(_0x129f92){this[_0x8807a2(0x1dd)][_0x8807a2(0x1ae)](_0x82b333),(_0x129f92[_0x8807a2(0x1ec)][_0x8807a2(0x1ef)](_0x8807a2(0x1d2))||this[_0x8807a2(0x1f1)](_0x8807a2(0x203),{'error':new _0x376154(_0x8807a2(0x1b9),this,{'url':_0x3358bb,'originalError':_0x129f92}),'url':_0x3358bb}),this[_0x8807a2(0x1e1)](_0x82b333));}finally{this[_0x8807a2(0x1fc)](_0xe75b89);}}[_0xaa15a6(0x1f5)](_0xb8bee3){const _0x45ddbf=_0xaa15a6;_0xb8bee3['id']=_0xb8bee3['id']??_0x2c2382()[_0x45ddbf(0x20c)](0x0,0x15),this[_0x45ddbf(0x1a3)][_0x45ddbf(0x196)](_0xb8bee3[_0x45ddbf(0x1a5)],_0xb8bee3),this[_0x45ddbf(0x1f1)](_0x45ddbf(0x220),{'contextItem':_0xb8bee3,'isLoading':!0x1});}async[_0xaa15a6(0x1b3)](_0x1e5d1e,_0x3e159f,_0x4fa18a){const _0x8d13c1=_0xaa15a6,_0x5ce4a0=this[_0x8d13c1(0x223)][_0x8d13c1(0x1a9)][_0x8d13c1(0x1cc)](_0xef6700=>_0xef6700['id']===_0x1e5d1e);if(!_0x5ce4a0)return this[_0x8d13c1(0x1f1)](_0x8d13c1(0x203),{'error':new _0x376154(_0x8d13c1(0x1de),this,{'sourceId':_0x1e5d1e}),'sourceId':_0x1e5d1e}),[];try{const _0x15e131=(await _0x5ce4a0[_0x8d13c1(0x1c8)](_0x3e159f))[_0x8d13c1(0x201)](_0x312226=>{const _0x3af8e0=_0x8d13c1,_0x3013c5=this[_0x3af8e0(0x1f3)](_0x312226['id']);return{..._0x312226,'isInContext':_0x3013c5};});return _0x5ce4a0[_0x8d13c1(0x1ab)]=_0x15e131,this[_0x8d13c1(0x1f1)](_0x8d13c1(0x1b4),{'sourceId':_0x1e5d1e,'source':_0x5ce4a0,'resources':_0x15e131,'uid':_0x4fa18a}),_0x15e131;}catch(_0x170826){return this[_0x8d13c1(0x1f1)](_0x8d13c1(0x203),{'error':new _0x376154(_0x8d13c1(0x20b),this,{'sourceId':_0x1e5d1e,'originalError':_0x170826}),'sourceId':_0x1e5d1e,'sourceLabel':_0x5ce4a0[_0x8d13c1(0x1b2)]}),[];}}async[_0xaa15a6(0x221)](_0x14ab49,_0x3d829d){const _0x42f5f4=_0xaa15a6;if(this[_0x42f5f4(0x1f3)](_0x3d829d['id']))return;let _0xff6a1e=_0x3d829d[_0x42f5f4(0x1ac)];if(!_0xff6a1e&&_0x14ab49[_0x42f5f4(0x1d5)])try{_0xff6a1e=await _0x14ab49[_0x42f5f4(0x1d5)](_0x3d829d['id']);}catch(_0x49f586){return void this[_0x42f5f4(0x1f1)](_0x42f5f4(0x203),{'error':new _0x376154(_0x42f5f4(0x1b5),this,{'resourceId':_0x3d829d['id'],'sourceId':_0x14ab49['id'],'originalError':_0x49f586}),'resourceId':_0x3d829d['id'],'sourceId':_0x14ab49['id']});}if(_0xff6a1e)switch(_0x3d829d[_0x42f5f4(0x1c6)]){case _0x1fb19b[_0x42f5f4(0x216)]:if(_0x42f5f4(0x21d)!=typeof _0xff6a1e)return void this[_0x42f5f4(0x1f1)](_0x42f5f4(0x203),{'error':new _0x376154(_0x42f5f4(0x217),this,{'resourceId':_0x3d829d['id'],'sourceId':_0x14ab49['id'],'expectedType':_0x42f5f4(0x21d),'actualType':typeof _0xff6a1e}),'resourceId':_0x3d829d['id'],'sourceId':_0x14ab49['id']});await this[_0x42f5f4(0x1ff)](_0xff6a1e,{'label':_0x3d829d[_0x42f5f4(0x1b2)],'resourceId':_0x3d829d['id']});break;case _0x1fb19b[_0x42f5f4(0x1c2)]:if(!(_0xff6a1e instanceof File))return void this[_0x42f5f4(0x1f1)](_0x42f5f4(0x203),{'error':new _0x376154(_0x42f5f4(0x217),this,{'resourceId':_0x3d829d['id'],'sourceId':_0x14ab49['id'],'expectedType':_0x42f5f4(0x1b1),'actualType':typeof _0xff6a1e}),'resourceId':_0x3d829d['id'],'sourceId':_0x14ab49['id']});await this[_0x42f5f4(0x1ce)]([_0xff6a1e],{'label':_0x3d829d[_0x42f5f4(0x1b2)],'resourceId':_0x3d829d['id']});break;case _0x1fb19b[_0x42f5f4(0x212)]:if(_0x42f5f4(0x1f2)!=typeof _0xff6a1e||!(_0x42f5f4(0x21a)in _0xff6a1e)||!(_0x42f5f4(0x1c6)in _0xff6a1e))return void this[_0x42f5f4(0x1f1)](_0x42f5f4(0x203),{'error':new _0x376154(_0x42f5f4(0x217),this,{'resourceId':_0x3d829d['id'],'sourceId':_0x14ab49['id'],'expectedType':_0x42f5f4(0x1e4),'actualType':typeof _0xff6a1e}),'resourceId':_0x3d829d['id'],'sourceId':_0x14ab49['id']});_0xff6a1e=AIChatContext[_0x42f5f4(0x1bb)](_0xff6a1e,_0x3d829d[_0x42f5f4(0x1b2)]),await this[_0x42f5f4(0x1ce)]([_0xff6a1e],{'label':_0x3d829d[_0x42f5f4(0x1b2)],'resourceId':_0x3d829d['id']},_0x1fb19b[_0x42f5f4(0x212)]);break;case _0x1fb19b[_0x42f5f4(0x1aa)]:break;default:this[_0x42f5f4(0x1f1)](_0x42f5f4(0x203),{'error':new _0x376154(_0x42f5f4(0x1d1),this,{'resourceId':_0x3d829d['id'],'sourceId':_0x14ab49['id'],'resourceType':_0x3d829d[_0x42f5f4(0x1c6)]}),'resourceId':_0x3d829d['id'],'sourceId':_0x14ab49['id']});}else this[_0x42f5f4(0x1f1)](_0x42f5f4(0x203),{'error':new _0x376154(_0x42f5f4(0x1cb),this,{'resourceId':_0x3d829d['id'],'sourceId':_0x14ab49['id']}),'resourceId':_0x3d829d['id'],'sourceId':_0x14ab49['id']});}static[_0xaa15a6(0x1bb)](_0x3ba37d,_0x1384de){const _0xab6b0d=_0xaa15a6;switch(_0x3ba37d[_0xab6b0d(0x1c6)]){case _0x14d817[_0xab6b0d(0x19e)]:return new File([_0x3ba37d[_0xab6b0d(0x21a)]],_0x1384de,{'type':_0xab6b0d(0x1f0)});case _0x14d817[_0xab6b0d(0x219)]:return new File([_0x3ba37d[_0xab6b0d(0x21a)]],_0x1384de,{'type':_0xab6b0d(0x210)});default:return new File([_0x3ba37d[_0xab6b0d(0x21a)]],_0x1384de,{'type':_0xab6b0d(0x1d4)});}}static[_0xaa15a6(0x209)](_0x4e9d97){const _0x4aa3c7=_0xaa15a6;switch(_0x4e9d97[_0x4aa3c7(0x1c6)]){case _0x1fb19b[_0x4aa3c7(0x1c2)]:return{'type':_0x1fb19b[_0x4aa3c7(0x1c2)],'id':_0x4e9d97['id']};case _0x1fb19b[_0x4aa3c7(0x216)]:return{'type':_0x1fb19b[_0x4aa3c7(0x216)],'id':_0x4e9d97['id']};case _0x1fb19b[_0x4aa3c7(0x19c)]:return{'type':_0x1fb19b[_0x4aa3c7(0x19c)],'id':_0x4e9d97['id'],..._0x4e9d97[_0x4aa3c7(0x199)]?.[_0x4aa3c7(0x21c)]&&{'selection':_0x4e9d97[_0x4aa3c7(0x199)]}};case _0x1fb19b[_0x4aa3c7(0x212)]:return{'type':_0x1fb19b[_0x4aa3c7(0x1c2)],'id':_0x4e9d97['id']};case _0x1fb19b[_0x4aa3c7(0x1aa)]:{const _0x967d9e=_0x4e9d97;return{'type':_0x1fb19b[_0x4aa3c7(0x1aa)],'mcpServerName':_0x967d9e[_0x4aa3c7(0x1a4)],'toolName':_0x967d9e[_0x4aa3c7(0x1d3)],'data':_0x967d9e[_0x4aa3c7(0x1ac)],'id':_0x967d9e['id']};}default:return null;}}[_0xaa15a6(0x1a1)](_0x4574e2,_0x3ae057=!0x1){const _0x3b9658=_0xaa15a6;if(this[_0x3b9658(0x1a3)][_0x3b9658(0x196)](_0x4574e2[_0x3b9658(0x1a5)],_0x4574e2),_0x4574e2[_0x3b9658(0x1f7)]||this[_0x3b9658(0x1f1)](_0x3b9658(0x220),{'contextItem':_0x4574e2,'isLoading':_0x3ae057}),_0x3b9658(0x1be)===_0x4574e2[_0x3b9658(0x1a5)]&&this[_0x3b9658(0x1dc)](),_0x4574e2[_0x3b9658(0x1af)]){const _0x3b72cb=this[_0x3b9658(0x215)](_0x4574e2[_0x3b9658(0x1af)]);_0x3b72cb&&_0x3b72cb[_0x3b9658(0x214)](_0x354562=>{const _0xd661ce=_0x3b9658;this[_0xd661ce(0x1a8)](_0x354562,_0x4574e2[_0xd661ce(0x1af)],!0x0);});}}[_0xaa15a6(0x1e1)](_0x405a54){const _0x1f0129=_0xaa15a6,_0x3c65e8=this[_0x1f0129(0x1a3)][_0x1f0129(0x20a)](_0x405a54),_0x2257d7=this[_0x1f0129(0x1dd)][_0x1f0129(0x20a)](_0x405a54);if(_0x2257d7&&(_0x2257d7[_0x1f0129(0x1d9)](),this[_0x1f0129(0x1dd)][_0x1f0129(0x1ae)](_0x405a54)),_0x3c65e8?.[_0x1f0129(0x1af)]){const _0x5ecc23=this[_0x1f0129(0x215)](_0x3c65e8[_0x1f0129(0x1af)]);_0x5ecc23&&_0x5ecc23[_0x1f0129(0x214)](_0x9385b9=>{const _0x59037a=_0x1f0129;this[_0x59037a(0x1a8)](_0x9385b9,_0x3c65e8[_0x59037a(0x1af)],!0x1);});}this[_0x1f0129(0x1a3)][_0x1f0129(0x1ae)](_0x405a54),this[_0x1f0129(0x1f1)](_0x1f0129(0x1e5),{'uiId':_0x405a54,'type':_0x3c65e8?.[_0x1f0129(0x1c6)]}),_0x1f0129(0x1be)===_0x405a54&&this[_0x1f0129(0x1dc)]();}[_0xaa15a6(0x1ea)](_0x3eb499,_0x3160fb){const _0x35f71b=_0xaa15a6;if(this[_0x35f71b(0x1a3)][_0x35f71b(0x1a2)](_0x3eb499[_0x35f71b(0x1a5)])&&(this[_0x35f71b(0x1a3)][_0x35f71b(0x196)](_0x3eb499[_0x35f71b(0x1a5)],_0x3eb499),this[_0x35f71b(0x1f1)](_0x35f71b(0x194),{'contextItem':_0x3eb499,'isLoading':_0x3160fb}),_0x3eb499[_0x35f71b(0x1af)])){const _0xecc5c9=this[_0x35f71b(0x215)](_0x3eb499[_0x35f71b(0x1af)]);_0xecc5c9&&_0xecc5c9[_0x35f71b(0x214)](_0x12b0f8=>{const _0x2d9c3d=_0x35f71b;this[_0x2d9c3d(0x1a8)](_0x12b0f8,_0x3eb499[_0x2d9c3d(0x1af)],!0x0);});}}[_0xaa15a6(0x1b0)](_0x3c5404){const _0x2c1dc9=_0xaa15a6;this[_0x2c1dc9(0x222)][_0x2c1dc9(0x196)](_0x3c5404[_0x2c1dc9(0x1a5)],_0x3c5404);}[_0xaa15a6(0x1d0)](){const _0x18b52e=_0xaa15a6;this[_0x18b52e(0x223)]={'document':{'enabled':!0x1!==this[_0x18b52e(0x1ba)]?.[_0x18b52e(0x193)]?.[_0x18b52e(0x19a)],'isHidden':!0x1},'urls':{'enabled':!0x1!==this[_0x18b52e(0x1ba)]?.[_0x18b52e(0x1fd)]?.[_0x18b52e(0x19a)]},'files':{'enabled':!0x1!==this[_0x18b52e(0x1ba)]?.[_0x18b52e(0x1c4)]?.[_0x18b52e(0x19a)]},'sources':this[_0x18b52e(0x1b6)](),'customItems':this[_0x18b52e(0x1ba)]?.[_0x18b52e(0x1e2)]?.[_0x18b52e(0x201)](_0xfd186=>({..._0xfd186,'enabled':!0x0}))??[]},this[_0x18b52e(0x1f1)](_0x18b52e(0x19d),{'options':this[_0x18b52e(0x223)]});}[_0xaa15a6(0x1b6)](){const _0x25f608=_0xaa15a6;return this[_0x25f608(0x1ba)]?.[_0x25f608(0x1a9)]?.[_0x25f608(0x201)](_0x70804e=>({..._0x70804e,'resources':[]}))??[];}[_0xaa15a6(0x1dc)](){const _0x5bbf55=_0xaa15a6,_0x1c5162=this[_0x5bbf55(0x1c9)]()||this[_0x5bbf55(0x1da)]();this[_0x5bbf55(0x223)][_0x5bbf55(0x193)][_0x5bbf55(0x1e9)]=_0x1c5162,this[_0x5bbf55(0x1f1)](_0x5bbf55(0x19d),{'options':this[_0x5bbf55(0x223)]});}[_0xaa15a6(0x1f3)](_0x2d6429){const _0x263e5c=_0xaa15a6;for(const _0x50cfc0 of this[_0x263e5c(0x1a3)][_0x263e5c(0x192)]())if(_0x50cfc0[_0x263e5c(0x1af)]===_0x2d6429)return!0x0;for(const _0x1d8a8a of this[_0x263e5c(0x222)][_0x263e5c(0x192)]())if(_0x1d8a8a[_0x263e5c(0x1af)]===_0x2d6429)return!0x0;return!0x1;}[_0xaa15a6(0x215)](_0x12b159){const _0x398b32=_0xaa15a6,_0xe94a1b=[];for(const _0x13a41e of this[_0x398b32(0x223)][_0x398b32(0x1a9)]){_0x13a41e[_0x398b32(0x1ab)][_0x398b32(0x1cc)](_0x5aa8b9=>_0x5aa8b9['id']===_0x12b159)&&_0xe94a1b[_0x398b32(0x1b8)](_0x13a41e['id']);}return 0x0===_0xe94a1b[_0x398b32(0x21c)]?null:_0xe94a1b;}[_0xaa15a6(0x1a8)](_0xfe922e,_0x2e5df4,_0x242500){const _0x4dc387=_0xaa15a6,_0x2e421b=this[_0x4dc387(0x223)][_0x4dc387(0x1a9)][_0x4dc387(0x1cc)](_0x1db450=>_0x1db450['id']===_0xfe922e);if(!_0x2e421b)return;const _0x26f687=_0x2e421b[_0x4dc387(0x1ab)][_0x4dc387(0x1cc)](_0x21c2dc=>_0x21c2dc['id']===_0x2e5df4);_0x26f687&&(_0x26f687[_0x4dc387(0x1ed)]=_0x242500,this[_0x4dc387(0x1f1)](_0x4dc387(0x206),{'sourceId':_0xfe922e,'resourceId':_0x2e5df4,'isInContext':_0x242500}));}[_0xaa15a6(0x20d)](_0x408fd6){const _0x59116d=_0xaa15a6;this[_0x59116d(0x1a7)][_0x59116d(0x196)](_0x408fd6,!0x0),this[_0x59116d(0x1a7)][_0x59116d(0x211)]&&this[_0x59116d(0x1f1)](_0x59116d(0x1cd),{'isUploadInProgress':!0x0});}[_0xaa15a6(0x1fc)](_0x13a38e){const _0x401e7f=_0xaa15a6;this[_0x401e7f(0x1a7)][_0x401e7f(0x1ae)](_0x13a38e),0x0===this[_0x401e7f(0x1a7)][_0x401e7f(0x211)]&&this[_0x401e7f(0x1f1)](_0x401e7f(0x1cd),{'isUploadInProgress':!0x1});}}
23
+ const _0x215be7=_0x5d84;(function(_0x55152e,_0x3626c1){const _0x4b0b5c=_0x5d84,_0x3f2707=_0x55152e();while(!![]){try{const _0x48f1d5=parseInt(_0x4b0b5c(0x185))/0x1+parseInt(_0x4b0b5c(0x13b))/0x2+-parseInt(_0x4b0b5c(0x158))/0x3+parseInt(_0x4b0b5c(0x13c))/0x4+-parseInt(_0x4b0b5c(0x16c))/0x5+parseInt(_0x4b0b5c(0x1b0))/0x6*(-parseInt(_0x4b0b5c(0x135))/0x7)+parseInt(_0x4b0b5c(0x1a1))/0x8*(parseInt(_0x4b0b5c(0x176))/0x9);if(_0x48f1d5===_0x3626c1)break;else _0x3f2707['push'](_0x3f2707['shift']());}catch(_0x563be1){_0x3f2707['push'](_0x3f2707['shift']());}}}(_0x4d43,0x3064b));import{CKEditorError as _0x492d6f,ObservableMixin as _0x9c9d99,uid as _0x2913a4}from'ckeditor5/src/utils.js';import{AIContextItemType as _0x5672ff,AIContextTextResourceType as _0x5144de}from'../../aicore/model/aicontext.js';import{escape as _0x59bada}from'es-toolkit/compat';import{errorsMap as _0x2fea76}from'../../errorsmap.js';function _0x5d84(_0x48850e,_0x5ab4b7){const _0x4d430d=_0x4d43();return _0x5d84=function(_0x5d8486,_0x33cf54){_0x5d8486=_0x5d8486-0x130;let _0x1b8698=_0x4d430d[_0x5d8486];return _0x1b8698;},_0x5d84(_0x48850e,_0x5ab4b7);}export const AI_CONTEXT_MODEL_EVENT_NAMES=[_0x215be7(0x190),_0x215be7(0x181),_0x215be7(0x196),_0x215be7(0x1a0),_0x215be7(0x18f),_0x215be7(0x1a5),_0x215be7(0x16e),_0x215be7(0x157),_0x215be7(0x13f)];export class AIChatContext extends _0x9c9d99(){[_0x215be7(0x19d)];[_0x215be7(0x1b6)];[_0x215be7(0x17e)];constructor({connector:_0x3bebdf,config:_0x457cec,ownerId:_0x103131}){const _0x24c69c=_0x215be7;super(),this[_0x24c69c(0x19d)]=_0x3bebdf,this[_0x24c69c(0x1b6)]=_0x457cec,this[_0x24c69c(0x17e)]=_0x103131;}[_0x215be7(0x188)](){const _0x35506d=_0x215be7;this[_0x35506d(0x1bb)]=new Map(),this[_0x35506d(0x18d)]=new Map(),this[_0x35506d(0x191)]=new Map(),this[_0x35506d(0x133)]=new Map(),this[_0x35506d(0x159)]();}[_0x215be7(0x144)](){const _0x2e96fc=_0x215be7;return this[_0x2e96fc(0x1bb)];}async[_0x215be7(0x1a6)](_0x312a95){const _0x123ad7=_0x215be7,_0x2a1bf5=await this[_0x123ad7(0x16a)](_0x312a95);return this[_0x123ad7(0x150)](_0x2a1bf5),_0x123ad7(0x1ba)===_0x2a1bf5[_0x123ad7(0x1a7)]&&this[_0x123ad7(0x178)](),_0x2a1bf5;}async[_0x215be7(0x16a)](_0x169e48){const _0x2909f6=_0x215be7;if(_0x169e48[_0x2909f6(0x1b3)]===_0x5672ff[_0x2909f6(0x138)]){const _0x1c1035=await this[_0x2909f6(0x19d)][_0x2909f6(0x1bf)](this[_0x2909f6(0x17e)],_0x169e48['id'])[_0x2909f6(0x199)]();return{'id':_0x2909f6(0x1ba),'uiId':_0x2909f6(0x1ba),'label':_0x2909f6(0x137),'type':_0x169e48[_0x2909f6(0x1b3)],'content':_0x1c1035[_0x2909f6(0x14a)],'hidden':this[_0x2909f6(0x18d)][_0x2909f6(0x179)](_0x2909f6(0x1ba)),'version':_0x1c1035[_0x2909f6(0x1b2)]?.[_0x2909f6(0x18a)],'sessionId':_0x1c1035[_0x2909f6(0x1b2)]?.[_0x2909f6(0x18e)]};}if(_0x169e48[_0x2909f6(0x1b3)]===_0x5672ff[_0x2909f6(0x166)])return{'id':_0x169e48['id'],'uiId':_0x169e48['id'],'label':_0x169e48[_0x2909f6(0x173)]?.[_0x2909f6(0x1ad)]||_0x169e48['id'],'type':_0x5672ff[_0x2909f6(0x166)],'mcpServerName':_0x169e48[_0x2909f6(0x174)],'toolName':_0x169e48[_0x2909f6(0x14f)],'data':_0x169e48[_0x2909f6(0x173)]||{}};return{'id':_0x169e48['id'],'uiId':_0x169e48['id'],'label':_0x169e48[_0x2909f6(0x1b2)]?.[_0x2909f6(0x1ad)]||_0x169e48[_0x2909f6(0x170)]||_0x169e48[_0x2909f6(0x19c)]||_0x169e48['id'],'type':_0x169e48[_0x2909f6(0x1b3)],..._0x169e48?.[_0x2909f6(0x1b2)]?.[_0x2909f6(0x17a)]?{'resourceId':_0x169e48[_0x2909f6(0x1b2)]?.[_0x2909f6(0x17a)]}:{}};}[_0x215be7(0x1b7)](){const _0x27d53f=_0x215be7;return new Map(this[_0x27d53f(0x18d)]);}[_0x215be7(0x1bc)](_0x441cf9){const _0x499c0a=_0x215be7,_0xdac82=this[_0x499c0a(0x1bb)][_0x499c0a(0x132)](_0x441cf9);_0xdac82?.[_0x499c0a(0x1c0)]||this[_0x499c0a(0x1ac)](_0x441cf9);}[_0x215be7(0x164)](){const _0x15c169=_0x215be7;if(0x0===this[_0x15c169(0x1bb)][_0x15c169(0x162)])return;for(const _0x3ff1f2 of this[_0x15c169(0x1bb)][_0x15c169(0x147)]())this[_0x15c169(0x1ac)](_0x3ff1f2[_0x15c169(0x1a7)]);const _0x2366ad=this[_0x15c169(0x18d)][_0x15c169(0x132)](_0x15c169(0x1ba))||this[_0x15c169(0x1bb)][_0x15c169(0x132)](_0x15c169(0x1ba));_0x2366ad&&this[_0x15c169(0x156)]({..._0x2366ad,'isReadOnly':!0x0,'hidden':!0x0});}[_0x215be7(0x13a)](_0x5d7346){const _0x46d4c5=_0x215be7;for(const _0x4cb85d of _0x5d7346[_0x46d4c5(0x147)]())this[_0x46d4c5(0x150)](_0x4cb85d);this[_0x46d4c5(0x164)](),this[_0x46d4c5(0x197)](_0x46d4c5(0x1a0),{'contextItems':Array[_0x46d4c5(0x14d)](this[_0x46d4c5(0x1b7)]()[_0x46d4c5(0x147)]())});}[_0x215be7(0x15e)](){const _0x127715=_0x215be7;return this[_0x127715(0x1bb)][_0x127715(0x179)](_0x127715(0x1ba));}[_0x215be7(0x175)](){const _0x32f348=_0x215be7;return this[_0x32f348(0x1bb)][_0x32f348(0x179)](_0x32f348(0x13e));}[_0x215be7(0x14b)](){const _0x8f62e8=_0x215be7;return this[_0x8f62e8(0x18d)][_0x8f62e8(0x179)](_0x8f62e8(0x1ba));}static[_0x215be7(0x1be)](_0x4c5c3a){const _0x176909=_0x215be7;return Array[_0x176909(0x14d)](_0x4c5c3a[_0x176909(0x147)]())[_0x176909(0x17f)](_0x18cd68=>this[_0x176909(0x131)](_0x18cd68))[_0x176909(0x17d)](_0x56e337=>null!==_0x56e337);}async[_0x215be7(0x1af)](_0x242160,_0x50ff4e,_0x5e7899=_0x5672ff[_0x215be7(0x17c)]){const _0x22a9fb=_0x215be7,_0x488e49=_0x22a9fb(0x186)+_0x2913a4();this[_0x22a9fb(0x165)](_0x488e49);try{await Promise[_0x22a9fb(0x1b9)](_0x242160[_0x22a9fb(0x17f)](async _0x1cd86a=>{const _0x53a777=_0x22a9fb,_0x8012e3=_0x53a777(0x180)+_0x2913a4(),_0x49a504=_0x59bada(_0x1cd86a[_0x53a777(0x170)]);try{this[_0x53a777(0x156)]({'type':_0x5e7899,'label':_0x50ff4e?.[_0x53a777(0x1ad)]||_0x49a504,'uiId':_0x8012e3,'resourceId':_0x50ff4e?.[_0x53a777(0x17a)]},!0x0);const _0x1b8b41=this[_0x53a777(0x19d)][_0x53a777(0x14e)](this[_0x53a777(0x17e)],_0x1cd86a,_0x50ff4e);this[_0x53a777(0x191)][_0x53a777(0x169)](_0x8012e3,_0x1b8b41[_0x53a777(0x145)]);const {id:_0x40c849}=await _0x1b8b41[_0x53a777(0x1aa)]();this[_0x53a777(0x191)][_0x53a777(0x139)](_0x8012e3),this[_0x53a777(0x168)]({'type':_0x5e7899,'id':_0x40c849,'label':_0x50ff4e?.[_0x53a777(0x1ad)]||_0x49a504,'uiId':_0x8012e3,'resourceId':_0x50ff4e?.[_0x53a777(0x17a)]},!0x1);}catch(_0x67a94d){this[_0x53a777(0x191)][_0x53a777(0x139)](_0x8012e3);if(!(_0x67a94d instanceof _0x492d6f&&_0x67a94d[_0x53a777(0x130)][_0x53a777(0x16b)](_0x53a777(0x1a9)))){const _0x580796=_0x2fea76[_0x53a777(0x132)](_0x67a94d[_0x53a777(0x1a8)])||_0x53a777(0x189),_0x3a55c1=new _0x492d6f(_0x580796,null,{'fileName':_0x49a504,..._0x67a94d});_0x3a55c1[_0x53a777(0x136)]=_0x67a94d[_0x53a777(0x136)],this[_0x53a777(0x197)](_0x53a777(0x18f),{'error':_0x3a55c1});}this[_0x53a777(0x1ac)](_0x8012e3);}}));}finally{this[_0x22a9fb(0x14c)](_0x488e49);}}[_0x215be7(0x1b8)](_0x370ea7){const _0x312383=_0x215be7;if(this[_0x312383(0x15e)]()||!this[_0x312383(0x18c)][_0x312383(0x13d)][_0x312383(0x15f)])return;const _0x3561c0={'type':_0x5672ff[_0x312383(0x138)],'uiId':_0x312383(0x1ba),'label':_0x370ea7,'isReadOnly':this[_0x312383(0x18d)][_0x312383(0x179)](_0x312383(0x1ba)),'hidden':this[_0x312383(0x18d)][_0x312383(0x179)](_0x312383(0x1ba))};this[_0x312383(0x156)](_0x3561c0);}async[_0x215be7(0x152)](_0x5e0bca,_0x1bde62,_0x582d8b,_0x330272){const _0x2c8101=_0x215be7,_0x5c0f68=this[_0x2c8101(0x1bb)][_0x2c8101(0x132)](_0x2c8101(0x1ba));if(_0x5c0f68&&_0x5e0bca){_0x5c0f68[_0x2c8101(0x13e)]=_0x330272?_0x330272[_0x2c8101(0x17f)](_0x57f52c=>({'start':_0x57f52c[_0x2c8101(0x15d)],'end':_0x57f52c[_0x2c8101(0x153)]})):[];try{if(_0x5c0f68[_0x2c8101(0x18a)]===_0x1bde62)return;const {id:_0x137811}=await this[_0x2c8101(0x19d)][_0x2c8101(0x15b)](this[_0x2c8101(0x17e)],_0x5e0bca,{'version':_0x1bde62,'sessionId':_0x582d8b})[_0x2c8101(0x1aa)]();_0x5c0f68['id']=_0x137811,_0x5c0f68[_0x2c8101(0x14a)]=_0x5e0bca,_0x5c0f68[_0x2c8101(0x18a)]=_0x1bde62,_0x5c0f68[_0x2c8101(0x18e)]=_0x582d8b;}catch(_0x315455){const _0x4b1ab9=new _0x492d6f(_0x2c8101(0x19b),null);_0x4b1ab9[_0x2c8101(0x136)]=_0x315455[_0x2c8101(0x136)],this[_0x2c8101(0x197)](_0x2c8101(0x18f),{'error':_0x4b1ab9});}}}[_0x215be7(0x184)](_0x591c56){const _0x3957ea=_0x215be7;this[_0x3957ea(0x156)]({'type':_0x5672ff[_0x3957ea(0x1c2)],'label':_0x591c56,'uiId':_0x3957ea(0x13e),'content':_0x591c56});}[_0x215be7(0x140)](){const _0x3d13f9=_0x215be7;this[_0x3d13f9(0x1ac)](_0x3d13f9(0x13e));}async[_0x215be7(0x19a)](_0x4ca1df,_0x381364){const _0x1dd4ed=_0x215be7,_0x2ee2c3=_0x1dd4ed(0x1b4)+_0x2913a4();this[_0x1dd4ed(0x165)](_0x2ee2c3);const _0x4f2eda=_0x1dd4ed(0x1b4)+_0x2913a4();try{this[_0x1dd4ed(0x156)]({'type':_0x5672ff[_0x1dd4ed(0x146)],'label':_0x381364?.[_0x1dd4ed(0x1ad)]||_0x4ca1df,'uiId':_0x4f2eda,'resourceId':_0x381364?.[_0x1dd4ed(0x17a)]},!0x0);const _0x579660=this[_0x1dd4ed(0x19d)][_0x1dd4ed(0x154)](this[_0x1dd4ed(0x17e)],_0x4ca1df,_0x381364);this[_0x1dd4ed(0x191)][_0x1dd4ed(0x169)](_0x4f2eda,_0x579660[_0x1dd4ed(0x145)]);const {id:_0x1a7324}=await _0x579660[_0x1dd4ed(0x1aa)]();this[_0x1dd4ed(0x191)][_0x1dd4ed(0x139)](_0x4f2eda),this[_0x1dd4ed(0x168)]({'type':_0x5672ff[_0x1dd4ed(0x146)],'id':_0x1a7324,'label':_0x381364?.[_0x1dd4ed(0x1ad)]||_0x4ca1df,'uiId':_0x4f2eda,'resourceId':_0x381364?.[_0x1dd4ed(0x17a)]},!0x1);}catch(_0x5a6c25){this[_0x1dd4ed(0x191)][_0x1dd4ed(0x139)](_0x4f2eda),(_0x5a6c25[_0x1dd4ed(0x130)][_0x1dd4ed(0x16b)](_0x1dd4ed(0x1a9))||this[_0x1dd4ed(0x197)](_0x1dd4ed(0x18f),{'error':new _0x492d6f(_0x1dd4ed(0x19e),this,{'url':_0x4ca1df,'originalError':_0x5a6c25}),'url':_0x4ca1df}),this[_0x1dd4ed(0x1ac)](_0x4f2eda));}finally{this[_0x1dd4ed(0x14c)](_0x2ee2c3);}}[_0x215be7(0x187)](_0x14ddab){const _0x533410=_0x215be7;_0x14ddab['id']=_0x14ddab['id']??_0x2913a4()[_0x533410(0x183)](0x0,0x15),this[_0x533410(0x1bb)][_0x533410(0x169)](_0x14ddab[_0x533410(0x1a7)],_0x14ddab),this[_0x533410(0x197)](_0x533410(0x190),{'contextItem':_0x14ddab,'isLoading':!0x1});}async[_0x215be7(0x160)](_0x157f77,_0x212da5,_0x54855a){const _0x1e2db5=_0x215be7,_0x4b120a=this[_0x1e2db5(0x18c)][_0x1e2db5(0x149)][_0x1e2db5(0x1a3)](_0x5c8b0a=>_0x5c8b0a['id']===_0x157f77);if(!_0x4b120a)return this[_0x1e2db5(0x197)](_0x1e2db5(0x18f),{'error':new _0x492d6f(_0x1e2db5(0x151),this,{'sourceId':_0x157f77}),'sourceId':_0x157f77}),[];try{const _0x390b1c=(await _0x4b120a[_0x1e2db5(0x148)](_0x212da5))[_0x1e2db5(0x17f)](_0x3a36d0=>{const _0x15b559=_0x1e2db5,_0xb2f7b2=this[_0x15b559(0x198)](_0x3a36d0['id']);return{..._0x3a36d0,'isInContext':_0xb2f7b2};});return _0x4b120a[_0x1e2db5(0x19f)]=_0x390b1c,this[_0x1e2db5(0x197)](_0x1e2db5(0x16e),{'sourceId':_0x157f77,'source':_0x4b120a,'resources':_0x390b1c,'uid':_0x54855a}),_0x390b1c;}catch(_0x174722){return this[_0x1e2db5(0x197)](_0x1e2db5(0x18f),{'error':new _0x492d6f(_0x1e2db5(0x1c3),this,{'sourceId':_0x157f77,'originalError':_0x174722}),'sourceId':_0x157f77,'sourceLabel':_0x4b120a[_0x1e2db5(0x1ad)]}),[];}}async[_0x215be7(0x143)](_0x5e20c9,_0x5e4ad4){const _0x4814af=_0x215be7;if(this[_0x4814af(0x198)](_0x5e4ad4['id']))return;let _0x16b0a9=_0x5e4ad4[_0x4814af(0x173)];if(!_0x16b0a9&&_0x5e20c9[_0x4814af(0x1c1)])try{_0x16b0a9=await _0x5e20c9[_0x4814af(0x1c1)](_0x5e4ad4['id']);}catch(_0x4fe844){return void this[_0x4814af(0x197)](_0x4814af(0x18f),{'error':new _0x492d6f(_0x4814af(0x1b5),this,{'resourceId':_0x5e4ad4['id'],'sourceId':_0x5e20c9['id'],'originalError':_0x4fe844}),'resourceId':_0x5e4ad4['id'],'sourceId':_0x5e20c9['id']});}if(_0x16b0a9)switch(_0x5e4ad4[_0x4814af(0x1b3)]){case _0x5672ff[_0x4814af(0x146)]:if(_0x4814af(0x15a)!=typeof _0x16b0a9)return void this[_0x4814af(0x197)](_0x4814af(0x18f),{'error':new _0x492d6f(_0x4814af(0x1a4),this,{'resourceId':_0x5e4ad4['id'],'sourceId':_0x5e20c9['id'],'expectedType':_0x4814af(0x15a),'actualType':typeof _0x16b0a9}),'resourceId':_0x5e4ad4['id'],'sourceId':_0x5e20c9['id']});await this[_0x4814af(0x19a)](_0x16b0a9,{'label':_0x5e4ad4[_0x4814af(0x1ad)],'resourceId':_0x5e4ad4['id']});break;case _0x5672ff[_0x4814af(0x17c)]:if(!(_0x16b0a9 instanceof File))return void this[_0x4814af(0x197)](_0x4814af(0x18f),{'error':new _0x492d6f(_0x4814af(0x1a4),this,{'resourceId':_0x5e4ad4['id'],'sourceId':_0x5e20c9['id'],'expectedType':_0x4814af(0x141),'actualType':typeof _0x16b0a9}),'resourceId':_0x5e4ad4['id'],'sourceId':_0x5e20c9['id']});await this[_0x4814af(0x1af)]([_0x16b0a9],{'label':_0x5e4ad4[_0x4814af(0x1ad)],'resourceId':_0x5e4ad4['id']});break;case _0x5672ff[_0x4814af(0x193)]:if(_0x4814af(0x1b1)!=typeof _0x16b0a9||!(_0x4814af(0x14a)in _0x16b0a9)||!(_0x4814af(0x1b3)in _0x16b0a9))return void this[_0x4814af(0x197)](_0x4814af(0x18f),{'error':new _0x492d6f(_0x4814af(0x1a4),this,{'resourceId':_0x5e4ad4['id'],'sourceId':_0x5e20c9['id'],'expectedType':_0x4814af(0x155),'actualType':typeof _0x16b0a9}),'resourceId':_0x5e4ad4['id'],'sourceId':_0x5e20c9['id']});_0x16b0a9=AIChatContext[_0x4814af(0x172)](_0x16b0a9,_0x5e4ad4[_0x4814af(0x1ad)]),await this[_0x4814af(0x1af)]([_0x16b0a9],{'label':_0x5e4ad4[_0x4814af(0x1ad)],'resourceId':_0x5e4ad4['id']},_0x5672ff[_0x4814af(0x193)]);break;case _0x5672ff[_0x4814af(0x166)]:break;default:this[_0x4814af(0x197)](_0x4814af(0x18f),{'error':new _0x492d6f(_0x4814af(0x167),this,{'resourceId':_0x5e4ad4['id'],'sourceId':_0x5e20c9['id'],'resourceType':_0x5e4ad4[_0x4814af(0x1b3)]}),'resourceId':_0x5e4ad4['id'],'sourceId':_0x5e20c9['id']});}else this[_0x4814af(0x197)](_0x4814af(0x18f),{'error':new _0x492d6f(_0x4814af(0x16d),this,{'resourceId':_0x5e4ad4['id'],'sourceId':_0x5e20c9['id']}),'resourceId':_0x5e4ad4['id'],'sourceId':_0x5e20c9['id']});}static[_0x215be7(0x172)](_0x2a83b4,_0x585752){const _0x4e9658=_0x215be7;switch(_0x2a83b4[_0x4e9658(0x1b3)]){case _0x5144de[_0x4e9658(0x163)]:return new File([_0x2a83b4[_0x4e9658(0x14a)]],_0x585752,{'type':_0x4e9658(0x1ae)});case _0x5144de[_0x4e9658(0x142)]:return new File([_0x2a83b4[_0x4e9658(0x14a)]],_0x585752,{'type':_0x4e9658(0x134)});default:return new File([_0x2a83b4[_0x4e9658(0x14a)]],_0x585752,{'type':_0x4e9658(0x17b)});}}static[_0x215be7(0x131)](_0x6dfd55){const _0x5f105f=_0x215be7;switch(_0x6dfd55[_0x5f105f(0x1b3)]){case _0x5672ff[_0x5f105f(0x17c)]:return{'type':_0x5672ff[_0x5f105f(0x17c)],'id':_0x6dfd55['id']};case _0x5672ff[_0x5f105f(0x146)]:return{'type':_0x5672ff[_0x5f105f(0x146)],'id':_0x6dfd55['id']};case _0x5672ff[_0x5f105f(0x138)]:return{'type':_0x5672ff[_0x5f105f(0x138)],'id':_0x6dfd55['id'],..._0x6dfd55[_0x5f105f(0x13e)]?.[_0x5f105f(0x194)]&&{'selection':_0x6dfd55[_0x5f105f(0x13e)]}};case _0x5672ff[_0x5f105f(0x193)]:return{'type':_0x5672ff[_0x5f105f(0x17c)],'id':_0x6dfd55['id']};case _0x5672ff[_0x5f105f(0x166)]:{const _0x459810=_0x6dfd55;return{'type':_0x5672ff[_0x5f105f(0x166)],'mcpServerName':_0x459810[_0x5f105f(0x174)],'toolName':_0x459810[_0x5f105f(0x14f)],'data':_0x459810[_0x5f105f(0x173)],'id':_0x459810['id']};}default:return null;}}[_0x215be7(0x156)](_0x42ec74,_0x3fc885=!0x1){const _0x282762=_0x215be7;if(this[_0x282762(0x1bb)][_0x282762(0x169)](_0x42ec74[_0x282762(0x1a7)],_0x42ec74),_0x42ec74[_0x282762(0x161)]||this[_0x282762(0x197)](_0x282762(0x190),{'contextItem':_0x42ec74,'isLoading':_0x3fc885}),_0x282762(0x1ba)===_0x42ec74[_0x282762(0x1a7)]&&this[_0x282762(0x178)](),_0x42ec74[_0x282762(0x17a)]){const _0x1ecf83=this[_0x282762(0x177)](_0x42ec74[_0x282762(0x17a)]);_0x1ecf83&&_0x1ecf83[_0x282762(0x182)](_0x2bae3e=>{const _0x2052e4=_0x282762;this[_0x2052e4(0x16f)](_0x2bae3e,_0x42ec74[_0x2052e4(0x17a)],!0x0);});}}[_0x215be7(0x1ac)](_0x4b133d){const _0x6e45ee=_0x215be7,_0x1ff4cc=this[_0x6e45ee(0x1bb)][_0x6e45ee(0x132)](_0x4b133d),_0x184f00=this[_0x6e45ee(0x191)][_0x6e45ee(0x132)](_0x4b133d);if(_0x184f00&&(_0x184f00[_0x6e45ee(0x18b)](),this[_0x6e45ee(0x191)][_0x6e45ee(0x139)](_0x4b133d)),_0x1ff4cc?.[_0x6e45ee(0x17a)]){const _0xd23d5e=this[_0x6e45ee(0x177)](_0x1ff4cc[_0x6e45ee(0x17a)]);_0xd23d5e&&_0xd23d5e[_0x6e45ee(0x182)](_0x44ade7=>{const _0x1d227f=_0x6e45ee;this[_0x1d227f(0x16f)](_0x44ade7,_0x1ff4cc[_0x1d227f(0x17a)],!0x1);});}this[_0x6e45ee(0x1bb)][_0x6e45ee(0x139)](_0x4b133d),this[_0x6e45ee(0x197)](_0x6e45ee(0x181),{'uiId':_0x4b133d,'type':_0x1ff4cc?.[_0x6e45ee(0x1b3)]}),_0x6e45ee(0x1ba)===_0x4b133d&&this[_0x6e45ee(0x178)]();}[_0x215be7(0x168)](_0x264b50,_0x5a41fd){const _0x29a491=_0x215be7;if(this[_0x29a491(0x1bb)][_0x29a491(0x179)](_0x264b50[_0x29a491(0x1a7)])&&(this[_0x29a491(0x1bb)][_0x29a491(0x169)](_0x264b50[_0x29a491(0x1a7)],_0x264b50),this[_0x29a491(0x197)](_0x29a491(0x196),{'contextItem':_0x264b50,'isLoading':_0x5a41fd}),_0x264b50[_0x29a491(0x17a)])){const _0x3d3e9d=this[_0x29a491(0x177)](_0x264b50[_0x29a491(0x17a)]);_0x3d3e9d&&_0x3d3e9d[_0x29a491(0x182)](_0x2c2c3c=>{const _0x23542b=_0x29a491;this[_0x23542b(0x16f)](_0x2c2c3c,_0x264b50[_0x23542b(0x17a)],!0x0);});}}[_0x215be7(0x150)](_0x99cefa){const _0x3a5dcd=_0x215be7;this[_0x3a5dcd(0x18d)][_0x3a5dcd(0x169)](_0x99cefa[_0x3a5dcd(0x1a7)],_0x99cefa);}[_0x215be7(0x159)](){const _0x2bb8cd=_0x215be7;this[_0x2bb8cd(0x18c)]={'document':{'enabled':!0x1!==this[_0x2bb8cd(0x1b6)]?.[_0x2bb8cd(0x13d)]?.[_0x2bb8cd(0x15f)],'isHidden':!0x1},'urls':{'enabled':!0x1!==this[_0x2bb8cd(0x1b6)]?.[_0x2bb8cd(0x195)]?.[_0x2bb8cd(0x15f)]},'files':{'enabled':!0x1!==this[_0x2bb8cd(0x1b6)]?.[_0x2bb8cd(0x171)]?.[_0x2bb8cd(0x15f)]},'sources':this[_0x2bb8cd(0x1a2)](),'customItems':this[_0x2bb8cd(0x1b6)]?.[_0x2bb8cd(0x15c)]?.[_0x2bb8cd(0x17f)](_0x4daef1=>({..._0x4daef1,'enabled':!0x0}))??[]},this[_0x2bb8cd(0x197)](_0x2bb8cd(0x1a5),{'options':this[_0x2bb8cd(0x18c)]});}[_0x215be7(0x1a2)](){const _0x35b4f6=_0x215be7;return this[_0x35b4f6(0x1b6)]?.[_0x35b4f6(0x149)]?.[_0x35b4f6(0x17f)](_0x57f200=>({..._0x57f200,'resources':[]}))??[];}[_0x215be7(0x178)](){const _0x2d94fc=_0x215be7,_0x5c20ed=this[_0x2d94fc(0x15e)]()||this[_0x2d94fc(0x14b)]();this[_0x2d94fc(0x18c)][_0x2d94fc(0x13d)][_0x2d94fc(0x1ab)]=_0x5c20ed,this[_0x2d94fc(0x197)](_0x2d94fc(0x1a5),{'options':this[_0x2d94fc(0x18c)]});}[_0x215be7(0x198)](_0x1d915e){const _0x3a8d2d=_0x215be7;for(const _0x16c7a6 of this[_0x3a8d2d(0x1bb)][_0x3a8d2d(0x147)]())if(_0x16c7a6[_0x3a8d2d(0x17a)]===_0x1d915e)return!0x0;for(const _0x113dae of this[_0x3a8d2d(0x18d)][_0x3a8d2d(0x147)]())if(_0x113dae[_0x3a8d2d(0x17a)]===_0x1d915e)return!0x0;return!0x1;}[_0x215be7(0x177)](_0x3f1770){const _0x2b52b4=_0x215be7,_0x606c61=[];for(const _0x520a74 of this[_0x2b52b4(0x18c)][_0x2b52b4(0x149)]){_0x520a74[_0x2b52b4(0x19f)][_0x2b52b4(0x1a3)](_0xd43104=>_0xd43104['id']===_0x3f1770)&&_0x606c61[_0x2b52b4(0x1bd)](_0x520a74['id']);}return 0x0===_0x606c61[_0x2b52b4(0x194)]?null:_0x606c61;}[_0x215be7(0x16f)](_0xda2daf,_0x23e21c,_0x1993bb){const _0x15717e=_0x215be7,_0x2870d4=this[_0x15717e(0x18c)][_0x15717e(0x149)][_0x15717e(0x1a3)](_0x750952=>_0x750952['id']===_0xda2daf);if(!_0x2870d4)return;const _0x1a865d=_0x2870d4[_0x15717e(0x19f)][_0x15717e(0x1a3)](_0x16ddfd=>_0x16ddfd['id']===_0x23e21c);_0x1a865d&&(_0x1a865d[_0x15717e(0x192)]=_0x1993bb,this[_0x15717e(0x197)](_0x15717e(0x157),{'sourceId':_0xda2daf,'resourceId':_0x23e21c,'isInContext':_0x1993bb}));}[_0x215be7(0x165)](_0x54114d){const _0x475827=_0x215be7;this[_0x475827(0x133)][_0x475827(0x169)](_0x54114d,!0x0),this[_0x475827(0x133)][_0x475827(0x162)]&&this[_0x475827(0x197)](_0x475827(0x13f),{'isUploadInProgress':!0x0});}[_0x215be7(0x14c)](_0x5aa3cf){const _0x42d25e=_0x215be7;this[_0x42d25e(0x133)][_0x42d25e(0x139)](_0x5aa3cf),0x0===this[_0x42d25e(0x133)][_0x42d25e(0x162)]&&this[_0x42d25e(0x197)](_0x42d25e(0x13f),{'isUploadInProgress':!0x1});}}function _0x4d43(){const _0x722e24=['ai-chat-context-invalid-data','addContextOptionsChanged','populateFromMessage','uiId','code','ai-request-aborted','getId','isHidden','_removeContextItem','label','text/markdown','addFilesToContext','174HxKOOA','object','attributes','type','url-','ai-chat-resource-load-failed','_config','getSentContextItems','addCurrentDocumentToContext','all','current-document','_pendingContextItems','removeFromContext','push','mapContextItemsToRequestData','fetchDocument','isReadOnly','getData','SELECTION','ai-chat-source-resources-load-failed','message','_mapContextItemToRequestData','get','_ongoingUploadOperations','text/html','84637SxlOQg','stack','Current\x20document','DOCUMENT','delete','addToConversationContext','382822jBSinQ','176248CsKUCx','document','selection','uploadProgressChanged','removeSelectionFromContext','File','HTML','addResourceToContext','getPendingContextItems','abortController','URL','values','getResources','sources','content','isCurrentDocumentInConversation','_finishUploadOperation','from','uploadFile','toolName','_addToConversationContextItem','ai-chat-source-not-found','updateCurrentDocument','end','uploadUrl','object\x20with\x20content\x20and\x20type\x20properties','_addContextItem','resourceStateChanged','1089270LSnLHT','_setAddContextOptionsDefaultState','string','uploadDocument','customItems','start','isCurrentDocumentInContext','enabled','loadSourceResources','hidden','size','MARKDOWN','clearPendingContextItems','_startUploadOperation','TOOL','ai-chat-context-unsupported-type','_finishContextItemLoading','set','_createContextItemFromContent','startsWith','1613650CfuNAt','ai-chat-resource-no-data','sourceResourcesLoaded','_updateResourceInContextState','name','files','_convertTextResourceToFile','data','mcpServerName','isSelectionInContext','36864HbEeUC','_findSourceIdsByResourceId','_toggleAddCurrentDocumentOptionVisibility','has','resourceId','text/plain','FILE','filter','_ownerId','map','file-','contextItemRemoved','forEach','substring','addSelectionToContext','110373qldNOT','files-','addToolItemToContext','init','ai-chat-file-upload-failed','version','abort','_addContextOptionsState','_conversationContextItems','sessionId','error','contextItemAdded','_ongoingUploads','isInContext','TEXT','length','urls','contextItemLoadingEnded','fire','_isResourceInContext','getDocument','addUrlToContext','ai-chat-document-upload-failed','url','_connector','ai-chat-url-upload-failed','resources','contextSent','1736OWIJDV','_getCustomSourcesInitialState','find'];_0x4d43=function(){return _0x722e24;};return _0x4d43();}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x4dc5c4=_0x3c7b;(function(_0x422e42,_0x3d2f2f){const _0x57145d=_0x3c7b,_0xe9712a=_0x422e42();while(!![]){try{const _0x14dd69=parseInt(_0x57145d(0x1f9))/0x1+parseInt(_0x57145d(0x21a))/0x2*(-parseInt(_0x57145d(0x20e))/0x3)+parseInt(_0x57145d(0x1fa))/0x4+-parseInt(_0x57145d(0x259))/0x5+-parseInt(_0x57145d(0x245))/0x6+-parseInt(_0x57145d(0x257))/0x7+parseInt(_0x57145d(0x21f))/0x8;if(_0x14dd69===_0x3d2f2f)break;else _0xe9712a['push'](_0xe9712a['shift']());}catch(_0x462fbf){_0xe9712a['push'](_0xe9712a['shift']());}}}(_0x3759,0xeef19));import{CKEditorError as _0x30fc02,EmitterMixin as _0x3115ec,logWarning as _0x52680a}from'ckeditor5/src/utils.js';import{AI_MODEL_EVENT_NAMES as _0x582dcd}from'../../aicore/model/aiinteraction.js';import{AIChatContext as _0x40ebe5,AI_CONTEXT_MODEL_EVENT_NAMES as _0x6f40a4}from'./aichatcontext.js';import{AICapabilities as _0x48ddd8,CAPABILITIES_MODEL_EVENT_NAMES as _0x286034}from'../../aicore/model/aicapabilities.js';function _0x3759(){const _0x65ea76=['1014781hfbvRJ','2784676jvqLsT','code','conversationStarted','conversationInitialized','currentReply','start','modification','error','lastInteraction','type','delegate','loadSourceResources','user','_extractContextItems','interactions','getConversation','ai-chat-conversation-already-started','ai-chat-handle-user-conversation-not-initialized','getPendingContextItems','modelSelected','222lGDDVi','push','chatContext','hasOwn','isStarted','addFilesToContext','getAvailableModels','getEditor','ai-chat-conversation-set-model-not-available','isCurrentDocumentInConversation','removeFromContext','webSearch','47462trjPzg','addToConversationContext','ai-chat-conversation-init-failed','updateCurrentDocument','indexOf','20670176pripyw','removeSelectionFromContext','updateCurrentDocumentInContext','ai-chat-conversation-init-from-id-failed','getMessages','options','isAvailable','handleUserInteraction','url','group','splice','getCapabilitiesConfig','parse','reset','removeInteraction','interactionCreated','fetchConversation','destroy','model','setWebSearch','get','content','find','ai-chat-handle-user-interaction-already-in-progress','stack','assistant','addUrlToContext','addToolItemToContext','init','addSelectionToContext','mcp-tool-result','_handleToolResultData','createReply','message','selectedModelId','isFromHistory','set','length','5451414sFvzFq','createInteraction','selectedModel','toggleReasoning','attributes','setReasoning','reasoning','toolName','fetchConversationMessages','getAll','ai-chat-conversation-set-model-null','ai-chat-conversation-start-failed','conversationId','toggleWebSearch','isSelectionInContext','load','setConversationTitle','isCurrentDocumentInContext','3053309GFncoh','capabilities','1075795HiHVcr','addCurrentDocumentToContext','getInteraction','role','sessionId','getModel','title','connector','appendContent','populateFromMessage','getCurrentDocumentContext','setModel','chatModels','contextItems','_processMessagesToInteractions','addResourceToContext','fire','toLowerCase','prompt','currentInteraction','ai-chat-conversation-start-no-model-selected','sources','text','chatCapabilities','ai-chat-handle-user-interaction-start-failed','startConversation','getDocumentContext','stop'];_0x3759=function(){return _0x65ea76;};return _0x3759();}import{AIChatInteraction as _0x57978a}from'./aichatinteraction.js';import{errorsMap as _0x212693}from'../../errorsmap.js';function _0x3c7b(_0x3ff803,_0x5bccf7){const _0x375998=_0x3759();return _0x3c7b=function(_0x3c7b76,_0x312bd4){_0x3c7b76=_0x3c7b76-0x1f0;let _0x55c860=_0x375998[_0x3c7b76];return _0x55c860;},_0x3c7b(_0x3ff803,_0x5bccf7);}export class AIChatConversation extends _0x3115ec(){['id'];[_0x4dc5c4(0x212)]=!0x1;[_0x4dc5c4(0x242)];[_0x4dc5c4(0x208)]=[];[_0x4dc5c4(0x1f0)];[_0x4dc5c4(0x247)];[_0x4dc5c4(0x260)];[_0x4dc5c4(0x224)];constructor(_0x53c80b){const _0x523b6c=_0x4dc5c4;super(),this[_0x523b6c(0x224)]=_0x53c80b,this[_0x523b6c(0x260)]=_0x53c80b[_0x523b6c(0x260)],this[_0x523b6c(0x265)]=_0x53c80b[_0x523b6c(0x265)],this['id']=_0x53c80b[_0x523b6c(0x251)],this[_0x523b6c(0x242)]=_0x53c80b[_0x523b6c(0x242)];}async[_0x4dc5c4(0x23b)](_0x4fd69b){const _0x3cf830=_0x4dc5c4;try{this[_0x3cf830(0x210)]=new _0x40ebe5({'connector':this[_0x3cf830(0x260)],'config':_0x4fd69b,'ownerId':this['id']}),this[_0x3cf830(0x210)][_0x3cf830(0x204)](..._0x6f40a4)['to'](this),this[_0x3cf830(0x210)][_0x3cf830(0x23b)](),this[_0x3cf830(0x1f4)]=new _0x48ddd8(),this[_0x3cf830(0x1f4)][_0x3cf830(0x204)](..._0x286034)['to'](this),this[_0x3cf830(0x1f4)][_0x3cf830(0x23b)]();const _0x107f59=await this[_0x3cf830(0x265)][_0x3cf830(0x214)]();this[_0x3cf830(0x269)](_0x3cf830(0x1fd),{'availableModels':_0x107f59});const _0x297eb8=await this[_0x3cf830(0x265)][_0x3cf830(0x25e)](this[_0x3cf830(0x224)][_0x3cf830(0x241)]);_0x297eb8&&await this[_0x3cf830(0x264)](_0x297eb8);}catch(_0x454b01){const _0x24e739=new _0x30fc02(_0x3cf830(0x21c),null,{'message':_0x454b01[_0x3cf830(0x240)]||_0x454b01});_0x24e739[_0x3cf830(0x237)]=_0x454b01[_0x3cf830(0x237)],this[_0x3cf830(0x269)](_0x3cf830(0x201),{'error':_0x24e739});}}async[_0x4dc5c4(0x1ff)](){const _0x3d86b5=_0x4dc5c4;if(this[_0x3d86b5(0x212)])throw new _0x30fc02(_0x3d86b5(0x20a),null,{'conversation':this});if(!this[_0x3d86b5(0x247)])throw new _0x30fc02(_0x3d86b5(0x1f1),null,{'conversation':this});try{const {id:_0x12f989}=await this[_0x3d86b5(0x260)][_0x3d86b5(0x1f6)](this['id'],this[_0x3d86b5(0x224)][_0x3d86b5(0x228)])[_0x3d86b5(0x209)]();this['id']=_0x12f989,this[_0x3d86b5(0x212)]=!0x0,this[_0x3d86b5(0x269)](_0x3d86b5(0x1fc),{'conversationId':this['id'],'selectedModel':this[_0x3d86b5(0x247)]});}catch(_0x5335cd){const _0x17e87d=new _0x30fc02(_0x3d86b5(0x250),null,{'message':_0x5335cd[_0x3d86b5(0x240)],'conversationId':this['id']});throw _0x17e87d[_0x3d86b5(0x237)]=_0x5335cd[_0x3d86b5(0x237)],this[_0x3d86b5(0x269)](_0x3d86b5(0x201),{'error':_0x17e87d}),_0x17e87d;}}async[_0x4dc5c4(0x254)](_0x1ecaac,_0x3d19a2){const _0x3b8a70=_0x4dc5c4;try{const _0x26c101=await this[_0x3b8a70(0x260)][_0x3b8a70(0x22f)](_0x1ecaac)[_0x3b8a70(0x209)](),_0x50bdb1=await this[_0x3b8a70(0x260)][_0x3b8a70(0x24d)](_0x1ecaac)[_0x3b8a70(0x223)](),_0x37876c=_0x50bdb1[0x0][_0x3b8a70(0x231)];this[_0x3b8a70(0x212)]=!0x0,this['id']=_0x26c101['id'],_0x3b8a70(0x25f)in _0x26c101?this[_0x3b8a70(0x269)](_0x3b8a70(0x255),_0x26c101[_0x3b8a70(0x25f)],!0x0):this[_0x3b8a70(0x269)](_0x3b8a70(0x255),'',!0x0);const _0xee36f1=(await this[_0x3b8a70(0x265)][_0x3b8a70(0x24e)]())[_0x3b8a70(0x235)](_0x491649=>_0x491649['id'][_0x3b8a70(0x26a)]()===_0x37876c[_0x3b8a70(0x26a)]());return this[_0x3b8a70(0x247)]=_0xee36f1,this[_0x3b8a70(0x269)](_0x3b8a70(0x20d),{'selectedModel':_0xee36f1,'isDisabled':!0x0}),await this[_0x3b8a70(0x267)](_0x50bdb1,_0x3d19a2,_0x37876c),this[_0x3b8a70(0x1f0)]=void 0x0,this;}catch(_0x23bf3d){const _0xb59be=new _0x30fc02(_0x3b8a70(0x222),null,{'message':_0x23bf3d[_0x3b8a70(0x240)],'conversationId':_0x1ecaac});throw _0xb59be[_0x3b8a70(0x237)]=_0x23bf3d[_0x3b8a70(0x237)],this[_0x3b8a70(0x269)](_0x3b8a70(0x201),{'error':_0xb59be}),_0xb59be;}}async[_0x4dc5c4(0x267)](_0x4fcd68,_0x248665,_0x18bfca){const _0x582ec3=_0x4dc5c4;let _0x55fcaf;for(const _0x181611 of _0x4fcd68)if(_0x582ec3(0x206)===_0x181611[_0x582ec3(0x25c)]){const _0x2bd3f4=await this[_0x582ec3(0x207)](_0x181611),_0x270931={'isReasoningEnabled':Object[_0x582ec3(0x211)](_0x181611[_0x582ec3(0x258)],_0x582ec3(0x24b)),'isWebSearchEnabled':Object[_0x582ec3(0x211)](_0x181611[_0x582ec3(0x258)],_0x582ec3(0x219))};_0x55fcaf=this[_0x582ec3(0x246)]({'userMessage':_0x181611[_0x582ec3(0x26b)],'contextItems':_0x2bd3f4,'capabilities':_0x270931,'modelId':_0x18bfca,'attributes':_0x181611[_0x582ec3(0x249)]}),this[_0x582ec3(0x1f0)]=_0x55fcaf,this[_0x582ec3(0x210)][_0x582ec3(0x21b)](this[_0x582ec3(0x1f0)][_0x582ec3(0x266)]);}else{if(_0x582ec3(0x238)===_0x181611[_0x582ec3(0x25c)]&&_0x55fcaf){const _0xb123d9=[];for(const _0x2ffd00 of _0x181611[_0x582ec3(0x234)])switch(_0x2ffd00[_0x582ec3(0x203)]){case _0x582ec3(0x1f3):case _0x582ec3(0x200):{const _0x3a1afa=_0x55fcaf[_0x582ec3(0x1f7)]()?.[_0x582ec3(0x25d)]!==_0x248665;_0x55fcaf[_0x582ec3(0x1fe)]=_0x55fcaf[_0x582ec3(0x23f)]({'type':_0x2ffd00[_0x582ec3(0x203)],'isDone':!0x0,'interactionId':_0x55fcaf['id'],'areActionsDisabled':_0x3a1afa}),_0x55fcaf[_0x582ec3(0x1fe)][_0x582ec3(0x261)](_0x2ffd00[_0x582ec3(0x234)]),_0xb123d9[_0x582ec3(0x244)]>0x0&&(_0x55fcaf[_0x582ec3(0x1fe)][_0x582ec3(0x1f2)]=_0xb123d9[_0x582ec3(0x229)](0x0));break;}case _0x582ec3(0x227):_0xb123d9[_0x582ec3(0x20f)](_0x2ffd00);break;case _0x582ec3(0x23d):{const {data:_0xe8dfe5,attributes:_0x53fd47}=JSON[_0x582ec3(0x22b)](_0x2ffd00[_0x582ec3(0x234)]);_0x55fcaf[_0x582ec3(0x23e)]({'toolName':_0x2ffd00[_0x582ec3(0x24c)],'data':_0xe8dfe5,'attributes':_0x53fd47});break;}}}}}async[_0x4dc5c4(0x207)](_0x2c373f){const _0x1f5c65=_0x4dc5c4,_0x58932e=new Map();if(!_0x2c373f[_0x1f5c65(0x234)])return _0x58932e;for(const _0x2dd44f of _0x2c373f[_0x1f5c65(0x234)]){const _0x4e97e4=await this[_0x1f5c65(0x210)][_0x1f5c65(0x262)](_0x2dd44f);_0x4e97e4&&_0x58932e[_0x1f5c65(0x243)](_0x4e97e4['id'],_0x4e97e4);}return _0x58932e;}async[_0x4dc5c4(0x226)]({userMessage:_0x32e24e,attributes:_0x507635}){const _0x51022a=_0x4dc5c4;if(!this[_0x51022a(0x212)])throw new _0x30fc02(_0x51022a(0x20b),null,{'conversation':this});if(this[_0x51022a(0x1f0)])throw new _0x30fc02(_0x51022a(0x236),null,{'conversation':this});try{const _0x4b71ba=this[_0x51022a(0x210)][_0x51022a(0x20c)](),_0x20cc93=this[_0x51022a(0x1f4)][_0x51022a(0x22a)](),_0x478d2c=this[_0x51022a(0x247)]['id'];this[_0x51022a(0x1f0)]=this[_0x51022a(0x246)]({'userMessage':_0x32e24e,'contextItems':_0x4b71ba,'capabilities':_0x20cc93,'modelId':_0x478d2c,'attributes':_0x507635}),await this[_0x51022a(0x1f0)][_0x51022a(0x1ff)](),this[_0x51022a(0x210)][_0x51022a(0x21b)](this[_0x51022a(0x1f0)][_0x51022a(0x266)]);}catch(_0x461196){if(_0x461196 instanceof _0x30fc02)this[_0x51022a(0x269)](_0x51022a(0x201),{'interactionId':this[_0x51022a(0x1f0)]?this[_0x51022a(0x1f0)]['id']:void 0x0,'error':_0x461196});else{const _0x5ae4b3=_0x212693[_0x51022a(0x233)](_0x461196[_0x51022a(0x1fb)])||_0x51022a(0x1f5);this[_0x51022a(0x269)](_0x51022a(0x201),{'interactionId':this[_0x51022a(0x1f0)]?this[_0x51022a(0x1f0)]['id']:void 0x0,'error':new _0x30fc02(_0x5ae4b3,null,{'error':_0x461196})});}}finally{this[_0x51022a(0x1f0)]?.[_0x51022a(0x1f8)](),this[_0x51022a(0x1f0)]=void 0x0;}}[_0x4dc5c4(0x246)]({userMessage:_0x29523d,contextItems:_0x2e1424,capabilities:_0xa6bb88,modelId:_0x50d5b1,attributes:_0x1f01ab}){const _0x20f8e0=_0x4dc5c4,_0x5a3d9d=new _0x57978a({'userMessage':_0x29523d,'contextItems':_0x2e1424,'capabilities':_0xa6bb88,'conversationId':this['id'],'connector':this[_0x20f8e0(0x260)],'editor':this[_0x20f8e0(0x224)][_0x20f8e0(0x215)]&&this[_0x20f8e0(0x224)][_0x20f8e0(0x215)](),'model':_0x50d5b1,'attributes':_0x1f01ab});return _0x5a3d9d[_0x20f8e0(0x204)](..._0x582dcd)['to'](this),this[_0x20f8e0(0x208)][_0x20f8e0(0x20f)](_0x5a3d9d),this[_0x20f8e0(0x269)](_0x20f8e0(0x22e),_0x5a3d9d),_0x5a3d9d;}[_0x4dc5c4(0x25b)](_0x2db809){const _0x117e89=_0x4dc5c4;return this[_0x117e89(0x208)][_0x117e89(0x235)](_0x5ddd6a=>_0x5ddd6a['id']===_0x2db809);}[_0x4dc5c4(0x22d)](_0x403758){const _0x456ee0=_0x4dc5c4,_0x140a38=this[_0x456ee0(0x25b)](_0x403758);_0x140a38&&(_0x140a38[_0x456ee0(0x230)](),this[_0x456ee0(0x208)][_0x456ee0(0x229)](this[_0x456ee0(0x208)][_0x456ee0(0x21e)](_0x140a38),0x1));}get[_0x4dc5c4(0x202)](){const _0x23eca1=_0x4dc5c4;return this[_0x23eca1(0x208)][this[_0x23eca1(0x208)][_0x23eca1(0x244)]-0x1];}[_0x4dc5c4(0x25a)](_0x1ed514){const _0x45ba9d=_0x4dc5c4;this[_0x45ba9d(0x210)][_0x45ba9d(0x25a)](_0x1ed514);}async[_0x4dc5c4(0x221)]({content:_0x39dc0e,version:_0x5ea340,sessionId:_0x3faf4f,selections:_0x3db1ac}){const _0x2de55f=_0x4dc5c4;await this[_0x2de55f(0x210)][_0x2de55f(0x21d)](_0x39dc0e,_0x5ea340,_0x3faf4f,_0x3db1ac);}[_0x4dc5c4(0x263)](){const _0x43b28e=_0x4dc5c4;return this[_0x43b28e(0x1f0)]?.[_0x43b28e(0x1f7)]()?.[_0x43b28e(0x234)]||'';}[_0x4dc5c4(0x23c)](_0x477ae4){const _0x2526d7=_0x4dc5c4;this[_0x2526d7(0x210)][_0x2526d7(0x23c)](_0x477ae4);}[_0x4dc5c4(0x220)](){const _0x334f49=_0x4dc5c4;this[_0x334f49(0x210)][_0x334f49(0x220)]();}[_0x4dc5c4(0x213)](_0x5d9627){const _0x3cb51b=_0x4dc5c4;this[_0x3cb51b(0x210)][_0x3cb51b(0x213)](_0x5d9627);}[_0x4dc5c4(0x239)](_0x1a40fd){const _0x41b03a=_0x4dc5c4;this[_0x41b03a(0x210)][_0x41b03a(0x239)](_0x1a40fd);}[_0x4dc5c4(0x23a)](_0x6478c){const _0x11c63a=_0x4dc5c4;this[_0x11c63a(0x210)][_0x11c63a(0x23a)](_0x6478c);}[_0x4dc5c4(0x268)](_0x8ad06b,_0x1048fc){const _0x9a1b5=_0x4dc5c4;this[_0x9a1b5(0x210)][_0x9a1b5(0x268)](_0x8ad06b,_0x1048fc);}[_0x4dc5c4(0x205)](_0x3a5380,_0x4e14a2,_0x48a4f2){const _0x5b62a4=_0x4dc5c4;return this[_0x5b62a4(0x210)][_0x5b62a4(0x205)](_0x3a5380,_0x4e14a2,_0x48a4f2);}[_0x4dc5c4(0x218)](_0x5e4bba){const _0x39b847=_0x4dc5c4;this[_0x39b847(0x210)][_0x39b847(0x218)](_0x5e4bba);}[_0x4dc5c4(0x232)](_0x5a5576){const _0x213777=_0x4dc5c4;this[_0x213777(0x1f4)][_0x213777(0x232)](_0x5a5576);}[_0x4dc5c4(0x252)](){const _0x53dfa8=_0x4dc5c4;this[_0x53dfa8(0x1f4)][_0x53dfa8(0x252)]();}[_0x4dc5c4(0x24a)](_0x164784){const _0x4b74e4=_0x4dc5c4;this[_0x4b74e4(0x1f4)][_0x4b74e4(0x24a)](_0x164784);}[_0x4dc5c4(0x248)](){const _0x4e33bf=_0x4dc5c4;this[_0x4e33bf(0x1f4)][_0x4e33bf(0x248)]();}[_0x4dc5c4(0x256)](){const _0x306fda=_0x4dc5c4;return this[_0x306fda(0x210)][_0x306fda(0x256)]();}[_0x4dc5c4(0x217)](){const _0x89ce49=_0x4dc5c4;return this[_0x89ce49(0x210)][_0x89ce49(0x217)]();}[_0x4dc5c4(0x253)](){const _0x335fc8=_0x4dc5c4;return this[_0x335fc8(0x210)][_0x335fc8(0x253)]();}async[_0x4dc5c4(0x264)](_0x4bbad1){const _0x49865d=_0x4dc5c4;_0x4bbad1?!0x1===await this[_0x49865d(0x265)][_0x49865d(0x225)](_0x4bbad1)&&(_0x52680a(_0x49865d(0x216),{'conversation':this,'model':_0x4bbad1}),_0x4bbad1=(await this[_0x49865d(0x265)][_0x49865d(0x214)]())[0x0]):(_0x52680a(_0x49865d(0x24f),{'conversation':this}),_0x4bbad1=(await this[_0x49865d(0x265)][_0x49865d(0x214)]())[0x0]),_0x4bbad1['id']!==this[_0x49865d(0x247)]?.['id']&&(this[_0x49865d(0x247)]=_0x4bbad1,this[_0x49865d(0x1f4)][_0x49865d(0x22c)](),this[_0x49865d(0x269)](_0x49865d(0x20d),{'selectedModel':_0x4bbad1}));}}
23
+ const _0x149bcd=_0x188b;(function(_0x3b7ef0,_0x394d4e){const _0x1f10c6=_0x188b,_0x41f9b0=_0x3b7ef0();while(!![]){try{const _0x3574af=parseInt(_0x1f10c6(0xdb))/0x1*(-parseInt(_0x1f10c6(0xa1))/0x2)+-parseInt(_0x1f10c6(0xc9))/0x3*(parseInt(_0x1f10c6(0x8b))/0x4)+parseInt(_0x1f10c6(0xbd))/0x5+-parseInt(_0x1f10c6(0x74))/0x6*(parseInt(_0x1f10c6(0x8f))/0x7)+parseInt(_0x1f10c6(0xb2))/0x8+-parseInt(_0x1f10c6(0x9d))/0x9+-parseInt(_0x1f10c6(0xe4))/0xa*(-parseInt(_0x1f10c6(0x80))/0xb);if(_0x3574af===_0x394d4e)break;else _0x41f9b0['push'](_0x41f9b0['shift']());}catch(_0x59d1c2){_0x41f9b0['push'](_0x41f9b0['shift']());}}}(_0x42a0,0x83f25));import{CKEditorError as _0x3c69b2,EmitterMixin as _0x29a54f,logWarning as _0x449db2}from'ckeditor5/src/utils.js';function _0x188b(_0x193783,_0x9af1ae){const _0x42a01e=_0x42a0();return _0x188b=function(_0x188b82,_0x421e3e){_0x188b82=_0x188b82-0x66;let _0x2624a8=_0x42a01e[_0x188b82];return _0x2624a8;},_0x188b(_0x193783,_0x9af1ae);}import{AI_MODEL_EVENT_NAMES as _0x16ee8e}from'../../aicore/model/aiinteraction.js';function _0x42a0(){const _0xa80c99=['1500135ZwxrPe','attributes','ai-chat-handle-user-interaction-already-in-progress','getPendingContextItems','url','loadSourceResources','getInteraction','modelSelected','hasOwn','chatModels','assistant','ai-chat-conversation-init-failed','sources','destroy','get','getModel','getAll','startConversation','1obzdPY','load','stop','conversationInitialized','getCapabilitiesConfig','removeSelectionFromContext','ai-chat-conversation-set-model-null','ai-chat-handle-user-interaction-start-failed','removeInteraction','1244260VEsMrS','setModel','updateCurrentDocument','find','isFromHistory','removeFromContext','code','ai-chat-conversation-set-model-not-available','prompt','appendContent','createInteraction','addResourceToContext','user','ai-chat-handle-user-conversation-not-initialized','content','4157292yCrWfy','type','_extractContextItems','addToConversationContext','capabilities','toLowerCase','delegate','getDocumentContext','interactionCreated','reasoning','role','message','198dKRbzV','chatCapabilities','addFilesToContext','splice','isAvailable','setReasoning','model','fire','getConversation','createReply','title','4PltBiZ','getEditor','_handleToolResultData','selectedModelId','7VXtUly','handleUserInteraction','populateFromMessage','lastInteraction','getCurrentDocumentContext','stack','conversationStarted','chatContext','contextItems','interactions','updateCurrentDocumentInContext','currentInteraction','fetchConversationMessages','webSearch','7827156fqyBck','modification','ai-chat-conversation-already-started','ai-chat-conversation-init-from-id-failed','1558936PtyMTk','isSelectionInContext','conversationId','text','start','push','group','addCurrentDocumentToContext','parse','addUrlToContext','isCurrentDocumentInConversation','setConversationTitle','setWebSearch','fetchConversation','getAvailableModels','isCurrentDocumentInContext','error','1026528nVKUIS','reset','options','ai-chat-conversation-start-failed','indexOf','connector','getMessages','toggleWebSearch','toolName','sessionId','init','5072740JFdOGy','mcp-tool-result','currentReply','length','_processMessagesToInteractions','ai-chat-conversation-start-no-model-selected','addToolItemToContext','addSelectionToContext','isStarted','selectedModel','toggleReasoning','set'];_0x42a0=function(){return _0xa80c99;};return _0x42a0();}import{AIChatContext as _0x13f61c,AI_CONTEXT_MODEL_EVENT_NAMES as _0x12633b}from'./aichatcontext.js';import{AICapabilities as _0x26241c,CAPABILITIES_MODEL_EVENT_NAMES as _0x576033}from'../../aicore/model/aicapabilities.js';import{AIChatInteraction as _0x1016a4}from'./aichatinteraction.js';import{errorsMap as _0x5eb07}from'../../errorsmap.js';export class AIChatConversation extends _0x29a54f(){['id'];[_0x149bcd(0xc5)]=!0x1;[_0x149bcd(0x69)];[_0x149bcd(0x98)]=[];[_0x149bcd(0x9a)];[_0x149bcd(0xc6)];[_0x149bcd(0xb7)];[_0x149bcd(0xb4)];constructor(_0x139668){const _0xe1357a=_0x149bcd;super(),this[_0xe1357a(0xb4)]=_0x139668,this[_0xe1357a(0xb7)]=_0x139668[_0xe1357a(0xb7)],this[_0xe1357a(0xd2)]=_0x139668[_0xe1357a(0xd2)],this['id']=_0x139668[_0xe1357a(0xa3)],this[_0xe1357a(0x69)]=_0x139668[_0xe1357a(0x69)];}async[_0x149bcd(0xbc)](_0x249492){const _0x466e0a=_0x149bcd;try{this[_0x466e0a(0x96)]=new _0x13f61c({'connector':this[_0x466e0a(0xb7)],'config':_0x249492,'ownerId':this['id']}),this[_0x466e0a(0x96)][_0x466e0a(0x7a)](..._0x12633b)['to'](this),this[_0x466e0a(0x96)][_0x466e0a(0xbc)](),this[_0x466e0a(0x81)]=new _0x26241c(),this[_0x466e0a(0x81)][_0x466e0a(0x7a)](..._0x576033)['to'](this),this[_0x466e0a(0x81)][_0x466e0a(0xbc)]();const _0x3b3e1d=await this[_0x466e0a(0xd2)][_0x466e0a(0xaf)]();this[_0x466e0a(0x87)](_0x466e0a(0xde),{'availableModels':_0x3b3e1d});const _0x92e3b7=await this[_0x466e0a(0xd2)][_0x466e0a(0xd8)](this[_0x466e0a(0xb4)][_0x466e0a(0x8e)]);_0x92e3b7&&await this[_0x466e0a(0x66)](_0x92e3b7);}catch(_0x15831d){const _0x2b01fa=new _0x3c69b2(_0x466e0a(0xd4),null,{'message':_0x15831d[_0x466e0a(0x7f)]||_0x15831d});_0x2b01fa[_0x466e0a(0x94)]=_0x15831d[_0x466e0a(0x94)],this[_0x466e0a(0x87)](_0x466e0a(0xb1),{'error':_0x2b01fa});}}async[_0x149bcd(0xa5)](){const _0x22a6a9=_0x149bcd;if(this[_0x22a6a9(0xc5)])throw new _0x3c69b2(_0x22a6a9(0x9f),null,{'conversation':this});if(!this[_0x22a6a9(0xc6)])throw new _0x3c69b2(_0x22a6a9(0xc2),null,{'conversation':this});try{const {id:_0x5b78db}=await this[_0x22a6a9(0xb7)][_0x22a6a9(0xda)](this['id'],this[_0x22a6a9(0xb4)][_0x22a6a9(0xa7)])[_0x22a6a9(0x88)]();this['id']=_0x5b78db,this[_0x22a6a9(0xc5)]=!0x0,this[_0x22a6a9(0x87)](_0x22a6a9(0x95),{'conversationId':this['id'],'selectedModel':this[_0x22a6a9(0xc6)]});}catch(_0x3892c2){const _0x214b43=new _0x3c69b2(_0x22a6a9(0xb5),null,{'message':_0x3892c2[_0x22a6a9(0x7f)],'conversationId':this['id']});throw _0x214b43[_0x22a6a9(0x94)]=_0x3892c2[_0x22a6a9(0x94)],this[_0x22a6a9(0x87)](_0x22a6a9(0xb1),{'error':_0x214b43}),_0x214b43;}}async[_0x149bcd(0xdc)](_0x42480c,_0x4e9706){const _0x5acbd9=_0x149bcd;try{const _0xe6a841=await this[_0x5acbd9(0xb7)][_0x5acbd9(0xae)](_0x42480c)[_0x5acbd9(0x88)](),_0xa95ff9=await this[_0x5acbd9(0xb7)][_0x5acbd9(0x9b)](_0x42480c)[_0x5acbd9(0xb8)](),_0x5ec5e4=_0xa95ff9[0x0][_0x5acbd9(0x86)];this[_0x5acbd9(0xc5)]=!0x0,this['id']=_0xe6a841['id'],_0x5acbd9(0x8a)in _0xe6a841?this[_0x5acbd9(0x87)](_0x5acbd9(0xac),_0xe6a841[_0x5acbd9(0x8a)],!0x0):this[_0x5acbd9(0x87)](_0x5acbd9(0xac),'',!0x0);const _0x5c6037=(await this[_0x5acbd9(0xd2)][_0x5acbd9(0xd9)]())[_0x5acbd9(0x68)](_0x264d59=>_0x264d59['id'][_0x5acbd9(0x79)]()===_0x5ec5e4[_0x5acbd9(0x79)]());return this[_0x5acbd9(0xc6)]=_0x5c6037,this[_0x5acbd9(0x87)](_0x5acbd9(0xd0),{'selectedModel':_0x5c6037,'isDisabled':!0x0}),await this[_0x5acbd9(0xc1)](_0xa95ff9,_0x4e9706,_0x5ec5e4),this[_0x5acbd9(0x9a)]=void 0x0,this;}catch(_0x717b23){const _0x4378df=new _0x3c69b2(_0x5acbd9(0xa0),null,{'message':_0x717b23[_0x5acbd9(0x7f)],'conversationId':_0x42480c});throw _0x4378df[_0x5acbd9(0x94)]=_0x717b23[_0x5acbd9(0x94)],this[_0x5acbd9(0x87)](_0x5acbd9(0xb1),{'error':_0x4378df}),_0x4378df;}}async[_0x149bcd(0xc1)](_0x1ec5e4,_0x25196d,_0x291e52){const _0xc4ba63=_0x149bcd;let _0x4be764;for(const _0x7c1058 of _0x1ec5e4)if(_0xc4ba63(0x71)===_0x7c1058[_0xc4ba63(0x7e)]){const _0x186f08=await this[_0xc4ba63(0x76)](_0x7c1058),_0x3cc5d1={'isReasoningEnabled':Object[_0xc4ba63(0xd1)](_0x7c1058[_0xc4ba63(0x78)],_0xc4ba63(0x7d)),'isWebSearchEnabled':Object[_0xc4ba63(0xd1)](_0x7c1058[_0xc4ba63(0x78)],_0xc4ba63(0x9c))};_0x4be764=this[_0xc4ba63(0x6f)]({'userMessage':_0x7c1058[_0xc4ba63(0x6d)],'contextItems':_0x186f08,'capabilities':_0x3cc5d1,'modelId':_0x291e52,'attributes':_0x7c1058[_0xc4ba63(0xca)]}),this[_0xc4ba63(0x9a)]=_0x4be764,this[_0xc4ba63(0x96)][_0xc4ba63(0x77)](this[_0xc4ba63(0x9a)][_0xc4ba63(0x97)]);}else{if(_0xc4ba63(0xd3)===_0x7c1058[_0xc4ba63(0x7e)]&&_0x4be764){const _0x396a45=[];for(const _0x181b70 of _0x7c1058[_0xc4ba63(0x73)])switch(_0x181b70[_0xc4ba63(0x75)]){case _0xc4ba63(0xa4):case _0xc4ba63(0x9e):{const _0x5c81e7=_0x4be764[_0xc4ba63(0x7b)]()?.[_0xc4ba63(0xbb)]!==_0x25196d;_0x4be764[_0xc4ba63(0xbf)]=_0x4be764[_0xc4ba63(0x89)]({'type':_0x181b70[_0xc4ba63(0x75)],'isDone':!0x0,'interactionId':_0x4be764['id'],'areActionsDisabled':_0x5c81e7}),_0x4be764[_0xc4ba63(0xbf)][_0xc4ba63(0x6e)](_0x181b70[_0xc4ba63(0x73)]),_0x396a45[_0xc4ba63(0xc0)]>0x0&&(_0x4be764[_0xc4ba63(0xbf)][_0xc4ba63(0xd5)]=_0x396a45[_0xc4ba63(0x83)](0x0));break;}case _0xc4ba63(0xcd):_0x396a45[_0xc4ba63(0xa6)](_0x181b70);break;case _0xc4ba63(0xbe):{const {data:_0x3af3e5,attributes:_0x4bc21d}=JSON[_0xc4ba63(0xa9)](_0x181b70[_0xc4ba63(0x73)]);_0x4be764[_0xc4ba63(0x8d)]({'toolName':_0x181b70[_0xc4ba63(0xba)],'data':_0x3af3e5,'attributes':_0x4bc21d});break;}}}}}async[_0x149bcd(0x76)](_0x30fc4c){const _0x584a91=_0x149bcd,_0x5da555=new Map();if(!_0x30fc4c[_0x584a91(0x73)])return _0x5da555;for(const _0x3085ad of _0x30fc4c[_0x584a91(0x73)]){const _0x463b4e=await this[_0x584a91(0x96)][_0x584a91(0x91)](_0x3085ad);_0x463b4e&&_0x5da555[_0x584a91(0xc8)](_0x463b4e['id'],_0x463b4e);}return _0x5da555;}async[_0x149bcd(0x90)]({userMessage:_0x45d8be,attributes:_0x37fd1e}){const _0x508ce8=_0x149bcd;if(!this[_0x508ce8(0xc5)])throw new _0x3c69b2(_0x508ce8(0x72),null,{'conversation':this});if(this[_0x508ce8(0x9a)])throw new _0x3c69b2(_0x508ce8(0xcb),null,{'conversation':this});try{const _0x5e1a0f=this[_0x508ce8(0x96)][_0x508ce8(0xcc)](),_0x379baf=this[_0x508ce8(0x81)][_0x508ce8(0xdf)](),_0x169522=this[_0x508ce8(0xc6)]['id'];this[_0x508ce8(0x9a)]=this[_0x508ce8(0x6f)]({'userMessage':_0x45d8be,'contextItems':_0x5e1a0f,'capabilities':_0x379baf,'modelId':_0x169522,'attributes':_0x37fd1e}),await this[_0x508ce8(0x9a)][_0x508ce8(0xa5)](),this[_0x508ce8(0x96)][_0x508ce8(0x77)](this[_0x508ce8(0x9a)][_0x508ce8(0x97)]);}catch(_0x52e032){if(_0x52e032 instanceof _0x3c69b2)this[_0x508ce8(0x87)](_0x508ce8(0xb1),{'interactionId':this[_0x508ce8(0x9a)]?this[_0x508ce8(0x9a)]['id']:void 0x0,'error':_0x52e032});else{const _0x59e5e5=_0x5eb07[_0x508ce8(0xd7)](_0x52e032[_0x508ce8(0x6b)])||_0x508ce8(0xe2);this[_0x508ce8(0x87)](_0x508ce8(0xb1),{'interactionId':this[_0x508ce8(0x9a)]?this[_0x508ce8(0x9a)]['id']:void 0x0,'error':new _0x3c69b2(_0x59e5e5,null,{'error':_0x52e032})});}}finally{this[_0x508ce8(0x9a)]?.[_0x508ce8(0xdd)](),this[_0x508ce8(0x9a)]=void 0x0;}}[_0x149bcd(0x6f)]({userMessage:_0xe3e1e8,contextItems:_0xbdda0e,capabilities:_0x4fcbe4,modelId:_0x1d0763,attributes:_0x37093a}){const _0x4e9f1a=_0x149bcd,_0x5b50e1=new _0x1016a4({'userMessage':_0xe3e1e8,'contextItems':_0xbdda0e,'capabilities':_0x4fcbe4,'conversationId':this['id'],'connector':this[_0x4e9f1a(0xb7)],'editor':this[_0x4e9f1a(0xb4)][_0x4e9f1a(0x8c)]&&this[_0x4e9f1a(0xb4)][_0x4e9f1a(0x8c)](),'model':_0x1d0763,'attributes':_0x37093a});return _0x5b50e1[_0x4e9f1a(0x7a)](..._0x16ee8e)['to'](this),this[_0x4e9f1a(0x98)][_0x4e9f1a(0xa6)](_0x5b50e1),this[_0x4e9f1a(0x87)](_0x4e9f1a(0x7c),_0x5b50e1),_0x5b50e1;}[_0x149bcd(0xcf)](_0x2ffe64){const _0x23dcd6=_0x149bcd;return this[_0x23dcd6(0x98)][_0x23dcd6(0x68)](_0x1888df=>_0x1888df['id']===_0x2ffe64);}[_0x149bcd(0xe3)](_0x318934){const _0x9bd664=_0x149bcd,_0x3a9dbd=this[_0x9bd664(0xcf)](_0x318934);_0x3a9dbd&&(_0x3a9dbd[_0x9bd664(0xd6)](),this[_0x9bd664(0x98)][_0x9bd664(0x83)](this[_0x9bd664(0x98)][_0x9bd664(0xb6)](_0x3a9dbd),0x1));}get[_0x149bcd(0x92)](){const _0x15d4ba=_0x149bcd;return this[_0x15d4ba(0x98)][this[_0x15d4ba(0x98)][_0x15d4ba(0xc0)]-0x1];}[_0x149bcd(0xa8)](_0x2af59c){const _0xb71adb=_0x149bcd;this[_0xb71adb(0x96)][_0xb71adb(0xa8)](_0x2af59c);}async[_0x149bcd(0x99)]({content:_0x398ec8,version:_0x54a6d5,sessionId:_0x162d79,selections:_0x50a3d8}){const _0x1ccd7c=_0x149bcd;await this[_0x1ccd7c(0x96)][_0x1ccd7c(0x67)](_0x398ec8,_0x54a6d5,_0x162d79,_0x50a3d8);}[_0x149bcd(0x93)](){const _0x2d9f12=_0x149bcd;return this[_0x2d9f12(0x9a)]?.[_0x2d9f12(0x7b)]()?.[_0x2d9f12(0x73)]||'';}[_0x149bcd(0xc4)](_0x1a5d7c){const _0x5a5788=_0x149bcd;this[_0x5a5788(0x96)][_0x5a5788(0xc4)](_0x1a5d7c);}[_0x149bcd(0xe0)](){const _0x196b8a=_0x149bcd;this[_0x196b8a(0x96)][_0x196b8a(0xe0)]();}[_0x149bcd(0x82)](_0x3d4b2f){const _0x470a60=_0x149bcd;this[_0x470a60(0x96)][_0x470a60(0x82)](_0x3d4b2f);}[_0x149bcd(0xaa)](_0x4aed1f){const _0x2bd394=_0x149bcd;this[_0x2bd394(0x96)][_0x2bd394(0xaa)](_0x4aed1f);}[_0x149bcd(0xc3)](_0x3d2c7d){const _0x33b140=_0x149bcd;this[_0x33b140(0x96)][_0x33b140(0xc3)](_0x3d2c7d);}[_0x149bcd(0x70)](_0x3e9ca6,_0x22a435){const _0x47b841=_0x149bcd;this[_0x47b841(0x96)][_0x47b841(0x70)](_0x3e9ca6,_0x22a435);}[_0x149bcd(0xce)](_0x12957c,_0x5467e1,_0x5f583c){const _0x1f23ba=_0x149bcd;return this[_0x1f23ba(0x96)][_0x1f23ba(0xce)](_0x12957c,_0x5467e1,_0x5f583c);}[_0x149bcd(0x6a)](_0x2015bb){const _0x10da80=_0x149bcd;this[_0x10da80(0x96)][_0x10da80(0x6a)](_0x2015bb);}[_0x149bcd(0xad)](_0x1773e9){const _0x32dd2=_0x149bcd;this[_0x32dd2(0x81)][_0x32dd2(0xad)](_0x1773e9);}[_0x149bcd(0xb9)](){const _0x3afdcf=_0x149bcd;this[_0x3afdcf(0x81)][_0x3afdcf(0xb9)]();}[_0x149bcd(0x85)](_0x95f310){const _0x136df4=_0x149bcd;this[_0x136df4(0x81)][_0x136df4(0x85)](_0x95f310);}[_0x149bcd(0xc7)](){const _0x249740=_0x149bcd;this[_0x249740(0x81)][_0x249740(0xc7)]();}[_0x149bcd(0xb0)](){const _0x24f673=_0x149bcd;return this[_0x24f673(0x96)][_0x24f673(0xb0)]();}[_0x149bcd(0xab)](){const _0x51cbd7=_0x149bcd;return this[_0x51cbd7(0x96)][_0x51cbd7(0xab)]();}[_0x149bcd(0xa2)](){const _0x2b0ba4=_0x149bcd;return this[_0x2b0ba4(0x96)][_0x2b0ba4(0xa2)]();}async[_0x149bcd(0x66)](_0x29de59){const _0x1bacbe=_0x149bcd;_0x29de59?!0x1===await this[_0x1bacbe(0xd2)][_0x1bacbe(0x84)](_0x29de59)&&(_0x449db2(_0x1bacbe(0x6c),{'conversation':this,'model':_0x29de59}),_0x29de59=(await this[_0x1bacbe(0xd2)][_0x1bacbe(0xaf)]())[0x0]):(_0x449db2(_0x1bacbe(0xe1),{'conversation':this}),_0x29de59=(await this[_0x1bacbe(0xd2)][_0x1bacbe(0xaf)]())[0x0]),_0x29de59['id']!==this[_0x1bacbe(0xc6)]?.['id']&&(this[_0x1bacbe(0xc6)]=_0x29de59,this[_0x1bacbe(0x81)][_0x1bacbe(0xb3)](),this[_0x1bacbe(0x87)](_0x1bacbe(0xd0),{'selectedModel':_0x29de59}));}}