@ckeditor/ckeditor5-ai 45.2.1-alpha.9 → 45.2.2
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.
- package/build/ai.js +1 -1
- package/dist/index.js +2 -2
- package/dist/translations/af.js +1 -1
- package/dist/translations/af.umd.js +1 -1
- package/dist/translations/ar.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/ast.js +1 -1
- package/dist/translations/ast.umd.js +1 -1
- package/dist/translations/az.js +1 -1
- package/dist/translations/az.umd.js +1 -1
- package/dist/translations/be.js +1 -1
- package/dist/translations/be.umd.js +1 -1
- package/dist/translations/bg.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/bs.js +1 -1
- package/dist/translations/bs.umd.js +1 -1
- package/dist/translations/ca.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.js +1 -1
- package/dist/translations/de-ch.umd.js +1 -1
- package/dist/translations/de.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en-gb.js +1 -1
- package/dist/translations/en-gb.umd.js +1 -1
- package/dist/translations/en.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.js +1 -1
- package/dist/translations/eo.umd.js +1 -1
- package/dist/translations/es-co.js +1 -1
- package/dist/translations/es-co.umd.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/eu.js +1 -1
- package/dist/translations/eu.umd.js +1 -1
- package/dist/translations/fa.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fi.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/gu.js +1 -1
- package/dist/translations/gu.umd.js +1 -1
- package/dist/translations/he.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/hy.js +1 -1
- package/dist/translations/hy.umd.js +1 -1
- package/dist/translations/id.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/jv.js +1 -1
- package/dist/translations/jv.umd.js +1 -1
- package/dist/translations/kk.js +1 -1
- package/dist/translations/kk.umd.js +1 -1
- package/dist/translations/km.js +1 -1
- package/dist/translations/km.umd.js +1 -1
- package/dist/translations/kn.js +1 -1
- package/dist/translations/kn.umd.js +1 -1
- package/dist/translations/ko.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/ku.js +1 -1
- package/dist/translations/ku.umd.js +1 -1
- package/dist/translations/lt.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nb.js +1 -1
- package/dist/translations/nb.umd.js +1 -1
- package/dist/translations/ne.js +1 -1
- package/dist/translations/ne.umd.js +1 -1
- package/dist/translations/nl.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/oc.js +1 -1
- package/dist/translations/oc.umd.js +1 -1
- package/dist/translations/pl.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/si.js +1 -1
- package/dist/translations/si.umd.js +1 -1
- package/dist/translations/sk.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.js +1 -1
- package/dist/translations/sl.umd.js +1 -1
- package/dist/translations/sq.js +1 -1
- package/dist/translations/sq.umd.js +1 -1
- package/dist/translations/sr-latn.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/ti.js +1 -1
- package/dist/translations/ti.umd.js +1 -1
- package/dist/translations/tk.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.js +1 -1
- package/dist/translations/tt.umd.js +1 -1
- package/dist/translations/ug.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/ur.js +1 -1
- package/dist/translations/ur.umd.js +1 -1
- package/dist/translations/uz.js +1 -1
- package/dist/translations/uz.umd.js +1 -1
- package/dist/translations/vi.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.js +1 -1
- package/dist/translations/zh.umd.js +1 -1
- package/package.json +9 -9
- package/src/adapters/aiadapter.js +1 -1
- package/src/adapters/aitextadapter.js +1 -1
- package/src/adapters/awstextadapter.js +1 -1
- package/src/adapters/openaitextadapter.js +1 -1
- package/src/aiassistant.js +1 -1
- package/src/aiassistantediting.js +1 -1
- package/src/aiassistantui.js +1 -1
- package/src/index.js +1 -1
- package/src/legacyerrors.js +1 -1
- package/src/ui/aiassistantcontroller.js +2 -2
- package/src/ui/form/aiformcontentarea.js +1 -1
- package/src/ui/form/aiformerrorview.js +1 -1
- package/src/ui/form/aiformpromptview.js +1 -1
- package/src/ui/form/aiformtoolbarview.js +1 -1
- package/src/ui/form/aiformview.js +1 -1
- package/src/ui/form/aihistorylistitemview.js +1 -1
- package/src/ui/form/aihistorylistview.js +1 -1
- package/src/ui/form/prompthistory.js +1 -1
- package/src/ui/showaiassistantcommand.js +1 -1
- package/src/utils/common-translations.js +1 -1
- package/src/utils/normalizecommandsconfig.js +1 -1
package/dist/index.js
CHANGED
|
@@ -20,5 +20,5 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as _0x21cda4,Command as _0x3f25bd}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconCopy as _0x2e6853,IconCheck as _0x83c214,IconError as tt,IconSubmit as ht,IconHistory as et,IconMagicWand as _0xafb348,IconRobotPencil as _0x30a012}from'@ckeditor/ckeditor5-icons/dist/index.js';import{uid as _0x203131,CKEditorError as _0x4f8769,ObservableMixin as _0x371884,global as _0x23e469,isVisible as ot,Rect as it,Collection as _0x4996bc,FocusTracker as mt,KeystrokeHandler as ut,first as _0x2abc6a}from'@ckeditor/ckeditor5-utils/dist/index.js';import{ToolbarView as at,ButtonView as _0x4d1286,View as _0x14fb67,SpinnerView as _0x47374c,IconView as rt,AutocompleteView as nt,ListView as Ct,ListItemGroupView as Ht,ListItemView as xt,ButtonLabelView as kt,FocusCycler as pt,createLabeledTextarea as dt,Dialog as _0x4604ae,createDropdown as _0x464473,addMenuToDropdown as _0x16bd78,MenuBarMenuView as _0x37e0bb,MenuBarMenuListItemButtonView as _0x296cb0,DialogViewPosition as _0x474448,MenuBarMenuListView as _0x11ae37,MenuBarMenuListItemView as _0x130694}from'@ckeditor/ckeditor5-ui/dist/index.js';import{ClipboardPipeline as _0x1cad4b,ClipboardMarkersUtils as _0x338528}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{DomEventData as _0x413423,DataTransfer as _0x3b504d,UpcastWriter as _0x21ff82,Matcher as _0x4a81f1}from'@ckeditor/ckeditor5-engine/dist/index.js';import{unescape as jt,escape as yt}from'es-toolkit/compat';import{BedrockRuntimeClient as _0x5ba1a0,InvokeModelWithResponseStreamCommand as _0x4d12b3,InvokeModelCommand as _0x3f1736}from'@aws-sdk/client-bedrock-runtime';const x='_ungrouppedCommands';function o(_0x15eea1,_0x3f2937){const _0x1e18d4=(0x0,_0x3f2937['t'])('Other');return _0x15eea1['length']?'groupId'in _0x15eea1[0x0]?_0x15eea1:[{'groupId':x,'groupLabel':_0x1e18d4,'order':0x1/0x0,'commands':_0x15eea1}]:[{'groupId':x,'groupLabel':_0x1e18d4,'order':0x1/0x0,'commands':[]}];}const gt=globalThis['DataTransfer'],f='ai-ui';class a extends _0x21cda4{static get['pluginName'](){return'AIAssistantEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x4984bb}=this,_0x4b10e7=['ck-fake-ai-selection'];_0x4984bb['config']['get']('ai.useTheme')&&_0x4b10e7['push']('ck-ai-assistant-ui_theme'),_0x4984bb['conversion']['for']('editingDowncast')['markerToHighlight']({'model':f,'view':{'classes':_0x4b10e7,'priority':0xc}}),_0x4984bb['conversion']['for']('editingDowncast')['markerToElement']({'model':f,'view':(_0xd66fd5,{writer:_0x1cbcdd})=>{if(!_0xd66fd5['markerRange']['isCollapsed'])return null;const _0x42b2e5=_0x1cbcdd['createUIElement']('span');return _0x1cbcdd['addClass'](['ck-fake-ai-selection','ck-fake-ai-selection_collapsed'],_0x42b2e5),_0x42b2e5;}});}['afterInit'](){!async function(_0x4b8f32){const _0xca57bf=_0x383644([0x69,0x4d,0x59,0x6a,0x79,0x78,0x56,0x48,0x72,0x58,0x4c,0x31,0x6c,0x43,0x61,0x67,0x6b,0x41,0x49,0x47,0x38,0x4b,0x71,0x6f,0x73,0x76,0x63,0x66,0x65,0x33,0x74,0x68,0x34,0x30,0x50,0x32,0x51,0x45,0x36,0x70,0x57,0x37,0x35,0x6d,0x77,0x4e,0x42,0x53,0x62,0x5a,0x44,0x6e,0x46,0x54,0x39,0x4f,0x4a,0x52,0x75,0x55,0x7a,0x64]),_0x3ed0ac=0x6e00b1c7,_0xa931ef=0x6e07da57^_0x3ed0ac,_0x510c44=window[_0x383644([0x44,0x61,0x74,0x65])][_0x383644([0x6e,0x6f,0x77])](),_0x4bd534=_0x4b8f32[_0x383644([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x1a4db0=new window[(_0x383644([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3c929=>{_0x4bd534[_0x383644([0x6f,0x6e,0x63,0x65])](_0x383644([0x72,0x65,0x61,0x64,0x79]),_0x3c929);}),_0x3697e9={[_0x383644([0x6b,0x74,0x79])]:_0x383644([0x45,0x43]),[_0x383644([0x75,0x73,0x65])]:_0x383644([0x73,0x69,0x67]),[_0x383644([0x63,0x72,0x76])]:_0x383644([0x50,0x2d,0x32,0x35,0x36]),[_0x383644([0x78])]:_0x383644([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]),[_0x383644([0x79])]:_0x383644([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]),[_0x383644([0x61,0x6c,0x67])]:_0x383644([0x45,0x53,0x32,0x35,0x36])},_0x230983=_0x4bd534[_0x383644([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x383644([0x67,0x65,0x74])](_0x383644([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x393cdc(){let _0x58d214,_0x26b109=null,_0x48c2ef=null;try{if(_0x230983==_0x383644([0x47,0x50,0x4c]))return _0x383644([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x58d214=_0x391ac7(),!_0x58d214)return _0x383644([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x58d214[_0x383644([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x48c2ef=_0x5120f0(_0x58d214[_0x383644([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x58d214[_0x383644([0x6a,0x74,0x69])])),await _0x3b5588()?_0x88becf()?_0x1d0884()?_0x383644([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x347e04()?(_0x58d214[_0x383644([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x383644([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x26b109=_0x36b08e(_0x383644([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x58d214[_0x383644([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x383644([0x74,0x72,0x69,0x61,0x6c])&&(_0x26b109=_0x36b08e(_0x383644([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x115479()):_0x383644([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x383644([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x383644([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x383644([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x1d0884(){const _0x485bca=[_0x383644([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x383644([0x74,0x72,0x69,0x61,0x6c])][_0x383644([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x58d214[_0x383644([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x510c44/0x3e8:0xe10*_0xa931ef;return _0x58d214[_0x383644([0x65,0x78,0x70])]<_0x485bca;}function _0x88becf(){const _0x5c084d=_0x58d214[_0x383644([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x5c084d&&(!!_0x5c084d[_0x383644([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x383644([0x2a]))||!!_0x5c084d[_0x383644([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x383644([0x41,0x49])));}function _0x347e04(){const _0x1d6939=_0x58d214[_0x383644([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x1d6939||0x0==_0x1d6939[_0x383644([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x3204e2}=new URL(window[_0x383644([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x1d6939[_0x383644([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3204e2))return!0x0;const _0xf99a1f=_0x3204e2[_0x383644([0x73,0x70,0x6c,0x69,0x74])](_0x383644([0x2e]));return _0x1d6939[_0x383644([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x5b42ad=>_0x5b42ad[_0x383644([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x383644([0x2a])))[_0x383644([0x6d,0x61,0x70])](_0x139732=>_0x139732[_0x383644([0x73,0x70,0x6c,0x69,0x74])](_0x383644([0x2e])))[_0x383644([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x133a97=>_0x133a97[_0x383644([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0xf99a1f[_0x383644([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x383644([0x6d,0x61,0x70])](_0x5b8a7a=>Array(_0xf99a1f[_0x383644([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x5b8a7a[_0x383644([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x383644([0x66,0x69,0x6c,0x6c])](_0x5b8a7a[0x0]===_0x383644([0x2a])?_0x383644([0x2a]):'')[_0x383644([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x5b8a7a))[_0x383644([0x73,0x6f,0x6d,0x65])](_0x181e98=>_0xf99a1f[_0x383644([0x65,0x76,0x65,0x72,0x79])]((_0x5e762e,_0x394c0c)=>_0x181e98[_0x394c0c]===_0x5e762e||_0x181e98[_0x394c0c]===_0x383644([0x2a])));}function _0x115479(){return _0x26b109&&_0x48c2ef?new window[(_0x383644([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4a3cfa,_0x39c27a)=>{_0x26b109[_0x383644([0x74,0x68,0x65,0x6e])](_0x4a3cfa,_0x39c27a),_0x48c2ef[_0x383644([0x74,0x68,0x65,0x6e])](_0x3964ad=>{_0x3964ad!=_0x383644([0x56,0x61,0x6c,0x69,0x64])&&_0x4a3cfa(_0x3964ad);},_0x39c27a);}):_0x26b109||_0x48c2ef||_0x383644([0x56,0x61,0x6c,0x69,0x64]);}}function _0x5120f0(_0x49c57b,_0x3ea86e){return new window[(_0x383644([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xaa458f=>{if(_0x575a6c())return _0xaa458f(_0x383644([0x56,0x61,0x6c,0x69,0x64]));_0x7f17e2(),_0x4bd534[_0x383644([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x383644([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x3e6a23=!0x1;const _0x1d5566=_0x203131();function _0x504ce5(_0x4f5e3f){return!!_0x4f5e3f&&(typeof _0x4f5e3f===_0x383644([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x4f5e3f===_0x383644([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x4f5e3f[_0x383644([0x74,0x68,0x65,0x6e])]===_0x383644([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x4f5e3f[_0x383644([0x63,0x61,0x74,0x63,0x68])]===_0x383644([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x7f6a9e(_0x2a0fe0){_0x1d0071(_0x2a0fe0)[_0x383644([0x74,0x68,0x65,0x6e])](_0x441f62=>{if(!_0x441f62||_0x441f62[_0x383644([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x383644([0x6f,0x6b]))return _0x383644([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0xf83a13(_0x9430a8(_0x1d5566+_0x3ea86e))!=_0x441f62[_0x383644([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x383644([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x383644([0x56,0x61,0x6c,0x69,0x64]);})[_0x383644([0x74,0x68,0x65,0x6e])](_0x6cb673=>(_0x4af454(),_0x6cb673),()=>{const _0x5610b7=_0x1b61a0();return null==_0x5610b7?(_0x4af454(),_0x383644([0x56,0x61,0x6c,0x69,0x64])):_0x383644(_0x510c44-_0x5610b7>(0x4a0c35c7^_0x3ed0ac)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x383644([0x74,0x68,0x65,0x6e])](_0xaa458f)[_0x383644([0x63,0x61,0x74,0x63,0x68])](()=>{_0xaa458f(_0x383644([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x56f0ba=0x6e365f47^_0x3ed0ac;function _0x4af454(){const _0x5881e9=_0x383644([0x6c,0x6c,0x63,0x74,0x2d])+_0xf83a13(_0x9430a8(_0x49c57b)),_0xb1b031=_0x4360c5(_0xf83a13(window[_0x383644([0x4d,0x61,0x74,0x68])][_0x383644([0x63,0x65,0x69,0x6c])](_0x510c44/_0x56f0ba)));window[_0x383644([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x383644([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5881e9,_0xb1b031);}function _0x1b61a0(){const _0xc9aa3b=_0x383644([0x6c,0x6c,0x63,0x74,0x2d])+_0xf83a13(_0x9430a8(_0x49c57b)),_0x74d032=window[_0x383644([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x383644([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0xc9aa3b);return _0x74d032?window[_0x383644([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4360c5(_0x74d032),0x10)*_0x56f0ba:null;}function _0x1d0071(_0x2932dc){return new window[(_0x383644([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x26178c,_0xa81f50)=>{_0x2932dc[_0x383644([0x74,0x68,0x65,0x6e])](_0x26178c,_0xa81f50),window[_0x383644([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0xa81f50,0x6e016507^_0x3ed0ac);});}}_0x4bd534[_0x383644([0x6f,0x6e])](_0x383644([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x5e3599,_0x30997f)=>{if(_0x30997f[0x0]!=_0x49c57b)return _0xaa458f(_0x383644([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x30997f[0x1]={..._0x30997f[0x1],[_0x383644([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x1d5566};},{[_0x383644([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x383644([0x68,0x69,0x67,0x68])}),_0x4bd534[_0x383644([0x6f,0x6e])](_0x383644([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x34cc99=>{_0x504ce5(_0x34cc99[_0x383644([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x3e6a23=!0x0,_0x7f6a9e(_0x34cc99[_0x383644([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x383644([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x383644([0x6c,0x6f,0x77])}),_0x1a4db0[_0x383644([0x74,0x68,0x65,0x6e])](()=>{_0x3e6a23||_0xaa458f(_0x383644([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x575a6c(){return _0x4bd534[_0x383644([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x383644([0x76,0x69,0x65,0x77])][_0x383644([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x383644([0x61,0x75,0x74,0x6f]);}function _0x7f17e2(){_0x4bd534[_0x383644([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x383644([0x76,0x69,0x65,0x77])][_0x383644([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x383644([0x61,0x75,0x74,0x6f]);}}function _0x36b08e(_0xb1251){const _0x364b7a=[new window[(_0x383644([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3b0b8e=>setTimeout(_0x3b0b8e,0x6e098f0b^_0x3ed0ac)),_0x1a4db0[_0x383644([0x74,0x68,0x65,0x6e])](()=>new window[(_0x383644([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5c9119=>{let _0x146c0c=0x0;_0x4bd534[_0x383644([0x6d,0x6f,0x64,0x65,0x6c])][_0x383644([0x6f,0x6e])](_0x383644([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x29517c,_0x1cef8b)=>{_0x1cef8b[0x0][_0x383644([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x146c0c++,_0x146c0c==(0x6e00b03f^_0x3ed0ac)&&(_0x5c9119(),_0x29517c[_0x383644([0x6f,0x66,0x66])]());});}))];return window[_0x383644([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x383644([0x72,0x61,0x63,0x65])](_0x364b7a)[_0x383644([0x74,0x68,0x65,0x6e])](()=>_0xb1251);}async function _0x12a696(){await _0x1a4db0,_0x4bd534[_0x383644([0x6d,0x6f,0x64,0x65,0x6c])][_0x383644([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x214427,_0x4bd534[_0x383644([0x6d,0x6f,0x64,0x65,0x6c])][_0x383644([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x214427,_0x4bd534[_0x383644([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x383644([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x405b67(_0x10ac96){const _0x500025=_0x24be8a();_0x4bd534[_0x500025]=_0x383644([0x61,0x69,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x10ac96,_0x10ac96!=_0x383644([0x56,0x61,0x6c,0x69,0x64])&&_0x12a696();}function _0x24be8a(){const _0x548952=window[_0x383644([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x383644([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x383644([0x6e,0x6f,0x77])]())[_0x383644([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x383644([0x2e]),'');let _0x50f2b2=_0x383644([0x69]);for(let _0x356358=0x0;_0x356358<_0x548952[_0x383644([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x356358+=0x2){let _0x4f22fc=window[_0x383644([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x548952[_0x383644([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x356358,_0x356358+0x2));_0x4f22fc>=_0xca57bf[_0x383644([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x4f22fc-=_0xca57bf[_0x383644([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x50f2b2+=_0xca57bf[_0x4f22fc];}return _0x50f2b2;}function _0x391ac7(){const _0x13130f=_0x230983[_0x383644([0x73,0x70,0x6c,0x69,0x74])](_0x383644([0x2e]));if(0x3!=_0x13130f[_0x383644([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x53b428(_0x13130f[0x1]);function _0x53b428(_0x1eddcd){const _0x664ea9=_0x1ec962(_0x1eddcd);return _0x664ea9&&_0x33297b()?_0x664ea9:null;function _0x33297b(){const _0x506c28=_0x664ea9[_0x383644([0x6a,0x74,0x69])],_0x49c816=window[_0x383644([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x506c28[_0x383644([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x506c28[_0x383644([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x1cf998={..._0x664ea9,[_0x383644([0x6a,0x74,0x69])]:_0x506c28[_0x383644([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x506c28[_0x383644([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x1cf998[_0x383644([0x76,0x63])],_0x9430a8(_0x1cf998)==_0x49c816;}}}async function _0x3b5588(){let _0x40d55f=!0x0;try{const _0x23c285=_0x230983[_0x383644([0x73,0x70,0x6c,0x69,0x74])](_0x383644([0x2e])),[_0x253d91,_0x59b512,_0x499175]=_0x23c285;return _0x10dd28(_0x253d91),await _0x2f8484(_0x253d91,_0x59b512,_0x499175),_0x40d55f;}catch{return!0x1;}function _0x10dd28(_0x25b57b){const _0x5d4c48=_0x1ec962(_0x25b57b);_0x5d4c48&&_0x5d4c48[_0x383644([0x61,0x6c,0x67])]==_0x383644([0x45,0x53,0x32,0x35,0x36])||(_0x40d55f=!0x1);}async function _0x2f8484(_0x18e254,_0xb263ca,_0xdd9e3){const _0x557bc9=window[_0x383644([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x383644([0x66,0x72,0x6f,0x6d])](_0x47d1ed(_0xdd9e3),_0x27cdcd=>_0x27cdcd[_0x383644([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x4d97a3=new window[(_0x383644([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x383644([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x18e254+_0x383644([0x2e])+_0xb263ca),_0x5760e4=window[_0x383644([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x383644([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x5760e4)return;const _0x33dc71=await _0x5760e4[_0x383644([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x383644([0x6a,0x77,0x6b]),_0x3697e9,{[_0x383644([0x6e,0x61,0x6d,0x65])]:_0x383644([0x45,0x43,0x44,0x53,0x41]),[_0x383644([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x383644([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x383644([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x5760e4[_0x383644([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x383644([0x6e,0x61,0x6d,0x65])]:_0x383644([0x45,0x43,0x44,0x53,0x41]),[_0x383644([0x68,0x61,0x73,0x68])]:{[_0x383644([0x6e,0x61,0x6d,0x65])]:_0x383644([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x33dc71,_0x557bc9,_0x4d97a3)||(_0x40d55f=!0x1);}}function _0x1ec962(_0x1e04be){return _0x1e04be[_0x383644([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x383644([0x65,0x79]))?JSON[_0x383644([0x70,0x61,0x72,0x73,0x65])](_0x47d1ed(_0x1e04be)):null;}function _0x47d1ed(_0x181370){return window[_0x383644([0x61,0x74,0x6f,0x62])](_0x181370[_0x383644([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x383644([0x2b]))[_0x383644([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x383644([0x2f])));}function _0x9430a8(_0x4e57bc){let _0x22405e=0x1505;function _0x5908ea(_0xabfcaa){for(let _0x52d778=0x0;_0x52d778<_0xabfcaa[_0x383644([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x52d778++){const _0xdafd7=_0xabfcaa[_0x383644([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x52d778);_0x22405e=(_0x22405e<<0x5)+_0x22405e+_0xdafd7,_0x22405e&=_0x22405e;}}function _0x386d09(_0x4a551){Array[_0x383644([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x4a551)?_0x4a551[_0x383644([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x386d09):_0x4a551&&typeof _0x4a551==_0x383644([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x383644([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x4a551)[_0x383644([0x73,0x6f,0x72,0x74])]()[_0x383644([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x12faab,_0x38ac94])=>{_0x5908ea(_0x12faab),_0x386d09(_0x38ac94);}):_0x5908ea(window[_0x383644([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x4a551));}return _0x386d09(_0x4e57bc),_0x22405e>>>0x0;}function _0xf83a13(_0xcd4bf5){return _0xcd4bf5[_0x383644([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x383644([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x383644([0x30]));}function _0x4360c5(_0x7f5d9){return _0x7f5d9[_0x383644([0x73,0x70,0x6c,0x69,0x74])]('')[_0x383644([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x383644([0x6a,0x6f,0x69,0x6e])]('');}function _0x214427(){}function _0x383644(_0x1ad3bb){return _0x1ad3bb['map'](_0x3cbcdb=>String['fromCharCode'](_0x3cbcdb))['join']('');}_0x405b67(await _0x393cdc());}(this);}['showFakeVisualSelection'](){const _0x43327b=this['editor']['model'];_0x43327b['change'](_0x6ec290=>{const _0x2c7132=_0x43327b['document']['selection']['getRanges']();let _0x5c9d3e=0x0;for(const _0x54f566 of _0x2c7132){const _0x3823ab=f+':'+_0x5c9d3e;if(_0x43327b['markers']['has'](_0x3823ab))_0x6ec290['updateMarker'](_0x3823ab,{'range':_0x54f566});else{if(_0x54f566['start']['isAtEnd']){const _0x15b691=_0x54f566['start']['getLastMatchingPosition'](({item:_0xb4c4d2})=>!_0x43327b['schema']['isContent'](_0xb4c4d2),{'boundaries':_0x54f566});_0x6ec290['addMarker'](_0x3823ab,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x6ec290['createRange'](_0x15b691,_0x54f566['end'])});}else _0x6ec290['addMarker'](_0x3823ab,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x54f566});}_0x5c9d3e++;}});}['hideFakeVisualSelection'](){const _0x365048=this['editor']['model'],_0x56b255=Array['from'](this['editor']['model']['markers']['getMarkersGroup'](f));_0x56b255['length']&&_0x365048['change'](_0x52367b=>{_0x56b255['forEach'](_0xc6c559=>{_0x52367b['removeMarker'](_0xc6c559);});});}['insertContent'](_0x163774,_0x3bb6b4){const _0xe5643c=this['_getAISelection'](),_0x42636c=_0x3bb6b4||_0xe5643c['getFirstRange']();this['editor']['model']['canEditAt'](_0x42636c)&&this['editor']['model']['change'](_0x6ee63e=>{this['hideFakeVisualSelection'](),_0x3bb6b4||this['_resetContentOfSelectedTableCells'](_0x6ee63e,_0xe5643c),this['_pasteHTMLUsingClipboard']({'insertAt':_0x42636c,'writer':_0x6ee63e,'html':_0x163774});});}['insertContentBelow'](_0xf0b9e3){const {model:_0x39bde7}=this['editor'],_0x34d9da=this['_getAISelection']();_0x39bde7['change'](()=>{const _0x3ab0eb=this['_prepareTableInsertBelowPosition'](_0xf0b9e3,_0x34d9da)||this['_getDefaultInsertBelowPosition'](_0x34d9da);this['insertContent'](_0xf0b9e3,_0x3ab0eb);});}['_getAISelection'](){const _0x2b25ac=this['editor']['model'],_0x2a30bf=Array['from'](_0x2b25ac['markers']['getMarkersGroup'](f))['map'](_0x5eb0a6=>_0x5eb0a6['getRange']());return _0x2b25ac['createSelection'](_0x2a30bf);}['_pasteHTMLUsingClipboard']({writer:_0x34af07,html:_0x403e5a,insertAt:_0x4495cc}){const {view:_0xedd5b6}=this['editor']['editing'],_0x2f3100=this['editor']['plugins']['get'](_0x1cad4b),_0xde07c6=new gt();_0xde07c6['setData']('text/html',_0x403e5a);const _0x3e916c=new ClipboardEvent('paste',{'clipboardData':_0xde07c6}),_0x29ec9f=new _0x413423(_0xedd5b6,_0x3e916c,{'dataTransfer':new _0x3b504d(_0xde07c6)});_0x34af07['setSelection'](_0x4495cc);const _0x4ed799=(_0x42f0a9,_0x5e2ac7)=>{_0x5e2ac7['resultRange']&&_0x34af07['setSelection'](_0x5e2ac7['resultRange']);};_0x2f3100['once']('contentInsertion',_0x4ed799,{'priority':'lowest'}),_0xedd5b6['document']['fire']('paste',_0x29ec9f),_0x2f3100['off']('contentInsertion',_0x4ed799);}['_getDefaultInsertBelowPosition'](_0x1291f0){const {model:_0x57fa3d}=this['editor'],_0x6a8296=Array['from'](_0x1291f0['getSelectedBlocks']());return _0x6a8296['length']?_0x57fa3d['createPositionAfter'](_0x6a8296['pop']()):_0x1291f0['getLastPosition']();}['_prepareTableInsertBelowPosition'](_0x2a6a49,_0x4ee7d5){const {model:_0x401bd8,plugins:_0x59303a}=this['editor'];if(_0x59303a['has']('TableUtils')){const _0x8f875=_0x59303a['get']('TableUtils')['getSelectedTableCells'](_0x4ee7d5);if(_0x8f875['length']){const _0xfb7074=this['_getTableRowCountFromContent'](_0x2a6a49),_0x2175e2=this['_createEmptyTableRows'](_0x8f875,_0xfb7074);return _0x401bd8['createPositionAt'](_0x2175e2,0x0);}}return null;}['_getTableRowCountFromContent'](_0x27e64d){const _0x3b5331=this['editor']['plugins']['get']('TableUtils'),_0x72a82e=this['editor']['data']['parse'](_0x27e64d),_0x4a8cc9=Array['from'](_0x72a82e['getChildren']())['filter'](_0x2fee29=>_0x2fee29['is']('element','table'));let _0x17f21f=0x0;return _0x4a8cc9['forEach'](_0x4556fb=>{_0x17f21f+=_0x3b5331['getRows'](_0x4556fb);}),_0x17f21f;}['_createEmptyTableRows'](_0x59c9af,_0x41d645){const _0x2727ce=this['editor']['plugins']['get']('TableUtils'),_0xac310c=_0x2727ce['getRowIndexes'](_0x59c9af),_0x438955=_0x2727ce['getColumnIndexes'](_0x59c9af),_0x2854fe=_0xac310c['last']+0x1,_0x3def2f=_0x438955['first'],_0x37832e=_0x59c9af[0x0]['findAncestor']('table');for(let _0x1399d7=0x0;_0x1399d7<_0x41d645;_0x1399d7++)_0x2727ce['insertRows'](_0x37832e,{'at':_0x2854fe});return _0x37832e['getChild'](_0x2854fe)['getChild'](_0x3def2f);}['_resetContentOfSelectedTableCells'](_0x5e6c8d,_0x266b24){const {plugins:_0x1a0e6f}=this['editor'],{model:_0x5027eb}=_0x5e6c8d;if(!_0x1a0e6f['has']('TableUtils'))return;_0x1a0e6f['get']('TableUtils')['getSelectedTableCells'](_0x266b24)['length']&&_0x5027eb['deleteContent'](_0x266b24);}}class E extends _0x21cda4{static get['pluginName'](){return'AIAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['afterInit'](){if(!this['textAdapter'])throw new _0x4f8769('aiadapter-text-adapter-not-set',null);}}class R extends Error{constructor(_0x10935d){super(_0x10935d),this['name']='AIRequestError';}}function i(_0x56c111,_0x4fd565,_0x23739a){const t=_0x56c111['t'];switch(_0x4fd565){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',_0x23739a);case'Error\x20during\x20AI\x20content\x20generation:\x20%0':return t('Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x23739a);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'},_0x23739a);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 _0x4fd565;}}class j extends _0x3f25bd{['_commandDefinitions'];constructor(_0xf33f89,_0x4580ff){super(_0xf33f89),this['_commandDefinitions']=_0x4580ff,this['set']('enabledCommandsIds',[]),this['on']('change:_hasContext',(_0x1ffc05,_0x1be177,_0xdbd448)=>{this['isEnabled']&&(this['enabledCommandsIds']=G(this['_commandDefinitions'],_0xdbd448));}),this['set']('_hasContext',!0x1),this['on']('change:isEnabled',(_0x5b3aee,_0x5f12b1,_0x148c7a)=>{this['enabledCommandsIds']=_0x148c7a?G(this['_commandDefinitions'],this['_hasContext']):[];});}['refresh'](){const _0x26f971=this['editor']['model'];this['_hasContext']=function(_0xcaff59){const _0x287514=_0xcaff59['document']['selection'];return _0x287514['isCollapsed']?0x0!==[..._0x287514['getSelectedBlocks']()]['length']&&![..._0x287514['getSelectedBlocks']()][0x0]['isEmpty']:!!_0xcaff59['hasContent'](_0x287514['getFirstRange']());}(_0x26f971);const _0x49064a=_0x26f971['document']['selection'],_0x52a46e=this['editor']['config']['get']('ai.aiAssistant.disabledElements');for(const _0x59f1a4 of _0x49064a['getRanges']())for(const _0x35055f of _0x59f1a4['getItems']())if(_0x35055f['is']('element')&&_0x52a46e['includes'](_0x35055f['name']))return void(this['isEnabled']=!0x1);this['isEnabled']=!0x0;}['execute'](_0xeb2e20='',_0x463608='',_0x50ae6e='custom'){this['editor']['plugins']['get'](n)['showUI'](_0xeb2e20,_0x463608,_0x50ae6e);}}function G(_0x41f1d4,_0x5f360b){const _0x45bb06=new Set();for(const _0x49a57d of _0x41f1d4['values']())(_0x5f360b||!0x1===_0x49a57d['requiresContent'])&&_0x45bb06['add'](_0x49a57d['id']);return Array['from'](_0x45bb06);}const Z=new RegExp(/^(.*?)<[a-zA-Z][a-zA-Z0-9_\-.]*[ >]/,'is');class k extends/* #__PURE__ -- @preserve */
|
|
24
|
-
_0x371884(){['editor'];['textAdapter'];['view'];['_sanitizationContainer'];['_domParser'];['_xmlSerializer'];constructor(_0x1244b0,_0x1449f8,_0x23bc51){super(),this['editor']=_0x1244b0,this['textAdapter']=_0x1449f8,this['_sanitizationContainer']=document['createElement']('div'),this['_domParser']=new DOMParser(),this['_xmlSerializer']=new XMLSerializer(),this['view']=_0x23bc51,this['set']({'initialContext':'','currentContext':'','currentResponse':'','previousContext':void 0x0,'previousQuery':void 0x0,'previousLabel':void 0x0,'isProcessing':!0x1}),this['on']('set:currentContext',(_0x2c14db,_0x21f54f,_0x239f2e)=>{this['view']['value']=this['_sanitizeHTML'](_0x239f2e);}),this['listenTo'](this['view'],'submitPrompt',(_0x3fb803,_0x2dca61)=>{const _0x5d8ba7=this['currentContext']||this['initialContext'];this['_handleQuery'](_0x2dca61,_0x5d8ba7,'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:_0x4819cd,query:_0x436f8f,htmlContent:_0x36f7d8,label:_0x45bf1f,mainActionLabel:_0x507ede}){this['view']['prompt']=_0x45bf1f,this['view']['mainAction']=_0x507ede,this['initialContext']=_0x36f7d8,_0x436f8f&&(this['view']['isRendered']?this['_handleQuery'](_0x436f8f,_0x36f7d8,_0x4819cd,_0x45bf1f):this['view']['once']('render',()=>{this['_handleQuery'](_0x436f8f,_0x36f7d8,_0x4819cd,_0x45bf1f);}));}['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'](_0x1c9028,_0x51e09f,_0x5824dc,_0x4f7379){return this['isProcessing']=!0x0,this['view']['startProcessing'](),this['previousContext']=_0x51e09f,this['previousQuery']=_0x1c9028,this['previousLabel']=_0x4f7379||_0x1c9028,this['previousActionId']=_0x5824dc,new Promise(_0x4124bf=>{this['textAdapter']['makeRequest']({'query':_0x1c9028,'context':_0x51e09f,'onData':_0xfd657f=>{this['currentResponse']=_0xfd657f,this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse']);},'actionId':_0x5824dc})['then'](()=>{!this['currentContext']&&this['currentResponse']&&(this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse'],!0x0));})['catch'](_0x33bb8d=>{_0x33bb8d instanceof R?this['view']['handleError'](_0x33bb8d['message']):this['view']['handleError'](),_0x4124bf();})['finally'](()=>{this['stopProcessing'](),_0x4124bf();});});}['_parseAndNormalizeContent'](_0x2808f3,_0x29f277=!0x1){const _0x537a8b=Z['exec'](_0x2808f3);_0x2808f3=_0x537a8b?_0x2808f3['substring'](_0x537a8b[0x1]['length']):_0x2808f3['length']<0x64&&!_0x29f277?'':this['_stripMarkdownSyntax'](_0x2808f3);const _0x396410=this['_domParser']['parseFromString'](_0x2808f3,'text/html');if(_0x537a8b){const _0x317b81=Array['from'](_0x396410['body']['childNodes']);_0x317b81['reverse']();for(const _0x47ea1f of _0x317b81){if(_0x47ea1f['nodeType']==Node['ELEMENT_NODE'])break;_0x47ea1f['remove']();}}const _0x1dac08=this['editor']['data']['processor']['toView'](this['_xmlSerializer']['serializeToString'](_0x396410['body']));this['_isH1TagSupportEnabled']()||this['_normalizeResponseHeadings'](_0x1dac08);const _0x350be3=this['editor']['config']['get']('ai.aiAssistant.preserveComments'),_0x319ee5=this['editor']['data']['toModel'](_0x1dac08);return _0x350be3||_0x319ee5['markers']['clear'](),this['editor']['data']['stringify'](_0x319ee5);}['_normalizeResponseHeadings'](_0x1b5637){const _0x5ae91e=new _0x21ff82(this['editor']['editing']['view']['document']),_0x37574e=new _0x4a81f1({'name':/^h[1-5]$/}),_0x242d4d=[];let _0x119681=!0x1;for(const _0x3eb3bc of _0x1b5637)_0x3eb3bc['is']('element')&&_0x37574e['match'](_0x3eb3bc)&&(_0x242d4d['push'](_0x3eb3bc),'h1'==_0x3eb3bc['name']&&(_0x119681=!0x0));if(_0x119681){for(const _0x107e8f of _0x242d4d)_0x5ae91e['rename']('h'+(parseInt(_0x107e8f['name'][0x1])+0x1),_0x107e8f);}}['_isH1TagSupportEnabled'](){const {data:_0x4322a5,editing:_0x369856}=this['editor'],_0x2c91a9=_0x4322a5['htmlProcessor']['toView']('<h1></h1>'),_0x33207e=_0x4322a5['toView'](_0x4322a5['toModel'](_0x2c91a9));return!!_0x369856['view']['domConverter']['viewToDom'](_0x33207e)['querySelector']('h1');}['_sanitizeHTML'](_0x56dd94){return this['editor']['editing']['view']['domConverter']['setContentOf'](this['_sanitizationContainer'],_0x56dd94),this['_sanitizationContainer']['innerHTML'];}['_stripMarkdownSyntax'](_0x39bed3){const _0x147ce7=_0x39bed3['trim']();return _0x147ce7['startsWith']('```html')?_0x147ce7['endsWith']('```')?_0x147ce7['substring'](0x7,_0x147ce7['length']-0x3):_0x147ce7['substring'](0x7):_0x39bed3;}}const M={'REPLACE':'replace','INSERT':'insert'};class lt extends at{constructor(_0x126c01){super(_0x126c01),this['set']('isVisible',!0x1),this['set']('mainAction',M['REPLACE']),this['replaceButton']=this['_createButton']('','ck-button-action'),this['replaceButton']['bind']('label')['to'](this,'mainAction',_0x6fe670=>i(_0x126c01,'AI_'+_0x6fe670['toUpperCase']()+'_CONTENT')),this['insertButton']=this['_createButton'](i(_0x126c01,'Insert\x20below')),this['tryAgainButton']=this['_createButton'](i(_0x126c01,'Try\x20again')),this['stopButton']=this['_createButton'](i(_0x126c01,'Stop'));const _0x4a8902=this['bindTemplate'];this['extendTemplate']({'attributes':{'class':['ck-ai-form__toolbar',_0x4a8902['if']('isVisible','ck-hidden',_0x1dbfab=>!_0x1dbfab)]}}),this['items']['addMany']([this['replaceButton'],this['insertButton'],this['tryAgainButton'],this['stopButton']]);}['_createButton'](_0x337bb8,_0x1af8fd){const _0x706295=new _0x4d1286(this['locale']);return _0x706295['set']({'label':_0x337bb8,'class':_0x1af8fd||'','isVisible':!0x0,'withText':!0x0}),_0x706295;}}class Y extends _0x14fb67{['contentFieldView'];['copyButtonView'];constructor(_0x21ed6d,_0x3d94d5=''){super(_0x21ed6d),this['set']({'value':null,'isVisible':!0x1,'isProcessing':!0x1});const _0x47ecc4=this['bindTemplate'];this['contentFieldView']=new At(_0x21ed6d,_0x3d94d5),this['copyButtonView']=this['_createCopyButton'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area-wrapper',_0x47ecc4['if']('isVisible','ck-hidden',_0x2652a5=>!_0x2652a5)],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area',_0x47ecc4['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 _0x47c623=!0x1;this['on']('change:value',(_0x382cea,_0x4648c1,_0x515cfe)=>{const _0x304221=!this['contentFieldView']['element']['querySelector']('.ck-ai-form__loader');this['contentFieldView']['setContent'](_0x515cfe),this['isProcessing']&&_0x304221&&!_0x47c623&&this['element']['scrollTo']({'top':this['element']['scrollHeight'],'behavior':'smooth'});}),this['on']('change:isProcessing',(_0x4ca583,_0x22c936,_0x5e7480)=>{_0x47c623=!0x1,_0x5e7480?(this['value']=null,this['contentFieldView']['appendLoader']()):this['value']||this['contentFieldView']['setContent']('');}),this['listenTo'](this['element'],'wheel',()=>{_0x47c623=!0x0;}),this['listenTo'](this['element'],'mousedown',()=>{_0x47c623=!0x0;});}['focus'](){this['element']['focus']();}['_createCopyButton'](){const _0x35ddfa=this['locale'],_0x674130=new _0x4d1286(this['locale']),_0xa90172='ck-ai-form__copy-button';return _0x674130['set']({'label':i(_0x35ddfa,'Copy'),'icon':_0x2e6853,'class':_0xa90172,'tooltip':!0x0}),_0x674130['bind']('isVisible')['to'](this,'value',_0x435bc8=>!!_0x435bc8),_0x674130['bind']('isEnabled')['to'](this,'isProcessing',_0xe81079=>!_0xe81079),_0x674130['on']('execute',()=>{this['_copyHTMLToClipboard'](this['contentFieldView']['element']),_0x674130['icon']=_0x83c214,_0x674130['class']=_0xa90172+'\x20ck-ai-form__copy-button--copied',this['focus'](),setTimeout(()=>{_0x674130['icon']=_0x2e6853,_0x674130['class']=_0xa90172;},0x3e8);}),_0x674130;}['_copyHTMLToClipboard'](_0x2f1385){const {window:_0x1ff787,document:_0x12686f}=_0x23e469;if(_0x1ff787['ClipboardItem']){const {Blob:_0x3d4f6f,ClipboardItem:_0x1f8981}=_0x1ff787,_0x38d706=[new _0x1f8981({'text/html':new _0x3d4f6f([_0x2f1385['innerHTML']],{'type':'text/html'}),'text/plain':new _0x3d4f6f([_0x2f1385['textContent']||''],{'type':'text/plain'})})];navigator['clipboard']['write'](_0x38d706);}else{const _0x493211=_0x12686f['createElement']('div');_0x493211['style']['position']='absolute',_0x493211['style']['left']='-9999px',_0x493211['innerHTML']='<span>[</span>'+_0x2f1385['innerHTML']+'<span>]</span>',_0x12686f['body']['appendChild'](_0x493211);const _0xa198e0=_0x12686f['createRange']();_0xa198e0['setStartAfter'](_0x493211['firstElementChild']),_0xa198e0['setEndBefore'](_0x493211['lastElementChild']);const _0x1bd4d7=_0x1ff787['getSelection']();_0x1bd4d7['removeAllRanges'](),_0x1bd4d7['addRange'](_0xa198e0),_0x12686f['execCommand']('copy'),_0x493211['remove']();}}}class At extends _0x14fb67{constructor(_0x39d413,_0x5a6a88=''){super(_0x39d413),this['loaderView']=this['_createLoader'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-content',_0x5a6a88,'ck-reset_all-excluded','ck-ai-form__content-field']}});}['setContent'](_0xa05b79){this['element']['innerHTML']=_0xa05b79;}['appendLoader'](){this['element']['appendChild'](this['loaderView']['element']);}['_createLoader'](){const _0x5dbaec=new _0x14fb67(),_0x50b04d=this['locale'],_0x388a96=new _0x47374c();return _0x388a96['isVisible']=!0x0,_0x5dbaec['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__loader']},'children':[_0x388a96,{'text':i(_0x50b04d,'AI\x20is\x20writing...')}]}),_0x5dbaec['render'](),_0x5dbaec;}}class st extends _0x14fb67{constructor(_0x5db243,_0x18adab=''){super(_0x5db243);const _0x1b6581=new rt(),_0x14ee60=this['bindTemplate'];this['set']('text',_0x18adab),_0x1b6581['content']=tt,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__error']},'children':[_0x1b6581,{'text':_0x14ee60['to']('text')}]});}}class ct extends nt{['submitButtonView'];['showHistoryButtonView'];constructor(_0x51860e,_0x27d825){super(_0x51860e,_0x27d825),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',(_0x2d47a8,_0x1b7c22)=>{_0x2d47a8['target']==this['queryView']['fieldView']['element']&&(this['submit'](),_0x1b7c22());});}['_createSubmitButton'](){const _0x555771=new _0x4d1286(this['locale']),_0x11889f=this['locale'];return _0x555771['set']({'icon':ht,'label':i(_0x11889f,'Submit'),'isVisible':!0x0,'tooltip':!0x0,'class':'ck-ai-form__submit'}),_0x555771['on']('execute',()=>{this['submit']();}),_0x555771['bind']('isEnabled')['to'](this['queryView']['fieldView'],'isEmpty',this,'isEnabled',(_0x56bc74,_0x3ee8c7)=>!_0x56bc74&&_0x3ee8c7),_0x555771;}['_createShowHistoryButton'](){const _0x325161=new _0x4d1286(this['locale']),_0x4c4973=this['resultsView'],_0x13779b=this['locale'];_0x325161['set']({'label':i(_0x13779b,'History'),'withText':!0x1,'icon':et,'tooltip':!0x0,'tooltipPosition':'sw','class':'ck-ai-form__toggle-history'}),_0x325161['bind']('isOn')['to'](_0x4c4973,'isVisible'),_0x325161['bind']('isEnabled')['to'](this,'isEnabled'),_0x325161['on']('execute',()=>{_0x4c4973['isVisible']=!_0x4c4973['isVisible'],_0x4c4973['isVisible']?this['filteredView']['focus']():this['focus']();});const _0x239b13=()=>{_0x23e469['window']['requestAnimationFrame'](()=>{if(ot(this['element'])){const _0x5a54b8=new it(this['queryView']['fieldView']['element']),_0x16fb0e=_0x5a54b8['width'],_0x14dc47='rtl'===_0x13779b['uiLanguageDirection']?'left':'right';_0x5a54b8['excludeScrollbarsAndBorders'](),_0x325161['element']['style'][_0x14dc47]=_0x16fb0e-_0x5a54b8['width']+0x1+'px';}});};return this['queryView']['fieldView']['on']('update',_0x239b13),this['on']('render',_0x239b13),_0x325161;}['submit'](){const _0x422929=this['queryView']['fieldView']['element']['value'];this['fire']('submit',_0x422929);}['focus'](_0x293086){-0x1===_0x293086?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}}class ft extends Ct{['historyGroupView'];['clearHistoryButton'];constructor(_0x432871){super(_0x432871),this['clearHistoryButton']=this['_createClearHistoryButton'](),this['historyGroupView']=new Ht(),this['historyGroupView']['children']['add'](this['clearHistoryButton'],0x1),this['historyGroupView']['label']=i(_0x432871,'Prompt\x20history'),this['historyGroupView']['items']['delegate']('execute')['to'](this),this['items']['add'](this['historyGroupView']);}['filter'](){let _0x5bfbd2=0x0;for(const _0xea119c of this['items'])_0x5bfbd2+=_0xea119c['items']['length'];return{'resultsCount':_0x5bfbd2,'totalItemsCount':_0x5bfbd2};}['_createClearHistoryButton'](){const _0x1aaff0=this['locale'],_0x40887a=new _0x4d1286(this['locale']);return _0x40887a['set']({'label':'('+i(_0x1aaff0,'Clear')+')','withText':!0x0}),_0x40887a['on']('execute',()=>this['fire']('clearHistory')),_0x40887a;}}class bt extends xt{constructor(_0x15d497){super();const _0x3dbd0b=new kt(),_0x137229=new _0x4d1286(this['locale'],_0x3dbd0b);this['children']['add'](_0x137229),_0x137229['set']({'label':_0x15d497['prompt'],'withText':!0x0}),_0x137229['on']('execute',()=>{this['fire']('execute',{'value':jt(_0x15d497['prompt'])});});}}const ts='CKEditor/AIFormView/PromptHistory';class wt extends _0x4996bc{constructor(){super(),this['_loadFromSessionStorage'](),this['on']('add',(_0x39bba5,_0x1798a5)=>{const _0x11e783=os(_0x1798a5['prompt']);for(const _0x148fc2 of this)if(_0x148fc2!=_0x1798a5&&os(_0x148fc2['prompt'])===_0x11e783){this['remove'](_0x148fc2);break;}this['length']>0x14&&this['remove'](this['last']),this['_saveToSessionStorage']();}),this['on']('remove',()=>{this['_saveToSessionStorage']();});}['_loadFromSessionStorage'](){const _0x30d06e=sessionStorage['getItem'](ts)||'[]';this['addMany'](JSON['parse'](_0x30d06e));}['_saveToSessionStorage'](){sessionStorage['setItem'](ts,JSON['stringify'](this['map'](_0x3bef4b=>_0x3bef4b)));}}function os(_0xe4c62a){return _0xe4c62a['toLowerCase']()['trim']();}class _ extends _0x14fb67{['focusTracker'];['keystrokes'];['contentArea'];['toolbar'];['promptView'];['errorView'];['_focusables'];['focusCycler'];['_promptHistory'];constructor(_0x51a4d3,_0x38f2a0,_0x365975=''){super(_0x51a4d3),this['set']('isEnabled',!0x0),this['set']('isProcessing',!0x1),this['set']('prompt',''),this['set']('value',''),this['set']('isError',!0x1),this['set']('mainAction',M['REPLACE']),this['_promptHistory']=new wt(),this['errorView']=new st(_0x51a4d3),this['contentArea']=new Y(_0x51a4d3,_0x365975),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 mt(),this['keystrokes']=new ut(),this['_focusables']=this['createCollection']([this['contentArea'],this['contentArea']['copyButtonView'],this['toolbar'],this['promptView']]),this['focusCycler']=new pt({'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 _0x320b6a=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form',_0x38f2a0],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form-content']},'children':[{'tag':'div','attributes':{'class':[_0x320b6a['if']('isError','ck-hidden',_0x3e237a=>!_0x3e237a)]},'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'](_0x50547b=0x1){-0x1===_0x50547b?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 _0x54739a=this['locale'],_0x27c7d3=new ct(_0x54739a,{'queryView':{'label':i(_0x54739a,'Ask\x20AI\x20to\x20edit\x20or\x20generate'),'creator':dt,'showIcon':!0x1,'showResetButton':!0x1},'infoView':{'text':{'noSearchableItems':{'primary':i(_0x54739a,'Empty\x20history'),'secondary':i(_0x54739a,'Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.')}}},'filteredView':this['_createHistoryView'](),'queryMinChars':0x1/0x0,'resetOnBlur':!0x1});return _0x27c7d3['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x3cfa3f,_0x305f03)=>_0x3cfa3f&&!_0x305f03),this['listenTo'](_0x27c7d3,'submit',(_0x318765,_0x3343ed)=>{this['prompt']=_0x3343ed;const _0xa86bc=yt(_0x3343ed);this['fire']('submitPrompt',_0xa86bc),_0x3343ed['trim']()&&this['_promptHistory']['add']({'prompt':_0xa86bc},0x0);},{'priority':'high'}),_0x27c7d3;}['_createHistoryView'](){const _0x56bd11=new ft(this['locale']);return _0x56bd11['historyGroupView']['items']['bindTo'](this['_promptHistory'])['as'](bt),_0x56bd11['on']('clearHistory',()=>{this['_promptHistory']['clear'](),this['promptView']['search'](''),this['promptView']['focus']();}),_0x56bd11;}['_createToolbar'](){const _0x521762=new lt(this['locale']);return _0x521762['replaceButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x26c7bd,_0x72ec51,_0x2e75c1)=>_0x26c7bd&&!_0x72ec51&&!!_0x2e75c1),_0x521762['replaceButton']['delegate']('execute')['to'](this,'replaceContent'),_0x521762['insertButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x3c1049,_0xf90114,_0x37110d)=>_0x3c1049&&!_0xf90114&&!!_0x37110d),_0x521762['insertButton']['delegate']('execute')['to'](this,'insertContentBelow'),_0x521762['tryAgainButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x70838,_0x570a91)=>_0x70838&&!_0x570a91),_0x521762['tryAgainButton']['delegate']('execute')['to'](this,'tryAgainEvent'),_0x521762['stopButton']['bind']('isEnabled')['to'](this,'isProcessing'),_0x521762['stopButton']['delegate']('execute')['to'](this,'stopProcessing'),_0x521762;}['startProcessing'](){this['value']='',this['isError']=!0x1,this['isProcessing']=!0x0,this['contentArea']['isVisible']=!0x0,this['toolbar']['isVisible']=!0x0,this['contentArea']['focus']();}['finishProcessing'](){const _0x1dfae7=this['locale'];this['isProcessing']=!0x1,this['prompt']='',this['promptView']['reset'](),this['value']&&(this['promptView']['queryView']['label']=i(_0x1dfae7,'Ask\x20AI\x20to\x20improve\x20generated\x20text'));}['handleError'](_0x3359b){const _0x3a105d=this['locale'];this['finishProcessing'](),this['isError']=!0x0,this['errorView']['text']=_0x3359b||i(_0x3a105d,'AI_ERROR_FAILED'),this['value']||(this['contentArea']['isVisible']=!0x1);}}const w=globalThis['DataTransfer'];class n extends _0x21cda4{['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[_0x338528,a,E,_0x4604ae];}constructor(_0x461b7c){super(_0x461b7c),_0x461b7c['config']['define']('ai.aiAssistant.disabledElements',['media','rawHtml','tableOfContents']),_0x461b7c['config']['define']('ai.aiAssistant.contentAreaCssClass',''),_0x461b7c['config']['define']('ai.useTheme',!0x0),this['_uiCssClasses']='ck-ai-assistant-ui'+(_0x461b7c['config']['get']('ai.useTheme')?'\x20ck-ai-assistant-ui_theme':'');}['init'](){const {editor:_0x47ee05}=this;this['_aiAdapter']=_0x47ee05['plugins']['get'](E),this['_dialog']=_0x47ee05['plugins']['get'](_0x4604ae),this['_formView']=null,this['_commandDefinitions']=this['_getResolvedCommandsDefinitions']();const _0x390fe9=new j(_0x47ee05,Array['from'](this['_commandDefinitions']['values']()));_0x47ee05['commands']['add']('showAIAssistant',_0x390fe9),_0x47ee05['ui']['componentFactory']['add']('aiCommands',_0x3e131b=>{const _0x1af05d=_0x464473(_0x3e131b);return _0x1af05d['set']({'class':'ck-ai-commands-dropdown\x20'+this['_uiCssClasses']}),_0x1af05d['buttonView']['set']({'label':i(_0x3e131b,'AI\x20Commands'),'icon':_0xafb348,'tooltip':!0x0}),_0x1af05d['on']('execute',_0x3d032c=>this['_onExecute'](_0x3d032c['source']['id'])),_0x16bd78(_0x1af05d,_0x47ee05['ui']['view']['body'],function(_0x25e686){const _0x3167ee=o(_0x25e686['config']['get']('ai.aiAssistant.commands'),_0x25e686['locale']),_0x3d5b7b=U(_0x25e686,_0x3167ee)['filter'](_0xa73d84=>_0xa73d84['commands']['length']);if(0x1===_0x3d5b7b['length'])return U(_0x25e686,_0x3d5b7b[0x0]['commands'])['map'](_0x58a44f=>({'id':_0x58a44f['id'],'label':_0x58a44f['label']}));return _0x3d5b7b['map'](_0x5225ef=>{const {groupId:_0x2d587c,groupLabel:_0x41b287,commands:_0x11c1a0}=_0x5225ef,_0x3982b0=U(_0x25e686,_0x11c1a0)['map'](_0xe15690=>({'id':_0xe15690['id'],'label':_0xe15690['label']}));return{'id':_0x2d587c,'menu':_0x41b287||_0x2d587c,'children':_0x3982b0};});}(_0x47ee05),{'ariaLabel':i(_0x3e131b,'AI\x20Commands')}),_0x1af05d['menuView']['menuPanelClass']='ck-ai-commands-dropdown\x20'+this['_uiCssClasses'],_0x390fe9['on']('change:enabledCommandsIds',_0x5cd718),_0x1af05d['menuView']['once']('render',_0x5cd718),_0x1af05d;function _0x5cd718(){_0x1af05d['isEnabled']=_0x390fe9['enabledCommandsIds']['length']>0x0;for(const _0x5bca17 of _0x1af05d['menuView']['buttons'])_0x5bca17['isEnabled']=_0x390fe9['enabledCommandsIds']['includes'](_0x5bca17['id']);}}),_0x47ee05['ui']['componentFactory']['add']('menuBar:aiCommands',_0x3bd7cf=>{const _0x371831=new _0x37e0bb(_0x3bd7cf);_0x371831['buttonView']['set']({'label':i(_0x3bd7cf,'AI\x20Commands'),'icon':_0xafb348}),_0x371831['bind']('isEnabled')['to'](_0x390fe9,'enabledCommandsIds',_0x457763=>_0x457763['length']>0x0);const _0x89fe1a=o(_0x47ee05['config']['get']('ai.aiAssistant.commands'),_0x3bd7cf);return this['_populateMenuBarMenu'](_0x390fe9,_0x371831,_0x89fe1a,_0x1a6d4e=>this['_onExecute'](_0x1a6d4e)),_0x371831;}),_0x47ee05['ui']['componentFactory']['add']('aiAssistant',()=>{const _0x388930=this['_createAIAssistantUIButton'](_0x4d1286);return _0x388930['set']({'tooltip':!0x0,'class':'ck-ai-assistant-button\x20'+this['_uiCssClasses']}),_0x388930;}),_0x47ee05['ui']['componentFactory']['add']('menuBar:aiAssistant',()=>{const _0x229c50=this['_createAIAssistantUIButton'](_0x296cb0);return _0x229c50['set']({'role':'menuitemcheckbox'}),_0x229c50;}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x3e2a98=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0xb1bc8a;for(const _0x37e9cf in _0x3e2a98){const _0x5e4e8c=_0x37e9cf,_0x55627c=_0x3e2a98[_0x5e4e8c];if('aiLicenseKeyValid'==_0x55627c||'aiLicenseKeyInvalid'==_0x55627c||'aiLicenseKeyExpired'==_0x55627c||'aiLicenseKeyDomainLimit'==_0x55627c||'aiLicenseKeyNotAllowed'==_0x55627c||'aiLicenseKeyEvaluationLimit'==_0x55627c||'aiLicenseKeyTrialLimit'==_0x55627c||'aiLicenseKeyUsageLimit'==_0x55627c){delete _0x3e2a98[_0x5e4e8c],_0xb1bc8a=_0x55627c,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'aiLicenseKeyInvalid'==_0xb1bc8a&&_0x3e2a98['_showLicenseError']('invalid'),'aiLicenseKeyExpired'==_0xb1bc8a&&_0x3e2a98['_showLicenseError']('expired'),'aiLicenseKeyDomainLimit'==_0xb1bc8a&&_0x3e2a98['_showLicenseError']('domainLimit'),'aiLicenseKeyNotAllowed'==_0xb1bc8a&&_0x3e2a98['_showLicenseError']('featureNotAllowed','AIAssistant'),'aiLicenseKeyEvaluationLimit'==_0xb1bc8a&&_0x3e2a98['_showLicenseError']('evaluationLimit'),'aiLicenseKeyTrialLimit'==_0xb1bc8a&&_0x3e2a98['_showLicenseError']('trialLimit'),'aiLicenseKeyUsageLimit'==_0xb1bc8a&&_0x3e2a98['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['showUI'](_0x52ef35='',_0x8abe1a='',_0x463ee6='custom'){const _0x25f46a=this['editor'],_0xe737c8=_0x25f46a['editing']['view'],_0x356bf9=_0x25f46a['plugins']['get'](a),_0x245ebe=_0x25f46a['plugins']['get'](_0x338528);_0x356bf9['showFakeVisualSelection']();const _0xf00215=new w(),_0x3c6d04=new ClipboardEvent('copy',{'clipboardData':_0xf00215}),_0x4e9e55=new _0x3b504d(_0xf00215),_0x2afa74=new _0x413423(_0xe737c8,_0x3c6d04,{'dataTransfer':_0x4e9e55});_0x245ebe['_forceMarkersCopy']('comment',()=>{_0xe737c8['document']['fire']('copy',_0x2afa74);}),this['_formView']||(this['_initView'](),this['_aiAssistantController']=new k(_0x25f46a,this['_aiAdapter']['textAdapter'],this['_formView']));let _0x5a0e6f=_0x4e9e55['getData']('text/html');const _0x1d93a2=_0x25f46a['model']['document']['selection'],_0x309053=Array['from'](_0x1d93a2['getRanges']());0x1===_0x309053['length']&&_0x309053[0x0]['isFlat']&&!_0x1d93a2['getSelectedElement']()&&''!==_0x5a0e6f['replace'](/ /g,'')['trim']()&&(_0x5a0e6f='<p>'+_0x5a0e6f+'</p>'),this['_aiAssistantController']['updateView']({'actionId':_0x463ee6,'query':_0x52ef35,'htmlContent':_0x5a0e6f,'label':_0x8abe1a,'mainActionLabel':M[_0x25f46a['model']['document']['selection']['isCollapsed']?'INSERT':'REPLACE']}),'aiAssistant'!==this['_dialog']['id']?this['_dialog']['show']({'id':'aiAssistant','icon':_0x30a012,'title':i(this['editor']['locale'],'AI\x20Assistant'),'content':this['_formView'],'position':_0x474448['EDITOR_TOP_SIDE'],'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_aiAssistantController']['reset'](),_0x356bf9['hideFakeVisualSelection']();}}):this['_dialog']['view']['wasMoved']||this['_dialog']['view']['updatePosition']();}['hideUI'](){this['_dialog']['hide']();}['_getResolvedCommandsDefinitions'](){const _0x260524=new Map(),_0xd4f7ab=o(this['editor']['config']['get']('ai.aiAssistant.commands'),this['editor']['locale']);for(const _0xa85df7 of _0xd4f7ab)for(const _0x428fde of _0xa85df7['commands'])_0x260524['set'](_0x428fde['id'],{..._0x428fde,'groupId':_0xa85df7['groupId'],'groupLabel':_0xa85df7['groupLabel']||_0xa85df7['groupId']});return _0x260524;}['_createAIAssistantUIButton'](_0x391582){const _0x563f51=this['editor'],_0x1264c4=_0x563f51['commands']['get']('showAIAssistant'),_0xf0ba6b=new _0x391582(_0x563f51['locale']);return _0xf0ba6b['set']({'label':i(_0x563f51['locale'],'AI\x20Assistant'),'icon':_0x30a012,'isToggleable':!0x0}),_0xf0ba6b['bind']('isEnabled')['to'](_0x1264c4),_0xf0ba6b['bind']('isOn')['to'](this['_dialog'],'id',_0x20f0b1=>'aiAssistant'===_0x20f0b1),this['listenTo'](_0xf0ba6b,'execute',()=>{_0xf0ba6b['isOn']?this['hideUI']():_0x1264c4['execute']();}),_0xf0ba6b;}['_initView'](){const _0x18994e=this['editor']['plugins']['get'](a);this['_formView']=new _(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',()=>{_0x18994e['insertContent'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['listenTo'](this['_formView'],'insertContentBelow',()=>{_0x18994e['insertContentBelow'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['_initAriaAiStatusChangeAnnouncements']();}['_initAriaAiStatusChangeAnnouncements'](){const {locale:_0x516994,ui:{ariaLiveAnnouncer:_0xc648da}}=this['editor'];this['_formView']['contentArea']['on']('change:isProcessing',(_0x15a350,_0x542dce,_0x37b8e3)=>{const _0x10d390=this['_aiAssistantController']['currentContext'];_0x37b8e3?_0xc648da['announce'](i(_0x516994,'AI\x20is\x20writing')):_0x10d390&&_0xc648da['announce'](i(_0x516994,'Generated\x20content:\x20%0',_0x10d390),{'politeness':'polite','isUnsafeHTML':!0x0});}),this['_formView']['on']('change:isError',(_0x547070,_0x8e220a,_0x3839b8)=>{if(_0x3839b8){const _0x413f7e=this['_formView']['errorView']['text'];_0xc648da['announce'](i(_0x516994,'Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x413f7e));}});}['_onExecute'](_0x1b54f4){const _0x3fb62e=this['_commandDefinitions']['get'](_0x1b54f4),_0x3c636e=this['editor'],_0x14d23f=_0x3c636e['model']['document']['selection'],_0x4bbbab=_0x3c636e['commands']['get']('showAIAssistant'),_0x1a5cc3=_0x3c636e['plugins']['get'](a),_0x1d1423=''+(_0x3fb62e['groupId']!==x?_0x3fb62e['groupLabel']+':\x20':'')+_0x3fb62e['label'];if(!0x1!==_0x3fb62e['requiresContent']&&_0x14d23f['isCollapsed']){const _0x39a940=_0x2abc6a(_0x14d23f['getSelectedBlocks']())||_0x3c636e['model']['schema']['getLimitElement'](_0x14d23f);_0x3c636e['model']['change'](_0x27912d=>{_0x27912d['setSelection'](_0x39a940,'in');});}_0x1a5cc3['showFakeVisualSelection'](),_0x4bbbab['execute'](_0x3fb62e['prompt'],_0x1d1423,'command:'+_0x1b54f4);}['_populateMenuBarMenu'](_0x35b2b3,_0x4f4481,_0xbd40c0,_0x24a01d){const _0xdf32f9=this['editor'],_0x22fec3=_0xdf32f9['locale'],_0xd6750b=new _0x11ae37(_0x22fec3),_0x3e6571=U(_0xdf32f9,_0xbd40c0)['filter'](_0x4e62af=>_0x4e62af['commands']['length']);0x1===_0x3e6571['length']?this['_getMenuBarGroupButtons']({'command':_0x35b2b3,'commands':_0x3e6571[0x0]['commands'],'parentMenuView':_0x4f4481,'onExecute':_0x24a01d})['forEach'](_0x1260e2=>_0xd6750b['items']['add'](_0x1260e2)):_0x3e6571['forEach'](({groupId:_0x16cf8d,groupLabel:_0x540338,commands:_0x5cab29})=>{const _0x494216=new _0x130694(_0x22fec3,_0x4f4481),_0x16df98=new _0x37e0bb(_0x22fec3),_0x28f881=new _0x11ae37(_0x22fec3),_0x3b53f5=this['_getMenuBarGroupButtons']({'command':_0x35b2b3,'commands':_0x5cab29,'parentMenuView':_0x16df98,'onExecute':_0x24a01d});_0x16df98['buttonView']['set']({'label':_0x540338||_0x16cf8d}),_0x16df98['delegate']('execute')['to'](_0x4f4481),_0x28f881['items']['addMany'](_0x3b53f5),_0x16df98['panelView']['children']['add'](_0x28f881),_0x494216['children']['add'](_0x16df98),_0xd6750b['items']['add'](_0x494216);}),_0x4f4481['panelView']['children']['add'](_0xd6750b);}['_getMenuBarGroupButtons']({command:_0x2993b2,commands:_0x15dddb,parentMenuView:_0x271f93,onExecute:_0x23c86f}){const _0x1e9c9c=this['editor'],_0x2ccf91=_0x1e9c9c['locale'];return U(_0x1e9c9c,_0x15dddb)['map'](_0x4caab3=>{const _0x43d91f=new _0x130694(_0x2ccf91,_0x271f93),_0x1c3593=new _0x296cb0(_0x2ccf91);return _0x1c3593['set']({'label':_0x4caab3['label']}),_0x1c3593['delegate']('execute')['to'](_0x271f93),_0x1c3593['on']('execute',()=>_0x23c86f(_0x4caab3['id'])),_0x1c3593['bind']('isEnabled')['to'](_0x2993b2,'enabledCommandsIds',_0x536b31=>_0x536b31['includes'](_0x4caab3['id'])),_0x43d91f['children']['add'](_0x1c3593),_0x43d91f;});}}function B(_0x50ca44,_0xb117cb){return void 0x0!==_0x50ca44['order']&&void 0x0===_0xb117cb['order']?0x1:void 0x0===_0x50ca44['order']&&void 0x0!==_0xb117cb['order']?-0x1:void 0x0!==_0x50ca44['order']&&void 0x0!==_0xb117cb['order']?_0x50ca44['order']-_0xb117cb['order']:0x0;}function U(_0x618b91,_0x17aaa1){_0x17aaa1['sort'](B);const _0x36c809={},_0x1775f2=[];for(const _0x5b711f of _0x17aaa1)if(void 0x0!==_0x5b711f['order']){if(_0x5b711f['order']in _0x36c809)throw new _0x4f8769('ai-commands-config-order-collision',_0x618b91,{'conflictingDefinitions':[_0x5b711f,_0x36c809[_0x5b711f['order']]]});_0x36c809[_0x5b711f['order']]=_0x5b711f,_0x1775f2['splice'](_0x5b711f['order'],0x0,_0x5b711f);}else _0x1775f2['push'](_0x5b711f);return _0x1775f2;}class r extends _0x21cda4{static get['requires'](){return[n,a];}static get['pluginName'](){return'AIAssistant';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2a187c){super(_0x2a187c);const _0x3646e0=_0x2a187c['config'],_0x595f06=_0x2a187c['locale'];_0x3646e0['define']('ai.aiAssistant.preserveComments',!0x0),_0x3646e0['define']('ai.aiAssistant.commands',function(_0x1bb95c){return[{'groupId':'editOrReview','groupLabel':i(_0x1bb95c,'Edit\x20or\x20review'),'commands':[{'id':'improveWriting','label':i(_0x1bb95c,'Improve\x20writing'),'prompt':'Fix\x20spelling\x20mistakes,\x20use\x20proper\x20grammar\x20and\x20apply\x20good\x20writing\x20practices.\x20Do\x20not\x20lose\x20the\x20original\x20meaning.'},{'id':'makeShorter','label':i(_0x1bb95c,'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(_0x1bb95c,'Make\x20longer'),'prompt':'Improve\x20this\x20content\x20by\x20using\x20descriptive\x20language\x20and\x20inserting\x20more\x20information\x20and\x20more\x20detailed\x20explanations.'},{'id':'simplifyLanguage','label':i(_0x1bb95c,'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(_0x1bb95c,'Generate\x20from\x20selection'),'commands':[{'id':'summarize','label':i(_0x1bb95c,'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(_0x1bb95c,'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(_0x1bb95c,'Change\x20tone'),'commands':[{'id':'professional','label':i(_0x1bb95c,'Professional'),'prompt':'Improve\x20using\x20polished,\x20formal,\x20and\x20respectful\x20language\x20to\x20convey\x20professional\x20expertise\x20and\x20competence.'},{'id':'casual','label':i(_0x1bb95c,'Casual'),'prompt':'Improve\x20using\x20casual,\x20informal\x20language\x20to\x20convey\x20a\x20casual\x20conversation\x20with\x20a\x20real\x20person.'},{'id':'direct','label':i(_0x1bb95c,'Direct'),'prompt':'Improve\x20using\x20direct\x20language,\x20using\x20only\x20the\x20essential\x20information.'},{'id':'confident','label':i(_0x1bb95c,'Confident'),'prompt':'Improve\x20using\x20compelling,\x20optimistic\x20language\x20to\x20convey\x20confidence\x20in\x20the\x20writing.'},{'id':'friendly','label':i(_0x1bb95c,'Friendly'),'prompt':'Improve\x20using\x20friendly,\x20comforting\x20language,\x20to\x20convey\x20understanding\x20and\x20empathy.'}]},{'groupId':'changeStyle','groupLabel':i(_0x1bb95c,'Change\x20style'),'commands':[{'id':'business','label':i(_0x1bb95c,'Business'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20business\x20professional\x20with\x20formal\x20language.'},{'id':'legal','label':i(_0x1bb95c,'Legal'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20legal\x20professional\x20using\x20valid\x20legal\x20terminology.'},{'id':'journalism','label':i(_0x1bb95c,'Journalism'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20journalist\x20using\x20engaging\x20language\x20to\x20convey\x20the\x20importance\x20of\x20the\x20information.'},{'id':'poetic','label':i(_0x1bb95c,'Poetic'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20poem\x20using\x20poetic\x20techniques\x20without\x20losing\x20the\x20original\x20meaning.'}]},{'groupId':'translate','groupLabel':i(_0x1bb95c,'Translate'),'commands':[{'id':'translateEnglish','label':i(_0x1bb95c,'English'),'prompt':'Translate\x20the\x20content\x20to\x20English\x20language.'},{'id':'translateSpanish','label':i(_0x1bb95c,'Spanish'),'prompt':'Translate\x20the\x20content\x20to\x20Spanish\x20language.'},{'id':'translatePortuguese','label':i(_0x1bb95c,'Portuguese'),'prompt':'Translate\x20the\x20content\x20to\x20Portuguese\x20language.'},{'id':'translateGerman','label':i(_0x1bb95c,'German'),'prompt':'Translate\x20the\x20content\x20to\x20German\x20language.'},{'id':'translateFrench','label':i(_0x1bb95c,'French'),'prompt':'Translate\x20the\x20content\x20to\x20French\x20language.'},{'id':'translateChinese','label':i(_0x1bb95c,'Simplified\x20Chinese'),'prompt':'Translate\x20the\x20content\x20to\x20Simplified\x20Chinese\x20language.'},{'id':'translateHindi','label':i(_0x1bb95c,'Hindi'),'prompt':'Translate\x20the\x20content\x20to\x20Hindi\x20language.'},{'id':'translateArabic','label':i(_0x1bb95c,'Arabic'),'prompt':'Translate\x20the\x20content\x20to\x20Arabic\x20language.'}]}];}(_0x595f06)),_0x3646e0['define']('ai.aiAssistant.extraCommandGroups',[]),_0x3646e0['define']('ai.aiAssistant.removeCommands',[]);let _0x1735c2=o(_0x3646e0['get']('ai.aiAssistant.commands'),_0x595f06);const _0x30f4a=_0x3646e0['get']('ai.aiAssistant.extraCommandGroups'),_0x31eacb=_0x3646e0['get']('ai.aiAssistant.removeCommands');_0x30f4a['forEach'](_0x4d6fcf=>{const _0x763f87=_0x1735c2['find'](_0x292acb=>_0x292acb['groupId']===_0x4d6fcf['groupId']);_0x763f87?_0x763f87['commands']=_0x763f87['commands']['concat'](_0x4d6fcf['commands']):_0x1735c2['push'](_0x4d6fcf);}),_0x1735c2=_0x1735c2['filter'](_0x4f8443=>!_0x31eacb['includes'](_0x4f8443['groupId'])),_0x1735c2['forEach'](_0xb86928=>{_0xb86928['commands']=_0xb86928['commands']['filter'](_0x59d8f8=>!_0x31eacb['includes'](_0x59d8f8['id']));}),_0x3646e0['set']('ai.aiAssistant.commands',_0x1735c2);}}class P extends _0x21cda4{['abortController'];static get['requires'](){return[E];}constructor(_0x4278b5){super(_0x4278b5),this['abortController']=new AbortController();}['init'](){this['editor']['plugins']['get'](E)['textAdapter']=this;}['abort'](){this['abortController']['signal']['aborted']||(this['abortController']['abort'](),this['abortController']=new AbortController());}async['makeRequest'](_0x529dcb){return this['sendRequest'](_0x529dcb)['catch'](_0x2ca4ae=>{if(_0x2ca4ae instanceof R)return Promise['reject'](_0x2ca4ae);if('AbortError'==_0x2ca4ae['name'])return Promise['resolve']();throw console['error'](_0x2ca4ae),new _0x4f8769('aitextadapter-send-request-failed',null);});}async['_prepareRequestHeaders'](_0x1efe2d,_0x27dcc8){const _0x108aa4=this['editor']['locale'],_0x2ba881={'Content-Type':'application/json'};if('object'==typeof _0x1efe2d)Object['assign'](_0x2ba881,_0x1efe2d);else{if(_0x1efe2d)try{const _0x54ab0d=await _0x1efe2d(_0x27dcc8);Object['assign'](_0x2ba881,_0x54ab0d);}catch{return Promise['reject'](new R(i(_0x108aa4,'AI_ERROR_GET_HEADERS')));}}return _0x2ba881;}async['_prepareRequestParameters'](_0x31d52e,_0x3727fc){const _0x447c14=this['editor']['locale'];if('object'==typeof _0x31d52e)return _0x31d52e;try{return await _0x31d52e(_0x3727fc);}catch{return Promise['reject'](new R(i(_0x447c14,'AI_ERROR_GET_PARAMETERS')));}}}class O extends P{['_apiUrl'];['_requestHeaders'];['_requestParameters'];static get['pluginName'](){return'OpenAITextAdapter';}constructor(_0x35b206){super(_0x35b206),_0x35b206['config']['define']('ai.openAI.apiUrl','https://api.openai.com/v1/chat/completions'),_0x35b206['config']['get']('ai.openAI.requestParameters')||_0x35b206['config']['define']('ai.openAI.requestParameters',{'model':'gpt-3.5-turbo','max_tokens':0x7d0,'temperature':0x1,'top_p':0x1,'stream':!0x0}),this['_apiUrl']=_0x35b206['config']['get']('ai.openAI.apiUrl'),this['_requestHeaders']=_0x35b206['config']['get']('ai.openAI.requestHeaders')||{},this['_requestParameters']=_0x35b206['config']['get']('ai.openAI.requestParameters');}async['sendRequest']({query:_0x545c71,context:_0x3f4b51,onData:_0x32cc49,actionId:_0xeb4008}){const _0x9e6d5=this['editor']['locale'],_0x189a9c=await this['prepareMessages'](_0x545c71,_0x3f4b51,_0xeb4008),_0x2639da=await this['_prepareRequestHeaders'](this['_requestHeaders'],_0xeb4008),_0x4ba2e3=await this['_prepareRequestParameters'](this['_requestParameters'],_0xeb4008),_0x15706f={'messages':_0x189a9c,..._0x4ba2e3},_0x1bc1c0={'method':'POST','headers':_0x2639da,'body':JSON['stringify'](_0x15706f),'signal':this['abortController']['signal']},_0x53b412=await fetch(this['_apiUrl'],_0x1bc1c0);if(_0x53b412['ok'])return _0x4ba2e3['stream']?await this['_readStreamableResponse'](_0x53b412,_0x32cc49):await this['_readStaticResponse'](_0x53b412,_0x32cc49),Promise['resolve']();{const _0x27892a=await _0x53b412['text']();return _0x27892a['includes']('context_length_exceeded')?Promise['reject'](new R(i(_0x9e6d5,'AI_ERROR_CONTEXT_LENGTH'))):_0x27892a['includes']('Moderation')?Promise['reject'](new R(i(_0x9e6d5,'AI_ERROR_MODERATION'))):Promise['reject'](new Error(_0x27892a));}}async['prepareMessages'](_0x19099d,_0x5c87e5,_0x2d0b78){let _0x2f3c24,_0x5d3529;return _0x5c87e5?(_0x2f3c24='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.',_0x5d3529='Instruction:\x0a'+_0x19099d+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x5c87e5):(_0x2f3c24='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.',_0x5d3529=_0x19099d),[{'role':'system','content':_0x2f3c24},{'role':'user','content':_0x5d3529}];}async['_readStreamableResponse'](_0x452cea,_0x310624){const _0x453383=_0x452cea['body']['getReader'](),_0x2a480f=new TextDecoder();let _0x5a5c50='',_0x497f44='',_0x53deba='',_0x20b46c=!0x1;for(;!_0x20b46c;){const {done:_0x4d441b,value:_0x3e14aa}=await _0x453383['read'](),_0x2a718a=_0x5a5c50+_0x2a480f['decode'](_0x3e14aa);let _0x33e38c='';_0x20b46c=_0x4d441b;try{_0x33e38c=this['_cleanUpData'](_0x2a718a),_0x5a5c50='';}catch{_0x5a5c50=_0x2a718a;continue;}_0x497f44+=_0x33e38c,!_0x20b46c&&this['_isBufferIncomplete'](_0x497f44)||_0x497f44&&(_0x53deba+=_0x497f44,_0x497f44='',_0x310624(_0x53deba));}return Promise['resolve']();}async['_readStaticResponse'](_0x32f5b2,_0x5b741c){return _0x5b741c((await _0x32f5b2['json']())['choices'][0x0]['message']['content']),Promise['resolve']();}['_isBufferIncomplete'](_0x1f2147){const _0x1f8e59=_0x1f2147['split']('<')['length']!==_0x1f2147['split']('>')['length'],_0x228a0b=_0x1f2147['length']<0x1e;return _0x1f8e59&&_0x228a0b;}['_cleanUpData'](_0x1f5cc6){return _0x1f5cc6['split'](/\n(?![^{]*\})/g)['map'](_0x1ad7e6=>_0x1ad7e6['replace']('data:\x20',''))['filter'](_0x314b1e=>_0x314b1e&&_0x314b1e['length']>0x0&&'[DONE]'!==_0x314b1e)['map'](_0x26084e=>{const {choices:_0x3bf1a9}=JSON['parse'](_0x26084e);if(_0x3bf1a9[0x0]?.['delta']?.['content'])return _0x3bf1a9[0x0]['delta']['content'];})['filter'](_0x485464=>_0x485464)['join']('');}}class D extends P{['_apiUrl'];['_requestHeaders'];['_bedrockClientConfig'];['_requestParameters'];static get['pluginName'](){return'AWSTextAdapter';}constructor(_0x2528c0){super(_0x2528c0),_0x2528c0['config']['get']('ai.aws.requestParameters')||_0x2528c0['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']=_0x2528c0['config']['get']('ai.aws.apiUrl'),this['_bedrockClientConfig']=_0x2528c0['config']['get']('ai.aws.bedrockClientConfig'),this['_requestHeaders']=_0x2528c0['config']['get']('ai.aws.requestHeaders'),this['_requestParameters']=_0x2528c0['config']['get']('ai.aws.requestParameters');}async['sendRequest']({query:_0x38d373,context:_0xea98a4,onData:_0x147d9b,actionId:_0x19e3b9}){const {model:_0x4dbc61,stream:_0x50c47a,..._0x5984b3}=await this['_prepareRequestParameters'](this['_requestParameters'],_0x19e3b9),_0x55470c={'prompt':await this['preparePrompt'](_0x38d373,_0xea98a4,_0x4dbc61,_0x19e3b9),..._0x5984b3};this['_apiUrl']?await this['_processProxyRequest'](_0x55470c,_0x4dbc61,_0x50c47a,_0x147d9b,_0x19e3b9):await this['_processAWSRequest'](_0x55470c,_0x4dbc61,_0x50c47a,_0x147d9b);}async['preparePrompt'](_0x506dd4,_0x5ad698,_0x4e2a83,_0x12cdb2){let _0x202118,_0x1b660b;return _0x5ad698?(_0x202118='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.',_0x1b660b='Instruction:\x0a'+_0x506dd4+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x5ad698):(_0x202118='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.',_0x1b660b=_0x506dd4),'meta.llama'==this['getModelFamily'](_0x4e2a83)?'<<SYS>>\x0a'+_0x202118+'\x0a<</SYS>>\x0a[INST]\x0a'+_0x1b660b+'\x0a[/INST]':'Human:\x0a'+_0x202118+'\x0a'+_0x1b660b+'\x0a\x0aAssistant:';}['getModelFamily'](_0x56cb60){if(/^anthropic\.claude/['test'](_0x56cb60))return'anthropic.claude';if(/^ai21\.j2/['test'](_0x56cb60))return'ai21.j2';if(/^cohere\.command/['test'](_0x56cb60))return'cohere.command';if(/^meta\.llama/['test'](_0x56cb60))return'meta.llama';throw new R(i(this['editor']['locale'],'AI_ERROR_UNSUPPORTED_MODEL',_0x56cb60));}async['_processProxyRequest'](_0x33d6cd,_0x1ef7af,_0x4610c6,_0x299dd2,_0x3885be){const _0x351e67={'method':'POST','headers':await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x3885be),'body':JSON['stringify']({..._0x33d6cd,'model':_0x1ef7af,'stream':_0x4610c6}),'signal':this['abortController']['signal']},_0xfc51ce=await fetch(this['_apiUrl'],_0x351e67);_0x4610c6?await this['_readStreamableResponse'](_0xfc51ce,_0x1ef7af,_0x299dd2):await this['_readStaticResponse'](_0xfc51ce,_0x1ef7af,_0x299dd2);}async['_processAWSRequest'](_0x52aeb6,_0x414c4b,_0x3ace29,_0x47e3e5){const _0x5ba46c=new _0x5ba1a0(this['_bedrockClientConfig']),_0x2d1bbd={'body':JSON['stringify'](_0x52aeb6),'contentType':'application/json','accept':'application/json','modelId':_0x414c4b};let _0x2510ed;if(_0x3ace29){const _0x19a972=new _0x4d12b3(_0x2d1bbd);_0x2510ed=await _0x5ba46c['send'](_0x19a972,{'abortSignal':this['abortController']['signal']}),await this['_readAsyncIterableResponse'](_0x2510ed,_0x414c4b,_0x47e3e5);}else{const _0x52f342=new _0x3f1736(_0x2d1bbd);_0x2510ed=await _0x5ba46c['send'](_0x52f342,{'abortSignal':this['abortController']['signal']}),await this['_readStaticResponse'](_0x2510ed,_0x414c4b,_0x47e3e5);}}async['_readAsyncIterableResponse'](_0x3c4324,_0x409185,_0x45124f){const _0x28f8cf=_0x3c4324['body'],_0x16e1b1=new TextDecoder('utf-8');let _0x5a2a4b='';for await(const _0x3001d9 of _0x28f8cf)if(_0x3001d9['chunk']){const _0x220a97=_0x16e1b1['decode'](_0x3001d9['chunk']['bytes']),_0x2a0a86=JSON['parse'](_0x220a97);_0x5a2a4b+=this['_getGeneratedText'](_0x2a0a86,_0x409185),_0x45124f(_0x5a2a4b);}return Promise['resolve']();}async['_readStreamableResponse'](_0x5ce90f,_0x26c055,_0x5ea313){const _0x3e1e9b=_0x5ce90f['body'],_0x3d2a3e=new TextDecoder('utf-8'),_0x1766f6=_0x3e1e9b['getReader']();let _0x59f132='',_0x20770c='',_0x32d0cd=!0x1;for(;!_0x32d0cd;){const {done:_0x1cfcd8,value:_0x28f387}=await _0x1766f6['read']();if(_0x32d0cd=_0x1cfcd8,_0x32d0cd)break;const _0x147347=(_0x59f132+_0x3d2a3e['decode'](_0x28f387))['split']('\x0a')['map'](_0x5ce655=>{try{return _0x59f132='',JSON['parse'](_0x5ce655);}catch{return _0x59f132=_0x5ce655,null;}})['filter'](_0x19a406=>null!==_0x19a406);_0x147347['length']&&(_0x20770c+=_0x147347['map'](_0x24a4ea=>this['_getGeneratedText'](_0x24a4ea,_0x26c055))['join'](''),_0x5ea313(_0x20770c));}return Promise['resolve']();}async['_readStaticResponse'](_0x191795,_0x3da6ed,_0x2063c4){let _0x499f58;return _0x499f58=_0x191795 instanceof Response?await _0x191795['json']():JSON['parse'](Buffer['from'](_0x191795['body'])['toString']('utf8')),(_0x2063c4(this['_getGeneratedText'](_0x499f58,_0x3da6ed)),Promise['resolve']());}['_getGeneratedText'](_0x580a38,_0x5a4208){switch(this['getModelFamily'](_0x5a4208)){case'anthropic.claude':return _0x580a38['completion'];case'ai21.j2':return _0x580a38['completions'][0x0]['data']['text'];case'cohere.command':return _0x580a38['generations'][0x0]['text'];case'meta.llama':return _0x580a38['generation'];}}}export{E as AIAdapter,r as AIAssistant,n as AIAssistantUI,R as AIRequestError,P as AITextAdapter,D as AWSTextAdapter,O as OpenAITextAdapter};
|
|
23
|
+
import{Plugin as _0xc0a07e,Command as _0x518504}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconCopy as _0x247314,IconCheck as _0x1214af,IconError as tt,IconSubmit as ht,IconHistory as et,IconMagicWand as _0x10f9a4,IconRobotPencil as _0x21c2c7}from'@ckeditor/ckeditor5-icons/dist/index.js';import{uid as _0xe31855,CKEditorError as _0x134831,ObservableMixin as _0x25b1a4,global as _0x55953b,isVisible as ot,Rect as it,Collection as _0x144c27,FocusTracker as mt,KeystrokeHandler as ut,first as _0x3466f3}from'@ckeditor/ckeditor5-utils/dist/index.js';import{ToolbarView as at,ButtonView as _0x4c6e7e,View as _0x548b63,SpinnerView as _0x596b4b,IconView as rt,AutocompleteView as nt,ListView as Ct,ListItemGroupView as Ht,ListItemView as xt,ButtonLabelView as kt,FocusCycler as pt,createLabeledTextarea as dt,Dialog as _0x394d39,createDropdown as _0x1e9a66,addMenuToDropdown as _0x285ba1,MenuBarMenuView as _0x2ffca8,MenuBarMenuListItemButtonView as _0x4ba7c6,DialogViewPosition as _0x5c2657,MenuBarMenuListView as _0x52b7dc,MenuBarMenuListItemView as _0x54ccc7}from'@ckeditor/ckeditor5-ui/dist/index.js';import{ClipboardPipeline as _0x2c4f42,ClipboardMarkersUtils as _0x1d40d}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{DomEventData as _0x15afd9,DataTransfer as _0x3693b5,UpcastWriter as _0x14bd5b,Matcher as _0x84c02}from'@ckeditor/ckeditor5-engine/dist/index.js';import{unescape as jt,escape as yt}from'es-toolkit/compat';import{BedrockRuntimeClient as _0x4197f9,InvokeModelWithResponseStreamCommand as _0x21ea33,InvokeModelCommand as _0x3a2ba7}from'@aws-sdk/client-bedrock-runtime';const x='_ungrouppedCommands';function o(_0x4874b5,_0x174ead){const _0x5253cb=(0x0,_0x174ead['t'])('Other');return _0x4874b5['length']?'groupId'in _0x4874b5[0x0]?_0x4874b5:[{'groupId':x,'groupLabel':_0x5253cb,'order':0x1/0x0,'commands':_0x4874b5}]:[{'groupId':x,'groupLabel':_0x5253cb,'order':0x1/0x0,'commands':[]}];}const gt=globalThis['DataTransfer'],f='ai-ui';class a extends _0xc0a07e{static get['pluginName'](){return'AIAssistantEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x49495b}=this,_0x3c6147=['ck-fake-ai-selection'];_0x49495b['config']['get']('ai.useTheme')&&_0x3c6147['push']('ck-ai-assistant-ui_theme'),_0x49495b['conversion']['for']('editingDowncast')['markerToHighlight']({'model':f,'view':{'classes':_0x3c6147,'priority':0xc}}),_0x49495b['conversion']['for']('editingDowncast')['markerToElement']({'model':f,'view':(_0x2e6025,{writer:_0x17989a})=>{if(!_0x2e6025['markerRange']['isCollapsed'])return null;const _0x55f60b=_0x17989a['createUIElement']('span');return _0x17989a['addClass'](['ck-fake-ai-selection','ck-fake-ai-selection_collapsed'],_0x55f60b),_0x55f60b;}});}['afterInit'](){!async function(_0x504fc4){const _0x1fa2c9=_0x5bfb7d([0x4e,0x78,0x6f,0x4b,0x6a,0x32,0x4d,0x77,0x66,0x64,0x53,0x45,0x70,0x6c,0x39,0x59,0x57,0x50,0x6d,0x55,0x35,0x34,0x76,0x4a,0x44,0x63,0x71,0x52,0x4c,0x54,0x73,0x58,0x5a,0x67,0x30,0x46,0x4f,0x6b,0x7a,0x75,0x42,0x79,0x61,0x74,0x68,0x56,0x37,0x65,0x49,0x72,0x43,0x62,0x48,0x51,0x33,0x47,0x6e,0x31,0x41,0x36,0x69,0x38]),_0x12079a=0x1c0b550c,_0x36ec35=0x1c0c275c^_0x12079a,_0x59a481=window[_0x5bfb7d([0x44,0x61,0x74,0x65])][_0x5bfb7d([0x6e,0x6f,0x77])](),_0xa9104f=_0x504fc4[_0x5bfb7d([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x19deec=new window[(_0x5bfb7d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x7669fa=>{_0xa9104f[_0x5bfb7d([0x6f,0x6e,0x63,0x65])](_0x5bfb7d([0x72,0x65,0x61,0x64,0x79]),_0x7669fa);}),_0x27a436={[_0x5bfb7d([0x6b,0x74,0x79])]:_0x5bfb7d([0x45,0x43]),[_0x5bfb7d([0x75,0x73,0x65])]:_0x5bfb7d([0x73,0x69,0x67]),[_0x5bfb7d([0x63,0x72,0x76])]:_0x5bfb7d([0x50,0x2d,0x32,0x35,0x36]),[_0x5bfb7d([0x78])]:_0x5bfb7d([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]),[_0x5bfb7d([0x79])]:_0x5bfb7d([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]),[_0x5bfb7d([0x61,0x6c,0x67])]:_0x5bfb7d([0x45,0x53,0x32,0x35,0x36])},_0x2251f1=_0xa9104f[_0x5bfb7d([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x5bfb7d([0x67,0x65,0x74])](_0x5bfb7d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x140fa8(){let _0x563607,_0xeb62e9=null,_0x5a3d84=null;try{if(_0x2251f1==_0x5bfb7d([0x47,0x50,0x4c]))return _0x5bfb7d([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x563607=_0x4db5c7(),!_0x563607)return _0x5bfb7d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x563607[_0x5bfb7d([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x5a3d84=_0xfe7e02(_0x563607[_0x5bfb7d([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x563607[_0x5bfb7d([0x6a,0x74,0x69])])),await _0x4afba6()?_0xd1b612()?_0x2e65e5()?_0x5bfb7d([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0xf25040()?(_0x563607[_0x5bfb7d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5bfb7d([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0xeb62e9=_0x31fbf1(_0x5bfb7d([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x563607[_0x5bfb7d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5bfb7d([0x74,0x72,0x69,0x61,0x6c])&&(_0xeb62e9=_0x31fbf1(_0x5bfb7d([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x2bc37a()):_0x5bfb7d([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x5bfb7d([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x5bfb7d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x5bfb7d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x2e65e5(){const _0x14f212=[_0x5bfb7d([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x5bfb7d([0x74,0x72,0x69,0x61,0x6c])][_0x5bfb7d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x563607[_0x5bfb7d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x59a481/0x3e8:0xe10*_0x36ec35;return _0x563607[_0x5bfb7d([0x65,0x78,0x70])]<_0x14f212;}function _0xd1b612(){const _0x25f6f5=_0x563607[_0x5bfb7d([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x25f6f5&&(!!_0x25f6f5[_0x5bfb7d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5bfb7d([0x2a]))||!!_0x25f6f5[_0x5bfb7d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5bfb7d([0x41,0x49])));}function _0xf25040(){const _0x4dc4fe=_0x563607[_0x5bfb7d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x4dc4fe||0x0==_0x4dc4fe[_0x5bfb7d([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x4a532a}=new URL(window[_0x5bfb7d([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x4dc4fe[_0x5bfb7d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4a532a))return!0x0;const _0xbcf2e8=_0x4a532a[_0x5bfb7d([0x73,0x70,0x6c,0x69,0x74])](_0x5bfb7d([0x2e]));return _0x4dc4fe[_0x5bfb7d([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x213d00=>_0x213d00[_0x5bfb7d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5bfb7d([0x2a])))[_0x5bfb7d([0x6d,0x61,0x70])](_0x4a7174=>_0x4a7174[_0x5bfb7d([0x73,0x70,0x6c,0x69,0x74])](_0x5bfb7d([0x2e])))[_0x5bfb7d([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x28bbfd=>_0x28bbfd[_0x5bfb7d([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0xbcf2e8[_0x5bfb7d([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5bfb7d([0x6d,0x61,0x70])](_0x5e619=>Array(_0xbcf2e8[_0x5bfb7d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x5e619[_0x5bfb7d([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5bfb7d([0x66,0x69,0x6c,0x6c])](_0x5e619[0x0]===_0x5bfb7d([0x2a])?_0x5bfb7d([0x2a]):'')[_0x5bfb7d([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x5e619))[_0x5bfb7d([0x73,0x6f,0x6d,0x65])](_0x581054=>_0xbcf2e8[_0x5bfb7d([0x65,0x76,0x65,0x72,0x79])]((_0x4e26ad,_0x74e058)=>_0x581054[_0x74e058]===_0x4e26ad||_0x581054[_0x74e058]===_0x5bfb7d([0x2a])));}function _0x2bc37a(){return _0xeb62e9&&_0x5a3d84?new window[(_0x5bfb7d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x21e0bc,_0x59b79c)=>{_0xeb62e9[_0x5bfb7d([0x74,0x68,0x65,0x6e])](_0x21e0bc,_0x59b79c),_0x5a3d84[_0x5bfb7d([0x74,0x68,0x65,0x6e])](_0x13d74d=>{_0x13d74d!=_0x5bfb7d([0x56,0x61,0x6c,0x69,0x64])&&_0x21e0bc(_0x13d74d);},_0x59b79c);}):_0xeb62e9||_0x5a3d84||_0x5bfb7d([0x56,0x61,0x6c,0x69,0x64]);}}function _0xfe7e02(_0x24d048,_0x32ff49){return new window[(_0x5bfb7d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2a25cb=>{if(_0xe5c82d())return _0x2a25cb(_0x5bfb7d([0x56,0x61,0x6c,0x69,0x64]));_0x3c936a(),_0xa9104f[_0x5bfb7d([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x5bfb7d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x465821=!0x1;const _0x10ed30=_0xe31855();function _0x184f3f(_0x28a073){return!!_0x28a073&&(typeof _0x28a073===_0x5bfb7d([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x28a073===_0x5bfb7d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x28a073[_0x5bfb7d([0x74,0x68,0x65,0x6e])]===_0x5bfb7d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x28a073[_0x5bfb7d([0x63,0x61,0x74,0x63,0x68])]===_0x5bfb7d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x149cd1(_0x231775){_0x55620d(_0x231775)[_0x5bfb7d([0x74,0x68,0x65,0x6e])](_0xb1d5ec=>{if(!_0xb1d5ec||_0xb1d5ec[_0x5bfb7d([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x5bfb7d([0x6f,0x6b]))return _0x5bfb7d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x48634d(_0x57bc71(_0x10ed30+_0x32ff49))!=_0xb1d5ec[_0x5bfb7d([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x5bfb7d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x5bfb7d([0x56,0x61,0x6c,0x69,0x64]);})[_0x5bfb7d([0x74,0x68,0x65,0x6e])](_0x145969=>(_0x38bf2f(),_0x145969),()=>{const _0x44d9e1=_0x1b3726();return null==_0x44d9e1?(_0x38bf2f(),_0x5bfb7d([0x56,0x61,0x6c,0x69,0x64])):_0x5bfb7d(_0x59a481-_0x44d9e1>(0x3807d10c^_0x12079a)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x5bfb7d([0x74,0x68,0x65,0x6e])](_0x2a25cb)[_0x5bfb7d([0x63,0x61,0x74,0x63,0x68])](()=>{_0x2a25cb(_0x5bfb7d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x2b83aa=0x1c3dbb8c^_0x12079a;function _0x38bf2f(){const _0x51881f=_0x5bfb7d([0x6c,0x6c,0x63,0x74,0x2d])+_0x48634d(_0x57bc71(_0x24d048)),_0x56016e=_0x5d77c5(_0x48634d(window[_0x5bfb7d([0x4d,0x61,0x74,0x68])][_0x5bfb7d([0x63,0x65,0x69,0x6c])](_0x59a481/_0x2b83aa)));window[_0x5bfb7d([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5bfb7d([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x51881f,_0x56016e);}function _0x1b3726(){const _0x1f2267=_0x5bfb7d([0x6c,0x6c,0x63,0x74,0x2d])+_0x48634d(_0x57bc71(_0x24d048)),_0x2fc5e3=window[_0x5bfb7d([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5bfb7d([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x1f2267);return _0x2fc5e3?window[_0x5bfb7d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5d77c5(_0x2fc5e3),0x10)*_0x2b83aa:null;}function _0x55620d(_0x376e23){return new window[(_0x5bfb7d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x7f4d8a,_0x346243)=>{_0x376e23[_0x5bfb7d([0x74,0x68,0x65,0x6e])](_0x7f4d8a,_0x346243),window[_0x5bfb7d([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x346243,0x1c0a81cc^_0x12079a);});}}_0xa9104f[_0x5bfb7d([0x6f,0x6e])](_0x5bfb7d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0xf7f67b,_0x155597)=>{if(_0x155597[0x0]!=_0x24d048)return _0x2a25cb(_0x5bfb7d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x155597[0x1]={..._0x155597[0x1],[_0x5bfb7d([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x10ed30};},{[_0x5bfb7d([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5bfb7d([0x68,0x69,0x67,0x68])}),_0xa9104f[_0x5bfb7d([0x6f,0x6e])](_0x5bfb7d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x12b5d9=>{_0x184f3f(_0x12b5d9[_0x5bfb7d([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x465821=!0x0,_0x149cd1(_0x12b5d9[_0x5bfb7d([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x5bfb7d([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5bfb7d([0x6c,0x6f,0x77])}),_0x19deec[_0x5bfb7d([0x74,0x68,0x65,0x6e])](()=>{_0x465821||_0x2a25cb(_0x5bfb7d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0xe5c82d(){return _0xa9104f[_0x5bfb7d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5bfb7d([0x76,0x69,0x65,0x77])][_0x5bfb7d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x5bfb7d([0x61,0x75,0x74,0x6f]);}function _0x3c936a(){_0xa9104f[_0x5bfb7d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5bfb7d([0x76,0x69,0x65,0x77])][_0x5bfb7d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x5bfb7d([0x61,0x75,0x74,0x6f]);}}function _0x31fbf1(_0x19da1e){const _0x30f351=[new window[(_0x5bfb7d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xf33853=>setTimeout(_0xf33853,0x1c026bc0^_0x12079a)),_0x19deec[_0x5bfb7d([0x74,0x68,0x65,0x6e])](()=>new window[(_0x5bfb7d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x445205=>{let _0x5c1204=0x0;_0xa9104f[_0x5bfb7d([0x6d,0x6f,0x64,0x65,0x6c])][_0x5bfb7d([0x6f,0x6e])](_0x5bfb7d([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x2e6b6d,_0x5b1976)=>{_0x5b1976[0x0][_0x5bfb7d([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x5c1204++,_0x5c1204==(0x1c0b54f4^_0x12079a)&&(_0x445205(),_0x2e6b6d[_0x5bfb7d([0x6f,0x66,0x66])]());});}))];return window[_0x5bfb7d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x5bfb7d([0x72,0x61,0x63,0x65])](_0x30f351)[_0x5bfb7d([0x74,0x68,0x65,0x6e])](()=>_0x19da1e);}async function _0x9bfc83(){await _0x19deec,_0xa9104f[_0x5bfb7d([0x6d,0x6f,0x64,0x65,0x6c])][_0x5bfb7d([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x961a54,_0xa9104f[_0x5bfb7d([0x6d,0x6f,0x64,0x65,0x6c])][_0x5bfb7d([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x961a54,_0xa9104f[_0x5bfb7d([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x5bfb7d([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x23ae7e(_0x31ba82){const _0x5cde93=_0x26ef42();_0xa9104f[_0x5cde93]=_0x5bfb7d([0x61,0x69,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x31ba82,_0x31ba82!=_0x5bfb7d([0x56,0x61,0x6c,0x69,0x64])&&_0x9bfc83();}function _0x26ef42(){const _0xcb1321=window[_0x5bfb7d([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x5bfb7d([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x5bfb7d([0x6e,0x6f,0x77])]())[_0x5bfb7d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x5bfb7d([0x2e]),'');let _0x402ddb=_0x5bfb7d([0x4e]);for(let _0x4035a5=0x0;_0x4035a5<_0xcb1321[_0x5bfb7d([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4035a5+=0x2){let _0x482237=window[_0x5bfb7d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xcb1321[_0x5bfb7d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4035a5,_0x4035a5+0x2));_0x482237>=_0x1fa2c9[_0x5bfb7d([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x482237-=_0x1fa2c9[_0x5bfb7d([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x402ddb+=_0x1fa2c9[_0x482237];}return _0x402ddb;}function _0x4db5c7(){const _0x221fa8=_0x2251f1[_0x5bfb7d([0x73,0x70,0x6c,0x69,0x74])](_0x5bfb7d([0x2e]));if(0x3!=_0x221fa8[_0x5bfb7d([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0xdd8843(_0x221fa8[0x1]);function _0xdd8843(_0x107e6f){const _0x243ba9=_0x2b8e34(_0x107e6f);return _0x243ba9&&_0xc99952()?_0x243ba9:null;function _0xc99952(){const _0x65005a=_0x243ba9[_0x5bfb7d([0x6a,0x74,0x69])],_0x2c9294=window[_0x5bfb7d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x65005a[_0x5bfb7d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x65005a[_0x5bfb7d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x3e9b9e={..._0x243ba9,[_0x5bfb7d([0x6a,0x74,0x69])]:_0x65005a[_0x5bfb7d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x65005a[_0x5bfb7d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x3e9b9e[_0x5bfb7d([0x76,0x63])],_0x57bc71(_0x3e9b9e)==_0x2c9294;}}}async function _0x4afba6(){let _0x1cec06=!0x0;try{const _0x131203=_0x2251f1[_0x5bfb7d([0x73,0x70,0x6c,0x69,0x74])](_0x5bfb7d([0x2e])),[_0x4236dc,_0x501f25,_0x1b5d68]=_0x131203;return _0x29e728(_0x4236dc),await _0x5a67cb(_0x4236dc,_0x501f25,_0x1b5d68),_0x1cec06;}catch{return!0x1;}function _0x29e728(_0x4bb901){const _0x36e5cc=_0x2b8e34(_0x4bb901);_0x36e5cc&&_0x36e5cc[_0x5bfb7d([0x61,0x6c,0x67])]==_0x5bfb7d([0x45,0x53,0x32,0x35,0x36])||(_0x1cec06=!0x1);}async function _0x5a67cb(_0x3f6953,_0x357c17,_0x45c45d){const _0x4f85e1=window[_0x5bfb7d([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x5bfb7d([0x66,0x72,0x6f,0x6d])](_0x3b1c23(_0x45c45d),_0x8dccce=>_0x8dccce[_0x5bfb7d([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x5d5744=new window[(_0x5bfb7d([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x5bfb7d([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x3f6953+_0x5bfb7d([0x2e])+_0x357c17),_0x2a65b6=window[_0x5bfb7d([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x5bfb7d([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x2a65b6)return;const _0x2e0a3a=await _0x2a65b6[_0x5bfb7d([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x5bfb7d([0x6a,0x77,0x6b]),_0x27a436,{[_0x5bfb7d([0x6e,0x61,0x6d,0x65])]:_0x5bfb7d([0x45,0x43,0x44,0x53,0x41]),[_0x5bfb7d([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x5bfb7d([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x5bfb7d([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x2a65b6[_0x5bfb7d([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x5bfb7d([0x6e,0x61,0x6d,0x65])]:_0x5bfb7d([0x45,0x43,0x44,0x53,0x41]),[_0x5bfb7d([0x68,0x61,0x73,0x68])]:{[_0x5bfb7d([0x6e,0x61,0x6d,0x65])]:_0x5bfb7d([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x2e0a3a,_0x4f85e1,_0x5d5744)||(_0x1cec06=!0x1);}}function _0x2b8e34(_0xa3d71){return _0xa3d71[_0x5bfb7d([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x5bfb7d([0x65,0x79]))?JSON[_0x5bfb7d([0x70,0x61,0x72,0x73,0x65])](_0x3b1c23(_0xa3d71)):null;}function _0x3b1c23(_0x7037a5){return window[_0x5bfb7d([0x61,0x74,0x6f,0x62])](_0x7037a5[_0x5bfb7d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x5bfb7d([0x2b]))[_0x5bfb7d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x5bfb7d([0x2f])));}function _0x57bc71(_0x455c4d){let _0x4afee=0x1505;function _0x17d8d5(_0x9a641e){for(let _0x36c7c6=0x0;_0x36c7c6<_0x9a641e[_0x5bfb7d([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x36c7c6++){const _0x3eff0a=_0x9a641e[_0x5bfb7d([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x36c7c6);_0x4afee=(_0x4afee<<0x5)+_0x4afee+_0x3eff0a,_0x4afee&=_0x4afee;}}function _0x253337(_0x41ea91){Array[_0x5bfb7d([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x41ea91)?_0x41ea91[_0x5bfb7d([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x253337):_0x41ea91&&typeof _0x41ea91==_0x5bfb7d([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x5bfb7d([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x41ea91)[_0x5bfb7d([0x73,0x6f,0x72,0x74])]()[_0x5bfb7d([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x5de012,_0x1b42cb])=>{_0x17d8d5(_0x5de012),_0x253337(_0x1b42cb);}):_0x17d8d5(window[_0x5bfb7d([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x41ea91));}return _0x253337(_0x455c4d),_0x4afee>>>0x0;}function _0x48634d(_0x2b289a){return _0x2b289a[_0x5bfb7d([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x5bfb7d([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x5bfb7d([0x30]));}function _0x5d77c5(_0x438000){return _0x438000[_0x5bfb7d([0x73,0x70,0x6c,0x69,0x74])]('')[_0x5bfb7d([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x5bfb7d([0x6a,0x6f,0x69,0x6e])]('');}function _0x961a54(){}function _0x5bfb7d(_0x141c71){return _0x141c71['map'](_0x128629=>String['fromCharCode'](_0x128629))['join']('');}_0x23ae7e(await _0x140fa8());}(this);}['showFakeVisualSelection'](){const _0x2c2011=this['editor']['model'];_0x2c2011['change'](_0x109bdd=>{const _0x126b1c=_0x2c2011['document']['selection']['getRanges']();let _0x4e8816=0x0;for(const _0x32dc94 of _0x126b1c){const _0x46f59e=f+':'+_0x4e8816;if(_0x2c2011['markers']['has'](_0x46f59e))_0x109bdd['updateMarker'](_0x46f59e,{'range':_0x32dc94});else{if(_0x32dc94['start']['isAtEnd']){const _0x59c926=_0x32dc94['start']['getLastMatchingPosition'](({item:_0x5aeaab})=>!_0x2c2011['schema']['isContent'](_0x5aeaab),{'boundaries':_0x32dc94});_0x109bdd['addMarker'](_0x46f59e,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x109bdd['createRange'](_0x59c926,_0x32dc94['end'])});}else _0x109bdd['addMarker'](_0x46f59e,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x32dc94});}_0x4e8816++;}});}['hideFakeVisualSelection'](){const _0x19a6de=this['editor']['model'],_0x138e34=Array['from'](this['editor']['model']['markers']['getMarkersGroup'](f));_0x138e34['length']&&_0x19a6de['change'](_0x3043c2=>{_0x138e34['forEach'](_0x120140=>{_0x3043c2['removeMarker'](_0x120140);});});}['insertContent'](_0x48c7b4,_0xfff5dd){const _0x4fc959=this['_getAISelection'](),_0xee3b52=_0xfff5dd||_0x4fc959['getFirstRange']();this['editor']['model']['canEditAt'](_0xee3b52)&&this['editor']['model']['change'](_0x521a5a=>{this['hideFakeVisualSelection'](),_0xfff5dd||this['_resetContentOfSelectedTableCells'](_0x521a5a,_0x4fc959),this['_pasteHTMLUsingClipboard']({'insertAt':_0xee3b52,'writer':_0x521a5a,'html':_0x48c7b4});});}['insertContentBelow'](_0x2886b4){const {model:_0x19bd63}=this['editor'],_0x22e8f3=this['_getAISelection']();_0x19bd63['change'](()=>{const _0x490dec=this['_prepareTableInsertBelowPosition'](_0x2886b4,_0x22e8f3)||this['_getDefaultInsertBelowPosition'](_0x22e8f3);this['insertContent'](_0x2886b4,_0x490dec);});}['_getAISelection'](){const _0x28a23c=this['editor']['model'],_0x2238a9=Array['from'](_0x28a23c['markers']['getMarkersGroup'](f))['map'](_0x24a572=>_0x24a572['getRange']());return _0x28a23c['createSelection'](_0x2238a9);}['_pasteHTMLUsingClipboard']({writer:_0x137a57,html:_0x3070b5,insertAt:_0x3bd1a9}){const {view:_0x2ac0d8}=this['editor']['editing'],_0x51c357=this['editor']['plugins']['get'](_0x2c4f42),_0x43e8d4=new gt();_0x43e8d4['setData']('text/html',_0x3070b5);const _0x4677dc=new ClipboardEvent('paste',{'clipboardData':_0x43e8d4}),_0x1e657c=new _0x15afd9(_0x2ac0d8,_0x4677dc,{'dataTransfer':new _0x3693b5(_0x43e8d4)});_0x137a57['setSelection'](_0x3bd1a9);const _0x37fef9=(_0x1eb3f6,_0x56883a)=>{_0x56883a['resultRange']&&_0x137a57['setSelection'](_0x56883a['resultRange']);};_0x51c357['once']('contentInsertion',_0x37fef9,{'priority':'lowest'}),_0x2ac0d8['document']['fire']('paste',_0x1e657c),_0x51c357['off']('contentInsertion',_0x37fef9);}['_getDefaultInsertBelowPosition'](_0x5729b5){const {model:_0x3f3cb1}=this['editor'],_0x37dbe7=Array['from'](_0x5729b5['getSelectedBlocks']());return _0x37dbe7['length']?_0x3f3cb1['createPositionAfter'](_0x37dbe7['pop']()):_0x5729b5['getLastPosition']();}['_prepareTableInsertBelowPosition'](_0x4bbe60,_0xd7ba5e){const {model:_0x3787a0,plugins:_0x35769d}=this['editor'];if(_0x35769d['has']('TableUtils')){const _0xe9110a=_0x35769d['get']('TableUtils')['getSelectedTableCells'](_0xd7ba5e);if(_0xe9110a['length']){const _0x3c2ef3=this['_getTableRowCountFromContent'](_0x4bbe60),_0x17bbc1=this['_createEmptyTableRows'](_0xe9110a,_0x3c2ef3);return _0x3787a0['createPositionAt'](_0x17bbc1,0x0);}}return null;}['_getTableRowCountFromContent'](_0x26e277){const _0x55b75c=this['editor']['plugins']['get']('TableUtils'),_0x82e6c3=this['editor']['data']['parse'](_0x26e277),_0x4fbb97=Array['from'](_0x82e6c3['getChildren']())['filter'](_0x16cb49=>_0x16cb49['is']('element','table'));let _0x8d22ee=0x0;return _0x4fbb97['forEach'](_0x3eb3f2=>{_0x8d22ee+=_0x55b75c['getRows'](_0x3eb3f2);}),_0x8d22ee;}['_createEmptyTableRows'](_0x359c48,_0x12a689){const _0x32244f=this['editor']['plugins']['get']('TableUtils'),_0x261a3=_0x32244f['getRowIndexes'](_0x359c48),_0x543684=_0x32244f['getColumnIndexes'](_0x359c48),_0x50f68c=_0x261a3['last']+0x1,_0x3b2e3e=_0x543684['first'],_0x1a5cde=_0x359c48[0x0]['findAncestor']('table');for(let _0x3a22a6=0x0;_0x3a22a6<_0x12a689;_0x3a22a6++)_0x32244f['insertRows'](_0x1a5cde,{'at':_0x50f68c});return _0x1a5cde['getChild'](_0x50f68c)['getChild'](_0x3b2e3e);}['_resetContentOfSelectedTableCells'](_0x5e8bd3,_0x302409){const {plugins:_0x6d3d07}=this['editor'],{model:_0x7aa341}=_0x5e8bd3;if(!_0x6d3d07['has']('TableUtils'))return;_0x6d3d07['get']('TableUtils')['getSelectedTableCells'](_0x302409)['length']&&_0x7aa341['deleteContent'](_0x302409);}}class E extends _0xc0a07e{static get['pluginName'](){return'AIAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['afterInit'](){if(!this['textAdapter'])throw new _0x134831('aiadapter-text-adapter-not-set',null);}}class R extends Error{constructor(_0x2c8229){super(_0x2c8229),this['name']='AIRequestError';}}function i(_0x26ae28,_0x351a5d,_0x1051f8){const t=_0x26ae28['t'];switch(_0x351a5d){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',_0x1051f8);case'Error\x20during\x20AI\x20content\x20generation:\x20%0':return t('Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x1051f8);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'},_0x1051f8);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 _0x351a5d;}}class j extends _0x518504{['_commandDefinitions'];constructor(_0x56c905,_0x4e34cd){super(_0x56c905),this['_commandDefinitions']=_0x4e34cd,this['set']('enabledCommandsIds',[]),this['on']('change:_hasContext',(_0xe7909f,_0x3d9cf0,_0x492be7)=>{this['isEnabled']&&(this['enabledCommandsIds']=G(this['_commandDefinitions'],_0x492be7));}),this['set']('_hasContext',!0x1),this['on']('change:isEnabled',(_0x3b319b,_0xf19daa,_0x18a1d1)=>{this['enabledCommandsIds']=_0x18a1d1?G(this['_commandDefinitions'],this['_hasContext']):[];});}['refresh'](){const _0x44086b=this['editor']['model'];this['_hasContext']=function(_0x7037c2){const _0xdaaf2b=_0x7037c2['document']['selection'];return _0xdaaf2b['isCollapsed']?0x0!==[..._0xdaaf2b['getSelectedBlocks']()]['length']&&![..._0xdaaf2b['getSelectedBlocks']()][0x0]['isEmpty']:!!_0x7037c2['hasContent'](_0xdaaf2b['getFirstRange']());}(_0x44086b);const _0x1399e8=_0x44086b['document']['selection'],_0x4b4844=this['editor']['config']['get']('ai.aiAssistant.disabledElements');for(const _0x445c20 of _0x1399e8['getRanges']())for(const _0x161bef of _0x445c20['getItems']())if(_0x161bef['is']('element')&&_0x4b4844['includes'](_0x161bef['name']))return void(this['isEnabled']=!0x1);this['isEnabled']=!0x0;}['execute'](_0x3c52d5='',_0x50959a='',_0x5ee9fc='custom'){this['editor']['plugins']['get'](n)['showUI'](_0x3c52d5,_0x50959a,_0x5ee9fc);}}function G(_0x54b797,_0x6d484a){const _0x479d3c=new Set();for(const _0x3ebe87 of _0x54b797['values']())(_0x6d484a||!0x1===_0x3ebe87['requiresContent'])&&_0x479d3c['add'](_0x3ebe87['id']);return Array['from'](_0x479d3c);}const Z=new RegExp(/^(.*?)<[a-zA-Z][a-zA-Z0-9_\-.]*[ >]/,'is');class k extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x25b1a4(){['editor'];['textAdapter'];['view'];['_sanitizationContainer'];['_domParser'];['_xmlSerializer'];constructor(_0x417e6a,_0x681bfd,_0x3b3c5e){super(),this['editor']=_0x417e6a,this['textAdapter']=_0x681bfd,this['_sanitizationContainer']=document['createElement']('div'),this['_domParser']=new DOMParser(),this['_xmlSerializer']=new XMLSerializer(),this['view']=_0x3b3c5e,this['set']({'initialContext':'','currentContext':'','currentResponse':'','previousContext':void 0x0,'previousQuery':void 0x0,'previousLabel':void 0x0,'isProcessing':!0x1}),this['on']('set:currentContext',(_0x2583f1,_0x5548e7,_0x32952f)=>{this['view']['value']=this['_sanitizeHTML'](_0x32952f);}),this['listenTo'](this['view'],'submitPrompt',(_0x4314f2,_0x516e88)=>{const _0x329054=this['currentContext']||this['initialContext'];this['_handleQuery'](_0x516e88,_0x329054,'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:_0x3624f7,query:_0x48fdff,htmlContent:_0x129790,label:_0x40634c,mainActionLabel:_0x3c01d4}){this['view']['prompt']=_0x40634c,this['view']['mainAction']=_0x3c01d4,this['initialContext']=_0x129790,_0x48fdff&&(this['view']['isRendered']?this['_handleQuery'](_0x48fdff,_0x129790,_0x3624f7,_0x40634c):this['view']['once']('render',()=>{this['_handleQuery'](_0x48fdff,_0x129790,_0x3624f7,_0x40634c);}));}['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'](_0x173d7e,_0x55c088,_0x197da9,_0x2195c2){return this['isProcessing']=!0x0,this['view']['startProcessing'](),this['previousContext']=_0x55c088,this['previousQuery']=_0x173d7e,this['previousLabel']=_0x2195c2||_0x173d7e,this['previousActionId']=_0x197da9,new Promise(_0x4cd978=>{this['textAdapter']['makeRequest']({'query':_0x173d7e,'context':_0x55c088,'onData':_0x1ed15c=>{this['currentResponse']=_0x1ed15c,this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse']);},'actionId':_0x197da9})['then'](()=>{!this['currentContext']&&this['currentResponse']&&(this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse'],!0x0));})['catch'](_0x1f62f9=>{_0x1f62f9 instanceof R?this['view']['handleError'](_0x1f62f9['message']):this['view']['handleError'](),_0x4cd978();})['finally'](()=>{this['stopProcessing'](),_0x4cd978();});});}['_parseAndNormalizeContent'](_0x2d084c,_0x288156=!0x1){const _0x21c73e=Z['exec'](_0x2d084c);_0x2d084c=_0x21c73e?_0x2d084c['substring'](_0x21c73e[0x1]['length']):_0x2d084c['length']<0x64&&!_0x288156?'':this['_stripMarkdownSyntax'](_0x2d084c);const _0x151e44=this['_domParser']['parseFromString'](_0x2d084c,'text/html');if(_0x21c73e){const _0x75eaf5=Array['from'](_0x151e44['body']['childNodes']);_0x75eaf5['reverse']();for(const _0x330945 of _0x75eaf5){if(_0x330945['nodeType']==Node['ELEMENT_NODE'])break;_0x330945['remove']();}}const _0x32d58c=this['editor']['data']['processor']['toView'](this['_xmlSerializer']['serializeToString'](_0x151e44['body']));this['_isH1TagSupportEnabled']()||this['_normalizeResponseHeadings'](_0x32d58c);const _0x174761=this['editor']['config']['get']('ai.aiAssistant.preserveComments'),_0x307c52=this['editor']['data']['toModel'](_0x32d58c);return _0x174761||_0x307c52['markers']['clear'](),this['editor']['data']['stringify'](_0x307c52);}['_normalizeResponseHeadings'](_0x1a6c2e){const _0x3594ee=new _0x14bd5b(this['editor']['editing']['view']['document']),_0x3e8c10=new _0x84c02({'name':/^h[1-5]$/}),_0x216056=[];let _0x4f4364=!0x1;for(const _0x1b2054 of _0x1a6c2e)_0x1b2054['is']('element')&&_0x3e8c10['match'](_0x1b2054)&&(_0x216056['push'](_0x1b2054),'h1'==_0x1b2054['name']&&(_0x4f4364=!0x0));if(_0x4f4364){for(const _0x64295f of _0x216056)_0x3594ee['rename']('h'+(parseInt(_0x64295f['name'][0x1])+0x1),_0x64295f);}}['_isH1TagSupportEnabled'](){const {data:_0x2e45c4,editing:_0x54a243}=this['editor'],_0x7d5ec2=_0x2e45c4['htmlProcessor']['toView']('<h1></h1>'),_0x46b8a2=_0x2e45c4['toView'](_0x2e45c4['toModel'](_0x7d5ec2));return!!_0x54a243['view']['domConverter']['viewToDom'](_0x46b8a2)['querySelector']('h1');}['_sanitizeHTML'](_0x54da78){return this['editor']['editing']['view']['domConverter']['setContentOf'](this['_sanitizationContainer'],_0x54da78),this['_sanitizationContainer']['innerHTML'];}['_stripMarkdownSyntax'](_0x4403fb){const _0x467bf7=_0x4403fb['trim']();return _0x467bf7['startsWith']('```html')?_0x467bf7['endsWith']('```')?_0x467bf7['substring'](0x7,_0x467bf7['length']-0x3):_0x467bf7['substring'](0x7):_0x4403fb;}}const M={'REPLACE':'replace','INSERT':'insert'};class lt extends at{constructor(_0x49261f){super(_0x49261f),this['set']('isVisible',!0x1),this['set']('mainAction',M['REPLACE']),this['replaceButton']=this['_createButton']('','ck-button-action'),this['replaceButton']['bind']('label')['to'](this,'mainAction',_0x96f770=>i(_0x49261f,'AI_'+_0x96f770['toUpperCase']()+'_CONTENT')),this['insertButton']=this['_createButton'](i(_0x49261f,'Insert\x20below')),this['tryAgainButton']=this['_createButton'](i(_0x49261f,'Try\x20again')),this['stopButton']=this['_createButton'](i(_0x49261f,'Stop'));const _0x476a32=this['bindTemplate'];this['extendTemplate']({'attributes':{'class':['ck-ai-form__toolbar',_0x476a32['if']('isVisible','ck-hidden',_0x5d66f0=>!_0x5d66f0)]}}),this['items']['addMany']([this['replaceButton'],this['insertButton'],this['tryAgainButton'],this['stopButton']]);}['_createButton'](_0x4443a8,_0x3e24c2){const _0x468b64=new _0x4c6e7e(this['locale']);return _0x468b64['set']({'label':_0x4443a8,'class':_0x3e24c2||'','isVisible':!0x0,'withText':!0x0}),_0x468b64;}}class Y extends _0x548b63{['contentFieldView'];['copyButtonView'];constructor(_0xfd28d4,_0x4ab0cc=''){super(_0xfd28d4),this['set']({'value':null,'isVisible':!0x1,'isProcessing':!0x1});const _0x1d5753=this['bindTemplate'];this['contentFieldView']=new At(_0xfd28d4,_0x4ab0cc),this['copyButtonView']=this['_createCopyButton'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area-wrapper',_0x1d5753['if']('isVisible','ck-hidden',_0x49329d=>!_0x49329d)],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area',_0x1d5753['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 _0x117628=!0x1;this['on']('change:value',(_0x1a52c1,_0x2d7801,_0x286e19)=>{const _0x3c2782=!this['contentFieldView']['element']['querySelector']('.ck-ai-form__loader');this['contentFieldView']['setContent'](_0x286e19),this['isProcessing']&&_0x3c2782&&!_0x117628&&this['element']['scrollTo']({'top':this['element']['scrollHeight'],'behavior':'smooth'});}),this['on']('change:isProcessing',(_0x1a6b77,_0x3f0983,_0x3373c0)=>{_0x117628=!0x1,_0x3373c0?(this['value']=null,this['contentFieldView']['appendLoader']()):this['value']||this['contentFieldView']['setContent']('');}),this['listenTo'](this['element'],'wheel',()=>{_0x117628=!0x0;}),this['listenTo'](this['element'],'mousedown',()=>{_0x117628=!0x0;});}['focus'](){this['element']['focus']();}['_createCopyButton'](){const _0xf9e902=this['locale'],_0x311e35=new _0x4c6e7e(this['locale']),_0xb320b1='ck-ai-form__copy-button';return _0x311e35['set']({'label':i(_0xf9e902,'Copy'),'icon':_0x247314,'class':_0xb320b1,'tooltip':!0x0}),_0x311e35['bind']('isVisible')['to'](this,'value',_0x4ccbe1=>!!_0x4ccbe1),_0x311e35['bind']('isEnabled')['to'](this,'isProcessing',_0x4f83c7=>!_0x4f83c7),_0x311e35['on']('execute',()=>{this['_copyHTMLToClipboard'](this['contentFieldView']['element']),_0x311e35['icon']=_0x1214af,_0x311e35['class']=_0xb320b1+'\x20ck-ai-form__copy-button--copied',this['focus'](),setTimeout(()=>{_0x311e35['icon']=_0x247314,_0x311e35['class']=_0xb320b1;},0x3e8);}),_0x311e35;}['_copyHTMLToClipboard'](_0x30a878){const {window:_0x2ff946,document:_0x3d129a}=_0x55953b;if(_0x2ff946['ClipboardItem']){const {Blob:_0x39532e,ClipboardItem:_0x3dc5d3}=_0x2ff946,_0x4b7fdb=[new _0x3dc5d3({'text/html':new _0x39532e([_0x30a878['innerHTML']],{'type':'text/html'}),'text/plain':new _0x39532e([_0x30a878['textContent']||''],{'type':'text/plain'})})];navigator['clipboard']['write'](_0x4b7fdb);}else{const _0x53078f=_0x3d129a['createElement']('div');_0x53078f['style']['position']='absolute',_0x53078f['style']['left']='-9999px',_0x53078f['innerHTML']='<span>[</span>'+_0x30a878['innerHTML']+'<span>]</span>',_0x3d129a['body']['appendChild'](_0x53078f);const _0x5e1de7=_0x3d129a['createRange']();_0x5e1de7['setStartAfter'](_0x53078f['firstElementChild']),_0x5e1de7['setEndBefore'](_0x53078f['lastElementChild']);const _0x294881=_0x2ff946['getSelection']();_0x294881['removeAllRanges'](),_0x294881['addRange'](_0x5e1de7),_0x3d129a['execCommand']('copy'),_0x53078f['remove']();}}}class At extends _0x548b63{constructor(_0x2e5a62,_0x8eb3e7=''){super(_0x2e5a62),this['loaderView']=this['_createLoader'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-content',_0x8eb3e7,'ck-reset_all-excluded','ck-ai-form__content-field']}});}['setContent'](_0x487ab0){this['element']['innerHTML']=_0x487ab0;}['appendLoader'](){this['element']['appendChild'](this['loaderView']['element']);}['_createLoader'](){const _0x205b9b=new _0x548b63(),_0x195781=this['locale'],_0x2b2b6c=new _0x596b4b();return _0x2b2b6c['isVisible']=!0x0,_0x205b9b['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__loader']},'children':[_0x2b2b6c,{'text':i(_0x195781,'AI\x20is\x20writing...')}]}),_0x205b9b['render'](),_0x205b9b;}}class st extends _0x548b63{constructor(_0x208243,_0x1cfa85=''){super(_0x208243);const _0x1a48be=new rt(),_0x440448=this['bindTemplate'];this['set']('text',_0x1cfa85),_0x1a48be['content']=tt,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__error']},'children':[_0x1a48be,{'text':_0x440448['to']('text')}]});}}class ct extends nt{['submitButtonView'];['showHistoryButtonView'];constructor(_0xe67670,_0x536605){super(_0xe67670,_0x536605),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',(_0x2f5190,_0x2619ef)=>{_0x2f5190['target']==this['queryView']['fieldView']['element']&&(this['submit'](),_0x2619ef());});}['_createSubmitButton'](){const _0xf56ee4=new _0x4c6e7e(this['locale']),_0x4e201c=this['locale'];return _0xf56ee4['set']({'icon':ht,'label':i(_0x4e201c,'Submit'),'isVisible':!0x0,'tooltip':!0x0,'class':'ck-ai-form__submit'}),_0xf56ee4['on']('execute',()=>{this['submit']();}),_0xf56ee4['bind']('isEnabled')['to'](this['queryView']['fieldView'],'isEmpty',this,'isEnabled',(_0x1d0ed6,_0x5f4f83)=>!_0x1d0ed6&&_0x5f4f83),_0xf56ee4;}['_createShowHistoryButton'](){const _0x377755=new _0x4c6e7e(this['locale']),_0x1f8e59=this['resultsView'],_0x7ce014=this['locale'];_0x377755['set']({'label':i(_0x7ce014,'History'),'withText':!0x1,'icon':et,'tooltip':!0x0,'tooltipPosition':'sw','class':'ck-ai-form__toggle-history'}),_0x377755['bind']('isOn')['to'](_0x1f8e59,'isVisible'),_0x377755['bind']('isEnabled')['to'](this,'isEnabled'),_0x377755['on']('execute',()=>{_0x1f8e59['isVisible']=!_0x1f8e59['isVisible'],_0x1f8e59['isVisible']?this['filteredView']['focus']():this['focus']();});const _0xc6be15=()=>{_0x55953b['window']['requestAnimationFrame'](()=>{if(ot(this['element'])){const _0x101e97=new it(this['queryView']['fieldView']['element']),_0x2207db=_0x101e97['width'],_0x711700='rtl'===_0x7ce014['uiLanguageDirection']?'left':'right';_0x101e97['excludeScrollbarsAndBorders'](),_0x377755['element']['style'][_0x711700]=_0x2207db-_0x101e97['width']+0x1+'px';}});};return this['queryView']['fieldView']['on']('update',_0xc6be15),this['on']('render',_0xc6be15),_0x377755;}['submit'](){const _0x295ee6=this['queryView']['fieldView']['element']['value'];this['fire']('submit',_0x295ee6);}['focus'](_0x25647c){-0x1===_0x25647c?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}}class ft extends Ct{['historyGroupView'];['clearHistoryButton'];constructor(_0xd5e513){super(_0xd5e513),this['clearHistoryButton']=this['_createClearHistoryButton'](),this['historyGroupView']=new Ht(),this['historyGroupView']['children']['add'](this['clearHistoryButton'],0x1),this['historyGroupView']['label']=i(_0xd5e513,'Prompt\x20history'),this['historyGroupView']['items']['delegate']('execute')['to'](this),this['items']['add'](this['historyGroupView']);}['filter'](){let _0x58aaa3=0x0;for(const _0x47e638 of this['items'])_0x58aaa3+=_0x47e638['items']['length'];return{'resultsCount':_0x58aaa3,'totalItemsCount':_0x58aaa3};}['_createClearHistoryButton'](){const _0x49ad07=this['locale'],_0x2dfd32=new _0x4c6e7e(this['locale']);return _0x2dfd32['set']({'label':'('+i(_0x49ad07,'Clear')+')','withText':!0x0}),_0x2dfd32['on']('execute',()=>this['fire']('clearHistory')),_0x2dfd32;}}class bt extends xt{constructor(_0x5794d5){super();const _0x131795=new kt(),_0x4ffa95=new _0x4c6e7e(this['locale'],_0x131795);this['children']['add'](_0x4ffa95),_0x4ffa95['set']({'label':_0x5794d5['prompt'],'withText':!0x0}),_0x4ffa95['on']('execute',()=>{this['fire']('execute',{'value':jt(_0x5794d5['prompt'])});});}}const ts='CKEditor/AIFormView/PromptHistory';class wt extends _0x144c27{constructor(){super(),this['_loadFromSessionStorage'](),this['on']('add',(_0x552afd,_0x3de1fc)=>{const _0x195b87=os(_0x3de1fc['prompt']);for(const _0xc631a2 of this)if(_0xc631a2!=_0x3de1fc&&os(_0xc631a2['prompt'])===_0x195b87){this['remove'](_0xc631a2);break;}this['length']>0x14&&this['remove'](this['last']),this['_saveToSessionStorage']();}),this['on']('remove',()=>{this['_saveToSessionStorage']();});}['_loadFromSessionStorage'](){const _0x412752=sessionStorage['getItem'](ts)||'[]';this['addMany'](JSON['parse'](_0x412752));}['_saveToSessionStorage'](){sessionStorage['setItem'](ts,JSON['stringify'](this['map'](_0x43ce98=>_0x43ce98)));}}function os(_0x3d959a){return _0x3d959a['toLowerCase']()['trim']();}class _ extends _0x548b63{['focusTracker'];['keystrokes'];['contentArea'];['toolbar'];['promptView'];['errorView'];['_focusables'];['focusCycler'];['_promptHistory'];constructor(_0x4bd61e,_0x21f306,_0xb9c0bf=''){super(_0x4bd61e),this['set']('isEnabled',!0x0),this['set']('isProcessing',!0x1),this['set']('prompt',''),this['set']('value',''),this['set']('isError',!0x1),this['set']('mainAction',M['REPLACE']),this['_promptHistory']=new wt(),this['errorView']=new st(_0x4bd61e),this['contentArea']=new Y(_0x4bd61e,_0xb9c0bf),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 mt(),this['keystrokes']=new ut(),this['_focusables']=this['createCollection']([this['contentArea'],this['contentArea']['copyButtonView'],this['toolbar'],this['promptView']]),this['focusCycler']=new pt({'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 _0x2e4291=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form',_0x21f306],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form-content']},'children':[{'tag':'div','attributes':{'class':[_0x2e4291['if']('isError','ck-hidden',_0x3906f2=>!_0x3906f2)]},'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'](_0x3148cb=0x1){-0x1===_0x3148cb?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 _0x501f00=this['locale'],_0x20fd0a=new ct(_0x501f00,{'queryView':{'label':i(_0x501f00,'Ask\x20AI\x20to\x20edit\x20or\x20generate'),'creator':dt,'showIcon':!0x1,'showResetButton':!0x1},'infoView':{'text':{'noSearchableItems':{'primary':i(_0x501f00,'Empty\x20history'),'secondary':i(_0x501f00,'Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.')}}},'filteredView':this['_createHistoryView'](),'queryMinChars':0x1/0x0,'resetOnBlur':!0x1});return _0x20fd0a['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x420d54,_0x52072f)=>_0x420d54&&!_0x52072f),this['listenTo'](_0x20fd0a,'submit',(_0x235326,_0x2a831b)=>{this['prompt']=_0x2a831b;const _0x5f0421=yt(_0x2a831b);this['fire']('submitPrompt',_0x5f0421),_0x2a831b['trim']()&&this['_promptHistory']['add']({'prompt':_0x5f0421},0x0);},{'priority':'high'}),_0x20fd0a;}['_createHistoryView'](){const _0x422cc2=new ft(this['locale']);return _0x422cc2['historyGroupView']['items']['bindTo'](this['_promptHistory'])['as'](bt),_0x422cc2['on']('clearHistory',()=>{this['_promptHistory']['clear'](),this['promptView']['search'](''),this['promptView']['focus']();}),_0x422cc2;}['_createToolbar'](){const _0x369a92=new lt(this['locale']);return _0x369a92['replaceButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x373544,_0x1dd3c3,_0x13d405)=>_0x373544&&!_0x1dd3c3&&!!_0x13d405),_0x369a92['replaceButton']['delegate']('execute')['to'](this,'replaceContent'),_0x369a92['insertButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0xe0d09,_0x439dc,_0x3ad6be)=>_0xe0d09&&!_0x439dc&&!!_0x3ad6be),_0x369a92['insertButton']['delegate']('execute')['to'](this,'insertContentBelow'),_0x369a92['tryAgainButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x1ffa9c,_0x505d8a)=>_0x1ffa9c&&!_0x505d8a),_0x369a92['tryAgainButton']['delegate']('execute')['to'](this,'tryAgainEvent'),_0x369a92['stopButton']['bind']('isEnabled')['to'](this,'isProcessing'),_0x369a92['stopButton']['delegate']('execute')['to'](this,'stopProcessing'),_0x369a92;}['startProcessing'](){this['value']='',this['isError']=!0x1,this['isProcessing']=!0x0,this['contentArea']['isVisible']=!0x0,this['toolbar']['isVisible']=!0x0,this['contentArea']['focus']();}['finishProcessing'](){const _0xcfa747=this['locale'];this['isProcessing']=!0x1,this['prompt']='',this['promptView']['reset'](),this['value']&&(this['promptView']['queryView']['label']=i(_0xcfa747,'Ask\x20AI\x20to\x20improve\x20generated\x20text'));}['handleError'](_0xedb46a){const _0x193286=this['locale'];this['finishProcessing'](),this['isError']=!0x0,this['errorView']['text']=_0xedb46a||i(_0x193286,'AI_ERROR_FAILED'),this['value']||(this['contentArea']['isVisible']=!0x1);}}const w=globalThis['DataTransfer'];class n extends _0xc0a07e{['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[_0x1d40d,a,E,_0x394d39];}constructor(_0x34ccf9){super(_0x34ccf9),_0x34ccf9['config']['define']('ai.aiAssistant.disabledElements',['media','rawHtml','tableOfContents']),_0x34ccf9['config']['define']('ai.aiAssistant.contentAreaCssClass',''),_0x34ccf9['config']['define']('ai.useTheme',!0x0),this['_uiCssClasses']='ck-ai-assistant-ui'+(_0x34ccf9['config']['get']('ai.useTheme')?'\x20ck-ai-assistant-ui_theme':'');}['init'](){const {editor:_0xd79118}=this;this['_aiAdapter']=_0xd79118['plugins']['get'](E),this['_dialog']=_0xd79118['plugins']['get'](_0x394d39),this['_formView']=null,this['_commandDefinitions']=this['_getResolvedCommandsDefinitions']();const _0x476ed7=new j(_0xd79118,Array['from'](this['_commandDefinitions']['values']()));_0xd79118['commands']['add']('showAIAssistant',_0x476ed7),_0xd79118['ui']['componentFactory']['add']('aiCommands',_0x553bc8=>{const _0x5ce178=_0x1e9a66(_0x553bc8);return _0x5ce178['set']({'class':'ck-ai-commands-dropdown\x20'+this['_uiCssClasses']}),_0x5ce178['buttonView']['set']({'label':i(_0x553bc8,'AI\x20Commands'),'icon':_0x10f9a4,'tooltip':!0x0}),_0x5ce178['on']('execute',_0x2bdb2a=>this['_onExecute'](_0x2bdb2a['source']['id'])),_0x285ba1(_0x5ce178,_0xd79118['ui']['view']['body'],function(_0x55a1bc){const _0x571544=o(_0x55a1bc['config']['get']('ai.aiAssistant.commands'),_0x55a1bc['locale']),_0x292468=U(_0x55a1bc,_0x571544)['filter'](_0x54479e=>_0x54479e['commands']['length']);if(0x1===_0x292468['length'])return U(_0x55a1bc,_0x292468[0x0]['commands'])['map'](_0x360b8a=>({'id':_0x360b8a['id'],'label':_0x360b8a['label']}));return _0x292468['map'](_0x2c7ec2=>{const {groupId:_0x4ac52f,groupLabel:_0x23a23e,commands:_0x340652}=_0x2c7ec2,_0x249e8b=U(_0x55a1bc,_0x340652)['map'](_0x1c765b=>({'id':_0x1c765b['id'],'label':_0x1c765b['label']}));return{'id':_0x4ac52f,'menu':_0x23a23e||_0x4ac52f,'children':_0x249e8b};});}(_0xd79118),{'ariaLabel':i(_0x553bc8,'AI\x20Commands')}),_0x5ce178['menuView']['menuPanelClass']='ck-ai-commands-dropdown\x20'+this['_uiCssClasses'],_0x476ed7['on']('change:enabledCommandsIds',_0x14ea4b),_0x5ce178['menuView']['once']('render',_0x14ea4b),_0x5ce178;function _0x14ea4b(){_0x5ce178['isEnabled']=_0x476ed7['enabledCommandsIds']['length']>0x0;for(const _0x30019b of _0x5ce178['menuView']['buttons'])_0x30019b['isEnabled']=_0x476ed7['enabledCommandsIds']['includes'](_0x30019b['id']);}}),_0xd79118['ui']['componentFactory']['add']('menuBar:aiCommands',_0x3be56f=>{const _0x38e18c=new _0x2ffca8(_0x3be56f);_0x38e18c['buttonView']['set']({'label':i(_0x3be56f,'AI\x20Commands'),'icon':_0x10f9a4}),_0x38e18c['bind']('isEnabled')['to'](_0x476ed7,'enabledCommandsIds',_0x43c218=>_0x43c218['length']>0x0);const _0xe51d1d=o(_0xd79118['config']['get']('ai.aiAssistant.commands'),_0x3be56f);return this['_populateMenuBarMenu'](_0x476ed7,_0x38e18c,_0xe51d1d,_0x410685=>this['_onExecute'](_0x410685)),_0x38e18c;}),_0xd79118['ui']['componentFactory']['add']('aiAssistant',()=>{const _0x4cf8d8=this['_createAIAssistantUIButton'](_0x4c6e7e);return _0x4cf8d8['set']({'tooltip':!0x0,'class':'ck-ai-assistant-button\x20'+this['_uiCssClasses']}),_0x4cf8d8;}),_0xd79118['ui']['componentFactory']['add']('menuBar:aiAssistant',()=>{const _0x23e4b2=this['_createAIAssistantUIButton'](_0x4ba7c6);return _0x23e4b2['set']({'role':'menuitemcheckbox'}),_0x23e4b2;}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x3421d5=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x973624;for(const _0x5bef18 in _0x3421d5){const _0x40334e=_0x5bef18,_0x1d4ac1=_0x3421d5[_0x40334e];if('aiLicenseKeyValid'==_0x1d4ac1||'aiLicenseKeyInvalid'==_0x1d4ac1||'aiLicenseKeyExpired'==_0x1d4ac1||'aiLicenseKeyDomainLimit'==_0x1d4ac1||'aiLicenseKeyNotAllowed'==_0x1d4ac1||'aiLicenseKeyEvaluationLimit'==_0x1d4ac1||'aiLicenseKeyTrialLimit'==_0x1d4ac1||'aiLicenseKeyUsageLimit'==_0x1d4ac1){delete _0x3421d5[_0x40334e],_0x973624=_0x1d4ac1,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'aiLicenseKeyInvalid'==_0x973624&&_0x3421d5['_showLicenseError']('invalid'),'aiLicenseKeyExpired'==_0x973624&&_0x3421d5['_showLicenseError']('expired'),'aiLicenseKeyDomainLimit'==_0x973624&&_0x3421d5['_showLicenseError']('domainLimit'),'aiLicenseKeyNotAllowed'==_0x973624&&_0x3421d5['_showLicenseError']('featureNotAllowed','AIAssistant'),'aiLicenseKeyEvaluationLimit'==_0x973624&&_0x3421d5['_showLicenseError']('evaluationLimit'),'aiLicenseKeyTrialLimit'==_0x973624&&_0x3421d5['_showLicenseError']('trialLimit'),'aiLicenseKeyUsageLimit'==_0x973624&&_0x3421d5['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['showUI'](_0x562bc8='',_0x54a078='',_0xd4cd25='custom'){const _0x1f6231=this['editor'],_0x4be502=_0x1f6231['editing']['view'],_0x14058c=_0x1f6231['plugins']['get'](a),_0x30ace9=_0x1f6231['plugins']['get'](_0x1d40d);_0x14058c['showFakeVisualSelection']();const _0x3e8131=new w(),_0x4825b2=new ClipboardEvent('copy',{'clipboardData':_0x3e8131}),_0x317b82=new _0x3693b5(_0x3e8131),_0x204e08=new _0x15afd9(_0x4be502,_0x4825b2,{'dataTransfer':_0x317b82});_0x30ace9['_forceMarkersCopy']('comment',()=>{_0x4be502['document']['fire']('copy',_0x204e08);}),this['_formView']||(this['_initView'](),this['_aiAssistantController']=new k(_0x1f6231,this['_aiAdapter']['textAdapter'],this['_formView']));let _0x2e1f56=_0x317b82['getData']('text/html');const _0x433448=_0x1f6231['model']['document']['selection'],_0x577678=Array['from'](_0x433448['getRanges']());0x1===_0x577678['length']&&_0x577678[0x0]['isFlat']&&!_0x433448['getSelectedElement']()&&''!==_0x2e1f56['replace'](/ /g,'')['trim']()&&(_0x2e1f56='<p>'+_0x2e1f56+'</p>'),this['_aiAssistantController']['updateView']({'actionId':_0xd4cd25,'query':_0x562bc8,'htmlContent':_0x2e1f56,'label':_0x54a078,'mainActionLabel':M[_0x1f6231['model']['document']['selection']['isCollapsed']?'INSERT':'REPLACE']}),'aiAssistant'!==this['_dialog']['id']?this['_dialog']['show']({'id':'aiAssistant','icon':_0x21c2c7,'title':i(this['editor']['locale'],'AI\x20Assistant'),'content':this['_formView'],'position':_0x5c2657['EDITOR_TOP_SIDE'],'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_aiAssistantController']['reset'](),_0x14058c['hideFakeVisualSelection']();}}):this['_dialog']['view']['wasMoved']||this['_dialog']['view']['updatePosition']();}['hideUI'](){this['_dialog']['hide']();}['_getResolvedCommandsDefinitions'](){const _0x7cd323=new Map(),_0x3a4dc2=o(this['editor']['config']['get']('ai.aiAssistant.commands'),this['editor']['locale']);for(const _0x33602c of _0x3a4dc2)for(const _0x29b9be of _0x33602c['commands'])_0x7cd323['set'](_0x29b9be['id'],{..._0x29b9be,'groupId':_0x33602c['groupId'],'groupLabel':_0x33602c['groupLabel']||_0x33602c['groupId']});return _0x7cd323;}['_createAIAssistantUIButton'](_0x3119f3){const _0x28251e=this['editor'],_0x47f998=_0x28251e['commands']['get']('showAIAssistant'),_0x47833a=new _0x3119f3(_0x28251e['locale']);return _0x47833a['set']({'label':i(_0x28251e['locale'],'AI\x20Assistant'),'icon':_0x21c2c7,'isToggleable':!0x0}),_0x47833a['bind']('isEnabled')['to'](_0x47f998),_0x47833a['bind']('isOn')['to'](this['_dialog'],'id',_0x10fc2e=>'aiAssistant'===_0x10fc2e),this['listenTo'](_0x47833a,'execute',()=>{_0x47833a['isOn']?this['hideUI']():_0x47f998['execute']();}),_0x47833a;}['_initView'](){const _0x213b66=this['editor']['plugins']['get'](a);this['_formView']=new _(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',()=>{_0x213b66['insertContent'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['listenTo'](this['_formView'],'insertContentBelow',()=>{_0x213b66['insertContentBelow'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['_initAriaAiStatusChangeAnnouncements']();}['_initAriaAiStatusChangeAnnouncements'](){const {locale:_0x2e88c8,ui:{ariaLiveAnnouncer:_0x2b0724}}=this['editor'];this['_formView']['contentArea']['on']('change:isProcessing',(_0x4ffc3c,_0x1f0d74,_0xb33753)=>{const _0x437c65=this['_aiAssistantController']['currentContext'];_0xb33753?_0x2b0724['announce'](i(_0x2e88c8,'AI\x20is\x20writing')):_0x437c65&&_0x2b0724['announce'](i(_0x2e88c8,'Generated\x20content:\x20%0',_0x437c65),{'politeness':'polite','isUnsafeHTML':!0x0});}),this['_formView']['on']('change:isError',(_0x211c1d,_0x31aed6,_0x74dc8a)=>{if(_0x74dc8a){const _0x5cd2c2=this['_formView']['errorView']['text'];_0x2b0724['announce'](i(_0x2e88c8,'Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x5cd2c2));}});}['_onExecute'](_0xa35f95){const _0x2bc9cd=this['_commandDefinitions']['get'](_0xa35f95),_0x2bd98c=this['editor'],_0x273f72=_0x2bd98c['model']['document']['selection'],_0x1d4454=_0x2bd98c['commands']['get']('showAIAssistant'),_0x3ad19e=_0x2bd98c['plugins']['get'](a),_0x87cee6=''+(_0x2bc9cd['groupId']!==x?_0x2bc9cd['groupLabel']+':\x20':'')+_0x2bc9cd['label'];if(!0x1!==_0x2bc9cd['requiresContent']&&_0x273f72['isCollapsed']){const _0x28df79=_0x3466f3(_0x273f72['getSelectedBlocks']())||_0x2bd98c['model']['schema']['getLimitElement'](_0x273f72);_0x2bd98c['model']['change'](_0x224f00=>{_0x224f00['setSelection'](_0x28df79,'in');});}_0x3ad19e['showFakeVisualSelection'](),_0x1d4454['execute'](_0x2bc9cd['prompt'],_0x87cee6,'command:'+_0xa35f95);}['_populateMenuBarMenu'](_0x1e9c39,_0x282c24,_0x3c6781,_0x4fcc6d){const _0x545330=this['editor'],_0x346fba=_0x545330['locale'],_0x1ec0bf=new _0x52b7dc(_0x346fba),_0x466061=U(_0x545330,_0x3c6781)['filter'](_0x4d7b53=>_0x4d7b53['commands']['length']);0x1===_0x466061['length']?this['_getMenuBarGroupButtons']({'command':_0x1e9c39,'commands':_0x466061[0x0]['commands'],'parentMenuView':_0x282c24,'onExecute':_0x4fcc6d})['forEach'](_0x4184e9=>_0x1ec0bf['items']['add'](_0x4184e9)):_0x466061['forEach'](({groupId:_0x4e9bae,groupLabel:_0x2e9f1a,commands:_0x492193})=>{const _0xc9fc48=new _0x54ccc7(_0x346fba,_0x282c24),_0xad2bdf=new _0x2ffca8(_0x346fba),_0x20f5e6=new _0x52b7dc(_0x346fba),_0x36659f=this['_getMenuBarGroupButtons']({'command':_0x1e9c39,'commands':_0x492193,'parentMenuView':_0xad2bdf,'onExecute':_0x4fcc6d});_0xad2bdf['buttonView']['set']({'label':_0x2e9f1a||_0x4e9bae}),_0xad2bdf['delegate']('execute')['to'](_0x282c24),_0x20f5e6['items']['addMany'](_0x36659f),_0xad2bdf['panelView']['children']['add'](_0x20f5e6),_0xc9fc48['children']['add'](_0xad2bdf),_0x1ec0bf['items']['add'](_0xc9fc48);}),_0x282c24['panelView']['children']['add'](_0x1ec0bf);}['_getMenuBarGroupButtons']({command:_0x2f34d4,commands:_0x35d670,parentMenuView:_0x2fb334,onExecute:_0x1a3b4e}){const _0x2f2f04=this['editor'],_0xbefd4e=_0x2f2f04['locale'];return U(_0x2f2f04,_0x35d670)['map'](_0x519b80=>{const _0x418f78=new _0x54ccc7(_0xbefd4e,_0x2fb334),_0x16cbb8=new _0x4ba7c6(_0xbefd4e);return _0x16cbb8['set']({'label':_0x519b80['label']}),_0x16cbb8['delegate']('execute')['to'](_0x2fb334),_0x16cbb8['on']('execute',()=>_0x1a3b4e(_0x519b80['id'])),_0x16cbb8['bind']('isEnabled')['to'](_0x2f34d4,'enabledCommandsIds',_0x50f265=>_0x50f265['includes'](_0x519b80['id'])),_0x418f78['children']['add'](_0x16cbb8),_0x418f78;});}}function B(_0x587a27,_0x1fa5e1){return void 0x0!==_0x587a27['order']&&void 0x0===_0x1fa5e1['order']?0x1:void 0x0===_0x587a27['order']&&void 0x0!==_0x1fa5e1['order']?-0x1:void 0x0!==_0x587a27['order']&&void 0x0!==_0x1fa5e1['order']?_0x587a27['order']-_0x1fa5e1['order']:0x0;}function U(_0x477bb9,_0x18f1f6){_0x18f1f6['sort'](B);const _0xfe195b={},_0x5a4f31=[];for(const _0x26db2c of _0x18f1f6)if(void 0x0!==_0x26db2c['order']){if(_0x26db2c['order']in _0xfe195b)throw new _0x134831('ai-commands-config-order-collision',_0x477bb9,{'conflictingDefinitions':[_0x26db2c,_0xfe195b[_0x26db2c['order']]]});_0xfe195b[_0x26db2c['order']]=_0x26db2c,_0x5a4f31['splice'](_0x26db2c['order'],0x0,_0x26db2c);}else _0x5a4f31['push'](_0x26db2c);return _0x5a4f31;}class r extends _0xc0a07e{static get['requires'](){return[n,a];}static get['pluginName'](){return'AIAssistant';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2ce347){super(_0x2ce347);const _0x579519=_0x2ce347['config'],_0xed8afb=_0x2ce347['locale'];_0x579519['define']('ai.aiAssistant.preserveComments',!0x0),_0x579519['define']('ai.aiAssistant.commands',function(_0x843c8){return[{'groupId':'editOrReview','groupLabel':i(_0x843c8,'Edit\x20or\x20review'),'commands':[{'id':'improveWriting','label':i(_0x843c8,'Improve\x20writing'),'prompt':'Fix\x20spelling\x20mistakes,\x20use\x20proper\x20grammar\x20and\x20apply\x20good\x20writing\x20practices.\x20Do\x20not\x20lose\x20the\x20original\x20meaning.'},{'id':'makeShorter','label':i(_0x843c8,'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(_0x843c8,'Make\x20longer'),'prompt':'Improve\x20this\x20content\x20by\x20using\x20descriptive\x20language\x20and\x20inserting\x20more\x20information\x20and\x20more\x20detailed\x20explanations.'},{'id':'simplifyLanguage','label':i(_0x843c8,'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(_0x843c8,'Generate\x20from\x20selection'),'commands':[{'id':'summarize','label':i(_0x843c8,'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(_0x843c8,'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(_0x843c8,'Change\x20tone'),'commands':[{'id':'professional','label':i(_0x843c8,'Professional'),'prompt':'Improve\x20using\x20polished,\x20formal,\x20and\x20respectful\x20language\x20to\x20convey\x20professional\x20expertise\x20and\x20competence.'},{'id':'casual','label':i(_0x843c8,'Casual'),'prompt':'Improve\x20using\x20casual,\x20informal\x20language\x20to\x20convey\x20a\x20casual\x20conversation\x20with\x20a\x20real\x20person.'},{'id':'direct','label':i(_0x843c8,'Direct'),'prompt':'Improve\x20using\x20direct\x20language,\x20using\x20only\x20the\x20essential\x20information.'},{'id':'confident','label':i(_0x843c8,'Confident'),'prompt':'Improve\x20using\x20compelling,\x20optimistic\x20language\x20to\x20convey\x20confidence\x20in\x20the\x20writing.'},{'id':'friendly','label':i(_0x843c8,'Friendly'),'prompt':'Improve\x20using\x20friendly,\x20comforting\x20language,\x20to\x20convey\x20understanding\x20and\x20empathy.'}]},{'groupId':'changeStyle','groupLabel':i(_0x843c8,'Change\x20style'),'commands':[{'id':'business','label':i(_0x843c8,'Business'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20business\x20professional\x20with\x20formal\x20language.'},{'id':'legal','label':i(_0x843c8,'Legal'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20legal\x20professional\x20using\x20valid\x20legal\x20terminology.'},{'id':'journalism','label':i(_0x843c8,'Journalism'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20journalist\x20using\x20engaging\x20language\x20to\x20convey\x20the\x20importance\x20of\x20the\x20information.'},{'id':'poetic','label':i(_0x843c8,'Poetic'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20poem\x20using\x20poetic\x20techniques\x20without\x20losing\x20the\x20original\x20meaning.'}]},{'groupId':'translate','groupLabel':i(_0x843c8,'Translate'),'commands':[{'id':'translateEnglish','label':i(_0x843c8,'English'),'prompt':'Translate\x20the\x20content\x20to\x20English\x20language.'},{'id':'translateSpanish','label':i(_0x843c8,'Spanish'),'prompt':'Translate\x20the\x20content\x20to\x20Spanish\x20language.'},{'id':'translatePortuguese','label':i(_0x843c8,'Portuguese'),'prompt':'Translate\x20the\x20content\x20to\x20Portuguese\x20language.'},{'id':'translateGerman','label':i(_0x843c8,'German'),'prompt':'Translate\x20the\x20content\x20to\x20German\x20language.'},{'id':'translateFrench','label':i(_0x843c8,'French'),'prompt':'Translate\x20the\x20content\x20to\x20French\x20language.'},{'id':'translateChinese','label':i(_0x843c8,'Simplified\x20Chinese'),'prompt':'Translate\x20the\x20content\x20to\x20Simplified\x20Chinese\x20language.'},{'id':'translateHindi','label':i(_0x843c8,'Hindi'),'prompt':'Translate\x20the\x20content\x20to\x20Hindi\x20language.'},{'id':'translateArabic','label':i(_0x843c8,'Arabic'),'prompt':'Translate\x20the\x20content\x20to\x20Arabic\x20language.'}]}];}(_0xed8afb)),_0x579519['define']('ai.aiAssistant.extraCommandGroups',[]),_0x579519['define']('ai.aiAssistant.removeCommands',[]);let _0x215e25=o(_0x579519['get']('ai.aiAssistant.commands'),_0xed8afb);const _0x4ce3e7=_0x579519['get']('ai.aiAssistant.extraCommandGroups'),_0x13aee4=_0x579519['get']('ai.aiAssistant.removeCommands');_0x4ce3e7['forEach'](_0x3b745d=>{const _0x3f63af=_0x215e25['find'](_0x428842=>_0x428842['groupId']===_0x3b745d['groupId']);_0x3f63af?_0x3f63af['commands']=_0x3f63af['commands']['concat'](_0x3b745d['commands']):_0x215e25['push'](_0x3b745d);}),_0x215e25=_0x215e25['filter'](_0x33777b=>!_0x13aee4['includes'](_0x33777b['groupId'])),_0x215e25['forEach'](_0x3a06b3=>{_0x3a06b3['commands']=_0x3a06b3['commands']['filter'](_0x41357d=>!_0x13aee4['includes'](_0x41357d['id']));}),_0x579519['set']('ai.aiAssistant.commands',_0x215e25);}}class P extends _0xc0a07e{['abortController'];static get['requires'](){return[E];}constructor(_0x17307b){super(_0x17307b),this['abortController']=new AbortController();}['init'](){this['editor']['plugins']['get'](E)['textAdapter']=this;}['abort'](){this['abortController']['signal']['aborted']||(this['abortController']['abort'](),this['abortController']=new AbortController());}async['makeRequest'](_0x1208b7){return this['sendRequest'](_0x1208b7)['catch'](_0x4c8ba0=>{if(_0x4c8ba0 instanceof R)return Promise['reject'](_0x4c8ba0);if('AbortError'==_0x4c8ba0['name'])return Promise['resolve']();throw console['error'](_0x4c8ba0),new _0x134831('aitextadapter-send-request-failed',null);});}async['_prepareRequestHeaders'](_0x1c053e,_0x6b41bd){const _0x4987fe=this['editor']['locale'],_0x304347={'Content-Type':'application/json'};if('object'==typeof _0x1c053e)Object['assign'](_0x304347,_0x1c053e);else{if(_0x1c053e)try{const _0xe49b0d=await _0x1c053e(_0x6b41bd);Object['assign'](_0x304347,_0xe49b0d);}catch{return Promise['reject'](new R(i(_0x4987fe,'AI_ERROR_GET_HEADERS')));}}return _0x304347;}async['_prepareRequestParameters'](_0x132267,_0x2dcbd1){const _0x3867dd=this['editor']['locale'];if('object'==typeof _0x132267)return _0x132267;try{return await _0x132267(_0x2dcbd1);}catch{return Promise['reject'](new R(i(_0x3867dd,'AI_ERROR_GET_PARAMETERS')));}}}class O extends P{['_apiUrl'];['_requestHeaders'];['_requestParameters'];static get['pluginName'](){return'OpenAITextAdapter';}constructor(_0x11daac){super(_0x11daac),_0x11daac['config']['define']('ai.openAI.apiUrl','https://api.openai.com/v1/chat/completions'),_0x11daac['config']['get']('ai.openAI.requestParameters')||_0x11daac['config']['define']('ai.openAI.requestParameters',{'model':'gpt-3.5-turbo','max_tokens':0x7d0,'temperature':0x1,'top_p':0x1,'stream':!0x0}),this['_apiUrl']=_0x11daac['config']['get']('ai.openAI.apiUrl'),this['_requestHeaders']=_0x11daac['config']['get']('ai.openAI.requestHeaders')||{},this['_requestParameters']=_0x11daac['config']['get']('ai.openAI.requestParameters');}async['sendRequest']({query:_0x26bd7f,context:_0x387de3,onData:_0x1f033c,actionId:_0x574d99}){const _0x385b06=this['editor']['locale'],_0x11a16b=await this['prepareMessages'](_0x26bd7f,_0x387de3,_0x574d99),_0x3cb88a=await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x574d99),_0x21c60d=await this['_prepareRequestParameters'](this['_requestParameters'],_0x574d99),_0x28545d={'messages':_0x11a16b,..._0x21c60d},_0x11a9e0={'method':'POST','headers':_0x3cb88a,'body':JSON['stringify'](_0x28545d),'signal':this['abortController']['signal']},_0x249327=await fetch(this['_apiUrl'],_0x11a9e0);if(_0x249327['ok'])return _0x21c60d['stream']?await this['_readStreamableResponse'](_0x249327,_0x1f033c):await this['_readStaticResponse'](_0x249327,_0x1f033c),Promise['resolve']();{const _0x5b8292=await _0x249327['text']();return _0x5b8292['includes']('context_length_exceeded')?Promise['reject'](new R(i(_0x385b06,'AI_ERROR_CONTEXT_LENGTH'))):_0x5b8292['includes']('Moderation')?Promise['reject'](new R(i(_0x385b06,'AI_ERROR_MODERATION'))):Promise['reject'](new Error(_0x5b8292));}}async['prepareMessages'](_0x2e3286,_0x209e9e,_0x485b67){let _0x30482c,_0x1d59a2;return _0x209e9e?(_0x30482c='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.',_0x1d59a2='Instruction:\x0a'+_0x2e3286+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x209e9e):(_0x30482c='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.',_0x1d59a2=_0x2e3286),[{'role':'system','content':_0x30482c},{'role':'user','content':_0x1d59a2}];}async['_readStreamableResponse'](_0xf25951,_0x1f2b6b){const _0x2228d1=_0xf25951['body']['getReader'](),_0x45d00e=new TextDecoder();let _0x7596de='',_0x30c015='',_0xe9cfcb='',_0x24e952=!0x1;for(;!_0x24e952;){const {done:_0x34df87,value:_0x486a36}=await _0x2228d1['read'](),_0x36af03=_0x7596de+_0x45d00e['decode'](_0x486a36);let _0x46b26a='';_0x24e952=_0x34df87;try{_0x46b26a=this['_cleanUpData'](_0x36af03),_0x7596de='';}catch{_0x7596de=_0x36af03;continue;}_0x30c015+=_0x46b26a,!_0x24e952&&this['_isBufferIncomplete'](_0x30c015)||_0x30c015&&(_0xe9cfcb+=_0x30c015,_0x30c015='',_0x1f2b6b(_0xe9cfcb));}return Promise['resolve']();}async['_readStaticResponse'](_0x1e8874,_0x1cfa23){return _0x1cfa23((await _0x1e8874['json']())['choices'][0x0]['message']['content']),Promise['resolve']();}['_isBufferIncomplete'](_0xc9e1f8){const _0x2c8d2b=_0xc9e1f8['split']('<')['length']!==_0xc9e1f8['split']('>')['length'],_0x155fb5=_0xc9e1f8['length']<0x1e;return _0x2c8d2b&&_0x155fb5;}['_cleanUpData'](_0x3dd038){return _0x3dd038['split'](/\n(?![^{]*\})/g)['map'](_0x59e6d=>_0x59e6d['replace']('data:\x20',''))['filter'](_0x2b27a7=>_0x2b27a7&&_0x2b27a7['length']>0x0&&'[DONE]'!==_0x2b27a7)['map'](_0x1d4150=>{const {choices:_0x511463}=JSON['parse'](_0x1d4150);if(_0x511463[0x0]?.['delta']?.['content'])return _0x511463[0x0]['delta']['content'];})['filter'](_0x42e24f=>_0x42e24f)['join']('');}}class D extends P{['_apiUrl'];['_requestHeaders'];['_bedrockClientConfig'];['_requestParameters'];static get['pluginName'](){return'AWSTextAdapter';}constructor(_0x3124bb){super(_0x3124bb),_0x3124bb['config']['get']('ai.aws.requestParameters')||_0x3124bb['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']=_0x3124bb['config']['get']('ai.aws.apiUrl'),this['_bedrockClientConfig']=_0x3124bb['config']['get']('ai.aws.bedrockClientConfig'),this['_requestHeaders']=_0x3124bb['config']['get']('ai.aws.requestHeaders'),this['_requestParameters']=_0x3124bb['config']['get']('ai.aws.requestParameters');}async['sendRequest']({query:_0xba841b,context:_0x4b28a3,onData:_0x265551,actionId:_0x4261df}){const {model:_0x6793b8,stream:_0x12be77,..._0x12828b}=await this['_prepareRequestParameters'](this['_requestParameters'],_0x4261df),_0x493f89={'prompt':await this['preparePrompt'](_0xba841b,_0x4b28a3,_0x6793b8,_0x4261df),..._0x12828b};this['_apiUrl']?await this['_processProxyRequest'](_0x493f89,_0x6793b8,_0x12be77,_0x265551,_0x4261df):await this['_processAWSRequest'](_0x493f89,_0x6793b8,_0x12be77,_0x265551);}async['preparePrompt'](_0x386d96,_0x5b2acd,_0x10d941,_0x30e2b4){let _0xcccf79,_0x1d895e;return _0x5b2acd?(_0xcccf79='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.',_0x1d895e='Instruction:\x0a'+_0x386d96+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x5b2acd):(_0xcccf79='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.',_0x1d895e=_0x386d96),'meta.llama'==this['getModelFamily'](_0x10d941)?'<<SYS>>\x0a'+_0xcccf79+'\x0a<</SYS>>\x0a[INST]\x0a'+_0x1d895e+'\x0a[/INST]':'Human:\x0a'+_0xcccf79+'\x0a'+_0x1d895e+'\x0a\x0aAssistant:';}['getModelFamily'](_0x59b529){if(/^anthropic\.claude/['test'](_0x59b529))return'anthropic.claude';if(/^ai21\.j2/['test'](_0x59b529))return'ai21.j2';if(/^cohere\.command/['test'](_0x59b529))return'cohere.command';if(/^meta\.llama/['test'](_0x59b529))return'meta.llama';throw new R(i(this['editor']['locale'],'AI_ERROR_UNSUPPORTED_MODEL',_0x59b529));}async['_processProxyRequest'](_0x141439,_0x1db4df,_0x26973c,_0x1e0167,_0x24e7e2){const _0x427ee1={'method':'POST','headers':await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x24e7e2),'body':JSON['stringify']({..._0x141439,'model':_0x1db4df,'stream':_0x26973c}),'signal':this['abortController']['signal']},_0x1dc14b=await fetch(this['_apiUrl'],_0x427ee1);_0x26973c?await this['_readStreamableResponse'](_0x1dc14b,_0x1db4df,_0x1e0167):await this['_readStaticResponse'](_0x1dc14b,_0x1db4df,_0x1e0167);}async['_processAWSRequest'](_0x3e91dd,_0x307a54,_0x1be53c,_0x5acbd5){const _0x1510b0=new _0x4197f9(this['_bedrockClientConfig']),_0x58bb87={'body':JSON['stringify'](_0x3e91dd),'contentType':'application/json','accept':'application/json','modelId':_0x307a54};let _0x4a574c;if(_0x1be53c){const _0x2b2dbb=new _0x21ea33(_0x58bb87);_0x4a574c=await _0x1510b0['send'](_0x2b2dbb,{'abortSignal':this['abortController']['signal']}),await this['_readAsyncIterableResponse'](_0x4a574c,_0x307a54,_0x5acbd5);}else{const _0x4fc188=new _0x3a2ba7(_0x58bb87);_0x4a574c=await _0x1510b0['send'](_0x4fc188,{'abortSignal':this['abortController']['signal']}),await this['_readStaticResponse'](_0x4a574c,_0x307a54,_0x5acbd5);}}async['_readAsyncIterableResponse'](_0x230145,_0x361233,_0x29806f){const _0x11e50d=_0x230145['body'],_0x4ba1d6=new TextDecoder('utf-8');let _0x256d38='';for await(const _0x4d8418 of _0x11e50d)if(_0x4d8418['chunk']){const _0x570019=_0x4ba1d6['decode'](_0x4d8418['chunk']['bytes']),_0x59d309=JSON['parse'](_0x570019);_0x256d38+=this['_getGeneratedText'](_0x59d309,_0x361233),_0x29806f(_0x256d38);}return Promise['resolve']();}async['_readStreamableResponse'](_0x29722b,_0x4edde7,_0x59f591){const _0x39f2f8=_0x29722b['body'],_0x840027=new TextDecoder('utf-8'),_0x50371a=_0x39f2f8['getReader']();let _0x153960='',_0x32aaea='',_0x3a3a98=!0x1;for(;!_0x3a3a98;){const {done:_0x4ca81b,value:_0x5aafdd}=await _0x50371a['read']();if(_0x3a3a98=_0x4ca81b,_0x3a3a98)break;const _0x371044=(_0x153960+_0x840027['decode'](_0x5aafdd))['split']('\x0a')['map'](_0x4a1c6c=>{try{return _0x153960='',JSON['parse'](_0x4a1c6c);}catch{return _0x153960=_0x4a1c6c,null;}})['filter'](_0x250600=>null!==_0x250600);_0x371044['length']&&(_0x32aaea+=_0x371044['map'](_0x27528a=>this['_getGeneratedText'](_0x27528a,_0x4edde7))['join'](''),_0x59f591(_0x32aaea));}return Promise['resolve']();}async['_readStaticResponse'](_0x535984,_0x2afcd9,_0x127d0b){let _0x448c14;return _0x448c14=_0x535984 instanceof Response?await _0x535984['json']():JSON['parse'](Buffer['from'](_0x535984['body'])['toString']('utf8')),(_0x127d0b(this['_getGeneratedText'](_0x448c14,_0x2afcd9)),Promise['resolve']());}['_getGeneratedText'](_0x128743,_0x37e661){switch(this['getModelFamily'](_0x37e661)){case'anthropic.claude':return _0x128743['completion'];case'ai21.j2':return _0x128743['completions'][0x0]['data']['text'];case'cohere.command':return _0x128743['generations'][0x0]['text'];case'meta.llama':return _0x128743['generation'];}}}export{E as AIAdapter,r as AIAssistant,n as AIAssistantUI,R as AIRequestError,P as AITextAdapter,D as AWSTextAdapter,O as OpenAITextAdapter};
|
package/dist/translations/af.js
CHANGED
|
@@ -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':
|
|
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':_0xdedaf1=>0x1!=_0xdedaf1}};
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
(
|
|
23
|
+
(_0x32dc81=>{const {af:{dictionary:_0x1dcd17,getPluralForm:_0x28977f}}={'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':_0x286257=>0x1!=_0x286257}};_0x32dc81['af']||={'dictionary':{},'getPluralForm':null},_0x32dc81['af']['dictionary']=Object['assign'](_0x32dc81['af']['dictionary'],_0x1dcd17),_0x32dc81['af']['getPluralForm']=_0x28977f;})(window['CKEDITOR_TRANSLATIONS']||={});
|
package/dist/translations/ar.js
CHANGED
|
@@ -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':
|
|
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':_0x5cdeba=>0x0==_0x5cdeba?0x0:0x1==_0x5cdeba?0x1:0x2==_0x5cdeba?0x2:_0x5cdeba%0x64>=0x3&&_0x5cdeba%0x64<=0xa?0x3:_0x5cdeba%0x64>=0xb?0x4:0x5}};
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
(
|
|
23
|
+
(_0x2f73c5=>{const {ar:{dictionary:_0x8ecd20,getPluralForm:_0x41c636}}={'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':_0x403fd4=>0x0==_0x403fd4?0x0:0x1==_0x403fd4?0x1:0x2==_0x403fd4?0x2:_0x403fd4%0x64>=0x3&&_0x403fd4%0x64<=0xa?0x3:_0x403fd4%0x64>=0xb?0x4:0x5}};_0x2f73c5['ar']||={'dictionary':{},'getPluralForm':null},_0x2f73c5['ar']['dictionary']=Object['assign'](_0x2f73c5['ar']['dictionary'],_0x8ecd20),_0x2f73c5['ar']['getPluralForm']=_0x41c636;})(window['CKEDITOR_TRANSLATIONS']||={});
|