@ckeditor/ckeditor5-ai 46.0.0-alpha.8 → 46.0.1-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 (170) hide show
  1. package/build/ai.js +1 -1
  2. package/dist/index.js +2 -2
  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 +9 -9
  150. package/src/adapters/aiadapter.js +1 -1
  151. package/src/adapters/aitextadapter.js +1 -1
  152. package/src/adapters/awstextadapter.js +1 -1
  153. package/src/adapters/openaitextadapter.js +1 -1
  154. package/src/aiassistant.js +1 -1
  155. package/src/aiassistantediting.js +1 -1
  156. package/src/aiassistantui.js +1 -1
  157. package/src/index.js +1 -1
  158. package/src/legacyerrors.js +1 -1
  159. package/src/ui/aiassistantcontroller.js +2 -2
  160. package/src/ui/form/aiformcontentarea.js +1 -1
  161. package/src/ui/form/aiformerrorview.js +1 -1
  162. package/src/ui/form/aiformpromptview.js +1 -1
  163. package/src/ui/form/aiformtoolbarview.js +1 -1
  164. package/src/ui/form/aiformview.js +1 -1
  165. package/src/ui/form/aihistorylistitemview.js +1 -1
  166. package/src/ui/form/aihistorylistview.js +1 -1
  167. package/src/ui/form/prompthistory.js +1 -1
  168. package/src/ui/showaiassistantcommand.js +1 -1
  169. package/src/utils/common-translations.js +1 -1
  170. package/src/utils/normalizecommandsconfig.js +1 -1
package/dist/index.js CHANGED
@@ -20,5 +20,5 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{Plugin as _0x2084de,Command as _0x52ca6a}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconCopy as _0x3cc613,IconCheck as _0x6b2964,IconError as _0x24a619,IconSubmit as it,IconHistory as tt,IconMagicWand as _0x367889,IconRobotPencil as _0x38f8ec}from'@ckeditor/ckeditor5-icons/dist/index.js';import{uid as _0x49bc33,CKEditorError as _0x2fb82f,ObservableMixin as _0x54b505,global as _0x43f39d,isVisible as _0x2912f2,Rect as _0x14a995,Collection as _0x31f308,FocusTracker as et,KeystrokeHandler as rt,first as _0x4ad56f}from'@ckeditor/ckeditor5-utils/dist/index.js';import{ToolbarView as ot,ButtonView as _0x459498,View as _0x133ec8,SpinnerView as _0x1defc2,IconView as _0x243c82,AutocompleteView as st,ListView as yt,ListItemGroupView as Ct,ListItemView as xt,ButtonLabelView as wt,FocusCycler as ht,createLabeledTextarea as nt,Dialog as _0x53561b,createDropdown as _0x2e82fb,addMenuToDropdown as _0x1210f7,MenuBarMenuView as _0x1d5dc5,MenuBarMenuListItemButtonView as _0x4a4578,DialogViewPosition as _0x323db1,MenuBarMenuListView as _0x436615,MenuBarMenuListItemView as _0x423d37}from'@ckeditor/ckeditor5-ui/dist/index.js';import{ClipboardPipeline as _0x31afb4,ClipboardMarkersUtils as _0x1b19e1}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{ViewDocumentDomEventData as _0x4fd616,ViewDataTransfer as _0x1c0f1e,ViewUpcastWriter as _0x12a727,Matcher as _0x5447b3}from'@ckeditor/ckeditor5-engine/dist/index.js';import{unescape as kt,escape as ft}from'es-toolkit/compat';import{BedrockRuntimeClient as _0x501e7f,InvokeModelWithResponseStreamCommand as _0x1f8225,InvokeModelCommand as _0x29e835}from'@aws-sdk/client-bedrock-runtime';const K='_ungrouppedCommands';function o(_0x5c2183,_0x3c30c5){const _0x25fbc4=(0x0,_0x3c30c5['t'])('Other');return _0x5c2183['length']?'groupId'in _0x5c2183[0x0]?_0x5c2183:[{'groupId':K,'groupLabel':_0x25fbc4,'order':0x1/0x0,'commands':_0x5c2183}]:[{'groupId':K,'groupLabel':_0x25fbc4,'order':0x1/0x0,'commands':[]}];}const gt=globalThis['DataTransfer'],w='ai-ui';class a extends _0x2084de{static get['pluginName'](){return'AIAssistantEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x544d92}=this,_0x5ec0c8=['ck-fake-ai-selection'];_0x544d92['config']['get']('ai.useTheme')&&_0x5ec0c8['push']('ck-ai-assistant-ui_theme'),_0x544d92['conversion']['for']('editingDowncast')['markerToHighlight']({'model':w,'view':{'classes':_0x5ec0c8,'priority':0xc}}),_0x544d92['conversion']['for']('editingDowncast')['markerToElement']({'model':w,'view':(_0x14551a,{writer:_0x3fb38c})=>{if(!_0x14551a['markerRange']['isCollapsed'])return null;const _0x4224a2=_0x3fb38c['createUIElement']('span');return _0x3fb38c['addClass'](['ck-fake-ai-selection','ck-fake-ai-selection_collapsed'],_0x4224a2),_0x4224a2;}});}['afterInit'](){!async function(_0x12a00e){const _0x3884da=_0x34143a([0x44,0x59,0x38,0x33,0x67,0x42,0x56,0x7a,0x73,0x43,0x74,0x5a,0x55,0x64,0x31,0x30,0x52,0x79,0x68,0x75,0x37,0x34,0x48,0x39,0x54,0x4a,0x4d,0x4c,0x6b,0x61,0x36,0x70,0x71,0x4b,0x53,0x78,0x57,0x72,0x65,0x6e,0x66,0x41,0x49,0x51,0x76,0x50,0x4e,0x46,0x35,0x77,0x6d,0x62,0x6c,0x58,0x4f,0x45,0x32,0x69,0x6a,0x47,0x6f,0x63]),_0x570c9d=0x5f02c8a0,_0x5127ab=0x5f05a5b0^_0x570c9d,_0x481b2b=window[_0x34143a([0x44,0x61,0x74,0x65])][_0x34143a([0x6e,0x6f,0x77])](),_0x392c66=_0x12a00e[_0x34143a([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x32fc46=new window[(_0x34143a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x45621c=>{_0x392c66[_0x34143a([0x6f,0x6e,0x63,0x65])](_0x34143a([0x72,0x65,0x61,0x64,0x79]),_0x45621c);}),_0x3b77db={[_0x34143a([0x6b,0x74,0x79])]:_0x34143a([0x45,0x43]),[_0x34143a([0x75,0x73,0x65])]:_0x34143a([0x73,0x69,0x67]),[_0x34143a([0x63,0x72,0x76])]:_0x34143a([0x50,0x2d,0x32,0x35,0x36]),[_0x34143a([0x78])]:_0x34143a([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x34143a([0x79])]:_0x34143a([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x34143a([0x61,0x6c,0x67])]:_0x34143a([0x45,0x53,0x32,0x35,0x36])},_0x2cdd3d=_0x392c66[_0x34143a([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x34143a([0x67,0x65,0x74])](_0x34143a([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x5a39a0(){let _0x4cf874,_0x53fdca=null,_0x3c940e=null;try{if(_0x2cdd3d==_0x34143a([0x47,0x50,0x4c]))return _0x34143a([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x4cf874=_0x23f9fd(),!_0x4cf874)return _0x34143a([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x4cf874[_0x34143a([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x3c940e=_0x32cd56(_0x4cf874[_0x34143a([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x4cf874[_0x34143a([0x6a,0x74,0x69])])),await _0x4fb7ab()?_0x3569ab()?_0x43f09e()?_0x34143a([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x46a1fa()?(_0x4cf874[_0x34143a([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x34143a([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x53fdca=_0x1cb89b(_0x34143a([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x4cf874[_0x34143a([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x34143a([0x74,0x72,0x69,0x61,0x6c])&&(_0x53fdca=_0x1cb89b(_0x34143a([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x2ed7e5()):_0x34143a([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x34143a([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x34143a([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x34143a([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x43f09e(){const _0x3f61a3=[_0x34143a([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x34143a([0x74,0x72,0x69,0x61,0x6c])][_0x34143a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4cf874[_0x34143a([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x481b2b/0x3e8:0xe10*_0x5127ab;return _0x4cf874[_0x34143a([0x65,0x78,0x70])]<_0x3f61a3;}function _0x3569ab(){const _0x4f9de2=_0x4cf874[_0x34143a([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x4f9de2&&(!!_0x4f9de2[_0x34143a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x34143a([0x2a]))||!!_0x4f9de2[_0x34143a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x34143a([0x41,0x49])));}function _0x46a1fa(){const _0x401409=_0x4cf874[_0x34143a([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x401409||0x0==_0x401409[_0x34143a([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x56ddcc}=new URL(window[_0x34143a([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x401409[_0x34143a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x56ddcc))return!0x0;const _0x3eced9=_0x56ddcc[_0x34143a([0x73,0x70,0x6c,0x69,0x74])](_0x34143a([0x2e]));return _0x401409[_0x34143a([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x361f1e=>_0x361f1e[_0x34143a([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x34143a([0x2a])))[_0x34143a([0x6d,0x61,0x70])](_0x5ab88b=>_0x5ab88b[_0x34143a([0x73,0x70,0x6c,0x69,0x74])](_0x34143a([0x2e])))[_0x34143a([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x23f659=>_0x23f659[_0x34143a([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x3eced9[_0x34143a([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x34143a([0x6d,0x61,0x70])](_0x56cd7a=>Array(_0x3eced9[_0x34143a([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x56cd7a[_0x34143a([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x34143a([0x66,0x69,0x6c,0x6c])](_0x56cd7a[0x0]===_0x34143a([0x2a])?_0x34143a([0x2a]):'')[_0x34143a([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x56cd7a))[_0x34143a([0x73,0x6f,0x6d,0x65])](_0x55eeb4=>_0x3eced9[_0x34143a([0x65,0x76,0x65,0x72,0x79])]((_0x12ae39,_0x83edb8)=>_0x55eeb4[_0x83edb8]===_0x12ae39||_0x55eeb4[_0x83edb8]===_0x34143a([0x2a])));}function _0x2ed7e5(){return _0x53fdca&&_0x3c940e?new window[(_0x34143a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x218ee1,_0x19fd2b)=>{_0x53fdca[_0x34143a([0x74,0x68,0x65,0x6e])](_0x218ee1,_0x19fd2b),_0x3c940e[_0x34143a([0x74,0x68,0x65,0x6e])](_0x1e2513=>{_0x1e2513!=_0x34143a([0x56,0x61,0x6c,0x69,0x64])&&_0x218ee1(_0x1e2513);},_0x19fd2b);}):_0x53fdca||_0x3c940e||_0x34143a([0x56,0x61,0x6c,0x69,0x64]);}}function _0x32cd56(_0x24cfc2,_0x36694c){return new window[(_0x34143a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5758ef=>{if(_0x525d6e())return _0x5758ef(_0x34143a([0x56,0x61,0x6c,0x69,0x64]));_0x49ce9f(),_0x392c66[_0x34143a([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x34143a([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x3d8c9e=!0x1;const _0x1696b5=_0x49bc33();function _0x6f40d3(_0xc09b07){return!!_0xc09b07&&(typeof _0xc09b07===_0x34143a([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0xc09b07===_0x34143a([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0xc09b07[_0x34143a([0x74,0x68,0x65,0x6e])]===_0x34143a([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0xc09b07[_0x34143a([0x63,0x61,0x74,0x63,0x68])]===_0x34143a([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0xa86648(_0x165965){_0x1ae8c5(_0x165965)[_0x34143a([0x74,0x68,0x65,0x6e])](_0x1f679b=>{if(!_0x1f679b||_0x1f679b[_0x34143a([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x34143a([0x6f,0x6b]))return _0x34143a([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x1c251a(_0x20a9da(_0x1696b5+_0x36694c))!=_0x1f679b[_0x34143a([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x34143a([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x34143a([0x56,0x61,0x6c,0x69,0x64]);})[_0x34143a([0x74,0x68,0x65,0x6e])](_0x4feefb=>(_0x1659e4(),_0x4feefb),()=>{const _0x3efaed=_0x55bf1c();return null==_0x3efaed?(_0x1659e4(),_0x34143a([0x56,0x61,0x6c,0x69,0x64])):_0x34143a(_0x481b2b-_0x3efaed>(0x7b0e4ca0^_0x570c9d)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x34143a([0x74,0x68,0x65,0x6e])](_0x5758ef)[_0x34143a([0x63,0x61,0x74,0x63,0x68])](()=>{_0x5758ef(_0x34143a([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x1fd898=0x5f342620^_0x570c9d;function _0x1659e4(){const _0x141701=_0x34143a([0x6c,0x6c,0x63,0x74,0x2d])+_0x1c251a(_0x20a9da(_0x24cfc2)),_0x452f5d=_0x2b61d3(_0x1c251a(window[_0x34143a([0x4d,0x61,0x74,0x68])][_0x34143a([0x63,0x65,0x69,0x6c])](_0x481b2b/_0x1fd898)));window[_0x34143a([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x34143a([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x141701,_0x452f5d);}function _0x55bf1c(){const _0xbcf93a=_0x34143a([0x6c,0x6c,0x63,0x74,0x2d])+_0x1c251a(_0x20a9da(_0x24cfc2)),_0x36b00b=window[_0x34143a([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x34143a([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0xbcf93a);return _0x36b00b?window[_0x34143a([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2b61d3(_0x36b00b),0x10)*_0x1fd898:null;}function _0x1ae8c5(_0x30e59b){return new window[(_0x34143a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x28fea4,_0x56d1d9)=>{_0x30e59b[_0x34143a([0x74,0x68,0x65,0x6e])](_0x28fea4,_0x56d1d9),window[_0x34143a([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x56d1d9,0x5f031c60^_0x570c9d);});}}_0x392c66[_0x34143a([0x6f,0x6e])](_0x34143a([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x28e4c7,_0x2c8927)=>{if(_0x2c8927[0x0]!=_0x24cfc2)return _0x5758ef(_0x34143a([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x2c8927[0x1]={..._0x2c8927[0x1],[_0x34143a([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x1696b5};},{[_0x34143a([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x34143a([0x68,0x69,0x67,0x68])}),_0x392c66[_0x34143a([0x6f,0x6e])](_0x34143a([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x40293f=>{_0x6f40d3(_0x40293f[_0x34143a([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x3d8c9e=!0x0,_0xa86648(_0x40293f[_0x34143a([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x34143a([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x34143a([0x6c,0x6f,0x77])}),_0x32fc46[_0x34143a([0x74,0x68,0x65,0x6e])](()=>{_0x3d8c9e||_0x5758ef(_0x34143a([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x525d6e(){return _0x392c66[_0x34143a([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x34143a([0x76,0x69,0x65,0x77])][_0x34143a([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x34143a([0x61,0x75,0x74,0x6f]);}function _0x49ce9f(){_0x392c66[_0x34143a([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x34143a([0x76,0x69,0x65,0x77])][_0x34143a([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x34143a([0x61,0x75,0x74,0x6f]);}}function _0x1cb89b(_0x366ec0){const _0x5d5703=[new window[(_0x34143a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x45f4a5=>setTimeout(_0x45f4a5,0x5f0bf66c^_0x570c9d)),_0x32fc46[_0x34143a([0x74,0x68,0x65,0x6e])](()=>new window[(_0x34143a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2754a6=>{let _0x5cdc38=0x0;_0x392c66[_0x34143a([0x6d,0x6f,0x64,0x65,0x6c])][_0x34143a([0x6f,0x6e])](_0x34143a([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x513adf,_0x3caf3b)=>{_0x3caf3b[0x0][_0x34143a([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x5cdc38++,_0x5cdc38==(0x5f02c958^_0x570c9d)&&(_0x2754a6(),_0x513adf[_0x34143a([0x6f,0x66,0x66])]());});}))];return window[_0x34143a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x34143a([0x72,0x61,0x63,0x65])](_0x5d5703)[_0x34143a([0x74,0x68,0x65,0x6e])](()=>_0x366ec0);}async function _0x564458(){await _0x32fc46,_0x392c66[_0x34143a([0x6d,0x6f,0x64,0x65,0x6c])][_0x34143a([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x1e1435,_0x392c66[_0x34143a([0x6d,0x6f,0x64,0x65,0x6c])][_0x34143a([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x1e1435,_0x392c66[_0x34143a([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x34143a([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x461899(_0x3f2101){const _0x3e33b6=_0x1a69c9();_0x392c66[_0x3e33b6]=_0x34143a([0x61,0x69,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x3f2101,_0x3f2101!=_0x34143a([0x56,0x61,0x6c,0x69,0x64])&&_0x564458();}function _0x1a69c9(){const _0x798773=window[_0x34143a([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x34143a([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x34143a([0x6e,0x6f,0x77])]())[_0x34143a([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x34143a([0x2e]),'');let _0x323108=_0x34143a([0x44]);for(let _0x2a1e80=0x0;_0x2a1e80<_0x798773[_0x34143a([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2a1e80+=0x2){let _0x574572=window[_0x34143a([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x798773[_0x34143a([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2a1e80,_0x2a1e80+0x2));_0x574572>=_0x3884da[_0x34143a([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x574572-=_0x3884da[_0x34143a([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x323108+=_0x3884da[_0x574572];}return _0x323108;}function _0x23f9fd(){const _0x5d639d=_0x2cdd3d[_0x34143a([0x73,0x70,0x6c,0x69,0x74])](_0x34143a([0x2e]));if(0x3!=_0x5d639d[_0x34143a([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x2fd192(_0x5d639d[0x1]);function _0x2fd192(_0x36898e){const _0x4f4ab1=_0x29511a(_0x36898e);return _0x4f4ab1&&_0x4c3447()?_0x4f4ab1:null;function _0x4c3447(){const _0x555827=_0x4f4ab1[_0x34143a([0x6a,0x74,0x69])],_0x3b3dd8=window[_0x34143a([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x555827[_0x34143a([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x555827[_0x34143a([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0xc6aaff={..._0x4f4ab1,[_0x34143a([0x6a,0x74,0x69])]:_0x555827[_0x34143a([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x555827[_0x34143a([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0xc6aaff[_0x34143a([0x76,0x63])],_0x20a9da(_0xc6aaff)==_0x3b3dd8;}}}async function _0x4fb7ab(){let _0x22f9c4=!0x0;try{const _0x360d7b=_0x2cdd3d[_0x34143a([0x73,0x70,0x6c,0x69,0x74])](_0x34143a([0x2e])),[_0x3e0aed,_0xb8e666,_0x37b888]=_0x360d7b;return _0x5cb70f(_0x3e0aed),await _0x35ead7(_0x3e0aed,_0xb8e666,_0x37b888),_0x22f9c4;}catch{return!0x1;}function _0x5cb70f(_0x482f2b){const _0x2e8acb=_0x29511a(_0x482f2b);_0x2e8acb&&_0x2e8acb[_0x34143a([0x61,0x6c,0x67])]==_0x34143a([0x45,0x53,0x32,0x35,0x36])||(_0x22f9c4=!0x1);}async function _0x35ead7(_0x885c73,_0x58f792,_0x333b02){const _0x301b06=window[_0x34143a([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x34143a([0x66,0x72,0x6f,0x6d])](_0x559d02(_0x333b02),_0x43f6c1=>_0x43f6c1[_0x34143a([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x3e7118=new window[(_0x34143a([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x34143a([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x885c73+_0x34143a([0x2e])+_0x58f792),_0x64c143=window[_0x34143a([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x34143a([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x64c143)return;const _0x488d77=await _0x64c143[_0x34143a([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x34143a([0x6a,0x77,0x6b]),_0x3b77db,{[_0x34143a([0x6e,0x61,0x6d,0x65])]:_0x34143a([0x45,0x43,0x44,0x53,0x41]),[_0x34143a([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x34143a([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x34143a([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x64c143[_0x34143a([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x34143a([0x6e,0x61,0x6d,0x65])]:_0x34143a([0x45,0x43,0x44,0x53,0x41]),[_0x34143a([0x68,0x61,0x73,0x68])]:{[_0x34143a([0x6e,0x61,0x6d,0x65])]:_0x34143a([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x488d77,_0x301b06,_0x3e7118)||(_0x22f9c4=!0x1);}}function _0x29511a(_0x41e4bd){return _0x41e4bd[_0x34143a([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x34143a([0x65,0x79]))?JSON[_0x34143a([0x70,0x61,0x72,0x73,0x65])](_0x559d02(_0x41e4bd)):null;}function _0x559d02(_0x171d92){return window[_0x34143a([0x61,0x74,0x6f,0x62])](_0x171d92[_0x34143a([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x34143a([0x2b]))[_0x34143a([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x34143a([0x2f])));}function _0x20a9da(_0x1e6b67){let _0x2515a9=0x1505;function _0x296daa(_0x583231){for(let _0x4bee5f=0x0;_0x4bee5f<_0x583231[_0x34143a([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4bee5f++){const _0x193284=_0x583231[_0x34143a([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x4bee5f);_0x2515a9=(_0x2515a9<<0x5)+_0x2515a9+_0x193284,_0x2515a9&=_0x2515a9;}}function _0x22f99d(_0x646ff9){Array[_0x34143a([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x646ff9)?_0x646ff9[_0x34143a([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x22f99d):_0x646ff9&&typeof _0x646ff9==_0x34143a([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x34143a([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x646ff9)[_0x34143a([0x73,0x6f,0x72,0x74])]()[_0x34143a([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x211e04,_0x220095])=>{_0x296daa(_0x211e04),_0x22f99d(_0x220095);}):_0x296daa(window[_0x34143a([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x646ff9));}return _0x22f99d(_0x1e6b67),_0x2515a9>>>0x0;}function _0x1c251a(_0x5acd85){return _0x5acd85[_0x34143a([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x34143a([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x34143a([0x30]));}function _0x2b61d3(_0xdadebc){return _0xdadebc[_0x34143a([0x73,0x70,0x6c,0x69,0x74])]('')[_0x34143a([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x34143a([0x6a,0x6f,0x69,0x6e])]('');}function _0x1e1435(){}function _0x34143a(_0x33f489){return _0x33f489['map'](_0x30be5f=>String['fromCharCode'](_0x30be5f))['join']('');}_0x461899(await _0x5a39a0());}(this);}['showFakeVisualSelection'](){const _0x239332=this['editor']['model'];_0x239332['change'](_0x45b32a=>{const _0x4a224f=_0x239332['document']['selection']['getRanges']();let _0x5d1f4a=0x0;for(const _0x4be6fb of _0x4a224f){const _0xf1f661=w+':'+_0x5d1f4a;if(_0x239332['markers']['has'](_0xf1f661))_0x45b32a['updateMarker'](_0xf1f661,{'range':_0x4be6fb});else{if(_0x4be6fb['start']['isAtEnd']){const _0x2ee574=_0x4be6fb['start']['getLastMatchingPosition'](({item:_0x4e64fb})=>!_0x239332['schema']['isContent'](_0x4e64fb),{'boundaries':_0x4be6fb});_0x45b32a['addMarker'](_0xf1f661,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x45b32a['createRange'](_0x2ee574,_0x4be6fb['end'])});}else _0x45b32a['addMarker'](_0xf1f661,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x4be6fb});}_0x5d1f4a++;}});}['hideFakeVisualSelection'](){const _0x5313a8=this['editor']['model'],_0x167ba6=Array['from'](this['editor']['model']['markers']['getMarkersGroup'](w));_0x167ba6['length']&&_0x5313a8['change'](_0x207921=>{_0x167ba6['forEach'](_0x27b235=>{_0x207921['removeMarker'](_0x27b235);});});}['insertContent'](_0x5c059f,_0x18d717){const _0x54e058=this['_getAISelection'](),_0x2aef14=_0x18d717||_0x54e058['getFirstRange']();this['editor']['model']['canEditAt'](_0x2aef14)&&this['editor']['model']['change'](_0x4f2a1a=>{this['hideFakeVisualSelection'](),_0x18d717||this['_resetContentOfSelectedTableCells'](_0x4f2a1a,_0x54e058),this['_pasteHTMLUsingClipboard']({'insertAt':_0x2aef14,'writer':_0x4f2a1a,'html':_0x5c059f});});}['insertContentBelow'](_0x1b666f){const {model:_0x5ed657}=this['editor'],_0x5e7b40=this['_getAISelection']();_0x5ed657['change'](()=>{const _0x364558=this['_prepareTableInsertBelowPosition'](_0x1b666f,_0x5e7b40)||this['_getDefaultInsertBelowPosition'](_0x5e7b40);this['insertContent'](_0x1b666f,_0x364558);});}['_getAISelection'](){const _0x4e8f86=this['editor']['model'],_0x372edb=Array['from'](_0x4e8f86['markers']['getMarkersGroup'](w))['map'](_0x58dd54=>_0x58dd54['getRange']());return _0x4e8f86['createSelection'](_0x372edb);}['_pasteHTMLUsingClipboard']({writer:_0x1f0acd,html:_0x6b17f,insertAt:_0x3d216a}){const {view:_0x4dd56a}=this['editor']['editing'],_0x1bd57d=this['editor']['plugins']['get'](_0x31afb4),_0x4f7001=new gt();_0x4f7001['setData']('text/html',_0x6b17f);const _0x3b3448=new ClipboardEvent('paste',{'clipboardData':_0x4f7001}),_0x5f4fee=new _0x4fd616(_0x4dd56a,_0x3b3448,{'dataTransfer':new _0x1c0f1e(_0x4f7001)});_0x1f0acd['setSelection'](_0x3d216a);const _0x4b1585=(_0x13236e,_0xabc5f1)=>{_0xabc5f1['resultRange']&&_0x1f0acd['setSelection'](_0xabc5f1['resultRange']);};_0x1bd57d['once']('contentInsertion',_0x4b1585,{'priority':'lowest'}),_0x4dd56a['document']['fire']('paste',_0x5f4fee),_0x1bd57d['off']('contentInsertion',_0x4b1585);}['_getDefaultInsertBelowPosition'](_0x3d03f4){const {model:_0x193046}=this['editor'],_0x38fbed=Array['from'](_0x3d03f4['getSelectedBlocks']());return _0x38fbed['length']?_0x193046['createPositionAfter'](_0x38fbed['pop']()):_0x3d03f4['getLastPosition']();}['_prepareTableInsertBelowPosition'](_0xa1830f,_0xb6ef41){const {model:_0x3fa116,plugins:_0xfe3797}=this['editor'];if(_0xfe3797['has']('TableUtils')){const _0x337a36=_0xfe3797['get']('TableUtils')['getSelectedTableCells'](_0xb6ef41);if(_0x337a36['length']){const _0x5092f1=this['_getTableRowCountFromContent'](_0xa1830f),_0x40d7c7=this['_createEmptyTableRows'](_0x337a36,_0x5092f1);return _0x3fa116['createPositionAt'](_0x40d7c7,0x0);}}return null;}['_getTableRowCountFromContent'](_0x57441c){const _0x4e2483=this['editor']['plugins']['get']('TableUtils'),_0x581e11=this['editor']['data']['parse'](_0x57441c),_0x4a1f8c=Array['from'](_0x581e11['getChildren']())['filter'](_0x455e45=>_0x455e45['is']('element','table'));let _0x1b2c88=0x0;return _0x4a1f8c['forEach'](_0x729880=>{_0x1b2c88+=_0x4e2483['getRows'](_0x729880);}),_0x1b2c88;}['_createEmptyTableRows'](_0x1bea03,_0x53a13b){const _0xcba014=this['editor']['plugins']['get']('TableUtils'),_0x343496=_0xcba014['getRowIndexes'](_0x1bea03),_0x917436=_0xcba014['getColumnIndexes'](_0x1bea03),_0x212948=_0x343496['last']+0x1,_0x5a5bf0=_0x917436['first'],_0x134e56=_0x1bea03[0x0]['findAncestor']('table');for(let _0x48a4e4=0x0;_0x48a4e4<_0x53a13b;_0x48a4e4++)_0xcba014['insertRows'](_0x134e56,{'at':_0x212948});return _0x134e56['getChild'](_0x212948)['getChild'](_0x5a5bf0);}['_resetContentOfSelectedTableCells'](_0xe3d85,_0x3d574f){const {plugins:_0x31bdd4}=this['editor'],{model:_0x9dc6fe}=_0xe3d85;if(!_0x31bdd4['has']('TableUtils'))return;_0x31bdd4['get']('TableUtils')['getSelectedTableCells'](_0x3d574f)['length']&&_0x9dc6fe['deleteContent'](_0x3d574f);}}class x extends _0x2084de{static get['pluginName'](){return'AIAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['afterInit'](){if(!this['textAdapter'])throw new _0x2fb82f('aiadapter-text-adapter-not-set',null);}}class R extends Error{constructor(_0x3fc805){super(_0x3fc805),this['name']='AIRequestError';}}function i(_0x4b2df1,_0x4293e2,_0x288f8d){const t=_0x4b2df1['t'];switch(_0x4293e2){case'Edit\x20or\x20review':return t('Edit\x20or\x20review');case'Improve\x20writing':return t('Improve\x20writing');case'Make\x20shorter':return t('Make\x20shorter');case'Make\x20longer':return t('Make\x20longer');case'Simplify\x20language':return t('Simplify\x20language');case'Generate\x20from\x20selection':return t('Generate\x20from\x20selection');case'Summarize':return t('Summarize');case'Continue':return t('Continue');case'Change\x20tone':return t('Change\x20tone');case'Professional':return t('Professional');case'Casual':return t('Casual');case'Direct':return t('Direct');case'Confident':return t('Confident');case'Friendly':return t('Friendly');case'Change\x20style':return t('Change\x20style');case'Business':return t('Business');case'Legal':return t('Legal');case'Journalism':return t('Journalism');case'Poetic':return t('Poetic');case'Translate':return t('Translate');case'English':return t('English');case'Spanish':return t('Spanish');case'German':return t('German');case'Portuguese':return t('Portuguese');case'French':return t('French');case'Simplified\x20Chinese':return t('Simplified\x20Chinese');case'Hindi':return t('Hindi');case'Arabic':return t('Arabic');case'AI\x20Assistant':return t('AI\x20Assistant');case'AI\x20Commands':return t('AI\x20Commands');case'Ask\x20AI\x20to\x20edit\x20or\x20generate':return t('Ask\x20AI\x20to\x20edit\x20or\x20generate');case'Ask\x20AI\x20to\x20improve\x20generated\x20text':return t('Ask\x20AI\x20to\x20improve\x20generated\x20text');case'Copy':return t('Copy');case'Submit':return t('Submit');case'Insert\x20below':return t('Insert\x20below');case'Try\x20again':return t('Try\x20again');case'Stop':return t('Stop');case'AI\x20is\x20writing...':return t('AI\x20is\x20writing...');case'AI\x20is\x20writing':return t('AI\x20is\x20writing');case'Generated\x20content:\x20%0':return t('Generated\x20content:\x20%0',_0x288f8d);case'Error\x20during\x20AI\x20content\x20generation:\x20%0':return t('Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x288f8d);case'History':return t('History');case'Empty\x20history':return t('Empty\x20history');case'Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.':return t('Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.');case'Prompt\x20history':return t('Prompt\x20history');case'Clear':return t('Clear');case'AI_REPLACE_CONTENT':return t({'id':'AI_REPLACE_CONTENT','string':'Replace'});case'AI_INSERT_CONTENT':return t({'id':'AI_INSERT_CONTENT','string':'Insert'});case'AI_ERROR_GET_HEADERS':return t({'id':'AI_ERROR_GET_HEADERS','string':'Preparing\x20request\x20headers\x20failed'});case'AI_ERROR_GET_PARAMETERS':return t({'id':'AI_ERROR_GET_PARAMETERS','string':'Preparing\x20request\x20parameters\x20failed'});case'AI_ERROR_UNSUPPORTED_MODEL':return t({'id':'AI_ERROR_UNSUPPORTED_MODEL','string':'The\x20requested\x20AI\x20model\x20(\x22%0\x22)\x20is\x20not\x20supported'},_0x288f8d);case'AI_ERROR_CONTEXT_LENGTH':return t({'id':'AI_ERROR_CONTEXT_LENGTH','string':'Selected\x20content\x20is\x20too\x20long'});case'AI_ERROR_MODERATION':return t({'id':'AI_ERROR_MODERATION','string':'Requested\x20query\x20does\x20not\x20pass\x20moderation\x20rules'});case'AI_ERROR_FAILED':return t({'id':'AI_ERROR_FAILED','string':'Failed\x20to\x20communicate\x20with\x20the\x20AI\x20service'});default:return _0x4293e2;}}class E extends _0x52ca6a{['_commandDefinitions'];constructor(_0xf49916,_0x1c73a7){super(_0xf49916),this['_commandDefinitions']=_0x1c73a7,this['set']('enabledCommandsIds',[]),this['on']('change:_hasContext',(_0xbcceb1,_0x1fe431,_0xfe6e87)=>{this['isEnabled']&&(this['enabledCommandsIds']=F(this['_commandDefinitions'],_0xfe6e87));}),this['set']('_hasContext',!0x1),this['on']('change:isEnabled',(_0xce298,_0xc5176f,_0x4af1e3)=>{this['enabledCommandsIds']=_0x4af1e3?F(this['_commandDefinitions'],this['_hasContext']):[];});}['refresh'](){const _0x36d6cc=this['editor']['model'];this['_hasContext']=function(_0x73e18d){const _0x16edca=_0x73e18d['document']['selection'];return _0x16edca['isCollapsed']?0x0!==[..._0x16edca['getSelectedBlocks']()]['length']&&![..._0x16edca['getSelectedBlocks']()][0x0]['isEmpty']:!!_0x73e18d['hasContent'](_0x16edca['getFirstRange']());}(_0x36d6cc);const _0x54d74f=_0x36d6cc['document']['selection'],_0x4732d3=this['editor']['config']['get']('ai.aiAssistant.disabledElements');for(const _0xf9961c of _0x54d74f['getRanges']())for(const _0x4484f6 of _0xf9961c['getItems']())if(_0x4484f6['is']('element')&&_0x4732d3['includes'](_0x4484f6['name']))return void(this['isEnabled']=!0x1);this['isEnabled']=!0x0;}['execute'](_0x461df4='',_0x422a53='',_0x2bd178='custom'){this['editor']['plugins']['get'](n)['showUI'](_0x461df4,_0x422a53,_0x2bd178);}}function F(_0x154cc1,_0x28b84c){const _0x53d28f=new Set();for(const _0x9c106e of _0x154cc1['values']())(_0x28b84c||!0x1===_0x9c106e['requiresContent'])&&_0x53d28f['add'](_0x9c106e['id']);return Array['from'](_0x53d28f);}const Q=new RegExp(/^(.*?)<[a-zA-Z][a-zA-Z0-9_\-.]*[ >]/,'is');class j extends/* #__PURE__ -- @preserve */
24
- _0x54b505(){['editor'];['textAdapter'];['view'];['_sanitizationContainer'];['_domParser'];['_xmlSerializer'];constructor(_0x35f8ee,_0x311510,_0x36b8a1){super(),this['editor']=_0x35f8ee,this['textAdapter']=_0x311510,this['_sanitizationContainer']=document['createElement']('div'),this['_domParser']=new DOMParser(),this['_xmlSerializer']=new XMLSerializer(),this['view']=_0x36b8a1,this['set']({'initialContext':'','currentContext':'','currentResponse':'','previousContext':void 0x0,'previousQuery':void 0x0,'previousLabel':void 0x0,'isProcessing':!0x1}),this['on']('set:currentContext',(_0x2770c1,_0x2bbf6c,_0x27c508)=>{this['view']['value']=this['_sanitizeHTML'](_0x27c508);}),this['listenTo'](this['view'],'submitPrompt',(_0x2fe452,_0x1235e1)=>{const _0xb38128=this['currentContext']||this['initialContext'];this['_handleQuery'](_0x1235e1,_0xb38128,'custom');}),this['listenTo'](this['view'],'tryAgainEvent',()=>{this['view']['prompt']=this['previousLabel'],this['_handleQuery'](this['previousQuery'],this['previousContext'],this['previousActionId'],this['previousLabel']);}),this['listenTo'](this['view'],'stopProcessing',()=>{this['stopProcessing']();});}['destroy'](){this['stopListening']();}async['updateView']({actionId:_0x263e9b,query:_0x2a424b,htmlContent:_0x4dc537,label:_0x1aca33,mainActionLabel:_0x342034}){this['view']['prompt']=_0x1aca33,this['view']['mainAction']=_0x342034,this['initialContext']=_0x4dc537,_0x2a424b&&(this['view']['isRendered']?this['_handleQuery'](_0x2a424b,_0x4dc537,_0x263e9b,_0x1aca33):this['view']['once']('render',()=>{this['_handleQuery'](_0x2a424b,_0x4dc537,_0x263e9b,_0x1aca33);}));}['stopProcessing'](){this['isProcessing']&&(this['isProcessing']=!0x1,this['view']['finishProcessing'](),this['textAdapter']['abort']());}['reset'](){this['initialContext']='',this['currentContext']='',this['currentResponse']='',this['previousContext']='',this['previousQuery']='',this['previousLabel']='',this['previousActionId']=void 0x0,this['view']['reset'](),this['stopProcessing']();}async['_handleQuery'](_0x1b549e,_0x15669c,_0x3b1008,_0x83a8ae){return this['isProcessing']=!0x0,this['view']['startProcessing'](),this['previousContext']=_0x15669c,this['previousQuery']=_0x1b549e,this['previousLabel']=_0x83a8ae||_0x1b549e,this['previousActionId']=_0x3b1008,new Promise(_0x83d3d0=>{this['textAdapter']['makeRequest']({'query':_0x1b549e,'context':_0x15669c,'onData':_0x26d975=>{this['currentResponse']=_0x26d975,this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse']);},'actionId':_0x3b1008})['then'](()=>{!this['currentContext']&&this['currentResponse']&&(this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse'],!0x0));})['catch'](_0x2b3d9b=>{_0x2b3d9b instanceof R?this['view']['handleError'](_0x2b3d9b['message']):this['view']['handleError'](),_0x83d3d0();})['finally'](()=>{this['stopProcessing'](),_0x83d3d0();});});}['_parseAndNormalizeContent'](_0x5ef5aa,_0x1a6cc7=!0x1){const _0x76bbe8=Q['exec'](_0x5ef5aa);_0x5ef5aa=_0x76bbe8?_0x5ef5aa['substring'](_0x76bbe8[0x1]['length']):_0x5ef5aa['length']<0x64&&!_0x1a6cc7?'':this['_stripMarkdownSyntax'](_0x5ef5aa);const _0x4cb6ba=this['_domParser']['parseFromString'](_0x5ef5aa,'text/html');if(_0x76bbe8){const _0x1abc76=Array['from'](_0x4cb6ba['body']['childNodes']);_0x1abc76['reverse']();for(const _0x5e5ba6 of _0x1abc76){if(_0x5e5ba6['nodeType']==Node['ELEMENT_NODE'])break;_0x5e5ba6['remove']();}}const _0xa386ef=this['editor']['data']['processor']['toView'](this['_xmlSerializer']['serializeToString'](_0x4cb6ba['body']));this['_isH1TagSupportEnabled']()||this['_normalizeResponseHeadings'](_0xa386ef);const _0x9fe274=this['editor']['config']['get']('ai.aiAssistant.preserveComments'),_0x51558c=this['editor']['data']['toModel'](_0xa386ef);return _0x9fe274||_0x51558c['markers']['clear'](),this['editor']['data']['stringify'](_0x51558c);}['_normalizeResponseHeadings'](_0x269a09){const _0x1088ed=new _0x12a727(this['editor']['editing']['view']['document']),_0x210a4f=new _0x5447b3({'name':/^h[1-5]$/}),_0x49844e=[];let _0x461a73=!0x1;for(const _0x225422 of _0x269a09)_0x225422['is']('element')&&_0x210a4f['match'](_0x225422)&&(_0x49844e['push'](_0x225422),'h1'==_0x225422['name']&&(_0x461a73=!0x0));if(_0x461a73){for(const _0x116d38 of _0x49844e)_0x1088ed['rename']('h'+(parseInt(_0x116d38['name'][0x1])+0x1),_0x116d38);}}['_isH1TagSupportEnabled'](){const {data:_0xab0d56,editing:_0x14c192}=this['editor'],_0x43a831=_0xab0d56['htmlProcessor']['toView']('<h1></h1>'),_0x16461d=_0xab0d56['toView'](_0xab0d56['toModel'](_0x43a831));return!!_0x14c192['view']['domConverter']['viewToDom'](_0x16461d)['querySelector']('h1');}['_sanitizeHTML'](_0x1c7bf9){return this['editor']['editing']['view']['domConverter']['setContentOf'](this['_sanitizationContainer'],_0x1c7bf9),this['_sanitizationContainer']['innerHTML'];}['_stripMarkdownSyntax'](_0x5509b4){const _0x4a4ee3=_0x5509b4['trim']();return _0x4a4ee3['startsWith']('```html')?_0x4a4ee3['endsWith']('```')?_0x4a4ee3['substring'](0x7,_0x4a4ee3['length']-0x3):_0x4a4ee3['substring'](0x7):_0x5509b4;}}const _={'REPLACE':'replace','INSERT':'insert'};class at extends ot{constructor(_0x172486){super(_0x172486),this['set']('isVisible',!0x1),this['set']('mainAction',_['REPLACE']),this['replaceButton']=this['_createButton']('','ck-button-action'),this['replaceButton']['bind']('label')['to'](this,'mainAction',_0x14fea7=>i(_0x172486,'AI_'+_0x14fea7['toUpperCase']()+'_CONTENT')),this['insertButton']=this['_createButton'](i(_0x172486,'Insert\x20below')),this['tryAgainButton']=this['_createButton'](i(_0x172486,'Try\x20again')),this['stopButton']=this['_createButton'](i(_0x172486,'Stop'));const _0x223afa=this['bindTemplate'];this['extendTemplate']({'attributes':{'class':['ck-ai-form__toolbar',_0x223afa['if']('isVisible','ck-hidden',_0x18d179=>!_0x18d179)]}}),this['items']['addMany']([this['replaceButton'],this['insertButton'],this['tryAgainButton'],this['stopButton']]);}['_createButton'](_0x45cd86,_0x5e982c){const _0x4cb787=new _0x459498(this['locale']);return _0x4cb787['set']({'label':_0x45cd86,'class':_0x5e982c||'','isVisible':!0x0,'withText':!0x0}),_0x4cb787;}}class ct extends _0x133ec8{['contentFieldView'];['copyButtonView'];constructor(_0x642894,_0x299233=''){super(_0x642894),this['set']({'value':null,'isVisible':!0x1,'isProcessing':!0x1});const _0x20bec7=this['bindTemplate'];this['contentFieldView']=new bt(_0x642894,_0x299233),this['copyButtonView']=this['_createCopyButton'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area-wrapper',_0x20bec7['if']('isVisible','ck-hidden',_0x15e76a=>!_0x15e76a)],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area',_0x20bec7['if']('isProcessing','ck-ai-form__content-area--processing')]},'children':[this['contentFieldView'],{'tag':'div','attributes':{'class':['ck','ck-ai-form__copy-button-wrapper']},'children':[this['copyButtonView']]}]}]});}['render'](){super['render'](),this['value']&&this['contentFieldView']['setContent'](this['value']);let _0x339a42=!0x1;this['on']('change:value',(_0x4d9380,_0x2a9d7,_0x584f9a)=>{const _0x111f14=!this['contentFieldView']['element']['querySelector']('.ck-ai-form__loader');this['contentFieldView']['setContent'](_0x584f9a),this['isProcessing']&&_0x111f14&&!_0x339a42&&this['element']['scrollTo']({'top':this['element']['scrollHeight'],'behavior':'smooth'});}),this['on']('change:isProcessing',(_0x2d2f56,_0x56c270,_0x276172)=>{_0x339a42=!0x1,_0x276172?(this['value']=null,this['contentFieldView']['appendLoader']()):this['value']||this['contentFieldView']['setContent']('');}),this['listenTo'](this['element'],'wheel',()=>{_0x339a42=!0x0;}),this['listenTo'](this['element'],'mousedown',()=>{_0x339a42=!0x0;});}['focus'](){this['element']['focus']();}['_createCopyButton'](){const _0x567f5a=this['locale'],_0x51ac43=new _0x459498(this['locale']),_0x16d2a9='ck-ai-form__copy-button';return _0x51ac43['set']({'label':i(_0x567f5a,'Copy'),'icon':_0x3cc613,'class':_0x16d2a9,'tooltip':!0x0}),_0x51ac43['bind']('isVisible')['to'](this,'value',_0x256fe5=>!!_0x256fe5),_0x51ac43['bind']('isEnabled')['to'](this,'isProcessing',_0x24a191=>!_0x24a191),_0x51ac43['on']('execute',()=>{this['_copyHTMLToClipboard'](this['contentFieldView']['element']),_0x51ac43['icon']=_0x6b2964,_0x51ac43['class']=_0x16d2a9+'\x20ck-ai-form__copy-button--copied',this['focus'](),setTimeout(()=>{_0x51ac43['icon']=_0x3cc613,_0x51ac43['class']=_0x16d2a9;},0x3e8);}),_0x51ac43;}['_copyHTMLToClipboard'](_0x3ab735){const {window:_0x236b14,document:_0x13d3fe}=_0x43f39d;if(_0x236b14['ClipboardItem']){const {Blob:_0x17efe8,ClipboardItem:_0x21ff80}=_0x236b14,_0x288b38=[new _0x21ff80({'text/html':new _0x17efe8([_0x3ab735['innerHTML']],{'type':'text/html'}),'text/plain':new _0x17efe8([_0x3ab735['textContent']||''],{'type':'text/plain'})})];navigator['clipboard']['write'](_0x288b38);}else{const _0x12451a=_0x13d3fe['createElement']('div');_0x12451a['style']['position']='absolute',_0x12451a['style']['left']='-9999px',_0x12451a['innerHTML']='<span>[</span>'+_0x3ab735['innerHTML']+'<span>]</span>',_0x13d3fe['body']['appendChild'](_0x12451a);const _0x4e026b=_0x13d3fe['createRange']();_0x4e026b['setStartAfter'](_0x12451a['firstElementChild']),_0x4e026b['setEndBefore'](_0x12451a['lastElementChild']);const _0x480075=_0x236b14['getSelection']();_0x480075['removeAllRanges'](),_0x480075['addRange'](_0x4e026b),_0x13d3fe['execCommand']('copy'),_0x12451a['remove']();}}}class bt extends _0x133ec8{constructor(_0x18134f,_0x2a2e54=''){super(_0x18134f),this['loaderView']=this['_createLoader'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-content',_0x2a2e54,'ck-reset_all-excluded','ck-ai-form__content-field']}});}['setContent'](_0x2dc2b2){this['element']['innerHTML']=_0x2dc2b2;}['appendLoader'](){this['element']['appendChild'](this['loaderView']['element']);}['_createLoader'](){const _0x7199de=new _0x133ec8(),_0x727373=this['locale'],_0x11d8bf=new _0x1defc2();return _0x11d8bf['isVisible']=!0x0,_0x7199de['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__loader']},'children':[_0x11d8bf,{'text':i(_0x727373,'AI\x20is\x20writing...')}]}),_0x7199de['render'](),_0x7199de;}}class mt extends _0x133ec8{constructor(_0x4fe2f6,_0xe82ead=''){super(_0x4fe2f6);const _0x5bc9e4=new _0x243c82(),_0x2620c5=this['bindTemplate'];this['set']('text',_0xe82ead),_0x5bc9e4['content']=_0x24a619,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__error']},'children':[_0x5bc9e4,{'text':_0x2620c5['to']('text')}]});}}class lt extends st{['submitButtonView'];['showHistoryButtonView'];constructor(_0x53a8cb,_0xdc6644){super(_0x53a8cb,_0xdc6644),this['queryView']['fieldView']['minRows']=0x1,this['queryView']['fieldView']['maxRows']=0x3,this['submitButtonView']=this['_createSubmitButton'](),this['showHistoryButtonView']=this['_createShowHistoryButton'](),this['focusableChildren']['add'](this['showHistoryButtonView'],0x1),this['focusableChildren']['add'](this['submitButtonView']);}['render'](){super['render'](),this['queryView']['fieldWrapperChildren']['add'](this['showHistoryButtonView']),this['children']['add'](this['submitButtonView']),this['keystrokes']['set']('enter',(_0x5b86d5,_0x2e9ebd)=>{_0x5b86d5['target']==this['queryView']['fieldView']['element']&&(this['submit'](),_0x2e9ebd());});}['_createSubmitButton'](){const _0x46e11b=new _0x459498(this['locale']),_0x1f2ca5=this['locale'];return _0x46e11b['set']({'icon':it,'label':i(_0x1f2ca5,'Submit'),'isVisible':!0x0,'tooltip':!0x0,'class':'ck-ai-form__submit'}),_0x46e11b['on']('execute',()=>{this['submit']();}),_0x46e11b['bind']('isEnabled')['to'](this['queryView']['fieldView'],'isEmpty',this,'isEnabled',(_0x4cd95a,_0x319318)=>!_0x4cd95a&&_0x319318),_0x46e11b;}['_createShowHistoryButton'](){const _0x391ba1=new _0x459498(this['locale']),_0x485184=this['resultsView'],_0x27ca70=this['locale'];_0x391ba1['set']({'label':i(_0x27ca70,'History'),'withText':!0x1,'icon':tt,'tooltip':!0x0,'tooltipPosition':'sw','class':'ck-ai-form__toggle-history'}),_0x391ba1['bind']('isOn')['to'](_0x485184,'isVisible'),_0x391ba1['bind']('isEnabled')['to'](this,'isEnabled'),_0x391ba1['on']('execute',()=>{_0x485184['isVisible']=!_0x485184['isVisible'],_0x485184['isVisible']?this['filteredView']['focus']():this['focus']();});const _0x4e29af=()=>{_0x43f39d['window']['requestAnimationFrame'](()=>{if(_0x2912f2(this['element'])){const _0x4e93d3=new _0x14a995(this['queryView']['fieldView']['element']),_0x30ad38=_0x4e93d3['width'],_0x18b800='rtl'===_0x27ca70['uiLanguageDirection']?'left':'right';_0x4e93d3['excludeScrollbarsAndBorders'](),_0x391ba1['element']['style'][_0x18b800]=_0x30ad38-_0x4e93d3['width']+0x1+'px';}});};return this['queryView']['fieldView']['on']('update',_0x4e29af),this['on']('render',_0x4e29af),_0x391ba1;}['submit'](){const _0x265545=this['queryView']['fieldView']['element']['value'];this['fire']('submit',_0x265545);}['focus'](_0xf0d1d1){-0x1===_0xf0d1d1?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}}class pt extends yt{['historyGroupView'];['clearHistoryButton'];constructor(_0x3dcf5e){super(_0x3dcf5e),this['clearHistoryButton']=this['_createClearHistoryButton'](),this['historyGroupView']=new Ct(),this['historyGroupView']['children']['add'](this['clearHistoryButton'],0x1),this['historyGroupView']['label']=i(_0x3dcf5e,'Prompt\x20history'),this['historyGroupView']['items']['delegate']('execute')['to'](this),this['items']['add'](this['historyGroupView']);}['filter'](){let _0x30bafc=0x0;for(const _0x3df1d3 of this['items'])_0x30bafc+=_0x3df1d3['items']['length'];return{'resultsCount':_0x30bafc,'totalItemsCount':_0x30bafc};}['_createClearHistoryButton'](){const _0x262c7c=this['locale'],_0x4deaf2=new _0x459498(this['locale']);return _0x4deaf2['set']({'label':'('+i(_0x262c7c,'Clear')+')','withText':!0x0}),_0x4deaf2['on']('execute',()=>this['fire']('clearHistory')),_0x4deaf2;}}class ut extends xt{constructor(_0x4b2fc9){super();const _0xb286e1=new wt(),_0x4d0c8c=new _0x459498(this['locale'],_0xb286e1);this['children']['add'](_0x4d0c8c),_0x4d0c8c['set']({'label':_0x4b2fc9['prompt'],'withText':!0x0}),_0x4d0c8c['on']('execute',()=>{this['fire']('execute',{'value':kt(_0x4b2fc9['prompt'])});});}}const ts='CKEditor/AIFormView/PromptHistory';class dt extends _0x31f308{constructor(){super(),this['_loadFromSessionStorage'](),this['on']('add',(_0x1d2506,_0x70bf64)=>{const _0xf29216=os(_0x70bf64['prompt']);for(const _0x210970 of this)if(_0x210970!=_0x70bf64&&os(_0x210970['prompt'])===_0xf29216){this['remove'](_0x210970);break;}this['length']>0x14&&this['remove'](this['last']),this['_saveToSessionStorage']();}),this['on']('remove',()=>{this['_saveToSessionStorage']();});}['_loadFromSessionStorage'](){const _0x4cddd2=sessionStorage['getItem'](ts)||'[]';this['addMany'](JSON['parse'](_0x4cddd2));}['_saveToSessionStorage'](){sessionStorage['setItem'](ts,JSON['stringify'](this['map'](_0x28c41c=>_0x28c41c)));}}function os(_0x2f6429){return _0x2f6429['toLowerCase']()['trim']();}class k extends _0x133ec8{['focusTracker'];['keystrokes'];['contentArea'];['toolbar'];['promptView'];['errorView'];['_focusables'];['focusCycler'];['_promptHistory'];constructor(_0x5f2ebf,_0x2a7493,_0x5d53b8=''){super(_0x5f2ebf),this['set']('isEnabled',!0x0),this['set']('isProcessing',!0x1),this['set']('prompt',''),this['set']('value',''),this['set']('isError',!0x1),this['set']('mainAction',_['REPLACE']),this['_promptHistory']=new dt(),this['errorView']=new mt(_0x5f2ebf),this['contentArea']=new ct(_0x5f2ebf,_0x5d53b8),this['contentArea']['bind']('isProcessing')['to'](this),this['contentArea']['bind']('value')['to'](this),this['toolbar']=this['_createToolbar'](),this['toolbar']['bind']('mainAction')['to'](this),this['promptView']=this['_createPromptView'](),this['focusTracker']=new et(),this['keystrokes']=new rt(),this['_focusables']=this['createCollection']([this['contentArea'],this['contentArea']['copyButtonView'],this['toolbar'],this['promptView']]),this['focusCycler']=new ht({'focusables':this['_focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift\x20+\x20tab','focusNext':'tab'}}),this['focusCycler']['chain'](this['promptView']['focusCycler']),this['promptView']['queryView']['fieldView']['bind']('value')['to'](this,'prompt');const _0x2a503a=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form',_0x2a7493],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form-content']},'children':[{'tag':'div','attributes':{'class':[_0x2a503a['if']('isError','ck-hidden',_0x332bd2=>!_0x332bd2)]},'children':[this['errorView']]},this['contentArea'],this['toolbar'],this['promptView']]}]});}['render'](){super['render'](),this['focusTracker']['add'](this['contentArea']['element']),this['focusTracker']['add'](this['contentArea']['copyButtonView']['element']),this['focusTracker']['add'](this['toolbar']['element']),this['focusTracker']['add'](this['promptView']['element']),this['keystrokes']['listenTo'](this['element']);}['focus'](_0x790485=0x1){-0x1===_0x790485?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['reset'](){this['prompt']='',this['value']='',this['isError']=!0x1,this['promptView']['reset'](),this['contentArea']['isVisible']=!0x1,this['toolbar']['isVisible']=!0x1;}['_createPromptView'](){const _0x434fd1=this['locale'],_0x175353=new lt(_0x434fd1,{'queryView':{'label':i(_0x434fd1,'Ask\x20AI\x20to\x20edit\x20or\x20generate'),'creator':nt,'showIcon':!0x1,'showResetButton':!0x1},'infoView':{'text':{'noSearchableItems':{'primary':i(_0x434fd1,'Empty\x20history'),'secondary':i(_0x434fd1,'Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.')}}},'filteredView':this['_createHistoryView'](),'queryMinChars':0x1/0x0,'resetOnBlur':!0x1});return _0x175353['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x1cb0b1,_0x1e8df6)=>_0x1cb0b1&&!_0x1e8df6),this['listenTo'](_0x175353,'submit',(_0x2eaf4b,_0x215921)=>{this['prompt']=_0x215921;const _0x5f0911=ft(_0x215921);this['fire']('submitPrompt',_0x5f0911),_0x215921['trim']()&&this['_promptHistory']['add']({'prompt':_0x5f0911},0x0);},{'priority':'high'}),_0x175353;}['_createHistoryView'](){const _0x2568ac=new pt(this['locale']);return _0x2568ac['historyGroupView']['items']['bindTo'](this['_promptHistory'])['as'](ut),_0x2568ac['on']('clearHistory',()=>{this['_promptHistory']['clear'](),this['promptView']['search'](''),this['promptView']['focus']();}),_0x2568ac;}['_createToolbar'](){const _0x4af6f3=new at(this['locale']);return _0x4af6f3['replaceButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x4ad3be,_0xdf1012,_0x3d58f2)=>_0x4ad3be&&!_0xdf1012&&!!_0x3d58f2),_0x4af6f3['replaceButton']['delegate']('execute')['to'](this,'replaceContent'),_0x4af6f3['insertButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x1d7b45,_0x2e4825,_0x409c2f)=>_0x1d7b45&&!_0x2e4825&&!!_0x409c2f),_0x4af6f3['insertButton']['delegate']('execute')['to'](this,'insertContentBelow'),_0x4af6f3['tryAgainButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x2c0ce6,_0x5d3d0a)=>_0x2c0ce6&&!_0x5d3d0a),_0x4af6f3['tryAgainButton']['delegate']('execute')['to'](this,'tryAgainEvent'),_0x4af6f3['stopButton']['bind']('isEnabled')['to'](this,'isProcessing'),_0x4af6f3['stopButton']['delegate']('execute')['to'](this,'stopProcessing'),_0x4af6f3;}['startProcessing'](){this['value']='',this['isError']=!0x1,this['isProcessing']=!0x0,this['contentArea']['isVisible']=!0x0,this['toolbar']['isVisible']=!0x0,this['contentArea']['focus']();}['finishProcessing'](){const _0x52504e=this['locale'];this['isProcessing']=!0x1,this['prompt']='',this['promptView']['reset'](),this['value']&&(this['promptView']['queryView']['label']=i(_0x52504e,'Ask\x20AI\x20to\x20improve\x20generated\x20text'));}['handleError'](_0x1d28d7){const _0x14823f=this['locale'];this['finishProcessing'](),this['isError']=!0x0,this['errorView']['text']=_0x1d28d7||i(_0x14823f,'AI_ERROR_FAILED'),this['value']||(this['contentArea']['isVisible']=!0x1);}}const l=globalThis['DataTransfer'];class n extends _0x2084de{['licenseKey'];['_licenseKeyCheckInterval'];['_dialog'];['_formView'];['_aiAdapter'];['_aiAssistantController'];['_uiCssClasses']='';static get['pluginName'](){return'AIAssistantUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x1b19e1,a,x,_0x53561b];}constructor(_0x21dcda){super(_0x21dcda),_0x21dcda['config']['define']('ai.aiAssistant.disabledElements',['media','rawHtml','tableOfContents']),_0x21dcda['config']['define']('ai.aiAssistant.contentAreaCssClass',''),_0x21dcda['config']['define']('ai.useTheme',!0x0),this['_uiCssClasses']='ck-ai-assistant-ui'+(_0x21dcda['config']['get']('ai.useTheme')?'\x20ck-ai-assistant-ui_theme':'');}['init'](){const {editor:_0x248870}=this;this['_aiAdapter']=_0x248870['plugins']['get'](x),this['_dialog']=_0x248870['plugins']['get'](_0x53561b),this['_formView']=null,this['_commandDefinitions']=this['_getResolvedCommandsDefinitions']();const _0x2d6cc1=new E(_0x248870,Array['from'](this['_commandDefinitions']['values']()));_0x248870['commands']['add']('showAIAssistant',_0x2d6cc1),_0x248870['ui']['componentFactory']['add']('aiCommands',_0x41bd43=>{const _0x2342c7=_0x2e82fb(_0x41bd43);return _0x2342c7['set']({'class':'ck-ai-commands-dropdown\x20'+this['_uiCssClasses']}),_0x2342c7['buttonView']['set']({'label':i(_0x41bd43,'AI\x20Commands'),'icon':_0x367889,'tooltip':!0x0}),_0x2342c7['on']('execute',_0x382cb1=>this['_onExecute'](_0x382cb1['source']['id'])),_0x1210f7(_0x2342c7,_0x248870['ui']['view']['body'],function(_0x2cd9be){const _0x40cfd7=o(_0x2cd9be['config']['get']('ai.aiAssistant.commands'),_0x2cd9be['locale']),_0x1c0546=U(_0x2cd9be,_0x40cfd7)['filter'](_0x28887d=>_0x28887d['commands']['length']);if(0x1===_0x1c0546['length'])return U(_0x2cd9be,_0x1c0546[0x0]['commands'])['map'](_0x19bd31=>({'id':_0x19bd31['id'],'label':_0x19bd31['label']}));return _0x1c0546['map'](_0xce68e1=>{const {groupId:_0x2254e3,groupLabel:_0x2c693b,commands:_0x2de719}=_0xce68e1,_0x4bb8cc=U(_0x2cd9be,_0x2de719)['map'](_0x3c5777=>({'id':_0x3c5777['id'],'label':_0x3c5777['label']}));return{'id':_0x2254e3,'menu':_0x2c693b||_0x2254e3,'children':_0x4bb8cc};});}(_0x248870),{'ariaLabel':i(_0x41bd43,'AI\x20Commands')}),_0x2342c7['menuView']['menuPanelClass']='ck-ai-commands-dropdown\x20'+this['_uiCssClasses'],_0x2d6cc1['on']('change:enabledCommandsIds',_0x3b3505),_0x2342c7['menuView']['once']('render',_0x3b3505),_0x2342c7;function _0x3b3505(){_0x2342c7['isEnabled']=_0x2d6cc1['enabledCommandsIds']['length']>0x0;for(const _0x3a74c1 of _0x2342c7['menuView']['buttons'])_0x3a74c1['isEnabled']=_0x2d6cc1['enabledCommandsIds']['includes'](_0x3a74c1['id']);}}),_0x248870['ui']['componentFactory']['add']('menuBar:aiCommands',_0x2fe5ab=>{const _0x1ccff7=new _0x1d5dc5(_0x2fe5ab);_0x1ccff7['buttonView']['set']({'label':i(_0x2fe5ab,'AI\x20Commands'),'icon':_0x367889}),_0x1ccff7['bind']('isEnabled')['to'](_0x2d6cc1,'enabledCommandsIds',_0x4c34b0=>_0x4c34b0['length']>0x0);const _0x5e5983=o(_0x248870['config']['get']('ai.aiAssistant.commands'),_0x2fe5ab);return this['_populateMenuBarMenu'](_0x2d6cc1,_0x1ccff7,_0x5e5983,_0x1782f8=>this['_onExecute'](_0x1782f8)),_0x1ccff7;}),_0x248870['ui']['componentFactory']['add']('aiAssistant',()=>{const _0x23de32=this['_createAIAssistantUIButton'](_0x459498);return _0x23de32['set']({'tooltip':!0x0,'class':'ck-ai-assistant-button\x20'+this['_uiCssClasses']}),_0x23de32;}),_0x248870['ui']['componentFactory']['add']('menuBar:aiAssistant',()=>{const _0x4b6bf5=this['_createAIAssistantUIButton'](_0x4a4578);return _0x4b6bf5['set']({'role':'menuitemcheckbox'}),_0x4b6bf5;}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x15ed7d=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x3b4e23;for(const _0xe7d621 in _0x15ed7d){const _0x3903a2=_0xe7d621,_0x3681c8=_0x15ed7d[_0x3903a2];if('aiLicenseKeyValid'==_0x3681c8||'aiLicenseKeyInvalid'==_0x3681c8||'aiLicenseKeyExpired'==_0x3681c8||'aiLicenseKeyDomainLimit'==_0x3681c8||'aiLicenseKeyNotAllowed'==_0x3681c8||'aiLicenseKeyEvaluationLimit'==_0x3681c8||'aiLicenseKeyTrialLimit'==_0x3681c8||'aiLicenseKeyUsageLimit'==_0x3681c8){delete _0x15ed7d[_0x3903a2],_0x3b4e23=_0x3681c8,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'aiLicenseKeyInvalid'==_0x3b4e23&&_0x15ed7d['_showLicenseError']('invalid'),'aiLicenseKeyExpired'==_0x3b4e23&&_0x15ed7d['_showLicenseError']('expired'),'aiLicenseKeyDomainLimit'==_0x3b4e23&&_0x15ed7d['_showLicenseError']('domainLimit'),'aiLicenseKeyNotAllowed'==_0x3b4e23&&_0x15ed7d['_showLicenseError']('featureNotAllowed','AIAssistant'),'aiLicenseKeyEvaluationLimit'==_0x3b4e23&&_0x15ed7d['_showLicenseError']('evaluationLimit'),'aiLicenseKeyTrialLimit'==_0x3b4e23&&_0x15ed7d['_showLicenseError']('trialLimit'),'aiLicenseKeyUsageLimit'==_0x3b4e23&&_0x15ed7d['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['showUI'](_0x488716='',_0x582773='',_0x1bf545='custom'){const _0x3abd1b=this['editor'],_0x5eefbf=_0x3abd1b['editing']['view'],_0x278163=_0x3abd1b['plugins']['get'](a),_0xb2221c=_0x3abd1b['plugins']['get'](_0x1b19e1);_0x278163['showFakeVisualSelection']();const _0x56769c=new l(),_0x1cf35b=new ClipboardEvent('copy',{'clipboardData':_0x56769c}),_0x12a6d2=new _0x1c0f1e(_0x56769c),_0x440e62=new _0x4fd616(_0x5eefbf,_0x1cf35b,{'dataTransfer':_0x12a6d2});_0xb2221c['_forceMarkersCopy']('comment',()=>{_0x5eefbf['document']['fire']('copy',_0x440e62);}),this['_formView']||(this['_initView'](),this['_aiAssistantController']=new j(_0x3abd1b,this['_aiAdapter']['textAdapter'],this['_formView']));let _0x16435f=_0x12a6d2['getData']('text/html');const _0x16c7c8=_0x3abd1b['model']['document']['selection'],_0x43b0ee=Array['from'](_0x16c7c8['getRanges']());0x1===_0x43b0ee['length']&&_0x43b0ee[0x0]['isFlat']&&!_0x16c7c8['getSelectedElement']()&&''!==_0x16435f['replace'](/&nbsp;/g,'')['trim']()&&(_0x16435f='<p>'+_0x16435f+'</p>'),this['_aiAssistantController']['updateView']({'actionId':_0x1bf545,'query':_0x488716,'htmlContent':_0x16435f,'label':_0x582773,'mainActionLabel':_[_0x3abd1b['model']['document']['selection']['isCollapsed']?'INSERT':'REPLACE']}),'aiAssistant'!==this['_dialog']['id']?this['_dialog']['show']({'id':'aiAssistant','icon':_0x38f8ec,'title':i(this['editor']['locale'],'AI\x20Assistant'),'content':this['_formView'],'position':_0x323db1['EDITOR_TOP_SIDE'],'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_aiAssistantController']['reset'](),_0x278163['hideFakeVisualSelection']();}}):this['_dialog']['view']['wasMoved']||this['_dialog']['view']['updatePosition']();}['hideUI'](){this['_dialog']['hide']();}['_getResolvedCommandsDefinitions'](){const _0x15ea41=new Map(),_0x898b93=o(this['editor']['config']['get']('ai.aiAssistant.commands'),this['editor']['locale']);for(const _0x2b655c of _0x898b93)for(const _0x30a11d of _0x2b655c['commands'])_0x15ea41['set'](_0x30a11d['id'],{..._0x30a11d,'groupId':_0x2b655c['groupId'],'groupLabel':_0x2b655c['groupLabel']||_0x2b655c['groupId']});return _0x15ea41;}['_createAIAssistantUIButton'](_0x40b8c){const _0x231b02=this['editor'],_0x2dcddc=_0x231b02['commands']['get']('showAIAssistant'),_0x39889c=new _0x40b8c(_0x231b02['locale']);return _0x39889c['set']({'label':i(_0x231b02['locale'],'AI\x20Assistant'),'icon':_0x38f8ec,'isToggleable':!0x0}),_0x39889c['bind']('isEnabled')['to'](_0x2dcddc),_0x39889c['bind']('isOn')['to'](this['_dialog'],'id',_0x2be278=>'aiAssistant'===_0x2be278),this['listenTo'](_0x39889c,'execute',()=>{_0x39889c['isOn']?this['hideUI']():_0x2dcddc['execute']();}),_0x39889c;}['_initView'](){const _0x5395a1=this['editor']['plugins']['get'](a);this['_formView']=new k(this['editor']['locale'],this['_uiCssClasses'],this['editor']['config']['get']('ai.aiAssistant.contentAreaCssClass')),this['_formView']['on']('change:value',()=>{this['_dialog']['view']['wasMoved']||this['_dialog']['view']['updatePosition']();}),this['_formView']['promptView']['queryView']['fieldView']['on']('update',()=>{this['_dialog']['view']['wasMoved']||this['_dialog']['view']['updatePosition']();}),this['listenTo'](this['_formView'],'replaceContent',()=>{_0x5395a1['insertContent'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['listenTo'](this['_formView'],'insertContentBelow',()=>{_0x5395a1['insertContentBelow'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['_initAriaAiStatusChangeAnnouncements']();}['_initAriaAiStatusChangeAnnouncements'](){const {locale:_0x40f114,ui:{ariaLiveAnnouncer:_0x3f90ae}}=this['editor'];this['_formView']['contentArea']['on']('change:isProcessing',(_0x27a9de,_0x2d68e6,_0x5050ed)=>{const _0x5f26f8=this['_aiAssistantController']['currentContext'];_0x5050ed?_0x3f90ae['announce'](i(_0x40f114,'AI\x20is\x20writing')):_0x5f26f8&&_0x3f90ae['announce'](i(_0x40f114,'Generated\x20content:\x20%0',_0x5f26f8),{'politeness':'polite','isUnsafeHTML':!0x0});}),this['_formView']['on']('change:isError',(_0x3d67d6,_0xd1819,_0x2f3b59)=>{if(_0x2f3b59){const _0x5d23b8=this['_formView']['errorView']['text'];_0x3f90ae['announce'](i(_0x40f114,'Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x5d23b8));}});}['_onExecute'](_0x4a1555){const _0x12bf37=this['_commandDefinitions']['get'](_0x4a1555),_0x28e0d0=this['editor'],_0x232d6=_0x28e0d0['model']['document']['selection'],_0x9816b=_0x28e0d0['commands']['get']('showAIAssistant'),_0x4be960=_0x28e0d0['plugins']['get'](a),_0x38b891=''+(_0x12bf37['groupId']!==K?_0x12bf37['groupLabel']+':\x20':'')+_0x12bf37['label'];if(!0x1!==_0x12bf37['requiresContent']&&_0x232d6['isCollapsed']){const _0xf0a455=_0x4ad56f(_0x232d6['getSelectedBlocks']())||_0x28e0d0['model']['schema']['getLimitElement'](_0x232d6);_0x28e0d0['model']['change'](_0x405cc4=>{_0x405cc4['setSelection'](_0xf0a455,'in');});}_0x4be960['showFakeVisualSelection'](),_0x9816b['execute'](_0x12bf37['prompt'],_0x38b891,'command:'+_0x4a1555);}['_populateMenuBarMenu'](_0x2ef0fd,_0x15910b,_0x448202,_0x319331){const _0x59c10b=this['editor'],_0x3e5230=_0x59c10b['locale'],_0x20d4ee=new _0x436615(_0x3e5230),_0x3b464c=U(_0x59c10b,_0x448202)['filter'](_0x464c26=>_0x464c26['commands']['length']);0x1===_0x3b464c['length']?this['_getMenuBarGroupButtons']({'command':_0x2ef0fd,'commands':_0x3b464c[0x0]['commands'],'parentMenuView':_0x15910b,'onExecute':_0x319331})['forEach'](_0x898c98=>_0x20d4ee['items']['add'](_0x898c98)):_0x3b464c['forEach'](({groupId:_0xe50b5c,groupLabel:_0x1e30d3,commands:_0x372895})=>{const _0x46947f=new _0x423d37(_0x3e5230,_0x15910b),_0x928a5d=new _0x1d5dc5(_0x3e5230),_0x295242=new _0x436615(_0x3e5230),_0x1380d7=this['_getMenuBarGroupButtons']({'command':_0x2ef0fd,'commands':_0x372895,'parentMenuView':_0x928a5d,'onExecute':_0x319331});_0x928a5d['buttonView']['set']({'label':_0x1e30d3||_0xe50b5c}),_0x928a5d['delegate']('execute')['to'](_0x15910b),_0x295242['items']['addMany'](_0x1380d7),_0x928a5d['panelView']['children']['add'](_0x295242),_0x46947f['children']['add'](_0x928a5d),_0x20d4ee['items']['add'](_0x46947f);}),_0x15910b['panelView']['children']['add'](_0x20d4ee);}['_getMenuBarGroupButtons']({command:_0x475c5b,commands:_0x18cf8e,parentMenuView:_0x2c7b53,onExecute:_0x417ba6}){const _0x17d313=this['editor'],_0x2ba52=_0x17d313['locale'];return U(_0x17d313,_0x18cf8e)['map'](_0x7de35d=>{const _0x1cfbae=new _0x423d37(_0x2ba52,_0x2c7b53),_0x4a24d3=new _0x4a4578(_0x2ba52);return _0x4a24d3['set']({'label':_0x7de35d['label']}),_0x4a24d3['delegate']('execute')['to'](_0x2c7b53),_0x4a24d3['on']('execute',()=>_0x417ba6(_0x7de35d['id'])),_0x4a24d3['bind']('isEnabled')['to'](_0x475c5b,'enabledCommandsIds',_0x266039=>_0x266039['includes'](_0x7de35d['id'])),_0x1cfbae['children']['add'](_0x4a24d3),_0x1cfbae;});}}function T(_0xa64716,_0x4e38f8){return void 0x0!==_0xa64716['order']&&void 0x0===_0x4e38f8['order']?0x1:void 0x0===_0xa64716['order']&&void 0x0!==_0x4e38f8['order']?-0x1:void 0x0!==_0xa64716['order']&&void 0x0!==_0x4e38f8['order']?_0xa64716['order']-_0x4e38f8['order']:0x0;}function U(_0x362cff,_0x4ca829){_0x4ca829['sort'](T);const _0x53abc5={},_0x190d7e=[];for(const _0x41daca of _0x4ca829)if(void 0x0!==_0x41daca['order']){if(_0x41daca['order']in _0x53abc5)throw new _0x2fb82f('ai-commands-config-order-collision',_0x362cff,{'conflictingDefinitions':[_0x41daca,_0x53abc5[_0x41daca['order']]]});_0x53abc5[_0x41daca['order']]=_0x41daca,_0x190d7e['splice'](_0x41daca['order'],0x0,_0x41daca);}else _0x190d7e['push'](_0x41daca);return _0x190d7e;}class At extends _0x2084de{static get['requires'](){return[n,a];}static get['pluginName'](){return'AIAssistant';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xbe216c){super(_0xbe216c);const _0x4a173c=_0xbe216c['config'],_0x36fa6c=_0xbe216c['locale'];_0x4a173c['define']('ai.aiAssistant.preserveComments',!0x0),_0x4a173c['define']('ai.aiAssistant.commands',_t(_0x36fa6c)),_0x4a173c['define']('ai.aiAssistant.extraCommandGroups',[]),_0x4a173c['define']('ai.aiAssistant.removeCommands',[]);let _0x46d020=o(_0x4a173c['get']('ai.aiAssistant.commands'),_0x36fa6c);const _0x267445=_0x4a173c['get']('ai.aiAssistant.extraCommandGroups'),_0x3b96dd=_0x4a173c['get']('ai.aiAssistant.removeCommands');_0x267445['forEach'](_0x3be484=>{const _0xb8f988=_0x46d020['find'](_0x1361e6=>_0x1361e6['groupId']===_0x3be484['groupId']);_0xb8f988?_0xb8f988['commands']=_0xb8f988['commands']['concat'](_0x3be484['commands']):_0x46d020['push'](_0x3be484);}),_0x46d020=_0x46d020['filter'](_0x156928=>!_0x3b96dd['includes'](_0x156928['groupId'])),_0x46d020['forEach'](_0x2e9be4=>{_0x2e9be4['commands']=_0x2e9be4['commands']['filter'](_0x5bc76e=>!_0x3b96dd['includes'](_0x5bc76e['id']));}),_0x4a173c['set']('ai.aiAssistant.commands',_0x46d020);}}function _t(_0x2a65d1){return[{'groupId':'editOrReview','groupLabel':i(_0x2a65d1,'Edit\x20or\x20review'),'commands':[{'id':'improveWriting','label':i(_0x2a65d1,'Improve\x20writing'),'prompt':'Fix\x20spelling\x20mistakes,\x20use\x20proper\x20grammar\x20and\x20apply\x20good\x20writing\x20practices.\x20Do\x20not\x20lose\x20the\x20original\x20meaning.'},{'id':'makeShorter','label':i(_0x2a65d1,'Make\x20shorter'),'prompt':'Remove\x20any\x20repetitive,\x20redundant,\x20or\x20non-essential\x20writing\x20in\x20this\x20content\x20without\x20changing\x20the\x20meaning\x20or\x20losing\x20any\x20key\x20information.'},{'id':'makeLonger','label':i(_0x2a65d1,'Make\x20longer'),'prompt':'Improve\x20this\x20content\x20by\x20using\x20descriptive\x20language\x20and\x20inserting\x20more\x20information\x20and\x20more\x20detailed\x20explanations.'},{'id':'simplifyLanguage','label':i(_0x2a65d1,'Simplify\x20language'),'prompt':'Simplify\x20the\x20writing\x20style\x20of\x20this\x20content\x20and\x20reduce\x20the\x20complexity,\x20so\x20that\x20the\x20content\x20is\x20easy\x20to\x20understand.'}]},{'groupId':'generate','groupLabel':i(_0x2a65d1,'Generate\x20from\x20selection'),'commands':[{'id':'summarize','label':i(_0x2a65d1,'Summarize'),'prompt':'Summarize\x20this\x20content\x20into\x20one\x20paragraph\x20of\x20text.\x20Include\x20only\x20the\x20key\x20ideas\x20and\x20conclusions.\x20Keep\x20it\x20short.\x20Do\x20not\x20keep\x20original\x20text\x20formatting.'},{'id':'continue','label':i(_0x2a65d1,'Continue'),'prompt':'Start\x20with\x20the\x20provided\x20content\x20and\x20write\x20at\x20the\x20end\x20of\x20it\x20continuing\x20this\x20topic.\x20Keep\x20the\x20added\x20part\x20short.'}]},{'groupId':'changeTone','groupLabel':i(_0x2a65d1,'Change\x20tone'),'commands':[{'id':'professional','label':i(_0x2a65d1,'Professional'),'prompt':'Improve\x20using\x20polished,\x20formal,\x20and\x20respectful\x20language\x20to\x20convey\x20professional\x20expertise\x20and\x20competence.'},{'id':'casual','label':i(_0x2a65d1,'Casual'),'prompt':'Improve\x20using\x20casual,\x20informal\x20language\x20to\x20convey\x20a\x20casual\x20conversation\x20with\x20a\x20real\x20person.'},{'id':'direct','label':i(_0x2a65d1,'Direct'),'prompt':'Improve\x20using\x20direct\x20language,\x20using\x20only\x20the\x20essential\x20information.'},{'id':'confident','label':i(_0x2a65d1,'Confident'),'prompt':'Improve\x20using\x20compelling,\x20optimistic\x20language\x20to\x20convey\x20confidence\x20in\x20the\x20writing.'},{'id':'friendly','label':i(_0x2a65d1,'Friendly'),'prompt':'Improve\x20using\x20friendly,\x20comforting\x20language,\x20to\x20convey\x20understanding\x20and\x20empathy.'}]},{'groupId':'changeStyle','groupLabel':i(_0x2a65d1,'Change\x20style'),'commands':[{'id':'business','label':i(_0x2a65d1,'Business'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20business\x20professional\x20with\x20formal\x20language.'},{'id':'legal','label':i(_0x2a65d1,'Legal'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20legal\x20professional\x20using\x20valid\x20legal\x20terminology.'},{'id':'journalism','label':i(_0x2a65d1,'Journalism'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20journalist\x20using\x20engaging\x20language\x20to\x20convey\x20the\x20importance\x20of\x20the\x20information.'},{'id':'poetic','label':i(_0x2a65d1,'Poetic'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20poem\x20using\x20poetic\x20techniques\x20without\x20losing\x20the\x20original\x20meaning.'}]},{'groupId':'translate','groupLabel':i(_0x2a65d1,'Translate'),'commands':[{'id':'translateEnglish','label':i(_0x2a65d1,'English'),'prompt':'Translate\x20the\x20content\x20to\x20English\x20language.'},{'id':'translateSpanish','label':i(_0x2a65d1,'Spanish'),'prompt':'Translate\x20the\x20content\x20to\x20Spanish\x20language.'},{'id':'translatePortuguese','label':i(_0x2a65d1,'Portuguese'),'prompt':'Translate\x20the\x20content\x20to\x20Portuguese\x20language.'},{'id':'translateGerman','label':i(_0x2a65d1,'German'),'prompt':'Translate\x20the\x20content\x20to\x20German\x20language.'},{'id':'translateFrench','label':i(_0x2a65d1,'French'),'prompt':'Translate\x20the\x20content\x20to\x20French\x20language.'},{'id':'translateChinese','label':i(_0x2a65d1,'Simplified\x20Chinese'),'prompt':'Translate\x20the\x20content\x20to\x20Simplified\x20Chinese\x20language.'},{'id':'translateHindi','label':i(_0x2a65d1,'Hindi'),'prompt':'Translate\x20the\x20content\x20to\x20Hindi\x20language.'},{'id':'translateArabic','label':i(_0x2a65d1,'Arabic'),'prompt':'Translate\x20the\x20content\x20to\x20Arabic\x20language.'}]}];}class S extends _0x2084de{['abortController'];static get['requires'](){return[x];}constructor(_0x434c69){super(_0x434c69),this['abortController']=new AbortController();}['init'](){this['editor']['plugins']['get'](x)['textAdapter']=this;}['abort'](){this['abortController']['signal']['aborted']||(this['abortController']['abort'](),this['abortController']=new AbortController());}async['makeRequest'](_0x4cfaea){return this['sendRequest'](_0x4cfaea)['catch'](_0x4836af=>{if(_0x4836af instanceof R)return Promise['reject'](_0x4836af);if('AbortError'==_0x4836af['name'])return Promise['resolve']();throw console['error'](_0x4836af),new _0x2fb82f('aitextadapter-send-request-failed',null);});}async['_prepareRequestHeaders'](_0x7d5114,_0x1fbd2a){const _0x5c7df2=this['editor']['locale'],_0x45f205={'Content-Type':'application/json'};if('object'==typeof _0x7d5114)Object['assign'](_0x45f205,_0x7d5114);else{if(_0x7d5114)try{const _0x1333fd=await _0x7d5114(_0x1fbd2a);Object['assign'](_0x45f205,_0x1333fd);}catch{return Promise['reject'](new R(i(_0x5c7df2,'AI_ERROR_GET_HEADERS')));}}return _0x45f205;}async['_prepareRequestParameters'](_0x342e07,_0x38c825){const _0x4b1052=this['editor']['locale'];if('object'==typeof _0x342e07)return _0x342e07;try{return await _0x342e07(_0x38c825);}catch{return Promise['reject'](new R(i(_0x4b1052,'AI_ERROR_GET_PARAMETERS')));}}}class It extends S{['_apiUrl'];['_requestHeaders'];['_requestParameters'];static get['pluginName'](){return'OpenAITextAdapter';}constructor(_0x3ad5bf){super(_0x3ad5bf),_0x3ad5bf['config']['define']('ai.openAI.apiUrl','https://api.openai.com/v1/chat/completions'),_0x3ad5bf['config']['get']('ai.openAI.requestParameters')||_0x3ad5bf['config']['define']('ai.openAI.requestParameters',{'model':'gpt-4o','temperature':0x1,'top_p':0x1,'stream':!0x0}),this['_apiUrl']=_0x3ad5bf['config']['get']('ai.openAI.apiUrl'),this['_requestHeaders']=_0x3ad5bf['config']['get']('ai.openAI.requestHeaders')||{},this['_requestParameters']=_0x3ad5bf['config']['get']('ai.openAI.requestParameters');}async['sendRequest']({query:_0xef5921,context:_0x28d6e9,onData:_0x14f204,actionId:_0x2d85b0}){const _0x136031=this['editor']['locale'],_0x2ac712=await this['prepareMessages'](_0xef5921,_0x28d6e9,_0x2d85b0),_0x137921=await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x2d85b0),_0x4c73f9=await this['_prepareRequestParameters'](this['_requestParameters'],_0x2d85b0),_0x26a725={'messages':_0x2ac712,..._0x4c73f9},_0x27191f={'method':'POST','headers':_0x137921,'body':JSON['stringify'](_0x26a725),'signal':this['abortController']['signal']},_0x171423=await fetch(this['_apiUrl'],_0x27191f);if(_0x171423['ok'])return _0x4c73f9['stream']?await this['_readStreamableResponse'](_0x171423,_0x14f204):await this['_readStaticResponse'](_0x171423,_0x14f204),Promise['resolve']();{const _0x28794e=await _0x171423['text']();return _0x28794e['includes']('context_length_exceeded')?Promise['reject'](new R(i(_0x136031,'AI_ERROR_CONTEXT_LENGTH'))):_0x28794e['includes']('Moderation')?Promise['reject'](new R(i(_0x136031,'AI_ERROR_MODERATION'))):Promise['reject'](new Error(_0x28794e));}}async['prepareMessages'](_0x56cd80,_0x1b0105,_0x248429){let _0x307826,_0x5ac575;return _0x1b0105?(_0x307826='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.',_0x5ac575='Instruction:\x0a'+_0x56cd80+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x1b0105):(_0x307826='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.',_0x5ac575=_0x56cd80),[{'role':'system','content':_0x307826},{'role':'user','content':_0x5ac575}];}async['_readStreamableResponse'](_0x29759a,_0xad5aec){const _0x11b572=_0x29759a['body']['getReader'](),_0x27419c=new TextDecoder();let _0x5ebad6='',_0x132a8e='',_0x5a436e='',_0x4a656c=!0x1;for(;!_0x4a656c;){const {done:_0x40ae98,value:_0x4890dd}=await _0x11b572['read'](),_0x58aba8=_0x5ebad6+_0x27419c['decode'](_0x4890dd);let _0x13332a='';_0x4a656c=_0x40ae98;try{_0x13332a=this['_cleanUpData'](_0x58aba8),_0x5ebad6='';}catch{_0x5ebad6=_0x58aba8;continue;}_0x132a8e+=_0x13332a,!_0x4a656c&&this['_isBufferIncomplete'](_0x132a8e)||_0x132a8e&&(_0x5a436e+=_0x132a8e,_0x132a8e='',_0xad5aec(_0x5a436e));}return Promise['resolve']();}async['_readStaticResponse'](_0x437409,_0x109746){return _0x109746((await _0x437409['json']())['choices'][0x0]['message']['content']),Promise['resolve']();}['_isBufferIncomplete'](_0x5f5107){const _0x554c04=_0x5f5107['split']('<')['length']!==_0x5f5107['split']('>')['length'],_0x4282e7=_0x5f5107['length']<0x1e;return _0x554c04&&_0x4282e7;}['_cleanUpData'](_0x17c7e3){return _0x17c7e3['split'](/\n(?![^{]*\})/g)['map'](_0x3562d5=>_0x3562d5['replace']('data:\x20',''))['filter'](_0x4f852a=>_0x4f852a&&_0x4f852a['length']>0x0&&'[DONE]'!==_0x4f852a)['map'](_0x46bdda=>{const {choices:_0x4447c7}=JSON['parse'](_0x46bdda);if(_0x4447c7[0x0]?.['delta']?.['content'])return _0x4447c7[0x0]['delta']['content'];})['filter'](_0x575741=>_0x575741)['join']('');}}class Et extends S{['_apiUrl'];['_requestHeaders'];['_bedrockClientConfig'];['_requestParameters'];static get['pluginName'](){return'AWSTextAdapter';}constructor(_0x2359c0){super(_0x2359c0),_0x2359c0['config']['get']('ai.aws.requestParameters')||_0x2359c0['config']['define']('ai.aws.requestParameters',{'model':'anthropic.claude-v2','max_tokens_to_sample':0x7d0,'temperature':0x1,'top_p':0x1,'top_k':0xfa,'anthropic_version':'bedrock-2023-05-31','stream':!0x0}),this['_apiUrl']=_0x2359c0['config']['get']('ai.aws.apiUrl'),this['_bedrockClientConfig']=_0x2359c0['config']['get']('ai.aws.bedrockClientConfig'),this['_requestHeaders']=_0x2359c0['config']['get']('ai.aws.requestHeaders'),this['_requestParameters']=_0x2359c0['config']['get']('ai.aws.requestParameters');}async['sendRequest']({query:_0x577482,context:_0x3521f3,onData:_0x4a8196,actionId:_0x168648}){const {model:_0x30d043,stream:_0x1b9de0,..._0x838602}=await this['_prepareRequestParameters'](this['_requestParameters'],_0x168648),_0x4429b4={'prompt':await this['preparePrompt'](_0x577482,_0x3521f3,_0x30d043,_0x168648),..._0x838602};this['_apiUrl']?await this['_processProxyRequest'](_0x4429b4,_0x30d043,_0x1b9de0,_0x4a8196,_0x168648):await this['_processAWSRequest'](_0x4429b4,_0x30d043,_0x1b9de0,_0x4a8196);}async['preparePrompt'](_0x46ef13,_0x3431c6,_0x38804a,_0x5b4698){let _0x29f67f,_0x11b5b2;return _0x3431c6?(_0x29f67f='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.',_0x11b5b2='Instruction:\x0a'+_0x46ef13+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x3431c6):(_0x29f67f='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.',_0x11b5b2=_0x46ef13),'meta.llama'==this['getModelFamily'](_0x38804a)?'<<SYS>>\x0a'+_0x29f67f+'\x0a<</SYS>>\x0a[INST]\x0a'+_0x11b5b2+'\x0a[/INST]':'Human:\x0a'+_0x29f67f+'\x0a'+_0x11b5b2+'\x0a\x0aAssistant:';}['getModelFamily'](_0x4116ca){if(/^anthropic\.claude/['test'](_0x4116ca))return'anthropic.claude';if(/^ai21\.j2/['test'](_0x4116ca))return'ai21.j2';if(/^cohere\.command/['test'](_0x4116ca))return'cohere.command';if(/^meta\.llama/['test'](_0x4116ca))return'meta.llama';throw new R(i(this['editor']['locale'],'AI_ERROR_UNSUPPORTED_MODEL',_0x4116ca));}async['_processProxyRequest'](_0x1a6e59,_0x40da0d,_0x359d58,_0x3bdd97,_0x166431){const _0x8e28e5={'method':'POST','headers':await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x166431),'body':JSON['stringify']({..._0x1a6e59,'model':_0x40da0d,'stream':_0x359d58}),'signal':this['abortController']['signal']},_0x531ded=await fetch(this['_apiUrl'],_0x8e28e5);_0x359d58?await this['_readStreamableResponse'](_0x531ded,_0x40da0d,_0x3bdd97):await this['_readStaticResponse'](_0x531ded,_0x40da0d,_0x3bdd97);}async['_processAWSRequest'](_0x38f1ec,_0x3a4027,_0xddbd3d,_0x1cccca){const _0xc6c11a=new _0x501e7f(this['_bedrockClientConfig']),_0x6cfd5b={'body':JSON['stringify'](_0x38f1ec),'contentType':'application/json','accept':'application/json','modelId':_0x3a4027};let _0x55ba7b;if(_0xddbd3d){const _0x4a587f=new _0x1f8225(_0x6cfd5b);_0x55ba7b=await _0xc6c11a['send'](_0x4a587f,{'abortSignal':this['abortController']['signal']}),await this['_readAsyncIterableResponse'](_0x55ba7b,_0x3a4027,_0x1cccca);}else{const _0x5291ea=new _0x29e835(_0x6cfd5b);_0x55ba7b=await _0xc6c11a['send'](_0x5291ea,{'abortSignal':this['abortController']['signal']}),await this['_readStaticResponse'](_0x55ba7b,_0x3a4027,_0x1cccca);}}async['_readAsyncIterableResponse'](_0x36c234,_0x1f9ad6,_0x5186ae){const _0x19e0b5=_0x36c234['body'],_0x5c5d0c=new TextDecoder('utf-8');let _0x521aca='';for await(const _0x2b6479 of _0x19e0b5)if(_0x2b6479['chunk']){const _0x2e17f5=_0x5c5d0c['decode'](_0x2b6479['chunk']['bytes']),_0x4223e9=JSON['parse'](_0x2e17f5);_0x521aca+=this['_getGeneratedText'](_0x4223e9,_0x1f9ad6),_0x5186ae(_0x521aca);}return Promise['resolve']();}async['_readStreamableResponse'](_0x258646,_0x106f15,_0x4007cb){const _0x2d37e3=_0x258646['body'],_0x5a0c07=new TextDecoder('utf-8'),_0x9526b3=_0x2d37e3['getReader']();let _0x47b030='',_0x423b8a='',_0x39830d=!0x1;for(;!_0x39830d;){const {done:_0x9e4cab,value:_0x4fb679}=await _0x9526b3['read']();if(_0x39830d=_0x9e4cab,_0x39830d)break;const _0x2cdf81=(_0x47b030+_0x5a0c07['decode'](_0x4fb679))['split']('\x0a')['map'](_0x5acd01=>{try{return _0x47b030='',JSON['parse'](_0x5acd01);}catch{return _0x47b030=_0x5acd01,null;}})['filter'](_0x206cff=>null!==_0x206cff);_0x2cdf81['length']&&(_0x423b8a+=_0x2cdf81['map'](_0x3b1f48=>this['_getGeneratedText'](_0x3b1f48,_0x106f15))['join'](''),_0x4007cb(_0x423b8a));}return Promise['resolve']();}async['_readStaticResponse'](_0x2bb9f6,_0x4f6f96,_0x5d1fc0){let _0x26bc44;return _0x26bc44=_0x2bb9f6 instanceof Response?await _0x2bb9f6['json']():JSON['parse'](new TextDecoder('utf-8')['decode'](_0x2bb9f6['body'])),(_0x5d1fc0(this['_getGeneratedText'](_0x26bc44,_0x4f6f96)),Promise['resolve']());}['_getGeneratedText'](_0x2aec11,_0x354872){switch(this['getModelFamily'](_0x354872)){case'anthropic.claude':return _0x2aec11['completion'];case'ai21.j2':return _0x2aec11['completions'][0x0]['data']['text'];case'cohere.command':return _0x2aec11['generations'][0x0]['text'];case'meta.llama':return _0x2aec11['generation'];}}}export{x as AIAdapter,At as AIAssistant,n as AIAssistantUI,R as AIRequestError,S as AITextAdapter,Et as AWSTextAdapter,It as OpenAITextAdapter,E as ShowAIAssistantCommand,_t as getDefaultAICommands};
23
+ import{Plugin as _0x229599,Command as _0x5ef009}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconCopy as _0x52d84e,IconCheck as _0x34aa88,IconError as _0x136f15,IconSubmit as it,IconHistory as tt,IconMagicWand as _0x1763b6,IconRobotPencil as _0x4c2773}from'@ckeditor/ckeditor5-icons/dist/index.js';import{uid as _0x45b22a,CKEditorError as _0x4853ec,ObservableMixin as _0x1fca45,global as _0x3b0b8,isVisible as _0x556e7e,Rect as _0x26ebfa,Collection as _0x4a2166,FocusTracker as et,KeystrokeHandler as rt,first as _0xa95bf}from'@ckeditor/ckeditor5-utils/dist/index.js';import{ToolbarView as ot,ButtonView as _0x451bcf,View as _0x3edbc3,SpinnerView as _0x4b67f5,IconView as _0x22adfe,AutocompleteView as st,ListView as yt,ListItemGroupView as Ct,ListItemView as xt,ButtonLabelView as wt,FocusCycler as ht,createLabeledTextarea as nt,Dialog as _0x380b7d,createDropdown as _0x58c081,addMenuToDropdown as _0x1156b2,MenuBarMenuView as _0x3f8494,MenuBarMenuListItemButtonView as _0x4bb7ac,DialogViewPosition as _0x1b757b,MenuBarMenuListView as _0x5c77e6,MenuBarMenuListItemView as _0x1ffa5c}from'@ckeditor/ckeditor5-ui/dist/index.js';import{ClipboardPipeline as _0x2ea3da,ClipboardMarkersUtils as _0x52718a}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{ViewDocumentDomEventData as _0x3cd63,ViewDataTransfer as _0x1ad6a4,ViewUpcastWriter as _0x667fee,Matcher as _0x1cc8f3}from'@ckeditor/ckeditor5-engine/dist/index.js';import{unescape as kt,escape as ft}from'es-toolkit/compat';import{BedrockRuntimeClient as _0x491405,InvokeModelWithResponseStreamCommand as _0x16efbc,InvokeModelCommand as _0x27592f}from'@aws-sdk/client-bedrock-runtime';const K='_ungrouppedCommands';function o(_0x339a36,_0x21d676){const _0x4850e1=(0x0,_0x21d676['t'])('Other');return _0x339a36['length']?'groupId'in _0x339a36[0x0]?_0x339a36:[{'groupId':K,'groupLabel':_0x4850e1,'order':0x1/0x0,'commands':_0x339a36}]:[{'groupId':K,'groupLabel':_0x4850e1,'order':0x1/0x0,'commands':[]}];}const gt=globalThis['DataTransfer'],w='ai-ui';class a extends _0x229599{static get['pluginName'](){return'AIAssistantEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x2eb756}=this,_0x402eab=['ck-fake-ai-selection'];_0x2eb756['config']['get']('ai.useTheme')&&_0x402eab['push']('ck-ai-assistant-ui_theme'),_0x2eb756['conversion']['for']('editingDowncast')['markerToHighlight']({'model':w,'view':{'classes':_0x402eab,'priority':0xc}}),_0x2eb756['conversion']['for']('editingDowncast')['markerToElement']({'model':w,'view':(_0x4fd686,{writer:_0x56e3ff})=>{if(!_0x4fd686['markerRange']['isCollapsed'])return null;const _0x38ef76=_0x56e3ff['createUIElement']('span');return _0x56e3ff['addClass'](['ck-fake-ai-selection','ck-fake-ai-selection_collapsed'],_0x38ef76),_0x38ef76;}});}['afterInit'](){!async function(_0x43ac02){const _0x4a444b=_0x26773e([0x4d,0x52,0x6d,0x47,0x6a,0x4b,0x34,0x32,0x51,0x6e,0x63,0x4f,0x67,0x43,0x39,0x7a,0x46,0x65,0x61,0x38,0x64,0x41,0x49,0x6f,0x4a,0x35,0x6b,0x56,0x75,0x37,0x79,0x73,0x54,0x4e,0x44,0x62,0x36,0x78,0x70,0x48,0x45,0x55,0x57,0x76,0x58,0x31,0x5a,0x6c,0x42,0x69,0x30,0x53,0x74,0x77,0x50,0x59,0x66,0x4c,0x68,0x33,0x71,0x72]),_0x228025=0x415b3ba1,_0x5e44c6=0x415c54a9^_0x228025,_0x46b539=window[_0x26773e([0x44,0x61,0x74,0x65])][_0x26773e([0x6e,0x6f,0x77])](),_0x45b8c8=_0x43ac02[_0x26773e([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x3562d2=new window[(_0x26773e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x38c951=>{_0x45b8c8[_0x26773e([0x6f,0x6e,0x63,0x65])](_0x26773e([0x72,0x65,0x61,0x64,0x79]),_0x38c951);}),_0x398e96={[_0x26773e([0x6b,0x74,0x79])]:_0x26773e([0x45,0x43]),[_0x26773e([0x75,0x73,0x65])]:_0x26773e([0x73,0x69,0x67]),[_0x26773e([0x63,0x72,0x76])]:_0x26773e([0x50,0x2d,0x32,0x35,0x36]),[_0x26773e([0x78])]:_0x26773e([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x26773e([0x79])]:_0x26773e([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x26773e([0x61,0x6c,0x67])]:_0x26773e([0x45,0x53,0x32,0x35,0x36])},_0x7fdaac=_0x45b8c8[_0x26773e([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x26773e([0x67,0x65,0x74])](_0x26773e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x51555a(){let _0x2110bd,_0x4b982a=null,_0x5869a9=null;try{if(_0x7fdaac==_0x26773e([0x47,0x50,0x4c]))return _0x26773e([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x2110bd=_0x2507ac(),!_0x2110bd)return _0x26773e([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x2110bd[_0x26773e([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x5869a9=_0x14a1bf(_0x2110bd[_0x26773e([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x2110bd[_0x26773e([0x6a,0x74,0x69])])),await _0x9fc471()?_0x377205()?_0x436170()?_0x26773e([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x570a0a()?(_0x2110bd[_0x26773e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x26773e([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x4b982a=_0x57ef37(_0x26773e([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x2110bd[_0x26773e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x26773e([0x74,0x72,0x69,0x61,0x6c])&&(_0x4b982a=_0x57ef37(_0x26773e([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x41ec5a()):_0x26773e([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x26773e([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x26773e([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x26773e([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x436170(){const _0x45019e=[_0x26773e([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x26773e([0x74,0x72,0x69,0x61,0x6c])][_0x26773e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2110bd[_0x26773e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x46b539/0x3e8:0xe10*_0x5e44c6;return _0x2110bd[_0x26773e([0x65,0x78,0x70])]<_0x45019e;}function _0x377205(){const _0x16f2a4=_0x2110bd[_0x26773e([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x16f2a4&&(!!_0x16f2a4[_0x26773e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x26773e([0x2a]))||!!_0x16f2a4[_0x26773e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x26773e([0x41,0x49])));}function _0x570a0a(){const _0x1d4ace=_0x2110bd[_0x26773e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x1d4ace||0x0==_0x1d4ace[_0x26773e([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x3d98df}=new URL(window[_0x26773e([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x1d4ace[_0x26773e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3d98df))return!0x0;const _0x7bfa73=_0x3d98df[_0x26773e([0x73,0x70,0x6c,0x69,0x74])](_0x26773e([0x2e]));return _0x1d4ace[_0x26773e([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x16627a=>_0x16627a[_0x26773e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x26773e([0x2a])))[_0x26773e([0x6d,0x61,0x70])](_0x1fdc1e=>_0x1fdc1e[_0x26773e([0x73,0x70,0x6c,0x69,0x74])](_0x26773e([0x2e])))[_0x26773e([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x16d3ef=>_0x16d3ef[_0x26773e([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x7bfa73[_0x26773e([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x26773e([0x6d,0x61,0x70])](_0x56319f=>Array(_0x7bfa73[_0x26773e([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x56319f[_0x26773e([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x26773e([0x66,0x69,0x6c,0x6c])](_0x56319f[0x0]===_0x26773e([0x2a])?_0x26773e([0x2a]):'')[_0x26773e([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x56319f))[_0x26773e([0x73,0x6f,0x6d,0x65])](_0xce4618=>_0x7bfa73[_0x26773e([0x65,0x76,0x65,0x72,0x79])]((_0x5d0e95,_0x46efa6)=>_0xce4618[_0x46efa6]===_0x5d0e95||_0xce4618[_0x46efa6]===_0x26773e([0x2a])));}function _0x41ec5a(){return _0x4b982a&&_0x5869a9?new window[(_0x26773e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x23de1d,_0x2717ed)=>{_0x4b982a[_0x26773e([0x74,0x68,0x65,0x6e])](_0x23de1d,_0x2717ed),_0x5869a9[_0x26773e([0x74,0x68,0x65,0x6e])](_0x55566a=>{_0x55566a!=_0x26773e([0x56,0x61,0x6c,0x69,0x64])&&_0x23de1d(_0x55566a);},_0x2717ed);}):_0x4b982a||_0x5869a9||_0x26773e([0x56,0x61,0x6c,0x69,0x64]);}}function _0x14a1bf(_0x3beeff,_0x234b3d){return new window[(_0x26773e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x17504c=>{if(_0x2ec656())return _0x17504c(_0x26773e([0x56,0x61,0x6c,0x69,0x64]));_0xbe13a4(),_0x45b8c8[_0x26773e([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x26773e([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x14fc8b=!0x1;const _0x1c928e=_0x45b22a();function _0x1930aa(_0x13aec5){return!!_0x13aec5&&(typeof _0x13aec5===_0x26773e([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x13aec5===_0x26773e([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x13aec5[_0x26773e([0x74,0x68,0x65,0x6e])]===_0x26773e([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x13aec5[_0x26773e([0x63,0x61,0x74,0x63,0x68])]===_0x26773e([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x429552(_0x1948f6){_0x40a6ab(_0x1948f6)[_0x26773e([0x74,0x68,0x65,0x6e])](_0x3567a5=>{if(!_0x3567a5||_0x3567a5[_0x26773e([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x26773e([0x6f,0x6b]))return _0x26773e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x3edfbc(_0x4e29ec(_0x1c928e+_0x234b3d))!=_0x3567a5[_0x26773e([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x26773e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x26773e([0x56,0x61,0x6c,0x69,0x64]);})[_0x26773e([0x74,0x68,0x65,0x6e])](_0x159460=>(_0xfc2641(),_0x159460),()=>{const _0x39196b=_0x414007();return null==_0x39196b?(_0xfc2641(),_0x26773e([0x56,0x61,0x6c,0x69,0x64])):_0x26773e(_0x46b539-_0x39196b>(0x6557bfa1^_0x228025)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x26773e([0x74,0x68,0x65,0x6e])](_0x17504c)[_0x26773e([0x63,0x61,0x74,0x63,0x68])](()=>{_0x17504c(_0x26773e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x1e5d50=0x416dd521^_0x228025;function _0xfc2641(){const _0x4ae625=_0x26773e([0x6c,0x6c,0x63,0x74,0x2d])+_0x3edfbc(_0x4e29ec(_0x3beeff)),_0x46f56c=_0x3b1c60(_0x3edfbc(window[_0x26773e([0x4d,0x61,0x74,0x68])][_0x26773e([0x63,0x65,0x69,0x6c])](_0x46b539/_0x1e5d50)));window[_0x26773e([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x26773e([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4ae625,_0x46f56c);}function _0x414007(){const _0x3fa275=_0x26773e([0x6c,0x6c,0x63,0x74,0x2d])+_0x3edfbc(_0x4e29ec(_0x3beeff)),_0x3a1f60=window[_0x26773e([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x26773e([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3fa275);return _0x3a1f60?window[_0x26773e([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3b1c60(_0x3a1f60),0x10)*_0x1e5d50:null;}function _0x40a6ab(_0x3c7e65){return new window[(_0x26773e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3395e4,_0x5c3aa1)=>{_0x3c7e65[_0x26773e([0x74,0x68,0x65,0x6e])](_0x3395e4,_0x5c3aa1),window[_0x26773e([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x5c3aa1,0x415aef61^_0x228025);});}}_0x45b8c8[_0x26773e([0x6f,0x6e])](_0x26773e([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x428ab3,_0x4785e7)=>{if(_0x4785e7[0x0]!=_0x3beeff)return _0x17504c(_0x26773e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x4785e7[0x1]={..._0x4785e7[0x1],[_0x26773e([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x1c928e};},{[_0x26773e([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x26773e([0x68,0x69,0x67,0x68])}),_0x45b8c8[_0x26773e([0x6f,0x6e])](_0x26773e([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x268282=>{_0x1930aa(_0x268282[_0x26773e([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x14fc8b=!0x0,_0x429552(_0x268282[_0x26773e([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x26773e([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x26773e([0x6c,0x6f,0x77])}),_0x3562d2[_0x26773e([0x74,0x68,0x65,0x6e])](()=>{_0x14fc8b||_0x17504c(_0x26773e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x2ec656(){return _0x45b8c8[_0x26773e([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x26773e([0x76,0x69,0x65,0x77])][_0x26773e([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x26773e([0x61,0x75,0x74,0x6f]);}function _0xbe13a4(){_0x45b8c8[_0x26773e([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x26773e([0x76,0x69,0x65,0x77])][_0x26773e([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x26773e([0x61,0x75,0x74,0x6f]);}}function _0x57ef37(_0x37c97b){const _0x314bb6=[new window[(_0x26773e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4c4e35=>setTimeout(_0x4c4e35,0x4152056d^_0x228025)),_0x3562d2[_0x26773e([0x74,0x68,0x65,0x6e])](()=>new window[(_0x26773e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x31731e=>{let _0xccadb9=0x0;_0x45b8c8[_0x26773e([0x6d,0x6f,0x64,0x65,0x6c])][_0x26773e([0x6f,0x6e])](_0x26773e([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0xe873c8,_0x160c7f)=>{_0x160c7f[0x0][_0x26773e([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0xccadb9++,_0xccadb9==(0x415b3a59^_0x228025)&&(_0x31731e(),_0xe873c8[_0x26773e([0x6f,0x66,0x66])]());});}))];return window[_0x26773e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x26773e([0x72,0x61,0x63,0x65])](_0x314bb6)[_0x26773e([0x74,0x68,0x65,0x6e])](()=>_0x37c97b);}async function _0x2f5d71(){await _0x3562d2,_0x45b8c8[_0x26773e([0x6d,0x6f,0x64,0x65,0x6c])][_0x26773e([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x1b1501,_0x45b8c8[_0x26773e([0x6d,0x6f,0x64,0x65,0x6c])][_0x26773e([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x1b1501,_0x45b8c8[_0x26773e([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x26773e([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x399517(_0x15cfc3){const _0xef0b7a=_0x399e8f();_0x45b8c8[_0xef0b7a]=_0x26773e([0x61,0x69,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x15cfc3,_0x15cfc3!=_0x26773e([0x56,0x61,0x6c,0x69,0x64])&&_0x2f5d71();}function _0x399e8f(){const _0x312ffd=window[_0x26773e([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x26773e([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x26773e([0x6e,0x6f,0x77])]())[_0x26773e([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x26773e([0x2e]),'');let _0x47ac49=_0x26773e([0x4d]);for(let _0x1460a9=0x0;_0x1460a9<_0x312ffd[_0x26773e([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1460a9+=0x2){let _0x4ec10a=window[_0x26773e([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x312ffd[_0x26773e([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1460a9,_0x1460a9+0x2));_0x4ec10a>=_0x4a444b[_0x26773e([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x4ec10a-=_0x4a444b[_0x26773e([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x47ac49+=_0x4a444b[_0x4ec10a];}return _0x47ac49;}function _0x2507ac(){const _0x35d17e=_0x7fdaac[_0x26773e([0x73,0x70,0x6c,0x69,0x74])](_0x26773e([0x2e]));if(0x3!=_0x35d17e[_0x26773e([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x540f61(_0x35d17e[0x1]);function _0x540f61(_0x361515){const _0x56915d=_0x3579e2(_0x361515);return _0x56915d&&_0x5b12f4()?_0x56915d:null;function _0x5b12f4(){const _0x3cc2c5=_0x56915d[_0x26773e([0x6a,0x74,0x69])],_0x3e8015=window[_0x26773e([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3cc2c5[_0x26773e([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3cc2c5[_0x26773e([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x82652e={..._0x56915d,[_0x26773e([0x6a,0x74,0x69])]:_0x3cc2c5[_0x26773e([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x3cc2c5[_0x26773e([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x82652e[_0x26773e([0x76,0x63])],_0x4e29ec(_0x82652e)==_0x3e8015;}}}async function _0x9fc471(){let _0x299bcb=!0x0;try{const _0x3743c5=_0x7fdaac[_0x26773e([0x73,0x70,0x6c,0x69,0x74])](_0x26773e([0x2e])),[_0x1e9248,_0x18ebe4,_0x5e0d2e]=_0x3743c5;return _0x55f15d(_0x1e9248),await _0x54576c(_0x1e9248,_0x18ebe4,_0x5e0d2e),_0x299bcb;}catch{return!0x1;}function _0x55f15d(_0x593466){const _0x38350a=_0x3579e2(_0x593466);_0x38350a&&_0x38350a[_0x26773e([0x61,0x6c,0x67])]==_0x26773e([0x45,0x53,0x32,0x35,0x36])||(_0x299bcb=!0x1);}async function _0x54576c(_0x1bc2ff,_0x19e605,_0x28cb02){const _0x4be74d=window[_0x26773e([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x26773e([0x66,0x72,0x6f,0x6d])](_0x2a8aae(_0x28cb02),_0x3724a8=>_0x3724a8[_0x26773e([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x2f4619=new window[(_0x26773e([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x26773e([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x1bc2ff+_0x26773e([0x2e])+_0x19e605),_0x283f47=window[_0x26773e([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x26773e([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x283f47)return;const _0x336738=await _0x283f47[_0x26773e([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x26773e([0x6a,0x77,0x6b]),_0x398e96,{[_0x26773e([0x6e,0x61,0x6d,0x65])]:_0x26773e([0x45,0x43,0x44,0x53,0x41]),[_0x26773e([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x26773e([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x26773e([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x283f47[_0x26773e([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x26773e([0x6e,0x61,0x6d,0x65])]:_0x26773e([0x45,0x43,0x44,0x53,0x41]),[_0x26773e([0x68,0x61,0x73,0x68])]:{[_0x26773e([0x6e,0x61,0x6d,0x65])]:_0x26773e([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x336738,_0x4be74d,_0x2f4619)||(_0x299bcb=!0x1);}}function _0x3579e2(_0x374036){return _0x374036[_0x26773e([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x26773e([0x65,0x79]))?JSON[_0x26773e([0x70,0x61,0x72,0x73,0x65])](_0x2a8aae(_0x374036)):null;}function _0x2a8aae(_0x29d44f){return window[_0x26773e([0x61,0x74,0x6f,0x62])](_0x29d44f[_0x26773e([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x26773e([0x2b]))[_0x26773e([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x26773e([0x2f])));}function _0x4e29ec(_0x27d3c2){let _0x22ada1=0x1505;function _0x3b4d3f(_0x136a0b){for(let _0x2ff7fb=0x0;_0x2ff7fb<_0x136a0b[_0x26773e([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2ff7fb++){const _0x150245=_0x136a0b[_0x26773e([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x2ff7fb);_0x22ada1=(_0x22ada1<<0x5)+_0x22ada1+_0x150245,_0x22ada1&=_0x22ada1;}}function _0x55d4fb(_0x4f2b4e){Array[_0x26773e([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x4f2b4e)?_0x4f2b4e[_0x26773e([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x55d4fb):_0x4f2b4e&&typeof _0x4f2b4e==_0x26773e([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x26773e([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x4f2b4e)[_0x26773e([0x73,0x6f,0x72,0x74])]()[_0x26773e([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x1f72e1,_0x177300])=>{_0x3b4d3f(_0x1f72e1),_0x55d4fb(_0x177300);}):_0x3b4d3f(window[_0x26773e([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x4f2b4e));}return _0x55d4fb(_0x27d3c2),_0x22ada1>>>0x0;}function _0x3edfbc(_0x171b1f){return _0x171b1f[_0x26773e([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x26773e([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x26773e([0x30]));}function _0x3b1c60(_0x22d37b){return _0x22d37b[_0x26773e([0x73,0x70,0x6c,0x69,0x74])]('')[_0x26773e([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x26773e([0x6a,0x6f,0x69,0x6e])]('');}function _0x1b1501(){}function _0x26773e(_0x2898a4){return _0x2898a4['map'](_0x4cbc91=>String['fromCharCode'](_0x4cbc91))['join']('');}_0x399517(await _0x51555a());}(this);}['showFakeVisualSelection'](){const _0x5d49db=this['editor']['model'];_0x5d49db['change'](_0x269e8a=>{const _0x289fc9=_0x5d49db['document']['selection']['getRanges']();let _0x4848cd=0x0;for(const _0x393c1f of _0x289fc9){const _0x140a17=w+':'+_0x4848cd;if(_0x5d49db['markers']['has'](_0x140a17))_0x269e8a['updateMarker'](_0x140a17,{'range':_0x393c1f});else{if(_0x393c1f['start']['isAtEnd']){const _0x2d6c27=_0x393c1f['start']['getLastMatchingPosition'](({item:_0x2d5abf})=>!_0x5d49db['schema']['isContent'](_0x2d5abf),{'boundaries':_0x393c1f});_0x269e8a['addMarker'](_0x140a17,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x269e8a['createRange'](_0x2d6c27,_0x393c1f['end'])});}else _0x269e8a['addMarker'](_0x140a17,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x393c1f});}_0x4848cd++;}});}['hideFakeVisualSelection'](){const _0x39b9de=this['editor']['model'],_0x4c5ae2=Array['from'](this['editor']['model']['markers']['getMarkersGroup'](w));_0x4c5ae2['length']&&_0x39b9de['change'](_0x466835=>{_0x4c5ae2['forEach'](_0x16fbea=>{_0x466835['removeMarker'](_0x16fbea);});});}['insertContent'](_0x23f1c2,_0x1fa721){const _0x1b8396=this['_getAISelection'](),_0xd7052b=_0x1fa721||_0x1b8396['getFirstRange']();this['editor']['model']['canEditAt'](_0xd7052b)&&this['editor']['model']['change'](_0x339c76=>{this['hideFakeVisualSelection'](),_0x1fa721||this['_resetContentOfSelectedTableCells'](_0x339c76,_0x1b8396),this['_pasteHTMLUsingClipboard']({'insertAt':_0xd7052b,'writer':_0x339c76,'html':_0x23f1c2});});}['insertContentBelow'](_0x355676){const {model:_0x501f8e}=this['editor'],_0x4d8e27=this['_getAISelection']();_0x501f8e['change'](()=>{const _0x497e72=this['_prepareTableInsertBelowPosition'](_0x355676,_0x4d8e27)||this['_getDefaultInsertBelowPosition'](_0x4d8e27);this['insertContent'](_0x355676,_0x497e72);});}['_getAISelection'](){const _0x4b3724=this['editor']['model'],_0x4463b4=Array['from'](_0x4b3724['markers']['getMarkersGroup'](w))['map'](_0x1f551a=>_0x1f551a['getRange']());return _0x4b3724['createSelection'](_0x4463b4);}['_pasteHTMLUsingClipboard']({writer:_0x1d696e,html:_0x3d7498,insertAt:_0x25d95d}){const {view:_0x3b7b72}=this['editor']['editing'],_0x3c4946=this['editor']['plugins']['get'](_0x2ea3da),_0x497afa=new gt();_0x497afa['setData']('text/html',_0x3d7498);const _0x557092=new ClipboardEvent('paste',{'clipboardData':_0x497afa}),_0x2afdae=new _0x3cd63(_0x3b7b72,_0x557092,{'dataTransfer':new _0x1ad6a4(_0x497afa)});_0x1d696e['setSelection'](_0x25d95d);const _0xbc0843=(_0x44679a,_0xd5cd96)=>{_0xd5cd96['resultRange']&&_0x1d696e['setSelection'](_0xd5cd96['resultRange']);};_0x3c4946['once']('contentInsertion',_0xbc0843,{'priority':'lowest'}),_0x3b7b72['document']['fire']('paste',_0x2afdae),_0x3c4946['off']('contentInsertion',_0xbc0843);}['_getDefaultInsertBelowPosition'](_0x53a049){const {model:_0x5c9def}=this['editor'],_0x3333b0=Array['from'](_0x53a049['getSelectedBlocks']());return _0x3333b0['length']?_0x5c9def['createPositionAfter'](_0x3333b0['pop']()):_0x53a049['getLastPosition']();}['_prepareTableInsertBelowPosition'](_0x5caa58,_0x3e2ea3){const {model:_0x5e9a44,plugins:_0xd4c601}=this['editor'];if(_0xd4c601['has']('TableUtils')){const _0x591506=_0xd4c601['get']('TableUtils')['getSelectedTableCells'](_0x3e2ea3);if(_0x591506['length']){const _0x591900=this['_getTableRowCountFromContent'](_0x5caa58),_0x59e511=this['_createEmptyTableRows'](_0x591506,_0x591900);return _0x5e9a44['createPositionAt'](_0x59e511,0x0);}}return null;}['_getTableRowCountFromContent'](_0x42358c){const _0x1757c5=this['editor']['plugins']['get']('TableUtils'),_0x3976c5=this['editor']['data']['parse'](_0x42358c),_0x1367e3=Array['from'](_0x3976c5['getChildren']())['filter'](_0x404df4=>_0x404df4['is']('element','table'));let _0x4e3892=0x0;return _0x1367e3['forEach'](_0x346be7=>{_0x4e3892+=_0x1757c5['getRows'](_0x346be7);}),_0x4e3892;}['_createEmptyTableRows'](_0x13d0bd,_0x60641e){const _0x5dd90b=this['editor']['plugins']['get']('TableUtils'),_0x698244=_0x5dd90b['getRowIndexes'](_0x13d0bd),_0x966070=_0x5dd90b['getColumnIndexes'](_0x13d0bd),_0x36778e=_0x698244['last']+0x1,_0x5acef1=_0x966070['first'],_0x17f5ca=_0x13d0bd[0x0]['findAncestor']('table');for(let _0x9f56b8=0x0;_0x9f56b8<_0x60641e;_0x9f56b8++)_0x5dd90b['insertRows'](_0x17f5ca,{'at':_0x36778e});return _0x17f5ca['getChild'](_0x36778e)['getChild'](_0x5acef1);}['_resetContentOfSelectedTableCells'](_0x5dbf3c,_0x1b1c88){const {plugins:_0x5dd71e}=this['editor'],{model:_0x2b4694}=_0x5dbf3c;if(!_0x5dd71e['has']('TableUtils'))return;_0x5dd71e['get']('TableUtils')['getSelectedTableCells'](_0x1b1c88)['length']&&_0x2b4694['deleteContent'](_0x1b1c88);}}class x extends _0x229599{static get['pluginName'](){return'AIAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['afterInit'](){if(!this['textAdapter'])throw new _0x4853ec('aiadapter-text-adapter-not-set',null);}}class R extends Error{constructor(_0x1812f0){super(_0x1812f0),this['name']='AIRequestError';}}function i(_0x307b44,_0x38d77f,_0x186cf7){const t=_0x307b44['t'];switch(_0x38d77f){case'Edit\x20or\x20review':return t('Edit\x20or\x20review');case'Improve\x20writing':return t('Improve\x20writing');case'Make\x20shorter':return t('Make\x20shorter');case'Make\x20longer':return t('Make\x20longer');case'Simplify\x20language':return t('Simplify\x20language');case'Generate\x20from\x20selection':return t('Generate\x20from\x20selection');case'Summarize':return t('Summarize');case'Continue':return t('Continue');case'Change\x20tone':return t('Change\x20tone');case'Professional':return t('Professional');case'Casual':return t('Casual');case'Direct':return t('Direct');case'Confident':return t('Confident');case'Friendly':return t('Friendly');case'Change\x20style':return t('Change\x20style');case'Business':return t('Business');case'Legal':return t('Legal');case'Journalism':return t('Journalism');case'Poetic':return t('Poetic');case'Translate':return t('Translate');case'English':return t('English');case'Spanish':return t('Spanish');case'German':return t('German');case'Portuguese':return t('Portuguese');case'French':return t('French');case'Simplified\x20Chinese':return t('Simplified\x20Chinese');case'Hindi':return t('Hindi');case'Arabic':return t('Arabic');case'AI\x20Assistant':return t('AI\x20Assistant');case'AI\x20Commands':return t('AI\x20Commands');case'Ask\x20AI\x20to\x20edit\x20or\x20generate':return t('Ask\x20AI\x20to\x20edit\x20or\x20generate');case'Ask\x20AI\x20to\x20improve\x20generated\x20text':return t('Ask\x20AI\x20to\x20improve\x20generated\x20text');case'Copy':return t('Copy');case'Submit':return t('Submit');case'Insert\x20below':return t('Insert\x20below');case'Try\x20again':return t('Try\x20again');case'Stop':return t('Stop');case'AI\x20is\x20writing...':return t('AI\x20is\x20writing...');case'AI\x20is\x20writing':return t('AI\x20is\x20writing');case'Generated\x20content:\x20%0':return t('Generated\x20content:\x20%0',_0x186cf7);case'Error\x20during\x20AI\x20content\x20generation:\x20%0':return t('Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x186cf7);case'History':return t('History');case'Empty\x20history':return t('Empty\x20history');case'Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.':return t('Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.');case'Prompt\x20history':return t('Prompt\x20history');case'Clear':return t('Clear');case'AI_REPLACE_CONTENT':return t({'id':'AI_REPLACE_CONTENT','string':'Replace'});case'AI_INSERT_CONTENT':return t({'id':'AI_INSERT_CONTENT','string':'Insert'});case'AI_ERROR_GET_HEADERS':return t({'id':'AI_ERROR_GET_HEADERS','string':'Preparing\x20request\x20headers\x20failed'});case'AI_ERROR_GET_PARAMETERS':return t({'id':'AI_ERROR_GET_PARAMETERS','string':'Preparing\x20request\x20parameters\x20failed'});case'AI_ERROR_UNSUPPORTED_MODEL':return t({'id':'AI_ERROR_UNSUPPORTED_MODEL','string':'The\x20requested\x20AI\x20model\x20(\x22%0\x22)\x20is\x20not\x20supported'},_0x186cf7);case'AI_ERROR_CONTEXT_LENGTH':return t({'id':'AI_ERROR_CONTEXT_LENGTH','string':'Selected\x20content\x20is\x20too\x20long'});case'AI_ERROR_MODERATION':return t({'id':'AI_ERROR_MODERATION','string':'Requested\x20query\x20does\x20not\x20pass\x20moderation\x20rules'});case'AI_ERROR_FAILED':return t({'id':'AI_ERROR_FAILED','string':'Failed\x20to\x20communicate\x20with\x20the\x20AI\x20service'});default:return _0x38d77f;}}class E extends _0x5ef009{['_commandDefinitions'];constructor(_0x1d7ebe,_0x4d9630){super(_0x1d7ebe),this['_commandDefinitions']=_0x4d9630,this['set']('enabledCommandsIds',[]),this['on']('change:_hasContext',(_0x5f24ee,_0x25308b,_0x567382)=>{this['isEnabled']&&(this['enabledCommandsIds']=F(this['_commandDefinitions'],_0x567382));}),this['set']('_hasContext',!0x1),this['on']('change:isEnabled',(_0x55b319,_0x2261dd,_0xcd152a)=>{this['enabledCommandsIds']=_0xcd152a?F(this['_commandDefinitions'],this['_hasContext']):[];});}['refresh'](){const _0x19e2d0=this['editor']['model'];this['_hasContext']=function(_0x3a82be){const _0x2c60a0=_0x3a82be['document']['selection'];return _0x2c60a0['isCollapsed']?0x0!==[..._0x2c60a0['getSelectedBlocks']()]['length']&&![..._0x2c60a0['getSelectedBlocks']()][0x0]['isEmpty']:!!_0x3a82be['hasContent'](_0x2c60a0['getFirstRange']());}(_0x19e2d0);const _0x5c5df6=_0x19e2d0['document']['selection'],_0x263b2c=this['editor']['config']['get']('ai.aiAssistant.disabledElements');for(const _0x46b6de of _0x5c5df6['getRanges']())for(const _0x2f5d9b of _0x46b6de['getItems']())if(_0x2f5d9b['is']('element')&&_0x263b2c['includes'](_0x2f5d9b['name']))return void(this['isEnabled']=!0x1);this['isEnabled']=!0x0;}['execute'](_0x4ba4c0='',_0x336ff0='',_0x516299='custom'){this['editor']['plugins']['get'](n)['showUI'](_0x4ba4c0,_0x336ff0,_0x516299);}}function F(_0x250a78,_0x292607){const _0xbc89a=new Set();for(const _0x594637 of _0x250a78['values']())(_0x292607||!0x1===_0x594637['requiresContent'])&&_0xbc89a['add'](_0x594637['id']);return Array['from'](_0xbc89a);}const Q=new RegExp(/^(.*?)<[a-zA-Z][a-zA-Z0-9_\-.]*[ >]/,'is');class j extends/* #__PURE__ -- @preserve */
24
+ _0x1fca45(){['editor'];['textAdapter'];['view'];['_sanitizationContainer'];['_domParser'];['_xmlSerializer'];constructor(_0x5abeec,_0xa56385,_0xd25d37){super(),this['editor']=_0x5abeec,this['textAdapter']=_0xa56385,this['_sanitizationContainer']=document['createElement']('div'),this['_domParser']=new DOMParser(),this['_xmlSerializer']=new XMLSerializer(),this['view']=_0xd25d37,this['set']({'initialContext':'','currentContext':'','currentResponse':'','previousContext':void 0x0,'previousQuery':void 0x0,'previousLabel':void 0x0,'isProcessing':!0x1}),this['on']('set:currentContext',(_0x124512,_0x2a4624,_0x36041b)=>{this['view']['value']=this['_sanitizeHTML'](_0x36041b);}),this['listenTo'](this['view'],'submitPrompt',(_0x51849a,_0x1d2d7a)=>{const _0x3bd3d8=this['currentContext']||this['initialContext'];this['_handleQuery'](_0x1d2d7a,_0x3bd3d8,'custom');}),this['listenTo'](this['view'],'tryAgainEvent',()=>{this['view']['prompt']=this['previousLabel'],this['_handleQuery'](this['previousQuery'],this['previousContext'],this['previousActionId'],this['previousLabel']);}),this['listenTo'](this['view'],'stopProcessing',()=>{this['stopProcessing']();});}['destroy'](){this['stopListening']();}async['updateView']({actionId:_0xca69b4,query:_0xcd2cd0,htmlContent:_0x3f1541,label:_0x63e710,mainActionLabel:_0x57692d}){this['view']['prompt']=_0x63e710,this['view']['mainAction']=_0x57692d,this['initialContext']=_0x3f1541,_0xcd2cd0&&(this['view']['isRendered']?this['_handleQuery'](_0xcd2cd0,_0x3f1541,_0xca69b4,_0x63e710):this['view']['once']('render',()=>{this['_handleQuery'](_0xcd2cd0,_0x3f1541,_0xca69b4,_0x63e710);}));}['stopProcessing'](){this['isProcessing']&&(this['isProcessing']=!0x1,this['view']['finishProcessing'](),this['textAdapter']['abort']());}['reset'](){this['initialContext']='',this['currentContext']='',this['currentResponse']='',this['previousContext']='',this['previousQuery']='',this['previousLabel']='',this['previousActionId']=void 0x0,this['view']['reset'](),this['stopProcessing']();}async['_handleQuery'](_0x34c583,_0x2bdaaa,_0x3a1cde,_0x1389a1){return this['isProcessing']=!0x0,this['view']['startProcessing'](),this['previousContext']=_0x2bdaaa,this['previousQuery']=_0x34c583,this['previousLabel']=_0x1389a1||_0x34c583,this['previousActionId']=_0x3a1cde,new Promise(_0x4061f0=>{this['textAdapter']['makeRequest']({'query':_0x34c583,'context':_0x2bdaaa,'onData':_0x146904=>{this['currentResponse']=_0x146904,this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse']);},'actionId':_0x3a1cde})['then'](()=>{!this['currentContext']&&this['currentResponse']&&(this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse'],!0x0));})['catch'](_0x5f458d=>{_0x5f458d instanceof R?this['view']['handleError'](_0x5f458d['message']):this['view']['handleError'](),_0x4061f0();})['finally'](()=>{this['stopProcessing'](),_0x4061f0();});});}['_parseAndNormalizeContent'](_0x3870cf,_0x40cfa2=!0x1){const _0x1e0f53=Q['exec'](_0x3870cf);_0x3870cf=_0x1e0f53?_0x3870cf['substring'](_0x1e0f53[0x1]['length']):_0x3870cf['length']<0x64&&!_0x40cfa2?'':this['_stripMarkdownSyntax'](_0x3870cf);const _0x110ce4=this['_domParser']['parseFromString'](_0x3870cf,'text/html');if(_0x1e0f53){const _0x37cc8c=Array['from'](_0x110ce4['body']['childNodes']);_0x37cc8c['reverse']();for(const _0x88bf81 of _0x37cc8c){if(_0x88bf81['nodeType']==Node['ELEMENT_NODE'])break;_0x88bf81['remove']();}}const _0x5dbfd1=this['editor']['data']['processor']['toView'](this['_xmlSerializer']['serializeToString'](_0x110ce4['body']));this['_isH1TagSupportEnabled']()||this['_normalizeResponseHeadings'](_0x5dbfd1);const _0x3b9046=this['editor']['config']['get']('ai.aiAssistant.preserveComments'),_0x249a7e=this['editor']['data']['toModel'](_0x5dbfd1);return _0x3b9046||_0x249a7e['markers']['clear'](),this['editor']['data']['stringify'](_0x249a7e);}['_normalizeResponseHeadings'](_0x335789){const _0x55e9b5=new _0x667fee(this['editor']['editing']['view']['document']),_0x22f5a9=new _0x1cc8f3({'name':/^h[1-5]$/}),_0x55c38f=[];let _0x108f2f=!0x1;for(const _0x4b2d24 of _0x335789)_0x4b2d24['is']('element')&&_0x22f5a9['match'](_0x4b2d24)&&(_0x55c38f['push'](_0x4b2d24),'h1'==_0x4b2d24['name']&&(_0x108f2f=!0x0));if(_0x108f2f){for(const _0x38e959 of _0x55c38f)_0x55e9b5['rename']('h'+(parseInt(_0x38e959['name'][0x1])+0x1),_0x38e959);}}['_isH1TagSupportEnabled'](){const {data:_0x586c40,editing:_0x5ae44e}=this['editor'],_0x3f5444=_0x586c40['htmlProcessor']['toView']('<h1></h1>'),_0x72326c=_0x586c40['toView'](_0x586c40['toModel'](_0x3f5444));return!!_0x5ae44e['view']['domConverter']['viewToDom'](_0x72326c)['querySelector']('h1');}['_sanitizeHTML'](_0x4b24dc){return this['editor']['editing']['view']['domConverter']['setContentOf'](this['_sanitizationContainer'],_0x4b24dc),this['_sanitizationContainer']['innerHTML'];}['_stripMarkdownSyntax'](_0x1ab7f7){const _0x51f7bb=_0x1ab7f7['trim']();return _0x51f7bb['startsWith']('```html')?_0x51f7bb['endsWith']('```')?_0x51f7bb['substring'](0x7,_0x51f7bb['length']-0x3):_0x51f7bb['substring'](0x7):_0x1ab7f7;}}const _={'REPLACE':'replace','INSERT':'insert'};class at extends ot{constructor(_0x1c2f6d){super(_0x1c2f6d),this['set']('isVisible',!0x1),this['set']('mainAction',_['REPLACE']),this['replaceButton']=this['_createButton']('','ck-button-action'),this['replaceButton']['bind']('label')['to'](this,'mainAction',_0x1023b3=>i(_0x1c2f6d,'AI_'+_0x1023b3['toUpperCase']()+'_CONTENT')),this['insertButton']=this['_createButton'](i(_0x1c2f6d,'Insert\x20below')),this['tryAgainButton']=this['_createButton'](i(_0x1c2f6d,'Try\x20again')),this['stopButton']=this['_createButton'](i(_0x1c2f6d,'Stop'));const _0x30c718=this['bindTemplate'];this['extendTemplate']({'attributes':{'class':['ck-ai-form__toolbar',_0x30c718['if']('isVisible','ck-hidden',_0x2a17b7=>!_0x2a17b7)]}}),this['items']['addMany']([this['replaceButton'],this['insertButton'],this['tryAgainButton'],this['stopButton']]);}['_createButton'](_0x3a2eef,_0x2e63e6){const _0x503d4a=new _0x451bcf(this['locale']);return _0x503d4a['set']({'label':_0x3a2eef,'class':_0x2e63e6||'','isVisible':!0x0,'withText':!0x0}),_0x503d4a;}}class ct extends _0x3edbc3{['contentFieldView'];['copyButtonView'];constructor(_0x5e5b66,_0x30c03a=''){super(_0x5e5b66),this['set']({'value':null,'isVisible':!0x1,'isProcessing':!0x1});const _0x4940d4=this['bindTemplate'];this['contentFieldView']=new bt(_0x5e5b66,_0x30c03a),this['copyButtonView']=this['_createCopyButton'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area-wrapper',_0x4940d4['if']('isVisible','ck-hidden',_0x397627=>!_0x397627)],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area',_0x4940d4['if']('isProcessing','ck-ai-form__content-area--processing')]},'children':[this['contentFieldView'],{'tag':'div','attributes':{'class':['ck','ck-ai-form__copy-button-wrapper']},'children':[this['copyButtonView']]}]}]});}['render'](){super['render'](),this['value']&&this['contentFieldView']['setContent'](this['value']);let _0x38ed6f=!0x1;this['on']('change:value',(_0x216084,_0x40073c,_0x57743e)=>{const _0x31b99d=!this['contentFieldView']['element']['querySelector']('.ck-ai-form__loader');this['contentFieldView']['setContent'](_0x57743e),this['isProcessing']&&_0x31b99d&&!_0x38ed6f&&this['element']['scrollTo']({'top':this['element']['scrollHeight'],'behavior':'smooth'});}),this['on']('change:isProcessing',(_0x2f477e,_0x1920ad,_0x42c6f0)=>{_0x38ed6f=!0x1,_0x42c6f0?(this['value']=null,this['contentFieldView']['appendLoader']()):this['value']||this['contentFieldView']['setContent']('');}),this['listenTo'](this['element'],'wheel',()=>{_0x38ed6f=!0x0;}),this['listenTo'](this['element'],'mousedown',()=>{_0x38ed6f=!0x0;});}['focus'](){this['element']['focus']();}['_createCopyButton'](){const _0x16b435=this['locale'],_0x5d7620=new _0x451bcf(this['locale']),_0x2b410f='ck-ai-form__copy-button';return _0x5d7620['set']({'label':i(_0x16b435,'Copy'),'icon':_0x52d84e,'class':_0x2b410f,'tooltip':!0x0}),_0x5d7620['bind']('isVisible')['to'](this,'value',_0x41be2d=>!!_0x41be2d),_0x5d7620['bind']('isEnabled')['to'](this,'isProcessing',_0x187145=>!_0x187145),_0x5d7620['on']('execute',()=>{this['_copyHTMLToClipboard'](this['contentFieldView']['element']),_0x5d7620['icon']=_0x34aa88,_0x5d7620['class']=_0x2b410f+'\x20ck-ai-form__copy-button--copied',this['focus'](),setTimeout(()=>{_0x5d7620['icon']=_0x52d84e,_0x5d7620['class']=_0x2b410f;},0x3e8);}),_0x5d7620;}['_copyHTMLToClipboard'](_0xee6314){const {window:_0x469fe3,document:_0x56c70b}=_0x3b0b8;if(_0x469fe3['ClipboardItem']){const {Blob:_0x2fac64,ClipboardItem:_0x53a886}=_0x469fe3,_0x574bdf=[new _0x53a886({'text/html':new _0x2fac64([_0xee6314['innerHTML']],{'type':'text/html'}),'text/plain':new _0x2fac64([_0xee6314['textContent']||''],{'type':'text/plain'})})];navigator['clipboard']['write'](_0x574bdf);}else{const _0x52467b=_0x56c70b['createElement']('div');_0x52467b['style']['position']='absolute',_0x52467b['style']['left']='-9999px',_0x52467b['innerHTML']='<span>[</span>'+_0xee6314['innerHTML']+'<span>]</span>',_0x56c70b['body']['appendChild'](_0x52467b);const _0x1ff9f2=_0x56c70b['createRange']();_0x1ff9f2['setStartAfter'](_0x52467b['firstElementChild']),_0x1ff9f2['setEndBefore'](_0x52467b['lastElementChild']);const _0x3b0589=_0x469fe3['getSelection']();_0x3b0589['removeAllRanges'](),_0x3b0589['addRange'](_0x1ff9f2),_0x56c70b['execCommand']('copy'),_0x52467b['remove']();}}}class bt extends _0x3edbc3{constructor(_0x15bd25,_0x38017a=''){super(_0x15bd25),this['loaderView']=this['_createLoader'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-content',_0x38017a,'ck-reset_all-excluded','ck-ai-form__content-field']}});}['setContent'](_0x409a47){this['element']['innerHTML']=_0x409a47;}['appendLoader'](){this['element']['appendChild'](this['loaderView']['element']);}['_createLoader'](){const _0x312a26=new _0x3edbc3(),_0x37a559=this['locale'],_0x29abdf=new _0x4b67f5();return _0x29abdf['isVisible']=!0x0,_0x312a26['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__loader']},'children':[_0x29abdf,{'text':i(_0x37a559,'AI\x20is\x20writing...')}]}),_0x312a26['render'](),_0x312a26;}}class mt extends _0x3edbc3{constructor(_0xbd914a,_0x960c2a=''){super(_0xbd914a);const _0x4b2f11=new _0x22adfe(),_0x2fdb50=this['bindTemplate'];this['set']('text',_0x960c2a),_0x4b2f11['content']=_0x136f15,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__error']},'children':[_0x4b2f11,{'text':_0x2fdb50['to']('text')}]});}}class lt extends st{['submitButtonView'];['showHistoryButtonView'];constructor(_0x30d221,_0x3e1ef5){super(_0x30d221,_0x3e1ef5),this['queryView']['fieldView']['minRows']=0x1,this['queryView']['fieldView']['maxRows']=0x3,this['submitButtonView']=this['_createSubmitButton'](),this['showHistoryButtonView']=this['_createShowHistoryButton'](),this['focusableChildren']['add'](this['showHistoryButtonView'],0x1),this['focusableChildren']['add'](this['submitButtonView']);}['render'](){super['render'](),this['queryView']['fieldWrapperChildren']['add'](this['showHistoryButtonView']),this['children']['add'](this['submitButtonView']),this['keystrokes']['set']('enter',(_0x10eda2,_0x32221a)=>{_0x10eda2['target']==this['queryView']['fieldView']['element']&&(this['submit'](),_0x32221a());});}['_createSubmitButton'](){const _0x13b56c=new _0x451bcf(this['locale']),_0x100aa7=this['locale'];return _0x13b56c['set']({'icon':it,'label':i(_0x100aa7,'Submit'),'isVisible':!0x0,'tooltip':!0x0,'class':'ck-ai-form__submit'}),_0x13b56c['on']('execute',()=>{this['submit']();}),_0x13b56c['bind']('isEnabled')['to'](this['queryView']['fieldView'],'isEmpty',this,'isEnabled',(_0x178186,_0x4fcb51)=>!_0x178186&&_0x4fcb51),_0x13b56c;}['_createShowHistoryButton'](){const _0x214e8a=new _0x451bcf(this['locale']),_0x21d3bb=this['resultsView'],_0x8e935=this['locale'];_0x214e8a['set']({'label':i(_0x8e935,'History'),'withText':!0x1,'icon':tt,'tooltip':!0x0,'tooltipPosition':'sw','class':'ck-ai-form__toggle-history'}),_0x214e8a['bind']('isOn')['to'](_0x21d3bb,'isVisible'),_0x214e8a['bind']('isEnabled')['to'](this,'isEnabled'),_0x214e8a['on']('execute',()=>{_0x21d3bb['isVisible']=!_0x21d3bb['isVisible'],_0x21d3bb['isVisible']?this['filteredView']['focus']():this['focus']();});const _0x8f2515=()=>{_0x3b0b8['window']['requestAnimationFrame'](()=>{if(_0x556e7e(this['element'])){const _0x33e4ae=new _0x26ebfa(this['queryView']['fieldView']['element']),_0x592722=_0x33e4ae['width'],_0x4a3497='rtl'===_0x8e935['uiLanguageDirection']?'left':'right';_0x33e4ae['excludeScrollbarsAndBorders'](),_0x214e8a['element']['style'][_0x4a3497]=_0x592722-_0x33e4ae['width']+0x1+'px';}});};return this['queryView']['fieldView']['on']('update',_0x8f2515),this['on']('render',_0x8f2515),_0x214e8a;}['submit'](){const _0x195e59=this['queryView']['fieldView']['element']['value'];this['fire']('submit',_0x195e59);}['focus'](_0x2bcc17){-0x1===_0x2bcc17?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}}class pt extends yt{['historyGroupView'];['clearHistoryButton'];constructor(_0x2c2319){super(_0x2c2319),this['clearHistoryButton']=this['_createClearHistoryButton'](),this['historyGroupView']=new Ct(),this['historyGroupView']['children']['add'](this['clearHistoryButton'],0x1),this['historyGroupView']['label']=i(_0x2c2319,'Prompt\x20history'),this['historyGroupView']['items']['delegate']('execute')['to'](this),this['items']['add'](this['historyGroupView']);}['filter'](){let _0x51138d=0x0;for(const _0x493ff4 of this['items'])_0x51138d+=_0x493ff4['items']['length'];return{'resultsCount':_0x51138d,'totalItemsCount':_0x51138d};}['_createClearHistoryButton'](){const _0x431c64=this['locale'],_0x5c6df2=new _0x451bcf(this['locale']);return _0x5c6df2['set']({'label':'('+i(_0x431c64,'Clear')+')','withText':!0x0}),_0x5c6df2['on']('execute',()=>this['fire']('clearHistory')),_0x5c6df2;}}class ut extends xt{constructor(_0x32fd9f){super();const _0x71709b=new wt(),_0x44a0d3=new _0x451bcf(this['locale'],_0x71709b);this['children']['add'](_0x44a0d3),_0x44a0d3['set']({'label':_0x32fd9f['prompt'],'withText':!0x0}),_0x44a0d3['on']('execute',()=>{this['fire']('execute',{'value':kt(_0x32fd9f['prompt'])});});}}const ts='CKEditor/AIFormView/PromptHistory';class dt extends _0x4a2166{constructor(){super(),this['_loadFromSessionStorage'](),this['on']('add',(_0x405a7e,_0x52e1a6)=>{const _0x1c1234=os(_0x52e1a6['prompt']);for(const _0x463cdf of this)if(_0x463cdf!=_0x52e1a6&&os(_0x463cdf['prompt'])===_0x1c1234){this['remove'](_0x463cdf);break;}this['length']>0x14&&this['remove'](this['last']),this['_saveToSessionStorage']();}),this['on']('remove',()=>{this['_saveToSessionStorage']();});}['_loadFromSessionStorage'](){const _0xec501e=sessionStorage['getItem'](ts)||'[]';this['addMany'](JSON['parse'](_0xec501e));}['_saveToSessionStorage'](){sessionStorage['setItem'](ts,JSON['stringify'](this['map'](_0x21273a=>_0x21273a)));}}function os(_0x28ca20){return _0x28ca20['toLowerCase']()['trim']();}class k extends _0x3edbc3{['focusTracker'];['keystrokes'];['contentArea'];['toolbar'];['promptView'];['errorView'];['_focusables'];['focusCycler'];['_promptHistory'];constructor(_0x405e03,_0x2b4a71,_0x51b2b8=''){super(_0x405e03),this['set']('isEnabled',!0x0),this['set']('isProcessing',!0x1),this['set']('prompt',''),this['set']('value',''),this['set']('isError',!0x1),this['set']('mainAction',_['REPLACE']),this['_promptHistory']=new dt(),this['errorView']=new mt(_0x405e03),this['contentArea']=new ct(_0x405e03,_0x51b2b8),this['contentArea']['bind']('isProcessing')['to'](this),this['contentArea']['bind']('value')['to'](this),this['toolbar']=this['_createToolbar'](),this['toolbar']['bind']('mainAction')['to'](this),this['promptView']=this['_createPromptView'](),this['focusTracker']=new et(),this['keystrokes']=new rt(),this['_focusables']=this['createCollection']([this['contentArea'],this['contentArea']['copyButtonView'],this['toolbar'],this['promptView']]),this['focusCycler']=new ht({'focusables':this['_focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift\x20+\x20tab','focusNext':'tab'}}),this['focusCycler']['chain'](this['promptView']['focusCycler']),this['promptView']['queryView']['fieldView']['bind']('value')['to'](this,'prompt');const _0x521e02=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form',_0x2b4a71],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form-content']},'children':[{'tag':'div','attributes':{'class':[_0x521e02['if']('isError','ck-hidden',_0x132a4b=>!_0x132a4b)]},'children':[this['errorView']]},this['contentArea'],this['toolbar'],this['promptView']]}]});}['render'](){super['render'](),this['focusTracker']['add'](this['contentArea']['element']),this['focusTracker']['add'](this['contentArea']['copyButtonView']['element']),this['focusTracker']['add'](this['toolbar']['element']),this['focusTracker']['add'](this['promptView']['element']),this['keystrokes']['listenTo'](this['element']);}['focus'](_0x1b493f=0x1){-0x1===_0x1b493f?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['reset'](){this['prompt']='',this['value']='',this['isError']=!0x1,this['promptView']['reset'](),this['contentArea']['isVisible']=!0x1,this['toolbar']['isVisible']=!0x1;}['_createPromptView'](){const _0x26b11a=this['locale'],_0x2b2e04=new lt(_0x26b11a,{'queryView':{'label':i(_0x26b11a,'Ask\x20AI\x20to\x20edit\x20or\x20generate'),'creator':nt,'showIcon':!0x1,'showResetButton':!0x1},'infoView':{'text':{'noSearchableItems':{'primary':i(_0x26b11a,'Empty\x20history'),'secondary':i(_0x26b11a,'Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.')}}},'filteredView':this['_createHistoryView'](),'queryMinChars':0x1/0x0,'resetOnBlur':!0x1});return _0x2b2e04['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x1ea322,_0x381158)=>_0x1ea322&&!_0x381158),this['listenTo'](_0x2b2e04,'submit',(_0xfe2898,_0x1856d3)=>{this['prompt']=_0x1856d3;const _0x5156a8=ft(_0x1856d3);this['fire']('submitPrompt',_0x5156a8),_0x1856d3['trim']()&&this['_promptHistory']['add']({'prompt':_0x5156a8},0x0);},{'priority':'high'}),_0x2b2e04;}['_createHistoryView'](){const _0x2764bb=new pt(this['locale']);return _0x2764bb['historyGroupView']['items']['bindTo'](this['_promptHistory'])['as'](ut),_0x2764bb['on']('clearHistory',()=>{this['_promptHistory']['clear'](),this['promptView']['search'](''),this['promptView']['focus']();}),_0x2764bb;}['_createToolbar'](){const _0x288f33=new at(this['locale']);return _0x288f33['replaceButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x4ee461,_0x12f4aa,_0x4f1511)=>_0x4ee461&&!_0x12f4aa&&!!_0x4f1511),_0x288f33['replaceButton']['delegate']('execute')['to'](this,'replaceContent'),_0x288f33['insertButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x2d8ab9,_0xd2280a,_0x4d33b7)=>_0x2d8ab9&&!_0xd2280a&&!!_0x4d33b7),_0x288f33['insertButton']['delegate']('execute')['to'](this,'insertContentBelow'),_0x288f33['tryAgainButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x5f12ef,_0x4beb5c)=>_0x5f12ef&&!_0x4beb5c),_0x288f33['tryAgainButton']['delegate']('execute')['to'](this,'tryAgainEvent'),_0x288f33['stopButton']['bind']('isEnabled')['to'](this,'isProcessing'),_0x288f33['stopButton']['delegate']('execute')['to'](this,'stopProcessing'),_0x288f33;}['startProcessing'](){this['value']='',this['isError']=!0x1,this['isProcessing']=!0x0,this['contentArea']['isVisible']=!0x0,this['toolbar']['isVisible']=!0x0,this['contentArea']['focus']();}['finishProcessing'](){const _0x3d25ba=this['locale'];this['isProcessing']=!0x1,this['prompt']='',this['promptView']['reset'](),this['value']&&(this['promptView']['queryView']['label']=i(_0x3d25ba,'Ask\x20AI\x20to\x20improve\x20generated\x20text'));}['handleError'](_0x782dae){const _0x1f0c6d=this['locale'];this['finishProcessing'](),this['isError']=!0x0,this['errorView']['text']=_0x782dae||i(_0x1f0c6d,'AI_ERROR_FAILED'),this['value']||(this['contentArea']['isVisible']=!0x1);}}const l=globalThis['DataTransfer'];class n extends _0x229599{['licenseKey'];['_licenseKeyCheckInterval'];['_dialog'];['_formView'];['_aiAdapter'];['_aiAssistantController'];['_uiCssClasses']='';static get['pluginName'](){return'AIAssistantUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x52718a,a,x,_0x380b7d];}constructor(_0x46cafd){super(_0x46cafd),_0x46cafd['config']['define']('ai.aiAssistant.disabledElements',['media','rawHtml','tableOfContents']),_0x46cafd['config']['define']('ai.aiAssistant.contentAreaCssClass',''),_0x46cafd['config']['define']('ai.useTheme',!0x0),this['_uiCssClasses']='ck-ai-assistant-ui'+(_0x46cafd['config']['get']('ai.useTheme')?'\x20ck-ai-assistant-ui_theme':'');}['init'](){const {editor:_0x4b4868}=this;this['_aiAdapter']=_0x4b4868['plugins']['get'](x),this['_dialog']=_0x4b4868['plugins']['get'](_0x380b7d),this['_formView']=null,this['_commandDefinitions']=this['_getResolvedCommandsDefinitions']();const _0x375f2c=new E(_0x4b4868,Array['from'](this['_commandDefinitions']['values']()));_0x4b4868['commands']['add']('showAIAssistant',_0x375f2c),_0x4b4868['ui']['componentFactory']['add']('aiCommands',_0xf06789=>{const _0x53da5d=_0x58c081(_0xf06789);return _0x53da5d['set']({'class':'ck-ai-commands-dropdown\x20'+this['_uiCssClasses']}),_0x53da5d['buttonView']['set']({'label':i(_0xf06789,'AI\x20Commands'),'icon':_0x1763b6,'tooltip':!0x0}),_0x53da5d['on']('execute',_0x255425=>this['_onExecute'](_0x255425['source']['id'])),_0x1156b2(_0x53da5d,_0x4b4868['ui']['view']['body'],function(_0x4bcfa8){const _0xab6397=o(_0x4bcfa8['config']['get']('ai.aiAssistant.commands'),_0x4bcfa8['locale']),_0x62f7f5=U(_0x4bcfa8,_0xab6397)['filter'](_0x331349=>_0x331349['commands']['length']);if(0x1===_0x62f7f5['length'])return U(_0x4bcfa8,_0x62f7f5[0x0]['commands'])['map'](_0x2dc477=>({'id':_0x2dc477['id'],'label':_0x2dc477['label']}));return _0x62f7f5['map'](_0x2287c1=>{const {groupId:_0x1f4c5f,groupLabel:_0xdc2e4f,commands:_0x4442a3}=_0x2287c1,_0x2d3035=U(_0x4bcfa8,_0x4442a3)['map'](_0x53e8ba=>({'id':_0x53e8ba['id'],'label':_0x53e8ba['label']}));return{'id':_0x1f4c5f,'menu':_0xdc2e4f||_0x1f4c5f,'children':_0x2d3035};});}(_0x4b4868),{'ariaLabel':i(_0xf06789,'AI\x20Commands')}),_0x53da5d['menuView']['menuPanelClass']='ck-ai-commands-dropdown\x20'+this['_uiCssClasses'],_0x375f2c['on']('change:enabledCommandsIds',_0x133741),_0x53da5d['menuView']['once']('render',_0x133741),_0x53da5d;function _0x133741(){_0x53da5d['isEnabled']=_0x375f2c['enabledCommandsIds']['length']>0x0;for(const _0x18c1b5 of _0x53da5d['menuView']['buttons'])_0x18c1b5['isEnabled']=_0x375f2c['enabledCommandsIds']['includes'](_0x18c1b5['id']);}}),_0x4b4868['ui']['componentFactory']['add']('menuBar:aiCommands',_0x528c82=>{const _0x377bab=new _0x3f8494(_0x528c82);_0x377bab['buttonView']['set']({'label':i(_0x528c82,'AI\x20Commands'),'icon':_0x1763b6}),_0x377bab['bind']('isEnabled')['to'](_0x375f2c,'enabledCommandsIds',_0x53e2a2=>_0x53e2a2['length']>0x0);const _0x1b2b6f=o(_0x4b4868['config']['get']('ai.aiAssistant.commands'),_0x528c82);return this['_populateMenuBarMenu'](_0x375f2c,_0x377bab,_0x1b2b6f,_0x4f16ba=>this['_onExecute'](_0x4f16ba)),_0x377bab;}),_0x4b4868['ui']['componentFactory']['add']('aiAssistant',()=>{const _0x20f02c=this['_createAIAssistantUIButton'](_0x451bcf);return _0x20f02c['set']({'tooltip':!0x0,'class':'ck-ai-assistant-button\x20'+this['_uiCssClasses']}),_0x20f02c;}),_0x4b4868['ui']['componentFactory']['add']('menuBar:aiAssistant',()=>{const _0x59ba54=this['_createAIAssistantUIButton'](_0x4bb7ac);return _0x59ba54['set']({'role':'menuitemcheckbox'}),_0x59ba54;}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x59e519=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x2a182b;for(const _0x3b3bc0 in _0x59e519){const _0x15af16=_0x3b3bc0,_0x3e1344=_0x59e519[_0x15af16];if('aiLicenseKeyValid'==_0x3e1344||'aiLicenseKeyInvalid'==_0x3e1344||'aiLicenseKeyExpired'==_0x3e1344||'aiLicenseKeyDomainLimit'==_0x3e1344||'aiLicenseKeyNotAllowed'==_0x3e1344||'aiLicenseKeyEvaluationLimit'==_0x3e1344||'aiLicenseKeyTrialLimit'==_0x3e1344||'aiLicenseKeyUsageLimit'==_0x3e1344){delete _0x59e519[_0x15af16],_0x2a182b=_0x3e1344,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'aiLicenseKeyInvalid'==_0x2a182b&&_0x59e519['_showLicenseError']('invalid'),'aiLicenseKeyExpired'==_0x2a182b&&_0x59e519['_showLicenseError']('expired'),'aiLicenseKeyDomainLimit'==_0x2a182b&&_0x59e519['_showLicenseError']('domainLimit'),'aiLicenseKeyNotAllowed'==_0x2a182b&&_0x59e519['_showLicenseError']('featureNotAllowed','AIAssistant'),'aiLicenseKeyEvaluationLimit'==_0x2a182b&&_0x59e519['_showLicenseError']('evaluationLimit'),'aiLicenseKeyTrialLimit'==_0x2a182b&&_0x59e519['_showLicenseError']('trialLimit'),'aiLicenseKeyUsageLimit'==_0x2a182b&&_0x59e519['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['showUI'](_0x49bca5='',_0x1993b3='',_0x3921e1='custom'){const _0x24d4e0=this['editor'],_0x301533=_0x24d4e0['editing']['view'],_0x28f427=_0x24d4e0['plugins']['get'](a),_0x507732=_0x24d4e0['plugins']['get'](_0x52718a);_0x28f427['showFakeVisualSelection']();const _0x31ca9f=new l(),_0x331903=new ClipboardEvent('copy',{'clipboardData':_0x31ca9f}),_0x46d2e1=new _0x1ad6a4(_0x31ca9f),_0x4ca93d=new _0x3cd63(_0x301533,_0x331903,{'dataTransfer':_0x46d2e1});_0x507732['_forceMarkersCopy']('comment',()=>{_0x301533['document']['fire']('copy',_0x4ca93d);}),this['_formView']||(this['_initView'](),this['_aiAssistantController']=new j(_0x24d4e0,this['_aiAdapter']['textAdapter'],this['_formView']));let _0x4b9617=_0x46d2e1['getData']('text/html');const _0x549dd7=_0x24d4e0['model']['document']['selection'],_0x5d4f48=Array['from'](_0x549dd7['getRanges']());0x1===_0x5d4f48['length']&&_0x5d4f48[0x0]['isFlat']&&!_0x549dd7['getSelectedElement']()&&''!==_0x4b9617['replace'](/&nbsp;/g,'')['trim']()&&(_0x4b9617='<p>'+_0x4b9617+'</p>'),this['_aiAssistantController']['updateView']({'actionId':_0x3921e1,'query':_0x49bca5,'htmlContent':_0x4b9617,'label':_0x1993b3,'mainActionLabel':_[_0x24d4e0['model']['document']['selection']['isCollapsed']?'INSERT':'REPLACE']}),'aiAssistant'!==this['_dialog']['id']?this['_dialog']['show']({'id':'aiAssistant','icon':_0x4c2773,'title':i(this['editor']['locale'],'AI\x20Assistant'),'content':this['_formView'],'position':_0x1b757b['EDITOR_TOP_SIDE'],'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_aiAssistantController']['reset'](),_0x28f427['hideFakeVisualSelection']();}}):this['_dialog']['view']['wasMoved']||this['_dialog']['view']['updatePosition']();}['hideUI'](){this['_dialog']['hide']();}['_getResolvedCommandsDefinitions'](){const _0x34a907=new Map(),_0x3f651a=o(this['editor']['config']['get']('ai.aiAssistant.commands'),this['editor']['locale']);for(const _0x17e1ce of _0x3f651a)for(const _0x53fb91 of _0x17e1ce['commands'])_0x34a907['set'](_0x53fb91['id'],{..._0x53fb91,'groupId':_0x17e1ce['groupId'],'groupLabel':_0x17e1ce['groupLabel']||_0x17e1ce['groupId']});return _0x34a907;}['_createAIAssistantUIButton'](_0x3f3bb6){const _0x4575ad=this['editor'],_0x1604ee=_0x4575ad['commands']['get']('showAIAssistant'),_0x13a801=new _0x3f3bb6(_0x4575ad['locale']);return _0x13a801['set']({'label':i(_0x4575ad['locale'],'AI\x20Assistant'),'icon':_0x4c2773,'isToggleable':!0x0}),_0x13a801['bind']('isEnabled')['to'](_0x1604ee),_0x13a801['bind']('isOn')['to'](this['_dialog'],'id',_0x28e61d=>'aiAssistant'===_0x28e61d),this['listenTo'](_0x13a801,'execute',()=>{_0x13a801['isOn']?this['hideUI']():_0x1604ee['execute']();}),_0x13a801;}['_initView'](){const _0x530b48=this['editor']['plugins']['get'](a);this['_formView']=new k(this['editor']['locale'],this['_uiCssClasses'],this['editor']['config']['get']('ai.aiAssistant.contentAreaCssClass')),this['_formView']['on']('change:value',()=>{this['_dialog']['view']['wasMoved']||this['_dialog']['view']['updatePosition']();}),this['_formView']['promptView']['queryView']['fieldView']['on']('update',()=>{this['_dialog']['view']['wasMoved']||this['_dialog']['view']['updatePosition']();}),this['listenTo'](this['_formView'],'replaceContent',()=>{_0x530b48['insertContent'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['listenTo'](this['_formView'],'insertContentBelow',()=>{_0x530b48['insertContentBelow'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['_initAriaAiStatusChangeAnnouncements']();}['_initAriaAiStatusChangeAnnouncements'](){const {locale:_0x12e126,ui:{ariaLiveAnnouncer:_0xf5b213}}=this['editor'];this['_formView']['contentArea']['on']('change:isProcessing',(_0x37e51b,_0x2d2377,_0x3fe99f)=>{const _0x2da964=this['_aiAssistantController']['currentContext'];_0x3fe99f?_0xf5b213['announce'](i(_0x12e126,'AI\x20is\x20writing')):_0x2da964&&_0xf5b213['announce'](i(_0x12e126,'Generated\x20content:\x20%0',_0x2da964),{'politeness':'polite','isUnsafeHTML':!0x0});}),this['_formView']['on']('change:isError',(_0x742f81,_0x49f916,_0x4b6d3f)=>{if(_0x4b6d3f){const _0x507daf=this['_formView']['errorView']['text'];_0xf5b213['announce'](i(_0x12e126,'Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x507daf));}});}['_onExecute'](_0x32e552){const _0x3bd751=this['_commandDefinitions']['get'](_0x32e552),_0x225832=this['editor'],_0x13b48c=_0x225832['model']['document']['selection'],_0xf34641=_0x225832['commands']['get']('showAIAssistant'),_0x465cf6=_0x225832['plugins']['get'](a),_0x53b614=''+(_0x3bd751['groupId']!==K?_0x3bd751['groupLabel']+':\x20':'')+_0x3bd751['label'];if(!0x1!==_0x3bd751['requiresContent']&&_0x13b48c['isCollapsed']){const _0x5b46b7=_0xa95bf(_0x13b48c['getSelectedBlocks']())||_0x225832['model']['schema']['getLimitElement'](_0x13b48c);_0x225832['model']['change'](_0x26d04d=>{_0x26d04d['setSelection'](_0x5b46b7,'in');});}_0x465cf6['showFakeVisualSelection'](),_0xf34641['execute'](_0x3bd751['prompt'],_0x53b614,'command:'+_0x32e552);}['_populateMenuBarMenu'](_0x53bb4e,_0x977606,_0x546ad9,_0x5098d4){const _0x29768f=this['editor'],_0x3df944=_0x29768f['locale'],_0x5e0fc3=new _0x5c77e6(_0x3df944),_0x3c0e7e=U(_0x29768f,_0x546ad9)['filter'](_0xacf98=>_0xacf98['commands']['length']);0x1===_0x3c0e7e['length']?this['_getMenuBarGroupButtons']({'command':_0x53bb4e,'commands':_0x3c0e7e[0x0]['commands'],'parentMenuView':_0x977606,'onExecute':_0x5098d4})['forEach'](_0x480afb=>_0x5e0fc3['items']['add'](_0x480afb)):_0x3c0e7e['forEach'](({groupId:_0x5d9e7f,groupLabel:_0x55f6bd,commands:_0x138eda})=>{const _0x9fc5ea=new _0x1ffa5c(_0x3df944,_0x977606),_0x229b1b=new _0x3f8494(_0x3df944),_0x17394a=new _0x5c77e6(_0x3df944),_0x45d152=this['_getMenuBarGroupButtons']({'command':_0x53bb4e,'commands':_0x138eda,'parentMenuView':_0x229b1b,'onExecute':_0x5098d4});_0x229b1b['buttonView']['set']({'label':_0x55f6bd||_0x5d9e7f}),_0x229b1b['delegate']('execute')['to'](_0x977606),_0x17394a['items']['addMany'](_0x45d152),_0x229b1b['panelView']['children']['add'](_0x17394a),_0x9fc5ea['children']['add'](_0x229b1b),_0x5e0fc3['items']['add'](_0x9fc5ea);}),_0x977606['panelView']['children']['add'](_0x5e0fc3);}['_getMenuBarGroupButtons']({command:_0x518cf1,commands:_0x460b21,parentMenuView:_0x2e2ead,onExecute:_0x2e7dc4}){const _0x542e69=this['editor'],_0x467aa4=_0x542e69['locale'];return U(_0x542e69,_0x460b21)['map'](_0x51bf4c=>{const _0x1d0453=new _0x1ffa5c(_0x467aa4,_0x2e2ead),_0x1b4690=new _0x4bb7ac(_0x467aa4);return _0x1b4690['set']({'label':_0x51bf4c['label']}),_0x1b4690['delegate']('execute')['to'](_0x2e2ead),_0x1b4690['on']('execute',()=>_0x2e7dc4(_0x51bf4c['id'])),_0x1b4690['bind']('isEnabled')['to'](_0x518cf1,'enabledCommandsIds',_0x3d3c16=>_0x3d3c16['includes'](_0x51bf4c['id'])),_0x1d0453['children']['add'](_0x1b4690),_0x1d0453;});}}function T(_0x5b8cfa,_0x5653ff){return void 0x0!==_0x5b8cfa['order']&&void 0x0===_0x5653ff['order']?0x1:void 0x0===_0x5b8cfa['order']&&void 0x0!==_0x5653ff['order']?-0x1:void 0x0!==_0x5b8cfa['order']&&void 0x0!==_0x5653ff['order']?_0x5b8cfa['order']-_0x5653ff['order']:0x0;}function U(_0x10f4f8,_0x183a9c){_0x183a9c['sort'](T);const _0x155ae0={},_0x4b29a5=[];for(const _0x486f9f of _0x183a9c)if(void 0x0!==_0x486f9f['order']){if(_0x486f9f['order']in _0x155ae0)throw new _0x4853ec('ai-commands-config-order-collision',_0x10f4f8,{'conflictingDefinitions':[_0x486f9f,_0x155ae0[_0x486f9f['order']]]});_0x155ae0[_0x486f9f['order']]=_0x486f9f,_0x4b29a5['splice'](_0x486f9f['order'],0x0,_0x486f9f);}else _0x4b29a5['push'](_0x486f9f);return _0x4b29a5;}class At extends _0x229599{static get['requires'](){return[n,a];}static get['pluginName'](){return'AIAssistant';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3f1317){super(_0x3f1317);const _0x1067cc=_0x3f1317['config'],_0x2cd6de=_0x3f1317['locale'];_0x1067cc['define']('ai.aiAssistant.preserveComments',!0x0),_0x1067cc['define']('ai.aiAssistant.commands',_t(_0x2cd6de)),_0x1067cc['define']('ai.aiAssistant.extraCommandGroups',[]),_0x1067cc['define']('ai.aiAssistant.removeCommands',[]);let _0x482f93=o(_0x1067cc['get']('ai.aiAssistant.commands'),_0x2cd6de);const _0x4160c6=_0x1067cc['get']('ai.aiAssistant.extraCommandGroups'),_0x398c6d=_0x1067cc['get']('ai.aiAssistant.removeCommands');_0x4160c6['forEach'](_0x452def=>{const _0xef552c=_0x482f93['find'](_0x332b2c=>_0x332b2c['groupId']===_0x452def['groupId']);_0xef552c?_0xef552c['commands']=_0xef552c['commands']['concat'](_0x452def['commands']):_0x482f93['push'](_0x452def);}),_0x482f93=_0x482f93['filter'](_0x2ed5d1=>!_0x398c6d['includes'](_0x2ed5d1['groupId'])),_0x482f93['forEach'](_0x2e80d3=>{_0x2e80d3['commands']=_0x2e80d3['commands']['filter'](_0x1af771=>!_0x398c6d['includes'](_0x1af771['id']));}),_0x1067cc['set']('ai.aiAssistant.commands',_0x482f93);}}function _t(_0x1aa606){return[{'groupId':'editOrReview','groupLabel':i(_0x1aa606,'Edit\x20or\x20review'),'commands':[{'id':'improveWriting','label':i(_0x1aa606,'Improve\x20writing'),'prompt':'Fix\x20spelling\x20mistakes,\x20use\x20proper\x20grammar\x20and\x20apply\x20good\x20writing\x20practices.\x20Do\x20not\x20lose\x20the\x20original\x20meaning.'},{'id':'makeShorter','label':i(_0x1aa606,'Make\x20shorter'),'prompt':'Remove\x20any\x20repetitive,\x20redundant,\x20or\x20non-essential\x20writing\x20in\x20this\x20content\x20without\x20changing\x20the\x20meaning\x20or\x20losing\x20any\x20key\x20information.'},{'id':'makeLonger','label':i(_0x1aa606,'Make\x20longer'),'prompt':'Improve\x20this\x20content\x20by\x20using\x20descriptive\x20language\x20and\x20inserting\x20more\x20information\x20and\x20more\x20detailed\x20explanations.'},{'id':'simplifyLanguage','label':i(_0x1aa606,'Simplify\x20language'),'prompt':'Simplify\x20the\x20writing\x20style\x20of\x20this\x20content\x20and\x20reduce\x20the\x20complexity,\x20so\x20that\x20the\x20content\x20is\x20easy\x20to\x20understand.'}]},{'groupId':'generate','groupLabel':i(_0x1aa606,'Generate\x20from\x20selection'),'commands':[{'id':'summarize','label':i(_0x1aa606,'Summarize'),'prompt':'Summarize\x20this\x20content\x20into\x20one\x20paragraph\x20of\x20text.\x20Include\x20only\x20the\x20key\x20ideas\x20and\x20conclusions.\x20Keep\x20it\x20short.\x20Do\x20not\x20keep\x20original\x20text\x20formatting.'},{'id':'continue','label':i(_0x1aa606,'Continue'),'prompt':'Start\x20with\x20the\x20provided\x20content\x20and\x20write\x20at\x20the\x20end\x20of\x20it\x20continuing\x20this\x20topic.\x20Keep\x20the\x20added\x20part\x20short.'}]},{'groupId':'changeTone','groupLabel':i(_0x1aa606,'Change\x20tone'),'commands':[{'id':'professional','label':i(_0x1aa606,'Professional'),'prompt':'Improve\x20using\x20polished,\x20formal,\x20and\x20respectful\x20language\x20to\x20convey\x20professional\x20expertise\x20and\x20competence.'},{'id':'casual','label':i(_0x1aa606,'Casual'),'prompt':'Improve\x20using\x20casual,\x20informal\x20language\x20to\x20convey\x20a\x20casual\x20conversation\x20with\x20a\x20real\x20person.'},{'id':'direct','label':i(_0x1aa606,'Direct'),'prompt':'Improve\x20using\x20direct\x20language,\x20using\x20only\x20the\x20essential\x20information.'},{'id':'confident','label':i(_0x1aa606,'Confident'),'prompt':'Improve\x20using\x20compelling,\x20optimistic\x20language\x20to\x20convey\x20confidence\x20in\x20the\x20writing.'},{'id':'friendly','label':i(_0x1aa606,'Friendly'),'prompt':'Improve\x20using\x20friendly,\x20comforting\x20language,\x20to\x20convey\x20understanding\x20and\x20empathy.'}]},{'groupId':'changeStyle','groupLabel':i(_0x1aa606,'Change\x20style'),'commands':[{'id':'business','label':i(_0x1aa606,'Business'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20business\x20professional\x20with\x20formal\x20language.'},{'id':'legal','label':i(_0x1aa606,'Legal'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20legal\x20professional\x20using\x20valid\x20legal\x20terminology.'},{'id':'journalism','label':i(_0x1aa606,'Journalism'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20journalist\x20using\x20engaging\x20language\x20to\x20convey\x20the\x20importance\x20of\x20the\x20information.'},{'id':'poetic','label':i(_0x1aa606,'Poetic'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20poem\x20using\x20poetic\x20techniques\x20without\x20losing\x20the\x20original\x20meaning.'}]},{'groupId':'translate','groupLabel':i(_0x1aa606,'Translate'),'commands':[{'id':'translateEnglish','label':i(_0x1aa606,'English'),'prompt':'Translate\x20the\x20content\x20to\x20English\x20language.'},{'id':'translateSpanish','label':i(_0x1aa606,'Spanish'),'prompt':'Translate\x20the\x20content\x20to\x20Spanish\x20language.'},{'id':'translatePortuguese','label':i(_0x1aa606,'Portuguese'),'prompt':'Translate\x20the\x20content\x20to\x20Portuguese\x20language.'},{'id':'translateGerman','label':i(_0x1aa606,'German'),'prompt':'Translate\x20the\x20content\x20to\x20German\x20language.'},{'id':'translateFrench','label':i(_0x1aa606,'French'),'prompt':'Translate\x20the\x20content\x20to\x20French\x20language.'},{'id':'translateChinese','label':i(_0x1aa606,'Simplified\x20Chinese'),'prompt':'Translate\x20the\x20content\x20to\x20Simplified\x20Chinese\x20language.'},{'id':'translateHindi','label':i(_0x1aa606,'Hindi'),'prompt':'Translate\x20the\x20content\x20to\x20Hindi\x20language.'},{'id':'translateArabic','label':i(_0x1aa606,'Arabic'),'prompt':'Translate\x20the\x20content\x20to\x20Arabic\x20language.'}]}];}class S extends _0x229599{['abortController'];static get['requires'](){return[x];}constructor(_0x3df771){super(_0x3df771),this['abortController']=new AbortController();}['init'](){this['editor']['plugins']['get'](x)['textAdapter']=this;}['abort'](){this['abortController']['signal']['aborted']||(this['abortController']['abort'](),this['abortController']=new AbortController());}async['makeRequest'](_0x2943d0){return this['sendRequest'](_0x2943d0)['catch'](_0x383400=>{if(_0x383400 instanceof R)return Promise['reject'](_0x383400);if('AbortError'==_0x383400['name'])return Promise['resolve']();throw console['error'](_0x383400),new _0x4853ec('aitextadapter-send-request-failed',null);});}async['_prepareRequestHeaders'](_0x5f15d9,_0x16b095){const _0x541380=this['editor']['locale'],_0x5bffd3={'Content-Type':'application/json'};if('object'==typeof _0x5f15d9)Object['assign'](_0x5bffd3,_0x5f15d9);else{if(_0x5f15d9)try{const _0x910d6c=await _0x5f15d9(_0x16b095);Object['assign'](_0x5bffd3,_0x910d6c);}catch{return Promise['reject'](new R(i(_0x541380,'AI_ERROR_GET_HEADERS')));}}return _0x5bffd3;}async['_prepareRequestParameters'](_0x4b7939,_0x2ff790){const _0x2e5074=this['editor']['locale'];if('object'==typeof _0x4b7939)return _0x4b7939;try{return await _0x4b7939(_0x2ff790);}catch{return Promise['reject'](new R(i(_0x2e5074,'AI_ERROR_GET_PARAMETERS')));}}}class It extends S{['_apiUrl'];['_requestHeaders'];['_requestParameters'];static get['pluginName'](){return'OpenAITextAdapter';}constructor(_0x3de624){super(_0x3de624),_0x3de624['config']['define']('ai.openAI.apiUrl','https://api.openai.com/v1/chat/completions'),_0x3de624['config']['get']('ai.openAI.requestParameters')||_0x3de624['config']['define']('ai.openAI.requestParameters',{'model':'gpt-4o','temperature':0x1,'top_p':0x1,'stream':!0x0}),this['_apiUrl']=_0x3de624['config']['get']('ai.openAI.apiUrl'),this['_requestHeaders']=_0x3de624['config']['get']('ai.openAI.requestHeaders')||{},this['_requestParameters']=_0x3de624['config']['get']('ai.openAI.requestParameters');}async['sendRequest']({query:_0x13ea11,context:_0x1c7524,onData:_0x28983e,actionId:_0x1c353f}){const _0x13c742=this['editor']['locale'],_0x20b049=await this['prepareMessages'](_0x13ea11,_0x1c7524,_0x1c353f),_0x17d58a=await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x1c353f),_0x3c9267=await this['_prepareRequestParameters'](this['_requestParameters'],_0x1c353f),_0xb68bdf={'messages':_0x20b049,..._0x3c9267},_0x18c482={'method':'POST','headers':_0x17d58a,'body':JSON['stringify'](_0xb68bdf),'signal':this['abortController']['signal']},_0x34eef9=await fetch(this['_apiUrl'],_0x18c482);if(_0x34eef9['ok'])return _0x3c9267['stream']?await this['_readStreamableResponse'](_0x34eef9,_0x28983e):await this['_readStaticResponse'](_0x34eef9,_0x28983e),Promise['resolve']();{const _0xfcb11d=await _0x34eef9['text']();return _0xfcb11d['includes']('context_length_exceeded')?Promise['reject'](new R(i(_0x13c742,'AI_ERROR_CONTEXT_LENGTH'))):_0xfcb11d['includes']('Moderation')?Promise['reject'](new R(i(_0x13c742,'AI_ERROR_MODERATION'))):Promise['reject'](new Error(_0xfcb11d));}}async['prepareMessages'](_0x2be6c6,_0x2e18f7,_0x37e241){let _0x4f2989,_0x17d1ef;return _0x2e18f7?(_0x4f2989='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.',_0x17d1ef='Instruction:\x0a'+_0x2be6c6+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x2e18f7):(_0x4f2989='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.',_0x17d1ef=_0x2be6c6),[{'role':'system','content':_0x4f2989},{'role':'user','content':_0x17d1ef}];}async['_readStreamableResponse'](_0x38779e,_0x787543){const _0x5365d8=_0x38779e['body']['getReader'](),_0x38f42b=new TextDecoder();let _0x38de7d='',_0x37e08b='',_0x59a2a1='',_0x1be432=!0x1;for(;!_0x1be432;){const {done:_0x675dd4,value:_0x525847}=await _0x5365d8['read'](),_0x4fdca5=_0x38de7d+_0x38f42b['decode'](_0x525847);let _0x3a44e5='';_0x1be432=_0x675dd4;try{_0x3a44e5=this['_cleanUpData'](_0x4fdca5),_0x38de7d='';}catch{_0x38de7d=_0x4fdca5;continue;}_0x37e08b+=_0x3a44e5,!_0x1be432&&this['_isBufferIncomplete'](_0x37e08b)||_0x37e08b&&(_0x59a2a1+=_0x37e08b,_0x37e08b='',_0x787543(_0x59a2a1));}return Promise['resolve']();}async['_readStaticResponse'](_0x66bbb1,_0x513a19){return _0x513a19((await _0x66bbb1['json']())['choices'][0x0]['message']['content']),Promise['resolve']();}['_isBufferIncomplete'](_0x24c2dc){const _0x4bbac5=_0x24c2dc['split']('<')['length']!==_0x24c2dc['split']('>')['length'],_0x403918=_0x24c2dc['length']<0x1e;return _0x4bbac5&&_0x403918;}['_cleanUpData'](_0x28383d){return _0x28383d['split'](/\n(?![^{]*\})/g)['map'](_0x4103c0=>_0x4103c0['replace']('data:\x20',''))['filter'](_0x5f0a97=>_0x5f0a97&&_0x5f0a97['length']>0x0&&'[DONE]'!==_0x5f0a97)['map'](_0x4a1653=>{const {choices:_0x5a37a3}=JSON['parse'](_0x4a1653);if(_0x5a37a3[0x0]?.['delta']?.['content'])return _0x5a37a3[0x0]['delta']['content'];})['filter'](_0x54efc6=>_0x54efc6)['join']('');}}class Et extends S{['_apiUrl'];['_requestHeaders'];['_bedrockClientConfig'];['_requestParameters'];static get['pluginName'](){return'AWSTextAdapter';}constructor(_0x4aa8e4){super(_0x4aa8e4),_0x4aa8e4['config']['get']('ai.aws.requestParameters')||_0x4aa8e4['config']['define']('ai.aws.requestParameters',{'model':'anthropic.claude-v2','max_tokens_to_sample':0x7d0,'temperature':0x1,'top_p':0x1,'top_k':0xfa,'anthropic_version':'bedrock-2023-05-31','stream':!0x0}),this['_apiUrl']=_0x4aa8e4['config']['get']('ai.aws.apiUrl'),this['_bedrockClientConfig']=_0x4aa8e4['config']['get']('ai.aws.bedrockClientConfig'),this['_requestHeaders']=_0x4aa8e4['config']['get']('ai.aws.requestHeaders'),this['_requestParameters']=_0x4aa8e4['config']['get']('ai.aws.requestParameters');}async['sendRequest']({query:_0x5d5e3d,context:_0x9e9230,onData:_0x2a68aa,actionId:_0x29daa3}){const {model:_0x10c640,stream:_0x381a94,..._0x4752ed}=await this['_prepareRequestParameters'](this['_requestParameters'],_0x29daa3),_0x126cea={'prompt':await this['preparePrompt'](_0x5d5e3d,_0x9e9230,_0x10c640,_0x29daa3),..._0x4752ed};this['_apiUrl']?await this['_processProxyRequest'](_0x126cea,_0x10c640,_0x381a94,_0x2a68aa,_0x29daa3):await this['_processAWSRequest'](_0x126cea,_0x10c640,_0x381a94,_0x2a68aa);}async['preparePrompt'](_0x4f0507,_0xf3cdc8,_0x2ffdda,_0x6ae7b8){let _0x39bce9,_0x1973a8;return _0xf3cdc8?(_0x39bce9='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.',_0x1973a8='Instruction:\x0a'+_0x4f0507+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0xf3cdc8):(_0x39bce9='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.',_0x1973a8=_0x4f0507),'meta.llama'==this['getModelFamily'](_0x2ffdda)?'<<SYS>>\x0a'+_0x39bce9+'\x0a<</SYS>>\x0a[INST]\x0a'+_0x1973a8+'\x0a[/INST]':'Human:\x0a'+_0x39bce9+'\x0a'+_0x1973a8+'\x0a\x0aAssistant:';}['getModelFamily'](_0x553ee9){if(/^anthropic\.claude/['test'](_0x553ee9))return'anthropic.claude';if(/^ai21\.j2/['test'](_0x553ee9))return'ai21.j2';if(/^cohere\.command/['test'](_0x553ee9))return'cohere.command';if(/^meta\.llama/['test'](_0x553ee9))return'meta.llama';throw new R(i(this['editor']['locale'],'AI_ERROR_UNSUPPORTED_MODEL',_0x553ee9));}async['_processProxyRequest'](_0x2d596a,_0x110916,_0x505f65,_0x3bd5ca,_0x54c185){const _0x4574fc={'method':'POST','headers':await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x54c185),'body':JSON['stringify']({..._0x2d596a,'model':_0x110916,'stream':_0x505f65}),'signal':this['abortController']['signal']},_0xebe1a4=await fetch(this['_apiUrl'],_0x4574fc);_0x505f65?await this['_readStreamableResponse'](_0xebe1a4,_0x110916,_0x3bd5ca):await this['_readStaticResponse'](_0xebe1a4,_0x110916,_0x3bd5ca);}async['_processAWSRequest'](_0x3a7c8a,_0x447bfe,_0xef5ca8,_0x58365d){const _0x3733c0=new _0x491405(this['_bedrockClientConfig']),_0x1367af={'body':JSON['stringify'](_0x3a7c8a),'contentType':'application/json','accept':'application/json','modelId':_0x447bfe};let _0x108044;if(_0xef5ca8){const _0x1d7879=new _0x16efbc(_0x1367af);_0x108044=await _0x3733c0['send'](_0x1d7879,{'abortSignal':this['abortController']['signal']}),await this['_readAsyncIterableResponse'](_0x108044,_0x447bfe,_0x58365d);}else{const _0x1e35c9=new _0x27592f(_0x1367af);_0x108044=await _0x3733c0['send'](_0x1e35c9,{'abortSignal':this['abortController']['signal']}),await this['_readStaticResponse'](_0x108044,_0x447bfe,_0x58365d);}}async['_readAsyncIterableResponse'](_0xdb7721,_0x59c875,_0x5b02a4){const _0x46c724=_0xdb7721['body'],_0x52dd15=new TextDecoder('utf-8');let _0x372622='';for await(const _0x142bbb of _0x46c724)if(_0x142bbb['chunk']){const _0x8882c6=_0x52dd15['decode'](_0x142bbb['chunk']['bytes']),_0x4b5dcb=JSON['parse'](_0x8882c6);_0x372622+=this['_getGeneratedText'](_0x4b5dcb,_0x59c875),_0x5b02a4(_0x372622);}return Promise['resolve']();}async['_readStreamableResponse'](_0x60ff46,_0x1200ca,_0x5224ac){const _0x340a3c=_0x60ff46['body'],_0x55b48b=new TextDecoder('utf-8'),_0x3dcded=_0x340a3c['getReader']();let _0x18f79f='',_0x488a99='',_0x29c697=!0x1;for(;!_0x29c697;){const {done:_0x53029d,value:_0x5bfb92}=await _0x3dcded['read']();if(_0x29c697=_0x53029d,_0x29c697)break;const _0x374de8=(_0x18f79f+_0x55b48b['decode'](_0x5bfb92))['split']('\x0a')['map'](_0x12085c=>{try{return _0x18f79f='',JSON['parse'](_0x12085c);}catch{return _0x18f79f=_0x12085c,null;}})['filter'](_0x843f8b=>null!==_0x843f8b);_0x374de8['length']&&(_0x488a99+=_0x374de8['map'](_0x498d86=>this['_getGeneratedText'](_0x498d86,_0x1200ca))['join'](''),_0x5224ac(_0x488a99));}return Promise['resolve']();}async['_readStaticResponse'](_0x14c638,_0x509d1a,_0x26f57){let _0x3841d2;return _0x3841d2=_0x14c638 instanceof Response?await _0x14c638['json']():JSON['parse'](new TextDecoder('utf-8')['decode'](_0x14c638['body'])),(_0x26f57(this['_getGeneratedText'](_0x3841d2,_0x509d1a)),Promise['resolve']());}['_getGeneratedText'](_0x3e4d70,_0xf5f87a){switch(this['getModelFamily'](_0xf5f87a)){case'anthropic.claude':return _0x3e4d70['completion'];case'ai21.j2':return _0x3e4d70['completions'][0x0]['data']['text'];case'cohere.command':return _0x3e4d70['generations'][0x0]['text'];case'meta.llama':return _0x3e4d70['generation'];}}}export{x as AIAdapter,At as AIAssistant,n as AIAssistantUI,R as AIRequestError,S as AITextAdapter,Et as AWSTextAdapter,It as OpenAITextAdapter,E as ShowAIAssistantCommand,_t as getDefaultAICommands};
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- export default{'af':{'dictionary':{'Edit\x20or\x20review':'','Improve\x20writing':'','Make\x20shorter':'','Make\x20longer':'','Simplify\x20language':'','Generate\x20from\x20selection':'','Summarize':'','Continue':'','Change\x20tone':'','Professional':'','Casual':'','Direct':'','Confident':'','Friendly':'','Change\x20style':'','Business':'','Legal':'','Journalism':'','Poetic':'','Translate':'','English':'','Spanish':'','German':'','Portuguese':'','French':'','Simplified\x20Chinese':'','Hindi':'','Arabic':'','AI\x20Assistant':'','AI\x20Commands':'','Ask\x20AI\x20to\x20edit\x20or\x20generate':'','Ask\x20AI\x20to\x20improve\x20generated\x20text':'','Copy':'','Submit':'Indien','Insert\x20below':'','Try\x20again':'','Stop':'','AI\x20is\x20writing...':'','AI\x20is\x20writing':'','Generated\x20content:\x20%0':'','Error\x20during\x20AI\x20content\x20generation:\x20%0':'','History':'','Empty\x20history':'','Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.':'','Prompt\x20history':'','AI_REPLACE_CONTENT':'Vervang','AI_INSERT_CONTENT':'','AI_ERROR_GET_HEADERS':'','AI_ERROR_GET_PARAMETERS':'','AI_ERROR_UNSUPPORTED_MODEL':'','AI_ERROR_CONTEXT_LENGTH':'','AI_ERROR_MODERATION':'','AI_ERROR_FAILED':'','Other':''},'getPluralForm':_0x494d62=>0x1!=_0x494d62}};
23
+ export default{'af':{'dictionary':{'Edit\x20or\x20review':'','Improve\x20writing':'','Make\x20shorter':'','Make\x20longer':'','Simplify\x20language':'','Generate\x20from\x20selection':'','Summarize':'','Continue':'','Change\x20tone':'','Professional':'','Casual':'','Direct':'','Confident':'','Friendly':'','Change\x20style':'','Business':'','Legal':'','Journalism':'','Poetic':'','Translate':'','English':'','Spanish':'','German':'','Portuguese':'','French':'','Simplified\x20Chinese':'','Hindi':'','Arabic':'','AI\x20Assistant':'','AI\x20Commands':'','Ask\x20AI\x20to\x20edit\x20or\x20generate':'','Ask\x20AI\x20to\x20improve\x20generated\x20text':'','Copy':'','Submit':'Indien','Insert\x20below':'','Try\x20again':'','Stop':'','AI\x20is\x20writing...':'','AI\x20is\x20writing':'','Generated\x20content:\x20%0':'','Error\x20during\x20AI\x20content\x20generation:\x20%0':'','History':'','Empty\x20history':'','Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.':'','Prompt\x20history':'','AI_REPLACE_CONTENT':'Vervang','AI_INSERT_CONTENT':'','AI_ERROR_GET_HEADERS':'','AI_ERROR_GET_PARAMETERS':'','AI_ERROR_UNSUPPORTED_MODEL':'','AI_ERROR_CONTEXT_LENGTH':'','AI_ERROR_MODERATION':'','AI_ERROR_FAILED':'','Other':''},'getPluralForm':_0x4d61e5=>0x1!=_0x4d61e5}};
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- (_0x50c42b=>{const {af:{dictionary:_0x42be04,getPluralForm:_0x588e38}}={'af':{'dictionary':{'Edit\x20or\x20review':'','Improve\x20writing':'','Make\x20shorter':'','Make\x20longer':'','Simplify\x20language':'','Generate\x20from\x20selection':'','Summarize':'','Continue':'','Change\x20tone':'','Professional':'','Casual':'','Direct':'','Confident':'','Friendly':'','Change\x20style':'','Business':'','Legal':'','Journalism':'','Poetic':'','Translate':'','English':'','Spanish':'','German':'','Portuguese':'','French':'','Simplified\x20Chinese':'','Hindi':'','Arabic':'','AI\x20Assistant':'','AI\x20Commands':'','Ask\x20AI\x20to\x20edit\x20or\x20generate':'','Ask\x20AI\x20to\x20improve\x20generated\x20text':'','Copy':'','Submit':'Indien','Insert\x20below':'','Try\x20again':'','Stop':'','AI\x20is\x20writing...':'','AI\x20is\x20writing':'','Generated\x20content:\x20%0':'','Error\x20during\x20AI\x20content\x20generation:\x20%0':'','History':'','Empty\x20history':'','Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.':'','Prompt\x20history':'','AI_REPLACE_CONTENT':'Vervang','AI_INSERT_CONTENT':'','AI_ERROR_GET_HEADERS':'','AI_ERROR_GET_PARAMETERS':'','AI_ERROR_UNSUPPORTED_MODEL':'','AI_ERROR_CONTEXT_LENGTH':'','AI_ERROR_MODERATION':'','AI_ERROR_FAILED':'','Other':''},'getPluralForm':_0xf0ea2b=>0x1!=_0xf0ea2b}};_0x50c42b['af']||={'dictionary':{},'getPluralForm':null},_0x50c42b['af']['dictionary']=Object['assign'](_0x50c42b['af']['dictionary'],_0x42be04),_0x50c42b['af']['getPluralForm']=_0x588e38;})(window['CKEDITOR_TRANSLATIONS']||={});
23
+ (_0x390481=>{const {af:{dictionary:_0x587a46,getPluralForm:_0x2a76a5}}={'af':{'dictionary':{'Edit\x20or\x20review':'','Improve\x20writing':'','Make\x20shorter':'','Make\x20longer':'','Simplify\x20language':'','Generate\x20from\x20selection':'','Summarize':'','Continue':'','Change\x20tone':'','Professional':'','Casual':'','Direct':'','Confident':'','Friendly':'','Change\x20style':'','Business':'','Legal':'','Journalism':'','Poetic':'','Translate':'','English':'','Spanish':'','German':'','Portuguese':'','French':'','Simplified\x20Chinese':'','Hindi':'','Arabic':'','AI\x20Assistant':'','AI\x20Commands':'','Ask\x20AI\x20to\x20edit\x20or\x20generate':'','Ask\x20AI\x20to\x20improve\x20generated\x20text':'','Copy':'','Submit':'Indien','Insert\x20below':'','Try\x20again':'','Stop':'','AI\x20is\x20writing...':'','AI\x20is\x20writing':'','Generated\x20content:\x20%0':'','Error\x20during\x20AI\x20content\x20generation:\x20%0':'','History':'','Empty\x20history':'','Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.':'','Prompt\x20history':'','AI_REPLACE_CONTENT':'Vervang','AI_INSERT_CONTENT':'','AI_ERROR_GET_HEADERS':'','AI_ERROR_GET_PARAMETERS':'','AI_ERROR_UNSUPPORTED_MODEL':'','AI_ERROR_CONTEXT_LENGTH':'','AI_ERROR_MODERATION':'','AI_ERROR_FAILED':'','Other':''},'getPluralForm':_0x4f8f4f=>0x1!=_0x4f8f4f}};_0x390481['af']||={'dictionary':{},'getPluralForm':null},_0x390481['af']['dictionary']=Object['assign'](_0x390481['af']['dictionary'],_0x587a46),_0x390481['af']['getPluralForm']=_0x2a76a5;})(window['CKEDITOR_TRANSLATIONS']||={});
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- export default{'ar':{'dictionary':{'Edit\x20or\x20review':'التحرير\x20أو\x20المراجعة','Improve\x20writing':'قم\x20بتحسين\x20الكتابة','Make\x20shorter':'اجعله\x20أقصر','Make\x20longer':'اجعله\x20أطول','Simplify\x20language':'قم\x20بتبسيط\x20اللغة','Generate\x20from\x20selection':'قم\x20بالإنشاء\x20من\x20التحديد','Summarize':'تلخيص','Continue':'متابعة','Change\x20tone':'تغيير\x20الأسلوب','Professional':'احترافي','Casual':'غير\x20رسمي','Direct':'مباشر','Confident':'لهجة\x20واثقة','Friendly':'ودي','Change\x20style':'تغيير\x20الأسلوب','Business':'تجاري','Legal':'قانوني','Journalism':'الكتابة\x20الصحفية','Poetic':'شِعري','Translate':'ترجِمْ','English':'الإنكليزية','Spanish':'الإسبانية','German':'الألمانية','Portuguese':'البرتغالية','French':'الفرنسية','Simplified\x20Chinese':'الصينية\x20المبسطة','Hindi':'الهندية','Arabic':'العربية','AI\x20Assistant':'مساعد\x20الذكاء\x20الاصطناعي','AI\x20Commands':'أوامر\x20الذكاء\x20الاصطناعي','Ask\x20AI\x20to\x20edit\x20or\x20generate':'اطلب\x20من\x20الذكاء\x20الاصطناعي\x20أن\x20يقوم\x20بالتحرير\x20أو\x20الإنشاء','Ask\x20AI\x20to\x20improve\x20generated\x20text':'اطلب\x20من\x20الذكاء\x20الاصطناعي\x20أن\x20يقوم\x20بتحسين\x20النص\x20الذي\x20تم\x20إنشاؤه','Copy':'نسخ','Submit':'إرسال','Insert\x20below':'أدخل\x20أدناه','Try\x20again':'حاول\x20مجددًا','Stop':'إيقاف','AI\x20is\x20writing...':'يقوم\x20الذكاء\x20الاصطناعي\x20بالكتابة...','AI\x20is\x20writing':'يكتب\x20الذكاء\x20الاصطناعي','Generated\x20content:\x20%0':'المحتوى\x20الذي\x20تم\x20إنشاؤه:\x20%0','Error\x20during\x20AI\x20content\x20generation:\x20%0':'حدث\x20خطأ\x20أثناء\x20إنشاء\x20محتوى\x20الذكاء\x20الاصطناعي:\x20%0','History':'سجل\x20المحفوظات','Empty\x20history':'السجل\x20فارغ','Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.':'سيتم\x20إدراج\x20الطلبات\x20التي\x20طلبتها\x20من\x20الذكاء\x20الاصطناعي\x20والتوجيهات\x20الخاصة\x20بك\x20هنا\x20لكي\x20يتم\x20استخدامها\x20لاحقًا.','Prompt\x20history':'سجل\x20التوجيهات','AI_REPLACE_CONTENT':'استبدال','AI_INSERT_CONTENT':'إدراج','AI_ERROR_GET_HEADERS':'فشلت\x20عملية\x20تحضير\x20عناوين\x20الطلبات','AI_ERROR_GET_PARAMETERS':'لقد\x20فشلت\x20عملية\x20إعداد\x20معلمات\x20الطلب','AI_ERROR_UNSUPPORTED_MODEL':'إن\x20نموذج\x20AI\x20المطلوب\x20(\x22%0\x22)\x20غير\x20مدعوم','AI_ERROR_CONTEXT_LENGTH':'المحتوى\x20المحدد\x20طويل\x20جداً','AI_ERROR_MODERATION':'الاستعلام\x20المطلوب\x20لا\x20يجتاز\x20قواعد\x20الإشراف','AI_ERROR_FAILED':'لقد\x20فشل\x20التواصل\x20مع\x20خدمة\x20الذكاء\x20الاصطناعي','Other':'آخر'},'getPluralForm':_0x536fb6=>0x0==_0x536fb6?0x0:0x1==_0x536fb6?0x1:0x2==_0x536fb6?0x2:_0x536fb6%0x64>=0x3&&_0x536fb6%0x64<=0xa?0x3:_0x536fb6%0x64>=0xb?0x4:0x5}};
23
+ export default{'ar':{'dictionary':{'Edit\x20or\x20review':'التحرير\x20أو\x20المراجعة','Improve\x20writing':'قم\x20بتحسين\x20الكتابة','Make\x20shorter':'اجعله\x20أقصر','Make\x20longer':'اجعله\x20أطول','Simplify\x20language':'قم\x20بتبسيط\x20اللغة','Generate\x20from\x20selection':'قم\x20بالإنشاء\x20من\x20التحديد','Summarize':'تلخيص','Continue':'متابعة','Change\x20tone':'تغيير\x20الأسلوب','Professional':'احترافي','Casual':'غير\x20رسمي','Direct':'مباشر','Confident':'لهجة\x20واثقة','Friendly':'ودي','Change\x20style':'تغيير\x20الأسلوب','Business':'تجاري','Legal':'قانوني','Journalism':'الكتابة\x20الصحفية','Poetic':'شِعري','Translate':'ترجِمْ','English':'الإنكليزية','Spanish':'الإسبانية','German':'الألمانية','Portuguese':'البرتغالية','French':'الفرنسية','Simplified\x20Chinese':'الصينية\x20المبسطة','Hindi':'الهندية','Arabic':'العربية','AI\x20Assistant':'مساعد\x20الذكاء\x20الاصطناعي','AI\x20Commands':'أوامر\x20الذكاء\x20الاصطناعي','Ask\x20AI\x20to\x20edit\x20or\x20generate':'اطلب\x20من\x20الذكاء\x20الاصطناعي\x20أن\x20يقوم\x20بالتحرير\x20أو\x20الإنشاء','Ask\x20AI\x20to\x20improve\x20generated\x20text':'اطلب\x20من\x20الذكاء\x20الاصطناعي\x20أن\x20يقوم\x20بتحسين\x20النص\x20الذي\x20تم\x20إنشاؤه','Copy':'نسخ','Submit':'إرسال','Insert\x20below':'أدخل\x20أدناه','Try\x20again':'حاول\x20مجددًا','Stop':'إيقاف','AI\x20is\x20writing...':'يقوم\x20الذكاء\x20الاصطناعي\x20بالكتابة...','AI\x20is\x20writing':'يكتب\x20الذكاء\x20الاصطناعي','Generated\x20content:\x20%0':'المحتوى\x20الذي\x20تم\x20إنشاؤه:\x20%0','Error\x20during\x20AI\x20content\x20generation:\x20%0':'حدث\x20خطأ\x20أثناء\x20إنشاء\x20محتوى\x20الذكاء\x20الاصطناعي:\x20%0','History':'سجل\x20المحفوظات','Empty\x20history':'السجل\x20فارغ','Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.':'سيتم\x20إدراج\x20الطلبات\x20التي\x20طلبتها\x20من\x20الذكاء\x20الاصطناعي\x20والتوجيهات\x20الخاصة\x20بك\x20هنا\x20لكي\x20يتم\x20استخدامها\x20لاحقًا.','Prompt\x20history':'سجل\x20التوجيهات','AI_REPLACE_CONTENT':'استبدال','AI_INSERT_CONTENT':'إدراج','AI_ERROR_GET_HEADERS':'فشلت\x20عملية\x20تحضير\x20عناوين\x20الطلبات','AI_ERROR_GET_PARAMETERS':'لقد\x20فشلت\x20عملية\x20إعداد\x20معلمات\x20الطلب','AI_ERROR_UNSUPPORTED_MODEL':'إن\x20نموذج\x20AI\x20المطلوب\x20(\x22%0\x22)\x20غير\x20مدعوم','AI_ERROR_CONTEXT_LENGTH':'المحتوى\x20المحدد\x20طويل\x20جداً','AI_ERROR_MODERATION':'الاستعلام\x20المطلوب\x20لا\x20يجتاز\x20قواعد\x20الإشراف','AI_ERROR_FAILED':'لقد\x20فشل\x20التواصل\x20مع\x20خدمة\x20الذكاء\x20الاصطناعي','Other':'آخر'},'getPluralForm':_0x57ca23=>0x0==_0x57ca23?0x0:0x1==_0x57ca23?0x1:0x2==_0x57ca23?0x2:_0x57ca23%0x64>=0x3&&_0x57ca23%0x64<=0xa?0x3:_0x57ca23%0x64>=0xb?0x4:0x5}};
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- (_0x4686b1=>{const {ar:{dictionary:_0x584163,getPluralForm:_0xeeba92}}={'ar':{'dictionary':{'Edit\x20or\x20review':'التحرير\x20أو\x20المراجعة','Improve\x20writing':'قم\x20بتحسين\x20الكتابة','Make\x20shorter':'اجعله\x20أقصر','Make\x20longer':'اجعله\x20أطول','Simplify\x20language':'قم\x20بتبسيط\x20اللغة','Generate\x20from\x20selection':'قم\x20بالإنشاء\x20من\x20التحديد','Summarize':'تلخيص','Continue':'متابعة','Change\x20tone':'تغيير\x20الأسلوب','Professional':'احترافي','Casual':'غير\x20رسمي','Direct':'مباشر','Confident':'لهجة\x20واثقة','Friendly':'ودي','Change\x20style':'تغيير\x20الأسلوب','Business':'تجاري','Legal':'قانوني','Journalism':'الكتابة\x20الصحفية','Poetic':'شِعري','Translate':'ترجِمْ','English':'الإنكليزية','Spanish':'الإسبانية','German':'الألمانية','Portuguese':'البرتغالية','French':'الفرنسية','Simplified\x20Chinese':'الصينية\x20المبسطة','Hindi':'الهندية','Arabic':'العربية','AI\x20Assistant':'مساعد\x20الذكاء\x20الاصطناعي','AI\x20Commands':'أوامر\x20الذكاء\x20الاصطناعي','Ask\x20AI\x20to\x20edit\x20or\x20generate':'اطلب\x20من\x20الذكاء\x20الاصطناعي\x20أن\x20يقوم\x20بالتحرير\x20أو\x20الإنشاء','Ask\x20AI\x20to\x20improve\x20generated\x20text':'اطلب\x20من\x20الذكاء\x20الاصطناعي\x20أن\x20يقوم\x20بتحسين\x20النص\x20الذي\x20تم\x20إنشاؤه','Copy':'نسخ','Submit':'إرسال','Insert\x20below':'أدخل\x20أدناه','Try\x20again':'حاول\x20مجددًا','Stop':'إيقاف','AI\x20is\x20writing...':'يقوم\x20الذكاء\x20الاصطناعي\x20بالكتابة...','AI\x20is\x20writing':'يكتب\x20الذكاء\x20الاصطناعي','Generated\x20content:\x20%0':'المحتوى\x20الذي\x20تم\x20إنشاؤه:\x20%0','Error\x20during\x20AI\x20content\x20generation:\x20%0':'حدث\x20خطأ\x20أثناء\x20إنشاء\x20محتوى\x20الذكاء\x20الاصطناعي:\x20%0','History':'سجل\x20المحفوظات','Empty\x20history':'السجل\x20فارغ','Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.':'سيتم\x20إدراج\x20الطلبات\x20التي\x20طلبتها\x20من\x20الذكاء\x20الاصطناعي\x20والتوجيهات\x20الخاصة\x20بك\x20هنا\x20لكي\x20يتم\x20استخدامها\x20لاحقًا.','Prompt\x20history':'سجل\x20التوجيهات','AI_REPLACE_CONTENT':'استبدال','AI_INSERT_CONTENT':'إدراج','AI_ERROR_GET_HEADERS':'فشلت\x20عملية\x20تحضير\x20عناوين\x20الطلبات','AI_ERROR_GET_PARAMETERS':'لقد\x20فشلت\x20عملية\x20إعداد\x20معلمات\x20الطلب','AI_ERROR_UNSUPPORTED_MODEL':'إن\x20نموذج\x20AI\x20المطلوب\x20(\x22%0\x22)\x20غير\x20مدعوم','AI_ERROR_CONTEXT_LENGTH':'المحتوى\x20المحدد\x20طويل\x20جداً','AI_ERROR_MODERATION':'الاستعلام\x20المطلوب\x20لا\x20يجتاز\x20قواعد\x20الإشراف','AI_ERROR_FAILED':'لقد\x20فشل\x20التواصل\x20مع\x20خدمة\x20الذكاء\x20الاصطناعي','Other':'آخر'},'getPluralForm':_0x71f207=>0x0==_0x71f207?0x0:0x1==_0x71f207?0x1:0x2==_0x71f207?0x2:_0x71f207%0x64>=0x3&&_0x71f207%0x64<=0xa?0x3:_0x71f207%0x64>=0xb?0x4:0x5}};_0x4686b1['ar']||={'dictionary':{},'getPluralForm':null},_0x4686b1['ar']['dictionary']=Object['assign'](_0x4686b1['ar']['dictionary'],_0x584163),_0x4686b1['ar']['getPluralForm']=_0xeeba92;})(window['CKEDITOR_TRANSLATIONS']||={});
23
+ (_0x9425fc=>{const {ar:{dictionary:_0x34a20d,getPluralForm:_0x1cb027}}={'ar':{'dictionary':{'Edit\x20or\x20review':'التحرير\x20أو\x20المراجعة','Improve\x20writing':'قم\x20بتحسين\x20الكتابة','Make\x20shorter':'اجعله\x20أقصر','Make\x20longer':'اجعله\x20أطول','Simplify\x20language':'قم\x20بتبسيط\x20اللغة','Generate\x20from\x20selection':'قم\x20بالإنشاء\x20من\x20التحديد','Summarize':'تلخيص','Continue':'متابعة','Change\x20tone':'تغيير\x20الأسلوب','Professional':'احترافي','Casual':'غير\x20رسمي','Direct':'مباشر','Confident':'لهجة\x20واثقة','Friendly':'ودي','Change\x20style':'تغيير\x20الأسلوب','Business':'تجاري','Legal':'قانوني','Journalism':'الكتابة\x20الصحفية','Poetic':'شِعري','Translate':'ترجِمْ','English':'الإنكليزية','Spanish':'الإسبانية','German':'الألمانية','Portuguese':'البرتغالية','French':'الفرنسية','Simplified\x20Chinese':'الصينية\x20المبسطة','Hindi':'الهندية','Arabic':'العربية','AI\x20Assistant':'مساعد\x20الذكاء\x20الاصطناعي','AI\x20Commands':'أوامر\x20الذكاء\x20الاصطناعي','Ask\x20AI\x20to\x20edit\x20or\x20generate':'اطلب\x20من\x20الذكاء\x20الاصطناعي\x20أن\x20يقوم\x20بالتحرير\x20أو\x20الإنشاء','Ask\x20AI\x20to\x20improve\x20generated\x20text':'اطلب\x20من\x20الذكاء\x20الاصطناعي\x20أن\x20يقوم\x20بتحسين\x20النص\x20الذي\x20تم\x20إنشاؤه','Copy':'نسخ','Submit':'إرسال','Insert\x20below':'أدخل\x20أدناه','Try\x20again':'حاول\x20مجددًا','Stop':'إيقاف','AI\x20is\x20writing...':'يقوم\x20الذكاء\x20الاصطناعي\x20بالكتابة...','AI\x20is\x20writing':'يكتب\x20الذكاء\x20الاصطناعي','Generated\x20content:\x20%0':'المحتوى\x20الذي\x20تم\x20إنشاؤه:\x20%0','Error\x20during\x20AI\x20content\x20generation:\x20%0':'حدث\x20خطأ\x20أثناء\x20إنشاء\x20محتوى\x20الذكاء\x20الاصطناعي:\x20%0','History':'سجل\x20المحفوظات','Empty\x20history':'السجل\x20فارغ','Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.':'سيتم\x20إدراج\x20الطلبات\x20التي\x20طلبتها\x20من\x20الذكاء\x20الاصطناعي\x20والتوجيهات\x20الخاصة\x20بك\x20هنا\x20لكي\x20يتم\x20استخدامها\x20لاحقًا.','Prompt\x20history':'سجل\x20التوجيهات','AI_REPLACE_CONTENT':'استبدال','AI_INSERT_CONTENT':'إدراج','AI_ERROR_GET_HEADERS':'فشلت\x20عملية\x20تحضير\x20عناوين\x20الطلبات','AI_ERROR_GET_PARAMETERS':'لقد\x20فشلت\x20عملية\x20إعداد\x20معلمات\x20الطلب','AI_ERROR_UNSUPPORTED_MODEL':'إن\x20نموذج\x20AI\x20المطلوب\x20(\x22%0\x22)\x20غير\x20مدعوم','AI_ERROR_CONTEXT_LENGTH':'المحتوى\x20المحدد\x20طويل\x20جداً','AI_ERROR_MODERATION':'الاستعلام\x20المطلوب\x20لا\x20يجتاز\x20قواعد\x20الإشراف','AI_ERROR_FAILED':'لقد\x20فشل\x20التواصل\x20مع\x20خدمة\x20الذكاء\x20الاصطناعي','Other':'آخر'},'getPluralForm':_0x421455=>0x0==_0x421455?0x0:0x1==_0x421455?0x1:0x2==_0x421455?0x2:_0x421455%0x64>=0x3&&_0x421455%0x64<=0xa?0x3:_0x421455%0x64>=0xb?0x4:0x5}};_0x9425fc['ar']||={'dictionary':{},'getPluralForm':null},_0x9425fc['ar']['dictionary']=Object['assign'](_0x9425fc['ar']['dictionary'],_0x34a20d),_0x9425fc['ar']['getPluralForm']=_0x1cb027;})(window['CKEDITOR_TRANSLATIONS']||={});