@ckeditor/ckeditor5-ai 46.1.1 → 47.0.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (623) hide show
  1. package/LICENSE.md +18 -5
  2. package/README.md +10 -9
  3. package/build/ai.js +2 -2
  4. package/build/translations/af.js +1 -1
  5. package/build/translations/ar.js +1 -1
  6. package/build/translations/ast.js +1 -1
  7. package/build/translations/az.js +1 -1
  8. package/build/translations/be.js +1 -1
  9. package/build/translations/bg.js +1 -1
  10. package/build/translations/bn.js +1 -1
  11. package/build/translations/bs.js +1 -1
  12. package/build/translations/ca.js +1 -1
  13. package/build/translations/cs.js +1 -1
  14. package/build/translations/da.js +1 -1
  15. package/build/translations/de-ch.js +1 -1
  16. package/build/translations/de.js +1 -1
  17. package/build/translations/el.js +1 -1
  18. package/build/translations/en-au.js +1 -1
  19. package/build/translations/en-gb.js +1 -1
  20. package/build/translations/eo.js +1 -1
  21. package/build/translations/es-co.js +1 -1
  22. package/build/translations/es.js +1 -1
  23. package/build/translations/et.js +1 -1
  24. package/build/translations/eu.js +1 -1
  25. package/build/translations/fa.js +1 -1
  26. package/build/translations/fi.js +1 -1
  27. package/build/translations/fr.js +1 -1
  28. package/build/translations/gl.js +1 -1
  29. package/build/translations/gu.js +1 -1
  30. package/build/translations/he.js +1 -1
  31. package/build/translations/hi.js +1 -1
  32. package/build/translations/hr.js +1 -1
  33. package/build/translations/hu.js +1 -1
  34. package/build/translations/hy.js +1 -1
  35. package/build/translations/id.js +1 -1
  36. package/build/translations/it.js +1 -1
  37. package/build/translations/ja.js +1 -1
  38. package/build/translations/jv.js +1 -1
  39. package/build/translations/kk.js +1 -1
  40. package/build/translations/km.js +1 -1
  41. package/build/translations/kn.js +1 -1
  42. package/build/translations/ko.js +1 -1
  43. package/build/translations/ku.js +1 -1
  44. package/build/translations/lt.js +1 -1
  45. package/build/translations/lv.js +1 -1
  46. package/build/translations/ms.js +1 -1
  47. package/build/translations/nb.js +1 -1
  48. package/build/translations/ne.js +1 -1
  49. package/build/translations/nl.js +1 -1
  50. package/build/translations/no.js +1 -1
  51. package/build/translations/oc.js +1 -1
  52. package/build/translations/pl.js +1 -1
  53. package/build/translations/pt-br.js +1 -1
  54. package/build/translations/pt.js +1 -1
  55. package/build/translations/ro.js +1 -1
  56. package/build/translations/ru.js +1 -1
  57. package/build/translations/si.js +1 -1
  58. package/build/translations/sk.js +1 -1
  59. package/build/translations/sl.js +1 -1
  60. package/build/translations/sq.js +1 -1
  61. package/build/translations/sr-latn.js +1 -1
  62. package/build/translations/sr.js +1 -1
  63. package/build/translations/sv.js +1 -1
  64. package/build/translations/th.js +1 -1
  65. package/build/translations/ti.js +1 -1
  66. package/build/translations/tk.js +1 -1
  67. package/build/translations/tr.js +1 -1
  68. package/build/translations/tt.js +1 -1
  69. package/build/translations/ug.js +1 -1
  70. package/build/translations/uk.js +1 -1
  71. package/build/translations/ur.js +1 -1
  72. package/build/translations/uz.js +1 -1
  73. package/build/translations/vi.js +1 -1
  74. package/build/translations/zh-cn.js +1 -1
  75. package/build/translations/zh.js +1 -1
  76. package/ckeditor5-metadata.json +24 -3
  77. package/dist/index-content.css +0 -1
  78. package/dist/index-editor.css +2742 -0
  79. package/dist/index.css +3141 -0
  80. package/dist/index.js +4 -2
  81. package/dist/translations/af.js +1 -1
  82. package/dist/translations/af.umd.js +1 -1
  83. package/dist/translations/ar.js +1 -1
  84. package/dist/translations/ar.umd.js +1 -1
  85. package/dist/translations/ast.js +1 -1
  86. package/dist/translations/ast.umd.js +1 -1
  87. package/dist/translations/az.js +1 -1
  88. package/dist/translations/az.umd.js +1 -1
  89. package/dist/translations/be.js +1 -1
  90. package/dist/translations/be.umd.js +1 -1
  91. package/dist/translations/bg.js +1 -1
  92. package/dist/translations/bg.umd.js +1 -1
  93. package/dist/translations/bn.js +1 -1
  94. package/dist/translations/bn.umd.js +1 -1
  95. package/dist/translations/bs.js +1 -1
  96. package/dist/translations/bs.umd.js +1 -1
  97. package/dist/translations/ca.js +1 -1
  98. package/dist/translations/ca.umd.js +1 -1
  99. package/dist/translations/cs.js +1 -1
  100. package/dist/translations/cs.umd.js +1 -1
  101. package/dist/translations/da.js +1 -1
  102. package/dist/translations/da.umd.js +1 -1
  103. package/dist/translations/de-ch.js +1 -1
  104. package/dist/translations/de-ch.umd.js +1 -1
  105. package/dist/translations/de.js +1 -1
  106. package/dist/translations/de.umd.js +1 -1
  107. package/dist/translations/el.js +1 -1
  108. package/dist/translations/el.umd.js +1 -1
  109. package/dist/translations/en-au.js +1 -1
  110. package/dist/translations/en-au.umd.js +1 -1
  111. package/dist/translations/en-gb.js +1 -1
  112. package/dist/translations/en-gb.umd.js +1 -1
  113. package/dist/translations/en.js +1 -1
  114. package/dist/translations/en.umd.js +1 -1
  115. package/dist/translations/eo.js +1 -1
  116. package/dist/translations/eo.umd.js +1 -1
  117. package/dist/translations/es-co.js +1 -1
  118. package/dist/translations/es-co.umd.js +1 -1
  119. package/dist/translations/es.js +1 -1
  120. package/dist/translations/es.umd.js +1 -1
  121. package/dist/translations/et.js +1 -1
  122. package/dist/translations/et.umd.js +1 -1
  123. package/dist/translations/eu.js +1 -1
  124. package/dist/translations/eu.umd.js +1 -1
  125. package/dist/translations/fa.js +1 -1
  126. package/dist/translations/fa.umd.js +1 -1
  127. package/dist/translations/fi.js +1 -1
  128. package/dist/translations/fi.umd.js +1 -1
  129. package/dist/translations/fr.js +1 -1
  130. package/dist/translations/fr.umd.js +1 -1
  131. package/dist/translations/gl.js +1 -1
  132. package/dist/translations/gl.umd.js +1 -1
  133. package/dist/translations/gu.js +1 -1
  134. package/dist/translations/gu.umd.js +1 -1
  135. package/dist/translations/he.js +1 -1
  136. package/dist/translations/he.umd.js +1 -1
  137. package/dist/translations/hi.js +1 -1
  138. package/dist/translations/hi.umd.js +1 -1
  139. package/dist/translations/hr.js +1 -1
  140. package/dist/translations/hr.umd.js +1 -1
  141. package/dist/translations/hu.js +1 -1
  142. package/dist/translations/hu.umd.js +1 -1
  143. package/dist/translations/hy.js +1 -1
  144. package/dist/translations/hy.umd.js +1 -1
  145. package/dist/translations/id.js +1 -1
  146. package/dist/translations/id.umd.js +1 -1
  147. package/dist/translations/it.js +1 -1
  148. package/dist/translations/it.umd.js +1 -1
  149. package/dist/translations/ja.js +1 -1
  150. package/dist/translations/ja.umd.js +1 -1
  151. package/dist/translations/jv.js +1 -1
  152. package/dist/translations/jv.umd.js +1 -1
  153. package/dist/translations/kk.js +1 -1
  154. package/dist/translations/kk.umd.js +1 -1
  155. package/dist/translations/km.js +1 -1
  156. package/dist/translations/km.umd.js +1 -1
  157. package/dist/translations/kn.js +1 -1
  158. package/dist/translations/kn.umd.js +1 -1
  159. package/dist/translations/ko.js +1 -1
  160. package/dist/translations/ko.umd.js +1 -1
  161. package/dist/translations/ku.js +1 -1
  162. package/dist/translations/ku.umd.js +1 -1
  163. package/dist/translations/lt.js +1 -1
  164. package/dist/translations/lt.umd.js +1 -1
  165. package/dist/translations/lv.js +1 -1
  166. package/dist/translations/lv.umd.js +1 -1
  167. package/dist/translations/ms.js +1 -1
  168. package/dist/translations/ms.umd.js +1 -1
  169. package/dist/translations/nb.js +1 -1
  170. package/dist/translations/nb.umd.js +1 -1
  171. package/dist/translations/ne.js +1 -1
  172. package/dist/translations/ne.umd.js +1 -1
  173. package/dist/translations/nl.js +1 -1
  174. package/dist/translations/nl.umd.js +1 -1
  175. package/dist/translations/no.js +1 -1
  176. package/dist/translations/no.umd.js +1 -1
  177. package/dist/translations/oc.js +1 -1
  178. package/dist/translations/oc.umd.js +1 -1
  179. package/dist/translations/pl.js +1 -1
  180. package/dist/translations/pl.umd.js +1 -1
  181. package/dist/translations/pt-br.js +1 -1
  182. package/dist/translations/pt-br.umd.js +1 -1
  183. package/dist/translations/pt.js +1 -1
  184. package/dist/translations/pt.umd.js +1 -1
  185. package/dist/translations/ro.js +1 -1
  186. package/dist/translations/ro.umd.js +1 -1
  187. package/dist/translations/ru.js +1 -1
  188. package/dist/translations/ru.umd.js +1 -1
  189. package/dist/translations/si.js +1 -1
  190. package/dist/translations/si.umd.js +1 -1
  191. package/dist/translations/sk.js +1 -1
  192. package/dist/translations/sk.umd.js +1 -1
  193. package/dist/translations/sl.js +1 -1
  194. package/dist/translations/sl.umd.js +1 -1
  195. package/dist/translations/sq.js +1 -1
  196. package/dist/translations/sq.umd.js +1 -1
  197. package/dist/translations/sr-latn.js +1 -1
  198. package/dist/translations/sr-latn.umd.js +1 -1
  199. package/dist/translations/sr.js +1 -1
  200. package/dist/translations/sr.umd.js +1 -1
  201. package/dist/translations/sv.js +1 -1
  202. package/dist/translations/sv.umd.js +1 -1
  203. package/dist/translations/th.js +1 -1
  204. package/dist/translations/th.umd.js +1 -1
  205. package/dist/translations/ti.js +1 -1
  206. package/dist/translations/ti.umd.js +1 -1
  207. package/dist/translations/tk.js +1 -1
  208. package/dist/translations/tk.umd.js +1 -1
  209. package/dist/translations/tr.js +1 -1
  210. package/dist/translations/tr.umd.js +1 -1
  211. package/dist/translations/tt.js +1 -1
  212. package/dist/translations/tt.umd.js +1 -1
  213. package/dist/translations/ug.js +1 -1
  214. package/dist/translations/ug.umd.js +1 -1
  215. package/dist/translations/uk.js +1 -1
  216. package/dist/translations/uk.umd.js +1 -1
  217. package/dist/translations/ur.js +1 -1
  218. package/dist/translations/ur.umd.js +1 -1
  219. package/dist/translations/uz.js +1 -1
  220. package/dist/translations/uz.umd.js +1 -1
  221. package/dist/translations/vi.js +1 -1
  222. package/dist/translations/vi.umd.js +1 -1
  223. package/dist/translations/zh-cn.js +1 -1
  224. package/dist/translations/zh-cn.umd.js +1 -1
  225. package/dist/translations/zh.js +1 -1
  226. package/dist/translations/zh.umd.js +1 -1
  227. package/lang/contexts.json +163 -1
  228. package/lang/translations/af.po +612 -0
  229. package/lang/translations/ar.po +628 -0
  230. package/lang/translations/ast.po +612 -0
  231. package/lang/translations/az.po +612 -0
  232. package/lang/translations/be.po +616 -0
  233. package/lang/translations/bg.po +612 -0
  234. package/lang/translations/bn.po +612 -0
  235. package/lang/translations/bs.po +616 -0
  236. package/lang/translations/ca.po +612 -0
  237. package/lang/translations/cs.po +616 -0
  238. package/lang/translations/da.po +612 -0
  239. package/lang/translations/de-ch.po +612 -0
  240. package/lang/translations/de.po +612 -0
  241. package/lang/translations/el.po +612 -0
  242. package/lang/translations/en-au.po +612 -0
  243. package/lang/translations/en-gb.po +612 -0
  244. package/lang/translations/en.po +612 -0
  245. package/lang/translations/eo.po +612 -0
  246. package/lang/translations/es-co.po +612 -0
  247. package/lang/translations/es.po +612 -0
  248. package/lang/translations/et.po +612 -0
  249. package/lang/translations/eu.po +612 -0
  250. package/lang/translations/fa.po +608 -0
  251. package/lang/translations/fi.po +612 -0
  252. package/lang/translations/fr.po +612 -0
  253. package/lang/translations/gl.po +612 -0
  254. package/lang/translations/gu.po +612 -0
  255. package/lang/translations/he.po +612 -0
  256. package/lang/translations/hi.po +612 -0
  257. package/lang/translations/hr.po +616 -0
  258. package/lang/translations/hu.po +612 -0
  259. package/lang/translations/hy.po +612 -0
  260. package/lang/translations/id.po +608 -0
  261. package/lang/translations/it.po +612 -0
  262. package/lang/translations/ja.po +608 -0
  263. package/lang/translations/jv.po +612 -0
  264. package/lang/translations/kk.po +612 -0
  265. package/lang/translations/km.po +608 -0
  266. package/lang/translations/kn.po +612 -0
  267. package/lang/translations/ko.po +608 -0
  268. package/lang/translations/ku.po +612 -0
  269. package/lang/translations/lt.po +616 -0
  270. package/lang/translations/lv.po +616 -0
  271. package/lang/translations/ms.po +608 -0
  272. package/lang/translations/nb.po +612 -0
  273. package/lang/translations/ne.po +612 -0
  274. package/lang/translations/nl.po +612 -0
  275. package/lang/translations/no.po +612 -0
  276. package/lang/translations/oc.po +612 -0
  277. package/lang/translations/pl.po +616 -0
  278. package/lang/translations/pt-br.po +612 -0
  279. package/lang/translations/pt.po +612 -0
  280. package/lang/translations/ro.po +616 -0
  281. package/lang/translations/ru.po +616 -0
  282. package/lang/translations/si.po +612 -0
  283. package/lang/translations/sk.po +616 -0
  284. package/lang/translations/sl.po +620 -0
  285. package/lang/translations/sq.po +612 -0
  286. package/lang/translations/sr-latn.po +616 -0
  287. package/lang/translations/sr.po +616 -0
  288. package/lang/translations/sv.po +612 -0
  289. package/lang/translations/th.po +608 -0
  290. package/lang/translations/ti.po +612 -0
  291. package/lang/translations/tk.po +612 -0
  292. package/lang/translations/tr.po +612 -0
  293. package/lang/translations/tt.po +608 -0
  294. package/lang/translations/ug.po +608 -0
  295. package/lang/translations/uk.po +616 -0
  296. package/lang/translations/ur.po +612 -0
  297. package/lang/translations/uz.po +612 -0
  298. package/lang/translations/vi.po +608 -0
  299. package/lang/translations/zh-cn.po +608 -0
  300. package/lang/translations/zh.po +608 -0
  301. package/package.json +23 -11
  302. package/src/aiactions/aiactions.d.ts +48 -0
  303. package/src/aiactions/aiactions.js +23 -0
  304. package/src/aiactions/model/aiactionsinteraction.d.ts +48 -0
  305. package/src/aiactions/model/aiactionsinteraction.js +23 -0
  306. package/src/aiactions/model/aiactionsreply.d.ts +15 -0
  307. package/src/aiactions/model/aiactionsreply.js +23 -0
  308. package/src/{adapters → aiassistant/adapters}/aiadapter.d.ts +1 -1
  309. package/src/aiassistant/adapters/aiadapter.js +23 -0
  310. package/src/{adapters → aiassistant/adapters}/aitextadapter.d.ts +9 -9
  311. package/src/aiassistant/adapters/aitextadapter.js +23 -0
  312. package/src/{adapters → aiassistant/adapters}/awstextadapter.d.ts +36 -23
  313. package/src/aiassistant/adapters/awstextadapter.js +23 -0
  314. package/src/{adapters → aiassistant/adapters}/openaitextadapter.d.ts +38 -25
  315. package/src/aiassistant/adapters/openaitextadapter.js +23 -0
  316. package/src/{aiassistant.d.ts → aiassistant/aiassistant.d.ts} +54 -13
  317. package/src/aiassistant/aiassistant.js +23 -0
  318. package/src/aiassistant/aiassistantediting.js +23 -0
  319. package/src/{aiassistantui.d.ts → aiassistant/aiassistantui.d.ts} +4 -4
  320. package/src/aiassistant/aiassistantui.js +23 -0
  321. package/src/{legacyerrors.js → aiassistant/legacyerrors.js} +1 -1
  322. package/src/{ui → aiassistant/ui}/aiassistantcontroller.d.ts +5 -4
  323. package/src/aiassistant/ui/aiassistantcontroller.js +24 -0
  324. package/src/{ui → aiassistant/ui}/form/aiformcontentarea.d.ts +1 -1
  325. package/src/aiassistant/ui/form/aiformcontentarea.js +23 -0
  326. package/src/aiassistant/ui/form/aiformerrorview.js +23 -0
  327. package/src/{ui → aiassistant/ui}/form/aiformpromptview.d.ts +1 -1
  328. package/src/aiassistant/ui/form/aiformpromptview.js +23 -0
  329. package/src/{ui → aiassistant/ui}/form/aiformtoolbarview.d.ts +1 -1
  330. package/src/aiassistant/ui/form/aiformtoolbarview.js +23 -0
  331. package/src/{ui → aiassistant/ui}/form/aiformview.d.ts +1 -1
  332. package/src/aiassistant/ui/form/aiformview.js +23 -0
  333. package/src/{ui → aiassistant/ui}/form/aihistorylistitemview.d.ts +1 -1
  334. package/src/aiassistant/ui/form/aihistorylistitemview.js +23 -0
  335. package/src/{ui → aiassistant/ui}/form/aihistorylistview.d.ts +1 -1
  336. package/src/aiassistant/ui/form/aihistorylistview.js +23 -0
  337. package/src/{ui → aiassistant/ui}/form/prompthistory.d.ts +3 -0
  338. package/src/aiassistant/ui/form/prompthistory.js +23 -0
  339. package/src/{ui → aiassistant/ui}/showaiassistantcommand.d.ts +2 -2
  340. package/src/aiassistant/ui/showaiassistantcommand.js +23 -0
  341. package/src/{utils → aiassistant/utils}/common-translations.d.ts +1 -1
  342. package/src/{utils → aiassistant/utils}/common-translations.js +1 -1
  343. package/src/{utils → aiassistant/utils}/normalizecommandsconfig.d.ts +2 -2
  344. package/src/{utils → aiassistant/utils}/normalizecommandsconfig.js +1 -1
  345. package/src/aiballoon/aiballoon.d.ts +72 -0
  346. package/src/aiballoon/aiballoon.js +23 -0
  347. package/src/aiballoon/ui/aiballoondisclaimerview.d.ts +17 -0
  348. package/src/aiballoon/ui/aiballoondisclaimerview.js +23 -0
  349. package/src/aiballoon/ui/aiballoontoolbarview.d.ts +31 -0
  350. package/src/aiballoon/ui/aiballoontoolbarview.js +23 -0
  351. package/src/aiballoon/ui/aiballoonview.d.ts +109 -0
  352. package/src/aiballoon/ui/aiballoonview.js +23 -0
  353. package/src/aichat/aichat.d.ts +79 -0
  354. package/src/aichat/aichat.js +23 -0
  355. package/src/aichat/aichatcontroller.d.ts +68 -0
  356. package/src/aichat/aichatcontroller.js +23 -0
  357. package/src/aichat/aichatui.d.ts +297 -0
  358. package/src/aichat/aichatui.js +23 -0
  359. package/src/aichat/model/aichatcontext.d.ts +360 -0
  360. package/src/aichat/model/aichatcontext.js +23 -0
  361. package/src/aichat/model/aichatconversation.d.ts +270 -0
  362. package/src/aichat/model/aichatconversation.js +23 -0
  363. package/src/aichat/model/aichatinteraction.d.ts +46 -0
  364. package/src/aichat/model/aichatinteraction.js +23 -0
  365. package/src/aichat/model/aichatmodels.d.ts +77 -0
  366. package/src/aichat/model/aichatmodels.js +23 -0
  367. package/src/aichat/ui/aichatcontrolsview.d.ts +98 -0
  368. package/src/aichat/ui/aichatcontrolsview.js +23 -0
  369. package/src/aichat/ui/aichatfeedview.d.ts +114 -0
  370. package/src/aichat/ui/aichatfeedview.js +23 -0
  371. package/src/aichat/ui/aichatheaderview.d.ts +29 -0
  372. package/src/aichat/ui/aichatheaderview.js +23 -0
  373. package/src/aichat/ui/aichatview.d.ts +37 -0
  374. package/src/aichat/ui/aichatview.js +23 -0
  375. package/src/aichat/ui/controls/aichatchipsoverflowmanager.d.ts +71 -0
  376. package/src/aichat/ui/controls/aichatchipsoverflowmanager.js +23 -0
  377. package/src/aichat/ui/controls/aichatcontextitembuttonview.d.ts +46 -0
  378. package/src/aichat/ui/controls/aichatcontextitembuttonview.js +23 -0
  379. package/src/aichat/ui/controls/aichatcontextpanelurlinputview.d.ts +89 -0
  380. package/src/aichat/ui/controls/aichatcontextpanelurlinputview.js +23 -0
  381. package/src/aichat/ui/controls/aichatcontextpanelview.d.ts +105 -0
  382. package/src/aichat/ui/controls/aichatcontextpanelview.js +23 -0
  383. package/src/aichat/ui/controls/aichatcontrolsloaderview.d.ts +12 -0
  384. package/src/aichat/ui/controls/aichatcontrolsloaderview.js +23 -0
  385. package/src/aichat/ui/controls/aichatpromptcapabilitiesview.d.ts +89 -0
  386. package/src/aichat/ui/controls/aichatpromptcapabilitiesview.js +23 -0
  387. package/src/aichat/ui/controls/aichatpromptinputview.d.ts +44 -0
  388. package/src/aichat/ui/controls/aichatpromptinputview.js +23 -0
  389. package/src/aichat/ui/controls/aichatpromptsuggestionslistview.d.ts +17 -0
  390. package/src/aichat/ui/controls/aichatpromptsuggestionslistview.js +23 -0
  391. package/src/aichat/ui/controls/resources/aichatresourcelistitemview.d.ts +61 -0
  392. package/src/aichat/ui/controls/resources/aichatresourcelistitemview.js +23 -0
  393. package/src/aichat/ui/controls/resources/aichatresourcesballoonview.d.ts +100 -0
  394. package/src/aichat/ui/controls/resources/aichatresourcesballoonview.js +23 -0
  395. package/src/aichat/ui/controls/resources/aichatresourceslistview.d.ts +49 -0
  396. package/src/aichat/ui/controls/resources/aichatresourceslistview.js +23 -0
  397. package/src/aichat/ui/controls/resources/aichatresourcessearchinputview.d.ts +61 -0
  398. package/src/aichat/ui/controls/resources/aichatresourcessearchinputview.js +23 -0
  399. package/src/aichat/ui/controls/resources/aichatresourcesview.d.ts +54 -0
  400. package/src/aichat/ui/controls/resources/aichatresourcesview.js +23 -0
  401. package/src/aichat/ui/feed/aichatfeedcontextchipsview.d.ts +27 -0
  402. package/src/aichat/ui/feed/aichatfeedcontextchipsview.js +23 -0
  403. package/src/aichat/ui/feed/aichatfeederroritemview.d.ts +39 -0
  404. package/src/aichat/ui/feed/aichatfeederroritemview.js +23 -0
  405. package/src/aichat/ui/feed/aichatfeedinteractionheaderview.d.ts +29 -0
  406. package/src/aichat/ui/feed/aichatfeedinteractionheaderview.js +23 -0
  407. package/src/aichat/ui/feed/aichatfeeditemview.d.ts +46 -0
  408. package/src/aichat/ui/feed/aichatfeeditemview.js +23 -0
  409. package/src/aichat/ui/feed/aichatfeedreplyitemview.d.ts +46 -0
  410. package/src/aichat/ui/feed/aichatfeedreplyitemview.js +23 -0
  411. package/src/aichat/ui/feed/aichatfeedsuggestionitemactionsview.d.ts +74 -0
  412. package/src/aichat/ui/feed/aichatfeedsuggestionitemactionsview.js +23 -0
  413. package/src/aichat/ui/feed/aichatfeedsuggestionitemview.d.ts +74 -0
  414. package/src/aichat/ui/feed/aichatfeedsuggestionitemview.js +23 -0
  415. package/src/aichat/ui/feed/aichatfeedusermessageitem.d.ts +40 -0
  416. package/src/aichat/ui/feed/aichatfeedusermessageitem.js +23 -0
  417. package/src/aichat/utils/eventnames.d.ts +5 -0
  418. package/src/aichat/utils/eventnames.js +23 -0
  419. package/src/aichat/utils/promisequeue.d.ts +32 -0
  420. package/src/aichat/utils/promisequeue.js +23 -0
  421. package/src/aichat/utils/scrollmanager.d.ts +23 -0
  422. package/src/aichat/utils/scrollmanager.js +23 -0
  423. package/src/aichathistory/aichathistory.d.ts +30 -0
  424. package/src/aichathistory/aichathistory.js +23 -0
  425. package/src/aichathistory/aichathistorycontroller.d.ts +40 -0
  426. package/src/aichathistory/aichathistorycontroller.js +23 -0
  427. package/src/aichathistory/aichathistoryui.d.ts +112 -0
  428. package/src/aichathistory/aichathistoryui.js +23 -0
  429. package/src/aichathistory/model/aichathistoryconversations.d.ts +114 -0
  430. package/src/aichathistory/model/aichathistoryconversations.js +23 -0
  431. package/src/aichathistory/model/aichathistoryitem.d.ts +59 -0
  432. package/src/aichathistory/model/aichathistoryitem.js +23 -0
  433. package/src/aichathistory/ui/aichathistorylistitemview.d.ts +42 -0
  434. package/src/aichathistory/ui/aichathistorylistitemview.js +23 -0
  435. package/src/aichathistory/ui/aichathistorylistview.d.ts +31 -0
  436. package/src/aichathistory/ui/aichathistorylistview.js +23 -0
  437. package/src/aichathistory/ui/aichathistorysectionlistview.d.ts +17 -0
  438. package/src/aichathistory/ui/aichathistorysectionlistview.js +23 -0
  439. package/src/aichathistory/ui/aichathistoryview.d.ts +41 -0
  440. package/src/aichathistory/ui/aichathistoryview.js +23 -0
  441. package/src/aiconfig.d.ts +92 -30
  442. package/src/aicore/aiconnector.d.ts +302 -0
  443. package/src/aicore/aiconnector.js +23 -0
  444. package/src/aicore/aiediting.d.ts +61 -0
  445. package/src/aicore/aiediting.js +23 -0
  446. package/src/aicore/model/aicapabilities.d.ts +55 -0
  447. package/src/aicore/model/aicapabilities.js +23 -0
  448. package/src/aicore/model/aicontext.d.ts +53 -0
  449. package/src/aicore/model/aicontext.js +23 -0
  450. package/src/aicore/model/aiinteraction.d.ts +135 -0
  451. package/src/aicore/model/aiinteraction.js +23 -0
  452. package/src/aicore/model/aireply.d.ts +178 -0
  453. package/src/aicore/model/aireply.js +23 -0
  454. package/src/aicore/pipeline/airesponseapplier.d.ts +291 -0
  455. package/src/aicore/pipeline/airesponseapplier.js +24 -0
  456. package/src/aicore/pipeline/airesponseparser.d.ts +27 -0
  457. package/src/aicore/pipeline/airesponseparser.js +24 -0
  458. package/src/aicore/ui/aidisclaimerview.d.ts +17 -0
  459. package/src/aicore/ui/aidisclaimerview.js +23 -0
  460. package/src/aicore/ui/aiskeleton.d.ts +37 -0
  461. package/src/aicore/ui/aiskeleton.js +23 -0
  462. package/src/aicore/ui/aispinner.d.ts +14 -0
  463. package/src/aicore/ui/aispinner.js +23 -0
  464. package/src/aicore/ui/suggestioncontainer/aiminitoolbarview.d.ts +62 -0
  465. package/src/aicore/ui/suggestioncontainer/aiminitoolbarview.js +23 -0
  466. package/src/aicore/ui/suggestioncontainer/aisuggestionbodyview.d.ts +38 -0
  467. package/src/aicore/ui/suggestioncontainer/aisuggestionbodyview.js +23 -0
  468. package/src/aicore/ui/suggestioncontainer/aisuggestioncontainerview.d.ts +80 -0
  469. package/src/aicore/ui/suggestioncontainer/aisuggestioncontainerview.js +23 -0
  470. package/src/aicore/ui/suggestioncontainer/aisuggestioncontentpartview.d.ts +39 -0
  471. package/src/aicore/ui/suggestioncontainer/aisuggestioncontentpartview.js +23 -0
  472. package/src/aicore/ui/suggestioncontainer/aisuggestionheaderview.d.ts +39 -0
  473. package/src/aicore/ui/suggestioncontainer/aisuggestionheaderview.js +23 -0
  474. package/src/aicore/utils/common-translations.d.ts +9 -0
  475. package/src/aicore/utils/common-translations.js +23 -0
  476. package/src/aicore/utils/createresizebutton.d.ts +12 -0
  477. package/src/aicore/utils/createresizebutton.js +23 -0
  478. package/src/aicore/utils/documentposition.d.ts +41 -0
  479. package/src/aicore/utils/documentposition.js +23 -0
  480. package/src/aicore/utils/documentrange.d.ts +46 -0
  481. package/src/aicore/utils/documentrange.js +23 -0
  482. package/src/aicore/utils/eventnames.d.ts +9 -0
  483. package/src/aicore/utils/eventnames.js +23 -0
  484. package/src/aicore/utils/geteditorfromcontext.d.ts +6 -0
  485. package/src/aicore/utils/geteditorfromcontext.js +23 -0
  486. package/src/aicore/utils/getoperationsfromreply.d.ts +21 -0
  487. package/src/aicore/utils/getoperationsfromreply.js +23 -0
  488. package/src/aicore/utils/getsuggestionpartsfromreply.d.ts +19 -0
  489. package/src/aicore/utils/getsuggestionpartsfromreply.js +23 -0
  490. package/src/aicore/utils/htmlparser.d.ts +35 -0
  491. package/src/aicore/utils/htmlparser.js +23 -0
  492. package/src/aicore/utils/htmlstreamer.d.ts +123 -0
  493. package/src/aicore/utils/htmlstreamer.js +23 -0
  494. package/src/aiquickactions/aiquickactions.d.ts +41 -0
  495. package/src/aiquickactions/aiquickactions.js +23 -0
  496. package/src/aiquickactions/aiquickactionscommand.d.ts +12 -0
  497. package/src/aiquickactions/aiquickactionscommand.js +23 -0
  498. package/src/aiquickactions/aiquickactionsediting.d.ts +23 -0
  499. package/src/aiquickactions/aiquickactionsediting.js +23 -0
  500. package/src/aiquickactions/aiquickactionsui.d.ts +150 -0
  501. package/src/aiquickactions/aiquickactionsui.js +23 -0
  502. package/src/aiquickactions/ui/aiquickactionsbuttoncreator.d.ts +30 -0
  503. package/src/aiquickactions/ui/aiquickactionsbuttoncreator.js +23 -0
  504. package/src/aiquickactions/ui/aiquickactionsdropdowncontentview.d.ts +45 -0
  505. package/src/aiquickactions/ui/aiquickactionsdropdowncontentview.js +23 -0
  506. package/src/aiquickactions/ui/aiquickactionsdropdowncreator.d.ts +45 -0
  507. package/src/aiquickactions/ui/aiquickactionsdropdowncreator.js +23 -0
  508. package/src/aiquickactions/utils/common-translations.d.ts +9 -0
  509. package/src/aiquickactions/utils/common-translations.js +23 -0
  510. package/src/aireviewmode/aireviewmode.d.ts +30 -0
  511. package/src/aireviewmode/aireviewmode.js +23 -0
  512. package/src/aireviewmode/aireviewmodecontroller.d.ts +32 -0
  513. package/src/aireviewmode/aireviewmodecontroller.js +23 -0
  514. package/src/aireviewmode/aireviewmodeediting.d.ts +129 -0
  515. package/src/aireviewmode/aireviewmodeediting.js +23 -0
  516. package/src/aireviewmode/aireviewmodeui.d.ts +73 -0
  517. package/src/aireviewmode/aireviewmodeui.js +23 -0
  518. package/src/aireviewmode/model/aireviewcheck.d.ts +60 -0
  519. package/src/aireviewmode/model/aireviewcheck.js +23 -0
  520. package/src/aireviewmode/model/aireviewcheckcustom.d.ts +17 -0
  521. package/src/aireviewmode/model/aireviewcheckcustom.js +23 -0
  522. package/src/aireviewmode/model/aireviewchecklist.d.ts +31 -0
  523. package/src/aireviewmode/model/aireviewchecklist.js +23 -0
  524. package/src/aireviewmode/model/aireviewcheckresult.d.ts +39 -0
  525. package/src/aireviewmode/model/aireviewcheckresult.js +23 -0
  526. package/src/aireviewmode/model/aireviewcheckresultchange.d.ts +42 -0
  527. package/src/aireviewmode/model/aireviewcheckresultchange.js +23 -0
  528. package/src/aireviewmode/model/aireviewcheckrun.d.ts +102 -0
  529. package/src/aireviewmode/model/aireviewcheckrun.js +23 -0
  530. package/src/aireviewmode/model/aireviewcustomcheckrun.d.ts +18 -0
  531. package/src/aireviewmode/model/aireviewcustomcheckrun.js +23 -0
  532. package/src/aireviewmode/model/aireviewmodels.d.ts +26 -0
  533. package/src/aireviewmode/model/aireviewmodels.js +23 -0
  534. package/src/aireviewmode/model/aireviewsystemcheckrun.d.ts +14 -0
  535. package/src/aireviewmode/model/aireviewsystemcheckrun.js +23 -0
  536. package/src/aireviewmode/ui/aireviemodepromptinputview.d.ts +29 -0
  537. package/src/aireviewmode/ui/aireviemodepromptinputview.js +23 -0
  538. package/src/aireviewmode/ui/aireviewmodechecklistitemresultview.d.ts +46 -0
  539. package/src/aireviewmode/ui/aireviewmodechecklistitemresultview.js +23 -0
  540. package/src/aireviewmode/ui/aireviewmodecustomcheckview.d.ts +23 -0
  541. package/src/aireviewmode/ui/aireviewmodecustomcheckview.js +23 -0
  542. package/src/aireviewmode/ui/aireviewmodereviewchecklistview.d.ts +23 -0
  543. package/src/aireviewmode/ui/aireviewmodereviewchecklistview.js +23 -0
  544. package/src/aireviewmode/ui/aireviewmodereviewcheckresultsview.d.ts +80 -0
  545. package/src/aireviewmode/ui/aireviewmodereviewcheckresultsview.js +23 -0
  546. package/src/aireviewmode/ui/aireviewmodereviewcommandlistitemview.d.ts +45 -0
  547. package/src/aireviewmode/ui/aireviewmodereviewcommandlistitemview.js +23 -0
  548. package/src/aireviewmode/ui/aireviewmodereviewcompletedview.d.ts +18 -0
  549. package/src/aireviewmode/ui/aireviewmodereviewcompletedview.js +23 -0
  550. package/src/aireviewmode/ui/aireviewmodeview.d.ts +42 -0
  551. package/src/aireviewmode/ui/aireviewmodeview.js +23 -0
  552. package/src/aireviewmode/ui/form/aireviewmodeformamanager.d.ts +16 -0
  553. package/src/aireviewmode/ui/form/aireviewmodeformamanager.js +23 -0
  554. package/src/aireviewmode/ui/form/aireviewmodeformdropdown.d.ts +20 -0
  555. package/src/aireviewmode/ui/form/aireviewmodeformdropdown.js +23 -0
  556. package/src/aireviewmode/ui/form/aireviewmodeformmanager.d.ts +16 -0
  557. package/src/aireviewmode/ui/form/aireviewmodeformmanager.js +23 -0
  558. package/src/aireviewmode/utils/common-translations.d.ts +9 -0
  559. package/src/aireviewmode/utils/common-translations.js +23 -0
  560. package/src/aitabs/aitabs.d.ts +92 -0
  561. package/src/aitabs/aitabs.js +23 -0
  562. package/src/aitabs/aitabsmainview.d.ts +45 -0
  563. package/src/aitabs/aitabsmainview.js +23 -0
  564. package/src/aitabs/tabs/aitabsview.d.ts +147 -0
  565. package/src/aitabs/tabs/aitabsview.js +23 -0
  566. package/src/aitabs/tabs/tabbuttonview.d.ts +47 -0
  567. package/src/aitabs/tabs/tabbuttonview.js +23 -0
  568. package/src/aitabs/tabs/tabpanelview.d.ts +44 -0
  569. package/src/aitabs/tabs/tabpanelview.js +23 -0
  570. package/src/augmentation.d.ts +22 -6
  571. package/src/index.d.ts +40 -9
  572. package/src/index.js +1 -1
  573. package/theme/aiballoon/aiballoon.css +207 -0
  574. package/theme/aichat/aichat-controls/aichat-context-chip.css +139 -0
  575. package/theme/aichat/aichat-controls/aichat-context-controls-balloon-panels.css +194 -0
  576. package/theme/aichat/aichat-controls/aichat-context-controls.css +46 -0
  577. package/theme/aichat/aichat-controls/aichat-controls-button.css +74 -0
  578. package/theme/aichat/aichat-controls/aichat-controls-loader.css +93 -0
  579. package/theme/aichat/aichat-controls/prompt-capabilities.css +46 -0
  580. package/theme/aichat/aichat-controls/prompt-input.css +55 -0
  581. package/theme/aichat/aichat-controls.css +154 -0
  582. package/theme/aichat/aichat.css +68 -0
  583. package/theme/aichat/aichatfeed.css +376 -0
  584. package/theme/aichat/aichathistory.css +235 -0
  585. package/theme/aichat/aiminitoolbar.css +94 -0
  586. package/theme/aichat/aisuggestioncontainer.css +203 -0
  587. package/theme/aiquickactions/aiquickactions.css +43 -0
  588. package/theme/aireviewmode/aireviewmode-check-list.css +255 -0
  589. package/theme/aireviewmode/aireviewmode-check-run.css +202 -0
  590. package/theme/aireviewmode/aireviewmode-review-completed.css +52 -0
  591. package/theme/aireviewmode/aireviewmode.css +73 -0
  592. package/theme/aitabs/aitabsview.css +64 -0
  593. package/theme/aitabs/tabs/tabbuttonview.css +74 -0
  594. package/theme/aitabs/tabs/tabsview.css +78 -0
  595. package/theme/common/aibutton.css +145 -0
  596. package/theme/common/aichaterror.css +61 -0
  597. package/theme/common/aidisclaimer.css +29 -0
  598. package/theme/common/aiheader.css +88 -0
  599. package/theme/common/aiskeleton.css +54 -0
  600. package/theme/common/aispinner.css +58 -0
  601. package/src/adapters/aiadapter.js +0 -23
  602. package/src/adapters/aitextadapter.js +0 -23
  603. package/src/adapters/awstextadapter.js +0 -23
  604. package/src/adapters/openaitextadapter.js +0 -23
  605. package/src/aiassistant.js +0 -23
  606. package/src/aiassistantediting.js +0 -23
  607. package/src/aiassistantui.js +0 -23
  608. package/src/ui/aiassistantcontroller.js +0 -24
  609. package/src/ui/form/aiformcontentarea.js +0 -23
  610. package/src/ui/form/aiformerrorview.js +0 -23
  611. package/src/ui/form/aiformpromptview.js +0 -23
  612. package/src/ui/form/aiformtoolbarview.js +0 -23
  613. package/src/ui/form/aiformview.js +0 -23
  614. package/src/ui/form/aihistorylistitemview.js +0 -23
  615. package/src/ui/form/aihistorylistview.js +0 -23
  616. package/src/ui/form/prompthistory.js +0 -23
  617. package/src/ui/showaiassistantcommand.js +0 -23
  618. /package/src/{aiassistantediting.d.ts → aiassistant/aiassistantediting.d.ts} +0 -0
  619. /package/src/{legacyerrors.d.ts → aiassistant/legacyerrors.d.ts} +0 -0
  620. /package/src/{ui → aiassistant/ui}/form/aiformerrorview.d.ts +0 -0
  621. /package/theme/{ai-dropdown.css → aiassistant/ai-dropdown.css} +0 -0
  622. /package/theme/{ai-form.css → aiassistant/ai-form.css} +0 -0
  623. /package/theme/{ai.css → aiassistant/ai.css} +0 -0
@@ -0,0 +1,48 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
+ import { type Editor, Plugin } from 'ckeditor5/src/core.js';
6
+ import { type AIActionsNames, AIConnector } from '../aicore/aiconnector.js';
7
+ import { Dialog } from 'ckeditor5/src/ui.js';
8
+ import { AIEditing } from '../aicore/aiediting.js';
9
+ import { AIActionsInteraction } from './model/aiactionsinteraction.js';
10
+ import { AIBalloon } from '../aiballoon/aiballoon.js';
11
+ import { DocumentCompare } from '@ckeditor/ckeditor5-collaboration-core';
12
+ export declare class AIActions extends Plugin {
13
+ /**
14
+ * @inheritDoc
15
+ */
16
+ static get requires(): readonly [typeof AIConnector, typeof Dialog, typeof AIEditing, typeof AIBalloon, typeof DocumentCompare];
17
+ /**
18
+ * @inheritDoc
19
+ */
20
+ static get pluginName(): "AIActions";
21
+ /**
22
+ * @inheritDoc
23
+ */
24
+ static get isOfficialPlugin(): true;
25
+ /**
26
+ * @inheritDoc
27
+ */
28
+ static get isPremiumPlugin(): true;
29
+ /**
30
+ * The busy state of the AI actions.
31
+ *
32
+ * It is set to `true` when there are AI response being streamed or rendered.
33
+ *
34
+ * @observable
35
+ */
36
+ isBusy: boolean;
37
+ constructor(editor: Editor);
38
+ stopInteraction(): void;
39
+ get previousInteractions(): ReadonlyArray<AIActionsInteraction>;
40
+ executeAction(action: AIActionDefinition, label: string, icon?: string): Promise<void>;
41
+ private _createInteraction;
42
+ }
43
+ export type AIActionDefinition = {
44
+ actionName?: AIActionsNames;
45
+ args?: Record<string, string>;
46
+ userMessage?: string;
47
+ model?: string;
48
+ };
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
+ *
4
+ *
5
+ *
6
+ *
7
+ * +---------------------------------------------------------------------------------+
8
+ * | |
9
+ * | Hello stranger! |
10
+ * | |
11
+ * | |
12
+ * | What you're currently looking at is the source code of a legally protected, |
13
+ * | proprietary software. Any attempts to deobfuscate / disassemble this code |
14
+ * | are forbidden and will result in legal consequences. |
15
+ * | |
16
+ * | |
17
+ * +---------------------------------------------------------------------------------+
18
+ *
19
+ *
20
+ *
21
+ *
22
+ */
23
+ const _0x4f9369=_0x4cdc;function _0x2e1e(){const _0x3c2295=['44NUlAqS','requires','_wrapWithCommonAncestors','93422zxVdXy','documentContextContent','_setupCustomViews','304KeLDNI','hasPendingParts','stop','_customViews','_balloonShowDiff','getFirstPosition','clearLoading','_applyOperationsAsSuggestions','updateContent','13632410RITpQE','toggleSuggestionDisplayMode','_clearLoadingState','_isAbortError','icon','close','processor','interactionFinished','_insertSuggestion','schema','replyContentUpdated','3517602vDswcS','replies','AIBalloon','root','isOfficialPlugin','isCollapsed','batch','data','message','catch','plugins','insertSuggestion','showLoader','694kjxJpE','getOperations','remove','first','addOperation','document','locale','isEnabled','previousInteractions','getSelectedContent','isBusy','model','getCommonAncestor','287465XoHsGr','1912MJJlvn','balloonView','startsWith','push','random','change','getDocumentContext','map','6973875XCRGge','set','add','Error\x20refreshing\x20interaction:','Error\x20updating\x20content\x20in\x20toggleSuggestionDisplayMode:','Error\x20updating\x20content\x20in\x20replyCreated:','_children','Error\x20clearing\x20loading\x20state\x20in\x20interactionFinished:','warn','AIConnector','replyCreated','bodyView','pluginName','_clearInteractionHistory','setSelection','_applySuggestion','_interaction','stickiness','history','_clone','stopInteraction','getSelectionAsFragment','toData','documentFragment','listenTo','_currentInteractionParams','AI_ACTIONS_TRY_AGAIN','getAncestors','modelToViewWithIds','executeAction','get','getFirstRange','TrackChangesEditing','static','queueEmptyPromise','_aiConnector','slice','_clearSuggestionContent','end','focus','_anchorOperation','isPremiumPlugin','_appendChild','ai-request-aborted','getLimitElement','selection','_promiseQueue','error','_stopInteraction','_setLoadingState','TableSelection','Error\x20updating\x20content\x20in\x20replyContentUpdated:','731238kNlaYb','abort','baseVersion','_createInteraction','dialogClosed','getSelectedTableCells','changeGroups','path','No\x20current\x20interaction\x20to\x20refresh','_previousInteractions','ck-ai-custom-action-button','_executeActionOnTable','streaming','has','hideLoader','getSelectedBlocks','version','_executeActionRegular','main','applySuggestion','enqueue','getRanges','open','_refreshInteraction','execute','start','operationsA','applyOperation','setLoading','stopListening','length','editor','bind','AIActions'];_0x2e1e=function(){return _0x3c2295;};return _0x2e1e();}(function(_0x34bed7,_0x23af8a){const _0x118a2f=_0x4cdc,_0x1508cd=_0x34bed7();while(!![]){try{const _0x44b820=-parseInt(_0x118a2f(0x148))/0x1*(parseInt(_0x118a2f(0x156))/0x2)+-parseInt(_0x118a2f(0x192))/0x3+-parseInt(_0x118a2f(0x1b4))/0x4*(-parseInt(_0x118a2f(0x155))/0x5)+parseInt(_0x118a2f(0x13b))/0x6+parseInt(_0x118a2f(0x1b7))/0x7*(-parseInt(_0x118a2f(0x1ba))/0x8)+-parseInt(_0x118a2f(0x15e))/0x9+parseInt(_0x118a2f(0x1c3))/0xa;if(_0x44b820===_0x23af8a)break;else _0x1508cd['push'](_0x1508cd['shift']());}catch(_0x1da5ed){_0x1508cd['push'](_0x1508cd['shift']());}}}(_0x2e1e,0x5fdfa));import{Plugin as _0x5bab14}from'ckeditor5/src/core.js';import{AIConnector as _0xc47357}from'../aicore/aiconnector.js';import{AISuggestionContainerView as _0x5f0984}from'../aicore/ui/suggestioncontainer/aisuggestioncontainerview.js';import{Dialog as _0x5cf98a,ButtonView as _0x46b6d7,ViewCollection as _0x1ddbdf}from'ckeditor5/src/ui.js';function _0x4cdc(_0x5c0242,_0x284cf4){const _0x2e1e41=_0x2e1e();return _0x4cdc=function(_0x4cdc5a,_0x1f42a5){_0x4cdc5a=_0x4cdc5a-0x137;let _0x1e4d5e=_0x2e1e41[_0x4cdc5a];return _0x1e4d5e;},_0x4cdc(_0x5c0242,_0x284cf4);}import{AIEditing as _0x37e486}from'../aicore/aiediting.js';import{AIActionsInteraction as _0x5a44ec}from'./model/aiactionsinteraction.js';import{first as _0x3eeb44}from'ckeditor5/src/utils.js';import{IconAIQuickActions as _0x1bd575,IconRefresh as _0x18195f}from'@ckeditor/ckeditor5-icons';import{AIBalloon as _0x47a004}from'../aiballoon/aiballoon.js';import{PromiseQueue as _0xbd35e9}from'../aichat/utils/promisequeue.js';import{getTranslation as _0x4c2821}from'../aicore/utils/common-translations.js';import{getSuggestionPartsFromReply as _0x5346e3}from'../aicore/utils/getsuggestionpartsfromreply.js';import{DocumentCompare as _0x18b629}from'@ckeditor/ckeditor5-collaboration-core';import{getOperationsFromReply as _0x9fddd}from'../aicore/utils/getoperationsfromreply.js';import{ModelDocumentFragment as _0x569879,ModelRange as _0x442a49,ModelPosition as _0x5920ae,transformOperationSets as _0x73d500}from'ckeditor5/src/engine.js';export class AIActions extends _0x5bab14{static get[_0x4f9369(0x1b5)](){return[_0xc47357,_0x5cf98a,_0x37e486,_0x47a004,_0x18b629];}static get[_0x4f9369(0x16a)](){const _0x556230=_0x4f9369;return _0x556230(0x1b3);}static get[_0x4f9369(0x13f)](){return!0x0;}static get[_0x4f9369(0x187)](){return!0x0;}[_0x4f9369(0x181)];[_0x4f9369(0x19b)]=[];[_0x4f9369(0x177)];[_0x4f9369(0x1be)]=!0x1;[_0x4f9369(0x1bd)]=new _0x1ddbdf();[_0x4f9369(0x18c)];constructor(_0x49b3c0){const _0x2089cf=_0x4f9369;super(_0x49b3c0),this[_0x2089cf(0x181)]=this[_0x2089cf(0x1b1)][_0x2089cf(0x145)][_0x2089cf(0x17c)](_0x2089cf(0x167)),this[_0x2089cf(0x15f)](_0x2089cf(0x152),!0x1),this[_0x2089cf(0x18c)]=new _0xbd35e9(),this[_0x2089cf(0x1b9)]();}[_0x4f9369(0x172)](){const _0x390765=_0x4f9369;this[_0x390765(0x18e)]();}get[_0x4f9369(0x150)](){const _0x11cb55=_0x4f9369;return this[_0x11cb55(0x19b)];}async[_0x4f9369(0x17b)](_0x12faab,_0x17026f,_0x5c0a26){const _0x1988b1=_0x4f9369;if(this[_0x1988b1(0x1b1)][_0x1988b1(0x145)][_0x1988b1(0x19f)](_0x1988b1(0x190))){if(this[_0x1988b1(0x1b1)][_0x1988b1(0x145)][_0x1988b1(0x17c)](_0x1988b1(0x190))[_0x1988b1(0x197)]())return this[_0x1988b1(0x19d)](_0x12faab,_0x17026f,_0x5c0a26);}return this[_0x1988b1(0x1a3)](_0x12faab,_0x17026f,_0x5c0a26);}[_0x4f9369(0x1a3)](_0x4d45e7,_0x25d8db,_0x11c798){const _0x5e6df1=_0x4f9369,_0x1ce33f=this[_0x5e6df1(0x1b1)][_0x5e6df1(0x145)][_0x5e6df1(0x17c)](_0x37e486),_0x3cb06a=this[_0x5e6df1(0x1b1)][_0x5e6df1(0x145)][_0x5e6df1(0x17c)](_0x47a004),_0x222a50=this[_0x5e6df1(0x1b1)][_0x5e6df1(0x153)][_0x5e6df1(0x14d)][_0x5e6df1(0x18b)];if(_0x222a50[_0x5e6df1(0x140)]){const _0xaaaf78=_0x3eeb44(_0x222a50[_0x5e6df1(0x1a1)]())||this[_0x5e6df1(0x1b1)][_0x5e6df1(0x153)][_0x5e6df1(0x139)][_0x5e6df1(0x18a)](_0x222a50);this[_0x5e6df1(0x1b1)][_0x5e6df1(0x153)][_0x5e6df1(0x15b)](_0x3b1c92=>{const _0x3339f2=_0x5e6df1;_0x3b1c92[_0x3339f2(0x16c)](_0xaaaf78,'in');});}const _0x4dadc8=this[_0x5e6df1(0x1b6)](this[_0x5e6df1(0x1b1)][_0x5e6df1(0x153)][_0x5e6df1(0x151)](_0x222a50),_0x222a50),_0x1f9a1b=_0x1ce33f[_0x5e6df1(0x17a)](_0x4dadc8),_0x16c9d5=this[_0x5e6df1(0x1b1)][_0x5e6df1(0x142)][_0x5e6df1(0x1c9)][_0x5e6df1(0x174)](_0x1f9a1b),_0x92dab=this[_0x5e6df1(0x1b1)][_0x5e6df1(0x153)][_0x5e6df1(0x14d)][_0x5e6df1(0x1a2)],_0x34739e=[..._0x222a50[_0x5e6df1(0x1a7)]()],_0x2c4b33=new _0x5f0984(this[_0x5e6df1(0x1b1)][_0x5e6df1(0x14e)],{'showDiff':!0x1,'areActionsDisabled':!0x1,'hideHeader':!0x0,'showLoader':!0x0,'miniToolbarConfig':{'showChanges':_0x5e6df1(0x1c7),'customView':this[_0x5e6df1(0x1bd)]}});_0x3cb06a[_0x5e6df1(0x1a8)]({'index':0x3e8*Math[_0x5e6df1(0x15a)]()%0x3e8,'title':_0x25d8db,'icon':_0x11c798||_0x1bd575,'mainView':_0x2c4b33,'showRotator':!0x1,'showApplyButton':!0x0,'showSuggestButton':!0x0,'ranges':_0x34739e}),this[_0x5e6df1(0x18f)](_0x2c4b33,_0x3cb06a);const _0x4a7f77=_0x222a50[_0x5e6df1(0x1bf)]();return this[_0x5e6df1(0x176)](_0x3cb06a,_0x5e6df1(0x1a5),()=>{const _0x465e71=_0x5e6df1;this[_0x465e71(0x16d)](_0x4a7f77);}),this[_0x5e6df1(0x176)](_0x3cb06a,_0x5e6df1(0x146),()=>{const _0x5d880c=_0x5e6df1;this[_0x5d880c(0x138)](_0x4a7f77);}),this[_0x5e6df1(0x176)](_0x3cb06a,_0x5e6df1(0x196),()=>{const _0x11a360=_0x5e6df1;this[_0x11a360(0x18e)](),this[_0x11a360(0x16b)](),this[_0x11a360(0x1af)](_0x3cb06a);}),this[_0x5e6df1(0x195)](_0x16c9d5,_0x92dab,_0x2c4b33,_0x3cb06a,_0x4d45e7);}[_0x4f9369(0x19d)](_0x4b3193,_0x137cf0,_0x3f9a49){const _0xec8048=_0x4f9369,_0x39dbc0=this[_0xec8048(0x1b1)][_0xec8048(0x145)][_0xec8048(0x17c)](_0x37e486),_0x260e8b=this[_0xec8048(0x1b1)][_0xec8048(0x145)][_0xec8048(0x17c)](_0x47a004),_0xd1e42=this[_0xec8048(0x1b1)][_0xec8048(0x153)][_0xec8048(0x14d)][_0xec8048(0x18b)],_0x3f4d5b=this[_0xec8048(0x1b1)][_0xec8048(0x145)][_0xec8048(0x17c)](_0xec8048(0x190))[_0xec8048(0x173)](),_0x5e830d=_0x39dbc0[_0xec8048(0x17a)](_0x3f4d5b),_0x5737bb=this[_0xec8048(0x1b1)][_0xec8048(0x142)][_0xec8048(0x1c9)][_0xec8048(0x174)](_0x5e830d),_0x184e99=this[_0xec8048(0x1b1)][_0xec8048(0x153)][_0xec8048(0x14d)][_0xec8048(0x1a2)],_0x2a8b0d=[..._0xd1e42[_0xec8048(0x1a7)]()],_0x1ee904=new _0x5f0984(this[_0xec8048(0x1b1)][_0xec8048(0x14e)],{'showDiff':!0x1,'areActionsDisabled':!0x1,'hideHeader':!0x0,'showLoader':!0x0,'miniToolbarConfig':{'showChanges':_0xec8048(0x1c7),'customView':this[_0xec8048(0x1bd)]}});_0x260e8b[_0xec8048(0x1a8)]({'index':0x0,'title':_0x137cf0,'icon':_0x3f9a49||_0x1bd575,'mainView':_0x1ee904,'showRotator':!0x1,'showApplyButton':!0x0,'showSuggestButton':!0x0,'ranges':_0x2a8b0d}),this[_0xec8048(0x18f)](_0x1ee904,_0x260e8b);const _0x5d13f1=_0xd1e42[_0xec8048(0x1bf)]();return this[_0xec8048(0x176)](_0x260e8b,_0xec8048(0x1a5),()=>{const _0x35a627=_0xec8048;this[_0x35a627(0x16d)](_0x5d13f1);}),this[_0xec8048(0x176)](_0x260e8b,_0xec8048(0x146),()=>{const _0x24b8b9=_0xec8048;this[_0x24b8b9(0x138)](_0x5d13f1);}),this[_0xec8048(0x176)](_0x260e8b,_0xec8048(0x196),()=>{const _0x10a0c5=_0xec8048;this[_0x10a0c5(0x18c)][_0x10a0c5(0x193)](),this[_0x10a0c5(0x152)]=!0x1,this[_0x10a0c5(0x1af)](_0x260e8b);}),this[_0xec8048(0x195)](_0x5737bb,_0x184e99,_0x1ee904,_0x260e8b,_0x4b3193);}[_0x4f9369(0x1b6)](_0x501cc0,_0xb03c8f){const _0x462f6a=_0x4f9369,_0x52edca=_0xb03c8f[_0x462f6a(0x17d)]()[_0x462f6a(0x154)](),_0x37b633=_0x52edca['is'](_0x462f6a(0x175))?[]:_0x52edca[_0x462f6a(0x179)]({'includeSelf':!0x0})[_0x462f6a(0x182)](0x1);if(_0x37b633[_0x462f6a(0x1b0)]){const _0x3b1c47=_0x37b633[_0x462f6a(0x15d)](_0xe4a9d5=>_0xe4a9d5[_0x462f6a(0x171)](!0x1));for(let _0x1d586e=0x1;_0x1d586e<_0x3b1c47[_0x462f6a(0x1b0)];_0x1d586e++)_0x3b1c47[_0x1d586e-0x1][_0x462f6a(0x188)](_0x3b1c47[_0x1d586e]);return _0x3b1c47[_0x3b1c47[_0x462f6a(0x1b0)]-0x1][_0x462f6a(0x188)](_0x501cc0),new _0x569879(_0x3b1c47[0x0]);}return _0x501cc0;}async[_0x4f9369(0x195)](_0x79e3c,_0x19c12b,_0x4e5352,_0x151e4e,_0x5e9b4d){const _0x38e405=_0x4f9369,_0x270a93=this[_0x38e405(0x1b1)];this[_0x38e405(0x177)]={'action':_0x5e9b4d,'content':_0x79e3c,'version':_0x19c12b,'mainView':_0x4e5352,'aiBalloon':_0x151e4e},this[_0x38e405(0x16e)]=new _0x5a44ec({'connector':this[_0x38e405(0x181)],'editor':_0x270a93,'content':_0x79e3c,'version':_0x19c12b,..._0x5e9b4d});const _0x53efa4=(_0x4ab83f,_0x3df3b0,_0x44be24=!0x1,_0x4f1802=_0x38e405(0x19e))=>this[_0x38e405(0x18c)][_0x38e405(0x1a6)](async _0x4320c6=>{const _0x4f82e7=_0x38e405;try{const _0x235eb0=_0x5346e3({'editor':_0x270a93,'changeGroups':_0x4ab83f[_0x4f82e7(0x198)],'documentContextContent':_0x4ab83f[_0x4f82e7(0x1b8)],'showDiff':_0x44be24,'trimUnchanged':!0x1});await _0x3df3b0[_0x4f82e7(0x1c2)]({'parts':_0x235eb0,'renderingStrategy':_0x4f1802,'abortSignal':_0x4320c6});}catch(_0x167101){if(this[_0x4f82e7(0x1c6)](_0x167101))return;throw _0x167101;}});this[_0x38e405(0x16e)]['on'](_0x38e405(0x168),(_0x28bc2f,_0x1c418a)=>{const _0x1f101d=_0x38e405;_0x4e5352[_0x1f101d(0x1a0)](),_0x53efa4(_0x1c418a,_0x4e5352)[_0x1f101d(0x144)](_0x3bd847=>{const _0x342b6d=_0x1f101d;this[_0x342b6d(0x1c6)](_0x3bd847)||console[_0x342b6d(0x18d)](_0x342b6d(0x163),_0x3bd847);});}),this[_0x38e405(0x16e)]['on'](_0x38e405(0x13a),(_0x437d77,_0x41db48)=>{const _0x4fa0d1=_0x38e405;_0x53efa4(_0x41db48,_0x4e5352)[_0x4fa0d1(0x144)](_0x4bb8d4=>{const _0x593cf1=_0x4fa0d1;this[_0x593cf1(0x1c6)](_0x4bb8d4)||console[_0x593cf1(0x18d)](_0x593cf1(0x191),_0x4bb8d4);});}),this[_0x38e405(0x16e)]['on'](_0x38e405(0x137),async()=>{const _0x1a11e0=_0x38e405;try{await this[_0x1a11e0(0x1c5)](_0x4e5352,_0x151e4e);}catch(_0x156227){this[_0x1a11e0(0x1c6)](_0x156227)||console[_0x1a11e0(0x18d)](_0x1a11e0(0x165),_0x156227);}}),this[_0x38e405(0x176)](_0x4e5352,_0x38e405(0x1c4),(_0x398379,{showDiff:_0x341010})=>{const _0x5b5254=_0x38e405;this[_0x5b5254(0x1be)]=_0x341010;const _0x4ab293=this[_0x5b5254(0x16e)][_0x5b5254(0x13c)][this[_0x5b5254(0x16e)][_0x5b5254(0x13c)][_0x5b5254(0x1b0)]-0x1];_0x4ab293&&_0x53efa4(_0x4ab293,_0x4e5352,_0x341010,_0x5b5254(0x17f))[_0x5b5254(0x144)](_0x19d19a=>{const _0x42c89b=_0x5b5254;this[_0x42c89b(0x1c6)](_0x19d19a)||console[_0x42c89b(0x18d)](_0x42c89b(0x162),_0x19d19a);});}),this[_0x38e405(0x18f)](_0x4e5352,_0x151e4e);try{return await this[_0x38e405(0x16e)][_0x38e405(0x1ab)]();}catch(_0x43c8ce){if(this[_0x38e405(0x1c6)](_0x43c8ce))return;throw _0x43c8ce;}}[_0x4f9369(0x138)](_0x77d1ee){const _0x3e8a76=_0x4f9369,_0x4ebd8d=this[_0x3e8a76(0x1b1)],_0x270e9e=this[_0x3e8a76(0x1b1)][_0x3e8a76(0x145)][_0x3e8a76(0x17c)](_0x18b629),_0x20a3a0=this[_0x3e8a76(0x16e)],_0x3b9e8c=this[_0x3e8a76(0x16e)][_0x3e8a76(0x13c)][this[_0x3e8a76(0x16e)][_0x3e8a76(0x13c)][_0x3e8a76(0x1b0)]-0x1],_0x2e5ed7=_0x3b9e8c[_0x3e8a76(0x198)],_0x19e469=_0x9fddd({'editor':_0x4ebd8d,'reply':_0x3b9e8c,'interaction':_0x20a3a0,'groups':_0x2e5ed7,'transform':!0x1,'documentCompare':_0x270e9e,'documentCompareOptions':{'anchor':_0x3e8a76(0x1a4),'markDeletions':!0x0}});for(const _0x32354b of _0x19e469)this[_0x3e8a76(0x186)](_0x77d1ee,_0x32354b);const _0x3b6e70=_0x20a3a0[_0x3e8a76(0x15c)]()[_0x3e8a76(0x1a2)],_0x5a398d=_0x4ebd8d[_0x3e8a76(0x153)][_0x3e8a76(0x14d)][_0x3e8a76(0x170)][_0x3e8a76(0x149)](_0x3b6e70),_0x20dbc6={'document':_0x4ebd8d[_0x3e8a76(0x153)][_0x3e8a76(0x14d)],'useRelations':!0x1,'padWithNoOps':!0x1},_0x47a224=_0x73d500(_0x19e469,_0x5a398d,_0x20dbc6)[_0x3e8a76(0x1ac)];_0x4ebd8d[_0x3e8a76(0x153)][_0x3e8a76(0x15b)](_0x543177=>{const _0x3a30c4=_0x3e8a76;_0x543177[_0x3a30c4(0x16c)](_0x4ebd8d[_0x3a30c4(0x153)][_0x3a30c4(0x14d)][_0x3a30c4(0x18b)][_0x3a30c4(0x185)]),_0x4ebd8d[_0x3a30c4(0x145)][_0x3a30c4(0x17c)](_0x3a30c4(0x17e))[_0x3a30c4(0x1c1)](_0x47a224);}),this[_0x3e8a76(0x1b1)][_0x3e8a76(0x145)][_0x3e8a76(0x17c)](_0x3e8a76(0x13d))[_0x3e8a76(0x1c8)]();}[_0x4f9369(0x16d)](_0x2dfe5e){const _0x5db3fd=_0x4f9369,_0x3488f5=this[_0x5db3fd(0x1b1)],_0x3bd51a=this[_0x5db3fd(0x1b1)][_0x5db3fd(0x145)][_0x5db3fd(0x17c)](_0x18b629),_0x544828=this[_0x5db3fd(0x16e)],_0x5e0246=this[_0x5db3fd(0x16e)][_0x5db3fd(0x13c)][this[_0x5db3fd(0x16e)][_0x5db3fd(0x13c)][_0x5db3fd(0x1b0)]-0x1],_0x14235d=_0x5e0246[_0x5db3fd(0x198)],_0x4d4909=_0x9fddd({'editor':_0x3488f5,'reply':_0x5e0246,'interaction':_0x544828,'groups':_0x14235d,'transform':!0x1,'documentCompare':_0x3bd51a,'documentCompareOptions':{'anchor':_0x5db3fd(0x1a4),'markDeletions':!0x1}});for(const _0x1c1c74 of _0x4d4909)this[_0x5db3fd(0x186)](_0x2dfe5e,_0x1c1c74);const _0x15ac6a=_0x544828[_0x5db3fd(0x15c)]()[_0x5db3fd(0x1a2)],_0x2bd5a1=_0x3488f5[_0x5db3fd(0x153)][_0x5db3fd(0x14d)][_0x5db3fd(0x170)][_0x5db3fd(0x149)](_0x15ac6a),_0x31aa72={'document':_0x3488f5[_0x5db3fd(0x153)][_0x5db3fd(0x14d)],'useRelations':!0x1,'padWithNoOps':!0x1},_0x513a9d=_0x73d500(_0x4d4909,_0x2bd5a1,_0x31aa72)[_0x5db3fd(0x1ac)];_0x3488f5[_0x5db3fd(0x153)][_0x5db3fd(0x15b)](_0x6bd8a3=>{const _0x49bd1d=_0x5db3fd;_0x6bd8a3[_0x49bd1d(0x16c)](_0x3488f5[_0x49bd1d(0x153)][_0x49bd1d(0x14d)][_0x49bd1d(0x18b)][_0x49bd1d(0x185)]);for(const _0xc838df of _0x513a9d)_0xc838df[_0x49bd1d(0x194)]=_0x3488f5[_0x49bd1d(0x153)][_0x49bd1d(0x14d)][_0x49bd1d(0x1a2)],_0x6bd8a3[_0x49bd1d(0x141)][_0x49bd1d(0x14c)](_0xc838df),_0x3488f5[_0x49bd1d(0x153)][_0x49bd1d(0x1ad)](_0xc838df);}),this[_0x5db3fd(0x1b1)][_0x5db3fd(0x145)][_0x5db3fd(0x17c)](_0x5db3fd(0x13d))[_0x5db3fd(0x1c8)]();}[_0x4f9369(0x186)](_0x37de19,_0x2dc36c){const _0x200ccc=_0x4f9369;for(const _0x55b82d in _0x2dc36c){const _0x4a64af=_0x2dc36c[_0x55b82d];_0x4a64af instanceof _0x442a49?_0x2dc36c[_0x55b82d]=new _0x442a49(_0x17f385(_0x4a64af[_0x200ccc(0x1ab)]),_0x17f385(_0x4a64af[_0x200ccc(0x184)])):_0x4a64af instanceof _0x5920ae&&(_0x2dc36c[_0x55b82d]=_0x17f385(_0x4a64af));}function _0x17f385(_0x5567e3){const _0x523bb4=_0x200ccc;if(_0x5567e3[_0x523bb4(0x13e)]!=_0x37de19[_0x523bb4(0x13e)])return _0x5567e3;const _0x121e3b=_0x5567e3[_0x523bb4(0x199)][_0x523bb4(0x182)]();for(let _0x405ff0=0x0;_0x405ff0<_0x37de19[_0x523bb4(0x199)][_0x523bb4(0x1b0)]&&_0x405ff0<_0x121e3b[_0x523bb4(0x1b0)];_0x405ff0++){const _0x2fce0f=0x0!=_0x121e3b[_0x405ff0];if(_0x121e3b[_0x405ff0]+=_0x37de19[_0x523bb4(0x199)][_0x405ff0],_0x2fce0f)break;}return new _0x5920ae(_0x5567e3[_0x523bb4(0x13e)],_0x121e3b,_0x5567e3[_0x523bb4(0x16f)]);}}[_0x4f9369(0x1a9)](){const _0x5dc595=_0x4f9369;if(!this[_0x5dc595(0x177)])return void console[_0x5dc595(0x166)](_0x5dc595(0x19a));this[_0x5dc595(0x16e)]&&(this[_0x5dc595(0x19b)][_0x5dc595(0x159)](this[_0x5dc595(0x16e)]),this[_0x5dc595(0x18e)]());const {action:_0x7857a5,content:_0x126693,version:_0x1e4931,mainView:_0x461639,aiBalloon:_0x3e175b}=this[_0x5dc595(0x177)];this[_0x5dc595(0x183)](_0x461639),_0x461639[_0x5dc595(0x147)](),this[_0x5dc595(0x195)](_0x126693,_0x1e4931,_0x461639,_0x3e175b,_0x7857a5)[_0x5dc595(0x144)](_0x50f0c4=>{const _0x218a41=_0x5dc595;this[_0x218a41(0x1c6)](_0x50f0c4)||console[_0x218a41(0x18d)](_0x218a41(0x161),_0x50f0c4);});}[_0x4f9369(0x183)](_0x44d2e5){const _0x4df233=_0x4f9369,_0x5b9452=_0x44d2e5[_0x4df233(0x169)][_0x4df233(0x164)];for(;_0x5b9452[_0x4df233(0x1b0)]>0x0;)_0x5b9452[_0x4df233(0x14a)](_0x5b9452[_0x4df233(0x14b)]);_0x44d2e5[_0x4df233(0x169)][_0x4df233(0x1bb)]=!0x1;}[_0x4f9369(0x1c6)](_0x84772b){const _0x557e1e=_0x4f9369;return!!_0x84772b[_0x557e1e(0x143)]&&_0x84772b[_0x557e1e(0x143)][_0x557e1e(0x158)](_0x557e1e(0x189));}[_0x4f9369(0x16b)](){const _0x5918d8=_0x4f9369;this[_0x5918d8(0x19b)]=[],this[_0x5918d8(0x177)]=void 0x0;}[_0x4f9369(0x18e)](){const _0x9acd59=_0x4f9369;this[_0x9acd59(0x16e)]&&this[_0x9acd59(0x16e)][_0x9acd59(0x1bc)](),this[_0x9acd59(0x18c)][_0x9acd59(0x193)](),this[_0x9acd59(0x152)]=!0x1;}[_0x4f9369(0x1b9)](){const _0x524a25=_0x4f9369,_0x20527d=new _0x46b6d7(this[_0x524a25(0x1b1)][_0x524a25(0x14e)]);_0x20527d[_0x524a25(0x15f)]({'icon':_0x18195f,'label':_0x4c2821(this[_0x524a25(0x1b1)][_0x524a25(0x14e)],_0x524a25(0x178)),'tooltip':!0x0,'class':_0x524a25(0x19c)}),_0x20527d[_0x524a25(0x1b2)](_0x524a25(0x14f))['to'](this,_0x524a25(0x152),_0x3d4efa=>!_0x3d4efa),_0x20527d['on'](_0x524a25(0x1aa),()=>{const _0x20fa1e=_0x524a25;this[_0x20fa1e(0x1a9)]();}),this[_0x524a25(0x1bd)][_0x524a25(0x160)](_0x20527d);}[_0x4f9369(0x18f)](_0x5beedc,_0x4e547c){const _0x4bb256=_0x4f9369;_0x5beedc[_0x4bb256(0x1ae)](),_0x4e547c[_0x4bb256(0x157)][_0x4bb256(0x1ae)](),this[_0x4bb256(0x152)]=!0x0;}async[_0x4f9369(0x1c5)](_0x2bc05b,_0x75605c){const _0x3c19f8=_0x4f9369;await this[_0x3c19f8(0x18c)][_0x3c19f8(0x180)],this[_0x3c19f8(0x152)]=!0x1,_0x2bc05b[_0x3c19f8(0x1c0)](),_0x75605c[_0x3c19f8(0x157)][_0x3c19f8(0x1c0)]();}}
@@ -0,0 +1,48 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
+ import { AIInteraction, type AIInteractionOptions } from '../../aicore/model/aiinteraction.js';
6
+ import { type AIActionsNames, type AIConnectorRequest } from '../../aicore/aiconnector.js';
7
+ import { type AIContextItem } from '../../aicore/model/aicontext.js';
8
+ import { AIActionsReply } from './aiactionsreply.js';
9
+ import { type AIActionDefinition } from '../aiactions.js';
10
+ export declare class AIActionsInteraction extends AIInteraction {
11
+ /**
12
+ * The content of the document for the command to refer to.
13
+ */
14
+ readonly content: string;
15
+ /**
16
+ * The version of the document the content was extracted from.
17
+ */
18
+ readonly version: number;
19
+ /**
20
+ * The name of the action to execute. Specified only for predefined actions.
21
+ */
22
+ readonly actionName?: AIActionsNames;
23
+ /**
24
+ * The arguments to pass to the action. Specified only for predefined actions.
25
+ */
26
+ readonly args?: Record<string, string>;
27
+ /**
28
+ * The user message that was sent to the AI endpoint. Specified only for custom actions.
29
+ */
30
+ readonly userMessage?: string;
31
+ /**
32
+ * The model of the command. Specified only for custom actions.
33
+ */
34
+ readonly model?: string;
35
+ constructor(options: AIActionsInteractionOptions);
36
+ sendRequest(): Promise<AIConnectorRequest>;
37
+ getDocumentContext(): AIContextItem | undefined;
38
+ /**
39
+ * Override createReply to use the same content that was sent to AI for comparison.
40
+ * This ensures we compare AI response against the selection, not the entire document.
41
+ * Uses AIActionsReply for single suggestion without context.
42
+ */
43
+ createReply(options: ConstructorParameters<typeof AIActionsReply>[0]): AIActionsReply;
44
+ }
45
+ export type AIActionsInteractionOptions = {
46
+ content: string;
47
+ version: number;
48
+ } & AIActionDefinition & AIInteractionOptions;
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
+ *
4
+ *
5
+ *
6
+ *
7
+ * +---------------------------------------------------------------------------------+
8
+ * | |
9
+ * | Hello stranger! |
10
+ * | |
11
+ * | |
12
+ * | What you're currently looking at is the source code of a legally protected, |
13
+ * | proprietary software. Any attempts to deobfuscate / disassemble this code |
14
+ * | are forbidden and will result in legal consequences. |
15
+ * | |
16
+ * | |
17
+ * +---------------------------------------------------------------------------------+
18
+ *
19
+ *
20
+ *
21
+ *
22
+ */
23
+ const _0x4ed9c6=_0x249e;(function(_0x3f4958,_0x56a630){const _0x92a7b1=_0x249e,_0x262d6e=_0x3f4958();while(!![]){try{const _0x25d029=-parseInt(_0x92a7b1(0x99))/0x1+-parseInt(_0x92a7b1(0x96))/0x2+parseInt(_0x92a7b1(0x94))/0x3+-parseInt(_0x92a7b1(0x95))/0x4+-parseInt(_0x92a7b1(0x93))/0x5+-parseInt(_0x92a7b1(0xa1))/0x6*(parseInt(_0x92a7b1(0xa7))/0x7)+-parseInt(_0x92a7b1(0xa2))/0x8*(-parseInt(_0x92a7b1(0xa0))/0x9);if(_0x25d029===_0x56a630)break;else _0x262d6e['push'](_0x262d6e['shift']());}catch(_0x1f90a4){_0x262d6e['push'](_0x262d6e['shift']());}}}(_0x1c4b,0xd20b6));import{AIInteraction as _0xfd8f1f,AI_MODEL_EVENT_NAMES as _0x1b6a76}from'../../aicore/model/aiinteraction.js';import{AIContextItemType as _0x512c5e}from'../../aicore/model/aicontext.js';function _0x249e(_0x1982e9,_0x1be8b7){const _0x1c4bbd=_0x1c4b();return _0x249e=function(_0x249eb5,_0x1b91be){_0x249eb5=_0x249eb5-0x92;let _0x22572a=_0x1c4bbd[_0x249eb5];return _0x22572a;},_0x249e(_0x1982e9,_0x1be8b7);}function _0x1c4b(){const _0x500c3a=['1443778JYiixd','fire','delegate','1575575MzBOSf','actionName','current-document','connector','getDocumentContext','args','version','328815oBKGVl','2016eJOMpP','1448SkydnP','executeAction','userMessage','replies','TEXT','34769OgYUnO','sendRequest','push','editor','createReply','html','model','replyCreated','executeCustomAction','content','Current\x20document','8546695pbSQHz','4683549kxIiSl','6551844lmkUVz'];_0x1c4b=function(){return _0x500c3a;};return _0x1c4b();}import{AIActionsReply as _0x1ab751}from'./aiactionsreply.js';export class AIActionsInteraction extends _0xfd8f1f{[_0x4ed9c6(0xb0)];[_0x4ed9c6(0x9f)];[_0x4ed9c6(0x9a)];[_0x4ed9c6(0x9e)];[_0x4ed9c6(0xa4)];[_0x4ed9c6(0xad)];constructor(_0x13a3e5){const _0x248451=_0x4ed9c6;super(_0x13a3e5),this[_0x248451(0xb0)]=_0x13a3e5[_0x248451(0xb0)],this[_0x248451(0x9f)]=_0x13a3e5[_0x248451(0x9f)],this[_0x248451(0x9a)]=_0x13a3e5[_0x248451(0x9a)],this[_0x248451(0x9e)]=_0x13a3e5[_0x248451(0x9e)],this[_0x248451(0xa4)]=_0x13a3e5[_0x248451(0xa4)],this[_0x248451(0xad)]=_0x13a3e5[_0x248451(0xad)];}async[_0x4ed9c6(0xa8)](){const _0x3e3d74=_0x4ed9c6;return this[_0x3e3d74(0x9a)]?this[_0x3e3d74(0x9c)][_0x3e3d74(0xa3)]({'content':this[_0x3e3d74(0xb0)],'actionName':this[_0x3e3d74(0x9a)],'args':this[_0x3e3d74(0x9e)]}):this[_0x3e3d74(0x9c)][_0x3e3d74(0xaf)]({'content':this[_0x3e3d74(0xb0)],'message':this[_0x3e3d74(0xa4)],'model':this[_0x3e3d74(0xad)],'outputFormat':_0x3e3d74(0xac)});}[_0x4ed9c6(0x9d)](){const _0x5a6be6=_0x4ed9c6;return{'type':_0x512c5e[_0x5a6be6(0xa6)],'content':this[_0x5a6be6(0xb0)],'version':this[_0x5a6be6(0x9f)],'label':_0x5a6be6(0x92),'uiId':_0x5a6be6(0x9b)};}[_0x4ed9c6(0xab)](_0x5278d2){const _0x3fa498=_0x4ed9c6,_0x39380b=new _0x1ab751({'editor':this[_0x3fa498(0xaa)],'documentContextContent':this[_0x3fa498(0xb0)],..._0x5278d2});return this[_0x3fa498(0xa5)][_0x3fa498(0xa9)](_0x39380b),_0x39380b[_0x3fa498(0x98)](..._0x1b6a76)['to'](this),this[_0x3fa498(0x97)](_0x3fa498(0xae),_0x39380b),_0x39380b;}}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
+ /**
6
+ * @module ai/aiactions/model/aiactionsreply
7
+ */
8
+ import { AIReply } from '../../aicore/model/aireply.js';
9
+ /**
10
+ * Represents a reply from the AI endpoint specifically for AI Actions.
11
+ * This class handles the unique behavior needed for AI Actions mode,
12
+ * where suggestions are presented as single change groups without context merging.
13
+ */
14
+ export declare class AIActionsReply extends AIReply {
15
+ }
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
+ *
4
+ *
5
+ *
6
+ *
7
+ * +---------------------------------------------------------------------------------+
8
+ * | |
9
+ * | Hello stranger! |
10
+ * | |
11
+ * | |
12
+ * | What you're currently looking at is the source code of a legally protected, |
13
+ * | proprietary software. Any attempts to deobfuscate / disassemble this code |
14
+ * | are forbidden and will result in legal consequences. |
15
+ * | |
16
+ * | |
17
+ * +---------------------------------------------------------------------------------+
18
+ *
19
+ *
20
+ *
21
+ *
22
+ */
23
+ function _0x4087(){const _0x5c4b47=['20123379bCBOYv','8409mELceA','children','ai-actions-content','updateChangeGroups','11692816tDrbJi','changeGroups','3188912BBITnK','data-id','7IPoQUL','23975ZZcVyZ','cloneNode','parsedContent','push','pending','length','254dCGmFR','parsedMergedContent','4717686KtgQHS','1201277pofteN','modified'];_0x4087=function(){return _0x5c4b47;};return _0x4087();}const _0x294fe1=_0x3e22;(function(_0x3a9695,_0x302b95){const _0x3f7a55=_0x3e22,_0x477b07=_0x3a9695();while(!![]){try{const _0x5cd801=parseInt(_0x3f7a55(0xf4))/0x1+parseInt(_0x3f7a55(0x106))/0x2*(parseInt(_0x3f7a55(0xf7))/0x3)+-parseInt(_0x3f7a55(0xfd))/0x4+-parseInt(_0x3f7a55(0x100))/0x5+-parseInt(_0x3f7a55(0xf3))/0x6*(-parseInt(_0x3f7a55(0xff))/0x7)+parseInt(_0x3f7a55(0xfb))/0x8+-parseInt(_0x3f7a55(0xf6))/0x9;if(_0x5cd801===_0x302b95)break;else _0x477b07['push'](_0x477b07['shift']());}catch(_0x1269a4){_0x477b07['push'](_0x477b07['shift']());}}}(_0x4087,0xbb4d3));import{AIReply as _0x1e3443}from'../../aicore/model/aireply.js';function _0x3e22(_0x5a41ec,_0x177d6d){const _0x4087ba=_0x4087();return _0x3e22=function(_0x3e22cf,_0x3c4fe7){_0x3e22cf=_0x3e22cf-0xf2;let _0x48fb8c=_0x4087ba[_0x3e22cf];return _0x48fb8c;},_0x3e22(_0x5a41ec,_0x177d6d);}import{isTag as _0x82331f,getAttribute as _0x50a0ed}from'../../aicore/utils/htmlparser.js';export class AIActionsReply extends _0x1e3443{[_0x294fe1(0xfa)](){const _0x5c38ed=_0x294fe1;if(this[_0x5c38ed(0xf2)]=this[_0x5c38ed(0x102)][_0x5c38ed(0x101)](!0x0),this[_0x5c38ed(0x102)][_0x5c38ed(0xf8)][_0x5c38ed(0x105)]>0x0){const _0x35b2a3=[];for(const _0x3b21b2 of this[_0x5c38ed(0x102)][_0x5c38ed(0xf8)])if(_0x82331f(_0x3b21b2)){const _0x52149a=_0x50a0ed(_0x3b21b2,_0x5c38ed(0xfe));_0x52149a&&_0x35b2a3[_0x5c38ed(0x103)]({'node':_0x3b21b2,'type':_0x5c38ed(0xf5),'id':_0x52149a});}_0x35b2a3[_0x5c38ed(0x105)]>0x0?this[_0x5c38ed(0xfc)]=[{'changes':_0x35b2a3,'state':_0x5c38ed(0x104),'index':0x0}]:this[_0x5c38ed(0xfc)]=[{'changes':[{'node':this[_0x5c38ed(0x102)][_0x5c38ed(0xf8)][0x0],'type':_0x5c38ed(0xf5),'id':_0x5c38ed(0xf9)}],'state':_0x5c38ed(0x104),'index':0x0}];}else this[_0x5c38ed(0xfc)]=[];}}
@@ -3,7 +3,7 @@
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */
5
5
  /**
6
- * @module ai/adapters/aiadapter
6
+ * @module ai/aiassistant/adapters/aiadapter
7
7
  * @publicApi
8
8
  */
9
9
  import { Plugin } from 'ckeditor5/src/core.js';
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
+ *
4
+ *
5
+ *
6
+ *
7
+ * +---------------------------------------------------------------------------------+
8
+ * | |
9
+ * | Hello stranger! |
10
+ * | |
11
+ * | |
12
+ * | What you're currently looking at is the source code of a legally protected, |
13
+ * | proprietary software. Any attempts to deobfuscate / disassemble this code |
14
+ * | are forbidden and will result in legal consequences. |
15
+ * | |
16
+ * | |
17
+ * +---------------------------------------------------------------------------------+
18
+ *
19
+ *
20
+ *
21
+ *
22
+ */
23
+ var _0x43f2f1=_0x40ff;(function(_0x4bf591,_0x5961bb){var _0x374bdc=_0x40ff,_0x5bbdc3=_0x4bf591();while(!![]){try{var _0x294d12=-parseInt(_0x374bdc(0x16b))/0x1+parseInt(_0x374bdc(0x171))/0x2*(-parseInt(_0x374bdc(0x173))/0x3)+parseInt(_0x374bdc(0x176))/0x4*(-parseInt(_0x374bdc(0x166))/0x5)+-parseInt(_0x374bdc(0x170))/0x6*(-parseInt(_0x374bdc(0x16d))/0x7)+-parseInt(_0x374bdc(0x167))/0x8+-parseInt(_0x374bdc(0x172))/0x9+parseInt(_0x374bdc(0x16a))/0xa*(parseInt(_0x374bdc(0x174))/0xb);if(_0x294d12===_0x5961bb)break;else _0x5bbdc3['push'](_0x5bbdc3['shift']());}catch(_0x41cf43){_0x5bbdc3['push'](_0x5bbdc3['shift']());}}}(_0x8967,0xb486a));function _0x8967(){var _0x33930d=['8065vVqTLj','8592920gSRIUO','aiadapter-text-adapter-not-set','pluginName','30nwMxEa','23725JehEBa','AIAdapter','7ofeJrD','AIRequestError','textAdapter','8836998XPyIIg','188334HBONxd','3669561oeETQQ','9AtNZIb','5463997XXBMdc','afterInit','1080pCvpzB','isPremiumPlugin','name','isOfficialPlugin'];_0x8967=function(){return _0x33930d;};return _0x8967();}import{Plugin as _0x1e1dde}from'ckeditor5/src/core.js';function _0x40ff(_0x4cac9f,_0x2a72d6){var _0x89674f=_0x8967();return _0x40ff=function(_0x40ffa4,_0x2e60a7){_0x40ffa4=_0x40ffa4-0x165;var _0x22987a=_0x89674f[_0x40ffa4];return _0x22987a;},_0x40ff(_0x4cac9f,_0x2a72d6);}import{CKEditorError as _0x15cd1f}from'ckeditor5/src/utils.js';export class AIAdapter extends _0x1e1dde{static get[_0x43f2f1(0x169)](){var _0x2d2252=_0x43f2f1;return _0x2d2252(0x16c);}static get[_0x43f2f1(0x165)](){return!0x0;}static get[_0x43f2f1(0x177)](){return!0x0;}[_0x43f2f1(0x175)](){var _0x149b64=_0x43f2f1;if(!this[_0x149b64(0x16f)])throw new _0x15cd1f(_0x149b64(0x168),null);}}export class AIRequestError extends Error{constructor(_0x334bae){var _0x2a3c18=_0x43f2f1;super(_0x334bae),this[_0x2a3c18(0x178)]=_0x2a3c18(0x16e);}}
@@ -3,7 +3,7 @@
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */
5
5
  /**
6
- * @module ai/adapters/aitextadapter
6
+ * @module ai/aiassistant/adapters/aitextadapter
7
7
  * @publicApi
8
8
  */
9
9
  import { Plugin } from 'ckeditor5/src/core.js';
@@ -12,10 +12,10 @@ import { AIAdapter } from './aiadapter.js';
12
12
  * Abstract base class for AI adapters that perform text-related requests.
13
13
  *
14
14
  * Concrete AI text adapter implementation plugin, after loaded by the editor, will set itself as
15
- * {@link module:ai/adapters/aiadapter~AIAdapter#textAdapter `AIAdapter#textAdapter`}.
15
+ * {@link module:ai/aiassistant/adapters/aiadapter~AIAdapter#textAdapter `AIAdapter#textAdapter`}.
16
16
  *
17
17
  * Then, features making text-related AI requests will use that concrete adapter through
18
- * {@link module:ai/adapters/aitextadapter~AITextAdapter#makeRequest `AIAdapter#textAdapter#makeRequest()`}.
18
+ * {@link module:ai/aiassistant/adapters/aitextadapter~AITextAdapter#makeRequest `AIAdapter#textAdapter#makeRequest()`}.
19
19
  *
20
20
  * You can create your own adapter that may connect to any model by extending this abstract class.
21
21
  */
@@ -52,8 +52,8 @@ export declare abstract class AITextAdapter extends Plugin {
52
52
  *
53
53
  * Implements basic error handling for errors thrown by `sendRequest()`:
54
54
  *
55
- * * {@link module:ai/adapters/aiadapter~AIRequestError `AIRequestError`} is re-thrown, and it is expected to be handled by the feature
56
- * that made the request (e.g. by displaying some error notification).
55
+ * * {@link module:ai/aiassistant/adapters/aiadapter~AIRequestError `AIRequestError`} is re-thrown, and it is expected
56
+ * to be handled by the feature that made the request (e.g. by displaying some error notification).
57
57
  * * {@link module:utils/ckeditorerror~CKEditorError `CKEditorError`} is unexpected, is logged to the console, and re-thrown.
58
58
  * * `'AbortError'` is expected and is silenced. It is thrown when the request is aborted and does not need to be handled.
59
59
  *
@@ -114,8 +114,8 @@ export type AITextAdapterRequestData = {
114
114
  * This way, you can perform an authorization request to your application and receive the authorization token (and also implement
115
115
  * any custom logic on the back-end side). The headers object is then used to make the actual call to the AI service.
116
116
  *
117
- * The function is passed {@link module:ai/adapters/aitextadapter~AITextAdapterRequestData#actionId `actionId`} parameter to make it
118
- * possible to further customize the headers.
117
+ * The function is passed {@link module:ai/aiassistant/adapters/aitextadapter~AITextAdapterRequestData#actionId `actionId`}
118
+ * parameter to make it possible to further customize the headers.
119
119
  *
120
120
  * If the function fails for any reason, the promise should be rejected. In this case, a feature that made the request should display
121
121
  * an error notification.
@@ -131,8 +131,8 @@ export type AIRequestHeaders = Record<string, string> | ((actionId: string) => P
131
131
  * If the provided value is a function, it should be a function that returns a `Promise` which resolves with the request parameters
132
132
  * object. This gives you more flexibility to provide parameters for the AI model.
133
133
  *
134
- * The function is passed {@link module:ai/adapters/aitextadapter~AITextAdapterRequestData#actionId `actionId`} parameter to make it
135
- * possible to further customize the parameters.
134
+ * The function is passed {@link module:ai/aiassistant/adapters/aitextadapter~AITextAdapterRequestData#actionId `actionId`}
135
+ * parameter to make it possible to further customize the parameters.
136
136
  *
137
137
  * If the function fails for any reason, the promise should be rejected. In this case, the feature that made the request should display
138
138
  * an error notification.
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
+ *
4
+ *
5
+ *
6
+ *
7
+ * +---------------------------------------------------------------------------------+
8
+ * | |
9
+ * | Hello stranger! |
10
+ * | |
11
+ * | |
12
+ * | What you're currently looking at is the source code of a legally protected, |
13
+ * | proprietary software. Any attempts to deobfuscate / disassemble this code |
14
+ * | are forbidden and will result in legal consequences. |
15
+ * | |
16
+ * | |
17
+ * +---------------------------------------------------------------------------------+
18
+ *
19
+ *
20
+ *
21
+ *
22
+ */
23
+ function _0x32b1(){const _0x1a8bb0=['_prepareRequestParameters','65XUNMhY','AI_ERROR_GET_PARAMETERS','editor','assign','16gJMYPf','object','textAdapter','_prepareRequestHeaders','abort','aitextadapter-send-request-failed','catch','160hKSWiH','makeRequest','plugins','6PNKMVE','application/json','1557963VKJuVx','1964753OWDUcW','10yUEGoc','13356SAjoOF','get','init','aborted','reject','name','1769570Mavydv','resolve','error','sendRequest','AbortError','286965WRXlxo','AI_ERROR_GET_HEADERS','abortController','signal','10882XPZLqH','2420376KcrFcR','requires','locale'];_0x32b1=function(){return _0x1a8bb0;};return _0x32b1();}const _0x366777=_0xfba1;(function(_0x2a3cb6,_0x557270){const _0x53473e=_0xfba1,_0xf97ddf=_0x2a3cb6();while(!![]){try{const _0x2119e2=parseInt(_0x53473e(0xd8))/0x1*(parseInt(_0x53473e(0xd3))/0x2)+parseInt(_0x53473e(0xeb))/0x3*(-parseInt(_0x53473e(0xe3))/0x4)+parseInt(_0x53473e(0xcf))/0x5*(parseInt(_0x53473e(0xe6))/0x6)+-parseInt(_0x53473e(0xe9))/0x7+-parseInt(_0x53473e(0xdc))/0x8*(-parseInt(_0x53473e(0xe8))/0x9)+parseInt(_0x53473e(0xea))/0xa*(parseInt(_0x53473e(0xca))/0xb)+-parseInt(_0x53473e(0xd4))/0xc;if(_0x2119e2===_0x557270)break;else _0xf97ddf['push'](_0xf97ddf['shift']());}catch(_0x5ca187){_0xf97ddf['push'](_0xf97ddf['shift']());}}}(_0x32b1,0x3ee95));function _0xfba1(_0x3da167,_0x2884cf){const _0x32b168=_0x32b1();return _0xfba1=function(_0xfba1a2,_0x49a18e){_0xfba1a2=_0xfba1a2-0xc5;let _0x94eb0f=_0x32b168[_0xfba1a2];return _0x94eb0f;},_0xfba1(_0x3da167,_0x2884cf);}import{Plugin as _0x4e0f4c}from'ckeditor5/src/core.js';import{CKEditorError as _0x40f7eb}from'ckeditor5/src/utils.js';import{AIAdapter as _0x38b230,AIRequestError as _0x41f181}from'./aiadapter.js';import{getTranslation as _0x5a98b7}from'../utils/common-translations.js';export class AITextAdapter extends _0x4e0f4c{[_0x366777(0xd1)];static get[_0x366777(0xd5)](){return[_0x38b230];}constructor(_0x3c4575){const _0x16ab14=_0x366777;super(_0x3c4575),this[_0x16ab14(0xd1)]=new AbortController();}[_0x366777(0xc6)](){const _0x172eb3=_0x366777;this[_0x172eb3(0xda)][_0x172eb3(0xe5)][_0x172eb3(0xc5)](_0x38b230)[_0x172eb3(0xde)]=this;}[_0x366777(0xe0)](){const _0x181a21=_0x366777;this[_0x181a21(0xd1)][_0x181a21(0xd2)][_0x181a21(0xc7)]||(this[_0x181a21(0xd1)][_0x181a21(0xe0)](),this[_0x181a21(0xd1)]=new AbortController());}async[_0x366777(0xe4)](_0x511c1d){const _0xbe986c=_0x366777;return this[_0xbe986c(0xcd)](_0x511c1d)[_0xbe986c(0xe2)](_0x50ccc6=>{const _0x10e46c=_0xbe986c;if(_0x50ccc6 instanceof _0x41f181)return Promise[_0x10e46c(0xc8)](_0x50ccc6);if(_0x10e46c(0xce)==_0x50ccc6[_0x10e46c(0xc9)])return Promise[_0x10e46c(0xcb)]();throw console[_0x10e46c(0xcc)](_0x50ccc6),new _0x40f7eb(_0x10e46c(0xe1),null);});}async[_0x366777(0xdf)](_0x37257c,_0x31b733){const _0x11fc4f=_0x366777,_0x318aaf=this[_0x11fc4f(0xda)][_0x11fc4f(0xd6)],_0x59db50={'Content-Type':_0x11fc4f(0xe7)};if(_0x11fc4f(0xdd)==typeof _0x37257c)Object[_0x11fc4f(0xdb)](_0x59db50,_0x37257c);else{if(_0x37257c)try{const _0x315f7d=await _0x37257c(_0x31b733);Object[_0x11fc4f(0xdb)](_0x59db50,_0x315f7d);}catch{return Promise[_0x11fc4f(0xc8)](new _0x41f181(_0x5a98b7(_0x318aaf,_0x11fc4f(0xd0))));}}return _0x59db50;}async[_0x366777(0xd7)](_0x3d65d7,_0x4d1389){const _0x592fff=_0x366777,_0x34f20b=this[_0x592fff(0xda)][_0x592fff(0xd6)];if(_0x592fff(0xdd)==typeof _0x3d65d7)return _0x3d65d7;try{return await _0x3d65d7(_0x4d1389);}catch{return Promise[_0x592fff(0xc8)](new _0x41f181(_0x5a98b7(_0x34f20b,_0x592fff(0xd9))));}}}
@@ -3,7 +3,7 @@
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */
5
5
  /**
6
- * @module ai/adapters/awstextadapter
6
+ * @module ai/aiassistant/adapters/awstextadapter
7
7
  * @publicApi
8
8
  */
9
9
  import { type Editor } from 'ckeditor5/src/core.js';
@@ -12,7 +12,7 @@ import { type BedrockRuntimeClientConfig } from '@aws-sdk/client-bedrock-runtime
12
12
  /**
13
13
  * Adapter for AI text-related requests that supports the Amazon Bedrock service.
14
14
  *
15
- * See also {@link module:ai/adapters/aitextadapter~AITextAdapter}.
15
+ * See also {@link module:ai/aiassistant/adapters/aitextadapter~AITextAdapter}.
16
16
  */
17
17
  export declare class AWSTextAdapter extends AITextAdapter {
18
18
  /**
@@ -39,7 +39,8 @@ export declare class AWSTextAdapter extends AITextAdapter {
39
39
  * @param query The user's query. The instruction which the model should perform.
40
40
  * @param context The context for the instruction. Usually this will be a part of the editor content. Can be empty.
41
41
  * @param model Model that is used to perform the request.
42
- * @param actionId ID of the performed action. See {@link module:ai/adapters/aitextadapter~AITextAdapterRequestData#actionId}.
42
+ * @param actionId ID of the performed action.
43
+ * See {@link module:ai/aiassistant/adapters/aitextadapter~AITextAdapterRequestData#actionId}.
43
44
  */
44
45
  preparePrompt(query: string, context: string, model: string, actionId: string): Promise<string>;
45
46
  /**
@@ -47,22 +48,26 @@ export declare class AWSTextAdapter extends AITextAdapter {
47
48
  *
48
49
  * For example, for `anthropic.claude-instant-v1` it will return `anthropic.claude`.
49
50
  *
50
- * Throws {@link module:ai/adapters/aiadapter~AIRequestError `AIRequestError`} if a given model is not supported.
51
+ * Throws {@link module:ai/aiassistant/adapters/aiadapter~AIRequestError `AIRequestError`} if a given model is not supported.
51
52
  */
52
53
  getModelFamily(model: string): AIAWSModelFamily;
53
54
  }
54
55
  /**
55
56
  * The configuration for the Amazon Bedrock adapter.
56
57
  *
57
- * The properties defined in this configuration are set in the `config.ai.aws` namespace.
58
+ * The properties defined in this configuration are set in the `config.ai.assistant.adapter.aws` namespace.
58
59
  *
59
60
  * ```ts
60
61
  * ClassicEditor
61
62
  * .create( editorElement, {
62
63
  * ai: {
63
- * aws: {
64
- * apiUrl: 'https://url.to.your.application/ai'
65
- * }
64
+ * assistant: {
65
+ * adapter: {
66
+ * aws: {
67
+ * apiUrl: 'https://url.to.your.application/ai'
68
+ * }
69
+ * }
70
+ * }
66
71
  * }
67
72
  * } )
68
73
  * .then( ... )
@@ -95,12 +100,16 @@ export interface AIAWSTextAdapterConfig {
95
100
  * ```js
96
101
  * {
97
102
  * ai: {
98
- * aws: {
99
- * requestHeaders: {
100
- * 'Authorization': 'Bearer YOUR_API_KEY'
103
+ * assistant: {
104
+ * adapter: {
105
+ * aws: {
106
+ * requestHeaders: {
107
+ * 'Authorization': 'Bearer YOUR_API_KEY'
108
+ * }
109
+ * }
110
+ * // ...
101
111
  * }
102
112
  * }
103
- * // ...
104
113
  * }
105
114
  * }
106
115
  * ```
@@ -112,22 +121,26 @@ export interface AIAWSTextAdapterConfig {
112
121
  * ```js
113
122
  * {
114
123
  * ai: {
115
- * aws: {
116
- * requestHeaders: async () => {
117
- * const jwt = await fetch( 'https://example.com/jwt-endpoint' );
118
- *
119
- * return {
120
- * 'Authorization': 'Bearer ' + jwt
124
+ * assistant: {
125
+ * adapter: {
126
+ * aws: {
127
+ * requestHeaders: async () => {
128
+ * const jwt = await fetch( 'https://example.com/jwt-endpoint' );
129
+ *
130
+ * return {
131
+ * 'Authorization': 'Bearer ' + jwt
132
+ * }
133
+ * }
121
134
  * }
135
+ * // ...
122
136
  * }
123
137
  * }
124
- * // ...
125
138
  * }
126
139
  * }
127
140
  * ```
128
141
  *
129
- * The function is passed the {@link module:ai/adapters/aitextadapter~AITextAdapterRequestData#actionId `actionId`} parameter to make it
130
- * possible to further customize the headers.
142
+ * The function is passed the {@link module:ai/aiassistant/adapters/aitextadapter~AITextAdapterRequestData#actionId `actionId`}
143
+ * parameter to make it possible to further customize the headers.
131
144
  *
132
145
  * If the function fails for any reason, the promise should be rejected. In this case, a feature that made the request should display
133
146
  * an error notification.
@@ -147,8 +160,8 @@ export interface AIAWSTextAdapterConfig {
147
160
  * If the provided value is a function, it should be a function that returns a promise which resolves with the request parameters
148
161
  * object. This gives you more flexibility to provide parameters for the AI model.
149
162
  *
150
- * The function is passed the {@link module:ai/adapters/aitextadapter~AITextAdapterRequestData#actionId `actionId`} parameter to make it
151
- * possible to further customize the parameters.
163
+ * The function is passed the {@link module:ai/aiassistant/adapters/aitextadapter~AITextAdapterRequestData#actionId `actionId`}
164
+ * parameter to make it possible to further customize the parameters.
152
165
  *
153
166
  * If the function fails for any reason, the promise should be rejected. In this case, the feature that made the request should display
154
167
  * an error notification.
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
+ *
4
+ *
5
+ *
6
+ *
7
+ * +---------------------------------------------------------------------------------+
8
+ * | |
9
+ * | Hello stranger! |
10
+ * | |
11
+ * | |
12
+ * | What you're currently looking at is the source code of a legally protected, |
13
+ * | proprietary software. Any attempts to deobfuscate / disassemble this code |
14
+ * | are forbidden and will result in legal consequences. |
15
+ * | |
16
+ * | |
17
+ * +---------------------------------------------------------------------------------+
18
+ *
19
+ *
20
+ *
21
+ *
22
+ */
23
+ const _0x40cf8b=_0x3994;function _0x3994(_0xe99100,_0x3a1a14){const _0x5bed95=_0x5bed();return _0x3994=function(_0x399426,_0x1e4e2b){_0x399426=_0x399426-0x14d;let _0x2c2f55=_0x5bed95[_0x399426];return _0x2c2f55;},_0x3994(_0xe99100,_0x3a1a14);}(function(_0x1c5753,_0x551497){const _0x1e746e=_0x3994,_0x234133=_0x1c5753();while(!![]){try{const _0x10516e=-parseInt(_0x1e746e(0x161))/0x1*(parseInt(_0x1e746e(0x197))/0x2)+-parseInt(_0x1e746e(0x182))/0x3+parseInt(_0x1e746e(0x16a))/0x4+-parseInt(_0x1e746e(0x196))/0x5+-parseInt(_0x1e746e(0x167))/0x6+-parseInt(_0x1e746e(0x17b))/0x7+parseInt(_0x1e746e(0x158))/0x8*(parseInt(_0x1e746e(0x193))/0x9);if(_0x10516e===_0x551497)break;else _0x234133['push'](_0x234133['shift']());}catch(_0x155896){_0x234133['push'](_0x234133['shift']());}}}(_0x5bed,0xd9a09));import{AITextAdapter as _0x51d494}from'./aitextadapter.js';import{AIRequestError as _0x38afff}from'./aiadapter.js';import{BedrockRuntimeClient as _0x4daa13,InvokeModelCommand as _0x4726cf,InvokeModelWithResponseStreamCommand as _0x1ffc9f}from'@aws-sdk/client-bedrock-runtime';function _0x5bed(){const _0x27e95c=['get','_requestHeaders','2562405dSMDyn','\x0a[/INST]','\x0a<</SYS>>\x0a[INST]\x0a','_processProxyRequest','data','locale','length','filter','parse','_readStreamableResponse','pluginName','ai21.j2','POST','meta.llama','Your\x20task\x20is\x20to\x20generate\x20HTML\x20content\x20accordingly\x20to\x20the\x20given\x20instruction.\x20Never\x20include\x20<img>\x20tag\x20in\x20your\x20response\x20even\x20if\x20asked\x20for.\x20Your\x20answer\x20must\x20be\x20a\x20well-structured\x20and\x20properly\x20formatted\x20HTML\x20code.\x20Answer\x20only\x20with\x20the\x20generated\x20HTML\x20content.\x20Do\x20not\x20add\x20any\x20additional\x20remarks\x20or\x20notes.\x20Do\x20not\x20act\x20like\x20a\x20chatbot\x20or\x20a\x20real\x20person.','resolve','application/json','51111FPZmYD','_readAsyncIterableResponse','getReader','5945690YzmPXE','10UenRjo','test','_getGeneratedText','\x0a\x0aAssistant:','read','AWSTextAdapter','_processAWSRequest','AI_ERROR_UNSUPPORTED_MODEL','split','_readStaticResponse','bytes','utf-8','completion','anthropic.claude','_requestParameters','send','8104GhWgCv','getModelFamily','define','chunk','_apiUrl','Your\x20task\x20is\x20to\x20execute\x20the\x20instruction\x20using\x20the\x20provided\x20HTML\x20content.\x20Follow\x20the\x20instruction\x20closely.\x20Your\x20answer\x20must\x20be\x20a\x20properly\x20formatted\x20HTML\x20code.\x20Do\x20not\x20add\x20any\x20additional\x20remarks\x20or\x20notes.\x20Do\x20not\x20act\x20like\x20a\x20chatbot\x20or\x20a\x20real\x20person.','\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a','join','signal','86574oGzlVW','body','abortController','ai.assistant.adapter.aws.apiUrl','ai.assistant.adapter.aws.bedrockClientConfig','preparePrompt','9012906heOJCq','_prepareRequestParameters','decode','507268tTDMdD','completions','Instruction:\x0a','<<SYS>>\x0a','text','generation','ai.assistant.adapter.aws.requestHeaders','anthropic.claude-v2','stringify','map','ai.assistant.adapter.aws.requestParameters','_bedrockClientConfig','sendRequest','cohere.command','bedrock-2023-05-31','_prepareRequestHeaders','Human:\x0a','7069643TjRACe','json','config','generations','editor'];_0x5bed=function(){return _0x27e95c;};return _0x5bed();}import{getTranslation as _0x509bd2}from'../utils/common-translations.js';export class AWSTextAdapter extends _0x51d494{[_0x40cf8b(0x15c)];[_0x40cf8b(0x181)];[_0x40cf8b(0x175)];[_0x40cf8b(0x156)];static get[_0x40cf8b(0x18c)](){const _0x41823f=_0x40cf8b;return _0x41823f(0x14d);}constructor(_0x18ce29){const _0xe4486f=_0x40cf8b;super(_0x18ce29),_0x18ce29[_0xe4486f(0x17d)][_0xe4486f(0x180)](_0xe4486f(0x174))||_0x18ce29[_0xe4486f(0x17d)][_0xe4486f(0x15a)](_0xe4486f(0x174),{'model':_0xe4486f(0x171),'max_tokens_to_sample':0x7d0,'temperature':0x1,'top_p':0x1,'top_k':0xfa,'anthropic_version':_0xe4486f(0x178),'stream':!0x0}),this[_0xe4486f(0x15c)]=_0x18ce29[_0xe4486f(0x17d)][_0xe4486f(0x180)](_0xe4486f(0x164)),this[_0xe4486f(0x175)]=_0x18ce29[_0xe4486f(0x17d)][_0xe4486f(0x180)](_0xe4486f(0x165)),this[_0xe4486f(0x181)]=_0x18ce29[_0xe4486f(0x17d)][_0xe4486f(0x180)](_0xe4486f(0x170)),this[_0xe4486f(0x156)]=_0x18ce29[_0xe4486f(0x17d)][_0xe4486f(0x180)](_0xe4486f(0x174));}async[_0x40cf8b(0x176)]({query:_0x511707,context:_0x150e79,onData:_0x5a6ca4,actionId:_0x5f2bbe}){const _0x4f7614=_0x40cf8b,{model:_0x181784,stream:_0x301dd0,..._0x156267}=await this[_0x4f7614(0x168)](this[_0x4f7614(0x156)],_0x5f2bbe),_0x296cca={'prompt':await this[_0x4f7614(0x166)](_0x511707,_0x150e79,_0x181784,_0x5f2bbe),..._0x156267};this[_0x4f7614(0x15c)]?await this[_0x4f7614(0x185)](_0x296cca,_0x181784,_0x301dd0,_0x5a6ca4,_0x5f2bbe):await this[_0x4f7614(0x14e)](_0x296cca,_0x181784,_0x301dd0,_0x5a6ca4);}async[_0x40cf8b(0x166)](_0x26c711,_0xfbe2f7,_0x5b76d4,_0x11de78){const _0x482b15=_0x40cf8b;let _0x19dc79,_0x177d1b;return _0xfbe2f7?(_0x19dc79=_0x482b15(0x15d),_0x177d1b=_0x482b15(0x16c)+_0x26c711+_0x482b15(0x15e)+_0xfbe2f7):(_0x19dc79=_0x482b15(0x190),_0x177d1b=_0x26c711),_0x482b15(0x18f)==this[_0x482b15(0x159)](_0x5b76d4)?_0x482b15(0x16d)+_0x19dc79+_0x482b15(0x184)+_0x177d1b+_0x482b15(0x183):_0x482b15(0x17a)+_0x19dc79+'\x0a'+_0x177d1b+_0x482b15(0x19a);}[_0x40cf8b(0x159)](_0x2ab9a3){const _0x5452c9=_0x40cf8b;if(/^anthropic\.claude/[_0x5452c9(0x198)](_0x2ab9a3))return _0x5452c9(0x155);if(/^ai21\.j2/[_0x5452c9(0x198)](_0x2ab9a3))return _0x5452c9(0x18d);if(/^cohere\.command/[_0x5452c9(0x198)](_0x2ab9a3))return _0x5452c9(0x177);if(/^meta\.llama/[_0x5452c9(0x198)](_0x2ab9a3))return _0x5452c9(0x18f);throw new _0x38afff(_0x509bd2(this[_0x5452c9(0x17f)][_0x5452c9(0x187)],_0x5452c9(0x14f),_0x2ab9a3));}async[_0x40cf8b(0x185)](_0x6e0d9e,_0x5c6780,_0x15539b,_0x58654f,_0x438a80){const _0x6d4f54=_0x40cf8b,_0x1893d2={'method':_0x6d4f54(0x18e),'headers':await this[_0x6d4f54(0x179)](this[_0x6d4f54(0x181)],_0x438a80),'body':JSON[_0x6d4f54(0x172)]({..._0x6e0d9e,'model':_0x5c6780,'stream':_0x15539b}),'signal':this[_0x6d4f54(0x163)][_0x6d4f54(0x160)]},_0x37d5d0=await fetch(this[_0x6d4f54(0x15c)],_0x1893d2);_0x15539b?await this[_0x6d4f54(0x18b)](_0x37d5d0,_0x5c6780,_0x58654f):await this[_0x6d4f54(0x151)](_0x37d5d0,_0x5c6780,_0x58654f);}async[_0x40cf8b(0x14e)](_0x537f67,_0x25d790,_0x3c98e1,_0x25541f){const _0x57ac85=_0x40cf8b,_0x5bd9cf=new _0x4daa13(this[_0x57ac85(0x175)]),_0x244d13={'body':JSON[_0x57ac85(0x172)](_0x537f67),'contentType':_0x57ac85(0x192),'accept':_0x57ac85(0x192),'modelId':_0x25d790};let _0x34265c;if(_0x3c98e1){const _0x29f694=new _0x1ffc9f(_0x244d13);_0x34265c=await _0x5bd9cf[_0x57ac85(0x157)](_0x29f694,{'abortSignal':this[_0x57ac85(0x163)][_0x57ac85(0x160)]}),await this[_0x57ac85(0x194)](_0x34265c,_0x25d790,_0x25541f);}else{const _0xfe6f0f=new _0x4726cf(_0x244d13);_0x34265c=await _0x5bd9cf[_0x57ac85(0x157)](_0xfe6f0f,{'abortSignal':this[_0x57ac85(0x163)][_0x57ac85(0x160)]}),await this[_0x57ac85(0x151)](_0x34265c,_0x25d790,_0x25541f);}}async[_0x40cf8b(0x194)](_0x440640,_0x528194,_0x19f4b9){const _0x257381=_0x40cf8b,_0x3bbc1d=_0x440640[_0x257381(0x162)],_0x4aee33=new TextDecoder(_0x257381(0x153));let _0x3f9401='';for await(const _0x22ce66 of _0x3bbc1d)if(_0x22ce66[_0x257381(0x15b)]){const _0x5549e8=_0x4aee33[_0x257381(0x169)](_0x22ce66[_0x257381(0x15b)][_0x257381(0x152)]),_0x33e9b4=JSON[_0x257381(0x18a)](_0x5549e8);_0x3f9401+=this[_0x257381(0x199)](_0x33e9b4,_0x528194),_0x19f4b9(_0x3f9401);}return Promise[_0x257381(0x191)]();}async[_0x40cf8b(0x18b)](_0x2db239,_0x3ca0ef,_0x4e96d0){const _0x244d3a=_0x40cf8b,_0x3ceccb=_0x2db239[_0x244d3a(0x162)],_0x524217=new TextDecoder(_0x244d3a(0x153)),_0x3f8ccf=_0x3ceccb[_0x244d3a(0x195)]();let _0x257be3='',_0x56f706='',_0x3c423f=!0x1;for(;!_0x3c423f;){const {done:_0x395207,value:_0x261d76}=await _0x3f8ccf[_0x244d3a(0x19b)]();if(_0x3c423f=_0x395207,_0x3c423f)break;const _0x4859b7=(_0x257be3+_0x524217[_0x244d3a(0x169)](_0x261d76))[_0x244d3a(0x150)]('\x0a')[_0x244d3a(0x173)](_0x26d8f3=>{const _0x224f87=_0x244d3a;try{return _0x257be3='',JSON[_0x224f87(0x18a)](_0x26d8f3);}catch{return _0x257be3=_0x26d8f3,null;}})[_0x244d3a(0x189)](_0x461e8c=>null!==_0x461e8c);_0x4859b7[_0x244d3a(0x188)]&&(_0x56f706+=_0x4859b7[_0x244d3a(0x173)](_0x492a08=>this[_0x244d3a(0x199)](_0x492a08,_0x3ca0ef))[_0x244d3a(0x15f)](''),_0x4e96d0(_0x56f706));}return Promise[_0x244d3a(0x191)]();}async[_0x40cf8b(0x151)](_0x4b94c9,_0x31e95e,_0x998eb8){const _0x119a45=_0x40cf8b;let _0x21fa5e;return _0x21fa5e=_0x4b94c9 instanceof Response?await _0x4b94c9[_0x119a45(0x17c)]():JSON[_0x119a45(0x18a)](new TextDecoder(_0x119a45(0x153))[_0x119a45(0x169)](_0x4b94c9[_0x119a45(0x162)])),(_0x998eb8(this[_0x119a45(0x199)](_0x21fa5e,_0x31e95e)),Promise[_0x119a45(0x191)]());}[_0x40cf8b(0x199)](_0x22ad2f,_0x491968){const _0x173615=_0x40cf8b;switch(this[_0x173615(0x159)](_0x491968)){case _0x173615(0x155):return _0x22ad2f[_0x173615(0x154)];case _0x173615(0x18d):return _0x22ad2f[_0x173615(0x16b)][0x0][_0x173615(0x186)][_0x173615(0x16e)];case _0x173615(0x177):return _0x22ad2f[_0x173615(0x17e)][0x0][_0x173615(0x16e)];case _0x173615(0x18f):return _0x22ad2f[_0x173615(0x16f)];}}}