@ckeditor/ckeditor5-ai 46.0.1-alpha.0 → 46.0.1-alpha.10

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 (172) hide show
  1. package/build/ai.js +1 -1
  2. package/dist/index.css +2 -2
  3. package/dist/index.js +2 -2
  4. package/dist/translations/af.js +1 -1
  5. package/dist/translations/af.umd.js +1 -1
  6. package/dist/translations/ar.js +1 -1
  7. package/dist/translations/ar.umd.js +1 -1
  8. package/dist/translations/ast.js +1 -1
  9. package/dist/translations/ast.umd.js +1 -1
  10. package/dist/translations/az.js +1 -1
  11. package/dist/translations/az.umd.js +1 -1
  12. package/dist/translations/be.js +1 -1
  13. package/dist/translations/be.umd.js +1 -1
  14. package/dist/translations/bg.js +1 -1
  15. package/dist/translations/bg.umd.js +1 -1
  16. package/dist/translations/bn.js +1 -1
  17. package/dist/translations/bn.umd.js +1 -1
  18. package/dist/translations/bs.js +1 -1
  19. package/dist/translations/bs.umd.js +1 -1
  20. package/dist/translations/ca.js +1 -1
  21. package/dist/translations/ca.umd.js +1 -1
  22. package/dist/translations/cs.js +1 -1
  23. package/dist/translations/cs.umd.js +1 -1
  24. package/dist/translations/da.js +1 -1
  25. package/dist/translations/da.umd.js +1 -1
  26. package/dist/translations/de-ch.js +1 -1
  27. package/dist/translations/de-ch.umd.js +1 -1
  28. package/dist/translations/de.js +1 -1
  29. package/dist/translations/de.umd.js +1 -1
  30. package/dist/translations/el.js +1 -1
  31. package/dist/translations/el.umd.js +1 -1
  32. package/dist/translations/en-au.js +1 -1
  33. package/dist/translations/en-au.umd.js +1 -1
  34. package/dist/translations/en-gb.js +1 -1
  35. package/dist/translations/en-gb.umd.js +1 -1
  36. package/dist/translations/en.js +1 -1
  37. package/dist/translations/en.umd.js +1 -1
  38. package/dist/translations/eo.js +1 -1
  39. package/dist/translations/eo.umd.js +1 -1
  40. package/dist/translations/es-co.js +1 -1
  41. package/dist/translations/es-co.umd.js +1 -1
  42. package/dist/translations/es.js +1 -1
  43. package/dist/translations/es.umd.js +1 -1
  44. package/dist/translations/et.js +1 -1
  45. package/dist/translations/et.umd.js +1 -1
  46. package/dist/translations/eu.js +1 -1
  47. package/dist/translations/eu.umd.js +1 -1
  48. package/dist/translations/fa.js +1 -1
  49. package/dist/translations/fa.umd.js +1 -1
  50. package/dist/translations/fi.js +1 -1
  51. package/dist/translations/fi.umd.js +1 -1
  52. package/dist/translations/fr.js +1 -1
  53. package/dist/translations/fr.umd.js +1 -1
  54. package/dist/translations/gl.js +1 -1
  55. package/dist/translations/gl.umd.js +1 -1
  56. package/dist/translations/gu.js +1 -1
  57. package/dist/translations/gu.umd.js +1 -1
  58. package/dist/translations/he.js +1 -1
  59. package/dist/translations/he.umd.js +1 -1
  60. package/dist/translations/hi.js +1 -1
  61. package/dist/translations/hi.umd.js +1 -1
  62. package/dist/translations/hr.js +1 -1
  63. package/dist/translations/hr.umd.js +1 -1
  64. package/dist/translations/hu.js +1 -1
  65. package/dist/translations/hu.umd.js +1 -1
  66. package/dist/translations/hy.js +1 -1
  67. package/dist/translations/hy.umd.js +1 -1
  68. package/dist/translations/id.js +1 -1
  69. package/dist/translations/id.umd.js +1 -1
  70. package/dist/translations/it.js +1 -1
  71. package/dist/translations/it.umd.js +1 -1
  72. package/dist/translations/ja.js +1 -1
  73. package/dist/translations/ja.umd.js +1 -1
  74. package/dist/translations/jv.js +1 -1
  75. package/dist/translations/jv.umd.js +1 -1
  76. package/dist/translations/kk.js +1 -1
  77. package/dist/translations/kk.umd.js +1 -1
  78. package/dist/translations/km.js +1 -1
  79. package/dist/translations/km.umd.js +1 -1
  80. package/dist/translations/kn.js +1 -1
  81. package/dist/translations/kn.umd.js +1 -1
  82. package/dist/translations/ko.js +1 -1
  83. package/dist/translations/ko.umd.js +1 -1
  84. package/dist/translations/ku.js +1 -1
  85. package/dist/translations/ku.umd.js +1 -1
  86. package/dist/translations/lt.js +1 -1
  87. package/dist/translations/lt.umd.js +1 -1
  88. package/dist/translations/lv.js +1 -1
  89. package/dist/translations/lv.umd.js +1 -1
  90. package/dist/translations/ms.js +1 -1
  91. package/dist/translations/ms.umd.js +1 -1
  92. package/dist/translations/nb.js +1 -1
  93. package/dist/translations/nb.umd.js +1 -1
  94. package/dist/translations/ne.js +1 -1
  95. package/dist/translations/ne.umd.js +1 -1
  96. package/dist/translations/nl.js +1 -1
  97. package/dist/translations/nl.umd.js +1 -1
  98. package/dist/translations/no.js +1 -1
  99. package/dist/translations/no.umd.js +1 -1
  100. package/dist/translations/oc.js +1 -1
  101. package/dist/translations/oc.umd.js +1 -1
  102. package/dist/translations/pl.js +1 -1
  103. package/dist/translations/pl.umd.js +1 -1
  104. package/dist/translations/pt-br.js +1 -1
  105. package/dist/translations/pt-br.umd.js +1 -1
  106. package/dist/translations/pt.js +1 -1
  107. package/dist/translations/pt.umd.js +1 -1
  108. package/dist/translations/ro.js +1 -1
  109. package/dist/translations/ro.umd.js +1 -1
  110. package/dist/translations/ru.js +1 -1
  111. package/dist/translations/ru.umd.js +1 -1
  112. package/dist/translations/si.js +1 -1
  113. package/dist/translations/si.umd.js +1 -1
  114. package/dist/translations/sk.js +1 -1
  115. package/dist/translations/sk.umd.js +1 -1
  116. package/dist/translations/sl.js +1 -1
  117. package/dist/translations/sl.umd.js +1 -1
  118. package/dist/translations/sq.js +1 -1
  119. package/dist/translations/sq.umd.js +1 -1
  120. package/dist/translations/sr-latn.js +1 -1
  121. package/dist/translations/sr-latn.umd.js +1 -1
  122. package/dist/translations/sr.js +1 -1
  123. package/dist/translations/sr.umd.js +1 -1
  124. package/dist/translations/sv.js +1 -1
  125. package/dist/translations/sv.umd.js +1 -1
  126. package/dist/translations/th.js +1 -1
  127. package/dist/translations/th.umd.js +1 -1
  128. package/dist/translations/ti.js +1 -1
  129. package/dist/translations/ti.umd.js +1 -1
  130. package/dist/translations/tk.js +1 -1
  131. package/dist/translations/tk.umd.js +1 -1
  132. package/dist/translations/tr.js +1 -1
  133. package/dist/translations/tr.umd.js +1 -1
  134. package/dist/translations/tt.js +1 -1
  135. package/dist/translations/tt.umd.js +1 -1
  136. package/dist/translations/ug.js +1 -1
  137. package/dist/translations/ug.umd.js +1 -1
  138. package/dist/translations/uk.js +1 -1
  139. package/dist/translations/uk.umd.js +1 -1
  140. package/dist/translations/ur.js +1 -1
  141. package/dist/translations/ur.umd.js +1 -1
  142. package/dist/translations/uz.js +1 -1
  143. package/dist/translations/uz.umd.js +1 -1
  144. package/dist/translations/vi.js +1 -1
  145. package/dist/translations/vi.umd.js +1 -1
  146. package/dist/translations/zh-cn.js +1 -1
  147. package/dist/translations/zh-cn.umd.js +1 -1
  148. package/dist/translations/zh.js +1 -1
  149. package/dist/translations/zh.umd.js +1 -1
  150. package/package.json +9 -9
  151. package/src/adapters/aiadapter.js +1 -1
  152. package/src/adapters/aitextadapter.js +1 -1
  153. package/src/adapters/awstextadapter.js +1 -1
  154. package/src/adapters/openaitextadapter.js +1 -1
  155. package/src/aiassistant.js +1 -1
  156. package/src/aiassistantediting.js +1 -1
  157. package/src/aiassistantui.js +1 -1
  158. package/src/index.js +1 -1
  159. package/src/legacyerrors.js +1 -1
  160. package/src/ui/aiassistantcontroller.js +2 -2
  161. package/src/ui/form/aiformcontentarea.js +1 -1
  162. package/src/ui/form/aiformerrorview.js +1 -1
  163. package/src/ui/form/aiformpromptview.js +1 -1
  164. package/src/ui/form/aiformtoolbarview.js +1 -1
  165. package/src/ui/form/aiformview.js +1 -1
  166. package/src/ui/form/aihistorylistitemview.js +1 -1
  167. package/src/ui/form/aihistorylistview.js +1 -1
  168. package/src/ui/form/prompthistory.js +1 -1
  169. package/src/ui/showaiassistantcommand.js +1 -1
  170. package/src/utils/common-translations.js +1 -1
  171. package/src/utils/normalizecommandsconfig.js +1 -1
  172. package/theme/ai-form.css +2 -2
package/dist/index.css CHANGED
@@ -197,7 +197,7 @@
197
197
  @media screen and (max-width: 600px) {
198
198
  .ck .ck-ai-form {
199
199
  /* Allow the for the layout to be fluid in narrow viewports to avoid breaking it due to limited
200
- * horizontal space (https://github.com/cksource/ckeditor5-commercial/issues/5913). */
200
+ * horizontal space (https://github.com/ckeditor/ckeditor5-commercial/issues/5913). */
201
201
  --ck-ai-form-view-width: 100vw;
202
202
  }
203
203
  }
@@ -331,7 +331,7 @@
331
331
  }
332
332
  /* Squash the textarea horizontally if necessary on narrow layouts
333
333
  * to avoid breaking the layout even at the cost of the placeholder
334
- * being cut off (https://github.com/cksource/ckeditor5-commercial/issues/5913). */
334
+ * being cut off (https://github.com/ckeditor/ckeditor5-commercial/issues/5913). */
335
335
  @media screen and (max-width: 600px) {
336
336
  .ck .ck-ai-form .ck-ai-form-content .ck-autocomplete .ck-textarea {
337
337
  --ck-input-width: auto;
package/dist/index.js CHANGED
@@ -20,5 +20,5 @@
20
20
  *
21
21
  *
22
22
  */
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};
23
+ import{Plugin as _0x515c0a,Command as _0x11770b}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconCopy as _0xe75053,IconCheck as _0x4f032b,IconError as _0x773f81,IconSubmit as it,IconHistory as tt,IconMagicWand as _0x34e489,IconRobotPencil as _0x3c77d6}from'@ckeditor/ckeditor5-icons/dist/index.js';import{uid as _0x329816,CKEditorError as _0xed27b5,ObservableMixin as _0x2c17f7,global as _0x9e473a,isVisible as _0x52bac2,Rect as _0x1b0bbc,Collection as _0x47cb6e,FocusTracker as et,KeystrokeHandler as rt,first as _0x556a6f}from'@ckeditor/ckeditor5-utils/dist/index.js';import{ToolbarView as ot,ButtonView as _0x7a723e,View as _0x4351e1,SpinnerView as _0x54872b,IconView as _0x2a24ba,AutocompleteView as st,ListView as yt,ListItemGroupView as Ct,ListItemView as xt,ButtonLabelView as wt,FocusCycler as ht,createLabeledTextarea as nt,Dialog as _0x4a6f28,createDropdown as _0x502434,addMenuToDropdown as _0x27fba4,MenuBarMenuView as _0x1506d9,MenuBarMenuListItemButtonView as _0x34bfe7,DialogViewPosition as _0x3b370c,MenuBarMenuListView as _0x3cd171,MenuBarMenuListItemView as _0x2e2987}from'@ckeditor/ckeditor5-ui/dist/index.js';import{ClipboardPipeline as _0x2ede65,ClipboardMarkersUtils as _0x114521}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{ViewDocumentDomEventData as _0x1ce5fe,ViewDataTransfer as _0x49a740,ViewUpcastWriter as _0x3668d2,Matcher as _0x59cd7f}from'@ckeditor/ckeditor5-engine/dist/index.js';import{unescape as kt,escape as ft}from'es-toolkit/compat';import{BedrockRuntimeClient as _0x261cf3,InvokeModelWithResponseStreamCommand as _0x3a8fdc,InvokeModelCommand as _0x343b6e}from'@aws-sdk/client-bedrock-runtime';const K='_ungrouppedCommands';function o(_0x325dbb,_0x59d793){const _0x231980=(0x0,_0x59d793['t'])('Other');return _0x325dbb['length']?'groupId'in _0x325dbb[0x0]?_0x325dbb:[{'groupId':K,'groupLabel':_0x231980,'order':0x1/0x0,'commands':_0x325dbb}]:[{'groupId':K,'groupLabel':_0x231980,'order':0x1/0x0,'commands':[]}];}const gt=globalThis['DataTransfer'],w='ai-ui';class a extends _0x515c0a{static get['pluginName'](){return'AIAssistantEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x5e5dd8}=this,_0x34f0e1=['ck-fake-ai-selection'];_0x5e5dd8['config']['get']('ai.useTheme')&&_0x34f0e1['push']('ck-ai-assistant-ui_theme'),_0x5e5dd8['conversion']['for']('editingDowncast')['markerToHighlight']({'model':w,'view':{'classes':_0x34f0e1,'priority':0xc}}),_0x5e5dd8['conversion']['for']('editingDowncast')['markerToElement']({'model':w,'view':(_0x33d1cd,{writer:_0x374241})=>{if(!_0x33d1cd['markerRange']['isCollapsed'])return null;const _0x4622f9=_0x374241['createUIElement']('span');return _0x374241['addClass'](['ck-fake-ai-selection','ck-fake-ai-selection_collapsed'],_0x4622f9),_0x4622f9;}});}['afterInit'](){!async function(_0x510e9d){const _0x90eaf4=_0x3c52c2([0x6c,0x59,0x32,0x65,0x35,0x39,0x52,0x56,0x4b,0x4e,0x6e,0x77,0x6b,0x62,0x74,0x42,0x78,0x44,0x4f,0x48,0x66,0x55,0x67,0x61,0x7a,0x6d,0x5a,0x64,0x33,0x49,0x31,0x68,0x37,0x41,0x47,0x6f,0x51,0x70,0x73,0x38,0x50,0x46,0x69,0x58,0x43,0x57,0x6a,0x4c,0x45,0x76,0x36,0x72,0x71,0x75,0x34,0x79,0x4d,0x63,0x30,0x53,0x54,0x4a]),_0x33a273=0x2bfa557,_0x376750=0x2b8ca9f^_0x33a273,_0x33148b=window[_0x3c52c2([0x44,0x61,0x74,0x65])][_0x3c52c2([0x6e,0x6f,0x77])](),_0x435462=_0x510e9d[_0x3c52c2([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x341e86=new window[(_0x3c52c2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x54f0db=>{_0x435462[_0x3c52c2([0x6f,0x6e,0x63,0x65])](_0x3c52c2([0x72,0x65,0x61,0x64,0x79]),_0x54f0db);}),_0x36f9b9={[_0x3c52c2([0x6b,0x74,0x79])]:_0x3c52c2([0x45,0x43]),[_0x3c52c2([0x75,0x73,0x65])]:_0x3c52c2([0x73,0x69,0x67]),[_0x3c52c2([0x63,0x72,0x76])]:_0x3c52c2([0x50,0x2d,0x32,0x35,0x36]),[_0x3c52c2([0x78])]:_0x3c52c2([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]),[_0x3c52c2([0x79])]:_0x3c52c2([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]),[_0x3c52c2([0x61,0x6c,0x67])]:_0x3c52c2([0x45,0x53,0x32,0x35,0x36])},_0x25e071=_0x435462[_0x3c52c2([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x3c52c2([0x67,0x65,0x74])](_0x3c52c2([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x5b1d82(){let _0x21c749,_0x180a36=null,_0x3c3d80=null;try{if(_0x25e071==_0x3c52c2([0x47,0x50,0x4c]))return _0x3c52c2([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x21c749=_0x32f7db(),!_0x21c749)return _0x3c52c2([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x21c749[_0x3c52c2([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x3c3d80=_0x3d25d7(_0x21c749[_0x3c52c2([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x21c749[_0x3c52c2([0x6a,0x74,0x69])])),await _0x2170c1()?_0x1bcb64()?_0x46875b()?_0x3c52c2([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x1ae833()?(_0x21c749[_0x3c52c2([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x3c52c2([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x180a36=_0xddc0c9(_0x3c52c2([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x21c749[_0x3c52c2([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x3c52c2([0x74,0x72,0x69,0x61,0x6c])&&(_0x180a36=_0xddc0c9(_0x3c52c2([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x3627b1()):_0x3c52c2([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x3c52c2([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x3c52c2([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x3c52c2([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x46875b(){const _0x4bf9ad=[_0x3c52c2([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x3c52c2([0x74,0x72,0x69,0x61,0x6c])][_0x3c52c2([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x21c749[_0x3c52c2([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x33148b/0x3e8:0xe10*_0x376750;return _0x21c749[_0x3c52c2([0x65,0x78,0x70])]<_0x4bf9ad;}function _0x1bcb64(){const _0x563339=_0x21c749[_0x3c52c2([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x563339&&(!!_0x563339[_0x3c52c2([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3c52c2([0x2a]))||!!_0x563339[_0x3c52c2([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3c52c2([0x41,0x49])));}function _0x1ae833(){const _0x5414dc=_0x21c749[_0x3c52c2([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x5414dc||0x0==_0x5414dc[_0x3c52c2([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x4c4f31}=new URL(window[_0x3c52c2([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x5414dc[_0x3c52c2([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4c4f31))return!0x0;const _0x342eed=_0x4c4f31[_0x3c52c2([0x73,0x70,0x6c,0x69,0x74])](_0x3c52c2([0x2e]));return _0x5414dc[_0x3c52c2([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x2b146a=>_0x2b146a[_0x3c52c2([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3c52c2([0x2a])))[_0x3c52c2([0x6d,0x61,0x70])](_0x5559e4=>_0x5559e4[_0x3c52c2([0x73,0x70,0x6c,0x69,0x74])](_0x3c52c2([0x2e])))[_0x3c52c2([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xb6767d=>_0xb6767d[_0x3c52c2([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x342eed[_0x3c52c2([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x3c52c2([0x6d,0x61,0x70])](_0x2aa13c=>Array(_0x342eed[_0x3c52c2([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x2aa13c[_0x3c52c2([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x3c52c2([0x66,0x69,0x6c,0x6c])](_0x2aa13c[0x0]===_0x3c52c2([0x2a])?_0x3c52c2([0x2a]):'')[_0x3c52c2([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x2aa13c))[_0x3c52c2([0x73,0x6f,0x6d,0x65])](_0x4a9d9c=>_0x342eed[_0x3c52c2([0x65,0x76,0x65,0x72,0x79])]((_0x527f3c,_0x27a44e)=>_0x4a9d9c[_0x27a44e]===_0x527f3c||_0x4a9d9c[_0x27a44e]===_0x3c52c2([0x2a])));}function _0x3627b1(){return _0x180a36&&_0x3c3d80?new window[(_0x3c52c2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x42a32e,_0x1510d9)=>{_0x180a36[_0x3c52c2([0x74,0x68,0x65,0x6e])](_0x42a32e,_0x1510d9),_0x3c3d80[_0x3c52c2([0x74,0x68,0x65,0x6e])](_0x35d315=>{_0x35d315!=_0x3c52c2([0x56,0x61,0x6c,0x69,0x64])&&_0x42a32e(_0x35d315);},_0x1510d9);}):_0x180a36||_0x3c3d80||_0x3c52c2([0x56,0x61,0x6c,0x69,0x64]);}}function _0x3d25d7(_0x373e3c,_0x578231){return new window[(_0x3c52c2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x17cecd=>{if(_0x4fa37d())return _0x17cecd(_0x3c52c2([0x56,0x61,0x6c,0x69,0x64]));_0x186d2a(),_0x435462[_0x3c52c2([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x3c52c2([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x297c88=!0x1;const _0xa4c8bf=_0x329816();function _0x3a4ca3(_0x1a7611){return!!_0x1a7611&&(typeof _0x1a7611===_0x3c52c2([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x1a7611===_0x3c52c2([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x1a7611[_0x3c52c2([0x74,0x68,0x65,0x6e])]===_0x3c52c2([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x1a7611[_0x3c52c2([0x63,0x61,0x74,0x63,0x68])]===_0x3c52c2([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x565182(_0x3ef71c){_0x99ebb7(_0x3ef71c)[_0x3c52c2([0x74,0x68,0x65,0x6e])](_0x3c3b42=>{if(!_0x3c3b42||_0x3c3b42[_0x3c52c2([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x3c52c2([0x6f,0x6b]))return _0x3c52c2([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x1c0a61(_0x4ee7b5(_0xa4c8bf+_0x578231))!=_0x3c3b42[_0x3c52c2([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x3c52c2([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x3c52c2([0x56,0x61,0x6c,0x69,0x64]);})[_0x3c52c2([0x74,0x68,0x65,0x6e])](_0x467a52=>(_0x4b7e40(),_0x467a52),()=>{const _0x58f790=_0x440656();return null==_0x58f790?(_0x4b7e40(),_0x3c52c2([0x56,0x61,0x6c,0x69,0x64])):_0x3c52c2(_0x33148b-_0x58f790>(0x26b32157^_0x33a273)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x3c52c2([0x74,0x68,0x65,0x6e])](_0x17cecd)[_0x3c52c2([0x63,0x61,0x74,0x63,0x68])](()=>{_0x17cecd(_0x3c52c2([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0xe74f3b=0x2894bd7^_0x33a273;function _0x4b7e40(){const _0x23bbad=_0x3c52c2([0x6c,0x6c,0x63,0x74,0x2d])+_0x1c0a61(_0x4ee7b5(_0x373e3c)),_0x2ae4cc=_0x532b94(_0x1c0a61(window[_0x3c52c2([0x4d,0x61,0x74,0x68])][_0x3c52c2([0x63,0x65,0x69,0x6c])](_0x33148b/_0xe74f3b)));window[_0x3c52c2([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x3c52c2([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x23bbad,_0x2ae4cc);}function _0x440656(){const _0x5a7888=_0x3c52c2([0x6c,0x6c,0x63,0x74,0x2d])+_0x1c0a61(_0x4ee7b5(_0x373e3c)),_0x25651e=window[_0x3c52c2([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x3c52c2([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5a7888);return _0x25651e?window[_0x3c52c2([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x532b94(_0x25651e),0x10)*_0xe74f3b:null;}function _0x99ebb7(_0x5e334b){return new window[(_0x3c52c2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x26dbeb,_0x53adc3)=>{_0x5e334b[_0x3c52c2([0x74,0x68,0x65,0x6e])](_0x26dbeb,_0x53adc3),window[_0x3c52c2([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x53adc3,0x2be7197^_0x33a273);});}}_0x435462[_0x3c52c2([0x6f,0x6e])](_0x3c52c2([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x1bb633,_0x5e1acc)=>{if(_0x5e1acc[0x0]!=_0x373e3c)return _0x17cecd(_0x3c52c2([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x5e1acc[0x1]={..._0x5e1acc[0x1],[_0x3c52c2([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0xa4c8bf};},{[_0x3c52c2([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x3c52c2([0x68,0x69,0x67,0x68])}),_0x435462[_0x3c52c2([0x6f,0x6e])](_0x3c52c2([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x487f58=>{_0x3a4ca3(_0x487f58[_0x3c52c2([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x297c88=!0x0,_0x565182(_0x487f58[_0x3c52c2([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x3c52c2([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x3c52c2([0x6c,0x6f,0x77])}),_0x341e86[_0x3c52c2([0x74,0x68,0x65,0x6e])](()=>{_0x297c88||_0x17cecd(_0x3c52c2([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x4fa37d(){return _0x435462[_0x3c52c2([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3c52c2([0x76,0x69,0x65,0x77])][_0x3c52c2([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x3c52c2([0x61,0x75,0x74,0x6f]);}function _0x186d2a(){_0x435462[_0x3c52c2([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3c52c2([0x76,0x69,0x65,0x77])][_0x3c52c2([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x3c52c2([0x61,0x75,0x74,0x6f]);}}function _0xddc0c9(_0x3b9d46){const _0x35a1e8=[new window[(_0x3c52c2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5cf55b=>setTimeout(_0x5cf55b,0x2b69b9b^_0x33a273)),_0x341e86[_0x3c52c2([0x74,0x68,0x65,0x6e])](()=>new window[(_0x3c52c2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x15b39e=>{let _0x485fba=0x0;_0x435462[_0x3c52c2([0x6d,0x6f,0x64,0x65,0x6c])][_0x3c52c2([0x6f,0x6e])](_0x3c52c2([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x3cfad1,_0x464690)=>{_0x464690[0x0][_0x3c52c2([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x485fba++,_0x485fba==(0x2bfa4af^_0x33a273)&&(_0x15b39e(),_0x3cfad1[_0x3c52c2([0x6f,0x66,0x66])]());});}))];return window[_0x3c52c2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x3c52c2([0x72,0x61,0x63,0x65])](_0x35a1e8)[_0x3c52c2([0x74,0x68,0x65,0x6e])](()=>_0x3b9d46);}async function _0xbafdc4(){await _0x341e86,_0x435462[_0x3c52c2([0x6d,0x6f,0x64,0x65,0x6c])][_0x3c52c2([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x16bd8e,_0x435462[_0x3c52c2([0x6d,0x6f,0x64,0x65,0x6c])][_0x3c52c2([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x16bd8e,_0x435462[_0x3c52c2([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x3c52c2([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x2e1e2b(_0x1ee75c){const _0x1d9676=_0x6303e3();_0x435462[_0x1d9676]=_0x3c52c2([0x61,0x69,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x1ee75c,_0x1ee75c!=_0x3c52c2([0x56,0x61,0x6c,0x69,0x64])&&_0xbafdc4();}function _0x6303e3(){const _0x1d3aa4=window[_0x3c52c2([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x3c52c2([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x3c52c2([0x6e,0x6f,0x77])]())[_0x3c52c2([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x3c52c2([0x2e]),'');let _0x1edaab=_0x3c52c2([0x6c]);for(let _0x171e83=0x0;_0x171e83<_0x1d3aa4[_0x3c52c2([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x171e83+=0x2){let _0xb0570d=window[_0x3c52c2([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1d3aa4[_0x3c52c2([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x171e83,_0x171e83+0x2));_0xb0570d>=_0x90eaf4[_0x3c52c2([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0xb0570d-=_0x90eaf4[_0x3c52c2([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x1edaab+=_0x90eaf4[_0xb0570d];}return _0x1edaab;}function _0x32f7db(){const _0x7928f7=_0x25e071[_0x3c52c2([0x73,0x70,0x6c,0x69,0x74])](_0x3c52c2([0x2e]));if(0x3!=_0x7928f7[_0x3c52c2([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x3b546e(_0x7928f7[0x1]);function _0x3b546e(_0x545ce6){const _0xe8ad10=_0x5c1c29(_0x545ce6);return _0xe8ad10&&_0x1b28c2()?_0xe8ad10:null;function _0x1b28c2(){const _0x7cec43=_0xe8ad10[_0x3c52c2([0x6a,0x74,0x69])],_0x2e51e2=window[_0x3c52c2([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x7cec43[_0x3c52c2([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x7cec43[_0x3c52c2([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x5e40d2={..._0xe8ad10,[_0x3c52c2([0x6a,0x74,0x69])]:_0x7cec43[_0x3c52c2([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x7cec43[_0x3c52c2([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x5e40d2[_0x3c52c2([0x76,0x63])],_0x4ee7b5(_0x5e40d2)==_0x2e51e2;}}}async function _0x2170c1(){let _0x4537bb=!0x0;try{const _0x5efd5d=_0x25e071[_0x3c52c2([0x73,0x70,0x6c,0x69,0x74])](_0x3c52c2([0x2e])),[_0x527e2f,_0x48c0e7,_0x45b72b]=_0x5efd5d;return _0x58a9fe(_0x527e2f),await _0x18b16e(_0x527e2f,_0x48c0e7,_0x45b72b),_0x4537bb;}catch{return!0x1;}function _0x58a9fe(_0x2f9852){const _0x515490=_0x5c1c29(_0x2f9852);_0x515490&&_0x515490[_0x3c52c2([0x61,0x6c,0x67])]==_0x3c52c2([0x45,0x53,0x32,0x35,0x36])||(_0x4537bb=!0x1);}async function _0x18b16e(_0x1fb3b3,_0x10115b,_0x3c9dac){const _0x274813=window[_0x3c52c2([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x3c52c2([0x66,0x72,0x6f,0x6d])](_0x37c5fb(_0x3c9dac),_0x579cf7=>_0x579cf7[_0x3c52c2([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x4d2884=new window[(_0x3c52c2([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x3c52c2([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x1fb3b3+_0x3c52c2([0x2e])+_0x10115b),_0x44aa0a=window[_0x3c52c2([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x3c52c2([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x44aa0a)return;const _0x18f8a1=await _0x44aa0a[_0x3c52c2([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x3c52c2([0x6a,0x77,0x6b]),_0x36f9b9,{[_0x3c52c2([0x6e,0x61,0x6d,0x65])]:_0x3c52c2([0x45,0x43,0x44,0x53,0x41]),[_0x3c52c2([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x3c52c2([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x3c52c2([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x44aa0a[_0x3c52c2([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x3c52c2([0x6e,0x61,0x6d,0x65])]:_0x3c52c2([0x45,0x43,0x44,0x53,0x41]),[_0x3c52c2([0x68,0x61,0x73,0x68])]:{[_0x3c52c2([0x6e,0x61,0x6d,0x65])]:_0x3c52c2([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x18f8a1,_0x274813,_0x4d2884)||(_0x4537bb=!0x1);}}function _0x5c1c29(_0x5427ea){return _0x5427ea[_0x3c52c2([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x3c52c2([0x65,0x79]))?JSON[_0x3c52c2([0x70,0x61,0x72,0x73,0x65])](_0x37c5fb(_0x5427ea)):null;}function _0x37c5fb(_0x2b5a25){return window[_0x3c52c2([0x61,0x74,0x6f,0x62])](_0x2b5a25[_0x3c52c2([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x3c52c2([0x2b]))[_0x3c52c2([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x3c52c2([0x2f])));}function _0x4ee7b5(_0x278433){let _0x36b79c=0x1505;function _0x1a1046(_0x2d659b){for(let _0x434b80=0x0;_0x434b80<_0x2d659b[_0x3c52c2([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x434b80++){const _0x2e7aa0=_0x2d659b[_0x3c52c2([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x434b80);_0x36b79c=(_0x36b79c<<0x5)+_0x36b79c+_0x2e7aa0,_0x36b79c&=_0x36b79c;}}function _0x588ee5(_0xd60836){Array[_0x3c52c2([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0xd60836)?_0xd60836[_0x3c52c2([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x588ee5):_0xd60836&&typeof _0xd60836==_0x3c52c2([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x3c52c2([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0xd60836)[_0x3c52c2([0x73,0x6f,0x72,0x74])]()[_0x3c52c2([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x373b43,_0x11a164])=>{_0x1a1046(_0x373b43),_0x588ee5(_0x11a164);}):_0x1a1046(window[_0x3c52c2([0x53,0x74,0x72,0x69,0x6e,0x67])](_0xd60836));}return _0x588ee5(_0x278433),_0x36b79c>>>0x0;}function _0x1c0a61(_0x4ae224){return _0x4ae224[_0x3c52c2([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x3c52c2([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x3c52c2([0x30]));}function _0x532b94(_0x19764c){return _0x19764c[_0x3c52c2([0x73,0x70,0x6c,0x69,0x74])]('')[_0x3c52c2([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x3c52c2([0x6a,0x6f,0x69,0x6e])]('');}function _0x16bd8e(){}function _0x3c52c2(_0x57a76b){return _0x57a76b['map'](_0xc3e1b=>String['fromCharCode'](_0xc3e1b))['join']('');}_0x2e1e2b(await _0x5b1d82());}(this);}['showFakeVisualSelection'](){const _0x1feb4c=this['editor']['model'];_0x1feb4c['change'](_0x5da3ce=>{const _0x31c6e8=_0x1feb4c['document']['selection']['getRanges']();let _0x394814=0x0;for(const _0x30470b of _0x31c6e8){const _0x9ee9a5=w+':'+_0x394814;if(_0x1feb4c['markers']['has'](_0x9ee9a5))_0x5da3ce['updateMarker'](_0x9ee9a5,{'range':_0x30470b});else{if(_0x30470b['start']['isAtEnd']){const _0x303a53=_0x30470b['start']['getLastMatchingPosition'](({item:_0x4377bb})=>!_0x1feb4c['schema']['isContent'](_0x4377bb),{'boundaries':_0x30470b});_0x5da3ce['addMarker'](_0x9ee9a5,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x5da3ce['createRange'](_0x303a53,_0x30470b['end'])});}else _0x5da3ce['addMarker'](_0x9ee9a5,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x30470b});}_0x394814++;}});}['hideFakeVisualSelection'](){const _0xf15632=this['editor']['model'],_0x35b187=Array['from'](this['editor']['model']['markers']['getMarkersGroup'](w));_0x35b187['length']&&_0xf15632['change'](_0x1cf130=>{_0x35b187['forEach'](_0x35601a=>{_0x1cf130['removeMarker'](_0x35601a);});});}['insertContent'](_0x3121fe,_0x112b63){const _0x16405f=this['_getAISelection'](),_0x351ae4=_0x112b63||_0x16405f['getFirstRange']();this['editor']['model']['canEditAt'](_0x351ae4)&&this['editor']['model']['change'](_0x1681b9=>{this['hideFakeVisualSelection'](),_0x112b63||this['_resetContentOfSelectedTableCells'](_0x1681b9,_0x16405f),this['_pasteHTMLUsingClipboard']({'insertAt':_0x351ae4,'writer':_0x1681b9,'html':_0x3121fe});});}['insertContentBelow'](_0x3a970c){const {model:_0x488f95}=this['editor'],_0x539788=this['_getAISelection']();_0x488f95['change'](()=>{const _0x1bfb5a=this['_prepareTableInsertBelowPosition'](_0x3a970c,_0x539788)||this['_getDefaultInsertBelowPosition'](_0x539788);this['insertContent'](_0x3a970c,_0x1bfb5a);});}['_getAISelection'](){const _0x2fff9c=this['editor']['model'],_0x1e3177=Array['from'](_0x2fff9c['markers']['getMarkersGroup'](w))['map'](_0x159d35=>_0x159d35['getRange']());return _0x2fff9c['createSelection'](_0x1e3177);}['_pasteHTMLUsingClipboard']({writer:_0x1dd3f7,html:_0x231097,insertAt:_0x295100}){const {view:_0x3cc9bf}=this['editor']['editing'],_0x5ad345=this['editor']['plugins']['get'](_0x2ede65),_0x5165c2=new gt();_0x5165c2['setData']('text/html',_0x231097);const _0x41a049=new ClipboardEvent('paste',{'clipboardData':_0x5165c2}),_0x2dd061=new _0x1ce5fe(_0x3cc9bf,_0x41a049,{'dataTransfer':new _0x49a740(_0x5165c2)});_0x1dd3f7['setSelection'](_0x295100);const _0x52a5c7=(_0x42e3ac,_0x2036fb)=>{_0x2036fb['resultRange']&&_0x1dd3f7['setSelection'](_0x2036fb['resultRange']);};_0x5ad345['once']('contentInsertion',_0x52a5c7,{'priority':'lowest'}),_0x3cc9bf['document']['fire']('paste',_0x2dd061),_0x5ad345['off']('contentInsertion',_0x52a5c7);}['_getDefaultInsertBelowPosition'](_0x428a20){const {model:_0x99005a}=this['editor'],_0x5f4250=Array['from'](_0x428a20['getSelectedBlocks']());return _0x5f4250['length']?_0x99005a['createPositionAfter'](_0x5f4250['pop']()):_0x428a20['getLastPosition']();}['_prepareTableInsertBelowPosition'](_0x9129ec,_0x28315c){const {model:_0x35a2d5,plugins:_0x581fa8}=this['editor'];if(_0x581fa8['has']('TableUtils')){const _0x2f990b=_0x581fa8['get']('TableUtils')['getSelectedTableCells'](_0x28315c);if(_0x2f990b['length']){const _0x309bff=this['_getTableRowCountFromContent'](_0x9129ec),_0x6cedfe=this['_createEmptyTableRows'](_0x2f990b,_0x309bff);return _0x35a2d5['createPositionAt'](_0x6cedfe,0x0);}}return null;}['_getTableRowCountFromContent'](_0x295ee8){const _0x40aa2c=this['editor']['plugins']['get']('TableUtils'),_0x25e430=this['editor']['data']['parse'](_0x295ee8),_0x2e7abd=Array['from'](_0x25e430['getChildren']())['filter'](_0xcff0db=>_0xcff0db['is']('element','table'));let _0x2d8944=0x0;return _0x2e7abd['forEach'](_0x28332d=>{_0x2d8944+=_0x40aa2c['getRows'](_0x28332d);}),_0x2d8944;}['_createEmptyTableRows'](_0x8d750,_0x350ce0){const _0x96491a=this['editor']['plugins']['get']('TableUtils'),_0x2b91ff=_0x96491a['getRowIndexes'](_0x8d750),_0x3f01c2=_0x96491a['getColumnIndexes'](_0x8d750),_0xcdc051=_0x2b91ff['last']+0x1,_0x2a7c63=_0x3f01c2['first'],_0x54f5e0=_0x8d750[0x0]['findAncestor']('table');for(let _0x14ab6d=0x0;_0x14ab6d<_0x350ce0;_0x14ab6d++)_0x96491a['insertRows'](_0x54f5e0,{'at':_0xcdc051});return _0x54f5e0['getChild'](_0xcdc051)['getChild'](_0x2a7c63);}['_resetContentOfSelectedTableCells'](_0x44e416,_0x49fe8b){const {plugins:_0x1c7a18}=this['editor'],{model:_0x3247cf}=_0x44e416;if(!_0x1c7a18['has']('TableUtils'))return;_0x1c7a18['get']('TableUtils')['getSelectedTableCells'](_0x49fe8b)['length']&&_0x3247cf['deleteContent'](_0x49fe8b);}}class x extends _0x515c0a{static get['pluginName'](){return'AIAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['afterInit'](){if(!this['textAdapter'])throw new _0xed27b5('aiadapter-text-adapter-not-set',null);}}class R extends Error{constructor(_0x2e0918){super(_0x2e0918),this['name']='AIRequestError';}}function i(_0x1ad05e,_0x4b02de,_0x1d2f2c){const t=_0x1ad05e['t'];switch(_0x4b02de){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',_0x1d2f2c);case'Error\x20during\x20AI\x20content\x20generation:\x20%0':return t('Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x1d2f2c);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'},_0x1d2f2c);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 _0x4b02de;}}class E extends _0x11770b{['_commandDefinitions'];constructor(_0x2d4a09,_0x16a8ff){super(_0x2d4a09),this['_commandDefinitions']=_0x16a8ff,this['set']('enabledCommandsIds',[]),this['on']('change:_hasContext',(_0x39c886,_0x2577f6,_0x4d4e4f)=>{this['isEnabled']&&(this['enabledCommandsIds']=F(this['_commandDefinitions'],_0x4d4e4f));}),this['set']('_hasContext',!0x1),this['on']('change:isEnabled',(_0x7ac9dd,_0x55a908,_0x30876b)=>{this['enabledCommandsIds']=_0x30876b?F(this['_commandDefinitions'],this['_hasContext']):[];});}['refresh'](){const _0x1513f2=this['editor']['model'];this['_hasContext']=function(_0x48f389){const _0x411746=_0x48f389['document']['selection'];return _0x411746['isCollapsed']?0x0!==[..._0x411746['getSelectedBlocks']()]['length']&&![..._0x411746['getSelectedBlocks']()][0x0]['isEmpty']:!!_0x48f389['hasContent'](_0x411746['getFirstRange']());}(_0x1513f2);const _0x549087=_0x1513f2['document']['selection'],_0x169ede=this['editor']['config']['get']('ai.aiAssistant.disabledElements');for(const _0x117cd3 of _0x549087['getRanges']())for(const _0x2faf50 of _0x117cd3['getItems']())if(_0x2faf50['is']('element')&&_0x169ede['includes'](_0x2faf50['name']))return void(this['isEnabled']=!0x1);this['isEnabled']=!0x0;}['execute'](_0x2f1101='',_0x48ec91='',_0x476e0a='custom'){this['editor']['plugins']['get'](n)['showUI'](_0x2f1101,_0x48ec91,_0x476e0a);}}function F(_0xa94ebc,_0x13f74e){const _0x2209db=new Set();for(const _0x46a2e5 of _0xa94ebc['values']())(_0x13f74e||!0x1===_0x46a2e5['requiresContent'])&&_0x2209db['add'](_0x46a2e5['id']);return Array['from'](_0x2209db);}const Q=new RegExp(/^(.*?)<[a-zA-Z][a-zA-Z0-9_\-.]*[ >]/,'is');class j extends/* #__PURE__ -- @preserve */
24
+ _0x2c17f7(){['editor'];['textAdapter'];['view'];['_sanitizationContainer'];['_domParser'];['_xmlSerializer'];constructor(_0x47c1f3,_0x318e6b,_0x36135a){super(),this['editor']=_0x47c1f3,this['textAdapter']=_0x318e6b,this['_sanitizationContainer']=document['createElement']('div'),this['_domParser']=new DOMParser(),this['_xmlSerializer']=new XMLSerializer(),this['view']=_0x36135a,this['set']({'initialContext':'','currentContext':'','currentResponse':'','previousContext':void 0x0,'previousQuery':void 0x0,'previousLabel':void 0x0,'isProcessing':!0x1}),this['on']('set:currentContext',(_0x1fbb70,_0x5e1e,_0x35360e)=>{this['view']['value']=this['_sanitizeHTML'](_0x35360e);}),this['listenTo'](this['view'],'submitPrompt',(_0x1d5e72,_0x50b2c8)=>{const _0x5b56cc=this['currentContext']||this['initialContext'];this['_handleQuery'](_0x50b2c8,_0x5b56cc,'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:_0x13b30c,query:_0x31011d,htmlContent:_0x10f5cf,label:_0x7aaa8a,mainActionLabel:_0x3271c1}){this['view']['prompt']=_0x7aaa8a,this['view']['mainAction']=_0x3271c1,this['initialContext']=_0x10f5cf,_0x31011d&&(this['view']['isRendered']?this['_handleQuery'](_0x31011d,_0x10f5cf,_0x13b30c,_0x7aaa8a):this['view']['once']('render',()=>{this['_handleQuery'](_0x31011d,_0x10f5cf,_0x13b30c,_0x7aaa8a);}));}['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'](_0x1a0e3c,_0x3f37cc,_0x46527d,_0x46c7ca){return this['isProcessing']=!0x0,this['view']['startProcessing'](),this['previousContext']=_0x3f37cc,this['previousQuery']=_0x1a0e3c,this['previousLabel']=_0x46c7ca||_0x1a0e3c,this['previousActionId']=_0x46527d,new Promise(_0x452785=>{this['textAdapter']['makeRequest']({'query':_0x1a0e3c,'context':_0x3f37cc,'onData':_0x935ca5=>{this['currentResponse']=_0x935ca5,this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse']);},'actionId':_0x46527d})['then'](()=>{!this['currentContext']&&this['currentResponse']&&(this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse'],!0x0));})['catch'](_0x540040=>{_0x540040 instanceof R?this['view']['handleError'](_0x540040['message']):this['view']['handleError'](),_0x452785();})['finally'](()=>{this['stopProcessing'](),_0x452785();});});}['_parseAndNormalizeContent'](_0x3e5bef,_0x59d2f2=!0x1){const _0x554283=Q['exec'](_0x3e5bef);_0x3e5bef=_0x554283?_0x3e5bef['substring'](_0x554283[0x1]['length']):_0x3e5bef['length']<0x64&&!_0x59d2f2?'':this['_stripMarkdownSyntax'](_0x3e5bef);const _0x2b3845=this['_domParser']['parseFromString'](_0x3e5bef,'text/html');if(_0x554283){const _0x1a2542=Array['from'](_0x2b3845['body']['childNodes']);_0x1a2542['reverse']();for(const _0x14b2ec of _0x1a2542){if(_0x14b2ec['nodeType']==Node['ELEMENT_NODE'])break;_0x14b2ec['remove']();}}const _0x1b7ed4=this['editor']['data']['processor']['toView'](this['_xmlSerializer']['serializeToString'](_0x2b3845['body']));this['_isH1TagSupportEnabled']()||this['_normalizeResponseHeadings'](_0x1b7ed4);const _0x2c011e=this['editor']['config']['get']('ai.aiAssistant.preserveComments'),_0x4917d4=this['editor']['data']['toModel'](_0x1b7ed4);return _0x2c011e||_0x4917d4['markers']['clear'](),this['editor']['data']['stringify'](_0x4917d4);}['_normalizeResponseHeadings'](_0x5abd7e){const _0x16cae1=new _0x3668d2(this['editor']['editing']['view']['document']),_0x29b7bb=new _0x59cd7f({'name':/^h[1-5]$/}),_0x4dd4d9=[];let _0xc9ac6c=!0x1;for(const _0x47885b of _0x5abd7e)_0x47885b['is']('element')&&_0x29b7bb['match'](_0x47885b)&&(_0x4dd4d9['push'](_0x47885b),'h1'==_0x47885b['name']&&(_0xc9ac6c=!0x0));if(_0xc9ac6c){for(const _0x5cece2 of _0x4dd4d9)_0x16cae1['rename']('h'+(parseInt(_0x5cece2['name'][0x1])+0x1),_0x5cece2);}}['_isH1TagSupportEnabled'](){const {data:_0x5d53b2,editing:_0x59c3fc}=this['editor'],_0x15a7cc=_0x5d53b2['htmlProcessor']['toView']('<h1></h1>'),_0x693ca2=_0x5d53b2['toView'](_0x5d53b2['toModel'](_0x15a7cc));return!!_0x59c3fc['view']['domConverter']['viewToDom'](_0x693ca2)['querySelector']('h1');}['_sanitizeHTML'](_0x334128){return this['editor']['editing']['view']['domConverter']['setContentOf'](this['_sanitizationContainer'],_0x334128),this['_sanitizationContainer']['innerHTML'];}['_stripMarkdownSyntax'](_0x2aed4e){const _0x27b332=_0x2aed4e['trim']();return _0x27b332['startsWith']('```html')?_0x27b332['endsWith']('```')?_0x27b332['substring'](0x7,_0x27b332['length']-0x3):_0x27b332['substring'](0x7):_0x2aed4e;}}const _={'REPLACE':'replace','INSERT':'insert'};class at extends ot{constructor(_0x4037fb){super(_0x4037fb),this['set']('isVisible',!0x1),this['set']('mainAction',_['REPLACE']),this['replaceButton']=this['_createButton']('','ck-button-action'),this['replaceButton']['bind']('label')['to'](this,'mainAction',_0xd66335=>i(_0x4037fb,'AI_'+_0xd66335['toUpperCase']()+'_CONTENT')),this['insertButton']=this['_createButton'](i(_0x4037fb,'Insert\x20below')),this['tryAgainButton']=this['_createButton'](i(_0x4037fb,'Try\x20again')),this['stopButton']=this['_createButton'](i(_0x4037fb,'Stop'));const _0x2c02bd=this['bindTemplate'];this['extendTemplate']({'attributes':{'class':['ck-ai-form__toolbar',_0x2c02bd['if']('isVisible','ck-hidden',_0x27a031=>!_0x27a031)]}}),this['items']['addMany']([this['replaceButton'],this['insertButton'],this['tryAgainButton'],this['stopButton']]);}['_createButton'](_0x1a477c,_0x31d112){const _0x552c00=new _0x7a723e(this['locale']);return _0x552c00['set']({'label':_0x1a477c,'class':_0x31d112||'','isVisible':!0x0,'withText':!0x0}),_0x552c00;}}class ct extends _0x4351e1{['contentFieldView'];['copyButtonView'];constructor(_0x5e7407,_0x379496=''){super(_0x5e7407),this['set']({'value':null,'isVisible':!0x1,'isProcessing':!0x1});const _0x1c5062=this['bindTemplate'];this['contentFieldView']=new bt(_0x5e7407,_0x379496),this['copyButtonView']=this['_createCopyButton'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area-wrapper',_0x1c5062['if']('isVisible','ck-hidden',_0x15241d=>!_0x15241d)],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area',_0x1c5062['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 _0x3b0f06=!0x1;this['on']('change:value',(_0x4126e4,_0x740fd3,_0x319bb1)=>{const _0x269083=!this['contentFieldView']['element']['querySelector']('.ck-ai-form__loader');this['contentFieldView']['setContent'](_0x319bb1),this['isProcessing']&&_0x269083&&!_0x3b0f06&&this['element']['scrollTo']({'top':this['element']['scrollHeight'],'behavior':'smooth'});}),this['on']('change:isProcessing',(_0x4a954b,_0x36c12a,_0x52afeb)=>{_0x3b0f06=!0x1,_0x52afeb?(this['value']=null,this['contentFieldView']['appendLoader']()):this['value']||this['contentFieldView']['setContent']('');}),this['listenTo'](this['element'],'wheel',()=>{_0x3b0f06=!0x0;}),this['listenTo'](this['element'],'mousedown',()=>{_0x3b0f06=!0x0;});}['focus'](){this['element']['focus']();}['_createCopyButton'](){const _0x20c228=this['locale'],_0xce09a8=new _0x7a723e(this['locale']),_0x5a3e53='ck-ai-form__copy-button';return _0xce09a8['set']({'label':i(_0x20c228,'Copy'),'icon':_0xe75053,'class':_0x5a3e53,'tooltip':!0x0}),_0xce09a8['bind']('isVisible')['to'](this,'value',_0x190372=>!!_0x190372),_0xce09a8['bind']('isEnabled')['to'](this,'isProcessing',_0xcf1ca4=>!_0xcf1ca4),_0xce09a8['on']('execute',()=>{this['_copyHTMLToClipboard'](this['contentFieldView']['element']),_0xce09a8['icon']=_0x4f032b,_0xce09a8['class']=_0x5a3e53+'\x20ck-ai-form__copy-button--copied',this['focus'](),setTimeout(()=>{_0xce09a8['icon']=_0xe75053,_0xce09a8['class']=_0x5a3e53;},0x3e8);}),_0xce09a8;}['_copyHTMLToClipboard'](_0x298eb8){const {window:_0x5a09a1,document:_0x292364}=_0x9e473a;if(_0x5a09a1['ClipboardItem']){const {Blob:_0x506c91,ClipboardItem:_0xaf8d81}=_0x5a09a1,_0x1fd15d=[new _0xaf8d81({'text/html':new _0x506c91([_0x298eb8['innerHTML']],{'type':'text/html'}),'text/plain':new _0x506c91([_0x298eb8['textContent']||''],{'type':'text/plain'})})];navigator['clipboard']['write'](_0x1fd15d);}else{const _0x1b0f38=_0x292364['createElement']('div');_0x1b0f38['style']['position']='absolute',_0x1b0f38['style']['left']='-9999px',_0x1b0f38['innerHTML']='<span>[</span>'+_0x298eb8['innerHTML']+'<span>]</span>',_0x292364['body']['appendChild'](_0x1b0f38);const _0x84cb87=_0x292364['createRange']();_0x84cb87['setStartAfter'](_0x1b0f38['firstElementChild']),_0x84cb87['setEndBefore'](_0x1b0f38['lastElementChild']);const _0x1bb0f3=_0x5a09a1['getSelection']();_0x1bb0f3['removeAllRanges'](),_0x1bb0f3['addRange'](_0x84cb87),_0x292364['execCommand']('copy'),_0x1b0f38['remove']();}}}class bt extends _0x4351e1{constructor(_0x5cb708,_0x361f24=''){super(_0x5cb708),this['loaderView']=this['_createLoader'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-content',_0x361f24,'ck-reset_all-excluded','ck-ai-form__content-field']}});}['setContent'](_0x37dfed){this['element']['innerHTML']=_0x37dfed;}['appendLoader'](){this['element']['appendChild'](this['loaderView']['element']);}['_createLoader'](){const _0x19621e=new _0x4351e1(),_0x22f1cf=this['locale'],_0x29bf5a=new _0x54872b();return _0x29bf5a['isVisible']=!0x0,_0x19621e['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__loader']},'children':[_0x29bf5a,{'text':i(_0x22f1cf,'AI\x20is\x20writing...')}]}),_0x19621e['render'](),_0x19621e;}}class mt extends _0x4351e1{constructor(_0x234216,_0x5952d5=''){super(_0x234216);const _0x484264=new _0x2a24ba(),_0x1816cb=this['bindTemplate'];this['set']('text',_0x5952d5),_0x484264['content']=_0x773f81,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__error']},'children':[_0x484264,{'text':_0x1816cb['to']('text')}]});}}class lt extends st{['submitButtonView'];['showHistoryButtonView'];constructor(_0x13a18f,_0x438ecc){super(_0x13a18f,_0x438ecc),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',(_0x14ddfa,_0x2e0d8c)=>{_0x14ddfa['target']==this['queryView']['fieldView']['element']&&(this['submit'](),_0x2e0d8c());});}['_createSubmitButton'](){const _0x51d252=new _0x7a723e(this['locale']),_0x5491b0=this['locale'];return _0x51d252['set']({'icon':it,'label':i(_0x5491b0,'Submit'),'isVisible':!0x0,'tooltip':!0x0,'class':'ck-ai-form__submit'}),_0x51d252['on']('execute',()=>{this['submit']();}),_0x51d252['bind']('isEnabled')['to'](this['queryView']['fieldView'],'isEmpty',this,'isEnabled',(_0x963a4e,_0x9e86e3)=>!_0x963a4e&&_0x9e86e3),_0x51d252;}['_createShowHistoryButton'](){const _0x514a1b=new _0x7a723e(this['locale']),_0x1135c4=this['resultsView'],_0x2f9f78=this['locale'];_0x514a1b['set']({'label':i(_0x2f9f78,'History'),'withText':!0x1,'icon':tt,'tooltip':!0x0,'tooltipPosition':'sw','class':'ck-ai-form__toggle-history'}),_0x514a1b['bind']('isOn')['to'](_0x1135c4,'isVisible'),_0x514a1b['bind']('isEnabled')['to'](this,'isEnabled'),_0x514a1b['on']('execute',()=>{_0x1135c4['isVisible']=!_0x1135c4['isVisible'],_0x1135c4['isVisible']?this['filteredView']['focus']():this['focus']();});const _0x1f4778=()=>{_0x9e473a['window']['requestAnimationFrame'](()=>{if(_0x52bac2(this['element'])){const _0x33473b=new _0x1b0bbc(this['queryView']['fieldView']['element']),_0x856ec=_0x33473b['width'],_0x33d75c='rtl'===_0x2f9f78['uiLanguageDirection']?'left':'right';_0x33473b['excludeScrollbarsAndBorders'](),_0x514a1b['element']['style'][_0x33d75c]=_0x856ec-_0x33473b['width']+0x1+'px';}});};return this['queryView']['fieldView']['on']('update',_0x1f4778),this['on']('render',_0x1f4778),_0x514a1b;}['submit'](){const _0x4cd415=this['queryView']['fieldView']['element']['value'];this['fire']('submit',_0x4cd415);}['focus'](_0xdb3df4){-0x1===_0xdb3df4?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}}class pt extends yt{['historyGroupView'];['clearHistoryButton'];constructor(_0x193979){super(_0x193979),this['clearHistoryButton']=this['_createClearHistoryButton'](),this['historyGroupView']=new Ct(),this['historyGroupView']['children']['add'](this['clearHistoryButton'],0x1),this['historyGroupView']['label']=i(_0x193979,'Prompt\x20history'),this['historyGroupView']['items']['delegate']('execute')['to'](this),this['items']['add'](this['historyGroupView']);}['filter'](){let _0x287d32=0x0;for(const _0x4f86b6 of this['items'])_0x287d32+=_0x4f86b6['items']['length'];return{'resultsCount':_0x287d32,'totalItemsCount':_0x287d32};}['_createClearHistoryButton'](){const _0x134ce8=this['locale'],_0x370e13=new _0x7a723e(this['locale']);return _0x370e13['set']({'label':'('+i(_0x134ce8,'Clear')+')','withText':!0x0}),_0x370e13['on']('execute',()=>this['fire']('clearHistory')),_0x370e13;}}class ut extends xt{constructor(_0x3d5a0d){super();const _0x4e6f65=new wt(),_0x812dda=new _0x7a723e(this['locale'],_0x4e6f65);this['children']['add'](_0x812dda),_0x812dda['set']({'label':_0x3d5a0d['prompt'],'withText':!0x0}),_0x812dda['on']('execute',()=>{this['fire']('execute',{'value':kt(_0x3d5a0d['prompt'])});});}}const ts='CKEditor/AIFormView/PromptHistory';class dt extends _0x47cb6e{constructor(){super(),this['_loadFromSessionStorage'](),this['on']('add',(_0x4e6043,_0x15943b)=>{const _0x464c69=os(_0x15943b['prompt']);for(const _0x38a814 of this)if(_0x38a814!=_0x15943b&&os(_0x38a814['prompt'])===_0x464c69){this['remove'](_0x38a814);break;}this['length']>0x14&&this['remove'](this['last']),this['_saveToSessionStorage']();}),this['on']('remove',()=>{this['_saveToSessionStorage']();});}['_loadFromSessionStorage'](){const _0x1aa665=sessionStorage['getItem'](ts)||'[]';this['addMany'](JSON['parse'](_0x1aa665));}['_saveToSessionStorage'](){sessionStorage['setItem'](ts,JSON['stringify'](this['map'](_0x14e5ec=>_0x14e5ec)));}}function os(_0x294c08){return _0x294c08['toLowerCase']()['trim']();}class k extends _0x4351e1{['focusTracker'];['keystrokes'];['contentArea'];['toolbar'];['promptView'];['errorView'];['_focusables'];['focusCycler'];['_promptHistory'];constructor(_0x4df651,_0xcb3d6b,_0x104e29=''){super(_0x4df651),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(_0x4df651),this['contentArea']=new ct(_0x4df651,_0x104e29),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 _0x56f4=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form',_0xcb3d6b],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form-content']},'children':[{'tag':'div','attributes':{'class':[_0x56f4['if']('isError','ck-hidden',_0x12bc58=>!_0x12bc58)]},'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'](_0x57bd9b=0x1){-0x1===_0x57bd9b?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 _0x22ff83=this['locale'],_0x4f022b=new lt(_0x22ff83,{'queryView':{'label':i(_0x22ff83,'Ask\x20AI\x20to\x20edit\x20or\x20generate'),'creator':nt,'showIcon':!0x1,'showResetButton':!0x1},'infoView':{'text':{'noSearchableItems':{'primary':i(_0x22ff83,'Empty\x20history'),'secondary':i(_0x22ff83,'Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.')}}},'filteredView':this['_createHistoryView'](),'queryMinChars':0x1/0x0,'resetOnBlur':!0x1});return _0x4f022b['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x536874,_0x42ed12)=>_0x536874&&!_0x42ed12),this['listenTo'](_0x4f022b,'submit',(_0x3e0b8f,_0x2105fd)=>{this['prompt']=_0x2105fd;const _0x366991=ft(_0x2105fd);this['fire']('submitPrompt',_0x366991),_0x2105fd['trim']()&&this['_promptHistory']['add']({'prompt':_0x366991},0x0);},{'priority':'high'}),_0x4f022b;}['_createHistoryView'](){const _0x2bf272=new pt(this['locale']);return _0x2bf272['historyGroupView']['items']['bindTo'](this['_promptHistory'])['as'](ut),_0x2bf272['on']('clearHistory',()=>{this['_promptHistory']['clear'](),this['promptView']['search'](''),this['promptView']['focus']();}),_0x2bf272;}['_createToolbar'](){const _0x29f245=new at(this['locale']);return _0x29f245['replaceButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x1f164f,_0x112b5a,_0x1bb60b)=>_0x1f164f&&!_0x112b5a&&!!_0x1bb60b),_0x29f245['replaceButton']['delegate']('execute')['to'](this,'replaceContent'),_0x29f245['insertButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x30d1af,_0x2b8339,_0x2c9378)=>_0x30d1af&&!_0x2b8339&&!!_0x2c9378),_0x29f245['insertButton']['delegate']('execute')['to'](this,'insertContentBelow'),_0x29f245['tryAgainButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x1fc73c,_0x7684e9)=>_0x1fc73c&&!_0x7684e9),_0x29f245['tryAgainButton']['delegate']('execute')['to'](this,'tryAgainEvent'),_0x29f245['stopButton']['bind']('isEnabled')['to'](this,'isProcessing'),_0x29f245['stopButton']['delegate']('execute')['to'](this,'stopProcessing'),_0x29f245;}['startProcessing'](){this['value']='',this['isError']=!0x1,this['isProcessing']=!0x0,this['contentArea']['isVisible']=!0x0,this['toolbar']['isVisible']=!0x0,this['contentArea']['focus']();}['finishProcessing'](){const _0x1091fb=this['locale'];this['isProcessing']=!0x1,this['prompt']='',this['promptView']['reset'](),this['value']&&(this['promptView']['queryView']['label']=i(_0x1091fb,'Ask\x20AI\x20to\x20improve\x20generated\x20text'));}['handleError'](_0x29ec65){const _0x229465=this['locale'];this['finishProcessing'](),this['isError']=!0x0,this['errorView']['text']=_0x29ec65||i(_0x229465,'AI_ERROR_FAILED'),this['value']||(this['contentArea']['isVisible']=!0x1);}}const l=globalThis['DataTransfer'];class n extends _0x515c0a{['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[_0x114521,a,x,_0x4a6f28];}constructor(_0x123941){super(_0x123941),_0x123941['config']['define']('ai.aiAssistant.disabledElements',['media','rawHtml','tableOfContents']),_0x123941['config']['define']('ai.aiAssistant.contentAreaCssClass',''),_0x123941['config']['define']('ai.useTheme',!0x0),this['_uiCssClasses']='ck-ai-assistant-ui'+(_0x123941['config']['get']('ai.useTheme')?'\x20ck-ai-assistant-ui_theme':'');}['init'](){const {editor:_0x5b7ff5}=this;this['_aiAdapter']=_0x5b7ff5['plugins']['get'](x),this['_dialog']=_0x5b7ff5['plugins']['get'](_0x4a6f28),this['_formView']=null,this['_commandDefinitions']=this['_getResolvedCommandsDefinitions']();const _0x3cbe99=new E(_0x5b7ff5,Array['from'](this['_commandDefinitions']['values']()));_0x5b7ff5['commands']['add']('showAIAssistant',_0x3cbe99),_0x5b7ff5['ui']['componentFactory']['add']('aiCommands',_0x4434ae=>{const _0x106262=_0x502434(_0x4434ae);return _0x106262['set']({'class':'ck-ai-commands-dropdown\x20'+this['_uiCssClasses']}),_0x106262['buttonView']['set']({'label':i(_0x4434ae,'AI\x20Commands'),'icon':_0x34e489,'tooltip':!0x0}),_0x106262['on']('execute',_0x278c6f=>this['_onExecute'](_0x278c6f['source']['id'])),_0x27fba4(_0x106262,_0x5b7ff5['ui']['view']['body'],function(_0x5a0e03){const _0xbfa58c=o(_0x5a0e03['config']['get']('ai.aiAssistant.commands'),_0x5a0e03['locale']),_0x3d5045=U(_0x5a0e03,_0xbfa58c)['filter'](_0xaf5d99=>_0xaf5d99['commands']['length']);if(0x1===_0x3d5045['length'])return U(_0x5a0e03,_0x3d5045[0x0]['commands'])['map'](_0x10fccb=>({'id':_0x10fccb['id'],'label':_0x10fccb['label']}));return _0x3d5045['map'](_0x59e7c9=>{const {groupId:_0x4a7489,groupLabel:_0x5bf595,commands:_0x36f909}=_0x59e7c9,_0x1542f0=U(_0x5a0e03,_0x36f909)['map'](_0xc5fb65=>({'id':_0xc5fb65['id'],'label':_0xc5fb65['label']}));return{'id':_0x4a7489,'menu':_0x5bf595||_0x4a7489,'children':_0x1542f0};});}(_0x5b7ff5),{'ariaLabel':i(_0x4434ae,'AI\x20Commands')}),_0x106262['menuView']['menuPanelClass']='ck-ai-commands-dropdown\x20'+this['_uiCssClasses'],_0x3cbe99['on']('change:enabledCommandsIds',_0x516f2c),_0x106262['menuView']['once']('render',_0x516f2c),_0x106262;function _0x516f2c(){_0x106262['isEnabled']=_0x3cbe99['enabledCommandsIds']['length']>0x0;for(const _0x5581c3 of _0x106262['menuView']['buttons'])_0x5581c3['isEnabled']=_0x3cbe99['enabledCommandsIds']['includes'](_0x5581c3['id']);}}),_0x5b7ff5['ui']['componentFactory']['add']('menuBar:aiCommands',_0x37a826=>{const _0x15aae7=new _0x1506d9(_0x37a826);_0x15aae7['buttonView']['set']({'label':i(_0x37a826,'AI\x20Commands'),'icon':_0x34e489}),_0x15aae7['bind']('isEnabled')['to'](_0x3cbe99,'enabledCommandsIds',_0x2ccd1d=>_0x2ccd1d['length']>0x0);const _0x168c03=o(_0x5b7ff5['config']['get']('ai.aiAssistant.commands'),_0x37a826);return this['_populateMenuBarMenu'](_0x3cbe99,_0x15aae7,_0x168c03,_0x5dff9a=>this['_onExecute'](_0x5dff9a)),_0x15aae7;}),_0x5b7ff5['ui']['componentFactory']['add']('aiAssistant',()=>{const _0x16d5d6=this['_createAIAssistantUIButton'](_0x7a723e);return _0x16d5d6['set']({'tooltip':!0x0,'class':'ck-ai-assistant-button\x20'+this['_uiCssClasses']}),_0x16d5d6;}),_0x5b7ff5['ui']['componentFactory']['add']('menuBar:aiAssistant',()=>{const _0x16969b=this['_createAIAssistantUIButton'](_0x34bfe7);return _0x16969b['set']({'role':'menuitemcheckbox'}),_0x16969b;}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x116de8=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x38102e;for(const _0x4fc825 in _0x116de8){const _0x3d19ab=_0x4fc825,_0x35d547=_0x116de8[_0x3d19ab];if('aiLicenseKeyValid'==_0x35d547||'aiLicenseKeyInvalid'==_0x35d547||'aiLicenseKeyExpired'==_0x35d547||'aiLicenseKeyDomainLimit'==_0x35d547||'aiLicenseKeyNotAllowed'==_0x35d547||'aiLicenseKeyEvaluationLimit'==_0x35d547||'aiLicenseKeyTrialLimit'==_0x35d547||'aiLicenseKeyUsageLimit'==_0x35d547){delete _0x116de8[_0x3d19ab],_0x38102e=_0x35d547,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'aiLicenseKeyInvalid'==_0x38102e&&_0x116de8['_showLicenseError']('invalid'),'aiLicenseKeyExpired'==_0x38102e&&_0x116de8['_showLicenseError']('expired'),'aiLicenseKeyDomainLimit'==_0x38102e&&_0x116de8['_showLicenseError']('domainLimit'),'aiLicenseKeyNotAllowed'==_0x38102e&&_0x116de8['_showLicenseError']('featureNotAllowed','AIAssistant'),'aiLicenseKeyEvaluationLimit'==_0x38102e&&_0x116de8['_showLicenseError']('evaluationLimit'),'aiLicenseKeyTrialLimit'==_0x38102e&&_0x116de8['_showLicenseError']('trialLimit'),'aiLicenseKeyUsageLimit'==_0x38102e&&_0x116de8['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['showUI'](_0x422065='',_0x27ae7c='',_0xcc07c='custom'){const _0x2c350b=this['editor'],_0x36a39e=_0x2c350b['editing']['view'],_0x28acc1=_0x2c350b['plugins']['get'](a),_0x35036a=_0x2c350b['plugins']['get'](_0x114521);_0x28acc1['showFakeVisualSelection']();const _0x482c10=new l(),_0x378957=new ClipboardEvent('copy',{'clipboardData':_0x482c10}),_0x5ec60c=new _0x49a740(_0x482c10),_0x3736d7=new _0x1ce5fe(_0x36a39e,_0x378957,{'dataTransfer':_0x5ec60c});_0x35036a['_forceMarkersCopy']('comment',()=>{_0x36a39e['document']['fire']('copy',_0x3736d7);}),this['_formView']||(this['_initView'](),this['_aiAssistantController']=new j(_0x2c350b,this['_aiAdapter']['textAdapter'],this['_formView']));let _0x2d9161=_0x5ec60c['getData']('text/html');const _0x411ee3=_0x2c350b['model']['document']['selection'],_0x5a41ab=Array['from'](_0x411ee3['getRanges']());0x1===_0x5a41ab['length']&&_0x5a41ab[0x0]['isFlat']&&!_0x411ee3['getSelectedElement']()&&''!==_0x2d9161['replace'](/&nbsp;/g,'')['trim']()&&(_0x2d9161='<p>'+_0x2d9161+'</p>'),this['_aiAssistantController']['updateView']({'actionId':_0xcc07c,'query':_0x422065,'htmlContent':_0x2d9161,'label':_0x27ae7c,'mainActionLabel':_[_0x2c350b['model']['document']['selection']['isCollapsed']?'INSERT':'REPLACE']}),'aiAssistant'!==this['_dialog']['id']?this['_dialog']['show']({'id':'aiAssistant','icon':_0x3c77d6,'title':i(this['editor']['locale'],'AI\x20Assistant'),'content':this['_formView'],'position':_0x3b370c['EDITOR_TOP_SIDE'],'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_aiAssistantController']['reset'](),_0x28acc1['hideFakeVisualSelection']();}}):this['_dialog']['view']['wasMoved']||this['_dialog']['view']['updatePosition']();}['hideUI'](){this['_dialog']['hide']();}['_getResolvedCommandsDefinitions'](){const _0x44fd1d=new Map(),_0x588033=o(this['editor']['config']['get']('ai.aiAssistant.commands'),this['editor']['locale']);for(const _0x10008d of _0x588033)for(const _0x196b35 of _0x10008d['commands'])_0x44fd1d['set'](_0x196b35['id'],{..._0x196b35,'groupId':_0x10008d['groupId'],'groupLabel':_0x10008d['groupLabel']||_0x10008d['groupId']});return _0x44fd1d;}['_createAIAssistantUIButton'](_0x578e2c){const _0x11fdca=this['editor'],_0x3cd337=_0x11fdca['commands']['get']('showAIAssistant'),_0x29770c=new _0x578e2c(_0x11fdca['locale']);return _0x29770c['set']({'label':i(_0x11fdca['locale'],'AI\x20Assistant'),'icon':_0x3c77d6,'isToggleable':!0x0}),_0x29770c['bind']('isEnabled')['to'](_0x3cd337),_0x29770c['bind']('isOn')['to'](this['_dialog'],'id',_0x593f8c=>'aiAssistant'===_0x593f8c),this['listenTo'](_0x29770c,'execute',()=>{_0x29770c['isOn']?this['hideUI']():_0x3cd337['execute']();}),_0x29770c;}['_initView'](){const _0x3f496f=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',()=>{_0x3f496f['insertContent'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['listenTo'](this['_formView'],'insertContentBelow',()=>{_0x3f496f['insertContentBelow'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['_initAriaAiStatusChangeAnnouncements']();}['_initAriaAiStatusChangeAnnouncements'](){const {locale:_0x3ab150,ui:{ariaLiveAnnouncer:_0x13d9ce}}=this['editor'];this['_formView']['contentArea']['on']('change:isProcessing',(_0x48ca1f,_0x2973ea,_0x1189b8)=>{const _0x20a7c8=this['_aiAssistantController']['currentContext'];_0x1189b8?_0x13d9ce['announce'](i(_0x3ab150,'AI\x20is\x20writing')):_0x20a7c8&&_0x13d9ce['announce'](i(_0x3ab150,'Generated\x20content:\x20%0',_0x20a7c8),{'politeness':'polite','isUnsafeHTML':!0x0});}),this['_formView']['on']('change:isError',(_0x1ed199,_0x5a5374,_0x3c46f6)=>{if(_0x3c46f6){const _0xcad9f=this['_formView']['errorView']['text'];_0x13d9ce['announce'](i(_0x3ab150,'Error\x20during\x20AI\x20content\x20generation:\x20%0',_0xcad9f));}});}['_onExecute'](_0x3f63f0){const _0x5426c4=this['_commandDefinitions']['get'](_0x3f63f0),_0x18214b=this['editor'],_0x5daeee=_0x18214b['model']['document']['selection'],_0x280077=_0x18214b['commands']['get']('showAIAssistant'),_0x15df05=_0x18214b['plugins']['get'](a),_0x409848=''+(_0x5426c4['groupId']!==K?_0x5426c4['groupLabel']+':\x20':'')+_0x5426c4['label'];if(!0x1!==_0x5426c4['requiresContent']&&_0x5daeee['isCollapsed']){const _0x5add39=_0x556a6f(_0x5daeee['getSelectedBlocks']())||_0x18214b['model']['schema']['getLimitElement'](_0x5daeee);_0x18214b['model']['change'](_0x287741=>{_0x287741['setSelection'](_0x5add39,'in');});}_0x15df05['showFakeVisualSelection'](),_0x280077['execute'](_0x5426c4['prompt'],_0x409848,'command:'+_0x3f63f0);}['_populateMenuBarMenu'](_0x459da0,_0x1f31c1,_0x53d220,_0x1c2d4d){const _0x4bd154=this['editor'],_0x207951=_0x4bd154['locale'],_0x5a9de0=new _0x3cd171(_0x207951),_0x2edb82=U(_0x4bd154,_0x53d220)['filter'](_0x7c76f=>_0x7c76f['commands']['length']);0x1===_0x2edb82['length']?this['_getMenuBarGroupButtons']({'command':_0x459da0,'commands':_0x2edb82[0x0]['commands'],'parentMenuView':_0x1f31c1,'onExecute':_0x1c2d4d})['forEach'](_0x5a2ac3=>_0x5a9de0['items']['add'](_0x5a2ac3)):_0x2edb82['forEach'](({groupId:_0x14d98f,groupLabel:_0x551c08,commands:_0x23c87b})=>{const _0xc3f21e=new _0x2e2987(_0x207951,_0x1f31c1),_0x2b161e=new _0x1506d9(_0x207951),_0x527ebd=new _0x3cd171(_0x207951),_0x9ccaf7=this['_getMenuBarGroupButtons']({'command':_0x459da0,'commands':_0x23c87b,'parentMenuView':_0x2b161e,'onExecute':_0x1c2d4d});_0x2b161e['buttonView']['set']({'label':_0x551c08||_0x14d98f}),_0x2b161e['delegate']('execute')['to'](_0x1f31c1),_0x527ebd['items']['addMany'](_0x9ccaf7),_0x2b161e['panelView']['children']['add'](_0x527ebd),_0xc3f21e['children']['add'](_0x2b161e),_0x5a9de0['items']['add'](_0xc3f21e);}),_0x1f31c1['panelView']['children']['add'](_0x5a9de0);}['_getMenuBarGroupButtons']({command:_0x402415,commands:_0xadfc4c,parentMenuView:_0x5766ff,onExecute:_0x358d10}){const _0x3cd2f0=this['editor'],_0x84219d=_0x3cd2f0['locale'];return U(_0x3cd2f0,_0xadfc4c)['map'](_0x198520=>{const _0x250c0e=new _0x2e2987(_0x84219d,_0x5766ff),_0x497841=new _0x34bfe7(_0x84219d);return _0x497841['set']({'label':_0x198520['label']}),_0x497841['delegate']('execute')['to'](_0x5766ff),_0x497841['on']('execute',()=>_0x358d10(_0x198520['id'])),_0x497841['bind']('isEnabled')['to'](_0x402415,'enabledCommandsIds',_0x4ccf2a=>_0x4ccf2a['includes'](_0x198520['id'])),_0x250c0e['children']['add'](_0x497841),_0x250c0e;});}}function T(_0x32a03d,_0x1f3fb8){return void 0x0!==_0x32a03d['order']&&void 0x0===_0x1f3fb8['order']?0x1:void 0x0===_0x32a03d['order']&&void 0x0!==_0x1f3fb8['order']?-0x1:void 0x0!==_0x32a03d['order']&&void 0x0!==_0x1f3fb8['order']?_0x32a03d['order']-_0x1f3fb8['order']:0x0;}function U(_0x14ffae,_0x28609d){_0x28609d['sort'](T);const _0x32b60a={},_0x309f5f=[];for(const _0x2ea631 of _0x28609d)if(void 0x0!==_0x2ea631['order']){if(_0x2ea631['order']in _0x32b60a)throw new _0xed27b5('ai-commands-config-order-collision',_0x14ffae,{'conflictingDefinitions':[_0x2ea631,_0x32b60a[_0x2ea631['order']]]});_0x32b60a[_0x2ea631['order']]=_0x2ea631,_0x309f5f['splice'](_0x2ea631['order'],0x0,_0x2ea631);}else _0x309f5f['push'](_0x2ea631);return _0x309f5f;}class At extends _0x515c0a{static get['requires'](){return[n,a];}static get['pluginName'](){return'AIAssistant';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4397fc){super(_0x4397fc);const _0x1ec184=_0x4397fc['config'],_0x775f0d=_0x4397fc['locale'];_0x1ec184['define']('ai.aiAssistant.preserveComments',!0x0),_0x1ec184['define']('ai.aiAssistant.commands',_t(_0x775f0d)),_0x1ec184['define']('ai.aiAssistant.extraCommandGroups',[]),_0x1ec184['define']('ai.aiAssistant.removeCommands',[]);let _0x46e7cf=o(_0x1ec184['get']('ai.aiAssistant.commands'),_0x775f0d);const _0x49cd6=_0x1ec184['get']('ai.aiAssistant.extraCommandGroups'),_0x4dfb6e=_0x1ec184['get']('ai.aiAssistant.removeCommands');_0x49cd6['forEach'](_0x2f4e86=>{const _0x3601fb=_0x46e7cf['find'](_0x328ff6=>_0x328ff6['groupId']===_0x2f4e86['groupId']);_0x3601fb?_0x3601fb['commands']=_0x3601fb['commands']['concat'](_0x2f4e86['commands']):_0x46e7cf['push'](_0x2f4e86);}),_0x46e7cf=_0x46e7cf['filter'](_0x391e54=>!_0x4dfb6e['includes'](_0x391e54['groupId'])),_0x46e7cf['forEach'](_0x3e05ee=>{_0x3e05ee['commands']=_0x3e05ee['commands']['filter'](_0x1fade0=>!_0x4dfb6e['includes'](_0x1fade0['id']));}),_0x1ec184['set']('ai.aiAssistant.commands',_0x46e7cf);}}function _t(_0xe3b550){return[{'groupId':'editOrReview','groupLabel':i(_0xe3b550,'Edit\x20or\x20review'),'commands':[{'id':'improveWriting','label':i(_0xe3b550,'Improve\x20writing'),'prompt':'Fix\x20spelling\x20mistakes,\x20use\x20proper\x20grammar\x20and\x20apply\x20good\x20writing\x20practices.\x20Do\x20not\x20lose\x20the\x20original\x20meaning.'},{'id':'makeShorter','label':i(_0xe3b550,'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(_0xe3b550,'Make\x20longer'),'prompt':'Improve\x20this\x20content\x20by\x20using\x20descriptive\x20language\x20and\x20inserting\x20more\x20information\x20and\x20more\x20detailed\x20explanations.'},{'id':'simplifyLanguage','label':i(_0xe3b550,'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(_0xe3b550,'Generate\x20from\x20selection'),'commands':[{'id':'summarize','label':i(_0xe3b550,'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(_0xe3b550,'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(_0xe3b550,'Change\x20tone'),'commands':[{'id':'professional','label':i(_0xe3b550,'Professional'),'prompt':'Improve\x20using\x20polished,\x20formal,\x20and\x20respectful\x20language\x20to\x20convey\x20professional\x20expertise\x20and\x20competence.'},{'id':'casual','label':i(_0xe3b550,'Casual'),'prompt':'Improve\x20using\x20casual,\x20informal\x20language\x20to\x20convey\x20a\x20casual\x20conversation\x20with\x20a\x20real\x20person.'},{'id':'direct','label':i(_0xe3b550,'Direct'),'prompt':'Improve\x20using\x20direct\x20language,\x20using\x20only\x20the\x20essential\x20information.'},{'id':'confident','label':i(_0xe3b550,'Confident'),'prompt':'Improve\x20using\x20compelling,\x20optimistic\x20language\x20to\x20convey\x20confidence\x20in\x20the\x20writing.'},{'id':'friendly','label':i(_0xe3b550,'Friendly'),'prompt':'Improve\x20using\x20friendly,\x20comforting\x20language,\x20to\x20convey\x20understanding\x20and\x20empathy.'}]},{'groupId':'changeStyle','groupLabel':i(_0xe3b550,'Change\x20style'),'commands':[{'id':'business','label':i(_0xe3b550,'Business'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20business\x20professional\x20with\x20formal\x20language.'},{'id':'legal','label':i(_0xe3b550,'Legal'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20legal\x20professional\x20using\x20valid\x20legal\x20terminology.'},{'id':'journalism','label':i(_0xe3b550,'Journalism'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20journalist\x20using\x20engaging\x20language\x20to\x20convey\x20the\x20importance\x20of\x20the\x20information.'},{'id':'poetic','label':i(_0xe3b550,'Poetic'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20poem\x20using\x20poetic\x20techniques\x20without\x20losing\x20the\x20original\x20meaning.'}]},{'groupId':'translate','groupLabel':i(_0xe3b550,'Translate'),'commands':[{'id':'translateEnglish','label':i(_0xe3b550,'English'),'prompt':'Translate\x20the\x20content\x20to\x20English\x20language.'},{'id':'translateSpanish','label':i(_0xe3b550,'Spanish'),'prompt':'Translate\x20the\x20content\x20to\x20Spanish\x20language.'},{'id':'translatePortuguese','label':i(_0xe3b550,'Portuguese'),'prompt':'Translate\x20the\x20content\x20to\x20Portuguese\x20language.'},{'id':'translateGerman','label':i(_0xe3b550,'German'),'prompt':'Translate\x20the\x20content\x20to\x20German\x20language.'},{'id':'translateFrench','label':i(_0xe3b550,'French'),'prompt':'Translate\x20the\x20content\x20to\x20French\x20language.'},{'id':'translateChinese','label':i(_0xe3b550,'Simplified\x20Chinese'),'prompt':'Translate\x20the\x20content\x20to\x20Simplified\x20Chinese\x20language.'},{'id':'translateHindi','label':i(_0xe3b550,'Hindi'),'prompt':'Translate\x20the\x20content\x20to\x20Hindi\x20language.'},{'id':'translateArabic','label':i(_0xe3b550,'Arabic'),'prompt':'Translate\x20the\x20content\x20to\x20Arabic\x20language.'}]}];}class S extends _0x515c0a{['abortController'];static get['requires'](){return[x];}constructor(_0x1454d6){super(_0x1454d6),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'](_0x4be1b4){return this['sendRequest'](_0x4be1b4)['catch'](_0x545071=>{if(_0x545071 instanceof R)return Promise['reject'](_0x545071);if('AbortError'==_0x545071['name'])return Promise['resolve']();throw console['error'](_0x545071),new _0xed27b5('aitextadapter-send-request-failed',null);});}async['_prepareRequestHeaders'](_0x581d6b,_0x133305){const _0xe4a06e=this['editor']['locale'],_0x4a8d1a={'Content-Type':'application/json'};if('object'==typeof _0x581d6b)Object['assign'](_0x4a8d1a,_0x581d6b);else{if(_0x581d6b)try{const _0x1a9a45=await _0x581d6b(_0x133305);Object['assign'](_0x4a8d1a,_0x1a9a45);}catch{return Promise['reject'](new R(i(_0xe4a06e,'AI_ERROR_GET_HEADERS')));}}return _0x4a8d1a;}async['_prepareRequestParameters'](_0x45ba57,_0x1fe826){const _0x1a98df=this['editor']['locale'];if('object'==typeof _0x45ba57)return _0x45ba57;try{return await _0x45ba57(_0x1fe826);}catch{return Promise['reject'](new R(i(_0x1a98df,'AI_ERROR_GET_PARAMETERS')));}}}class It extends S{['_apiUrl'];['_requestHeaders'];['_requestParameters'];static get['pluginName'](){return'OpenAITextAdapter';}constructor(_0x1b28e1){super(_0x1b28e1),_0x1b28e1['config']['define']('ai.openAI.apiUrl','https://api.openai.com/v1/chat/completions'),_0x1b28e1['config']['get']('ai.openAI.requestParameters')||_0x1b28e1['config']['define']('ai.openAI.requestParameters',{'model':'gpt-4o','temperature':0x1,'top_p':0x1,'stream':!0x0}),this['_apiUrl']=_0x1b28e1['config']['get']('ai.openAI.apiUrl'),this['_requestHeaders']=_0x1b28e1['config']['get']('ai.openAI.requestHeaders')||{},this['_requestParameters']=_0x1b28e1['config']['get']('ai.openAI.requestParameters');}async['sendRequest']({query:_0x35287e,context:_0x49cefa,onData:_0x1b7ec2,actionId:_0x46c4a6}){const _0x4e5652=this['editor']['locale'],_0x57b57a=await this['prepareMessages'](_0x35287e,_0x49cefa,_0x46c4a6),_0x22afbd=await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x46c4a6),_0x165a8c=await this['_prepareRequestParameters'](this['_requestParameters'],_0x46c4a6),_0x2f9c92={'messages':_0x57b57a,..._0x165a8c},_0x500063={'method':'POST','headers':_0x22afbd,'body':JSON['stringify'](_0x2f9c92),'signal':this['abortController']['signal']},_0x57ac91=await fetch(this['_apiUrl'],_0x500063);if(_0x57ac91['ok'])return _0x165a8c['stream']?await this['_readStreamableResponse'](_0x57ac91,_0x1b7ec2):await this['_readStaticResponse'](_0x57ac91,_0x1b7ec2),Promise['resolve']();{const _0x77dcb=await _0x57ac91['text']();return _0x77dcb['includes']('context_length_exceeded')?Promise['reject'](new R(i(_0x4e5652,'AI_ERROR_CONTEXT_LENGTH'))):_0x77dcb['includes']('Moderation')?Promise['reject'](new R(i(_0x4e5652,'AI_ERROR_MODERATION'))):Promise['reject'](new Error(_0x77dcb));}}async['prepareMessages'](_0x4d2029,_0x345b1d,_0x5e432e){let _0x525575,_0x127fe3;return _0x345b1d?(_0x525575='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.',_0x127fe3='Instruction:\x0a'+_0x4d2029+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x345b1d):(_0x525575='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.',_0x127fe3=_0x4d2029),[{'role':'system','content':_0x525575},{'role':'user','content':_0x127fe3}];}async['_readStreamableResponse'](_0x43fabc,_0x5a52c1){const _0x1d430d=_0x43fabc['body']['getReader'](),_0x2e9e8=new TextDecoder();let _0x508eb6='',_0xe99b1='',_0x56fa2c='',_0x18dcbd=!0x1;for(;!_0x18dcbd;){const {done:_0x375458,value:_0x2e9f14}=await _0x1d430d['read'](),_0x393cbe=_0x508eb6+_0x2e9e8['decode'](_0x2e9f14);let _0x65c289='';_0x18dcbd=_0x375458;try{_0x65c289=this['_cleanUpData'](_0x393cbe),_0x508eb6='';}catch{_0x508eb6=_0x393cbe;continue;}_0xe99b1+=_0x65c289,!_0x18dcbd&&this['_isBufferIncomplete'](_0xe99b1)||_0xe99b1&&(_0x56fa2c+=_0xe99b1,_0xe99b1='',_0x5a52c1(_0x56fa2c));}return Promise['resolve']();}async['_readStaticResponse'](_0x37a7c2,_0x338095){return _0x338095((await _0x37a7c2['json']())['choices'][0x0]['message']['content']),Promise['resolve']();}['_isBufferIncomplete'](_0x25710c){const _0x18ed95=_0x25710c['split']('<')['length']!==_0x25710c['split']('>')['length'],_0x12d204=_0x25710c['length']<0x1e;return _0x18ed95&&_0x12d204;}['_cleanUpData'](_0x542111){return _0x542111['split'](/\n(?![^{]*\})/g)['map'](_0x21ffdf=>_0x21ffdf['replace']('data:\x20',''))['filter'](_0x35514e=>_0x35514e&&_0x35514e['length']>0x0&&'[DONE]'!==_0x35514e)['map'](_0x3beb40=>{const {choices:_0xbd3a8a}=JSON['parse'](_0x3beb40);if(_0xbd3a8a[0x0]?.['delta']?.['content'])return _0xbd3a8a[0x0]['delta']['content'];})['filter'](_0x43651d=>_0x43651d)['join']('');}}class Et extends S{['_apiUrl'];['_requestHeaders'];['_bedrockClientConfig'];['_requestParameters'];static get['pluginName'](){return'AWSTextAdapter';}constructor(_0x5a166f){super(_0x5a166f),_0x5a166f['config']['get']('ai.aws.requestParameters')||_0x5a166f['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']=_0x5a166f['config']['get']('ai.aws.apiUrl'),this['_bedrockClientConfig']=_0x5a166f['config']['get']('ai.aws.bedrockClientConfig'),this['_requestHeaders']=_0x5a166f['config']['get']('ai.aws.requestHeaders'),this['_requestParameters']=_0x5a166f['config']['get']('ai.aws.requestParameters');}async['sendRequest']({query:_0x29d7fa,context:_0x1bbb61,onData:_0x11d89b,actionId:_0x1ede9c}){const {model:_0x2edbc3,stream:_0xd2df99,..._0x34f9c5}=await this['_prepareRequestParameters'](this['_requestParameters'],_0x1ede9c),_0x47610d={'prompt':await this['preparePrompt'](_0x29d7fa,_0x1bbb61,_0x2edbc3,_0x1ede9c),..._0x34f9c5};this['_apiUrl']?await this['_processProxyRequest'](_0x47610d,_0x2edbc3,_0xd2df99,_0x11d89b,_0x1ede9c):await this['_processAWSRequest'](_0x47610d,_0x2edbc3,_0xd2df99,_0x11d89b);}async['preparePrompt'](_0x73e65,_0x248c45,_0xb89f0,_0x1f53e6){let _0x3ecafc,_0x8877d;return _0x248c45?(_0x3ecafc='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.',_0x8877d='Instruction:\x0a'+_0x73e65+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x248c45):(_0x3ecafc='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.',_0x8877d=_0x73e65),'meta.llama'==this['getModelFamily'](_0xb89f0)?'<<SYS>>\x0a'+_0x3ecafc+'\x0a<</SYS>>\x0a[INST]\x0a'+_0x8877d+'\x0a[/INST]':'Human:\x0a'+_0x3ecafc+'\x0a'+_0x8877d+'\x0a\x0aAssistant:';}['getModelFamily'](_0x561492){if(/^anthropic\.claude/['test'](_0x561492))return'anthropic.claude';if(/^ai21\.j2/['test'](_0x561492))return'ai21.j2';if(/^cohere\.command/['test'](_0x561492))return'cohere.command';if(/^meta\.llama/['test'](_0x561492))return'meta.llama';throw new R(i(this['editor']['locale'],'AI_ERROR_UNSUPPORTED_MODEL',_0x561492));}async['_processProxyRequest'](_0x563046,_0x52a7f9,_0x5c88f2,_0x1b636d,_0x280acc){const _0x549d68={'method':'POST','headers':await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x280acc),'body':JSON['stringify']({..._0x563046,'model':_0x52a7f9,'stream':_0x5c88f2}),'signal':this['abortController']['signal']},_0x33c90a=await fetch(this['_apiUrl'],_0x549d68);_0x5c88f2?await this['_readStreamableResponse'](_0x33c90a,_0x52a7f9,_0x1b636d):await this['_readStaticResponse'](_0x33c90a,_0x52a7f9,_0x1b636d);}async['_processAWSRequest'](_0x4b33bd,_0x536b6f,_0xddb77c,_0x4326c4){const _0x56ecf8=new _0x261cf3(this['_bedrockClientConfig']),_0x4bf9c1={'body':JSON['stringify'](_0x4b33bd),'contentType':'application/json','accept':'application/json','modelId':_0x536b6f};let _0x482542;if(_0xddb77c){const _0x4ca438=new _0x3a8fdc(_0x4bf9c1);_0x482542=await _0x56ecf8['send'](_0x4ca438,{'abortSignal':this['abortController']['signal']}),await this['_readAsyncIterableResponse'](_0x482542,_0x536b6f,_0x4326c4);}else{const _0xff13=new _0x343b6e(_0x4bf9c1);_0x482542=await _0x56ecf8['send'](_0xff13,{'abortSignal':this['abortController']['signal']}),await this['_readStaticResponse'](_0x482542,_0x536b6f,_0x4326c4);}}async['_readAsyncIterableResponse'](_0x354cc5,_0x504346,_0x2f59bf){const _0x31bc90=_0x354cc5['body'],_0x48461d=new TextDecoder('utf-8');let _0x335025='';for await(const _0x334f94 of _0x31bc90)if(_0x334f94['chunk']){const _0x23f09c=_0x48461d['decode'](_0x334f94['chunk']['bytes']),_0x26fa3c=JSON['parse'](_0x23f09c);_0x335025+=this['_getGeneratedText'](_0x26fa3c,_0x504346),_0x2f59bf(_0x335025);}return Promise['resolve']();}async['_readStreamableResponse'](_0x4a6b9b,_0x1553ee,_0x1a6c86){const _0x2ed237=_0x4a6b9b['body'],_0x5e5832=new TextDecoder('utf-8'),_0x5b9363=_0x2ed237['getReader']();let _0x431aed='',_0x4ec806='',_0x44cb49=!0x1;for(;!_0x44cb49;){const {done:_0x3d93d4,value:_0x3c3375}=await _0x5b9363['read']();if(_0x44cb49=_0x3d93d4,_0x44cb49)break;const _0x394cbb=(_0x431aed+_0x5e5832['decode'](_0x3c3375))['split']('\x0a')['map'](_0x4c1b94=>{try{return _0x431aed='',JSON['parse'](_0x4c1b94);}catch{return _0x431aed=_0x4c1b94,null;}})['filter'](_0xc1c837=>null!==_0xc1c837);_0x394cbb['length']&&(_0x4ec806+=_0x394cbb['map'](_0x322687=>this['_getGeneratedText'](_0x322687,_0x1553ee))['join'](''),_0x1a6c86(_0x4ec806));}return Promise['resolve']();}async['_readStaticResponse'](_0x1223b5,_0x2f6dfe,_0x2bad61){let _0x473d7b;return _0x473d7b=_0x1223b5 instanceof Response?await _0x1223b5['json']():JSON['parse'](new TextDecoder('utf-8')['decode'](_0x1223b5['body'])),(_0x2bad61(this['_getGeneratedText'](_0x473d7b,_0x2f6dfe)),Promise['resolve']());}['_getGeneratedText'](_0x46fa8f,_0x5d36d7){switch(this['getModelFamily'](_0x5d36d7)){case'anthropic.claude':return _0x46fa8f['completion'];case'ai21.j2':return _0x46fa8f['completions'][0x0]['data']['text'];case'cohere.command':return _0x46fa8f['generations'][0x0]['text'];case'meta.llama':return _0x46fa8f['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':_0x4d61e5=>0x1!=_0x4d61e5}};
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':_0x1b1360=>0x1!=_0x1b1360}};
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
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']||={});
23
+ (_0x21327b=>{const {af:{dictionary:_0x37bea4,getPluralForm:_0x1478f6}}={'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':_0x54e32b=>0x1!=_0x54e32b}};_0x21327b['af']||={'dictionary':{},'getPluralForm':null},_0x21327b['af']['dictionary']=Object['assign'](_0x21327b['af']['dictionary'],_0x37bea4),_0x21327b['af']['getPluralForm']=_0x1478f6;})(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':_0x57ca23=>0x0==_0x57ca23?0x0:0x1==_0x57ca23?0x1:0x2==_0x57ca23?0x2:_0x57ca23%0x64>=0x3&&_0x57ca23%0x64<=0xa?0x3:_0x57ca23%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':_0x210295=>0x0==_0x210295?0x0:0x1==_0x210295?0x1:0x2==_0x210295?0x2:_0x210295%0x64>=0x3&&_0x210295%0x64<=0xa?0x3:_0x210295%0x64>=0xb?0x4:0x5}};