@ckeditor/ckeditor5-ai 47.0.0-alpha.5 → 47.0.0-alpha.7

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 (327) hide show
  1. package/LICENSE.md +4 -0
  2. package/build/ai.js +1 -1
  3. package/ckeditor5-metadata.json +14 -0
  4. package/dist/index-editor.css +70 -19
  5. package/dist/index.css +80 -19
  6. package/dist/index.js +4 -4
  7. package/dist/translations/af.js +1 -1
  8. package/dist/translations/af.umd.js +1 -1
  9. package/dist/translations/ar.js +1 -1
  10. package/dist/translations/ar.umd.js +1 -1
  11. package/dist/translations/ast.js +1 -1
  12. package/dist/translations/ast.umd.js +1 -1
  13. package/dist/translations/az.js +1 -1
  14. package/dist/translations/az.umd.js +1 -1
  15. package/dist/translations/be.js +1 -1
  16. package/dist/translations/be.umd.js +1 -1
  17. package/dist/translations/bg.js +1 -1
  18. package/dist/translations/bg.umd.js +1 -1
  19. package/dist/translations/bn.js +1 -1
  20. package/dist/translations/bn.umd.js +1 -1
  21. package/dist/translations/bs.js +1 -1
  22. package/dist/translations/bs.umd.js +1 -1
  23. package/dist/translations/ca.js +1 -1
  24. package/dist/translations/ca.umd.js +1 -1
  25. package/dist/translations/cs.js +1 -1
  26. package/dist/translations/cs.umd.js +1 -1
  27. package/dist/translations/da.js +1 -1
  28. package/dist/translations/da.umd.js +1 -1
  29. package/dist/translations/de-ch.js +1 -1
  30. package/dist/translations/de-ch.umd.js +1 -1
  31. package/dist/translations/de.js +1 -1
  32. package/dist/translations/de.umd.js +1 -1
  33. package/dist/translations/el.js +1 -1
  34. package/dist/translations/el.umd.js +1 -1
  35. package/dist/translations/en-au.js +1 -1
  36. package/dist/translations/en-au.umd.js +1 -1
  37. package/dist/translations/en-gb.js +1 -1
  38. package/dist/translations/en-gb.umd.js +1 -1
  39. package/dist/translations/en.js +1 -1
  40. package/dist/translations/en.umd.js +1 -1
  41. package/dist/translations/eo.js +1 -1
  42. package/dist/translations/eo.umd.js +1 -1
  43. package/dist/translations/es-co.js +1 -1
  44. package/dist/translations/es-co.umd.js +1 -1
  45. package/dist/translations/es.js +1 -1
  46. package/dist/translations/es.umd.js +1 -1
  47. package/dist/translations/et.js +1 -1
  48. package/dist/translations/et.umd.js +1 -1
  49. package/dist/translations/eu.js +1 -1
  50. package/dist/translations/eu.umd.js +1 -1
  51. package/dist/translations/fa.js +1 -1
  52. package/dist/translations/fa.umd.js +1 -1
  53. package/dist/translations/fi.js +1 -1
  54. package/dist/translations/fi.umd.js +1 -1
  55. package/dist/translations/fr.js +1 -1
  56. package/dist/translations/fr.umd.js +1 -1
  57. package/dist/translations/gl.js +1 -1
  58. package/dist/translations/gl.umd.js +1 -1
  59. package/dist/translations/gu.js +1 -1
  60. package/dist/translations/gu.umd.js +1 -1
  61. package/dist/translations/he.js +1 -1
  62. package/dist/translations/he.umd.js +1 -1
  63. package/dist/translations/hi.js +1 -1
  64. package/dist/translations/hi.umd.js +1 -1
  65. package/dist/translations/hr.js +1 -1
  66. package/dist/translations/hr.umd.js +1 -1
  67. package/dist/translations/hu.js +1 -1
  68. package/dist/translations/hu.umd.js +1 -1
  69. package/dist/translations/hy.js +1 -1
  70. package/dist/translations/hy.umd.js +1 -1
  71. package/dist/translations/id.js +1 -1
  72. package/dist/translations/id.umd.js +1 -1
  73. package/dist/translations/it.js +1 -1
  74. package/dist/translations/it.umd.js +1 -1
  75. package/dist/translations/ja.js +1 -1
  76. package/dist/translations/ja.umd.js +1 -1
  77. package/dist/translations/jv.js +1 -1
  78. package/dist/translations/jv.umd.js +1 -1
  79. package/dist/translations/kk.js +1 -1
  80. package/dist/translations/kk.umd.js +1 -1
  81. package/dist/translations/km.js +1 -1
  82. package/dist/translations/km.umd.js +1 -1
  83. package/dist/translations/kn.js +1 -1
  84. package/dist/translations/kn.umd.js +1 -1
  85. package/dist/translations/ko.js +1 -1
  86. package/dist/translations/ko.umd.js +1 -1
  87. package/dist/translations/ku.js +1 -1
  88. package/dist/translations/ku.umd.js +1 -1
  89. package/dist/translations/lt.js +1 -1
  90. package/dist/translations/lt.umd.js +1 -1
  91. package/dist/translations/lv.js +1 -1
  92. package/dist/translations/lv.umd.js +1 -1
  93. package/dist/translations/ms.js +1 -1
  94. package/dist/translations/ms.umd.js +1 -1
  95. package/dist/translations/nb.js +1 -1
  96. package/dist/translations/nb.umd.js +1 -1
  97. package/dist/translations/ne.js +1 -1
  98. package/dist/translations/ne.umd.js +1 -1
  99. package/dist/translations/nl.js +1 -1
  100. package/dist/translations/nl.umd.js +1 -1
  101. package/dist/translations/no.js +1 -1
  102. package/dist/translations/no.umd.js +1 -1
  103. package/dist/translations/oc.js +1 -1
  104. package/dist/translations/oc.umd.js +1 -1
  105. package/dist/translations/pl.js +1 -1
  106. package/dist/translations/pl.umd.js +1 -1
  107. package/dist/translations/pt-br.js +1 -1
  108. package/dist/translations/pt-br.umd.js +1 -1
  109. package/dist/translations/pt.js +1 -1
  110. package/dist/translations/pt.umd.js +1 -1
  111. package/dist/translations/ro.js +1 -1
  112. package/dist/translations/ro.umd.js +1 -1
  113. package/dist/translations/ru.js +1 -1
  114. package/dist/translations/ru.umd.js +1 -1
  115. package/dist/translations/si.js +1 -1
  116. package/dist/translations/si.umd.js +1 -1
  117. package/dist/translations/sk.js +1 -1
  118. package/dist/translations/sk.umd.js +1 -1
  119. package/dist/translations/sl.js +1 -1
  120. package/dist/translations/sl.umd.js +1 -1
  121. package/dist/translations/sq.js +1 -1
  122. package/dist/translations/sq.umd.js +1 -1
  123. package/dist/translations/sr-latn.js +1 -1
  124. package/dist/translations/sr-latn.umd.js +1 -1
  125. package/dist/translations/sr.js +1 -1
  126. package/dist/translations/sr.umd.js +1 -1
  127. package/dist/translations/sv.js +1 -1
  128. package/dist/translations/sv.umd.js +1 -1
  129. package/dist/translations/th.js +1 -1
  130. package/dist/translations/th.umd.js +1 -1
  131. package/dist/translations/ti.js +1 -1
  132. package/dist/translations/ti.umd.js +1 -1
  133. package/dist/translations/tk.js +1 -1
  134. package/dist/translations/tk.umd.js +1 -1
  135. package/dist/translations/tr.js +1 -1
  136. package/dist/translations/tr.umd.js +1 -1
  137. package/dist/translations/tt.js +1 -1
  138. package/dist/translations/tt.umd.js +1 -1
  139. package/dist/translations/ug.js +1 -1
  140. package/dist/translations/ug.umd.js +1 -1
  141. package/dist/translations/uk.js +1 -1
  142. package/dist/translations/uk.umd.js +1 -1
  143. package/dist/translations/ur.js +1 -1
  144. package/dist/translations/ur.umd.js +1 -1
  145. package/dist/translations/uz.js +1 -1
  146. package/dist/translations/uz.umd.js +1 -1
  147. package/dist/translations/vi.js +1 -1
  148. package/dist/translations/vi.umd.js +1 -1
  149. package/dist/translations/zh-cn.js +1 -1
  150. package/dist/translations/zh-cn.umd.js +1 -1
  151. package/dist/translations/zh.js +1 -1
  152. package/dist/translations/zh.umd.js +1 -1
  153. package/lang/contexts.json +6 -0
  154. package/package.json +15 -15
  155. package/src/aiactions/aiactions.d.ts +0 -2
  156. package/src/aiactions/aiactions.js +1 -1
  157. package/src/aiactions/model/aiactionsinteraction.d.ts +1 -0
  158. package/src/aiactions/model/aiactionsinteraction.js +1 -1
  159. package/src/aiactions/model/aiactionsreply.js +1 -1
  160. package/src/aiassistant/adapters/aiadapter.js +1 -1
  161. package/src/aiassistant/adapters/aitextadapter.js +1 -1
  162. package/src/aiassistant/adapters/awstextadapter.js +1 -1
  163. package/src/aiassistant/adapters/openaitextadapter.js +1 -1
  164. package/src/aiassistant/aiassistant.js +1 -1
  165. package/src/aiassistant/aiassistantediting.js +1 -1
  166. package/src/aiassistant/aiassistantui.js +1 -1
  167. package/src/aiassistant/legacyerrors.js +1 -1
  168. package/src/aiassistant/ui/aiassistantcontroller.js +2 -2
  169. package/src/aiassistant/ui/form/aiformcontentarea.js +1 -1
  170. package/src/aiassistant/ui/form/aiformerrorview.js +1 -1
  171. package/src/aiassistant/ui/form/aiformpromptview.js +1 -1
  172. package/src/aiassistant/ui/form/aiformtoolbarview.js +1 -1
  173. package/src/aiassistant/ui/form/aiformview.js +1 -1
  174. package/src/aiassistant/ui/form/aihistorylistitemview.js +1 -1
  175. package/src/aiassistant/ui/form/aihistorylistview.js +1 -1
  176. package/src/aiassistant/ui/form/prompthistory.js +1 -1
  177. package/src/aiassistant/ui/showaiassistantcommand.js +1 -1
  178. package/src/aiassistant/utils/common-translations.js +1 -1
  179. package/src/aiassistant/utils/normalizecommandsconfig.js +1 -1
  180. package/src/aiballoon/aiballoon.js +1 -1
  181. package/src/aiballoon/ui/aiballoondisclaimerview.js +1 -1
  182. package/src/aiballoon/ui/aiballoontoolbarview.js +1 -1
  183. package/src/aiballoon/ui/aiballoonview.d.ts +3 -1
  184. package/src/aiballoon/ui/aiballoonview.js +1 -1
  185. package/src/aichat/aichat.js +1 -1
  186. package/src/aichat/aichatcontroller.d.ts +4 -0
  187. package/src/aichat/aichatcontroller.js +1 -1
  188. package/src/aichat/aichatui.d.ts +9 -2
  189. package/src/aichat/aichatui.js +1 -1
  190. package/src/aichat/model/aichatcontext.js +1 -1
  191. package/src/aichat/model/aichatconversation.js +1 -1
  192. package/src/aichat/model/aichatinteraction.js +1 -1
  193. package/src/aichat/model/aichatmodels.js +1 -1
  194. package/src/aichat/ui/aichatcontrolsview.d.ts +6 -0
  195. package/src/aichat/ui/aichatcontrolsview.js +1 -1
  196. package/src/aichat/ui/aichatfeedview.d.ts +4 -0
  197. package/src/aichat/ui/aichatfeedview.js +1 -1
  198. package/src/aichat/ui/aichatheaderview.js +1 -1
  199. package/src/aichat/ui/aichatview.js +1 -1
  200. package/src/aichat/ui/controls/aichatchipsoverflowmanager.js +1 -1
  201. package/src/aichat/ui/controls/aichatcontextitembuttonview.js +1 -1
  202. package/src/aichat/ui/controls/aichatcontextpanelurlinputview.js +1 -1
  203. package/src/aichat/ui/controls/aichatcontextpanelview.js +1 -1
  204. package/src/aichat/ui/controls/aichatcontrolsloaderview.js +1 -1
  205. package/src/aichat/ui/controls/aichatpromptcapabilitiesview.js +1 -1
  206. package/src/aichat/ui/controls/aichatpromptinputview.js +1 -1
  207. package/src/aichat/ui/controls/aichatpromptsuggestionslistview.js +1 -1
  208. package/src/aichat/ui/controls/resources/aichatresourcelistitemview.js +1 -1
  209. package/src/aichat/ui/controls/resources/aichatresourcesballoonview.js +1 -1
  210. package/src/aichat/ui/controls/resources/aichatresourceslistview.js +1 -1
  211. package/src/aichat/ui/controls/resources/aichatresourcessearchinputview.js +1 -1
  212. package/src/aichat/ui/controls/resources/aichatresourcesview.js +1 -1
  213. package/src/aichat/ui/feed/aichatfeedcontextchipsview.js +1 -1
  214. package/src/aichat/ui/feed/aichatfeederroritemview.js +1 -1
  215. package/src/aichat/ui/feed/aichatfeedinteractionheaderview.d.ts +1 -0
  216. package/src/aichat/ui/feed/aichatfeedinteractionheaderview.js +1 -1
  217. package/src/aichat/ui/feed/aichatfeeditemview.js +1 -1
  218. package/src/aichat/ui/feed/aichatfeedreplyitemview.js +1 -1
  219. package/src/aichat/ui/feed/aichatfeedsuggestionitemactionsview.d.ts +8 -2
  220. package/src/aichat/ui/feed/aichatfeedsuggestionitemactionsview.js +1 -1
  221. package/src/aichat/ui/feed/aichatfeedsuggestionitemview.d.ts +9 -0
  222. package/src/aichat/ui/feed/aichatfeedsuggestionitemview.js +1 -1
  223. package/src/aichat/ui/feed/aichatfeedusermessageitem.js +1 -1
  224. package/src/aichat/utils/eventnames.js +1 -1
  225. package/src/aichat/utils/promisequeue.js +1 -1
  226. package/src/aichat/utils/scrollmanager.js +1 -1
  227. package/src/aichathistory/aichathistory.js +1 -1
  228. package/src/aichathistory/aichathistorycontroller.js +1 -1
  229. package/src/aichathistory/aichathistoryui.js +1 -1
  230. package/src/aichathistory/model/aichathistoryconversations.js +1 -1
  231. package/src/aichathistory/model/aichathistoryitem.js +1 -1
  232. package/src/aichathistory/ui/aichathistorylistitemview.js +1 -1
  233. package/src/aichathistory/ui/aichathistorylistview.js +1 -1
  234. package/src/aichathistory/ui/aichathistorysectionlistview.js +1 -1
  235. package/src/aichathistory/ui/aichathistoryview.js +1 -1
  236. package/src/aiconfig.d.ts +17 -0
  237. package/src/aicore/aiconnector.d.ts +13 -0
  238. package/src/aicore/aiconnector.js +1 -1
  239. package/src/aicore/aiediting.js +1 -1
  240. package/src/aicore/model/aicapabilities.js +1 -1
  241. package/src/aicore/model/aicontext.js +1 -1
  242. package/src/aicore/model/aiinteraction.d.ts +41 -1
  243. package/src/aicore/model/aiinteraction.js +1 -1
  244. package/src/aicore/model/aireply.d.ts +2 -2
  245. package/src/aicore/model/aireply.js +1 -1
  246. package/src/aicore/pipeline/airesponseapplier.js +2 -2
  247. package/src/aicore/pipeline/airesponseparser.js +2 -2
  248. package/src/aicore/ui/aidisclaimerview.js +1 -1
  249. package/src/aicore/ui/aiskeleton.js +1 -1
  250. package/src/aicore/ui/aispinner.js +1 -1
  251. package/src/aicore/ui/suggestioncontainer/aiminitoolbarview.js +1 -1
  252. package/src/aicore/ui/suggestioncontainer/aisuggestionbodyview.js +1 -1
  253. package/src/aicore/ui/suggestioncontainer/aisuggestioncontainerview.d.ts +16 -0
  254. package/src/aicore/ui/suggestioncontainer/aisuggestioncontainerview.js +1 -1
  255. package/src/aicore/ui/suggestioncontainer/aisuggestioncontentpartview.js +1 -1
  256. package/src/aicore/ui/suggestioncontainer/aisuggestionheaderview.js +1 -1
  257. package/src/aicore/utils/common-translations.js +1 -1
  258. package/src/aicore/utils/createresizebutton.js +1 -1
  259. package/src/aicore/utils/documentposition.js +1 -1
  260. package/src/aicore/utils/documentrange.js +1 -1
  261. package/src/aicore/utils/eventnames.js +1 -1
  262. package/src/aicore/utils/geteditorfromcontext.js +1 -1
  263. package/src/aicore/utils/getoperationsfromreply.js +1 -1
  264. package/src/aicore/utils/getsuggestionpartsfromreply.js +1 -1
  265. package/src/aicore/utils/htmlparser.js +1 -1
  266. package/src/aicore/utils/htmlstreamer.js +1 -1
  267. package/src/aieditorintegration/aieditorintegration.d.ts +35 -0
  268. package/src/aieditorintegration/aieditorintegration.js +23 -0
  269. package/src/aieditorintegration/aitogglebutton/aitogglebuttonui.d.ts +38 -0
  270. package/src/aieditorintegration/aitogglebutton/aitogglebuttonui.js +23 -0
  271. package/src/aieditorintegration/aitogglebutton/toggleaicommand.d.ts +16 -0
  272. package/src/aieditorintegration/aitogglebutton/toggleaicommand.js +23 -0
  273. package/src/aiquickactions/aiquickactions.js +1 -1
  274. package/src/aiquickactions/aiquickactionscommand.js +1 -1
  275. package/src/aiquickactions/aiquickactionsediting.js +1 -1
  276. package/src/aiquickactions/aiquickactionsui.js +1 -1
  277. package/src/aiquickactions/ui/aiquickactionsbuttoncreator.js +1 -1
  278. package/src/aiquickactions/ui/aiquickactionsdropdowncontentview.js +1 -1
  279. package/src/aiquickactions/ui/aiquickactionsdropdowncreator.js +1 -1
  280. package/src/aireviewmode/aireviewcheckdefinitions.js +1 -1
  281. package/src/aireviewmode/aireviewmode.js +1 -1
  282. package/src/aireviewmode/aireviewmodecontroller.js +1 -1
  283. package/src/aireviewmode/aireviewmodeediting.js +1 -1
  284. package/src/aireviewmode/aireviewmodeui.js +1 -1
  285. package/src/aireviewmode/model/aireviewcheck.js +1 -1
  286. package/src/aireviewmode/model/aireviewcheckcustom.js +1 -1
  287. package/src/aireviewmode/model/aireviewchecklist.js +1 -1
  288. package/src/aireviewmode/model/aireviewcheckresult.js +1 -1
  289. package/src/aireviewmode/model/aireviewcheckresultchange.js +1 -1
  290. package/src/aireviewmode/model/aireviewcheckrun.d.ts +4 -0
  291. package/src/aireviewmode/model/aireviewcheckrun.js +1 -1
  292. package/src/aireviewmode/model/aireviewcustomcheckrun.js +1 -1
  293. package/src/aireviewmode/model/aireviewmodels.js +1 -1
  294. package/src/aireviewmode/model/aireviewsystemcheckrun.js +1 -1
  295. package/src/aireviewmode/ui/aireviemodepromptinputview.js +1 -1
  296. package/src/aireviewmode/ui/aireviewmodeballoonsuggestionview.js +1 -1
  297. package/src/aireviewmode/ui/aireviewmodechecklistitemresultview.js +1 -1
  298. package/src/aireviewmode/ui/aireviewmodecustomcheckview.js +1 -1
  299. package/src/aireviewmode/ui/aireviewmodereviewchecklistview.js +1 -1
  300. package/src/aireviewmode/ui/aireviewmodereviewcheckresultsview.js +1 -1
  301. package/src/aireviewmode/ui/aireviewmodereviewcommandlistitemview.js +1 -1
  302. package/src/aireviewmode/ui/aireviewmodereviewcompletedview.js +1 -1
  303. package/src/aireviewmode/ui/aireviewmodeview.js +1 -1
  304. package/src/aireviewmode/ui/form/aireviewmodeformamanager.js +1 -1
  305. package/src/aireviewmode/ui/form/aireviewmodeformdropdown.js +1 -1
  306. package/src/aireviewmode/ui/form/aireviewmodeformmanager.js +1 -1
  307. package/src/aitabs/aitabs.js +1 -1
  308. package/src/aitabs/aitabsmainview.d.ts +6 -0
  309. package/src/aitabs/aitabsmainview.js +1 -1
  310. package/src/aitabs/tabs/aitabsview.js +1 -1
  311. package/src/aitabs/tabs/tabbuttonview.js +1 -1
  312. package/src/aitabs/tabs/tabpanelview.js +1 -1
  313. package/src/augmentation.d.ts +6 -0
  314. package/src/index.d.ts +4 -1
  315. package/src/index.js +1 -1
  316. package/theme/aiballoon/aiballoon.css +17 -4
  317. package/theme/aichat/aichat-controls.css +6 -0
  318. package/theme/aichat/aichat.css +2 -0
  319. package/theme/aichat/aichathistory.css +26 -9
  320. package/theme/aichat/aiminitoolbar.css +8 -0
  321. package/theme/aichat/aisuggestioncontainer.css +14 -2
  322. package/theme/aireviewmode/aireviewmode-check-run-result.css +6 -0
  323. package/theme/aitabs/aitabsview.css +6 -1
  324. package/theme/common/aibutton.css +0 -4
  325. package/theme/common/aiheader.css +1 -0
  326. package/src/aiquickactions/utils/common-translations.d.ts +0 -9
  327. package/src/aiquickactions/utils/common-translations.js +0 -23
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x5ccb75=_0x77ff;(function(_0x5d202c,_0x4dc494){const _0x5953ca=_0x77ff,_0x1a314a=_0x5d202c();while(!![]){try{const _0x1a889b=-parseInt(_0x5953ca(0x200))/0x1+-parseInt(_0x5953ca(0x2a8))/0x2*(parseInt(_0x5953ca(0x29f))/0x3)+parseInt(_0x5953ca(0x24b))/0x4*(-parseInt(_0x5953ca(0x255))/0x5)+-parseInt(_0x5953ca(0x248))/0x6+-parseInt(_0x5953ca(0x227))/0x7*(parseInt(_0x5953ca(0x20c))/0x8)+-parseInt(_0x5953ca(0x2a1))/0x9+parseInt(_0x5953ca(0x241))/0xa;if(_0x1a889b===_0x4dc494)break;else _0x1a314a['push'](_0x1a314a['shift']());}catch(_0x55e894){_0x1a314a['push'](_0x1a314a['shift']());}}}(_0x34fb,0xc5484));import{ContextPlugin as _0x38ea84,Editor as _0x59994c}from'ckeditor5/src/core.js';function _0x77ff(_0x48cdc9,_0x132993){const _0x34fbcf=_0x34fb();return _0x77ff=function(_0x77ff13,_0x315318){_0x77ff13=_0x77ff13-0x18d;let _0x45228e=_0x34fbcf[_0x77ff13];return _0x45228e;},_0x77ff(_0x48cdc9,_0x132993);}import{CKEditorError as _0x175785,logError as _0x39aa5f,scrollViewportToShowTarget as _0x2b5e1d,uid as _0x4780ab}from'ckeditor5/src/utils.js';import{AIConnector as _0x4a511e}from'../aicore/aiconnector.js';import{AITabs as _0x37e958}from'../aitabs/aitabs.js';import{AIChatConversation as _0xafa66f}from'./model/aichatconversation.js';import{getTranslation as _0x1acc5f}from'../aicore/utils/common-translations.js';import{AI_VISUAL_SELECTION_MARKER_NAME as _0x55ea50}from'../aicore/aiediting.js';import{AIChatModels as _0x4ff5e}from'./model/aichatmodels.js';import{getEditorFromContext as _0xf681fe}from'../aicore/utils/geteditorfromcontext.js';import{DocumentCompare as _0x571329,DATA_ID_MODEL_ATTRIBUTE as _0x214b0f}from'@ckeditor/ckeditor5-collaboration-core';import{getOperationsFromReply as _0x2e0d63}from'../aicore/utils/getoperationsfromreply.js';import{expandSelectionWithContext as _0x11f371,getMinimalSelection as _0x3376ea,getSuggestionPartsFromReply as _0x8892ff}from'../aicore/utils/getsuggestionpartsfromreply.js';import{ModelRange as _0x47ac46,_DetachOperation as _0xebdfd9}from'ckeditor5/src/engine.js';import{findOne as _0x40b3aa,getAttribute as _0x106f93,serialize as _0x3024ef,Document as _0x234039,findByAttribute as _0x4e3f7f}from'../aicore/utils/htmlparser.js';import{IconAI as _0x12fa78}from'@ckeditor/ckeditor5-icons';function _0x34fb(){const _0x2f4a50=['ai-request-aborted','chat','forEach','stopInteraction','Showing\x20conversation\x20history...','undo','removeContextItem','interactionFinished','_showConversationHistory','isPremiumPlugin','root','_removeFromContext','abortPromptStream','resetMessageInput','_previewedChangeGroup','isOpen','ai-conversation-','like','_stopLastInteraction','Failed\x20to\x20load\x20conversation','$graveyard','_openBalloonFor','main','showPrevious','resourceStateChanged','rejected','open','_logError','contextItems','listenTo','AI_CHAT_UNABLE_TO_START_CONVERSATION','init','isStarted','uploadProgressChanged','removeSelectionFromContext','replyCreated','showDiff','getChild','toggleLoadingSkeleton','query','streaming','addFeedItemAIReply','addCurrentDocumentToContext','message','commands','afterInit','ai-chat-file-upload-failed','interactionCreated','sendMessage','_flushLastInteractionUI','stop','AIEditing','current-document','accepted','resize','collaboration.channelId','documentContextContent','_filterModels','uiId','hideFakeVisualSelection','view','document','addFeedItemError','_aiEditing','requires','interactionId','removed','_getDocumentRangeForReplyChanges','closeSourceResourceBalloon','sources','contextItemAdded','error','setIsUploadInProgress','conversationInitialized','isOfficialPlugin','_setIsMaximized','unshift','sendUserMessage','data-id','getInteractionAndReplyById','_insertSuggestion','addUrlToContext','find','toViewRange','_applySuggestion','contextSent','isLoading','resource','DocumentCompare','handleUserInteraction','activeConversation','resources','addOperation','AITabs','remove','startInteraction','markers','isDocumentOperation','sourcePosition','AI_CHAT_CONTEXT_UNABLE_TO_LOAD_RESOURCES','ai-chat-source-resources-load-failed','indexes','contextItemRemoved','getChildAtOffset','editors','createRange','config','addSelectionToContext','startsWith','new','node','getAttribute','batch','createPositionFromPath','scrollFeedToSuggestion','history','ai-chat-controller-mouse-over','push','addFeedInteractionHeader','options','showNext','isUploadInProgress','_toggleReasoning','ai-chat-conversation-start-failed','_aiConnector','selection','pluginName','stopListening','delete','addDocumentToContext','setConversationContext','getPath','871016cUsUDB','AIChatController','locale','replies','text-delta','selectModel','domConverter','interactionDestroyed','getMarkersGroup','startConversation','has','toString','608XjEDTG','finishInteraction','populateSourceResourceBalloon','editing','setContextItemLoading','source','replyContentUpdated','map','clearPendingContextUI','_balloonShowDiff','range','ai-chat-context-invalid-data','replyId','getChildren','nextSibling','createPositionAt','revert','version','Liked\x20response','modification-delta','insertSuggestion','loadSourceResources','indexOf','viewRangeToDom','updateFeedItemAIReplySuggestionPartState','_handleUIUserMessage','close','13923UrVroV','applyOperation','_updateReplyContent','AI_CHAT_CONTEXT_UNSUPPORTED_TYPE','updateCapabilities','plugins','_createFromRanges','Undo','addContextItem','modelSelected','updateFeedItemAIReplySuggestionContent','split','baseVersion','_toggleWebSearch','howMany','toggleSuggestionDisplayMode','AI_CHAT_CONTEXT_UNABLE_TO_UPLOAD_URL','state','parse','_aiChatUi','contextItemLoadingEnded','replyChangeGroupStateUpdated','filter','partIndex','addContextOptionsChanged','toggleReasoning','43196050SDepVN','AI_BALLOON_HEADER_TITLE','mouseOverSuggestion','rejectSuggestion','updateFeedInteractionHeader','applySuggestion','focusPromptInput','724500NTgNpF','AI_CHAT_ABORTED_MESSAGE','toggleWebSearch','1269780GmMzBP','getGroupId','addFeedItemAISuggestion','_batchToChanges','resetConversationTitle','model','isInContext','uid','AI_CHAT_GENERIC_ERROR','availableModels','20FkzLzK','removeFromContext','isCurrentDocumentInConversation','AIConnector','Disliked\x20response','addFileToContext','getReply','AI_CHAT_RESOURCE_LOAD_FAILED','showFakeVisualSelection','setIsMaximized','removeSelectionFromChatContext','ai-chat-resource-load-failed','addSelectionToChatContext','_handleStartConversation','getSelectionText','get','isCurrentDocumentInContext','path','ai-chat-conversation-init-failed','log','ai-chat-url-upload-failed','isDisabled','createConversation','ai-chat-controller-no-active-conversation','getRoot','contextItem','content','ai.chat.models.defaultModelId','cloneNode','getDiff','setSelectedModel','children','getOperations','length','resourceId','_integrateEditor','updateResourceState','loadConversation','name','setAddContextOptions','removeFeedInteraction','getDocumentContext','setChangeGroupState','dislike','mouseLeaveSuggestion','data','anchorId','_removeAISelectionMarkers','ai-chat-missing-channel-id','ai.chat.context','resizedTabs','updateFeedItemAIReplySources','string','pending','addFilesToContext','_scrollToSuggestionRange','activateTab','removeMarker','toLocaleLowerCase','dialogClosed','set','_applyOperationsAsSuggestions','sourceResourcesLoaded','full','updateConversationTitle','ai-chat-context-unsupported-type','change','setFeedItemRenderingStrategy','getTransformedByOperation','TrackChangesEditing','end','addResourceToContext','getFirstRange','context','777hbOLHp','resizeTabs','1626048MtvPNf','updateContent','getRanges','selectedModel','mapper','setConversationTitle','clearConversationContextUI','7090hNEbdI','updateFeedItemAIReplyContent','lastInteraction','AI_CHAT_CONTEXT_UNABLE_TO_UPLOAD_FILE','AI_CHAT_CONTEXT_INVALID_DATA','maxOffset','sourceId','redo','changeGroups','static','ready','type','AIChatUI','handleRemovedConversation','getDocumentData','ai.chat.models.displayedModels','changes','alignToTop','from','AI_CHAT_CONTEXT_CURRENT_DOCUMENT','capabilitiesUpdated','start','updateCurrentDocumentInContext','rootName','provider','AI_CHAT_UNTITLED_CONVERSATION','addFeedItemStaticMessage','getInteraction','setModel','interactionStarted','load','_aiChatModels','slice','add','addFeedItemUserMessage','showChangeInText'];_0x34fb=function(){return _0x2f4a50;};return _0x34fb();}import{AISuggestionContainerView as _0x1038b6}from'../aicore/ui/suggestioncontainer/aisuggestioncontainerview.js';import{AIBalloon as _0x1785af}from'../aiballoon/aiballoon.js';export class AIChatController extends _0x38ea84{[_0x5ccb75(0x1bb)];[_0x5ccb75(0x1f8)];[_0x5ccb75(0x23a)];[_0x5ccb75(0x2c7)];[_0x5ccb75(0x24e)]=new Map();[_0x5ccb75(0x2da)]=null;[_0x5ccb75(0x215)]=!0x1;static get[_0x5ccb75(0x1bc)](){return[_0x4a511e,_0x1785af,_0x571329];}static get[_0x5ccb75(0x1fa)](){const _0x166cac=_0x5ccb75;return _0x166cac(0x201);}static get[_0x5ccb75(0x1c6)](){return!0x0;}static get[_0x5ccb75(0x2d5)](){return!0x0;}[_0x5ccb75(0x19b)](){const _0x21cd95=_0x5ccb75;this[_0x21cd95(0x1f8)]=this[_0x21cd95(0x29e)][_0x21cd95(0x22c)][_0x21cd95(0x264)](_0x21cd95(0x258)),this[_0x21cd95(0x23a)]=this[_0x21cd95(0x29e)][_0x21cd95(0x22c)][_0x21cd95(0x264)](_0x21cd95(0x2b4)),this[_0x21cd95(0x1bb)]=this[_0x21cd95(0x29e)][_0x21cd95(0x22c)][_0x21cd95(0x264)](_0x21cd95(0x1af)),this[_0x21cd95(0x2c7)]=new _0x4ff5e({'connector':this[_0x21cd95(0x1f8)]});const _0x4671d4=this[_0x21cd95(0x29e)][_0x21cd95(0x22c)][_0x21cd95(0x264)](_0x21cd95(0x1d9));this[_0x21cd95(0x199)](this[_0x21cd95(0x23a)],_0x21cd95(0x209),()=>{const _0x56d33a=_0x21cd95;this[_0x56d33a(0x262)]();}),this[_0x21cd95(0x199)](this[_0x21cd95(0x23a)],_0x21cd95(0x1c9),(_0x54f60c,_0x1d1be)=>{const _0x376c8c=_0x21cd95;this[_0x376c8c(0x225)]({'userMessage':_0x1d1be});}),this[_0x21cd95(0x199)](_0x4671d4,_0x21cd95(0x287),(_0x395726,_0xb706b3)=>{const _0x4c9d3b=_0x21cd95;this[_0x4c9d3b(0x1c7)](_0xb706b3);}),this[_0x21cd95(0x199)](this[_0x21cd95(0x23a)],_0x21cd95(0x2a0),()=>{const _0x45bc3d=_0x21cd95;_0x4671d4[_0x45bc3d(0x1b2)]();}),this[_0x21cd95(0x199)](this[_0x21cd95(0x23a)],_0x21cd95(0x2d8),async()=>{const _0x1f2166=_0x21cd95;await this[_0x1f2166(0x18e)](),await this[_0x1f2166(0x1ad)]();}),this[_0x21cd95(0x199)](this[_0x21cd95(0x23a)],_0x21cd95(0x1fd),()=>{const _0x4a3e8a=_0x21cd95;this[_0x4a3e8a(0x1d6)]?.[_0x4a3e8a(0x1a6)](_0x1acc5f(this[_0x4a3e8a(0x29e)][_0x4a3e8a(0x202)],_0x4a3e8a(0x2bb)));}),this[_0x21cd95(0x199)](this[_0x21cd95(0x23a)],_0x21cd95(0x25a),(_0x2952b5,_0x310f40)=>{const _0x4f8893=_0x21cd95;this[_0x4f8893(0x1d6)]?.[_0x4f8893(0x28b)](Array[_0x4f8893(0x2ba)](_0x310f40));}),this[_0x21cd95(0x199)](this[_0x21cd95(0x23a)],_0x21cd95(0x1cd),(_0x3d09df,_0x32ac1b)=>{const _0x3ea647=_0x21cd95;this[_0x3ea647(0x1d6)]?.[_0x3ea647(0x1cd)](_0x32ac1b);}),this[_0x21cd95(0x199)](this[_0x21cd95(0x23a)],_0x21cd95(0x29c),(_0x5368f3,_0x1f0c05)=>{const _0x129c8a=_0x21cd95;this[_0x129c8a(0x1d6)]?.[_0x129c8a(0x29c)](_0x1f0c05[_0x129c8a(0x211)],_0x1f0c05[_0x129c8a(0x1d3)]);}),this[_0x21cd95(0x199)](this[_0x21cd95(0x23a)],_0x21cd95(0x2d2),(_0x461a93,_0x115baa)=>{const _0x45ec34=_0x21cd95;this[_0x45ec34(0x2d7)](_0x115baa);}),this[_0x21cd95(0x199)](this[_0x21cd95(0x23a)],_0x21cd95(0x221),(_0x240de8,_0x7ca23f)=>{const _0x54e27e=_0x21cd95;this[_0x54e27e(0x1d6)]?.[_0x54e27e(0x221)](_0x7ca23f[_0x54e27e(0x2ae)],_0x7ca23f[_0x54e27e(0x1a3)],_0x7ca23f[_0x54e27e(0x252)]);}),this[_0x21cd95(0x199)](this[_0x21cd95(0x23a)],_0x21cd95(0x24a),()=>{const _0x116767=_0x21cd95;this[_0x116767(0x234)]();}),this[_0x21cd95(0x199)](this[_0x21cd95(0x23a)],_0x21cd95(0x240),()=>{const _0x2dc651=_0x21cd95;this[_0x2dc651(0x1f6)]();}),this[_0x21cd95(0x199)](this[_0x21cd95(0x23a)],_0x21cd95(0x205),(_0x572fc4,_0x439712)=>{const _0xa977ee=_0x21cd95;this[_0xa977ee(0x1d6)]?.[_0xa977ee(0x2c4)](_0x439712);}),this[_0x21cd95(0x199)](this[_0x21cd95(0x23a)],_0x21cd95(0x18d),(_0x4bb6c2,{replyId:_0x2891e2})=>{const _0x5935dd=_0x21cd95;console[_0x5935dd(0x268)](_0x5935dd(0x21e),_0x2891e2);}),this[_0x21cd95(0x199)](this[_0x21cd95(0x23a)],_0x21cd95(0x280),(_0x4181c2,{replyId:_0x4fbf07})=>{const _0x57fc5f=_0x21cd95;console[_0x57fc5f(0x268)](_0x57fc5f(0x259),_0x4fbf07);}),this[_0x21cd95(0x199)](this[_0x21cd95(0x23a)],_0x21cd95(0x220),(_0x3c44da,_0x820edc)=>{const _0x32cd95=_0x21cd95;this[_0x32cd95(0x29e)][_0x32cd95(0x22c)][_0x32cd95(0x264)](_0x1785af)[_0x32cd95(0x226)](),this[_0x32cd95(0x1cc)](_0x820edc);}),this[_0x21cd95(0x199)](this[_0x21cd95(0x23a)],_0x21cd95(0x2cb),(_0x3ed690,{replyId:_0x5b05a2,partIndex:_0x4557bf})=>{const _0x17184b=_0x21cd95;this[_0x17184b(0x215)]=this[_0x17184b(0x23a)][_0x17184b(0x1a0)],this[_0x17184b(0x191)](_0x5b05a2,_0x4557bf);}),this[_0x21cd95(0x199)](this[_0x21cd95(0x23a)],_0x21cd95(0x243),(_0x17a025,{replyId:_0x30cb45,partIndex:_0x138bfd})=>{const _0x5923c4=_0x21cd95,_0x4f1d69=this[_0x5923c4(0x1bf)](_0x30cb45,_0x138bfd);_0x4f1d69&&_0x5923c4(0x190)!=_0x4f1d69[_0x5923c4(0x216)][_0x5923c4(0x2d6)][_0x5923c4(0x2bf)]&&this[_0x5923c4(0x1bb)][_0x5923c4(0x25d)]([_0x4f1d69[_0x5923c4(0x216)]],_0x5923c4(0x1f0));}),this[_0x21cd95(0x199)](this[_0x21cd95(0x23a)],_0x21cd95(0x281),()=>{const _0x543937=_0x21cd95;this[_0x543937(0x1bb)][_0x543937(0x1b7)](_0x543937(0x1f0));}),this[_0x21cd95(0x199)](this[_0x21cd95(0x23a)],_0x21cd95(0x246),(_0xdf1838,_0x51fa64)=>{const _0x29e3c6=_0x21cd95;this[_0x29e3c6(0x29e)][_0x29e3c6(0x22c)][_0x29e3c6(0x264)](_0x1785af)[_0x29e3c6(0x226)](),this[_0x29e3c6(0x1d0)](_0x51fa64);}),this[_0x21cd95(0x199)](this[_0x21cd95(0x23a)],_0x21cd95(0x236),async(_0x124493,_0x385a8b)=>{const _0x11b6b6=_0x21cd95,{reply:_0x219d58}=this[_0x11b6b6(0x1cb)](_0x385a8b[_0x11b6b6(0x218)]),_0x56c3b7=_0xf681fe(this[_0x11b6b6(0x29e)]),_0x5c7943=_0x8892ff({'editor':_0x56c3b7,'changeGroups':_0x219d58[_0x11b6b6(0x2b0)],'documentContextContent':_0x219d58[_0x11b6b6(0x1b4)],'showDiff':_0x385a8b[_0x11b6b6(0x1a0)]});await this[_0x11b6b6(0x23a)][_0x11b6b6(0x231)]({'id':_0x219d58['id'],'parts':_0x5c7943,'renderingStrategy':_0x11b6b6(0x2b1)});}),this[_0x21cd95(0x199)](this[_0x21cd95(0x23a)],_0x21cd95(0x244),(_0x568608,{replyId:_0x170287,partIndex:_0x532def})=>{const _0x56c2db=_0x21cd95;this[_0x56c2db(0x2da)]?.[_0x56c2db(0x218)]==_0x170287&&this[_0x56c2db(0x2da)]?.[_0x56c2db(0x23e)]==_0x532def&&this[_0x56c2db(0x29e)][_0x56c2db(0x22c)][_0x56c2db(0x264)](_0x1785af)[_0x56c2db(0x226)]();const {reply:_0x1b86c1}=this[_0x56c2db(0x1cb)](_0x170287);_0x1b86c1[_0x56c2db(0x27f)](_0x532def,_0x56c2db(0x195)),this[_0x56c2db(0x1bb)][_0x56c2db(0x1b7)](_0x56c2db(0x1f0));});}async[_0x5ccb75(0x1a9)](){const _0x26461c=_0x5ccb75;this[_0x26461c(0x29e)]instanceof _0x59994c?this[_0x26461c(0x278)](this[_0x26461c(0x29e)]):this[_0x26461c(0x199)](this[_0x26461c(0x29e)][_0x26461c(0x1e4)],_0x26461c(0x2c9),(_0x5d2730,_0x3baf59)=>{const _0x47c97d=_0x26461c;_0x3baf59['on'](_0x47c97d(0x2b2),()=>{const _0x2b947e=_0x47c97d;this[_0x2b947e(0x278)](_0x3baf59);});}),await this[_0x26461c(0x262)]();}[_0x5ccb75(0x1cc)](_0x34df69){const _0x116cbc=_0x5ccb75,_0x3267de=_0xf681fe(this[_0x116cbc(0x29e)]);if(!_0x3267de[_0x116cbc(0x22c)][_0x116cbc(0x20a)](_0x116cbc(0x29a)))return;const _0x466ddd=this[_0x116cbc(0x29e)][_0x116cbc(0x22c)][_0x116cbc(0x264)](_0x116cbc(0x1d4)),{reply:_0x5441ea,interaction:_0x454549}=this[_0x116cbc(0x1cb)](_0x34df69[_0x116cbc(0x218)]),_0x351429=this[_0x116cbc(0x1bf)](_0x34df69[_0x116cbc(0x218)],_0x34df69[_0x116cbc(0x23e)]),_0x598144=void 0x0!==_0x34df69[_0x116cbc(0x23e)]?[_0x5441ea[_0x116cbc(0x2b0)][_0x34df69[_0x116cbc(0x23e)]]]:_0x5441ea[_0x116cbc(0x2b0)][_0x116cbc(0x23d)](_0x4b7e2d=>_0x116cbc(0x28a)==_0x4b7e2d[_0x116cbc(0x238)]),_0x1f9b90=_0x598144[_0x116cbc(0x213)](_0x402a19=>_0x5441ea[_0x116cbc(0x2b0)][_0x116cbc(0x222)](_0x402a19));_0x1f9b90[_0x116cbc(0x2ce)](_0x1f25ca=>_0x5441ea[_0x116cbc(0x27f)](_0x1f25ca,_0x116cbc(0x1b1)));const _0x433e29=_0x2e0d63({'editor':_0x3267de,'reply':_0x5441ea,'interaction':_0x454549,'groups':_0x598144,'transform':!0x0,'documentCompare':_0x466ddd,'documentCompareOptions':{'anchor':_0x116cbc(0x192),'markDeletions':!0x0}});let _0x262667;_0x351429&&this[_0x116cbc(0x28c)](_0x351429[_0x116cbc(0x216)]),_0x3267de[_0x116cbc(0x250)][_0x116cbc(0x297)](_0x1aad10=>{const _0x3b53ca=_0x116cbc;_0x262667=_0x1aad10[_0x3b53ca(0x1ec)],_0x3267de[_0x3b53ca(0x22c)][_0x3b53ca(0x264)](_0x3b53ca(0x29a))[_0x3b53ca(0x292)](_0x433e29),this[_0x3b53ca(0x1bb)][_0x3b53ca(0x1b7)](_0x3b53ca(0x1f0));}),this[_0x116cbc(0x24e)][_0x116cbc(0x291)](_0x262667,{'interactionId':_0x454549['id'],'replyId':_0x5441ea['id'],'indexes':_0x1f9b90[_0x116cbc(0x2c8)]()});}[_0x5ccb75(0x1d0)](_0x1dc724){const _0x2c930c=_0x5ccb75,_0x4d8b69=_0xf681fe(this[_0x2c930c(0x29e)]),_0x43f923=this[_0x2c930c(0x29e)][_0x2c930c(0x22c)][_0x2c930c(0x264)](_0x571329),{reply:_0xb490f1,interaction:_0x114db5}=this[_0x2c930c(0x1cb)](_0x1dc724[_0x2c930c(0x218)]),_0x2831b2=this[_0x2c930c(0x1bf)](_0x1dc724[_0x2c930c(0x218)],_0x1dc724[_0x2c930c(0x23e)]),_0x5d8219=void 0x0!==_0x1dc724[_0x2c930c(0x23e)]?[_0xb490f1[_0x2c930c(0x2b0)][_0x1dc724[_0x2c930c(0x23e)]]]:_0xb490f1[_0x2c930c(0x2b0)][_0x2c930c(0x23d)](_0x227752=>_0x2c930c(0x28a)==_0x227752[_0x2c930c(0x238)]),_0x34604f=_0x5d8219[_0x2c930c(0x213)](_0xaf16d4=>_0xb490f1[_0x2c930c(0x2b0)][_0x2c930c(0x222)](_0xaf16d4));_0x34604f[_0x2c930c(0x2ce)](_0x2dcd12=>_0xb490f1[_0x2c930c(0x27f)](_0x2dcd12,_0x2c930c(0x1b1)));const _0x22a56a=_0x2e0d63({'editor':_0x4d8b69,'reply':_0xb490f1,'interaction':_0x114db5,'groups':_0x5d8219,'transform':!0x0,'documentCompare':_0x43f923,'documentCompareOptions':{'anchor':_0x2c930c(0x192),'markDeletions':!0x1}});let _0x1c5d71;_0x2831b2&&this[_0x2c930c(0x28c)](_0x2831b2[_0x2c930c(0x216)]),_0x4d8b69[_0x2c930c(0x250)][_0x2c930c(0x297)](_0x128c7b=>{const _0x509929=_0x2c930c;_0x1c5d71=_0x128c7b[_0x509929(0x1ec)];for(const _0x36835d of _0x22a56a)_0x36835d[_0x509929(0x233)]=_0x4d8b69[_0x509929(0x250)][_0x509929(0x1b9)][_0x509929(0x21d)],_0x128c7b[_0x509929(0x1ec)][_0x509929(0x1d8)](_0x36835d),_0x4d8b69[_0x509929(0x250)][_0x509929(0x228)](_0x36835d);}),this[_0x2c930c(0x24e)][_0x2c930c(0x291)](_0x1c5d71,{'interactionId':_0x114db5['id'],'replyId':_0xb490f1['id'],'indexes':_0x34604f[_0x2c930c(0x2c8)]()});}[_0x5ccb75(0x191)](_0x249a76,_0x326266){const _0x36e621=_0x5ccb75,_0x395a55=_0xf681fe(this[_0x36e621(0x29e)]),_0x395f2c=this[_0x36e621(0x1bf)](_0x249a76,_0x326266),_0xf3fc05=this[_0x36e621(0x29e)][_0x36e621(0x22c)][_0x36e621(0x264)](_0x1785af);if(!_0x395f2c)return void _0xf3fc05[_0x36e621(0x226)]();const {range:_0x23bab7,currentIndex:_0x423fe3,previousIndex:_0x4c5cc5,nextIndex:_0x3c375b}=_0x395f2c;if(this[_0x36e621(0x2da)]?.[_0x36e621(0x218)]==_0x249a76&&this[_0x36e621(0x2da)]?.[_0x36e621(0x23e)]==_0x423fe3)return;this[_0x36e621(0x2da)]={'replyId':_0x249a76,'partIndex':_0x423fe3};const _0xe7d04f=new _0x1038b6(_0x395a55[_0x36e621(0x202)],{'showDiff':this[_0x36e621(0x215)],'areActionsDisabled':!0x1,'miniToolbarConfig':{'showChanges':_0x36e621(0x294)},'hideHeader':!0x0}),{reply:_0x1e1166}=this[_0x36e621(0x1cb)](_0x249a76),_0x56c3f2=_0x8892ff({'editor':_0x395a55,'changeGroups':[_0x1e1166[_0x36e621(0x2b0)][_0x423fe3]],'documentContextContent':_0x1e1166[_0x36e621(0x1b4)],'showDiff':this[_0x36e621(0x215)]});_0xe7d04f[_0x36e621(0x2a2)]({'parts':_0x56c3f2,'renderingStrategy':_0x36e621(0x2b1)});const _0x329671=_0x423fe3!==_0x4c5cc5;this[_0x36e621(0x28c)](_0x23bab7,!0x0),_0xf3fc05[_0x36e621(0x196)]({'index':_0x423fe3,'title':_0x1acc5f(this[_0x36e621(0x29e)][_0x36e621(0x202)],_0x36e621(0x242),(_0x423fe3+0x1)[_0x36e621(0x20b)]()),'icon':_0x12fa78,'mainView':_0xe7d04f,'showRotator':_0x329671,'showApplyButton':!0x0,'showSuggestButton':!0x0,'ranges':[_0x23bab7]}),this[_0x36e621(0x23a)][_0x36e621(0x1ee)](_0x249a76,_0x423fe3),this[_0x36e621(0x199)](_0xe7d04f,_0x36e621(0x236),(_0x3c9a69,{showDiff:_0x4f4df7})=>{const _0x1eafaa=_0x36e621;this[_0x1eafaa(0x215)]=_0x4f4df7;const {reply:_0x44cbb9}=this[_0x1eafaa(0x1cb)](_0x249a76),_0x2742b5=_0x8892ff({'editor':_0x395a55,'changeGroups':[_0x44cbb9[_0x1eafaa(0x2b0)][_0x423fe3]],'documentContextContent':_0x44cbb9[_0x1eafaa(0x1b4)],'showDiff':_0x4f4df7});_0xe7d04f[_0x1eafaa(0x2a2)]({'parts':_0x2742b5,'renderingStrategy':_0x1eafaa(0x2b1)});}),this[_0x36e621(0x199)](_0xf3fc05,_0x36e621(0x246),()=>{const _0x6c06ca=_0x36e621;this[_0x6c06ca(0x1d0)]({'replyId':_0x249a76,'partIndex':_0x423fe3}),_0x329671?this[_0x6c06ca(0x191)](_0x249a76,_0x3c375b):_0xf3fc05[_0x6c06ca(0x226)]();}),this[_0x36e621(0x199)](_0xf3fc05,_0x36e621(0x220),()=>{const _0x258362=_0x36e621;this[_0x258362(0x1cc)]({'replyId':_0x249a76,'partIndex':_0x423fe3}),_0x329671?this[_0x258362(0x191)](_0x249a76,_0x3c375b):_0xf3fc05[_0x258362(0x226)]();}),_0x329671&&(this[_0x36e621(0x199)](_0xf3fc05,_0x36e621(0x1f4),()=>{const _0x4f0df5=_0x36e621;this[_0x4f0df5(0x191)](_0x249a76,_0x3c375b);}),this[_0x36e621(0x199)](_0xf3fc05,_0x36e621(0x193),()=>{const _0x4311e2=_0x36e621;this[_0x4311e2(0x191)](_0x249a76,_0x4c5cc5);})),this[_0x36e621(0x199)](_0xf3fc05,_0x36e621(0x290),()=>{const _0x436a4b=_0x36e621;this[_0x436a4b(0x1fb)](_0xf3fc05),this[_0x436a4b(0x1fb)](_0xe7d04f),this[_0x436a4b(0x2da)]=null;});}[_0x5ccb75(0x1bf)](_0x5b8db3,_0xbbd790){const _0x17d7bd=_0x5ccb75,_0x1427fa=_0xf681fe(this[_0x17d7bd(0x29e)]),{reply:_0x21a85b,interaction:_0x2671cb}=this[_0x17d7bd(0x1cb)](_0x5b8db3),_0x16f834=_0x21a85b[_0x17d7bd(0x2b0)][_0x17d7bd(0x23d)](_0xeb637a=>_0x17d7bd(0x28a)==_0xeb637a[_0x17d7bd(0x238)]),_0x20534b=_0x16f834[_0x17d7bd(0x213)](_0x3c705f=>_0x21a85b[_0x17d7bd(0x2b0)][_0x17d7bd(0x222)](_0x3c705f));void 0x0===_0xbbd790&&(_0xbbd790=_0x20534b[0x0]);const _0xc42e4b=_0x20534b[_0x17d7bd(0x222)](_0xbbd790);if(-0x1==_0xc42e4b)return null;const _0x258186=0x0==_0xc42e4b?_0x20534b[_0x20534b[_0x17d7bd(0x276)]-0x1]:_0x20534b[_0xc42e4b-0x1],_0x430cb7=_0xc42e4b==_0x20534b[_0x17d7bd(0x276)]-0x1?_0x20534b[0x0]:_0x20534b[_0xc42e4b+0x1],_0x22f36b=_0x16f834[_0xc42e4b],_0x5eb561=new _0x234039([]),_0x245ff5=new _0x234039([]);for(const _0x214aa3 of _0x22f36b[_0x17d7bd(0x2b8)])if(_0x17d7bd(0x1be)!=_0x214aa3[_0x17d7bd(0x2b3)]&&_0x245ff5[_0x17d7bd(0x274)][_0x17d7bd(0x1f1)](_0x214aa3[_0x17d7bd(0x1ea)][_0x17d7bd(0x271)](!0x0)),_0x17d7bd(0x1e9)!=_0x214aa3[_0x17d7bd(0x2b3)]){const _0x224525=_0x40b3aa(_0x230077=>_0x106f93(_0x230077,_0x17d7bd(0x1ca))==_0x214aa3['id'],_0x21a85b[_0x17d7bd(0x1b4)],!0x0);_0x5eb561[_0x17d7bd(0x274)][_0x17d7bd(0x1f1)](_0x224525[_0x17d7bd(0x271)](!0x0));}if(0x0==_0x5eb561[_0x17d7bd(0x274)][_0x17d7bd(0x276)]){if(_0x22f36b[_0x17d7bd(0x2b8)][0x0][_0x17d7bd(0x283)]){const _0x174a46=_0x4e3f7f(_0x17d7bd(0x1ca),_0x22f36b[_0x17d7bd(0x2b8)][0x0][_0x17d7bd(0x283)],_0x21a85b[_0x17d7bd(0x1b4)]);_0x5eb561[_0x17d7bd(0x274)][_0x17d7bd(0x1c8)](_0x174a46[_0x17d7bd(0x271)](!0x0)),_0x245ff5[_0x17d7bd(0x274)][_0x17d7bd(0x1c8)](_0x174a46[_0x17d7bd(0x271)](!0x0)),_0x174a46[_0x17d7bd(0x21a)]&&(_0x5eb561[_0x17d7bd(0x274)][_0x17d7bd(0x1f1)](_0x174a46[_0x17d7bd(0x21a)][_0x17d7bd(0x271)](!0x0)),_0x245ff5[_0x17d7bd(0x274)][_0x17d7bd(0x1f1)](_0x174a46[_0x17d7bd(0x21a)][_0x17d7bd(0x271)](!0x0)));}else{const _0x7eb988=_0x21a85b[_0x17d7bd(0x1b4)][_0x17d7bd(0x274)][0x0];if(!_0x7eb988)return null;_0x5eb561[_0x17d7bd(0x274)][_0x17d7bd(0x1f1)](_0x7eb988[_0x17d7bd(0x271)](!0x0)),_0x245ff5[_0x17d7bd(0x274)][_0x17d7bd(0x1f1)](_0x7eb988[_0x17d7bd(0x271)](!0x0));}}const _0x294449=_0x2671cb[_0x17d7bd(0x27e)](),_0x299fc6=_0x1427fa[_0x17d7bd(0x282)][_0x17d7bd(0x239)](_0x294449[_0x17d7bd(0x26f)]),_0x3b8984=_0x3024ef(_0x5eb561),_0x235078=_0x1427fa[_0x17d7bd(0x282)][_0x17d7bd(0x239)](_0x3b8984),_0x3bb753=_0x1427fa[_0x17d7bd(0x282)][_0x17d7bd(0x239)](_0x3b8984),_0x1f8c55=_0x1427fa[_0x17d7bd(0x250)][_0x17d7bd(0x21b)](_0x235078,0x0),_0x5aa325=_0x3024ef(_0x245ff5),_0x2311f6={'anchor':_0x1f8c55,'markDeletions':!0x1},_0x4b78f3=_0x1427fa[_0x17d7bd(0x22c)][_0x17d7bd(0x264)](_0x571329)[_0x17d7bd(0x272)](_0x3b8984,_0x5aa325,_0x2311f6)[_0x17d7bd(0x275)]();if(!_0x4b78f3[_0x17d7bd(0x276)])return null;_0x1427fa[_0x17d7bd(0x250)][_0x17d7bd(0x297)](_0x5ef0c4=>{const _0x39ecbf=_0x17d7bd;for(const _0x4fe312 of _0x4b78f3)if(_0x39ecbf(0x1da)==_0x4fe312[_0x39ecbf(0x2b3)]){const _0x1331ae=_0x4fe312[_0x39ecbf(0x1de)],_0x2d3125=_0x4fe312[_0x39ecbf(0x235)],_0x47be5f=new _0xebdfd9(_0x1331ae,_0x2d3125);_0x5ef0c4[_0x39ecbf(0x1ec)][_0x39ecbf(0x1d8)](_0x47be5f),_0x1427fa[_0x39ecbf(0x250)][_0x39ecbf(0x228)](_0x47be5f);}else _0x4fe312[_0x39ecbf(0x233)]=null,_0x4fe312[_0x39ecbf(0x1dd)]=!0x1,_0x5ef0c4[_0x39ecbf(0x1ec)][_0x39ecbf(0x1d8)](_0x4fe312),_0x1427fa[_0x39ecbf(0x250)][_0x39ecbf(0x228)](_0x4fe312);});const _0x3d5c96=_0x3376ea(_0x1427fa,_0x4b78f3,_0x235078);_0x11f371(_0x1427fa[_0x17d7bd(0x250)],_0x3d5c96);const _0x4016ed=_0x3d5c96[_0x17d7bd(0x29d)]()[_0x17d7bd(0x2bd)][_0x17d7bd(0x266)][_0x17d7bd(0x2c8)](),_0x5a14e6=_0x3d5c96[_0x17d7bd(0x29d)]()[_0x17d7bd(0x29b)][_0x17d7bd(0x266)][_0x17d7bd(0x2c8)](),_0x259b45=[];let _0x4d7184=_0x235078,_0x15fd6a=_0x3bb753;for(let _0x55ffda=0x0;_0x55ffda<_0x5a14e6[_0x17d7bd(0x276)];_0x55ffda++){const _0x18b996=_0x4d7184[_0x17d7bd(0x2ad)]-_0x5a14e6[_0x55ffda];_0x259b45[_0x55ffda]=_0x15fd6a[_0x17d7bd(0x2ad)]-_0x18b996,_0x4d7184=_0x4d7184[_0x17d7bd(0x1e3)](_0x5a14e6[_0x55ffda]),_0x15fd6a=_0x15fd6a[_0x17d7bd(0x1e3)](_0x259b45[_0x55ffda]);}const _0x244755=_0x1427fa[_0x17d7bd(0x250)][_0x17d7bd(0x1e5)](_0x1427fa[_0x17d7bd(0x250)][_0x17d7bd(0x1ed)](_0x3bb753,_0x4016ed),_0x1427fa[_0x17d7bd(0x250)][_0x17d7bd(0x1ed)](_0x3bb753,_0x259b45)),_0x3517be=_0x3bb753[_0x17d7bd(0x1a1)](0x0)[_0x17d7bd(0x1eb)](_0x214b0f),_0x422181=Array[_0x17d7bd(0x2ba)](_0x299fc6[_0x17d7bd(0x219)]())[_0x17d7bd(0x1ce)](_0x419899=>_0x419899[_0x17d7bd(0x1eb)](_0x214b0f)==_0x3517be)[_0x17d7bd(0x1ff)](),_0x20da90=_0x244755[_0x17d7bd(0x2bd)][_0x17d7bd(0x266)][_0x17d7bd(0x2c8)](),_0xae7ace=_0x244755[_0x17d7bd(0x29b)][_0x17d7bd(0x266)][_0x17d7bd(0x2c8)]();_0x20da90[0x0]=_0x422181[0x0]+_0x20da90[0x0],_0xae7ace[0x0]=_0x422181[0x0]+_0xae7ace[0x0];let _0x5c0033=_0x1427fa[_0x17d7bd(0x250)][_0x17d7bd(0x1e5)](_0x1427fa[_0x17d7bd(0x250)][_0x17d7bd(0x1ed)](_0x1427fa[_0x17d7bd(0x250)][_0x17d7bd(0x1b9)][_0x17d7bd(0x26d)](),_0x20da90),_0x1427fa[_0x17d7bd(0x250)][_0x17d7bd(0x1ed)](_0x1427fa[_0x17d7bd(0x250)][_0x17d7bd(0x1b9)][_0x17d7bd(0x26d)](),_0xae7ace));const _0x136037=_0x1427fa[_0x17d7bd(0x250)][_0x17d7bd(0x1b9)][_0x17d7bd(0x1ef)][_0x17d7bd(0x275)](_0x294449[_0x17d7bd(0x21d)]);for(const _0x554b3d of _0x136037)_0x5c0033=_0x47ac46[_0x17d7bd(0x22d)](_0x5c0033[_0x17d7bd(0x299)](_0x554b3d));return{'range':_0x5c0033,'previousIndex':_0x258186,'nextIndex':_0x430cb7,'currentIndex':_0xbbd790};}[_0x5ccb75(0x278)](_0x24d71b){const _0xf9494=_0x5ccb75;if(!_0x24d71b[_0xf9494(0x22c)][_0xf9494(0x20a)](_0xf9494(0x22e)))return;const _0x2351ca=_0x24d71b[_0xf9494(0x1a8)][_0xf9494(0x264)](_0xf9494(0x2d1)),_0x1c5f20=_0x24d71b[_0xf9494(0x1a8)][_0xf9494(0x264)](_0xf9494(0x2af));this[_0xf9494(0x199)](_0x2351ca,_0xf9494(0x21c),(_0x13edf3,_0x1d5eb5,_0x1ca07d)=>{const _0x2384d8=_0xf9494,_0x31c1b7=this[_0x2384d8(0x24e)][_0x2384d8(0x264)](_0x1d5eb5);if(!_0x31c1b7)return;const _0x18fc14=this[_0x2384d8(0x1d6)][_0x2384d8(0x2c3)](_0x31c1b7[_0x2384d8(0x1bd)])[_0x2384d8(0x25b)](_0x31c1b7[_0x2384d8(0x218)]);_0x31c1b7[_0x2384d8(0x1e1)][_0x2384d8(0x2ce)](_0x5ec62c=>_0x18fc14[_0x2384d8(0x27f)](_0x5ec62c,_0x2384d8(0x28a))),this[_0x2384d8(0x24e)][_0x2384d8(0x1fc)](_0x1d5eb5),this[_0x2384d8(0x24e)][_0x2384d8(0x291)](_0x1ca07d,_0x31c1b7);}),this[_0xf9494(0x199)](_0x1c5f20,_0xf9494(0x21c),(_0xacdfbc,_0x2aa75f,_0x4715f8)=>{const _0x274d52=_0xf9494,_0x545dea=this[_0x274d52(0x24e)][_0x274d52(0x264)](_0x2aa75f);if(!_0x545dea)return;const _0x2b69c0=this[_0x274d52(0x1d6)][_0x274d52(0x2c3)](_0x545dea[_0x274d52(0x1bd)])[_0x274d52(0x25b)](_0x545dea[_0x274d52(0x218)]);_0x545dea[_0x274d52(0x1e1)][_0x274d52(0x2ce)](_0xa49bf9=>_0x2b69c0[_0x274d52(0x27f)](_0xa49bf9,_0x274d52(0x1b1))),this[_0x274d52(0x24e)][_0x274d52(0x1fc)](_0x2aa75f),this[_0x274d52(0x24e)][_0x274d52(0x291)](_0x4715f8,_0x545dea);});}async[_0x5ccb75(0x27a)](_0x209707){const _0x2e9179=_0x5ccb75;this[_0x2e9179(0x29e)][_0x2e9179(0x22c)][_0x2e9179(0x264)](_0x1785af)[_0x2e9179(0x226)](),this[_0x2e9179(0x23a)][_0x2e9179(0x298)](_0x2e9179(0x2b1)),this[_0x2e9179(0x23a)][_0x2e9179(0x1a2)](!0x0),await this[_0x2e9179(0x18e)]();try{const _0x15c0f1=this[_0x2e9179(0x29e)][_0x2e9179(0x22c)][_0x2e9179(0x264)](_0x37e958);this[_0x2e9179(0x295)]('\x20'),_0x15c0f1[_0x2e9179(0x1b8)][_0x2e9179(0x28d)](_0x2e9179(0x2cd)),await this[_0x2e9179(0x262)](_0x209707);const {sessionId:_0xca56ac}=this[_0x2e9179(0x1bb)][_0x2e9179(0x2b6)]();await this[_0x2e9179(0x1d6)][_0x2e9179(0x2c6)](_0x209707,_0xca56ac),this[_0x2e9179(0x1d6)][_0x2e9179(0x257)]()&&this[_0x2e9179(0x1d6)][_0x2e9179(0x1a6)](_0x1acc5f(this[_0x2e9179(0x29e)][_0x2e9179(0x202)],_0x2e9179(0x2bb)));}catch(_0x4c132e){console[_0x2e9179(0x1c3)](_0x2e9179(0x18f),_0x4c132e);}finally{this[_0x2e9179(0x23a)][_0x2e9179(0x298)](_0x2e9179(0x1a4)),this[_0x2e9179(0x23a)][_0x2e9179(0x1a2)](!0x1);}}[_0x5ccb75(0x2b5)](_0x2301ea){const _0x4cb525=_0x5ccb75;this[_0x4cb525(0x1d6)]['id']===_0x2301ea&&this[_0x4cb525(0x262)]();}async[_0x5ccb75(0x261)](){const _0x2da06f=_0x5ccb75,_0x5055a4=this[_0x2da06f(0x1bb)][_0x2da06f(0x263)]();this[_0x2da06f(0x1d6)]?.[_0x2da06f(0x1e7)](_0x5055a4),this[_0x2da06f(0x1d6)]?.[_0x2da06f(0x1a6)](_0x1acc5f(this[_0x2da06f(0x29e)][_0x2da06f(0x202)],_0x2da06f(0x2bb)));}[_0x5ccb75(0x25f)](){const _0x4710be=_0x5ccb75;this[_0x4710be(0x1d6)]?.[_0x4710be(0x19e)]();}[_0x5ccb75(0x247)](){const _0x130e54=_0x5ccb75;this[_0x130e54(0x23a)][_0x130e54(0x247)]();}async[_0x5ccb75(0x209)](){const _0x425266=_0x5ccb75;await this[_0x425266(0x262)]();}async[_0x5ccb75(0x1ac)]({message:_0x3aef4d,quickActionData:_0x21e61a}){const _0x4a3d2b=_0x5ccb75;await this[_0x4a3d2b(0x225)]({'userMessage':_0x3aef4d,'quickActionData':_0x21e61a});}[_0x5ccb75(0x24c)](){const _0x11e5f4=_0x5ccb75,_0x1cffad=this[_0x11e5f4(0x29e)][_0x11e5f4(0x1e6)][_0x11e5f4(0x264)](_0x11e5f4(0x1b3));if(!_0x1cffad)throw new _0x175785(_0x11e5f4(0x285),this);return _0x1cffad;}async[_0x5ccb75(0x262)](_0x5f318f){const _0x258695=_0x5ccb75,_0xbc804a=this[_0x258695(0x29e)][_0x258695(0x22c)][_0x258695(0x264)](_0x1785af);let _0x4dfcc2;_0xbc804a[_0x258695(0x2db)]&&_0xbc804a[_0x258695(0x226)](),_0x4dfcc2=_0x5f318f||!this[_0x258695(0x1d6)]?this[_0x258695(0x29e)][_0x258695(0x1e6)][_0x258695(0x264)](_0x258695(0x270)):this[_0x258695(0x1d6)][_0x258695(0x2a4)]['id'],await this[_0x258695(0x18e)]();const _0x6a3c82=this[_0x258695(0x24c)](),_0x198b6a=_0x5f318f||_0x4780ab();this[_0x258695(0x1d6)]=new _0xafa66f({'connector':this[_0x258695(0x1f8)],'chatModels':this[_0x258695(0x2c7)],'defaultModelId':_0x4dfcc2,'conversationId':_0x198b6a,'group':_0x6a3c82,'getEditor':()=>_0xf681fe(this[_0x258695(0x29e)])}),this[_0x258695(0x1d6)]['on'](_0x258695(0x1c5),(_0x3ca173,_0x320b5f)=>{const _0x277c99=_0x258695;_0x320b5f[_0x277c99(0x254)]=this[_0x277c99(0x1b5)](_0x320b5f[_0x277c99(0x254)],this[_0x277c99(0x29e)][_0x277c99(0x1e6)][_0x277c99(0x264)](_0x277c99(0x2b7))),this[_0x277c99(0x23a)][_0x277c99(0x26b)](_0x320b5f),this[_0x277c99(0x23a)][_0x277c99(0x2d9)](),this[_0x277c99(0x23a)][_0x277c99(0x214)](),this[_0x277c99(0x23a)][_0x277c99(0x2a7)](),_0x5f318f||(this[_0x277c99(0x23a)][_0x277c99(0x24f)](),this[_0x277c99(0x1d6)]?.[_0x277c99(0x1a6)](_0x1acc5f(this[_0x277c99(0x29e)][_0x277c99(0x202)],_0x277c99(0x2bb))));}),this[_0x258695(0x1d6)]['on'](_0x258695(0x19d),(_0x3acdaa,_0x58fb54)=>{const _0x20b9d4=_0x258695;this[_0x20b9d4(0x23a)][_0x20b9d4(0x1c4)](_0x58fb54[_0x20b9d4(0x1f5)]);}),this[_0x258695(0x1d6)]['on'](_0x258695(0x1ab),(_0x4370dc,_0x319089)=>{const _0x163d01=_0x258695;this[_0x163d01(0x23a)][_0x163d01(0x2ca)](_0x319089),this[_0x163d01(0x23a)][_0x163d01(0x1f2)](_0x319089);}),this[_0x258695(0x1d6)]['on'](_0x258695(0x2c5),(_0x4d2095,_0x1724b6)=>{const _0x5ceecb=_0x258695;this[_0x5ceecb(0x23a)][_0x5ceecb(0x1db)](_0x1724b6);}),this[_0x258695(0x1d6)]['on'](_0x258695(0x2d3),async()=>{const _0x503627=_0x258695;await this[_0x503627(0x23a)][_0x503627(0x20d)]();}),this[_0x258695(0x1d6)]['on'](_0x258695(0x207),(_0x19e402,_0x505fbf)=>{const _0x4d0f4f=_0x258695;this[_0x4d0f4f(0x23a)][_0x4d0f4f(0x27d)](_0x505fbf['id']);}),this[_0x258695(0x1d6)]['on'](_0x258695(0x2a6),(_0x503b84,_0x5830c8,_0x440618)=>{const _0x1a7158=_0x258695;this[_0x1a7158(0x295)](_0x5830c8,_0x440618);}),this[_0x258695(0x1d6)]['on'](_0x258695(0x19f),(_0x21aa81,_0x42a0fb)=>{const _0x213e14=_0x258695;this[_0x213e14(0x23a)][_0x213e14(0x245)]({'isVisible':!0x0,'id':_0x42a0fb[_0x213e14(0x1bd)]}),_0x213e14(0x204)===_0x42a0fb[_0x213e14(0x2b3)]?this[_0x213e14(0x23a)][_0x213e14(0x1a5)](_0x42a0fb):this[_0x213e14(0x23a)][_0x213e14(0x24d)](_0x42a0fb);}),this[_0x258695(0x1d6)]['on'](_0x258695(0x212),async(_0x5e26a7,_0x329f91,_0x3e1d6a)=>{const _0x19f2ae=_0x258695;await this[_0x19f2ae(0x229)]({'reply':_0x329f91,'changeGroups':_0x3e1d6a});}),this[_0x258695(0x1d6)]['on'](_0x258695(0x23c),(_0x595fc1,{reply:_0xedfd48,index:_0x47dad3,state:_0x172f1c})=>{const _0x30ecc0=_0x258695;this[_0x30ecc0(0x23a)][_0x30ecc0(0x224)]({'id':_0xedfd48['id'],'index':_0x47dad3,'state':_0x172f1c});}),this[_0x258695(0x1d6)]['on'](_0x258695(0x1c2),(_0x45584b,_0x3a5102)=>{const _0x1ee27b=_0x258695;if(this[_0x1ee27b(0x23a)][_0x1ee27b(0x22f)](_0x3a5102[_0x1ee27b(0x26e)],_0x3a5102[_0x1ee27b(0x1d2)]),_0x1ee27b(0x1f9)===_0x3a5102[_0x1ee27b(0x26e)][_0x1ee27b(0x2b3)]){const _0x59392a=[..._0xf681fe(this[_0x1ee27b(0x29e)])[_0x1ee27b(0x250)][_0x1ee27b(0x1b9)][_0x1ee27b(0x1f9)][_0x1ee27b(0x2a3)]()];this[_0x1ee27b(0x1bb)][_0x1ee27b(0x25d)](_0x59392a,_0x1ee27b(0x2dc)+this[_0x1ee27b(0x1d6)]?.['id']);}}),this[_0x258695(0x1d6)]['on'](_0x258695(0x1e2),(_0x3f3ba7,_0x3a1822)=>{const _0x285d11=_0x258695;this[_0x285d11(0x23a)][_0x285d11(0x2d2)](_0x3a1822[_0x285d11(0x1b6)]),_0x285d11(0x1b0)==_0x3a1822[_0x285d11(0x1b6)]&&this[_0x285d11(0x25f)](),_0x285d11(0x1f9)===_0x3a1822[_0x285d11(0x2b3)]&&this[_0x285d11(0x1bb)][_0x285d11(0x1b7)](_0x285d11(0x2dc)+this[_0x285d11(0x1d6)]?.['id']);}),this[_0x258695(0x1d6)]['on'](_0x258695(0x23b),(_0x3dd467,_0x5be8e3)=>{const _0x299097=_0x258695;this[_0x299097(0x23a)][_0x299097(0x210)](_0x5be8e3[_0x299097(0x26e)][_0x299097(0x1b6)],_0x5be8e3[_0x299097(0x1d2)]);}),this[_0x258695(0x1d6)]['on'](_0x258695(0x1d1),(_0x18773a,_0xa8d908)=>{const _0xc104a6=_0x258695;this[_0xc104a6(0x23a)][_0xc104a6(0x1fe)](_0xa8d908[_0xc104a6(0x198)]);}),this[_0x258695(0x1d6)]['on'](_0x258695(0x23f),(_0x10e756,_0x582025)=>{const _0x38a659=_0x258695;this[_0x38a659(0x23a)][_0x38a659(0x27c)](_0x582025[_0x38a659(0x1f3)]);}),this[_0x258695(0x1d6)]['on'](_0x258695(0x293),(_0x4364ba,_0x3a1c1b)=>{const _0x322686=_0x258695;this[_0x322686(0x23a)][_0x322686(0x20e)](_0x3a1c1b[_0x322686(0x2ae)],_0x3a1c1b[_0x322686(0x211)],_0x3a1c1b[_0x322686(0x1d7)],_0x3a1c1b[_0x322686(0x252)]);}),this[_0x258695(0x1d6)]['on'](_0x258695(0x194),(_0x59d62e,_0x44829d)=>{const _0x490aab=_0x258695;this[_0x490aab(0x23a)][_0x490aab(0x279)](_0x44829d[_0x490aab(0x2ae)],_0x44829d[_0x490aab(0x277)],_0x44829d[_0x490aab(0x251)]);}),this[_0x258695(0x1d6)]['on'](_0x258695(0x2bc),(_0x820068,_0x3c437d)=>{const _0x53b565=_0x258695;this[_0x53b565(0x23a)][_0x53b565(0x22b)](_0x3c437d);}),this[_0x258695(0x1d6)]['on'](_0x258695(0x230),(_0x1b52ae,_0x48d8ef)=>{const _0x11e977=_0x258695;this[_0x11e977(0x23a)][_0x11e977(0x273)](_0x48d8ef[_0x11e977(0x2a4)],_0x48d8ef[_0x11e977(0x26a)]);}),this[_0x258695(0x1d6)]['on'](_0x258695(0x1c3),(_0x27ddfc,{error:_0x4ac1b7,interactionId:_0x1fa6fb,fileName:_0x4fdadd,url:_0x5c9590,sourceId:_0x5bd340,sourceLabel:_0x460429})=>{const _0x4c120a=_0x258695,_0x2c0e62=_0x1fa6fb?_0x1fa6fb+':'+_0x4780ab():_0x4780ab();_0x4ac1b7[_0x4c120a(0x1a7)][_0x4c120a(0x1e8)](_0x4c120a(0x2cc))?this[_0x4c120a(0x23a)][_0x4c120a(0x2c2)]({'staticMessage':_0x1acc5f(this[_0x4c120a(0x29e)][_0x4c120a(0x202)],_0x4c120a(0x249)),'id':_0x2c0e62}):_0x4ac1b7[_0x4c120a(0x1a7)][_0x4c120a(0x1e8)](_0x4c120a(0x267))||_0x4ac1b7[_0x4c120a(0x1a7)][_0x4c120a(0x1e8)](_0x4c120a(0x1f7))?(this[_0x4c120a(0x23a)][_0x4c120a(0x1ba)]({'errorMessage':_0x1acc5f(this[_0x4c120a(0x29e)][_0x4c120a(0x202)],_0x4c120a(0x19a)),'id':_0x2c0e62}),this[_0x4c120a(0x197)](_0x4ac1b7)):_0x4ac1b7[_0x4c120a(0x1a7)][_0x4c120a(0x1e8)](_0x4c120a(0x1aa))?this[_0x4c120a(0x23a)][_0x4c120a(0x1ba)]({'errorMessage':_0x1acc5f(this[_0x4c120a(0x29e)][_0x4c120a(0x202)],_0x4c120a(0x2ab),_0x4fdadd),'id':_0x2c0e62}):_0x4ac1b7[_0x4c120a(0x1a7)][_0x4c120a(0x1e8)](_0x4c120a(0x269))?this[_0x4c120a(0x23a)][_0x4c120a(0x1ba)]({'errorMessage':_0x1acc5f(this[_0x4c120a(0x29e)][_0x4c120a(0x202)],_0x4c120a(0x237),_0x5c9590),'id':_0x2c0e62}):_0x4ac1b7[_0x4c120a(0x1a7)][_0x4c120a(0x1e8)](_0x4c120a(0x217))?this[_0x4c120a(0x23a)][_0x4c120a(0x1ba)]({'errorMessage':_0x1acc5f(this[_0x4c120a(0x29e)][_0x4c120a(0x202)],_0x4c120a(0x2ac)),'id':_0x2c0e62}):_0x4ac1b7[_0x4c120a(0x1a7)][_0x4c120a(0x1e8)](_0x4c120a(0x296))?this[_0x4c120a(0x23a)][_0x4c120a(0x1ba)]({'errorMessage':_0x1acc5f(this[_0x4c120a(0x29e)][_0x4c120a(0x202)],_0x4c120a(0x22a)),'id':_0x2c0e62}):_0x4ac1b7[_0x4c120a(0x1a7)][_0x4c120a(0x1e8)](_0x4c120a(0x1e0))?(_0x5bd340&&this[_0x4c120a(0x23a)][_0x4c120a(0x1c0)](_0x5bd340),this[_0x4c120a(0x23a)][_0x4c120a(0x1ba)]({'errorMessage':_0x1acc5f(this[_0x4c120a(0x29e)][_0x4c120a(0x202)],_0x4c120a(0x1df),_0x460429||_0x4c120a(0x211)),'id':_0x2c0e62}),this[_0x4c120a(0x197)](_0x4ac1b7)):_0x4ac1b7[_0x4c120a(0x1a7)][_0x4c120a(0x1e8)](_0x4c120a(0x260))?(this[_0x4c120a(0x23a)][_0x4c120a(0x1ba)]({'errorMessage':_0x1acc5f(this[_0x4c120a(0x29e)][_0x4c120a(0x202)],_0x4c120a(0x25c)),'id':_0x2c0e62}),this[_0x4c120a(0x197)](_0x4ac1b7)):(this[_0x4c120a(0x23a)][_0x4c120a(0x1ba)]({'errorMessage':_0x1acc5f(this[_0x4c120a(0x29e)][_0x4c120a(0x202)],_0x4c120a(0x253)),'id':_0x2c0e62}),this[_0x4c120a(0x197)](_0x4ac1b7));}),await this[_0x258695(0x1d6)][_0x258695(0x19b)](this[_0x258695(0x29e)][_0x258695(0x1e6)][_0x258695(0x264)](_0x258695(0x286))),_0x5f318f||await this[_0x258695(0x1d6)][_0x258695(0x2bd)]();}async[_0x5ccb75(0x225)]({userMessage:_0xf38a46,quickActionData:_0x42ca77}){const _0x25945d=_0x5ccb75;if(!this[_0x25945d(0x1d6)])throw new _0x175785(_0x25945d(0x26c));this[_0x25945d(0x1d6)][_0x25945d(0x265)]()&&await this[_0x25945d(0x1d6)][_0x25945d(0x2be)](this[_0x25945d(0x1bb)][_0x25945d(0x2b6)]()),this[_0x25945d(0x1d6)]['id']&&this[_0x25945d(0x1d6)][_0x25945d(0x19c)]&&await this[_0x25945d(0x1d6)][_0x25945d(0x1d5)]({'userMessage':_0xf38a46,'quickActionData':_0x42ca77}),this[_0x25945d(0x284)]();}[_0x5ccb75(0x284)](){const _0x34e54e=_0x5ccb75,_0x474cf0=_0xf681fe(this[_0x34e54e(0x29e)])[_0x34e54e(0x250)],_0x39b7e0=Array[_0x34e54e(0x2ba)](_0x474cf0[_0x34e54e(0x1dc)][_0x34e54e(0x208)](_0x55ea50));_0x474cf0[_0x34e54e(0x297)](_0xe9b667=>{const _0x3d99a2=_0x34e54e;_0x39b7e0[_0x3d99a2(0x2ce)](_0xc2045b=>_0xe9b667[_0x3d99a2(0x28e)](_0xc2045b));});}[_0x5ccb75(0x2d4)](){const _0x3fe9db=_0x5ccb75;console[_0x3fe9db(0x268)](_0x3fe9db(0x2d0));}[_0x5ccb75(0x1c7)](_0x446f0e){const _0x3820b3=_0x5ccb75;this[_0x3820b3(0x23a)][_0x3820b3(0x25e)](_0x446f0e);}[_0x5ccb75(0x197)](_0x4be29a){const _0x1db312=_0x5ccb75;_0x39aa5f(_0x4be29a[_0x1db312(0x1a7)]);}[_0x5ccb75(0x2d7)](_0x56f1b2){const _0xb743ef=_0x5ccb75;this[_0xb743ef(0x1d6)]?.[_0xb743ef(0x256)](_0x56f1b2);}[_0x5ccb75(0x234)](){const _0x3bccb2=_0x5ccb75;this[_0x3bccb2(0x1d6)]?.[_0x3bccb2(0x24a)]();}[_0x5ccb75(0x1f6)](){const _0x14b8a8=_0x5ccb75;this[_0x14b8a8(0x1d6)]?.[_0x14b8a8(0x240)]();}[_0x5ccb75(0x1cb)](_0x11a510){const _0x4d6272=_0x5ccb75,[_0x36301d,_0x2035ca]=_0x11a510[_0x4d6272(0x232)](':'),_0x46fbb2=this[_0x4d6272(0x1d6)][_0x4d6272(0x2c3)](_0x36301d),_0x441b6b=_0x46fbb2[_0x4d6272(0x25b)](_0x2035ca);return{'interaction':_0x46fbb2,'reply':_0x441b6b};}[_0x5ccb75(0x28c)](_0x3828c5,_0x4add8b=!0x1){const _0x3c9097=_0x5ccb75,_0x31ddfc=_0xf681fe(this[_0x3c9097(0x29e)]),_0x3c895f={'target':_0x31ddfc[_0x3c9097(0x20f)][_0x3c9097(0x1b8)][_0x3c9097(0x206)][_0x3c9097(0x223)](_0x31ddfc[_0x3c9097(0x20f)][_0x3c9097(0x2a5)][_0x3c9097(0x1cf)](_0x3828c5)),'viewportOffset':{'top':0x96,'left':0x0,'bottom':0x32,'right':0x0},'ancestorOffset':0x14,'alignToTop':_0x4add8b};_0x4add8b&&(_0x3c895f[_0x3c9097(0x2b9)]=!0x0),_0x2b5e1d(_0x3c895f);}[_0x5ccb75(0x295)](_0x53f299,_0x3127e1=!0x1){const _0x4ffad2=_0x5ccb75;this[_0x4ffad2(0x23a)][_0x4ffad2(0x2a6)](_0x53f299||_0x1acc5f(this[_0x4ffad2(0x29e)][_0x4ffad2(0x202)],_0x4ffad2(0x2c1)),_0x3127e1);}[_0x5ccb75(0x1b5)](_0xd68041,_0x40cda8){const _0x1722df=_0x5ccb75;let _0x3d4702;if(_0x40cda8){_0x3d4702=[];const _0x36c5fa=_0x1722df(0x289)==typeof _0x40cda8?[_0x40cda8[_0x1722df(0x28f)]()]:_0x40cda8[_0x1722df(0x213)](_0x27d1cc=>_0x27d1cc[_0x1722df(0x28f)]());for(const _0x19149d of _0x36c5fa)for(const _0x1bc293 of _0xd68041)(_0x1bc293['id'][_0x1722df(0x28f)]()===_0x19149d||_0x1bc293[_0x1722df(0x27b)][_0x1722df(0x28f)]()===_0x19149d||_0x1bc293[_0x1722df(0x2c0)][_0x1722df(0x28f)]()===_0x19149d||_0x1bc293['id'][_0x1722df(0x28f)]()[_0x1722df(0x1e8)](_0x19149d))&&_0x3d4702[_0x1722df(0x1f1)](_0x1bc293);}else _0x3d4702=_0xd68041;return _0x3d4702;}async[_0x5ccb75(0x229)]({reply:_0x377afc,changeGroups:_0x2bc0a9,renderingStrategy:_0x187b10}){const _0x3f539d=_0x5ccb75,{id:_0x24c6ca,isDone:_0x55316d,type:_0x4b6424,parsedContent:_0x3f6f3f}=_0x377afc;if(_0x3f539d(0x21f)===_0x4b6424){const _0x3db8e7=_0xf681fe(this[_0x3f539d(0x29e)]),_0x59af5e=_0x8892ff({'editor':_0x3db8e7,'showDiff':this[_0x3f539d(0x23a)][_0x3f539d(0x1a0)],'changeGroups':_0x2bc0a9,'documentContextContent':_0x377afc[_0x3f539d(0x1b4)]});await this[_0x3f539d(0x23a)][_0x3f539d(0x231)]({'id':_0x24c6ca,'parts':_0x59af5e,'renderingStrategy':_0x187b10,'isDone':_0x55316d});}else _0x3f539d(0x204)===_0x4b6424&&await this[_0x3f539d(0x23a)][_0x3f539d(0x2a9)]({'id':_0x24c6ca,'parsedContent':_0x3f6f3f,'renderingStrategy':_0x187b10,'isDone':_0x55316d});_0x55316d&&_0x377afc[_0x3f539d(0x1c1)][_0x3f539d(0x276)]>0x0&&this[_0x3f539d(0x23a)][_0x3f539d(0x288)](_0x24c6ca,_0x377afc[_0x3f539d(0x1c1)]);}async[_0x5ccb75(0x18e)](){const _0x50f3a9=_0x5ccb75,_0x434873=this[_0x50f3a9(0x1d6)]?.[_0x50f3a9(0x2aa)];_0x434873&&(_0x434873[_0x50f3a9(0x1ae)](),this[_0x50f3a9(0x23a)][_0x50f3a9(0x2cf)](_0x434873));}async[_0x5ccb75(0x1ad)](){const _0x1a3625=_0x5ccb75,_0x18f7ff=this[_0x1a3625(0x1d6)]?.[_0x1a3625(0x2aa)];if(_0x18f7ff){for await(const _0x376823 of _0x18f7ff[_0x1a3625(0x203)])await this[_0x1a3625(0x229)]({'reply':_0x376823,'changeGroups':_0x376823[_0x1a3625(0x2b0)],'renderingStrategy':_0x1a3625(0x2b1)});}}}
23
+ const _0x465c9f=_0x1403;(function(_0x5365bc,_0x3dc8d2){const _0xb8fc2c=_0x1403,_0x2ef639=_0x5365bc();while(!![]){try{const _0x510358=-parseInt(_0xb8fc2c(0x1a5))/0x1*(parseInt(_0xb8fc2c(0x148))/0x2)+parseInt(_0xb8fc2c(0x239))/0x3+-parseInt(_0xb8fc2c(0x21c))/0x4*(parseInt(_0xb8fc2c(0x15f))/0x5)+-parseInt(_0xb8fc2c(0x103))/0x6*(parseInt(_0xb8fc2c(0x23c))/0x7)+parseInt(_0xb8fc2c(0x167))/0x8*(parseInt(_0xb8fc2c(0xf6))/0x9)+parseInt(_0xb8fc2c(0x210))/0xa*(parseInt(_0xb8fc2c(0x165))/0xb)+parseInt(_0xb8fc2c(0x192))/0xc;if(_0x510358===_0x3dc8d2)break;else _0x2ef639['push'](_0x2ef639['shift']());}catch(_0x38732a){_0x2ef639['push'](_0x2ef639['shift']());}}}(_0x5dd1,0xc1ecd));import{ContextPlugin as _0x431eb1,Editor as _0x413ee5}from'ckeditor5/src/core.js';import{CKEditorError as _0x4f8449,logError as _0x5e1962,scrollViewportToShowTarget as _0x425377,uid as _0x18f48e}from'ckeditor5/src/utils.js';import{AIConnector as _0x3835d3}from'../aicore/aiconnector.js';import{AITabs as _0x351d7e}from'../aitabs/aitabs.js';import{AIChatConversation as _0x3dbaf9}from'./model/aichatconversation.js';import{getTranslation as _0x206cf5}from'../aicore/utils/common-translations.js';import{AI_VISUAL_SELECTION_MARKER_NAME as _0x3d0f78}from'../aicore/aiediting.js';import{AIChatModels as _0x265514}from'./model/aichatmodels.js';import{getEditorFromContext as _0xcf3e41}from'../aicore/utils/geteditorfromcontext.js';import{DocumentCompare as _0x2e3a0e,DATA_ID_MODEL_ATTRIBUTE as _0x37efa2}from'@ckeditor/ckeditor5-collaboration-core';import{getOperationsFromReply as _0x576c10}from'../aicore/utils/getoperationsfromreply.js';import{expandSelectionWithContext as _0x4b847d,getMinimalSelection as _0x32f874,getSuggestionPartsFromReply as _0x3f67f2}from'../aicore/utils/getsuggestionpartsfromreply.js';function _0x1403(_0x6585cb,_0xd6d152){const _0x5dd1bc=_0x5dd1();return _0x1403=function(_0x14038e,_0x3af8db){_0x14038e=_0x14038e-0xe9;let _0x509db1=_0x5dd1bc[_0x14038e];return _0x509db1;},_0x1403(_0x6585cb,_0xd6d152);}import{ModelRange as _0x5d6e1f,_DetachOperation as _0x3fb93a}from'ckeditor5/src/engine.js';import{findOne as _0x50919c,getAttribute as _0xba5a54,serialize as _0x272331,Document as _0x310a2a,findByAttribute as _0x4920f8}from'../aicore/utils/htmlparser.js';import{IconAI as _0x2c9745}from'@ckeditor/ckeditor5-icons';import{AISuggestionContainerView as _0x2aa5ee}from'../aicore/ui/suggestioncontainer/aisuggestioncontainerview.js';import{AIBalloon as _0x575363}from'../aiballoon/aiballoon.js';function _0x5dd1(){const _0x5d461b=['setLoadingMessage','_batchToChanges','getRoot','split','modification-delta','source','change','abortPromptStream','toViewRange','addDocumentToContext','dislike','_toggleWebSearch','673002JANsEz','version','commands','4543GzZXGc','applySuggestion','nextSibling','resources','contextItems','rejectSuggestion','_removeAISelectionMarkers','changes','mouseLeaveSuggestion','init','main','resize','isOpen','interactionFinished','ai-conversation-','stop','current-document','AI_CHAT_CONTEXT_CURRENT_DOCUMENT','markers','replies','getPath','rejected','6034536lTMMwq','pending','addFilesToContext','Failed\x20to\x20load\x20conversation','addSelectionToChatContext','_updateRatings','full','open','view','mapper','_applySuggestion','TrackChangesEditing','config','13866boxGFT','ai-request-aborted','stopListening','removeFromContext','_previewedChangeGroup','AI_CHAT_UNTITLED_CONVERSATION','ai-chat-source-resources-load-failed','_integrateEditor','addFeedItemError','_handleStartConversation','resizeTabs','toLocaleLowerCase','redo','set','setSelectedModel','AI_CHAT_CONTEXT_UNABLE_TO_UPLOAD_URL','getGroupId','startInteraction','collaboration.channelId','provider','setContextItemLoading','indexes','addContextOptionsChanged','viewRangeToDom','children','isInContext','ai-chat-resource-load-failed','getDiff','from','availableModels','uid','_scrollToSuggestionRange','remove','end','history','_startConversationSafely','_aiConnector','length','new','getRanges','removed','sourcePosition','removeFeedInteraction','setIsMaximized','showFakeVisualSelection','contextItemRemoved','message','ai-chat-context-invalid-data','disableControls','data-id','showNext','interactionCreated','_aiChatModels','removeMarker','resetConversationTitle','AI_CHAT_GENERIC_ERROR','sourceId','get','clearPendingContextUI','updateResourceState','createPositionFromPath','AITabs','type','isLoading','toggleLoadingSkeleton','_aiEditing','_getDocumentRangeForReplyChanges','AI_CHAT_CONTEXT_UNSUPPORTED_TYPE','setChangeGroupState','482SUERqJ','load','ai-chat-conversation-init-failed','context','uploadProgressChanged','ai-chat-url-upload-failed','forEach','partIndex','messageId','parse','upsertAIChatRating','populateSourceResourceBalloon','log','sourceResourcesLoaded','isCurrentDocumentInConversation','error','isDocumentOperation','_insertSuggestion','ai-chat-controller-no-active-conversation','ready','updateFeedItemAIReplySuggestionContent','capabilitiesUpdated','resourceId','4928835wBOose','showDiff','ai.chat.context','selection','getAttribute','Undo','341ZrMxkD','baseVersion','16HagWjg','loadConversation','getTransformedByOperation','lastInteraction','data','setConversationTitle','AI_CHAT_RESOURCE_LOAD_FAILED','getSelectionText','getMarkersGroup','activateTab','cloneNode','dialogClosed','sendUserMessage','getReply','addResourceToContext','editing','closeSourceResourceBalloon','sendMessage','streaming','like','AI_CHAT_UNABLE_TO_START_CONVERSATION','AIEditing','indexOf','addContextItem','pluginName','toggleWebSearch','contextItem','name','Liked\x20response','find','AIChatController','isDisabled','isCurrentDocumentInContext','contextItemAdded','accepted','addFileToContext','map','addFeedInteractionHeader','contextItemLoadingEnded','rootName','addOperation','AI_CHAT_CONTEXT_UNABLE_TO_LOAD_RESOURCES','addFeedItemAIReply','28262100apzXcM','startConversation','scrollFeedToSuggestion','filter','text-delta','Disliked\x20response','removeContextItem','setModel','AI_CHAT_CONTEXT_UNABLE_TO_UPLOAD_FILE','replyId','clearConversationContextUI','updateContent','getFirstRange','sources','documentContextContent','ai.chat.models.displayedModels','createConversation','_showConversationHistory','createPositionAt','5273uzFnKF','root','toggleSuggestionDisplayMode','isOfficialPlugin','_flushLastInteractionUI','locale','handleUserInteraction','conversationInitialized','_balloonShowDiff','insertSuggestion','getChildAtOffset','chat','isUploadInProgress','updateCurrentDocumentInContext','static','ai-chat-conversation-start-failed','has','add','setConversationContext','model','alignToTop','Showing\x20conversation\x20history...','resourceStateChanged','push','getOperations','resetMessageInput','addFeedItemStaticMessage','listenTo','replyCreated','stopInteraction','replyChangeGroupStateUpdated','query','state','range','string','addCurrentDocumentToContext','webSearchFinished','webSearchStarted','replyContentUpdated','options','_setIsMaximized','howMany','editors','addFeedItemAISuggestion','updateCapabilities','loadSourceResources','showChangeInText','showPrevious','_handleUIUserMessage','DocumentCompare','AIChatUI','reasoningFinished','_removeFromContext','resource','toString','interactionDestroyed','toggleReasoning','getChildren','updateConversationTitle','addUrlToContext','updateFeedItemAIReplyContent','uiId','reasoningStarted','applyOperation','removeSelectionFromContext','_updateReplyContent','_stopLastInteraction','maxOffset','focusPromptInput','addFeedItemUserMessage','plugins','handleRemovedConversation','document','createRange','mouseOverSuggestion','_createFromRanges','AI_BALLOON_HEADER_TITLE','updateFeedItemAIReplySources','selectModel','interactionStarted','_filterModels','ai-chat-file-upload-failed','requires','AI_CHAT_CONTEXT_INVALID_DATA','getInteractionAndReplyById','setIsUploadInProgress','AI_CHAT_ABORTED_MESSAGE','updateFeedItemAIReplySuggestionPartState','setFeedItemRenderingStrategy','unshift','ai-chat-missing-channel-id','getDocumentData','setAddContextOptions','domConverter','removeSelectionFromChatContext','activeConversation','path','interactionId','_aiChatUi','_toggleReasoning','ai-chat-controller-mouse-over','getInteraction','_logError','enableControls','hideFakeVisualSelection','_applyOperationsAsSuggestions','revert','203290yUmNYl','modelSelected','getChild','content','undo','isStarted','isPremiumPlugin','_openBalloonFor','$graveyard','afterInit','start','selectedModel','4aywoLf','contextSent','ai-chat-context-unsupported-type','finishInteraction','anchorId','slice','addSelectionToContext','resizedTabs','AIConnector','node','batch','getDocumentContext','ai.chat.models.defaultModelId','changeGroups','delete','startsWith','close'];_0x5dd1=function(){return _0x5d461b;};return _0x5dd1();}export class AIChatController extends _0x431eb1{[_0x465c9f(0x144)];[_0x465c9f(0x127)];[_0x465c9f(0x207)];[_0x465c9f(0x137)];[_0x465c9f(0x22e)]=new Map();[_0x465c9f(0x107)]=null;[_0x465c9f(0x1ad)]=!0x1;static get[_0x465c9f(0x1f7)](){return[_0x3835d3,_0x575363,_0x2e3a0e];}static get[_0x465c9f(0x17f)](){const _0x295c74=_0x465c9f;return _0x295c74(0x185);}static get[_0x465c9f(0x1a8)](){return!0x0;}static get[_0x465c9f(0x216)](){return!0x0;}[_0x465c9f(0xe9)](){const _0x27a1a5=_0x465c9f;this[_0x27a1a5(0x127)]=this[_0x27a1a5(0x14b)][_0x27a1a5(0x1eb)][_0x27a1a5(0x13c)](_0x27a1a5(0x224)),this[_0x27a1a5(0x207)]=this[_0x27a1a5(0x14b)][_0x27a1a5(0x1eb)][_0x27a1a5(0x13c)](_0x27a1a5(0x1d7)),this[_0x27a1a5(0x144)]=this[_0x27a1a5(0x14b)][_0x27a1a5(0x1eb)][_0x27a1a5(0x13c)](_0x27a1a5(0x17c)),this[_0x27a1a5(0x137)]=new _0x265514({'connector':this[_0x27a1a5(0x127)]});const _0x5e4fba=this[_0x27a1a5(0x14b)][_0x27a1a5(0x1eb)][_0x27a1a5(0x13c)](_0x27a1a5(0x140));this[_0x27a1a5(0x1c0)](this[_0x27a1a5(0x207)],_0x27a1a5(0x193),()=>{const _0x3d9d1d=_0x27a1a5;this[_0x3d9d1d(0x126)]();}),this[_0x27a1a5(0x1c0)](this[_0x27a1a5(0x207)],_0x27a1a5(0x173),(_0x47c3fc,_0x55992c)=>{const _0x3fe1ab=_0x27a1a5;this[_0x3fe1ab(0x1d5)]({'userMessage':_0x55992c});}),this[_0x27a1a5(0x1c0)](_0x5e4fba,_0x27a1a5(0x223),(_0x35fe82,_0x474085)=>{const _0x4d21a2=_0x27a1a5;this[_0x4d21a2(0x1cd)](_0x474085);}),this[_0x27a1a5(0x1c0)](this[_0x27a1a5(0x207)],_0x27a1a5(0x10d),()=>{const _0x2894a1=_0x27a1a5;_0x5e4fba[_0x2894a1(0xeb)]();}),this[_0x27a1a5(0x1c0)](this[_0x27a1a5(0x207)],_0x27a1a5(0x234),async()=>{const _0x39faf0=_0x27a1a5;await this[_0x39faf0(0x1e7)](),await this[_0x39faf0(0x1a9)]();}),this[_0x27a1a5(0x1c0)](this[_0x27a1a5(0x207)],_0x27a1a5(0x236),()=>{const _0x39e128=_0x27a1a5;this[_0x39e128(0x204)]?.[_0x39e128(0x1c8)](_0x206cf5(this[_0x39e128(0x14b)][_0x39e128(0x1aa)],_0x39e128(0xf1)));}),this[_0x27a1a5(0x1c0)](this[_0x27a1a5(0x207)],_0x27a1a5(0x18a),(_0x2ea068,_0x494596)=>{const _0x3814f4=_0x27a1a5;this[_0x3814f4(0x204)]?.[_0x3814f4(0xf8)](Array[_0x3814f4(0x11f)](_0x494596));}),this[_0x27a1a5(0x1c0)](this[_0x27a1a5(0x207)],_0x27a1a5(0x1e0),(_0x314d0a,_0x158d24)=>{const _0x151f3b=_0x27a1a5;this[_0x151f3b(0x204)]?.[_0x151f3b(0x1e0)](_0x158d24);}),this[_0x27a1a5(0x1c0)](this[_0x27a1a5(0x207)],_0x27a1a5(0x175),(_0x5ed8f6,_0x4cbfa0)=>{const _0xd753cc=_0x27a1a5;this[_0xd753cc(0x204)]?.[_0xd753cc(0x175)](_0x4cbfa0[_0xd753cc(0x232)],_0x4cbfa0[_0xd753cc(0x1da)]);}),this[_0x27a1a5(0x1c0)](this[_0x27a1a5(0x207)],_0x27a1a5(0x198),(_0x4612d9,_0x387923)=>{const _0x19bb86=_0x27a1a5;this[_0x19bb86(0x1d9)](_0x387923);}),this[_0x27a1a5(0x1c0)](this[_0x27a1a5(0x207)],_0x27a1a5(0x1d2),(_0x36c478,_0x2bafe2)=>{const _0x58e514=_0x27a1a5;this[_0x58e514(0x204)]?.[_0x58e514(0x1d2)](_0x2bafe2[_0x58e514(0x13b)],_0x2bafe2[_0x58e514(0x1c4)],_0x2bafe2[_0x58e514(0x121)]);}),this[_0x27a1a5(0x1c0)](this[_0x27a1a5(0x207)],_0x27a1a5(0x180),()=>{const _0x5dbc49=_0x27a1a5;this[_0x5dbc49(0x238)]();}),this[_0x27a1a5(0x1c0)](this[_0x27a1a5(0x207)],_0x27a1a5(0x1dd),()=>{const _0x475ab8=_0x27a1a5;this[_0x475ab8(0x208)]();}),this[_0x27a1a5(0x1c0)](this[_0x27a1a5(0x207)],_0x27a1a5(0x1f3),(_0x47e5c8,_0x537e06)=>{const _0x52212d=_0x27a1a5;this[_0x52212d(0x204)]?.[_0x52212d(0x199)](_0x537e06);}),this[_0x27a1a5(0x1c0)](this[_0x27a1a5(0x207)],_0x27a1a5(0x17a),(_0x4f73f1,{replyId:_0x2d6a36})=>{const _0x2f5ac6=_0x27a1a5;console[_0x2f5ac6(0x154)](_0x2f5ac6(0x183),_0x2d6a36);}),this[_0x27a1a5(0x1c0)](this[_0x27a1a5(0x207)],_0x27a1a5(0x237),(_0x56dc44,{replyId:_0x59cd87})=>{const _0x1035cc=_0x27a1a5;console[_0x1035cc(0x154)](_0x1035cc(0x197),_0x59cd87);}),this[_0x27a1a5(0x1c0)](this[_0x27a1a5(0x207)],_0x27a1a5(0x1ae),(_0x498075,_0x2a172a)=>{const _0x3eb5e8=_0x27a1a5;this[_0x3eb5e8(0x14b)][_0x3eb5e8(0x1eb)][_0x3eb5e8(0x13c)](_0x575363)[_0x3eb5e8(0x22c)](),this[_0x3eb5e8(0x159)](_0x2a172a);}),this[_0x27a1a5(0x1c0)](this[_0x27a1a5(0x207)],_0x27a1a5(0x1d3),(_0x30e816,{replyId:_0x4a4b16,partIndex:_0x4f2d5d})=>{const _0x29f5a4=_0x27a1a5;this[_0x29f5a4(0x1ad)]=this[_0x29f5a4(0x207)][_0x29f5a4(0x160)],this[_0x29f5a4(0x217)](_0x4a4b16,_0x4f2d5d);}),this[_0x27a1a5(0x1c0)](this[_0x27a1a5(0x207)],_0x27a1a5(0x1ef),(_0x531fde,{replyId:_0x360897,partIndex:_0x305303})=>{const _0x37e22c=_0x27a1a5,_0x2ee159=this[_0x37e22c(0x145)](_0x360897,_0x305303);_0x2ee159&&_0x37e22c(0x218)!=_0x2ee159[_0x37e22c(0x1c6)][_0x37e22c(0x1a6)][_0x37e22c(0x18e)]&&this[_0x37e22c(0x144)][_0x37e22c(0x12f)]([_0x2ee159[_0x37e22c(0x1c6)]],_0x37e22c(0x209));}),this[_0x27a1a5(0x1c0)](this[_0x27a1a5(0x207)],_0x27a1a5(0x244),()=>{const _0x340796=_0x27a1a5;this[_0x340796(0x144)][_0x340796(0x20d)](_0x340796(0x209));}),this[_0x27a1a5(0x1c0)](this[_0x27a1a5(0x207)],_0x27a1a5(0x23d),(_0xfb8144,_0x23bb6a)=>{const _0x12e4ba=_0x27a1a5;this[_0x12e4ba(0x14b)][_0x12e4ba(0x1eb)][_0x12e4ba(0x13c)](_0x575363)[_0x12e4ba(0x22c)](),this[_0x12e4ba(0x100)](_0x23bb6a);}),this[_0x27a1a5(0x1c0)](this[_0x27a1a5(0x207)],_0x27a1a5(0x1a7),async(_0x5c6841,_0x1633c7)=>{const _0x15a9a6=_0x27a1a5,{reply:_0x33353a}=this[_0x15a9a6(0x1f9)](_0x1633c7[_0x15a9a6(0x19b)]),_0x6fcde1=_0xcf3e41(this[_0x15a9a6(0x14b)]),_0x2d5cae=_0x3f67f2({'editor':_0x6fcde1,'changeGroups':_0x33353a[_0x15a9a6(0x229)],'documentContextContent':_0x33353a[_0x15a9a6(0x1a0)],'showDiff':_0x1633c7[_0x15a9a6(0x160)]});await this[_0x15a9a6(0x207)][_0x15a9a6(0x15c)]({'id':_0x33353a['id'],'parts':_0x2d5cae,'renderingStrategy':_0x15a9a6(0x1b3)});}),this[_0x27a1a5(0x1c0)](this[_0x27a1a5(0x207)],_0x27a1a5(0x241),(_0x23d083,{replyId:_0x1d04a5,partIndex:_0x392fc8})=>{const _0x34e6f3=_0x27a1a5;this[_0x34e6f3(0x107)]?.[_0x34e6f3(0x19b)]==_0x1d04a5&&this[_0x34e6f3(0x107)]?.[_0x34e6f3(0x14f)]==_0x392fc8&&this[_0x34e6f3(0x14b)][_0x34e6f3(0x1eb)][_0x34e6f3(0x13c)](_0x575363)[_0x34e6f3(0x22c)]();const {reply:_0xac16fa}=this[_0x34e6f3(0x1f9)](_0x1d04a5);_0xac16fa[_0x34e6f3(0x147)](_0x392fc8,_0x34e6f3(0xf5)),this[_0x34e6f3(0x144)][_0x34e6f3(0x20d)](_0x34e6f3(0x209));});}async[_0x465c9f(0x219)](){const _0xfa084e=_0x465c9f;this[_0xfa084e(0x14b)]instanceof _0x413ee5?this[_0xfa084e(0x10a)](this[_0xfa084e(0x14b)]):this[_0xfa084e(0x1c0)](this[_0xfa084e(0x14b)][_0xfa084e(0x1cf)],_0xfa084e(0x1b6),(_0x510a92,_0x203970)=>{const _0x3c0b56=_0xfa084e;_0x203970['on'](_0x3c0b56(0x15b),()=>{const _0x533c8c=_0x3c0b56;this[_0x533c8c(0x10a)](_0x203970);});}),await this[_0xfa084e(0x126)]();}[_0x465c9f(0x159)](_0x560a27){const _0x4195f9=_0x465c9f,_0x11d4e2=_0xcf3e41(this[_0x4195f9(0x14b)]);if(!_0x11d4e2[_0x4195f9(0x1eb)][_0x4195f9(0x1b5)](_0x4195f9(0x101)))return;const _0x20ff5f=this[_0x4195f9(0x14b)][_0x4195f9(0x1eb)][_0x4195f9(0x13c)](_0x4195f9(0x1d6)),{reply:_0x28c107,interaction:_0x456836}=this[_0x4195f9(0x1f9)](_0x560a27[_0x4195f9(0x19b)]),_0xf2b3d5=this[_0x4195f9(0x145)](_0x560a27[_0x4195f9(0x19b)],_0x560a27[_0x4195f9(0x14f)]),_0x579b6c=void 0x0!==_0x560a27[_0x4195f9(0x14f)]?[_0x28c107[_0x4195f9(0x229)][_0x560a27[_0x4195f9(0x14f)]]]:_0x28c107[_0x4195f9(0x229)][_0x4195f9(0x195)](_0x2850f7=>_0x4195f9(0xf7)==_0x2850f7[_0x4195f9(0x1c5)]),_0x34dbd1=_0x579b6c[_0x4195f9(0x18b)](_0xc8390f=>_0x28c107[_0x4195f9(0x229)][_0x4195f9(0x17d)](_0xc8390f));_0x34dbd1[_0x4195f9(0x14e)](_0x283315=>_0x28c107[_0x4195f9(0x147)](_0x283315,_0x4195f9(0x189)));const _0x3e7780=_0x576c10({'editor':_0x11d4e2,'reply':_0x28c107,'interaction':_0x456836,'groups':_0x579b6c,'transform':!0x0,'documentCompare':_0x20ff5f,'documentCompareOptions':{'anchor':_0x4195f9(0xea),'markDeletions':!0x0}});let _0x3e73fe;_0xf2b3d5&&this[_0x4195f9(0x122)](_0xf2b3d5[_0x4195f9(0x1c6)]),_0x11d4e2[_0x4195f9(0x1b8)][_0x4195f9(0x233)](_0x3f06b2=>{const _0x3e18c7=_0x4195f9;_0x3e73fe=_0x3f06b2[_0x3e18c7(0x226)],_0x11d4e2[_0x3e18c7(0x1eb)][_0x3e18c7(0x13c)](_0x3e18c7(0x101))[_0x3e18c7(0x20e)](_0x3e7780),this[_0x3e18c7(0x144)][_0x3e18c7(0x20d)](_0x3e18c7(0x209));}),this[_0x4195f9(0x22e)][_0x4195f9(0x110)](_0x3e73fe,{'interactionId':_0x456836['id'],'replyId':_0x28c107['id'],'indexes':_0x34dbd1[_0x4195f9(0x221)]()}),this[_0x4195f9(0xfb)](_0x28c107);}[_0x465c9f(0x100)](_0x128797){const _0x227c27=_0x465c9f,_0x337e9e=_0xcf3e41(this[_0x227c27(0x14b)]),_0x45d07a=this[_0x227c27(0x14b)][_0x227c27(0x1eb)][_0x227c27(0x13c)](_0x2e3a0e),{reply:_0x1dadfb,interaction:_0x56b385}=this[_0x227c27(0x1f9)](_0x128797[_0x227c27(0x19b)]),_0x5172a7=this[_0x227c27(0x145)](_0x128797[_0x227c27(0x19b)],_0x128797[_0x227c27(0x14f)]),_0x1f636f=void 0x0!==_0x128797[_0x227c27(0x14f)]?[_0x1dadfb[_0x227c27(0x229)][_0x128797[_0x227c27(0x14f)]]]:_0x1dadfb[_0x227c27(0x229)][_0x227c27(0x195)](_0x5cbfc7=>_0x227c27(0xf7)==_0x5cbfc7[_0x227c27(0x1c5)]),_0x55abc9=_0x1f636f[_0x227c27(0x18b)](_0x1dc135=>_0x1dadfb[_0x227c27(0x229)][_0x227c27(0x17d)](_0x1dc135));_0x55abc9[_0x227c27(0x14e)](_0xe3bd86=>_0x1dadfb[_0x227c27(0x147)](_0xe3bd86,_0x227c27(0x189)));const _0xa7a57f=_0x576c10({'editor':_0x337e9e,'reply':_0x1dadfb,'interaction':_0x56b385,'groups':_0x1f636f,'transform':!0x0,'documentCompare':_0x45d07a,'documentCompareOptions':{'anchor':_0x227c27(0xea),'markDeletions':!0x1}});let _0x21bb04;_0x5172a7&&this[_0x227c27(0x122)](_0x5172a7[_0x227c27(0x1c6)]),_0x337e9e[_0x227c27(0x1b8)][_0x227c27(0x233)](_0xe4a82b=>{const _0x3a7340=_0x227c27;_0x21bb04=_0xe4a82b[_0x3a7340(0x226)];for(const _0x1ed0e6 of _0xa7a57f)_0x1ed0e6[_0x3a7340(0x166)]=_0x337e9e[_0x3a7340(0x1b8)][_0x3a7340(0x1ed)][_0x3a7340(0x23a)],_0xe4a82b[_0x3a7340(0x226)][_0x3a7340(0x18f)](_0x1ed0e6),_0x337e9e[_0x3a7340(0x1b8)][_0x3a7340(0x1e4)](_0x1ed0e6);}),this[_0x227c27(0x22e)][_0x227c27(0x110)](_0x21bb04,{'interactionId':_0x56b385['id'],'replyId':_0x1dadfb['id'],'indexes':_0x55abc9[_0x227c27(0x221)]()}),this[_0x227c27(0xfb)](_0x1dadfb);}[_0x465c9f(0x217)](_0x1917c9,_0xdc8bbc){const _0x15714=_0x465c9f,_0x3435f9=_0xcf3e41(this[_0x15714(0x14b)]),_0x4f949b=this[_0x15714(0x145)](_0x1917c9,_0xdc8bbc),_0x2fc1aa=this[_0x15714(0x14b)][_0x15714(0x1eb)][_0x15714(0x13c)](_0x575363);if(!_0x4f949b)return void _0x2fc1aa[_0x15714(0x22c)]();const {range:_0x13407b,currentIndex:_0x3adf60,previousIndex:_0x9a958c,nextIndex:_0x1c2f32}=_0x4f949b;if(this[_0x15714(0x107)]?.[_0x15714(0x19b)]==_0x1917c9&&this[_0x15714(0x107)]?.[_0x15714(0x14f)]==_0x3adf60)return;this[_0x15714(0x107)]={'replyId':_0x1917c9,'partIndex':_0x3adf60};const _0x3e7b98=new _0x2aa5ee(_0x3435f9[_0x15714(0x1aa)],{'showDiff':this[_0x15714(0x1ad)],'areActionsDisabled':!0x1,'miniToolbarConfig':{'showChanges':_0x15714(0xfc)},'hideHeader':!0x0}),{reply:_0x4858ed}=this[_0x15714(0x1f9)](_0x1917c9),_0x1af057=_0x3f67f2({'editor':_0x3435f9,'changeGroups':[_0x4858ed[_0x15714(0x229)][_0x3adf60]],'documentContextContent':_0x4858ed[_0x15714(0x1a0)],'showDiff':this[_0x15714(0x1ad)]});_0x3e7b98[_0x15714(0x19d)]({'parts':_0x1af057,'renderingStrategy':_0x15714(0x1b3)});const _0x2b258e=_0x3adf60!==_0x9a958c;this[_0x15714(0x122)](_0x13407b,!0x0),_0x2fc1aa[_0x15714(0xfd)]({'index':_0x3adf60,'title':_0x206cf5(this[_0x15714(0x14b)][_0x15714(0x1aa)],_0x15714(0x1f1),(_0x3adf60+0x1)[_0x15714(0x1db)]()),'icon':_0x2c9745,'mainView':_0x3e7b98,'showRotator':_0x2b258e,'showApplyButton':!0x0,'showSuggestButton':!0x0,'ranges':[_0x13407b]}),this[_0x15714(0x207)][_0x15714(0x194)](_0x1917c9,_0x3adf60),this[_0x15714(0x1c0)](_0x3e7b98,_0x15714(0x1a7),(_0x3abf56,{showDiff:_0x37f26e})=>{const _0x369176=_0x15714;this[_0x369176(0x1ad)]=_0x37f26e;const {reply:_0x3ae806}=this[_0x369176(0x1f9)](_0x1917c9),_0x52a48c=_0x3f67f2({'editor':_0x3435f9,'changeGroups':[_0x3ae806[_0x369176(0x229)][_0x3adf60]],'documentContextContent':_0x3ae806[_0x369176(0x1a0)],'showDiff':_0x37f26e});_0x3e7b98[_0x369176(0x19d)]({'parts':_0x52a48c,'renderingStrategy':_0x369176(0x1b3)});}),this[_0x15714(0x1c0)](_0x2fc1aa,_0x15714(0x23d),()=>{const _0x359b26=_0x15714;this[_0x359b26(0x100)]({'replyId':_0x1917c9,'partIndex':_0x3adf60}),_0x2b258e?this[_0x359b26(0x217)](_0x1917c9,_0x1c2f32):_0x2fc1aa[_0x359b26(0x22c)]();}),this[_0x15714(0x1c0)](_0x2fc1aa,_0x15714(0x1ae),()=>{const _0x5b1c8c=_0x15714;this[_0x5b1c8c(0x159)]({'replyId':_0x1917c9,'partIndex':_0x3adf60}),_0x2b258e?this[_0x5b1c8c(0x217)](_0x1917c9,_0x1c2f32):_0x2fc1aa[_0x5b1c8c(0x22c)]();}),_0x2b258e&&(this[_0x15714(0x1c0)](_0x2fc1aa,_0x15714(0x135),()=>{const _0x3dd5e1=_0x15714;this[_0x3dd5e1(0x217)](_0x1917c9,_0x1c2f32);}),this[_0x15714(0x1c0)](_0x2fc1aa,_0x15714(0x1d4),()=>{const _0xea853b=_0x15714;this[_0xea853b(0x217)](_0x1917c9,_0x9a958c);})),this[_0x15714(0x1c0)](_0x2fc1aa,_0x15714(0x172),()=>{const _0x3915e4=_0x15714;this[_0x3915e4(0x105)](_0x2fc1aa),this[_0x3915e4(0x105)](_0x3e7b98),this[_0x3915e4(0x107)]=null;});}[_0x465c9f(0x145)](_0x323968,_0x748c52){const _0xa6ae4=_0x465c9f,_0x567af1=_0xcf3e41(this[_0xa6ae4(0x14b)]),{reply:_0xbf929e,interaction:_0x3e0458}=this[_0xa6ae4(0x1f9)](_0x323968),_0x503984=_0xbf929e[_0xa6ae4(0x229)][_0xa6ae4(0x195)](_0x470f13=>_0xa6ae4(0xf7)==_0x470f13[_0xa6ae4(0x1c5)]),_0x336c44=_0x503984[_0xa6ae4(0x18b)](_0x2fda44=>_0xbf929e[_0xa6ae4(0x229)][_0xa6ae4(0x17d)](_0x2fda44));void 0x0===_0x748c52&&(_0x748c52=_0x336c44[0x0]);const _0x3d890e=_0x336c44[_0xa6ae4(0x17d)](_0x748c52);if(-0x1==_0x3d890e)return null;const _0x3b051d=0x0==_0x3d890e?_0x336c44[_0x336c44[_0xa6ae4(0x128)]-0x1]:_0x336c44[_0x3d890e-0x1],_0x48614f=_0x3d890e==_0x336c44[_0xa6ae4(0x128)]-0x1?_0x336c44[0x0]:_0x336c44[_0x3d890e+0x1],_0x2ccfe4=_0x503984[_0x3d890e],_0xb0bb56=new _0x310a2a([]),_0x2e3999=new _0x310a2a([]);for(const _0x466283 of _0x2ccfe4[_0xa6ae4(0x243)])if(_0xa6ae4(0x12b)!=_0x466283[_0xa6ae4(0x141)]&&_0x2e3999[_0xa6ae4(0x11b)][_0xa6ae4(0x1bc)](_0x466283[_0xa6ae4(0x225)][_0xa6ae4(0x171)](!0x0)),_0xa6ae4(0x129)!=_0x466283[_0xa6ae4(0x141)]){const _0x3a1186=_0x50919c(_0x573db5=>_0xba5a54(_0x573db5,_0xa6ae4(0x134))==_0x466283['id'],_0xbf929e[_0xa6ae4(0x1a0)],!0x0);_0xb0bb56[_0xa6ae4(0x11b)][_0xa6ae4(0x1bc)](_0x3a1186[_0xa6ae4(0x171)](!0x0));}if(0x0==_0xb0bb56[_0xa6ae4(0x11b)][_0xa6ae4(0x128)]){if(_0x2ccfe4[_0xa6ae4(0x243)][0x0][_0xa6ae4(0x220)]){const _0x4e6242=_0x4920f8(_0xa6ae4(0x134),_0x2ccfe4[_0xa6ae4(0x243)][0x0][_0xa6ae4(0x220)],_0xbf929e[_0xa6ae4(0x1a0)]);_0xb0bb56[_0xa6ae4(0x11b)][_0xa6ae4(0x1fe)](_0x4e6242[_0xa6ae4(0x171)](!0x0)),_0x2e3999[_0xa6ae4(0x11b)][_0xa6ae4(0x1fe)](_0x4e6242[_0xa6ae4(0x171)](!0x0)),_0x4e6242[_0xa6ae4(0x23e)]&&(_0xb0bb56[_0xa6ae4(0x11b)][_0xa6ae4(0x1bc)](_0x4e6242[_0xa6ae4(0x23e)][_0xa6ae4(0x171)](!0x0)),_0x2e3999[_0xa6ae4(0x11b)][_0xa6ae4(0x1bc)](_0x4e6242[_0xa6ae4(0x23e)][_0xa6ae4(0x171)](!0x0)));}else{const _0x38e8f1=_0xbf929e[_0xa6ae4(0x1a0)][_0xa6ae4(0x11b)][0x0];if(!_0x38e8f1)return null;_0xb0bb56[_0xa6ae4(0x11b)][_0xa6ae4(0x1bc)](_0x38e8f1[_0xa6ae4(0x171)](!0x0)),_0x2e3999[_0xa6ae4(0x11b)][_0xa6ae4(0x1bc)](_0x38e8f1[_0xa6ae4(0x171)](!0x0));}}const _0x239c9d=_0x3e0458[_0xa6ae4(0x227)](),_0x55346d=_0x567af1[_0xa6ae4(0x16b)][_0xa6ae4(0x151)](_0x239c9d[_0xa6ae4(0x213)]),_0xe3a51c=_0x272331(_0xb0bb56),_0x13e8a8=_0x567af1[_0xa6ae4(0x16b)][_0xa6ae4(0x151)](_0xe3a51c),_0x4acd12=_0x567af1[_0xa6ae4(0x16b)][_0xa6ae4(0x151)](_0xe3a51c),_0x167a03=_0x567af1[_0xa6ae4(0x1b8)][_0xa6ae4(0x1a4)](_0x13e8a8,0x0),_0x22f8df=_0x272331(_0x2e3999),_0x4e0700={'anchor':_0x167a03,'markDeletions':!0x1},_0x435115=_0x567af1[_0xa6ae4(0x1eb)][_0xa6ae4(0x13c)](_0x2e3a0e)[_0xa6ae4(0x11e)](_0xe3a51c,_0x22f8df,_0x4e0700)[_0xa6ae4(0x1bd)]();if(!_0x435115[_0xa6ae4(0x128)])return null;_0x567af1[_0xa6ae4(0x1b8)][_0xa6ae4(0x233)](_0x337b93=>{const _0x1f92f6=_0xa6ae4;for(const _0x1a1e5b of _0x435115)if(_0x1f92f6(0x123)==_0x1a1e5b[_0x1f92f6(0x141)]){const _0x3f087a=_0x1a1e5b[_0x1f92f6(0x12c)],_0x387181=_0x1a1e5b[_0x1f92f6(0x1ce)],_0xc1cde9=new _0x3fb93a(_0x3f087a,_0x387181);_0x337b93[_0x1f92f6(0x226)][_0x1f92f6(0x18f)](_0xc1cde9),_0x567af1[_0x1f92f6(0x1b8)][_0x1f92f6(0x1e4)](_0xc1cde9);}else _0x1a1e5b[_0x1f92f6(0x166)]=null,_0x1a1e5b[_0x1f92f6(0x158)]=!0x1,_0x337b93[_0x1f92f6(0x226)][_0x1f92f6(0x18f)](_0x1a1e5b),_0x567af1[_0x1f92f6(0x1b8)][_0x1f92f6(0x1e4)](_0x1a1e5b);});const _0x3bd796=_0x32f874(_0x567af1,_0x435115,_0x13e8a8);_0x4b847d(_0x567af1[_0xa6ae4(0x1b8)],_0x3bd796);const _0x5544f9=_0x3bd796[_0xa6ae4(0x19e)]()[_0xa6ae4(0x21a)][_0xa6ae4(0x205)][_0xa6ae4(0x221)](),_0x3ff280=_0x3bd796[_0xa6ae4(0x19e)]()[_0xa6ae4(0x124)][_0xa6ae4(0x205)][_0xa6ae4(0x221)](),_0x38af7f=[];let _0xf33bd5=_0x13e8a8,_0x412f6e=_0x4acd12;for(let _0xdeed85=0x0;_0xdeed85<_0x3ff280[_0xa6ae4(0x128)];_0xdeed85++){const _0x59b11b=_0xf33bd5[_0xa6ae4(0x1e8)]-_0x3ff280[_0xdeed85];_0x38af7f[_0xdeed85]=_0x412f6e[_0xa6ae4(0x1e8)]-_0x59b11b,_0xf33bd5=_0xf33bd5[_0xa6ae4(0x1af)](_0x3ff280[_0xdeed85]),_0x412f6e=_0x412f6e[_0xa6ae4(0x1af)](_0x38af7f[_0xdeed85]);}const _0x105a99=_0x567af1[_0xa6ae4(0x1b8)][_0xa6ae4(0x1ee)](_0x567af1[_0xa6ae4(0x1b8)][_0xa6ae4(0x13f)](_0x4acd12,_0x5544f9),_0x567af1[_0xa6ae4(0x1b8)][_0xa6ae4(0x13f)](_0x4acd12,_0x38af7f)),_0x1e145d=_0x4acd12[_0xa6ae4(0x212)](0x0)[_0xa6ae4(0x163)](_0x37efa2),_0x144228=Array[_0xa6ae4(0x11f)](_0x55346d[_0xa6ae4(0x1de)]())[_0xa6ae4(0x184)](_0x4497bb=>_0x4497bb[_0xa6ae4(0x163)](_0x37efa2)==_0x1e145d)[_0xa6ae4(0xf4)](),_0x23e9f4=_0x105a99[_0xa6ae4(0x21a)][_0xa6ae4(0x205)][_0xa6ae4(0x221)](),_0x3048e0=_0x105a99[_0xa6ae4(0x124)][_0xa6ae4(0x205)][_0xa6ae4(0x221)]();_0x23e9f4[0x0]=_0x144228[0x0]+_0x23e9f4[0x0],_0x3048e0[0x0]=_0x144228[0x0]+_0x3048e0[0x0];let _0x53ef60=_0x567af1[_0xa6ae4(0x1b8)][_0xa6ae4(0x1ee)](_0x567af1[_0xa6ae4(0x1b8)][_0xa6ae4(0x13f)](_0x567af1[_0xa6ae4(0x1b8)][_0xa6ae4(0x1ed)][_0xa6ae4(0x22f)](),_0x23e9f4),_0x567af1[_0xa6ae4(0x1b8)][_0xa6ae4(0x13f)](_0x567af1[_0xa6ae4(0x1b8)][_0xa6ae4(0x1ed)][_0xa6ae4(0x22f)](),_0x3048e0));const _0x8f9b27=_0x567af1[_0xa6ae4(0x1b8)][_0xa6ae4(0x1ed)][_0xa6ae4(0x125)][_0xa6ae4(0x1bd)](_0x239c9d[_0xa6ae4(0x23a)]);for(const _0xc9ffff of _0x8f9b27)_0x53ef60=_0x5d6e1f[_0xa6ae4(0x1f0)](_0x53ef60[_0xa6ae4(0x169)](_0xc9ffff));return{'range':_0x53ef60,'previousIndex':_0x3b051d,'nextIndex':_0x48614f,'currentIndex':_0x748c52};}[_0x465c9f(0x10a)](_0x456599){const _0x10f7d7=_0x465c9f;if(!_0x456599[_0x10f7d7(0x1eb)][_0x10f7d7(0x1b5)](_0x10f7d7(0x164)))return;const _0x33f3bf=_0x456599[_0x10f7d7(0x23b)][_0x10f7d7(0x13c)](_0x10f7d7(0x214)),_0x239ff4=_0x456599[_0x10f7d7(0x23b)][_0x10f7d7(0x13c)](_0x10f7d7(0x10f));this[_0x10f7d7(0x1c0)](_0x33f3bf,_0x10f7d7(0x20f),(_0x5899c3,_0x46f187,_0x6c3524)=>{const _0x43db52=_0x10f7d7,_0x232a9e=this[_0x43db52(0x22e)][_0x43db52(0x13c)](_0x46f187);if(!_0x232a9e)return;const _0x4eb5fe=this[_0x43db52(0x204)][_0x43db52(0x20a)](_0x232a9e[_0x43db52(0x206)])[_0x43db52(0x174)](_0x232a9e[_0x43db52(0x19b)]);_0x232a9e[_0x43db52(0x118)][_0x43db52(0x14e)](_0x494175=>_0x4eb5fe[_0x43db52(0x147)](_0x494175,_0x43db52(0xf7))),this[_0x43db52(0x22e)][_0x43db52(0x22a)](_0x46f187),this[_0x43db52(0x22e)][_0x43db52(0x110)](_0x6c3524,_0x232a9e);}),this[_0x10f7d7(0x1c0)](_0x239ff4,_0x10f7d7(0x20f),(_0x224e8a,_0x8e457e,_0x1a8816)=>{const _0x4b4e07=_0x10f7d7,_0x113c7d=this[_0x4b4e07(0x22e)][_0x4b4e07(0x13c)](_0x8e457e);if(!_0x113c7d)return;const _0x35dea5=this[_0x4b4e07(0x204)][_0x4b4e07(0x20a)](_0x113c7d[_0x4b4e07(0x206)])[_0x4b4e07(0x174)](_0x113c7d[_0x4b4e07(0x19b)]);_0x113c7d[_0x4b4e07(0x118)][_0x4b4e07(0x14e)](_0x4fbe28=>_0x35dea5[_0x4b4e07(0x147)](_0x4fbe28,_0x4b4e07(0x189))),this[_0x4b4e07(0x22e)][_0x4b4e07(0x22a)](_0x8e457e),this[_0x4b4e07(0x22e)][_0x4b4e07(0x110)](_0x1a8816,_0x113c7d);});}async[_0x465c9f(0x168)](_0x55123c){const _0x46f7e5=_0x465c9f;this[_0x46f7e5(0x14b)][_0x46f7e5(0x1eb)][_0x46f7e5(0x13c)](_0x575363)[_0x46f7e5(0x22c)](),this[_0x46f7e5(0x207)][_0x46f7e5(0x1fd)](_0x46f7e5(0x1b3)),this[_0x46f7e5(0x207)][_0x46f7e5(0x143)](!0x0),await this[_0x46f7e5(0x1e7)]();try{const _0x17f0a4=this[_0x46f7e5(0x14b)][_0x46f7e5(0x1eb)][_0x46f7e5(0x13c)](_0x351d7e);this[_0x46f7e5(0x1df)]('\x20'),_0x17f0a4[_0x46f7e5(0xfe)][_0x46f7e5(0x170)](_0x46f7e5(0x1b0)),await this[_0x46f7e5(0x126)](_0x55123c);const {sessionId:_0x57eb57}=this[_0x46f7e5(0x144)][_0x46f7e5(0x200)]();await this[_0x46f7e5(0x204)][_0x46f7e5(0x149)](_0x55123c,_0x57eb57),this[_0x46f7e5(0x204)][_0x46f7e5(0x156)]()&&this[_0x46f7e5(0x204)][_0x46f7e5(0x1c8)](_0x206cf5(this[_0x46f7e5(0x14b)][_0x46f7e5(0x1aa)],_0x46f7e5(0xf1)));}catch(_0x39601e){console[_0x46f7e5(0x157)](_0x46f7e5(0xf9),_0x39601e);}finally{this[_0x46f7e5(0x207)][_0x46f7e5(0x1fd)](_0x46f7e5(0x179)),this[_0x46f7e5(0x207)][_0x46f7e5(0x143)](!0x1);}}[_0x465c9f(0x1ec)](_0x23cb22){const _0x221447=_0x465c9f;this[_0x221447(0x204)]['id']===_0x23cb22&&this[_0x221447(0x126)]();}async[_0x465c9f(0xfa)](){const _0x1dd0a3=_0x465c9f,_0x1c312f=this[_0x1dd0a3(0x144)][_0x1dd0a3(0x16e)]();this[_0x1dd0a3(0x204)]?.[_0x1dd0a3(0x222)](_0x1c312f),this[_0x1dd0a3(0x204)]?.[_0x1dd0a3(0x1c8)](_0x206cf5(this[_0x1dd0a3(0x14b)][_0x1dd0a3(0x1aa)],_0x1dd0a3(0xf1)));}[_0x465c9f(0x203)](){const _0x4dbaae=_0x465c9f;this[_0x4dbaae(0x204)]?.[_0x4dbaae(0x1e5)]();}[_0x465c9f(0x1e9)](){const _0x46ac30=_0x465c9f;this[_0x46ac30(0x207)][_0x46ac30(0x1e9)]();}async[_0x465c9f(0x193)](){const _0x271b77=_0x465c9f;await this[_0x271b77(0x126)]();}async[_0x465c9f(0x178)]({message:_0x15ef31,quickActionData:_0x105892}){const _0x5a8f99=_0x465c9f;await this[_0x5a8f99(0x1d5)]({'userMessage':_0x15ef31,'quickActionData':_0x105892});}[_0x465c9f(0x113)](){const _0x2cdca5=_0x465c9f,_0x2d4f60=this[_0x2cdca5(0x14b)][_0x2cdca5(0x102)][_0x2cdca5(0x13c)](_0x2cdca5(0x115));if(!_0x2d4f60)throw new _0x4f8449(_0x2cdca5(0x1ff),this);return _0x2d4f60;}async[_0x465c9f(0x126)](_0x23314b){const _0xc662fc=_0x465c9f;try{this[_0xc662fc(0x207)][_0xc662fc(0x20c)](),await this[_0xc662fc(0x10c)](_0x23314b);}catch(_0x3b19f3){_0x5e1962(_0xc662fc(0x1b4),_0x3b19f3),this[_0xc662fc(0x204)]=void 0x0,this[_0xc662fc(0x207)][_0xc662fc(0x133)]();}}async[_0x465c9f(0x10c)](_0x438a19){const _0x3fbc43=_0x465c9f,_0x2949d=this[_0x3fbc43(0x14b)][_0x3fbc43(0x1eb)][_0x3fbc43(0x13c)](_0x575363);let _0x51c015;_0x2949d[_0x3fbc43(0xec)]&&_0x2949d[_0x3fbc43(0x22c)](),_0x51c015=_0x438a19||!this[_0x3fbc43(0x204)]?this[_0x3fbc43(0x14b)][_0x3fbc43(0x102)][_0x3fbc43(0x13c)](_0x3fbc43(0x228)):this[_0x3fbc43(0x204)][_0x3fbc43(0x21b)]['id'],await this[_0x3fbc43(0x1e7)]();const _0x5d3e57=this[_0x3fbc43(0x113)](),_0x7c15f6=_0x438a19||_0x18f48e();this[_0x3fbc43(0x204)]=new _0x3dbaf9({'connector':this[_0x3fbc43(0x127)],'chatModels':this[_0x3fbc43(0x137)],'defaultModelId':_0x51c015,'conversationId':_0x7c15f6,'group':_0x5d3e57,'getEditor':()=>_0xcf3e41(this[_0x3fbc43(0x14b)])}),this[_0x3fbc43(0x204)]['on'](_0x3fbc43(0x1ac),(_0x16a1cb,_0x20c33b)=>{const _0x1c6c4c=_0x3fbc43;_0x20c33b[_0x1c6c4c(0x120)]=this[_0x1c6c4c(0x1f5)](_0x20c33b[_0x1c6c4c(0x120)],this[_0x1c6c4c(0x14b)][_0x1c6c4c(0x102)][_0x1c6c4c(0x13c)](_0x1c6c4c(0x1a1))),this[_0x1c6c4c(0x207)][_0x1c6c4c(0x1a2)](_0x20c33b),this[_0x1c6c4c(0x207)][_0x1c6c4c(0x1be)](),this[_0x1c6c4c(0x207)][_0x1c6c4c(0x13d)](),this[_0x1c6c4c(0x207)][_0x1c6c4c(0x19c)](),_0x438a19||(this[_0x1c6c4c(0x207)][_0x1c6c4c(0x139)](),this[_0x1c6c4c(0x204)]?.[_0x1c6c4c(0x1c8)](_0x206cf5(this[_0x1c6c4c(0x14b)][_0x1c6c4c(0x1aa)],_0x1c6c4c(0xf1))));}),this[_0x3fbc43(0x204)]['on'](_0x3fbc43(0x14c),(_0x43d571,_0x389adc)=>{const _0x36ab86=_0x3fbc43;this[_0x36ab86(0x207)][_0x36ab86(0x1fa)](_0x389adc[_0x36ab86(0x1b1)]);}),this[_0x3fbc43(0x204)]['on'](_0x3fbc43(0x136),(_0x27a026,_0x19e4f9)=>{const _0x31c6f1=_0x3fbc43;this[_0x31c6f1(0x207)][_0x31c6f1(0x1ea)](_0x19e4f9);}),this[_0x3fbc43(0x204)]['on'](_0x3fbc43(0x1ca),()=>{const _0xe790cb=_0x3fbc43;this[_0xe790cb(0x207)][_0xe790cb(0x22d)]({'isWebSearchEnabled':!0x0,'isReasoningEnabled':!0x1});}),this[_0x3fbc43(0x204)]['on'](_0x3fbc43(0x1e3),()=>{const _0x387301=_0x3fbc43;this[_0x387301(0x207)][_0x387301(0x22d)]({'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x0});}),this[_0x3fbc43(0x204)]['on'](_0x3fbc43(0x1c9),(_0x2f52a2,_0x2dbdee)=>{const _0x3daaba=_0x3fbc43;this[_0x3daaba(0x207)][_0x3daaba(0x18c)](_0x2dbdee,{'isWebSearchEnabled':!0x0,'isReasoningEnabled':!0x1});}),this[_0x3fbc43(0x204)]['on'](_0x3fbc43(0x1d8),(_0x58cb9d,_0x88326f)=>{const _0x4dbe5a=_0x3fbc43;this[_0x4dbe5a(0x207)][_0x4dbe5a(0x18c)](_0x88326f,{'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x0});}),this[_0x3fbc43(0x204)]['on'](_0x3fbc43(0x1f4),()=>{const _0x2bd026=_0x3fbc43;this[_0x2bd026(0x207)][_0x2bd026(0x114)]();}),this[_0x3fbc43(0x204)]['on'](_0x3fbc43(0xed),async()=>{const _0x497d0e=_0x3fbc43;await this[_0x497d0e(0x207)][_0x497d0e(0x21f)]();}),this[_0x3fbc43(0x204)]['on'](_0x3fbc43(0x1dc),(_0x405e74,_0x30964b)=>{const _0x19b9f5=_0x3fbc43;this[_0x19b9f5(0x207)][_0x19b9f5(0x12d)](_0x30964b['id']);}),this[_0x3fbc43(0x204)]['on'](_0x3fbc43(0x16c),(_0x3d1dd0,_0xce712f,_0x237a59)=>{const _0x6b89c=_0x3fbc43;this[_0x6b89c(0x1df)](_0xce712f,_0x237a59);}),this[_0x3fbc43(0x204)]['on'](_0x3fbc43(0x1c1),(_0x3037ef,_0x42684a)=>{const _0x5ba034=_0x3fbc43;_0x5ba034(0x196)===_0x42684a[_0x5ba034(0x141)]?this[_0x5ba034(0x207)][_0x5ba034(0x191)](_0x42684a):this[_0x5ba034(0x207)][_0x5ba034(0x1d0)](_0x42684a);}),this[_0x3fbc43(0x204)]['on'](_0x3fbc43(0x1cb),async(_0x49638d,_0xb8caa5,_0x482eda)=>{const _0x5c9b4d=_0x3fbc43;await this[_0x5c9b4d(0x1e6)]({'reply':_0xb8caa5,'changeGroups':_0x482eda});}),this[_0x3fbc43(0x204)]['on'](_0x3fbc43(0x1c3),(_0xead35d,{reply:_0x225575,index:_0xd59e17,state:_0x5adb20})=>{const _0x26f458=_0x3fbc43;this[_0x26f458(0x207)][_0x26f458(0x1fc)]({'id':_0x225575['id'],'index':_0xd59e17,'state':_0x5adb20});}),this[_0x3fbc43(0x204)]['on'](_0x3fbc43(0x188),(_0x457366,_0x25b214)=>{const _0x4b27c1=_0x3fbc43;if(this[_0x4b27c1(0x207)][_0x4b27c1(0x17e)](_0x25b214[_0x4b27c1(0x181)],_0x25b214[_0x4b27c1(0x142)]),_0x4b27c1(0x162)===_0x25b214[_0x4b27c1(0x181)][_0x4b27c1(0x141)]){const _0xf9ca73=[..._0xcf3e41(this[_0x4b27c1(0x14b)])[_0x4b27c1(0x1b8)][_0x4b27c1(0x1ed)][_0x4b27c1(0x162)][_0x4b27c1(0x12a)]()];this[_0x4b27c1(0x144)][_0x4b27c1(0x12f)](_0xf9ca73,_0x4b27c1(0xee)+this[_0x4b27c1(0x204)]?.['id']);}}),this[_0x3fbc43(0x204)]['on'](_0x3fbc43(0x130),(_0x32ccb5,_0x51b538)=>{const _0x591013=_0x3fbc43;this[_0x591013(0x207)][_0x591013(0x198)](_0x51b538[_0x591013(0x1e2)]),_0x591013(0xf0)==_0x51b538[_0x591013(0x1e2)]&&this[_0x591013(0x203)](),_0x591013(0x162)===_0x51b538[_0x591013(0x141)]&&this[_0x591013(0x144)][_0x591013(0x20d)](_0x591013(0xee)+this[_0x591013(0x204)]?.['id']);}),this[_0x3fbc43(0x204)]['on'](_0x3fbc43(0x18d),(_0x1cddac,_0x4dbd4d)=>{const _0x326317=_0x3fbc43;this[_0x326317(0x207)][_0x326317(0x117)](_0x4dbd4d[_0x326317(0x181)][_0x326317(0x1e2)],_0x4dbd4d[_0x326317(0x142)]);}),this[_0x3fbc43(0x204)]['on'](_0x3fbc43(0x21d),(_0x5ffd4d,_0x46ef19)=>{const _0x4bf04c=_0x3fbc43;this[_0x4bf04c(0x207)][_0x4bf04c(0x1b7)](_0x46ef19[_0x4bf04c(0x240)]);}),this[_0x3fbc43(0x204)]['on'](_0x3fbc43(0x119),(_0x145ef1,_0xa58808)=>{const _0x44c42=_0x3fbc43;this[_0x44c42(0x207)][_0x44c42(0x201)](_0xa58808[_0x44c42(0x1cc)]);}),this[_0x3fbc43(0x204)]['on'](_0x3fbc43(0x155),(_0x35c1b5,_0xef0cc6)=>{const _0x51484c=_0x3fbc43;this[_0x51484c(0x207)][_0x51484c(0x153)](_0xef0cc6[_0x51484c(0x13b)],_0xef0cc6[_0x51484c(0x232)],_0xef0cc6[_0x51484c(0x23f)],_0xef0cc6[_0x51484c(0x121)]);}),this[_0x3fbc43(0x204)]['on'](_0x3fbc43(0x1bb),(_0x2c6358,_0x6ebd69)=>{const _0x14279e=_0x3fbc43;this[_0x14279e(0x207)][_0x14279e(0x13e)](_0x6ebd69[_0x14279e(0x13b)],_0x6ebd69[_0x14279e(0x15e)],_0x6ebd69[_0x14279e(0x11c)]);}),this[_0x3fbc43(0x204)]['on'](_0x3fbc43(0x15d),(_0x1314c8,_0x502ed4)=>{const _0x53bd4f=_0x3fbc43;this[_0x53bd4f(0x207)][_0x53bd4f(0x1d1)](_0x502ed4);}),this[_0x3fbc43(0x204)]['on'](_0x3fbc43(0x211),(_0x2a6699,_0x3950a4)=>{const _0x1c04f4=_0x3fbc43;this[_0x1c04f4(0x207)][_0x1c04f4(0x111)](_0x3950a4[_0x1c04f4(0x21b)],_0x3950a4[_0x1c04f4(0x186)]);}),this[_0x3fbc43(0x204)]['on'](_0x3fbc43(0x157),(_0x4d3057,{error:_0x29e43c,interactionId:_0x387bd8,fileName:_0x4bfd05,url:_0x3caec7,sourceId:_0x694a94,sourceLabel:_0x4e4c29})=>{const _0x5995e5=_0x3fbc43,_0x32750b=_0x387bd8?_0x387bd8+':'+_0x18f48e():_0x18f48e();_0x29e43c[_0x5995e5(0x131)][_0x5995e5(0x22b)](_0x5995e5(0x104))?this[_0x5995e5(0x207)][_0x5995e5(0x1bf)]({'staticMessage':_0x206cf5(this[_0x5995e5(0x14b)][_0x5995e5(0x1aa)],_0x5995e5(0x1fb)),'id':_0x32750b}):_0x29e43c[_0x5995e5(0x131)][_0x5995e5(0x22b)](_0x5995e5(0x14a))||_0x29e43c[_0x5995e5(0x131)][_0x5995e5(0x22b)](_0x5995e5(0x1b4))?(this[_0x5995e5(0x207)][_0x5995e5(0x10b)]({'errorMessage':_0x206cf5(this[_0x5995e5(0x14b)][_0x5995e5(0x1aa)],_0x5995e5(0x17b)),'id':_0x32750b}),this[_0x5995e5(0x20b)](_0x29e43c)):_0x29e43c[_0x5995e5(0x131)][_0x5995e5(0x22b)](_0x5995e5(0x1f6))?this[_0x5995e5(0x207)][_0x5995e5(0x10b)]({'errorMessage':_0x206cf5(this[_0x5995e5(0x14b)][_0x5995e5(0x1aa)],_0x5995e5(0x19a),_0x4bfd05),'id':_0x32750b}):_0x29e43c[_0x5995e5(0x131)][_0x5995e5(0x22b)](_0x5995e5(0x14d))?this[_0x5995e5(0x207)][_0x5995e5(0x10b)]({'errorMessage':_0x206cf5(this[_0x5995e5(0x14b)][_0x5995e5(0x1aa)],_0x5995e5(0x112),_0x3caec7),'id':_0x32750b}):_0x29e43c[_0x5995e5(0x131)][_0x5995e5(0x22b)](_0x5995e5(0x132))?this[_0x5995e5(0x207)][_0x5995e5(0x10b)]({'errorMessage':_0x206cf5(this[_0x5995e5(0x14b)][_0x5995e5(0x1aa)],_0x5995e5(0x1f8)),'id':_0x32750b}):_0x29e43c[_0x5995e5(0x131)][_0x5995e5(0x22b)](_0x5995e5(0x21e))?this[_0x5995e5(0x207)][_0x5995e5(0x10b)]({'errorMessage':_0x206cf5(this[_0x5995e5(0x14b)][_0x5995e5(0x1aa)],_0x5995e5(0x146)),'id':_0x32750b}):_0x29e43c[_0x5995e5(0x131)][_0x5995e5(0x22b)](_0x5995e5(0x109))?(_0x694a94&&this[_0x5995e5(0x207)][_0x5995e5(0x177)](_0x694a94),this[_0x5995e5(0x207)][_0x5995e5(0x10b)]({'errorMessage':_0x206cf5(this[_0x5995e5(0x14b)][_0x5995e5(0x1aa)],_0x5995e5(0x190),_0x4e4c29||_0x5995e5(0x232)),'id':_0x32750b}),this[_0x5995e5(0x20b)](_0x29e43c)):_0x29e43c[_0x5995e5(0x131)][_0x5995e5(0x22b)](_0x5995e5(0x11d))?(this[_0x5995e5(0x207)][_0x5995e5(0x10b)]({'errorMessage':_0x206cf5(this[_0x5995e5(0x14b)][_0x5995e5(0x1aa)],_0x5995e5(0x16d)),'id':_0x32750b}),this[_0x5995e5(0x20b)](_0x29e43c)):(this[_0x5995e5(0x207)][_0x5995e5(0x10b)]({'errorMessage':_0x206cf5(this[_0x5995e5(0x14b)][_0x5995e5(0x1aa)],_0x5995e5(0x13a)),'id':_0x32750b}),this[_0x5995e5(0x20b)](_0x29e43c));}),await this[_0x3fbc43(0x204)][_0x3fbc43(0xe9)](this[_0x3fbc43(0x14b)][_0x3fbc43(0x102)][_0x3fbc43(0x13c)](_0x3fbc43(0x161))),_0x438a19||await this[_0x3fbc43(0x204)][_0x3fbc43(0x21a)]();}async[_0x465c9f(0x1d5)]({userMessage:_0x2415df,quickActionData:_0x6ce839}){const _0x324f8d=_0x465c9f;if(!this[_0x324f8d(0x204)])throw new _0x4f8449(_0x324f8d(0x15a));this[_0x324f8d(0x204)][_0x324f8d(0x187)]()&&await this[_0x324f8d(0x204)][_0x324f8d(0x1b2)](this[_0x324f8d(0x144)][_0x324f8d(0x200)]()),this[_0x324f8d(0x204)]['id']&&this[_0x324f8d(0x204)][_0x324f8d(0x215)]&&await this[_0x324f8d(0x204)][_0x324f8d(0x1ab)]({'userMessage':_0x2415df,'quickActionData':_0x6ce839}),this[_0x324f8d(0x242)]();}[_0x465c9f(0x242)](){const _0x22cc4c=_0x465c9f,_0x65a5aa=_0xcf3e41(this[_0x22cc4c(0x14b)])[_0x22cc4c(0x1b8)],_0x5d47e6=Array[_0x22cc4c(0x11f)](_0x65a5aa[_0x22cc4c(0xf2)][_0x22cc4c(0x16f)](_0x3d0f78));_0x65a5aa[_0x22cc4c(0x233)](_0x43c517=>{const _0x25794e=_0x22cc4c;_0x5d47e6[_0x25794e(0x14e)](_0x184d0a=>_0x43c517[_0x25794e(0x138)](_0x184d0a));});}[_0x465c9f(0x1a3)](){const _0x23daa4=_0x465c9f;console[_0x23daa4(0x154)](_0x23daa4(0x1ba));}[_0x465c9f(0x1cd)](_0x5ceef4){const _0xdbebf2=_0x465c9f;this[_0xdbebf2(0x207)][_0xdbebf2(0x12e)](_0x5ceef4);}[_0x465c9f(0x20b)](_0x470ba4){const _0x55618a=_0x465c9f;_0x5e1962(_0x470ba4[_0x55618a(0x131)]);}[_0x465c9f(0x1d9)](_0x50b9d6){const _0x3e91c3=_0x465c9f;this[_0x3e91c3(0x204)]?.[_0x3e91c3(0x106)](_0x50b9d6);}[_0x465c9f(0x238)](){const _0x8e01e3=_0x465c9f;this[_0x8e01e3(0x204)]?.[_0x8e01e3(0x180)]();}[_0x465c9f(0x208)](){const _0xffd255=_0x465c9f;this[_0xffd255(0x204)]?.[_0xffd255(0x1dd)]();}[_0x465c9f(0x1f9)](_0x4d63d9){const _0x4cd5aa=_0x465c9f,[_0x52b991,_0x11bb31]=_0x4d63d9[_0x4cd5aa(0x230)](':'),_0x55740c=this[_0x4cd5aa(0x204)][_0x4cd5aa(0x20a)](_0x52b991),_0x556979=_0x55740c[_0x4cd5aa(0x174)](_0x11bb31);return{'interaction':_0x55740c,'reply':_0x556979};}[_0x465c9f(0x122)](_0x5166c1,_0x1601a5=!0x1){const _0x21fc39=_0x465c9f,_0x8676e7=_0xcf3e41(this[_0x21fc39(0x14b)]),_0x33861d={'target':_0x8676e7[_0x21fc39(0x176)][_0x21fc39(0xfe)][_0x21fc39(0x202)][_0x21fc39(0x11a)](_0x8676e7[_0x21fc39(0x176)][_0x21fc39(0xff)][_0x21fc39(0x235)](_0x5166c1)),'viewportOffset':{'top':0x96,'left':0x0,'bottom':0x32,'right':0x0},'ancestorOffset':0x14,'alignToTop':_0x1601a5};_0x1601a5&&(_0x33861d[_0x21fc39(0x1b9)]=!0x0),_0x425377(_0x33861d);}[_0x465c9f(0x1df)](_0x29c80a,_0x30b570=!0x1){const _0x419a14=_0x465c9f;this[_0x419a14(0x207)][_0x419a14(0x16c)](_0x29c80a||_0x206cf5(this[_0x419a14(0x14b)][_0x419a14(0x1aa)],_0x419a14(0x108)),_0x30b570);}[_0x465c9f(0x1f5)](_0x33ceee,_0xd47d88){const _0x5d1b79=_0x465c9f;let _0x16a701;if(_0xd47d88){_0x16a701=[];const _0x3503a7=_0x5d1b79(0x1c7)==typeof _0xd47d88?[_0xd47d88[_0x5d1b79(0x10e)]()]:_0xd47d88[_0x5d1b79(0x18b)](_0x38c6cb=>_0x38c6cb[_0x5d1b79(0x10e)]());for(const _0x37ffd7 of _0x3503a7)for(const _0x2c9acb of _0x33ceee)(_0x2c9acb['id'][_0x5d1b79(0x10e)]()===_0x37ffd7||_0x2c9acb[_0x5d1b79(0x182)][_0x5d1b79(0x10e)]()===_0x37ffd7||_0x2c9acb[_0x5d1b79(0x116)][_0x5d1b79(0x10e)]()===_0x37ffd7||_0x2c9acb['id'][_0x5d1b79(0x10e)]()[_0x5d1b79(0x22b)](_0x37ffd7))&&_0x16a701[_0x5d1b79(0x1bc)](_0x2c9acb);}else _0x16a701=_0x33ceee;return _0x16a701;}async[_0x465c9f(0x1e6)]({reply:_0xb1bf7d,changeGroups:_0xe04f01,renderingStrategy:_0x4babc6}){const _0xcc359c=_0x465c9f,{id:_0x31b969,isDone:_0x19f713,type:_0x51ebce,parsedContent:_0x141547}=_0xb1bf7d;if(_0xcc359c(0x231)===_0x51ebce){const _0x54f48a=_0xcf3e41(this[_0xcc359c(0x14b)]),_0x10669a=_0x3f67f2({'editor':_0x54f48a,'showDiff':this[_0xcc359c(0x207)][_0xcc359c(0x160)],'changeGroups':_0xe04f01,'documentContextContent':_0xb1bf7d[_0xcc359c(0x1a0)]});await this[_0xcc359c(0x207)][_0xcc359c(0x15c)]({'id':_0x31b969,'parts':_0x10669a,'renderingStrategy':_0x4babc6,'isDone':_0x19f713});}else _0xcc359c(0x196)===_0x51ebce&&await this[_0xcc359c(0x207)][_0xcc359c(0x1e1)]({'id':_0x31b969,'parsedContent':_0x141547,'renderingStrategy':_0x4babc6,'isDone':_0x19f713});_0x19f713&&_0xb1bf7d[_0xcc359c(0x19f)][_0xcc359c(0x128)]>0x0&&this[_0xcc359c(0x207)][_0xcc359c(0x1f2)](_0x31b969,_0xb1bf7d[_0xcc359c(0x19f)]);}async[_0x465c9f(0x1e7)](){const _0x5a8671=_0x465c9f,_0x1ba344=this[_0x5a8671(0x204)]?.[_0x5a8671(0x16a)];_0x1ba344&&(_0x1ba344[_0x5a8671(0xef)](),this[_0x5a8671(0x207)][_0x5a8671(0x1c2)](_0x1ba344));}async[_0x465c9f(0x1a9)](){const _0x1dae48=_0x465c9f,_0x38822b=this[_0x1dae48(0x204)]?.[_0x1dae48(0x16a)];if(_0x38822b){for await(const _0x3f678a of _0x38822b[_0x1dae48(0xf3)])await this[_0x1dae48(0x1e6)]({'reply':_0x3f678a,'changeGroups':_0x3f678a[_0x1dae48(0x229)],'renderingStrategy':_0x1dae48(0x1b3)});}}[_0x465c9f(0xfb)](_0x3ba572){const _0x3130b1=_0x465c9f,_0x20c2fc={'positiveCount':_0x3ba572[_0x3130b1(0x229)][_0x3130b1(0x195)](_0x212cb7=>_0x3130b1(0x189)===_0x212cb7[_0x3130b1(0x1c5)])[_0x3130b1(0x128)],'totalCount':_0x3ba572[_0x3130b1(0x229)][_0x3130b1(0x128)]},_0x494cde=this[_0x3130b1(0x204)][_0x3130b1(0x20a)](_0x3ba572[_0x3130b1(0x206)])[_0x3130b1(0x150)];this[_0x3130b1(0x127)][_0x3130b1(0x152)](this[_0x3130b1(0x204)]['id'],_0x494cde,_0x20c2fc);}}
@@ -82,7 +82,7 @@ export declare class AIChatUI extends ContextPlugin {
82
82
  /**
83
83
  * Adds an interaction header to the chat feed.
84
84
  */
85
- addFeedInteractionHeader(interaction: AIChatInteraction): void;
85
+ addFeedInteractionHeader(interaction: AIChatInteraction, capabilities: AICapabilitiesConfig): void;
86
86
  /**
87
87
  * Updates the visibility of the interaction header in the chat feed.
88
88
  */
@@ -121,7 +121,7 @@ export declare class AIChatUI extends ContextPlugin {
121
121
  /**
122
122
  * Starts a new interaction processing in the UI and marks the UI as busy.
123
123
  */
124
- startInteraction(interaction: AIChatInteraction): void;
124
+ startInteraction(): void;
125
125
  /**
126
126
  * Handles the user stopping the interaction. It terminates all scheduled UI update promises and unlocks the UI
127
127
  * immediately.
@@ -201,6 +201,11 @@ export declare class AIChatUI extends ContextPlugin {
201
201
  * @param shouldAnimate Whether the title change should be animated. Defaults to `false`.
202
202
  */
203
203
  setConversationTitle(title: string, shouldAnimate?: boolean): void;
204
+ /**
205
+ * Sets the loading message of the chat feed based on the passed model capabilities. If `null` is passed,
206
+ * the loading message is cleared.
207
+ */
208
+ setLoadingMessage(capabilities: AICapabilitiesConfig | null): void;
204
209
  setIsMaximized(isMaximized: boolean): void;
205
210
  /**
206
211
  * Populates a source resource balloon with loaded resources.
@@ -212,6 +217,8 @@ export declare class AIChatUI extends ContextPlugin {
212
217
  closeSourceResourceBalloon(sourceId: string): void;
213
218
  focusPromptInput(): void;
214
219
  scrollFeedToSuggestion(replyId: string, partIndex: number): void;
220
+ disableControls(): void;
221
+ enableControls(): void;
215
222
  }
216
223
  /**
217
224
  * An event fired when the user starts a new conversation.
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- function _0x30c1(_0x510d90,_0x525f6c){const _0xcbf68a=_0xcbf6();return _0x30c1=function(_0x30c1c6,_0x48b76a){_0x30c1c6=_0x30c1c6-0x1e0;let _0x47aa4f=_0xcbf68a[_0x30c1c6];return _0x47aa4f;},_0x30c1(_0x510d90,_0x525f6c);}const _0x35179c=_0x30c1;(function(_0x111e8c,_0xcfb618){const _0x10d392=_0x30c1,_0x139555=_0x111e8c();while(!![]){try{const _0x3bbf76=parseInt(_0x10d392(0x1e6))/0x1+-parseInt(_0x10d392(0x25d))/0x2+-parseInt(_0x10d392(0x20f))/0x3*(parseInt(_0x10d392(0x264))/0x4)+parseInt(_0x10d392(0x1e3))/0x5+-parseInt(_0x10d392(0x1f2))/0x6*(-parseInt(_0x10d392(0x253))/0x7)+parseInt(_0x10d392(0x223))/0x8*(-parseInt(_0x10d392(0x209))/0x9)+parseInt(_0x10d392(0x1f5))/0xa;if(_0x3bbf76===_0xcfb618)break;else _0x139555['push'](_0x139555['shift']());}catch(_0x3f0c7e){_0x139555['push'](_0x139555['shift']());}}}(_0xcbf6,0x1b575));import{ContextPlugin as _0x113467}from'ckeditor5/src/core.js';import{_isMotionReduced as _0x42f1e2}from'ckeditor5/src/utils.js';import{AIChatView as _0x2133e7}from'./ui/aichatview.js';import{AITabs as _0x2b9dce}from'../aitabs/aitabs.js';import{getTranslation as _0x84fc5a}from'../aicore/utils/common-translations.js';import{IconAIChat as _0x3e8f08}from'ckeditor5/src/icons.js';import{AIChatFeedInteractionHeaderView as _0x1079d4}from'./ui/feed/aichatfeedinteractionheaderview.js';import{PromiseQueue as _0x1bc109}from'./utils/promisequeue.js';function _0xcbf6(){const _0x58044b=['isPending','createConversation','updateResourceState','addTab','isPremiumPlugin','setSelectedModel','updateReplyItem','removeContextItem','126836gxvjcO','chatFeed','locale','find','error-message','queueEmptyPromise','<p>','24668kdmigu','streaming','interaction-header','addFeedItemError','_promiseQueue','scrollFeedToSuggestion','setModelList','setInputPlaceholder','addContextItem','stopInteraction','setContextItemLoading','addFeedItemAISuggestion','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH_REASONING','bind','resetMessageInput','addItem','setConversationContext','startInteraction','AI_CHAT_WELCOME_MESSAGE','label','setWebSearch','focusPromptInput','451810aLkDjY','stopAutoScroll','closeSourceResourceBalloon','95993yUjQjQ','requires','context','isWebSearchEnabled','markFeedItemAsDone','options','disableModelSelector','getItemIds','interactionId','toggleLoadingSkeleton','addFeedItemStaticMessage','clear','12HypbHL','setFeedItemRenderingStrategy','availableModels','792280JMTXSl','startsWith','addFeedItemAIReply','pluginName','updateCapabilities','areActionsDisabled','finishInteraction','clearConversationContextUI','showDiff','plugins','markItemAsDone','set','forEach','renderingStrategy','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH_REASONING','clearPendingContextUI','user-message','setAddContextOptions','_view','get','27aQFxvy','updateFeedItemAIReplySources','from','enableModelSelector','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REASONING','AI_CHAT_HEADING','69QSLaWx','filter','setIsUploadInProgress','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH','setModel','delegate','updateFeedItemAIReplySuggestionPartState','_getLoadingMessage','setReasoning','startAutoScroll','scrollToSuggestion','isOfficialPlugin','setConversationTitle','feedItemRenderingStrategy','chatHeader','updateFeedItemAIReplySuggestionContent','_animateConversationTitle','chat','values','AI_CHAT_FEED_LOADING_MESSAGE_REASONING','149800mtVJHJ','destroy','addFeedInteractionHeader','capabilities','isLoading','updateWebSources','updateSuggestionItem','then','removeFeedInteraction','enqueue','isMaximized','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REGULAR','contextItems','conversation-start','setLoadingMessage','isBusy','userMessage','_interactionPromiseResolver','abort','ai.chat.models.modelSelectorAlwaysVisible','updateFeedInteractionHeader','removeItem','view','config','displayedPrompt','populateSourceResourceBalloon','ai-suggestion-reply','_getInputPlaceholder','showResizeButton','resetConversationTitle','AI_CHAT_FEED_LOADING_MESSAGE_REGULAR','AIChatUI','quickActionData','</p>','children','addFeedItemUserMessage','isDone','length','setIsMaximized','_titleAnimationInterval','isVisible','chatControls','AITabs','updateFeedItemAIReplyContent','updateSuggestionPartState','isReasoningEnabled','toggleSuggestionDisplayMode','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH','377440dNhbpU','ai-reply'];_0xcbf6=function(){return _0x58044b;};return _0xcbf6();}import{AI_CHAT_UI_EVENT_NAMES as _0x12440c}from'./utils/eventnames.js';import'../../theme/aichat/aichat.css';export class AIChatUI extends _0x113467{static get[_0x35179c(0x1e7)](){return[_0x2b9dce];}[_0x35179c(0x207)];static get[_0x35179c(0x1f8)](){const _0x3e16fe=_0x35179c;return _0x3e16fe(0x242);}static get[_0x35179c(0x21a)](){return!0x0;}static get[_0x35179c(0x259)](){return!0x0;}[_0x35179c(0x21c)]=_0x35179c(0x265);[_0x35179c(0x1fd)]=!0x0;[_0x35179c(0x268)];[_0x35179c(0x234)];[_0x35179c(0x24a)]=void 0x0;constructor(_0x368001){const _0x39db53=_0x35179c;super(_0x368001);const _0x1d2baf=this[_0x39db53(0x1e8)][_0x39db53(0x1fe)][_0x39db53(0x208)](_0x39db53(0x24d));this[_0x39db53(0x200)](_0x39db53(0x232),!0x1),this[_0x39db53(0x268)]=new _0x1bc109(),this[_0x39db53(0x207)]=new _0x2133e7(this[_0x39db53(0x1e8)][_0x39db53(0x25f)],_0x1d2baf[_0x39db53(0x23f)]),this[_0x39db53(0x207)][_0x39db53(0x214)](..._0x12440c)['to'](this),this[_0x39db53(0x207)]['on'](_0x39db53(0x251),(_0x531370,{showDiff:_0xd5c01a})=>{const _0x3103be=_0x39db53;this[_0x3103be(0x1fd)]=_0xd5c01a;}),_0x1d2baf[_0x39db53(0x239)][_0x39db53(0x258)]({'id':_0x39db53(0x220),'buttonLabel':_0x84fc5a(this[_0x39db53(0x1e8)][_0x39db53(0x25f)],_0x39db53(0x20e)),'buttonIcon':_0x3e8f08,'order':0x0,'content':this[_0x39db53(0x207)]}),this[_0x39db53(0x207)][_0x39db53(0x24c)][_0x39db53(0x271)](_0x39db53(0x227))['to'](this,_0x39db53(0x232),_0x3bd1ce=>_0x3bd1ce),this[_0x39db53(0x207)][_0x39db53(0x25e)][_0x39db53(0x271)](_0x39db53(0x255))['to'](this,_0x39db53(0x232),_0x5c39cc=>_0x5c39cc),this[_0x39db53(0x207)][_0x39db53(0x24c)][_0x39db53(0x26b)](this[_0x39db53(0x23e)]());}[_0x35179c(0x224)](){const _0x5baab0=_0x35179c;super[_0x5baab0(0x224)](),this[_0x5baab0(0x24a)]&&clearInterval(this[_0x5baab0(0x24a)]);}[_0x35179c(0x256)](_0x291d8c){const _0x6290bd=_0x35179c;this[_0x6290bd(0x207)][_0x6290bd(0x25e)][_0x6290bd(0x1f1)](),this[_0x6290bd(0x207)][_0x6290bd(0x24c)][_0x6290bd(0x20c)](),this[_0x6290bd(0x207)][_0x6290bd(0x24c)][_0x6290bd(0x26a)](_0x291d8c[_0x6290bd(0x1f4)],!this[_0x6290bd(0x1e8)][_0x6290bd(0x23a)][_0x6290bd(0x208)](_0x6290bd(0x236))),this[_0x6290bd(0x1f0)]({'id':_0x6290bd(0x230),'staticMessage':_0x84fc5a(this[_0x6290bd(0x1e8)][_0x6290bd(0x25f)],_0x6290bd(0x276))});}[_0x35179c(0x1f0)]({id:_0x4f8a1e,staticMessage:_0x1a6144}){const _0x479aa5=_0x35179c;this[_0x479aa5(0x207)][_0x479aa5(0x25e)][_0x479aa5(0x273)](_0x479aa5(0x254),{'id':_0x4f8a1e,'initialContent':_0x479aa5(0x263)+_0x1a6144+_0x479aa5(0x244)});}[_0x35179c(0x246)](_0x11282d){const _0x50e520=_0x35179c,_0xbba92=_0x11282d[_0x50e520(0x243)]?.[_0x50e520(0x23b)]||_0x11282d[_0x50e520(0x233)];this[_0x50e520(0x207)][_0x50e520(0x25e)][_0x50e520(0x273)](_0x50e520(0x205),{'contextItems':Array[_0x50e520(0x20b)](_0x11282d[_0x50e520(0x22f)][_0x50e520(0x221)]()),'initialContent':_0x50e520(0x263)+_0xbba92+_0x50e520(0x244),'id':_0x11282d['id']});}[_0x35179c(0x267)]({errorMessage:_0x262d85,id:_0x12ec20}){const _0x58c8a1=_0x35179c;this[_0x58c8a1(0x207)][_0x58c8a1(0x25e)][_0x58c8a1(0x273)](_0x58c8a1(0x261),{'initialContent':_0x58c8a1(0x263)+_0x262d85+_0x58c8a1(0x244),'id':_0x12ec20});}[_0x35179c(0x1f7)](_0x3df779){const _0x1609c3=_0x35179c;return this[_0x1609c3(0x268)][_0x1609c3(0x22c)](async()=>{const _0x91f0af=_0x1609c3;this[_0x91f0af(0x207)][_0x91f0af(0x25e)][_0x91f0af(0x273)](_0x91f0af(0x254),{'id':_0x3df779[_0x91f0af(0x1ee)]+':'+_0x3df779['id']}),this[_0x91f0af(0x207)][_0x91f0af(0x25e)][_0x91f0af(0x231)]('');});}async[_0x35179c(0x26f)](_0x259de1){const _0x36dec8=_0x35179c;return this[_0x36dec8(0x268)][_0x36dec8(0x22c)](async()=>{const _0x34cc7c=_0x36dec8;this[_0x34cc7c(0x207)][_0x34cc7c(0x25e)][_0x34cc7c(0x273)](_0x34cc7c(0x23d),{'id':_0x259de1[_0x34cc7c(0x1ee)]+':'+_0x259de1['id'],'areActionsDisabled':_0x259de1[_0x34cc7c(0x1fa)],'showDiff':this[_0x34cc7c(0x1fd)]}),this[_0x34cc7c(0x207)][_0x34cc7c(0x25e)][_0x34cc7c(0x231)]('');});}[_0x35179c(0x225)](_0x34df71){const _0x35ad87=_0x35179c;this[_0x35ad87(0x207)][_0x35ad87(0x25e)][_0x35ad87(0x273)](_0x35ad87(0x266),{'id':_0x34df71['id'],'capabilities':_0x34df71[_0x35ad87(0x226)]});}[_0x35179c(0x237)](_0x3dcfbe){const _0x314288=_0x35179c,_0x47b928=this[_0x314288(0x207)][_0x314288(0x25e)][_0x314288(0x245)][_0x314288(0x260)](_0x149c1c=>_0x149c1c[_0x314288(0x1eb)]['id']==_0x3dcfbe['id']&&_0x149c1c instanceof _0x1079d4);_0x47b928&&_0x47b928[_0x314288(0x200)](_0x314288(0x24b),_0x3dcfbe[_0x314288(0x24b)]);}async[_0x35179c(0x24e)](_0x46e3fe){const _0x3fb2c0=_0x35179c,_0x40d69d=_0x46e3fe[_0x3fb2c0(0x202)]||this[_0x3fb2c0(0x21c)];return this[_0x3fb2c0(0x268)][_0x3fb2c0(0x22c)](async _0x36b82f=>{const _0x38c448=_0x3fb2c0;await this[_0x38c448(0x207)][_0x38c448(0x25e)][_0x38c448(0x25b)]({..._0x46e3fe,'abortSignal':_0x36b82f,'renderingStrategy':_0x40d69d}),_0x46e3fe[_0x38c448(0x247)]&&this[_0x38c448(0x1ea)](_0x46e3fe['id']);});}[_0x35179c(0x20a)](_0x4a6d49,_0xc1e3c2){const _0x57e462=_0x35179c;this[_0x57e462(0x207)][_0x57e462(0x25e)][_0x57e462(0x228)](_0x4a6d49,_0xc1e3c2);}async[_0x35179c(0x21e)](_0x80425e){const _0x1b31c1=_0x35179c,_0x4daf46=_0x80425e[_0x1b31c1(0x202)]||this[_0x1b31c1(0x21c)];return this[_0x1b31c1(0x268)][_0x1b31c1(0x22c)](async _0x5b225d=>{const _0x39939f=_0x1b31c1;await this[_0x39939f(0x207)][_0x39939f(0x25e)][_0x39939f(0x229)]({..._0x80425e,'abortSignal':_0x5b225d,'renderingStrategy':_0x4daf46}),_0x80425e[_0x39939f(0x247)]&&this[_0x39939f(0x1ea)](_0x80425e['id']);});}[_0x35179c(0x215)](_0x2be245){const _0x1bdadf=_0x35179c;this[_0x1bdadf(0x207)][_0x1bdadf(0x25e)][_0x1bdadf(0x24f)](_0x2be245);}[_0x35179c(0x1ea)](_0x3e841d){const _0x150201=_0x35179c;this[_0x150201(0x207)][_0x150201(0x25e)][_0x150201(0x1ff)](_0x3e841d);}[_0x35179c(0x22b)](_0x5ea061){const _0x246ebd=_0x35179c;this[_0x246ebd(0x207)][_0x246ebd(0x25e)][_0x246ebd(0x1ed)]()[_0x246ebd(0x210)](_0x276e3a=>_0x276e3a[_0x246ebd(0x1f6)](_0x5ea061))[_0x246ebd(0x201)](_0x1d87fc=>this[_0x246ebd(0x207)][_0x246ebd(0x25e)][_0x246ebd(0x238)](_0x1d87fc));}[_0x35179c(0x275)](_0x50c02b){const _0x257ebf=_0x35179c;this[_0x257ebf(0x207)][_0x257ebf(0x25e)][_0x257ebf(0x231)](this[_0x257ebf(0x216)](_0x50c02b)),this[_0x257ebf(0x207)][_0x257ebf(0x24c)][_0x257ebf(0x1ec)](!this[_0x257ebf(0x1e8)][_0x257ebf(0x23a)][_0x257ebf(0x208)](_0x257ebf(0x236))),this[_0x257ebf(0x232)]=!0x0,this[_0x257ebf(0x207)][_0x257ebf(0x25e)][_0x257ebf(0x218)]();}[_0x35179c(0x26d)](_0x536f74){const _0x16c00e=_0x35179c;this[_0x16c00e(0x268)][_0x16c00e(0x235)](),this[_0x16c00e(0x207)][_0x16c00e(0x25e)][_0x16c00e(0x1ed)]()[_0x16c00e(0x210)](_0x274fa0=>_0x274fa0[_0x16c00e(0x1f6)](_0x536f74['id']))[_0x16c00e(0x201)](_0x575113=>this[_0x16c00e(0x1ea)](_0x575113)),this[_0x16c00e(0x232)]=!0x1,this[_0x16c00e(0x207)][_0x16c00e(0x25e)][_0x16c00e(0x1e4)]();}async[_0x35179c(0x1fb)](){const _0x3ac6f9=_0x35179c;return this[_0x3ac6f9(0x268)][_0x3ac6f9(0x262)][_0x3ac6f9(0x22a)](()=>{const _0x5bb697=_0x3ac6f9;this[_0x5bb697(0x232)]=!0x1,this[_0x5bb697(0x207)][_0x5bb697(0x25e)][_0x5bb697(0x1e4)]();});}[_0x35179c(0x26c)](_0x4ccb41,_0x4890ad){const _0x1e3722=_0x35179c;this[_0x1e3722(0x207)][_0x1e3722(0x24c)][_0x1e3722(0x26c)](_0x4ccb41,_0x4890ad);}[_0x35179c(0x25c)](_0x4a581e){const _0x2a8fb2=_0x35179c;this[_0x2a8fb2(0x207)][_0x2a8fb2(0x24c)][_0x2a8fb2(0x25c)](_0x4a581e);}[_0x35179c(0x26e)](_0x48c1fc,_0x1a6e69){const _0x2f205a=_0x35179c;this[_0x2f205a(0x207)][_0x2f205a(0x24c)][_0x2f205a(0x26e)](_0x48c1fc,_0x1a6e69);}[_0x35179c(0x211)](_0x5d2917){const _0x1463b0=_0x35179c;this[_0x1463b0(0x207)][_0x1463b0(0x24c)][_0x1463b0(0x211)](_0x5d2917);}[_0x35179c(0x274)](_0x593002){const _0x504510=_0x35179c;this[_0x504510(0x207)][_0x504510(0x24c)][_0x504510(0x274)](_0x593002);}[_0x35179c(0x204)](){const _0x15b5c0=_0x35179c;this[_0x15b5c0(0x207)][_0x15b5c0(0x24c)][_0x15b5c0(0x204)]();}[_0x35179c(0x1fc)](){const _0x3b11b2=_0x35179c;this[_0x3b11b2(0x207)][_0x3b11b2(0x24c)][_0x3b11b2(0x1fc)]();}[_0x35179c(0x257)](_0x4e751d,_0x23fcca,_0x49b0ab){const _0x4029a0=_0x35179c;this[_0x4029a0(0x207)][_0x4029a0(0x24c)][_0x4029a0(0x257)](_0x4e751d,_0x23fcca,_0x49b0ab);}[_0x35179c(0x272)](){const _0x97f9f3=_0x35179c;this[_0x97f9f3(0x207)][_0x97f9f3(0x24c)][_0x97f9f3(0x272)](),this[_0x97f9f3(0x207)][_0x97f9f3(0x24c)][_0x97f9f3(0x26b)](this[_0x97f9f3(0x23e)]());}[_0x35179c(0x206)](_0x1847ac){const _0xe4e51=_0x35179c;this[_0xe4e51(0x207)][_0xe4e51(0x24c)][_0xe4e51(0x206)](_0x1847ac);}[_0x35179c(0x1f9)](_0x41b430){const _0x4ccc87=_0x35179c;this[_0x4ccc87(0x207)][_0x4ccc87(0x24c)][_0x4ccc87(0x1e1)](_0x41b430[_0x4ccc87(0x1e9)]),this[_0x4ccc87(0x207)][_0x4ccc87(0x24c)][_0x4ccc87(0x217)](_0x41b430[_0x4ccc87(0x250)]),this[_0x4ccc87(0x207)][_0x4ccc87(0x24c)][_0x4ccc87(0x26b)](this[_0x4ccc87(0x23e)](_0x41b430));}[_0x35179c(0x25a)](_0xde3d34,_0x279738){const _0x5181f4=_0x35179c;this[_0x5181f4(0x207)][_0x5181f4(0x24c)][_0x5181f4(0x213)](_0xde3d34),_0x279738&&this[_0x5181f4(0x207)][_0x5181f4(0x24c)][_0x5181f4(0x1ec)](!0x1);}[_0x35179c(0x1f3)](_0x148cd1){const _0x532de4=_0x35179c;this[_0x532de4(0x21c)]=_0x148cd1;}[_0x35179c(0x1ef)](_0x1f2db4){const _0x1538a3=_0x35179c;this[_0x1538a3(0x207)][_0x1538a3(0x25e)][_0x1538a3(0x1ef)](_0x1f2db4);}[_0x35179c(0x240)](){const _0x151e66=_0x35179c;this[_0x151e66(0x21b)](_0x84fc5a(this[_0x151e66(0x1e8)][_0x151e66(0x25f)],_0x151e66(0x20e)));}[_0x35179c(0x21b)](_0x558683,_0x4b747b=!0x1){const _0x2799e4=_0x35179c;if(_0x4b747b&&!_0x42f1e2()&&_0x558683[_0x2799e4(0x248)])return this[_0x2799e4(0x207)][_0x2799e4(0x21d)][_0x2799e4(0x1e0)]='',void this[_0x2799e4(0x21f)](_0x558683);this[_0x2799e4(0x207)][_0x2799e4(0x21d)][_0x2799e4(0x1e0)]=_0x558683;}[_0x35179c(0x21f)](_0x3d8153){const _0x225337=_0x35179c;let _0x204958=0x0;clearInterval(this[_0x225337(0x24a)]),this[_0x225337(0x24a)]=setInterval(()=>{const _0x494dae=_0x225337;this[_0x494dae(0x207)][_0x494dae(0x21d)][_0x494dae(0x1e0)]=this[_0x494dae(0x207)][_0x494dae(0x21d)][_0x494dae(0x1e0)]+_0x3d8153[_0x204958],_0x204958++,_0x204958===_0x3d8153[_0x494dae(0x248)]&&clearInterval(this[_0x494dae(0x24a)]);},0x1e);}[_0x35179c(0x249)](_0x46f0dd){const _0x9dd9d0=_0x35179c;this[_0x9dd9d0(0x207)][_0x9dd9d0(0x21d)][_0x9dd9d0(0x22d)]=_0x46f0dd;}[_0x35179c(0x216)](_0x3d39d1){const _0x2fac59=_0x35179c,_0x16a076=_0x3d39d1[_0x2fac59(0x226)];return _0x16a076[_0x2fac59(0x1e9)]&&_0x16a076[_0x2fac59(0x250)]?_0x84fc5a(this[_0x2fac59(0x1e8)][_0x2fac59(0x25f)],_0x2fac59(0x270)):_0x16a076[_0x2fac59(0x1e9)]?_0x84fc5a(this[_0x2fac59(0x1e8)][_0x2fac59(0x25f)],_0x2fac59(0x212)):_0x16a076[_0x2fac59(0x250)]?_0x84fc5a(this[_0x2fac59(0x1e8)][_0x2fac59(0x25f)],_0x2fac59(0x222)):_0x84fc5a(this[_0x2fac59(0x1e8)][_0x2fac59(0x25f)],_0x2fac59(0x241));}[_0x35179c(0x23e)](_0x46af3d){const _0x1429c2=_0x35179c;return _0x46af3d?_0x46af3d[_0x1429c2(0x1e9)]&&_0x46af3d[_0x1429c2(0x250)]?_0x84fc5a(this[_0x1429c2(0x1e8)][_0x1429c2(0x25f)],_0x1429c2(0x203)):_0x46af3d[_0x1429c2(0x1e9)]?_0x84fc5a(this[_0x1429c2(0x1e8)][_0x1429c2(0x25f)],_0x1429c2(0x252)):_0x46af3d[_0x1429c2(0x250)]?_0x84fc5a(this[_0x1429c2(0x1e8)][_0x1429c2(0x25f)],_0x1429c2(0x20d)):_0x84fc5a(this[_0x1429c2(0x1e8)][_0x1429c2(0x25f)],_0x1429c2(0x22e)):_0x84fc5a(this[_0x1429c2(0x1e8)][_0x1429c2(0x25f)],_0x1429c2(0x22e));}[_0x35179c(0x23c)](_0x1de3d4,_0x5780f0,_0x5e4bc3,_0x5dd5d4){const _0x2d706e=_0x35179c;this[_0x2d706e(0x207)][_0x2d706e(0x23c)](_0x1de3d4,_0x5780f0,_0x5e4bc3,_0x5dd5d4);}[_0x35179c(0x1e5)](_0x2f63c4){const _0x3ed24b=_0x35179c;this[_0x3ed24b(0x207)][_0x3ed24b(0x1e5)](_0x2f63c4);}[_0x35179c(0x1e2)](){const _0x3f050b=_0x35179c;this[_0x3f050b(0x207)][_0x3f050b(0x24c)][_0x3f050b(0x1e2)]();}[_0x35179c(0x269)](_0x22e2f7,_0x16b85b){const _0x5c7434=_0x35179c;this[_0x5c7434(0x207)][_0x5c7434(0x25e)][_0x5c7434(0x219)](_0x22e2f7,_0x16b85b);}}
23
+ const _0x44fd07=_0x163a;(function(_0x4afb0e,_0x875e72){const _0x161b8d=_0x163a,_0x369bcf=_0x4afb0e();while(!![]){try{const _0x437686=-parseInt(_0x161b8d(0x243))/0x1*(parseInt(_0x161b8d(0x223))/0x2)+parseInt(_0x161b8d(0x1ed))/0x3*(parseInt(_0x161b8d(0x225))/0x4)+parseInt(_0x161b8d(0x1ee))/0x5*(-parseInt(_0x161b8d(0x1ff))/0x6)+parseInt(_0x161b8d(0x1e7))/0x7+parseInt(_0x161b8d(0x24b))/0x8+parseInt(_0x161b8d(0x1de))/0x9*(parseInt(_0x161b8d(0x202))/0xa)+-parseInt(_0x161b8d(0x1e4))/0xb;if(_0x437686===_0x875e72)break;else _0x369bcf['push'](_0x369bcf['shift']());}catch(_0x3787de){_0x369bcf['push'](_0x369bcf['shift']());}}}(_0x4362,0x96035));import{ContextPlugin as _0x25645c}from'ckeditor5/src/core.js';function _0x163a(_0x483e16,_0x44e509){const _0x4362df=_0x4362();return _0x163a=function(_0x163abb,_0x4d1ddd){_0x163abb=_0x163abb-0x1dc;let _0x1d28f0=_0x4362df[_0x163abb];return _0x1d28f0;},_0x163a(_0x483e16,_0x44e509);}import{_isMotionReduced as _0xd67efe}from'ckeditor5/src/utils.js';import{AIChatView as _0x1b73db}from'./ui/aichatview.js';function _0x4362(){const _0x3098b0=['streaming','interactionId','_isTrackChangesCommandValueBound','stopInteraction','12EGDmHr','conversation-start','last','12128560uuXlLF','setAddContextOptions','getItemIds','startAutoScroll','stopAutoScroll','ai-suggestion-reply','filter','isDisabled','resetConversationTitle','setWebSearch','isTrackChangesOn','isVisible','children','availableModels','markFeedItemAsDone','chatControls','capabilities','AI_CHAT_HEADING','remove','scrollToSuggestion','isReasoningEnabled','_promiseQueue','isPending','startsWith','queueEmptyPromise','addFeedItemUserMessage','removeContextItem','setConversationContext','setIsUploadInProgress','ai.availableReplyActions','updateReplyItem','updateSuggestionItem','resetMessageInput','17222PofNpt','isLoading','1187512myOQml','isPremiumPlugin','updateResourceState','removeFeedInteraction','forEach','bind','clearConversationContextUI','isOfficialPlugin','addContextItem','trackChanges','closeSourceResourceBalloon','setSelectedModel','disableModelSelector','value','_titleAnimationInterval','interaction-header','showResizeButton','setModelList','AITabs','areActionsDisabled','get','</p>','isBusy','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REGULAR','label','_animateConversationTitle','user-message','contextItems','AIChatUI','commands','33knvtrM','updateFeedItemAIReplySuggestionContent','disableControls','AI_CHAT_FEED_LOADING_MESSAGE_REASONING','feedItemRenderingStrategy','enableControls','AI_CHAT_WELCOME_MESSAGE','updateFeedItemAIReplyContent','3599640udpcpN','config','_getInputPlaceholder','displayedPrompt','find','updateFeedInteractionHeader','finishInteraction','enableModelSelector','updateCapabilities','setReasoning','addFeedItemError','requires','locale','from','_view','isDone','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH','markItemAsDone','then','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REASONING','removeItem','context','updateFeedItemAIReplySources','renderingStrategy','_interactionPromiseResolver','quickActionData','setInputPlaceholder','options','showDiff','chat','isMaximized','scrollFeedToSuggestion','addFeedItemAISuggestion','updateFeedItemAIReplySuggestionPartState','<p>','view','addFeedItemStaticMessage','clearPendingContextUI','populateSourceResourceBalloon','length','error-message','values','chatFeed','setLoadingMessage','enqueue','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH','ai.chat.models.modelSelectorAlwaysVisible','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH_REASONING','setFeedItemRenderingStrategy','addItem','delegate','focusPromptInput','isWebSearchEnabled','setModel','9RoCvFz','setContextItemLoading','AI_CHAT_FEED_LOADING_MESSAGE_REGULAR','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH_REASONING','addTab','addFeedItemAIReply','8172802RoEBwW','toggleSuggestionDisplayMode','addFeedInteractionHeader','4157993OMDJJx','plugins','destroy','_getLoadingMessage','updateWebSources','setIsMaximized','3wDMBfu','2280225XZTYIY','pluginName','createConversation','chatHeader','setConversationTitle','set','clear','ai-reply','updateSuggestionPartState','userMessage','startInteraction','toggleLoadingSkeleton','abort'];_0x4362=function(){return _0x3098b0;};return _0x4362();}import{AITabs as _0x47faf9}from'../aitabs/aitabs.js';import{getTranslation as _0x310bd9}from'../aicore/utils/common-translations.js';import{IconAIChat as _0x56a914}from'ckeditor5/src/icons.js';import{AIChatFeedInteractionHeaderView as _0x5c5fde}from'./ui/feed/aichatfeedinteractionheaderview.js';import{PromiseQueue as _0xd7296c}from'./utils/promisequeue.js';import{AI_CHAT_UI_EVENT_NAMES as _0x38881c}from'./utils/eventnames.js';import'../../theme/aichat/aichat.css';import{getEditorFromContext as _0x391d2e}from'../aicore/utils/geteditorfromcontext.js';export class AIChatUI extends _0x25645c{static get[_0x44fd07(0x256)](){return[_0x47faf9];}[_0x44fd07(0x259)];static get[_0x44fd07(0x1ef)](){const _0x1d9411=_0x44fd07;return _0x1d9411(0x241);}static get[_0x44fd07(0x22c)](){return!0x0;}static get[_0x44fd07(0x226)](){return!0x0;}[_0x44fd07(0x247)]=_0x44fd07(0x1fb);[_0x44fd07(0x267)]=!0x0;[_0x44fd07(0x217)];[_0x44fd07(0x263)];[_0x44fd07(0x233)]=void 0x0;[_0x44fd07(0x1fd)]=!0x1;constructor(_0x510d1f){const _0x163bc3=_0x44fd07;super(_0x510d1f);const _0x3ea34d=this[_0x163bc3(0x260)][_0x163bc3(0x1e8)][_0x163bc3(0x239)](_0x163bc3(0x237));this[_0x163bc3(0x1f3)](_0x163bc3(0x23b),!0x1),this[_0x163bc3(0x217)]=new _0xd7296c(),this[_0x163bc3(0x259)]=new _0x1b73db(this[_0x163bc3(0x260)][_0x163bc3(0x257)],_0x3ea34d[_0x163bc3(0x235)]),this[_0x163bc3(0x259)][_0x163bc3(0x27d)](..._0x38881c)['to'](this),this[_0x163bc3(0x259)]['on'](_0x163bc3(0x1e5),(_0x4bcd2f,{showDiff:_0x3f189a})=>{const _0x4d1c70=_0x163bc3;this[_0x4d1c70(0x267)]=_0x3f189a;}),_0x3ea34d[_0x163bc3(0x26e)][_0x163bc3(0x1e2)]({'id':_0x163bc3(0x268),'buttonLabel':_0x310bd9(this[_0x163bc3(0x260)][_0x163bc3(0x257)],_0x163bc3(0x213)),'buttonIcon':_0x56a914,'order':0x0,'content':this[_0x163bc3(0x259)]}),this[_0x163bc3(0x259)][_0x163bc3(0x211)][_0x163bc3(0x22a)](_0x163bc3(0x224))['to'](this,_0x163bc3(0x23b),_0x471b26=>_0x471b26),this[_0x163bc3(0x259)][_0x163bc3(0x275)][_0x163bc3(0x22a)](_0x163bc3(0x218))['to'](this,_0x163bc3(0x23b),_0x10db2f=>_0x10db2f),this[_0x163bc3(0x259)][_0x163bc3(0x211)][_0x163bc3(0x265)](this[_0x163bc3(0x24d)]());}[_0x44fd07(0x1e9)](){const _0x48f628=_0x44fd07;super[_0x48f628(0x1e9)](),this[_0x48f628(0x233)]&&clearInterval(this[_0x48f628(0x233)]);}[_0x44fd07(0x1f0)](_0x1d2895){const _0x3572be=_0x44fd07;this[_0x3572be(0x259)][_0x3572be(0x275)][_0x3572be(0x1f4)](),this[_0x3572be(0x259)][_0x3572be(0x211)][_0x3572be(0x252)](),this[_0x3572be(0x259)][_0x3572be(0x211)][_0x3572be(0x236)](_0x1d2895[_0x3572be(0x20f)],!this[_0x3572be(0x260)][_0x3572be(0x24c)][_0x3572be(0x239)](_0x3572be(0x279))),this[_0x3572be(0x26f)]({'id':_0x3572be(0x200),'staticMessage':_0x310bd9(this[_0x3572be(0x260)][_0x3572be(0x257)],_0x3572be(0x249))});}[_0x44fd07(0x26f)]({id:_0x1e781f,staticMessage:_0x4e4599}){const _0x1011cb=_0x44fd07;this[_0x1011cb(0x259)][_0x1011cb(0x275)][_0x1011cb(0x27c)](_0x1011cb(0x1f5),{'id':_0x1e781f,'initialContent':_0x1011cb(0x26d)+_0x4e4599+_0x1011cb(0x23a)});}[_0x44fd07(0x21b)](_0x252bb2){const _0x5bb212=_0x44fd07,_0x302eb5=_0x252bb2[_0x5bb212(0x264)]?.[_0x5bb212(0x24e)]||_0x252bb2[_0x5bb212(0x1f7)];this[_0x5bb212(0x259)][_0x5bb212(0x275)][_0x5bb212(0x27c)](_0x5bb212(0x23f),{'contextItems':Array[_0x5bb212(0x258)](_0x252bb2[_0x5bb212(0x240)][_0x5bb212(0x274)]()),'initialContent':_0x5bb212(0x26d)+_0x302eb5+_0x5bb212(0x23a),'id':_0x252bb2['id']});}[_0x44fd07(0x255)]({errorMessage:_0x572661,id:_0x615fed}){const _0x13b200=_0x44fd07;this[_0x13b200(0x259)][_0x13b200(0x275)][_0x13b200(0x27c)](_0x13b200(0x273),{'initialContent':_0x13b200(0x26d)+_0x572661+_0x13b200(0x23a),'id':_0x615fed});}[_0x44fd07(0x1e3)](_0x36b3b1){const _0xd0e8a0=_0x44fd07;return this[_0xd0e8a0(0x217)][_0xd0e8a0(0x277)](async()=>{const _0x14705a=_0xd0e8a0;this[_0x14705a(0x259)][_0x14705a(0x275)][_0x14705a(0x27c)](_0x14705a(0x1f5),{'id':_0x36b3b1[_0x14705a(0x1fc)]+':'+_0x36b3b1['id']}),this[_0x14705a(0x276)](null);});}async[_0x44fd07(0x26b)](_0x25a34d){const _0x250913=_0x44fd07,_0x3c2f38=_0x391d2e(this[_0x250913(0x260)]);if(_0x3c2f38){const _0x28bcbf=_0x3c2f38[_0x250913(0x242)][_0x250913(0x239)](_0x250913(0x22e));_0x28bcbf&&!this[_0x250913(0x1fd)]&&(this[_0x250913(0x1fd)]=!0x0,this[_0x250913(0x259)][_0x250913(0x275)][_0x250913(0x22a)](_0x250913(0x20c))['to'](_0x28bcbf,_0x250913(0x232)));}return this[_0x250913(0x217)][_0x250913(0x277)](async()=>{const _0x406a93=_0x250913;this[_0x406a93(0x259)][_0x406a93(0x275)][_0x406a93(0x27c)](_0x406a93(0x207),{'id':_0x25a34d[_0x406a93(0x1fc)]+':'+_0x25a34d['id'],'areActionsDisabled':_0x25a34d[_0x406a93(0x238)],'showDiff':this[_0x406a93(0x267)],'dropdownConfig':this[_0x406a93(0x260)][_0x406a93(0x24c)][_0x406a93(0x239)](_0x406a93(0x21f))}),this[_0x406a93(0x276)](null);});}[_0x44fd07(0x1e6)](_0x3c51e8,_0x4e5ce7){const _0x5e3df4=_0x44fd07,_0x3035e9=this[_0x5e3df4(0x259)][_0x5e3df4(0x275)][_0x5e3df4(0x20e)][_0x5e3df4(0x201)];if(_0x3035e9 instanceof _0x5c5fde)return this[_0x5e3df4(0x259)][_0x5e3df4(0x275)][_0x5e3df4(0x20e)][_0x5e3df4(0x214)](_0x3035e9),void this[_0x5e3df4(0x259)][_0x5e3df4(0x275)][_0x5e3df4(0x27c)](_0x5e3df4(0x234),{'id':_0x3c51e8['id'],'capabilities':{'isWebSearchEnabled':_0x3035e9[_0x5e3df4(0x212)][_0x5e3df4(0x1dc)]||_0x4e5ce7[_0x5e3df4(0x1dc)],'isReasoningEnabled':_0x3035e9[_0x5e3df4(0x212)][_0x5e3df4(0x216)]||_0x4e5ce7[_0x5e3df4(0x216)]}});this[_0x5e3df4(0x259)][_0x5e3df4(0x275)][_0x5e3df4(0x27c)](_0x5e3df4(0x234),{'id':_0x3c51e8['id'],'capabilities':_0x4e5ce7});}[_0x44fd07(0x250)](_0x382888){const _0x44e910=_0x44fd07,_0x3c5b8a=this[_0x44e910(0x259)][_0x44e910(0x275)][_0x44e910(0x20e)][_0x44e910(0x24f)](_0x4ea96d=>_0x4ea96d[_0x44e910(0x266)]['id']==_0x382888['id']&&_0x4ea96d instanceof _0x5c5fde);_0x3c5b8a&&_0x3c5b8a[_0x44e910(0x1f3)](_0x44e910(0x20d),_0x382888[_0x44e910(0x20d)]);}async[_0x44fd07(0x24a)](_0x1e5feb){const _0x36123c=_0x44fd07,_0x970804=_0x1e5feb[_0x36123c(0x262)]||this[_0x36123c(0x247)];return this[_0x36123c(0x217)][_0x36123c(0x277)](async _0x25523a=>{const _0x17ce3a=_0x36123c;await this[_0x17ce3a(0x259)][_0x17ce3a(0x275)][_0x17ce3a(0x220)]({..._0x1e5feb,'abortSignal':_0x25523a,'renderingStrategy':_0x970804}),_0x1e5feb[_0x17ce3a(0x25a)]&&this[_0x17ce3a(0x210)](_0x1e5feb['id']);});}[_0x44fd07(0x261)](_0x15218d,_0x473d61){const _0x3bfce0=_0x44fd07;this[_0x3bfce0(0x259)][_0x3bfce0(0x275)][_0x3bfce0(0x1eb)](_0x15218d,_0x473d61);}async[_0x44fd07(0x244)](_0x309b56){const _0xce6c39=_0x44fd07,_0x3e0248=_0x309b56[_0xce6c39(0x262)]||this[_0xce6c39(0x247)];return this[_0xce6c39(0x217)][_0xce6c39(0x277)](async _0x4bf473=>{const _0x289140=_0xce6c39;await this[_0x289140(0x259)][_0x289140(0x275)][_0x289140(0x221)]({..._0x309b56,'abortSignal':_0x4bf473,'renderingStrategy':_0x3e0248}),_0x309b56[_0x289140(0x25a)]&&this[_0x289140(0x210)](_0x309b56['id']);});}[_0x44fd07(0x26c)](_0x50743f){const _0x9ee75d=_0x44fd07;this[_0x9ee75d(0x259)][_0x9ee75d(0x275)][_0x9ee75d(0x1f6)](_0x50743f);}[_0x44fd07(0x210)](_0x4550cd){const _0x301e70=_0x44fd07;this[_0x301e70(0x259)][_0x301e70(0x275)][_0x301e70(0x25c)](_0x4550cd);}[_0x44fd07(0x228)](_0x59a575){const _0x4f34c=_0x44fd07;this[_0x4f34c(0x259)][_0x4f34c(0x275)][_0x4f34c(0x204)]()[_0x4f34c(0x208)](_0x47a244=>_0x47a244[_0x4f34c(0x219)](_0x59a575))[_0x4f34c(0x229)](_0x5c28b8=>this[_0x4f34c(0x259)][_0x4f34c(0x275)][_0x4f34c(0x25f)](_0x5c28b8));}[_0x44fd07(0x1f8)](){const _0x182f85=_0x44fd07;this[_0x182f85(0x276)]({'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x1}),this[_0x182f85(0x259)][_0x182f85(0x211)][_0x182f85(0x231)](!this[_0x182f85(0x260)][_0x182f85(0x24c)][_0x182f85(0x239)](_0x182f85(0x279))),this[_0x182f85(0x23b)]=!0x0,this[_0x182f85(0x259)][_0x182f85(0x275)][_0x182f85(0x205)]();}[_0x44fd07(0x1fe)](_0x596d56){const _0x135e6d=_0x44fd07;this[_0x135e6d(0x217)][_0x135e6d(0x1fa)](),this[_0x135e6d(0x259)][_0x135e6d(0x275)][_0x135e6d(0x204)]()[_0x135e6d(0x208)](_0x8721d3=>_0x8721d3[_0x135e6d(0x219)](_0x596d56['id']))[_0x135e6d(0x229)](_0x5f42e7=>this[_0x135e6d(0x210)](_0x5f42e7)),this[_0x135e6d(0x23b)]=!0x1,this[_0x135e6d(0x259)][_0x135e6d(0x275)][_0x135e6d(0x206)]();}async[_0x44fd07(0x251)](){const _0x5aa25c=_0x44fd07;return this[_0x5aa25c(0x217)][_0x5aa25c(0x21a)][_0x5aa25c(0x25d)](()=>{const _0x11e025=_0x5aa25c;this[_0x11e025(0x23b)]=!0x1,this[_0x11e025(0x259)][_0x11e025(0x275)][_0x11e025(0x206)]();});}[_0x44fd07(0x22d)](_0x3edd69,_0x2e0857){const _0x4a907a=_0x44fd07;this[_0x4a907a(0x259)][_0x4a907a(0x211)][_0x4a907a(0x22d)](_0x3edd69,_0x2e0857);}[_0x44fd07(0x21c)](_0x2495f9){const _0x5f055c=_0x44fd07;this[_0x5f055c(0x259)][_0x5f055c(0x211)][_0x5f055c(0x21c)](_0x2495f9);}[_0x44fd07(0x1df)](_0x17cf0a,_0x2ccd85){const _0x23da61=_0x44fd07;this[_0x23da61(0x259)][_0x23da61(0x211)][_0x23da61(0x1df)](_0x17cf0a,_0x2ccd85);}[_0x44fd07(0x21e)](_0x5071ea){const _0x44bdf6=_0x44fd07;this[_0x44bdf6(0x259)][_0x44bdf6(0x211)][_0x44bdf6(0x21e)](_0x5071ea);}[_0x44fd07(0x21d)](_0x5211cd){const _0x57152d=_0x44fd07;this[_0x57152d(0x259)][_0x57152d(0x211)][_0x57152d(0x21d)](_0x5211cd);}[_0x44fd07(0x270)](){const _0x5ad496=_0x44fd07;this[_0x5ad496(0x259)][_0x5ad496(0x211)][_0x5ad496(0x270)]();}[_0x44fd07(0x22b)](){const _0x4c208e=_0x44fd07;this[_0x4c208e(0x259)][_0x4c208e(0x211)][_0x4c208e(0x22b)]();}[_0x44fd07(0x227)](_0x528801,_0xfc6211,_0x514397){const _0x41a052=_0x44fd07;this[_0x41a052(0x259)][_0x41a052(0x211)][_0x41a052(0x227)](_0x528801,_0xfc6211,_0x514397);}[_0x44fd07(0x222)](){const _0x2f8b14=_0x44fd07;this[_0x2f8b14(0x259)][_0x2f8b14(0x211)][_0x2f8b14(0x222)](),this[_0x2f8b14(0x259)][_0x2f8b14(0x211)][_0x2f8b14(0x265)](this[_0x2f8b14(0x24d)]());}[_0x44fd07(0x203)](_0x534561){const _0x59e2f2=_0x44fd07;this[_0x59e2f2(0x259)][_0x59e2f2(0x211)][_0x59e2f2(0x203)](_0x534561);}[_0x44fd07(0x253)](_0xd67eee){const _0x30569e=_0x44fd07;this[_0x30569e(0x259)][_0x30569e(0x211)][_0x30569e(0x20b)](_0xd67eee[_0x30569e(0x1dc)]),this[_0x30569e(0x259)][_0x30569e(0x211)][_0x30569e(0x254)](_0xd67eee[_0x30569e(0x216)]),this[_0x30569e(0x259)][_0x30569e(0x211)][_0x30569e(0x265)](this[_0x30569e(0x24d)](_0xd67eee));}[_0x44fd07(0x230)](_0x478614,_0x1381eb){const _0x50ebac=_0x44fd07;this[_0x50ebac(0x259)][_0x50ebac(0x211)][_0x50ebac(0x1dd)](_0x478614),_0x1381eb&&this[_0x50ebac(0x259)][_0x50ebac(0x211)][_0x50ebac(0x231)](!0x1);}[_0x44fd07(0x27b)](_0x153f1e){const _0x514f7b=_0x44fd07;this[_0x514f7b(0x247)]=_0x153f1e;}[_0x44fd07(0x1f9)](_0x3cb66d){const _0x244b5f=_0x44fd07;this[_0x244b5f(0x259)][_0x244b5f(0x275)][_0x244b5f(0x1f9)](_0x3cb66d);}[_0x44fd07(0x20a)](){const _0x505992=_0x44fd07;this[_0x505992(0x1f2)](_0x310bd9(this[_0x505992(0x260)][_0x505992(0x257)],_0x505992(0x213)));}[_0x44fd07(0x1f2)](_0x29683f,_0x4f56a4=!0x1){const _0x3ec5e0=_0x44fd07;if(_0x4f56a4&&!_0xd67efe()&&_0x29683f[_0x3ec5e0(0x272)])return this[_0x3ec5e0(0x259)][_0x3ec5e0(0x1f1)][_0x3ec5e0(0x23d)]='',void this[_0x3ec5e0(0x23e)](_0x29683f);this[_0x3ec5e0(0x259)][_0x3ec5e0(0x1f1)][_0x3ec5e0(0x23d)]=_0x29683f;}[_0x44fd07(0x276)](_0xb1e6e8){const _0x2d94cb=_0x44fd07,_0x25cbe0=this[_0x2d94cb(0x1ea)](_0xb1e6e8);this[_0x2d94cb(0x259)][_0x2d94cb(0x275)][_0x2d94cb(0x276)](_0x25cbe0);}[_0x44fd07(0x23e)](_0x4e39ff){const _0x2ba216=_0x44fd07;let _0x9da128=0x0;clearInterval(this[_0x2ba216(0x233)]),this[_0x2ba216(0x233)]=setInterval(()=>{const _0xfcefef=_0x2ba216;this[_0xfcefef(0x259)][_0xfcefef(0x1f1)][_0xfcefef(0x23d)]=this[_0xfcefef(0x259)][_0xfcefef(0x1f1)][_0xfcefef(0x23d)]+_0x4e39ff[_0x9da128],_0x9da128++,_0x9da128===_0x4e39ff[_0xfcefef(0x272)]&&clearInterval(this[_0xfcefef(0x233)]);},0x1e);}[_0x44fd07(0x1ec)](_0x490797){const _0x492486=_0x44fd07;this[_0x492486(0x259)][_0x492486(0x1f1)][_0x492486(0x269)]=_0x490797;}[_0x44fd07(0x1ea)](_0x49d78e){const _0x1aebee=_0x44fd07;return _0x49d78e?_0x49d78e[_0x1aebee(0x1dc)]&&_0x49d78e[_0x1aebee(0x216)]?_0x310bd9(this[_0x1aebee(0x260)][_0x1aebee(0x257)],_0x1aebee(0x1e1)):_0x49d78e[_0x1aebee(0x1dc)]?_0x310bd9(this[_0x1aebee(0x260)][_0x1aebee(0x257)],_0x1aebee(0x278)):_0x49d78e[_0x1aebee(0x216)]?_0x310bd9(this[_0x1aebee(0x260)][_0x1aebee(0x257)],_0x1aebee(0x246)):_0x310bd9(this[_0x1aebee(0x260)][_0x1aebee(0x257)],_0x1aebee(0x1e0)):'';}[_0x44fd07(0x24d)](_0x45bb29){const _0x1d9206=_0x44fd07;return _0x45bb29?_0x45bb29[_0x1d9206(0x1dc)]&&_0x45bb29[_0x1d9206(0x216)]?_0x310bd9(this[_0x1d9206(0x260)][_0x1d9206(0x257)],_0x1d9206(0x27a)):_0x45bb29[_0x1d9206(0x1dc)]?_0x310bd9(this[_0x1d9206(0x260)][_0x1d9206(0x257)],_0x1d9206(0x25b)):_0x45bb29[_0x1d9206(0x216)]?_0x310bd9(this[_0x1d9206(0x260)][_0x1d9206(0x257)],_0x1d9206(0x25e)):_0x310bd9(this[_0x1d9206(0x260)][_0x1d9206(0x257)],_0x1d9206(0x23c)):_0x310bd9(this[_0x1d9206(0x260)][_0x1d9206(0x257)],_0x1d9206(0x23c));}[_0x44fd07(0x271)](_0x46f0b2,_0x259d69,_0x128a87,_0x52aa33){const _0x1c6579=_0x44fd07;this[_0x1c6579(0x259)][_0x1c6579(0x271)](_0x46f0b2,_0x259d69,_0x128a87,_0x52aa33);}[_0x44fd07(0x22f)](_0x36b00b){const _0x36989d=_0x44fd07;this[_0x36989d(0x259)][_0x36989d(0x22f)](_0x36b00b);}[_0x44fd07(0x27e)](){const _0x424835=_0x44fd07;this[_0x424835(0x259)][_0x424835(0x211)][_0x424835(0x27e)]();}[_0x44fd07(0x26a)](_0x53efc0,_0x4c1623){const _0x2049a4=_0x44fd07;this[_0x2049a4(0x259)][_0x2049a4(0x275)][_0x2049a4(0x215)](_0x53efc0,_0x4c1623);}[_0x44fd07(0x245)](){const _0x33d11b=_0x44fd07;this[_0x33d11b(0x259)][_0x33d11b(0x211)][_0x33d11b(0x209)]=!0x0;}[_0x44fd07(0x248)](){const _0x3f3dfe=_0x44fd07;this[_0x3f3dfe(0x259)][_0x3f3dfe(0x211)][_0x3f3dfe(0x209)]=!0x1;}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x36bb60=_0x59ee;(function(_0x339b39,_0x24efdd){const _0x1358d9=_0x59ee,_0x30f0d4=_0x339b39();while(!![]){try{const _0x570167=-parseInt(_0x1358d9(0x23c))/0x1+-parseInt(_0x1358d9(0x242))/0x2*(-parseInt(_0x1358d9(0x200))/0x3)+-parseInt(_0x1358d9(0x21f))/0x4+-parseInt(_0x1358d9(0x1d2))/0x5*(-parseInt(_0x1358d9(0x228))/0x6)+parseInt(_0x1358d9(0x23a))/0x7+parseInt(_0x1358d9(0x1ea))/0x8+-parseInt(_0x1358d9(0x1ed))/0x9;if(_0x570167===_0x24efdd)break;else _0x30f0d4['push'](_0x30f0d4['shift']());}catch(_0x4d9226){_0x30f0d4['push'](_0x30f0d4['shift']());}}}(_0x16c3,0xc57ae));import{CKEditorError as _0x14b66b,ObservableMixin as _0x3aeb56,uid as _0x1b8c2d}from'ckeditor5/src/utils.js';import{AIContextItemType as _0x387a93,AIContextTextResourceType as _0x49caea}from'../../aicore/model/aicontext.js';import{escape as _0x20c0e9}from'es-toolkit/compat';export const AI_CONTEXT_MODEL_EVENT_NAMES=[_0x36bb60(0x1d9),_0x36bb60(0x1d3),_0x36bb60(0x221),_0x36bb60(0x231),_0x36bb60(0x1fc),_0x36bb60(0x21e),_0x36bb60(0x1df),_0x36bb60(0x254),_0x36bb60(0x1cd)];function _0x16c3(){const _0x47030f=['uploadFile','hidden','contextItemAdded','from','_mapContextItemToRequestData','uploadUrl','addCurrentDocumentToContext','content','sourceResourcesLoaded','HTML','_getCustomSourcesInitialState','map','_conversationContextItems','push','files','SELECTION','addUrlToContext','ai-chat-source-not-found','_connector','8751440lTyAmu','getId','_ongoingUploadOperations','5948001sseIrJ','version','getDocument','attributes','ai-chat-context-unsupported-type','_config','_addContextOptionsState','get','ai-chat-document-upload-failed','sessionId','selection','updateCurrentDocument','_removeContextItem','all','_findSourceIdsByResourceId','error','ai-chat-context-invalid-data','object\x20with\x20content\x20and\x20type\x20properties','string','147NAQEFh','_createContextItemFromContent','TEXT','current-document','text/plain','url-','_ownerId','removeSelectionFromContext','forEach','_setAddContextOptionsDefaultState','values','find','clearPendingContextItems','set','isSelectionInContext','populateFromMessage','filter','isHidden','urls','getResources','isCurrentDocumentInConversation','isReadOnly','removeFromContext','sources','ai-chat-url-upload-failed','abort','url','resourceId','message','start','addContextOptionsChanged','610748MgrBsc','text/html','contextItemLoadingEnded','document','isInContext','MARKDOWN','uiId','getData','end','575922fFjjQf','size','init','abortController','getPendingContextItems','name','_convertTextResourceToFile','file-','length','contextSent','ai-chat-source-resources-load-failed','enabled','ai-request-aborted','data','_finishContextItemLoading','_addToConversationContextItem','type','addToConversationContext','9914310CGVodU','files-','1385789yTNjuB','_toggleAddCurrentDocumentOptionVisibility','Current\x20document','getSentContextItems','ai-chat-resource-load-failed','startsWith','16408KGLYqr','addFilesToContext','ai-chat-file-upload-failed','fire','addSelectionToContext','text/markdown','loadSourceResources','_finishUploadOperation','fetchDocument','_startUploadOperation','FILE','_ongoingUploads','File','addResourceToContext','resources','ai-chat-resource-no-data','uploadDocument','stack','resourceStateChanged','delete','label','isCurrentDocumentInContext','has','_addContextItem','uploadProgressChanged','mapContextItemsToRequestData','_pendingContextItems','DOCUMENT','URL','5PHeDVD','contextItemRemoved','_isResourceInContext','object','_updateResourceInContextState'];_0x16c3=function(){return _0x47030f;};return _0x16c3();}function _0x59ee(_0x261871,_0x1c93aa){const _0x16c352=_0x16c3();return _0x59ee=function(_0x59eeb0,_0x204079){_0x59eeb0=_0x59eeb0-0x1cd;let _0x4cbe75=_0x16c352[_0x59eeb0];return _0x4cbe75;},_0x59ee(_0x261871,_0x1c93aa);}export class AIChatContext extends _0x3aeb56(){[_0x36bb60(0x1e9)];[_0x36bb60(0x1f2)];[_0x36bb60(0x206)];constructor({connector:_0x267f42,config:_0x36f5de,ownerId:_0x6cffa3}){const _0x35e3fd=_0x36bb60;super(),this[_0x35e3fd(0x1e9)]=_0x267f42,this[_0x35e3fd(0x1f2)]=_0x36f5de,this[_0x35e3fd(0x206)]=_0x6cffa3;}[_0x36bb60(0x22a)](){const _0x2c2608=_0x36bb60;this[_0x2c2608(0x1cf)]=new Map(),this[_0x2c2608(0x1e3)]=new Map(),this[_0x2c2608(0x24d)]=new Map(),this[_0x2c2608(0x1ec)]=new Map(),this[_0x2c2608(0x209)]();}[_0x36bb60(0x22c)](){const _0x5c8930=_0x36bb60;return this[_0x5c8930(0x1cf)];}async[_0x36bb60(0x20f)](_0x3d8333){const _0x573cba=_0x36bb60,_0x48e10b=await this[_0x573cba(0x201)](_0x3d8333);return this[_0x573cba(0x237)](_0x48e10b),_0x573cba(0x203)===_0x48e10b[_0x573cba(0x225)]&&this[_0x573cba(0x23d)](),_0x48e10b;}async[_0x36bb60(0x201)](_0x5109e1){const _0x3a06de=_0x36bb60;if(_0x5109e1[_0x3a06de(0x238)]===_0x387a93[_0x3a06de(0x1d0)]){const _0x24cb85=await this[_0x3a06de(0x1e9)][_0x3a06de(0x24a)](this[_0x3a06de(0x206)],_0x5109e1['id'])[_0x3a06de(0x1ef)]();return{'id':_0x3a06de(0x203),'uiId':_0x3a06de(0x203),'label':_0x3a06de(0x23e),'type':_0x5109e1[_0x3a06de(0x238)],'content':_0x24cb85[_0x3a06de(0x1de)],'hidden':this[_0x3a06de(0x1e3)][_0x3a06de(0x258)](_0x3a06de(0x203)),'version':_0x24cb85[_0x3a06de(0x1f0)]?.[_0x3a06de(0x1ee)],'sessionId':_0x24cb85[_0x3a06de(0x1f0)]?.[_0x3a06de(0x1f6)]};}return{'id':_0x5109e1['id'],'uiId':_0x5109e1['id'],'label':_0x5109e1[_0x3a06de(0x1f0)]?.[_0x3a06de(0x256)]||_0x5109e1[_0x3a06de(0x22d)]||_0x5109e1[_0x3a06de(0x21a)]||_0x5109e1['id'],'type':_0x5109e1[_0x3a06de(0x238)],..._0x5109e1?.[_0x3a06de(0x1f0)]?.[_0x3a06de(0x21b)]?{'resourceId':_0x5109e1[_0x3a06de(0x1f0)]?.[_0x3a06de(0x21b)]}:{}};}[_0x36bb60(0x23f)](){const _0x3055bc=_0x36bb60;return new Map(this[_0x3055bc(0x1e3)]);}[_0x36bb60(0x216)](_0x48bd5b){const _0x4dc535=_0x36bb60,_0x457e1a=this[_0x4dc535(0x1cf)][_0x4dc535(0x1f4)](_0x48bd5b);_0x457e1a?.[_0x4dc535(0x215)]||this[_0x4dc535(0x1f9)](_0x48bd5b);}[_0x36bb60(0x20c)](){const _0x4b4354=_0x36bb60;if(0x0===this[_0x4b4354(0x1cf)][_0x4b4354(0x229)])return;for(const _0x44db8a of this[_0x4b4354(0x1cf)][_0x4b4354(0x20a)]())this[_0x4b4354(0x1f9)](_0x44db8a[_0x4b4354(0x225)]);const _0x23ceca=this[_0x4b4354(0x1e3)][_0x4b4354(0x1f4)](_0x4b4354(0x203))||this[_0x4b4354(0x1cf)][_0x4b4354(0x1f4)](_0x4b4354(0x203));_0x23ceca&&this[_0x4b4354(0x259)]({..._0x23ceca,'isReadOnly':!0x0,'hidden':!0x0});}[_0x36bb60(0x239)](_0x17ffea){const _0xa3da03=_0x36bb60;for(const _0x42bd2f of _0x17ffea[_0xa3da03(0x20a)]())this[_0xa3da03(0x237)](_0x42bd2f);this[_0xa3da03(0x20c)](),this[_0xa3da03(0x245)](_0xa3da03(0x231),{'contextItems':Array[_0xa3da03(0x1da)](this[_0xa3da03(0x23f)]()[_0xa3da03(0x20a)]())});}[_0x36bb60(0x257)](){const _0x53a596=_0x36bb60;return this[_0x53a596(0x1cf)][_0x53a596(0x258)](_0x53a596(0x203));}[_0x36bb60(0x20e)](){const _0x245e2b=_0x36bb60;return this[_0x245e2b(0x1cf)][_0x245e2b(0x258)](_0x245e2b(0x1f7));}[_0x36bb60(0x214)](){const _0x1a6431=_0x36bb60;return this[_0x1a6431(0x1e3)][_0x1a6431(0x258)](_0x1a6431(0x203));}static[_0x36bb60(0x1ce)](_0x377774){const _0x19f74f=_0x36bb60;return Array[_0x19f74f(0x1da)](_0x377774[_0x19f74f(0x20a)]())[_0x19f74f(0x1e2)](_0x69830f=>this[_0x19f74f(0x1db)](_0x69830f))[_0x19f74f(0x210)](_0x1a5c3d=>null!==_0x1a5c3d);}async[_0x36bb60(0x243)](_0x15221d,_0x2e3469,_0x1d4135=_0x387a93[_0x36bb60(0x24c)]){const _0x1c7f30=_0x36bb60,_0x2f5b9c=_0x1c7f30(0x23b)+_0x1b8c2d();this[_0x1c7f30(0x24b)](_0x2f5b9c);try{await Promise[_0x1c7f30(0x1fa)](_0x15221d[_0x1c7f30(0x1e2)](async _0x57865a=>{const _0x3580e1=_0x1c7f30,_0x28664a=_0x3580e1(0x22f)+_0x1b8c2d(),_0x4eb627=_0x20c0e9(_0x57865a[_0x3580e1(0x22d)]);try{this[_0x3580e1(0x259)]({'type':_0x1d4135,'label':_0x2e3469?.[_0x3580e1(0x256)]||_0x4eb627,'uiId':_0x28664a,'resourceId':_0x2e3469?.[_0x3580e1(0x21b)]},!0x0);const _0x3db59f=this[_0x3580e1(0x1e9)][_0x3580e1(0x1d7)](this[_0x3580e1(0x206)],_0x57865a,_0x2e3469);this[_0x3580e1(0x24d)][_0x3580e1(0x20d)](_0x28664a,_0x3db59f[_0x3580e1(0x22b)]);const {id:_0x4b1fe6}=await _0x3db59f[_0x3580e1(0x1eb)]();this[_0x3580e1(0x24d)][_0x3580e1(0x255)](_0x28664a),this[_0x3580e1(0x236)]({'type':_0x1d4135,'id':_0x4b1fe6,'label':_0x2e3469?.[_0x3580e1(0x256)]||_0x4eb627,'uiId':_0x28664a,'resourceId':_0x2e3469?.[_0x3580e1(0x21b)]},!0x1);}catch(_0x4c577b){this[_0x3580e1(0x24d)][_0x3580e1(0x255)](_0x28664a);if(!_0x4c577b[_0x3580e1(0x21c)][_0x3580e1(0x241)](_0x3580e1(0x234))){const _0x525a5f=new _0x14b66b(_0x3580e1(0x244),null,{'fileName':_0x4eb627});_0x525a5f[_0x3580e1(0x253)]=_0x4c577b[_0x3580e1(0x253)],this[_0x3580e1(0x245)](_0x3580e1(0x1fc),{'error':_0x525a5f,'fileName':_0x4eb627});}this[_0x3580e1(0x1f9)](_0x28664a);}}));}finally{this[_0x1c7f30(0x249)](_0x2f5b9c);}}[_0x36bb60(0x1dd)](_0x48b454){const _0x152d61=_0x36bb60;if(this[_0x152d61(0x257)]())return;const _0x3d7e40={'type':_0x387a93[_0x152d61(0x1d0)],'uiId':_0x152d61(0x203),'label':_0x48b454,'isReadOnly':this[_0x152d61(0x1e3)][_0x152d61(0x258)](_0x152d61(0x203)),'hidden':this[_0x152d61(0x1e3)][_0x152d61(0x258)](_0x152d61(0x203))};this[_0x152d61(0x259)](_0x3d7e40);}async[_0x36bb60(0x1f8)](_0x1c9fe3,_0x2db623,_0x41d169,_0x328bc0){const _0x1e6627=_0x36bb60,_0x1c18e7=this[_0x1e6627(0x1cf)][_0x1e6627(0x1f4)](_0x1e6627(0x203));if(_0x1c18e7&&_0x1c9fe3){_0x1c18e7[_0x1e6627(0x1f7)]=_0x328bc0?_0x328bc0[_0x1e6627(0x1e2)](_0x480a51=>({'start':_0x480a51[_0x1e6627(0x21d)],'end':_0x480a51[_0x1e6627(0x227)]})):[];try{if(_0x1c18e7[_0x1e6627(0x1ee)]===_0x2db623)return;const {id:_0x587ed9}=await this[_0x1e6627(0x1e9)][_0x1e6627(0x252)](this[_0x1e6627(0x206)],_0x1c9fe3,{'version':_0x2db623,'sessionId':_0x41d169})[_0x1e6627(0x1eb)]();_0x1c18e7['id']=_0x587ed9,_0x1c18e7[_0x1e6627(0x1de)]=_0x1c9fe3,_0x1c18e7[_0x1e6627(0x1ee)]=_0x2db623,_0x1c18e7[_0x1e6627(0x1f6)]=_0x41d169;}catch(_0x279ea4){const _0x1f1b5a=new _0x14b66b(_0x1e6627(0x1f5),null);_0x1f1b5a[_0x1e6627(0x253)]=_0x279ea4[_0x1e6627(0x253)],this[_0x1e6627(0x245)](_0x1e6627(0x1fc),{'error':_0x1f1b5a});}}}[_0x36bb60(0x246)](_0x4f6c67){const _0x362604=_0x36bb60;this[_0x362604(0x259)]({'type':_0x387a93[_0x362604(0x1e6)],'label':_0x4f6c67,'uiId':_0x362604(0x1f7),'content':_0x4f6c67});}[_0x36bb60(0x207)](){const _0x2a98d9=_0x36bb60;this[_0x2a98d9(0x1f9)](_0x2a98d9(0x1f7));}async[_0x36bb60(0x1e7)](_0x820d80,_0x50c92e){const _0x117f20=_0x36bb60,_0x21b63a=_0x117f20(0x205)+_0x1b8c2d();this[_0x117f20(0x24b)](_0x21b63a);const _0x387f4b=_0x117f20(0x205)+_0x1b8c2d();try{this[_0x117f20(0x259)]({'type':_0x387a93[_0x117f20(0x1d1)],'label':_0x50c92e?.[_0x117f20(0x256)]||_0x820d80,'uiId':_0x387f4b,'resourceId':_0x50c92e?.[_0x117f20(0x21b)]},!0x0);const _0x593f97=this[_0x117f20(0x1e9)][_0x117f20(0x1dc)](this[_0x117f20(0x206)],_0x820d80,_0x50c92e);this[_0x117f20(0x24d)][_0x117f20(0x20d)](_0x387f4b,_0x593f97[_0x117f20(0x22b)]);const {id:_0x251001}=await _0x593f97[_0x117f20(0x1eb)]();this[_0x117f20(0x24d)][_0x117f20(0x255)](_0x387f4b),this[_0x117f20(0x236)]({'type':_0x387a93[_0x117f20(0x1d1)],'id':_0x251001,'label':_0x50c92e?.[_0x117f20(0x256)]||_0x820d80,'uiId':_0x387f4b,'resourceId':_0x50c92e?.[_0x117f20(0x21b)]},!0x1);}catch(_0x331f73){this[_0x117f20(0x24d)][_0x117f20(0x255)](_0x387f4b),(_0x331f73[_0x117f20(0x21c)][_0x117f20(0x241)](_0x117f20(0x234))||this[_0x117f20(0x245)](_0x117f20(0x1fc),{'error':new _0x14b66b(_0x117f20(0x218),this,{'url':_0x820d80,'originalError':_0x331f73}),'url':_0x820d80}),this[_0x117f20(0x1f9)](_0x387f4b));}finally{this[_0x117f20(0x249)](_0x21b63a);}}async[_0x36bb60(0x248)](_0x2063e7,_0x41d349,_0x5752e4){const _0xd75f02=_0x36bb60,_0x4bd225=this[_0xd75f02(0x1f3)][_0xd75f02(0x217)][_0xd75f02(0x20b)](_0x49c1ee=>_0x49c1ee['id']===_0x2063e7);if(!_0x4bd225)return this[_0xd75f02(0x245)](_0xd75f02(0x1fc),{'error':new _0x14b66b(_0xd75f02(0x1e8),this,{'sourceId':_0x2063e7}),'sourceId':_0x2063e7}),[];try{const _0x635da9=(await _0x4bd225[_0xd75f02(0x213)](_0x41d349))[_0xd75f02(0x1e2)](_0x24707d=>{const _0x6c7f66=_0xd75f02,_0x31e987=this[_0x6c7f66(0x1d4)](_0x24707d['id']);return{..._0x24707d,'isInContext':_0x31e987};});return _0x4bd225[_0xd75f02(0x250)]=_0x635da9,this[_0xd75f02(0x245)](_0xd75f02(0x1df),{'sourceId':_0x2063e7,'source':_0x4bd225,'resources':_0x635da9,'uid':_0x5752e4}),_0x635da9;}catch(_0x3518c3){return this[_0xd75f02(0x245)](_0xd75f02(0x1fc),{'error':new _0x14b66b(_0xd75f02(0x232),this,{'sourceId':_0x2063e7,'originalError':_0x3518c3}),'sourceId':_0x2063e7,'sourceLabel':_0x4bd225[_0xd75f02(0x256)]}),[];}}async[_0x36bb60(0x24f)](_0x2d96fb,_0x12c4c4){const _0x164790=_0x36bb60;if(this[_0x164790(0x1d4)](_0x12c4c4['id']))return;let _0x3ec9cf=_0x12c4c4[_0x164790(0x235)];if(!_0x3ec9cf&&_0x2d96fb[_0x164790(0x226)])try{_0x3ec9cf=await _0x2d96fb[_0x164790(0x226)](_0x12c4c4['id']);}catch(_0x46d135){return void this[_0x164790(0x245)](_0x164790(0x1fc),{'error':new _0x14b66b(_0x164790(0x240),this,{'resourceId':_0x12c4c4['id'],'sourceId':_0x2d96fb['id'],'originalError':_0x46d135}),'resourceId':_0x12c4c4['id'],'sourceId':_0x2d96fb['id']});}if(_0x3ec9cf)switch(_0x12c4c4[_0x164790(0x238)]){case _0x387a93[_0x164790(0x1d1)]:if(_0x164790(0x1ff)!=typeof _0x3ec9cf)return void this[_0x164790(0x245)](_0x164790(0x1fc),{'error':new _0x14b66b(_0x164790(0x1fd),this,{'resourceId':_0x12c4c4['id'],'sourceId':_0x2d96fb['id'],'expectedType':_0x164790(0x1ff),'actualType':typeof _0x3ec9cf}),'resourceId':_0x12c4c4['id'],'sourceId':_0x2d96fb['id']});await this[_0x164790(0x1e7)](_0x3ec9cf,{'label':_0x12c4c4[_0x164790(0x256)],'resourceId':_0x12c4c4['id']});break;case _0x387a93[_0x164790(0x24c)]:if(!(_0x3ec9cf instanceof File))return void this[_0x164790(0x245)](_0x164790(0x1fc),{'error':new _0x14b66b(_0x164790(0x1fd),this,{'resourceId':_0x12c4c4['id'],'sourceId':_0x2d96fb['id'],'expectedType':_0x164790(0x24e),'actualType':typeof _0x3ec9cf}),'resourceId':_0x12c4c4['id'],'sourceId':_0x2d96fb['id']});await this[_0x164790(0x243)]([_0x3ec9cf],{'label':_0x12c4c4[_0x164790(0x256)],'resourceId':_0x12c4c4['id']});break;case _0x387a93[_0x164790(0x202)]:if(_0x164790(0x1d5)!=typeof _0x3ec9cf||!(_0x164790(0x1de)in _0x3ec9cf)||!(_0x164790(0x238)in _0x3ec9cf))return void this[_0x164790(0x245)](_0x164790(0x1fc),{'error':new _0x14b66b(_0x164790(0x1fd),this,{'resourceId':_0x12c4c4['id'],'sourceId':_0x2d96fb['id'],'expectedType':_0x164790(0x1fe),'actualType':typeof _0x3ec9cf}),'resourceId':_0x12c4c4['id'],'sourceId':_0x2d96fb['id']});_0x3ec9cf=AIChatContext[_0x164790(0x22e)](_0x3ec9cf,_0x12c4c4[_0x164790(0x256)]),await this[_0x164790(0x243)]([_0x3ec9cf],{'label':_0x12c4c4[_0x164790(0x256)],'resourceId':_0x12c4c4['id']},_0x387a93[_0x164790(0x202)]);break;default:this[_0x164790(0x245)](_0x164790(0x1fc),{'error':new _0x14b66b(_0x164790(0x1f1),this,{'resourceId':_0x12c4c4['id'],'sourceId':_0x2d96fb['id'],'resourceType':_0x12c4c4[_0x164790(0x238)]}),'resourceId':_0x12c4c4['id'],'sourceId':_0x2d96fb['id']});}else this[_0x164790(0x245)](_0x164790(0x1fc),{'error':new _0x14b66b(_0x164790(0x251),this,{'resourceId':_0x12c4c4['id'],'sourceId':_0x2d96fb['id']}),'resourceId':_0x12c4c4['id'],'sourceId':_0x2d96fb['id']});}static[_0x36bb60(0x22e)](_0x587a10,_0x4ef3cf){const _0x7cff63=_0x36bb60;switch(_0x587a10[_0x7cff63(0x238)]){case _0x49caea[_0x7cff63(0x224)]:return new File([_0x587a10[_0x7cff63(0x1de)]],_0x4ef3cf,{'type':_0x7cff63(0x247)});case _0x49caea[_0x7cff63(0x1e0)]:return new File([_0x587a10[_0x7cff63(0x1de)]],_0x4ef3cf,{'type':_0x7cff63(0x220)});default:return new File([_0x587a10[_0x7cff63(0x1de)]],_0x4ef3cf,{'type':_0x7cff63(0x204)});}}static[_0x36bb60(0x1db)](_0x471f4d){const _0x44251e=_0x36bb60;switch(_0x471f4d[_0x44251e(0x238)]){case _0x387a93[_0x44251e(0x24c)]:return{'type':_0x387a93[_0x44251e(0x24c)],'id':_0x471f4d['id']};case _0x387a93[_0x44251e(0x1d1)]:return{'type':_0x387a93[_0x44251e(0x1d1)],'id':_0x471f4d['id']};case _0x387a93[_0x44251e(0x1d0)]:return{'type':_0x387a93[_0x44251e(0x1d0)],'id':_0x471f4d['id'],..._0x471f4d[_0x44251e(0x1f7)]?.[_0x44251e(0x230)]&&{'selection':_0x471f4d[_0x44251e(0x1f7)]}};case _0x387a93[_0x44251e(0x202)]:return{'type':_0x387a93[_0x44251e(0x24c)],'id':_0x471f4d['id']};default:return null;}}[_0x36bb60(0x259)](_0x18bd4b,_0x16d2ef=!0x1){const _0xd5943a=_0x36bb60;if(this[_0xd5943a(0x1cf)][_0xd5943a(0x20d)](_0x18bd4b[_0xd5943a(0x225)],_0x18bd4b),_0x18bd4b[_0xd5943a(0x1d8)]||this[_0xd5943a(0x245)](_0xd5943a(0x1d9),{'contextItem':_0x18bd4b,'isLoading':_0x16d2ef}),_0xd5943a(0x203)===_0x18bd4b[_0xd5943a(0x225)]&&this[_0xd5943a(0x23d)](),_0x18bd4b[_0xd5943a(0x21b)]){const _0x3ed0c=this[_0xd5943a(0x1fb)](_0x18bd4b[_0xd5943a(0x21b)]);_0x3ed0c&&_0x3ed0c[_0xd5943a(0x208)](_0xbf4b9f=>{const _0x5c09d9=_0xd5943a;this[_0x5c09d9(0x1d6)](_0xbf4b9f,_0x18bd4b[_0x5c09d9(0x21b)],!0x0);});}}[_0x36bb60(0x1f9)](_0x1fb334){const _0x1906db=_0x36bb60,_0x1d2398=this[_0x1906db(0x1cf)][_0x1906db(0x1f4)](_0x1fb334),_0x3e04b5=this[_0x1906db(0x24d)][_0x1906db(0x1f4)](_0x1fb334);if(_0x3e04b5&&(_0x3e04b5[_0x1906db(0x219)](),this[_0x1906db(0x24d)][_0x1906db(0x255)](_0x1fb334)),_0x1d2398?.[_0x1906db(0x21b)]){const _0x3dd654=this[_0x1906db(0x1fb)](_0x1d2398[_0x1906db(0x21b)]);_0x3dd654&&_0x3dd654[_0x1906db(0x208)](_0x482d4a=>{const _0x567c72=_0x1906db;this[_0x567c72(0x1d6)](_0x482d4a,_0x1d2398[_0x567c72(0x21b)],!0x1);});}this[_0x1906db(0x1cf)][_0x1906db(0x255)](_0x1fb334),this[_0x1906db(0x245)](_0x1906db(0x1d3),{'uiId':_0x1fb334,'type':_0x1d2398?.[_0x1906db(0x238)]}),_0x1906db(0x203)===_0x1fb334&&this[_0x1906db(0x23d)]();}[_0x36bb60(0x236)](_0x24433a,_0x25e5d7){const _0x387f5c=_0x36bb60;if(this[_0x387f5c(0x1cf)][_0x387f5c(0x258)](_0x24433a[_0x387f5c(0x225)])&&(this[_0x387f5c(0x1cf)][_0x387f5c(0x20d)](_0x24433a[_0x387f5c(0x225)],_0x24433a),this[_0x387f5c(0x245)](_0x387f5c(0x221),{'contextItem':_0x24433a,'isLoading':_0x25e5d7}),_0x24433a[_0x387f5c(0x21b)])){const _0x444c99=this[_0x387f5c(0x1fb)](_0x24433a[_0x387f5c(0x21b)]);_0x444c99&&_0x444c99[_0x387f5c(0x208)](_0x7c9261=>{const _0x485277=_0x387f5c;this[_0x485277(0x1d6)](_0x7c9261,_0x24433a[_0x485277(0x21b)],!0x0);});}}[_0x36bb60(0x237)](_0x143fde){const _0x5dbbf5=_0x36bb60;this[_0x5dbbf5(0x1e3)][_0x5dbbf5(0x20d)](_0x143fde[_0x5dbbf5(0x225)],_0x143fde);}[_0x36bb60(0x209)](){const _0x53f65d=_0x36bb60;this[_0x53f65d(0x1f3)]={'document':{'enabled':!0x1!==this[_0x53f65d(0x1f2)]?.[_0x53f65d(0x222)]?.[_0x53f65d(0x233)],'isHidden':!0x1},'urls':{'enabled':!0x1!==this[_0x53f65d(0x1f2)]?.[_0x53f65d(0x212)]?.[_0x53f65d(0x233)]},'files':{'enabled':!0x1!==this[_0x53f65d(0x1f2)]?.[_0x53f65d(0x1e5)]?.[_0x53f65d(0x233)]},'sources':this[_0x53f65d(0x1e1)]()},this[_0x53f65d(0x245)](_0x53f65d(0x21e),{'options':this[_0x53f65d(0x1f3)]});}[_0x36bb60(0x1e1)](){const _0x19d247=_0x36bb60;return this[_0x19d247(0x1f2)]?.[_0x19d247(0x217)]?.[_0x19d247(0x1e2)](_0x394fb1=>({..._0x394fb1,'resources':[]}))??[];}[_0x36bb60(0x23d)](){const _0x5b6c70=_0x36bb60,_0x355c5c=this[_0x5b6c70(0x257)]()||this[_0x5b6c70(0x214)]();this[_0x5b6c70(0x1f3)][_0x5b6c70(0x222)][_0x5b6c70(0x211)]=_0x355c5c,this[_0x5b6c70(0x245)](_0x5b6c70(0x21e),{'options':this[_0x5b6c70(0x1f3)]});}[_0x36bb60(0x1d4)](_0x38e1c0){const _0x36936c=_0x36bb60;for(const _0x527d3c of this[_0x36936c(0x1cf)][_0x36936c(0x20a)]())if(_0x527d3c[_0x36936c(0x21b)]===_0x38e1c0)return!0x0;for(const _0x3d0578 of this[_0x36936c(0x1e3)][_0x36936c(0x20a)]())if(_0x3d0578[_0x36936c(0x21b)]===_0x38e1c0)return!0x0;return!0x1;}[_0x36bb60(0x1fb)](_0x2ca9da){const _0x19db13=_0x36bb60,_0x43a520=[];for(const _0x537c2f of this[_0x19db13(0x1f3)][_0x19db13(0x217)]){_0x537c2f[_0x19db13(0x250)][_0x19db13(0x20b)](_0x2a6266=>_0x2a6266['id']===_0x2ca9da)&&_0x43a520[_0x19db13(0x1e4)](_0x537c2f['id']);}return 0x0===_0x43a520[_0x19db13(0x230)]?null:_0x43a520;}[_0x36bb60(0x1d6)](_0x5f1dd9,_0x5827c5,_0x2ae853){const _0x14e6ed=_0x36bb60,_0x28838a=this[_0x14e6ed(0x1f3)][_0x14e6ed(0x217)][_0x14e6ed(0x20b)](_0x538269=>_0x538269['id']===_0x5f1dd9);if(!_0x28838a)return;const _0x2b0d9c=_0x28838a[_0x14e6ed(0x250)][_0x14e6ed(0x20b)](_0x532342=>_0x532342['id']===_0x5827c5);_0x2b0d9c&&(_0x2b0d9c[_0x14e6ed(0x223)]=_0x2ae853,this[_0x14e6ed(0x245)](_0x14e6ed(0x254),{'sourceId':_0x5f1dd9,'resourceId':_0x5827c5,'isInContext':_0x2ae853}));}[_0x36bb60(0x24b)](_0x5eafb5){const _0x4d9d0b=_0x36bb60;this[_0x4d9d0b(0x1ec)][_0x4d9d0b(0x20d)](_0x5eafb5,!0x0),this[_0x4d9d0b(0x1ec)][_0x4d9d0b(0x229)]&&this[_0x4d9d0b(0x245)](_0x4d9d0b(0x1cd),{'isUploadInProgress':!0x0});}[_0x36bb60(0x249)](_0x55e1bc){const _0x53ddaf=_0x36bb60;this[_0x53ddaf(0x1ec)][_0x53ddaf(0x255)](_0x55e1bc),0x0===this[_0x53ddaf(0x1ec)][_0x53ddaf(0x229)]&&this[_0x53ddaf(0x245)](_0x53ddaf(0x1cd),{'isUploadInProgress':!0x1});}}
23
+ const _0x44c243=_0x32f8;function _0x4c7f(){const _0xf4c3ca=['File','_getCustomSourcesInitialState','SELECTION','sessionId','text/markdown','isSelectionInContext','populateFromMessage','start','map','411097IOkCUy','getDocument','ai-chat-source-not-found','_finishUploadOperation','addResourceToContext','clearPendingContextItems','4315232HhSwiv','20234808IagSYs','ai-chat-context-unsupported-type','Current\x20document','addSelectionToContext','string','size','48BDrxrD','removeSelectionFromContext','files','get','_toggleAddCurrentDocumentOptionVisibility','HTML','mapContextItemsToRequestData','addUrlToContext','1022810NjhIYd','removeFromContext','selection','label','_addToConversationContextItem','forEach','getResources','length','859341AjlMwx','_ownerId','contextSent','file-','object','addCurrentDocumentToContext','_updateResourceInContextState','contextItemLoadingEnded','addFilesToContext','_connector','3228068utAOfI','_isResourceInContext','addContextOptionsChanged','resources','isInContext','find','fetchDocument','_ongoingUploadOperations','has','loadSourceResources','resourceId','_conversationContextItems','ai-chat-resource-load-failed','abort','files-','URL','text/html','stack','ai-chat-context-invalid-data','data','enabled','_createContextItemFromContent','_setAddContextOptionsDefaultState','getPendingContextItems','fire','type','uploadUrl','content','FILE','_addContextItem','url','_addContextOptionsState','_startUploadOperation','object\x20with\x20content\x20and\x20type\x20properties','isCurrentDocumentInContext','values','from','name','init','delete','_config','version','getSentContextItems','_finishContextItemLoading','_ongoingUploads','attributes','ai-chat-document-upload-failed','ai-chat-resource-no-data','uploadDocument','_pendingContextItems','DOCUMENT','urls','_findSourceIdsByResourceId','uploadProgressChanged','hidden','updateCurrentDocument','isReadOnly','set','_mapContextItemToRequestData','MARKDOWN','message','contextItemRemoved','isCurrentDocumentInConversation','ai-chat-url-upload-failed','abortController','TEXT','sources','ai-chat-source-resources-load-failed','addToConversationContext','end','_convertTextResourceToFile','uploadFile','document','all','getId','sourceResourcesLoaded','error','_removeContextItem','ai-chat-file-upload-failed','6OKWBxT','startsWith','uiId','text/plain','isHidden','resourceStateChanged','filter','getData','131006DBQQSO','ai-request-aborted','push','contextItemAdded','url-','current-document'];_0x4c7f=function(){return _0xf4c3ca;};return _0x4c7f();}function _0x32f8(_0x4f5917,_0x5e81f1){const _0x4c7f63=_0x4c7f();return _0x32f8=function(_0x32f833,_0x4f4521){_0x32f833=_0x32f833-0x14b;let _0x57907a=_0x4c7f63[_0x32f833];return _0x57907a;},_0x32f8(_0x4f5917,_0x5e81f1);}(function(_0x4153e7,_0x411eaa){const _0x104900=_0x32f8,_0x52c866=_0x4153e7();while(!![]){try{const _0x58ad5e=parseInt(_0x104900(0x18e))/0x1+-parseInt(_0x104900(0x17f))/0x2*(parseInt(_0x104900(0x19b))/0x3)+-parseInt(_0x104900(0x1b5))/0x4+parseInt(_0x104900(0x1a3))/0x5+parseInt(_0x104900(0x177))/0x6*(parseInt(_0x104900(0x1ab))/0x7)+-parseInt(_0x104900(0x194))/0x8+parseInt(_0x104900(0x195))/0x9;if(_0x58ad5e===_0x411eaa)break;else _0x52c866['push'](_0x52c866['shift']());}catch(_0x29df53){_0x52c866['push'](_0x52c866['shift']());}}}(_0x4c7f,0x90989));import{CKEditorError as _0x4ae8b7,ObservableMixin as _0x9bbd05,uid as _0x39f98e}from'ckeditor5/src/utils.js';import{AIContextItemType as _0x14f8c6,AIContextTextResourceType as _0x56aa68}from'../../aicore/model/aicontext.js';import{escape as _0x4b36ac}from'es-toolkit/compat';export const AI_CONTEXT_MODEL_EVENT_NAMES=[_0x44c243(0x182),_0x44c243(0x165),_0x44c243(0x1b2),_0x44c243(0x1ad),_0x44c243(0x174),_0x44c243(0x1b7),_0x44c243(0x173),_0x44c243(0x17c),_0x44c243(0x15d)];export class AIChatContext extends _0x9bbd05(){[_0x44c243(0x1b4)];[_0x44c243(0x150)];[_0x44c243(0x1ac)];constructor({connector:_0x32b25d,config:_0x1ff7ca,ownerId:_0xdfb298}){const _0x2292fd=_0x44c243;super(),this[_0x2292fd(0x1b4)]=_0x32b25d,this[_0x2292fd(0x150)]=_0x1ff7ca,this[_0x2292fd(0x1ac)]=_0xdfb298;}[_0x44c243(0x14e)](){const _0x5ee843=_0x44c243;this[_0x5ee843(0x159)]=new Map(),this[_0x5ee843(0x1c0)]=new Map(),this[_0x5ee843(0x154)]=new Map(),this[_0x5ee843(0x1bc)]=new Map(),this[_0x5ee843(0x1cb)]();}[_0x44c243(0x1cc)](){const _0x310e21=_0x44c243;return this[_0x310e21(0x159)];}async[_0x44c243(0x18b)](_0x3ec256){const _0x41c81d=_0x44c243,_0x315e00=await this[_0x41c81d(0x1ca)](_0x3ec256);return this[_0x41c81d(0x1a7)](_0x315e00),_0x41c81d(0x184)===_0x315e00[_0x41c81d(0x179)]&&this[_0x41c81d(0x19f)](),_0x315e00;}async[_0x44c243(0x1ca)](_0x1dd602){const _0x5d4d2b=_0x44c243;if(_0x1dd602[_0x5d4d2b(0x1ce)]===_0x14f8c6[_0x5d4d2b(0x15a)]){const _0x44dc8d=await this[_0x5d4d2b(0x1b4)][_0x5d4d2b(0x1bb)](this[_0x5d4d2b(0x1ac)],_0x1dd602['id'])[_0x5d4d2b(0x18f)]();return{'id':_0x5d4d2b(0x184),'uiId':_0x5d4d2b(0x184),'label':_0x5d4d2b(0x197),'type':_0x1dd602[_0x5d4d2b(0x1ce)],'content':_0x44dc8d[_0x5d4d2b(0x1d0)],'hidden':this[_0x5d4d2b(0x1c0)][_0x5d4d2b(0x1bd)](_0x5d4d2b(0x184)),'version':_0x44dc8d[_0x5d4d2b(0x155)]?.[_0x5d4d2b(0x151)],'sessionId':_0x44dc8d[_0x5d4d2b(0x155)]?.[_0x5d4d2b(0x188)]};}return{'id':_0x1dd602['id'],'uiId':_0x1dd602['id'],'label':_0x1dd602[_0x5d4d2b(0x155)]?.[_0x5d4d2b(0x1a6)]||_0x1dd602[_0x5d4d2b(0x14d)]||_0x1dd602[_0x5d4d2b(0x1d3)]||_0x1dd602['id'],'type':_0x1dd602[_0x5d4d2b(0x1ce)],..._0x1dd602?.[_0x5d4d2b(0x155)]?.[_0x5d4d2b(0x1bf)]?{'resourceId':_0x1dd602[_0x5d4d2b(0x155)]?.[_0x5d4d2b(0x1bf)]}:{}};}[_0x44c243(0x152)](){const _0x2e22c0=_0x44c243;return new Map(this[_0x2e22c0(0x1c0)]);}[_0x44c243(0x1a4)](_0x1053f0){const _0x395a05=_0x44c243,_0x428ecb=this[_0x395a05(0x159)][_0x395a05(0x19e)](_0x1053f0);_0x428ecb?.[_0x395a05(0x160)]||this[_0x395a05(0x175)](_0x1053f0);}[_0x44c243(0x193)](){const _0x2695cd=_0x44c243;if(0x0===this[_0x2695cd(0x159)][_0x2695cd(0x19a)])return;for(const _0x39003f of this[_0x2695cd(0x159)][_0x2695cd(0x14b)]())this[_0x2695cd(0x175)](_0x39003f[_0x2695cd(0x179)]);const _0x3a35d7=this[_0x2695cd(0x1c0)][_0x2695cd(0x19e)](_0x2695cd(0x184))||this[_0x2695cd(0x159)][_0x2695cd(0x19e)](_0x2695cd(0x184));_0x3a35d7&&this[_0x2695cd(0x1d2)]({..._0x3a35d7,'isReadOnly':!0x0,'hidden':!0x0});}[_0x44c243(0x16c)](_0x8f6aeb){const _0x507f16=_0x44c243;for(const _0x1bdfc8 of _0x8f6aeb[_0x507f16(0x14b)]())this[_0x507f16(0x1a7)](_0x1bdfc8);this[_0x507f16(0x193)](),this[_0x507f16(0x1cd)](_0x507f16(0x1ad),{'contextItems':Array[_0x507f16(0x14c)](this[_0x507f16(0x152)]()[_0x507f16(0x14b)]())});}[_0x44c243(0x1d7)](){const _0x362552=_0x44c243;return this[_0x362552(0x159)][_0x362552(0x1bd)](_0x362552(0x184));}[_0x44c243(0x18a)](){const _0x17e7ce=_0x44c243;return this[_0x17e7ce(0x159)][_0x17e7ce(0x1bd)](_0x17e7ce(0x1a5));}[_0x44c243(0x166)](){const _0x5340d1=_0x44c243;return this[_0x5340d1(0x1c0)][_0x5340d1(0x1bd)](_0x5340d1(0x184));}static[_0x44c243(0x1a1)](_0x4c4a02){const _0x2c73aa=_0x44c243;return Array[_0x2c73aa(0x14c)](_0x4c4a02[_0x2c73aa(0x14b)]())[_0x2c73aa(0x18d)](_0x104bac=>this[_0x2c73aa(0x162)](_0x104bac))[_0x2c73aa(0x17d)](_0x100efc=>null!==_0x100efc);}async[_0x44c243(0x1b3)](_0x2073a9,_0x4f16ad,_0x5d82de=_0x14f8c6[_0x44c243(0x1d1)]){const _0x1d643e=_0x44c243,_0x3aa820=_0x1d643e(0x1c3)+_0x39f98e();this[_0x1d643e(0x1d5)](_0x3aa820);try{await Promise[_0x1d643e(0x171)](_0x2073a9[_0x1d643e(0x18d)](async _0x539b23=>{const _0x1bcbda=_0x1d643e,_0xb467e=_0x1bcbda(0x1ae)+_0x39f98e(),_0x2d121f=_0x4b36ac(_0x539b23[_0x1bcbda(0x14d)]);try{this[_0x1bcbda(0x1d2)]({'type':_0x5d82de,'label':_0x4f16ad?.[_0x1bcbda(0x1a6)]||_0x2d121f,'uiId':_0xb467e,'resourceId':_0x4f16ad?.[_0x1bcbda(0x1bf)]},!0x0);const _0x5312b7=this[_0x1bcbda(0x1b4)][_0x1bcbda(0x16f)](this[_0x1bcbda(0x1ac)],_0x539b23,_0x4f16ad);this[_0x1bcbda(0x154)][_0x1bcbda(0x161)](_0xb467e,_0x5312b7[_0x1bcbda(0x168)]);const {id:_0x2c1e2d}=await _0x5312b7[_0x1bcbda(0x172)]();this[_0x1bcbda(0x154)][_0x1bcbda(0x14f)](_0xb467e),this[_0x1bcbda(0x153)]({'type':_0x5d82de,'id':_0x2c1e2d,'label':_0x4f16ad?.[_0x1bcbda(0x1a6)]||_0x2d121f,'uiId':_0xb467e,'resourceId':_0x4f16ad?.[_0x1bcbda(0x1bf)]},!0x1);}catch(_0x3599f6){this[_0x1bcbda(0x154)][_0x1bcbda(0x14f)](_0xb467e);if(!_0x3599f6[_0x1bcbda(0x164)][_0x1bcbda(0x178)](_0x1bcbda(0x180))){const _0x8771f5=new _0x4ae8b7(_0x1bcbda(0x176),null,{'fileName':_0x2d121f});_0x8771f5[_0x1bcbda(0x1c6)]=_0x3599f6[_0x1bcbda(0x1c6)],this[_0x1bcbda(0x1cd)](_0x1bcbda(0x174),{'error':_0x8771f5,'fileName':_0x2d121f});}this[_0x1bcbda(0x175)](_0xb467e);}}));}finally{this[_0x1d643e(0x191)](_0x3aa820);}}[_0x44c243(0x1b0)](_0x51fb9b){const _0x441bac=_0x44c243;if(this[_0x441bac(0x1d7)]())return;const _0x2f968d={'type':_0x14f8c6[_0x441bac(0x15a)],'uiId':_0x441bac(0x184),'label':_0x51fb9b,'isReadOnly':this[_0x441bac(0x1c0)][_0x441bac(0x1bd)](_0x441bac(0x184)),'hidden':this[_0x441bac(0x1c0)][_0x441bac(0x1bd)](_0x441bac(0x184))};this[_0x441bac(0x1d2)](_0x2f968d);}async[_0x44c243(0x15f)](_0x45196c,_0x491808,_0x38efb7,_0x2ec17b){const _0x25f0e6=_0x44c243,_0xea85f2=this[_0x25f0e6(0x159)][_0x25f0e6(0x19e)](_0x25f0e6(0x184));if(_0xea85f2&&_0x45196c){_0xea85f2[_0x25f0e6(0x1a5)]=_0x2ec17b?_0x2ec17b[_0x25f0e6(0x18d)](_0x5cc6cf=>({'start':_0x5cc6cf[_0x25f0e6(0x18c)],'end':_0x5cc6cf[_0x25f0e6(0x16d)]})):[];try{if(_0xea85f2[_0x25f0e6(0x151)]===_0x491808)return;const {id:_0x38e4a6}=await this[_0x25f0e6(0x1b4)][_0x25f0e6(0x158)](this[_0x25f0e6(0x1ac)],_0x45196c,{'version':_0x491808,'sessionId':_0x38efb7})[_0x25f0e6(0x172)]();_0xea85f2['id']=_0x38e4a6,_0xea85f2[_0x25f0e6(0x1d0)]=_0x45196c,_0xea85f2[_0x25f0e6(0x151)]=_0x491808,_0xea85f2[_0x25f0e6(0x188)]=_0x38efb7;}catch(_0x2efc25){const _0x5f4b31=new _0x4ae8b7(_0x25f0e6(0x156),null);_0x5f4b31[_0x25f0e6(0x1c6)]=_0x2efc25[_0x25f0e6(0x1c6)],this[_0x25f0e6(0x1cd)](_0x25f0e6(0x174),{'error':_0x5f4b31});}}}[_0x44c243(0x198)](_0x49e7dc){const _0x133d72=_0x44c243;this[_0x133d72(0x1d2)]({'type':_0x14f8c6[_0x133d72(0x187)],'label':_0x49e7dc,'uiId':_0x133d72(0x1a5),'content':_0x49e7dc});}[_0x44c243(0x19c)](){const _0x1c310f=_0x44c243;this[_0x1c310f(0x175)](_0x1c310f(0x1a5));}async[_0x44c243(0x1a2)](_0xcd53ed,_0x395bc1){const _0x2d15db=_0x44c243,_0x57a1c6=_0x2d15db(0x183)+_0x39f98e();this[_0x2d15db(0x1d5)](_0x57a1c6);const _0x2ffc74=_0x2d15db(0x183)+_0x39f98e();try{this[_0x2d15db(0x1d2)]({'type':_0x14f8c6[_0x2d15db(0x1c4)],'label':_0x395bc1?.[_0x2d15db(0x1a6)]||_0xcd53ed,'uiId':_0x2ffc74,'resourceId':_0x395bc1?.[_0x2d15db(0x1bf)]},!0x0);const _0x243dba=this[_0x2d15db(0x1b4)][_0x2d15db(0x1cf)](this[_0x2d15db(0x1ac)],_0xcd53ed,_0x395bc1);this[_0x2d15db(0x154)][_0x2d15db(0x161)](_0x2ffc74,_0x243dba[_0x2d15db(0x168)]);const {id:_0x32e36b}=await _0x243dba[_0x2d15db(0x172)]();this[_0x2d15db(0x154)][_0x2d15db(0x14f)](_0x2ffc74),this[_0x2d15db(0x153)]({'type':_0x14f8c6[_0x2d15db(0x1c4)],'id':_0x32e36b,'label':_0x395bc1?.[_0x2d15db(0x1a6)]||_0xcd53ed,'uiId':_0x2ffc74,'resourceId':_0x395bc1?.[_0x2d15db(0x1bf)]},!0x1);}catch(_0x9f024){this[_0x2d15db(0x154)][_0x2d15db(0x14f)](_0x2ffc74),(_0x9f024[_0x2d15db(0x164)][_0x2d15db(0x178)](_0x2d15db(0x180))||this[_0x2d15db(0x1cd)](_0x2d15db(0x174),{'error':new _0x4ae8b7(_0x2d15db(0x167),this,{'url':_0xcd53ed,'originalError':_0x9f024}),'url':_0xcd53ed}),this[_0x2d15db(0x175)](_0x2ffc74));}finally{this[_0x2d15db(0x191)](_0x57a1c6);}}async[_0x44c243(0x1be)](_0x116cda,_0xc204b,_0x50aab0){const _0x2d500f=_0x44c243,_0x34c0ad=this[_0x2d500f(0x1d4)][_0x2d500f(0x16a)][_0x2d500f(0x1ba)](_0x20ba12=>_0x20ba12['id']===_0x116cda);if(!_0x34c0ad)return this[_0x2d500f(0x1cd)](_0x2d500f(0x174),{'error':new _0x4ae8b7(_0x2d500f(0x190),this,{'sourceId':_0x116cda}),'sourceId':_0x116cda}),[];try{const _0x54f02d=(await _0x34c0ad[_0x2d500f(0x1a9)](_0xc204b))[_0x2d500f(0x18d)](_0x4892ec=>{const _0x1b9f4a=_0x2d500f,_0x467f82=this[_0x1b9f4a(0x1b6)](_0x4892ec['id']);return{..._0x4892ec,'isInContext':_0x467f82};});return _0x34c0ad[_0x2d500f(0x1b8)]=_0x54f02d,this[_0x2d500f(0x1cd)](_0x2d500f(0x173),{'sourceId':_0x116cda,'source':_0x34c0ad,'resources':_0x54f02d,'uid':_0x50aab0}),_0x54f02d;}catch(_0x3ec0ea){return this[_0x2d500f(0x1cd)](_0x2d500f(0x174),{'error':new _0x4ae8b7(_0x2d500f(0x16b),this,{'sourceId':_0x116cda,'originalError':_0x3ec0ea}),'sourceId':_0x116cda,'sourceLabel':_0x34c0ad[_0x2d500f(0x1a6)]}),[];}}async[_0x44c243(0x192)](_0x289191,_0x30b2ef){const _0x489e89=_0x44c243;if(this[_0x489e89(0x1b6)](_0x30b2ef['id']))return;let _0x48f2e7=_0x30b2ef[_0x489e89(0x1c8)];if(!_0x48f2e7&&_0x289191[_0x489e89(0x17e)])try{_0x48f2e7=await _0x289191[_0x489e89(0x17e)](_0x30b2ef['id']);}catch(_0xbac688){return void this[_0x489e89(0x1cd)](_0x489e89(0x174),{'error':new _0x4ae8b7(_0x489e89(0x1c1),this,{'resourceId':_0x30b2ef['id'],'sourceId':_0x289191['id'],'originalError':_0xbac688}),'resourceId':_0x30b2ef['id'],'sourceId':_0x289191['id']});}if(_0x48f2e7)switch(_0x30b2ef[_0x489e89(0x1ce)]){case _0x14f8c6[_0x489e89(0x1c4)]:if(_0x489e89(0x199)!=typeof _0x48f2e7)return void this[_0x489e89(0x1cd)](_0x489e89(0x174),{'error':new _0x4ae8b7(_0x489e89(0x1c7),this,{'resourceId':_0x30b2ef['id'],'sourceId':_0x289191['id'],'expectedType':_0x489e89(0x199),'actualType':typeof _0x48f2e7}),'resourceId':_0x30b2ef['id'],'sourceId':_0x289191['id']});await this[_0x489e89(0x1a2)](_0x48f2e7,{'label':_0x30b2ef[_0x489e89(0x1a6)],'resourceId':_0x30b2ef['id']});break;case _0x14f8c6[_0x489e89(0x1d1)]:if(!(_0x48f2e7 instanceof File))return void this[_0x489e89(0x1cd)](_0x489e89(0x174),{'error':new _0x4ae8b7(_0x489e89(0x1c7),this,{'resourceId':_0x30b2ef['id'],'sourceId':_0x289191['id'],'expectedType':_0x489e89(0x185),'actualType':typeof _0x48f2e7}),'resourceId':_0x30b2ef['id'],'sourceId':_0x289191['id']});await this[_0x489e89(0x1b3)]([_0x48f2e7],{'label':_0x30b2ef[_0x489e89(0x1a6)],'resourceId':_0x30b2ef['id']});break;case _0x14f8c6[_0x489e89(0x169)]:if(_0x489e89(0x1af)!=typeof _0x48f2e7||!(_0x489e89(0x1d0)in _0x48f2e7)||!(_0x489e89(0x1ce)in _0x48f2e7))return void this[_0x489e89(0x1cd)](_0x489e89(0x174),{'error':new _0x4ae8b7(_0x489e89(0x1c7),this,{'resourceId':_0x30b2ef['id'],'sourceId':_0x289191['id'],'expectedType':_0x489e89(0x1d6),'actualType':typeof _0x48f2e7}),'resourceId':_0x30b2ef['id'],'sourceId':_0x289191['id']});_0x48f2e7=AIChatContext[_0x489e89(0x16e)](_0x48f2e7,_0x30b2ef[_0x489e89(0x1a6)]),await this[_0x489e89(0x1b3)]([_0x48f2e7],{'label':_0x30b2ef[_0x489e89(0x1a6)],'resourceId':_0x30b2ef['id']},_0x14f8c6[_0x489e89(0x169)]);break;default:this[_0x489e89(0x1cd)](_0x489e89(0x174),{'error':new _0x4ae8b7(_0x489e89(0x196),this,{'resourceId':_0x30b2ef['id'],'sourceId':_0x289191['id'],'resourceType':_0x30b2ef[_0x489e89(0x1ce)]}),'resourceId':_0x30b2ef['id'],'sourceId':_0x289191['id']});}else this[_0x489e89(0x1cd)](_0x489e89(0x174),{'error':new _0x4ae8b7(_0x489e89(0x157),this,{'resourceId':_0x30b2ef['id'],'sourceId':_0x289191['id']}),'resourceId':_0x30b2ef['id'],'sourceId':_0x289191['id']});}static[_0x44c243(0x16e)](_0x288a4b,_0x58f030){const _0x5823cf=_0x44c243;switch(_0x288a4b[_0x5823cf(0x1ce)]){case _0x56aa68[_0x5823cf(0x163)]:return new File([_0x288a4b[_0x5823cf(0x1d0)]],_0x58f030,{'type':_0x5823cf(0x189)});case _0x56aa68[_0x5823cf(0x1a0)]:return new File([_0x288a4b[_0x5823cf(0x1d0)]],_0x58f030,{'type':_0x5823cf(0x1c5)});default:return new File([_0x288a4b[_0x5823cf(0x1d0)]],_0x58f030,{'type':_0x5823cf(0x17a)});}}static[_0x44c243(0x162)](_0x2cd361){const _0x3728df=_0x44c243;switch(_0x2cd361[_0x3728df(0x1ce)]){case _0x14f8c6[_0x3728df(0x1d1)]:return{'type':_0x14f8c6[_0x3728df(0x1d1)],'id':_0x2cd361['id']};case _0x14f8c6[_0x3728df(0x1c4)]:return{'type':_0x14f8c6[_0x3728df(0x1c4)],'id':_0x2cd361['id']};case _0x14f8c6[_0x3728df(0x15a)]:return{'type':_0x14f8c6[_0x3728df(0x15a)],'id':_0x2cd361['id'],..._0x2cd361[_0x3728df(0x1a5)]?.[_0x3728df(0x1aa)]&&{'selection':_0x2cd361[_0x3728df(0x1a5)]}};case _0x14f8c6[_0x3728df(0x169)]:return{'type':_0x14f8c6[_0x3728df(0x1d1)],'id':_0x2cd361['id']};default:return null;}}[_0x44c243(0x1d2)](_0x10264b,_0xbe839c=!0x1){const _0x5db07b=_0x44c243;if(this[_0x5db07b(0x159)][_0x5db07b(0x161)](_0x10264b[_0x5db07b(0x179)],_0x10264b),_0x10264b[_0x5db07b(0x15e)]||this[_0x5db07b(0x1cd)](_0x5db07b(0x182),{'contextItem':_0x10264b,'isLoading':_0xbe839c}),_0x5db07b(0x184)===_0x10264b[_0x5db07b(0x179)]&&this[_0x5db07b(0x19f)](),_0x10264b[_0x5db07b(0x1bf)]){const _0x28ff01=this[_0x5db07b(0x15c)](_0x10264b[_0x5db07b(0x1bf)]);_0x28ff01&&_0x28ff01[_0x5db07b(0x1a8)](_0x149c8a=>{const _0x4b9a73=_0x5db07b;this[_0x4b9a73(0x1b1)](_0x149c8a,_0x10264b[_0x4b9a73(0x1bf)],!0x0);});}}[_0x44c243(0x175)](_0x208d9c){const _0x49409b=_0x44c243,_0x144e93=this[_0x49409b(0x159)][_0x49409b(0x19e)](_0x208d9c),_0x577272=this[_0x49409b(0x154)][_0x49409b(0x19e)](_0x208d9c);if(_0x577272&&(_0x577272[_0x49409b(0x1c2)](),this[_0x49409b(0x154)][_0x49409b(0x14f)](_0x208d9c)),_0x144e93?.[_0x49409b(0x1bf)]){const _0x12e262=this[_0x49409b(0x15c)](_0x144e93[_0x49409b(0x1bf)]);_0x12e262&&_0x12e262[_0x49409b(0x1a8)](_0x31a29a=>{const _0x5d1c5d=_0x49409b;this[_0x5d1c5d(0x1b1)](_0x31a29a,_0x144e93[_0x5d1c5d(0x1bf)],!0x1);});}this[_0x49409b(0x159)][_0x49409b(0x14f)](_0x208d9c),this[_0x49409b(0x1cd)](_0x49409b(0x165),{'uiId':_0x208d9c,'type':_0x144e93?.[_0x49409b(0x1ce)]}),_0x49409b(0x184)===_0x208d9c&&this[_0x49409b(0x19f)]();}[_0x44c243(0x153)](_0x376c75,_0x4b023d){const _0xfd9ae2=_0x44c243;if(this[_0xfd9ae2(0x159)][_0xfd9ae2(0x1bd)](_0x376c75[_0xfd9ae2(0x179)])&&(this[_0xfd9ae2(0x159)][_0xfd9ae2(0x161)](_0x376c75[_0xfd9ae2(0x179)],_0x376c75),this[_0xfd9ae2(0x1cd)](_0xfd9ae2(0x1b2),{'contextItem':_0x376c75,'isLoading':_0x4b023d}),_0x376c75[_0xfd9ae2(0x1bf)])){const _0x520ad4=this[_0xfd9ae2(0x15c)](_0x376c75[_0xfd9ae2(0x1bf)]);_0x520ad4&&_0x520ad4[_0xfd9ae2(0x1a8)](_0x1d94f0=>{const _0x13d9a8=_0xfd9ae2;this[_0x13d9a8(0x1b1)](_0x1d94f0,_0x376c75[_0x13d9a8(0x1bf)],!0x0);});}}[_0x44c243(0x1a7)](_0x4d9091){const _0xed6384=_0x44c243;this[_0xed6384(0x1c0)][_0xed6384(0x161)](_0x4d9091[_0xed6384(0x179)],_0x4d9091);}[_0x44c243(0x1cb)](){const _0x28d40e=_0x44c243;this[_0x28d40e(0x1d4)]={'document':{'enabled':!0x1!==this[_0x28d40e(0x150)]?.[_0x28d40e(0x170)]?.[_0x28d40e(0x1c9)],'isHidden':!0x1},'urls':{'enabled':!0x1!==this[_0x28d40e(0x150)]?.[_0x28d40e(0x15b)]?.[_0x28d40e(0x1c9)]},'files':{'enabled':!0x1!==this[_0x28d40e(0x150)]?.[_0x28d40e(0x19d)]?.[_0x28d40e(0x1c9)]},'sources':this[_0x28d40e(0x186)]()},this[_0x28d40e(0x1cd)](_0x28d40e(0x1b7),{'options':this[_0x28d40e(0x1d4)]});}[_0x44c243(0x186)](){const _0x16d3c4=_0x44c243;return this[_0x16d3c4(0x150)]?.[_0x16d3c4(0x16a)]?.[_0x16d3c4(0x18d)](_0x462e9b=>({..._0x462e9b,'resources':[]}))??[];}[_0x44c243(0x19f)](){const _0x130d34=_0x44c243,_0x3ca1c2=this[_0x130d34(0x1d7)]()||this[_0x130d34(0x166)]();this[_0x130d34(0x1d4)][_0x130d34(0x170)][_0x130d34(0x17b)]=_0x3ca1c2,this[_0x130d34(0x1cd)](_0x130d34(0x1b7),{'options':this[_0x130d34(0x1d4)]});}[_0x44c243(0x1b6)](_0x397f1d){const _0x51c867=_0x44c243;for(const _0xb22b1c of this[_0x51c867(0x159)][_0x51c867(0x14b)]())if(_0xb22b1c[_0x51c867(0x1bf)]===_0x397f1d)return!0x0;for(const _0x5d8efc of this[_0x51c867(0x1c0)][_0x51c867(0x14b)]())if(_0x5d8efc[_0x51c867(0x1bf)]===_0x397f1d)return!0x0;return!0x1;}[_0x44c243(0x15c)](_0x3cee23){const _0x1cfe05=_0x44c243,_0x4010db=[];for(const _0xbbe5a9 of this[_0x1cfe05(0x1d4)][_0x1cfe05(0x16a)]){_0xbbe5a9[_0x1cfe05(0x1b8)][_0x1cfe05(0x1ba)](_0x30ea93=>_0x30ea93['id']===_0x3cee23)&&_0x4010db[_0x1cfe05(0x181)](_0xbbe5a9['id']);}return 0x0===_0x4010db[_0x1cfe05(0x1aa)]?null:_0x4010db;}[_0x44c243(0x1b1)](_0x1a2f0a,_0x1ca2f7,_0x592a83){const _0x2e0653=_0x44c243,_0x2f82d6=this[_0x2e0653(0x1d4)][_0x2e0653(0x16a)][_0x2e0653(0x1ba)](_0x53fe5f=>_0x53fe5f['id']===_0x1a2f0a);if(!_0x2f82d6)return;const _0x83ea6d=_0x2f82d6[_0x2e0653(0x1b8)][_0x2e0653(0x1ba)](_0xdb904e=>_0xdb904e['id']===_0x1ca2f7);_0x83ea6d&&(_0x83ea6d[_0x2e0653(0x1b9)]=_0x592a83,this[_0x2e0653(0x1cd)](_0x2e0653(0x17c),{'sourceId':_0x1a2f0a,'resourceId':_0x1ca2f7,'isInContext':_0x592a83}));}[_0x44c243(0x1d5)](_0x2230cb){const _0x5ceebf=_0x44c243;this[_0x5ceebf(0x1bc)][_0x5ceebf(0x161)](_0x2230cb,!0x0),this[_0x5ceebf(0x1bc)][_0x5ceebf(0x19a)]&&this[_0x5ceebf(0x1cd)](_0x5ceebf(0x15d),{'isUploadInProgress':!0x0});}[_0x44c243(0x191)](_0x552cb2){const _0xb51a6a=_0x44c243;this[_0xb51a6a(0x1bc)][_0xb51a6a(0x14f)](_0x552cb2),0x0===this[_0xb51a6a(0x1bc)][_0xb51a6a(0x19a)]&&this[_0xb51a6a(0x1cd)](_0xb51a6a(0x15d),{'isUploadInProgress':!0x1});}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- function _0xc181(){const _0x293d4d=['splice','stop','modification-delta','16nvuond','role','634963cBSzrY','indexOf','createReply','13492lmitQU','chatCapabilities','find','setConversationTitle','isCurrentDocumentInContext','updateCurrentDocument','ai-chat-conversation-init-failed','startConversation','addUrlToContext','_processMessagesToInteractions','error','appendContent','getCurrentDocumentContext','start','toggleReasoning','set','defaultModelId','ai-chat-conversation-already-started','chatContext','connector','currentReply','fetchConversationMessages','removeSelectionFromContext','interactions','handleUserInteraction','conversationInitialized','9318NAPzIP','getConversation','prompt','50748tzOEZY','17023188Bnvvix','updateCurrentDocumentInContext','getCapabilitiesConfig','load','5794668mSUnEG','interactionCreated','411EwaNYE','ai-chat-conversation-start-no-model-selected','reset','isSelectionInContext','modelSelected','content','push','getEditor','length','populateFromMessage','removeFromContext','title','toggleWebSearch','hasOwn','webSearch','conversationId','addCurrentDocumentToContext','removeInteraction','reasoning','sessionId','ai-chat-conversation-init-from-id-failed','fire','quickActionData','createInteraction','contextItems','attributes','setModel','text-delta','ai-chat-conversation-set-model-not-available','addFilesToContext','group','18WURIsW','ai-chat-conversation-set-model-null','user','type','message','init','50UArcil','capabilities','options','delegate','addSelectionToContext','ai-chat-handle-user-interaction-already-in-progress','isAvailable','getDocumentContext','ai-chat-handle-user-conversation-not-initialized','getInteraction','currentInteraction','destroy','27nOQgnK','isStarted','getDefault','addToConversationContext','conversationStarted','fetchConversation','loadSourceResources','ai-chat-conversation-start-failed','stack','11ETsmip','addResourceToContext','toLowerCase','text','assistant','model','_extractContextItems','selectedModel','getPendingContextItems','lastInteraction','getMessages','chatModels','getAll','isCurrentDocumentInConversation','864530TJIbVo'];_0xc181=function(){return _0x293d4d;};return _0xc181();}const _0x25544f=_0x13cf;(function(_0x543d03,_0x22bf7e){const _0x20e36e=_0x13cf,_0x1c6e0f=_0x543d03();while(!![]){try{const _0x1546d4=parseInt(_0x20e36e(0x181))/0x1*(-parseInt(_0x20e36e(0x158))/0x2)+-parseInt(_0x20e36e(0x162))/0x3*(parseInt(_0x20e36e(0x1b3))/0x4)+parseInt(_0x20e36e(0x187))/0x5*(parseInt(_0x20e36e(0x15b))/0x6)+-parseInt(_0x20e36e(0x1b0))/0x7*(-parseInt(_0x20e36e(0x1ae))/0x8)+-parseInt(_0x20e36e(0x193))/0x9*(parseInt(_0x20e36e(0x1aa))/0xa)+-parseInt(_0x20e36e(0x19c))/0xb*(parseInt(_0x20e36e(0x160))/0xc)+parseInt(_0x20e36e(0x15c))/0xd;if(_0x1546d4===_0x22bf7e)break;else _0x1c6e0f['push'](_0x1c6e0f['shift']());}catch(_0x46aec4){_0x1c6e0f['push'](_0x1c6e0f['shift']());}}}(_0xc181,0x4621f));import{CKEditorError as _0x334ab5,EmitterMixin as _0x20e33e}from'ckeditor5/src/utils.js';import{AI_MODEL_EVENT_NAMES as _0x24dc37}from'../../aicore/model/aiinteraction.js';import{AIChatContext as _0x5c679e,AI_CONTEXT_MODEL_EVENT_NAMES as _0x4a23a2}from'./aichatcontext.js';function _0x13cf(_0x320e18,_0x5e1720){const _0xc18126=_0xc181();return _0x13cf=function(_0x13cfe9,_0x532427){_0x13cfe9=_0x13cfe9-0x13f;let _0x2846c1=_0xc18126[_0x13cfe9];return _0x2846c1;},_0x13cf(_0x320e18,_0x5e1720);}import{AICapabilities as _0x1e6423,CAPABILITIES_MODEL_EVENT_NAMES as _0x10284d}from'../../aicore/model/aicapabilities.js';import{AIChatInteraction as _0x454031}from'./aichatinteraction.js';export class AIChatConversation extends _0x20e33e(){['id'];[_0x25544f(0x194)]=!0x1;[_0x25544f(0x155)]=[];[_0x25544f(0x191)];[_0x25544f(0x1a3)];[_0x25544f(0x151)];[_0x25544f(0x189)];constructor(_0x10eb66){const _0x36bcaf=_0x25544f;super(),this[_0x36bcaf(0x189)]=_0x10eb66,this[_0x36bcaf(0x151)]=_0x10eb66[_0x36bcaf(0x151)],this[_0x36bcaf(0x1a7)]=_0x10eb66[_0x36bcaf(0x1a7)],this['id']=_0x10eb66[_0x36bcaf(0x171)];}async[_0x25544f(0x186)](_0x54fa5f){const _0x4b972a=_0x25544f;try{this[_0x4b972a(0x150)]=new _0x5c679e({'connector':this[_0x4b972a(0x151)],'config':_0x54fa5f,'ownerId':this['id']}),this[_0x4b972a(0x150)][_0x4b972a(0x18a)](..._0x4a23a2)['to'](this),this[_0x4b972a(0x150)][_0x4b972a(0x186)](),this[_0x4b972a(0x13f)]=new _0x1e6423(),this[_0x4b972a(0x13f)][_0x4b972a(0x18a)](..._0x10284d)['to'](this),this[_0x4b972a(0x13f)][_0x4b972a(0x186)]();const _0x2de9a7=await this[_0x4b972a(0x1a7)][_0x4b972a(0x1a8)]();this[_0x4b972a(0x177)](_0x4b972a(0x157),{'availableModels':_0x2de9a7});const _0x42c731=await this[_0x4b972a(0x1a7)][_0x4b972a(0x195)](this[_0x4b972a(0x189)][_0x4b972a(0x14e)]);_0x42c731&&await this[_0x4b972a(0x17c)](_0x42c731);}catch(_0x4451e3){const _0x3c427e=new _0x334ab5(_0x4b972a(0x144),null,{'message':_0x4451e3[_0x4b972a(0x185)]});_0x3c427e[_0x4b972a(0x19b)]=_0x4451e3[_0x4b972a(0x19b)],this[_0x4b972a(0x177)](_0x4b972a(0x148),{'error':_0x3c427e});}}async[_0x25544f(0x14b)](){const _0x19d067=_0x25544f;if(this[_0x19d067(0x194)])throw new _0x334ab5(_0x19d067(0x14f),null,{'conversation':this});if(!this[_0x19d067(0x1a3)])throw new _0x334ab5(_0x19d067(0x163),null,{'conversation':this});try{const {id:_0x558d59}=await this[_0x19d067(0x151)][_0x19d067(0x145)](this['id'],this[_0x19d067(0x189)][_0x19d067(0x180)])[_0x19d067(0x159)]();this['id']=_0x558d59,this[_0x19d067(0x194)]=!0x0,this[_0x19d067(0x177)](_0x19d067(0x197),{'conversationId':this['id'],'selectedModel':this[_0x19d067(0x1a3)]});}catch(_0x5ad1b8){const _0x39f68b=new _0x334ab5(_0x19d067(0x19a),null,{'message':_0x5ad1b8[_0x19d067(0x185)]});_0x39f68b[_0x19d067(0x19b)]=_0x5ad1b8[_0x19d067(0x19b)],this[_0x19d067(0x177)](_0x19d067(0x148),{'error':_0x39f68b});}}async[_0x25544f(0x15f)](_0x48aa7b,_0x1305de){const _0x241b38=_0x25544f;try{const _0x5c7a79=await this[_0x241b38(0x151)][_0x241b38(0x198)](_0x48aa7b)[_0x241b38(0x159)](),_0x39b494=await this[_0x241b38(0x151)][_0x241b38(0x153)](_0x48aa7b)[_0x241b38(0x1a6)](),_0x3e02e3=_0x39b494[0x0][_0x241b38(0x1a1)];this[_0x241b38(0x194)]=!0x0,this['id']=_0x5c7a79['id'],_0x241b38(0x16d)in _0x5c7a79?this[_0x241b38(0x177)](_0x241b38(0x141),_0x5c7a79[_0x241b38(0x16d)],!0x0):this[_0x241b38(0x177)](_0x241b38(0x141),'',!0x0);const _0x39ce5d=(await this[_0x241b38(0x1a7)][_0x241b38(0x1a8)]())[_0x241b38(0x140)](_0x16ba48=>_0x16ba48['id'][_0x241b38(0x19e)]()===_0x3e02e3[_0x241b38(0x19e)]());return this[_0x241b38(0x1a3)]=_0x39ce5d,this[_0x241b38(0x177)](_0x241b38(0x166),{'selectedModel':_0x39ce5d,'isDisabled':!0x0}),await this[_0x241b38(0x147)](_0x39b494,_0x1305de,_0x3e02e3),this[_0x241b38(0x191)]=void 0x0,this;}catch(_0x1f4eef){const _0x27f676=new _0x334ab5(_0x241b38(0x176),null,{'message':_0x1f4eef[_0x241b38(0x185)],'conversationId':_0x48aa7b});throw _0x27f676[_0x241b38(0x19b)]=_0x1f4eef[_0x241b38(0x19b)],this[_0x241b38(0x177)](_0x241b38(0x148),{'error':_0x27f676}),_0x27f676;}}async[_0x25544f(0x147)](_0x30b1d7,_0x4155ac,_0x3b3cac){const _0x49d2cf=_0x25544f;let _0x1386ee;for(const _0x123c7c of _0x30b1d7)if(_0x49d2cf(0x183)===_0x123c7c[_0x49d2cf(0x1af)]){const _0x2fe18c=await this[_0x49d2cf(0x1a2)](_0x123c7c),_0x3da86d={'isReasoningEnabled':Object[_0x49d2cf(0x16f)](_0x123c7c[_0x49d2cf(0x188)],_0x49d2cf(0x174)),'isWebSearchEnabled':Object[_0x49d2cf(0x16f)](_0x123c7c[_0x49d2cf(0x188)],_0x49d2cf(0x170))};_0x1386ee=this[_0x49d2cf(0x179)]({'userMessage':_0x123c7c[_0x49d2cf(0x15a)],'contextItems':_0x2fe18c,'capabilities':_0x3da86d,'modelId':_0x3b3cac,'quickActionData':_0x123c7c[_0x49d2cf(0x17b)]?.[_0x49d2cf(0x178)]}),this[_0x49d2cf(0x191)]=_0x1386ee,this[_0x49d2cf(0x150)][_0x49d2cf(0x196)](this[_0x49d2cf(0x191)][_0x49d2cf(0x17a)]);}else{if(_0x49d2cf(0x1a0)===_0x123c7c[_0x49d2cf(0x1af)]&&_0x1386ee)for(const _0x5a2a42 of _0x123c7c[_0x49d2cf(0x167)]){const _0xdae60f=_0x49d2cf(0x19f)===_0x5a2a42[_0x49d2cf(0x184)]?_0x49d2cf(0x17d):_0x49d2cf(0x1ad),_0x2d9c10=_0x1386ee[_0x49d2cf(0x18e)]()?.[_0x49d2cf(0x175)]!==_0x4155ac;_0x1386ee[_0x49d2cf(0x152)]=_0x1386ee[_0x49d2cf(0x1b2)]({'type':_0xdae60f,'isDone':!0x0,'interactionId':_0x1386ee['id'],'areActionsDisabled':_0x2d9c10}),_0x1386ee[_0x49d2cf(0x152)][_0x49d2cf(0x149)](_0x5a2a42[_0x49d2cf(0x167)]);}}}async[_0x25544f(0x1a2)](_0x4d02bb){const _0x3030e2=_0x25544f,_0x93a7f6=new Map();if(!_0x4d02bb[_0x3030e2(0x167)])return _0x93a7f6;for(const _0x52b80c of _0x4d02bb[_0x3030e2(0x167)]){const _0x134a5c=await this[_0x3030e2(0x150)][_0x3030e2(0x16b)](_0x52b80c);_0x134a5c&&_0x93a7f6[_0x3030e2(0x14d)](_0x134a5c['id'],_0x134a5c);}return _0x93a7f6;}async[_0x25544f(0x156)]({userMessage:_0x2673f9,quickActionData:_0x1a497c}){const _0x12168f=_0x25544f;if(!this[_0x12168f(0x194)])throw new _0x334ab5(_0x12168f(0x18f),null,{'conversation':this});if(this[_0x12168f(0x191)])throw new _0x334ab5(_0x12168f(0x18c),null,{'conversation':this});try{const _0x13e346=this[_0x12168f(0x150)][_0x12168f(0x1a4)](),_0x4ee657=this[_0x12168f(0x13f)][_0x12168f(0x15e)](),_0x4aaac5=this[_0x12168f(0x1a3)]['id'];this[_0x12168f(0x191)]=this[_0x12168f(0x179)]({'userMessage':_0x2673f9,'contextItems':_0x13e346,'capabilities':_0x4ee657,'modelId':_0x4aaac5,'quickActionData':_0x1a497c}),await this[_0x12168f(0x191)][_0x12168f(0x14b)](),this[_0x12168f(0x150)][_0x12168f(0x196)](this[_0x12168f(0x191)][_0x12168f(0x17a)]);}catch(_0x12e5b2){this[_0x12168f(0x177)](_0x12168f(0x148),{'interactionId':this[_0x12168f(0x191)]?this[_0x12168f(0x191)]['id']:void 0x0,'error':_0x12e5b2});}finally{this[_0x12168f(0x191)]?.[_0x12168f(0x1ac)](),this[_0x12168f(0x191)]=void 0x0;}}[_0x25544f(0x179)]({userMessage:_0x2b826f,contextItems:_0x4620da,capabilities:_0x2272e2,modelId:_0xe07e36,quickActionData:_0x14dfce}){const _0x1e07b9=_0x25544f,_0xd91d5f=new _0x454031({'userMessage':_0x2b826f,'contextItems':_0x4620da,'capabilities':_0x2272e2,'conversationId':this['id'],'connector':this[_0x1e07b9(0x151)],'editor':this[_0x1e07b9(0x189)][_0x1e07b9(0x169)]&&this[_0x1e07b9(0x189)][_0x1e07b9(0x169)](),'model':_0xe07e36,'quickActionData':_0x14dfce});return _0xd91d5f[_0x1e07b9(0x18a)](..._0x24dc37)['to'](this),this[_0x1e07b9(0x155)][_0x1e07b9(0x168)](_0xd91d5f),this[_0x1e07b9(0x177)](_0x1e07b9(0x161),_0xd91d5f),_0xd91d5f;}[_0x25544f(0x190)](_0x3c4702){const _0x400aab=_0x25544f;return this[_0x400aab(0x155)][_0x400aab(0x140)](_0x526176=>_0x526176['id']===_0x3c4702);}[_0x25544f(0x173)](_0x219f7b){const _0x4f4ead=_0x25544f,_0xa6736a=this[_0x4f4ead(0x190)](_0x219f7b);_0xa6736a&&(_0xa6736a[_0x4f4ead(0x192)](),this[_0x4f4ead(0x155)][_0x4f4ead(0x1ab)](this[_0x4f4ead(0x155)][_0x4f4ead(0x1b1)](_0xa6736a),0x1));}get[_0x25544f(0x1a5)](){const _0x47ac67=_0x25544f;return this[_0x47ac67(0x155)][this[_0x47ac67(0x155)][_0x47ac67(0x16a)]-0x1];}[_0x25544f(0x172)](_0xf96a00){const _0x303df5=_0x25544f;this[_0x303df5(0x150)][_0x303df5(0x172)](_0xf96a00);}async[_0x25544f(0x15d)]({content:_0xd91ca,version:_0x4a8c24,sessionId:_0x4fa537,selections:_0x363237}){const _0x3ab0d8=_0x25544f;await this[_0x3ab0d8(0x150)][_0x3ab0d8(0x143)](_0xd91ca,_0x4a8c24,_0x4fa537,_0x363237);}[_0x25544f(0x14a)](){const _0x398b3b=_0x25544f;return this[_0x398b3b(0x191)]?.[_0x398b3b(0x18e)]()?.[_0x398b3b(0x167)]||'';}[_0x25544f(0x18b)](_0x2d711a){const _0x323587=_0x25544f;this[_0x323587(0x150)][_0x323587(0x18b)](_0x2d711a);}[_0x25544f(0x154)](){const _0x3065a7=_0x25544f;this[_0x3065a7(0x150)][_0x3065a7(0x154)]();}[_0x25544f(0x17f)](_0x34c14a){const _0x4ecc07=_0x25544f;this[_0x4ecc07(0x150)][_0x4ecc07(0x17f)](_0x34c14a);}[_0x25544f(0x146)](_0x52f1f5){const _0x243290=_0x25544f;this[_0x243290(0x150)][_0x243290(0x146)](_0x52f1f5);}[_0x25544f(0x19d)](_0x564490,_0x598e22){const _0xfc259c=_0x25544f;this[_0xfc259c(0x150)][_0xfc259c(0x19d)](_0x564490,_0x598e22);}[_0x25544f(0x199)](_0x48d9bd,_0x3bd68f,_0x5545b0){const _0x2bf399=_0x25544f;return this[_0x2bf399(0x150)][_0x2bf399(0x199)](_0x48d9bd,_0x3bd68f,_0x5545b0);}[_0x25544f(0x16c)](_0x424ce8){const _0x367953=_0x25544f;this[_0x367953(0x150)][_0x367953(0x16c)](_0x424ce8);}[_0x25544f(0x16e)](){const _0x125ac0=_0x25544f;this[_0x125ac0(0x13f)][_0x125ac0(0x16e)]();}[_0x25544f(0x14c)](){const _0x19a0f5=_0x25544f;this[_0x19a0f5(0x13f)][_0x19a0f5(0x14c)]();}[_0x25544f(0x142)](){const _0x4b821f=_0x25544f;return this[_0x4b821f(0x150)][_0x4b821f(0x142)]();}[_0x25544f(0x1a9)](){const _0x3fb77f=_0x25544f;return this[_0x3fb77f(0x150)][_0x3fb77f(0x1a9)]();}[_0x25544f(0x165)](){const _0x708eb7=_0x25544f;return this[_0x708eb7(0x150)][_0x708eb7(0x165)]();}async[_0x25544f(0x17c)](_0x29436c){const _0x2bbd66=_0x25544f;if(!_0x29436c)throw new _0x334ab5(_0x2bbd66(0x182),null,{'conversation':this});if(!0x1===await this[_0x2bbd66(0x1a7)][_0x2bbd66(0x18d)](_0x29436c))throw new _0x334ab5(_0x2bbd66(0x17e),null,{'conversation':this,'model':_0x29436c});_0x29436c['id']!==this[_0x2bbd66(0x1a3)]?.['id']&&(this[_0x2bbd66(0x1a3)]=_0x29436c,this[_0x2bbd66(0x13f)][_0x2bbd66(0x164)](),this[_0x2bbd66(0x177)](_0x2bbd66(0x166),{'selectedModel':_0x29436c}));}}
23
+ const _0xedcdd9=_0x2f30;(function(_0x35d998,_0x4bd3e9){const _0x204f3f=_0x2f30,_0x266f7a=_0x35d998();while(!![]){try{const _0x23911d=-parseInt(_0x204f3f(0x24e))/0x1+parseInt(_0x204f3f(0x215))/0x2+parseInt(_0x204f3f(0x21d))/0x3*(parseInt(_0x204f3f(0x210))/0x4)+-parseInt(_0x204f3f(0x22b))/0x5*(parseInt(_0x204f3f(0x223))/0x6)+parseInt(_0x204f3f(0x220))/0x7*(-parseInt(_0x204f3f(0x202))/0x8)+parseInt(_0x204f3f(0x236))/0x9*(parseInt(_0x204f3f(0x231))/0xa)+-parseInt(_0x204f3f(0x22d))/0xb;if(_0x23911d===_0x4bd3e9)break;else _0x266f7a['push'](_0x266f7a['shift']());}catch(_0x3e70bd){_0x266f7a['push'](_0x266f7a['shift']());}}}(_0xd220,0xc025f));import{CKEditorError as _0x544313,EmitterMixin as _0x3529a7}from'ckeditor5/src/utils.js';import{AI_MODEL_EVENT_NAMES as _0xe80368}from'../../aicore/model/aiinteraction.js';import{AIChatContext as _0x322f6f,AI_CONTEXT_MODEL_EVENT_NAMES as _0x301dd7}from'./aichatcontext.js';import{AICapabilities as _0x191051,CAPABILITIES_MODEL_EVENT_NAMES as _0x47d5b7}from'../../aicore/model/aicapabilities.js';function _0xd220(){const _0x40d12d=['createReply','stop','reasoning','reset','model','isSelectionInContext','webSearch','appendContent','length','addToConversationContext','sessionId','assistant','hasOwn','type','createInteraction','setConversationTitle','getDocumentContext','lastInteraction','chatContext','ai-chat-conversation-already-started','getMessages','updateCurrentDocument','1832OHaCNa','delegate','stack','chatCapabilities','ai-chat-conversation-start-failed','error','startConversation','addCurrentDocumentToContext','fire','_extractContextItems','updateCurrentDocumentInContext','loadSourceResources','removeInteraction','populateFromMessage','1996PMrECW','text','destroy','addUrlToContext','interactionCreated','2383112aPhMYa','setModel','role','find','ai-chat-conversation-set-model-not-available','modelSelected','getEditor','title','8967AsuAhP','interactions','text-delta','14602rHdgtW','start','fetchConversation','1218gXeCQs','push','addSelectionToContext','getAll','load','addResourceToContext','handleUserInteraction','currentInteraction','13190WLSgye','options','11466829XkQtYQ','getPendingContextItems','getCurrentDocumentContext','currentReply','12340whShYH','ai-chat-conversation-set-model-null','toggleWebSearch','contextItems','defaultModelId','4644HhWIBw','group','connector','message','toLowerCase','toggleReasoning','indexOf','isStarted','fetchConversationMessages','quickActionData','conversationId','getConversation','_processMessagesToInteractions','ai-chat-handle-user-conversation-not-initialized','ai-chat-conversation-init-failed','chatModels','conversationStarted','attributes','addFilesToContext','user','removeFromContext','conversationInitialized','set','removeSelectionFromContext','477125bgCFXt','prompt','init','isCurrentDocumentInContext','splice','content','getInteraction','ai-chat-conversation-init-from-id-failed','ai-chat-conversation-start-no-model-selected','getCapabilitiesConfig','ai-chat-handle-user-interaction-already-in-progress','selectedModel','capabilities','isAvailable','getDefault','isCurrentDocumentInConversation','modification-delta'];_0xd220=function(){return _0x40d12d;};return _0xd220();}function _0x2f30(_0x4c9bdf,_0x242041){const _0xd2207c=_0xd220();return _0x2f30=function(_0x2f30d4,_0x1c3c64){_0x2f30d4=_0x2f30d4-0x1dd;let _0x1b9971=_0xd2207c[_0x2f30d4];return _0x1b9971;},_0x2f30(_0x4c9bdf,_0x242041);}import{AIChatInteraction as _0x167245}from'./aichatinteraction.js';export class AIChatConversation extends _0x3529a7(){['id'];[_0xedcdd9(0x23d)]=!0x1;[_0xedcdd9(0x21e)]=[];[_0xedcdd9(0x22a)];[_0xedcdd9(0x1e6)];[_0xedcdd9(0x238)];[_0xedcdd9(0x22c)];constructor(_0x5bb9ba){const _0x267f12=_0xedcdd9;super(),this[_0x267f12(0x22c)]=_0x5bb9ba,this[_0x267f12(0x238)]=_0x5bb9ba[_0x267f12(0x238)],this[_0x267f12(0x245)]=_0x5bb9ba[_0x267f12(0x245)],this['id']=_0x5bb9ba[_0x267f12(0x240)];}async[_0xedcdd9(0x1dd)](_0x4036cf){const _0x2221de=_0xedcdd9;try{this[_0x2221de(0x1fe)]=new _0x322f6f({'connector':this[_0x2221de(0x238)],'config':_0x4036cf,'ownerId':this['id']}),this[_0x2221de(0x1fe)][_0x2221de(0x203)](..._0x301dd7)['to'](this),this[_0x2221de(0x1fe)][_0x2221de(0x1dd)](),this[_0x2221de(0x205)]=new _0x191051(),this[_0x2221de(0x205)][_0x2221de(0x203)](..._0x47d5b7)['to'](this),this[_0x2221de(0x205)][_0x2221de(0x1dd)]();const _0x55184f=await this[_0x2221de(0x245)][_0x2221de(0x226)]();this[_0x2221de(0x20a)](_0x2221de(0x24b),{'availableModels':_0x55184f});const _0x3b9591=await this[_0x2221de(0x245)][_0x2221de(0x1e9)](this[_0x2221de(0x22c)][_0x2221de(0x235)]);_0x3b9591&&await this[_0x2221de(0x216)](_0x3b9591);}catch(_0x178adc){const _0x49e503=new _0x544313(_0x2221de(0x244),null,{'message':_0x178adc[_0x2221de(0x239)]});_0x49e503[_0x2221de(0x204)]=_0x178adc[_0x2221de(0x204)],this[_0x2221de(0x20a)](_0x2221de(0x207),{'error':_0x49e503});}}async[_0xedcdd9(0x221)](){const _0xf4cafc=_0xedcdd9;if(this[_0xf4cafc(0x23d)])throw new _0x544313(_0xf4cafc(0x1ff),null,{'conversation':this});if(!this[_0xf4cafc(0x1e6)])throw new _0x544313(_0xf4cafc(0x1e3),null,{'conversation':this});try{const {id:_0x4814c7}=await this[_0xf4cafc(0x238)][_0xf4cafc(0x208)](this['id'],this[_0xf4cafc(0x22c)][_0xf4cafc(0x237)])[_0xf4cafc(0x241)]();this['id']=_0x4814c7,this[_0xf4cafc(0x23d)]=!0x0,this[_0xf4cafc(0x20a)](_0xf4cafc(0x246),{'conversationId':this['id'],'selectedModel':this[_0xf4cafc(0x1e6)]});}catch(_0x2a4990){const _0xf81b2d=new _0x544313(_0xf4cafc(0x206),null,{'message':_0x2a4990[_0xf4cafc(0x239)]});_0xf81b2d[_0xf4cafc(0x204)]=_0x2a4990[_0xf4cafc(0x204)],this[_0xf4cafc(0x20a)](_0xf4cafc(0x207),{'error':_0xf81b2d});}}async[_0xedcdd9(0x227)](_0x317987,_0x2c7f15){const _0xbd5bb2=_0xedcdd9;try{const _0x5650bb=await this[_0xbd5bb2(0x238)][_0xbd5bb2(0x222)](_0x317987)[_0xbd5bb2(0x241)](),_0x20cf8f=await this[_0xbd5bb2(0x238)][_0xbd5bb2(0x23e)](_0x317987)[_0xbd5bb2(0x200)](),_0x52cb7d=_0x20cf8f[0x0][_0xbd5bb2(0x1f0)];this[_0xbd5bb2(0x23d)]=!0x0,this['id']=_0x5650bb['id'],_0xbd5bb2(0x21c)in _0x5650bb?this[_0xbd5bb2(0x20a)](_0xbd5bb2(0x1fb),_0x5650bb[_0xbd5bb2(0x21c)],!0x0):this[_0xbd5bb2(0x20a)](_0xbd5bb2(0x1fb),'',!0x0);const _0x266591=(await this[_0xbd5bb2(0x245)][_0xbd5bb2(0x226)]())[_0xbd5bb2(0x218)](_0x33ab89=>_0x33ab89['id'][_0xbd5bb2(0x23a)]()===_0x52cb7d[_0xbd5bb2(0x23a)]());return this[_0xbd5bb2(0x1e6)]=_0x266591,this[_0xbd5bb2(0x20a)](_0xbd5bb2(0x21a),{'selectedModel':_0x266591,'isDisabled':!0x0}),await this[_0xbd5bb2(0x242)](_0x20cf8f,_0x2c7f15,_0x52cb7d),this[_0xbd5bb2(0x22a)]=void 0x0,this;}catch(_0x42b6e5){const _0x28f9d7=new _0x544313(_0xbd5bb2(0x1e2),null,{'message':_0x42b6e5[_0xbd5bb2(0x239)],'conversationId':_0x317987});throw _0x28f9d7[_0xbd5bb2(0x204)]=_0x42b6e5[_0xbd5bb2(0x204)],this[_0xbd5bb2(0x20a)](_0xbd5bb2(0x207),{'error':_0x28f9d7}),_0x28f9d7;}}async[_0xedcdd9(0x242)](_0x3841b4,_0x356545,_0x222dcb){const _0x152084=_0xedcdd9;let _0x212717;for(const _0x4ab9fc of _0x3841b4)if(_0x152084(0x249)===_0x4ab9fc[_0x152084(0x217)]){const _0x315c91=await this[_0x152084(0x20b)](_0x4ab9fc),_0x467e7b={'isReasoningEnabled':Object[_0x152084(0x1f8)](_0x4ab9fc[_0x152084(0x1e7)],_0x152084(0x1ee)),'isWebSearchEnabled':Object[_0x152084(0x1f8)](_0x4ab9fc[_0x152084(0x1e7)],_0x152084(0x1f2))};_0x212717=this[_0x152084(0x1fa)]({'userMessage':_0x4ab9fc[_0x152084(0x24f)],'contextItems':_0x315c91,'capabilities':_0x467e7b,'modelId':_0x222dcb,'quickActionData':_0x4ab9fc[_0x152084(0x247)]?.[_0x152084(0x23f)]}),this[_0x152084(0x22a)]=_0x212717,this[_0x152084(0x1fe)][_0x152084(0x1f5)](this[_0x152084(0x22a)][_0x152084(0x234)]);}else{if(_0x152084(0x1f7)===_0x4ab9fc[_0x152084(0x217)]&&_0x212717)for(const _0x41a27c of _0x4ab9fc[_0x152084(0x1e0)]){const _0x21b3b6=_0x152084(0x211)===_0x41a27c[_0x152084(0x1f9)]?_0x152084(0x21f):_0x152084(0x1eb),_0xd46608=_0x212717[_0x152084(0x1fc)]()?.[_0x152084(0x1f6)]!==_0x356545;_0x212717[_0x152084(0x230)]=_0x212717[_0x152084(0x1ec)]({'type':_0x21b3b6,'isDone':!0x0,'interactionId':_0x212717['id'],'areActionsDisabled':_0xd46608}),_0x212717[_0x152084(0x230)][_0x152084(0x1f3)](_0x41a27c[_0x152084(0x1e0)]);}}}async[_0xedcdd9(0x20b)](_0x35ab3c){const _0x38803d=_0xedcdd9,_0x3adf6d=new Map();if(!_0x35ab3c[_0x38803d(0x1e0)])return _0x3adf6d;for(const _0x3bb44d of _0x35ab3c[_0x38803d(0x1e0)]){const _0x42b841=await this[_0x38803d(0x1fe)][_0x38803d(0x20f)](_0x3bb44d);_0x42b841&&_0x3adf6d[_0x38803d(0x24c)](_0x42b841['id'],_0x42b841);}return _0x3adf6d;}async[_0xedcdd9(0x229)]({userMessage:_0x21c180,quickActionData:_0x53cb5b}){const _0xcc183=_0xedcdd9;if(!this[_0xcc183(0x23d)])throw new _0x544313(_0xcc183(0x243),null,{'conversation':this});if(this[_0xcc183(0x22a)])throw new _0x544313(_0xcc183(0x1e5),null,{'conversation':this});try{const _0x3ac040=this[_0xcc183(0x1fe)][_0xcc183(0x22e)](),_0x57dd1d=this[_0xcc183(0x205)][_0xcc183(0x1e4)](),_0x59c87a=this[_0xcc183(0x1e6)]['id'];this[_0xcc183(0x22a)]=this[_0xcc183(0x1fa)]({'userMessage':_0x21c180,'contextItems':_0x3ac040,'capabilities':_0x57dd1d,'modelId':_0x59c87a,'quickActionData':_0x53cb5b}),await this[_0xcc183(0x22a)][_0xcc183(0x221)](),this[_0xcc183(0x1fe)][_0xcc183(0x1f5)](this[_0xcc183(0x22a)][_0xcc183(0x234)]);}catch(_0x16c375){this[_0xcc183(0x20a)](_0xcc183(0x207),{'interactionId':this[_0xcc183(0x22a)]?this[_0xcc183(0x22a)]['id']:void 0x0,'error':_0x16c375});}finally{this[_0xcc183(0x22a)]?.[_0xcc183(0x1ed)](),this[_0xcc183(0x22a)]=void 0x0;}}[_0xedcdd9(0x1fa)]({userMessage:_0x1c9f2a,contextItems:_0x32dfcd,capabilities:_0x20030d,modelId:_0x225757,quickActionData:_0xc5d4c5}){const _0x16ed16=_0xedcdd9,_0x3612b1=new _0x167245({'userMessage':_0x1c9f2a,'contextItems':_0x32dfcd,'capabilities':_0x20030d,'conversationId':this['id'],'connector':this[_0x16ed16(0x238)],'editor':this[_0x16ed16(0x22c)][_0x16ed16(0x21b)]&&this[_0x16ed16(0x22c)][_0x16ed16(0x21b)](),'model':_0x225757,'quickActionData':_0xc5d4c5});return _0x3612b1[_0x16ed16(0x203)](..._0xe80368)['to'](this),this[_0x16ed16(0x21e)][_0x16ed16(0x224)](_0x3612b1),this[_0x16ed16(0x20a)](_0x16ed16(0x214),_0x3612b1),_0x3612b1;}[_0xedcdd9(0x1e1)](_0x54dd2a){const _0x53954e=_0xedcdd9;return this[_0x53954e(0x21e)][_0x53954e(0x218)](_0x532869=>_0x532869['id']===_0x54dd2a);}[_0xedcdd9(0x20e)](_0x4ce8db){const _0x4736eb=_0xedcdd9,_0x3f3b6d=this[_0x4736eb(0x1e1)](_0x4ce8db);_0x3f3b6d&&(_0x3f3b6d[_0x4736eb(0x212)](),this[_0x4736eb(0x21e)][_0x4736eb(0x1df)](this[_0x4736eb(0x21e)][_0x4736eb(0x23c)](_0x3f3b6d),0x1));}get[_0xedcdd9(0x1fd)](){const _0x5585c8=_0xedcdd9;return this[_0x5585c8(0x21e)][this[_0x5585c8(0x21e)][_0x5585c8(0x1f4)]-0x1];}[_0xedcdd9(0x209)](_0x4a3de0){const _0x3ddbfe=_0xedcdd9;this[_0x3ddbfe(0x1fe)][_0x3ddbfe(0x209)](_0x4a3de0);}async[_0xedcdd9(0x20c)]({content:_0x394a40,version:_0x1537bc,sessionId:_0x17be2f,selections:_0x143492}){const _0xf6a041=_0xedcdd9;await this[_0xf6a041(0x1fe)][_0xf6a041(0x201)](_0x394a40,_0x1537bc,_0x17be2f,_0x143492);}[_0xedcdd9(0x22f)](){const _0x2d6d70=_0xedcdd9;return this[_0x2d6d70(0x22a)]?.[_0x2d6d70(0x1fc)]()?.[_0x2d6d70(0x1e0)]||'';}[_0xedcdd9(0x225)](_0x57ffef){const _0x3b0ef8=_0xedcdd9;this[_0x3b0ef8(0x1fe)][_0x3b0ef8(0x225)](_0x57ffef);}[_0xedcdd9(0x24d)](){const _0x34f210=_0xedcdd9;this[_0x34f210(0x1fe)][_0x34f210(0x24d)]();}[_0xedcdd9(0x248)](_0x1398e1){const _0x59234b=_0xedcdd9;this[_0x59234b(0x1fe)][_0x59234b(0x248)](_0x1398e1);}[_0xedcdd9(0x213)](_0x1a722f){const _0x2fe85f=_0xedcdd9;this[_0x2fe85f(0x1fe)][_0x2fe85f(0x213)](_0x1a722f);}[_0xedcdd9(0x228)](_0x3cf241,_0x53c079){const _0x728f8f=_0xedcdd9;this[_0x728f8f(0x1fe)][_0x728f8f(0x228)](_0x3cf241,_0x53c079);}[_0xedcdd9(0x20d)](_0x5c1d02,_0x1c5593,_0x29a7ab){const _0x35258f=_0xedcdd9;return this[_0x35258f(0x1fe)][_0x35258f(0x20d)](_0x5c1d02,_0x1c5593,_0x29a7ab);}[_0xedcdd9(0x24a)](_0x35aea5){const _0x5f1055=_0xedcdd9;this[_0x5f1055(0x1fe)][_0x5f1055(0x24a)](_0x35aea5);}[_0xedcdd9(0x233)](){const _0x5b0dd7=_0xedcdd9;this[_0x5b0dd7(0x205)][_0x5b0dd7(0x233)]();}[_0xedcdd9(0x23b)](){const _0x56e128=_0xedcdd9;this[_0x56e128(0x205)][_0x56e128(0x23b)]();}[_0xedcdd9(0x1de)](){const _0x314fa0=_0xedcdd9;return this[_0x314fa0(0x1fe)][_0x314fa0(0x1de)]();}[_0xedcdd9(0x1ea)](){const _0x42d237=_0xedcdd9;return this[_0x42d237(0x1fe)][_0x42d237(0x1ea)]();}[_0xedcdd9(0x1f1)](){const _0x1fdd3e=_0xedcdd9;return this[_0x1fdd3e(0x1fe)][_0x1fdd3e(0x1f1)]();}async[_0xedcdd9(0x216)](_0x4adb2a){const _0x3dde32=_0xedcdd9;if(!_0x4adb2a)throw new _0x544313(_0x3dde32(0x232),null,{'conversation':this});if(!0x1===await this[_0x3dde32(0x245)][_0x3dde32(0x1e8)](_0x4adb2a))throw new _0x544313(_0x3dde32(0x219),null,{'conversation':this,'model':_0x4adb2a});_0x4adb2a['id']!==this[_0x3dde32(0x1e6)]?.['id']&&(this[_0x3dde32(0x1e6)]=_0x4adb2a,this[_0x3dde32(0x205)][_0x3dde32(0x1ef)](),this[_0x3dde32(0x20a)](_0x3dde32(0x21a),{'selectedModel':_0x4adb2a}));}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- function _0x8bb3(){var _0x11f6ca=['userMessage','queryAssistant','385872EYSaCE','connector','conversationId','getDocumentContext','7073552fPrulB','4250862BXMCpc','8337096PWZkQe','mapContextItemsToRequestData','contextItems','4967753MnJWMD','9lwbkLr','121504uGiMHJ','sendRequest','8OMgUGa','current-document','getCapabilitiesRequestData','capabilities','70bwFueC','model','13yWLOYS','2bFahQV','30oBDrsi','quickActionData','get','87198OdQhqe'];_0x8bb3=function(){return _0x11f6ca;};return _0x8bb3();}var _0x9e3783=_0x2773;(function(_0x117e79,_0x5387e9){var _0x1dc024=_0x2773,_0x5f2965=_0x117e79();while(!![]){try{var _0x947e4f=parseInt(_0x1dc024(0xe6))/0x1*(-parseInt(_0x1dc024(0xef))/0x2)+-parseInt(_0x1dc024(0xf3))/0x3*(parseInt(_0x1dc024(0xe8))/0x4)+parseInt(_0x1dc024(0xec))/0x5*(-parseInt(_0x1dc024(0xf6))/0x6)+parseInt(_0x1dc024(0xe4))/0x7+-parseInt(_0x1dc024(0xfa))/0x8*(parseInt(_0x1dc024(0xe5))/0x9)+-parseInt(_0x1dc024(0xf0))/0xa*(-parseInt(_0x1dc024(0xfb))/0xb)+parseInt(_0x1dc024(0xfc))/0xc*(parseInt(_0x1dc024(0xee))/0xd);if(_0x947e4f===_0x5387e9)break;else _0x5f2965['push'](_0x5f2965['shift']());}catch(_0x44c8cd){_0x5f2965['push'](_0x5f2965['shift']());}}}(_0x8bb3,0x9260d));import{AICapabilities as _0x3c4114}from'../../aicore/model/aicapabilities.js';function _0x2773(_0xef7b9b,_0x2a5a2c){var _0x8bb380=_0x8bb3();return _0x2773=function(_0x277318,_0x559150){_0x277318=_0x277318-0xe2;var _0x27cb09=_0x8bb380[_0x277318];return _0x27cb09;},_0x2773(_0xef7b9b,_0x2a5a2c);}import{AIInteraction as _0x3fcaea}from'../../aicore/model/aiinteraction.js';import{AIChatContext as _0x12feaf}from'./aichatcontext.js';export class AIChatInteraction extends _0x3fcaea{[_0x9e3783(0xf4)];[_0x9e3783(0xf8)];[_0x9e3783(0xe3)]=new Map();[_0x9e3783(0xed)];[_0x9e3783(0xf1)];constructor(_0x218eef){var _0x250014=_0x9e3783;super(_0x218eef),this[_0x250014(0xf8)]=_0x218eef[_0x250014(0xf8)],this[_0x250014(0xe3)]=_0x218eef[_0x250014(0xe3)],this[_0x250014(0xeb)]=_0x218eef[_0x250014(0xeb)],this[_0x250014(0xf4)]=_0x218eef[_0x250014(0xf4)],this[_0x250014(0xed)]=_0x218eef[_0x250014(0xed)],this[_0x250014(0xf1)]=_0x218eef[_0x250014(0xf1)];}async[_0x9e3783(0xe7)](){var _0x2b1e4e=_0x9e3783;return this[_0x2b1e4e(0xf7)][_0x2b1e4e(0xf5)]({'message':this[_0x2b1e4e(0xf4)],'conversationId':this[_0x2b1e4e(0xf8)],'parts':_0x12feaf[_0x2b1e4e(0xe2)](this[_0x2b1e4e(0xe3)]),'capabilities':_0x3c4114[_0x2b1e4e(0xea)](this[_0x2b1e4e(0xeb)]),'model':this[_0x2b1e4e(0xed)],'quickActionData':this[_0x2b1e4e(0xf1)]});}[_0x9e3783(0xf9)](){var _0x52c409=_0x9e3783;return this[_0x52c409(0xe3)][_0x52c409(0xf2)](_0x52c409(0xe9));}}
23
+ var _0x4bf76e=_0x44db;(function(_0x4ddda4,_0x2a5266){var _0x1a0940=_0x44db,_0x3d6b86=_0x4ddda4();while(!![]){try{var _0x35640a=parseInt(_0x1a0940(0xb5))/0x1*(-parseInt(_0x1a0940(0xb0))/0x2)+-parseInt(_0x1a0940(0xba))/0x3+-parseInt(_0x1a0940(0xa3))/0x4*(parseInt(_0x1a0940(0xa4))/0x5)+parseInt(_0x1a0940(0xb3))/0x6*(parseInt(_0x1a0940(0xaf))/0x7)+parseInt(_0x1a0940(0xaa))/0x8+-parseInt(_0x1a0940(0xb2))/0x9+parseInt(_0x1a0940(0xac))/0xa*(parseInt(_0x1a0940(0xa5))/0xb);if(_0x35640a===_0x2a5266)break;else _0x3d6b86['push'](_0x3d6b86['shift']());}catch(_0x3bdc3b){_0x3d6b86['push'](_0x3d6b86['shift']());}}}(_0x4d3a,0xf1444));function _0x44db(_0xf111e0,_0x13042b){var _0x4d3af6=_0x4d3a();return _0x44db=function(_0x44db70,_0x41a6dc){_0x44db70=_0x44db70-0xa2;var _0x111061=_0x4d3af6[_0x44db70];return _0x111061;},_0x44db(_0xf111e0,_0x13042b);}import{AICapabilities as _0x342926}from'../../aicore/model/aicapabilities.js';import{AIInteraction as _0x3a5996}from'../../aicore/model/aiinteraction.js';import{AIChatContext as _0x255e58}from'./aichatcontext.js';export class AIChatInteraction extends _0x3a5996{[_0x4bf76e(0xae)];[_0x4bf76e(0xb4)];[_0x4bf76e(0xa2)]=new Map();[_0x4bf76e(0xa9)];[_0x4bf76e(0xa7)];constructor(_0x7fa1c3){var _0x58702d=_0x4bf76e;super(_0x7fa1c3),this[_0x58702d(0xb4)]=_0x7fa1c3[_0x58702d(0xb4)],this[_0x58702d(0xa2)]=_0x7fa1c3[_0x58702d(0xa2)],this[_0x58702d(0xb1)]=_0x7fa1c3[_0x58702d(0xb1)],this[_0x58702d(0xae)]=_0x7fa1c3[_0x58702d(0xae)],this[_0x58702d(0xa9)]=_0x7fa1c3[_0x58702d(0xa9)],this[_0x58702d(0xa7)]=_0x7fa1c3[_0x58702d(0xa7)];}async[_0x4bf76e(0xa6)](){var _0x4e8c1b=_0x4bf76e;return this[_0x4e8c1b(0xb8)][_0x4e8c1b(0xb9)]({'message':this[_0x4e8c1b(0xae)],'conversationId':this[_0x4e8c1b(0xb4)],'parts':_0x255e58[_0x4e8c1b(0xb7)](this[_0x4e8c1b(0xa2)]),'capabilities':_0x342926[_0x4e8c1b(0xad)](this[_0x4e8c1b(0xb1)]),'model':this[_0x4e8c1b(0xa9)],'quickActionData':this[_0x4e8c1b(0xa7)]});}[_0x4bf76e(0xb6)](){var _0x28a431=_0x4bf76e;return this[_0x28a431(0xa2)][_0x28a431(0xab)](_0x28a431(0xa8));}}function _0x4d3a(){var _0x217c32=['386290CUhtAH','getCapabilitiesRequestData','userMessage','16779geugBb','958YpDNBz','capabilities','10973016RIGYpN','1398zhuCSr','conversationId','3844TDqWYg','getDocumentContext','mapContextItemsToRequestData','connector','queryAssistant','478929gSGWzh','contextItems','4RYDnMh','6519125LjZYnE','1309KvDnix','sendRequest','quickActionData','current-document','model','2854752yzmnoW','get'];_0x4d3a=function(){return _0x217c32;};return _0x4d3a();}