@ckeditor/ckeditor5-ai 46.0.0 → 46.0.1-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/ai.js +1 -1
- package/dist/index.js +2 -2
- package/dist/translations/af.js +1 -1
- package/dist/translations/af.umd.js +1 -1
- package/dist/translations/ar.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/ast.js +1 -1
- package/dist/translations/ast.umd.js +1 -1
- package/dist/translations/az.js +1 -1
- package/dist/translations/az.umd.js +1 -1
- package/dist/translations/be.js +1 -1
- package/dist/translations/be.umd.js +1 -1
- package/dist/translations/bg.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/bs.js +1 -1
- package/dist/translations/bs.umd.js +1 -1
- package/dist/translations/ca.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.js +1 -1
- package/dist/translations/de-ch.umd.js +1 -1
- package/dist/translations/de.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en-gb.js +1 -1
- package/dist/translations/en-gb.umd.js +1 -1
- package/dist/translations/en.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.js +1 -1
- package/dist/translations/eo.umd.js +1 -1
- package/dist/translations/es-co.js +1 -1
- package/dist/translations/es-co.umd.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/eu.js +1 -1
- package/dist/translations/eu.umd.js +1 -1
- package/dist/translations/fa.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fi.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/gu.js +1 -1
- package/dist/translations/gu.umd.js +1 -1
- package/dist/translations/he.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/hy.js +1 -1
- package/dist/translations/hy.umd.js +1 -1
- package/dist/translations/id.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/jv.js +1 -1
- package/dist/translations/jv.umd.js +1 -1
- package/dist/translations/kk.js +1 -1
- package/dist/translations/kk.umd.js +1 -1
- package/dist/translations/km.js +1 -1
- package/dist/translations/km.umd.js +1 -1
- package/dist/translations/kn.js +1 -1
- package/dist/translations/kn.umd.js +1 -1
- package/dist/translations/ko.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/ku.js +1 -1
- package/dist/translations/ku.umd.js +1 -1
- package/dist/translations/lt.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nb.js +1 -1
- package/dist/translations/nb.umd.js +1 -1
- package/dist/translations/ne.js +1 -1
- package/dist/translations/ne.umd.js +1 -1
- package/dist/translations/nl.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/oc.js +1 -1
- package/dist/translations/oc.umd.js +1 -1
- package/dist/translations/pl.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/si.js +1 -1
- package/dist/translations/si.umd.js +1 -1
- package/dist/translations/sk.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.js +1 -1
- package/dist/translations/sl.umd.js +1 -1
- package/dist/translations/sq.js +1 -1
- package/dist/translations/sq.umd.js +1 -1
- package/dist/translations/sr-latn.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/ti.js +1 -1
- package/dist/translations/ti.umd.js +1 -1
- package/dist/translations/tk.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.js +1 -1
- package/dist/translations/tt.umd.js +1 -1
- package/dist/translations/ug.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/ur.js +1 -1
- package/dist/translations/ur.umd.js +1 -1
- package/dist/translations/uz.js +1 -1
- package/dist/translations/uz.umd.js +1 -1
- package/dist/translations/vi.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.js +1 -1
- package/dist/translations/zh.umd.js +1 -1
- package/package.json +9 -9
- package/src/adapters/aiadapter.js +1 -1
- package/src/adapters/aitextadapter.js +1 -1
- package/src/adapters/awstextadapter.js +1 -1
- package/src/adapters/openaitextadapter.js +1 -1
- package/src/aiassistant.js +1 -1
- package/src/aiassistantediting.js +1 -1
- package/src/aiassistantui.js +1 -1
- package/src/index.js +1 -1
- package/src/legacyerrors.js +1 -1
- package/src/ui/aiassistantcontroller.js +2 -2
- package/src/ui/form/aiformcontentarea.js +1 -1
- package/src/ui/form/aiformerrorview.js +1 -1
- package/src/ui/form/aiformpromptview.js +1 -1
- package/src/ui/form/aiformtoolbarview.js +1 -1
- package/src/ui/form/aiformview.js +1 -1
- package/src/ui/form/aihistorylistitemview.js +1 -1
- package/src/ui/form/aihistorylistview.js +1 -1
- package/src/ui/form/prompthistory.js +1 -1
- package/src/ui/showaiassistantcommand.js +1 -1
- package/src/utils/common-translations.js +1 -1
- package/src/utils/normalizecommandsconfig.js +1 -1
package/dist/index.js
CHANGED
|
@@ -20,5 +20,5 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Plugin as _0x3108cd,Command as _0x17853c}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconCopy as _0x3d14c4,IconCheck as _0x4a7c5d,IconError as _0x54fbf4,IconSubmit as it,IconHistory as tt,IconMagicWand as _0x2650e2,IconRobotPencil as _0x4f08c1}from'@ckeditor/ckeditor5-icons/dist/index.js';import{uid as _0x1180a9,CKEditorError as _0x422b03,ObservableMixin as _0x3b83fb,global as _0x5f1c41,isVisible as _0x3c4936,Rect as _0x375126,Collection as _0x123f68,FocusTracker as et,KeystrokeHandler as rt,first as _0x34ab68}from'@ckeditor/ckeditor5-utils/dist/index.js';import{ToolbarView as ot,ButtonView as _0xb9d7d2,View as _0x5d4d73,SpinnerView as _0x12d95b,IconView as _0xe93f1e,AutocompleteView as st,ListView as yt,ListItemGroupView as Ct,ListItemView as xt,ButtonLabelView as wt,FocusCycler as ht,createLabeledTextarea as nt,Dialog as _0x5188b7,createDropdown as _0x371b1f,addMenuToDropdown as _0x1f1a54,MenuBarMenuView as _0x3c3ace,MenuBarMenuListItemButtonView as _0x14e627,DialogViewPosition as _0x208540,MenuBarMenuListView as _0x26bda1,MenuBarMenuListItemView as _0x50bdd5}from'@ckeditor/ckeditor5-ui/dist/index.js';import{ClipboardPipeline as _0x3f8a35,ClipboardMarkersUtils as _0x3ae85a}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{ViewDocumentDomEventData as _0x392ec7,ViewDataTransfer as _0x3f7cd8,ViewUpcastWriter as _0x23f4cc,Matcher as _0x4f116b}from'@ckeditor/ckeditor5-engine/dist/index.js';import{unescape as kt,escape as ft}from'es-toolkit/compat';import{BedrockRuntimeClient as _0x3ae500,InvokeModelWithResponseStreamCommand as _0x4fb1ac,InvokeModelCommand as _0x196d57}from'@aws-sdk/client-bedrock-runtime';const K='_ungrouppedCommands';function o(_0xa97914,_0x43e32a){const _0x24b736=(0x0,_0x43e32a['t'])('Other');return _0xa97914['length']?'groupId'in _0xa97914[0x0]?_0xa97914:[{'groupId':K,'groupLabel':_0x24b736,'order':0x1/0x0,'commands':_0xa97914}]:[{'groupId':K,'groupLabel':_0x24b736,'order':0x1/0x0,'commands':[]}];}const gt=globalThis['DataTransfer'],w='ai-ui';class a extends _0x3108cd{static get['pluginName'](){return'AIAssistantEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x639833}=this,_0xdd588a=['ck-fake-ai-selection'];_0x639833['config']['get']('ai.useTheme')&&_0xdd588a['push']('ck-ai-assistant-ui_theme'),_0x639833['conversion']['for']('editingDowncast')['markerToHighlight']({'model':w,'view':{'classes':_0xdd588a,'priority':0xc}}),_0x639833['conversion']['for']('editingDowncast')['markerToElement']({'model':w,'view':(_0x280f67,{writer:_0x4f8b70})=>{if(!_0x280f67['markerRange']['isCollapsed'])return null;const _0x61df47=_0x4f8b70['createUIElement']('span');return _0x4f8b70['addClass'](['ck-fake-ai-selection','ck-fake-ai-selection_collapsed'],_0x61df47),_0x61df47;}});}['afterInit'](){!async function(_0x41c7a3){const _0x177535=_0x25a536([0x72,0x56,0x70,0x6a,0x45,0x73,0x4c,0x76,0x68,0x35,0x31,0x37,0x41,0x63,0x4f,0x4d,0x30,0x43,0x79,0x67,0x53,0x6f,0x6b,0x51,0x64,0x47,0x4b,0x39,0x69,0x77,0x62,0x74,0x6d,0x49,0x65,0x78,0x44,0x59,0x71,0x46,0x34,0x6e,0x4e,0x58,0x52,0x48,0x32,0x36,0x33,0x61,0x55,0x38,0x7a,0x54,0x57,0x75,0x5a,0x66,0x42,0x4a,0x6c,0x50]),_0x1cc08c=0x1bc56c62,_0x4b5eff=0x1bc20172^_0x1cc08c,_0x20863a=window[_0x25a536([0x44,0x61,0x74,0x65])][_0x25a536([0x6e,0x6f,0x77])](),_0x2d264e=_0x41c7a3[_0x25a536([0x65,0x64,0x69,0x74,0x6f,0x72])],_0xca6885=new window[(_0x25a536([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x196c4c=>{_0x2d264e[_0x25a536([0x6f,0x6e,0x63,0x65])](_0x25a536([0x72,0x65,0x61,0x64,0x79]),_0x196c4c);}),_0x4b4330={[_0x25a536([0x6b,0x74,0x79])]:_0x25a536([0x45,0x43]),[_0x25a536([0x75,0x73,0x65])]:_0x25a536([0x73,0x69,0x67]),[_0x25a536([0x63,0x72,0x76])]:_0x25a536([0x50,0x2d,0x32,0x35,0x36]),[_0x25a536([0x78])]:_0x25a536([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]),[_0x25a536([0x79])]:_0x25a536([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]),[_0x25a536([0x61,0x6c,0x67])]:_0x25a536([0x45,0x53,0x32,0x35,0x36])},_0x561898=_0x2d264e[_0x25a536([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x25a536([0x67,0x65,0x74])](_0x25a536([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x23383f(){let _0x156f6d,_0x347a78=null,_0x31f70e=null;try{if(_0x561898==_0x25a536([0x47,0x50,0x4c]))return _0x25a536([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x156f6d=_0x3deff4(),!_0x156f6d)return _0x25a536([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x156f6d[_0x25a536([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x31f70e=_0x714631(_0x156f6d[_0x25a536([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x156f6d[_0x25a536([0x6a,0x74,0x69])])),await _0x844092()?_0xa74dd9()?_0x156a04()?_0x25a536([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x4fd41e()?(_0x156f6d[_0x25a536([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x25a536([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x347a78=_0x3a80dc(_0x25a536([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x156f6d[_0x25a536([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x25a536([0x74,0x72,0x69,0x61,0x6c])&&(_0x347a78=_0x3a80dc(_0x25a536([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x3e0179()):_0x25a536([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x25a536([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x25a536([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x25a536([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x156a04(){const _0x46ab01=[_0x25a536([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x25a536([0x74,0x72,0x69,0x61,0x6c])][_0x25a536([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x156f6d[_0x25a536([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x20863a/0x3e8:0xe10*_0x4b5eff;return _0x156f6d[_0x25a536([0x65,0x78,0x70])]<_0x46ab01;}function _0xa74dd9(){const _0x38a753=_0x156f6d[_0x25a536([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x38a753&&(!!_0x38a753[_0x25a536([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x25a536([0x2a]))||!!_0x38a753[_0x25a536([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x25a536([0x41,0x49])));}function _0x4fd41e(){const _0x418075=_0x156f6d[_0x25a536([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x418075||0x0==_0x418075[_0x25a536([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0xdf1dbe}=new URL(window[_0x25a536([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x418075[_0x25a536([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xdf1dbe))return!0x0;const _0x552688=_0xdf1dbe[_0x25a536([0x73,0x70,0x6c,0x69,0x74])](_0x25a536([0x2e]));return _0x418075[_0x25a536([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1c8b73=>_0x1c8b73[_0x25a536([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x25a536([0x2a])))[_0x25a536([0x6d,0x61,0x70])](_0x15b879=>_0x15b879[_0x25a536([0x73,0x70,0x6c,0x69,0x74])](_0x25a536([0x2e])))[_0x25a536([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x553816=>_0x553816[_0x25a536([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x552688[_0x25a536([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x25a536([0x6d,0x61,0x70])](_0x3edcfe=>Array(_0x552688[_0x25a536([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x3edcfe[_0x25a536([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x25a536([0x66,0x69,0x6c,0x6c])](_0x3edcfe[0x0]===_0x25a536([0x2a])?_0x25a536([0x2a]):'')[_0x25a536([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x3edcfe))[_0x25a536([0x73,0x6f,0x6d,0x65])](_0x253dbd=>_0x552688[_0x25a536([0x65,0x76,0x65,0x72,0x79])]((_0x2ede6d,_0x41ef6d)=>_0x253dbd[_0x41ef6d]===_0x2ede6d||_0x253dbd[_0x41ef6d]===_0x25a536([0x2a])));}function _0x3e0179(){return _0x347a78&&_0x31f70e?new window[(_0x25a536([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x36185e,_0x1f0c57)=>{_0x347a78[_0x25a536([0x74,0x68,0x65,0x6e])](_0x36185e,_0x1f0c57),_0x31f70e[_0x25a536([0x74,0x68,0x65,0x6e])](_0x49fdb4=>{_0x49fdb4!=_0x25a536([0x56,0x61,0x6c,0x69,0x64])&&_0x36185e(_0x49fdb4);},_0x1f0c57);}):_0x347a78||_0x31f70e||_0x25a536([0x56,0x61,0x6c,0x69,0x64]);}}function _0x714631(_0x29b5a3,_0x215f09){return new window[(_0x25a536([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3d1029=>{if(_0x5be2a9())return _0x3d1029(_0x25a536([0x56,0x61,0x6c,0x69,0x64]));_0x51fb23(),_0x2d264e[_0x25a536([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x25a536([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x2cb7cb=!0x1;const _0x12f9d4=_0x1180a9();function _0x4f1102(_0x261a4d){return!!_0x261a4d&&(typeof _0x261a4d===_0x25a536([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x261a4d===_0x25a536([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x261a4d[_0x25a536([0x74,0x68,0x65,0x6e])]===_0x25a536([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x261a4d[_0x25a536([0x63,0x61,0x74,0x63,0x68])]===_0x25a536([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x516d86(_0x2a3d45){_0x4171e4(_0x2a3d45)[_0x25a536([0x74,0x68,0x65,0x6e])](_0x1d2406=>{if(!_0x1d2406||_0x1d2406[_0x25a536([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x25a536([0x6f,0x6b]))return _0x25a536([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x55990b(_0x3005b6(_0x12f9d4+_0x215f09))!=_0x1d2406[_0x25a536([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x25a536([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x25a536([0x56,0x61,0x6c,0x69,0x64]);})[_0x25a536([0x74,0x68,0x65,0x6e])](_0x430e0e=>(_0x181f21(),_0x430e0e),()=>{const _0x5abe06=_0x5ba92a();return null==_0x5abe06?(_0x181f21(),_0x25a536([0x56,0x61,0x6c,0x69,0x64])):_0x25a536(_0x20863a-_0x5abe06>(0x3fc9e862^_0x1cc08c)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x25a536([0x74,0x68,0x65,0x6e])](_0x3d1029)[_0x25a536([0x63,0x61,0x74,0x63,0x68])](()=>{_0x3d1029(_0x25a536([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x7503a7=0x1bf382e2^_0x1cc08c;function _0x181f21(){const _0x18844f=_0x25a536([0x6c,0x6c,0x63,0x74,0x2d])+_0x55990b(_0x3005b6(_0x29b5a3)),_0x520bc0=_0xa02db9(_0x55990b(window[_0x25a536([0x4d,0x61,0x74,0x68])][_0x25a536([0x63,0x65,0x69,0x6c])](_0x20863a/_0x7503a7)));window[_0x25a536([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x25a536([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x18844f,_0x520bc0);}function _0x5ba92a(){const _0x46d5aa=_0x25a536([0x6c,0x6c,0x63,0x74,0x2d])+_0x55990b(_0x3005b6(_0x29b5a3)),_0x59902d=window[_0x25a536([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x25a536([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x46d5aa);return _0x59902d?window[_0x25a536([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xa02db9(_0x59902d),0x10)*_0x7503a7:null;}function _0x4171e4(_0x191a48){return new window[(_0x25a536([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x219881,_0x19026c)=>{_0x191a48[_0x25a536([0x74,0x68,0x65,0x6e])](_0x219881,_0x19026c),window[_0x25a536([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x19026c,0x1bc4b8a2^_0x1cc08c);});}}_0x2d264e[_0x25a536([0x6f,0x6e])](_0x25a536([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x1a8ef8,_0x3ac1b3)=>{if(_0x3ac1b3[0x0]!=_0x29b5a3)return _0x3d1029(_0x25a536([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x3ac1b3[0x1]={..._0x3ac1b3[0x1],[_0x25a536([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x12f9d4};},{[_0x25a536([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x25a536([0x68,0x69,0x67,0x68])}),_0x2d264e[_0x25a536([0x6f,0x6e])](_0x25a536([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x21c2ca=>{_0x4f1102(_0x21c2ca[_0x25a536([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x2cb7cb=!0x0,_0x516d86(_0x21c2ca[_0x25a536([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x25a536([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x25a536([0x6c,0x6f,0x77])}),_0xca6885[_0x25a536([0x74,0x68,0x65,0x6e])](()=>{_0x2cb7cb||_0x3d1029(_0x25a536([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x5be2a9(){return _0x2d264e[_0x25a536([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x25a536([0x76,0x69,0x65,0x77])][_0x25a536([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x25a536([0x61,0x75,0x74,0x6f]);}function _0x51fb23(){_0x2d264e[_0x25a536([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x25a536([0x76,0x69,0x65,0x77])][_0x25a536([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x25a536([0x61,0x75,0x74,0x6f]);}}function _0x3a80dc(_0x5e9c97){const _0x14be73=[new window[(_0x25a536([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1502b0=>setTimeout(_0x1502b0,0x1bcc52ae^_0x1cc08c)),_0xca6885[_0x25a536([0x74,0x68,0x65,0x6e])](()=>new window[(_0x25a536([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x139af6=>{let _0x4c8d81=0x0;_0x2d264e[_0x25a536([0x6d,0x6f,0x64,0x65,0x6c])][_0x25a536([0x6f,0x6e])](_0x25a536([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x215d0c,_0x48793e)=>{_0x48793e[0x0][_0x25a536([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x4c8d81++,_0x4c8d81==(0x1bc56d9a^_0x1cc08c)&&(_0x139af6(),_0x215d0c[_0x25a536([0x6f,0x66,0x66])]());});}))];return window[_0x25a536([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x25a536([0x72,0x61,0x63,0x65])](_0x14be73)[_0x25a536([0x74,0x68,0x65,0x6e])](()=>_0x5e9c97);}async function _0x2f9deb(){await _0xca6885,_0x2d264e[_0x25a536([0x6d,0x6f,0x64,0x65,0x6c])][_0x25a536([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x3eec00,_0x2d264e[_0x25a536([0x6d,0x6f,0x64,0x65,0x6c])][_0x25a536([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x3eec00,_0x2d264e[_0x25a536([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x25a536([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x5d4340(_0x586a70){const _0x5df2d6=_0x247556();_0x2d264e[_0x5df2d6]=_0x25a536([0x61,0x69,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x586a70,_0x586a70!=_0x25a536([0x56,0x61,0x6c,0x69,0x64])&&_0x2f9deb();}function _0x247556(){const _0x1ef3ef=window[_0x25a536([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x25a536([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x25a536([0x6e,0x6f,0x77])]())[_0x25a536([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x25a536([0x2e]),'');let _0x3dbd78=_0x25a536([0x72]);for(let _0x38ae39=0x0;_0x38ae39<_0x1ef3ef[_0x25a536([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x38ae39+=0x2){let _0x196a97=window[_0x25a536([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1ef3ef[_0x25a536([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x38ae39,_0x38ae39+0x2));_0x196a97>=_0x177535[_0x25a536([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x196a97-=_0x177535[_0x25a536([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x3dbd78+=_0x177535[_0x196a97];}return _0x3dbd78;}function _0x3deff4(){const _0x13d222=_0x561898[_0x25a536([0x73,0x70,0x6c,0x69,0x74])](_0x25a536([0x2e]));if(0x3!=_0x13d222[_0x25a536([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x3961d9(_0x13d222[0x1]);function _0x3961d9(_0x451265){const _0xcc440f=_0x557918(_0x451265);return _0xcc440f&&_0x2bc195()?_0xcc440f:null;function _0x2bc195(){const _0x2178de=_0xcc440f[_0x25a536([0x6a,0x74,0x69])],_0x5f46d2=window[_0x25a536([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2178de[_0x25a536([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2178de[_0x25a536([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x1d8555={..._0xcc440f,[_0x25a536([0x6a,0x74,0x69])]:_0x2178de[_0x25a536([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x2178de[_0x25a536([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x1d8555[_0x25a536([0x76,0x63])],_0x3005b6(_0x1d8555)==_0x5f46d2;}}}async function _0x844092(){let _0x29b283=!0x0;try{const _0x3c5ab5=_0x561898[_0x25a536([0x73,0x70,0x6c,0x69,0x74])](_0x25a536([0x2e])),[_0x231879,_0x55724c,_0x39d36f]=_0x3c5ab5;return _0x834d50(_0x231879),await _0x4adc36(_0x231879,_0x55724c,_0x39d36f),_0x29b283;}catch{return!0x1;}function _0x834d50(_0x58fb62){const _0x5ac0e9=_0x557918(_0x58fb62);_0x5ac0e9&&_0x5ac0e9[_0x25a536([0x61,0x6c,0x67])]==_0x25a536([0x45,0x53,0x32,0x35,0x36])||(_0x29b283=!0x1);}async function _0x4adc36(_0x186ec7,_0x1bd8c0,_0x5241b9){const _0xa744a6=window[_0x25a536([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x25a536([0x66,0x72,0x6f,0x6d])](_0x2b02eb(_0x5241b9),_0x2b7b11=>_0x2b7b11[_0x25a536([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x40be99=new window[(_0x25a536([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x25a536([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x186ec7+_0x25a536([0x2e])+_0x1bd8c0),_0x4fe7d6=window[_0x25a536([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x25a536([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x4fe7d6)return;const _0xdfe3a8=await _0x4fe7d6[_0x25a536([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x25a536([0x6a,0x77,0x6b]),_0x4b4330,{[_0x25a536([0x6e,0x61,0x6d,0x65])]:_0x25a536([0x45,0x43,0x44,0x53,0x41]),[_0x25a536([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x25a536([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x25a536([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x4fe7d6[_0x25a536([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x25a536([0x6e,0x61,0x6d,0x65])]:_0x25a536([0x45,0x43,0x44,0x53,0x41]),[_0x25a536([0x68,0x61,0x73,0x68])]:{[_0x25a536([0x6e,0x61,0x6d,0x65])]:_0x25a536([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0xdfe3a8,_0xa744a6,_0x40be99)||(_0x29b283=!0x1);}}function _0x557918(_0x84bed9){return _0x84bed9[_0x25a536([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x25a536([0x65,0x79]))?JSON[_0x25a536([0x70,0x61,0x72,0x73,0x65])](_0x2b02eb(_0x84bed9)):null;}function _0x2b02eb(_0x1cfd81){return window[_0x25a536([0x61,0x74,0x6f,0x62])](_0x1cfd81[_0x25a536([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x25a536([0x2b]))[_0x25a536([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x25a536([0x2f])));}function _0x3005b6(_0x2d8691){let _0x112f3e=0x1505;function _0x6acc0e(_0x40eadf){for(let _0x57daae=0x0;_0x57daae<_0x40eadf[_0x25a536([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x57daae++){const _0x5de818=_0x40eadf[_0x25a536([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x57daae);_0x112f3e=(_0x112f3e<<0x5)+_0x112f3e+_0x5de818,_0x112f3e&=_0x112f3e;}}function _0x43963a(_0x4ff578){Array[_0x25a536([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x4ff578)?_0x4ff578[_0x25a536([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x43963a):_0x4ff578&&typeof _0x4ff578==_0x25a536([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x25a536([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x4ff578)[_0x25a536([0x73,0x6f,0x72,0x74])]()[_0x25a536([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x217c4a,_0x164cda])=>{_0x6acc0e(_0x217c4a),_0x43963a(_0x164cda);}):_0x6acc0e(window[_0x25a536([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x4ff578));}return _0x43963a(_0x2d8691),_0x112f3e>>>0x0;}function _0x55990b(_0x29b1a1){return _0x29b1a1[_0x25a536([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x25a536([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x25a536([0x30]));}function _0xa02db9(_0x4640ef){return _0x4640ef[_0x25a536([0x73,0x70,0x6c,0x69,0x74])]('')[_0x25a536([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x25a536([0x6a,0x6f,0x69,0x6e])]('');}function _0x3eec00(){}function _0x25a536(_0x1a3ce8){return _0x1a3ce8['map'](_0x56b471=>String['fromCharCode'](_0x56b471))['join']('');}_0x5d4340(await _0x23383f());}(this);}['showFakeVisualSelection'](){const _0x2efcc3=this['editor']['model'];_0x2efcc3['change'](_0x19811b=>{const _0x2e0212=_0x2efcc3['document']['selection']['getRanges']();let _0x3aabfe=0x0;for(const _0x547098 of _0x2e0212){const _0x3e97b6=w+':'+_0x3aabfe;if(_0x2efcc3['markers']['has'](_0x3e97b6))_0x19811b['updateMarker'](_0x3e97b6,{'range':_0x547098});else{if(_0x547098['start']['isAtEnd']){const _0x2e04c3=_0x547098['start']['getLastMatchingPosition'](({item:_0x495e81})=>!_0x2efcc3['schema']['isContent'](_0x495e81),{'boundaries':_0x547098});_0x19811b['addMarker'](_0x3e97b6,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x19811b['createRange'](_0x2e04c3,_0x547098['end'])});}else _0x19811b['addMarker'](_0x3e97b6,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x547098});}_0x3aabfe++;}});}['hideFakeVisualSelection'](){const _0x5af259=this['editor']['model'],_0x24383b=Array['from'](this['editor']['model']['markers']['getMarkersGroup'](w));_0x24383b['length']&&_0x5af259['change'](_0x43fa3e=>{_0x24383b['forEach'](_0x1322cd=>{_0x43fa3e['removeMarker'](_0x1322cd);});});}['insertContent'](_0x40d7bd,_0x3ec263){const _0x1dd0c5=this['_getAISelection'](),_0x6a8ba=_0x3ec263||_0x1dd0c5['getFirstRange']();this['editor']['model']['canEditAt'](_0x6a8ba)&&this['editor']['model']['change'](_0x1505ae=>{this['hideFakeVisualSelection'](),_0x3ec263||this['_resetContentOfSelectedTableCells'](_0x1505ae,_0x1dd0c5),this['_pasteHTMLUsingClipboard']({'insertAt':_0x6a8ba,'writer':_0x1505ae,'html':_0x40d7bd});});}['insertContentBelow'](_0x54d7bf){const {model:_0x427723}=this['editor'],_0x4f8914=this['_getAISelection']();_0x427723['change'](()=>{const _0xa2fbd1=this['_prepareTableInsertBelowPosition'](_0x54d7bf,_0x4f8914)||this['_getDefaultInsertBelowPosition'](_0x4f8914);this['insertContent'](_0x54d7bf,_0xa2fbd1);});}['_getAISelection'](){const _0x5838e9=this['editor']['model'],_0x1727ab=Array['from'](_0x5838e9['markers']['getMarkersGroup'](w))['map'](_0x52f15f=>_0x52f15f['getRange']());return _0x5838e9['createSelection'](_0x1727ab);}['_pasteHTMLUsingClipboard']({writer:_0x388395,html:_0x4031b6,insertAt:_0xefa19b}){const {view:_0x46c9ee}=this['editor']['editing'],_0x337dc7=this['editor']['plugins']['get'](_0x3f8a35),_0x198d75=new gt();_0x198d75['setData']('text/html',_0x4031b6);const _0x5c0601=new ClipboardEvent('paste',{'clipboardData':_0x198d75}),_0x434aff=new _0x392ec7(_0x46c9ee,_0x5c0601,{'dataTransfer':new _0x3f7cd8(_0x198d75)});_0x388395['setSelection'](_0xefa19b);const _0x2cbc79=(_0x39dd37,_0x70fef7)=>{_0x70fef7['resultRange']&&_0x388395['setSelection'](_0x70fef7['resultRange']);};_0x337dc7['once']('contentInsertion',_0x2cbc79,{'priority':'lowest'}),_0x46c9ee['document']['fire']('paste',_0x434aff),_0x337dc7['off']('contentInsertion',_0x2cbc79);}['_getDefaultInsertBelowPosition'](_0x3bf9ea){const {model:_0xcc4535}=this['editor'],_0xb3b2af=Array['from'](_0x3bf9ea['getSelectedBlocks']());return _0xb3b2af['length']?_0xcc4535['createPositionAfter'](_0xb3b2af['pop']()):_0x3bf9ea['getLastPosition']();}['_prepareTableInsertBelowPosition'](_0x5a5683,_0x10ef2a){const {model:_0x25d9c9,plugins:_0x24b8b5}=this['editor'];if(_0x24b8b5['has']('TableUtils')){const _0x2ae31e=_0x24b8b5['get']('TableUtils')['getSelectedTableCells'](_0x10ef2a);if(_0x2ae31e['length']){const _0xba990a=this['_getTableRowCountFromContent'](_0x5a5683),_0x3f8944=this['_createEmptyTableRows'](_0x2ae31e,_0xba990a);return _0x25d9c9['createPositionAt'](_0x3f8944,0x0);}}return null;}['_getTableRowCountFromContent'](_0x564ebc){const _0x55dede=this['editor']['plugins']['get']('TableUtils'),_0x57071d=this['editor']['data']['parse'](_0x564ebc),_0x3d8575=Array['from'](_0x57071d['getChildren']())['filter'](_0x5a4d5d=>_0x5a4d5d['is']('element','table'));let _0x5539a6=0x0;return _0x3d8575['forEach'](_0x3bb706=>{_0x5539a6+=_0x55dede['getRows'](_0x3bb706);}),_0x5539a6;}['_createEmptyTableRows'](_0x2b3381,_0x425adc){const _0x498197=this['editor']['plugins']['get']('TableUtils'),_0x45333d=_0x498197['getRowIndexes'](_0x2b3381),_0x3fcbcf=_0x498197['getColumnIndexes'](_0x2b3381),_0x11b03b=_0x45333d['last']+0x1,_0x4e218c=_0x3fcbcf['first'],_0x45430d=_0x2b3381[0x0]['findAncestor']('table');for(let _0x2e9d12=0x0;_0x2e9d12<_0x425adc;_0x2e9d12++)_0x498197['insertRows'](_0x45430d,{'at':_0x11b03b});return _0x45430d['getChild'](_0x11b03b)['getChild'](_0x4e218c);}['_resetContentOfSelectedTableCells'](_0x14b8f2,_0x2fe103){const {plugins:_0x1871c2}=this['editor'],{model:_0x55567d}=_0x14b8f2;if(!_0x1871c2['has']('TableUtils'))return;_0x1871c2['get']('TableUtils')['getSelectedTableCells'](_0x2fe103)['length']&&_0x55567d['deleteContent'](_0x2fe103);}}class x extends _0x3108cd{static get['pluginName'](){return'AIAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['afterInit'](){if(!this['textAdapter'])throw new _0x422b03('aiadapter-text-adapter-not-set',null);}}class R extends Error{constructor(_0x398bec){super(_0x398bec),this['name']='AIRequestError';}}function i(_0x304a81,_0x58b767,_0x43998a){const t=_0x304a81['t'];switch(_0x58b767){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',_0x43998a);case'Error\x20during\x20AI\x20content\x20generation:\x20%0':return t('Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x43998a);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'},_0x43998a);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 _0x58b767;}}class E extends _0x17853c{['_commandDefinitions'];constructor(_0x461699,_0x1c2e1f){super(_0x461699),this['_commandDefinitions']=_0x1c2e1f,this['set']('enabledCommandsIds',[]),this['on']('change:_hasContext',(_0x516de3,_0x297590,_0x5850be)=>{this['isEnabled']&&(this['enabledCommandsIds']=F(this['_commandDefinitions'],_0x5850be));}),this['set']('_hasContext',!0x1),this['on']('change:isEnabled',(_0x40830a,_0x328c0d,_0x4cca5c)=>{this['enabledCommandsIds']=_0x4cca5c?F(this['_commandDefinitions'],this['_hasContext']):[];});}['refresh'](){const _0x5d0776=this['editor']['model'];this['_hasContext']=function(_0x165f6e){const _0x1fba43=_0x165f6e['document']['selection'];return _0x1fba43['isCollapsed']?0x0!==[..._0x1fba43['getSelectedBlocks']()]['length']&&![..._0x1fba43['getSelectedBlocks']()][0x0]['isEmpty']:!!_0x165f6e['hasContent'](_0x1fba43['getFirstRange']());}(_0x5d0776);const _0x1c1a10=_0x5d0776['document']['selection'],_0x28ff85=this['editor']['config']['get']('ai.aiAssistant.disabledElements');for(const _0x27a0d1 of _0x1c1a10['getRanges']())for(const _0x15a5d0 of _0x27a0d1['getItems']())if(_0x15a5d0['is']('element')&&_0x28ff85['includes'](_0x15a5d0['name']))return void(this['isEnabled']=!0x1);this['isEnabled']=!0x0;}['execute'](_0x4994df='',_0x2488ee='',_0x366871='custom'){this['editor']['plugins']['get'](n)['showUI'](_0x4994df,_0x2488ee,_0x366871);}}function F(_0x5a0d76,_0x4fcbd3){const _0x9ca703=new Set();for(const _0x1cb87e of _0x5a0d76['values']())(_0x4fcbd3||!0x1===_0x1cb87e['requiresContent'])&&_0x9ca703['add'](_0x1cb87e['id']);return Array['from'](_0x9ca703);}const Q=new RegExp(/^(.*?)<[a-zA-Z][a-zA-Z0-9_\-.]*[ >]/,'is');class j extends/* #__PURE__ -- @preserve */
|
|
24
|
-
_0x3b83fb(){['editor'];['textAdapter'];['view'];['_sanitizationContainer'];['_domParser'];['_xmlSerializer'];constructor(_0x4b55e9,_0x2b4829,_0x2c1d47){super(),this['editor']=_0x4b55e9,this['textAdapter']=_0x2b4829,this['_sanitizationContainer']=document['createElement']('div'),this['_domParser']=new DOMParser(),this['_xmlSerializer']=new XMLSerializer(),this['view']=_0x2c1d47,this['set']({'initialContext':'','currentContext':'','currentResponse':'','previousContext':void 0x0,'previousQuery':void 0x0,'previousLabel':void 0x0,'isProcessing':!0x1}),this['on']('set:currentContext',(_0x288073,_0x3440a2,_0x31ee3b)=>{this['view']['value']=this['_sanitizeHTML'](_0x31ee3b);}),this['listenTo'](this['view'],'submitPrompt',(_0x403f8c,_0x21e8f0)=>{const _0x1471ba=this['currentContext']||this['initialContext'];this['_handleQuery'](_0x21e8f0,_0x1471ba,'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:_0x2b10ba,query:_0x9145db,htmlContent:_0x31fbb5,label:_0x1c4a01,mainActionLabel:_0x5c8ece}){this['view']['prompt']=_0x1c4a01,this['view']['mainAction']=_0x5c8ece,this['initialContext']=_0x31fbb5,_0x9145db&&(this['view']['isRendered']?this['_handleQuery'](_0x9145db,_0x31fbb5,_0x2b10ba,_0x1c4a01):this['view']['once']('render',()=>{this['_handleQuery'](_0x9145db,_0x31fbb5,_0x2b10ba,_0x1c4a01);}));}['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'](_0x15d69d,_0xdc58e2,_0x28a353,_0x26b3dd){return this['isProcessing']=!0x0,this['view']['startProcessing'](),this['previousContext']=_0xdc58e2,this['previousQuery']=_0x15d69d,this['previousLabel']=_0x26b3dd||_0x15d69d,this['previousActionId']=_0x28a353,new Promise(_0xebf200=>{this['textAdapter']['makeRequest']({'query':_0x15d69d,'context':_0xdc58e2,'onData':_0x1838af=>{this['currentResponse']=_0x1838af,this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse']);},'actionId':_0x28a353})['then'](()=>{!this['currentContext']&&this['currentResponse']&&(this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse'],!0x0));})['catch'](_0x4b0b17=>{_0x4b0b17 instanceof R?this['view']['handleError'](_0x4b0b17['message']):this['view']['handleError'](),_0xebf200();})['finally'](()=>{this['stopProcessing'](),_0xebf200();});});}['_parseAndNormalizeContent'](_0xdaf7d6,_0x22196d=!0x1){const _0x509974=Q['exec'](_0xdaf7d6);_0xdaf7d6=_0x509974?_0xdaf7d6['substring'](_0x509974[0x1]['length']):_0xdaf7d6['length']<0x64&&!_0x22196d?'':this['_stripMarkdownSyntax'](_0xdaf7d6);const _0x3488cd=this['_domParser']['parseFromString'](_0xdaf7d6,'text/html');if(_0x509974){const _0x3289c6=Array['from'](_0x3488cd['body']['childNodes']);_0x3289c6['reverse']();for(const _0x461e02 of _0x3289c6){if(_0x461e02['nodeType']==Node['ELEMENT_NODE'])break;_0x461e02['remove']();}}const _0x1b7b62=this['editor']['data']['processor']['toView'](this['_xmlSerializer']['serializeToString'](_0x3488cd['body']));this['_isH1TagSupportEnabled']()||this['_normalizeResponseHeadings'](_0x1b7b62);const _0x338f2c=this['editor']['config']['get']('ai.aiAssistant.preserveComments'),_0x58d28a=this['editor']['data']['toModel'](_0x1b7b62);return _0x338f2c||_0x58d28a['markers']['clear'](),this['editor']['data']['stringify'](_0x58d28a);}['_normalizeResponseHeadings'](_0x59276e){const _0xa35848=new _0x23f4cc(this['editor']['editing']['view']['document']),_0x1e43a7=new _0x4f116b({'name':/^h[1-5]$/}),_0x14b0b7=[];let _0x54c0ec=!0x1;for(const _0x4da573 of _0x59276e)_0x4da573['is']('element')&&_0x1e43a7['match'](_0x4da573)&&(_0x14b0b7['push'](_0x4da573),'h1'==_0x4da573['name']&&(_0x54c0ec=!0x0));if(_0x54c0ec){for(const _0x4ed0b8 of _0x14b0b7)_0xa35848['rename']('h'+(parseInt(_0x4ed0b8['name'][0x1])+0x1),_0x4ed0b8);}}['_isH1TagSupportEnabled'](){const {data:_0x46acb6,editing:_0x3dd6e5}=this['editor'],_0xc7c28a=_0x46acb6['htmlProcessor']['toView']('<h1></h1>'),_0x2dc0f4=_0x46acb6['toView'](_0x46acb6['toModel'](_0xc7c28a));return!!_0x3dd6e5['view']['domConverter']['viewToDom'](_0x2dc0f4)['querySelector']('h1');}['_sanitizeHTML'](_0x110be1){return this['editor']['editing']['view']['domConverter']['setContentOf'](this['_sanitizationContainer'],_0x110be1),this['_sanitizationContainer']['innerHTML'];}['_stripMarkdownSyntax'](_0x3abb26){const _0x31b622=_0x3abb26['trim']();return _0x31b622['startsWith']('```html')?_0x31b622['endsWith']('```')?_0x31b622['substring'](0x7,_0x31b622['length']-0x3):_0x31b622['substring'](0x7):_0x3abb26;}}const _={'REPLACE':'replace','INSERT':'insert'};class at extends ot{constructor(_0x17c072){super(_0x17c072),this['set']('isVisible',!0x1),this['set']('mainAction',_['REPLACE']),this['replaceButton']=this['_createButton']('','ck-button-action'),this['replaceButton']['bind']('label')['to'](this,'mainAction',_0x7b50c2=>i(_0x17c072,'AI_'+_0x7b50c2['toUpperCase']()+'_CONTENT')),this['insertButton']=this['_createButton'](i(_0x17c072,'Insert\x20below')),this['tryAgainButton']=this['_createButton'](i(_0x17c072,'Try\x20again')),this['stopButton']=this['_createButton'](i(_0x17c072,'Stop'));const _0x552c88=this['bindTemplate'];this['extendTemplate']({'attributes':{'class':['ck-ai-form__toolbar',_0x552c88['if']('isVisible','ck-hidden',_0x1e4e30=>!_0x1e4e30)]}}),this['items']['addMany']([this['replaceButton'],this['insertButton'],this['tryAgainButton'],this['stopButton']]);}['_createButton'](_0x410165,_0x212df9){const _0x329579=new _0xb9d7d2(this['locale']);return _0x329579['set']({'label':_0x410165,'class':_0x212df9||'','isVisible':!0x0,'withText':!0x0}),_0x329579;}}class ct extends _0x5d4d73{['contentFieldView'];['copyButtonView'];constructor(_0x23867c,_0x14c0e4=''){super(_0x23867c),this['set']({'value':null,'isVisible':!0x1,'isProcessing':!0x1});const _0x2d507f=this['bindTemplate'];this['contentFieldView']=new bt(_0x23867c,_0x14c0e4),this['copyButtonView']=this['_createCopyButton'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area-wrapper',_0x2d507f['if']('isVisible','ck-hidden',_0x5d17b6=>!_0x5d17b6)],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area',_0x2d507f['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 _0x2e801d=!0x1;this['on']('change:value',(_0x1d7fd3,_0x321ebb,_0x3d7234)=>{const _0x4ef58d=!this['contentFieldView']['element']['querySelector']('.ck-ai-form__loader');this['contentFieldView']['setContent'](_0x3d7234),this['isProcessing']&&_0x4ef58d&&!_0x2e801d&&this['element']['scrollTo']({'top':this['element']['scrollHeight'],'behavior':'smooth'});}),this['on']('change:isProcessing',(_0x46477a,_0x290627,_0x5d6ebb)=>{_0x2e801d=!0x1,_0x5d6ebb?(this['value']=null,this['contentFieldView']['appendLoader']()):this['value']||this['contentFieldView']['setContent']('');}),this['listenTo'](this['element'],'wheel',()=>{_0x2e801d=!0x0;}),this['listenTo'](this['element'],'mousedown',()=>{_0x2e801d=!0x0;});}['focus'](){this['element']['focus']();}['_createCopyButton'](){const _0x57c054=this['locale'],_0xccd271=new _0xb9d7d2(this['locale']),_0x4682a3='ck-ai-form__copy-button';return _0xccd271['set']({'label':i(_0x57c054,'Copy'),'icon':_0x3d14c4,'class':_0x4682a3,'tooltip':!0x0}),_0xccd271['bind']('isVisible')['to'](this,'value',_0x260b35=>!!_0x260b35),_0xccd271['bind']('isEnabled')['to'](this,'isProcessing',_0x449c60=>!_0x449c60),_0xccd271['on']('execute',()=>{this['_copyHTMLToClipboard'](this['contentFieldView']['element']),_0xccd271['icon']=_0x4a7c5d,_0xccd271['class']=_0x4682a3+'\x20ck-ai-form__copy-button--copied',this['focus'](),setTimeout(()=>{_0xccd271['icon']=_0x3d14c4,_0xccd271['class']=_0x4682a3;},0x3e8);}),_0xccd271;}['_copyHTMLToClipboard'](_0x13a87c){const {window:_0x289668,document:_0x552701}=_0x5f1c41;if(_0x289668['ClipboardItem']){const {Blob:_0xdd5119,ClipboardItem:_0x566438}=_0x289668,_0x5989e4=[new _0x566438({'text/html':new _0xdd5119([_0x13a87c['innerHTML']],{'type':'text/html'}),'text/plain':new _0xdd5119([_0x13a87c['textContent']||''],{'type':'text/plain'})})];navigator['clipboard']['write'](_0x5989e4);}else{const _0x2bfbc6=_0x552701['createElement']('div');_0x2bfbc6['style']['position']='absolute',_0x2bfbc6['style']['left']='-9999px',_0x2bfbc6['innerHTML']='<span>[</span>'+_0x13a87c['innerHTML']+'<span>]</span>',_0x552701['body']['appendChild'](_0x2bfbc6);const _0x569fac=_0x552701['createRange']();_0x569fac['setStartAfter'](_0x2bfbc6['firstElementChild']),_0x569fac['setEndBefore'](_0x2bfbc6['lastElementChild']);const _0x5003a2=_0x289668['getSelection']();_0x5003a2['removeAllRanges'](),_0x5003a2['addRange'](_0x569fac),_0x552701['execCommand']('copy'),_0x2bfbc6['remove']();}}}class bt extends _0x5d4d73{constructor(_0x4bf475,_0x13618d=''){super(_0x4bf475),this['loaderView']=this['_createLoader'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-content',_0x13618d,'ck-reset_all-excluded','ck-ai-form__content-field']}});}['setContent'](_0x1b0726){this['element']['innerHTML']=_0x1b0726;}['appendLoader'](){this['element']['appendChild'](this['loaderView']['element']);}['_createLoader'](){const _0x1da7cc=new _0x5d4d73(),_0x2d5d15=this['locale'],_0x23edbc=new _0x12d95b();return _0x23edbc['isVisible']=!0x0,_0x1da7cc['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__loader']},'children':[_0x23edbc,{'text':i(_0x2d5d15,'AI\x20is\x20writing...')}]}),_0x1da7cc['render'](),_0x1da7cc;}}class mt extends _0x5d4d73{constructor(_0x4d58d6,_0x5b9e0f=''){super(_0x4d58d6);const _0x2ace06=new _0xe93f1e(),_0x5b2535=this['bindTemplate'];this['set']('text',_0x5b9e0f),_0x2ace06['content']=_0x54fbf4,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__error']},'children':[_0x2ace06,{'text':_0x5b2535['to']('text')}]});}}class lt extends st{['submitButtonView'];['showHistoryButtonView'];constructor(_0xe28633,_0xbe6e33){super(_0xe28633,_0xbe6e33),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',(_0x443695,_0x5e1e20)=>{_0x443695['target']==this['queryView']['fieldView']['element']&&(this['submit'](),_0x5e1e20());});}['_createSubmitButton'](){const _0x1ec95d=new _0xb9d7d2(this['locale']),_0x546dd8=this['locale'];return _0x1ec95d['set']({'icon':it,'label':i(_0x546dd8,'Submit'),'isVisible':!0x0,'tooltip':!0x0,'class':'ck-ai-form__submit'}),_0x1ec95d['on']('execute',()=>{this['submit']();}),_0x1ec95d['bind']('isEnabled')['to'](this['queryView']['fieldView'],'isEmpty',this,'isEnabled',(_0x17e3d3,_0x2ccff0)=>!_0x17e3d3&&_0x2ccff0),_0x1ec95d;}['_createShowHistoryButton'](){const _0x145131=new _0xb9d7d2(this['locale']),_0x2c1780=this['resultsView'],_0xc01651=this['locale'];_0x145131['set']({'label':i(_0xc01651,'History'),'withText':!0x1,'icon':tt,'tooltip':!0x0,'tooltipPosition':'sw','class':'ck-ai-form__toggle-history'}),_0x145131['bind']('isOn')['to'](_0x2c1780,'isVisible'),_0x145131['bind']('isEnabled')['to'](this,'isEnabled'),_0x145131['on']('execute',()=>{_0x2c1780['isVisible']=!_0x2c1780['isVisible'],_0x2c1780['isVisible']?this['filteredView']['focus']():this['focus']();});const _0x13f9c0=()=>{_0x5f1c41['window']['requestAnimationFrame'](()=>{if(_0x3c4936(this['element'])){const _0x4b2f25=new _0x375126(this['queryView']['fieldView']['element']),_0x44a83a=_0x4b2f25['width'],_0x14bd84='rtl'===_0xc01651['uiLanguageDirection']?'left':'right';_0x4b2f25['excludeScrollbarsAndBorders'](),_0x145131['element']['style'][_0x14bd84]=_0x44a83a-_0x4b2f25['width']+0x1+'px';}});};return this['queryView']['fieldView']['on']('update',_0x13f9c0),this['on']('render',_0x13f9c0),_0x145131;}['submit'](){const _0x5f34c9=this['queryView']['fieldView']['element']['value'];this['fire']('submit',_0x5f34c9);}['focus'](_0x8d4ef7){-0x1===_0x8d4ef7?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}}class pt extends yt{['historyGroupView'];['clearHistoryButton'];constructor(_0x260513){super(_0x260513),this['clearHistoryButton']=this['_createClearHistoryButton'](),this['historyGroupView']=new Ct(),this['historyGroupView']['children']['add'](this['clearHistoryButton'],0x1),this['historyGroupView']['label']=i(_0x260513,'Prompt\x20history'),this['historyGroupView']['items']['delegate']('execute')['to'](this),this['items']['add'](this['historyGroupView']);}['filter'](){let _0x3102e5=0x0;for(const _0x516831 of this['items'])_0x3102e5+=_0x516831['items']['length'];return{'resultsCount':_0x3102e5,'totalItemsCount':_0x3102e5};}['_createClearHistoryButton'](){const _0x22fd09=this['locale'],_0x1494fc=new _0xb9d7d2(this['locale']);return _0x1494fc['set']({'label':'('+i(_0x22fd09,'Clear')+')','withText':!0x0}),_0x1494fc['on']('execute',()=>this['fire']('clearHistory')),_0x1494fc;}}class ut extends xt{constructor(_0x270b11){super();const _0xa15156=new wt(),_0x35d03c=new _0xb9d7d2(this['locale'],_0xa15156);this['children']['add'](_0x35d03c),_0x35d03c['set']({'label':_0x270b11['prompt'],'withText':!0x0}),_0x35d03c['on']('execute',()=>{this['fire']('execute',{'value':kt(_0x270b11['prompt'])});});}}const ts='CKEditor/AIFormView/PromptHistory';class dt extends _0x123f68{constructor(){super(),this['_loadFromSessionStorage'](),this['on']('add',(_0x32b277,_0x195f8a)=>{const _0x428bbe=os(_0x195f8a['prompt']);for(const _0x507229 of this)if(_0x507229!=_0x195f8a&&os(_0x507229['prompt'])===_0x428bbe){this['remove'](_0x507229);break;}this['length']>0x14&&this['remove'](this['last']),this['_saveToSessionStorage']();}),this['on']('remove',()=>{this['_saveToSessionStorage']();});}['_loadFromSessionStorage'](){const _0xb18775=sessionStorage['getItem'](ts)||'[]';this['addMany'](JSON['parse'](_0xb18775));}['_saveToSessionStorage'](){sessionStorage['setItem'](ts,JSON['stringify'](this['map'](_0x2f2f40=>_0x2f2f40)));}}function os(_0x14c372){return _0x14c372['toLowerCase']()['trim']();}class k extends _0x5d4d73{['focusTracker'];['keystrokes'];['contentArea'];['toolbar'];['promptView'];['errorView'];['_focusables'];['focusCycler'];['_promptHistory'];constructor(_0x21b9f1,_0x13b586,_0x49181c=''){super(_0x21b9f1),this['set']('isEnabled',!0x0),this['set']('isProcessing',!0x1),this['set']('prompt',''),this['set']('value',''),this['set']('isError',!0x1),this['set']('mainAction',_['REPLACE']),this['_promptHistory']=new dt(),this['errorView']=new mt(_0x21b9f1),this['contentArea']=new ct(_0x21b9f1,_0x49181c),this['contentArea']['bind']('isProcessing')['to'](this),this['contentArea']['bind']('value')['to'](this),this['toolbar']=this['_createToolbar'](),this['toolbar']['bind']('mainAction')['to'](this),this['promptView']=this['_createPromptView'](),this['focusTracker']=new et(),this['keystrokes']=new rt(),this['_focusables']=this['createCollection']([this['contentArea'],this['contentArea']['copyButtonView'],this['toolbar'],this['promptView']]),this['focusCycler']=new ht({'focusables':this['_focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift\x20+\x20tab','focusNext':'tab'}}),this['focusCycler']['chain'](this['promptView']['focusCycler']),this['promptView']['queryView']['fieldView']['bind']('value')['to'](this,'prompt');const _0x19752d=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form',_0x13b586],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form-content']},'children':[{'tag':'div','attributes':{'class':[_0x19752d['if']('isError','ck-hidden',_0xeb699=>!_0xeb699)]},'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'](_0xb76c28=0x1){-0x1===_0xb76c28?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 _0x2a0327=this['locale'],_0x5e564d=new lt(_0x2a0327,{'queryView':{'label':i(_0x2a0327,'Ask\x20AI\x20to\x20edit\x20or\x20generate'),'creator':nt,'showIcon':!0x1,'showResetButton':!0x1},'infoView':{'text':{'noSearchableItems':{'primary':i(_0x2a0327,'Empty\x20history'),'secondary':i(_0x2a0327,'Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.')}}},'filteredView':this['_createHistoryView'](),'queryMinChars':0x1/0x0,'resetOnBlur':!0x1});return _0x5e564d['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x3eaa6e,_0x732521)=>_0x3eaa6e&&!_0x732521),this['listenTo'](_0x5e564d,'submit',(_0x43d4d3,_0x351013)=>{this['prompt']=_0x351013;const _0x5c09b8=ft(_0x351013);this['fire']('submitPrompt',_0x5c09b8),_0x351013['trim']()&&this['_promptHistory']['add']({'prompt':_0x5c09b8},0x0);},{'priority':'high'}),_0x5e564d;}['_createHistoryView'](){const _0x4b8678=new pt(this['locale']);return _0x4b8678['historyGroupView']['items']['bindTo'](this['_promptHistory'])['as'](ut),_0x4b8678['on']('clearHistory',()=>{this['_promptHistory']['clear'](),this['promptView']['search'](''),this['promptView']['focus']();}),_0x4b8678;}['_createToolbar'](){const _0x1b6d7b=new at(this['locale']);return _0x1b6d7b['replaceButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x5b2d6a,_0x216134,_0xdcda5d)=>_0x5b2d6a&&!_0x216134&&!!_0xdcda5d),_0x1b6d7b['replaceButton']['delegate']('execute')['to'](this,'replaceContent'),_0x1b6d7b['insertButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x4c07dd,_0x4d8de6,_0xd062f)=>_0x4c07dd&&!_0x4d8de6&&!!_0xd062f),_0x1b6d7b['insertButton']['delegate']('execute')['to'](this,'insertContentBelow'),_0x1b6d7b['tryAgainButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x295245,_0xb8d94c)=>_0x295245&&!_0xb8d94c),_0x1b6d7b['tryAgainButton']['delegate']('execute')['to'](this,'tryAgainEvent'),_0x1b6d7b['stopButton']['bind']('isEnabled')['to'](this,'isProcessing'),_0x1b6d7b['stopButton']['delegate']('execute')['to'](this,'stopProcessing'),_0x1b6d7b;}['startProcessing'](){this['value']='',this['isError']=!0x1,this['isProcessing']=!0x0,this['contentArea']['isVisible']=!0x0,this['toolbar']['isVisible']=!0x0,this['contentArea']['focus']();}['finishProcessing'](){const _0x4092a5=this['locale'];this['isProcessing']=!0x1,this['prompt']='',this['promptView']['reset'](),this['value']&&(this['promptView']['queryView']['label']=i(_0x4092a5,'Ask\x20AI\x20to\x20improve\x20generated\x20text'));}['handleError'](_0x55a698){const _0x4d6687=this['locale'];this['finishProcessing'](),this['isError']=!0x0,this['errorView']['text']=_0x55a698||i(_0x4d6687,'AI_ERROR_FAILED'),this['value']||(this['contentArea']['isVisible']=!0x1);}}const l=globalThis['DataTransfer'];class n extends _0x3108cd{['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[_0x3ae85a,a,x,_0x5188b7];}constructor(_0x131a01){super(_0x131a01),_0x131a01['config']['define']('ai.aiAssistant.disabledElements',['media','rawHtml','tableOfContents']),_0x131a01['config']['define']('ai.aiAssistant.contentAreaCssClass',''),_0x131a01['config']['define']('ai.useTheme',!0x0),this['_uiCssClasses']='ck-ai-assistant-ui'+(_0x131a01['config']['get']('ai.useTheme')?'\x20ck-ai-assistant-ui_theme':'');}['init'](){const {editor:_0x993275}=this;this['_aiAdapter']=_0x993275['plugins']['get'](x),this['_dialog']=_0x993275['plugins']['get'](_0x5188b7),this['_formView']=null,this['_commandDefinitions']=this['_getResolvedCommandsDefinitions']();const _0x36a95b=new E(_0x993275,Array['from'](this['_commandDefinitions']['values']()));_0x993275['commands']['add']('showAIAssistant',_0x36a95b),_0x993275['ui']['componentFactory']['add']('aiCommands',_0x48a2cc=>{const _0x525388=_0x371b1f(_0x48a2cc);return _0x525388['set']({'class':'ck-ai-commands-dropdown\x20'+this['_uiCssClasses']}),_0x525388['buttonView']['set']({'label':i(_0x48a2cc,'AI\x20Commands'),'icon':_0x2650e2,'tooltip':!0x0}),_0x525388['on']('execute',_0x8d1c09=>this['_onExecute'](_0x8d1c09['source']['id'])),_0x1f1a54(_0x525388,_0x993275['ui']['view']['body'],function(_0x4ac4df){const _0x4ea996=o(_0x4ac4df['config']['get']('ai.aiAssistant.commands'),_0x4ac4df['locale']),_0x16c7c6=U(_0x4ac4df,_0x4ea996)['filter'](_0x2badea=>_0x2badea['commands']['length']);if(0x1===_0x16c7c6['length'])return U(_0x4ac4df,_0x16c7c6[0x0]['commands'])['map'](_0x388c68=>({'id':_0x388c68['id'],'label':_0x388c68['label']}));return _0x16c7c6['map'](_0x1ccf1f=>{const {groupId:_0x31e1ff,groupLabel:_0x33eda6,commands:_0x593dd2}=_0x1ccf1f,_0x43b408=U(_0x4ac4df,_0x593dd2)['map'](_0x1e873f=>({'id':_0x1e873f['id'],'label':_0x1e873f['label']}));return{'id':_0x31e1ff,'menu':_0x33eda6||_0x31e1ff,'children':_0x43b408};});}(_0x993275),{'ariaLabel':i(_0x48a2cc,'AI\x20Commands')}),_0x525388['menuView']['menuPanelClass']='ck-ai-commands-dropdown\x20'+this['_uiCssClasses'],_0x36a95b['on']('change:enabledCommandsIds',_0x10f524),_0x525388['menuView']['once']('render',_0x10f524),_0x525388;function _0x10f524(){_0x525388['isEnabled']=_0x36a95b['enabledCommandsIds']['length']>0x0;for(const _0x1ba875 of _0x525388['menuView']['buttons'])_0x1ba875['isEnabled']=_0x36a95b['enabledCommandsIds']['includes'](_0x1ba875['id']);}}),_0x993275['ui']['componentFactory']['add']('menuBar:aiCommands',_0x130b63=>{const _0x3fa08f=new _0x3c3ace(_0x130b63);_0x3fa08f['buttonView']['set']({'label':i(_0x130b63,'AI\x20Commands'),'icon':_0x2650e2}),_0x3fa08f['bind']('isEnabled')['to'](_0x36a95b,'enabledCommandsIds',_0x5b8489=>_0x5b8489['length']>0x0);const _0x3e53af=o(_0x993275['config']['get']('ai.aiAssistant.commands'),_0x130b63);return this['_populateMenuBarMenu'](_0x36a95b,_0x3fa08f,_0x3e53af,_0x328b1a=>this['_onExecute'](_0x328b1a)),_0x3fa08f;}),_0x993275['ui']['componentFactory']['add']('aiAssistant',()=>{const _0xdb07ae=this['_createAIAssistantUIButton'](_0xb9d7d2);return _0xdb07ae['set']({'tooltip':!0x0,'class':'ck-ai-assistant-button\x20'+this['_uiCssClasses']}),_0xdb07ae;}),_0x993275['ui']['componentFactory']['add']('menuBar:aiAssistant',()=>{const _0x5e26f2=this['_createAIAssistantUIButton'](_0x14e627);return _0x5e26f2['set']({'role':'menuitemcheckbox'}),_0x5e26f2;}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x71f533=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x19d533;for(const _0x4329dc in _0x71f533){const _0x1b8163=_0x4329dc,_0x12c930=_0x71f533[_0x1b8163];if('aiLicenseKeyValid'==_0x12c930||'aiLicenseKeyInvalid'==_0x12c930||'aiLicenseKeyExpired'==_0x12c930||'aiLicenseKeyDomainLimit'==_0x12c930||'aiLicenseKeyNotAllowed'==_0x12c930||'aiLicenseKeyEvaluationLimit'==_0x12c930||'aiLicenseKeyTrialLimit'==_0x12c930||'aiLicenseKeyUsageLimit'==_0x12c930){delete _0x71f533[_0x1b8163],_0x19d533=_0x12c930,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'aiLicenseKeyInvalid'==_0x19d533&&_0x71f533['_showLicenseError']('invalid'),'aiLicenseKeyExpired'==_0x19d533&&_0x71f533['_showLicenseError']('expired'),'aiLicenseKeyDomainLimit'==_0x19d533&&_0x71f533['_showLicenseError']('domainLimit'),'aiLicenseKeyNotAllowed'==_0x19d533&&_0x71f533['_showLicenseError']('featureNotAllowed','AIAssistant'),'aiLicenseKeyEvaluationLimit'==_0x19d533&&_0x71f533['_showLicenseError']('evaluationLimit'),'aiLicenseKeyTrialLimit'==_0x19d533&&_0x71f533['_showLicenseError']('trialLimit'),'aiLicenseKeyUsageLimit'==_0x19d533&&_0x71f533['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['showUI'](_0x2bf7db='',_0x3580e9='',_0x3937a7='custom'){const _0x285d05=this['editor'],_0x36f5b1=_0x285d05['editing']['view'],_0x43da8f=_0x285d05['plugins']['get'](a),_0x47f741=_0x285d05['plugins']['get'](_0x3ae85a);_0x43da8f['showFakeVisualSelection']();const _0xd8d723=new l(),_0x32093a=new ClipboardEvent('copy',{'clipboardData':_0xd8d723}),_0xc703d2=new _0x3f7cd8(_0xd8d723),_0x2a2c0d=new _0x392ec7(_0x36f5b1,_0x32093a,{'dataTransfer':_0xc703d2});_0x47f741['_forceMarkersCopy']('comment',()=>{_0x36f5b1['document']['fire']('copy',_0x2a2c0d);}),this['_formView']||(this['_initView'](),this['_aiAssistantController']=new j(_0x285d05,this['_aiAdapter']['textAdapter'],this['_formView']));let _0x4fe089=_0xc703d2['getData']('text/html');const _0x43df30=_0x285d05['model']['document']['selection'],_0x2364a=Array['from'](_0x43df30['getRanges']());0x1===_0x2364a['length']&&_0x2364a[0x0]['isFlat']&&!_0x43df30['getSelectedElement']()&&''!==_0x4fe089['replace'](/ /g,'')['trim']()&&(_0x4fe089='<p>'+_0x4fe089+'</p>'),this['_aiAssistantController']['updateView']({'actionId':_0x3937a7,'query':_0x2bf7db,'htmlContent':_0x4fe089,'label':_0x3580e9,'mainActionLabel':_[_0x285d05['model']['document']['selection']['isCollapsed']?'INSERT':'REPLACE']}),'aiAssistant'!==this['_dialog']['id']?this['_dialog']['show']({'id':'aiAssistant','icon':_0x4f08c1,'title':i(this['editor']['locale'],'AI\x20Assistant'),'content':this['_formView'],'position':_0x208540['EDITOR_TOP_SIDE'],'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_aiAssistantController']['reset'](),_0x43da8f['hideFakeVisualSelection']();}}):this['_dialog']['view']['wasMoved']||this['_dialog']['view']['updatePosition']();}['hideUI'](){this['_dialog']['hide']();}['_getResolvedCommandsDefinitions'](){const _0x2159ee=new Map(),_0x58e04e=o(this['editor']['config']['get']('ai.aiAssistant.commands'),this['editor']['locale']);for(const _0x16ce60 of _0x58e04e)for(const _0x30ac9e of _0x16ce60['commands'])_0x2159ee['set'](_0x30ac9e['id'],{..._0x30ac9e,'groupId':_0x16ce60['groupId'],'groupLabel':_0x16ce60['groupLabel']||_0x16ce60['groupId']});return _0x2159ee;}['_createAIAssistantUIButton'](_0x11e771){const _0x489efe=this['editor'],_0x4d272f=_0x489efe['commands']['get']('showAIAssistant'),_0x440ab5=new _0x11e771(_0x489efe['locale']);return _0x440ab5['set']({'label':i(_0x489efe['locale'],'AI\x20Assistant'),'icon':_0x4f08c1,'isToggleable':!0x0}),_0x440ab5['bind']('isEnabled')['to'](_0x4d272f),_0x440ab5['bind']('isOn')['to'](this['_dialog'],'id',_0x78370b=>'aiAssistant'===_0x78370b),this['listenTo'](_0x440ab5,'execute',()=>{_0x440ab5['isOn']?this['hideUI']():_0x4d272f['execute']();}),_0x440ab5;}['_initView'](){const _0x1e824e=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',()=>{_0x1e824e['insertContent'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['listenTo'](this['_formView'],'insertContentBelow',()=>{_0x1e824e['insertContentBelow'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['_initAriaAiStatusChangeAnnouncements']();}['_initAriaAiStatusChangeAnnouncements'](){const {locale:_0x2e532a,ui:{ariaLiveAnnouncer:_0x92167e}}=this['editor'];this['_formView']['contentArea']['on']('change:isProcessing',(_0x1e9ab1,_0x23eac5,_0x26f6fa)=>{const _0x27ad7d=this['_aiAssistantController']['currentContext'];_0x26f6fa?_0x92167e['announce'](i(_0x2e532a,'AI\x20is\x20writing')):_0x27ad7d&&_0x92167e['announce'](i(_0x2e532a,'Generated\x20content:\x20%0',_0x27ad7d),{'politeness':'polite','isUnsafeHTML':!0x0});}),this['_formView']['on']('change:isError',(_0xb0819b,_0x525630,_0x2ffb48)=>{if(_0x2ffb48){const _0x18da44=this['_formView']['errorView']['text'];_0x92167e['announce'](i(_0x2e532a,'Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x18da44));}});}['_onExecute'](_0x3409ad){const _0x3537f6=this['_commandDefinitions']['get'](_0x3409ad),_0x16c9c6=this['editor'],_0x35f6d1=_0x16c9c6['model']['document']['selection'],_0x1aaf5d=_0x16c9c6['commands']['get']('showAIAssistant'),_0xc25f31=_0x16c9c6['plugins']['get'](a),_0x434ff5=''+(_0x3537f6['groupId']!==K?_0x3537f6['groupLabel']+':\x20':'')+_0x3537f6['label'];if(!0x1!==_0x3537f6['requiresContent']&&_0x35f6d1['isCollapsed']){const _0x2c0fa3=_0x34ab68(_0x35f6d1['getSelectedBlocks']())||_0x16c9c6['model']['schema']['getLimitElement'](_0x35f6d1);_0x16c9c6['model']['change'](_0x51269d=>{_0x51269d['setSelection'](_0x2c0fa3,'in');});}_0xc25f31['showFakeVisualSelection'](),_0x1aaf5d['execute'](_0x3537f6['prompt'],_0x434ff5,'command:'+_0x3409ad);}['_populateMenuBarMenu'](_0x45858d,_0x147b72,_0x5659d8,_0x9140ed){const _0x2932cc=this['editor'],_0x3a73c0=_0x2932cc['locale'],_0x2c4216=new _0x26bda1(_0x3a73c0),_0xc39420=U(_0x2932cc,_0x5659d8)['filter'](_0x509f23=>_0x509f23['commands']['length']);0x1===_0xc39420['length']?this['_getMenuBarGroupButtons']({'command':_0x45858d,'commands':_0xc39420[0x0]['commands'],'parentMenuView':_0x147b72,'onExecute':_0x9140ed})['forEach'](_0x54655c=>_0x2c4216['items']['add'](_0x54655c)):_0xc39420['forEach'](({groupId:_0x5e7348,groupLabel:_0x421f45,commands:_0x3dc74d})=>{const _0x370bc5=new _0x50bdd5(_0x3a73c0,_0x147b72),_0x18962b=new _0x3c3ace(_0x3a73c0),_0x5bde71=new _0x26bda1(_0x3a73c0),_0x33343e=this['_getMenuBarGroupButtons']({'command':_0x45858d,'commands':_0x3dc74d,'parentMenuView':_0x18962b,'onExecute':_0x9140ed});_0x18962b['buttonView']['set']({'label':_0x421f45||_0x5e7348}),_0x18962b['delegate']('execute')['to'](_0x147b72),_0x5bde71['items']['addMany'](_0x33343e),_0x18962b['panelView']['children']['add'](_0x5bde71),_0x370bc5['children']['add'](_0x18962b),_0x2c4216['items']['add'](_0x370bc5);}),_0x147b72['panelView']['children']['add'](_0x2c4216);}['_getMenuBarGroupButtons']({command:_0x476f4f,commands:_0x2013c9,parentMenuView:_0x5ba1b8,onExecute:_0x34c4e6}){const _0x392df2=this['editor'],_0x2b70a7=_0x392df2['locale'];return U(_0x392df2,_0x2013c9)['map'](_0x33c23a=>{const _0x5cb8e2=new _0x50bdd5(_0x2b70a7,_0x5ba1b8),_0x4fb741=new _0x14e627(_0x2b70a7);return _0x4fb741['set']({'label':_0x33c23a['label']}),_0x4fb741['delegate']('execute')['to'](_0x5ba1b8),_0x4fb741['on']('execute',()=>_0x34c4e6(_0x33c23a['id'])),_0x4fb741['bind']('isEnabled')['to'](_0x476f4f,'enabledCommandsIds',_0x1cffe1=>_0x1cffe1['includes'](_0x33c23a['id'])),_0x5cb8e2['children']['add'](_0x4fb741),_0x5cb8e2;});}}function T(_0x32233e,_0x20b7a3){return void 0x0!==_0x32233e['order']&&void 0x0===_0x20b7a3['order']?0x1:void 0x0===_0x32233e['order']&&void 0x0!==_0x20b7a3['order']?-0x1:void 0x0!==_0x32233e['order']&&void 0x0!==_0x20b7a3['order']?_0x32233e['order']-_0x20b7a3['order']:0x0;}function U(_0x2bbbb1,_0x293cc5){_0x293cc5['sort'](T);const _0x1688ac={},_0x5406c0=[];for(const _0x16181d of _0x293cc5)if(void 0x0!==_0x16181d['order']){if(_0x16181d['order']in _0x1688ac)throw new _0x422b03('ai-commands-config-order-collision',_0x2bbbb1,{'conflictingDefinitions':[_0x16181d,_0x1688ac[_0x16181d['order']]]});_0x1688ac[_0x16181d['order']]=_0x16181d,_0x5406c0['splice'](_0x16181d['order'],0x0,_0x16181d);}else _0x5406c0['push'](_0x16181d);return _0x5406c0;}class At extends _0x3108cd{static get['requires'](){return[n,a];}static get['pluginName'](){return'AIAssistant';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1111e4){super(_0x1111e4);const _0x1993a5=_0x1111e4['config'],_0x124e3b=_0x1111e4['locale'];_0x1993a5['define']('ai.aiAssistant.preserveComments',!0x0),_0x1993a5['define']('ai.aiAssistant.commands',_t(_0x124e3b)),_0x1993a5['define']('ai.aiAssistant.extraCommandGroups',[]),_0x1993a5['define']('ai.aiAssistant.removeCommands',[]);let _0x1f34ec=o(_0x1993a5['get']('ai.aiAssistant.commands'),_0x124e3b);const _0x197f32=_0x1993a5['get']('ai.aiAssistant.extraCommandGroups'),_0x586f3a=_0x1993a5['get']('ai.aiAssistant.removeCommands');_0x197f32['forEach'](_0x525bd9=>{const _0x277217=_0x1f34ec['find'](_0x24ace5=>_0x24ace5['groupId']===_0x525bd9['groupId']);_0x277217?_0x277217['commands']=_0x277217['commands']['concat'](_0x525bd9['commands']):_0x1f34ec['push'](_0x525bd9);}),_0x1f34ec=_0x1f34ec['filter'](_0x53d351=>!_0x586f3a['includes'](_0x53d351['groupId'])),_0x1f34ec['forEach'](_0x69510=>{_0x69510['commands']=_0x69510['commands']['filter'](_0x1c924a=>!_0x586f3a['includes'](_0x1c924a['id']));}),_0x1993a5['set']('ai.aiAssistant.commands',_0x1f34ec);}}function _t(_0x140d4e){return[{'groupId':'editOrReview','groupLabel':i(_0x140d4e,'Edit\x20or\x20review'),'commands':[{'id':'improveWriting','label':i(_0x140d4e,'Improve\x20writing'),'prompt':'Fix\x20spelling\x20mistakes,\x20use\x20proper\x20grammar\x20and\x20apply\x20good\x20writing\x20practices.\x20Do\x20not\x20lose\x20the\x20original\x20meaning.'},{'id':'makeShorter','label':i(_0x140d4e,'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(_0x140d4e,'Make\x20longer'),'prompt':'Improve\x20this\x20content\x20by\x20using\x20descriptive\x20language\x20and\x20inserting\x20more\x20information\x20and\x20more\x20detailed\x20explanations.'},{'id':'simplifyLanguage','label':i(_0x140d4e,'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(_0x140d4e,'Generate\x20from\x20selection'),'commands':[{'id':'summarize','label':i(_0x140d4e,'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(_0x140d4e,'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(_0x140d4e,'Change\x20tone'),'commands':[{'id':'professional','label':i(_0x140d4e,'Professional'),'prompt':'Improve\x20using\x20polished,\x20formal,\x20and\x20respectful\x20language\x20to\x20convey\x20professional\x20expertise\x20and\x20competence.'},{'id':'casual','label':i(_0x140d4e,'Casual'),'prompt':'Improve\x20using\x20casual,\x20informal\x20language\x20to\x20convey\x20a\x20casual\x20conversation\x20with\x20a\x20real\x20person.'},{'id':'direct','label':i(_0x140d4e,'Direct'),'prompt':'Improve\x20using\x20direct\x20language,\x20using\x20only\x20the\x20essential\x20information.'},{'id':'confident','label':i(_0x140d4e,'Confident'),'prompt':'Improve\x20using\x20compelling,\x20optimistic\x20language\x20to\x20convey\x20confidence\x20in\x20the\x20writing.'},{'id':'friendly','label':i(_0x140d4e,'Friendly'),'prompt':'Improve\x20using\x20friendly,\x20comforting\x20language,\x20to\x20convey\x20understanding\x20and\x20empathy.'}]},{'groupId':'changeStyle','groupLabel':i(_0x140d4e,'Change\x20style'),'commands':[{'id':'business','label':i(_0x140d4e,'Business'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20business\x20professional\x20with\x20formal\x20language.'},{'id':'legal','label':i(_0x140d4e,'Legal'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20legal\x20professional\x20using\x20valid\x20legal\x20terminology.'},{'id':'journalism','label':i(_0x140d4e,'Journalism'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20journalist\x20using\x20engaging\x20language\x20to\x20convey\x20the\x20importance\x20of\x20the\x20information.'},{'id':'poetic','label':i(_0x140d4e,'Poetic'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20poem\x20using\x20poetic\x20techniques\x20without\x20losing\x20the\x20original\x20meaning.'}]},{'groupId':'translate','groupLabel':i(_0x140d4e,'Translate'),'commands':[{'id':'translateEnglish','label':i(_0x140d4e,'English'),'prompt':'Translate\x20the\x20content\x20to\x20English\x20language.'},{'id':'translateSpanish','label':i(_0x140d4e,'Spanish'),'prompt':'Translate\x20the\x20content\x20to\x20Spanish\x20language.'},{'id':'translatePortuguese','label':i(_0x140d4e,'Portuguese'),'prompt':'Translate\x20the\x20content\x20to\x20Portuguese\x20language.'},{'id':'translateGerman','label':i(_0x140d4e,'German'),'prompt':'Translate\x20the\x20content\x20to\x20German\x20language.'},{'id':'translateFrench','label':i(_0x140d4e,'French'),'prompt':'Translate\x20the\x20content\x20to\x20French\x20language.'},{'id':'translateChinese','label':i(_0x140d4e,'Simplified\x20Chinese'),'prompt':'Translate\x20the\x20content\x20to\x20Simplified\x20Chinese\x20language.'},{'id':'translateHindi','label':i(_0x140d4e,'Hindi'),'prompt':'Translate\x20the\x20content\x20to\x20Hindi\x20language.'},{'id':'translateArabic','label':i(_0x140d4e,'Arabic'),'prompt':'Translate\x20the\x20content\x20to\x20Arabic\x20language.'}]}];}class S extends _0x3108cd{['abortController'];static get['requires'](){return[x];}constructor(_0x31dfa5){super(_0x31dfa5),this['abortController']=new AbortController();}['init'](){this['editor']['plugins']['get'](x)['textAdapter']=this;}['abort'](){this['abortController']['signal']['aborted']||(this['abortController']['abort'](),this['abortController']=new AbortController());}async['makeRequest'](_0x2fbd17){return this['sendRequest'](_0x2fbd17)['catch'](_0x61db97=>{if(_0x61db97 instanceof R)return Promise['reject'](_0x61db97);if('AbortError'==_0x61db97['name'])return Promise['resolve']();throw console['error'](_0x61db97),new _0x422b03('aitextadapter-send-request-failed',null);});}async['_prepareRequestHeaders'](_0x3287e6,_0x47d2c7){const _0x5e8ca8=this['editor']['locale'],_0x133978={'Content-Type':'application/json'};if('object'==typeof _0x3287e6)Object['assign'](_0x133978,_0x3287e6);else{if(_0x3287e6)try{const _0x36e9c5=await _0x3287e6(_0x47d2c7);Object['assign'](_0x133978,_0x36e9c5);}catch{return Promise['reject'](new R(i(_0x5e8ca8,'AI_ERROR_GET_HEADERS')));}}return _0x133978;}async['_prepareRequestParameters'](_0xe22df7,_0x322d40){const _0x147299=this['editor']['locale'];if('object'==typeof _0xe22df7)return _0xe22df7;try{return await _0xe22df7(_0x322d40);}catch{return Promise['reject'](new R(i(_0x147299,'AI_ERROR_GET_PARAMETERS')));}}}class It extends S{['_apiUrl'];['_requestHeaders'];['_requestParameters'];static get['pluginName'](){return'OpenAITextAdapter';}constructor(_0x1f2777){super(_0x1f2777),_0x1f2777['config']['define']('ai.openAI.apiUrl','https://api.openai.com/v1/chat/completions'),_0x1f2777['config']['get']('ai.openAI.requestParameters')||_0x1f2777['config']['define']('ai.openAI.requestParameters',{'model':'gpt-4o','temperature':0x1,'top_p':0x1,'stream':!0x0}),this['_apiUrl']=_0x1f2777['config']['get']('ai.openAI.apiUrl'),this['_requestHeaders']=_0x1f2777['config']['get']('ai.openAI.requestHeaders')||{},this['_requestParameters']=_0x1f2777['config']['get']('ai.openAI.requestParameters');}async['sendRequest']({query:_0x2c5010,context:_0x2d5418,onData:_0x335906,actionId:_0x31cea9}){const _0x5aabd9=this['editor']['locale'],_0x1ee947=await this['prepareMessages'](_0x2c5010,_0x2d5418,_0x31cea9),_0x160791=await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x31cea9),_0x67bccf=await this['_prepareRequestParameters'](this['_requestParameters'],_0x31cea9),_0x25909e={'messages':_0x1ee947,..._0x67bccf},_0x148683={'method':'POST','headers':_0x160791,'body':JSON['stringify'](_0x25909e),'signal':this['abortController']['signal']},_0x1e8982=await fetch(this['_apiUrl'],_0x148683);if(_0x1e8982['ok'])return _0x67bccf['stream']?await this['_readStreamableResponse'](_0x1e8982,_0x335906):await this['_readStaticResponse'](_0x1e8982,_0x335906),Promise['resolve']();{const _0x27a11a=await _0x1e8982['text']();return _0x27a11a['includes']('context_length_exceeded')?Promise['reject'](new R(i(_0x5aabd9,'AI_ERROR_CONTEXT_LENGTH'))):_0x27a11a['includes']('Moderation')?Promise['reject'](new R(i(_0x5aabd9,'AI_ERROR_MODERATION'))):Promise['reject'](new Error(_0x27a11a));}}async['prepareMessages'](_0x2b2e3d,_0x272e88,_0xf3af7f){let _0x1f2dcf,_0x20b57f;return _0x272e88?(_0x1f2dcf='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.',_0x20b57f='Instruction:\x0a'+_0x2b2e3d+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x272e88):(_0x1f2dcf='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.',_0x20b57f=_0x2b2e3d),[{'role':'system','content':_0x1f2dcf},{'role':'user','content':_0x20b57f}];}async['_readStreamableResponse'](_0x450002,_0x67ab47){const _0x12a941=_0x450002['body']['getReader'](),_0x3a8cf7=new TextDecoder();let _0x38f862='',_0x7874ea='',_0x456283='',_0x236fed=!0x1;for(;!_0x236fed;){const {done:_0x179755,value:_0x1e6116}=await _0x12a941['read'](),_0x3bfdef=_0x38f862+_0x3a8cf7['decode'](_0x1e6116);let _0x260352='';_0x236fed=_0x179755;try{_0x260352=this['_cleanUpData'](_0x3bfdef),_0x38f862='';}catch{_0x38f862=_0x3bfdef;continue;}_0x7874ea+=_0x260352,!_0x236fed&&this['_isBufferIncomplete'](_0x7874ea)||_0x7874ea&&(_0x456283+=_0x7874ea,_0x7874ea='',_0x67ab47(_0x456283));}return Promise['resolve']();}async['_readStaticResponse'](_0xee0659,_0x3f6a6e){return _0x3f6a6e((await _0xee0659['json']())['choices'][0x0]['message']['content']),Promise['resolve']();}['_isBufferIncomplete'](_0x3ec3e5){const _0x141e0e=_0x3ec3e5['split']('<')['length']!==_0x3ec3e5['split']('>')['length'],_0x30fab0=_0x3ec3e5['length']<0x1e;return _0x141e0e&&_0x30fab0;}['_cleanUpData'](_0x324fa7){return _0x324fa7['split'](/\n(?![^{]*\})/g)['map'](_0x10423c=>_0x10423c['replace']('data:\x20',''))['filter'](_0x4e795d=>_0x4e795d&&_0x4e795d['length']>0x0&&'[DONE]'!==_0x4e795d)['map'](_0x40a848=>{const {choices:_0x351a99}=JSON['parse'](_0x40a848);if(_0x351a99[0x0]?.['delta']?.['content'])return _0x351a99[0x0]['delta']['content'];})['filter'](_0x5ec3e9=>_0x5ec3e9)['join']('');}}class Et extends S{['_apiUrl'];['_requestHeaders'];['_bedrockClientConfig'];['_requestParameters'];static get['pluginName'](){return'AWSTextAdapter';}constructor(_0x42f521){super(_0x42f521),_0x42f521['config']['get']('ai.aws.requestParameters')||_0x42f521['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']=_0x42f521['config']['get']('ai.aws.apiUrl'),this['_bedrockClientConfig']=_0x42f521['config']['get']('ai.aws.bedrockClientConfig'),this['_requestHeaders']=_0x42f521['config']['get']('ai.aws.requestHeaders'),this['_requestParameters']=_0x42f521['config']['get']('ai.aws.requestParameters');}async['sendRequest']({query:_0xac0d94,context:_0x1dcce5,onData:_0x5e27ad,actionId:_0x183ec2}){const {model:_0x265a24,stream:_0x83be27,..._0x15bb3e}=await this['_prepareRequestParameters'](this['_requestParameters'],_0x183ec2),_0x3220b8={'prompt':await this['preparePrompt'](_0xac0d94,_0x1dcce5,_0x265a24,_0x183ec2),..._0x15bb3e};this['_apiUrl']?await this['_processProxyRequest'](_0x3220b8,_0x265a24,_0x83be27,_0x5e27ad,_0x183ec2):await this['_processAWSRequest'](_0x3220b8,_0x265a24,_0x83be27,_0x5e27ad);}async['preparePrompt'](_0x2e513d,_0x18eef1,_0x528ac5,_0x1beb98){let _0xa6de19,_0x1683be;return _0x18eef1?(_0xa6de19='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.',_0x1683be='Instruction:\x0a'+_0x2e513d+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x18eef1):(_0xa6de19='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.',_0x1683be=_0x2e513d),'meta.llama'==this['getModelFamily'](_0x528ac5)?'<<SYS>>\x0a'+_0xa6de19+'\x0a<</SYS>>\x0a[INST]\x0a'+_0x1683be+'\x0a[/INST]':'Human:\x0a'+_0xa6de19+'\x0a'+_0x1683be+'\x0a\x0aAssistant:';}['getModelFamily'](_0x472a22){if(/^anthropic\.claude/['test'](_0x472a22))return'anthropic.claude';if(/^ai21\.j2/['test'](_0x472a22))return'ai21.j2';if(/^cohere\.command/['test'](_0x472a22))return'cohere.command';if(/^meta\.llama/['test'](_0x472a22))return'meta.llama';throw new R(i(this['editor']['locale'],'AI_ERROR_UNSUPPORTED_MODEL',_0x472a22));}async['_processProxyRequest'](_0x41b210,_0x106e9a,_0xa8c59e,_0x16256d,_0x545f62){const _0x55cdc3={'method':'POST','headers':await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x545f62),'body':JSON['stringify']({..._0x41b210,'model':_0x106e9a,'stream':_0xa8c59e}),'signal':this['abortController']['signal']},_0x3215ea=await fetch(this['_apiUrl'],_0x55cdc3);_0xa8c59e?await this['_readStreamableResponse'](_0x3215ea,_0x106e9a,_0x16256d):await this['_readStaticResponse'](_0x3215ea,_0x106e9a,_0x16256d);}async['_processAWSRequest'](_0x25026c,_0x37751d,_0x2b8c00,_0x23bc90){const _0x9d7a64=new _0x3ae500(this['_bedrockClientConfig']),_0x50a672={'body':JSON['stringify'](_0x25026c),'contentType':'application/json','accept':'application/json','modelId':_0x37751d};let _0x412a7a;if(_0x2b8c00){const _0xed45f8=new _0x4fb1ac(_0x50a672);_0x412a7a=await _0x9d7a64['send'](_0xed45f8,{'abortSignal':this['abortController']['signal']}),await this['_readAsyncIterableResponse'](_0x412a7a,_0x37751d,_0x23bc90);}else{const _0x654495=new _0x196d57(_0x50a672);_0x412a7a=await _0x9d7a64['send'](_0x654495,{'abortSignal':this['abortController']['signal']}),await this['_readStaticResponse'](_0x412a7a,_0x37751d,_0x23bc90);}}async['_readAsyncIterableResponse'](_0x2fb039,_0x414c27,_0x39d0c1){const _0x49b7d4=_0x2fb039['body'],_0x1a574e=new TextDecoder('utf-8');let _0x2e3c61='';for await(const _0x1b7172 of _0x49b7d4)if(_0x1b7172['chunk']){const _0x3611d5=_0x1a574e['decode'](_0x1b7172['chunk']['bytes']),_0x222c16=JSON['parse'](_0x3611d5);_0x2e3c61+=this['_getGeneratedText'](_0x222c16,_0x414c27),_0x39d0c1(_0x2e3c61);}return Promise['resolve']();}async['_readStreamableResponse'](_0x1b5e16,_0x5b45d2,_0x3abd2c){const _0x4f361f=_0x1b5e16['body'],_0x4f892c=new TextDecoder('utf-8'),_0x47f688=_0x4f361f['getReader']();let _0x54a023='',_0x4461b5='',_0x41b1da=!0x1;for(;!_0x41b1da;){const {done:_0x51348d,value:_0x50c4dc}=await _0x47f688['read']();if(_0x41b1da=_0x51348d,_0x41b1da)break;const _0x537409=(_0x54a023+_0x4f892c['decode'](_0x50c4dc))['split']('\x0a')['map'](_0x57a882=>{try{return _0x54a023='',JSON['parse'](_0x57a882);}catch{return _0x54a023=_0x57a882,null;}})['filter'](_0x42dce1=>null!==_0x42dce1);_0x537409['length']&&(_0x4461b5+=_0x537409['map'](_0x55444b=>this['_getGeneratedText'](_0x55444b,_0x5b45d2))['join'](''),_0x3abd2c(_0x4461b5));}return Promise['resolve']();}async['_readStaticResponse'](_0x394dac,_0x415349,_0x1ebdcb){let _0x3f4e6f;return _0x3f4e6f=_0x394dac instanceof Response?await _0x394dac['json']():JSON['parse'](new TextDecoder('utf-8')['decode'](_0x394dac['body'])),(_0x1ebdcb(this['_getGeneratedText'](_0x3f4e6f,_0x415349)),Promise['resolve']());}['_getGeneratedText'](_0xab7b26,_0x261c82){switch(this['getModelFamily'](_0x261c82)){case'anthropic.claude':return _0xab7b26['completion'];case'ai21.j2':return _0xab7b26['completions'][0x0]['data']['text'];case'cohere.command':return _0xab7b26['generations'][0x0]['text'];case'meta.llama':return _0xab7b26['generation'];}}}export{x as AIAdapter,At as AIAssistant,n as AIAssistantUI,R as AIRequestError,S as AITextAdapter,Et as AWSTextAdapter,It as OpenAITextAdapter,E as ShowAIAssistantCommand,_t as getDefaultAICommands};
|
|
23
|
+
import{Plugin as _0x229599,Command as _0x5ef009}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconCopy as _0x52d84e,IconCheck as _0x34aa88,IconError as _0x136f15,IconSubmit as it,IconHistory as tt,IconMagicWand as _0x1763b6,IconRobotPencil as _0x4c2773}from'@ckeditor/ckeditor5-icons/dist/index.js';import{uid as _0x45b22a,CKEditorError as _0x4853ec,ObservableMixin as _0x1fca45,global as _0x3b0b8,isVisible as _0x556e7e,Rect as _0x26ebfa,Collection as _0x4a2166,FocusTracker as et,KeystrokeHandler as rt,first as _0xa95bf}from'@ckeditor/ckeditor5-utils/dist/index.js';import{ToolbarView as ot,ButtonView as _0x451bcf,View as _0x3edbc3,SpinnerView as _0x4b67f5,IconView as _0x22adfe,AutocompleteView as st,ListView as yt,ListItemGroupView as Ct,ListItemView as xt,ButtonLabelView as wt,FocusCycler as ht,createLabeledTextarea as nt,Dialog as _0x380b7d,createDropdown as _0x58c081,addMenuToDropdown as _0x1156b2,MenuBarMenuView as _0x3f8494,MenuBarMenuListItemButtonView as _0x4bb7ac,DialogViewPosition as _0x1b757b,MenuBarMenuListView as _0x5c77e6,MenuBarMenuListItemView as _0x1ffa5c}from'@ckeditor/ckeditor5-ui/dist/index.js';import{ClipboardPipeline as _0x2ea3da,ClipboardMarkersUtils as _0x52718a}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{ViewDocumentDomEventData as _0x3cd63,ViewDataTransfer as _0x1ad6a4,ViewUpcastWriter as _0x667fee,Matcher as _0x1cc8f3}from'@ckeditor/ckeditor5-engine/dist/index.js';import{unescape as kt,escape as ft}from'es-toolkit/compat';import{BedrockRuntimeClient as _0x491405,InvokeModelWithResponseStreamCommand as _0x16efbc,InvokeModelCommand as _0x27592f}from'@aws-sdk/client-bedrock-runtime';const K='_ungrouppedCommands';function o(_0x339a36,_0x21d676){const _0x4850e1=(0x0,_0x21d676['t'])('Other');return _0x339a36['length']?'groupId'in _0x339a36[0x0]?_0x339a36:[{'groupId':K,'groupLabel':_0x4850e1,'order':0x1/0x0,'commands':_0x339a36}]:[{'groupId':K,'groupLabel':_0x4850e1,'order':0x1/0x0,'commands':[]}];}const gt=globalThis['DataTransfer'],w='ai-ui';class a extends _0x229599{static get['pluginName'](){return'AIAssistantEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x2eb756}=this,_0x402eab=['ck-fake-ai-selection'];_0x2eb756['config']['get']('ai.useTheme')&&_0x402eab['push']('ck-ai-assistant-ui_theme'),_0x2eb756['conversion']['for']('editingDowncast')['markerToHighlight']({'model':w,'view':{'classes':_0x402eab,'priority':0xc}}),_0x2eb756['conversion']['for']('editingDowncast')['markerToElement']({'model':w,'view':(_0x4fd686,{writer:_0x56e3ff})=>{if(!_0x4fd686['markerRange']['isCollapsed'])return null;const _0x38ef76=_0x56e3ff['createUIElement']('span');return _0x56e3ff['addClass'](['ck-fake-ai-selection','ck-fake-ai-selection_collapsed'],_0x38ef76),_0x38ef76;}});}['afterInit'](){!async function(_0x43ac02){const _0x4a444b=_0x26773e([0x4d,0x52,0x6d,0x47,0x6a,0x4b,0x34,0x32,0x51,0x6e,0x63,0x4f,0x67,0x43,0x39,0x7a,0x46,0x65,0x61,0x38,0x64,0x41,0x49,0x6f,0x4a,0x35,0x6b,0x56,0x75,0x37,0x79,0x73,0x54,0x4e,0x44,0x62,0x36,0x78,0x70,0x48,0x45,0x55,0x57,0x76,0x58,0x31,0x5a,0x6c,0x42,0x69,0x30,0x53,0x74,0x77,0x50,0x59,0x66,0x4c,0x68,0x33,0x71,0x72]),_0x228025=0x415b3ba1,_0x5e44c6=0x415c54a9^_0x228025,_0x46b539=window[_0x26773e([0x44,0x61,0x74,0x65])][_0x26773e([0x6e,0x6f,0x77])](),_0x45b8c8=_0x43ac02[_0x26773e([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x3562d2=new window[(_0x26773e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x38c951=>{_0x45b8c8[_0x26773e([0x6f,0x6e,0x63,0x65])](_0x26773e([0x72,0x65,0x61,0x64,0x79]),_0x38c951);}),_0x398e96={[_0x26773e([0x6b,0x74,0x79])]:_0x26773e([0x45,0x43]),[_0x26773e([0x75,0x73,0x65])]:_0x26773e([0x73,0x69,0x67]),[_0x26773e([0x63,0x72,0x76])]:_0x26773e([0x50,0x2d,0x32,0x35,0x36]),[_0x26773e([0x78])]:_0x26773e([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x26773e([0x79])]:_0x26773e([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x26773e([0x61,0x6c,0x67])]:_0x26773e([0x45,0x53,0x32,0x35,0x36])},_0x7fdaac=_0x45b8c8[_0x26773e([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x26773e([0x67,0x65,0x74])](_0x26773e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x51555a(){let _0x2110bd,_0x4b982a=null,_0x5869a9=null;try{if(_0x7fdaac==_0x26773e([0x47,0x50,0x4c]))return _0x26773e([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x2110bd=_0x2507ac(),!_0x2110bd)return _0x26773e([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x2110bd[_0x26773e([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x5869a9=_0x14a1bf(_0x2110bd[_0x26773e([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x2110bd[_0x26773e([0x6a,0x74,0x69])])),await _0x9fc471()?_0x377205()?_0x436170()?_0x26773e([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x570a0a()?(_0x2110bd[_0x26773e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x26773e([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x4b982a=_0x57ef37(_0x26773e([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x2110bd[_0x26773e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x26773e([0x74,0x72,0x69,0x61,0x6c])&&(_0x4b982a=_0x57ef37(_0x26773e([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x41ec5a()):_0x26773e([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x26773e([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x26773e([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x26773e([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x436170(){const _0x45019e=[_0x26773e([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x26773e([0x74,0x72,0x69,0x61,0x6c])][_0x26773e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2110bd[_0x26773e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x46b539/0x3e8:0xe10*_0x5e44c6;return _0x2110bd[_0x26773e([0x65,0x78,0x70])]<_0x45019e;}function _0x377205(){const _0x16f2a4=_0x2110bd[_0x26773e([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x16f2a4&&(!!_0x16f2a4[_0x26773e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x26773e([0x2a]))||!!_0x16f2a4[_0x26773e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x26773e([0x41,0x49])));}function _0x570a0a(){const _0x1d4ace=_0x2110bd[_0x26773e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x1d4ace||0x0==_0x1d4ace[_0x26773e([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x3d98df}=new URL(window[_0x26773e([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x1d4ace[_0x26773e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3d98df))return!0x0;const _0x7bfa73=_0x3d98df[_0x26773e([0x73,0x70,0x6c,0x69,0x74])](_0x26773e([0x2e]));return _0x1d4ace[_0x26773e([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x16627a=>_0x16627a[_0x26773e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x26773e([0x2a])))[_0x26773e([0x6d,0x61,0x70])](_0x1fdc1e=>_0x1fdc1e[_0x26773e([0x73,0x70,0x6c,0x69,0x74])](_0x26773e([0x2e])))[_0x26773e([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x16d3ef=>_0x16d3ef[_0x26773e([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x7bfa73[_0x26773e([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x26773e([0x6d,0x61,0x70])](_0x56319f=>Array(_0x7bfa73[_0x26773e([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x56319f[_0x26773e([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x26773e([0x66,0x69,0x6c,0x6c])](_0x56319f[0x0]===_0x26773e([0x2a])?_0x26773e([0x2a]):'')[_0x26773e([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x56319f))[_0x26773e([0x73,0x6f,0x6d,0x65])](_0xce4618=>_0x7bfa73[_0x26773e([0x65,0x76,0x65,0x72,0x79])]((_0x5d0e95,_0x46efa6)=>_0xce4618[_0x46efa6]===_0x5d0e95||_0xce4618[_0x46efa6]===_0x26773e([0x2a])));}function _0x41ec5a(){return _0x4b982a&&_0x5869a9?new window[(_0x26773e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x23de1d,_0x2717ed)=>{_0x4b982a[_0x26773e([0x74,0x68,0x65,0x6e])](_0x23de1d,_0x2717ed),_0x5869a9[_0x26773e([0x74,0x68,0x65,0x6e])](_0x55566a=>{_0x55566a!=_0x26773e([0x56,0x61,0x6c,0x69,0x64])&&_0x23de1d(_0x55566a);},_0x2717ed);}):_0x4b982a||_0x5869a9||_0x26773e([0x56,0x61,0x6c,0x69,0x64]);}}function _0x14a1bf(_0x3beeff,_0x234b3d){return new window[(_0x26773e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x17504c=>{if(_0x2ec656())return _0x17504c(_0x26773e([0x56,0x61,0x6c,0x69,0x64]));_0xbe13a4(),_0x45b8c8[_0x26773e([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x26773e([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x14fc8b=!0x1;const _0x1c928e=_0x45b22a();function _0x1930aa(_0x13aec5){return!!_0x13aec5&&(typeof _0x13aec5===_0x26773e([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x13aec5===_0x26773e([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x13aec5[_0x26773e([0x74,0x68,0x65,0x6e])]===_0x26773e([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x13aec5[_0x26773e([0x63,0x61,0x74,0x63,0x68])]===_0x26773e([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x429552(_0x1948f6){_0x40a6ab(_0x1948f6)[_0x26773e([0x74,0x68,0x65,0x6e])](_0x3567a5=>{if(!_0x3567a5||_0x3567a5[_0x26773e([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x26773e([0x6f,0x6b]))return _0x26773e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x3edfbc(_0x4e29ec(_0x1c928e+_0x234b3d))!=_0x3567a5[_0x26773e([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x26773e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x26773e([0x56,0x61,0x6c,0x69,0x64]);})[_0x26773e([0x74,0x68,0x65,0x6e])](_0x159460=>(_0xfc2641(),_0x159460),()=>{const _0x39196b=_0x414007();return null==_0x39196b?(_0xfc2641(),_0x26773e([0x56,0x61,0x6c,0x69,0x64])):_0x26773e(_0x46b539-_0x39196b>(0x6557bfa1^_0x228025)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x26773e([0x74,0x68,0x65,0x6e])](_0x17504c)[_0x26773e([0x63,0x61,0x74,0x63,0x68])](()=>{_0x17504c(_0x26773e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x1e5d50=0x416dd521^_0x228025;function _0xfc2641(){const _0x4ae625=_0x26773e([0x6c,0x6c,0x63,0x74,0x2d])+_0x3edfbc(_0x4e29ec(_0x3beeff)),_0x46f56c=_0x3b1c60(_0x3edfbc(window[_0x26773e([0x4d,0x61,0x74,0x68])][_0x26773e([0x63,0x65,0x69,0x6c])](_0x46b539/_0x1e5d50)));window[_0x26773e([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x26773e([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4ae625,_0x46f56c);}function _0x414007(){const _0x3fa275=_0x26773e([0x6c,0x6c,0x63,0x74,0x2d])+_0x3edfbc(_0x4e29ec(_0x3beeff)),_0x3a1f60=window[_0x26773e([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x26773e([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3fa275);return _0x3a1f60?window[_0x26773e([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3b1c60(_0x3a1f60),0x10)*_0x1e5d50:null;}function _0x40a6ab(_0x3c7e65){return new window[(_0x26773e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3395e4,_0x5c3aa1)=>{_0x3c7e65[_0x26773e([0x74,0x68,0x65,0x6e])](_0x3395e4,_0x5c3aa1),window[_0x26773e([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x5c3aa1,0x415aef61^_0x228025);});}}_0x45b8c8[_0x26773e([0x6f,0x6e])](_0x26773e([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x428ab3,_0x4785e7)=>{if(_0x4785e7[0x0]!=_0x3beeff)return _0x17504c(_0x26773e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x4785e7[0x1]={..._0x4785e7[0x1],[_0x26773e([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x1c928e};},{[_0x26773e([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x26773e([0x68,0x69,0x67,0x68])}),_0x45b8c8[_0x26773e([0x6f,0x6e])](_0x26773e([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x268282=>{_0x1930aa(_0x268282[_0x26773e([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x14fc8b=!0x0,_0x429552(_0x268282[_0x26773e([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x26773e([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x26773e([0x6c,0x6f,0x77])}),_0x3562d2[_0x26773e([0x74,0x68,0x65,0x6e])](()=>{_0x14fc8b||_0x17504c(_0x26773e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x2ec656(){return _0x45b8c8[_0x26773e([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x26773e([0x76,0x69,0x65,0x77])][_0x26773e([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x26773e([0x61,0x75,0x74,0x6f]);}function _0xbe13a4(){_0x45b8c8[_0x26773e([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x26773e([0x76,0x69,0x65,0x77])][_0x26773e([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x26773e([0x61,0x75,0x74,0x6f]);}}function _0x57ef37(_0x37c97b){const _0x314bb6=[new window[(_0x26773e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4c4e35=>setTimeout(_0x4c4e35,0x4152056d^_0x228025)),_0x3562d2[_0x26773e([0x74,0x68,0x65,0x6e])](()=>new window[(_0x26773e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x31731e=>{let _0xccadb9=0x0;_0x45b8c8[_0x26773e([0x6d,0x6f,0x64,0x65,0x6c])][_0x26773e([0x6f,0x6e])](_0x26773e([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0xe873c8,_0x160c7f)=>{_0x160c7f[0x0][_0x26773e([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0xccadb9++,_0xccadb9==(0x415b3a59^_0x228025)&&(_0x31731e(),_0xe873c8[_0x26773e([0x6f,0x66,0x66])]());});}))];return window[_0x26773e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x26773e([0x72,0x61,0x63,0x65])](_0x314bb6)[_0x26773e([0x74,0x68,0x65,0x6e])](()=>_0x37c97b);}async function _0x2f5d71(){await _0x3562d2,_0x45b8c8[_0x26773e([0x6d,0x6f,0x64,0x65,0x6c])][_0x26773e([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x1b1501,_0x45b8c8[_0x26773e([0x6d,0x6f,0x64,0x65,0x6c])][_0x26773e([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x1b1501,_0x45b8c8[_0x26773e([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x26773e([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x399517(_0x15cfc3){const _0xef0b7a=_0x399e8f();_0x45b8c8[_0xef0b7a]=_0x26773e([0x61,0x69,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x15cfc3,_0x15cfc3!=_0x26773e([0x56,0x61,0x6c,0x69,0x64])&&_0x2f5d71();}function _0x399e8f(){const _0x312ffd=window[_0x26773e([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x26773e([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x26773e([0x6e,0x6f,0x77])]())[_0x26773e([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x26773e([0x2e]),'');let _0x47ac49=_0x26773e([0x4d]);for(let _0x1460a9=0x0;_0x1460a9<_0x312ffd[_0x26773e([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1460a9+=0x2){let _0x4ec10a=window[_0x26773e([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x312ffd[_0x26773e([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1460a9,_0x1460a9+0x2));_0x4ec10a>=_0x4a444b[_0x26773e([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x4ec10a-=_0x4a444b[_0x26773e([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x47ac49+=_0x4a444b[_0x4ec10a];}return _0x47ac49;}function _0x2507ac(){const _0x35d17e=_0x7fdaac[_0x26773e([0x73,0x70,0x6c,0x69,0x74])](_0x26773e([0x2e]));if(0x3!=_0x35d17e[_0x26773e([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x540f61(_0x35d17e[0x1]);function _0x540f61(_0x361515){const _0x56915d=_0x3579e2(_0x361515);return _0x56915d&&_0x5b12f4()?_0x56915d:null;function _0x5b12f4(){const _0x3cc2c5=_0x56915d[_0x26773e([0x6a,0x74,0x69])],_0x3e8015=window[_0x26773e([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3cc2c5[_0x26773e([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3cc2c5[_0x26773e([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x82652e={..._0x56915d,[_0x26773e([0x6a,0x74,0x69])]:_0x3cc2c5[_0x26773e([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x3cc2c5[_0x26773e([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x82652e[_0x26773e([0x76,0x63])],_0x4e29ec(_0x82652e)==_0x3e8015;}}}async function _0x9fc471(){let _0x299bcb=!0x0;try{const _0x3743c5=_0x7fdaac[_0x26773e([0x73,0x70,0x6c,0x69,0x74])](_0x26773e([0x2e])),[_0x1e9248,_0x18ebe4,_0x5e0d2e]=_0x3743c5;return _0x55f15d(_0x1e9248),await _0x54576c(_0x1e9248,_0x18ebe4,_0x5e0d2e),_0x299bcb;}catch{return!0x1;}function _0x55f15d(_0x593466){const _0x38350a=_0x3579e2(_0x593466);_0x38350a&&_0x38350a[_0x26773e([0x61,0x6c,0x67])]==_0x26773e([0x45,0x53,0x32,0x35,0x36])||(_0x299bcb=!0x1);}async function _0x54576c(_0x1bc2ff,_0x19e605,_0x28cb02){const _0x4be74d=window[_0x26773e([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x26773e([0x66,0x72,0x6f,0x6d])](_0x2a8aae(_0x28cb02),_0x3724a8=>_0x3724a8[_0x26773e([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x2f4619=new window[(_0x26773e([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x26773e([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x1bc2ff+_0x26773e([0x2e])+_0x19e605),_0x283f47=window[_0x26773e([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x26773e([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x283f47)return;const _0x336738=await _0x283f47[_0x26773e([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x26773e([0x6a,0x77,0x6b]),_0x398e96,{[_0x26773e([0x6e,0x61,0x6d,0x65])]:_0x26773e([0x45,0x43,0x44,0x53,0x41]),[_0x26773e([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x26773e([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x26773e([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x283f47[_0x26773e([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x26773e([0x6e,0x61,0x6d,0x65])]:_0x26773e([0x45,0x43,0x44,0x53,0x41]),[_0x26773e([0x68,0x61,0x73,0x68])]:{[_0x26773e([0x6e,0x61,0x6d,0x65])]:_0x26773e([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x336738,_0x4be74d,_0x2f4619)||(_0x299bcb=!0x1);}}function _0x3579e2(_0x374036){return _0x374036[_0x26773e([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x26773e([0x65,0x79]))?JSON[_0x26773e([0x70,0x61,0x72,0x73,0x65])](_0x2a8aae(_0x374036)):null;}function _0x2a8aae(_0x29d44f){return window[_0x26773e([0x61,0x74,0x6f,0x62])](_0x29d44f[_0x26773e([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x26773e([0x2b]))[_0x26773e([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x26773e([0x2f])));}function _0x4e29ec(_0x27d3c2){let _0x22ada1=0x1505;function _0x3b4d3f(_0x136a0b){for(let _0x2ff7fb=0x0;_0x2ff7fb<_0x136a0b[_0x26773e([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2ff7fb++){const _0x150245=_0x136a0b[_0x26773e([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x2ff7fb);_0x22ada1=(_0x22ada1<<0x5)+_0x22ada1+_0x150245,_0x22ada1&=_0x22ada1;}}function _0x55d4fb(_0x4f2b4e){Array[_0x26773e([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x4f2b4e)?_0x4f2b4e[_0x26773e([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x55d4fb):_0x4f2b4e&&typeof _0x4f2b4e==_0x26773e([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x26773e([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x4f2b4e)[_0x26773e([0x73,0x6f,0x72,0x74])]()[_0x26773e([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x1f72e1,_0x177300])=>{_0x3b4d3f(_0x1f72e1),_0x55d4fb(_0x177300);}):_0x3b4d3f(window[_0x26773e([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x4f2b4e));}return _0x55d4fb(_0x27d3c2),_0x22ada1>>>0x0;}function _0x3edfbc(_0x171b1f){return _0x171b1f[_0x26773e([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x26773e([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x26773e([0x30]));}function _0x3b1c60(_0x22d37b){return _0x22d37b[_0x26773e([0x73,0x70,0x6c,0x69,0x74])]('')[_0x26773e([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x26773e([0x6a,0x6f,0x69,0x6e])]('');}function _0x1b1501(){}function _0x26773e(_0x2898a4){return _0x2898a4['map'](_0x4cbc91=>String['fromCharCode'](_0x4cbc91))['join']('');}_0x399517(await _0x51555a());}(this);}['showFakeVisualSelection'](){const _0x5d49db=this['editor']['model'];_0x5d49db['change'](_0x269e8a=>{const _0x289fc9=_0x5d49db['document']['selection']['getRanges']();let _0x4848cd=0x0;for(const _0x393c1f of _0x289fc9){const _0x140a17=w+':'+_0x4848cd;if(_0x5d49db['markers']['has'](_0x140a17))_0x269e8a['updateMarker'](_0x140a17,{'range':_0x393c1f});else{if(_0x393c1f['start']['isAtEnd']){const _0x2d6c27=_0x393c1f['start']['getLastMatchingPosition'](({item:_0x2d5abf})=>!_0x5d49db['schema']['isContent'](_0x2d5abf),{'boundaries':_0x393c1f});_0x269e8a['addMarker'](_0x140a17,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x269e8a['createRange'](_0x2d6c27,_0x393c1f['end'])});}else _0x269e8a['addMarker'](_0x140a17,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x393c1f});}_0x4848cd++;}});}['hideFakeVisualSelection'](){const _0x39b9de=this['editor']['model'],_0x4c5ae2=Array['from'](this['editor']['model']['markers']['getMarkersGroup'](w));_0x4c5ae2['length']&&_0x39b9de['change'](_0x466835=>{_0x4c5ae2['forEach'](_0x16fbea=>{_0x466835['removeMarker'](_0x16fbea);});});}['insertContent'](_0x23f1c2,_0x1fa721){const _0x1b8396=this['_getAISelection'](),_0xd7052b=_0x1fa721||_0x1b8396['getFirstRange']();this['editor']['model']['canEditAt'](_0xd7052b)&&this['editor']['model']['change'](_0x339c76=>{this['hideFakeVisualSelection'](),_0x1fa721||this['_resetContentOfSelectedTableCells'](_0x339c76,_0x1b8396),this['_pasteHTMLUsingClipboard']({'insertAt':_0xd7052b,'writer':_0x339c76,'html':_0x23f1c2});});}['insertContentBelow'](_0x355676){const {model:_0x501f8e}=this['editor'],_0x4d8e27=this['_getAISelection']();_0x501f8e['change'](()=>{const _0x497e72=this['_prepareTableInsertBelowPosition'](_0x355676,_0x4d8e27)||this['_getDefaultInsertBelowPosition'](_0x4d8e27);this['insertContent'](_0x355676,_0x497e72);});}['_getAISelection'](){const _0x4b3724=this['editor']['model'],_0x4463b4=Array['from'](_0x4b3724['markers']['getMarkersGroup'](w))['map'](_0x1f551a=>_0x1f551a['getRange']());return _0x4b3724['createSelection'](_0x4463b4);}['_pasteHTMLUsingClipboard']({writer:_0x1d696e,html:_0x3d7498,insertAt:_0x25d95d}){const {view:_0x3b7b72}=this['editor']['editing'],_0x3c4946=this['editor']['plugins']['get'](_0x2ea3da),_0x497afa=new gt();_0x497afa['setData']('text/html',_0x3d7498);const _0x557092=new ClipboardEvent('paste',{'clipboardData':_0x497afa}),_0x2afdae=new _0x3cd63(_0x3b7b72,_0x557092,{'dataTransfer':new _0x1ad6a4(_0x497afa)});_0x1d696e['setSelection'](_0x25d95d);const _0xbc0843=(_0x44679a,_0xd5cd96)=>{_0xd5cd96['resultRange']&&_0x1d696e['setSelection'](_0xd5cd96['resultRange']);};_0x3c4946['once']('contentInsertion',_0xbc0843,{'priority':'lowest'}),_0x3b7b72['document']['fire']('paste',_0x2afdae),_0x3c4946['off']('contentInsertion',_0xbc0843);}['_getDefaultInsertBelowPosition'](_0x53a049){const {model:_0x5c9def}=this['editor'],_0x3333b0=Array['from'](_0x53a049['getSelectedBlocks']());return _0x3333b0['length']?_0x5c9def['createPositionAfter'](_0x3333b0['pop']()):_0x53a049['getLastPosition']();}['_prepareTableInsertBelowPosition'](_0x5caa58,_0x3e2ea3){const {model:_0x5e9a44,plugins:_0xd4c601}=this['editor'];if(_0xd4c601['has']('TableUtils')){const _0x591506=_0xd4c601['get']('TableUtils')['getSelectedTableCells'](_0x3e2ea3);if(_0x591506['length']){const _0x591900=this['_getTableRowCountFromContent'](_0x5caa58),_0x59e511=this['_createEmptyTableRows'](_0x591506,_0x591900);return _0x5e9a44['createPositionAt'](_0x59e511,0x0);}}return null;}['_getTableRowCountFromContent'](_0x42358c){const _0x1757c5=this['editor']['plugins']['get']('TableUtils'),_0x3976c5=this['editor']['data']['parse'](_0x42358c),_0x1367e3=Array['from'](_0x3976c5['getChildren']())['filter'](_0x404df4=>_0x404df4['is']('element','table'));let _0x4e3892=0x0;return _0x1367e3['forEach'](_0x346be7=>{_0x4e3892+=_0x1757c5['getRows'](_0x346be7);}),_0x4e3892;}['_createEmptyTableRows'](_0x13d0bd,_0x60641e){const _0x5dd90b=this['editor']['plugins']['get']('TableUtils'),_0x698244=_0x5dd90b['getRowIndexes'](_0x13d0bd),_0x966070=_0x5dd90b['getColumnIndexes'](_0x13d0bd),_0x36778e=_0x698244['last']+0x1,_0x5acef1=_0x966070['first'],_0x17f5ca=_0x13d0bd[0x0]['findAncestor']('table');for(let _0x9f56b8=0x0;_0x9f56b8<_0x60641e;_0x9f56b8++)_0x5dd90b['insertRows'](_0x17f5ca,{'at':_0x36778e});return _0x17f5ca['getChild'](_0x36778e)['getChild'](_0x5acef1);}['_resetContentOfSelectedTableCells'](_0x5dbf3c,_0x1b1c88){const {plugins:_0x5dd71e}=this['editor'],{model:_0x2b4694}=_0x5dbf3c;if(!_0x5dd71e['has']('TableUtils'))return;_0x5dd71e['get']('TableUtils')['getSelectedTableCells'](_0x1b1c88)['length']&&_0x2b4694['deleteContent'](_0x1b1c88);}}class x extends _0x229599{static get['pluginName'](){return'AIAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['afterInit'](){if(!this['textAdapter'])throw new _0x4853ec('aiadapter-text-adapter-not-set',null);}}class R extends Error{constructor(_0x1812f0){super(_0x1812f0),this['name']='AIRequestError';}}function i(_0x307b44,_0x38d77f,_0x186cf7){const t=_0x307b44['t'];switch(_0x38d77f){case'Edit\x20or\x20review':return t('Edit\x20or\x20review');case'Improve\x20writing':return t('Improve\x20writing');case'Make\x20shorter':return t('Make\x20shorter');case'Make\x20longer':return t('Make\x20longer');case'Simplify\x20language':return t('Simplify\x20language');case'Generate\x20from\x20selection':return t('Generate\x20from\x20selection');case'Summarize':return t('Summarize');case'Continue':return t('Continue');case'Change\x20tone':return t('Change\x20tone');case'Professional':return t('Professional');case'Casual':return t('Casual');case'Direct':return t('Direct');case'Confident':return t('Confident');case'Friendly':return t('Friendly');case'Change\x20style':return t('Change\x20style');case'Business':return t('Business');case'Legal':return t('Legal');case'Journalism':return t('Journalism');case'Poetic':return t('Poetic');case'Translate':return t('Translate');case'English':return t('English');case'Spanish':return t('Spanish');case'German':return t('German');case'Portuguese':return t('Portuguese');case'French':return t('French');case'Simplified\x20Chinese':return t('Simplified\x20Chinese');case'Hindi':return t('Hindi');case'Arabic':return t('Arabic');case'AI\x20Assistant':return t('AI\x20Assistant');case'AI\x20Commands':return t('AI\x20Commands');case'Ask\x20AI\x20to\x20edit\x20or\x20generate':return t('Ask\x20AI\x20to\x20edit\x20or\x20generate');case'Ask\x20AI\x20to\x20improve\x20generated\x20text':return t('Ask\x20AI\x20to\x20improve\x20generated\x20text');case'Copy':return t('Copy');case'Submit':return t('Submit');case'Insert\x20below':return t('Insert\x20below');case'Try\x20again':return t('Try\x20again');case'Stop':return t('Stop');case'AI\x20is\x20writing...':return t('AI\x20is\x20writing...');case'AI\x20is\x20writing':return t('AI\x20is\x20writing');case'Generated\x20content:\x20%0':return t('Generated\x20content:\x20%0',_0x186cf7);case'Error\x20during\x20AI\x20content\x20generation:\x20%0':return t('Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x186cf7);case'History':return t('History');case'Empty\x20history':return t('Empty\x20history');case'Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.':return t('Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.');case'Prompt\x20history':return t('Prompt\x20history');case'Clear':return t('Clear');case'AI_REPLACE_CONTENT':return t({'id':'AI_REPLACE_CONTENT','string':'Replace'});case'AI_INSERT_CONTENT':return t({'id':'AI_INSERT_CONTENT','string':'Insert'});case'AI_ERROR_GET_HEADERS':return t({'id':'AI_ERROR_GET_HEADERS','string':'Preparing\x20request\x20headers\x20failed'});case'AI_ERROR_GET_PARAMETERS':return t({'id':'AI_ERROR_GET_PARAMETERS','string':'Preparing\x20request\x20parameters\x20failed'});case'AI_ERROR_UNSUPPORTED_MODEL':return t({'id':'AI_ERROR_UNSUPPORTED_MODEL','string':'The\x20requested\x20AI\x20model\x20(\x22%0\x22)\x20is\x20not\x20supported'},_0x186cf7);case'AI_ERROR_CONTEXT_LENGTH':return t({'id':'AI_ERROR_CONTEXT_LENGTH','string':'Selected\x20content\x20is\x20too\x20long'});case'AI_ERROR_MODERATION':return t({'id':'AI_ERROR_MODERATION','string':'Requested\x20query\x20does\x20not\x20pass\x20moderation\x20rules'});case'AI_ERROR_FAILED':return t({'id':'AI_ERROR_FAILED','string':'Failed\x20to\x20communicate\x20with\x20the\x20AI\x20service'});default:return _0x38d77f;}}class E extends _0x5ef009{['_commandDefinitions'];constructor(_0x1d7ebe,_0x4d9630){super(_0x1d7ebe),this['_commandDefinitions']=_0x4d9630,this['set']('enabledCommandsIds',[]),this['on']('change:_hasContext',(_0x5f24ee,_0x25308b,_0x567382)=>{this['isEnabled']&&(this['enabledCommandsIds']=F(this['_commandDefinitions'],_0x567382));}),this['set']('_hasContext',!0x1),this['on']('change:isEnabled',(_0x55b319,_0x2261dd,_0xcd152a)=>{this['enabledCommandsIds']=_0xcd152a?F(this['_commandDefinitions'],this['_hasContext']):[];});}['refresh'](){const _0x19e2d0=this['editor']['model'];this['_hasContext']=function(_0x3a82be){const _0x2c60a0=_0x3a82be['document']['selection'];return _0x2c60a0['isCollapsed']?0x0!==[..._0x2c60a0['getSelectedBlocks']()]['length']&&![..._0x2c60a0['getSelectedBlocks']()][0x0]['isEmpty']:!!_0x3a82be['hasContent'](_0x2c60a0['getFirstRange']());}(_0x19e2d0);const _0x5c5df6=_0x19e2d0['document']['selection'],_0x263b2c=this['editor']['config']['get']('ai.aiAssistant.disabledElements');for(const _0x46b6de of _0x5c5df6['getRanges']())for(const _0x2f5d9b of _0x46b6de['getItems']())if(_0x2f5d9b['is']('element')&&_0x263b2c['includes'](_0x2f5d9b['name']))return void(this['isEnabled']=!0x1);this['isEnabled']=!0x0;}['execute'](_0x4ba4c0='',_0x336ff0='',_0x516299='custom'){this['editor']['plugins']['get'](n)['showUI'](_0x4ba4c0,_0x336ff0,_0x516299);}}function F(_0x250a78,_0x292607){const _0xbc89a=new Set();for(const _0x594637 of _0x250a78['values']())(_0x292607||!0x1===_0x594637['requiresContent'])&&_0xbc89a['add'](_0x594637['id']);return Array['from'](_0xbc89a);}const Q=new RegExp(/^(.*?)<[a-zA-Z][a-zA-Z0-9_\-.]*[ >]/,'is');class j extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x1fca45(){['editor'];['textAdapter'];['view'];['_sanitizationContainer'];['_domParser'];['_xmlSerializer'];constructor(_0x5abeec,_0xa56385,_0xd25d37){super(),this['editor']=_0x5abeec,this['textAdapter']=_0xa56385,this['_sanitizationContainer']=document['createElement']('div'),this['_domParser']=new DOMParser(),this['_xmlSerializer']=new XMLSerializer(),this['view']=_0xd25d37,this['set']({'initialContext':'','currentContext':'','currentResponse':'','previousContext':void 0x0,'previousQuery':void 0x0,'previousLabel':void 0x0,'isProcessing':!0x1}),this['on']('set:currentContext',(_0x124512,_0x2a4624,_0x36041b)=>{this['view']['value']=this['_sanitizeHTML'](_0x36041b);}),this['listenTo'](this['view'],'submitPrompt',(_0x51849a,_0x1d2d7a)=>{const _0x3bd3d8=this['currentContext']||this['initialContext'];this['_handleQuery'](_0x1d2d7a,_0x3bd3d8,'custom');}),this['listenTo'](this['view'],'tryAgainEvent',()=>{this['view']['prompt']=this['previousLabel'],this['_handleQuery'](this['previousQuery'],this['previousContext'],this['previousActionId'],this['previousLabel']);}),this['listenTo'](this['view'],'stopProcessing',()=>{this['stopProcessing']();});}['destroy'](){this['stopListening']();}async['updateView']({actionId:_0xca69b4,query:_0xcd2cd0,htmlContent:_0x3f1541,label:_0x63e710,mainActionLabel:_0x57692d}){this['view']['prompt']=_0x63e710,this['view']['mainAction']=_0x57692d,this['initialContext']=_0x3f1541,_0xcd2cd0&&(this['view']['isRendered']?this['_handleQuery'](_0xcd2cd0,_0x3f1541,_0xca69b4,_0x63e710):this['view']['once']('render',()=>{this['_handleQuery'](_0xcd2cd0,_0x3f1541,_0xca69b4,_0x63e710);}));}['stopProcessing'](){this['isProcessing']&&(this['isProcessing']=!0x1,this['view']['finishProcessing'](),this['textAdapter']['abort']());}['reset'](){this['initialContext']='',this['currentContext']='',this['currentResponse']='',this['previousContext']='',this['previousQuery']='',this['previousLabel']='',this['previousActionId']=void 0x0,this['view']['reset'](),this['stopProcessing']();}async['_handleQuery'](_0x34c583,_0x2bdaaa,_0x3a1cde,_0x1389a1){return this['isProcessing']=!0x0,this['view']['startProcessing'](),this['previousContext']=_0x2bdaaa,this['previousQuery']=_0x34c583,this['previousLabel']=_0x1389a1||_0x34c583,this['previousActionId']=_0x3a1cde,new Promise(_0x4061f0=>{this['textAdapter']['makeRequest']({'query':_0x34c583,'context':_0x2bdaaa,'onData':_0x146904=>{this['currentResponse']=_0x146904,this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse']);},'actionId':_0x3a1cde})['then'](()=>{!this['currentContext']&&this['currentResponse']&&(this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse'],!0x0));})['catch'](_0x5f458d=>{_0x5f458d instanceof R?this['view']['handleError'](_0x5f458d['message']):this['view']['handleError'](),_0x4061f0();})['finally'](()=>{this['stopProcessing'](),_0x4061f0();});});}['_parseAndNormalizeContent'](_0x3870cf,_0x40cfa2=!0x1){const _0x1e0f53=Q['exec'](_0x3870cf);_0x3870cf=_0x1e0f53?_0x3870cf['substring'](_0x1e0f53[0x1]['length']):_0x3870cf['length']<0x64&&!_0x40cfa2?'':this['_stripMarkdownSyntax'](_0x3870cf);const _0x110ce4=this['_domParser']['parseFromString'](_0x3870cf,'text/html');if(_0x1e0f53){const _0x37cc8c=Array['from'](_0x110ce4['body']['childNodes']);_0x37cc8c['reverse']();for(const _0x88bf81 of _0x37cc8c){if(_0x88bf81['nodeType']==Node['ELEMENT_NODE'])break;_0x88bf81['remove']();}}const _0x5dbfd1=this['editor']['data']['processor']['toView'](this['_xmlSerializer']['serializeToString'](_0x110ce4['body']));this['_isH1TagSupportEnabled']()||this['_normalizeResponseHeadings'](_0x5dbfd1);const _0x3b9046=this['editor']['config']['get']('ai.aiAssistant.preserveComments'),_0x249a7e=this['editor']['data']['toModel'](_0x5dbfd1);return _0x3b9046||_0x249a7e['markers']['clear'](),this['editor']['data']['stringify'](_0x249a7e);}['_normalizeResponseHeadings'](_0x335789){const _0x55e9b5=new _0x667fee(this['editor']['editing']['view']['document']),_0x22f5a9=new _0x1cc8f3({'name':/^h[1-5]$/}),_0x55c38f=[];let _0x108f2f=!0x1;for(const _0x4b2d24 of _0x335789)_0x4b2d24['is']('element')&&_0x22f5a9['match'](_0x4b2d24)&&(_0x55c38f['push'](_0x4b2d24),'h1'==_0x4b2d24['name']&&(_0x108f2f=!0x0));if(_0x108f2f){for(const _0x38e959 of _0x55c38f)_0x55e9b5['rename']('h'+(parseInt(_0x38e959['name'][0x1])+0x1),_0x38e959);}}['_isH1TagSupportEnabled'](){const {data:_0x586c40,editing:_0x5ae44e}=this['editor'],_0x3f5444=_0x586c40['htmlProcessor']['toView']('<h1></h1>'),_0x72326c=_0x586c40['toView'](_0x586c40['toModel'](_0x3f5444));return!!_0x5ae44e['view']['domConverter']['viewToDom'](_0x72326c)['querySelector']('h1');}['_sanitizeHTML'](_0x4b24dc){return this['editor']['editing']['view']['domConverter']['setContentOf'](this['_sanitizationContainer'],_0x4b24dc),this['_sanitizationContainer']['innerHTML'];}['_stripMarkdownSyntax'](_0x1ab7f7){const _0x51f7bb=_0x1ab7f7['trim']();return _0x51f7bb['startsWith']('```html')?_0x51f7bb['endsWith']('```')?_0x51f7bb['substring'](0x7,_0x51f7bb['length']-0x3):_0x51f7bb['substring'](0x7):_0x1ab7f7;}}const _={'REPLACE':'replace','INSERT':'insert'};class at extends ot{constructor(_0x1c2f6d){super(_0x1c2f6d),this['set']('isVisible',!0x1),this['set']('mainAction',_['REPLACE']),this['replaceButton']=this['_createButton']('','ck-button-action'),this['replaceButton']['bind']('label')['to'](this,'mainAction',_0x1023b3=>i(_0x1c2f6d,'AI_'+_0x1023b3['toUpperCase']()+'_CONTENT')),this['insertButton']=this['_createButton'](i(_0x1c2f6d,'Insert\x20below')),this['tryAgainButton']=this['_createButton'](i(_0x1c2f6d,'Try\x20again')),this['stopButton']=this['_createButton'](i(_0x1c2f6d,'Stop'));const _0x30c718=this['bindTemplate'];this['extendTemplate']({'attributes':{'class':['ck-ai-form__toolbar',_0x30c718['if']('isVisible','ck-hidden',_0x2a17b7=>!_0x2a17b7)]}}),this['items']['addMany']([this['replaceButton'],this['insertButton'],this['tryAgainButton'],this['stopButton']]);}['_createButton'](_0x3a2eef,_0x2e63e6){const _0x503d4a=new _0x451bcf(this['locale']);return _0x503d4a['set']({'label':_0x3a2eef,'class':_0x2e63e6||'','isVisible':!0x0,'withText':!0x0}),_0x503d4a;}}class ct extends _0x3edbc3{['contentFieldView'];['copyButtonView'];constructor(_0x5e5b66,_0x30c03a=''){super(_0x5e5b66),this['set']({'value':null,'isVisible':!0x1,'isProcessing':!0x1});const _0x4940d4=this['bindTemplate'];this['contentFieldView']=new bt(_0x5e5b66,_0x30c03a),this['copyButtonView']=this['_createCopyButton'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area-wrapper',_0x4940d4['if']('isVisible','ck-hidden',_0x397627=>!_0x397627)],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area',_0x4940d4['if']('isProcessing','ck-ai-form__content-area--processing')]},'children':[this['contentFieldView'],{'tag':'div','attributes':{'class':['ck','ck-ai-form__copy-button-wrapper']},'children':[this['copyButtonView']]}]}]});}['render'](){super['render'](),this['value']&&this['contentFieldView']['setContent'](this['value']);let _0x38ed6f=!0x1;this['on']('change:value',(_0x216084,_0x40073c,_0x57743e)=>{const _0x31b99d=!this['contentFieldView']['element']['querySelector']('.ck-ai-form__loader');this['contentFieldView']['setContent'](_0x57743e),this['isProcessing']&&_0x31b99d&&!_0x38ed6f&&this['element']['scrollTo']({'top':this['element']['scrollHeight'],'behavior':'smooth'});}),this['on']('change:isProcessing',(_0x2f477e,_0x1920ad,_0x42c6f0)=>{_0x38ed6f=!0x1,_0x42c6f0?(this['value']=null,this['contentFieldView']['appendLoader']()):this['value']||this['contentFieldView']['setContent']('');}),this['listenTo'](this['element'],'wheel',()=>{_0x38ed6f=!0x0;}),this['listenTo'](this['element'],'mousedown',()=>{_0x38ed6f=!0x0;});}['focus'](){this['element']['focus']();}['_createCopyButton'](){const _0x16b435=this['locale'],_0x5d7620=new _0x451bcf(this['locale']),_0x2b410f='ck-ai-form__copy-button';return _0x5d7620['set']({'label':i(_0x16b435,'Copy'),'icon':_0x52d84e,'class':_0x2b410f,'tooltip':!0x0}),_0x5d7620['bind']('isVisible')['to'](this,'value',_0x41be2d=>!!_0x41be2d),_0x5d7620['bind']('isEnabled')['to'](this,'isProcessing',_0x187145=>!_0x187145),_0x5d7620['on']('execute',()=>{this['_copyHTMLToClipboard'](this['contentFieldView']['element']),_0x5d7620['icon']=_0x34aa88,_0x5d7620['class']=_0x2b410f+'\x20ck-ai-form__copy-button--copied',this['focus'](),setTimeout(()=>{_0x5d7620['icon']=_0x52d84e,_0x5d7620['class']=_0x2b410f;},0x3e8);}),_0x5d7620;}['_copyHTMLToClipboard'](_0xee6314){const {window:_0x469fe3,document:_0x56c70b}=_0x3b0b8;if(_0x469fe3['ClipboardItem']){const {Blob:_0x2fac64,ClipboardItem:_0x53a886}=_0x469fe3,_0x574bdf=[new _0x53a886({'text/html':new _0x2fac64([_0xee6314['innerHTML']],{'type':'text/html'}),'text/plain':new _0x2fac64([_0xee6314['textContent']||''],{'type':'text/plain'})})];navigator['clipboard']['write'](_0x574bdf);}else{const _0x52467b=_0x56c70b['createElement']('div');_0x52467b['style']['position']='absolute',_0x52467b['style']['left']='-9999px',_0x52467b['innerHTML']='<span>[</span>'+_0xee6314['innerHTML']+'<span>]</span>',_0x56c70b['body']['appendChild'](_0x52467b);const _0x1ff9f2=_0x56c70b['createRange']();_0x1ff9f2['setStartAfter'](_0x52467b['firstElementChild']),_0x1ff9f2['setEndBefore'](_0x52467b['lastElementChild']);const _0x3b0589=_0x469fe3['getSelection']();_0x3b0589['removeAllRanges'](),_0x3b0589['addRange'](_0x1ff9f2),_0x56c70b['execCommand']('copy'),_0x52467b['remove']();}}}class bt extends _0x3edbc3{constructor(_0x15bd25,_0x38017a=''){super(_0x15bd25),this['loaderView']=this['_createLoader'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-content',_0x38017a,'ck-reset_all-excluded','ck-ai-form__content-field']}});}['setContent'](_0x409a47){this['element']['innerHTML']=_0x409a47;}['appendLoader'](){this['element']['appendChild'](this['loaderView']['element']);}['_createLoader'](){const _0x312a26=new _0x3edbc3(),_0x37a559=this['locale'],_0x29abdf=new _0x4b67f5();return _0x29abdf['isVisible']=!0x0,_0x312a26['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__loader']},'children':[_0x29abdf,{'text':i(_0x37a559,'AI\x20is\x20writing...')}]}),_0x312a26['render'](),_0x312a26;}}class mt extends _0x3edbc3{constructor(_0xbd914a,_0x960c2a=''){super(_0xbd914a);const _0x4b2f11=new _0x22adfe(),_0x2fdb50=this['bindTemplate'];this['set']('text',_0x960c2a),_0x4b2f11['content']=_0x136f15,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__error']},'children':[_0x4b2f11,{'text':_0x2fdb50['to']('text')}]});}}class lt extends st{['submitButtonView'];['showHistoryButtonView'];constructor(_0x30d221,_0x3e1ef5){super(_0x30d221,_0x3e1ef5),this['queryView']['fieldView']['minRows']=0x1,this['queryView']['fieldView']['maxRows']=0x3,this['submitButtonView']=this['_createSubmitButton'](),this['showHistoryButtonView']=this['_createShowHistoryButton'](),this['focusableChildren']['add'](this['showHistoryButtonView'],0x1),this['focusableChildren']['add'](this['submitButtonView']);}['render'](){super['render'](),this['queryView']['fieldWrapperChildren']['add'](this['showHistoryButtonView']),this['children']['add'](this['submitButtonView']),this['keystrokes']['set']('enter',(_0x10eda2,_0x32221a)=>{_0x10eda2['target']==this['queryView']['fieldView']['element']&&(this['submit'](),_0x32221a());});}['_createSubmitButton'](){const _0x13b56c=new _0x451bcf(this['locale']),_0x100aa7=this['locale'];return _0x13b56c['set']({'icon':it,'label':i(_0x100aa7,'Submit'),'isVisible':!0x0,'tooltip':!0x0,'class':'ck-ai-form__submit'}),_0x13b56c['on']('execute',()=>{this['submit']();}),_0x13b56c['bind']('isEnabled')['to'](this['queryView']['fieldView'],'isEmpty',this,'isEnabled',(_0x178186,_0x4fcb51)=>!_0x178186&&_0x4fcb51),_0x13b56c;}['_createShowHistoryButton'](){const _0x214e8a=new _0x451bcf(this['locale']),_0x21d3bb=this['resultsView'],_0x8e935=this['locale'];_0x214e8a['set']({'label':i(_0x8e935,'History'),'withText':!0x1,'icon':tt,'tooltip':!0x0,'tooltipPosition':'sw','class':'ck-ai-form__toggle-history'}),_0x214e8a['bind']('isOn')['to'](_0x21d3bb,'isVisible'),_0x214e8a['bind']('isEnabled')['to'](this,'isEnabled'),_0x214e8a['on']('execute',()=>{_0x21d3bb['isVisible']=!_0x21d3bb['isVisible'],_0x21d3bb['isVisible']?this['filteredView']['focus']():this['focus']();});const _0x8f2515=()=>{_0x3b0b8['window']['requestAnimationFrame'](()=>{if(_0x556e7e(this['element'])){const _0x33e4ae=new _0x26ebfa(this['queryView']['fieldView']['element']),_0x592722=_0x33e4ae['width'],_0x4a3497='rtl'===_0x8e935['uiLanguageDirection']?'left':'right';_0x33e4ae['excludeScrollbarsAndBorders'](),_0x214e8a['element']['style'][_0x4a3497]=_0x592722-_0x33e4ae['width']+0x1+'px';}});};return this['queryView']['fieldView']['on']('update',_0x8f2515),this['on']('render',_0x8f2515),_0x214e8a;}['submit'](){const _0x195e59=this['queryView']['fieldView']['element']['value'];this['fire']('submit',_0x195e59);}['focus'](_0x2bcc17){-0x1===_0x2bcc17?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}}class pt extends yt{['historyGroupView'];['clearHistoryButton'];constructor(_0x2c2319){super(_0x2c2319),this['clearHistoryButton']=this['_createClearHistoryButton'](),this['historyGroupView']=new Ct(),this['historyGroupView']['children']['add'](this['clearHistoryButton'],0x1),this['historyGroupView']['label']=i(_0x2c2319,'Prompt\x20history'),this['historyGroupView']['items']['delegate']('execute')['to'](this),this['items']['add'](this['historyGroupView']);}['filter'](){let _0x51138d=0x0;for(const _0x493ff4 of this['items'])_0x51138d+=_0x493ff4['items']['length'];return{'resultsCount':_0x51138d,'totalItemsCount':_0x51138d};}['_createClearHistoryButton'](){const _0x431c64=this['locale'],_0x5c6df2=new _0x451bcf(this['locale']);return _0x5c6df2['set']({'label':'('+i(_0x431c64,'Clear')+')','withText':!0x0}),_0x5c6df2['on']('execute',()=>this['fire']('clearHistory')),_0x5c6df2;}}class ut extends xt{constructor(_0x32fd9f){super();const _0x71709b=new wt(),_0x44a0d3=new _0x451bcf(this['locale'],_0x71709b);this['children']['add'](_0x44a0d3),_0x44a0d3['set']({'label':_0x32fd9f['prompt'],'withText':!0x0}),_0x44a0d3['on']('execute',()=>{this['fire']('execute',{'value':kt(_0x32fd9f['prompt'])});});}}const ts='CKEditor/AIFormView/PromptHistory';class dt extends _0x4a2166{constructor(){super(),this['_loadFromSessionStorage'](),this['on']('add',(_0x405a7e,_0x52e1a6)=>{const _0x1c1234=os(_0x52e1a6['prompt']);for(const _0x463cdf of this)if(_0x463cdf!=_0x52e1a6&&os(_0x463cdf['prompt'])===_0x1c1234){this['remove'](_0x463cdf);break;}this['length']>0x14&&this['remove'](this['last']),this['_saveToSessionStorage']();}),this['on']('remove',()=>{this['_saveToSessionStorage']();});}['_loadFromSessionStorage'](){const _0xec501e=sessionStorage['getItem'](ts)||'[]';this['addMany'](JSON['parse'](_0xec501e));}['_saveToSessionStorage'](){sessionStorage['setItem'](ts,JSON['stringify'](this['map'](_0x21273a=>_0x21273a)));}}function os(_0x28ca20){return _0x28ca20['toLowerCase']()['trim']();}class k extends _0x3edbc3{['focusTracker'];['keystrokes'];['contentArea'];['toolbar'];['promptView'];['errorView'];['_focusables'];['focusCycler'];['_promptHistory'];constructor(_0x405e03,_0x2b4a71,_0x51b2b8=''){super(_0x405e03),this['set']('isEnabled',!0x0),this['set']('isProcessing',!0x1),this['set']('prompt',''),this['set']('value',''),this['set']('isError',!0x1),this['set']('mainAction',_['REPLACE']),this['_promptHistory']=new dt(),this['errorView']=new mt(_0x405e03),this['contentArea']=new ct(_0x405e03,_0x51b2b8),this['contentArea']['bind']('isProcessing')['to'](this),this['contentArea']['bind']('value')['to'](this),this['toolbar']=this['_createToolbar'](),this['toolbar']['bind']('mainAction')['to'](this),this['promptView']=this['_createPromptView'](),this['focusTracker']=new et(),this['keystrokes']=new rt(),this['_focusables']=this['createCollection']([this['contentArea'],this['contentArea']['copyButtonView'],this['toolbar'],this['promptView']]),this['focusCycler']=new ht({'focusables':this['_focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift\x20+\x20tab','focusNext':'tab'}}),this['focusCycler']['chain'](this['promptView']['focusCycler']),this['promptView']['queryView']['fieldView']['bind']('value')['to'](this,'prompt');const _0x521e02=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form',_0x2b4a71],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form-content']},'children':[{'tag':'div','attributes':{'class':[_0x521e02['if']('isError','ck-hidden',_0x132a4b=>!_0x132a4b)]},'children':[this['errorView']]},this['contentArea'],this['toolbar'],this['promptView']]}]});}['render'](){super['render'](),this['focusTracker']['add'](this['contentArea']['element']),this['focusTracker']['add'](this['contentArea']['copyButtonView']['element']),this['focusTracker']['add'](this['toolbar']['element']),this['focusTracker']['add'](this['promptView']['element']),this['keystrokes']['listenTo'](this['element']);}['focus'](_0x1b493f=0x1){-0x1===_0x1b493f?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['reset'](){this['prompt']='',this['value']='',this['isError']=!0x1,this['promptView']['reset'](),this['contentArea']['isVisible']=!0x1,this['toolbar']['isVisible']=!0x1;}['_createPromptView'](){const _0x26b11a=this['locale'],_0x2b2e04=new lt(_0x26b11a,{'queryView':{'label':i(_0x26b11a,'Ask\x20AI\x20to\x20edit\x20or\x20generate'),'creator':nt,'showIcon':!0x1,'showResetButton':!0x1},'infoView':{'text':{'noSearchableItems':{'primary':i(_0x26b11a,'Empty\x20history'),'secondary':i(_0x26b11a,'Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.')}}},'filteredView':this['_createHistoryView'](),'queryMinChars':0x1/0x0,'resetOnBlur':!0x1});return _0x2b2e04['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x1ea322,_0x381158)=>_0x1ea322&&!_0x381158),this['listenTo'](_0x2b2e04,'submit',(_0xfe2898,_0x1856d3)=>{this['prompt']=_0x1856d3;const _0x5156a8=ft(_0x1856d3);this['fire']('submitPrompt',_0x5156a8),_0x1856d3['trim']()&&this['_promptHistory']['add']({'prompt':_0x5156a8},0x0);},{'priority':'high'}),_0x2b2e04;}['_createHistoryView'](){const _0x2764bb=new pt(this['locale']);return _0x2764bb['historyGroupView']['items']['bindTo'](this['_promptHistory'])['as'](ut),_0x2764bb['on']('clearHistory',()=>{this['_promptHistory']['clear'](),this['promptView']['search'](''),this['promptView']['focus']();}),_0x2764bb;}['_createToolbar'](){const _0x288f33=new at(this['locale']);return _0x288f33['replaceButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x4ee461,_0x12f4aa,_0x4f1511)=>_0x4ee461&&!_0x12f4aa&&!!_0x4f1511),_0x288f33['replaceButton']['delegate']('execute')['to'](this,'replaceContent'),_0x288f33['insertButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x2d8ab9,_0xd2280a,_0x4d33b7)=>_0x2d8ab9&&!_0xd2280a&&!!_0x4d33b7),_0x288f33['insertButton']['delegate']('execute')['to'](this,'insertContentBelow'),_0x288f33['tryAgainButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x5f12ef,_0x4beb5c)=>_0x5f12ef&&!_0x4beb5c),_0x288f33['tryAgainButton']['delegate']('execute')['to'](this,'tryAgainEvent'),_0x288f33['stopButton']['bind']('isEnabled')['to'](this,'isProcessing'),_0x288f33['stopButton']['delegate']('execute')['to'](this,'stopProcessing'),_0x288f33;}['startProcessing'](){this['value']='',this['isError']=!0x1,this['isProcessing']=!0x0,this['contentArea']['isVisible']=!0x0,this['toolbar']['isVisible']=!0x0,this['contentArea']['focus']();}['finishProcessing'](){const _0x3d25ba=this['locale'];this['isProcessing']=!0x1,this['prompt']='',this['promptView']['reset'](),this['value']&&(this['promptView']['queryView']['label']=i(_0x3d25ba,'Ask\x20AI\x20to\x20improve\x20generated\x20text'));}['handleError'](_0x782dae){const _0x1f0c6d=this['locale'];this['finishProcessing'](),this['isError']=!0x0,this['errorView']['text']=_0x782dae||i(_0x1f0c6d,'AI_ERROR_FAILED'),this['value']||(this['contentArea']['isVisible']=!0x1);}}const l=globalThis['DataTransfer'];class n extends _0x229599{['licenseKey'];['_licenseKeyCheckInterval'];['_dialog'];['_formView'];['_aiAdapter'];['_aiAssistantController'];['_uiCssClasses']='';static get['pluginName'](){return'AIAssistantUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[_0x52718a,a,x,_0x380b7d];}constructor(_0x46cafd){super(_0x46cafd),_0x46cafd['config']['define']('ai.aiAssistant.disabledElements',['media','rawHtml','tableOfContents']),_0x46cafd['config']['define']('ai.aiAssistant.contentAreaCssClass',''),_0x46cafd['config']['define']('ai.useTheme',!0x0),this['_uiCssClasses']='ck-ai-assistant-ui'+(_0x46cafd['config']['get']('ai.useTheme')?'\x20ck-ai-assistant-ui_theme':'');}['init'](){const {editor:_0x4b4868}=this;this['_aiAdapter']=_0x4b4868['plugins']['get'](x),this['_dialog']=_0x4b4868['plugins']['get'](_0x380b7d),this['_formView']=null,this['_commandDefinitions']=this['_getResolvedCommandsDefinitions']();const _0x375f2c=new E(_0x4b4868,Array['from'](this['_commandDefinitions']['values']()));_0x4b4868['commands']['add']('showAIAssistant',_0x375f2c),_0x4b4868['ui']['componentFactory']['add']('aiCommands',_0xf06789=>{const _0x53da5d=_0x58c081(_0xf06789);return _0x53da5d['set']({'class':'ck-ai-commands-dropdown\x20'+this['_uiCssClasses']}),_0x53da5d['buttonView']['set']({'label':i(_0xf06789,'AI\x20Commands'),'icon':_0x1763b6,'tooltip':!0x0}),_0x53da5d['on']('execute',_0x255425=>this['_onExecute'](_0x255425['source']['id'])),_0x1156b2(_0x53da5d,_0x4b4868['ui']['view']['body'],function(_0x4bcfa8){const _0xab6397=o(_0x4bcfa8['config']['get']('ai.aiAssistant.commands'),_0x4bcfa8['locale']),_0x62f7f5=U(_0x4bcfa8,_0xab6397)['filter'](_0x331349=>_0x331349['commands']['length']);if(0x1===_0x62f7f5['length'])return U(_0x4bcfa8,_0x62f7f5[0x0]['commands'])['map'](_0x2dc477=>({'id':_0x2dc477['id'],'label':_0x2dc477['label']}));return _0x62f7f5['map'](_0x2287c1=>{const {groupId:_0x1f4c5f,groupLabel:_0xdc2e4f,commands:_0x4442a3}=_0x2287c1,_0x2d3035=U(_0x4bcfa8,_0x4442a3)['map'](_0x53e8ba=>({'id':_0x53e8ba['id'],'label':_0x53e8ba['label']}));return{'id':_0x1f4c5f,'menu':_0xdc2e4f||_0x1f4c5f,'children':_0x2d3035};});}(_0x4b4868),{'ariaLabel':i(_0xf06789,'AI\x20Commands')}),_0x53da5d['menuView']['menuPanelClass']='ck-ai-commands-dropdown\x20'+this['_uiCssClasses'],_0x375f2c['on']('change:enabledCommandsIds',_0x133741),_0x53da5d['menuView']['once']('render',_0x133741),_0x53da5d;function _0x133741(){_0x53da5d['isEnabled']=_0x375f2c['enabledCommandsIds']['length']>0x0;for(const _0x18c1b5 of _0x53da5d['menuView']['buttons'])_0x18c1b5['isEnabled']=_0x375f2c['enabledCommandsIds']['includes'](_0x18c1b5['id']);}}),_0x4b4868['ui']['componentFactory']['add']('menuBar:aiCommands',_0x528c82=>{const _0x377bab=new _0x3f8494(_0x528c82);_0x377bab['buttonView']['set']({'label':i(_0x528c82,'AI\x20Commands'),'icon':_0x1763b6}),_0x377bab['bind']('isEnabled')['to'](_0x375f2c,'enabledCommandsIds',_0x53e2a2=>_0x53e2a2['length']>0x0);const _0x1b2b6f=o(_0x4b4868['config']['get']('ai.aiAssistant.commands'),_0x528c82);return this['_populateMenuBarMenu'](_0x375f2c,_0x377bab,_0x1b2b6f,_0x4f16ba=>this['_onExecute'](_0x4f16ba)),_0x377bab;}),_0x4b4868['ui']['componentFactory']['add']('aiAssistant',()=>{const _0x20f02c=this['_createAIAssistantUIButton'](_0x451bcf);return _0x20f02c['set']({'tooltip':!0x0,'class':'ck-ai-assistant-button\x20'+this['_uiCssClasses']}),_0x20f02c;}),_0x4b4868['ui']['componentFactory']['add']('menuBar:aiAssistant',()=>{const _0x59ba54=this['_createAIAssistantUIButton'](_0x4bb7ac);return _0x59ba54['set']({'role':'menuitemcheckbox'}),_0x59ba54;}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x59e519=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x2a182b;for(const _0x3b3bc0 in _0x59e519){const _0x15af16=_0x3b3bc0,_0x3e1344=_0x59e519[_0x15af16];if('aiLicenseKeyValid'==_0x3e1344||'aiLicenseKeyInvalid'==_0x3e1344||'aiLicenseKeyExpired'==_0x3e1344||'aiLicenseKeyDomainLimit'==_0x3e1344||'aiLicenseKeyNotAllowed'==_0x3e1344||'aiLicenseKeyEvaluationLimit'==_0x3e1344||'aiLicenseKeyTrialLimit'==_0x3e1344||'aiLicenseKeyUsageLimit'==_0x3e1344){delete _0x59e519[_0x15af16],_0x2a182b=_0x3e1344,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'aiLicenseKeyInvalid'==_0x2a182b&&_0x59e519['_showLicenseError']('invalid'),'aiLicenseKeyExpired'==_0x2a182b&&_0x59e519['_showLicenseError']('expired'),'aiLicenseKeyDomainLimit'==_0x2a182b&&_0x59e519['_showLicenseError']('domainLimit'),'aiLicenseKeyNotAllowed'==_0x2a182b&&_0x59e519['_showLicenseError']('featureNotAllowed','AIAssistant'),'aiLicenseKeyEvaluationLimit'==_0x2a182b&&_0x59e519['_showLicenseError']('evaluationLimit'),'aiLicenseKeyTrialLimit'==_0x2a182b&&_0x59e519['_showLicenseError']('trialLimit'),'aiLicenseKeyUsageLimit'==_0x2a182b&&_0x59e519['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['showUI'](_0x49bca5='',_0x1993b3='',_0x3921e1='custom'){const _0x24d4e0=this['editor'],_0x301533=_0x24d4e0['editing']['view'],_0x28f427=_0x24d4e0['plugins']['get'](a),_0x507732=_0x24d4e0['plugins']['get'](_0x52718a);_0x28f427['showFakeVisualSelection']();const _0x31ca9f=new l(),_0x331903=new ClipboardEvent('copy',{'clipboardData':_0x31ca9f}),_0x46d2e1=new _0x1ad6a4(_0x31ca9f),_0x4ca93d=new _0x3cd63(_0x301533,_0x331903,{'dataTransfer':_0x46d2e1});_0x507732['_forceMarkersCopy']('comment',()=>{_0x301533['document']['fire']('copy',_0x4ca93d);}),this['_formView']||(this['_initView'](),this['_aiAssistantController']=new j(_0x24d4e0,this['_aiAdapter']['textAdapter'],this['_formView']));let _0x4b9617=_0x46d2e1['getData']('text/html');const _0x549dd7=_0x24d4e0['model']['document']['selection'],_0x5d4f48=Array['from'](_0x549dd7['getRanges']());0x1===_0x5d4f48['length']&&_0x5d4f48[0x0]['isFlat']&&!_0x549dd7['getSelectedElement']()&&''!==_0x4b9617['replace'](/ /g,'')['trim']()&&(_0x4b9617='<p>'+_0x4b9617+'</p>'),this['_aiAssistantController']['updateView']({'actionId':_0x3921e1,'query':_0x49bca5,'htmlContent':_0x4b9617,'label':_0x1993b3,'mainActionLabel':_[_0x24d4e0['model']['document']['selection']['isCollapsed']?'INSERT':'REPLACE']}),'aiAssistant'!==this['_dialog']['id']?this['_dialog']['show']({'id':'aiAssistant','icon':_0x4c2773,'title':i(this['editor']['locale'],'AI\x20Assistant'),'content':this['_formView'],'position':_0x1b757b['EDITOR_TOP_SIDE'],'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_aiAssistantController']['reset'](),_0x28f427['hideFakeVisualSelection']();}}):this['_dialog']['view']['wasMoved']||this['_dialog']['view']['updatePosition']();}['hideUI'](){this['_dialog']['hide']();}['_getResolvedCommandsDefinitions'](){const _0x34a907=new Map(),_0x3f651a=o(this['editor']['config']['get']('ai.aiAssistant.commands'),this['editor']['locale']);for(const _0x17e1ce of _0x3f651a)for(const _0x53fb91 of _0x17e1ce['commands'])_0x34a907['set'](_0x53fb91['id'],{..._0x53fb91,'groupId':_0x17e1ce['groupId'],'groupLabel':_0x17e1ce['groupLabel']||_0x17e1ce['groupId']});return _0x34a907;}['_createAIAssistantUIButton'](_0x3f3bb6){const _0x4575ad=this['editor'],_0x1604ee=_0x4575ad['commands']['get']('showAIAssistant'),_0x13a801=new _0x3f3bb6(_0x4575ad['locale']);return _0x13a801['set']({'label':i(_0x4575ad['locale'],'AI\x20Assistant'),'icon':_0x4c2773,'isToggleable':!0x0}),_0x13a801['bind']('isEnabled')['to'](_0x1604ee),_0x13a801['bind']('isOn')['to'](this['_dialog'],'id',_0x28e61d=>'aiAssistant'===_0x28e61d),this['listenTo'](_0x13a801,'execute',()=>{_0x13a801['isOn']?this['hideUI']():_0x1604ee['execute']();}),_0x13a801;}['_initView'](){const _0x530b48=this['editor']['plugins']['get'](a);this['_formView']=new k(this['editor']['locale'],this['_uiCssClasses'],this['editor']['config']['get']('ai.aiAssistant.contentAreaCssClass')),this['_formView']['on']('change:value',()=>{this['_dialog']['view']['wasMoved']||this['_dialog']['view']['updatePosition']();}),this['_formView']['promptView']['queryView']['fieldView']['on']('update',()=>{this['_dialog']['view']['wasMoved']||this['_dialog']['view']['updatePosition']();}),this['listenTo'](this['_formView'],'replaceContent',()=>{_0x530b48['insertContent'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['listenTo'](this['_formView'],'insertContentBelow',()=>{_0x530b48['insertContentBelow'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['_initAriaAiStatusChangeAnnouncements']();}['_initAriaAiStatusChangeAnnouncements'](){const {locale:_0x12e126,ui:{ariaLiveAnnouncer:_0xf5b213}}=this['editor'];this['_formView']['contentArea']['on']('change:isProcessing',(_0x37e51b,_0x2d2377,_0x3fe99f)=>{const _0x2da964=this['_aiAssistantController']['currentContext'];_0x3fe99f?_0xf5b213['announce'](i(_0x12e126,'AI\x20is\x20writing')):_0x2da964&&_0xf5b213['announce'](i(_0x12e126,'Generated\x20content:\x20%0',_0x2da964),{'politeness':'polite','isUnsafeHTML':!0x0});}),this['_formView']['on']('change:isError',(_0x742f81,_0x49f916,_0x4b6d3f)=>{if(_0x4b6d3f){const _0x507daf=this['_formView']['errorView']['text'];_0xf5b213['announce'](i(_0x12e126,'Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x507daf));}});}['_onExecute'](_0x32e552){const _0x3bd751=this['_commandDefinitions']['get'](_0x32e552),_0x225832=this['editor'],_0x13b48c=_0x225832['model']['document']['selection'],_0xf34641=_0x225832['commands']['get']('showAIAssistant'),_0x465cf6=_0x225832['plugins']['get'](a),_0x53b614=''+(_0x3bd751['groupId']!==K?_0x3bd751['groupLabel']+':\x20':'')+_0x3bd751['label'];if(!0x1!==_0x3bd751['requiresContent']&&_0x13b48c['isCollapsed']){const _0x5b46b7=_0xa95bf(_0x13b48c['getSelectedBlocks']())||_0x225832['model']['schema']['getLimitElement'](_0x13b48c);_0x225832['model']['change'](_0x26d04d=>{_0x26d04d['setSelection'](_0x5b46b7,'in');});}_0x465cf6['showFakeVisualSelection'](),_0xf34641['execute'](_0x3bd751['prompt'],_0x53b614,'command:'+_0x32e552);}['_populateMenuBarMenu'](_0x53bb4e,_0x977606,_0x546ad9,_0x5098d4){const _0x29768f=this['editor'],_0x3df944=_0x29768f['locale'],_0x5e0fc3=new _0x5c77e6(_0x3df944),_0x3c0e7e=U(_0x29768f,_0x546ad9)['filter'](_0xacf98=>_0xacf98['commands']['length']);0x1===_0x3c0e7e['length']?this['_getMenuBarGroupButtons']({'command':_0x53bb4e,'commands':_0x3c0e7e[0x0]['commands'],'parentMenuView':_0x977606,'onExecute':_0x5098d4})['forEach'](_0x480afb=>_0x5e0fc3['items']['add'](_0x480afb)):_0x3c0e7e['forEach'](({groupId:_0x5d9e7f,groupLabel:_0x55f6bd,commands:_0x138eda})=>{const _0x9fc5ea=new _0x1ffa5c(_0x3df944,_0x977606),_0x229b1b=new _0x3f8494(_0x3df944),_0x17394a=new _0x5c77e6(_0x3df944),_0x45d152=this['_getMenuBarGroupButtons']({'command':_0x53bb4e,'commands':_0x138eda,'parentMenuView':_0x229b1b,'onExecute':_0x5098d4});_0x229b1b['buttonView']['set']({'label':_0x55f6bd||_0x5d9e7f}),_0x229b1b['delegate']('execute')['to'](_0x977606),_0x17394a['items']['addMany'](_0x45d152),_0x229b1b['panelView']['children']['add'](_0x17394a),_0x9fc5ea['children']['add'](_0x229b1b),_0x5e0fc3['items']['add'](_0x9fc5ea);}),_0x977606['panelView']['children']['add'](_0x5e0fc3);}['_getMenuBarGroupButtons']({command:_0x518cf1,commands:_0x460b21,parentMenuView:_0x2e2ead,onExecute:_0x2e7dc4}){const _0x542e69=this['editor'],_0x467aa4=_0x542e69['locale'];return U(_0x542e69,_0x460b21)['map'](_0x51bf4c=>{const _0x1d0453=new _0x1ffa5c(_0x467aa4,_0x2e2ead),_0x1b4690=new _0x4bb7ac(_0x467aa4);return _0x1b4690['set']({'label':_0x51bf4c['label']}),_0x1b4690['delegate']('execute')['to'](_0x2e2ead),_0x1b4690['on']('execute',()=>_0x2e7dc4(_0x51bf4c['id'])),_0x1b4690['bind']('isEnabled')['to'](_0x518cf1,'enabledCommandsIds',_0x3d3c16=>_0x3d3c16['includes'](_0x51bf4c['id'])),_0x1d0453['children']['add'](_0x1b4690),_0x1d0453;});}}function T(_0x5b8cfa,_0x5653ff){return void 0x0!==_0x5b8cfa['order']&&void 0x0===_0x5653ff['order']?0x1:void 0x0===_0x5b8cfa['order']&&void 0x0!==_0x5653ff['order']?-0x1:void 0x0!==_0x5b8cfa['order']&&void 0x0!==_0x5653ff['order']?_0x5b8cfa['order']-_0x5653ff['order']:0x0;}function U(_0x10f4f8,_0x183a9c){_0x183a9c['sort'](T);const _0x155ae0={},_0x4b29a5=[];for(const _0x486f9f of _0x183a9c)if(void 0x0!==_0x486f9f['order']){if(_0x486f9f['order']in _0x155ae0)throw new _0x4853ec('ai-commands-config-order-collision',_0x10f4f8,{'conflictingDefinitions':[_0x486f9f,_0x155ae0[_0x486f9f['order']]]});_0x155ae0[_0x486f9f['order']]=_0x486f9f,_0x4b29a5['splice'](_0x486f9f['order'],0x0,_0x486f9f);}else _0x4b29a5['push'](_0x486f9f);return _0x4b29a5;}class At extends _0x229599{static get['requires'](){return[n,a];}static get['pluginName'](){return'AIAssistant';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3f1317){super(_0x3f1317);const _0x1067cc=_0x3f1317['config'],_0x2cd6de=_0x3f1317['locale'];_0x1067cc['define']('ai.aiAssistant.preserveComments',!0x0),_0x1067cc['define']('ai.aiAssistant.commands',_t(_0x2cd6de)),_0x1067cc['define']('ai.aiAssistant.extraCommandGroups',[]),_0x1067cc['define']('ai.aiAssistant.removeCommands',[]);let _0x482f93=o(_0x1067cc['get']('ai.aiAssistant.commands'),_0x2cd6de);const _0x4160c6=_0x1067cc['get']('ai.aiAssistant.extraCommandGroups'),_0x398c6d=_0x1067cc['get']('ai.aiAssistant.removeCommands');_0x4160c6['forEach'](_0x452def=>{const _0xef552c=_0x482f93['find'](_0x332b2c=>_0x332b2c['groupId']===_0x452def['groupId']);_0xef552c?_0xef552c['commands']=_0xef552c['commands']['concat'](_0x452def['commands']):_0x482f93['push'](_0x452def);}),_0x482f93=_0x482f93['filter'](_0x2ed5d1=>!_0x398c6d['includes'](_0x2ed5d1['groupId'])),_0x482f93['forEach'](_0x2e80d3=>{_0x2e80d3['commands']=_0x2e80d3['commands']['filter'](_0x1af771=>!_0x398c6d['includes'](_0x1af771['id']));}),_0x1067cc['set']('ai.aiAssistant.commands',_0x482f93);}}function _t(_0x1aa606){return[{'groupId':'editOrReview','groupLabel':i(_0x1aa606,'Edit\x20or\x20review'),'commands':[{'id':'improveWriting','label':i(_0x1aa606,'Improve\x20writing'),'prompt':'Fix\x20spelling\x20mistakes,\x20use\x20proper\x20grammar\x20and\x20apply\x20good\x20writing\x20practices.\x20Do\x20not\x20lose\x20the\x20original\x20meaning.'},{'id':'makeShorter','label':i(_0x1aa606,'Make\x20shorter'),'prompt':'Remove\x20any\x20repetitive,\x20redundant,\x20or\x20non-essential\x20writing\x20in\x20this\x20content\x20without\x20changing\x20the\x20meaning\x20or\x20losing\x20any\x20key\x20information.'},{'id':'makeLonger','label':i(_0x1aa606,'Make\x20longer'),'prompt':'Improve\x20this\x20content\x20by\x20using\x20descriptive\x20language\x20and\x20inserting\x20more\x20information\x20and\x20more\x20detailed\x20explanations.'},{'id':'simplifyLanguage','label':i(_0x1aa606,'Simplify\x20language'),'prompt':'Simplify\x20the\x20writing\x20style\x20of\x20this\x20content\x20and\x20reduce\x20the\x20complexity,\x20so\x20that\x20the\x20content\x20is\x20easy\x20to\x20understand.'}]},{'groupId':'generate','groupLabel':i(_0x1aa606,'Generate\x20from\x20selection'),'commands':[{'id':'summarize','label':i(_0x1aa606,'Summarize'),'prompt':'Summarize\x20this\x20content\x20into\x20one\x20paragraph\x20of\x20text.\x20Include\x20only\x20the\x20key\x20ideas\x20and\x20conclusions.\x20Keep\x20it\x20short.\x20Do\x20not\x20keep\x20original\x20text\x20formatting.'},{'id':'continue','label':i(_0x1aa606,'Continue'),'prompt':'Start\x20with\x20the\x20provided\x20content\x20and\x20write\x20at\x20the\x20end\x20of\x20it\x20continuing\x20this\x20topic.\x20Keep\x20the\x20added\x20part\x20short.'}]},{'groupId':'changeTone','groupLabel':i(_0x1aa606,'Change\x20tone'),'commands':[{'id':'professional','label':i(_0x1aa606,'Professional'),'prompt':'Improve\x20using\x20polished,\x20formal,\x20and\x20respectful\x20language\x20to\x20convey\x20professional\x20expertise\x20and\x20competence.'},{'id':'casual','label':i(_0x1aa606,'Casual'),'prompt':'Improve\x20using\x20casual,\x20informal\x20language\x20to\x20convey\x20a\x20casual\x20conversation\x20with\x20a\x20real\x20person.'},{'id':'direct','label':i(_0x1aa606,'Direct'),'prompt':'Improve\x20using\x20direct\x20language,\x20using\x20only\x20the\x20essential\x20information.'},{'id':'confident','label':i(_0x1aa606,'Confident'),'prompt':'Improve\x20using\x20compelling,\x20optimistic\x20language\x20to\x20convey\x20confidence\x20in\x20the\x20writing.'},{'id':'friendly','label':i(_0x1aa606,'Friendly'),'prompt':'Improve\x20using\x20friendly,\x20comforting\x20language,\x20to\x20convey\x20understanding\x20and\x20empathy.'}]},{'groupId':'changeStyle','groupLabel':i(_0x1aa606,'Change\x20style'),'commands':[{'id':'business','label':i(_0x1aa606,'Business'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20business\x20professional\x20with\x20formal\x20language.'},{'id':'legal','label':i(_0x1aa606,'Legal'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20legal\x20professional\x20using\x20valid\x20legal\x20terminology.'},{'id':'journalism','label':i(_0x1aa606,'Journalism'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20journalist\x20using\x20engaging\x20language\x20to\x20convey\x20the\x20importance\x20of\x20the\x20information.'},{'id':'poetic','label':i(_0x1aa606,'Poetic'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20poem\x20using\x20poetic\x20techniques\x20without\x20losing\x20the\x20original\x20meaning.'}]},{'groupId':'translate','groupLabel':i(_0x1aa606,'Translate'),'commands':[{'id':'translateEnglish','label':i(_0x1aa606,'English'),'prompt':'Translate\x20the\x20content\x20to\x20English\x20language.'},{'id':'translateSpanish','label':i(_0x1aa606,'Spanish'),'prompt':'Translate\x20the\x20content\x20to\x20Spanish\x20language.'},{'id':'translatePortuguese','label':i(_0x1aa606,'Portuguese'),'prompt':'Translate\x20the\x20content\x20to\x20Portuguese\x20language.'},{'id':'translateGerman','label':i(_0x1aa606,'German'),'prompt':'Translate\x20the\x20content\x20to\x20German\x20language.'},{'id':'translateFrench','label':i(_0x1aa606,'French'),'prompt':'Translate\x20the\x20content\x20to\x20French\x20language.'},{'id':'translateChinese','label':i(_0x1aa606,'Simplified\x20Chinese'),'prompt':'Translate\x20the\x20content\x20to\x20Simplified\x20Chinese\x20language.'},{'id':'translateHindi','label':i(_0x1aa606,'Hindi'),'prompt':'Translate\x20the\x20content\x20to\x20Hindi\x20language.'},{'id':'translateArabic','label':i(_0x1aa606,'Arabic'),'prompt':'Translate\x20the\x20content\x20to\x20Arabic\x20language.'}]}];}class S extends _0x229599{['abortController'];static get['requires'](){return[x];}constructor(_0x3df771){super(_0x3df771),this['abortController']=new AbortController();}['init'](){this['editor']['plugins']['get'](x)['textAdapter']=this;}['abort'](){this['abortController']['signal']['aborted']||(this['abortController']['abort'](),this['abortController']=new AbortController());}async['makeRequest'](_0x2943d0){return this['sendRequest'](_0x2943d0)['catch'](_0x383400=>{if(_0x383400 instanceof R)return Promise['reject'](_0x383400);if('AbortError'==_0x383400['name'])return Promise['resolve']();throw console['error'](_0x383400),new _0x4853ec('aitextadapter-send-request-failed',null);});}async['_prepareRequestHeaders'](_0x5f15d9,_0x16b095){const _0x541380=this['editor']['locale'],_0x5bffd3={'Content-Type':'application/json'};if('object'==typeof _0x5f15d9)Object['assign'](_0x5bffd3,_0x5f15d9);else{if(_0x5f15d9)try{const _0x910d6c=await _0x5f15d9(_0x16b095);Object['assign'](_0x5bffd3,_0x910d6c);}catch{return Promise['reject'](new R(i(_0x541380,'AI_ERROR_GET_HEADERS')));}}return _0x5bffd3;}async['_prepareRequestParameters'](_0x4b7939,_0x2ff790){const _0x2e5074=this['editor']['locale'];if('object'==typeof _0x4b7939)return _0x4b7939;try{return await _0x4b7939(_0x2ff790);}catch{return Promise['reject'](new R(i(_0x2e5074,'AI_ERROR_GET_PARAMETERS')));}}}class It extends S{['_apiUrl'];['_requestHeaders'];['_requestParameters'];static get['pluginName'](){return'OpenAITextAdapter';}constructor(_0x3de624){super(_0x3de624),_0x3de624['config']['define']('ai.openAI.apiUrl','https://api.openai.com/v1/chat/completions'),_0x3de624['config']['get']('ai.openAI.requestParameters')||_0x3de624['config']['define']('ai.openAI.requestParameters',{'model':'gpt-4o','temperature':0x1,'top_p':0x1,'stream':!0x0}),this['_apiUrl']=_0x3de624['config']['get']('ai.openAI.apiUrl'),this['_requestHeaders']=_0x3de624['config']['get']('ai.openAI.requestHeaders')||{},this['_requestParameters']=_0x3de624['config']['get']('ai.openAI.requestParameters');}async['sendRequest']({query:_0x13ea11,context:_0x1c7524,onData:_0x28983e,actionId:_0x1c353f}){const _0x13c742=this['editor']['locale'],_0x20b049=await this['prepareMessages'](_0x13ea11,_0x1c7524,_0x1c353f),_0x17d58a=await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x1c353f),_0x3c9267=await this['_prepareRequestParameters'](this['_requestParameters'],_0x1c353f),_0xb68bdf={'messages':_0x20b049,..._0x3c9267},_0x18c482={'method':'POST','headers':_0x17d58a,'body':JSON['stringify'](_0xb68bdf),'signal':this['abortController']['signal']},_0x34eef9=await fetch(this['_apiUrl'],_0x18c482);if(_0x34eef9['ok'])return _0x3c9267['stream']?await this['_readStreamableResponse'](_0x34eef9,_0x28983e):await this['_readStaticResponse'](_0x34eef9,_0x28983e),Promise['resolve']();{const _0xfcb11d=await _0x34eef9['text']();return _0xfcb11d['includes']('context_length_exceeded')?Promise['reject'](new R(i(_0x13c742,'AI_ERROR_CONTEXT_LENGTH'))):_0xfcb11d['includes']('Moderation')?Promise['reject'](new R(i(_0x13c742,'AI_ERROR_MODERATION'))):Promise['reject'](new Error(_0xfcb11d));}}async['prepareMessages'](_0x2be6c6,_0x2e18f7,_0x37e241){let _0x4f2989,_0x17d1ef;return _0x2e18f7?(_0x4f2989='Your\x20task\x20is\x20to\x20execute\x20the\x20instruction\x20using\x20the\x20provided\x20HTML\x20content.\x20Follow\x20the\x20instruction\x20closely.\x20Your\x20answer\x20must\x20be\x20a\x20properly\x20formatted\x20HTML\x20code.\x20Do\x20not\x20add\x20any\x20additional\x20remarks\x20or\x20notes.\x20Do\x20not\x20act\x20like\x20a\x20chatbot\x20or\x20a\x20real\x20person.',_0x17d1ef='Instruction:\x0a'+_0x2be6c6+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x2e18f7):(_0x4f2989='Your\x20task\x20is\x20to\x20generate\x20HTML\x20content\x20accordingly\x20to\x20the\x20given\x20instruction.\x20Never\x20include\x20<img>\x20tag\x20in\x20your\x20response\x20even\x20if\x20asked\x20for.\x20Your\x20answer\x20must\x20be\x20a\x20well-structured\x20and\x20properly\x20formatted\x20HTML\x20code.\x20Answer\x20only\x20with\x20the\x20generated\x20HTML\x20content.\x20Do\x20not\x20add\x20any\x20additional\x20remarks\x20or\x20notes.\x20Do\x20not\x20act\x20like\x20a\x20chatbot\x20or\x20a\x20real\x20person.',_0x17d1ef=_0x2be6c6),[{'role':'system','content':_0x4f2989},{'role':'user','content':_0x17d1ef}];}async['_readStreamableResponse'](_0x38779e,_0x787543){const _0x5365d8=_0x38779e['body']['getReader'](),_0x38f42b=new TextDecoder();let _0x38de7d='',_0x37e08b='',_0x59a2a1='',_0x1be432=!0x1;for(;!_0x1be432;){const {done:_0x675dd4,value:_0x525847}=await _0x5365d8['read'](),_0x4fdca5=_0x38de7d+_0x38f42b['decode'](_0x525847);let _0x3a44e5='';_0x1be432=_0x675dd4;try{_0x3a44e5=this['_cleanUpData'](_0x4fdca5),_0x38de7d='';}catch{_0x38de7d=_0x4fdca5;continue;}_0x37e08b+=_0x3a44e5,!_0x1be432&&this['_isBufferIncomplete'](_0x37e08b)||_0x37e08b&&(_0x59a2a1+=_0x37e08b,_0x37e08b='',_0x787543(_0x59a2a1));}return Promise['resolve']();}async['_readStaticResponse'](_0x66bbb1,_0x513a19){return _0x513a19((await _0x66bbb1['json']())['choices'][0x0]['message']['content']),Promise['resolve']();}['_isBufferIncomplete'](_0x24c2dc){const _0x4bbac5=_0x24c2dc['split']('<')['length']!==_0x24c2dc['split']('>')['length'],_0x403918=_0x24c2dc['length']<0x1e;return _0x4bbac5&&_0x403918;}['_cleanUpData'](_0x28383d){return _0x28383d['split'](/\n(?![^{]*\})/g)['map'](_0x4103c0=>_0x4103c0['replace']('data:\x20',''))['filter'](_0x5f0a97=>_0x5f0a97&&_0x5f0a97['length']>0x0&&'[DONE]'!==_0x5f0a97)['map'](_0x4a1653=>{const {choices:_0x5a37a3}=JSON['parse'](_0x4a1653);if(_0x5a37a3[0x0]?.['delta']?.['content'])return _0x5a37a3[0x0]['delta']['content'];})['filter'](_0x54efc6=>_0x54efc6)['join']('');}}class Et extends S{['_apiUrl'];['_requestHeaders'];['_bedrockClientConfig'];['_requestParameters'];static get['pluginName'](){return'AWSTextAdapter';}constructor(_0x4aa8e4){super(_0x4aa8e4),_0x4aa8e4['config']['get']('ai.aws.requestParameters')||_0x4aa8e4['config']['define']('ai.aws.requestParameters',{'model':'anthropic.claude-v2','max_tokens_to_sample':0x7d0,'temperature':0x1,'top_p':0x1,'top_k':0xfa,'anthropic_version':'bedrock-2023-05-31','stream':!0x0}),this['_apiUrl']=_0x4aa8e4['config']['get']('ai.aws.apiUrl'),this['_bedrockClientConfig']=_0x4aa8e4['config']['get']('ai.aws.bedrockClientConfig'),this['_requestHeaders']=_0x4aa8e4['config']['get']('ai.aws.requestHeaders'),this['_requestParameters']=_0x4aa8e4['config']['get']('ai.aws.requestParameters');}async['sendRequest']({query:_0x5d5e3d,context:_0x9e9230,onData:_0x2a68aa,actionId:_0x29daa3}){const {model:_0x10c640,stream:_0x381a94,..._0x4752ed}=await this['_prepareRequestParameters'](this['_requestParameters'],_0x29daa3),_0x126cea={'prompt':await this['preparePrompt'](_0x5d5e3d,_0x9e9230,_0x10c640,_0x29daa3),..._0x4752ed};this['_apiUrl']?await this['_processProxyRequest'](_0x126cea,_0x10c640,_0x381a94,_0x2a68aa,_0x29daa3):await this['_processAWSRequest'](_0x126cea,_0x10c640,_0x381a94,_0x2a68aa);}async['preparePrompt'](_0x4f0507,_0xf3cdc8,_0x2ffdda,_0x6ae7b8){let _0x39bce9,_0x1973a8;return _0xf3cdc8?(_0x39bce9='Your\x20task\x20is\x20to\x20execute\x20the\x20instruction\x20using\x20the\x20provided\x20HTML\x20content.\x20Follow\x20the\x20instruction\x20closely.\x20Your\x20answer\x20must\x20be\x20a\x20properly\x20formatted\x20HTML\x20code.\x20Do\x20not\x20add\x20any\x20additional\x20remarks\x20or\x20notes.\x20Do\x20not\x20act\x20like\x20a\x20chatbot\x20or\x20a\x20real\x20person.',_0x1973a8='Instruction:\x0a'+_0x4f0507+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0xf3cdc8):(_0x39bce9='Your\x20task\x20is\x20to\x20generate\x20HTML\x20content\x20accordingly\x20to\x20the\x20given\x20instruction.\x20Never\x20include\x20<img>\x20tag\x20in\x20your\x20response\x20even\x20if\x20asked\x20for.\x20Your\x20answer\x20must\x20be\x20a\x20well-structured\x20and\x20properly\x20formatted\x20HTML\x20code.\x20Answer\x20only\x20with\x20the\x20generated\x20HTML\x20content.\x20Do\x20not\x20add\x20any\x20additional\x20remarks\x20or\x20notes.\x20Do\x20not\x20act\x20like\x20a\x20chatbot\x20or\x20a\x20real\x20person.',_0x1973a8=_0x4f0507),'meta.llama'==this['getModelFamily'](_0x2ffdda)?'<<SYS>>\x0a'+_0x39bce9+'\x0a<</SYS>>\x0a[INST]\x0a'+_0x1973a8+'\x0a[/INST]':'Human:\x0a'+_0x39bce9+'\x0a'+_0x1973a8+'\x0a\x0aAssistant:';}['getModelFamily'](_0x553ee9){if(/^anthropic\.claude/['test'](_0x553ee9))return'anthropic.claude';if(/^ai21\.j2/['test'](_0x553ee9))return'ai21.j2';if(/^cohere\.command/['test'](_0x553ee9))return'cohere.command';if(/^meta\.llama/['test'](_0x553ee9))return'meta.llama';throw new R(i(this['editor']['locale'],'AI_ERROR_UNSUPPORTED_MODEL',_0x553ee9));}async['_processProxyRequest'](_0x2d596a,_0x110916,_0x505f65,_0x3bd5ca,_0x54c185){const _0x4574fc={'method':'POST','headers':await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x54c185),'body':JSON['stringify']({..._0x2d596a,'model':_0x110916,'stream':_0x505f65}),'signal':this['abortController']['signal']},_0xebe1a4=await fetch(this['_apiUrl'],_0x4574fc);_0x505f65?await this['_readStreamableResponse'](_0xebe1a4,_0x110916,_0x3bd5ca):await this['_readStaticResponse'](_0xebe1a4,_0x110916,_0x3bd5ca);}async['_processAWSRequest'](_0x3a7c8a,_0x447bfe,_0xef5ca8,_0x58365d){const _0x3733c0=new _0x491405(this['_bedrockClientConfig']),_0x1367af={'body':JSON['stringify'](_0x3a7c8a),'contentType':'application/json','accept':'application/json','modelId':_0x447bfe};let _0x108044;if(_0xef5ca8){const _0x1d7879=new _0x16efbc(_0x1367af);_0x108044=await _0x3733c0['send'](_0x1d7879,{'abortSignal':this['abortController']['signal']}),await this['_readAsyncIterableResponse'](_0x108044,_0x447bfe,_0x58365d);}else{const _0x1e35c9=new _0x27592f(_0x1367af);_0x108044=await _0x3733c0['send'](_0x1e35c9,{'abortSignal':this['abortController']['signal']}),await this['_readStaticResponse'](_0x108044,_0x447bfe,_0x58365d);}}async['_readAsyncIterableResponse'](_0xdb7721,_0x59c875,_0x5b02a4){const _0x46c724=_0xdb7721['body'],_0x52dd15=new TextDecoder('utf-8');let _0x372622='';for await(const _0x142bbb of _0x46c724)if(_0x142bbb['chunk']){const _0x8882c6=_0x52dd15['decode'](_0x142bbb['chunk']['bytes']),_0x4b5dcb=JSON['parse'](_0x8882c6);_0x372622+=this['_getGeneratedText'](_0x4b5dcb,_0x59c875),_0x5b02a4(_0x372622);}return Promise['resolve']();}async['_readStreamableResponse'](_0x60ff46,_0x1200ca,_0x5224ac){const _0x340a3c=_0x60ff46['body'],_0x55b48b=new TextDecoder('utf-8'),_0x3dcded=_0x340a3c['getReader']();let _0x18f79f='',_0x488a99='',_0x29c697=!0x1;for(;!_0x29c697;){const {done:_0x53029d,value:_0x5bfb92}=await _0x3dcded['read']();if(_0x29c697=_0x53029d,_0x29c697)break;const _0x374de8=(_0x18f79f+_0x55b48b['decode'](_0x5bfb92))['split']('\x0a')['map'](_0x12085c=>{try{return _0x18f79f='',JSON['parse'](_0x12085c);}catch{return _0x18f79f=_0x12085c,null;}})['filter'](_0x843f8b=>null!==_0x843f8b);_0x374de8['length']&&(_0x488a99+=_0x374de8['map'](_0x498d86=>this['_getGeneratedText'](_0x498d86,_0x1200ca))['join'](''),_0x5224ac(_0x488a99));}return Promise['resolve']();}async['_readStaticResponse'](_0x14c638,_0x509d1a,_0x26f57){let _0x3841d2;return _0x3841d2=_0x14c638 instanceof Response?await _0x14c638['json']():JSON['parse'](new TextDecoder('utf-8')['decode'](_0x14c638['body'])),(_0x26f57(this['_getGeneratedText'](_0x3841d2,_0x509d1a)),Promise['resolve']());}['_getGeneratedText'](_0x3e4d70,_0xf5f87a){switch(this['getModelFamily'](_0xf5f87a)){case'anthropic.claude':return _0x3e4d70['completion'];case'ai21.j2':return _0x3e4d70['completions'][0x0]['data']['text'];case'cohere.command':return _0x3e4d70['generations'][0x0]['text'];case'meta.llama':return _0x3e4d70['generation'];}}}export{x as AIAdapter,At as AIAssistant,n as AIAssistantUI,R as AIRequestError,S as AITextAdapter,Et as AWSTextAdapter,It as OpenAITextAdapter,E as ShowAIAssistantCommand,_t as getDefaultAICommands};
|
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':_0x4d61e5=>0x1!=_0x4d61e5}};
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
(
|
|
23
|
+
(_0x390481=>{const {af:{dictionary:_0x587a46,getPluralForm:_0x2a76a5}}={'af':{'dictionary':{'Edit\x20or\x20review':'','Improve\x20writing':'','Make\x20shorter':'','Make\x20longer':'','Simplify\x20language':'','Generate\x20from\x20selection':'','Summarize':'','Continue':'','Change\x20tone':'','Professional':'','Casual':'','Direct':'','Confident':'','Friendly':'','Change\x20style':'','Business':'','Legal':'','Journalism':'','Poetic':'','Translate':'','English':'','Spanish':'','German':'','Portuguese':'','French':'','Simplified\x20Chinese':'','Hindi':'','Arabic':'','AI\x20Assistant':'','AI\x20Commands':'','Ask\x20AI\x20to\x20edit\x20or\x20generate':'','Ask\x20AI\x20to\x20improve\x20generated\x20text':'','Copy':'','Submit':'Indien','Insert\x20below':'','Try\x20again':'','Stop':'','AI\x20is\x20writing...':'','AI\x20is\x20writing':'','Generated\x20content:\x20%0':'','Error\x20during\x20AI\x20content\x20generation:\x20%0':'','History':'','Empty\x20history':'','Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.':'','Prompt\x20history':'','AI_REPLACE_CONTENT':'Vervang','AI_INSERT_CONTENT':'','AI_ERROR_GET_HEADERS':'','AI_ERROR_GET_PARAMETERS':'','AI_ERROR_UNSUPPORTED_MODEL':'','AI_ERROR_CONTEXT_LENGTH':'','AI_ERROR_MODERATION':'','AI_ERROR_FAILED':'','Other':''},'getPluralForm':_0x4f8f4f=>0x1!=_0x4f8f4f}};_0x390481['af']||={'dictionary':{},'getPluralForm':null},_0x390481['af']['dictionary']=Object['assign'](_0x390481['af']['dictionary'],_0x587a46),_0x390481['af']['getPluralForm']=_0x2a76a5;})(window['CKEDITOR_TRANSLATIONS']||={});
|
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':_0x57ca23=>0x0==_0x57ca23?0x0:0x1==_0x57ca23?0x1:0x2==_0x57ca23?0x2:_0x57ca23%0x64>=0x3&&_0x57ca23%0x64<=0xa?0x3:_0x57ca23%0x64>=0xb?0x4:0x5}};
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
(
|
|
23
|
+
(_0x9425fc=>{const {ar:{dictionary:_0x34a20d,getPluralForm:_0x1cb027}}={'ar':{'dictionary':{'Edit\x20or\x20review':'التحرير\x20أو\x20المراجعة','Improve\x20writing':'قم\x20بتحسين\x20الكتابة','Make\x20shorter':'اجعله\x20أقصر','Make\x20longer':'اجعله\x20أطول','Simplify\x20language':'قم\x20بتبسيط\x20اللغة','Generate\x20from\x20selection':'قم\x20بالإنشاء\x20من\x20التحديد','Summarize':'تلخيص','Continue':'متابعة','Change\x20tone':'تغيير\x20الأسلوب','Professional':'احترافي','Casual':'غير\x20رسمي','Direct':'مباشر','Confident':'لهجة\x20واثقة','Friendly':'ودي','Change\x20style':'تغيير\x20الأسلوب','Business':'تجاري','Legal':'قانوني','Journalism':'الكتابة\x20الصحفية','Poetic':'شِعري','Translate':'ترجِمْ','English':'الإنكليزية','Spanish':'الإسبانية','German':'الألمانية','Portuguese':'البرتغالية','French':'الفرنسية','Simplified\x20Chinese':'الصينية\x20المبسطة','Hindi':'الهندية','Arabic':'العربية','AI\x20Assistant':'مساعد\x20الذكاء\x20الاصطناعي','AI\x20Commands':'أوامر\x20الذكاء\x20الاصطناعي','Ask\x20AI\x20to\x20edit\x20or\x20generate':'اطلب\x20من\x20الذكاء\x20الاصطناعي\x20أن\x20يقوم\x20بالتحرير\x20أو\x20الإنشاء','Ask\x20AI\x20to\x20improve\x20generated\x20text':'اطلب\x20من\x20الذكاء\x20الاصطناعي\x20أن\x20يقوم\x20بتحسين\x20النص\x20الذي\x20تم\x20إنشاؤه','Copy':'نسخ','Submit':'إرسال','Insert\x20below':'أدخل\x20أدناه','Try\x20again':'حاول\x20مجددًا','Stop':'إيقاف','AI\x20is\x20writing...':'يقوم\x20الذكاء\x20الاصطناعي\x20بالكتابة...','AI\x20is\x20writing':'يكتب\x20الذكاء\x20الاصطناعي','Generated\x20content:\x20%0':'المحتوى\x20الذي\x20تم\x20إنشاؤه:\x20%0','Error\x20during\x20AI\x20content\x20generation:\x20%0':'حدث\x20خطأ\x20أثناء\x20إنشاء\x20محتوى\x20الذكاء\x20الاصطناعي:\x20%0','History':'سجل\x20المحفوظات','Empty\x20history':'السجل\x20فارغ','Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.':'سيتم\x20إدراج\x20الطلبات\x20التي\x20طلبتها\x20من\x20الذكاء\x20الاصطناعي\x20والتوجيهات\x20الخاصة\x20بك\x20هنا\x20لكي\x20يتم\x20استخدامها\x20لاحقًا.','Prompt\x20history':'سجل\x20التوجيهات','AI_REPLACE_CONTENT':'استبدال','AI_INSERT_CONTENT':'إدراج','AI_ERROR_GET_HEADERS':'فشلت\x20عملية\x20تحضير\x20عناوين\x20الطلبات','AI_ERROR_GET_PARAMETERS':'لقد\x20فشلت\x20عملية\x20إعداد\x20معلمات\x20الطلب','AI_ERROR_UNSUPPORTED_MODEL':'إن\x20نموذج\x20AI\x20المطلوب\x20(\x22%0\x22)\x20غير\x20مدعوم','AI_ERROR_CONTEXT_LENGTH':'المحتوى\x20المحدد\x20طويل\x20جداً','AI_ERROR_MODERATION':'الاستعلام\x20المطلوب\x20لا\x20يجتاز\x20قواعد\x20الإشراف','AI_ERROR_FAILED':'لقد\x20فشل\x20التواصل\x20مع\x20خدمة\x20الذكاء\x20الاصطناعي','Other':'آخر'},'getPluralForm':_0x421455=>0x0==_0x421455?0x0:0x1==_0x421455?0x1:0x2==_0x421455?0x2:_0x421455%0x64>=0x3&&_0x421455%0x64<=0xa?0x3:_0x421455%0x64>=0xb?0x4:0x5}};_0x9425fc['ar']||={'dictionary':{},'getPluralForm':null},_0x9425fc['ar']['dictionary']=Object['assign'](_0x9425fc['ar']['dictionary'],_0x34a20d),_0x9425fc['ar']['getPluralForm']=_0x1cb027;})(window['CKEDITOR_TRANSLATIONS']||={});
|