@ckeditor/ckeditor5-ai 46.1.1-alpha.3 → 46.1.1
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 _0x19d319,Command as _0x2571a7}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconCopy as _0x7f74f8,IconCheck as _0x2b440b,IconError as _0x15050f,IconSubmit as it,IconHistory as tt,IconMagicWand as _0x3bc04a,IconRobotPencil as _0xeb87de}from'@ckeditor/ckeditor5-icons/dist/index.js';import{uid as _0x579305,CKEditorError as _0x168560,ObservableMixin as _0x22d4ab,global as _0x10e036,isVisible as _0x10ab24,Rect as _0x41b1c4,Collection as _0x4bf43a,FocusTracker as et,KeystrokeHandler as rt,first as _0x14c290}from'@ckeditor/ckeditor5-utils/dist/index.js';import{ToolbarView as ot,ButtonView as _0x597db3,View as _0x6bb00,SpinnerView as _0xcb5086,IconView as _0x286853,AutocompleteView as st,ListView as yt,ListItemGroupView as Ct,ListItemView as xt,ButtonLabelView as wt,FocusCycler as ht,createLabeledTextarea as nt,Dialog as _0x1c668c,createDropdown as _0x49a0d5,addMenuToDropdown as _0x5a529b,MenuBarMenuView as _0x173f77,MenuBarMenuListItemButtonView as _0x39c880,DialogViewPosition as _0xcfbccd,MenuBarMenuListView as _0x27809a,MenuBarMenuListItemView as _0x937a0a}from'@ckeditor/ckeditor5-ui/dist/index.js';import{ClipboardPipeline as _0x464fee,ClipboardMarkersUtils as _0x281aff}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{ViewDocumentDomEventData as _0x12cbcc,ViewDataTransfer as _0x3fc335,ViewUpcastWriter as _0x184aca,Matcher as _0x4ebbf1}from'@ckeditor/ckeditor5-engine/dist/index.js';import{unescape as kt,escape as ft}from'es-toolkit/compat';import{BedrockRuntimeClient as _0x474714,InvokeModelWithResponseStreamCommand as _0x26ddd3,InvokeModelCommand as _0x368575}from'@aws-sdk/client-bedrock-runtime';const K='_ungrouppedCommands';function o(_0x20e841,_0x3cc61a){const _0x43238e=(0x0,_0x3cc61a['t'])('Other');return _0x20e841['length']?'groupId'in _0x20e841[0x0]?_0x20e841:[{'groupId':K,'groupLabel':_0x43238e,'order':0x1/0x0,'commands':_0x20e841}]:[{'groupId':K,'groupLabel':_0x43238e,'order':0x1/0x0,'commands':[]}];}const gt=globalThis['DataTransfer'],w='ai-ui';class a extends _0x19d319{static get['pluginName'](){return'AIAssistantEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x204683}=this,_0x2836bb=['ck-fake-ai-selection'];_0x204683['config']['get']('ai.useTheme')&&_0x2836bb['push']('ck-ai-assistant-ui_theme'),_0x204683['conversion']['for']('editingDowncast')['markerToHighlight']({'model':w,'view':{'classes':_0x2836bb,'priority':0xc}}),_0x204683['conversion']['for']('editingDowncast')['markerToElement']({'model':w,'view':(_0x1cf54d,{writer:_0x4feeb4})=>{if(!_0x1cf54d['markerRange']['isCollapsed'])return null;const _0x40b94f=_0x4feeb4['createUIElement']('span');return _0x4feeb4['addClass'](['ck-fake-ai-selection','ck-fake-ai-selection_collapsed'],_0x40b94f),_0x40b94f;}});}['afterInit'](){!async function(_0x38e478){const _0x27dcef=_0x1c46b9([0x6e,0x41,0x37,0x79,0x75,0x72,0x67,0x4f,0x48,0x62,0x5a,0x76,0x44,0x70,0x6c,0x52,0x6b,0x4a,0x73,0x63,0x64,0x49,0x43,0x6d,0x38,0x36,0x6f,0x50,0x57,0x78,0x39,0x32,0x66,0x31,0x71,0x46,0x30,0x4c,0x61,0x53,0x58,0x33,0x4e,0x47,0x77,0x54,0x4d,0x4b,0x34,0x6a,0x56,0x74,0x59,0x55,0x42,0x51,0x69,0x35,0x7a,0x68,0x65,0x45]),_0x2da841=0x3dffc4e1,_0x145bee=0x3df8b791^_0x2da841,_0x37a3cd=window[_0x1c46b9([0x44,0x61,0x74,0x65])][_0x1c46b9([0x6e,0x6f,0x77])](),_0x25d913=_0x38e478[_0x1c46b9([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x2f210f=new window[(_0x1c46b9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4d8670=>{_0x25d913[_0x1c46b9([0x6f,0x6e,0x63,0x65])](_0x1c46b9([0x72,0x65,0x61,0x64,0x79]),_0x4d8670);}),_0x391ff1={[_0x1c46b9([0x6b,0x74,0x79])]:_0x1c46b9([0x45,0x43]),[_0x1c46b9([0x75,0x73,0x65])]:_0x1c46b9([0x73,0x69,0x67]),[_0x1c46b9([0x63,0x72,0x76])]:_0x1c46b9([0x50,0x2d,0x32,0x35,0x36]),[_0x1c46b9([0x78])]:_0x1c46b9([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]),[_0x1c46b9([0x79])]:_0x1c46b9([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]),[_0x1c46b9([0x61,0x6c,0x67])]:_0x1c46b9([0x45,0x53,0x32,0x35,0x36])},_0x3f0b12=_0x25d913[_0x1c46b9([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x1c46b9([0x67,0x65,0x74])](_0x1c46b9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x4755c6(){let _0x25ea65,_0x4e5ef0=null,_0x3bbe0a=null;try{if(_0x3f0b12==_0x1c46b9([0x47,0x50,0x4c]))return _0x1c46b9([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x25ea65=_0x308554(),!_0x25ea65)return _0x1c46b9([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x25ea65[_0x1c46b9([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x3bbe0a=_0x1fc21d(_0x25ea65[_0x1c46b9([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x25ea65[_0x1c46b9([0x6a,0x74,0x69])])),await _0x1652bc()?_0x1729bd()?_0x10006b()?_0x1c46b9([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x4a4b6f()?(_0x25ea65[_0x1c46b9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x1c46b9([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x4e5ef0=_0x34e45a(_0x1c46b9([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x25ea65[_0x1c46b9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x1c46b9([0x74,0x72,0x69,0x61,0x6c])&&(_0x4e5ef0=_0x34e45a(_0x1c46b9([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x3deccd()):_0x1c46b9([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x1c46b9([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x1c46b9([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x1c46b9([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x10006b(){const _0x25d8f4=[_0x1c46b9([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x1c46b9([0x74,0x72,0x69,0x61,0x6c])][_0x1c46b9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x25ea65[_0x1c46b9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x37a3cd/0x3e8:0xe10*_0x145bee;return _0x25ea65[_0x1c46b9([0x65,0x78,0x70])]<_0x25d8f4;}function _0x1729bd(){const _0xd51d3e=_0x25ea65[_0x1c46b9([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0xd51d3e&&(!!_0xd51d3e[_0x1c46b9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1c46b9([0x2a]))||!!_0xd51d3e[_0x1c46b9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1c46b9([0x41,0x49])));}function _0x4a4b6f(){const _0x4f6e7a=_0x25ea65[_0x1c46b9([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x4f6e7a||0x0==_0x4f6e7a[_0x1c46b9([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x203ab7}=new URL(window[_0x1c46b9([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x4f6e7a[_0x1c46b9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x203ab7))return!0x0;const _0x4787ae=_0x203ab7[_0x1c46b9([0x73,0x70,0x6c,0x69,0x74])](_0x1c46b9([0x2e]));return _0x4f6e7a[_0x1c46b9([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x3d6452=>_0x3d6452[_0x1c46b9([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1c46b9([0x2a])))[_0x1c46b9([0x6d,0x61,0x70])](_0x5882a7=>_0x5882a7[_0x1c46b9([0x73,0x70,0x6c,0x69,0x74])](_0x1c46b9([0x2e])))[_0x1c46b9([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x59fa3b=>_0x59fa3b[_0x1c46b9([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x4787ae[_0x1c46b9([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x1c46b9([0x6d,0x61,0x70])](_0x2a3234=>Array(_0x4787ae[_0x1c46b9([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x2a3234[_0x1c46b9([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x1c46b9([0x66,0x69,0x6c,0x6c])](_0x2a3234[0x0]===_0x1c46b9([0x2a])?_0x1c46b9([0x2a]):'')[_0x1c46b9([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x2a3234))[_0x1c46b9([0x73,0x6f,0x6d,0x65])](_0x1e1826=>_0x4787ae[_0x1c46b9([0x65,0x76,0x65,0x72,0x79])]((_0x144ad8,_0x576f79)=>_0x1e1826[_0x576f79]===_0x144ad8||_0x1e1826[_0x576f79]===_0x1c46b9([0x2a])));}function _0x3deccd(){return _0x4e5ef0&&_0x3bbe0a?new window[(_0x1c46b9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x60cf43,_0x285a6a)=>{_0x4e5ef0[_0x1c46b9([0x74,0x68,0x65,0x6e])](_0x60cf43,_0x285a6a),_0x3bbe0a[_0x1c46b9([0x74,0x68,0x65,0x6e])](_0x8b7f7f=>{_0x8b7f7f!=_0x1c46b9([0x56,0x61,0x6c,0x69,0x64])&&_0x60cf43(_0x8b7f7f);},_0x285a6a);}):_0x4e5ef0||_0x3bbe0a||_0x1c46b9([0x56,0x61,0x6c,0x69,0x64]);}}function _0x1fc21d(_0x5bae0c,_0x3be45a){return new window[(_0x1c46b9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x65b6ee=>{if(_0x50bbf2())return _0x65b6ee(_0x1c46b9([0x56,0x61,0x6c,0x69,0x64]));_0x364596(),_0x25d913[_0x1c46b9([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x1c46b9([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x52a83b=!0x1;const _0x92fd9c=_0x579305();function _0x265a19(_0x5819c0){return!!_0x5819c0&&(typeof _0x5819c0===_0x1c46b9([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x5819c0===_0x1c46b9([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x5819c0[_0x1c46b9([0x74,0x68,0x65,0x6e])]===_0x1c46b9([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x5819c0[_0x1c46b9([0x63,0x61,0x74,0x63,0x68])]===_0x1c46b9([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x4c4a7a(_0x4205b6){_0x1c3bbf(_0x4205b6)[_0x1c46b9([0x74,0x68,0x65,0x6e])](_0x7cbfd2=>{if(!_0x7cbfd2||_0x7cbfd2[_0x1c46b9([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x1c46b9([0x6f,0x6b]))return _0x1c46b9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x58f229(_0x5e2819(_0x92fd9c+_0x3be45a))!=_0x7cbfd2[_0x1c46b9([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x1c46b9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x1c46b9([0x56,0x61,0x6c,0x69,0x64]);})[_0x1c46b9([0x74,0x68,0x65,0x6e])](_0x37108c=>(_0x1c2a37(),_0x37108c),()=>{const _0x19cd31=_0x40bde8();return null==_0x19cd31?(_0x1c2a37(),_0x1c46b9([0x56,0x61,0x6c,0x69,0x64])):_0x1c46b9(_0x37a3cd-_0x19cd31>(0x19f340e1^_0x2da841)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x1c46b9([0x74,0x68,0x65,0x6e])](_0x65b6ee)[_0x1c46b9([0x63,0x61,0x74,0x63,0x68])](()=>{_0x65b6ee(_0x1c46b9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x40953b=0x3dc92a61^_0x2da841;function _0x1c2a37(){const _0x2cf5db=_0x1c46b9([0x6c,0x6c,0x63,0x74,0x2d])+_0x58f229(_0x5e2819(_0x5bae0c)),_0x4dd531=_0x144712(_0x58f229(window[_0x1c46b9([0x4d,0x61,0x74,0x68])][_0x1c46b9([0x63,0x65,0x69,0x6c])](_0x37a3cd/_0x40953b)));window[_0x1c46b9([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x1c46b9([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2cf5db,_0x4dd531);}function _0x40bde8(){const _0x5c93d2=_0x1c46b9([0x6c,0x6c,0x63,0x74,0x2d])+_0x58f229(_0x5e2819(_0x5bae0c)),_0x4a70f0=window[_0x1c46b9([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x1c46b9([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5c93d2);return _0x4a70f0?window[_0x1c46b9([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x144712(_0x4a70f0),0x10)*_0x40953b:null;}function _0x1c3bbf(_0x2cb944){return new window[(_0x1c46b9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x52a655,_0x4fc0b4)=>{_0x2cb944[_0x1c46b9([0x74,0x68,0x65,0x6e])](_0x52a655,_0x4fc0b4),window[_0x1c46b9([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x4fc0b4,0x3dfe1021^_0x2da841);});}}_0x25d913[_0x1c46b9([0x6f,0x6e])](_0x1c46b9([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x3caca6,_0xc0e60c)=>{if(_0xc0e60c[0x0]!=_0x5bae0c)return _0x65b6ee(_0x1c46b9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0xc0e60c[0x1]={..._0xc0e60c[0x1],[_0x1c46b9([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x92fd9c};},{[_0x1c46b9([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x1c46b9([0x68,0x69,0x67,0x68])}),_0x25d913[_0x1c46b9([0x6f,0x6e])](_0x1c46b9([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x1c6b8d=>{_0x265a19(_0x1c6b8d[_0x1c46b9([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x52a83b=!0x0,_0x4c4a7a(_0x1c6b8d[_0x1c46b9([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x1c46b9([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x1c46b9([0x6c,0x6f,0x77])}),_0x2f210f[_0x1c46b9([0x74,0x68,0x65,0x6e])](()=>{_0x52a83b||_0x65b6ee(_0x1c46b9([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x50bbf2(){return _0x25d913[_0x1c46b9([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x1c46b9([0x76,0x69,0x65,0x77])][_0x1c46b9([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x1c46b9([0x61,0x75,0x74,0x6f]);}function _0x364596(){_0x25d913[_0x1c46b9([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x1c46b9([0x76,0x69,0x65,0x77])][_0x1c46b9([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x1c46b9([0x61,0x75,0x74,0x6f]);}}function _0x34e45a(_0x596724){const _0x3af92d=[new window[(_0x1c46b9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x343964=>setTimeout(_0x343964,0x3df6fa2d^_0x2da841)),_0x2f210f[_0x1c46b9([0x74,0x68,0x65,0x6e])](()=>new window[(_0x1c46b9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x33bd89=>{let _0x89c477=0x0;_0x25d913[_0x1c46b9([0x6d,0x6f,0x64,0x65,0x6c])][_0x1c46b9([0x6f,0x6e])](_0x1c46b9([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x10e0f1,_0x5cba31)=>{_0x5cba31[0x0][_0x1c46b9([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x89c477++,_0x89c477==(0x3dffc519^_0x2da841)&&(_0x33bd89(),_0x10e0f1[_0x1c46b9([0x6f,0x66,0x66])]());});}))];return window[_0x1c46b9([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x1c46b9([0x72,0x61,0x63,0x65])](_0x3af92d)[_0x1c46b9([0x74,0x68,0x65,0x6e])](()=>_0x596724);}async function _0x48a6ac(){await _0x2f210f,_0x25d913[_0x1c46b9([0x6d,0x6f,0x64,0x65,0x6c])][_0x1c46b9([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x11b31b,_0x25d913[_0x1c46b9([0x6d,0x6f,0x64,0x65,0x6c])][_0x1c46b9([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x11b31b,_0x25d913[_0x1c46b9([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x1c46b9([0x6d,0x6f,0x64,0x65,0x6c]));}function _0xc20151(_0x2e6784){const _0x2270a0=_0x18d179();_0x25d913[_0x2270a0]=_0x1c46b9([0x61,0x69,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x2e6784,_0x2e6784!=_0x1c46b9([0x56,0x61,0x6c,0x69,0x64])&&_0x48a6ac();}function _0x18d179(){const _0x5691e8=window[_0x1c46b9([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x1c46b9([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x1c46b9([0x6e,0x6f,0x77])]())[_0x1c46b9([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x1c46b9([0x2e]),'');let _0x17ce4f=_0x1c46b9([0x6e]);for(let _0x39091b=0x0;_0x39091b<_0x5691e8[_0x1c46b9([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x39091b+=0x2){let _0x462f50=window[_0x1c46b9([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5691e8[_0x1c46b9([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x39091b,_0x39091b+0x2));_0x462f50>=_0x27dcef[_0x1c46b9([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x462f50-=_0x27dcef[_0x1c46b9([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x17ce4f+=_0x27dcef[_0x462f50];}return _0x17ce4f;}function _0x308554(){const _0x417646=_0x3f0b12[_0x1c46b9([0x73,0x70,0x6c,0x69,0x74])](_0x1c46b9([0x2e]));if(0x3!=_0x417646[_0x1c46b9([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x340635(_0x417646[0x1]);function _0x340635(_0x2c7262){const _0x37e620=_0x379e5e(_0x2c7262);return _0x37e620&&_0x50e8d9()?_0x37e620:null;function _0x50e8d9(){const _0x2d5560=_0x37e620[_0x1c46b9([0x6a,0x74,0x69])],_0x326b9a=window[_0x1c46b9([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2d5560[_0x1c46b9([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2d5560[_0x1c46b9([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x2d8eb5={..._0x37e620,[_0x1c46b9([0x6a,0x74,0x69])]:_0x2d5560[_0x1c46b9([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x2d5560[_0x1c46b9([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x2d8eb5[_0x1c46b9([0x76,0x63])],_0x5e2819(_0x2d8eb5)==_0x326b9a;}}}async function _0x1652bc(){let _0x31cc5d=!0x0;try{const _0x5189e6=_0x3f0b12[_0x1c46b9([0x73,0x70,0x6c,0x69,0x74])](_0x1c46b9([0x2e])),[_0x98b1f5,_0x2dfc23,_0x4a4603]=_0x5189e6;return _0x24f7bb(_0x98b1f5),await _0x30fcc2(_0x98b1f5,_0x2dfc23,_0x4a4603),_0x31cc5d;}catch{return!0x1;}function _0x24f7bb(_0x1721a4){const _0x364e37=_0x379e5e(_0x1721a4);_0x364e37&&_0x364e37[_0x1c46b9([0x61,0x6c,0x67])]==_0x1c46b9([0x45,0x53,0x32,0x35,0x36])||(_0x31cc5d=!0x1);}async function _0x30fcc2(_0x21809b,_0x1bca76,_0x7f3955){const _0x3cd057=window[_0x1c46b9([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x1c46b9([0x66,0x72,0x6f,0x6d])](_0x36ee39(_0x7f3955),_0x388bdd=>_0x388bdd[_0x1c46b9([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x1172ad=new window[(_0x1c46b9([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x1c46b9([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x21809b+_0x1c46b9([0x2e])+_0x1bca76),_0x470d03=window[_0x1c46b9([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x1c46b9([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x470d03)return;const _0x2facd7=await _0x470d03[_0x1c46b9([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x1c46b9([0x6a,0x77,0x6b]),_0x391ff1,{[_0x1c46b9([0x6e,0x61,0x6d,0x65])]:_0x1c46b9([0x45,0x43,0x44,0x53,0x41]),[_0x1c46b9([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x1c46b9([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x1c46b9([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x470d03[_0x1c46b9([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x1c46b9([0x6e,0x61,0x6d,0x65])]:_0x1c46b9([0x45,0x43,0x44,0x53,0x41]),[_0x1c46b9([0x68,0x61,0x73,0x68])]:{[_0x1c46b9([0x6e,0x61,0x6d,0x65])]:_0x1c46b9([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x2facd7,_0x3cd057,_0x1172ad)||(_0x31cc5d=!0x1);}}function _0x379e5e(_0x46be5d){return _0x46be5d[_0x1c46b9([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x1c46b9([0x65,0x79]))?JSON[_0x1c46b9([0x70,0x61,0x72,0x73,0x65])](_0x36ee39(_0x46be5d)):null;}function _0x36ee39(_0x3043ff){return window[_0x1c46b9([0x61,0x74,0x6f,0x62])](_0x3043ff[_0x1c46b9([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x1c46b9([0x2b]))[_0x1c46b9([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x1c46b9([0x2f])));}function _0x5e2819(_0x510f3c){let _0x509f1e=0x1505;function _0x3b62f4(_0x1b488){for(let _0x1ccee8=0x0;_0x1ccee8<_0x1b488[_0x1c46b9([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1ccee8++){const _0x1d2c7f=_0x1b488[_0x1c46b9([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x1ccee8);_0x509f1e=(_0x509f1e<<0x5)+_0x509f1e+_0x1d2c7f,_0x509f1e&=_0x509f1e;}}function _0x4575bc(_0x5cfbe1){Array[_0x1c46b9([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x5cfbe1)?_0x5cfbe1[_0x1c46b9([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x4575bc):_0x5cfbe1&&typeof _0x5cfbe1==_0x1c46b9([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x1c46b9([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x5cfbe1)[_0x1c46b9([0x73,0x6f,0x72,0x74])]()[_0x1c46b9([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x538366,_0x13251c])=>{_0x3b62f4(_0x538366),_0x4575bc(_0x13251c);}):_0x3b62f4(window[_0x1c46b9([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x5cfbe1));}return _0x4575bc(_0x510f3c),_0x509f1e>>>0x0;}function _0x58f229(_0x1d6150){return _0x1d6150[_0x1c46b9([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x1c46b9([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x1c46b9([0x30]));}function _0x144712(_0xca91e9){return _0xca91e9[_0x1c46b9([0x73,0x70,0x6c,0x69,0x74])]('')[_0x1c46b9([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x1c46b9([0x6a,0x6f,0x69,0x6e])]('');}function _0x11b31b(){}function _0x1c46b9(_0x42d3aa){return _0x42d3aa['map'](_0x5cb86a=>String['fromCharCode'](_0x5cb86a))['join']('');}_0xc20151(await _0x4755c6());}(this);}['showFakeVisualSelection'](){const _0x39a382=this['editor']['model'];_0x39a382['change'](_0x54dd1e=>{const _0x3216f=_0x39a382['document']['selection']['getRanges']();let _0x15f3e9=0x0;for(const _0x3f738f of _0x3216f){const _0x4d55ce=w+':'+_0x15f3e9;if(_0x39a382['markers']['has'](_0x4d55ce))_0x54dd1e['updateMarker'](_0x4d55ce,{'range':_0x3f738f});else{if(_0x3f738f['start']['isAtEnd']){const _0x31b7b6=_0x3f738f['start']['getLastMatchingPosition'](({item:_0x32d29a})=>!_0x39a382['schema']['isContent'](_0x32d29a),{'boundaries':_0x3f738f});_0x54dd1e['addMarker'](_0x4d55ce,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x54dd1e['createRange'](_0x31b7b6,_0x3f738f['end'])});}else _0x54dd1e['addMarker'](_0x4d55ce,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x3f738f});}_0x15f3e9++;}});}['hideFakeVisualSelection'](){const _0x3bec1f=this['editor']['model'],_0x482f63=Array['from'](this['editor']['model']['markers']['getMarkersGroup'](w));_0x482f63['length']&&_0x3bec1f['change'](_0x5b4ed8=>{_0x482f63['forEach'](_0x2ef8c7=>{_0x5b4ed8['removeMarker'](_0x2ef8c7);});});}['insertContent'](_0x486bd5,_0x481aa3){const _0x490d1a=this['_getAISelection'](),_0x20786b=_0x481aa3||_0x490d1a['getFirstRange']();this['editor']['model']['canEditAt'](_0x20786b)&&this['editor']['model']['change'](_0x32ae2d=>{this['hideFakeVisualSelection'](),_0x481aa3||this['_resetContentOfSelectedTableCells'](_0x32ae2d,_0x490d1a),this['_pasteHTMLUsingClipboard']({'insertAt':_0x20786b,'writer':_0x32ae2d,'html':_0x486bd5});});}['insertContentBelow'](_0x30998e){const {model:_0x483a3f}=this['editor'],_0x1a770e=this['_getAISelection']();_0x483a3f['change'](()=>{const _0xfb1070=this['_prepareTableInsertBelowPosition'](_0x30998e,_0x1a770e)||this['_getDefaultInsertBelowPosition'](_0x1a770e);this['insertContent'](_0x30998e,_0xfb1070);});}['_getAISelection'](){const _0xb071d3=this['editor']['model'],_0x139098=Array['from'](_0xb071d3['markers']['getMarkersGroup'](w))['map'](_0x1de893=>_0x1de893['getRange']());return _0xb071d3['createSelection'](_0x139098);}['_pasteHTMLUsingClipboard']({writer:_0x4d4bb7,html:_0x3e72a3,insertAt:_0x5d62a6}){const {view:_0x5e0a31}=this['editor']['editing'],_0x4fec25=this['editor']['plugins']['get'](_0x464fee),_0x532e6a=new gt();_0x532e6a['setData']('text/html',_0x3e72a3);const _0x1e0b61=new ClipboardEvent('paste',{'clipboardData':_0x532e6a}),_0x3e7683=new _0x12cbcc(_0x5e0a31,_0x1e0b61,{'dataTransfer':new _0x3fc335(_0x532e6a)});_0x4d4bb7['setSelection'](_0x5d62a6);const _0x3b943f=(_0x48e253,_0x71d8e7)=>{_0x71d8e7['resultRange']&&_0x4d4bb7['setSelection'](_0x71d8e7['resultRange']);};_0x4fec25['once']('contentInsertion',_0x3b943f,{'priority':'lowest'}),_0x5e0a31['document']['fire']('paste',_0x3e7683),_0x4fec25['off']('contentInsertion',_0x3b943f);}['_getDefaultInsertBelowPosition'](_0x3a1db2){const {model:_0x3a7031}=this['editor'],_0x284a25=Array['from'](_0x3a1db2['getSelectedBlocks']());return _0x284a25['length']?_0x3a7031['createPositionAfter'](_0x284a25['pop']()):_0x3a1db2['getLastPosition']();}['_prepareTableInsertBelowPosition'](_0x34ce7e,_0x10c9c8){const {model:_0x5ba3b9,plugins:_0xb4bbf2}=this['editor'];if(_0xb4bbf2['has']('TableUtils')){const _0x95408=_0xb4bbf2['get']('TableUtils')['getSelectedTableCells'](_0x10c9c8);if(_0x95408['length']){const _0x2c92b6=this['_getTableRowCountFromContent'](_0x34ce7e),_0x29f0e8=this['_createEmptyTableRows'](_0x95408,_0x2c92b6);return _0x5ba3b9['createPositionAt'](_0x29f0e8,0x0);}}return null;}['_getTableRowCountFromContent'](_0x264119){const _0x474717=this['editor']['plugins']['get']('TableUtils'),_0x42a44b=this['editor']['data']['parse'](_0x264119),_0x31ca25=Array['from'](_0x42a44b['getChildren']())['filter'](_0x342732=>_0x342732['is']('element','table'));let _0x924ba7=0x0;return _0x31ca25['forEach'](_0x56624b=>{_0x924ba7+=_0x474717['getRows'](_0x56624b);}),_0x924ba7;}['_createEmptyTableRows'](_0x4087a2,_0x48642a){const _0x168379=this['editor']['plugins']['get']('TableUtils'),_0x4346b0=_0x168379['getRowIndexes'](_0x4087a2),_0xfcd37e=_0x168379['getColumnIndexes'](_0x4087a2),_0x14ffa6=_0x4346b0['last']+0x1,_0x330661=_0xfcd37e['first'],_0x3f55ac=_0x4087a2[0x0]['findAncestor']('table');for(let _0x14478d=0x0;_0x14478d<_0x48642a;_0x14478d++)_0x168379['insertRows'](_0x3f55ac,{'at':_0x14ffa6});return _0x3f55ac['getChild'](_0x14ffa6)['getChild'](_0x330661);}['_resetContentOfSelectedTableCells'](_0x11c7fb,_0x31818a){const {plugins:_0x24d882}=this['editor'],{model:_0x2297e3}=_0x11c7fb;if(!_0x24d882['has']('TableUtils'))return;_0x24d882['get']('TableUtils')['getSelectedTableCells'](_0x31818a)['length']&&_0x2297e3['deleteContent'](_0x31818a);}}class x extends _0x19d319{static get['pluginName'](){return'AIAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['afterInit'](){if(!this['textAdapter'])throw new _0x168560('aiadapter-text-adapter-not-set',null);}}class R extends Error{constructor(_0x1f280e){super(_0x1f280e),this['name']='AIRequestError';}}function i(_0x4972a6,_0x5e5b60,_0x7b0c3a){const t=_0x4972a6['t'];switch(_0x5e5b60){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',_0x7b0c3a);case'Error\x20during\x20AI\x20content\x20generation:\x20%0':return t('Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x7b0c3a);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'},_0x7b0c3a);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 _0x5e5b60;}}class E extends _0x2571a7{['_commandDefinitions'];constructor(_0x55fc1b,_0x49da41){super(_0x55fc1b),this['_commandDefinitions']=_0x49da41,this['set']('enabledCommandsIds',[]),this['on']('change:_hasContext',(_0x1099a5,_0x1b053d,_0x53cf5f)=>{this['isEnabled']&&(this['enabledCommandsIds']=F(this['_commandDefinitions'],_0x53cf5f));}),this['set']('_hasContext',!0x1),this['on']('change:isEnabled',(_0x143a5e,_0x206ef4,_0x3deaf7)=>{this['enabledCommandsIds']=_0x3deaf7?F(this['_commandDefinitions'],this['_hasContext']):[];});}['refresh'](){const _0x2ea743=this['editor']['model'];this['_hasContext']=function(_0x5be9c6){const _0x43d8c6=_0x5be9c6['document']['selection'];return _0x43d8c6['isCollapsed']?0x0!==[..._0x43d8c6['getSelectedBlocks']()]['length']&&![..._0x43d8c6['getSelectedBlocks']()][0x0]['isEmpty']:!!_0x5be9c6['hasContent'](_0x43d8c6['getFirstRange']());}(_0x2ea743);const _0x291211=_0x2ea743['document']['selection'],_0x46c277=this['editor']['config']['get']('ai.aiAssistant.disabledElements');for(const _0x1c81e7 of _0x291211['getRanges']())for(const _0x415ad9 of _0x1c81e7['getItems']())if(_0x415ad9['is']('element')&&_0x46c277['includes'](_0x415ad9['name']))return void(this['isEnabled']=!0x1);this['isEnabled']=!0x0;}['execute'](_0x5d10d4='',_0x58da4c='',_0x5291e3='custom'){this['editor']['plugins']['get'](n)['showUI'](_0x5d10d4,_0x58da4c,_0x5291e3);}}function F(_0x3b2bfd,_0x4e2230){const _0x1a339=new Set();for(const _0x1f5d60 of _0x3b2bfd['values']())(_0x4e2230||!0x1===_0x1f5d60['requiresContent'])&&_0x1a339['add'](_0x1f5d60['id']);return Array['from'](_0x1a339);}const Q=new RegExp(/^(.*?)<[a-zA-Z][a-zA-Z0-9_\-.]*[ >]/,'is');class j extends/* #__PURE__ -- @preserve */
|
|
24
|
-
_0x22d4ab(){['editor'];['textAdapter'];['view'];['_sanitizationContainer'];['_domParser'];['_xmlSerializer'];constructor(_0x33a176,_0x414180,_0x222514){super(),this['editor']=_0x33a176,this['textAdapter']=_0x414180,this['_sanitizationContainer']=document['createElement']('div'),this['_domParser']=new DOMParser(),this['_xmlSerializer']=new XMLSerializer(),this['view']=_0x222514,this['set']({'initialContext':'','currentContext':'','currentResponse':'','previousContext':void 0x0,'previousQuery':void 0x0,'previousLabel':void 0x0,'isProcessing':!0x1}),this['on']('set:currentContext',(_0x3a78f0,_0x5d8e3c,_0x516d28)=>{this['view']['value']=this['_sanitizeHTML'](_0x516d28);}),this['listenTo'](this['view'],'submitPrompt',(_0xe24ebd,_0x1625be)=>{const _0x1826a1=this['currentContext']||this['initialContext'];this['_handleQuery'](_0x1625be,_0x1826a1,'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:_0x3e92be,query:_0x2e0cd1,htmlContent:_0xc97c7a,label:_0x51a279,mainActionLabel:_0xdc0f46}){this['view']['prompt']=_0x51a279,this['view']['mainAction']=_0xdc0f46,this['initialContext']=_0xc97c7a,_0x2e0cd1&&(this['view']['isRendered']?this['_handleQuery'](_0x2e0cd1,_0xc97c7a,_0x3e92be,_0x51a279):this['view']['once']('render',()=>{this['_handleQuery'](_0x2e0cd1,_0xc97c7a,_0x3e92be,_0x51a279);}));}['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'](_0x586e30,_0x46f239,_0x4ed4b9,_0x48984a){return this['isProcessing']=!0x0,this['view']['startProcessing'](),this['previousContext']=_0x46f239,this['previousQuery']=_0x586e30,this['previousLabel']=_0x48984a||_0x586e30,this['previousActionId']=_0x4ed4b9,new Promise(_0x23320e=>{this['textAdapter']['makeRequest']({'query':_0x586e30,'context':_0x46f239,'onData':_0x4c3f2c=>{this['currentResponse']=_0x4c3f2c,this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse']);},'actionId':_0x4ed4b9})['then'](()=>{!this['currentContext']&&this['currentResponse']&&(this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse'],!0x0));})['catch'](_0x2858ca=>{_0x2858ca instanceof R?this['view']['handleError'](_0x2858ca['message']):this['view']['handleError'](),_0x23320e();})['finally'](()=>{this['stopProcessing'](),_0x23320e();});});}['_parseAndNormalizeContent'](_0x4799ec,_0x54539d=!0x1){const _0x343557=Q['exec'](_0x4799ec);_0x4799ec=_0x343557?_0x4799ec['substring'](_0x343557[0x1]['length']):_0x4799ec['length']<0x64&&!_0x54539d?'':this['_stripMarkdownSyntax'](_0x4799ec);const _0x8235fc=this['_domParser']['parseFromString'](_0x4799ec,'text/html');if(_0x343557){const _0x272f86=Array['from'](_0x8235fc['body']['childNodes']);_0x272f86['reverse']();for(const _0x243be of _0x272f86){if(_0x243be['nodeType']==Node['ELEMENT_NODE'])break;_0x243be['remove']();}}const _0x4aebc5=this['editor']['data']['processor']['toView'](this['_xmlSerializer']['serializeToString'](_0x8235fc['body']));this['_isH1TagSupportEnabled']()||this['_normalizeResponseHeadings'](_0x4aebc5);const _0x52782f=this['editor']['config']['get']('ai.aiAssistant.preserveComments'),_0x3ce80b=this['editor']['data']['toModel'](_0x4aebc5);return _0x52782f||_0x3ce80b['markers']['clear'](),this['editor']['data']['stringify'](_0x3ce80b);}['_normalizeResponseHeadings'](_0x210be3){const _0x365066=new _0x184aca(this['editor']['editing']['view']['document']),_0x4ebdcb=new _0x4ebbf1({'name':/^h[1-5]$/}),_0x374876=[];let _0x40255f=!0x1;for(const _0x50af3a of _0x210be3)_0x50af3a['is']('element')&&_0x4ebdcb['match'](_0x50af3a)&&(_0x374876['push'](_0x50af3a),'h1'==_0x50af3a['name']&&(_0x40255f=!0x0));if(_0x40255f){for(const _0x954404 of _0x374876)_0x365066['rename']('h'+(parseInt(_0x954404['name'][0x1])+0x1),_0x954404);}}['_isH1TagSupportEnabled'](){const {data:_0x298f0e,editing:_0x23f99f}=this['editor'],_0x41f67b=_0x298f0e['htmlProcessor']['toView']('<h1></h1>'),_0x5737d7=_0x298f0e['toView'](_0x298f0e['toModel'](_0x41f67b));return!!_0x23f99f['view']['domConverter']['viewToDom'](_0x5737d7)['querySelector']('h1');}['_sanitizeHTML'](_0x497c45){return this['editor']['editing']['view']['domConverter']['setContentOf'](this['_sanitizationContainer'],_0x497c45),this['_sanitizationContainer']['innerHTML'];}['_stripMarkdownSyntax'](_0x2116d4){const _0x5885a8=_0x2116d4['trim']();return _0x5885a8['startsWith']('```html')?_0x5885a8['endsWith']('```')?_0x5885a8['substring'](0x7,_0x5885a8['length']-0x3):_0x5885a8['substring'](0x7):_0x2116d4;}}const _={'REPLACE':'replace','INSERT':'insert'};class at extends ot{constructor(_0x3ba322){super(_0x3ba322),this['set']('isVisible',!0x1),this['set']('mainAction',_['REPLACE']),this['replaceButton']=this['_createButton']('','ck-button-action'),this['replaceButton']['bind']('label')['to'](this,'mainAction',_0x5be5d5=>i(_0x3ba322,'AI_'+_0x5be5d5['toUpperCase']()+'_CONTENT')),this['insertButton']=this['_createButton'](i(_0x3ba322,'Insert\x20below')),this['tryAgainButton']=this['_createButton'](i(_0x3ba322,'Try\x20again')),this['stopButton']=this['_createButton'](i(_0x3ba322,'Stop'));const _0x1bb796=this['bindTemplate'];this['extendTemplate']({'attributes':{'class':['ck-ai-form__toolbar',_0x1bb796['if']('isVisible','ck-hidden',_0xa61fd1=>!_0xa61fd1)]}}),this['items']['addMany']([this['replaceButton'],this['insertButton'],this['tryAgainButton'],this['stopButton']]);}['_createButton'](_0x439277,_0x373cee){const _0x1a1bb7=new _0x597db3(this['locale']);return _0x1a1bb7['set']({'label':_0x439277,'class':_0x373cee||'','isVisible':!0x0,'withText':!0x0}),_0x1a1bb7;}}class ct extends _0x6bb00{['contentFieldView'];['copyButtonView'];constructor(_0xf58bce,_0x49e18d=''){super(_0xf58bce),this['set']({'value':null,'isVisible':!0x1,'isProcessing':!0x1});const _0x5efddd=this['bindTemplate'];this['contentFieldView']=new bt(_0xf58bce,_0x49e18d),this['copyButtonView']=this['_createCopyButton'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area-wrapper',_0x5efddd['if']('isVisible','ck-hidden',_0x1d51ad=>!_0x1d51ad)],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area',_0x5efddd['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 _0x5da63a=!0x1;this['on']('change:value',(_0x4d8482,_0x1c6efe,_0x40612d)=>{const _0x487953=!this['contentFieldView']['element']['querySelector']('.ck-ai-form__loader');this['contentFieldView']['setContent'](_0x40612d),this['isProcessing']&&_0x487953&&!_0x5da63a&&this['element']['scrollTo']({'top':this['element']['scrollHeight'],'behavior':'smooth'});}),this['on']('change:isProcessing',(_0x3a2934,_0x20af02,_0x52ef69)=>{_0x5da63a=!0x1,_0x52ef69?(this['value']=null,this['contentFieldView']['appendLoader']()):this['value']||this['contentFieldView']['setContent']('');}),this['listenTo'](this['element'],'wheel',()=>{_0x5da63a=!0x0;}),this['listenTo'](this['element'],'mousedown',()=>{_0x5da63a=!0x0;});}['focus'](){this['element']['focus']();}['_createCopyButton'](){const _0x217e95=this['locale'],_0x481793=new _0x597db3(this['locale']),_0x47291b='ck-ai-form__copy-button';return _0x481793['set']({'label':i(_0x217e95,'Copy'),'icon':_0x7f74f8,'class':_0x47291b,'tooltip':!0x0}),_0x481793['bind']('isVisible')['to'](this,'value',_0x4962b2=>!!_0x4962b2),_0x481793['bind']('isEnabled')['to'](this,'isProcessing',_0x3cbba3=>!_0x3cbba3),_0x481793['on']('execute',()=>{this['_copyHTMLToClipboard'](this['contentFieldView']['element']),_0x481793['icon']=_0x2b440b,_0x481793['class']=_0x47291b+'\x20ck-ai-form__copy-button--copied',this['focus'](),setTimeout(()=>{_0x481793['icon']=_0x7f74f8,_0x481793['class']=_0x47291b;},0x3e8);}),_0x481793;}['_copyHTMLToClipboard'](_0x3585ee){const {window:_0x2cf141,document:_0x58b11e}=_0x10e036;if(_0x2cf141['ClipboardItem']){const {Blob:_0x2cd83b,ClipboardItem:_0x585204}=_0x2cf141,_0x18a3f8=[new _0x585204({'text/html':new _0x2cd83b([_0x3585ee['innerHTML']],{'type':'text/html'}),'text/plain':new _0x2cd83b([_0x3585ee['textContent']||''],{'type':'text/plain'})})];navigator['clipboard']['write'](_0x18a3f8);}else{const _0x35739c=_0x58b11e['createElement']('div');_0x35739c['style']['position']='absolute',_0x35739c['style']['left']='-9999px',_0x35739c['innerHTML']='<span>[</span>'+_0x3585ee['innerHTML']+'<span>]</span>',_0x58b11e['body']['appendChild'](_0x35739c);const _0x43c49d=_0x58b11e['createRange']();_0x43c49d['setStartAfter'](_0x35739c['firstElementChild']),_0x43c49d['setEndBefore'](_0x35739c['lastElementChild']);const _0x19fd62=_0x2cf141['getSelection']();_0x19fd62['removeAllRanges'](),_0x19fd62['addRange'](_0x43c49d),_0x58b11e['execCommand']('copy'),_0x35739c['remove']();}}}class bt extends _0x6bb00{constructor(_0x26602b,_0x4ab14c=''){super(_0x26602b),this['loaderView']=this['_createLoader'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-content',_0x4ab14c,'ck-reset_all-excluded','ck-ai-form__content-field']}});}['setContent'](_0x1bcfcf){this['element']['innerHTML']=_0x1bcfcf;}['appendLoader'](){this['element']['appendChild'](this['loaderView']['element']);}['_createLoader'](){const _0x119573=new _0x6bb00(),_0x148c43=this['locale'],_0x156361=new _0xcb5086();return _0x156361['isVisible']=!0x0,_0x119573['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__loader']},'children':[_0x156361,{'text':i(_0x148c43,'AI\x20is\x20writing...')}]}),_0x119573['render'](),_0x119573;}}class mt extends _0x6bb00{constructor(_0x3c9101,_0x5718c0=''){super(_0x3c9101);const _0xd19970=new _0x286853(),_0x6cf3f9=this['bindTemplate'];this['set']('text',_0x5718c0),_0xd19970['content']=_0x15050f,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__error']},'children':[_0xd19970,{'text':_0x6cf3f9['to']('text')}]});}}class lt extends st{['submitButtonView'];['showHistoryButtonView'];constructor(_0x46c38c,_0x43cb85){super(_0x46c38c,_0x43cb85),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',(_0x10b8a7,_0x3175e7)=>{_0x10b8a7['target']==this['queryView']['fieldView']['element']&&(this['submit'](),_0x3175e7());});}['_createSubmitButton'](){const _0x58a2cb=new _0x597db3(this['locale']),_0x20a89f=this['locale'];return _0x58a2cb['set']({'icon':it,'label':i(_0x20a89f,'Submit'),'isVisible':!0x0,'tooltip':!0x0,'class':'ck-ai-form__submit'}),_0x58a2cb['on']('execute',()=>{this['submit']();}),_0x58a2cb['bind']('isEnabled')['to'](this['queryView']['fieldView'],'isEmpty',this,'isEnabled',(_0x415ae1,_0x49f6d)=>!_0x415ae1&&_0x49f6d),_0x58a2cb;}['_createShowHistoryButton'](){const _0x221969=new _0x597db3(this['locale']),_0x2c49fb=this['resultsView'],_0x34ec85=this['locale'];_0x221969['set']({'label':i(_0x34ec85,'History'),'withText':!0x1,'icon':tt,'tooltip':!0x0,'tooltipPosition':'sw','class':'ck-ai-form__toggle-history'}),_0x221969['bind']('isOn')['to'](_0x2c49fb,'isVisible'),_0x221969['bind']('isEnabled')['to'](this,'isEnabled'),_0x221969['on']('execute',()=>{_0x2c49fb['isVisible']=!_0x2c49fb['isVisible'],_0x2c49fb['isVisible']?this['filteredView']['focus']():this['focus']();});const _0x19e247=()=>{_0x10e036['window']['requestAnimationFrame'](()=>{if(_0x10ab24(this['element'])){const _0x10e471=new _0x41b1c4(this['queryView']['fieldView']['element']),_0x55eb27=_0x10e471['width'],_0x4d4592='rtl'===_0x34ec85['uiLanguageDirection']?'left':'right';_0x10e471['excludeScrollbarsAndBorders'](),_0x221969['element']['style'][_0x4d4592]=_0x55eb27-_0x10e471['width']+0x1+'px';}});};return this['queryView']['fieldView']['on']('update',_0x19e247),this['on']('render',_0x19e247),_0x221969;}['submit'](){const _0x5639b0=this['queryView']['fieldView']['element']['value'];this['fire']('submit',_0x5639b0);}['focus'](_0x41d787){-0x1===_0x41d787?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}}class pt extends yt{['historyGroupView'];['clearHistoryButton'];constructor(_0x543d3a){super(_0x543d3a),this['clearHistoryButton']=this['_createClearHistoryButton'](),this['historyGroupView']=new Ct(),this['historyGroupView']['children']['add'](this['clearHistoryButton'],0x1),this['historyGroupView']['label']=i(_0x543d3a,'Prompt\x20history'),this['historyGroupView']['items']['delegate']('execute')['to'](this),this['items']['add'](this['historyGroupView']);}['filter'](){let _0x17befb=0x0;for(const _0x601c32 of this['items'])_0x17befb+=_0x601c32['items']['length'];return{'resultsCount':_0x17befb,'totalItemsCount':_0x17befb};}['_createClearHistoryButton'](){const _0x428469=this['locale'],_0x31bc4b=new _0x597db3(this['locale']);return _0x31bc4b['set']({'label':'('+i(_0x428469,'Clear')+')','withText':!0x0}),_0x31bc4b['on']('execute',()=>this['fire']('clearHistory')),_0x31bc4b;}}class ut extends xt{constructor(_0x2017d9){super();const _0x5970d1=new wt(),_0x457995=new _0x597db3(this['locale'],_0x5970d1);this['children']['add'](_0x457995),_0x457995['set']({'label':_0x2017d9['prompt'],'withText':!0x0}),_0x457995['on']('execute',()=>{this['fire']('execute',{'value':kt(_0x2017d9['prompt'])});});}}const ts='CKEditor/AIFormView/PromptHistory';class dt extends _0x4bf43a{constructor(){super(),this['_loadFromSessionStorage'](),this['on']('add',(_0x56c68f,_0x5c3738)=>{const _0x250a9b=os(_0x5c3738['prompt']);for(const _0x274074 of this)if(_0x274074!=_0x5c3738&&os(_0x274074['prompt'])===_0x250a9b){this['remove'](_0x274074);break;}this['length']>0x14&&this['remove'](this['last']),this['_saveToSessionStorage']();}),this['on']('remove',()=>{this['_saveToSessionStorage']();});}['_loadFromSessionStorage'](){const _0x4dbaa2=sessionStorage['getItem'](ts)||'[]';this['addMany'](JSON['parse'](_0x4dbaa2));}['_saveToSessionStorage'](){sessionStorage['setItem'](ts,JSON['stringify'](this['map'](_0x2a5276=>_0x2a5276)));}}function os(_0x32b29f){return _0x32b29f['toLowerCase']()['trim']();}class k extends _0x6bb00{['focusTracker'];['keystrokes'];['contentArea'];['toolbar'];['promptView'];['errorView'];['_focusables'];['focusCycler'];['_promptHistory'];constructor(_0x5c39ad,_0x540630,_0x4c6b3a=''){super(_0x5c39ad),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(_0x5c39ad),this['contentArea']=new ct(_0x5c39ad,_0x4c6b3a),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 _0x38d1c3=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form',_0x540630],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form-content']},'children':[{'tag':'div','attributes':{'class':[_0x38d1c3['if']('isError','ck-hidden',_0x25644a=>!_0x25644a)]},'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'](_0x570c16=0x1){-0x1===_0x570c16?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 _0x57ed39=this['locale'],_0x4deb20=new lt(_0x57ed39,{'queryView':{'label':i(_0x57ed39,'Ask\x20AI\x20to\x20edit\x20or\x20generate'),'creator':nt,'showIcon':!0x1,'showResetButton':!0x1},'infoView':{'text':{'noSearchableItems':{'primary':i(_0x57ed39,'Empty\x20history'),'secondary':i(_0x57ed39,'Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.')}}},'filteredView':this['_createHistoryView'](),'queryMinChars':0x1/0x0,'resetOnBlur':!0x1});return _0x4deb20['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0xb4de40,_0x38e4aa)=>_0xb4de40&&!_0x38e4aa),this['listenTo'](_0x4deb20,'submit',(_0xac761a,_0x5e9713)=>{this['prompt']=_0x5e9713;const _0x2bcc03=ft(_0x5e9713);this['fire']('submitPrompt',_0x2bcc03),_0x5e9713['trim']()&&this['_promptHistory']['add']({'prompt':_0x2bcc03},0x0);},{'priority':'high'}),_0x4deb20;}['_createHistoryView'](){const _0x15671d=new pt(this['locale']);return _0x15671d['historyGroupView']['items']['bindTo'](this['_promptHistory'])['as'](ut),_0x15671d['on']('clearHistory',()=>{this['_promptHistory']['clear'](),this['promptView']['search'](''),this['promptView']['focus']();}),_0x15671d;}['_createToolbar'](){const _0x1cdce5=new at(this['locale']);return _0x1cdce5['replaceButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x59fc5f,_0x4fad89,_0x34aecd)=>_0x59fc5f&&!_0x4fad89&&!!_0x34aecd),_0x1cdce5['replaceButton']['delegate']('execute')['to'](this,'replaceContent'),_0x1cdce5['insertButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x821d08,_0x24ff95,_0x3c928e)=>_0x821d08&&!_0x24ff95&&!!_0x3c928e),_0x1cdce5['insertButton']['delegate']('execute')['to'](this,'insertContentBelow'),_0x1cdce5['tryAgainButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x354da0,_0x17aff7)=>_0x354da0&&!_0x17aff7),_0x1cdce5['tryAgainButton']['delegate']('execute')['to'](this,'tryAgainEvent'),_0x1cdce5['stopButton']['bind']('isEnabled')['to'](this,'isProcessing'),_0x1cdce5['stopButton']['delegate']('execute')['to'](this,'stopProcessing'),_0x1cdce5;}['startProcessing'](){this['value']='',this['isError']=!0x1,this['isProcessing']=!0x0,this['contentArea']['isVisible']=!0x0,this['toolbar']['isVisible']=!0x0,this['contentArea']['focus']();}['finishProcessing'](){const _0x15b927=this['locale'];this['isProcessing']=!0x1,this['prompt']='',this['promptView']['reset'](),this['value']&&(this['promptView']['queryView']['label']=i(_0x15b927,'Ask\x20AI\x20to\x20improve\x20generated\x20text'));}['handleError'](_0x117d80){const _0x2cc740=this['locale'];this['finishProcessing'](),this['isError']=!0x0,this['errorView']['text']=_0x117d80||i(_0x2cc740,'AI_ERROR_FAILED'),this['value']||(this['contentArea']['isVisible']=!0x1);}}const l=globalThis['DataTransfer'];class n extends _0x19d319{['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[_0x281aff,a,x,_0x1c668c];}constructor(_0x2465b2){super(_0x2465b2),_0x2465b2['config']['define']('ai.aiAssistant.disabledElements',['media','rawHtml','tableOfContents']),_0x2465b2['config']['define']('ai.aiAssistant.contentAreaCssClass',''),_0x2465b2['config']['define']('ai.useTheme',!0x0),this['_uiCssClasses']='ck-ai-assistant-ui'+(_0x2465b2['config']['get']('ai.useTheme')?'\x20ck-ai-assistant-ui_theme':'');}['init'](){const {editor:_0x1065f2}=this;this['_aiAdapter']=_0x1065f2['plugins']['get'](x),this['_dialog']=_0x1065f2['plugins']['get'](_0x1c668c),this['_formView']=null,this['_commandDefinitions']=this['_getResolvedCommandsDefinitions']();const _0x12ecb1=new E(_0x1065f2,Array['from'](this['_commandDefinitions']['values']()));_0x1065f2['commands']['add']('showAIAssistant',_0x12ecb1),_0x1065f2['ui']['componentFactory']['add']('aiCommands',_0x514458=>{const _0x530b56=_0x49a0d5(_0x514458);return _0x530b56['set']({'class':'ck-ai-commands-dropdown\x20'+this['_uiCssClasses']}),_0x530b56['buttonView']['set']({'label':i(_0x514458,'AI\x20Commands'),'icon':_0x3bc04a,'tooltip':!0x0}),_0x530b56['on']('execute',_0x537b5b=>this['_onExecute'](_0x537b5b['source']['id'])),_0x5a529b(_0x530b56,_0x1065f2['ui']['view']['body'],function(_0x2ee407){const _0x55939f=o(_0x2ee407['config']['get']('ai.aiAssistant.commands'),_0x2ee407['locale']),_0x521a40=U(_0x2ee407,_0x55939f)['filter'](_0x4e5c01=>_0x4e5c01['commands']['length']);if(0x1===_0x521a40['length'])return U(_0x2ee407,_0x521a40[0x0]['commands'])['map'](_0x5df85d=>({'id':_0x5df85d['id'],'label':_0x5df85d['label']}));return _0x521a40['map'](_0x298e01=>{const {groupId:_0x3ba222,groupLabel:_0x504097,commands:_0x18669a}=_0x298e01,_0x37c55f=U(_0x2ee407,_0x18669a)['map'](_0x1785fe=>({'id':_0x1785fe['id'],'label':_0x1785fe['label']}));return{'id':_0x3ba222,'menu':_0x504097||_0x3ba222,'children':_0x37c55f};});}(_0x1065f2),{'ariaLabel':i(_0x514458,'AI\x20Commands')}),_0x530b56['menuView']['menuPanelClass']='ck-ai-commands-dropdown\x20'+this['_uiCssClasses'],_0x12ecb1['on']('change:enabledCommandsIds',_0x58c879),_0x530b56['menuView']['once']('render',_0x58c879),_0x530b56;function _0x58c879(){_0x530b56['isEnabled']=_0x12ecb1['enabledCommandsIds']['length']>0x0;for(const _0x2924d1 of _0x530b56['menuView']['buttons'])_0x2924d1['isEnabled']=_0x12ecb1['enabledCommandsIds']['includes'](_0x2924d1['id']);}}),_0x1065f2['ui']['componentFactory']['add']('menuBar:aiCommands',_0x4ed558=>{const _0x137009=new _0x173f77(_0x4ed558);_0x137009['buttonView']['set']({'label':i(_0x4ed558,'AI\x20Commands'),'icon':_0x3bc04a}),_0x137009['bind']('isEnabled')['to'](_0x12ecb1,'enabledCommandsIds',_0x4f6c46=>_0x4f6c46['length']>0x0);const _0x4cef4d=o(_0x1065f2['config']['get']('ai.aiAssistant.commands'),_0x4ed558);return this['_populateMenuBarMenu'](_0x12ecb1,_0x137009,_0x4cef4d,_0xaff4e7=>this['_onExecute'](_0xaff4e7)),_0x137009;}),_0x1065f2['ui']['componentFactory']['add']('aiAssistant',()=>{const _0x4f949c=this['_createAIAssistantUIButton'](_0x597db3);return _0x4f949c['set']({'tooltip':!0x0,'class':'ck-ai-assistant-button\x20'+this['_uiCssClasses']}),_0x4f949c;}),_0x1065f2['ui']['componentFactory']['add']('menuBar:aiAssistant',()=>{const _0x203595=this['_createAIAssistantUIButton'](_0x39c880);return _0x203595['set']({'role':'menuitemcheckbox'}),_0x203595;}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x107402=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x1b9f9f;for(const _0x47e1db in _0x107402){const _0x5b1aed=_0x47e1db,_0x1102a2=_0x107402[_0x5b1aed];if('aiLicenseKeyValid'==_0x1102a2||'aiLicenseKeyInvalid'==_0x1102a2||'aiLicenseKeyExpired'==_0x1102a2||'aiLicenseKeyDomainLimit'==_0x1102a2||'aiLicenseKeyNotAllowed'==_0x1102a2||'aiLicenseKeyEvaluationLimit'==_0x1102a2||'aiLicenseKeyTrialLimit'==_0x1102a2||'aiLicenseKeyUsageLimit'==_0x1102a2){delete _0x107402[_0x5b1aed],_0x1b9f9f=_0x1102a2,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'aiLicenseKeyInvalid'==_0x1b9f9f&&_0x107402['_showLicenseError']('invalid'),'aiLicenseKeyExpired'==_0x1b9f9f&&_0x107402['_showLicenseError']('expired'),'aiLicenseKeyDomainLimit'==_0x1b9f9f&&_0x107402['_showLicenseError']('domainLimit'),'aiLicenseKeyNotAllowed'==_0x1b9f9f&&_0x107402['_showLicenseError']('featureNotAllowed','AIAssistant'),'aiLicenseKeyEvaluationLimit'==_0x1b9f9f&&_0x107402['_showLicenseError']('evaluationLimit'),'aiLicenseKeyTrialLimit'==_0x1b9f9f&&_0x107402['_showLicenseError']('trialLimit'),'aiLicenseKeyUsageLimit'==_0x1b9f9f&&_0x107402['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['showUI'](_0x1b3e7c='',_0x586b4f='',_0xcd448='custom'){const _0x44d474=this['editor'],_0x49e6d3=_0x44d474['editing']['view'],_0x338bcd=_0x44d474['plugins']['get'](a),_0x29fdca=_0x44d474['plugins']['get'](_0x281aff);_0x338bcd['showFakeVisualSelection']();const _0x29a5c4=new l(),_0x3c5235=new ClipboardEvent('copy',{'clipboardData':_0x29a5c4}),_0x2a2ef8=new _0x3fc335(_0x29a5c4),_0x5ab7e8=new _0x12cbcc(_0x49e6d3,_0x3c5235,{'dataTransfer':_0x2a2ef8});_0x29fdca['_forceMarkersCopy']('comment',()=>{_0x49e6d3['document']['fire']('copy',_0x5ab7e8);}),this['_formView']||(this['_initView'](),this['_aiAssistantController']=new j(_0x44d474,this['_aiAdapter']['textAdapter'],this['_formView']));let _0x3c3b30=_0x2a2ef8['getData']('text/html');const _0x1dc423=_0x44d474['model']['document']['selection'],_0x59f00d=Array['from'](_0x1dc423['getRanges']());0x1===_0x59f00d['length']&&_0x59f00d[0x0]['isFlat']&&!_0x1dc423['getSelectedElement']()&&''!==_0x3c3b30['replace'](/ /g,'')['trim']()&&(_0x3c3b30='<p>'+_0x3c3b30+'</p>'),this['_aiAssistantController']['updateView']({'actionId':_0xcd448,'query':_0x1b3e7c,'htmlContent':_0x3c3b30,'label':_0x586b4f,'mainActionLabel':_[_0x44d474['model']['document']['selection']['isCollapsed']?'INSERT':'REPLACE']}),'aiAssistant'!==this['_dialog']['id']?this['_dialog']['show']({'id':'aiAssistant','icon':_0xeb87de,'title':i(this['editor']['locale'],'AI\x20Assistant'),'content':this['_formView'],'position':_0xcfbccd['EDITOR_TOP_SIDE'],'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_aiAssistantController']['reset'](),_0x338bcd['hideFakeVisualSelection']();}}):this['_dialog']['view']['wasMoved']||this['_dialog']['view']['updatePosition']();}['hideUI'](){this['_dialog']['hide']();}['_getResolvedCommandsDefinitions'](){const _0x52306c=new Map(),_0x2567a7=o(this['editor']['config']['get']('ai.aiAssistant.commands'),this['editor']['locale']);for(const _0x300862 of _0x2567a7)for(const _0x1a5a53 of _0x300862['commands'])_0x52306c['set'](_0x1a5a53['id'],{..._0x1a5a53,'groupId':_0x300862['groupId'],'groupLabel':_0x300862['groupLabel']||_0x300862['groupId']});return _0x52306c;}['_createAIAssistantUIButton'](_0x3d1f78){const _0x1f1417=this['editor'],_0x3b5788=_0x1f1417['commands']['get']('showAIAssistant'),_0x14119a=new _0x3d1f78(_0x1f1417['locale']);return _0x14119a['set']({'label':i(_0x1f1417['locale'],'AI\x20Assistant'),'icon':_0xeb87de,'isToggleable':!0x0}),_0x14119a['bind']('isEnabled')['to'](_0x3b5788),_0x14119a['bind']('isOn')['to'](this['_dialog'],'id',_0x462d5a=>'aiAssistant'===_0x462d5a),this['listenTo'](_0x14119a,'execute',()=>{_0x14119a['isOn']?this['hideUI']():_0x3b5788['execute']();}),_0x14119a;}['_initView'](){const _0x27e18c=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',()=>{_0x27e18c['insertContent'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['listenTo'](this['_formView'],'insertContentBelow',()=>{_0x27e18c['insertContentBelow'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['_initAriaAiStatusChangeAnnouncements']();}['_initAriaAiStatusChangeAnnouncements'](){const {locale:_0x1d1556,ui:{ariaLiveAnnouncer:_0x1c750f}}=this['editor'];this['_formView']['contentArea']['on']('change:isProcessing',(_0x177551,_0x231be8,_0x191d29)=>{const _0x4c4f6c=this['_aiAssistantController']['currentContext'];_0x191d29?_0x1c750f['announce'](i(_0x1d1556,'AI\x20is\x20writing')):_0x4c4f6c&&_0x1c750f['announce'](i(_0x1d1556,'Generated\x20content:\x20%0',_0x4c4f6c),{'politeness':'polite','isUnsafeHTML':!0x0});}),this['_formView']['on']('change:isError',(_0x12c457,_0x17e04d,_0x2dcd51)=>{if(_0x2dcd51){const _0x214e95=this['_formView']['errorView']['text'];_0x1c750f['announce'](i(_0x1d1556,'Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x214e95));}});}['_onExecute'](_0x34449c){const _0x59bcf0=this['_commandDefinitions']['get'](_0x34449c),_0x30e58c=this['editor'],_0x2f1477=_0x30e58c['model']['document']['selection'],_0x4a40e5=_0x30e58c['commands']['get']('showAIAssistant'),_0x3e3a86=_0x30e58c['plugins']['get'](a),_0x5d0ef9=''+(_0x59bcf0['groupId']!==K?_0x59bcf0['groupLabel']+':\x20':'')+_0x59bcf0['label'];if(!0x1!==_0x59bcf0['requiresContent']&&_0x2f1477['isCollapsed']){const _0x576f2c=_0x14c290(_0x2f1477['getSelectedBlocks']())||_0x30e58c['model']['schema']['getLimitElement'](_0x2f1477);_0x30e58c['model']['change'](_0x3af771=>{_0x3af771['setSelection'](_0x576f2c,'in');});}_0x3e3a86['showFakeVisualSelection'](),_0x4a40e5['execute'](_0x59bcf0['prompt'],_0x5d0ef9,'command:'+_0x34449c);}['_populateMenuBarMenu'](_0x70441b,_0x32e753,_0x23292f,_0x4458d0){const _0x509c2e=this['editor'],_0x2a33b1=_0x509c2e['locale'],_0x247979=new _0x27809a(_0x2a33b1),_0x22be44=U(_0x509c2e,_0x23292f)['filter'](_0x44831f=>_0x44831f['commands']['length']);0x1===_0x22be44['length']?this['_getMenuBarGroupButtons']({'command':_0x70441b,'commands':_0x22be44[0x0]['commands'],'parentMenuView':_0x32e753,'onExecute':_0x4458d0})['forEach'](_0x153eb9=>_0x247979['items']['add'](_0x153eb9)):_0x22be44['forEach'](({groupId:_0x3d342d,groupLabel:_0x29b531,commands:_0xd64e14})=>{const _0x7ea90=new _0x937a0a(_0x2a33b1,_0x32e753),_0xdeb902=new _0x173f77(_0x2a33b1),_0x28f0a5=new _0x27809a(_0x2a33b1),_0x3b757d=this['_getMenuBarGroupButtons']({'command':_0x70441b,'commands':_0xd64e14,'parentMenuView':_0xdeb902,'onExecute':_0x4458d0});_0xdeb902['buttonView']['set']({'label':_0x29b531||_0x3d342d}),_0xdeb902['delegate']('execute')['to'](_0x32e753),_0x28f0a5['items']['addMany'](_0x3b757d),_0xdeb902['panelView']['children']['add'](_0x28f0a5),_0x7ea90['children']['add'](_0xdeb902),_0x247979['items']['add'](_0x7ea90);}),_0x32e753['panelView']['children']['add'](_0x247979);}['_getMenuBarGroupButtons']({command:_0x415e33,commands:_0x4815e0,parentMenuView:_0x50b1d2,onExecute:_0xdad960}){const _0x143a61=this['editor'],_0x3db9fd=_0x143a61['locale'];return U(_0x143a61,_0x4815e0)['map'](_0x184dde=>{const _0x986beb=new _0x937a0a(_0x3db9fd,_0x50b1d2),_0xc5b955=new _0x39c880(_0x3db9fd);return _0xc5b955['set']({'label':_0x184dde['label']}),_0xc5b955['delegate']('execute')['to'](_0x50b1d2),_0xc5b955['on']('execute',()=>_0xdad960(_0x184dde['id'])),_0xc5b955['bind']('isEnabled')['to'](_0x415e33,'enabledCommandsIds',_0x44be1a=>_0x44be1a['includes'](_0x184dde['id'])),_0x986beb['children']['add'](_0xc5b955),_0x986beb;});}}function T(_0x30c20b,_0x30e230){return void 0x0!==_0x30c20b['order']&&void 0x0===_0x30e230['order']?0x1:void 0x0===_0x30c20b['order']&&void 0x0!==_0x30e230['order']?-0x1:void 0x0!==_0x30c20b['order']&&void 0x0!==_0x30e230['order']?_0x30c20b['order']-_0x30e230['order']:0x0;}function U(_0x515b61,_0x555483){_0x555483['sort'](T);const _0x238e47={},_0x4f5213=[];for(const _0x81e7e2 of _0x555483)if(void 0x0!==_0x81e7e2['order']){if(_0x81e7e2['order']in _0x238e47)throw new _0x168560('ai-commands-config-order-collision',_0x515b61,{'conflictingDefinitions':[_0x81e7e2,_0x238e47[_0x81e7e2['order']]]});_0x238e47[_0x81e7e2['order']]=_0x81e7e2,_0x4f5213['splice'](_0x81e7e2['order'],0x0,_0x81e7e2);}else _0x4f5213['push'](_0x81e7e2);return _0x4f5213;}class At extends _0x19d319{static get['requires'](){return[n,a];}static get['pluginName'](){return'AIAssistant';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x28575d){super(_0x28575d);const _0x1298ef=_0x28575d['config'],_0x26571e=_0x28575d['locale'];_0x1298ef['define']('ai.aiAssistant.preserveComments',!0x0),_0x1298ef['define']('ai.aiAssistant.commands',_t(_0x26571e)),_0x1298ef['define']('ai.aiAssistant.extraCommandGroups',[]),_0x1298ef['define']('ai.aiAssistant.removeCommands',[]);let _0x3edebb=o(_0x1298ef['get']('ai.aiAssistant.commands'),_0x26571e);const _0x38d19b=_0x1298ef['get']('ai.aiAssistant.extraCommandGroups'),_0x5516e7=_0x1298ef['get']('ai.aiAssistant.removeCommands');_0x38d19b['forEach'](_0x38df98=>{const _0x57fc6f=_0x3edebb['find'](_0x2311ce=>_0x2311ce['groupId']===_0x38df98['groupId']);_0x57fc6f?_0x57fc6f['commands']=_0x57fc6f['commands']['concat'](_0x38df98['commands']):_0x3edebb['push'](_0x38df98);}),_0x3edebb=_0x3edebb['filter'](_0x35388c=>!_0x5516e7['includes'](_0x35388c['groupId'])),_0x3edebb['forEach'](_0x1cd112=>{_0x1cd112['commands']=_0x1cd112['commands']['filter'](_0x263bec=>!_0x5516e7['includes'](_0x263bec['id']));}),_0x1298ef['set']('ai.aiAssistant.commands',_0x3edebb);}}function _t(_0x287ac2){return[{'groupId':'editOrReview','groupLabel':i(_0x287ac2,'Edit\x20or\x20review'),'commands':[{'id':'improveWriting','label':i(_0x287ac2,'Improve\x20writing'),'prompt':'Fix\x20spelling\x20mistakes,\x20use\x20proper\x20grammar\x20and\x20apply\x20good\x20writing\x20practices.\x20Do\x20not\x20lose\x20the\x20original\x20meaning.'},{'id':'makeShorter','label':i(_0x287ac2,'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(_0x287ac2,'Make\x20longer'),'prompt':'Improve\x20this\x20content\x20by\x20using\x20descriptive\x20language\x20and\x20inserting\x20more\x20information\x20and\x20more\x20detailed\x20explanations.'},{'id':'simplifyLanguage','label':i(_0x287ac2,'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(_0x287ac2,'Generate\x20from\x20selection'),'commands':[{'id':'summarize','label':i(_0x287ac2,'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(_0x287ac2,'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(_0x287ac2,'Change\x20tone'),'commands':[{'id':'professional','label':i(_0x287ac2,'Professional'),'prompt':'Improve\x20using\x20polished,\x20formal,\x20and\x20respectful\x20language\x20to\x20convey\x20professional\x20expertise\x20and\x20competence.'},{'id':'casual','label':i(_0x287ac2,'Casual'),'prompt':'Improve\x20using\x20casual,\x20informal\x20language\x20to\x20convey\x20a\x20casual\x20conversation\x20with\x20a\x20real\x20person.'},{'id':'direct','label':i(_0x287ac2,'Direct'),'prompt':'Improve\x20using\x20direct\x20language,\x20using\x20only\x20the\x20essential\x20information.'},{'id':'confident','label':i(_0x287ac2,'Confident'),'prompt':'Improve\x20using\x20compelling,\x20optimistic\x20language\x20to\x20convey\x20confidence\x20in\x20the\x20writing.'},{'id':'friendly','label':i(_0x287ac2,'Friendly'),'prompt':'Improve\x20using\x20friendly,\x20comforting\x20language,\x20to\x20convey\x20understanding\x20and\x20empathy.'}]},{'groupId':'changeStyle','groupLabel':i(_0x287ac2,'Change\x20style'),'commands':[{'id':'business','label':i(_0x287ac2,'Business'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20business\x20professional\x20with\x20formal\x20language.'},{'id':'legal','label':i(_0x287ac2,'Legal'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20legal\x20professional\x20using\x20valid\x20legal\x20terminology.'},{'id':'journalism','label':i(_0x287ac2,'Journalism'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20journalist\x20using\x20engaging\x20language\x20to\x20convey\x20the\x20importance\x20of\x20the\x20information.'},{'id':'poetic','label':i(_0x287ac2,'Poetic'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20poem\x20using\x20poetic\x20techniques\x20without\x20losing\x20the\x20original\x20meaning.'}]},{'groupId':'translate','groupLabel':i(_0x287ac2,'Translate'),'commands':[{'id':'translateEnglish','label':i(_0x287ac2,'English'),'prompt':'Translate\x20the\x20content\x20to\x20English\x20language.'},{'id':'translateSpanish','label':i(_0x287ac2,'Spanish'),'prompt':'Translate\x20the\x20content\x20to\x20Spanish\x20language.'},{'id':'translatePortuguese','label':i(_0x287ac2,'Portuguese'),'prompt':'Translate\x20the\x20content\x20to\x20Portuguese\x20language.'},{'id':'translateGerman','label':i(_0x287ac2,'German'),'prompt':'Translate\x20the\x20content\x20to\x20German\x20language.'},{'id':'translateFrench','label':i(_0x287ac2,'French'),'prompt':'Translate\x20the\x20content\x20to\x20French\x20language.'},{'id':'translateChinese','label':i(_0x287ac2,'Simplified\x20Chinese'),'prompt':'Translate\x20the\x20content\x20to\x20Simplified\x20Chinese\x20language.'},{'id':'translateHindi','label':i(_0x287ac2,'Hindi'),'prompt':'Translate\x20the\x20content\x20to\x20Hindi\x20language.'},{'id':'translateArabic','label':i(_0x287ac2,'Arabic'),'prompt':'Translate\x20the\x20content\x20to\x20Arabic\x20language.'}]}];}class S extends _0x19d319{['abortController'];static get['requires'](){return[x];}constructor(_0x34a4f7){super(_0x34a4f7),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'](_0x458b6c){return this['sendRequest'](_0x458b6c)['catch'](_0x3e650c=>{if(_0x3e650c instanceof R)return Promise['reject'](_0x3e650c);if('AbortError'==_0x3e650c['name'])return Promise['resolve']();throw console['error'](_0x3e650c),new _0x168560('aitextadapter-send-request-failed',null);});}async['_prepareRequestHeaders'](_0xeec584,_0xc01f7e){const _0x2d92f9=this['editor']['locale'],_0x4b2fc7={'Content-Type':'application/json'};if('object'==typeof _0xeec584)Object['assign'](_0x4b2fc7,_0xeec584);else{if(_0xeec584)try{const _0x176a27=await _0xeec584(_0xc01f7e);Object['assign'](_0x4b2fc7,_0x176a27);}catch{return Promise['reject'](new R(i(_0x2d92f9,'AI_ERROR_GET_HEADERS')));}}return _0x4b2fc7;}async['_prepareRequestParameters'](_0x1b395a,_0x3a5bfd){const _0x411c64=this['editor']['locale'];if('object'==typeof _0x1b395a)return _0x1b395a;try{return await _0x1b395a(_0x3a5bfd);}catch{return Promise['reject'](new R(i(_0x411c64,'AI_ERROR_GET_PARAMETERS')));}}}class It extends S{['_apiUrl'];['_requestHeaders'];['_requestParameters'];static get['pluginName'](){return'OpenAITextAdapter';}constructor(_0x4c08eb){super(_0x4c08eb),_0x4c08eb['config']['define']('ai.openAI.apiUrl','https://api.openai.com/v1/chat/completions'),_0x4c08eb['config']['get']('ai.openAI.requestParameters')||_0x4c08eb['config']['define']('ai.openAI.requestParameters',{'model':'gpt-4o','temperature':0x1,'top_p':0x1,'stream':!0x0}),this['_apiUrl']=_0x4c08eb['config']['get']('ai.openAI.apiUrl'),this['_requestHeaders']=_0x4c08eb['config']['get']('ai.openAI.requestHeaders')||{},this['_requestParameters']=_0x4c08eb['config']['get']('ai.openAI.requestParameters');}async['sendRequest']({query:_0x12f9a5,context:_0x2a2466,onData:_0x1a5d5a,actionId:_0x3faf5a}){const _0x5e8342=this['editor']['locale'],_0x589326=await this['prepareMessages'](_0x12f9a5,_0x2a2466,_0x3faf5a),_0x109968=await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x3faf5a),_0x25e5d6=await this['_prepareRequestParameters'](this['_requestParameters'],_0x3faf5a),_0x27bfe7={'messages':_0x589326,..._0x25e5d6},_0x428b30={'method':'POST','headers':_0x109968,'body':JSON['stringify'](_0x27bfe7),'signal':this['abortController']['signal']},_0x9e7646=await fetch(this['_apiUrl'],_0x428b30);if(_0x9e7646['ok'])return _0x25e5d6['stream']?await this['_readStreamableResponse'](_0x9e7646,_0x1a5d5a):await this['_readStaticResponse'](_0x9e7646,_0x1a5d5a),Promise['resolve']();{const _0x5168c5=await _0x9e7646['text']();return _0x5168c5['includes']('context_length_exceeded')?Promise['reject'](new R(i(_0x5e8342,'AI_ERROR_CONTEXT_LENGTH'))):_0x5168c5['includes']('Moderation')?Promise['reject'](new R(i(_0x5e8342,'AI_ERROR_MODERATION'))):Promise['reject'](new Error(_0x5168c5));}}async['prepareMessages'](_0x2dad9b,_0x44fd37,_0x2e3d1c){let _0x14c557,_0x233efa;return _0x44fd37?(_0x14c557='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.',_0x233efa='Instruction:\x0a'+_0x2dad9b+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x44fd37):(_0x14c557='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.',_0x233efa=_0x2dad9b),[{'role':'system','content':_0x14c557},{'role':'user','content':_0x233efa}];}async['_readStreamableResponse'](_0x40e6cf,_0x5be086){const _0x24ad31=_0x40e6cf['body']['getReader'](),_0x3a0877=new TextDecoder();let _0x258eeb='',_0x34a794='',_0xe689f1='',_0x2b115a=!0x1;for(;!_0x2b115a;){const {done:_0x305737,value:_0x542f41}=await _0x24ad31['read'](),_0x28400b=_0x258eeb+_0x3a0877['decode'](_0x542f41);let _0x5daa15='';_0x2b115a=_0x305737;try{_0x5daa15=this['_cleanUpData'](_0x28400b),_0x258eeb='';}catch{_0x258eeb=_0x28400b;continue;}_0x34a794+=_0x5daa15,!_0x2b115a&&this['_isBufferIncomplete'](_0x34a794)||_0x34a794&&(_0xe689f1+=_0x34a794,_0x34a794='',_0x5be086(_0xe689f1));}return Promise['resolve']();}async['_readStaticResponse'](_0x353448,_0x31c8da){return _0x31c8da((await _0x353448['json']())['choices'][0x0]['message']['content']),Promise['resolve']();}['_isBufferIncomplete'](_0x302cd2){const _0x58cadd=_0x302cd2['split']('<')['length']!==_0x302cd2['split']('>')['length'],_0x1b1113=_0x302cd2['length']<0x1e;return _0x58cadd&&_0x1b1113;}['_cleanUpData'](_0x1ad232){return _0x1ad232['split'](/\n(?![^{]*\})/g)['map'](_0xd03034=>_0xd03034['replace']('data:\x20',''))['filter'](_0x559306=>_0x559306&&_0x559306['length']>0x0&&'[DONE]'!==_0x559306)['map'](_0x298e1d=>{const {choices:_0x1f506a}=JSON['parse'](_0x298e1d);if(_0x1f506a[0x0]?.['delta']?.['content'])return _0x1f506a[0x0]['delta']['content'];})['filter'](_0x2e924b=>_0x2e924b)['join']('');}}class Et extends S{['_apiUrl'];['_requestHeaders'];['_bedrockClientConfig'];['_requestParameters'];static get['pluginName'](){return'AWSTextAdapter';}constructor(_0x3af151){super(_0x3af151),_0x3af151['config']['get']('ai.aws.requestParameters')||_0x3af151['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']=_0x3af151['config']['get']('ai.aws.apiUrl'),this['_bedrockClientConfig']=_0x3af151['config']['get']('ai.aws.bedrockClientConfig'),this['_requestHeaders']=_0x3af151['config']['get']('ai.aws.requestHeaders'),this['_requestParameters']=_0x3af151['config']['get']('ai.aws.requestParameters');}async['sendRequest']({query:_0x1289a1,context:_0x11d362,onData:_0x3a52b3,actionId:_0x37363f}){const {model:_0x34952c,stream:_0x259047,..._0x2f266a}=await this['_prepareRequestParameters'](this['_requestParameters'],_0x37363f),_0x31fff3={'prompt':await this['preparePrompt'](_0x1289a1,_0x11d362,_0x34952c,_0x37363f),..._0x2f266a};this['_apiUrl']?await this['_processProxyRequest'](_0x31fff3,_0x34952c,_0x259047,_0x3a52b3,_0x37363f):await this['_processAWSRequest'](_0x31fff3,_0x34952c,_0x259047,_0x3a52b3);}async['preparePrompt'](_0x55d746,_0xc5b8b5,_0x2ba496,_0x2275a){let _0xb03e0d,_0x400288;return _0xc5b8b5?(_0xb03e0d='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.',_0x400288='Instruction:\x0a'+_0x55d746+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0xc5b8b5):(_0xb03e0d='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.',_0x400288=_0x55d746),'meta.llama'==this['getModelFamily'](_0x2ba496)?'<<SYS>>\x0a'+_0xb03e0d+'\x0a<</SYS>>\x0a[INST]\x0a'+_0x400288+'\x0a[/INST]':'Human:\x0a'+_0xb03e0d+'\x0a'+_0x400288+'\x0a\x0aAssistant:';}['getModelFamily'](_0x1ec6eb){if(/^anthropic\.claude/['test'](_0x1ec6eb))return'anthropic.claude';if(/^ai21\.j2/['test'](_0x1ec6eb))return'ai21.j2';if(/^cohere\.command/['test'](_0x1ec6eb))return'cohere.command';if(/^meta\.llama/['test'](_0x1ec6eb))return'meta.llama';throw new R(i(this['editor']['locale'],'AI_ERROR_UNSUPPORTED_MODEL',_0x1ec6eb));}async['_processProxyRequest'](_0x54c491,_0x57ddb6,_0x5bd982,_0x93f439,_0x14e38a){const _0x20b76a={'method':'POST','headers':await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x14e38a),'body':JSON['stringify']({..._0x54c491,'model':_0x57ddb6,'stream':_0x5bd982}),'signal':this['abortController']['signal']},_0x4b090f=await fetch(this['_apiUrl'],_0x20b76a);_0x5bd982?await this['_readStreamableResponse'](_0x4b090f,_0x57ddb6,_0x93f439):await this['_readStaticResponse'](_0x4b090f,_0x57ddb6,_0x93f439);}async['_processAWSRequest'](_0x246970,_0x404737,_0x4f712,_0x2b9fa2){const _0x3d7037=new _0x474714(this['_bedrockClientConfig']),_0x38bf53={'body':JSON['stringify'](_0x246970),'contentType':'application/json','accept':'application/json','modelId':_0x404737};let _0x5a025d;if(_0x4f712){const _0x48e702=new _0x26ddd3(_0x38bf53);_0x5a025d=await _0x3d7037['send'](_0x48e702,{'abortSignal':this['abortController']['signal']}),await this['_readAsyncIterableResponse'](_0x5a025d,_0x404737,_0x2b9fa2);}else{const _0x3eb25a=new _0x368575(_0x38bf53);_0x5a025d=await _0x3d7037['send'](_0x3eb25a,{'abortSignal':this['abortController']['signal']}),await this['_readStaticResponse'](_0x5a025d,_0x404737,_0x2b9fa2);}}async['_readAsyncIterableResponse'](_0x1ae5e0,_0x421a56,_0x42130f){const _0xc0bdc6=_0x1ae5e0['body'],_0x3720fa=new TextDecoder('utf-8');let _0xf22918='';for await(const _0x1d64d6 of _0xc0bdc6)if(_0x1d64d6['chunk']){const _0x420d23=_0x3720fa['decode'](_0x1d64d6['chunk']['bytes']),_0x2320b2=JSON['parse'](_0x420d23);_0xf22918+=this['_getGeneratedText'](_0x2320b2,_0x421a56),_0x42130f(_0xf22918);}return Promise['resolve']();}async['_readStreamableResponse'](_0x2b5556,_0xd2b355,_0x3492ea){const _0x34e7da=_0x2b5556['body'],_0xc2fbb6=new TextDecoder('utf-8'),_0x40dd33=_0x34e7da['getReader']();let _0x399582='',_0x3283ac='',_0x27eafd=!0x1;for(;!_0x27eafd;){const {done:_0x14db26,value:_0x129b0e}=await _0x40dd33['read']();if(_0x27eafd=_0x14db26,_0x27eafd)break;const _0x1da9d8=(_0x399582+_0xc2fbb6['decode'](_0x129b0e))['split']('\x0a')['map'](_0x4537db=>{try{return _0x399582='',JSON['parse'](_0x4537db);}catch{return _0x399582=_0x4537db,null;}})['filter'](_0x3b7a65=>null!==_0x3b7a65);_0x1da9d8['length']&&(_0x3283ac+=_0x1da9d8['map'](_0x229311=>this['_getGeneratedText'](_0x229311,_0xd2b355))['join'](''),_0x3492ea(_0x3283ac));}return Promise['resolve']();}async['_readStaticResponse'](_0x21bafc,_0xae75dc,_0x44a65a){let _0x1aecd9;return _0x1aecd9=_0x21bafc instanceof Response?await _0x21bafc['json']():JSON['parse'](new TextDecoder('utf-8')['decode'](_0x21bafc['body'])),(_0x44a65a(this['_getGeneratedText'](_0x1aecd9,_0xae75dc)),Promise['resolve']());}['_getGeneratedText'](_0x419fcf,_0xa101d6){switch(this['getModelFamily'](_0xa101d6)){case'anthropic.claude':return _0x419fcf['completion'];case'ai21.j2':return _0x419fcf['completions'][0x0]['data']['text'];case'cohere.command':return _0x419fcf['generations'][0x0]['text'];case'meta.llama':return _0x419fcf['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 _0x4afa60,Command as _0x4fdb6e}from'@ckeditor/ckeditor5-core/dist/index.js';import{IconCopy as _0x9f1bf,IconCheck as _0x3f540b,IconError as _0x6a7bf5,IconSubmit as it,IconHistory as tt,IconMagicWand as _0x38bfdd,IconRobotPencil as _0x259ea1}from'@ckeditor/ckeditor5-icons/dist/index.js';import{uid as _0x1f1c8d,CKEditorError as _0x494e74,ObservableMixin as _0xe67b71,global as _0x28c891,isVisible as _0x555594,Rect as _0x79006,Collection as _0x1491bb,FocusTracker as et,KeystrokeHandler as rt,first as _0x17c7fd}from'@ckeditor/ckeditor5-utils/dist/index.js';import{ToolbarView as ot,ButtonView as _0x211bfa,View as _0x3c710d,SpinnerView as _0x316a9a,IconView as _0x1f7b32,AutocompleteView as st,ListView as yt,ListItemGroupView as Ct,ListItemView as xt,ButtonLabelView as wt,FocusCycler as ht,createLabeledTextarea as nt,Dialog as _0x346845,createDropdown as _0x1e5264,addMenuToDropdown as _0x2bc058,MenuBarMenuView as _0x19e865,MenuBarMenuListItemButtonView as _0x9f2e22,DialogViewPosition as _0x15ebf7,MenuBarMenuListView as _0x39fa47,MenuBarMenuListItemView as _0xb3777}from'@ckeditor/ckeditor5-ui/dist/index.js';import{ClipboardPipeline as _0x261eab,ClipboardMarkersUtils as _0x550621}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{ViewDocumentDomEventData as _0x28efc6,ViewDataTransfer as _0x7ddd47,ViewUpcastWriter as _0x26993f,Matcher as _0x2a56ed}from'@ckeditor/ckeditor5-engine/dist/index.js';import{unescape as kt,escape as ft}from'es-toolkit/compat';import{BedrockRuntimeClient as _0x5ebf4f,InvokeModelWithResponseStreamCommand as _0x2f41a6,InvokeModelCommand as _0x2c1b39}from'@aws-sdk/client-bedrock-runtime';const K='_ungrouppedCommands';function o(_0x27c978,_0x4f5c0d){const _0x4b52a0=(0x0,_0x4f5c0d['t'])('Other');return _0x27c978['length']?'groupId'in _0x27c978[0x0]?_0x27c978:[{'groupId':K,'groupLabel':_0x4b52a0,'order':0x1/0x0,'commands':_0x27c978}]:[{'groupId':K,'groupLabel':_0x4b52a0,'order':0x1/0x0,'commands':[]}];}const gt=globalThis['DataTransfer'],w='ai-ui';class a extends _0x4afa60{static get['pluginName'](){return'AIAssistantEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const {editor:_0x175a9d}=this,_0x365c3f=['ck-fake-ai-selection'];_0x175a9d['config']['get']('ai.useTheme')&&_0x365c3f['push']('ck-ai-assistant-ui_theme'),_0x175a9d['conversion']['for']('editingDowncast')['markerToHighlight']({'model':w,'view':{'classes':_0x365c3f,'priority':0xc}}),_0x175a9d['conversion']['for']('editingDowncast')['markerToElement']({'model':w,'view':(_0x51d6b5,{writer:_0x17b505})=>{if(!_0x51d6b5['markerRange']['isCollapsed'])return null;const _0x89e70b=_0x17b505['createUIElement']('span');return _0x17b505['addClass'](['ck-fake-ai-selection','ck-fake-ai-selection_collapsed'],_0x89e70b),_0x89e70b;}});}['afterInit'](){!async function(_0x3a53c9){const _0xc3984c=_0x4c54bc([0x6e,0x41,0x37,0x79,0x75,0x72,0x67,0x4f,0x48,0x62,0x5a,0x76,0x44,0x70,0x6c,0x52,0x6b,0x4a,0x73,0x63,0x64,0x49,0x43,0x6d,0x38,0x36,0x6f,0x50,0x57,0x78,0x39,0x32,0x66,0x31,0x71,0x46,0x30,0x4c,0x61,0x53,0x58,0x33,0x4e,0x47,0x77,0x54,0x4d,0x4b,0x34,0x6a,0x56,0x74,0x59,0x55,0x42,0x51,0x69,0x35,0x7a,0x68,0x65,0x45]),_0xb69357=0x3dffc4e1,_0x3f6382=0x3df8b791^_0xb69357,_0x18fc25=window[_0x4c54bc([0x44,0x61,0x74,0x65])][_0x4c54bc([0x6e,0x6f,0x77])](),_0x30f4b8=_0x3a53c9[_0x4c54bc([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x141827=new window[(_0x4c54bc([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x23efd0=>{_0x30f4b8[_0x4c54bc([0x6f,0x6e,0x63,0x65])](_0x4c54bc([0x72,0x65,0x61,0x64,0x79]),_0x23efd0);}),_0x217033={[_0x4c54bc([0x6b,0x74,0x79])]:_0x4c54bc([0x45,0x43]),[_0x4c54bc([0x75,0x73,0x65])]:_0x4c54bc([0x73,0x69,0x67]),[_0x4c54bc([0x63,0x72,0x76])]:_0x4c54bc([0x50,0x2d,0x32,0x35,0x36]),[_0x4c54bc([0x78])]:_0x4c54bc([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]),[_0x4c54bc([0x79])]:_0x4c54bc([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]),[_0x4c54bc([0x61,0x6c,0x67])]:_0x4c54bc([0x45,0x53,0x32,0x35,0x36])},_0x11be03=_0x30f4b8[_0x4c54bc([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x4c54bc([0x67,0x65,0x74])](_0x4c54bc([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x5b6a8f(){let _0xe1f598,_0x4ec5e4=null,_0x3a5b1b=null;try{if(_0x11be03==_0x4c54bc([0x47,0x50,0x4c]))return _0x4c54bc([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0xe1f598=_0x110e9e(),!_0xe1f598)return _0x4c54bc([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0xe1f598[_0x4c54bc([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x3a5b1b=_0x226406(_0xe1f598[_0x4c54bc([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0xe1f598[_0x4c54bc([0x6a,0x74,0x69])])),await _0x352cfb()?_0x15ff3d()?_0x257c0d()?_0x4c54bc([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x157eff()?(_0xe1f598[_0x4c54bc([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4c54bc([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x4ec5e4=_0x57917f(_0x4c54bc([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0xe1f598[_0x4c54bc([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4c54bc([0x74,0x72,0x69,0x61,0x6c])&&(_0x4ec5e4=_0x57917f(_0x4c54bc([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x148ee9()):_0x4c54bc([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x4c54bc([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x4c54bc([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x4c54bc([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x257c0d(){const _0x1542e4=[_0x4c54bc([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x4c54bc([0x74,0x72,0x69,0x61,0x6c])][_0x4c54bc([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xe1f598[_0x4c54bc([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x18fc25/0x3e8:0xe10*_0x3f6382;return _0xe1f598[_0x4c54bc([0x65,0x78,0x70])]<_0x1542e4;}function _0x15ff3d(){const _0xb83635=_0xe1f598[_0x4c54bc([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0xb83635&&(!!_0xb83635[_0x4c54bc([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4c54bc([0x2a]))||!!_0xb83635[_0x4c54bc([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4c54bc([0x41,0x49])));}function _0x157eff(){const _0xefb965=_0xe1f598[_0x4c54bc([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0xefb965||0x0==_0xefb965[_0x4c54bc([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x3ba551}=new URL(window[_0x4c54bc([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0xefb965[_0x4c54bc([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3ba551))return!0x0;const _0x136d5b=_0x3ba551[_0x4c54bc([0x73,0x70,0x6c,0x69,0x74])](_0x4c54bc([0x2e]));return _0xefb965[_0x4c54bc([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x35bca5=>_0x35bca5[_0x4c54bc([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4c54bc([0x2a])))[_0x4c54bc([0x6d,0x61,0x70])](_0xbdca9b=>_0xbdca9b[_0x4c54bc([0x73,0x70,0x6c,0x69,0x74])](_0x4c54bc([0x2e])))[_0x4c54bc([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x277c2d=>_0x277c2d[_0x4c54bc([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x136d5b[_0x4c54bc([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4c54bc([0x6d,0x61,0x70])](_0x12a134=>Array(_0x136d5b[_0x4c54bc([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x12a134[_0x4c54bc([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4c54bc([0x66,0x69,0x6c,0x6c])](_0x12a134[0x0]===_0x4c54bc([0x2a])?_0x4c54bc([0x2a]):'')[_0x4c54bc([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x12a134))[_0x4c54bc([0x73,0x6f,0x6d,0x65])](_0x5ad03e=>_0x136d5b[_0x4c54bc([0x65,0x76,0x65,0x72,0x79])]((_0x2930ff,_0x227f67)=>_0x5ad03e[_0x227f67]===_0x2930ff||_0x5ad03e[_0x227f67]===_0x4c54bc([0x2a])));}function _0x148ee9(){return _0x4ec5e4&&_0x3a5b1b?new window[(_0x4c54bc([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x50ab14,_0x42557a)=>{_0x4ec5e4[_0x4c54bc([0x74,0x68,0x65,0x6e])](_0x50ab14,_0x42557a),_0x3a5b1b[_0x4c54bc([0x74,0x68,0x65,0x6e])](_0x119166=>{_0x119166!=_0x4c54bc([0x56,0x61,0x6c,0x69,0x64])&&_0x50ab14(_0x119166);},_0x42557a);}):_0x4ec5e4||_0x3a5b1b||_0x4c54bc([0x56,0x61,0x6c,0x69,0x64]);}}function _0x226406(_0x5b7334,_0x6c462e){return new window[(_0x4c54bc([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xff048e=>{if(_0x214b80())return _0xff048e(_0x4c54bc([0x56,0x61,0x6c,0x69,0x64]));_0x34a426(),_0x30f4b8[_0x4c54bc([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x4c54bc([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x32845f=!0x1;const _0x40f3cf=_0x1f1c8d();function _0x1bd02c(_0x3f308e){return!!_0x3f308e&&(typeof _0x3f308e===_0x4c54bc([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x3f308e===_0x4c54bc([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x3f308e[_0x4c54bc([0x74,0x68,0x65,0x6e])]===_0x4c54bc([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x3f308e[_0x4c54bc([0x63,0x61,0x74,0x63,0x68])]===_0x4c54bc([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x39a7e5(_0x297b26){_0x51f645(_0x297b26)[_0x4c54bc([0x74,0x68,0x65,0x6e])](_0x2667b7=>{if(!_0x2667b7||_0x2667b7[_0x4c54bc([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x4c54bc([0x6f,0x6b]))return _0x4c54bc([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x1b0db4(_0x1109a7(_0x40f3cf+_0x6c462e))!=_0x2667b7[_0x4c54bc([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x4c54bc([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x4c54bc([0x56,0x61,0x6c,0x69,0x64]);})[_0x4c54bc([0x74,0x68,0x65,0x6e])](_0x317bd4=>(_0x10c331(),_0x317bd4),()=>{const _0x13683f=_0x2ae392();return null==_0x13683f?(_0x10c331(),_0x4c54bc([0x56,0x61,0x6c,0x69,0x64])):_0x4c54bc(_0x18fc25-_0x13683f>(0x19f340e1^_0xb69357)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x4c54bc([0x74,0x68,0x65,0x6e])](_0xff048e)[_0x4c54bc([0x63,0x61,0x74,0x63,0x68])](()=>{_0xff048e(_0x4c54bc([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x4d2ee2=0x3dc92a61^_0xb69357;function _0x10c331(){const _0x5caf4c=_0x4c54bc([0x6c,0x6c,0x63,0x74,0x2d])+_0x1b0db4(_0x1109a7(_0x5b7334)),_0x470e3d=_0x47cec1(_0x1b0db4(window[_0x4c54bc([0x4d,0x61,0x74,0x68])][_0x4c54bc([0x63,0x65,0x69,0x6c])](_0x18fc25/_0x4d2ee2)));window[_0x4c54bc([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4c54bc([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5caf4c,_0x470e3d);}function _0x2ae392(){const _0x35acc7=_0x4c54bc([0x6c,0x6c,0x63,0x74,0x2d])+_0x1b0db4(_0x1109a7(_0x5b7334)),_0x45054a=window[_0x4c54bc([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4c54bc([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x35acc7);return _0x45054a?window[_0x4c54bc([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x47cec1(_0x45054a),0x10)*_0x4d2ee2:null;}function _0x51f645(_0x137a12){return new window[(_0x4c54bc([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x363322,_0x107903)=>{_0x137a12[_0x4c54bc([0x74,0x68,0x65,0x6e])](_0x363322,_0x107903),window[_0x4c54bc([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x107903,0x3dfe1021^_0xb69357);});}}_0x30f4b8[_0x4c54bc([0x6f,0x6e])](_0x4c54bc([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x16f2d1,_0x44bf6b)=>{if(_0x44bf6b[0x0]!=_0x5b7334)return _0xff048e(_0x4c54bc([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x44bf6b[0x1]={..._0x44bf6b[0x1],[_0x4c54bc([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x40f3cf};},{[_0x4c54bc([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4c54bc([0x68,0x69,0x67,0x68])}),_0x30f4b8[_0x4c54bc([0x6f,0x6e])](_0x4c54bc([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x45afa7=>{_0x1bd02c(_0x45afa7[_0x4c54bc([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x32845f=!0x0,_0x39a7e5(_0x45afa7[_0x4c54bc([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x4c54bc([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4c54bc([0x6c,0x6f,0x77])}),_0x141827[_0x4c54bc([0x74,0x68,0x65,0x6e])](()=>{_0x32845f||_0xff048e(_0x4c54bc([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x214b80(){return _0x30f4b8[_0x4c54bc([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4c54bc([0x76,0x69,0x65,0x77])][_0x4c54bc([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x4c54bc([0x61,0x75,0x74,0x6f]);}function _0x34a426(){_0x30f4b8[_0x4c54bc([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4c54bc([0x76,0x69,0x65,0x77])][_0x4c54bc([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4c54bc([0x61,0x75,0x74,0x6f]);}}function _0x57917f(_0x17baf4){const _0x56f4f9=[new window[(_0x4c54bc([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xf617b0=>setTimeout(_0xf617b0,0x3df6fa2d^_0xb69357)),_0x141827[_0x4c54bc([0x74,0x68,0x65,0x6e])](()=>new window[(_0x4c54bc([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3d8f2f=>{let _0x24fd6b=0x0;_0x30f4b8[_0x4c54bc([0x6d,0x6f,0x64,0x65,0x6c])][_0x4c54bc([0x6f,0x6e])](_0x4c54bc([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0xe16b96,_0x5b9554)=>{_0x5b9554[0x0][_0x4c54bc([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x24fd6b++,_0x24fd6b==(0x3dffc519^_0xb69357)&&(_0x3d8f2f(),_0xe16b96[_0x4c54bc([0x6f,0x66,0x66])]());});}))];return window[_0x4c54bc([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4c54bc([0x72,0x61,0x63,0x65])](_0x56f4f9)[_0x4c54bc([0x74,0x68,0x65,0x6e])](()=>_0x17baf4);}async function _0x1f7f7b(){await _0x141827,_0x30f4b8[_0x4c54bc([0x6d,0x6f,0x64,0x65,0x6c])][_0x4c54bc([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x5e1644,_0x30f4b8[_0x4c54bc([0x6d,0x6f,0x64,0x65,0x6c])][_0x4c54bc([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x5e1644,_0x30f4b8[_0x4c54bc([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x4c54bc([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x30e6ba(_0x307cc1){const _0xa2a44d=_0x5d5878();_0x30f4b8[_0xa2a44d]=_0x4c54bc([0x61,0x69,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x307cc1,_0x307cc1!=_0x4c54bc([0x56,0x61,0x6c,0x69,0x64])&&_0x1f7f7b();}function _0x5d5878(){const _0x4e8822=window[_0x4c54bc([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x4c54bc([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x4c54bc([0x6e,0x6f,0x77])]())[_0x4c54bc([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x4c54bc([0x2e]),'');let _0x95213f=_0x4c54bc([0x6e]);for(let _0x91ecaa=0x0;_0x91ecaa<_0x4e8822[_0x4c54bc([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x91ecaa+=0x2){let _0x4cfa47=window[_0x4c54bc([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4e8822[_0x4c54bc([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x91ecaa,_0x91ecaa+0x2));_0x4cfa47>=_0xc3984c[_0x4c54bc([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x4cfa47-=_0xc3984c[_0x4c54bc([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x95213f+=_0xc3984c[_0x4cfa47];}return _0x95213f;}function _0x110e9e(){const _0x47cfb7=_0x11be03[_0x4c54bc([0x73,0x70,0x6c,0x69,0x74])](_0x4c54bc([0x2e]));if(0x3!=_0x47cfb7[_0x4c54bc([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x14f7e0(_0x47cfb7[0x1]);function _0x14f7e0(_0x39ba79){const _0x33b8ea=_0x3cbe2b(_0x39ba79);return _0x33b8ea&&_0x2d6eaa()?_0x33b8ea:null;function _0x2d6eaa(){const _0x8a0af=_0x33b8ea[_0x4c54bc([0x6a,0x74,0x69])],_0x220366=window[_0x4c54bc([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x8a0af[_0x4c54bc([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x8a0af[_0x4c54bc([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x234b34={..._0x33b8ea,[_0x4c54bc([0x6a,0x74,0x69])]:_0x8a0af[_0x4c54bc([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x8a0af[_0x4c54bc([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x234b34[_0x4c54bc([0x76,0x63])],_0x1109a7(_0x234b34)==_0x220366;}}}async function _0x352cfb(){let _0x33812e=!0x0;try{const _0x589d6f=_0x11be03[_0x4c54bc([0x73,0x70,0x6c,0x69,0x74])](_0x4c54bc([0x2e])),[_0x167a0e,_0x2de6d9,_0x49a847]=_0x589d6f;return _0x55f509(_0x167a0e),await _0x252741(_0x167a0e,_0x2de6d9,_0x49a847),_0x33812e;}catch{return!0x1;}function _0x55f509(_0x188f5b){const _0x1b7600=_0x3cbe2b(_0x188f5b);_0x1b7600&&_0x1b7600[_0x4c54bc([0x61,0x6c,0x67])]==_0x4c54bc([0x45,0x53,0x32,0x35,0x36])||(_0x33812e=!0x1);}async function _0x252741(_0x10990e,_0x17f622,_0xfdc354){const _0x3a6f34=window[_0x4c54bc([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x4c54bc([0x66,0x72,0x6f,0x6d])](_0x547d32(_0xfdc354),_0xf134db=>_0xf134db[_0x4c54bc([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x17bfca=new window[(_0x4c54bc([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x4c54bc([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x10990e+_0x4c54bc([0x2e])+_0x17f622),_0x4a3414=window[_0x4c54bc([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x4c54bc([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x4a3414)return;const _0x108e40=await _0x4a3414[_0x4c54bc([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x4c54bc([0x6a,0x77,0x6b]),_0x217033,{[_0x4c54bc([0x6e,0x61,0x6d,0x65])]:_0x4c54bc([0x45,0x43,0x44,0x53,0x41]),[_0x4c54bc([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x4c54bc([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x4c54bc([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x4a3414[_0x4c54bc([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x4c54bc([0x6e,0x61,0x6d,0x65])]:_0x4c54bc([0x45,0x43,0x44,0x53,0x41]),[_0x4c54bc([0x68,0x61,0x73,0x68])]:{[_0x4c54bc([0x6e,0x61,0x6d,0x65])]:_0x4c54bc([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x108e40,_0x3a6f34,_0x17bfca)||(_0x33812e=!0x1);}}function _0x3cbe2b(_0x2ce205){return _0x2ce205[_0x4c54bc([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x4c54bc([0x65,0x79]))?JSON[_0x4c54bc([0x70,0x61,0x72,0x73,0x65])](_0x547d32(_0x2ce205)):null;}function _0x547d32(_0x1c6dc4){return window[_0x4c54bc([0x61,0x74,0x6f,0x62])](_0x1c6dc4[_0x4c54bc([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x4c54bc([0x2b]))[_0x4c54bc([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x4c54bc([0x2f])));}function _0x1109a7(_0x5d34e5){let _0x3e069f=0x1505;function _0x541f82(_0x51c4f7){for(let _0x22f167=0x0;_0x22f167<_0x51c4f7[_0x4c54bc([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x22f167++){const _0x56b866=_0x51c4f7[_0x4c54bc([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x22f167);_0x3e069f=(_0x3e069f<<0x5)+_0x3e069f+_0x56b866,_0x3e069f&=_0x3e069f;}}function _0xc29f93(_0x57a9ae){Array[_0x4c54bc([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x57a9ae)?_0x57a9ae[_0x4c54bc([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0xc29f93):_0x57a9ae&&typeof _0x57a9ae==_0x4c54bc([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x4c54bc([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x57a9ae)[_0x4c54bc([0x73,0x6f,0x72,0x74])]()[_0x4c54bc([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x5f4f72,_0x377ab8])=>{_0x541f82(_0x5f4f72),_0xc29f93(_0x377ab8);}):_0x541f82(window[_0x4c54bc([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x57a9ae));}return _0xc29f93(_0x5d34e5),_0x3e069f>>>0x0;}function _0x1b0db4(_0x3f582c){return _0x3f582c[_0x4c54bc([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x4c54bc([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x4c54bc([0x30]));}function _0x47cec1(_0x18ccfb){return _0x18ccfb[_0x4c54bc([0x73,0x70,0x6c,0x69,0x74])]('')[_0x4c54bc([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x4c54bc([0x6a,0x6f,0x69,0x6e])]('');}function _0x5e1644(){}function _0x4c54bc(_0x1b73fb){return _0x1b73fb['map'](_0x2f5ea9=>String['fromCharCode'](_0x2f5ea9))['join']('');}_0x30e6ba(await _0x5b6a8f());}(this);}['showFakeVisualSelection'](){const _0x368bbd=this['editor']['model'];_0x368bbd['change'](_0x4956fd=>{const _0x51b3d9=_0x368bbd['document']['selection']['getRanges']();let _0x47110a=0x0;for(const _0x3034e9 of _0x51b3d9){const _0x327d5d=w+':'+_0x47110a;if(_0x368bbd['markers']['has'](_0x327d5d))_0x4956fd['updateMarker'](_0x327d5d,{'range':_0x3034e9});else{if(_0x3034e9['start']['isAtEnd']){const _0x5cfa73=_0x3034e9['start']['getLastMatchingPosition'](({item:_0x16bc31})=>!_0x368bbd['schema']['isContent'](_0x16bc31),{'boundaries':_0x3034e9});_0x4956fd['addMarker'](_0x327d5d,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x4956fd['createRange'](_0x5cfa73,_0x3034e9['end'])});}else _0x4956fd['addMarker'](_0x327d5d,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x3034e9});}_0x47110a++;}});}['hideFakeVisualSelection'](){const _0x52e329=this['editor']['model'],_0x4dae3b=Array['from'](this['editor']['model']['markers']['getMarkersGroup'](w));_0x4dae3b['length']&&_0x52e329['change'](_0x5ed3f6=>{_0x4dae3b['forEach'](_0x1b0206=>{_0x5ed3f6['removeMarker'](_0x1b0206);});});}['insertContent'](_0x51b9a9,_0x390097){const _0x570906=this['_getAISelection'](),_0x4cf49d=_0x390097||_0x570906['getFirstRange']();this['editor']['model']['canEditAt'](_0x4cf49d)&&this['editor']['model']['change'](_0x12e7b6=>{this['hideFakeVisualSelection'](),_0x390097||this['_resetContentOfSelectedTableCells'](_0x12e7b6,_0x570906),this['_pasteHTMLUsingClipboard']({'insertAt':_0x4cf49d,'writer':_0x12e7b6,'html':_0x51b9a9});});}['insertContentBelow'](_0x1e6956){const {model:_0x30f251}=this['editor'],_0x11b6c4=this['_getAISelection']();_0x30f251['change'](()=>{const _0x5e29a8=this['_prepareTableInsertBelowPosition'](_0x1e6956,_0x11b6c4)||this['_getDefaultInsertBelowPosition'](_0x11b6c4);this['insertContent'](_0x1e6956,_0x5e29a8);});}['_getAISelection'](){const _0x11ef02=this['editor']['model'],_0x3f4627=Array['from'](_0x11ef02['markers']['getMarkersGroup'](w))['map'](_0x57dd67=>_0x57dd67['getRange']());return _0x11ef02['createSelection'](_0x3f4627);}['_pasteHTMLUsingClipboard']({writer:_0x5aca76,html:_0x353d82,insertAt:_0x303292}){const {view:_0x2aa97d}=this['editor']['editing'],_0x3c2c8b=this['editor']['plugins']['get'](_0x261eab),_0xc112bb=new gt();_0xc112bb['setData']('text/html',_0x353d82);const _0x266a46=new ClipboardEvent('paste',{'clipboardData':_0xc112bb}),_0x5109a6=new _0x28efc6(_0x2aa97d,_0x266a46,{'dataTransfer':new _0x7ddd47(_0xc112bb)});_0x5aca76['setSelection'](_0x303292);const _0x4bea4b=(_0x30986f,_0x3b97e2)=>{_0x3b97e2['resultRange']&&_0x5aca76['setSelection'](_0x3b97e2['resultRange']);};_0x3c2c8b['once']('contentInsertion',_0x4bea4b,{'priority':'lowest'}),_0x2aa97d['document']['fire']('paste',_0x5109a6),_0x3c2c8b['off']('contentInsertion',_0x4bea4b);}['_getDefaultInsertBelowPosition'](_0x36c063){const {model:_0x3fe03c}=this['editor'],_0x595915=Array['from'](_0x36c063['getSelectedBlocks']());return _0x595915['length']?_0x3fe03c['createPositionAfter'](_0x595915['pop']()):_0x36c063['getLastPosition']();}['_prepareTableInsertBelowPosition'](_0x5db281,_0x565877){const {model:_0x1dec66,plugins:_0x25920c}=this['editor'];if(_0x25920c['has']('TableUtils')){const _0x54d356=_0x25920c['get']('TableUtils')['getSelectedTableCells'](_0x565877);if(_0x54d356['length']){const _0x34535d=this['_getTableRowCountFromContent'](_0x5db281),_0x2d9a5e=this['_createEmptyTableRows'](_0x54d356,_0x34535d);return _0x1dec66['createPositionAt'](_0x2d9a5e,0x0);}}return null;}['_getTableRowCountFromContent'](_0x56bffb){const _0x4411a8=this['editor']['plugins']['get']('TableUtils'),_0xd67092=this['editor']['data']['parse'](_0x56bffb),_0x1e29a1=Array['from'](_0xd67092['getChildren']())['filter'](_0x45dafa=>_0x45dafa['is']('element','table'));let _0x28d327=0x0;return _0x1e29a1['forEach'](_0x1cd44e=>{_0x28d327+=_0x4411a8['getRows'](_0x1cd44e);}),_0x28d327;}['_createEmptyTableRows'](_0x15c022,_0x4368fa){const _0x5383b0=this['editor']['plugins']['get']('TableUtils'),_0x478475=_0x5383b0['getRowIndexes'](_0x15c022),_0x1a16c5=_0x5383b0['getColumnIndexes'](_0x15c022),_0xd8c5f0=_0x478475['last']+0x1,_0x303800=_0x1a16c5['first'],_0x3ef09f=_0x15c022[0x0]['findAncestor']('table');for(let _0x7aae7=0x0;_0x7aae7<_0x4368fa;_0x7aae7++)_0x5383b0['insertRows'](_0x3ef09f,{'at':_0xd8c5f0});return _0x3ef09f['getChild'](_0xd8c5f0)['getChild'](_0x303800);}['_resetContentOfSelectedTableCells'](_0x1e84f4,_0x3cafca){const {plugins:_0x24bb66}=this['editor'],{model:_0x5625ce}=_0x1e84f4;if(!_0x24bb66['has']('TableUtils'))return;_0x24bb66['get']('TableUtils')['getSelectedTableCells'](_0x3cafca)['length']&&_0x5625ce['deleteContent'](_0x3cafca);}}class x extends _0x4afa60{static get['pluginName'](){return'AIAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['afterInit'](){if(!this['textAdapter'])throw new _0x494e74('aiadapter-text-adapter-not-set',null);}}class R extends Error{constructor(_0x54bacb){super(_0x54bacb),this['name']='AIRequestError';}}function i(_0x4e594e,_0x295618,_0x288310){const t=_0x4e594e['t'];switch(_0x295618){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',_0x288310);case'Error\x20during\x20AI\x20content\x20generation:\x20%0':return t('Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x288310);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'},_0x288310);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 _0x295618;}}class E extends _0x4fdb6e{['_commandDefinitions'];constructor(_0x360dcd,_0x31eaf7){super(_0x360dcd),this['_commandDefinitions']=_0x31eaf7,this['set']('enabledCommandsIds',[]),this['on']('change:_hasContext',(_0x30539f,_0x6d1e2,_0x1373e3)=>{this['isEnabled']&&(this['enabledCommandsIds']=F(this['_commandDefinitions'],_0x1373e3));}),this['set']('_hasContext',!0x1),this['on']('change:isEnabled',(_0x1bd7bc,_0x31ed54,_0x519d2c)=>{this['enabledCommandsIds']=_0x519d2c?F(this['_commandDefinitions'],this['_hasContext']):[];});}['refresh'](){const _0x559ee2=this['editor']['model'];this['_hasContext']=function(_0x254521){const _0x577058=_0x254521['document']['selection'];return _0x577058['isCollapsed']?0x0!==[..._0x577058['getSelectedBlocks']()]['length']&&![..._0x577058['getSelectedBlocks']()][0x0]['isEmpty']:!!_0x254521['hasContent'](_0x577058['getFirstRange']());}(_0x559ee2);const _0x2fd197=_0x559ee2['document']['selection'],_0x5ab18f=this['editor']['config']['get']('ai.aiAssistant.disabledElements');for(const _0x39c34d of _0x2fd197['getRanges']())for(const _0x4848de of _0x39c34d['getItems']())if(_0x4848de['is']('element')&&_0x5ab18f['includes'](_0x4848de['name']))return void(this['isEnabled']=!0x1);this['isEnabled']=!0x0;}['execute'](_0x293b44='',_0x2fb210='',_0x45a7be='custom'){this['editor']['plugins']['get'](n)['showUI'](_0x293b44,_0x2fb210,_0x45a7be);}}function F(_0x3cb6b0,_0x20d28e){const _0x2071ee=new Set();for(const _0x3f1abe of _0x3cb6b0['values']())(_0x20d28e||!0x1===_0x3f1abe['requiresContent'])&&_0x2071ee['add'](_0x3f1abe['id']);return Array['from'](_0x2071ee);}const Q=new RegExp(/^(.*?)<[a-zA-Z][a-zA-Z0-9_\-.]*[ >]/,'is');class j extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0xe67b71(){['editor'];['textAdapter'];['view'];['_sanitizationContainer'];['_domParser'];['_xmlSerializer'];constructor(_0x28c320,_0x187bba,_0x2aed8e){super(),this['editor']=_0x28c320,this['textAdapter']=_0x187bba,this['_sanitizationContainer']=document['createElement']('div'),this['_domParser']=new DOMParser(),this['_xmlSerializer']=new XMLSerializer(),this['view']=_0x2aed8e,this['set']({'initialContext':'','currentContext':'','currentResponse':'','previousContext':void 0x0,'previousQuery':void 0x0,'previousLabel':void 0x0,'isProcessing':!0x1}),this['on']('set:currentContext',(_0xbbac03,_0x46da72,_0x2516ba)=>{this['view']['value']=this['_sanitizeHTML'](_0x2516ba);}),this['listenTo'](this['view'],'submitPrompt',(_0x88be5f,_0x5012a5)=>{const _0x17b7ce=this['currentContext']||this['initialContext'];this['_handleQuery'](_0x5012a5,_0x17b7ce,'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:_0x1d02ea,query:_0xf62885,htmlContent:_0x3d5be7,label:_0x505912,mainActionLabel:_0x389c16}){this['view']['prompt']=_0x505912,this['view']['mainAction']=_0x389c16,this['initialContext']=_0x3d5be7,_0xf62885&&(this['view']['isRendered']?this['_handleQuery'](_0xf62885,_0x3d5be7,_0x1d02ea,_0x505912):this['view']['once']('render',()=>{this['_handleQuery'](_0xf62885,_0x3d5be7,_0x1d02ea,_0x505912);}));}['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'](_0x318fda,_0x57c093,_0x274d2d,_0x2b2638){return this['isProcessing']=!0x0,this['view']['startProcessing'](),this['previousContext']=_0x57c093,this['previousQuery']=_0x318fda,this['previousLabel']=_0x2b2638||_0x318fda,this['previousActionId']=_0x274d2d,new Promise(_0x1d9a2d=>{this['textAdapter']['makeRequest']({'query':_0x318fda,'context':_0x57c093,'onData':_0x5ecfac=>{this['currentResponse']=_0x5ecfac,this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse']);},'actionId':_0x274d2d})['then'](()=>{!this['currentContext']&&this['currentResponse']&&(this['currentContext']=this['_parseAndNormalizeContent'](this['currentResponse'],!0x0));})['catch'](_0x23d2ca=>{_0x23d2ca instanceof R?this['view']['handleError'](_0x23d2ca['message']):this['view']['handleError'](),_0x1d9a2d();})['finally'](()=>{this['stopProcessing'](),_0x1d9a2d();});});}['_parseAndNormalizeContent'](_0xdf7cb6,_0x15071c=!0x1){const _0x4b4f11=Q['exec'](_0xdf7cb6);_0xdf7cb6=_0x4b4f11?_0xdf7cb6['substring'](_0x4b4f11[0x1]['length']):_0xdf7cb6['length']<0x64&&!_0x15071c?'':this['_stripMarkdownSyntax'](_0xdf7cb6);const _0x46787d=this['_domParser']['parseFromString'](_0xdf7cb6,'text/html');if(_0x4b4f11){const _0x267c8a=Array['from'](_0x46787d['body']['childNodes']);_0x267c8a['reverse']();for(const _0x5ac305 of _0x267c8a){if(_0x5ac305['nodeType']==Node['ELEMENT_NODE'])break;_0x5ac305['remove']();}}const _0x357a31=this['editor']['data']['processor']['toView'](this['_xmlSerializer']['serializeToString'](_0x46787d['body']));this['_isH1TagSupportEnabled']()||this['_normalizeResponseHeadings'](_0x357a31);const _0x105c8a=this['editor']['config']['get']('ai.aiAssistant.preserveComments'),_0x278a46=this['editor']['data']['toModel'](_0x357a31);return _0x105c8a||_0x278a46['markers']['clear'](),this['editor']['data']['stringify'](_0x278a46);}['_normalizeResponseHeadings'](_0x4ac5ff){const _0x3ba4f5=new _0x26993f(this['editor']['editing']['view']['document']),_0x1ae72f=new _0x2a56ed({'name':/^h[1-5]$/}),_0x5e7b0d=[];let _0x1da85d=!0x1;for(const _0x4d80da of _0x4ac5ff)_0x4d80da['is']('element')&&_0x1ae72f['match'](_0x4d80da)&&(_0x5e7b0d['push'](_0x4d80da),'h1'==_0x4d80da['name']&&(_0x1da85d=!0x0));if(_0x1da85d){for(const _0x50ac02 of _0x5e7b0d)_0x3ba4f5['rename']('h'+(parseInt(_0x50ac02['name'][0x1])+0x1),_0x50ac02);}}['_isH1TagSupportEnabled'](){const {data:_0x510653,editing:_0x143290}=this['editor'],_0x174ab0=_0x510653['htmlProcessor']['toView']('<h1></h1>'),_0x343b8f=_0x510653['toView'](_0x510653['toModel'](_0x174ab0));return!!_0x143290['view']['domConverter']['viewToDom'](_0x343b8f)['querySelector']('h1');}['_sanitizeHTML'](_0x37a070){return this['editor']['editing']['view']['domConverter']['setContentOf'](this['_sanitizationContainer'],_0x37a070),this['_sanitizationContainer']['innerHTML'];}['_stripMarkdownSyntax'](_0x3a8d5f){const _0x241c3e=_0x3a8d5f['trim']();return _0x241c3e['startsWith']('```html')?_0x241c3e['endsWith']('```')?_0x241c3e['substring'](0x7,_0x241c3e['length']-0x3):_0x241c3e['substring'](0x7):_0x3a8d5f;}}const _={'REPLACE':'replace','INSERT':'insert'};class at extends ot{constructor(_0x355146){super(_0x355146),this['set']('isVisible',!0x1),this['set']('mainAction',_['REPLACE']),this['replaceButton']=this['_createButton']('','ck-button-action'),this['replaceButton']['bind']('label')['to'](this,'mainAction',_0x38de80=>i(_0x355146,'AI_'+_0x38de80['toUpperCase']()+'_CONTENT')),this['insertButton']=this['_createButton'](i(_0x355146,'Insert\x20below')),this['tryAgainButton']=this['_createButton'](i(_0x355146,'Try\x20again')),this['stopButton']=this['_createButton'](i(_0x355146,'Stop'));const _0x28ef93=this['bindTemplate'];this['extendTemplate']({'attributes':{'class':['ck-ai-form__toolbar',_0x28ef93['if']('isVisible','ck-hidden',_0xc1a4d6=>!_0xc1a4d6)]}}),this['items']['addMany']([this['replaceButton'],this['insertButton'],this['tryAgainButton'],this['stopButton']]);}['_createButton'](_0xa049db,_0x3531bb){const _0x434d6d=new _0x211bfa(this['locale']);return _0x434d6d['set']({'label':_0xa049db,'class':_0x3531bb||'','isVisible':!0x0,'withText':!0x0}),_0x434d6d;}}class ct extends _0x3c710d{['contentFieldView'];['copyButtonView'];constructor(_0x3d1d2d,_0x1db6c5=''){super(_0x3d1d2d),this['set']({'value':null,'isVisible':!0x1,'isProcessing':!0x1});const _0x24bf99=this['bindTemplate'];this['contentFieldView']=new bt(_0x3d1d2d,_0x1db6c5),this['copyButtonView']=this['_createCopyButton'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area-wrapper',_0x24bf99['if']('isVisible','ck-hidden',_0x1f7574=>!_0x1f7574)],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form__content-area',_0x24bf99['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 _0x5a332a=!0x1;this['on']('change:value',(_0x4f87e2,_0x3dff38,_0x59c033)=>{const _0x36aa52=!this['contentFieldView']['element']['querySelector']('.ck-ai-form__loader');this['contentFieldView']['setContent'](_0x59c033),this['isProcessing']&&_0x36aa52&&!_0x5a332a&&this['element']['scrollTo']({'top':this['element']['scrollHeight'],'behavior':'smooth'});}),this['on']('change:isProcessing',(_0x522f0d,_0x3086ab,_0x472484)=>{_0x5a332a=!0x1,_0x472484?(this['value']=null,this['contentFieldView']['appendLoader']()):this['value']||this['contentFieldView']['setContent']('');}),this['listenTo'](this['element'],'wheel',()=>{_0x5a332a=!0x0;}),this['listenTo'](this['element'],'mousedown',()=>{_0x5a332a=!0x0;});}['focus'](){this['element']['focus']();}['_createCopyButton'](){const _0x23bb75=this['locale'],_0x5cd3c4=new _0x211bfa(this['locale']),_0x253377='ck-ai-form__copy-button';return _0x5cd3c4['set']({'label':i(_0x23bb75,'Copy'),'icon':_0x9f1bf,'class':_0x253377,'tooltip':!0x0}),_0x5cd3c4['bind']('isVisible')['to'](this,'value',_0x2d8899=>!!_0x2d8899),_0x5cd3c4['bind']('isEnabled')['to'](this,'isProcessing',_0x5d787a=>!_0x5d787a),_0x5cd3c4['on']('execute',()=>{this['_copyHTMLToClipboard'](this['contentFieldView']['element']),_0x5cd3c4['icon']=_0x3f540b,_0x5cd3c4['class']=_0x253377+'\x20ck-ai-form__copy-button--copied',this['focus'](),setTimeout(()=>{_0x5cd3c4['icon']=_0x9f1bf,_0x5cd3c4['class']=_0x253377;},0x3e8);}),_0x5cd3c4;}['_copyHTMLToClipboard'](_0x33baa1){const {window:_0x45dcce,document:_0x4b0225}=_0x28c891;if(_0x45dcce['ClipboardItem']){const {Blob:_0x1dd7f8,ClipboardItem:_0x1ac8d2}=_0x45dcce,_0x248315=[new _0x1ac8d2({'text/html':new _0x1dd7f8([_0x33baa1['innerHTML']],{'type':'text/html'}),'text/plain':new _0x1dd7f8([_0x33baa1['textContent']||''],{'type':'text/plain'})})];navigator['clipboard']['write'](_0x248315);}else{const _0x4426fd=_0x4b0225['createElement']('div');_0x4426fd['style']['position']='absolute',_0x4426fd['style']['left']='-9999px',_0x4426fd['innerHTML']='<span>[</span>'+_0x33baa1['innerHTML']+'<span>]</span>',_0x4b0225['body']['appendChild'](_0x4426fd);const _0x84e16d=_0x4b0225['createRange']();_0x84e16d['setStartAfter'](_0x4426fd['firstElementChild']),_0x84e16d['setEndBefore'](_0x4426fd['lastElementChild']);const _0x2fcfa9=_0x45dcce['getSelection']();_0x2fcfa9['removeAllRanges'](),_0x2fcfa9['addRange'](_0x84e16d),_0x4b0225['execCommand']('copy'),_0x4426fd['remove']();}}}class bt extends _0x3c710d{constructor(_0x3a1c33,_0x2db78b=''){super(_0x3a1c33),this['loaderView']=this['_createLoader'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-content',_0x2db78b,'ck-reset_all-excluded','ck-ai-form__content-field']}});}['setContent'](_0xb9a2b){this['element']['innerHTML']=_0xb9a2b;}['appendLoader'](){this['element']['appendChild'](this['loaderView']['element']);}['_createLoader'](){const _0x2d0116=new _0x3c710d(),_0xa12ddd=this['locale'],_0xb84816=new _0x316a9a();return _0xb84816['isVisible']=!0x0,_0x2d0116['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__loader']},'children':[_0xb84816,{'text':i(_0xa12ddd,'AI\x20is\x20writing...')}]}),_0x2d0116['render'](),_0x2d0116;}}class mt extends _0x3c710d{constructor(_0x490ec5,_0x3dde18=''){super(_0x490ec5);const _0x482c5a=new _0x1f7b32(),_0x4d5ecb=this['bindTemplate'];this['set']('text',_0x3dde18),_0x482c5a['content']=_0x6a7bf5,this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__error']},'children':[_0x482c5a,{'text':_0x4d5ecb['to']('text')}]});}}class lt extends st{['submitButtonView'];['showHistoryButtonView'];constructor(_0x5c0564,_0x2c987b){super(_0x5c0564,_0x2c987b),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',(_0x156300,_0x1d3b0e)=>{_0x156300['target']==this['queryView']['fieldView']['element']&&(this['submit'](),_0x1d3b0e());});}['_createSubmitButton'](){const _0x473453=new _0x211bfa(this['locale']),_0x37b9b7=this['locale'];return _0x473453['set']({'icon':it,'label':i(_0x37b9b7,'Submit'),'isVisible':!0x0,'tooltip':!0x0,'class':'ck-ai-form__submit'}),_0x473453['on']('execute',()=>{this['submit']();}),_0x473453['bind']('isEnabled')['to'](this['queryView']['fieldView'],'isEmpty',this,'isEnabled',(_0x30e299,_0x2450d5)=>!_0x30e299&&_0x2450d5),_0x473453;}['_createShowHistoryButton'](){const _0xfc8397=new _0x211bfa(this['locale']),_0x5b18d1=this['resultsView'],_0x22b591=this['locale'];_0xfc8397['set']({'label':i(_0x22b591,'History'),'withText':!0x1,'icon':tt,'tooltip':!0x0,'tooltipPosition':'sw','class':'ck-ai-form__toggle-history'}),_0xfc8397['bind']('isOn')['to'](_0x5b18d1,'isVisible'),_0xfc8397['bind']('isEnabled')['to'](this,'isEnabled'),_0xfc8397['on']('execute',()=>{_0x5b18d1['isVisible']=!_0x5b18d1['isVisible'],_0x5b18d1['isVisible']?this['filteredView']['focus']():this['focus']();});const _0x356175=()=>{_0x28c891['window']['requestAnimationFrame'](()=>{if(_0x555594(this['element'])){const _0x400d10=new _0x79006(this['queryView']['fieldView']['element']),_0xf6b6fa=_0x400d10['width'],_0x36d3da='rtl'===_0x22b591['uiLanguageDirection']?'left':'right';_0x400d10['excludeScrollbarsAndBorders'](),_0xfc8397['element']['style'][_0x36d3da]=_0xf6b6fa-_0x400d10['width']+0x1+'px';}});};return this['queryView']['fieldView']['on']('update',_0x356175),this['on']('render',_0x356175),_0xfc8397;}['submit'](){const _0x315eff=this['queryView']['fieldView']['element']['value'];this['fire']('submit',_0x315eff);}['focus'](_0x28ed07){-0x1===_0x28ed07?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}}class pt extends yt{['historyGroupView'];['clearHistoryButton'];constructor(_0x29b153){super(_0x29b153),this['clearHistoryButton']=this['_createClearHistoryButton'](),this['historyGroupView']=new Ct(),this['historyGroupView']['children']['add'](this['clearHistoryButton'],0x1),this['historyGroupView']['label']=i(_0x29b153,'Prompt\x20history'),this['historyGroupView']['items']['delegate']('execute')['to'](this),this['items']['add'](this['historyGroupView']);}['filter'](){let _0x223b3f=0x0;for(const _0x4d3fe3 of this['items'])_0x223b3f+=_0x4d3fe3['items']['length'];return{'resultsCount':_0x223b3f,'totalItemsCount':_0x223b3f};}['_createClearHistoryButton'](){const _0xaf36e7=this['locale'],_0x3816b9=new _0x211bfa(this['locale']);return _0x3816b9['set']({'label':'('+i(_0xaf36e7,'Clear')+')','withText':!0x0}),_0x3816b9['on']('execute',()=>this['fire']('clearHistory')),_0x3816b9;}}class ut extends xt{constructor(_0x52f43e){super();const _0x4fcaae=new wt(),_0x14410f=new _0x211bfa(this['locale'],_0x4fcaae);this['children']['add'](_0x14410f),_0x14410f['set']({'label':_0x52f43e['prompt'],'withText':!0x0}),_0x14410f['on']('execute',()=>{this['fire']('execute',{'value':kt(_0x52f43e['prompt'])});});}}const ts='CKEditor/AIFormView/PromptHistory';class dt extends _0x1491bb{constructor(){super(),this['_loadFromSessionStorage'](),this['on']('add',(_0x1161f6,_0x1af94b)=>{const _0xacaa51=os(_0x1af94b['prompt']);for(const _0x5efe4e of this)if(_0x5efe4e!=_0x1af94b&&os(_0x5efe4e['prompt'])===_0xacaa51){this['remove'](_0x5efe4e);break;}this['length']>0x14&&this['remove'](this['last']),this['_saveToSessionStorage']();}),this['on']('remove',()=>{this['_saveToSessionStorage']();});}['_loadFromSessionStorage'](){const _0x5c64ad=sessionStorage['getItem'](ts)||'[]';this['addMany'](JSON['parse'](_0x5c64ad));}['_saveToSessionStorage'](){sessionStorage['setItem'](ts,JSON['stringify'](this['map'](_0x121ee1=>_0x121ee1)));}}function os(_0x132600){return _0x132600['toLowerCase']()['trim']();}class k extends _0x3c710d{['focusTracker'];['keystrokes'];['contentArea'];['toolbar'];['promptView'];['errorView'];['_focusables'];['focusCycler'];['_promptHistory'];constructor(_0x3f2248,_0x589e0e,_0xdd30fe=''){super(_0x3f2248),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(_0x3f2248),this['contentArea']=new ct(_0x3f2248,_0xdd30fe),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 _0xddb95c=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form',_0x589e0e],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck','ck-ai-form-content']},'children':[{'tag':'div','attributes':{'class':[_0xddb95c['if']('isError','ck-hidden',_0xe4f02=>!_0xe4f02)]},'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'](_0xae8e30=0x1){-0x1===_0xae8e30?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 _0x50d2e3=this['locale'],_0x385f1a=new lt(_0x50d2e3,{'queryView':{'label':i(_0x50d2e3,'Ask\x20AI\x20to\x20edit\x20or\x20generate'),'creator':nt,'showIcon':!0x1,'showResetButton':!0x1},'infoView':{'text':{'noSearchableItems':{'primary':i(_0x50d2e3,'Empty\x20history'),'secondary':i(_0x50d2e3,'Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.')}}},'filteredView':this['_createHistoryView'](),'queryMinChars':0x1/0x0,'resetOnBlur':!0x1});return _0x385f1a['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x27c22e,_0x3df233)=>_0x27c22e&&!_0x3df233),this['listenTo'](_0x385f1a,'submit',(_0xa437a7,_0x1f8f78)=>{this['prompt']=_0x1f8f78;const _0x3891a4=ft(_0x1f8f78);this['fire']('submitPrompt',_0x3891a4),_0x1f8f78['trim']()&&this['_promptHistory']['add']({'prompt':_0x3891a4},0x0);},{'priority':'high'}),_0x385f1a;}['_createHistoryView'](){const _0x518e69=new pt(this['locale']);return _0x518e69['historyGroupView']['items']['bindTo'](this['_promptHistory'])['as'](ut),_0x518e69['on']('clearHistory',()=>{this['_promptHistory']['clear'](),this['promptView']['search'](''),this['promptView']['focus']();}),_0x518e69;}['_createToolbar'](){const _0x38083b=new at(this['locale']);return _0x38083b['replaceButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x2017ef,_0x5bbba5,_0x3a62b1)=>_0x2017ef&&!_0x5bbba5&&!!_0x3a62b1),_0x38083b['replaceButton']['delegate']('execute')['to'](this,'replaceContent'),_0x38083b['insertButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',this,'value',(_0x13e2c2,_0x31ca91,_0x113b12)=>_0x13e2c2&&!_0x31ca91&&!!_0x113b12),_0x38083b['insertButton']['delegate']('execute')['to'](this,'insertContentBelow'),_0x38083b['tryAgainButton']['bind']('isEnabled')['to'](this,'isEnabled',this,'isProcessing',(_0x2d7864,_0x51856b)=>_0x2d7864&&!_0x51856b),_0x38083b['tryAgainButton']['delegate']('execute')['to'](this,'tryAgainEvent'),_0x38083b['stopButton']['bind']('isEnabled')['to'](this,'isProcessing'),_0x38083b['stopButton']['delegate']('execute')['to'](this,'stopProcessing'),_0x38083b;}['startProcessing'](){this['value']='',this['isError']=!0x1,this['isProcessing']=!0x0,this['contentArea']['isVisible']=!0x0,this['toolbar']['isVisible']=!0x0,this['contentArea']['focus']();}['finishProcessing'](){const _0xfb27fe=this['locale'];this['isProcessing']=!0x1,this['prompt']='',this['promptView']['reset'](),this['value']&&(this['promptView']['queryView']['label']=i(_0xfb27fe,'Ask\x20AI\x20to\x20improve\x20generated\x20text'));}['handleError'](_0x11b4a0){const _0x25bdc4=this['locale'];this['finishProcessing'](),this['isError']=!0x0,this['errorView']['text']=_0x11b4a0||i(_0x25bdc4,'AI_ERROR_FAILED'),this['value']||(this['contentArea']['isVisible']=!0x1);}}const l=globalThis['DataTransfer'];class n extends _0x4afa60{['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[_0x550621,a,x,_0x346845];}constructor(_0x358e7a){super(_0x358e7a),_0x358e7a['config']['define']('ai.aiAssistant.disabledElements',['media','rawHtml','tableOfContents']),_0x358e7a['config']['define']('ai.aiAssistant.contentAreaCssClass',''),_0x358e7a['config']['define']('ai.useTheme',!0x0),this['_uiCssClasses']='ck-ai-assistant-ui'+(_0x358e7a['config']['get']('ai.useTheme')?'\x20ck-ai-assistant-ui_theme':'');}['init'](){const {editor:_0x54601}=this;this['_aiAdapter']=_0x54601['plugins']['get'](x),this['_dialog']=_0x54601['plugins']['get'](_0x346845),this['_formView']=null,this['_commandDefinitions']=this['_getResolvedCommandsDefinitions']();const _0x322b16=new E(_0x54601,Array['from'](this['_commandDefinitions']['values']()));_0x54601['commands']['add']('showAIAssistant',_0x322b16),_0x54601['ui']['componentFactory']['add']('aiCommands',_0x477afa=>{const _0x1c4451=_0x1e5264(_0x477afa);return _0x1c4451['set']({'class':'ck-ai-commands-dropdown\x20'+this['_uiCssClasses']}),_0x1c4451['buttonView']['set']({'label':i(_0x477afa,'AI\x20Commands'),'icon':_0x38bfdd,'tooltip':!0x0}),_0x1c4451['on']('execute',_0x410d01=>this['_onExecute'](_0x410d01['source']['id'])),_0x2bc058(_0x1c4451,_0x54601['ui']['view']['body'],function(_0x16126a){const _0x207a28=o(_0x16126a['config']['get']('ai.aiAssistant.commands'),_0x16126a['locale']),_0x990636=U(_0x16126a,_0x207a28)['filter'](_0x365674=>_0x365674['commands']['length']);if(0x1===_0x990636['length'])return U(_0x16126a,_0x990636[0x0]['commands'])['map'](_0x3ad0c6=>({'id':_0x3ad0c6['id'],'label':_0x3ad0c6['label']}));return _0x990636['map'](_0x3687e9=>{const {groupId:_0x5c0e66,groupLabel:_0x2c657d,commands:_0x3e8eed}=_0x3687e9,_0x2e467a=U(_0x16126a,_0x3e8eed)['map'](_0x36c4ba=>({'id':_0x36c4ba['id'],'label':_0x36c4ba['label']}));return{'id':_0x5c0e66,'menu':_0x2c657d||_0x5c0e66,'children':_0x2e467a};});}(_0x54601),{'ariaLabel':i(_0x477afa,'AI\x20Commands')}),_0x1c4451['menuView']['menuPanelClass']='ck-ai-commands-dropdown\x20'+this['_uiCssClasses'],_0x322b16['on']('change:enabledCommandsIds',_0x3f259c),_0x1c4451['menuView']['once']('render',_0x3f259c),_0x1c4451;function _0x3f259c(){_0x1c4451['isEnabled']=_0x322b16['enabledCommandsIds']['length']>0x0;for(const _0x523df8 of _0x1c4451['menuView']['buttons'])_0x523df8['isEnabled']=_0x322b16['enabledCommandsIds']['includes'](_0x523df8['id']);}}),_0x54601['ui']['componentFactory']['add']('menuBar:aiCommands',_0x4987c1=>{const _0x1105d2=new _0x19e865(_0x4987c1);_0x1105d2['buttonView']['set']({'label':i(_0x4987c1,'AI\x20Commands'),'icon':_0x38bfdd}),_0x1105d2['bind']('isEnabled')['to'](_0x322b16,'enabledCommandsIds',_0x5f0257=>_0x5f0257['length']>0x0);const _0x5813b9=o(_0x54601['config']['get']('ai.aiAssistant.commands'),_0x4987c1);return this['_populateMenuBarMenu'](_0x322b16,_0x1105d2,_0x5813b9,_0x48f85c=>this['_onExecute'](_0x48f85c)),_0x1105d2;}),_0x54601['ui']['componentFactory']['add']('aiAssistant',()=>{const _0x5e9a42=this['_createAIAssistantUIButton'](_0x211bfa);return _0x5e9a42['set']({'tooltip':!0x0,'class':'ck-ai-assistant-button\x20'+this['_uiCssClasses']}),_0x5e9a42;}),_0x54601['ui']['componentFactory']['add']('menuBar:aiAssistant',()=>{const _0x204fc2=this['_createAIAssistantUIButton'](_0x9f2e22);return _0x204fc2['set']({'role':'menuitemcheckbox'}),_0x204fc2;}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x5727fd=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x21ba35;for(const _0x1b6ab9 in _0x5727fd){const _0x20340d=_0x1b6ab9,_0x1c370d=_0x5727fd[_0x20340d];if('aiLicenseKeyValid'==_0x1c370d||'aiLicenseKeyInvalid'==_0x1c370d||'aiLicenseKeyExpired'==_0x1c370d||'aiLicenseKeyDomainLimit'==_0x1c370d||'aiLicenseKeyNotAllowed'==_0x1c370d||'aiLicenseKeyEvaluationLimit'==_0x1c370d||'aiLicenseKeyTrialLimit'==_0x1c370d||'aiLicenseKeyUsageLimit'==_0x1c370d){delete _0x5727fd[_0x20340d],_0x21ba35=_0x1c370d,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'aiLicenseKeyInvalid'==_0x21ba35&&_0x5727fd['_showLicenseError']('invalid'),'aiLicenseKeyExpired'==_0x21ba35&&_0x5727fd['_showLicenseError']('expired'),'aiLicenseKeyDomainLimit'==_0x21ba35&&_0x5727fd['_showLicenseError']('domainLimit'),'aiLicenseKeyNotAllowed'==_0x21ba35&&_0x5727fd['_showLicenseError']('featureNotAllowed','AIAssistant'),'aiLicenseKeyEvaluationLimit'==_0x21ba35&&_0x5727fd['_showLicenseError']('evaluationLimit'),'aiLicenseKeyTrialLimit'==_0x21ba35&&_0x5727fd['_showLicenseError']('trialLimit'),'aiLicenseKeyUsageLimit'==_0x21ba35&&_0x5727fd['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['showUI'](_0xcf763c='',_0x378cfb='',_0x5f1623='custom'){const _0x5acd66=this['editor'],_0x48b295=_0x5acd66['editing']['view'],_0x5a2800=_0x5acd66['plugins']['get'](a),_0x2b7202=_0x5acd66['plugins']['get'](_0x550621);_0x5a2800['showFakeVisualSelection']();const _0x5dfa37=new l(),_0xe274e9=new ClipboardEvent('copy',{'clipboardData':_0x5dfa37}),_0x5eb276=new _0x7ddd47(_0x5dfa37),_0x476235=new _0x28efc6(_0x48b295,_0xe274e9,{'dataTransfer':_0x5eb276});_0x2b7202['_forceMarkersCopy']('comment',()=>{_0x48b295['document']['fire']('copy',_0x476235);}),this['_formView']||(this['_initView'](),this['_aiAssistantController']=new j(_0x5acd66,this['_aiAdapter']['textAdapter'],this['_formView']));let _0x45ec0b=_0x5eb276['getData']('text/html');const _0x17e69a=_0x5acd66['model']['document']['selection'],_0x1723bb=Array['from'](_0x17e69a['getRanges']());0x1===_0x1723bb['length']&&_0x1723bb[0x0]['isFlat']&&!_0x17e69a['getSelectedElement']()&&''!==_0x45ec0b['replace'](/ /g,'')['trim']()&&(_0x45ec0b='<p>'+_0x45ec0b+'</p>'),this['_aiAssistantController']['updateView']({'actionId':_0x5f1623,'query':_0xcf763c,'htmlContent':_0x45ec0b,'label':_0x378cfb,'mainActionLabel':_[_0x5acd66['model']['document']['selection']['isCollapsed']?'INSERT':'REPLACE']}),'aiAssistant'!==this['_dialog']['id']?this['_dialog']['show']({'id':'aiAssistant','icon':_0x259ea1,'title':i(this['editor']['locale'],'AI\x20Assistant'),'content':this['_formView'],'position':_0x15ebf7['EDITOR_TOP_SIDE'],'onShow':()=>{this['_formView']['focus']();},'onHide':()=>{this['_aiAssistantController']['reset'](),_0x5a2800['hideFakeVisualSelection']();}}):this['_dialog']['view']['wasMoved']||this['_dialog']['view']['updatePosition']();}['hideUI'](){this['_dialog']['hide']();}['_getResolvedCommandsDefinitions'](){const _0x23e806=new Map(),_0x497508=o(this['editor']['config']['get']('ai.aiAssistant.commands'),this['editor']['locale']);for(const _0x57ac24 of _0x497508)for(const _0x359673 of _0x57ac24['commands'])_0x23e806['set'](_0x359673['id'],{..._0x359673,'groupId':_0x57ac24['groupId'],'groupLabel':_0x57ac24['groupLabel']||_0x57ac24['groupId']});return _0x23e806;}['_createAIAssistantUIButton'](_0x4d2019){const _0x404c32=this['editor'],_0x44586a=_0x404c32['commands']['get']('showAIAssistant'),_0x10ee43=new _0x4d2019(_0x404c32['locale']);return _0x10ee43['set']({'label':i(_0x404c32['locale'],'AI\x20Assistant'),'icon':_0x259ea1,'isToggleable':!0x0}),_0x10ee43['bind']('isEnabled')['to'](_0x44586a),_0x10ee43['bind']('isOn')['to'](this['_dialog'],'id',_0x48e0dd=>'aiAssistant'===_0x48e0dd),this['listenTo'](_0x10ee43,'execute',()=>{_0x10ee43['isOn']?this['hideUI']():_0x44586a['execute']();}),_0x10ee43;}['_initView'](){const _0x3a2fe9=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',()=>{_0x3a2fe9['insertContent'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['listenTo'](this['_formView'],'insertContentBelow',()=>{_0x3a2fe9['insertContentBelow'](this['_aiAssistantController']['currentContext']),this['hideUI']();}),this['_initAriaAiStatusChangeAnnouncements']();}['_initAriaAiStatusChangeAnnouncements'](){const {locale:_0x163257,ui:{ariaLiveAnnouncer:_0x6e20a9}}=this['editor'];this['_formView']['contentArea']['on']('change:isProcessing',(_0x35ad38,_0x2d7a0c,_0xa4f51e)=>{const _0x12fd1a=this['_aiAssistantController']['currentContext'];_0xa4f51e?_0x6e20a9['announce'](i(_0x163257,'AI\x20is\x20writing')):_0x12fd1a&&_0x6e20a9['announce'](i(_0x163257,'Generated\x20content:\x20%0',_0x12fd1a),{'politeness':'polite','isUnsafeHTML':!0x0});}),this['_formView']['on']('change:isError',(_0x11f211,_0x59d97d,_0x57c6d4)=>{if(_0x57c6d4){const _0x2a0965=this['_formView']['errorView']['text'];_0x6e20a9['announce'](i(_0x163257,'Error\x20during\x20AI\x20content\x20generation:\x20%0',_0x2a0965));}});}['_onExecute'](_0x45f31e){const _0xcadb95=this['_commandDefinitions']['get'](_0x45f31e),_0x248741=this['editor'],_0x1be116=_0x248741['model']['document']['selection'],_0x2f5fc2=_0x248741['commands']['get']('showAIAssistant'),_0xada73d=_0x248741['plugins']['get'](a),_0x1151b9=''+(_0xcadb95['groupId']!==K?_0xcadb95['groupLabel']+':\x20':'')+_0xcadb95['label'];if(!0x1!==_0xcadb95['requiresContent']&&_0x1be116['isCollapsed']){const _0x291b77=_0x17c7fd(_0x1be116['getSelectedBlocks']())||_0x248741['model']['schema']['getLimitElement'](_0x1be116);_0x248741['model']['change'](_0x432fab=>{_0x432fab['setSelection'](_0x291b77,'in');});}_0xada73d['showFakeVisualSelection'](),_0x2f5fc2['execute'](_0xcadb95['prompt'],_0x1151b9,'command:'+_0x45f31e);}['_populateMenuBarMenu'](_0x45fe11,_0x6e65a7,_0x3613bf,_0x3d0faa){const _0x5a63e7=this['editor'],_0x51f905=_0x5a63e7['locale'],_0x755fe=new _0x39fa47(_0x51f905),_0x493d39=U(_0x5a63e7,_0x3613bf)['filter'](_0x86b459=>_0x86b459['commands']['length']);0x1===_0x493d39['length']?this['_getMenuBarGroupButtons']({'command':_0x45fe11,'commands':_0x493d39[0x0]['commands'],'parentMenuView':_0x6e65a7,'onExecute':_0x3d0faa})['forEach'](_0x492f76=>_0x755fe['items']['add'](_0x492f76)):_0x493d39['forEach'](({groupId:_0x188958,groupLabel:_0x315379,commands:_0x47b77f})=>{const _0x244795=new _0xb3777(_0x51f905,_0x6e65a7),_0x4440e2=new _0x19e865(_0x51f905),_0x4170f8=new _0x39fa47(_0x51f905),_0x2aadfd=this['_getMenuBarGroupButtons']({'command':_0x45fe11,'commands':_0x47b77f,'parentMenuView':_0x4440e2,'onExecute':_0x3d0faa});_0x4440e2['buttonView']['set']({'label':_0x315379||_0x188958}),_0x4440e2['delegate']('execute')['to'](_0x6e65a7),_0x4170f8['items']['addMany'](_0x2aadfd),_0x4440e2['panelView']['children']['add'](_0x4170f8),_0x244795['children']['add'](_0x4440e2),_0x755fe['items']['add'](_0x244795);}),_0x6e65a7['panelView']['children']['add'](_0x755fe);}['_getMenuBarGroupButtons']({command:_0x3e3e41,commands:_0x541bbc,parentMenuView:_0x528377,onExecute:_0x6f67dc}){const _0x21400a=this['editor'],_0x355aab=_0x21400a['locale'];return U(_0x21400a,_0x541bbc)['map'](_0x388c81=>{const _0x3f718e=new _0xb3777(_0x355aab,_0x528377),_0x579b74=new _0x9f2e22(_0x355aab);return _0x579b74['set']({'label':_0x388c81['label']}),_0x579b74['delegate']('execute')['to'](_0x528377),_0x579b74['on']('execute',()=>_0x6f67dc(_0x388c81['id'])),_0x579b74['bind']('isEnabled')['to'](_0x3e3e41,'enabledCommandsIds',_0x298d41=>_0x298d41['includes'](_0x388c81['id'])),_0x3f718e['children']['add'](_0x579b74),_0x3f718e;});}}function T(_0x106c38,_0x28f78c){return void 0x0!==_0x106c38['order']&&void 0x0===_0x28f78c['order']?0x1:void 0x0===_0x106c38['order']&&void 0x0!==_0x28f78c['order']?-0x1:void 0x0!==_0x106c38['order']&&void 0x0!==_0x28f78c['order']?_0x106c38['order']-_0x28f78c['order']:0x0;}function U(_0xa77ebc,_0x46a2ee){_0x46a2ee['sort'](T);const _0x76e37={},_0x571878=[];for(const _0x575c13 of _0x46a2ee)if(void 0x0!==_0x575c13['order']){if(_0x575c13['order']in _0x76e37)throw new _0x494e74('ai-commands-config-order-collision',_0xa77ebc,{'conflictingDefinitions':[_0x575c13,_0x76e37[_0x575c13['order']]]});_0x76e37[_0x575c13['order']]=_0x575c13,_0x571878['splice'](_0x575c13['order'],0x0,_0x575c13);}else _0x571878['push'](_0x575c13);return _0x571878;}class At extends _0x4afa60{static get['requires'](){return[n,a];}static get['pluginName'](){return'AIAssistant';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4acb12){super(_0x4acb12);const _0x381436=_0x4acb12['config'],_0x4fef84=_0x4acb12['locale'];_0x381436['define']('ai.aiAssistant.preserveComments',!0x0),_0x381436['define']('ai.aiAssistant.commands',_t(_0x4fef84)),_0x381436['define']('ai.aiAssistant.extraCommandGroups',[]),_0x381436['define']('ai.aiAssistant.removeCommands',[]);let _0x5b2329=o(_0x381436['get']('ai.aiAssistant.commands'),_0x4fef84);const _0x1f5ef9=_0x381436['get']('ai.aiAssistant.extraCommandGroups'),_0x12a03b=_0x381436['get']('ai.aiAssistant.removeCommands');_0x1f5ef9['forEach'](_0x3a7777=>{const _0x2e49c9=_0x5b2329['find'](_0x42c428=>_0x42c428['groupId']===_0x3a7777['groupId']);_0x2e49c9?_0x2e49c9['commands']=_0x2e49c9['commands']['concat'](_0x3a7777['commands']):_0x5b2329['push'](_0x3a7777);}),_0x5b2329=_0x5b2329['filter'](_0x4eacb3=>!_0x12a03b['includes'](_0x4eacb3['groupId'])),_0x5b2329['forEach'](_0x552076=>{_0x552076['commands']=_0x552076['commands']['filter'](_0x49eef1=>!_0x12a03b['includes'](_0x49eef1['id']));}),_0x381436['set']('ai.aiAssistant.commands',_0x5b2329);}}function _t(_0x5f4d31){return[{'groupId':'editOrReview','groupLabel':i(_0x5f4d31,'Edit\x20or\x20review'),'commands':[{'id':'improveWriting','label':i(_0x5f4d31,'Improve\x20writing'),'prompt':'Fix\x20spelling\x20mistakes,\x20use\x20proper\x20grammar\x20and\x20apply\x20good\x20writing\x20practices.\x20Do\x20not\x20lose\x20the\x20original\x20meaning.'},{'id':'makeShorter','label':i(_0x5f4d31,'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(_0x5f4d31,'Make\x20longer'),'prompt':'Improve\x20this\x20content\x20by\x20using\x20descriptive\x20language\x20and\x20inserting\x20more\x20information\x20and\x20more\x20detailed\x20explanations.'},{'id':'simplifyLanguage','label':i(_0x5f4d31,'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(_0x5f4d31,'Generate\x20from\x20selection'),'commands':[{'id':'summarize','label':i(_0x5f4d31,'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(_0x5f4d31,'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(_0x5f4d31,'Change\x20tone'),'commands':[{'id':'professional','label':i(_0x5f4d31,'Professional'),'prompt':'Improve\x20using\x20polished,\x20formal,\x20and\x20respectful\x20language\x20to\x20convey\x20professional\x20expertise\x20and\x20competence.'},{'id':'casual','label':i(_0x5f4d31,'Casual'),'prompt':'Improve\x20using\x20casual,\x20informal\x20language\x20to\x20convey\x20a\x20casual\x20conversation\x20with\x20a\x20real\x20person.'},{'id':'direct','label':i(_0x5f4d31,'Direct'),'prompt':'Improve\x20using\x20direct\x20language,\x20using\x20only\x20the\x20essential\x20information.'},{'id':'confident','label':i(_0x5f4d31,'Confident'),'prompt':'Improve\x20using\x20compelling,\x20optimistic\x20language\x20to\x20convey\x20confidence\x20in\x20the\x20writing.'},{'id':'friendly','label':i(_0x5f4d31,'Friendly'),'prompt':'Improve\x20using\x20friendly,\x20comforting\x20language,\x20to\x20convey\x20understanding\x20and\x20empathy.'}]},{'groupId':'changeStyle','groupLabel':i(_0x5f4d31,'Change\x20style'),'commands':[{'id':'business','label':i(_0x5f4d31,'Business'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20business\x20professional\x20with\x20formal\x20language.'},{'id':'legal','label':i(_0x5f4d31,'Legal'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20legal\x20professional\x20using\x20valid\x20legal\x20terminology.'},{'id':'journalism','label':i(_0x5f4d31,'Journalism'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20journalist\x20using\x20engaging\x20language\x20to\x20convey\x20the\x20importance\x20of\x20the\x20information.'},{'id':'poetic','label':i(_0x5f4d31,'Poetic'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20poem\x20using\x20poetic\x20techniques\x20without\x20losing\x20the\x20original\x20meaning.'}]},{'groupId':'translate','groupLabel':i(_0x5f4d31,'Translate'),'commands':[{'id':'translateEnglish','label':i(_0x5f4d31,'English'),'prompt':'Translate\x20the\x20content\x20to\x20English\x20language.'},{'id':'translateSpanish','label':i(_0x5f4d31,'Spanish'),'prompt':'Translate\x20the\x20content\x20to\x20Spanish\x20language.'},{'id':'translatePortuguese','label':i(_0x5f4d31,'Portuguese'),'prompt':'Translate\x20the\x20content\x20to\x20Portuguese\x20language.'},{'id':'translateGerman','label':i(_0x5f4d31,'German'),'prompt':'Translate\x20the\x20content\x20to\x20German\x20language.'},{'id':'translateFrench','label':i(_0x5f4d31,'French'),'prompt':'Translate\x20the\x20content\x20to\x20French\x20language.'},{'id':'translateChinese','label':i(_0x5f4d31,'Simplified\x20Chinese'),'prompt':'Translate\x20the\x20content\x20to\x20Simplified\x20Chinese\x20language.'},{'id':'translateHindi','label':i(_0x5f4d31,'Hindi'),'prompt':'Translate\x20the\x20content\x20to\x20Hindi\x20language.'},{'id':'translateArabic','label':i(_0x5f4d31,'Arabic'),'prompt':'Translate\x20the\x20content\x20to\x20Arabic\x20language.'}]}];}class S extends _0x4afa60{['abortController'];static get['requires'](){return[x];}constructor(_0x2d21cb){super(_0x2d21cb),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'](_0x2b920f){return this['sendRequest'](_0x2b920f)['catch'](_0x34eaa9=>{if(_0x34eaa9 instanceof R)return Promise['reject'](_0x34eaa9);if('AbortError'==_0x34eaa9['name'])return Promise['resolve']();throw console['error'](_0x34eaa9),new _0x494e74('aitextadapter-send-request-failed',null);});}async['_prepareRequestHeaders'](_0x96847c,_0x189816){const _0x1be138=this['editor']['locale'],_0x2e62a3={'Content-Type':'application/json'};if('object'==typeof _0x96847c)Object['assign'](_0x2e62a3,_0x96847c);else{if(_0x96847c)try{const _0x28826d=await _0x96847c(_0x189816);Object['assign'](_0x2e62a3,_0x28826d);}catch{return Promise['reject'](new R(i(_0x1be138,'AI_ERROR_GET_HEADERS')));}}return _0x2e62a3;}async['_prepareRequestParameters'](_0x49d0a9,_0x53d58e){const _0x500af3=this['editor']['locale'];if('object'==typeof _0x49d0a9)return _0x49d0a9;try{return await _0x49d0a9(_0x53d58e);}catch{return Promise['reject'](new R(i(_0x500af3,'AI_ERROR_GET_PARAMETERS')));}}}class It extends S{['_apiUrl'];['_requestHeaders'];['_requestParameters'];static get['pluginName'](){return'OpenAITextAdapter';}constructor(_0x4b9dc5){super(_0x4b9dc5),_0x4b9dc5['config']['define']('ai.openAI.apiUrl','https://api.openai.com/v1/chat/completions'),_0x4b9dc5['config']['get']('ai.openAI.requestParameters')||_0x4b9dc5['config']['define']('ai.openAI.requestParameters',{'model':'gpt-4o','temperature':0x1,'top_p':0x1,'stream':!0x0}),this['_apiUrl']=_0x4b9dc5['config']['get']('ai.openAI.apiUrl'),this['_requestHeaders']=_0x4b9dc5['config']['get']('ai.openAI.requestHeaders')||{},this['_requestParameters']=_0x4b9dc5['config']['get']('ai.openAI.requestParameters');}async['sendRequest']({query:_0x5207da,context:_0x5dc8a0,onData:_0x3fccdf,actionId:_0x539d44}){const _0x5a40a3=this['editor']['locale'],_0x400a61=await this['prepareMessages'](_0x5207da,_0x5dc8a0,_0x539d44),_0x1d437a=await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x539d44),_0xcdb289=await this['_prepareRequestParameters'](this['_requestParameters'],_0x539d44),_0x2a837e={'messages':_0x400a61,..._0xcdb289},_0x135415={'method':'POST','headers':_0x1d437a,'body':JSON['stringify'](_0x2a837e),'signal':this['abortController']['signal']},_0x35efac=await fetch(this['_apiUrl'],_0x135415);if(_0x35efac['ok'])return _0xcdb289['stream']?await this['_readStreamableResponse'](_0x35efac,_0x3fccdf):await this['_readStaticResponse'](_0x35efac,_0x3fccdf),Promise['resolve']();{const _0x57cebc=await _0x35efac['text']();return _0x57cebc['includes']('context_length_exceeded')?Promise['reject'](new R(i(_0x5a40a3,'AI_ERROR_CONTEXT_LENGTH'))):_0x57cebc['includes']('Moderation')?Promise['reject'](new R(i(_0x5a40a3,'AI_ERROR_MODERATION'))):Promise['reject'](new Error(_0x57cebc));}}async['prepareMessages'](_0x500448,_0x5cbcb3,_0x1f4f29){let _0x129a16,_0x21f645;return _0x5cbcb3?(_0x129a16='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.',_0x21f645='Instruction:\x0a'+_0x500448+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x5cbcb3):(_0x129a16='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.',_0x21f645=_0x500448),[{'role':'system','content':_0x129a16},{'role':'user','content':_0x21f645}];}async['_readStreamableResponse'](_0x215139,_0x20eb54){const _0x4f7e91=_0x215139['body']['getReader'](),_0x34b44a=new TextDecoder();let _0x36e36d='',_0x1454e4='',_0x56e72e='',_0x5f1807=!0x1;for(;!_0x5f1807;){const {done:_0x33f8bf,value:_0x46a541}=await _0x4f7e91['read'](),_0x4c4321=_0x36e36d+_0x34b44a['decode'](_0x46a541);let _0xd11063='';_0x5f1807=_0x33f8bf;try{_0xd11063=this['_cleanUpData'](_0x4c4321),_0x36e36d='';}catch{_0x36e36d=_0x4c4321;continue;}_0x1454e4+=_0xd11063,!_0x5f1807&&this['_isBufferIncomplete'](_0x1454e4)||_0x1454e4&&(_0x56e72e+=_0x1454e4,_0x1454e4='',_0x20eb54(_0x56e72e));}return Promise['resolve']();}async['_readStaticResponse'](_0x32096c,_0x7518ab){return _0x7518ab((await _0x32096c['json']())['choices'][0x0]['message']['content']),Promise['resolve']();}['_isBufferIncomplete'](_0x6401fb){const _0x4dbff7=_0x6401fb['split']('<')['length']!==_0x6401fb['split']('>')['length'],_0x3fbb7f=_0x6401fb['length']<0x1e;return _0x4dbff7&&_0x3fbb7f;}['_cleanUpData'](_0x5a2bd1){return _0x5a2bd1['split'](/\n(?![^{]*\})/g)['map'](_0x4b10ea=>_0x4b10ea['replace']('data:\x20',''))['filter'](_0x57629a=>_0x57629a&&_0x57629a['length']>0x0&&'[DONE]'!==_0x57629a)['map'](_0x254dff=>{const {choices:_0x3a994b}=JSON['parse'](_0x254dff);if(_0x3a994b[0x0]?.['delta']?.['content'])return _0x3a994b[0x0]['delta']['content'];})['filter'](_0x442a4f=>_0x442a4f)['join']('');}}class Et extends S{['_apiUrl'];['_requestHeaders'];['_bedrockClientConfig'];['_requestParameters'];static get['pluginName'](){return'AWSTextAdapter';}constructor(_0x1fdc17){super(_0x1fdc17),_0x1fdc17['config']['get']('ai.aws.requestParameters')||_0x1fdc17['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']=_0x1fdc17['config']['get']('ai.aws.apiUrl'),this['_bedrockClientConfig']=_0x1fdc17['config']['get']('ai.aws.bedrockClientConfig'),this['_requestHeaders']=_0x1fdc17['config']['get']('ai.aws.requestHeaders'),this['_requestParameters']=_0x1fdc17['config']['get']('ai.aws.requestParameters');}async['sendRequest']({query:_0x3199c6,context:_0x280422,onData:_0xff09bb,actionId:_0x2e1bdb}){const {model:_0x430666,stream:_0x57cc07,..._0x5d2d8d}=await this['_prepareRequestParameters'](this['_requestParameters'],_0x2e1bdb),_0x13eb80={'prompt':await this['preparePrompt'](_0x3199c6,_0x280422,_0x430666,_0x2e1bdb),..._0x5d2d8d};this['_apiUrl']?await this['_processProxyRequest'](_0x13eb80,_0x430666,_0x57cc07,_0xff09bb,_0x2e1bdb):await this['_processAWSRequest'](_0x13eb80,_0x430666,_0x57cc07,_0xff09bb);}async['preparePrompt'](_0x5d6972,_0x1f1a48,_0x49acc1,_0x54bec4){let _0x4103bc,_0x5931b6;return _0x1f1a48?(_0x4103bc='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.',_0x5931b6='Instruction:\x0a'+_0x5d6972+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+_0x1f1a48):(_0x4103bc='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.',_0x5931b6=_0x5d6972),'meta.llama'==this['getModelFamily'](_0x49acc1)?'<<SYS>>\x0a'+_0x4103bc+'\x0a<</SYS>>\x0a[INST]\x0a'+_0x5931b6+'\x0a[/INST]':'Human:\x0a'+_0x4103bc+'\x0a'+_0x5931b6+'\x0a\x0aAssistant:';}['getModelFamily'](_0x1ee8cf){if(/^anthropic\.claude/['test'](_0x1ee8cf))return'anthropic.claude';if(/^ai21\.j2/['test'](_0x1ee8cf))return'ai21.j2';if(/^cohere\.command/['test'](_0x1ee8cf))return'cohere.command';if(/^meta\.llama/['test'](_0x1ee8cf))return'meta.llama';throw new R(i(this['editor']['locale'],'AI_ERROR_UNSUPPORTED_MODEL',_0x1ee8cf));}async['_processProxyRequest'](_0x43e105,_0x46c7a2,_0x306d33,_0x1a0972,_0x56772b){const _0xe5f8e9={'method':'POST','headers':await this['_prepareRequestHeaders'](this['_requestHeaders'],_0x56772b),'body':JSON['stringify']({..._0x43e105,'model':_0x46c7a2,'stream':_0x306d33}),'signal':this['abortController']['signal']},_0x15daef=await fetch(this['_apiUrl'],_0xe5f8e9);_0x306d33?await this['_readStreamableResponse'](_0x15daef,_0x46c7a2,_0x1a0972):await this['_readStaticResponse'](_0x15daef,_0x46c7a2,_0x1a0972);}async['_processAWSRequest'](_0x18229b,_0x1fb81b,_0x422a03,_0x5f205d){const _0x4de208=new _0x5ebf4f(this['_bedrockClientConfig']),_0x317dba={'body':JSON['stringify'](_0x18229b),'contentType':'application/json','accept':'application/json','modelId':_0x1fb81b};let _0xd16122;if(_0x422a03){const _0x3ee8bf=new _0x2f41a6(_0x317dba);_0xd16122=await _0x4de208['send'](_0x3ee8bf,{'abortSignal':this['abortController']['signal']}),await this['_readAsyncIterableResponse'](_0xd16122,_0x1fb81b,_0x5f205d);}else{const _0x55516c=new _0x2c1b39(_0x317dba);_0xd16122=await _0x4de208['send'](_0x55516c,{'abortSignal':this['abortController']['signal']}),await this['_readStaticResponse'](_0xd16122,_0x1fb81b,_0x5f205d);}}async['_readAsyncIterableResponse'](_0x556a12,_0xf83559,_0x2044a8){const _0x3af85e=_0x556a12['body'],_0x45f6c1=new TextDecoder('utf-8');let _0x247f3b='';for await(const _0x2aa5a7 of _0x3af85e)if(_0x2aa5a7['chunk']){const _0x2cc89b=_0x45f6c1['decode'](_0x2aa5a7['chunk']['bytes']),_0x448380=JSON['parse'](_0x2cc89b);_0x247f3b+=this['_getGeneratedText'](_0x448380,_0xf83559),_0x2044a8(_0x247f3b);}return Promise['resolve']();}async['_readStreamableResponse'](_0x33f071,_0xb5292e,_0x2428e1){const _0x13804b=_0x33f071['body'],_0x5783db=new TextDecoder('utf-8'),_0x53150e=_0x13804b['getReader']();let _0x99004a='',_0x4f8bd1='',_0xe7a14f=!0x1;for(;!_0xe7a14f;){const {done:_0x319641,value:_0x5cf5af}=await _0x53150e['read']();if(_0xe7a14f=_0x319641,_0xe7a14f)break;const _0x2ecae7=(_0x99004a+_0x5783db['decode'](_0x5cf5af))['split']('\x0a')['map'](_0x18274f=>{try{return _0x99004a='',JSON['parse'](_0x18274f);}catch{return _0x99004a=_0x18274f,null;}})['filter'](_0x2b56d2=>null!==_0x2b56d2);_0x2ecae7['length']&&(_0x4f8bd1+=_0x2ecae7['map'](_0x382fee=>this['_getGeneratedText'](_0x382fee,_0xb5292e))['join'](''),_0x2428e1(_0x4f8bd1));}return Promise['resolve']();}async['_readStaticResponse'](_0x570237,_0x4e3347,_0x4cbd8c){let _0x22d335;return _0x22d335=_0x570237 instanceof Response?await _0x570237['json']():JSON['parse'](new TextDecoder('utf-8')['decode'](_0x570237['body'])),(_0x4cbd8c(this['_getGeneratedText'](_0x22d335,_0x4e3347)),Promise['resolve']());}['_getGeneratedText'](_0x1d8883,_0x3fc1d3){switch(this['getModelFamily'](_0x3fc1d3)){case'anthropic.claude':return _0x1d8883['completion'];case'ai21.j2':return _0x1d8883['completions'][0x0]['data']['text'];case'cohere.command':return _0x1d8883['generations'][0x0]['text'];case'meta.llama':return _0x1d8883['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':_0x351c29=>0x1!=_0x351c29}};
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
(
|
|
23
|
+
(_0x2836ef=>{const {af:{dictionary:_0xf89961,getPluralForm:_0x25e945}}={'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':_0x9ce981=>0x1!=_0x9ce981}};_0x2836ef['af']||={'dictionary':{},'getPluralForm':null},_0x2836ef['af']['dictionary']=Object['assign'](_0x2836ef['af']['dictionary'],_0xf89961),_0x2836ef['af']['getPluralForm']=_0x25e945;})(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':_0x1de753=>0x0==_0x1de753?0x0:0x1==_0x1de753?0x1:0x2==_0x1de753?0x2:_0x1de753%0x64>=0x3&&_0x1de753%0x64<=0xa?0x3:_0x1de753%0x64>=0xb?0x4:0x5}};
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
(
|
|
23
|
+
(_0x3c8ec4=>{const {ar:{dictionary:_0x24cf97,getPluralForm:_0x2cca21}}={'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':_0x3699e4=>0x0==_0x3699e4?0x0:0x1==_0x3699e4?0x1:0x2==_0x3699e4?0x2:_0x3699e4%0x64>=0x3&&_0x3699e4%0x64<=0xa?0x3:_0x3699e4%0x64>=0xb?0x4:0x5}};_0x3c8ec4['ar']||={'dictionary':{},'getPluralForm':null},_0x3c8ec4['ar']['dictionary']=Object['assign'](_0x3c8ec4['ar']['dictionary'],_0x24cf97),_0x3c8ec4['ar']['getPluralForm']=_0x2cca21;})(window['CKEDITOR_TRANSLATIONS']||={});
|