@ckeditor/ckeditor5-ai 47.7.2 → 47.7.3-alpha.0

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 (318) hide show
  1. package/build/ai.js +1 -1
  2. package/dist/index.js +5 -5
  3. package/dist/translations/af.js +1 -1
  4. package/dist/translations/af.umd.js +1 -1
  5. package/dist/translations/ar.js +1 -1
  6. package/dist/translations/ar.umd.js +1 -1
  7. package/dist/translations/ast.js +1 -1
  8. package/dist/translations/ast.umd.js +1 -1
  9. package/dist/translations/az.js +1 -1
  10. package/dist/translations/az.umd.js +1 -1
  11. package/dist/translations/be.js +1 -1
  12. package/dist/translations/be.umd.js +1 -1
  13. package/dist/translations/bg.js +1 -1
  14. package/dist/translations/bg.umd.js +1 -1
  15. package/dist/translations/bn.js +1 -1
  16. package/dist/translations/bn.umd.js +1 -1
  17. package/dist/translations/bs.js +1 -1
  18. package/dist/translations/bs.umd.js +1 -1
  19. package/dist/translations/ca.js +1 -1
  20. package/dist/translations/ca.umd.js +1 -1
  21. package/dist/translations/cs.js +1 -1
  22. package/dist/translations/cs.umd.js +1 -1
  23. package/dist/translations/da.js +1 -1
  24. package/dist/translations/da.umd.js +1 -1
  25. package/dist/translations/de-ch.js +1 -1
  26. package/dist/translations/de-ch.umd.js +1 -1
  27. package/dist/translations/de.js +1 -1
  28. package/dist/translations/de.umd.js +1 -1
  29. package/dist/translations/el.js +1 -1
  30. package/dist/translations/el.umd.js +1 -1
  31. package/dist/translations/en-au.js +1 -1
  32. package/dist/translations/en-au.umd.js +1 -1
  33. package/dist/translations/en-gb.js +1 -1
  34. package/dist/translations/en-gb.umd.js +1 -1
  35. package/dist/translations/en.js +1 -1
  36. package/dist/translations/en.umd.js +1 -1
  37. package/dist/translations/eo.js +1 -1
  38. package/dist/translations/eo.umd.js +1 -1
  39. package/dist/translations/es-co.js +1 -1
  40. package/dist/translations/es-co.umd.js +1 -1
  41. package/dist/translations/es.js +1 -1
  42. package/dist/translations/es.umd.js +1 -1
  43. package/dist/translations/et.js +1 -1
  44. package/dist/translations/et.umd.js +1 -1
  45. package/dist/translations/eu.js +1 -1
  46. package/dist/translations/eu.umd.js +1 -1
  47. package/dist/translations/fa.js +1 -1
  48. package/dist/translations/fa.umd.js +1 -1
  49. package/dist/translations/fi.js +1 -1
  50. package/dist/translations/fi.umd.js +1 -1
  51. package/dist/translations/fr.js +1 -1
  52. package/dist/translations/fr.umd.js +1 -1
  53. package/dist/translations/gl.js +1 -1
  54. package/dist/translations/gl.umd.js +1 -1
  55. package/dist/translations/gu.js +1 -1
  56. package/dist/translations/gu.umd.js +1 -1
  57. package/dist/translations/he.js +1 -1
  58. package/dist/translations/he.umd.js +1 -1
  59. package/dist/translations/hi.js +1 -1
  60. package/dist/translations/hi.umd.js +1 -1
  61. package/dist/translations/hr.js +1 -1
  62. package/dist/translations/hr.umd.js +1 -1
  63. package/dist/translations/hu.js +1 -1
  64. package/dist/translations/hu.umd.js +1 -1
  65. package/dist/translations/hy.js +1 -1
  66. package/dist/translations/hy.umd.js +1 -1
  67. package/dist/translations/id.js +1 -1
  68. package/dist/translations/id.umd.js +1 -1
  69. package/dist/translations/it.js +1 -1
  70. package/dist/translations/it.umd.js +1 -1
  71. package/dist/translations/ja.js +1 -1
  72. package/dist/translations/ja.umd.js +1 -1
  73. package/dist/translations/jv.js +1 -1
  74. package/dist/translations/jv.umd.js +1 -1
  75. package/dist/translations/kk.js +1 -1
  76. package/dist/translations/kk.umd.js +1 -1
  77. package/dist/translations/km.js +1 -1
  78. package/dist/translations/km.umd.js +1 -1
  79. package/dist/translations/kn.js +1 -1
  80. package/dist/translations/kn.umd.js +1 -1
  81. package/dist/translations/ko.js +1 -1
  82. package/dist/translations/ko.umd.js +1 -1
  83. package/dist/translations/ku.js +1 -1
  84. package/dist/translations/ku.umd.js +1 -1
  85. package/dist/translations/lt.js +1 -1
  86. package/dist/translations/lt.umd.js +1 -1
  87. package/dist/translations/lv.js +1 -1
  88. package/dist/translations/lv.umd.js +1 -1
  89. package/dist/translations/ms.js +1 -1
  90. package/dist/translations/ms.umd.js +1 -1
  91. package/dist/translations/nb.js +1 -1
  92. package/dist/translations/nb.umd.js +1 -1
  93. package/dist/translations/ne.js +1 -1
  94. package/dist/translations/ne.umd.js +1 -1
  95. package/dist/translations/nl.js +1 -1
  96. package/dist/translations/nl.umd.js +1 -1
  97. package/dist/translations/no.js +1 -1
  98. package/dist/translations/no.umd.js +1 -1
  99. package/dist/translations/oc.js +1 -1
  100. package/dist/translations/oc.umd.js +1 -1
  101. package/dist/translations/pl.js +1 -1
  102. package/dist/translations/pl.umd.js +1 -1
  103. package/dist/translations/pt-br.js +1 -1
  104. package/dist/translations/pt-br.umd.js +1 -1
  105. package/dist/translations/pt.js +1 -1
  106. package/dist/translations/pt.umd.js +1 -1
  107. package/dist/translations/ro.js +1 -1
  108. package/dist/translations/ro.umd.js +1 -1
  109. package/dist/translations/ru.js +1 -1
  110. package/dist/translations/ru.umd.js +1 -1
  111. package/dist/translations/si.js +1 -1
  112. package/dist/translations/si.umd.js +1 -1
  113. package/dist/translations/sk.js +1 -1
  114. package/dist/translations/sk.umd.js +1 -1
  115. package/dist/translations/sl.js +1 -1
  116. package/dist/translations/sl.umd.js +1 -1
  117. package/dist/translations/sq.js +1 -1
  118. package/dist/translations/sq.umd.js +1 -1
  119. package/dist/translations/sr-latn.js +1 -1
  120. package/dist/translations/sr-latn.umd.js +1 -1
  121. package/dist/translations/sr.js +1 -1
  122. package/dist/translations/sr.umd.js +1 -1
  123. package/dist/translations/sv.js +1 -1
  124. package/dist/translations/sv.umd.js +1 -1
  125. package/dist/translations/th.js +1 -1
  126. package/dist/translations/th.umd.js +1 -1
  127. package/dist/translations/ti.js +1 -1
  128. package/dist/translations/ti.umd.js +1 -1
  129. package/dist/translations/tk.js +1 -1
  130. package/dist/translations/tk.umd.js +1 -1
  131. package/dist/translations/tr.js +1 -1
  132. package/dist/translations/tr.umd.js +1 -1
  133. package/dist/translations/tt.js +1 -1
  134. package/dist/translations/tt.umd.js +1 -1
  135. package/dist/translations/ug.js +1 -1
  136. package/dist/translations/ug.umd.js +1 -1
  137. package/dist/translations/uk.js +1 -1
  138. package/dist/translations/uk.umd.js +1 -1
  139. package/dist/translations/ur.js +1 -1
  140. package/dist/translations/ur.umd.js +1 -1
  141. package/dist/translations/uz.js +1 -1
  142. package/dist/translations/uz.umd.js +1 -1
  143. package/dist/translations/vi.js +1 -1
  144. package/dist/translations/vi.umd.js +1 -1
  145. package/dist/translations/zh-cn.js +1 -1
  146. package/dist/translations/zh-cn.umd.js +1 -1
  147. package/dist/translations/zh.js +1 -1
  148. package/dist/translations/zh.umd.js +1 -1
  149. package/package.json +15 -15
  150. package/src/aiactions/aiactions.js +1 -1
  151. package/src/aiactions/model/aiactionsinteraction.js +1 -1
  152. package/src/aiactions/model/aiactionsreply.js +1 -1
  153. package/src/aiassistant/adapters/aiadapter.js +1 -1
  154. package/src/aiassistant/adapters/aitextadapter.js +1 -1
  155. package/src/aiassistant/adapters/awstextadapter.js +1 -1
  156. package/src/aiassistant/adapters/openaitextadapter.js +1 -1
  157. package/src/aiassistant/aiassistant.js +1 -1
  158. package/src/aiassistant/aiassistantediting.js +1 -1
  159. package/src/aiassistant/aiassistantui.js +1 -1
  160. package/src/aiassistant/legacyerrors.js +1 -1
  161. package/src/aiassistant/ui/aiassistantcontroller.js +2 -2
  162. package/src/aiassistant/ui/form/aiformcontentarea.js +1 -1
  163. package/src/aiassistant/ui/form/aiformerrorview.js +1 -1
  164. package/src/aiassistant/ui/form/aiformpromptview.js +1 -1
  165. package/src/aiassistant/ui/form/aiformtoolbarview.js +1 -1
  166. package/src/aiassistant/ui/form/aiformview.js +1 -1
  167. package/src/aiassistant/ui/form/aihistorylistitemview.js +1 -1
  168. package/src/aiassistant/ui/form/aihistorylistview.js +1 -1
  169. package/src/aiassistant/ui/form/prompthistory.js +1 -1
  170. package/src/aiassistant/ui/showaiassistantcommand.js +1 -1
  171. package/src/aiassistant/utils/common-translations.js +1 -1
  172. package/src/aiassistant/utils/normalizecommandsconfig.js +1 -1
  173. package/src/aiballoon/aiballoon.js +1 -1
  174. package/src/aiballoon/ui/aiballoonview.js +1 -1
  175. package/src/aichat/aichat.js +1 -1
  176. package/src/aichat/aichatballoon.js +1 -1
  177. package/src/aichat/aichatcontroller.js +1 -1
  178. package/src/aichat/aichatui.js +1 -1
  179. package/src/aichat/model/aichatcontext.js +1 -1
  180. package/src/aichat/model/aichatconversation.js +1 -1
  181. package/src/aichat/model/aichatinteraction.js +1 -1
  182. package/src/aichat/ui/aichatballoonview.js +1 -1
  183. package/src/aichat/ui/aichatcontrolsview.js +1 -1
  184. package/src/aichat/ui/aichatfeedview.js +1 -1
  185. package/src/aichat/ui/aichatheaderview.js +1 -1
  186. package/src/aichat/ui/aichatview.js +1 -1
  187. package/src/aichat/ui/controls/aichatchipsoverflowmanager.js +1 -1
  188. package/src/aichat/ui/controls/aichatcontextitembuttonview.js +1 -1
  189. package/src/aichat/ui/controls/aichatcontextpanelurlinputview.js +1 -1
  190. package/src/aichat/ui/controls/aichatcontextpanelview.js +1 -1
  191. package/src/aichat/ui/controls/aichatcontrolsloaderview.js +1 -1
  192. package/src/aichat/ui/controls/aichatpromptcapabilitiesview.js +1 -1
  193. package/src/aichat/ui/controls/aichatpromptinputview.js +1 -1
  194. package/src/aichat/ui/controls/aichatpromptsuggestionslistview.js +1 -1
  195. package/src/aichat/ui/controls/resources/aichatcontextresourceslistview.js +1 -1
  196. package/src/aichat/ui/controls/resources/aichatcontextresourcesview.js +1 -1
  197. package/src/aichat/ui/controls/resources/aichatresourcelistitemview.js +1 -1
  198. package/src/aichat/ui/controls/resources/aichatresourcesballoonview.js +1 -1
  199. package/src/aichat/ui/controls/resources/aichatresourcessearchinputview.js +1 -1
  200. package/src/aichat/ui/feed/aichatfeedcontextchipsview.js +1 -1
  201. package/src/aichat/ui/feed/aichatfeedcustomelementview.js +1 -1
  202. package/src/aichat/ui/feed/aichatfeederroritemview.js +1 -1
  203. package/src/aichat/ui/feed/aichatfeedinteractionheaderview.js +1 -1
  204. package/src/aichat/ui/feed/aichatfeeditemview.js +1 -1
  205. package/src/aichat/ui/feed/aichatfeedreplyitemview.js +1 -1
  206. package/src/aichat/ui/feed/aichatfeedsuggestionitemactionsview.js +1 -1
  207. package/src/aichat/ui/feed/aichatfeedsuggestionitemview.js +1 -1
  208. package/src/aichat/ui/feed/aichatfeedusermessageitem.js +1 -1
  209. package/src/aichat/utils/eventnames.js +1 -1
  210. package/src/aichat/utils/promisequeue.js +1 -1
  211. package/src/aichathistory/aichathistory.js +1 -1
  212. package/src/aichathistory/aichathistorycontroller.js +1 -1
  213. package/src/aichathistory/aichathistoryui.js +1 -1
  214. package/src/aichathistory/model/aichathistoryconversations.js +1 -1
  215. package/src/aichathistory/model/aichathistoryitem.js +1 -1
  216. package/src/aichathistory/ui/aichathistorylistitemview.js +2 -2
  217. package/src/aichathistory/ui/aichathistorylistview.js +1 -1
  218. package/src/aichathistory/ui/aichathistorysectionlistview.js +1 -1
  219. package/src/aichathistory/ui/aichathistoryview.js +1 -1
  220. package/src/aichatshortcuts/aichatshortcuts.js +1 -1
  221. package/src/aichatshortcuts/ui/aichatshortcutsview.js +1 -1
  222. package/src/aichatshortcuts/ui/aichatshortcutview.js +1 -1
  223. package/src/aicore/aiconnector.js +1 -1
  224. package/src/aicore/aiediting.js +1 -1
  225. package/src/aicore/model/aicapabilities.js +1 -1
  226. package/src/aicore/model/aicontext.js +1 -1
  227. package/src/aicore/model/aiinteraction.js +1 -1
  228. package/src/aicore/model/aimodels.js +1 -1
  229. package/src/aicore/model/aireply.js +1 -1
  230. package/src/aicore/pipeline/airesponseapplier.js +2 -2
  231. package/src/aicore/pipeline/airesponseparser.js +2 -2
  232. package/src/aicore/ui/aidisclaimerview.js +1 -1
  233. package/src/aicore/ui/aiskeleton.js +1 -1
  234. package/src/aicore/ui/aispinner.js +1 -1
  235. package/src/aicore/ui/suggestioncontainer/aiminitoolbarview.js +1 -1
  236. package/src/aicore/ui/suggestioncontainer/aisuggestionbodyview.js +1 -1
  237. package/src/aicore/ui/suggestioncontainer/aisuggestioncontainerview.js +1 -1
  238. package/src/aicore/ui/suggestioncontainer/aisuggestioncontentpartheaderview.js +1 -1
  239. package/src/aicore/ui/suggestioncontainer/aisuggestioncontentpartstateview.js +1 -1
  240. package/src/aicore/ui/suggestioncontainer/aisuggestioncontentparttoolbarview.js +1 -1
  241. package/src/aicore/ui/suggestioncontainer/aisuggestioncontentpartview.js +1 -1
  242. package/src/aicore/ui/suggestioncontainer/aisuggestionheaderview.js +1 -1
  243. package/src/aicore/ui/suggestioncontainer/aisuggestionloaderview.js +1 -1
  244. package/src/aicore/ui/suggestioncontainer/aisuggestionstreamablecontentview.js +1 -1
  245. package/src/aicore/ui/suggestioncontainer/aiwebsourcesview.js +1 -1
  246. package/src/aicore/utils/common-translations.js +1 -1
  247. package/src/aicore/utils/createresizebutton.js +1 -1
  248. package/src/aicore/utils/documentposition.js +1 -1
  249. package/src/aicore/utils/documentrange.js +1 -1
  250. package/src/aicore/utils/eventnames.js +1 -1
  251. package/src/aicore/utils/geteditorfromcontext.js +1 -1
  252. package/src/aicore/utils/getoperationsfromreply.js +1 -1
  253. package/src/aicore/utils/getsuggestionpartsfromreply.js +1 -1
  254. package/src/aicore/utils/htmlparser.js +1 -1
  255. package/src/aicore/utils/htmlstreamer.js +1 -1
  256. package/src/aicore/utils/scrollmanager.js +1 -1
  257. package/src/aieditorintegration/aieditorintegration.js +1 -1
  258. package/src/aieditorintegration/aitogglebutton/aitogglebuttonui.js +1 -1
  259. package/src/aieditorintegration/aitogglebutton/toggleaicommand.js +1 -1
  260. package/src/aiquickactions/aiquickactions.js +1 -1
  261. package/src/aiquickactions/aiquickactionscommand.js +1 -1
  262. package/src/aiquickactions/aiquickactionsediting.js +1 -1
  263. package/src/aiquickactions/aiquickactionsui.js +1 -1
  264. package/src/aiquickactions/ui/aiquickactionsbuttoncreator.js +1 -1
  265. package/src/aiquickactions/ui/aiquickactionsdropdowncontentview.js +1 -1
  266. package/src/aiquickactions/ui/aiquickactionsdropdowncreator.js +1 -1
  267. package/src/aiquickactions/ui/aiquickactionsfilteredlistview.js +1 -1
  268. package/src/aiquickactions/ui/balloon/aiactionsballoondisclaimerview.js +1 -1
  269. package/src/aiquickactions/ui/balloon/aiactionsballoontoolbarview.js +1 -1
  270. package/src/aiquickactions/ui/balloon/aiactionsballoonview.js +1 -1
  271. package/src/aiquickactions/ui/dropdownmenubuttonwithhighlightview.js +1 -1
  272. package/src/aireviewcore/aireviewcorecontroller.js +1 -1
  273. package/src/aireviewcore/aireviewcoreediting.js +1 -1
  274. package/src/aireviewcore/aireviewcoreui.js +1 -1
  275. package/src/aireviewcore/model/aireviewcheck.js +1 -1
  276. package/src/aireviewcore/model/aireviewchecklist.js +1 -1
  277. package/src/aireviewcore/model/aireviewcheckresult.js +1 -1
  278. package/src/aireviewcore/model/aireviewcheckresultchange.js +1 -1
  279. package/src/aireviewcore/model/aireviewcheckrun.js +1 -1
  280. package/src/aireviewcore/model/aireviewsystemcheckrun.js +1 -1
  281. package/src/aireviewcore/ui/aireviewcoreballoonsuggestionview.js +1 -1
  282. package/src/aireviewcore/ui/aireviewcorechecklistitemresultview.js +1 -1
  283. package/src/aireviewcore/ui/aireviewcorecustomcheckview.js +1 -1
  284. package/src/aireviewcore/ui/aireviewcorefinishreviewbuttonview.js +1 -1
  285. package/src/aireviewcore/ui/aireviewcoregeneralerrorview.js +1 -1
  286. package/src/aireviewcore/ui/aireviewcorepromptinputview.js +1 -1
  287. package/src/aireviewcore/ui/aireviewcorereviewchecklistview.js +1 -1
  288. package/src/aireviewcore/ui/aireviewcorereviewcommandlistitemview.js +1 -1
  289. package/src/aireviewcore/ui/aireviewcorereviewcompletedview.js +1 -1
  290. package/src/aireviewcore/ui/aireviewcoreuicheckresultsview.js +1 -1
  291. package/src/aireviewcore/ui/aireviewcoreview.js +1 -1
  292. package/src/aireviewcore/ui/form/aireviewcoreformdropdown.js +1 -1
  293. package/src/aireviewcore/ui/form/aireviewcoreformmanager.js +1 -1
  294. package/src/aireviewmode/aireviewcheckdefinitions.js +1 -1
  295. package/src/aireviewmode/aireviewmode.js +1 -1
  296. package/src/aireviewmode/aireviewmodecontroller.js +1 -1
  297. package/src/aireviewmode/aireviewmodeui.js +1 -1
  298. package/src/aireviewmode/model/aireviewcheckcustom.js +1 -1
  299. package/src/aireviewmode/model/aireviewcheckextra.js +1 -1
  300. package/src/aireviewmode/model/aireviewcustomcheckrun.js +1 -1
  301. package/src/aireviewmode/model/aireviewextracheckrun.js +1 -1
  302. package/src/aireviewmode/model/aireviewmodechecklist.js +1 -1
  303. package/src/aitabs/aitabs.js +1 -1
  304. package/src/aitabs/aitabsmainview.js +1 -1
  305. package/src/aitabs/tabs/aitabsview.js +1 -1
  306. package/src/aitabs/tabs/tabbuttonview.js +1 -1
  307. package/src/aitabs/tabs/tabpanelview.js +1 -1
  308. package/src/aitranslate/aitranslate.js +1 -1
  309. package/src/aitranslate/aitranslatecontroller.js +1 -1
  310. package/src/aitranslate/aitranslateui.js +1 -1
  311. package/src/aitranslate/model/aitranslatecheck.js +1 -1
  312. package/src/aitranslate/model/aitranslatechecklist.js +1 -1
  313. package/src/aitranslate/model/aitranslatecheckrun.js +1 -1
  314. package/src/aitranslate/ui/aitranslatechecklistview.js +1 -1
  315. package/src/aitranslate/ui/aitranslatecheckresultsview.js +1 -1
  316. package/src/errors.js +1 -1
  317. package/src/errorsmap.js +1 -1
  318. package/src/index.js +1 -1
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x58e03e=_0x55c7;(function(_0x5af62d,_0xc8d2a1){const _0xae4bf9=_0x55c7,_0x4b1e70=_0x5af62d();while(!![]){try{const _0x507e28=parseInt(_0xae4bf9(0x168))/0x1*(parseInt(_0xae4bf9(0x14c))/0x2)+-parseInt(_0xae4bf9(0x165))/0x3+parseInt(_0xae4bf9(0x16c))/0x4*(parseInt(_0xae4bf9(0x14f))/0x5)+-parseInt(_0xae4bf9(0x13f))/0x6*(parseInt(_0xae4bf9(0x140))/0x7)+parseInt(_0xae4bf9(0x130))/0x8+parseInt(_0xae4bf9(0x15a))/0x9*(-parseInt(_0xae4bf9(0x137))/0xa)+parseInt(_0xae4bf9(0x16f))/0xb;if(_0x507e28===_0xc8d2a1)break;else _0x4b1e70['push'](_0x4b1e70['shift']());}catch(_0x3ec921){_0x4b1e70['push'](_0x4b1e70['shift']());}}}(_0x5e40,0x7bbcc));function _0x55c7(_0x5c2ced,_0x307d62){const _0x5e4009=_0x5e40();return _0x55c7=function(_0x55c7fc,_0x1fef3d){_0x55c7fc=_0x55c7fc-0x130;let _0x58b9e9=_0x5e4009[_0x55c7fc];return _0x58b9e9;},_0x55c7(_0x5c2ced,_0x307d62);}import{Plugin as _0x5212fc}from'ckeditor5/src/core.js';import{AIBalloon as _0x2433c9}from'../aiballoon/aiballoon.js';import{AI_REPLY_ACTIONS as _0x42f302}from'./ui/feed/aichatfeedsuggestionitemactionsview.js';import{AIChatBalloonView as _0x5b32d0}from'./ui/aichatballoonview.js';import{AI_SUGGESTION_UI_EVENT_NAMES as _0xb1d5c3}from'../aicore/utils/eventnames.js';import{Dialog as _0x2f10d0}from'ckeditor5/src/ui.js';export class AIChatBalloon extends _0x5212fc{static get[_0x58e03e(0x166)](){return[_0x2f10d0,_0x2433c9];}static get[_0x58e03e(0x15c)](){const _0x3482cc=_0x58e03e;return _0x3482cc(0x160);}static get[_0x58e03e(0x163)](){return!0x0;}static get[_0x58e03e(0x147)](){return!0x0;}[_0x58e03e(0x131)];constructor(_0x18baf9){const _0x58e32c=_0x58e03e;super(_0x18baf9),this[_0x58e32c(0x145)](_0x58e32c(0x142),!0x1);}[_0x58e03e(0x156)](_0x42526e){const _0x5e168d=_0x58e03e,_0x4da14d=this[_0x5e168d(0x170)];this[_0x5e168d(0x131)]||(this[_0x5e168d(0x131)]=this[_0x5e168d(0x164)]()),_0x4da14d[_0x5e168d(0x14d)][_0x5e168d(0x141)](_0x5e168d(0x167))[_0x5e168d(0x156)]({..._0x42526e,'id':_0x5e168d(0x162),'class':_0x5e168d(0x16e),'mainView':this[_0x5e168d(0x131)]}),this[_0x5e168d(0x133)](_0x42526e[_0x5e168d(0x15e)]),this[_0x5e168d(0x131)][_0x5e168d(0x13b)](!_0x42526e[_0x5e168d(0x151)]),this[_0x5e168d(0x154)]();}[_0x58e03e(0x16b)](){const _0x5899ec=_0x58e03e;this[_0x5899ec(0x170)][_0x5899ec(0x14d)][_0x5899ec(0x141)](_0x5899ec(0x167))[_0x5899ec(0x16b)]();}[_0x58e03e(0x139)](_0x14460a){const _0x1fae51=_0x58e03e;return this[_0x1fae51(0x131)]||(this[_0x1fae51(0x131)]=this[_0x1fae51(0x164)]()),this[_0x1fae51(0x131)][_0x1fae51(0x139)](_0x14460a);}[_0x58e03e(0x135)](_0xb12c75){const _0x1f23ea=_0x58e03e;this[_0x1f23ea(0x131)]&&this[_0x1f23ea(0x131)][_0x1f23ea(0x135)](_0xb12c75);}[_0x58e03e(0x164)](){const _0x2659c9=_0x58e03e,_0x1f1668=this[_0x2659c9(0x170)],_0x54388c=_0x1f1668[_0x2659c9(0x14d)][_0x2659c9(0x141)](_0x2659c9(0x167)),_0x5eeddf=_0x1f1668[_0x2659c9(0x169)][_0x2659c9(0x141)](_0x2659c9(0x150));let _0x34fe6d=_0x1f1668[_0x2659c9(0x157)][_0x2659c9(0x141)](_0x2659c9(0x16d))||[..._0x42f302];_0x1f1668[_0x2659c9(0x14d)][_0x2659c9(0x13c)](_0x2659c9(0x152))||(_0x34fe6d=_0x34fe6d[_0x2659c9(0x132)](_0x329a17=>_0x2659c9(0x158)!=_0x329a17));const _0x3df378=new _0x5b32d0(_0x1f1668[_0x2659c9(0x148)],{'availableActions':_0x34fe6d,'showApplyButton':!0x0,'showSuggestButton':!!_0x5eeddf});return _0x3df378[_0x2659c9(0x14b)](_0x2659c9(0x142))['to'](this),_0x3df378[_0x2659c9(0x171)](..._0xb1d5c3)['to'](this),_0x3df378[_0x2659c9(0x171)](_0x2659c9(0x13a),_0x2659c9(0x146))['to'](this),_0x54388c[_0x2659c9(0x171)](_0x2659c9(0x161))['to'](this),_0x3df378['on'](_0x2659c9(0x14a),this[_0x2659c9(0x154)][_0x2659c9(0x14b)](this)),_0x3df378['on'](_0x2659c9(0x158),this[_0x2659c9(0x154)][_0x2659c9(0x14b)](this)),_0x3df378['on'](_0x2659c9(0x15b),this[_0x2659c9(0x154)][_0x2659c9(0x14b)](this)),_0x5eeddf&&_0x3df378[_0x2659c9(0x14b)](_0x2659c9(0x136))['to'](_0x5eeddf,_0x2659c9(0x155)),_0x3df378[_0x2659c9(0x16a)](),_0x3df378;}[_0x58e03e(0x133)](_0x3a9939){const _0x24ff6a=_0x58e03e,_0x721c9=this[_0x24ff6a(0x170)],_0x1211f1=_0x721c9[_0x24ff6a(0x14d)][_0x24ff6a(0x141)](_0x24ff6a(0x15f))[_0x24ff6a(0x144)][_0x24ff6a(0x15d)][_0x24ff6a(0x149)];this[_0x24ff6a(0x131)][_0x24ff6a(0x134)](_0x3a9939),_0x1211f1[_0x24ff6a(0x13c)](this[_0x24ff6a(0x131)][_0x24ff6a(0x13d)])||(_0x1211f1[_0x24ff6a(0x143)]([this[_0x24ff6a(0x131)][_0x24ff6a(0x13d)],this[_0x24ff6a(0x131)][_0x24ff6a(0x13e)]],0x0),_0x721c9[_0x24ff6a(0x14d)][_0x24ff6a(0x141)](_0x24ff6a(0x167))[_0x24ff6a(0x138)](_0x24ff6a(0x14e),()=>{const _0x1448ab=_0x24ff6a;_0x1211f1[_0x1448ab(0x159)](this[_0x1448ab(0x131)][_0x1448ab(0x13d)]),_0x1211f1[_0x1448ab(0x159)](this[_0x1448ab(0x131)][_0x1448ab(0x13e)]);}));}[_0x58e03e(0x154)](){const _0x5fd0fd=_0x58e03e;this[_0x5fd0fd(0x131)][_0x5fd0fd(0x153)]();}}function _0x5e40(){const _0x4e7875=['insertSuggestion','remove','80649UhwmVk','rejectSuggestion','pluginName','headerView','showRotator','Dialog','AIChatBalloon','dialogClosed','aiChatBalloon','isOfficialPlugin','_createChatBalloonView','214221pdAxSb','requires','AIBalloon','220687zsRGSR','commands','render','close','796WZNXDZ','ai.availableReplyActions','ck-ai-chat-balloon','6185190JKghJG','editor','delegate','3027456kLmhKg','_chatBalloonView','filter','_toggleRotatorButtonsInDialogHeader','toggleRotatorButtonsVisibility','setState','isTrackChangesOn','800LeMDgq','once','updateContent','showPrevious','togglePartToolbarEnabled','has','previousButtonView','nextButtonView','296532aAoDHo','42GpynRJ','get','showDiff','addMany','view','set','showNext','isPremiumPlugin','locale','children','applySuggestion','bind','2gZimxv','plugins','beforeDialogClosed','10810bhoiFu','trackChanges','areActionsDisabled','TrackChanges','focus','_restoreDefaultViewFocus','value','open','config'];_0x5e40=function(){return _0x4e7875;};return _0x5e40();}
23
+ const _0x36c7e9=_0x414a;(function(_0x2a57fe,_0x2c7232){const _0x9f8b8=_0x414a,_0x21cc21=_0x2a57fe();while(!![]){try{const _0x10feb7=-parseInt(_0x9f8b8(0xcf))/0x1*(parseInt(_0x9f8b8(0xe6))/0x2)+parseInt(_0x9f8b8(0xdc))/0x3+parseInt(_0x9f8b8(0xf5))/0x4*(parseInt(_0x9f8b8(0xe8))/0x5)+parseInt(_0x9f8b8(0xd3))/0x6+-parseInt(_0x9f8b8(0xfb))/0x7*(parseInt(_0x9f8b8(0xe5))/0x8)+parseInt(_0x9f8b8(0xff))/0x9+parseInt(_0x9f8b8(0xcb))/0xa*(-parseInt(_0x9f8b8(0xd6))/0xb);if(_0x10feb7===_0x2c7232)break;else _0x21cc21['push'](_0x21cc21['shift']());}catch(_0x4c6665){_0x21cc21['push'](_0x21cc21['shift']());}}}(_0x52b5,0xb2a1e));import{Plugin as _0x18fe8c}from'ckeditor5/src/core.js';import{AIBalloon as _0x24ff05}from'../aiballoon/aiballoon.js';import{AI_REPLY_ACTIONS as _0x1f0a62}from'./ui/feed/aichatfeedsuggestionitemactionsview.js';import{AIChatBalloonView as _0x1f0b92}from'./ui/aichatballoonview.js';import{AI_SUGGESTION_UI_EVENT_NAMES as _0x4d1f51}from'../aicore/utils/eventnames.js';import{Dialog as _0x127a1a}from'ckeditor5/src/ui.js';function _0x414a(_0xf7c221,_0x1ce93e){const _0x52b50c=_0x52b5();return _0x414a=function(_0x414ac8,_0x40475b){_0x414ac8=_0x414ac8-0xc4;let _0x95c486=_0x52b50c[_0x414ac8];return _0x95c486;},_0x414a(_0xf7c221,_0x1ce93e);}export class AIChatBalloon extends _0x18fe8c{static get[_0x36c7e9(0xfa)](){return[_0x127a1a,_0x24ff05];}static get[_0x36c7e9(0xe9)](){const _0x43e578=_0x36c7e9;return _0x43e578(0xf4);}static get[_0x36c7e9(0xd5)](){return!0x0;}static get[_0x36c7e9(0xda)](){return!0x0;}[_0x36c7e9(0xd2)];constructor(_0x5d81ba){const _0x523380=_0x36c7e9;super(_0x5d81ba),this[_0x523380(0x100)](_0x523380(0xc6),!0x1);}[_0x36c7e9(0x103)](_0x2d5d4a){const _0x3f8ef5=_0x36c7e9,_0x4a30cb=this[_0x3f8ef5(0xcc)];this[_0x3f8ef5(0xd2)]||(this[_0x3f8ef5(0xd2)]=this[_0x3f8ef5(0xde)]()),_0x4a30cb[_0x3f8ef5(0xef)][_0x3f8ef5(0xdd)](_0x3f8ef5(0xed))[_0x3f8ef5(0x103)]({..._0x2d5d4a,'id':_0x3f8ef5(0xf7),'class':_0x3f8ef5(0xc9),'mainView':this[_0x3f8ef5(0xd2)]}),this[_0x3f8ef5(0xd4)](_0x2d5d4a[_0x3f8ef5(0xe0)]),this[_0x3f8ef5(0xd2)][_0x3f8ef5(0xcd)](!_0x2d5d4a[_0x3f8ef5(0xce)]),this[_0x3f8ef5(0xd9)]();}[_0x36c7e9(0xec)](){const _0x5924d3=_0x36c7e9;this[_0x5924d3(0xcc)][_0x5924d3(0xef)][_0x5924d3(0xdd)](_0x5924d3(0xed))[_0x5924d3(0xec)]();}[_0x36c7e9(0x101)](_0x82a43){const _0x5856b3=_0x36c7e9;return this[_0x5856b3(0xd2)]||(this[_0x5856b3(0xd2)]=this[_0x5856b3(0xde)]()),this[_0x5856b3(0xd2)][_0x5856b3(0x101)](_0x82a43);}[_0x36c7e9(0x104)](_0x3ab07f){const _0x461e64=_0x36c7e9;this[_0x461e64(0xd2)]&&this[_0x461e64(0xd2)][_0x461e64(0x104)](_0x3ab07f);}[_0x36c7e9(0xde)](){const _0x2acf1c=_0x36c7e9,_0x414d32=this[_0x2acf1c(0xcc)],_0xcc536e=_0x414d32[_0x2acf1c(0xef)][_0x2acf1c(0xdd)](_0x2acf1c(0xed)),_0x10fd8b=_0x414d32[_0x2acf1c(0x102)][_0x2acf1c(0xdd)](_0x2acf1c(0x105));let _0x324e7b=_0x414d32[_0x2acf1c(0xea)][_0x2acf1c(0xdd)](_0x2acf1c(0xf3))||[..._0x1f0a62];_0x414d32[_0x2acf1c(0xef)][_0x2acf1c(0xe3)](_0x2acf1c(0xca))||(_0x324e7b=_0x324e7b[_0x2acf1c(0xf1)](_0xf2afbf=>_0x2acf1c(0xe7)!=_0xf2afbf));const _0x949d5e=new _0x1f0b92(_0x414d32[_0x2acf1c(0xdb)],{'availableActions':_0x324e7b,'showApplyButton':!0x0,'showSuggestButton':!!_0x10fd8b});return _0x949d5e[_0x2acf1c(0xe1)](_0x2acf1c(0xc6))['to'](this),_0x949d5e[_0x2acf1c(0xd8)](..._0x4d1f51)['to'](this),_0x949d5e[_0x2acf1c(0xd8)](_0x2acf1c(0xf6),_0x2acf1c(0xd0))['to'](this),_0xcc536e[_0x2acf1c(0xd8)](_0x2acf1c(0xd7))['to'](this),_0x949d5e['on'](_0x2acf1c(0xeb),this[_0x2acf1c(0xd9)][_0x2acf1c(0xe1)](this)),_0x949d5e['on'](_0x2acf1c(0xe7),this[_0x2acf1c(0xd9)][_0x2acf1c(0xe1)](this)),_0x949d5e['on'](_0x2acf1c(0xf8),this[_0x2acf1c(0xd9)][_0x2acf1c(0xe1)](this)),_0x10fd8b&&_0x949d5e[_0x2acf1c(0xe1)](_0x2acf1c(0xc8))['to'](_0x10fd8b,_0x2acf1c(0xe2)),_0x949d5e[_0x2acf1c(0xc4)](),_0x949d5e;}[_0x36c7e9(0xd4)](_0x3974ea){const _0x1c5de0=_0x36c7e9,_0x1904c1=this[_0x1c5de0(0xcc)],_0x151f9e=_0x1904c1[_0x1c5de0(0xef)][_0x1c5de0(0xdd)](_0x1c5de0(0xc5))[_0x1c5de0(0xee)][_0x1c5de0(0xc7)][_0x1c5de0(0xfc)];this[_0x1c5de0(0xd2)][_0x1c5de0(0xe4)](_0x3974ea),_0x151f9e[_0x1c5de0(0xe3)](this[_0x1c5de0(0xd2)][_0x1c5de0(0xf0)])||(_0x151f9e[_0x1c5de0(0xdf)]([this[_0x1c5de0(0xd2)][_0x1c5de0(0xf0)],this[_0x1c5de0(0xd2)][_0x1c5de0(0xd1)]],0x0),_0x1904c1[_0x1c5de0(0xef)][_0x1c5de0(0xdd)](_0x1c5de0(0xed))[_0x1c5de0(0xfd)](_0x1c5de0(0xf2),()=>{const _0x342baf=_0x1c5de0;_0x151f9e[_0x342baf(0xfe)](this[_0x342baf(0xd2)][_0x342baf(0xf0)]),_0x151f9e[_0x342baf(0xfe)](this[_0x342baf(0xd2)][_0x342baf(0xd1)]);}));}[_0x36c7e9(0xd9)](){const _0x49ce30=_0x36c7e9;this[_0x49ce30(0xd2)][_0x49ce30(0xf9)]();}}function _0x52b5(){const _0x42282b=['trackChanges','render','Dialog','showDiff','headerView','isTrackChangesOn','ck-ai-chat-balloon','TrackChanges','468320knghXN','editor','togglePartToolbarEnabled','areActionsDisabled','3NXcjOJ','showNext','nextButtonView','_chatBalloonView','6768276HzlwwI','_toggleRotatorButtonsInDialogHeader','isOfficialPlugin','55PGVqzr','dialogClosed','delegate','_restoreDefaultViewFocus','isPremiumPlugin','locale','1957668JKYXas','get','_createChatBalloonView','addMany','showRotator','bind','value','has','toggleRotatorButtonsVisibility','8uWSRcL','427560mHWnbr','insertSuggestion','300535CgBBqn','pluginName','config','applySuggestion','close','AIBalloon','view','plugins','previousButtonView','filter','beforeDialogClosed','ai.availableReplyActions','AIChatBalloon','16XUlnUk','showPrevious','aiChatBalloon','rejectSuggestion','focus','requires','9169167BmHtuP','children','once','remove','8064261cwTTaD','set','updateContent','commands','open','setState'];_0x52b5=function(){return _0x42282b;};return _0x52b5();}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- function _0x28cf(_0x5d4009,_0x58c9bf){const _0x40ede9=_0x40ed();return _0x28cf=function(_0x28cf41,_0x43f1f5){_0x28cf41=_0x28cf41-0x10c;let _0x43078e=_0x40ede9[_0x28cf41];return _0x43078e;},_0x28cf(_0x5d4009,_0x58c9bf);}const _0x4aec30=_0x28cf;(function(_0x31c2b0,_0x51d30a){const _0x468a18=_0x28cf,_0x5335b8=_0x31c2b0();while(!![]){try{const _0x3d7f2d=parseInt(_0x468a18(0x121))/0x1+-parseInt(_0x468a18(0x1b9))/0x2*(parseInt(_0x468a18(0x250))/0x3)+-parseInt(_0x468a18(0x19d))/0x4*(-parseInt(_0x468a18(0x26e))/0x5)+-parseInt(_0x468a18(0x253))/0x6+parseInt(_0x468a18(0x11a))/0x7+parseInt(_0x468a18(0x1b2))/0x8*(-parseInt(_0x468a18(0x18d))/0x9)+parseInt(_0x468a18(0x20c))/0xa*(parseInt(_0x468a18(0x293))/0xb);if(_0x3d7f2d===_0x51d30a)break;else _0x5335b8['push'](_0x5335b8['shift']());}catch(_0x222c40){_0x5335b8['push'](_0x5335b8['shift']());}}}(_0x40ed,0xedba5));import{ContextPlugin as _0x5ebc1f,Editor as _0x18c442}from'ckeditor5/src/core.js';import{BodyCollection as _0x4f508d}from'ckeditor5/src/ui.js';import{CKEditorError as _0x3f52cf,logError as _0x306496,scrollViewportToShowTarget as _0x59f77d,uid as _0x4720f6}from'ckeditor5/src/utils.js';import{AIConnector as _0x266934}from'../aicore/aiconnector.js';import{AITabs as _0x330bc8}from'../aitabs/aitabs.js';import{AIChatConversation as _0x5a7bde}from'./model/aichatconversation.js';import{getTranslation as _0x21db9d}from'../aicore/utils/common-translations.js';import{AIModels as _0x479555}from'../aicore/model/aimodels.js';import{getEditorFromContext as _0x290b8e}from'../aicore/utils/geteditorfromcontext.js';import{DocumentCompare as _0x344554,DATA_ID_MODEL_ATTRIBUTE as _0x2f75ed}from'ckeditor5-collaboration/src/collaboration-core.js';import{fixMarkerOperationOldRange as _0x41ef8f,getOperationsFromReply as _0xead07c}from'../aicore/utils/getoperationsfromreply.js';import{expandSelectionWithContext as _0x1ec15d,getMinimalSelection as _0x4101dd}from'../aicore/utils/getsuggestionpartsfromreply.js';import{ModelRange as _0x561fcf,_DetachOperation as _0x45cacf}from'ckeditor5/src/engine.js';function _0x40ed(){const _0x5f5bf9=['AIEditing','Showing\x20conversation\x20history...','getInteraction','resize','_registerToolDataCallback','contextItemRemoved','addDocumentToContext','ai-chat-url-upload-failed','plugins','from','addFileToContext','AI_CHAT_INVALID_REQUEST','AI_CHAT_CONTEXT_UNABLE_TO_UPLOAD_FILE','interactionFinished','createPositionAt','loadSourceResources','resourceId','ai.chat.context','populateSourceResourceBalloon','toViewRange','indexes','revert','_batchToChanges','baseVersion','setAddContextOptions','hasChanges','AI_CHAT_CONTEXT_FILE_TOO_MANY_PAGES','source','next','AI_CHAT_UNTITLED_CONVERSATION','insertSuggestion','_applyOperationsAsSuggestions','378909MIkMxl','ai-chat-controller-mouse-over','interactionDestroyed','abortPromptStream','init','setLoadingMessage','model','setFeedItemRenderingStrategy','clearLoadingMessage','sources','replyChangeGroupStateUpdated','context','isDocumentOperation','version','resource','isModelAvailable','96888ZNScur','updateCapabilities','contextSent','AI_CHAT_GENERIC_ERROR','_getAIChatInteractionAPI','rootName','ai-chat-invalid-request','_toggleReasoning','changeGroups','resetMessageInput','resizedTabs','ai-chat-missing-channel-id','contextItemAdded','_aiChatUi','ai.chat.initialConversation','DocumentCompare','_applySuggestion','ai-chat-conversation-not-found','activeConversation','addOperation','applyOperation','80hYhlVW','isCurrentDocumentInContext','root','ai-chat-conversation-start-failed','addCurrentDocumentToChatContext','updateContent','slice','328742xeBTjc','contextItem','mouseOverSuggestion','loadConversation','setChangeGroupState','dislike','_handleStartConversation','done','setConversationContext','currentReply','range','selectedModel','updateCurrentDocumentInContext','howMany','AI_CHAT_CONTEXT_CURRENT_DOCUMENT','createdAt','_scrollToSuggestionRange','alignToTop','ai-chat-context-form-data-size-limits-exceeded','ai-request-aborted','clearPendingContextUI','type','previous','children','resizeTabs','isInContext','ai-chat-file-upload-failed','createRange','dialogClosed','addFilesToContext','getInteractionAndReplyById','addUrlToContext','_removeFromContext','log','updateConversationTitle','addResourceToContext','getChildren','areActionsDisabled','resourceStateChanged','options','fetchConversations','cloneNode','ai.models','pending','getChildAtOffset','ai-chat-controller-no-active-conversation','createPositionFromPath','AI_CHAT_CONTEXT_UNSUPPORTED_TYPE','upsertAIChatRating','contextItemLoadingEnded','showDiff','get','updateFeedItemAIReplySources','findIndex','AI_CHAT_ABORTED_MESSAGE','setConversationTitle','getChild','interactionId','sessionId','maxOffset','_createFromRanges','content','_getLastCreatedConversationId','interactionStarted','getTransformedByOperation','getRanges','AI_CHAT_CONTEXT_UNABLE_TO_UPLOAD_URL','map','setState','updateFeedItemAIReplyContent','unshift','AI_CHAT_UNABLE_TO_LOAD_CONVERSATION','_stopLastInteraction','document','_integrateEditor','removeContextItem','_aiEditing','lastCreated','split','indexOf','_logError','getSelectionText','focusPromptInput','9630oMGxZk','getConversation','state','removeSelectionFromContext','isOfficialPlugin','documentContextContent','mouseLeaveSuggestion','replyId','fetchConversation','_flushLastInteractionUI','includes','streaming','_aiChatBalloonShowDiff','ai.models.defaultModelId','AI_CHAT_UNABLE_TO_START_CONVERSATION','parse','addSelectionToChatContext','showNext','addFeedItemCustomElement','_handleUIUserMessage','webSearchFinished','ai-chat-resource-load-failed','resources','lastInteraction','outdated','_rejectSuggestion','messageId','toggleWebSearch','Liked\x20response','_getPresentableSiblingContentPartIndex','push','ai-no-track-changes','_updateRatings','isUploadInProgress','_currentPreviewedChangeGroup','delegate','sendUserMessage','addFeedItemStaticMessage','add','setSelectedModel','ai-chat-context-file-too-large','_setIsMaximized','open','AI_CHAT_CONTEXT_FORM_DATA_SIZE_LIMITS_EXCEEDED','length','AIConnector','editing','resetReasoningState','listenTo','AI_CHAT_CONTEXT_INVALID_DATA','Disliked\x20response','addFeedItemAIReply','webSearchStarted','static','editors','addSelectionToContext','getOperations','commands','getGroupId','conversationInitialized','interactionCreated','ai-chat-context-invalid-data','getDiff','undo','_bodyCollection','handleRemovedConversation','attachToDom','set','6ryLaDj','callback','afterInit','221598dFoieE','ready','addFeedInteractionHeader','_insertSuggestion','resetConversationTitle','ai-chat-context-file-too-many-pages','ai-chat-context-unsupported-type','isLoading','modification','addCurrentDocumentToContext','history','getDocumentContext','pluginName','selectModel','data-id','partIndex','addFeedItemUserMessage','_aiChatModels','start','collaboration.channelId','data','replies','AI_CHAT_CONTEXT_UNSUPPORTED_FILE_TYPE','sendMessage','uploadProgressChanged','getConversations','setModel','10KghLaf','modelSelected','_showConversationHistory','clearConversationContextUI','setFeedItemAIReplySuggestionPartActive','replyCreated','scrollFeedToSuggestion','error','node','domConverter','mapper','capabilitiesUpdated','createConversation','startAutoScroll','selection','stopInteraction','_openBalloonFor','removeFromContext','changes','showPrevious','toggleLoadingSkeleton','createReply','end','removed','isDisabled','updateResourceState','like','finishInteraction','getRoot','getContentParts','accepted','sourcePosition','destroy','config','_getDocumentRangeForReplyChanges','AI_CHAT_CONTEXT_UNABLE_TO_LOAD_RESOURCES','AI_CHAT_RESOURCE_LOAD_FAILED','902GzbYte','filter','text','toString','index','reasoningStarted','AI_BALLOON_HEADER_TITLE','executeCustomItemCallback','setIsMaximized','_updateReplyContent','TrackChanges','close','_aiChatBalloon','$graveyard','updateFeedItemAIReplySuggestionPartState','getAll','startsWith','getFirstRange','forEach','hideFakeVisualSelection','6165698fLrhIk','query','rejectSuggestion','has','startConversation','reasoningFinished','toggleSuggestionDisplayMode','752194TzBLvA','isPremiumPlugin','addContextItem','ai-chat-conversation-init-failed','aiChatBalloon','getReply','ai-chat-context-unsupported-file-type','nextSibling','addFeedItemError','sourceId','removeSelectionFromChatContext','batch','delete','removeFeedInteraction','change','setContextItemLoading','stop','anchorId','rejected','requires','uiId','toggleReasoning','disableControls','AI_CHAT_CONTEXT_FILE_TOO_LARGE','ai-conversation-','_getUserPresentableContentPartDocumentRange','detachFromDom','redo','isCurrentDocumentInConversation','isStarted','AIChatController','setIsUploadInProgress','new','toolDataReceived','view','enableControls','current-document','_toggleWebSearch','ai-chat-source-resources-load-failed','remove','message','getPath','closeSourceResourceBalloon','replyContentUpdated','locale','Undo','AIChatBalloon','activateTab','addContextOptionsChanged','AITabs','AIChatUI','showFakeVisualSelection','_startConversationSafely','showChangeInText','contextItems','_aiConnector','find','main','load','uid','getDocumentData','addFeedItemAISuggestion','updateFeedItemAIReplySuggestionContent','chat','TrackChangesEditing','applySuggestion','startInteraction','path','marker','viewRangeToDom','prepareLoadingMessage','sourceResourcesLoaded','bind','handleUserInteraction','getAttribute','resetWebSearchState'];_0x40ed=function(){return _0x5f5bf9;};return _0x40ed();}import{findOne as _0x484cdd,getAttribute as _0x4b6112,serialize as _0x33812c,Document as _0x54b8e7,findByAttribute as _0x5e9a27}from'../aicore/utils/htmlparser.js';export class AIChatController extends _0x5ebc1f{[_0x4aec30(0x205)];[_0x4aec30(0x158)];[_0x4aec30(0x1aa)];[_0x4aec30(0x264)];[_0x4aec30(0x112)];[_0x4aec30(0x183)]=new Map();[_0x4aec30(0x22e)]=null;[_0x4aec30(0x24c)];static get[_0x4aec30(0x134)](){return[_0x266934,_0x344554];}static get[_0x4aec30(0x25f)](){const _0x33d5e4=_0x4aec30;return _0x33d5e4(0x13f);}static get[_0x4aec30(0x210)](){return!0x0;}static get[_0x4aec30(0x122)](){return!0x0;}[_0x4aec30(0x191)](){const _0x505845=_0x4aec30;this[_0x505845(0x24c)]=new _0x4f508d(this[_0x505845(0x198)][_0x505845(0x14d)]),this[_0x505845(0x24c)][_0x505845(0x24e)](),this[_0x505845(0x158)]=this[_0x505845(0x198)][_0x505845(0x175)][_0x505845(0x1ec)](_0x505845(0x239)),this[_0x505845(0x1aa)]=this[_0x505845(0x198)][_0x505845(0x175)][_0x505845(0x1ec)](_0x505845(0x153)),this[_0x505845(0x205)]=this[_0x505845(0x198)][_0x505845(0x175)][_0x505845(0x1ec)](_0x505845(0x16d)),this[_0x505845(0x264)]=new _0x479555({'connector':this[_0x505845(0x158)],'config':this[_0x505845(0x198)][_0x505845(0x28f)][_0x505845(0x1ec)](_0x505845(0x1e3)),'locale':this[_0x505845(0x198)][_0x505845(0x14d)]});const _0x528971=this[_0x505845(0x198)][_0x505845(0x175)][_0x505845(0x1ec)](_0x505845(0x152));this[_0x505845(0x23c)](this[_0x505845(0x1aa)],_0x505845(0x11e),()=>{const _0xb0ad61=_0x505845;this[_0xb0ad61(0x155)]();}),this[_0x505845(0x23c)](this[_0x505845(0x1aa)],_0x505845(0x230),(_0x42d155,_0x12e44e)=>{const _0x2f00bf=_0x505845;this[_0x2f00bf(0x21f)]({'userMessage':_0x12e44e});}),this[_0x505845(0x23c)](_0x528971,_0x505845(0x1a7),(_0x397958,_0x19e97e)=>{const _0x1924cd=_0x505845;this[_0x1924cd(0x235)](_0x19e97e);}),this[_0x505845(0x23c)](this[_0x505845(0x1aa)],_0x505845(0x1d1),()=>{const _0x517078=_0x505845;_0x528971[_0x517078(0x170)]();}),this[_0x505845(0x23c)](this[_0x505845(0x1aa)],_0x505845(0x190),async()=>{const _0x26887f=_0x505845;await this[_0x26887f(0x201)](),await this[_0x26887f(0x215)](),this[_0x26887f(0x12b)]();}),this[_0x505845(0x23c)](this[_0x505845(0x1aa)],_0x505845(0x173),()=>{const _0xd2495=_0x505845;this[_0xd2495(0x1b6)]();}),this[_0x505845(0x23c)](this[_0x505845(0x1aa)],_0x505845(0x177),(_0x1ef4ca,_0x48731c)=>{const _0x1dda12=_0x505845;this[_0x1dda12(0x1af)]?.[_0x1dda12(0x1d6)](Array[_0x1dda12(0x176)](_0x48731c));}),this[_0x505845(0x23c)](this[_0x505845(0x1aa)],_0x505845(0x1d8),(_0x2be030,_0xb23b9c)=>{const _0x42fab3=_0x505845;this[_0x42fab3(0x1af)]?.[_0x42fab3(0x1d8)](_0xb23b9c);}),this[_0x505845(0x23c)](this[_0x505845(0x1aa)],_0x505845(0x10d),(_0x1bd8df,_0x3c4ece)=>{const _0x798827=_0x505845;_0x3c4ece[_0x798827(0x251)](this[_0x798827(0x198)]);}),this[_0x505845(0x23c)](this[_0x505845(0x1aa)],_0x505845(0x1dc),(_0x59eef6,_0x26706b)=>{const _0x240690=_0x505845;this[_0x240690(0x1af)]?.[_0x240690(0x1dc)](_0x26706b[_0x240690(0x188)],_0x26706b[_0x240690(0x19b)]);}),this[_0x505845(0x23c)](this[_0x505845(0x1aa)],_0x505845(0x204),(_0x1d1490,_0x533b03)=>{const _0x47b253=_0x505845;this[_0x47b253(0x1d9)](_0x533b03);}),this[_0x505845(0x23c)](this[_0x505845(0x1aa)],_0x505845(0x17c),(_0x482263,_0x55093a)=>{const _0x163ad6=_0x505845;this[_0x163ad6(0x1af)]?.[_0x163ad6(0x17c)](_0x55093a[_0x163ad6(0x12a)],_0x55093a[_0x163ad6(0x11b)],_0x55093a[_0x163ad6(0x15c)]);}),this[_0x505845(0x23c)](this[_0x505845(0x1aa)],_0x505845(0x227),()=>{const _0x3abc00=_0x505845;this[_0x3abc00(0x146)]();}),this[_0x505845(0x23c)](this[_0x505845(0x1aa)],_0x505845(0x136),()=>{const _0x2ca06b=_0x505845;this[_0x2ca06b(0x1a4)]();}),this[_0x505845(0x23c)](this[_0x505845(0x1aa)],_0x505845(0x260),(_0x351d11,_0xfdfc7c)=>{const _0x2446d5=_0x505845;this[_0x2446d5(0x1af)]?.[_0x2446d5(0x26d)](_0xfdfc7c);}),this[_0x505845(0x23c)](this[_0x505845(0x1aa)],_0x505845(0x288),(_0x16d432,{replyId:_0x179575})=>{const _0x98befa=_0x505845;console[_0x98befa(0x1da)](_0x98befa(0x228),_0x179575);}),this[_0x505845(0x23c)](this[_0x505845(0x1aa)],_0x505845(0x1be),(_0x3fbea7,{replyId:_0x4214c8})=>{const _0x410d89=_0x505845;console[_0x410d89(0x1da)](_0x410d89(0x23e),_0x4214c8);}),this[_0x505845(0x23c)](this[_0x505845(0x1aa)],_0x505845(0x18b),(_0x5e0655,_0x2c56b3)=>{const _0xea5e68=_0x505845;this[_0xea5e68(0x256)](_0x2c56b3);}),this[_0x505845(0x23c)](this[_0x505845(0x1aa)],_0x505845(0x156),(_0x5ef1ef,{replyId:_0x322909,partIndex:_0x18eb4c})=>{const _0x2d6cb1=_0x505845;this[_0x2d6cb1(0x218)]=this[_0x2d6cb1(0x1aa)][_0x2d6cb1(0x1eb)],this[_0x2d6cb1(0x27e)](_0x322909,_0x18eb4c);}),this[_0x505845(0x23c)](this[_0x505845(0x1aa)],_0x505845(0x1bb),(_0x329e6e,{replyId:_0x3383aa,partIndex:_0x3886ad})=>{const _0x4cb39a=_0x505845,_0xb532d=this[_0x4cb39a(0x290)](_0x3383aa,_0x3886ad);_0xb532d&&_0x4cb39a(0x113)!=_0xb532d[_0x4cb39a(0x1c3)][_0x4cb39a(0x1b4)][_0x4cb39a(0x1a2)]&&this[_0x4cb39a(0x205)][_0x4cb39a(0x154)]([_0xb532d[_0x4cb39a(0x1c3)]],_0x4cb39a(0x18e));}),this[_0x505845(0x23c)](this[_0x505845(0x1aa)],_0x505845(0x212),()=>{const _0x44d5dc=_0x505845;this[_0x44d5dc(0x205)][_0x44d5dc(0x119)](_0x44d5dc(0x18e));}),this[_0x505845(0x23c)](this[_0x505845(0x1aa)],_0x505845(0x162),(_0x461a5a,_0xfcf258)=>{const _0x1b03f5=_0x505845;this[_0x1b03f5(0x205)][_0x1b03f5(0x119)](_0x1b03f5(0x18e)),this[_0x1b03f5(0x1ad)](_0xfcf258);}),this[_0x505845(0x23c)](this[_0x505845(0x1aa)],_0x505845(0x120),async(_0x33c973,{replyId:_0x41a4cb,showDiff:_0x398405})=>{const _0x5d5aa7=_0x505845,{reply:_0x35ead9}=this[_0x5d5aa7(0x1d7)](_0x41a4cb),_0x3b2e9a=_0x35ead9[_0x5d5aa7(0x28b)]({'showDiff':_0x398405});await this[_0x5d5aa7(0x1aa)][_0x5d5aa7(0x15f)]({'id':_0x35ead9['id'],'parts':_0x3b2e9a,'renderingStrategy':_0x5d5aa7(0x241)});}),this[_0x505845(0x23c)](this[_0x505845(0x1aa)],_0x505845(0x11c),(_0xd2b27a,{replyId:_0x172a6d,partIndex:_0xefdea9})=>{const _0x32daa7=_0x505845;this[_0x32daa7(0x225)]({'replyId':_0x172a6d,'partIndex':_0xefdea9}),this[_0x32daa7(0x205)][_0x32daa7(0x119)](_0x32daa7(0x18e));}),this[_0x505845(0x198)][_0x505845(0x175)][_0x505845(0x11d)](_0x505845(0x14f))&&(this[_0x505845(0x112)]=this[_0x505845(0x198)][_0x505845(0x175)][_0x505845(0x1ec)](_0x505845(0x14f)),this[_0x505845(0x24f)](_0x505845(0x218),!0x1),this[_0x505845(0x112)][_0x505845(0x169)](_0x505845(0x1eb))['to'](this,_0x505845(0x218)),this[_0x505845(0x23c)](this[_0x505845(0x112)],_0x505845(0x120),()=>{const _0x496d60=_0x505845,{replyId:_0x4a1a2f,partIndex:_0x1b77ef}=this[_0x496d60(0x22e)];this[_0x496d60(0x218)]=!this[_0x496d60(0x218)];const {reply:_0x36d7df}=this[_0x496d60(0x1d7)](_0x4a1a2f),_0x508b1b=_0x36d7df[_0x496d60(0x28b)]({'showDiff':this[_0x496d60(0x218)],'groupIndex':_0x1b77ef});this[_0x496d60(0x112)][_0x496d60(0x1b7)]({'part':_0x508b1b[0x0],'renderingStrategy':_0x496d60(0x241),'keepErrors':!0x0});}),this[_0x505845(0x23c)](this[_0x505845(0x112)],_0x505845(0x162),()=>{const _0x33b31b=_0x505845,{replyId:_0x34f72d,partIndex:_0x50d780}=this[_0x33b31b(0x22e)];this[_0x33b31b(0x1ad)]({'replyId':_0x34f72d,'partIndex':_0x50d780}),this[_0x33b31b(0x112)][_0x33b31b(0x1fd)](_0x33b31b(0x28c));}),this[_0x505845(0x23c)](this[_0x505845(0x112)],_0x505845(0x18b),()=>{const _0x7920f3=_0x505845,{replyId:_0x215e98,partIndex:_0x373ded}=this[_0x7920f3(0x22e)];this[_0x7920f3(0x256)]({'replyId':_0x215e98,'partIndex':_0x373ded}),this[_0x7920f3(0x112)][_0x7920f3(0x1fd)](_0x7920f3(0x28c));}),this[_0x505845(0x23c)](this[_0x505845(0x112)],_0x505845(0x11c),()=>{const _0x47f7ca=_0x505845,{replyId:_0x2bd3b6,partIndex:_0x101972}=this[_0x47f7ca(0x22e)];this[_0x47f7ca(0x225)]({'replyId':_0x2bd3b6,'partIndex':_0x101972}),this[_0x47f7ca(0x112)][_0x47f7ca(0x1fd)](_0x47f7ca(0x133));}),this[_0x505845(0x23c)](this[_0x505845(0x112)],_0x505845(0x21d),()=>{const _0x12b63a=_0x505845,{replyId:_0x57572e,partIndex:_0x5f2ba0}=this[_0x12b63a(0x22e)],_0xa062fa=this[_0x12b63a(0x229)](_0x57572e,_0x5f2ba0,_0x12b63a(0x189));null!==_0xa062fa&&this[_0x12b63a(0x27e)](_0x57572e,_0xa062fa);}),this[_0x505845(0x23c)](this[_0x505845(0x112)],_0x505845(0x281),()=>{const _0x370941=_0x505845,{replyId:_0x73ea2d,partIndex:_0x1d1aaa}=this[_0x370941(0x22e)],_0x48a787=this[_0x370941(0x229)](_0x73ea2d,_0x1d1aaa,_0x370941(0x1cf));null!==_0x48a787&&this[_0x370941(0x27e)](_0x73ea2d,_0x48a787);}),this[_0x505845(0x23c)](this[_0x505845(0x112)],_0x505845(0x1d5),(_0x560187,{id:_0x164286})=>{const _0x5d2341=_0x505845;if(_0x5d2341(0x125)!==_0x164286)return;const {replyId:_0xde2d5c,partIndex:_0x21b21e}=this[_0x5d2341(0x22e)];this[_0x5d2341(0x22e)]=null,this[_0x5d2341(0x1aa)][_0x5d2341(0x272)]({'id':_0xde2d5c,'index':_0x21b21e,'isActive':!0x1});}));}async[_0x4aec30(0x252)](){const _0xe018e5=_0x4aec30;this[_0xe018e5(0x198)]instanceof _0x18c442?this[_0xe018e5(0x203)](this[_0xe018e5(0x198)]):this[_0xe018e5(0x23c)](this[_0xe018e5(0x198)][_0xe018e5(0x242)],_0xe018e5(0x232),(_0x27ee83,_0x348939)=>{const _0x59eccc=_0xe018e5;_0x348939['on'](_0x59eccc(0x254),()=>{const _0x4941ac=_0x59eccc;this[_0x4941ac(0x203)](_0x348939);});});const _0xf55a4c=this[_0xe018e5(0x198)][_0xe018e5(0x28f)][_0xe018e5(0x1ec)](_0xe018e5(0x1ab));let _0x547026=_0xf55a4c;if(_0xe018e5(0x206)!=_0xf55a4c||(_0x547026=await this[_0xe018e5(0x1f7)](),_0x547026))return _0xe018e5(0x141)==_0x547026?this[_0xe018e5(0x155)]():this[_0xe018e5(0x1bc)](_0x547026);}async[_0x4aec30(0x28e)](){const _0x412752=_0x4aec30;return await this[_0x412752(0x201)](),this[_0x412752(0x24c)][_0x412752(0x13b)](),super[_0x412752(0x28e)]();}[_0x4aec30(0x256)](_0x347bf6){const _0x50f406=_0x4aec30,_0x36efde=_0x290b8e(this[_0x50f406(0x198)]);if(!_0x36efde[_0x50f406(0x175)][_0x50f406(0x11d)](_0x50f406(0x110)))throw new _0x3f52cf(_0x50f406(0x22b),null);const _0x42839d=this[_0x50f406(0x198)][_0x50f406(0x175)][_0x50f406(0x1ec)](_0x50f406(0x1ac)),{reply:_0x13d39e,interaction:_0x2710f4}=this[_0x50f406(0x1d7)](_0x347bf6[_0x50f406(0x213)]),_0x4c6c3c=this[_0x50f406(0x290)](_0x347bf6[_0x50f406(0x213)],_0x347bf6[_0x50f406(0x262)]),_0x8d97a3=void 0x0!==_0x347bf6[_0x50f406(0x262)]?[_0x13d39e[_0x50f406(0x1a5)][_0x347bf6[_0x50f406(0x262)]]]:_0x13d39e[_0x50f406(0x1a5)][_0x50f406(0x294)](_0x1a3435=>_0x50f406(0x1e4)==_0x1a3435[_0x50f406(0x20e)]),_0x4b43be=_0x8d97a3[_0x50f406(0x1fc)](_0x4ba633=>_0x13d39e[_0x50f406(0x1a5)][_0x50f406(0x208)](_0x4ba633));if(!_0x4c6c3c||_0x50f406(0x113)==_0x4c6c3c[_0x50f406(0x1c3)][_0x50f406(0x1b4)][_0x50f406(0x1a2)])return void _0x4b43be[_0x50f406(0x118)](_0x473c1b=>_0x13d39e[_0x50f406(0x1bd)](_0x473c1b,_0x50f406(0x224)));_0x4b43be[_0x50f406(0x118)](_0x34e7c9=>_0x13d39e[_0x50f406(0x1bd)](_0x34e7c9,_0x50f406(0x28c)));const _0x4f7c71=_0xead07c({'editor':_0x36efde,'reply':_0x13d39e,'interaction':_0x2710f4,'groups':_0x8d97a3,'transform':!0x0,'documentCompare':_0x42839d,'documentCompareOptions':{'anchor':_0x50f406(0x15a),'markDeletions':!0x0}});let _0x2119b3;_0x4c6c3c&&this[_0x50f406(0x1c9)](_0x4c6c3c[_0x50f406(0x1c3)]),_0x36efde[_0x50f406(0x193)][_0x50f406(0x12f)](_0x1c1266=>{const _0x119544=_0x50f406;_0x2119b3=_0x1c1266[_0x119544(0x12c)],_0x36efde[_0x119544(0x175)][_0x119544(0x1ec)](_0x119544(0x161))[_0x119544(0x18c)](_0x4f7c71),this[_0x119544(0x205)][_0x119544(0x119)](_0x119544(0x18e));}),this[_0x50f406(0x183)][_0x50f406(0x24f)](_0x2119b3,{'interactionId':_0x2710f4['id'],'replyId':_0x13d39e['id'],'indexes':_0x4b43be[_0x50f406(0x1b8)]()}),this[_0x50f406(0x22c)](_0x13d39e);}[_0x4aec30(0x1ad)](_0x236201){const _0x10dbc6=_0x4aec30,_0x26284c=_0x290b8e(this[_0x10dbc6(0x198)]),_0x4d0b55=this[_0x10dbc6(0x198)][_0x10dbc6(0x175)][_0x10dbc6(0x1ec)](_0x344554),{reply:_0x2ed069,interaction:_0x1213a5}=this[_0x10dbc6(0x1d7)](_0x236201[_0x10dbc6(0x213)]),_0x5a7cb1=this[_0x10dbc6(0x290)](_0x236201[_0x10dbc6(0x213)],_0x236201[_0x10dbc6(0x262)]),_0x5ed088=void 0x0!==_0x236201[_0x10dbc6(0x262)]?[_0x2ed069[_0x10dbc6(0x1a5)][_0x236201[_0x10dbc6(0x262)]]]:_0x2ed069[_0x10dbc6(0x1a5)][_0x10dbc6(0x294)](_0x5c943f=>_0x10dbc6(0x1e4)==_0x5c943f[_0x10dbc6(0x20e)]),_0x3b76d7=_0x5ed088[_0x10dbc6(0x1fc)](_0x67aba2=>_0x2ed069[_0x10dbc6(0x1a5)][_0x10dbc6(0x208)](_0x67aba2));if(!_0x5a7cb1||_0x10dbc6(0x113)==_0x5a7cb1[_0x10dbc6(0x1c3)][_0x10dbc6(0x1b4)][_0x10dbc6(0x1a2)])return void _0x3b76d7[_0x10dbc6(0x118)](_0x598469=>_0x2ed069[_0x10dbc6(0x1bd)](_0x598469,_0x10dbc6(0x224)));_0x3b76d7[_0x10dbc6(0x118)](_0x1311cb=>_0x2ed069[_0x10dbc6(0x1bd)](_0x1311cb,_0x10dbc6(0x28c)));const _0x42afa8=_0xead07c({'editor':_0x26284c,'reply':_0x2ed069,'interaction':_0x1213a5,'groups':_0x5ed088,'transform':!0x0,'documentCompare':_0x4d0b55,'documentCompareOptions':{'anchor':_0x10dbc6(0x15a),'markDeletions':!0x1}});let _0x14b374;_0x5a7cb1&&this[_0x10dbc6(0x1c9)](_0x5a7cb1[_0x10dbc6(0x1c3)]),_0x26284c[_0x10dbc6(0x193)][_0x10dbc6(0x12f)](_0x54073b=>{const _0x20291c=_0x10dbc6;_0x14b374=_0x54073b[_0x20291c(0x12c)];for(const _0x1d35fa of _0x42afa8)_0x1d35fa[_0x20291c(0x184)]=_0x26284c[_0x20291c(0x193)][_0x20291c(0x202)][_0x20291c(0x19a)],_0x41ef8f(_0x26284c,_0x1d35fa),_0x54073b[_0x20291c(0x12c)][_0x20291c(0x1b0)](_0x1d35fa),_0x26284c[_0x20291c(0x193)][_0x20291c(0x1b1)](_0x1d35fa);}),this[_0x10dbc6(0x183)][_0x10dbc6(0x24f)](_0x14b374,{'interactionId':_0x1213a5['id'],'replyId':_0x2ed069['id'],'indexes':_0x3b76d7[_0x10dbc6(0x1b8)]()}),this[_0x10dbc6(0x22c)](_0x2ed069);}[_0x4aec30(0x225)](_0x5dad3b){const _0x2f393a=_0x4aec30,{reply:_0x4f3bc4}=this[_0x2f393a(0x1d7)](_0x5dad3b[_0x2f393a(0x213)]);_0x4f3bc4[_0x2f393a(0x1bd)](_0x5dad3b[_0x2f393a(0x262)],_0x2f393a(0x133));}[_0x4aec30(0x27e)](_0x522719,_0x5f3f29){const _0x31c128=_0x4aec30;if(!this[_0x31c128(0x112)])return;const {reply:_0x366fd9}=this[_0x31c128(0x1d7)](_0x522719),_0x5482fa=_0x366fd9[_0x31c128(0x28b)]({'showDiff':this[_0x31c128(0x218)]});let _0x45263e,_0x13cef4;if(void 0x0!==_0x5f3f29?(_0x13cef4=_0x5482fa[_0x31c128(0x159)](_0x215322=>_0x215322[_0x31c128(0x297)]==_0x5f3f29),_0x45263e=_0x13cef4?.[_0x31c128(0x297)]):(_0x13cef4=_0x5482fa[0x0],_0x45263e=_0x13cef4[_0x31c128(0x297)]),this[_0x31c128(0x22e)]?.[_0x31c128(0x213)]==_0x522719&&this[_0x31c128(0x22e)]?.[_0x31c128(0x262)]==_0x45263e)return;const _0x5c835a=this[_0x31c128(0x13a)](_0x522719,_0x366fd9,_0x13cef4);if(!_0x5c835a)return void this[_0x31c128(0x112)][_0x31c128(0x111)]();this[_0x31c128(0x22e)]={'replyId':_0x522719,'partIndex':_0x45263e},this[_0x31c128(0x1c9)](_0x5c835a,!0x0);const _0x18a9d0=this[_0x31c128(0x229)](_0x522719,_0x45263e,_0x31c128(0x189));this[_0x31c128(0x112)][_0x31c128(0x1b7)]({'part':_0x13cef4,'renderingStrategy':_0x31c128(0x241)}),this[_0x31c128(0x112)][_0x31c128(0x236)]({'index':_0x45263e,'title':_0x21db9d(this[_0x31c128(0x198)][_0x31c128(0x14d)],_0x31c128(0x10c),(_0x45263e+0x1)[_0x31c128(0x296)]()),'showRotator':null!==_0x18a9d0,'ranges':[_0x5c835a],'areActionsDisabled':_0x366fd9[_0x31c128(0x1de)]}),this[_0x31c128(0x112)][_0x31c128(0x1fd)](_0x31c128(0x1e4)),this[_0x31c128(0x1aa)][_0x31c128(0x274)](_0x522719,_0x45263e),this[_0x31c128(0x1aa)][_0x31c128(0x272)]({'id':_0x522719,'index':_0x45263e,'isActive':!0x0});}[_0x4aec30(0x229)](_0x5abd00,_0x3181ee,_0x288883){const _0x361b09=_0x4aec30,{reply:_0x18fbff}=this[_0x361b09(0x1d7)](_0x5abd00),_0x1c6160=_0x18fbff[_0x361b09(0x28b)]({'showDiff':this[_0x361b09(0x218)]});if(0x1==_0x1c6160[_0x361b09(0x238)])return null;const _0x2b5bb8=_0x1c6160[_0x361b09(0x1ee)](_0x5acae0=>_0x5acae0[_0x361b09(0x297)]==_0x3181ee),_0x30e979=_0x361b09(0x189)==_0x288883?0x1:-0x1;let _0x534958=_0x1c6160['at']((_0x2b5bb8+_0x30e979)%_0x1c6160[_0x361b09(0x238)])[_0x361b09(0x297)],_0xa44b4e=_0x1c6160[_0x534958];for(;!this[_0x361b09(0x13a)](_0x5abd00,_0x18fbff,_0xa44b4e);){if(_0x534958=_0x1c6160['at']((_0x534958+_0x30e979)%_0x1c6160[_0x361b09(0x238)])[_0x361b09(0x297)],_0x534958===_0x2b5bb8)return null;_0xa44b4e=_0x1c6160[_0x534958];}return _0x534958;}[_0x4aec30(0x13a)](_0x534aa2,_0x14e6f4,_0x5551ed){const _0x5df857=_0x4aec30,_0x36dc3c=_0x14e6f4[_0x5df857(0x1a5)];if(!_0x5551ed[_0x5df857(0x186)])return null;const _0x1539fc=_0x36dc3c[_0x5df857(0x159)](_0x5588b6=>_0x5588b6[_0x5df857(0x297)]==_0x5551ed[_0x5df857(0x297)]);if(_0x5df857(0x1e4)!==_0x1539fc?.[_0x5df857(0x20e)])return null;const _0x5c979e=this[_0x5df857(0x290)](_0x534aa2,_0x5551ed[_0x5df857(0x297)]);if(!_0x5c979e)return null;const {range:_0x162336,currentIndex:_0x56d0af}=_0x5c979e;return _0x5df857(0x113)==_0x162336[_0x5df857(0x1b4)][_0x5df857(0x1a2)]?(_0x14e6f4[_0x5df857(0x1bd)](_0x56d0af,_0x5df857(0x224)),null):_0x5c979e[_0x5df857(0x1c3)];}[_0x4aec30(0x290)](_0xde782d,_0x776a94){const _0x23a962=_0x4aec30,_0x960e8f=_0x290b8e(this[_0x23a962(0x198)]),{reply:_0x53ad5e,interaction:_0x22c955}=this[_0x23a962(0x1d7)](_0xde782d),_0x4eff3a=_0x53ad5e[_0x23a962(0x1a5)][_0x23a962(0x294)](_0x3fa992=>_0x23a962(0x1e4)==_0x3fa992[_0x23a962(0x20e)]),_0x569e12=_0x4eff3a[_0x23a962(0x1fc)](_0x1a115e=>_0x53ad5e[_0x23a962(0x1a5)][_0x23a962(0x208)](_0x1a115e));void 0x0===_0x776a94&&(_0x776a94=_0x569e12[0x0]);const _0x3e1185=_0x569e12[_0x23a962(0x208)](_0x776a94);if(-0x1==_0x3e1185)return null;const _0x3325e3=_0x4eff3a[_0x3e1185],_0x27bb3d=new _0x54b8e7([]),_0x35496c=new _0x54b8e7([]);for(const _0x27d5e8 of _0x3325e3[_0x23a962(0x280)])if(_0x23a962(0x285)!=_0x27d5e8[_0x23a962(0x1ce)]&&_0x35496c[_0x23a962(0x1d0)][_0x23a962(0x22a)](_0x27d5e8[_0x23a962(0x276)][_0x23a962(0x1e2)](!0x0)),_0x23a962(0x141)!=_0x27d5e8[_0x23a962(0x1ce)]){const _0x24a2ad=_0x484cdd(_0x254657=>_0x4b6112(_0x254657,_0x23a962(0x261))==_0x27d5e8['id'],_0x53ad5e[_0x23a962(0x211)],!0x0);_0x27bb3d[_0x23a962(0x1d0)][_0x23a962(0x22a)](_0x24a2ad[_0x23a962(0x1e2)](!0x0));}if(0x0==_0x27bb3d[_0x23a962(0x1d0)][_0x23a962(0x238)]){if(_0x3325e3[_0x23a962(0x280)][0x0][_0x23a962(0x132)]){const _0x2652d7=_0x5e9a27(_0x23a962(0x261),_0x3325e3[_0x23a962(0x280)][0x0][_0x23a962(0x132)],_0x53ad5e[_0x23a962(0x211)]);_0x27bb3d[_0x23a962(0x1d0)][_0x23a962(0x1ff)](_0x2652d7[_0x23a962(0x1e2)](!0x0)),_0x35496c[_0x23a962(0x1d0)][_0x23a962(0x1ff)](_0x2652d7[_0x23a962(0x1e2)](!0x0)),_0x2652d7[_0x23a962(0x128)]&&(_0x27bb3d[_0x23a962(0x1d0)][_0x23a962(0x22a)](_0x2652d7[_0x23a962(0x128)][_0x23a962(0x1e2)](!0x0)),_0x35496c[_0x23a962(0x1d0)][_0x23a962(0x22a)](_0x2652d7[_0x23a962(0x128)][_0x23a962(0x1e2)](!0x0)));}else{const _0x44041e=_0x53ad5e[_0x23a962(0x211)][_0x23a962(0x1d0)][0x0];if(!_0x44041e)return null;_0x27bb3d[_0x23a962(0x1d0)][_0x23a962(0x22a)](_0x44041e[_0x23a962(0x1e2)](!0x0)),_0x35496c[_0x23a962(0x1d0)][_0x23a962(0x22a)](_0x44041e[_0x23a962(0x1e2)](!0x0));}}const _0x3b9fe1=_0x22c955[_0x23a962(0x25e)](),_0x2082ef=_0x960e8f[_0x23a962(0x267)][_0x23a962(0x21b)](_0x3b9fe1[_0x23a962(0x1f6)]),_0x23b673=_0x33812c(_0x27bb3d),_0x1d0c5f=_0x960e8f[_0x23a962(0x267)][_0x23a962(0x21b)](_0x23b673),_0x29c3e3=_0x960e8f[_0x23a962(0x267)][_0x23a962(0x21b)](_0x23b673),_0x58cfb0=_0x960e8f[_0x23a962(0x193)][_0x23a962(0x17b)](_0x1d0c5f,0x0),_0x39e0cc=_0x33812c(_0x35496c),_0x2a2d1a={'anchor':_0x58cfb0,'markDeletions':!0x1},_0x12b090=_0x960e8f[_0x23a962(0x175)][_0x23a962(0x1ec)](_0x344554)[_0x23a962(0x24a)](_0x23b673,_0x39e0cc,_0x2a2d1a)[_0x23a962(0x244)]();if(!_0x12b090[_0x23a962(0x238)])return null;_0x960e8f[_0x23a962(0x193)][_0x23a962(0x12f)](_0x3db23d=>{const _0x2b1add=_0x23a962;for(const _0x23ac29 of _0x12b090)if(_0x2b1add(0x148)==_0x23ac29[_0x2b1add(0x1ce)]){const _0x38f4d7=_0x23ac29[_0x2b1add(0x28d)],_0x3b8711=_0x23ac29[_0x2b1add(0x1c6)],_0x552ad5=new _0x45cacf(_0x38f4d7,_0x3b8711);_0x3db23d[_0x2b1add(0x12c)][_0x2b1add(0x1b0)](_0x552ad5),_0x960e8f[_0x2b1add(0x193)][_0x2b1add(0x1b1)](_0x552ad5);}else _0x2b1add(0x165)!==_0x23ac29[_0x2b1add(0x1ce)]&&(_0x23ac29[_0x2b1add(0x184)]=null,_0x23ac29[_0x2b1add(0x199)]=!0x1,_0x3db23d[_0x2b1add(0x12c)][_0x2b1add(0x1b0)](_0x23ac29),_0x960e8f[_0x2b1add(0x193)][_0x2b1add(0x1b1)](_0x23ac29));});const _0x42b7b5=_0x4101dd(_0x960e8f,_0x12b090,_0x1d0c5f);_0x1ec15d(_0x960e8f[_0x23a962(0x193)],_0x42b7b5);const _0x3a9742=_0x42b7b5[_0x23a962(0x117)]()[_0x23a962(0x265)][_0x23a962(0x164)][_0x23a962(0x1b8)](),_0x90fbf0=_0x42b7b5[_0x23a962(0x117)]()[_0x23a962(0x284)][_0x23a962(0x164)][_0x23a962(0x1b8)](),_0x2fbc77=[];let _0x4c70da=_0x1d0c5f,_0x1d45da=_0x29c3e3;for(let _0x3b6761=0x0;_0x3b6761<_0x90fbf0[_0x23a962(0x238)];_0x3b6761++){const _0x186acb=_0x4c70da[_0x23a962(0x1f4)]-_0x90fbf0[_0x3b6761];_0x2fbc77[_0x3b6761]=_0x1d45da[_0x23a962(0x1f4)]-_0x186acb,_0x4c70da=_0x4c70da[_0x23a962(0x1e5)](_0x90fbf0[_0x3b6761]),_0x1d45da=_0x1d45da[_0x23a962(0x1e5)](_0x2fbc77[_0x3b6761]);}const _0x110a43=_0x960e8f[_0x23a962(0x193)][_0x23a962(0x1d4)](_0x960e8f[_0x23a962(0x193)][_0x23a962(0x1e7)](_0x29c3e3,_0x3a9742),_0x960e8f[_0x23a962(0x193)][_0x23a962(0x1e7)](_0x29c3e3,_0x2fbc77)),_0x4b3a7e=_0x29c3e3[_0x23a962(0x1f1)](0x0)[_0x23a962(0x16b)](_0x2f75ed),_0x1b5296=Array[_0x23a962(0x176)](_0x2082ef[_0x23a962(0x1dd)]())[_0x23a962(0x159)](_0x8d4cdd=>_0x8d4cdd[_0x23a962(0x16b)](_0x2f75ed)==_0x4b3a7e)[_0x23a962(0x14a)](),_0x1f3ccf=_0x110a43[_0x23a962(0x265)][_0x23a962(0x164)][_0x23a962(0x1b8)](),_0x329ce7=_0x110a43[_0x23a962(0x284)][_0x23a962(0x164)][_0x23a962(0x1b8)]();_0x1f3ccf[0x0]=_0x1b5296[0x0]+_0x1f3ccf[0x0],_0x329ce7[0x0]=_0x1b5296[0x0]+_0x329ce7[0x0];let _0x57a0d2=_0x960e8f[_0x23a962(0x193)][_0x23a962(0x1d4)](_0x960e8f[_0x23a962(0x193)][_0x23a962(0x1e7)](_0x960e8f[_0x23a962(0x193)][_0x23a962(0x202)][_0x23a962(0x28a)](),_0x1f3ccf),_0x960e8f[_0x23a962(0x193)][_0x23a962(0x1e7)](_0x960e8f[_0x23a962(0x193)][_0x23a962(0x202)][_0x23a962(0x28a)](),_0x329ce7));const _0x52ceef=_0x960e8f[_0x23a962(0x193)][_0x23a962(0x202)][_0x23a962(0x25d)][_0x23a962(0x244)](_0x3b9fe1[_0x23a962(0x19a)]);for(const _0xb7f6e0 of _0x52ceef)_0x57a0d2=_0x561fcf[_0x23a962(0x1f5)](_0x57a0d2[_0x23a962(0x1f9)](_0xb7f6e0));return{'range':_0x57a0d2,'currentIndex':_0x776a94};}[_0x4aec30(0x203)](_0x16df4e){const _0x340dfe=_0x4aec30;if(!_0x16df4e[_0x340dfe(0x175)][_0x340dfe(0x11d)](_0x340dfe(0x14e)))return;const _0x56b299=_0x16df4e[_0x340dfe(0x245)][_0x340dfe(0x1ec)](_0x340dfe(0x24b)),_0x1c6563=_0x16df4e[_0x340dfe(0x245)][_0x340dfe(0x1ec)](_0x340dfe(0x13c));this[_0x340dfe(0x23c)](_0x56b299,_0x340dfe(0x182),(_0x5a5381,_0x5e137c,_0x50a974)=>{const _0x13e6c5=_0x340dfe,_0xdcb7df=this[_0x13e6c5(0x183)][_0x13e6c5(0x1ec)](_0x5e137c);if(!_0xdcb7df)return;const _0x21910b=this[_0x13e6c5(0x1af)][_0x13e6c5(0x16f)](_0xdcb7df[_0x13e6c5(0x1f2)])[_0x13e6c5(0x126)](_0xdcb7df[_0x13e6c5(0x213)]);_0xdcb7df[_0x13e6c5(0x181)][_0x13e6c5(0x118)](_0x1607a6=>_0x21910b[_0x13e6c5(0x1bd)](_0x1607a6,_0x13e6c5(0x1e4))),this[_0x13e6c5(0x183)][_0x13e6c5(0x12d)](_0x5e137c),this[_0x13e6c5(0x183)][_0x13e6c5(0x24f)](_0x50a974,_0xdcb7df);}),this[_0x340dfe(0x23c)](_0x1c6563,_0x340dfe(0x182),(_0xb0e19c,_0x59fd0c,_0x3f9f8d)=>{const _0x26cdd2=_0x340dfe,_0x10dfea=this[_0x26cdd2(0x183)][_0x26cdd2(0x1ec)](_0x59fd0c);if(!_0x10dfea)return;const _0x3ba4e7=this[_0x26cdd2(0x1af)][_0x26cdd2(0x16f)](_0x10dfea[_0x26cdd2(0x1f2)])[_0x26cdd2(0x126)](_0x10dfea[_0x26cdd2(0x213)]);_0x10dfea[_0x26cdd2(0x181)][_0x26cdd2(0x118)](_0x1b2efa=>_0x3ba4e7[_0x26cdd2(0x1bd)](_0x1b2efa,_0x26cdd2(0x28c))),this[_0x26cdd2(0x183)][_0x26cdd2(0x12d)](_0x59fd0c),this[_0x26cdd2(0x183)][_0x26cdd2(0x24f)](_0x3f9f8d,_0x10dfea);});}async[_0x4aec30(0x1bc)](_0x509809){const _0x46d259=_0x4aec30;this[_0x46d259(0x198)][_0x46d259(0x175)][_0x46d259(0x11d)](_0x46d259(0x14f))&&this[_0x46d259(0x198)][_0x46d259(0x175)][_0x46d259(0x1ec)](_0x46d259(0x14f))[_0x46d259(0x111)](),(this[_0x46d259(0x198)][_0x46d259(0x175)][_0x46d259(0x1ec)](_0x330bc8)[_0x46d259(0x143)][_0x46d259(0x150)](_0x46d259(0x160)),this[_0x46d259(0x1aa)][_0x46d259(0x194)](_0x46d259(0x241)),this[_0x46d259(0x1aa)][_0x46d259(0x282)](!0x0),await this[_0x46d259(0x201)]());try{await this[_0x46d259(0x158)][_0x46d259(0x214)](_0x509809)[_0x46d259(0x20d)](),await this[_0x46d259(0x155)](_0x509809),this[_0x46d259(0x1db)]('\x20'),await this[_0x46d259(0x1af)][_0x46d259(0x15b)](_0x509809,this[_0x46d259(0x205)][_0x46d259(0x1f3)]),this[_0x46d259(0x1af)][_0x46d259(0x13d)]()&&this[_0x46d259(0x1b6)]();}catch(_0x33b1f4){this[_0x46d259(0x1aa)][_0x46d259(0x129)]({'errorMessage':_0x21db9d(this[_0x46d259(0x198)][_0x46d259(0x14d)],_0x46d259(0x200)),'id':_0x509809}),this[_0x46d259(0x209)](new _0x3f52cf(_0x46d259(0x1ae),this,{'error':_0x33b1f4}));}finally{this[_0x46d259(0x1aa)][_0x46d259(0x27b)](),this[_0x46d259(0x1aa)][_0x46d259(0x194)](_0x46d259(0x217)),this[_0x46d259(0x1aa)][_0x46d259(0x282)](!0x1);}}async[_0x4aec30(0x1f7)](){const _0x35cdf0=_0x4aec30,_0x523eab=this[_0x35cdf0(0x158)][_0x35cdf0(0x1e1)](this[_0x35cdf0(0x246)](),{'limit':0x1,'sortBy':_0x35cdf0(0x1c8)});try{const _0x87a577=await _0x523eab[_0x35cdf0(0x26c)]();return _0x87a577[_0x35cdf0(0x238)]?_0x87a577[0x0]['id']:_0x35cdf0(0x141);}catch(_0x5a31ed){return this[_0x35cdf0(0x1aa)][_0x35cdf0(0x129)]({'errorMessage':_0x21db9d(this[_0x35cdf0(0x198)][_0x35cdf0(0x14d)],_0x35cdf0(0x200)),'id':_0x4720f6()}),this[_0x35cdf0(0x209)](new _0x3f52cf(_0x35cdf0(0x124),this,{'error':_0x5a31ed})),this[_0x35cdf0(0x1aa)][_0x35cdf0(0x282)](!0x1),this[_0x35cdf0(0x1aa)][_0x35cdf0(0x137)](),null;}}[_0x4aec30(0x24d)](_0x115608){const _0x1c142b=_0x4aec30;this[_0x1c142b(0x1af)]['id']===_0x115608&&this[_0x1c142b(0x155)]();}[_0x4aec30(0x1b6)](){const _0x541927=_0x4aec30;this[_0x541927(0x1af)]?.[_0x541927(0x25c)](_0x21db9d(this[_0x541927(0x198)][_0x541927(0x14d)],_0x541927(0x1c7)));}async[_0x4aec30(0x21c)](){const _0x6a5a53=_0x4aec30,_0x243208=this[_0x6a5a53(0x205)][_0x6a5a53(0x20a)]();this[_0x6a5a53(0x1af)]?.[_0x6a5a53(0x243)](_0x243208),this[_0x6a5a53(0x1b6)]();}[_0x4aec30(0x12b)](){const _0x269901=_0x4aec30;this[_0x269901(0x1af)]?.[_0x269901(0x20f)]();}[_0x4aec30(0x20b)](){const _0x3ea81e=_0x4aec30;this[_0x3ea81e(0x1aa)][_0x3ea81e(0x20b)]();}async[_0x4aec30(0x11e)](){const _0x5ec010=_0x4aec30;await this[_0x5ec010(0x155)]();}async[_0x4aec30(0x26a)]({message:_0x3b0807,attributes:_0xdc0d36}){const _0x1bf6cf=_0x4aec30;await this[_0x1bf6cf(0x21f)]({'userMessage':_0x3b0807,'attributes':_0xdc0d36});}[_0x4aec30(0x246)](){const _0x1aa12e=_0x4aec30,_0x353081=this[_0x1aa12e(0x198)][_0x1aa12e(0x28f)][_0x1aa12e(0x1ec)](_0x1aa12e(0x266));if(!_0x353081)throw new _0x3f52cf(_0x1aa12e(0x1a8),this);return _0x353081;}async[_0x4aec30(0x155)](_0x457de0){const _0x5ce60c=_0x4aec30;try{this[_0x5ce60c(0x1aa)][_0x5ce60c(0x144)](),await this[_0x5ce60c(0x1bf)](_0x457de0);}catch(_0x593672){this[_0x5ce60c(0x1aa)][_0x5ce60c(0x129)]({'errorMessage':_0x21db9d(this[_0x5ce60c(0x198)][_0x5ce60c(0x14d)],_0x5ce60c(0x21a)),'id':_0x457de0||_0x4720f6()}),console[_0x5ce60c(0x275)](_0x593672),this[_0x5ce60c(0x1af)]=void 0x0,this[_0x5ce60c(0x1aa)][_0x5ce60c(0x137)]();}}async[_0x4aec30(0x1bf)](_0x4c6e15){const _0x1f4248=_0x4aec30;let _0x52e5bf;this[_0x1f4248(0x198)][_0x1f4248(0x175)][_0x1f4248(0x11d)](_0x1f4248(0x14f))&&this[_0x1f4248(0x198)][_0x1f4248(0x175)][_0x1f4248(0x1ec)](_0x1f4248(0x14f))[_0x1f4248(0x111)](),_0x4c6e15||!this[_0x1f4248(0x1af)]?_0x52e5bf=this[_0x1f4248(0x198)][_0x1f4248(0x28f)][_0x1f4248(0x1ec)](_0x1f4248(0x219)):this[_0x1f4248(0x1aa)][_0x1f4248(0x19c)]&&(_0x52e5bf=this[_0x1f4248(0x1af)][_0x1f4248(0x1c4)]['id']),await this[_0x1f4248(0x201)]();const _0x3c9c20=this[_0x1f4248(0x246)](),_0x6b6ff0=_0x4c6e15||_0x4720f6();this[_0x1f4248(0x1af)]=new _0x5a7bde({'connector':this[_0x1f4248(0x158)],'chatModels':this[_0x1f4248(0x264)],'selectedModelId':_0x52e5bf,'conversationId':_0x6b6ff0,'group':_0x3c9c20,'getEditor':()=>_0x290b8e(this[_0x1f4248(0x198)]),'isFromHistory':!!_0x4c6e15}),this[_0x1f4248(0x1af)][_0x1f4248(0x22f)](_0x1f4248(0x142),_0x1f4248(0x1f8))['to'](this),this[_0x1f4248(0x1af)]['on'](_0x1f4248(0x247),(_0x2cfc23,_0x561c47)=>{const _0x3cbdd3=_0x1f4248;this[_0x3cbdd3(0x1aa)][_0x3cbdd3(0x27a)](_0x561c47),this[_0x3cbdd3(0x1aa)][_0x3cbdd3(0x1a6)](),this[_0x3cbdd3(0x1aa)][_0x3cbdd3(0x1cd)](),this[_0x3cbdd3(0x1aa)][_0x3cbdd3(0x271)](),_0x4c6e15||(this[_0x3cbdd3(0x1aa)][_0x3cbdd3(0x257)](),this[_0x3cbdd3(0x1b6)]());}),this[_0x1f4248(0x1af)]['on'](_0x1f4248(0x26b),(_0x3a47c6,_0x314f2b)=>{const _0x122d8c=_0x1f4248;this[_0x122d8c(0x1aa)][_0x122d8c(0x140)](_0x314f2b[_0x122d8c(0x22d)]);}),this[_0x1f4248(0x1af)]['on'](_0x1f4248(0x248),(_0x56808a,_0x1e766c)=>{const _0x2866d8=_0x1f4248;this[_0x2866d8(0x1aa)][_0x2866d8(0x263)](_0x1e766c);}),this[_0x1f4248(0x1af)]['on'](_0x1f4248(0x240),()=>{const _0x563e54=_0x1f4248,_0x2110e2=this[_0x563e54(0x1aa)][_0x563e54(0x167)]({'isWebSearchEnabled':!0x0,'isReasoningEnabled':!0x1});this[_0x563e54(0x1aa)][_0x563e54(0x192)](_0x2110e2);}),this[_0x1f4248(0x1af)]['on'](_0x1f4248(0x298),()=>{const _0x3a9532=_0x1f4248,_0x43e54d=this[_0x3a9532(0x1aa)][_0x3a9532(0x167)]({'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x0});this[_0x3a9532(0x1aa)][_0x3a9532(0x192)](_0x43e54d);}),this[_0x1f4248(0x1af)]['on'](_0x1f4248(0x220),(_0x1a6a36,_0x2c5c6d)=>{const _0x2743fc=_0x1f4248;this[_0x2743fc(0x1aa)][_0x2743fc(0x255)](_0x2c5c6d,{'isWebSearchEnabled':!0x0,'isReasoningEnabled':!0x1});}),this[_0x1f4248(0x1af)]['on'](_0x1f4248(0x11f),(_0xfc56d7,_0x3f6e74)=>{const _0x2e88ac=_0x1f4248;this[_0x2e88ac(0x1aa)][_0x2e88ac(0x255)](_0x3f6e74,{'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x0});}),this[_0x1f4248(0x1af)]['on'](_0x1f4248(0x1f8),()=>{const _0x2e0b94=_0x1f4248;this[_0x2e0b94(0x1aa)][_0x2e0b94(0x163)]();}),this[_0x1f4248(0x1af)]['on'](_0x1f4248(0x17a),async()=>{const _0x1ba3c7=_0x1f4248;await this[_0x1ba3c7(0x1aa)][_0x1ba3c7(0x289)]();}),this[_0x1f4248(0x1af)]['on'](_0x1f4248(0x18f),(_0x485ed7,_0x124fa4)=>{const _0x474ad2=_0x1f4248;this[_0x474ad2(0x1aa)][_0x474ad2(0x12e)](_0x124fa4['id']);}),this[_0x1f4248(0x1af)]['on'](_0x1f4248(0x1f0),(_0x61c809,_0x363156,_0x4b7896)=>{const _0x12094d=_0x1f4248;this[_0x12094d(0x1db)](_0x363156,_0x4b7896);}),this[_0x1f4248(0x1af)]['on'](_0x1f4248(0x273),(_0x50e823,_0x28a5cc)=>{const _0x2b557b=_0x1f4248;_0x2b557b(0x295)===_0x28a5cc[_0x2b557b(0x1ce)]?this[_0x2b557b(0x1aa)][_0x2b557b(0x23f)](_0x28a5cc):this[_0x2b557b(0x1aa)][_0x2b557b(0x15e)](_0x28a5cc);}),this[_0x1f4248(0x1af)]['on'](_0x1f4248(0x14c),async(_0x2348be,_0x8ad69e)=>{const _0x14d7f3=_0x1f4248;await this[_0x14d7f3(0x10f)]({'reply':_0x8ad69e});}),this[_0x1f4248(0x1af)]['on'](_0x1f4248(0x197),(_0x5dc1fa,{reply:_0x2fdb42,index:_0x1e54a5,state:_0x3450d3})=>{const _0x31da4c=_0x1f4248;this[_0x31da4c(0x1aa)][_0x31da4c(0x114)]({'id':_0x2fdb42['id'],'index':_0x1e54a5,'state':_0x3450d3}),this[_0x31da4c(0x22e)]?.[_0x31da4c(0x213)][_0x31da4c(0x216)](_0x2fdb42['id'])&&this[_0x31da4c(0x22e)]?.[_0x31da4c(0x262)]==_0x1e54a5&&this[_0x31da4c(0x112)]?.[_0x31da4c(0x1fd)](_0x3450d3);}),this[_0x1f4248(0x1af)]['on'](_0x1f4248(0x1a9),(_0x5ccd5f,_0x5a13b2)=>{const _0xd4575b=_0x1f4248;if(this[_0xd4575b(0x1aa)][_0xd4575b(0x123)](_0x5a13b2[_0xd4575b(0x1ba)],_0x5a13b2[_0xd4575b(0x25a)]),_0xd4575b(0x27c)===_0x5a13b2[_0xd4575b(0x1ba)][_0xd4575b(0x1ce)]){const _0x2d13b5=[..._0x290b8e(this[_0xd4575b(0x198)])[_0xd4575b(0x193)][_0xd4575b(0x202)][_0xd4575b(0x27c)][_0xd4575b(0x1fa)]()];this[_0xd4575b(0x205)][_0xd4575b(0x154)](_0x2d13b5,_0xd4575b(0x139)+this[_0xd4575b(0x1af)]?.['id']);}}),this[_0x1f4248(0x1af)]['on'](_0x1f4248(0x172),(_0x26cd34,_0x2f2d34)=>{const _0x1c3a02=_0x1f4248;this[_0x1c3a02(0x1aa)][_0x1c3a02(0x204)](_0x2f2d34[_0x1c3a02(0x135)]),_0x1c3a02(0x145)==_0x2f2d34[_0x1c3a02(0x135)]&&this[_0x1c3a02(0x12b)](),_0x1c3a02(0x27c)===_0x2f2d34[_0x1c3a02(0x1ce)]&&this[_0x1c3a02(0x205)][_0x1c3a02(0x119)](_0x1c3a02(0x139)+this[_0x1c3a02(0x1af)]?.['id']);}),this[_0x1f4248(0x1af)]['on'](_0x1f4248(0x1ea),(_0x2b3336,_0x12920b)=>{const _0x2c32ad=_0x1f4248;this[_0x2c32ad(0x1aa)][_0x2c32ad(0x130)](_0x12920b[_0x2c32ad(0x1ba)][_0x2c32ad(0x135)],_0x12920b[_0x2c32ad(0x25a)]);}),this[_0x1f4248(0x1af)]['on'](_0x1f4248(0x19f),(_0x14fb63,_0x45036f)=>{const _0x3d406c=_0x1f4248;this[_0x3d406c(0x1aa)][_0x3d406c(0x1c1)](_0x45036f[_0x3d406c(0x157)]);}),this[_0x1f4248(0x1af)]['on'](_0x1f4248(0x151),(_0x4be9af,_0x48b993)=>{const _0x3bde14=_0x1f4248;this[_0x3bde14(0x1aa)][_0x3bde14(0x185)](_0x48b993[_0x3bde14(0x1e0)]);}),this[_0x1f4248(0x1af)]['on'](_0x1f4248(0x168),(_0x2a1bbb,_0x3cc889)=>{const _0x1647e9=_0x1f4248;this[_0x1647e9(0x1aa)][_0x1647e9(0x17f)](_0x3cc889[_0x1647e9(0x12a)],_0x3cc889[_0x1647e9(0x188)],_0x3cc889[_0x1647e9(0x222)],_0x3cc889[_0x1647e9(0x15c)]);}),this[_0x1f4248(0x1af)]['on'](_0x1f4248(0x1df),(_0x3889e4,_0x456332)=>{const _0x272923=_0x1f4248;this[_0x272923(0x1aa)][_0x272923(0x287)](_0x456332[_0x272923(0x12a)],_0x456332[_0x272923(0x17d)],_0x456332[_0x272923(0x1d2)]);}),this[_0x1f4248(0x1af)]['on'](_0x1f4248(0x279),(_0x2ef689,_0x4146a6)=>{const _0x589c7f=_0x1f4248;this[_0x589c7f(0x1aa)][_0x589c7f(0x19e)](_0x4146a6);}),this[_0x1f4248(0x1af)]['on'](_0x1f4248(0x26f),async(_0x481473,_0x50b8a2)=>{const _0x1987a3=_0x1f4248,_0x225848=(await this[_0x1987a3(0x264)][_0x1987a3(0x115)]())[_0x1987a3(0x159)](_0x1948f6=>_0x1948f6['id']===_0x50b8a2[_0x1987a3(0x1c4)]?.['id'])||null;this[_0x1987a3(0x1aa)][_0x1987a3(0x233)](_0x225848,_0x50b8a2[_0x1987a3(0x286)]);}),this[_0x1f4248(0x1af)]['on'](_0x1f4248(0x275),(_0x909f22,{error:_0x3c4060,interactionId:_0x1dfb8c,fileName:_0x42247a,url:_0x2d541f,sourceId:_0x1427ba,sourceLabel:_0x2ab8b5})=>{const _0xb14ba9=_0x1f4248,_0x129db2=_0x1dfb8c?_0x1dfb8c+':'+_0x4720f6():_0x4720f6();_0x3c4060[_0xb14ba9(0x149)][_0xb14ba9(0x116)](_0xb14ba9(0x1cc))?this[_0xb14ba9(0x1aa)][_0xb14ba9(0x231)]({'staticMessage':_0x21db9d(this[_0xb14ba9(0x198)][_0xb14ba9(0x14d)],_0xb14ba9(0x1ef)),'id':_0x129db2}):_0x3c4060[_0xb14ba9(0x149)][_0xb14ba9(0x116)](_0xb14ba9(0x124))||_0x3c4060[_0xb14ba9(0x149)][_0xb14ba9(0x116)](_0xb14ba9(0x1b5))?(this[_0xb14ba9(0x1aa)][_0xb14ba9(0x129)]({'errorMessage':_0x21db9d(this[_0xb14ba9(0x198)][_0xb14ba9(0x14d)],_0xb14ba9(0x21a)),'id':_0x129db2}),this[_0xb14ba9(0x209)](_0x3c4060)):_0x3c4060[_0xb14ba9(0x149)][_0xb14ba9(0x116)](_0xb14ba9(0x1d3))?this[_0xb14ba9(0x1aa)][_0xb14ba9(0x129)]({'errorMessage':_0x21db9d(this[_0xb14ba9(0x198)][_0xb14ba9(0x14d)],_0xb14ba9(0x179),_0x42247a),'id':_0x129db2}):_0x3c4060[_0xb14ba9(0x149)][_0xb14ba9(0x116)](_0xb14ba9(0x174))?this[_0xb14ba9(0x1aa)][_0xb14ba9(0x129)]({'errorMessage':_0x21db9d(this[_0xb14ba9(0x198)][_0xb14ba9(0x14d)],_0xb14ba9(0x1fb),_0x2d541f),'id':_0x129db2}):_0x3c4060[_0xb14ba9(0x149)][_0xb14ba9(0x116)](_0xb14ba9(0x249))?this[_0xb14ba9(0x1aa)][_0xb14ba9(0x129)]({'errorMessage':_0x21db9d(this[_0xb14ba9(0x198)][_0xb14ba9(0x14d)],_0xb14ba9(0x23d)),'id':_0x129db2}):_0x3c4060[_0xb14ba9(0x149)][_0xb14ba9(0x116)](_0xb14ba9(0x259))?this[_0xb14ba9(0x1aa)][_0xb14ba9(0x129)]({'errorMessage':_0x21db9d(this[_0xb14ba9(0x198)][_0xb14ba9(0x14d)],_0xb14ba9(0x1e8)),'id':_0x129db2}):_0x3c4060[_0xb14ba9(0x149)][_0xb14ba9(0x116)](_0xb14ba9(0x147))?(_0x1427ba&&this[_0xb14ba9(0x1aa)][_0xb14ba9(0x14b)](_0x1427ba),this[_0xb14ba9(0x1aa)][_0xb14ba9(0x129)]({'errorMessage':_0x21db9d(this[_0xb14ba9(0x198)][_0xb14ba9(0x14d)],_0xb14ba9(0x291),_0x2ab8b5||_0xb14ba9(0x188)),'id':_0x129db2}),this[_0xb14ba9(0x209)](_0x3c4060)):_0x3c4060[_0xb14ba9(0x149)][_0xb14ba9(0x116)](_0xb14ba9(0x221))?(this[_0xb14ba9(0x1aa)][_0xb14ba9(0x129)]({'errorMessage':_0x21db9d(this[_0xb14ba9(0x198)][_0xb14ba9(0x14d)],_0xb14ba9(0x292)),'id':_0x129db2}),this[_0xb14ba9(0x209)](_0x3c4060)):_0x3c4060[_0xb14ba9(0x149)][_0xb14ba9(0x116)](_0xb14ba9(0x1a3))?(this[_0xb14ba9(0x1aa)][_0xb14ba9(0x129)]({'errorMessage':_0x21db9d(this[_0xb14ba9(0x198)][_0xb14ba9(0x14d)],_0xb14ba9(0x178)),'id':_0x129db2}),this[_0xb14ba9(0x209)](_0x3c4060)):_0x3c4060[_0xb14ba9(0x149)][_0xb14ba9(0x116)](_0xb14ba9(0x127))?(this[_0xb14ba9(0x1aa)][_0xb14ba9(0x129)]({'errorMessage':_0x21db9d(this[_0xb14ba9(0x198)][_0xb14ba9(0x14d)],_0xb14ba9(0x269)),'id':_0x129db2}),this[_0xb14ba9(0x209)](_0x3c4060)):_0x3c4060[_0xb14ba9(0x149)][_0xb14ba9(0x116)](_0xb14ba9(0x234))?(this[_0xb14ba9(0x1aa)][_0xb14ba9(0x129)]({'errorMessage':_0x21db9d(this[_0xb14ba9(0x198)][_0xb14ba9(0x14d)],_0xb14ba9(0x138)),'id':_0x129db2}),this[_0xb14ba9(0x209)](_0x3c4060)):_0x3c4060[_0xb14ba9(0x149)][_0xb14ba9(0x116)](_0xb14ba9(0x258))?(this[_0xb14ba9(0x1aa)][_0xb14ba9(0x129)]({'errorMessage':_0x21db9d(this[_0xb14ba9(0x198)][_0xb14ba9(0x14d)],_0xb14ba9(0x187)),'id':_0x129db2}),this[_0xb14ba9(0x209)](_0x3c4060)):_0x3c4060[_0xb14ba9(0x149)][_0xb14ba9(0x116)](_0xb14ba9(0x1cb))?(this[_0xb14ba9(0x1aa)][_0xb14ba9(0x129)]({'errorMessage':_0x21db9d(this[_0xb14ba9(0x198)][_0xb14ba9(0x14d)],_0xb14ba9(0x237)),'id':_0x129db2}),this[_0xb14ba9(0x209)](_0x3c4060)):(this[_0xb14ba9(0x1aa)][_0xb14ba9(0x129)]({'errorMessage':_0x21db9d(this[_0xb14ba9(0x198)][_0xb14ba9(0x14d)],_0xb14ba9(0x1a0)),'id':_0x129db2}),this[_0xb14ba9(0x209)](_0x3c4060));}),await this[_0x1f4248(0x1af)][_0x1f4248(0x191)](this[_0x1f4248(0x198)][_0x1f4248(0x28f)][_0x1f4248(0x1ec)](_0x1f4248(0x17e))),_0x4c6e15||await this[_0x1f4248(0x1af)][_0x1f4248(0x265)]();}async[_0x4aec30(0x21f)]({userMessage:_0x796e6e,attributes:_0x5b4976}){const _0x5641ad=_0x4aec30;if(!this[_0x5641ad(0x1af)])throw new _0x3f52cf(_0x5641ad(0x1e6));if(this[_0x5641ad(0x1af)][_0x5641ad(0x1b3)]()){const _0x17a232=await this[_0x5641ad(0x205)][_0x5641ad(0x15d)]();await this[_0x5641ad(0x1af)][_0x5641ad(0x1c5)](_0x17a232);}this[_0x5641ad(0x1af)]['id']&&this[_0x5641ad(0x1af)][_0x5641ad(0x13e)]&&await this[_0x5641ad(0x1af)][_0x5641ad(0x16a)]({'userMessage':_0x796e6e,'attributes':_0x5b4976});}[_0x4aec30(0x270)](){const _0x310d29=_0x4aec30;console[_0x310d29(0x1da)](_0x310d29(0x16e));}[_0x4aec30(0x235)](_0x2e6270){const _0x21fd25=_0x4aec30;this[_0x21fd25(0x1aa)][_0x21fd25(0x10e)](_0x2e6270);}[_0x4aec30(0x209)](_0x52bd02){const _0x10aabe=_0x4aec30;_0x306496(_0x52bd02[_0x10aabe(0x149)]);}[_0x4aec30(0x1d9)](_0x44133c){const _0x5de069=_0x4aec30;this[_0x5de069(0x1af)]?.[_0x5de069(0x27f)](_0x44133c);}[_0x4aec30(0x146)](){const _0x79d522=_0x4aec30;this[_0x79d522(0x1af)]?.[_0x79d522(0x227)]();}[_0x4aec30(0x1a4)](){const _0x54a72c=_0x4aec30;this[_0x54a72c(0x1af)]?.[_0x54a72c(0x136)]();}[_0x4aec30(0x1d7)](_0xb8aaa4){const _0x3e82ce=_0x4aec30,[_0x120933,_0x42afe1]=_0xb8aaa4[_0x3e82ce(0x207)](':'),_0x72261e=this[_0x3e82ce(0x1af)][_0x3e82ce(0x16f)](_0x120933),_0x1b3a40=_0x72261e[_0x3e82ce(0x126)](_0x42afe1);return{'interaction':_0x72261e,'reply':_0x1b3a40};}[_0x4aec30(0x1c9)](_0x316152,_0x32ce86=!0x1){const _0x3236f9=_0x4aec30,_0x3b4e35=_0x290b8e(this[_0x3236f9(0x198)]),_0x3ff9ed={'target':_0x3b4e35[_0x3236f9(0x23a)][_0x3236f9(0x143)][_0x3236f9(0x277)][_0x3236f9(0x166)](_0x3b4e35[_0x3236f9(0x23a)][_0x3236f9(0x278)][_0x3236f9(0x180)](_0x316152)),'viewportOffset':{'top':0x96,'left':0x0,'bottom':0x32,'right':0x0},'ancestorOffset':0x14,'alignToTop':_0x32ce86};_0x32ce86&&(_0x3ff9ed[_0x3236f9(0x1ca)]=!0x0),_0x59f77d(_0x3ff9ed);}[_0x4aec30(0x1db)](_0x8cb4cb,_0x5547da=!0x1){const _0x42fbdc=_0x4aec30;this[_0x42fbdc(0x1aa)][_0x42fbdc(0x1f0)](_0x8cb4cb||_0x21db9d(this[_0x42fbdc(0x198)][_0x42fbdc(0x14d)],_0x42fbdc(0x18a)),_0x5547da);}async[_0x4aec30(0x10f)]({reply:_0x381995,renderingStrategy:_0xff338d}){const _0x1f8631=_0x4aec30,{id:_0x375bd5,interactionId:_0x4ce8e7,isDone:_0x5a71ca,type:_0x479293,parsedContent:_0x5e98c7}=_0x381995,_0x5c5eef=_0x4ce8e7+':'+_0x375bd5;if(_0x1f8631(0x25b)===_0x479293){const _0x37f1f8=_0x381995[_0x1f8631(0x28b)]({'showDiff':this[_0x1f8631(0x1aa)][_0x1f8631(0x1eb)]});await this[_0x1f8631(0x1aa)][_0x1f8631(0x15f)]({'id':_0x5c5eef,'parts':_0x37f1f8,'renderingStrategy':_0xff338d,'isDone':_0x5a71ca});}else _0x1f8631(0x295)===_0x479293&&await this[_0x1f8631(0x1aa)][_0x1f8631(0x1fe)]({'id':_0x5c5eef,'parsedContent':_0x5e98c7,'renderingStrategy':_0xff338d,'isDone':_0x5a71ca});_0x5a71ca&&_0x381995[_0x1f8631(0x196)][_0x1f8631(0x238)]>0x0&&this[_0x1f8631(0x1aa)][_0x1f8631(0x1ed)](_0x5c5eef,_0x381995[_0x1f8631(0x196)]);}async[_0x4aec30(0x201)](){const _0x57eef4=_0x4aec30,_0x3e5909=this[_0x57eef4(0x1af)]?.[_0x57eef4(0x223)];_0x3e5909&&(_0x3e5909[_0x57eef4(0x131)](),this[_0x57eef4(0x1aa)][_0x57eef4(0x27d)](_0x3e5909));}async[_0x4aec30(0x215)](){const _0x3cb086=_0x4aec30,_0x1d14f2=this[_0x3cb086(0x1af)]?.[_0x3cb086(0x223)];if(_0x1d14f2){for await(const _0x4f6e96 of _0x1d14f2[_0x3cb086(0x268)])await this[_0x3cb086(0x10f)]({'reply':_0x4f6e96,'renderingStrategy':_0x3cb086(0x241)});}}[_0x4aec30(0x22c)](_0x2a388f){const _0x2600b7=_0x4aec30,_0x32e0b7={'positiveCount':_0x2a388f[_0x2600b7(0x1a5)][_0x2600b7(0x294)](_0x3d2bed=>_0x2600b7(0x28c)===_0x3d2bed[_0x2600b7(0x20e)])[_0x2600b7(0x238)],'totalCount':_0x2a388f[_0x2600b7(0x1a5)][_0x2600b7(0x238)],'modificationId':_0x2a388f['id']},_0x572098=this[_0x2600b7(0x1af)][_0x2600b7(0x16f)](_0x2a388f[_0x2600b7(0x1f2)])[_0x2600b7(0x226)];_0x572098&&this[_0x2600b7(0x158)][_0x2600b7(0x1e9)](this[_0x2600b7(0x1af)]['id'],_0x572098,_0x32e0b7);}[_0x4aec30(0x171)](_0x5e6343){const _0x58bf86=_0x4aec30;let _0x5e461=null,_0x47f95a=null;this['on'](_0x58bf86(0x142),(_0x56ac52,_0x57fb8d,_0x3fb62c)=>{const _0x7ab809=_0x58bf86;_0x3fb62c['id']!==_0x5e461&&(_0x5e461=_0x3fb62c['id'],_0x47f95a=this[_0x7ab809(0x1a1)](_0x3fb62c)),_0x5e6343(_0x57fb8d,_0x47f95a);});}[_0x4aec30(0x1a1)](_0x5caafa){const _0x322e10=_0x4aec30,_0x49b20e=this[_0x322e10(0x1aa)],_0x2fdce6=()=>{const _0x17e981=_0x322e10;_0x5caafa[_0x17e981(0x16c)](),_0x5caafa[_0x17e981(0x23b)](),_0x49b20e[_0x17e981(0x195)]();},_0x16bcc0=()=>{const _0x57f55f=_0x322e10;_0x5caafa[_0x57f55f(0x1c2)]&&(_0x5caafa[_0x57f55f(0x1c2)][_0x57f55f(0x1c0)](),_0x5caafa[_0x57f55f(0x1c2)]=void 0x0);};return{'insertTextReply':(_0x55cd49,_0x153529)=>{const _0x6ed317=_0x322e10;_0x16bcc0(),_0x2fdce6();const _0x5e703e=_0x5caafa[_0x6ed317(0x1c2)]=_0x5caafa[_0x6ed317(0x283)]({'type':_0x6ed317(0x295),'interactionId':_0x5caafa['id'],'content':_0x55cd49,'id':_0x153529||_0x4720f6()});return _0x16bcc0(),_0x5e703e;},'insertCustomElement':async(_0x46ebab,_0x3a138d)=>(_0x16bcc0(),_0x2fdce6(),_0x49b20e[_0x322e10(0x21e)](_0x46ebab,_0x3a138d||_0x4720f6())),'setLoadingMessage':_0x4f5a73=>{const _0x3148cd=_0x322e10;_0x49b20e[_0x3148cd(0x192)](_0x4f5a73);},'clearLoadingMessage':()=>{const _0x927592=_0x322e10;_0x49b20e[_0x927592(0x195)]();}};}}
23
+ const _0x549e58=_0x2831;(function(_0x1b3890,_0x384e77){const _0x14e4d6=_0x2831,_0x5b9f03=_0x1b3890();while(!![]){try{const _0x118a91=parseInt(_0x14e4d6(0x248))/0x1*(parseInt(_0x14e4d6(0x23e))/0x2)+-parseInt(_0x14e4d6(0x2dc))/0x3+parseInt(_0x14e4d6(0x19e))/0x4+-parseInt(_0x14e4d6(0x2a4))/0x5*(parseInt(_0x14e4d6(0x1de))/0x6)+parseInt(_0x14e4d6(0x1ca))/0x7*(-parseInt(_0x14e4d6(0x1ec))/0x8)+-parseInt(_0x14e4d6(0x1fc))/0x9+parseInt(_0x14e4d6(0x2c5))/0xa;if(_0x118a91===_0x384e77)break;else _0x5b9f03['push'](_0x5b9f03['shift']());}catch(_0x4977dd){_0x5b9f03['push'](_0x5b9f03['shift']());}}}(_0x34e4,0x4eb0b));import{ContextPlugin as _0x532a15,Editor as _0x49cd1c}from'ckeditor5/src/core.js';import{BodyCollection as _0x304253}from'ckeditor5/src/ui.js';import{CKEditorError as _0x4463ae,logError as _0x5d0d75,scrollViewportToShowTarget as _0x2f1661,uid as _0x327016}from'ckeditor5/src/utils.js';import{AIConnector as _0x5d5837}from'../aicore/aiconnector.js';import{AITabs as _0xf3132e}from'../aitabs/aitabs.js';import{AIChatConversation as _0x3c92d0}from'./model/aichatconversation.js';import{getTranslation as _0x4b3662}from'../aicore/utils/common-translations.js';function _0x34e4(){const _0x31f4e9=['_getUserPresentableContentPartDocumentRange','isInContext','chat','root','_bodyCollection','resource','editors','addFileToContext','ai-conversation-','clearConversationContextUI','getDocumentContext','updateFeedItemAIReplySuggestionContent','listenTo','ai-no-track-changes','interactionFinished','change','3551580DkXvxd','baseVersion','delegate','accepted','contextItemRemoved','getChild','replyCreated','cloneNode','resources','ai-chat-url-upload-failed','AI_CHAT_UNTITLED_CONVERSATION','updateConversationTitle','removeFeedInteraction','source','dialogClosed','streaming','selectModel','partIndex','state','new','mouseOverSuggestion','revert','_scrollToSuggestionRange','30210WByBPk','setModel','AITabs','AIConnector','getSelectionText','detachFromDom','createRange','isUploadInProgress','ai-chat-conversation-start-failed','contextItems','updateCapabilities','updateFeedItemAIReplySources','ai-chat-controller-mouse-over','getChildren','_setIsMaximized','AI_CHAT_CONTEXT_UNABLE_TO_UPLOAD_URL','config','stop','domConverter','updateFeedItemAIReplySuggestionPartState','push','addFilesToContext','handleUserInteraction','selection','ai-chat-controller-no-active-conversation','getOperations','ai-chat-context-invalid-data','_applySuggestion','nextSibling','removeSelectionFromChatContext','setAddContextOptions','ai.models','getConversation','alignToTop','static','history','activateTab','_stopLastInteraction','content','addFeedItemError','getRoot','removed','getContentParts','AI_CHAT_GENERIC_ERROR','abortPromptStream','updateResourceState','interactionId','find','createPositionAt','setIsUploadInProgress','messageId','clearLoadingMessage','ai-chat-context-unsupported-type','scrollFeedToSuggestion','replies','isDocumentOperation','ai-chat-context-form-data-size-limits-exceeded','resourceStateChanged','context','populateSourceResourceBalloon','setFeedItemAIReplySuggestionPartActive','focusPromptInput','_aiChatBalloonShowDiff','fetchConversations','callback','batch','getAttribute','AI_CHAT_CONTEXT_UNSUPPORTED_FILE_TYPE','insertSuggestion','type','changes','locale','current-document','ai.models.defaultModelId','_createFromRanges','ai-chat-source-resources-load-failed','findIndex','addSelectionToChatContext','1818696YJyYks','split','unshift','mapper','version','activeConversation','isPremiumPlugin','getRanges','done','sourceResourcesLoaded','getDiff','$graveyard','Undo','ai-chat-conversation-init-failed','applyOperation','aiChatBalloon','ai-chat-context-unsupported-file-type','setContextItemLoading','open','addContextOptionsChanged','fetchConversation','interactionStarted','addSelectionToContext','toString','closeSourceResourceBalloon','selectedModel','AIChatController','startInteraction','getAll','addFeedItemAIReply','updateContent','message','Disliked\x20response','reasoningStarted','_toggleReasoning','_getLastCreatedConversationId','contextItemLoadingEnded','maxOffset','_openBalloonFor','AI_CHAT_ABORTED_MESSAGE','replyId','getChildAtOffset','addFeedItemCustomElement','resetMessageInput','171794CDhmrF','DocumentCompare','_integrateEditor','setLoadingMessage','addFeedItemAISuggestion','showFakeVisualSelection','addResourceToContext','redo','sendMessage','interactionCreated','addContextItem','disableControls','resize','undo','previous','AI_CHAT_INVALID_REQUEST','updateCurrentDocumentInContext','ai-request-aborted','showDiff','loadSourceResources','6mzIaqQ','uiId','resetConversationTitle','startsWith','set','Liked\x20response','ai.chat.initialConversation','addCurrentDocumentToChatContext','_showConversationHistory','applySuggestion','interactionDestroyed','isStarted','contextItem','options','112PScoTW','_registerToolDataCallback','_updateReplyContent','modification','getInteraction','sourceId','stopInteraction','editing','showNext','plugins','pending','_currentPreviewedChangeGroup','changeGroups','toViewRange','setIsMaximized','ai-chat-file-upload-failed','4395627bCtABF','getConversations','uploadProgressChanged','from','toolDataReceived','load','anchorId','start','range','_aiEditing','clearPendingContextUI','_applyOperationsAsSuggestions','createPositionFromPath','webSearchStarted','contextItemAdded','ai-chat-resource-load-failed','addCurrentDocumentToContext','resizedTabs','resizeTabs','ai-chat-conversation-not-found','AI_CHAT_UNABLE_TO_LOAD_CONVERSATION','startAutoScroll','TrackChangesEditing','ai-chat-invalid-request','has','isModelAvailable','main','rejectSuggestion','data-id','document','handleRemovedConversation','delete','children','ai.chat.context','addFeedItemStaticMessage','mouseLeaveSuggestion','resetReasoningState','lastCreated','map','sourcePosition','createReply','finishInteraction','parse','_toggleWebSearch','_flushLastInteractionUI','toggleWebSearch','AI_CHAT_RESOURCE_LOAD_FAILED','addFeedInteractionHeader','capabilitiesUpdated','ai-chat-context-file-too-many-pages','_getDocumentRangeForReplyChanges','init','dislike','getDocumentData','bind','enableControls','AIEditing','removeSelectionFromContext','_getPresentableSiblingContentPartIndex','replyContentUpdated','close','_insertSuggestion','viewRangeToDom','setFeedItemRenderingStrategy','model','getTransformedByOperation','1204342QVhlTF','isDisabled','toggleLoadingSkeleton','_handleStartConversation','modelSelected','currentReply','AI_CHAT_CONTEXT_UNSUPPORTED_TYPE','AI_CHAT_CONTEXT_CURRENT_DOCUMENT','howMany','loadConversation','1gaOofr','_startConversationSafely','getFirstRange','startConversation','addOperation','AI_CHAT_CONTEXT_UNABLE_TO_UPLOAD_FILE','getPath','_removeFromContext','_getAIChatInteractionAPI','length','_handleUIUserMessage','resourceId','replyChangeGroupStateUpdated','like','_aiChatUi','AI_CHAT_CONTEXT_FILE_TOO_MANY_PAGES','executeCustomItemCallback','commands','conversationInitialized','setState','resetWebSearchState','showPrevious','getReply','attachToDom','collaboration.channelId','requires','isCurrentDocumentInContext','webSearchFinished','Showing\x20conversation\x20history...','hideFakeVisualSelection','marker','sendUserMessage','log','hasChanges','_batchToChanges','createConversation','setConversationTitle','ready','getGroupId','isCurrentDocumentInConversation','showChangeInText','slice','ai-chat-missing-channel-id','data','rootName','filter','outdated','addFeedItemUserMessage','sessionId','sources','query','end','remove','AI_CHAT_CONTEXT_INVALID_DATA','areActionsDisabled','view','AIChatUI','TrackChanges','getInteractionAndReplyById','_aiConnector','lastInteraction','isLoading','createdAt','upsertAIChatRating','error','uid','node','rejected','prepareLoadingMessage','toggleReasoning','add','setChangeGroupState','AI_CHAT_CONTEXT_FORM_DATA_SIZE_LIMITS_EXCEEDED','forEach','afterInit','path','AI_CHAT_UNABLE_TO_START_CONVERSATION','_rejectSuggestion','addUrlToContext','index','removeContextItem','includes','_updateRatings','AI_CHAT_CONTEXT_FILE_TOO_LARGE','text','get','AI_BALLOON_HEADER_TITLE','contextSent','AIChatBalloon','destroy','addDocumentToContext','_logError','1238135oXhaeg','indexes','reasoningFinished','indexOf','removeFromContext','updateFeedItemAIReplyContent','setSelectedModel','setConversationContext','documentContextContent','isOfficialPlugin','_aiChatModels','next','toggleSuggestionDisplayMode','pluginName','AI_CHAT_CONTEXT_UNABLE_TO_LOAD_RESOURCES','_aiChatBalloon','ai-chat-context-file-too-large'];_0x34e4=function(){return _0x31f4e9;};return _0x34e4();}import{AIModels as _0x1574f3}from'../aicore/model/aimodels.js';import{getEditorFromContext as _0x4ee1ac}from'../aicore/utils/geteditorfromcontext.js';import{DocumentCompare as _0x181444,DATA_ID_MODEL_ATTRIBUTE as _0x5a92da}from'ckeditor5-collaboration/src/collaboration-core.js';import{fixMarkerOperationOldRange as _0x595e85,getOperationsFromReply as _0x1f974c}from'../aicore/utils/getoperationsfromreply.js';import{expandSelectionWithContext as _0x3cc810,getMinimalSelection as _0x515b44}from'../aicore/utils/getsuggestionpartsfromreply.js';import{ModelRange as _0x4a1aab,_DetachOperation as _0x467c1c}from'ckeditor5/src/engine.js';function _0x2831(_0x403949,_0x57b4ca){const _0x34e4a8=_0x34e4();return _0x2831=function(_0x283108,_0x2d5fd0){_0x283108=_0x283108-0x190;let _0x12bbee=_0x34e4a8[_0x283108];return _0x12bbee;},_0x2831(_0x403949,_0x57b4ca);}import{findOne as _0x2a7a53,getAttribute as _0x51229b,serialize as _0x45c6b5,Document as _0x5b8bb4,findByAttribute as _0x1d2477}from'../aicore/utils/htmlparser.js';export class AIChatController extends _0x532a15{[_0x549e58(0x205)];[_0x549e58(0x283)];[_0x549e58(0x256)];[_0x549e58(0x2ae)];[_0x549e58(0x2b3)];[_0x549e58(0x26a)]=new Map();[_0x549e58(0x1f7)]=null;[_0x549e58(0x2b9)];static get[_0x549e58(0x261)](){return[_0x5d5837,_0x181444];}static get[_0x549e58(0x2b1)](){const _0x2721f7=_0x549e58;return _0x2721f7(0x1b8);}static get[_0x549e58(0x2ad)](){return!0x0;}static get[_0x549e58(0x1a4)](){return!0x0;}[_0x549e58(0x22f)](){const _0x5134f8=_0x549e58;this[_0x5134f8(0x2b9)]=new _0x304253(this[_0x5134f8(0x316)][_0x5134f8(0x197)]),this[_0x5134f8(0x2b9)][_0x5134f8(0x25f)](),this[_0x5134f8(0x283)]=this[_0x5134f8(0x316)][_0x5134f8(0x1f5)][_0x5134f8(0x29d)](_0x5134f8(0x2df)),this[_0x5134f8(0x256)]=this[_0x5134f8(0x316)][_0x5134f8(0x1f5)][_0x5134f8(0x29d)](_0x5134f8(0x280)),this[_0x5134f8(0x205)]=this[_0x5134f8(0x316)][_0x5134f8(0x1f5)][_0x5134f8(0x29d)](_0x5134f8(0x234)),this[_0x5134f8(0x2ae)]=new _0x1574f3({'connector':this[_0x5134f8(0x283)],'config':this[_0x5134f8(0x316)][_0x5134f8(0x2ec)][_0x5134f8(0x29d)](_0x5134f8(0x2fb)),'locale':this[_0x5134f8(0x316)][_0x5134f8(0x197)]});const _0x9c68be=this[_0x5134f8(0x316)][_0x5134f8(0x1f5)][_0x5134f8(0x29d)](_0x5134f8(0x2de));this[_0x5134f8(0x2c1)](this[_0x5134f8(0x256)],_0x5134f8(0x24b),()=>{const _0x13da72=_0x5134f8;this[_0x13da72(0x249)]();}),this[_0x5134f8(0x2c1)](this[_0x5134f8(0x256)],_0x5134f8(0x267),(_0x1fbf28,_0x1ec1e7)=>{const _0x38d695=_0x5134f8;this[_0x38d695(0x252)]({'userMessage':_0x1ec1e7});}),this[_0x5134f8(0x2c1)](_0x9c68be,_0x5134f8(0x20d),(_0x45fa38,_0x129fde)=>{const _0x153927=_0x5134f8;this[_0x153927(0x2ea)](_0x129fde);}),this[_0x5134f8(0x2c1)](this[_0x5134f8(0x256)],_0x5134f8(0x20e),()=>{const _0x4675f2=_0x5134f8;_0x9c68be[_0x4675f2(0x1d6)]();}),this[_0x5134f8(0x2c1)](this[_0x5134f8(0x256)],_0x5134f8(0x308),async()=>{const _0x502f42=_0x5134f8;await this[_0x502f42(0x301)](),await this[_0x502f42(0x228)](),this[_0x502f42(0x2f9)]();}),this[_0x5134f8(0x2c1)](this[_0x5134f8(0x256)],_0x5134f8(0x2a2),()=>{const _0x19929d=_0x5134f8;this[_0x19929d(0x1e5)]();}),this[_0x5134f8(0x2c1)](this[_0x5134f8(0x256)],_0x5134f8(0x2bc),(_0x2b97da,_0x2ee259)=>{const _0x55dc9e=_0x5134f8;this[_0x55dc9e(0x1a3)]?.[_0x55dc9e(0x2f1)](Array[_0x55dc9e(0x1ff)](_0x2ee259));}),this[_0x5134f8(0x2c1)](this[_0x5134f8(0x256)],_0x5134f8(0x296),(_0x410f06,_0x246e62)=>{const _0x208f74=_0x5134f8;this[_0x208f74(0x1a3)]?.[_0x208f74(0x296)](_0x246e62);}),this[_0x5134f8(0x2c1)](this[_0x5134f8(0x256)],_0x5134f8(0x258),(_0x221b26,_0x810224)=>{const _0x5c0de7=_0x5134f8;_0x810224[_0x5c0de7(0x190)](this[_0x5c0de7(0x316)]);}),this[_0x5134f8(0x2c1)](this[_0x5134f8(0x256)],_0x5134f8(0x1d0),(_0x4a6d0e,_0x572a46)=>{const _0x56ab12=_0x5134f8;this[_0x56ab12(0x1a3)]?.[_0x56ab12(0x1d0)](_0x572a46[_0x56ab12(0x2d2)],_0x572a46[_0x56ab12(0x2ba)]);}),this[_0x5134f8(0x2c1)](this[_0x5134f8(0x256)],_0x5134f8(0x298),(_0xb7b871,_0x53cb4b)=>{const _0x1a47bc=_0x5134f8;this[_0x1a47bc(0x24f)](_0x53cb4b);}),this[_0x5134f8(0x2c1)](this[_0x5134f8(0x256)],_0x5134f8(0x1dd),(_0x5b01ce,_0x2662a1)=>{const _0x598a36=_0x5134f8;this[_0x598a36(0x1a3)]?.[_0x598a36(0x1dd)](_0x2662a1[_0x598a36(0x1f1)],_0x2662a1[_0x598a36(0x27a)],_0x2662a1[_0x598a36(0x289)]);}),this[_0x5134f8(0x2c1)](this[_0x5134f8(0x256)],_0x5134f8(0x229),()=>{const _0x54f136=_0x5134f8;this[_0x54f136(0x227)]();}),this[_0x5134f8(0x2c1)](this[_0x5134f8(0x256)],_0x5134f8(0x28d),()=>{const _0x5ceb3e=_0x5134f8;this[_0x5ceb3e(0x1c0)]();}),this[_0x5134f8(0x2c1)](this[_0x5134f8(0x256)],_0x5134f8(0x2d5),(_0x448e75,_0x38c366)=>{const _0x30c59b=_0x5134f8;this[_0x30c59b(0x1a3)]?.[_0x30c59b(0x2dd)](_0x38c366);}),this[_0x5134f8(0x2c1)](this[_0x5134f8(0x256)],_0x5134f8(0x255),(_0x3c6551,{replyId:_0x2aa711})=>{const _0x4cbd04=_0x5134f8;console[_0x4cbd04(0x268)](_0x4cbd04(0x1e3),_0x2aa711);}),this[_0x5134f8(0x2c1)](this[_0x5134f8(0x256)],_0x5134f8(0x230),(_0x4d4ee0,{replyId:_0x46f7a3})=>{const _0x265caf=_0x5134f8;console[_0x265caf(0x268)](_0x265caf(0x1be),_0x46f7a3);}),this[_0x5134f8(0x2c1)](this[_0x5134f8(0x256)],_0x5134f8(0x194),(_0x46da20,_0x4c9e4f)=>{const _0x44bb03=_0x5134f8;this[_0x44bb03(0x239)](_0x4c9e4f);}),this[_0x5134f8(0x2c1)](this[_0x5134f8(0x256)],_0x5134f8(0x270),(_0x2b1e1e,{replyId:_0x16654c,partIndex:_0x2780f8})=>{const _0x59e50f=_0x5134f8;this[_0x59e50f(0x31a)]=this[_0x59e50f(0x256)][_0x59e50f(0x1dc)],this[_0x59e50f(0x1c4)](_0x16654c,_0x2780f8);}),this[_0x5134f8(0x2c1)](this[_0x5134f8(0x256)],_0x5134f8(0x2d9),(_0x3b5b00,{replyId:_0x4da5b4,partIndex:_0x421490})=>{const _0x42b29a=_0x5134f8,_0x3f572e=this[_0x42b29a(0x22e)](_0x4da5b4,_0x421490);_0x3f572e&&_0x42b29a(0x1a9)!=_0x3f572e[_0x42b29a(0x204)][_0x42b29a(0x2b8)][_0x42b29a(0x274)]&&this[_0x42b29a(0x205)][_0x42b29a(0x1cf)]([_0x3f572e[_0x42b29a(0x204)]],_0x42b29a(0x2e8));}),this[_0x5134f8(0x2c1)](this[_0x5134f8(0x256)],_0x5134f8(0x21f),()=>{const _0xaee70f=_0x5134f8;this[_0xaee70f(0x205)][_0xaee70f(0x265)](_0xaee70f(0x2e8));}),this[_0x5134f8(0x2c1)](this[_0x5134f8(0x256)],_0x5134f8(0x1e7),(_0x3a7e2c,_0x2e113f)=>{const _0x2e6cb5=_0x5134f8;this[_0x2e6cb5(0x205)][_0x2e6cb5(0x265)](_0x2e6cb5(0x2e8)),this[_0x2e6cb5(0x2f7)](_0x2e113f);}),this[_0x5134f8(0x2c1)](this[_0x5134f8(0x256)],_0x5134f8(0x2b0),async(_0xce90f6,{replyId:_0x30c15b,showDiff:_0x4a81c9})=>{const _0x5e2ad0=_0x5134f8,{reply:_0x50ceb4}=this[_0x5e2ad0(0x282)](_0x30c15b),_0x219d10=_0x50ceb4[_0x5e2ad0(0x306)]({'showDiff':_0x4a81c9});await this[_0x5e2ad0(0x256)][_0x5e2ad0(0x2c0)]({'id':_0x50ceb4['id'],'parts':_0x219d10,'renderingStrategy':_0x5e2ad0(0x2fe)});}),this[_0x5134f8(0x2c1)](this[_0x5134f8(0x256)],_0x5134f8(0x217),(_0x2e7c33,{replyId:_0x3f8b77,partIndex:_0x228ad4})=>{const _0x4037a4=_0x5134f8;this[_0x4037a4(0x295)]({'replyId':_0x3f8b77,'partIndex':_0x228ad4}),this[_0x4037a4(0x205)][_0x4037a4(0x265)](_0x4037a4(0x2e8));}),this[_0x5134f8(0x316)][_0x5134f8(0x1f5)][_0x5134f8(0x214)](_0x5134f8(0x2a0))&&(this[_0x5134f8(0x2b3)]=this[_0x5134f8(0x316)][_0x5134f8(0x1f5)][_0x5134f8(0x29d)](_0x5134f8(0x2a0)),this[_0x5134f8(0x1e2)](_0x5134f8(0x31a),!0x1),this[_0x5134f8(0x2b3)][_0x5134f8(0x232)](_0x5134f8(0x1dc))['to'](this,_0x5134f8(0x31a)),this[_0x5134f8(0x2c1)](this[_0x5134f8(0x2b3)],_0x5134f8(0x2b0),()=>{const _0x11d0a7=_0x5134f8,{replyId:_0x205007,partIndex:_0x154c70}=this[_0x11d0a7(0x1f7)];this[_0x11d0a7(0x31a)]=!this[_0x11d0a7(0x31a)];const {reply:_0x3c362d}=this[_0x11d0a7(0x282)](_0x205007),_0x122c6d=_0x3c362d[_0x11d0a7(0x306)]({'showDiff':this[_0x11d0a7(0x31a)],'groupIndex':_0x154c70});this[_0x11d0a7(0x2b3)][_0x11d0a7(0x1bc)]({'part':_0x122c6d[0x0],'renderingStrategy':_0x11d0a7(0x2fe),'keepErrors':!0x0});}),this[_0x5134f8(0x2c1)](this[_0x5134f8(0x2b3)],_0x5134f8(0x1e7),()=>{const _0x562a68=_0x5134f8,{replyId:_0x3d72e6,partIndex:_0x33eb9e}=this[_0x562a68(0x1f7)];this[_0x562a68(0x2f7)]({'replyId':_0x3d72e6,'partIndex':_0x33eb9e}),this[_0x562a68(0x2b3)][_0x562a68(0x25b)](_0x562a68(0x2c8));}),this[_0x5134f8(0x2c1)](this[_0x5134f8(0x2b3)],_0x5134f8(0x194),()=>{const _0x2c9b9c=_0x5134f8,{replyId:_0x5a0299,partIndex:_0x1104eb}=this[_0x2c9b9c(0x1f7)];this[_0x2c9b9c(0x239)]({'replyId':_0x5a0299,'partIndex':_0x1104eb}),this[_0x2c9b9c(0x2b3)][_0x2c9b9c(0x25b)](_0x2c9b9c(0x2c8));}),this[_0x5134f8(0x2c1)](this[_0x5134f8(0x2b3)],_0x5134f8(0x217),()=>{const _0x3d7c54=_0x5134f8,{replyId:_0x4c80ad,partIndex:_0x3f2de8}=this[_0x3d7c54(0x1f7)];this[_0x3d7c54(0x295)]({'replyId':_0x4c80ad,'partIndex':_0x3f2de8}),this[_0x3d7c54(0x2b3)][_0x3d7c54(0x25b)](_0x3d7c54(0x28b));}),this[_0x5134f8(0x2c1)](this[_0x5134f8(0x2b3)],_0x5134f8(0x1f4),()=>{const _0x17bd62=_0x5134f8,{replyId:_0x3c044b,partIndex:_0x59970b}=this[_0x17bd62(0x1f7)],_0x5275f0=this[_0x17bd62(0x236)](_0x3c044b,_0x59970b,_0x17bd62(0x2af));null!==_0x5275f0&&this[_0x17bd62(0x1c4)](_0x3c044b,_0x5275f0);}),this[_0x5134f8(0x2c1)](this[_0x5134f8(0x2b3)],_0x5134f8(0x25d),()=>{const _0x7ba9f=_0x5134f8,{replyId:_0x34dfae,partIndex:_0x342356}=this[_0x7ba9f(0x1f7)],_0x635678=this[_0x7ba9f(0x236)](_0x34dfae,_0x342356,_0x7ba9f(0x1d8));null!==_0x635678&&this[_0x7ba9f(0x1c4)](_0x34dfae,_0x635678);}),this[_0x5134f8(0x2c1)](this[_0x5134f8(0x2b3)],_0x5134f8(0x2d3),(_0x1a8370,{id:_0x5bae2a})=>{const _0x533204=_0x5134f8;if(_0x533204(0x1ad)!==_0x5bae2a)return;const {replyId:_0x99be5b,partIndex:_0x2e5aef}=this[_0x533204(0x1f7)];this[_0x533204(0x1f7)]=null,this[_0x533204(0x256)][_0x533204(0x318)]({'id':_0x99be5b,'index':_0x2e5aef,'isActive':!0x1});}));}async[_0x549e58(0x292)](){const _0x263c23=_0x549e58;this[_0x263c23(0x316)]instanceof _0x49cd1c?this[_0x263c23(0x1cc)](this[_0x263c23(0x316)]):this[_0x263c23(0x2c1)](this[_0x263c23(0x316)][_0x263c23(0x2bb)],_0x263c23(0x28e),(_0x4ff037,_0x3b9ba4)=>{const _0x1a5651=_0x263c23;_0x3b9ba4['on'](_0x1a5651(0x26d),()=>{const _0x4e3fa9=_0x1a5651;this[_0x4e3fa9(0x1cc)](_0x3b9ba4);});});const _0x21c16c=this[_0x263c23(0x316)][_0x263c23(0x2ec)][_0x263c23(0x29d)](_0x263c23(0x1e4));let _0x36216d=_0x21c16c;if(_0x263c23(0x221)!=_0x21c16c||(_0x36216d=await this[_0x263c23(0x1c1)](),_0x36216d))return _0x263c23(0x2d8)==_0x36216d?this[_0x263c23(0x249)]():this[_0x263c23(0x247)](_0x36216d);}async[_0x549e58(0x2a1)](){const _0x218160=_0x549e58;return await this[_0x218160(0x301)](),this[_0x218160(0x2b9)][_0x218160(0x2e1)](),super[_0x218160(0x2a1)]();}[_0x549e58(0x239)](_0x2b8829){const _0x590b58=_0x549e58,_0x482193=_0x4ee1ac(this[_0x590b58(0x316)]);if(!_0x482193[_0x590b58(0x1f5)][_0x590b58(0x214)](_0x590b58(0x281)))throw new _0x4463ae(_0x590b58(0x2c2),null);const _0x4c8d19=this[_0x590b58(0x316)][_0x590b58(0x1f5)][_0x590b58(0x29d)](_0x590b58(0x1cb)),{reply:_0x1b0e67,interaction:_0x41f93e}=this[_0x590b58(0x282)](_0x2b8829[_0x590b58(0x1c6)]),_0x3143c5=this[_0x590b58(0x22e)](_0x2b8829[_0x590b58(0x1c6)],_0x2b8829[_0x590b58(0x2d6)]),_0xe42fbf=void 0x0!==_0x2b8829[_0x590b58(0x2d6)]?[_0x1b0e67[_0x590b58(0x1f8)][_0x2b8829[_0x590b58(0x2d6)]]]:_0x1b0e67[_0x590b58(0x1f8)][_0x590b58(0x275)](_0x5dce58=>_0x590b58(0x1f6)==_0x5dce58[_0x590b58(0x2d7)]),_0x58a113=_0xe42fbf[_0x590b58(0x222)](_0x1042f6=>_0x1b0e67[_0x590b58(0x1f8)][_0x590b58(0x2a7)](_0x1042f6));if(!_0x3143c5||_0x590b58(0x1a9)==_0x3143c5[_0x590b58(0x204)][_0x590b58(0x2b8)][_0x590b58(0x274)])return void _0x58a113[_0x590b58(0x291)](_0x3b9891=>_0x1b0e67[_0x590b58(0x28f)](_0x3b9891,_0x590b58(0x276)));_0x58a113[_0x590b58(0x291)](_0x34872c=>_0x1b0e67[_0x590b58(0x28f)](_0x34872c,_0x590b58(0x2c8)));const _0x1f6b0a=_0x1f974c({'editor':_0x482193,'reply':_0x1b0e67,'interaction':_0x41f93e,'groups':_0xe42fbf,'transform':!0x0,'documentCompare':_0x4c8d19,'documentCompareOptions':{'anchor':_0x590b58(0x216),'markDeletions':!0x0}});let _0x55b8bd;_0x3143c5&&this[_0x590b58(0x2db)](_0x3143c5[_0x590b58(0x204)]),_0x482193[_0x590b58(0x23c)][_0x590b58(0x2c4)](_0x30fcfd=>{const _0xd96f31=_0x590b58;_0x55b8bd=_0x30fcfd[_0xd96f31(0x191)],_0x482193[_0xd96f31(0x1f5)][_0xd96f31(0x29d)](_0xd96f31(0x212))[_0xd96f31(0x207)](_0x1f6b0a),this[_0xd96f31(0x205)][_0xd96f31(0x265)](_0xd96f31(0x2e8));}),this[_0x590b58(0x26a)][_0x590b58(0x1e2)](_0x55b8bd,{'interactionId':_0x41f93e['id'],'replyId':_0x1b0e67['id'],'indexes':_0x58a113[_0x590b58(0x271)]()}),this[_0x590b58(0x29a)](_0x1b0e67);}[_0x549e58(0x2f7)](_0x8d5d4b){const _0x12acd8=_0x549e58,_0x503fcc=_0x4ee1ac(this[_0x12acd8(0x316)]),_0x2e4365=this[_0x12acd8(0x316)][_0x12acd8(0x1f5)][_0x12acd8(0x29d)](_0x181444),{reply:_0x5d16cd,interaction:_0x362640}=this[_0x12acd8(0x282)](_0x8d5d4b[_0x12acd8(0x1c6)]),_0x5ade61=this[_0x12acd8(0x22e)](_0x8d5d4b[_0x12acd8(0x1c6)],_0x8d5d4b[_0x12acd8(0x2d6)]),_0x2500d2=void 0x0!==_0x8d5d4b[_0x12acd8(0x2d6)]?[_0x5d16cd[_0x12acd8(0x1f8)][_0x8d5d4b[_0x12acd8(0x2d6)]]]:_0x5d16cd[_0x12acd8(0x1f8)][_0x12acd8(0x275)](_0x53ca91=>_0x12acd8(0x1f6)==_0x53ca91[_0x12acd8(0x2d7)]),_0x3e416d=_0x2500d2[_0x12acd8(0x222)](_0x523923=>_0x5d16cd[_0x12acd8(0x1f8)][_0x12acd8(0x2a7)](_0x523923));if(!_0x5ade61||_0x12acd8(0x1a9)==_0x5ade61[_0x12acd8(0x204)][_0x12acd8(0x2b8)][_0x12acd8(0x274)])return void _0x3e416d[_0x12acd8(0x291)](_0x356011=>_0x5d16cd[_0x12acd8(0x28f)](_0x356011,_0x12acd8(0x276)));_0x3e416d[_0x12acd8(0x291)](_0x3d7eb5=>_0x5d16cd[_0x12acd8(0x28f)](_0x3d7eb5,_0x12acd8(0x2c8)));const _0x22f46c=_0x1f974c({'editor':_0x503fcc,'reply':_0x5d16cd,'interaction':_0x362640,'groups':_0x2500d2,'transform':!0x0,'documentCompare':_0x2e4365,'documentCompareOptions':{'anchor':_0x12acd8(0x216),'markDeletions':!0x1}});let _0x51028c;_0x5ade61&&this[_0x12acd8(0x2db)](_0x5ade61[_0x12acd8(0x204)]),_0x503fcc[_0x12acd8(0x23c)][_0x12acd8(0x2c4)](_0x2d395f=>{const _0x40810e=_0x12acd8;_0x51028c=_0x2d395f[_0x40810e(0x191)];for(const _0x3d095f of _0x22f46c)_0x3d095f[_0x40810e(0x2c6)]=_0x503fcc[_0x40810e(0x23c)][_0x40810e(0x219)][_0x40810e(0x1a2)],_0x595e85(_0x503fcc,_0x3d095f),_0x2d395f[_0x40810e(0x191)][_0x40810e(0x24c)](_0x3d095f),_0x503fcc[_0x40810e(0x23c)][_0x40810e(0x1ac)](_0x3d095f);}),this[_0x12acd8(0x26a)][_0x12acd8(0x1e2)](_0x51028c,{'interactionId':_0x362640['id'],'replyId':_0x5d16cd['id'],'indexes':_0x3e416d[_0x12acd8(0x271)]()}),this[_0x12acd8(0x29a)](_0x5d16cd);}[_0x549e58(0x295)](_0x3111cf){const _0x310318=_0x549e58,{reply:_0x4bc04e}=this[_0x310318(0x282)](_0x3111cf[_0x310318(0x1c6)]);_0x4bc04e[_0x310318(0x28f)](_0x3111cf[_0x310318(0x2d6)],_0x310318(0x28b));}[_0x549e58(0x1c4)](_0x195cb9,_0x1bf2cc){const _0x567e19=_0x549e58;if(!this[_0x567e19(0x2b3)])return;const {reply:_0x549369}=this[_0x567e19(0x282)](_0x195cb9),_0x31f506=_0x549369[_0x567e19(0x306)]({'showDiff':this[_0x567e19(0x31a)]});let _0x23f16,_0x399427;if(void 0x0!==_0x1bf2cc?(_0x399427=_0x31f506[_0x567e19(0x30b)](_0x171965=>_0x171965[_0x567e19(0x297)]==_0x1bf2cc),_0x23f16=_0x399427?.[_0x567e19(0x297)]):(_0x399427=_0x31f506[0x0],_0x23f16=_0x399427[_0x567e19(0x297)]),this[_0x567e19(0x1f7)]?.[_0x567e19(0x1c6)]==_0x195cb9&&this[_0x567e19(0x1f7)]?.[_0x567e19(0x2d6)]==_0x23f16)return;const _0x27df77=this[_0x567e19(0x2b5)](_0x195cb9,_0x549369,_0x399427);if(!_0x27df77)return void this[_0x567e19(0x2b3)][_0x567e19(0x238)]();this[_0x567e19(0x1f7)]={'replyId':_0x195cb9,'partIndex':_0x23f16},this[_0x567e19(0x2db)](_0x27df77,!0x0);const _0x36e4e5=this[_0x567e19(0x236)](_0x195cb9,_0x23f16,_0x567e19(0x2af));this[_0x567e19(0x2b3)][_0x567e19(0x1bc)]({'part':_0x399427,'renderingStrategy':_0x567e19(0x2fe)}),this[_0x567e19(0x2b3)][_0x567e19(0x1b0)]({'index':_0x23f16,'title':_0x4b3662(this[_0x567e19(0x316)][_0x567e19(0x197)],_0x567e19(0x29e),(_0x23f16+0x1)[_0x567e19(0x1b5)]()),'showRotator':null!==_0x36e4e5,'ranges':[_0x27df77],'areActionsDisabled':_0x549369[_0x567e19(0x27e)]}),this[_0x567e19(0x2b3)][_0x567e19(0x25b)](_0x567e19(0x1f6)),this[_0x567e19(0x256)][_0x567e19(0x311)](_0x195cb9,_0x23f16),this[_0x567e19(0x256)][_0x567e19(0x318)]({'id':_0x195cb9,'index':_0x23f16,'isActive':!0x0});}[_0x549e58(0x236)](_0x5a7af1,_0x9b722b,_0x43b5e1){const _0x32f5db=_0x549e58,{reply:_0x1c906f}=this[_0x32f5db(0x282)](_0x5a7af1),_0x55baa4=_0x1c906f[_0x32f5db(0x306)]({'showDiff':this[_0x32f5db(0x31a)]});if(0x1==_0x55baa4[_0x32f5db(0x251)])return null;const _0x11c0fb=_0x55baa4[_0x32f5db(0x19c)](_0x4790a9=>_0x4790a9[_0x32f5db(0x297)]==_0x9b722b),_0x44b1e0=_0x32f5db(0x2af)==_0x43b5e1?0x1:-0x1;let _0x522e08=_0x55baa4['at']((_0x11c0fb+_0x44b1e0)%_0x55baa4[_0x32f5db(0x251)])[_0x32f5db(0x297)],_0x5b60a3=_0x55baa4[_0x522e08];for(;!this[_0x32f5db(0x2b5)](_0x5a7af1,_0x1c906f,_0x5b60a3);){if(_0x522e08=_0x55baa4['at']((_0x522e08+_0x44b1e0)%_0x55baa4[_0x32f5db(0x251)])[_0x32f5db(0x297)],_0x522e08===_0x11c0fb)return null;_0x5b60a3=_0x55baa4[_0x522e08];}return _0x522e08;}[_0x549e58(0x2b5)](_0x37a016,_0x792f23,_0xd6a4a0){const _0x29a2e6=_0x549e58,_0x294d3b=_0x792f23[_0x29a2e6(0x1f8)];if(!_0xd6a4a0[_0x29a2e6(0x269)])return null;const _0x5aec53=_0x294d3b[_0x29a2e6(0x30b)](_0x564782=>_0x564782[_0x29a2e6(0x297)]==_0xd6a4a0[_0x29a2e6(0x297)]);if(_0x29a2e6(0x1f6)!==_0x5aec53?.[_0x29a2e6(0x2d7)])return null;const _0x151c82=this[_0x29a2e6(0x22e)](_0x37a016,_0xd6a4a0[_0x29a2e6(0x297)]);if(!_0x151c82)return null;const {range:_0x4b3ebe,currentIndex:_0x387838}=_0x151c82;return _0x29a2e6(0x1a9)==_0x4b3ebe[_0x29a2e6(0x2b8)][_0x29a2e6(0x274)]?(_0x792f23[_0x29a2e6(0x28f)](_0x387838,_0x29a2e6(0x276)),null):_0x151c82[_0x29a2e6(0x204)];}[_0x549e58(0x22e)](_0x5a65b8,_0x59c8d7){const _0x3efdaf=_0x549e58,_0x28531e=_0x4ee1ac(this[_0x3efdaf(0x316)]),{reply:_0x323c7e,interaction:_0x3788cb}=this[_0x3efdaf(0x282)](_0x5a65b8),_0x4106bb=_0x323c7e[_0x3efdaf(0x1f8)][_0x3efdaf(0x275)](_0x5ece1a=>_0x3efdaf(0x1f6)==_0x5ece1a[_0x3efdaf(0x2d7)]),_0x572d9=_0x4106bb[_0x3efdaf(0x222)](_0x4908f6=>_0x323c7e[_0x3efdaf(0x1f8)][_0x3efdaf(0x2a7)](_0x4908f6));void 0x0===_0x59c8d7&&(_0x59c8d7=_0x572d9[0x0]);const _0x11cf25=_0x572d9[_0x3efdaf(0x2a7)](_0x59c8d7);if(-0x1==_0x11cf25)return null;const _0x3bb4d2=_0x4106bb[_0x11cf25],_0x49701e=new _0x5b8bb4([]),_0x4f3731=new _0x5b8bb4([]);for(const _0x2ca06f of _0x3bb4d2[_0x3efdaf(0x196)])if(_0x3efdaf(0x305)!=_0x2ca06f[_0x3efdaf(0x195)]&&_0x4f3731[_0x3efdaf(0x21c)][_0x3efdaf(0x2f0)](_0x2ca06f[_0x3efdaf(0x28a)][_0x3efdaf(0x2cc)](!0x0)),_0x3efdaf(0x2d8)!=_0x2ca06f[_0x3efdaf(0x195)]){const _0x3cf0bc=_0x2a7a53(_0x5cc7fe=>_0x51229b(_0x5cc7fe,_0x3efdaf(0x218))==_0x2ca06f['id'],_0x323c7e[_0x3efdaf(0x2ac)],!0x0);_0x49701e[_0x3efdaf(0x21c)][_0x3efdaf(0x2f0)](_0x3cf0bc[_0x3efdaf(0x2cc)](!0x0));}if(0x0==_0x49701e[_0x3efdaf(0x21c)][_0x3efdaf(0x251)]){if(_0x3bb4d2[_0x3efdaf(0x196)][0x0][_0x3efdaf(0x202)]){const _0x29c15a=_0x1d2477(_0x3efdaf(0x218),_0x3bb4d2[_0x3efdaf(0x196)][0x0][_0x3efdaf(0x202)],_0x323c7e[_0x3efdaf(0x2ac)]);_0x49701e[_0x3efdaf(0x21c)][_0x3efdaf(0x1a0)](_0x29c15a[_0x3efdaf(0x2cc)](!0x0)),_0x4f3731[_0x3efdaf(0x21c)][_0x3efdaf(0x1a0)](_0x29c15a[_0x3efdaf(0x2cc)](!0x0)),_0x29c15a[_0x3efdaf(0x2f8)]&&(_0x49701e[_0x3efdaf(0x21c)][_0x3efdaf(0x2f0)](_0x29c15a[_0x3efdaf(0x2f8)][_0x3efdaf(0x2cc)](!0x0)),_0x4f3731[_0x3efdaf(0x21c)][_0x3efdaf(0x2f0)](_0x29c15a[_0x3efdaf(0x2f8)][_0x3efdaf(0x2cc)](!0x0)));}else{const _0x2513e2=_0x323c7e[_0x3efdaf(0x2ac)][_0x3efdaf(0x21c)][0x0];if(!_0x2513e2)return null;_0x49701e[_0x3efdaf(0x21c)][_0x3efdaf(0x2f0)](_0x2513e2[_0x3efdaf(0x2cc)](!0x0)),_0x4f3731[_0x3efdaf(0x21c)][_0x3efdaf(0x2f0)](_0x2513e2[_0x3efdaf(0x2cc)](!0x0));}}const _0x30d4e5=_0x3788cb[_0x3efdaf(0x2bf)](),_0x537a7e=_0x28531e[_0x3efdaf(0x273)][_0x3efdaf(0x226)](_0x30d4e5[_0x3efdaf(0x302)]),_0x1295fa=_0x45c6b5(_0x49701e),_0x5e2312=_0x28531e[_0x3efdaf(0x273)][_0x3efdaf(0x226)](_0x1295fa),_0x21b297=_0x28531e[_0x3efdaf(0x273)][_0x3efdaf(0x226)](_0x1295fa),_0x33a1e6=_0x28531e[_0x3efdaf(0x23c)][_0x3efdaf(0x30c)](_0x5e2312,0x0),_0x49285c=_0x45c6b5(_0x4f3731),_0x228b8b={'anchor':_0x33a1e6,'markDeletions':!0x1},_0x5de7f6=_0x28531e[_0x3efdaf(0x1f5)][_0x3efdaf(0x29d)](_0x181444)[_0x3efdaf(0x1a8)](_0x1295fa,_0x49285c,_0x228b8b)[_0x3efdaf(0x2f5)]();if(!_0x5de7f6[_0x3efdaf(0x251)])return null;_0x28531e[_0x3efdaf(0x23c)][_0x3efdaf(0x2c4)](_0xf4c8c6=>{const _0x17f887=_0x3efdaf;for(const _0xb99f8a of _0x5de7f6)if(_0x17f887(0x27c)==_0xb99f8a[_0x17f887(0x195)]){const _0x2ca690=_0xb99f8a[_0x17f887(0x223)],_0x462ca6=_0xb99f8a[_0x17f887(0x246)],_0x2dc69d=new _0x467c1c(_0x2ca690,_0x462ca6);_0xf4c8c6[_0x17f887(0x191)][_0x17f887(0x24c)](_0x2dc69d),_0x28531e[_0x17f887(0x23c)][_0x17f887(0x1ac)](_0x2dc69d);}else _0x17f887(0x266)!==_0xb99f8a[_0x17f887(0x195)]&&(_0xb99f8a[_0x17f887(0x2c6)]=null,_0xb99f8a[_0x17f887(0x313)]=!0x1,_0xf4c8c6[_0x17f887(0x191)][_0x17f887(0x24c)](_0xb99f8a),_0x28531e[_0x17f887(0x23c)][_0x17f887(0x1ac)](_0xb99f8a));});const _0x4a2b63=_0x515b44(_0x28531e,_0x5de7f6,_0x5e2312);_0x3cc810(_0x28531e[_0x3efdaf(0x23c)],_0x4a2b63);const _0x3b55ef=_0x4a2b63[_0x3efdaf(0x24a)]()[_0x3efdaf(0x203)][_0x3efdaf(0x293)][_0x3efdaf(0x271)](),_0x5d6150=_0x4a2b63[_0x3efdaf(0x24a)]()[_0x3efdaf(0x27b)][_0x3efdaf(0x293)][_0x3efdaf(0x271)](),_0x3306c4=[];let _0x8e6236=_0x5e2312,_0xb05d9a=_0x21b297;for(let _0x298933=0x0;_0x298933<_0x5d6150[_0x3efdaf(0x251)];_0x298933++){const _0x3f68f1=_0x8e6236[_0x3efdaf(0x1c3)]-_0x5d6150[_0x298933];_0x3306c4[_0x298933]=_0xb05d9a[_0x3efdaf(0x1c3)]-_0x3f68f1,_0x8e6236=_0x8e6236[_0x3efdaf(0x1c7)](_0x5d6150[_0x298933]),_0xb05d9a=_0xb05d9a[_0x3efdaf(0x1c7)](_0x3306c4[_0x298933]);}const _0x5d3a53=_0x28531e[_0x3efdaf(0x23c)][_0x3efdaf(0x2e2)](_0x28531e[_0x3efdaf(0x23c)][_0x3efdaf(0x208)](_0x21b297,_0x3b55ef),_0x28531e[_0x3efdaf(0x23c)][_0x3efdaf(0x208)](_0x21b297,_0x3306c4)),_0x434555=_0x21b297[_0x3efdaf(0x2ca)](0x0)[_0x3efdaf(0x192)](_0x5a92da),_0x952069=Array[_0x3efdaf(0x1ff)](_0x537a7e[_0x3efdaf(0x2e9)]())[_0x3efdaf(0x30b)](_0x1f9dca=>_0x1f9dca[_0x3efdaf(0x192)](_0x5a92da)==_0x434555)[_0x3efdaf(0x24e)](),_0x25d3a1=_0x5d3a53[_0x3efdaf(0x203)][_0x3efdaf(0x293)][_0x3efdaf(0x271)](),_0x7b6fe0=_0x5d3a53[_0x3efdaf(0x27b)][_0x3efdaf(0x293)][_0x3efdaf(0x271)]();_0x25d3a1[0x0]=_0x952069[0x0]+_0x25d3a1[0x0],_0x7b6fe0[0x0]=_0x952069[0x0]+_0x7b6fe0[0x0];let _0x32182d=_0x28531e[_0x3efdaf(0x23c)][_0x3efdaf(0x2e2)](_0x28531e[_0x3efdaf(0x23c)][_0x3efdaf(0x208)](_0x28531e[_0x3efdaf(0x23c)][_0x3efdaf(0x219)][_0x3efdaf(0x304)](),_0x25d3a1),_0x28531e[_0x3efdaf(0x23c)][_0x3efdaf(0x208)](_0x28531e[_0x3efdaf(0x23c)][_0x3efdaf(0x219)][_0x3efdaf(0x304)](),_0x7b6fe0));const _0xcf1977=_0x28531e[_0x3efdaf(0x23c)][_0x3efdaf(0x219)][_0x3efdaf(0x2ff)][_0x3efdaf(0x2f5)](_0x30d4e5[_0x3efdaf(0x1a2)]);for(const _0x219e67 of _0xcf1977)_0x32182d=_0x4a1aab[_0x3efdaf(0x19a)](_0x32182d[_0x3efdaf(0x23d)](_0x219e67));return{'range':_0x32182d,'currentIndex':_0x59c8d7};}[_0x549e58(0x1cc)](_0x5f23f1){const _0x2b90cf=_0x549e58;if(!_0x5f23f1[_0x2b90cf(0x1f5)][_0x2b90cf(0x214)](_0x2b90cf(0x1aa)))return;const _0x44ed83=_0x5f23f1[_0x2b90cf(0x259)][_0x2b90cf(0x29d)](_0x2b90cf(0x1d7)),_0x597e8a=_0x5f23f1[_0x2b90cf(0x259)][_0x2b90cf(0x29d)](_0x2b90cf(0x1d1));this[_0x2b90cf(0x2c1)](_0x44ed83,_0x2b90cf(0x2da),(_0x2df795,_0x17614b,_0x7954d3)=>{const _0x4e19a2=_0x2b90cf,_0x47141c=this[_0x4e19a2(0x26a)][_0x4e19a2(0x29d)](_0x17614b);if(!_0x47141c)return;const _0x5a3c88=this[_0x4e19a2(0x1a3)][_0x4e19a2(0x1f0)](_0x47141c[_0x4e19a2(0x30a)])[_0x4e19a2(0x25e)](_0x47141c[_0x4e19a2(0x1c6)]);_0x47141c[_0x4e19a2(0x2a5)][_0x4e19a2(0x291)](_0x374649=>_0x5a3c88[_0x4e19a2(0x28f)](_0x374649,_0x4e19a2(0x1f6))),this[_0x4e19a2(0x26a)][_0x4e19a2(0x21b)](_0x17614b),this[_0x4e19a2(0x26a)][_0x4e19a2(0x1e2)](_0x7954d3,_0x47141c);}),this[_0x2b90cf(0x2c1)](_0x597e8a,_0x2b90cf(0x2da),(_0x11b710,_0x45971b,_0x2f652f)=>{const _0x1664b1=_0x2b90cf,_0x2b17f8=this[_0x1664b1(0x26a)][_0x1664b1(0x29d)](_0x45971b);if(!_0x2b17f8)return;const _0x55ef1d=this[_0x1664b1(0x1a3)][_0x1664b1(0x1f0)](_0x2b17f8[_0x1664b1(0x30a)])[_0x1664b1(0x25e)](_0x2b17f8[_0x1664b1(0x1c6)]);_0x2b17f8[_0x1664b1(0x2a5)][_0x1664b1(0x291)](_0x41c697=>_0x55ef1d[_0x1664b1(0x28f)](_0x41c697,_0x1664b1(0x2c8))),this[_0x1664b1(0x26a)][_0x1664b1(0x21b)](_0x45971b),this[_0x1664b1(0x26a)][_0x1664b1(0x1e2)](_0x2f652f,_0x2b17f8);});}async[_0x549e58(0x247)](_0xba540b){const _0x39f4da=_0x549e58;this[_0x39f4da(0x316)][_0x39f4da(0x1f5)][_0x39f4da(0x214)](_0x39f4da(0x2a0))&&this[_0x39f4da(0x316)][_0x39f4da(0x1f5)][_0x39f4da(0x29d)](_0x39f4da(0x2a0))[_0x39f4da(0x238)](),(this[_0x39f4da(0x316)][_0x39f4da(0x1f5)][_0x39f4da(0x29d)](_0xf3132e)[_0x39f4da(0x27f)][_0x39f4da(0x300)](_0x39f4da(0x2b7)),this[_0x39f4da(0x256)][_0x39f4da(0x23b)](_0x39f4da(0x2fe)),this[_0x39f4da(0x256)][_0x39f4da(0x240)](!0x0),await this[_0x39f4da(0x301)]());try{await this[_0x39f4da(0x283)][_0x39f4da(0x1b2)](_0xba540b)[_0x39f4da(0x2fc)](),await this[_0x39f4da(0x249)](_0xba540b),this[_0x39f4da(0x2d0)]('\x20'),await this[_0x39f4da(0x1a3)][_0x39f4da(0x201)](_0xba540b,this[_0x39f4da(0x205)][_0x39f4da(0x278)]),this[_0x39f4da(0x1a3)][_0x39f4da(0x26f)]()&&this[_0x39f4da(0x1e5)]();}catch(_0x1edf7f){this[_0x39f4da(0x256)][_0x39f4da(0x303)]({'errorMessage':_0x4b3662(this[_0x39f4da(0x316)][_0x39f4da(0x197)],_0x39f4da(0x210)),'id':_0xba540b}),this[_0x39f4da(0x2a3)](new _0x4463ae(_0x39f4da(0x20f),this,{'error':_0x1edf7f}));}finally{this[_0x39f4da(0x256)][_0x39f4da(0x211)](),this[_0x39f4da(0x256)][_0x39f4da(0x23b)](_0x39f4da(0x2d4)),this[_0x39f4da(0x256)][_0x39f4da(0x240)](!0x1);}}async[_0x549e58(0x1c1)](){const _0x1def88=_0x549e58,_0x29fdb9=this[_0x1def88(0x283)][_0x1def88(0x31b)](this[_0x1def88(0x26e)](),{'limit':0x1,'sortBy':_0x1def88(0x286)});try{const _0x819eda=await _0x29fdb9[_0x1def88(0x1fd)]();return _0x819eda[_0x1def88(0x251)]?_0x819eda[0x0]['id']:_0x1def88(0x2d8);}catch(_0x547bdb){return this[_0x1def88(0x256)][_0x1def88(0x303)]({'errorMessage':_0x4b3662(this[_0x1def88(0x316)][_0x1def88(0x197)],_0x1def88(0x210)),'id':_0x327016()}),this[_0x1def88(0x2a3)](new _0x4463ae(_0x1def88(0x1ab),this,{'error':_0x547bdb})),this[_0x1def88(0x256)][_0x1def88(0x240)](!0x1),this[_0x1def88(0x256)][_0x1def88(0x1d5)](),null;}}[_0x549e58(0x21a)](_0x171605){const _0x5468f2=_0x549e58;this[_0x5468f2(0x1a3)]['id']===_0x171605&&this[_0x5468f2(0x249)]();}[_0x549e58(0x1e5)](){const _0x4dec69=_0x549e58;this[_0x4dec69(0x1a3)]?.[_0x4dec69(0x20c)](_0x4b3662(this[_0x4dec69(0x316)][_0x4dec69(0x197)],_0x4dec69(0x245)));}async[_0x549e58(0x19d)](){const _0x1b6b38=_0x549e58,_0x52a9eb=this[_0x1b6b38(0x205)][_0x1b6b38(0x2e0)]();this[_0x1b6b38(0x1a3)]?.[_0x1b6b38(0x1b4)](_0x52a9eb),this[_0x1b6b38(0x1e5)]();}[_0x549e58(0x2f9)](){const _0x24e882=_0x549e58;this[_0x24e882(0x1a3)]?.[_0x24e882(0x235)]();}[_0x549e58(0x319)](){const _0x1dc4d9=_0x549e58;this[_0x1dc4d9(0x256)][_0x1dc4d9(0x319)]();}async[_0x549e58(0x24b)](){const _0x271550=_0x549e58;await this[_0x271550(0x249)]();}async[_0x549e58(0x1d2)]({message:_0x2f5c85,attributes:_0x2efcc1}){const _0x2c9b9a=_0x549e58;await this[_0x2c9b9a(0x252)]({'userMessage':_0x2f5c85,'attributes':_0x2efcc1});}[_0x549e58(0x26e)](){const _0x1f8742=_0x549e58,_0x2a0c82=this[_0x1f8742(0x316)][_0x1f8742(0x2ec)][_0x1f8742(0x29d)](_0x1f8742(0x260));if(!_0x2a0c82)throw new _0x4463ae(_0x1f8742(0x272),this);return _0x2a0c82;}async[_0x549e58(0x249)](_0x11751e){const _0x3f293e=_0x549e58;try{this[_0x3f293e(0x256)][_0x3f293e(0x233)](),await this[_0x3f293e(0x241)](_0x11751e);}catch(_0x12213c){this[_0x3f293e(0x256)][_0x3f293e(0x303)]({'errorMessage':_0x4b3662(this[_0x3f293e(0x316)][_0x3f293e(0x197)],_0x3f293e(0x294)),'id':_0x11751e||_0x327016()}),console[_0x3f293e(0x288)](_0x12213c),this[_0x3f293e(0x1a3)]=void 0x0,this[_0x3f293e(0x256)][_0x3f293e(0x1d5)]();}}async[_0x549e58(0x241)](_0x2e21e8){const _0x23468e=_0x549e58;let _0x53e4cc;this[_0x23468e(0x316)][_0x23468e(0x1f5)][_0x23468e(0x214)](_0x23468e(0x2a0))&&this[_0x23468e(0x316)][_0x23468e(0x1f5)][_0x23468e(0x29d)](_0x23468e(0x2a0))[_0x23468e(0x238)](),_0x2e21e8||!this[_0x23468e(0x1a3)]?_0x53e4cc=this[_0x23468e(0x316)][_0x23468e(0x2ec)][_0x23468e(0x29d)](_0x23468e(0x199)):this[_0x23468e(0x256)][_0x23468e(0x215)]&&(_0x53e4cc=this[_0x23468e(0x1a3)][_0x23468e(0x1b7)]['id']),await this[_0x23468e(0x301)]();const _0x1cdb76=this[_0x23468e(0x26e)](),_0x1bf4be=_0x2e21e8||_0x327016();this[_0x23468e(0x1a3)]=new _0x3c92d0({'connector':this[_0x23468e(0x283)],'chatModels':this[_0x23468e(0x2ae)],'selectedModelId':_0x53e4cc,'conversationId':_0x1bf4be,'group':_0x1cdb76,'getEditor':()=>_0x4ee1ac(this[_0x23468e(0x316)]),'isFromHistory':!!_0x2e21e8}),this[_0x23468e(0x1a3)][_0x23468e(0x2c7)](_0x23468e(0x200),_0x23468e(0x1b3))['to'](this),this[_0x23468e(0x1a3)]['on'](_0x23468e(0x25a),(_0x37a61c,_0x37e815)=>{const _0x2001ff=_0x23468e;this[_0x2001ff(0x256)][_0x2001ff(0x26b)](_0x37e815),this[_0x2001ff(0x256)][_0x2001ff(0x1c9)](),this[_0x2001ff(0x256)][_0x2001ff(0x206)](),this[_0x2001ff(0x256)][_0x2001ff(0x2be)](),_0x2e21e8||(this[_0x2001ff(0x256)][_0x2001ff(0x1e0)](),this[_0x2001ff(0x1e5)]());}),this[_0x23468e(0x1a3)]['on'](_0x23468e(0x1fe),(_0x4d0709,_0x161ee7)=>{const _0x582e4d=_0x23468e;this[_0x582e4d(0x256)][_0x582e4d(0x30d)](_0x161ee7[_0x582e4d(0x2e3)]);}),this[_0x23468e(0x1a3)]['on'](_0x23468e(0x1d3),(_0x4419b2,_0x12fc01)=>{const _0xa3d7e0=_0x23468e;this[_0xa3d7e0(0x256)][_0xa3d7e0(0x277)](_0x12fc01);}),this[_0x23468e(0x1a3)]['on'](_0x23468e(0x209),()=>{const _0xc57575=_0x23468e,_0x54ed27=this[_0xc57575(0x256)][_0xc57575(0x28c)]({'isWebSearchEnabled':!0x0,'isReasoningEnabled':!0x1});this[_0xc57575(0x256)][_0xc57575(0x1cd)](_0x54ed27);}),this[_0x23468e(0x1a3)]['on'](_0x23468e(0x1bf),()=>{const _0x23e538=_0x23468e,_0x2f1c09=this[_0x23e538(0x256)][_0x23e538(0x28c)]({'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x0});this[_0x23e538(0x256)][_0x23e538(0x1cd)](_0x2f1c09);}),this[_0x23468e(0x1a3)]['on'](_0x23468e(0x263),(_0x38cdc0,_0x5d646d)=>{const _0x409644=_0x23468e;this[_0x409644(0x256)][_0x409644(0x22b)](_0x5d646d,{'isWebSearchEnabled':!0x0,'isReasoningEnabled':!0x1});}),this[_0x23468e(0x1a3)]['on'](_0x23468e(0x2a6),(_0x17d5a5,_0x5c694b)=>{const _0x58aef4=_0x23468e;this[_0x58aef4(0x256)][_0x58aef4(0x22b)](_0x5c694b,{'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x0});}),this[_0x23468e(0x1a3)]['on'](_0x23468e(0x1b3),()=>{const _0x4f0867=_0x23468e;this[_0x4f0867(0x256)][_0x4f0867(0x1b9)]();}),this[_0x23468e(0x1a3)]['on'](_0x23468e(0x2c3),async()=>{const _0x3c3d16=_0x23468e;await this[_0x3c3d16(0x256)][_0x3c3d16(0x225)]();}),this[_0x23468e(0x1a3)]['on'](_0x23468e(0x1e8),(_0x2d24e7,_0xaa2970)=>{const _0x9dcbd5=_0x23468e;this[_0x9dcbd5(0x256)][_0x9dcbd5(0x2d1)](_0xaa2970['id']);}),this[_0x23468e(0x1a3)]['on'](_0x23468e(0x26c),(_0x3da819,_0x39770d,_0xa3b591)=>{const _0x5e6cde=_0x23468e;this[_0x5e6cde(0x2d0)](_0x39770d,_0xa3b591);}),this[_0x23468e(0x1a3)]['on'](_0x23468e(0x2cb),(_0xe751d,_0xdf0653)=>{const _0x34aff6=_0x23468e;_0x34aff6(0x29c)===_0xdf0653[_0x34aff6(0x195)]?this[_0x34aff6(0x256)][_0x34aff6(0x1bb)](_0xdf0653):this[_0x34aff6(0x256)][_0x34aff6(0x1ce)](_0xdf0653);}),this[_0x23468e(0x1a3)]['on'](_0x23468e(0x237),async(_0x122261,_0x162478)=>{const _0x87b7e7=_0x23468e;await this[_0x87b7e7(0x1ee)]({'reply':_0x162478});}),this[_0x23468e(0x1a3)]['on'](_0x23468e(0x254),(_0x1f20e0,{reply:_0x154d3e,index:_0x28ab83,state:_0x4d35c5})=>{const _0x24cde8=_0x23468e;this[_0x24cde8(0x256)][_0x24cde8(0x2ef)]({'id':_0x154d3e['id'],'index':_0x28ab83,'state':_0x4d35c5}),this[_0x24cde8(0x1f7)]?.[_0x24cde8(0x1c6)][_0x24cde8(0x299)](_0x154d3e['id'])&&this[_0x24cde8(0x1f7)]?.[_0x24cde8(0x2d6)]==_0x28ab83&&this[_0x24cde8(0x2b3)]?.[_0x24cde8(0x25b)](_0x4d35c5);}),this[_0x23468e(0x1a3)]['on'](_0x23468e(0x20a),(_0x265087,_0x5cb021)=>{const _0x35c2a9=_0x23468e;if(this[_0x35c2a9(0x256)][_0x35c2a9(0x1d4)](_0x5cb021[_0x35c2a9(0x1ea)],_0x5cb021[_0x35c2a9(0x285)]),_0x35c2a9(0x2f3)===_0x5cb021[_0x35c2a9(0x1ea)][_0x35c2a9(0x195)]){const _0x12d95f=[..._0x4ee1ac(this[_0x35c2a9(0x316)])[_0x35c2a9(0x23c)][_0x35c2a9(0x219)][_0x35c2a9(0x2f3)][_0x35c2a9(0x1a5)]()];this[_0x35c2a9(0x205)][_0x35c2a9(0x1cf)](_0x12d95f,_0x35c2a9(0x2bd)+this[_0x35c2a9(0x1a3)]?.['id']);}}),this[_0x23468e(0x1a3)]['on'](_0x23468e(0x2c9),(_0x3ba5f8,_0x3da658)=>{const _0x284e4e=_0x23468e;this[_0x284e4e(0x256)][_0x284e4e(0x298)](_0x3da658[_0x284e4e(0x1df)]),_0x284e4e(0x198)==_0x3da658[_0x284e4e(0x1df)]&&this[_0x284e4e(0x2f9)](),_0x284e4e(0x2f3)===_0x3da658[_0x284e4e(0x195)]&&this[_0x284e4e(0x205)][_0x284e4e(0x265)](_0x284e4e(0x2bd)+this[_0x284e4e(0x1a3)]?.['id']);}),this[_0x23468e(0x1a3)]['on'](_0x23468e(0x1c2),(_0x17c800,_0x54af4f)=>{const _0x58f94e=_0x23468e;this[_0x58f94e(0x256)][_0x58f94e(0x1af)](_0x54af4f[_0x58f94e(0x1ea)][_0x58f94e(0x1df)],_0x54af4f[_0x58f94e(0x285)]);}),this[_0x23468e(0x1a3)]['on'](_0x23468e(0x29f),(_0x4d42c9,_0x10b24b)=>{const _0x76caa2=_0x23468e;this[_0x76caa2(0x256)][_0x76caa2(0x2ab)](_0x10b24b[_0x76caa2(0x2e5)]);}),this[_0x23468e(0x1a3)]['on'](_0x23468e(0x1b1),(_0x175ba0,_0x2779fb)=>{const _0x4ff4f6=_0x23468e;this[_0x4ff4f6(0x256)][_0x4ff4f6(0x2fa)](_0x2779fb[_0x4ff4f6(0x1eb)]);}),this[_0x23468e(0x1a3)]['on'](_0x23468e(0x1a7),(_0x544fcb,_0x58e969)=>{const _0x2d25f7=_0x23468e;this[_0x2d25f7(0x256)][_0x2d25f7(0x317)](_0x58e969[_0x2d25f7(0x1f1)],_0x58e969[_0x2d25f7(0x2d2)],_0x58e969[_0x2d25f7(0x2cd)],_0x58e969[_0x2d25f7(0x289)]);}),this[_0x23468e(0x1a3)]['on'](_0x23468e(0x315),(_0x10bce1,_0x2e36cb)=>{const _0x3f1dcb=_0x23468e;this[_0x3f1dcb(0x256)][_0x3f1dcb(0x309)](_0x2e36cb[_0x3f1dcb(0x1f1)],_0x2e36cb[_0x3f1dcb(0x253)],_0x2e36cb[_0x3f1dcb(0x2b6)]);}),this[_0x23468e(0x1a3)]['on'](_0x23468e(0x22c),(_0x182543,_0x1ced36)=>{const _0x19438f=_0x23468e;this[_0x19438f(0x256)][_0x19438f(0x2e6)](_0x1ced36);}),this[_0x23468e(0x1a3)]['on'](_0x23468e(0x242),async(_0x5c28a9,_0x2c567e)=>{const _0x5a8bd6=_0x23468e,_0x4e8f28=(await this[_0x5a8bd6(0x2ae)][_0x5a8bd6(0x1ba)]())[_0x5a8bd6(0x30b)](_0x2fc143=>_0x2fc143['id']===_0x2c567e[_0x5a8bd6(0x1b7)]?.['id'])||null;this[_0x5a8bd6(0x256)][_0x5a8bd6(0x2aa)](_0x4e8f28,_0x2c567e[_0x5a8bd6(0x23f)]);}),this[_0x23468e(0x1a3)]['on'](_0x23468e(0x288),(_0x528136,{error:_0x3350dc,interactionId:_0x5af8d9,fileName:_0x21e311,url:_0x3e6167,sourceId:_0x206f11,sourceLabel:_0x414121})=>{const _0x5b103e=_0x23468e,_0x3042da=_0x5af8d9?_0x5af8d9+':'+_0x327016():_0x327016();_0x3350dc[_0x5b103e(0x1bd)][_0x5b103e(0x1e1)](_0x5b103e(0x1db))?this[_0x5b103e(0x256)][_0x5b103e(0x21e)]({'staticMessage':_0x4b3662(this[_0x5b103e(0x316)][_0x5b103e(0x197)],_0x5b103e(0x1c5)),'id':_0x3042da}):_0x3350dc[_0x5b103e(0x1bd)][_0x5b103e(0x1e1)](_0x5b103e(0x1ab))||_0x3350dc[_0x5b103e(0x1bd)][_0x5b103e(0x1e1)](_0x5b103e(0x2e4))?(this[_0x5b103e(0x256)][_0x5b103e(0x303)]({'errorMessage':_0x4b3662(this[_0x5b103e(0x316)][_0x5b103e(0x197)],_0x5b103e(0x294)),'id':_0x3042da}),this[_0x5b103e(0x2a3)](_0x3350dc)):_0x3350dc[_0x5b103e(0x1bd)][_0x5b103e(0x1e1)](_0x5b103e(0x1fb))?this[_0x5b103e(0x256)][_0x5b103e(0x303)]({'errorMessage':_0x4b3662(this[_0x5b103e(0x316)][_0x5b103e(0x197)],_0x5b103e(0x24d),_0x21e311),'id':_0x3042da}):_0x3350dc[_0x5b103e(0x1bd)][_0x5b103e(0x1e1)](_0x5b103e(0x2ce))?this[_0x5b103e(0x256)][_0x5b103e(0x303)]({'errorMessage':_0x4b3662(this[_0x5b103e(0x316)][_0x5b103e(0x197)],_0x5b103e(0x2eb),_0x3e6167),'id':_0x3042da}):_0x3350dc[_0x5b103e(0x1bd)][_0x5b103e(0x1e1)](_0x5b103e(0x2f6))?this[_0x5b103e(0x256)][_0x5b103e(0x303)]({'errorMessage':_0x4b3662(this[_0x5b103e(0x316)][_0x5b103e(0x197)],_0x5b103e(0x27d)),'id':_0x3042da}):_0x3350dc[_0x5b103e(0x1bd)][_0x5b103e(0x1e1)](_0x5b103e(0x310))?this[_0x5b103e(0x256)][_0x5b103e(0x303)]({'errorMessage':_0x4b3662(this[_0x5b103e(0x316)][_0x5b103e(0x197)],_0x5b103e(0x244)),'id':_0x3042da}):_0x3350dc[_0x5b103e(0x1bd)][_0x5b103e(0x1e1)](_0x5b103e(0x19b))?(_0x206f11&&this[_0x5b103e(0x256)][_0x5b103e(0x1b6)](_0x206f11),this[_0x5b103e(0x256)][_0x5b103e(0x303)]({'errorMessage':_0x4b3662(this[_0x5b103e(0x316)][_0x5b103e(0x197)],_0x5b103e(0x2b2),_0x414121||_0x5b103e(0x2d2)),'id':_0x3042da}),this[_0x5b103e(0x2a3)](_0x3350dc)):_0x3350dc[_0x5b103e(0x1bd)][_0x5b103e(0x1e1)](_0x5b103e(0x20b))?(this[_0x5b103e(0x256)][_0x5b103e(0x303)]({'errorMessage':_0x4b3662(this[_0x5b103e(0x316)][_0x5b103e(0x197)],_0x5b103e(0x22a)),'id':_0x3042da}),this[_0x5b103e(0x2a3)](_0x3350dc)):_0x3350dc[_0x5b103e(0x1bd)][_0x5b103e(0x1e1)](_0x5b103e(0x213))?(this[_0x5b103e(0x256)][_0x5b103e(0x303)]({'errorMessage':_0x4b3662(this[_0x5b103e(0x316)][_0x5b103e(0x197)],_0x5b103e(0x1d9)),'id':_0x3042da}),this[_0x5b103e(0x2a3)](_0x3350dc)):_0x3350dc[_0x5b103e(0x1bd)][_0x5b103e(0x1e1)](_0x5b103e(0x1ae))?(this[_0x5b103e(0x256)][_0x5b103e(0x303)]({'errorMessage':_0x4b3662(this[_0x5b103e(0x316)][_0x5b103e(0x197)],_0x5b103e(0x193)),'id':_0x3042da}),this[_0x5b103e(0x2a3)](_0x3350dc)):_0x3350dc[_0x5b103e(0x1bd)][_0x5b103e(0x1e1)](_0x5b103e(0x2b4))?(this[_0x5b103e(0x256)][_0x5b103e(0x303)]({'errorMessage':_0x4b3662(this[_0x5b103e(0x316)][_0x5b103e(0x197)],_0x5b103e(0x29b)),'id':_0x3042da}),this[_0x5b103e(0x2a3)](_0x3350dc)):_0x3350dc[_0x5b103e(0x1bd)][_0x5b103e(0x1e1)](_0x5b103e(0x22d))?(this[_0x5b103e(0x256)][_0x5b103e(0x303)]({'errorMessage':_0x4b3662(this[_0x5b103e(0x316)][_0x5b103e(0x197)],_0x5b103e(0x257)),'id':_0x3042da}),this[_0x5b103e(0x2a3)](_0x3350dc)):_0x3350dc[_0x5b103e(0x1bd)][_0x5b103e(0x1e1)](_0x5b103e(0x314))?(this[_0x5b103e(0x256)][_0x5b103e(0x303)]({'errorMessage':_0x4b3662(this[_0x5b103e(0x316)][_0x5b103e(0x197)],_0x5b103e(0x290)),'id':_0x3042da}),this[_0x5b103e(0x2a3)](_0x3350dc)):(this[_0x5b103e(0x256)][_0x5b103e(0x303)]({'errorMessage':_0x4b3662(this[_0x5b103e(0x316)][_0x5b103e(0x197)],_0x5b103e(0x307)),'id':_0x3042da}),this[_0x5b103e(0x2a3)](_0x3350dc));}),await this[_0x23468e(0x1a3)][_0x23468e(0x22f)](this[_0x23468e(0x316)][_0x23468e(0x2ec)][_0x23468e(0x29d)](_0x23468e(0x21d))),_0x2e21e8||await this[_0x23468e(0x1a3)][_0x23468e(0x203)]();}async[_0x549e58(0x252)]({userMessage:_0x466e6f,attributes:_0x21b2c2}){const _0x186a92=_0x549e58;if(!this[_0x186a92(0x1a3)])throw new _0x4463ae(_0x186a92(0x2f4));if(this[_0x186a92(0x1a3)][_0x186a92(0x262)]()){const _0x4b322e=await this[_0x186a92(0x205)][_0x186a92(0x231)]();await this[_0x186a92(0x1a3)][_0x186a92(0x1da)](_0x4b322e);}this[_0x186a92(0x1a3)]['id']&&this[_0x186a92(0x1a3)][_0x186a92(0x1e9)]&&await this[_0x186a92(0x1a3)][_0x186a92(0x2f2)]({'userMessage':_0x466e6f,'attributes':_0x21b2c2});}[_0x549e58(0x1e6)](){const _0x52b855=_0x549e58;console[_0x52b855(0x268)](_0x52b855(0x264));}[_0x549e58(0x2ea)](_0x46814e){const _0xc652c=_0x549e58;this[_0xc652c(0x256)][_0xc652c(0x1fa)](_0x46814e);}[_0x549e58(0x2a3)](_0x199568){const _0x5b80b9=_0x549e58;_0x5d0d75(_0x199568[_0x5b80b9(0x1bd)]);}[_0x549e58(0x24f)](_0x182cd4){const _0x2d4f67=_0x549e58;this[_0x2d4f67(0x1a3)]?.[_0x2d4f67(0x2a8)](_0x182cd4);}[_0x549e58(0x227)](){const _0x29c436=_0x549e58;this[_0x29c436(0x1a3)]?.[_0x29c436(0x229)]();}[_0x549e58(0x1c0)](){const _0x6cfd80=_0x549e58;this[_0x6cfd80(0x1a3)]?.[_0x6cfd80(0x28d)]();}[_0x549e58(0x282)](_0x4055e1){const _0x210623=_0x549e58,[_0x37c9e0,_0x5729bc]=_0x4055e1[_0x210623(0x19f)](':'),_0x14c550=this[_0x210623(0x1a3)][_0x210623(0x1f0)](_0x37c9e0),_0x4b5f51=_0x14c550[_0x210623(0x25e)](_0x5729bc);return{'interaction':_0x14c550,'reply':_0x4b5f51};}[_0x549e58(0x2db)](_0x4918b7,_0x281cfa=!0x1){const _0x557bb8=_0x549e58,_0x3c7b74=_0x4ee1ac(this[_0x557bb8(0x316)]),_0x44ff6c={'target':_0x3c7b74[_0x557bb8(0x1f3)][_0x557bb8(0x27f)][_0x557bb8(0x2ee)][_0x557bb8(0x23a)](_0x3c7b74[_0x557bb8(0x1f3)][_0x557bb8(0x1a1)][_0x557bb8(0x1f9)](_0x4918b7)),'viewportOffset':{'top':0x96,'left':0x0,'bottom':0x32,'right':0x0},'ancestorOffset':0x14,'alignToTop':_0x281cfa};_0x281cfa&&(_0x44ff6c[_0x557bb8(0x2fd)]=!0x0),_0x2f1661(_0x44ff6c);}[_0x549e58(0x2d0)](_0x45d587,_0x3dee12=!0x1){const _0x40562b=_0x549e58;this[_0x40562b(0x256)][_0x40562b(0x26c)](_0x45d587||_0x4b3662(this[_0x40562b(0x316)][_0x40562b(0x197)],_0x40562b(0x2cf)),_0x3dee12);}async[_0x549e58(0x1ee)]({reply:_0x2a476a,renderingStrategy:_0x48f4bd}){const _0x9bd327=_0x549e58,{id:_0x120f15,interactionId:_0x4ba276,isDone:_0x32c155,type:_0x5629bb,parsedContent:_0x153661}=_0x2a476a,_0x488fb0=_0x4ba276+':'+_0x120f15;if(_0x9bd327(0x1ef)===_0x5629bb){const _0xc5012f=_0x2a476a[_0x9bd327(0x306)]({'showDiff':this[_0x9bd327(0x256)][_0x9bd327(0x1dc)]});await this[_0x9bd327(0x256)][_0x9bd327(0x2c0)]({'id':_0x488fb0,'parts':_0xc5012f,'renderingStrategy':_0x48f4bd,'isDone':_0x32c155});}else _0x9bd327(0x29c)===_0x5629bb&&await this[_0x9bd327(0x256)][_0x9bd327(0x2a9)]({'id':_0x488fb0,'parsedContent':_0x153661,'renderingStrategy':_0x48f4bd,'isDone':_0x32c155});_0x32c155&&_0x2a476a[_0x9bd327(0x279)][_0x9bd327(0x251)]>0x0&&this[_0x9bd327(0x256)][_0x9bd327(0x2e7)](_0x488fb0,_0x2a476a[_0x9bd327(0x279)]);}async[_0x549e58(0x301)](){const _0x55b142=_0x549e58,_0x2b02a0=this[_0x55b142(0x1a3)]?.[_0x55b142(0x284)];_0x2b02a0&&(_0x2b02a0[_0x55b142(0x2ed)](),this[_0x55b142(0x256)][_0x55b142(0x1f2)](_0x2b02a0));}async[_0x549e58(0x228)](){const _0x333cf2=_0x549e58,_0x15e8b5=this[_0x333cf2(0x1a3)]?.[_0x333cf2(0x284)];if(_0x15e8b5){for await(const _0x2722ec of _0x15e8b5[_0x333cf2(0x312)])await this[_0x333cf2(0x1ee)]({'reply':_0x2722ec,'renderingStrategy':_0x333cf2(0x2fe)});}}[_0x549e58(0x29a)](_0x1d2f58){const _0x52bda4=_0x549e58,_0x267ea1={'positiveCount':_0x1d2f58[_0x52bda4(0x1f8)][_0x52bda4(0x275)](_0x5709c7=>_0x52bda4(0x2c8)===_0x5709c7[_0x52bda4(0x2d7)])[_0x52bda4(0x251)],'totalCount':_0x1d2f58[_0x52bda4(0x1f8)][_0x52bda4(0x251)],'modificationId':_0x1d2f58['id']},_0x3198d5=this[_0x52bda4(0x1a3)][_0x52bda4(0x1f0)](_0x1d2f58[_0x52bda4(0x30a)])[_0x52bda4(0x30e)];_0x3198d5&&this[_0x52bda4(0x283)][_0x52bda4(0x287)](this[_0x52bda4(0x1a3)]['id'],_0x3198d5,_0x267ea1);}[_0x549e58(0x1ed)](_0x397437){const _0x1bef6f=_0x549e58;let _0x5a30ee=null,_0x1caacd=null;this['on'](_0x1bef6f(0x200),(_0x358507,_0x511a8f,_0x2081b8)=>{const _0x17ca84=_0x1bef6f;_0x2081b8['id']!==_0x5a30ee&&(_0x5a30ee=_0x2081b8['id'],_0x1caacd=this[_0x17ca84(0x250)](_0x2081b8)),_0x397437(_0x511a8f,_0x1caacd);});}[_0x549e58(0x250)](_0x2324f6){const _0x3cc9f6=_0x549e58,_0x24573f=this[_0x3cc9f6(0x256)],_0xf1c82d=()=>{const _0x49ca50=_0x3cc9f6;_0x2324f6[_0x49ca50(0x25c)](),_0x2324f6[_0x49ca50(0x220)](),_0x24573f[_0x49ca50(0x30f)]();},_0x3ffeaa=()=>{const _0xcd9475=_0x3cc9f6;_0x2324f6[_0xcd9475(0x243)]&&(_0x2324f6[_0xcd9475(0x243)][_0xcd9475(0x1a6)](),_0x2324f6[_0xcd9475(0x243)]=void 0x0);};return{'insertTextReply':(_0x17d826,_0x234a4d)=>{const _0x57c9a5=_0x3cc9f6;_0x3ffeaa(),_0xf1c82d();const _0x316734=_0x2324f6[_0x57c9a5(0x243)]=_0x2324f6[_0x57c9a5(0x224)]({'type':_0x57c9a5(0x29c),'interactionId':_0x2324f6['id'],'content':_0x17d826,'id':_0x234a4d||_0x327016()});return _0x3ffeaa(),_0x316734;},'insertCustomElement':async(_0x5e1ae6,_0x40e29b)=>(_0x3ffeaa(),_0xf1c82d(),_0x24573f[_0x3cc9f6(0x1c8)](_0x5e1ae6,_0x40e29b||_0x327016())),'setLoadingMessage':_0x2bd119=>{const _0x2a2e48=_0x3cc9f6;_0x24573f[_0x2a2e48(0x1cd)](_0x2bd119);},'clearLoadingMessage':()=>{const _0x1f891c=_0x3cc9f6;_0x24573f[_0x1f891c(0x30f)]();}};}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- function _0x49b6(){const _0x2e7011=['custom-element','addFeedItemAISuggestion','updateFeedItemAIReplySuggestionPartState','commands','view','queueEmptyPromise','_titleAnimationInterval','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REASONING','error-message','interactionId','clearPendingContextUI','setWebSearch','_isTrackChangesCommandValueBound','updateFeedInteractionHeader','scrollFeedToSuggestion','updateSuggestionItem','setModelList','config','get','chatControls','removeFeedItem','hasItem','streaming','setSuggestionPartActive','pluginName','_interactionPromiseResolver','feedItemRenderingStrategy','setLoadingMessage','ai.models.showModelSelector','enqueue','30854730iVsNav','784780SnZkHB','toggleSuggestionDisplayMode','2835548FJgxSm','conversation-start','addItem','find','isOfficialPlugin','AI_CHAT_HEADING','addFeedItemStaticMessage','isPending','_view','AI_CHAT_WELCOME_MESSAGE','_getInputPlaceholder','startsWith','updateWebSources','updateFeedItemAIReplySources','ai.availableReplyActions','addFeedItemAIReply','AI_CHAT_FEED_LOADING_MESSAGE_REASONING','updateReplyItem','value','userMessage','bind','addFeedInteractionHeader','areActionsDisabled','AITabs','addContextItem','setAddContextOptions','last','isBusy','renderingStrategy','removeContextItem','ai.chat.welcomeMessage','has','ai-reply','scrollToSuggestion','children','updateFeedItemAIReplySuggestionContent','isLoading','showDiff','isPremiumPlugin','toggleLoadingSkeleton','abort','_promiseQueue','setConversationContext','TrackChanges','chat','remove','insertSuggestion','setConversationTitle','trackChanges','17122ajRvRw','updateResourceState','plugins','prepareLoadingMessage','locale','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH','disableControls','isDisabled','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH','removeFeedInteraction','markFeedItemAsDone','resetConversationTitle','options','updateFeedItemAIReplyContent','finishInteraction','delegate','interaction-header','user-message','attributes','stopInteraction','ai.chat.context.searchInputVisibleFrom','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH_REASONING','startInteraction','forEach','createConversation','ai-suggestion-reply','clearConversationContextUI','resetMessageInput','conversationCreated','then','label','startAutoScroll','updateCapabilities','clearLoadingMessage','319404NHpEub','isWebSearchEnabled','isDone','setIsMaximized','enableControls','showResizeButton','updateSuggestionPartState','fire','addFeedItemUserMessage','AIChatUI','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH_REASONING','chatFeed','closeSourceResourceBalloon','isVisible','displayedPrompt','setIsUploadInProgress','setReasoning','isReasoningEnabled','217rhSeQM','enableModelSelector','chatHeader','setSelectedModel','_animateConversationTitle','capabilities','</p>','setContextItemLoading','context','filter','availableModels','addFeedItemError','removeItem','getItemIds','populateSourceResourceBalloon','addTab','from','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REGULAR','2028090hfrksF','isMaximized','setModel','381FXlvmf','destroy','markItemAsDone','isModelAvailable','128pdiyMk','clear','setFeedItemAIReplySuggestionPartActive','focusPromptInput','length','contextItems','requires','<p>','addFeedItemCustomElement','277317lEMyfA','set','AI_CHAT_FEED_LOADING_MESSAGE_REGULAR','isTrackChangesOn','values','setFeedItemRenderingStrategy','disableModelSelector','setPromptInputValue','setInputPlaceholder','stopAutoScroll','hasFeedItem'];_0x49b6=function(){return _0x2e7011;};return _0x49b6();}const _0x225ccf=_0x43ba;(function(_0x5328f2,_0x492856){const _0x195ed6=_0x43ba,_0x15fe2d=_0x5328f2();while(!![]){try{const _0x28d991=-parseInt(_0x195ed6(0x1d6))/0x1+-parseInt(_0x195ed6(0x209))/0x2*(-parseInt(_0x195ed6(0x19f))/0x3)+-parseInt(_0x195ed6(0x1d8))/0x4+parseInt(_0x195ed6(0x19c))/0x5+-parseInt(_0x195ed6(0x22b))/0x6*(parseInt(_0x195ed6(0x18a))/0x7)+parseInt(_0x195ed6(0x1a3))/0x8*(-parseInt(_0x195ed6(0x1ac))/0x9)+parseInt(_0x195ed6(0x1d5))/0xa;if(_0x28d991===_0x492856)break;else _0x15fe2d['push'](_0x15fe2d['shift']());}catch(_0x162702){_0x15fe2d['push'](_0x15fe2d['shift']());}}}(_0x49b6,0xe5d61));import{ContextPlugin as _0x400b68}from'ckeditor5/src/core.js';import{_isMotionReduced as _0xa6660b}from'ckeditor5/src/utils.js';import{AIChatView as _0x571ea7}from'./ui/aichatview.js';import{AITabs as _0x41ca55}from'../aitabs/aitabs.js';function _0x43ba(_0x212258,_0x35e4a7){const _0x49b6bb=_0x49b6();return _0x43ba=function(_0x43ba98,_0x1c86b7){_0x43ba98=_0x43ba98-0x186;let _0x44d2c9=_0x49b6bb[_0x43ba98];return _0x44d2c9;},_0x43ba(_0x212258,_0x35e4a7);}import{getTranslation as _0xc9fde0}from'../aicore/utils/common-translations.js';import{IconAIChat as _0x4fb30a}from'ckeditor5/src/icons.js';import{AIChatFeedInteractionHeaderView as _0x12bdfc}from'./ui/feed/aichatfeedinteractionheaderview.js';import{PromiseQueue as _0x3b0821}from'./utils/promisequeue.js';import{AI_CHAT_UI_EVENT_NAMES as _0x13db97}from'./utils/eventnames.js';import'../../theme/aichat/aichat.css';import{getEditorFromContext as _0x4f536b}from'../aicore/utils/geteditorfromcontext.js';import{AI_REPLY_ACTIONS as _0x5d97f4}from'./ui/feed/aichatfeedsuggestionitemactionsview.js';export class AIChatUI extends _0x400b68{static get[_0x225ccf(0x1a9)](){return[_0x41ca55];}[_0x225ccf(0x1e0)];static get[_0x225ccf(0x1cf)](){const _0x1d1731=_0x225ccf;return _0x1d1731(0x234);}static get[_0x225ccf(0x1dc)](){return!0x0;}static get[_0x225ccf(0x1fe)](){return!0x0;}[_0x225ccf(0x1d1)]=_0x225ccf(0x1cd);[_0x225ccf(0x1fd)]=!0x0;[_0x225ccf(0x201)];[_0x225ccf(0x1d0)];[_0x225ccf(0x1bd)]=void 0x0;[_0x225ccf(0x1c3)]=!0x1;constructor(_0x3eabe9){const _0x589eac=_0x225ccf;super(_0x3eabe9);const _0x3ed6c1=this[_0x589eac(0x192)][_0x589eac(0x20b)][_0x589eac(0x1c9)](_0x589eac(0x1ef));this[_0x589eac(0x1ad)](_0x589eac(0x1f3),!0x1),this[_0x589eac(0x201)]=new _0x3b0821(),this[_0x589eac(0x1e0)]=new _0x571ea7(this[_0x589eac(0x192)][_0x589eac(0x20d)],{'showResizeButton':_0x3ed6c1[_0x589eac(0x230)],'contextResourcesSearchInputVisibleFrom':this[_0x589eac(0x192)][_0x589eac(0x1c8)][_0x589eac(0x1c9)](_0x589eac(0x21d))}),this[_0x589eac(0x1e0)][_0x589eac(0x218)](..._0x13db97)['to'](this),this[_0x589eac(0x1e0)]['on'](_0x589eac(0x1d7),(_0x3e994f,{showDiff:_0xa6ee5b})=>{const _0x405a47=_0x589eac;this[_0x405a47(0x1fd)]=_0xa6ee5b;}),_0x3ed6c1[_0x589eac(0x1bb)][_0x589eac(0x199)]({'id':_0x589eac(0x204),'buttonLabel':_0xc9fde0(this[_0x589eac(0x192)][_0x589eac(0x20d)],_0x589eac(0x1dd)),'buttonIcon':_0x4fb30a,'order':0x0,'content':this[_0x589eac(0x1e0)]}),this[_0x589eac(0x1e0)][_0x589eac(0x1ca)][_0x589eac(0x1ec)](_0x589eac(0x1fc))['to'](this,_0x589eac(0x1f3),_0x5dc1ef=>_0x5dc1ef),this[_0x589eac(0x1e0)][_0x589eac(0x236)][_0x589eac(0x1ec)](_0x589eac(0x1df))['to'](this,_0x589eac(0x1f3),_0x13da81=>_0x13da81),this[_0x589eac(0x1e0)][_0x589eac(0x1ca)][_0x589eac(0x1b4)](this[_0x589eac(0x1e2)]()),this[_0x589eac(0x1ec)](_0x589eac(0x1a2))['to'](this[_0x589eac(0x1e0)][_0x589eac(0x1ca)],_0x589eac(0x1a2));}[_0x225ccf(0x1a0)](){const _0xf6ac1e=_0x225ccf;super[_0xf6ac1e(0x1a0)](),this[_0xf6ac1e(0x1bd)]&&clearInterval(this[_0xf6ac1e(0x1bd)]);}[_0x225ccf(0x221)](_0x4baf1f){const _0x59416e=_0x225ccf,_0xd6cf6b=this[_0x59416e(0x192)][_0x59416e(0x1c8)][_0x59416e(0x1c9)](_0x59416e(0x1f6))??_0xc9fde0(this[_0x59416e(0x192)][_0x59416e(0x20d)],_0x59416e(0x1e1));this[_0x59416e(0x1e0)][_0x59416e(0x236)][_0x59416e(0x1a4)](),this[_0x59416e(0x1e0)][_0x59416e(0x1ca)][_0x59416e(0x18b)](),this[_0x59416e(0x1e0)][_0x59416e(0x1ca)][_0x59416e(0x1c7)](_0x4baf1f[_0x59416e(0x194)],!this[_0x59416e(0x192)][_0x59416e(0x1c8)][_0x59416e(0x1c9)](_0x59416e(0x1d3))),this[_0x59416e(0x1de)]({'id':_0x59416e(0x1d9),'staticMessage':_0xd6cf6b}),this[_0x59416e(0x232)](_0x59416e(0x225));}[_0x225ccf(0x1de)]({id:_0xed680e,staticMessage:_0x32d413}){const _0x17f51f=_0x225ccf;this[_0x17f51f(0x1e0)][_0x17f51f(0x236)][_0x17f51f(0x1da)](_0x17f51f(0x1f8),{'id':_0xed680e,'initialContent':_0x17f51f(0x1aa)+_0x32d413+_0x17f51f(0x190)});}[_0x225ccf(0x233)](_0x317153){const _0x3011aa=_0x225ccf,_0x3b6eb4=_0x317153[_0x3011aa(0x21b)]?.[_0x3011aa(0x186)]||_0x317153[_0x3011aa(0x1eb)];this[_0x3011aa(0x1e0)][_0x3011aa(0x236)][_0x3011aa(0x1da)](_0x3011aa(0x21a),{'contextItems':Array[_0x3011aa(0x19a)](_0x317153[_0x3011aa(0x1a8)][_0x3011aa(0x1b0)]()),'initialContent':_0x3011aa(0x1aa)+_0x3b6eb4+_0x3011aa(0x190),'id':_0x317153['id']});}[_0x225ccf(0x195)]({errorMessage:_0x49c9a6,id:_0x40023e}){const _0x468e26=_0x225ccf;this[_0x468e26(0x1e0)][_0x468e26(0x236)][_0x468e26(0x1da)](_0x468e26(0x1bf),{'initialContent':_0x468e26(0x1aa)+_0x49c9a6+_0x468e26(0x190),'id':_0x40023e});}[_0x225ccf(0x1e7)](_0x555b21){const _0x21d2e9=_0x225ccf;return this[_0x21d2e9(0x201)][_0x21d2e9(0x1d4)](async()=>{const _0x2a98cf=_0x21d2e9;this[_0x2a98cf(0x1e0)][_0x2a98cf(0x236)][_0x2a98cf(0x1da)](_0x2a98cf(0x1f8),{'id':_0x555b21[_0x2a98cf(0x1c0)]+':'+_0x555b21['id']}),this[_0x2a98cf(0x22a)]();});}async[_0x225ccf(0x1b8)](_0x559878){const _0x408365=_0x225ccf,_0x532a04=_0x4f536b(this[_0x408365(0x192)]);let _0x3b9777=_0x532a04[_0x408365(0x1c8)][_0x408365(0x1c9)](_0x408365(0x1e6))||[..._0x5d97f4];if(_0x532a04[_0x408365(0x20b)][_0x408365(0x1f7)](_0x408365(0x203))){if(!this[_0x408365(0x1c3)]){this[_0x408365(0x1c3)]=!0x0;const _0x25fb7d=_0x532a04[_0x408365(0x1ba)][_0x408365(0x1c9)](_0x408365(0x208));this[_0x408365(0x1e0)][_0x408365(0x236)][_0x408365(0x1ec)](_0x408365(0x1af))['to'](_0x25fb7d,_0x408365(0x1ea));}}else _0x3b9777=_0x3b9777[_0x408365(0x193)](_0x2bc4e4=>_0x408365(0x206)!=_0x2bc4e4);return this[_0x408365(0x201)][_0x408365(0x1d4)](async()=>{const _0x203718=_0x408365;this[_0x203718(0x1e0)][_0x203718(0x236)][_0x203718(0x1da)](_0x203718(0x222),{'id':_0x559878[_0x203718(0x1c0)]+':'+_0x559878['id'],'areActionsDisabled':_0x559878[_0x203718(0x1ee)],'showDiff':this[_0x203718(0x1fd)],'availableActions':_0x3b9777}),this[_0x203718(0x22a)]();});}[_0x225ccf(0x1ed)](_0x2e0d1d,_0x4ac061){const _0x5b19bb=_0x225ccf,_0x5e7070=this[_0x5b19bb(0x1e0)][_0x5b19bb(0x236)][_0x5b19bb(0x1fa)][_0x5b19bb(0x1f2)];if(_0x5e7070 instanceof _0x12bdfc)return this[_0x5b19bb(0x1e0)][_0x5b19bb(0x236)][_0x5b19bb(0x1fa)][_0x5b19bb(0x205)](_0x5e7070),void this[_0x5b19bb(0x1e0)][_0x5b19bb(0x236)][_0x5b19bb(0x1da)](_0x5b19bb(0x219),{'id':_0x2e0d1d['id'],'capabilities':{'isWebSearchEnabled':_0x5e7070[_0x5b19bb(0x18f)][_0x5b19bb(0x22c)]||_0x4ac061[_0x5b19bb(0x22c)],'isReasoningEnabled':_0x5e7070[_0x5b19bb(0x18f)][_0x5b19bb(0x189)]||_0x4ac061[_0x5b19bb(0x189)]}});this[_0x5b19bb(0x1e0)][_0x5b19bb(0x236)][_0x5b19bb(0x1da)](_0x5b19bb(0x219),{'id':_0x2e0d1d['id'],'capabilities':_0x4ac061});}async[_0x225ccf(0x1ab)](_0x26d719,_0x12ea44){const _0x393a91=_0x225ccf;let _0x2acec0;return await this[_0x393a91(0x201)][_0x393a91(0x1d4)](async()=>{const _0x3e4dac=_0x393a91;_0x2acec0=this[_0x3e4dac(0x1e0)][_0x3e4dac(0x236)][_0x3e4dac(0x1da)](_0x3e4dac(0x1b7),{'content':_0x26d719,'id':_0x12ea44});}),_0x2acec0;}[_0x225ccf(0x1cb)](_0x39c890){const _0x4128b5=_0x225ccf;this[_0x4128b5(0x1e0)][_0x4128b5(0x236)][_0x4128b5(0x196)](_0x39c890);}[_0x225ccf(0x1b6)](_0x151b03){const _0x5f4b59=_0x225ccf;return this[_0x5f4b59(0x1e0)][_0x5f4b59(0x236)][_0x5f4b59(0x1cc)](_0x151b03);}[_0x225ccf(0x1c4)](_0x48f0f1){const _0x61e29e=_0x225ccf,_0x303536=this[_0x61e29e(0x1e0)][_0x61e29e(0x236)][_0x61e29e(0x1fa)][_0x61e29e(0x1db)](_0x32d4ea=>_0x32d4ea[_0x61e29e(0x215)]['id']==_0x48f0f1['id']&&_0x32d4ea instanceof _0x12bdfc);_0x303536&&_0x303536[_0x61e29e(0x1ad)](_0x61e29e(0x238),_0x48f0f1[_0x61e29e(0x238)]);}async[_0x225ccf(0x216)](_0x57e927){const _0x3eb301=_0x225ccf,_0x1d9dea=_0x57e927[_0x3eb301(0x1f4)]||this[_0x3eb301(0x1d1)];return this[_0x3eb301(0x201)][_0x3eb301(0x1d4)](async _0x4fe9d4=>{const _0x519243=_0x3eb301;await this[_0x519243(0x1e0)][_0x519243(0x236)][_0x519243(0x1e9)]({..._0x57e927,'abortSignal':_0x4fe9d4,'renderingStrategy':_0x1d9dea}),_0x57e927[_0x519243(0x22d)]&&this[_0x519243(0x213)](_0x57e927['id']);});}[_0x225ccf(0x1e5)](_0x4bb13f,_0x1bed50){const _0x487af1=_0x225ccf;this[_0x487af1(0x1e0)][_0x487af1(0x236)][_0x487af1(0x1e4)](_0x4bb13f,_0x1bed50);}async[_0x225ccf(0x1fb)](_0x8522e3){const _0x369404=_0x225ccf,_0x433b62=_0x8522e3[_0x369404(0x1f4)]||this[_0x369404(0x1d1)];return this[_0x369404(0x201)][_0x369404(0x1d4)](async _0x5f3dc7=>{const _0x1f25e6=_0x369404;await this[_0x1f25e6(0x1e0)][_0x1f25e6(0x236)][_0x1f25e6(0x1c6)]({..._0x8522e3,'abortSignal':_0x5f3dc7,'renderingStrategy':_0x433b62}),_0x8522e3[_0x1f25e6(0x22d)]&&this[_0x1f25e6(0x213)](_0x8522e3['id']);});}[_0x225ccf(0x1b9)](_0x5efc09){const _0x58c043=_0x225ccf;this[_0x58c043(0x1e0)][_0x58c043(0x236)][_0x58c043(0x231)](_0x5efc09);}[_0x225ccf(0x1a5)](_0x567f22){const _0x107a9a=_0x225ccf;this[_0x107a9a(0x1e0)][_0x107a9a(0x236)][_0x107a9a(0x1ce)](_0x567f22);}[_0x225ccf(0x213)](_0x365f2e){const _0x464000=_0x225ccf;this[_0x464000(0x1e0)][_0x464000(0x236)][_0x464000(0x1a1)](_0x365f2e);}[_0x225ccf(0x212)](_0x35582f){const _0x4785ad=_0x225ccf;this[_0x4785ad(0x1e0)][_0x4785ad(0x236)][_0x4785ad(0x197)]()[_0x4785ad(0x193)](_0x5dd3de=>_0x5dd3de[_0x4785ad(0x1e3)](_0x35582f))[_0x4785ad(0x220)](_0x564bd8=>this[_0x4785ad(0x1e0)][_0x4785ad(0x236)][_0x4785ad(0x196)](_0x564bd8));}[_0x225ccf(0x21f)](){const _0x455743=_0x225ccf,_0x207f04=this[_0x455743(0x20c)]({'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x1});this[_0x455743(0x1d2)](_0x207f04),this[_0x455743(0x1e0)][_0x455743(0x1ca)][_0x455743(0x1b2)](!this[_0x455743(0x192)][_0x455743(0x1c8)][_0x455743(0x1c9)](_0x455743(0x1d3))),this[_0x455743(0x1f3)]=!0x0,this[_0x455743(0x1e0)][_0x455743(0x236)][_0x455743(0x228)]();}[_0x225ccf(0x21c)](_0x26b4c9){const _0x302251=_0x225ccf;this[_0x302251(0x201)][_0x302251(0x200)](),this[_0x302251(0x1e0)][_0x302251(0x236)][_0x302251(0x197)]()[_0x302251(0x193)](_0x5e884b=>_0x5e884b[_0x302251(0x1e3)](_0x26b4c9['id']))[_0x302251(0x220)](_0x344cb1=>this[_0x302251(0x213)](_0x344cb1)),this[_0x302251(0x1f3)]=!0x1,this[_0x302251(0x1e0)][_0x302251(0x236)][_0x302251(0x1b5)]();}async[_0x225ccf(0x217)](){const _0x4e7e4b=_0x225ccf;return this[_0x4e7e4b(0x201)][_0x4e7e4b(0x1bc)][_0x4e7e4b(0x226)](()=>{const _0x1b8085=_0x4e7e4b;this[_0x1b8085(0x1f3)]=!0x1,this[_0x1b8085(0x1e0)][_0x1b8085(0x236)][_0x1b8085(0x1b5)]();});}[_0x225ccf(0x1f0)](_0x407d1a,_0x517902){const _0x16c91d=_0x225ccf;this[_0x16c91d(0x1e0)][_0x16c91d(0x1ca)][_0x16c91d(0x1f0)](_0x407d1a,_0x517902);}[_0x225ccf(0x1f5)](_0x171c79){const _0xc56ba=_0x225ccf;this[_0xc56ba(0x1e0)][_0xc56ba(0x1ca)][_0xc56ba(0x1f5)](_0x171c79);}[_0x225ccf(0x191)](_0x53f495,_0x410451){const _0x27f0f5=_0x225ccf;this[_0x27f0f5(0x1e0)][_0x27f0f5(0x1ca)][_0x27f0f5(0x191)](_0x53f495,_0x410451);}[_0x225ccf(0x187)](_0x257539){const _0x2531e7=_0x225ccf;this[_0x2531e7(0x1e0)][_0x2531e7(0x1ca)][_0x2531e7(0x187)](_0x257539);}[_0x225ccf(0x202)](_0x21b7b9){const _0x343366=_0x225ccf;this[_0x343366(0x1e0)][_0x343366(0x1ca)][_0x343366(0x202)](_0x21b7b9);}[_0x225ccf(0x1c1)](){const _0xb639b=_0x225ccf;this[_0xb639b(0x1e0)][_0xb639b(0x1ca)][_0xb639b(0x1c1)]();}[_0x225ccf(0x223)](){const _0x29e3d4=_0x225ccf;this[_0x29e3d4(0x1e0)][_0x29e3d4(0x1ca)][_0x29e3d4(0x223)]();}[_0x225ccf(0x20a)](_0x36c3db,_0x3a09d1,_0x44bfb7){const _0x4fb713=_0x225ccf;this[_0x4fb713(0x1e0)][_0x4fb713(0x1ca)][_0x4fb713(0x20a)](_0x36c3db,_0x3a09d1,_0x44bfb7);}[_0x225ccf(0x224)](){const _0x3a120a=_0x225ccf;this[_0x3a120a(0x1e0)][_0x3a120a(0x1ca)][_0x3a120a(0x224)](),this[_0x3a120a(0x1e0)][_0x3a120a(0x1ca)][_0x3a120a(0x1b4)](this[_0x3a120a(0x1e2)]());}[_0x225ccf(0x1f1)](_0x1973b4){const _0x2d0579=_0x225ccf;this[_0x2d0579(0x1e0)][_0x2d0579(0x1ca)][_0x2d0579(0x1f1)](_0x1973b4);}[_0x225ccf(0x229)](_0x76b99e){const _0x20dcd5=_0x225ccf;this[_0x20dcd5(0x1e0)][_0x20dcd5(0x1ca)][_0x20dcd5(0x1c2)](_0x76b99e[_0x20dcd5(0x22c)]),this[_0x20dcd5(0x1e0)][_0x20dcd5(0x1ca)][_0x20dcd5(0x188)](_0x76b99e[_0x20dcd5(0x189)]),this[_0x20dcd5(0x1e0)][_0x20dcd5(0x1ca)][_0x20dcd5(0x1b4)](this[_0x20dcd5(0x1e2)](_0x76b99e));}[_0x225ccf(0x18d)](_0x38479a,_0x59d42e){const _0x30d690=_0x225ccf;this[_0x30d690(0x1e0)][_0x30d690(0x1ca)][_0x30d690(0x19e)](_0x38479a),_0x59d42e&&this[_0x30d690(0x1e0)][_0x30d690(0x1ca)][_0x30d690(0x1b2)](!0x1);}[_0x225ccf(0x1b1)](_0x1def26){const _0x4331b2=_0x225ccf;this[_0x4331b2(0x1d1)]=_0x1def26;}[_0x225ccf(0x1ff)](_0x478d8b){const _0x5dbf47=_0x225ccf;this[_0x5dbf47(0x1e0)][_0x5dbf47(0x236)][_0x5dbf47(0x1ff)](_0x478d8b);}[_0x225ccf(0x214)](){const _0x549e4c=_0x225ccf;this[_0x549e4c(0x207)](_0xc9fde0(this[_0x549e4c(0x192)][_0x549e4c(0x20d)],_0x549e4c(0x1dd)));}[_0x225ccf(0x207)](_0x11abd9,_0x7ed4a3=!0x1){const _0x2f0d8e=_0x225ccf;if(_0x7ed4a3&&!_0xa6660b()&&_0x11abd9[_0x2f0d8e(0x1a7)])return this[_0x2f0d8e(0x1e0)][_0x2f0d8e(0x18c)][_0x2f0d8e(0x227)]='',void this[_0x2f0d8e(0x18e)](_0x11abd9);this[_0x2f0d8e(0x1e0)][_0x2f0d8e(0x18c)][_0x2f0d8e(0x227)]=_0x11abd9;}[_0x225ccf(0x1d2)](_0x356ee3){const _0x3b61a6=_0x225ccf;this[_0x3b61a6(0x1e0)][_0x3b61a6(0x236)][_0x3b61a6(0x1d2)](_0x356ee3);}[_0x225ccf(0x22a)](){const _0x47b46c=_0x225ccf;this[_0x47b46c(0x1e0)][_0x47b46c(0x236)][_0x47b46c(0x1d2)]('');}[_0x225ccf(0x18e)](_0x48c602){const _0x50f3f1=_0x225ccf;let _0x551dc8=0x0;clearInterval(this[_0x50f3f1(0x1bd)]),this[_0x50f3f1(0x1bd)]=setInterval(()=>{const _0x43137d=_0x50f3f1;this[_0x43137d(0x1e0)][_0x43137d(0x18c)][_0x43137d(0x227)]=this[_0x43137d(0x1e0)][_0x43137d(0x18c)][_0x43137d(0x227)]+_0x48c602[_0x551dc8],_0x551dc8++,_0x551dc8===_0x48c602[_0x43137d(0x1a7)]&&clearInterval(this[_0x43137d(0x1bd)]);},0x1e);}[_0x225ccf(0x22e)](_0x2b6aa1){const _0x3a805b=_0x225ccf;this[_0x3a805b(0x1e0)][_0x3a805b(0x18c)][_0x3a805b(0x19d)]=_0x2b6aa1;}[_0x225ccf(0x20c)](_0x1a602c){const _0x30311b=_0x225ccf;return _0x1a602c[_0x30311b(0x22c)]&&_0x1a602c[_0x30311b(0x189)]?_0xc9fde0(this[_0x30311b(0x192)][_0x30311b(0x20d)],_0x30311b(0x21e)):_0x1a602c[_0x30311b(0x22c)]?_0xc9fde0(this[_0x30311b(0x192)][_0x30311b(0x20d)],_0x30311b(0x211)):_0x1a602c[_0x30311b(0x189)]?_0xc9fde0(this[_0x30311b(0x192)][_0x30311b(0x20d)],_0x30311b(0x1e8)):_0xc9fde0(this[_0x30311b(0x192)][_0x30311b(0x20d)],_0x30311b(0x1ae));}[_0x225ccf(0x1e2)](_0x88c338){const _0x9dff82=_0x225ccf;return _0x88c338?_0x88c338[_0x9dff82(0x22c)]&&_0x88c338[_0x9dff82(0x189)]?_0xc9fde0(this[_0x9dff82(0x192)][_0x9dff82(0x20d)],_0x9dff82(0x235)):_0x88c338[_0x9dff82(0x22c)]?_0xc9fde0(this[_0x9dff82(0x192)][_0x9dff82(0x20d)],_0x9dff82(0x20e)):_0x88c338[_0x9dff82(0x189)]?_0xc9fde0(this[_0x9dff82(0x192)][_0x9dff82(0x20d)],_0x9dff82(0x1be)):_0xc9fde0(this[_0x9dff82(0x192)][_0x9dff82(0x20d)],_0x9dff82(0x19b)):_0xc9fde0(this[_0x9dff82(0x192)][_0x9dff82(0x20d)],_0x9dff82(0x19b));}[_0x225ccf(0x198)](_0x52eb0d,_0x3929c6,_0x35b025,_0x11131f){const _0x512312=_0x225ccf;this[_0x512312(0x1e0)][_0x512312(0x198)](_0x52eb0d,_0x3929c6,_0x35b025,_0x11131f);}[_0x225ccf(0x237)](_0x7b4d0b){const _0xb735c6=_0x225ccf;this[_0xb735c6(0x1e0)][_0xb735c6(0x237)](_0x7b4d0b);}[_0x225ccf(0x1b3)](_0x2105d0){const _0x24378e=_0x225ccf;this[_0x24378e(0x1e0)][_0x24378e(0x1ca)][_0x24378e(0x1b3)](_0x2105d0);}[_0x225ccf(0x1a6)](_0x39b48e=!0x1){const _0x1e9762=_0x225ccf;this[_0x1e9762(0x1e0)][_0x1e9762(0x1ca)][_0x1e9762(0x1a6)](_0x39b48e);}[_0x225ccf(0x1c5)](_0x1268c3,_0x1b5478){const _0xcd5b17=_0x225ccf;this[_0xcd5b17(0x1e0)][_0xcd5b17(0x236)][_0xcd5b17(0x1f9)](_0x1268c3,_0x1b5478);}[_0x225ccf(0x228)](){const _0x560244=_0x225ccf;this[_0x560244(0x1e0)][_0x560244(0x236)][_0x560244(0x228)]();}[_0x225ccf(0x20f)](){const _0x35daeb=_0x225ccf;this[_0x35daeb(0x1e0)][_0x35daeb(0x1ca)][_0x35daeb(0x210)]=!0x0;}[_0x225ccf(0x22f)](){const _0x1aef81=_0x225ccf;this[_0x1aef81(0x1e0)][_0x1aef81(0x1ca)][_0x1aef81(0x210)]=!0x1;}}
23
+ const _0x2a0ffa=_0x28db;(function(_0x128897,_0x6af7d8){const _0x2caa68=_0x28db,_0x151681=_0x128897();while(!![]){try{const _0x2620b7=parseInt(_0x2caa68(0x24a))/0x1+parseInt(_0x2caa68(0x1fd))/0x2*(-parseInt(_0x2caa68(0x24c))/0x3)+-parseInt(_0x2caa68(0x278))/0x4*(parseInt(_0x2caa68(0x1e4))/0x5)+-parseInt(_0x2caa68(0x1e3))/0x6*(-parseInt(_0x2caa68(0x231))/0x7)+-parseInt(_0x2caa68(0x1da))/0x8+-parseInt(_0x2caa68(0x20b))/0x9*(parseInt(_0x2caa68(0x25f))/0xa)+parseInt(_0x2caa68(0x269))/0xb;if(_0x2620b7===_0x6af7d8)break;else _0x151681['push'](_0x151681['shift']());}catch(_0xba2268){_0x151681['push'](_0x151681['shift']());}}}(_0xe7ea,0x1c2c2));import{ContextPlugin as _0x4f2910}from'ckeditor5/src/core.js';import{_isMotionReduced as _0x36b33c}from'ckeditor5/src/utils.js';import{AIChatView as _0x5a7760}from'./ui/aichatview.js';import{AITabs as _0x2c7996}from'../aitabs/aitabs.js';import{getTranslation as _0x5ea92d}from'../aicore/utils/common-translations.js';import{IconAIChat as _0x3a8131}from'ckeditor5/src/icons.js';import{AIChatFeedInteractionHeaderView as _0x2a3413}from'./ui/feed/aichatfeedinteractionheaderview.js';import{PromiseQueue as _0x3c63f6}from'./utils/promisequeue.js';import{AI_CHAT_UI_EVENT_NAMES as _0x59a95e}from'./utils/eventnames.js';import'../../theme/aichat/aichat.css';function _0x28db(_0x4d5f3c,_0x18bbfc){const _0xe7eada=_0xe7ea();return _0x28db=function(_0x28db79,_0x206209){_0x28db79=_0x28db79-0x1ca;let _0x21f91d=_0xe7eada[_0x28db79];return _0x21f91d;},_0x28db(_0x4d5f3c,_0x18bbfc);}import{getEditorFromContext as _0x7083ab}from'../aicore/utils/geteditorfromcontext.js';import{AI_REPLY_ACTIONS as _0x505374}from'./ui/feed/aichatfeedsuggestionitemactionsview.js';export class AIChatUI extends _0x4f2910{static get[_0x2a0ffa(0x1d7)](){return[_0x2c7996];}[_0x2a0ffa(0x26e)];static get[_0x2a0ffa(0x23e)](){const _0x6d6165=_0x2a0ffa;return _0x6d6165(0x279);}static get[_0x2a0ffa(0x24d)](){return!0x0;}static get[_0x2a0ffa(0x218)](){return!0x0;}[_0x2a0ffa(0x1df)]=_0x2a0ffa(0x271);[_0x2a0ffa(0x242)]=!0x0;[_0x2a0ffa(0x275)];[_0x2a0ffa(0x214)];[_0x2a0ffa(0x211)]=void 0x0;[_0x2a0ffa(0x230)]=!0x1;constructor(_0x356d7e){const _0x4e593f=_0x2a0ffa;super(_0x356d7e);const _0x1d917a=this[_0x4e593f(0x1f9)][_0x4e593f(0x216)][_0x4e593f(0x1dc)](_0x4e593f(0x1e7));this[_0x4e593f(0x222)](_0x4e593f(0x1fc),!0x1),this[_0x4e593f(0x275)]=new _0x3c63f6(),this[_0x4e593f(0x26e)]=new _0x5a7760(this[_0x4e593f(0x1f9)][_0x4e593f(0x1dd)],{'showResizeButton':_0x1d917a[_0x4e593f(0x20e)],'contextResourcesSearchInputVisibleFrom':this[_0x4e593f(0x1f9)][_0x4e593f(0x207)][_0x4e593f(0x1dc)](_0x4e593f(0x266))}),this[_0x4e593f(0x26e)][_0x4e593f(0x27d)](..._0x59a95e)['to'](this),this[_0x4e593f(0x26e)]['on'](_0x4e593f(0x272),(_0x546b50,{showDiff:_0x263085})=>{const _0x276789=_0x4e593f;this[_0x276789(0x242)]=_0x263085;}),_0x1d917a[_0x4e593f(0x25e)][_0x4e593f(0x22f)]({'id':_0x4e593f(0x243),'buttonLabel':_0x5ea92d(this[_0x4e593f(0x1f9)][_0x4e593f(0x1dd)],_0x4e593f(0x1d5)),'buttonIcon':_0x3a8131,'order':0x0,'content':this[_0x4e593f(0x26e)]}),this[_0x4e593f(0x26e)][_0x4e593f(0x209)][_0x4e593f(0x25a)](_0x4e593f(0x22a))['to'](this,_0x4e593f(0x1fc),_0x4e19a9=>_0x4e19a9),this[_0x4e593f(0x26e)][_0x4e593f(0x265)][_0x4e593f(0x25a)](_0x4e593f(0x1e9))['to'](this,_0x4e593f(0x1fc),_0xa2c83b=>_0xa2c83b),this[_0x4e593f(0x26e)][_0x4e593f(0x209)][_0x4e593f(0x26a)](this[_0x4e593f(0x233)]()),this[_0x4e593f(0x25a)](_0x4e593f(0x1cd))['to'](this[_0x4e593f(0x26e)][_0x4e593f(0x209)],_0x4e593f(0x1cd));}[_0x2a0ffa(0x25d)](){const _0x30f88d=_0x2a0ffa;super[_0x30f88d(0x25d)](),this[_0x30f88d(0x211)]&&clearInterval(this[_0x30f88d(0x211)]);}[_0x2a0ffa(0x1f0)](_0x14bb64){const _0x21b3a6=_0x2a0ffa,_0x30e35e=this[_0x21b3a6(0x1f9)][_0x21b3a6(0x207)][_0x21b3a6(0x1dc)](_0x21b3a6(0x1e5))??_0x5ea92d(this[_0x21b3a6(0x1f9)][_0x21b3a6(0x1dd)],_0x21b3a6(0x229));this[_0x21b3a6(0x26e)][_0x21b3a6(0x265)][_0x21b3a6(0x256)](),this[_0x21b3a6(0x26e)][_0x21b3a6(0x209)][_0x21b3a6(0x27a)](),this[_0x21b3a6(0x26e)][_0x21b3a6(0x209)][_0x21b3a6(0x1de)](_0x14bb64[_0x21b3a6(0x217)],!this[_0x21b3a6(0x1f9)][_0x21b3a6(0x207)][_0x21b3a6(0x1dc)](_0x21b3a6(0x1d4))),this[_0x21b3a6(0x234)]({'id':_0x21b3a6(0x22c),'staticMessage':_0x30e35e}),this[_0x21b3a6(0x220)](_0x21b3a6(0x1ea));}[_0x2a0ffa(0x234)]({id:_0x42e96d,staticMessage:_0x2b83e4}){const _0x24cab0=_0x2a0ffa;this[_0x24cab0(0x26e)][_0x24cab0(0x265)][_0x24cab0(0x276)](_0x24cab0(0x215),{'id':_0x42e96d,'initialContent':_0x24cab0(0x232)+_0x2b83e4+_0x24cab0(0x260)});}[_0x2a0ffa(0x1fe)](_0xefb567){const _0x2184c4=_0x2a0ffa,_0x203ba4=_0xefb567[_0x2184c4(0x20f)]?.[_0x2184c4(0x1f1)]||_0xefb567[_0x2184c4(0x21c)];this[_0x2184c4(0x26e)][_0x2184c4(0x265)][_0x2184c4(0x276)](_0x2184c4(0x1f4),{'contextItems':Array[_0x2184c4(0x258)](_0xefb567[_0x2184c4(0x25c)][_0x2184c4(0x246)]()),'initialContent':_0x2184c4(0x232)+_0x203ba4+_0x2184c4(0x260),'id':_0xefb567['id']});}[_0x2a0ffa(0x206)]({errorMessage:_0x4da9c5,id:_0x1a878b}){const _0xeca186=_0x2a0ffa;this[_0xeca186(0x26e)][_0xeca186(0x265)][_0xeca186(0x276)](_0xeca186(0x235),{'initialContent':_0xeca186(0x232)+_0x4da9c5+_0xeca186(0x260),'id':_0x1a878b});}[_0x2a0ffa(0x21b)](_0x2767e5){const _0x44817f=_0x2a0ffa;return this[_0x44817f(0x275)][_0x44817f(0x237)](async()=>{const _0xe2eb75=_0x44817f;this[_0xe2eb75(0x26e)][_0xe2eb75(0x265)][_0xe2eb75(0x276)](_0xe2eb75(0x215),{'id':_0x2767e5[_0xe2eb75(0x1fb)]+':'+_0x2767e5['id']}),this[_0xe2eb75(0x245)]();});}async[_0x2a0ffa(0x1d8)](_0x5d9bc0){const _0x959fdd=_0x2a0ffa,_0x3fea96=_0x7083ab(this[_0x959fdd(0x1f9)]);let _0x41d0b4=_0x3fea96[_0x959fdd(0x207)][_0x959fdd(0x1dc)](_0x959fdd(0x262))||[..._0x505374];if(_0x3fea96[_0x959fdd(0x216)][_0x959fdd(0x203)](_0x959fdd(0x22d))){if(!this[_0x959fdd(0x230)]){this[_0x959fdd(0x230)]=!0x0;const _0x376458=_0x3fea96[_0x959fdd(0x255)][_0x959fdd(0x1dc)](_0x959fdd(0x1cf));this[_0x959fdd(0x26e)][_0x959fdd(0x265)][_0x959fdd(0x25a)](_0x959fdd(0x267))['to'](_0x376458,_0x959fdd(0x1f8));}}else _0x41d0b4=_0x41d0b4[_0x959fdd(0x273)](_0x29aa6a=>_0x959fdd(0x24f)!=_0x29aa6a);return this[_0x959fdd(0x275)][_0x959fdd(0x237)](async()=>{const _0x4f4e41=_0x959fdd;this[_0x4f4e41(0x26e)][_0x4f4e41(0x265)][_0x4f4e41(0x276)](_0x4f4e41(0x23c),{'id':_0x5d9bc0[_0x4f4e41(0x1fb)]+':'+_0x5d9bc0['id'],'areActionsDisabled':_0x5d9bc0[_0x4f4e41(0x213)],'showDiff':this[_0x4f4e41(0x242)],'availableActions':_0x41d0b4}),this[_0x4f4e41(0x245)]();});}[_0x2a0ffa(0x210)](_0x3b2961,_0x5057e6){const _0xe34e71=_0x2a0ffa,_0x7cb3fd=this[_0xe34e71(0x26e)][_0xe34e71(0x265)][_0xe34e71(0x1f2)][_0xe34e71(0x21f)];if(_0x7cb3fd instanceof _0x2a3413)return this[_0xe34e71(0x26e)][_0xe34e71(0x265)][_0xe34e71(0x1f2)][_0xe34e71(0x1d9)](_0x7cb3fd),void this[_0xe34e71(0x26e)][_0xe34e71(0x265)][_0xe34e71(0x276)](_0xe34e71(0x240),{'id':_0x3b2961['id'],'capabilities':{'isWebSearchEnabled':_0x7cb3fd[_0xe34e71(0x239)][_0xe34e71(0x1ce)]||_0x5057e6[_0xe34e71(0x1ce)],'isReasoningEnabled':_0x7cb3fd[_0xe34e71(0x239)][_0xe34e71(0x223)]||_0x5057e6[_0xe34e71(0x223)]}});this[_0xe34e71(0x26e)][_0xe34e71(0x265)][_0xe34e71(0x276)](_0xe34e71(0x240),{'id':_0x3b2961['id'],'capabilities':_0x5057e6});}async[_0x2a0ffa(0x23b)](_0x41bea7,_0xdf571d){const _0x10baba=_0x2a0ffa;let _0x32ed62;return await this[_0x10baba(0x275)][_0x10baba(0x237)](async()=>{const _0x370822=_0x10baba;_0x32ed62=this[_0x370822(0x26e)][_0x370822(0x265)][_0x370822(0x276)](_0x370822(0x221),{'content':_0x41bea7,'id':_0xdf571d});}),_0x32ed62;}[_0x2a0ffa(0x224)](_0x43325e){const _0xa74f16=_0x2a0ffa;this[_0xa74f16(0x26e)][_0xa74f16(0x265)][_0xa74f16(0x263)](_0x43325e);}[_0x2a0ffa(0x21e)](_0x3c9dce){const _0x22e561=_0x2a0ffa;return this[_0x22e561(0x26e)][_0x22e561(0x265)][_0x22e561(0x1fa)](_0x3c9dce);}[_0x2a0ffa(0x1f5)](_0x3eaf41){const _0x53b9ec=_0x2a0ffa,_0x1b48f2=this[_0x53b9ec(0x26e)][_0x53b9ec(0x265)][_0x53b9ec(0x1f2)][_0x53b9ec(0x1e0)](_0x4ec0ae=>_0x4ec0ae[_0x53b9ec(0x219)]['id']==_0x3eaf41['id']&&_0x4ec0ae instanceof _0x2a3413);_0x1b48f2&&_0x1b48f2[_0x53b9ec(0x222)](_0x53b9ec(0x241),_0x3eaf41[_0x53b9ec(0x241)]);}async[_0x2a0ffa(0x264)](_0x5f4c60){const _0x53cc6e=_0x2a0ffa,_0x3559e2=_0x5f4c60[_0x53cc6e(0x1ec)]||this[_0x53cc6e(0x1df)];return this[_0x53cc6e(0x275)][_0x53cc6e(0x237)](async _0x39b7db=>{const _0x288fdb=_0x53cc6e;await this[_0x288fdb(0x26e)][_0x288fdb(0x265)][_0x288fdb(0x227)]({..._0x5f4c60,'abortSignal':_0x39b7db,'renderingStrategy':_0x3559e2}),_0x5f4c60[_0x288fdb(0x201)]&&this[_0x288fdb(0x22e)](_0x5f4c60['id']);});}[_0x2a0ffa(0x208)](_0x361abe,_0x1902b7){const _0x427518=_0x2a0ffa;this[_0x427518(0x26e)][_0x427518(0x265)][_0x427518(0x257)](_0x361abe,_0x1902b7);}async[_0x2a0ffa(0x1d0)](_0x1e285c){const _0x5b7970=_0x2a0ffa,_0xd91e5e=_0x1e285c[_0x5b7970(0x1ec)]||this[_0x5b7970(0x1df)];return this[_0x5b7970(0x275)][_0x5b7970(0x237)](async _0x308528=>{const _0x1567ec=_0x5b7970;await this[_0x1567ec(0x26e)][_0x1567ec(0x265)][_0x1567ec(0x21d)]({..._0x1e285c,'abortSignal':_0x308528,'renderingStrategy':_0xd91e5e}),_0x1e285c[_0x1567ec(0x201)]&&this[_0x1567ec(0x22e)](_0x1e285c['id']);});}[_0x2a0ffa(0x1d1)](_0x3ea17b){const _0x544720=_0x2a0ffa;this[_0x544720(0x26e)][_0x544720(0x265)][_0x544720(0x27c)](_0x3ea17b);}[_0x2a0ffa(0x226)](_0xefa298){const _0x118067=_0x2a0ffa;this[_0x118067(0x26e)][_0x118067(0x265)][_0x118067(0x1d6)](_0xefa298);}[_0x2a0ffa(0x22e)](_0x475a48){const _0x206b52=_0x2a0ffa;this[_0x206b52(0x26e)][_0x206b52(0x265)][_0x206b52(0x24b)](_0x475a48);}[_0x2a0ffa(0x238)](_0x2bfa87){const _0x5e7ff2=_0x2a0ffa;this[_0x5e7ff2(0x26e)][_0x5e7ff2(0x265)][_0x5e7ff2(0x277)]()[_0x5e7ff2(0x273)](_0x53c054=>_0x53c054[_0x5e7ff2(0x23f)](_0x2bfa87))[_0x5e7ff2(0x248)](_0x3a4cf7=>this[_0x5e7ff2(0x26e)][_0x5e7ff2(0x265)][_0x5e7ff2(0x263)](_0x3a4cf7));}[_0x2a0ffa(0x270)](){const _0x315778=_0x2a0ffa,_0x3dfe7a=this[_0x315778(0x1e2)]({'isWebSearchEnabled':!0x1,'isReasoningEnabled':!0x1});this[_0x315778(0x1cc)](_0x3dfe7a),this[_0x315778(0x26e)][_0x315778(0x209)][_0x315778(0x202)](!this[_0x315778(0x1f9)][_0x315778(0x207)][_0x315778(0x1dc)](_0x315778(0x1d4))),this[_0x315778(0x1fc)]=!0x0,this[_0x315778(0x26e)][_0x315778(0x265)][_0x315778(0x200)]();}[_0x2a0ffa(0x228)](_0x1331aa){const _0x3c1b0b=_0x2a0ffa;this[_0x3c1b0b(0x275)][_0x3c1b0b(0x254)](),this[_0x3c1b0b(0x26e)][_0x3c1b0b(0x265)][_0x3c1b0b(0x277)]()[_0x3c1b0b(0x273)](_0x1c05bd=>_0x1c05bd[_0x3c1b0b(0x23f)](_0x1331aa['id']))[_0x3c1b0b(0x248)](_0x3e56d9=>this[_0x3c1b0b(0x22e)](_0x3e56d9)),this[_0x3c1b0b(0x1fc)]=!0x1,this[_0x3c1b0b(0x26e)][_0x3c1b0b(0x265)][_0x3c1b0b(0x20a)]();}async[_0x2a0ffa(0x253)](){const _0x555ba6=_0x2a0ffa;return this[_0x555ba6(0x275)][_0x555ba6(0x1e8)][_0x555ba6(0x1f7)](()=>{const _0x5a1218=_0x555ba6;this[_0x5a1218(0x1fc)]=!0x1,this[_0x5a1218(0x26e)][_0x5a1218(0x265)][_0x5a1218(0x20a)]();});}[_0x2a0ffa(0x1ee)](_0xcb5ee1,_0x4dd5f6){const _0x1937b7=_0x2a0ffa;this[_0x1937b7(0x26e)][_0x1937b7(0x209)][_0x1937b7(0x1ee)](_0xcb5ee1,_0x4dd5f6);}[_0x2a0ffa(0x212)](_0x124caf){const _0x4f372f=_0x2a0ffa;this[_0x4f372f(0x26e)][_0x4f372f(0x209)][_0x4f372f(0x212)](_0x124caf);}[_0x2a0ffa(0x1ed)](_0x148b5f,_0xc70085){const _0x5d3819=_0x2a0ffa;this[_0x5d3819(0x26e)][_0x5d3819(0x209)][_0x5d3819(0x1ed)](_0x148b5f,_0xc70085);}[_0x2a0ffa(0x22b)](_0x430b45){const _0x1d8954=_0x2a0ffa;this[_0x1d8954(0x26e)][_0x1d8954(0x209)][_0x1d8954(0x22b)](_0x430b45);}[_0x2a0ffa(0x20d)](_0x33121c){const _0x3d3f4d=_0x2a0ffa;this[_0x3d3f4d(0x26e)][_0x3d3f4d(0x209)][_0x3d3f4d(0x20d)](_0x33121c);}[_0x2a0ffa(0x251)](){const _0x55ae5d=_0x2a0ffa;this[_0x55ae5d(0x26e)][_0x55ae5d(0x209)][_0x55ae5d(0x251)]();}[_0x2a0ffa(0x26f)](){const _0x840909=_0x2a0ffa;this[_0x840909(0x26e)][_0x840909(0x209)][_0x840909(0x26f)]();}[_0x2a0ffa(0x1db)](_0x466de2,_0x5a33cb,_0x3ec379){const _0x310f9b=_0x2a0ffa;this[_0x310f9b(0x26e)][_0x310f9b(0x209)][_0x310f9b(0x1db)](_0x466de2,_0x5a33cb,_0x3ec379);}[_0x2a0ffa(0x1ff)](){const _0x481de3=_0x2a0ffa;this[_0x481de3(0x26e)][_0x481de3(0x209)][_0x481de3(0x1ff)](),this[_0x481de3(0x26e)][_0x481de3(0x209)][_0x481de3(0x26a)](this[_0x481de3(0x233)]());}[_0x2a0ffa(0x261)](_0x114e29){const _0x5afda9=_0x2a0ffa;this[_0x5afda9(0x26e)][_0x5afda9(0x209)][_0x5afda9(0x261)](_0x114e29);}[_0x2a0ffa(0x26b)](_0x2e5144){const _0x485de=_0x2a0ffa;this[_0x485de(0x26e)][_0x485de(0x209)][_0x485de(0x21a)](_0x2e5144[_0x485de(0x1ce)]),this[_0x485de(0x26e)][_0x485de(0x209)][_0x485de(0x252)](_0x2e5144[_0x485de(0x223)]),this[_0x485de(0x26e)][_0x485de(0x209)][_0x485de(0x26a)](this[_0x485de(0x233)](_0x2e5144));}[_0x2a0ffa(0x23d)](_0xb46e2f,_0x60e86e){const _0x843d44=_0x2a0ffa;this[_0x843d44(0x26e)][_0x843d44(0x209)][_0x843d44(0x20c)](_0xb46e2f),_0x60e86e&&this[_0x843d44(0x26e)][_0x843d44(0x209)][_0x843d44(0x202)](!0x1);}[_0x2a0ffa(0x1e1)](_0x396cd0){const _0x3d1229=_0x2a0ffa;this[_0x3d1229(0x1df)]=_0x396cd0;}[_0x2a0ffa(0x259)](_0x3fb747){const _0x4297f2=_0x2a0ffa;this[_0x4297f2(0x26e)][_0x4297f2(0x265)][_0x4297f2(0x259)](_0x3fb747);}[_0x2a0ffa(0x1d2)](){const _0x43960b=_0x2a0ffa;this[_0x43960b(0x205)](_0x5ea92d(this[_0x43960b(0x1f9)][_0x43960b(0x1dd)],_0x43960b(0x1d5)));}[_0x2a0ffa(0x205)](_0x1c5cc9,_0x17bd89=!0x1){const _0x493d0f=_0x2a0ffa;if(_0x17bd89&&!_0x36b33c()&&_0x1c5cc9[_0x493d0f(0x225)])return this[_0x493d0f(0x26e)][_0x493d0f(0x25b)][_0x493d0f(0x236)]='',void this[_0x493d0f(0x1eb)](_0x1c5cc9);this[_0x493d0f(0x26e)][_0x493d0f(0x25b)][_0x493d0f(0x236)]=_0x1c5cc9;}[_0x2a0ffa(0x1cc)](_0x6ee84b){const _0x451f79=_0x2a0ffa;this[_0x451f79(0x26e)][_0x451f79(0x265)][_0x451f79(0x1cc)](_0x6ee84b);}[_0x2a0ffa(0x245)](){const _0x3ae2e4=_0x2a0ffa;this[_0x3ae2e4(0x26e)][_0x3ae2e4(0x265)][_0x3ae2e4(0x1cc)]('');}[_0x2a0ffa(0x1eb)](_0x550218){const _0x3fa02b=_0x2a0ffa;let _0x325dba=0x0;clearInterval(this[_0x3fa02b(0x211)]),this[_0x3fa02b(0x211)]=setInterval(()=>{const _0xcd1501=_0x3fa02b;this[_0xcd1501(0x26e)][_0xcd1501(0x25b)][_0xcd1501(0x236)]=this[_0xcd1501(0x26e)][_0xcd1501(0x25b)][_0xcd1501(0x236)]+_0x550218[_0x325dba],_0x325dba++,_0x325dba===_0x550218[_0xcd1501(0x225)]&&clearInterval(this[_0xcd1501(0x211)]);},0x1e);}[_0x2a0ffa(0x1f3)](_0x9923f6){const _0x2ae4bd=_0x2a0ffa;this[_0x2ae4bd(0x26e)][_0x2ae4bd(0x25b)][_0x2ae4bd(0x1cb)]=_0x9923f6;}[_0x2a0ffa(0x1e2)](_0x32e1c9){const _0x31d36d=_0x2a0ffa;return _0x32e1c9[_0x31d36d(0x1ce)]&&_0x32e1c9[_0x31d36d(0x223)]?_0x5ea92d(this[_0x31d36d(0x1f9)][_0x31d36d(0x1dd)],_0x31d36d(0x26c)):_0x32e1c9[_0x31d36d(0x1ce)]?_0x5ea92d(this[_0x31d36d(0x1f9)][_0x31d36d(0x1dd)],_0x31d36d(0x268)):_0x32e1c9[_0x31d36d(0x223)]?_0x5ea92d(this[_0x31d36d(0x1f9)][_0x31d36d(0x1dd)],_0x31d36d(0x1e6)):_0x5ea92d(this[_0x31d36d(0x1f9)][_0x31d36d(0x1dd)],_0x31d36d(0x1f6));}[_0x2a0ffa(0x233)](_0x3ec333){const _0x44e892=_0x2a0ffa;return _0x3ec333?_0x3ec333[_0x44e892(0x1ce)]&&_0x3ec333[_0x44e892(0x223)]?_0x5ea92d(this[_0x44e892(0x1f9)][_0x44e892(0x1dd)],_0x44e892(0x249)):_0x3ec333[_0x44e892(0x1ce)]?_0x5ea92d(this[_0x44e892(0x1f9)][_0x44e892(0x1dd)],_0x44e892(0x27b)):_0x3ec333[_0x44e892(0x223)]?_0x5ea92d(this[_0x44e892(0x1f9)][_0x44e892(0x1dd)],_0x44e892(0x204)):_0x5ea92d(this[_0x44e892(0x1f9)][_0x44e892(0x1dd)],_0x44e892(0x1ca)):_0x5ea92d(this[_0x44e892(0x1f9)][_0x44e892(0x1dd)],_0x44e892(0x1ca));}[_0x2a0ffa(0x26d)](_0x253c6b,_0x2dd29c,_0x356b30,_0x1b32ca){const _0x300b67=_0x2a0ffa;this[_0x300b67(0x26e)][_0x300b67(0x26d)](_0x253c6b,_0x2dd29c,_0x356b30,_0x1b32ca);}[_0x2a0ffa(0x23a)](_0x24db8b){const _0x4f85ec=_0x2a0ffa;this[_0x4f85ec(0x26e)][_0x4f85ec(0x23a)](_0x24db8b);}[_0x2a0ffa(0x247)](_0x5a0d99){const _0xa732=_0x2a0ffa;this[_0xa732(0x26e)][_0xa732(0x209)][_0xa732(0x247)](_0x5a0d99);}[_0x2a0ffa(0x274)](_0xdb3dae=!0x1){const _0x33f8d3=_0x2a0ffa;this[_0x33f8d3(0x26e)][_0x33f8d3(0x209)][_0x33f8d3(0x274)](_0xdb3dae);}[_0x2a0ffa(0x1ef)](_0x1606c9,_0x178f9a){const _0x446afc=_0x2a0ffa;this[_0x446afc(0x26e)][_0x446afc(0x265)][_0x446afc(0x250)](_0x1606c9,_0x178f9a);}[_0x2a0ffa(0x200)](){const _0x21964e=_0x2a0ffa;this[_0x21964e(0x26e)][_0x21964e(0x265)][_0x21964e(0x200)]();}[_0x2a0ffa(0x244)](){const _0x1eff6e=_0x2a0ffa;this[_0x1eff6e(0x26e)][_0x1eff6e(0x209)][_0x1eff6e(0x24e)]=!0x0;}[_0x2a0ffa(0x1d3)](){const _0x30aa4f=_0x2a0ffa;this[_0x30aa4f(0x26e)][_0x30aa4f(0x209)][_0x30aa4f(0x24e)]=!0x1;}}function _0xe7ea(){const _0x5e707f=['children','setIsMaximized','user-message','updateFeedInteractionHeader','AI_CHAT_FEED_LOADING_MESSAGE_REGULAR','then','value','context','hasItem','interactionId','isBusy','22alnarw','addFeedItemUserMessage','resetMessageInput','startAutoScroll','isDone','disableModelSelector','has','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REASONING','setConversationTitle','addFeedItemError','config','updateFeedItemAIReplySources','chatControls','stopAutoScroll','667593zrFnbB','setModel','setConversationContext','showResizeButton','attributes','addFeedInteractionHeader','_titleAnimationInterval','removeContextItem','areActionsDisabled','_interactionPromiseResolver','ai-reply','plugins','availableModels','isPremiumPlugin','options','setWebSearch','addFeedItemAIReply','userMessage','updateSuggestionItem','hasFeedItem','last','fire','custom-element','set','isReasoningEnabled','removeFeedItem','length','setFeedItemAIReplySuggestionPartActive','updateReplyItem','stopInteraction','AI_CHAT_WELCOME_MESSAGE','isLoading','setIsUploadInProgress','conversation-start','TrackChanges','markFeedItemAsDone','addTab','_isTrackChangesCommandValueBound','7AzFOdl','<p>','_getInputPlaceholder','addFeedItemStaticMessage','error-message','label','enqueue','removeFeedInteraction','capabilities','closeSourceResourceBalloon','addFeedItemCustomElement','ai-suggestion-reply','setSelectedModel','pluginName','startsWith','interaction-header','isVisible','showDiff','chat','disableControls','clearLoadingMessage','values','setPromptInputValue','forEach','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH_REASONING','178389QLgDTX','markItemAsDone','42243Dceujd','isOfficialPlugin','isDisabled','insertSuggestion','scrollToSuggestion','clearPendingContextUI','setReasoning','finishInteraction','abort','commands','clear','updateWebSources','from','toggleLoadingSkeleton','bind','chatHeader','contextItems','destroy','view','30EpReBe','</p>','setAddContextOptions','ai.availableReplyActions','removeItem','updateFeedItemAIReplyContent','chatFeed','ai.chat.context.searchInputVisibleFrom','isTrackChangesOn','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH','6349486wmAPDO','setInputPlaceholder','updateCapabilities','AI_CHAT_FEED_LOADING_MESSAGE_WEBSEARCH_REASONING','populateSourceResourceBalloon','_view','clearConversationContextUI','startInteraction','streaming','toggleSuggestionDisplayMode','filter','focusPromptInput','_promiseQueue','addItem','getItemIds','4cZUZbn','AIChatUI','enableModelSelector','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_WEBSEARCH','updateSuggestionPartState','delegate','AI_CHAT_PROMPT_INPUT_PLACEHOLDER_REGULAR','isMaximized','setLoadingMessage','isModelAvailable','isWebSearchEnabled','trackChanges','updateFeedItemAIReplySuggestionContent','updateFeedItemAIReplySuggestionPartState','resetConversationTitle','enableControls','ai.models.showModelSelector','AI_CHAT_HEADING','setSuggestionPartActive','requires','addFeedItemAISuggestion','remove','1305376EcTOeN','updateResourceState','get','locale','setModelList','feedItemRenderingStrategy','find','setFeedItemRenderingStrategy','prepareLoadingMessage','704502ivfAkL','1085220NDAqRY','ai.chat.welcomeMessage','AI_CHAT_FEED_LOADING_MESSAGE_REASONING','AITabs','queueEmptyPromise','isPending','conversationCreated','_animateConversationTitle','renderingStrategy','setContextItemLoading','addContextItem','scrollFeedToSuggestion','createConversation','displayedPrompt'];_0xe7ea=function(){return _0x5e707f;};return _0xe7ea();}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- function _0x1b34(_0x4cf6f2,_0x1b735d){const _0x18337a=_0x1833();return _0x1b34=function(_0x1b348d,_0x2556a8){_0x1b348d=_0x1b348d-0xe3;let _0x314fa7=_0x18337a[_0x1b348d];return _0x314fa7;},_0x1b34(_0x4cf6f2,_0x1b735d);}const _0x255bd5=_0x1b34;(function(_0x2b7558,_0x219c7e){const _0x4c7633=_0x1b34,_0x902864=_0x2b7558();while(!![]){try{const _0x387e87=-parseInt(_0x4c7633(0x153))/0x1*(parseInt(_0x4c7633(0x102))/0x2)+-parseInt(_0x4c7633(0x12b))/0x3*(-parseInt(_0x4c7633(0x106))/0x4)+parseInt(_0x4c7633(0x101))/0x5*(parseInt(_0x4c7633(0x16f))/0x6)+parseInt(_0x4c7633(0x114))/0x7*(parseInt(_0x4c7633(0x10b))/0x8)+parseInt(_0x4c7633(0xe8))/0x9+-parseInt(_0x4c7633(0x10a))/0xa*(parseInt(_0x4c7633(0x120))/0xb)+parseInt(_0x4c7633(0x10e))/0xc*(parseInt(_0x4c7633(0x135))/0xd);if(_0x387e87===_0x219c7e)break;else _0x902864['push'](_0x902864['shift']());}catch(_0x1cb89c){_0x902864['push'](_0x902864['shift']());}}}(_0x1833,0xcd78e));import{CKEditorError as _0x345b32,ObservableMixin as _0x169320,uid as _0x1f2165}from'ckeditor5/src/utils.js';import{AIContextItemType as _0x3894c2,AIContextTextResourceType as _0x462fc1}from'../../aicore/model/aicontext.js';import{escape as _0x489c5}from'es-toolkit/compat';function _0x1833(){const _0x44eae6=['name','hidden','ai-chat-url-upload-failed','files-','abortController','object','uploadFile','document','getData','_finishContextItemLoading','ai-request-aborted','contextItemAdded','MARKDOWN','615585ZKGoAX','5752fxyMPz','attributes','ai-chat-resource-load-failed','DOCUMENT','4mqGzNL','ai-chat-document-upload-failed','fetchDocument','loadSourceResources','12568370xKVYKJ','212888KpkPfe','contextItemRemoved','size','4260Lwukgg','isCurrentDocumentInContext','HTML','mcpServerName','error','_addContextOptionsState','49EhyXVB','delete','values','_toggleAddCurrentDocumentOptionVisibility','getDocument','url-','SELECTION','ai-chat-file-upload-failed','_finishUploadOperation','customItems','content','removeSelectionFromContext','11lKcAfJ','_getCustomSourcesInitialState','_convertTextResourceToFile','abort','_isResourceInContext','enabled','_ongoingUploadOperations','_removeContextItem','toolName','selection','filter','3063270MFWXOE','ai-chat-context-invalid-data','substring','_startUploadOperation','uiId','url','map','URL','_ownerId','addContextOptionsChanged','364okWaMa','_updateResourceInContextState','File','_findSourceIdsByResourceId','FILE','set','getSentContextItems','ai-chat-context-unsupported-type','getResources','sessionId','from','message','type','start','isHidden','resourceStateChanged','code','getPendingContextItems','addUrlToContext','_connector','uploadDocument','clearPendingContextItems','addCurrentDocumentToContext','TEXT','addFilesToContext','version','ai-chat-source-resources-load-failed','contextSent','resources','populateFromMessage','446pQlLCO','getId','contextItemLoadingEnded','files','text/plain','current-document','forEach','_addContextItem','uploadUrl','_pendingContextItems','_mapContextItemToRequestData','isSelectionInContext','ai-chat-resource-no-data','uploadProgressChanged','sourceResourcesLoaded','length','object\x20with\x20content\x20and\x20type\x20properties','sources','_config','TOOL','stack','find','data','text/markdown','push','string','_conversationContextItems','isInContext','66DOaVvN','resourceId','get','ai-chat-source-not-found','_createContextItemFromContent','mapContextItemsToRequestData','_addToConversationContextItem','urls','Current\x20document','removeFromContext','end','_ongoingUploads','addToConversationContext','isCurrentDocumentInConversation','startsWith','fire','addSelectionToContext','7285977sxBwnY','file-','isReadOnly','has','all','updateCurrentDocument','label','text/html','_setAddContextOptionsDefaultState','addToolItemToContext','init','addResourceToContext'];_0x1833=function(){return _0x44eae6;};return _0x1833();}import{errorsMap as _0x1d81cc}from'../../errorsmap.js';export const AI_CONTEXT_MODEL_EVENT_NAMES=[_0x255bd5(0xff),_0x255bd5(0x10c),_0x255bd5(0x155),_0x255bd5(0x150),_0x255bd5(0x112),_0x255bd5(0x134),_0x255bd5(0x161),_0x255bd5(0x144),_0x255bd5(0x160)];export class AIChatContext extends _0x169320(){[_0x255bd5(0x148)];[_0x255bd5(0x165)];[_0x255bd5(0x133)];constructor({connector:_0x2b136a,config:_0x40d777,ownerId:_0x40079e}){const _0x379eca=_0x255bd5;super(),this[_0x379eca(0x148)]=_0x2b136a,this[_0x379eca(0x165)]=_0x40d777,this[_0x379eca(0x133)]=_0x40079e;}[_0x255bd5(0xf2)](){const _0x275dd5=_0x255bd5;this[_0x275dd5(0x15c)]=new Map(),this[_0x275dd5(0x16d)]=new Map(),this[_0x275dd5(0x17a)]=new Map(),this[_0x275dd5(0x126)]=new Map(),this[_0x275dd5(0xf0)]();}[_0x255bd5(0x146)](){const _0x1cb9d1=_0x255bd5;return this[_0x1cb9d1(0x15c)];}async[_0x255bd5(0x152)](_0x1b1d1b){const _0x4bce18=_0x255bd5,_0x569568=await this[_0x4bce18(0x173)](_0x1b1d1b);return this[_0x4bce18(0x175)](_0x569568),_0x4bce18(0x158)===_0x569568[_0x4bce18(0x12f)]&&this[_0x4bce18(0x117)](),_0x569568;}async[_0x255bd5(0x173)](_0x4776a4){const _0x2fcc04=_0x255bd5;if(_0x4776a4[_0x2fcc04(0x141)]===_0x3894c2[_0x2fcc04(0x105)]){const _0x34ac83=await this[_0x2fcc04(0x148)][_0x2fcc04(0x108)](this[_0x2fcc04(0x133)],_0x4776a4['id'])[_0x2fcc04(0x118)]();return{'id':_0x2fcc04(0x158),'uiId':_0x2fcc04(0x158),'label':_0x2fcc04(0x177),'type':_0x4776a4[_0x2fcc04(0x141)],'content':_0x34ac83[_0x2fcc04(0x11e)],'hidden':this[_0x2fcc04(0x16d)][_0x2fcc04(0xeb)](_0x2fcc04(0x158)),'version':_0x34ac83[_0x2fcc04(0x103)]?.[_0x2fcc04(0x14e)],'sessionId':_0x34ac83[_0x2fcc04(0x103)]?.[_0x2fcc04(0x13e)]};}if(_0x4776a4[_0x2fcc04(0x141)]===_0x3894c2[_0x2fcc04(0x166)])return{'id':_0x4776a4['id'],'uiId':_0x4776a4['id'],'label':_0x4776a4[_0x2fcc04(0x169)]?.[_0x2fcc04(0xee)]||_0x4776a4['id'],'type':_0x3894c2[_0x2fcc04(0x166)],'mcpServerName':_0x4776a4[_0x2fcc04(0x111)],'toolName':_0x4776a4[_0x2fcc04(0x128)],'data':_0x4776a4[_0x2fcc04(0x169)]||{}};return{'id':_0x4776a4['id'],'uiId':_0x4776a4['id'],'label':_0x4776a4[_0x2fcc04(0x103)]?.[_0x2fcc04(0xee)]||_0x4776a4[_0x2fcc04(0xf4)]||_0x4776a4[_0x2fcc04(0x130)]||_0x4776a4['id'],'type':_0x4776a4[_0x2fcc04(0x141)],..._0x4776a4?.[_0x2fcc04(0x103)]?.[_0x2fcc04(0x170)]?{'resourceId':_0x4776a4[_0x2fcc04(0x103)]?.[_0x2fcc04(0x170)]}:{}};}[_0x255bd5(0x13b)](){const _0x447385=_0x255bd5;return new Map(this[_0x447385(0x16d)]);}[_0x255bd5(0x178)](_0x4ddb70){const _0x875614=_0x255bd5,_0x4c231b=this[_0x875614(0x15c)][_0x875614(0x171)](_0x4ddb70);_0x4c231b?.[_0x875614(0xea)]||this[_0x875614(0x127)](_0x4ddb70);}[_0x255bd5(0x14a)](){const _0x315eaa=_0x255bd5;if(0x0===this[_0x315eaa(0x15c)][_0x315eaa(0x10d)])return;for(const _0x42516c of this[_0x315eaa(0x15c)][_0x315eaa(0x116)]())this[_0x315eaa(0x127)](_0x42516c[_0x315eaa(0x12f)]);const _0x2cafa9=this[_0x315eaa(0x16d)][_0x315eaa(0x171)](_0x315eaa(0x158))||this[_0x315eaa(0x15c)][_0x315eaa(0x171)](_0x315eaa(0x158));_0x2cafa9&&this[_0x315eaa(0x15a)]({..._0x2cafa9,'isReadOnly':!0x0,'hidden':!0x0});}[_0x255bd5(0xe3)](_0x180621){const _0x1d79b2=_0x255bd5;for(const _0x2530da of _0x180621[_0x1d79b2(0x116)]())this[_0x1d79b2(0x175)](_0x2530da);this[_0x1d79b2(0x14a)](),this[_0x1d79b2(0xe6)](_0x1d79b2(0x150),{'contextItems':Array[_0x1d79b2(0x13f)](this[_0x1d79b2(0x13b)]()[_0x1d79b2(0x116)]())});}[_0x255bd5(0x10f)](){const _0x267e43=_0x255bd5;return this[_0x267e43(0x15c)][_0x267e43(0xeb)](_0x267e43(0x158));}[_0x255bd5(0x15e)](){const _0x28fd1d=_0x255bd5;return this[_0x28fd1d(0x15c)][_0x28fd1d(0xeb)](_0x28fd1d(0x129));}[_0x255bd5(0xe4)](){const _0x75dba8=_0x255bd5;return this[_0x75dba8(0x16d)][_0x75dba8(0xeb)](_0x75dba8(0x158));}static[_0x255bd5(0x174)](_0xa8e816){const _0xccc783=_0x255bd5;return Array[_0xccc783(0x13f)](_0xa8e816[_0xccc783(0x116)]())[_0xccc783(0x131)](_0x1872f1=>this[_0xccc783(0x15d)](_0x1872f1))[_0xccc783(0x12a)](_0xcf4eac=>null!==_0xcf4eac);}async[_0x255bd5(0x14d)](_0x34828c,_0x53addc,_0x372804=_0x3894c2[_0x255bd5(0x139)]){const _0x52d13c=_0x255bd5,_0x261f73=_0x52d13c(0xf7)+_0x1f2165();this[_0x52d13c(0x12e)](_0x261f73);try{await Promise[_0x52d13c(0xec)](_0x34828c[_0x52d13c(0x131)](async _0x5b1d79=>{const _0x39dfab=_0x52d13c,_0x58ba9b=_0x39dfab(0xe9)+_0x1f2165(),_0xf074f5=_0x489c5(_0x5b1d79[_0x39dfab(0xf4)]);try{this[_0x39dfab(0x15a)]({'type':_0x372804,'label':_0x53addc?.[_0x39dfab(0xee)]||_0xf074f5,'uiId':_0x58ba9b,'resourceId':_0x53addc?.[_0x39dfab(0x170)]},!0x0);const _0x50dc75=this[_0x39dfab(0x148)][_0x39dfab(0xfa)](this[_0x39dfab(0x133)],_0x5b1d79,_0x53addc);this[_0x39dfab(0x17a)][_0x39dfab(0x13a)](_0x58ba9b,_0x50dc75[_0x39dfab(0xf8)]);const {id:_0xd0e62a}=await _0x50dc75[_0x39dfab(0x154)]();this[_0x39dfab(0x17a)][_0x39dfab(0x115)](_0x58ba9b),this[_0x39dfab(0xfd)]({'type':_0x372804,'id':_0xd0e62a,'label':_0x53addc?.[_0x39dfab(0xee)]||_0xf074f5,'uiId':_0x58ba9b,'resourceId':_0x53addc?.[_0x39dfab(0x170)]},!0x1);}catch(_0x1961fe){this[_0x39dfab(0x17a)][_0x39dfab(0x115)](_0x58ba9b);if(!(_0x1961fe instanceof _0x345b32&&_0x1961fe[_0x39dfab(0x140)][_0x39dfab(0xe5)](_0x39dfab(0xfe)))){const _0x46df66=_0x1d81cc[_0x39dfab(0x171)](_0x1961fe[_0x39dfab(0x145)])||_0x39dfab(0x11b),_0x201498=new _0x345b32(_0x46df66,null,{'fileName':_0xf074f5,..._0x1961fe});_0x201498[_0x39dfab(0x167)]=_0x1961fe[_0x39dfab(0x167)],this[_0x39dfab(0xe6)](_0x39dfab(0x112),{'error':_0x201498});}this[_0x39dfab(0x127)](_0x58ba9b);}}));}finally{this[_0x52d13c(0x11c)](_0x261f73);}}[_0x255bd5(0x14b)](_0x557b87){const _0x484096=_0x255bd5;if(this[_0x484096(0x10f)]()||!this[_0x484096(0x113)][_0x484096(0xfb)][_0x484096(0x125)])return;const _0x21af0d={'type':_0x3894c2[_0x484096(0x105)],'uiId':_0x484096(0x158),'label':_0x557b87,'isReadOnly':this[_0x484096(0x16d)][_0x484096(0xeb)](_0x484096(0x158)),'hidden':this[_0x484096(0x16d)][_0x484096(0xeb)](_0x484096(0x158))};this[_0x484096(0x15a)](_0x21af0d);}async[_0x255bd5(0xed)](_0x335a64,_0x30eeff,_0x4a6804,_0x3c2d1e){const _0x3ff69d=_0x255bd5,_0x66bfa6=this[_0x3ff69d(0x15c)][_0x3ff69d(0x171)](_0x3ff69d(0x158));if(_0x66bfa6&&_0x335a64){_0x66bfa6[_0x3ff69d(0x129)]=_0x3c2d1e?_0x3c2d1e[_0x3ff69d(0x131)](_0x2762f9=>({'start':_0x2762f9[_0x3ff69d(0x142)],'end':_0x2762f9[_0x3ff69d(0x179)]})):[];try{if(_0x66bfa6[_0x3ff69d(0x14e)]===_0x30eeff)return;const {id:_0x12c8f8}=await this[_0x3ff69d(0x148)][_0x3ff69d(0x149)](this[_0x3ff69d(0x133)],_0x335a64,{'version':_0x30eeff,'sessionId':_0x4a6804})[_0x3ff69d(0x154)]();_0x66bfa6['id']=_0x12c8f8,_0x66bfa6[_0x3ff69d(0x11e)]=_0x335a64,_0x66bfa6[_0x3ff69d(0x14e)]=_0x30eeff,_0x66bfa6[_0x3ff69d(0x13e)]=_0x4a6804;}catch(_0x3ef979){const _0x3f6815=new _0x345b32(_0x3ff69d(0x107),null);_0x3f6815[_0x3ff69d(0x167)]=_0x3ef979[_0x3ff69d(0x167)],this[_0x3ff69d(0xe6)](_0x3ff69d(0x112),{'error':_0x3f6815});}}}[_0x255bd5(0xe7)](_0x1426ad){const _0x560764=_0x255bd5;this[_0x560764(0x15a)]({'type':_0x3894c2[_0x560764(0x11a)],'label':_0x1426ad,'uiId':_0x560764(0x129),'content':_0x1426ad});}[_0x255bd5(0x11f)](){const _0x8856d1=_0x255bd5;this[_0x8856d1(0x127)](_0x8856d1(0x129));}async[_0x255bd5(0x147)](_0x29d31c,_0x4b25fd){const _0x3433bf=_0x255bd5,_0x430903=_0x3433bf(0x119)+_0x1f2165();this[_0x3433bf(0x12e)](_0x430903);const _0x4be228=_0x3433bf(0x119)+_0x1f2165();try{this[_0x3433bf(0x15a)]({'type':_0x3894c2[_0x3433bf(0x132)],'label':_0x4b25fd?.[_0x3433bf(0xee)]||_0x29d31c,'uiId':_0x4be228,'resourceId':_0x4b25fd?.[_0x3433bf(0x170)]},!0x0);const _0x43d972=this[_0x3433bf(0x148)][_0x3433bf(0x15b)](this[_0x3433bf(0x133)],_0x29d31c,_0x4b25fd);this[_0x3433bf(0x17a)][_0x3433bf(0x13a)](_0x4be228,_0x43d972[_0x3433bf(0xf8)]);const {id:_0x1f5287}=await _0x43d972[_0x3433bf(0x154)]();this[_0x3433bf(0x17a)][_0x3433bf(0x115)](_0x4be228),this[_0x3433bf(0xfd)]({'type':_0x3894c2[_0x3433bf(0x132)],'id':_0x1f5287,'label':_0x4b25fd?.[_0x3433bf(0xee)]||_0x29d31c,'uiId':_0x4be228,'resourceId':_0x4b25fd?.[_0x3433bf(0x170)]},!0x1);}catch(_0x5db3db){this[_0x3433bf(0x17a)][_0x3433bf(0x115)](_0x4be228),(_0x5db3db[_0x3433bf(0x140)][_0x3433bf(0xe5)](_0x3433bf(0xfe))||this[_0x3433bf(0xe6)](_0x3433bf(0x112),{'error':new _0x345b32(_0x3433bf(0xf6),this,{'url':_0x29d31c,'originalError':_0x5db3db}),'url':_0x29d31c}),this[_0x3433bf(0x127)](_0x4be228));}finally{this[_0x3433bf(0x11c)](_0x430903);}}[_0x255bd5(0xf1)](_0x479309){const _0x4d80eb=_0x255bd5;_0x479309['id']=_0x479309['id']??_0x1f2165()[_0x4d80eb(0x12d)](0x0,0x15),this[_0x4d80eb(0x15c)][_0x4d80eb(0x13a)](_0x479309[_0x4d80eb(0x12f)],_0x479309),this[_0x4d80eb(0xe6)](_0x4d80eb(0xff),{'contextItem':_0x479309,'isLoading':!0x1});}async[_0x255bd5(0x109)](_0x277a71,_0x238f88,_0x5eba66){const _0x367e6=_0x255bd5,_0x41bb6e=this[_0x367e6(0x113)][_0x367e6(0x164)][_0x367e6(0x168)](_0x19f1eb=>_0x19f1eb['id']===_0x277a71);if(!_0x41bb6e)return this[_0x367e6(0xe6)](_0x367e6(0x112),{'error':new _0x345b32(_0x367e6(0x172),this,{'sourceId':_0x277a71}),'sourceId':_0x277a71}),[];try{const _0x7ff8ba=(await _0x41bb6e[_0x367e6(0x13d)](_0x238f88))[_0x367e6(0x131)](_0x516375=>{const _0xada895=_0x367e6,_0x29559c=this[_0xada895(0x124)](_0x516375['id']);return{..._0x516375,'isInContext':_0x29559c};});return _0x41bb6e[_0x367e6(0x151)]=_0x7ff8ba,this[_0x367e6(0xe6)](_0x367e6(0x161),{'sourceId':_0x277a71,'source':_0x41bb6e,'resources':_0x7ff8ba,'uid':_0x5eba66}),_0x7ff8ba;}catch(_0x4474ad){return this[_0x367e6(0xe6)](_0x367e6(0x112),{'error':new _0x345b32(_0x367e6(0x14f),this,{'sourceId':_0x277a71,'originalError':_0x4474ad}),'sourceId':_0x277a71,'sourceLabel':_0x41bb6e[_0x367e6(0xee)]}),[];}}async[_0x255bd5(0xf3)](_0x571283,_0x4bd6b3){const _0x3609c0=_0x255bd5;if(this[_0x3609c0(0x124)](_0x4bd6b3['id']))return;let _0x423847=_0x4bd6b3[_0x3609c0(0x169)];if(!_0x423847&&_0x571283[_0x3609c0(0xfc)])try{_0x423847=await _0x571283[_0x3609c0(0xfc)](_0x4bd6b3['id']);}catch(_0x55525f){return void this[_0x3609c0(0xe6)](_0x3609c0(0x112),{'error':new _0x345b32(_0x3609c0(0x104),this,{'resourceId':_0x4bd6b3['id'],'sourceId':_0x571283['id'],'originalError':_0x55525f}),'resourceId':_0x4bd6b3['id'],'sourceId':_0x571283['id']});}if(_0x423847)switch(_0x4bd6b3[_0x3609c0(0x141)]){case _0x3894c2[_0x3609c0(0x132)]:if(_0x3609c0(0x16c)!=typeof _0x423847)return void this[_0x3609c0(0xe6)](_0x3609c0(0x112),{'error':new _0x345b32(_0x3609c0(0x12c),this,{'resourceId':_0x4bd6b3['id'],'sourceId':_0x571283['id'],'expectedType':_0x3609c0(0x16c),'actualType':typeof _0x423847}),'resourceId':_0x4bd6b3['id'],'sourceId':_0x571283['id']});await this[_0x3609c0(0x147)](_0x423847,{'label':_0x4bd6b3[_0x3609c0(0xee)],'resourceId':_0x4bd6b3['id']});break;case _0x3894c2[_0x3609c0(0x139)]:if(!(_0x423847 instanceof File))return void this[_0x3609c0(0xe6)](_0x3609c0(0x112),{'error':new _0x345b32(_0x3609c0(0x12c),this,{'resourceId':_0x4bd6b3['id'],'sourceId':_0x571283['id'],'expectedType':_0x3609c0(0x137),'actualType':typeof _0x423847}),'resourceId':_0x4bd6b3['id'],'sourceId':_0x571283['id']});await this[_0x3609c0(0x14d)]([_0x423847],{'label':_0x4bd6b3[_0x3609c0(0xee)],'resourceId':_0x4bd6b3['id']});break;case _0x3894c2[_0x3609c0(0x14c)]:if(_0x3609c0(0xf9)!=typeof _0x423847||!(_0x3609c0(0x11e)in _0x423847)||!(_0x3609c0(0x141)in _0x423847))return void this[_0x3609c0(0xe6)](_0x3609c0(0x112),{'error':new _0x345b32(_0x3609c0(0x12c),this,{'resourceId':_0x4bd6b3['id'],'sourceId':_0x571283['id'],'expectedType':_0x3609c0(0x163),'actualType':typeof _0x423847}),'resourceId':_0x4bd6b3['id'],'sourceId':_0x571283['id']});_0x423847=AIChatContext[_0x3609c0(0x122)](_0x423847,_0x4bd6b3[_0x3609c0(0xee)]),await this[_0x3609c0(0x14d)]([_0x423847],{'label':_0x4bd6b3[_0x3609c0(0xee)],'resourceId':_0x4bd6b3['id']},_0x3894c2[_0x3609c0(0x14c)]);break;case _0x3894c2[_0x3609c0(0x166)]:break;default:this[_0x3609c0(0xe6)](_0x3609c0(0x112),{'error':new _0x345b32(_0x3609c0(0x13c),this,{'resourceId':_0x4bd6b3['id'],'sourceId':_0x571283['id'],'resourceType':_0x4bd6b3[_0x3609c0(0x141)]}),'resourceId':_0x4bd6b3['id'],'sourceId':_0x571283['id']});}else this[_0x3609c0(0xe6)](_0x3609c0(0x112),{'error':new _0x345b32(_0x3609c0(0x15f),this,{'resourceId':_0x4bd6b3['id'],'sourceId':_0x571283['id']}),'resourceId':_0x4bd6b3['id'],'sourceId':_0x571283['id']});}static[_0x255bd5(0x122)](_0x5a105e,_0x4069d2){const _0x21eba4=_0x255bd5;switch(_0x5a105e[_0x21eba4(0x141)]){case _0x462fc1[_0x21eba4(0x100)]:return new File([_0x5a105e[_0x21eba4(0x11e)]],_0x4069d2,{'type':_0x21eba4(0x16a)});case _0x462fc1[_0x21eba4(0x110)]:return new File([_0x5a105e[_0x21eba4(0x11e)]],_0x4069d2,{'type':_0x21eba4(0xef)});default:return new File([_0x5a105e[_0x21eba4(0x11e)]],_0x4069d2,{'type':_0x21eba4(0x157)});}}static[_0x255bd5(0x15d)](_0x38c003){const _0x1a959c=_0x255bd5;switch(_0x38c003[_0x1a959c(0x141)]){case _0x3894c2[_0x1a959c(0x139)]:return{'type':_0x3894c2[_0x1a959c(0x139)],'id':_0x38c003['id']};case _0x3894c2[_0x1a959c(0x132)]:return{'type':_0x3894c2[_0x1a959c(0x132)],'id':_0x38c003['id']};case _0x3894c2[_0x1a959c(0x105)]:return{'type':_0x3894c2[_0x1a959c(0x105)],'id':_0x38c003['id'],..._0x38c003[_0x1a959c(0x129)]?.[_0x1a959c(0x162)]&&{'selection':_0x38c003[_0x1a959c(0x129)]}};case _0x3894c2[_0x1a959c(0x14c)]:return{'type':_0x3894c2[_0x1a959c(0x139)],'id':_0x38c003['id']};case _0x3894c2[_0x1a959c(0x166)]:{const _0x97d9ff=_0x38c003;return{'type':_0x3894c2[_0x1a959c(0x166)],'mcpServerName':_0x97d9ff[_0x1a959c(0x111)],'toolName':_0x97d9ff[_0x1a959c(0x128)],'data':_0x97d9ff[_0x1a959c(0x169)],'id':_0x97d9ff['id']};}default:return null;}}[_0x255bd5(0x15a)](_0xfd786f,_0x3723fb=!0x1){const _0x55e0a1=_0x255bd5;if(this[_0x55e0a1(0x15c)][_0x55e0a1(0x13a)](_0xfd786f[_0x55e0a1(0x12f)],_0xfd786f),_0xfd786f[_0x55e0a1(0xf5)]||this[_0x55e0a1(0xe6)](_0x55e0a1(0xff),{'contextItem':_0xfd786f,'isLoading':_0x3723fb}),_0x55e0a1(0x158)===_0xfd786f[_0x55e0a1(0x12f)]&&this[_0x55e0a1(0x117)](),_0xfd786f[_0x55e0a1(0x170)]){const _0x384916=this[_0x55e0a1(0x138)](_0xfd786f[_0x55e0a1(0x170)]);_0x384916&&_0x384916[_0x55e0a1(0x159)](_0x9d72fe=>{const _0x560ed7=_0x55e0a1;this[_0x560ed7(0x136)](_0x9d72fe,_0xfd786f[_0x560ed7(0x170)],!0x0);});}}[_0x255bd5(0x127)](_0xbfa8ec){const _0xf2d0f=_0x255bd5,_0x4509da=this[_0xf2d0f(0x15c)][_0xf2d0f(0x171)](_0xbfa8ec),_0x3226f6=this[_0xf2d0f(0x17a)][_0xf2d0f(0x171)](_0xbfa8ec);if(_0x3226f6&&(_0x3226f6[_0xf2d0f(0x123)](),this[_0xf2d0f(0x17a)][_0xf2d0f(0x115)](_0xbfa8ec)),_0x4509da?.[_0xf2d0f(0x170)]){const _0x3fc0e7=this[_0xf2d0f(0x138)](_0x4509da[_0xf2d0f(0x170)]);_0x3fc0e7&&_0x3fc0e7[_0xf2d0f(0x159)](_0x411baf=>{const _0x1fe5be=_0xf2d0f;this[_0x1fe5be(0x136)](_0x411baf,_0x4509da[_0x1fe5be(0x170)],!0x1);});}this[_0xf2d0f(0x15c)][_0xf2d0f(0x115)](_0xbfa8ec),this[_0xf2d0f(0xe6)](_0xf2d0f(0x10c),{'uiId':_0xbfa8ec,'type':_0x4509da?.[_0xf2d0f(0x141)]}),_0xf2d0f(0x158)===_0xbfa8ec&&this[_0xf2d0f(0x117)]();}[_0x255bd5(0xfd)](_0x3f4bf2,_0x4dbb28){const _0x272810=_0x255bd5;if(this[_0x272810(0x15c)][_0x272810(0xeb)](_0x3f4bf2[_0x272810(0x12f)])&&(this[_0x272810(0x15c)][_0x272810(0x13a)](_0x3f4bf2[_0x272810(0x12f)],_0x3f4bf2),this[_0x272810(0xe6)](_0x272810(0x155),{'contextItem':_0x3f4bf2,'isLoading':_0x4dbb28}),_0x3f4bf2[_0x272810(0x170)])){const _0x3f112a=this[_0x272810(0x138)](_0x3f4bf2[_0x272810(0x170)]);_0x3f112a&&_0x3f112a[_0x272810(0x159)](_0x260d2a=>{const _0x59b541=_0x272810;this[_0x59b541(0x136)](_0x260d2a,_0x3f4bf2[_0x59b541(0x170)],!0x0);});}}[_0x255bd5(0x175)](_0x5d1162){const _0x2f89ed=_0x255bd5;this[_0x2f89ed(0x16d)][_0x2f89ed(0x13a)](_0x5d1162[_0x2f89ed(0x12f)],_0x5d1162);}[_0x255bd5(0xf0)](){const _0x1a32d0=_0x255bd5;this[_0x1a32d0(0x113)]={'document':{'enabled':!0x1!==this[_0x1a32d0(0x165)]?.[_0x1a32d0(0xfb)]?.[_0x1a32d0(0x125)],'isHidden':!0x1},'urls':{'enabled':!0x1!==this[_0x1a32d0(0x165)]?.[_0x1a32d0(0x176)]?.[_0x1a32d0(0x125)]},'files':{'enabled':!0x1!==this[_0x1a32d0(0x165)]?.[_0x1a32d0(0x156)]?.[_0x1a32d0(0x125)]},'sources':this[_0x1a32d0(0x121)](),'customItems':this[_0x1a32d0(0x165)]?.[_0x1a32d0(0x11d)]?.[_0x1a32d0(0x131)](_0x41b9cf=>({..._0x41b9cf,'enabled':!0x0}))??[]},this[_0x1a32d0(0xe6)](_0x1a32d0(0x134),{'options':this[_0x1a32d0(0x113)]});}[_0x255bd5(0x121)](){const _0x387868=_0x255bd5;return this[_0x387868(0x165)]?.[_0x387868(0x164)]?.[_0x387868(0x131)](_0x5e64c9=>({..._0x5e64c9,'resources':[]}))??[];}[_0x255bd5(0x117)](){const _0x4dc5c3=_0x255bd5,_0x3c589d=this[_0x4dc5c3(0x10f)]()||this[_0x4dc5c3(0xe4)]();this[_0x4dc5c3(0x113)][_0x4dc5c3(0xfb)][_0x4dc5c3(0x143)]=_0x3c589d,this[_0x4dc5c3(0xe6)](_0x4dc5c3(0x134),{'options':this[_0x4dc5c3(0x113)]});}[_0x255bd5(0x124)](_0x27fee1){const _0x23b2df=_0x255bd5;for(const _0x3e2d0d of this[_0x23b2df(0x15c)][_0x23b2df(0x116)]())if(_0x3e2d0d[_0x23b2df(0x170)]===_0x27fee1)return!0x0;for(const _0x584a0d of this[_0x23b2df(0x16d)][_0x23b2df(0x116)]())if(_0x584a0d[_0x23b2df(0x170)]===_0x27fee1)return!0x0;return!0x1;}[_0x255bd5(0x138)](_0x3110c9){const _0xa83afd=_0x255bd5,_0x3bba6b=[];for(const _0x19a33e of this[_0xa83afd(0x113)][_0xa83afd(0x164)]){_0x19a33e[_0xa83afd(0x151)][_0xa83afd(0x168)](_0x1e2b92=>_0x1e2b92['id']===_0x3110c9)&&_0x3bba6b[_0xa83afd(0x16b)](_0x19a33e['id']);}return 0x0===_0x3bba6b[_0xa83afd(0x162)]?null:_0x3bba6b;}[_0x255bd5(0x136)](_0x5cedd3,_0x45ff2e,_0x3a0f11){const _0x40596f=_0x255bd5,_0x4548cc=this[_0x40596f(0x113)][_0x40596f(0x164)][_0x40596f(0x168)](_0x43ac54=>_0x43ac54['id']===_0x5cedd3);if(!_0x4548cc)return;const _0x5ca669=_0x4548cc[_0x40596f(0x151)][_0x40596f(0x168)](_0x206dd4=>_0x206dd4['id']===_0x45ff2e);_0x5ca669&&(_0x5ca669[_0x40596f(0x16e)]=_0x3a0f11,this[_0x40596f(0xe6)](_0x40596f(0x144),{'sourceId':_0x5cedd3,'resourceId':_0x45ff2e,'isInContext':_0x3a0f11}));}[_0x255bd5(0x12e)](_0x489829){const _0x375cc7=_0x255bd5;this[_0x375cc7(0x126)][_0x375cc7(0x13a)](_0x489829,!0x0),this[_0x375cc7(0x126)][_0x375cc7(0x10d)]&&this[_0x375cc7(0xe6)](_0x375cc7(0x160),{'isUploadInProgress':!0x0});}[_0x255bd5(0x11c)](_0x1e6f60){const _0x2dcc53=_0x255bd5;this[_0x2dcc53(0x126)][_0x2dcc53(0x115)](_0x1e6f60),0x0===this[_0x2dcc53(0x126)][_0x2dcc53(0x10d)]&&this[_0x2dcc53(0xe6)](_0x2dcc53(0x160),{'isUploadInProgress':!0x1});}}
23
+ const _0x27a96b=_0x9508;(function(_0x11bcbb,_0x41a815){const _0x20396b=_0x9508,_0x1c3fef=_0x11bcbb();while(!![]){try{const _0x489aa2=-parseInt(_0x20396b(0x197))/0x1+parseInt(_0x20396b(0x16e))/0x2*(parseInt(_0x20396b(0x187))/0x3)+-parseInt(_0x20396b(0x152))/0x4+-parseInt(_0x20396b(0x1a0))/0x5+parseInt(_0x20396b(0x198))/0x6+parseInt(_0x20396b(0x159))/0x7*(parseInt(_0x20396b(0x1ce))/0x8)+-parseInt(_0x20396b(0x156))/0x9;if(_0x489aa2===_0x41a815)break;else _0x1c3fef['push'](_0x1c3fef['shift']());}catch(_0xbc73a2){_0x1c3fef['push'](_0x1c3fef['shift']());}}}(_0x5ecb,0xa6511));import{CKEditorError as _0x96d3b4,ObservableMixin as _0xe85e33,uid as _0x32b7ae}from'ckeditor5/src/utils.js';import{AIContextItemType as _0x4c0c19,AIContextTextResourceType as _0x203c83}from'../../aicore/model/aicontext.js';import{escape as _0x1533d3}from'es-toolkit/compat';import{errorsMap as _0x8de527}from'../../errorsmap.js';function _0x9508(_0x1cf429,_0x1fb513){const _0x5ecb0a=_0x5ecb();return _0x9508=function(_0x95081b,_0x1c9873){_0x95081b=_0x95081b-0x145;let _0x39f5c0=_0x5ecb0a[_0x95081b];return _0x39f5c0;},_0x9508(_0x1cf429,_0x1fb513);}export const AI_CONTEXT_MODEL_EVENT_NAMES=[_0x27a96b(0x1cd),_0x27a96b(0x168),_0x27a96b(0x1b3),_0x27a96b(0x1c7),_0x27a96b(0x151),_0x27a96b(0x169),_0x27a96b(0x1c5),_0x27a96b(0x14d),_0x27a96b(0x1b5)];function _0x5ecb(){const _0x57a565=['isCurrentDocumentInConversation','hidden','name','all','contextItemRemoved','addContextOptionsChanged','getSentContextItems','text/html','sources','_findSourceIdsByResourceId','1588BLsVAQ','isCurrentDocumentInContext','_pendingContextItems','ai-chat-url-upload-failed','clearPendingContextItems','attributes','DOCUMENT','_ongoingUploads','_addContextItem','removeFromContext','enabled','addToolItemToContext','delete','uploadUrl','URL','init','text/plain','updateCurrentDocument','file-','addCurrentDocumentToContext','uiId','ai-chat-context-unsupported-type','isInContext','end','toolName','3369lzQeOI','resources','getId','length','urls','_ownerId','addUrlToContext','HTML','label','files','values','substring','uploadDocument','MARKDOWN','start','ai-chat-file-upload-failed','40928IiJaTT','5241138CSIfmV','_convertTextResourceToFile','Current\x20document','message','url','string','find','addToConversationContext','145690uFmqyT','SELECTION','isSelectionInContext','abort','fetchDocument','ai-chat-source-not-found','isReadOnly','_startUploadOperation','getDocument','forEach','addSelectionToContext','ai-chat-resource-no-data','url-','from','startsWith','set','push','size','addFilesToContext','contextItemLoadingEnded','FILE','uploadProgressChanged','_getCustomSourcesInitialState','has','resourceId','document','content','populateFromMessage','fire','customItems','_toggleAddCurrentDocumentOptionVisibility','code','getResources','ai-chat-context-invalid-data','_setAddContextOptionsDefaultState','loadSourceResources','getData','sourceResourcesLoaded','current-document','contextSent','_removeContextItem','_addToConversationContextItem','_finishContextItemLoading','mapContextItemsToRequestData','sessionId','contextItemAdded','25880hOBGoC','files-','object','_conversationContextItems','object\x20with\x20content\x20and\x20type\x20properties','filter','mcpServerName','_finishUploadOperation','stack','uploadFile','TEXT','_config','text/markdown','TOOL','ai-chat-document-upload-failed','_createContextItemFromContent','ai-request-aborted','abortController','isHidden','resourceStateChanged','_connector','get','selection','error','4569576kqgcko','getPendingContextItems','_ongoingUploadOperations','version','2832183EvEcPq','_mapContextItemToRequestData','type','959umaJBs','File','_isResourceInContext','data','addResourceToContext','_updateResourceInContextState','ai-chat-source-resources-load-failed','_addContextOptionsState','ai-chat-resource-load-failed','map','removeSelectionFromContext'];_0x5ecb=function(){return _0x57a565;};return _0x5ecb();}export class AIChatContext extends _0xe85e33(){[_0x27a96b(0x14e)];[_0x27a96b(0x145)];[_0x27a96b(0x18c)];constructor({connector:_0x3f63e7,config:_0xb091c4,ownerId:_0xc89aba}){const _0x403382=_0x27a96b;super(),this[_0x403382(0x14e)]=_0x3f63e7,this[_0x403382(0x145)]=_0xb091c4,this[_0x403382(0x18c)]=_0xc89aba;}[_0x27a96b(0x17d)](){const _0x12377e=_0x27a96b;this[_0x12377e(0x170)]=new Map(),this[_0x12377e(0x1d1)]=new Map(),this[_0x12377e(0x175)]=new Map(),this[_0x12377e(0x154)]=new Map(),this[_0x12377e(0x1c2)]();}[_0x27a96b(0x153)](){const _0x22cfd7=_0x27a96b;return this[_0x22cfd7(0x170)];}async[_0x27a96b(0x1bb)](_0x4861c3){const _0x575366=_0x27a96b,_0x5a43a4=await this[_0x575366(0x149)](_0x4861c3);return this[_0x575366(0x1c9)](_0x5a43a4),_0x575366(0x1c6)===_0x5a43a4[_0x575366(0x182)]&&this[_0x575366(0x1be)](),_0x5a43a4;}async[_0x27a96b(0x149)](_0x4dd932){const _0x272367=_0x27a96b;if(_0x4dd932[_0x272367(0x158)]===_0x4c0c19[_0x272367(0x174)]){const _0x354e22=await this[_0x272367(0x14e)][_0x272367(0x1a4)](this[_0x272367(0x18c)],_0x4dd932['id'])[_0x272367(0x1a8)]();return{'id':_0x272367(0x1c6),'uiId':_0x272367(0x1c6),'label':_0x272367(0x19a),'type':_0x4dd932[_0x272367(0x158)],'content':_0x354e22[_0x272367(0x1ba)],'hidden':this[_0x272367(0x1d1)][_0x272367(0x1b7)](_0x272367(0x1c6)),'version':_0x354e22[_0x272367(0x173)]?.[_0x272367(0x155)],'sessionId':_0x354e22[_0x272367(0x173)]?.[_0x272367(0x1cc)]};}if(_0x4dd932[_0x272367(0x158)]===_0x4c0c19[_0x272367(0x147)])return{'id':_0x4dd932['id'],'uiId':_0x4dd932['id'],'label':_0x4dd932[_0x272367(0x15c)]?.[_0x272367(0x18f)]||_0x4dd932['id'],'type':_0x4c0c19[_0x272367(0x147)],'mcpServerName':_0x4dd932[_0x272367(0x1d4)],'toolName':_0x4dd932[_0x272367(0x186)],'data':_0x4dd932[_0x272367(0x15c)]||{}};return{'id':_0x4dd932['id'],'uiId':_0x4dd932['id'],'label':_0x4dd932[_0x272367(0x173)]?.[_0x272367(0x18f)]||_0x4dd932[_0x272367(0x166)]||_0x4dd932[_0x272367(0x19c)]||_0x4dd932['id'],'type':_0x4dd932[_0x272367(0x158)],..._0x4dd932?.[_0x272367(0x173)]?.[_0x272367(0x1b8)]?{'resourceId':_0x4dd932[_0x272367(0x173)]?.[_0x272367(0x1b8)]}:{}};}[_0x27a96b(0x16a)](){const _0x49a3ff=_0x27a96b;return new Map(this[_0x49a3ff(0x1d1)]);}[_0x27a96b(0x177)](_0xb0c652){const _0x3321ed=_0x27a96b,_0x467348=this[_0x3321ed(0x170)][_0x3321ed(0x14f)](_0xb0c652);_0x467348?.[_0x3321ed(0x1a6)]||this[_0x3321ed(0x1c8)](_0xb0c652);}[_0x27a96b(0x172)](){const _0x20b63c=_0x27a96b;if(0x0===this[_0x20b63c(0x170)][_0x20b63c(0x1b1)])return;for(const _0x2722ab of this[_0x20b63c(0x170)][_0x20b63c(0x191)]())this[_0x20b63c(0x1c8)](_0x2722ab[_0x20b63c(0x182)]);const _0x1683c6=this[_0x20b63c(0x1d1)][_0x20b63c(0x14f)](_0x20b63c(0x1c6))||this[_0x20b63c(0x170)][_0x20b63c(0x14f)](_0x20b63c(0x1c6));_0x1683c6&&this[_0x20b63c(0x176)]({..._0x1683c6,'isReadOnly':!0x0,'hidden':!0x0});}[_0x27a96b(0x19f)](_0x2888ef){const _0x407a52=_0x27a96b;for(const _0x11d08e of _0x2888ef[_0x407a52(0x191)]())this[_0x407a52(0x1c9)](_0x11d08e);this[_0x407a52(0x172)](),this[_0x407a52(0x1bc)](_0x407a52(0x1c7),{'contextItems':Array[_0x407a52(0x1ad)](this[_0x407a52(0x16a)]()[_0x407a52(0x191)]())});}[_0x27a96b(0x16f)](){const _0x24adad=_0x27a96b;return this[_0x24adad(0x170)][_0x24adad(0x1b7)](_0x24adad(0x1c6));}[_0x27a96b(0x1a2)](){const _0x201bcf=_0x27a96b;return this[_0x201bcf(0x170)][_0x201bcf(0x1b7)](_0x201bcf(0x150));}[_0x27a96b(0x164)](){const _0x1d541d=_0x27a96b;return this[_0x1d541d(0x1d1)][_0x1d541d(0x1b7)](_0x1d541d(0x1c6));}static[_0x27a96b(0x1cb)](_0x10504e){const _0x2965cb=_0x27a96b;return Array[_0x2965cb(0x1ad)](_0x10504e[_0x2965cb(0x191)]())[_0x2965cb(0x162)](_0x15c94c=>this[_0x2965cb(0x157)](_0x15c94c))[_0x2965cb(0x1d3)](_0x2e3847=>null!==_0x2e3847);}async[_0x27a96b(0x1b2)](_0x3fcf86,_0x1b970b,_0xae4f3c=_0x4c0c19[_0x27a96b(0x1b4)]){const _0x281cb4=_0x27a96b,_0x2f7aea=_0x281cb4(0x1cf)+_0x32b7ae();this[_0x281cb4(0x1a7)](_0x2f7aea);try{await Promise[_0x281cb4(0x167)](_0x3fcf86[_0x281cb4(0x162)](async _0xaf60fb=>{const _0x18e90f=_0x281cb4,_0x18f8e3=_0x18e90f(0x180)+_0x32b7ae(),_0x31176c=_0x1533d3(_0xaf60fb[_0x18e90f(0x166)]);try{this[_0x18e90f(0x176)]({'type':_0xae4f3c,'label':_0x1b970b?.[_0x18e90f(0x18f)]||_0x31176c,'uiId':_0x18f8e3,'resourceId':_0x1b970b?.[_0x18e90f(0x1b8)]},!0x0);const _0x2b21bb=this[_0x18e90f(0x14e)][_0x18e90f(0x1d7)](this[_0x18e90f(0x18c)],_0xaf60fb,_0x1b970b);this[_0x18e90f(0x175)][_0x18e90f(0x1af)](_0x18f8e3,_0x2b21bb[_0x18e90f(0x14b)]);const {id:_0x1effdb}=await _0x2b21bb[_0x18e90f(0x189)]();this[_0x18e90f(0x175)][_0x18e90f(0x17a)](_0x18f8e3),this[_0x18e90f(0x1ca)]({'type':_0xae4f3c,'id':_0x1effdb,'label':_0x1b970b?.[_0x18e90f(0x18f)]||_0x31176c,'uiId':_0x18f8e3,'resourceId':_0x1b970b?.[_0x18e90f(0x1b8)]},!0x1);}catch(_0x2d24e3){this[_0x18e90f(0x175)][_0x18e90f(0x17a)](_0x18f8e3);if(!(_0x2d24e3 instanceof _0x96d3b4&&_0x2d24e3[_0x18e90f(0x19b)][_0x18e90f(0x1ae)](_0x18e90f(0x14a)))){const _0x57cf10=_0x8de527[_0x18e90f(0x14f)](_0x2d24e3[_0x18e90f(0x1bf)])||_0x18e90f(0x196),_0x37eaa6=new _0x96d3b4(_0x57cf10,null,{'fileName':_0x31176c,..._0x2d24e3});_0x37eaa6[_0x18e90f(0x1d6)]=_0x2d24e3[_0x18e90f(0x1d6)],this[_0x18e90f(0x1bc)](_0x18e90f(0x151),{'error':_0x37eaa6});}this[_0x18e90f(0x1c8)](_0x18f8e3);}}));}finally{this[_0x281cb4(0x1d5)](_0x2f7aea);}}[_0x27a96b(0x181)](_0x2f3056){const _0x260c64=_0x27a96b;if(this[_0x260c64(0x16f)]()||!this[_0x260c64(0x160)][_0x260c64(0x1b9)][_0x260c64(0x178)])return;const _0x23ce93={'type':_0x4c0c19[_0x260c64(0x174)],'uiId':_0x260c64(0x1c6),'label':_0x2f3056,'isReadOnly':this[_0x260c64(0x1d1)][_0x260c64(0x1b7)](_0x260c64(0x1c6)),'hidden':this[_0x260c64(0x1d1)][_0x260c64(0x1b7)](_0x260c64(0x1c6))};this[_0x260c64(0x176)](_0x23ce93);}async[_0x27a96b(0x17f)](_0x41690c,_0x5407ed,_0x2aa1fb,_0x1ae26b){const _0xa31356=_0x27a96b,_0x11b69e=this[_0xa31356(0x170)][_0xa31356(0x14f)](_0xa31356(0x1c6));if(_0x11b69e&&_0x41690c){_0x11b69e[_0xa31356(0x150)]=_0x1ae26b?_0x1ae26b[_0xa31356(0x162)](_0x4d4b09=>({'start':_0x4d4b09[_0xa31356(0x195)],'end':_0x4d4b09[_0xa31356(0x185)]})):[];try{if(_0x11b69e[_0xa31356(0x155)]===_0x5407ed)return;const {id:_0x54832a}=await this[_0xa31356(0x14e)][_0xa31356(0x193)](this[_0xa31356(0x18c)],_0x41690c,{'version':_0x5407ed,'sessionId':_0x2aa1fb})[_0xa31356(0x189)]();_0x11b69e['id']=_0x54832a,_0x11b69e[_0xa31356(0x1ba)]=_0x41690c,_0x11b69e[_0xa31356(0x155)]=_0x5407ed,_0x11b69e[_0xa31356(0x1cc)]=_0x2aa1fb;}catch(_0x5a39f0){const _0x6ffdf9=new _0x96d3b4(_0xa31356(0x148),null);_0x6ffdf9[_0xa31356(0x1d6)]=_0x5a39f0[_0xa31356(0x1d6)],this[_0xa31356(0x1bc)](_0xa31356(0x151),{'error':_0x6ffdf9});}}}[_0x27a96b(0x1aa)](_0x74fe7c){const _0x45d62c=_0x27a96b;this[_0x45d62c(0x176)]({'type':_0x4c0c19[_0x45d62c(0x1a1)],'label':_0x74fe7c,'uiId':_0x45d62c(0x150),'content':_0x74fe7c});}[_0x27a96b(0x163)](){const _0x222751=_0x27a96b;this[_0x222751(0x1c8)](_0x222751(0x150));}async[_0x27a96b(0x18d)](_0x2b805d,_0xdd4d36){const _0x17bcdf=_0x27a96b,_0x29761c=_0x17bcdf(0x1ac)+_0x32b7ae();this[_0x17bcdf(0x1a7)](_0x29761c);const _0x13df04=_0x17bcdf(0x1ac)+_0x32b7ae();try{this[_0x17bcdf(0x176)]({'type':_0x4c0c19[_0x17bcdf(0x17c)],'label':_0xdd4d36?.[_0x17bcdf(0x18f)]||_0x2b805d,'uiId':_0x13df04,'resourceId':_0xdd4d36?.[_0x17bcdf(0x1b8)]},!0x0);const _0x577438=this[_0x17bcdf(0x14e)][_0x17bcdf(0x17b)](this[_0x17bcdf(0x18c)],_0x2b805d,_0xdd4d36);this[_0x17bcdf(0x175)][_0x17bcdf(0x1af)](_0x13df04,_0x577438[_0x17bcdf(0x14b)]);const {id:_0x38fed8}=await _0x577438[_0x17bcdf(0x189)]();this[_0x17bcdf(0x175)][_0x17bcdf(0x17a)](_0x13df04),this[_0x17bcdf(0x1ca)]({'type':_0x4c0c19[_0x17bcdf(0x17c)],'id':_0x38fed8,'label':_0xdd4d36?.[_0x17bcdf(0x18f)]||_0x2b805d,'uiId':_0x13df04,'resourceId':_0xdd4d36?.[_0x17bcdf(0x1b8)]},!0x1);}catch(_0x4e5c93){this[_0x17bcdf(0x175)][_0x17bcdf(0x17a)](_0x13df04),(_0x4e5c93[_0x17bcdf(0x19b)][_0x17bcdf(0x1ae)](_0x17bcdf(0x14a))||this[_0x17bcdf(0x1bc)](_0x17bcdf(0x151),{'error':new _0x96d3b4(_0x17bcdf(0x171),this,{'url':_0x2b805d,'originalError':_0x4e5c93}),'url':_0x2b805d}),this[_0x17bcdf(0x1c8)](_0x13df04));}finally{this[_0x17bcdf(0x1d5)](_0x29761c);}}[_0x27a96b(0x179)](_0x3c97cd){const _0x461aef=_0x27a96b;_0x3c97cd['id']=_0x3c97cd['id']??_0x32b7ae()[_0x461aef(0x192)](0x0,0x15),this[_0x461aef(0x170)][_0x461aef(0x1af)](_0x3c97cd[_0x461aef(0x182)],_0x3c97cd),this[_0x461aef(0x1bc)](_0x461aef(0x1cd),{'contextItem':_0x3c97cd,'isLoading':!0x1});}async[_0x27a96b(0x1c3)](_0xf10e93,_0x8ac118,_0x25b05d){const _0x3c5b7d=_0x27a96b,_0x4022c0=this[_0x3c5b7d(0x160)][_0x3c5b7d(0x16c)][_0x3c5b7d(0x19e)](_0x373b9b=>_0x373b9b['id']===_0xf10e93);if(!_0x4022c0)return this[_0x3c5b7d(0x1bc)](_0x3c5b7d(0x151),{'error':new _0x96d3b4(_0x3c5b7d(0x1a5),this,{'sourceId':_0xf10e93}),'sourceId':_0xf10e93}),[];try{const _0x3db0ce=(await _0x4022c0[_0x3c5b7d(0x1c0)](_0x8ac118))[_0x3c5b7d(0x162)](_0x3173f1=>{const _0x3fbc84=_0x3c5b7d,_0x412171=this[_0x3fbc84(0x15b)](_0x3173f1['id']);return{..._0x3173f1,'isInContext':_0x412171};});return _0x4022c0[_0x3c5b7d(0x188)]=_0x3db0ce,this[_0x3c5b7d(0x1bc)](_0x3c5b7d(0x1c5),{'sourceId':_0xf10e93,'source':_0x4022c0,'resources':_0x3db0ce,'uid':_0x25b05d}),_0x3db0ce;}catch(_0x265ded){return this[_0x3c5b7d(0x1bc)](_0x3c5b7d(0x151),{'error':new _0x96d3b4(_0x3c5b7d(0x15f),this,{'sourceId':_0xf10e93,'originalError':_0x265ded}),'sourceId':_0xf10e93,'sourceLabel':_0x4022c0[_0x3c5b7d(0x18f)]}),[];}}async[_0x27a96b(0x15d)](_0x2fb7a8,_0x382939){const _0x36c95e=_0x27a96b;if(this[_0x36c95e(0x15b)](_0x382939['id']))return;let _0x1c953b=_0x382939[_0x36c95e(0x15c)];if(!_0x1c953b&&_0x2fb7a8[_0x36c95e(0x1c4)])try{_0x1c953b=await _0x2fb7a8[_0x36c95e(0x1c4)](_0x382939['id']);}catch(_0x9f66e1){return void this[_0x36c95e(0x1bc)](_0x36c95e(0x151),{'error':new _0x96d3b4(_0x36c95e(0x161),this,{'resourceId':_0x382939['id'],'sourceId':_0x2fb7a8['id'],'originalError':_0x9f66e1}),'resourceId':_0x382939['id'],'sourceId':_0x2fb7a8['id']});}if(_0x1c953b)switch(_0x382939[_0x36c95e(0x158)]){case _0x4c0c19[_0x36c95e(0x17c)]:if(_0x36c95e(0x19d)!=typeof _0x1c953b)return void this[_0x36c95e(0x1bc)](_0x36c95e(0x151),{'error':new _0x96d3b4(_0x36c95e(0x1c1),this,{'resourceId':_0x382939['id'],'sourceId':_0x2fb7a8['id'],'expectedType':_0x36c95e(0x19d),'actualType':typeof _0x1c953b}),'resourceId':_0x382939['id'],'sourceId':_0x2fb7a8['id']});await this[_0x36c95e(0x18d)](_0x1c953b,{'label':_0x382939[_0x36c95e(0x18f)],'resourceId':_0x382939['id']});break;case _0x4c0c19[_0x36c95e(0x1b4)]:if(!(_0x1c953b instanceof File))return void this[_0x36c95e(0x1bc)](_0x36c95e(0x151),{'error':new _0x96d3b4(_0x36c95e(0x1c1),this,{'resourceId':_0x382939['id'],'sourceId':_0x2fb7a8['id'],'expectedType':_0x36c95e(0x15a),'actualType':typeof _0x1c953b}),'resourceId':_0x382939['id'],'sourceId':_0x2fb7a8['id']});await this[_0x36c95e(0x1b2)]([_0x1c953b],{'label':_0x382939[_0x36c95e(0x18f)],'resourceId':_0x382939['id']});break;case _0x4c0c19[_0x36c95e(0x1d8)]:if(_0x36c95e(0x1d0)!=typeof _0x1c953b||!(_0x36c95e(0x1ba)in _0x1c953b)||!(_0x36c95e(0x158)in _0x1c953b))return void this[_0x36c95e(0x1bc)](_0x36c95e(0x151),{'error':new _0x96d3b4(_0x36c95e(0x1c1),this,{'resourceId':_0x382939['id'],'sourceId':_0x2fb7a8['id'],'expectedType':_0x36c95e(0x1d2),'actualType':typeof _0x1c953b}),'resourceId':_0x382939['id'],'sourceId':_0x2fb7a8['id']});_0x1c953b=AIChatContext[_0x36c95e(0x199)](_0x1c953b,_0x382939[_0x36c95e(0x18f)]),await this[_0x36c95e(0x1b2)]([_0x1c953b],{'label':_0x382939[_0x36c95e(0x18f)],'resourceId':_0x382939['id']},_0x4c0c19[_0x36c95e(0x1d8)]);break;case _0x4c0c19[_0x36c95e(0x147)]:break;default:this[_0x36c95e(0x1bc)](_0x36c95e(0x151),{'error':new _0x96d3b4(_0x36c95e(0x183),this,{'resourceId':_0x382939['id'],'sourceId':_0x2fb7a8['id'],'resourceType':_0x382939[_0x36c95e(0x158)]}),'resourceId':_0x382939['id'],'sourceId':_0x2fb7a8['id']});}else this[_0x36c95e(0x1bc)](_0x36c95e(0x151),{'error':new _0x96d3b4(_0x36c95e(0x1ab),this,{'resourceId':_0x382939['id'],'sourceId':_0x2fb7a8['id']}),'resourceId':_0x382939['id'],'sourceId':_0x2fb7a8['id']});}static[_0x27a96b(0x199)](_0x42803f,_0x6369fa){const _0x1ba4b5=_0x27a96b;switch(_0x42803f[_0x1ba4b5(0x158)]){case _0x203c83[_0x1ba4b5(0x194)]:return new File([_0x42803f[_0x1ba4b5(0x1ba)]],_0x6369fa,{'type':_0x1ba4b5(0x146)});case _0x203c83[_0x1ba4b5(0x18e)]:return new File([_0x42803f[_0x1ba4b5(0x1ba)]],_0x6369fa,{'type':_0x1ba4b5(0x16b)});default:return new File([_0x42803f[_0x1ba4b5(0x1ba)]],_0x6369fa,{'type':_0x1ba4b5(0x17e)});}}static[_0x27a96b(0x157)](_0x115e53){const _0x193871=_0x27a96b;switch(_0x115e53[_0x193871(0x158)]){case _0x4c0c19[_0x193871(0x1b4)]:return{'type':_0x4c0c19[_0x193871(0x1b4)],'id':_0x115e53['id']};case _0x4c0c19[_0x193871(0x17c)]:return{'type':_0x4c0c19[_0x193871(0x17c)],'id':_0x115e53['id']};case _0x4c0c19[_0x193871(0x174)]:return{'type':_0x4c0c19[_0x193871(0x174)],'id':_0x115e53['id'],..._0x115e53[_0x193871(0x150)]?.[_0x193871(0x18a)]&&{'selection':_0x115e53[_0x193871(0x150)]}};case _0x4c0c19[_0x193871(0x1d8)]:return{'type':_0x4c0c19[_0x193871(0x1b4)],'id':_0x115e53['id']};case _0x4c0c19[_0x193871(0x147)]:{const _0x3a2ec7=_0x115e53;return{'type':_0x4c0c19[_0x193871(0x147)],'mcpServerName':_0x3a2ec7[_0x193871(0x1d4)],'toolName':_0x3a2ec7[_0x193871(0x186)],'data':_0x3a2ec7[_0x193871(0x15c)],'id':_0x3a2ec7['id']};}default:return null;}}[_0x27a96b(0x176)](_0x1c8e48,_0x22f3f2=!0x1){const _0x134f94=_0x27a96b;if(this[_0x134f94(0x170)][_0x134f94(0x1af)](_0x1c8e48[_0x134f94(0x182)],_0x1c8e48),_0x1c8e48[_0x134f94(0x165)]||this[_0x134f94(0x1bc)](_0x134f94(0x1cd),{'contextItem':_0x1c8e48,'isLoading':_0x22f3f2}),_0x134f94(0x1c6)===_0x1c8e48[_0x134f94(0x182)]&&this[_0x134f94(0x1be)](),_0x1c8e48[_0x134f94(0x1b8)]){const _0xe7b072=this[_0x134f94(0x16d)](_0x1c8e48[_0x134f94(0x1b8)]);_0xe7b072&&_0xe7b072[_0x134f94(0x1a9)](_0x5d9541=>{const _0x5646dc=_0x134f94;this[_0x5646dc(0x15e)](_0x5d9541,_0x1c8e48[_0x5646dc(0x1b8)],!0x0);});}}[_0x27a96b(0x1c8)](_0x26687f){const _0x268e47=_0x27a96b,_0x4963aa=this[_0x268e47(0x170)][_0x268e47(0x14f)](_0x26687f),_0x559340=this[_0x268e47(0x175)][_0x268e47(0x14f)](_0x26687f);if(_0x559340&&(_0x559340[_0x268e47(0x1a3)](),this[_0x268e47(0x175)][_0x268e47(0x17a)](_0x26687f)),_0x4963aa?.[_0x268e47(0x1b8)]){const _0x40294a=this[_0x268e47(0x16d)](_0x4963aa[_0x268e47(0x1b8)]);_0x40294a&&_0x40294a[_0x268e47(0x1a9)](_0x13811d=>{const _0x5130f3=_0x268e47;this[_0x5130f3(0x15e)](_0x13811d,_0x4963aa[_0x5130f3(0x1b8)],!0x1);});}this[_0x268e47(0x170)][_0x268e47(0x17a)](_0x26687f),this[_0x268e47(0x1bc)](_0x268e47(0x168),{'uiId':_0x26687f,'type':_0x4963aa?.[_0x268e47(0x158)]}),_0x268e47(0x1c6)===_0x26687f&&this[_0x268e47(0x1be)]();}[_0x27a96b(0x1ca)](_0x1c2790,_0x33b368){const _0x3123fc=_0x27a96b;if(this[_0x3123fc(0x170)][_0x3123fc(0x1b7)](_0x1c2790[_0x3123fc(0x182)])&&(this[_0x3123fc(0x170)][_0x3123fc(0x1af)](_0x1c2790[_0x3123fc(0x182)],_0x1c2790),this[_0x3123fc(0x1bc)](_0x3123fc(0x1b3),{'contextItem':_0x1c2790,'isLoading':_0x33b368}),_0x1c2790[_0x3123fc(0x1b8)])){const _0xfd800f=this[_0x3123fc(0x16d)](_0x1c2790[_0x3123fc(0x1b8)]);_0xfd800f&&_0xfd800f[_0x3123fc(0x1a9)](_0x5f3f78=>{const _0x15b375=_0x3123fc;this[_0x15b375(0x15e)](_0x5f3f78,_0x1c2790[_0x15b375(0x1b8)],!0x0);});}}[_0x27a96b(0x1c9)](_0xc29fef){const _0x45b84b=_0x27a96b;this[_0x45b84b(0x1d1)][_0x45b84b(0x1af)](_0xc29fef[_0x45b84b(0x182)],_0xc29fef);}[_0x27a96b(0x1c2)](){const _0x485986=_0x27a96b;this[_0x485986(0x160)]={'document':{'enabled':!0x1!==this[_0x485986(0x145)]?.[_0x485986(0x1b9)]?.[_0x485986(0x178)],'isHidden':!0x1},'urls':{'enabled':!0x1!==this[_0x485986(0x145)]?.[_0x485986(0x18b)]?.[_0x485986(0x178)]},'files':{'enabled':!0x1!==this[_0x485986(0x145)]?.[_0x485986(0x190)]?.[_0x485986(0x178)]},'sources':this[_0x485986(0x1b6)](),'customItems':this[_0x485986(0x145)]?.[_0x485986(0x1bd)]?.[_0x485986(0x162)](_0x28fc17=>({..._0x28fc17,'enabled':!0x0}))??[]},this[_0x485986(0x1bc)](_0x485986(0x169),{'options':this[_0x485986(0x160)]});}[_0x27a96b(0x1b6)](){const _0x4ce1b0=_0x27a96b;return this[_0x4ce1b0(0x145)]?.[_0x4ce1b0(0x16c)]?.[_0x4ce1b0(0x162)](_0x317708=>({..._0x317708,'resources':[]}))??[];}[_0x27a96b(0x1be)](){const _0x5d892f=_0x27a96b,_0x4f2626=this[_0x5d892f(0x16f)]()||this[_0x5d892f(0x164)]();this[_0x5d892f(0x160)][_0x5d892f(0x1b9)][_0x5d892f(0x14c)]=_0x4f2626,this[_0x5d892f(0x1bc)](_0x5d892f(0x169),{'options':this[_0x5d892f(0x160)]});}[_0x27a96b(0x15b)](_0x3dfa2a){const _0x2cada9=_0x27a96b;for(const _0x1e3c76 of this[_0x2cada9(0x170)][_0x2cada9(0x191)]())if(_0x1e3c76[_0x2cada9(0x1b8)]===_0x3dfa2a)return!0x0;for(const _0xec7e6b of this[_0x2cada9(0x1d1)][_0x2cada9(0x191)]())if(_0xec7e6b[_0x2cada9(0x1b8)]===_0x3dfa2a)return!0x0;return!0x1;}[_0x27a96b(0x16d)](_0x8e736a){const _0x1b201c=_0x27a96b,_0x54958f=[];for(const _0x350631 of this[_0x1b201c(0x160)][_0x1b201c(0x16c)]){_0x350631[_0x1b201c(0x188)][_0x1b201c(0x19e)](_0x522b85=>_0x522b85['id']===_0x8e736a)&&_0x54958f[_0x1b201c(0x1b0)](_0x350631['id']);}return 0x0===_0x54958f[_0x1b201c(0x18a)]?null:_0x54958f;}[_0x27a96b(0x15e)](_0x918438,_0x14aa37,_0x2ad1d2){const _0xf7a949=_0x27a96b,_0x62c76b=this[_0xf7a949(0x160)][_0xf7a949(0x16c)][_0xf7a949(0x19e)](_0x3f1ae3=>_0x3f1ae3['id']===_0x918438);if(!_0x62c76b)return;const _0x84f3a7=_0x62c76b[_0xf7a949(0x188)][_0xf7a949(0x19e)](_0x50f353=>_0x50f353['id']===_0x14aa37);_0x84f3a7&&(_0x84f3a7[_0xf7a949(0x184)]=_0x2ad1d2,this[_0xf7a949(0x1bc)](_0xf7a949(0x14d),{'sourceId':_0x918438,'resourceId':_0x14aa37,'isInContext':_0x2ad1d2}));}[_0x27a96b(0x1a7)](_0x12e176){const _0x4e85ed=_0x27a96b;this[_0x4e85ed(0x154)][_0x4e85ed(0x1af)](_0x12e176,!0x0),this[_0x4e85ed(0x154)][_0x4e85ed(0x1b1)]&&this[_0x4e85ed(0x1bc)](_0x4e85ed(0x1b5),{'isUploadInProgress':!0x0});}[_0x27a96b(0x1d5)](_0x4eb162){const _0x244b71=_0x27a96b;this[_0x244b71(0x154)][_0x244b71(0x17a)](_0x4eb162),0x0===this[_0x244b71(0x154)][_0x244b71(0x1b1)]&&this[_0x244b71(0x1bc)](_0x244b71(0x1b5),{'isUploadInProgress':!0x1});}}