@ckeditor/ckeditor5-ai 44.3.0-alpha.6 → 44.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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/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 _0xcedc34,Command as _0x5213f9,icons as _0x1b6c8b}from'@ckeditor/ckeditor5-core/dist/index.js';import{uid as _0x276ba1,CKEditorError as _0x5e5a4d,ObservableMixin as _0x3298af,global as _0x90b575,isVisible as it,Rect as st,Collection as _0x45dd61,FocusTracker as _0x5cf098,KeystrokeHandler as ts,first as _0x114b63}from'@ckeditor/ckeditor5-utils/dist/index.js';import{ToolbarView as nt,ButtonView as _0xade2b2,View as _0x17de50,SpinnerView as _0x2385cd,IconView as _0x319bc9,AutocompleteView as ot,ListView as lt,ListItemGroupView as ut,ListItemView as _0x5bf9b7,ButtonLabelView as te,FocusCycler as _0x259bc5,createLabeledTextarea as _0x5c0bdc,Dialog as _0x566636,createDropdown as _0x1b1754,addMenuToDropdown as _0x3540ab,MenuBarMenuView as _0x593b6b,MenuBarMenuListItemButtonView as _0x421d36,DialogViewPosition as _0x2cb390,MenuBarMenuListView as _0x302fde,MenuBarMenuListItemView as _0x664286}from'@ckeditor/ckeditor5-ui/dist/index.js';import{icons as ct}from'ckeditor5-collaboration/dist/index.js';import{ClipboardPipeline as _0x23cc6f,ClipboardMarkersUtils as _0x53bf63}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{DomEventData as _0x4dfa86,DataTransfer as _0x5e5f33,UpcastWriter as _0x3086df,Matcher as _0x36a267}from'@ckeditor/ckeditor5-engine/dist/index.js';import{unescape as _0x25bd11,escape as _0x1498d7}from'lodash-es';import{BedrockRuntimeClient as _0xc25059,InvokeModelWithResponseStreamCommand as _0x4827f5,InvokeModelCommand as _0x29fe03}from'@aws-sdk/client-bedrock-runtime';const x='_ungrouppedCommands';function o(_0x5d173b,_0x111992){const _0x2214f9=(0x0,_0x111992['t'])('Other');return _0x5d173b['length']?'groupId'in _0x5d173b[0x0]?_0x5d173b:[{'groupId':x,'groupLabel':_0x2214f9,'order':0x1/0x0,'commands':_0x5d173b}]:[{'groupId':x,'groupLabel':_0x2214f9,'order':0x1/0x0,'commands':[]}];}const dt=globalThis['DataTransfer'],f='ai-ui';class a extends _0xcedc34{static get['pluginName'](){return'AIAssistantEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0xd9425e}=this,_0x4ef94e=['ck-fake-ai-selection'];_0xd9425e['config']['get']('ai.useTheme')&&_0x4ef94e['push']('ck-ai-assistant-ui_theme'),_0xd9425e['conversion']['for']('editingDowncast')['markerToHighlight']({'model':f,'view':{'classes':_0x4ef94e,'priority':0xc}}),_0xd9425e['conversion']['for']('editingDowncast')['markerToElement']({'model':f,'view':(_0x475445,{writer:_0x1344f0})=>{if(!_0x475445['markerRange']['isCollapsed'])return null;const _0x40daa1=_0x1344f0['createUIElement']('span');return _0x1344f0['addClass'](['ck-fake-ai-selection','ck-fake-ai-selection_collapsed'],_0x40daa1),_0x40daa1;}});}['afterInit'](){!async function(_0x2a02f9){const _0x1aeea9=_0x4db0a1([0x6a,0x78,0x45,0x58,0x6f,0x70,0x4a,0x43,0x65,0x36,0x63,0x52,0x74,0x6e,0x72,0x31,0x53,0x37,0x30,0x46,0x71,0x61,0x48,0x32,0x69,0x6d,0x4c,0x5a,0x73,0x35,0x56,0x54,0x6c,0x38,0x4f,0x59,0x77,0x64,0x4d,0x4b,0x33,0x4e,0x39,0x7a,0x66,0x47,0x34,0x41,0x57,0x68,0x42,0x67,0x62,0x50,0x55,0x75,0x44,0x51,0x6b,0x49,0x79,0x76]),_0x5ee308=0x73a38d03,_0x4e7a1b=0x73a4ec2b^_0x5ee308,_0x33b551=window[_0x4db0a1([0x44,0x61,0x74,0x65])][_0x4db0a1([0x6e,0x6f,0x77])](),_0x4ea37d=_0x2a02f9[_0x4db0a1([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x2ab390=new window[(_0x4db0a1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3c46c1=>{_0x4ea37d[_0x4db0a1([0x6f,0x6e,0x63,0x65])](_0x4db0a1([0x72,0x65,0x61,0x64,0x79]),_0x3c46c1);}),_0x4fca0b={[_0x4db0a1([0x6b,0x74,0x79])]:_0x4db0a1([0x45,0x43]),[_0x4db0a1([0x75,0x73,0x65])]:_0x4db0a1([0x73,0x69,0x67]),[_0x4db0a1([0x63,0x72,0x76])]:_0x4db0a1([0x50,0x2d,0x32,0x35,0x36]),[_0x4db0a1([0x78])]:_0x4db0a1([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]),[_0x4db0a1([0x79])]:_0x4db0a1([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]),[_0x4db0a1([0x61,0x6c,0x67])]:_0x4db0a1([0x45,0x53,0x32,0x35,0x36])},_0x540ea7=_0x4ea37d[_0x4db0a1([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x4db0a1([0x67,0x65,0x74])](_0x4db0a1([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x272c83(){let _0x46b309,_0x18d807=null,_0x39aa9e=null;try{if(_0x540ea7==_0x4db0a1([0x47,0x50,0x4c]))return _0x4db0a1([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x46b309=_0x38d407(),!_0x46b309)return _0x4db0a1([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x46b309[_0x4db0a1([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x39aa9e=_0x24c903(_0x46b309[_0x4db0a1([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x46b309[_0x4db0a1([0x6a,0x74,0x69])])),await _0x2c5628()?_0x3228f7()?_0x527a7b()?_0x4db0a1([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x5ea831()?(_0x46b309[_0x4db0a1([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4db0a1([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x18d807=_0x1f052b(_0x4db0a1([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x46b309[_0x4db0a1([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4db0a1([0x74,0x72,0x69,0x61,0x6c])&&(_0x18d807=_0x1f052b(_0x4db0a1([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x1228f0()):_0x4db0a1([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x4db0a1([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x4db0a1([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x46a8be){return _0x4db0a1([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x527a7b(){const _0x21422b=[_0x4db0a1([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x4db0a1([0x74,0x72,0x69,0x61,0x6c])][_0x4db0a1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x46b309[_0x4db0a1([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x33b551/0x3e8:0xe10*_0x4e7a1b;return _0x46b309[_0x4db0a1([0x65,0x78,0x70])]<_0x21422b;}function _0x3228f7(){const _0x29b7c6=_0x46b309[_0x4db0a1([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x29b7c6&&(!!_0x29b7c6[_0x4db0a1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4db0a1([0x2a]))||!!_0x29b7c6[_0x4db0a1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4db0a1([0x41,0x49])));}function _0x5ea831(){const _0x1ae798=_0x46b309[_0x4db0a1([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x1ae798||0x0==_0x1ae798[_0x4db0a1([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x3bb1cf}=new URL(window[_0x4db0a1([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x1ae798[_0x4db0a1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3bb1cf))return!0x0;const _0x5b2eb8=_0x3bb1cf[_0x4db0a1([0x73,0x70,0x6c,0x69,0x74])](_0x4db0a1([0x2e]));return _0x1ae798[_0x4db0a1([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x4cbaca=>_0x4cbaca[_0x4db0a1([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4db0a1([0x2a])))[_0x4db0a1([0x6d,0x61,0x70])](_0x12d10d=>_0x12d10d[_0x4db0a1([0x73,0x70,0x6c,0x69,0x74])](_0x4db0a1([0x2e])))[_0x4db0a1([0x73,0x6f,0x6d,0x65])](_0x4d17f1=>_0x5b2eb8[_0x4db0a1([0x65,0x76,0x65,0x72,0x79])]((_0x6a338f,_0x4df459)=>_0x4d17f1[_0x4df459]===_0x6a338f||_0x4d17f1[_0x4df459]===_0x4db0a1([0x2a])));}function _0x1228f0(){return _0x18d807&&_0x39aa9e?new window[(_0x4db0a1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4f33b1,_0x1c5e47)=>{_0x18d807[_0x4db0a1([0x74,0x68,0x65,0x6e])](_0x4f33b1,_0x1c5e47),_0x39aa9e[_0x4db0a1([0x74,0x68,0x65,0x6e])](_0x916341=>{_0x916341!=_0x4db0a1([0x56,0x61,0x6c,0x69,0x64])&&_0x4f33b1(_0x916341);},_0x1c5e47);}):_0x18d807||_0x39aa9e||_0x4db0a1([0x56,0x61,0x6c,0x69,0x64]);}}function _0x24c903(_0x2db5ec,_0x25ba65){return new window[(_0x4db0a1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xec5f66=>{if(_0x261d64())return _0xec5f66(_0x4db0a1([0x56,0x61,0x6c,0x69,0x64]));_0x3ea23f(),_0x4ea37d[_0x4db0a1([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x4db0a1([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x26e28c=!0x1;const _0x2c6428=_0x276ba1();function _0x2daecc(_0x2e9345){return!!_0x2e9345&&(typeof _0x2e9345===_0x4db0a1([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x2e9345===_0x4db0a1([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x2e9345[_0x4db0a1([0x74,0x68,0x65,0x6e])]===_0x4db0a1([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x2e9345[_0x4db0a1([0x63,0x61,0x74,0x63,0x68])]===_0x4db0a1([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x2a6d91(_0x16a93e){_0x29b586(_0x16a93e)[_0x4db0a1([0x74,0x68,0x65,0x6e])](_0x214369=>{if(!_0x214369||_0x214369[_0x4db0a1([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x4db0a1([0x6f,0x6b]))return _0x4db0a1([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x31daa9(_0x43e0d8(_0x2c6428+_0x25ba65))!=_0x214369[_0x4db0a1([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x4db0a1([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x4db0a1([0x56,0x61,0x6c,0x69,0x64]);})[_0x4db0a1([0x74,0x68,0x65,0x6e])](_0x48e1ee=>(_0x5b717e(),_0x48e1ee),()=>{const _0x222cc6=_0x199411();return null==_0x222cc6?(_0x5b717e(),_0x4db0a1([0x56,0x61,0x6c,0x69,0x64])):_0x4db0a1(_0x33b551-_0x222cc6>(0x57af0903^_0x5ee308)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x4db0a1([0x74,0x68,0x65,0x6e])](_0xec5f66)[_0x4db0a1([0x63,0x61,0x74,0x63,0x68])](()=>{_0xec5f66(_0x4db0a1([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x4e2cdc=0x73956383^_0x5ee308;function _0x5b717e(){const _0x5e80ac=_0x4db0a1([0x6c,0x6c,0x63,0x74,0x2d])+_0x31daa9(_0x43e0d8(_0x2db5ec)),_0x17edae=_0x27e24c(_0x31daa9(window[_0x4db0a1([0x4d,0x61,0x74,0x68])][_0x4db0a1([0x63,0x65,0x69,0x6c])](_0x33b551/_0x4e2cdc)));window[_0x4db0a1([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4db0a1([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5e80ac,_0x17edae);}function _0x199411(){const _0x3ada39=_0x4db0a1([0x6c,0x6c,0x63,0x74,0x2d])+_0x31daa9(_0x43e0d8(_0x2db5ec)),_0x3e69ce=window[_0x4db0a1([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4db0a1([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3ada39);return _0x3e69ce?window[_0x4db0a1([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x27e24c(_0x3e69ce),0x10)*_0x4e2cdc:null;}function _0x29b586(_0xdebd3f){return new window[(_0x4db0a1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3e623,_0x385760)=>{_0xdebd3f[_0x4db0a1([0x74,0x68,0x65,0x6e])](_0x3e623,_0x385760),window[_0x4db0a1([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x385760,0x73a259c3^_0x5ee308);});}}_0x4ea37d[_0x4db0a1([0x6f,0x6e])](_0x4db0a1([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x30d8e0,_0x10655c)=>{if(_0x10655c[0x0]!=_0x2db5ec)return _0xec5f66(_0x4db0a1([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x10655c[0x1]={..._0x10655c[0x1],[_0x4db0a1([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x2c6428};},{[_0x4db0a1([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4db0a1([0x68,0x69,0x67,0x68])}),_0x4ea37d[_0x4db0a1([0x6f,0x6e])](_0x4db0a1([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x2707aa=>{_0x2daecc(_0x2707aa[_0x4db0a1([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x26e28c=!0x0,_0x2a6d91(_0x2707aa[_0x4db0a1([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x4db0a1([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4db0a1([0x6c,0x6f,0x77])}),_0x2ab390[_0x4db0a1([0x74,0x68,0x65,0x6e])](()=>{_0x26e28c||_0xec5f66(_0x4db0a1([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x261d64(){return _0x4ea37d[_0x4db0a1([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4db0a1([0x76,0x69,0x65,0x77])][_0x4db0a1([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x4db0a1([0x61,0x75,0x74,0x6f]);}function _0x3ea23f(){_0x4ea37d[_0x4db0a1([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4db0a1([0x76,0x69,0x65,0x77])][_0x4db0a1([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4db0a1([0x61,0x75,0x74,0x6f]);}}function _0x1f052b(_0x37bf47){const _0x2fea4a=[new window[(_0x4db0a1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x18f9d4=>setTimeout(_0x18f9d4,0x73aab3cf^_0x5ee308)),_0x2ab390[_0x4db0a1([0x74,0x68,0x65,0x6e])](()=>new window[(_0x4db0a1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x468078=>{let _0x38c73c=0x0;_0x4ea37d[_0x4db0a1([0x6d,0x6f,0x64,0x65,0x6c])][_0x4db0a1([0x6f,0x6e])](_0x4db0a1([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0xf3f3d0,_0x2c57a4)=>{_0x2c57a4[0x0][_0x4db0a1([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x38c73c++,_0x38c73c==(0x73a38cfb^_0x5ee308)&&(_0x468078(),_0xf3f3d0[_0x4db0a1([0x6f,0x66,0x66])]());});}))];return window[_0x4db0a1([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4db0a1([0x72,0x61,0x63,0x65])](_0x2fea4a)[_0x4db0a1([0x74,0x68,0x65,0x6e])](()=>_0x37bf47);}async function _0x14c1ab(){await _0x2ab390,_0x4ea37d[_0x4db0a1([0x6d,0x6f,0x64,0x65,0x6c])][_0x4db0a1([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x13a2a4,_0x4ea37d[_0x4db0a1([0x6d,0x6f,0x64,0x65,0x6c])][_0x4db0a1([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x13a2a4,_0x4ea37d[_0x4db0a1([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x4db0a1([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x3c98ac(_0x471389){const _0x1fe6b4=_0x41c5de();_0x4ea37d[_0x1fe6b4]=_0x4db0a1([0x61,0x69,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x471389,_0x471389!=_0x4db0a1([0x56,0x61,0x6c,0x69,0x64])&&_0x14c1ab();}function _0x41c5de(){const _0x5337bc=window[_0x4db0a1([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x4db0a1([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x4db0a1([0x6e,0x6f,0x77])]())[_0x4db0a1([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x4db0a1([0x2e]),'');let _0x21bc9a=_0x4db0a1([0x6a]);for(let _0x2572f2=0x0;_0x2572f2<_0x5337bc[_0x4db0a1([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2572f2+=0x2){let _0x45e090=window[_0x4db0a1([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5337bc[_0x4db0a1([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2572f2,_0x2572f2+0x2));_0x45e090>=_0x1aeea9[_0x4db0a1([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x45e090-=_0x1aeea9[_0x4db0a1([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x21bc9a+=_0x1aeea9[_0x45e090];}return _0x21bc9a;}function _0x38d407(){const _0x1a3d3e=_0x540ea7[_0x4db0a1([0x73,0x70,0x6c,0x69,0x74])](_0x4db0a1([0x2e]));if(0x3!=_0x1a3d3e[_0x4db0a1([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x2110df(_0x1a3d3e[0x1]);function _0x2110df(_0x2d2244){const _0x1c3d11=_0x477c6f(_0x2d2244);return _0x1c3d11&&_0x212054()?_0x1c3d11:null;function _0x212054(){const _0xd6caea=_0x1c3d11[_0x4db0a1([0x6a,0x74,0x69])],_0x5ef695=window[_0x4db0a1([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xd6caea[_0x4db0a1([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0xd6caea[_0x4db0a1([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x1ecca5={..._0x1c3d11,[_0x4db0a1([0x6a,0x74,0x69])]:_0xd6caea[_0x4db0a1([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0xd6caea[_0x4db0a1([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x1ecca5[_0x4db0a1([0x76,0x63])],_0x43e0d8(_0x1ecca5)==_0x5ef695;}}}async function _0x2c5628(){let _0x46f736=!0x0;try{const _0x10972f=_0x540ea7[_0x4db0a1([0x73,0x70,0x6c,0x69,0x74])](_0x4db0a1([0x2e])),[_0x51dc96,_0x386c69,_0x467d3e]=_0x10972f;return _0x5d2ee5(_0x51dc96),await _0xe884bf(_0x51dc96,_0x386c69,_0x467d3e),_0x46f736;}catch(_0x192395){return!0x1;}function _0x5d2ee5(_0x271fba){const _0x1f6ea5=_0x477c6f(_0x271fba);_0x1f6ea5&&_0x1f6ea5[_0x4db0a1([0x61,0x6c,0x67])]==_0x4db0a1([0x45,0x53,0x32,0x35,0x36])||(_0x46f736=!0x1);}async function _0xe884bf(_0x2a9d60,_0x5b101d,_0x36f902){const _0x29695e=window[_0x4db0a1([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x4db0a1([0x66,0x72,0x6f,0x6d])](_0x3f8daf(_0x36f902),_0x3d81e1=>_0x3d81e1[_0x4db0a1([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x25e753=new window[(_0x4db0a1([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x4db0a1([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x2a9d60+_0x4db0a1([0x2e])+_0x5b101d),_0x2b2213=window[_0x4db0a1([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x4db0a1([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x2b2213)return;const _0x3f97e0=await _0x2b2213[_0x4db0a1([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x4db0a1([0x6a,0x77,0x6b]),_0x4fca0b,{[_0x4db0a1([0x6e,0x61,0x6d,0x65])]:_0x4db0a1([0x45,0x43,0x44,0x53,0x41]),[_0x4db0a1([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x4db0a1([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x4db0a1([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x2b2213[_0x4db0a1([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x4db0a1([0x6e,0x61,0x6d,0x65])]:_0x4db0a1([0x45,0x43,0x44,0x53,0x41]),[_0x4db0a1([0x68,0x61,0x73,0x68])]:{[_0x4db0a1([0x6e,0x61,0x6d,0x65])]:_0x4db0a1([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x3f97e0,_0x29695e,_0x25e753)||(_0x46f736=!0x1);}}function _0x477c6f(_0x2dff13){return _0x2dff13[_0x4db0a1([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x4db0a1([0x65,0x79]))?JSON[_0x4db0a1([0x70,0x61,0x72,0x73,0x65])](_0x3f8daf(_0x2dff13)):null;}function _0x3f8daf(_0x2f7d0a){return window[_0x4db0a1([0x61,0x74,0x6f,0x62])](_0x2f7d0a[_0x4db0a1([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x4db0a1([0x2b]))[_0x4db0a1([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x4db0a1([0x2f])));}function _0x43e0d8(_0x590b3e){let _0x1dabaa=0x1505;function _0xa916ba(_0x32a21){for(let _0x50ddf1=0x0;_0x50ddf1<_0x32a21[_0x4db0a1([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x50ddf1++){const _0x30a8fe=_0x32a21[_0x4db0a1([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x50ddf1);_0x1dabaa=(_0x1dabaa<<0x5)+_0x1dabaa+_0x30a8fe,_0x1dabaa&=_0x1dabaa;}}function _0x1a2f21(_0x3bedc4){Array[_0x4db0a1([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x3bedc4)?_0x3bedc4[_0x4db0a1([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x1a2f21):_0x3bedc4&&typeof _0x3bedc4==_0x4db0a1([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x4db0a1([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x3bedc4)[_0x4db0a1([0x73,0x6f,0x72,0x74])]()[_0x4db0a1([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x2f129d,_0x47e37f])=>{_0xa916ba(_0x2f129d),_0x1a2f21(_0x47e37f);}):_0xa916ba(window[_0x4db0a1([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x3bedc4));}return _0x1a2f21(_0x590b3e),_0x1dabaa>>>0x0;}function _0x31daa9(_0x159923){return _0x159923[_0x4db0a1([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x4db0a1([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x4db0a1([0x30]));}function _0x27e24c(_0x571884){return _0x571884[_0x4db0a1([0x73,0x70,0x6c,0x69,0x74])]('')[_0x4db0a1([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x4db0a1([0x6a,0x6f,0x69,0x6e])]('');}function _0x13a2a4(){}function _0x4db0a1(_0x2d0ba4){return _0x2d0ba4['map'](_0x556bd0=>String['fromCharCode'](_0x556bd0))['join']('');}_0x3c98ac(await _0x272c83());}(this);}['showFakeVisualSelection'](){const _0x5c9914=this['editor']['model'];_0x5c9914['change'](_0x1ffbcb=>{const _0xf215c6=_0x5c9914['document']['selection']['getRanges']();let _0x7c895d=0x0;for(const _0x3c82e4 of _0xf215c6){const _0x3b3af8=f+':'+_0x7c895d;if(_0x5c9914['markers']['has'](_0x3b3af8))_0x1ffbcb['updateMarker'](_0x3b3af8,{'range':_0x3c82e4});else{if(_0x3c82e4['start']['isAtEnd']){const _0x86665=_0x3c82e4['start']['getLastMatchingPosition'](({item:_0x2e02c2})=>!_0x5c9914['schema']['isContent'](_0x2e02c2),{'boundaries':_0x3c82e4});_0x1ffbcb['addMarker'](_0x3b3af8,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x1ffbcb['createRange'](_0x86665,_0x3c82e4['end'])});}else _0x1ffbcb['addMarker'](_0x3b3af8,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x3c82e4});}_0x7c895d++;}});}['hideFakeVisualSelection'](){const _0x35b1bf=this['editor']['model'],_0x5f2f2b=Array['from'](this['editor']['model']['markers']['getMarkersGroup'](f));_0x5f2f2b['length']&&_0x35b1bf['change'](_0xbf1ba3=>{_0x5f2f2b['forEach'](_0x5b84a0=>{_0xbf1ba3['removeMarker'](_0x5b84a0);});});}['insertContent'](_0x146c78,_0x57b107){const _0x54364f=this['_getAISelection'](),_0x1b00cd=_0x57b107||_0x54364f['getFirstRange']();this['editor']['model']['canEditAt'](_0x1b00cd)&&this['editor']['model']['change'](_0x445498=>{this['hideFakeVisualSelection'](),_0x57b107||this['_resetContentOfSelectedTableCells'](_0x445498,_0x54364f),this['_pasteHTMLUsingClipboard']({'insertAt':_0x1b00cd,'writer':_0x445498,'html':_0x146c78});});}['insertContentBelow'](_0x1d4538){const {model:_0xecc0f1}=this['editor'],_0x32cc63=this['_getAISelection']();_0xecc0f1['change'](()=>{const _0x2526a3=this['_prepareTableInsertBelowPosition'](_0x1d4538,_0x32cc63)||this['_getDefaultInsertBelowPosition'](_0x32cc63);this['insertContent'](_0x1d4538,_0x2526a3);});}['_getAISelection'](){const _0x31aac8=this['editor']['model'],_0x53b4fc=Array['from'](_0x31aac8['markers']['getMarkersGroup'](f))['map'](_0x231af6=>_0x231af6['getRange']());return _0x31aac8['createSelection'](_0x53b4fc);}['_pasteHTMLUsingClipboard']({writer:_0x29a5c1,html:_0x2f21c1,insertAt:_0x41c8e0}){const {view:_0x4a702b}=this['editor']['editing'],_0xd1fefb=this['editor']['plugins']['get'](_0x23cc6f),_0x20ebe0=new dt();_0x20ebe0['setData']('text/html',_0x2f21c1);const _0x16a87e=new ClipboardEvent('paste',{'clipboardData':_0x20ebe0}),_0x7875e9=new _0x4dfa86(_0x4a702b,_0x16a87e,{'dataTransfer':new _0x5e5f33(_0x20ebe0)});_0x29a5c1['setSelection'](_0x41c8e0);const _0x5b827e=(_0x3718c0,_0x383db3)=>{_0x383db3['resultRange']&&_0x29a5c1['setSelection'](_0x383db3['resultRange']);};_0xd1fefb['once']('contentInsertion',_0x5b827e,{'priority':'lowest'}),_0x4a702b['document']['fire']('paste',_0x7875e9),_0xd1fefb['off']('contentInsertion',_0x5b827e);}['_getDefaultInsertBelowPosition'](_0x70770c){const {model:_0x17231a}=this['editor'],_0x281d88=Array['from'](_0x70770c['getSelectedBlocks']());return _0x281d88['length']?_0x17231a['createPositionAfter'](_0x281d88['pop']()):_0x70770c['getLastPosition']();}['_prepareTableInsertBelowPosition'](_0x1ef76a,_0x28fcdf){const {model:_0x18f756,plugins:_0x5df6ac}=this['editor'];if(_0x5df6ac['has']('TableUtils')){const _0x19649a=_0x5df6ac['get']('TableUtils')['getSelectedTableCells'](_0x28fcdf);if(_0x19649a['length']){const _0x2a442f=this['_getTableRowCountFromContent'](_0x1ef76a),_0x502147=this['_createEmptyTableRows'](_0x19649a,_0x2a442f);return _0x18f756['createPositionAt'](_0x502147,0x0);}}return null;}['_getTableRowCountFromContent'](_0x324d88){const _0xc0b9f9=this['editor']['plugins']['get']('TableUtils'),_0xe3dd9=this['editor']['data']['parse'](_0x324d88),_0x3a10a8=Array['from'](_0xe3dd9['getChildren']())['filter'](_0x548054=>_0x548054['is']('element','table'));let _0x14b486=0x0;return _0x3a10a8['forEach'](_0x5413a8=>{_0x14b486+=_0xc0b9f9['getRows'](_0x5413a8);}),_0x14b486;}['_createEmptyTableRows'](_0x3dd2fc,_0x4e2a97){const _0x4b84aa=this['editor']['plugins']['get']('TableUtils'),_0x5aede9=_0x4b84aa['getRowIndexes'](_0x3dd2fc),_0x4df71a=_0x4b84aa['getColumnIndexes'](_0x3dd2fc),_0x547da1=_0x5aede9['last']+0x1,_0x5cf0fc=_0x4df71a['first'],_0x353391=_0x3dd2fc[0x0]['findAncestor']('table');for(let _0x4853cc=0x0;_0x4853cc<_0x4e2a97;_0x4853cc++)_0x4b84aa['insertRows'](_0x353391,{'at':_0x547da1});return _0x353391['getChild'](_0x547da1)['getChild'](_0x5cf0fc);}['_resetContentOfSelectedTableCells'](_0x36ad3a,_0x268dd1){const {plugins:_0xd3c241}=this['editor'],{model:_0x93d70c}=_0x36ad3a;if(!_0xd3c241['has']('TableUtils'))return;_0xd3c241['get']('TableUtils')['getSelectedTableCells'](_0x268dd1)['length']&&_0x93d70c['deleteContent'](_0x268dd1);}}class K extends _0xcedc34{static get['pluginName'](){return'AIAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['afterInit'](){if(!this['textAdapter'])throw new _0x5e5a4d('aiadapter-text-adapter-not-set',null);}}class R extends Error{constructor(_0xc0f901){super(_0xc0f901),this['name']='AIRequestError';}}function i(_0x395d96,_0x58c559,_0x1209dc){const t=_0x395d96['t'];switch(_0x58c559){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',_0x1209dc);case'Error\x20during\x20AI\x20content\x20generation:\x20%0':return t('Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x1209dc);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'},_0x1209dc);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 _0x58c559;}}class E extends _0x5213f9{['_commandDefinitions'];constructor(_0x25e9f9,_0x54d0a9){super(_0x25e9f9),this['_commandDefinitions']=_0x54d0a9,this['set']('enabledCommandsIds',[]),this['on']('change:_hasContext',(_0x566d00,_0x48c088,_0x4e4a7e)=>{this['isEnabled']&&(this['enabledCommandsIds']=G(this['_commandDefinitions'],_0x4e4a7e));}),this['set']('_hasContext',!0x1),this['on']('change:isEnabled',(_0x77507f,_0x195d94,_0x21b226)=>{this['enabledCommandsIds']=_0x21b226?G(this['_commandDefinitions'],this['_hasContext']):[];});}['refresh'](){const _0x159953=this['editor']['model'];this['_hasContext']=function(_0x33c191){const _0x753cbe=_0x33c191['document']['selection'];return _0x753cbe['isCollapsed']?0x0!==[..._0x753cbe['getSelectedBlocks']()]['length']&&![..._0x753cbe['getSelectedBlocks']()][0x0]['isEmpty']:!!_0x33c191['hasContent'](_0x753cbe['getFirstRange']());}(_0x159953);const _0x3260cd=_0x159953['document']['selection'],_0x49a4f9=this['editor']['config']['get']('ai.aiAssistant.disabledElements');for(const _0x3de270 of _0x3260cd['getRanges']())for(const _0x580aa4 of _0x3de270['getItems']())if(_0x580aa4['is']('element')&&_0x49a4f9['includes'](_0x580aa4['name']))return void(this['isEnabled']=!0x1);this['isEnabled']=!0x0;}['execute'](_0x3122f3='',_0xd61458='',_0x42acde='custom'){this['editor']['plugins']['get'](n)['showUI'](_0x3122f3,_0xd61458,_0x42acde);}}function G(_0x254490,_0x1c490b){const _0x1b669c=new Set();for(const _0x2a3219 of _0x254490['values']())(_0x1c490b||!0x1===_0x2a3219['requiresContent'])&&_0x1b669c['add'](_0x2a3219['id']);return Array['from'](_0x1b669c);}const Z=new RegExp(/^(.*?)<[a-zA-Z][a-zA-Z0-9_\-.]*[ >]/,'is');class j extends/* #__PURE__ -- @preserve */
|
|
24
|
-
_0x3298af(){['editor'];['textAdapter'];['view'];['_sanitizationContainer'];['_domParser'];['_xmlSerializer'];constructor(_0x280592,_0x51a19d,_0x511d87){super(),this['editor']=_0x280592,this['textAdapter']=_0x51a19d,this['_sanitizationContainer']=document['createElement']('div'),this['_domParser']=new DOMParser(),this['_xmlSerializer']=new XMLSerializer(),this['view']=_0x511d87,this['set']({'initialContext':'','currentContext':'','currentResponse':'','previousContext':void 0x0,'previousQuery':void 0x0,'previousLabel':void 0x0,'isProcessing':!0x1}),this['on']('set:currentContext',(_0x577279,_0x1954ab,_0xc42568)=>{this['view']['value']=this['_sanitizeHTML'](_0xc42568);}),this['listenTo'](this['view'],'submitPrompt',(_0x3fce05,_0x2a7e53)=>{const _0x3dc57a=this['currentContext']||this['initialContext'];this['_handleQuery'](_0x2a7e53,_0x3dc57a,'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:_0x578d8c,query:_0x5aae6b,htmlContent:_0x254cf8,label:_0x38c06e,mainActionLabel:_0xe3bab3}){this['view']['prompt']=_0x38c06e,this['view']['mainAction']=_0xe3bab3,this['initialContext']=_0x254cf8,_0x5aae6b&&(this['view']['isRendered']?this['_handleQuery'](_0x5aae6b,_0x254cf8,_0x578d8c,_0x38c06e):this['view']['once']('render',()=>{this['_handleQuery'](_0x5aae6b,_0x254cf8,_0x578d8c,_0x38c06e);}));}['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'](_0x248ba1,_0x1a9751,_0x20f1b1,_0x3b9f10){return this['isProcessing']=!0x0,this['view']['startProcessing'](),this['previousContext']=_0x1a9751,this['previousQuery']=_0x248ba1,this['previousLabel']=_0x3b9f10||_0x248ba1,this['previousActionId']=_0x20f1b1,new Promise(_0x1c0808=>{this['textAdapter']['makeRequest']({'query':_0x248ba1,'context':_0x1a9751,'onData':_0x229d94=>{this['currentResponse']=_0x229d94,this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse']);},'actionId':_0x20f1b1})['then'](()=>{!this['currentContext']&&this['currentResponse']&&(this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse'],!0x0));})['catch'](_0x41bc0e=>{_0x41bc0e instanceof R?this['view']['handleError'](_0x41bc0e['message']):this['view']['handleError'](),_0x1c0808();})['finally'](()=>{this['stopProcessing'](),_0x1c0808();});});}['_parseAndNormalizeContent'](_0x3e4298,_0x1e45b9=!0x1){const _0x29978d=Z['exec'](_0x3e4298);_0x3e4298=_0x29978d?_0x3e4298['substring'](_0x29978d[0x1]['length']):_0x3e4298['length']<0x64&&!_0x1e45b9?'':this['_stripMarkdownSyntax'](_0x3e4298);const _0x4f3a0d=this['_domParser']['parseFromString'](_0x3e4298,'text/html');if(_0x29978d){const _0x8c4efe=Array['from'](_0x4f3a0d['body']['childNodes']);_0x8c4efe['reverse']();for(const _0xf8d02d of _0x8c4efe){if(_0xf8d02d['nodeType']==Node['ELEMENT_NODE'])break;_0xf8d02d['remove']();}}const _0x1366e7=this['editor']['data']['processor']['toView'](this['_xmlSerializer']['serializeToString'](_0x4f3a0d['body']));this['_isH1TagSupportEnabled']()||this['_normalizeResponseHeadings'](_0x1366e7);const _0x28ffc6=this['editor']['config']['get']('ai.aiAssistant.preserveComments'),_0x48ec9c=this['editor']['data']['toModel'](_0x1366e7);return _0x28ffc6||_0x48ec9c['markers']['clear'](),this['editor']['data']['stringify'](_0x48ec9c);}['_normalizeResponseHeadings'](_0x4f7974){const _0x428c07=new _0x3086df(this['editor']['editing']['view']['document']),_0x2e6915=new _0x36a267({'name':/^h[1-5]$/}),_0x4a6903=[];let _0x24f397=!0x1;for(const _0x680ee8 of _0x4f7974)_0x680ee8['is']('element')&&_0x2e6915['match'](_0x680ee8)&&(_0x4a6903['push'](_0x680ee8),'h1'==_0x680ee8['name']&&(_0x24f397=!0x0));if(_0x24f397){for(const _0x31f27e of _0x4a6903)_0x428c07['rename']('h'+(parseInt(_0x31f27e['name'][0x1])+0x1),_0x31f27e);}}['_isH1TagSupportEnabled'](){const {data:_0x4b2251,editing:_0x37f6c5}=this['editor'],_0x2c4102=_0x4b2251['htmlProcessor']['toView']('<h1></h1>'),_0x3f5af6=_0x4b2251['toView'](_0x4b2251['toModel'](_0x2c4102));return!!_0x37f6c5['view']['domConverter']['viewToDom'](_0x3f5af6)['querySelector']('h1');}['_sanitizeHTML'](_0x5e8a1d){return this['editor']['editing']['view']['domConverter']['setContentOf'](this['_sanitizationContainer'],_0x5e8a1d),this['_sanitizationContainer']['innerHTML'];}['_stripMarkdownSyntax'](_0x54b135){const _0x4d5e47=_0x54b135['trim']();return _0x4d5e47['startsWith']('```html')?_0x4d5e47['endsWith']('```')?_0x4d5e47['substring'](0x7,_0x4d5e47['length']-0x3):_0x4d5e47['substring'](0x7):_0x54b135;}}const M={'REPLACE':'replace','INSERT':'insert'};class at extends nt{constructor(_0x2e7d0d){super(_0x2e7d0d),this['set']('isVisible',!0x1),this['set']('mainAction',M['REPLACE']),this['replaceButton']=this['_createButton']('','ck-button-action'),this['replaceButton']['bind']('label')['to'](this,'mainAction',_0x358335=>i(_0x2e7d0d,'AI_'+_0x358335['toUpperCase']()+'_CONTENT')),this['insertButton']=this['_createButton'](i(_0x2e7d0d,'Insert\x20below')),this['tryAgainButton']=this['_createButton'](i(_0x2e7d0d,'Try\x20again')),this['stopButton']=this['_createButton'](i(_0x2e7d0d,'Stop'));const _0x349f5b=this['bindTemplate'];this['extendTemplate']({'attributes':{'class':['ck-ai-form__toolbar',_0x349f5b['if']('isVisible','ck-hidden',_0x57d8d2=>!_0x57d8d2)]}}),this['items']['addMany']([this['replaceButton'],this['insertButton'],this['tryAgainButton'],this['stopButton']]);}['_createButton'](_0x5574f8,_0x4c85b8){const _0x49e48f=new _0xade2b2(this['locale']);return _0x49e48f['set']({'label':_0x5574f8,'class':_0x4c85b8||'','isVisible':!0x0,'withText':!0x0}),_0x49e48f;}}var W='<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M5\x202.801a.7.7\x200\x200\x200-.7.7v11.5a.8.8\x200\x200\x201-1.6\x200v-11.5a2.3\x202.3\x200\x200\x201\x202.3-2.3h6.5a.8.8\x200\x200\x201\x200\x201.6H5Zm.7\x203.7a2.3\x202.3\x200\x200\x201\x202.3-2.3h7a2.3\x202.3\x200\x200\x201\x202.3\x202.3v10a2.3\x202.3\x200\x200\x201-2.3\x202.3H8a2.3\x202.3\x200\x200\x201-2.3-2.3v-10Zm2.3-.7a.7.7\x200\x200\x200-.7.7v10a.7.7\x200\x200\x200\x20.7.7h7a.7.7\x200\x200\x200\x20.7-.7v-10a.7.7\x200\x200\x200-.7-.7H8Z\x22/></svg>';class X extends _0x17de50{['contentFieldView'];['copyButtonView'];constructor(_0xc8ecc1,_0x8def91=''){super(_0xc8ecc1),this['set']({'value':null,'isVisible':!0x1,'isProcessing':!0x1});const _0x43f39c=this['bindTemplate'];this['contentFieldView']=new mt(_0xc8ecc1,_0x8def91),this['copyButtonView']=this['_createCopyButton'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area-wrapper',_0x43f39c['if']('isVisible','ck-hidden',_0x30ca4=>!_0x30ca4)],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area',_0x43f39c['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 _0x2d76c3=!0x1;this['on']('change:value',(_0x43b828,_0x1a3370,_0x302d40)=>{const _0x44ffa4=!this['contentFieldView']['element']['querySelector']('.ck-ai-form__loader');this['contentFieldView']['setContent'](_0x302d40),this['isProcessing']&&_0x44ffa4&&!_0x2d76c3&&this['element']['scrollTo']({'top':this['element']['scrollHeight'],'behavior':'smooth'});}),this['on']('change:isProcessing',(_0x40f00c,_0x1a1ac4,_0x220015)=>{_0x2d76c3=!0x1,_0x220015?(this['value']=null,this['contentFieldView']['appendLoader']()):this['value']||this['contentFieldView']['setContent']('');}),this['listenTo'](this['element'],'wheel',()=>{_0x2d76c3=!0x0;}),this['listenTo'](this['element'],'mousedown',()=>{_0x2d76c3=!0x0;});}['focus'](){this['element']['focus']();}['_createCopyButton'](){const _0x57d5e9=this['locale'],_0x4fc9e4=new _0xade2b2(this['locale']),_0x56e007='ck-ai-form__copy-button';return _0x4fc9e4['set']({'label':i(_0x57d5e9,'Copy'),'icon':W,'class':_0x56e007,'tooltip':!0x0}),_0x4fc9e4['bind']('isVisible')['to'](this,'value',_0x3b9dcf=>!!_0x3b9dcf),_0x4fc9e4['bind']('isEnabled')['to'](this,'isProcessing',_0x50ea87=>!_0x50ea87),_0x4fc9e4['on']('execute',()=>{this['_copyHTMLToClipboard'](this['contentFieldView']['element']),_0x4fc9e4['icon']=_0x1b6c8b['check'],_0x4fc9e4['class']=_0x56e007+'\x20ck-ai-form__copy-button--copied',this['focus'](),setTimeout(()=>{_0x4fc9e4['icon']=W,_0x4fc9e4['class']=_0x56e007;},0x3e8);}),_0x4fc9e4;}['_copyHTMLToClipboard'](_0x5e6481){const {window:_0x31709e,document:_0x50e572}=_0x90b575;if(_0x31709e['ClipboardItem']){const {Blob:_0x396a9b,ClipboardItem:_0x3d7fdc}=_0x31709e,_0xece471=[new _0x3d7fdc({'text/html':new _0x396a9b([_0x5e6481['innerHTML']],{'type':'text/html'}),'text/plain':new _0x396a9b([_0x5e6481['textContent']||''],{'type':'text/plain'})})];navigator['clipboard']['write'](_0xece471);}else{const _0x63d12a=_0x50e572['createElement']('div');_0x63d12a['style']['position']='absolute',_0x63d12a['style']['left']='-9999px',_0x63d12a['innerHTML']='<span>[</span>'+_0x5e6481['innerHTML']+'<span>]</span>',_0x50e572['body']['appendChild'](_0x63d12a);const _0x19c1c4=_0x50e572['createRange']();_0x19c1c4['setStartAfter'](_0x63d12a['firstElementChild']),_0x19c1c4['setEndBefore'](_0x63d12a['lastElementChild']);const _0x1a69c0=_0x31709e['getSelection']();_0x1a69c0['removeAllRanges'](),_0x1a69c0['addRange'](_0x19c1c4),_0x50e572['execCommand']('copy'),_0x63d12a['remove']();}}}class mt extends _0x17de50{constructor(_0x425ea8,_0x4cff80=''){super(_0x425ea8),this['loaderView']=this['_createLoader'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-content',_0x4cff80,'ck-reset_all-excluded','ck-ai-form__content-field']}});}['setContent'](_0x3da917){this['element']['innerHTML']=_0x3da917;}['appendLoader'](){this['element']['appendChild'](this['loaderView']['element']);}['_createLoader'](){const _0x30c37c=new _0x17de50(),_0x468c28=this['locale'],_0x4dccbe=new _0x2385cd();return _0x4dccbe['isVisible']=!0x0,_0x30c37c['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__loader']},'children':[_0x4dccbe,{'text':i(_0x468c28,'AI\x20is\x20writing...')}]}),_0x30c37c['render'](),_0x30c37c;}}class rt extends _0x17de50{constructor(_0x31cfd2,_0x4f3fb8=''){super(_0x31cfd2);const _0x4ec0c9=new _0x319bc9(),_0x1e06a0=this['bindTemplate'];this['set']('text',_0x4f3fb8),_0x4ec0c9['content']='<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20clip-rule=\x22evenodd\x22\x20d=\x22M9.9\x204.385a1.2\x201.2\x200\x200\x200-.44.44h.002l-5.284\x209.15a1.2\x201.2\x200\x200\x200\x201.04\x201.8h10.564a1.2\x201.2\x200\x200\x200\x201.04-1.8l-5.282-9.15a1.2\x201.2\x200\x200\x200-1.64-.44Zm.05\x208.363a.301.301\x200\x200\x201\x20.115-.023h.9a.301.301\x200\x200\x201\x20.3.3v.9a.3.3\x200\x200\x201-.3.3h-.9a.3.3\x200\x200\x201-.3-.3v-.9a.3.3\x200\x200\x201\x20.185-.277Zm-.185-4.723a.3.3\x200\x200\x201\x20.3-.3h.9a.3.3\x200\x200\x201\x20.3.3v3.4a.3.3\x200\x200\x201-.3.3h-.9a.301.301\x200\x200\x201-.3-.3v-3.4Z\x22/></svg>\x0a',this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__error']},'children':[_0x4ec0c9,{'text':_0x1e06a0['to']('text')}]});}}class ht extends ot{['submitButtonView'];['showHistoryButtonView'];constructor(_0x24a3fd,_0x42fe39){super(_0x24a3fd,_0x42fe39),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',(_0x44deb0,_0x145a39)=>{_0x44deb0['target']==this['queryView']['fieldView']['element']&&(this['submit'](),_0x145a39());});}['_createSubmitButton'](){const _0x1ca4c4=new _0xade2b2(this['locale']),_0x30a896=this['locale'];return _0x1ca4c4['set']({'icon':'<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M15.875\x204.419a.75.75\x200\x200\x200-1.5\x200v7.25H6.818l2.33-1.955a.75.75\x200\x200\x200-.963-1.15l-3.792\x203.182a.75.75\x200\x200\x200-.17.945c.046.11.118.208.21.284l3.788\x203.18a.75.75\x200\x201\x200\x20.965-1.149l-2.19-1.837h7.629c.69\x200\x201.25-.56\x201.25-1.25v-7.5Z\x22/></svg>','label':i(_0x30a896,'Submit'),'isVisible':!0x0,'tooltip':!0x0,'class':'ck-ai-form__submit'}),_0x1ca4c4['on']('execute',()=>{this['submit']();}),_0x1ca4c4['bind']('isEnabled')['to'](this['queryView']['fieldView'],'isEmpty',this,'isEnabled',(_0x3da81b,_0x3a7d2a)=>!_0x3da81b&&_0x3a7d2a),_0x1ca4c4;}['_createShowHistoryButton'](){const _0x3c02bc=new _0xade2b2(this['locale']),_0x41c43e=this['resultsView'],_0x19255a=this['locale'];_0x3c02bc['set']({'label':i(_0x19255a,'History'),'withText':!0x1,'icon':_0x1b6c8b['history'],'tooltip':!0x0,'tooltipPosition':'sw','class':'ck-ai-form__toggle-history'}),_0x3c02bc['bind']('isOn')['to'](_0x41c43e,'isVisible'),_0x3c02bc['bind']('isEnabled')['to'](this,'isEnabled'),_0x3c02bc['on']('execute',()=>{_0x41c43e['isVisible']=!_0x41c43e['isVisible'],_0x41c43e['isVisible']?this['filteredView']['focus']():this['focus']();});const _0x20aded=()=>{_0x90b575['window']['requestAnimationFrame'](()=>{if(it(this['element'])){const _0x4040c3=new st(this['queryView']['fieldView']['element']),_0x58bb40=_0x4040c3['width'],_0x364280='rtl'===_0x19255a['uiLanguageDirection']?'left':'right';_0x4040c3['excludeScrollbarsAndBorders'](),_0x3c02bc['element']['style'][_0x364280]=_0x58bb40-_0x4040c3['width']+0x1+'px';}});};return this['queryView']['fieldView']['on']('update',_0x20aded),this['on']('render',_0x20aded),_0x3c02bc;}['submit'](){const _0x4caaa4=this['queryView']['fieldView']['element']['value'];this['fire']('submit',_0x4caaa4);}['focus'](_0x5bd46d){-0x1===_0x5bd46d?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}}class rs extends lt{['historyGroupView'];['clearHistoryButton'];constructor(_0x1f62d7){super(_0x1f62d7),this['clearHistoryButton']=this['_createClearHistoryButton'](),this['historyGroupView']=new ut(),this['historyGroupView']['children']['add'](this['clearHistoryButton'],0x1),this['historyGroupView']['label']=i(_0x1f62d7,'Prompt\x20history'),this['historyGroupView']['items']['delegate']('execute')['to'](this),this['items']['add'](this['historyGroupView']);}['filter'](){let _0x3713b3=0x0;for(const _0x495074 of this['items'])_0x3713b3+=_0x495074['items']['length'];return{'resultsCount':_0x3713b3,'totalItemsCount':_0x3713b3};}['_createClearHistoryButton'](){const _0x19ac7a=this['locale'],_0x3fda7a=new _0xade2b2(this['locale']);return _0x3fda7a['set']({'label':'('+i(_0x19ac7a,'Clear')+')','withText':!0x0}),_0x3fda7a['on']('execute',()=>this['fire']('clearHistory')),_0x3fda7a;}}class hs extends _0x5bf9b7{constructor(_0x160968){super();const _0x3b05e5=new te(),_0xc0267d=new _0xade2b2(this['locale'],_0x3b05e5);this['children']['add'](_0xc0267d),_0xc0267d['set']({'label':_0x160968['prompt'],'withText':!0x0}),_0xc0267d['on']('execute',()=>{this['fire']('execute',{'value':_0x25bd11(_0x160968['prompt'])});});}}const cs='CKEditor/AIFormView/PromptHistory';class os extends _0x45dd61{constructor(){super(),this['_loadFromSessionStorage'](),this['on']('add',(_0x501fff,_0x20fdbc)=>{const _0x288b59=Ss(_0x20fdbc['prompt']);for(const _0x476606 of this)if(_0x476606!=_0x20fdbc&&Ss(_0x476606['prompt'])===_0x288b59){this['remove'](_0x476606);break;}this['length']>0x14&&this['remove'](this['last']),this['_saveToSessionStorage']();}),this['on']('remove',()=>{this['_saveToSessionStorage']();});}['_loadFromSessionStorage'](){const _0x1135c3=sessionStorage['getItem'](cs)||'[]';this['addMany'](JSON['parse'](_0x1135c3));}['_saveToSessionStorage'](){sessionStorage['setItem'](cs,JSON['stringify'](this['map'](_0x2c2912=>_0x2c2912)));}}function Ss(_0x5b749c){return _0x5b749c['toLowerCase']()['trim']();}class k extends _0x17de50{['focusTracker'];['keystrokes'];['contentArea'];['toolbar'];['promptView'];['errorView'];['_focusables'];['focusCycler'];['_promptHistory'];constructor(_0xf1a143,_0x1da0f4,_0x5da8ac=''){super(_0xf1a143),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 os(),this['errorView']=new rt(_0xf1a143),this['contentArea']=new X(_0xf1a143,_0x5da8ac),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 _0x5cf098(),this['keystrokes']=new ts(),this['_focusables']=this['createCollection']([this['contentArea'],this['contentArea']['copyButtonView'],this['toolbar'],this['promptView']]),this['focusCycler']=new _0x259bc5({'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 _0x66ad47=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form',_0x1da0f4],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form-content']},'children':[{'tag':'div','attributes':{'class':[_0x66ad47['if']('isError','ck-hidden',_0x3a474c=>!_0x3a474c)]},'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'](_0x2ffbaa=0x1){-0x1===_0x2ffbaa?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 _0x32bc66=this['locale'],_0x581ae4=new ht(_0x32bc66,{'queryView':{'label':i(_0x32bc66,'Ask\x20AI\x20to\x20edit\x20or\x20generate'),'creator':_0x5c0bdc,'showIcon':!0x1,'showResetButton':!0x1},'infoView':{'text':{'noSearchableItems':{'primary':i(_0x32bc66,'Empty\x20history'),'secondary':i(_0x32bc66,'Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.')}}},'filteredView':this['_createHistoryView'](),'queryMinChars':0x1/0x0,'resetOnBlur':!0x1});return _0x581ae4['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x21e927,_0x55c194)=>_0x21e927&&!_0x55c194),this['listenTo'](_0x581ae4,'submit',(_0x15f935,_0x318ef9)=>{this['prompt']=_0x318ef9;const _0x1c2db1=_0x1498d7(_0x318ef9);this['fire']('submitPrompt',_0x1c2db1),_0x318ef9['trim']()&&this['_promptHistory']['add']({'prompt':_0x1c2db1},0x0);},{'priority':'high'}),_0x581ae4;}['_createHistoryView'](){const _0x103244=new rs(this['locale']);return _0x103244['historyGroupView']['items']['bindTo'](this['_promptHistory'])['as'](hs),_0x103244['on']('clearHistory',()=>{this['_promptHistory']['clear'](),this['promptView']['search'](''),this['promptView']['focus']();}),_0x103244;}['_createToolbar'](){const _0x4061f2=new at(this['locale']);return _0x4061f2['replaceButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x2219bb,_0x335831,_0x5b0f5b)=>_0x2219bb&&!_0x335831&&!!_0x5b0f5b),_0x4061f2['replaceButton']['delegate']('execute')['to'](this,'replaceContent'),_0x4061f2['insertButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x9cfb6d,_0x56d96d,_0x497873)=>_0x9cfb6d&&!_0x56d96d&&!!_0x497873),_0x4061f2['insertButton']['delegate']('execute')['to'](this,'insertContentBelow'),_0x4061f2['tryAgainButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x488eef,_0x1feaae)=>_0x488eef&&!_0x1feaae),_0x4061f2['tryAgainButton']['delegate']('execute')['to'](this,'tryAgainEvent'),_0x4061f2['stopButton']['bind']('isEnabled')['to'](this,'isProcessing'),_0x4061f2['stopButton']['delegate']('execute')['to'](this,'stopProcessing'),_0x4061f2;}['startProcessing'](){this['value']='',this['isError']=!0x1,this['isProcessing']=!0x0,this['contentArea']['isVisible']=!0x0,this['toolbar']['isVisible']=!0x0,this['contentArea']['focus']();}['finishProcessing'](){const _0x33d72b=this['locale'];this['isProcessing']=!0x1,this['prompt']='',this['promptView']['reset'](),this['value']&&(this['promptView']['queryView']['label']=i(_0x33d72b,'Ask\x20AI\x20to\x20improve\x20generated\x20text'));}['handleError'](_0x1e49a2){const _0x4d1008=this['locale'];this['finishProcessing'](),this['isError']=!0x0,this['errorView']['text']=_0x1e49a2||i(_0x4d1008,'AI_ERROR_FAILED'),this['value']||(this['contentArea']['isVisible']=!0x1);}}var T='<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M15.346\x209.422a.151.151\x200\x200\x201\x20.284\x200l.548\x201.484a.152.152\x200\x200\x200\x20.09.089l1.483.549a.151.151\x200\x200\x201\x200\x20.284l-1.483.548a.151.151\x200\x200\x200-.09.09l-.548\x201.483a.152.152\x200\x200\x201-.142.1.151.151\x200\x200\x201-.142-.1l-.549-1.483a.15.15\x200\x200\x200-.09-.09l-1.483-.548a.15.15\x200\x200\x201\x200-.284l1.484-.549a.152.152\x200\x200\x200\x20.089-.09l.549-1.483Z\x22/><path\x20d=\x22M16.306\x201.742a.151.151\x200\x200\x201\x20.284\x200l.549\x201.483a.15.15\x200\x200\x200\x20.089.09l1.483.548a.151.151\x200\x200\x201\x20.072.229.151.151\x200\x200\x201-.072.055l-1.483.549a.15.15\x200\x200\x200-.09.09l-.548\x201.482a.151.151\x200\x200\x201-.284\x200l-.549-1.483a.15.15\x200\x200\x200-.09-.09l-1.483-.548a.151.151\x200\x200\x201\x200-.284l1.484-.549a.152.152\x200\x200\x200\x20.09-.089l.548-1.483Z\x22/><path\x20d=\x22M7.665\x201.742a.151.151\x200\x200\x201\x20.284\x200l.549\x201.483a.151.151\x200\x200\x200\x20.09.09l1.482.548a.151.151\x200\x200\x201\x20.072.229.151.151\x200\x200\x201-.072.055l-1.483.549a.151.151\x200\x200\x200-.09.09L7.95\x206.267a.151.151\x200\x200\x201-.284\x200l-.549-1.483a.151.151\x200\x200\x200-.089-.09l-1.483-.548a.151.151\x200\x200\x201\x200-.284l1.483-.549a.151.151\x200\x200\x200\x20.09-.089l.548-1.483-.001.001Z\x22/><path\x20d=\x22M14.72\x207.946a.848.848\x200\x200\x200\x20.25-.591.824.824\x200\x200\x200-.241-.588l-1.943-1.938a.812.812\x200\x200\x200-.588-.241.838.838\x200\x200\x200-.591.25l-1.545\x201.539\x203.115\x203.115\x201.542-1.546h.001Z\x22/><path\x20clip-rule=\x22evenodd\x22\x20d=\x22M1.19\x2015.636a.96.96\x200\x200\x201\x20.281-.679l7.835-7.834\x203.121\x203.12-7.834\x207.835a.959.959\x200\x200\x201-1.358\x200l-1.764-1.764a.96.96\x200\x200\x201-.28-.678Zm9.22-5.391-1.121-1.12-6.479\x206.478\x201.121\x201.121\x206.479-6.479Z\x22/></svg>';const w=globalThis['DataTransfer'];class n extends _0xcedc34{['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[_0x53bf63,a,K,_0x566636];}constructor(_0x5e07de){super(_0x5e07de),_0x5e07de['config']['define']('ai.aiAssistant.disabledElements',['media','rawHtml','tableOfContents']),_0x5e07de['config']['define']('ai.aiAssistant.contentAreaCssClass',''),_0x5e07de['config']['define']('ai.useTheme',!0x0),this['_uiCssClasses']='ck-ai-assistant-ui'+(_0x5e07de['config']['get']('ai.useTheme')?'\x20ck-ai-assistant-ui_theme':'');}['init'](){const {editor:_0x2ba6ff}=this;this['_aiAdapter']=_0x2ba6ff['plugins']['get'](K),this['_dialog']=_0x2ba6ff['plugins']['get'](_0x566636),this['_formView']=null,this['_commandDefinitions']=this['_getResolvedCommandsDefinitions']();const _0x4b1472=new E(_0x2ba6ff,Array['from'](this['_commandDefinitions']['values']()));_0x2ba6ff['commands']['add']('showAIAssistant',_0x4b1472),_0x2ba6ff['ui']['componentFactory']['add']('aiCommands',_0x48c0cd=>{const _0x5491d9=_0x1b1754(_0x48c0cd);return _0x5491d9['set']({'class':'ck-ai-commands-dropdown\x20'+this['_uiCssClasses']}),_0x5491d9['buttonView']['set']({'label':i(_0x48c0cd,'AI\x20Commands'),'icon':T,'tooltip':!0x0}),_0x5491d9['on']('execute',_0x1db2fe=>this['_onExecute'](_0x1db2fe['source']['id'])),_0x3540ab(_0x5491d9,_0x2ba6ff['ui']['view']['body'],function(_0x469a16){const _0x380e7d=o(_0x469a16['config']['get']('ai.aiAssistant.commands'),_0x469a16['locale']),_0x2cb7c2=U(_0x469a16,_0x380e7d)['filter'](_0x1bceee=>_0x1bceee['commands']['length']);if(0x1===_0x2cb7c2['length'])return U(_0x469a16,_0x2cb7c2[0x0]['commands'])['map'](_0x456069=>({'id':_0x456069['id'],'label':_0x456069['label']}));return _0x2cb7c2['map'](_0x22dd64=>{const {groupId:_0x94f05b,groupLabel:_0x1c2fb6,commands:_0xf6c18}=_0x22dd64,_0x51a842=U(_0x469a16,_0xf6c18)['map'](_0x39d422=>({'id':_0x39d422['id'],'label':_0x39d422['label']}));return{'id':_0x94f05b,'menu':_0x1c2fb6||_0x94f05b,'children':_0x51a842};});}(_0x2ba6ff),{'ariaLabel':i(_0x48c0cd,'AI\x20Commands')}),_0x5491d9['menuView']['menuPanelClass']='ck-ai-commands-dropdown\x20'+this['_uiCssClasses'],_0x4b1472['on']('change:enabledCommandsIds',_0x2e25be),_0x5491d9['menuView']['once']('render',_0x2e25be),_0x5491d9;function _0x2e25be(){_0x5491d9['isEnabled']=_0x4b1472['enabledCommandsIds']['length']>0x0;for(const _0x3d1907 of _0x5491d9['menuView']['buttons'])_0x3d1907['isEnabled']=_0x4b1472['enabledCommandsIds']['includes'](_0x3d1907['id']);}}),_0x2ba6ff['ui']['componentFactory']['add']('menuBar:aiCommands',_0x1132f8=>{const _0x4c054e=new _0x593b6b(_0x1132f8);_0x4c054e['buttonView']['set']({'label':i(_0x1132f8,'AI\x20Commands'),'icon':T}),_0x4c054e['bind']('isEnabled')['to'](_0x4b1472,'enabledCommandsIds',_0x86f2b1=>_0x86f2b1['length']>0x0);const _0x570017=o(_0x2ba6ff['config']['get']('ai.aiAssistant.commands'),_0x1132f8);return this['_populateMenuBarMenu'](_0x4b1472,_0x4c054e,_0x570017,_0xbd40c0=>this['_onExecute'](_0xbd40c0)),_0x4c054e;}),_0x2ba6ff['ui']['componentFactory']['add']('aiAssistant',()=>{const _0x5917a4=this['_createAIAssistantUIButton'](_0xade2b2);return _0x5917a4['set']({'tooltip':!0x0,'class':'ck-ai-assistant-button\x20'+this['_uiCssClasses']}),_0x5917a4;}),_0x2ba6ff['ui']['componentFactory']['add']('menuBar:aiAssistant',()=>{const _0x4ad152=this['_createAIAssistantUIButton'](_0x421d36);return _0x4ad152['set']({'role':'menuitemcheckbox'}),_0x4ad152;}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x4681d5=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x4b8737;for(const _0xbe64a3 in _0x4681d5){const _0x39a2f8=_0xbe64a3,_0x2c7e13=_0x4681d5[_0x39a2f8];if('aiLicenseKeyValid'==_0x2c7e13||'aiLicenseKeyInvalid'==_0x2c7e13||'aiLicenseKeyExpired'==_0x2c7e13||'aiLicenseKeyDomainLimit'==_0x2c7e13||'aiLicenseKeyNotAllowed'==_0x2c7e13||'aiLicenseKeyEvaluationLimit'==_0x2c7e13||'aiLicenseKeyTrialLimit'==_0x2c7e13||'aiLicenseKeyUsageLimit'==_0x2c7e13){delete _0x4681d5[_0x39a2f8],_0x4b8737=_0x2c7e13,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'aiLicenseKeyInvalid'==_0x4b8737&&_0x4681d5['_showLicenseError']('invalid'),'aiLicenseKeyExpired'==_0x4b8737&&_0x4681d5['_showLicenseError']('expired'),'aiLicenseKeyDomainLimit'==_0x4b8737&&_0x4681d5['_showLicenseError']('domainLimit'),'aiLicenseKeyNotAllowed'==_0x4b8737&&_0x4681d5['_showLicenseError']('featureNotAllowed','AIAssistant'),'aiLicenseKeyEvaluationLimit'==_0x4b8737&&_0x4681d5['_showLicenseError']('evaluationLimit'),'aiLicenseKeyTrialLimit'==_0x4b8737&&_0x4681d5['_showLicenseError']('trialLimit'),'aiLicenseKeyUsageLimit'==_0x4b8737&&_0x4681d5['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['showUI'](_0x354a43='',_0x46fe14='',_0x3c3a29='custom'){const _0x53d238=this['editor'],_0x288a24=_0x53d238['editing']['view'],_0x55ed0b=_0x53d238['plugins']['get'](a),_0x2d303f=_0x53d238['plugins']['get'](_0x53bf63);_0x55ed0b['showFakeVisualSelection']();const _0xba9197=new w(),_0x1c84a3=new ClipboardEvent('copy',{'clipboardData':_0xba9197}),_0x2a7ae3=new _0x5e5f33(_0xba9197),_0x2731ab=new _0x4dfa86(_0x288a24,_0x1c84a3,{'dataTransfer':_0x2a7ae3});_0x2d303f['_forceMarkersCopy']('comment',()=>{_0x288a24['document']['fire']('copy',_0x2731ab);}),this['_formView']||(this['_initView'](),this['_aiAssistantController']=new j(_0x53d238,this['_aiAdapter']['textAdapter'],this['_formView']));let _0x1ec5f1=_0x2a7ae3['getData']('text/html');const _0x1a798d=_0x53d238['model']['document']['selection'],_0xc2ec72=Array['from'](_0x1a798d['getRanges']());0x1===_0xc2ec72['length']&&_0xc2ec72[0x0]['isFlat']&&!_0x1a798d['getSelectedElement']()&&''!==_0x1ec5f1['replace'](/ /g,'')['trim']()&&(_0x1ec5f1='<p>'+_0x1ec5f1+'</p>'),this['_aiAssistantController']['updateView']({'actionId':_0x3c3a29,'query':_0x354a43,'htmlContent':_0x1ec5f1,'label':_0x46fe14,'mainActionLabel':M[_0x53d238['model']['document']['selection']['isCollapsed']?'INSERT':'REPLACE']}),'aiAssistant'!==this['_dialog']['id']?this['_dialog']['show']({'id':'aiAssistant','icon':ct['robotPencil'],'title':i(this['editor']['locale'],'AI\x20Assistant'),'content':this['_formView'],'position':_0x2cb390['EDITOR_TOP_SIDE'],'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_aiAssistantController']['reset'](),_0x55ed0b['hideFakeVisualSelection']();}}):this['_dialog']['view']['wasMoved']||this['_dialog']['view']['updatePosition']();}['hideUI'](){this['_dialog']['hide']();}['_getResolvedCommandsDefinitions'](){const _0xb00e6b=new Map(),_0x28b0e2=o(this['editor']['config']['get']('ai.aiAssistant.commands'),this['editor']['locale']);for(const _0x509724 of _0x28b0e2)for(const _0x3594ec of _0x509724['commands'])_0xb00e6b['set'](_0x3594ec['id'],{..._0x3594ec,'groupId':_0x509724['groupId'],'groupLabel':_0x509724['groupLabel']||_0x509724['groupId']});return _0xb00e6b;}['_createAIAssistantUIButton'](_0x52b8ec){const _0x19ada8=this['editor'],_0x512308=_0x19ada8['commands']['get']('showAIAssistant'),_0x47a49e=new _0x52b8ec(_0x19ada8['locale']);return _0x47a49e['set']({'label':i(_0x19ada8['locale'],'AI\x20Assistant'),'icon':ct['robotPencil'],'isToggleable':!0x0}),_0x47a49e['bind']('isEnabled')['to'](_0x512308),_0x47a49e['bind']('isOn')['to'](this['_dialog'],'id',_0x527e6d=>'aiAssistant'===_0x527e6d),this['listenTo'](_0x47a49e,'execute',()=>{_0x47a49e['isOn']?this['hideUI']():_0x512308['execute']();}),_0x47a49e;}['_initView'](){const _0x5eb35e=this['editor']['plugins']['get'](a);this['_formView']=new k(this['editor']['locale'],this['_uiCssClasses'],this['editor']['config']['get']('ai.aiAssistant.contentAreaCssClass')),this['_formView']['on']('change:value',()=>{this['_dialog']['view']['wasMoved']||this['_dialog']['view']['updatePosition']();}),this['_formView']['promptView']['queryView']['fieldView']['on']('update',()=>{this['_dialog']['view']['wasMoved']||this['_dialog']['view']['updatePosition']();}),this['listenTo'](this['_formView'],'replaceContent',()=>{_0x5eb35e['insertContent'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['listenTo'](this['_formView'],'insertContentBelow',()=>{_0x5eb35e['insertContentBelow'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['_initAriaAiStatusChangeAnnouncements']();}['_initAriaAiStatusChangeAnnouncements'](){const {locale:_0x651ef4,ui:{ariaLiveAnnouncer:_0x10f80a}}=this['editor'];this['_formView']['contentArea']['on']('change:isProcessing',(_0x11c153,_0x40542b,_0x1a92c2)=>{const _0x58e553=this['_aiAssistantController']['currentContext'];_0x1a92c2?_0x10f80a['announce'](i(_0x651ef4,'AI\x20is\x20writing')):_0x58e553&&_0x10f80a['announce'](i(_0x651ef4,'Generated\x20content:\x20%0',_0x58e553),{'politeness':'polite','isUnsafeHTML':!0x0});}),this['_formView']['on']('change:isError',(_0x311d40,_0x220167,_0x39fc49)=>{if(_0x39fc49){const _0x567133=this['_formView']['errorView']['text'];_0x10f80a['announce'](i(_0x651ef4,'Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x567133));}});}['_onExecute'](_0x4aacc6){const _0x4484e3=this['_commandDefinitions']['get'](_0x4aacc6),_0x27ea58=this['editor'],_0x31c72c=_0x27ea58['model']['document']['selection'],_0x344767=_0x27ea58['commands']['get']('showAIAssistant'),_0x539cd0=_0x27ea58['plugins']['get'](a),_0x4e19f9=''+(_0x4484e3['groupId']!==x?_0x4484e3['groupLabel']+':\x20':'')+_0x4484e3['label'];if(!0x1!==_0x4484e3['requiresContent']&&_0x31c72c['isCollapsed']){const _0x7a686b=_0x114b63(_0x31c72c['getSelectedBlocks']())||_0x27ea58['model']['schema']['getLimitElement'](_0x31c72c);_0x27ea58['model']['change'](_0x5a5351=>{_0x5a5351['setSelection'](_0x7a686b,'in');});}_0x539cd0['showFakeVisualSelection'](),_0x344767['execute'](_0x4484e3['prompt'],_0x4e19f9,'command:'+_0x4aacc6);}['_populateMenuBarMenu'](_0x36c07f,_0x5ee509,_0x4dc55d,_0x26ffce){const _0x53149b=this['editor'],_0x4cbe0e=_0x53149b['locale'],_0x2e744d=new _0x302fde(_0x4cbe0e),_0x4fae20=U(_0x53149b,_0x4dc55d)['filter'](_0x228817=>_0x228817['commands']['length']);0x1===_0x4fae20['length']?this['_getMenuBarGroupButtons']({'command':_0x36c07f,'commands':_0x4fae20[0x0]['commands'],'parentMenuView':_0x5ee509,'onExecute':_0x26ffce})['forEach'](_0x3e256c=>_0x2e744d['items']['add'](_0x3e256c)):_0x4fae20['forEach'](({groupId:_0x5ea8e9,groupLabel:_0x30685b,commands:_0x5cf8f0})=>{const _0x50fdc4=new _0x664286(_0x4cbe0e,_0x5ee509),_0x5104bf=new _0x593b6b(_0x4cbe0e),_0x49620d=new _0x302fde(_0x4cbe0e),_0x7b94fa=this['_getMenuBarGroupButtons']({'command':_0x36c07f,'commands':_0x5cf8f0,'parentMenuView':_0x5104bf,'onExecute':_0x26ffce});_0x5104bf['buttonView']['set']({'label':_0x30685b||_0x5ea8e9}),_0x5104bf['delegate']('execute')['to'](_0x5ee509),_0x49620d['items']['addMany'](_0x7b94fa),_0x5104bf['panelView']['children']['add'](_0x49620d),_0x50fdc4['children']['add'](_0x5104bf),_0x2e744d['items']['add'](_0x50fdc4);}),_0x5ee509['panelView']['children']['add'](_0x2e744d);}['_getMenuBarGroupButtons']({command:_0xa3a179,commands:_0x439015,parentMenuView:_0x536eec,onExecute:_0x293d36}){const _0x3dd598=this['editor'],_0x2c41ef=_0x3dd598['locale'];return U(_0x3dd598,_0x439015)['map'](_0xa62b32=>{const _0x5c2221=new _0x664286(_0x2c41ef,_0x536eec),_0x32583d=new _0x421d36(_0x2c41ef);return _0x32583d['set']({'label':_0xa62b32['label']}),_0x32583d['delegate']('execute')['to'](_0x536eec),_0x32583d['on']('execute',()=>_0x293d36(_0xa62b32['id'])),_0x32583d['bind']('isEnabled')['to'](_0xa3a179,'enabledCommandsIds',_0x1302fa=>_0x1302fa['includes'](_0xa62b32['id'])),_0x5c2221['children']['add'](_0x32583d),_0x5c2221;});}}function B(_0xf7b086,_0x48090a){return void 0x0!==_0xf7b086['order']&&void 0x0===_0x48090a['order']?0x1:void 0x0===_0xf7b086['order']&&void 0x0!==_0x48090a['order']?-0x1:void 0x0!==_0xf7b086['order']&&void 0x0!==_0x48090a['order']?_0xf7b086['order']-_0x48090a['order']:0x0;}function U(_0x2300c4,_0x161a0d){_0x161a0d['sort'](B);const _0x38fa2d={},_0x11253f=[];for(const _0x1e3467 of _0x161a0d)if(void 0x0!==_0x1e3467['order']){if(_0x1e3467['order']in _0x38fa2d)throw new _0x5e5a4d('ai-commands-config-order-collision',_0x2300c4,{'conflictingDefinitions':[_0x1e3467,_0x38fa2d[_0x1e3467['order']]]});_0x38fa2d[_0x1e3467['order']]=_0x1e3467,_0x11253f['splice'](_0x1e3467['order'],0x0,_0x1e3467);}else _0x11253f['push'](_0x1e3467);return _0x11253f;}class r extends _0xcedc34{static get['requires'](){return[n,a];}static get['pluginName'](){return'AIAssistant';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3285db){super(_0x3285db);const _0x4bef78=_0x3285db['config'],_0x593adb=_0x3285db['locale'];_0x4bef78['define']('ai.aiAssistant.preserveComments',!0x0),_0x4bef78['define']('ai.aiAssistant.commands',function(_0x151f68){return[{'groupId':'editOrReview','groupLabel':i(_0x151f68,'Edit\x20or\x20review'),'commands':[{'id':'improveWriting','label':i(_0x151f68,'Improve\x20writing'),'prompt':'Fix\x20spelling\x20mistakes,\x20use\x20proper\x20grammar\x20and\x20apply\x20good\x20writing\x20practices.\x20Do\x20not\x20lose\x20the\x20original\x20meaning.'},{'id':'makeShorter','label':i(_0x151f68,'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(_0x151f68,'Make\x20longer'),'prompt':'Improve\x20this\x20content\x20by\x20using\x20descriptive\x20language\x20and\x20inserting\x20more\x20information\x20and\x20more\x20detailed\x20explanations.'},{'id':'simplifyLanguage','label':i(_0x151f68,'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(_0x151f68,'Generate\x20from\x20selection'),'commands':[{'id':'summarize','label':i(_0x151f68,'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(_0x151f68,'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(_0x151f68,'Change\x20tone'),'commands':[{'id':'professional','label':i(_0x151f68,'Professional'),'prompt':'Improve\x20using\x20polished,\x20formal,\x20and\x20respectful\x20language\x20to\x20convey\x20professional\x20expertise\x20and\x20competence.'},{'id':'casual','label':i(_0x151f68,'Casual'),'prompt':'Improve\x20using\x20casual,\x20informal\x20language\x20to\x20convey\x20a\x20casual\x20conversation\x20with\x20a\x20real\x20person.'},{'id':'direct','label':i(_0x151f68,'Direct'),'prompt':'Improve\x20using\x20direct\x20language,\x20using\x20only\x20the\x20essential\x20information.'},{'id':'confident','label':i(_0x151f68,'Confident'),'prompt':'Improve\x20using\x20compelling,\x20optimistic\x20language\x20to\x20convey\x20confidence\x20in\x20the\x20writing.'},{'id':'friendly','label':i(_0x151f68,'Friendly'),'prompt':'Improve\x20using\x20friendly,\x20comforting\x20language,\x20to\x20convey\x20understanding\x20and\x20empathy.'}]},{'groupId':'changeStyle','groupLabel':i(_0x151f68,'Change\x20style'),'commands':[{'id':'business','label':i(_0x151f68,'Business'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20business\x20professional\x20with\x20formal\x20language.'},{'id':'legal','label':i(_0x151f68,'Legal'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20legal\x20professional\x20using\x20valid\x20legal\x20terminology.'},{'id':'journalism','label':i(_0x151f68,'Journalism'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20journalist\x20using\x20engaging\x20language\x20to\x20convey\x20the\x20importance\x20of\x20the\x20information.'},{'id':'poetic','label':i(_0x151f68,'Poetic'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20poem\x20using\x20poetic\x20techniques\x20without\x20losing\x20the\x20original\x20meaning.'}]},{'groupId':'translate','groupLabel':i(_0x151f68,'Translate'),'commands':[{'id':'translateEnglish','label':i(_0x151f68,'English'),'prompt':'Translate\x20the\x20content\x20to\x20English\x20language.'},{'id':'translateSpanish','label':i(_0x151f68,'Spanish'),'prompt':'Translate\x20the\x20content\x20to\x20Spanish\x20language.'},{'id':'translatePortuguese','label':i(_0x151f68,'Portuguese'),'prompt':'Translate\x20the\x20content\x20to\x20Portuguese\x20language.'},{'id':'translateGerman','label':i(_0x151f68,'German'),'prompt':'Translate\x20the\x20content\x20to\x20German\x20language.'},{'id':'translateFrench','label':i(_0x151f68,'French'),'prompt':'Translate\x20the\x20content\x20to\x20French\x20language.'},{'id':'translateChinese','label':i(_0x151f68,'Simplified\x20Chinese'),'prompt':'Translate\x20the\x20content\x20to\x20Simplified\x20Chinese\x20language.'},{'id':'translateHindi','label':i(_0x151f68,'Hindi'),'prompt':'Translate\x20the\x20content\x20to\x20Hindi\x20language.'},{'id':'translateArabic','label':i(_0x151f68,'Arabic'),'prompt':'Translate\x20the\x20content\x20to\x20Arabic\x20language.'}]}];}(_0x593adb)),_0x4bef78['define']('ai.aiAssistant.extraCommandGroups',[]),_0x4bef78['define']('ai.aiAssistant.removeCommands',[]);let _0x10e2d4=o(_0x4bef78['get']('ai.aiAssistant.commands'),_0x593adb);const _0x5a00f5=_0x4bef78['get']('ai.aiAssistant.extraCommandGroups'),_0x10ef43=_0x4bef78['get']('ai.aiAssistant.removeCommands');_0x5a00f5['forEach'](_0x840bc2=>{const _0x8b523e=_0x10e2d4['find'](_0x4ca2aa=>_0x4ca2aa['groupId']===_0x840bc2['groupId']);_0x8b523e?_0x8b523e['commands']=_0x8b523e['commands']['concat'](_0x840bc2['commands']):_0x10e2d4['push'](_0x840bc2);}),_0x10e2d4=_0x10e2d4['filter'](_0x5f1eef=>!_0x10ef43['includes'](_0x5f1eef['groupId'])),_0x10e2d4['forEach'](_0x1177bf=>{_0x1177bf['commands']=_0x1177bf['commands']['filter'](_0x117066=>!_0x10ef43['includes'](_0x117066['id']));}),_0x4bef78['set']('ai.aiAssistant.commands',_0x10e2d4);}}class P extends _0xcedc34{['abortController'];static get['requires'](){return[K];}constructor(_0xf4d879){super(_0xf4d879),this['abortController']=new AbortController();}['init'](){this['editor']['plugins']['get'](K)['textAdapter']=this;}['abort'](){this['abortController']['signal']['aborted']||(this['abortController']['abort'](),this['abortController']=new AbortController());}async['makeRequest'](_0x5e36f7){return this['sendRequest'](_0x5e36f7)['catch'](_0x10154d=>{if(_0x10154d instanceof R)return Promise['reject'](_0x10154d);if('AbortError'==_0x10154d['name'])return Promise['resolve']();throw console['error'](_0x10154d),new _0x5e5a4d('aitextadapter-send-request-failed',null);});}async['_prepareRequestHeaders'](_0x1ae03b,_0x25bcc4){const _0xe5bfae=this['editor']['locale'],_0x2bae36={'Content-Type':'application/json'};if('object'==typeof _0x1ae03b)Object['assign'](_0x2bae36,_0x1ae03b);else{if(_0x1ae03b)try{const _0x30a396=await _0x1ae03b(_0x25bcc4);Object['assign'](_0x2bae36,_0x30a396);}catch(_0x180728){return Promise['reject'](new R(i(_0xe5bfae,'AI_ERROR_GET_HEADERS')));}}return _0x2bae36;}async['_prepareRequestParameters'](_0x1cf539,_0x379e07){const _0x418c0f=this['editor']['locale'];if('object'==typeof _0x1cf539)return _0x1cf539;try{return await _0x1cf539(_0x379e07);}catch(_0x56777f){return Promise['reject'](new R(i(_0x418c0f,'AI_ERROR_GET_PARAMETERS')));}}}class H extends P{['_apiUrl'];['_requestHeaders'];['_requestParameters'];static get['pluginName'](){return'OpenAITextAdapter';}constructor(_0x1a324f){super(_0x1a324f),_0x1a324f['config']['define']('ai.openAI.apiUrl','https://api.openai.com/v1/chat/completions'),_0x1a324f['config']['get']('ai.openAI.requestParameters')||_0x1a324f['config']['define']('ai.openAI.requestParameters',{'model':'gpt-3.5-turbo','max_tokens':0x7d0,'temperature':0x1,'top_p':0x1,'stream':!0x0}),this['_apiUrl']=_0x1a324f['config']['get']('ai.openAI.apiUrl'),this['_requestHeaders']=_0x1a324f['config']['get']('ai.openAI.requestHeaders')||{},this['_requestParameters']=_0x1a324f['config']['get']('ai.openAI.requestParameters');}async['sendRequest']({query:_0x3fb0d6,context:_0x10e27b,onData:_0x1302e1,actionId:_0x3693e9}){const _0x227b37=this['editor']['locale'],_0x5bc76c=await this['prepareMessages'](_0x3fb0d6,_0x10e27b,_0x3693e9),_0x1d9a9d=await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x3693e9),_0x556190=await this['_prepareRequestParameters'](this['_requestParameters'],_0x3693e9),_0x756315={'messages':_0x5bc76c,..._0x556190},_0x541d8d={'method':'POST','headers':_0x1d9a9d,'body':JSON['stringify'](_0x756315),'signal':this['abortController']['signal']},_0x51f996=await fetch(this['_apiUrl'],_0x541d8d);if(_0x51f996['ok'])return _0x556190['stream']?await this['_readStreamableResponse'](_0x51f996,_0x1302e1):await this['_readStaticResponse'](_0x51f996,_0x1302e1),Promise['resolve']();{const _0x59a8be=await _0x51f996['text']();return _0x59a8be['includes']('context_length_exceeded')?Promise['reject'](new R(i(_0x227b37,'AI_ERROR_CONTEXT_LENGTH'))):_0x59a8be['includes']('Moderation')?Promise['reject'](new R(i(_0x227b37,'AI_ERROR_MODERATION'))):Promise['reject'](new Error(_0x59a8be));}}async['prepareMessages'](_0x10a29d,_0x73c22b,_0x113335){let _0x4f56de,_0x5bc256;return _0x73c22b?(_0x4f56de='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.',_0x5bc256='Instruction:\x0a'+_0x10a29d+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x73c22b):(_0x4f56de='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.',_0x5bc256=_0x10a29d),[{'role':'system','content':_0x4f56de},{'role':'user','content':_0x5bc256}];}async['_readStreamableResponse'](_0x580644,_0x53be63){const _0x3d2f5d=_0x580644['body']['getReader'](),_0x1c343b=new TextDecoder();let _0x3eda8b='',_0x110c40='',_0x157d2a='',_0x20a803=!0x1;for(;!_0x20a803;){const {done:_0x546822,value:_0x379264}=await _0x3d2f5d['read'](),_0x82cb65=_0x3eda8b+_0x1c343b['decode'](_0x379264);let _0xb52024='';_0x20a803=_0x546822;try{_0xb52024=this['_cleanUpData'](_0x82cb65),_0x3eda8b='';}catch(_0x274aa2){_0x3eda8b=_0x82cb65;continue;}_0x110c40+=_0xb52024,!_0x20a803&&this['_isBufferIncomplete'](_0x110c40)||_0x110c40&&(_0x157d2a+=_0x110c40,_0x110c40='',_0x53be63(_0x157d2a));}return Promise['resolve']();}async['_readStaticResponse'](_0x37e0a5,_0x1e1282){return _0x1e1282((await _0x37e0a5['json']())['choices'][0x0]['message']['content']),Promise['resolve']();}['_isBufferIncomplete'](_0x542623){const _0x161c8c=_0x542623['split']('<')['length']!==_0x542623['split']('>')['length'],_0x3b79d1=_0x542623['length']<0x1e;return _0x161c8c&&_0x3b79d1;}['_cleanUpData'](_0xfec563){return _0xfec563['split'](/\n(?![^{]*\})/g)['map'](_0x123ad2=>_0x123ad2['replace']('data:\x20',''))['filter'](_0x1f68c0=>_0x1f68c0&&_0x1f68c0['length']>0x0&&'[DONE]'!==_0x1f68c0)['map'](_0x445668=>{const {choices:_0x2e9fbe}=JSON['parse'](_0x445668);if(_0x2e9fbe[0x0]&&_0x2e9fbe[0x0]['delta']&&_0x2e9fbe[0x0]['delta']['content'])return _0x2e9fbe[0x0]['delta']['content'];})['filter'](_0x39ec31=>_0x39ec31)['join']('');}}class O extends P{['_apiUrl'];['_requestHeaders'];['_bedrockClientConfig'];['_requestParameters'];static get['pluginName'](){return'AWSTextAdapter';}constructor(_0x5369f2){super(_0x5369f2),_0x5369f2['config']['get']('ai.aws.requestParameters')||_0x5369f2['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']=_0x5369f2['config']['get']('ai.aws.apiUrl'),this['_bedrockClientConfig']=_0x5369f2['config']['get']('ai.aws.bedrockClientConfig'),this['_requestHeaders']=_0x5369f2['config']['get']('ai.aws.requestHeaders'),this['_requestParameters']=_0x5369f2['config']['get']('ai.aws.requestParameters');}async['sendRequest']({query:_0xcae686,context:_0x2e8d66,onData:_0x67ccc8,actionId:_0x55d89f}){const {model:_0x1b97cb,stream:_0x5566db,..._0x5d59ba}=await this['_prepareRequestParameters'](this['_requestParameters'],_0x55d89f),_0x5dcc8c={'prompt':await this['preparePrompt'](_0xcae686,_0x2e8d66,_0x1b97cb,_0x55d89f),..._0x5d59ba};this['_apiUrl']?await this['_processProxyRequest'](_0x5dcc8c,_0x1b97cb,_0x5566db,_0x67ccc8,_0x55d89f):await this['_processAWSRequest'](_0x5dcc8c,_0x1b97cb,_0x5566db,_0x67ccc8);}async['preparePrompt'](_0x465b6c,_0x2d4651,_0x5907e1,_0x5e8b02){let _0x38d977,_0x43714c;return _0x2d4651?(_0x38d977='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.',_0x43714c='Instruction:\x0a'+_0x465b6c+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x2d4651):(_0x38d977='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.',_0x43714c=_0x465b6c),'meta.llama'==this['getModelFamily'](_0x5907e1)?'<<SYS>>\x0a'+_0x38d977+'\x0a<</SYS>>\x0a[INST]\x0a'+_0x43714c+'\x0a[/INST]':'Human:\x0a'+_0x38d977+'\x0a'+_0x43714c+'\x0a\x0aAssistant:';}['getModelFamily'](_0xbbe23c){if(/^anthropic\.claude/['test'](_0xbbe23c))return'anthropic.claude';if(/^ai21\.j2/['test'](_0xbbe23c))return'ai21.j2';if(/^cohere\.command/['test'](_0xbbe23c))return'cohere.command';if(/^meta\.llama/['test'](_0xbbe23c))return'meta.llama';throw new R(i(this['editor']['locale'],'AI_ERROR_UNSUPPORTED_MODEL',_0xbbe23c));}async['_processProxyRequest'](_0x9de58a,_0x404f3e,_0x190338,_0x3549d5,_0x59af35){const _0x335b87={'method':'POST','headers':await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x59af35),'body':JSON['stringify']({..._0x9de58a,'model':_0x404f3e,'stream':_0x190338}),'signal':this['abortController']['signal']},_0x22b0a0=await fetch(this['_apiUrl'],_0x335b87);_0x190338?await this['_readStreamableResponse'](_0x22b0a0,_0x404f3e,_0x3549d5):await this['_readStaticResponse'](_0x22b0a0,_0x404f3e,_0x3549d5);}async['_processAWSRequest'](_0x49575a,_0xdb70dc,_0x3cf43a,_0x267112){const _0x57c1c2=new _0xc25059(this['_bedrockClientConfig']),_0x49680b={'body':JSON['stringify'](_0x49575a),'contentType':'application/json','accept':'application/json','modelId':_0xdb70dc};let _0xf6397e;if(_0x3cf43a){const _0x564b63=new _0x4827f5(_0x49680b);_0xf6397e=await _0x57c1c2['send'](_0x564b63,{'abortSignal':this['abortController']['signal']}),await this['_readAsyncIterableResponse'](_0xf6397e,_0xdb70dc,_0x267112);}else{const _0x12c876=new _0x29fe03(_0x49680b);_0xf6397e=await _0x57c1c2['send'](_0x12c876,{'abortSignal':this['abortController']['signal']}),await this['_readStaticResponse'](_0xf6397e,_0xdb70dc,_0x267112);}}async['_readAsyncIterableResponse'](_0x4920e1,_0x5cc1d8,_0x565546){const _0x30ae46=_0x4920e1['body'],_0x426fc1=new TextDecoder('utf-8');let _0x45f0bf='';for await(const _0x4ffd09 of _0x30ae46)if(_0x4ffd09['chunk']){const _0x15c065=_0x426fc1['decode'](_0x4ffd09['chunk']['bytes']),_0x24378b=JSON['parse'](_0x15c065);_0x45f0bf+=this['_getGeneratedText'](_0x24378b,_0x5cc1d8),_0x565546(_0x45f0bf);}return Promise['resolve']();}async['_readStreamableResponse'](_0x2662b2,_0x241ba9,_0xe099ab){const _0x117e3e=_0x2662b2['body'],_0x43efb5=new TextDecoder('utf-8'),_0x21c8f5=_0x117e3e['getReader']();let _0x1a0dec='',_0x2aaee8='',_0x172efb=!0x1;for(;!_0x172efb;){const {done:_0x5699de,value:_0x4a5875}=await _0x21c8f5['read']();if(_0x172efb=_0x5699de,_0x172efb)break;const _0x2812df=(_0x1a0dec+_0x43efb5['decode'](_0x4a5875))['split']('\x0a')['map'](_0x3957df=>{try{return _0x1a0dec='',JSON['parse'](_0x3957df);}catch(_0x174df1){return _0x1a0dec=_0x3957df,null;}})['filter'](_0x2abbb2=>null!==_0x2abbb2);_0x2812df['length']&&(_0x2aaee8+=_0x2812df['map'](_0x3dd7ca=>this['_getGeneratedText'](_0x3dd7ca,_0x241ba9))['join'](''),_0xe099ab(_0x2aaee8));}return Promise['resolve']();}async['_readStaticResponse'](_0x3654ed,_0x23e031,_0x226d55){let _0x55fca3;return _0x55fca3=_0x3654ed instanceof Response?await _0x3654ed['json']():JSON['parse'](Buffer['from'](_0x3654ed['body'])['toString']('utf8')),(_0x226d55(this['_getGeneratedText'](_0x55fca3,_0x23e031)),Promise['resolve']());}['_getGeneratedText'](_0x4a2869,_0x25cf42){switch(this['getModelFamily'](_0x25cf42)){case'anthropic.claude':return _0x4a2869['completion'];case'ai21.j2':return _0x4a2869['completions'][0x0]['data']['text'];case'cohere.command':return _0x4a2869['generations'][0x0]['text'];case'meta.llama':return _0x4a2869['generation'];}}}export{K as AIAdapter,r as AIAssistant,n as AIAssistantUI,R as AIRequestError,P as AITextAdapter,O as AWSTextAdapter,H as OpenAITextAdapter};
|
|
23
|
+
import{Plugin as _0x239301,Command as _0x351cf7,icons as _0x160769}from'@ckeditor/ckeditor5-core/dist/index.js';import{uid as _0x535d59,CKEditorError as _0x2981d1,ObservableMixin as _0x1a455e,global as _0x601a75,isVisible as it,Rect as st,Collection as _0x463b6b,FocusTracker as _0x1cab19,KeystrokeHandler as ts,first as _0x4abb0d}from'@ckeditor/ckeditor5-utils/dist/index.js';import{ToolbarView as nt,ButtonView as _0x8cb510,View as _0x3d218a,SpinnerView as _0x1e1ef1,IconView as _0x5808d9,AutocompleteView as ot,ListView as lt,ListItemGroupView as ut,ListItemView as _0x2459b9,ButtonLabelView as te,FocusCycler as _0xce45fc,createLabeledTextarea as _0x5bb2a8,Dialog as _0xe1ce3f,createDropdown as _0x398943,addMenuToDropdown as _0x84c208,MenuBarMenuView as _0x4a0af4,MenuBarMenuListItemButtonView as _0x16bbb8,DialogViewPosition as _0x2fbb7c,MenuBarMenuListView as _0x47c417,MenuBarMenuListItemView as _0xfeaad3}from'@ckeditor/ckeditor5-ui/dist/index.js';import{icons as ct}from'ckeditor5-collaboration/dist/index.js';import{ClipboardPipeline as _0x273354,ClipboardMarkersUtils as _0x26c465}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{DomEventData as _0x47ee81,DataTransfer as _0x14381d,UpcastWriter as _0x2aac74,Matcher as _0x151934}from'@ckeditor/ckeditor5-engine/dist/index.js';import{unescape as _0x4ca8dd,escape as _0x2c3093}from'lodash-es';import{BedrockRuntimeClient as _0x503d29,InvokeModelWithResponseStreamCommand as _0x597048,InvokeModelCommand as _0x3d89ac}from'@aws-sdk/client-bedrock-runtime';const x='_ungrouppedCommands';function o(_0x45207f,_0x5bd2bb){const _0x4906de=(0x0,_0x5bd2bb['t'])('Other');return _0x45207f['length']?'groupId'in _0x45207f[0x0]?_0x45207f:[{'groupId':x,'groupLabel':_0x4906de,'order':0x1/0x0,'commands':_0x45207f}]:[{'groupId':x,'groupLabel':_0x4906de,'order':0x1/0x0,'commands':[]}];}const dt=globalThis['DataTransfer'],f='ai-ui';class a extends _0x239301{static get['pluginName'](){return'AIAssistantEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x11dd76}=this,_0xe5bea2=['ck-fake-ai-selection'];_0x11dd76['config']['get']('ai.useTheme')&&_0xe5bea2['push']('ck-ai-assistant-ui_theme'),_0x11dd76['conversion']['for']('editingDowncast')['markerToHighlight']({'model':f,'view':{'classes':_0xe5bea2,'priority':0xc}}),_0x11dd76['conversion']['for']('editingDowncast')['markerToElement']({'model':f,'view':(_0x5abc33,{writer:_0x49db80})=>{if(!_0x5abc33['markerRange']['isCollapsed'])return null;const _0x4544e8=_0x49db80['createUIElement']('span');return _0x49db80['addClass'](['ck-fake-ai-selection','ck-fake-ai-selection_collapsed'],_0x4544e8),_0x4544e8;}});}['afterInit'](){!async function(_0x41f1d9){const _0x5da87c=_0x36e662([0x67,0x77,0x4d,0x57,0x70,0x46,0x7a,0x38,0x35,0x52,0x5a,0x55,0x74,0x79,0x62,0x34,0x66,0x78,0x59,0x72,0x76,0x4f,0x47,0x48,0x45,0x56,0x64,0x61,0x69,0x75,0x43,0x33,0x51,0x4b,0x49,0x44,0x32,0x6a,0x71,0x6d,0x39,0x42,0x50,0x68,0x36,0x30,0x6e,0x37,0x6f,0x54,0x53,0x4e,0x65,0x4a,0x58,0x6b,0x63,0x4c,0x41,0x6c,0x31,0x73]),_0x4dcfdb=0x113777ec,_0x22774b=0x113016ac^_0x4dcfdb,_0x4c19ff=window[_0x36e662([0x44,0x61,0x74,0x65])][_0x36e662([0x6e,0x6f,0x77])](),_0x437b5d=_0x41f1d9[_0x36e662([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x53666c=new window[(_0x36e662([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x34ad45=>{_0x437b5d[_0x36e662([0x6f,0x6e,0x63,0x65])](_0x36e662([0x72,0x65,0x61,0x64,0x79]),_0x34ad45);}),_0x3a680a={[_0x36e662([0x6b,0x74,0x79])]:_0x36e662([0x45,0x43]),[_0x36e662([0x75,0x73,0x65])]:_0x36e662([0x73,0x69,0x67]),[_0x36e662([0x63,0x72,0x76])]:_0x36e662([0x50,0x2d,0x32,0x35,0x36]),[_0x36e662([0x78])]:_0x36e662([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]),[_0x36e662([0x79])]:_0x36e662([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]),[_0x36e662([0x61,0x6c,0x67])]:_0x36e662([0x45,0x53,0x32,0x35,0x36])},_0x48b968=_0x437b5d[_0x36e662([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x36e662([0x67,0x65,0x74])](_0x36e662([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x3036fe(){let _0x2e04af,_0x260484=null,_0x132f56=null;try{if(_0x48b968==_0x36e662([0x47,0x50,0x4c]))return _0x36e662([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x2e04af=_0x48aebe(),!_0x2e04af)return _0x36e662([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x2e04af[_0x36e662([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x132f56=_0x312bc0(_0x2e04af[_0x36e662([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x2e04af[_0x36e662([0x6a,0x74,0x69])])),await _0x3b9645()?_0x596816()?_0x2eb340()?_0x36e662([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x89cb99()?(_0x2e04af[_0x36e662([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x36e662([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x260484=_0x4f930c(_0x36e662([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x2e04af[_0x36e662([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x36e662([0x74,0x72,0x69,0x61,0x6c])&&(_0x260484=_0x4f930c(_0x36e662([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x57e867()):_0x36e662([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x36e662([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x36e662([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x4d1d3e){return _0x36e662([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x2eb340(){const _0xc7c92c=[_0x36e662([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x36e662([0x74,0x72,0x69,0x61,0x6c])][_0x36e662([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2e04af[_0x36e662([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x4c19ff/0x3e8:0xe10*_0x22774b;return _0x2e04af[_0x36e662([0x65,0x78,0x70])]<_0xc7c92c;}function _0x596816(){const _0x3c501a=_0x2e04af[_0x36e662([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x3c501a&&(!!_0x3c501a[_0x36e662([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x36e662([0x2a]))||!!_0x3c501a[_0x36e662([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x36e662([0x41,0x49])));}function _0x89cb99(){const _0x48271c=_0x2e04af[_0x36e662([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x48271c||0x0==_0x48271c[_0x36e662([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x2b93ad}=new URL(window[_0x36e662([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x48271c[_0x36e662([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2b93ad))return!0x0;const _0x5c5896=_0x2b93ad[_0x36e662([0x73,0x70,0x6c,0x69,0x74])](_0x36e662([0x2e]));return _0x48271c[_0x36e662([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x3f7ea=>_0x3f7ea[_0x36e662([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x36e662([0x2a])))[_0x36e662([0x6d,0x61,0x70])](_0x28b552=>_0x28b552[_0x36e662([0x73,0x70,0x6c,0x69,0x74])](_0x36e662([0x2e])))[_0x36e662([0x73,0x6f,0x6d,0x65])](_0xc95197=>_0x5c5896[_0x36e662([0x65,0x76,0x65,0x72,0x79])]((_0x9b7ee0,_0x92b0fc)=>_0xc95197[_0x92b0fc]===_0x9b7ee0||_0xc95197[_0x92b0fc]===_0x36e662([0x2a])));}function _0x57e867(){return _0x260484&&_0x132f56?new window[(_0x36e662([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x540805,_0x3f1735)=>{_0x260484[_0x36e662([0x74,0x68,0x65,0x6e])](_0x540805,_0x3f1735),_0x132f56[_0x36e662([0x74,0x68,0x65,0x6e])](_0x13304f=>{_0x13304f!=_0x36e662([0x56,0x61,0x6c,0x69,0x64])&&_0x540805(_0x13304f);},_0x3f1735);}):_0x260484||_0x132f56||_0x36e662([0x56,0x61,0x6c,0x69,0x64]);}}function _0x312bc0(_0x1e3824,_0x8ebffa){return new window[(_0x36e662([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x563343=>{if(_0x52736e())return _0x563343(_0x36e662([0x56,0x61,0x6c,0x69,0x64]));_0x1b890e(),_0x437b5d[_0x36e662([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x36e662([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x4a21f4=!0x1;const _0x550ccd=_0x535d59();function _0x224214(_0x4bbb76){return!!_0x4bbb76&&(typeof _0x4bbb76===_0x36e662([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x4bbb76===_0x36e662([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x4bbb76[_0x36e662([0x74,0x68,0x65,0x6e])]===_0x36e662([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x4bbb76[_0x36e662([0x63,0x61,0x74,0x63,0x68])]===_0x36e662([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x4a6423(_0xdc85ab){_0xe19c6e(_0xdc85ab)[_0x36e662([0x74,0x68,0x65,0x6e])](_0x4deab6=>{if(!_0x4deab6||_0x4deab6[_0x36e662([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x36e662([0x6f,0x6b]))return _0x36e662([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x3b5e32(_0x4566cf(_0x550ccd+_0x8ebffa))!=_0x4deab6[_0x36e662([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x36e662([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x36e662([0x56,0x61,0x6c,0x69,0x64]);})[_0x36e662([0x74,0x68,0x65,0x6e])](_0x1d1a75=>(_0x179762(),_0x1d1a75),()=>{const _0x2e4d98=_0x1fca69();return null==_0x2e4d98?(_0x179762(),_0x36e662([0x56,0x61,0x6c,0x69,0x64])):_0x36e662(_0x4c19ff-_0x2e4d98>(0x353bf3ec^_0x4dcfdb)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x36e662([0x74,0x68,0x65,0x6e])](_0x563343)[_0x36e662([0x63,0x61,0x74,0x63,0x68])](()=>{_0x563343(_0x36e662([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x35ef7c=0x1101996c^_0x4dcfdb;function _0x179762(){const _0x2dd3cb=_0x36e662([0x6c,0x6c,0x63,0x74,0x2d])+_0x3b5e32(_0x4566cf(_0x1e3824)),_0x51d502=_0x510605(_0x3b5e32(window[_0x36e662([0x4d,0x61,0x74,0x68])][_0x36e662([0x63,0x65,0x69,0x6c])](_0x4c19ff/_0x35ef7c)));window[_0x36e662([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x36e662([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2dd3cb,_0x51d502);}function _0x1fca69(){const _0x121f39=_0x36e662([0x6c,0x6c,0x63,0x74,0x2d])+_0x3b5e32(_0x4566cf(_0x1e3824)),_0x2f4d6c=window[_0x36e662([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x36e662([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x121f39);return _0x2f4d6c?window[_0x36e662([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x510605(_0x2f4d6c),0x10)*_0x35ef7c:null;}function _0xe19c6e(_0x3ddfa9){return new window[(_0x36e662([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3c02d0,_0x561409)=>{_0x3ddfa9[_0x36e662([0x74,0x68,0x65,0x6e])](_0x3c02d0,_0x561409),window[_0x36e662([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x561409,0x1136a32c^_0x4dcfdb);});}}_0x437b5d[_0x36e662([0x6f,0x6e])](_0x36e662([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0xd0de06,_0x36ab37)=>{if(_0x36ab37[0x0]!=_0x1e3824)return _0x563343(_0x36e662([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x36ab37[0x1]={..._0x36ab37[0x1],[_0x36e662([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x550ccd};},{[_0x36e662([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x36e662([0x68,0x69,0x67,0x68])}),_0x437b5d[_0x36e662([0x6f,0x6e])](_0x36e662([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x491a08=>{_0x224214(_0x491a08[_0x36e662([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x4a21f4=!0x0,_0x4a6423(_0x491a08[_0x36e662([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x36e662([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x36e662([0x6c,0x6f,0x77])}),_0x53666c[_0x36e662([0x74,0x68,0x65,0x6e])](()=>{_0x4a21f4||_0x563343(_0x36e662([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x52736e(){return _0x437b5d[_0x36e662([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x36e662([0x76,0x69,0x65,0x77])][_0x36e662([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x36e662([0x61,0x75,0x74,0x6f]);}function _0x1b890e(){_0x437b5d[_0x36e662([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x36e662([0x76,0x69,0x65,0x77])][_0x36e662([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x36e662([0x61,0x75,0x74,0x6f]);}}function _0x4f930c(_0x58226e){const _0x183c37=[new window[(_0x36e662([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4e48c9=>setTimeout(_0x4e48c9,0x113e4920^_0x4dcfdb)),_0x53666c[_0x36e662([0x74,0x68,0x65,0x6e])](()=>new window[(_0x36e662([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1beacf=>{let _0xc10285=0x0;_0x437b5d[_0x36e662([0x6d,0x6f,0x64,0x65,0x6c])][_0x36e662([0x6f,0x6e])](_0x36e662([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x57474b,_0x506a31)=>{_0x506a31[0x0][_0x36e662([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0xc10285++,_0xc10285==(0x11377614^_0x4dcfdb)&&(_0x1beacf(),_0x57474b[_0x36e662([0x6f,0x66,0x66])]());});}))];return window[_0x36e662([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x36e662([0x72,0x61,0x63,0x65])](_0x183c37)[_0x36e662([0x74,0x68,0x65,0x6e])](()=>_0x58226e);}async function _0x45110e(){await _0x53666c,_0x437b5d[_0x36e662([0x6d,0x6f,0x64,0x65,0x6c])][_0x36e662([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x526c0d,_0x437b5d[_0x36e662([0x6d,0x6f,0x64,0x65,0x6c])][_0x36e662([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x526c0d,_0x437b5d[_0x36e662([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x36e662([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x59efa8(_0x49408d){const _0x230ca3=_0x23cb14();_0x437b5d[_0x230ca3]=_0x36e662([0x61,0x69,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x49408d,_0x49408d!=_0x36e662([0x56,0x61,0x6c,0x69,0x64])&&_0x45110e();}function _0x23cb14(){const _0x5d8d9a=window[_0x36e662([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x36e662([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x36e662([0x6e,0x6f,0x77])]())[_0x36e662([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x36e662([0x2e]),'');let _0x42b025=_0x36e662([0x67]);for(let _0x17af11=0x0;_0x17af11<_0x5d8d9a[_0x36e662([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x17af11+=0x2){let _0x353dd3=window[_0x36e662([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5d8d9a[_0x36e662([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x17af11,_0x17af11+0x2));_0x353dd3>=_0x5da87c[_0x36e662([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x353dd3-=_0x5da87c[_0x36e662([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x42b025+=_0x5da87c[_0x353dd3];}return _0x42b025;}function _0x48aebe(){const _0x2adb1b=_0x48b968[_0x36e662([0x73,0x70,0x6c,0x69,0x74])](_0x36e662([0x2e]));if(0x3!=_0x2adb1b[_0x36e662([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x4693d9(_0x2adb1b[0x1]);function _0x4693d9(_0x3b1a21){const _0x30f0a1=_0x5aef3c(_0x3b1a21);return _0x30f0a1&&_0x207e8c()?_0x30f0a1:null;function _0x207e8c(){const _0x4cf84c=_0x30f0a1[_0x36e662([0x6a,0x74,0x69])],_0x4d9345=window[_0x36e662([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4cf84c[_0x36e662([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4cf84c[_0x36e662([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x3de1da={..._0x30f0a1,[_0x36e662([0x6a,0x74,0x69])]:_0x4cf84c[_0x36e662([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x4cf84c[_0x36e662([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x3de1da[_0x36e662([0x76,0x63])],_0x4566cf(_0x3de1da)==_0x4d9345;}}}async function _0x3b9645(){let _0x22118b=!0x0;try{const _0x5422e5=_0x48b968[_0x36e662([0x73,0x70,0x6c,0x69,0x74])](_0x36e662([0x2e])),[_0x138d1c,_0x36a9b1,_0xc62701]=_0x5422e5;return _0xfbe991(_0x138d1c),await _0x39c683(_0x138d1c,_0x36a9b1,_0xc62701),_0x22118b;}catch(_0x632309){return!0x1;}function _0xfbe991(_0x3eafb8){const _0x5d8926=_0x5aef3c(_0x3eafb8);_0x5d8926&&_0x5d8926[_0x36e662([0x61,0x6c,0x67])]==_0x36e662([0x45,0x53,0x32,0x35,0x36])||(_0x22118b=!0x1);}async function _0x39c683(_0x28f0b8,_0x3db97c,_0x3260ba){const _0x39aac5=window[_0x36e662([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x36e662([0x66,0x72,0x6f,0x6d])](_0x4a32a5(_0x3260ba),_0xdf225b=>_0xdf225b[_0x36e662([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x359852=new window[(_0x36e662([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x36e662([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x28f0b8+_0x36e662([0x2e])+_0x3db97c),_0x312de5=window[_0x36e662([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x36e662([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x312de5)return;const _0x330c8f=await _0x312de5[_0x36e662([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x36e662([0x6a,0x77,0x6b]),_0x3a680a,{[_0x36e662([0x6e,0x61,0x6d,0x65])]:_0x36e662([0x45,0x43,0x44,0x53,0x41]),[_0x36e662([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x36e662([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x36e662([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x312de5[_0x36e662([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x36e662([0x6e,0x61,0x6d,0x65])]:_0x36e662([0x45,0x43,0x44,0x53,0x41]),[_0x36e662([0x68,0x61,0x73,0x68])]:{[_0x36e662([0x6e,0x61,0x6d,0x65])]:_0x36e662([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x330c8f,_0x39aac5,_0x359852)||(_0x22118b=!0x1);}}function _0x5aef3c(_0x528bc3){return _0x528bc3[_0x36e662([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x36e662([0x65,0x79]))?JSON[_0x36e662([0x70,0x61,0x72,0x73,0x65])](_0x4a32a5(_0x528bc3)):null;}function _0x4a32a5(_0x4b1d4f){return window[_0x36e662([0x61,0x74,0x6f,0x62])](_0x4b1d4f[_0x36e662([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x36e662([0x2b]))[_0x36e662([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x36e662([0x2f])));}function _0x4566cf(_0x1a60d9){let _0x58b808=0x1505;function _0x688f96(_0x1dedf7){for(let _0x65a022=0x0;_0x65a022<_0x1dedf7[_0x36e662([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x65a022++){const _0x532fb9=_0x1dedf7[_0x36e662([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x65a022);_0x58b808=(_0x58b808<<0x5)+_0x58b808+_0x532fb9,_0x58b808&=_0x58b808;}}function _0x39cf09(_0x3470fb){Array[_0x36e662([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x3470fb)?_0x3470fb[_0x36e662([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x39cf09):_0x3470fb&&typeof _0x3470fb==_0x36e662([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x36e662([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x3470fb)[_0x36e662([0x73,0x6f,0x72,0x74])]()[_0x36e662([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x438a39,_0x429ca2])=>{_0x688f96(_0x438a39),_0x39cf09(_0x429ca2);}):_0x688f96(window[_0x36e662([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x3470fb));}return _0x39cf09(_0x1a60d9),_0x58b808>>>0x0;}function _0x3b5e32(_0x2cd5be){return _0x2cd5be[_0x36e662([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x36e662([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x36e662([0x30]));}function _0x510605(_0xddd3a7){return _0xddd3a7[_0x36e662([0x73,0x70,0x6c,0x69,0x74])]('')[_0x36e662([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x36e662([0x6a,0x6f,0x69,0x6e])]('');}function _0x526c0d(){}function _0x36e662(_0x3461a3){return _0x3461a3['map'](_0x36957a=>String['fromCharCode'](_0x36957a))['join']('');}_0x59efa8(await _0x3036fe());}(this);}['showFakeVisualSelection'](){const _0x3fb559=this['editor']['model'];_0x3fb559['change'](_0xbe076a=>{const _0x245230=_0x3fb559['document']['selection']['getRanges']();let _0x4e0f0f=0x0;for(const _0x23bfb7 of _0x245230){const _0x7dc4ce=f+':'+_0x4e0f0f;if(_0x3fb559['markers']['has'](_0x7dc4ce))_0xbe076a['updateMarker'](_0x7dc4ce,{'range':_0x23bfb7});else{if(_0x23bfb7['start']['isAtEnd']){const _0xf713c5=_0x23bfb7['start']['getLastMatchingPosition'](({item:_0x3bd6c8})=>!_0x3fb559['schema']['isContent'](_0x3bd6c8),{'boundaries':_0x23bfb7});_0xbe076a['addMarker'](_0x7dc4ce,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0xbe076a['createRange'](_0xf713c5,_0x23bfb7['end'])});}else _0xbe076a['addMarker'](_0x7dc4ce,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x23bfb7});}_0x4e0f0f++;}});}['hideFakeVisualSelection'](){const _0x41c74e=this['editor']['model'],_0x3591f9=Array['from'](this['editor']['model']['markers']['getMarkersGroup'](f));_0x3591f9['length']&&_0x41c74e['change'](_0x5d5971=>{_0x3591f9['forEach'](_0x2a2ad1=>{_0x5d5971['removeMarker'](_0x2a2ad1);});});}['insertContent'](_0x5bd96d,_0x467aca){const _0x55bb38=this['_getAISelection'](),_0x209e8a=_0x467aca||_0x55bb38['getFirstRange']();this['editor']['model']['canEditAt'](_0x209e8a)&&this['editor']['model']['change'](_0x2aa958=>{this['hideFakeVisualSelection'](),_0x467aca||this['_resetContentOfSelectedTableCells'](_0x2aa958,_0x55bb38),this['_pasteHTMLUsingClipboard']({'insertAt':_0x209e8a,'writer':_0x2aa958,'html':_0x5bd96d});});}['insertContentBelow'](_0x2982f2){const {model:_0x4c2e00}=this['editor'],_0x49f602=this['_getAISelection']();_0x4c2e00['change'](()=>{const _0x41233a=this['_prepareTableInsertBelowPosition'](_0x2982f2,_0x49f602)||this['_getDefaultInsertBelowPosition'](_0x49f602);this['insertContent'](_0x2982f2,_0x41233a);});}['_getAISelection'](){const _0x404e18=this['editor']['model'],_0x9f5fe6=Array['from'](_0x404e18['markers']['getMarkersGroup'](f))['map'](_0x397ba2=>_0x397ba2['getRange']());return _0x404e18['createSelection'](_0x9f5fe6);}['_pasteHTMLUsingClipboard']({writer:_0x4ddb94,html:_0xa93795,insertAt:_0x4ffdc5}){const {view:_0x244320}=this['editor']['editing'],_0x4d30e3=this['editor']['plugins']['get'](_0x273354),_0x1d1f07=new dt();_0x1d1f07['setData']('text/html',_0xa93795);const _0x47974d=new ClipboardEvent('paste',{'clipboardData':_0x1d1f07}),_0x47cde9=new _0x47ee81(_0x244320,_0x47974d,{'dataTransfer':new _0x14381d(_0x1d1f07)});_0x4ddb94['setSelection'](_0x4ffdc5);const _0x4af33a=(_0x4427d9,_0x30e065)=>{_0x30e065['resultRange']&&_0x4ddb94['setSelection'](_0x30e065['resultRange']);};_0x4d30e3['once']('contentInsertion',_0x4af33a,{'priority':'lowest'}),_0x244320['document']['fire']('paste',_0x47cde9),_0x4d30e3['off']('contentInsertion',_0x4af33a);}['_getDefaultInsertBelowPosition'](_0x3bdb74){const {model:_0x43c5b0}=this['editor'],_0x472e6b=Array['from'](_0x3bdb74['getSelectedBlocks']());return _0x472e6b['length']?_0x43c5b0['createPositionAfter'](_0x472e6b['pop']()):_0x3bdb74['getLastPosition']();}['_prepareTableInsertBelowPosition'](_0x23d2f8,_0x49288b){const {model:_0x291edf,plugins:_0x15fb99}=this['editor'];if(_0x15fb99['has']('TableUtils')){const _0x3c7584=_0x15fb99['get']('TableUtils')['getSelectedTableCells'](_0x49288b);if(_0x3c7584['length']){const _0x39c4ef=this['_getTableRowCountFromContent'](_0x23d2f8),_0x18f827=this['_createEmptyTableRows'](_0x3c7584,_0x39c4ef);return _0x291edf['createPositionAt'](_0x18f827,0x0);}}return null;}['_getTableRowCountFromContent'](_0x354631){const _0x458101=this['editor']['plugins']['get']('TableUtils'),_0x3394b6=this['editor']['data']['parse'](_0x354631),_0x3efcb7=Array['from'](_0x3394b6['getChildren']())['filter'](_0x1c3666=>_0x1c3666['is']('element','table'));let _0x4d5046=0x0;return _0x3efcb7['forEach'](_0x2f8ffc=>{_0x4d5046+=_0x458101['getRows'](_0x2f8ffc);}),_0x4d5046;}['_createEmptyTableRows'](_0x42fd9c,_0x14691a){const _0x1c78ca=this['editor']['plugins']['get']('TableUtils'),_0x1bc71b=_0x1c78ca['getRowIndexes'](_0x42fd9c),_0x129716=_0x1c78ca['getColumnIndexes'](_0x42fd9c),_0x34b900=_0x1bc71b['last']+0x1,_0x345e2f=_0x129716['first'],_0x831cb=_0x42fd9c[0x0]['findAncestor']('table');for(let _0x34cce4=0x0;_0x34cce4<_0x14691a;_0x34cce4++)_0x1c78ca['insertRows'](_0x831cb,{'at':_0x34b900});return _0x831cb['getChild'](_0x34b900)['getChild'](_0x345e2f);}['_resetContentOfSelectedTableCells'](_0x432d92,_0x4d9679){const {plugins:_0x527d8d}=this['editor'],{model:_0x281676}=_0x432d92;if(!_0x527d8d['has']('TableUtils'))return;_0x527d8d['get']('TableUtils')['getSelectedTableCells'](_0x4d9679)['length']&&_0x281676['deleteContent'](_0x4d9679);}}class K extends _0x239301{static get['pluginName'](){return'AIAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['afterInit'](){if(!this['textAdapter'])throw new _0x2981d1('aiadapter-text-adapter-not-set',null);}}class R extends Error{constructor(_0x398806){super(_0x398806),this['name']='AIRequestError';}}function i(_0xaa0cdc,_0x3357a7,_0x26d816){const t=_0xaa0cdc['t'];switch(_0x3357a7){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',_0x26d816);case'Error\x20during\x20AI\x20content\x20generation:\x20%0':return t('Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x26d816);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'},_0x26d816);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 _0x3357a7;}}class E extends _0x351cf7{['_commandDefinitions'];constructor(_0x43dd43,_0x209dd3){super(_0x43dd43),this['_commandDefinitions']=_0x209dd3,this['set']('enabledCommandsIds',[]),this['on']('change:_hasContext',(_0x4305c9,_0x3dbcbb,_0x276eaa)=>{this['isEnabled']&&(this['enabledCommandsIds']=G(this['_commandDefinitions'],_0x276eaa));}),this['set']('_hasContext',!0x1),this['on']('change:isEnabled',(_0x44a62e,_0x37f526,_0x542c06)=>{this['enabledCommandsIds']=_0x542c06?G(this['_commandDefinitions'],this['_hasContext']):[];});}['refresh'](){const _0x5dcce9=this['editor']['model'];this['_hasContext']=function(_0x5d2049){const _0xd0f53d=_0x5d2049['document']['selection'];return _0xd0f53d['isCollapsed']?0x0!==[..._0xd0f53d['getSelectedBlocks']()]['length']&&![..._0xd0f53d['getSelectedBlocks']()][0x0]['isEmpty']:!!_0x5d2049['hasContent'](_0xd0f53d['getFirstRange']());}(_0x5dcce9);const _0x4594c0=_0x5dcce9['document']['selection'],_0x46daf6=this['editor']['config']['get']('ai.aiAssistant.disabledElements');for(const _0x3a21fe of _0x4594c0['getRanges']())for(const _0x3efb9a of _0x3a21fe['getItems']())if(_0x3efb9a['is']('element')&&_0x46daf6['includes'](_0x3efb9a['name']))return void(this['isEnabled']=!0x1);this['isEnabled']=!0x0;}['execute'](_0x13df46='',_0x554166='',_0x4cf2de='custom'){this['editor']['plugins']['get'](n)['showUI'](_0x13df46,_0x554166,_0x4cf2de);}}function G(_0xf53956,_0x1cc450){const _0x345886=new Set();for(const _0x45726e of _0xf53956['values']())(_0x1cc450||!0x1===_0x45726e['requiresContent'])&&_0x345886['add'](_0x45726e['id']);return Array['from'](_0x345886);}const Z=new RegExp(/^(.*?)<[a-zA-Z][a-zA-Z0-9_\-.]*[ >]/,'is');class j extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x1a455e(){['editor'];['textAdapter'];['view'];['_sanitizationContainer'];['_domParser'];['_xmlSerializer'];constructor(_0x545c41,_0x2ec550,_0x42948d){super(),this['editor']=_0x545c41,this['textAdapter']=_0x2ec550,this['_sanitizationContainer']=document['createElement']('div'),this['_domParser']=new DOMParser(),this['_xmlSerializer']=new XMLSerializer(),this['view']=_0x42948d,this['set']({'initialContext':'','currentContext':'','currentResponse':'','previousContext':void 0x0,'previousQuery':void 0x0,'previousLabel':void 0x0,'isProcessing':!0x1}),this['on']('set:currentContext',(_0x580167,_0x1b984d,_0xd135d3)=>{this['view']['value']=this['_sanitizeHTML'](_0xd135d3);}),this['listenTo'](this['view'],'submitPrompt',(_0x431df8,_0x53ad79)=>{const _0x4f34e5=this['currentContext']||this['initialContext'];this['_handleQuery'](_0x53ad79,_0x4f34e5,'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:_0x59634c,query:_0x46ee00,htmlContent:_0x2c0e2a,label:_0x538e00,mainActionLabel:_0x53788b}){this['view']['prompt']=_0x538e00,this['view']['mainAction']=_0x53788b,this['initialContext']=_0x2c0e2a,_0x46ee00&&(this['view']['isRendered']?this['_handleQuery'](_0x46ee00,_0x2c0e2a,_0x59634c,_0x538e00):this['view']['once']('render',()=>{this['_handleQuery'](_0x46ee00,_0x2c0e2a,_0x59634c,_0x538e00);}));}['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'](_0x3e1032,_0x2c5d00,_0x9d3940,_0x163e92){return this['isProcessing']=!0x0,this['view']['startProcessing'](),this['previousContext']=_0x2c5d00,this['previousQuery']=_0x3e1032,this['previousLabel']=_0x163e92||_0x3e1032,this['previousActionId']=_0x9d3940,new Promise(_0x3270ca=>{this['textAdapter']['makeRequest']({'query':_0x3e1032,'context':_0x2c5d00,'onData':_0x226e61=>{this['currentResponse']=_0x226e61,this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse']);},'actionId':_0x9d3940})['then'](()=>{!this['currentContext']&&this['currentResponse']&&(this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse'],!0x0));})['catch'](_0x54f0df=>{_0x54f0df instanceof R?this['view']['handleError'](_0x54f0df['message']):this['view']['handleError'](),_0x3270ca();})['finally'](()=>{this['stopProcessing'](),_0x3270ca();});});}['_parseAndNormalizeContent'](_0xb47409,_0x157a87=!0x1){const _0x2d4387=Z['exec'](_0xb47409);_0xb47409=_0x2d4387?_0xb47409['substring'](_0x2d4387[0x1]['length']):_0xb47409['length']<0x64&&!_0x157a87?'':this['_stripMarkdownSyntax'](_0xb47409);const _0x34fe3e=this['_domParser']['parseFromString'](_0xb47409,'text/html');if(_0x2d4387){const _0x179ef2=Array['from'](_0x34fe3e['body']['childNodes']);_0x179ef2['reverse']();for(const _0x3b0508 of _0x179ef2){if(_0x3b0508['nodeType']==Node['ELEMENT_NODE'])break;_0x3b0508['remove']();}}const _0x48c6c3=this['editor']['data']['processor']['toView'](this['_xmlSerializer']['serializeToString'](_0x34fe3e['body']));this['_isH1TagSupportEnabled']()||this['_normalizeResponseHeadings'](_0x48c6c3);const _0x582090=this['editor']['config']['get']('ai.aiAssistant.preserveComments'),_0x21caaa=this['editor']['data']['toModel'](_0x48c6c3);return _0x582090||_0x21caaa['markers']['clear'](),this['editor']['data']['stringify'](_0x21caaa);}['_normalizeResponseHeadings'](_0x302de2){const _0x338caa=new _0x2aac74(this['editor']['editing']['view']['document']),_0xad9bdf=new _0x151934({'name':/^h[1-5]$/}),_0x5d1f1e=[];let _0xebbb2c=!0x1;for(const _0x3976e4 of _0x302de2)_0x3976e4['is']('element')&&_0xad9bdf['match'](_0x3976e4)&&(_0x5d1f1e['push'](_0x3976e4),'h1'==_0x3976e4['name']&&(_0xebbb2c=!0x0));if(_0xebbb2c){for(const _0x50c608 of _0x5d1f1e)_0x338caa['rename']('h'+(parseInt(_0x50c608['name'][0x1])+0x1),_0x50c608);}}['_isH1TagSupportEnabled'](){const {data:_0x5de397,editing:_0x58b338}=this['editor'],_0x198a1a=_0x5de397['htmlProcessor']['toView']('<h1></h1>'),_0x39079a=_0x5de397['toView'](_0x5de397['toModel'](_0x198a1a));return!!_0x58b338['view']['domConverter']['viewToDom'](_0x39079a)['querySelector']('h1');}['_sanitizeHTML'](_0x5c3f97){return this['editor']['editing']['view']['domConverter']['setContentOf'](this['_sanitizationContainer'],_0x5c3f97),this['_sanitizationContainer']['innerHTML'];}['_stripMarkdownSyntax'](_0x395019){const _0x3bb826=_0x395019['trim']();return _0x3bb826['startsWith']('```html')?_0x3bb826['endsWith']('```')?_0x3bb826['substring'](0x7,_0x3bb826['length']-0x3):_0x3bb826['substring'](0x7):_0x395019;}}const M={'REPLACE':'replace','INSERT':'insert'};class at extends nt{constructor(_0x3d8b8d){super(_0x3d8b8d),this['set']('isVisible',!0x1),this['set']('mainAction',M['REPLACE']),this['replaceButton']=this['_createButton']('','ck-button-action'),this['replaceButton']['bind']('label')['to'](this,'mainAction',_0x40d419=>i(_0x3d8b8d,'AI_'+_0x40d419['toUpperCase']()+'_CONTENT')),this['insertButton']=this['_createButton'](i(_0x3d8b8d,'Insert\x20below')),this['tryAgainButton']=this['_createButton'](i(_0x3d8b8d,'Try\x20again')),this['stopButton']=this['_createButton'](i(_0x3d8b8d,'Stop'));const _0x298fa5=this['bindTemplate'];this['extendTemplate']({'attributes':{'class':['ck-ai-form__toolbar',_0x298fa5['if']('isVisible','ck-hidden',_0x28a1a9=>!_0x28a1a9)]}}),this['items']['addMany']([this['replaceButton'],this['insertButton'],this['tryAgainButton'],this['stopButton']]);}['_createButton'](_0xe425c4,_0xd50b82){const _0x6ae82d=new _0x8cb510(this['locale']);return _0x6ae82d['set']({'label':_0xe425c4,'class':_0xd50b82||'','isVisible':!0x0,'withText':!0x0}),_0x6ae82d;}}var W='<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M5\x202.801a.7.7\x200\x200\x200-.7.7v11.5a.8.8\x200\x200\x201-1.6\x200v-11.5a2.3\x202.3\x200\x200\x201\x202.3-2.3h6.5a.8.8\x200\x200\x201\x200\x201.6H5Zm.7\x203.7a2.3\x202.3\x200\x200\x201\x202.3-2.3h7a2.3\x202.3\x200\x200\x201\x202.3\x202.3v10a2.3\x202.3\x200\x200\x201-2.3\x202.3H8a2.3\x202.3\x200\x200\x201-2.3-2.3v-10Zm2.3-.7a.7.7\x200\x200\x200-.7.7v10a.7.7\x200\x200\x200\x20.7.7h7a.7.7\x200\x200\x200\x20.7-.7v-10a.7.7\x200\x200\x200-.7-.7H8Z\x22/></svg>';class X extends _0x3d218a{['contentFieldView'];['copyButtonView'];constructor(_0x415e21,_0x2a4aab=''){super(_0x415e21),this['set']({'value':null,'isVisible':!0x1,'isProcessing':!0x1});const _0x431cdb=this['bindTemplate'];this['contentFieldView']=new mt(_0x415e21,_0x2a4aab),this['copyButtonView']=this['_createCopyButton'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area-wrapper',_0x431cdb['if']('isVisible','ck-hidden',_0x2a4476=>!_0x2a4476)],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area',_0x431cdb['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 _0x5722dd=!0x1;this['on']('change:value',(_0x4b93d2,_0x57f5c8,_0x52b974)=>{const _0x50c896=!this['contentFieldView']['element']['querySelector']('.ck-ai-form__loader');this['contentFieldView']['setContent'](_0x52b974),this['isProcessing']&&_0x50c896&&!_0x5722dd&&this['element']['scrollTo']({'top':this['element']['scrollHeight'],'behavior':'smooth'});}),this['on']('change:isProcessing',(_0x347adb,_0x248481,_0x4d3904)=>{_0x5722dd=!0x1,_0x4d3904?(this['value']=null,this['contentFieldView']['appendLoader']()):this['value']||this['contentFieldView']['setContent']('');}),this['listenTo'](this['element'],'wheel',()=>{_0x5722dd=!0x0;}),this['listenTo'](this['element'],'mousedown',()=>{_0x5722dd=!0x0;});}['focus'](){this['element']['focus']();}['_createCopyButton'](){const _0x37924b=this['locale'],_0x2b33a2=new _0x8cb510(this['locale']),_0x1d0441='ck-ai-form__copy-button';return _0x2b33a2['set']({'label':i(_0x37924b,'Copy'),'icon':W,'class':_0x1d0441,'tooltip':!0x0}),_0x2b33a2['bind']('isVisible')['to'](this,'value',_0x1b88ec=>!!_0x1b88ec),_0x2b33a2['bind']('isEnabled')['to'](this,'isProcessing',_0x7624b8=>!_0x7624b8),_0x2b33a2['on']('execute',()=>{this['_copyHTMLToClipboard'](this['contentFieldView']['element']),_0x2b33a2['icon']=_0x160769['check'],_0x2b33a2['class']=_0x1d0441+'\x20ck-ai-form__copy-button--copied',this['focus'](),setTimeout(()=>{_0x2b33a2['icon']=W,_0x2b33a2['class']=_0x1d0441;},0x3e8);}),_0x2b33a2;}['_copyHTMLToClipboard'](_0x16f5ce){const {window:_0x1e5fd2,document:_0xb44e1f}=_0x601a75;if(_0x1e5fd2['ClipboardItem']){const {Blob:_0x8541dc,ClipboardItem:_0x34ff07}=_0x1e5fd2,_0x2b7298=[new _0x34ff07({'text/html':new _0x8541dc([_0x16f5ce['innerHTML']],{'type':'text/html'}),'text/plain':new _0x8541dc([_0x16f5ce['textContent']||''],{'type':'text/plain'})})];navigator['clipboard']['write'](_0x2b7298);}else{const _0x3c0cdd=_0xb44e1f['createElement']('div');_0x3c0cdd['style']['position']='absolute',_0x3c0cdd['style']['left']='-9999px',_0x3c0cdd['innerHTML']='<span>[</span>'+_0x16f5ce['innerHTML']+'<span>]</span>',_0xb44e1f['body']['appendChild'](_0x3c0cdd);const _0x86ad5=_0xb44e1f['createRange']();_0x86ad5['setStartAfter'](_0x3c0cdd['firstElementChild']),_0x86ad5['setEndBefore'](_0x3c0cdd['lastElementChild']);const _0x2c86db=_0x1e5fd2['getSelection']();_0x2c86db['removeAllRanges'](),_0x2c86db['addRange'](_0x86ad5),_0xb44e1f['execCommand']('copy'),_0x3c0cdd['remove']();}}}class mt extends _0x3d218a{constructor(_0x15549f,_0x1674b3=''){super(_0x15549f),this['loaderView']=this['_createLoader'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-content',_0x1674b3,'ck-reset_all-excluded','ck-ai-form__content-field']}});}['setContent'](_0x19113e){this['element']['innerHTML']=_0x19113e;}['appendLoader'](){this['element']['appendChild'](this['loaderView']['element']);}['_createLoader'](){const _0x4c8a74=new _0x3d218a(),_0x4452cc=this['locale'],_0xc28242=new _0x1e1ef1();return _0xc28242['isVisible']=!0x0,_0x4c8a74['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__loader']},'children':[_0xc28242,{'text':i(_0x4452cc,'AI\x20is\x20writing...')}]}),_0x4c8a74['render'](),_0x4c8a74;}}class rt extends _0x3d218a{constructor(_0x4a9ad9,_0x4cdb55=''){super(_0x4a9ad9);const _0x4a7a57=new _0x5808d9(),_0x10592a=this['bindTemplate'];this['set']('text',_0x4cdb55),_0x4a7a57['content']='<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20clip-rule=\x22evenodd\x22\x20d=\x22M9.9\x204.385a1.2\x201.2\x200\x200\x200-.44.44h.002l-5.284\x209.15a1.2\x201.2\x200\x200\x200\x201.04\x201.8h10.564a1.2\x201.2\x200\x200\x200\x201.04-1.8l-5.282-9.15a1.2\x201.2\x200\x200\x200-1.64-.44Zm.05\x208.363a.301.301\x200\x200\x201\x20.115-.023h.9a.301.301\x200\x200\x201\x20.3.3v.9a.3.3\x200\x200\x201-.3.3h-.9a.3.3\x200\x200\x201-.3-.3v-.9a.3.3\x200\x200\x201\x20.185-.277Zm-.185-4.723a.3.3\x200\x200\x201\x20.3-.3h.9a.3.3\x200\x200\x201\x20.3.3v3.4a.3.3\x200\x200\x201-.3.3h-.9a.301.301\x200\x200\x201-.3-.3v-3.4Z\x22/></svg>\x0a',this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__error']},'children':[_0x4a7a57,{'text':_0x10592a['to']('text')}]});}}class ht extends ot{['submitButtonView'];['showHistoryButtonView'];constructor(_0x431d17,_0x249028){super(_0x431d17,_0x249028),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',(_0x2b6fc3,_0x1fafd3)=>{_0x2b6fc3['target']==this['queryView']['fieldView']['element']&&(this['submit'](),_0x1fafd3());});}['_createSubmitButton'](){const _0x29aa1e=new _0x8cb510(this['locale']),_0x31f612=this['locale'];return _0x29aa1e['set']({'icon':'<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M15.875\x204.419a.75.75\x200\x200\x200-1.5\x200v7.25H6.818l2.33-1.955a.75.75\x200\x200\x200-.963-1.15l-3.792\x203.182a.75.75\x200\x200\x200-.17.945c.046.11.118.208.21.284l3.788\x203.18a.75.75\x200\x201\x200\x20.965-1.149l-2.19-1.837h7.629c.69\x200\x201.25-.56\x201.25-1.25v-7.5Z\x22/></svg>','label':i(_0x31f612,'Submit'),'isVisible':!0x0,'tooltip':!0x0,'class':'ck-ai-form__submit'}),_0x29aa1e['on']('execute',()=>{this['submit']();}),_0x29aa1e['bind']('isEnabled')['to'](this['queryView']['fieldView'],'isEmpty',this,'isEnabled',(_0x29c56c,_0x25d076)=>!_0x29c56c&&_0x25d076),_0x29aa1e;}['_createShowHistoryButton'](){const _0x5a29f6=new _0x8cb510(this['locale']),_0x2a62cc=this['resultsView'],_0x44da6f=this['locale'];_0x5a29f6['set']({'label':i(_0x44da6f,'History'),'withText':!0x1,'icon':_0x160769['history'],'tooltip':!0x0,'tooltipPosition':'sw','class':'ck-ai-form__toggle-history'}),_0x5a29f6['bind']('isOn')['to'](_0x2a62cc,'isVisible'),_0x5a29f6['bind']('isEnabled')['to'](this,'isEnabled'),_0x5a29f6['on']('execute',()=>{_0x2a62cc['isVisible']=!_0x2a62cc['isVisible'],_0x2a62cc['isVisible']?this['filteredView']['focus']():this['focus']();});const _0x1234b5=()=>{_0x601a75['window']['requestAnimationFrame'](()=>{if(it(this['element'])){const _0x5554b1=new st(this['queryView']['fieldView']['element']),_0x18a315=_0x5554b1['width'],_0x733bc1='rtl'===_0x44da6f['uiLanguageDirection']?'left':'right';_0x5554b1['excludeScrollbarsAndBorders'](),_0x5a29f6['element']['style'][_0x733bc1]=_0x18a315-_0x5554b1['width']+0x1+'px';}});};return this['queryView']['fieldView']['on']('update',_0x1234b5),this['on']('render',_0x1234b5),_0x5a29f6;}['submit'](){const _0xfadb87=this['queryView']['fieldView']['element']['value'];this['fire']('submit',_0xfadb87);}['focus'](_0x5ecfb6){-0x1===_0x5ecfb6?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}}class rs extends lt{['historyGroupView'];['clearHistoryButton'];constructor(_0x53e57d){super(_0x53e57d),this['clearHistoryButton']=this['_createClearHistoryButton'](),this['historyGroupView']=new ut(),this['historyGroupView']['children']['add'](this['clearHistoryButton'],0x1),this['historyGroupView']['label']=i(_0x53e57d,'Prompt\x20history'),this['historyGroupView']['items']['delegate']('execute')['to'](this),this['items']['add'](this['historyGroupView']);}['filter'](){let _0x37777a=0x0;for(const _0x577c64 of this['items'])_0x37777a+=_0x577c64['items']['length'];return{'resultsCount':_0x37777a,'totalItemsCount':_0x37777a};}['_createClearHistoryButton'](){const _0x4cd02e=this['locale'],_0x44523d=new _0x8cb510(this['locale']);return _0x44523d['set']({'label':'('+i(_0x4cd02e,'Clear')+')','withText':!0x0}),_0x44523d['on']('execute',()=>this['fire']('clearHistory')),_0x44523d;}}class hs extends _0x2459b9{constructor(_0x3d7570){super();const _0x4d101e=new te(),_0x3a3086=new _0x8cb510(this['locale'],_0x4d101e);this['children']['add'](_0x3a3086),_0x3a3086['set']({'label':_0x3d7570['prompt'],'withText':!0x0}),_0x3a3086['on']('execute',()=>{this['fire']('execute',{'value':_0x4ca8dd(_0x3d7570['prompt'])});});}}const cs='CKEditor/AIFormView/PromptHistory';class os extends _0x463b6b{constructor(){super(),this['_loadFromSessionStorage'](),this['on']('add',(_0x161161,_0xed7457)=>{const _0x1a0d5f=Ss(_0xed7457['prompt']);for(const _0xd07eff of this)if(_0xd07eff!=_0xed7457&&Ss(_0xd07eff['prompt'])===_0x1a0d5f){this['remove'](_0xd07eff);break;}this['length']>0x14&&this['remove'](this['last']),this['_saveToSessionStorage']();}),this['on']('remove',()=>{this['_saveToSessionStorage']();});}['_loadFromSessionStorage'](){const _0x22528d=sessionStorage['getItem'](cs)||'[]';this['addMany'](JSON['parse'](_0x22528d));}['_saveToSessionStorage'](){sessionStorage['setItem'](cs,JSON['stringify'](this['map'](_0x862dea=>_0x862dea)));}}function Ss(_0x5c6556){return _0x5c6556['toLowerCase']()['trim']();}class k extends _0x3d218a{['focusTracker'];['keystrokes'];['contentArea'];['toolbar'];['promptView'];['errorView'];['_focusables'];['focusCycler'];['_promptHistory'];constructor(_0x2c971d,_0x30da15,_0x3d3419=''){super(_0x2c971d),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 os(),this['errorView']=new rt(_0x2c971d),this['contentArea']=new X(_0x2c971d,_0x3d3419),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 _0x1cab19(),this['keystrokes']=new ts(),this['_focusables']=this['createCollection']([this['contentArea'],this['contentArea']['copyButtonView'],this['toolbar'],this['promptView']]),this['focusCycler']=new _0xce45fc({'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 _0x1aa074=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form',_0x30da15],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form-content']},'children':[{'tag':'div','attributes':{'class':[_0x1aa074['if']('isError','ck-hidden',_0x5557cd=>!_0x5557cd)]},'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'](_0x223f73=0x1){-0x1===_0x223f73?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 _0x391a4e=this['locale'],_0x36b714=new ht(_0x391a4e,{'queryView':{'label':i(_0x391a4e,'Ask\x20AI\x20to\x20edit\x20or\x20generate'),'creator':_0x5bb2a8,'showIcon':!0x1,'showResetButton':!0x1},'infoView':{'text':{'noSearchableItems':{'primary':i(_0x391a4e,'Empty\x20history'),'secondary':i(_0x391a4e,'Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.')}}},'filteredView':this['_createHistoryView'](),'queryMinChars':0x1/0x0,'resetOnBlur':!0x1});return _0x36b714['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x7d0243,_0x119a14)=>_0x7d0243&&!_0x119a14),this['listenTo'](_0x36b714,'submit',(_0xd2f312,_0x66d0e0)=>{this['prompt']=_0x66d0e0;const _0x1cfe95=_0x2c3093(_0x66d0e0);this['fire']('submitPrompt',_0x1cfe95),_0x66d0e0['trim']()&&this['_promptHistory']['add']({'prompt':_0x1cfe95},0x0);},{'priority':'high'}),_0x36b714;}['_createHistoryView'](){const _0x54f929=new rs(this['locale']);return _0x54f929['historyGroupView']['items']['bindTo'](this['_promptHistory'])['as'](hs),_0x54f929['on']('clearHistory',()=>{this['_promptHistory']['clear'](),this['promptView']['search'](''),this['promptView']['focus']();}),_0x54f929;}['_createToolbar'](){const _0x1d85ce=new at(this['locale']);return _0x1d85ce['replaceButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x383321,_0x32c554,_0x1c59aa)=>_0x383321&&!_0x32c554&&!!_0x1c59aa),_0x1d85ce['replaceButton']['delegate']('execute')['to'](this,'replaceContent'),_0x1d85ce['insertButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x5b057a,_0x4b5119,_0x18f0b5)=>_0x5b057a&&!_0x4b5119&&!!_0x18f0b5),_0x1d85ce['insertButton']['delegate']('execute')['to'](this,'insertContentBelow'),_0x1d85ce['tryAgainButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x18f273,_0x1df3d9)=>_0x18f273&&!_0x1df3d9),_0x1d85ce['tryAgainButton']['delegate']('execute')['to'](this,'tryAgainEvent'),_0x1d85ce['stopButton']['bind']('isEnabled')['to'](this,'isProcessing'),_0x1d85ce['stopButton']['delegate']('execute')['to'](this,'stopProcessing'),_0x1d85ce;}['startProcessing'](){this['value']='',this['isError']=!0x1,this['isProcessing']=!0x0,this['contentArea']['isVisible']=!0x0,this['toolbar']['isVisible']=!0x0,this['contentArea']['focus']();}['finishProcessing'](){const _0x1909ae=this['locale'];this['isProcessing']=!0x1,this['prompt']='',this['promptView']['reset'](),this['value']&&(this['promptView']['queryView']['label']=i(_0x1909ae,'Ask\x20AI\x20to\x20improve\x20generated\x20text'));}['handleError'](_0x3c7cbd){const _0x5e152e=this['locale'];this['finishProcessing'](),this['isError']=!0x0,this['errorView']['text']=_0x3c7cbd||i(_0x5e152e,'AI_ERROR_FAILED'),this['value']||(this['contentArea']['isVisible']=!0x1);}}var T='<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M15.346\x209.422a.151.151\x200\x200\x201\x20.284\x200l.548\x201.484a.152.152\x200\x200\x200\x20.09.089l1.483.549a.151.151\x200\x200\x201\x200\x20.284l-1.483.548a.151.151\x200\x200\x200-.09.09l-.548\x201.483a.152.152\x200\x200\x201-.142.1.151.151\x200\x200\x201-.142-.1l-.549-1.483a.15.15\x200\x200\x200-.09-.09l-1.483-.548a.15.15\x200\x200\x201\x200-.284l1.484-.549a.152.152\x200\x200\x200\x20.089-.09l.549-1.483Z\x22/><path\x20d=\x22M16.306\x201.742a.151.151\x200\x200\x201\x20.284\x200l.549\x201.483a.15.15\x200\x200\x200\x20.089.09l1.483.548a.151.151\x200\x200\x201\x20.072.229.151.151\x200\x200\x201-.072.055l-1.483.549a.15.15\x200\x200\x200-.09.09l-.548\x201.482a.151.151\x200\x200\x201-.284\x200l-.549-1.483a.15.15\x200\x200\x200-.09-.09l-1.483-.548a.151.151\x200\x200\x201\x200-.284l1.484-.549a.152.152\x200\x200\x200\x20.09-.089l.548-1.483Z\x22/><path\x20d=\x22M7.665\x201.742a.151.151\x200\x200\x201\x20.284\x200l.549\x201.483a.151.151\x200\x200\x200\x20.09.09l1.482.548a.151.151\x200\x200\x201\x20.072.229.151.151\x200\x200\x201-.072.055l-1.483.549a.151.151\x200\x200\x200-.09.09L7.95\x206.267a.151.151\x200\x200\x201-.284\x200l-.549-1.483a.151.151\x200\x200\x200-.089-.09l-1.483-.548a.151.151\x200\x200\x201\x200-.284l1.483-.549a.151.151\x200\x200\x200\x20.09-.089l.548-1.483-.001.001Z\x22/><path\x20d=\x22M14.72\x207.946a.848.848\x200\x200\x200\x20.25-.591.824.824\x200\x200\x200-.241-.588l-1.943-1.938a.812.812\x200\x200\x200-.588-.241.838.838\x200\x200\x200-.591.25l-1.545\x201.539\x203.115\x203.115\x201.542-1.546h.001Z\x22/><path\x20clip-rule=\x22evenodd\x22\x20d=\x22M1.19\x2015.636a.96.96\x200\x200\x201\x20.281-.679l7.835-7.834\x203.121\x203.12-7.834\x207.835a.959.959\x200\x200\x201-1.358\x200l-1.764-1.764a.96.96\x200\x200\x201-.28-.678Zm9.22-5.391-1.121-1.12-6.479\x206.478\x201.121\x201.121\x206.479-6.479Z\x22/></svg>';const w=globalThis['DataTransfer'];class n extends _0x239301{['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[_0x26c465,a,K,_0xe1ce3f];}constructor(_0x297dcf){super(_0x297dcf),_0x297dcf['config']['define']('ai.aiAssistant.disabledElements',['media','rawHtml','tableOfContents']),_0x297dcf['config']['define']('ai.aiAssistant.contentAreaCssClass',''),_0x297dcf['config']['define']('ai.useTheme',!0x0),this['_uiCssClasses']='ck-ai-assistant-ui'+(_0x297dcf['config']['get']('ai.useTheme')?'\x20ck-ai-assistant-ui_theme':'');}['init'](){const {editor:_0x2348dc}=this;this['_aiAdapter']=_0x2348dc['plugins']['get'](K),this['_dialog']=_0x2348dc['plugins']['get'](_0xe1ce3f),this['_formView']=null,this['_commandDefinitions']=this['_getResolvedCommandsDefinitions']();const _0x590fd1=new E(_0x2348dc,Array['from'](this['_commandDefinitions']['values']()));_0x2348dc['commands']['add']('showAIAssistant',_0x590fd1),_0x2348dc['ui']['componentFactory']['add']('aiCommands',_0x4c749a=>{const _0x1c2760=_0x398943(_0x4c749a);return _0x1c2760['set']({'class':'ck-ai-commands-dropdown\x20'+this['_uiCssClasses']}),_0x1c2760['buttonView']['set']({'label':i(_0x4c749a,'AI\x20Commands'),'icon':T,'tooltip':!0x0}),_0x1c2760['on']('execute',_0x560f53=>this['_onExecute'](_0x560f53['source']['id'])),_0x84c208(_0x1c2760,_0x2348dc['ui']['view']['body'],function(_0x38ba0c){const _0x33de76=o(_0x38ba0c['config']['get']('ai.aiAssistant.commands'),_0x38ba0c['locale']),_0x493f79=U(_0x38ba0c,_0x33de76)['filter'](_0x1d4263=>_0x1d4263['commands']['length']);if(0x1===_0x493f79['length'])return U(_0x38ba0c,_0x493f79[0x0]['commands'])['map'](_0x238ac7=>({'id':_0x238ac7['id'],'label':_0x238ac7['label']}));return _0x493f79['map'](_0x5e576b=>{const {groupId:_0x4aeb2d,groupLabel:_0x2580fb,commands:_0x2b7ebb}=_0x5e576b,_0x25e324=U(_0x38ba0c,_0x2b7ebb)['map'](_0x366318=>({'id':_0x366318['id'],'label':_0x366318['label']}));return{'id':_0x4aeb2d,'menu':_0x2580fb||_0x4aeb2d,'children':_0x25e324};});}(_0x2348dc),{'ariaLabel':i(_0x4c749a,'AI\x20Commands')}),_0x1c2760['menuView']['menuPanelClass']='ck-ai-commands-dropdown\x20'+this['_uiCssClasses'],_0x590fd1['on']('change:enabledCommandsIds',_0x29ab9d),_0x1c2760['menuView']['once']('render',_0x29ab9d),_0x1c2760;function _0x29ab9d(){_0x1c2760['isEnabled']=_0x590fd1['enabledCommandsIds']['length']>0x0;for(const _0x3b21d2 of _0x1c2760['menuView']['buttons'])_0x3b21d2['isEnabled']=_0x590fd1['enabledCommandsIds']['includes'](_0x3b21d2['id']);}}),_0x2348dc['ui']['componentFactory']['add']('menuBar:aiCommands',_0x4dc3c0=>{const _0x41c77e=new _0x4a0af4(_0x4dc3c0);_0x41c77e['buttonView']['set']({'label':i(_0x4dc3c0,'AI\x20Commands'),'icon':T}),_0x41c77e['bind']('isEnabled')['to'](_0x590fd1,'enabledCommandsIds',_0x5b56ff=>_0x5b56ff['length']>0x0);const _0x591014=o(_0x2348dc['config']['get']('ai.aiAssistant.commands'),_0x4dc3c0);return this['_populateMenuBarMenu'](_0x590fd1,_0x41c77e,_0x591014,_0x3a5d85=>this['_onExecute'](_0x3a5d85)),_0x41c77e;}),_0x2348dc['ui']['componentFactory']['add']('aiAssistant',()=>{const _0xd193bf=this['_createAIAssistantUIButton'](_0x8cb510);return _0xd193bf['set']({'tooltip':!0x0,'class':'ck-ai-assistant-button\x20'+this['_uiCssClasses']}),_0xd193bf;}),_0x2348dc['ui']['componentFactory']['add']('menuBar:aiAssistant',()=>{const _0x11eae7=this['_createAIAssistantUIButton'](_0x16bbb8);return _0x11eae7['set']({'role':'menuitemcheckbox'}),_0x11eae7;}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0xee9c75=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x2be1d8;for(const _0x1afe25 in _0xee9c75){const _0x70e0a0=_0x1afe25,_0x25e686=_0xee9c75[_0x70e0a0];if('aiLicenseKeyValid'==_0x25e686||'aiLicenseKeyInvalid'==_0x25e686||'aiLicenseKeyExpired'==_0x25e686||'aiLicenseKeyDomainLimit'==_0x25e686||'aiLicenseKeyNotAllowed'==_0x25e686||'aiLicenseKeyEvaluationLimit'==_0x25e686||'aiLicenseKeyTrialLimit'==_0x25e686||'aiLicenseKeyUsageLimit'==_0x25e686){delete _0xee9c75[_0x70e0a0],_0x2be1d8=_0x25e686,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'aiLicenseKeyInvalid'==_0x2be1d8&&_0xee9c75['_showLicenseError']('invalid'),'aiLicenseKeyExpired'==_0x2be1d8&&_0xee9c75['_showLicenseError']('expired'),'aiLicenseKeyDomainLimit'==_0x2be1d8&&_0xee9c75['_showLicenseError']('domainLimit'),'aiLicenseKeyNotAllowed'==_0x2be1d8&&_0xee9c75['_showLicenseError']('featureNotAllowed','AIAssistant'),'aiLicenseKeyEvaluationLimit'==_0x2be1d8&&_0xee9c75['_showLicenseError']('evaluationLimit'),'aiLicenseKeyTrialLimit'==_0x2be1d8&&_0xee9c75['_showLicenseError']('trialLimit'),'aiLicenseKeyUsageLimit'==_0x2be1d8&&_0xee9c75['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['showUI'](_0x6d3835='',_0xbef09e='',_0x2319be='custom'){const _0x8d6f20=this['editor'],_0xe6fefa=_0x8d6f20['editing']['view'],_0x437bad=_0x8d6f20['plugins']['get'](a),_0x448229=_0x8d6f20['plugins']['get'](_0x26c465);_0x437bad['showFakeVisualSelection']();const _0x2a50d7=new w(),_0x5baf99=new ClipboardEvent('copy',{'clipboardData':_0x2a50d7}),_0x3ad2a9=new _0x14381d(_0x2a50d7),_0x220454=new _0x47ee81(_0xe6fefa,_0x5baf99,{'dataTransfer':_0x3ad2a9});_0x448229['_forceMarkersCopy']('comment',()=>{_0xe6fefa['document']['fire']('copy',_0x220454);}),this['_formView']||(this['_initView'](),this['_aiAssistantController']=new j(_0x8d6f20,this['_aiAdapter']['textAdapter'],this['_formView']));let _0x4ab42f=_0x3ad2a9['getData']('text/html');const _0x5c59b0=_0x8d6f20['model']['document']['selection'],_0x497f9c=Array['from'](_0x5c59b0['getRanges']());0x1===_0x497f9c['length']&&_0x497f9c[0x0]['isFlat']&&!_0x5c59b0['getSelectedElement']()&&''!==_0x4ab42f['replace'](/ /g,'')['trim']()&&(_0x4ab42f='<p>'+_0x4ab42f+'</p>'),this['_aiAssistantController']['updateView']({'actionId':_0x2319be,'query':_0x6d3835,'htmlContent':_0x4ab42f,'label':_0xbef09e,'mainActionLabel':M[_0x8d6f20['model']['document']['selection']['isCollapsed']?'INSERT':'REPLACE']}),'aiAssistant'!==this['_dialog']['id']?this['_dialog']['show']({'id':'aiAssistant','icon':ct['robotPencil'],'title':i(this['editor']['locale'],'AI\x20Assistant'),'content':this['_formView'],'position':_0x2fbb7c['EDITOR_TOP_SIDE'],'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_aiAssistantController']['reset'](),_0x437bad['hideFakeVisualSelection']();}}):this['_dialog']['view']['wasMoved']||this['_dialog']['view']['updatePosition']();}['hideUI'](){this['_dialog']['hide']();}['_getResolvedCommandsDefinitions'](){const _0x3f42c4=new Map(),_0xc61d03=o(this['editor']['config']['get']('ai.aiAssistant.commands'),this['editor']['locale']);for(const _0x29bb7c of _0xc61d03)for(const _0x1908d1 of _0x29bb7c['commands'])_0x3f42c4['set'](_0x1908d1['id'],{..._0x1908d1,'groupId':_0x29bb7c['groupId'],'groupLabel':_0x29bb7c['groupLabel']||_0x29bb7c['groupId']});return _0x3f42c4;}['_createAIAssistantUIButton'](_0x38cfa3){const _0x397c5d=this['editor'],_0x1d9a66=_0x397c5d['commands']['get']('showAIAssistant'),_0xbbdfe1=new _0x38cfa3(_0x397c5d['locale']);return _0xbbdfe1['set']({'label':i(_0x397c5d['locale'],'AI\x20Assistant'),'icon':ct['robotPencil'],'isToggleable':!0x0}),_0xbbdfe1['bind']('isEnabled')['to'](_0x1d9a66),_0xbbdfe1['bind']('isOn')['to'](this['_dialog'],'id',_0x173b4a=>'aiAssistant'===_0x173b4a),this['listenTo'](_0xbbdfe1,'execute',()=>{_0xbbdfe1['isOn']?this['hideUI']():_0x1d9a66['execute']();}),_0xbbdfe1;}['_initView'](){const _0xf3a8f0=this['editor']['plugins']['get'](a);this['_formView']=new k(this['editor']['locale'],this['_uiCssClasses'],this['editor']['config']['get']('ai.aiAssistant.contentAreaCssClass')),this['_formView']['on']('change:value',()=>{this['_dialog']['view']['wasMoved']||this['_dialog']['view']['updatePosition']();}),this['_formView']['promptView']['queryView']['fieldView']['on']('update',()=>{this['_dialog']['view']['wasMoved']||this['_dialog']['view']['updatePosition']();}),this['listenTo'](this['_formView'],'replaceContent',()=>{_0xf3a8f0['insertContent'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['listenTo'](this['_formView'],'insertContentBelow',()=>{_0xf3a8f0['insertContentBelow'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['_initAriaAiStatusChangeAnnouncements']();}['_initAriaAiStatusChangeAnnouncements'](){const {locale:_0x4d360a,ui:{ariaLiveAnnouncer:_0x2763f7}}=this['editor'];this['_formView']['contentArea']['on']('change:isProcessing',(_0x37b07c,_0x4378ae,_0x259c05)=>{const _0x4b0bbf=this['_aiAssistantController']['currentContext'];_0x259c05?_0x2763f7['announce'](i(_0x4d360a,'AI\x20is\x20writing')):_0x4b0bbf&&_0x2763f7['announce'](i(_0x4d360a,'Generated\x20content:\x20%0',_0x4b0bbf),{'politeness':'polite','isUnsafeHTML':!0x0});}),this['_formView']['on']('change:isError',(_0x37ad68,_0x3aa58b,_0x329bdf)=>{if(_0x329bdf){const _0x27ed97=this['_formView']['errorView']['text'];_0x2763f7['announce'](i(_0x4d360a,'Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x27ed97));}});}['_onExecute'](_0x22267b){const _0xd5aad3=this['_commandDefinitions']['get'](_0x22267b),_0x40dce6=this['editor'],_0x4b6032=_0x40dce6['model']['document']['selection'],_0xf0d860=_0x40dce6['commands']['get']('showAIAssistant'),_0x2329b2=_0x40dce6['plugins']['get'](a),_0xe07391=''+(_0xd5aad3['groupId']!==x?_0xd5aad3['groupLabel']+':\x20':'')+_0xd5aad3['label'];if(!0x1!==_0xd5aad3['requiresContent']&&_0x4b6032['isCollapsed']){const _0x3f654b=_0x4abb0d(_0x4b6032['getSelectedBlocks']())||_0x40dce6['model']['schema']['getLimitElement'](_0x4b6032);_0x40dce6['model']['change'](_0x5e32e8=>{_0x5e32e8['setSelection'](_0x3f654b,'in');});}_0x2329b2['showFakeVisualSelection'](),_0xf0d860['execute'](_0xd5aad3['prompt'],_0xe07391,'command:'+_0x22267b);}['_populateMenuBarMenu'](_0x27695b,_0x31fa95,_0x50ae43,_0x36a226){const _0x22c23f=this['editor'],_0xfb0302=_0x22c23f['locale'],_0xd4a303=new _0x47c417(_0xfb0302),_0x203781=U(_0x22c23f,_0x50ae43)['filter'](_0x524d1e=>_0x524d1e['commands']['length']);0x1===_0x203781['length']?this['_getMenuBarGroupButtons']({'command':_0x27695b,'commands':_0x203781[0x0]['commands'],'parentMenuView':_0x31fa95,'onExecute':_0x36a226})['forEach'](_0x2ed92d=>_0xd4a303['items']['add'](_0x2ed92d)):_0x203781['forEach'](({groupId:_0x5cf5cf,groupLabel:_0x1e140e,commands:_0x49f857})=>{const _0x50913b=new _0xfeaad3(_0xfb0302,_0x31fa95),_0x5293a9=new _0x4a0af4(_0xfb0302),_0x2831be=new _0x47c417(_0xfb0302),_0x51b656=this['_getMenuBarGroupButtons']({'command':_0x27695b,'commands':_0x49f857,'parentMenuView':_0x5293a9,'onExecute':_0x36a226});_0x5293a9['buttonView']['set']({'label':_0x1e140e||_0x5cf5cf}),_0x5293a9['delegate']('execute')['to'](_0x31fa95),_0x2831be['items']['addMany'](_0x51b656),_0x5293a9['panelView']['children']['add'](_0x2831be),_0x50913b['children']['add'](_0x5293a9),_0xd4a303['items']['add'](_0x50913b);}),_0x31fa95['panelView']['children']['add'](_0xd4a303);}['_getMenuBarGroupButtons']({command:_0x5ef19d,commands:_0x3a5bcf,parentMenuView:_0x99156f,onExecute:_0x1e7fb2}){const _0x821c4a=this['editor'],_0x5db950=_0x821c4a['locale'];return U(_0x821c4a,_0x3a5bcf)['map'](_0x2985ae=>{const _0x1a541f=new _0xfeaad3(_0x5db950,_0x99156f),_0x2fbc05=new _0x16bbb8(_0x5db950);return _0x2fbc05['set']({'label':_0x2985ae['label']}),_0x2fbc05['delegate']('execute')['to'](_0x99156f),_0x2fbc05['on']('execute',()=>_0x1e7fb2(_0x2985ae['id'])),_0x2fbc05['bind']('isEnabled')['to'](_0x5ef19d,'enabledCommandsIds',_0xbc0ae=>_0xbc0ae['includes'](_0x2985ae['id'])),_0x1a541f['children']['add'](_0x2fbc05),_0x1a541f;});}}function B(_0x1eb5dc,_0x5cc65f){return void 0x0!==_0x1eb5dc['order']&&void 0x0===_0x5cc65f['order']?0x1:void 0x0===_0x1eb5dc['order']&&void 0x0!==_0x5cc65f['order']?-0x1:void 0x0!==_0x1eb5dc['order']&&void 0x0!==_0x5cc65f['order']?_0x1eb5dc['order']-_0x5cc65f['order']:0x0;}function U(_0x1f3ac7,_0x55f4b3){_0x55f4b3['sort'](B);const _0x31b102={},_0x2d8f02=[];for(const _0x238d61 of _0x55f4b3)if(void 0x0!==_0x238d61['order']){if(_0x238d61['order']in _0x31b102)throw new _0x2981d1('ai-commands-config-order-collision',_0x1f3ac7,{'conflictingDefinitions':[_0x238d61,_0x31b102[_0x238d61['order']]]});_0x31b102[_0x238d61['order']]=_0x238d61,_0x2d8f02['splice'](_0x238d61['order'],0x0,_0x238d61);}else _0x2d8f02['push'](_0x238d61);return _0x2d8f02;}class r extends _0x239301{static get['requires'](){return[n,a];}static get['pluginName'](){return'AIAssistant';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x65233){super(_0x65233);const _0x456ac9=_0x65233['config'],_0x250f6f=_0x65233['locale'];_0x456ac9['define']('ai.aiAssistant.preserveComments',!0x0),_0x456ac9['define']('ai.aiAssistant.commands',function(_0x42c05b){return[{'groupId':'editOrReview','groupLabel':i(_0x42c05b,'Edit\x20or\x20review'),'commands':[{'id':'improveWriting','label':i(_0x42c05b,'Improve\x20writing'),'prompt':'Fix\x20spelling\x20mistakes,\x20use\x20proper\x20grammar\x20and\x20apply\x20good\x20writing\x20practices.\x20Do\x20not\x20lose\x20the\x20original\x20meaning.'},{'id':'makeShorter','label':i(_0x42c05b,'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(_0x42c05b,'Make\x20longer'),'prompt':'Improve\x20this\x20content\x20by\x20using\x20descriptive\x20language\x20and\x20inserting\x20more\x20information\x20and\x20more\x20detailed\x20explanations.'},{'id':'simplifyLanguage','label':i(_0x42c05b,'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(_0x42c05b,'Generate\x20from\x20selection'),'commands':[{'id':'summarize','label':i(_0x42c05b,'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(_0x42c05b,'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(_0x42c05b,'Change\x20tone'),'commands':[{'id':'professional','label':i(_0x42c05b,'Professional'),'prompt':'Improve\x20using\x20polished,\x20formal,\x20and\x20respectful\x20language\x20to\x20convey\x20professional\x20expertise\x20and\x20competence.'},{'id':'casual','label':i(_0x42c05b,'Casual'),'prompt':'Improve\x20using\x20casual,\x20informal\x20language\x20to\x20convey\x20a\x20casual\x20conversation\x20with\x20a\x20real\x20person.'},{'id':'direct','label':i(_0x42c05b,'Direct'),'prompt':'Improve\x20using\x20direct\x20language,\x20using\x20only\x20the\x20essential\x20information.'},{'id':'confident','label':i(_0x42c05b,'Confident'),'prompt':'Improve\x20using\x20compelling,\x20optimistic\x20language\x20to\x20convey\x20confidence\x20in\x20the\x20writing.'},{'id':'friendly','label':i(_0x42c05b,'Friendly'),'prompt':'Improve\x20using\x20friendly,\x20comforting\x20language,\x20to\x20convey\x20understanding\x20and\x20empathy.'}]},{'groupId':'changeStyle','groupLabel':i(_0x42c05b,'Change\x20style'),'commands':[{'id':'business','label':i(_0x42c05b,'Business'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20business\x20professional\x20with\x20formal\x20language.'},{'id':'legal','label':i(_0x42c05b,'Legal'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20legal\x20professional\x20using\x20valid\x20legal\x20terminology.'},{'id':'journalism','label':i(_0x42c05b,'Journalism'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20journalist\x20using\x20engaging\x20language\x20to\x20convey\x20the\x20importance\x20of\x20the\x20information.'},{'id':'poetic','label':i(_0x42c05b,'Poetic'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20poem\x20using\x20poetic\x20techniques\x20without\x20losing\x20the\x20original\x20meaning.'}]},{'groupId':'translate','groupLabel':i(_0x42c05b,'Translate'),'commands':[{'id':'translateEnglish','label':i(_0x42c05b,'English'),'prompt':'Translate\x20the\x20content\x20to\x20English\x20language.'},{'id':'translateSpanish','label':i(_0x42c05b,'Spanish'),'prompt':'Translate\x20the\x20content\x20to\x20Spanish\x20language.'},{'id':'translatePortuguese','label':i(_0x42c05b,'Portuguese'),'prompt':'Translate\x20the\x20content\x20to\x20Portuguese\x20language.'},{'id':'translateGerman','label':i(_0x42c05b,'German'),'prompt':'Translate\x20the\x20content\x20to\x20German\x20language.'},{'id':'translateFrench','label':i(_0x42c05b,'French'),'prompt':'Translate\x20the\x20content\x20to\x20French\x20language.'},{'id':'translateChinese','label':i(_0x42c05b,'Simplified\x20Chinese'),'prompt':'Translate\x20the\x20content\x20to\x20Simplified\x20Chinese\x20language.'},{'id':'translateHindi','label':i(_0x42c05b,'Hindi'),'prompt':'Translate\x20the\x20content\x20to\x20Hindi\x20language.'},{'id':'translateArabic','label':i(_0x42c05b,'Arabic'),'prompt':'Translate\x20the\x20content\x20to\x20Arabic\x20language.'}]}];}(_0x250f6f)),_0x456ac9['define']('ai.aiAssistant.extraCommandGroups',[]),_0x456ac9['define']('ai.aiAssistant.removeCommands',[]);let _0x232025=o(_0x456ac9['get']('ai.aiAssistant.commands'),_0x250f6f);const _0x1845b5=_0x456ac9['get']('ai.aiAssistant.extraCommandGroups'),_0x3181cc=_0x456ac9['get']('ai.aiAssistant.removeCommands');_0x1845b5['forEach'](_0x7b8f6f=>{const _0x31d4c=_0x232025['find'](_0x2f5d6a=>_0x2f5d6a['groupId']===_0x7b8f6f['groupId']);_0x31d4c?_0x31d4c['commands']=_0x31d4c['commands']['concat'](_0x7b8f6f['commands']):_0x232025['push'](_0x7b8f6f);}),_0x232025=_0x232025['filter'](_0x2df953=>!_0x3181cc['includes'](_0x2df953['groupId'])),_0x232025['forEach'](_0x946ecc=>{_0x946ecc['commands']=_0x946ecc['commands']['filter'](_0x5069c5=>!_0x3181cc['includes'](_0x5069c5['id']));}),_0x456ac9['set']('ai.aiAssistant.commands',_0x232025);}}class P extends _0x239301{['abortController'];static get['requires'](){return[K];}constructor(_0x3770ea){super(_0x3770ea),this['abortController']=new AbortController();}['init'](){this['editor']['plugins']['get'](K)['textAdapter']=this;}['abort'](){this['abortController']['signal']['aborted']||(this['abortController']['abort'](),this['abortController']=new AbortController());}async['makeRequest'](_0x133ea0){return this['sendRequest'](_0x133ea0)['catch'](_0xbd852d=>{if(_0xbd852d instanceof R)return Promise['reject'](_0xbd852d);if('AbortError'==_0xbd852d['name'])return Promise['resolve']();throw console['error'](_0xbd852d),new _0x2981d1('aitextadapter-send-request-failed',null);});}async['_prepareRequestHeaders'](_0x5b4345,_0x1c73ab){const _0x18365e=this['editor']['locale'],_0x5eba0d={'Content-Type':'application/json'};if('object'==typeof _0x5b4345)Object['assign'](_0x5eba0d,_0x5b4345);else{if(_0x5b4345)try{const _0x58bc1e=await _0x5b4345(_0x1c73ab);Object['assign'](_0x5eba0d,_0x58bc1e);}catch(_0x1b2f29){return Promise['reject'](new R(i(_0x18365e,'AI_ERROR_GET_HEADERS')));}}return _0x5eba0d;}async['_prepareRequestParameters'](_0x16a819,_0x22b4e9){const _0xa6fdd2=this['editor']['locale'];if('object'==typeof _0x16a819)return _0x16a819;try{return await _0x16a819(_0x22b4e9);}catch(_0x15f4a6){return Promise['reject'](new R(i(_0xa6fdd2,'AI_ERROR_GET_PARAMETERS')));}}}class H extends P{['_apiUrl'];['_requestHeaders'];['_requestParameters'];static get['pluginName'](){return'OpenAITextAdapter';}constructor(_0x433282){super(_0x433282),_0x433282['config']['define']('ai.openAI.apiUrl','https://api.openai.com/v1/chat/completions'),_0x433282['config']['get']('ai.openAI.requestParameters')||_0x433282['config']['define']('ai.openAI.requestParameters',{'model':'gpt-3.5-turbo','max_tokens':0x7d0,'temperature':0x1,'top_p':0x1,'stream':!0x0}),this['_apiUrl']=_0x433282['config']['get']('ai.openAI.apiUrl'),this['_requestHeaders']=_0x433282['config']['get']('ai.openAI.requestHeaders')||{},this['_requestParameters']=_0x433282['config']['get']('ai.openAI.requestParameters');}async['sendRequest']({query:_0x4eab57,context:_0xad574a,onData:_0x5c40e2,actionId:_0x270019}){const _0x2980f3=this['editor']['locale'],_0x3dbba6=await this['prepareMessages'](_0x4eab57,_0xad574a,_0x270019),_0x4472e9=await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x270019),_0x5061fe=await this['_prepareRequestParameters'](this['_requestParameters'],_0x270019),_0x4486b9={'messages':_0x3dbba6,..._0x5061fe},_0x563208={'method':'POST','headers':_0x4472e9,'body':JSON['stringify'](_0x4486b9),'signal':this['abortController']['signal']},_0x341a00=await fetch(this['_apiUrl'],_0x563208);if(_0x341a00['ok'])return _0x5061fe['stream']?await this['_readStreamableResponse'](_0x341a00,_0x5c40e2):await this['_readStaticResponse'](_0x341a00,_0x5c40e2),Promise['resolve']();{const _0x312d24=await _0x341a00['text']();return _0x312d24['includes']('context_length_exceeded')?Promise['reject'](new R(i(_0x2980f3,'AI_ERROR_CONTEXT_LENGTH'))):_0x312d24['includes']('Moderation')?Promise['reject'](new R(i(_0x2980f3,'AI_ERROR_MODERATION'))):Promise['reject'](new Error(_0x312d24));}}async['prepareMessages'](_0x1585c1,_0x2b6644,_0x14f056){let _0x20bc4e,_0x34fb86;return _0x2b6644?(_0x20bc4e='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.',_0x34fb86='Instruction:\x0a'+_0x1585c1+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x2b6644):(_0x20bc4e='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.',_0x34fb86=_0x1585c1),[{'role':'system','content':_0x20bc4e},{'role':'user','content':_0x34fb86}];}async['_readStreamableResponse'](_0x1b30f0,_0x25a143){const _0xaceade=_0x1b30f0['body']['getReader'](),_0x2ea5ad=new TextDecoder();let _0x1ab75e='',_0xa069fd='',_0x4934c5='',_0x1edb1c=!0x1;for(;!_0x1edb1c;){const {done:_0x1ce0d1,value:_0x1ae4fd}=await _0xaceade['read'](),_0x50ae53=_0x1ab75e+_0x2ea5ad['decode'](_0x1ae4fd);let _0x10dfc5='';_0x1edb1c=_0x1ce0d1;try{_0x10dfc5=this['_cleanUpData'](_0x50ae53),_0x1ab75e='';}catch(_0x421570){_0x1ab75e=_0x50ae53;continue;}_0xa069fd+=_0x10dfc5,!_0x1edb1c&&this['_isBufferIncomplete'](_0xa069fd)||_0xa069fd&&(_0x4934c5+=_0xa069fd,_0xa069fd='',_0x25a143(_0x4934c5));}return Promise['resolve']();}async['_readStaticResponse'](_0x39479b,_0x3ef8bb){return _0x3ef8bb((await _0x39479b['json']())['choices'][0x0]['message']['content']),Promise['resolve']();}['_isBufferIncomplete'](_0x33845f){const _0x183fba=_0x33845f['split']('<')['length']!==_0x33845f['split']('>')['length'],_0x42703a=_0x33845f['length']<0x1e;return _0x183fba&&_0x42703a;}['_cleanUpData'](_0x2b7ccb){return _0x2b7ccb['split'](/\n(?![^{]*\})/g)['map'](_0xe8ff9e=>_0xe8ff9e['replace']('data:\x20',''))['filter'](_0x299118=>_0x299118&&_0x299118['length']>0x0&&'[DONE]'!==_0x299118)['map'](_0x797146=>{const {choices:_0x53765b}=JSON['parse'](_0x797146);if(_0x53765b[0x0]&&_0x53765b[0x0]['delta']&&_0x53765b[0x0]['delta']['content'])return _0x53765b[0x0]['delta']['content'];})['filter'](_0x18636e=>_0x18636e)['join']('');}}class O extends P{['_apiUrl'];['_requestHeaders'];['_bedrockClientConfig'];['_requestParameters'];static get['pluginName'](){return'AWSTextAdapter';}constructor(_0x1bdb9f){super(_0x1bdb9f),_0x1bdb9f['config']['get']('ai.aws.requestParameters')||_0x1bdb9f['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']=_0x1bdb9f['config']['get']('ai.aws.apiUrl'),this['_bedrockClientConfig']=_0x1bdb9f['config']['get']('ai.aws.bedrockClientConfig'),this['_requestHeaders']=_0x1bdb9f['config']['get']('ai.aws.requestHeaders'),this['_requestParameters']=_0x1bdb9f['config']['get']('ai.aws.requestParameters');}async['sendRequest']({query:_0x15d424,context:_0x55be67,onData:_0x37a46a,actionId:_0x24f4d2}){const {model:_0x5472cb,stream:_0x46f50f,..._0x4d637d}=await this['_prepareRequestParameters'](this['_requestParameters'],_0x24f4d2),_0x1c01e0={'prompt':await this['preparePrompt'](_0x15d424,_0x55be67,_0x5472cb,_0x24f4d2),..._0x4d637d};this['_apiUrl']?await this['_processProxyRequest'](_0x1c01e0,_0x5472cb,_0x46f50f,_0x37a46a,_0x24f4d2):await this['_processAWSRequest'](_0x1c01e0,_0x5472cb,_0x46f50f,_0x37a46a);}async['preparePrompt'](_0x508ed0,_0x202f90,_0x1d53fb,_0x33f2b9){let _0x4991fd,_0x1944f5;return _0x202f90?(_0x4991fd='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.',_0x1944f5='Instruction:\x0a'+_0x508ed0+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x202f90):(_0x4991fd='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.',_0x1944f5=_0x508ed0),'meta.llama'==this['getModelFamily'](_0x1d53fb)?'<<SYS>>\x0a'+_0x4991fd+'\x0a<</SYS>>\x0a[INST]\x0a'+_0x1944f5+'\x0a[/INST]':'Human:\x0a'+_0x4991fd+'\x0a'+_0x1944f5+'\x0a\x0aAssistant:';}['getModelFamily'](_0x5c03fe){if(/^anthropic\.claude/['test'](_0x5c03fe))return'anthropic.claude';if(/^ai21\.j2/['test'](_0x5c03fe))return'ai21.j2';if(/^cohere\.command/['test'](_0x5c03fe))return'cohere.command';if(/^meta\.llama/['test'](_0x5c03fe))return'meta.llama';throw new R(i(this['editor']['locale'],'AI_ERROR_UNSUPPORTED_MODEL',_0x5c03fe));}async['_processProxyRequest'](_0x8b972d,_0xdbdaf5,_0x321899,_0x2d7bba,_0x1f86d0){const _0x27e9f0={'method':'POST','headers':await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x1f86d0),'body':JSON['stringify']({..._0x8b972d,'model':_0xdbdaf5,'stream':_0x321899}),'signal':this['abortController']['signal']},_0x2ed33d=await fetch(this['_apiUrl'],_0x27e9f0);_0x321899?await this['_readStreamableResponse'](_0x2ed33d,_0xdbdaf5,_0x2d7bba):await this['_readStaticResponse'](_0x2ed33d,_0xdbdaf5,_0x2d7bba);}async['_processAWSRequest'](_0x31c0ff,_0x296013,_0x44bbef,_0x2f326f){const _0x2c0ef6=new _0x503d29(this['_bedrockClientConfig']),_0x1371c0={'body':JSON['stringify'](_0x31c0ff),'contentType':'application/json','accept':'application/json','modelId':_0x296013};let _0x90929b;if(_0x44bbef){const _0x36d5c7=new _0x597048(_0x1371c0);_0x90929b=await _0x2c0ef6['send'](_0x36d5c7,{'abortSignal':this['abortController']['signal']}),await this['_readAsyncIterableResponse'](_0x90929b,_0x296013,_0x2f326f);}else{const _0x43b20d=new _0x3d89ac(_0x1371c0);_0x90929b=await _0x2c0ef6['send'](_0x43b20d,{'abortSignal':this['abortController']['signal']}),await this['_readStaticResponse'](_0x90929b,_0x296013,_0x2f326f);}}async['_readAsyncIterableResponse'](_0x47326c,_0x1a89e0,_0xcac7c9){const _0x352b5c=_0x47326c['body'],_0x9794dd=new TextDecoder('utf-8');let _0x39c3df='';for await(const _0x245531 of _0x352b5c)if(_0x245531['chunk']){const _0x26f227=_0x9794dd['decode'](_0x245531['chunk']['bytes']),_0x137091=JSON['parse'](_0x26f227);_0x39c3df+=this['_getGeneratedText'](_0x137091,_0x1a89e0),_0xcac7c9(_0x39c3df);}return Promise['resolve']();}async['_readStreamableResponse'](_0x220421,_0x3b37c5,_0x594edb){const _0x4d77a8=_0x220421['body'],_0x547887=new TextDecoder('utf-8'),_0x35875b=_0x4d77a8['getReader']();let _0x28e1f9='',_0xf6ddb6='',_0x4fb19f=!0x1;for(;!_0x4fb19f;){const {done:_0x59ba3c,value:_0xe2b4dd}=await _0x35875b['read']();if(_0x4fb19f=_0x59ba3c,_0x4fb19f)break;const _0x53fc3d=(_0x28e1f9+_0x547887['decode'](_0xe2b4dd))['split']('\x0a')['map'](_0x2f01c9=>{try{return _0x28e1f9='',JSON['parse'](_0x2f01c9);}catch(_0x31e6ab){return _0x28e1f9=_0x2f01c9,null;}})['filter'](_0x37bc6f=>null!==_0x37bc6f);_0x53fc3d['length']&&(_0xf6ddb6+=_0x53fc3d['map'](_0x520258=>this['_getGeneratedText'](_0x520258,_0x3b37c5))['join'](''),_0x594edb(_0xf6ddb6));}return Promise['resolve']();}async['_readStaticResponse'](_0x10c7dc,_0x4a3494,_0x102e3b){let _0x122cb9;return _0x122cb9=_0x10c7dc instanceof Response?await _0x10c7dc['json']():JSON['parse'](Buffer['from'](_0x10c7dc['body'])['toString']('utf8')),(_0x102e3b(this['_getGeneratedText'](_0x122cb9,_0x4a3494)),Promise['resolve']());}['_getGeneratedText'](_0x125be5,_0x1825e0){switch(this['getModelFamily'](_0x1825e0)){case'anthropic.claude':return _0x125be5['completion'];case'ai21.j2':return _0x125be5['completions'][0x0]['data']['text'];case'cohere.command':return _0x125be5['generations'][0x0]['text'];case'meta.llama':return _0x125be5['generation'];}}}export{K as AIAdapter,r as AIAssistant,n as AIAssistantUI,R as AIRequestError,P as AITextAdapter,O as AWSTextAdapter,H 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':_0x227e75=>0x1!=_0x227e75}};
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
(
|
|
23
|
+
(_0xed8951=>{const {af:{dictionary:_0xb2bbcb,getPluralForm:_0x33ff2e}}={'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':_0x364793=>0x1!=_0x364793}};_0xed8951['af']||={'dictionary':{},'getPluralForm':null},_0xed8951['af']['dictionary']=Object['assign'](_0xed8951['af']['dictionary'],_0xb2bbcb),_0xed8951['af']['getPluralForm']=_0x33ff2e;})(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':_0x3e33f7=>0x0==_0x3e33f7?0x0:0x1==_0x3e33f7?0x1:0x2==_0x3e33f7?0x2:_0x3e33f7%0x64>=0x3&&_0x3e33f7%0x64<=0xa?0x3:_0x3e33f7%0x64>=0xb?0x4:0x5}};
|