@ckeditor/ckeditor5-ai 47.0.0 → 47.1.0-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 (328) hide show
  1. package/build/ai.js +1 -1
  2. package/ckeditor5-metadata.json +9 -2
  3. package/dist/index-editor.css +119 -34
  4. package/dist/index.css +144 -35
  5. package/dist/index.js +4 -4
  6. package/dist/translations/af.js +1 -1
  7. package/dist/translations/af.umd.js +1 -1
  8. package/dist/translations/ar.js +1 -1
  9. package/dist/translations/ar.umd.js +1 -1
  10. package/dist/translations/ast.js +1 -1
  11. package/dist/translations/ast.umd.js +1 -1
  12. package/dist/translations/az.js +1 -1
  13. package/dist/translations/az.umd.js +1 -1
  14. package/dist/translations/be.js +1 -1
  15. package/dist/translations/be.umd.js +1 -1
  16. package/dist/translations/bg.js +1 -1
  17. package/dist/translations/bg.umd.js +1 -1
  18. package/dist/translations/bn.js +1 -1
  19. package/dist/translations/bn.umd.js +1 -1
  20. package/dist/translations/bs.js +1 -1
  21. package/dist/translations/bs.umd.js +1 -1
  22. package/dist/translations/ca.js +1 -1
  23. package/dist/translations/ca.umd.js +1 -1
  24. package/dist/translations/cs.js +1 -1
  25. package/dist/translations/cs.umd.js +1 -1
  26. package/dist/translations/da.js +1 -1
  27. package/dist/translations/da.umd.js +1 -1
  28. package/dist/translations/de-ch.js +1 -1
  29. package/dist/translations/de-ch.umd.js +1 -1
  30. package/dist/translations/de.js +1 -1
  31. package/dist/translations/de.umd.js +1 -1
  32. package/dist/translations/el.js +1 -1
  33. package/dist/translations/el.umd.js +1 -1
  34. package/dist/translations/en-au.js +1 -1
  35. package/dist/translations/en-au.umd.js +1 -1
  36. package/dist/translations/en-gb.js +1 -1
  37. package/dist/translations/en-gb.umd.js +1 -1
  38. package/dist/translations/en.js +1 -1
  39. package/dist/translations/en.umd.js +1 -1
  40. package/dist/translations/eo.js +1 -1
  41. package/dist/translations/eo.umd.js +1 -1
  42. package/dist/translations/es-co.js +1 -1
  43. package/dist/translations/es-co.umd.js +1 -1
  44. package/dist/translations/es.js +1 -1
  45. package/dist/translations/es.umd.js +1 -1
  46. package/dist/translations/et.js +1 -1
  47. package/dist/translations/et.umd.js +1 -1
  48. package/dist/translations/eu.js +1 -1
  49. package/dist/translations/eu.umd.js +1 -1
  50. package/dist/translations/fa.js +1 -1
  51. package/dist/translations/fa.umd.js +1 -1
  52. package/dist/translations/fi.js +1 -1
  53. package/dist/translations/fi.umd.js +1 -1
  54. package/dist/translations/fr.js +1 -1
  55. package/dist/translations/fr.umd.js +1 -1
  56. package/dist/translations/gl.js +1 -1
  57. package/dist/translations/gl.umd.js +1 -1
  58. package/dist/translations/gu.js +1 -1
  59. package/dist/translations/gu.umd.js +1 -1
  60. package/dist/translations/he.js +1 -1
  61. package/dist/translations/he.umd.js +1 -1
  62. package/dist/translations/hi.js +1 -1
  63. package/dist/translations/hi.umd.js +1 -1
  64. package/dist/translations/hr.js +1 -1
  65. package/dist/translations/hr.umd.js +1 -1
  66. package/dist/translations/hu.js +1 -1
  67. package/dist/translations/hu.umd.js +1 -1
  68. package/dist/translations/hy.js +1 -1
  69. package/dist/translations/hy.umd.js +1 -1
  70. package/dist/translations/id.js +1 -1
  71. package/dist/translations/id.umd.js +1 -1
  72. package/dist/translations/it.js +1 -1
  73. package/dist/translations/it.umd.js +1 -1
  74. package/dist/translations/ja.js +1 -1
  75. package/dist/translations/ja.umd.js +1 -1
  76. package/dist/translations/jv.js +1 -1
  77. package/dist/translations/jv.umd.js +1 -1
  78. package/dist/translations/kk.js +1 -1
  79. package/dist/translations/kk.umd.js +1 -1
  80. package/dist/translations/km.js +1 -1
  81. package/dist/translations/km.umd.js +1 -1
  82. package/dist/translations/kn.js +1 -1
  83. package/dist/translations/kn.umd.js +1 -1
  84. package/dist/translations/ko.js +1 -1
  85. package/dist/translations/ko.umd.js +1 -1
  86. package/dist/translations/ku.js +1 -1
  87. package/dist/translations/ku.umd.js +1 -1
  88. package/dist/translations/lt.js +1 -1
  89. package/dist/translations/lt.umd.js +1 -1
  90. package/dist/translations/lv.js +1 -1
  91. package/dist/translations/lv.umd.js +1 -1
  92. package/dist/translations/ms.js +1 -1
  93. package/dist/translations/ms.umd.js +1 -1
  94. package/dist/translations/nb.js +1 -1
  95. package/dist/translations/nb.umd.js +1 -1
  96. package/dist/translations/ne.js +1 -1
  97. package/dist/translations/ne.umd.js +1 -1
  98. package/dist/translations/nl.js +1 -1
  99. package/dist/translations/nl.umd.js +1 -1
  100. package/dist/translations/no.js +1 -1
  101. package/dist/translations/no.umd.js +1 -1
  102. package/dist/translations/oc.js +1 -1
  103. package/dist/translations/oc.umd.js +1 -1
  104. package/dist/translations/pl.js +1 -1
  105. package/dist/translations/pl.umd.js +1 -1
  106. package/dist/translations/pt-br.js +1 -1
  107. package/dist/translations/pt-br.umd.js +1 -1
  108. package/dist/translations/pt.js +1 -1
  109. package/dist/translations/pt.umd.js +1 -1
  110. package/dist/translations/ro.js +1 -1
  111. package/dist/translations/ro.umd.js +1 -1
  112. package/dist/translations/ru.js +1 -1
  113. package/dist/translations/ru.umd.js +1 -1
  114. package/dist/translations/si.js +1 -1
  115. package/dist/translations/si.umd.js +1 -1
  116. package/dist/translations/sk.js +1 -1
  117. package/dist/translations/sk.umd.js +1 -1
  118. package/dist/translations/sl.js +1 -1
  119. package/dist/translations/sl.umd.js +1 -1
  120. package/dist/translations/sq.js +1 -1
  121. package/dist/translations/sq.umd.js +1 -1
  122. package/dist/translations/sr-latn.js +1 -1
  123. package/dist/translations/sr-latn.umd.js +1 -1
  124. package/dist/translations/sr.js +1 -1
  125. package/dist/translations/sr.umd.js +1 -1
  126. package/dist/translations/sv.js +1 -1
  127. package/dist/translations/sv.umd.js +1 -1
  128. package/dist/translations/th.js +1 -1
  129. package/dist/translations/th.umd.js +1 -1
  130. package/dist/translations/ti.js +1 -1
  131. package/dist/translations/ti.umd.js +1 -1
  132. package/dist/translations/tk.js +1 -1
  133. package/dist/translations/tk.umd.js +1 -1
  134. package/dist/translations/tr.js +1 -1
  135. package/dist/translations/tr.umd.js +1 -1
  136. package/dist/translations/tt.js +1 -1
  137. package/dist/translations/tt.umd.js +1 -1
  138. package/dist/translations/ug.js +1 -1
  139. package/dist/translations/ug.umd.js +1 -1
  140. package/dist/translations/uk.js +1 -1
  141. package/dist/translations/uk.umd.js +1 -1
  142. package/dist/translations/ur.js +1 -1
  143. package/dist/translations/ur.umd.js +1 -1
  144. package/dist/translations/uz.js +1 -1
  145. package/dist/translations/uz.umd.js +1 -1
  146. package/dist/translations/vi.js +1 -1
  147. package/dist/translations/vi.umd.js +1 -1
  148. package/dist/translations/zh-cn.js +1 -1
  149. package/dist/translations/zh-cn.umd.js +1 -1
  150. package/dist/translations/zh.js +1 -1
  151. package/dist/translations/zh.umd.js +1 -1
  152. package/lang/contexts.json +5 -0
  153. package/package.json +15 -15
  154. package/src/aiactions/aiactions.js +1 -1
  155. package/src/aiactions/model/aiactionsinteraction.js +1 -1
  156. package/src/aiactions/model/aiactionsreply.js +1 -1
  157. package/src/aiassistant/adapters/aiadapter.js +1 -1
  158. package/src/aiassistant/adapters/aitextadapter.js +1 -1
  159. package/src/aiassistant/adapters/awstextadapter.js +1 -1
  160. package/src/aiassistant/adapters/openaitextadapter.js +1 -1
  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/aiballoondisclaimerview.js +1 -1
  179. package/src/aiballoon/ui/aiballoontoolbarview.js +1 -1
  180. package/src/aiballoon/ui/aiballoonview.js +1 -1
  181. package/src/aichat/aichat.d.ts +3 -3
  182. package/src/aichat/aichat.js +1 -1
  183. package/src/aichat/aichatcontroller.js +1 -1
  184. package/src/aichat/aichatui.d.ts +6 -0
  185. package/src/aichat/aichatui.js +1 -1
  186. package/src/aichat/model/aichatcontext.js +1 -1
  187. package/src/aichat/model/aichatconversation.d.ts +2 -4
  188. package/src/aichat/model/aichatconversation.js +1 -1
  189. package/src/aichat/model/aichatinteraction.js +1 -1
  190. package/src/aichat/model/aichatmodels.d.ts +11 -4
  191. package/src/aichat/model/aichatmodels.js +1 -1
  192. package/src/aichat/ui/aichatcontrolsview.d.ts +9 -0
  193. package/src/aichat/ui/aichatcontrolsview.js +1 -1
  194. package/src/aichat/ui/aichatfeedview.js +1 -1
  195. package/src/aichat/ui/aichatheaderview.js +1 -1
  196. package/src/aichat/ui/aichatview.js +1 -1
  197. package/src/aichat/ui/controls/aichatchipsoverflowmanager.js +1 -1
  198. package/src/aichat/ui/controls/aichatcontextitembuttonview.js +1 -1
  199. package/src/aichat/ui/controls/aichatcontextpanelurlinputview.js +1 -1
  200. package/src/aichat/ui/controls/aichatcontextpanelview.js +1 -1
  201. package/src/aichat/ui/controls/aichatcontrolsloaderview.js +1 -1
  202. package/src/aichat/ui/controls/aichatpromptcapabilitiesview.js +1 -1
  203. package/src/aichat/ui/controls/aichatpromptinputview.js +1 -1
  204. package/src/aichat/ui/controls/aichatpromptsuggestionslistview.js +1 -1
  205. package/src/aichat/ui/controls/resources/aichatresourcelistitemview.js +1 -1
  206. package/src/aichat/ui/controls/resources/aichatresourcesballoonview.js +1 -1
  207. package/src/aichat/ui/controls/resources/aichatresourceslistview.js +1 -1
  208. package/src/aichat/ui/controls/resources/aichatresourcessearchinputview.js +1 -1
  209. package/src/aichat/ui/controls/resources/aichatresourcesview.js +1 -1
  210. package/src/aichat/ui/feed/aichatfeedcontextchipsview.js +1 -1
  211. package/src/aichat/ui/feed/aichatfeederroritemview.js +1 -1
  212. package/src/aichat/ui/feed/aichatfeedinteractionheaderview.js +1 -1
  213. package/src/aichat/ui/feed/aichatfeeditemview.js +1 -1
  214. package/src/aichat/ui/feed/aichatfeedreplyitemview.js +1 -1
  215. package/src/aichat/ui/feed/aichatfeedsuggestionitemactionsview.js +1 -1
  216. package/src/aichat/ui/feed/aichatfeedsuggestionitemview.js +1 -1
  217. package/src/aichat/ui/feed/aichatfeedusermessageitem.js +1 -1
  218. package/src/aichat/utils/eventnames.js +1 -1
  219. package/src/aichat/utils/promisequeue.js +1 -1
  220. package/src/aichat/utils/scrollmanager.js +1 -1
  221. package/src/aichathistory/aichathistory.js +1 -1
  222. package/src/aichathistory/aichathistorycontroller.js +1 -1
  223. package/src/aichathistory/aichathistoryui.js +1 -1
  224. package/src/aichathistory/model/aichathistoryconversations.js +1 -1
  225. package/src/aichathistory/model/aichathistoryitem.js +1 -1
  226. package/src/aichathistory/ui/aichathistorylistitemview.js +1 -1
  227. package/src/aichathistory/ui/aichathistorylistview.js +1 -1
  228. package/src/aichathistory/ui/aichathistorysectionlistview.js +1 -1
  229. package/src/aichathistory/ui/aichathistoryview.js +1 -1
  230. package/src/aiconfig.d.ts +4 -0
  231. package/src/aicore/aiconnector.js +1 -1
  232. package/src/aicore/aiediting.js +1 -1
  233. package/src/aicore/model/aicapabilities.js +1 -1
  234. package/src/aicore/model/aicontext.js +1 -1
  235. package/src/aicore/model/aiinteraction.js +1 -1
  236. package/src/aicore/model/aireply.d.ts +1 -1
  237. package/src/aicore/model/aireply.js +1 -1
  238. package/src/aicore/pipeline/airesponseapplier.js +2 -2
  239. package/src/aicore/pipeline/airesponseparser.js +2 -2
  240. package/src/aicore/ui/aidisclaimerview.js +1 -1
  241. package/src/aicore/ui/aiskeleton.js +1 -1
  242. package/src/aicore/ui/aispinner.js +1 -1
  243. package/src/aicore/ui/suggestioncontainer/aiminitoolbarview.js +1 -1
  244. package/src/aicore/ui/suggestioncontainer/aisuggestionbodyview.js +1 -1
  245. package/src/aicore/ui/suggestioncontainer/aisuggestioncontainerview.js +1 -1
  246. package/src/aicore/ui/suggestioncontainer/aisuggestioncontentpartview.js +1 -1
  247. package/src/aicore/ui/suggestioncontainer/aisuggestionheaderview.js +1 -1
  248. package/src/aicore/utils/common-translations.js +1 -1
  249. package/src/aicore/utils/createresizebutton.js +1 -1
  250. package/src/aicore/utils/documentposition.js +1 -1
  251. package/src/aicore/utils/documentrange.js +1 -1
  252. package/src/aicore/utils/eventnames.js +1 -1
  253. package/src/aicore/utils/geteditorfromcontext.js +1 -1
  254. package/src/aicore/utils/getoperationsfromreply.js +1 -1
  255. package/src/aicore/utils/getsuggestionpartsfromreply.js +1 -1
  256. package/src/aicore/utils/htmlparser.js +1 -1
  257. package/src/aicore/utils/htmlstreamer.js +1 -1
  258. package/src/aieditorintegration/aieditorintegration.js +1 -1
  259. package/src/aieditorintegration/aitogglebutton/aitogglebuttonui.js +1 -1
  260. package/src/aieditorintegration/aitogglebutton/toggleaicommand.js +1 -1
  261. package/src/aiquickactions/aiquickactions.d.ts +2 -1
  262. package/src/aiquickactions/aiquickactions.js +1 -1
  263. package/src/aiquickactions/aiquickactionscommand.js +1 -1
  264. package/src/aiquickactions/aiquickactionsediting.js +1 -1
  265. package/src/aiquickactions/aiquickactionsui.js +1 -1
  266. package/src/aiquickactions/ui/aiquickactionsbuttoncreator.d.ts +2 -1
  267. package/src/aiquickactions/ui/aiquickactionsbuttoncreator.js +1 -1
  268. package/src/aiquickactions/ui/aiquickactionsdropdowncontentview.js +1 -1
  269. package/src/aiquickactions/ui/aiquickactionsdropdowncreator.js +1 -1
  270. package/src/aireviewmode/aireviewcheckdefinitions.js +1 -1
  271. package/src/aireviewmode/aireviewmode.js +1 -1
  272. package/src/aireviewmode/aireviewmodecontroller.js +1 -1
  273. package/src/aireviewmode/aireviewmodeediting.js +1 -1
  274. package/src/aireviewmode/aireviewmodeui.d.ts +3 -1
  275. package/src/aireviewmode/aireviewmodeui.js +1 -1
  276. package/src/aireviewmode/model/aireviewcheck.js +1 -1
  277. package/src/aireviewmode/model/aireviewcheckcustom.js +1 -1
  278. package/src/aireviewmode/model/aireviewchecklist.js +1 -1
  279. package/src/aireviewmode/model/aireviewcheckresult.js +1 -1
  280. package/src/aireviewmode/model/aireviewcheckresultchange.d.ts +6 -0
  281. package/src/aireviewmode/model/aireviewcheckresultchange.js +1 -1
  282. package/src/aireviewmode/model/aireviewcheckrun.d.ts +31 -3
  283. package/src/aireviewmode/model/aireviewcheckrun.js +1 -1
  284. package/src/aireviewmode/model/aireviewcustomcheckrun.d.ts +1 -1
  285. package/src/aireviewmode/model/aireviewcustomcheckrun.js +1 -1
  286. package/src/aireviewmode/model/aireviewmodels.js +1 -1
  287. package/src/aireviewmode/model/aireviewsystemcheckrun.d.ts +5 -1
  288. package/src/aireviewmode/model/aireviewsystemcheckrun.js +1 -1
  289. package/src/aireviewmode/ui/aireviemodepromptinputview.d.ts +7 -5
  290. package/src/aireviewmode/ui/aireviemodepromptinputview.js +1 -1
  291. package/src/aireviewmode/ui/aireviewmodeballoonsuggestionview.d.ts +3 -0
  292. package/src/aireviewmode/ui/aireviewmodeballoonsuggestionview.js +1 -1
  293. package/src/aireviewmode/ui/aireviewmodechecklistitemresultview.d.ts +4 -0
  294. package/src/aireviewmode/ui/aireviewmodechecklistitemresultview.js +1 -1
  295. package/src/aireviewmode/ui/aireviewmodecustomcheckview.d.ts +27 -3
  296. package/src/aireviewmode/ui/aireviewmodecustomcheckview.js +1 -1
  297. package/src/aireviewmode/ui/aireviewmodereviewchecklistview.js +1 -1
  298. package/src/aireviewmode/ui/aireviewmodereviewcheckresultsview.d.ts +13 -1
  299. package/src/aireviewmode/ui/aireviewmodereviewcheckresultsview.js +1 -1
  300. package/src/aireviewmode/ui/aireviewmodereviewcommandlistitemview.js +1 -1
  301. package/src/aireviewmode/ui/aireviewmodereviewcompletedview.js +1 -1
  302. package/src/aireviewmode/ui/aireviewmodeview.js +1 -1
  303. package/src/aireviewmode/ui/form/aireviewmodeformdropdown.d.ts +1 -1
  304. package/src/aireviewmode/ui/form/aireviewmodeformdropdown.js +1 -1
  305. package/src/aireviewmode/ui/form/aireviewmodeformmanager.js +1 -1
  306. package/src/aitabs/aitabs.js +1 -1
  307. package/src/aitabs/aitabsmainview.d.ts +4 -0
  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/errors.d.ts +5 -0
  313. package/src/errors.js +23 -0
  314. package/src/index.js +1 -1
  315. package/theme/aichat/aichat-controls/aichat-context-controls-balloon-panels.css +4 -0
  316. package/theme/aichat/aichat-controls/model-unavailable-message.css +39 -0
  317. package/theme/aichat/aichat-controls.css +1 -0
  318. package/theme/aichat/aichat.css +0 -1
  319. package/theme/aichat/aichatfeed.css +9 -0
  320. package/theme/aichat/aisuggestioncontainer.css +7 -1
  321. package/theme/aireviewmode/aireviewmode-balloon-panel-suggestion.css +4 -0
  322. package/theme/aireviewmode/aireviewmode-check-list.css +4 -0
  323. package/theme/aireviewmode/aireviewmode-check-run-result.css +25 -19
  324. package/theme/aireviewmode/aireviewmode-check-run.css +35 -7
  325. package/theme/aitabs/aitabsview.css +2 -2
  326. package/theme/aitabs/tabs/tabsview.css +13 -3
  327. package/src/aireviewmode/ui/form/aireviewmodeformamanager.d.ts +0 -16
  328. package/src/aireviewmode/ui/form/aireviewmodeformamanager.js +0 -23
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x19ee94=_0x2a06;(function(_0x32653c,_0x3fc022){const _0x528cb1=_0x2a06,_0x12c789=_0x32653c();while(!![]){try{const _0xa5faa6=-parseInt(_0x528cb1(0xb7))/0x1+-parseInt(_0x528cb1(0x1c0))/0x2*(-parseInt(_0x528cb1(0x150))/0x3)+-parseInt(_0x528cb1(0x1de))/0x4+-parseInt(_0x528cb1(0x19d))/0x5+parseInt(_0x528cb1(0xb1))/0x6*(-parseInt(_0x528cb1(0xd2))/0x7)+-parseInt(_0x528cb1(0x175))/0x8+parseInt(_0x528cb1(0xfb))/0x9;if(_0xa5faa6===_0x3fc022)break;else _0x12c789['push'](_0x12c789['shift']());}catch(_0x322606){_0x12c789['push'](_0x12c789['shift']());}}}(_0x2f6c,0xa2cd1));import{ContextPlugin as _0x23175c,Editor as _0x5a2f64}from'ckeditor5/src/core.js';function _0x2a06(_0x511a84,_0xef870d){const _0x2f6c13=_0x2f6c();return _0x2a06=function(_0x2a065e,_0x575a1d){_0x2a065e=_0x2a065e-0xac;let _0x5e2e73=_0x2f6c13[_0x2a065e];return _0x5e2e73;},_0x2a06(_0x511a84,_0xef870d);}import{CKEditorError as _0x555cfc,logError as _0x322e37,scrollViewportToShowTarget as _0x360cfb,uid as _0x1dc6c9}from'ckeditor5/src/utils.js';import{AIConnector as _0x23f487}from'../aicore/aiconnector.js';import{AITabs as _0x351dd5}from'../aitabs/aitabs.js';import{AIChatConversation as _0x3aaab2}from'./model/aichatconversation.js';function _0x2f6c(){const _0x59db4c=['viewRangeToDom','_applySuggestion','replyCreated','ai-conversation-','_filterModels','applyOperation','contextItemRemoved','view','parse','clearConversationContextUI','removeFromContext','createPositionAt','sendUserMessage','pending','AIEditing','sourcePosition','type','stop','toggleLoadingSkeleton','setChangeGroupState','get','ai-chat-context-unsupported-type','replyId','_getDocumentRangeForReplyChanges','range','mouseLeaveSuggestion','getOperations','path','interactionDestroyed','removeSelectionFromChatContext','resource','add','setFeedItemRenderingStrategy','AI_CHAT_CONTEXT_UNSUPPORTED_TYPE','listenTo','startInteraction','ai-chat-context-invalid-data','history','loadSourceResources','Liked\x20response','changeGroups','markers','startsWith','selectModel','modification-delta','undo','_toggleReasoning','resize','isOpen','maxOffset','nextSibling','filter','query','isCurrentDocumentInConversation','alignToTop','removeMarker','indexes','toViewRange','baseVersion','_toggleWebSearch','isDisabled','updateCapabilities','mapper','ai-request-aborted','start','webSearchStarted','revert','setIsUploadInProgress','getPath','getReply','Failed\x20to\x20load\x20conversation','setIsMaximized','ai.chat.models.displayedModels','abortPromptStream','addUrlToContext','children','_handleUIUserMessage','_scrollToSuggestionRange','ready','capabilitiesUpdated','1933770LmyzPG','ai.chat.context','messageId','addOperation','getInteractionAndReplyById','_aiEditing','push','contextItems','contextItemLoadingEnded','activeConversation','addFileToContext','_createFromRanges','AI_BALLOON_HEADER_TITLE','Showing\x20conversation\x20history...','addDocumentToContext','getInteraction','ai-chat-controller-no-active-conversation','isPremiumPlugin','root','disableControls','setConversationContext','_balloonShowDiff','getChild','cloneNode','ai-chat-source-resources-load-failed','getRoot','data-id','howMany','conversationInitialized','editing','_updateRatings','main','insertSuggestion','from','stopInteraction','removeContextItem','applySuggestion','9043096bKOyBs','_applyOperationsAsSuggestions','AI_CHAT_CONTEXT_INVALID_DATA','ai-chat-missing-channel-id','replies','mouseOverSuggestion','addFeedItemError','replyChangeGroupStateUpdated','slice','setConversationTitle','getSelectionText','getRanges','resetMessageInput','sendMessage','locale','end','node','ai-chat-controller-mouse-over','createConversation','ai.chat.models.defaultModelId','Disliked\x20response','unshift','_integrateEditor','AI_CHAT_ABORTED_MESSAGE','ai-chat-file-upload-failed','state','getDiff','stopListening','_stopLastInteraction','AI_CHAT_CONTEXT_UNABLE_TO_UPLOAD_FILE','finishInteraction','_flushLastInteractionUI','_openBalloonFor','collaboration.channelId','load','resources','resourceId','addSelectionToContext','new','showFakeVisualSelection','141315IjgZVR','Undo','_showConversationHistory','rejectSuggestion','uid','AI_CHAT_CONTEXT_UNABLE_TO_LOAD_RESOURCES','log','showDiff','anchorId','config','availableModels','contextSent','getAttribute','delete','addContextItem','handleRemovedConversation','lastInteraction','AIConnector','has','addFeedItemUserMessage','contextItem','content','_handleStartConversation','selectedModel','updateConversationTitle','_aiChatModels','_startConversationSafely','length','provider','enableControls','getGroupId','isDocumentOperation','data','interactionId','AITabs','2TpEBTL','marker','domConverter','createRange','updateFeedItemAIReplySources','AI_CHAT_RESOURCE_LOAD_FAILED','message','updateFeedItemAIReplyContent','sourceResourcesLoaded','removeSelectionFromContext','contextItemAdded','showPrevious','getMarkersGroup','addSelectionToChatContext','createPositionFromPath','ai-chat-url-upload-failed','addFeedItemAIReply','getChildAtOffset','partIndex','commands','interactionFinished','updateContent','upsertAIChatRating','init','selection','toLocaleLowerCase','current-document','addCurrentDocumentToContext','find','isInContext','4287344RcRqye','startConversation','populateSourceResourceBalloon','dislike','remove','addResourceToContext','batch','close','resizedTabs','activateTab','ai-chat-conversation-start-failed','getChildren','chat','_aiConnector','toggleReasoning','isLoading','AIChatUI','setAddContextOptions','sources','isUploadInProgress','updateFeedItemAIReplySuggestionPartState','uploadProgressChanged','modelSelected','reasoningStarted','showChangeInText','webSearchFinished','string','open','dialogClosed','loadConversation','version','AI_CHAT_UNTITLED_CONVERSATION','_setIsMaximized','forEach','getTransformedByOperation','sourceId','AI_CHAT_GENERIC_ERROR','DocumentCompare','rejected','resizeTabs','change','text-delta','addFilesToContext','addFeedInteractionHeader','resourceStateChanged','48PQFHmE','changes','AIChatController','AI_CHAT_CONTEXT_CURRENT_DOCUMENT','uiId','full','313547OIqwyg','updateResourceState','requires','handleUserInteraction','setModel','setLoadingMessage','_logError','split','_insertSuggestion','_batchToChanges','showNext','scrollFeedToSuggestion','editors','$graveyard','accepted','updateFeedItemAIReplySuggestionContent','addContextOptionsChanged','isCurrentDocumentInContext','interactionCreated','toggleSuggestionDisplayMode','resetConversationTitle','getFirstRange','addFeedItemStaticMessage','error','_previewedChangeGroup','plugins','afterInit','522277CwojlY','setContextItemLoading','ai-chat-resource-load-failed','toggleWebSearch','clearPendingContextUI','addFeedItemAISuggestion','removeFeedInteraction','static','model','replyContentUpdated','reasoningFinished','AI_CHAT_CONTEXT_UNABLE_TO_UPLOAD_URL','streaming','TrackChangesEditing','map','getDocumentData','pluginName','setSelectedModel','isStarted','set','updateCurrentDocumentInContext','removed','source','getDocumentContext','focusPromptInput','closeSourceResourceBalloon','_removeAISelectionMarkers','_removeFromContext','name','document','hideFakeVisualSelection','interactionStarted','documentContextContent','_aiChatUi','context','redo','like','indexOf','rootName','ai-chat-conversation-init-failed','AI_CHAT_UNABLE_TO_START_CONVERSATION','28468476DatNil','_updateReplyContent','options','isOfficialPlugin','toString'];_0x2f6c=function(){return _0x59db4c;};return _0x2f6c();}import{getTranslation as _0x410147}from'../aicore/utils/common-translations.js';import{AI_VISUAL_SELECTION_MARKER_NAME as _0x2d0105}from'../aicore/aiediting.js';import{AIChatModels as _0x1cd0b4}from'./model/aichatmodels.js';import{getEditorFromContext as _0xe358}from'../aicore/utils/geteditorfromcontext.js';import{DocumentCompare as _0x2c7119,DATA_ID_MODEL_ATTRIBUTE as _0x2adcc9}from'@ckeditor/ckeditor5-collaboration-core';import{getOperationsFromReply as _0x2857f1}from'../aicore/utils/getoperationsfromreply.js';import{expandSelectionWithContext as _0x58915b,getMinimalSelection as _0x2f69f3,getSuggestionPartsFromReply as _0x121a6f}from'../aicore/utils/getsuggestionpartsfromreply.js';import{ModelRange as _0x2e571f,_DetachOperation as _0xcc7966}from'ckeditor5/src/engine.js';import{findOne as _0x17576e,getAttribute as _0x21da1a,serialize as _0x5571d8,Document as _0x5e6c42,findByAttribute as _0x420881}from'../aicore/utils/htmlparser.js';import{IconAI as _0x124f51}from'@ckeditor/ckeditor5-icons';import{AISuggestionContainerView as _0x4a6bc9}from'../aicore/ui/suggestioncontainer/aisuggestioncontainerview.js';import{AIBalloon as _0xc519a1}from'../aiballoon/aiballoon.js';export class AIChatController extends _0x23175c{[_0x19ee94(0x155)];[_0x19ee94(0x1eb)];[_0x19ee94(0xf3)];[_0x19ee94(0x1b6)];[_0x19ee94(0xc0)]=new Map();[_0x19ee94(0xcf)]=null;[_0x19ee94(0x165)]=!0x1;static get[_0x19ee94(0xb9)](){return[_0x23f487,_0xc519a1,_0x2c7119];}static get[_0x19ee94(0xe2)](){const _0x160822=_0x19ee94;return _0x160822(0xb3);}static get[_0x19ee94(0xfe)](){return!0x0;}static get[_0x19ee94(0x161)](){return!0x0;}[_0x19ee94(0x1d7)](){const _0x1d354c=_0x19ee94;this[_0x1d354c(0x1eb)]=this[_0x1d354c(0xf4)][_0x1d354c(0xd0)][_0x1d354c(0x114)](_0x1d354c(0x1ae)),this[_0x1d354c(0xf3)]=this[_0x1d354c(0xf4)][_0x1d354c(0xd0)][_0x1d354c(0x114)](_0x1d354c(0x1ee)),this[_0x1d354c(0x155)]=this[_0x1d354c(0xf4)][_0x1d354c(0xd0)][_0x1d354c(0x114)](_0x1d354c(0x10e)),this[_0x1d354c(0x1b6)]=new _0x1cd0b4({'connector':this[_0x1d354c(0x1eb)]});const _0x3b4157=this[_0x1d354c(0xf4)][_0x1d354c(0xd0)][_0x1d354c(0x114)](_0x1d354c(0x1bf));this[_0x1d354c(0x122)](this[_0x1d354c(0xf3)],_0x1d354c(0x1df),()=>{const _0xa8704e=_0x1d354c;this[_0xa8704e(0x1b7)]();}),this[_0x1d354c(0x122)](this[_0x1d354c(0xf3)],_0x1d354c(0x10c),(_0x5df798,_0x355d90)=>{const _0x47d0b0=_0x1d354c;this[_0x47d0b0(0x14c)]({'userMessage':_0x355d90});}),this[_0x1d354c(0x122)](_0x3b4157,_0x1d354c(0x1e6),(_0x5d4a8f,_0x4464f1)=>{const _0x3507a6=_0x1d354c;this[_0x3507a6(0x1fe)](_0x4464f1);}),this[_0x1d354c(0x122)](this[_0x1d354c(0xf3)],_0x1d354c(0x205),()=>{const _0x1c0c66=_0x1d354c;_0x3b4157[_0x1c0c66(0x12f)]();}),this[_0x1d354c(0x122)](this[_0x1d354c(0xf3)],_0x1d354c(0x149),async()=>{const _0x481135=_0x1d354c;await this[_0x481135(0x191)](),await this[_0x481135(0x194)]();}),this[_0x1d354c(0x122)](this[_0x1d354c(0xf3)],_0x1d354c(0x15e),()=>{const _0x52b7bb=_0x1d354c;this[_0x52b7bb(0x159)]?.[_0x52b7bb(0x1db)](_0x410147(this[_0x52b7bb(0xf4)][_0x52b7bb(0x183)],_0x52b7bb(0xb4)));}),this[_0x1d354c(0x122)](this[_0x1d354c(0xf3)],_0x1d354c(0x15a),(_0x5b3fba,_0x19c68c)=>{const _0x4135da=_0x1d354c;this[_0x4135da(0x159)]?.[_0x4135da(0xae)](Array[_0x4135da(0x171)](_0x19c68c));}),this[_0x1d354c(0x122)](this[_0x1d354c(0xf3)],_0x1d354c(0x14a),(_0x321e39,_0x31882e)=>{const _0x4e24b2=_0x1d354c;this[_0x4e24b2(0x159)]?.[_0x4e24b2(0x14a)](_0x31882e);}),this[_0x1d354c(0x122)](this[_0x1d354c(0xf3)],_0x1d354c(0x1e3),(_0x330f6f,_0x2c733e)=>{const _0x18182b=_0x1d354c;this[_0x18182b(0x159)]?.[_0x18182b(0x1e3)](_0x2c733e[_0x18182b(0xe8)],_0x2c733e[_0x18182b(0x11e)]);}),this[_0x1d354c(0x122)](this[_0x1d354c(0xf3)],_0x1d354c(0x173),(_0x5f0fb0,_0x4bc153)=>{const _0x7e1d7=_0x1d354c;this[_0x7e1d7(0xed)](_0x4bc153);}),this[_0x1d354c(0x122)](this[_0x1d354c(0xf3)],_0x1d354c(0x126),(_0xf3baa8,_0x25afdf)=>{const _0x382362=_0x1d354c;this[_0x382362(0x159)]?.[_0x382362(0x126)](_0x25afdf[_0x382362(0x201)],_0x25afdf[_0x382362(0x134)],_0x25afdf[_0x382362(0x1a1)]);}),this[_0x1d354c(0x122)](this[_0x1d354c(0xf3)],_0x1d354c(0xd5),()=>{const _0x337d3c=_0x1d354c;this[_0x337d3c(0x13b)]();}),this[_0x1d354c(0x122)](this[_0x1d354c(0xf3)],_0x1d354c(0x1ec),()=>{const _0x43d7ef=_0x1d354c;this[_0x43d7ef(0x12e)]();}),this[_0x1d354c(0x122)](this[_0x1d354c(0xf3)],_0x1d354c(0x12b),(_0x5eb600,_0x120a1d)=>{const _0x2782e8=_0x1d354c;this[_0x2782e8(0x159)]?.[_0x2782e8(0xbb)](_0x120a1d);}),this[_0x1d354c(0x122)](this[_0x1d354c(0xf3)],_0x1d354c(0xf6),(_0x86be21,{replyId:_0x31c67d})=>{const _0x40443b=_0x1d354c;console[_0x40443b(0x1a3)](_0x40443b(0x127),_0x31c67d);}),this[_0x1d354c(0x122)](this[_0x1d354c(0xf3)],_0x1d354c(0x1e1),(_0x11bf1c,{replyId:_0x3c8489})=>{const _0x4f810e=_0x1d354c;console[_0x4f810e(0x1a3)](_0x4f810e(0x189),_0x3c8489);}),this[_0x1d354c(0x122)](this[_0x1d354c(0xf3)],_0x1d354c(0x170),(_0xe14a60,_0x2a278a)=>{const _0xf1b089=_0x1d354c;this[_0xf1b089(0xf4)][_0xf1b089(0xd0)][_0xf1b089(0x114)](_0xc519a1)[_0xf1b089(0x1e5)](),this[_0xf1b089(0xbf)](_0x2a278a);}),this[_0x1d354c(0x122)](this[_0x1d354c(0xf3)],_0x1d354c(0x1f6),(_0x292c3e,{replyId:_0x22459b,partIndex:_0x51ff43})=>{const _0x29a9d1=_0x1d354c;this[_0x29a9d1(0x165)]=this[_0x29a9d1(0xf3)][_0x29a9d1(0x1a4)],this[_0x29a9d1(0x195)](_0x22459b,_0x51ff43);}),this[_0x1d354c(0x122)](this[_0x1d354c(0xf3)],_0x1d354c(0x17a),(_0x464361,{replyId:_0x497299,partIndex:_0x12da43})=>{const _0x5984af=_0x1d354c,_0x4ec9b1=this[_0x5984af(0x117)](_0x497299,_0x12da43);_0x4ec9b1&&_0x5984af(0xc4)!=_0x4ec9b1[_0x5984af(0x118)][_0x5984af(0x162)][_0x5984af(0xf8)]&&this[_0x5984af(0x155)][_0x5984af(0x19c)]([_0x4ec9b1[_0x5984af(0x118)]],_0x5984af(0x186));}),this[_0x1d354c(0x122)](this[_0x1d354c(0xf3)],_0x1d354c(0x119),()=>{const _0x193dbc=_0x1d354c;this[_0x193dbc(0x155)][_0x193dbc(0xf0)](_0x193dbc(0x186));}),this[_0x1d354c(0x122)](this[_0x1d354c(0xf3)],_0x1d354c(0x174),(_0x1e41e8,_0x2957fe)=>{const _0x3af4f2=_0x1d354c;this[_0x3af4f2(0xf4)][_0x3af4f2(0xd0)][_0x3af4f2(0x114)](_0xc519a1)[_0x3af4f2(0x1e5)](),this[_0x3af4f2(0x101)](_0x2957fe);}),this[_0x1d354c(0x122)](this[_0x1d354c(0xf3)],_0x1d354c(0xca),async(_0x351cf9,_0x218f3b)=>{const _0x185ee5=_0x1d354c,{reply:_0x38cfd3}=this[_0x185ee5(0x154)](_0x218f3b[_0x185ee5(0x116)]),_0x19fb03=_0xe358(this[_0x185ee5(0xf4)]),_0x3f41d2=_0x121a6f({'editor':_0x19fb03,'changeGroups':_0x38cfd3[_0x185ee5(0x128)],'documentContextContent':_0x38cfd3[_0x185ee5(0xf2)],'showDiff':_0x218f3b[_0x185ee5(0x1a4)]});await this[_0x185ee5(0xf3)][_0x185ee5(0xc6)]({'id':_0x38cfd3['id'],'parts':_0x3f41d2,'renderingStrategy':_0x185ee5(0xd9)});}),this[_0x1d354c(0x122)](this[_0x1d354c(0xf3)],_0x1d354c(0x1a0),(_0x2fe401,{replyId:_0x2da844,partIndex:_0x2dfe35})=>{const _0x10597d=_0x1d354c;this[_0x10597d(0xcf)]?.[_0x10597d(0x116)]==_0x2da844&&this[_0x10597d(0xcf)]?.[_0x10597d(0x1d2)]==_0x2dfe35&&this[_0x10597d(0xf4)][_0x10597d(0xd0)][_0x10597d(0x114)](_0xc519a1)[_0x10597d(0x1e5)]();const {reply:_0x58406b}=this[_0x10597d(0x154)](_0x2da844);_0x58406b[_0x10597d(0x113)](_0x2dfe35,_0x10597d(0x204)),this[_0x10597d(0x155)][_0x10597d(0xf0)](_0x10597d(0x186));});}async[_0x19ee94(0xd1)](){const _0x10ff8a=_0x19ee94;this[_0x10ff8a(0xf4)]instanceof _0x5a2f64?this[_0x10ff8a(0x18b)](this[_0x10ff8a(0xf4)]):this[_0x10ff8a(0x122)](this[_0x10ff8a(0xf4)][_0x10ff8a(0xc3)],_0x10ff8a(0x11f),(_0x5a0488,_0x450693)=>{const _0x186ec1=_0x10ff8a;_0x450693['on'](_0x186ec1(0x14e),()=>{const _0x4add90=_0x186ec1;this[_0x4add90(0x18b)](_0x450693);});}),await this[_0x10ff8a(0x1b7)]();}[_0x19ee94(0xbf)](_0x189e9b){const _0x4e6b78=_0x19ee94,_0x3cd00e=_0xe358(this[_0x4e6b78(0xf4)]);if(!_0x3cd00e[_0x4e6b78(0xd0)][_0x4e6b78(0x1af)](_0x4e6b78(0xdf)))return;const _0x778601=this[_0x4e6b78(0xf4)][_0x4e6b78(0xd0)][_0x4e6b78(0x114)](_0x4e6b78(0x203)),{reply:_0xb04427,interaction:_0x1b2a57}=this[_0x4e6b78(0x154)](_0x189e9b[_0x4e6b78(0x116)]),_0x5b6a4c=this[_0x4e6b78(0x117)](_0x189e9b[_0x4e6b78(0x116)],_0x189e9b[_0x4e6b78(0x1d2)]),_0xbde51d=void 0x0!==_0x189e9b[_0x4e6b78(0x1d2)]?[_0xb04427[_0x4e6b78(0x128)][_0x189e9b[_0x4e6b78(0x1d2)]]]:_0xb04427[_0x4e6b78(0x128)][_0x4e6b78(0x133)](_0x240b49=>_0x4e6b78(0x10d)==_0x240b49[_0x4e6b78(0x18e)]),_0x510bce=_0xbde51d[_0x4e6b78(0xe0)](_0x392ad2=>_0xb04427[_0x4e6b78(0x128)][_0x4e6b78(0xf7)](_0x392ad2));_0x510bce[_0x4e6b78(0x1ff)](_0x537706=>_0xb04427[_0x4e6b78(0x113)](_0x537706,_0x4e6b78(0xc5)));const _0x2a1919=_0x2857f1({'editor':_0x3cd00e,'reply':_0xb04427,'interaction':_0x1b2a57,'groups':_0xbde51d,'transform':!0x0,'documentCompare':_0x778601,'documentCompareOptions':{'anchor':_0x4e6b78(0x16f),'markDeletions':!0x0}});let _0x25f559;_0x5b6a4c&&this[_0x4e6b78(0x14d)](_0x5b6a4c[_0x4e6b78(0x118)]),_0x3cd00e[_0x4e6b78(0xda)][_0x4e6b78(0xac)](_0x44db90=>{const _0x747bde=_0x4e6b78;_0x25f559=_0x44db90[_0x747bde(0x1e4)],_0x3cd00e[_0x747bde(0xd0)][_0x747bde(0x114)](_0x747bde(0xdf))[_0x747bde(0x176)](_0x2a1919),this[_0x747bde(0x155)][_0x747bde(0xf0)](_0x747bde(0x186));}),this[_0x4e6b78(0xc0)][_0x4e6b78(0xe5)](_0x25f559,{'interactionId':_0x1b2a57['id'],'replyId':_0xb04427['id'],'indexes':_0x510bce[_0x4e6b78(0x17d)]()}),this[_0x4e6b78(0x16e)](_0xb04427);}[_0x19ee94(0x101)](_0x562c64){const _0x565bf2=_0x19ee94,_0x53cfb6=_0xe358(this[_0x565bf2(0xf4)]),_0x59cf1e=this[_0x565bf2(0xf4)][_0x565bf2(0xd0)][_0x565bf2(0x114)](_0x2c7119),{reply:_0x323b49,interaction:_0x3cd19c}=this[_0x565bf2(0x154)](_0x562c64[_0x565bf2(0x116)]),_0x258ac4=this[_0x565bf2(0x117)](_0x562c64[_0x565bf2(0x116)],_0x562c64[_0x565bf2(0x1d2)]),_0x1b5820=void 0x0!==_0x562c64[_0x565bf2(0x1d2)]?[_0x323b49[_0x565bf2(0x128)][_0x562c64[_0x565bf2(0x1d2)]]]:_0x323b49[_0x565bf2(0x128)][_0x565bf2(0x133)](_0x5ec0d0=>_0x565bf2(0x10d)==_0x5ec0d0[_0x565bf2(0x18e)]),_0x48b923=_0x1b5820[_0x565bf2(0xe0)](_0x10de26=>_0x323b49[_0x565bf2(0x128)][_0x565bf2(0xf7)](_0x10de26));_0x48b923[_0x565bf2(0x1ff)](_0x416268=>_0x323b49[_0x565bf2(0x113)](_0x416268,_0x565bf2(0xc5)));const _0x39f871=_0x2857f1({'editor':_0x53cfb6,'reply':_0x323b49,'interaction':_0x3cd19c,'groups':_0x1b5820,'transform':!0x0,'documentCompare':_0x59cf1e,'documentCompareOptions':{'anchor':_0x565bf2(0x16f),'markDeletions':!0x1}});let _0x4d36b7;_0x258ac4&&this[_0x565bf2(0x14d)](_0x258ac4[_0x565bf2(0x118)]),_0x53cfb6[_0x565bf2(0xda)][_0x565bf2(0xac)](_0x1b9739=>{const _0x39f8b5=_0x565bf2;_0x4d36b7=_0x1b9739[_0x39f8b5(0x1e4)];for(const _0xcbc0ef of _0x39f871)_0xcbc0ef[_0x39f8b5(0x13a)]=_0x53cfb6[_0x39f8b5(0xda)][_0x39f8b5(0xef)][_0x39f8b5(0x1fc)],_0x1b9739[_0x39f8b5(0x1e4)][_0x39f8b5(0x153)](_0xcbc0ef),_0x53cfb6[_0x39f8b5(0xda)][_0x39f8b5(0x105)](_0xcbc0ef);}),this[_0x565bf2(0xc0)][_0x565bf2(0xe5)](_0x4d36b7,{'interactionId':_0x3cd19c['id'],'replyId':_0x323b49['id'],'indexes':_0x48b923[_0x565bf2(0x17d)]()}),this[_0x565bf2(0x16e)](_0x323b49);}[_0x19ee94(0x195)](_0x3deac4,_0x5c9e5d){const _0x2109ae=_0x19ee94,_0x50653b=_0xe358(this[_0x2109ae(0xf4)]),_0x1534a6=this[_0x2109ae(0x117)](_0x3deac4,_0x5c9e5d),_0x57d8c9=this[_0x2109ae(0xf4)][_0x2109ae(0xd0)][_0x2109ae(0x114)](_0xc519a1);if(!_0x1534a6)return void _0x57d8c9[_0x2109ae(0x1e5)]();const {range:_0x11f0d3,currentIndex:_0x1e012a,previousIndex:_0x273c05,nextIndex:_0x176315}=_0x1534a6;if(this[_0x2109ae(0xcf)]?.[_0x2109ae(0x116)]==_0x3deac4&&this[_0x2109ae(0xcf)]?.[_0x2109ae(0x1d2)]==_0x1e012a)return;this[_0x2109ae(0xcf)]={'replyId':_0x3deac4,'partIndex':_0x1e012a};const _0x229c2a=new _0x4a6bc9(_0x50653b[_0x2109ae(0x183)],{'showDiff':this[_0x2109ae(0x165)],'areActionsDisabled':!0x1,'miniToolbarConfig':{'showChanges':_0x2109ae(0xb6)},'hideHeader':!0x0}),{reply:_0x2dadf1}=this[_0x2109ae(0x154)](_0x3deac4),_0x19d11b=_0x121a6f({'editor':_0x50653b,'changeGroups':[_0x2dadf1[_0x2109ae(0x128)][_0x1e012a]],'documentContextContent':_0x2dadf1[_0x2109ae(0xf2)],'showDiff':this[_0x2109ae(0x165)]});_0x229c2a[_0x2109ae(0x1d5)]({'parts':_0x19d11b,'renderingStrategy':_0x2109ae(0xd9)});const _0x2ce6a6=_0x1e012a!==_0x273c05;this[_0x2109ae(0x14d)](_0x11f0d3,!0x0),_0x57d8c9[_0x2109ae(0x1f9)]({'index':_0x1e012a,'title':_0x410147(this[_0x2109ae(0xf4)][_0x2109ae(0x183)],_0x2109ae(0x15c),(_0x1e012a+0x1)[_0x2109ae(0xff)]()),'icon':_0x124f51,'mainView':_0x229c2a,'showRotator':_0x2ce6a6,'showApplyButton':!0x0,'showSuggestButton':!0x0,'ranges':[_0x11f0d3]}),this[_0x2109ae(0xf3)][_0x2109ae(0xc2)](_0x3deac4,_0x1e012a),this[_0x2109ae(0x122)](_0x229c2a,_0x2109ae(0xca),(_0x7d066f,{showDiff:_0x48ff9a})=>{const _0x17bc43=_0x2109ae;this[_0x17bc43(0x165)]=_0x48ff9a;const {reply:_0x4d656d}=this[_0x17bc43(0x154)](_0x3deac4),_0x4d3478=_0x121a6f({'editor':_0x50653b,'changeGroups':[_0x4d656d[_0x17bc43(0x128)][_0x1e012a]],'documentContextContent':_0x4d656d[_0x17bc43(0xf2)],'showDiff':_0x48ff9a});_0x229c2a[_0x17bc43(0x1d5)]({'parts':_0x4d3478,'renderingStrategy':_0x17bc43(0xd9)});}),this[_0x2109ae(0x122)](_0x57d8c9,_0x2109ae(0x174),()=>{const _0xede9ba=_0x2109ae;this[_0xede9ba(0x101)]({'replyId':_0x3deac4,'partIndex':_0x1e012a}),_0x2ce6a6?this[_0xede9ba(0x195)](_0x3deac4,_0x176315):_0x57d8c9[_0xede9ba(0x1e5)]();}),this[_0x2109ae(0x122)](_0x57d8c9,_0x2109ae(0x170),()=>{const _0x1daab7=_0x2109ae;this[_0x1daab7(0xbf)]({'replyId':_0x3deac4,'partIndex':_0x1e012a}),_0x2ce6a6?this[_0x1daab7(0x195)](_0x3deac4,_0x176315):_0x57d8c9[_0x1daab7(0x1e5)]();}),_0x2ce6a6&&(this[_0x2109ae(0x122)](_0x57d8c9,_0x2109ae(0xc1),()=>{const _0x45ab28=_0x2109ae;this[_0x45ab28(0x195)](_0x3deac4,_0x176315);}),this[_0x2109ae(0x122)](_0x57d8c9,_0x2109ae(0x1cb),()=>{const _0x2113a8=_0x2109ae;this[_0x2113a8(0x195)](_0x3deac4,_0x273c05);})),this[_0x2109ae(0x122)](_0x57d8c9,_0x2109ae(0x1fa),()=>{const _0x70aea0=_0x2109ae;this[_0x70aea0(0x190)](_0x57d8c9),this[_0x70aea0(0x190)](_0x229c2a),this[_0x70aea0(0xcf)]=null;});}[_0x19ee94(0x117)](_0x3094d1,_0x4de0c6){const _0x546cb7=_0x19ee94,_0x5b4f68=_0xe358(this[_0x546cb7(0xf4)]),{reply:_0xee9a37,interaction:_0x13d0eb}=this[_0x546cb7(0x154)](_0x3094d1),_0x4d7b63=_0xee9a37[_0x546cb7(0x128)][_0x546cb7(0x133)](_0x4ca146=>_0x546cb7(0x10d)==_0x4ca146[_0x546cb7(0x18e)]),_0x2aab94=_0x4d7b63[_0x546cb7(0xe0)](_0xf8e41a=>_0xee9a37[_0x546cb7(0x128)][_0x546cb7(0xf7)](_0xf8e41a));void 0x0===_0x4de0c6&&(_0x4de0c6=_0x2aab94[0x0]);const _0x2acaeb=_0x2aab94[_0x546cb7(0xf7)](_0x4de0c6);if(-0x1==_0x2acaeb)return null;const _0x1759c0=0x0==_0x2acaeb?_0x2aab94[_0x2aab94[_0x546cb7(0x1b8)]-0x1]:_0x2aab94[_0x2acaeb-0x1],_0x4e13e2=_0x2acaeb==_0x2aab94[_0x546cb7(0x1b8)]-0x1?_0x2aab94[0x0]:_0x2aab94[_0x2acaeb+0x1],_0x109543=_0x4d7b63[_0x2acaeb],_0xe3e6ad=new _0x5e6c42([]),_0x8822ed=new _0x5e6c42([]);for(const _0x39715e of _0x109543[_0x546cb7(0xb2)])if(_0x546cb7(0xe7)!=_0x39715e[_0x546cb7(0x110)]&&_0x8822ed[_0x546cb7(0x14b)][_0x546cb7(0x156)](_0x39715e[_0x546cb7(0x185)][_0x546cb7(0x167)](!0x0)),_0x546cb7(0x19b)!=_0x39715e[_0x546cb7(0x110)]){const _0x44713a=_0x17576e(_0x4fad0d=>_0x21da1a(_0x4fad0d,_0x546cb7(0x16a))==_0x39715e['id'],_0xee9a37[_0x546cb7(0xf2)],!0x0);_0xe3e6ad[_0x546cb7(0x14b)][_0x546cb7(0x156)](_0x44713a[_0x546cb7(0x167)](!0x0));}if(0x0==_0xe3e6ad[_0x546cb7(0x14b)][_0x546cb7(0x1b8)]){if(_0x109543[_0x546cb7(0xb2)][0x0][_0x546cb7(0x1a5)]){const _0x2ea1e7=_0x420881(_0x546cb7(0x16a),_0x109543[_0x546cb7(0xb2)][0x0][_0x546cb7(0x1a5)],_0xee9a37[_0x546cb7(0xf2)]);_0xe3e6ad[_0x546cb7(0x14b)][_0x546cb7(0x18a)](_0x2ea1e7[_0x546cb7(0x167)](!0x0)),_0x8822ed[_0x546cb7(0x14b)][_0x546cb7(0x18a)](_0x2ea1e7[_0x546cb7(0x167)](!0x0)),_0x2ea1e7[_0x546cb7(0x132)]&&(_0xe3e6ad[_0x546cb7(0x14b)][_0x546cb7(0x156)](_0x2ea1e7[_0x546cb7(0x132)][_0x546cb7(0x167)](!0x0)),_0x8822ed[_0x546cb7(0x14b)][_0x546cb7(0x156)](_0x2ea1e7[_0x546cb7(0x132)][_0x546cb7(0x167)](!0x0)));}else{const _0x43e7d5=_0xee9a37[_0x546cb7(0xf2)][_0x546cb7(0x14b)][0x0];if(!_0x43e7d5)return null;_0xe3e6ad[_0x546cb7(0x14b)][_0x546cb7(0x156)](_0x43e7d5[_0x546cb7(0x167)](!0x0)),_0x8822ed[_0x546cb7(0x14b)][_0x546cb7(0x156)](_0x43e7d5[_0x546cb7(0x167)](!0x0));}}const _0x44ea63=_0x13d0eb[_0x546cb7(0xe9)](),_0x188140=_0x5b4f68[_0x546cb7(0x1bd)][_0x546cb7(0x108)](_0x44ea63[_0x546cb7(0x1b2)]),_0x41cd1=_0x5571d8(_0xe3e6ad),_0x5cd4b0=_0x5b4f68[_0x546cb7(0x1bd)][_0x546cb7(0x108)](_0x41cd1),_0x42893e=_0x5b4f68[_0x546cb7(0x1bd)][_0x546cb7(0x108)](_0x41cd1),_0x4e90ec=_0x5b4f68[_0x546cb7(0xda)][_0x546cb7(0x10b)](_0x5cd4b0,0x0),_0x248ea8=_0x5571d8(_0x8822ed),_0x202d28={'anchor':_0x4e90ec,'markDeletions':!0x1},_0x593bac=_0x5b4f68[_0x546cb7(0xd0)][_0x546cb7(0x114)](_0x2c7119)[_0x546cb7(0x18f)](_0x41cd1,_0x248ea8,_0x202d28)[_0x546cb7(0x11a)]();if(!_0x593bac[_0x546cb7(0x1b8)])return null;_0x5b4f68[_0x546cb7(0xda)][_0x546cb7(0xac)](_0x53709a=>{const _0xed24df=_0x546cb7;for(const _0x37c5dc of _0x593bac)if(_0xed24df(0x1e2)==_0x37c5dc[_0xed24df(0x110)]){const _0xc0f881=_0x37c5dc[_0xed24df(0x10f)],_0x5dfbb7=_0x37c5dc[_0xed24df(0x16b)],_0x992e01=new _0xcc7966(_0xc0f881,_0x5dfbb7);_0x53709a[_0xed24df(0x1e4)][_0xed24df(0x153)](_0x992e01),_0x5b4f68[_0xed24df(0xda)][_0xed24df(0x105)](_0x992e01);}else _0xed24df(0x1c1)!==_0x37c5dc[_0xed24df(0x110)]&&(_0x37c5dc[_0xed24df(0x13a)]=null,_0x37c5dc[_0xed24df(0x1bc)]=!0x1,_0x53709a[_0xed24df(0x1e4)][_0xed24df(0x153)](_0x37c5dc),_0x5b4f68[_0xed24df(0xda)][_0xed24df(0x105)](_0x37c5dc));});const _0x316aa9=_0x2f69f3(_0x5b4f68,_0x593bac,_0x5cd4b0);_0x58915b(_0x5b4f68[_0x546cb7(0xda)],_0x316aa9);const _0x295897=_0x316aa9[_0x546cb7(0xcc)]()[_0x546cb7(0x140)][_0x546cb7(0x11b)][_0x546cb7(0x17d)](),_0x1753da=_0x316aa9[_0x546cb7(0xcc)]()[_0x546cb7(0x184)][_0x546cb7(0x11b)][_0x546cb7(0x17d)](),_0x295641=[];let _0xca84c0=_0x5cd4b0,_0x4b4f83=_0x42893e;for(let _0x173915=0x0;_0x173915<_0x1753da[_0x546cb7(0x1b8)];_0x173915++){const _0x3b9a01=_0xca84c0[_0x546cb7(0x131)]-_0x1753da[_0x173915];_0x295641[_0x173915]=_0x4b4f83[_0x546cb7(0x131)]-_0x3b9a01,_0xca84c0=_0xca84c0[_0x546cb7(0x1d1)](_0x1753da[_0x173915]),_0x4b4f83=_0x4b4f83[_0x546cb7(0x1d1)](_0x295641[_0x173915]);}const _0x144b9f=_0x5b4f68[_0x546cb7(0xda)][_0x546cb7(0x1c3)](_0x5b4f68[_0x546cb7(0xda)][_0x546cb7(0x1ce)](_0x42893e,_0x295897),_0x5b4f68[_0x546cb7(0xda)][_0x546cb7(0x1ce)](_0x42893e,_0x295641)),_0x5976a6=_0x42893e[_0x546cb7(0x166)](0x0)[_0x546cb7(0x1a9)](_0x2adcc9),_0x41c8ac=Array[_0x546cb7(0x171)](_0x188140[_0x546cb7(0x1e9)]())[_0x546cb7(0x1dc)](_0x3dc477=>_0x3dc477[_0x546cb7(0x1a9)](_0x2adcc9)==_0x5976a6)[_0x546cb7(0x144)](),_0x1efd47=_0x144b9f[_0x546cb7(0x140)][_0x546cb7(0x11b)][_0x546cb7(0x17d)](),_0x1d8489=_0x144b9f[_0x546cb7(0x184)][_0x546cb7(0x11b)][_0x546cb7(0x17d)]();_0x1efd47[0x0]=_0x41c8ac[0x0]+_0x1efd47[0x0],_0x1d8489[0x0]=_0x41c8ac[0x0]+_0x1d8489[0x0];let _0x5d6306=_0x5b4f68[_0x546cb7(0xda)][_0x546cb7(0x1c3)](_0x5b4f68[_0x546cb7(0xda)][_0x546cb7(0x1ce)](_0x5b4f68[_0x546cb7(0xda)][_0x546cb7(0xef)][_0x546cb7(0x169)](),_0x1efd47),_0x5b4f68[_0x546cb7(0xda)][_0x546cb7(0x1ce)](_0x5b4f68[_0x546cb7(0xda)][_0x546cb7(0xef)][_0x546cb7(0x169)](),_0x1d8489));const _0x303e02=_0x5b4f68[_0x546cb7(0xda)][_0x546cb7(0xef)][_0x546cb7(0x125)][_0x546cb7(0x11a)](_0x44ea63[_0x546cb7(0x1fc)]);for(const _0xdfdc56 of _0x303e02)_0x5d6306=_0x2e571f[_0x546cb7(0x15b)](_0x5d6306[_0x546cb7(0x200)](_0xdfdc56));return{'range':_0x5d6306,'previousIndex':_0x1759c0,'nextIndex':_0x4e13e2,'currentIndex':_0x4de0c6};}[_0x19ee94(0x18b)](_0xe936ed){const _0xc7656=_0x19ee94;if(!_0xe936ed[_0xc7656(0xd0)][_0xc7656(0x1af)](_0xc7656(0x19e)))return;const _0x4e57f9=_0xe936ed[_0xc7656(0x1d3)][_0xc7656(0x114)](_0xc7656(0x12d)),_0x2117ea=_0xe936ed[_0xc7656(0x1d3)][_0xc7656(0x114)](_0xc7656(0xf5));this[_0xc7656(0x122)](_0x4e57f9,_0xc7656(0x142),(_0x5d2583,_0x830021,_0x3f0dc3)=>{const _0x6d8cba=_0xc7656,_0x3103b3=this[_0x6d8cba(0xc0)][_0x6d8cba(0x114)](_0x830021);if(!_0x3103b3)return;const _0x50ae7a=this[_0x6d8cba(0x159)][_0x6d8cba(0x15f)](_0x3103b3[_0x6d8cba(0x1be)])[_0x6d8cba(0x145)](_0x3103b3[_0x6d8cba(0x116)]);_0x3103b3[_0x6d8cba(0x138)][_0x6d8cba(0x1ff)](_0xe14b4=>_0x50ae7a[_0x6d8cba(0x113)](_0xe14b4,_0x6d8cba(0x10d))),this[_0x6d8cba(0xc0)][_0x6d8cba(0x1aa)](_0x830021),this[_0x6d8cba(0xc0)][_0x6d8cba(0xe5)](_0x3f0dc3,_0x3103b3);}),this[_0xc7656(0x122)](_0x2117ea,_0xc7656(0x142),(_0xe2036c,_0xb6c1f,_0x25dbd5)=>{const _0xd85094=_0xc7656,_0x208a72=this[_0xd85094(0xc0)][_0xd85094(0x114)](_0xb6c1f);if(!_0x208a72)return;const _0x38dc8b=this[_0xd85094(0x159)][_0xd85094(0x15f)](_0x208a72[_0xd85094(0x1be)])[_0xd85094(0x145)](_0x208a72[_0xd85094(0x116)]);_0x208a72[_0xd85094(0x138)][_0xd85094(0x1ff)](_0x269230=>_0x38dc8b[_0xd85094(0x113)](_0x269230,_0xd85094(0xc5))),this[_0xd85094(0xc0)][_0xd85094(0x1aa)](_0xb6c1f),this[_0xd85094(0xc0)][_0xd85094(0xe5)](_0x25dbd5,_0x208a72);});}async[_0x19ee94(0x1fb)](_0xdd5a12){const _0x214101=_0x19ee94;this[_0x214101(0xf4)][_0x214101(0xd0)][_0x214101(0x114)](_0xc519a1)[_0x214101(0x1e5)](),this[_0x214101(0xf3)][_0x214101(0x120)](_0x214101(0xd9)),this[_0x214101(0xf3)][_0x214101(0x112)](!0x0),await this[_0x214101(0x191)]();try{const _0x4cb14c=this[_0x214101(0xf4)][_0x214101(0xd0)][_0x214101(0x114)](_0x351dd5);this[_0x214101(0x1b5)]('\x20'),_0x4cb14c[_0x214101(0x107)][_0x214101(0x1e7)](_0x214101(0x1ea)),await this[_0x214101(0x1b7)](_0xdd5a12);const {sessionId:_0x3f341e}=this[_0x214101(0x155)][_0x214101(0xe1)]();await this[_0x214101(0x159)][_0x214101(0x197)](_0xdd5a12,_0x3f341e),this[_0x214101(0x159)][_0x214101(0x135)]()&&this[_0x214101(0x159)][_0x214101(0x1db)](_0x410147(this[_0x214101(0xf4)][_0x214101(0x183)],_0x214101(0xb4)));}catch(_0x324021){console[_0x214101(0xce)](_0x214101(0x146),_0x324021);}finally{this[_0x214101(0xf3)][_0x214101(0x120)](_0x214101(0xde)),this[_0x214101(0xf3)][_0x214101(0x112)](!0x1);}}[_0x19ee94(0x1ac)](_0x204472){const _0x227533=_0x19ee94;this[_0x227533(0x159)]['id']===_0x204472&&this[_0x227533(0x1b7)]();}async[_0x19ee94(0x1cd)](){const _0x1762c8=_0x19ee94,_0xba676a=this[_0x1762c8(0x155)][_0x1762c8(0x17f)]();this[_0x1762c8(0x159)]?.[_0x1762c8(0x19a)](_0xba676a),this[_0x1762c8(0x159)]?.[_0x1762c8(0x1db)](_0x410147(this[_0x1762c8(0xf4)][_0x1762c8(0x183)],_0x1762c8(0xb4)));}[_0x19ee94(0x11d)](){const _0x10ccc6=_0x19ee94;this[_0x10ccc6(0x159)]?.[_0x10ccc6(0x1c9)]();}[_0x19ee94(0xea)](){const _0xbcc32=_0x19ee94;this[_0xbcc32(0xf3)][_0xbcc32(0xea)]();}async[_0x19ee94(0x1df)](){const _0xc3ccb3=_0x19ee94;await this[_0xc3ccb3(0x1b7)]();}async[_0x19ee94(0x182)]({message:_0x87bf75,quickActionData:_0x3932b1}){const _0x299586=_0x19ee94;await this[_0x299586(0x14c)]({'userMessage':_0x87bf75,'quickActionData':_0x3932b1});}[_0x19ee94(0x1bb)](){const _0x540bd6=_0x19ee94,_0x13ecf8=this[_0x540bd6(0xf4)][_0x540bd6(0x1a6)][_0x540bd6(0x114)](_0x540bd6(0x196));if(!_0x13ecf8)throw new _0x555cfc(_0x540bd6(0x178),this);return _0x13ecf8;}async[_0x19ee94(0x1b7)](_0x98e2e1){const _0x495fdb=_0x19ee94;try{this[_0x495fdb(0xf3)][_0x495fdb(0x1ba)](),await this[_0x495fdb(0x1b3)](_0x98e2e1);}catch(_0x4ef654){_0x322e37(_0x495fdb(0x1e8),_0x4ef654),this[_0x495fdb(0x159)]=void 0x0,this[_0x495fdb(0xf3)][_0x495fdb(0x163)]();}}async[_0x19ee94(0x1b3)](_0x3f8efe){const _0x1c5d79=_0x19ee94,_0x31f967=this[_0x1c5d79(0xf4)][_0x1c5d79(0xd0)][_0x1c5d79(0x114)](_0xc519a1);let _0x95ba5;_0x31f967[_0x1c5d79(0x130)]&&_0x31f967[_0x1c5d79(0x1e5)](),_0x95ba5=_0x3f8efe||!this[_0x1c5d79(0x159)]?this[_0x1c5d79(0xf4)][_0x1c5d79(0x1a6)][_0x1c5d79(0x114)](_0x1c5d79(0x188)):this[_0x1c5d79(0x159)][_0x1c5d79(0x1b4)]['id'],await this[_0x1c5d79(0x191)]();const _0x14e99f=this[_0x1c5d79(0x1bb)](),_0x4cb184=_0x3f8efe||_0x1dc6c9();this[_0x1c5d79(0x159)]=new _0x3aaab2({'connector':this[_0x1c5d79(0x1eb)],'chatModels':this[_0x1c5d79(0x1b6)],'defaultModelId':_0x95ba5,'conversationId':_0x4cb184,'group':_0x14e99f,'getEditor':()=>_0xe358(this[_0x1c5d79(0xf4)])}),this[_0x1c5d79(0x159)]['on'](_0x1c5d79(0x16c),(_0x5edc99,_0x15bc18)=>{const _0x2bd622=_0x1c5d79;_0x15bc18[_0x2bd622(0x1a7)]=this[_0x2bd622(0x104)](_0x15bc18[_0x2bd622(0x1a7)],this[_0x2bd622(0xf4)][_0x2bd622(0x1a6)][_0x2bd622(0x114)](_0x2bd622(0x148))),this[_0x2bd622(0xf3)][_0x2bd622(0x187)](_0x15bc18),this[_0x2bd622(0xf3)][_0x2bd622(0x181)](),this[_0x2bd622(0xf3)][_0x2bd622(0xd6)](),this[_0x2bd622(0xf3)][_0x2bd622(0x109)](),_0x3f8efe||(this[_0x2bd622(0xf3)][_0x2bd622(0xcb)](),this[_0x2bd622(0x159)]?.[_0x2bd622(0x1db)](_0x410147(this[_0x2bd622(0xf4)][_0x2bd622(0x183)],_0x2bd622(0xb4))));}),this[_0x1c5d79(0x159)]['on'](_0x1c5d79(0x1f3),(_0x5c179b,_0x5107fe)=>{const _0x376850=_0x1c5d79;this[_0x376850(0xf3)][_0x376850(0x143)](_0x5107fe[_0x376850(0x1f1)]);}),this[_0x1c5d79(0x159)]['on'](_0x1c5d79(0xc9),(_0x1c7d06,_0xb1c7f3)=>{const _0x201e90=_0x1c5d79;this[_0x201e90(0xf3)][_0x201e90(0x1b0)](_0xb1c7f3);}),this[_0x1c5d79(0x159)]['on'](_0x1c5d79(0x141),()=>{const _0x4a3db6=_0x1c5d79;this[_0x4a3db6(0xf3)][_0x4a3db6(0xbc)]({'isWebSearchEnabled':!0x0,'isReasoningEnabled':!0x1});}),this[_0x1c5d79(0x159)]['on'](_0x1c5d79(0x1f5),()=>{const _0x1cad05=_0x1c5d79;this[_0x1cad05(0xf3)][_0x1cad05(0xbc)]({'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x0});}),this[_0x1c5d79(0x159)]['on'](_0x1c5d79(0x1f7),(_0x171174,_0x5c55bc)=>{const _0x388f9d=_0x1c5d79;this[_0x388f9d(0xf3)][_0x388f9d(0xaf)](_0x5c55bc,{'isWebSearchEnabled':!0x0,'isReasoningEnabled':!0x1});}),this[_0x1c5d79(0x159)]['on'](_0x1c5d79(0xdc),(_0x18ac3c,_0x25947b)=>{const _0x322a96=_0x1c5d79;this[_0x322a96(0xf3)][_0x322a96(0xaf)](_0x25947b,{'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x0});}),this[_0x1c5d79(0x159)]['on'](_0x1c5d79(0xf1),()=>{const _0x2d3dea=_0x1c5d79;this[_0x2d3dea(0xf3)][_0x2d3dea(0x123)]();}),this[_0x1c5d79(0x159)]['on'](_0x1c5d79(0x1d4),async()=>{const _0xc53017=_0x1c5d79;await this[_0xc53017(0xf3)][_0xc53017(0x193)]();}),this[_0x1c5d79(0x159)]['on'](_0x1c5d79(0x11c),(_0x3d049b,_0x18e419)=>{const _0x35c28d=_0x1c5d79;this[_0x35c28d(0xf3)][_0x35c28d(0xd8)](_0x18e419['id']);}),this[_0x1c5d79(0x159)]['on'](_0x1c5d79(0x17e),(_0x1b53f8,_0x1ab49e,_0x343d54)=>{const _0x2cc842=_0x1c5d79;this[_0x2cc842(0x1b5)](_0x1ab49e,_0x343d54);}),this[_0x1c5d79(0x159)]['on'](_0x1c5d79(0x102),(_0x1629bc,_0x2d94b6)=>{const _0xb7bd75=_0x1c5d79;_0xb7bd75(0xad)===_0x2d94b6[_0xb7bd75(0x110)]?this[_0xb7bd75(0xf3)][_0xb7bd75(0x1d0)](_0x2d94b6):this[_0xb7bd75(0xf3)][_0xb7bd75(0xd7)](_0x2d94b6);}),this[_0x1c5d79(0x159)]['on'](_0x1c5d79(0xdb),async(_0x1f8ecd,_0x2dd1dc,_0x34ecc0)=>{const _0x5af4f3=_0x1c5d79;await this[_0x5af4f3(0xfc)]({'reply':_0x2dd1dc,'changeGroups':_0x34ecc0});}),this[_0x1c5d79(0x159)]['on'](_0x1c5d79(0x17c),(_0x244b1b,{reply:_0x183280,index:_0xcacf84,state:_0x8d9950})=>{const _0x2a95bc=_0x1c5d79;this[_0x2a95bc(0xf3)][_0x2a95bc(0x1f2)]({'id':_0x183280['id'],'index':_0xcacf84,'state':_0x8d9950});}),this[_0x1c5d79(0x159)]['on'](_0x1c5d79(0x1ca),(_0x28864e,_0x1ba5de)=>{const _0x5398c5=_0x1c5d79;if(this[_0x5398c5(0xf3)][_0x5398c5(0x1ab)](_0x1ba5de[_0x5398c5(0x1b1)],_0x1ba5de[_0x5398c5(0x1ed)]),_0x5398c5(0x1d8)===_0x1ba5de[_0x5398c5(0x1b1)][_0x5398c5(0x110)]){const _0x51ebe0=[..._0xe358(this[_0x5398c5(0xf4)])[_0x5398c5(0xda)][_0x5398c5(0xef)][_0x5398c5(0x1d8)][_0x5398c5(0x180)]()];this[_0x5398c5(0x155)][_0x5398c5(0x19c)](_0x51ebe0,_0x5398c5(0x103)+this[_0x5398c5(0x159)]?.['id']);}}),this[_0x1c5d79(0x159)]['on'](_0x1c5d79(0x106),(_0x377fed,_0x2595e2)=>{const _0x4aa88e=_0x1c5d79;this[_0x4aa88e(0xf3)][_0x4aa88e(0x173)](_0x2595e2[_0x4aa88e(0xb5)]),_0x4aa88e(0x1da)==_0x2595e2[_0x4aa88e(0xb5)]&&this[_0x4aa88e(0x11d)](),_0x4aa88e(0x1d8)===_0x2595e2[_0x4aa88e(0x110)]&&this[_0x4aa88e(0x155)][_0x4aa88e(0xf0)](_0x4aa88e(0x103)+this[_0x4aa88e(0x159)]?.['id']);}),this[_0x1c5d79(0x159)]['on'](_0x1c5d79(0x158),(_0x19b9c9,_0xd3a4f)=>{const _0xa56bfb=_0x1c5d79;this[_0xa56bfb(0xf3)][_0xa56bfb(0xd3)](_0xd3a4f[_0xa56bfb(0x1b1)][_0xa56bfb(0xb5)],_0xd3a4f[_0xa56bfb(0x1ed)]);}),this[_0x1c5d79(0x159)]['on'](_0x1c5d79(0x1a8),(_0x21f0d6,_0x28743a)=>{const _0x5b627c=_0x1c5d79;this[_0x5b627c(0xf3)][_0x5b627c(0x164)](_0x28743a[_0x5b627c(0x157)]);}),this[_0x1c5d79(0x159)]['on'](_0x1c5d79(0xc7),(_0x461f0d,_0x113ecf)=>{const _0x44db50=_0x1c5d79;this[_0x44db50(0xf3)][_0x44db50(0x1ef)](_0x113ecf[_0x44db50(0xfd)]);}),this[_0x1c5d79(0x159)]['on'](_0x1c5d79(0x1c8),(_0x341f85,_0x2b876e)=>{const _0x44d0da=_0x1c5d79;this[_0x44d0da(0xf3)][_0x44d0da(0x1e0)](_0x2b876e[_0x44d0da(0x201)],_0x2b876e[_0x44d0da(0xe8)],_0x2b876e[_0x44d0da(0x198)],_0x2b876e[_0x44d0da(0x1a1)]);}),this[_0x1c5d79(0x159)]['on'](_0x1c5d79(0xb0),(_0x4f7f4e,_0x45667d)=>{const _0x49fcd0=_0x1c5d79;this[_0x49fcd0(0xf3)][_0x49fcd0(0xb8)](_0x45667d[_0x49fcd0(0x201)],_0x45667d[_0x49fcd0(0x199)],_0x45667d[_0x49fcd0(0x1dd)]);}),this[_0x1c5d79(0x159)]['on'](_0x1c5d79(0x14f),(_0x30ba25,_0x480f0f)=>{const _0x12c6df=_0x1c5d79;this[_0x12c6df(0xf3)][_0x12c6df(0x13d)](_0x480f0f);}),this[_0x1c5d79(0x159)]['on'](_0x1c5d79(0x1f4),(_0x8b05a6,_0x3a42f7)=>{const _0x3e7cf3=_0x1c5d79;this[_0x3e7cf3(0xf3)][_0x3e7cf3(0xe3)](_0x3a42f7[_0x3e7cf3(0x1b4)],_0x3a42f7[_0x3e7cf3(0x13c)]);}),this[_0x1c5d79(0x159)]['on'](_0x1c5d79(0xce),(_0x31b6e3,{error:_0x1615a7,interactionId:_0x34f759,fileName:_0x58302a,url:_0x457069,sourceId:_0x12e647,sourceLabel:_0x1e09c6})=>{const _0x56ee44=_0x1c5d79,_0x2f692e=_0x34f759?_0x34f759+':'+_0x1dc6c9():_0x1dc6c9();_0x1615a7[_0x56ee44(0x1c6)][_0x56ee44(0x12a)](_0x56ee44(0x13f))?this[_0x56ee44(0xf3)][_0x56ee44(0xcd)]({'staticMessage':_0x410147(this[_0x56ee44(0xf4)][_0x56ee44(0x183)],_0x56ee44(0x18c)),'id':_0x2f692e}):_0x1615a7[_0x56ee44(0x1c6)][_0x56ee44(0x12a)](_0x56ee44(0xf9))||_0x1615a7[_0x56ee44(0x1c6)][_0x56ee44(0x12a)](_0x56ee44(0x1e8))?(this[_0x56ee44(0xf3)][_0x56ee44(0x17b)]({'errorMessage':_0x410147(this[_0x56ee44(0xf4)][_0x56ee44(0x183)],_0x56ee44(0xfa)),'id':_0x2f692e}),this[_0x56ee44(0xbd)](_0x1615a7)):_0x1615a7[_0x56ee44(0x1c6)][_0x56ee44(0x12a)](_0x56ee44(0x18d))?this[_0x56ee44(0xf3)][_0x56ee44(0x17b)]({'errorMessage':_0x410147(this[_0x56ee44(0xf4)][_0x56ee44(0x183)],_0x56ee44(0x192),_0x58302a),'id':_0x2f692e}):_0x1615a7[_0x56ee44(0x1c6)][_0x56ee44(0x12a)](_0x56ee44(0x1cf))?this[_0x56ee44(0xf3)][_0x56ee44(0x17b)]({'errorMessage':_0x410147(this[_0x56ee44(0xf4)][_0x56ee44(0x183)],_0x56ee44(0xdd),_0x457069),'id':_0x2f692e}):_0x1615a7[_0x56ee44(0x1c6)][_0x56ee44(0x12a)](_0x56ee44(0x124))?this[_0x56ee44(0xf3)][_0x56ee44(0x17b)]({'errorMessage':_0x410147(this[_0x56ee44(0xf4)][_0x56ee44(0x183)],_0x56ee44(0x177)),'id':_0x2f692e}):_0x1615a7[_0x56ee44(0x1c6)][_0x56ee44(0x12a)](_0x56ee44(0x115))?this[_0x56ee44(0xf3)][_0x56ee44(0x17b)]({'errorMessage':_0x410147(this[_0x56ee44(0xf4)][_0x56ee44(0x183)],_0x56ee44(0x121)),'id':_0x2f692e}):_0x1615a7[_0x56ee44(0x1c6)][_0x56ee44(0x12a)](_0x56ee44(0x168))?(_0x12e647&&this[_0x56ee44(0xf3)][_0x56ee44(0xeb)](_0x12e647),this[_0x56ee44(0xf3)][_0x56ee44(0x17b)]({'errorMessage':_0x410147(this[_0x56ee44(0xf4)][_0x56ee44(0x183)],_0x56ee44(0x1a2),_0x1e09c6||_0x56ee44(0xe8)),'id':_0x2f692e}),this[_0x56ee44(0xbd)](_0x1615a7)):_0x1615a7[_0x56ee44(0x1c6)][_0x56ee44(0x12a)](_0x56ee44(0xd4))?(this[_0x56ee44(0xf3)][_0x56ee44(0x17b)]({'errorMessage':_0x410147(this[_0x56ee44(0xf4)][_0x56ee44(0x183)],_0x56ee44(0x1c5)),'id':_0x2f692e}),this[_0x56ee44(0xbd)](_0x1615a7)):(this[_0x56ee44(0xf3)][_0x56ee44(0x17b)]({'errorMessage':_0x410147(this[_0x56ee44(0xf4)][_0x56ee44(0x183)],_0x56ee44(0x202)),'id':_0x2f692e}),this[_0x56ee44(0xbd)](_0x1615a7));}),await this[_0x1c5d79(0x159)][_0x1c5d79(0x1d7)](this[_0x1c5d79(0xf4)][_0x1c5d79(0x1a6)][_0x1c5d79(0x114)](_0x1c5d79(0x151))),_0x3f8efe||await this[_0x1c5d79(0x159)][_0x1c5d79(0x140)]();}async[_0x19ee94(0x14c)]({userMessage:_0xabc6a9,quickActionData:_0x5f57d3}){const _0x3ef7a9=_0x19ee94;if(!this[_0x3ef7a9(0x159)])throw new _0x555cfc(_0x3ef7a9(0x160));this[_0x3ef7a9(0x159)][_0x3ef7a9(0xc8)]()&&await this[_0x3ef7a9(0x159)][_0x3ef7a9(0xe6)](this[_0x3ef7a9(0x155)][_0x3ef7a9(0xe1)]()),this[_0x3ef7a9(0x159)]['id']&&this[_0x3ef7a9(0x159)][_0x3ef7a9(0xe4)]&&await this[_0x3ef7a9(0x159)][_0x3ef7a9(0xba)]({'userMessage':_0xabc6a9,'quickActionData':_0x5f57d3}),this[_0x3ef7a9(0xec)]();}[_0x19ee94(0xec)](){const _0x52d23a=_0x19ee94,_0x3fe8a8=_0xe358(this[_0x52d23a(0xf4)])[_0x52d23a(0xda)],_0x1abc0a=Array[_0x52d23a(0x171)](_0x3fe8a8[_0x52d23a(0x129)][_0x52d23a(0x1cc)](_0x2d0105));_0x3fe8a8[_0x52d23a(0xac)](_0x2abfd8=>{const _0xe36fc0=_0x52d23a;_0x1abc0a[_0xe36fc0(0x1ff)](_0x2dd824=>_0x2abfd8[_0xe36fc0(0x137)](_0x2dd824));});}[_0x19ee94(0x19f)](){const _0x4f6cc0=_0x19ee94;console[_0x4f6cc0(0x1a3)](_0x4f6cc0(0x15d));}[_0x19ee94(0x1fe)](_0x56892c){const _0x10982e=_0x19ee94;this[_0x10982e(0xf3)][_0x10982e(0x147)](_0x56892c);}[_0x19ee94(0xbd)](_0x452e88){const _0x2556d7=_0x19ee94;_0x322e37(_0x452e88[_0x2556d7(0x1c6)]);}[_0x19ee94(0xed)](_0x48afc0){const _0x16bea1=_0x19ee94;this[_0x16bea1(0x159)]?.[_0x16bea1(0x10a)](_0x48afc0);}[_0x19ee94(0x13b)](){const _0x18c3bd=_0x19ee94;this[_0x18c3bd(0x159)]?.[_0x18c3bd(0xd5)]();}[_0x19ee94(0x12e)](){const _0x4319b6=_0x19ee94;this[_0x4319b6(0x159)]?.[_0x4319b6(0x1ec)]();}[_0x19ee94(0x154)](_0x4c1cbd){const _0x574b36=_0x19ee94,[_0x132851,_0x18af95]=_0x4c1cbd[_0x574b36(0xbe)](':'),_0x23dd87=this[_0x574b36(0x159)][_0x574b36(0x15f)](_0x132851),_0x221888=_0x23dd87[_0x574b36(0x145)](_0x18af95);return{'interaction':_0x23dd87,'reply':_0x221888};}[_0x19ee94(0x14d)](_0x428864,_0x1f31d0=!0x1){const _0x3aa614=_0x19ee94,_0x55fe0b=_0xe358(this[_0x3aa614(0xf4)]),_0x33e8b2={'target':_0x55fe0b[_0x3aa614(0x16d)][_0x3aa614(0x107)][_0x3aa614(0x1c2)][_0x3aa614(0x100)](_0x55fe0b[_0x3aa614(0x16d)][_0x3aa614(0x13e)][_0x3aa614(0x139)](_0x428864)),'viewportOffset':{'top':0x96,'left':0x0,'bottom':0x32,'right':0x0},'ancestorOffset':0x14,'alignToTop':_0x1f31d0};_0x1f31d0&&(_0x33e8b2[_0x3aa614(0x136)]=!0x0),_0x360cfb(_0x33e8b2);}[_0x19ee94(0x1b5)](_0x41da20,_0x795a4b=!0x1){const _0x3afe3b=_0x19ee94;this[_0x3afe3b(0xf3)][_0x3afe3b(0x17e)](_0x41da20||_0x410147(this[_0x3afe3b(0xf4)][_0x3afe3b(0x183)],_0x3afe3b(0x1fd)),_0x795a4b);}[_0x19ee94(0x104)](_0x3b7817,_0x56f45b){const _0x3ce1a7=_0x19ee94;let _0x2fe763;if(_0x56f45b){_0x2fe763=[];const _0x212a8a=_0x3ce1a7(0x1f8)==typeof _0x56f45b?[_0x56f45b[_0x3ce1a7(0x1d9)]()]:_0x56f45b[_0x3ce1a7(0xe0)](_0x4e1fa2=>_0x4e1fa2[_0x3ce1a7(0x1d9)]());for(const _0x222010 of _0x212a8a)for(const _0xc5541f of _0x3b7817)(_0xc5541f['id'][_0x3ce1a7(0x1d9)]()===_0x222010||_0xc5541f[_0x3ce1a7(0xee)][_0x3ce1a7(0x1d9)]()===_0x222010||_0xc5541f[_0x3ce1a7(0x1b9)][_0x3ce1a7(0x1d9)]()===_0x222010||_0xc5541f['id'][_0x3ce1a7(0x1d9)]()[_0x3ce1a7(0x12a)](_0x222010))&&_0x2fe763[_0x3ce1a7(0x156)](_0xc5541f);}else _0x2fe763=_0x3b7817;return _0x2fe763;}async[_0x19ee94(0xfc)]({reply:_0x52d04d,changeGroups:_0x4e2f80,renderingStrategy:_0x384d3c}){const _0x5b6e6c=_0x19ee94,{id:_0xded5f,isDone:_0x1e6c1a,type:_0xa2ce48,parsedContent:_0x174c07}=_0x52d04d;if(_0x5b6e6c(0x12c)===_0xa2ce48){const _0x386c09=_0xe358(this[_0x5b6e6c(0xf4)]),_0x51c92f=_0x121a6f({'editor':_0x386c09,'showDiff':this[_0x5b6e6c(0xf3)][_0x5b6e6c(0x1a4)],'changeGroups':_0x4e2f80,'documentContextContent':_0x52d04d[_0x5b6e6c(0xf2)]});await this[_0x5b6e6c(0xf3)][_0x5b6e6c(0xc6)]({'id':_0xded5f,'parts':_0x51c92f,'renderingStrategy':_0x384d3c,'isDone':_0x1e6c1a});}else _0x5b6e6c(0xad)===_0xa2ce48&&await this[_0x5b6e6c(0xf3)][_0x5b6e6c(0x1c7)]({'id':_0xded5f,'parsedContent':_0x174c07,'renderingStrategy':_0x384d3c,'isDone':_0x1e6c1a});_0x1e6c1a&&_0x52d04d[_0x5b6e6c(0x1f0)][_0x5b6e6c(0x1b8)]>0x0&&this[_0x5b6e6c(0xf3)][_0x5b6e6c(0x1c4)](_0xded5f,_0x52d04d[_0x5b6e6c(0x1f0)]);}async[_0x19ee94(0x191)](){const _0x25618c=_0x19ee94,_0x34aa38=this[_0x25618c(0x159)]?.[_0x25618c(0x1ad)];_0x34aa38&&(_0x34aa38[_0x25618c(0x111)](),this[_0x25618c(0xf3)][_0x25618c(0x172)](_0x34aa38));}async[_0x19ee94(0x194)](){const _0xd279e3=_0x19ee94,_0x2355a7=this[_0xd279e3(0x159)]?.[_0xd279e3(0x1ad)];if(_0x2355a7){for await(const _0x23e0ea of _0x2355a7[_0xd279e3(0x179)])await this[_0xd279e3(0xfc)]({'reply':_0x23e0ea,'changeGroups':_0x23e0ea[_0xd279e3(0x128)],'renderingStrategy':_0xd279e3(0xd9)});}}[_0x19ee94(0x16e)](_0x57afcb){const _0x4a7fee=_0x19ee94,_0x1385c9={'positiveCount':_0x57afcb[_0x4a7fee(0x128)][_0x4a7fee(0x133)](_0x4e5497=>_0x4a7fee(0xc5)===_0x4e5497[_0x4a7fee(0x18e)])[_0x4a7fee(0x1b8)],'totalCount':_0x57afcb[_0x4a7fee(0x128)][_0x4a7fee(0x1b8)]},_0x2e4a32=this[_0x4a7fee(0x159)][_0x4a7fee(0x15f)](_0x57afcb[_0x4a7fee(0x1be)])[_0x4a7fee(0x152)];this[_0x4a7fee(0x1eb)][_0x4a7fee(0x1d6)](this[_0x4a7fee(0x159)]['id'],_0x2e4a32,_0x1385c9);}}
23
+ const _0x9b0b9b=_0x7e98;(function(_0x543868,_0x5c7126){const _0x55ce83=_0x7e98,_0x4672ce=_0x543868();while(!![]){try{const _0x14c7a9=parseInt(_0x55ce83(0x1cd))/0x1+parseInt(_0x55ce83(0x1f1))/0x2+parseInt(_0x55ce83(0xf2))/0x3*(-parseInt(_0x55ce83(0xd6))/0x4)+-parseInt(_0x55ce83(0x1b4))/0x5+parseInt(_0x55ce83(0x1c5))/0x6+-parseInt(_0x55ce83(0x1c1))/0x7*(parseInt(_0x55ce83(0x15b))/0x8)+parseInt(_0x55ce83(0x222))/0x9*(-parseInt(_0x55ce83(0x178))/0xa);if(_0x14c7a9===_0x5c7126)break;else _0x4672ce['push'](_0x4672ce['shift']());}catch(_0x2d7b69){_0x4672ce['push'](_0x4672ce['shift']());}}}(_0x2b6f,0xda0cd));import{ContextPlugin as _0x242be3,Editor as _0x5a1dd2}from'ckeditor5/src/core.js';import{CKEditorError as _0x30fa1e,logError as _0xd99304,scrollViewportToShowTarget as _0x33a9d6,uid as _0x4a61b3}from'ckeditor5/src/utils.js';import{AIConnector as _0xa160f8}from'../aicore/aiconnector.js';import{AITabs as _0x43e068}from'../aitabs/aitabs.js';import{AIChatConversation as _0x1a8029}from'./model/aichatconversation.js';import{getTranslation as _0x19ae4a}from'../aicore/utils/common-translations.js';function _0x7e98(_0x177fc2,_0x485ac4){const _0x2b6f68=_0x2b6f();return _0x7e98=function(_0x7e98a2,_0x10f2ea){_0x7e98a2=_0x7e98a2-0xd1;let _0x77ec09=_0x2b6f68[_0x7e98a2];return _0x77ec09;},_0x7e98(_0x177fc2,_0x485ac4);}import{AI_VISUAL_SELECTION_MARKER_NAME as _0x3f37cf}from'../aicore/aiediting.js';import{AIChatModels as _0x50164e}from'./model/aichatmodels.js';import{getEditorFromContext as _0x652de9}from'../aicore/utils/geteditorfromcontext.js';import{DocumentCompare as _0x581471,DATA_ID_MODEL_ATTRIBUTE as _0x21d2ae}from'@ckeditor/ckeditor5-collaboration-core';import{getOperationsFromReply as _0x1775d9}from'../aicore/utils/getoperationsfromreply.js';import{expandSelectionWithContext as _0x371dd3,getMinimalSelection as _0x171b69,getSuggestionPartsFromReply as _0x5d6e00}from'../aicore/utils/getsuggestionpartsfromreply.js';import{ModelRange as _0x2d44c0,_DetachOperation as _0x4b1e68}from'ckeditor5/src/engine.js';import{findOne as _0x4c173d,getAttribute as _0x57bbe4,serialize as _0x3e5089,Document as _0x2a273e,findByAttribute as _0x41407c}from'../aicore/utils/htmlparser.js';import{IconAI as _0xe41b23}from'@ckeditor/ckeditor5-icons';import{AISuggestionContainerView as _0x4b29c4}from'../aicore/ui/suggestioncontainer/aisuggestioncontainerview.js';import{AIBalloon as _0x82d960}from'../aiballoon/aiballoon.js';function _0x2b6f(){const _0xe037a3=['error','document','Disliked\x20response','AI_CHAT_UNTITLED_CONVERSATION','createConversation','ai-chat-controller-no-active-conversation','_updateReplyContent','updateFeedItemAIReplySources','setAddContextOptions','indexes','range','webSearchFinished','locale','contextItemAdded','isCurrentDocumentInContext','node','removeFeedInteraction','push','close','addDocumentToContext','getGroupId','isModelAvailable','options','Undo','reasoningFinished','source','getChild','text-delta','_aiChatUi','editing','init','isDisabled','getRoot','updateContent','setIsUploadInProgress','resources','current-document','ai-chat-source-resources-load-failed','message','updateConversationTitle','children','addContextItem','ai-chat-resource-load-failed','_getDocumentRangeForReplyChanges','replyContentUpdated','data-id','toggleLoadingSkeleton','partIndex','removeMarker','getDocumentContext','isPremiumPlugin','getPath','setLoadingMessage','Liked\x20response','3390400tjCxAz','insertSuggestion','createPositionFromPath','mouseLeaveSuggestion','activateTab','commands','sourceId','loadSourceResources','split','isCurrentDocumentInConversation','model','startConversation','uiId','7ATEUqj','toggleSuggestionDisplayMode','getChildAtOffset','setIsMaximized','10259322EJuVns','setConversationTitle','plugins','setContextItemLoading','getFirstRange','uid','toggleWebSearch','_showConversationHistory','1720456HmsmsB','type','addOperation','AI_CHAT_RESOURCE_LOAD_FAILED','editors','resourceId','updateFeedItemAIReplySuggestionPartState','_scrollToSuggestionRange','AIConnector','resizeTabs','AIChatController','dialogClosed','isOfficialPlugin','_previewedChangeGroup','_setIsMaximized','uploadProgressChanged','addFeedItemStaticMessage','getAttribute','contextSent','maxOffset','sourceResourcesLoaded','rejectSuggestion','toggleReasoning','end','interactionStarted','focusPromptInput','getRanges','domConverter','getChildren','replyCreated','updateCapabilities','dislike','_batchToChanges','Failed\x20to\x20load\x20conversation','getDocumentData','stopListening','640068iseoMG','get','remove','log','setChangeGroupState','stop','addFeedInteractionHeader','AI_CHAT_CONTEXT_UNSUPPORTED_TYPE','revert','rootName','ai-chat-context-unsupported-type','addCurrentDocumentToContext','removeSelectionFromContext','sources','getMarkersGroup','DocumentCompare','ai-chat-conversation-start-failed','addResourceToContext','getReply','Showing\x20conversation\x20history...','resize','createRange','afterInit','delete','resetConversationTitle','add','sendUserMessage','unshift','setModel','AIEditing','ai-chat-controller-mouse-over','upsertAIChatRating','open','ai-chat-missing-channel-id','parse','load','AI_CHAT_CONTEXT_UNABLE_TO_LOAD_RESOURCES','context','startInteraction','removeContextItem','pending','ai-chat-file-upload-failed','_removeFromContext','resourceStateChanged','populateSourceResourceBalloon','pluginName','isUploadInProgress','_aiConnector','_toggleWebSearch','216JJBDTy','AI_CHAT_CONTEXT_UNABLE_TO_UPLOAD_URL','path','resetMessageInput','from','query','removeFromContext','AITabs','interactionCreated','applyOperation','addContextOptionsChanged','400128VTodCG','showDiff','webSearchStarted','interactionId','showPrevious','_createFromRanges','resource','has','setSelectedModel','_openBalloonFor','set','_applyOperationsAsSuggestions','createPositionAt','modification-delta','indexOf','listenTo','AI_CHAT_ABORTED_MESSAGE','AI_CHAT_UNABLE_TO_START_CONVERSATION','hideFakeVisualSelection','redo','_integrateEditor','reasoningStarted','getInteractionAndReplyById','conversationInitialized','resizedTabs','undo','selectModel','_toggleReasoning','3aFaVhV','updateFeedItemAIReplySuggestionContent','isStarted','_applySuggestion','removeSelectionFromChatContext','slice','addFileToContext','getOperations','AI_BALLOON_HEADER_TITLE','ready','scrollFeedToSuggestion','ai.chat.models.defaultModelId','_handleStartConversation','lastInteraction','contextItem','contextItemLoadingEnded','cloneNode','enableControls','requires','_flushLastInteractionUI','getTransformedByOperation','interactionDestroyed','$graveyard','showNext','like','ai-chat-context-invalid-data','map','loadConversation','filter','addFeedItemAIReply','anchorId','_insertSuggestion','alignToTop','mouseOverSuggestion','root','content','markers','batch','ai-chat-url-upload-failed','addFeedItemUserMessage','contextItemRemoved','ai-chat-conversation-init-failed','getSelectionText','new','_aiEditing','handleUserInteraction','closeSourceResourceBalloon','interactionFinished','selectedModel','isLoading','static','TrackChangesEditing','isOpen','collaboration.channelId','clearPendingContextUI','isDocumentOperation','disableControls','updateResourceState','addUrlToContext','_balloonShowDiff','addSelectionToChatContext','mapper','updateFeedItemAIReplyContent','startsWith','setFeedItemRenderingStrategy','rejected','stopInteraction','modelSelected','replies','getInteraction','accepted','removed','ai-request-aborted','_aiChatModels','showChangeInText','messageId','addFeedItemError','ai.chat.models.displayedModels','AI_CHAT_CONTEXT_CURRENT_DOCUMENT','howMany','documentContextContent','toViewRange','data','baseVersion','length','outdated','showFakeVisualSelection','streaming','state','history','_startConversationSafely','change','marker','clearConversationContextUI','find','addFilesToContext','toString','addSelectionToContext','_logError','_handleUIUserMessage','forEach','activeConversation','replyId','selection','main','12113952Qfrjar','changes','version','handleRemovedConversation','changeGroups','AI_CHAT_CONTEXT_UNABLE_TO_UPLOAD_FILE','capabilitiesUpdated','updateCurrentDocumentInContext','finishInteraction','ai.chat.context','config','replyChangeGroupStateUpdated','addFeedItemAISuggestion','contextItems','AI_CHAT_GENERIC_ERROR','nextSibling','viewRangeToDom','_updateRatings','AIChatUI','view','_stopLastInteraction','start','getDiff','_removeAISelectionMarkers','abortPromptStream','setConversationContext','sourcePosition','full','AI_CHAT_CONTEXT_INVALID_DATA','235370rozRSh','isInContext','ai-conversation-','sendMessage','chat','applySuggestion'];_0x2b6f=function(){return _0xe037a3;};return _0x2b6f();}export class AIChatController extends _0x242be3{[_0x9b0b9b(0x11e)];[_0x9b0b9b(0x220)];[_0x9b0b9b(0x19a)];[_0x9b0b9b(0x13b)];[_0x9b0b9b(0x1ed)]=new Map();[_0x9b0b9b(0x1da)]=null;[_0x9b0b9b(0x12d)]=!0x1;static get[_0x9b0b9b(0x104)](){return[_0xa160f8,_0x82d960,_0x581471];}static get[_0x9b0b9b(0x21e)](){const _0x5a2a2e=_0x9b0b9b;return _0x5a2a2e(0x1d7);}static get[_0x9b0b9b(0x1d9)](){return!0x0;}static get[_0x9b0b9b(0x1b0)](){return!0x0;}[_0x9b0b9b(0x19c)](){const _0xf47f86=_0x9b0b9b;this[_0xf47f86(0x220)]=this[_0xf47f86(0x216)][_0xf47f86(0x1c7)][_0xf47f86(0x1f2)](_0xf47f86(0x1d5)),this[_0xf47f86(0x19a)]=this[_0xf47f86(0x216)][_0xf47f86(0x1c7)][_0xf47f86(0x1f2)](_0xf47f86(0x16d)),this[_0xf47f86(0x11e)]=this[_0xf47f86(0x216)][_0xf47f86(0x1c7)][_0xf47f86(0x1f2)](_0xf47f86(0x20e)),this[_0xf47f86(0x13b)]=new _0x50164e({'connector':this[_0xf47f86(0x220)],'displayedModels':this[_0xf47f86(0x216)][_0xf47f86(0x165)][_0xf47f86(0x1f2)](_0xf47f86(0x13f)),'defaultModelId':this[_0xf47f86(0x216)][_0xf47f86(0x165)][_0xf47f86(0x1f2)](_0xf47f86(0xfd))});const _0x281a5f=this[_0xf47f86(0x216)][_0xf47f86(0x1c7)][_0xf47f86(0x1f2)](_0xf47f86(0xd2));this[_0xf47f86(0xe5)](this[_0xf47f86(0x19a)],_0xf47f86(0x1bf),()=>{const _0x5bbe05=_0xf47f86;this[_0x5bbe05(0x14c)]();}),this[_0xf47f86(0xe5)](this[_0xf47f86(0x19a)],_0xf47f86(0x20b),(_0x2edb9b,_0x4d48ea)=>{const _0x5e5be9=_0xf47f86;this[_0x5e5be9(0x155)]({'userMessage':_0x4d48ea});}),this[_0xf47f86(0xe5)](_0x281a5f,_0xf47f86(0xee),(_0x5447b7,_0x2e99e6)=>{const _0x423f32=_0xf47f86;this[_0x423f32(0x1db)](_0x2e99e6);}),this[_0xf47f86(0xe5)](this[_0xf47f86(0x19a)],_0xf47f86(0x1d6),()=>{const _0x5da2c2=_0xf47f86;_0x281a5f[_0x5da2c2(0x205)]();}),this[_0xf47f86(0xe5)](this[_0xf47f86(0x19a)],_0xf47f86(0x173),async()=>{const _0x1aea9d=_0xf47f86;await this[_0x1aea9d(0x16f)](),await this[_0x1aea9d(0x105)]();}),this[_0xf47f86(0xe5)](this[_0xf47f86(0x19a)],_0xf47f86(0x191),()=>{const _0x2f0182=_0xf47f86;this[_0x2f0182(0x157)]?.[_0x2f0182(0x1fc)](_0x19ae4a(this[_0x2f0182(0x216)][_0x2f0182(0x18a)],_0x2f0182(0x140)));}),this[_0xf47f86(0xe5)](this[_0xf47f86(0x19a)],_0xf47f86(0xf8),(_0x264de5,_0x990f7a)=>{const _0x34cf24=_0xf47f86;this[_0x34cf24(0x157)]?.[_0x34cf24(0x151)](Array[_0x34cf24(0x226)](_0x990f7a));}),this[_0xf47f86(0xe5)](this[_0xf47f86(0x19a)],_0xf47f86(0x12c),(_0x129bb4,_0x1df3d1)=>{const _0x1f96fc=_0xf47f86;this[_0x1f96fc(0x157)]?.[_0x1f96fc(0x12c)](_0x1df3d1);}),this[_0xf47f86(0xe5)](this[_0xf47f86(0x19a)],_0xf47f86(0x202),(_0x59b930,_0x3823e9)=>{const _0x4abc18=_0xf47f86;this[_0x4abc18(0x157)]?.[_0x4abc18(0x202)](_0x3823e9[_0x4abc18(0x197)],_0x3823e9[_0x4abc18(0xdc)]);}),this[_0xf47f86(0xe5)](this[_0xf47f86(0x19a)],_0xf47f86(0x218),(_0x1b3415,_0x22344f)=>{const _0x1883f5=_0xf47f86;this[_0x1883f5(0x21b)](_0x22344f);}),this[_0xf47f86(0xe5)](this[_0xf47f86(0x19a)],_0xf47f86(0x1bb),(_0xa21bcf,_0x3938af)=>{const _0x5df0af=_0xf47f86;this[_0x5df0af(0x157)]?.[_0x5df0af(0x1bb)](_0x3938af[_0x5df0af(0x1ba)],_0x3938af[_0x5df0af(0x227)],_0x3938af[_0x5df0af(0x1ca)]);}),this[_0xf47f86(0xe5)](this[_0xf47f86(0x19a)],_0xf47f86(0x1cb),()=>{const _0x5cb443=_0xf47f86;this[_0x5cb443(0x221)]();}),this[_0xf47f86(0xe5)](this[_0xf47f86(0x19a)],_0xf47f86(0x1e3),()=>{const _0x39f42b=_0xf47f86;this[_0x39f42b(0xf1)]();}),this[_0xf47f86(0xe5)](this[_0xf47f86(0x19a)],_0xf47f86(0xf0),(_0x1d2694,_0x317526)=>{const _0x5f13a6=_0xf47f86;this[_0x5f13a6(0x157)]?.[_0x5f13a6(0x20d)](_0x317526);}),this[_0xf47f86(0xe5)](this[_0xf47f86(0x19a)],_0xf47f86(0x10a),(_0x4cc17e,{replyId:_0x160f84})=>{const _0x5edc13=_0xf47f86;console[_0x5edc13(0x1f4)](_0x5edc13(0x1b3),_0x160f84);}),this[_0xf47f86(0xe5)](this[_0xf47f86(0x19a)],_0xf47f86(0x1ec),(_0x149ac2,{replyId:_0x4c100d})=>{const _0x264757=_0xf47f86;console[_0x264757(0x1f4)](_0x264757(0x180),_0x4c100d);}),this[_0xf47f86(0xe5)](this[_0xf47f86(0x19a)],_0xf47f86(0x1b5),(_0x28c9d2,_0x629f5e)=>{const _0x41bbe6=_0xf47f86;this[_0x41bbe6(0x216)][_0x41bbe6(0x1c7)][_0x41bbe6(0x1f2)](_0x82d960)[_0x41bbe6(0x190)](),this[_0x41bbe6(0x111)](_0x629f5e);}),this[_0xf47f86(0xe5)](this[_0xf47f86(0x19a)],_0xf47f86(0x13c),(_0x433bef,{replyId:_0x5ca117,partIndex:_0x830c0})=>{const _0x47ef7d=_0xf47f86;this[_0x47ef7d(0x12d)]=this[_0x47ef7d(0x19a)][_0x47ef7d(0xd7)],this[_0x47ef7d(0xdf)](_0x5ca117,_0x830c0);}),this[_0xf47f86(0xe5)](this[_0xf47f86(0x19a)],_0xf47f86(0x113),(_0x33ec48,{replyId:_0x4e231a,partIndex:_0xd73238})=>{const _0x4d960b=_0xf47f86,_0x4b130e=this[_0x4d960b(0x1a9)](_0x4e231a,_0xd73238);_0x4b130e&&_0x4d960b(0x108)!=_0x4b130e[_0x4d960b(0x188)][_0x4d960b(0x114)][_0x4d960b(0x1fa)]&&this[_0x4d960b(0x11e)][_0x4d960b(0x148)]([_0x4b130e[_0x4d960b(0x188)]],_0x4d960b(0x20f));}),this[_0xf47f86(0xe5)](this[_0xf47f86(0x19a)],_0xf47f86(0x1b7),()=>{const _0x5420ff=_0xf47f86;this[_0x5420ff(0x11e)][_0x5420ff(0xe8)](_0x5420ff(0x20f));}),this[_0xf47f86(0xe5)](this[_0xf47f86(0x19a)],_0xf47f86(0x17d),(_0x4da3ba,_0x3e6801)=>{const _0x417776=_0xf47f86;this[_0x417776(0x216)][_0x417776(0x1c7)][_0x417776(0x1f2)](_0x82d960)[_0x417776(0x190)](),this[_0x417776(0xf5)](_0x3e6801);}),this[_0xf47f86(0xe5)](this[_0xf47f86(0x19a)],_0xf47f86(0x1c2),async(_0x50def6,_0x3c1d6d)=>{const _0x4a16f6=_0xf47f86,{reply:_0x4060f1}=this[_0x4a16f6(0xec)](_0x3c1d6d[_0x4a16f6(0x158)]),_0x29d381=_0x652de9(this[_0x4a16f6(0x216)]),_0x58ee35=_0x5d6e00({'editor':_0x29d381,'changeGroups':_0x4060f1[_0x4a16f6(0x15f)],'documentContextContent':_0x4060f1[_0x4a16f6(0x142)],'showDiff':_0x3c1d6d[_0x4a16f6(0xd7)]});await this[_0x4a16f6(0x19a)][_0x4a16f6(0xf3)]({'id':_0x4060f1['id'],'parts':_0x58ee35,'renderingStrategy':_0x4a16f6(0x124)});}),this[_0xf47f86(0xe5)](this[_0xf47f86(0x19a)],_0xf47f86(0x1e2),(_0x12d9af,{replyId:_0x499b4e,partIndex:_0x1a4102})=>{const _0xfc7888=_0xf47f86;this[_0xfc7888(0x1da)]?.[_0xfc7888(0x158)]==_0x499b4e&&this[_0xfc7888(0x1da)]?.[_0xfc7888(0x1ad)]==_0x1a4102&&this[_0xfc7888(0x216)][_0xfc7888(0x1c7)][_0xfc7888(0x1f2)](_0x82d960)[_0xfc7888(0x190)]();const {reply:_0x26bab9}=this[_0xfc7888(0xec)](_0x499b4e);_0x26bab9[_0xfc7888(0x1f5)](_0x1a4102,_0xfc7888(0x133)),this[_0xfc7888(0x11e)][_0xfc7888(0xe8)](_0xfc7888(0x20f));});}async[_0x9b0b9b(0x207)](){const _0x97d577=_0x9b0b9b;this[_0x97d577(0x216)]instanceof _0x5a1dd2?this[_0x97d577(0xea)](this[_0x97d577(0x216)]):this[_0x97d577(0xe5)](this[_0x97d577(0x216)][_0x97d577(0x1d1)],_0x97d577(0x20a),(_0x33e221,_0x58bcb9)=>{const _0x18336b=_0x97d577;_0x58bcb9['on'](_0x18336b(0xfb),()=>{const _0x44585a=_0x18336b;this[_0x44585a(0xea)](_0x58bcb9);});}),await this[_0x97d577(0x14c)]();}[_0x9b0b9b(0x111)](_0x5926b6){const _0x5439aa=_0x9b0b9b,_0x52af67=_0x652de9(this[_0x5439aa(0x216)]);if(!_0x52af67[_0x5439aa(0x1c7)][_0x5439aa(0xdd)](_0x5439aa(0x125)))return;const _0x15b8a0=this[_0x5439aa(0x216)][_0x5439aa(0x1c7)][_0x5439aa(0x1f2)](_0x5439aa(0x200)),{reply:_0x3d1bc4,interaction:_0x562b27}=this[_0x5439aa(0xec)](_0x5926b6[_0x5439aa(0x158)]),_0x538913=this[_0x5439aa(0x1a9)](_0x5926b6[_0x5439aa(0x158)],_0x5926b6[_0x5439aa(0x1ad)]),_0x5d4e5f=void 0x0!==_0x5926b6[_0x5439aa(0x1ad)]?[_0x3d1bc4[_0x5439aa(0x15f)][_0x5926b6[_0x5439aa(0x1ad)]]]:_0x3d1bc4[_0x5439aa(0x15f)][_0x5439aa(0x10e)](_0x5c3dcc=>_0x5439aa(0x219)==_0x5c3dcc[_0x5439aa(0x14a)]),_0x3e854b=_0x5d4e5f[_0x5439aa(0x10c)](_0x1adf1=>_0x3d1bc4[_0x5439aa(0x15f)][_0x5439aa(0xe4)](_0x1adf1));if(!_0x538913||_0x5439aa(0x108)==_0x538913[_0x5439aa(0x188)][_0x5439aa(0x114)][_0x5439aa(0x1fa)])return void _0x3e854b[_0x5439aa(0x156)](_0x5ae590=>_0x3d1bc4[_0x5439aa(0x1f5)](_0x5ae590,_0x5439aa(0x147)));_0x3e854b[_0x5439aa(0x156)](_0x127b0f=>_0x3d1bc4[_0x5439aa(0x1f5)](_0x127b0f,_0x5439aa(0x138)));const _0x4a2b15=_0x1775d9({'editor':_0x52af67,'reply':_0x3d1bc4,'interaction':_0x562b27,'groups':_0x5d4e5f,'transform':!0x0,'documentCompare':_0x15b8a0,'documentCompareOptions':{'anchor':_0x5439aa(0x15a),'markDeletions':!0x0}});let _0x3ba953;_0x538913&&this[_0x5439aa(0x1d4)](_0x538913[_0x5439aa(0x188)]),_0x52af67[_0x5439aa(0x1be)][_0x5439aa(0x14d)](_0x46c2c1=>{const _0xc36a61=_0x5439aa;_0x3ba953=_0x46c2c1[_0xc36a61(0x117)],_0x52af67[_0xc36a61(0x1c7)][_0xc36a61(0x1f2)](_0xc36a61(0x125))[_0xc36a61(0xe1)](_0x4a2b15),this[_0xc36a61(0x11e)][_0xc36a61(0xe8)](_0xc36a61(0x20f));}),this[_0x5439aa(0x1ed)][_0x5439aa(0xe0)](_0x3ba953,{'interactionId':_0x562b27['id'],'replyId':_0x3d1bc4['id'],'indexes':_0x3e854b[_0x5439aa(0xf7)]()}),this[_0x5439aa(0x16c)](_0x3d1bc4);}[_0x9b0b9b(0xf5)](_0x5039d3){const _0x24c897=_0x9b0b9b,_0x334bff=_0x652de9(this[_0x24c897(0x216)]),_0x3d3a32=this[_0x24c897(0x216)][_0x24c897(0x1c7)][_0x24c897(0x1f2)](_0x581471),{reply:_0x38947d,interaction:_0x45c9aa}=this[_0x24c897(0xec)](_0x5039d3[_0x24c897(0x158)]),_0x9b3f82=this[_0x24c897(0x1a9)](_0x5039d3[_0x24c897(0x158)],_0x5039d3[_0x24c897(0x1ad)]),_0x282ba9=void 0x0!==_0x5039d3[_0x24c897(0x1ad)]?[_0x38947d[_0x24c897(0x15f)][_0x5039d3[_0x24c897(0x1ad)]]]:_0x38947d[_0x24c897(0x15f)][_0x24c897(0x10e)](_0x425a64=>_0x24c897(0x219)==_0x425a64[_0x24c897(0x14a)]),_0x45208a=_0x282ba9[_0x24c897(0x10c)](_0x2de95c=>_0x38947d[_0x24c897(0x15f)][_0x24c897(0xe4)](_0x2de95c));if(!_0x9b3f82||_0x24c897(0x108)==_0x9b3f82[_0x24c897(0x188)][_0x24c897(0x114)][_0x24c897(0x1fa)])return void _0x45208a[_0x24c897(0x156)](_0x1b79bc=>_0x38947d[_0x24c897(0x1f5)](_0x1b79bc,_0x24c897(0x147)));_0x45208a[_0x24c897(0x156)](_0xb365b=>_0x38947d[_0x24c897(0x1f5)](_0xb365b,_0x24c897(0x138)));const _0x49bbe8=_0x1775d9({'editor':_0x334bff,'reply':_0x38947d,'interaction':_0x45c9aa,'groups':_0x282ba9,'transform':!0x0,'documentCompare':_0x3d3a32,'documentCompareOptions':{'anchor':_0x24c897(0x15a),'markDeletions':!0x1}});let _0x13b143;_0x9b3f82&&this[_0x24c897(0x1d4)](_0x9b3f82[_0x24c897(0x188)]),_0x334bff[_0x24c897(0x1be)][_0x24c897(0x14d)](_0x8213bd=>{const _0x39bd0a=_0x24c897;_0x13b143=_0x8213bd[_0x39bd0a(0x117)];for(const _0x2a8158 of _0x49bbe8)_0x2a8158[_0x39bd0a(0x145)]=_0x334bff[_0x39bd0a(0x1be)][_0x39bd0a(0x17f)][_0x39bd0a(0x15d)],_0x8213bd[_0x39bd0a(0x117)][_0x39bd0a(0x1cf)](_0x2a8158),_0x334bff[_0x39bd0a(0x1be)][_0x39bd0a(0xd4)](_0x2a8158);}),this[_0x24c897(0x1ed)][_0x24c897(0xe0)](_0x13b143,{'interactionId':_0x45c9aa['id'],'replyId':_0x38947d['id'],'indexes':_0x45208a[_0x24c897(0xf7)]()}),this[_0x24c897(0x16c)](_0x38947d);}[_0x9b0b9b(0xdf)](_0x1b22f3,_0x4b3691){const _0x53f31=_0x9b0b9b,_0x4f3097=_0x652de9(this[_0x53f31(0x216)]),_0x7e55d9=this[_0x53f31(0x1a9)](_0x1b22f3,_0x4b3691),_0x18da6f=this[_0x53f31(0x216)][_0x53f31(0x1c7)][_0x53f31(0x1f2)](_0x82d960);if(!_0x7e55d9)return void _0x18da6f[_0x53f31(0x190)]();const {range:_0x56b2ca,currentIndex:_0x3a7fab,previousIndex:_0x4fa83b,nextIndex:_0x2efc39}=_0x7e55d9;if(_0x53f31(0x108)==_0x56b2ca[_0x53f31(0x114)][_0x53f31(0x1fa)]){const {reply:_0x26f597}=this[_0x53f31(0xec)](_0x1b22f3);return _0x26f597[_0x53f31(0x1f5)](_0x3a7fab,_0x53f31(0x147)),void _0x18da6f[_0x53f31(0x190)]();}if(this[_0x53f31(0x1da)]?.[_0x53f31(0x158)]==_0x1b22f3&&this[_0x53f31(0x1da)]?.[_0x53f31(0x1ad)]==_0x3a7fab)return;this[_0x53f31(0x1da)]={'replyId':_0x1b22f3,'partIndex':_0x3a7fab};const _0x594318=new _0x4b29c4(_0x4f3097[_0x53f31(0x18a)],{'showDiff':this[_0x53f31(0x12d)],'areActionsDisabled':!0x1,'miniToolbarConfig':{'showChanges':_0x53f31(0x176)},'hideHeader':!0x0}),{reply:_0x28c1c2}=this[_0x53f31(0xec)](_0x1b22f3),_0x5b0335=_0x5d6e00({'editor':_0x4f3097,'changeGroups':[_0x28c1c2[_0x53f31(0x15f)][_0x3a7fab]],'documentContextContent':_0x28c1c2[_0x53f31(0x142)],'showDiff':this[_0x53f31(0x12d)]});_0x594318[_0x53f31(0x19f)]({'parts':_0x5b0335,'renderingStrategy':_0x53f31(0x124)});const _0x51efad=_0x3a7fab!==_0x4fa83b;this[_0x53f31(0x1d4)](_0x56b2ca,!0x0),_0x18da6f[_0x53f31(0x211)]({'index':_0x3a7fab,'title':_0x19ae4a(this[_0x53f31(0x216)][_0x53f31(0x18a)],_0x53f31(0xfa),(_0x3a7fab+0x1)[_0x53f31(0x152)]()),'icon':_0xe41b23,'mainView':_0x594318,'showRotator':_0x51efad,'showApplyButton':!0x0,'showSuggestButton':!0x0,'ranges':[_0x56b2ca]}),this[_0x53f31(0x19a)][_0x53f31(0xfc)](_0x1b22f3,_0x3a7fab),this[_0x53f31(0xe5)](_0x594318,_0x53f31(0x1c2),(_0x2b8e64,{showDiff:_0xdbbc49})=>{const _0x5076be=_0x53f31;this[_0x5076be(0x12d)]=_0xdbbc49;const {reply:_0x5ca674}=this[_0x5076be(0xec)](_0x1b22f3),_0x37262b=_0x5d6e00({'editor':_0x4f3097,'changeGroups':[_0x5ca674[_0x5076be(0x15f)][_0x3a7fab]],'documentContextContent':_0x5ca674[_0x5076be(0x142)],'showDiff':_0xdbbc49});_0x594318[_0x5076be(0x19f)]({'parts':_0x37262b,'renderingStrategy':_0x5076be(0x124)});}),this[_0x53f31(0xe5)](_0x18da6f,_0x53f31(0x17d),()=>{const _0x2549fc=_0x53f31;this[_0x2549fc(0xf5)]({'replyId':_0x1b22f3,'partIndex':_0x3a7fab}),_0x51efad?this[_0x2549fc(0xdf)](_0x1b22f3,_0x2efc39):_0x18da6f[_0x2549fc(0x190)]();}),this[_0x53f31(0xe5)](_0x18da6f,_0x53f31(0x1b5),()=>{const _0x201089=_0x53f31;this[_0x201089(0x111)]({'replyId':_0x1b22f3,'partIndex':_0x3a7fab}),_0x51efad?this[_0x201089(0xdf)](_0x1b22f3,_0x2efc39):_0x18da6f[_0x201089(0x190)]();}),_0x51efad&&(this[_0x53f31(0xe5)](_0x18da6f,_0x53f31(0x109),()=>{const _0x545060=_0x53f31;this[_0x545060(0xdf)](_0x1b22f3,_0x2efc39);}),this[_0x53f31(0xe5)](_0x18da6f,_0x53f31(0xda),()=>{const _0x3a87b3=_0x53f31;this[_0x3a87b3(0xdf)](_0x1b22f3,_0x4fa83b);})),this[_0x53f31(0xe5)](_0x18da6f,_0x53f31(0x1d8),()=>{const _0x145456=_0x53f31;this[_0x145456(0x1f0)](_0x18da6f),this[_0x145456(0x1f0)](_0x594318),this[_0x145456(0x1da)]=null;});}[_0x9b0b9b(0x1a9)](_0x4da299,_0x282c9e){const _0x3982f3=_0x9b0b9b,_0x19b3a4=_0x652de9(this[_0x3982f3(0x216)]),{reply:_0x3cf7f2,interaction:_0x124d44}=this[_0x3982f3(0xec)](_0x4da299),_0x2fcc3c=_0x3cf7f2[_0x3982f3(0x15f)][_0x3982f3(0x10e)](_0x1285b6=>_0x3982f3(0x219)==_0x1285b6[_0x3982f3(0x14a)]),_0x29706a=_0x2fcc3c[_0x3982f3(0x10c)](_0x3edffd=>_0x3cf7f2[_0x3982f3(0x15f)][_0x3982f3(0xe4)](_0x3edffd));void 0x0===_0x282c9e&&(_0x282c9e=_0x29706a[0x0]);const _0x4f9bb0=_0x29706a[_0x3982f3(0xe4)](_0x282c9e);if(-0x1==_0x4f9bb0)return null;const _0x2e5ef6=0x0==_0x4f9bb0?_0x29706a[_0x29706a[_0x3982f3(0x146)]-0x1]:_0x29706a[_0x4f9bb0-0x1],_0x3b46e3=_0x4f9bb0==_0x29706a[_0x3982f3(0x146)]-0x1?_0x29706a[0x0]:_0x29706a[_0x4f9bb0+0x1],_0x527d97=_0x2fcc3c[_0x4f9bb0],_0x1ad06e=new _0x2a273e([]),_0x4ba0dc=new _0x2a273e([]);for(const _0x2af511 of _0x527d97[_0x3982f3(0x15c)])if(_0x3982f3(0x139)!=_0x2af511[_0x3982f3(0x1ce)]&&_0x4ba0dc[_0x3982f3(0x1a6)][_0x3982f3(0x18f)](_0x2af511[_0x3982f3(0x18d)][_0x3982f3(0x102)](!0x0)),_0x3982f3(0x11d)!=_0x2af511[_0x3982f3(0x1ce)]){const _0x9c434d=_0x4c173d(_0x5dc033=>_0x57bbe4(_0x5dc033,_0x3982f3(0x1ab))==_0x2af511['id'],_0x3cf7f2[_0x3982f3(0x142)],!0x0);_0x1ad06e[_0x3982f3(0x1a6)][_0x3982f3(0x18f)](_0x9c434d[_0x3982f3(0x102)](!0x0));}if(0x0==_0x1ad06e[_0x3982f3(0x1a6)][_0x3982f3(0x146)]){if(_0x527d97[_0x3982f3(0x15c)][0x0][_0x3982f3(0x110)]){const _0x4f943c=_0x41407c(_0x3982f3(0x1ab),_0x527d97[_0x3982f3(0x15c)][0x0][_0x3982f3(0x110)],_0x3cf7f2[_0x3982f3(0x142)]);_0x1ad06e[_0x3982f3(0x1a6)][_0x3982f3(0x20c)](_0x4f943c[_0x3982f3(0x102)](!0x0)),_0x4ba0dc[_0x3982f3(0x1a6)][_0x3982f3(0x20c)](_0x4f943c[_0x3982f3(0x102)](!0x0)),_0x4f943c[_0x3982f3(0x16a)]&&(_0x1ad06e[_0x3982f3(0x1a6)][_0x3982f3(0x18f)](_0x4f943c[_0x3982f3(0x16a)][_0x3982f3(0x102)](!0x0)),_0x4ba0dc[_0x3982f3(0x1a6)][_0x3982f3(0x18f)](_0x4f943c[_0x3982f3(0x16a)][_0x3982f3(0x102)](!0x0)));}else{const _0x42fe0c=_0x3cf7f2[_0x3982f3(0x142)][_0x3982f3(0x1a6)][0x0];if(!_0x42fe0c)return null;_0x1ad06e[_0x3982f3(0x1a6)][_0x3982f3(0x18f)](_0x42fe0c[_0x3982f3(0x102)](!0x0)),_0x4ba0dc[_0x3982f3(0x1a6)][_0x3982f3(0x18f)](_0x42fe0c[_0x3982f3(0x102)](!0x0));}}const _0x44bd2b=_0x124d44[_0x3982f3(0x1af)](),_0x5818d6=_0x19b3a4[_0x3982f3(0x144)][_0x3982f3(0x213)](_0x44bd2b[_0x3982f3(0x115)]),_0x4c0282=_0x3e5089(_0x1ad06e),_0x28ae71=_0x19b3a4[_0x3982f3(0x144)][_0x3982f3(0x213)](_0x4c0282),_0x1d9364=_0x19b3a4[_0x3982f3(0x144)][_0x3982f3(0x213)](_0x4c0282),_0xebb229=_0x19b3a4[_0x3982f3(0x1be)][_0x3982f3(0xe2)](_0x28ae71,0x0),_0x52c322=_0x3e5089(_0x4ba0dc),_0x786ff4={'anchor':_0xebb229,'markDeletions':!0x1},_0x8956e6=_0x19b3a4[_0x3982f3(0x1c7)][_0x3982f3(0x1f2)](_0x581471)[_0x3982f3(0x171)](_0x4c0282,_0x52c322,_0x786ff4)[_0x3982f3(0xf9)]();if(!_0x8956e6[_0x3982f3(0x146)])return null;_0x19b3a4[_0x3982f3(0x1be)][_0x3982f3(0x14d)](_0x560e01=>{const _0x22ec6c=_0x3982f3;for(const _0x513a1a of _0x8956e6)if(_0x22ec6c(0x1f3)==_0x513a1a[_0x22ec6c(0x1ce)]){const _0x51ad4f=_0x513a1a[_0x22ec6c(0x175)],_0x2563d5=_0x513a1a[_0x22ec6c(0x141)],_0x57cc65=new _0x4b1e68(_0x51ad4f,_0x2563d5);_0x560e01[_0x22ec6c(0x117)][_0x22ec6c(0x1cf)](_0x57cc65),_0x19b3a4[_0x22ec6c(0x1be)][_0x22ec6c(0xd4)](_0x57cc65);}else _0x22ec6c(0x14e)!==_0x513a1a[_0x22ec6c(0x1ce)]&&(_0x513a1a[_0x22ec6c(0x145)]=null,_0x513a1a[_0x22ec6c(0x129)]=!0x1,_0x560e01[_0x22ec6c(0x117)][_0x22ec6c(0x1cf)](_0x513a1a),_0x19b3a4[_0x22ec6c(0x1be)][_0x22ec6c(0xd4)](_0x513a1a));});const _0x20e043=_0x171b69(_0x19b3a4,_0x8956e6,_0x28ae71);_0x371dd3(_0x19b3a4[_0x3982f3(0x1be)],_0x20e043);const _0x23cedb=_0x20e043[_0x3982f3(0x1c9)]()[_0x3982f3(0x170)][_0x3982f3(0x224)][_0x3982f3(0xf7)](),_0x559920=_0x20e043[_0x3982f3(0x1c9)]()[_0x3982f3(0x1e4)][_0x3982f3(0x224)][_0x3982f3(0xf7)](),_0x533c35=[];let _0x4b6d8d=_0x28ae71,_0x1fd734=_0x1d9364;for(let _0x453c9f=0x0;_0x453c9f<_0x559920[_0x3982f3(0x146)];_0x453c9f++){const _0x38ef78=_0x4b6d8d[_0x3982f3(0x1e0)]-_0x559920[_0x453c9f];_0x533c35[_0x453c9f]=_0x1fd734[_0x3982f3(0x1e0)]-_0x38ef78,_0x4b6d8d=_0x4b6d8d[_0x3982f3(0x1c3)](_0x559920[_0x453c9f]),_0x1fd734=_0x1fd734[_0x3982f3(0x1c3)](_0x533c35[_0x453c9f]);}const _0x30a449=_0x19b3a4[_0x3982f3(0x1be)][_0x3982f3(0x206)](_0x19b3a4[_0x3982f3(0x1be)][_0x3982f3(0x1b6)](_0x1d9364,_0x23cedb),_0x19b3a4[_0x3982f3(0x1be)][_0x3982f3(0x1b6)](_0x1d9364,_0x533c35)),_0x1418d7=_0x1d9364[_0x3982f3(0x198)](0x0)[_0x3982f3(0x1de)](_0x21d2ae),_0x371772=Array[_0x3982f3(0x226)](_0x5818d6[_0x3982f3(0x1e9)]())[_0x3982f3(0x150)](_0xa87234=>_0xa87234[_0x3982f3(0x1de)](_0x21d2ae)==_0x1418d7)[_0x3982f3(0x1b1)](),_0x3301e7=_0x30a449[_0x3982f3(0x170)][_0x3982f3(0x224)][_0x3982f3(0xf7)](),_0x264f55=_0x30a449[_0x3982f3(0x1e4)][_0x3982f3(0x224)][_0x3982f3(0xf7)]();_0x3301e7[0x0]=_0x371772[0x0]+_0x3301e7[0x0],_0x264f55[0x0]=_0x371772[0x0]+_0x264f55[0x0];let _0x40ec8b=_0x19b3a4[_0x3982f3(0x1be)][_0x3982f3(0x206)](_0x19b3a4[_0x3982f3(0x1be)][_0x3982f3(0x1b6)](_0x19b3a4[_0x3982f3(0x1be)][_0x3982f3(0x17f)][_0x3982f3(0x19e)](),_0x3301e7),_0x19b3a4[_0x3982f3(0x1be)][_0x3982f3(0x1b6)](_0x19b3a4[_0x3982f3(0x1be)][_0x3982f3(0x17f)][_0x3982f3(0x19e)](),_0x264f55));const _0x18be06=_0x19b3a4[_0x3982f3(0x1be)][_0x3982f3(0x17f)][_0x3982f3(0x14b)][_0x3982f3(0xf9)](_0x44bd2b[_0x3982f3(0x15d)]);for(const _0x597207 of _0x18be06)_0x40ec8b=_0x2d44c0[_0x3982f3(0xdb)](_0x40ec8b[_0x3982f3(0x106)](_0x597207));return{'range':_0x40ec8b,'previousIndex':_0x2e5ef6,'nextIndex':_0x3b46e3,'currentIndex':_0x282c9e};}[_0x9b0b9b(0xea)](_0x5ec951){const _0x57cbda=_0x9b0b9b;if(!_0x5ec951[_0x57cbda(0x1c7)][_0x57cbda(0xdd)](_0x57cbda(0x195)))return;const _0x3caa40=_0x5ec951[_0x57cbda(0x1b9)][_0x57cbda(0x1f2)](_0x57cbda(0xef)),_0x16c6f8=_0x5ec951[_0x57cbda(0x1b9)][_0x57cbda(0x1f2)](_0x57cbda(0xe9));this[_0x57cbda(0xe5)](_0x3caa40,_0x57cbda(0x1f9),(_0x3c0bc3,_0x9d2df9,_0x54a4ee)=>{const _0x28c189=_0x57cbda,_0x2d0671=this[_0x28c189(0x1ed)][_0x28c189(0x1f2)](_0x9d2df9);if(!_0x2d0671)return;const _0x1bd8c6=this[_0x28c189(0x157)][_0x28c189(0x137)](_0x2d0671[_0x28c189(0xd9)])[_0x28c189(0x203)](_0x2d0671[_0x28c189(0x158)]);_0x2d0671[_0x28c189(0x187)][_0x28c189(0x156)](_0x1f248c=>_0x1bd8c6[_0x28c189(0x1f5)](_0x1f248c,_0x28c189(0x219))),this[_0x28c189(0x1ed)][_0x28c189(0x208)](_0x9d2df9),this[_0x28c189(0x1ed)][_0x28c189(0xe0)](_0x54a4ee,_0x2d0671);}),this[_0x57cbda(0xe5)](_0x16c6f8,_0x57cbda(0x1f9),(_0x29ba53,_0x31c993,_0x5efb7f)=>{const _0xee0532=_0x57cbda,_0x43ed7f=this[_0xee0532(0x1ed)][_0xee0532(0x1f2)](_0x31c993);if(!_0x43ed7f)return;const _0x2f7633=this[_0xee0532(0x157)][_0xee0532(0x137)](_0x43ed7f[_0xee0532(0xd9)])[_0xee0532(0x203)](_0x43ed7f[_0xee0532(0x158)]);_0x43ed7f[_0xee0532(0x187)][_0xee0532(0x156)](_0x2e9db8=>_0x2f7633[_0xee0532(0x1f5)](_0x2e9db8,_0xee0532(0x138))),this[_0xee0532(0x1ed)][_0xee0532(0x208)](_0x31c993),this[_0xee0532(0x1ed)][_0xee0532(0xe0)](_0x5efb7f,_0x43ed7f);});}async[_0x9b0b9b(0x10d)](_0x5aa50c){const _0x40daef=_0x9b0b9b;this[_0x40daef(0x216)][_0x40daef(0x1c7)][_0x40daef(0x1f2)](_0x82d960)[_0x40daef(0x190)](),this[_0x40daef(0x19a)][_0x40daef(0x132)](_0x40daef(0x124)),this[_0x40daef(0x19a)][_0x40daef(0x1ac)](!0x0),await this[_0x40daef(0x16f)]();try{const _0x4ece92=this[_0x40daef(0x216)][_0x40daef(0x1c7)][_0x40daef(0x1f2)](_0x43e068);this[_0x40daef(0x1a5)]('\x20'),_0x4ece92[_0x40daef(0x16e)][_0x40daef(0x1b8)](_0x40daef(0x17c)),await this[_0x40daef(0x14c)](_0x5aa50c);const {sessionId:_0x4f0999}=this[_0x40daef(0x11e)][_0x40daef(0x1ef)]();await this[_0x40daef(0x157)][_0x40daef(0x214)](_0x5aa50c,_0x4f0999),this[_0x40daef(0x157)][_0x40daef(0x1bd)]()&&this[_0x40daef(0x157)][_0x40daef(0x1fc)](_0x19ae4a(this[_0x40daef(0x216)][_0x40daef(0x18a)],_0x40daef(0x140)));}catch(_0x42b1a7){console[_0x40daef(0x17e)](_0x40daef(0x1ee),_0x42b1a7);}finally{this[_0x40daef(0x19a)][_0x40daef(0x132)](_0x40daef(0x149)),this[_0x40daef(0x19a)][_0x40daef(0x1ac)](!0x1);}}[_0x9b0b9b(0x15e)](_0x25a9c6){const _0x283797=_0x9b0b9b;this[_0x283797(0x157)]['id']===_0x25a9c6&&this[_0x283797(0x14c)]();}async[_0x9b0b9b(0x12e)](){const _0x3b96fc=_0x9b0b9b,_0x572ce0=this[_0x3b96fc(0x11e)][_0x3b96fc(0x11c)]();this[_0x3b96fc(0x157)]?.[_0x3b96fc(0x153)](_0x572ce0),this[_0x3b96fc(0x157)]?.[_0x3b96fc(0x1fc)](_0x19ae4a(this[_0x3b96fc(0x216)][_0x3b96fc(0x18a)],_0x3b96fc(0x140)));}[_0x9b0b9b(0xf6)](){const _0x3b4bf2=_0x9b0b9b;this[_0x3b4bf2(0x157)]?.[_0x3b4bf2(0x1fd)]();}[_0x9b0b9b(0x1e6)](){const _0x1fba5b=_0x9b0b9b;this[_0x1fba5b(0x19a)][_0x1fba5b(0x1e6)]();}async[_0x9b0b9b(0x1bf)](){const _0x1c1f15=_0x9b0b9b;await this[_0x1c1f15(0x14c)]();}async[_0x9b0b9b(0x17b)]({message:_0x3a21fa,quickActionData:_0x43e9cc}){const _0x5cc8e7=_0x9b0b9b;await this[_0x5cc8e7(0x155)]({'userMessage':_0x3a21fa,'quickActionData':_0x43e9cc});}[_0x9b0b9b(0x192)](){const _0x3454bf=_0x9b0b9b,_0x16992b=this[_0x3454bf(0x216)][_0x3454bf(0x165)][_0x3454bf(0x1f2)](_0x3454bf(0x127));if(!_0x16992b)throw new _0x30fa1e(_0x3454bf(0x212),this);return _0x16992b;}async[_0x9b0b9b(0x14c)](_0x3a6b45){const _0x668a0b=_0x9b0b9b;try{this[_0x668a0b(0x19a)][_0x668a0b(0x103)](),await this[_0x668a0b(0xfe)](_0x3a6b45);}catch(_0x2776e3){_0xd99304(_0x668a0b(0x201),_0x2776e3),this[_0x668a0b(0x157)]=void 0x0,this[_0x668a0b(0x19a)][_0x668a0b(0x12a)]();}}async[_0x9b0b9b(0xfe)](_0x50040b){const _0x37a2c6=_0x9b0b9b,_0x1325a3=this[_0x37a2c6(0x216)][_0x37a2c6(0x1c7)][_0x37a2c6(0x1f2)](_0x82d960);let _0x191e72;_0x1325a3[_0x37a2c6(0x126)]&&_0x1325a3[_0x37a2c6(0x190)](),_0x50040b||!this[_0x37a2c6(0x157)]?_0x191e72=this[_0x37a2c6(0x216)][_0x37a2c6(0x165)][_0x37a2c6(0x1f2)](_0x37a2c6(0xfd)):this[_0x37a2c6(0x19a)][_0x37a2c6(0x193)]&&(_0x191e72=this[_0x37a2c6(0x157)][_0x37a2c6(0x122)]['id']),await this[_0x37a2c6(0x16f)]();const _0x4d0b93=this[_0x37a2c6(0x192)](),_0x29edf8=_0x50040b||_0x4a61b3();this[_0x37a2c6(0x157)]=new _0x1a8029({'connector':this[_0x37a2c6(0x220)],'chatModels':this[_0x37a2c6(0x13b)],'selectedModelId':_0x191e72,'conversationId':_0x29edf8,'group':_0x4d0b93,'getEditor':()=>_0x652de9(this[_0x37a2c6(0x216)])}),this[_0x37a2c6(0x157)]['on'](_0x37a2c6(0xed),(_0x30af37,_0x3b4200)=>{const _0x50fd27=_0x37a2c6;this[_0x50fd27(0x19a)][_0x50fd27(0x182)](_0x3b4200),this[_0x50fd27(0x19a)][_0x50fd27(0x225)](),this[_0x50fd27(0x19a)][_0x50fd27(0x128)](),this[_0x50fd27(0x19a)][_0x50fd27(0x14f)](),_0x50040b||(this[_0x50fd27(0x19a)][_0x50fd27(0x209)](),this[_0x50fd27(0x157)]?.[_0x50fd27(0x1fc)](_0x19ae4a(this[_0x50fd27(0x216)][_0x50fd27(0x18a)],_0x50fd27(0x140))));}),this[_0x37a2c6(0x157)]['on'](_0x37a2c6(0x1dc),(_0x44375a,_0x2e43d9)=>{const _0x35f0c9=_0x37a2c6;this[_0x35f0c9(0x19a)][_0x35f0c9(0x1a0)](_0x2e43d9[_0x35f0c9(0x21f)]);}),this[_0x37a2c6(0x157)]['on'](_0x37a2c6(0xd3),(_0x5cfe42,_0x29fed3)=>{const _0x165173=_0x37a2c6;this[_0x165173(0x19a)][_0x165173(0x119)](_0x29fed3);}),this[_0x37a2c6(0x157)]['on'](_0x37a2c6(0xd8),()=>{const _0x388f78=_0x37a2c6;this[_0x388f78(0x19a)][_0x388f78(0x1b2)]({'isWebSearchEnabled':!0x0,'isReasoningEnabled':!0x1});}),this[_0x37a2c6(0x157)]['on'](_0x37a2c6(0xeb),()=>{const _0x5658b6=_0x37a2c6;this[_0x5658b6(0x19a)][_0x5658b6(0x1b2)]({'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x0});}),this[_0x37a2c6(0x157)]['on'](_0x37a2c6(0x189),(_0x143879,_0x2da495)=>{const _0x5ae694=_0x37a2c6;this[_0x5ae694(0x19a)][_0x5ae694(0x1f7)](_0x2da495,{'isWebSearchEnabled':!0x0,'isReasoningEnabled':!0x1});}),this[_0x37a2c6(0x157)]['on'](_0x37a2c6(0x196),(_0x592c34,_0x242655)=>{const _0x2a5e7e=_0x37a2c6;this[_0x2a5e7e(0x19a)][_0x2a5e7e(0x1f7)](_0x242655,{'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x0});}),this[_0x37a2c6(0x157)]['on'](_0x37a2c6(0x1e5),()=>{const _0x5bd149=_0x37a2c6;this[_0x5bd149(0x19a)][_0x5bd149(0x217)]();}),this[_0x37a2c6(0x157)]['on'](_0x37a2c6(0x121),async()=>{const _0x4a03fe=_0x37a2c6;await this[_0x4a03fe(0x19a)][_0x4a03fe(0x163)]();}),this[_0x37a2c6(0x157)]['on'](_0x37a2c6(0x107),(_0x24d453,_0x342653)=>{const _0x566955=_0x37a2c6;this[_0x566955(0x19a)][_0x566955(0x18e)](_0x342653['id']);}),this[_0x37a2c6(0x157)]['on'](_0x37a2c6(0x1c6),(_0x47f2b3,_0x3fa995,_0x47d81e)=>{const _0x5aa7fc=_0x37a2c6;this[_0x5aa7fc(0x1a5)](_0x3fa995,_0x47d81e);}),this[_0x37a2c6(0x157)]['on'](_0x37a2c6(0x1ea),(_0x3110ed,_0x4e6eba)=>{const _0x55d0f9=_0x37a2c6;_0x55d0f9(0x199)===_0x4e6eba[_0x55d0f9(0x1ce)]?this[_0x55d0f9(0x19a)][_0x55d0f9(0x10f)](_0x4e6eba):this[_0x55d0f9(0x19a)][_0x55d0f9(0x167)](_0x4e6eba);}),this[_0x37a2c6(0x157)]['on'](_0x37a2c6(0x1aa),async(_0x101ec4,_0x55554d,_0x355ae3)=>{const _0x3c45ce=_0x37a2c6;await this[_0x3c45ce(0x184)]({'reply':_0x55554d,'changeGroups':_0x355ae3});}),this[_0x37a2c6(0x157)]['on'](_0x37a2c6(0x166),(_0x26bcd3,{reply:_0x536ef1,index:_0x4a0e33,state:_0x388c14})=>{const _0x9205=_0x37a2c6;this[_0x9205(0x19a)][_0x9205(0x1d3)]({'id':_0x536ef1['id'],'index':_0x4a0e33,'state':_0x388c14});}),this[_0x37a2c6(0x157)]['on'](_0x37a2c6(0x18b),(_0x21284b,_0x3cbab7)=>{const _0xb65771=_0x37a2c6;if(this[_0xb65771(0x19a)][_0xb65771(0x1a7)](_0x3cbab7[_0xb65771(0x100)],_0x3cbab7[_0xb65771(0x123)]),_0xb65771(0x159)===_0x3cbab7[_0xb65771(0x100)][_0xb65771(0x1ce)]){const _0x22f275=[..._0x652de9(this[_0xb65771(0x216)])[_0xb65771(0x1be)][_0xb65771(0x17f)][_0xb65771(0x159)][_0xb65771(0x1e7)]()];this[_0xb65771(0x11e)][_0xb65771(0x148)](_0x22f275,_0xb65771(0x17a)+this[_0xb65771(0x157)]?.['id']);}}),this[_0x37a2c6(0x157)]['on'](_0x37a2c6(0x11a),(_0x106732,_0x5497b4)=>{const _0xa547d8=_0x37a2c6;this[_0xa547d8(0x19a)][_0xa547d8(0x218)](_0x5497b4[_0xa547d8(0x1c0)]),_0xa547d8(0x1a2)==_0x5497b4[_0xa547d8(0x1c0)]&&this[_0xa547d8(0xf6)](),_0xa547d8(0x159)===_0x5497b4[_0xa547d8(0x1ce)]&&this[_0xa547d8(0x11e)][_0xa547d8(0xe8)](_0xa547d8(0x17a)+this[_0xa547d8(0x157)]?.['id']);}),this[_0x37a2c6(0x157)]['on'](_0x37a2c6(0x101),(_0x2bc266,_0x3e239e)=>{const _0x129455=_0x37a2c6;this[_0x129455(0x19a)][_0x129455(0x1c8)](_0x3e239e[_0x129455(0x100)][_0x129455(0x1c0)],_0x3e239e[_0x129455(0x123)]);}),this[_0x37a2c6(0x157)]['on'](_0x37a2c6(0x1df),(_0x2a2cbf,_0x2767d3)=>{const _0x250bfa=_0x37a2c6;this[_0x250bfa(0x19a)][_0x250bfa(0x174)](_0x2767d3[_0x250bfa(0x168)]);}),this[_0x37a2c6(0x157)]['on'](_0x37a2c6(0xd5),(_0x36055b,_0x58f863)=>{const _0x150062=_0x37a2c6;this[_0x150062(0x19a)][_0x150062(0x186)](_0x58f863[_0x150062(0x194)]);}),this[_0x37a2c6(0x157)]['on'](_0x37a2c6(0x1e1),(_0x5e4135,_0x12ac1e)=>{const _0x354ad6=_0x37a2c6;this[_0x354ad6(0x19a)][_0x354ad6(0x21d)](_0x12ac1e[_0x354ad6(0x1ba)],_0x12ac1e[_0x354ad6(0x197)],_0x12ac1e[_0x354ad6(0x1a1)],_0x12ac1e[_0x354ad6(0x1ca)]);}),this[_0x37a2c6(0x157)]['on'](_0x37a2c6(0x21c),(_0x2361bb,_0x5ef8aa)=>{const _0xb86b60=_0x37a2c6;this[_0xb86b60(0x19a)][_0xb86b60(0x12b)](_0x5ef8aa[_0xb86b60(0x1ba)],_0x5ef8aa[_0xb86b60(0x1d2)],_0x5ef8aa[_0xb86b60(0x179)]);}),this[_0x37a2c6(0x157)]['on'](_0x37a2c6(0x161),(_0x20fc93,_0x409c0c)=>{const _0x1f0cec=_0x37a2c6;this[_0x1f0cec(0x19a)][_0x1f0cec(0x1eb)](_0x409c0c);}),this[_0x37a2c6(0x157)]['on'](_0x37a2c6(0x135),(_0x5c3b98,_0x25094e)=>{const _0x141732=_0x37a2c6;this[_0x141732(0x19a)][_0x141732(0xde)](_0x25094e[_0x141732(0x122)],_0x25094e[_0x141732(0x19d)]);}),this[_0x37a2c6(0x157)]['on'](_0x37a2c6(0x17e),(_0xa5b21d,{error:_0x2a5062,interactionId:_0x67b7eb,fileName:_0x1a60a5,url:_0x5d37cb,sourceId:_0x5d9280,sourceLabel:_0x47bf4c})=>{const _0x48b664=_0x37a2c6,_0x3f14bb=_0x67b7eb?_0x67b7eb+':'+_0x4a61b3():_0x4a61b3();_0x2a5062[_0x48b664(0x1a4)][_0x48b664(0x131)](_0x48b664(0x13a))?this[_0x48b664(0x19a)][_0x48b664(0x1dd)]({'staticMessage':_0x19ae4a(this[_0x48b664(0x216)][_0x48b664(0x18a)],_0x48b664(0xe6)),'id':_0x3f14bb}):_0x2a5062[_0x48b664(0x1a4)][_0x48b664(0x131)](_0x48b664(0x11b))||_0x2a5062[_0x48b664(0x1a4)][_0x48b664(0x131)](_0x48b664(0x201))?(this[_0x48b664(0x19a)][_0x48b664(0x13e)]({'errorMessage':_0x19ae4a(this[_0x48b664(0x216)][_0x48b664(0x18a)],_0x48b664(0xe7)),'id':_0x3f14bb}),this[_0x48b664(0x154)](_0x2a5062)):_0x2a5062[_0x48b664(0x1a4)][_0x48b664(0x131)](_0x48b664(0x21a))?this[_0x48b664(0x19a)][_0x48b664(0x13e)]({'errorMessage':_0x19ae4a(this[_0x48b664(0x216)][_0x48b664(0x18a)],_0x48b664(0x160),_0x1a60a5),'id':_0x3f14bb}):_0x2a5062[_0x48b664(0x1a4)][_0x48b664(0x131)](_0x48b664(0x118))?this[_0x48b664(0x19a)][_0x48b664(0x13e)]({'errorMessage':_0x19ae4a(this[_0x48b664(0x216)][_0x48b664(0x18a)],_0x48b664(0x223),_0x5d37cb),'id':_0x3f14bb}):_0x2a5062[_0x48b664(0x1a4)][_0x48b664(0x131)](_0x48b664(0x10b))?this[_0x48b664(0x19a)][_0x48b664(0x13e)]({'errorMessage':_0x19ae4a(this[_0x48b664(0x216)][_0x48b664(0x18a)],_0x48b664(0x177)),'id':_0x3f14bb}):_0x2a5062[_0x48b664(0x1a4)][_0x48b664(0x131)](_0x48b664(0x1fb))?this[_0x48b664(0x19a)][_0x48b664(0x13e)]({'errorMessage':_0x19ae4a(this[_0x48b664(0x216)][_0x48b664(0x18a)],_0x48b664(0x1f8)),'id':_0x3f14bb}):_0x2a5062[_0x48b664(0x1a4)][_0x48b664(0x131)](_0x48b664(0x1a3))?(_0x5d9280&&this[_0x48b664(0x19a)][_0x48b664(0x120)](_0x5d9280),this[_0x48b664(0x19a)][_0x48b664(0x13e)]({'errorMessage':_0x19ae4a(this[_0x48b664(0x216)][_0x48b664(0x18a)],_0x48b664(0x215),_0x47bf4c||_0x48b664(0x197)),'id':_0x3f14bb}),this[_0x48b664(0x154)](_0x2a5062)):_0x2a5062[_0x48b664(0x1a4)][_0x48b664(0x131)](_0x48b664(0x1a8))?(this[_0x48b664(0x19a)][_0x48b664(0x13e)]({'errorMessage':_0x19ae4a(this[_0x48b664(0x216)][_0x48b664(0x18a)],_0x48b664(0x1d0)),'id':_0x3f14bb}),this[_0x48b664(0x154)](_0x2a5062)):(this[_0x48b664(0x19a)][_0x48b664(0x13e)]({'errorMessage':_0x19ae4a(this[_0x48b664(0x216)][_0x48b664(0x18a)],_0x48b664(0x169)),'id':_0x3f14bb}),this[_0x48b664(0x154)](_0x2a5062));}),await this[_0x37a2c6(0x157)][_0x37a2c6(0x19c)](this[_0x37a2c6(0x216)][_0x37a2c6(0x165)][_0x37a2c6(0x1f2)](_0x37a2c6(0x164))),_0x50040b||await this[_0x37a2c6(0x157)][_0x37a2c6(0x170)]();}async[_0x9b0b9b(0x155)]({userMessage:_0x241391,quickActionData:_0x13a09f}){const _0x472784=_0x9b0b9b;if(!this[_0x472784(0x157)])throw new _0x30fa1e(_0x472784(0x183));this[_0x472784(0x157)][_0x472784(0x18c)]()&&await this[_0x472784(0x157)][_0x472784(0x162)](this[_0x472784(0x11e)][_0x472784(0x1ef)]()),this[_0x472784(0x157)]['id']&&this[_0x472784(0x157)][_0x472784(0xf4)]&&await this[_0x472784(0x157)][_0x472784(0x11f)]({'userMessage':_0x241391,'quickActionData':_0x13a09f}),this[_0x472784(0x172)]();}[_0x9b0b9b(0x172)](){const _0x2d487b=_0x9b0b9b,_0xf97b6f=_0x652de9(this[_0x2d487b(0x216)])[_0x2d487b(0x1be)],_0xc2056d=Array[_0x2d487b(0x226)](_0xf97b6f[_0x2d487b(0x116)][_0x2d487b(0x1ff)](_0x3f37cf));_0xf97b6f[_0x2d487b(0x14d)](_0x348107=>{const _0x1f1ef9=_0x2d487b;_0xc2056d[_0x1f1ef9(0x156)](_0x9e45a2=>_0x348107[_0x1f1ef9(0x1ae)](_0x9e45a2));});}[_0x9b0b9b(0x1cc)](){const _0x48da9e=_0x9b0b9b;console[_0x48da9e(0x1f4)](_0x48da9e(0x204));}[_0x9b0b9b(0x1db)](_0x47a94e){const _0x67ebab=_0x9b0b9b;this[_0x67ebab(0x19a)][_0x67ebab(0x1c4)](_0x47a94e);}[_0x9b0b9b(0x154)](_0x432ec3){const _0x593453=_0x9b0b9b;_0xd99304(_0x432ec3[_0x593453(0x1a4)]);}[_0x9b0b9b(0x21b)](_0x57eec0){const _0x4c1d90=_0x9b0b9b;this[_0x4c1d90(0x157)]?.[_0x4c1d90(0xd1)](_0x57eec0);}[_0x9b0b9b(0x221)](){const _0x3c81ba=_0x9b0b9b;this[_0x3c81ba(0x157)]?.[_0x3c81ba(0x1cb)]();}[_0x9b0b9b(0xf1)](){const _0x291815=_0x9b0b9b;this[_0x291815(0x157)]?.[_0x291815(0x1e3)]();}[_0x9b0b9b(0xec)](_0x226f1b){const _0xbcf59d=_0x9b0b9b,[_0x1464a7,_0x19dffd]=_0x226f1b[_0xbcf59d(0x1bc)](':'),_0xb8f470=this[_0xbcf59d(0x157)][_0xbcf59d(0x137)](_0x1464a7),_0x447c34=_0xb8f470[_0xbcf59d(0x203)](_0x19dffd);return{'interaction':_0xb8f470,'reply':_0x447c34};}[_0x9b0b9b(0x1d4)](_0x5f06a8,_0x17e948=!0x1){const _0x4fd99f=_0x9b0b9b,_0x47299e=_0x652de9(this[_0x4fd99f(0x216)]),_0x5efa9c={'target':_0x47299e[_0x4fd99f(0x19b)][_0x4fd99f(0x16e)][_0x4fd99f(0x1e8)][_0x4fd99f(0x16b)](_0x47299e[_0x4fd99f(0x19b)][_0x4fd99f(0x12f)][_0x4fd99f(0x143)](_0x5f06a8)),'viewportOffset':{'top':0x96,'left':0x0,'bottom':0x32,'right':0x0},'ancestorOffset':0x14,'alignToTop':_0x17e948};_0x17e948&&(_0x5efa9c[_0x4fd99f(0x112)]=!0x0),_0x33a9d6(_0x5efa9c);}[_0x9b0b9b(0x1a5)](_0x3d0a14,_0x42b438=!0x1){const _0x3a9645=_0x9b0b9b;this[_0x3a9645(0x19a)][_0x3a9645(0x1c6)](_0x3d0a14||_0x19ae4a(this[_0x3a9645(0x216)][_0x3a9645(0x18a)],_0x3a9645(0x181)),_0x42b438);}async[_0x9b0b9b(0x184)]({reply:_0x312fb8,changeGroups:_0x18ca17,renderingStrategy:_0x1f561d}){const _0x47571e=_0x9b0b9b,{id:_0x33cbcd,isDone:_0xb38812,type:_0x40adb8,parsedContent:_0x288e46}=_0x312fb8;if(_0x47571e(0xe3)===_0x40adb8){const _0x2ed284=_0x652de9(this[_0x47571e(0x216)]),_0x4b1fa1=_0x5d6e00({'editor':_0x2ed284,'showDiff':this[_0x47571e(0x19a)][_0x47571e(0xd7)],'changeGroups':_0x18ca17,'documentContextContent':_0x312fb8[_0x47571e(0x142)]});await this[_0x47571e(0x19a)][_0x47571e(0xf3)]({'id':_0x33cbcd,'parts':_0x4b1fa1,'renderingStrategy':_0x1f561d,'isDone':_0xb38812});}else _0x47571e(0x199)===_0x40adb8&&await this[_0x47571e(0x19a)][_0x47571e(0x130)]({'id':_0x33cbcd,'parsedContent':_0x288e46,'renderingStrategy':_0x1f561d,'isDone':_0xb38812});_0xb38812&&_0x312fb8[_0x47571e(0x1fe)][_0x47571e(0x146)]>0x0&&this[_0x47571e(0x19a)][_0x47571e(0x185)](_0x33cbcd,_0x312fb8[_0x47571e(0x1fe)]);}async[_0x9b0b9b(0x16f)](){const _0x5b7af7=_0x9b0b9b,_0x944079=this[_0x5b7af7(0x157)]?.[_0x5b7af7(0xff)];_0x944079&&(_0x944079[_0x5b7af7(0x1f6)](),this[_0x5b7af7(0x19a)][_0x5b7af7(0x134)](_0x944079));}async[_0x9b0b9b(0x105)](){const _0x27890f=_0x9b0b9b,_0x23a164=this[_0x27890f(0x157)]?.[_0x27890f(0xff)];if(_0x23a164){for await(const _0x5b5cfc of _0x23a164[_0x27890f(0x136)])await this[_0x27890f(0x184)]({'reply':_0x5b5cfc,'changeGroups':_0x5b5cfc[_0x27890f(0x15f)],'renderingStrategy':_0x27890f(0x124)});}}[_0x9b0b9b(0x16c)](_0x50be0c){const _0x406ba3=_0x9b0b9b,_0x2f1018={'positiveCount':_0x50be0c[_0x406ba3(0x15f)][_0x406ba3(0x10e)](_0x37fef5=>_0x406ba3(0x138)===_0x37fef5[_0x406ba3(0x14a)])[_0x406ba3(0x146)],'totalCount':_0x50be0c[_0x406ba3(0x15f)][_0x406ba3(0x146)]},_0x3e02da=this[_0x406ba3(0x157)][_0x406ba3(0x137)](_0x50be0c[_0x406ba3(0xd9)])[_0x406ba3(0x13d)];this[_0x406ba3(0x220)][_0x406ba3(0x210)](this[_0x406ba3(0x157)]['id'],_0x3e02da,_0x2f1018);}}
@@ -43,6 +43,12 @@ export declare class AIChatUI extends ContextPlugin {
43
43
  * @observable
44
44
  */
45
45
  isBusy: boolean;
46
+ /**
47
+ * Indicates if the active model is available.
48
+ *
49
+ * @observable
50
+ */
51
+ isModelAvailable: boolean;
46
52
  /**
47
53
  * @inheritDoc
48
54
  */
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x282ed4=_0x4993;(function(_0x3bf04f,_0xacfc9c){const _0x5a803c=_0x4993,_0x1a70f1=_0x3bf04f();while(!![]){try{const _0x221baf=-parseInt(_0x5a803c(0x173))/0x1*(parseInt(_0x5a803c(0x1fd))/0x2)+parseInt(_0x5a803c(0x179))/0x3*(-parseInt(_0x5a803c(0x1ae))/0x4)+parseInt(_0x5a803c(0x1c2))/0x5+parseInt(_0x5a803c(0x197))/0x6+-parseInt(_0x5a803c(0x1eb))/0x7*(-parseInt(_0x5a803c(0x192))/0x8)+parseInt(_0x5a803c(0x205))/0x9+-parseInt(_0x5a803c(0x206))/0xa;if(_0x221baf===_0xacfc9c)break;else _0x1a70f1['push'](_0x1a70f1['shift']());}catch(_0x588233){_0x1a70f1['push'](_0x1a70f1['shift']());}}}(_0x1105,0x851c9));import{ContextPlugin as _0x269f6d}from'ckeditor5/src/core.js';import{_isMotionReduced as _0x22b608}from'ckeditor5/src/utils.js';import{AIChatView as _0x2c5156}from'./ui/aichatview.js';import{AITabs as _0x54c33f}from'../aitabs/aitabs.js';function _0x1105(){const _0x32952b=['showResizeButton','<p>','_animateConversationTitle','setReasoning','set','user-message','startsWith','interactionId','startAutoScroll','addFeedItemUserMessage','requires','abort','addFeedInteractionHeader','createConversation','updateFeedItemAIReplySuggestionPartState','setSelectedModel','isLoading','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REGULAR','1702185oGyhyG','isBusy','AI_CHAT_WELCOME_MESSAGE','isReasoningEnabled','addTab','updateSuggestionPartState','addFeedItemStaticMessage','removeFeedInteraction','AI_CHAT_FEED_LOADING_MESSAGE_REASONING','setWebSearch','value','updateWebSources','_getLoadingMessage','capabilities','clearPendingContextUI','setModelList','_interactionPromiseResolver','chatFeed','ai-reply','remove','isVisible','AITabs','resetConversationTitle','setFeedItemRenderingStrategy','displayedPrompt','stopAutoScroll','startInteraction','locale','ai.availableReplyActions','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REASONING','children','setConversationContext','then','conversation-start','closeSourceResourceBalloon','enableControls','isWebSearchEnabled','removeItem','disableModelSelector','disableControls','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH','14jGCfQp','_titleAnimationInterval','isDone','renderingStrategy','resetMessageInput','addContextItem','queueEmptyPromise','toggleLoadingSkeleton','updateFeedInteractionHeader','chatHeader','isPending','userMessage','stopInteraction','quickActionData','_isTrackChangesCommandValueBound','AIChatUI','</p>','addFeedItemAISuggestion','132766BnGISw','AI_CHAT_HEADING','updateFeedItemAIReplySuggestionContent','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH_REASONING','availableModels','values','toggleSuggestionDisplayMode','destroy','8418465VOtEbF','8704200hlAVrv','addFeedItemError','_promiseQueue','pluginName','get','showDiff','finishInteraction','enqueue','view','commands','updateFeedItemAIReplySources','label','plugins','addItem','populateSourceResourceBalloon','1kTLCnR','trackChanges','clear','updateFeedItemAIReplyContent','_view','getItemIds','42nBXNzd','markFeedItemAsDone','markItemAsDone','isDisabled','contextItems','removeContextItem','updateSuggestionItem','filter','bind','from','setAddContextOptions','setLoadingMessage','setConversationTitle','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH_REASONING','streaming','config','isTrackChangesOn','ai.chat.models.modelSelectorAlwaysVisible','isPremiumPlugin','feedItemRenderingStrategy','_getInputPlaceholder','context','updateResourceState','setIsMaximized','length','211216qHRIYz','forEach','clearConversationContextUI','enableModelSelector','AI_CHAT_FEED_LOADING_MESSAGE_REGULAR','3064260lXwDFC','setContextItemLoading','error-message','chat','focusPromptInput','setModel','setInputPlaceholder','delegate','last','setIsUploadInProgress','scrollFeedToSuggestion','isOfficialPlugin','ai-suggestion-reply','updateCapabilities','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH','updateReplyItem','isMaximized','find','scrollToSuggestion','options','areActionsDisabled','interaction-header','chatControls','102088TcrKJy','addFeedItemAIReply'];_0x1105=function(){return _0x32952b;};return _0x1105();}import{getTranslation as _0x19279e}from'../aicore/utils/common-translations.js';import{IconAIChat as _0x143359}from'ckeditor5/src/icons.js';import{AIChatFeedInteractionHeaderView as _0x3fb43e}from'./ui/feed/aichatfeedinteractionheaderview.js';function _0x4993(_0x31e916,_0x303f98){const _0x110578=_0x1105();return _0x4993=function(_0x499349,_0x579ae6){_0x499349=_0x499349-0x16f;let _0x58f542=_0x110578[_0x499349];return _0x58f542;},_0x4993(_0x31e916,_0x303f98);}import{PromiseQueue as _0x962b79}from'./utils/promisequeue.js';import{AI_CHAT_UI_EVENT_NAMES as _0x590c43}from'./utils/eventnames.js';import'../../theme/aichat/aichat.css';import{getEditorFromContext as _0x27296f}from'../aicore/utils/geteditorfromcontext.js';export class AIChatUI extends _0x269f6d{static get[_0x282ed4(0x1ba)](){return[_0x54c33f];}[_0x282ed4(0x177)];static get[_0x282ed4(0x209)](){const _0x182850=_0x282ed4;return _0x182850(0x1fa);}static get[_0x282ed4(0x1a2)](){return!0x0;}static get[_0x282ed4(0x18b)](){return!0x0;}[_0x282ed4(0x18c)]=_0x282ed4(0x187);[_0x282ed4(0x20b)]=!0x0;[_0x282ed4(0x208)];[_0x282ed4(0x1d2)];[_0x282ed4(0x1ec)]=void 0x0;[_0x282ed4(0x1f9)]=!0x1;constructor(_0x3fe3a2){const _0x3040c5=_0x282ed4;super(_0x3fe3a2);const _0x3f72b2=this[_0x3040c5(0x18e)][_0x3040c5(0x170)][_0x3040c5(0x20a)](_0x3040c5(0x1d7));this[_0x3040c5(0x1b4)](_0x3040c5(0x1c3),!0x1),this[_0x3040c5(0x208)]=new _0x962b79(),this[_0x3040c5(0x177)]=new _0x2c5156(this[_0x3040c5(0x18e)][_0x3040c5(0x1dd)],_0x3f72b2[_0x3040c5(0x1b0)]),this[_0x3040c5(0x177)][_0x3040c5(0x19e)](..._0x590c43)['to'](this),this[_0x3040c5(0x177)]['on'](_0x3040c5(0x203),(_0x39630f,{showDiff:_0xdc0d8d})=>{const _0x388593=_0x3040c5;this[_0x388593(0x20b)]=_0xdc0d8d;}),_0x3f72b2[_0x3040c5(0x20e)][_0x3040c5(0x1c6)]({'id':_0x3040c5(0x19a),'buttonLabel':_0x19279e(this[_0x3040c5(0x18e)][_0x3040c5(0x1dd)],_0x3040c5(0x1fe)),'buttonIcon':_0x143359,'order':0x0,'content':this[_0x3040c5(0x177)]}),this[_0x3040c5(0x177)][_0x3040c5(0x1ad)][_0x3040c5(0x181)](_0x3040c5(0x1c0))['to'](this,_0x3040c5(0x1c3),_0x378c48=>_0x378c48),this[_0x3040c5(0x177)][_0x3040c5(0x1d3)][_0x3040c5(0x181)](_0x3040c5(0x1f5))['to'](this,_0x3040c5(0x1c3),_0x1c547b=>_0x1c547b),this[_0x3040c5(0x177)][_0x3040c5(0x1ad)][_0x3040c5(0x19d)](this[_0x3040c5(0x18d)]());}[_0x282ed4(0x204)](){const _0x1a4770=_0x282ed4;super[_0x1a4770(0x204)](),this[_0x1a4770(0x1ec)]&&clearInterval(this[_0x1a4770(0x1ec)]);}[_0x282ed4(0x1bd)](_0x1bf299){const _0x3067a4=_0x282ed4;this[_0x3067a4(0x177)][_0x3067a4(0x1d3)][_0x3067a4(0x175)](),this[_0x3067a4(0x177)][_0x3067a4(0x1ad)][_0x3067a4(0x195)](),this[_0x3067a4(0x177)][_0x3067a4(0x1ad)][_0x3067a4(0x1d1)](_0x1bf299[_0x3067a4(0x201)],!this[_0x3067a4(0x18e)][_0x3067a4(0x188)][_0x3067a4(0x20a)](_0x3067a4(0x18a))),this[_0x3067a4(0x1c8)]({'id':_0x3067a4(0x1e3),'staticMessage':_0x19279e(this[_0x3067a4(0x18e)][_0x3067a4(0x1dd)],_0x3067a4(0x1c4))});}[_0x282ed4(0x1c8)]({id:_0x1a09ad,staticMessage:_0x56afea}){const _0xabdbfd=_0x282ed4;this[_0xabdbfd(0x177)][_0xabdbfd(0x1d3)][_0xabdbfd(0x171)](_0xabdbfd(0x1d4),{'id':_0x1a09ad,'initialContent':_0xabdbfd(0x1b1)+_0x56afea+_0xabdbfd(0x1fb)});}[_0x282ed4(0x1b9)](_0x1a0068){const _0x5d30ca=_0x282ed4,_0x38b3aa=_0x1a0068[_0x5d30ca(0x1f8)]?.[_0x5d30ca(0x1da)]||_0x1a0068[_0x5d30ca(0x1f6)];this[_0x5d30ca(0x177)][_0x5d30ca(0x1d3)][_0x5d30ca(0x171)](_0x5d30ca(0x1b5),{'contextItems':Array[_0x5d30ca(0x182)](_0x1a0068[_0x5d30ca(0x17d)][_0x5d30ca(0x202)]()),'initialContent':_0x5d30ca(0x1b1)+_0x38b3aa+_0x5d30ca(0x1fb),'id':_0x1a0068['id']});}[_0x282ed4(0x207)]({errorMessage:_0x14c424,id:_0x263c56}){const _0x49adb6=_0x282ed4;this[_0x49adb6(0x177)][_0x49adb6(0x1d3)][_0x49adb6(0x171)](_0x49adb6(0x199),{'initialContent':_0x49adb6(0x1b1)+_0x14c424+_0x49adb6(0x1fb),'id':_0x263c56});}[_0x282ed4(0x1af)](_0x18c3a4){const _0x493b29=_0x282ed4;return this[_0x493b29(0x208)][_0x493b29(0x20d)](async()=>{const _0x4d8b7e=_0x493b29;this[_0x4d8b7e(0x177)][_0x4d8b7e(0x1d3)][_0x4d8b7e(0x171)](_0x4d8b7e(0x1d4),{'id':_0x18c3a4[_0x4d8b7e(0x1b7)]+':'+_0x18c3a4['id']}),this[_0x4d8b7e(0x184)](null);});}async[_0x282ed4(0x1fc)](_0x406a21){const _0x2331a3=_0x282ed4,_0x14f572=_0x27296f(this[_0x2331a3(0x18e)]);if(_0x14f572){const _0x14c031=_0x14f572[_0x2331a3(0x20f)][_0x2331a3(0x20a)](_0x2331a3(0x174));_0x14c031&&!this[_0x2331a3(0x1f9)]&&(this[_0x2331a3(0x1f9)]=!0x0,this[_0x2331a3(0x177)][_0x2331a3(0x1d3)][_0x2331a3(0x181)](_0x2331a3(0x189))['to'](_0x14c031,_0x2331a3(0x1cc)));}return this[_0x2331a3(0x208)][_0x2331a3(0x20d)](async()=>{const _0x345689=_0x2331a3;this[_0x345689(0x177)][_0x345689(0x1d3)][_0x345689(0x171)](_0x345689(0x1a3),{'id':_0x406a21[_0x345689(0x1b7)]+':'+_0x406a21['id'],'areActionsDisabled':_0x406a21[_0x345689(0x1ab)],'showDiff':this[_0x345689(0x20b)],'dropdownConfig':this[_0x345689(0x18e)][_0x345689(0x188)][_0x345689(0x20a)](_0x345689(0x1de))}),this[_0x345689(0x184)](null);});}[_0x282ed4(0x1bc)](_0x363702,_0x2873de){const _0x6df688=_0x282ed4,_0x1f1144=this[_0x6df688(0x177)][_0x6df688(0x1d3)][_0x6df688(0x1e0)][_0x6df688(0x19f)];if(_0x1f1144 instanceof _0x3fb43e)return this[_0x6df688(0x177)][_0x6df688(0x1d3)][_0x6df688(0x1e0)][_0x6df688(0x1d5)](_0x1f1144),void this[_0x6df688(0x177)][_0x6df688(0x1d3)][_0x6df688(0x171)](_0x6df688(0x1ac),{'id':_0x363702['id'],'capabilities':{'isWebSearchEnabled':_0x1f1144[_0x6df688(0x1cf)][_0x6df688(0x1e6)]||_0x2873de[_0x6df688(0x1e6)],'isReasoningEnabled':_0x1f1144[_0x6df688(0x1cf)][_0x6df688(0x1c5)]||_0x2873de[_0x6df688(0x1c5)]}});this[_0x6df688(0x177)][_0x6df688(0x1d3)][_0x6df688(0x171)](_0x6df688(0x1ac),{'id':_0x363702['id'],'capabilities':_0x2873de});}[_0x282ed4(0x1f3)](_0x489a21){const _0x4da0fa=_0x282ed4,_0x4a9ade=this[_0x4da0fa(0x177)][_0x4da0fa(0x1d3)][_0x4da0fa(0x1e0)][_0x4da0fa(0x1a8)](_0x58cd27=>_0x58cd27[_0x4da0fa(0x1aa)]['id']==_0x489a21['id']&&_0x58cd27 instanceof _0x3fb43e);_0x4a9ade&&_0x4a9ade[_0x4da0fa(0x1b4)](_0x4da0fa(0x1d6),_0x489a21[_0x4da0fa(0x1d6)]);}async[_0x282ed4(0x176)](_0x38dab2){const _0x2b2ede=_0x282ed4,_0x16cb0f=_0x38dab2[_0x2b2ede(0x1ee)]||this[_0x2b2ede(0x18c)];return this[_0x2b2ede(0x208)][_0x2b2ede(0x20d)](async _0x3dda41=>{const _0x3f4ce5=_0x2b2ede;await this[_0x3f4ce5(0x177)][_0x3f4ce5(0x1d3)][_0x3f4ce5(0x1a6)]({..._0x38dab2,'abortSignal':_0x3dda41,'renderingStrategy':_0x16cb0f}),_0x38dab2[_0x3f4ce5(0x1ed)]&&this[_0x3f4ce5(0x17a)](_0x38dab2['id']);});}[_0x282ed4(0x210)](_0x480222,_0x4766b9){const _0x2fd841=_0x282ed4;this[_0x2fd841(0x177)][_0x2fd841(0x1d3)][_0x2fd841(0x1cd)](_0x480222,_0x4766b9);}async[_0x282ed4(0x1ff)](_0x385ec1){const _0x2d76d6=_0x282ed4,_0x224bae=_0x385ec1[_0x2d76d6(0x1ee)]||this[_0x2d76d6(0x18c)];return this[_0x2d76d6(0x208)][_0x2d76d6(0x20d)](async _0x9ec25d=>{const _0x3ddee4=_0x2d76d6;await this[_0x3ddee4(0x177)][_0x3ddee4(0x1d3)][_0x3ddee4(0x17f)]({..._0x385ec1,'abortSignal':_0x9ec25d,'renderingStrategy':_0x224bae}),_0x385ec1[_0x3ddee4(0x1ed)]&&this[_0x3ddee4(0x17a)](_0x385ec1['id']);});}[_0x282ed4(0x1be)](_0x451133){const _0x503b92=_0x282ed4;this[_0x503b92(0x177)][_0x503b92(0x1d3)][_0x503b92(0x1c7)](_0x451133);}[_0x282ed4(0x17a)](_0xf7a0f3){const _0x340627=_0x282ed4;this[_0x340627(0x177)][_0x340627(0x1d3)][_0x340627(0x17b)](_0xf7a0f3);}[_0x282ed4(0x1c9)](_0x26a3be){const _0x595a12=_0x282ed4;this[_0x595a12(0x177)][_0x595a12(0x1d3)][_0x595a12(0x178)]()[_0x595a12(0x180)](_0x45ae70=>_0x45ae70[_0x595a12(0x1b6)](_0x26a3be))[_0x595a12(0x193)](_0x4a9f94=>this[_0x595a12(0x177)][_0x595a12(0x1d3)][_0x595a12(0x1e7)](_0x4a9f94));}[_0x282ed4(0x1dc)](){const _0x31497b=_0x282ed4;this[_0x31497b(0x184)]({'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x1}),this[_0x31497b(0x177)][_0x31497b(0x1ad)][_0x31497b(0x1e8)](!this[_0x31497b(0x18e)][_0x31497b(0x188)][_0x31497b(0x20a)](_0x31497b(0x18a))),this[_0x31497b(0x1c3)]=!0x0,this[_0x31497b(0x177)][_0x31497b(0x1d3)][_0x31497b(0x1b8)]();}[_0x282ed4(0x1f7)](_0x4130ad){const _0xe3452d=_0x282ed4;this[_0xe3452d(0x208)][_0xe3452d(0x1bb)](),this[_0xe3452d(0x177)][_0xe3452d(0x1d3)][_0xe3452d(0x178)]()[_0xe3452d(0x180)](_0x57e485=>_0x57e485[_0xe3452d(0x1b6)](_0x4130ad['id']))[_0xe3452d(0x193)](_0x74c8fd=>this[_0xe3452d(0x17a)](_0x74c8fd)),this[_0xe3452d(0x1c3)]=!0x1,this[_0xe3452d(0x177)][_0xe3452d(0x1d3)][_0xe3452d(0x1db)]();}async[_0x282ed4(0x20c)](){const _0x135e91=_0x282ed4;return this[_0x135e91(0x208)][_0x135e91(0x1f1)][_0x135e91(0x1e2)](()=>{const _0x386a01=_0x135e91;this[_0x386a01(0x1c3)]=!0x1,this[_0x386a01(0x177)][_0x386a01(0x1d3)][_0x386a01(0x1db)]();});}[_0x282ed4(0x1f0)](_0x22e809,_0xb5a2ab){const _0x717e8c=_0x282ed4;this[_0x717e8c(0x177)][_0x717e8c(0x1ad)][_0x717e8c(0x1f0)](_0x22e809,_0xb5a2ab);}[_0x282ed4(0x17e)](_0x3a520b){const _0x1c30fe=_0x282ed4;this[_0x1c30fe(0x177)][_0x1c30fe(0x1ad)][_0x1c30fe(0x17e)](_0x3a520b);}[_0x282ed4(0x198)](_0xb48ad,_0x58fe86){const _0x21c0b9=_0x282ed4;this[_0x21c0b9(0x177)][_0x21c0b9(0x1ad)][_0x21c0b9(0x198)](_0xb48ad,_0x58fe86);}[_0x282ed4(0x1a0)](_0x4832fc){const _0x2735b3=_0x282ed4;this[_0x2735b3(0x177)][_0x2735b3(0x1ad)][_0x2735b3(0x1a0)](_0x4832fc);}[_0x282ed4(0x1e1)](_0x45e4df){const _0x490db9=_0x282ed4;this[_0x490db9(0x177)][_0x490db9(0x1ad)][_0x490db9(0x1e1)](_0x45e4df);}[_0x282ed4(0x1d0)](){const _0x4c05cd=_0x282ed4;this[_0x4c05cd(0x177)][_0x4c05cd(0x1ad)][_0x4c05cd(0x1d0)]();}[_0x282ed4(0x194)](){const _0x2b029c=_0x282ed4;this[_0x2b029c(0x177)][_0x2b029c(0x1ad)][_0x2b029c(0x194)]();}[_0x282ed4(0x18f)](_0x4dd00b,_0x277a5b,_0x54406f){const _0x10806c=_0x282ed4;this[_0x10806c(0x177)][_0x10806c(0x1ad)][_0x10806c(0x18f)](_0x4dd00b,_0x277a5b,_0x54406f);}[_0x282ed4(0x1ef)](){const _0x81f4db=_0x282ed4;this[_0x81f4db(0x177)][_0x81f4db(0x1ad)][_0x81f4db(0x1ef)](),this[_0x81f4db(0x177)][_0x81f4db(0x1ad)][_0x81f4db(0x19d)](this[_0x81f4db(0x18d)]());}[_0x282ed4(0x183)](_0x586c7f){const _0x4a155c=_0x282ed4;this[_0x4a155c(0x177)][_0x4a155c(0x1ad)][_0x4a155c(0x183)](_0x586c7f);}[_0x282ed4(0x1a4)](_0x32870b){const _0x5a7c04=_0x282ed4;this[_0x5a7c04(0x177)][_0x5a7c04(0x1ad)][_0x5a7c04(0x1cb)](_0x32870b[_0x5a7c04(0x1e6)]),this[_0x5a7c04(0x177)][_0x5a7c04(0x1ad)][_0x5a7c04(0x1b3)](_0x32870b[_0x5a7c04(0x1c5)]),this[_0x5a7c04(0x177)][_0x5a7c04(0x1ad)][_0x5a7c04(0x19d)](this[_0x5a7c04(0x18d)](_0x32870b));}[_0x282ed4(0x1bf)](_0x38066e,_0x17a58b){const _0xfa38d6=_0x282ed4;this[_0xfa38d6(0x177)][_0xfa38d6(0x1ad)][_0xfa38d6(0x19c)](_0x38066e),_0x17a58b&&this[_0xfa38d6(0x177)][_0xfa38d6(0x1ad)][_0xfa38d6(0x1e8)](!0x1);}[_0x282ed4(0x1d9)](_0x33fd59){const _0x5abe5d=_0x282ed4;this[_0x5abe5d(0x18c)]=_0x33fd59;}[_0x282ed4(0x1f2)](_0x133507){const _0x6cef39=_0x282ed4;this[_0x6cef39(0x177)][_0x6cef39(0x1d3)][_0x6cef39(0x1f2)](_0x133507);}[_0x282ed4(0x1d8)](){const _0x43efa1=_0x282ed4;this[_0x43efa1(0x185)](_0x19279e(this[_0x43efa1(0x18e)][_0x43efa1(0x1dd)],_0x43efa1(0x1fe)));}[_0x282ed4(0x185)](_0x2b852b,_0x5992a1=!0x1){const _0x487288=_0x282ed4;if(_0x5992a1&&!_0x22b608()&&_0x2b852b[_0x487288(0x191)])return this[_0x487288(0x177)][_0x487288(0x1f4)][_0x487288(0x16f)]='',void this[_0x487288(0x1b2)](_0x2b852b);this[_0x487288(0x177)][_0x487288(0x1f4)][_0x487288(0x16f)]=_0x2b852b;}[_0x282ed4(0x184)](_0x1f6195){const _0x530d87=_0x282ed4,_0x7b9253=this[_0x530d87(0x1ce)](_0x1f6195);this[_0x530d87(0x177)][_0x530d87(0x1d3)][_0x530d87(0x184)](_0x7b9253);}[_0x282ed4(0x1b2)](_0x5a8f34){const _0x348ed2=_0x282ed4;let _0x379d30=0x0;clearInterval(this[_0x348ed2(0x1ec)]),this[_0x348ed2(0x1ec)]=setInterval(()=>{const _0x5dcca4=_0x348ed2;this[_0x5dcca4(0x177)][_0x5dcca4(0x1f4)][_0x5dcca4(0x16f)]=this[_0x5dcca4(0x177)][_0x5dcca4(0x1f4)][_0x5dcca4(0x16f)]+_0x5a8f34[_0x379d30],_0x379d30++,_0x379d30===_0x5a8f34[_0x5dcca4(0x191)]&&clearInterval(this[_0x5dcca4(0x1ec)]);},0x1e);}[_0x282ed4(0x190)](_0xd94442){const _0x434c37=_0x282ed4;this[_0x434c37(0x177)][_0x434c37(0x1f4)][_0x434c37(0x1a7)]=_0xd94442;}[_0x282ed4(0x1ce)](_0x2114c9){const _0x48d86f=_0x282ed4;return _0x2114c9?_0x2114c9[_0x48d86f(0x1e6)]&&_0x2114c9[_0x48d86f(0x1c5)]?_0x19279e(this[_0x48d86f(0x18e)][_0x48d86f(0x1dd)],_0x48d86f(0x200)):_0x2114c9[_0x48d86f(0x1e6)]?_0x19279e(this[_0x48d86f(0x18e)][_0x48d86f(0x1dd)],_0x48d86f(0x1a5)):_0x2114c9[_0x48d86f(0x1c5)]?_0x19279e(this[_0x48d86f(0x18e)][_0x48d86f(0x1dd)],_0x48d86f(0x1ca)):_0x19279e(this[_0x48d86f(0x18e)][_0x48d86f(0x1dd)],_0x48d86f(0x196)):'';}[_0x282ed4(0x18d)](_0x4d671a){const _0x40c550=_0x282ed4;return _0x4d671a?_0x4d671a[_0x40c550(0x1e6)]&&_0x4d671a[_0x40c550(0x1c5)]?_0x19279e(this[_0x40c550(0x18e)][_0x40c550(0x1dd)],_0x40c550(0x186)):_0x4d671a[_0x40c550(0x1e6)]?_0x19279e(this[_0x40c550(0x18e)][_0x40c550(0x1dd)],_0x40c550(0x1ea)):_0x4d671a[_0x40c550(0x1c5)]?_0x19279e(this[_0x40c550(0x18e)][_0x40c550(0x1dd)],_0x40c550(0x1df)):_0x19279e(this[_0x40c550(0x18e)][_0x40c550(0x1dd)],_0x40c550(0x1c1)):_0x19279e(this[_0x40c550(0x18e)][_0x40c550(0x1dd)],_0x40c550(0x1c1));}[_0x282ed4(0x172)](_0x45b7c4,_0x2817de,_0x53c5c9,_0x1b4f95){const _0x3465e3=_0x282ed4;this[_0x3465e3(0x177)][_0x3465e3(0x172)](_0x45b7c4,_0x2817de,_0x53c5c9,_0x1b4f95);}[_0x282ed4(0x1e4)](_0x13a001){const _0x384c87=_0x282ed4;this[_0x384c87(0x177)][_0x384c87(0x1e4)](_0x13a001);}[_0x282ed4(0x19b)](){const _0x20762b=_0x282ed4;this[_0x20762b(0x177)][_0x20762b(0x1ad)][_0x20762b(0x19b)]();}[_0x282ed4(0x1a1)](_0x5b9318,_0x5c8f7c){const _0x1b4c69=_0x282ed4;this[_0x1b4c69(0x177)][_0x1b4c69(0x1d3)][_0x1b4c69(0x1a9)](_0x5b9318,_0x5c8f7c);}[_0x282ed4(0x1e9)](){const _0x128fd2=_0x282ed4;this[_0x128fd2(0x177)][_0x128fd2(0x1ad)][_0x128fd2(0x17c)]=!0x0;}[_0x282ed4(0x1e5)](){const _0xdb66e3=_0x282ed4;this[_0xdb66e3(0x177)][_0xdb66e3(0x1ad)][_0xdb66e3(0x17c)]=!0x1;}}
23
+ const _0x8335a5=_0xfb73;(function(_0x4c3fcb,_0x3b55d6){const _0x1eabc5=_0xfb73,_0x17ebfe=_0x4c3fcb();while(!![]){try{const _0x2195ed=-parseInt(_0x1eabc5(0x18b))/0x1*(parseInt(_0x1eabc5(0x1ae))/0x2)+parseInt(_0x1eabc5(0x1aa))/0x3+parseInt(_0x1eabc5(0x1d5))/0x4+-parseInt(_0x1eabc5(0x182))/0x5+-parseInt(_0x1eabc5(0x17b))/0x6*(parseInt(_0x1eabc5(0x1ef))/0x7)+parseInt(_0x1eabc5(0x1ba))/0x8+parseInt(_0x1eabc5(0x1b7))/0x9*(parseInt(_0x1eabc5(0x1e0))/0xa);if(_0x2195ed===_0x3b55d6)break;else _0x17ebfe['push'](_0x17ebfe['shift']());}catch(_0x92e46e){_0x17ebfe['push'](_0x17ebfe['shift']());}}}(_0x10fe,0x88bf9));import{ContextPlugin as _0x2fe490}from'ckeditor5/src/core.js';import{_isMotionReduced as _0x34a077}from'ckeditor5/src/utils.js';import{AIChatView as _0x314bd8}from'./ui/aichatview.js';import{AITabs as _0x445f08}from'../aitabs/aitabs.js';import{getTranslation as _0x5d54c6}from'../aicore/utils/common-translations.js';function _0xfb73(_0x4ff307,_0x35930d){const _0x10fe4e=_0x10fe();return _0xfb73=function(_0xfb7343,_0xa0b90a){_0xfb7343=_0xfb7343-0x179;let _0x5daae1=_0x10fe4e[_0xfb7343];return _0x5daae1;},_0xfb73(_0x4ff307,_0x35930d);}import{IconAIChat as _0x1583eb}from'ckeditor5/src/icons.js';import{AIChatFeedInteractionHeaderView as _0x3c9dd0}from'./ui/feed/aichatfeedinteractionheaderview.js';import{PromiseQueue as _0x34f880}from'./utils/promisequeue.js';function _0x10fe(){const _0x73012=['chatHeader','destroy','setReasoning','addFeedItemUserMessage','showResizeButton','filter','trackChanges','AI_CHAT_FEED_LOADING_MESSAGE_REGULAR','updateFeedInteractionHeader','conversation-start','queueEmptyPromise','addFeedItemAIReply','setLoadingMessage','error-message','availableModels','ai-reply','from','setAddContextOptions','3560564nxScui','removeContextItem','setConversationTitle','showDiff','scrollToSuggestion','get','requires','ai.chat.models.modelSelectorAlwaysVisible','setIsMaximized','isBusy','addContextItem','10XHZjET','disableControls','updateCapabilities','updateFeedItemAIReplySuggestionContent','isVisible','isPremiumPlugin','<p>','AIChatUI','addTab','isWebSearchEnabled','abort','isReasoningEnabled','clear','_animateConversationTitle','areActionsDisabled','658679PASpCi','enableModelSelector','isDone','pluginName','enqueue','markItemAsDone','removeFeedInteraction','children','config','addFeedInteractionHeader','AITabs','isDisabled','stopInteraction','resetConversationTitle','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH','stopAutoScroll','user-message','chatControls','contextItems','getItemIds','resetMessageInput','AI_CHAT_WELCOME_MESSAGE','toggleLoadingSkeleton','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH_REASONING','displayedPrompt','values','clearPendingContextUI','updateSuggestionPartState','value','scrollFeedToSuggestion','toggleSuggestionDisplayMode','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REASONING','addFeedItemError','interactionId','plugins','startsWith','isMaximized','setModelList','startInteraction','updateSuggestionItem','_getLoadingMessage','_view','ai-suggestion-reply','setInputPlaceholder','isLoading','isPending','AI_CHAT_FEED_LOADING_MESSAGE_REASONING','6uURYPC','setWebSearch','addItem','userMessage','locale','createConversation','updateFeedItemAIReplySuggestionPartState','4660655fLdwtJ','_getInputPlaceholder','disableModelSelector','context','enableControls','_isTrackChangesCommandValueBound','startAutoScroll','feedItemRenderingStrategy','commands','452xhMnKF','chatFeed','ai.availableReplyActions','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REGULAR','markFeedItemAsDone','options','updateFeedItemAIReplyContent','_interactionPromiseResolver','isOfficialPlugin','closeSourceResourceBalloon','setSelectedModel','quickActionData','setContextItemLoading','populateSourceResourceBalloon','capabilities','clearConversationContextUI','AI_CHAT_HEADING','label','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH_REASONING','focusPromptInput','isModelAvailable','finishInteraction','updateWebSources','setModel','delegate','addFeedItemAISuggestion','_promiseQueue','length','</p>','renderingStrategy','remove','553503vSEBpe','forEach','find','streaming','3622ZWPYiL','updateFeedItemAIReplySources','chat','last','removeItem','_titleAnimationInterval','then','setConversationContext','setIsUploadInProgress','7432119OZSmiR','isTrackChangesOn','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH','4035904LFSHDt','set','addFeedItemStaticMessage','bind','updateReplyItem','interaction-header','updateResourceState','view','setFeedItemRenderingStrategy'];_0x10fe=function(){return _0x73012;};return _0x10fe();}import{AI_CHAT_UI_EVENT_NAMES as _0x52ff38}from'./utils/eventnames.js';import'../../theme/aichat/aichat.css';import{getEditorFromContext as _0x5a994f}from'../aicore/utils/geteditorfromcontext.js';export class AIChatUI extends _0x2fe490{static get[_0x8335a5(0x1db)](){return[_0x445f08];}[_0x8335a5(0x218)];static get[_0x8335a5(0x1f2)](){const _0x1043a7=_0x8335a5;return _0x1043a7(0x1e7);}static get[_0x8335a5(0x193)](){return!0x0;}static get[_0x8335a5(0x1e5)](){return!0x0;}[_0x8335a5(0x189)]=_0x8335a5(0x1ad);[_0x8335a5(0x1d8)]=!0x0;[_0x8335a5(0x1a5)];[_0x8335a5(0x192)];[_0x8335a5(0x1b3)]=void 0x0;[_0x8335a5(0x187)]=!0x1;constructor(_0x3dccc2){const _0x445fc0=_0x8335a5;super(_0x3dccc2);const _0x12fd09=this[_0x445fc0(0x185)][_0x445fc0(0x211)][_0x445fc0(0x1da)](_0x445fc0(0x1f9));this[_0x445fc0(0x1bb)](_0x445fc0(0x1de),!0x1),this[_0x445fc0(0x1a5)]=new _0x34f880(),this[_0x445fc0(0x218)]=new _0x314bd8(this[_0x445fc0(0x185)][_0x445fc0(0x17f)],_0x12fd09[_0x445fc0(0x1c7)]),this[_0x445fc0(0x218)][_0x445fc0(0x1a3)](..._0x52ff38)['to'](this),this[_0x445fc0(0x218)]['on'](_0x445fc0(0x20d),(_0x400555,{showDiff:_0x5675e9})=>{const _0x53248e=_0x445fc0;this[_0x53248e(0x1d8)]=_0x5675e9;}),_0x12fd09[_0x445fc0(0x1c1)][_0x445fc0(0x1e8)]({'id':_0x445fc0(0x1b0),'buttonLabel':_0x5d54c6(this[_0x445fc0(0x185)][_0x445fc0(0x17f)],_0x445fc0(0x19b)),'buttonIcon':_0x1583eb,'order':0x0,'content':this[_0x445fc0(0x218)]}),this[_0x445fc0(0x218)][_0x445fc0(0x200)][_0x445fc0(0x1bd)](_0x445fc0(0x21b))['to'](this,_0x445fc0(0x1de),_0x40c7d5=>_0x40c7d5),this[_0x445fc0(0x218)][_0x445fc0(0x18c)][_0x445fc0(0x1bd)](_0x445fc0(0x179))['to'](this,_0x445fc0(0x1de),_0x45671a=>_0x45671a),this[_0x445fc0(0x218)][_0x445fc0(0x200)][_0x445fc0(0x21a)](this[_0x445fc0(0x183)]()),this[_0x445fc0(0x1bd)](_0x445fc0(0x19f))['to'](this[_0x445fc0(0x218)][_0x445fc0(0x200)],_0x445fc0(0x19f));}[_0x8335a5(0x1c4)](){const _0x3c2901=_0x8335a5;super[_0x3c2901(0x1c4)](),this[_0x3c2901(0x1b3)]&&clearInterval(this[_0x3c2901(0x1b3)]);}[_0x8335a5(0x180)](_0x190e0b){const _0x419135=_0x8335a5;this[_0x419135(0x218)][_0x419135(0x18c)][_0x419135(0x1ec)](),this[_0x419135(0x218)][_0x419135(0x200)][_0x419135(0x1f0)](),this[_0x419135(0x218)][_0x419135(0x200)][_0x419135(0x214)](_0x190e0b[_0x419135(0x1d1)],!this[_0x419135(0x185)][_0x419135(0x1f7)][_0x419135(0x1da)](_0x419135(0x1dc))),this[_0x419135(0x1bc)]({'id':_0x419135(0x1cc),'staticMessage':_0x5d54c6(this[_0x419135(0x185)][_0x419135(0x17f)],_0x419135(0x204))});}[_0x8335a5(0x1bc)]({id:_0x5c8e13,staticMessage:_0x34ae5e}){const _0x2e8dda=_0x8335a5;this[_0x2e8dda(0x218)][_0x2e8dda(0x18c)][_0x2e8dda(0x17d)](_0x2e8dda(0x1d2),{'id':_0x5c8e13,'initialContent':_0x2e8dda(0x1e6)+_0x34ae5e+_0x2e8dda(0x1a7)});}[_0x8335a5(0x1c6)](_0x39067f){const _0x32212b=_0x8335a5,_0x935db3=_0x39067f[_0x32212b(0x196)]?.[_0x32212b(0x207)]||_0x39067f[_0x32212b(0x17e)];this[_0x32212b(0x218)][_0x32212b(0x18c)][_0x32212b(0x17d)](_0x32212b(0x1ff),{'contextItems':Array[_0x32212b(0x1d3)](_0x39067f[_0x32212b(0x201)][_0x32212b(0x208)]()),'initialContent':_0x32212b(0x1e6)+_0x935db3+_0x32212b(0x1a7),'id':_0x39067f['id']});}[_0x8335a5(0x20f)]({errorMessage:_0x253060,id:_0x4c281a}){const _0x57af3c=_0x8335a5;this[_0x57af3c(0x218)][_0x57af3c(0x18c)][_0x57af3c(0x17d)](_0x57af3c(0x1d0),{'initialContent':_0x57af3c(0x1e6)+_0x253060+_0x57af3c(0x1a7),'id':_0x4c281a});}[_0x8335a5(0x1ce)](_0x58e923){const _0x2a6ca0=_0x8335a5;return this[_0x2a6ca0(0x1a5)][_0x2a6ca0(0x1f3)](async()=>{const _0x2c3cb1=_0x2a6ca0;this[_0x2c3cb1(0x218)][_0x2c3cb1(0x18c)][_0x2c3cb1(0x17d)](_0x2c3cb1(0x1d2),{'id':_0x58e923[_0x2c3cb1(0x210)]+':'+_0x58e923['id']}),this[_0x2c3cb1(0x1cf)](null);});}async[_0x8335a5(0x1a4)](_0x3a0fe6){const _0x37bf7e=_0x8335a5,_0x3887e2=_0x5a994f(this[_0x37bf7e(0x185)]);if(_0x3887e2){const _0x558508=_0x3887e2[_0x37bf7e(0x18a)][_0x37bf7e(0x1da)](_0x37bf7e(0x1c9));_0x558508&&!this[_0x37bf7e(0x187)]&&(this[_0x37bf7e(0x187)]=!0x0,this[_0x37bf7e(0x218)][_0x37bf7e(0x18c)][_0x37bf7e(0x1bd)](_0x37bf7e(0x1b8))['to'](_0x558508,_0x37bf7e(0x20b)));}return this[_0x37bf7e(0x1a5)][_0x37bf7e(0x1f3)](async()=>{const _0x24ce96=_0x37bf7e;this[_0x24ce96(0x218)][_0x24ce96(0x18c)][_0x24ce96(0x17d)](_0x24ce96(0x219),{'id':_0x3a0fe6[_0x24ce96(0x210)]+':'+_0x3a0fe6['id'],'areActionsDisabled':_0x3a0fe6[_0x24ce96(0x1ee)],'showDiff':this[_0x24ce96(0x1d8)],'dropdownConfig':this[_0x24ce96(0x185)][_0x24ce96(0x1f7)][_0x24ce96(0x1da)](_0x24ce96(0x18d))}),this[_0x24ce96(0x1cf)](null);});}[_0x8335a5(0x1f8)](_0x3b61fe,_0x1c41d4){const _0x4c7ea8=_0x8335a5,_0x2226a7=this[_0x4c7ea8(0x218)][_0x4c7ea8(0x18c)][_0x4c7ea8(0x1f6)][_0x4c7ea8(0x1b1)];if(_0x2226a7 instanceof _0x3c9dd0)return this[_0x4c7ea8(0x218)][_0x4c7ea8(0x18c)][_0x4c7ea8(0x1f6)][_0x4c7ea8(0x1a9)](_0x2226a7),void this[_0x4c7ea8(0x218)][_0x4c7ea8(0x18c)][_0x4c7ea8(0x17d)](_0x4c7ea8(0x1bf),{'id':_0x3b61fe['id'],'capabilities':{'isWebSearchEnabled':_0x2226a7[_0x4c7ea8(0x199)][_0x4c7ea8(0x1e9)]||_0x1c41d4[_0x4c7ea8(0x1e9)],'isReasoningEnabled':_0x2226a7[_0x4c7ea8(0x199)][_0x4c7ea8(0x1eb)]||_0x1c41d4[_0x4c7ea8(0x1eb)]}});this[_0x4c7ea8(0x218)][_0x4c7ea8(0x18c)][_0x4c7ea8(0x17d)](_0x4c7ea8(0x1bf),{'id':_0x3b61fe['id'],'capabilities':_0x1c41d4});}[_0x8335a5(0x1cb)](_0x3353be){const _0x1c18da=_0x8335a5,_0x48a7e0=this[_0x1c18da(0x218)][_0x1c18da(0x18c)][_0x1c18da(0x1f6)][_0x1c18da(0x1ac)](_0x6262de=>_0x6262de[_0x1c18da(0x190)]['id']==_0x3353be['id']&&_0x6262de instanceof _0x3c9dd0);_0x48a7e0&&_0x48a7e0[_0x1c18da(0x1bb)](_0x1c18da(0x1e4),_0x3353be[_0x1c18da(0x1e4)]);}async[_0x8335a5(0x191)](_0x605ab){const _0x5a7615=_0x8335a5,_0x4ce29f=_0x605ab[_0x5a7615(0x1a8)]||this[_0x5a7615(0x189)];return this[_0x5a7615(0x1a5)][_0x5a7615(0x1f3)](async _0x285628=>{const _0x3e5d0b=_0x5a7615;await this[_0x3e5d0b(0x218)][_0x3e5d0b(0x18c)][_0x3e5d0b(0x1be)]({..._0x605ab,'abortSignal':_0x285628,'renderingStrategy':_0x4ce29f}),_0x605ab[_0x3e5d0b(0x1f1)]&&this[_0x3e5d0b(0x18f)](_0x605ab['id']);});}[_0x8335a5(0x1af)](_0x11fd6b,_0x4878a2){const _0x4efeba=_0x8335a5;this[_0x4efeba(0x218)][_0x4efeba(0x18c)][_0x4efeba(0x1a1)](_0x11fd6b,_0x4878a2);}async[_0x8335a5(0x1e3)](_0x5d8fd8){const _0x5101e8=_0x8335a5,_0x49a5a8=_0x5d8fd8[_0x5101e8(0x1a8)]||this[_0x5101e8(0x189)];return this[_0x5101e8(0x1a5)][_0x5101e8(0x1f3)](async _0x504512=>{const _0x50c911=_0x5101e8;await this[_0x50c911(0x218)][_0x50c911(0x18c)][_0x50c911(0x216)]({..._0x5d8fd8,'abortSignal':_0x504512,'renderingStrategy':_0x49a5a8}),_0x5d8fd8[_0x50c911(0x1f1)]&&this[_0x50c911(0x18f)](_0x5d8fd8['id']);});}[_0x8335a5(0x181)](_0x2f43c5){const _0x5a0b92=_0x8335a5;this[_0x5a0b92(0x218)][_0x5a0b92(0x18c)][_0x5a0b92(0x20a)](_0x2f43c5);}[_0x8335a5(0x18f)](_0x3e16ae){const _0x59cc11=_0x8335a5;this[_0x59cc11(0x218)][_0x59cc11(0x18c)][_0x59cc11(0x1f4)](_0x3e16ae);}[_0x8335a5(0x1f5)](_0x407cbc){const _0x81393f=_0x8335a5;this[_0x81393f(0x218)][_0x81393f(0x18c)][_0x81393f(0x202)]()[_0x81393f(0x1c8)](_0x412760=>_0x412760[_0x81393f(0x212)](_0x407cbc))[_0x81393f(0x1ab)](_0x557a73=>this[_0x81393f(0x218)][_0x81393f(0x18c)][_0x81393f(0x1b2)](_0x557a73));}[_0x8335a5(0x215)](){const _0x38cd6f=_0x8335a5;this[_0x38cd6f(0x1cf)]({'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x1}),this[_0x38cd6f(0x218)][_0x38cd6f(0x200)][_0x38cd6f(0x184)](!this[_0x38cd6f(0x185)][_0x38cd6f(0x1f7)][_0x38cd6f(0x1da)](_0x38cd6f(0x1dc))),this[_0x38cd6f(0x1de)]=!0x0,this[_0x38cd6f(0x218)][_0x38cd6f(0x18c)][_0x38cd6f(0x188)]();}[_0x8335a5(0x1fb)](_0x402836){const _0x130209=_0x8335a5;this[_0x130209(0x1a5)][_0x130209(0x1ea)](),this[_0x130209(0x218)][_0x130209(0x18c)][_0x130209(0x202)]()[_0x130209(0x1c8)](_0x3a610c=>_0x3a610c[_0x130209(0x212)](_0x402836['id']))[_0x130209(0x1ab)](_0x247469=>this[_0x130209(0x18f)](_0x247469)),this[_0x130209(0x1de)]=!0x1,this[_0x130209(0x218)][_0x130209(0x18c)][_0x130209(0x1fe)]();}async[_0x8335a5(0x1a0)](){const _0x1df4d2=_0x8335a5;return this[_0x1df4d2(0x1a5)][_0x1df4d2(0x1cd)][_0x1df4d2(0x1b4)](()=>{const _0x27271a=_0x1df4d2;this[_0x27271a(0x1de)]=!0x1,this[_0x27271a(0x218)][_0x27271a(0x18c)][_0x27271a(0x1fe)]();});}[_0x8335a5(0x1df)](_0x26052b,_0x3522f6){const _0x1590b7=_0x8335a5;this[_0x1590b7(0x218)][_0x1590b7(0x200)][_0x1590b7(0x1df)](_0x26052b,_0x3522f6);}[_0x8335a5(0x1d6)](_0x3c3491){const _0x1caeac=_0x8335a5;this[_0x1caeac(0x218)][_0x1caeac(0x200)][_0x1caeac(0x1d6)](_0x3c3491);}[_0x8335a5(0x197)](_0x36be1d,_0x2b63c1){const _0x936a35=_0x8335a5;this[_0x936a35(0x218)][_0x936a35(0x200)][_0x936a35(0x197)](_0x36be1d,_0x2b63c1);}[_0x8335a5(0x1b6)](_0x527e86){const _0x53d8ab=_0x8335a5;this[_0x53d8ab(0x218)][_0x53d8ab(0x200)][_0x53d8ab(0x1b6)](_0x527e86);}[_0x8335a5(0x1b5)](_0xbb230d){const _0x5a947a=_0x8335a5;this[_0x5a947a(0x218)][_0x5a947a(0x200)][_0x5a947a(0x1b5)](_0xbb230d);}[_0x8335a5(0x209)](){const _0x319bfe=_0x8335a5;this[_0x319bfe(0x218)][_0x319bfe(0x200)][_0x319bfe(0x209)]();}[_0x8335a5(0x19a)](){const _0x1c6a86=_0x8335a5;this[_0x1c6a86(0x218)][_0x1c6a86(0x200)][_0x1c6a86(0x19a)]();}[_0x8335a5(0x1c0)](_0x5d065a,_0x4666fb,_0x1c0df1){const _0x3bc747=_0x8335a5;this[_0x3bc747(0x218)][_0x3bc747(0x200)][_0x3bc747(0x1c0)](_0x5d065a,_0x4666fb,_0x1c0df1);}[_0x8335a5(0x203)](){const _0x53d446=_0x8335a5;this[_0x53d446(0x218)][_0x53d446(0x200)][_0x53d446(0x203)](),this[_0x53d446(0x218)][_0x53d446(0x200)][_0x53d446(0x21a)](this[_0x53d446(0x183)]());}[_0x8335a5(0x1d4)](_0xab27df){const _0xf5b3ab=_0x8335a5;this[_0xf5b3ab(0x218)][_0xf5b3ab(0x200)][_0xf5b3ab(0x1d4)](_0xab27df);}[_0x8335a5(0x1e2)](_0x358f2d){const _0x534106=_0x8335a5;this[_0x534106(0x218)][_0x534106(0x200)][_0x534106(0x17c)](_0x358f2d[_0x534106(0x1e9)]),this[_0x534106(0x218)][_0x534106(0x200)][_0x534106(0x1c5)](_0x358f2d[_0x534106(0x1eb)]),this[_0x534106(0x218)][_0x534106(0x200)][_0x534106(0x21a)](this[_0x534106(0x183)](_0x358f2d));}[_0x8335a5(0x195)](_0x38b56d,_0x61e6cc){const _0x586148=_0x8335a5;this[_0x586148(0x218)][_0x586148(0x200)][_0x586148(0x1a2)](_0x38b56d),_0x61e6cc&&this[_0x586148(0x218)][_0x586148(0x200)][_0x586148(0x184)](!0x1);}[_0x8335a5(0x1c2)](_0x471fc4){const _0xf7b249=_0x8335a5;this[_0xf7b249(0x189)]=_0x471fc4;}[_0x8335a5(0x205)](_0x5b39e5){const _0x13ec81=_0x8335a5;this[_0x13ec81(0x218)][_0x13ec81(0x18c)][_0x13ec81(0x205)](_0x5b39e5);}[_0x8335a5(0x1fc)](){const _0x439f8e=_0x8335a5;this[_0x439f8e(0x1d7)](_0x5d54c6(this[_0x439f8e(0x185)][_0x439f8e(0x17f)],_0x439f8e(0x19b)));}[_0x8335a5(0x1d7)](_0x57abe9,_0x4d7e99=!0x1){const _0x1692d7=_0x8335a5;if(_0x4d7e99&&!_0x34a077()&&_0x57abe9[_0x1692d7(0x1a6)])return this[_0x1692d7(0x218)][_0x1692d7(0x1c3)][_0x1692d7(0x19c)]='',void this[_0x1692d7(0x1ed)](_0x57abe9);this[_0x1692d7(0x218)][_0x1692d7(0x1c3)][_0x1692d7(0x19c)]=_0x57abe9;}[_0x8335a5(0x1cf)](_0x9c3bac){const _0x2b658c=_0x8335a5,_0x47d639=this[_0x2b658c(0x217)](_0x9c3bac);this[_0x2b658c(0x218)][_0x2b658c(0x18c)][_0x2b658c(0x1cf)](_0x47d639);}[_0x8335a5(0x1ed)](_0xa0e11d){const _0x2e3c4c=_0x8335a5;let _0x4c2e1d=0x0;clearInterval(this[_0x2e3c4c(0x1b3)]),this[_0x2e3c4c(0x1b3)]=setInterval(()=>{const _0x28abbf=_0x2e3c4c;this[_0x28abbf(0x218)][_0x28abbf(0x1c3)][_0x28abbf(0x19c)]=this[_0x28abbf(0x218)][_0x28abbf(0x1c3)][_0x28abbf(0x19c)]+_0xa0e11d[_0x4c2e1d],_0x4c2e1d++,_0x4c2e1d===_0xa0e11d[_0x28abbf(0x1a6)]&&clearInterval(this[_0x28abbf(0x1b3)]);},0x1e);}[_0x8335a5(0x1dd)](_0x1dccab){const _0x4e4afa=_0x8335a5;this[_0x4e4afa(0x218)][_0x4e4afa(0x1c3)][_0x4e4afa(0x213)]=_0x1dccab;}[_0x8335a5(0x217)](_0x58e0f0){const _0x3cd335=_0x8335a5;return _0x58e0f0?_0x58e0f0[_0x3cd335(0x1e9)]&&_0x58e0f0[_0x3cd335(0x1eb)]?_0x5d54c6(this[_0x3cd335(0x185)][_0x3cd335(0x17f)],_0x3cd335(0x19d)):_0x58e0f0[_0x3cd335(0x1e9)]?_0x5d54c6(this[_0x3cd335(0x185)][_0x3cd335(0x17f)],_0x3cd335(0x1fd)):_0x58e0f0[_0x3cd335(0x1eb)]?_0x5d54c6(this[_0x3cd335(0x185)][_0x3cd335(0x17f)],_0x3cd335(0x17a)):_0x5d54c6(this[_0x3cd335(0x185)][_0x3cd335(0x17f)],_0x3cd335(0x1ca)):'';}[_0x8335a5(0x183)](_0x4c3bdb){const _0x4fe9ce=_0x8335a5;return _0x4c3bdb?_0x4c3bdb[_0x4fe9ce(0x1e9)]&&_0x4c3bdb[_0x4fe9ce(0x1eb)]?_0x5d54c6(this[_0x4fe9ce(0x185)][_0x4fe9ce(0x17f)],_0x4fe9ce(0x206)):_0x4c3bdb[_0x4fe9ce(0x1e9)]?_0x5d54c6(this[_0x4fe9ce(0x185)][_0x4fe9ce(0x17f)],_0x4fe9ce(0x1b9)):_0x4c3bdb[_0x4fe9ce(0x1eb)]?_0x5d54c6(this[_0x4fe9ce(0x185)][_0x4fe9ce(0x17f)],_0x4fe9ce(0x20e)):_0x5d54c6(this[_0x4fe9ce(0x185)][_0x4fe9ce(0x17f)],_0x4fe9ce(0x18e)):_0x5d54c6(this[_0x4fe9ce(0x185)][_0x4fe9ce(0x17f)],_0x4fe9ce(0x18e));}[_0x8335a5(0x198)](_0x5bd901,_0x182478,_0x5ba364,_0x49f5bc){const _0x20b03a=_0x8335a5;this[_0x20b03a(0x218)][_0x20b03a(0x198)](_0x5bd901,_0x182478,_0x5ba364,_0x49f5bc);}[_0x8335a5(0x194)](_0x1df26b){const _0x57c2cf=_0x8335a5;this[_0x57c2cf(0x218)][_0x57c2cf(0x194)](_0x1df26b);}[_0x8335a5(0x19e)](){const _0x31bfee=_0x8335a5;this[_0x31bfee(0x218)][_0x31bfee(0x200)][_0x31bfee(0x19e)]();}[_0x8335a5(0x20c)](_0x252b94,_0x35911a){const _0x215b6d=_0x8335a5;this[_0x215b6d(0x218)][_0x215b6d(0x18c)][_0x215b6d(0x1d9)](_0x252b94,_0x35911a);}[_0x8335a5(0x1e1)](){const _0x14ea8d=_0x8335a5;this[_0x14ea8d(0x218)][_0x14ea8d(0x200)][_0x14ea8d(0x1fa)]=!0x0;}[_0x8335a5(0x186)](){const _0x5cc749=_0x8335a5;this[_0x5cc749(0x218)][_0x5cc749(0x200)][_0x5cc749(0x1fa)]=!0x1;}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x5c939a=_0x1107;(function(_0x2a08a0,_0x157c9b){const _0x89af44=_0x1107,_0x2eabcd=_0x2a08a0();while(!![]){try{const _0x99e431=-parseInt(_0x89af44(0x144))/0x1*(parseInt(_0x89af44(0x198))/0x2)+-parseInt(_0x89af44(0x15f))/0x3+-parseInt(_0x89af44(0x159))/0x4*(parseInt(_0x89af44(0x1ba))/0x5)+parseInt(_0x89af44(0x172))/0x6*(parseInt(_0x89af44(0x178))/0x7)+-parseInt(_0x89af44(0x195))/0x8+parseInt(_0x89af44(0x1a3))/0x9*(parseInt(_0x89af44(0x1a7))/0xa)+parseInt(_0x89af44(0x182))/0xb;if(_0x99e431===_0x157c9b)break;else _0x2eabcd['push'](_0x2eabcd['shift']());}catch(_0x5c246f){_0x2eabcd['push'](_0x2eabcd['shift']());}}}(_0x1895,0xb9ab4));function _0x1107(_0x2cefd4,_0x526431){const _0x1895be=_0x1895();return _0x1107=function(_0x11075e,_0x5302a4){_0x11075e=_0x11075e-0x144;let _0x3f4672=_0x1895be[_0x11075e];return _0x3f4672;},_0x1107(_0x2cefd4,_0x526431);}import{CKEditorError as _0x2d54ee,ObservableMixin as _0x4b9830,uid as _0x38225f}from'ckeditor5/src/utils.js';import{AIContextItemType as _0x30e74c,AIContextTextResourceType as _0x51d6ab}from'../../aicore/model/aicontext.js';import{escape as _0x21133f}from'es-toolkit/compat';export const AI_CONTEXT_MODEL_EVENT_NAMES=[_0x5c939a(0x19c),_0x5c939a(0x1b0),_0x5c939a(0x1a6),_0x5c939a(0x189),_0x5c939a(0x17d),_0x5c939a(0x1c3),_0x5c939a(0x183),_0x5c939a(0x16f),_0x5c939a(0x147)];function _0x1895(){const _0x312715=['uploadUrl','_findSourceIdsByResourceId','ai-chat-file-upload-failed','11735984jjUNUG','URL','File','3478GhZnbx','url-','populateFromMessage','values','contextItemAdded','document','forEach','isSelectionInContext','ai-chat-url-upload-failed','_updateResourceInContextState','_getCustomSourcesInitialState','45AADYTy','fire','_connector','contextItemLoadingEnded','2317970wZUXfN','addToConversationContext','getId','start','_setAddContextOptionsDefaultState','find','isInContext','set','abortController','contextItemRemoved','object','urls','_ownerId','ai-chat-document-upload-failed','uploadFile','_finishUploadOperation','isReadOnly','addSelectionToContext','_pendingContextItems','1104745scapTP','_ongoingUploadOperations','map','DOCUMENT','addResourceToContext','MARKDOWN','FILE','TEXT','resources','addContextOptionsChanged','init','all','push','addCurrentDocumentToContext','ai-chat-context-invalid-data','end','ai-chat-source-not-found','removeFromContext','getPendingContextItems','hidden','ai-chat-resource-load-failed','HTML','data','label','sessionId','401hRIXXr','_mapContextItemToRequestData','url','uploadProgressChanged','object\x20with\x20content\x20and\x20type\x20properties','name','_convertTextResourceToFile','text/markdown','files','ai-request-aborted','uploadDocument','version','uiId','file-','delete','enabled','get','has','type','files-','ai-chat-resource-no-data','8ZquoXK','ai-chat-context-unsupported-type','selection','getData','sources','getResources','2499282mVkSqh','removeSelectionFromContext','resourceId','fetchDocument','message','_toggleAddCurrentDocumentOptionVisibility','string','Current\x20document','startsWith','ai-chat-source-resources-load-failed','attributes','loadSourceResources','_finishContextItemLoading','_addContextOptionsState','_removeContextItem','isCurrentDocumentInConversation','resourceStateChanged','isHidden','from','305574uCkCen','_config','abort','_startUploadOperation','getDocument','_conversationContextItems','21FioWBS','size','current-document','text/plain','_ongoingUploads','error','stack','isCurrentDocumentInContext','_addToConversationContextItem','text/html','31768627FWAnBH','sourceResourcesLoaded','content','addFilesToContext','getSentContextItems','filter','mapContextItemsToRequestData','contextSent','addUrlToContext','SELECTION','length','updateCurrentDocument','_isResourceInContext','_addContextItem','clearPendingContextItems','_createContextItemFromContent'];_0x1895=function(){return _0x312715;};return _0x1895();}export class AIChatContext extends _0x4b9830(){[_0x5c939a(0x1a5)];[_0x5c939a(0x173)];[_0x5c939a(0x1b3)];constructor({connector:_0x39664c,config:_0x4e42f3,ownerId:_0x2134ec}){const _0x390383=_0x5c939a;super(),this[_0x390383(0x1a5)]=_0x39664c,this[_0x390383(0x173)]=_0x4e42f3,this[_0x390383(0x1b3)]=_0x2134ec;}[_0x5c939a(0x1c4)](){const _0x16244d=_0x5c939a;this[_0x16244d(0x1b9)]=new Map(),this[_0x16244d(0x177)]=new Map(),this[_0x16244d(0x17c)]=new Map(),this[_0x16244d(0x1bb)]=new Map(),this[_0x16244d(0x1ab)]();}[_0x5c939a(0x1cc)](){const _0x342aff=_0x5c939a;return this[_0x342aff(0x1b9)];}async[_0x5c939a(0x19a)](_0x33369b){const _0x97a168=_0x5c939a,_0x33a2f9=await this[_0x97a168(0x191)](_0x33369b);return this[_0x97a168(0x180)](_0x33a2f9),_0x97a168(0x17a)===_0x33a2f9[_0x97a168(0x150)]&&this[_0x97a168(0x164)](),_0x33a2f9;}async[_0x5c939a(0x191)](_0x5132cd){const _0x3f7e2e=_0x5c939a;if(_0x5132cd[_0x3f7e2e(0x156)]===_0x30e74c[_0x3f7e2e(0x1bd)]){const _0x2919da=await this[_0x3f7e2e(0x1a5)][_0x3f7e2e(0x162)](this[_0x3f7e2e(0x1b3)],_0x5132cd['id'])[_0x3f7e2e(0x176)]();return{'id':_0x3f7e2e(0x17a),'uiId':_0x3f7e2e(0x17a),'label':_0x3f7e2e(0x166),'type':_0x5132cd[_0x3f7e2e(0x156)],'content':_0x2919da[_0x3f7e2e(0x184)],'hidden':this[_0x3f7e2e(0x177)][_0x3f7e2e(0x155)](_0x3f7e2e(0x17a)),'version':_0x2919da[_0x3f7e2e(0x169)]?.[_0x3f7e2e(0x14f)],'sessionId':_0x2919da[_0x3f7e2e(0x169)]?.[_0x3f7e2e(0x1d2)]};}return{'id':_0x5132cd['id'],'uiId':_0x5132cd['id'],'label':_0x5132cd[_0x3f7e2e(0x169)]?.[_0x3f7e2e(0x1d1)]||_0x5132cd[_0x3f7e2e(0x149)]||_0x5132cd[_0x3f7e2e(0x146)]||_0x5132cd['id'],'type':_0x5132cd[_0x3f7e2e(0x156)],..._0x5132cd?.[_0x3f7e2e(0x169)]?.[_0x3f7e2e(0x161)]?{'resourceId':_0x5132cd[_0x3f7e2e(0x169)]?.[_0x3f7e2e(0x161)]}:{}};}[_0x5c939a(0x186)](){const _0x251470=_0x5c939a;return new Map(this[_0x251470(0x177)]);}[_0x5c939a(0x1cb)](_0x20fa1c){const _0x41bb14=_0x5c939a,_0x117c79=this[_0x41bb14(0x1b9)][_0x41bb14(0x154)](_0x20fa1c);_0x117c79?.[_0x41bb14(0x1b7)]||this[_0x41bb14(0x16d)](_0x20fa1c);}[_0x5c939a(0x190)](){const _0x4afc95=_0x5c939a;if(0x0===this[_0x4afc95(0x1b9)][_0x4afc95(0x179)])return;for(const _0x17106a of this[_0x4afc95(0x1b9)][_0x4afc95(0x19b)]())this[_0x4afc95(0x16d)](_0x17106a[_0x4afc95(0x150)]);const _0x562ee7=this[_0x4afc95(0x177)][_0x4afc95(0x154)](_0x4afc95(0x17a))||this[_0x4afc95(0x1b9)][_0x4afc95(0x154)](_0x4afc95(0x17a));_0x562ee7&&this[_0x4afc95(0x18f)]({..._0x562ee7,'isReadOnly':!0x0,'hidden':!0x0});}[_0x5c939a(0x1a8)](_0x576928){const _0x4948b1=_0x5c939a;for(const _0x232c20 of _0x576928[_0x4948b1(0x19b)]())this[_0x4948b1(0x180)](_0x232c20);this[_0x4948b1(0x190)](),this[_0x4948b1(0x1a4)](_0x4948b1(0x189),{'contextItems':Array[_0x4948b1(0x171)](this[_0x4948b1(0x186)]()[_0x4948b1(0x19b)]())});}[_0x5c939a(0x17f)](){const _0x3d187e=_0x5c939a;return this[_0x3d187e(0x1b9)][_0x3d187e(0x155)](_0x3d187e(0x17a));}[_0x5c939a(0x19f)](){const _0x446b5c=_0x5c939a;return this[_0x446b5c(0x1b9)][_0x446b5c(0x155)](_0x446b5c(0x15b));}[_0x5c939a(0x16e)](){const _0x440d51=_0x5c939a;return this[_0x440d51(0x177)][_0x440d51(0x155)](_0x440d51(0x17a));}static[_0x5c939a(0x188)](_0x596b68){const _0x3d042a=_0x5c939a;return Array[_0x3d042a(0x171)](_0x596b68[_0x3d042a(0x19b)]())[_0x3d042a(0x1bc)](_0x5379b4=>this[_0x3d042a(0x145)](_0x5379b4))[_0x3d042a(0x187)](_0x1a3ef0=>null!==_0x1a3ef0);}async[_0x5c939a(0x185)](_0x10cd8a,_0x3c9d89,_0x71626=_0x30e74c[_0x5c939a(0x1c0)]){const _0x46ad8c=_0x5c939a,_0x560ef3=_0x46ad8c(0x157)+_0x38225f();this[_0x46ad8c(0x175)](_0x560ef3);try{await Promise[_0x46ad8c(0x1c5)](_0x10cd8a[_0x46ad8c(0x1bc)](async _0x3d0fea=>{const _0x127381=_0x46ad8c,_0x18754=_0x127381(0x151)+_0x38225f(),_0x55be6d=_0x21133f(_0x3d0fea[_0x127381(0x149)]);try{this[_0x127381(0x18f)]({'type':_0x71626,'label':_0x3c9d89?.[_0x127381(0x1d1)]||_0x55be6d,'uiId':_0x18754,'resourceId':_0x3c9d89?.[_0x127381(0x161)]},!0x0);const _0x3a9269=this[_0x127381(0x1a5)][_0x127381(0x1b5)](this[_0x127381(0x1b3)],_0x3d0fea,_0x3c9d89);this[_0x127381(0x17c)][_0x127381(0x1ae)](_0x18754,_0x3a9269[_0x127381(0x1af)]);const {id:_0x362392}=await _0x3a9269[_0x127381(0x1a9)]();this[_0x127381(0x17c)][_0x127381(0x152)](_0x18754),this[_0x127381(0x16b)]({'type':_0x71626,'id':_0x362392,'label':_0x3c9d89?.[_0x127381(0x1d1)]||_0x55be6d,'uiId':_0x18754,'resourceId':_0x3c9d89?.[_0x127381(0x161)]},!0x1);}catch(_0x1e9632){this[_0x127381(0x17c)][_0x127381(0x152)](_0x18754);if(!_0x1e9632[_0x127381(0x163)][_0x127381(0x167)](_0x127381(0x14d))){const _0x1452c8=new _0x2d54ee(_0x127381(0x194),null,{'fileName':_0x55be6d});_0x1452c8[_0x127381(0x17e)]=_0x1e9632[_0x127381(0x17e)],this[_0x127381(0x1a4)](_0x127381(0x17d),{'error':_0x1452c8,'fileName':_0x55be6d});}this[_0x127381(0x16d)](_0x18754);}}));}finally{this[_0x46ad8c(0x1b6)](_0x560ef3);}}[_0x5c939a(0x1c7)](_0x12bc87){const _0x50166b=_0x5c939a;if(this[_0x50166b(0x17f)]())return;const _0x30b9d8={'type':_0x30e74c[_0x50166b(0x1bd)],'uiId':_0x50166b(0x17a),'label':_0x12bc87,'isReadOnly':this[_0x50166b(0x177)][_0x50166b(0x155)](_0x50166b(0x17a)),'hidden':this[_0x50166b(0x177)][_0x50166b(0x155)](_0x50166b(0x17a))};this[_0x50166b(0x18f)](_0x30b9d8);}async[_0x5c939a(0x18d)](_0x52dbf7,_0x4bb8a7,_0x236a34,_0xf0dd05){const _0x57300c=_0x5c939a,_0x4b648d=this[_0x57300c(0x1b9)][_0x57300c(0x154)](_0x57300c(0x17a));if(_0x4b648d&&_0x52dbf7){_0x4b648d[_0x57300c(0x15b)]=_0xf0dd05?_0xf0dd05[_0x57300c(0x1bc)](_0x3dff65=>({'start':_0x3dff65[_0x57300c(0x1aa)],'end':_0x3dff65[_0x57300c(0x1c9)]})):[];try{if(_0x4b648d[_0x57300c(0x14f)]===_0x4bb8a7)return;const {id:_0x491e53}=await this[_0x57300c(0x1a5)][_0x57300c(0x14e)](this[_0x57300c(0x1b3)],_0x52dbf7,{'version':_0x4bb8a7,'sessionId':_0x236a34})[_0x57300c(0x1a9)]();_0x4b648d['id']=_0x491e53,_0x4b648d[_0x57300c(0x184)]=_0x52dbf7,_0x4b648d[_0x57300c(0x14f)]=_0x4bb8a7,_0x4b648d[_0x57300c(0x1d2)]=_0x236a34;}catch(_0x7ee88e){const _0x36af7c=new _0x2d54ee(_0x57300c(0x1b4),null);_0x36af7c[_0x57300c(0x17e)]=_0x7ee88e[_0x57300c(0x17e)],this[_0x57300c(0x1a4)](_0x57300c(0x17d),{'error':_0x36af7c});}}}[_0x5c939a(0x1b8)](_0x114aed){const _0x31ac6c=_0x5c939a;this[_0x31ac6c(0x18f)]({'type':_0x30e74c[_0x31ac6c(0x18b)],'label':_0x114aed,'uiId':_0x31ac6c(0x15b),'content':_0x114aed});}[_0x5c939a(0x160)](){const _0x340d42=_0x5c939a;this[_0x340d42(0x16d)](_0x340d42(0x15b));}async[_0x5c939a(0x18a)](_0x244a15,_0x12ceaa){const _0x2951ce=_0x5c939a,_0x1cc16c=_0x2951ce(0x199)+_0x38225f();this[_0x2951ce(0x175)](_0x1cc16c);const _0x8bb0c=_0x2951ce(0x199)+_0x38225f();try{this[_0x2951ce(0x18f)]({'type':_0x30e74c[_0x2951ce(0x196)],'label':_0x12ceaa?.[_0x2951ce(0x1d1)]||_0x244a15,'uiId':_0x8bb0c,'resourceId':_0x12ceaa?.[_0x2951ce(0x161)]},!0x0);const _0x13af3d=this[_0x2951ce(0x1a5)][_0x2951ce(0x192)](this[_0x2951ce(0x1b3)],_0x244a15,_0x12ceaa);this[_0x2951ce(0x17c)][_0x2951ce(0x1ae)](_0x8bb0c,_0x13af3d[_0x2951ce(0x1af)]);const {id:_0x3fecce}=await _0x13af3d[_0x2951ce(0x1a9)]();this[_0x2951ce(0x17c)][_0x2951ce(0x152)](_0x8bb0c),this[_0x2951ce(0x16b)]({'type':_0x30e74c[_0x2951ce(0x196)],'id':_0x3fecce,'label':_0x12ceaa?.[_0x2951ce(0x1d1)]||_0x244a15,'uiId':_0x8bb0c,'resourceId':_0x12ceaa?.[_0x2951ce(0x161)]},!0x1);}catch(_0x125400){this[_0x2951ce(0x17c)][_0x2951ce(0x152)](_0x8bb0c),(_0x125400[_0x2951ce(0x163)][_0x2951ce(0x167)](_0x2951ce(0x14d))||this[_0x2951ce(0x1a4)](_0x2951ce(0x17d),{'error':new _0x2d54ee(_0x2951ce(0x1a0),this,{'url':_0x244a15,'originalError':_0x125400}),'url':_0x244a15}),this[_0x2951ce(0x16d)](_0x8bb0c));}finally{this[_0x2951ce(0x1b6)](_0x1cc16c);}}async[_0x5c939a(0x16a)](_0x197fe6,_0x5c0ed1,_0x40ebc7){const _0x5378a8=_0x5c939a,_0x20a7ad=this[_0x5378a8(0x16c)][_0x5378a8(0x15d)][_0x5378a8(0x1ac)](_0x5de7e5=>_0x5de7e5['id']===_0x197fe6);if(!_0x20a7ad)return this[_0x5378a8(0x1a4)](_0x5378a8(0x17d),{'error':new _0x2d54ee(_0x5378a8(0x1ca),this,{'sourceId':_0x197fe6}),'sourceId':_0x197fe6}),[];try{const _0x36e99c=(await _0x20a7ad[_0x5378a8(0x15e)](_0x5c0ed1))[_0x5378a8(0x1bc)](_0x4cff60=>{const _0x46b1e8=_0x5378a8,_0x1386e3=this[_0x46b1e8(0x18e)](_0x4cff60['id']);return{..._0x4cff60,'isInContext':_0x1386e3};});return _0x20a7ad[_0x5378a8(0x1c2)]=_0x36e99c,this[_0x5378a8(0x1a4)](_0x5378a8(0x183),{'sourceId':_0x197fe6,'source':_0x20a7ad,'resources':_0x36e99c,'uid':_0x40ebc7}),_0x36e99c;}catch(_0x4d4d9c){return this[_0x5378a8(0x1a4)](_0x5378a8(0x17d),{'error':new _0x2d54ee(_0x5378a8(0x168),this,{'sourceId':_0x197fe6,'originalError':_0x4d4d9c}),'sourceId':_0x197fe6,'sourceLabel':_0x20a7ad[_0x5378a8(0x1d1)]}),[];}}async[_0x5c939a(0x1be)](_0x110856,_0x1f97c4){const _0xdd5b64=_0x5c939a;if(this[_0xdd5b64(0x18e)](_0x1f97c4['id']))return;let _0x3b7e09=_0x1f97c4[_0xdd5b64(0x1d0)];if(!_0x3b7e09&&_0x110856[_0xdd5b64(0x15c)])try{_0x3b7e09=await _0x110856[_0xdd5b64(0x15c)](_0x1f97c4['id']);}catch(_0xd55493){return void this[_0xdd5b64(0x1a4)](_0xdd5b64(0x17d),{'error':new _0x2d54ee(_0xdd5b64(0x1ce),this,{'resourceId':_0x1f97c4['id'],'sourceId':_0x110856['id'],'originalError':_0xd55493}),'resourceId':_0x1f97c4['id'],'sourceId':_0x110856['id']});}if(_0x3b7e09)switch(_0x1f97c4[_0xdd5b64(0x156)]){case _0x30e74c[_0xdd5b64(0x196)]:if(_0xdd5b64(0x165)!=typeof _0x3b7e09)return void this[_0xdd5b64(0x1a4)](_0xdd5b64(0x17d),{'error':new _0x2d54ee(_0xdd5b64(0x1c8),this,{'resourceId':_0x1f97c4['id'],'sourceId':_0x110856['id'],'expectedType':_0xdd5b64(0x165),'actualType':typeof _0x3b7e09}),'resourceId':_0x1f97c4['id'],'sourceId':_0x110856['id']});await this[_0xdd5b64(0x18a)](_0x3b7e09,{'label':_0x1f97c4[_0xdd5b64(0x1d1)],'resourceId':_0x1f97c4['id']});break;case _0x30e74c[_0xdd5b64(0x1c0)]:if(!(_0x3b7e09 instanceof File))return void this[_0xdd5b64(0x1a4)](_0xdd5b64(0x17d),{'error':new _0x2d54ee(_0xdd5b64(0x1c8),this,{'resourceId':_0x1f97c4['id'],'sourceId':_0x110856['id'],'expectedType':_0xdd5b64(0x197),'actualType':typeof _0x3b7e09}),'resourceId':_0x1f97c4['id'],'sourceId':_0x110856['id']});await this[_0xdd5b64(0x185)]([_0x3b7e09],{'label':_0x1f97c4[_0xdd5b64(0x1d1)],'resourceId':_0x1f97c4['id']});break;case _0x30e74c[_0xdd5b64(0x1c1)]:if(_0xdd5b64(0x1b1)!=typeof _0x3b7e09||!(_0xdd5b64(0x184)in _0x3b7e09)||!(_0xdd5b64(0x156)in _0x3b7e09))return void this[_0xdd5b64(0x1a4)](_0xdd5b64(0x17d),{'error':new _0x2d54ee(_0xdd5b64(0x1c8),this,{'resourceId':_0x1f97c4['id'],'sourceId':_0x110856['id'],'expectedType':_0xdd5b64(0x148),'actualType':typeof _0x3b7e09}),'resourceId':_0x1f97c4['id'],'sourceId':_0x110856['id']});_0x3b7e09=AIChatContext[_0xdd5b64(0x14a)](_0x3b7e09,_0x1f97c4[_0xdd5b64(0x1d1)]),await this[_0xdd5b64(0x185)]([_0x3b7e09],{'label':_0x1f97c4[_0xdd5b64(0x1d1)],'resourceId':_0x1f97c4['id']},_0x30e74c[_0xdd5b64(0x1c1)]);break;default:this[_0xdd5b64(0x1a4)](_0xdd5b64(0x17d),{'error':new _0x2d54ee(_0xdd5b64(0x15a),this,{'resourceId':_0x1f97c4['id'],'sourceId':_0x110856['id'],'resourceType':_0x1f97c4[_0xdd5b64(0x156)]}),'resourceId':_0x1f97c4['id'],'sourceId':_0x110856['id']});}else this[_0xdd5b64(0x1a4)](_0xdd5b64(0x17d),{'error':new _0x2d54ee(_0xdd5b64(0x158),this,{'resourceId':_0x1f97c4['id'],'sourceId':_0x110856['id']}),'resourceId':_0x1f97c4['id'],'sourceId':_0x110856['id']});}static[_0x5c939a(0x14a)](_0x2f0dfb,_0x46b9c0){const _0x43d92a=_0x5c939a;switch(_0x2f0dfb[_0x43d92a(0x156)]){case _0x51d6ab[_0x43d92a(0x1bf)]:return new File([_0x2f0dfb[_0x43d92a(0x184)]],_0x46b9c0,{'type':_0x43d92a(0x14b)});case _0x51d6ab[_0x43d92a(0x1cf)]:return new File([_0x2f0dfb[_0x43d92a(0x184)]],_0x46b9c0,{'type':_0x43d92a(0x181)});default:return new File([_0x2f0dfb[_0x43d92a(0x184)]],_0x46b9c0,{'type':_0x43d92a(0x17b)});}}static[_0x5c939a(0x145)](_0x4c0531){const _0x4b2ae2=_0x5c939a;switch(_0x4c0531[_0x4b2ae2(0x156)]){case _0x30e74c[_0x4b2ae2(0x1c0)]:return{'type':_0x30e74c[_0x4b2ae2(0x1c0)],'id':_0x4c0531['id']};case _0x30e74c[_0x4b2ae2(0x196)]:return{'type':_0x30e74c[_0x4b2ae2(0x196)],'id':_0x4c0531['id']};case _0x30e74c[_0x4b2ae2(0x1bd)]:return{'type':_0x30e74c[_0x4b2ae2(0x1bd)],'id':_0x4c0531['id'],..._0x4c0531[_0x4b2ae2(0x15b)]?.[_0x4b2ae2(0x18c)]&&{'selection':_0x4c0531[_0x4b2ae2(0x15b)]}};case _0x30e74c[_0x4b2ae2(0x1c1)]:return{'type':_0x30e74c[_0x4b2ae2(0x1c0)],'id':_0x4c0531['id']};default:return null;}}[_0x5c939a(0x18f)](_0x2fecb7,_0x1d2490=!0x1){const _0x272b4e=_0x5c939a;if(this[_0x272b4e(0x1b9)][_0x272b4e(0x1ae)](_0x2fecb7[_0x272b4e(0x150)],_0x2fecb7),_0x2fecb7[_0x272b4e(0x1cd)]||this[_0x272b4e(0x1a4)](_0x272b4e(0x19c),{'contextItem':_0x2fecb7,'isLoading':_0x1d2490}),_0x272b4e(0x17a)===_0x2fecb7[_0x272b4e(0x150)]&&this[_0x272b4e(0x164)](),_0x2fecb7[_0x272b4e(0x161)]){const _0x24c549=this[_0x272b4e(0x193)](_0x2fecb7[_0x272b4e(0x161)]);_0x24c549&&_0x24c549[_0x272b4e(0x19e)](_0x236876=>{const _0x4a7980=_0x272b4e;this[_0x4a7980(0x1a1)](_0x236876,_0x2fecb7[_0x4a7980(0x161)],!0x0);});}}[_0x5c939a(0x16d)](_0x2b9ede){const _0x3c65db=_0x5c939a,_0x17186b=this[_0x3c65db(0x1b9)][_0x3c65db(0x154)](_0x2b9ede),_0x25d27c=this[_0x3c65db(0x17c)][_0x3c65db(0x154)](_0x2b9ede);if(_0x25d27c&&(_0x25d27c[_0x3c65db(0x174)](),this[_0x3c65db(0x17c)][_0x3c65db(0x152)](_0x2b9ede)),_0x17186b?.[_0x3c65db(0x161)]){const _0xc3d84c=this[_0x3c65db(0x193)](_0x17186b[_0x3c65db(0x161)]);_0xc3d84c&&_0xc3d84c[_0x3c65db(0x19e)](_0x53abce=>{const _0x5b14fa=_0x3c65db;this[_0x5b14fa(0x1a1)](_0x53abce,_0x17186b[_0x5b14fa(0x161)],!0x1);});}this[_0x3c65db(0x1b9)][_0x3c65db(0x152)](_0x2b9ede),this[_0x3c65db(0x1a4)](_0x3c65db(0x1b0),{'uiId':_0x2b9ede,'type':_0x17186b?.[_0x3c65db(0x156)]}),_0x3c65db(0x17a)===_0x2b9ede&&this[_0x3c65db(0x164)]();}[_0x5c939a(0x16b)](_0xcdf430,_0x54de16){const _0x5d08dd=_0x5c939a;if(this[_0x5d08dd(0x1b9)][_0x5d08dd(0x155)](_0xcdf430[_0x5d08dd(0x150)])&&(this[_0x5d08dd(0x1b9)][_0x5d08dd(0x1ae)](_0xcdf430[_0x5d08dd(0x150)],_0xcdf430),this[_0x5d08dd(0x1a4)](_0x5d08dd(0x1a6),{'contextItem':_0xcdf430,'isLoading':_0x54de16}),_0xcdf430[_0x5d08dd(0x161)])){const _0x11f597=this[_0x5d08dd(0x193)](_0xcdf430[_0x5d08dd(0x161)]);_0x11f597&&_0x11f597[_0x5d08dd(0x19e)](_0x4bd807=>{const _0x18e0c0=_0x5d08dd;this[_0x18e0c0(0x1a1)](_0x4bd807,_0xcdf430[_0x18e0c0(0x161)],!0x0);});}}[_0x5c939a(0x180)](_0x3f027e){const _0x204aad=_0x5c939a;this[_0x204aad(0x177)][_0x204aad(0x1ae)](_0x3f027e[_0x204aad(0x150)],_0x3f027e);}[_0x5c939a(0x1ab)](){const _0x52c068=_0x5c939a;this[_0x52c068(0x16c)]={'document':{'enabled':!0x1!==this[_0x52c068(0x173)]?.[_0x52c068(0x19d)]?.[_0x52c068(0x153)],'isHidden':!0x1},'urls':{'enabled':!0x1!==this[_0x52c068(0x173)]?.[_0x52c068(0x1b2)]?.[_0x52c068(0x153)]},'files':{'enabled':!0x1!==this[_0x52c068(0x173)]?.[_0x52c068(0x14c)]?.[_0x52c068(0x153)]},'sources':this[_0x52c068(0x1a2)]()},this[_0x52c068(0x1a4)](_0x52c068(0x1c3),{'options':this[_0x52c068(0x16c)]});}[_0x5c939a(0x1a2)](){const _0x54246a=_0x5c939a;return this[_0x54246a(0x173)]?.[_0x54246a(0x15d)]?.[_0x54246a(0x1bc)](_0x3173bd=>({..._0x3173bd,'resources':[]}))??[];}[_0x5c939a(0x164)](){const _0x4377f4=_0x5c939a,_0x5d2664=this[_0x4377f4(0x17f)]()||this[_0x4377f4(0x16e)]();this[_0x4377f4(0x16c)][_0x4377f4(0x19d)][_0x4377f4(0x170)]=_0x5d2664,this[_0x4377f4(0x1a4)](_0x4377f4(0x1c3),{'options':this[_0x4377f4(0x16c)]});}[_0x5c939a(0x18e)](_0x230b59){const _0x3376b6=_0x5c939a;for(const _0x67e407 of this[_0x3376b6(0x1b9)][_0x3376b6(0x19b)]())if(_0x67e407[_0x3376b6(0x161)]===_0x230b59)return!0x0;for(const _0x4a482d of this[_0x3376b6(0x177)][_0x3376b6(0x19b)]())if(_0x4a482d[_0x3376b6(0x161)]===_0x230b59)return!0x0;return!0x1;}[_0x5c939a(0x193)](_0x590acc){const _0x1b7158=_0x5c939a,_0x25a388=[];for(const _0x28230a of this[_0x1b7158(0x16c)][_0x1b7158(0x15d)]){_0x28230a[_0x1b7158(0x1c2)][_0x1b7158(0x1ac)](_0x54f688=>_0x54f688['id']===_0x590acc)&&_0x25a388[_0x1b7158(0x1c6)](_0x28230a['id']);}return 0x0===_0x25a388[_0x1b7158(0x18c)]?null:_0x25a388;}[_0x5c939a(0x1a1)](_0x165908,_0x56cc8c,_0x35a743){const _0x1decc5=_0x5c939a,_0x63066e=this[_0x1decc5(0x16c)][_0x1decc5(0x15d)][_0x1decc5(0x1ac)](_0x35e5dc=>_0x35e5dc['id']===_0x165908);if(!_0x63066e)return;const _0x423f03=_0x63066e[_0x1decc5(0x1c2)][_0x1decc5(0x1ac)](_0x132ea7=>_0x132ea7['id']===_0x56cc8c);_0x423f03&&(_0x423f03[_0x1decc5(0x1ad)]=_0x35a743,this[_0x1decc5(0x1a4)](_0x1decc5(0x16f),{'sourceId':_0x165908,'resourceId':_0x56cc8c,'isInContext':_0x35a743}));}[_0x5c939a(0x175)](_0x21507c){const _0xe84a3b=_0x5c939a;this[_0xe84a3b(0x1bb)][_0xe84a3b(0x1ae)](_0x21507c,!0x0),this[_0xe84a3b(0x1bb)][_0xe84a3b(0x179)]&&this[_0xe84a3b(0x1a4)](_0xe84a3b(0x147),{'isUploadInProgress':!0x0});}[_0x5c939a(0x1b6)](_0x552444){const _0x650d63=_0x5c939a;this[_0x650d63(0x1bb)][_0x650d63(0x152)](_0x552444),0x0===this[_0x650d63(0x1bb)][_0x650d63(0x179)]&&this[_0x650d63(0x1a4)](_0x650d63(0x147),{'isUploadInProgress':!0x1});}}
23
+ const _0x20f763=_0xdd66;(function(_0x125a9d,_0x232b69){const _0xfe7315=_0xdd66,_0x4bc08d=_0x125a9d();while(!![]){try{const _0x52c3ff=-parseInt(_0xfe7315(0x20b))/0x1*(-parseInt(_0xfe7315(0x21c))/0x2)+-parseInt(_0xfe7315(0x21b))/0x3*(parseInt(_0xfe7315(0x1ca))/0x4)+parseInt(_0xfe7315(0x1f6))/0x5*(-parseInt(_0xfe7315(0x1df))/0x6)+parseInt(_0xfe7315(0x1aa))/0x7*(parseInt(_0xfe7315(0x1a6))/0x8)+-parseInt(_0xfe7315(0x1cd))/0x9+parseInt(_0xfe7315(0x215))/0xa+parseInt(_0xfe7315(0x1a5))/0xb*(parseInt(_0xfe7315(0x1bd))/0xc);if(_0x52c3ff===_0x232b69)break;else _0x4bc08d['push'](_0x4bc08d['shift']());}catch(_0x5151b4){_0x4bc08d['push'](_0x4bc08d['shift']());}}}(_0x3608,0xa502b));function _0xdd66(_0x4974c1,_0x2d5e7b){const _0x3608a3=_0x3608();return _0xdd66=function(_0xdd66c6,_0xbad6c2){_0xdd66c6=_0xdd66c6-0x192;let _0x42d478=_0x3608a3[_0xdd66c6];return _0x42d478;},_0xdd66(_0x4974c1,_0x2d5e7b);}import{CKEditorError as _0x4e2aee,ObservableMixin as _0x36deb1,uid as _0x216130}from'ckeditor5/src/utils.js';import{AIContextItemType as _0x76a394,AIContextTextResourceType as _0x175f0d}from'../../aicore/model/aicontext.js';import{escape as _0x492ac8}from'es-toolkit/compat';export const AI_CONTEXT_MODEL_EVENT_NAMES=[_0x20f763(0x20c),_0x20f763(0x207),_0x20f763(0x209),_0x20f763(0x1c9),_0x20f763(0x1c0),_0x20f763(0x1d4),_0x20f763(0x1a3),_0x20f763(0x1b7),_0x20f763(0x1e6)];function _0x3608(){const _0x303a11=['isReadOnly','contextSent','8MlMLzz','addCurrentDocumentToContext','updateCurrentDocument','12058074cerEPR','_finishUploadOperation','isInContext','start','files','file-','document','addContextOptionsChanged','getPendingContextItems','abort','length','text/markdown','find','name','uploadFile','_config','filter','getSentContextItems','6942828OnqBXp','fetchDocument','string','_toggleAddCurrentDocumentOptionVisibility','addUrlToContext','removeFromContext','_addContextOptionsState','uploadProgressChanged','_startUploadOperation','_ongoingUploads','addToConversationContext','_removeContextItem','urls','text/plain','push','getId','object','_getCustomSourcesInitialState','getResources','FILE','map','url','_updateResourceInContextState','5JyNiYU','URL','data','_ongoingUploadOperations','size','getData','_finishContextItemLoading','values','isCurrentDocumentInContext','isHidden','uploadUrl','Current\x20document','hidden','resourceId','addResourceToContext','ai-chat-source-not-found','ai-chat-context-invalid-data','contextItemRemoved','resources','contextItemLoadingEnded','addFilesToContext','48249GnypHM','contextItemAdded','files-','forEach','clearPendingContextItems','get','_setAddContextOptionsDefaultState','url-','enabled','isCurrentDocumentInConversation','10962220gUOAzh','sources','init','end','addSelectionToContext','ai-request-aborted','1562262fizeUo','22nZJRDd','uploadDocument','populateFromMessage','TEXT','MARKDOWN','_ownerId','ai-chat-document-upload-failed','abortController','DOCUMENT','removeSelectionFromContext','content','ai-chat-source-resources-load-failed','ai-chat-resource-load-failed','selection','_pendingContextItems','uiId','attributes','_addContextItem','startsWith','_findSourceIdsByResourceId','object\x20with\x20content\x20and\x20type\x20properties','current-document','ai-chat-url-upload-failed','sourceResourcesLoaded','SELECTION','21632897pyguOC','8KnXPLJ','type','text/html','has','4345089owQPhU','_conversationContextItems','_createContextItemFromContent','from','sessionId','_addToConversationContextItem','stack','isSelectionInContext','_isResourceInContext','set','_connector','message','label','resourceStateChanged','_convertTextResourceToFile','all','ai-chat-resource-no-data','delete','getDocument','12npdNKv','mapContextItemsToRequestData','HTML','error','loadSourceResources','version','ai-chat-file-upload-failed','_mapContextItemToRequestData','ai-chat-context-unsupported-type','File','fire'];_0x3608=function(){return _0x303a11;};return _0x3608();}export class AIChatContext extends _0x36deb1(){[_0x20f763(0x1b4)];[_0x20f763(0x1dc)];[_0x20f763(0x221)];constructor({connector:_0x1c9df1,config:_0x4fec29,ownerId:_0x368d9f}){const _0x1f6487=_0x20f763;super(),this[_0x1f6487(0x1b4)]=_0x1c9df1,this[_0x1f6487(0x1dc)]=_0x4fec29,this[_0x1f6487(0x221)]=_0x368d9f;}[_0x20f763(0x217)](){const _0x24f335=_0x20f763;this[_0x24f335(0x19a)]=new Map(),this[_0x24f335(0x1ab)]=new Map(),this[_0x24f335(0x1e8)]=new Map(),this[_0x24f335(0x1f9)]=new Map(),this[_0x24f335(0x211)]();}[_0x20f763(0x1d5)](){const _0x314953=_0x20f763;return this[_0x314953(0x19a)];}async[_0x20f763(0x21e)](_0x15fabc){const _0x3845f8=_0x20f763,_0x341257=await this[_0x3845f8(0x1ac)](_0x15fabc);return this[_0x3845f8(0x1af)](_0x341257),_0x3845f8(0x1a1)===_0x341257[_0x3845f8(0x19b)]&&this[_0x3845f8(0x1e2)](),_0x341257;}async[_0x20f763(0x1ac)](_0x509ff0){const _0xb290f3=_0x20f763;if(_0x509ff0[_0xb290f3(0x1a7)]===_0x76a394[_0xb290f3(0x194)]){const _0x5a9993=await this[_0xb290f3(0x1b4)][_0xb290f3(0x1e0)](this[_0xb290f3(0x221)],_0x509ff0['id'])[_0xb290f3(0x1bc)]();return{'id':_0xb290f3(0x1a1),'uiId':_0xb290f3(0x1a1),'label':_0xb290f3(0x201),'type':_0x509ff0[_0xb290f3(0x1a7)],'content':_0x5a9993[_0xb290f3(0x196)],'hidden':this[_0xb290f3(0x1ab)][_0xb290f3(0x1a9)](_0xb290f3(0x1a1)),'version':_0x5a9993[_0xb290f3(0x19c)]?.[_0xb290f3(0x1c2)],'sessionId':_0x5a9993[_0xb290f3(0x19c)]?.[_0xb290f3(0x1ae)]};}return{'id':_0x509ff0['id'],'uiId':_0x509ff0['id'],'label':_0x509ff0[_0xb290f3(0x19c)]?.[_0xb290f3(0x1b6)]||_0x509ff0[_0xb290f3(0x1da)]||_0x509ff0[_0xb290f3(0x1f4)]||_0x509ff0['id'],'type':_0x509ff0[_0xb290f3(0x1a7)],..._0x509ff0?.[_0xb290f3(0x19c)]?.[_0xb290f3(0x203)]?{'resourceId':_0x509ff0[_0xb290f3(0x19c)]?.[_0xb290f3(0x203)]}:{}};}[_0x20f763(0x1de)](){const _0x47f563=_0x20f763;return new Map(this[_0x47f563(0x1ab)]);}[_0x20f763(0x1e4)](_0x5bcf13){const _0x5489c7=_0x20f763,_0x31ddd0=this[_0x5489c7(0x19a)][_0x5489c7(0x210)](_0x5bcf13);_0x31ddd0?.[_0x5489c7(0x1c8)]||this[_0x5489c7(0x1ea)](_0x5bcf13);}[_0x20f763(0x20f)](){const _0x298930=_0x20f763;if(0x0===this[_0x298930(0x19a)][_0x298930(0x1fa)])return;for(const _0x179099 of this[_0x298930(0x19a)][_0x298930(0x1fd)]())this[_0x298930(0x1ea)](_0x179099[_0x298930(0x19b)]);const _0x3bc52c=this[_0x298930(0x1ab)][_0x298930(0x210)](_0x298930(0x1a1))||this[_0x298930(0x19a)][_0x298930(0x210)](_0x298930(0x1a1));_0x3bc52c&&this[_0x298930(0x19d)]({..._0x3bc52c,'isReadOnly':!0x0,'hidden':!0x0});}[_0x20f763(0x1e9)](_0x4a1964){const _0x1046b8=_0x20f763;for(const _0x125004 of _0x4a1964[_0x1046b8(0x1fd)]())this[_0x1046b8(0x1af)](_0x125004);this[_0x1046b8(0x20f)](),this[_0x1046b8(0x1c7)](_0x1046b8(0x1c9),{'contextItems':Array[_0x1046b8(0x1ad)](this[_0x1046b8(0x1de)]()[_0x1046b8(0x1fd)]())});}[_0x20f763(0x1fe)](){const _0xb0bc83=_0x20f763;return this[_0xb0bc83(0x19a)][_0xb0bc83(0x1a9)](_0xb0bc83(0x1a1));}[_0x20f763(0x1b1)](){const _0x175c7d=_0x20f763;return this[_0x175c7d(0x19a)][_0x175c7d(0x1a9)](_0x175c7d(0x199));}[_0x20f763(0x214)](){const _0x439d28=_0x20f763;return this[_0x439d28(0x1ab)][_0x439d28(0x1a9)](_0x439d28(0x1a1));}static[_0x20f763(0x1be)](_0x4f5cfc){const _0x3d9790=_0x20f763;return Array[_0x3d9790(0x1ad)](_0x4f5cfc[_0x3d9790(0x1fd)]())[_0x3d9790(0x1f3)](_0x4dc6be=>this[_0x3d9790(0x1c4)](_0x4dc6be))[_0x3d9790(0x1dd)](_0x2f97fb=>null!==_0x2f97fb);}async[_0x20f763(0x20a)](_0x44abaf,_0xefb90e,_0x2c19da=_0x76a394[_0x20f763(0x1f2)]){const _0x5278ac=_0x20f763,_0x268683=_0x5278ac(0x20d)+_0x216130();this[_0x5278ac(0x1e7)](_0x268683);try{await Promise[_0x5278ac(0x1b9)](_0x44abaf[_0x5278ac(0x1f3)](async _0x74770d=>{const _0xd2fc99=_0x5278ac,_0x385534=_0xd2fc99(0x1d2)+_0x216130(),_0x1f6250=_0x492ac8(_0x74770d[_0xd2fc99(0x1da)]);try{this[_0xd2fc99(0x19d)]({'type':_0x2c19da,'label':_0xefb90e?.[_0xd2fc99(0x1b6)]||_0x1f6250,'uiId':_0x385534,'resourceId':_0xefb90e?.[_0xd2fc99(0x203)]},!0x0);const _0x5e131b=this[_0xd2fc99(0x1b4)][_0xd2fc99(0x1db)](this[_0xd2fc99(0x221)],_0x74770d,_0xefb90e);this[_0xd2fc99(0x1e8)][_0xd2fc99(0x1b3)](_0x385534,_0x5e131b[_0xd2fc99(0x193)]);const {id:_0x1fa9ba}=await _0x5e131b[_0xd2fc99(0x1ee)]();this[_0xd2fc99(0x1e8)][_0xd2fc99(0x1bb)](_0x385534),this[_0xd2fc99(0x1fc)]({'type':_0x2c19da,'id':_0x1fa9ba,'label':_0xefb90e?.[_0xd2fc99(0x1b6)]||_0x1f6250,'uiId':_0x385534,'resourceId':_0xefb90e?.[_0xd2fc99(0x203)]},!0x1);}catch(_0x2a7caf){this[_0xd2fc99(0x1e8)][_0xd2fc99(0x1bb)](_0x385534);if(!_0x2a7caf[_0xd2fc99(0x1b5)][_0xd2fc99(0x19e)](_0xd2fc99(0x21a))){const _0x5de56a=new _0x4e2aee(_0xd2fc99(0x1c3),null,{'fileName':_0x1f6250});_0x5de56a[_0xd2fc99(0x1b0)]=_0x2a7caf[_0xd2fc99(0x1b0)],this[_0xd2fc99(0x1c7)](_0xd2fc99(0x1c0),{'error':_0x5de56a,'fileName':_0x1f6250});}this[_0xd2fc99(0x1ea)](_0x385534);}}));}finally{this[_0x5278ac(0x1ce)](_0x268683);}}[_0x20f763(0x1cb)](_0x43cd40){const _0x7c690f=_0x20f763;if(this[_0x7c690f(0x1fe)]())return;const _0x5394cd={'type':_0x76a394[_0x7c690f(0x194)],'uiId':_0x7c690f(0x1a1),'label':_0x43cd40,'isReadOnly':this[_0x7c690f(0x1ab)][_0x7c690f(0x1a9)](_0x7c690f(0x1a1)),'hidden':this[_0x7c690f(0x1ab)][_0x7c690f(0x1a9)](_0x7c690f(0x1a1))};this[_0x7c690f(0x19d)](_0x5394cd);}async[_0x20f763(0x1cc)](_0x25df5e,_0x255743,_0x211035,_0x571a29){const _0x3d9e07=_0x20f763,_0x3c6e7f=this[_0x3d9e07(0x19a)][_0x3d9e07(0x210)](_0x3d9e07(0x1a1));if(_0x3c6e7f&&_0x25df5e){_0x3c6e7f[_0x3d9e07(0x199)]=_0x571a29?_0x571a29[_0x3d9e07(0x1f3)](_0x430b9a=>({'start':_0x430b9a[_0x3d9e07(0x1d0)],'end':_0x430b9a[_0x3d9e07(0x218)]})):[];try{if(_0x3c6e7f[_0x3d9e07(0x1c2)]===_0x255743)return;const {id:_0x43cab8}=await this[_0x3d9e07(0x1b4)][_0x3d9e07(0x21d)](this[_0x3d9e07(0x221)],_0x25df5e,{'version':_0x255743,'sessionId':_0x211035})[_0x3d9e07(0x1ee)]();_0x3c6e7f['id']=_0x43cab8,_0x3c6e7f[_0x3d9e07(0x196)]=_0x25df5e,_0x3c6e7f[_0x3d9e07(0x1c2)]=_0x255743,_0x3c6e7f[_0x3d9e07(0x1ae)]=_0x211035;}catch(_0x174f02){const _0x5d2cbc=new _0x4e2aee(_0x3d9e07(0x192),null);_0x5d2cbc[_0x3d9e07(0x1b0)]=_0x174f02[_0x3d9e07(0x1b0)],this[_0x3d9e07(0x1c7)](_0x3d9e07(0x1c0),{'error':_0x5d2cbc});}}}[_0x20f763(0x219)](_0x102b08){const _0x5e611d=_0x20f763;this[_0x5e611d(0x19d)]({'type':_0x76a394[_0x5e611d(0x1a4)],'label':_0x102b08,'uiId':_0x5e611d(0x199),'content':_0x102b08});}[_0x20f763(0x195)](){const _0x384fc1=_0x20f763;this[_0x384fc1(0x1ea)](_0x384fc1(0x199));}async[_0x20f763(0x1e3)](_0x5a9117,_0x5e21db){const _0x5a67c7=_0x20f763,_0x1c956f=_0x5a67c7(0x212)+_0x216130();this[_0x5a67c7(0x1e7)](_0x1c956f);const _0x59e731=_0x5a67c7(0x212)+_0x216130();try{this[_0x5a67c7(0x19d)]({'type':_0x76a394[_0x5a67c7(0x1f7)],'label':_0x5e21db?.[_0x5a67c7(0x1b6)]||_0x5a9117,'uiId':_0x59e731,'resourceId':_0x5e21db?.[_0x5a67c7(0x203)]},!0x0);const _0x10e939=this[_0x5a67c7(0x1b4)][_0x5a67c7(0x200)](this[_0x5a67c7(0x221)],_0x5a9117,_0x5e21db);this[_0x5a67c7(0x1e8)][_0x5a67c7(0x1b3)](_0x59e731,_0x10e939[_0x5a67c7(0x193)]);const {id:_0x4b9266}=await _0x10e939[_0x5a67c7(0x1ee)]();this[_0x5a67c7(0x1e8)][_0x5a67c7(0x1bb)](_0x59e731),this[_0x5a67c7(0x1fc)]({'type':_0x76a394[_0x5a67c7(0x1f7)],'id':_0x4b9266,'label':_0x5e21db?.[_0x5a67c7(0x1b6)]||_0x5a9117,'uiId':_0x59e731,'resourceId':_0x5e21db?.[_0x5a67c7(0x203)]},!0x1);}catch(_0x228724){this[_0x5a67c7(0x1e8)][_0x5a67c7(0x1bb)](_0x59e731),(_0x228724[_0x5a67c7(0x1b5)][_0x5a67c7(0x19e)](_0x5a67c7(0x21a))||this[_0x5a67c7(0x1c7)](_0x5a67c7(0x1c0),{'error':new _0x4e2aee(_0x5a67c7(0x1a2),this,{'url':_0x5a9117,'originalError':_0x228724}),'url':_0x5a9117}),this[_0x5a67c7(0x1ea)](_0x59e731));}finally{this[_0x5a67c7(0x1ce)](_0x1c956f);}}async[_0x20f763(0x1c1)](_0x4d5734,_0x446e0b,_0x4726e4){const _0x10e373=_0x20f763,_0x27fe96=this[_0x10e373(0x1e5)][_0x10e373(0x216)][_0x10e373(0x1d9)](_0x274b98=>_0x274b98['id']===_0x4d5734);if(!_0x27fe96)return this[_0x10e373(0x1c7)](_0x10e373(0x1c0),{'error':new _0x4e2aee(_0x10e373(0x205),this,{'sourceId':_0x4d5734}),'sourceId':_0x4d5734}),[];try{const _0x166905=(await _0x27fe96[_0x10e373(0x1f1)](_0x446e0b))[_0x10e373(0x1f3)](_0x17e3bc=>{const _0x45f637=_0x10e373,_0x3287bc=this[_0x45f637(0x1b2)](_0x17e3bc['id']);return{..._0x17e3bc,'isInContext':_0x3287bc};});return _0x27fe96[_0x10e373(0x208)]=_0x166905,this[_0x10e373(0x1c7)](_0x10e373(0x1a3),{'sourceId':_0x4d5734,'source':_0x27fe96,'resources':_0x166905,'uid':_0x4726e4}),_0x166905;}catch(_0x16c917){return this[_0x10e373(0x1c7)](_0x10e373(0x1c0),{'error':new _0x4e2aee(_0x10e373(0x197),this,{'sourceId':_0x4d5734,'originalError':_0x16c917}),'sourceId':_0x4d5734,'sourceLabel':_0x27fe96[_0x10e373(0x1b6)]}),[];}}async[_0x20f763(0x204)](_0x1b0b34,_0x54c9eb){const _0x24bdc9=_0x20f763;if(this[_0x24bdc9(0x1b2)](_0x54c9eb['id']))return;let _0x4e9d03=_0x54c9eb[_0x24bdc9(0x1f8)];if(!_0x4e9d03&&_0x1b0b34[_0x24bdc9(0x1fb)])try{_0x4e9d03=await _0x1b0b34[_0x24bdc9(0x1fb)](_0x54c9eb['id']);}catch(_0x2ee2a3){return void this[_0x24bdc9(0x1c7)](_0x24bdc9(0x1c0),{'error':new _0x4e2aee(_0x24bdc9(0x198),this,{'resourceId':_0x54c9eb['id'],'sourceId':_0x1b0b34['id'],'originalError':_0x2ee2a3}),'resourceId':_0x54c9eb['id'],'sourceId':_0x1b0b34['id']});}if(_0x4e9d03)switch(_0x54c9eb[_0x24bdc9(0x1a7)]){case _0x76a394[_0x24bdc9(0x1f7)]:if(_0x24bdc9(0x1e1)!=typeof _0x4e9d03)return void this[_0x24bdc9(0x1c7)](_0x24bdc9(0x1c0),{'error':new _0x4e2aee(_0x24bdc9(0x206),this,{'resourceId':_0x54c9eb['id'],'sourceId':_0x1b0b34['id'],'expectedType':_0x24bdc9(0x1e1),'actualType':typeof _0x4e9d03}),'resourceId':_0x54c9eb['id'],'sourceId':_0x1b0b34['id']});await this[_0x24bdc9(0x1e3)](_0x4e9d03,{'label':_0x54c9eb[_0x24bdc9(0x1b6)],'resourceId':_0x54c9eb['id']});break;case _0x76a394[_0x24bdc9(0x1f2)]:if(!(_0x4e9d03 instanceof File))return void this[_0x24bdc9(0x1c7)](_0x24bdc9(0x1c0),{'error':new _0x4e2aee(_0x24bdc9(0x206),this,{'resourceId':_0x54c9eb['id'],'sourceId':_0x1b0b34['id'],'expectedType':_0x24bdc9(0x1c6),'actualType':typeof _0x4e9d03}),'resourceId':_0x54c9eb['id'],'sourceId':_0x1b0b34['id']});await this[_0x24bdc9(0x20a)]([_0x4e9d03],{'label':_0x54c9eb[_0x24bdc9(0x1b6)],'resourceId':_0x54c9eb['id']});break;case _0x76a394[_0x24bdc9(0x21f)]:if(_0x24bdc9(0x1ef)!=typeof _0x4e9d03||!(_0x24bdc9(0x196)in _0x4e9d03)||!(_0x24bdc9(0x1a7)in _0x4e9d03))return void this[_0x24bdc9(0x1c7)](_0x24bdc9(0x1c0),{'error':new _0x4e2aee(_0x24bdc9(0x206),this,{'resourceId':_0x54c9eb['id'],'sourceId':_0x1b0b34['id'],'expectedType':_0x24bdc9(0x1a0),'actualType':typeof _0x4e9d03}),'resourceId':_0x54c9eb['id'],'sourceId':_0x1b0b34['id']});_0x4e9d03=AIChatContext[_0x24bdc9(0x1b8)](_0x4e9d03,_0x54c9eb[_0x24bdc9(0x1b6)]),await this[_0x24bdc9(0x20a)]([_0x4e9d03],{'label':_0x54c9eb[_0x24bdc9(0x1b6)],'resourceId':_0x54c9eb['id']},_0x76a394[_0x24bdc9(0x21f)]);break;default:this[_0x24bdc9(0x1c7)](_0x24bdc9(0x1c0),{'error':new _0x4e2aee(_0x24bdc9(0x1c5),this,{'resourceId':_0x54c9eb['id'],'sourceId':_0x1b0b34['id'],'resourceType':_0x54c9eb[_0x24bdc9(0x1a7)]}),'resourceId':_0x54c9eb['id'],'sourceId':_0x1b0b34['id']});}else this[_0x24bdc9(0x1c7)](_0x24bdc9(0x1c0),{'error':new _0x4e2aee(_0x24bdc9(0x1ba),this,{'resourceId':_0x54c9eb['id'],'sourceId':_0x1b0b34['id']}),'resourceId':_0x54c9eb['id'],'sourceId':_0x1b0b34['id']});}static[_0x20f763(0x1b8)](_0xf02425,_0x43487e){const _0xcdb80b=_0x20f763;switch(_0xf02425[_0xcdb80b(0x1a7)]){case _0x175f0d[_0xcdb80b(0x220)]:return new File([_0xf02425[_0xcdb80b(0x196)]],_0x43487e,{'type':_0xcdb80b(0x1d8)});case _0x175f0d[_0xcdb80b(0x1bf)]:return new File([_0xf02425[_0xcdb80b(0x196)]],_0x43487e,{'type':_0xcdb80b(0x1a8)});default:return new File([_0xf02425[_0xcdb80b(0x196)]],_0x43487e,{'type':_0xcdb80b(0x1ec)});}}static[_0x20f763(0x1c4)](_0x600f1c){const _0x5d6cc9=_0x20f763;switch(_0x600f1c[_0x5d6cc9(0x1a7)]){case _0x76a394[_0x5d6cc9(0x1f2)]:return{'type':_0x76a394[_0x5d6cc9(0x1f2)],'id':_0x600f1c['id']};case _0x76a394[_0x5d6cc9(0x1f7)]:return{'type':_0x76a394[_0x5d6cc9(0x1f7)],'id':_0x600f1c['id']};case _0x76a394[_0x5d6cc9(0x194)]:return{'type':_0x76a394[_0x5d6cc9(0x194)],'id':_0x600f1c['id'],..._0x600f1c[_0x5d6cc9(0x199)]?.[_0x5d6cc9(0x1d7)]&&{'selection':_0x600f1c[_0x5d6cc9(0x199)]}};case _0x76a394[_0x5d6cc9(0x21f)]:return{'type':_0x76a394[_0x5d6cc9(0x1f2)],'id':_0x600f1c['id']};default:return null;}}[_0x20f763(0x19d)](_0x4682c6,_0x423a77=!0x1){const _0x111ec2=_0x20f763;if(this[_0x111ec2(0x19a)][_0x111ec2(0x1b3)](_0x4682c6[_0x111ec2(0x19b)],_0x4682c6),_0x4682c6[_0x111ec2(0x202)]||this[_0x111ec2(0x1c7)](_0x111ec2(0x20c),{'contextItem':_0x4682c6,'isLoading':_0x423a77}),_0x111ec2(0x1a1)===_0x4682c6[_0x111ec2(0x19b)]&&this[_0x111ec2(0x1e2)](),_0x4682c6[_0x111ec2(0x203)]){const _0x5f3588=this[_0x111ec2(0x19f)](_0x4682c6[_0x111ec2(0x203)]);_0x5f3588&&_0x5f3588[_0x111ec2(0x20e)](_0x86aa10=>{const _0x212883=_0x111ec2;this[_0x212883(0x1f5)](_0x86aa10,_0x4682c6[_0x212883(0x203)],!0x0);});}}[_0x20f763(0x1ea)](_0x504920){const _0xc54fa9=_0x20f763,_0x504247=this[_0xc54fa9(0x19a)][_0xc54fa9(0x210)](_0x504920),_0x5c3426=this[_0xc54fa9(0x1e8)][_0xc54fa9(0x210)](_0x504920);if(_0x5c3426&&(_0x5c3426[_0xc54fa9(0x1d6)](),this[_0xc54fa9(0x1e8)][_0xc54fa9(0x1bb)](_0x504920)),_0x504247?.[_0xc54fa9(0x203)]){const _0x5845f9=this[_0xc54fa9(0x19f)](_0x504247[_0xc54fa9(0x203)]);_0x5845f9&&_0x5845f9[_0xc54fa9(0x20e)](_0x180369=>{const _0xa41336=_0xc54fa9;this[_0xa41336(0x1f5)](_0x180369,_0x504247[_0xa41336(0x203)],!0x1);});}this[_0xc54fa9(0x19a)][_0xc54fa9(0x1bb)](_0x504920),this[_0xc54fa9(0x1c7)](_0xc54fa9(0x207),{'uiId':_0x504920,'type':_0x504247?.[_0xc54fa9(0x1a7)]}),_0xc54fa9(0x1a1)===_0x504920&&this[_0xc54fa9(0x1e2)]();}[_0x20f763(0x1fc)](_0x19b54e,_0x5c9338){const _0x18a547=_0x20f763;if(this[_0x18a547(0x19a)][_0x18a547(0x1a9)](_0x19b54e[_0x18a547(0x19b)])&&(this[_0x18a547(0x19a)][_0x18a547(0x1b3)](_0x19b54e[_0x18a547(0x19b)],_0x19b54e),this[_0x18a547(0x1c7)](_0x18a547(0x209),{'contextItem':_0x19b54e,'isLoading':_0x5c9338}),_0x19b54e[_0x18a547(0x203)])){const _0x4e3372=this[_0x18a547(0x19f)](_0x19b54e[_0x18a547(0x203)]);_0x4e3372&&_0x4e3372[_0x18a547(0x20e)](_0x1effc8=>{const _0x367473=_0x18a547;this[_0x367473(0x1f5)](_0x1effc8,_0x19b54e[_0x367473(0x203)],!0x0);});}}[_0x20f763(0x1af)](_0x4cf319){const _0x2c5cfb=_0x20f763;this[_0x2c5cfb(0x1ab)][_0x2c5cfb(0x1b3)](_0x4cf319[_0x2c5cfb(0x19b)],_0x4cf319);}[_0x20f763(0x211)](){const _0x3c8e16=_0x20f763;this[_0x3c8e16(0x1e5)]={'document':{'enabled':!0x1!==this[_0x3c8e16(0x1dc)]?.[_0x3c8e16(0x1d3)]?.[_0x3c8e16(0x213)],'isHidden':!0x1},'urls':{'enabled':!0x1!==this[_0x3c8e16(0x1dc)]?.[_0x3c8e16(0x1eb)]?.[_0x3c8e16(0x213)]},'files':{'enabled':!0x1!==this[_0x3c8e16(0x1dc)]?.[_0x3c8e16(0x1d1)]?.[_0x3c8e16(0x213)]},'sources':this[_0x3c8e16(0x1f0)]()},this[_0x3c8e16(0x1c7)](_0x3c8e16(0x1d4),{'options':this[_0x3c8e16(0x1e5)]});}[_0x20f763(0x1f0)](){const _0xe35ae2=_0x20f763;return this[_0xe35ae2(0x1dc)]?.[_0xe35ae2(0x216)]?.[_0xe35ae2(0x1f3)](_0x234ee4=>({..._0x234ee4,'resources':[]}))??[];}[_0x20f763(0x1e2)](){const _0x223430=_0x20f763,_0xe7fd03=this[_0x223430(0x1fe)]()||this[_0x223430(0x214)]();this[_0x223430(0x1e5)][_0x223430(0x1d3)][_0x223430(0x1ff)]=_0xe7fd03,this[_0x223430(0x1c7)](_0x223430(0x1d4),{'options':this[_0x223430(0x1e5)]});}[_0x20f763(0x1b2)](_0x4a0f8c){const _0x311f65=_0x20f763;for(const _0x4201b0 of this[_0x311f65(0x19a)][_0x311f65(0x1fd)]())if(_0x4201b0[_0x311f65(0x203)]===_0x4a0f8c)return!0x0;for(const _0x4059f3 of this[_0x311f65(0x1ab)][_0x311f65(0x1fd)]())if(_0x4059f3[_0x311f65(0x203)]===_0x4a0f8c)return!0x0;return!0x1;}[_0x20f763(0x19f)](_0x23cad8){const _0x62ce04=_0x20f763,_0x3edafd=[];for(const _0x1469e9 of this[_0x62ce04(0x1e5)][_0x62ce04(0x216)]){_0x1469e9[_0x62ce04(0x208)][_0x62ce04(0x1d9)](_0x1fcf54=>_0x1fcf54['id']===_0x23cad8)&&_0x3edafd[_0x62ce04(0x1ed)](_0x1469e9['id']);}return 0x0===_0x3edafd[_0x62ce04(0x1d7)]?null:_0x3edafd;}[_0x20f763(0x1f5)](_0x2a3d5a,_0x71a2c4,_0x28d450){const _0x518651=_0x20f763,_0x37ea38=this[_0x518651(0x1e5)][_0x518651(0x216)][_0x518651(0x1d9)](_0x44c15e=>_0x44c15e['id']===_0x2a3d5a);if(!_0x37ea38)return;const _0x3aa023=_0x37ea38[_0x518651(0x208)][_0x518651(0x1d9)](_0x4f44e8=>_0x4f44e8['id']===_0x71a2c4);_0x3aa023&&(_0x3aa023[_0x518651(0x1cf)]=_0x28d450,this[_0x518651(0x1c7)](_0x518651(0x1b7),{'sourceId':_0x2a3d5a,'resourceId':_0x71a2c4,'isInContext':_0x28d450}));}[_0x20f763(0x1e7)](_0xddc8b){const _0x187bc2=_0x20f763;this[_0x187bc2(0x1f9)][_0x187bc2(0x1b3)](_0xddc8b,!0x0),this[_0x187bc2(0x1f9)][_0x187bc2(0x1fa)]&&this[_0x187bc2(0x1c7)](_0x187bc2(0x1e6),{'isUploadInProgress':!0x0});}[_0x20f763(0x1ce)](_0x2ef94d){const _0x3f949b=_0x20f763;this[_0x3f949b(0x1f9)][_0x3f949b(0x1bb)](_0x2ef94d),0x0===this[_0x3f949b(0x1f9)][_0x3f949b(0x1fa)]&&this[_0x3f949b(0x1c7)](_0x3f949b(0x1e6),{'isUploadInProgress':!0x1});}}
@@ -16,9 +16,7 @@ import { AIChatInteraction } from './aichatinteraction.js';
16
16
  import { type AIQuickActionRequestData } from '../../aiquickactions/aiquickactions.js';
17
17
  declare const AIChatConversation_base: {
18
18
  new (): import("ckeditor5/src/utils.js").Emitter;
19
- prototype: import("ckeditor5/src/utils.js").Emitter; /**
20
- * The current interaction in the conversation. Set and unset by {@link #handleUserInteraction}.
21
- */
19
+ prototype: import("ckeditor5/src/utils.js").Emitter;
22
20
  };
23
21
  /**
24
22
  * Represents a conversation between the user and the AI endpoint on top of the
@@ -265,6 +263,6 @@ export type AIChatConversationOptions = {
265
263
  getEditor?: () => Editor;
266
264
  conversationId: string;
267
265
  group: string;
268
- defaultModelId?: string;
266
+ selectedModelId?: string;
269
267
  };
270
268
  export {};
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x55c61c=_0x38d4;(function(_0x336f32,_0x304558){const _0x15a0e6=_0x38d4,_0x3ad43e=_0x336f32();while(!![]){try{const _0x4c8fd8=-parseInt(_0x15a0e6(0x109))/0x1+-parseInt(_0x15a0e6(0xf3))/0x2+-parseInt(_0x15a0e6(0x13a))/0x3*(-parseInt(_0x15a0e6(0x102))/0x4)+-parseInt(_0x15a0e6(0x152))/0x5+parseInt(_0x15a0e6(0x161))/0x6*(parseInt(_0x15a0e6(0x138))/0x7)+-parseInt(_0x15a0e6(0xff))/0x8*(parseInt(_0x15a0e6(0x13f))/0x9)+-parseInt(_0x15a0e6(0x154))/0xa*(-parseInt(_0x15a0e6(0x11a))/0xb);if(_0x4c8fd8===_0x304558)break;else _0x3ad43e['push'](_0x3ad43e['shift']());}catch(_0x4cc1ab){_0x3ad43e['push'](_0x3ad43e['shift']());}}}(_0x7fe2,0x5343b));import{CKEditorError as _0x4aff0e,EmitterMixin as _0x4a8474}from'ckeditor5/src/utils.js';function _0x7fe2(){const _0xa2008e=['defaultModelId','ai-chat-conversation-set-model-null','isStarted','addSelectionToContext','start','fire','fetchConversation','model','toLowerCase','ai-chat-conversation-init-from-id-failed','attributes','1881435RoqszN','hasOwn','12652330BlZyZN','ai-chat-conversation-set-model-not-available','text-delta','push','updateCurrentDocumentInContext','webSearch','getDefault','assistant','ai-chat-handle-user-conversation-not-initialized','loadSourceResources','chatContext','addFilesToContext','createReply','1755060GVILVc','indexOf','getMessages','removeSelectionFromContext','text','988030OAhBgv','removeInteraction','ai-chat-conversation-start-failed','contextItems','selectedModel','modification-delta','isSelectionInContext','getInteraction','currentInteraction','stop','addCurrentDocumentToContext','_extractContextItems','8KDnvVp','user','currentReply','8fezBIE','error','ai-chat-conversation-init-failed','handleUserInteraction','type','isAvailable','modelSelected','596889dQyyfo','quickActionData','startConversation','group','load','find','splice','createInteraction','conversationId','connector','addResourceToContext','content','isCurrentDocumentInContext','message','fetchConversationMessages','init','setModel','11atwMxD','length','options','getAll','updateCurrentDocument','title','sessionId','stack','getCurrentDocumentContext','addUrlToContext','toggleReasoning','getDocumentContext','removeFromContext','_processMessagesToInteractions','getEditor','ai-chat-conversation-start-no-model-selected','interactions','toggleWebSearch','reset','addToConversationContext','lastInteraction','interactionCreated','setConversationTitle','conversationStarted','appendContent','chatCapabilities','isCurrentDocumentInConversation','delegate','capabilities','getConversation','14pSxVdT','destroy','900006kcBbnt','prompt','getCapabilitiesConfig','reasoning','chatModels','5778135MNIzue','conversationInitialized','set','ai-chat-conversation-already-started','ai-chat-handle-user-interaction-already-in-progress','populateFromMessage','getPendingContextItems','role'];_0x7fe2=function(){return _0xa2008e;};return _0x7fe2();}import{AI_MODEL_EVENT_NAMES as _0x42a1b0}from'../../aicore/model/aiinteraction.js';import{AIChatContext as _0x276658,AI_CONTEXT_MODEL_EVENT_NAMES as _0x437e02}from'./aichatcontext.js';import{AICapabilities as _0x38c3d8,CAPABILITIES_MODEL_EVENT_NAMES as _0x3c7664}from'../../aicore/model/aicapabilities.js';import{AIChatInteraction as _0x22984b}from'./aichatinteraction.js';function _0x38d4(_0x208a92,_0x57cef7){const _0x7fe273=_0x7fe2();return _0x38d4=function(_0x38d455,_0xbae5d8){_0x38d455=_0x38d455-0xef;let _0x143024=_0x7fe273[_0x38d455];return _0x143024;},_0x38d4(_0x208a92,_0x57cef7);}export class AIChatConversation extends _0x4a8474(){['id'];[_0x55c61c(0x149)]=!0x1;[_0x55c61c(0x12a)]=[];[_0x55c61c(0xfb)];[_0x55c61c(0xf7)];[_0x55c61c(0x112)];[_0x55c61c(0x11c)];constructor(_0x307a52){const _0x41e876=_0x55c61c;super(),this[_0x41e876(0x11c)]=_0x307a52,this[_0x41e876(0x112)]=_0x307a52[_0x41e876(0x112)],this[_0x41e876(0x13e)]=_0x307a52[_0x41e876(0x13e)],this['id']=_0x307a52[_0x41e876(0x111)];}async[_0x55c61c(0x118)](_0x1851c5){const _0x48e799=_0x55c61c;try{this[_0x48e799(0x15e)]=new _0x276658({'connector':this[_0x48e799(0x112)],'config':_0x1851c5,'ownerId':this['id']}),this[_0x48e799(0x15e)][_0x48e799(0x135)](..._0x437e02)['to'](this),this[_0x48e799(0x15e)][_0x48e799(0x118)](),this[_0x48e799(0x133)]=new _0x38c3d8(),this[_0x48e799(0x133)][_0x48e799(0x135)](..._0x3c7664)['to'](this),this[_0x48e799(0x133)][_0x48e799(0x118)]();const _0x49b529=await this[_0x48e799(0x13e)][_0x48e799(0x11d)]();this[_0x48e799(0x14c)](_0x48e799(0x140),{'availableModels':_0x49b529});const _0x1402d1=await this[_0x48e799(0x13e)][_0x48e799(0x15a)](this[_0x48e799(0x11c)][_0x48e799(0x147)]);_0x1402d1&&await this[_0x48e799(0x119)](_0x1402d1);}catch(_0x33c97c){const _0x2bdcf8=new _0x4aff0e(_0x48e799(0x104),null,{'message':_0x33c97c[_0x48e799(0x116)]});_0x2bdcf8[_0x48e799(0x121)]=_0x33c97c[_0x48e799(0x121)],this[_0x48e799(0x14c)](_0x48e799(0x103),{'error':_0x2bdcf8});}}async[_0x55c61c(0x14b)](){const _0xdbdd54=_0x55c61c;if(this[_0xdbdd54(0x149)])throw new _0x4aff0e(_0xdbdd54(0x142),null,{'conversation':this});if(!this[_0xdbdd54(0xf7)])throw new _0x4aff0e(_0xdbdd54(0x129),null,{'conversation':this});try{const {id:_0x44f055}=await this[_0xdbdd54(0x112)][_0xdbdd54(0x10b)](this['id'],this[_0xdbdd54(0x11c)][_0xdbdd54(0x10c)])[_0xdbdd54(0x137)]();this['id']=_0x44f055,this[_0xdbdd54(0x149)]=!0x0,this[_0xdbdd54(0x14c)](_0xdbdd54(0x131),{'conversationId':this['id'],'selectedModel':this[_0xdbdd54(0xf7)]});}catch(_0x1f8df0){const _0x5112d3=new _0x4aff0e(_0xdbdd54(0xf5),null,{'message':_0x1f8df0[_0xdbdd54(0x116)]});_0x5112d3[_0xdbdd54(0x121)]=_0x1f8df0[_0xdbdd54(0x121)],this[_0xdbdd54(0x14c)](_0xdbdd54(0x103),{'error':_0x5112d3});}}async[_0x55c61c(0x10d)](_0x4adb70,_0x5709cd){const _0x416f1e=_0x55c61c;try{const _0x23a9d8=await this[_0x416f1e(0x112)][_0x416f1e(0x14d)](_0x4adb70)[_0x416f1e(0x137)](),_0x283815=await this[_0x416f1e(0x112)][_0x416f1e(0x117)](_0x4adb70)[_0x416f1e(0xf0)](),_0x4e0bc9=_0x283815[0x0][_0x416f1e(0x14e)];this[_0x416f1e(0x149)]=!0x0,this['id']=_0x23a9d8['id'],_0x416f1e(0x11f)in _0x23a9d8?this[_0x416f1e(0x14c)](_0x416f1e(0x130),_0x23a9d8[_0x416f1e(0x11f)],!0x0):this[_0x416f1e(0x14c)](_0x416f1e(0x130),'',!0x0);const _0x1b6163=(await this[_0x416f1e(0x13e)][_0x416f1e(0x11d)]())[_0x416f1e(0x10e)](_0x51604d=>_0x51604d['id'][_0x416f1e(0x14f)]()===_0x4e0bc9[_0x416f1e(0x14f)]());return this[_0x416f1e(0xf7)]=_0x1b6163,this[_0x416f1e(0x14c)](_0x416f1e(0x108),{'selectedModel':_0x1b6163,'isDisabled':!0x0}),await this[_0x416f1e(0x127)](_0x283815,_0x5709cd,_0x4e0bc9),this[_0x416f1e(0xfb)]=void 0x0,this;}catch(_0x898404){const _0x1b7276=new _0x4aff0e(_0x416f1e(0x150),null,{'message':_0x898404[_0x416f1e(0x116)],'conversationId':_0x4adb70});throw _0x1b7276[_0x416f1e(0x121)]=_0x898404[_0x416f1e(0x121)],this[_0x416f1e(0x14c)](_0x416f1e(0x103),{'error':_0x1b7276}),_0x1b7276;}}async[_0x55c61c(0x127)](_0x277442,_0x4fa7c,_0x585cdd){const _0x54357d=_0x55c61c;let _0x49cbd9;for(const _0x4d8b87 of _0x277442)if(_0x54357d(0x100)===_0x4d8b87[_0x54357d(0x146)]){const _0x6e45e4=await this[_0x54357d(0xfe)](_0x4d8b87),_0x5bcfc8={'isReasoningEnabled':Object[_0x54357d(0x153)](_0x4d8b87[_0x54357d(0x136)],_0x54357d(0x13d)),'isWebSearchEnabled':Object[_0x54357d(0x153)](_0x4d8b87[_0x54357d(0x136)],_0x54357d(0x159))};_0x49cbd9=this[_0x54357d(0x110)]({'userMessage':_0x4d8b87[_0x54357d(0x13b)],'contextItems':_0x6e45e4,'capabilities':_0x5bcfc8,'modelId':_0x585cdd,'quickActionData':_0x4d8b87[_0x54357d(0x151)]?.[_0x54357d(0x10a)]}),this[_0x54357d(0xfb)]=_0x49cbd9,this[_0x54357d(0x15e)][_0x54357d(0x12d)](this[_0x54357d(0xfb)][_0x54357d(0xf6)]);}else{if(_0x54357d(0x15b)===_0x4d8b87[_0x54357d(0x146)]&&_0x49cbd9)for(const _0x28f2bf of _0x4d8b87[_0x54357d(0x114)]){const _0x21d10e=_0x54357d(0xf2)===_0x28f2bf[_0x54357d(0x106)]?_0x54357d(0x156):_0x54357d(0xf8),_0x21f9be=_0x49cbd9[_0x54357d(0x125)]()?.[_0x54357d(0x120)]!==_0x4fa7c;_0x49cbd9[_0x54357d(0x101)]=_0x49cbd9[_0x54357d(0x160)]({'type':_0x21d10e,'isDone':!0x0,'interactionId':_0x49cbd9['id'],'areActionsDisabled':_0x21f9be}),_0x49cbd9[_0x54357d(0x101)][_0x54357d(0x132)](_0x28f2bf[_0x54357d(0x114)]);}}}async[_0x55c61c(0xfe)](_0x54cdb3){const _0x238d32=_0x55c61c,_0x2e6e6c=new Map();if(!_0x54cdb3[_0x238d32(0x114)])return _0x2e6e6c;for(const _0x487003 of _0x54cdb3[_0x238d32(0x114)]){const _0x2c7508=await this[_0x238d32(0x15e)][_0x238d32(0x144)](_0x487003);_0x2c7508&&_0x2e6e6c[_0x238d32(0x141)](_0x2c7508['id'],_0x2c7508);}return _0x2e6e6c;}async[_0x55c61c(0x105)]({userMessage:_0x8c4217,quickActionData:_0xe95160}){const _0x123d19=_0x55c61c;if(!this[_0x123d19(0x149)])throw new _0x4aff0e(_0x123d19(0x15c),null,{'conversation':this});if(this[_0x123d19(0xfb)])throw new _0x4aff0e(_0x123d19(0x143),null,{'conversation':this});try{const _0x11a840=this[_0x123d19(0x15e)][_0x123d19(0x145)](),_0x2c1edd=this[_0x123d19(0x133)][_0x123d19(0x13c)](),_0x1106a3=this[_0x123d19(0xf7)]['id'];this[_0x123d19(0xfb)]=this[_0x123d19(0x110)]({'userMessage':_0x8c4217,'contextItems':_0x11a840,'capabilities':_0x2c1edd,'modelId':_0x1106a3,'quickActionData':_0xe95160}),await this[_0x123d19(0xfb)][_0x123d19(0x14b)](),this[_0x123d19(0x15e)][_0x123d19(0x12d)](this[_0x123d19(0xfb)][_0x123d19(0xf6)]);}catch(_0x4235a5){this[_0x123d19(0x14c)](_0x123d19(0x103),{'interactionId':this[_0x123d19(0xfb)]?this[_0x123d19(0xfb)]['id']:void 0x0,'error':_0x4235a5});}finally{this[_0x123d19(0xfb)]?.[_0x123d19(0xfc)](),this[_0x123d19(0xfb)]=void 0x0;}}[_0x55c61c(0x110)]({userMessage:_0x537f28,contextItems:_0x2e9285,capabilities:_0x4a6444,modelId:_0x2df662,quickActionData:_0x26d366}){const _0x239dc8=_0x55c61c,_0x27aab5=new _0x22984b({'userMessage':_0x537f28,'contextItems':_0x2e9285,'capabilities':_0x4a6444,'conversationId':this['id'],'connector':this[_0x239dc8(0x112)],'editor':this[_0x239dc8(0x11c)][_0x239dc8(0x128)]&&this[_0x239dc8(0x11c)][_0x239dc8(0x128)](),'model':_0x2df662,'quickActionData':_0x26d366});return _0x27aab5[_0x239dc8(0x135)](..._0x42a1b0)['to'](this),this[_0x239dc8(0x12a)][_0x239dc8(0x157)](_0x27aab5),this[_0x239dc8(0x14c)](_0x239dc8(0x12f),_0x27aab5),_0x27aab5;}[_0x55c61c(0xfa)](_0x462926){const _0x1ff899=_0x55c61c;return this[_0x1ff899(0x12a)][_0x1ff899(0x10e)](_0xf12988=>_0xf12988['id']===_0x462926);}[_0x55c61c(0xf4)](_0x23b5b2){const _0x234d23=_0x55c61c,_0x53728b=this[_0x234d23(0xfa)](_0x23b5b2);_0x53728b&&(_0x53728b[_0x234d23(0x139)](),this[_0x234d23(0x12a)][_0x234d23(0x10f)](this[_0x234d23(0x12a)][_0x234d23(0xef)](_0x53728b),0x1));}get[_0x55c61c(0x12e)](){const _0x47de3e=_0x55c61c;return this[_0x47de3e(0x12a)][this[_0x47de3e(0x12a)][_0x47de3e(0x11b)]-0x1];}[_0x55c61c(0xfd)](_0x5538de){const _0x28ff8c=_0x55c61c;this[_0x28ff8c(0x15e)][_0x28ff8c(0xfd)](_0x5538de);}async[_0x55c61c(0x158)]({content:_0x3d961b,version:_0x473250,sessionId:_0xe3b6bb,selections:_0x38ff11}){const _0xba7448=_0x55c61c;await this[_0xba7448(0x15e)][_0xba7448(0x11e)](_0x3d961b,_0x473250,_0xe3b6bb,_0x38ff11);}[_0x55c61c(0x122)](){const _0x176d11=_0x55c61c;return this[_0x176d11(0xfb)]?.[_0x176d11(0x125)]()?.[_0x176d11(0x114)]||'';}[_0x55c61c(0x14a)](_0x28dfba){const _0x36fa24=_0x55c61c;this[_0x36fa24(0x15e)][_0x36fa24(0x14a)](_0x28dfba);}[_0x55c61c(0xf1)](){const _0x3dcf8a=_0x55c61c;this[_0x3dcf8a(0x15e)][_0x3dcf8a(0xf1)]();}[_0x55c61c(0x15f)](_0x5c005d){const _0x2d6246=_0x55c61c;this[_0x2d6246(0x15e)][_0x2d6246(0x15f)](_0x5c005d);}[_0x55c61c(0x123)](_0x5e2c20){const _0x1adda6=_0x55c61c;this[_0x1adda6(0x15e)][_0x1adda6(0x123)](_0x5e2c20);}[_0x55c61c(0x113)](_0x5e2221,_0xa7b2c9){const _0x2ffb79=_0x55c61c;this[_0x2ffb79(0x15e)][_0x2ffb79(0x113)](_0x5e2221,_0xa7b2c9);}[_0x55c61c(0x15d)](_0x1b4f18,_0x2c1666,_0x384c20){const _0x4ea41e=_0x55c61c;return this[_0x4ea41e(0x15e)][_0x4ea41e(0x15d)](_0x1b4f18,_0x2c1666,_0x384c20);}[_0x55c61c(0x126)](_0x3dad0c){const _0x49ca81=_0x55c61c;this[_0x49ca81(0x15e)][_0x49ca81(0x126)](_0x3dad0c);}[_0x55c61c(0x12b)](){const _0x317cfa=_0x55c61c;this[_0x317cfa(0x133)][_0x317cfa(0x12b)]();}[_0x55c61c(0x124)](){const _0x39d79f=_0x55c61c;this[_0x39d79f(0x133)][_0x39d79f(0x124)]();}[_0x55c61c(0x115)](){const _0x57f621=_0x55c61c;return this[_0x57f621(0x15e)][_0x57f621(0x115)]();}[_0x55c61c(0x134)](){const _0x1be9e2=_0x55c61c;return this[_0x1be9e2(0x15e)][_0x1be9e2(0x134)]();}[_0x55c61c(0xf9)](){const _0x89e80b=_0x55c61c;return this[_0x89e80b(0x15e)][_0x89e80b(0xf9)]();}async[_0x55c61c(0x119)](_0x389faf){const _0x36f11f=_0x55c61c;if(!_0x389faf)throw new _0x4aff0e(_0x36f11f(0x148),null,{'conversation':this});if(!0x1===await this[_0x36f11f(0x13e)][_0x36f11f(0x107)](_0x389faf))throw new _0x4aff0e(_0x36f11f(0x155),null,{'conversation':this,'model':_0x389faf});_0x389faf['id']!==this[_0x36f11f(0xf7)]?.['id']&&(this[_0x36f11f(0xf7)]=_0x389faf,this[_0x36f11f(0x133)][_0x36f11f(0x12c)](),this[_0x36f11f(0x14c)](_0x36f11f(0x108),{'selectedModel':_0x389faf}));}}
23
+ const _0x564161=_0x17a9;(function(_0x3fd439,_0x367d41){const _0x39a8e5=_0x17a9,_0x5e57c9=_0x3fd439();while(!![]){try{const _0x3624ab=parseInt(_0x39a8e5(0xdc))/0x1+parseInt(_0x39a8e5(0x10a))/0x2+parseInt(_0x39a8e5(0xac))/0x3*(parseInt(_0x39a8e5(0x10c))/0x4)+-parseInt(_0x39a8e5(0x118))/0x5+-parseInt(_0x39a8e5(0x109))/0x6*(-parseInt(_0x39a8e5(0xdd))/0x7)+-parseInt(_0x39a8e5(0xad))/0x8+parseInt(_0x39a8e5(0xc3))/0x9;if(_0x3624ab===_0x367d41)break;else _0x5e57c9['push'](_0x5e57c9['shift']());}catch(_0x10cc2c){_0x5e57c9['push'](_0x5e57c9['shift']());}}}(_0x1cba,0x96e3d));import{CKEditorError as _0x331d28,EmitterMixin as _0x38ba43,logWarning as _0x1ff566}from'ckeditor5/src/utils.js';function _0x17a9(_0x558ff4,_0x168baf){const _0x1cba7b=_0x1cba();return _0x17a9=function(_0x17a922,_0x54bf01){_0x17a922=_0x17a922-0xa7;let _0x836eb7=_0x1cba7b[_0x17a922];return _0x836eb7;},_0x17a9(_0x558ff4,_0x168baf);}import{AI_MODEL_EVENT_NAMES as _0x1a4548}from'../../aicore/model/aiinteraction.js';import{AIChatContext as _0x31df35,AI_CONTEXT_MODEL_EVENT_NAMES as _0x250af1}from'./aichatcontext.js';import{AICapabilities as _0x3e5c6b,CAPABILITIES_MODEL_EVENT_NAMES as _0x239143}from'../../aicore/model/aicapabilities.js';import{AIChatInteraction as _0x5218f7}from'./aichatinteraction.js';function _0x1cba(){const _0x117421=['options','isCurrentDocumentInContext','content','_processMessagesToInteractions','interactionCreated','fetchConversation','createReply','5940685rreCCG','selectedModel','chatContext','startConversation','model','removeFromContext','87DSqoAF','6986120BVxfQB','ai-chat-conversation-start-failed','text','updateCurrentDocument','splice','createInteraction','user','length','addFilesToContext','isCurrentDocumentInConversation','connector','reset','getConversation','_extractContextItems','handleUserInteraction','push','selectedModelId','modification-delta','ai-chat-conversation-start-no-model-selected','group','sessionId','chatModels','2370285eFZETb','appendContent','getAll','isStarted','getInteraction','toggleReasoning','ai-chat-conversation-init-from-id-failed','getEditor','getDocumentContext','removeSelectionFromContext','getMessages','currentInteraction','updateCurrentDocumentInContext','setConversationTitle','prompt','load','removeInteraction','type','destroy','toggleWebSearch','ai-chat-conversation-already-started','addUrlToContext','start','getCapabilitiesConfig','stop','777073ZhfmSx','1860145yjUDpK','isAvailable','text-delta','modelSelected','ai-chat-handle-user-interaction-already-in-progress','assistant','title','fetchConversationMessages','capabilities','chatCapabilities','role','reasoning','conversationStarted','contextItems','fire','message','ai-chat-handle-user-conversation-not-initialized','currentReply','set','addToConversationContext','ai-chat-conversation-set-model-not-available','conversationId','addCurrentDocumentToContext','addSelectionToContext','getPendingContextItems','stack','getModel','setModel','getCurrentDocumentContext','error','toLowerCase','delegate','loadSourceResources','interactions','addResourceToContext','conversationInitialized','quickActionData','getAvailableModels','isSelectionInContext','attributes','ai-chat-conversation-set-model-null','lastInteraction','webSearch','ai-chat-conversation-init-failed','6WhjjvT','2210686RKJBKZ','init','36956ZATnZD','find','hasOwn','indexOf','populateFromMessage'];_0x1cba=function(){return _0x117421;};return _0x1cba();}export class AIChatConversation extends _0x38ba43(){['id'];[_0x564161(0xc6)]=!0x1;[_0x564161(0xfe)]=[];[_0x564161(0xce)];[_0x564161(0xa7)];[_0x564161(0xb7)];[_0x564161(0x111)];constructor(_0x4b0c06){const _0x116793=_0x564161;super(),this[_0x116793(0x111)]=_0x4b0c06,this[_0x116793(0xb7)]=_0x4b0c06[_0x116793(0xb7)],this[_0x116793(0xc2)]=_0x4b0c06[_0x116793(0xc2)],this['id']=_0x4b0c06[_0x116793(0xf2)];}async[_0x564161(0x10b)](_0xed46b2){const _0x36d669=_0x564161;try{this[_0x36d669(0xa8)]=new _0x31df35({'connector':this[_0x36d669(0xb7)],'config':_0xed46b2,'ownerId':this['id']}),this[_0x36d669(0xa8)][_0x36d669(0xfc)](..._0x250af1)['to'](this),this[_0x36d669(0xa8)][_0x36d669(0x10b)](),this[_0x36d669(0xe6)]=new _0x3e5c6b(),this[_0x36d669(0xe6)][_0x36d669(0xfc)](..._0x239143)['to'](this),this[_0x36d669(0xe6)][_0x36d669(0x10b)]();const _0x40889d=await this[_0x36d669(0xc2)][_0x36d669(0x102)]();this[_0x36d669(0xeb)](_0x36d669(0x100),{'availableModels':_0x40889d});const _0x312e54=await this[_0x36d669(0xc2)][_0x36d669(0xf7)](this[_0x36d669(0x111)][_0x36d669(0xbd)]);_0x312e54&&await this[_0x36d669(0xf8)](_0x312e54);}catch(_0x30f775){const _0x1e8825=new _0x331d28(_0x36d669(0x108),null,{'message':_0x30f775[_0x36d669(0xec)]});_0x1e8825[_0x36d669(0xf6)]=_0x30f775[_0x36d669(0xf6)],this[_0x36d669(0xeb)](_0x36d669(0xfa),{'error':_0x1e8825});}}async[_0x564161(0xd9)](){const _0x42c27d=_0x564161;if(this[_0x42c27d(0xc6)])throw new _0x331d28(_0x42c27d(0xd7),null,{'conversation':this});if(!this[_0x42c27d(0xa7)])throw new _0x331d28(_0x42c27d(0xbf),null,{'conversation':this});try{const {id:_0xefc66d}=await this[_0x42c27d(0xb7)][_0x42c27d(0xa9)](this['id'],this[_0x42c27d(0x111)][_0x42c27d(0xc0)])[_0x42c27d(0xb9)]();this['id']=_0xefc66d,this[_0x42c27d(0xc6)]=!0x0,this[_0x42c27d(0xeb)](_0x42c27d(0xe9),{'conversationId':this['id'],'selectedModel':this[_0x42c27d(0xa7)]});}catch(_0xbf6366){const _0x50f32b=new _0x331d28(_0x42c27d(0xae),null,{'message':_0xbf6366[_0x42c27d(0xec)]});_0x50f32b[_0x42c27d(0xf6)]=_0xbf6366[_0x42c27d(0xf6)],this[_0x42c27d(0xeb)](_0x42c27d(0xfa),{'error':_0x50f32b});}}async[_0x564161(0xd2)](_0x32118b,_0x22e269){const _0x2168dd=_0x564161;try{const _0xd843d7=await this[_0x2168dd(0xb7)][_0x2168dd(0x116)](_0x32118b)[_0x2168dd(0xb9)](),_0x5dc57f=await this[_0x2168dd(0xb7)][_0x2168dd(0xe4)](_0x32118b)[_0x2168dd(0xcd)](),_0x277a01=_0x5dc57f[0x0][_0x2168dd(0xaa)];this[_0x2168dd(0xc6)]=!0x0,this['id']=_0xd843d7['id'],_0x2168dd(0xe3)in _0xd843d7?this[_0x2168dd(0xeb)](_0x2168dd(0xd0),_0xd843d7[_0x2168dd(0xe3)],!0x0):this[_0x2168dd(0xeb)](_0x2168dd(0xd0),'',!0x0);const _0x56e75b=(await this[_0x2168dd(0xc2)][_0x2168dd(0xc5)]())[_0x2168dd(0x10d)](_0x4bd88f=>_0x4bd88f['id'][_0x2168dd(0xfb)]()===_0x277a01[_0x2168dd(0xfb)]());return this[_0x2168dd(0xa7)]=_0x56e75b,this[_0x2168dd(0xeb)](_0x2168dd(0xe0),{'selectedModel':_0x56e75b,'isDisabled':!0x0}),await this[_0x2168dd(0x114)](_0x5dc57f,_0x22e269,_0x277a01),this[_0x2168dd(0xce)]=void 0x0,this;}catch(_0x64359f){const _0x3fa1a2=new _0x331d28(_0x2168dd(0xc9),null,{'message':_0x64359f[_0x2168dd(0xec)],'conversationId':_0x32118b});throw _0x3fa1a2[_0x2168dd(0xf6)]=_0x64359f[_0x2168dd(0xf6)],this[_0x2168dd(0xeb)](_0x2168dd(0xfa),{'error':_0x3fa1a2}),_0x3fa1a2;}}async[_0x564161(0x114)](_0x3a176c,_0x23ae56,_0x24f95e){const _0x2b44c1=_0x564161;let _0x297919;for(const _0x171022 of _0x3a176c)if(_0x2b44c1(0xb3)===_0x171022[_0x2b44c1(0xe7)]){const _0xa77591=await this[_0x2b44c1(0xba)](_0x171022),_0x4d75c0={'isReasoningEnabled':Object[_0x2b44c1(0x10e)](_0x171022[_0x2b44c1(0xe5)],_0x2b44c1(0xe8)),'isWebSearchEnabled':Object[_0x2b44c1(0x10e)](_0x171022[_0x2b44c1(0xe5)],_0x2b44c1(0x107))};_0x297919=this[_0x2b44c1(0xb2)]({'userMessage':_0x171022[_0x2b44c1(0xd1)],'contextItems':_0xa77591,'capabilities':_0x4d75c0,'modelId':_0x24f95e,'quickActionData':_0x171022[_0x2b44c1(0x104)]?.[_0x2b44c1(0x101)]}),this[_0x2b44c1(0xce)]=_0x297919,this[_0x2b44c1(0xa8)][_0x2b44c1(0xf0)](this[_0x2b44c1(0xce)][_0x2b44c1(0xea)]);}else{if(_0x2b44c1(0xe2)===_0x171022[_0x2b44c1(0xe7)]&&_0x297919)for(const _0x44c569 of _0x171022[_0x2b44c1(0x113)]){const _0x4fc57e=_0x2b44c1(0xaf)===_0x44c569[_0x2b44c1(0xd4)]?_0x2b44c1(0xdf):_0x2b44c1(0xbe),_0x51ad9a=_0x297919[_0x2b44c1(0xcb)]()?.[_0x2b44c1(0xc1)]!==_0x23ae56;_0x297919[_0x2b44c1(0xee)]=_0x297919[_0x2b44c1(0x117)]({'type':_0x4fc57e,'isDone':!0x0,'interactionId':_0x297919['id'],'areActionsDisabled':_0x51ad9a}),_0x297919[_0x2b44c1(0xee)][_0x2b44c1(0xc4)](_0x44c569[_0x2b44c1(0x113)]);}}}async[_0x564161(0xba)](_0x12a40f){const _0x388f49=_0x564161,_0x264321=new Map();if(!_0x12a40f[_0x388f49(0x113)])return _0x264321;for(const _0x163b95 of _0x12a40f[_0x388f49(0x113)]){const _0xdb229f=await this[_0x388f49(0xa8)][_0x388f49(0x110)](_0x163b95);_0xdb229f&&_0x264321[_0x388f49(0xef)](_0xdb229f['id'],_0xdb229f);}return _0x264321;}async[_0x564161(0xbb)]({userMessage:_0x8a44b4,quickActionData:_0xecd4ae}){const _0x45f005=_0x564161;if(!this[_0x45f005(0xc6)])throw new _0x331d28(_0x45f005(0xed),null,{'conversation':this});if(this[_0x45f005(0xce)])throw new _0x331d28(_0x45f005(0xe1),null,{'conversation':this});try{const _0xbf6313=this[_0x45f005(0xa8)][_0x45f005(0xf5)](),_0x1b151a=this[_0x45f005(0xe6)][_0x45f005(0xda)](),_0x2e6d11=this[_0x45f005(0xa7)]['id'];this[_0x45f005(0xce)]=this[_0x45f005(0xb2)]({'userMessage':_0x8a44b4,'contextItems':_0xbf6313,'capabilities':_0x1b151a,'modelId':_0x2e6d11,'quickActionData':_0xecd4ae}),await this[_0x45f005(0xce)][_0x45f005(0xd9)](),this[_0x45f005(0xa8)][_0x45f005(0xf0)](this[_0x45f005(0xce)][_0x45f005(0xea)]);}catch(_0x3d8e57){this[_0x45f005(0xeb)](_0x45f005(0xfa),{'interactionId':this[_0x45f005(0xce)]?this[_0x45f005(0xce)]['id']:void 0x0,'error':_0x3d8e57});}finally{this[_0x45f005(0xce)]?.[_0x45f005(0xdb)](),this[_0x45f005(0xce)]=void 0x0;}}[_0x564161(0xb2)]({userMessage:_0xfc20ee,contextItems:_0x5f6a9d,capabilities:_0xed42ad,modelId:_0x8a6b,quickActionData:_0x3d34b5}){const _0x2b8e5d=_0x564161,_0x429a28=new _0x5218f7({'userMessage':_0xfc20ee,'contextItems':_0x5f6a9d,'capabilities':_0xed42ad,'conversationId':this['id'],'connector':this[_0x2b8e5d(0xb7)],'editor':this[_0x2b8e5d(0x111)][_0x2b8e5d(0xca)]&&this[_0x2b8e5d(0x111)][_0x2b8e5d(0xca)](),'model':_0x8a6b,'quickActionData':_0x3d34b5});return _0x429a28[_0x2b8e5d(0xfc)](..._0x1a4548)['to'](this),this[_0x2b8e5d(0xfe)][_0x2b8e5d(0xbc)](_0x429a28),this[_0x2b8e5d(0xeb)](_0x2b8e5d(0x115),_0x429a28),_0x429a28;}[_0x564161(0xc7)](_0x5e9064){const _0x539ab4=_0x564161;return this[_0x539ab4(0xfe)][_0x539ab4(0x10d)](_0x2c9fe2=>_0x2c9fe2['id']===_0x5e9064);}[_0x564161(0xd3)](_0x301014){const _0x5622ff=_0x564161,_0x77f4b0=this[_0x5622ff(0xc7)](_0x301014);_0x77f4b0&&(_0x77f4b0[_0x5622ff(0xd5)](),this[_0x5622ff(0xfe)][_0x5622ff(0xb1)](this[_0x5622ff(0xfe)][_0x5622ff(0x10f)](_0x77f4b0),0x1));}get[_0x564161(0x106)](){const _0x4717c2=_0x564161;return this[_0x4717c2(0xfe)][this[_0x4717c2(0xfe)][_0x4717c2(0xb4)]-0x1];}[_0x564161(0xf3)](_0x45bbe6){const _0x1fd483=_0x564161;this[_0x1fd483(0xa8)][_0x1fd483(0xf3)](_0x45bbe6);}async[_0x564161(0xcf)]({content:_0x3245d4,version:_0x2f0ef7,sessionId:_0x10cafd,selections:_0x5119fd}){const _0x2c17b7=_0x564161;await this[_0x2c17b7(0xa8)][_0x2c17b7(0xb0)](_0x3245d4,_0x2f0ef7,_0x10cafd,_0x5119fd);}[_0x564161(0xf9)](){const _0x118621=_0x564161;return this[_0x118621(0xce)]?.[_0x118621(0xcb)]()?.[_0x118621(0x113)]||'';}[_0x564161(0xf4)](_0x3253ee){const _0xe483d1=_0x564161;this[_0xe483d1(0xa8)][_0xe483d1(0xf4)](_0x3253ee);}[_0x564161(0xcc)](){const _0x32c9f5=_0x564161;this[_0x32c9f5(0xa8)][_0x32c9f5(0xcc)]();}[_0x564161(0xb5)](_0x5776b0){const _0x3c1b9d=_0x564161;this[_0x3c1b9d(0xa8)][_0x3c1b9d(0xb5)](_0x5776b0);}[_0x564161(0xd8)](_0x50fbd9){const _0x2ffe59=_0x564161;this[_0x2ffe59(0xa8)][_0x2ffe59(0xd8)](_0x50fbd9);}[_0x564161(0xff)](_0x16462e,_0x1b89ff){const _0x45f670=_0x564161;this[_0x45f670(0xa8)][_0x45f670(0xff)](_0x16462e,_0x1b89ff);}[_0x564161(0xfd)](_0x301b0f,_0x36e6b9,_0x3e8027){const _0x5373fe=_0x564161;return this[_0x5373fe(0xa8)][_0x5373fe(0xfd)](_0x301b0f,_0x36e6b9,_0x3e8027);}[_0x564161(0xab)](_0x46245d){const _0x462a8e=_0x564161;this[_0x462a8e(0xa8)][_0x462a8e(0xab)](_0x46245d);}[_0x564161(0xd6)](){const _0x50a67e=_0x564161;this[_0x50a67e(0xe6)][_0x50a67e(0xd6)]();}[_0x564161(0xc8)](){const _0x2de1aa=_0x564161;this[_0x2de1aa(0xe6)][_0x2de1aa(0xc8)]();}[_0x564161(0x112)](){const _0x14cc66=_0x564161;return this[_0x14cc66(0xa8)][_0x14cc66(0x112)]();}[_0x564161(0xb6)](){const _0xf24002=_0x564161;return this[_0xf24002(0xa8)][_0xf24002(0xb6)]();}[_0x564161(0x103)](){const _0x53bf12=_0x564161;return this[_0x53bf12(0xa8)][_0x53bf12(0x103)]();}async[_0x564161(0xf8)](_0x37164e){const _0x586edf=_0x564161;_0x37164e?!0x1===await this[_0x586edf(0xc2)][_0x586edf(0xde)](_0x37164e)&&(_0x1ff566(_0x586edf(0xf1),{'conversation':this,'model':_0x37164e}),_0x37164e=(await this[_0x586edf(0xc2)][_0x586edf(0x102)]())[0x0]):(_0x1ff566(_0x586edf(0x105),{'conversation':this}),_0x37164e=(await this[_0x586edf(0xc2)][_0x586edf(0x102)]())[0x0]),_0x37164e['id']!==this[_0x586edf(0xa7)]?.['id']&&(this[_0x586edf(0xa7)]=_0x37164e,this[_0x586edf(0xe6)][_0x586edf(0xb8)](),this[_0x586edf(0xeb)](_0x586edf(0xe0),{'selectedModel':_0x37164e}));}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- var _0x36fd4d=_0x48c9;(function(_0x311e87,_0x167e65){var _0x209e07=_0x48c9,_0x35970b=_0x311e87();while(!![]){try{var _0x2bd565=-parseInt(_0x209e07(0x1c9))/0x1+parseInt(_0x209e07(0x1d8))/0x2+parseInt(_0x209e07(0x1c8))/0x3+parseInt(_0x209e07(0x1c5))/0x4+-parseInt(_0x209e07(0x1d0))/0x5*(parseInt(_0x209e07(0x1c6))/0x6)+parseInt(_0x209e07(0x1cb))/0x7*(-parseInt(_0x209e07(0x1c4))/0x8)+parseInt(_0x209e07(0x1ca))/0x9*(parseInt(_0x209e07(0x1d5))/0xa);if(_0x2bd565===_0x167e65)break;else _0x35970b['push'](_0x35970b['shift']());}catch(_0x291d14){_0x35970b['push'](_0x35970b['shift']());}}}(_0x27c7,0x5b150));import{AICapabilities as _0x158747}from'../../aicore/model/aicapabilities.js';import{AIInteraction as _0x1499da}from'../../aicore/model/aiinteraction.js';import{AIChatContext as _0x5a59db}from'./aichatcontext.js';function _0x48c9(_0x46b8ef,_0x3d3e00){var _0x27c7ce=_0x27c7();return _0x48c9=function(_0x48c993,_0x21df77){_0x48c993=_0x48c993-0x1c1;var _0x48d8c4=_0x27c7ce[_0x48c993];return _0x48d8c4;},_0x48c9(_0x46b8ef,_0x3d3e00);}export class AIChatInteraction extends _0x1499da{[_0x36fd4d(0x1cc)];[_0x36fd4d(0x1d2)];[_0x36fd4d(0x1cf)]=new Map();[_0x36fd4d(0x1d7)];[_0x36fd4d(0x1ce)];constructor(_0x2e4067){var _0x19365c=_0x36fd4d;super(_0x2e4067),this[_0x19365c(0x1d2)]=_0x2e4067[_0x19365c(0x1d2)],this[_0x19365c(0x1cf)]=_0x2e4067[_0x19365c(0x1cf)],this[_0x19365c(0x1c2)]=_0x2e4067[_0x19365c(0x1c2)],this[_0x19365c(0x1cc)]=_0x2e4067[_0x19365c(0x1cc)],this[_0x19365c(0x1d7)]=_0x2e4067[_0x19365c(0x1d7)],this[_0x19365c(0x1ce)]=_0x2e4067[_0x19365c(0x1ce)];}async[_0x36fd4d(0x1c1)](){var _0x3f4ad9=_0x36fd4d;return this[_0x3f4ad9(0x1c3)][_0x3f4ad9(0x1d6)]({'message':this[_0x3f4ad9(0x1cc)],'conversationId':this[_0x3f4ad9(0x1d2)],'parts':_0x5a59db[_0x3f4ad9(0x1d1)](this[_0x3f4ad9(0x1cf)]),'capabilities':_0x158747[_0x3f4ad9(0x1d3)](this[_0x3f4ad9(0x1c2)]),'model':this[_0x3f4ad9(0x1d7)],'quickActionData':this[_0x3f4ad9(0x1ce)]});}[_0x36fd4d(0x1cd)](){var _0x447a53=_0x36fd4d;return this[_0x447a53(0x1cf)][_0x447a53(0x1c7)](_0x447a53(0x1d4));}}function _0x27c7(){var _0x3608ef=['getCapabilitiesRequestData','current-document','20xBmTor','queryAssistant','model','451966oKLsuf','sendRequest','capabilities','connector','48WoYJsP','188660FsqdBB','354dEvWeV','get','538893pCaYCs','626718MVhedT','6327963djhXns','834932BnCYwz','userMessage','getDocumentContext','quickActionData','contextItems','12165DjaLnj','mapContextItemsToRequestData','conversationId'];_0x27c7=function(){return _0x3608ef;};return _0x27c7();}
23
+ function _0x519a(){var _0x3baa83=['quickActionData','contextItems','63174hqjdyO','2725LusIHe','297765NLDPHa','431720loyyND','2606186dTQVSO','getCapabilitiesRequestData','404IUSpIY','getDocumentContext','10cdoYXf','13NyhnTt','userMessage','get','queryAssistant','connector','conversationId','607578CvGqOw','sendRequest','29916aIkGFG','77ZfJxiZ','current-document','model','mapContextItemsToRequestData','capabilities'];_0x519a=function(){return _0x3baa83;};return _0x519a();}var _0x8aa7e6=_0xca5f;(function(_0x3918a6,_0x50c202){var _0x369c7a=_0xca5f,_0x2136a2=_0x3918a6();while(!![]){try{var _0x3c8565=-parseInt(_0x369c7a(0x100))/0x1*(-parseInt(_0x369c7a(0xef))/0x2)+parseInt(_0x369c7a(0x106))/0x3+-parseInt(_0x369c7a(0xfd))/0x4*(-parseInt(_0x369c7a(0xf8))/0x5)+parseInt(_0x369c7a(0xf7))/0x6*(-parseInt(_0x369c7a(0xf0))/0x7)+parseInt(_0x369c7a(0xfa))/0x8+-parseInt(_0x369c7a(0xf9))/0x9+-parseInt(_0x369c7a(0xff))/0xa*(parseInt(_0x369c7a(0xfb))/0xb);if(_0x3c8565===_0x50c202)break;else _0x2136a2['push'](_0x2136a2['shift']());}catch(_0x3051b0){_0x2136a2['push'](_0x2136a2['shift']());}}}(_0x519a,0x1d560));function _0xca5f(_0x123535,_0x3eff6e){var _0x519ab7=_0x519a();return _0xca5f=function(_0xca5f18,_0x1882fd){_0xca5f18=_0xca5f18-0xef;var _0x1419b2=_0x519ab7[_0xca5f18];return _0x1419b2;},_0xca5f(_0x123535,_0x3eff6e);}import{AICapabilities as _0x4a22c7}from'../../aicore/model/aicapabilities.js';import{AIInteraction as _0x257def}from'../../aicore/model/aiinteraction.js';import{AIChatContext as _0x30c15f}from'./aichatcontext.js';export class AIChatInteraction extends _0x257def{[_0x8aa7e6(0x101)];[_0x8aa7e6(0x105)];[_0x8aa7e6(0xf6)]=new Map();[_0x8aa7e6(0xf2)];[_0x8aa7e6(0xf5)];constructor(_0x2a1950){var _0xc85416=_0x8aa7e6;super(_0x2a1950),this[_0xc85416(0x105)]=_0x2a1950[_0xc85416(0x105)],this[_0xc85416(0xf6)]=_0x2a1950[_0xc85416(0xf6)],this[_0xc85416(0xf4)]=_0x2a1950[_0xc85416(0xf4)],this[_0xc85416(0x101)]=_0x2a1950[_0xc85416(0x101)],this[_0xc85416(0xf2)]=_0x2a1950[_0xc85416(0xf2)],this[_0xc85416(0xf5)]=_0x2a1950[_0xc85416(0xf5)];}async[_0x8aa7e6(0x107)](){var _0x369a41=_0x8aa7e6;return this[_0x369a41(0x104)][_0x369a41(0x103)]({'message':this[_0x369a41(0x101)],'conversationId':this[_0x369a41(0x105)],'parts':_0x30c15f[_0x369a41(0xf3)](this[_0x369a41(0xf6)]),'capabilities':_0x4a22c7[_0x369a41(0xfc)](this[_0x369a41(0xf4)]),'model':this[_0x369a41(0xf2)],'quickActionData':this[_0x369a41(0xf5)]});}[_0x8aa7e6(0xfe)](){var _0x4797a2=_0x8aa7e6;return this[_0x4797a2(0xf6)][_0x4797a2(0x102)](_0x4797a2(0xf1));}}