@ckeditor/ckeditor5-ai 47.3.0-alpha.4 → 47.3.0-alpha.6

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 (293) hide show
  1. package/build/ai.js +1 -1
  2. package/dist/index.js +5 -5
  3. package/dist/translations/af.js +1 -1
  4. package/dist/translations/af.umd.js +1 -1
  5. package/dist/translations/ar.js +1 -1
  6. package/dist/translations/ar.umd.js +1 -1
  7. package/dist/translations/ast.js +1 -1
  8. package/dist/translations/ast.umd.js +1 -1
  9. package/dist/translations/az.js +1 -1
  10. package/dist/translations/az.umd.js +1 -1
  11. package/dist/translations/be.js +1 -1
  12. package/dist/translations/be.umd.js +1 -1
  13. package/dist/translations/bg.js +1 -1
  14. package/dist/translations/bg.umd.js +1 -1
  15. package/dist/translations/bn.js +1 -1
  16. package/dist/translations/bn.umd.js +1 -1
  17. package/dist/translations/bs.js +1 -1
  18. package/dist/translations/bs.umd.js +1 -1
  19. package/dist/translations/ca.js +1 -1
  20. package/dist/translations/ca.umd.js +1 -1
  21. package/dist/translations/cs.js +1 -1
  22. package/dist/translations/cs.umd.js +1 -1
  23. package/dist/translations/da.js +1 -1
  24. package/dist/translations/da.umd.js +1 -1
  25. package/dist/translations/de-ch.js +1 -1
  26. package/dist/translations/de-ch.umd.js +1 -1
  27. package/dist/translations/de.js +1 -1
  28. package/dist/translations/de.umd.js +1 -1
  29. package/dist/translations/el.js +1 -1
  30. package/dist/translations/el.umd.js +1 -1
  31. package/dist/translations/en-au.js +1 -1
  32. package/dist/translations/en-au.umd.js +1 -1
  33. package/dist/translations/en-gb.js +1 -1
  34. package/dist/translations/en-gb.umd.js +1 -1
  35. package/dist/translations/en.js +1 -1
  36. package/dist/translations/en.umd.js +1 -1
  37. package/dist/translations/eo.js +1 -1
  38. package/dist/translations/eo.umd.js +1 -1
  39. package/dist/translations/es-co.js +1 -1
  40. package/dist/translations/es-co.umd.js +1 -1
  41. package/dist/translations/es.js +1 -1
  42. package/dist/translations/es.umd.js +1 -1
  43. package/dist/translations/et.js +1 -1
  44. package/dist/translations/et.umd.js +1 -1
  45. package/dist/translations/eu.js +1 -1
  46. package/dist/translations/eu.umd.js +1 -1
  47. package/dist/translations/fa.js +1 -1
  48. package/dist/translations/fa.umd.js +1 -1
  49. package/dist/translations/fi.js +1 -1
  50. package/dist/translations/fi.umd.js +1 -1
  51. package/dist/translations/fr.js +1 -1
  52. package/dist/translations/fr.umd.js +1 -1
  53. package/dist/translations/gl.js +1 -1
  54. package/dist/translations/gl.umd.js +1 -1
  55. package/dist/translations/gu.js +1 -1
  56. package/dist/translations/gu.umd.js +1 -1
  57. package/dist/translations/he.js +1 -1
  58. package/dist/translations/he.umd.js +1 -1
  59. package/dist/translations/hi.js +1 -1
  60. package/dist/translations/hi.umd.js +1 -1
  61. package/dist/translations/hr.js +1 -1
  62. package/dist/translations/hr.umd.js +1 -1
  63. package/dist/translations/hu.js +1 -1
  64. package/dist/translations/hu.umd.js +1 -1
  65. package/dist/translations/hy.js +1 -1
  66. package/dist/translations/hy.umd.js +1 -1
  67. package/dist/translations/id.js +1 -1
  68. package/dist/translations/id.umd.js +1 -1
  69. package/dist/translations/it.js +1 -1
  70. package/dist/translations/it.umd.js +1 -1
  71. package/dist/translations/ja.js +1 -1
  72. package/dist/translations/ja.umd.js +1 -1
  73. package/dist/translations/jv.js +1 -1
  74. package/dist/translations/jv.umd.js +1 -1
  75. package/dist/translations/kk.js +1 -1
  76. package/dist/translations/kk.umd.js +1 -1
  77. package/dist/translations/km.js +1 -1
  78. package/dist/translations/km.umd.js +1 -1
  79. package/dist/translations/kn.js +1 -1
  80. package/dist/translations/kn.umd.js +1 -1
  81. package/dist/translations/ko.js +1 -1
  82. package/dist/translations/ko.umd.js +1 -1
  83. package/dist/translations/ku.js +1 -1
  84. package/dist/translations/ku.umd.js +1 -1
  85. package/dist/translations/lt.js +1 -1
  86. package/dist/translations/lt.umd.js +1 -1
  87. package/dist/translations/lv.js +1 -1
  88. package/dist/translations/lv.umd.js +1 -1
  89. package/dist/translations/ms.js +1 -1
  90. package/dist/translations/ms.umd.js +1 -1
  91. package/dist/translations/nb.js +1 -1
  92. package/dist/translations/nb.umd.js +1 -1
  93. package/dist/translations/ne.js +1 -1
  94. package/dist/translations/ne.umd.js +1 -1
  95. package/dist/translations/nl.js +1 -1
  96. package/dist/translations/nl.umd.js +1 -1
  97. package/dist/translations/no.js +1 -1
  98. package/dist/translations/no.umd.js +1 -1
  99. package/dist/translations/oc.js +1 -1
  100. package/dist/translations/oc.umd.js +1 -1
  101. package/dist/translations/pl.js +1 -1
  102. package/dist/translations/pl.umd.js +1 -1
  103. package/dist/translations/pt-br.js +1 -1
  104. package/dist/translations/pt-br.umd.js +1 -1
  105. package/dist/translations/pt.js +1 -1
  106. package/dist/translations/pt.umd.js +1 -1
  107. package/dist/translations/ro.js +1 -1
  108. package/dist/translations/ro.umd.js +1 -1
  109. package/dist/translations/ru.js +1 -1
  110. package/dist/translations/ru.umd.js +1 -1
  111. package/dist/translations/si.js +1 -1
  112. package/dist/translations/si.umd.js +1 -1
  113. package/dist/translations/sk.js +1 -1
  114. package/dist/translations/sk.umd.js +1 -1
  115. package/dist/translations/sl.js +1 -1
  116. package/dist/translations/sl.umd.js +1 -1
  117. package/dist/translations/sq.js +1 -1
  118. package/dist/translations/sq.umd.js +1 -1
  119. package/dist/translations/sr-latn.js +1 -1
  120. package/dist/translations/sr-latn.umd.js +1 -1
  121. package/dist/translations/sr.js +1 -1
  122. package/dist/translations/sr.umd.js +1 -1
  123. package/dist/translations/sv.js +1 -1
  124. package/dist/translations/sv.umd.js +1 -1
  125. package/dist/translations/th.js +1 -1
  126. package/dist/translations/th.umd.js +1 -1
  127. package/dist/translations/ti.js +1 -1
  128. package/dist/translations/ti.umd.js +1 -1
  129. package/dist/translations/tk.js +1 -1
  130. package/dist/translations/tk.umd.js +1 -1
  131. package/dist/translations/tr.js +1 -1
  132. package/dist/translations/tr.umd.js +1 -1
  133. package/dist/translations/tt.js +1 -1
  134. package/dist/translations/tt.umd.js +1 -1
  135. package/dist/translations/ug.js +1 -1
  136. package/dist/translations/ug.umd.js +1 -1
  137. package/dist/translations/uk.js +1 -1
  138. package/dist/translations/uk.umd.js +1 -1
  139. package/dist/translations/ur.js +1 -1
  140. package/dist/translations/ur.umd.js +1 -1
  141. package/dist/translations/uz.js +1 -1
  142. package/dist/translations/uz.umd.js +1 -1
  143. package/dist/translations/vi.js +1 -1
  144. package/dist/translations/vi.umd.js +1 -1
  145. package/dist/translations/zh-cn.js +1 -1
  146. package/dist/translations/zh-cn.umd.js +1 -1
  147. package/dist/translations/zh.js +1 -1
  148. package/dist/translations/zh.umd.js +1 -1
  149. package/package.json +15 -15
  150. package/src/aiactions/aiactions.js +1 -1
  151. package/src/aiactions/model/aiactionsinteraction.js +1 -1
  152. package/src/aiactions/model/aiactionsreply.js +1 -1
  153. package/src/aiassistant/adapters/aiadapter.js +1 -1
  154. package/src/aiassistant/adapters/aitextadapter.js +1 -1
  155. package/src/aiassistant/adapters/awstextadapter.js +1 -1
  156. package/src/aiassistant/adapters/openaitextadapter.js +1 -1
  157. package/src/aiassistant/aiassistant.js +1 -1
  158. package/src/aiassistant/aiassistantediting.js +1 -1
  159. package/src/aiassistant/aiassistantui.js +1 -1
  160. package/src/aiassistant/legacyerrors.js +1 -1
  161. package/src/aiassistant/ui/aiassistantcontroller.js +2 -2
  162. package/src/aiassistant/ui/form/aiformcontentarea.js +1 -1
  163. package/src/aiassistant/ui/form/aiformerrorview.js +1 -1
  164. package/src/aiassistant/ui/form/aiformpromptview.js +1 -1
  165. package/src/aiassistant/ui/form/aiformtoolbarview.js +1 -1
  166. package/src/aiassistant/ui/form/aiformview.js +1 -1
  167. package/src/aiassistant/ui/form/aihistorylistitemview.js +1 -1
  168. package/src/aiassistant/ui/form/aihistorylistview.js +1 -1
  169. package/src/aiassistant/ui/form/prompthistory.js +1 -1
  170. package/src/aiassistant/ui/showaiassistantcommand.js +1 -1
  171. package/src/aiassistant/utils/common-translations.js +1 -1
  172. package/src/aiassistant/utils/normalizecommandsconfig.js +1 -1
  173. package/src/aiballoon/aiballoon.js +1 -1
  174. package/src/aiballoon/ui/aiballoondisclaimerview.js +1 -1
  175. package/src/aiballoon/ui/aiballoontoolbarview.js +1 -1
  176. package/src/aiballoon/ui/aiballoonview.js +1 -1
  177. package/src/aichat/aichat.js +1 -1
  178. package/src/aichat/aichatcontroller.js +1 -1
  179. package/src/aichat/aichatui.js +1 -1
  180. package/src/aichat/model/aichatcontext.js +1 -1
  181. package/src/aichat/model/aichatconversation.js +1 -1
  182. package/src/aichat/model/aichatinteraction.js +1 -1
  183. package/src/aichat/model/aichatmodels.js +1 -1
  184. package/src/aichat/ui/aichatcontrolsview.js +1 -1
  185. package/src/aichat/ui/aichatfeedview.js +1 -1
  186. package/src/aichat/ui/aichatheaderview.js +1 -1
  187. package/src/aichat/ui/aichatview.js +1 -1
  188. package/src/aichat/ui/controls/aichatchipsoverflowmanager.js +1 -1
  189. package/src/aichat/ui/controls/aichatcontextitembuttonview.js +1 -1
  190. package/src/aichat/ui/controls/aichatcontextpanelurlinputview.js +1 -1
  191. package/src/aichat/ui/controls/aichatcontextpanelview.js +1 -1
  192. package/src/aichat/ui/controls/aichatcontrolsloaderview.js +1 -1
  193. package/src/aichat/ui/controls/aichatpromptcapabilitiesview.js +1 -1
  194. package/src/aichat/ui/controls/aichatpromptinputview.js +1 -1
  195. package/src/aichat/ui/controls/aichatpromptsuggestionslistview.js +1 -1
  196. package/src/aichat/ui/controls/resources/aichatcontextresourceslistview.js +1 -1
  197. package/src/aichat/ui/controls/resources/aichatcontextresourcesview.js +1 -1
  198. package/src/aichat/ui/controls/resources/aichatresourcelistitemview.js +1 -1
  199. package/src/aichat/ui/controls/resources/aichatresourcesballoonview.js +1 -1
  200. package/src/aichat/ui/controls/resources/aichatresourcessearchinputview.js +1 -1
  201. package/src/aichat/ui/feed/aichatfeedcontextchipsview.js +1 -1
  202. package/src/aichat/ui/feed/aichatfeederroritemview.js +1 -1
  203. package/src/aichat/ui/feed/aichatfeedinteractionheaderview.js +1 -1
  204. package/src/aichat/ui/feed/aichatfeeditemview.js +1 -1
  205. package/src/aichat/ui/feed/aichatfeedreplyitemview.js +1 -1
  206. package/src/aichat/ui/feed/aichatfeedsuggestionitemactionsview.js +1 -1
  207. package/src/aichat/ui/feed/aichatfeedsuggestionitemview.js +1 -1
  208. package/src/aichat/ui/feed/aichatfeedusermessageitem.js +1 -1
  209. package/src/aichat/utils/eventnames.js +1 -1
  210. package/src/aichat/utils/promisequeue.js +1 -1
  211. package/src/aichathistory/aichathistory.js +1 -1
  212. package/src/aichathistory/aichathistorycontroller.js +1 -1
  213. package/src/aichathistory/aichathistoryui.js +1 -1
  214. package/src/aichathistory/model/aichathistoryconversations.js +1 -1
  215. package/src/aichathistory/model/aichathistoryitem.js +1 -1
  216. package/src/aichathistory/ui/aichathistorylistitemview.js +2 -2
  217. package/src/aichathistory/ui/aichathistorylistview.js +1 -1
  218. package/src/aichathistory/ui/aichathistorysectionlistview.js +1 -1
  219. package/src/aichathistory/ui/aichathistoryview.js +1 -1
  220. package/src/aicore/aiconnector.js +1 -1
  221. package/src/aicore/aiediting.js +1 -1
  222. package/src/aicore/model/aicapabilities.js +1 -1
  223. package/src/aicore/model/aicontext.js +1 -1
  224. package/src/aicore/model/aiinteraction.js +1 -1
  225. package/src/aicore/model/aimodels.js +1 -1
  226. package/src/aicore/model/aireply.js +1 -1
  227. package/src/aicore/pipeline/airesponseapplier.js +2 -2
  228. package/src/aicore/pipeline/airesponseparser.js +2 -2
  229. package/src/aicore/ui/aidisclaimerview.js +1 -1
  230. package/src/aicore/ui/aiskeleton.js +1 -1
  231. package/src/aicore/ui/aispinner.js +1 -1
  232. package/src/aicore/ui/suggestioncontainer/aiminitoolbarview.js +1 -1
  233. package/src/aicore/ui/suggestioncontainer/aisuggestionbodyview.js +1 -1
  234. package/src/aicore/ui/suggestioncontainer/aisuggestioncontainerview.js +1 -1
  235. package/src/aicore/ui/suggestioncontainer/aisuggestioncontentpartview.js +1 -1
  236. package/src/aicore/ui/suggestioncontainer/aisuggestionheaderview.js +1 -1
  237. package/src/aicore/utils/common-translations.js +1 -1
  238. package/src/aicore/utils/createresizebutton.js +1 -1
  239. package/src/aicore/utils/documentposition.js +1 -1
  240. package/src/aicore/utils/documentrange.js +1 -1
  241. package/src/aicore/utils/eventnames.js +1 -1
  242. package/src/aicore/utils/geteditorfromcontext.js +1 -1
  243. package/src/aicore/utils/getoperationsfromreply.js +1 -1
  244. package/src/aicore/utils/getsuggestionpartsfromreply.js +1 -1
  245. package/src/aicore/utils/htmlparser.js +1 -1
  246. package/src/aicore/utils/htmlstreamer.js +1 -1
  247. package/src/aicore/utils/scrollmanager.js +1 -1
  248. package/src/aieditorintegration/aieditorintegration.js +1 -1
  249. package/src/aieditorintegration/aitogglebutton/aitogglebuttonui.js +1 -1
  250. package/src/aieditorintegration/aitogglebutton/toggleaicommand.js +1 -1
  251. package/src/aiquickactions/aiquickactions.js +1 -1
  252. package/src/aiquickactions/aiquickactionscommand.js +1 -1
  253. package/src/aiquickactions/aiquickactionsediting.js +1 -1
  254. package/src/aiquickactions/aiquickactionsui.js +1 -1
  255. package/src/aiquickactions/ui/aiquickactionsbuttoncreator.js +1 -1
  256. package/src/aiquickactions/ui/aiquickactionsdropdowncontentview.js +1 -1
  257. package/src/aiquickactions/ui/aiquickactionsdropdowncreator.js +1 -1
  258. package/src/aiquickactions/ui/aiquickactionsfilteredlistview.js +1 -1
  259. package/src/aiquickactions/ui/dropdownmenubuttonwithhighlightview.js +1 -1
  260. package/src/aireviewmode/aireviewcheckdefinitions.js +1 -1
  261. package/src/aireviewmode/aireviewmode.js +1 -1
  262. package/src/aireviewmode/aireviewmodecontroller.js +1 -1
  263. package/src/aireviewmode/aireviewmodeediting.js +1 -1
  264. package/src/aireviewmode/aireviewmodeui.js +1 -1
  265. package/src/aireviewmode/model/aireviewcheck.js +1 -1
  266. package/src/aireviewmode/model/aireviewcheckcustom.js +1 -1
  267. package/src/aireviewmode/model/aireviewchecklist.js +1 -1
  268. package/src/aireviewmode/model/aireviewcheckresult.js +1 -1
  269. package/src/aireviewmode/model/aireviewcheckresultchange.js +1 -1
  270. package/src/aireviewmode/model/aireviewcheckrun.js +1 -1
  271. package/src/aireviewmode/model/aireviewcustomcheckrun.js +1 -1
  272. package/src/aireviewmode/model/aireviewsystemcheckrun.js +1 -1
  273. package/src/aireviewmode/ui/aireviemodepromptinputview.js +1 -1
  274. package/src/aireviewmode/ui/aireviewmodeballoonsuggestionview.js +1 -1
  275. package/src/aireviewmode/ui/aireviewmodechecklistitemresultview.js +1 -1
  276. package/src/aireviewmode/ui/aireviewmodecustomcheckview.js +1 -1
  277. package/src/aireviewmode/ui/aireviewmodefinishreviewbuttonview.js +1 -1
  278. package/src/aireviewmode/ui/aireviewmodegeneralerrorview.js +1 -1
  279. package/src/aireviewmode/ui/aireviewmodereviewchecklistview.js +1 -1
  280. package/src/aireviewmode/ui/aireviewmodereviewcheckresultsview.js +1 -1
  281. package/src/aireviewmode/ui/aireviewmodereviewcommandlistitemview.js +1 -1
  282. package/src/aireviewmode/ui/aireviewmodereviewcompletedview.js +1 -1
  283. package/src/aireviewmode/ui/aireviewmodeview.js +1 -1
  284. package/src/aireviewmode/ui/form/aireviewmodeformdropdown.js +1 -1
  285. package/src/aireviewmode/ui/form/aireviewmodeformmanager.js +1 -1
  286. package/src/aitabs/aitabs.js +1 -1
  287. package/src/aitabs/aitabsmainview.js +1 -1
  288. package/src/aitabs/tabs/aitabsview.js +1 -1
  289. package/src/aitabs/tabs/tabbuttonview.js +1 -1
  290. package/src/aitabs/tabs/tabpanelview.js +1 -1
  291. package/src/errors.js +1 -1
  292. package/src/errorsmap.js +1 -1
  293. package/src/index.js +1 -1
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x25bc84=_0x2ea0;(function(_0x4b0665,_0x12eb8e){const _0x283110=_0x2ea0,_0xd418ee=_0x4b0665();while(!![]){try{const _0x2615a0=parseInt(_0x283110(0x152))/0x1*(-parseInt(_0x283110(0xf3))/0x2)+parseInt(_0x283110(0x1d8))/0x3+parseInt(_0x283110(0xc5))/0x4*(parseInt(_0x283110(0x9f))/0x5)+-parseInt(_0x283110(0x85))/0x6*(-parseInt(_0x283110(0x76))/0x7)+parseInt(_0x283110(0xc4))/0x8+parseInt(_0x283110(0x16d))/0x9*(-parseInt(_0x283110(0x94))/0xa)+-parseInt(_0x283110(0x148))/0xb;if(_0x2615a0===_0x12eb8e)break;else _0xd418ee['push'](_0xd418ee['shift']());}catch(_0x188a81){_0xd418ee['push'](_0xd418ee['shift']());}}}(_0x5463,0x9829d));import{ContextPlugin as _0x218971,Editor as _0x58403b}from'ckeditor5/src/core.js';import{CKEditorError as _0x2aea12,logError as _0x37699d,scrollViewportToShowTarget as _0x1084ad,uid as _0x2df6a6}from'ckeditor5/src/utils.js';import{AIConnector as _0x43fe7d}from'../aicore/aiconnector.js';import{AITabs as _0x406009}from'../aitabs/aitabs.js';import{AIChatConversation as _0x83be58}from'./model/aichatconversation.js';import{getTranslation as _0x20a620}from'../aicore/utils/common-translations.js';function _0x5463(){const _0x3777e0=['activeConversation','isInContext','length','isPremiumPlugin','rootName','node','setModel','createConversation','ai-request-aborted','content','_updateRatings','reasoningStarted','editing','removeFeedInteraction','_integrateEditor','setIsUploadInProgress','AI_CHAT_GENERIC_ERROR','contextItemAdded','redo','AI_CHAT_RESOURCE_LOAD_FAILED','AI_CHAT_CONTEXT_UNABLE_TO_UPLOAD_URL','getDiff','createPositionAt','interactionDestroyed','capabilitiesUpdated','ai-chat-invalid-request','showFakeVisualSelection','addFilesToContext','documentContextContent','has','ai-chat-controller-mouse-over','ai-chat-context-unsupported-file-type','$graveyard','removeMarker','_insertSuggestion','root','AI_CHAT_CONTEXT_CURRENT_DOCUMENT','from','marker','applySuggestion','children','cloneNode','handleRemovedConversation','applyOperation','setAddContextOptions','getPath','_aiChatModels','getChildAtOffset','sourceResourcesLoaded','AI_CHAT_ABORTED_MESSAGE','contextItems','source','closeSourceResourceBalloon','change','undo','_openBalloonFor','AI_CHAT_CONTEXT_UNSUPPORTED_TYPE','_getDocumentRangeForReplyChanges','activateTab','_aiConnector','updateFeedItemAIReplySuggestionPartState','setContextItemLoading','data-id','fetchConversation','domConverter','ai-conversation-','outdated','createRange','state','rejected','sourcePosition','selectModel','updateCurrentDocumentInContext','11249612hbXMLB','getInteractionAndReplyById','removeSelectionFromChatContext','collaboration.channelId','main','isUploadInProgress','updateContent','ai-chat-context-unsupported-type','sendUserMessage','Showing\x20conversation\x20history...','316DnwLEL','_batchToChanges','_toggleReasoning','ai-chat-conversation-start-failed','revert','uploadProgressChanged','_logError','delete','isCurrentDocumentInConversation','addContextItem','listenTo','model','batch','ai-chat-resource-load-failed','replyCreated','like','_handleUIUserMessage','disableControls','error','AIConnector','addFeedItemError','AI_CHAT_UNABLE_TO_LOAD_CONVERSATION','new','showPrevious','config','addResourceToContext','split','586422oybWqV','ai.chat.context','setIsMaximized','_aiEditing','accepted','stopInteraction','contextItemRemoved','_aiChatUi','_showConversationHistory','ai-chat-file-upload-failed','interactionCreated','mouseLeaveSuggestion','abortPromptStream','message','_setIsMaximized','_startConversationSafely','conversationInitialized','pending','stop','startInteraction','updateCapabilities','_updateReplyContent','_balloonShowDiff','sendMessage','indexOf','ai-chat-url-upload-failed','plugins','addOperation','addFeedItemStaticMessage','AI_CHAT_UNTITLED_CONVERSATION','uiId','end','ai-chat-context-file-too-many-pages','addDocumentToContext','sourceId','range','webSearchFinished','streaming','setSelectedModel','_flushLastInteractionUI','query','resizedTabs','startsWith','anchorId','view','init','replies','_handleStartConversation','get','getRoot','contextItemLoadingEnded','updateConversationTitle','getAttribute','getSelectionText','populateSourceResourceBalloon','indexes','finishInteraction','resourceId','resource','document','clearConversationContextUI','isModelAvailable','replyId','AI_CHAT_CONTEXT_FILE_TOO_LARGE','ai-chat-context-form-data-size-limits-exceeded','AI_BALLOON_HEADER_TITLE','editors','AI_CHAT_CONTEXT_UNABLE_TO_UPLOAD_FILE','ai.availableReplyActions','nextSibling','updateFeedItemAIReplyContent','_createFromRanges','isStarted','toViewRange','interactionFinished','mapper','loadConversation','scrollFeedToSuggestion','Liked\x20response','ai-chat-missing-channel-id','commands','enableControls','_removeFromContext','howMany','maxOffset','contextItem','ai-no-track-changes','viewRangeToDom','Disliked\x20response','getMarkersGroup','find','webSearchStarted','toggleSuggestionDisplayMode','addUrlToContext','getReply','insertSuggestion','AI_CHAT_UNABLE_TO_START_CONVERSATION','createPositionFromPath','dislike','stopListening','toString','resources','type','ai.chat.models.defaultModelId','_applySuggestion','replyChangeGroupStateUpdated','getDocumentContext','2334717sEShlS','ai-chat-source-resources-load-failed','toggleLoadingSkeleton','forEach','getDocumentData','rejectSuggestion','setConversationContext','replyContentUpdated','options','_applyOperationsAsSuggestions','uid','7GouqiC','addFeedItemUserMessage','AIChatController','getGroupId','clearPendingContextUI','modification-delta','toggleWebSearch','_scrollToSuggestionRange','addFeedInteractionHeader','slice','AI_CHAT_CONTEXT_INVALID_DATA','setFeedItemRenderingStrategy','ai-chat-controller-no-active-conversation','dialogClosed','ai-chat-context-invalid-data','4425978hgObUG','addSelectionToContext','hideFakeVisualSelection','parse','hasChanges','setChangeGroupState','removeSelectionFromContext','_toggleWebSearch','showDiff','getContentParts','getOperations','AITabs','AI_CHAT_CONTEXT_UNSUPPORTED_FILE_TYPE','changes','partIndex','10DDlIBZ','map','addFeedItemAISuggestion','reasoningFinished','open','selectedModel','ai.chat.models.displayedModels','messageId','removed','interactionId','text-delta','15CgbQLz','version','AIEditing','path','sources','getTransformedByOperation','interactionStarted','TrackChangesEditing','modelSelected','showChangeInText','chat','data','getRanges','baseVersion','current-document','ai-chat-conversation-init-failed','isDisabled','lastInteraction','findIndex','addFileToContext','log','setLoadingMessage','start','unshift','startConversation','markers','resetMessageInput','_removeAISelectionMarkers','focusPromptInput','isDocumentOperation','_stopLastInteraction','context','filter','getFirstRange','push','ai-chat-conversation-not-found','Undo','4509456NlcHHu','457124HKELBH','alignToTop','mouseOverSuggestion','updateFeedItemAIReplySuggestionContent','TrackChanges','pluginName','index','full','removeFromContext','resizeTabs','getConversation','AI_CHAT_CONTEXT_FILE_TOO_MANY_PAGES','updateFeedItemAIReplySources','toggleReasoning','locale','ai-chat-context-file-too-large','resetConversationTitle','updateResourceState','changeGroups','AIChatUI','getInteraction','handleUserInteraction','addCurrentDocumentToContext','static','loadSourceResources','ready','isCurrentDocumentInContext','startAutoScroll','getChildren','upsertAIChatRating','afterInit','load','add','AI_CHAT_CONTEXT_FORM_DATA_SIZE_LIMITS_EXCEEDED','addContextOptionsChanged','requires','getChild','contextSent','isOfficialPlugin','_previewedChangeGroup','removeContextItem','addSelectionToChatContext','AI_CHAT_CONTEXT_UNABLE_TO_LOAD_RESOURCES','isOpen','selection','set','4502adZtAb','history','isLoading','resourceStateChanged','AI_CHAT_INVALID_REQUEST','resize','remove','DocumentCompare','close','setConversationTitle','addFeedItemAIReply','showNext'];_0x5463=function(){return _0x3777e0;};return _0x5463();}import{AI_VISUAL_SELECTION_MARKER_NAME as _0x332dfc}from'../aicore/aiediting.js';import{AI_REPLY_ACTIONS as _0x1eae55}from'./ui/feed/aichatfeedsuggestionitemactionsview.js';import{AIChatModels as _0x40dce3}from'./model/aichatmodels.js';import{getEditorFromContext as _0x27a01b}from'../aicore/utils/geteditorfromcontext.js';import{DocumentCompare as _0x1f9bda,DATA_ID_MODEL_ATTRIBUTE as _0x30bdda}from'ckeditor5-collaboration/src/collaboration-core.js';function _0x2ea0(_0x200a2a,_0x51cf3d){const _0x54631e=_0x5463();return _0x2ea0=function(_0x2ea0a0,_0x490dfc){_0x2ea0a0=_0x2ea0a0-0x75;let _0x37d695=_0x54631e[_0x2ea0a0];return _0x37d695;},_0x2ea0(_0x200a2a,_0x51cf3d);}import{fixMarkerOperationOldRange as _0xa5e704,getOperationsFromReply as _0x27437e}from'../aicore/utils/getoperationsfromreply.js';import{expandSelectionWithContext as _0xec16d,getMinimalSelection as _0x39d438}from'../aicore/utils/getsuggestionpartsfromreply.js';import{ModelRange as _0x29e4f1,_DetachOperation as _0x46c604}from'ckeditor5/src/engine.js';import{findOne as _0x5b796f,getAttribute as _0x868855,serialize as _0xa90766,Document as _0x3f8498,findByAttribute as _0x542dd7}from'../aicore/utils/htmlparser.js';import{IconAI as _0x181f7c}from'@ckeditor/ckeditor5-icons';import{AISuggestionContainerView as _0x12d899}from'../aicore/ui/suggestioncontainer/aisuggestioncontainerview.js';import{AIBalloon as _0x1baf23}from'../aiballoon/aiballoon.js';export class AIChatController extends _0x218971{[_0x25bc84(0x170)];[_0x25bc84(0x13a)];[_0x25bc84(0x174)];[_0x25bc84(0x12d)];[_0x25bc84(0x153)]=new Map();[_0x25bc84(0xec)]=null;[_0x25bc84(0x183)]=!0x1;static get[_0x25bc84(0xe8)](){return[_0x43fe7d,_0x1baf23,_0x1f9bda];}static get[_0x25bc84(0xca)](){const _0x2fc0d9=_0x25bc84;return _0x2fc0d9(0x78);}static get[_0x25bc84(0xeb)](){return!0x0;}static get[_0x25bc84(0x102)](){return!0x0;}[_0x25bc84(0x19a)](){const _0x5af906=_0x25bc84;this[_0x5af906(0x13a)]=this[_0x5af906(0xbe)][_0x5af906(0x187)][_0x5af906(0x19d)](_0x5af906(0x165)),this[_0x5af906(0x174)]=this[_0x5af906(0xbe)][_0x5af906(0x187)][_0x5af906(0x19d)](_0x5af906(0xd8)),this[_0x5af906(0x170)]=this[_0x5af906(0xbe)][_0x5af906(0x187)][_0x5af906(0x19d)](_0x5af906(0xa1)),this[_0x5af906(0x12d)]=new _0x40dce3({'connector':this[_0x5af906(0x13a)],'availableModels':this[_0x5af906(0xbe)][_0x5af906(0x16a)][_0x5af906(0x19d)](_0x5af906(0x9a)),'defaultModelId':this[_0x5af906(0xbe)][_0x5af906(0x16a)][_0x5af906(0x19d)](_0x5af906(0x1d4))});const _0x253332=this[_0x5af906(0xbe)][_0x5af906(0x187)][_0x5af906(0x19d)](_0x5af906(0x90));this[_0x5af906(0x15c)](this[_0x5af906(0x174)],_0x5af906(0xb7),()=>{const _0x286708=_0x5af906;this[_0x286708(0x17c)]();}),this[_0x5af906(0x15c)](this[_0x5af906(0x174)],_0x5af906(0x150),(_0x2d20b5,_0x4e6a32)=>{const _0x58a6ca=_0x5af906;this[_0x58a6ca(0x162)]({'userMessage':_0x4e6a32});}),this[_0x5af906(0x15c)](_0x253332,_0x5af906(0x196),(_0x3c7f8e,_0x5d264b)=>{const _0x3fe629=_0x5af906;this[_0x3fe629(0x17b)](_0x5d264b);}),this[_0x5af906(0x15c)](this[_0x5af906(0x174)],_0x5af906(0xce),()=>{const _0x5b395b=_0x5af906;_0x253332[_0x5b395b(0xf8)]();}),this[_0x5af906(0x15c)](this[_0x5af906(0x174)],_0x5af906(0x179),async()=>{const _0x113b4e=_0x5af906;await this[_0x113b4e(0xbd)](),await this[_0x113b4e(0x194)](),this[_0x113b4e(0x14a)]();}),this[_0x5af906(0x15c)](this[_0x5af906(0x174)],_0x5af906(0x18e),()=>{const _0x12b402=_0x5af906;this[_0x12b402(0xff)]?.[_0x12b402(0xdb)](_0x20a620(this[_0x12b402(0xbe)][_0x12b402(0xd3)],_0x12b402(0x123)));}),this[_0x5af906(0x15c)](this[_0x5af906(0x174)],_0x5af906(0xb2),(_0x2cff56,_0x180925)=>{const _0x514e40=_0x5af906;this[_0x514e40(0xff)]?.[_0x514e40(0x11a)](Array[_0x514e40(0x124)](_0x180925));}),this[_0x5af906(0x15c)](this[_0x5af906(0x174)],_0x5af906(0x1ca),(_0xa91acd,_0x277fc2)=>{const _0x50a61f=_0x5af906;this[_0x50a61f(0xff)]?.[_0x50a61f(0x1ca)](_0x277fc2);}),this[_0x5af906(0x15c)](this[_0x5af906(0x174)],_0x5af906(0x16b),(_0x5208cb,_0x4b91da)=>{const _0x5f3a5c=_0x5af906;this[_0x5f3a5c(0xff)]?.[_0x5f3a5c(0x16b)](_0x4b91da[_0x5f3a5c(0x132)],_0x4b91da[_0x5f3a5c(0x1a7)]);}),this[_0x5af906(0x15c)](this[_0x5af906(0x174)],_0x5af906(0xed),(_0x32310e,_0x2e0444)=>{const _0x10b421=_0x5af906;this[_0x10b421(0x1bf)](_0x2e0444);}),this[_0x5af906(0x15c)](this[_0x5af906(0x174)],_0x5af906(0xdd),(_0x164364,_0x5e3c3d)=>{const _0x4bef5d=_0x5af906;this[_0x4bef5d(0xff)]?.[_0x4bef5d(0xdd)](_0x5e3c3d[_0x4bef5d(0x18f)],_0x5e3c3d[_0x4bef5d(0x195)],_0x5e3c3d[_0x4bef5d(0x75)]);}),this[_0x5af906(0x15c)](this[_0x5af906(0x174)],_0x5af906(0x7c),()=>{const _0x1640b1=_0x5af906;this[_0x1640b1(0x8c)]();}),this[_0x5af906(0x15c)](this[_0x5af906(0x174)],_0x5af906(0xd2),()=>{const _0x209632=_0x5af906;this[_0x209632(0x154)]();}),this[_0x5af906(0x15c)](this[_0x5af906(0x174)],_0x5af906(0x146),(_0x173c33,_0x47d0f1)=>{const _0x3c3737=_0x5af906;this[_0x3c3737(0xff)]?.[_0x3c3737(0x105)](_0x47d0f1);}),this[_0x5af906(0x15c)](this[_0x5af906(0x174)],_0x5af906(0x161),(_0x2cceed,{replyId:_0x2c2199})=>{const _0x111c35=_0x5af906;console[_0x111c35(0xb3)](_0x111c35(0x1bb),_0x2c2199);}),this[_0x5af906(0x15c)](this[_0x5af906(0x174)],_0x5af906(0x1cf),(_0x2480ba,{replyId:_0x840381})=>{const _0x9e3d0c=_0x5af906;console[_0x9e3d0c(0xb3)](_0x9e3d0c(0x1c5),_0x840381);}),this[_0x5af906(0x15c)](this[_0x5af906(0x174)],_0x5af906(0x1cc),(_0x571a59,_0x34b3ca)=>{const _0x312c09=_0x5af906;this[_0x312c09(0xbe)][_0x312c09(0x187)][_0x312c09(0x19d)](_0x1baf23)[_0x312c09(0xfb)](),this[_0x312c09(0x121)](_0x34b3ca);}),this[_0x5af906(0x15c)](this[_0x5af906(0x174)],_0x5af906(0xa8),(_0x2ac7e2,{replyId:_0xc8a541,partIndex:_0x193d29})=>{const _0x21c64d=_0x5af906;this[_0x21c64d(0x183)]=this[_0x21c64d(0x174)][_0x21c64d(0x8d)],this[_0x21c64d(0x136)](_0xc8a541,_0x193d29);}),this[_0x5af906(0x15c)](this[_0x5af906(0x174)],_0x5af906(0xc7),(_0x198149,{replyId:_0x2a3c8e,partIndex:_0x3e8695})=>{const _0x2beb79=_0x5af906,_0x387ca3=this[_0x2beb79(0x138)](_0x2a3c8e,_0x3e8695);_0x387ca3&&_0x2beb79(0x11f)!=_0x387ca3[_0x2beb79(0x190)][_0x2beb79(0x122)][_0x2beb79(0x103)]&&this[_0x2beb79(0x170)][_0x2beb79(0x119)]([_0x387ca3[_0x2beb79(0x190)]],_0x2beb79(0x11d));}),this[_0x5af906(0x15c)](this[_0x5af906(0x174)],_0x5af906(0x178),()=>{const _0x399d9f=_0x5af906;this[_0x399d9f(0x170)][_0x399d9f(0x87)](_0x399d9f(0x11d));}),this[_0x5af906(0x15c)](this[_0x5af906(0x174)],_0x5af906(0x126),(_0x42a711,_0x323621)=>{const _0x105e01=_0x5af906;this[_0x105e01(0xbe)][_0x105e01(0x187)][_0x105e01(0x19d)](_0x1baf23)[_0x105e01(0xfb)](),this[_0x105e01(0x1d5)](_0x323621);}),this[_0x5af906(0x15c)](this[_0x5af906(0x174)],_0x5af906(0x1c9),async(_0x12e1f7,{replyId:_0x2433cb,showDiff:_0x29aac1})=>{const _0x538df4=_0x5af906,{reply:_0x9fbb6}=this[_0x538df4(0x149)](_0x2433cb),_0x2c80a8=_0x9fbb6[_0x538df4(0x8e)]({'showDiff':_0x29aac1});await this[_0x538df4(0x174)][_0x538df4(0xc8)]({'id':_0x9fbb6['id'],'parts':_0x2c80a8,'renderingStrategy':_0x538df4(0xdc)});}),this[_0x5af906(0x15c)](this[_0x5af906(0x174)],_0x5af906(0x1dd),(_0x50bc27,{replyId:_0x11ca43,partIndex:_0xeecb4f})=>{const _0x574f1d=_0x5af906;this[_0x574f1d(0xec)]?.[_0x574f1d(0x1ab)]==_0x11ca43&&this[_0x574f1d(0xec)]?.[_0x574f1d(0x93)]==_0xeecb4f&&this[_0x574f1d(0xbe)][_0x574f1d(0x187)][_0x574f1d(0x19d)](_0x1baf23)[_0x574f1d(0xfb)]();const {reply:_0xca9e4c}=this[_0x574f1d(0x149)](_0x11ca43);_0xca9e4c[_0x574f1d(0x8a)](_0xeecb4f,_0x574f1d(0x144)),this[_0x574f1d(0x170)][_0x574f1d(0x87)](_0x574f1d(0x11d));});}async[_0x25bc84(0xe3)](){const _0x315ba7=_0x25bc84;this[_0x315ba7(0xbe)]instanceof _0x58403b?this[_0x315ba7(0x10d)](this[_0x315ba7(0xbe)]):this[_0x315ba7(0x15c)](this[_0x315ba7(0xbe)][_0x315ba7(0x1af)],_0x315ba7(0xe5),(_0xc5eeaa,_0x3b38b3)=>{const _0x3291d5=_0x315ba7;_0x3b38b3['on'](_0x3291d5(0xde),()=>{const _0x383df7=_0x3291d5;this[_0x383df7(0x10d)](_0x3b38b3);});}),await this[_0x315ba7(0x17c)]();}[_0x25bc84(0x121)](_0x1401c3){const _0x250e2e=_0x25bc84,_0x42be6a=_0x27a01b(this[_0x250e2e(0xbe)]);if(!_0x42be6a[_0x250e2e(0x187)][_0x250e2e(0x11c)](_0x250e2e(0xc9)))throw new _0x2aea12(_0x250e2e(0x1c3),null);const _0x17c70c=this[_0x250e2e(0xbe)][_0x250e2e(0x187)][_0x250e2e(0x19d)](_0x250e2e(0xfa)),{reply:_0x2a9d06,interaction:_0x2e039f}=this[_0x250e2e(0x149)](_0x1401c3[_0x250e2e(0x1ab)]),_0x532d09=this[_0x250e2e(0x138)](_0x1401c3[_0x250e2e(0x1ab)],_0x1401c3[_0x250e2e(0x93)]),_0x3d5271=void 0x0!==_0x1401c3[_0x250e2e(0x93)]?[_0x2a9d06[_0x250e2e(0xd7)][_0x1401c3[_0x250e2e(0x93)]]]:_0x2a9d06[_0x250e2e(0xd7)][_0x250e2e(0xbf)](_0x3bcc77=>_0x250e2e(0x17e)==_0x3bcc77[_0x250e2e(0x143)]),_0x4bf331=_0x3d5271[_0x250e2e(0x95)](_0x14adde=>_0x2a9d06[_0x250e2e(0xd7)][_0x250e2e(0x185)](_0x14adde));if(!_0x532d09||_0x250e2e(0x11f)==_0x532d09[_0x250e2e(0x190)][_0x250e2e(0x122)][_0x250e2e(0x103)])return void _0x4bf331[_0x250e2e(0x1db)](_0x1b649a=>_0x2a9d06[_0x250e2e(0x8a)](_0x1b649a,_0x250e2e(0x141)));_0x4bf331[_0x250e2e(0x1db)](_0x189dd5=>_0x2a9d06[_0x250e2e(0x8a)](_0x189dd5,_0x250e2e(0x171)));const _0x10a655=_0x27437e({'editor':_0x42be6a,'reply':_0x2a9d06,'interaction':_0x2e039f,'groups':_0x3d5271,'transform':!0x0,'documentCompare':_0x17c70c,'documentCompareOptions':{'anchor':_0x250e2e(0x14c),'markDeletions':!0x0}});let _0x5a1a1a;_0x532d09&&this[_0x250e2e(0x7d)](_0x532d09[_0x250e2e(0x190)]),_0x42be6a[_0x250e2e(0x15d)][_0x250e2e(0x134)](_0x23ab21=>{const _0x3252df=_0x250e2e;_0x5a1a1a=_0x23ab21[_0x3252df(0x15e)],_0x42be6a[_0x3252df(0x187)][_0x3252df(0x19d)](_0x3252df(0xa6))[_0x3252df(0x1e1)](_0x10a655),this[_0x3252df(0x170)][_0x3252df(0x87)](_0x3252df(0x11d));}),this[_0x250e2e(0x153)][_0x250e2e(0xf2)](_0x5a1a1a,{'interactionId':_0x2e039f['id'],'replyId':_0x2a9d06['id'],'indexes':_0x4bf331[_0x250e2e(0x7f)]()}),this[_0x250e2e(0x109)](_0x2a9d06);}[_0x25bc84(0x1d5)](_0x146cf8){const _0x3c0bbe=_0x25bc84,_0x7566b8=_0x27a01b(this[_0x3c0bbe(0xbe)]),_0x370d50=this[_0x3c0bbe(0xbe)][_0x3c0bbe(0x187)][_0x3c0bbe(0x19d)](_0x1f9bda),{reply:_0x5d52e5,interaction:_0x53995d}=this[_0x3c0bbe(0x149)](_0x146cf8[_0x3c0bbe(0x1ab)]),_0x33e385=this[_0x3c0bbe(0x138)](_0x146cf8[_0x3c0bbe(0x1ab)],_0x146cf8[_0x3c0bbe(0x93)]),_0x226ec0=void 0x0!==_0x146cf8[_0x3c0bbe(0x93)]?[_0x5d52e5[_0x3c0bbe(0xd7)][_0x146cf8[_0x3c0bbe(0x93)]]]:_0x5d52e5[_0x3c0bbe(0xd7)][_0x3c0bbe(0xbf)](_0x33f119=>_0x3c0bbe(0x17e)==_0x33f119[_0x3c0bbe(0x143)]),_0x2b3e92=_0x226ec0[_0x3c0bbe(0x95)](_0x16a606=>_0x5d52e5[_0x3c0bbe(0xd7)][_0x3c0bbe(0x185)](_0x16a606));if(!_0x33e385||_0x3c0bbe(0x11f)==_0x33e385[_0x3c0bbe(0x190)][_0x3c0bbe(0x122)][_0x3c0bbe(0x103)])return void _0x2b3e92[_0x3c0bbe(0x1db)](_0x4d4c0a=>_0x5d52e5[_0x3c0bbe(0x8a)](_0x4d4c0a,_0x3c0bbe(0x141)));_0x2b3e92[_0x3c0bbe(0x1db)](_0x9254e7=>_0x5d52e5[_0x3c0bbe(0x8a)](_0x9254e7,_0x3c0bbe(0x171)));const _0x48c5a0=_0x27437e({'editor':_0x7566b8,'reply':_0x5d52e5,'interaction':_0x53995d,'groups':_0x226ec0,'transform':!0x0,'documentCompare':_0x370d50,'documentCompareOptions':{'anchor':_0x3c0bbe(0x14c),'markDeletions':!0x1}});let _0x3ae138;_0x33e385&&this[_0x3c0bbe(0x7d)](_0x33e385[_0x3c0bbe(0x190)]),_0x7566b8[_0x3c0bbe(0x15d)][_0x3c0bbe(0x134)](_0x1f484d=>{const _0x5db405=_0x3c0bbe;_0x3ae138=_0x1f484d[_0x5db405(0x15e)];for(const _0xd87cd of _0x48c5a0)_0xd87cd[_0x5db405(0xac)]=_0x7566b8[_0x5db405(0x15d)][_0x5db405(0x1a8)][_0x5db405(0xa0)],_0xa5e704(_0x7566b8,_0xd87cd),_0x1f484d[_0x5db405(0x15e)][_0x5db405(0x188)](_0xd87cd),_0x7566b8[_0x5db405(0x15d)][_0x5db405(0x12a)](_0xd87cd);}),this[_0x3c0bbe(0x153)][_0x3c0bbe(0xf2)](_0x3ae138,{'interactionId':_0x53995d['id'],'replyId':_0x5d52e5['id'],'indexes':_0x2b3e92[_0x3c0bbe(0x7f)]()}),this[_0x3c0bbe(0x109)](_0x5d52e5);}[_0x25bc84(0x136)](_0x74fd63,_0x14301e){const _0x5c7792=_0x25bc84,_0x434134=_0x27a01b(this[_0x5c7792(0xbe)]),_0x3e26a5=this[_0x5c7792(0x138)](_0x74fd63,_0x14301e),_0x2bf5dd=this[_0x5c7792(0xbe)][_0x5c7792(0x187)][_0x5c7792(0x19d)](_0x1baf23);if(!_0x3e26a5)return void _0x2bf5dd[_0x5c7792(0xfb)]();const {range:_0x26a6bc,currentIndex:_0x4bd827}=_0x3e26a5;if(_0x5c7792(0x11f)==_0x26a6bc[_0x5c7792(0x122)][_0x5c7792(0x103)]){const {reply:_0x2b3c13}=this[_0x5c7792(0x149)](_0x74fd63);return _0x2b3c13[_0x5c7792(0x8a)](_0x4bd827,_0x5c7792(0x141)),void _0x2bf5dd[_0x5c7792(0xfb)]();}if(this[_0x5c7792(0xec)]?.[_0x5c7792(0x1ab)]==_0x74fd63&&this[_0x5c7792(0xec)]?.[_0x5c7792(0x93)]==_0x4bd827)return;this[_0x5c7792(0x1d0)](_0x2bf5dd),this[_0x5c7792(0xec)]={'replyId':_0x74fd63,'partIndex':_0x4bd827};let _0x4efc1c=_0x434134[_0x5c7792(0x16a)][_0x5c7792(0x19d)](_0x5c7792(0x1b1))||[..._0x1eae55];_0x434134[_0x5c7792(0x187)][_0x5c7792(0x11c)](_0x5c7792(0xc9))||(_0x4efc1c=_0x4efc1c[_0x5c7792(0xbf)](_0x44723f=>_0x5c7792(0x1cc)!=_0x44723f));const _0x400e02=new _0x12d899(_0x434134[_0x5c7792(0xd3)],{'showDiff':this[_0x5c7792(0x183)],'areActionsDisabled':!0x1,'miniToolbarConfig':{'showChanges':_0x5c7792(0xcc)},'hideHeader':!0x0,'availableActions':_0x4efc1c});this[_0x5c7792(0x1d0)](_0x400e02);const {reply:_0x25b3ad}=this[_0x5c7792(0x149)](_0x74fd63),_0x51d15a=_0x25b3ad[_0x5c7792(0x8e)]({'showDiff':this[_0x5c7792(0x183)]})[_0x5c7792(0xbf)](_0x4e7758=>_0x4e7758[_0x5c7792(0x89)]),_0x394167=_0x51d15a[_0x5c7792(0xb1)](_0x9f0254=>_0x9f0254[_0x5c7792(0xcb)]==_0x4bd827);if(-0x1==_0x394167)return;const _0x203139=_0x51d15a[_0x394167],_0x54fea3=_0x51d15a['at']((_0x394167-0x1)%_0x51d15a[_0x5c7792(0x101)])?.[_0x5c7792(0xcb)],_0x161b16=_0x51d15a['at']((_0x394167+0x1)%_0x51d15a[_0x5c7792(0x101)])?.[_0x5c7792(0xcb)];_0x400e02[_0x5c7792(0x14e)]({'parts':[_0x203139],'renderingStrategy':_0x5c7792(0xdc)});const _0x455d40=_0x4bd827!==_0x54fea3;this[_0x5c7792(0x7d)](_0x26a6bc,!0x0),_0x2bf5dd[_0x5c7792(0x98)]({'index':_0x4bd827,'title':_0x20a620(this[_0x5c7792(0xbe)][_0x5c7792(0xd3)],_0x5c7792(0x1ae),(_0x394167+0x1)[_0x5c7792(0x1d1)]()),'icon':_0x181f7c,'mainView':_0x400e02,'showRotator':_0x455d40,'showApplyButton':!0x0,'showSuggestButton':_0x434134[_0x5c7792(0x187)][_0x5c7792(0x11c)](_0x5c7792(0xc9)),'ranges':[_0x26a6bc]}),this[_0x5c7792(0x174)][_0x5c7792(0x1ba)](_0x74fd63,_0x4bd827),this[_0x5c7792(0x15c)](_0x400e02,_0x5c7792(0x1c9),(_0xa27e86,{showDiff:_0x168d45})=>{const _0x227413=_0x5c7792;this[_0x227413(0x183)]=_0x168d45;const {reply:_0x4c3743}=this[_0x227413(0x149)](_0x74fd63),_0xc24f65=_0x4c3743[_0x227413(0x8e)]({'showDiff':_0x168d45,'groupIndex':_0x4bd827});_0x400e02[_0x227413(0x14e)]({'parts':_0xc24f65,'renderingStrategy':_0x227413(0xdc)});}),this[_0x5c7792(0x15c)](_0x2bf5dd,_0x5c7792(0x126),()=>{const _0x3da679=_0x5c7792;this[_0x3da679(0x1d5)]({'replyId':_0x74fd63,'partIndex':_0x4bd827}),_0x455d40?this[_0x3da679(0x136)](_0x74fd63,_0x161b16):_0x2bf5dd[_0x3da679(0xfb)]();}),this[_0x5c7792(0x15c)](_0x2bf5dd,_0x5c7792(0x1cc),()=>{const _0x241768=_0x5c7792;this[_0x241768(0x121)]({'replyId':_0x74fd63,'partIndex':_0x4bd827}),_0x455d40?this[_0x241768(0x136)](_0x74fd63,_0x161b16):_0x2bf5dd[_0x241768(0xfb)]();}),_0x455d40&&(this[_0x5c7792(0x15c)](_0x2bf5dd,_0x5c7792(0xfe),()=>{const _0x28915d=_0x5c7792;this[_0x28915d(0x136)](_0x74fd63,_0x161b16);}),this[_0x5c7792(0x15c)](_0x2bf5dd,_0x5c7792(0x169),()=>{const _0x24817c=_0x5c7792;this[_0x24817c(0x136)](_0x74fd63,_0x54fea3);})),this[_0x5c7792(0x15c)](_0x2bf5dd,_0x5c7792(0x83),()=>{const _0x4aa580=_0x5c7792;this[_0x4aa580(0x1d0)](_0x2bf5dd),this[_0x4aa580(0x1d0)](_0x400e02),this[_0x4aa580(0xec)]=null;});}[_0x25bc84(0x138)](_0x55dff0,_0x5ccc58){const _0x536d62=_0x25bc84,_0x58d5ea=_0x27a01b(this[_0x536d62(0xbe)]),{reply:_0x21fd48,interaction:_0x48aeb6}=this[_0x536d62(0x149)](_0x55dff0),_0x445668=_0x21fd48[_0x536d62(0xd7)][_0x536d62(0xbf)](_0x4f1b6c=>_0x536d62(0x17e)==_0x4f1b6c[_0x536d62(0x143)]),_0x5ec2ae=_0x445668[_0x536d62(0x95)](_0x59c894=>_0x21fd48[_0x536d62(0xd7)][_0x536d62(0x185)](_0x59c894));void 0x0===_0x5ccc58&&(_0x5ccc58=_0x5ec2ae[0x0]);const _0x2f8834=_0x5ec2ae[_0x536d62(0x185)](_0x5ccc58);if(-0x1==_0x2f8834)return null;const _0x44dd17=_0x445668[_0x2f8834],_0xef59db=new _0x3f8498([]),_0x22f40d=new _0x3f8498([]);for(const _0x41ea86 of _0x44dd17[_0x536d62(0x92)])if(_0x536d62(0x9c)!=_0x41ea86[_0x536d62(0x1d3)]&&_0x22f40d[_0x536d62(0x127)][_0x536d62(0xc1)](_0x41ea86[_0x536d62(0x104)][_0x536d62(0x128)](!0x0)),_0x536d62(0x168)!=_0x41ea86[_0x536d62(0x1d3)]){const _0x51e317=_0x5b796f(_0x1892e4=>_0x868855(_0x1892e4,_0x536d62(0x13d))==_0x41ea86['id'],_0x21fd48[_0x536d62(0x11b)],!0x0);_0xef59db[_0x536d62(0x127)][_0x536d62(0xc1)](_0x51e317[_0x536d62(0x128)](!0x0));}if(0x0==_0xef59db[_0x536d62(0x127)][_0x536d62(0x101)]){if(_0x44dd17[_0x536d62(0x92)][0x0][_0x536d62(0x198)]){const _0x231dc0=_0x542dd7(_0x536d62(0x13d),_0x44dd17[_0x536d62(0x92)][0x0][_0x536d62(0x198)],_0x21fd48[_0x536d62(0x11b)]);_0xef59db[_0x536d62(0x127)][_0x536d62(0xb6)](_0x231dc0[_0x536d62(0x128)](!0x0)),_0x22f40d[_0x536d62(0x127)][_0x536d62(0xb6)](_0x231dc0[_0x536d62(0x128)](!0x0)),_0x231dc0[_0x536d62(0x1b2)]&&(_0xef59db[_0x536d62(0x127)][_0x536d62(0xc1)](_0x231dc0[_0x536d62(0x1b2)][_0x536d62(0x128)](!0x0)),_0x22f40d[_0x536d62(0x127)][_0x536d62(0xc1)](_0x231dc0[_0x536d62(0x1b2)][_0x536d62(0x128)](!0x0)));}else{const _0x25f3f3=_0x21fd48[_0x536d62(0x11b)][_0x536d62(0x127)][0x0];if(!_0x25f3f3)return null;_0xef59db[_0x536d62(0x127)][_0x536d62(0xc1)](_0x25f3f3[_0x536d62(0x128)](!0x0)),_0x22f40d[_0x536d62(0x127)][_0x536d62(0xc1)](_0x25f3f3[_0x536d62(0x128)](!0x0));}}const _0x1fd7c7=_0x48aeb6[_0x536d62(0x1d7)](),_0x4873a8=_0x58d5ea[_0x536d62(0xaa)][_0x536d62(0x88)](_0x1fd7c7[_0x536d62(0x108)]),_0x44c283=_0xa90766(_0xef59db),_0x495131=_0x58d5ea[_0x536d62(0xaa)][_0x536d62(0x88)](_0x44c283),_0x124a29=_0x58d5ea[_0x536d62(0xaa)][_0x536d62(0x88)](_0x44c283),_0x13cd28=_0x58d5ea[_0x536d62(0x15d)][_0x536d62(0x115)](_0x495131,0x0),_0x1767a9=_0xa90766(_0x22f40d),_0x1e4bb6={'anchor':_0x13cd28,'markDeletions':!0x1},_0x5f0b97=_0x58d5ea[_0x536d62(0x187)][_0x536d62(0x19d)](_0x1f9bda)[_0x536d62(0x114)](_0x44c283,_0x1767a9,_0x1e4bb6)[_0x536d62(0x8f)]();if(!_0x5f0b97[_0x536d62(0x101)])return null;_0x58d5ea[_0x536d62(0x15d)][_0x536d62(0x134)](_0x3f902e=>{const _0x3cbf7c=_0x536d62;for(const _0x2d805b of _0x5f0b97)if(_0x3cbf7c(0xf9)==_0x2d805b[_0x3cbf7c(0x1d3)]){const _0x113222=_0x2d805b[_0x3cbf7c(0x145)],_0x43a6d0=_0x2d805b[_0x3cbf7c(0x1c0)],_0x47687e=new _0x46c604(_0x113222,_0x43a6d0);_0x3f902e[_0x3cbf7c(0x15e)][_0x3cbf7c(0x188)](_0x47687e),_0x58d5ea[_0x3cbf7c(0x15d)][_0x3cbf7c(0x12a)](_0x47687e);}else _0x3cbf7c(0x125)!==_0x2d805b[_0x3cbf7c(0x1d3)]&&(_0x2d805b[_0x3cbf7c(0xac)]=null,_0x2d805b[_0x3cbf7c(0xbc)]=!0x1,_0x3f902e[_0x3cbf7c(0x15e)][_0x3cbf7c(0x188)](_0x2d805b),_0x58d5ea[_0x3cbf7c(0x15d)][_0x3cbf7c(0x12a)](_0x2d805b));});const _0x2bc14e=_0x39d438(_0x58d5ea,_0x5f0b97,_0x495131);_0xec16d(_0x58d5ea[_0x536d62(0x15d)],_0x2bc14e);const _0x109d12=_0x2bc14e[_0x536d62(0xc0)]()[_0x536d62(0xb5)][_0x536d62(0xa2)][_0x536d62(0x7f)](),_0x1bc702=_0x2bc14e[_0x536d62(0xc0)]()[_0x536d62(0x18c)][_0x536d62(0xa2)][_0x536d62(0x7f)](),_0x279377=[];let _0x232d33=_0x495131,_0x1a114e=_0x124a29;for(let _0xaa03d1=0x0;_0xaa03d1<_0x1bc702[_0x536d62(0x101)];_0xaa03d1++){const _0x4584b5=_0x232d33[_0x536d62(0x1c1)]-_0x1bc702[_0xaa03d1];_0x279377[_0xaa03d1]=_0x1a114e[_0x536d62(0x1c1)]-_0x4584b5,_0x232d33=_0x232d33[_0x536d62(0x12e)](_0x1bc702[_0xaa03d1]),_0x1a114e=_0x1a114e[_0x536d62(0x12e)](_0x279377[_0xaa03d1]);}const _0x2cfc28=_0x58d5ea[_0x536d62(0x15d)][_0x536d62(0x142)](_0x58d5ea[_0x536d62(0x15d)][_0x536d62(0x1ce)](_0x124a29,_0x109d12),_0x58d5ea[_0x536d62(0x15d)][_0x536d62(0x1ce)](_0x124a29,_0x279377)),_0x20fca9=_0x124a29[_0x536d62(0xe9)](0x0)[_0x536d62(0x1a1)](_0x30bdda),_0x4c4d03=Array[_0x536d62(0x124)](_0x4873a8[_0x536d62(0xe1)]())[_0x536d62(0x1c7)](_0x1ed986=>_0x1ed986[_0x536d62(0x1a1)](_0x30bdda)==_0x20fca9)[_0x536d62(0x12c)](),_0x4dbb98=_0x2cfc28[_0x536d62(0xb5)][_0x536d62(0xa2)][_0x536d62(0x7f)](),_0x1d053d=_0x2cfc28[_0x536d62(0x18c)][_0x536d62(0xa2)][_0x536d62(0x7f)]();_0x4dbb98[0x0]=_0x4c4d03[0x0]+_0x4dbb98[0x0],_0x1d053d[0x0]=_0x4c4d03[0x0]+_0x1d053d[0x0];let _0x34546c=_0x58d5ea[_0x536d62(0x15d)][_0x536d62(0x142)](_0x58d5ea[_0x536d62(0x15d)][_0x536d62(0x1ce)](_0x58d5ea[_0x536d62(0x15d)][_0x536d62(0x1a8)][_0x536d62(0x19e)](),_0x4dbb98),_0x58d5ea[_0x536d62(0x15d)][_0x536d62(0x1ce)](_0x58d5ea[_0x536d62(0x15d)][_0x536d62(0x1a8)][_0x536d62(0x19e)](),_0x1d053d));const _0x183339=_0x58d5ea[_0x536d62(0x15d)][_0x536d62(0x1a8)][_0x536d62(0xf4)][_0x536d62(0x8f)](_0x1fd7c7[_0x536d62(0xa0)]);for(const _0x1eadf6 of _0x183339)_0x34546c=_0x29e4f1[_0x536d62(0x1b4)](_0x34546c[_0x536d62(0xa4)](_0x1eadf6));return{'range':_0x34546c,'currentIndex':_0x5ccc58};}[_0x25bc84(0x10d)](_0x2a6b38){const _0x36572f=_0x25bc84;if(!_0x2a6b38[_0x36572f(0x187)][_0x36572f(0x11c)](_0x36572f(0xc3)))return;const _0x117779=_0x2a6b38[_0x36572f(0x1bd)][_0x36572f(0x19d)](_0x36572f(0x135)),_0x24280e=_0x2a6b38[_0x36572f(0x1bd)][_0x36572f(0x19d)](_0x36572f(0x111));this[_0x36572f(0x15c)](_0x117779,_0x36572f(0x156),(_0x1c7eb9,_0x4e86b6,_0x1f698f)=>{const _0x5a7928=_0x36572f,_0x5e4f10=this[_0x5a7928(0x153)][_0x5a7928(0x19d)](_0x4e86b6);if(!_0x5e4f10)return;const _0x5bc39d=this[_0x5a7928(0xff)][_0x5a7928(0xd9)](_0x5e4f10[_0x5a7928(0x9d)])[_0x5a7928(0x1cb)](_0x5e4f10[_0x5a7928(0x1ab)]);_0x5e4f10[_0x5a7928(0x1a4)][_0x5a7928(0x1db)](_0x57ad96=>_0x5bc39d[_0x5a7928(0x8a)](_0x57ad96,_0x5a7928(0x17e))),this[_0x5a7928(0x153)][_0x5a7928(0x159)](_0x4e86b6),this[_0x5a7928(0x153)][_0x5a7928(0xf2)](_0x1f698f,_0x5e4f10);}),this[_0x36572f(0x15c)](_0x24280e,_0x36572f(0x156),(_0x1f8345,_0x92ca81,_0x291150)=>{const _0x4f584f=_0x36572f,_0x4c7030=this[_0x4f584f(0x153)][_0x4f584f(0x19d)](_0x92ca81);if(!_0x4c7030)return;const _0x1b2eb2=this[_0x4f584f(0xff)][_0x4f584f(0xd9)](_0x4c7030[_0x4f584f(0x9d)])[_0x4f584f(0x1cb)](_0x4c7030[_0x4f584f(0x1ab)]);_0x4c7030[_0x4f584f(0x1a4)][_0x4f584f(0x1db)](_0x22f893=>_0x1b2eb2[_0x4f584f(0x8a)](_0x22f893,_0x4f584f(0x171))),this[_0x4f584f(0x153)][_0x4f584f(0x159)](_0x92ca81),this[_0x4f584f(0x153)][_0x4f584f(0xf2)](_0x291150,_0x4c7030);});}async[_0x25bc84(0x1b9)](_0x2c2f03){const _0x471ae4=_0x25bc84;this[_0x471ae4(0xbe)][_0x471ae4(0x187)][_0x471ae4(0x19d)](_0x1baf23)[_0x471ae4(0xfb)](),this[_0x471ae4(0x174)][_0x471ae4(0x81)](_0x471ae4(0xdc)),this[_0x471ae4(0x174)][_0x471ae4(0x1da)](!0x0),await this[_0x471ae4(0xbd)]();try{await this[_0x471ae4(0x13a)][_0x471ae4(0x13e)](_0x2c2f03)[_0x471ae4(0xcf)](),await this[_0x471ae4(0x17c)](_0x2c2f03),this[_0x471ae4(0x1a0)]('\x20');const {sessionId:_0x248fbb}=this[_0x471ae4(0x170)][_0x471ae4(0x1dc)]();await this[_0x471ae4(0xff)][_0x471ae4(0xe4)](_0x2c2f03,_0x248fbb),this[_0x471ae4(0xff)][_0x471ae4(0x15a)]()&&this[_0x471ae4(0xff)][_0x471ae4(0xdb)](_0x20a620(this[_0x471ae4(0xbe)][_0x471ae4(0xd3)],_0x471ae4(0x123)));}catch(_0x3fa17e){this[_0x471ae4(0x174)][_0x471ae4(0x166)]({'errorMessage':_0x20a620(this[_0x471ae4(0xbe)][_0x471ae4(0xd3)],_0x471ae4(0x167)),'id':_0x2c2f03}),this[_0x471ae4(0x158)](new _0x2aea12(_0x471ae4(0xc2),this,{'error':_0x3fa17e}));}finally{this[_0x471ae4(0xbe)][_0x471ae4(0x187)][_0x471ae4(0x19d)](_0x406009)[_0x471ae4(0x199)][_0x471ae4(0x139)](_0x471ae4(0xa9)),this[_0x471ae4(0x174)][_0x471ae4(0xe0)](),this[_0x471ae4(0x174)][_0x471ae4(0x81)](_0x471ae4(0x192)),this[_0x471ae4(0x174)][_0x471ae4(0x1da)](!0x1);}}[_0x25bc84(0x129)](_0x1d3648){const _0x26e877=_0x25bc84;this[_0x26e877(0xff)]['id']===_0x1d3648&&this[_0x26e877(0x17c)]();}async[_0x25bc84(0xee)](){const _0x2a2215=_0x25bc84,_0xda6861=this[_0x2a2215(0x170)][_0x2a2215(0x1a2)]();this[_0x2a2215(0xff)]?.[_0x2a2215(0x86)](_0xda6861),this[_0x2a2215(0xff)]?.[_0x2a2215(0xdb)](_0x20a620(this[_0x2a2215(0xbe)][_0x2a2215(0xd3)],_0x2a2215(0x123)));}[_0x25bc84(0x14a)](){const _0xfffd41=_0x25bc84;this[_0xfffd41(0xff)]?.[_0xfffd41(0x8b)]();}[_0x25bc84(0xbb)](){const _0x4c12e4=_0x25bc84;this[_0x4c12e4(0x174)][_0x4c12e4(0xbb)]();}async[_0x25bc84(0xb7)](){const _0x220e74=_0x25bc84;await this[_0x220e74(0x17c)]();}async[_0x25bc84(0x184)]({message:_0x4ce81c,quickActionData:_0x401ba3}){const _0x5788c8=_0x25bc84;await this[_0x5788c8(0x162)]({'userMessage':_0x4ce81c,'quickActionData':_0x401ba3});}[_0x25bc84(0x79)](){const _0x33d2ae=_0x25bc84,_0x226d6b=this[_0x33d2ae(0xbe)][_0x33d2ae(0x16a)][_0x33d2ae(0x19d)](_0x33d2ae(0x14b));if(!_0x226d6b)throw new _0x2aea12(_0x33d2ae(0x1bc),this);return _0x226d6b;}async[_0x25bc84(0x17c)](_0x2763fd){const _0x281b72=_0x25bc84;try{this[_0x281b72(0x174)][_0x281b72(0x1be)](),await this[_0x281b72(0x19c)](_0x2763fd);}catch(_0x39076e){this[_0x281b72(0x174)][_0x281b72(0x166)]({'errorMessage':_0x20a620(this[_0x281b72(0xbe)][_0x281b72(0xd3)],_0x281b72(0x1cd)),'id':_0x2763fd||_0x2df6a6()}),console[_0x281b72(0x164)](_0x39076e),this[_0x281b72(0xff)]=void 0x0,this[_0x281b72(0x174)][_0x281b72(0x163)]();}}async[_0x25bc84(0x19c)](_0x1cec4e){const _0x4aba08=_0x25bc84,_0x1feec1=this[_0x4aba08(0xbe)][_0x4aba08(0x187)][_0x4aba08(0x19d)](_0x1baf23);let _0xeda8d0;_0x1feec1[_0x4aba08(0xf0)]&&_0x1feec1[_0x4aba08(0xfb)](),_0x1cec4e||!this[_0x4aba08(0xff)]?_0xeda8d0=this[_0x4aba08(0xbe)][_0x4aba08(0x16a)][_0x4aba08(0x19d)](_0x4aba08(0x1d4)):this[_0x4aba08(0x174)][_0x4aba08(0x1aa)]&&(_0xeda8d0=this[_0x4aba08(0xff)][_0x4aba08(0x99)]['id']),await this[_0x4aba08(0xbd)]();const _0x292df8=this[_0x4aba08(0x79)](),_0xa332ba=_0x1cec4e||_0x2df6a6();this[_0x4aba08(0xff)]=new _0x83be58({'connector':this[_0x4aba08(0x13a)],'chatModels':this[_0x4aba08(0x12d)],'selectedModelId':_0xeda8d0,'conversationId':_0xa332ba,'group':_0x292df8,'getEditor':()=>_0x27a01b(this[_0x4aba08(0xbe)])}),this[_0x4aba08(0xff)]['on'](_0x4aba08(0x17d),(_0x2b3941,_0x1fb410)=>{const _0x4fc44f=_0x4aba08;this[_0x4fc44f(0x174)][_0x4fc44f(0x106)](_0x1fb410),this[_0x4fc44f(0x174)][_0x4fc44f(0xb9)](),this[_0x4fc44f(0x174)][_0x4fc44f(0x7a)](),this[_0x4fc44f(0x174)][_0x4fc44f(0x1a9)](),_0x1cec4e||(this[_0x4fc44f(0x174)][_0x4fc44f(0xd5)](),this[_0x4fc44f(0xff)]?.[_0x4fc44f(0xdb)](_0x20a620(this[_0x4fc44f(0xbe)][_0x4fc44f(0xd3)],_0x4fc44f(0x123))));}),this[_0x4aba08(0xff)]['on'](_0x4aba08(0x157),(_0x5bec91,_0x126f0c)=>{const _0x4f99d0=_0x4aba08;this[_0x4f99d0(0x174)][_0x4f99d0(0x10e)](_0x126f0c[_0x4f99d0(0x14d)]);}),this[_0x4aba08(0xff)]['on'](_0x4aba08(0x177),(_0x324607,_0xb1a284)=>{const _0x942005=_0x4aba08;this[_0x942005(0x174)][_0x942005(0x77)](_0xb1a284);}),this[_0x4aba08(0xff)]['on'](_0x4aba08(0x1c8),()=>{const _0xf9f7b5=_0x4aba08;this[_0xf9f7b5(0x174)][_0xf9f7b5(0xb4)]({'isWebSearchEnabled':!0x0,'isReasoningEnabled':!0x1});}),this[_0x4aba08(0xff)]['on'](_0x4aba08(0x10a),()=>{const _0x24d33c=_0x4aba08;this[_0x24d33c(0x174)][_0x24d33c(0xb4)]({'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x0});}),this[_0x4aba08(0xff)]['on'](_0x4aba08(0x191),(_0x23f801,_0x11206c)=>{const _0x1a613e=_0x4aba08;this[_0x1a613e(0x174)][_0x1a613e(0x7e)](_0x11206c,{'isWebSearchEnabled':!0x0,'isReasoningEnabled':!0x1});}),this[_0x4aba08(0xff)]['on'](_0x4aba08(0x97),(_0x5ef2d7,_0x1efd5a)=>{const _0x121001=_0x4aba08;this[_0x121001(0x174)][_0x121001(0x7e)](_0x1efd5a,{'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x0});}),this[_0x4aba08(0xff)]['on'](_0x4aba08(0xa5),()=>{const _0x322acf=_0x4aba08;this[_0x322acf(0x174)][_0x322acf(0x180)]();}),this[_0x4aba08(0xff)]['on'](_0x4aba08(0x1b7),async()=>{const _0x471db4=_0x4aba08;await this[_0x471db4(0x174)][_0x471db4(0x1a5)]();}),this[_0x4aba08(0xff)]['on'](_0x4aba08(0x116),(_0x23beb1,_0x26e623)=>{const _0x15984d=_0x4aba08;this[_0x15984d(0x174)][_0x15984d(0x10c)](_0x26e623['id']);}),this[_0x4aba08(0xff)]['on'](_0x4aba08(0xfc),(_0x236ab3,_0x469a9b,_0x3f7817)=>{const _0x242624=_0x4aba08;this[_0x242624(0x1a0)](_0x469a9b,_0x3f7817);}),this[_0x4aba08(0xff)]['on'](_0x4aba08(0x160),(_0x40397f,_0x519e26)=>{const _0x21a175=_0x4aba08;_0x21a175(0x9e)===_0x519e26[_0x21a175(0x1d3)]?this[_0x21a175(0x174)][_0x21a175(0xfd)](_0x519e26):this[_0x21a175(0x174)][_0x21a175(0x96)](_0x519e26);}),this[_0x4aba08(0xff)]['on'](_0x4aba08(0x1df),async(_0x46c5bd,_0xd4c057)=>{const _0xf1850c=_0x4aba08;await this[_0xf1850c(0x182)]({'reply':_0xd4c057});}),this[_0x4aba08(0xff)]['on'](_0x4aba08(0x1d6),(_0x2f682b,{reply:_0x2ce137,index:_0x2a539d,state:_0x1cf88e})=>{const _0x7c524d=_0x4aba08;this[_0x7c524d(0x174)][_0x7c524d(0x13b)]({'id':_0x2ce137['id'],'index':_0x2a539d,'state':_0x1cf88e});}),this[_0x4aba08(0xff)]['on'](_0x4aba08(0x110),(_0x24af29,_0x4f7c4a)=>{const _0x1aef33=_0x4aba08;if(this[_0x1aef33(0x174)][_0x1aef33(0x15b)](_0x4f7c4a[_0x1aef33(0x1c2)],_0x4f7c4a[_0x1aef33(0xf5)]),_0x1aef33(0xf1)===_0x4f7c4a[_0x1aef33(0x1c2)][_0x1aef33(0x1d3)]){const _0x100886=[..._0x27a01b(this[_0x1aef33(0xbe)])[_0x1aef33(0x15d)][_0x1aef33(0x1a8)][_0x1aef33(0xf1)][_0x1aef33(0xab)]()];this[_0x1aef33(0x170)][_0x1aef33(0x119)](_0x100886,_0x1aef33(0x140)+this[_0x1aef33(0xff)]?.['id']);}}),this[_0x4aba08(0xff)]['on'](_0x4aba08(0x173),(_0x5232ba,_0x49995f)=>{const _0x515039=_0x4aba08;this[_0x515039(0x174)][_0x515039(0xed)](_0x49995f[_0x515039(0x18b)]),_0x515039(0xad)==_0x49995f[_0x515039(0x18b)]&&this[_0x515039(0x14a)](),_0x515039(0xf1)===_0x49995f[_0x515039(0x1d3)]&&this[_0x515039(0x170)][_0x515039(0x87)](_0x515039(0x140)+this[_0x515039(0xff)]?.['id']);}),this[_0x4aba08(0xff)]['on'](_0x4aba08(0x19f),(_0x29ea62,_0x52f3ef)=>{const _0x3ab787=_0x4aba08;this[_0x3ab787(0x174)][_0x3ab787(0x13c)](_0x52f3ef[_0x3ab787(0x1c2)][_0x3ab787(0x18b)],_0x52f3ef[_0x3ab787(0xf5)]);}),this[_0x4aba08(0xff)]['on'](_0x4aba08(0xea),(_0x514603,_0x287450)=>{const _0x2c93d8=_0x4aba08;this[_0x2c93d8(0x174)][_0x2c93d8(0x1de)](_0x287450[_0x2c93d8(0x131)]);}),this[_0x4aba08(0xff)]['on'](_0x4aba08(0xe7),(_0x4f36a7,_0x3e4d4d)=>{const _0x3b286b=_0x4aba08;this[_0x3b286b(0x174)][_0x3b286b(0x12b)](_0x3e4d4d[_0x3b286b(0x1e0)]);}),this[_0x4aba08(0xff)]['on'](_0x4aba08(0x12f),(_0x8343cd,_0x1a5bb4)=>{const _0x5e74f7=_0x4aba08;this[_0x5e74f7(0x174)][_0x5e74f7(0x1a3)](_0x1a5bb4[_0x5e74f7(0x18f)],_0x1a5bb4[_0x5e74f7(0x132)],_0x1a5bb4[_0x5e74f7(0x1d2)],_0x1a5bb4[_0x5e74f7(0x75)]);}),this[_0x4aba08(0xff)]['on'](_0x4aba08(0xf6),(_0x23b7f7,_0x2fe49c)=>{const _0x5c57af=_0x4aba08;this[_0x5c57af(0x174)][_0x5c57af(0xd6)](_0x2fe49c[_0x5c57af(0x18f)],_0x2fe49c[_0x5c57af(0x1a6)],_0x2fe49c[_0x5c57af(0x100)]);}),this[_0x4aba08(0xff)]['on'](_0x4aba08(0x117),(_0x1864f7,_0x437437)=>{const _0x1074ee=_0x4aba08;this[_0x1074ee(0x174)][_0x1074ee(0x181)](_0x437437);}),this[_0x4aba08(0xff)]['on'](_0x4aba08(0xa7),(_0xb67dc5,_0x317c5e)=>{const _0x258f2f=_0x4aba08;this[_0x258f2f(0x174)][_0x258f2f(0x193)](_0x317c5e[_0x258f2f(0x99)],_0x317c5e[_0x258f2f(0xaf)]);}),this[_0x4aba08(0xff)]['on'](_0x4aba08(0x164),(_0x4e311f,{error:_0x222c11,interactionId:_0x120d3f,fileName:_0x1a7e4f,url:_0x4b0722,sourceId:_0x27e404,sourceLabel:_0x44f432})=>{const _0xf06c14=_0x4aba08,_0x2062aa=_0x120d3f?_0x120d3f+':'+_0x2df6a6():_0x2df6a6();_0x222c11[_0xf06c14(0x17a)][_0xf06c14(0x197)](_0xf06c14(0x107))?this[_0xf06c14(0x174)][_0xf06c14(0x189)]({'staticMessage':_0x20a620(this[_0xf06c14(0xbe)][_0xf06c14(0xd3)],_0xf06c14(0x130)),'id':_0x2062aa}):_0x222c11[_0xf06c14(0x17a)][_0xf06c14(0x197)](_0xf06c14(0xae))||_0x222c11[_0xf06c14(0x17a)][_0xf06c14(0x197)](_0xf06c14(0x155))?(this[_0xf06c14(0x174)][_0xf06c14(0x166)]({'errorMessage':_0x20a620(this[_0xf06c14(0xbe)][_0xf06c14(0xd3)],_0xf06c14(0x1cd)),'id':_0x2062aa}),this[_0xf06c14(0x158)](_0x222c11)):_0x222c11[_0xf06c14(0x17a)][_0xf06c14(0x197)](_0xf06c14(0x176))?this[_0xf06c14(0x174)][_0xf06c14(0x166)]({'errorMessage':_0x20a620(this[_0xf06c14(0xbe)][_0xf06c14(0xd3)],_0xf06c14(0x1b0),_0x1a7e4f),'id':_0x2062aa}):_0x222c11[_0xf06c14(0x17a)][_0xf06c14(0x197)](_0xf06c14(0x186))?this[_0xf06c14(0x174)][_0xf06c14(0x166)]({'errorMessage':_0x20a620(this[_0xf06c14(0xbe)][_0xf06c14(0xd3)],_0xf06c14(0x113),_0x4b0722),'id':_0x2062aa}):_0x222c11[_0xf06c14(0x17a)][_0xf06c14(0x197)](_0xf06c14(0x84))?this[_0xf06c14(0x174)][_0xf06c14(0x166)]({'errorMessage':_0x20a620(this[_0xf06c14(0xbe)][_0xf06c14(0xd3)],_0xf06c14(0x80)),'id':_0x2062aa}):_0x222c11[_0xf06c14(0x17a)][_0xf06c14(0x197)](_0xf06c14(0x14f))?this[_0xf06c14(0x174)][_0xf06c14(0x166)]({'errorMessage':_0x20a620(this[_0xf06c14(0xbe)][_0xf06c14(0xd3)],_0xf06c14(0x137)),'id':_0x2062aa}):_0x222c11[_0xf06c14(0x17a)][_0xf06c14(0x197)](_0xf06c14(0x1d9))?(_0x27e404&&this[_0xf06c14(0x174)][_0xf06c14(0x133)](_0x27e404),this[_0xf06c14(0x174)][_0xf06c14(0x166)]({'errorMessage':_0x20a620(this[_0xf06c14(0xbe)][_0xf06c14(0xd3)],_0xf06c14(0xef),_0x44f432||_0xf06c14(0x132)),'id':_0x2062aa}),this[_0xf06c14(0x158)](_0x222c11)):_0x222c11[_0xf06c14(0x17a)][_0xf06c14(0x197)](_0xf06c14(0x15f))?(this[_0xf06c14(0x174)][_0xf06c14(0x166)]({'errorMessage':_0x20a620(this[_0xf06c14(0xbe)][_0xf06c14(0xd3)],_0xf06c14(0x112)),'id':_0x2062aa}),this[_0xf06c14(0x158)](_0x222c11)):_0x222c11[_0xf06c14(0x17a)][_0xf06c14(0x197)](_0xf06c14(0x118))?(this[_0xf06c14(0x174)][_0xf06c14(0x166)]({'errorMessage':_0x20a620(this[_0xf06c14(0xbe)][_0xf06c14(0xd3)],_0xf06c14(0xf7)),'id':_0x2062aa}),this[_0xf06c14(0x158)](_0x222c11)):_0x222c11[_0xf06c14(0x17a)][_0xf06c14(0x197)](_0xf06c14(0x11e))?(this[_0xf06c14(0x174)][_0xf06c14(0x166)]({'errorMessage':_0x20a620(this[_0xf06c14(0xbe)][_0xf06c14(0xd3)],_0xf06c14(0x91)),'id':_0x2062aa}),this[_0xf06c14(0x158)](_0x222c11)):_0x222c11[_0xf06c14(0x17a)][_0xf06c14(0x197)](_0xf06c14(0xd4))?(this[_0xf06c14(0x174)][_0xf06c14(0x166)]({'errorMessage':_0x20a620(this[_0xf06c14(0xbe)][_0xf06c14(0xd3)],_0xf06c14(0x1ac)),'id':_0x2062aa}),this[_0xf06c14(0x158)](_0x222c11)):_0x222c11[_0xf06c14(0x17a)][_0xf06c14(0x197)](_0xf06c14(0x18d))?(this[_0xf06c14(0x174)][_0xf06c14(0x166)]({'errorMessage':_0x20a620(this[_0xf06c14(0xbe)][_0xf06c14(0xd3)],_0xf06c14(0xd0)),'id':_0x2062aa}),this[_0xf06c14(0x158)](_0x222c11)):_0x222c11[_0xf06c14(0x17a)][_0xf06c14(0x197)](_0xf06c14(0x1ad))?(this[_0xf06c14(0x174)][_0xf06c14(0x166)]({'errorMessage':_0x20a620(this[_0xf06c14(0xbe)][_0xf06c14(0xd3)],_0xf06c14(0xe6)),'id':_0x2062aa}),this[_0xf06c14(0x158)](_0x222c11)):(this[_0xf06c14(0x174)][_0xf06c14(0x166)]({'errorMessage':_0x20a620(this[_0xf06c14(0xbe)][_0xf06c14(0xd3)],_0xf06c14(0x10f)),'id':_0x2062aa}),this[_0xf06c14(0x158)](_0x222c11));}),await this[_0x4aba08(0xff)][_0x4aba08(0x19a)](this[_0x4aba08(0xbe)][_0x4aba08(0x16a)][_0x4aba08(0x19d)](_0x4aba08(0x16e))),_0x1cec4e||await this[_0x4aba08(0xff)][_0x4aba08(0xb5)]();}async[_0x25bc84(0x162)]({userMessage:_0x53ea46,quickActionData:_0x5114e0}){const _0x44099d=_0x25bc84;if(!this[_0x44099d(0xff)])throw new _0x2aea12(_0x44099d(0x82));this[_0x44099d(0xff)][_0x44099d(0xdf)]()&&await this[_0x44099d(0xff)][_0x44099d(0x147)](this[_0x44099d(0x170)][_0x44099d(0x1dc)]()),this[_0x44099d(0xff)]['id']&&this[_0x44099d(0xff)][_0x44099d(0x1b5)]&&await this[_0x44099d(0xff)][_0x44099d(0xda)]({'userMessage':_0x53ea46,'quickActionData':_0x5114e0}),this[_0x44099d(0xba)]();}[_0x25bc84(0xba)](){const _0x4553e3=_0x25bc84,_0x4573f6=_0x27a01b(this[_0x4553e3(0xbe)])[_0x4553e3(0x15d)],_0x3ecdd6=Array[_0x4553e3(0x124)](_0x4573f6[_0x4553e3(0xb8)][_0x4553e3(0x1c6)](_0x332dfc));_0x4573f6[_0x4553e3(0x134)](_0x16ecf1=>{const _0x4d17e5=_0x4553e3;_0x3ecdd6[_0x4d17e5(0x1db)](_0x4077b6=>_0x16ecf1[_0x4d17e5(0x120)](_0x4077b6));});}[_0x25bc84(0x175)](){const _0x1ba488=_0x25bc84;console[_0x1ba488(0xb3)](_0x1ba488(0x151));}[_0x25bc84(0x17b)](_0x561610){const _0x1286f3=_0x25bc84;this[_0x1286f3(0x174)][_0x1286f3(0x16f)](_0x561610);}[_0x25bc84(0x158)](_0x104186){const _0x17b556=_0x25bc84;_0x37699d(_0x104186[_0x17b556(0x17a)]);}[_0x25bc84(0x1bf)](_0xb5ae36){const _0x45fbea=_0x25bc84;this[_0x45fbea(0xff)]?.[_0x45fbea(0xcd)](_0xb5ae36);}[_0x25bc84(0x8c)](){const _0x37fd74=_0x25bc84;this[_0x37fd74(0xff)]?.[_0x37fd74(0x7c)]();}[_0x25bc84(0x154)](){const _0x4456c4=_0x25bc84;this[_0x4456c4(0xff)]?.[_0x4456c4(0xd2)]();}[_0x25bc84(0x149)](_0x109cad){const _0x3f1d37=_0x25bc84,[_0x3d2742,_0x3cb073]=_0x109cad[_0x3f1d37(0x16c)](':'),_0x4810e9=this[_0x3f1d37(0xff)][_0x3f1d37(0xd9)](_0x3d2742),_0x2cb25=_0x4810e9[_0x3f1d37(0x1cb)](_0x3cb073);return{'interaction':_0x4810e9,'reply':_0x2cb25};}[_0x25bc84(0x7d)](_0x7d3e8e,_0x13ba45=!0x1){const _0x3346fb=_0x25bc84,_0x16ac3a=_0x27a01b(this[_0x3346fb(0xbe)]),_0x297230={'target':_0x16ac3a[_0x3346fb(0x10b)][_0x3346fb(0x199)][_0x3346fb(0x13f)][_0x3346fb(0x1c4)](_0x16ac3a[_0x3346fb(0x10b)][_0x3346fb(0x1b8)][_0x3346fb(0x1b6)](_0x7d3e8e)),'viewportOffset':{'top':0x96,'left':0x0,'bottom':0x32,'right':0x0},'ancestorOffset':0x14,'alignToTop':_0x13ba45};_0x13ba45&&(_0x297230[_0x3346fb(0xc6)]=!0x0),_0x1084ad(_0x297230);}[_0x25bc84(0x1a0)](_0x414f2a,_0x2ca332=!0x1){const _0x4c1114=_0x25bc84;this[_0x4c1114(0x174)][_0x4c1114(0xfc)](_0x414f2a||_0x20a620(this[_0x4c1114(0xbe)][_0x4c1114(0xd3)],_0x4c1114(0x18a)),_0x2ca332);}async[_0x25bc84(0x182)]({reply:_0x56841f,renderingStrategy:_0x3cf403}){const _0x5dd8f2=_0x25bc84,{id:_0x25f494,isDone:_0x463693,type:_0x1cd38d,parsedContent:_0x3eba38}=_0x56841f;if(_0x5dd8f2(0x7b)===_0x1cd38d){const _0x3421ba=_0x56841f[_0x5dd8f2(0x8e)]({'showDiff':this[_0x5dd8f2(0x174)][_0x5dd8f2(0x8d)]});await this[_0x5dd8f2(0x174)][_0x5dd8f2(0xc8)]({'id':_0x25f494,'parts':_0x3421ba,'renderingStrategy':_0x3cf403,'isDone':_0x463693});}else _0x5dd8f2(0x9e)===_0x1cd38d&&await this[_0x5dd8f2(0x174)][_0x5dd8f2(0x1b3)]({'id':_0x25f494,'parsedContent':_0x3eba38,'renderingStrategy':_0x3cf403,'isDone':_0x463693});_0x463693&&_0x56841f[_0x5dd8f2(0xa3)][_0x5dd8f2(0x101)]>0x0&&this[_0x5dd8f2(0x174)][_0x5dd8f2(0xd1)](_0x25f494,_0x56841f[_0x5dd8f2(0xa3)]);}async[_0x25bc84(0xbd)](){const _0x4ba9db=_0x25bc84,_0x29cba1=this[_0x4ba9db(0xff)]?.[_0x4ba9db(0xb0)];_0x29cba1&&(_0x29cba1[_0x4ba9db(0x17f)](),this[_0x4ba9db(0x174)][_0x4ba9db(0x172)](_0x29cba1));}async[_0x25bc84(0x194)](){const _0x459f1d=_0x25bc84,_0x1caf60=this[_0x459f1d(0xff)]?.[_0x459f1d(0xb0)];if(_0x1caf60){for await(const _0xd70ba6 of _0x1caf60[_0x459f1d(0x19b)])await this[_0x459f1d(0x182)]({'reply':_0xd70ba6,'renderingStrategy':_0x459f1d(0xdc)});}}[_0x25bc84(0x109)](_0x251841){const _0x2bdf55=_0x25bc84,_0x1f1b51={'positiveCount':_0x251841[_0x2bdf55(0xd7)][_0x2bdf55(0xbf)](_0x370e4b=>_0x2bdf55(0x171)===_0x370e4b[_0x2bdf55(0x143)])[_0x2bdf55(0x101)],'totalCount':_0x251841[_0x2bdf55(0xd7)][_0x2bdf55(0x101)],'modificationId':_0x251841['id']},_0x23eeb3=this[_0x2bdf55(0xff)][_0x2bdf55(0xd9)](_0x251841[_0x2bdf55(0x9d)])[_0x2bdf55(0x9b)];this[_0x2bdf55(0x13a)][_0x2bdf55(0xe2)](this[_0x2bdf55(0xff)]['id'],_0x23eeb3,_0x1f1b51);}}
23
+ const _0xf7bdc8=_0x2f7d;function _0x2f7d(_0x231b9e,_0x46d1e2){const _0x4829c5=_0x4829();return _0x2f7d=function(_0x2f7d67,_0x338f95){_0x2f7d67=_0x2f7d67-0x15f;let _0x226b14=_0x4829c5[_0x2f7d67];return _0x226b14;},_0x2f7d(_0x231b9e,_0x46d1e2);}(function(_0x130ca5,_0x5ddc64){const _0x53a765=_0x2f7d,_0x17c463=_0x130ca5();while(!![]){try{const _0x4e861d=-parseInt(_0x53a765(0x23a))/0x1*(-parseInt(_0x53a765(0x28e))/0x2)+-parseInt(_0x53a765(0x19c))/0x3*(-parseInt(_0x53a765(0x2bd))/0x4)+-parseInt(_0x53a765(0x1d4))/0x5+-parseInt(_0x53a765(0x22f))/0x6*(parseInt(_0x53a765(0x1b7))/0x7)+-parseInt(_0x53a765(0x283))/0x8*(-parseInt(_0x53a765(0x21a))/0x9)+-parseInt(_0x53a765(0x1c9))/0xa+-parseInt(_0x53a765(0x23e))/0xb*(parseInt(_0x53a765(0x18b))/0xc);if(_0x4e861d===_0x5ddc64)break;else _0x17c463['push'](_0x17c463['shift']());}catch(_0x59a475){_0x17c463['push'](_0x17c463['shift']());}}}(_0x4829,0x54da7));import{ContextPlugin as _0x168ff1,Editor as _0x2b4142}from'ckeditor5/src/core.js';import{CKEditorError as _0x217c5a,logError as _0x39c475,scrollViewportToShowTarget as _0x145ff8,uid as _0x532b26}from'ckeditor5/src/utils.js';import{AIConnector as _0xb0fd74}from'../aicore/aiconnector.js';import{AITabs as _0x4f4427}from'../aitabs/aitabs.js';import{AIChatConversation as _0x208493}from'./model/aichatconversation.js';import{getTranslation as _0x5f46ca}from'../aicore/utils/common-translations.js';import{AI_VISUAL_SELECTION_MARKER_NAME as _0x3ca273}from'../aicore/aiediting.js';import{AI_REPLY_ACTIONS as _0x419f44}from'./ui/feed/aichatfeedsuggestionitemactionsview.js';import{AIChatModels as _0x3dfc6a}from'./model/aichatmodels.js';import{getEditorFromContext as _0x554683}from'../aicore/utils/geteditorfromcontext.js';import{DocumentCompare as _0x53c37e,DATA_ID_MODEL_ATTRIBUTE as _0x230da6}from'ckeditor5-collaboration/src/collaboration-core.js';import{fixMarkerOperationOldRange as _0x5bcc09,getOperationsFromReply as _0x54130d}from'../aicore/utils/getoperationsfromreply.js';import{expandSelectionWithContext as _0x2ca72d,getMinimalSelection as _0x5be61d}from'../aicore/utils/getsuggestionpartsfromreply.js';import{ModelRange as _0xcfb78,_DetachOperation as _0x1a206a}from'ckeditor5/src/engine.js';import{findOne as _0x262c1,getAttribute as _0x3e07fb,serialize as _0x1c4235,Document as _0x48ab8a,findByAttribute as _0x405389}from'../aicore/utils/htmlparser.js';import{IconAI as _0x477ad5}from'@ckeditor/ckeditor5-icons';import{AISuggestionContainerView as _0x5e7af4}from'../aicore/ui/suggestioncontainer/aisuggestioncontainerview.js';import{AIBalloon as _0x20014a}from'../aiballoon/aiballoon.js';function _0x4829(){const _0xdb6dd3=['AI_CHAT_CONTEXT_UNABLE_TO_UPLOAD_URL','_aiChatUi','addFeedItemAIReply','uiId','contextItemAdded','_toggleWebSearch','ai-chat-conversation-not-found','batch','updateCurrentDocumentInContext','loadConversation','isDisabled','pluginName','undo','_toggleReasoning','change','resourceStateChanged','addFeedItemStaticMessage','version','ai-chat-context-unsupported-type','getConversation','AI_CHAT_CONTEXT_FORM_DATA_SIZE_LIMITS_EXCEEDED','interactionDestroyed','root','replyId','sendMessage','commands','_applyOperationsAsSuggestions','AI_CHAT_CONTEXT_CURRENT_DOCUMENT','listenTo','getMarkersGroup','_updateReplyContent','setIsUploadInProgress','contextItems','ai-chat-controller-mouse-over','isModelAvailable','error','get','unshift','2685684wIzNaV','add','set','messageId','capabilitiesUpdated','_flushLastInteractionUI','reasoningFinished','removeSelectionFromChatContext','AIChatUI','setConversationTitle','ai-chat-context-unsupported-file-type','text-delta','_aiEditing','collaboration.channelId','setChangeGroupState','removeFromContext','showFakeVisualSelection','init','ai-chat-invalid-request','getInteractionAndReplyById','closeSourceResourceBalloon','path','editing','interactionCreated','webSearchStarted','ai-chat-conversation-start-failed','ai-chat-controller-no-active-conversation','interactionStarted','setModel','context','_applySuggestion','contextItemRemoved','data','addSelectionToContext','mouseLeaveSuggestion','_getDocumentRangeForReplyChanges','findIndex','revert','query','startConversation','ready','getAttribute','getChild','isInContext','getTransformedByOperation','abortPromptStream','data-id','DocumentCompare','rootName','type','AI_CHAT_RESOURCE_LOAD_FAILED','dislike','editors','updateContent','sendUserMessage','AI_CHAT_INVALID_REQUEST','getPath','mapper','replyChangeGroupStateUpdated','ai-chat-resource-load-failed','5604aaPoWT','AIChatController','close','Showing\x20conversation\x20history...','cloneNode','addFeedInteractionHeader','toString','addFilesToContext','like','start','indexes','has','_handleStartConversation','isPremiumPlugin','modelSelected','outdated','isCurrentDocumentInContext','3YVtFjw','_removeAISelectionMarkers','toggleSuggestionDisplayMode','AI_CHAT_UNABLE_TO_LOAD_CONVERSATION','resizedTabs','pending','ai-chat-url-upload-failed','ai.chat.context','isOfficialPlugin','split','getOperations','scrollFeedToSuggestion','nextSibling','_removeFromContext','_integrateEditor','AI_CHAT_CONTEXT_UNABLE_TO_LOAD_RESOURCES','_showConversationHistory','resourceId','addResourceToContext','conversationInitialized','getChildAtOffset','getDocumentContext','domConverter','addContextOptionsChanged','delete','addFeedItemError','_scrollToSuggestionRange','1467445pqYIAV','dialogClosed','addFeedItemUserMessage','toggleReasoning','ai-chat-file-upload-failed','selectedModel','ai-chat-context-invalid-data','mouseOverSuggestion','updateFeedItemAIReplyContent','getReply','webSearchFinished','options','addFeedItemAISuggestion','state','setAddContextOptions','contextSent','AI_CHAT_CONTEXT_UNSUPPORTED_FILE_TYPE','resetMessageInput','366320wsoFKP','stopInteraction','enableControls','AI_CHAT_UNTITLED_CONVERSATION','fetchConversation','sourcePosition','documentContextContent','updateFeedItemAIReplySuggestionContent','updateFeedItemAIReplySources','changeGroups','end','3105085ysHzqN','showPrevious','find','isLoading','hasChanges','forEach','_createFromRanges','toggleLoadingSkeleton','AI_CHAT_CONTEXT_UNSUPPORTED_TYPE','sources','new','log','AIEditing','ai-chat-context-file-too-many-pages','applyOperation','maxOffset','push','AI_CHAT_CONTEXT_UNABLE_TO_UPLOAD_FILE','ai.chat.models.displayedModels','ai-chat-conversation-init-failed','_openBalloonFor','from','uid','removeMarker','stopListening','hideFakeVisualSelection','Undo','_insertSuggestion','setFeedItemRenderingStrategy','load','addFileToContext','interactionId','showDiff','startInteraction','handleUserInteraction','isOpen','locale','ai-no-track-changes','resetConversationTitle','loadSourceResources','reasoningStarted','requires','focusPromptInput','node','setLoadingMessage','ai.chat.models.defaultModelId','ai.availableReplyActions','content','baseVersion','addCurrentDocumentToContext','insertSuggestion','addOperation','full','interactionFinished','stop','AI_CHAT_GENERIC_ERROR','handleRemovedConversation','isCurrentDocumentInConversation','AIConnector','ai-chat-context-file-too-large','removed','createPositionAt','contextItemLoadingEnded','view','getGroupId','selection','Liked\x20response','getRoot','range','addSelectionToChatContext','446031GaKKDa','getDiff','resize','upsertAIChatRating','AI_CHAT_ABORTED_MESSAGE','replies','model','AI_CHAT_CONTEXT_FILE_TOO_LARGE','chat','sourceId','index','Disliked\x20response','filter','AI_BALLOON_HEADER_TITLE','startAutoScroll','accepted','activeConversation','activateTab','populateSourceResourceBalloon','markers','isDocumentOperation','6OkOMxw','resource','streaming','slice','selectModel','source','viewRangeToDom','addUrlToContext','document','getRanges','getSelectionText','19QziyxW','AI_CHAT_UNABLE_TO_START_CONVERSATION','removeSelectionFromContext','setIsMaximized','3014PKFlTH','changes','static','ai-chat-missing-channel-id','contextItem','ai-request-aborted','removeContextItem','updateCapabilities','rejectSuggestion','_setIsMaximized','clearPendingContextUI','rejected','_updateRatings','lastInteraction','_balloonShowDiff','AI_CHAT_CONTEXT_INVALID_DATA','plugins','getInteraction','TrackChanges','TrackChangesEditing','startsWith','_startConversationSafely','uploadProgressChanged','setConversationContext','$graveyard','alignToTop','sourceResourcesLoaded','applySuggestion','_logError','config','createPositionFromPath','_handleUIUserMessage','remove','ai-conversation-','setContextItemLoading','message','afterInit','howMany','replyContentUpdated','redo','isUploadInProgress','partIndex','_batchToChanges','finishInteraction','length','showNext','ai-chat-context-form-data-size-limits-exceeded','parse','updateResourceState','updateFeedItemAIReplySuggestionPartState','_aiChatModels','disableControls','_stopLastInteraction','_previewedChangeGroup','resources','ai-chat-source-resources-load-failed','open','showChangeInText','clearConversationContextUI','anchorId','createRange','marker','AI_CHAT_CONTEXT_FILE_TOO_MANY_PAGES','map','toggleWebSearch','updateConversationTitle','getDocumentData','replyCreated','_aiConnector','104YnMgCe','getFirstRange','setSelectedModel','isStarted','addContextItem','resizeTabs','addDocumentToContext','indexOf','getContentParts','createConversation','current-document','2854RmgUUu','children','history','main','toViewRange','AITabs','getChildren','modification-delta','removeFeedInteraction'];_0x4829=function(){return _0xdb6dd3;};return _0x4829();}export class AIChatController extends _0x168ff1{[_0xf7bdc8(0x2c9)];[_0xf7bdc8(0x282)];[_0xf7bdc8(0x298)];[_0xf7bdc8(0x270)];[_0xf7bdc8(0x268)]=new Map();[_0xf7bdc8(0x273)]=null;[_0xf7bdc8(0x24c)]=!0x1;static get[_0xf7bdc8(0x1fd)](){return[_0xb0fd74,_0x20014a,_0x53c37e];}static get[_0xf7bdc8(0x2a2)](){const _0x27835a=_0xf7bdc8;return _0x27835a(0x18c);}static get[_0xf7bdc8(0x1a4)](){return!0x0;}static get[_0xf7bdc8(0x198)](){return!0x0;}[_0xf7bdc8(0x160)](){const _0x40425e=_0xf7bdc8;this[_0x40425e(0x282)]=this[_0x40425e(0x16c)][_0x40425e(0x24e)][_0x40425e(0x2bb)](_0x40425e(0x20e)),this[_0x40425e(0x298)]=this[_0x40425e(0x16c)][_0x40425e(0x24e)][_0x40425e(0x2bb)](_0x40425e(0x2c5)),this[_0x40425e(0x2c9)]=this[_0x40425e(0x16c)][_0x40425e(0x24e)][_0x40425e(0x2bb)](_0x40425e(0x1e0)),this[_0x40425e(0x270)]=new _0x3dfc6a({'connector':this[_0x40425e(0x282)],'availableModels':this[_0x40425e(0x16c)][_0x40425e(0x25b)][_0x40425e(0x2bb)](_0x40425e(0x1e6)),'defaultModelId':this[_0x40425e(0x16c)][_0x40425e(0x25b)][_0x40425e(0x2bb)](_0x40425e(0x201))});const _0x31cb75=this[_0x40425e(0x16c)][_0x40425e(0x24e)][_0x40425e(0x2bb)](_0x40425e(0x293));this[_0x40425e(0x2b3)](this[_0x40425e(0x298)],_0x40425e(0x176),()=>{const _0x3e0953=_0x40425e;this[_0x3e0953(0x253)]();}),this[_0x40425e(0x2b3)](this[_0x40425e(0x298)],_0x40425e(0x185),(_0x443bcb,_0x51c2ab)=>{const _0x36592e=_0x40425e;this[_0x36592e(0x25d)]({'userMessage':_0x51c2ab});}),this[_0x40425e(0x2b3)](_0x31cb75,_0x40425e(0x1a0),(_0x25d2be,_0x4867b2)=>{const _0x31a7bf=_0x40425e;this[_0x31a7bf(0x247)](_0x4867b2);}),this[_0x40425e(0x2b3)](this[_0x40425e(0x298)],_0x40425e(0x288),()=>{const _0x23a4cb=_0x40425e;_0x31cb75[_0x23a4cb(0x21c)]();}),this[_0x40425e(0x2b3)](this[_0x40425e(0x298)],_0x40425e(0x17c),async()=>{const _0x3d96c9=_0x40425e;await this[_0x3d96c9(0x272)](),await this[_0x3d96c9(0x2c2)](),this[_0x3d96c9(0x2c4)]();}),this[_0x40425e(0x2b3)](this[_0x40425e(0x298)],_0x40425e(0x289),()=>{const _0x4ad5bc=_0x40425e;this[_0x4ad5bc(0x22a)]?.[_0x4ad5bc(0x205)](_0x5f46ca(this[_0x4ad5bc(0x16c)][_0x4ad5bc(0x1f8)],_0x4ad5bc(0x2b2)));}),this[_0x40425e(0x2b3)](this[_0x40425e(0x298)],_0x40425e(0x1f2),(_0x432a20,_0x433c44)=>{const _0x306cc0=_0x40425e;this[_0x306cc0(0x22a)]?.[_0x306cc0(0x192)](Array[_0x306cc0(0x1e9)](_0x433c44));}),this[_0x40425e(0x2b3)](this[_0x40425e(0x298)],_0x40425e(0x236),(_0x4a8e29,_0x188bc8)=>{const _0x29c4a7=_0x40425e;this[_0x29c4a7(0x22a)]?.[_0x29c4a7(0x236)](_0x188bc8);}),this[_0x40425e(0x2b3)](this[_0x40425e(0x298)],_0x40425e(0x1ae),(_0x5f07db,_0x1ef83e)=>{const _0x50f9ae=_0x40425e;this[_0x50f9ae(0x22a)]?.[_0x50f9ae(0x1ae)](_0x1ef83e[_0x50f9ae(0x234)],_0x1ef83e[_0x50f9ae(0x230)]);}),this[_0x40425e(0x2b3)](this[_0x40425e(0x298)],_0x40425e(0x244),(_0x4db313,_0x19b71c)=>{const _0x4c9a44=_0x40425e;this[_0x4c9a44(0x1a9)](_0x19b71c);}),this[_0x40425e(0x2b3)](this[_0x40425e(0x298)],_0x40425e(0x1fb),(_0x291351,_0x33b6e8)=>{const _0xe0c88d=_0x40425e;this[_0xe0c88d(0x22a)]?.[_0xe0c88d(0x1fb)](_0x33b6e8[_0xe0c88d(0x223)],_0x33b6e8[_0xe0c88d(0x175)],_0x33b6e8[_0xe0c88d(0x1ea)]);}),this[_0x40425e(0x2b3)](this[_0x40425e(0x298)],_0x40425e(0x27e),()=>{const _0x134267=_0x40425e;this[_0x134267(0x29c)]();}),this[_0x40425e(0x2b3)](this[_0x40425e(0x298)],_0x40425e(0x1ba),()=>{const _0x2a4198=_0x40425e;this[_0x2a4198(0x2a4)]();}),this[_0x40425e(0x2b3)](this[_0x40425e(0x298)],_0x40425e(0x233),(_0x4d8233,_0x10e86b)=>{const _0x2b2fa2=_0x40425e;this[_0x2b2fa2(0x22a)]?.[_0x2b2fa2(0x16b)](_0x10e86b);}),this[_0x40425e(0x2b3)](this[_0x40425e(0x298)],_0x40425e(0x193),(_0x3163bb,{replyId:_0x2f3fde})=>{const _0x23fa59=_0x40425e;console[_0x23fa59(0x1df)](_0x23fa59(0x216),_0x2f3fde);}),this[_0x40425e(0x2b3)](this[_0x40425e(0x298)],_0x40425e(0x182),(_0x596c95,{replyId:_0x19c6ab})=>{const _0x52c3b7=_0x40425e;console[_0x52c3b7(0x1df)](_0x52c3b7(0x225),_0x19c6ab);}),this[_0x40425e(0x2b3)](this[_0x40425e(0x298)],_0x40425e(0x206),(_0x2028dd,_0x49e962)=>{const _0x31b91a=_0x40425e;this[_0x31b91a(0x16c)][_0x31b91a(0x24e)][_0x31b91a(0x2bb)](_0x20014a)[_0x31b91a(0x18d)](),this[_0x31b91a(0x1ef)](_0x49e962);}),this[_0x40425e(0x2b3)](this[_0x40425e(0x298)],_0x40425e(0x277),(_0x1f5639,{replyId:_0x79e92,partIndex:_0x10f622})=>{const _0x36f926=_0x40425e;this[_0x36f926(0x24c)]=this[_0x36f926(0x298)][_0x36f926(0x1f4)],this[_0x36f926(0x1e8)](_0x79e92,_0x10f622);}),this[_0x40425e(0x2b3)](this[_0x40425e(0x298)],_0x40425e(0x1be),(_0x44d469,{replyId:_0x3e9e86,partIndex:_0x143161})=>{const _0x276152=_0x40425e,_0x377b75=this[_0x276152(0x172)](_0x3e9e86,_0x143161);_0x377b75&&_0x276152(0x256)!=_0x377b75[_0x276152(0x218)][_0x276152(0x2ad)][_0x276152(0x17f)]&&this[_0x276152(0x2c9)][_0x276152(0x15f)]([_0x377b75[_0x276152(0x218)]],_0x276152(0x2b8));}),this[_0x40425e(0x2b3)](this[_0x40425e(0x298)],_0x40425e(0x171),()=>{const _0x175111=_0x40425e;this[_0x175111(0x2c9)][_0x175111(0x1ed)](_0x175111(0x2b8));}),this[_0x40425e(0x2b3)](this[_0x40425e(0x298)],_0x40425e(0x259),(_0x25bcb3,_0x5e9ec1)=>{const _0xdd2829=_0x40425e;this[_0xdd2829(0x16c)][_0xdd2829(0x24e)][_0xdd2829(0x2bb)](_0x20014a)[_0xdd2829(0x18d)](),this[_0xdd2829(0x16d)](_0x5e9ec1);}),this[_0x40425e(0x2b3)](this[_0x40425e(0x298)],_0x40425e(0x19e),async(_0x597aa7,{replyId:_0x4de7a2,showDiff:_0xbe4734})=>{const _0x40dce3=_0x40425e,{reply:_0x520494}=this[_0x40dce3(0x162)](_0x4de7a2),_0x1f83a5=_0x520494[_0x40dce3(0x28b)]({'showDiff':_0xbe4734});await this[_0x40dce3(0x298)][_0x40dce3(0x1d0)]({'id':_0x520494['id'],'parts':_0x1f83a5,'renderingStrategy':_0x40dce3(0x240)});}),this[_0x40425e(0x2b3)](this[_0x40425e(0x298)],_0x40425e(0x246),(_0xce23f4,{replyId:_0x2368d2,partIndex:_0x5cd4c8})=>{const _0x20ae8b=_0x40425e;this[_0x20ae8b(0x273)]?.[_0x20ae8b(0x2ae)]==_0x2368d2&&this[_0x20ae8b(0x273)]?.[_0x20ae8b(0x267)]==_0x5cd4c8&&this[_0x20ae8b(0x16c)][_0x20ae8b(0x24e)][_0x20ae8b(0x2bb)](_0x20014a)[_0x20ae8b(0x18d)]();const {reply:_0x4be6ae}=this[_0x20ae8b(0x162)](_0x2368d2);_0x4be6ae[_0x20ae8b(0x2cb)](_0x5cd4c8,_0x20ae8b(0x249)),this[_0x20ae8b(0x2c9)][_0x20ae8b(0x1ed)](_0x20ae8b(0x2b8));});}async[_0xf7bdc8(0x262)](){const _0x4de10e=_0xf7bdc8;this[_0x4de10e(0x16c)]instanceof _0x2b4142?this[_0x4de10e(0x1aa)](this[_0x4de10e(0x16c)]):this[_0x4de10e(0x2b3)](this[_0x4de10e(0x16c)][_0x4de10e(0x183)],_0x4de10e(0x2be),(_0x283729,_0x5c2713)=>{const _0x3ee492=_0x4de10e;_0x5c2713['on'](_0x3ee492(0x177),()=>{const _0x17df2f=_0x3ee492;this[_0x17df2f(0x1aa)](_0x5c2713);});}),await this[_0x4de10e(0x253)]();}[_0xf7bdc8(0x1ef)](_0x64cceb){const _0x270dc8=_0xf7bdc8,_0x492d5b=_0x554683(this[_0x270dc8(0x16c)]);if(!_0x492d5b[_0x270dc8(0x24e)][_0x270dc8(0x196)](_0x270dc8(0x250)))throw new _0x217c5a(_0x270dc8(0x1f9),null);const _0x503cdc=this[_0x270dc8(0x16c)][_0x270dc8(0x24e)][_0x270dc8(0x2bb)](_0x270dc8(0x17e)),{reply:_0x23aa7f,interaction:_0x3550b5}=this[_0x270dc8(0x162)](_0x64cceb[_0x270dc8(0x2ae)]),_0x569668=this[_0x270dc8(0x172)](_0x64cceb[_0x270dc8(0x2ae)],_0x64cceb[_0x270dc8(0x267)]),_0x31f34c=void 0x0!==_0x64cceb[_0x270dc8(0x267)]?[_0x23aa7f[_0x270dc8(0x1d2)][_0x64cceb[_0x270dc8(0x267)]]]:_0x23aa7f[_0x270dc8(0x1d2)][_0x270dc8(0x226)](_0x26576f=>_0x270dc8(0x1a1)==_0x26576f[_0x270dc8(0x1c4)]),_0x5825e0=_0x31f34c[_0x270dc8(0x27d)](_0x5c27bb=>_0x23aa7f[_0x270dc8(0x1d2)][_0x270dc8(0x28a)](_0x5c27bb));if(!_0x569668||_0x270dc8(0x256)==_0x569668[_0x270dc8(0x218)][_0x270dc8(0x2ad)][_0x270dc8(0x17f)])return void _0x5825e0[_0x270dc8(0x1d9)](_0x5de2ed=>_0x23aa7f[_0x270dc8(0x2cb)](_0x5de2ed,_0x270dc8(0x19a)));_0x5825e0[_0x270dc8(0x1d9)](_0x501186=>_0x23aa7f[_0x270dc8(0x2cb)](_0x501186,_0x270dc8(0x229)));const _0x477936=_0x54130d({'editor':_0x492d5b,'reply':_0x23aa7f,'interaction':_0x3550b5,'groups':_0x31f34c,'transform':!0x0,'documentCompare':_0x503cdc,'documentCompareOptions':{'anchor':_0x270dc8(0x291),'markDeletions':!0x0}});let _0x4528a9;_0x569668&&this[_0x270dc8(0x1b6)](_0x569668[_0x270dc8(0x218)]),_0x492d5b[_0x270dc8(0x220)][_0x270dc8(0x2a5)](_0x33c84f=>{const _0x5af810=_0x270dc8;_0x4528a9=_0x33c84f[_0x5af810(0x29e)],_0x492d5b[_0x5af810(0x24e)][_0x5af810(0x2bb)](_0x5af810(0x251))[_0x5af810(0x2b1)](_0x477936),this[_0x5af810(0x2c9)][_0x5af810(0x1ed)](_0x5af810(0x2b8));}),this[_0x270dc8(0x268)][_0x270dc8(0x2bf)](_0x4528a9,{'interactionId':_0x3550b5['id'],'replyId':_0x23aa7f['id'],'indexes':_0x5825e0[_0x270dc8(0x232)]()}),this[_0x270dc8(0x24a)](_0x23aa7f);}[_0xf7bdc8(0x16d)](_0x29ee8d){const _0x411cac=_0xf7bdc8,_0x1efa7f=_0x554683(this[_0x411cac(0x16c)]),_0x3c2284=this[_0x411cac(0x16c)][_0x411cac(0x24e)][_0x411cac(0x2bb)](_0x53c37e),{reply:_0x255b7d,interaction:_0x5716ec}=this[_0x411cac(0x162)](_0x29ee8d[_0x411cac(0x2ae)]),_0xb53f89=this[_0x411cac(0x172)](_0x29ee8d[_0x411cac(0x2ae)],_0x29ee8d[_0x411cac(0x267)]),_0x1a8296=void 0x0!==_0x29ee8d[_0x411cac(0x267)]?[_0x255b7d[_0x411cac(0x1d2)][_0x29ee8d[_0x411cac(0x267)]]]:_0x255b7d[_0x411cac(0x1d2)][_0x411cac(0x226)](_0x3290bb=>_0x411cac(0x1a1)==_0x3290bb[_0x411cac(0x1c4)]),_0x23010a=_0x1a8296[_0x411cac(0x27d)](_0xd6adb1=>_0x255b7d[_0x411cac(0x1d2)][_0x411cac(0x28a)](_0xd6adb1));if(!_0xb53f89||_0x411cac(0x256)==_0xb53f89[_0x411cac(0x218)][_0x411cac(0x2ad)][_0x411cac(0x17f)])return void _0x23010a[_0x411cac(0x1d9)](_0x3032c9=>_0x255b7d[_0x411cac(0x2cb)](_0x3032c9,_0x411cac(0x19a)));_0x23010a[_0x411cac(0x1d9)](_0x2f45cd=>_0x255b7d[_0x411cac(0x2cb)](_0x2f45cd,_0x411cac(0x229)));const _0x473d6e=_0x54130d({'editor':_0x1efa7f,'reply':_0x255b7d,'interaction':_0x5716ec,'groups':_0x1a8296,'transform':!0x0,'documentCompare':_0x3c2284,'documentCompareOptions':{'anchor':_0x411cac(0x291),'markDeletions':!0x1}});let _0x2b9ed1;_0xb53f89&&this[_0x411cac(0x1b6)](_0xb53f89[_0x411cac(0x218)]),_0x1efa7f[_0x411cac(0x220)][_0x411cac(0x2a5)](_0x29ee19=>{const _0x5b305d=_0x411cac;_0x2b9ed1=_0x29ee19[_0x5b305d(0x29e)];for(const _0x386b54 of _0x473d6e)_0x386b54[_0x5b305d(0x204)]=_0x1efa7f[_0x5b305d(0x220)][_0x5b305d(0x237)][_0x5b305d(0x2a8)],_0x5bcc09(_0x1efa7f,_0x386b54),_0x29ee19[_0x5b305d(0x29e)][_0x5b305d(0x207)](_0x386b54),_0x1efa7f[_0x5b305d(0x220)][_0x5b305d(0x1e2)](_0x386b54);}),this[_0x411cac(0x268)][_0x411cac(0x2bf)](_0x2b9ed1,{'interactionId':_0x5716ec['id'],'replyId':_0x255b7d['id'],'indexes':_0x23010a[_0x411cac(0x232)]()}),this[_0x411cac(0x24a)](_0x255b7d);}[_0xf7bdc8(0x1e8)](_0x12e38d,_0x15b42c){const _0x522b72=_0xf7bdc8,_0x16d57f=_0x554683(this[_0x522b72(0x16c)]),_0xcd3514=this[_0x522b72(0x172)](_0x12e38d,_0x15b42c),_0x3d966a=this[_0x522b72(0x16c)][_0x522b72(0x24e)][_0x522b72(0x2bb)](_0x20014a);if(!_0xcd3514)return void _0x3d966a[_0x522b72(0x18d)]();const {range:_0xceeead,currentIndex:_0x1e57f5}=_0xcd3514;if(_0x522b72(0x256)==_0xceeead[_0x522b72(0x2ad)][_0x522b72(0x17f)]){const {reply:_0x1fcfad}=this[_0x522b72(0x162)](_0x12e38d);return _0x1fcfad[_0x522b72(0x2cb)](_0x1e57f5,_0x522b72(0x19a)),void _0x3d966a[_0x522b72(0x18d)]();}if(this[_0x522b72(0x273)]?.[_0x522b72(0x2ae)]==_0x12e38d&&this[_0x522b72(0x273)]?.[_0x522b72(0x267)]==_0x1e57f5)return;this[_0x522b72(0x1ec)](_0x3d966a),this[_0x522b72(0x273)]={'replyId':_0x12e38d,'partIndex':_0x1e57f5};let _0x423c1e=_0x16d57f[_0x522b72(0x25b)][_0x522b72(0x2bb)](_0x522b72(0x202))||[..._0x419f44];_0x16d57f[_0x522b72(0x24e)][_0x522b72(0x196)](_0x522b72(0x250))||(_0x423c1e=_0x423c1e[_0x522b72(0x226)](_0x35a382=>_0x522b72(0x206)!=_0x35a382));const _0x385af0=new _0x5e7af4(_0x16d57f[_0x522b72(0x1f8)],{'showDiff':this[_0x522b72(0x24c)],'areActionsDisabled':!0x1,'miniToolbarConfig':{'showChanges':_0x522b72(0x208)},'hideHeader':!0x0,'availableActions':_0x423c1e});this[_0x522b72(0x1ec)](_0x385af0);const {reply:_0x531f66}=this[_0x522b72(0x162)](_0x12e38d),_0x4fb353=_0x531f66[_0x522b72(0x28b)]({'showDiff':this[_0x522b72(0x24c)]})[_0x522b72(0x226)](_0x1f3964=>_0x1f3964[_0x522b72(0x1d8)]),_0x10cf03=_0x4fb353[_0x522b72(0x173)](_0x81aee7=>_0x81aee7[_0x522b72(0x224)]==_0x1e57f5);if(-0x1==_0x10cf03)return;const _0x478b07=_0x4fb353[_0x10cf03],_0x4214fb=_0x4fb353['at']((_0x10cf03-0x1)%_0x4fb353[_0x522b72(0x26a)])?.[_0x522b72(0x224)],_0x5a07cb=_0x4fb353['at']((_0x10cf03+0x1)%_0x4fb353[_0x522b72(0x26a)])?.[_0x522b72(0x224)];_0x385af0[_0x522b72(0x184)]({'parts':[_0x478b07],'renderingStrategy':_0x522b72(0x240)});const _0x2b5ba0=_0x1e57f5!==_0x4214fb;this[_0x522b72(0x1b6)](_0xceeead,!0x0),_0x3d966a[_0x522b72(0x276)]({'index':_0x1e57f5,'title':_0x5f46ca(this[_0x522b72(0x16c)][_0x522b72(0x1f8)],_0x522b72(0x227),(_0x10cf03+0x1)[_0x522b72(0x191)]()),'icon':_0x477ad5,'mainView':_0x385af0,'showRotator':_0x2b5ba0,'showApplyButton':!0x0,'showSuggestButton':_0x16d57f[_0x522b72(0x24e)][_0x522b72(0x196)](_0x522b72(0x250)),'ranges':[_0xceeead]}),this[_0x522b72(0x298)][_0x522b72(0x1a7)](_0x12e38d,_0x1e57f5),this[_0x522b72(0x2b3)](_0x385af0,_0x522b72(0x19e),(_0x5f9c0f,{showDiff:_0x5351b9})=>{const _0x2e2fbb=_0x522b72;this[_0x2e2fbb(0x24c)]=_0x5351b9;const {reply:_0x59c3d9}=this[_0x2e2fbb(0x162)](_0x12e38d),_0x51e380=_0x59c3d9[_0x2e2fbb(0x28b)]({'showDiff':_0x5351b9,'groupIndex':_0x1e57f5});_0x385af0[_0x2e2fbb(0x184)]({'parts':_0x51e380,'renderingStrategy':_0x2e2fbb(0x240)});}),this[_0x522b72(0x2b3)](_0x3d966a,_0x522b72(0x259),()=>{const _0x1da485=_0x522b72;this[_0x1da485(0x16d)]({'replyId':_0x12e38d,'partIndex':_0x1e57f5}),_0x2b5ba0?this[_0x1da485(0x1e8)](_0x12e38d,_0x5a07cb):_0x3d966a[_0x1da485(0x18d)]();}),this[_0x522b72(0x2b3)](_0x3d966a,_0x522b72(0x206),()=>{const _0x2a616f=_0x522b72;this[_0x2a616f(0x1ef)]({'replyId':_0x12e38d,'partIndex':_0x1e57f5}),_0x2b5ba0?this[_0x2a616f(0x1e8)](_0x12e38d,_0x5a07cb):_0x3d966a[_0x2a616f(0x18d)]();}),_0x2b5ba0&&(this[_0x522b72(0x2b3)](_0x3d966a,_0x522b72(0x26b),()=>{const _0x17a609=_0x522b72;this[_0x17a609(0x1e8)](_0x12e38d,_0x5a07cb);}),this[_0x522b72(0x2b3)](_0x3d966a,_0x522b72(0x1d5),()=>{const _0x358df5=_0x522b72;this[_0x358df5(0x1e8)](_0x12e38d,_0x4214fb);})),this[_0x522b72(0x2b3)](_0x3d966a,_0x522b72(0x1b8),()=>{const _0xdc7636=_0x522b72;this[_0xdc7636(0x1ec)](_0x3d966a),this[_0xdc7636(0x1ec)](_0x385af0),this[_0xdc7636(0x273)]=null;});}[_0xf7bdc8(0x172)](_0x5b4f33,_0x331d55){const _0x569878=_0xf7bdc8,_0x3c6494=_0x554683(this[_0x569878(0x16c)]),{reply:_0x17dba8,interaction:_0x2186ca}=this[_0x569878(0x162)](_0x5b4f33),_0x2fd60f=_0x17dba8[_0x569878(0x1d2)][_0x569878(0x226)](_0x5eaa2a=>_0x569878(0x1a1)==_0x5eaa2a[_0x569878(0x1c4)]),_0xd17896=_0x2fd60f[_0x569878(0x27d)](_0x306013=>_0x17dba8[_0x569878(0x1d2)][_0x569878(0x28a)](_0x306013));void 0x0===_0x331d55&&(_0x331d55=_0xd17896[0x0]);const _0x438754=_0xd17896[_0x569878(0x28a)](_0x331d55);if(-0x1==_0x438754)return null;const _0x502beb=_0x2fd60f[_0x438754],_0x23ef95=new _0x48ab8a([]),_0x468f51=new _0x48ab8a([]);for(const _0x588745 of _0x502beb[_0x569878(0x23f)])if(_0x569878(0x210)!=_0x588745[_0x569878(0x180)]&&_0x468f51[_0x569878(0x28f)][_0x569878(0x1e4)](_0x588745[_0x569878(0x1ff)][_0x569878(0x18f)](!0x0)),_0x569878(0x1de)!=_0x588745[_0x569878(0x180)]){const _0x51c81c=_0x262c1(_0x146710=>_0x3e07fb(_0x146710,_0x569878(0x17d))==_0x588745['id'],_0x17dba8[_0x569878(0x1cf)],!0x0);_0x23ef95[_0x569878(0x28f)][_0x569878(0x1e4)](_0x51c81c[_0x569878(0x18f)](!0x0));}if(0x0==_0x23ef95[_0x569878(0x28f)][_0x569878(0x26a)]){if(_0x502beb[_0x569878(0x23f)][0x0][_0x569878(0x279)]){const _0x17bc4f=_0x405389(_0x569878(0x17d),_0x502beb[_0x569878(0x23f)][0x0][_0x569878(0x279)],_0x17dba8[_0x569878(0x1cf)]);_0x23ef95[_0x569878(0x28f)][_0x569878(0x2bc)](_0x17bc4f[_0x569878(0x18f)](!0x0)),_0x468f51[_0x569878(0x28f)][_0x569878(0x2bc)](_0x17bc4f[_0x569878(0x18f)](!0x0)),_0x17bc4f[_0x569878(0x1a8)]&&(_0x23ef95[_0x569878(0x28f)][_0x569878(0x1e4)](_0x17bc4f[_0x569878(0x1a8)][_0x569878(0x18f)](!0x0)),_0x468f51[_0x569878(0x28f)][_0x569878(0x1e4)](_0x17bc4f[_0x569878(0x1a8)][_0x569878(0x18f)](!0x0)));}else{const _0xd5e2de=_0x17dba8[_0x569878(0x1cf)][_0x569878(0x28f)][0x0];if(!_0xd5e2de)return null;_0x23ef95[_0x569878(0x28f)][_0x569878(0x1e4)](_0xd5e2de[_0x569878(0x18f)](!0x0)),_0x468f51[_0x569878(0x28f)][_0x569878(0x1e4)](_0xd5e2de[_0x569878(0x18f)](!0x0));}}const _0x1c14b0=_0x2186ca[_0x569878(0x1b1)](),_0x3ded59=_0x3c6494[_0x569878(0x16f)][_0x569878(0x26d)](_0x1c14b0[_0x569878(0x203)]),_0x4c0ae6=_0x1c4235(_0x23ef95),_0x4e0bd5=_0x3c6494[_0x569878(0x16f)][_0x569878(0x26d)](_0x4c0ae6),_0x5e7703=_0x3c6494[_0x569878(0x16f)][_0x569878(0x26d)](_0x4c0ae6),_0xf8fb84=_0x3c6494[_0x569878(0x220)][_0x569878(0x211)](_0x4e0bd5,0x0),_0x506981=_0x1c4235(_0x468f51),_0x5859e7={'anchor':_0xf8fb84,'markDeletions':!0x1},_0x1b9bc5=_0x3c6494[_0x569878(0x24e)][_0x569878(0x2bb)](_0x53c37e)[_0x569878(0x21b)](_0x4c0ae6,_0x506981,_0x5859e7)[_0x569878(0x1a6)]();if(!_0x1b9bc5[_0x569878(0x26a)])return null;_0x3c6494[_0x569878(0x220)][_0x569878(0x2a5)](_0x2e914c=>{const _0x239106=_0x569878;for(const _0x23584a of _0x1b9bc5)if(_0x239106(0x25e)==_0x23584a[_0x239106(0x180)]){const _0x31bafe=_0x23584a[_0x239106(0x1ce)],_0x26a13a=_0x23584a[_0x239106(0x263)],_0xa4e81a=new _0x1a206a(_0x31bafe,_0x26a13a);_0x2e914c[_0x239106(0x29e)][_0x239106(0x207)](_0xa4e81a),_0x3c6494[_0x239106(0x220)][_0x239106(0x1e2)](_0xa4e81a);}else _0x239106(0x27b)!==_0x23584a[_0x239106(0x180)]&&(_0x23584a[_0x239106(0x204)]=null,_0x23584a[_0x239106(0x22e)]=!0x1,_0x2e914c[_0x239106(0x29e)][_0x239106(0x207)](_0x23584a),_0x3c6494[_0x239106(0x220)][_0x239106(0x1e2)](_0x23584a));});const _0x1dab38=_0x5be61d(_0x3c6494,_0x1b9bc5,_0x4e0bd5);_0x2ca72d(_0x3c6494[_0x569878(0x220)],_0x1dab38);const _0x380359=_0x1dab38[_0x569878(0x284)]()[_0x569878(0x194)][_0x569878(0x164)][_0x569878(0x232)](),_0x3ecb8a=_0x1dab38[_0x569878(0x284)]()[_0x569878(0x1d3)][_0x569878(0x164)][_0x569878(0x232)](),_0x279f64=[];let _0x44002f=_0x4e0bd5,_0x41c6dd=_0x5e7703;for(let _0x3bdc16=0x0;_0x3bdc16<_0x3ecb8a[_0x569878(0x26a)];_0x3bdc16++){const _0xee5f4d=_0x44002f[_0x569878(0x1e3)]-_0x3ecb8a[_0x3bdc16];_0x279f64[_0x3bdc16]=_0x41c6dd[_0x569878(0x1e3)]-_0xee5f4d,_0x44002f=_0x44002f[_0x569878(0x1b0)](_0x3ecb8a[_0x3bdc16]),_0x41c6dd=_0x41c6dd[_0x569878(0x1b0)](_0x279f64[_0x3bdc16]);}const _0x30850e=_0x3c6494[_0x569878(0x220)][_0x569878(0x27a)](_0x3c6494[_0x569878(0x220)][_0x569878(0x25c)](_0x5e7703,_0x380359),_0x3c6494[_0x569878(0x220)][_0x569878(0x25c)](_0x5e7703,_0x279f64)),_0x46ca75=_0x5e7703[_0x569878(0x179)](0x0)[_0x569878(0x178)](_0x230da6),_0x32caf8=Array[_0x569878(0x1e9)](_0x3ded59[_0x569878(0x294)]())[_0x569878(0x1d6)](_0x3549b5=>_0x3549b5[_0x569878(0x178)](_0x230da6)==_0x46ca75)[_0x569878(0x187)](),_0x58496c=_0x30850e[_0x569878(0x194)][_0x569878(0x164)][_0x569878(0x232)](),_0x194d67=_0x30850e[_0x569878(0x1d3)][_0x569878(0x164)][_0x569878(0x232)]();_0x58496c[0x0]=_0x32caf8[0x0]+_0x58496c[0x0],_0x194d67[0x0]=_0x32caf8[0x0]+_0x194d67[0x0];let _0x41f700=_0x3c6494[_0x569878(0x220)][_0x569878(0x27a)](_0x3c6494[_0x569878(0x220)][_0x569878(0x25c)](_0x3c6494[_0x569878(0x220)][_0x569878(0x237)][_0x569878(0x217)](),_0x58496c),_0x3c6494[_0x569878(0x220)][_0x569878(0x25c)](_0x3c6494[_0x569878(0x220)][_0x569878(0x237)][_0x569878(0x217)](),_0x194d67));const _0x4a1f5e=_0x3c6494[_0x569878(0x220)][_0x569878(0x237)][_0x569878(0x290)][_0x569878(0x1a6)](_0x1c14b0[_0x569878(0x2a8)]);for(const _0xcdf7f8 of _0x4a1f5e)_0x41f700=_0xcfb78[_0x569878(0x1da)](_0x41f700[_0x569878(0x17b)](_0xcdf7f8));return{'range':_0x41f700,'currentIndex':_0x331d55};}[_0xf7bdc8(0x1aa)](_0x2e07dd){const _0x2443e0=_0xf7bdc8;if(!_0x2e07dd[_0x2443e0(0x24e)][_0x2443e0(0x196)](_0x2443e0(0x1ee)))return;const _0x5aa801=_0x2e07dd[_0x2443e0(0x2b0)][_0x2443e0(0x2bb)](_0x2443e0(0x2a3)),_0x3e0ea6=_0x2e07dd[_0x2443e0(0x2b0)][_0x2443e0(0x2bb)](_0x2443e0(0x265));this[_0x2443e0(0x2b3)](_0x5aa801,_0x2443e0(0x174),(_0x479db6,_0x3460d4,_0x4bee7d)=>{const _0x3267c4=_0x2443e0,_0x48b7cc=this[_0x3267c4(0x268)][_0x3267c4(0x2bb)](_0x3460d4);if(!_0x48b7cc)return;const _0x21a65d=this[_0x3267c4(0x22a)][_0x3267c4(0x24f)](_0x48b7cc[_0x3267c4(0x1f3)])[_0x3267c4(0x1c0)](_0x48b7cc[_0x3267c4(0x2ae)]);_0x48b7cc[_0x3267c4(0x195)][_0x3267c4(0x1d9)](_0x124ffb=>_0x21a65d[_0x3267c4(0x2cb)](_0x124ffb,_0x3267c4(0x1a1))),this[_0x3267c4(0x268)][_0x3267c4(0x1b4)](_0x3460d4),this[_0x3267c4(0x268)][_0x3267c4(0x2bf)](_0x4bee7d,_0x48b7cc);}),this[_0x2443e0(0x2b3)](_0x3e0ea6,_0x2443e0(0x174),(_0x3df2d8,_0xacc5d0,_0x485acd)=>{const _0x7274da=_0x2443e0,_0x35bff1=this[_0x7274da(0x268)][_0x7274da(0x2bb)](_0xacc5d0);if(!_0x35bff1)return;const _0x153fb6=this[_0x7274da(0x22a)][_0x7274da(0x24f)](_0x35bff1[_0x7274da(0x1f3)])[_0x7274da(0x1c0)](_0x35bff1[_0x7274da(0x2ae)]);_0x35bff1[_0x7274da(0x195)][_0x7274da(0x1d9)](_0x146fc1=>_0x153fb6[_0x7274da(0x2cb)](_0x146fc1,_0x7274da(0x229))),this[_0x7274da(0x268)][_0x7274da(0x1b4)](_0xacc5d0),this[_0x7274da(0x268)][_0x7274da(0x2bf)](_0x485acd,_0x35bff1);});}async[_0xf7bdc8(0x2a0)](_0x21cf33){const _0x494736=_0xf7bdc8;this[_0x494736(0x16c)][_0x494736(0x24e)][_0x494736(0x2bb)](_0x20014a)[_0x494736(0x18d)](),this[_0x494736(0x298)][_0x494736(0x1f0)](_0x494736(0x240)),this[_0x494736(0x298)][_0x494736(0x1db)](!0x0),await this[_0x494736(0x272)]();try{await this[_0x494736(0x282)][_0x494736(0x1cd)](_0x21cf33)[_0x494736(0x2aa)](),await this[_0x494736(0x253)](_0x21cf33),this[_0x494736(0x27f)]('\x20');const {sessionId:_0x7be23}=this[_0x494736(0x2c9)][_0x494736(0x280)]();await this[_0x494736(0x22a)][_0x494736(0x1f1)](_0x21cf33,_0x7be23),this[_0x494736(0x22a)][_0x494736(0x20d)]()&&this[_0x494736(0x22a)][_0x494736(0x205)](_0x5f46ca(this[_0x494736(0x16c)][_0x494736(0x1f8)],_0x494736(0x2b2)));}catch(_0x2a59e9){this[_0x494736(0x298)][_0x494736(0x1b5)]({'errorMessage':_0x5f46ca(this[_0x494736(0x16c)][_0x494736(0x1f8)],_0x494736(0x19f)),'id':_0x21cf33}),this[_0x494736(0x25a)](new _0x217c5a(_0x494736(0x29d),this,{'error':_0x2a59e9}));}finally{this[_0x494736(0x16c)][_0x494736(0x24e)][_0x494736(0x2bb)](_0x4f4427)[_0x494736(0x213)][_0x494736(0x22b)](_0x494736(0x222)),this[_0x494736(0x298)][_0x494736(0x228)](),this[_0x494736(0x298)][_0x494736(0x1f0)](_0x494736(0x231)),this[_0x494736(0x298)][_0x494736(0x1db)](!0x1);}}[_0xf7bdc8(0x20c)](_0x4a7394){const _0x4d8951=_0xf7bdc8;this[_0x4d8951(0x22a)]['id']===_0x4a7394&&this[_0x4d8951(0x253)]();}async[_0xf7bdc8(0x219)](){const _0x5b7932=_0xf7bdc8,_0x90b566=this[_0x5b7932(0x2c9)][_0x5b7932(0x239)]();this[_0x5b7932(0x22a)]?.[_0x5b7932(0x170)](_0x90b566),this[_0x5b7932(0x22a)]?.[_0x5b7932(0x205)](_0x5f46ca(this[_0x5b7932(0x16c)][_0x5b7932(0x1f8)],_0x5b7932(0x2b2)));}[_0xf7bdc8(0x2c4)](){const _0x26c05a=_0xf7bdc8;this[_0x26c05a(0x22a)]?.[_0x26c05a(0x23c)]();}[_0xf7bdc8(0x1fe)](){const _0x4e2334=_0xf7bdc8;this[_0x4e2334(0x298)][_0x4e2334(0x1fe)]();}async[_0xf7bdc8(0x176)](){const _0x547058=_0xf7bdc8;await this[_0x547058(0x253)]();}async[_0xf7bdc8(0x2af)]({message:_0xec70f9,quickActionData:_0x3f4ac9}){const _0x817bd6=_0xf7bdc8;await this[_0x817bd6(0x25d)]({'userMessage':_0xec70f9,'quickActionData':_0x3f4ac9});}[_0xf7bdc8(0x214)](){const _0x4e18c3=_0xf7bdc8,_0xaa3607=this[_0x4e18c3(0x16c)][_0x4e18c3(0x25b)][_0x4e18c3(0x2bb)](_0x4e18c3(0x2ca));if(!_0xaa3607)throw new _0x217c5a(_0x4e18c3(0x241),this);return _0xaa3607;}async[_0xf7bdc8(0x253)](_0xa73a55){const _0x4b9de8=_0xf7bdc8;try{this[_0x4b9de8(0x298)][_0x4b9de8(0x1cb)](),await this[_0x4b9de8(0x197)](_0xa73a55);}catch(_0x354a23){this[_0x4b9de8(0x298)][_0x4b9de8(0x1b5)]({'errorMessage':_0x5f46ca(this[_0x4b9de8(0x16c)][_0x4b9de8(0x1f8)],_0x4b9de8(0x23b)),'id':_0xa73a55||_0x532b26()}),console[_0x4b9de8(0x2ba)](_0x354a23),this[_0x4b9de8(0x22a)]=void 0x0,this[_0x4b9de8(0x298)][_0x4b9de8(0x271)]();}}async[_0xf7bdc8(0x197)](_0x5ddf43){const _0x1923d8=_0xf7bdc8,_0x51c89b=this[_0x1923d8(0x16c)][_0x1923d8(0x24e)][_0x1923d8(0x2bb)](_0x20014a);let _0x216f5e;_0x51c89b[_0x1923d8(0x1f7)]&&_0x51c89b[_0x1923d8(0x18d)](),_0x5ddf43||!this[_0x1923d8(0x22a)]?_0x216f5e=this[_0x1923d8(0x16c)][_0x1923d8(0x25b)][_0x1923d8(0x2bb)](_0x1923d8(0x201)):this[_0x1923d8(0x298)][_0x1923d8(0x2b9)]&&(_0x216f5e=this[_0x1923d8(0x22a)][_0x1923d8(0x1bc)]['id']),await this[_0x1923d8(0x272)]();const _0x575cae=this[_0x1923d8(0x214)](),_0x157ced=_0x5ddf43||_0x532b26();this[_0x1923d8(0x22a)]=new _0x208493({'connector':this[_0x1923d8(0x282)],'chatModels':this[_0x1923d8(0x270)],'selectedModelId':_0x216f5e,'conversationId':_0x157ced,'group':_0x575cae,'getEditor':()=>_0x554683(this[_0x1923d8(0x16c)])}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x1af),(_0x1f5c86,_0x350bed)=>{const _0x4ff60c=_0x1923d8;this[_0x4ff60c(0x298)][_0x4ff60c(0x28c)](_0x350bed),this[_0x4ff60c(0x298)][_0x4ff60c(0x1c8)](),this[_0x4ff60c(0x298)][_0x4ff60c(0x248)](),this[_0x4ff60c(0x298)][_0x4ff60c(0x278)](),_0x5ddf43||(this[_0x4ff60c(0x298)][_0x4ff60c(0x1fa)](),this[_0x4ff60c(0x22a)]?.[_0x4ff60c(0x205)](_0x5f46ca(this[_0x4ff60c(0x16c)][_0x4ff60c(0x1f8)],_0x4ff60c(0x2b2))));}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x254),(_0x84b101,_0x53aebb)=>{const _0x1f2a9f=_0x1923d8;this[_0x1f2a9f(0x298)][_0x1f2a9f(0x2b6)](_0x53aebb[_0x1f2a9f(0x266)]);}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x166),(_0x2b04f7,_0x9f9436)=>{const _0x37a09b=_0x1923d8;this[_0x37a09b(0x298)][_0x37a09b(0x1b9)](_0x9f9436);}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x167),()=>{const _0x18f348=_0x1923d8;this[_0x18f348(0x298)][_0x18f348(0x200)]({'isWebSearchEnabled':!0x0,'isReasoningEnabled':!0x1});}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x1fc),()=>{const _0x1b3c39=_0x1923d8;this[_0x1b3c39(0x298)][_0x1b3c39(0x200)]({'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x0});}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x1c1),(_0xb892e2,_0x6fa17d)=>{const _0x20c793=_0x1923d8;this[_0x20c793(0x298)][_0x20c793(0x190)](_0x6fa17d,{'isWebSearchEnabled':!0x0,'isReasoningEnabled':!0x1});}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x2c3),(_0xfc980b,_0x42a3be)=>{const _0x6f4b46=_0x1923d8;this[_0x6f4b46(0x298)][_0x6f4b46(0x190)](_0x42a3be,{'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x0});}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x16a),()=>{const _0x49b8af=_0x1923d8;this[_0x49b8af(0x298)][_0x49b8af(0x1f5)]();}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x209),async()=>{const _0x139d10=_0x1923d8;await this[_0x139d10(0x298)][_0x139d10(0x269)]();}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x2ac),(_0x1dfc29,_0x2d0f94)=>{const _0x20e0e4=_0x1923d8;this[_0x20e0e4(0x298)][_0x20e0e4(0x296)](_0x2d0f94['id']);}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x2c6),(_0x56216c,_0x342504,_0x5d0c53)=>{const _0x2ab97d=_0x1923d8;this[_0x2ab97d(0x27f)](_0x342504,_0x5d0c53);}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x281),(_0x69d1ae,_0x23787c)=>{const _0x1cd884=_0x1923d8;_0x1cd884(0x2c8)===_0x23787c[_0x1cd884(0x180)]?this[_0x1cd884(0x298)][_0x1cd884(0x299)](_0x23787c):this[_0x1cd884(0x298)][_0x1cd884(0x1c3)](_0x23787c);}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x264),async(_0x2ef82d,_0x153da3)=>{const _0x1ec96e=_0x1923d8;await this[_0x1ec96e(0x2b5)]({'reply':_0x153da3});}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x189),(_0x55bb5d,{reply:_0x4c3e9f,index:_0x25f1a9,state:_0x197658})=>{const _0x2c3b0f=_0x1923d8;this[_0x2c3b0f(0x298)][_0x2c3b0f(0x26f)]({'id':_0x4c3e9f['id'],'index':_0x25f1a9,'state':_0x197658});}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x29b),(_0x1423eb,_0x11e537)=>{const _0x415cca=_0x1923d8;if(this[_0x415cca(0x298)][_0x415cca(0x287)](_0x11e537[_0x415cca(0x242)],_0x11e537[_0x415cca(0x1d7)]),_0x415cca(0x215)===_0x11e537[_0x415cca(0x242)][_0x415cca(0x180)]){const _0x29956b=[..._0x554683(this[_0x415cca(0x16c)])[_0x415cca(0x220)][_0x415cca(0x237)][_0x415cca(0x215)][_0x415cca(0x238)]()];this[_0x415cca(0x2c9)][_0x415cca(0x15f)](_0x29956b,_0x415cca(0x25f)+this[_0x415cca(0x22a)]?.['id']);}}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x16e),(_0x2bb317,_0x4863d1)=>{const _0x353e9c=_0x1923d8;this[_0x353e9c(0x298)][_0x353e9c(0x244)](_0x4863d1[_0x353e9c(0x29a)]),_0x353e9c(0x28d)==_0x4863d1[_0x353e9c(0x29a)]&&this[_0x353e9c(0x2c4)](),_0x353e9c(0x215)===_0x4863d1[_0x353e9c(0x180)]&&this[_0x353e9c(0x2c9)][_0x353e9c(0x1ed)](_0x353e9c(0x25f)+this[_0x353e9c(0x22a)]?.['id']);}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x212),(_0x1795c2,_0x380a2a)=>{const _0x462daa=_0x1923d8;this[_0x462daa(0x298)][_0x462daa(0x260)](_0x380a2a[_0x462daa(0x242)][_0x462daa(0x29a)],_0x380a2a[_0x462daa(0x1d7)]);}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x1c6),(_0x534ffa,_0x30d29d)=>{const _0x336a66=_0x1923d8;this[_0x336a66(0x298)][_0x336a66(0x255)](_0x30d29d[_0x336a66(0x2b7)]);}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x1b3),(_0x5d18d8,_0x5cb41a)=>{const _0x9ec1a8=_0x1923d8;this[_0x9ec1a8(0x298)][_0x9ec1a8(0x1c5)](_0x5cb41a[_0x9ec1a8(0x1c2)]);}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x258),(_0x692211,_0x3f2a13)=>{const _0x5a9bc9=_0x1923d8;this[_0x5a9bc9(0x298)][_0x5a9bc9(0x22c)](_0x3f2a13[_0x5a9bc9(0x223)],_0x3f2a13[_0x5a9bc9(0x234)],_0x3f2a13[_0x5a9bc9(0x274)],_0x3f2a13[_0x5a9bc9(0x1ea)]);}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x2a6),(_0x48c5ed,_0x3a0668)=>{const _0x410db9=_0x1923d8;this[_0x410db9(0x298)][_0x410db9(0x26e)](_0x3a0668[_0x410db9(0x223)],_0x3a0668[_0x410db9(0x1ad)],_0x3a0668[_0x410db9(0x17a)]);}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x2c1),(_0x7c6df4,_0x3e4498)=>{const _0x59259e=_0x1923d8;this[_0x59259e(0x298)][_0x59259e(0x245)](_0x3e4498);}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x199),(_0x1dcc04,_0xffc481)=>{const _0xa45c2b=_0x1923d8;this[_0xa45c2b(0x298)][_0xa45c2b(0x285)](_0xffc481[_0xa45c2b(0x1bc)],_0xffc481[_0xa45c2b(0x2a1)]);}),this[_0x1923d8(0x22a)]['on'](_0x1923d8(0x2ba),(_0x13e5a4,{error:_0x2106e1,interactionId:_0x14bef7,fileName:_0x391b26,url:_0x3f424a,sourceId:_0x3c1e83,sourceLabel:_0x54726e})=>{const _0x212771=_0x1923d8,_0x3e313a=_0x14bef7?_0x14bef7+':'+_0x532b26():_0x532b26();_0x2106e1[_0x212771(0x261)][_0x212771(0x252)](_0x212771(0x243))?this[_0x212771(0x298)][_0x212771(0x2a7)]({'staticMessage':_0x5f46ca(this[_0x212771(0x16c)][_0x212771(0x1f8)],_0x212771(0x21e)),'id':_0x3e313a}):_0x2106e1[_0x212771(0x261)][_0x212771(0x252)](_0x212771(0x1e7))||_0x2106e1[_0x212771(0x261)][_0x212771(0x252)](_0x212771(0x168))?(this[_0x212771(0x298)][_0x212771(0x1b5)]({'errorMessage':_0x5f46ca(this[_0x212771(0x16c)][_0x212771(0x1f8)],_0x212771(0x23b)),'id':_0x3e313a}),this[_0x212771(0x25a)](_0x2106e1)):_0x2106e1[_0x212771(0x261)][_0x212771(0x252)](_0x212771(0x1bb))?this[_0x212771(0x298)][_0x212771(0x1b5)]({'errorMessage':_0x5f46ca(this[_0x212771(0x16c)][_0x212771(0x1f8)],_0x212771(0x1e5),_0x391b26),'id':_0x3e313a}):_0x2106e1[_0x212771(0x261)][_0x212771(0x252)](_0x212771(0x1a2))?this[_0x212771(0x298)][_0x212771(0x1b5)]({'errorMessage':_0x5f46ca(this[_0x212771(0x16c)][_0x212771(0x1f8)],_0x212771(0x297),_0x3f424a),'id':_0x3e313a}):_0x2106e1[_0x212771(0x261)][_0x212771(0x252)](_0x212771(0x1bd))?this[_0x212771(0x298)][_0x212771(0x1b5)]({'errorMessage':_0x5f46ca(this[_0x212771(0x16c)][_0x212771(0x1f8)],_0x212771(0x24d)),'id':_0x3e313a}):_0x2106e1[_0x212771(0x261)][_0x212771(0x252)](_0x212771(0x2a9))?this[_0x212771(0x298)][_0x212771(0x1b5)]({'errorMessage':_0x5f46ca(this[_0x212771(0x16c)][_0x212771(0x1f8)],_0x212771(0x1dc)),'id':_0x3e313a}):_0x2106e1[_0x212771(0x261)][_0x212771(0x252)](_0x212771(0x275))?(_0x3c1e83&&this[_0x212771(0x298)][_0x212771(0x163)](_0x3c1e83),this[_0x212771(0x298)][_0x212771(0x1b5)]({'errorMessage':_0x5f46ca(this[_0x212771(0x16c)][_0x212771(0x1f8)],_0x212771(0x1ab),_0x54726e||_0x212771(0x234)),'id':_0x3e313a}),this[_0x212771(0x25a)](_0x2106e1)):_0x2106e1[_0x212771(0x261)][_0x212771(0x252)](_0x212771(0x18a))?(this[_0x212771(0x298)][_0x212771(0x1b5)]({'errorMessage':_0x5f46ca(this[_0x212771(0x16c)][_0x212771(0x1f8)],_0x212771(0x181)),'id':_0x3e313a}),this[_0x212771(0x25a)](_0x2106e1)):_0x2106e1[_0x212771(0x261)][_0x212771(0x252)](_0x212771(0x161))?(this[_0x212771(0x298)][_0x212771(0x1b5)]({'errorMessage':_0x5f46ca(this[_0x212771(0x16c)][_0x212771(0x1f8)],_0x212771(0x186)),'id':_0x3e313a}),this[_0x212771(0x25a)](_0x2106e1)):_0x2106e1[_0x212771(0x261)][_0x212771(0x252)](_0x212771(0x2c7))?(this[_0x212771(0x298)][_0x212771(0x1b5)]({'errorMessage':_0x5f46ca(this[_0x212771(0x16c)][_0x212771(0x1f8)],_0x212771(0x1c7)),'id':_0x3e313a}),this[_0x212771(0x25a)](_0x2106e1)):_0x2106e1[_0x212771(0x261)][_0x212771(0x252)](_0x212771(0x20f))?(this[_0x212771(0x298)][_0x212771(0x1b5)]({'errorMessage':_0x5f46ca(this[_0x212771(0x16c)][_0x212771(0x1f8)],_0x212771(0x221)),'id':_0x3e313a}),this[_0x212771(0x25a)](_0x2106e1)):_0x2106e1[_0x212771(0x261)][_0x212771(0x252)](_0x212771(0x1e1))?(this[_0x212771(0x298)][_0x212771(0x1b5)]({'errorMessage':_0x5f46ca(this[_0x212771(0x16c)][_0x212771(0x1f8)],_0x212771(0x27c)),'id':_0x3e313a}),this[_0x212771(0x25a)](_0x2106e1)):_0x2106e1[_0x212771(0x261)][_0x212771(0x252)](_0x212771(0x26c))?(this[_0x212771(0x298)][_0x212771(0x1b5)]({'errorMessage':_0x5f46ca(this[_0x212771(0x16c)][_0x212771(0x1f8)],_0x212771(0x2ab)),'id':_0x3e313a}),this[_0x212771(0x25a)](_0x2106e1)):(this[_0x212771(0x298)][_0x212771(0x1b5)]({'errorMessage':_0x5f46ca(this[_0x212771(0x16c)][_0x212771(0x1f8)],_0x212771(0x20b)),'id':_0x3e313a}),this[_0x212771(0x25a)](_0x2106e1));}),await this[_0x1923d8(0x22a)][_0x1923d8(0x160)](this[_0x1923d8(0x16c)][_0x1923d8(0x25b)][_0x1923d8(0x2bb)](_0x1923d8(0x1a3))),_0x5ddf43||await this[_0x1923d8(0x22a)][_0x1923d8(0x194)]();}async[_0xf7bdc8(0x25d)]({userMessage:_0x433f4b,quickActionData:_0x4802a0}){const _0x5386b3=_0xf7bdc8;if(!this[_0x5386b3(0x22a)])throw new _0x217c5a(_0x5386b3(0x169));this[_0x5386b3(0x22a)][_0x5386b3(0x19b)]()&&await this[_0x5386b3(0x22a)][_0x5386b3(0x29f)](this[_0x5386b3(0x2c9)][_0x5386b3(0x280)]()),this[_0x5386b3(0x22a)]['id']&&this[_0x5386b3(0x22a)][_0x5386b3(0x286)]&&await this[_0x5386b3(0x22a)][_0x5386b3(0x1f6)]({'userMessage':_0x433f4b,'quickActionData':_0x4802a0}),this[_0x5386b3(0x19d)]();}[_0xf7bdc8(0x19d)](){const _0x17c60d=_0xf7bdc8,_0x59e18f=_0x554683(this[_0x17c60d(0x16c)])[_0x17c60d(0x220)],_0xa20e78=Array[_0x17c60d(0x1e9)](_0x59e18f[_0x17c60d(0x22d)][_0x17c60d(0x2b4)](_0x3ca273));_0x59e18f[_0x17c60d(0x2a5)](_0x557952=>{const _0x3e6c6c=_0x17c60d;_0xa20e78[_0x3e6c6c(0x1d9)](_0x543eb3=>_0x557952[_0x3e6c6c(0x1eb)](_0x543eb3));});}[_0xf7bdc8(0x1ac)](){const _0x57458f=_0xf7bdc8;console[_0x57458f(0x1df)](_0x57458f(0x18e));}[_0xf7bdc8(0x247)](_0x119608){const _0xd97bfc=_0xf7bdc8;this[_0xd97bfc(0x298)][_0xd97bfc(0x23d)](_0x119608);}[_0xf7bdc8(0x25a)](_0x27b2cf){const _0x1203ca=_0xf7bdc8;_0x39c475(_0x27b2cf[_0x1203ca(0x261)]);}[_0xf7bdc8(0x1a9)](_0x42ba26){const _0x112d60=_0xf7bdc8;this[_0x112d60(0x22a)]?.[_0x112d60(0x2cc)](_0x42ba26);}[_0xf7bdc8(0x29c)](){const _0x2f1f3e=_0xf7bdc8;this[_0x2f1f3e(0x22a)]?.[_0x2f1f3e(0x27e)]();}[_0xf7bdc8(0x2a4)](){const _0x3da564=_0xf7bdc8;this[_0x3da564(0x22a)]?.[_0x3da564(0x1ba)]();}[_0xf7bdc8(0x162)](_0x2d404d){const _0x51d411=_0xf7bdc8,[_0x1eed6,_0x519ace]=_0x2d404d[_0x51d411(0x1a5)](':'),_0x4ec000=this[_0x51d411(0x22a)][_0x51d411(0x24f)](_0x1eed6),_0x9dbae0=_0x4ec000[_0x51d411(0x1c0)](_0x519ace);return{'interaction':_0x4ec000,'reply':_0x9dbae0};}[_0xf7bdc8(0x1b6)](_0x57a4a0,_0x4ba381=!0x1){const _0x2c5974=_0xf7bdc8,_0x3475c8=_0x554683(this[_0x2c5974(0x16c)]),_0xcefb14={'target':_0x3475c8[_0x2c5974(0x165)][_0x2c5974(0x213)][_0x2c5974(0x1b2)][_0x2c5974(0x235)](_0x3475c8[_0x2c5974(0x165)][_0x2c5974(0x188)][_0x2c5974(0x292)](_0x57a4a0)),'viewportOffset':{'top':0x96,'left':0x0,'bottom':0x32,'right':0x0},'ancestorOffset':0x14,'alignToTop':_0x4ba381};_0x4ba381&&(_0xcefb14[_0x2c5974(0x257)]=!0x0),_0x145ff8(_0xcefb14);}[_0xf7bdc8(0x27f)](_0x55b0fa,_0x42df8b=!0x1){const _0x56fc10=_0xf7bdc8;this[_0x56fc10(0x298)][_0x56fc10(0x2c6)](_0x55b0fa||_0x5f46ca(this[_0x56fc10(0x16c)][_0x56fc10(0x1f8)],_0x56fc10(0x1cc)),_0x42df8b);}async[_0xf7bdc8(0x2b5)]({reply:_0x1a80b3,renderingStrategy:_0x4e1417}){const _0x5b28c4=_0xf7bdc8,{id:_0x5a0409,isDone:_0x5f3e83,type:_0x5e9a75,parsedContent:_0x1cf02b}=_0x1a80b3;if(_0x5b28c4(0x295)===_0x5e9a75){const _0x1c75ca=_0x1a80b3[_0x5b28c4(0x28b)]({'showDiff':this[_0x5b28c4(0x298)][_0x5b28c4(0x1f4)]});await this[_0x5b28c4(0x298)][_0x5b28c4(0x1d0)]({'id':_0x5a0409,'parts':_0x1c75ca,'renderingStrategy':_0x4e1417,'isDone':_0x5f3e83});}else _0x5b28c4(0x2c8)===_0x5e9a75&&await this[_0x5b28c4(0x298)][_0x5b28c4(0x1bf)]({'id':_0x5a0409,'parsedContent':_0x1cf02b,'renderingStrategy':_0x4e1417,'isDone':_0x5f3e83});_0x5f3e83&&_0x1a80b3[_0x5b28c4(0x1dd)][_0x5b28c4(0x26a)]>0x0&&this[_0x5b28c4(0x298)][_0x5b28c4(0x1d1)](_0x5a0409,_0x1a80b3[_0x5b28c4(0x1dd)]);}async[_0xf7bdc8(0x272)](){const _0x11ef7a=_0xf7bdc8,_0x59bc81=this[_0x11ef7a(0x22a)]?.[_0x11ef7a(0x24b)];_0x59bc81&&(_0x59bc81[_0x11ef7a(0x20a)](),this[_0x11ef7a(0x298)][_0x11ef7a(0x1ca)](_0x59bc81));}async[_0xf7bdc8(0x2c2)](){const _0xdb9e4a=_0xf7bdc8,_0x367ec0=this[_0xdb9e4a(0x22a)]?.[_0xdb9e4a(0x24b)];if(_0x367ec0){for await(const _0x123b93 of _0x367ec0[_0xdb9e4a(0x21f)])await this[_0xdb9e4a(0x2b5)]({'reply':_0x123b93,'renderingStrategy':_0xdb9e4a(0x240)});}}[_0xf7bdc8(0x24a)](_0x156fdc){const _0x4a74d2=_0xf7bdc8,_0x559feb={'positiveCount':_0x156fdc[_0x4a74d2(0x1d2)][_0x4a74d2(0x226)](_0x4d90d2=>_0x4a74d2(0x229)===_0x4d90d2[_0x4a74d2(0x1c4)])[_0x4a74d2(0x26a)],'totalCount':_0x156fdc[_0x4a74d2(0x1d2)][_0x4a74d2(0x26a)],'modificationId':_0x156fdc['id']},_0x53dba3=this[_0x4a74d2(0x22a)][_0x4a74d2(0x24f)](_0x156fdc[_0x4a74d2(0x1f3)])[_0x4a74d2(0x2c0)];this[_0x4a74d2(0x282)][_0x4a74d2(0x21d)](this[_0x4a74d2(0x22a)]['id'],_0x53dba3,_0x559feb);}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- function _0xa515(){const _0x5bb85a=['updateFeedItemAIReplySources','resetConversationTitle','streaming','user-message','get','has','commands','ai-reply','chatControls','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH','from','interaction-header','remove','3746892nkAAEA','1090sKfflH','enqueue','updateSuggestionPartState','updateSuggestionItem','toggleLoadingSkeleton','isVisible','context','destroy','addFeedItemError','enableControls','setAddContextOptions','scrollToSuggestion','forEach','showResizeButton','finishInteraction','addFeedItemAIReply','AIChatUI','10996392kxZRvA','updateResourceState','setModel','closeSourceResourceBalloon','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH_REASONING','startInteraction','ai-suggestion-reply','addTab','conversation-start','setSelectedModel','areActionsDisabled','queueEmptyPromise','getItemIds','removeFeedInteraction','addFeedItemUserMessage','markItemAsDone','addItem','length','delegate','filter','431012yDZROZ','disableControls','13332906HlGqaJ','isPremiumPlugin','addFeedInteractionHeader','27XLYBKn','TrackChanges','isDone','setConversationContext','isPending','interactionId','isBusy','_animateConversationTitle','setConversationTitle','</p>','AI_CHAT_WELCOME_MESSAGE','bind','_interactionPromiseResolver','AI_CHAT_HEADING','775xMLevR','chatHeader','view','setFeedItemRenderingStrategy','populateSourceResourceBalloon','error-message','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH_REASONING','ai.chat.context.searchInputVisibleFrom','isWebSearchEnabled','_titleAnimationInterval','capabilities','isModelAvailable','insertSuggestion','_isTrackChangesCommandValueBound','stopAutoScroll','then','updateWebSources','markFeedItemAsDone','setIsUploadInProgress','addFeedItemStaticMessage','setInputPlaceholder','clear','scrollFeedToSuggestion','abort','enableModelSelector','_getLoadingMessage','pluginName','disableModelSelector','setWebSearch','startAutoScroll','contextItems','showDiff','displayedPrompt','children','updateFeedInteractionHeader','3591630IUAOxt','<p>','chatFeed','setContextItemLoading','startsWith','isDisabled','values','isOfficialPlugin','config','updateFeedItemAIReplySuggestionPartState','5842710eiMONY','_view','updateFeedItemAIReplySuggestionContent','addContextItem','AI_CHAT_FEED_LOADING_MESSAGE_REASONING','isTrackChangesOn','isLoading','options','find','setModelList','AITabs','plugins','ai.chat.models.modelSelectorAlwaysVisible','requires','_getInputPlaceholder','addFeedItemAISuggestion','setIsMaximized','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REASONING','setReasoning','isReasoningEnabled','quickActionData','updateReplyItem','stopInteraction','label','trackChanges','clearPendingContextUI','locale','isMaximized','updateCapabilities','createConversation','set','removeContextItem','feedItemRenderingStrategy','clearConversationContextUI','renderingStrategy','value','userMessage','ai.availableReplyActions','removeItem','setLoadingMessage','focusPromptInput','AI_CHAT_FEED_LOADING_MESSAGE_REGULAR','toggleSuggestionDisplayMode','updateFeedItemAIReplyContent','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH','_promiseQueue','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REGULAR','availableModels','last','resetMessageInput','chat'];_0xa515=function(){return _0x5bb85a;};return _0xa515();}function _0x3f79(_0x2c51c7,_0x123749){const _0xa515f2=_0xa515();return _0x3f79=function(_0x3f795e,_0x32d378){_0x3f795e=_0x3f795e-0xb3;let _0x5b13d6=_0xa515f2[_0x3f795e];return _0x5b13d6;},_0x3f79(_0x2c51c7,_0x123749);}const _0xf4a3bc=_0x3f79;(function(_0x118c3b,_0x4894f6){const _0xa5b70e=_0x3f79,_0x1cffc9=_0x118c3b();while(!![]){try{const _0x219040=-parseInt(_0xa5b70e(0x117))/0x1*(-parseInt(_0xa5b70e(0xdf))/0x2)+parseInt(_0xa5b70e(0x109))/0x3*(-parseInt(_0xa5b70e(0x104))/0x4)+parseInt(_0xa5b70e(0x144))/0x5+parseInt(_0xa5b70e(0xde))/0x6+-parseInt(_0xa5b70e(0x13a))/0x7+-parseInt(_0xa5b70e(0xf0))/0x8+parseInt(_0xa5b70e(0x106))/0x9;if(_0x219040===_0x4894f6)break;else _0x1cffc9['push'](_0x1cffc9['shift']());}catch(_0x12a73e){_0x1cffc9['push'](_0x1cffc9['shift']());}}}(_0xa515,0xccef9));import{ContextPlugin as _0x4a5691}from'ckeditor5/src/core.js';import{_isMotionReduced as _0x115c84}from'ckeditor5/src/utils.js';import{AIChatView as _0x3ee84f}from'./ui/aichatview.js';import{AITabs as _0xb06856}from'../aitabs/aitabs.js';import{getTranslation as _0x5b7b06}from'../aicore/utils/common-translations.js';import{IconAIChat as _0x363432}from'ckeditor5/src/icons.js';import{AIChatFeedInteractionHeaderView as _0x1ff243}from'./ui/feed/aichatfeedinteractionheaderview.js';import{PromiseQueue as _0x829663}from'./utils/promisequeue.js';import{AI_CHAT_UI_EVENT_NAMES as _0x11f5c7}from'./utils/eventnames.js';import'../../theme/aichat/aichat.css';import{getEditorFromContext as _0x137728}from'../aicore/utils/geteditorfromcontext.js';import{AI_REPLY_ACTIONS as _0x4af346}from'./ui/feed/aichatfeedsuggestionitemactionsview.js';export class AIChatUI extends _0x4a5691{static get[_0xf4a3bc(0x151)](){return[_0xb06856];}[_0xf4a3bc(0x145)];static get[_0xf4a3bc(0x131)](){const _0x4c7bfa=_0xf4a3bc;return _0x4c7bfa(0xef);}static get[_0xf4a3bc(0x141)](){return!0x0;}static get[_0xf4a3bc(0x107)](){return!0x0;}[_0xf4a3bc(0xbe)]=_0xf4a3bc(0xd3);[_0xf4a3bc(0x136)]=!0x0;[_0xf4a3bc(0xcb)];[_0xf4a3bc(0x115)];[_0xf4a3bc(0x120)]=void 0x0;[_0xf4a3bc(0x124)]=!0x1;constructor(_0x3c2047){const _0x51cc7d=_0xf4a3bc;super(_0x3c2047);const _0x3a5622=this[_0x51cc7d(0xe5)][_0x51cc7d(0x14f)][_0x51cc7d(0xd5)](_0x51cc7d(0x14e));this[_0x51cc7d(0xbc)](_0x51cc7d(0x10f),!0x1),this[_0x51cc7d(0xcb)]=new _0x829663(),this[_0x51cc7d(0x145)]=new _0x3ee84f(this[_0x51cc7d(0xe5)][_0x51cc7d(0xb8)],{'showResizeButton':_0x3a5622[_0x51cc7d(0xec)],'contextResourcesSearchInputVisibleFrom':this[_0x51cc7d(0xe5)][_0x51cc7d(0x142)][_0x51cc7d(0xd5)](_0x51cc7d(0x11e))}),this[_0x51cc7d(0x145)][_0x51cc7d(0x102)](..._0x11f5c7)['to'](this),this[_0x51cc7d(0x145)]['on'](_0x51cc7d(0xc8),(_0x578ebd,{showDiff:_0x1c32bd})=>{const _0x351cea=_0x51cc7d;this[_0x351cea(0x136)]=_0x1c32bd;}),_0x3a5622[_0x51cc7d(0x119)][_0x51cc7d(0xf7)]({'id':_0x51cc7d(0xd0),'buttonLabel':_0x5b7b06(this[_0x51cc7d(0xe5)][_0x51cc7d(0xb8)],_0x51cc7d(0x116)),'buttonIcon':_0x363432,'order':0x0,'content':this[_0x51cc7d(0x145)]}),this[_0x51cc7d(0x145)][_0x51cc7d(0xd9)][_0x51cc7d(0x114)](_0x51cc7d(0x14a))['to'](this,_0x51cc7d(0x10f),_0x43a887=>_0x43a887),this[_0x51cc7d(0x145)][_0x51cc7d(0x13c)][_0x51cc7d(0x114)](_0x51cc7d(0x10d))['to'](this,_0x51cc7d(0x10f),_0x351dd7=>_0x351dd7),this[_0x51cc7d(0x145)][_0x51cc7d(0xd9)][_0x51cc7d(0x12b)](this[_0x51cc7d(0x152)]()),this[_0x51cc7d(0x114)](_0x51cc7d(0x122))['to'](this[_0x51cc7d(0x145)][_0x51cc7d(0xd9)],_0x51cc7d(0x122));}[_0xf4a3bc(0xe6)](){const _0x3d8796=_0xf4a3bc;super[_0x3d8796(0xe6)](),this[_0x3d8796(0x120)]&&clearInterval(this[_0x3d8796(0x120)]);}[_0xf4a3bc(0xbb)](_0x325235){const _0xca5200=_0xf4a3bc;this[_0xca5200(0x145)][_0xca5200(0x13c)][_0xca5200(0x12c)](),this[_0xca5200(0x145)][_0xca5200(0xd9)][_0xca5200(0x12f)](),this[_0xca5200(0x145)][_0xca5200(0xd9)][_0xca5200(0x14d)](_0x325235[_0xca5200(0xcd)],!this[_0xca5200(0xe5)][_0xca5200(0x142)][_0xca5200(0xd5)](_0xca5200(0x150))),this[_0xca5200(0x12a)]({'id':_0xca5200(0xf8),'staticMessage':_0x5b7b06(this[_0xca5200(0xe5)][_0xca5200(0xb8)],_0xca5200(0x113))});}[_0xf4a3bc(0x12a)]({id:_0x5ced0a,staticMessage:_0x335ac0}){const _0x2ad8c4=_0xf4a3bc;this[_0x2ad8c4(0x145)][_0x2ad8c4(0x13c)][_0x2ad8c4(0x100)](_0x2ad8c4(0xd8),{'id':_0x5ced0a,'initialContent':_0x2ad8c4(0x13b)+_0x335ac0+_0x2ad8c4(0x112)});}[_0xf4a3bc(0xfe)](_0x322e8d){const _0x2a2176=_0xf4a3bc,_0x34ffc3=_0x322e8d[_0x2a2176(0x158)]?.[_0x2a2176(0x137)]||_0x322e8d[_0x2a2176(0xc2)];this[_0x2a2176(0x145)][_0x2a2176(0x13c)][_0x2a2176(0x100)](_0x2a2176(0xd4),{'contextItems':Array[_0x2a2176(0xdb)](_0x322e8d[_0x2a2176(0x135)][_0x2a2176(0x140)]()),'initialContent':_0x2a2176(0x13b)+_0x34ffc3+_0x2a2176(0x112),'id':_0x322e8d['id']});}[_0xf4a3bc(0xe7)]({errorMessage:_0x8c5ea7,id:_0x437104}){const _0x2ab66b=_0xf4a3bc;this[_0x2ab66b(0x145)][_0x2ab66b(0x13c)][_0x2ab66b(0x100)](_0x2ab66b(0x11c),{'initialContent':_0x2ab66b(0x13b)+_0x8c5ea7+_0x2ab66b(0x112),'id':_0x437104});}[_0xf4a3bc(0xee)](_0x319b58){const _0x4d7d03=_0xf4a3bc;return this[_0x4d7d03(0xcb)][_0x4d7d03(0xe0)](async()=>{const _0x24f48f=_0x4d7d03;this[_0x24f48f(0x145)][_0x24f48f(0x13c)][_0x24f48f(0x100)](_0x24f48f(0xd8),{'id':_0x319b58[_0x24f48f(0x10e)]+':'+_0x319b58['id']}),this[_0x24f48f(0xc5)](null);});}async[_0xf4a3bc(0x153)](_0x31e052){const _0xebfb0b=_0xf4a3bc,_0x15fcf8=_0x137728(this[_0xebfb0b(0xe5)]);let _0x1007cc=_0x15fcf8[_0xebfb0b(0x142)][_0xebfb0b(0xd5)](_0xebfb0b(0xc3))||[..._0x4af346];if(_0x15fcf8[_0xebfb0b(0x14f)][_0xebfb0b(0xd6)](_0xebfb0b(0x10a))){if(!this[_0xebfb0b(0x124)]){this[_0xebfb0b(0x124)]=!0x0;const _0x33b954=_0x15fcf8[_0xebfb0b(0xd7)][_0xebfb0b(0xd5)](_0xebfb0b(0xb6));this[_0xebfb0b(0x145)][_0xebfb0b(0x13c)][_0xebfb0b(0x114)](_0xebfb0b(0x149))['to'](_0x33b954,_0xebfb0b(0xc1));}}else _0x1007cc=_0x1007cc[_0xebfb0b(0x103)](_0x27e058=>_0xebfb0b(0x123)!=_0x27e058);return this[_0xebfb0b(0xcb)][_0xebfb0b(0xe0)](async()=>{const _0x343055=_0xebfb0b;this[_0x343055(0x145)][_0x343055(0x13c)][_0x343055(0x100)](_0x343055(0xf6),{'id':_0x31e052[_0x343055(0x10e)]+':'+_0x31e052['id'],'areActionsDisabled':_0x31e052[_0x343055(0xfa)],'showDiff':this[_0x343055(0x136)],'availableActions':_0x1007cc}),this[_0x343055(0xc5)](null);});}[_0xf4a3bc(0x108)](_0x2a6a29,_0x28afa8){const _0x3f162b=_0xf4a3bc,_0x17f555=this[_0x3f162b(0x145)][_0x3f162b(0x13c)][_0x3f162b(0x138)][_0x3f162b(0xce)];if(_0x17f555 instanceof _0x1ff243)return this[_0x3f162b(0x145)][_0x3f162b(0x13c)][_0x3f162b(0x138)][_0x3f162b(0xdd)](_0x17f555),void this[_0x3f162b(0x145)][_0x3f162b(0x13c)][_0x3f162b(0x100)](_0x3f162b(0xdc),{'id':_0x2a6a29['id'],'capabilities':{'isWebSearchEnabled':_0x17f555[_0x3f162b(0x121)][_0x3f162b(0x11f)]||_0x28afa8[_0x3f162b(0x11f)],'isReasoningEnabled':_0x17f555[_0x3f162b(0x121)][_0x3f162b(0x157)]||_0x28afa8[_0x3f162b(0x157)]}});this[_0x3f162b(0x145)][_0x3f162b(0x13c)][_0x3f162b(0x100)](_0x3f162b(0xdc),{'id':_0x2a6a29['id'],'capabilities':_0x28afa8});}[_0xf4a3bc(0x139)](_0x4b4228){const _0xc2886f=_0xf4a3bc,_0x5ea9f1=this[_0xc2886f(0x145)][_0xc2886f(0x13c)][_0xc2886f(0x138)][_0xc2886f(0x14c)](_0x3c4ab8=>_0x3c4ab8[_0xc2886f(0x14b)]['id']==_0x4b4228['id']&&_0x3c4ab8 instanceof _0x1ff243);_0x5ea9f1&&_0x5ea9f1[_0xc2886f(0xbc)](_0xc2886f(0xe4),_0x4b4228[_0xc2886f(0xe4)]);}async[_0xf4a3bc(0xc9)](_0x30ef83){const _0x3dcf3a=_0xf4a3bc,_0x4ceea7=_0x30ef83[_0x3dcf3a(0xc0)]||this[_0x3dcf3a(0xbe)];return this[_0x3dcf3a(0xcb)][_0x3dcf3a(0xe0)](async _0x104129=>{const _0x4d245a=_0x3dcf3a;await this[_0x4d245a(0x145)][_0x4d245a(0x13c)][_0x4d245a(0xb3)]({..._0x30ef83,'abortSignal':_0x104129,'renderingStrategy':_0x4ceea7}),_0x30ef83[_0x4d245a(0x10b)]&&this[_0x4d245a(0x128)](_0x30ef83['id']);});}[_0xf4a3bc(0xd1)](_0x27dd29,_0x5b07d7){const _0x40489f=_0xf4a3bc;this[_0x40489f(0x145)][_0x40489f(0x13c)][_0x40489f(0x127)](_0x27dd29,_0x5b07d7);}async[_0xf4a3bc(0x146)](_0x27bbe4){const _0x3d1704=_0xf4a3bc,_0x5855e=_0x27bbe4[_0x3d1704(0xc0)]||this[_0x3d1704(0xbe)];return this[_0x3d1704(0xcb)][_0x3d1704(0xe0)](async _0x24845d=>{const _0x50b104=_0x3d1704;await this[_0x50b104(0x145)][_0x50b104(0x13c)][_0x50b104(0xe2)]({..._0x27bbe4,'abortSignal':_0x24845d,'renderingStrategy':_0x5855e}),_0x27bbe4[_0x50b104(0x10b)]&&this[_0x50b104(0x128)](_0x27bbe4['id']);});}[_0xf4a3bc(0x143)](_0x16b793){const _0x42eddc=_0xf4a3bc;this[_0x42eddc(0x145)][_0x42eddc(0x13c)][_0x42eddc(0xe1)](_0x16b793);}[_0xf4a3bc(0x128)](_0x571cac){const _0x2c4107=_0xf4a3bc;this[_0x2c4107(0x145)][_0x2c4107(0x13c)][_0x2c4107(0xff)](_0x571cac);}[_0xf4a3bc(0xfd)](_0x4c5ea2){const _0x2aaa13=_0xf4a3bc;this[_0x2aaa13(0x145)][_0x2aaa13(0x13c)][_0x2aaa13(0xfc)]()[_0x2aaa13(0x103)](_0x1533d7=>_0x1533d7[_0x2aaa13(0x13e)](_0x4c5ea2))[_0x2aaa13(0xeb)](_0x6bf40=>this[_0x2aaa13(0x145)][_0x2aaa13(0x13c)][_0x2aaa13(0xc4)](_0x6bf40));}[_0xf4a3bc(0xf5)](){const _0x2e61a9=_0xf4a3bc;this[_0x2e61a9(0xc5)]({'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x1}),this[_0x2e61a9(0x145)][_0x2e61a9(0xd9)][_0x2e61a9(0x132)](!this[_0x2e61a9(0xe5)][_0x2e61a9(0x142)][_0x2e61a9(0xd5)](_0x2e61a9(0x150))),this[_0x2e61a9(0x10f)]=!0x0,this[_0x2e61a9(0x145)][_0x2e61a9(0x13c)][_0x2e61a9(0x134)]();}[_0xf4a3bc(0xb4)](_0x30b9c0){const _0x442b61=_0xf4a3bc;this[_0x442b61(0xcb)][_0x442b61(0x12e)](),this[_0x442b61(0x145)][_0x442b61(0x13c)][_0x442b61(0xfc)]()[_0x442b61(0x103)](_0x3da9d5=>_0x3da9d5[_0x442b61(0x13e)](_0x30b9c0['id']))[_0x442b61(0xeb)](_0x1a483d=>this[_0x442b61(0x128)](_0x1a483d)),this[_0x442b61(0x10f)]=!0x1,this[_0x442b61(0x145)][_0x442b61(0x13c)][_0x442b61(0x125)]();}async[_0xf4a3bc(0xed)](){const _0x2366a1=_0xf4a3bc;return this[_0x2366a1(0xcb)][_0x2366a1(0xfb)][_0x2366a1(0x126)](()=>{const _0x4e6826=_0x2366a1;this[_0x4e6826(0x10f)]=!0x1,this[_0x4e6826(0x145)][_0x4e6826(0x13c)][_0x4e6826(0x125)]();});}[_0xf4a3bc(0x147)](_0x47c75b,_0x1a9767){const _0x4ad6f7=_0xf4a3bc;this[_0x4ad6f7(0x145)][_0x4ad6f7(0xd9)][_0x4ad6f7(0x147)](_0x47c75b,_0x1a9767);}[_0xf4a3bc(0xbd)](_0x261142){const _0x7b5eed=_0xf4a3bc;this[_0x7b5eed(0x145)][_0x7b5eed(0xd9)][_0x7b5eed(0xbd)](_0x261142);}[_0xf4a3bc(0x13d)](_0xb8c28f,_0x207660){const _0x336830=_0xf4a3bc;this[_0x336830(0x145)][_0x336830(0xd9)][_0x336830(0x13d)](_0xb8c28f,_0x207660);}[_0xf4a3bc(0x129)](_0xef312d){const _0x20385c=_0xf4a3bc;this[_0x20385c(0x145)][_0x20385c(0xd9)][_0x20385c(0x129)](_0xef312d);}[_0xf4a3bc(0x10c)](_0x307e97){const _0x15938d=_0xf4a3bc;this[_0x15938d(0x145)][_0x15938d(0xd9)][_0x15938d(0x10c)](_0x307e97);}[_0xf4a3bc(0xb7)](){const _0x192a36=_0xf4a3bc;this[_0x192a36(0x145)][_0x192a36(0xd9)][_0x192a36(0xb7)]();}[_0xf4a3bc(0xbf)](){const _0x1a6fbf=_0xf4a3bc;this[_0x1a6fbf(0x145)][_0x1a6fbf(0xd9)][_0x1a6fbf(0xbf)]();}[_0xf4a3bc(0xf1)](_0xe4968a,_0x536bdb,_0x4d62f6){const _0x4a5b06=_0xf4a3bc;this[_0x4a5b06(0x145)][_0x4a5b06(0xd9)][_0x4a5b06(0xf1)](_0xe4968a,_0x536bdb,_0x4d62f6);}[_0xf4a3bc(0xcf)](){const _0x48b6a3=_0xf4a3bc;this[_0x48b6a3(0x145)][_0x48b6a3(0xd9)][_0x48b6a3(0xcf)](),this[_0x48b6a3(0x145)][_0x48b6a3(0xd9)][_0x48b6a3(0x12b)](this[_0x48b6a3(0x152)]());}[_0xf4a3bc(0xe9)](_0x1d3c84){const _0x29d78e=_0xf4a3bc;this[_0x29d78e(0x145)][_0x29d78e(0xd9)][_0x29d78e(0xe9)](_0x1d3c84);}[_0xf4a3bc(0xba)](_0x5558e0){const _0x3bd25f=_0xf4a3bc;this[_0x3bd25f(0x145)][_0x3bd25f(0xd9)][_0x3bd25f(0x133)](_0x5558e0[_0x3bd25f(0x11f)]),this[_0x3bd25f(0x145)][_0x3bd25f(0xd9)][_0x3bd25f(0x156)](_0x5558e0[_0x3bd25f(0x157)]),this[_0x3bd25f(0x145)][_0x3bd25f(0xd9)][_0x3bd25f(0x12b)](this[_0x3bd25f(0x152)](_0x5558e0));}[_0xf4a3bc(0xf9)](_0x9d9e3,_0x3623cc){const _0x2bf962=_0xf4a3bc;this[_0x2bf962(0x145)][_0x2bf962(0xd9)][_0x2bf962(0xf2)](_0x9d9e3),_0x3623cc&&this[_0x2bf962(0x145)][_0x2bf962(0xd9)][_0x2bf962(0x132)](!0x1);}[_0xf4a3bc(0x11a)](_0x4dc040){const _0x1510b7=_0xf4a3bc;this[_0x1510b7(0xbe)]=_0x4dc040;}[_0xf4a3bc(0xe3)](_0x5201a7){const _0x1ef34c=_0xf4a3bc;this[_0x1ef34c(0x145)][_0x1ef34c(0x13c)][_0x1ef34c(0xe3)](_0x5201a7);}[_0xf4a3bc(0xd2)](){const _0xc6947c=_0xf4a3bc;this[_0xc6947c(0x111)](_0x5b7b06(this[_0xc6947c(0xe5)][_0xc6947c(0xb8)],_0xc6947c(0x116)));}[_0xf4a3bc(0x111)](_0x49b85b,_0x175783=!0x1){const _0xe02b0a=_0xf4a3bc;if(_0x175783&&!_0x115c84()&&_0x49b85b[_0xe02b0a(0x101)])return this[_0xe02b0a(0x145)][_0xe02b0a(0x118)][_0xe02b0a(0xb5)]='',void this[_0xe02b0a(0x110)](_0x49b85b);this[_0xe02b0a(0x145)][_0xe02b0a(0x118)][_0xe02b0a(0xb5)]=_0x49b85b;}[_0xf4a3bc(0xc5)](_0x481684){const _0x5b6747=_0xf4a3bc,_0x20423b=this[_0x5b6747(0x130)](_0x481684);this[_0x5b6747(0x145)][_0x5b6747(0x13c)][_0x5b6747(0xc5)](_0x20423b);}[_0xf4a3bc(0x110)](_0x4f03cc){const _0x47d8bc=_0xf4a3bc;let _0x8f2b30=0x0;clearInterval(this[_0x47d8bc(0x120)]),this[_0x47d8bc(0x120)]=setInterval(()=>{const _0x478fe3=_0x47d8bc;this[_0x478fe3(0x145)][_0x478fe3(0x118)][_0x478fe3(0xb5)]=this[_0x478fe3(0x145)][_0x478fe3(0x118)][_0x478fe3(0xb5)]+_0x4f03cc[_0x8f2b30],_0x8f2b30++,_0x8f2b30===_0x4f03cc[_0x478fe3(0x101)]&&clearInterval(this[_0x478fe3(0x120)]);},0x1e);}[_0xf4a3bc(0x154)](_0x2bc3f6){const _0x35fac7=_0xf4a3bc;this[_0x35fac7(0x145)][_0x35fac7(0x118)][_0x35fac7(0xb9)]=_0x2bc3f6;}[_0xf4a3bc(0x130)](_0x2cd3b4){const _0x1cd785=_0xf4a3bc;return _0x2cd3b4?_0x2cd3b4[_0x1cd785(0x11f)]&&_0x2cd3b4[_0x1cd785(0x157)]?_0x5b7b06(this[_0x1cd785(0xe5)][_0x1cd785(0xb8)],_0x1cd785(0x11d)):_0x2cd3b4[_0x1cd785(0x11f)]?_0x5b7b06(this[_0x1cd785(0xe5)][_0x1cd785(0xb8)],_0x1cd785(0xca)):_0x2cd3b4[_0x1cd785(0x157)]?_0x5b7b06(this[_0x1cd785(0xe5)][_0x1cd785(0xb8)],_0x1cd785(0x148)):_0x5b7b06(this[_0x1cd785(0xe5)][_0x1cd785(0xb8)],_0x1cd785(0xc7)):'';}[_0xf4a3bc(0x152)](_0x5d14f5){const _0x294014=_0xf4a3bc;return _0x5d14f5?_0x5d14f5[_0x294014(0x11f)]&&_0x5d14f5[_0x294014(0x157)]?_0x5b7b06(this[_0x294014(0xe5)][_0x294014(0xb8)],_0x294014(0xf4)):_0x5d14f5[_0x294014(0x11f)]?_0x5b7b06(this[_0x294014(0xe5)][_0x294014(0xb8)],_0x294014(0xda)):_0x5d14f5[_0x294014(0x157)]?_0x5b7b06(this[_0x294014(0xe5)][_0x294014(0xb8)],_0x294014(0x155)):_0x5b7b06(this[_0x294014(0xe5)][_0x294014(0xb8)],_0x294014(0xcc)):_0x5b7b06(this[_0x294014(0xe5)][_0x294014(0xb8)],_0x294014(0xcc));}[_0xf4a3bc(0x11b)](_0x37cef9,_0x44a3ef,_0x5b6be2,_0x4c52ad){const _0xc14b2e=_0xf4a3bc;this[_0xc14b2e(0x145)][_0xc14b2e(0x11b)](_0x37cef9,_0x44a3ef,_0x5b6be2,_0x4c52ad);}[_0xf4a3bc(0xf3)](_0x68973e){const _0x592373=_0xf4a3bc;this[_0x592373(0x145)][_0x592373(0xf3)](_0x68973e);}[_0xf4a3bc(0xc6)](){const _0x21bbbb=_0xf4a3bc;this[_0x21bbbb(0x145)][_0x21bbbb(0xd9)][_0x21bbbb(0xc6)]();}[_0xf4a3bc(0x12d)](_0x32b8d5,_0x252652){const _0x2ea90a=_0xf4a3bc;this[_0x2ea90a(0x145)][_0x2ea90a(0x13c)][_0x2ea90a(0xea)](_0x32b8d5,_0x252652);}[_0xf4a3bc(0x134)](){const _0x2a1d60=_0xf4a3bc;this[_0x2a1d60(0x145)][_0x2a1d60(0x13c)][_0x2a1d60(0x134)]();}[_0xf4a3bc(0x105)](){const _0x12f7d6=_0xf4a3bc;this[_0x12f7d6(0x145)][_0x12f7d6(0xd9)][_0x12f7d6(0x13f)]=!0x0;}[_0xf4a3bc(0xe8)](){const _0x2b25dd=_0xf4a3bc;this[_0x2b25dd(0x145)][_0x2b25dd(0xd9)][_0x2b25dd(0x13f)]=!0x1;}}
23
+ const _0x3563f4=_0x47d6;(function(_0x4a70e5,_0x5ce4a2){const _0x1eb5e2=_0x47d6,_0x2870a5=_0x4a70e5();while(!![]){try{const _0x5cc71f=parseInt(_0x1eb5e2(0x7e))/0x1+parseInt(_0x1eb5e2(0x9c))/0x2+-parseInt(_0x1eb5e2(0x8a))/0x3+-parseInt(_0x1eb5e2(0xa9))/0x4*(-parseInt(_0x1eb5e2(0xcc))/0x5)+parseInt(_0x1eb5e2(0xea))/0x6*(-parseInt(_0x1eb5e2(0xc3))/0x7)+parseInt(_0x1eb5e2(0xef))/0x8*(parseInt(_0x1eb5e2(0x71))/0x9)+-parseInt(_0x1eb5e2(0x85))/0xa*(-parseInt(_0x1eb5e2(0xa2))/0xb);if(_0x5cc71f===_0x5ce4a2)break;else _0x2870a5['push'](_0x2870a5['shift']());}catch(_0x4b9690){_0x2870a5['push'](_0x2870a5['shift']());}}}(_0x2330,0xdb3cc));import{ContextPlugin as _0x57184f}from'ckeditor5/src/core.js';import{_isMotionReduced as _0x486b0f}from'ckeditor5/src/utils.js';function _0x2330(){const _0xcb50d3=['config','_getInputPlaceholder','interactionId','remove','updateFeedItemAIReplySources','setInputPlaceholder','AI_CHAT_FEED_LOADING_MESSAGE_REGULAR','stopInteraction','children','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REGULAR','values','chatFeed','forEach','AI_CHAT_FEED_LOADING_MESSAGE_REASONING','AIChatUI','clearPendingContextUI','user-message','isOfficialPlugin','context','9hBfyzZ','setContextItemLoading','isDisabled','queueEmptyPromise','isReasoningEnabled','resetConversationTitle','updateWebSources','abort','updateFeedInteractionHeader','isPremiumPlugin','availableModels','focusPromptInput','destroy','1554362JQSjRp','enableControls','updateReplyItem','get','label','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH_REASONING','setConversationContext','440yPJhhE','capabilities','removeItem','ai-reply','streaming','3503127SWuCus','_getLoadingMessage','addTab','populateSourceResourceBalloon','updateResourceState','scrollFeedToSuggestion','closeSourceResourceBalloon','chatHeader','ai-suggestion-reply','then','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH','_promiseQueue','addFeedItemError','set','_view','contextItems','markItemAsDone','stopAutoScroll','876050cKhXgL','filter','isDone','isWebSearchEnabled','insertSuggestion','getItemIds','181599jIdrKD','AI_CHAT_WELCOME_MESSAGE','setWebSearch','updateFeedItemAIReplySuggestionContent','areActionsDisabled','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REASONING','conversation-start','8eryHWB','enqueue','showDiff','commands','_isTrackChangesCommandValueBound','toggleLoadingSkeleton','requires','userMessage','updateFeedItemAIReplySuggestionPartState','AI_CHAT_HEADING','bind','removeContextItem','plugins','pluginName','removeFeedInteraction','_titleAnimationInterval','resetMessageInput','last','ai.chat.context.searchInputVisibleFrom','view','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH','locale','ai.availableReplyActions','setReasoning','finishInteraction','createConversation','9814931CooxAi','feedItemRenderingStrategy','value','displayedPrompt','setIsUploadInProgress','isVisible','_animateConversationTitle','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH_REASONING','error-message','1286620CykYuB','markFeedItemAsDone','isModelAvailable','length','ai.chat.models.modelSelectorAlwaysVisible','</p>','disableControls','addFeedItemUserMessage','isMaximized','isTrackChangesOn','setLoadingMessage','addItem','setSelectedModel','setAddContextOptions','find','startAutoScroll','trackChanges','chatControls','clear','disableModelSelector','addFeedItemStaticMessage','addContextItem','enableModelSelector','setModel','startsWith','addFeedInteractionHeader','isPending','AITabs','TrackChanges','chat','6jiGeEZ','updateCapabilities','startInteraction','quickActionData','renderingStrategy','1875256aAGkoM','addFeedItemAIReply','setIsMaximized','isLoading','setModelList','interaction-header','options','updateFeedItemAIReplyContent','updateSuggestionPartState','delegate','clearConversationContextUI','updateSuggestionItem','showResizeButton','has','isBusy','addFeedItemAISuggestion','toggleSuggestionDisplayMode','setFeedItemRenderingStrategy','setConversationTitle','_interactionPromiseResolver','<p>','from','scrollToSuggestion'];_0x2330=function(){return _0xcb50d3;};return _0x2330();}import{AIChatView as _0x27ecae}from'./ui/aichatview.js';import{AITabs as _0x5ca0d6}from'../aitabs/aitabs.js';import{getTranslation as _0x404817}from'../aicore/utils/common-translations.js';import{IconAIChat as _0x125337}from'ckeditor5/src/icons.js';import{AIChatFeedInteractionHeaderView as _0x543ae6}from'./ui/feed/aichatfeedinteractionheaderview.js';import{PromiseQueue as _0x31cbc7}from'./utils/promisequeue.js';import{AI_CHAT_UI_EVENT_NAMES as _0x3186af}from'./utils/eventnames.js';import'../../theme/aichat/aichat.css';function _0x47d6(_0x282cd8,_0x1ee269){const _0x23305a=_0x2330();return _0x47d6=function(_0x47d638,_0x18caf0){_0x47d638=_0x47d638-0x6f;let _0x41c0bf=_0x23305a[_0x47d638];return _0x41c0bf;},_0x47d6(_0x282cd8,_0x1ee269);}import{getEditorFromContext as _0x2ebfe9}from'../aicore/utils/geteditorfromcontext.js';import{AI_REPLY_ACTIONS as _0x4830ed}from'./ui/feed/aichatfeedsuggestionitemactionsview.js';export class AIChatUI extends _0x57184f{static get[_0x3563f4(0xaf)](){return[_0x5ca0d6];}[_0x3563f4(0x98)];static get[_0x3563f4(0xb6)](){const _0x3109e1=_0x3563f4;return _0x3109e1(0x114);}static get[_0x3563f4(0x6f)](){return!0x0;}static get[_0x3563f4(0x7a)](){return!0x0;}[_0x3563f4(0xc4)]=_0x3563f4(0x89);[_0x3563f4(0xab)]=!0x0;[_0x3563f4(0x95)];[_0x3563f4(0x102)];[_0x3563f4(0xb8)]=void 0x0;[_0x3563f4(0xad)]=!0x1;constructor(_0x2872f5){const _0x3cd9c3=_0x3563f4;super(_0x2872f5);const _0x39e399=this[_0x3cd9c3(0x70)][_0x3cd9c3(0xb5)][_0x3cd9c3(0x81)](_0x3cd9c3(0xe7));this[_0x3cd9c3(0x97)](_0x3cd9c3(0xfd),!0x1),this[_0x3cd9c3(0x95)]=new _0x31cbc7(),this[_0x3cd9c3(0x98)]=new _0x27ecae(this[_0x3cd9c3(0x70)][_0x3cd9c3(0xbe)],{'showResizeButton':_0x39e399[_0x3cd9c3(0xfb)],'contextResourcesSearchInputVisibleFrom':this[_0x3cd9c3(0x70)][_0x3cd9c3(0x106)][_0x3cd9c3(0x81)](_0x3cd9c3(0xbb))}),this[_0x3cd9c3(0x98)][_0x3cd9c3(0xf8)](..._0x3186af)['to'](this),this[_0x3cd9c3(0x98)]['on'](_0x3cd9c3(0xff),(_0x4aac14,{showDiff:_0x5205d1})=>{const _0x44984d=_0x3cd9c3;this[_0x44984d(0xab)]=_0x5205d1;}),_0x39e399[_0x3cd9c3(0xbc)][_0x3cd9c3(0x8c)]({'id':_0x3cd9c3(0xe9),'buttonLabel':_0x404817(this[_0x3cd9c3(0x70)][_0x3cd9c3(0xbe)],_0x3cd9c3(0xb2)),'buttonIcon':_0x125337,'order':0x0,'content':this[_0x3cd9c3(0x98)]}),this[_0x3cd9c3(0x98)][_0x3cd9c3(0xdd)][_0x3cd9c3(0xb3)](_0x3cd9c3(0xf2))['to'](this,_0x3cd9c3(0xfd),_0x521b0c=>_0x521b0c),this[_0x3cd9c3(0x98)][_0x3cd9c3(0x111)][_0x3cd9c3(0xb3)](_0x3cd9c3(0xe6))['to'](this,_0x3cd9c3(0xfd),_0x2d2986=>_0x2d2986),this[_0x3cd9c3(0x98)][_0x3cd9c3(0xdd)][_0x3cd9c3(0x10b)](this[_0x3cd9c3(0x107)]()),this[_0x3cd9c3(0xb3)](_0x3cd9c3(0xce))['to'](this[_0x3cd9c3(0x98)][_0x3cd9c3(0xdd)],_0x3cd9c3(0xce));}[_0x3563f4(0x7d)](){const _0x6d56fd=_0x3563f4;super[_0x6d56fd(0x7d)](),this[_0x6d56fd(0xb8)]&&clearInterval(this[_0x6d56fd(0xb8)]);}[_0x3563f4(0xc2)](_0x531e3e){const _0x16e8ae=_0x3563f4;this[_0x16e8ae(0x98)][_0x16e8ae(0x111)][_0x16e8ae(0xde)](),this[_0x16e8ae(0x98)][_0x16e8ae(0xdd)][_0x16e8ae(0xe2)](),this[_0x16e8ae(0x98)][_0x16e8ae(0xdd)][_0x16e8ae(0xf3)](_0x531e3e[_0x16e8ae(0x7b)],!this[_0x16e8ae(0x70)][_0x16e8ae(0x106)][_0x16e8ae(0x81)](_0x16e8ae(0xd0))),this[_0x16e8ae(0xe0)]({'id':_0x16e8ae(0xa8),'staticMessage':_0x404817(this[_0x16e8ae(0x70)][_0x16e8ae(0xbe)],_0x16e8ae(0xa3))});}[_0x3563f4(0xe0)]({id:_0x5212f0,staticMessage:_0x309ae8}){const _0x1b5a79=_0x3563f4;this[_0x1b5a79(0x98)][_0x1b5a79(0x111)][_0x1b5a79(0xd7)](_0x1b5a79(0x88),{'id':_0x5212f0,'initialContent':_0x1b5a79(0x103)+_0x309ae8+_0x1b5a79(0xd1)});}[_0x3563f4(0xd3)](_0x501074){const _0x287b92=_0x3563f4,_0x4a22a3=_0x501074[_0x287b92(0xed)]?.[_0x287b92(0xc6)]||_0x501074[_0x287b92(0xb0)];this[_0x287b92(0x98)][_0x287b92(0x111)][_0x287b92(0xd7)](_0x287b92(0x116),{'contextItems':Array[_0x287b92(0x104)](_0x501074[_0x287b92(0x99)][_0x287b92(0x110)]()),'initialContent':_0x287b92(0x103)+_0x4a22a3+_0x287b92(0xd1),'id':_0x501074['id']});}[_0x3563f4(0x96)]({errorMessage:_0x3a1733,id:_0x4c1c88}){const _0x511e4f=_0x3563f4;this[_0x511e4f(0x98)][_0x511e4f(0x111)][_0x511e4f(0xd7)](_0x511e4f(0xcb),{'initialContent':_0x511e4f(0x103)+_0x3a1733+_0x511e4f(0xd1),'id':_0x4c1c88});}[_0x3563f4(0xf0)](_0x1e5b55){const _0x1b22e7=_0x3563f4;return this[_0x1b22e7(0x95)][_0x1b22e7(0xaa)](async()=>{const _0x1f09b0=_0x1b22e7;this[_0x1f09b0(0x98)][_0x1f09b0(0x111)][_0x1f09b0(0xd7)](_0x1f09b0(0x88),{'id':_0x1e5b55[_0x1f09b0(0x108)]+':'+_0x1e5b55['id']}),this[_0x1f09b0(0xd6)](null);});}async[_0x3563f4(0xfe)](_0x2b00a4){const _0x19df24=_0x3563f4,_0x17274b=_0x2ebfe9(this[_0x19df24(0x70)]);let _0x89c813=_0x17274b[_0x19df24(0x106)][_0x19df24(0x81)](_0x19df24(0xbf))||[..._0x4830ed];if(_0x17274b[_0x19df24(0xb5)][_0x19df24(0xfc)](_0x19df24(0xe8))){if(!this[_0x19df24(0xad)]){this[_0x19df24(0xad)]=!0x0;const _0x963930=_0x17274b[_0x19df24(0xac)][_0x19df24(0x81)](_0x19df24(0xdc));this[_0x19df24(0x98)][_0x19df24(0x111)][_0x19df24(0xb3)](_0x19df24(0xd5))['to'](_0x963930,_0x19df24(0xc5));}}else _0x89c813=_0x89c813[_0x19df24(0x9d)](_0x507df7=>_0x19df24(0xa0)!=_0x507df7);return this[_0x19df24(0x95)][_0x19df24(0xaa)](async()=>{const _0x3285ad=_0x19df24;this[_0x3285ad(0x98)][_0x3285ad(0x111)][_0x3285ad(0xd7)](_0x3285ad(0x92),{'id':_0x2b00a4[_0x3285ad(0x108)]+':'+_0x2b00a4['id'],'areActionsDisabled':_0x2b00a4[_0x3285ad(0xa6)],'showDiff':this[_0x3285ad(0xab)],'availableActions':_0x89c813}),this[_0x3285ad(0xd6)](null);});}[_0x3563f4(0xe5)](_0x52c381,_0x534dab){const _0x425992=_0x3563f4,_0x579231=this[_0x425992(0x98)][_0x425992(0x111)][_0x425992(0x10e)][_0x425992(0xba)];if(_0x579231 instanceof _0x543ae6)return this[_0x425992(0x98)][_0x425992(0x111)][_0x425992(0x10e)][_0x425992(0x109)](_0x579231),void this[_0x425992(0x98)][_0x425992(0x111)][_0x425992(0xd7)](_0x425992(0xf4),{'id':_0x52c381['id'],'capabilities':{'isWebSearchEnabled':_0x579231[_0x425992(0x86)][_0x425992(0x9f)]||_0x534dab[_0x425992(0x9f)],'isReasoningEnabled':_0x579231[_0x425992(0x86)][_0x425992(0x75)]||_0x534dab[_0x425992(0x75)]}});this[_0x425992(0x98)][_0x425992(0x111)][_0x425992(0xd7)](_0x425992(0xf4),{'id':_0x52c381['id'],'capabilities':_0x534dab});}[_0x3563f4(0x79)](_0x249f73){const _0x20d0e6=_0x3563f4,_0x3a49c8=this[_0x20d0e6(0x98)][_0x20d0e6(0x111)][_0x20d0e6(0x10e)][_0x20d0e6(0xda)](_0x4053fd=>_0x4053fd[_0x20d0e6(0xf5)]['id']==_0x249f73['id']&&_0x4053fd instanceof _0x543ae6);_0x3a49c8&&_0x3a49c8[_0x20d0e6(0x97)](_0x20d0e6(0xc8),_0x249f73[_0x20d0e6(0xc8)]);}async[_0x3563f4(0xf6)](_0x1b2e34){const _0x1c2a73=_0x3563f4,_0x47ee52=_0x1b2e34[_0x1c2a73(0xee)]||this[_0x1c2a73(0xc4)];return this[_0x1c2a73(0x95)][_0x1c2a73(0xaa)](async _0x10ce57=>{const _0xeb8cd1=_0x1c2a73;await this[_0xeb8cd1(0x98)][_0xeb8cd1(0x111)][_0xeb8cd1(0x80)]({..._0x1b2e34,'abortSignal':_0x10ce57,'renderingStrategy':_0x47ee52}),_0x1b2e34[_0xeb8cd1(0x9e)]&&this[_0xeb8cd1(0xcd)](_0x1b2e34['id']);});}[_0x3563f4(0x10a)](_0x58474c,_0x3a6865){const _0x26bfe6=_0x3563f4;this[_0x26bfe6(0x98)][_0x26bfe6(0x111)][_0x26bfe6(0x77)](_0x58474c,_0x3a6865);}async[_0x3563f4(0xa5)](_0x104600){const _0x312b88=_0x3563f4,_0x38c910=_0x104600[_0x312b88(0xee)]||this[_0x312b88(0xc4)];return this[_0x312b88(0x95)][_0x312b88(0xaa)](async _0x2ff6f0=>{const _0x34c700=_0x312b88;await this[_0x34c700(0x98)][_0x34c700(0x111)][_0x34c700(0xfa)]({..._0x104600,'abortSignal':_0x2ff6f0,'renderingStrategy':_0x38c910}),_0x104600[_0x34c700(0x9e)]&&this[_0x34c700(0xcd)](_0x104600['id']);});}[_0x3563f4(0xb1)](_0x26ed28){const _0x19d638=_0x3563f4;this[_0x19d638(0x98)][_0x19d638(0x111)][_0x19d638(0xf7)](_0x26ed28);}[_0x3563f4(0xcd)](_0x5be70e){const _0x1fa41a=_0x3563f4;this[_0x1fa41a(0x98)][_0x1fa41a(0x111)][_0x1fa41a(0x9a)](_0x5be70e);}[_0x3563f4(0xb7)](_0x56e106){const _0xa27bc0=_0x3563f4;this[_0xa27bc0(0x98)][_0xa27bc0(0x111)][_0xa27bc0(0xa1)]()[_0xa27bc0(0x9d)](_0x5cfdfc=>_0x5cfdfc[_0xa27bc0(0xe4)](_0x56e106))[_0xa27bc0(0x112)](_0x2850ff=>this[_0xa27bc0(0x98)][_0xa27bc0(0x111)][_0xa27bc0(0x87)](_0x2850ff));}[_0x3563f4(0xec)](){const _0xc2f161=_0x3563f4;this[_0xc2f161(0xd6)]({'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x1}),this[_0xc2f161(0x98)][_0xc2f161(0xdd)][_0xc2f161(0xdf)](!this[_0xc2f161(0x70)][_0xc2f161(0x106)][_0xc2f161(0x81)](_0xc2f161(0xd0))),this[_0xc2f161(0xfd)]=!0x0,this[_0xc2f161(0x98)][_0xc2f161(0x111)][_0xc2f161(0xdb)]();}[_0x3563f4(0x10d)](_0x263c87){const _0x1af40b=_0x3563f4;this[_0x1af40b(0x95)][_0x1af40b(0x78)](),this[_0x1af40b(0x98)][_0x1af40b(0x111)][_0x1af40b(0xa1)]()[_0x1af40b(0x9d)](_0x295456=>_0x295456[_0x1af40b(0xe4)](_0x263c87['id']))[_0x1af40b(0x112)](_0x38e6ee=>this[_0x1af40b(0xcd)](_0x38e6ee)),this[_0x1af40b(0xfd)]=!0x1,this[_0x1af40b(0x98)][_0x1af40b(0x111)][_0x1af40b(0x9b)]();}async[_0x3563f4(0xc1)](){const _0x1155a7=_0x3563f4;return this[_0x1155a7(0x95)][_0x1155a7(0x74)][_0x1155a7(0x93)](()=>{const _0x2d58a1=_0x1155a7;this[_0x2d58a1(0xfd)]=!0x1,this[_0x2d58a1(0x98)][_0x2d58a1(0x111)][_0x2d58a1(0x9b)]();});}[_0x3563f4(0xe1)](_0x1d2b34,_0x317379){const _0x577dea=_0x3563f4;this[_0x577dea(0x98)][_0x577dea(0xdd)][_0x577dea(0xe1)](_0x1d2b34,_0x317379);}[_0x3563f4(0xb4)](_0x4cdb71){const _0x38578c=_0x3563f4;this[_0x38578c(0x98)][_0x38578c(0xdd)][_0x38578c(0xb4)](_0x4cdb71);}[_0x3563f4(0x72)](_0x2d6cf5,_0x238490){const _0x3e14f5=_0x3563f4;this[_0x3e14f5(0x98)][_0x3e14f5(0xdd)][_0x3e14f5(0x72)](_0x2d6cf5,_0x238490);}[_0x3563f4(0xc7)](_0x21d9b4){const _0x875e6d=_0x3563f4;this[_0x875e6d(0x98)][_0x875e6d(0xdd)][_0x875e6d(0xc7)](_0x21d9b4);}[_0x3563f4(0x84)](_0x34ed8e){const _0x521b7a=_0x3563f4;this[_0x521b7a(0x98)][_0x521b7a(0xdd)][_0x521b7a(0x84)](_0x34ed8e);}[_0x3563f4(0x115)](){const _0x4db0c7=_0x3563f4;this[_0x4db0c7(0x98)][_0x4db0c7(0xdd)][_0x4db0c7(0x115)]();}[_0x3563f4(0xf9)](){const _0x2c5749=_0x3563f4;this[_0x2c5749(0x98)][_0x2c5749(0xdd)][_0x2c5749(0xf9)]();}[_0x3563f4(0x8e)](_0x3725a8,_0xf8e643,_0x57e044){const _0x4392cf=_0x3563f4;this[_0x4392cf(0x98)][_0x4392cf(0xdd)][_0x4392cf(0x8e)](_0x3725a8,_0xf8e643,_0x57e044);}[_0x3563f4(0xb9)](){const _0x2ec29c=_0x3563f4;this[_0x2ec29c(0x98)][_0x2ec29c(0xdd)][_0x2ec29c(0xb9)](),this[_0x2ec29c(0x98)][_0x2ec29c(0xdd)][_0x2ec29c(0x10b)](this[_0x2ec29c(0x107)]());}[_0x3563f4(0xd9)](_0x5f106f){const _0x26f8e8=_0x3563f4;this[_0x26f8e8(0x98)][_0x26f8e8(0xdd)][_0x26f8e8(0xd9)](_0x5f106f);}[_0x3563f4(0xeb)](_0x59a133){const _0x394e9d=_0x3563f4;this[_0x394e9d(0x98)][_0x394e9d(0xdd)][_0x394e9d(0xa4)](_0x59a133[_0x394e9d(0x9f)]),this[_0x394e9d(0x98)][_0x394e9d(0xdd)][_0x394e9d(0xc0)](_0x59a133[_0x394e9d(0x75)]),this[_0x394e9d(0x98)][_0x394e9d(0xdd)][_0x394e9d(0x10b)](this[_0x394e9d(0x107)](_0x59a133));}[_0x3563f4(0xd8)](_0x210b4d,_0x329264){const _0x5a779b=_0x3563f4;this[_0x5a779b(0x98)][_0x5a779b(0xdd)][_0x5a779b(0xe3)](_0x210b4d),_0x329264&&this[_0x5a779b(0x98)][_0x5a779b(0xdd)][_0x5a779b(0xdf)](!0x1);}[_0x3563f4(0x100)](_0x425108){const _0x2ea85d=_0x3563f4;this[_0x2ea85d(0xc4)]=_0x425108;}[_0x3563f4(0xae)](_0x176e97){const _0x2b7a5f=_0x3563f4;this[_0x2b7a5f(0x98)][_0x2b7a5f(0x111)][_0x2b7a5f(0xae)](_0x176e97);}[_0x3563f4(0x76)](){const _0x48f049=_0x3563f4;this[_0x48f049(0x101)](_0x404817(this[_0x48f049(0x70)][_0x48f049(0xbe)],_0x48f049(0xb2)));}[_0x3563f4(0x101)](_0x5d8152,_0x1d7e21=!0x1){const _0x4380cf=_0x3563f4;if(_0x1d7e21&&!_0x486b0f()&&_0x5d8152[_0x4380cf(0xcf)])return this[_0x4380cf(0x98)][_0x4380cf(0x91)][_0x4380cf(0x82)]='',void this[_0x4380cf(0xc9)](_0x5d8152);this[_0x4380cf(0x98)][_0x4380cf(0x91)][_0x4380cf(0x82)]=_0x5d8152;}[_0x3563f4(0xd6)](_0x6cf509){const _0x41ad85=_0x3563f4,_0x4c66b0=this[_0x41ad85(0x8b)](_0x6cf509);this[_0x41ad85(0x98)][_0x41ad85(0x111)][_0x41ad85(0xd6)](_0x4c66b0);}[_0x3563f4(0xc9)](_0x140578){const _0x4a47b7=_0x3563f4;let _0x427745=0x0;clearInterval(this[_0x4a47b7(0xb8)]),this[_0x4a47b7(0xb8)]=setInterval(()=>{const _0x335346=_0x4a47b7;this[_0x335346(0x98)][_0x335346(0x91)][_0x335346(0x82)]=this[_0x335346(0x98)][_0x335346(0x91)][_0x335346(0x82)]+_0x140578[_0x427745],_0x427745++,_0x427745===_0x140578[_0x335346(0xcf)]&&clearInterval(this[_0x335346(0xb8)]);},0x1e);}[_0x3563f4(0xf1)](_0x39d919){const _0x246323=_0x3563f4;this[_0x246323(0x98)][_0x246323(0x91)][_0x246323(0xd4)]=_0x39d919;}[_0x3563f4(0x8b)](_0x3ee2ae){const _0x363fbd=_0x3563f4;return _0x3ee2ae?_0x3ee2ae[_0x363fbd(0x9f)]&&_0x3ee2ae[_0x363fbd(0x75)]?_0x404817(this[_0x363fbd(0x70)][_0x363fbd(0xbe)],_0x363fbd(0x83)):_0x3ee2ae[_0x363fbd(0x9f)]?_0x404817(this[_0x363fbd(0x70)][_0x363fbd(0xbe)],_0x363fbd(0xbd)):_0x3ee2ae[_0x363fbd(0x75)]?_0x404817(this[_0x363fbd(0x70)][_0x363fbd(0xbe)],_0x363fbd(0x113)):_0x404817(this[_0x363fbd(0x70)][_0x363fbd(0xbe)],_0x363fbd(0x10c)):'';}[_0x3563f4(0x107)](_0x1cab42){const _0x456fb1=_0x3563f4;return _0x1cab42?_0x1cab42[_0x456fb1(0x9f)]&&_0x1cab42[_0x456fb1(0x75)]?_0x404817(this[_0x456fb1(0x70)][_0x456fb1(0xbe)],_0x456fb1(0xca)):_0x1cab42[_0x456fb1(0x9f)]?_0x404817(this[_0x456fb1(0x70)][_0x456fb1(0xbe)],_0x456fb1(0x94)):_0x1cab42[_0x456fb1(0x75)]?_0x404817(this[_0x456fb1(0x70)][_0x456fb1(0xbe)],_0x456fb1(0xa7)):_0x404817(this[_0x456fb1(0x70)][_0x456fb1(0xbe)],_0x456fb1(0x10f)):_0x404817(this[_0x456fb1(0x70)][_0x456fb1(0xbe)],_0x456fb1(0x10f));}[_0x3563f4(0x8d)](_0x4af396,_0x4ac97d,_0x66695b,_0x2ea41f){const _0x890dc0=_0x3563f4;this[_0x890dc0(0x98)][_0x890dc0(0x8d)](_0x4af396,_0x4ac97d,_0x66695b,_0x2ea41f);}[_0x3563f4(0x90)](_0x149d9d){const _0x413ebf=_0x3563f4;this[_0x413ebf(0x98)][_0x413ebf(0x90)](_0x149d9d);}[_0x3563f4(0x7c)](){const _0xf80f6a=_0x3563f4;this[_0xf80f6a(0x98)][_0xf80f6a(0xdd)][_0xf80f6a(0x7c)]();}[_0x3563f4(0x8f)](_0x167568,_0x554ddd){const _0x3bb4b0=_0x3563f4;this[_0x3bb4b0(0x98)][_0x3bb4b0(0x111)][_0x3bb4b0(0x105)](_0x167568,_0x554ddd);}[_0x3563f4(0xdb)](){const _0x248ed6=_0x3563f4;this[_0x248ed6(0x98)][_0x248ed6(0x111)][_0x248ed6(0xdb)]();}[_0x3563f4(0xd2)](){const _0x3ed8e7=_0x3563f4;this[_0x3ed8e7(0x98)][_0x3ed8e7(0xdd)][_0x3ed8e7(0x73)]=!0x0;}[_0x3563f4(0x7f)](){const _0x3c3eec=_0x3563f4;this[_0x3c3eec(0x98)][_0x3c3eec(0xdd)][_0x3c3eec(0x73)]=!0x1;}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x3e4626=_0x5302;(function(_0xe01f41,_0x2e8d01){const _0x130950=_0x5302,_0x54ffc5=_0xe01f41();while(!![]){try{const _0x559ce6=parseInt(_0x130950(0x24c))/0x1+parseInt(_0x130950(0x211))/0x2+parseInt(_0x130950(0x1e9))/0x3*(parseInt(_0x130950(0x1fb))/0x4)+parseInt(_0x130950(0x206))/0x5+parseInt(_0x130950(0x215))/0x6+-parseInt(_0x130950(0x1f1))/0x7*(-parseInt(_0x130950(0x242))/0x8)+parseInt(_0x130950(0x22f))/0x9*(-parseInt(_0x130950(0x1f3))/0xa);if(_0x559ce6===_0x2e8d01)break;else _0x54ffc5['push'](_0x54ffc5['shift']());}catch(_0x1a274c){_0x54ffc5['push'](_0x54ffc5['shift']());}}}(_0x3b7c,0xb0bb8));import{CKEditorError as _0x28d55c,ObservableMixin as _0x1e5c16,uid as _0x113b57}from'ckeditor5/src/utils.js';import{AIContextItemType as _0x445f8b,AIContextTextResourceType as _0x2ff579}from'../../aicore/model/aicontext.js';import{escape as _0x233d96}from'es-toolkit/compat';function _0x3b7c(){const _0xa0e2cd=['has','addFilesToContext','push','values','size','from','_finishUploadOperation','Current\x20document','uiId','getData','5537050CKQFUu','_ongoingUploads','text/markdown','abortController','_updateResourceInContextState','getSentContextItems','object','_addContextOptionsState','addSelectionToContext','sourceResourcesLoaded','addContextOptionsChanged','309796xwPTxL','uploadFile','contextItemLoadingEnded','contextItemAdded','1392330mswQvP','isSelectionInContext','ai-chat-resource-load-failed','_ongoingUploadOperations','ai-chat-context-unsupported-type','SELECTION','ai-chat-url-upload-failed','ai-chat-document-upload-failed','_removeContextItem','length','version','enabled','ai-chat-context-invalid-data','addCurrentDocumentToContext','url-','_startUploadOperation','text/plain','File','all','current-document','type','message','fire','addResourceToContext','_addToConversationContextItem','files-','117BaBhFb','uploadDocument','_convertTextResourceToFile','ai-chat-file-upload-failed','contextSent','uploadProgressChanged','filter','selection','uploadUrl','MARKDOWN','code','map','set','stack','URL','string','fetchDocument','sources','isReadOnly','10063288TkHqBZ','FILE','resourceStateChanged','isCurrentDocumentInContext','addUrlToContext','getDocument','removeFromContext','populateFromMessage','_config','getPendingContextItems','1413385NclExC','updateCurrentDocument','isHidden','resources','_createContextItemFromContent','resourceId','_addContextItem','_pendingContextItems','abort','document','isCurrentDocumentInConversation','label','forEach','ai-request-aborted','data','TEXT','_isResourceInContext','ai-chat-source-not-found','HTML','removeSelectionFromContext','_toggleAddCurrentDocumentOptionVisibility','DOCUMENT','get','object\x20with\x20content\x20and\x20type\x20properties','_findSourceIdsByResourceId','_setAddContextOptionsDefaultState','mapContextItemsToRequestData','init','hidden','_ownerId','_mapContextItemToRequestData','loadSourceResources','_connector','sessionId','startsWith','isInContext','addToConversationContext','text/html','name','start','ai-chat-source-resources-load-failed','find','file-','content','1248zfGAak','contextItemRemoved','_getCustomSourcesInitialState','delete','getResources','error','end','getId','7oGyroc','urls','3350230MqrSBz','files','_finishContextItemLoading','attributes','_conversationContextItems','url','clearPendingContextItems','ai-chat-resource-no-data','8784GwEdJX'];_0x3b7c=function(){return _0xa0e2cd;};return _0x3b7c();}import{errorsMap as _0x377805}from'../../errorsmap.js';function _0x5302(_0x140ec3,_0x4bd142){const _0x3b7cfd=_0x3b7c();return _0x5302=function(_0x5302f1,_0x2a6837){_0x5302f1=_0x5302f1-0x1c4;let _0x4d3e7c=_0x3b7cfd[_0x5302f1];return _0x4d3e7c;},_0x5302(_0x140ec3,_0x4bd142);}export const AI_CONTEXT_MODEL_EVENT_NAMES=[_0x3e4626(0x214),_0x3e4626(0x1ea),_0x3e4626(0x213),_0x3e4626(0x233),_0x3e4626(0x1ee),_0x3e4626(0x210),_0x3e4626(0x20f),_0x3e4626(0x244),_0x3e4626(0x234)];export class AIChatContext extends _0x1e5c16(){[_0x3e4626(0x1dd)];[_0x3e4626(0x24a)];[_0x3e4626(0x1da)];constructor({connector:_0x13dc6f,config:_0x35f500,ownerId:_0x1dd461}){const _0xc723cf=_0x3e4626;super(),this[_0xc723cf(0x1dd)]=_0x13dc6f,this[_0xc723cf(0x24a)]=_0x35f500,this[_0xc723cf(0x1da)]=_0x1dd461;}[_0x3e4626(0x1d8)](){const _0x424f94=_0x3e4626;this[_0x424f94(0x1c4)]=new Map(),this[_0x424f94(0x1f7)]=new Map(),this[_0x424f94(0x207)]=new Map(),this[_0x424f94(0x218)]=new Map(),this[_0x424f94(0x1d6)]();}[_0x3e4626(0x24b)](){const _0x5a79e1=_0x3e4626;return this[_0x5a79e1(0x1c4)];}async[_0x3e4626(0x249)](_0x2751b2){const _0x1cff94=_0x3e4626,_0x378d52=await this[_0x1cff94(0x250)](_0x2751b2);return this[_0x1cff94(0x22d)](_0x378d52),_0x1cff94(0x228)===_0x378d52[_0x1cff94(0x204)]&&this[_0x1cff94(0x1d1)](),_0x378d52;}async[_0x3e4626(0x250)](_0x426686){const _0x5bbe48=_0x3e4626;if(_0x426686[_0x5bbe48(0x229)]===_0x445f8b[_0x5bbe48(0x1d2)]){const _0x11c4d0=await this[_0x5bbe48(0x1dd)][_0x5bbe48(0x23f)](this[_0x5bbe48(0x1da)],_0x426686['id'])[_0x5bbe48(0x247)]();return{'id':_0x5bbe48(0x228),'uiId':_0x5bbe48(0x228),'label':_0x5bbe48(0x203),'type':_0x426686[_0x5bbe48(0x229)],'content':_0x11c4d0[_0x5bbe48(0x1e8)],'hidden':this[_0x5bbe48(0x1f7)][_0x5bbe48(0x1fc)](_0x5bbe48(0x228)),'version':_0x11c4d0[_0x5bbe48(0x1f6)]?.[_0x5bbe48(0x21f)],'sessionId':_0x11c4d0[_0x5bbe48(0x1f6)]?.[_0x5bbe48(0x1de)]};}return{'id':_0x426686['id'],'uiId':_0x426686['id'],'label':_0x426686[_0x5bbe48(0x1f6)]?.[_0x5bbe48(0x1c8)]||_0x426686[_0x5bbe48(0x1e3)]||_0x426686[_0x5bbe48(0x1f8)]||_0x426686['id'],'type':_0x426686[_0x5bbe48(0x229)],..._0x426686?.[_0x5bbe48(0x1f6)]?.[_0x5bbe48(0x251)]?{'resourceId':_0x426686[_0x5bbe48(0x1f6)]?.[_0x5bbe48(0x251)]}:{}};}[_0x3e4626(0x20b)](){const _0x56da10=_0x3e4626;return new Map(this[_0x56da10(0x1f7)]);}[_0x3e4626(0x248)](_0x199352){const _0x32a7b5=_0x3e4626,_0x17c2a9=this[_0x32a7b5(0x1c4)][_0x32a7b5(0x1d3)](_0x199352);_0x17c2a9?.[_0x32a7b5(0x241)]||this[_0x32a7b5(0x21d)](_0x199352);}[_0x3e4626(0x1f9)](){const _0x4bad9e=_0x3e4626;if(0x0===this[_0x4bad9e(0x1c4)][_0x4bad9e(0x200)])return;for(const _0xb694ac of this[_0x4bad9e(0x1c4)][_0x4bad9e(0x1ff)]())this[_0x4bad9e(0x21d)](_0xb694ac[_0x4bad9e(0x204)]);const _0x342893=this[_0x4bad9e(0x1f7)][_0x4bad9e(0x1d3)](_0x4bad9e(0x228))||this[_0x4bad9e(0x1c4)][_0x4bad9e(0x1d3)](_0x4bad9e(0x228));_0x342893&&this[_0x4bad9e(0x252)]({..._0x342893,'isReadOnly':!0x0,'hidden':!0x0});}[_0x3e4626(0x1e1)](_0x5f2581){const _0x2c57ba=_0x3e4626;for(const _0x42ba21 of _0x5f2581[_0x2c57ba(0x1ff)]())this[_0x2c57ba(0x22d)](_0x42ba21);this[_0x2c57ba(0x1f9)](),this[_0x2c57ba(0x22b)](_0x2c57ba(0x233),{'contextItems':Array[_0x2c57ba(0x201)](this[_0x2c57ba(0x20b)]()[_0x2c57ba(0x1ff)]())});}[_0x3e4626(0x245)](){const _0x40b965=_0x3e4626;return this[_0x40b965(0x1c4)][_0x40b965(0x1fc)](_0x40b965(0x228));}[_0x3e4626(0x216)](){const _0x42b7fa=_0x3e4626;return this[_0x42b7fa(0x1c4)][_0x42b7fa(0x1fc)](_0x42b7fa(0x236));}[_0x3e4626(0x1c7)](){const _0x13ce1e=_0x3e4626;return this[_0x13ce1e(0x1f7)][_0x13ce1e(0x1fc)](_0x13ce1e(0x228));}static[_0x3e4626(0x1d7)](_0x14d5e1){const _0x31c0cd=_0x3e4626;return Array[_0x31c0cd(0x201)](_0x14d5e1[_0x31c0cd(0x1ff)]())[_0x31c0cd(0x23a)](_0x320f97=>this[_0x31c0cd(0x1db)](_0x320f97))[_0x31c0cd(0x235)](_0x58d0af=>null!==_0x58d0af);}async[_0x3e4626(0x1fd)](_0x7f461,_0x4ae7ae,_0x27c8c9=_0x445f8b[_0x3e4626(0x243)]){const _0x2f772f=_0x3e4626,_0x54e36c=_0x2f772f(0x22e)+_0x113b57();this[_0x2f772f(0x224)](_0x54e36c);try{await Promise[_0x2f772f(0x227)](_0x7f461[_0x2f772f(0x23a)](async _0x137b79=>{const _0x2576d7=_0x2f772f,_0x5a7a89=_0x2576d7(0x1e7)+_0x113b57(),_0x26a4a2=_0x233d96(_0x137b79[_0x2576d7(0x1e3)]);try{this[_0x2576d7(0x252)]({'type':_0x27c8c9,'label':_0x4ae7ae?.[_0x2576d7(0x1c8)]||_0x26a4a2,'uiId':_0x5a7a89,'resourceId':_0x4ae7ae?.[_0x2576d7(0x251)]},!0x0);const _0x555d7b=this[_0x2576d7(0x1dd)][_0x2576d7(0x212)](this[_0x2576d7(0x1da)],_0x137b79,_0x4ae7ae);this[_0x2576d7(0x207)][_0x2576d7(0x23b)](_0x5a7a89,_0x555d7b[_0x2576d7(0x209)]);const {id:_0x748ca0}=await _0x555d7b[_0x2576d7(0x1f0)]();this[_0x2576d7(0x207)][_0x2576d7(0x1ec)](_0x5a7a89),this[_0x2576d7(0x1f5)]({'type':_0x27c8c9,'id':_0x748ca0,'label':_0x4ae7ae?.[_0x2576d7(0x1c8)]||_0x26a4a2,'uiId':_0x5a7a89,'resourceId':_0x4ae7ae?.[_0x2576d7(0x251)]},!0x1);}catch(_0x3e081a){this[_0x2576d7(0x207)][_0x2576d7(0x1ec)](_0x5a7a89);if(!(_0x3e081a instanceof _0x28d55c&&_0x3e081a[_0x2576d7(0x22a)][_0x2576d7(0x1df)](_0x2576d7(0x1ca)))){const _0x16ddb4=_0x377805[_0x2576d7(0x1d3)](_0x3e081a[_0x2576d7(0x239)])||_0x2576d7(0x232),_0x1414e7=new _0x28d55c(_0x16ddb4,null,{'fileName':_0x26a4a2,..._0x3e081a});_0x1414e7[_0x2576d7(0x23c)]=_0x3e081a[_0x2576d7(0x23c)],this[_0x2576d7(0x22b)](_0x2576d7(0x1ee),{'error':_0x1414e7});}this[_0x2576d7(0x21d)](_0x5a7a89);}}));}finally{this[_0x2f772f(0x202)](_0x54e36c);}}[_0x3e4626(0x222)](_0x2ea4e8){const _0x110027=_0x3e4626;if(this[_0x110027(0x245)]())return;const _0x1f3e44={'type':_0x445f8b[_0x110027(0x1d2)],'uiId':_0x110027(0x228),'label':_0x2ea4e8,'isReadOnly':this[_0x110027(0x1f7)][_0x110027(0x1fc)](_0x110027(0x228)),'hidden':this[_0x110027(0x1f7)][_0x110027(0x1fc)](_0x110027(0x228))};this[_0x110027(0x252)](_0x1f3e44);}async[_0x3e4626(0x24d)](_0x30e684,_0x78aade,_0x141973,_0x26980c){const _0x2e6ebd=_0x3e4626,_0x9ad16f=this[_0x2e6ebd(0x1c4)][_0x2e6ebd(0x1d3)](_0x2e6ebd(0x228));if(_0x9ad16f&&_0x30e684){_0x9ad16f[_0x2e6ebd(0x236)]=_0x26980c?_0x26980c[_0x2e6ebd(0x23a)](_0x47bb69=>({'start':_0x47bb69[_0x2e6ebd(0x1e4)],'end':_0x47bb69[_0x2e6ebd(0x1ef)]})):[];try{if(_0x9ad16f[_0x2e6ebd(0x21f)]===_0x78aade)return;const {id:_0xbce828}=await this[_0x2e6ebd(0x1dd)][_0x2e6ebd(0x230)](this[_0x2e6ebd(0x1da)],_0x30e684,{'version':_0x78aade,'sessionId':_0x141973})[_0x2e6ebd(0x1f0)]();_0x9ad16f['id']=_0xbce828,_0x9ad16f[_0x2e6ebd(0x1e8)]=_0x30e684,_0x9ad16f[_0x2e6ebd(0x21f)]=_0x78aade,_0x9ad16f[_0x2e6ebd(0x1de)]=_0x141973;}catch(_0x46d8db){const _0x5539c6=new _0x28d55c(_0x2e6ebd(0x21c),null);_0x5539c6[_0x2e6ebd(0x23c)]=_0x46d8db[_0x2e6ebd(0x23c)],this[_0x2e6ebd(0x22b)](_0x2e6ebd(0x1ee),{'error':_0x5539c6});}}}[_0x3e4626(0x20e)](_0x5d38c2){const _0xbbb51=_0x3e4626;this[_0xbbb51(0x252)]({'type':_0x445f8b[_0xbbb51(0x21a)],'label':_0x5d38c2,'uiId':_0xbbb51(0x236),'content':_0x5d38c2});}[_0x3e4626(0x1d0)](){const _0x349689=_0x3e4626;this[_0x349689(0x21d)](_0x349689(0x236));}async[_0x3e4626(0x246)](_0x2fedbd,_0xc10e87){const _0x531089=_0x3e4626,_0x518f33=_0x531089(0x223)+_0x113b57();this[_0x531089(0x224)](_0x518f33);const _0x1e44b1=_0x531089(0x223)+_0x113b57();try{this[_0x531089(0x252)]({'type':_0x445f8b[_0x531089(0x23d)],'label':_0xc10e87?.[_0x531089(0x1c8)]||_0x2fedbd,'uiId':_0x1e44b1,'resourceId':_0xc10e87?.[_0x531089(0x251)]},!0x0);const _0xfe0a53=this[_0x531089(0x1dd)][_0x531089(0x237)](this[_0x531089(0x1da)],_0x2fedbd,_0xc10e87);this[_0x531089(0x207)][_0x531089(0x23b)](_0x1e44b1,_0xfe0a53[_0x531089(0x209)]);const {id:_0x29eace}=await _0xfe0a53[_0x531089(0x1f0)]();this[_0x531089(0x207)][_0x531089(0x1ec)](_0x1e44b1),this[_0x531089(0x1f5)]({'type':_0x445f8b[_0x531089(0x23d)],'id':_0x29eace,'label':_0xc10e87?.[_0x531089(0x1c8)]||_0x2fedbd,'uiId':_0x1e44b1,'resourceId':_0xc10e87?.[_0x531089(0x251)]},!0x1);}catch(_0x13a0f4){this[_0x531089(0x207)][_0x531089(0x1ec)](_0x1e44b1),(_0x13a0f4[_0x531089(0x22a)][_0x531089(0x1df)](_0x531089(0x1ca))||this[_0x531089(0x22b)](_0x531089(0x1ee),{'error':new _0x28d55c(_0x531089(0x21b),this,{'url':_0x2fedbd,'originalError':_0x13a0f4}),'url':_0x2fedbd}),this[_0x531089(0x21d)](_0x1e44b1));}finally{this[_0x531089(0x202)](_0x518f33);}}async[_0x3e4626(0x1dc)](_0xd7f9cd,_0xd47124,_0x3acc0d){const _0x3015cb=_0x3e4626,_0xac4d23=this[_0x3015cb(0x20d)][_0x3015cb(0x240)][_0x3015cb(0x1e6)](_0x4c4d9e=>_0x4c4d9e['id']===_0xd7f9cd);if(!_0xac4d23)return this[_0x3015cb(0x22b)](_0x3015cb(0x1ee),{'error':new _0x28d55c(_0x3015cb(0x1ce),this,{'sourceId':_0xd7f9cd}),'sourceId':_0xd7f9cd}),[];try{const _0x1ff61e=(await _0xac4d23[_0x3015cb(0x1ed)](_0xd47124))[_0x3015cb(0x23a)](_0x105dd4=>{const _0x225219=_0x3015cb,_0x3246e5=this[_0x225219(0x1cd)](_0x105dd4['id']);return{..._0x105dd4,'isInContext':_0x3246e5};});return _0xac4d23[_0x3015cb(0x24f)]=_0x1ff61e,this[_0x3015cb(0x22b)](_0x3015cb(0x20f),{'sourceId':_0xd7f9cd,'source':_0xac4d23,'resources':_0x1ff61e,'uid':_0x3acc0d}),_0x1ff61e;}catch(_0x427271){return this[_0x3015cb(0x22b)](_0x3015cb(0x1ee),{'error':new _0x28d55c(_0x3015cb(0x1e5),this,{'sourceId':_0xd7f9cd,'originalError':_0x427271}),'sourceId':_0xd7f9cd,'sourceLabel':_0xac4d23[_0x3015cb(0x1c8)]}),[];}}async[_0x3e4626(0x22c)](_0x4ba1ed,_0x5125e1){const _0x1d888f=_0x3e4626;if(this[_0x1d888f(0x1cd)](_0x5125e1['id']))return;let _0x27b056=_0x5125e1[_0x1d888f(0x1cb)];if(!_0x27b056&&_0x4ba1ed[_0x1d888f(0x205)])try{_0x27b056=await _0x4ba1ed[_0x1d888f(0x205)](_0x5125e1['id']);}catch(_0x361ec6){return void this[_0x1d888f(0x22b)](_0x1d888f(0x1ee),{'error':new _0x28d55c(_0x1d888f(0x217),this,{'resourceId':_0x5125e1['id'],'sourceId':_0x4ba1ed['id'],'originalError':_0x361ec6}),'resourceId':_0x5125e1['id'],'sourceId':_0x4ba1ed['id']});}if(_0x27b056)switch(_0x5125e1[_0x1d888f(0x229)]){case _0x445f8b[_0x1d888f(0x23d)]:if(_0x1d888f(0x23e)!=typeof _0x27b056)return void this[_0x1d888f(0x22b)](_0x1d888f(0x1ee),{'error':new _0x28d55c(_0x1d888f(0x221),this,{'resourceId':_0x5125e1['id'],'sourceId':_0x4ba1ed['id'],'expectedType':_0x1d888f(0x23e),'actualType':typeof _0x27b056}),'resourceId':_0x5125e1['id'],'sourceId':_0x4ba1ed['id']});await this[_0x1d888f(0x246)](_0x27b056,{'label':_0x5125e1[_0x1d888f(0x1c8)],'resourceId':_0x5125e1['id']});break;case _0x445f8b[_0x1d888f(0x243)]:if(!(_0x27b056 instanceof File))return void this[_0x1d888f(0x22b)](_0x1d888f(0x1ee),{'error':new _0x28d55c(_0x1d888f(0x221),this,{'resourceId':_0x5125e1['id'],'sourceId':_0x4ba1ed['id'],'expectedType':_0x1d888f(0x226),'actualType':typeof _0x27b056}),'resourceId':_0x5125e1['id'],'sourceId':_0x4ba1ed['id']});await this[_0x1d888f(0x1fd)]([_0x27b056],{'label':_0x5125e1[_0x1d888f(0x1c8)],'resourceId':_0x5125e1['id']});break;case _0x445f8b[_0x1d888f(0x1cc)]:if(_0x1d888f(0x20c)!=typeof _0x27b056||!(_0x1d888f(0x1e8)in _0x27b056)||!(_0x1d888f(0x229)in _0x27b056))return void this[_0x1d888f(0x22b)](_0x1d888f(0x1ee),{'error':new _0x28d55c(_0x1d888f(0x221),this,{'resourceId':_0x5125e1['id'],'sourceId':_0x4ba1ed['id'],'expectedType':_0x1d888f(0x1d4),'actualType':typeof _0x27b056}),'resourceId':_0x5125e1['id'],'sourceId':_0x4ba1ed['id']});_0x27b056=AIChatContext[_0x1d888f(0x231)](_0x27b056,_0x5125e1[_0x1d888f(0x1c8)]),await this[_0x1d888f(0x1fd)]([_0x27b056],{'label':_0x5125e1[_0x1d888f(0x1c8)],'resourceId':_0x5125e1['id']},_0x445f8b[_0x1d888f(0x1cc)]);break;default:this[_0x1d888f(0x22b)](_0x1d888f(0x1ee),{'error':new _0x28d55c(_0x1d888f(0x219),this,{'resourceId':_0x5125e1['id'],'sourceId':_0x4ba1ed['id'],'resourceType':_0x5125e1[_0x1d888f(0x229)]}),'resourceId':_0x5125e1['id'],'sourceId':_0x4ba1ed['id']});}else this[_0x1d888f(0x22b)](_0x1d888f(0x1ee),{'error':new _0x28d55c(_0x1d888f(0x1fa),this,{'resourceId':_0x5125e1['id'],'sourceId':_0x4ba1ed['id']}),'resourceId':_0x5125e1['id'],'sourceId':_0x4ba1ed['id']});}static[_0x3e4626(0x231)](_0x37d074,_0x48683f){const _0x4414b0=_0x3e4626;switch(_0x37d074[_0x4414b0(0x229)]){case _0x2ff579[_0x4414b0(0x238)]:return new File([_0x37d074[_0x4414b0(0x1e8)]],_0x48683f,{'type':_0x4414b0(0x208)});case _0x2ff579[_0x4414b0(0x1cf)]:return new File([_0x37d074[_0x4414b0(0x1e8)]],_0x48683f,{'type':_0x4414b0(0x1e2)});default:return new File([_0x37d074[_0x4414b0(0x1e8)]],_0x48683f,{'type':_0x4414b0(0x225)});}}static[_0x3e4626(0x1db)](_0xdee7c1){const _0x2346ed=_0x3e4626;switch(_0xdee7c1[_0x2346ed(0x229)]){case _0x445f8b[_0x2346ed(0x243)]:return{'type':_0x445f8b[_0x2346ed(0x243)],'id':_0xdee7c1['id']};case _0x445f8b[_0x2346ed(0x23d)]:return{'type':_0x445f8b[_0x2346ed(0x23d)],'id':_0xdee7c1['id']};case _0x445f8b[_0x2346ed(0x1d2)]:return{'type':_0x445f8b[_0x2346ed(0x1d2)],'id':_0xdee7c1['id'],..._0xdee7c1[_0x2346ed(0x236)]?.[_0x2346ed(0x21e)]&&{'selection':_0xdee7c1[_0x2346ed(0x236)]}};case _0x445f8b[_0x2346ed(0x1cc)]:return{'type':_0x445f8b[_0x2346ed(0x243)],'id':_0xdee7c1['id']};default:return null;}}[_0x3e4626(0x252)](_0x144885,_0x2d6329=!0x1){const _0x11b8f9=_0x3e4626;if(this[_0x11b8f9(0x1c4)][_0x11b8f9(0x23b)](_0x144885[_0x11b8f9(0x204)],_0x144885),_0x144885[_0x11b8f9(0x1d9)]||this[_0x11b8f9(0x22b)](_0x11b8f9(0x214),{'contextItem':_0x144885,'isLoading':_0x2d6329}),_0x11b8f9(0x228)===_0x144885[_0x11b8f9(0x204)]&&this[_0x11b8f9(0x1d1)](),_0x144885[_0x11b8f9(0x251)]){const _0x45503a=this[_0x11b8f9(0x1d5)](_0x144885[_0x11b8f9(0x251)]);_0x45503a&&_0x45503a[_0x11b8f9(0x1c9)](_0x25e511=>{const _0x36028b=_0x11b8f9;this[_0x36028b(0x20a)](_0x25e511,_0x144885[_0x36028b(0x251)],!0x0);});}}[_0x3e4626(0x21d)](_0x28b0b1){const _0x52d1b9=_0x3e4626,_0x4a91dc=this[_0x52d1b9(0x1c4)][_0x52d1b9(0x1d3)](_0x28b0b1),_0xe06740=this[_0x52d1b9(0x207)][_0x52d1b9(0x1d3)](_0x28b0b1);if(_0xe06740&&(_0xe06740[_0x52d1b9(0x1c5)](),this[_0x52d1b9(0x207)][_0x52d1b9(0x1ec)](_0x28b0b1)),_0x4a91dc?.[_0x52d1b9(0x251)]){const _0x1f83e3=this[_0x52d1b9(0x1d5)](_0x4a91dc[_0x52d1b9(0x251)]);_0x1f83e3&&_0x1f83e3[_0x52d1b9(0x1c9)](_0x1d191d=>{const _0x44943f=_0x52d1b9;this[_0x44943f(0x20a)](_0x1d191d,_0x4a91dc[_0x44943f(0x251)],!0x1);});}this[_0x52d1b9(0x1c4)][_0x52d1b9(0x1ec)](_0x28b0b1),this[_0x52d1b9(0x22b)](_0x52d1b9(0x1ea),{'uiId':_0x28b0b1,'type':_0x4a91dc?.[_0x52d1b9(0x229)]}),_0x52d1b9(0x228)===_0x28b0b1&&this[_0x52d1b9(0x1d1)]();}[_0x3e4626(0x1f5)](_0x55e6b0,_0x291973){const _0x2e3323=_0x3e4626;if(this[_0x2e3323(0x1c4)][_0x2e3323(0x1fc)](_0x55e6b0[_0x2e3323(0x204)])&&(this[_0x2e3323(0x1c4)][_0x2e3323(0x23b)](_0x55e6b0[_0x2e3323(0x204)],_0x55e6b0),this[_0x2e3323(0x22b)](_0x2e3323(0x213),{'contextItem':_0x55e6b0,'isLoading':_0x291973}),_0x55e6b0[_0x2e3323(0x251)])){const _0x71c000=this[_0x2e3323(0x1d5)](_0x55e6b0[_0x2e3323(0x251)]);_0x71c000&&_0x71c000[_0x2e3323(0x1c9)](_0x47bdb5=>{const _0x16da1f=_0x2e3323;this[_0x16da1f(0x20a)](_0x47bdb5,_0x55e6b0[_0x16da1f(0x251)],!0x0);});}}[_0x3e4626(0x22d)](_0xb2e9a){const _0x803cf=_0x3e4626;this[_0x803cf(0x1f7)][_0x803cf(0x23b)](_0xb2e9a[_0x803cf(0x204)],_0xb2e9a);}[_0x3e4626(0x1d6)](){const _0x2af20c=_0x3e4626;this[_0x2af20c(0x20d)]={'document':{'enabled':!0x1!==this[_0x2af20c(0x24a)]?.[_0x2af20c(0x1c6)]?.[_0x2af20c(0x220)],'isHidden':!0x1},'urls':{'enabled':!0x1!==this[_0x2af20c(0x24a)]?.[_0x2af20c(0x1f2)]?.[_0x2af20c(0x220)]},'files':{'enabled':!0x1!==this[_0x2af20c(0x24a)]?.[_0x2af20c(0x1f4)]?.[_0x2af20c(0x220)]},'sources':this[_0x2af20c(0x1eb)]()},this[_0x2af20c(0x22b)](_0x2af20c(0x210),{'options':this[_0x2af20c(0x20d)]});}[_0x3e4626(0x1eb)](){const _0x3e0b3b=_0x3e4626;return this[_0x3e0b3b(0x24a)]?.[_0x3e0b3b(0x240)]?.[_0x3e0b3b(0x23a)](_0x43f587=>({..._0x43f587,'resources':[]}))??[];}[_0x3e4626(0x1d1)](){const _0x43c9ee=_0x3e4626,_0x1ca253=this[_0x43c9ee(0x245)]()||this[_0x43c9ee(0x1c7)]();this[_0x43c9ee(0x20d)][_0x43c9ee(0x1c6)][_0x43c9ee(0x24e)]=_0x1ca253,this[_0x43c9ee(0x22b)](_0x43c9ee(0x210),{'options':this[_0x43c9ee(0x20d)]});}[_0x3e4626(0x1cd)](_0x52b12f){const _0x81b540=_0x3e4626;for(const _0xcb3412 of this[_0x81b540(0x1c4)][_0x81b540(0x1ff)]())if(_0xcb3412[_0x81b540(0x251)]===_0x52b12f)return!0x0;for(const _0x39615d of this[_0x81b540(0x1f7)][_0x81b540(0x1ff)]())if(_0x39615d[_0x81b540(0x251)]===_0x52b12f)return!0x0;return!0x1;}[_0x3e4626(0x1d5)](_0x4b31d4){const _0x3a455f=_0x3e4626,_0x3ac67e=[];for(const _0x1d86de of this[_0x3a455f(0x20d)][_0x3a455f(0x240)]){_0x1d86de[_0x3a455f(0x24f)][_0x3a455f(0x1e6)](_0x2f6c5b=>_0x2f6c5b['id']===_0x4b31d4)&&_0x3ac67e[_0x3a455f(0x1fe)](_0x1d86de['id']);}return 0x0===_0x3ac67e[_0x3a455f(0x21e)]?null:_0x3ac67e;}[_0x3e4626(0x20a)](_0x469b51,_0x44fbe7,_0x4a322b){const _0x5dd699=_0x3e4626,_0x9be18e=this[_0x5dd699(0x20d)][_0x5dd699(0x240)][_0x5dd699(0x1e6)](_0x39fc4b=>_0x39fc4b['id']===_0x469b51);if(!_0x9be18e)return;const _0x37f497=_0x9be18e[_0x5dd699(0x24f)][_0x5dd699(0x1e6)](_0x3c4cbc=>_0x3c4cbc['id']===_0x44fbe7);_0x37f497&&(_0x37f497[_0x5dd699(0x1e0)]=_0x4a322b,this[_0x5dd699(0x22b)](_0x5dd699(0x244),{'sourceId':_0x469b51,'resourceId':_0x44fbe7,'isInContext':_0x4a322b}));}[_0x3e4626(0x224)](_0x324b51){const _0x5e84d4=_0x3e4626;this[_0x5e84d4(0x218)][_0x5e84d4(0x23b)](_0x324b51,!0x0),this[_0x5e84d4(0x218)][_0x5e84d4(0x200)]&&this[_0x5e84d4(0x22b)](_0x5e84d4(0x234),{'isUploadInProgress':!0x0});}[_0x3e4626(0x202)](_0xf65a18){const _0x19c2f9=_0x3e4626;this[_0x19c2f9(0x218)][_0x19c2f9(0x1ec)](_0xf65a18),0x0===this[_0x19c2f9(0x218)][_0x19c2f9(0x200)]&&this[_0x19c2f9(0x22b)](_0x19c2f9(0x234),{'isUploadInProgress':!0x1});}}
23
+ const _0xfc34d3=_0x4647;(function(_0x27f06f,_0x487c1c){const _0x443465=_0x4647,_0x53b66b=_0x27f06f();while(!![]){try{const _0xfdb75c=-parseInt(_0x443465(0xf0))/0x1+parseInt(_0x443465(0xb5))/0x2*(parseInt(_0x443465(0xde))/0x3)+parseInt(_0x443465(0xc9))/0x4*(parseInt(_0x443465(0x69))/0x5)+parseInt(_0x443465(0x9d))/0x6+parseInt(_0x443465(0x6f))/0x7+parseInt(_0x443465(0x71))/0x8+-parseInt(_0x443465(0xdd))/0x9;if(_0xfdb75c===_0x487c1c)break;else _0x53b66b['push'](_0x53b66b['shift']());}catch(_0x537854){_0x53b66b['push'](_0x53b66b['shift']());}}}(_0x1a1a,0xf32da));import{CKEditorError as _0xef393d,ObservableMixin as _0x3555f4,uid as _0x37f04c}from'ckeditor5/src/utils.js';function _0x4647(_0x5d0c54,_0x12ad98){const _0x1a1a9b=_0x1a1a();return _0x4647=function(_0x464708,_0x5a656a){_0x464708=_0x464708-0x65;let _0x4daf4b=_0x1a1a9b[_0x464708];return _0x4daf4b;},_0x4647(_0x5d0c54,_0x12ad98);}import{AIContextItemType as _0x28b210,AIContextTextResourceType as _0x8c66f6}from'../../aicore/model/aicontext.js';import{escape as _0x34a956}from'es-toolkit/compat';import{errorsMap as _0x187db4}from'../../errorsmap.js';export const AI_CONTEXT_MODEL_EVENT_NAMES=[_0xfc34d3(0xea),_0xfc34d3(0x6d),_0xfc34d3(0xb4),_0xfc34d3(0xd3),_0xfc34d3(0xed),_0xfc34d3(0xbb),_0xfc34d3(0xe5),_0xfc34d3(0x70),_0xfc34d3(0x86)];function _0x1a1a(){const _0x22d3de=['version','delete','string','clearPendingContextItems','enabled','FILE','_createContextItemFromContent','_connector','URL','init','_finishUploadOperation','_isResourceInContext','message','end','current-document','277716oIJPjx','uploadDocument','urls','removeFromContext','_getCustomSourcesInitialState','values','isHidden','ai-chat-document-upload-failed','_conversationContextItems','abort','SELECTION','get','populateFromMessage','ai-chat-source-resources-load-failed','ai-chat-context-unsupported-type','DOCUMENT','document','url','getSentContextItems','_removeContextItem','_convertTextResourceToFile','_pendingContextItems','start','contextItemLoadingEnded','4QwaLiI','ai-chat-source-not-found','content','label','ai-chat-resource-load-failed','_addToConversationContextItem','addContextOptionsChanged','addResourceToContext','ai-chat-resource-no-data','ai-request-aborted','push','uiId','_ongoingUploadOperations','ai-chat-url-upload-failed','TEXT','File','text/markdown','getId','text/plain','abortController','5188ftIWqf','name','isCurrentDocumentInContext','_addContextItem','object\x20with\x20content\x20and\x20type\x20properties','code','fire','_addContextOptionsState','sources','_startUploadOperation','contextSent','_finishContextItemLoading','hidden','all','_config','files-','ai-chat-file-upload-failed','isSelectionInContext','addToConversationContext','getResources','6778080lPRVSJ','1584309rwpAuY','_ownerId','length','files','mapContextItemsToRequestData','stack','ai-chat-context-invalid-data','sourceResourcesLoaded','url-','_findSourceIdsByResourceId','addSelectionToContext','resources','contextItemAdded','size','getData','error','Current\x20document','addUrlToContext','1598626RWwQwL','addCurrentDocumentToContext','_mapContextItemToRequestData','sessionId','getDocument','updateCurrentDocument','isCurrentDocumentInConversation','1995qGDJDs','uploadFile','uploadUrl','filter','contextItemRemoved','getPendingContextItems','4852330FiVDYZ','resourceStateChanged','8276952yNcFmG','text/html','removeSelectionFromContext','HTML','MARKDOWN','isReadOnly','set','has','addFilesToContext','attributes','file-','resourceId','from','find','loadSourceResources','_updateResourceInContextState','map','type','selection','object','_ongoingUploads','uploadProgressChanged','fetchDocument','_toggleAddCurrentDocumentOptionVisibility','startsWith','_setAddContextOptionsDefaultState','data','isInContext','forEach'];_0x1a1a=function(){return _0x22d3de;};return _0x1a1a();}export class AIChatContext extends _0x3555f4(){[_0xfc34d3(0x95)];[_0xfc34d3(0xd7)];[_0xfc34d3(0xdf)];constructor({connector:_0x8bf444,config:_0x25f9ab,ownerId:_0x3c8784}){const _0x409335=_0xfc34d3;super(),this[_0x409335(0x95)]=_0x8bf444,this[_0x409335(0xd7)]=_0x25f9ab,this[_0x409335(0xdf)]=_0x3c8784;}[_0xfc34d3(0x97)](){const _0x4408ef=_0xfc34d3;this[_0x4408ef(0xb2)]=new Map(),this[_0x4408ef(0xa5)]=new Map(),this[_0x4408ef(0x85)]=new Map(),this[_0x4408ef(0xc1)]=new Map(),this[_0x4408ef(0x8a)]();}[_0xfc34d3(0x6e)](){const _0x693fd9=_0xfc34d3;return this[_0x693fd9(0xb2)];}async[_0xfc34d3(0xa9)](_0x546671){const _0x5c47ce=_0xfc34d3,_0x3d1063=await this[_0x5c47ce(0x94)](_0x546671);return this[_0x5c47ce(0xba)](_0x3d1063),_0x5c47ce(0x9c)===_0x3d1063[_0x5c47ce(0xc0)]&&this[_0x5c47ce(0x88)](),_0x3d1063;}async[_0xfc34d3(0x94)](_0x22a74f){const _0x5f2c66=_0xfc34d3;if(_0x22a74f[_0x5f2c66(0x82)]===_0x28b210[_0x5f2c66(0xac)]){const _0x3737c8=await this[_0x5f2c66(0x95)][_0x5f2c66(0x87)](this[_0x5f2c66(0xdf)],_0x22a74f['id'])[_0x5f2c66(0x66)]();return{'id':_0x5f2c66(0x9c),'uiId':_0x5f2c66(0x9c),'label':_0x5f2c66(0xee),'type':_0x22a74f[_0x5f2c66(0x82)],'content':_0x3737c8[_0x5f2c66(0xb7)],'hidden':this[_0x5f2c66(0xa5)][_0x5f2c66(0x78)](_0x5f2c66(0x9c)),'version':_0x3737c8[_0x5f2c66(0x7a)]?.[_0x5f2c66(0x8e)],'sessionId':_0x3737c8[_0x5f2c66(0x7a)]?.[_0x5f2c66(0x65)]};}return{'id':_0x22a74f['id'],'uiId':_0x22a74f['id'],'label':_0x22a74f[_0x5f2c66(0x7a)]?.[_0x5f2c66(0xb8)]||_0x22a74f[_0x5f2c66(0xca)]||_0x22a74f[_0x5f2c66(0xae)]||_0x22a74f['id'],'type':_0x22a74f[_0x5f2c66(0x82)],..._0x22a74f?.[_0x5f2c66(0x7a)]?.[_0x5f2c66(0x7c)]?{'resourceId':_0x22a74f[_0x5f2c66(0x7a)]?.[_0x5f2c66(0x7c)]}:{}};}[_0xfc34d3(0xaf)](){const _0x3a790c=_0xfc34d3;return new Map(this[_0x3a790c(0xa5)]);}[_0xfc34d3(0xa0)](_0x58be4f){const _0x2109c6=_0xfc34d3,_0x2f3e7b=this[_0x2109c6(0xb2)][_0x2109c6(0xa8)](_0x58be4f);_0x2f3e7b?.[_0x2109c6(0x76)]||this[_0x2109c6(0xb0)](_0x58be4f);}[_0xfc34d3(0x91)](){const _0x4ffb56=_0xfc34d3;if(0x0===this[_0x4ffb56(0xb2)][_0x4ffb56(0xeb)])return;for(const _0x5bd1b0 of this[_0x4ffb56(0xb2)][_0x4ffb56(0xa2)]())this[_0x4ffb56(0xb0)](_0x5bd1b0[_0x4ffb56(0xc0)]);const _0x2ed4af=this[_0x4ffb56(0xa5)][_0x4ffb56(0xa8)](_0x4ffb56(0x9c))||this[_0x4ffb56(0xb2)][_0x4ffb56(0xa8)](_0x4ffb56(0x9c));_0x2ed4af&&this[_0x4ffb56(0xcc)]({..._0x2ed4af,'isReadOnly':!0x0,'hidden':!0x0});}[_0xfc34d3(0xdb)](_0x5c9b50){const _0xbf9981=_0xfc34d3;for(const _0x4be6ba of _0x5c9b50[_0xbf9981(0xa2)]())this[_0xbf9981(0xba)](_0x4be6ba);this[_0xbf9981(0x91)](),this[_0xbf9981(0xcf)](_0xbf9981(0xd3),{'contextItems':Array[_0xbf9981(0x7d)](this[_0xbf9981(0xaf)]()[_0xbf9981(0xa2)]())});}[_0xfc34d3(0xcb)](){const _0x1d4608=_0xfc34d3;return this[_0x1d4608(0xb2)][_0x1d4608(0x78)](_0x1d4608(0x9c));}[_0xfc34d3(0xda)](){const _0x2bb13d=_0xfc34d3;return this[_0x2bb13d(0xb2)][_0x2bb13d(0x78)](_0x2bb13d(0x83));}[_0xfc34d3(0x68)](){const _0x231c5c=_0xfc34d3;return this[_0x231c5c(0xa5)][_0x231c5c(0x78)](_0x231c5c(0x9c));}static[_0xfc34d3(0xe2)](_0x792a44){const _0x4b4ffd=_0xfc34d3;return Array[_0x4b4ffd(0x7d)](_0x792a44[_0x4b4ffd(0xa2)]())[_0x4b4ffd(0x81)](_0x487d72=>this[_0x4b4ffd(0xf2)](_0x487d72))[_0x4b4ffd(0x6c)](_0x59411a=>null!==_0x59411a);}async[_0xfc34d3(0x79)](_0x1e2b1d,_0xb81786,_0x217af7=_0x28b210[_0xfc34d3(0x93)]){const _0x486300=_0xfc34d3,_0x5af839=_0x486300(0xd8)+_0x37f04c();this[_0x486300(0xd2)](_0x5af839);try{await Promise[_0x486300(0xd6)](_0x1e2b1d[_0x486300(0x81)](async _0x420c82=>{const _0x166d57=_0x486300,_0x4de900=_0x166d57(0x7b)+_0x37f04c(),_0x38e015=_0x34a956(_0x420c82[_0x166d57(0xca)]);try{this[_0x166d57(0xcc)]({'type':_0x217af7,'label':_0xb81786?.[_0x166d57(0xb8)]||_0x38e015,'uiId':_0x4de900,'resourceId':_0xb81786?.[_0x166d57(0x7c)]},!0x0);const _0x5228b2=this[_0x166d57(0x95)][_0x166d57(0x6a)](this[_0x166d57(0xdf)],_0x420c82,_0xb81786);this[_0x166d57(0x85)][_0x166d57(0x77)](_0x4de900,_0x5228b2[_0x166d57(0xc8)]);const {id:_0x40794e}=await _0x5228b2[_0x166d57(0xc6)]();this[_0x166d57(0x85)][_0x166d57(0x8f)](_0x4de900),this[_0x166d57(0xd4)]({'type':_0x217af7,'id':_0x40794e,'label':_0xb81786?.[_0x166d57(0xb8)]||_0x38e015,'uiId':_0x4de900,'resourceId':_0xb81786?.[_0x166d57(0x7c)]},!0x1);}catch(_0xb486c3){this[_0x166d57(0x85)][_0x166d57(0x8f)](_0x4de900);if(!(_0xb486c3 instanceof _0xef393d&&_0xb486c3[_0x166d57(0x9a)][_0x166d57(0x89)](_0x166d57(0xbe)))){const _0x1be6df=_0x187db4[_0x166d57(0xa8)](_0xb486c3[_0x166d57(0xce)])||_0x166d57(0xd9),_0x3797d6=new _0xef393d(_0x1be6df,null,{'fileName':_0x38e015,..._0xb486c3});_0x3797d6[_0x166d57(0xe3)]=_0xb486c3[_0x166d57(0xe3)],this[_0x166d57(0xcf)](_0x166d57(0xed),{'error':_0x3797d6});}this[_0x166d57(0xb0)](_0x4de900);}}));}finally{this[_0x486300(0x98)](_0x5af839);}}[_0xfc34d3(0xf1)](_0xd61738){const _0xce36db=_0xfc34d3;if(this[_0xce36db(0xcb)]())return;const _0x1433f7={'type':_0x28b210[_0xce36db(0xac)],'uiId':_0xce36db(0x9c),'label':_0xd61738,'isReadOnly':this[_0xce36db(0xa5)][_0xce36db(0x78)](_0xce36db(0x9c)),'hidden':this[_0xce36db(0xa5)][_0xce36db(0x78)](_0xce36db(0x9c))};this[_0xce36db(0xcc)](_0x1433f7);}async[_0xfc34d3(0x67)](_0x5dd444,_0x5ce53e,_0x160b18,_0x6c6077){const _0x46354a=_0xfc34d3,_0x5346a8=this[_0x46354a(0xb2)][_0x46354a(0xa8)](_0x46354a(0x9c));if(_0x5346a8&&_0x5dd444){_0x5346a8[_0x46354a(0x83)]=_0x6c6077?_0x6c6077[_0x46354a(0x81)](_0x36da61=>({'start':_0x36da61[_0x46354a(0xb3)],'end':_0x36da61[_0x46354a(0x9b)]})):[];try{if(_0x5346a8[_0x46354a(0x8e)]===_0x5ce53e)return;const {id:_0x2b4459}=await this[_0x46354a(0x95)][_0x46354a(0x9e)](this[_0x46354a(0xdf)],_0x5dd444,{'version':_0x5ce53e,'sessionId':_0x160b18})[_0x46354a(0xc6)]();_0x5346a8['id']=_0x2b4459,_0x5346a8[_0x46354a(0xb7)]=_0x5dd444,_0x5346a8[_0x46354a(0x8e)]=_0x5ce53e,_0x5346a8[_0x46354a(0x65)]=_0x160b18;}catch(_0x34c69a){const _0x9fc1d1=new _0xef393d(_0x46354a(0xa4),null);_0x9fc1d1[_0x46354a(0xe3)]=_0x34c69a[_0x46354a(0xe3)],this[_0x46354a(0xcf)](_0x46354a(0xed),{'error':_0x9fc1d1});}}}[_0xfc34d3(0xe8)](_0x1725d8){const _0x49fc42=_0xfc34d3;this[_0x49fc42(0xcc)]({'type':_0x28b210[_0x49fc42(0xa7)],'label':_0x1725d8,'uiId':_0x49fc42(0x83),'content':_0x1725d8});}[_0xfc34d3(0x73)](){const _0x2ec8c1=_0xfc34d3;this[_0x2ec8c1(0xb0)](_0x2ec8c1(0x83));}async[_0xfc34d3(0xef)](_0x3304e7,_0x3709f4){const _0x36541d=_0xfc34d3,_0x1154b4=_0x36541d(0xe6)+_0x37f04c();this[_0x36541d(0xd2)](_0x1154b4);const _0xc25206=_0x36541d(0xe6)+_0x37f04c();try{this[_0x36541d(0xcc)]({'type':_0x28b210[_0x36541d(0x96)],'label':_0x3709f4?.[_0x36541d(0xb8)]||_0x3304e7,'uiId':_0xc25206,'resourceId':_0x3709f4?.[_0x36541d(0x7c)]},!0x0);const _0x1f1227=this[_0x36541d(0x95)][_0x36541d(0x6b)](this[_0x36541d(0xdf)],_0x3304e7,_0x3709f4);this[_0x36541d(0x85)][_0x36541d(0x77)](_0xc25206,_0x1f1227[_0x36541d(0xc8)]);const {id:_0x3c217e}=await _0x1f1227[_0x36541d(0xc6)]();this[_0x36541d(0x85)][_0x36541d(0x8f)](_0xc25206),this[_0x36541d(0xd4)]({'type':_0x28b210[_0x36541d(0x96)],'id':_0x3c217e,'label':_0x3709f4?.[_0x36541d(0xb8)]||_0x3304e7,'uiId':_0xc25206,'resourceId':_0x3709f4?.[_0x36541d(0x7c)]},!0x1);}catch(_0x3d1dbf){this[_0x36541d(0x85)][_0x36541d(0x8f)](_0xc25206),(_0x3d1dbf[_0x36541d(0x9a)][_0x36541d(0x89)](_0x36541d(0xbe))||this[_0x36541d(0xcf)](_0x36541d(0xed),{'error':new _0xef393d(_0x36541d(0xc2),this,{'url':_0x3304e7,'originalError':_0x3d1dbf}),'url':_0x3304e7}),this[_0x36541d(0xb0)](_0xc25206));}finally{this[_0x36541d(0x98)](_0x1154b4);}}async[_0xfc34d3(0x7f)](_0x48ccd0,_0x1de832,_0x3dac8a){const _0x3f9bb1=_0xfc34d3,_0x736164=this[_0x3f9bb1(0xd0)][_0x3f9bb1(0xd1)][_0x3f9bb1(0x7e)](_0x4ef5c3=>_0x4ef5c3['id']===_0x48ccd0);if(!_0x736164)return this[_0x3f9bb1(0xcf)](_0x3f9bb1(0xed),{'error':new _0xef393d(_0x3f9bb1(0xb6),this,{'sourceId':_0x48ccd0}),'sourceId':_0x48ccd0}),[];try{const _0x5d865b=(await _0x736164[_0x3f9bb1(0xdc)](_0x1de832))[_0x3f9bb1(0x81)](_0x458f8f=>{const _0x2c1570=_0x3f9bb1,_0x4c491b=this[_0x2c1570(0x99)](_0x458f8f['id']);return{..._0x458f8f,'isInContext':_0x4c491b};});return _0x736164[_0x3f9bb1(0xe9)]=_0x5d865b,this[_0x3f9bb1(0xcf)](_0x3f9bb1(0xe5),{'sourceId':_0x48ccd0,'source':_0x736164,'resources':_0x5d865b,'uid':_0x3dac8a}),_0x5d865b;}catch(_0x738c75){return this[_0x3f9bb1(0xcf)](_0x3f9bb1(0xed),{'error':new _0xef393d(_0x3f9bb1(0xaa),this,{'sourceId':_0x48ccd0,'originalError':_0x738c75}),'sourceId':_0x48ccd0,'sourceLabel':_0x736164[_0x3f9bb1(0xb8)]}),[];}}async[_0xfc34d3(0xbc)](_0x5bebce,_0x279d63){const _0x14a9c6=_0xfc34d3;if(this[_0x14a9c6(0x99)](_0x279d63['id']))return;let _0x1fe7db=_0x279d63[_0x14a9c6(0x8b)];if(!_0x1fe7db&&_0x5bebce[_0x14a9c6(0xec)])try{_0x1fe7db=await _0x5bebce[_0x14a9c6(0xec)](_0x279d63['id']);}catch(_0x3afa41){return void this[_0x14a9c6(0xcf)](_0x14a9c6(0xed),{'error':new _0xef393d(_0x14a9c6(0xb9),this,{'resourceId':_0x279d63['id'],'sourceId':_0x5bebce['id'],'originalError':_0x3afa41}),'resourceId':_0x279d63['id'],'sourceId':_0x5bebce['id']});}if(_0x1fe7db)switch(_0x279d63[_0x14a9c6(0x82)]){case _0x28b210[_0x14a9c6(0x96)]:if(_0x14a9c6(0x90)!=typeof _0x1fe7db)return void this[_0x14a9c6(0xcf)](_0x14a9c6(0xed),{'error':new _0xef393d(_0x14a9c6(0xe4),this,{'resourceId':_0x279d63['id'],'sourceId':_0x5bebce['id'],'expectedType':_0x14a9c6(0x90),'actualType':typeof _0x1fe7db}),'resourceId':_0x279d63['id'],'sourceId':_0x5bebce['id']});await this[_0x14a9c6(0xef)](_0x1fe7db,{'label':_0x279d63[_0x14a9c6(0xb8)],'resourceId':_0x279d63['id']});break;case _0x28b210[_0x14a9c6(0x93)]:if(!(_0x1fe7db instanceof File))return void this[_0x14a9c6(0xcf)](_0x14a9c6(0xed),{'error':new _0xef393d(_0x14a9c6(0xe4),this,{'resourceId':_0x279d63['id'],'sourceId':_0x5bebce['id'],'expectedType':_0x14a9c6(0xc4),'actualType':typeof _0x1fe7db}),'resourceId':_0x279d63['id'],'sourceId':_0x5bebce['id']});await this[_0x14a9c6(0x79)]([_0x1fe7db],{'label':_0x279d63[_0x14a9c6(0xb8)],'resourceId':_0x279d63['id']});break;case _0x28b210[_0x14a9c6(0xc3)]:if(_0x14a9c6(0x84)!=typeof _0x1fe7db||!(_0x14a9c6(0xb7)in _0x1fe7db)||!(_0x14a9c6(0x82)in _0x1fe7db))return void this[_0x14a9c6(0xcf)](_0x14a9c6(0xed),{'error':new _0xef393d(_0x14a9c6(0xe4),this,{'resourceId':_0x279d63['id'],'sourceId':_0x5bebce['id'],'expectedType':_0x14a9c6(0xcd),'actualType':typeof _0x1fe7db}),'resourceId':_0x279d63['id'],'sourceId':_0x5bebce['id']});_0x1fe7db=AIChatContext[_0x14a9c6(0xb1)](_0x1fe7db,_0x279d63[_0x14a9c6(0xb8)]),await this[_0x14a9c6(0x79)]([_0x1fe7db],{'label':_0x279d63[_0x14a9c6(0xb8)],'resourceId':_0x279d63['id']},_0x28b210[_0x14a9c6(0xc3)]);break;default:this[_0x14a9c6(0xcf)](_0x14a9c6(0xed),{'error':new _0xef393d(_0x14a9c6(0xab),this,{'resourceId':_0x279d63['id'],'sourceId':_0x5bebce['id'],'resourceType':_0x279d63[_0x14a9c6(0x82)]}),'resourceId':_0x279d63['id'],'sourceId':_0x5bebce['id']});}else this[_0x14a9c6(0xcf)](_0x14a9c6(0xed),{'error':new _0xef393d(_0x14a9c6(0xbd),this,{'resourceId':_0x279d63['id'],'sourceId':_0x5bebce['id']}),'resourceId':_0x279d63['id'],'sourceId':_0x5bebce['id']});}static[_0xfc34d3(0xb1)](_0xe57dfb,_0x1c4160){const _0x5f1fb7=_0xfc34d3;switch(_0xe57dfb[_0x5f1fb7(0x82)]){case _0x8c66f6[_0x5f1fb7(0x75)]:return new File([_0xe57dfb[_0x5f1fb7(0xb7)]],_0x1c4160,{'type':_0x5f1fb7(0xc5)});case _0x8c66f6[_0x5f1fb7(0x74)]:return new File([_0xe57dfb[_0x5f1fb7(0xb7)]],_0x1c4160,{'type':_0x5f1fb7(0x72)});default:return new File([_0xe57dfb[_0x5f1fb7(0xb7)]],_0x1c4160,{'type':_0x5f1fb7(0xc7)});}}static[_0xfc34d3(0xf2)](_0x586b12){const _0x54ec2e=_0xfc34d3;switch(_0x586b12[_0x54ec2e(0x82)]){case _0x28b210[_0x54ec2e(0x93)]:return{'type':_0x28b210[_0x54ec2e(0x93)],'id':_0x586b12['id']};case _0x28b210[_0x54ec2e(0x96)]:return{'type':_0x28b210[_0x54ec2e(0x96)],'id':_0x586b12['id']};case _0x28b210[_0x54ec2e(0xac)]:return{'type':_0x28b210[_0x54ec2e(0xac)],'id':_0x586b12['id'],..._0x586b12[_0x54ec2e(0x83)]?.[_0x54ec2e(0xe0)]&&{'selection':_0x586b12[_0x54ec2e(0x83)]}};case _0x28b210[_0x54ec2e(0xc3)]:return{'type':_0x28b210[_0x54ec2e(0x93)],'id':_0x586b12['id']};default:return null;}}[_0xfc34d3(0xcc)](_0x312b6f,_0xc0d646=!0x1){const _0x764e3=_0xfc34d3;if(this[_0x764e3(0xb2)][_0x764e3(0x77)](_0x312b6f[_0x764e3(0xc0)],_0x312b6f),_0x312b6f[_0x764e3(0xd5)]||this[_0x764e3(0xcf)](_0x764e3(0xea),{'contextItem':_0x312b6f,'isLoading':_0xc0d646}),_0x764e3(0x9c)===_0x312b6f[_0x764e3(0xc0)]&&this[_0x764e3(0x88)](),_0x312b6f[_0x764e3(0x7c)]){const _0x2ba9d3=this[_0x764e3(0xe7)](_0x312b6f[_0x764e3(0x7c)]);_0x2ba9d3&&_0x2ba9d3[_0x764e3(0x8d)](_0x76d7dc=>{const _0x2b9eb3=_0x764e3;this[_0x2b9eb3(0x80)](_0x76d7dc,_0x312b6f[_0x2b9eb3(0x7c)],!0x0);});}}[_0xfc34d3(0xb0)](_0x105c7e){const _0x4e8fa4=_0xfc34d3,_0x1235a7=this[_0x4e8fa4(0xb2)][_0x4e8fa4(0xa8)](_0x105c7e),_0x373b21=this[_0x4e8fa4(0x85)][_0x4e8fa4(0xa8)](_0x105c7e);if(_0x373b21&&(_0x373b21[_0x4e8fa4(0xa6)](),this[_0x4e8fa4(0x85)][_0x4e8fa4(0x8f)](_0x105c7e)),_0x1235a7?.[_0x4e8fa4(0x7c)]){const _0x592b0f=this[_0x4e8fa4(0xe7)](_0x1235a7[_0x4e8fa4(0x7c)]);_0x592b0f&&_0x592b0f[_0x4e8fa4(0x8d)](_0x1b417b=>{const _0x1fbd0f=_0x4e8fa4;this[_0x1fbd0f(0x80)](_0x1b417b,_0x1235a7[_0x1fbd0f(0x7c)],!0x1);});}this[_0x4e8fa4(0xb2)][_0x4e8fa4(0x8f)](_0x105c7e),this[_0x4e8fa4(0xcf)](_0x4e8fa4(0x6d),{'uiId':_0x105c7e,'type':_0x1235a7?.[_0x4e8fa4(0x82)]}),_0x4e8fa4(0x9c)===_0x105c7e&&this[_0x4e8fa4(0x88)]();}[_0xfc34d3(0xd4)](_0x4cb770,_0xaaa9cc){const _0x48f07e=_0xfc34d3;if(this[_0x48f07e(0xb2)][_0x48f07e(0x78)](_0x4cb770[_0x48f07e(0xc0)])&&(this[_0x48f07e(0xb2)][_0x48f07e(0x77)](_0x4cb770[_0x48f07e(0xc0)],_0x4cb770),this[_0x48f07e(0xcf)](_0x48f07e(0xb4),{'contextItem':_0x4cb770,'isLoading':_0xaaa9cc}),_0x4cb770[_0x48f07e(0x7c)])){const _0x5074c7=this[_0x48f07e(0xe7)](_0x4cb770[_0x48f07e(0x7c)]);_0x5074c7&&_0x5074c7[_0x48f07e(0x8d)](_0x1ed1d1=>{const _0x4005be=_0x48f07e;this[_0x4005be(0x80)](_0x1ed1d1,_0x4cb770[_0x4005be(0x7c)],!0x0);});}}[_0xfc34d3(0xba)](_0x5a6182){const _0x56f6af=_0xfc34d3;this[_0x56f6af(0xa5)][_0x56f6af(0x77)](_0x5a6182[_0x56f6af(0xc0)],_0x5a6182);}[_0xfc34d3(0x8a)](){const _0x597c89=_0xfc34d3;this[_0x597c89(0xd0)]={'document':{'enabled':!0x1!==this[_0x597c89(0xd7)]?.[_0x597c89(0xad)]?.[_0x597c89(0x92)],'isHidden':!0x1},'urls':{'enabled':!0x1!==this[_0x597c89(0xd7)]?.[_0x597c89(0x9f)]?.[_0x597c89(0x92)]},'files':{'enabled':!0x1!==this[_0x597c89(0xd7)]?.[_0x597c89(0xe1)]?.[_0x597c89(0x92)]},'sources':this[_0x597c89(0xa1)]()},this[_0x597c89(0xcf)](_0x597c89(0xbb),{'options':this[_0x597c89(0xd0)]});}[_0xfc34d3(0xa1)](){const _0x1c7044=_0xfc34d3;return this[_0x1c7044(0xd7)]?.[_0x1c7044(0xd1)]?.[_0x1c7044(0x81)](_0x1d7532=>({..._0x1d7532,'resources':[]}))??[];}[_0xfc34d3(0x88)](){const _0x1a7b0c=_0xfc34d3,_0x50d055=this[_0x1a7b0c(0xcb)]()||this[_0x1a7b0c(0x68)]();this[_0x1a7b0c(0xd0)][_0x1a7b0c(0xad)][_0x1a7b0c(0xa3)]=_0x50d055,this[_0x1a7b0c(0xcf)](_0x1a7b0c(0xbb),{'options':this[_0x1a7b0c(0xd0)]});}[_0xfc34d3(0x99)](_0x19876b){const _0x572b03=_0xfc34d3;for(const _0x520ebe of this[_0x572b03(0xb2)][_0x572b03(0xa2)]())if(_0x520ebe[_0x572b03(0x7c)]===_0x19876b)return!0x0;for(const _0x112381 of this[_0x572b03(0xa5)][_0x572b03(0xa2)]())if(_0x112381[_0x572b03(0x7c)]===_0x19876b)return!0x0;return!0x1;}[_0xfc34d3(0xe7)](_0xc04bf0){const _0x346fc5=_0xfc34d3,_0x39c511=[];for(const _0x5b9e8d of this[_0x346fc5(0xd0)][_0x346fc5(0xd1)]){_0x5b9e8d[_0x346fc5(0xe9)][_0x346fc5(0x7e)](_0x482af6=>_0x482af6['id']===_0xc04bf0)&&_0x39c511[_0x346fc5(0xbf)](_0x5b9e8d['id']);}return 0x0===_0x39c511[_0x346fc5(0xe0)]?null:_0x39c511;}[_0xfc34d3(0x80)](_0x4a1159,_0x1ebbc3,_0x57850b){const _0x461fbc=_0xfc34d3,_0x471c41=this[_0x461fbc(0xd0)][_0x461fbc(0xd1)][_0x461fbc(0x7e)](_0x5f34cf=>_0x5f34cf['id']===_0x4a1159);if(!_0x471c41)return;const _0x56c35d=_0x471c41[_0x461fbc(0xe9)][_0x461fbc(0x7e)](_0x897d4e=>_0x897d4e['id']===_0x1ebbc3);_0x56c35d&&(_0x56c35d[_0x461fbc(0x8c)]=_0x57850b,this[_0x461fbc(0xcf)](_0x461fbc(0x70),{'sourceId':_0x4a1159,'resourceId':_0x1ebbc3,'isInContext':_0x57850b}));}[_0xfc34d3(0xd2)](_0x2ec922){const _0x3f72aa=_0xfc34d3;this[_0x3f72aa(0xc1)][_0x3f72aa(0x77)](_0x2ec922,!0x0),this[_0x3f72aa(0xc1)][_0x3f72aa(0xeb)]&&this[_0x3f72aa(0xcf)](_0x3f72aa(0x86),{'isUploadInProgress':!0x0});}[_0xfc34d3(0x98)](_0x280603){const _0x47db40=_0xfc34d3;this[_0x47db40(0xc1)][_0x47db40(0x8f)](_0x280603),0x0===this[_0x47db40(0xc1)][_0x47db40(0xeb)]&&this[_0x47db40(0xcf)](_0x47db40(0x86),{'isUploadInProgress':!0x1});}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x212178=_0x2846;function _0x2846(_0xbc0c4d,_0x1dd22e){const _0x5a9e47=_0x5a9e();return _0x2846=function(_0x284620,_0x21cf27){_0x284620=_0x284620-0x86;let _0x1e1cbc=_0x5a9e47[_0x284620];return _0x1e1cbc;},_0x2846(_0xbc0c4d,_0x1dd22e);}(function(_0x163b4e,_0x2c84b9){const _0x4d274d=_0x2846,_0xeee46e=_0x163b4e();while(!![]){try{const _0x3d1b30=-parseInt(_0x4d274d(0xb5))/0x1+-parseInt(_0x4d274d(0x8e))/0x2*(-parseInt(_0x4d274d(0xb1))/0x3)+parseInt(_0x4d274d(0xb6))/0x4+-parseInt(_0x4d274d(0xe1))/0x5*(-parseInt(_0x4d274d(0xa5))/0x6)+parseInt(_0x4d274d(0xc9))/0x7+-parseInt(_0x4d274d(0xd4))/0x8+-parseInt(_0x4d274d(0xcc))/0x9*(parseInt(_0x4d274d(0xa2))/0xa);if(_0x3d1b30===_0x2c84b9)break;else _0xeee46e['push'](_0xeee46e['shift']());}catch(_0x495b99){_0xeee46e['push'](_0xeee46e['shift']());}}}(_0x5a9e,0x913a9));import{CKEditorError as _0x4bcf14,EmitterMixin as _0x56789d,logWarning as _0x1bd44f}from'ckeditor5/src/utils.js';import{AI_MODEL_EVENT_NAMES as _0x509c9f}from'../../aicore/model/aiinteraction.js';import{AIChatContext as _0x179571,AI_CONTEXT_MODEL_EVENT_NAMES as _0x20d172}from'./aichatcontext.js';import{AICapabilities as _0xd16371,CAPABILITIES_MODEL_EVENT_NAMES as _0x27bf65}from'../../aicore/model/aicapabilities.js';function _0x5a9e(){const _0x3ba1a1=['getInteraction','chatModels','sessionId','delegate','getCapabilitiesConfig','type','toggleWebSearch','setConversationTitle','model','set','reasoning','getMessages','isCurrentDocumentInConversation','10SKlUrz','isStarted','role','6qvtbTM','ai-chat-conversation-init-failed','handleUserInteraction','ai-chat-conversation-set-model-null','interactionCreated','populateFromMessage','addCurrentDocumentToContext','getAll','getCurrentDocumentContext','_processMessagesToInteractions','currentInteraction','prompt','48kMVoTw','chatCapabilities','ai-chat-conversation-start-failed','isCurrentDocumentInContext','445598XpoXUU','1535232psOIGD','quickActionData','setModel','hasOwn','loadSourceResources','getPendingContextItems','stack','selectedModelId','getDocumentContext','addUrlToContext','removeFromContext','destroy','lastInteraction','ai-chat-conversation-set-model-not-available','ai-chat-conversation-start-no-model-selected','text','group','content','push','5544427WntcHa','length','conversationStarted','9075627PpnDKk','splice','get','modification-delta','start','connector','chatContext','toLowerCase','2545360qxBAqF','selectedModel','getEditor','ai-chat-handle-user-interaction-already-in-progress','isAvailable','fire','interactions','addToConversationContext','startConversation','addFilesToContext','webSearch','message','ai-chat-handle-user-conversation-not-initialized','3024115bLYuOW','indexOf','_extractContextItems','conversationInitialized','createReply','addResourceToContext','getModel','stop','getAvailableModels','code','ai-chat-conversation-init-from-id-failed','updateCurrentDocumentInContext','getConversation','user','toggleReasoning','currentReply','createInteraction','removeInteraction','text-delta','find','init','fetchConversation','isSelectionInContext','options','appendContent','assistant','load','attributes','modelSelected','ai-chat-handle-user-interaction-start-failed','fetchConversationMessages','contextItems','conversationId','addSelectionToContext','reset','73292kBcmay','ai-chat-conversation-already-started','error','title','removeSelectionFromContext','updateCurrentDocument','capabilities'];_0x5a9e=function(){return _0x3ba1a1;};return _0x5a9e();}import{AIChatInteraction as _0xb9beeb}from'./aichatinteraction.js';import{errorsMap as _0x25dcc0}from'../../errorsmap.js';export class AIChatConversation extends _0x56789d(){['id'];[_0x212178(0xa3)]=!0x1;[_0x212178(0xda)]=[];[_0x212178(0xaf)];[_0x212178(0xd5)];[_0x212178(0xd1)];[_0x212178(0xf8)];constructor(_0x4b114e){const _0x5a7e9c=_0x212178;super(),this[_0x5a7e9c(0xf8)]=_0x4b114e,this[_0x5a7e9c(0xd1)]=_0x4b114e[_0x5a7e9c(0xd1)],this[_0x5a7e9c(0x96)]=_0x4b114e[_0x5a7e9c(0x96)],this['id']=_0x4b114e[_0x5a7e9c(0x8b)];}async[_0x212178(0xf5)](_0x1a0395){const _0x592825=_0x212178;try{this[_0x592825(0xd2)]=new _0x179571({'connector':this[_0x592825(0xd1)],'config':_0x1a0395,'ownerId':this['id']}),this[_0x592825(0xd2)][_0x592825(0x98)](..._0x20d172)['to'](this),this[_0x592825(0xd2)][_0x592825(0xf5)](),this[_0x592825(0xb2)]=new _0xd16371(),this[_0x592825(0xb2)][_0x592825(0x98)](..._0x27bf65)['to'](this),this[_0x592825(0xb2)][_0x592825(0xf5)]();const _0x263a53=await this[_0x592825(0x96)][_0x592825(0xe9)]();this[_0x592825(0xd9)](_0x592825(0xe4),{'availableModels':_0x263a53});const _0x23896d=await this[_0x592825(0x96)][_0x592825(0xe7)](this[_0x592825(0xf8)][_0x592825(0xbd)]);_0x23896d&&await this[_0x592825(0xb8)](_0x23896d);}catch(_0x5c52fb){const _0x1a9324=new _0x4bcf14(_0x592825(0xa6),null,{'message':_0x5c52fb[_0x592825(0xdf)]||_0x5c52fb});_0x1a9324[_0x592825(0xbc)]=_0x5c52fb[_0x592825(0xbc)],this[_0x592825(0xd9)](_0x592825(0x90),{'error':_0x1a9324});}}async[_0x212178(0xd0)](){const _0x3254bc=_0x212178;if(this[_0x3254bc(0xa3)])throw new _0x4bcf14(_0x3254bc(0x8f),null,{'conversation':this});if(!this[_0x3254bc(0xd5)])throw new _0x4bcf14(_0x3254bc(0xc4),null,{'conversation':this});try{const {id:_0x315f3e}=await this[_0x3254bc(0xd1)][_0x3254bc(0xdc)](this['id'],this[_0x3254bc(0xf8)][_0x3254bc(0xc6)])[_0x3254bc(0xed)]();this['id']=_0x315f3e,this[_0x3254bc(0xa3)]=!0x0,this[_0x3254bc(0xd9)](_0x3254bc(0xcb),{'conversationId':this['id'],'selectedModel':this[_0x3254bc(0xd5)]});}catch(_0x284373){const _0x48ef5c=new _0x4bcf14(_0x3254bc(0xb3),null,{'message':_0x284373[_0x3254bc(0xdf)],'conversationId':this['id']});throw _0x48ef5c[_0x3254bc(0xbc)]=_0x284373[_0x3254bc(0xbc)],this[_0x3254bc(0xd9)](_0x3254bc(0x90),{'error':_0x48ef5c}),_0x48ef5c;}}async[_0x212178(0xfb)](_0x2afbdc,_0x45e0eb){const _0x46c865=_0x212178;try{const _0x519f9c=await this[_0x46c865(0xd1)][_0x46c865(0xf6)](_0x2afbdc)[_0x46c865(0xed)](),_0x425aec=await this[_0x46c865(0xd1)][_0x46c865(0x89)](_0x2afbdc)[_0x46c865(0xa0)](),_0x5f508a=_0x425aec[0x0][_0x46c865(0x9d)];this[_0x46c865(0xa3)]=!0x0,this['id']=_0x519f9c['id'],_0x46c865(0x91)in _0x519f9c?this[_0x46c865(0xd9)](_0x46c865(0x9c),_0x519f9c[_0x46c865(0x91)],!0x0):this[_0x46c865(0xd9)](_0x46c865(0x9c),'',!0x0);const _0x20d8d7=(await this[_0x46c865(0x96)][_0x46c865(0xac)]())[_0x46c865(0xf4)](_0x19b389=>_0x19b389['id'][_0x46c865(0xd3)]()===_0x5f508a[_0x46c865(0xd3)]());return this[_0x46c865(0xd5)]=_0x20d8d7,this[_0x46c865(0xd9)](_0x46c865(0x87),{'selectedModel':_0x20d8d7,'isDisabled':!0x0}),await this[_0x46c865(0xae)](_0x425aec,_0x45e0eb,_0x5f508a),this[_0x46c865(0xaf)]=void 0x0,this;}catch(_0x3d22a8){const _0x4ce4ec=new _0x4bcf14(_0x46c865(0xeb),null,{'message':_0x3d22a8[_0x46c865(0xdf)],'conversationId':_0x2afbdc});throw _0x4ce4ec[_0x46c865(0xbc)]=_0x3d22a8[_0x46c865(0xbc)],this[_0x46c865(0xd9)](_0x46c865(0x90),{'error':_0x4ce4ec}),_0x4ce4ec;}}async[_0x212178(0xae)](_0x4973b3,_0x53b4ad,_0x13eea3){const _0x26ac48=_0x212178;let _0x5c0099;for(const _0x574f70 of _0x4973b3)if(_0x26ac48(0xee)===_0x574f70[_0x26ac48(0xa4)]){const _0x4ac52e=await this[_0x26ac48(0xe3)](_0x574f70),_0x6ac1be={'isReasoningEnabled':Object[_0x26ac48(0xb9)](_0x574f70[_0x26ac48(0x94)],_0x26ac48(0x9f)),'isWebSearchEnabled':Object[_0x26ac48(0xb9)](_0x574f70[_0x26ac48(0x94)],_0x26ac48(0xde))};_0x5c0099=this[_0x26ac48(0xf1)]({'userMessage':_0x574f70[_0x26ac48(0xb0)],'contextItems':_0x4ac52e,'capabilities':_0x6ac1be,'modelId':_0x13eea3,'quickActionData':_0x574f70[_0x26ac48(0x86)]?.[_0x26ac48(0xb7)]}),this[_0x26ac48(0xaf)]=_0x5c0099,this[_0x26ac48(0xd2)][_0x26ac48(0xdb)](this[_0x26ac48(0xaf)][_0x26ac48(0x8a)]);}else{if(_0x26ac48(0xfa)===_0x574f70[_0x26ac48(0xa4)]&&_0x5c0099)for(const _0x83ac02 of _0x574f70[_0x26ac48(0xc7)]){const _0x3d5d20=_0x26ac48(0xc5)===_0x83ac02[_0x26ac48(0x9a)]?_0x26ac48(0xf3):_0x26ac48(0xcf),_0x319090=_0x5c0099[_0x26ac48(0xbe)]()?.[_0x26ac48(0x97)]!==_0x53b4ad;_0x5c0099[_0x26ac48(0xf0)]=_0x5c0099[_0x26ac48(0xe5)]({'type':_0x3d5d20,'isDone':!0x0,'interactionId':_0x5c0099['id'],'areActionsDisabled':_0x319090}),_0x5c0099[_0x26ac48(0xf0)][_0x26ac48(0xf9)](_0x83ac02[_0x26ac48(0xc7)]);}}}async[_0x212178(0xe3)](_0x92140c){const _0x1eb7f6=_0x212178,_0x12a225=new Map();if(!_0x92140c[_0x1eb7f6(0xc7)])return _0x12a225;for(const _0xbbda6f of _0x92140c[_0x1eb7f6(0xc7)]){const _0x5e2e5c=await this[_0x1eb7f6(0xd2)][_0x1eb7f6(0xaa)](_0xbbda6f);_0x5e2e5c&&_0x12a225[_0x1eb7f6(0x9e)](_0x5e2e5c['id'],_0x5e2e5c);}return _0x12a225;}async[_0x212178(0xa7)]({userMessage:_0x3de229,quickActionData:_0x2a9e2e}){const _0x4d876e=_0x212178;if(!this[_0x4d876e(0xa3)])throw new _0x4bcf14(_0x4d876e(0xe0),null,{'conversation':this});if(this[_0x4d876e(0xaf)])throw new _0x4bcf14(_0x4d876e(0xd7),null,{'conversation':this});try{const _0x2159cc=this[_0x4d876e(0xd2)][_0x4d876e(0xbb)](),_0x4f8759=this[_0x4d876e(0xb2)][_0x4d876e(0x99)](),_0x6c743d=this[_0x4d876e(0xd5)]['id'];this[_0x4d876e(0xaf)]=this[_0x4d876e(0xf1)]({'userMessage':_0x3de229,'contextItems':_0x2159cc,'capabilities':_0x4f8759,'modelId':_0x6c743d,'quickActionData':_0x2a9e2e}),await this[_0x4d876e(0xaf)][_0x4d876e(0xd0)](),this[_0x4d876e(0xd2)][_0x4d876e(0xdb)](this[_0x4d876e(0xaf)][_0x4d876e(0x8a)]);}catch(_0x286583){if(_0x286583 instanceof _0x4bcf14)this[_0x4d876e(0xd9)](_0x4d876e(0x90),{'interactionId':this[_0x4d876e(0xaf)]?this[_0x4d876e(0xaf)]['id']:void 0x0,'error':_0x286583});else{const _0xd06268=_0x25dcc0[_0x4d876e(0xce)](_0x286583[_0x4d876e(0xea)])||_0x4d876e(0x88);this[_0x4d876e(0xd9)](_0x4d876e(0x90),{'interactionId':this[_0x4d876e(0xaf)]?this[_0x4d876e(0xaf)]['id']:void 0x0,'error':new _0x4bcf14(_0xd06268,null,{'error':_0x286583})});}}finally{this[_0x4d876e(0xaf)]?.[_0x4d876e(0xe8)](),this[_0x4d876e(0xaf)]=void 0x0;}}[_0x212178(0xf1)]({userMessage:_0xda3337,contextItems:_0x4dae69,capabilities:_0x5f2772,modelId:_0x2f1487,quickActionData:_0x2f464b}){const _0x139bb4=_0x212178,_0x50a282=new _0xb9beeb({'userMessage':_0xda3337,'contextItems':_0x4dae69,'capabilities':_0x5f2772,'conversationId':this['id'],'connector':this[_0x139bb4(0xd1)],'editor':this[_0x139bb4(0xf8)][_0x139bb4(0xd6)]&&this[_0x139bb4(0xf8)][_0x139bb4(0xd6)](),'model':_0x2f1487,'quickActionData':_0x2f464b});return _0x50a282[_0x139bb4(0x98)](..._0x509c9f)['to'](this),this[_0x139bb4(0xda)][_0x139bb4(0xc8)](_0x50a282),this[_0x139bb4(0xd9)](_0x139bb4(0xa9),_0x50a282),_0x50a282;}[_0x212178(0x95)](_0x415b40){const _0x339499=_0x212178;return this[_0x339499(0xda)][_0x339499(0xf4)](_0x535b96=>_0x535b96['id']===_0x415b40);}[_0x212178(0xf2)](_0x2c1a60){const _0x4d1fe9=_0x212178,_0x59d852=this[_0x4d1fe9(0x95)](_0x2c1a60);_0x59d852&&(_0x59d852[_0x4d1fe9(0xc1)](),this[_0x4d1fe9(0xda)][_0x4d1fe9(0xcd)](this[_0x4d1fe9(0xda)][_0x4d1fe9(0xe2)](_0x59d852),0x1));}get[_0x212178(0xc2)](){const _0x43a747=_0x212178;return this[_0x43a747(0xda)][this[_0x43a747(0xda)][_0x43a747(0xca)]-0x1];}[_0x212178(0xab)](_0x1fa41b){const _0x39d183=_0x212178;this[_0x39d183(0xd2)][_0x39d183(0xab)](_0x1fa41b);}async[_0x212178(0xec)]({content:_0x241fc8,version:_0x288226,sessionId:_0x4148e4,selections:_0x5c0443}){const _0x2eb942=_0x212178;await this[_0x2eb942(0xd2)][_0x2eb942(0x93)](_0x241fc8,_0x288226,_0x4148e4,_0x5c0443);}[_0x212178(0xad)](){const _0x8e5e24=_0x212178;return this[_0x8e5e24(0xaf)]?.[_0x8e5e24(0xbe)]()?.[_0x8e5e24(0xc7)]||'';}[_0x212178(0x8c)](_0x48e0da){const _0x1bb2f2=_0x212178;this[_0x1bb2f2(0xd2)][_0x1bb2f2(0x8c)](_0x48e0da);}[_0x212178(0x92)](){const _0x216c20=_0x212178;this[_0x216c20(0xd2)][_0x216c20(0x92)]();}[_0x212178(0xdd)](_0x396460){const _0x5c9ef5=_0x212178;this[_0x5c9ef5(0xd2)][_0x5c9ef5(0xdd)](_0x396460);}[_0x212178(0xbf)](_0x5d6e9c){const _0x211728=_0x212178;this[_0x211728(0xd2)][_0x211728(0xbf)](_0x5d6e9c);}[_0x212178(0xe6)](_0x573474,_0x5dbae7){const _0x16c013=_0x212178;this[_0x16c013(0xd2)][_0x16c013(0xe6)](_0x573474,_0x5dbae7);}[_0x212178(0xba)](_0x63bd90,_0x55fbda,_0x3acde9){const _0x933751=_0x212178;return this[_0x933751(0xd2)][_0x933751(0xba)](_0x63bd90,_0x55fbda,_0x3acde9);}[_0x212178(0xc0)](_0x414311){const _0x3c36a8=_0x212178;this[_0x3c36a8(0xd2)][_0x3c36a8(0xc0)](_0x414311);}[_0x212178(0x9b)](){const _0x3fdbea=_0x212178;this[_0x3fdbea(0xb2)][_0x3fdbea(0x9b)]();}[_0x212178(0xef)](){const _0x222ef7=_0x212178;this[_0x222ef7(0xb2)][_0x222ef7(0xef)]();}[_0x212178(0xb4)](){const _0x574fd1=_0x212178;return this[_0x574fd1(0xd2)][_0x574fd1(0xb4)]();}[_0x212178(0xa1)](){const _0x3c40e3=_0x212178;return this[_0x3c40e3(0xd2)][_0x3c40e3(0xa1)]();}[_0x212178(0xf7)](){const _0x30b7e7=_0x212178;return this[_0x30b7e7(0xd2)][_0x30b7e7(0xf7)]();}async[_0x212178(0xb8)](_0x1e5d30){const _0x34ceb9=_0x212178;_0x1e5d30?!0x1===await this[_0x34ceb9(0x96)][_0x34ceb9(0xd8)](_0x1e5d30)&&(_0x1bd44f(_0x34ceb9(0xc3),{'conversation':this,'model':_0x1e5d30}),_0x1e5d30=(await this[_0x34ceb9(0x96)][_0x34ceb9(0xe9)]())[0x0]):(_0x1bd44f(_0x34ceb9(0xa8),{'conversation':this}),_0x1e5d30=(await this[_0x34ceb9(0x96)][_0x34ceb9(0xe9)]())[0x0]),_0x1e5d30['id']!==this[_0x34ceb9(0xd5)]?.['id']&&(this[_0x34ceb9(0xd5)]=_0x1e5d30,this[_0x34ceb9(0xb2)][_0x34ceb9(0x8d)](),this[_0x34ceb9(0xd9)](_0x34ceb9(0x87),{'selectedModel':_0x1e5d30}));}}
23
+ const _0x2306c6=_0x5755;(function(_0x3f7c55,_0x1e334c){const _0xdcc68d=_0x5755,_0x53a3ca=_0x3f7c55();while(!![]){try{const _0x52ca9a=-parseInt(_0xdcc68d(0xec))/0x1*(parseInt(_0xdcc68d(0xd9))/0x2)+-parseInt(_0xdcc68d(0xfd))/0x3*(-parseInt(_0xdcc68d(0xdd))/0x4)+parseInt(_0xdcc68d(0xd7))/0x5+parseInt(_0xdcc68d(0xaa))/0x6*(-parseInt(_0xdcc68d(0xc1))/0x7)+-parseInt(_0xdcc68d(0xb6))/0x8*(-parseInt(_0xdcc68d(0xa6))/0x9)+parseInt(_0xdcc68d(0xb7))/0xa*(parseInt(_0xdcc68d(0xf0))/0xb)+parseInt(_0xdcc68d(0xbd))/0xc;if(_0x52ca9a===_0x1e334c)break;else _0x53a3ca['push'](_0x53a3ca['shift']());}catch(_0x112c23){_0x53a3ca['push'](_0x53a3ca['shift']());}}}(_0x1fa4,0xa8d38));import{CKEditorError as _0x340a07,EmitterMixin as _0x5885af,logWarning as _0x57c52a}from'ckeditor5/src/utils.js';import{AI_MODEL_EVENT_NAMES as _0x1704ab}from'../../aicore/model/aiinteraction.js';import{AIChatContext as _0x1faa1e,AI_CONTEXT_MODEL_EVENT_NAMES as _0x35a2e1}from'./aichatcontext.js';import{AICapabilities as _0x26d618,CAPABILITIES_MODEL_EVENT_NAMES as _0x31c8e2}from'../../aicore/model/aicapabilities.js';function _0x5755(_0x4a0d27,_0x2f7737){const _0x1fa4b0=_0x1fa4();return _0x5755=function(_0x57552f,_0x37cb8b){_0x57552f=_0x57552f-0xa3;let _0x11e0f8=_0x1fa4b0[_0x57552f];return _0x11e0f8;},_0x5755(_0x4a0d27,_0x2f7737);}import{AIChatInteraction as _0x610ae6}from'./aichatinteraction.js';function _0x1fa4(){const _0x49f24b=['getAll','toLowerCase','ai-chat-conversation-start-no-model-selected','ai-chat-handle-user-interaction-already-in-progress','336459WtUzFk','find','set','message','interactions','delegate','title','handleUserInteraction','loadSourceResources','capabilities','destroy','getCurrentDocumentContext','getDocumentContext','group','toggleReasoning','addToConversationContext','user','init','modelSelected','prompt','updateCurrentDocument','type','stop','getCapabilitiesConfig','updateCurrentDocumentInContext','ai-chat-conversation-init-failed','sessionId','connector','addFilesToContext','text','_extractContextItems','getAvailableModels','toggleWebSearch','27DHiaFw','interactionCreated','webSearch','get','98466zmKrjl','splice','stack','fetchConversation','currentInteraction','lastInteraction','start','attributes','code','ai-chat-handle-user-conversation-not-initialized','isCurrentDocumentInConversation','addSelectionToContext','169104BxveGh','5175470ZWkyMT','addCurrentDocumentToContext','currentReply','addResourceToContext','conversationId','ai-chat-handle-user-interaction-start-failed','2811756gSOvXK','ai-chat-conversation-init-from-id-failed','isCurrentDocumentInContext','chatContext','560okclkD','addUrlToContext','populateFromMessage','chatCapabilities','setModel','chatModels','createReply','isStarted','push','assistant','appendContent','indexOf','isSelectionInContext','ai-chat-conversation-set-model-not-available','selectedModelId','quickActionData','getConversation','contextItems','setConversationTitle','getEditor','ai-chat-conversation-set-model-null','load','4908965boNhwj','getInteraction','258268BcoEPM','conversationInitialized','error','length','12iIlsjn','conversationStarted','options','reasoning','createInteraction','removeSelectionFromContext','removeInteraction','role','text-delta','removeFromContext','ai-chat-conversation-already-started','_processMessagesToInteractions','startConversation','selectedModel','ai-chat-conversation-start-failed','1tjxIal','fire','fetchConversationMessages','getMessages','11obPyzK','getModel','reset','content','hasOwn','getPendingContextItems','modification-delta','isAvailable','model'];_0x1fa4=function(){return _0x49f24b;};return _0x1fa4();}import{errorsMap as _0x346be0}from'../../errorsmap.js';export class AIChatConversation extends _0x5885af(){['id'];[_0x2306c6(0xc8)]=!0x1;[_0x2306c6(0x101)]=[];[_0x2306c6(0xae)];[_0x2306c6(0xea)];[_0x2306c6(0x118)];[_0x2306c6(0xdf)];constructor(_0x5233df){const _0x214de3=_0x2306c6;super(),this[_0x214de3(0xdf)]=_0x5233df,this[_0x214de3(0x118)]=_0x5233df[_0x214de3(0x118)],this[_0x214de3(0xc6)]=_0x5233df[_0x214de3(0xc6)],this['id']=_0x5233df[_0x214de3(0xbb)];}async[_0x2306c6(0x10e)](_0x36daef){const _0x5141e8=_0x2306c6;try{this[_0x5141e8(0xc0)]=new _0x1faa1e({'connector':this[_0x5141e8(0x118)],'config':_0x36daef,'ownerId':this['id']}),this[_0x5141e8(0xc0)][_0x5141e8(0x102)](..._0x35a2e1)['to'](this),this[_0x5141e8(0xc0)][_0x5141e8(0x10e)](),this[_0x5141e8(0xc4)]=new _0x26d618(),this[_0x5141e8(0xc4)][_0x5141e8(0x102)](..._0x31c8e2)['to'](this),this[_0x5141e8(0xc4)][_0x5141e8(0x10e)]();const _0x57c15e=await this[_0x5141e8(0xc6)][_0x5141e8(0xa4)]();this[_0x5141e8(0xed)](_0x5141e8(0xda),{'availableModels':_0x57c15e});const _0x492953=await this[_0x5141e8(0xc6)][_0x5141e8(0xf1)](this[_0x5141e8(0xdf)][_0x5141e8(0xcf)]);_0x492953&&await this[_0x5141e8(0xc5)](_0x492953);}catch(_0x224446){const _0x1c34cb=new _0x340a07(_0x5141e8(0x116),null,{'message':_0x224446[_0x5141e8(0x100)]||_0x224446});_0x1c34cb[_0x5141e8(0xac)]=_0x224446[_0x5141e8(0xac)],this[_0x5141e8(0xed)](_0x5141e8(0xdb),{'error':_0x1c34cb});}}async[_0x2306c6(0xb0)](){const _0x232a30=_0x2306c6;if(this[_0x232a30(0xc8)])throw new _0x340a07(_0x232a30(0xe7),null,{'conversation':this});if(!this[_0x232a30(0xea)])throw new _0x340a07(_0x232a30(0xfb),null,{'conversation':this});try{const {id:_0x1b9dd8}=await this[_0x232a30(0x118)][_0x232a30(0xe9)](this['id'],this[_0x232a30(0xdf)][_0x232a30(0x10a)])[_0x232a30(0xd1)]();this['id']=_0x1b9dd8,this[_0x232a30(0xc8)]=!0x0,this[_0x232a30(0xed)](_0x232a30(0xde),{'conversationId':this['id'],'selectedModel':this[_0x232a30(0xea)]});}catch(_0x5a4411){const _0xf4f21=new _0x340a07(_0x232a30(0xeb),null,{'message':_0x5a4411[_0x232a30(0x100)],'conversationId':this['id']});throw _0xf4f21[_0x232a30(0xac)]=_0x5a4411[_0x232a30(0xac)],this[_0x232a30(0xed)](_0x232a30(0xdb),{'error':_0xf4f21}),_0xf4f21;}}async[_0x2306c6(0xd6)](_0x2dc415,_0x56ecfa){const _0x42732a=_0x2306c6;try{const _0x1692b9=await this[_0x42732a(0x118)][_0x42732a(0xad)](_0x2dc415)[_0x42732a(0xd1)](),_0x33776b=await this[_0x42732a(0x118)][_0x42732a(0xee)](_0x2dc415)[_0x42732a(0xef)](),_0x2fed9c=_0x33776b[0x0][_0x42732a(0xf8)];this[_0x42732a(0xc8)]=!0x0,this['id']=_0x1692b9['id'],_0x42732a(0x103)in _0x1692b9?this[_0x42732a(0xed)](_0x42732a(0xd3),_0x1692b9[_0x42732a(0x103)],!0x0):this[_0x42732a(0xed)](_0x42732a(0xd3),'',!0x0);const _0x24c0f4=(await this[_0x42732a(0xc6)][_0x42732a(0xf9)]())[_0x42732a(0xfe)](_0x22fbae=>_0x22fbae['id'][_0x42732a(0xfa)]()===_0x2fed9c[_0x42732a(0xfa)]());return this[_0x42732a(0xea)]=_0x24c0f4,this[_0x42732a(0xed)](_0x42732a(0x10f),{'selectedModel':_0x24c0f4,'isDisabled':!0x0}),await this[_0x42732a(0xe8)](_0x33776b,_0x56ecfa,_0x2fed9c),this[_0x42732a(0xae)]=void 0x0,this;}catch(_0xbd27f){const _0x2f56fd=new _0x340a07(_0x42732a(0xbe),null,{'message':_0xbd27f[_0x42732a(0x100)],'conversationId':_0x2dc415});throw _0x2f56fd[_0x42732a(0xac)]=_0xbd27f[_0x42732a(0xac)],this[_0x42732a(0xed)](_0x42732a(0xdb),{'error':_0x2f56fd}),_0x2f56fd;}}async[_0x2306c6(0xe8)](_0x10a159,_0x29b326,_0x5a6e51){const _0x7fd3ae=_0x2306c6;let _0x3e2163;for(const _0x2260ad of _0x10a159)if(_0x7fd3ae(0x10d)===_0x2260ad[_0x7fd3ae(0xe4)]){const _0x425a79=await this[_0x7fd3ae(0xa3)](_0x2260ad),_0x9f5a4b={'isReasoningEnabled':Object[_0x7fd3ae(0xf4)](_0x2260ad[_0x7fd3ae(0x106)],_0x7fd3ae(0xe0)),'isWebSearchEnabled':Object[_0x7fd3ae(0xf4)](_0x2260ad[_0x7fd3ae(0x106)],_0x7fd3ae(0xa8))};_0x3e2163=this[_0x7fd3ae(0xe1)]({'userMessage':_0x2260ad[_0x7fd3ae(0x110)],'contextItems':_0x425a79,'capabilities':_0x9f5a4b,'modelId':_0x5a6e51,'quickActionData':_0x2260ad[_0x7fd3ae(0xb1)]?.[_0x7fd3ae(0xd0)]}),this[_0x7fd3ae(0xae)]=_0x3e2163,this[_0x7fd3ae(0xc0)][_0x7fd3ae(0x10c)](this[_0x7fd3ae(0xae)][_0x7fd3ae(0xd2)]);}else{if(_0x7fd3ae(0xca)===_0x2260ad[_0x7fd3ae(0xe4)]&&_0x3e2163)for(const _0x5662c6 of _0x2260ad[_0x7fd3ae(0xf3)]){const _0x45cf89=_0x7fd3ae(0x11a)===_0x5662c6[_0x7fd3ae(0x112)]?_0x7fd3ae(0xe5):_0x7fd3ae(0xf6),_0x1a6e55=_0x3e2163[_0x7fd3ae(0x109)]()?.[_0x7fd3ae(0x117)]!==_0x29b326;_0x3e2163[_0x7fd3ae(0xb9)]=_0x3e2163[_0x7fd3ae(0xc7)]({'type':_0x45cf89,'isDone':!0x0,'interactionId':_0x3e2163['id'],'areActionsDisabled':_0x1a6e55}),_0x3e2163[_0x7fd3ae(0xb9)][_0x7fd3ae(0xcb)](_0x5662c6[_0x7fd3ae(0xf3)]);}}}async[_0x2306c6(0xa3)](_0x4817b4){const _0x2777f9=_0x2306c6,_0x38d9dd=new Map();if(!_0x4817b4[_0x2777f9(0xf3)])return _0x38d9dd;for(const _0x243534 of _0x4817b4[_0x2777f9(0xf3)]){const _0x177e61=await this[_0x2777f9(0xc0)][_0x2777f9(0xc3)](_0x243534);_0x177e61&&_0x38d9dd[_0x2777f9(0xff)](_0x177e61['id'],_0x177e61);}return _0x38d9dd;}async[_0x2306c6(0x104)]({userMessage:_0xa45f5e,quickActionData:_0x553a6d}){const _0x420b5a=_0x2306c6;if(!this[_0x420b5a(0xc8)])throw new _0x340a07(_0x420b5a(0xb3),null,{'conversation':this});if(this[_0x420b5a(0xae)])throw new _0x340a07(_0x420b5a(0xfc),null,{'conversation':this});try{const _0x1568f0=this[_0x420b5a(0xc0)][_0x420b5a(0xf5)](),_0x4d7442=this[_0x420b5a(0xc4)][_0x420b5a(0x114)](),_0x4a5025=this[_0x420b5a(0xea)]['id'];this[_0x420b5a(0xae)]=this[_0x420b5a(0xe1)]({'userMessage':_0xa45f5e,'contextItems':_0x1568f0,'capabilities':_0x4d7442,'modelId':_0x4a5025,'quickActionData':_0x553a6d}),await this[_0x420b5a(0xae)][_0x420b5a(0xb0)](),this[_0x420b5a(0xc0)][_0x420b5a(0x10c)](this[_0x420b5a(0xae)][_0x420b5a(0xd2)]);}catch(_0x2a7d7d){if(_0x2a7d7d instanceof _0x340a07)this[_0x420b5a(0xed)](_0x420b5a(0xdb),{'interactionId':this[_0x420b5a(0xae)]?this[_0x420b5a(0xae)]['id']:void 0x0,'error':_0x2a7d7d});else{const _0x4bca79=_0x346be0[_0x420b5a(0xa9)](_0x2a7d7d[_0x420b5a(0xb2)])||_0x420b5a(0xbc);this[_0x420b5a(0xed)](_0x420b5a(0xdb),{'interactionId':this[_0x420b5a(0xae)]?this[_0x420b5a(0xae)]['id']:void 0x0,'error':new _0x340a07(_0x4bca79,null,{'error':_0x2a7d7d})});}}finally{this[_0x420b5a(0xae)]?.[_0x420b5a(0x113)](),this[_0x420b5a(0xae)]=void 0x0;}}[_0x2306c6(0xe1)]({userMessage:_0x17d0e3,contextItems:_0x12124e,capabilities:_0x554577,modelId:_0x2e0514,quickActionData:_0x546326}){const _0x215287=_0x2306c6,_0x400eea=new _0x610ae6({'userMessage':_0x17d0e3,'contextItems':_0x12124e,'capabilities':_0x554577,'conversationId':this['id'],'connector':this[_0x215287(0x118)],'editor':this[_0x215287(0xdf)][_0x215287(0xd4)]&&this[_0x215287(0xdf)][_0x215287(0xd4)](),'model':_0x2e0514,'quickActionData':_0x546326});return _0x400eea[_0x215287(0x102)](..._0x1704ab)['to'](this),this[_0x215287(0x101)][_0x215287(0xc9)](_0x400eea),this[_0x215287(0xed)](_0x215287(0xa7),_0x400eea),_0x400eea;}[_0x2306c6(0xd8)](_0x468198){const _0x44b656=_0x2306c6;return this[_0x44b656(0x101)][_0x44b656(0xfe)](_0x400c00=>_0x400c00['id']===_0x468198);}[_0x2306c6(0xe3)](_0x55d31c){const _0x46cf83=_0x2306c6,_0x127a4c=this[_0x46cf83(0xd8)](_0x55d31c);_0x127a4c&&(_0x127a4c[_0x46cf83(0x107)](),this[_0x46cf83(0x101)][_0x46cf83(0xab)](this[_0x46cf83(0x101)][_0x46cf83(0xcc)](_0x127a4c),0x1));}get[_0x2306c6(0xaf)](){const _0x1f9241=_0x2306c6;return this[_0x1f9241(0x101)][this[_0x1f9241(0x101)][_0x1f9241(0xdc)]-0x1];}[_0x2306c6(0xb8)](_0x43fa3c){const _0xa9b8bf=_0x2306c6;this[_0xa9b8bf(0xc0)][_0xa9b8bf(0xb8)](_0x43fa3c);}async[_0x2306c6(0x115)]({content:_0xb1e644,version:_0x473d71,sessionId:_0x93aaf7,selections:_0x5e4190}){const _0x15930e=_0x2306c6;await this[_0x15930e(0xc0)][_0x15930e(0x111)](_0xb1e644,_0x473d71,_0x93aaf7,_0x5e4190);}[_0x2306c6(0x108)](){const _0x21b8b1=_0x2306c6;return this[_0x21b8b1(0xae)]?.[_0x21b8b1(0x109)]()?.[_0x21b8b1(0xf3)]||'';}[_0x2306c6(0xb5)](_0x120e9a){const _0xf54211=_0x2306c6;this[_0xf54211(0xc0)][_0xf54211(0xb5)](_0x120e9a);}[_0x2306c6(0xe2)](){const _0xf1c6c0=_0x2306c6;this[_0xf1c6c0(0xc0)][_0xf1c6c0(0xe2)]();}[_0x2306c6(0x119)](_0x4f8525){const _0x57f106=_0x2306c6;this[_0x57f106(0xc0)][_0x57f106(0x119)](_0x4f8525);}[_0x2306c6(0xc2)](_0x503fa0){const _0x4cebe1=_0x2306c6;this[_0x4cebe1(0xc0)][_0x4cebe1(0xc2)](_0x503fa0);}[_0x2306c6(0xba)](_0x4925f0,_0x18cfd4){const _0x37f9ac=_0x2306c6;this[_0x37f9ac(0xc0)][_0x37f9ac(0xba)](_0x4925f0,_0x18cfd4);}[_0x2306c6(0x105)](_0x346abc,_0x27e174,_0x396fd0){const _0x54089a=_0x2306c6;return this[_0x54089a(0xc0)][_0x54089a(0x105)](_0x346abc,_0x27e174,_0x396fd0);}[_0x2306c6(0xe6)](_0xa969a1){const _0x56cf38=_0x2306c6;this[_0x56cf38(0xc0)][_0x56cf38(0xe6)](_0xa969a1);}[_0x2306c6(0xa5)](){const _0x369ded=_0x2306c6;this[_0x369ded(0xc4)][_0x369ded(0xa5)]();}[_0x2306c6(0x10b)](){const _0x36f1df=_0x2306c6;this[_0x36f1df(0xc4)][_0x36f1df(0x10b)]();}[_0x2306c6(0xbf)](){const _0x53886c=_0x2306c6;return this[_0x53886c(0xc0)][_0x53886c(0xbf)]();}[_0x2306c6(0xb4)](){const _0x48d209=_0x2306c6;return this[_0x48d209(0xc0)][_0x48d209(0xb4)]();}[_0x2306c6(0xcd)](){const _0x2098fe=_0x2306c6;return this[_0x2098fe(0xc0)][_0x2098fe(0xcd)]();}async[_0x2306c6(0xc5)](_0x3d4d97){const _0x3b40cf=_0x2306c6;_0x3d4d97?!0x1===await this[_0x3b40cf(0xc6)][_0x3b40cf(0xf7)](_0x3d4d97)&&(_0x57c52a(_0x3b40cf(0xce),{'conversation':this,'model':_0x3d4d97}),_0x3d4d97=(await this[_0x3b40cf(0xc6)][_0x3b40cf(0xa4)]())[0x0]):(_0x57c52a(_0x3b40cf(0xd5),{'conversation':this}),_0x3d4d97=(await this[_0x3b40cf(0xc6)][_0x3b40cf(0xa4)]())[0x0]),_0x3d4d97['id']!==this[_0x3b40cf(0xea)]?.['id']&&(this[_0x3b40cf(0xea)]=_0x3d4d97,this[_0x3b40cf(0xc4)][_0x3b40cf(0xf2)](),this[_0x3b40cf(0xed)](_0x3b40cf(0x10f),{'selectedModel':_0x3d4d97}));}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- var _0x5a6cf5=_0x19f2;function _0x19f2(_0x499aaa,_0x41fbb7){var _0x38e6c9=_0x38e6();return _0x19f2=function(_0x19f221,_0x3559f7){_0x19f221=_0x19f221-0x134;var _0x1d505c=_0x38e6c9[_0x19f221];return _0x1d505c;},_0x19f2(_0x499aaa,_0x41fbb7);}(function(_0x50bdc1,_0x4052e5){var _0x2c7d91=_0x19f2,_0x436a5a=_0x50bdc1();while(!![]){try{var _0x35e553=-parseInt(_0x2c7d91(0x137))/0x1+-parseInt(_0x2c7d91(0x145))/0x2*(-parseInt(_0x2c7d91(0x14a))/0x3)+-parseInt(_0x2c7d91(0x136))/0x4+parseInt(_0x2c7d91(0x144))/0x5*(parseInt(_0x2c7d91(0x13c))/0x6)+parseInt(_0x2c7d91(0x143))/0x7+parseInt(_0x2c7d91(0x148))/0x8*(-parseInt(_0x2c7d91(0x138))/0x9)+parseInt(_0x2c7d91(0x147))/0xa*(parseInt(_0x2c7d91(0x142))/0xb);if(_0x35e553===_0x4052e5)break;else _0x436a5a['push'](_0x436a5a['shift']());}catch(_0x25305b){_0x436a5a['push'](_0x436a5a['shift']());}}}(_0x38e6,0xa1c3a));import{AICapabilities as _0x4a445a}from'../../aicore/model/aicapabilities.js';import{AIInteraction as _0xa4ea3e}from'../../aicore/model/aiinteraction.js';import{AIChatContext as _0x4b5be8}from'./aichatcontext.js';export class AIChatInteraction extends _0xa4ea3e{[_0x5a6cf5(0x141)];[_0x5a6cf5(0x134)];[_0x5a6cf5(0x13f)]=new Map();[_0x5a6cf5(0x149)];[_0x5a6cf5(0x146)];constructor(_0x39f686){var _0x1bd80e=_0x5a6cf5;super(_0x39f686),this[_0x1bd80e(0x134)]=_0x39f686[_0x1bd80e(0x134)],this[_0x1bd80e(0x13f)]=_0x39f686[_0x1bd80e(0x13f)],this[_0x1bd80e(0x13a)]=_0x39f686[_0x1bd80e(0x13a)],this[_0x1bd80e(0x141)]=_0x39f686[_0x1bd80e(0x141)],this[_0x1bd80e(0x149)]=_0x39f686[_0x1bd80e(0x149)],this[_0x1bd80e(0x146)]=_0x39f686[_0x1bd80e(0x146)];}async[_0x5a6cf5(0x13b)](){var _0x56e3c1=_0x5a6cf5;return this[_0x56e3c1(0x139)][_0x56e3c1(0x14c)]({'message':this[_0x56e3c1(0x141)],'conversationId':this[_0x56e3c1(0x134)],'parts':_0x4b5be8[_0x56e3c1(0x140)](this[_0x56e3c1(0x13f)]),'capabilities':_0x4a445a[_0x56e3c1(0x13e)](this[_0x56e3c1(0x13a)]),'model':this[_0x56e3c1(0x149)],'quickActionData':this[_0x56e3c1(0x146)]});}[_0x5a6cf5(0x14b)](){var _0x552c2d=_0x5a6cf5;return this[_0x552c2d(0x13f)][_0x552c2d(0x13d)](_0x552c2d(0x135));}}function _0x38e6(){var _0x5481eb=['userMessage','11HxTBMg','8468908tfsrBL','5NHDlxL','343792wQcDKZ','quickActionData','6068510Rzults','503360zVnSOc','model','15eJLDZa','getDocumentContext','queryAssistant','conversationId','current-document','5097572GXkBaN','1092677BflBhc','9jefORM','connector','capabilities','sendRequest','2498406rejuoQ','get','getCapabilitiesRequestData','contextItems','mapContextItemsToRequestData'];_0x38e6=function(){return _0x5481eb;};return _0x38e6();}
23
+ var _0x5377d5=_0x132a;function _0x132a(_0x4455c4,_0x322114){var _0xc1e5f2=_0xc1e5();return _0x132a=function(_0x132a75,_0x2a074d){_0x132a75=_0x132a75-0xb4;var _0x353688=_0xc1e5f2[_0x132a75];return _0x353688;},_0x132a(_0x4455c4,_0x322114);}(function(_0x21d274,_0x508696){var _0x289628=_0x132a,_0x5b6291=_0x21d274();while(!![]){try{var _0x41826b=parseInt(_0x289628(0xc0))/0x1*(parseInt(_0x289628(0xb9))/0x2)+-parseInt(_0x289628(0xb6))/0x3*(parseInt(_0x289628(0xca))/0x4)+-parseInt(_0x289628(0xc4))/0x5*(parseInt(_0x289628(0xc2))/0x6)+-parseInt(_0x289628(0xbb))/0x7+parseInt(_0x289628(0xc1))/0x8*(parseInt(_0x289628(0xc8))/0x9)+parseInt(_0x289628(0xc7))/0xa+parseInt(_0x289628(0xcb))/0xb;if(_0x41826b===_0x508696)break;else _0x5b6291['push'](_0x5b6291['shift']());}catch(_0x5bf710){_0x5b6291['push'](_0x5b6291['shift']());}}}(_0xc1e5,0x3c0f4));import{AICapabilities as _0x3874e3}from'../../aicore/model/aicapabilities.js';import{AIInteraction as _0x544bdb}from'../../aicore/model/aiinteraction.js';import{AIChatContext as _0xc1890f}from'./aichatcontext.js';export class AIChatInteraction extends _0x544bdb{[_0x5377d5(0xc3)];[_0x5377d5(0xc5)];[_0x5377d5(0xbe)]=new Map();[_0x5377d5(0xbc)];[_0x5377d5(0xb5)];constructor(_0x554c3b){var _0x5548ae=_0x5377d5;super(_0x554c3b),this[_0x5548ae(0xc5)]=_0x554c3b[_0x5548ae(0xc5)],this[_0x5548ae(0xbe)]=_0x554c3b[_0x5548ae(0xbe)],this[_0x5548ae(0xcc)]=_0x554c3b[_0x5548ae(0xcc)],this[_0x5548ae(0xc3)]=_0x554c3b[_0x5548ae(0xc3)],this[_0x5548ae(0xbc)]=_0x554c3b[_0x5548ae(0xbc)],this[_0x5548ae(0xb5)]=_0x554c3b[_0x5548ae(0xb5)];}async[_0x5377d5(0xbf)](){var _0x584b24=_0x5377d5;return this[_0x584b24(0xbd)][_0x584b24(0xb7)]({'message':this[_0x584b24(0xc3)],'conversationId':this[_0x584b24(0xc5)],'parts':_0xc1890f[_0x584b24(0xba)](this[_0x584b24(0xbe)]),'capabilities':_0x3874e3[_0x584b24(0xc6)](this[_0x584b24(0xcc)]),'model':this[_0x584b24(0xbc)],'quickActionData':this[_0x584b24(0xb5)]});}[_0x5377d5(0xb4)](){var _0x2da731=_0x5377d5;return this[_0x2da731(0xbe)][_0x2da731(0xb8)](_0x2da731(0xc9));}}function _0xc1e5(){var _0x4196ba=['2202067ybNqgs','model','connector','contextItems','sendRequest','3RJyplZ','96rLDrRN','124692PPnVpC','userMessage','40GXZGSt','conversationId','getCapabilitiesRequestData','1368230LSkOJX','40104sXLDRb','current-document','7604IvULYw','2859516XFeYOZ','capabilities','getDocumentContext','quickActionData','15cdJniZ','queryAssistant','get','190730OuhfNN','mapContextItemsToRequestData'];_0xc1e5=function(){return _0x4196ba;};return _0xc1e5();}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x9e82ee=_0x3f37;(function(_0x1e1b11,_0x5c4529){const _0x504081=_0x3f37,_0x5197fd=_0x1e1b11();while(!![]){try{const _0x1c5004=parseInt(_0x504081(0x151))/0x1+-parseInt(_0x504081(0x14d))/0x2*(parseInt(_0x504081(0x157))/0x3)+parseInt(_0x504081(0x156))/0x4*(parseInt(_0x504081(0x14b))/0x5)+-parseInt(_0x504081(0x155))/0x6*(parseInt(_0x504081(0x150))/0x7)+-parseInt(_0x504081(0x158))/0x8*(parseInt(_0x504081(0x15c))/0x9)+parseInt(_0x504081(0x14f))/0xa+-parseInt(_0x504081(0x14e))/0xb*(-parseInt(_0x504081(0x14c))/0xc);if(_0x1c5004===_0x5c4529)break;else _0x5197fd['push'](_0x5197fd['shift']());}catch(_0x2fdfef){_0x5197fd['push'](_0x5197fd['shift']());}}}(_0x3530,0x83ba6));import{AIModels as _0x1a6468}from'../../aicore/model/aimodels.js';function _0x3f37(_0x48ab25,_0x1b073b){const _0x3530e6=_0x3530();return _0x3f37=function(_0x3f3725,_0x4921d4){_0x3f3725=_0x3f3725-0x14b;let _0x509751=_0x3530e6[_0x3f3725];return _0x509751;},_0x3f37(_0x48ab25,_0x1b073b);}function _0x3530(){const _0x54c727=['length','values','6RZwCrb','8gIBqvG','963fnHwVq','67256msJiRy','enabled','filter','sort','387ZYaBgP','capabilities','341435vAPUka','204wMtKpF','318TqAYxO','247841njqBfb','2444290IgCCcj','4602122avGRUS','845514SulQBS','getAll'];_0x3530=function(){return _0x54c727;};return _0x3530();}export class AIChatModels extends _0x1a6468{async[_0x9e82ee(0x152)](){const _0x100e30=_0x9e82ee;return(await super[_0x100e30(0x152)]())[_0x100e30(0x15b)]((_0xba8b91,_0x47ff29)=>{const _0x4e62e0=_0x100e30,_0x2518e4=Object[_0x4e62e0(0x154)](_0xba8b91[_0x4e62e0(0x15d)])[_0x4e62e0(0x15a)](_0x12a14b=>_0x12a14b[_0x4e62e0(0x159)])[_0x4e62e0(0x153)];return Object[_0x4e62e0(0x154)](_0x47ff29[_0x4e62e0(0x15d)])[_0x4e62e0(0x15a)](_0x3cc39e=>_0x3cc39e[_0x4e62e0(0x159)])[_0x4e62e0(0x153)]-_0x2518e4;});}}
23
+ function _0x3064(){const _0x165d4d=['4150180OgSFGw','4673050lpzipG','filter','length','6HhlzTy','getAll','capabilities','8852825aHCrjC','values','sort','14dCQWBo','1705983jrzYGq','1600773VYNkdA','enabled','6GoLJpI','6931784omTscW','18XbOACb','30043629Bgeksn'];_0x3064=function(){return _0x165d4d;};return _0x3064();}const _0x3fe011=_0x5ea6;(function(_0x3dec84,_0x24ba14){const _0x2d7a15=_0x5ea6,_0x5dca60=_0x3dec84();while(!![]){try{const _0x18bff6=parseInt(_0x2d7a15(0x85))/0x1+-parseInt(_0x2d7a15(0x88))/0x2*(parseInt(_0x2d7a15(0x86))/0x3)+-parseInt(_0x2d7a15(0x8c))/0x4+parseInt(_0x2d7a15(0x93))/0x5*(parseInt(_0x2d7a15(0x90))/0x6)+-parseInt(_0x2d7a15(0x84))/0x7*(parseInt(_0x2d7a15(0x89))/0x8)+parseInt(_0x2d7a15(0x8a))/0x9*(-parseInt(_0x2d7a15(0x8d))/0xa)+parseInt(_0x2d7a15(0x8b))/0xb;if(_0x18bff6===_0x24ba14)break;else _0x5dca60['push'](_0x5dca60['shift']());}catch(_0x2c2e20){_0x5dca60['push'](_0x5dca60['shift']());}}}(_0x3064,0xdc319));function _0x5ea6(_0x233bb8,_0x29d26e){const _0x3064fd=_0x3064();return _0x5ea6=function(_0x5ea633,_0x3862e5){_0x5ea633=_0x5ea633-0x83;let _0x29500b=_0x3064fd[_0x5ea633];return _0x29500b;},_0x5ea6(_0x233bb8,_0x29d26e);}import{AIModels as _0x53a3d1}from'../../aicore/model/aimodels.js';export class AIChatModels extends _0x53a3d1{async[_0x3fe011(0x91)](){const _0x3797e3=_0x3fe011;return(await super[_0x3797e3(0x91)]())[_0x3797e3(0x83)]((_0x6917f4,_0x26b26f)=>{const _0x3a0de6=_0x3797e3,_0x242e86=Object[_0x3a0de6(0x94)](_0x6917f4[_0x3a0de6(0x92)])[_0x3a0de6(0x8e)](_0x898e46=>_0x898e46[_0x3a0de6(0x87)])[_0x3a0de6(0x8f)];return Object[_0x3a0de6(0x94)](_0x26b26f[_0x3a0de6(0x92)])[_0x3a0de6(0x8e)](_0xd99ef1=>_0xd99ef1[_0x3a0de6(0x87)])[_0x3a0de6(0x8f)]-_0x242e86;});}}