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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (324) hide show
  1. package/LICENSE.md +0 -4
  2. package/build/ai.js +2 -1
  3. package/dist/index.js +5 -5
  4. package/dist/translations/af.js +1 -1
  5. package/dist/translations/af.umd.js +1 -1
  6. package/dist/translations/ar.js +1 -1
  7. package/dist/translations/ar.umd.js +1 -1
  8. package/dist/translations/ast.js +1 -1
  9. package/dist/translations/ast.umd.js +1 -1
  10. package/dist/translations/az.js +1 -1
  11. package/dist/translations/az.umd.js +1 -1
  12. package/dist/translations/be.js +1 -1
  13. package/dist/translations/be.umd.js +1 -1
  14. package/dist/translations/bg.js +1 -1
  15. package/dist/translations/bg.umd.js +1 -1
  16. package/dist/translations/bn.js +1 -1
  17. package/dist/translations/bn.umd.js +1 -1
  18. package/dist/translations/bs.js +1 -1
  19. package/dist/translations/bs.umd.js +1 -1
  20. package/dist/translations/ca.js +1 -1
  21. package/dist/translations/ca.umd.js +1 -1
  22. package/dist/translations/cs.js +1 -1
  23. package/dist/translations/cs.umd.js +1 -1
  24. package/dist/translations/da.js +1 -1
  25. package/dist/translations/da.umd.js +1 -1
  26. package/dist/translations/de-ch.js +1 -1
  27. package/dist/translations/de-ch.umd.js +1 -1
  28. package/dist/translations/de.js +1 -1
  29. package/dist/translations/de.umd.js +1 -1
  30. package/dist/translations/el.js +1 -1
  31. package/dist/translations/el.umd.js +1 -1
  32. package/dist/translations/en-au.js +1 -1
  33. package/dist/translations/en-au.umd.js +1 -1
  34. package/dist/translations/en-gb.js +1 -1
  35. package/dist/translations/en-gb.umd.js +1 -1
  36. package/dist/translations/en.js +1 -1
  37. package/dist/translations/en.umd.js +1 -1
  38. package/dist/translations/eo.js +1 -1
  39. package/dist/translations/eo.umd.js +1 -1
  40. package/dist/translations/es-co.js +1 -1
  41. package/dist/translations/es-co.umd.js +1 -1
  42. package/dist/translations/es.js +1 -1
  43. package/dist/translations/es.umd.js +1 -1
  44. package/dist/translations/et.js +1 -1
  45. package/dist/translations/et.umd.js +1 -1
  46. package/dist/translations/eu.js +1 -1
  47. package/dist/translations/eu.umd.js +1 -1
  48. package/dist/translations/fa.js +1 -1
  49. package/dist/translations/fa.umd.js +1 -1
  50. package/dist/translations/fi.js +1 -1
  51. package/dist/translations/fi.umd.js +1 -1
  52. package/dist/translations/fr.js +1 -1
  53. package/dist/translations/fr.umd.js +1 -1
  54. package/dist/translations/gl.js +1 -1
  55. package/dist/translations/gl.umd.js +1 -1
  56. package/dist/translations/gu.js +1 -1
  57. package/dist/translations/gu.umd.js +1 -1
  58. package/dist/translations/he.js +1 -1
  59. package/dist/translations/he.umd.js +1 -1
  60. package/dist/translations/hi.js +1 -1
  61. package/dist/translations/hi.umd.js +1 -1
  62. package/dist/translations/hr.js +1 -1
  63. package/dist/translations/hr.umd.js +1 -1
  64. package/dist/translations/hu.js +1 -1
  65. package/dist/translations/hu.umd.js +1 -1
  66. package/dist/translations/hy.js +1 -1
  67. package/dist/translations/hy.umd.js +1 -1
  68. package/dist/translations/id.js +1 -1
  69. package/dist/translations/id.umd.js +1 -1
  70. package/dist/translations/it.js +1 -1
  71. package/dist/translations/it.umd.js +1 -1
  72. package/dist/translations/ja.js +1 -1
  73. package/dist/translations/ja.umd.js +1 -1
  74. package/dist/translations/jv.js +1 -1
  75. package/dist/translations/jv.umd.js +1 -1
  76. package/dist/translations/kk.js +1 -1
  77. package/dist/translations/kk.umd.js +1 -1
  78. package/dist/translations/km.js +1 -1
  79. package/dist/translations/km.umd.js +1 -1
  80. package/dist/translations/kn.js +1 -1
  81. package/dist/translations/kn.umd.js +1 -1
  82. package/dist/translations/ko.js +1 -1
  83. package/dist/translations/ko.umd.js +1 -1
  84. package/dist/translations/ku.js +1 -1
  85. package/dist/translations/ku.umd.js +1 -1
  86. package/dist/translations/lt.js +1 -1
  87. package/dist/translations/lt.umd.js +1 -1
  88. package/dist/translations/lv.js +1 -1
  89. package/dist/translations/lv.umd.js +1 -1
  90. package/dist/translations/ms.js +1 -1
  91. package/dist/translations/ms.umd.js +1 -1
  92. package/dist/translations/nb.js +1 -1
  93. package/dist/translations/nb.umd.js +1 -1
  94. package/dist/translations/ne.js +1 -1
  95. package/dist/translations/ne.umd.js +1 -1
  96. package/dist/translations/nl.js +1 -1
  97. package/dist/translations/nl.umd.js +1 -1
  98. package/dist/translations/no.js +1 -1
  99. package/dist/translations/no.umd.js +1 -1
  100. package/dist/translations/oc.js +1 -1
  101. package/dist/translations/oc.umd.js +1 -1
  102. package/dist/translations/pl.js +1 -1
  103. package/dist/translations/pl.umd.js +1 -1
  104. package/dist/translations/pt-br.js +1 -1
  105. package/dist/translations/pt-br.umd.js +1 -1
  106. package/dist/translations/pt.js +1 -1
  107. package/dist/translations/pt.umd.js +1 -1
  108. package/dist/translations/ro.js +1 -1
  109. package/dist/translations/ro.umd.js +1 -1
  110. package/dist/translations/ru.js +1 -1
  111. package/dist/translations/ru.umd.js +1 -1
  112. package/dist/translations/si.js +1 -1
  113. package/dist/translations/si.umd.js +1 -1
  114. package/dist/translations/sk.js +1 -1
  115. package/dist/translations/sk.umd.js +1 -1
  116. package/dist/translations/sl.js +1 -1
  117. package/dist/translations/sl.umd.js +1 -1
  118. package/dist/translations/sq.js +1 -1
  119. package/dist/translations/sq.umd.js +1 -1
  120. package/dist/translations/sr-latn.js +1 -1
  121. package/dist/translations/sr-latn.umd.js +1 -1
  122. package/dist/translations/sr.js +1 -1
  123. package/dist/translations/sr.umd.js +1 -1
  124. package/dist/translations/sv.js +1 -1
  125. package/dist/translations/sv.umd.js +1 -1
  126. package/dist/translations/th.js +1 -1
  127. package/dist/translations/th.umd.js +1 -1
  128. package/dist/translations/ti.js +1 -1
  129. package/dist/translations/ti.umd.js +1 -1
  130. package/dist/translations/tk.js +1 -1
  131. package/dist/translations/tk.umd.js +1 -1
  132. package/dist/translations/tr.js +1 -1
  133. package/dist/translations/tr.umd.js +1 -1
  134. package/dist/translations/tt.js +1 -1
  135. package/dist/translations/tt.umd.js +1 -1
  136. package/dist/translations/ug.js +1 -1
  137. package/dist/translations/ug.umd.js +1 -1
  138. package/dist/translations/uk.js +1 -1
  139. package/dist/translations/uk.umd.js +1 -1
  140. package/dist/translations/ur.js +1 -1
  141. package/dist/translations/ur.umd.js +1 -1
  142. package/dist/translations/uz.js +1 -1
  143. package/dist/translations/uz.umd.js +1 -1
  144. package/dist/translations/vi.js +1 -1
  145. package/dist/translations/vi.umd.js +1 -1
  146. package/dist/translations/zh-cn.js +1 -1
  147. package/dist/translations/zh-cn.umd.js +1 -1
  148. package/dist/translations/zh.js +1 -1
  149. package/dist/translations/zh.umd.js +1 -1
  150. package/lang/contexts.json +1 -0
  151. package/package.json +15 -16
  152. package/src/aiactions/aiactions.js +1 -1
  153. package/src/aiactions/model/aiactionsinteraction.js +1 -1
  154. package/src/aiactions/model/aiactionsreply.js +1 -1
  155. package/src/aiassistant/adapters/aiadapter.js +1 -1
  156. package/src/aiassistant/adapters/aitextadapter.js +1 -1
  157. package/src/aiassistant/adapters/awstextadapter.d.ts +15 -156
  158. package/src/aiassistant/adapters/awstextadapter.js +1 -1
  159. package/src/aiassistant/adapters/openaitextadapter.js +1 -1
  160. package/src/aiassistant/aiassistant.d.ts +2 -0
  161. package/src/aiassistant/aiassistant.js +1 -1
  162. package/src/aiassistant/aiassistantediting.js +1 -1
  163. package/src/aiassistant/aiassistantui.js +1 -1
  164. package/src/aiassistant/legacyerrors.js +1 -1
  165. package/src/aiassistant/ui/aiassistantcontroller.js +2 -2
  166. package/src/aiassistant/ui/form/aiformcontentarea.js +1 -1
  167. package/src/aiassistant/ui/form/aiformerrorview.js +1 -1
  168. package/src/aiassistant/ui/form/aiformpromptview.js +1 -1
  169. package/src/aiassistant/ui/form/aiformtoolbarview.js +1 -1
  170. package/src/aiassistant/ui/form/aiformview.js +1 -1
  171. package/src/aiassistant/ui/form/aihistorylistitemview.js +1 -1
  172. package/src/aiassistant/ui/form/aihistorylistview.js +1 -1
  173. package/src/aiassistant/ui/form/prompthistory.js +1 -1
  174. package/src/aiassistant/ui/showaiassistantcommand.js +1 -1
  175. package/src/aiassistant/utils/common-translations.js +1 -1
  176. package/src/aiassistant/utils/normalizecommandsconfig.js +1 -1
  177. package/src/aiballoon/aiballoon.js +1 -1
  178. package/src/aiballoon/ui/aiballoonview.js +1 -1
  179. package/src/aichat/aichat.js +1 -1
  180. package/src/aichat/aichatballoon.js +1 -1
  181. package/src/aichat/aichatcontroller.js +1 -1
  182. package/src/aichat/aichatui.js +1 -1
  183. package/src/aichat/model/aichatcontext.js +1 -1
  184. package/src/aichat/model/aichatconversation.js +1 -1
  185. package/src/aichat/model/aichatinteraction.js +1 -1
  186. package/src/aichat/ui/aichatballoonview.js +1 -1
  187. package/src/aichat/ui/aichatcontrolsview.js +1 -1
  188. package/src/aichat/ui/aichatfeedview.js +1 -1
  189. package/src/aichat/ui/aichatheaderview.js +1 -1
  190. package/src/aichat/ui/aichatview.js +1 -1
  191. package/src/aichat/ui/controls/aichatchipsoverflowmanager.js +1 -1
  192. package/src/aichat/ui/controls/aichatcontextitembuttonview.js +1 -1
  193. package/src/aichat/ui/controls/aichatcontextpanelurlinputview.js +1 -1
  194. package/src/aichat/ui/controls/aichatcontextpanelview.js +1 -1
  195. package/src/aichat/ui/controls/aichatcontrolsloaderview.js +1 -1
  196. package/src/aichat/ui/controls/aichatpromptcapabilitiesview.js +1 -1
  197. package/src/aichat/ui/controls/aichatpromptinputview.js +1 -1
  198. package/src/aichat/ui/controls/aichatpromptsuggestionslistview.js +1 -1
  199. package/src/aichat/ui/controls/resources/aichatcontextresourceslistview.js +1 -1
  200. package/src/aichat/ui/controls/resources/aichatcontextresourcesview.js +1 -1
  201. package/src/aichat/ui/controls/resources/aichatresourcelistitemview.js +1 -1
  202. package/src/aichat/ui/controls/resources/aichatresourcesballoonview.js +1 -1
  203. package/src/aichat/ui/controls/resources/aichatresourcessearchinputview.js +1 -1
  204. package/src/aichat/ui/feed/aichatfeedcontextchipsview.js +1 -1
  205. package/src/aichat/ui/feed/aichatfeedcustomelementview.js +1 -1
  206. package/src/aichat/ui/feed/aichatfeederroritemview.js +1 -1
  207. package/src/aichat/ui/feed/aichatfeedinteractionheaderview.js +1 -1
  208. package/src/aichat/ui/feed/aichatfeeditemview.js +1 -1
  209. package/src/aichat/ui/feed/aichatfeedreplyitemview.js +1 -1
  210. package/src/aichat/ui/feed/aichatfeedsuggestionitemactionsview.js +1 -1
  211. package/src/aichat/ui/feed/aichatfeedsuggestionitemview.js +1 -1
  212. package/src/aichat/ui/feed/aichatfeedusermessageitem.js +1 -1
  213. package/src/aichat/utils/eventnames.js +1 -1
  214. package/src/aichat/utils/promisequeue.js +1 -1
  215. package/src/aichathistory/aichathistory.js +1 -1
  216. package/src/aichathistory/aichathistorycontroller.js +1 -1
  217. package/src/aichathistory/aichathistoryui.js +1 -1
  218. package/src/aichathistory/model/aichathistoryconversations.js +1 -1
  219. package/src/aichathistory/model/aichathistoryitem.js +1 -1
  220. package/src/aichathistory/ui/aichathistorylistitemview.js +2 -2
  221. package/src/aichathistory/ui/aichathistorylistview.js +1 -1
  222. package/src/aichathistory/ui/aichathistorysectionlistview.js +1 -1
  223. package/src/aichathistory/ui/aichathistoryview.js +1 -1
  224. package/src/aichatshortcuts/aichatshortcuts.js +1 -1
  225. package/src/aichatshortcuts/ui/aichatshortcutsview.js +1 -1
  226. package/src/aichatshortcuts/ui/aichatshortcutview.js +1 -1
  227. package/src/aicore/aiconnector.js +1 -1
  228. package/src/aicore/aiediting.js +1 -1
  229. package/src/aicore/model/aicapabilities.js +1 -1
  230. package/src/aicore/model/aicontext.js +1 -1
  231. package/src/aicore/model/aiinteraction.js +1 -1
  232. package/src/aicore/model/aimodels.js +1 -1
  233. package/src/aicore/model/aireply.js +1 -1
  234. package/src/aicore/pipeline/airesponseapplier.js +2 -2
  235. package/src/aicore/pipeline/airesponseparser.js +2 -2
  236. package/src/aicore/ui/aidisclaimerview.js +1 -1
  237. package/src/aicore/ui/aiskeleton.js +1 -1
  238. package/src/aicore/ui/aispinner.js +1 -1
  239. package/src/aicore/ui/suggestioncontainer/aiminitoolbarview.js +1 -1
  240. package/src/aicore/ui/suggestioncontainer/aisuggestionbodyview.js +1 -1
  241. package/src/aicore/ui/suggestioncontainer/aisuggestioncontainerview.js +1 -1
  242. package/src/aicore/ui/suggestioncontainer/aisuggestioncontentpartheaderview.js +1 -1
  243. package/src/aicore/ui/suggestioncontainer/aisuggestioncontentpartstateview.js +1 -1
  244. package/src/aicore/ui/suggestioncontainer/aisuggestioncontentparttoolbarview.js +1 -1
  245. package/src/aicore/ui/suggestioncontainer/aisuggestioncontentpartview.js +1 -1
  246. package/src/aicore/ui/suggestioncontainer/aisuggestionheaderview.js +1 -1
  247. package/src/aicore/ui/suggestioncontainer/aisuggestionloaderview.js +1 -1
  248. package/src/aicore/ui/suggestioncontainer/aisuggestionstreamablecontentview.js +1 -1
  249. package/src/aicore/ui/suggestioncontainer/aiwebsourcesview.js +1 -1
  250. package/src/aicore/utils/common-translations.js +1 -1
  251. package/src/aicore/utils/createresizebutton.js +1 -1
  252. package/src/aicore/utils/documentposition.js +1 -1
  253. package/src/aicore/utils/documentrange.js +1 -1
  254. package/src/aicore/utils/eventnames.js +1 -1
  255. package/src/aicore/utils/geteditorfromcontext.js +1 -1
  256. package/src/aicore/utils/getoperationsfromreply.js +1 -1
  257. package/src/aicore/utils/getsuggestionpartsfromreply.js +1 -1
  258. package/src/aicore/utils/htmlparser.js +1 -1
  259. package/src/aicore/utils/htmlstreamer.js +1 -1
  260. package/src/aicore/utils/scrollmanager.js +1 -1
  261. package/src/aieditorintegration/aieditorintegration.js +1 -1
  262. package/src/aieditorintegration/aitogglebutton/aitogglebuttonui.js +1 -1
  263. package/src/aieditorintegration/aitogglebutton/toggleaicommand.js +1 -1
  264. package/src/aiquickactions/aiquickactions.js +1 -1
  265. package/src/aiquickactions/aiquickactionscommand.js +1 -1
  266. package/src/aiquickactions/aiquickactionsediting.js +1 -1
  267. package/src/aiquickactions/aiquickactionsui.js +1 -1
  268. package/src/aiquickactions/ui/aiquickactionsbuttoncreator.js +1 -1
  269. package/src/aiquickactions/ui/aiquickactionsdropdowncontentview.js +1 -1
  270. package/src/aiquickactions/ui/aiquickactionsdropdowncreator.js +1 -1
  271. package/src/aiquickactions/ui/aiquickactionsfilteredlistview.js +1 -1
  272. package/src/aiquickactions/ui/balloon/aiactionsballoondisclaimerview.js +1 -1
  273. package/src/aiquickactions/ui/balloon/aiactionsballoontoolbarview.js +1 -1
  274. package/src/aiquickactions/ui/balloon/aiactionsballoonview.js +1 -1
  275. package/src/aiquickactions/ui/dropdownmenubuttonwithhighlightview.js +1 -1
  276. package/src/aireviewcore/aireviewcorecontroller.js +1 -1
  277. package/src/aireviewcore/aireviewcoreediting.js +1 -1
  278. package/src/aireviewcore/aireviewcoreui.js +1 -1
  279. package/src/aireviewcore/model/aireviewcheck.js +1 -1
  280. package/src/aireviewcore/model/aireviewchecklist.js +1 -1
  281. package/src/aireviewcore/model/aireviewcheckresult.js +1 -1
  282. package/src/aireviewcore/model/aireviewcheckresultchange.js +1 -1
  283. package/src/aireviewcore/model/aireviewcheckrun.js +1 -1
  284. package/src/aireviewcore/model/aireviewsystemcheckrun.js +1 -1
  285. package/src/aireviewcore/ui/aireviewcoreballoonsuggestionview.js +1 -1
  286. package/src/aireviewcore/ui/aireviewcorechecklistitemresultview.js +1 -1
  287. package/src/aireviewcore/ui/aireviewcorecustomcheckview.js +1 -1
  288. package/src/aireviewcore/ui/aireviewcorefinishreviewbuttonview.js +1 -1
  289. package/src/aireviewcore/ui/aireviewcoregeneralerrorview.js +1 -1
  290. package/src/aireviewcore/ui/aireviewcorepromptinputview.js +1 -1
  291. package/src/aireviewcore/ui/aireviewcorereviewchecklistview.js +1 -1
  292. package/src/aireviewcore/ui/aireviewcorereviewcommandlistitemview.js +1 -1
  293. package/src/aireviewcore/ui/aireviewcorereviewcompletedview.js +1 -1
  294. package/src/aireviewcore/ui/aireviewcoreuicheckresultsview.js +1 -1
  295. package/src/aireviewcore/ui/aireviewcoreview.js +1 -1
  296. package/src/aireviewcore/ui/form/aireviewcoreformdropdown.js +1 -1
  297. package/src/aireviewcore/ui/form/aireviewcoreformmanager.js +1 -1
  298. package/src/aireviewmode/aireviewcheckdefinitions.js +1 -1
  299. package/src/aireviewmode/aireviewmode.js +1 -1
  300. package/src/aireviewmode/aireviewmodecontroller.js +1 -1
  301. package/src/aireviewmode/aireviewmodeui.js +1 -1
  302. package/src/aireviewmode/model/aireviewcheckcustom.js +1 -1
  303. package/src/aireviewmode/model/aireviewcheckextra.js +1 -1
  304. package/src/aireviewmode/model/aireviewcustomcheckrun.js +1 -1
  305. package/src/aireviewmode/model/aireviewextracheckrun.js +1 -1
  306. package/src/aireviewmode/model/aireviewmodechecklist.js +1 -1
  307. package/src/aitabs/aitabs.js +1 -1
  308. package/src/aitabs/aitabsmainview.js +1 -1
  309. package/src/aitabs/tabs/aitabsview.js +1 -1
  310. package/src/aitabs/tabs/tabbuttonview.js +1 -1
  311. package/src/aitabs/tabs/tabpanelview.js +1 -1
  312. package/src/aitranslate/aitranslate.js +1 -1
  313. package/src/aitranslate/aitranslatecontroller.js +1 -1
  314. package/src/aitranslate/aitranslateui.js +1 -1
  315. package/src/aitranslate/model/aitranslatecheck.js +1 -1
  316. package/src/aitranslate/model/aitranslatechecklist.js +1 -1
  317. package/src/aitranslate/model/aitranslatecheckrun.js +1 -1
  318. package/src/aitranslate/ui/aitranslatechecklistview.js +1 -1
  319. package/src/aitranslate/ui/aitranslatecheckresultsview.js +1 -1
  320. package/src/errors.js +1 -1
  321. package/src/errorsmap.js +1 -1
  322. package/src/index.js +1 -1
  323. package/build/966.ai.js +0 -5
  324. package/build/translations/en.js +0 -1
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x4b8d0e=_0x2ae9;(function(_0x3cb24f,_0x8bd20a){const _0x4aeb7d=_0x2ae9,_0x1a95d=_0x3cb24f();while(!![]){try{const _0x154e41=parseInt(_0x4aeb7d(0x1f4))/0x1+-parseInt(_0x4aeb7d(0x1d0))/0x2+-parseInt(_0x4aeb7d(0x252))/0x3*(parseInt(_0x4aeb7d(0x1c0))/0x4)+parseInt(_0x4aeb7d(0x231))/0x5*(-parseInt(_0x4aeb7d(0x256))/0x6)+parseInt(_0x4aeb7d(0x24d))/0x7+parseInt(_0x4aeb7d(0x245))/0x8+parseInt(_0x4aeb7d(0x244))/0x9*(parseInt(_0x4aeb7d(0x23c))/0xa);if(_0x154e41===_0x8bd20a)break;else _0x1a95d['push'](_0x1a95d['shift']());}catch(_0x1b4cba){_0x1a95d['push'](_0x1a95d['shift']());}}}(_0x3128,0xb8669));import{ContextPlugin as _0x257589}from'ckeditor5/src/core.js';import{_isMotionReduced as _0x2ec60e}from'ckeditor5/src/utils.js';import{AIChatView as _0x1c009d}from'./ui/aichatview.js';function _0x2ae9(_0x5ecc10,_0x4b577a){const _0x312863=_0x3128();return _0x2ae9=function(_0x2ae9df,_0x33e581){_0x2ae9df=_0x2ae9df-0x1aa;let _0x584781=_0x312863[_0x2ae9df];return _0x584781;},_0x2ae9(_0x5ecc10,_0x4b577a);}function _0x3128(){const _0x4d08fa=['set','disableControls','capabilities','find','enableControls','isOfficialPlugin','finishInteraction','updateSuggestionItem','abort','clearPendingContextUI','_promiseQueue','5eahwtY','setSelectedModel','isWebSearchEnabled','displayedPrompt','AI_CHAT_WELCOME_MESSAGE','AITabs','setModelList','addFeedItemAIReply','removeContextItem','showDiff','createConversation','642650UzavHj','updateCapabilities','setReasoning','error-message','user-message','isModelAvailable','ai.models.showModelSelector','addFeedInteractionHeader','315TriQoR','1034352UYBcnc','interactionId','stopAutoScroll','addTab','conversationCreated','from','resetMessageInput','AI_CHAT_FEED_LOADING_MESSAGE_REASONING','1750287MYOJlG','AIChatUI','_animateConversationTitle','disableModelSelector','markFeedItemAsDone','7485aNjuKN','addFeedItemAISuggestion','updateFeedInteractionHeader','prepareLoadingMessage','7058322ovMnfd','length','forEach','setFeedItemRenderingStrategy','custom-element','populateSourceResourceBalloon','isDone','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH_REASONING','chatHeader','removeFeedInteraction','updateFeedItemAIReplySuggestionContent','requires','isDisabled','removeFeedItem','renderingStrategy','TrackChanges','view','attributes','_getInputPlaceholder','<p>','ai.chat.welcomeMessage','insertSuggestion','_titleAnimationInterval','getItemIds','setIsMaximized','isMaximized','has','fire','value','1424vGJAuQ','scrollFeedToSuggestion','clear','startAutoScroll','focusPromptInput','enableModelSelector','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH','showResizeButton','setPromptInputValue','setConversationContext','_view','hasItem','conversation-start','setInputPlaceholder','feedItemRenderingStrategy','removeItem','1676506JKNdtM','_isTrackChangesCommandValueBound','addContextItem','contextItems','closeSourceResourceBalloon','setContextItemLoading','addItem','options','clearConversationContextUI','</p>','delegate','chatControls','isPremiumPlugin','addFeedItemError','setIsUploadInProgress','pluginName','chat','filter','ai-reply','get','addFeedItemStaticMessage','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH','queueEmptyPromise','markItemAsDone','isBusy','remove','interaction-header','plugins','label','AI_CHAT_FEED_LOADING_MESSAGE_REGULAR','resetConversationTitle','setLoadingMessage','clearLoadingMessage','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REASONING','trackChanges','children','1029555QfPpKq','last','isPending','ai.availableReplyActions','destroy','hasFeedItem','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REGULAR','ai-suggestion-reply','availableModels','updateFeedItemAIReplyContent','then','updateFeedItemAIReplySuggestionPartState','stopInteraction','streaming','updateResourceState','setConversationTitle','startsWith','setSuggestionPartActive','scrollToSuggestion','setWebSearch','setAddContextOptions','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH_REASONING','isTrackChangesOn','_interactionPromiseResolver','toggleLoadingSkeleton','AI_CHAT_HEADING','updateFeedItemAIReplySources','enqueue','values','addFeedItemUserMessage','setFeedItemAIReplySuggestionPartActive','context','toggleSuggestionDisplayMode','isReasoningEnabled','areActionsDisabled','ai.chat.context.searchInputVisibleFrom','setModel','isVisible','config','commands','updateWebSources','updateReplyItem','userMessage','isLoading','chatFeed','startInteraction','updateSuggestionPartState','addFeedItemCustomElement','locale','bind'];_0x3128=function(){return _0x4d08fa;};return _0x3128();}import{AITabs as _0x571281}from'../aitabs/aitabs.js';import{getTranslation as _0x1e499c}from'../aicore/utils/common-translations.js';import{IconAIChat as _0x51b551}from'ckeditor5/src/icons.js';import{AIChatFeedInteractionHeaderView as _0xdd15a5}from'./ui/feed/aichatfeedinteractionheaderview.js';import{PromiseQueue as _0x1b679b}from'./utils/promisequeue.js';import{AI_CHAT_UI_EVENT_NAMES as _0x259c61}from'./utils/eventnames.js';import'../../theme/aichat/aichat.css';import{getEditorFromContext as _0x16cdc4}from'../aicore/utils/geteditorfromcontext.js';import{AI_REPLY_ACTIONS as _0x3a212b}from'./ui/feed/aichatfeedsuggestionitemactionsview.js';export class AIChatUI extends _0x257589{static get[_0x4b8d0e(0x1ae)](){return[_0x571281];}[_0x4b8d0e(0x1ca)];static get[_0x4b8d0e(0x1df)](){const _0x32a3a1=_0x4b8d0e;return _0x32a3a1(0x24e);}static get[_0x4b8d0e(0x22b)](){return!0x0;}static get[_0x4b8d0e(0x1dc)](){return!0x0;}[_0x4b8d0e(0x1ce)]=_0x4b8d0e(0x201);[_0x4b8d0e(0x23a)]=!0x0;[_0x4b8d0e(0x230)];[_0x4b8d0e(0x20b)];[_0x4b8d0e(0x1b9)]=void 0x0;[_0x4b8d0e(0x1d1)]=!0x1;constructor(_0x4f429d){const _0x49cf6c=_0x4b8d0e;super(_0x4f429d);const _0x53eaff=this[_0x49cf6c(0x213)][_0x49cf6c(0x1eb)][_0x49cf6c(0x1e3)](_0x49cf6c(0x236));this[_0x49cf6c(0x226)](_0x49cf6c(0x1e8),!0x1),this[_0x49cf6c(0x230)]=new _0x1b679b(),this[_0x49cf6c(0x1ca)]=new _0x1c009d(this[_0x49cf6c(0x213)][_0x49cf6c(0x224)],{'showResizeButton':_0x53eaff[_0x49cf6c(0x1c7)],'contextResourcesSearchInputVisibleFrom':this[_0x49cf6c(0x213)][_0x49cf6c(0x21a)][_0x49cf6c(0x1e3)](_0x49cf6c(0x217))}),this[_0x49cf6c(0x1ca)][_0x49cf6c(0x1da)](..._0x259c61)['to'](this),this[_0x49cf6c(0x1ca)]['on'](_0x49cf6c(0x214),(_0x545ffa,{showDiff:_0x4bd23f})=>{const _0x547b89=_0x49cf6c;this[_0x547b89(0x23a)]=_0x4bd23f;}),_0x53eaff[_0x49cf6c(0x1b3)][_0x49cf6c(0x248)]({'id':_0x49cf6c(0x1e0),'buttonLabel':_0x1e499c(this[_0x49cf6c(0x213)][_0x49cf6c(0x224)],_0x49cf6c(0x20d)),'buttonIcon':_0x51b551,'order':0x0,'content':this[_0x49cf6c(0x1ca)]}),this[_0x49cf6c(0x1ca)][_0x49cf6c(0x1db)][_0x49cf6c(0x225)](_0x49cf6c(0x21f))['to'](this,_0x49cf6c(0x1e8),_0x5d2a5a=>_0x5d2a5a),this[_0x49cf6c(0x1ca)][_0x49cf6c(0x220)][_0x49cf6c(0x225)](_0x49cf6c(0x1f6))['to'](this,_0x49cf6c(0x1e8),_0x35525a=>_0x35525a),this[_0x49cf6c(0x1ca)][_0x49cf6c(0x1db)][_0x49cf6c(0x1cd)](this[_0x49cf6c(0x1b5)]()),this[_0x49cf6c(0x225)](_0x49cf6c(0x241))['to'](this[_0x49cf6c(0x1ca)][_0x49cf6c(0x1db)],_0x49cf6c(0x241));}[_0x4b8d0e(0x1f8)](){const _0x29ac61=_0x4b8d0e;super[_0x29ac61(0x1f8)](),this[_0x29ac61(0x1b9)]&&clearInterval(this[_0x29ac61(0x1b9)]);}[_0x4b8d0e(0x23b)](_0x26a2ab){const _0x124174=_0x4b8d0e,_0x1aabd4=this[_0x124174(0x213)][_0x124174(0x21a)][_0x124174(0x1e3)](_0x124174(0x1b7))??_0x1e499c(this[_0x124174(0x213)][_0x124174(0x224)],_0x124174(0x235));this[_0x124174(0x1ca)][_0x124174(0x220)][_0x124174(0x1c2)](),this[_0x124174(0x1ca)][_0x124174(0x1db)][_0x124174(0x1c5)](),this[_0x124174(0x1ca)][_0x124174(0x1db)][_0x124174(0x237)](_0x26a2ab[_0x124174(0x1fc)],!this[_0x124174(0x213)][_0x124174(0x21a)][_0x124174(0x1e3)](_0x124174(0x242))),this[_0x124174(0x1e4)]({'id':_0x124174(0x1cc),'staticMessage':_0x1aabd4}),this[_0x124174(0x1be)](_0x124174(0x249));}[_0x4b8d0e(0x1e4)]({id:_0x530cec,staticMessage:_0x420523}){const _0x2ab45d=_0x4b8d0e;this[_0x2ab45d(0x1ca)][_0x2ab45d(0x220)][_0x2ab45d(0x1d6)](_0x2ab45d(0x1e2),{'id':_0x530cec,'initialContent':_0x2ab45d(0x1b6)+_0x420523+_0x2ab45d(0x1d9)});}[_0x4b8d0e(0x211)](_0x19aeb9){const _0x90b99=_0x4b8d0e,_0x445b88=_0x19aeb9[_0x90b99(0x1b4)]?.[_0x90b99(0x234)]||_0x19aeb9[_0x90b99(0x21e)];this[_0x90b99(0x1ca)][_0x90b99(0x220)][_0x90b99(0x1d6)](_0x90b99(0x240),{'contextItems':Array[_0x90b99(0x24a)](_0x19aeb9[_0x90b99(0x1d3)][_0x90b99(0x210)]()),'initialContent':_0x90b99(0x1b6)+_0x445b88+_0x90b99(0x1d9),'id':_0x19aeb9['id']});}[_0x4b8d0e(0x1dd)]({errorMessage:_0x207677,id:_0x15a642}){const _0x5b9bc6=_0x4b8d0e;this[_0x5b9bc6(0x1ca)][_0x5b9bc6(0x220)][_0x5b9bc6(0x1d6)](_0x5b9bc6(0x23f),{'initialContent':_0x5b9bc6(0x1b6)+_0x207677+_0x5b9bc6(0x1d9),'id':_0x15a642});}[_0x4b8d0e(0x238)](_0x3bd849){const _0x3c8f47=_0x4b8d0e;return this[_0x3c8f47(0x230)][_0x3c8f47(0x20f)](async()=>{const _0x4b846e=_0x3c8f47;this[_0x4b846e(0x1ca)][_0x4b846e(0x220)][_0x4b846e(0x1d6)](_0x4b846e(0x1e2),{'id':_0x3bd849[_0x4b846e(0x246)]+':'+_0x3bd849['id']}),this[_0x4b846e(0x1f0)]();});}async[_0x4b8d0e(0x253)](_0x6d43f2){const _0x29e74b=_0x4b8d0e,_0x47bf44=_0x16cdc4(this[_0x29e74b(0x213)]);let _0x25f5da=_0x47bf44[_0x29e74b(0x21a)][_0x29e74b(0x1e3)](_0x29e74b(0x1f7))||[..._0x3a212b];if(_0x47bf44[_0x29e74b(0x1eb)][_0x29e74b(0x1bd)](_0x29e74b(0x1b2))){if(!this[_0x29e74b(0x1d1)]){this[_0x29e74b(0x1d1)]=!0x0;const _0x22aae5=_0x47bf44[_0x29e74b(0x21b)][_0x29e74b(0x1e3)](_0x29e74b(0x1f2));this[_0x29e74b(0x1ca)][_0x29e74b(0x220)][_0x29e74b(0x225)](_0x29e74b(0x20a))['to'](_0x22aae5,_0x29e74b(0x1bf));}}else _0x25f5da=_0x25f5da[_0x29e74b(0x1e1)](_0x46a944=>_0x29e74b(0x1b8)!=_0x46a944);return this[_0x29e74b(0x230)][_0x29e74b(0x20f)](async()=>{const _0x5cad94=_0x29e74b;this[_0x5cad94(0x1ca)][_0x5cad94(0x220)][_0x5cad94(0x1d6)](_0x5cad94(0x1fb),{'id':_0x6d43f2[_0x5cad94(0x246)]+':'+_0x6d43f2['id'],'areActionsDisabled':_0x6d43f2[_0x5cad94(0x216)],'showDiff':this[_0x5cad94(0x23a)],'availableActions':_0x25f5da}),this[_0x5cad94(0x1f0)]();});}[_0x4b8d0e(0x243)](_0x541e10,_0x484587){const _0xd8d50b=_0x4b8d0e,_0x3020bb=this[_0xd8d50b(0x1ca)][_0xd8d50b(0x220)][_0xd8d50b(0x1f3)][_0xd8d50b(0x1f5)];if(_0x3020bb instanceof _0xdd15a5)return this[_0xd8d50b(0x1ca)][_0xd8d50b(0x220)][_0xd8d50b(0x1f3)][_0xd8d50b(0x1e9)](_0x3020bb),void this[_0xd8d50b(0x1ca)][_0xd8d50b(0x220)][_0xd8d50b(0x1d6)](_0xd8d50b(0x1ea),{'id':_0x541e10['id'],'capabilities':{'isWebSearchEnabled':_0x3020bb[_0xd8d50b(0x228)][_0xd8d50b(0x233)]||_0x484587[_0xd8d50b(0x233)],'isReasoningEnabled':_0x3020bb[_0xd8d50b(0x228)][_0xd8d50b(0x215)]||_0x484587[_0xd8d50b(0x215)]}});this[_0xd8d50b(0x1ca)][_0xd8d50b(0x220)][_0xd8d50b(0x1d6)](_0xd8d50b(0x1ea),{'id':_0x541e10['id'],'capabilities':_0x484587});}async[_0x4b8d0e(0x223)](_0x3d8bb8,_0x21cca3){const _0x26a2dd=_0x4b8d0e;let _0x371c7a;return await this[_0x26a2dd(0x230)][_0x26a2dd(0x20f)](async()=>{const _0x15ca84=_0x26a2dd;_0x371c7a=this[_0x15ca84(0x1ca)][_0x15ca84(0x220)][_0x15ca84(0x1d6)](_0x15ca84(0x25a),{'content':_0x3d8bb8,'id':_0x21cca3});}),_0x371c7a;}[_0x4b8d0e(0x1b0)](_0x553891){const _0x260a43=_0x4b8d0e;this[_0x260a43(0x1ca)][_0x260a43(0x220)][_0x260a43(0x1cf)](_0x553891);}[_0x4b8d0e(0x1f9)](_0x4e4362){const _0x19c009=_0x4b8d0e;return this[_0x19c009(0x1ca)][_0x19c009(0x220)][_0x19c009(0x1cb)](_0x4e4362);}[_0x4b8d0e(0x254)](_0x28ff0a){const _0x383a40=_0x4b8d0e,_0x46758d=this[_0x383a40(0x1ca)][_0x383a40(0x220)][_0x383a40(0x1f3)][_0x383a40(0x229)](_0x45efc0=>_0x45efc0[_0x383a40(0x1d7)]['id']==_0x28ff0a['id']&&_0x45efc0 instanceof _0xdd15a5);_0x46758d&&_0x46758d[_0x383a40(0x226)](_0x383a40(0x219),_0x28ff0a[_0x383a40(0x219)]);}async[_0x4b8d0e(0x1fd)](_0x3421bb){const _0x3c0fb9=_0x4b8d0e,_0x230880=_0x3421bb[_0x3c0fb9(0x1b1)]||this[_0x3c0fb9(0x1ce)];return this[_0x3c0fb9(0x230)][_0x3c0fb9(0x20f)](async _0xc3c62=>{const _0x19bea6=_0x3c0fb9;await this[_0x19bea6(0x1ca)][_0x19bea6(0x220)][_0x19bea6(0x21d)]({..._0x3421bb,'abortSignal':_0xc3c62,'renderingStrategy':_0x230880}),_0x3421bb[_0x19bea6(0x25c)]&&this[_0x19bea6(0x251)](_0x3421bb['id']);});}[_0x4b8d0e(0x20e)](_0x2ec758,_0x576b66){const _0x1ab056=_0x4b8d0e;this[_0x1ab056(0x1ca)][_0x1ab056(0x220)][_0x1ab056(0x21c)](_0x2ec758,_0x576b66);}async[_0x4b8d0e(0x1ad)](_0xa5a820){const _0x3740b0=_0x4b8d0e,_0x168d5e=_0xa5a820[_0x3740b0(0x1b1)]||this[_0x3740b0(0x1ce)];return this[_0x3740b0(0x230)][_0x3740b0(0x20f)](async _0x1e238f=>{const _0x19811e=_0x3740b0;await this[_0x19811e(0x1ca)][_0x19811e(0x220)][_0x19811e(0x22d)]({..._0xa5a820,'abortSignal':_0x1e238f,'renderingStrategy':_0x168d5e}),_0xa5a820[_0x19811e(0x25c)]&&this[_0x19811e(0x251)](_0xa5a820['id']);});}[_0x4b8d0e(0x1ff)](_0x281aa6){const _0x1d17e6=_0x4b8d0e;this[_0x1d17e6(0x1ca)][_0x1d17e6(0x220)][_0x1d17e6(0x222)](_0x281aa6);}[_0x4b8d0e(0x212)](_0x358e4e){const _0x59abbb=_0x4b8d0e;this[_0x59abbb(0x1ca)][_0x59abbb(0x220)][_0x59abbb(0x205)](_0x358e4e);}[_0x4b8d0e(0x251)](_0x4f5442){const _0x3eae04=_0x4b8d0e;this[_0x3eae04(0x1ca)][_0x3eae04(0x220)][_0x3eae04(0x1e7)](_0x4f5442);}[_0x4b8d0e(0x1ac)](_0x7c8b57){const _0xc1c6ae=_0x4b8d0e;this[_0xc1c6ae(0x1ca)][_0xc1c6ae(0x220)][_0xc1c6ae(0x1ba)]()[_0xc1c6ae(0x1e1)](_0x13a621=>_0x13a621[_0xc1c6ae(0x204)](_0x7c8b57))[_0xc1c6ae(0x258)](_0x466095=>this[_0xc1c6ae(0x1ca)][_0xc1c6ae(0x220)][_0xc1c6ae(0x1cf)](_0x466095));}[_0x4b8d0e(0x221)](){const _0x580e3a=_0x4b8d0e,_0x3dcf80=this[_0x580e3a(0x255)]({'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x1});this[_0x580e3a(0x1ef)](_0x3dcf80),this[_0x580e3a(0x1ca)][_0x580e3a(0x1db)][_0x580e3a(0x250)](!this[_0x580e3a(0x213)][_0x580e3a(0x21a)][_0x580e3a(0x1e3)](_0x580e3a(0x242))),this[_0x580e3a(0x1e8)]=!0x0,this[_0x580e3a(0x1ca)][_0x580e3a(0x220)][_0x580e3a(0x1c3)]();}[_0x4b8d0e(0x200)](_0x177714){const _0x1ae527=_0x4b8d0e;this[_0x1ae527(0x230)][_0x1ae527(0x22e)](),this[_0x1ae527(0x1ca)][_0x1ae527(0x220)][_0x1ae527(0x1ba)]()[_0x1ae527(0x1e1)](_0x3adaa9=>_0x3adaa9[_0x1ae527(0x204)](_0x177714['id']))[_0x1ae527(0x258)](_0x366f7a=>this[_0x1ae527(0x251)](_0x366f7a)),this[_0x1ae527(0x1e8)]=!0x1,this[_0x1ae527(0x1ca)][_0x1ae527(0x220)][_0x1ae527(0x247)]();}async[_0x4b8d0e(0x22c)](){const _0x3b0597=_0x4b8d0e;return this[_0x3b0597(0x230)][_0x3b0597(0x1e6)][_0x3b0597(0x1fe)](()=>{const _0x5adad5=_0x3b0597;this[_0x5adad5(0x1e8)]=!0x1,this[_0x5adad5(0x1ca)][_0x5adad5(0x220)][_0x5adad5(0x247)]();});}[_0x4b8d0e(0x1d2)](_0x12fe76,_0x33d8a4){const _0x2bce2a=_0x4b8d0e;this[_0x2bce2a(0x1ca)][_0x2bce2a(0x1db)][_0x2bce2a(0x1d2)](_0x12fe76,_0x33d8a4);}[_0x4b8d0e(0x239)](_0xc91bf6){const _0x13dfbb=_0x4b8d0e;this[_0x13dfbb(0x1ca)][_0x13dfbb(0x1db)][_0x13dfbb(0x239)](_0xc91bf6);}[_0x4b8d0e(0x1d5)](_0x33dbab,_0x33759e){const _0x4d5bea=_0x4b8d0e;this[_0x4d5bea(0x1ca)][_0x4d5bea(0x1db)][_0x4d5bea(0x1d5)](_0x33dbab,_0x33759e);}[_0x4b8d0e(0x1de)](_0x25d0b4){const _0x29df50=_0x4b8d0e;this[_0x29df50(0x1ca)][_0x29df50(0x1db)][_0x29df50(0x1de)](_0x25d0b4);}[_0x4b8d0e(0x1c9)](_0x143998){const _0x18d695=_0x4b8d0e;this[_0x18d695(0x1ca)][_0x18d695(0x1db)][_0x18d695(0x1c9)](_0x143998);}[_0x4b8d0e(0x22f)](){const _0x21bc19=_0x4b8d0e;this[_0x21bc19(0x1ca)][_0x21bc19(0x1db)][_0x21bc19(0x22f)]();}[_0x4b8d0e(0x1d8)](){const _0x49c82b=_0x4b8d0e;this[_0x49c82b(0x1ca)][_0x49c82b(0x1db)][_0x49c82b(0x1d8)]();}[_0x4b8d0e(0x202)](_0x5e212f,_0x5a52af,_0x401449){const _0x3f24b8=_0x4b8d0e;this[_0x3f24b8(0x1ca)][_0x3f24b8(0x1db)][_0x3f24b8(0x202)](_0x5e212f,_0x5a52af,_0x401449);}[_0x4b8d0e(0x24b)](){const _0x478ed5=_0x4b8d0e;this[_0x478ed5(0x1ca)][_0x478ed5(0x1db)][_0x478ed5(0x24b)](),this[_0x478ed5(0x1ca)][_0x478ed5(0x1db)][_0x478ed5(0x1cd)](this[_0x478ed5(0x1b5)]());}[_0x4b8d0e(0x208)](_0x3c9058){const _0xd60797=_0x4b8d0e;this[_0xd60797(0x1ca)][_0xd60797(0x1db)][_0xd60797(0x208)](_0x3c9058);}[_0x4b8d0e(0x23d)](_0x3aca51){const _0x27dd63=_0x4b8d0e;this[_0x27dd63(0x1ca)][_0x27dd63(0x1db)][_0x27dd63(0x207)](_0x3aca51[_0x27dd63(0x233)]),this[_0x27dd63(0x1ca)][_0x27dd63(0x1db)][_0x27dd63(0x23e)](_0x3aca51[_0x27dd63(0x215)]),this[_0x27dd63(0x1ca)][_0x27dd63(0x1db)][_0x27dd63(0x1cd)](this[_0x27dd63(0x1b5)](_0x3aca51));}[_0x4b8d0e(0x232)](_0x117f6c,_0x4c19b9){const _0xe374ff=_0x4b8d0e;this[_0xe374ff(0x1ca)][_0xe374ff(0x1db)][_0xe374ff(0x218)](_0x117f6c),_0x4c19b9&&this[_0xe374ff(0x1ca)][_0xe374ff(0x1db)][_0xe374ff(0x250)](!0x1);}[_0x4b8d0e(0x259)](_0x6200bc){const _0xab12c8=_0x4b8d0e;this[_0xab12c8(0x1ce)]=_0x6200bc;}[_0x4b8d0e(0x20c)](_0x253181){const _0xa46919=_0x4b8d0e;this[_0xa46919(0x1ca)][_0xa46919(0x220)][_0xa46919(0x20c)](_0x253181);}[_0x4b8d0e(0x1ee)](){const _0x2fac73=_0x4b8d0e;this[_0x2fac73(0x203)](_0x1e499c(this[_0x2fac73(0x213)][_0x2fac73(0x224)],_0x2fac73(0x20d)));}[_0x4b8d0e(0x203)](_0x4ef57e,_0x12ab01=!0x1){const _0x52f247=_0x4b8d0e;if(_0x12ab01&&!_0x2ec60e()&&_0x4ef57e[_0x52f247(0x257)])return this[_0x52f247(0x1ca)][_0x52f247(0x1ab)][_0x52f247(0x1ec)]='',void this[_0x52f247(0x24f)](_0x4ef57e);this[_0x52f247(0x1ca)][_0x52f247(0x1ab)][_0x52f247(0x1ec)]=_0x4ef57e;}[_0x4b8d0e(0x1ef)](_0x15a567){const _0x2d2586=_0x4b8d0e;this[_0x2d2586(0x1ca)][_0x2d2586(0x220)][_0x2d2586(0x1ef)](_0x15a567);}[_0x4b8d0e(0x1f0)](){const _0x517e07=_0x4b8d0e;this[_0x517e07(0x1ca)][_0x517e07(0x220)][_0x517e07(0x1ef)]('');}[_0x4b8d0e(0x24f)](_0x5031b7){const _0x3fd8c7=_0x4b8d0e;let _0x30915d=0x0;clearInterval(this[_0x3fd8c7(0x1b9)]),this[_0x3fd8c7(0x1b9)]=setInterval(()=>{const _0x4df098=_0x3fd8c7;this[_0x4df098(0x1ca)][_0x4df098(0x1ab)][_0x4df098(0x1ec)]=this[_0x4df098(0x1ca)][_0x4df098(0x1ab)][_0x4df098(0x1ec)]+_0x5031b7[_0x30915d],_0x30915d++,_0x30915d===_0x5031b7[_0x4df098(0x257)]&&clearInterval(this[_0x4df098(0x1b9)]);},0x1e);}[_0x4b8d0e(0x1bb)](_0x134846){const _0xc4e580=_0x4b8d0e;this[_0xc4e580(0x1ca)][_0xc4e580(0x1ab)][_0xc4e580(0x1bc)]=_0x134846;}[_0x4b8d0e(0x255)](_0x28f787){const _0x4752d3=_0x4b8d0e;return _0x28f787[_0x4752d3(0x233)]&&_0x28f787[_0x4752d3(0x215)]?_0x1e499c(this[_0x4752d3(0x213)][_0x4752d3(0x224)],_0x4752d3(0x1aa)):_0x28f787[_0x4752d3(0x233)]?_0x1e499c(this[_0x4752d3(0x213)][_0x4752d3(0x224)],_0x4752d3(0x1c6)):_0x28f787[_0x4752d3(0x215)]?_0x1e499c(this[_0x4752d3(0x213)][_0x4752d3(0x224)],_0x4752d3(0x24c)):_0x1e499c(this[_0x4752d3(0x213)][_0x4752d3(0x224)],_0x4752d3(0x1ed));}[_0x4b8d0e(0x1b5)](_0x1d3ef2){const _0x295164=_0x4b8d0e;return _0x1d3ef2?_0x1d3ef2[_0x295164(0x233)]&&_0x1d3ef2[_0x295164(0x215)]?_0x1e499c(this[_0x295164(0x213)][_0x295164(0x224)],_0x295164(0x209)):_0x1d3ef2[_0x295164(0x233)]?_0x1e499c(this[_0x295164(0x213)][_0x295164(0x224)],_0x295164(0x1e5)):_0x1d3ef2[_0x295164(0x215)]?_0x1e499c(this[_0x295164(0x213)][_0x295164(0x224)],_0x295164(0x1f1)):_0x1e499c(this[_0x295164(0x213)][_0x295164(0x224)],_0x295164(0x1fa)):_0x1e499c(this[_0x295164(0x213)][_0x295164(0x224)],_0x295164(0x1fa));}[_0x4b8d0e(0x25b)](_0x48d89b,_0x13d7b9,_0x115f82,_0x50f88b){const _0x36cedb=_0x4b8d0e;this[_0x36cedb(0x1ca)][_0x36cedb(0x25b)](_0x48d89b,_0x13d7b9,_0x115f82,_0x50f88b);}[_0x4b8d0e(0x1d4)](_0x11acfd){const _0x1ba230=_0x4b8d0e;this[_0x1ba230(0x1ca)][_0x1ba230(0x1d4)](_0x11acfd);}[_0x4b8d0e(0x1c8)](_0x310f85){const _0x376e59=_0x4b8d0e;this[_0x376e59(0x1ca)][_0x376e59(0x1db)][_0x376e59(0x1c8)](_0x310f85);}[_0x4b8d0e(0x1c4)](_0xb9b35c=!0x1){const _0x19164e=_0x4b8d0e;this[_0x19164e(0x1ca)][_0x19164e(0x1db)][_0x19164e(0x1c4)](_0xb9b35c);}[_0x4b8d0e(0x1c1)](_0x203636,_0x894655){const _0x1cd549=_0x4b8d0e;this[_0x1cd549(0x1ca)][_0x1cd549(0x220)][_0x1cd549(0x206)](_0x203636,_0x894655);}[_0x4b8d0e(0x1c3)](){const _0xc344df=_0x4b8d0e;this[_0xc344df(0x1ca)][_0xc344df(0x220)][_0xc344df(0x1c3)]();}[_0x4b8d0e(0x227)](){const _0x186f00=_0x4b8d0e;this[_0x186f00(0x1ca)][_0x186f00(0x1db)][_0x186f00(0x1af)]=!0x0;}[_0x4b8d0e(0x22a)](){const _0x1eeb8d=_0x4b8d0e;this[_0x1eeb8d(0x1ca)][_0x1eeb8d(0x1db)][_0x1eeb8d(0x1af)]=!0x1;}}
23
+ function _0x5ae9(_0x482c12,_0x3dc0af){const _0x1d7c4d=_0x1d7c();return _0x5ae9=function(_0x5ae9be,_0x3c007b){_0x5ae9be=_0x5ae9be-0x138;let _0x314a2a=_0x1d7c4d[_0x5ae9be];return _0x314a2a;},_0x5ae9(_0x482c12,_0x3dc0af);}const _0x388858=_0x5ae9;(function(_0x19ee11,_0x3784cc){const _0x584f50=_0x5ae9,_0x155062=_0x19ee11();while(!![]){try{const _0x25dc2b=-parseInt(_0x584f50(0x178))/0x1*(-parseInt(_0x584f50(0x19b))/0x2)+parseInt(_0x584f50(0x1cf))/0x3*(parseInt(_0x584f50(0x18f))/0x4)+-parseInt(_0x584f50(0x1b3))/0x5+-parseInt(_0x584f50(0x1aa))/0x6*(parseInt(_0x584f50(0x1a9))/0x7)+-parseInt(_0x584f50(0x152))/0x8+parseInt(_0x584f50(0x174))/0x9*(parseInt(_0x584f50(0x148))/0xa)+-parseInt(_0x584f50(0x161))/0xb;if(_0x25dc2b===_0x3784cc)break;else _0x155062['push'](_0x155062['shift']());}catch(_0x21a101){_0x155062['push'](_0x155062['shift']());}}}(_0x1d7c,0x51aaa));import{ContextPlugin as _0xca1bfd}from'ckeditor5/src/core.js';import{_isMotionReduced as _0x9a3834}from'ckeditor5/src/utils.js';import{AIChatView as _0x23bb55}from'./ui/aichatview.js';import{AITabs as _0x17ab13}from'../aitabs/aitabs.js';import{getTranslation as _0xec21f}from'../aicore/utils/common-translations.js';import{IconAIChat as _0xaeb661}from'ckeditor5/src/icons.js';import{AIChatFeedInteractionHeaderView as _0x5caea6}from'./ui/feed/aichatfeedinteractionheaderview.js';import{PromiseQueue as _0x2fd187}from'./utils/promisequeue.js';import{AI_CHAT_UI_EVENT_NAMES as _0x589fdb}from'./utils/eventnames.js';import'../../theme/aichat/aichat.css';import{getEditorFromContext as _0x3e26c0}from'../aicore/utils/geteditorfromcontext.js';function _0x1d7c(){const _0x3057b0=['isDone','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REASONING','commands','removeFeedItem','feedItemRenderingStrategy','getItemIds','populateSourceResourceBalloon','updateFeedItemAIReplySources','set','toggleSuggestionDisplayMode','markItemAsDone','displayedPrompt','bind','ai.availableReplyActions','closeSourceResourceBalloon','isOfficialPlugin','isVisible','resetMessageInput','isTrackChangesOn','1721133IxKUxg','setModel','abort','updateCapabilities','trackChanges','AITabs','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REGULAR','setIsUploadInProgress','setModelList','enableModelSelector','last','setConversationTitle','plugins','ai.chat.welcomeMessage','setReasoning','stopInteraction','AI_CHAT_FEED_LOADING_MESSAGE_REASONING','_getInputPlaceholder','availableModels','_isTrackChangesCommandValueBound','filter','ai.chat.context.searchInputVisibleFrom','setInputPlaceholder','attributes','enqueue','fire','has','showResizeButton','interaction-header','updateSuggestionPartState','queueEmptyPromise','chatHeader','chatFeed','clearPendingContextUI','prepareLoadingMessage','setLoadingMessage','clearLoadingMessage','values','focusPromptInput','_titleAnimationInterval','AI_CHAT_WELCOME_MESSAGE','length','error-message','contextItems','startInteraction','1754860welaGl','chat','isLoading','isPending','AI_CHAT_FEED_LOADING_MESSAGE_REGULAR','</p>','_promiseQueue','context','removeItem','find','639400xHRVlQ','updateResourceState','<p>','removeFeedInteraction','ai-reply','startsWith','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH_REASONING','addFeedItemUserMessage','children','locale','stopAutoScroll','isPremiumPlugin','addFeedInteractionHeader','delegate','value','1096700aPQWcj','get','conversation-start','options','ai-suggestion-reply','setContextItemLoading','setSuggestionPartActive','setFeedItemRenderingStrategy','hasFeedItem','ai.models.showModelSelector','clearConversationContextUI','capabilities','remove','requires','isBusy','createConversation','custom-element','destroy','updateReplyItem','9HHIqHy','setSelectedModel','updateFeedItemAIReplySuggestionPartState','_interactionPromiseResolver','77903fTxeTo','setAddContextOptions','updateFeedInteractionHeader','disableControls','showDiff','addContextItem','isReasoningEnabled','disableModelSelector','setConversationContext','interactionId','updateFeedItemAIReplyContent','addFeedItemAISuggestion','isMaximized','clear','scrollToSuggestion','addFeedItemCustomElement','isWebSearchEnabled','setPromptInputValue','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH_REASONING','updateWebSources','label','addFeedItemStaticMessage','scrollFeedToSuggestion','4pWkCEv','AIChatUI','startAutoScroll','addItem','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH','streaming','userMessage','TrackChanges','enableControls','updateSuggestionItem','removeContextItem','finishInteraction','2kZgruz','resetConversationTitle','AI_CHAT_HEADING','setFeedItemAIReplySuggestionPartActive','setWebSearch','addFeedItemAIReply','addFeedItemError','insertSuggestion','user-message','chatControls','from','pluginName','renderingStrategy','markFeedItemAsDone','7hftLcy','1566438RNrIWW','toggleLoadingSkeleton','isModelAvailable','conversationCreated','forEach','setIsMaximized','areActionsDisabled','_view','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH','259480HzwjFF','updateFeedItemAIReplySuggestionContent','isDisabled','addTab','then','hasItem','_animateConversationTitle','config','view'];_0x1d7c=function(){return _0x3057b0;};return _0x1d7c();}import{AI_REPLY_ACTIONS as _0x2e1133}from'./ui/feed/aichatfeedsuggestionitemactionsview.js';export class AIChatUI extends _0xca1bfd{static get[_0x388858(0x16e)](){return[_0x17ab13];}[_0x388858(0x1b1)];static get[_0x388858(0x1a6)](){const _0x3d5444=_0x388858;return _0x3d5444(0x190);}static get[_0x388858(0x1cb)](){return!0x0;}static get[_0x388858(0x15d)](){return!0x0;}[_0x388858(0x1c0)]=_0x388858(0x194);[_0x388858(0x17c)]=!0x0;[_0x388858(0x14e)];[_0x388858(0x177)];[_0x388858(0x142)]=void 0x0;[_0x388858(0x1e2)]=!0x1;constructor(_0x36d8ca){const _0x2bd3ab=_0x388858;super(_0x36d8ca);const _0x239e3e=this[_0x2bd3ab(0x14f)][_0x2bd3ab(0x1db)][_0x2bd3ab(0x162)](_0x2bd3ab(0x1d4));this[_0x2bd3ab(0x1c4)](_0x2bd3ab(0x16f),!0x1),this[_0x2bd3ab(0x14e)]=new _0x2fd187(),this[_0x2bd3ab(0x1b1)]=new _0x23bb55(this[_0x2bd3ab(0x14f)][_0x2bd3ab(0x15b)],{'showResizeButton':_0x239e3e[_0x2bd3ab(0x1ea)],'contextResourcesSearchInputVisibleFrom':this[_0x2bd3ab(0x14f)][_0x2bd3ab(0x1ba)][_0x2bd3ab(0x162)](_0x2bd3ab(0x1e4))}),this[_0x2bd3ab(0x1b1)][_0x2bd3ab(0x15f)](..._0x589fdb)['to'](this),this[_0x2bd3ab(0x1b1)]['on'](_0x2bd3ab(0x1c5),(_0x2693e1,{showDiff:_0x100fe9})=>{const _0x4f6491=_0x2bd3ab;this[_0x4f6491(0x17c)]=_0x100fe9;}),_0x239e3e[_0x2bd3ab(0x1bb)][_0x2bd3ab(0x1b6)]({'id':_0x2bd3ab(0x149),'buttonLabel':_0xec21f(this[_0x2bd3ab(0x14f)][_0x2bd3ab(0x15b)],_0x2bd3ab(0x19d)),'buttonIcon':_0xaeb661,'order':0x0,'content':this[_0x2bd3ab(0x1b1)]}),this[_0x2bd3ab(0x1b1)][_0x2bd3ab(0x1a4)][_0x2bd3ab(0x1c8)](_0x2bd3ab(0x14a))['to'](this,_0x2bd3ab(0x16f),_0x1fb269=>_0x1fb269),this[_0x2bd3ab(0x1b1)][_0x2bd3ab(0x13b)][_0x2bd3ab(0x1c8)](_0x2bd3ab(0x14b))['to'](this,_0x2bd3ab(0x16f),_0x31fc0c=>_0x31fc0c),this[_0x2bd3ab(0x1b1)][_0x2bd3ab(0x1a4)][_0x2bd3ab(0x1e5)](this[_0x2bd3ab(0x1e0)]()),this[_0x2bd3ab(0x1c8)](_0x2bd3ab(0x1ac))['to'](this[_0x2bd3ab(0x1b1)][_0x2bd3ab(0x1a4)],_0x2bd3ab(0x1ac));}[_0x388858(0x172)](){const _0x7e2870=_0x388858;super[_0x7e2870(0x172)](),this[_0x7e2870(0x142)]&&clearInterval(this[_0x7e2870(0x142)]);}[_0x388858(0x170)](_0x2aa0fb){const _0x5c045f=_0x388858,_0x5516ad=this[_0x5c045f(0x14f)][_0x5c045f(0x1ba)][_0x5c045f(0x162)](_0x5c045f(0x1dc))??_0xec21f(this[_0x5c045f(0x14f)][_0x5c045f(0x15b)],_0x5c045f(0x143));this[_0x5c045f(0x1b1)][_0x5c045f(0x13b)][_0x5c045f(0x185)](),this[_0x5c045f(0x1b1)][_0x5c045f(0x1a4)][_0x5c045f(0x1d8)](),this[_0x5c045f(0x1b1)][_0x5c045f(0x1a4)][_0x5c045f(0x1d7)](_0x2aa0fb[_0x5c045f(0x1e1)],!this[_0x5c045f(0x14f)][_0x5c045f(0x1ba)][_0x5c045f(0x162)](_0x5c045f(0x16a))),this[_0x5c045f(0x18d)]({'id':_0x5c045f(0x163),'staticMessage':_0x5516ad}),this[_0x5c045f(0x1e8)](_0x5c045f(0x1ad));}[_0x388858(0x18d)]({id:_0x3e6c50,staticMessage:_0x2e640b}){const _0x157eb6=_0x388858;this[_0x157eb6(0x1b1)][_0x157eb6(0x13b)][_0x157eb6(0x192)](_0x157eb6(0x156),{'id':_0x3e6c50,'initialContent':_0x157eb6(0x154)+_0x2e640b+_0x157eb6(0x14d)});}[_0x388858(0x159)](_0x94e47d){const _0x31075a=_0x388858,_0x37d1a5=_0x94e47d[_0x31075a(0x1e6)]?.[_0x31075a(0x1c7)]||_0x94e47d[_0x31075a(0x195)];this[_0x31075a(0x1b1)][_0x31075a(0x13b)][_0x31075a(0x192)](_0x31075a(0x1a3),{'contextItems':Array[_0x31075a(0x1a5)](_0x94e47d[_0x31075a(0x146)][_0x31075a(0x140)]()),'initialContent':_0x31075a(0x154)+_0x37d1a5+_0x31075a(0x14d),'id':_0x94e47d['id']});}[_0x388858(0x1a1)]({errorMessage:_0x4fc995,id:_0x4fa47a}){const _0x547947=_0x388858;this[_0x547947(0x1b1)][_0x547947(0x13b)][_0x547947(0x192)](_0x547947(0x145),{'initialContent':_0x547947(0x154)+_0x4fc995+_0x547947(0x14d),'id':_0x4fa47a});}[_0x388858(0x1a0)](_0x287a77){const _0x3472e2=_0x388858;return this[_0x3472e2(0x14e)][_0x3472e2(0x1e7)](async()=>{const _0x3a9102=_0x3472e2;this[_0x3a9102(0x1b1)][_0x3a9102(0x13b)][_0x3a9102(0x192)](_0x3a9102(0x156),{'id':_0x287a77[_0x3a9102(0x181)]+':'+_0x287a77['id']}),this[_0x3a9102(0x13f)]();});}async[_0x388858(0x183)](_0x48ab6c){const _0x3565e1=_0x388858,_0x24a422=_0x3e26c0(this[_0x3565e1(0x14f)]);let _0x3136bb=_0x24a422[_0x3565e1(0x1ba)][_0x3565e1(0x162)](_0x3565e1(0x1c9))||[..._0x2e1133];if(_0x24a422[_0x3565e1(0x1db)][_0x3565e1(0x1e9)](_0x3565e1(0x196))){if(!this[_0x3565e1(0x1e2)]){this[_0x3565e1(0x1e2)]=!0x0;const _0x521ee4=_0x24a422[_0x3565e1(0x1be)][_0x3565e1(0x162)](_0x3565e1(0x1d3));this[_0x3565e1(0x1b1)][_0x3565e1(0x13b)][_0x3565e1(0x1c8)](_0x3565e1(0x1ce))['to'](_0x521ee4,_0x3565e1(0x160));}}else _0x3136bb=_0x3136bb[_0x3565e1(0x1e3)](_0x212ca7=>_0x3565e1(0x1a2)!=_0x212ca7);return this[_0x3565e1(0x14e)][_0x3565e1(0x1e7)](async()=>{const _0x1ad82d=_0x3565e1;this[_0x1ad82d(0x1b1)][_0x1ad82d(0x13b)][_0x1ad82d(0x192)](_0x1ad82d(0x165),{'id':_0x48ab6c[_0x1ad82d(0x181)]+':'+_0x48ab6c['id'],'areActionsDisabled':_0x48ab6c[_0x1ad82d(0x1b0)],'showDiff':this[_0x1ad82d(0x17c)],'availableActions':_0x3136bb}),this[_0x1ad82d(0x13f)]();});}[_0x388858(0x15e)](_0x3c9b1a,_0x24208f){const _0x137c0e=_0x388858,_0x54b3e1=this[_0x137c0e(0x1b1)][_0x137c0e(0x13b)][_0x137c0e(0x15a)][_0x137c0e(0x1d9)];if(_0x54b3e1 instanceof _0x5caea6)return this[_0x137c0e(0x1b1)][_0x137c0e(0x13b)][_0x137c0e(0x15a)][_0x137c0e(0x16d)](_0x54b3e1),void this[_0x137c0e(0x1b1)][_0x137c0e(0x13b)][_0x137c0e(0x192)](_0x137c0e(0x1eb),{'id':_0x3c9b1a['id'],'capabilities':{'isWebSearchEnabled':_0x54b3e1[_0x137c0e(0x16c)][_0x137c0e(0x188)]||_0x24208f[_0x137c0e(0x188)],'isReasoningEnabled':_0x54b3e1[_0x137c0e(0x16c)][_0x137c0e(0x17e)]||_0x24208f[_0x137c0e(0x17e)]}});this[_0x137c0e(0x1b1)][_0x137c0e(0x13b)][_0x137c0e(0x192)](_0x137c0e(0x1eb),{'id':_0x3c9b1a['id'],'capabilities':_0x24208f});}async[_0x388858(0x187)](_0x93ed6e,_0x492268){const _0x5ca6bf=_0x388858;let _0x11cebe;return await this[_0x5ca6bf(0x14e)][_0x5ca6bf(0x1e7)](async()=>{const _0xc90f0f=_0x5ca6bf;_0x11cebe=this[_0xc90f0f(0x1b1)][_0xc90f0f(0x13b)][_0xc90f0f(0x192)](_0xc90f0f(0x171),{'content':_0x93ed6e,'id':_0x492268});}),_0x11cebe;}[_0x388858(0x1bf)](_0x8360ef){const _0x131f8e=_0x388858;this[_0x131f8e(0x1b1)][_0x131f8e(0x13b)][_0x131f8e(0x150)](_0x8360ef);}[_0x388858(0x169)](_0x5b1689){const _0x20b72d=_0x388858;return this[_0x20b72d(0x1b1)][_0x20b72d(0x13b)][_0x20b72d(0x1b8)](_0x5b1689);}[_0x388858(0x17a)](_0x1f8682){const _0x85d518=_0x388858,_0x20f99c=this[_0x85d518(0x1b1)][_0x85d518(0x13b)][_0x85d518(0x15a)][_0x85d518(0x151)](_0x949c68=>_0x949c68[_0x85d518(0x164)]['id']==_0x1f8682['id']&&_0x949c68 instanceof _0x5caea6);_0x20f99c&&_0x20f99c[_0x85d518(0x1c4)](_0x85d518(0x1cc),_0x1f8682[_0x85d518(0x1cc)]);}async[_0x388858(0x182)](_0x37f81c){const _0x13b2c2=_0x388858,_0x121838=_0x37f81c[_0x13b2c2(0x1a7)]||this[_0x13b2c2(0x1c0)];return this[_0x13b2c2(0x14e)][_0x13b2c2(0x1e7)](async _0x31823a=>{const _0x4a93a5=_0x13b2c2;await this[_0x4a93a5(0x1b1)][_0x4a93a5(0x13b)][_0x4a93a5(0x173)]({..._0x37f81c,'abortSignal':_0x31823a,'renderingStrategy':_0x121838}),_0x37f81c[_0x4a93a5(0x1bc)]&&this[_0x4a93a5(0x1a8)](_0x37f81c['id']);});}[_0x388858(0x1c3)](_0x53bf72,_0x447de3){const _0x111c1b=_0x388858;this[_0x111c1b(0x1b1)][_0x111c1b(0x13b)][_0x111c1b(0x18b)](_0x53bf72,_0x447de3);}async[_0x388858(0x1b4)](_0x185be4){const _0x2a25e6=_0x388858,_0x26ce67=_0x185be4[_0x2a25e6(0x1a7)]||this[_0x2a25e6(0x1c0)];return this[_0x2a25e6(0x14e)][_0x2a25e6(0x1e7)](async _0x7522ba=>{const _0x5c4b22=_0x2a25e6;await this[_0x5c4b22(0x1b1)][_0x5c4b22(0x13b)][_0x5c4b22(0x198)]({..._0x185be4,'abortSignal':_0x7522ba,'renderingStrategy':_0x26ce67}),_0x185be4[_0x5c4b22(0x1bc)]&&this[_0x5c4b22(0x1a8)](_0x185be4['id']);});}[_0x388858(0x176)](_0x2fc971){const _0x3c80e8=_0x388858;this[_0x3c80e8(0x1b1)][_0x3c80e8(0x13b)][_0x3c80e8(0x138)](_0x2fc971);}[_0x388858(0x19e)](_0x588208){const _0x4ad2c1=_0x388858;this[_0x4ad2c1(0x1b1)][_0x4ad2c1(0x13b)][_0x4ad2c1(0x167)](_0x588208);}[_0x388858(0x1a8)](_0x13728f){const _0x15110d=_0x388858;this[_0x15110d(0x1b1)][_0x15110d(0x13b)][_0x15110d(0x1c6)](_0x13728f);}[_0x388858(0x155)](_0x489e8c){const _0x83ce01=_0x388858;this[_0x83ce01(0x1b1)][_0x83ce01(0x13b)][_0x83ce01(0x1c1)]()[_0x83ce01(0x1e3)](_0x4127c4=>_0x4127c4[_0x83ce01(0x157)](_0x489e8c))[_0x83ce01(0x1ae)](_0xdf2829=>this[_0x83ce01(0x1b1)][_0x83ce01(0x13b)][_0x83ce01(0x150)](_0xdf2829));}[_0x388858(0x147)](){const _0x176f7c=_0x388858,_0x409c41=this[_0x176f7c(0x13d)]({'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x1});this[_0x176f7c(0x13e)](_0x409c41),this[_0x176f7c(0x1b1)][_0x176f7c(0x1a4)][_0x176f7c(0x17f)](!this[_0x176f7c(0x14f)][_0x176f7c(0x1ba)][_0x176f7c(0x162)](_0x176f7c(0x16a))),this[_0x176f7c(0x16f)]=!0x0,this[_0x176f7c(0x1b1)][_0x176f7c(0x13b)][_0x176f7c(0x191)]();}[_0x388858(0x1de)](_0x1f766d){const _0x42f688=_0x388858;this[_0x42f688(0x14e)][_0x42f688(0x1d1)](),this[_0x42f688(0x1b1)][_0x42f688(0x13b)][_0x42f688(0x1c1)]()[_0x42f688(0x1e3)](_0x35c9e1=>_0x35c9e1[_0x42f688(0x157)](_0x1f766d['id']))[_0x42f688(0x1ae)](_0x6fa94f=>this[_0x42f688(0x1a8)](_0x6fa94f)),this[_0x42f688(0x16f)]=!0x1,this[_0x42f688(0x1b1)][_0x42f688(0x13b)][_0x42f688(0x15c)]();}async[_0x388858(0x19a)](){const _0x2af2e8=_0x388858;return this[_0x2af2e8(0x14e)][_0x2af2e8(0x139)][_0x2af2e8(0x1b7)](()=>{const _0x2beb14=_0x2af2e8;this[_0x2beb14(0x16f)]=!0x1,this[_0x2beb14(0x1b1)][_0x2beb14(0x13b)][_0x2beb14(0x15c)]();});}[_0x388858(0x17d)](_0x14e1c0,_0x1c99e0){const _0x23e146=_0x388858;this[_0x23e146(0x1b1)][_0x23e146(0x1a4)][_0x23e146(0x17d)](_0x14e1c0,_0x1c99e0);}[_0x388858(0x199)](_0x1ddfd1){const _0x4e4e76=_0x388858;this[_0x4e4e76(0x1b1)][_0x4e4e76(0x1a4)][_0x4e4e76(0x199)](_0x1ddfd1);}[_0x388858(0x166)](_0x4e6647,_0x4afb17){const _0x1f287f=_0x388858;this[_0x1f287f(0x1b1)][_0x1f287f(0x1a4)][_0x1f287f(0x166)](_0x4e6647,_0x4afb17);}[_0x388858(0x1d6)](_0xe3a981){const _0x2ed8a2=_0x388858;this[_0x2ed8a2(0x1b1)][_0x2ed8a2(0x1a4)][_0x2ed8a2(0x1d6)](_0xe3a981);}[_0x388858(0x180)](_0xd2bd5c){const _0x1590c2=_0x388858;this[_0x1590c2(0x1b1)][_0x1590c2(0x1a4)][_0x1590c2(0x180)](_0xd2bd5c);}[_0x388858(0x13c)](){const _0x182ac8=_0x388858;this[_0x182ac8(0x1b1)][_0x182ac8(0x1a4)][_0x182ac8(0x13c)]();}[_0x388858(0x16b)](){const _0x1d78e9=_0x388858;this[_0x1d78e9(0x1b1)][_0x1d78e9(0x1a4)][_0x1d78e9(0x16b)]();}[_0x388858(0x153)](_0x20e023,_0x4adb9c,_0x3405da){const _0x42e4e5=_0x388858;this[_0x42e4e5(0x1b1)][_0x42e4e5(0x1a4)][_0x42e4e5(0x153)](_0x20e023,_0x4adb9c,_0x3405da);}[_0x388858(0x1cd)](){const _0x1a9443=_0x388858;this[_0x1a9443(0x1b1)][_0x1a9443(0x1a4)][_0x1a9443(0x1cd)](),this[_0x1a9443(0x1b1)][_0x1a9443(0x1a4)][_0x1a9443(0x1e5)](this[_0x1a9443(0x1e0)]());}[_0x388858(0x179)](_0x5e93b7){const _0x94f86b=_0x388858;this[_0x94f86b(0x1b1)][_0x94f86b(0x1a4)][_0x94f86b(0x179)](_0x5e93b7);}[_0x388858(0x1d2)](_0x15949b){const _0x1db879=_0x388858;this[_0x1db879(0x1b1)][_0x1db879(0x1a4)][_0x1db879(0x19f)](_0x15949b[_0x1db879(0x188)]),this[_0x1db879(0x1b1)][_0x1db879(0x1a4)][_0x1db879(0x1dd)](_0x15949b[_0x1db879(0x17e)]),this[_0x1db879(0x1b1)][_0x1db879(0x1a4)][_0x1db879(0x1e5)](this[_0x1db879(0x1e0)](_0x15949b));}[_0x388858(0x175)](_0x2c72e5,_0x2bd34b){const _0x411aca=_0x388858;this[_0x411aca(0x1b1)][_0x411aca(0x1a4)][_0x411aca(0x1d0)](_0x2c72e5),_0x2bd34b&&this[_0x411aca(0x1b1)][_0x411aca(0x1a4)][_0x411aca(0x17f)](!0x1);}[_0x388858(0x168)](_0x26aad1){const _0x291ff7=_0x388858;this[_0x291ff7(0x1c0)]=_0x26aad1;}[_0x388858(0x1ab)](_0x1206ff){const _0x444d73=_0x388858;this[_0x444d73(0x1b1)][_0x444d73(0x13b)][_0x444d73(0x1ab)](_0x1206ff);}[_0x388858(0x19c)](){const _0x1895c4=_0x388858;this[_0x1895c4(0x1da)](_0xec21f(this[_0x1895c4(0x14f)][_0x1895c4(0x15b)],_0x1895c4(0x19d)));}[_0x388858(0x1da)](_0x6527a4,_0x686c5f=!0x1){const _0x25ce71=_0x388858;if(_0x686c5f&&!_0x9a3834()&&_0x6527a4[_0x25ce71(0x144)])return this[_0x25ce71(0x1b1)][_0x25ce71(0x13a)][_0x25ce71(0x18c)]='',void this[_0x25ce71(0x1b9)](_0x6527a4);this[_0x25ce71(0x1b1)][_0x25ce71(0x13a)][_0x25ce71(0x18c)]=_0x6527a4;}[_0x388858(0x13e)](_0x2ed891){const _0x5ef8b5=_0x388858;this[_0x5ef8b5(0x1b1)][_0x5ef8b5(0x13b)][_0x5ef8b5(0x13e)](_0x2ed891);}[_0x388858(0x13f)](){const _0x27d80c=_0x388858;this[_0x27d80c(0x1b1)][_0x27d80c(0x13b)][_0x27d80c(0x13e)]('');}[_0x388858(0x1b9)](_0x1b5771){const _0x284cc9=_0x388858;let _0x13ac7c=0x0;clearInterval(this[_0x284cc9(0x142)]),this[_0x284cc9(0x142)]=setInterval(()=>{const _0x27b327=_0x284cc9;this[_0x27b327(0x1b1)][_0x27b327(0x13a)][_0x27b327(0x18c)]=this[_0x27b327(0x1b1)][_0x27b327(0x13a)][_0x27b327(0x18c)]+_0x1b5771[_0x13ac7c],_0x13ac7c++,_0x13ac7c===_0x1b5771[_0x27b327(0x144)]&&clearInterval(this[_0x27b327(0x142)]);},0x1e);}[_0x388858(0x1af)](_0x5a7c23){const _0x396808=_0x388858;this[_0x396808(0x1b1)][_0x396808(0x13a)][_0x396808(0x184)]=_0x5a7c23;}[_0x388858(0x13d)](_0x57b856){const _0x2559c1=_0x388858;return _0x57b856[_0x2559c1(0x188)]&&_0x57b856[_0x2559c1(0x17e)]?_0xec21f(this[_0x2559c1(0x14f)][_0x2559c1(0x15b)],_0x2559c1(0x158)):_0x57b856[_0x2559c1(0x188)]?_0xec21f(this[_0x2559c1(0x14f)][_0x2559c1(0x15b)],_0x2559c1(0x1b2)):_0x57b856[_0x2559c1(0x17e)]?_0xec21f(this[_0x2559c1(0x14f)][_0x2559c1(0x15b)],_0x2559c1(0x1df)):_0xec21f(this[_0x2559c1(0x14f)][_0x2559c1(0x15b)],_0x2559c1(0x14c));}[_0x388858(0x1e0)](_0x4a5eea){const _0x16e6de=_0x388858;return _0x4a5eea?_0x4a5eea[_0x16e6de(0x188)]&&_0x4a5eea[_0x16e6de(0x17e)]?_0xec21f(this[_0x16e6de(0x14f)][_0x16e6de(0x15b)],_0x16e6de(0x18a)):_0x4a5eea[_0x16e6de(0x188)]?_0xec21f(this[_0x16e6de(0x14f)][_0x16e6de(0x15b)],_0x16e6de(0x193)):_0x4a5eea[_0x16e6de(0x17e)]?_0xec21f(this[_0x16e6de(0x14f)][_0x16e6de(0x15b)],_0x16e6de(0x1bd)):_0xec21f(this[_0x16e6de(0x14f)][_0x16e6de(0x15b)],_0x16e6de(0x1d5)):_0xec21f(this[_0x16e6de(0x14f)][_0x16e6de(0x15b)],_0x16e6de(0x1d5));}[_0x388858(0x1c2)](_0x31f975,_0x5d5022,_0x14080b,_0x967570){const _0x313fc0=_0x388858;this[_0x313fc0(0x1b1)][_0x313fc0(0x1c2)](_0x31f975,_0x5d5022,_0x14080b,_0x967570);}[_0x388858(0x1ca)](_0x1fc225){const _0xa06ced=_0x388858;this[_0xa06ced(0x1b1)][_0xa06ced(0x1ca)](_0x1fc225);}[_0x388858(0x189)](_0x5042f9){const _0x3eb109=_0x388858;this[_0x3eb109(0x1b1)][_0x3eb109(0x1a4)][_0x3eb109(0x189)](_0x5042f9);}[_0x388858(0x141)](_0x494e72=!0x1){const _0x4617c3=_0x388858;this[_0x4617c3(0x1b1)][_0x4617c3(0x1a4)][_0x4617c3(0x141)](_0x494e72);}[_0x388858(0x18e)](_0x5d4848,_0x44f563){const _0x371926=_0x388858;this[_0x371926(0x1b1)][_0x371926(0x13b)][_0x371926(0x186)](_0x5d4848,_0x44f563);}[_0x388858(0x191)](){const _0x308a9a=_0x388858;this[_0x308a9a(0x1b1)][_0x308a9a(0x13b)][_0x308a9a(0x191)]();}[_0x388858(0x17b)](){const _0x3f2b01=_0x388858;this[_0x3f2b01(0x1b1)][_0x3f2b01(0x1a4)][_0x3f2b01(0x1b5)]=!0x0;}[_0x388858(0x197)](){const _0x3196f4=_0x388858;this[_0x3196f4(0x1b1)][_0x3196f4(0x1a4)][_0x3196f4(0x1b5)]=!0x1;}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x215be7=_0x5d84;(function(_0x55152e,_0x3626c1){const _0x4b0b5c=_0x5d84,_0x3f2707=_0x55152e();while(!![]){try{const _0x48f1d5=parseInt(_0x4b0b5c(0x185))/0x1+parseInt(_0x4b0b5c(0x13b))/0x2+-parseInt(_0x4b0b5c(0x158))/0x3+parseInt(_0x4b0b5c(0x13c))/0x4+-parseInt(_0x4b0b5c(0x16c))/0x5+parseInt(_0x4b0b5c(0x1b0))/0x6*(-parseInt(_0x4b0b5c(0x135))/0x7)+parseInt(_0x4b0b5c(0x1a1))/0x8*(parseInt(_0x4b0b5c(0x176))/0x9);if(_0x48f1d5===_0x3626c1)break;else _0x3f2707['push'](_0x3f2707['shift']());}catch(_0x563be1){_0x3f2707['push'](_0x3f2707['shift']());}}}(_0x4d43,0x3064b));import{CKEditorError as _0x492d6f,ObservableMixin as _0x9c9d99,uid as _0x2913a4}from'ckeditor5/src/utils.js';import{AIContextItemType as _0x5672ff,AIContextTextResourceType as _0x5144de}from'../../aicore/model/aicontext.js';import{escape as _0x59bada}from'es-toolkit/compat';import{errorsMap as _0x2fea76}from'../../errorsmap.js';function _0x5d84(_0x48850e,_0x5ab4b7){const _0x4d430d=_0x4d43();return _0x5d84=function(_0x5d8486,_0x33cf54){_0x5d8486=_0x5d8486-0x130;let _0x1b8698=_0x4d430d[_0x5d8486];return _0x1b8698;},_0x5d84(_0x48850e,_0x5ab4b7);}export const AI_CONTEXT_MODEL_EVENT_NAMES=[_0x215be7(0x190),_0x215be7(0x181),_0x215be7(0x196),_0x215be7(0x1a0),_0x215be7(0x18f),_0x215be7(0x1a5),_0x215be7(0x16e),_0x215be7(0x157),_0x215be7(0x13f)];export class AIChatContext extends _0x9c9d99(){[_0x215be7(0x19d)];[_0x215be7(0x1b6)];[_0x215be7(0x17e)];constructor({connector:_0x3bebdf,config:_0x457cec,ownerId:_0x103131}){const _0x24c69c=_0x215be7;super(),this[_0x24c69c(0x19d)]=_0x3bebdf,this[_0x24c69c(0x1b6)]=_0x457cec,this[_0x24c69c(0x17e)]=_0x103131;}[_0x215be7(0x188)](){const _0x35506d=_0x215be7;this[_0x35506d(0x1bb)]=new Map(),this[_0x35506d(0x18d)]=new Map(),this[_0x35506d(0x191)]=new Map(),this[_0x35506d(0x133)]=new Map(),this[_0x35506d(0x159)]();}[_0x215be7(0x144)](){const _0x2e96fc=_0x215be7;return this[_0x2e96fc(0x1bb)];}async[_0x215be7(0x1a6)](_0x312a95){const _0x123ad7=_0x215be7,_0x2a1bf5=await this[_0x123ad7(0x16a)](_0x312a95);return this[_0x123ad7(0x150)](_0x2a1bf5),_0x123ad7(0x1ba)===_0x2a1bf5[_0x123ad7(0x1a7)]&&this[_0x123ad7(0x178)](),_0x2a1bf5;}async[_0x215be7(0x16a)](_0x169e48){const _0x2909f6=_0x215be7;if(_0x169e48[_0x2909f6(0x1b3)]===_0x5672ff[_0x2909f6(0x138)]){const _0x1c1035=await this[_0x2909f6(0x19d)][_0x2909f6(0x1bf)](this[_0x2909f6(0x17e)],_0x169e48['id'])[_0x2909f6(0x199)]();return{'id':_0x2909f6(0x1ba),'uiId':_0x2909f6(0x1ba),'label':_0x2909f6(0x137),'type':_0x169e48[_0x2909f6(0x1b3)],'content':_0x1c1035[_0x2909f6(0x14a)],'hidden':this[_0x2909f6(0x18d)][_0x2909f6(0x179)](_0x2909f6(0x1ba)),'version':_0x1c1035[_0x2909f6(0x1b2)]?.[_0x2909f6(0x18a)],'sessionId':_0x1c1035[_0x2909f6(0x1b2)]?.[_0x2909f6(0x18e)]};}if(_0x169e48[_0x2909f6(0x1b3)]===_0x5672ff[_0x2909f6(0x166)])return{'id':_0x169e48['id'],'uiId':_0x169e48['id'],'label':_0x169e48[_0x2909f6(0x173)]?.[_0x2909f6(0x1ad)]||_0x169e48['id'],'type':_0x5672ff[_0x2909f6(0x166)],'mcpServerName':_0x169e48[_0x2909f6(0x174)],'toolName':_0x169e48[_0x2909f6(0x14f)],'data':_0x169e48[_0x2909f6(0x173)]||{}};return{'id':_0x169e48['id'],'uiId':_0x169e48['id'],'label':_0x169e48[_0x2909f6(0x1b2)]?.[_0x2909f6(0x1ad)]||_0x169e48[_0x2909f6(0x170)]||_0x169e48[_0x2909f6(0x19c)]||_0x169e48['id'],'type':_0x169e48[_0x2909f6(0x1b3)],..._0x169e48?.[_0x2909f6(0x1b2)]?.[_0x2909f6(0x17a)]?{'resourceId':_0x169e48[_0x2909f6(0x1b2)]?.[_0x2909f6(0x17a)]}:{}};}[_0x215be7(0x1b7)](){const _0x27d53f=_0x215be7;return new Map(this[_0x27d53f(0x18d)]);}[_0x215be7(0x1bc)](_0x441cf9){const _0x499c0a=_0x215be7,_0xdac82=this[_0x499c0a(0x1bb)][_0x499c0a(0x132)](_0x441cf9);_0xdac82?.[_0x499c0a(0x1c0)]||this[_0x499c0a(0x1ac)](_0x441cf9);}[_0x215be7(0x164)](){const _0x15c169=_0x215be7;if(0x0===this[_0x15c169(0x1bb)][_0x15c169(0x162)])return;for(const _0x3ff1f2 of this[_0x15c169(0x1bb)][_0x15c169(0x147)]())this[_0x15c169(0x1ac)](_0x3ff1f2[_0x15c169(0x1a7)]);const _0x2366ad=this[_0x15c169(0x18d)][_0x15c169(0x132)](_0x15c169(0x1ba))||this[_0x15c169(0x1bb)][_0x15c169(0x132)](_0x15c169(0x1ba));_0x2366ad&&this[_0x15c169(0x156)]({..._0x2366ad,'isReadOnly':!0x0,'hidden':!0x0});}[_0x215be7(0x13a)](_0x5d7346){const _0x46d4c5=_0x215be7;for(const _0x4cb85d of _0x5d7346[_0x46d4c5(0x147)]())this[_0x46d4c5(0x150)](_0x4cb85d);this[_0x46d4c5(0x164)](),this[_0x46d4c5(0x197)](_0x46d4c5(0x1a0),{'contextItems':Array[_0x46d4c5(0x14d)](this[_0x46d4c5(0x1b7)]()[_0x46d4c5(0x147)]())});}[_0x215be7(0x15e)](){const _0x127715=_0x215be7;return this[_0x127715(0x1bb)][_0x127715(0x179)](_0x127715(0x1ba));}[_0x215be7(0x175)](){const _0x32f348=_0x215be7;return this[_0x32f348(0x1bb)][_0x32f348(0x179)](_0x32f348(0x13e));}[_0x215be7(0x14b)](){const _0x8f62e8=_0x215be7;return this[_0x8f62e8(0x18d)][_0x8f62e8(0x179)](_0x8f62e8(0x1ba));}static[_0x215be7(0x1be)](_0x4c5c3a){const _0x176909=_0x215be7;return Array[_0x176909(0x14d)](_0x4c5c3a[_0x176909(0x147)]())[_0x176909(0x17f)](_0x18cd68=>this[_0x176909(0x131)](_0x18cd68))[_0x176909(0x17d)](_0x56e337=>null!==_0x56e337);}async[_0x215be7(0x1af)](_0x242160,_0x50ff4e,_0x5e7899=_0x5672ff[_0x215be7(0x17c)]){const _0x22a9fb=_0x215be7,_0x488e49=_0x22a9fb(0x186)+_0x2913a4();this[_0x22a9fb(0x165)](_0x488e49);try{await Promise[_0x22a9fb(0x1b9)](_0x242160[_0x22a9fb(0x17f)](async _0x1cd86a=>{const _0x53a777=_0x22a9fb,_0x8012e3=_0x53a777(0x180)+_0x2913a4(),_0x49a504=_0x59bada(_0x1cd86a[_0x53a777(0x170)]);try{this[_0x53a777(0x156)]({'type':_0x5e7899,'label':_0x50ff4e?.[_0x53a777(0x1ad)]||_0x49a504,'uiId':_0x8012e3,'resourceId':_0x50ff4e?.[_0x53a777(0x17a)]},!0x0);const _0x1b8b41=this[_0x53a777(0x19d)][_0x53a777(0x14e)](this[_0x53a777(0x17e)],_0x1cd86a,_0x50ff4e);this[_0x53a777(0x191)][_0x53a777(0x169)](_0x8012e3,_0x1b8b41[_0x53a777(0x145)]);const {id:_0x40c849}=await _0x1b8b41[_0x53a777(0x1aa)]();this[_0x53a777(0x191)][_0x53a777(0x139)](_0x8012e3),this[_0x53a777(0x168)]({'type':_0x5e7899,'id':_0x40c849,'label':_0x50ff4e?.[_0x53a777(0x1ad)]||_0x49a504,'uiId':_0x8012e3,'resourceId':_0x50ff4e?.[_0x53a777(0x17a)]},!0x1);}catch(_0x67a94d){this[_0x53a777(0x191)][_0x53a777(0x139)](_0x8012e3);if(!(_0x67a94d instanceof _0x492d6f&&_0x67a94d[_0x53a777(0x130)][_0x53a777(0x16b)](_0x53a777(0x1a9)))){const _0x580796=_0x2fea76[_0x53a777(0x132)](_0x67a94d[_0x53a777(0x1a8)])||_0x53a777(0x189),_0x3a55c1=new _0x492d6f(_0x580796,null,{'fileName':_0x49a504,..._0x67a94d});_0x3a55c1[_0x53a777(0x136)]=_0x67a94d[_0x53a777(0x136)],this[_0x53a777(0x197)](_0x53a777(0x18f),{'error':_0x3a55c1});}this[_0x53a777(0x1ac)](_0x8012e3);}}));}finally{this[_0x22a9fb(0x14c)](_0x488e49);}}[_0x215be7(0x1b8)](_0x370ea7){const _0x312383=_0x215be7;if(this[_0x312383(0x15e)]()||!this[_0x312383(0x18c)][_0x312383(0x13d)][_0x312383(0x15f)])return;const _0x3561c0={'type':_0x5672ff[_0x312383(0x138)],'uiId':_0x312383(0x1ba),'label':_0x370ea7,'isReadOnly':this[_0x312383(0x18d)][_0x312383(0x179)](_0x312383(0x1ba)),'hidden':this[_0x312383(0x18d)][_0x312383(0x179)](_0x312383(0x1ba))};this[_0x312383(0x156)](_0x3561c0);}async[_0x215be7(0x152)](_0x5e0bca,_0x1bde62,_0x582d8b,_0x330272){const _0x2c8101=_0x215be7,_0x5c0f68=this[_0x2c8101(0x1bb)][_0x2c8101(0x132)](_0x2c8101(0x1ba));if(_0x5c0f68&&_0x5e0bca){_0x5c0f68[_0x2c8101(0x13e)]=_0x330272?_0x330272[_0x2c8101(0x17f)](_0x57f52c=>({'start':_0x57f52c[_0x2c8101(0x15d)],'end':_0x57f52c[_0x2c8101(0x153)]})):[];try{if(_0x5c0f68[_0x2c8101(0x18a)]===_0x1bde62)return;const {id:_0x137811}=await this[_0x2c8101(0x19d)][_0x2c8101(0x15b)](this[_0x2c8101(0x17e)],_0x5e0bca,{'version':_0x1bde62,'sessionId':_0x582d8b})[_0x2c8101(0x1aa)]();_0x5c0f68['id']=_0x137811,_0x5c0f68[_0x2c8101(0x14a)]=_0x5e0bca,_0x5c0f68[_0x2c8101(0x18a)]=_0x1bde62,_0x5c0f68[_0x2c8101(0x18e)]=_0x582d8b;}catch(_0x315455){const _0x4b1ab9=new _0x492d6f(_0x2c8101(0x19b),null);_0x4b1ab9[_0x2c8101(0x136)]=_0x315455[_0x2c8101(0x136)],this[_0x2c8101(0x197)](_0x2c8101(0x18f),{'error':_0x4b1ab9});}}}[_0x215be7(0x184)](_0x591c56){const _0x3957ea=_0x215be7;this[_0x3957ea(0x156)]({'type':_0x5672ff[_0x3957ea(0x1c2)],'label':_0x591c56,'uiId':_0x3957ea(0x13e),'content':_0x591c56});}[_0x215be7(0x140)](){const _0x3d13f9=_0x215be7;this[_0x3d13f9(0x1ac)](_0x3d13f9(0x13e));}async[_0x215be7(0x19a)](_0x4ca1df,_0x381364){const _0x1dd4ed=_0x215be7,_0x2ee2c3=_0x1dd4ed(0x1b4)+_0x2913a4();this[_0x1dd4ed(0x165)](_0x2ee2c3);const _0x4f2eda=_0x1dd4ed(0x1b4)+_0x2913a4();try{this[_0x1dd4ed(0x156)]({'type':_0x5672ff[_0x1dd4ed(0x146)],'label':_0x381364?.[_0x1dd4ed(0x1ad)]||_0x4ca1df,'uiId':_0x4f2eda,'resourceId':_0x381364?.[_0x1dd4ed(0x17a)]},!0x0);const _0x579660=this[_0x1dd4ed(0x19d)][_0x1dd4ed(0x154)](this[_0x1dd4ed(0x17e)],_0x4ca1df,_0x381364);this[_0x1dd4ed(0x191)][_0x1dd4ed(0x169)](_0x4f2eda,_0x579660[_0x1dd4ed(0x145)]);const {id:_0x1a7324}=await _0x579660[_0x1dd4ed(0x1aa)]();this[_0x1dd4ed(0x191)][_0x1dd4ed(0x139)](_0x4f2eda),this[_0x1dd4ed(0x168)]({'type':_0x5672ff[_0x1dd4ed(0x146)],'id':_0x1a7324,'label':_0x381364?.[_0x1dd4ed(0x1ad)]||_0x4ca1df,'uiId':_0x4f2eda,'resourceId':_0x381364?.[_0x1dd4ed(0x17a)]},!0x1);}catch(_0x5a6c25){this[_0x1dd4ed(0x191)][_0x1dd4ed(0x139)](_0x4f2eda),(_0x5a6c25[_0x1dd4ed(0x130)][_0x1dd4ed(0x16b)](_0x1dd4ed(0x1a9))||this[_0x1dd4ed(0x197)](_0x1dd4ed(0x18f),{'error':new _0x492d6f(_0x1dd4ed(0x19e),this,{'url':_0x4ca1df,'originalError':_0x5a6c25}),'url':_0x4ca1df}),this[_0x1dd4ed(0x1ac)](_0x4f2eda));}finally{this[_0x1dd4ed(0x14c)](_0x2ee2c3);}}[_0x215be7(0x187)](_0x14ddab){const _0x533410=_0x215be7;_0x14ddab['id']=_0x14ddab['id']??_0x2913a4()[_0x533410(0x183)](0x0,0x15),this[_0x533410(0x1bb)][_0x533410(0x169)](_0x14ddab[_0x533410(0x1a7)],_0x14ddab),this[_0x533410(0x197)](_0x533410(0x190),{'contextItem':_0x14ddab,'isLoading':!0x1});}async[_0x215be7(0x160)](_0x157f77,_0x212da5,_0x54855a){const _0x1e2db5=_0x215be7,_0x4b120a=this[_0x1e2db5(0x18c)][_0x1e2db5(0x149)][_0x1e2db5(0x1a3)](_0x5c8b0a=>_0x5c8b0a['id']===_0x157f77);if(!_0x4b120a)return this[_0x1e2db5(0x197)](_0x1e2db5(0x18f),{'error':new _0x492d6f(_0x1e2db5(0x151),this,{'sourceId':_0x157f77}),'sourceId':_0x157f77}),[];try{const _0x390b1c=(await _0x4b120a[_0x1e2db5(0x148)](_0x212da5))[_0x1e2db5(0x17f)](_0x3a36d0=>{const _0x15b559=_0x1e2db5,_0xb2f7b2=this[_0x15b559(0x198)](_0x3a36d0['id']);return{..._0x3a36d0,'isInContext':_0xb2f7b2};});return _0x4b120a[_0x1e2db5(0x19f)]=_0x390b1c,this[_0x1e2db5(0x197)](_0x1e2db5(0x16e),{'sourceId':_0x157f77,'source':_0x4b120a,'resources':_0x390b1c,'uid':_0x54855a}),_0x390b1c;}catch(_0x174722){return this[_0x1e2db5(0x197)](_0x1e2db5(0x18f),{'error':new _0x492d6f(_0x1e2db5(0x1c3),this,{'sourceId':_0x157f77,'originalError':_0x174722}),'sourceId':_0x157f77,'sourceLabel':_0x4b120a[_0x1e2db5(0x1ad)]}),[];}}async[_0x215be7(0x143)](_0x5e20c9,_0x5e4ad4){const _0x4814af=_0x215be7;if(this[_0x4814af(0x198)](_0x5e4ad4['id']))return;let _0x16b0a9=_0x5e4ad4[_0x4814af(0x173)];if(!_0x16b0a9&&_0x5e20c9[_0x4814af(0x1c1)])try{_0x16b0a9=await _0x5e20c9[_0x4814af(0x1c1)](_0x5e4ad4['id']);}catch(_0x4fe844){return void this[_0x4814af(0x197)](_0x4814af(0x18f),{'error':new _0x492d6f(_0x4814af(0x1b5),this,{'resourceId':_0x5e4ad4['id'],'sourceId':_0x5e20c9['id'],'originalError':_0x4fe844}),'resourceId':_0x5e4ad4['id'],'sourceId':_0x5e20c9['id']});}if(_0x16b0a9)switch(_0x5e4ad4[_0x4814af(0x1b3)]){case _0x5672ff[_0x4814af(0x146)]:if(_0x4814af(0x15a)!=typeof _0x16b0a9)return void this[_0x4814af(0x197)](_0x4814af(0x18f),{'error':new _0x492d6f(_0x4814af(0x1a4),this,{'resourceId':_0x5e4ad4['id'],'sourceId':_0x5e20c9['id'],'expectedType':_0x4814af(0x15a),'actualType':typeof _0x16b0a9}),'resourceId':_0x5e4ad4['id'],'sourceId':_0x5e20c9['id']});await this[_0x4814af(0x19a)](_0x16b0a9,{'label':_0x5e4ad4[_0x4814af(0x1ad)],'resourceId':_0x5e4ad4['id']});break;case _0x5672ff[_0x4814af(0x17c)]:if(!(_0x16b0a9 instanceof File))return void this[_0x4814af(0x197)](_0x4814af(0x18f),{'error':new _0x492d6f(_0x4814af(0x1a4),this,{'resourceId':_0x5e4ad4['id'],'sourceId':_0x5e20c9['id'],'expectedType':_0x4814af(0x141),'actualType':typeof _0x16b0a9}),'resourceId':_0x5e4ad4['id'],'sourceId':_0x5e20c9['id']});await this[_0x4814af(0x1af)]([_0x16b0a9],{'label':_0x5e4ad4[_0x4814af(0x1ad)],'resourceId':_0x5e4ad4['id']});break;case _0x5672ff[_0x4814af(0x193)]:if(_0x4814af(0x1b1)!=typeof _0x16b0a9||!(_0x4814af(0x14a)in _0x16b0a9)||!(_0x4814af(0x1b3)in _0x16b0a9))return void this[_0x4814af(0x197)](_0x4814af(0x18f),{'error':new _0x492d6f(_0x4814af(0x1a4),this,{'resourceId':_0x5e4ad4['id'],'sourceId':_0x5e20c9['id'],'expectedType':_0x4814af(0x155),'actualType':typeof _0x16b0a9}),'resourceId':_0x5e4ad4['id'],'sourceId':_0x5e20c9['id']});_0x16b0a9=AIChatContext[_0x4814af(0x172)](_0x16b0a9,_0x5e4ad4[_0x4814af(0x1ad)]),await this[_0x4814af(0x1af)]([_0x16b0a9],{'label':_0x5e4ad4[_0x4814af(0x1ad)],'resourceId':_0x5e4ad4['id']},_0x5672ff[_0x4814af(0x193)]);break;case _0x5672ff[_0x4814af(0x166)]:break;default:this[_0x4814af(0x197)](_0x4814af(0x18f),{'error':new _0x492d6f(_0x4814af(0x167),this,{'resourceId':_0x5e4ad4['id'],'sourceId':_0x5e20c9['id'],'resourceType':_0x5e4ad4[_0x4814af(0x1b3)]}),'resourceId':_0x5e4ad4['id'],'sourceId':_0x5e20c9['id']});}else this[_0x4814af(0x197)](_0x4814af(0x18f),{'error':new _0x492d6f(_0x4814af(0x16d),this,{'resourceId':_0x5e4ad4['id'],'sourceId':_0x5e20c9['id']}),'resourceId':_0x5e4ad4['id'],'sourceId':_0x5e20c9['id']});}static[_0x215be7(0x172)](_0x2a83b4,_0x585752){const _0x4e9658=_0x215be7;switch(_0x2a83b4[_0x4e9658(0x1b3)]){case _0x5144de[_0x4e9658(0x163)]:return new File([_0x2a83b4[_0x4e9658(0x14a)]],_0x585752,{'type':_0x4e9658(0x1ae)});case _0x5144de[_0x4e9658(0x142)]:return new File([_0x2a83b4[_0x4e9658(0x14a)]],_0x585752,{'type':_0x4e9658(0x134)});default:return new File([_0x2a83b4[_0x4e9658(0x14a)]],_0x585752,{'type':_0x4e9658(0x17b)});}}static[_0x215be7(0x131)](_0x6dfd55){const _0x5f105f=_0x215be7;switch(_0x6dfd55[_0x5f105f(0x1b3)]){case _0x5672ff[_0x5f105f(0x17c)]:return{'type':_0x5672ff[_0x5f105f(0x17c)],'id':_0x6dfd55['id']};case _0x5672ff[_0x5f105f(0x146)]:return{'type':_0x5672ff[_0x5f105f(0x146)],'id':_0x6dfd55['id']};case _0x5672ff[_0x5f105f(0x138)]:return{'type':_0x5672ff[_0x5f105f(0x138)],'id':_0x6dfd55['id'],..._0x6dfd55[_0x5f105f(0x13e)]?.[_0x5f105f(0x194)]&&{'selection':_0x6dfd55[_0x5f105f(0x13e)]}};case _0x5672ff[_0x5f105f(0x193)]:return{'type':_0x5672ff[_0x5f105f(0x17c)],'id':_0x6dfd55['id']};case _0x5672ff[_0x5f105f(0x166)]:{const _0x459810=_0x6dfd55;return{'type':_0x5672ff[_0x5f105f(0x166)],'mcpServerName':_0x459810[_0x5f105f(0x174)],'toolName':_0x459810[_0x5f105f(0x14f)],'data':_0x459810[_0x5f105f(0x173)],'id':_0x459810['id']};}default:return null;}}[_0x215be7(0x156)](_0x42ec74,_0x3fc885=!0x1){const _0x282762=_0x215be7;if(this[_0x282762(0x1bb)][_0x282762(0x169)](_0x42ec74[_0x282762(0x1a7)],_0x42ec74),_0x42ec74[_0x282762(0x161)]||this[_0x282762(0x197)](_0x282762(0x190),{'contextItem':_0x42ec74,'isLoading':_0x3fc885}),_0x282762(0x1ba)===_0x42ec74[_0x282762(0x1a7)]&&this[_0x282762(0x178)](),_0x42ec74[_0x282762(0x17a)]){const _0x1ecf83=this[_0x282762(0x177)](_0x42ec74[_0x282762(0x17a)]);_0x1ecf83&&_0x1ecf83[_0x282762(0x182)](_0x2bae3e=>{const _0x2052e4=_0x282762;this[_0x2052e4(0x16f)](_0x2bae3e,_0x42ec74[_0x2052e4(0x17a)],!0x0);});}}[_0x215be7(0x1ac)](_0x4b133d){const _0x6e45ee=_0x215be7,_0x1ff4cc=this[_0x6e45ee(0x1bb)][_0x6e45ee(0x132)](_0x4b133d),_0x184f00=this[_0x6e45ee(0x191)][_0x6e45ee(0x132)](_0x4b133d);if(_0x184f00&&(_0x184f00[_0x6e45ee(0x18b)](),this[_0x6e45ee(0x191)][_0x6e45ee(0x139)](_0x4b133d)),_0x1ff4cc?.[_0x6e45ee(0x17a)]){const _0xd23d5e=this[_0x6e45ee(0x177)](_0x1ff4cc[_0x6e45ee(0x17a)]);_0xd23d5e&&_0xd23d5e[_0x6e45ee(0x182)](_0x44ade7=>{const _0x1d227f=_0x6e45ee;this[_0x1d227f(0x16f)](_0x44ade7,_0x1ff4cc[_0x1d227f(0x17a)],!0x1);});}this[_0x6e45ee(0x1bb)][_0x6e45ee(0x139)](_0x4b133d),this[_0x6e45ee(0x197)](_0x6e45ee(0x181),{'uiId':_0x4b133d,'type':_0x1ff4cc?.[_0x6e45ee(0x1b3)]}),_0x6e45ee(0x1ba)===_0x4b133d&&this[_0x6e45ee(0x178)]();}[_0x215be7(0x168)](_0x264b50,_0x5a41fd){const _0x29a491=_0x215be7;if(this[_0x29a491(0x1bb)][_0x29a491(0x179)](_0x264b50[_0x29a491(0x1a7)])&&(this[_0x29a491(0x1bb)][_0x29a491(0x169)](_0x264b50[_0x29a491(0x1a7)],_0x264b50),this[_0x29a491(0x197)](_0x29a491(0x196),{'contextItem':_0x264b50,'isLoading':_0x5a41fd}),_0x264b50[_0x29a491(0x17a)])){const _0x3d3e9d=this[_0x29a491(0x177)](_0x264b50[_0x29a491(0x17a)]);_0x3d3e9d&&_0x3d3e9d[_0x29a491(0x182)](_0x2c2c3c=>{const _0x23542b=_0x29a491;this[_0x23542b(0x16f)](_0x2c2c3c,_0x264b50[_0x23542b(0x17a)],!0x0);});}}[_0x215be7(0x150)](_0x99cefa){const _0x3a5dcd=_0x215be7;this[_0x3a5dcd(0x18d)][_0x3a5dcd(0x169)](_0x99cefa[_0x3a5dcd(0x1a7)],_0x99cefa);}[_0x215be7(0x159)](){const _0x2bb8cd=_0x215be7;this[_0x2bb8cd(0x18c)]={'document':{'enabled':!0x1!==this[_0x2bb8cd(0x1b6)]?.[_0x2bb8cd(0x13d)]?.[_0x2bb8cd(0x15f)],'isHidden':!0x1},'urls':{'enabled':!0x1!==this[_0x2bb8cd(0x1b6)]?.[_0x2bb8cd(0x195)]?.[_0x2bb8cd(0x15f)]},'files':{'enabled':!0x1!==this[_0x2bb8cd(0x1b6)]?.[_0x2bb8cd(0x171)]?.[_0x2bb8cd(0x15f)]},'sources':this[_0x2bb8cd(0x1a2)](),'customItems':this[_0x2bb8cd(0x1b6)]?.[_0x2bb8cd(0x15c)]?.[_0x2bb8cd(0x17f)](_0x4daef1=>({..._0x4daef1,'enabled':!0x0}))??[]},this[_0x2bb8cd(0x197)](_0x2bb8cd(0x1a5),{'options':this[_0x2bb8cd(0x18c)]});}[_0x215be7(0x1a2)](){const _0x35b4f6=_0x215be7;return this[_0x35b4f6(0x1b6)]?.[_0x35b4f6(0x149)]?.[_0x35b4f6(0x17f)](_0x57f200=>({..._0x57f200,'resources':[]}))??[];}[_0x215be7(0x178)](){const _0x2d94fc=_0x215be7,_0x5c20ed=this[_0x2d94fc(0x15e)]()||this[_0x2d94fc(0x14b)]();this[_0x2d94fc(0x18c)][_0x2d94fc(0x13d)][_0x2d94fc(0x1ab)]=_0x5c20ed,this[_0x2d94fc(0x197)](_0x2d94fc(0x1a5),{'options':this[_0x2d94fc(0x18c)]});}[_0x215be7(0x198)](_0x1d915e){const _0x3a8d2d=_0x215be7;for(const _0x16c7a6 of this[_0x3a8d2d(0x1bb)][_0x3a8d2d(0x147)]())if(_0x16c7a6[_0x3a8d2d(0x17a)]===_0x1d915e)return!0x0;for(const _0x113dae of this[_0x3a8d2d(0x18d)][_0x3a8d2d(0x147)]())if(_0x113dae[_0x3a8d2d(0x17a)]===_0x1d915e)return!0x0;return!0x1;}[_0x215be7(0x177)](_0x3f1770){const _0x2b52b4=_0x215be7,_0x606c61=[];for(const _0x520a74 of this[_0x2b52b4(0x18c)][_0x2b52b4(0x149)]){_0x520a74[_0x2b52b4(0x19f)][_0x2b52b4(0x1a3)](_0xd43104=>_0xd43104['id']===_0x3f1770)&&_0x606c61[_0x2b52b4(0x1bd)](_0x520a74['id']);}return 0x0===_0x606c61[_0x2b52b4(0x194)]?null:_0x606c61;}[_0x215be7(0x16f)](_0xda2daf,_0x23e21c,_0x1993bb){const _0x15717e=_0x215be7,_0x2870d4=this[_0x15717e(0x18c)][_0x15717e(0x149)][_0x15717e(0x1a3)](_0x750952=>_0x750952['id']===_0xda2daf);if(!_0x2870d4)return;const _0x1a865d=_0x2870d4[_0x15717e(0x19f)][_0x15717e(0x1a3)](_0x16ddfd=>_0x16ddfd['id']===_0x23e21c);_0x1a865d&&(_0x1a865d[_0x15717e(0x192)]=_0x1993bb,this[_0x15717e(0x197)](_0x15717e(0x157),{'sourceId':_0xda2daf,'resourceId':_0x23e21c,'isInContext':_0x1993bb}));}[_0x215be7(0x165)](_0x54114d){const _0x475827=_0x215be7;this[_0x475827(0x133)][_0x475827(0x169)](_0x54114d,!0x0),this[_0x475827(0x133)][_0x475827(0x162)]&&this[_0x475827(0x197)](_0x475827(0x13f),{'isUploadInProgress':!0x0});}[_0x215be7(0x14c)](_0x5aa3cf){const _0x42d25e=_0x215be7;this[_0x42d25e(0x133)][_0x42d25e(0x139)](_0x5aa3cf),0x0===this[_0x42d25e(0x133)][_0x42d25e(0x162)]&&this[_0x42d25e(0x197)](_0x42d25e(0x13f),{'isUploadInProgress':!0x1});}}function _0x4d43(){const _0x722e24=['ai-chat-context-invalid-data','addContextOptionsChanged','populateFromMessage','uiId','code','ai-request-aborted','getId','isHidden','_removeContextItem','label','text/markdown','addFilesToContext','174HxKOOA','object','attributes','type','url-','ai-chat-resource-load-failed','_config','getSentContextItems','addCurrentDocumentToContext','all','current-document','_pendingContextItems','removeFromContext','push','mapContextItemsToRequestData','fetchDocument','isReadOnly','getData','SELECTION','ai-chat-source-resources-load-failed','message','_mapContextItemToRequestData','get','_ongoingUploadOperations','text/html','84637SxlOQg','stack','Current\x20document','DOCUMENT','delete','addToConversationContext','382822jBSinQ','176248CsKUCx','document','selection','uploadProgressChanged','removeSelectionFromContext','File','HTML','addResourceToContext','getPendingContextItems','abortController','URL','values','getResources','sources','content','isCurrentDocumentInConversation','_finishUploadOperation','from','uploadFile','toolName','_addToConversationContextItem','ai-chat-source-not-found','updateCurrentDocument','end','uploadUrl','object\x20with\x20content\x20and\x20type\x20properties','_addContextItem','resourceStateChanged','1089270LSnLHT','_setAddContextOptionsDefaultState','string','uploadDocument','customItems','start','isCurrentDocumentInContext','enabled','loadSourceResources','hidden','size','MARKDOWN','clearPendingContextItems','_startUploadOperation','TOOL','ai-chat-context-unsupported-type','_finishContextItemLoading','set','_createContextItemFromContent','startsWith','1613650CfuNAt','ai-chat-resource-no-data','sourceResourcesLoaded','_updateResourceInContextState','name','files','_convertTextResourceToFile','data','mcpServerName','isSelectionInContext','36864HbEeUC','_findSourceIdsByResourceId','_toggleAddCurrentDocumentOptionVisibility','has','resourceId','text/plain','FILE','filter','_ownerId','map','file-','contextItemRemoved','forEach','substring','addSelectionToContext','110373qldNOT','files-','addToolItemToContext','init','ai-chat-file-upload-failed','version','abort','_addContextOptionsState','_conversationContextItems','sessionId','error','contextItemAdded','_ongoingUploads','isInContext','TEXT','length','urls','contextItemLoadingEnded','fire','_isResourceInContext','getDocument','addUrlToContext','ai-chat-document-upload-failed','url','_connector','ai-chat-url-upload-failed','resources','contextSent','1736OWIJDV','_getCustomSourcesInitialState','find'];_0x4d43=function(){return _0x722e24;};return _0x4d43();}
23
+ function _0x1848(){const _0xb22fd4=['60yyuTAh','URL','type','filter','text/html','_ownerId','files-','_mapContextItemToRequestData','isHidden','delete','getResources','_getCustomSourcesInitialState','attributes','get','code','Current\x20document','url-','_createContextItemFromContent','_addToConversationContextItem','mapContextItemsToRequestData','_ongoingUploadOperations','text/markdown','addCurrentDocumentToContext','sources','ai-chat-resource-load-failed','uploadDocument','_config','removeSelectionFromContext','fire','TOOL','8AJBQCx','ai-chat-context-invalid-data','substring','mcpServerName','HTML','object','addUrlToContext','clearPendingContextItems','abortController','contextSent','isCurrentDocumentInConversation','2347383MRzYAt','26630tnVTuU','document','ai-chat-url-upload-failed','1433061WAdiqP','end','name','4628796JJdYtD','_findSourceIdsByResourceId','push','file-','_finishUploadOperation','updateCurrentDocument','selection','current-document','urls','set','_ongoingUploads','MARKDOWN','url','_setAddContextOptionsDefaultState','find','data','from','addFilesToContext','ai-request-aborted','resources','resourceStateChanged','contextItemRemoved','_pendingContextItems','has','sessionId','files','uploadProgressChanged','resourceId','removeFromContext','length','SELECTION','ai-chat-resource-no-data','toolName','populateFromMessage','_addContextItem','FILE','addSelectionToContext','enabled','addToConversationContext','start','_finishContextItemLoading','_connector','addContextOptionsChanged','customItems','getSentContextItems','_startUploadOperation','values','isReadOnly','message','694296sjvLyq','13722720rUUSrA','forEach','isSelectionInContext','getDocument','_addContextOptionsState','sourceResourcesLoaded','TEXT','File','_conversationContextItems','uploadUrl','string','ai-chat-document-upload-failed','DOCUMENT','getId','_convertTextResourceToFile','addToolItemToContext','_updateResourceInContextState','uiId','1521mcgSQi','ai-chat-file-upload-failed','contextItemAdded','all','isCurrentDocumentInContext','loadSourceResources','version','_toggleAddCurrentDocumentOptionVisibility','contextItemLoadingEnded','hidden','size','startsWith','map','_isResourceInContext','getData','addResourceToContext','content','_removeContextItem','object\x20with\x20content\x20and\x20type\x20properties','abort','isInContext','getPendingContextItems','ai-chat-context-unsupported-type','ai-chat-source-not-found','init','uploadFile','ai-chat-source-resources-load-failed','4HSLdFf','text/plain','stack','fetchDocument','5409019edBdUu','label','error'];_0x1848=function(){return _0xb22fd4;};return _0x1848();}const _0x515cfc=_0x30da;(function(_0x20adcc,_0x2d4254){const _0x5adbce=_0x30da,_0x48c127=_0x20adcc();while(!![]){try{const _0x1178dd=parseInt(_0x5adbce(0x1d4))/0x1+-parseInt(_0x5adbce(0x236))/0x2*(parseInt(_0x5adbce(0x1d0))/0x3)+parseInt(_0x5adbce(0x1d7))/0x4+-parseInt(_0x5adbce(0x23d))/0x5*(-parseInt(_0x5adbce(0x208))/0x6)+-parseInt(_0x5adbce(0x23a))/0x7*(parseInt(_0x5adbce(0x25b))/0x8)+parseInt(_0x5adbce(0x21b))/0x9*(parseInt(_0x5adbce(0x1d1))/0xa)+-parseInt(_0x5adbce(0x209))/0xb;if(_0x1178dd===_0x2d4254)break;else _0x48c127['push'](_0x48c127['shift']());}catch(_0x4d0c8e){_0x48c127['push'](_0x48c127['shift']());}}}(_0x1848,0xcdfdc));import{CKEditorError as _0x2bede4,ObservableMixin as _0x5775fb,uid as _0x12b84c}from'ckeditor5/src/utils.js';import{AIContextItemType as _0x25f048,AIContextTextResourceType as _0x56f282}from'../../aicore/model/aicontext.js';import{escape as _0x3f20d6}from'es-toolkit/compat';function _0x30da(_0x1b15ae,_0x59e35b){const _0x1848f4=_0x1848();return _0x30da=function(_0x30daaf,_0x46de11){_0x30daaf=_0x30daaf-0x1c6;let _0x23cde6=_0x1848f4[_0x30daaf];return _0x23cde6;},_0x30da(_0x1b15ae,_0x59e35b);}import{errorsMap as _0x40ff63}from'../../errorsmap.js';export const AI_CONTEXT_MODEL_EVENT_NAMES=[_0x515cfc(0x21d),_0x515cfc(0x1ec),_0x515cfc(0x223),_0x515cfc(0x1ce),_0x515cfc(0x23c),_0x515cfc(0x201),_0x515cfc(0x20e),_0x515cfc(0x1eb),_0x515cfc(0x1f1)];export class AIChatContext extends _0x5775fb(){[_0x515cfc(0x200)];[_0x515cfc(0x257)];[_0x515cfc(0x242)];constructor({connector:_0x1f3030,config:_0x35b4c8,ownerId:_0x20a00d}){const _0x550dbf=_0x515cfc;super(),this[_0x550dbf(0x200)]=_0x1f3030,this[_0x550dbf(0x257)]=_0x35b4c8,this[_0x550dbf(0x242)]=_0x20a00d;}[_0x515cfc(0x233)](){const _0x41bf08=_0x515cfc;this[_0x41bf08(0x1ed)]=new Map(),this[_0x41bf08(0x211)]=new Map(),this[_0x41bf08(0x1e1)]=new Map(),this[_0x41bf08(0x251)]=new Map(),this[_0x41bf08(0x1e4)]();}[_0x515cfc(0x230)](){const _0x5c0317=_0x515cfc;return this[_0x5c0317(0x1ed)];}async[_0x515cfc(0x1f8)](_0x2a8031){const _0x598a95=_0x515cfc,_0x24cb63=await this[_0x598a95(0x24e)](_0x2a8031);return this[_0x598a95(0x24f)](_0x24cb63),_0x598a95(0x1de)===_0x24cb63[_0x598a95(0x21a)]&&this[_0x598a95(0x222)](),_0x24cb63;}async[_0x515cfc(0x24e)](_0xd3223d){const _0x4678e6=_0x515cfc;if(_0xd3223d[_0x4678e6(0x23f)]===_0x25f048[_0x4678e6(0x215)]){const _0x52ae49=await this[_0x4678e6(0x200)][_0x4678e6(0x239)](this[_0x4678e6(0x242)],_0xd3223d['id'])[_0x4678e6(0x20c)]();return{'id':_0x4678e6(0x1de),'uiId':_0x4678e6(0x1de),'label':_0x4678e6(0x24c),'type':_0xd3223d[_0x4678e6(0x23f)],'content':_0x52ae49[_0x4678e6(0x22b)],'hidden':this[_0x4678e6(0x211)][_0x4678e6(0x1ee)](_0x4678e6(0x1de)),'version':_0x52ae49[_0x4678e6(0x249)]?.[_0x4678e6(0x221)],'sessionId':_0x52ae49[_0x4678e6(0x249)]?.[_0x4678e6(0x1ef)]};}if(_0xd3223d[_0x4678e6(0x23f)]===_0x25f048[_0x4678e6(0x25a)])return{'id':_0xd3223d['id'],'uiId':_0xd3223d['id'],'label':_0xd3223d[_0x4678e6(0x1e6)]?.[_0x4678e6(0x23b)]||_0xd3223d['id'],'type':_0x25f048[_0x4678e6(0x25a)],'mcpServerName':_0xd3223d[_0x4678e6(0x1c8)],'toolName':_0xd3223d[_0x4678e6(0x1f7)],'data':_0xd3223d[_0x4678e6(0x1e6)]||{}};return{'id':_0xd3223d['id'],'uiId':_0xd3223d['id'],'label':_0xd3223d[_0x4678e6(0x249)]?.[_0x4678e6(0x23b)]||_0xd3223d[_0x4678e6(0x1d6)]||_0xd3223d[_0x4678e6(0x1e3)]||_0xd3223d['id'],'type':_0xd3223d[_0x4678e6(0x23f)],..._0xd3223d?.[_0x4678e6(0x249)]?.[_0x4678e6(0x1f2)]?{'resourceId':_0xd3223d[_0x4678e6(0x249)]?.[_0x4678e6(0x1f2)]}:{}};}[_0x515cfc(0x203)](){const _0x8f8279=_0x515cfc;return new Map(this[_0x8f8279(0x211)]);}[_0x515cfc(0x1f3)](_0x367e6b){const _0x136e3f=_0x515cfc,_0x2cf9f6=this[_0x136e3f(0x1ed)][_0x136e3f(0x24a)](_0x367e6b);_0x2cf9f6?.[_0x136e3f(0x206)]||this[_0x136e3f(0x22c)](_0x367e6b);}[_0x515cfc(0x1cc)](){const _0x33c9bc=_0x515cfc;if(0x0===this[_0x33c9bc(0x1ed)][_0x33c9bc(0x225)])return;for(const _0x23a8af of this[_0x33c9bc(0x1ed)][_0x33c9bc(0x205)]())this[_0x33c9bc(0x22c)](_0x23a8af[_0x33c9bc(0x21a)]);const _0x8a83d0=this[_0x33c9bc(0x211)][_0x33c9bc(0x24a)](_0x33c9bc(0x1de))||this[_0x33c9bc(0x1ed)][_0x33c9bc(0x24a)](_0x33c9bc(0x1de));_0x8a83d0&&this[_0x33c9bc(0x1f9)]({..._0x8a83d0,'isReadOnly':!0x0,'hidden':!0x0});}[_0x515cfc(0x1fd)](_0x4cd5e1){const _0xc9ef1c=_0x515cfc;for(const _0x27ccd9 of _0x4cd5e1[_0xc9ef1c(0x205)]())this[_0xc9ef1c(0x24f)](_0x27ccd9);this[_0xc9ef1c(0x1cc)](),this[_0xc9ef1c(0x259)](_0xc9ef1c(0x1ce),{'contextItems':Array[_0xc9ef1c(0x1e7)](this[_0xc9ef1c(0x203)]()[_0xc9ef1c(0x205)]())});}[_0x515cfc(0x21f)](){const _0xcc3388=_0x515cfc;return this[_0xcc3388(0x1ed)][_0xcc3388(0x1ee)](_0xcc3388(0x1de));}[_0x515cfc(0x20b)](){const _0x47677b=_0x515cfc;return this[_0x47677b(0x1ed)][_0x47677b(0x1ee)](_0x47677b(0x1dd));}[_0x515cfc(0x1cf)](){const _0x55506a=_0x515cfc;return this[_0x55506a(0x211)][_0x55506a(0x1ee)](_0x55506a(0x1de));}static[_0x515cfc(0x250)](_0x5adccc){const _0x2d627d=_0x515cfc;return Array[_0x2d627d(0x1e7)](_0x5adccc[_0x2d627d(0x205)]())[_0x2d627d(0x227)](_0x2ede17=>this[_0x2d627d(0x244)](_0x2ede17))[_0x2d627d(0x240)](_0x2b4a32=>null!==_0x2b4a32);}async[_0x515cfc(0x1e8)](_0x4bd081,_0x561036,_0xe5f7cf=_0x25f048[_0x515cfc(0x1fa)]){const _0x1cacae=_0x515cfc,_0x38c27c=_0x1cacae(0x243)+_0x12b84c();this[_0x1cacae(0x204)](_0x38c27c);try{await Promise[_0x1cacae(0x21e)](_0x4bd081[_0x1cacae(0x227)](async _0x2c3c61=>{const _0x2eaec4=_0x1cacae,_0xe0a02a=_0x2eaec4(0x1da)+_0x12b84c(),_0x479421=_0x3f20d6(_0x2c3c61[_0x2eaec4(0x1d6)]);try{this[_0x2eaec4(0x1f9)]({'type':_0xe5f7cf,'label':_0x561036?.[_0x2eaec4(0x23b)]||_0x479421,'uiId':_0xe0a02a,'resourceId':_0x561036?.[_0x2eaec4(0x1f2)]},!0x0);const _0x5054bf=this[_0x2eaec4(0x200)][_0x2eaec4(0x234)](this[_0x2eaec4(0x242)],_0x2c3c61,_0x561036);this[_0x2eaec4(0x1e1)][_0x2eaec4(0x1e0)](_0xe0a02a,_0x5054bf[_0x2eaec4(0x1cd)]);const {id:_0x2b2481}=await _0x5054bf[_0x2eaec4(0x216)]();this[_0x2eaec4(0x1e1)][_0x2eaec4(0x246)](_0xe0a02a),this[_0x2eaec4(0x1ff)]({'type':_0xe5f7cf,'id':_0x2b2481,'label':_0x561036?.[_0x2eaec4(0x23b)]||_0x479421,'uiId':_0xe0a02a,'resourceId':_0x561036?.[_0x2eaec4(0x1f2)]},!0x1);}catch(_0x1ea610){this[_0x2eaec4(0x1e1)][_0x2eaec4(0x246)](_0xe0a02a);if(!(_0x1ea610 instanceof _0x2bede4&&_0x1ea610[_0x2eaec4(0x207)][_0x2eaec4(0x226)](_0x2eaec4(0x1e9)))){const _0x3b8978=_0x40ff63[_0x2eaec4(0x24a)](_0x1ea610[_0x2eaec4(0x24b)])||_0x2eaec4(0x21c),_0x1acc1a=new _0x2bede4(_0x3b8978,null,{'fileName':_0x479421,..._0x1ea610});_0x1acc1a[_0x2eaec4(0x238)]=_0x1ea610[_0x2eaec4(0x238)],this[_0x2eaec4(0x259)](_0x2eaec4(0x23c),{'error':_0x1acc1a});}this[_0x2eaec4(0x22c)](_0xe0a02a);}}));}finally{this[_0x1cacae(0x1db)](_0x38c27c);}}[_0x515cfc(0x253)](_0x34330b){const _0x2d0653=_0x515cfc;if(this[_0x2d0653(0x21f)]()||!this[_0x2d0653(0x20d)][_0x2d0653(0x1d2)][_0x2d0653(0x1fc)])return;const _0x47ebe5={'type':_0x25f048[_0x2d0653(0x215)],'uiId':_0x2d0653(0x1de),'label':_0x34330b,'isReadOnly':this[_0x2d0653(0x211)][_0x2d0653(0x1ee)](_0x2d0653(0x1de)),'hidden':this[_0x2d0653(0x211)][_0x2d0653(0x1ee)](_0x2d0653(0x1de))};this[_0x2d0653(0x1f9)](_0x47ebe5);}async[_0x515cfc(0x1dc)](_0x397a65,_0x4f64b8,_0x1cc29e,_0x5b135b){const _0x14dbb6=_0x515cfc,_0x2aa5d5=this[_0x14dbb6(0x1ed)][_0x14dbb6(0x24a)](_0x14dbb6(0x1de));if(_0x2aa5d5&&_0x397a65){_0x2aa5d5[_0x14dbb6(0x1dd)]=_0x5b135b?_0x5b135b[_0x14dbb6(0x227)](_0x5f2f04=>({'start':_0x5f2f04[_0x14dbb6(0x1fe)],'end':_0x5f2f04[_0x14dbb6(0x1d5)]})):[];try{if(_0x2aa5d5[_0x14dbb6(0x221)]===_0x4f64b8)return;const {id:_0x32adca}=await this[_0x14dbb6(0x200)][_0x14dbb6(0x256)](this[_0x14dbb6(0x242)],_0x397a65,{'version':_0x4f64b8,'sessionId':_0x1cc29e})[_0x14dbb6(0x216)]();_0x2aa5d5['id']=_0x32adca,_0x2aa5d5[_0x14dbb6(0x22b)]=_0x397a65,_0x2aa5d5[_0x14dbb6(0x221)]=_0x4f64b8,_0x2aa5d5[_0x14dbb6(0x1ef)]=_0x1cc29e;}catch(_0x49a3e2){const _0x375d01=new _0x2bede4(_0x14dbb6(0x214),null);_0x375d01[_0x14dbb6(0x238)]=_0x49a3e2[_0x14dbb6(0x238)],this[_0x14dbb6(0x259)](_0x14dbb6(0x23c),{'error':_0x375d01});}}}[_0x515cfc(0x1fb)](_0x29837e){const _0x17c841=_0x515cfc;this[_0x17c841(0x1f9)]({'type':_0x25f048[_0x17c841(0x1f5)],'label':_0x29837e,'uiId':_0x17c841(0x1dd),'content':_0x29837e});}[_0x515cfc(0x258)](){const _0x32fded=_0x515cfc;this[_0x32fded(0x22c)](_0x32fded(0x1dd));}async[_0x515cfc(0x1cb)](_0x45eafd,_0x5acf40){const _0xfdab0b=_0x515cfc,_0x274b54=_0xfdab0b(0x24d)+_0x12b84c();this[_0xfdab0b(0x204)](_0x274b54);const _0x3416a5=_0xfdab0b(0x24d)+_0x12b84c();try{this[_0xfdab0b(0x1f9)]({'type':_0x25f048[_0xfdab0b(0x23e)],'label':_0x5acf40?.[_0xfdab0b(0x23b)]||_0x45eafd,'uiId':_0x3416a5,'resourceId':_0x5acf40?.[_0xfdab0b(0x1f2)]},!0x0);const _0x313a4a=this[_0xfdab0b(0x200)][_0xfdab0b(0x212)](this[_0xfdab0b(0x242)],_0x45eafd,_0x5acf40);this[_0xfdab0b(0x1e1)][_0xfdab0b(0x1e0)](_0x3416a5,_0x313a4a[_0xfdab0b(0x1cd)]);const {id:_0x36bf31}=await _0x313a4a[_0xfdab0b(0x216)]();this[_0xfdab0b(0x1e1)][_0xfdab0b(0x246)](_0x3416a5),this[_0xfdab0b(0x1ff)]({'type':_0x25f048[_0xfdab0b(0x23e)],'id':_0x36bf31,'label':_0x5acf40?.[_0xfdab0b(0x23b)]||_0x45eafd,'uiId':_0x3416a5,'resourceId':_0x5acf40?.[_0xfdab0b(0x1f2)]},!0x1);}catch(_0x1dfdbc){this[_0xfdab0b(0x1e1)][_0xfdab0b(0x246)](_0x3416a5),(_0x1dfdbc[_0xfdab0b(0x207)][_0xfdab0b(0x226)](_0xfdab0b(0x1e9))||this[_0xfdab0b(0x259)](_0xfdab0b(0x23c),{'error':new _0x2bede4(_0xfdab0b(0x1d3),this,{'url':_0x45eafd,'originalError':_0x1dfdbc}),'url':_0x45eafd}),this[_0xfdab0b(0x22c)](_0x3416a5));}finally{this[_0xfdab0b(0x1db)](_0x274b54);}}[_0x515cfc(0x218)](_0x570115){const _0x5a9a00=_0x515cfc;_0x570115['id']=_0x570115['id']??_0x12b84c()[_0x5a9a00(0x1c7)](0x0,0x15),this[_0x5a9a00(0x1ed)][_0x5a9a00(0x1e0)](_0x570115[_0x5a9a00(0x21a)],_0x570115),this[_0x5a9a00(0x259)](_0x5a9a00(0x21d),{'contextItem':_0x570115,'isLoading':!0x1});}async[_0x515cfc(0x220)](_0x10e160,_0x109daa,_0x27373c){const _0x2d79a7=_0x515cfc,_0x331615=this[_0x2d79a7(0x20d)][_0x2d79a7(0x254)][_0x2d79a7(0x1e5)](_0x178f03=>_0x178f03['id']===_0x10e160);if(!_0x331615)return this[_0x2d79a7(0x259)](_0x2d79a7(0x23c),{'error':new _0x2bede4(_0x2d79a7(0x232),this,{'sourceId':_0x10e160}),'sourceId':_0x10e160}),[];try{const _0x2bb7ef=(await _0x331615[_0x2d79a7(0x247)](_0x109daa))[_0x2d79a7(0x227)](_0xd52f8c=>{const _0x268609=_0x2d79a7,_0x48e7e7=this[_0x268609(0x228)](_0xd52f8c['id']);return{..._0xd52f8c,'isInContext':_0x48e7e7};});return _0x331615[_0x2d79a7(0x1ea)]=_0x2bb7ef,this[_0x2d79a7(0x259)](_0x2d79a7(0x20e),{'sourceId':_0x10e160,'source':_0x331615,'resources':_0x2bb7ef,'uid':_0x27373c}),_0x2bb7ef;}catch(_0x2746ec){return this[_0x2d79a7(0x259)](_0x2d79a7(0x23c),{'error':new _0x2bede4(_0x2d79a7(0x235),this,{'sourceId':_0x10e160,'originalError':_0x2746ec}),'sourceId':_0x10e160,'sourceLabel':_0x331615[_0x2d79a7(0x23b)]}),[];}}async[_0x515cfc(0x22a)](_0x2349a3,_0x496e1e){const _0x545f63=_0x515cfc;if(this[_0x545f63(0x228)](_0x496e1e['id']))return;let _0x3899e6=_0x496e1e[_0x545f63(0x1e6)];if(!_0x3899e6&&_0x2349a3[_0x545f63(0x229)])try{_0x3899e6=await _0x2349a3[_0x545f63(0x229)](_0x496e1e['id']);}catch(_0x4f2abe){return void this[_0x545f63(0x259)](_0x545f63(0x23c),{'error':new _0x2bede4(_0x545f63(0x255),this,{'resourceId':_0x496e1e['id'],'sourceId':_0x2349a3['id'],'originalError':_0x4f2abe}),'resourceId':_0x496e1e['id'],'sourceId':_0x2349a3['id']});}if(_0x3899e6)switch(_0x496e1e[_0x545f63(0x23f)]){case _0x25f048[_0x545f63(0x23e)]:if(_0x545f63(0x213)!=typeof _0x3899e6)return void this[_0x545f63(0x259)](_0x545f63(0x23c),{'error':new _0x2bede4(_0x545f63(0x1c6),this,{'resourceId':_0x496e1e['id'],'sourceId':_0x2349a3['id'],'expectedType':_0x545f63(0x213),'actualType':typeof _0x3899e6}),'resourceId':_0x496e1e['id'],'sourceId':_0x2349a3['id']});await this[_0x545f63(0x1cb)](_0x3899e6,{'label':_0x496e1e[_0x545f63(0x23b)],'resourceId':_0x496e1e['id']});break;case _0x25f048[_0x545f63(0x1fa)]:if(!(_0x3899e6 instanceof File))return void this[_0x545f63(0x259)](_0x545f63(0x23c),{'error':new _0x2bede4(_0x545f63(0x1c6),this,{'resourceId':_0x496e1e['id'],'sourceId':_0x2349a3['id'],'expectedType':_0x545f63(0x210),'actualType':typeof _0x3899e6}),'resourceId':_0x496e1e['id'],'sourceId':_0x2349a3['id']});await this[_0x545f63(0x1e8)]([_0x3899e6],{'label':_0x496e1e[_0x545f63(0x23b)],'resourceId':_0x496e1e['id']});break;case _0x25f048[_0x545f63(0x20f)]:if(_0x545f63(0x1ca)!=typeof _0x3899e6||!(_0x545f63(0x22b)in _0x3899e6)||!(_0x545f63(0x23f)in _0x3899e6))return void this[_0x545f63(0x259)](_0x545f63(0x23c),{'error':new _0x2bede4(_0x545f63(0x1c6),this,{'resourceId':_0x496e1e['id'],'sourceId':_0x2349a3['id'],'expectedType':_0x545f63(0x22d),'actualType':typeof _0x3899e6}),'resourceId':_0x496e1e['id'],'sourceId':_0x2349a3['id']});_0x3899e6=AIChatContext[_0x545f63(0x217)](_0x3899e6,_0x496e1e[_0x545f63(0x23b)]),await this[_0x545f63(0x1e8)]([_0x3899e6],{'label':_0x496e1e[_0x545f63(0x23b)],'resourceId':_0x496e1e['id']},_0x25f048[_0x545f63(0x20f)]);break;case _0x25f048[_0x545f63(0x25a)]:break;default:this[_0x545f63(0x259)](_0x545f63(0x23c),{'error':new _0x2bede4(_0x545f63(0x231),this,{'resourceId':_0x496e1e['id'],'sourceId':_0x2349a3['id'],'resourceType':_0x496e1e[_0x545f63(0x23f)]}),'resourceId':_0x496e1e['id'],'sourceId':_0x2349a3['id']});}else this[_0x545f63(0x259)](_0x545f63(0x23c),{'error':new _0x2bede4(_0x545f63(0x1f6),this,{'resourceId':_0x496e1e['id'],'sourceId':_0x2349a3['id']}),'resourceId':_0x496e1e['id'],'sourceId':_0x2349a3['id']});}static[_0x515cfc(0x217)](_0x50b440,_0xe61f61){const _0x453b2c=_0x515cfc;switch(_0x50b440[_0x453b2c(0x23f)]){case _0x56f282[_0x453b2c(0x1e2)]:return new File([_0x50b440[_0x453b2c(0x22b)]],_0xe61f61,{'type':_0x453b2c(0x252)});case _0x56f282[_0x453b2c(0x1c9)]:return new File([_0x50b440[_0x453b2c(0x22b)]],_0xe61f61,{'type':_0x453b2c(0x241)});default:return new File([_0x50b440[_0x453b2c(0x22b)]],_0xe61f61,{'type':_0x453b2c(0x237)});}}static[_0x515cfc(0x244)](_0x110c67){const _0x3ea454=_0x515cfc;switch(_0x110c67[_0x3ea454(0x23f)]){case _0x25f048[_0x3ea454(0x1fa)]:return{'type':_0x25f048[_0x3ea454(0x1fa)],'id':_0x110c67['id']};case _0x25f048[_0x3ea454(0x23e)]:return{'type':_0x25f048[_0x3ea454(0x23e)],'id':_0x110c67['id']};case _0x25f048[_0x3ea454(0x215)]:return{'type':_0x25f048[_0x3ea454(0x215)],'id':_0x110c67['id'],..._0x110c67[_0x3ea454(0x1dd)]?.[_0x3ea454(0x1f4)]&&{'selection':_0x110c67[_0x3ea454(0x1dd)]}};case _0x25f048[_0x3ea454(0x20f)]:return{'type':_0x25f048[_0x3ea454(0x1fa)],'id':_0x110c67['id']};case _0x25f048[_0x3ea454(0x25a)]:{const _0x1de2f8=_0x110c67;return{'type':_0x25f048[_0x3ea454(0x25a)],'mcpServerName':_0x1de2f8[_0x3ea454(0x1c8)],'toolName':_0x1de2f8[_0x3ea454(0x1f7)],'data':_0x1de2f8[_0x3ea454(0x1e6)],'id':_0x1de2f8['id']};}default:return null;}}[_0x515cfc(0x1f9)](_0x26e45a,_0x3e4f3d=!0x1){const _0x565d48=_0x515cfc;if(this[_0x565d48(0x1ed)][_0x565d48(0x1e0)](_0x26e45a[_0x565d48(0x21a)],_0x26e45a),_0x26e45a[_0x565d48(0x224)]||this[_0x565d48(0x259)](_0x565d48(0x21d),{'contextItem':_0x26e45a,'isLoading':_0x3e4f3d}),_0x565d48(0x1de)===_0x26e45a[_0x565d48(0x21a)]&&this[_0x565d48(0x222)](),_0x26e45a[_0x565d48(0x1f2)]){const _0x4d9480=this[_0x565d48(0x1d8)](_0x26e45a[_0x565d48(0x1f2)]);_0x4d9480&&_0x4d9480[_0x565d48(0x20a)](_0x3acf85=>{const _0x291049=_0x565d48;this[_0x291049(0x219)](_0x3acf85,_0x26e45a[_0x291049(0x1f2)],!0x0);});}}[_0x515cfc(0x22c)](_0x19155d){const _0x5b6488=_0x515cfc,_0x4deb3b=this[_0x5b6488(0x1ed)][_0x5b6488(0x24a)](_0x19155d),_0x6b7d14=this[_0x5b6488(0x1e1)][_0x5b6488(0x24a)](_0x19155d);if(_0x6b7d14&&(_0x6b7d14[_0x5b6488(0x22e)](),this[_0x5b6488(0x1e1)][_0x5b6488(0x246)](_0x19155d)),_0x4deb3b?.[_0x5b6488(0x1f2)]){const _0x1bd2e2=this[_0x5b6488(0x1d8)](_0x4deb3b[_0x5b6488(0x1f2)]);_0x1bd2e2&&_0x1bd2e2[_0x5b6488(0x20a)](_0x5711e0=>{const _0xa1b06f=_0x5b6488;this[_0xa1b06f(0x219)](_0x5711e0,_0x4deb3b[_0xa1b06f(0x1f2)],!0x1);});}this[_0x5b6488(0x1ed)][_0x5b6488(0x246)](_0x19155d),this[_0x5b6488(0x259)](_0x5b6488(0x1ec),{'uiId':_0x19155d,'type':_0x4deb3b?.[_0x5b6488(0x23f)]}),_0x5b6488(0x1de)===_0x19155d&&this[_0x5b6488(0x222)]();}[_0x515cfc(0x1ff)](_0x17af8c,_0x2a058c){const _0x347984=_0x515cfc;if(this[_0x347984(0x1ed)][_0x347984(0x1ee)](_0x17af8c[_0x347984(0x21a)])&&(this[_0x347984(0x1ed)][_0x347984(0x1e0)](_0x17af8c[_0x347984(0x21a)],_0x17af8c),this[_0x347984(0x259)](_0x347984(0x223),{'contextItem':_0x17af8c,'isLoading':_0x2a058c}),_0x17af8c[_0x347984(0x1f2)])){const _0x4d8864=this[_0x347984(0x1d8)](_0x17af8c[_0x347984(0x1f2)]);_0x4d8864&&_0x4d8864[_0x347984(0x20a)](_0x27644f=>{const _0x463332=_0x347984;this[_0x463332(0x219)](_0x27644f,_0x17af8c[_0x463332(0x1f2)],!0x0);});}}[_0x515cfc(0x24f)](_0x2a2363){const _0x370768=_0x515cfc;this[_0x370768(0x211)][_0x370768(0x1e0)](_0x2a2363[_0x370768(0x21a)],_0x2a2363);}[_0x515cfc(0x1e4)](){const _0x370c48=_0x515cfc;this[_0x370c48(0x20d)]={'document':{'enabled':!0x1!==this[_0x370c48(0x257)]?.[_0x370c48(0x1d2)]?.[_0x370c48(0x1fc)],'isHidden':!0x1},'urls':{'enabled':!0x1!==this[_0x370c48(0x257)]?.[_0x370c48(0x1df)]?.[_0x370c48(0x1fc)]},'files':{'enabled':!0x1!==this[_0x370c48(0x257)]?.[_0x370c48(0x1f0)]?.[_0x370c48(0x1fc)]},'sources':this[_0x370c48(0x248)](),'customItems':this[_0x370c48(0x257)]?.[_0x370c48(0x202)]?.[_0x370c48(0x227)](_0x25865e=>({..._0x25865e,'enabled':!0x0}))??[]},this[_0x370c48(0x259)](_0x370c48(0x201),{'options':this[_0x370c48(0x20d)]});}[_0x515cfc(0x248)](){const _0x5dafef=_0x515cfc;return this[_0x5dafef(0x257)]?.[_0x5dafef(0x254)]?.[_0x5dafef(0x227)](_0x24a1ef=>({..._0x24a1ef,'resources':[]}))??[];}[_0x515cfc(0x222)](){const _0x59fa2f=_0x515cfc,_0x3f91c7=this[_0x59fa2f(0x21f)]()||this[_0x59fa2f(0x1cf)]();this[_0x59fa2f(0x20d)][_0x59fa2f(0x1d2)][_0x59fa2f(0x245)]=_0x3f91c7,this[_0x59fa2f(0x259)](_0x59fa2f(0x201),{'options':this[_0x59fa2f(0x20d)]});}[_0x515cfc(0x228)](_0x533967){const _0x349bde=_0x515cfc;for(const _0x163102 of this[_0x349bde(0x1ed)][_0x349bde(0x205)]())if(_0x163102[_0x349bde(0x1f2)]===_0x533967)return!0x0;for(const _0x464a11 of this[_0x349bde(0x211)][_0x349bde(0x205)]())if(_0x464a11[_0x349bde(0x1f2)]===_0x533967)return!0x0;return!0x1;}[_0x515cfc(0x1d8)](_0x11c14e){const _0x360743=_0x515cfc,_0x505a05=[];for(const _0x186494 of this[_0x360743(0x20d)][_0x360743(0x254)]){_0x186494[_0x360743(0x1ea)][_0x360743(0x1e5)](_0x49d7e5=>_0x49d7e5['id']===_0x11c14e)&&_0x505a05[_0x360743(0x1d9)](_0x186494['id']);}return 0x0===_0x505a05[_0x360743(0x1f4)]?null:_0x505a05;}[_0x515cfc(0x219)](_0x1ae4b8,_0x1582fe,_0x3e6f10){const _0x4b3f52=_0x515cfc,_0x2c8e98=this[_0x4b3f52(0x20d)][_0x4b3f52(0x254)][_0x4b3f52(0x1e5)](_0x47f4bb=>_0x47f4bb['id']===_0x1ae4b8);if(!_0x2c8e98)return;const _0x42f1cc=_0x2c8e98[_0x4b3f52(0x1ea)][_0x4b3f52(0x1e5)](_0x276737=>_0x276737['id']===_0x1582fe);_0x42f1cc&&(_0x42f1cc[_0x4b3f52(0x22f)]=_0x3e6f10,this[_0x4b3f52(0x259)](_0x4b3f52(0x1eb),{'sourceId':_0x1ae4b8,'resourceId':_0x1582fe,'isInContext':_0x3e6f10}));}[_0x515cfc(0x204)](_0x29fa82){const _0x317c8d=_0x515cfc;this[_0x317c8d(0x251)][_0x317c8d(0x1e0)](_0x29fa82,!0x0),this[_0x317c8d(0x251)][_0x317c8d(0x225)]&&this[_0x317c8d(0x259)](_0x317c8d(0x1f1),{'isUploadInProgress':!0x0});}[_0x515cfc(0x1db)](_0x491f8c){const _0x65f299=_0x515cfc;this[_0x65f299(0x251)][_0x65f299(0x246)](_0x491f8c),0x0===this[_0x65f299(0x251)][_0x65f299(0x225)]&&this[_0x65f299(0x259)](_0x65f299(0x1f1),{'isUploadInProgress':!0x1});}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x149bcd=_0x188b;(function(_0x3b7ef0,_0x394d4e){const _0x1f10c6=_0x188b,_0x41f9b0=_0x3b7ef0();while(!![]){try{const _0x3574af=parseInt(_0x1f10c6(0xdb))/0x1*(-parseInt(_0x1f10c6(0xa1))/0x2)+-parseInt(_0x1f10c6(0xc9))/0x3*(parseInt(_0x1f10c6(0x8b))/0x4)+parseInt(_0x1f10c6(0xbd))/0x5+-parseInt(_0x1f10c6(0x74))/0x6*(parseInt(_0x1f10c6(0x8f))/0x7)+parseInt(_0x1f10c6(0xb2))/0x8+-parseInt(_0x1f10c6(0x9d))/0x9+-parseInt(_0x1f10c6(0xe4))/0xa*(-parseInt(_0x1f10c6(0x80))/0xb);if(_0x3574af===_0x394d4e)break;else _0x41f9b0['push'](_0x41f9b0['shift']());}catch(_0x59d1c2){_0x41f9b0['push'](_0x41f9b0['shift']());}}}(_0x42a0,0x83f25));import{CKEditorError as _0x3c69b2,EmitterMixin as _0x29a54f,logWarning as _0x449db2}from'ckeditor5/src/utils.js';function _0x188b(_0x193783,_0x9af1ae){const _0x42a01e=_0x42a0();return _0x188b=function(_0x188b82,_0x421e3e){_0x188b82=_0x188b82-0x66;let _0x2624a8=_0x42a01e[_0x188b82];return _0x2624a8;},_0x188b(_0x193783,_0x9af1ae);}import{AI_MODEL_EVENT_NAMES as _0x16ee8e}from'../../aicore/model/aiinteraction.js';function _0x42a0(){const _0xa80c99=['1500135ZwxrPe','attributes','ai-chat-handle-user-interaction-already-in-progress','getPendingContextItems','url','loadSourceResources','getInteraction','modelSelected','hasOwn','chatModels','assistant','ai-chat-conversation-init-failed','sources','destroy','get','getModel','getAll','startConversation','1obzdPY','load','stop','conversationInitialized','getCapabilitiesConfig','removeSelectionFromContext','ai-chat-conversation-set-model-null','ai-chat-handle-user-interaction-start-failed','removeInteraction','1244260VEsMrS','setModel','updateCurrentDocument','find','isFromHistory','removeFromContext','code','ai-chat-conversation-set-model-not-available','prompt','appendContent','createInteraction','addResourceToContext','user','ai-chat-handle-user-conversation-not-initialized','content','4157292yCrWfy','type','_extractContextItems','addToConversationContext','capabilities','toLowerCase','delegate','getDocumentContext','interactionCreated','reasoning','role','message','198dKRbzV','chatCapabilities','addFilesToContext','splice','isAvailable','setReasoning','model','fire','getConversation','createReply','title','4PltBiZ','getEditor','_handleToolResultData','selectedModelId','7VXtUly','handleUserInteraction','populateFromMessage','lastInteraction','getCurrentDocumentContext','stack','conversationStarted','chatContext','contextItems','interactions','updateCurrentDocumentInContext','currentInteraction','fetchConversationMessages','webSearch','7827156fqyBck','modification','ai-chat-conversation-already-started','ai-chat-conversation-init-from-id-failed','1558936PtyMTk','isSelectionInContext','conversationId','text','start','push','group','addCurrentDocumentToContext','parse','addUrlToContext','isCurrentDocumentInConversation','setConversationTitle','setWebSearch','fetchConversation','getAvailableModels','isCurrentDocumentInContext','error','1026528nVKUIS','reset','options','ai-chat-conversation-start-failed','indexOf','connector','getMessages','toggleWebSearch','toolName','sessionId','init','5072740JFdOGy','mcp-tool-result','currentReply','length','_processMessagesToInteractions','ai-chat-conversation-start-no-model-selected','addToolItemToContext','addSelectionToContext','isStarted','selectedModel','toggleReasoning','set'];_0x42a0=function(){return _0xa80c99;};return _0x42a0();}import{AIChatContext as _0x13f61c,AI_CONTEXT_MODEL_EVENT_NAMES as _0x12633b}from'./aichatcontext.js';import{AICapabilities as _0x26241c,CAPABILITIES_MODEL_EVENT_NAMES as _0x576033}from'../../aicore/model/aicapabilities.js';import{AIChatInteraction as _0x1016a4}from'./aichatinteraction.js';import{errorsMap as _0x5eb07}from'../../errorsmap.js';export class AIChatConversation extends _0x29a54f(){['id'];[_0x149bcd(0xc5)]=!0x1;[_0x149bcd(0x69)];[_0x149bcd(0x98)]=[];[_0x149bcd(0x9a)];[_0x149bcd(0xc6)];[_0x149bcd(0xb7)];[_0x149bcd(0xb4)];constructor(_0x139668){const _0xe1357a=_0x149bcd;super(),this[_0xe1357a(0xb4)]=_0x139668,this[_0xe1357a(0xb7)]=_0x139668[_0xe1357a(0xb7)],this[_0xe1357a(0xd2)]=_0x139668[_0xe1357a(0xd2)],this['id']=_0x139668[_0xe1357a(0xa3)],this[_0xe1357a(0x69)]=_0x139668[_0xe1357a(0x69)];}async[_0x149bcd(0xbc)](_0x249492){const _0x466e0a=_0x149bcd;try{this[_0x466e0a(0x96)]=new _0x13f61c({'connector':this[_0x466e0a(0xb7)],'config':_0x249492,'ownerId':this['id']}),this[_0x466e0a(0x96)][_0x466e0a(0x7a)](..._0x12633b)['to'](this),this[_0x466e0a(0x96)][_0x466e0a(0xbc)](),this[_0x466e0a(0x81)]=new _0x26241c(),this[_0x466e0a(0x81)][_0x466e0a(0x7a)](..._0x576033)['to'](this),this[_0x466e0a(0x81)][_0x466e0a(0xbc)]();const _0x3b3e1d=await this[_0x466e0a(0xd2)][_0x466e0a(0xaf)]();this[_0x466e0a(0x87)](_0x466e0a(0xde),{'availableModels':_0x3b3e1d});const _0x92e3b7=await this[_0x466e0a(0xd2)][_0x466e0a(0xd8)](this[_0x466e0a(0xb4)][_0x466e0a(0x8e)]);_0x92e3b7&&await this[_0x466e0a(0x66)](_0x92e3b7);}catch(_0x15831d){const _0x2b01fa=new _0x3c69b2(_0x466e0a(0xd4),null,{'message':_0x15831d[_0x466e0a(0x7f)]||_0x15831d});_0x2b01fa[_0x466e0a(0x94)]=_0x15831d[_0x466e0a(0x94)],this[_0x466e0a(0x87)](_0x466e0a(0xb1),{'error':_0x2b01fa});}}async[_0x149bcd(0xa5)](){const _0x22a6a9=_0x149bcd;if(this[_0x22a6a9(0xc5)])throw new _0x3c69b2(_0x22a6a9(0x9f),null,{'conversation':this});if(!this[_0x22a6a9(0xc6)])throw new _0x3c69b2(_0x22a6a9(0xc2),null,{'conversation':this});try{const {id:_0x5b78db}=await this[_0x22a6a9(0xb7)][_0x22a6a9(0xda)](this['id'],this[_0x22a6a9(0xb4)][_0x22a6a9(0xa7)])[_0x22a6a9(0x88)]();this['id']=_0x5b78db,this[_0x22a6a9(0xc5)]=!0x0,this[_0x22a6a9(0x87)](_0x22a6a9(0x95),{'conversationId':this['id'],'selectedModel':this[_0x22a6a9(0xc6)]});}catch(_0x3892c2){const _0x214b43=new _0x3c69b2(_0x22a6a9(0xb5),null,{'message':_0x3892c2[_0x22a6a9(0x7f)],'conversationId':this['id']});throw _0x214b43[_0x22a6a9(0x94)]=_0x3892c2[_0x22a6a9(0x94)],this[_0x22a6a9(0x87)](_0x22a6a9(0xb1),{'error':_0x214b43}),_0x214b43;}}async[_0x149bcd(0xdc)](_0x42480c,_0x4e9706){const _0x5acbd9=_0x149bcd;try{const _0xe6a841=await this[_0x5acbd9(0xb7)][_0x5acbd9(0xae)](_0x42480c)[_0x5acbd9(0x88)](),_0xa95ff9=await this[_0x5acbd9(0xb7)][_0x5acbd9(0x9b)](_0x42480c)[_0x5acbd9(0xb8)](),_0x5ec5e4=_0xa95ff9[0x0][_0x5acbd9(0x86)];this[_0x5acbd9(0xc5)]=!0x0,this['id']=_0xe6a841['id'],_0x5acbd9(0x8a)in _0xe6a841?this[_0x5acbd9(0x87)](_0x5acbd9(0xac),_0xe6a841[_0x5acbd9(0x8a)],!0x0):this[_0x5acbd9(0x87)](_0x5acbd9(0xac),'',!0x0);const _0x5c6037=(await this[_0x5acbd9(0xd2)][_0x5acbd9(0xd9)]())[_0x5acbd9(0x68)](_0x264d59=>_0x264d59['id'][_0x5acbd9(0x79)]()===_0x5ec5e4[_0x5acbd9(0x79)]());return this[_0x5acbd9(0xc6)]=_0x5c6037,this[_0x5acbd9(0x87)](_0x5acbd9(0xd0),{'selectedModel':_0x5c6037,'isDisabled':!0x0}),await this[_0x5acbd9(0xc1)](_0xa95ff9,_0x4e9706,_0x5ec5e4),this[_0x5acbd9(0x9a)]=void 0x0,this;}catch(_0x717b23){const _0x4378df=new _0x3c69b2(_0x5acbd9(0xa0),null,{'message':_0x717b23[_0x5acbd9(0x7f)],'conversationId':_0x42480c});throw _0x4378df[_0x5acbd9(0x94)]=_0x717b23[_0x5acbd9(0x94)],this[_0x5acbd9(0x87)](_0x5acbd9(0xb1),{'error':_0x4378df}),_0x4378df;}}async[_0x149bcd(0xc1)](_0x1ec5e4,_0x25196d,_0x291e52){const _0xc4ba63=_0x149bcd;let _0x4be764;for(const _0x7c1058 of _0x1ec5e4)if(_0xc4ba63(0x71)===_0x7c1058[_0xc4ba63(0x7e)]){const _0x186f08=await this[_0xc4ba63(0x76)](_0x7c1058),_0x3cc5d1={'isReasoningEnabled':Object[_0xc4ba63(0xd1)](_0x7c1058[_0xc4ba63(0x78)],_0xc4ba63(0x7d)),'isWebSearchEnabled':Object[_0xc4ba63(0xd1)](_0x7c1058[_0xc4ba63(0x78)],_0xc4ba63(0x9c))};_0x4be764=this[_0xc4ba63(0x6f)]({'userMessage':_0x7c1058[_0xc4ba63(0x6d)],'contextItems':_0x186f08,'capabilities':_0x3cc5d1,'modelId':_0x291e52,'attributes':_0x7c1058[_0xc4ba63(0xca)]}),this[_0xc4ba63(0x9a)]=_0x4be764,this[_0xc4ba63(0x96)][_0xc4ba63(0x77)](this[_0xc4ba63(0x9a)][_0xc4ba63(0x97)]);}else{if(_0xc4ba63(0xd3)===_0x7c1058[_0xc4ba63(0x7e)]&&_0x4be764){const _0x396a45=[];for(const _0x181b70 of _0x7c1058[_0xc4ba63(0x73)])switch(_0x181b70[_0xc4ba63(0x75)]){case _0xc4ba63(0xa4):case _0xc4ba63(0x9e):{const _0x5c81e7=_0x4be764[_0xc4ba63(0x7b)]()?.[_0xc4ba63(0xbb)]!==_0x25196d;_0x4be764[_0xc4ba63(0xbf)]=_0x4be764[_0xc4ba63(0x89)]({'type':_0x181b70[_0xc4ba63(0x75)],'isDone':!0x0,'interactionId':_0x4be764['id'],'areActionsDisabled':_0x5c81e7}),_0x4be764[_0xc4ba63(0xbf)][_0xc4ba63(0x6e)](_0x181b70[_0xc4ba63(0x73)]),_0x396a45[_0xc4ba63(0xc0)]>0x0&&(_0x4be764[_0xc4ba63(0xbf)][_0xc4ba63(0xd5)]=_0x396a45[_0xc4ba63(0x83)](0x0));break;}case _0xc4ba63(0xcd):_0x396a45[_0xc4ba63(0xa6)](_0x181b70);break;case _0xc4ba63(0xbe):{const {data:_0x3af3e5,attributes:_0x4bc21d}=JSON[_0xc4ba63(0xa9)](_0x181b70[_0xc4ba63(0x73)]);_0x4be764[_0xc4ba63(0x8d)]({'toolName':_0x181b70[_0xc4ba63(0xba)],'data':_0x3af3e5,'attributes':_0x4bc21d});break;}}}}}async[_0x149bcd(0x76)](_0x30fc4c){const _0x584a91=_0x149bcd,_0x5da555=new Map();if(!_0x30fc4c[_0x584a91(0x73)])return _0x5da555;for(const _0x3085ad of _0x30fc4c[_0x584a91(0x73)]){const _0x463b4e=await this[_0x584a91(0x96)][_0x584a91(0x91)](_0x3085ad);_0x463b4e&&_0x5da555[_0x584a91(0xc8)](_0x463b4e['id'],_0x463b4e);}return _0x5da555;}async[_0x149bcd(0x90)]({userMessage:_0x45d8be,attributes:_0x37fd1e}){const _0x508ce8=_0x149bcd;if(!this[_0x508ce8(0xc5)])throw new _0x3c69b2(_0x508ce8(0x72),null,{'conversation':this});if(this[_0x508ce8(0x9a)])throw new _0x3c69b2(_0x508ce8(0xcb),null,{'conversation':this});try{const _0x5e1a0f=this[_0x508ce8(0x96)][_0x508ce8(0xcc)](),_0x379baf=this[_0x508ce8(0x81)][_0x508ce8(0xdf)](),_0x169522=this[_0x508ce8(0xc6)]['id'];this[_0x508ce8(0x9a)]=this[_0x508ce8(0x6f)]({'userMessage':_0x45d8be,'contextItems':_0x5e1a0f,'capabilities':_0x379baf,'modelId':_0x169522,'attributes':_0x37fd1e}),await this[_0x508ce8(0x9a)][_0x508ce8(0xa5)](),this[_0x508ce8(0x96)][_0x508ce8(0x77)](this[_0x508ce8(0x9a)][_0x508ce8(0x97)]);}catch(_0x52e032){if(_0x52e032 instanceof _0x3c69b2)this[_0x508ce8(0x87)](_0x508ce8(0xb1),{'interactionId':this[_0x508ce8(0x9a)]?this[_0x508ce8(0x9a)]['id']:void 0x0,'error':_0x52e032});else{const _0x59e5e5=_0x5eb07[_0x508ce8(0xd7)](_0x52e032[_0x508ce8(0x6b)])||_0x508ce8(0xe2);this[_0x508ce8(0x87)](_0x508ce8(0xb1),{'interactionId':this[_0x508ce8(0x9a)]?this[_0x508ce8(0x9a)]['id']:void 0x0,'error':new _0x3c69b2(_0x59e5e5,null,{'error':_0x52e032})});}}finally{this[_0x508ce8(0x9a)]?.[_0x508ce8(0xdd)](),this[_0x508ce8(0x9a)]=void 0x0;}}[_0x149bcd(0x6f)]({userMessage:_0xe3e1e8,contextItems:_0xbdda0e,capabilities:_0x4fcbe4,modelId:_0x1d0763,attributes:_0x37093a}){const _0x4e9f1a=_0x149bcd,_0x5b50e1=new _0x1016a4({'userMessage':_0xe3e1e8,'contextItems':_0xbdda0e,'capabilities':_0x4fcbe4,'conversationId':this['id'],'connector':this[_0x4e9f1a(0xb7)],'editor':this[_0x4e9f1a(0xb4)][_0x4e9f1a(0x8c)]&&this[_0x4e9f1a(0xb4)][_0x4e9f1a(0x8c)](),'model':_0x1d0763,'attributes':_0x37093a});return _0x5b50e1[_0x4e9f1a(0x7a)](..._0x16ee8e)['to'](this),this[_0x4e9f1a(0x98)][_0x4e9f1a(0xa6)](_0x5b50e1),this[_0x4e9f1a(0x87)](_0x4e9f1a(0x7c),_0x5b50e1),_0x5b50e1;}[_0x149bcd(0xcf)](_0x2ffe64){const _0x23dcd6=_0x149bcd;return this[_0x23dcd6(0x98)][_0x23dcd6(0x68)](_0x1888df=>_0x1888df['id']===_0x2ffe64);}[_0x149bcd(0xe3)](_0x318934){const _0x9bd664=_0x149bcd,_0x3a9dbd=this[_0x9bd664(0xcf)](_0x318934);_0x3a9dbd&&(_0x3a9dbd[_0x9bd664(0xd6)](),this[_0x9bd664(0x98)][_0x9bd664(0x83)](this[_0x9bd664(0x98)][_0x9bd664(0xb6)](_0x3a9dbd),0x1));}get[_0x149bcd(0x92)](){const _0x15d4ba=_0x149bcd;return this[_0x15d4ba(0x98)][this[_0x15d4ba(0x98)][_0x15d4ba(0xc0)]-0x1];}[_0x149bcd(0xa8)](_0x2af59c){const _0xb71adb=_0x149bcd;this[_0xb71adb(0x96)][_0xb71adb(0xa8)](_0x2af59c);}async[_0x149bcd(0x99)]({content:_0x398ec8,version:_0x54a6d5,sessionId:_0x162d79,selections:_0x50a3d8}){const _0x1ccd7c=_0x149bcd;await this[_0x1ccd7c(0x96)][_0x1ccd7c(0x67)](_0x398ec8,_0x54a6d5,_0x162d79,_0x50a3d8);}[_0x149bcd(0x93)](){const _0x2d9f12=_0x149bcd;return this[_0x2d9f12(0x9a)]?.[_0x2d9f12(0x7b)]()?.[_0x2d9f12(0x73)]||'';}[_0x149bcd(0xc4)](_0x1a5d7c){const _0x5a5788=_0x149bcd;this[_0x5a5788(0x96)][_0x5a5788(0xc4)](_0x1a5d7c);}[_0x149bcd(0xe0)](){const _0x196b8a=_0x149bcd;this[_0x196b8a(0x96)][_0x196b8a(0xe0)]();}[_0x149bcd(0x82)](_0x3d4b2f){const _0x470a60=_0x149bcd;this[_0x470a60(0x96)][_0x470a60(0x82)](_0x3d4b2f);}[_0x149bcd(0xaa)](_0x4aed1f){const _0x2bd394=_0x149bcd;this[_0x2bd394(0x96)][_0x2bd394(0xaa)](_0x4aed1f);}[_0x149bcd(0xc3)](_0x3d2c7d){const _0x33b140=_0x149bcd;this[_0x33b140(0x96)][_0x33b140(0xc3)](_0x3d2c7d);}[_0x149bcd(0x70)](_0x3e9ca6,_0x22a435){const _0x47b841=_0x149bcd;this[_0x47b841(0x96)][_0x47b841(0x70)](_0x3e9ca6,_0x22a435);}[_0x149bcd(0xce)](_0x12957c,_0x5467e1,_0x5f583c){const _0x1f23ba=_0x149bcd;return this[_0x1f23ba(0x96)][_0x1f23ba(0xce)](_0x12957c,_0x5467e1,_0x5f583c);}[_0x149bcd(0x6a)](_0x2015bb){const _0x10da80=_0x149bcd;this[_0x10da80(0x96)][_0x10da80(0x6a)](_0x2015bb);}[_0x149bcd(0xad)](_0x1773e9){const _0x32dd2=_0x149bcd;this[_0x32dd2(0x81)][_0x32dd2(0xad)](_0x1773e9);}[_0x149bcd(0xb9)](){const _0x3afdcf=_0x149bcd;this[_0x3afdcf(0x81)][_0x3afdcf(0xb9)]();}[_0x149bcd(0x85)](_0x95f310){const _0x136df4=_0x149bcd;this[_0x136df4(0x81)][_0x136df4(0x85)](_0x95f310);}[_0x149bcd(0xc7)](){const _0x249740=_0x149bcd;this[_0x249740(0x81)][_0x249740(0xc7)]();}[_0x149bcd(0xb0)](){const _0x24f673=_0x149bcd;return this[_0x24f673(0x96)][_0x24f673(0xb0)]();}[_0x149bcd(0xab)](){const _0x51cbd7=_0x149bcd;return this[_0x51cbd7(0x96)][_0x51cbd7(0xab)]();}[_0x149bcd(0xa2)](){const _0x2b0ba4=_0x149bcd;return this[_0x2b0ba4(0x96)][_0x2b0ba4(0xa2)]();}async[_0x149bcd(0x66)](_0x29de59){const _0x1bacbe=_0x149bcd;_0x29de59?!0x1===await this[_0x1bacbe(0xd2)][_0x1bacbe(0x84)](_0x29de59)&&(_0x449db2(_0x1bacbe(0x6c),{'conversation':this,'model':_0x29de59}),_0x29de59=(await this[_0x1bacbe(0xd2)][_0x1bacbe(0xaf)]())[0x0]):(_0x449db2(_0x1bacbe(0xe1),{'conversation':this}),_0x29de59=(await this[_0x1bacbe(0xd2)][_0x1bacbe(0xaf)]())[0x0]),_0x29de59['id']!==this[_0x1bacbe(0xc6)]?.['id']&&(this[_0x1bacbe(0xc6)]=_0x29de59,this[_0x1bacbe(0x81)][_0x1bacbe(0xb3)](),this[_0x1bacbe(0x87)](_0x1bacbe(0xd0),{'selectedModel':_0x29de59}));}}
23
+ function _0x5582(_0x68ae67,_0xc8cc67){const _0x573788=_0x5737();return _0x5582=function(_0x5582b2,_0x1c782c){_0x5582b2=_0x5582b2-0x92;let _0xfc17e9=_0x573788[_0x5582b2];return _0xfc17e9;},_0x5582(_0x68ae67,_0xc8cc67);}function _0x5737(){const _0x4b879f=['getDocumentContext','5wEjhMu','4667658vBvUWO','addSelectionToContext','ai-chat-conversation-set-model-not-available','reset','ai-chat-conversation-already-started','getInteraction','lastInteraction','mcp-tool-result','handleUserInteraction','ai-chat-conversation-set-model-null','createReply','code','webSearch','_processMessagesToInteractions','ai-chat-conversation-init-from-id-failed','getPendingContextItems','init','addFilesToContext','updateCurrentDocument','toggleReasoning','sessionId','4132gJjtVn','_extractContextItems','6364750wQsVwn','hasOwn','fetchConversationMessages','updateCurrentDocumentInContext','interactionCreated','setWebSearch','reasoning','toggleWebSearch','sources','toLowerCase','set','error','addUrlToContext','text','populateFromMessage','content','isCurrentDocumentInConversation','setConversationTitle','getAvailableModels','conversationStarted','conversationInitialized','ai-chat-handle-user-interaction-start-failed','10lPrAVW','6808992xjIrLx','isFromHistory','capabilities','fire','options','contextItems','connector','loadSourceResources','load','get','ai-chat-handle-user-interaction-already-in-progress','1302jJfcLU','isStarted','ai-chat-conversation-init-failed','setReasoning','addCurrentDocumentToContext','modification','length','toolName','chatContext','fetchConversation','ai-chat-conversation-start-failed','splice','removeInteraction','chatCapabilities','getCurrentDocumentContext','ai-chat-handle-user-conversation-not-initialized','setModel','push','getConversation','103963cURSfi','selectedModel','interactions','find','addResourceToContext','assistant','createInteraction','parse','indexOf','removeFromContext','isCurrentDocumentInContext','11fTUFTF','157592xHaCcq','model','selectedModelId','_handleToolResultData','message','modelSelected','isAvailable','getMessages','start','url','stop','getEditor','currentInteraction','getModel','destroy','chatModels','appendContent','removeSelectionFromContext','currentReply','isSelectionInContext','getAll','type','addToolItemToContext','7464090WfwhpP','333ricavl','startConversation','ai-chat-conversation-start-no-model-selected','attributes','role','prompt','title','conversationId','delegate','addToConversationContext','stack','getCapabilitiesConfig','user','group'];_0x5737=function(){return _0x4b879f;};return _0x5737();}const _0x1a90b3=_0x5582;(function(_0x2497d2,_0x34e4da){const _0x2342dd=_0x5582,_0x48fe32=_0x2497d2();while(!![]){try{const _0x4b58b2=-parseInt(_0x2342dd(0x9d))/0x1*(-parseInt(_0x2342dd(0xfe))/0x2)+parseInt(_0x2342dd(0x10a))/0x3*(parseInt(_0x2342dd(0xe6))/0x4)+-parseInt(_0x2342dd(0xd0))/0x5*(parseInt(_0x2342dd(0xd1))/0x6)+parseInt(_0x2342dd(0xe8))/0x7+-parseInt(_0x2342dd(0xa9))/0x8*(parseInt(_0x2342dd(0xc1))/0x9)+parseInt(_0x2342dd(0xc0))/0xa+-parseInt(_0x2342dd(0xa8))/0xb*(parseInt(_0x2342dd(0xff))/0xc);if(_0x4b58b2===_0x34e4da)break;else _0x48fe32['push'](_0x48fe32['shift']());}catch(_0x5a11c5){_0x48fe32['push'](_0x48fe32['shift']());}}}(_0x5737,0x862c6));import{CKEditorError as _0x198a6c,EmitterMixin as _0x30c377,logWarning as _0x5597b9}from'ckeditor5/src/utils.js';import{AI_MODEL_EVENT_NAMES as _0x339024}from'../../aicore/model/aiinteraction.js';import{AIChatContext as _0x9bbf66,AI_CONTEXT_MODEL_EVENT_NAMES as _0x13fde0}from'./aichatcontext.js';import{AICapabilities as _0x272f69,CAPABILITIES_MODEL_EVENT_NAMES as _0x538ffd}from'../../aicore/model/aicapabilities.js';import{AIChatInteraction as _0xe4269c}from'./aichatinteraction.js';import{errorsMap as _0x1e5e4b}from'../../errorsmap.js';export class AIChatConversation extends _0x30c377(){['id'];[_0x1a90b3(0x10b)]=!0x1;[_0x1a90b3(0x100)];[_0x1a90b3(0x9f)]=[];[_0x1a90b3(0xb5)];[_0x1a90b3(0x9e)];[_0x1a90b3(0x105)];[_0x1a90b3(0x103)];constructor(_0x5d514b){const _0x13d589=_0x1a90b3;super(),this[_0x13d589(0x103)]=_0x5d514b,this[_0x13d589(0x105)]=_0x5d514b[_0x13d589(0x105)],this[_0x13d589(0xb8)]=_0x5d514b[_0x13d589(0xb8)],this['id']=_0x5d514b[_0x13d589(0xc8)],this[_0x13d589(0x100)]=_0x5d514b[_0x13d589(0x100)];}async[_0x1a90b3(0xe1)](_0x23d912){const _0x4bd553=_0x1a90b3;try{this[_0x4bd553(0x92)]=new _0x9bbf66({'connector':this[_0x4bd553(0x105)],'config':_0x23d912,'ownerId':this['id']}),this[_0x4bd553(0x92)][_0x4bd553(0xc9)](..._0x13fde0)['to'](this),this[_0x4bd553(0x92)][_0x4bd553(0xe1)](),this[_0x4bd553(0x97)]=new _0x272f69(),this[_0x4bd553(0x97)][_0x4bd553(0xc9)](..._0x538ffd)['to'](this),this[_0x4bd553(0x97)][_0x4bd553(0xe1)]();const _0x47a080=await this[_0x4bd553(0xb8)][_0x4bd553(0xfa)]();this[_0x4bd553(0x102)](_0x4bd553(0xfc),{'availableModels':_0x47a080});const _0x4bd729=await this[_0x4bd553(0xb8)][_0x4bd553(0xb6)](this[_0x4bd553(0x103)][_0x4bd553(0xab)]);_0x4bd729&&await this[_0x4bd553(0x9a)](_0x4bd729);}catch(_0x1c9c28){const _0xf9c274=new _0x198a6c(_0x4bd553(0x10c),null,{'message':_0x1c9c28[_0x4bd553(0xad)]||_0x1c9c28});_0xf9c274[_0x4bd553(0xcb)]=_0x1c9c28[_0x4bd553(0xcb)],this[_0x4bd553(0x102)](_0x4bd553(0xf3),{'error':_0xf9c274});}}async[_0x1a90b3(0xb1)](){const _0x555df7=_0x1a90b3;if(this[_0x555df7(0x10b)])throw new _0x198a6c(_0x555df7(0xd5),null,{'conversation':this});if(!this[_0x555df7(0x9e)])throw new _0x198a6c(_0x555df7(0xc3),null,{'conversation':this});try{const {id:_0x1dbe16}=await this[_0x555df7(0x105)][_0x555df7(0xc2)](this['id'],this[_0x555df7(0x103)][_0x555df7(0xce)])[_0x555df7(0x9c)]();this['id']=_0x1dbe16,this[_0x555df7(0x10b)]=!0x0,this[_0x555df7(0x102)](_0x555df7(0xfb),{'conversationId':this['id'],'selectedModel':this[_0x555df7(0x9e)]});}catch(_0x54434){const _0x4329b0=new _0x198a6c(_0x555df7(0x94),null,{'message':_0x54434[_0x555df7(0xad)],'conversationId':this['id']});throw _0x4329b0[_0x555df7(0xcb)]=_0x54434[_0x555df7(0xcb)],this[_0x555df7(0x102)](_0x555df7(0xf3),{'error':_0x4329b0}),_0x4329b0;}}async[_0x1a90b3(0x107)](_0xf107b9,_0x10ab62){const _0x4a9f94=_0x1a90b3;try{const _0x428900=await this[_0x4a9f94(0x105)][_0x4a9f94(0x93)](_0xf107b9)[_0x4a9f94(0x9c)](),_0x4b5502=await this[_0x4a9f94(0x105)][_0x4a9f94(0xea)](_0xf107b9)[_0x4a9f94(0xb0)](),_0x42f704=_0x4b5502[0x0][_0x4a9f94(0xaa)];this[_0x4a9f94(0x10b)]=!0x0,this['id']=_0x428900['id'],_0x4a9f94(0xc7)in _0x428900?this[_0x4a9f94(0x102)](_0x4a9f94(0xf9),_0x428900[_0x4a9f94(0xc7)],!0x0):this[_0x4a9f94(0x102)](_0x4a9f94(0xf9),'',!0x0);const _0x126376=(await this[_0x4a9f94(0xb8)][_0x4a9f94(0xbd)]())[_0x4a9f94(0xa0)](_0x53443d=>_0x53443d['id'][_0x4a9f94(0xf1)]()===_0x42f704[_0x4a9f94(0xf1)]());return this[_0x4a9f94(0x9e)]=_0x126376,this[_0x4a9f94(0x102)](_0x4a9f94(0xae),{'selectedModel':_0x126376,'isDisabled':!0x0}),await this[_0x4a9f94(0xde)](_0x4b5502,_0x10ab62,_0x42f704),this[_0x4a9f94(0xb5)]=void 0x0,this;}catch(_0x4a583a){const _0x17cc15=new _0x198a6c(_0x4a9f94(0xdf),null,{'message':_0x4a583a[_0x4a9f94(0xad)],'conversationId':_0xf107b9});throw _0x17cc15[_0x4a9f94(0xcb)]=_0x4a583a[_0x4a9f94(0xcb)],this[_0x4a9f94(0x102)](_0x4a9f94(0xf3),{'error':_0x17cc15}),_0x17cc15;}}async[_0x1a90b3(0xde)](_0x3c8d20,_0x5730db,_0x3dc454){const _0x37dadd=_0x1a90b3;let _0x39952d;for(const _0x445c7f of _0x3c8d20)if(_0x37dadd(0xcd)===_0x445c7f[_0x37dadd(0xc5)]){const _0x5162cb=await this[_0x37dadd(0xe7)](_0x445c7f),_0x4cfab3={'isReasoningEnabled':Object[_0x37dadd(0xe9)](_0x445c7f[_0x37dadd(0x101)],_0x37dadd(0xee)),'isWebSearchEnabled':Object[_0x37dadd(0xe9)](_0x445c7f[_0x37dadd(0x101)],_0x37dadd(0xdd))};_0x39952d=this[_0x37dadd(0xa3)]({'userMessage':_0x445c7f[_0x37dadd(0xc6)],'contextItems':_0x5162cb,'capabilities':_0x4cfab3,'modelId':_0x3dc454,'attributes':_0x445c7f[_0x37dadd(0xc4)]}),this[_0x37dadd(0xb5)]=_0x39952d,this[_0x37dadd(0x92)][_0x37dadd(0xca)](this[_0x37dadd(0xb5)][_0x37dadd(0x104)]);}else{if(_0x37dadd(0xa2)===_0x445c7f[_0x37dadd(0xc5)]&&_0x39952d){const _0x1393d9=[];for(const _0x69f534 of _0x445c7f[_0x37dadd(0xf7)])switch(_0x69f534[_0x37dadd(0xbe)]){case _0x37dadd(0xf5):case _0x37dadd(0x10f):{const _0x8a89f5=_0x39952d[_0x37dadd(0xcf)]()?.[_0x37dadd(0xe5)]!==_0x5730db;_0x39952d[_0x37dadd(0xbb)]=_0x39952d[_0x37dadd(0xdb)]({'type':_0x69f534[_0x37dadd(0xbe)],'isDone':!0x0,'interactionId':_0x39952d['id'],'areActionsDisabled':_0x8a89f5}),_0x39952d[_0x37dadd(0xbb)][_0x37dadd(0xb9)](_0x69f534[_0x37dadd(0xf7)]),_0x1393d9[_0x37dadd(0x110)]>0x0&&(_0x39952d[_0x37dadd(0xbb)][_0x37dadd(0xf0)]=_0x1393d9[_0x37dadd(0x95)](0x0));break;}case _0x37dadd(0xb2):_0x1393d9[_0x37dadd(0x9b)](_0x69f534);break;case _0x37dadd(0xd8):{const {data:_0x5a5071,attributes:_0x3dee57}=JSON[_0x37dadd(0xa4)](_0x69f534[_0x37dadd(0xf7)]);_0x39952d[_0x37dadd(0xac)]({'toolName':_0x69f534[_0x37dadd(0x111)],'data':_0x5a5071,'attributes':_0x3dee57});break;}}}}}async[_0x1a90b3(0xe7)](_0x22fd16){const _0x4640b5=_0x1a90b3,_0x68a0f4=new Map();if(!_0x22fd16[_0x4640b5(0xf7)])return _0x68a0f4;for(const _0x5d26ea of _0x22fd16[_0x4640b5(0xf7)]){const _0x94b52a=await this[_0x4640b5(0x92)][_0x4640b5(0xf6)](_0x5d26ea);_0x94b52a&&_0x68a0f4[_0x4640b5(0xf2)](_0x94b52a['id'],_0x94b52a);}return _0x68a0f4;}async[_0x1a90b3(0xd9)]({userMessage:_0x405650,attributes:_0xd508b3}){const _0x108ad9=_0x1a90b3;if(!this[_0x108ad9(0x10b)])throw new _0x198a6c(_0x108ad9(0x99),null,{'conversation':this});if(this[_0x108ad9(0xb5)])throw new _0x198a6c(_0x108ad9(0x109),null,{'conversation':this});try{const _0x4f4601=this[_0x108ad9(0x92)][_0x108ad9(0xe0)](),_0x14cfc5=this[_0x108ad9(0x97)][_0x108ad9(0xcc)](),_0x39229e=this[_0x108ad9(0x9e)]['id'];this[_0x108ad9(0xb5)]=this[_0x108ad9(0xa3)]({'userMessage':_0x405650,'contextItems':_0x4f4601,'capabilities':_0x14cfc5,'modelId':_0x39229e,'attributes':_0xd508b3}),await this[_0x108ad9(0xb5)][_0x108ad9(0xb1)](),this[_0x108ad9(0x92)][_0x108ad9(0xca)](this[_0x108ad9(0xb5)][_0x108ad9(0x104)]);}catch(_0x252c2a){if(_0x252c2a instanceof _0x198a6c)this[_0x108ad9(0x102)](_0x108ad9(0xf3),{'interactionId':this[_0x108ad9(0xb5)]?this[_0x108ad9(0xb5)]['id']:void 0x0,'error':_0x252c2a});else{const _0x5b8f0d=_0x1e5e4b[_0x108ad9(0x108)](_0x252c2a[_0x108ad9(0xdc)])||_0x108ad9(0xfd);this[_0x108ad9(0x102)](_0x108ad9(0xf3),{'interactionId':this[_0x108ad9(0xb5)]?this[_0x108ad9(0xb5)]['id']:void 0x0,'error':new _0x198a6c(_0x5b8f0d,null,{'error':_0x252c2a})});}}finally{this[_0x108ad9(0xb5)]?.[_0x108ad9(0xb3)](),this[_0x108ad9(0xb5)]=void 0x0;}}[_0x1a90b3(0xa3)]({userMessage:_0x27c1bb,contextItems:_0x15dcbb,capabilities:_0x7f0723,modelId:_0xc41b91,attributes:_0x1eda68}){const _0x5460dd=_0x1a90b3,_0x5e510f=new _0xe4269c({'userMessage':_0x27c1bb,'contextItems':_0x15dcbb,'capabilities':_0x7f0723,'conversationId':this['id'],'connector':this[_0x5460dd(0x105)],'editor':this[_0x5460dd(0x103)][_0x5460dd(0xb4)]&&this[_0x5460dd(0x103)][_0x5460dd(0xb4)](),'model':_0xc41b91,'attributes':_0x1eda68});return _0x5e510f[_0x5460dd(0xc9)](..._0x339024)['to'](this),this[_0x5460dd(0x9f)][_0x5460dd(0x9b)](_0x5e510f),this[_0x5460dd(0x102)](_0x5460dd(0xec),_0x5e510f),_0x5e510f;}[_0x1a90b3(0xd6)](_0x282f52){const _0x13db7d=_0x1a90b3;return this[_0x13db7d(0x9f)][_0x13db7d(0xa0)](_0x569745=>_0x569745['id']===_0x282f52);}[_0x1a90b3(0x96)](_0x143403){const _0x5ea8d4=_0x1a90b3,_0x511cd3=this[_0x5ea8d4(0xd6)](_0x143403);_0x511cd3&&(_0x511cd3[_0x5ea8d4(0xb7)](),this[_0x5ea8d4(0x9f)][_0x5ea8d4(0x95)](this[_0x5ea8d4(0x9f)][_0x5ea8d4(0xa5)](_0x511cd3),0x1));}get[_0x1a90b3(0xd7)](){const _0x11efda=_0x1a90b3;return this[_0x11efda(0x9f)][this[_0x11efda(0x9f)][_0x11efda(0x110)]-0x1];}[_0x1a90b3(0x10e)](_0x2f4128){const _0x4a4d68=_0x1a90b3;this[_0x4a4d68(0x92)][_0x4a4d68(0x10e)](_0x2f4128);}async[_0x1a90b3(0xeb)]({content:_0x4401d8,version:_0x4269a4,sessionId:_0x16387a,selections:_0x2fc3df}){const _0x48b90c=_0x1a90b3;await this[_0x48b90c(0x92)][_0x48b90c(0xe3)](_0x4401d8,_0x4269a4,_0x16387a,_0x2fc3df);}[_0x1a90b3(0x98)](){const _0x2b3090=_0x1a90b3;return this[_0x2b3090(0xb5)]?.[_0x2b3090(0xcf)]()?.[_0x2b3090(0xf7)]||'';}[_0x1a90b3(0xd2)](_0x5ab0cb){const _0x955024=_0x1a90b3;this[_0x955024(0x92)][_0x955024(0xd2)](_0x5ab0cb);}[_0x1a90b3(0xba)](){const _0x3fde21=_0x1a90b3;this[_0x3fde21(0x92)][_0x3fde21(0xba)]();}[_0x1a90b3(0xe2)](_0x51cbdb){const _0x1cbc1a=_0x1a90b3;this[_0x1cbc1a(0x92)][_0x1cbc1a(0xe2)](_0x51cbdb);}[_0x1a90b3(0xf4)](_0x33caf6){const _0x3dc9bd=_0x1a90b3;this[_0x3dc9bd(0x92)][_0x3dc9bd(0xf4)](_0x33caf6);}[_0x1a90b3(0xbf)](_0x58618d){const _0x5db724=_0x1a90b3;this[_0x5db724(0x92)][_0x5db724(0xbf)](_0x58618d);}[_0x1a90b3(0xa1)](_0x287d43,_0x27dc8e){const _0x41a0b0=_0x1a90b3;this[_0x41a0b0(0x92)][_0x41a0b0(0xa1)](_0x287d43,_0x27dc8e);}[_0x1a90b3(0x106)](_0x661687,_0x23f6ec,_0x196c11){const _0x17d6b3=_0x1a90b3;return this[_0x17d6b3(0x92)][_0x17d6b3(0x106)](_0x661687,_0x23f6ec,_0x196c11);}[_0x1a90b3(0xa6)](_0x1bcb09){const _0x223323=_0x1a90b3;this[_0x223323(0x92)][_0x223323(0xa6)](_0x1bcb09);}[_0x1a90b3(0xed)](_0x2f96ef){const _0x564012=_0x1a90b3;this[_0x564012(0x97)][_0x564012(0xed)](_0x2f96ef);}[_0x1a90b3(0xef)](){const _0x29a1d7=_0x1a90b3;this[_0x29a1d7(0x97)][_0x29a1d7(0xef)]();}[_0x1a90b3(0x10d)](_0x342e3f){const _0x120142=_0x1a90b3;this[_0x120142(0x97)][_0x120142(0x10d)](_0x342e3f);}[_0x1a90b3(0xe4)](){const _0x549c42=_0x1a90b3;this[_0x549c42(0x97)][_0x549c42(0xe4)]();}[_0x1a90b3(0xa7)](){const _0x3b6348=_0x1a90b3;return this[_0x3b6348(0x92)][_0x3b6348(0xa7)]();}[_0x1a90b3(0xf8)](){const _0x138472=_0x1a90b3;return this[_0x138472(0x92)][_0x138472(0xf8)]();}[_0x1a90b3(0xbc)](){const _0x464bb5=_0x1a90b3;return this[_0x464bb5(0x92)][_0x464bb5(0xbc)]();}async[_0x1a90b3(0x9a)](_0x1dde94){const _0x396668=_0x1a90b3;_0x1dde94?!0x1===await this[_0x396668(0xb8)][_0x396668(0xaf)](_0x1dde94)&&(_0x5597b9(_0x396668(0xd3),{'conversation':this,'model':_0x1dde94}),_0x1dde94=(await this[_0x396668(0xb8)][_0x396668(0xfa)]())[0x0]):(_0x5597b9(_0x396668(0xda),{'conversation':this}),_0x1dde94=(await this[_0x396668(0xb8)][_0x396668(0xfa)]())[0x0]),_0x1dde94['id']!==this[_0x396668(0x9e)]?.['id']&&(this[_0x396668(0x9e)]=_0x1dde94,this[_0x396668(0x97)][_0x396668(0xd4)](),this[_0x396668(0x102)](_0x396668(0xae),{'selectedModel':_0x1dde94}));}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- function _0x502c(_0x42931f,_0x25fc09){var _0x29f7a5=_0x29f7();return _0x502c=function(_0x502c14,_0x3c673f){_0x502c14=_0x502c14-0xf1;var _0x4f1cbe=_0x29f7a5[_0x502c14];return _0x4f1cbe;},_0x502c(_0x42931f,_0x25fc09);}function _0x29f7(){var _0x125719=['6wElbdN','94046duiEMr','9yurZTJ','userMessage','model','conversationId','current-document','3fsDhen','797600VxEyKr','queryAssistant','1016516NJwUBa','get','292936pXTkZJ','279349HrvCuV','mapContextItemsToRequestData','contextItems','sendRequest','connector','getDocumentContext','attributes','capabilities','getCapabilitiesRequestData','187524PuTfSv','69350GaVQuD'];_0x29f7=function(){return _0x125719;};return _0x29f7();}var _0x103eef=_0x502c;(function(_0x594c2e,_0x9bd41e){var _0x171bcb=_0x502c,_0x1881da=_0x594c2e();while(!![]){try{var _0x29539f=-parseInt(_0x171bcb(0xf2))/0x1+-parseInt(_0x171bcb(0x107))/0x2+parseInt(_0x171bcb(0xf8))/0x3*(parseInt(_0x171bcb(0xfb))/0x4)+parseInt(_0x171bcb(0x108))/0x5+-parseInt(_0x171bcb(0xf1))/0x6*(parseInt(_0x171bcb(0xfe))/0x7)+-parseInt(_0x171bcb(0xfd))/0x8*(-parseInt(_0x171bcb(0xf3))/0x9)+parseInt(_0x171bcb(0xf9))/0xa;if(_0x29539f===_0x9bd41e)break;else _0x1881da['push'](_0x1881da['shift']());}catch(_0xf24c92){_0x1881da['push'](_0x1881da['shift']());}}}(_0x29f7,0x263f5));import{AICapabilities as _0x44fbdd}from'../../aicore/model/aicapabilities.js';import{AIInteraction as _0x159bca}from'../../aicore/model/aiinteraction.js';import{AIChatContext as _0x3dcbe2}from'./aichatcontext.js';export class AIChatInteraction extends _0x159bca{[_0x103eef(0xf4)];[_0x103eef(0xf6)];[_0x103eef(0x100)]=new Map();[_0x103eef(0xf5)];[_0x103eef(0x104)];constructor(_0x244ed9){var _0x11143c=_0x103eef;super(_0x244ed9),this[_0x11143c(0xf6)]=_0x244ed9[_0x11143c(0xf6)],this[_0x11143c(0x100)]=_0x244ed9[_0x11143c(0x100)],this[_0x11143c(0x105)]=_0x244ed9[_0x11143c(0x105)],this[_0x11143c(0xf4)]=_0x244ed9[_0x11143c(0xf4)],this[_0x11143c(0xf5)]=_0x244ed9[_0x11143c(0xf5)],this[_0x11143c(0x104)]=_0x244ed9[_0x11143c(0x104)];}async[_0x103eef(0x101)](){var _0x5ef7e9=_0x103eef;return this[_0x5ef7e9(0x102)][_0x5ef7e9(0xfa)]({'message':this[_0x5ef7e9(0xf4)],'conversationId':this[_0x5ef7e9(0xf6)],'parts':_0x3dcbe2[_0x5ef7e9(0xff)](this[_0x5ef7e9(0x100)]),'capabilities':_0x44fbdd[_0x5ef7e9(0x106)](this[_0x5ef7e9(0x105)]),'model':this[_0x5ef7e9(0xf5)],'attributes':this[_0x5ef7e9(0x104)]});}[_0x103eef(0x103)](){var _0x4899d3=_0x103eef;return this[_0x4899d3(0x100)][_0x4899d3(0xfc)](_0x4899d3(0xf7));}}
23
+ var _0x24d82b=_0x2a74;function _0x2a74(_0x49325b,_0x3ae29f){var _0x568040=_0x5680();return _0x2a74=function(_0x2a7412,_0x22464f){_0x2a7412=_0x2a7412-0x1f0;var _0x4aa938=_0x568040[_0x2a7412];return _0x4aa938;},_0x2a74(_0x49325b,_0x3ae29f);}function _0x5680(){var _0x4da1df=['110KqLsPt','18958UDdXlp','96Dpksgy','2897902enPlQF','get','8217FYosgj','capabilities','connector','16QIxsQj','conversationId','207LGIKXG','queryAssistant','368844eJhpuE','12228bwsCNq','2150152YJTfzt','getCapabilitiesRequestData','mapContextItemsToRequestData','current-document','userMessage','model','sendRequest','contextItems','613300qDmRmS','1036101UvikIv','getDocumentContext','21ybLGvN','attributes','247aTDxbq'];_0x5680=function(){return _0x4da1df;};return _0x5680();}(function(_0x46df44,_0x35271c){var _0x40fc39=_0x2a74,_0x4169cc=_0x46df44();while(!![]){try{var _0x4fcc66=parseInt(_0x40fc39(0x20b))/0x1*(parseInt(_0x40fc39(0x20a))/0x2)+parseInt(_0x40fc39(0x204))/0x3*(-parseInt(_0x40fc39(0x1f5))/0x4)+-parseInt(_0x40fc39(0x209))/0x5*(parseInt(_0x40fc39(0x1f9))/0x6)+parseInt(_0x40fc39(0x206))/0x7*(parseInt(_0x40fc39(0x1fb))/0x8)+-parseInt(_0x40fc39(0x1f7))/0x9*(parseInt(_0x40fc39(0x203))/0xa)+parseInt(_0x40fc39(0x1f2))/0xb*(-parseInt(_0x40fc39(0x1fa))/0xc)+-parseInt(_0x40fc39(0x208))/0xd*(-parseInt(_0x40fc39(0x1f0))/0xe);if(_0x4fcc66===_0x35271c)break;else _0x4169cc['push'](_0x4169cc['shift']());}catch(_0x5f1723){_0x4169cc['push'](_0x4169cc['shift']());}}}(_0x5680,0xb5837));import{AICapabilities as _0x4fd0f0}from'../../aicore/model/aicapabilities.js';import{AIInteraction as _0x36e37b}from'../../aicore/model/aiinteraction.js';import{AIChatContext as _0x577b0f}from'./aichatcontext.js';export class AIChatInteraction extends _0x36e37b{[_0x24d82b(0x1ff)];[_0x24d82b(0x1f6)];[_0x24d82b(0x202)]=new Map();[_0x24d82b(0x200)];[_0x24d82b(0x207)];constructor(_0x90f6ef){var _0x880fcd=_0x24d82b;super(_0x90f6ef),this[_0x880fcd(0x1f6)]=_0x90f6ef[_0x880fcd(0x1f6)],this[_0x880fcd(0x202)]=_0x90f6ef[_0x880fcd(0x202)],this[_0x880fcd(0x1f3)]=_0x90f6ef[_0x880fcd(0x1f3)],this[_0x880fcd(0x1ff)]=_0x90f6ef[_0x880fcd(0x1ff)],this[_0x880fcd(0x200)]=_0x90f6ef[_0x880fcd(0x200)],this[_0x880fcd(0x207)]=_0x90f6ef[_0x880fcd(0x207)];}async[_0x24d82b(0x201)](){var _0x82f7c9=_0x24d82b;return this[_0x82f7c9(0x1f4)][_0x82f7c9(0x1f8)]({'message':this[_0x82f7c9(0x1ff)],'conversationId':this[_0x82f7c9(0x1f6)],'parts':_0x577b0f[_0x82f7c9(0x1fd)](this[_0x82f7c9(0x202)]),'capabilities':_0x4fd0f0[_0x82f7c9(0x1fc)](this[_0x82f7c9(0x1f3)]),'model':this[_0x82f7c9(0x200)],'attributes':this[_0x82f7c9(0x207)]});}[_0x24d82b(0x205)](){var _0x2564eb=_0x24d82b;return this[_0x2564eb(0x202)][_0x2564eb(0x1f1)](_0x2564eb(0x1fe));}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x1bda56=_0x1c80;function _0x1c80(_0x2cd861,_0x3feccb){const _0x4ecb38=_0x4ecb();return _0x1c80=function(_0x1c8006,_0x3feb6f){_0x1c8006=_0x1c8006-0x16b;let _0x47e74a=_0x4ecb38[_0x1c8006];return _0x47e74a;},_0x1c80(_0x2cd861,_0x3feccb);}(function(_0x1ea776,_0x2c1785){const _0x132f48=_0x1c80,_0x12f392=_0x1ea776();while(!![]){try{const _0x1a0776=parseInt(_0x132f48(0x1aa))/0x1*(-parseInt(_0x132f48(0x1a3))/0x2)+-parseInt(_0x132f48(0x192))/0x3+-parseInt(_0x132f48(0x16d))/0x4*(parseInt(_0x132f48(0x181))/0x5)+parseInt(_0x132f48(0x1a4))/0x6+parseInt(_0x132f48(0x19c))/0x7+parseInt(_0x132f48(0x1ad))/0x8*(parseInt(_0x132f48(0x175))/0x9)+parseInt(_0x132f48(0x1ba))/0xa;if(_0x1a0776===_0x2c1785)break;else _0x12f392['push'](_0x12f392['shift']());}catch(_0x5ce24a){_0x12f392['push'](_0x12f392['shift']());}}}(_0x4ecb,0x3a359));import{FocusTracker as _0x17a87e,KeystrokeHandler as _0x5bb40c}from'ckeditor5/src/utils.js';import{AISuggestionStreamableContentView as _0x1b09d0}from'../../aicore/ui/suggestioncontainer/aisuggestionstreamablecontentview.js';import{AISuggestionContentPartToolbarView as _0x3d86db}from'../../aicore/ui/suggestioncontainer/aisuggestioncontentparttoolbarview.js';import{AIMiniToolbarView as _0x504158}from'../../aicore/ui/suggestioncontainer/aiminitoolbarview.js';import{AIBalloonView as _0x4badfe}from'../../aiballoon/ui/aiballoonview.js';import{ButtonView as _0x3f52ac,FocusCycler as _0x2e82d3,View as _0x3ffc14}from'ckeditor5/src/ui.js';function _0x4ecb(){const _0x44449b=['showDiff','1352aiVFPV','toggleSuggestionDisplayMode','AI_BALLOON_PREVIOUS_LABEL','216LlGbzx','tab','isEnabled','createCollection','availableActions','focusCycler','destroy','_togglePartToolbarButtonsVisibility','focusLast','_focusTracker','_keystrokes','toggleRotatorButtonsVisibility','_isErrorVisible','6693190xubmAf','_streamableContentView','ck-ai-chat-balloon__toolbar-container','_config','_miniToolbarView','locale','add','4dApkIW','update','render','div','change:isTrackChangesOn','_createNextButtonView','_stateView','isTrackChangesOn','65781XWxPPI','previousButtonView','setTemplate','bind','element','_state','bindTemplate','insertSuggestion','full','toggleShowChanges','togglePartToolbarEnabled','hideError','1482545delOCO','setState','ck-ai-chat-balloon-main_state_','children','showError','addMany','isShowChangesOn','includes','_focusables','listenTo','showBlockingError','set','AI_BALLOON_NEXT_LABEL','showNext','focusFirst','delegate','execute','828477KWLPPR','fire','_toolbarContainerView','change:_state','applySuggestion','showPrevious','updateContent','focus','keepErrors','setButtonsVisibility','50498ZiSZcV','_createPreviousButtonView','shift\x20+\x20tab','rejectSuggestion','_partToolbarView','pending','has','116lhVBCB','93798lronDk','nextButtonView','_errorView','ck-ai-chat-balloon-main','isVisible'];_0x4ecb=function(){return _0x44449b;};return _0x4ecb();}import{AISuggestionContentPartStateView as _0x4925f4}from'../../aicore/ui/suggestioncontainer/aisuggestioncontentpartstateview.js';import{IconChevronDown as _0x1a59e8,IconChevronUp as _0x1d07ab}from'ckeditor5/src/icons.js';import{getTranslation as _0x15a3c4}from'../../aicore/utils/common-translations.js';import'../../../theme/aichat/aichatballoon.css';export class AIChatBalloonView extends _0x4badfe{[_0x1bda56(0x184)];[_0x1bda56(0x1a5)];[_0x1bda56(0x176)];[_0x1bda56(0x1b2)];[_0x1bda56(0x189)];[_0x1bda56(0x1b6)];[_0x1bda56(0x1b7)];[_0x1bda56(0x1bd)];[_0x1bda56(0x1bb)];[_0x1bda56(0x194)];[_0x1bda56(0x1a0)];[_0x1bda56(0x173)];[_0x1bda56(0x1be)];constructor(_0x19566e,_0x37c268){const _0x33f6fa=_0x1bda56;super(_0x19566e);const _0x3fcbb9=this[_0x33f6fa(0x17b)];this[_0x33f6fa(0x18c)](_0x33f6fa(0x1a9),!0x1),this[_0x33f6fa(0x18c)](_0x33f6fa(0x17a),_0x33f6fa(0x1a1)),this[_0x33f6fa(0x1b6)]=new _0x17a87e(),this[_0x33f6fa(0x1b7)]=new _0x5bb40c(),this[_0x33f6fa(0x189)]=this[_0x33f6fa(0x1b0)](),this[_0x33f6fa(0x1b2)]=new _0x2e82d3({'focusables':this[_0x33f6fa(0x189)],'focusTracker':this[_0x33f6fa(0x1b6)],'keystrokeHandler':this[_0x33f6fa(0x1b7)],'actions':{'focusPrevious':_0x33f6fa(0x19e),'focusNext':_0x33f6fa(0x1ae)}}),this[_0x33f6fa(0x1bd)]=_0x37c268,this[_0x33f6fa(0x1a5)]=this[_0x33f6fa(0x172)](),this[_0x33f6fa(0x176)]=this[_0x33f6fa(0x19d)](),this[_0x33f6fa(0x1bb)]=new _0x1b09d0(_0x19566e),this[_0x33f6fa(0x1a0)]=new _0x3d86db(_0x19566e,_0x37c268[_0x33f6fa(0x1b1)]),this[_0x33f6fa(0x1a0)][_0x33f6fa(0x190)](_0x33f6fa(0x196),_0x33f6fa(0x17c),_0x33f6fa(0x19f))['to'](this),this[_0x33f6fa(0x1b4)](_0x37c268),this[_0x33f6fa(0x173)]=new _0x4925f4(_0x19566e),this[_0x33f6fa(0x173)][_0x33f6fa(0x1a8)]=!0x1,this[_0x33f6fa(0x1be)]=new _0x504158(_0x19566e,{'showChanges':_0x33f6fa(0x17d)}),this[_0x33f6fa(0x1be)][_0x33f6fa(0x178)](_0x33f6fa(0x187))['to'](this,_0x33f6fa(0x1a9)),this[_0x33f6fa(0x1be)]['on'](_0x33f6fa(0x17e),()=>{const _0x3a2e64=_0x33f6fa;this[_0x3a2e64(0x193)](_0x3a2e64(0x1ab));}),this[_0x33f6fa(0x194)]=new ls(_0x19566e,[this[_0x33f6fa(0x1a0)],this[_0x33f6fa(0x173)],this[_0x33f6fa(0x1be)]]),this[_0x33f6fa(0x184)]=this[_0x33f6fa(0x1b0)]([this[_0x33f6fa(0x1bb)],this[_0x33f6fa(0x194)]]),this['on'](_0x33f6fa(0x195),(_0x8b51e4,_0x1341ab,_0x2b9485,_0x2f1207)=>{const _0x48f751=_0x33f6fa;let _0x4baa6f,_0x37dc9f;_0x48f751(0x1a1)===_0x2f1207?(_0x4baa6f=this[_0x48f751(0x1a0)],_0x37dc9f=this[_0x48f751(0x173)]):(_0x4baa6f=this[_0x48f751(0x173)],_0x37dc9f=this[_0x48f751(0x1a0)]),this[_0x48f751(0x173)][_0x48f751(0x182)](_0x2b9485),_0x4baa6f[_0x48f751(0x1a8)]=!0x1,_0x37dc9f[_0x48f751(0x1a8)]=!0x0;}),this[_0x33f6fa(0x177)]({'tag':_0x33f6fa(0x170),'attributes':{'class':['ck',_0x33f6fa(0x1a7),_0x3fcbb9['to'](_0x33f6fa(0x17a),_0x3a2c27=>_0x33f6fa(0x183)+_0x3a2c27)]},'children':this[_0x33f6fa(0x184)]}),this['on'](_0x33f6fa(0x171),()=>{const _0x2568a6=_0x33f6fa;this[_0x2568a6(0x1b4)](_0x37c268);});}[_0x1bda56(0x16f)](){const _0x1d4253=_0x1bda56;super[_0x1d4253(0x16f)](),this[_0x1d4253(0x1a5)][_0x1d4253(0x16f)](),this[_0x1d4253(0x176)][_0x1d4253(0x16f)](),this[_0x1d4253(0x1b6)][_0x1d4253(0x16c)](this[_0x1d4253(0x179)]),this[_0x1d4253(0x1b6)][_0x1d4253(0x16c)](this[_0x1d4253(0x1a5)]),this[_0x1d4253(0x1b6)][_0x1d4253(0x16c)](this[_0x1d4253(0x176)]),this[_0x1d4253(0x1b6)][_0x1d4253(0x16c)](this[_0x1d4253(0x1be)]),this[_0x1d4253(0x1b6)][_0x1d4253(0x16c)](this[_0x1d4253(0x1a0)]),this[_0x1d4253(0x1b7)][_0x1d4253(0x18a)](this[_0x1d4253(0x179)]),this[_0x1d4253(0x1b7)][_0x1d4253(0x18a)](this[_0x1d4253(0x1a5)][_0x1d4253(0x179)]),this[_0x1d4253(0x1b7)][_0x1d4253(0x18a)](this[_0x1d4253(0x176)][_0x1d4253(0x179)]),this[_0x1d4253(0x189)][_0x1d4253(0x186)]([this[_0x1d4253(0x1a5)],this[_0x1d4253(0x176)],this[_0x1d4253(0x1a0)],this[_0x1d4253(0x1be)]]);}[_0x1bda56(0x1b3)](){const _0x4dd081=_0x1bda56;super[_0x4dd081(0x1b3)](),this[_0x4dd081(0x176)][_0x4dd081(0x1b3)](),this[_0x4dd081(0x1a5)][_0x4dd081(0x1b3)]();}[_0x1bda56(0x199)](){const _0x45b1bb=_0x1bda56;this[_0x45b1bb(0x1b2)][_0x45b1bb(0x18f)]();}[_0x1bda56(0x1b5)](){const _0x16cdf1=_0x1bda56;this[_0x16cdf1(0x1b2)][_0x16cdf1(0x1b5)]();}async[_0x1bda56(0x198)](_0x4ff462){const _0x51d64b=_0x1bda56;_0x4ff462?.[_0x51d64b(0x19a)]||this[_0x51d64b(0x180)](),await this[_0x51d64b(0x1bb)][_0x51d64b(0x16e)](_0x4ff462);}[_0x1bda56(0x182)](_0x742f21){const _0x253fac=_0x1bda56;this[_0x253fac(0x17a)]=_0x742f21;}[_0x1bda56(0x185)](_0x5d5c55){const _0x6c010b=_0x1bda56;super[_0x6c010b(0x185)](_0x5d5c55),this[_0x6c010b(0x184)][_0x6c010b(0x1a2)](this[_0x6c010b(0x1a6)])||this[_0x6c010b(0x184)][_0x6c010b(0x16c)](this[_0x6c010b(0x1a6)],0x0);}[_0x1bda56(0x180)](){const _0x2c01b1=_0x1bda56;this[_0x2c01b1(0x1b9)]&&(super[_0x2c01b1(0x180)](),this[_0x2c01b1(0x17f)](!0x0));}[_0x1bda56(0x18b)](_0x3ab216){const _0x5f13c2=_0x1bda56;super[_0x5f13c2(0x18b)](_0x3ab216),this[_0x5f13c2(0x17f)](!0x1);}[_0x1bda56(0x1b8)](_0x2ad369){const _0x3a7c91=_0x1bda56;this[_0x3a7c91(0x1a5)][_0x3a7c91(0x1a8)]=this[_0x3a7c91(0x176)][_0x3a7c91(0x1a8)]=_0x2ad369;}[_0x1bda56(0x17f)](_0x23dc41){const _0x19ef16=_0x1bda56;this[_0x19ef16(0x1a0)][_0x19ef16(0x1af)]=_0x23dc41;}[_0x1bda56(0x1b4)]({showApplyButton:_0x561c5b,showSuggestButton:_0x4f0fdc}){const _0x8536c2=_0x1bda56;_0x561c5b=_0x561c5b&&!this[_0x8536c2(0x174)]&&this[_0x8536c2(0x1bd)][_0x8536c2(0x1b1)][_0x8536c2(0x188)](_0x8536c2(0x196)),_0x4f0fdc=_0x4f0fdc&&this[_0x8536c2(0x1bd)][_0x8536c2(0x1b1)][_0x8536c2(0x188)](_0x8536c2(0x17c)),this[_0x8536c2(0x1a0)][_0x8536c2(0x19b)]({'showApplyButton':_0x561c5b,'showSuggestButton':_0x4f0fdc});}[_0x1bda56(0x172)](){const _0x51b8c7=_0x1bda56,_0xd0f848=new _0x3f52ac(this[_0x51b8c7(0x16b)]);return _0xd0f848[_0x51b8c7(0x18c)]({'icon':_0x1a59e8,'label':_0x15a3c4(this[_0x51b8c7(0x16b)],_0x51b8c7(0x18d)),'isVisible':!0x0}),_0xd0f848['on'](_0x51b8c7(0x191),()=>{const _0x3ee858=_0x51b8c7;this[_0x3ee858(0x193)](_0x3ee858(0x18e));}),_0xd0f848;}[_0x1bda56(0x19d)](){const _0x59f3e1=_0x1bda56,_0x3444fa=new _0x3f52ac(this[_0x59f3e1(0x16b)]);return _0x3444fa[_0x59f3e1(0x18c)]({'icon':_0x1d07ab,'label':_0x15a3c4(this[_0x59f3e1(0x16b)],_0x59f3e1(0x1ac)),'isVisible':!0x0}),_0x3444fa['on'](_0x59f3e1(0x191),()=>{const _0x341c1e=_0x59f3e1;this[_0x341c1e(0x193)](_0x341c1e(0x197));}),_0x3444fa;}}class ls extends _0x3ffc14{constructor(_0x11fd1e,_0x5f434e){const _0xe6ce5a=_0x1bda56;super(_0x11fd1e),this[_0xe6ce5a(0x177)]({'tag':_0xe6ce5a(0x170),'attributes':{'class':[_0xe6ce5a(0x1bc)]},'children':_0x5f434e});}}
23
+ const _0x14ac7e=_0x44a9;function _0x44a9(_0xeda290,_0x2af28c){const _0x8570d4=_0x8570();return _0x44a9=function(_0x44a98e,_0x3c059b){_0x44a98e=_0x44a98e-0x14c;let _0x194b5e=_0x8570d4[_0x44a98e];return _0x194b5e;},_0x44a9(_0xeda290,_0x2af28c);}(function(_0x5a52be,_0x2e2bea){const _0x3ae7fd=_0x44a9,_0x8172ea=_0x5a52be();while(!![]){try{const _0x478713=-parseInt(_0x3ae7fd(0x168))/0x1+parseInt(_0x3ae7fd(0x199))/0x2*(parseInt(_0x3ae7fd(0x17f))/0x3)+parseInt(_0x3ae7fd(0x177))/0x4*(-parseInt(_0x3ae7fd(0x16d))/0x5)+-parseInt(_0x3ae7fd(0x179))/0x6*(parseInt(_0x3ae7fd(0x16b))/0x7)+-parseInt(_0x3ae7fd(0x188))/0x8+parseInt(_0x3ae7fd(0x192))/0x9+parseInt(_0x3ae7fd(0x190))/0xa;if(_0x478713===_0x2e2bea)break;else _0x8172ea['push'](_0x8172ea['shift']());}catch(_0x59fc7a){_0x8172ea['push'](_0x8172ea['shift']());}}}(_0x8570,0x5fe4e));import{FocusTracker as _0x15e987,KeystrokeHandler as _0x3d0b4e}from'ckeditor5/src/utils.js';import{AISuggestionStreamableContentView as _0x5511a1}from'../../aicore/ui/suggestioncontainer/aisuggestionstreamablecontentview.js';import{AISuggestionContentPartToolbarView as _0x209e44}from'../../aicore/ui/suggestioncontainer/aisuggestioncontentparttoolbarview.js';import{AIMiniToolbarView as _0x54000f}from'../../aicore/ui/suggestioncontainer/aiminitoolbarview.js';import{AIBalloonView as _0x24f3bc}from'../../aiballoon/ui/aiballoonview.js';import{ButtonView as _0x150b2e,FocusCycler as _0x3b3ef1,View as _0xf64c10}from'ckeditor5/src/ui.js';import{AISuggestionContentPartStateView as _0x36e4b2}from'../../aicore/ui/suggestioncontainer/aisuggestioncontentpartstateview.js';import{IconChevronDown as _0x3bbc69,IconChevronUp as _0x30ca86}from'ckeditor5/src/icons.js';function _0x8570(){const _0x59db2e=['update','full','hideError','shift\x20+\x20tab','_state','_errorView','_config','keepErrors','isTrackChangesOn','focusLast','togglePartToolbarEnabled','has','previousButtonView','rejectSuggestion','_isErrorVisible','focus','ck-ai-chat-balloon__toolbar-container','toggleShowChanges','change:_state','add','isShowChangesOn','listenTo','612579KkmdFV','_miniToolbarView','showPrevious','35567vxICDZ','_togglePartToolbarButtonsVisibility','707425hAOQSb','bindTemplate','_toolbarContainerView','toggleRotatorButtonsVisibility','isEnabled','availableActions','addMany','render','div','insertSuggestion','16UFXGtm','fire','450qsMYkx','toggleSuggestionDisplayMode','destroy','applySuggestion','includes','_focusables','60693rATUkq','updateContent','isVisible','execute','pending','_createPreviousButtonView','_createNextButtonView','createCollection','showError','1578368TDAhed','showNext','showBlockingError','setState','_streamableContentView','change:isTrackChangesOn','delegate','_stateView','19863790zsGaLO','_partToolbarView','195084rMyXOI','element','AI_BALLOON_PREVIOUS_LABEL','locale','setTemplate','_keystrokes','_focusTracker','14ZuxQoP','nextButtonView','showDiff','focusCycler','ck-ai-chat-balloon-main_state_','setButtonsVisibility','children','focusFirst','AI_BALLOON_NEXT_LABEL','tab','bind','set','ck-ai-chat-balloon-main'];_0x8570=function(){return _0x59db2e;};return _0x8570();}import{getTranslation as _0x29a249}from'../../aicore/utils/common-translations.js';import'../../../theme/aichat/aichatballoon.css';export class AIChatBalloonView extends _0x24f3bc{[_0x14ac7e(0x19f)];[_0x14ac7e(0x19a)];[_0x14ac7e(0x15e)];[_0x14ac7e(0x19c)];[_0x14ac7e(0x17e)];[_0x14ac7e(0x198)];[_0x14ac7e(0x197)];[_0x14ac7e(0x158)];[_0x14ac7e(0x18c)];[_0x14ac7e(0x16f)];[_0x14ac7e(0x191)];[_0x14ac7e(0x18f)];[_0x14ac7e(0x169)];constructor(_0x2cfa18,_0x5895b6){const _0x216c2a=_0x14ac7e;super(_0x2cfa18);const _0x514d41=this[_0x216c2a(0x16e)];this[_0x216c2a(0x150)](_0x216c2a(0x19b),!0x1),this[_0x216c2a(0x150)](_0x216c2a(0x156),_0x216c2a(0x183)),this[_0x216c2a(0x198)]=new _0x15e987(),this[_0x216c2a(0x197)]=new _0x3d0b4e(),this[_0x216c2a(0x17e)]=this[_0x216c2a(0x186)](),this[_0x216c2a(0x19c)]=new _0x3b3ef1({'focusables':this[_0x216c2a(0x17e)],'focusTracker':this[_0x216c2a(0x198)],'keystrokeHandler':this[_0x216c2a(0x197)],'actions':{'focusPrevious':_0x216c2a(0x155),'focusNext':_0x216c2a(0x14e)}}),this[_0x216c2a(0x158)]=_0x5895b6,this[_0x216c2a(0x19a)]=this[_0x216c2a(0x185)](),this[_0x216c2a(0x15e)]=this[_0x216c2a(0x184)](),this[_0x216c2a(0x18c)]=new _0x5511a1(_0x2cfa18),this[_0x216c2a(0x191)]=new _0x209e44(_0x2cfa18,_0x5895b6[_0x216c2a(0x172)]),this[_0x216c2a(0x191)][_0x216c2a(0x18e)](_0x216c2a(0x17c),_0x216c2a(0x176),_0x216c2a(0x15f))['to'](this),this[_0x216c2a(0x16c)](_0x5895b6),this[_0x216c2a(0x18f)]=new _0x36e4b2(_0x2cfa18),this[_0x216c2a(0x18f)][_0x216c2a(0x181)]=!0x1,this[_0x216c2a(0x169)]=new _0x54000f(_0x2cfa18,{'showChanges':_0x216c2a(0x153)}),this[_0x216c2a(0x169)][_0x216c2a(0x14f)](_0x216c2a(0x166))['to'](this,_0x216c2a(0x19b)),this[_0x216c2a(0x169)]['on'](_0x216c2a(0x163),()=>{const _0x1bb895=_0x216c2a;this[_0x1bb895(0x178)](_0x1bb895(0x17a));}),this[_0x216c2a(0x16f)]=new ms(_0x2cfa18,[this[_0x216c2a(0x191)],this[_0x216c2a(0x18f)],this[_0x216c2a(0x169)]]),this[_0x216c2a(0x19f)]=this[_0x216c2a(0x186)]([this[_0x216c2a(0x18c)],this[_0x216c2a(0x16f)]]),this['on'](_0x216c2a(0x164),(_0x16f004,_0x11e4e1,_0x4491df,_0x1d7e1c)=>{const _0x58aac9=_0x216c2a;let _0x228f04,_0x11772d;_0x58aac9(0x183)===_0x1d7e1c?(_0x228f04=this[_0x58aac9(0x191)],_0x11772d=this[_0x58aac9(0x18f)]):(_0x228f04=this[_0x58aac9(0x18f)],_0x11772d=this[_0x58aac9(0x191)]),this[_0x58aac9(0x18f)][_0x58aac9(0x18b)](_0x4491df),_0x228f04[_0x58aac9(0x181)]=!0x1,_0x11772d[_0x58aac9(0x181)]=!0x0;}),this[_0x216c2a(0x196)]({'tag':_0x216c2a(0x175),'attributes':{'class':['ck',_0x216c2a(0x151),_0x514d41['to'](_0x216c2a(0x156),_0x31a5b3=>_0x216c2a(0x19d)+_0x31a5b3)]},'children':this[_0x216c2a(0x19f)]}),this['on'](_0x216c2a(0x18d),()=>{const _0x586ae6=_0x216c2a;this[_0x586ae6(0x16c)](_0x5895b6);});}[_0x14ac7e(0x174)](){const _0x14a9fd=_0x14ac7e;super[_0x14a9fd(0x174)](),this[_0x14a9fd(0x19a)][_0x14a9fd(0x174)](),this[_0x14a9fd(0x15e)][_0x14a9fd(0x174)](),this[_0x14a9fd(0x198)][_0x14a9fd(0x165)](this[_0x14a9fd(0x193)]),this[_0x14a9fd(0x198)][_0x14a9fd(0x165)](this[_0x14a9fd(0x19a)]),this[_0x14a9fd(0x198)][_0x14a9fd(0x165)](this[_0x14a9fd(0x15e)]),this[_0x14a9fd(0x198)][_0x14a9fd(0x165)](this[_0x14a9fd(0x169)]),this[_0x14a9fd(0x198)][_0x14a9fd(0x165)](this[_0x14a9fd(0x191)]),this[_0x14a9fd(0x197)][_0x14a9fd(0x167)](this[_0x14a9fd(0x193)]),this[_0x14a9fd(0x197)][_0x14a9fd(0x167)](this[_0x14a9fd(0x19a)][_0x14a9fd(0x193)]),this[_0x14a9fd(0x197)][_0x14a9fd(0x167)](this[_0x14a9fd(0x15e)][_0x14a9fd(0x193)]),this[_0x14a9fd(0x17e)][_0x14a9fd(0x173)]([this[_0x14a9fd(0x19a)],this[_0x14a9fd(0x15e)],this[_0x14a9fd(0x191)],this[_0x14a9fd(0x169)]]);}[_0x14ac7e(0x17b)](){const _0x17cc24=_0x14ac7e;super[_0x17cc24(0x17b)](),this[_0x17cc24(0x15e)][_0x17cc24(0x17b)](),this[_0x17cc24(0x19a)][_0x17cc24(0x17b)]();}[_0x14ac7e(0x161)](){const _0x4eb3ae=_0x14ac7e;this[_0x4eb3ae(0x19c)][_0x4eb3ae(0x14c)]();}[_0x14ac7e(0x15b)](){const _0x8466fa=_0x14ac7e;this[_0x8466fa(0x19c)][_0x8466fa(0x15b)]();}async[_0x14ac7e(0x180)](_0x32bf7a){const _0x842fb4=_0x14ac7e;_0x32bf7a?.[_0x842fb4(0x159)]||this[_0x842fb4(0x154)](),await this[_0x842fb4(0x18c)][_0x842fb4(0x152)](_0x32bf7a);}[_0x14ac7e(0x18b)](_0x902dda){const _0x291380=_0x14ac7e;this[_0x291380(0x156)]=_0x902dda;}[_0x14ac7e(0x187)](_0x284d50){const _0x4c9568=_0x14ac7e;super[_0x4c9568(0x187)](_0x284d50),this[_0x4c9568(0x19f)][_0x4c9568(0x15d)](this[_0x4c9568(0x157)])||this[_0x4c9568(0x19f)][_0x4c9568(0x165)](this[_0x4c9568(0x157)],0x0);}[_0x14ac7e(0x154)](){const _0x32af5e=_0x14ac7e;this[_0x32af5e(0x160)]&&(super[_0x32af5e(0x154)](),this[_0x32af5e(0x15c)](!0x0));}[_0x14ac7e(0x18a)](_0x4bb4e4){const _0x16638c=_0x14ac7e;super[_0x16638c(0x18a)](_0x4bb4e4),this[_0x16638c(0x15c)](!0x1);}[_0x14ac7e(0x170)](_0x3789f1){const _0x5ad71d=_0x14ac7e;this[_0x5ad71d(0x19a)][_0x5ad71d(0x181)]=this[_0x5ad71d(0x15e)][_0x5ad71d(0x181)]=_0x3789f1;}[_0x14ac7e(0x15c)](_0x1496f1){const _0x3e010c=_0x14ac7e;this[_0x3e010c(0x191)][_0x3e010c(0x171)]=_0x1496f1;}[_0x14ac7e(0x16c)]({showApplyButton:_0x55ef76,showSuggestButton:_0x8be686}){const _0x8b0f6e=_0x14ac7e;_0x55ef76=_0x55ef76&&!this[_0x8b0f6e(0x15a)]&&this[_0x8b0f6e(0x158)][_0x8b0f6e(0x172)][_0x8b0f6e(0x17d)](_0x8b0f6e(0x17c)),_0x8be686=_0x8be686&&this[_0x8b0f6e(0x158)][_0x8b0f6e(0x172)][_0x8b0f6e(0x17d)](_0x8b0f6e(0x176)),this[_0x8b0f6e(0x191)][_0x8b0f6e(0x19e)]({'showApplyButton':_0x55ef76,'showSuggestButton':_0x8be686});}[_0x14ac7e(0x185)](){const _0xb2e927=_0x14ac7e,_0x31ee4c=new _0x150b2e(this[_0xb2e927(0x195)]);return _0x31ee4c[_0xb2e927(0x150)]({'icon':_0x3bbc69,'label':_0x29a249(this[_0xb2e927(0x195)],_0xb2e927(0x14d)),'isVisible':!0x0}),_0x31ee4c['on'](_0xb2e927(0x182),()=>{const _0x1babbb=_0xb2e927;this[_0x1babbb(0x178)](_0x1babbb(0x189));}),_0x31ee4c;}[_0x14ac7e(0x184)](){const _0x4b9e25=_0x14ac7e,_0x528b00=new _0x150b2e(this[_0x4b9e25(0x195)]);return _0x528b00[_0x4b9e25(0x150)]({'icon':_0x30ca86,'label':_0x29a249(this[_0x4b9e25(0x195)],_0x4b9e25(0x194)),'isVisible':!0x0}),_0x528b00['on'](_0x4b9e25(0x182),()=>{const _0x4a5851=_0x4b9e25;this[_0x4a5851(0x178)](_0x4a5851(0x16a));}),_0x528b00;}}class ms extends _0xf64c10{constructor(_0x3a8261,_0x314179){const _0x222e15=_0x14ac7e;super(_0x3a8261),this[_0x222e15(0x196)]({'tag':_0x222e15(0x175),'attributes':{'class':[_0x222e15(0x162)]},'children':_0x314179});}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x4b2054=_0x5d2d;(function(_0x3d603e,_0x18b840){const _0x1ceacf=_0x5d2d,_0x3c397b=_0x3d603e();while(!![]){try{const _0x3fc255=-parseInt(_0x1ceacf(0x1d5))/0x1+-parseInt(_0x1ceacf(0x1ef))/0x2+parseInt(_0x1ceacf(0x20d))/0x3*(parseInt(_0x1ceacf(0x20f))/0x4)+parseInt(_0x1ceacf(0x1e2))/0x5+parseInt(_0x1ceacf(0x1e4))/0x6*(-parseInt(_0x1ceacf(0x1c5))/0x7)+-parseInt(_0x1ceacf(0x1f7))/0x8+parseInt(_0x1ceacf(0x1f4))/0x9;if(_0x3fc255===_0x18b840)break;else _0x3c397b['push'](_0x3c397b['shift']());}catch(_0x3a5df4){_0x3c397b['push'](_0x3c397b['shift']());}}}(_0x288e,0xeacbc));function _0x5d2d(_0xbb7381,_0x504f9e){const _0x288ee7=_0x288e();return _0x5d2d=function(_0x5d2d0b,_0xab74f){_0x5d2d0b=_0x5d2d0b-0x1c3;let _0x3d5170=_0x288ee7[_0x5d2d0b];return _0x3d5170;},_0x5d2d(_0xbb7381,_0x504f9e);}import{ButtonView as _0x23a1d5,clickOutsideHandler as _0x4111f5,View as _0x489404}from'ckeditor5/src/ui.js';import{AIChatPromptInputView as _0x97b6ad}from'./controls/aichatpromptinputview.js';import{AIChatPromptCapabilitiesView as _0x474a45}from'./controls/aichatpromptcapabilitiesview.js';import{AIChatContextPanelView as _0x54a01b,CONTEXT_PANEL_VIEW_EVENT_NAMES as _0x4a4b89}from'./controls/aichatcontextpanelview.js';import{AIChatControlsLoaderView as _0x2c0e94}from'./controls/aichatcontrolsloaderview.js';import{getTranslation as _0xba7497}from'../../aicore/utils/common-translations.js';import'../../../theme/aichat/aichat-controls.css';import'../../../theme/aichat/aichat-controls/prompt-input.css';import'../../../theme/aichat/aichat-controls/prompt-capabilities.css';function _0x288e(){const _0x4bf9e4=['startConversation','_shouldRestorePromptInputFocus','setAddContextOptions','74795tlKrvB','value','isModelAvailable','setTemplate','_createModelUnavailableMessageView','clearPendingContextUI','toggleWebSearch','div','bindTemplate','AI_CHAT_MODEL_UNAVAILABLE_MESSAGE_TEXT','addContextItem','_contextPanelView','setReasoning','setModelList','ck-ai-chat-controls__start-new-chat-button','focusPromptInput','1216137YfLHtg','change:isLoading','focus','clearConversationContextUI','setIsUploadInProgress','closeSourceResourceBalloon','ck-ai-chat-controls','locale','_createLoaderView','resetMessageInput','populateSourceResourceBalloon','form','_handlePromptInputFocus','5363165mPToyd','set','996ZoLGxo','abortPromptStream','setContextItemLoading','disableModelSelector','setInputPlaceholder','clearCurrentContextItems','delegate','addContextButtonView','setModel','updateResourceState','setPromptInputValue','565290tcjuRs','bodyCollection','_createPromptCapabilitiesView','_loaderView','isLoading','29522421UtCRFg','element','toggleReasoning','15008824pGKteB','removeContextItem','_promptInputView','_promptCapabilitiesView','ck-ai-chat-controls-model-unavailable-message','contextResourcesSearchInputVisibleFrom','_createPromptInputView','AI_CHAT_MODEL_UNAVAILABLE_MESSAGE_BUTTON','setPlaceholderText','selectModel','execute','clearConversationContextItems','fieldView','setWebSearch','low','_modelUnavailableMessageView','enableModelSelector','queryView','sendUserMessage','reset','ck-ai-chat-controls-disabled','setConversationContext','3ARexph','ck-hidden','7029668rrouIQ','isDisabled','_createContextPanelView'];_0x288e=function(){return _0x4bf9e4;};return _0x288e();}import'../../../theme/aichat/aichat-controls/model-unavailable-message.css';import'../../../theme/aichat/aichat-controls/aichat-context-controls.css';import'../../../theme/aichat/aichat-controls/aichat-context-chip.css';import'../../../theme/aichat/aichat-controls/aichat-controls-button.css';import'../../../theme/aichat/aichat-controls/aichat-controls-loader.css';import'../../../theme/aichat/aichat-controls/aichat-context-controls-balloon-panels.css';export class AIChatControlsView extends _0x489404{[_0x4b2054(0x1d0)];[_0x4b2054(0x1f9)];[_0x4b2054(0x1fa)];[_0x4b2054(0x1f2)];[_0x4b2054(0x206)];[_0x4b2054(0x1c3)];constructor(_0x12bb05,_0x482d31){const _0x598715=_0x4b2054;super(_0x12bb05),this[_0x598715(0x1d0)]=this[_0x598715(0x211)](_0x12bb05,{'bodyCollection':_0x482d31[_0x598715(0x1f0)],'searchInputVisibleFrom':_0x482d31[_0x598715(0x1fc)]}),this[_0x598715(0x1f9)]=this[_0x598715(0x1fd)](_0x12bb05),this[_0x598715(0x1fa)]=this[_0x598715(0x1f1)](_0x12bb05),this[_0x598715(0x1f2)]=this[_0x598715(0x1dd)](_0x12bb05),this[_0x598715(0x206)]=this[_0x598715(0x1c9)](_0x12bb05),this[_0x598715(0x1c3)]=!0x1,this[_0x598715(0x1f9)][_0x598715(0x1ea)](_0x598715(0x209))['to'](this),this[_0x598715(0x1f2)][_0x598715(0x1ea)](_0x598715(0x1e5))['to'](this),this[_0x598715(0x1fa)][_0x598715(0x1ea)](_0x598715(0x1cb))['to'](this),this[_0x598715(0x1fa)][_0x598715(0x1ea)](_0x598715(0x1f6))['to'](this),this[_0x598715(0x1fa)][_0x598715(0x1ea)](_0x598715(0x200))['to'](this),this[_0x598715(0x1d0)][_0x598715(0x1ea)](..._0x4a4b89)['to'](this),this[_0x598715(0x1e3)](_0x598715(0x1c7),!0x0),this[_0x598715(0x1e3)](_0x598715(0x210),!0x1);const _0x3e9678=this[_0x598715(0x1cd)];this[_0x598715(0x1c8)]({'tag':_0x598715(0x1e0),'attributes':{'class':['ck',_0x598715(0x1db),_0x3e9678['if'](_0x598715(0x210),_0x598715(0x20b))]},'children':[{'tag':_0x598715(0x1cc),'attributes':{'class':[_0x3e9678['if'](_0x598715(0x1f3),_0x598715(0x20e),_0x473c51=>_0x473c51||!this[_0x598715(0x1c7)]),_0x3e9678['if'](_0x598715(0x1c7),_0x598715(0x20e),_0x36cc84=>!_0x36cc84||this[_0x598715(0x1f3)])]},'children':[this[_0x598715(0x1d0)],this[_0x598715(0x1f9)],this[_0x598715(0x1fa)]]},{'tag':_0x598715(0x1cc),'attributes':{'class':[_0x3e9678['if'](_0x598715(0x1f3),_0x598715(0x20e),_0x24e6f7=>!_0x24e6f7)]},'children':[this[_0x598715(0x1f2)]]},{'tag':_0x598715(0x1cc),'attributes':{'class':[_0x3e9678['if'](_0x598715(0x1c7),_0x598715(0x20e),_0x5fe739=>_0x5fe739)]},'children':[this[_0x598715(0x206)]]}]}),_0x4111f5({'emitter':this[_0x598715(0x1f9)],'activator':()=>this[_0x598715(0x1f3)],'contextElements':()=>[this[_0x598715(0x1f5)]],'callback':()=>{const _0x5e26d0=_0x598715;this[_0x5e26d0(0x1c3)]=!0x1;}}),this['on'](_0x598715(0x1d6),this[_0x598715(0x1e1)],{'priority':_0x598715(0x205)});}[_0x4b2054(0x211)](_0x20837e,_0x20681f){return new _0x54a01b(_0x20837e,_0x20681f);}[_0x4b2054(0x1fd)](_0x386413){const _0x117646=_0x4b2054;return new _0x97b6ad(_0x386413,this[_0x117646(0x1d0)][_0x117646(0x1eb)]);}[_0x4b2054(0x1f1)](_0x77c049){return new _0x474a45(_0x77c049);}[_0x4b2054(0x1dd)](_0x21d9ae){return new _0x2c0e94(_0x21d9ae);}[_0x4b2054(0x1c9)](_0x1e60d5){const _0x12b58c=_0x4b2054,_0x3552f2=new _s(_0x1e60d5);return _0x3552f2[_0x12b58c(0x1ea)](_0x12b58c(0x212))['to'](this),_0x3552f2;}[_0x4b2054(0x1e1)](_0x5e81a5,_0x151c6c,_0x59689e){const _0x29fbdb=_0x4b2054;_0x59689e?this[_0x29fbdb(0x1c3)]=!0x0:this[_0x29fbdb(0x1c3)]&&this[_0x29fbdb(0x1f9)][_0x29fbdb(0x1d7)]();}[_0x4b2054(0x1cf)](_0xaf0c30,_0x88bb8b){const _0x3c2b8a=_0x4b2054;this[_0x3c2b8a(0x1d0)][_0x3c2b8a(0x1cf)](_0xaf0c30,_0x88bb8b);}[_0x4b2054(0x1f8)](_0x3f8ca4){const _0x462866=_0x4b2054;this[_0x462866(0x1d0)][_0x462866(0x1f8)](_0x3f8ca4);}[_0x4b2054(0x1e6)](_0x46e240,_0x32ae25){const _0x555420=_0x4b2054;this[_0x555420(0x1d0)][_0x555420(0x1e6)](_0x46e240,_0x32ae25);}[_0x4b2054(0x1d9)](_0xbec87){const _0x454c87=_0x4b2054;this[_0x454c87(0x1f9)][_0x454c87(0x1d9)](_0xbec87);}[_0x4b2054(0x20c)](_0x120253){const _0x3347bc=_0x4b2054;this[_0x3347bc(0x1d0)][_0x3347bc(0x20c)](_0x120253);}[_0x4b2054(0x1ca)](){const _0x14320d=_0x4b2054;this[_0x14320d(0x1d0)][_0x14320d(0x1e9)]();}[_0x4b2054(0x1d8)](){const _0x2618f8=_0x4b2054;this[_0x2618f8(0x1d0)][_0x2618f8(0x202)]();}[_0x4b2054(0x1ed)](_0x30cfb5,_0x4b2678,_0xe56d33){const _0x490482=_0x4b2054;this[_0x490482(0x1d0)][_0x490482(0x1ed)](_0x30cfb5,_0x4b2678,_0xe56d33);}[_0x4b2054(0x204)](_0xfcc63d){const _0x37ce56=_0x4b2054;this[_0x37ce56(0x1fa)][_0x37ce56(0x204)](_0xfcc63d);}[_0x4b2054(0x1d1)](_0xa31bc7){const _0x53cf9f=_0x4b2054;this[_0x53cf9f(0x1fa)][_0x53cf9f(0x1d1)](_0xa31bc7);}[_0x4b2054(0x1de)](){const _0x7aeffe=_0x4b2054;this[_0x7aeffe(0x1f9)][_0x7aeffe(0x20a)]();}[_0x4b2054(0x1c4)](_0x1eadde){const _0x56a11e=_0x4b2054;this[_0x56a11e(0x1d0)][_0x56a11e(0x1c4)](_0x1eadde);}[_0x4b2054(0x1e8)](_0x36e1a6){const _0xe2f6c7=_0x4b2054;this[_0xe2f6c7(0x1f9)][_0xe2f6c7(0x1ff)](_0x36e1a6);}[_0x4b2054(0x1d2)](_0x146b76,_0x220693){const _0x3f15d7=_0x4b2054;this[_0x3f15d7(0x1fa)][_0x3f15d7(0x1d2)](_0x146b76,_0x220693);}[_0x4b2054(0x1ec)](_0x14ae75){const _0x39c680=_0x4b2054;_0x14ae75?(this[_0x39c680(0x1c7)]=!0x0,this[_0x39c680(0x1fa)][_0x39c680(0x1ec)](_0x14ae75)):this[_0x39c680(0x1c7)]=!0x1;}[_0x4b2054(0x207)](){const _0x5efd56=_0x4b2054;this[_0x5efd56(0x1fa)][_0x5efd56(0x207)]();}[_0x4b2054(0x1e7)](_0x39ff65){const _0x153c24=_0x4b2054;this[_0x153c24(0x1fa)][_0x153c24(0x1e7)](_0x39ff65);}[_0x4b2054(0x1df)](_0x1402b8,_0xd467b1,_0x50a5f5,_0x22fc7d){const _0x22a0d1=_0x4b2054;this[_0x22a0d1(0x1d0)][_0x22a0d1(0x1df)](_0x1402b8,_0xd467b1,_0x50a5f5,_0x22fc7d);}[_0x4b2054(0x1da)](_0x298182){const _0x5cd0da=_0x4b2054;this[_0x5cd0da(0x1d0)][_0x5cd0da(0x1da)](_0x298182);}[_0x4b2054(0x1d4)](_0x39ba21=!0x1){const _0x20b8b7=_0x4b2054;this[_0x20b8b7(0x1f9)][_0x20b8b7(0x1d7)](_0x39ba21);}[_0x4b2054(0x1ee)](_0x481460){const _0x9ee389=_0x4b2054;this[_0x9ee389(0x1f9)][_0x9ee389(0x208)][_0x9ee389(0x203)][_0x9ee389(0x20a)](),this[_0x9ee389(0x1f9)][_0x9ee389(0x208)][_0x9ee389(0x203)][_0x9ee389(0x1c6)]=_0x481460;}}class _s extends _0x489404{constructor(_0x577d9f){const _0x4064d1=_0x4b2054;super(_0x577d9f);const _0x6de4f6=new _0x23a1d5(_0x577d9f);_0x6de4f6[_0x4064d1(0x1e3)]({'label':_0xba7497(this[_0x4064d1(0x1dc)],_0x4064d1(0x1fe)),'withText':!0x0,'class':[_0x4064d1(0x1d3)],'tooltip':''}),_0x6de4f6[_0x4064d1(0x1ea)](_0x4064d1(0x201))['to'](this,_0x4064d1(0x212)),this[_0x4064d1(0x1c8)]({'tag':_0x4064d1(0x1cc),'attributes':{'class':['ck',_0x4064d1(0x1fb)]},'children':[{'tag':'p','children':[{'text':_0xba7497(this[_0x4064d1(0x1dc)],_0x4064d1(0x1ce))+'\x20'},_0x6de4f6]}]});}}
23
+ const _0xbff82f=_0x3cb4;(function(_0x26a2c2,_0x109b7c){const _0x53ee11=_0x3cb4,_0x3507d3=_0x26a2c2();while(!![]){try{const _0x2e11d9=parseInt(_0x53ee11(0xd8))/0x1+parseInt(_0x53ee11(0xf7))/0x2+-parseInt(_0x53ee11(0xe2))/0x3*(parseInt(_0x53ee11(0xeb))/0x4)+-parseInt(_0x53ee11(0xbd))/0x5*(parseInt(_0x53ee11(0xc5))/0x6)+-parseInt(_0x53ee11(0xfb))/0x7*(parseInt(_0x53ee11(0x106))/0x8)+-parseInt(_0x53ee11(0xba))/0x9+-parseInt(_0x53ee11(0xdf))/0xa*(-parseInt(_0x53ee11(0xe8))/0xb);if(_0x2e11d9===_0x109b7c)break;else _0x3507d3['push'](_0x3507d3['shift']());}catch(_0x29f8ba){_0x3507d3['push'](_0x3507d3['shift']());}}}(_0x1eb1,0xf166c));import{ButtonView as _0x49d402,clickOutsideHandler as _0x3ce49b,View as _0x12c691}from'ckeditor5/src/ui.js';import{AIChatPromptInputView as _0x4d955d}from'./controls/aichatpromptinputview.js';import{AIChatPromptCapabilitiesView as _0x43a070}from'./controls/aichatpromptcapabilitiesview.js';import{AIChatContextPanelView as _0x3e9b12,CONTEXT_PANEL_VIEW_EVENT_NAMES as _0x5d5901}from'./controls/aichatcontextpanelview.js';import{AIChatControlsLoaderView as _0x280c11}from'./controls/aichatcontrolsloaderview.js';import{getTranslation as _0x934eea}from'../../aicore/utils/common-translations.js';import'../../../theme/aichat/aichat-controls.css';import'../../../theme/aichat/aichat-controls/prompt-input.css';import'../../../theme/aichat/aichat-controls/prompt-capabilities.css';import'../../../theme/aichat/aichat-controls/model-unavailable-message.css';import'../../../theme/aichat/aichat-controls/aichat-context-controls.css';import'../../../theme/aichat/aichat-controls/aichat-context-chip.css';import'../../../theme/aichat/aichat-controls/aichat-controls-button.css';function _0x3cb4(_0x2f5d95,_0x52d84a){const _0x1eb184=_0x1eb1();return _0x3cb4=function(_0x3cb4a9,_0x4c9c10){_0x3cb4a9=_0x3cb4a9-0xb9;let _0x5e0209=_0x1eb184[_0x3cb4a9];return _0x5e0209;},_0x3cb4(_0x2f5d95,_0x52d84a);}import'../../../theme/aichat/aichat-controls/aichat-controls-loader.css';function _0x1eb1(){const _0x1b7d6f=['clearConversationContextItems','startConversation','_promptInputView','363818ATjzHk','value','disableModelSelector','closeSourceResourceBalloon','_createContextPanelView','setModelList','clearConversationContextUI','1734830WFLlHd','ck-ai-chat-controls__start-new-chat-button','_createModelUnavailableMessageView','5309193VTpxzC','_createLoaderView','ck-ai-chat-controls','focus','_promptCapabilitiesView','low','352rmIfaX','populateSourceResourceBalloon','_createPromptCapabilitiesView','4DAdVaO','setReasoning','toggleReasoning','sendUserMessage','_modelUnavailableMessageView','setInputPlaceholder','bodyCollection','element','fieldView','setAddContextOptions','setConversationContext','form','1618146ZjeYsg','_contextPanelView','toggleWebSearch','_handlePromptInputFocus','273vrOREb','_loaderView','clearPendingContextUI','setPlaceholderText','_createPromptInputView','clearCurrentContextItems','locale','ck-ai-chat-controls-disabled','updateResourceState','contextResourcesSearchInputVisibleFrom','addContextButtonView','315320mZKJMf','addContextItem','isDisabled','focusPromptInput','AI_CHAT_MODEL_UNAVAILABLE_MESSAGE_TEXT','setPromptInputValue','6432831QfeGnO','setWebSearch','execute','20FclGiq','setTemplate','change:isLoading','_shouldRestorePromptInputFocus','isModelAvailable','div','selectModel','isLoading','2570838yuodKK','reset','setContextItemLoading','enableModelSelector','set','removeContextItem','AI_CHAT_MODEL_UNAVAILABLE_MESSAGE_BUTTON','delegate','abortPromptStream','ck-hidden','resetMessageInput','queryView','bindTemplate','setIsUploadInProgress','setModel','ck-ai-chat-controls-model-unavailable-message'];_0x1eb1=function(){return _0x1b7d6f;};return _0x1eb1();}import'../../../theme/aichat/aichat-controls/aichat-context-controls-balloon-panels.css';export class AIChatControlsView extends _0x12c691{[_0xbff82f(0xf8)];[_0xbff82f(0xd7)];[_0xbff82f(0xe6)];[_0xbff82f(0xfc)];[_0xbff82f(0xef)];[_0xbff82f(0xc0)];constructor(_0x35a9c6,_0x3f5291){const _0x50b444=_0xbff82f;super(_0x35a9c6),this[_0x50b444(0xf8)]=this[_0x50b444(0xdc)](_0x35a9c6,{'bodyCollection':_0x3f5291[_0x50b444(0xf1)],'searchInputVisibleFrom':_0x3f5291[_0x50b444(0x104)]}),this[_0x50b444(0xd7)]=this[_0x50b444(0xff)](_0x35a9c6),this[_0x50b444(0xe6)]=this[_0x50b444(0xea)](_0x35a9c6),this[_0x50b444(0xfc)]=this[_0x50b444(0xe3)](_0x35a9c6),this[_0x50b444(0xef)]=this[_0x50b444(0xe1)](_0x35a9c6),this[_0x50b444(0xc0)]=!0x1,this[_0x50b444(0xd7)][_0x50b444(0xcc)](_0x50b444(0xee))['to'](this),this[_0x50b444(0xfc)][_0x50b444(0xcc)](_0x50b444(0xcd))['to'](this),this[_0x50b444(0xe6)][_0x50b444(0xcc)](_0x50b444(0xf9))['to'](this),this[_0x50b444(0xe6)][_0x50b444(0xcc)](_0x50b444(0xed))['to'](this),this[_0x50b444(0xe6)][_0x50b444(0xcc)](_0x50b444(0xc3))['to'](this),this[_0x50b444(0xf8)][_0x50b444(0xcc)](..._0x5d5901)['to'](this),this[_0x50b444(0xc9)](_0x50b444(0xc1),!0x0),this[_0x50b444(0xc9)](_0x50b444(0x108),!0x1);const _0x1ab272=this[_0x50b444(0xd1)];this[_0x50b444(0xbe)]({'tag':_0x50b444(0xf6),'attributes':{'class':['ck',_0x50b444(0xe4),_0x1ab272['if'](_0x50b444(0x108),_0x50b444(0x102))]},'children':[{'tag':_0x50b444(0xc2),'attributes':{'class':[_0x1ab272['if'](_0x50b444(0xc4),_0x50b444(0xce),_0x5eef63=>_0x5eef63||!this[_0x50b444(0xc1)]),_0x1ab272['if'](_0x50b444(0xc1),_0x50b444(0xce),_0x33cf1a=>!_0x33cf1a||this[_0x50b444(0xc4)])]},'children':[this[_0x50b444(0xf8)],this[_0x50b444(0xd7)],this[_0x50b444(0xe6)]]},{'tag':_0x50b444(0xc2),'attributes':{'class':[_0x1ab272['if'](_0x50b444(0xc4),_0x50b444(0xce),_0x15ee09=>!_0x15ee09)]},'children':[this[_0x50b444(0xfc)]]},{'tag':_0x50b444(0xc2),'attributes':{'class':[_0x1ab272['if'](_0x50b444(0xc1),_0x50b444(0xce),_0x38914b=>_0x38914b)]},'children':[this[_0x50b444(0xef)]]}]}),_0x3ce49b({'emitter':this[_0x50b444(0xd7)],'activator':()=>this[_0x50b444(0xc4)],'contextElements':()=>[this[_0x50b444(0xf2)]],'callback':()=>{const _0x2dc267=_0x50b444;this[_0x2dc267(0xc0)]=!0x1;}}),this['on'](_0x50b444(0xbf),this[_0x50b444(0xfa)],{'priority':_0x50b444(0xe7)});}[_0xbff82f(0xdc)](_0x32dd84,_0x437116){return new _0x3e9b12(_0x32dd84,_0x437116);}[_0xbff82f(0xff)](_0x4a6cf0){const _0x481439=_0xbff82f;return new _0x4d955d(_0x4a6cf0,this[_0x481439(0xf8)][_0x481439(0x105)]);}[_0xbff82f(0xea)](_0x5770c9){return new _0x43a070(_0x5770c9);}[_0xbff82f(0xe3)](_0x27e65c){return new _0x280c11(_0x27e65c);}[_0xbff82f(0xe1)](_0x1a5ebc){const _0x5aa44e=_0xbff82f,_0x2edd0b=new As(_0x1a5ebc);return _0x2edd0b[_0x5aa44e(0xcc)](_0x5aa44e(0xd6))['to'](this),_0x2edd0b;}[_0xbff82f(0xfa)](_0x33ece6,_0x38ae23,_0x102b48){const _0x5f1ee1=_0xbff82f;_0x102b48?this[_0x5f1ee1(0xc0)]=!0x0:this[_0x5f1ee1(0xc0)]&&this[_0x5f1ee1(0xd7)][_0x5f1ee1(0xe5)]();}[_0xbff82f(0x107)](_0x45c3d3,_0x346044){const _0x48fbf0=_0xbff82f;this[_0x48fbf0(0xf8)][_0x48fbf0(0x107)](_0x45c3d3,_0x346044);}[_0xbff82f(0xca)](_0x16f852){const _0x3a06a7=_0xbff82f;this[_0x3a06a7(0xf8)][_0x3a06a7(0xca)](_0x16f852);}[_0xbff82f(0xc7)](_0x40f4dd,_0x1ffe8e){const _0x3570c1=_0xbff82f;this[_0x3570c1(0xf8)][_0x3570c1(0xc7)](_0x40f4dd,_0x1ffe8e);}[_0xbff82f(0xd2)](_0xcfbddd){const _0x3180b4=_0xbff82f;this[_0x3180b4(0xd7)][_0x3180b4(0xd2)](_0xcfbddd);}[_0xbff82f(0xf5)](_0x476502){const _0x1f10d5=_0xbff82f;this[_0x1f10d5(0xf8)][_0x1f10d5(0xf5)](_0x476502);}[_0xbff82f(0xfd)](){const _0x1c796d=_0xbff82f;this[_0x1c796d(0xf8)][_0x1c796d(0x100)]();}[_0xbff82f(0xde)](){const _0x48876c=_0xbff82f;this[_0x48876c(0xf8)][_0x48876c(0xd5)]();}[_0xbff82f(0x103)](_0xb14468,_0x5a30d7,_0x2ed5af){const _0x263f88=_0xbff82f;this[_0x263f88(0xf8)][_0x263f88(0x103)](_0xb14468,_0x5a30d7,_0x2ed5af);}[_0xbff82f(0xbb)](_0x6b28f0){const _0x1e7d11=_0xbff82f;this[_0x1e7d11(0xe6)][_0x1e7d11(0xbb)](_0x6b28f0);}[_0xbff82f(0xec)](_0x1ad79d){const _0x91e545=_0xbff82f;this[_0x91e545(0xe6)][_0x91e545(0xec)](_0x1ad79d);}[_0xbff82f(0xcf)](){const _0xcf1368=_0xbff82f;this[_0xcf1368(0xd7)][_0xcf1368(0xc6)]();}[_0xbff82f(0xf4)](_0x391d7d){const _0x3ef841=_0xbff82f;this[_0x3ef841(0xf8)][_0x3ef841(0xf4)](_0x391d7d);}[_0xbff82f(0xf0)](_0x5728b3){const _0x428afe=_0xbff82f;this[_0x428afe(0xd7)][_0x428afe(0xfe)](_0x5728b3);}[_0xbff82f(0xdd)](_0x131fbb,_0xce6864){const _0x1a9682=_0xbff82f;this[_0x1a9682(0xe6)][_0x1a9682(0xdd)](_0x131fbb,_0xce6864);}[_0xbff82f(0xd3)](_0x143ee1){const _0x2aa21c=_0xbff82f;_0x143ee1?(this[_0x2aa21c(0xc1)]=!0x0,this[_0x2aa21c(0xe6)][_0x2aa21c(0xd3)](_0x143ee1)):this[_0x2aa21c(0xc1)]=!0x1;}[_0xbff82f(0xc8)](){const _0x48cc03=_0xbff82f;this[_0x48cc03(0xe6)][_0x48cc03(0xc8)]();}[_0xbff82f(0xda)](_0x200102){const _0x1322bc=_0xbff82f;this[_0x1322bc(0xe6)][_0x1322bc(0xda)](_0x200102);}[_0xbff82f(0xe9)](_0x14e44e,_0x950b1d,_0xe21b6f,_0x7dbd8b){const _0x488ba4=_0xbff82f;this[_0x488ba4(0xf8)][_0x488ba4(0xe9)](_0x14e44e,_0x950b1d,_0xe21b6f,_0x7dbd8b);}[_0xbff82f(0xdb)](_0x1fe069){const _0xce826a=_0xbff82f;this[_0xce826a(0xf8)][_0xce826a(0xdb)](_0x1fe069);}[_0xbff82f(0x109)](_0x4ad666=!0x1){const _0x4ccb96=_0xbff82f;this[_0x4ccb96(0xd7)][_0x4ccb96(0xe5)](_0x4ad666);}[_0xbff82f(0xb9)](_0x42b207){const _0x29e244=_0xbff82f;this[_0x29e244(0xd7)][_0x29e244(0xd0)][_0x29e244(0xf3)][_0x29e244(0xc6)](),this[_0x29e244(0xd7)][_0x29e244(0xd0)][_0x29e244(0xf3)][_0x29e244(0xd9)]=_0x42b207;}}class As extends _0x12c691{constructor(_0x67b539){const _0xa79575=_0xbff82f;super(_0x67b539);const _0x38e38c=new _0x49d402(_0x67b539);_0x38e38c[_0xa79575(0xc9)]({'label':_0x934eea(this[_0xa79575(0x101)],_0xa79575(0xcb)),'withText':!0x0,'class':[_0xa79575(0xe0)],'tooltip':''}),_0x38e38c[_0xa79575(0xcc)](_0xa79575(0xbc))['to'](this,_0xa79575(0xd6)),this[_0xa79575(0xbe)]({'tag':_0xa79575(0xc2),'attributes':{'class':['ck',_0xa79575(0xd4)]},'children':[{'tag':'p','children':[{'text':_0x934eea(this[_0xa79575(0x101)],_0xa79575(0x10a))+'\x20'},_0x38e38c]}]});}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x37a5bd=_0x3857;(function(_0x3800e0,_0x28cf15){const _0xb063c=_0x3857,_0x37814e=_0x3800e0();while(!![]){try{const _0x2c215b=-parseInt(_0xb063c(0x121))/0x1*(parseInt(_0xb063c(0x125))/0x2)+-parseInt(_0xb063c(0x140))/0x3+-parseInt(_0xb063c(0x15b))/0x4*(-parseInt(_0xb063c(0x13b))/0x5)+-parseInt(_0xb063c(0x120))/0x6+-parseInt(_0xb063c(0x147))/0x7*(parseInt(_0xb063c(0x163))/0x8)+-parseInt(_0xb063c(0x11d))/0x9*(-parseInt(_0xb063c(0x122))/0xa)+parseInt(_0xb063c(0x15d))/0xb*(parseInt(_0xb063c(0x119))/0xc);if(_0x2c215b===_0x28cf15)break;else _0x37814e['push'](_0x37814e['shift']());}catch(_0x2f4e18){_0x37814e['push'](_0x37814e['shift']());}}}(_0x1d8d,0x63aa4));import{CKEditorError as _0x26a3f9,logWarning as _0x53aa83,scrollAncestorsToShowTarget as _0x19ef3f}from'ckeditor5/src/utils.js';function _0x3857(_0x1ea4b8,_0x5f20d){const _0x1d8dc0=_0x1d8d();return _0x3857=function(_0x3857b9,_0x405640){_0x3857b9=_0x3857b9-0x10c;let _0x5741c8=_0x1d8dc0[_0x3857b9];return _0x5741c8;},_0x3857(_0x1ea4b8,_0x5f20d);}import{View as _0x318f78}from'ckeditor5/src/ui.js';import{AI_CHAT_UI_EVENT_NAMES as _0x800ac9}from'../utils/eventnames.js';import{AIChatFeedSuggestionItemView as _0x1da4f3}from'./feed/aichatfeedsuggestionitemview.js';import{AIChatFeedReplyItemView as _0x509507}from'./feed/aichatfeedreplyitemview.js';import{AIChatFeedUserMessageItemView as _0x3c2cf5}from'./feed/aichatfeedusermessageitem.js';import{AIChatFeedErrorItemView as _0x554ebb}from'./feed/aichatfeederroritemview.js';import{AIChatFeedInteractionHeaderView as _0xd6d86c}from'./feed/aichatfeedinteractionheaderview.js';import{ScrollManager as _0xc7e12e}from'../../aicore/utils/scrollmanager.js';import{AISkeletonView as _0x5b418c,SKELETON_DEFINITIONS as _0x9a9548}from'../../aicore/ui/aiskeleton.js';import{AISpinnerView as _0x40c709}from'../../aicore/ui/aispinner.js';import{AIChatFeedCustomElementView as _0x16b76b}from'./feed/aichatfeedcustomelementview.js';import'../../../theme/aichat/aichatfeed.css';function _0x1d8d(){const _0x2b800c=['_createLoaderChildren','10PWUYZV','ai-chat-feed-view-item-not-a-suggestion-or-reply-item','_createTemplateChildren','_setupTemplate','createCollection','ai-chat-feed-view-item-not-a-suggestion-item','ck-ai-chat__loader','updateSuggestionItem','addItem','ck-ai-chat-feed-view-scroll-to-suggestion-part-view-not-found','add','forEach','scrollManager','user-message','element','remove','ai-suggestion-reply','start','ai-chat-feed-view-item-not-a-reply-item','aiFeed','delegate','ck-ai-chat__feed__items','90QnyHuM','locale','interaction-header','stop','toggleLoadingSkeleton','821967fKseMg','ai-chat-feed-view-item-not-found','bindTemplate','updatePartState','_bodyCollection','ai-reply','extendTemplate','459641urnUPg','setSuggestionPartActive','custom-element','_createFeedItems','bind','find','updateWebSources','set','filter','removeItem','ck-ai-chat__feed','markItemAsDone','markAsDone','includes','ck-ai-chat-feed-view-scroll-to-suggestion-invalid-item','children','updateSuggestionPartState','div','stopAutoScroll','updateSources','110988jCAFIS','setTemplate','5060MYjXet','map','_createSkeletonLoader','getItemById','scrollToSuggestion','hasItem','40sQaVSP','setLoadingMessage','isVisible','loadingMessage','clear','setPartActive','getItemIds','ck-hidden','isTrackChangesOn','startAutoScroll','getPartView','ck-ai-chat__loader-text','options','_createFeedLoader','parentElement','isPending','25284yOdCBL','destroy','isLoadingSkeletonVisible','updateReplyItem','621MIvtjY','span','updateContent','210978qQgLXo','142637oQDIbV','42060SdmyaQ','render'];_0x1d8d=function(){return _0x2b800c;};return _0x1d8d();}export class AIChatFeedView extends _0x318f78{[_0x37a5bd(0x156)];[_0x37a5bd(0x131)];[_0x37a5bd(0x144)];constructor(_0x2f4fef,_0x5688e6){const _0x5821fa=_0x37a5bd;super(_0x2f4fef),this[_0x5821fa(0x144)]=_0x5688e6,this[_0x5821fa(0x14e)](_0x5821fa(0x118),!0x1),this[_0x5821fa(0x14e)](_0x5821fa(0x10c),''),this[_0x5821fa(0x14e)](_0x5821fa(0x11b),!0x1),this[_0x5821fa(0x14e)](_0x5821fa(0x111),!0x1),this[_0x5821fa(0x156)]=this[_0x5821fa(0x129)](),this[_0x5821fa(0x156)][_0x5821fa(0x139)](..._0x800ac9)['to'](this),this[_0x5821fa(0x128)]();}[_0x37a5bd(0x123)](){const _0x5c666e=_0x37a5bd;super[_0x5c666e(0x123)](),this[_0x5c666e(0x131)]=new _0xc7e12e(this[_0x5c666e(0x133)]);}[_0x37a5bd(0x11a)](){const _0x229646=_0x37a5bd;super[_0x229646(0x11a)](),this[_0x229646(0x131)][_0x229646(0x11a)]();}[_0x37a5bd(0x10d)](){const _0x1d8fea=_0x37a5bd;this[_0x1d8fea(0x156)][_0x1d8fea(0x10d)]();}[_0x37a5bd(0x12d)](_0x586576,_0x49d125){const _0x24b91e=_0x37a5bd;let _0x1c0942;return _0x24b91e(0x145)===_0x586576?_0x1c0942=new _0x509507(this[_0x24b91e(0x13c)],_0x49d125,this[_0x24b91e(0x144)]):_0x24b91e(0x135)===_0x586576?(_0x1c0942=new _0x1da4f3(this[_0x24b91e(0x13c)],_0x49d125,this[_0x24b91e(0x144)]),_0x1c0942[_0x24b91e(0x14b)](_0x24b91e(0x111))['to'](this)):_0x1c0942=_0x24b91e(0x132)===_0x586576?new _0x3c2cf5(this[_0x24b91e(0x13c)],_0x49d125,this[_0x24b91e(0x144)]):_0x24b91e(0x13d)===_0x586576?new _0xd6d86c(this[_0x24b91e(0x13c)],_0x49d125):_0x24b91e(0x149)===_0x586576?new _0x16b76b(_0x49d125):new _0x554ebb(_0x49d125),this[_0x24b91e(0x156)][_0x24b91e(0x12f)](_0x1c0942),_0x1c0942;}async[_0x37a5bd(0x11c)]({id:_0x42fc8c,parsedContent:_0x1a730c,renderingStrategy:_0x642a27,abortSignal:_0xf5ae5f}){const _0x343dea=_0x37a5bd,_0x5c4a89=this[_0x343dea(0x160)](_0x42fc8c);if(!(_0x5c4a89 instanceof _0x509507))throw new _0x26a3f9(_0x343dea(0x137),null,{'itemView':_0x5c4a89,'id':_0x42fc8c,'parsedContent':_0x1a730c});await _0x5c4a89[_0x343dea(0x11f)]({'parsedContent':_0x1a730c,'renderingStrategy':_0x642a27,'abortSignal':_0xf5ae5f});}async[_0x37a5bd(0x14d)](_0x418f8b,_0x425aa2){const _0x448f70=_0x37a5bd,_0x427f80=this[_0x448f70(0x160)](_0x418f8b);if(_0x427f80 instanceof _0x1da4f3)_0x427f80[_0x448f70(0x15a)](_0x425aa2);else{if(!(_0x427f80 instanceof _0x509507))throw new _0x26a3f9(_0x448f70(0x126),null,{'itemView':_0x427f80,'id':_0x418f8b,'sources':_0x425aa2});_0x427f80[_0x448f70(0x15a)](_0x425aa2);}}async[_0x37a5bd(0x12c)]({id:_0x419605,parts:_0x2c512e,renderingStrategy:_0x12d9ba,abortSignal:_0x33af34}){const _0x337a71=_0x37a5bd,_0x52598b=this[_0x337a71(0x160)](_0x419605);if(!(_0x52598b instanceof _0x1da4f3))throw new _0x26a3f9(_0x337a71(0x12a),null,{'itemView':_0x52598b,'id':_0x419605,'parts':_0x2c512e});await _0x52598b[_0x337a71(0x11f)]({'parts':_0x2c512e,'renderingStrategy':_0x12d9ba,'abortSignal':_0x33af34});}[_0x37a5bd(0x157)]({id:_0xa446d1,index:_0x5e02e6,state:_0x19183b}){const _0x112484=_0x37a5bd,_0x5b5a63=this[_0x112484(0x160)](_0xa446d1);if(!(_0x5b5a63 instanceof _0x1da4f3))throw new _0x26a3f9(_0x112484(0x12a),this,{'id':_0xa446d1});_0x5b5a63[_0x112484(0x143)](_0x5e02e6,_0x19183b);}[_0x37a5bd(0x148)]({id:_0x2affc2,index:_0x51d8ed,isActive:_0x46f4bc}){const _0x306eda=_0x37a5bd,_0x126579=this[_0x306eda(0x160)](_0x2affc2);if(!(_0x126579 instanceof _0x1da4f3))throw new _0x26a3f9(_0x306eda(0x12a),this,{'id':_0x2affc2});this[_0x306eda(0x156)][_0x306eda(0x14f)](_0x1f1c7c=>_0x1f1c7c instanceof _0x1da4f3)[_0x306eda(0x130)](_0xb2b978=>{const _0x12a58b=_0x306eda;_0xb2b978[_0x12a58b(0x10e)](!0x1);}),_0x126579[_0x306eda(0x10e)](_0x51d8ed,_0x46f4bc);}[_0x37a5bd(0x152)](_0x444322){const _0x423d30=_0x37a5bd;this[_0x423d30(0x160)](_0x444322)[_0x423d30(0x153)]();}[_0x37a5bd(0x10f)](){const _0x175c54=_0x37a5bd;return this[_0x175c54(0x156)][_0x175c54(0x15e)](_0x27d4e9=>_0x27d4e9[_0x175c54(0x115)]['id']);}[_0x37a5bd(0x150)](_0x5c3671){const _0x4a952d=_0x37a5bd;this[_0x4a952d(0x156)][_0x4a952d(0x134)](this[_0x4a952d(0x160)](_0x5c3671));}[_0x37a5bd(0x162)](_0x334cca){const _0x452d24=_0x37a5bd;return!!this[_0x452d24(0x156)][_0x452d24(0x14c)](_0x4166c8=>_0x4166c8[_0x452d24(0x115)]['id'][_0x452d24(0x154)](_0x334cca));}[_0x37a5bd(0x161)](_0x29be0c,_0x76442e){const _0x242752=_0x37a5bd,_0x22ef1c=this[_0x242752(0x160)](_0x29be0c);if(!(_0x22ef1c instanceof _0x1da4f3))return void _0x53aa83(_0x242752(0x155),{'replyId':_0x29be0c,'partIndex':_0x76442e});const _0x24ce3e=_0x22ef1c[_0x242752(0x113)](_0x76442e);_0x24ce3e?_0x19ef3f(_0x24ce3e[_0x242752(0x133)],0x14,this[_0x242752(0x133)][_0x242752(0x117)],!0x0,!0x0):_0x53aa83(_0x242752(0x12e),{'replyId':_0x29be0c,'partIndex':_0x76442e});}[_0x37a5bd(0x128)](){const _0x382d39=_0x37a5bd;this[_0x382d39(0x15c)]({'tag':_0x382d39(0x158),'attributes':{'class':['ck',_0x382d39(0x151)]},'children':this[_0x382d39(0x127)]()});}[_0x37a5bd(0x127)](){const _0x39925f=_0x37a5bd,_0xcd8fba=this[_0x39925f(0x15f)]();return[this[_0x39925f(0x14a)](),_0xcd8fba,this[_0x39925f(0x116)]()];}[_0x37a5bd(0x15f)](){const _0x5f48c1=_0x37a5bd,_0x5e52c6=new _0x5b418c(this[_0x5f48c1(0x13c)],_0x9a9548[_0x5f48c1(0x138)]);return _0x5e52c6[_0x5f48c1(0x146)]({'attributes':{'class':[this[_0x5f48c1(0x142)]['if'](_0x5f48c1(0x11b),_0x5f48c1(0x110),_0x5e9c40=>!_0x5e9c40)]}}),_0x5e52c6;}[_0x37a5bd(0x14a)](){const _0x25cb30=_0x37a5bd,_0x4a4ad4=new _0x318f78(this[_0x25cb30(0x13c)]);return _0x4a4ad4[_0x25cb30(0x15c)]({'tag':_0x25cb30(0x158),'attributes':{'class':['ck',_0x25cb30(0x13a),this[_0x25cb30(0x142)]['if'](_0x25cb30(0x11b),_0x25cb30(0x110))]},'children':this[_0x25cb30(0x156)]}),_0x4a4ad4;}[_0x37a5bd(0x116)](){const _0x21fa2f=_0x37a5bd,_0x5a7c0c=new _0x318f78(this[_0x21fa2f(0x13c)]);return _0x5a7c0c[_0x21fa2f(0x15c)]({'tag':_0x21fa2f(0x158),'attributes':{'class':['ck',_0x21fa2f(0x12b),this[_0x21fa2f(0x142)]['if'](_0x21fa2f(0x118),_0x21fa2f(0x110),_0x1220f5=>!_0x1220f5)]},'children':this[_0x21fa2f(0x124)]()}),_0x5a7c0c;}[_0x37a5bd(0x124)](){const _0x185c77=_0x37a5bd,_0x41e1df=new _0x40c709();return _0x41e1df[_0x185c77(0x165)]=!0x0,[_0x41e1df,{'tag':_0x185c77(0x11e),'attributes':{'class':['ck',_0x185c77(0x114)]},'children':[{'text':this[_0x185c77(0x142)]['to'](_0x185c77(0x10c))}]}];}[_0x37a5bd(0x160)](_0x50cac8){const _0x36f996=_0x37a5bd,_0x56c8e5=this[_0x36f996(0x156)][_0x36f996(0x14c)](_0xda1508=>_0xda1508[_0x36f996(0x115)]['id'][_0x36f996(0x154)](_0x50cac8));if(!_0x56c8e5)throw new _0x26a3f9(_0x36f996(0x141),this,{'id':_0x50cac8});return _0x56c8e5;}[_0x37a5bd(0x164)](_0x752020){const _0x54f0ef=_0x37a5bd;this[_0x54f0ef(0x14e)](_0x54f0ef(0x10c),_0x752020);}[_0x37a5bd(0x13f)](_0x2fb055){const _0x365972=_0x37a5bd;this[_0x365972(0x14e)](_0x365972(0x11b),_0x2fb055);}[_0x37a5bd(0x112)](){const _0x5a19dc=_0x37a5bd;this[_0x5a19dc(0x131)][_0x5a19dc(0x136)]();}[_0x37a5bd(0x159)](){const _0x3600b3=_0x37a5bd;this[_0x3600b3(0x131)][_0x3600b3(0x13e)]();}}
23
+ const _0x471236=_0x2b44;function _0x2b44(_0x5baa79,_0x44f4e5){const _0x350592=_0x3505();return _0x2b44=function(_0x2b444a,_0x5b692a){_0x2b444a=_0x2b444a-0x1cc;let _0x488deb=_0x350592[_0x2b444a];return _0x488deb;},_0x2b44(_0x5baa79,_0x44f4e5);}(function(_0x2bdbe1,_0x43ecd2){const _0x486b5b=_0x2b44,_0x33c11b=_0x2bdbe1();while(!![]){try{const _0x3e4470=-parseInt(_0x486b5b(0x1eb))/0x1+-parseInt(_0x486b5b(0x1f3))/0x2+-parseInt(_0x486b5b(0x1ed))/0x3+parseInt(_0x486b5b(0x1db))/0x4*(-parseInt(_0x486b5b(0x220))/0x5)+parseInt(_0x486b5b(0x1e5))/0x6+parseInt(_0x486b5b(0x1e6))/0x7*(-parseInt(_0x486b5b(0x1ea))/0x8)+parseInt(_0x486b5b(0x1d5))/0x9*(parseInt(_0x486b5b(0x1e8))/0xa);if(_0x3e4470===_0x43ecd2)break;else _0x33c11b['push'](_0x33c11b['shift']());}catch(_0x38fe4c){_0x33c11b['push'](_0x33c11b['shift']());}}}(_0x3505,0xc89e1));import{CKEditorError as _0x4cb051,logWarning as _0x17afb4,scrollAncestorsToShowTarget as _0x441628}from'ckeditor5/src/utils.js';import{View as _0x577c9a}from'ckeditor5/src/ui.js';import{AI_CHAT_UI_EVENT_NAMES as _0x3ce74d}from'../utils/eventnames.js';function _0x3505(){const _0x9e8d9a=['delegate','scrollManager','ai-chat-feed-view-item-not-found','markAsDone','startAutoScroll','children','set','ai-reply','updateContent','scrollToSuggestion','updatePartState','_setupTemplate','element','40CyKDvq','interaction-header','start','ck-ai-chat__feed','extendTemplate','ai-suggestion-reply','ck-ai-chat__loader-text','span','ck-ai-chat__loader','updateSuggestionPartState','addItem','user-message','stop','30522717gESyms','locale','markItemAsDone','destroy','ai-chat-feed-view-item-not-a-suggestion-item','loadingMessage','512772Jpqbuz','render','bind','options','add','setPartActive','parentElement','updateReplyItem','setLoadingMessage','isVisible','5251464OUrXPr','2995153NCZeZd','getItemIds','10REGkpk','isLoadingSkeletonVisible','16RfXMyC','116652MMOtIs','forEach','119610ejIZiC','ck-hidden','filter','custom-element','_createLoaderChildren','includes','2814208eYLynU','bindTemplate','div','_createSkeletonLoader','updateWebSources','_createTemplateChildren','updateSuggestionItem','getPartView','removeItem','aiFeed','toggleLoadingSkeleton','createCollection','isTrackChangesOn','_createFeedItems','hasItem','ai-chat-feed-view-item-not-a-reply-item','setTemplate','find','updateSources','ck-ai-chat-feed-view-scroll-to-suggestion-part-view-not-found','setSuggestionPartActive','map','ai-chat-feed-view-item-not-a-suggestion-or-reply-item','_createFeedLoader','clear','remove','_bodyCollection','isPending','ck-ai-chat-feed-view-scroll-to-suggestion-invalid-item','ck-ai-chat__feed__items','stopAutoScroll','getItemById'];_0x3505=function(){return _0x9e8d9a;};return _0x3505();}import{AIChatFeedSuggestionItemView as _0x21e6c9}from'./feed/aichatfeedsuggestionitemview.js';import{AIChatFeedReplyItemView as _0x412c12}from'./feed/aichatfeedreplyitemview.js';import{AIChatFeedUserMessageItemView as _0x40c06f}from'./feed/aichatfeedusermessageitem.js';import{AIChatFeedErrorItemView as _0x843502}from'./feed/aichatfeederroritemview.js';import{AIChatFeedInteractionHeaderView as _0x37bb2f}from'./feed/aichatfeedinteractionheaderview.js';import{ScrollManager as _0x152a0d}from'../../aicore/utils/scrollmanager.js';import{AISkeletonView as _0x35bd8f,SKELETON_DEFINITIONS as _0x2028da}from'../../aicore/ui/aiskeleton.js';import{AISpinnerView as _0x373974}from'../../aicore/ui/aispinner.js';import{AIChatFeedCustomElementView as _0x347788}from'./feed/aichatfeedcustomelementview.js';import'../../../theme/aichat/aichatfeed.css';export class AIChatFeedView extends _0x577c9a{[_0x471236(0x218)];[_0x471236(0x214)];[_0x471236(0x20d)];constructor(_0x1e9ef9,_0x3f27bb){const _0x47f2b6=_0x471236;super(_0x1e9ef9),this[_0x47f2b6(0x20d)]=_0x3f27bb,this[_0x47f2b6(0x219)](_0x47f2b6(0x20e),!0x1),this[_0x47f2b6(0x219)](_0x47f2b6(0x1da),''),this[_0x47f2b6(0x219)](_0x47f2b6(0x1e9),!0x1),this[_0x47f2b6(0x219)](_0x47f2b6(0x1ff),!0x1),this[_0x47f2b6(0x218)]=this[_0x47f2b6(0x1fe)](),this[_0x47f2b6(0x218)][_0x47f2b6(0x213)](..._0x3ce74d)['to'](this),this[_0x47f2b6(0x21e)]();}[_0x471236(0x1dc)](){const _0x4ab22f=_0x471236;super[_0x4ab22f(0x1dc)](),this[_0x4ab22f(0x214)]=new _0x152a0d(this[_0x4ab22f(0x21f)]);}[_0x471236(0x1d8)](){const _0x515b9f=_0x471236;super[_0x515b9f(0x1d8)](),this[_0x515b9f(0x214)][_0x515b9f(0x1d8)]();}[_0x471236(0x20b)](){const _0x3ce4c8=_0x471236;this[_0x3ce4c8(0x218)][_0x3ce4c8(0x20b)]();}[_0x471236(0x1d2)](_0x54f4b7,_0xea0093){const _0x378647=_0x471236;let _0xb361c;return _0x378647(0x21a)===_0x54f4b7?_0xb361c=new _0x412c12(this[_0x378647(0x1d6)],_0xea0093,this[_0x378647(0x20d)]):_0x378647(0x1cd)===_0x54f4b7?(_0xb361c=new _0x21e6c9(this[_0x378647(0x1d6)],_0xea0093,this[_0x378647(0x20d)]),_0xb361c[_0x378647(0x1dd)](_0x378647(0x1ff))['to'](this)):_0xb361c=_0x378647(0x1d3)===_0x54f4b7?new _0x40c06f(this[_0x378647(0x1d6)],_0xea0093,this[_0x378647(0x20d)]):_0x378647(0x221)===_0x54f4b7?new _0x37bb2f(this[_0x378647(0x1d6)],_0xea0093):_0x378647(0x1f0)===_0x54f4b7?new _0x347788(_0xea0093):new _0x843502(_0xea0093),this[_0x378647(0x218)][_0x378647(0x1df)](_0xb361c),_0xb361c;}async[_0x471236(0x1e2)]({id:_0x448139,parsedContent:_0x464e66,renderingStrategy:_0x315dcb,abortSignal:_0x2a9367}){const _0xfd2afc=_0x471236,_0x26a469=this[_0xfd2afc(0x212)](_0x448139);if(!(_0x26a469 instanceof _0x412c12))throw new _0x4cb051(_0xfd2afc(0x202),null,{'itemView':_0x26a469,'id':_0x448139,'parsedContent':_0x464e66});await _0x26a469[_0xfd2afc(0x21b)]({'parsedContent':_0x464e66,'renderingStrategy':_0x315dcb,'abortSignal':_0x2a9367});}async[_0x471236(0x1f7)](_0x36b820,_0x9d9948){const _0x385bcb=_0x471236,_0x59621e=this[_0x385bcb(0x212)](_0x36b820);if(_0x59621e instanceof _0x21e6c9)_0x59621e[_0x385bcb(0x205)](_0x9d9948);else{if(!(_0x59621e instanceof _0x412c12))throw new _0x4cb051(_0x385bcb(0x209),null,{'itemView':_0x59621e,'id':_0x36b820,'sources':_0x9d9948});_0x59621e[_0x385bcb(0x205)](_0x9d9948);}}async[_0x471236(0x1f9)]({id:_0x52f565,parts:_0x509824,renderingStrategy:_0x7395e1,abortSignal:_0xfdb112}){const _0x3cd0cd=_0x471236,_0x3a468b=this[_0x3cd0cd(0x212)](_0x52f565);if(!(_0x3a468b instanceof _0x21e6c9))throw new _0x4cb051(_0x3cd0cd(0x1d9),null,{'itemView':_0x3a468b,'id':_0x52f565,'parts':_0x509824});await _0x3a468b[_0x3cd0cd(0x21b)]({'parts':_0x509824,'renderingStrategy':_0x7395e1,'abortSignal':_0xfdb112});}[_0x471236(0x1d1)]({id:_0x56fd48,index:_0x228fb6,state:_0xdc0c38}){const _0x1f1c0d=_0x471236,_0x320ad9=this[_0x1f1c0d(0x212)](_0x56fd48);if(!(_0x320ad9 instanceof _0x21e6c9))throw new _0x4cb051(_0x1f1c0d(0x1d9),this,{'id':_0x56fd48});_0x320ad9[_0x1f1c0d(0x21d)](_0x228fb6,_0xdc0c38);}[_0x471236(0x207)]({id:_0xc52f96,index:_0x32af32,isActive:_0x3a1189}){const _0x1c8d4c=_0x471236,_0x5656e1=this[_0x1c8d4c(0x212)](_0xc52f96);if(!(_0x5656e1 instanceof _0x21e6c9))throw new _0x4cb051(_0x1c8d4c(0x1d9),this,{'id':_0xc52f96});this[_0x1c8d4c(0x218)][_0x1c8d4c(0x1ef)](_0x1d475b=>_0x1d475b instanceof _0x21e6c9)[_0x1c8d4c(0x1ec)](_0x18a092=>{const _0x546934=_0x1c8d4c;_0x18a092[_0x546934(0x1e0)](!0x1);}),_0x5656e1[_0x1c8d4c(0x1e0)](_0x32af32,_0x3a1189);}[_0x471236(0x1d7)](_0x148ee8){const _0x35c108=_0x471236;this[_0x35c108(0x212)](_0x148ee8)[_0x35c108(0x216)]();}[_0x471236(0x1e7)](){const _0x2dd814=_0x471236;return this[_0x2dd814(0x218)][_0x2dd814(0x208)](_0x57625d=>_0x57625d[_0x2dd814(0x1de)]['id']);}[_0x471236(0x1fb)](_0x118945){const _0x52fde4=_0x471236;this[_0x52fde4(0x218)][_0x52fde4(0x20c)](this[_0x52fde4(0x212)](_0x118945));}[_0x471236(0x201)](_0x5cea77){const _0xadd88c=_0x471236;return!!this[_0xadd88c(0x218)][_0xadd88c(0x204)](_0x14962d=>_0x14962d[_0xadd88c(0x1de)]['id'][_0xadd88c(0x1f2)](_0x5cea77));}[_0x471236(0x21c)](_0x3ebb05,_0x2a8221){const _0x7bc2=_0x471236,_0xd1a453=this[_0x7bc2(0x212)](_0x3ebb05);if(!(_0xd1a453 instanceof _0x21e6c9))return void _0x17afb4(_0x7bc2(0x20f),{'replyId':_0x3ebb05,'partIndex':_0x2a8221});const _0x465240=_0xd1a453[_0x7bc2(0x1fa)](_0x2a8221);_0x465240?_0x441628(_0x465240[_0x7bc2(0x21f)],0x14,this[_0x7bc2(0x21f)][_0x7bc2(0x1e1)],!0x0,!0x0):_0x17afb4(_0x7bc2(0x206),{'replyId':_0x3ebb05,'partIndex':_0x2a8221});}[_0x471236(0x21e)](){const _0x48cce0=_0x471236;this[_0x48cce0(0x203)]({'tag':_0x48cce0(0x1f5),'attributes':{'class':['ck',_0x48cce0(0x223)]},'children':this[_0x48cce0(0x1f8)]()});}[_0x471236(0x1f8)](){const _0x1e8244=_0x471236,_0x4cf51a=this[_0x1e8244(0x1f6)]();return[this[_0x1e8244(0x200)](),_0x4cf51a,this[_0x1e8244(0x20a)]()];}[_0x471236(0x1f6)](){const _0x33f5f1=_0x471236,_0x136fc4=new _0x35bd8f(this[_0x33f5f1(0x1d6)],_0x2028da[_0x33f5f1(0x1fc)]);return _0x136fc4[_0x33f5f1(0x1cc)]({'attributes':{'class':[this[_0x33f5f1(0x1f4)]['if'](_0x33f5f1(0x1e9),_0x33f5f1(0x1ee),_0x5530d6=>!_0x5530d6)]}}),_0x136fc4;}[_0x471236(0x200)](){const _0x1349f0=_0x471236,_0x2758a0=new _0x577c9a(this[_0x1349f0(0x1d6)]);return _0x2758a0[_0x1349f0(0x203)]({'tag':_0x1349f0(0x1f5),'attributes':{'class':['ck',_0x1349f0(0x210),this[_0x1349f0(0x1f4)]['if'](_0x1349f0(0x1e9),_0x1349f0(0x1ee))]},'children':this[_0x1349f0(0x218)]}),_0x2758a0;}[_0x471236(0x20a)](){const _0x157661=_0x471236,_0x367db4=new _0x577c9a(this[_0x157661(0x1d6)]);return _0x367db4[_0x157661(0x203)]({'tag':_0x157661(0x1f5),'attributes':{'class':['ck',_0x157661(0x1d0),this[_0x157661(0x1f4)]['if'](_0x157661(0x20e),_0x157661(0x1ee),_0x3beecb=>!_0x3beecb)]},'children':this[_0x157661(0x1f1)]()}),_0x367db4;}[_0x471236(0x1f1)](){const _0x1502fc=_0x471236,_0x2a105f=new _0x373974();return _0x2a105f[_0x1502fc(0x1e4)]=!0x0,[_0x2a105f,{'tag':_0x1502fc(0x1cf),'attributes':{'class':['ck',_0x1502fc(0x1ce)]},'children':[{'text':this[_0x1502fc(0x1f4)]['to'](_0x1502fc(0x1da))}]}];}[_0x471236(0x212)](_0x55b652){const _0x5f302d=_0x471236,_0x5d845a=this[_0x5f302d(0x218)][_0x5f302d(0x204)](_0x4661e8=>_0x4661e8[_0x5f302d(0x1de)]['id'][_0x5f302d(0x1f2)](_0x55b652));if(!_0x5d845a)throw new _0x4cb051(_0x5f302d(0x215),this,{'id':_0x55b652});return _0x5d845a;}[_0x471236(0x1e3)](_0x5ae94c){const _0x1aaa7b=_0x471236;this[_0x1aaa7b(0x219)](_0x1aaa7b(0x1da),_0x5ae94c);}[_0x471236(0x1fd)](_0x263d91){const _0x9a052e=_0x471236;this[_0x9a052e(0x219)](_0x9a052e(0x1e9),_0x263d91);}[_0x471236(0x217)](){const _0x8cf461=_0x471236;this[_0x8cf461(0x214)][_0x8cf461(0x222)]();}[_0x471236(0x211)](){const _0x13e936=_0x471236;this[_0x13e936(0x214)][_0x13e936(0x1d4)]();}}