@ckeditor/ckeditor5-ai
Version:
AI features for CKEditor 5.
23 lines • 4.19 kB
JavaScript
/*
* Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
*
*
*
*
* +---------------------------------------------------------------------------------+
* | |
* | Hello stranger! |
* | |
* | |
* | What you're currently looking at is the source code of a legally protected, |
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
* | are forbidden and will result in legal consequences. |
* | |
* | |
* +---------------------------------------------------------------------------------+
*
*
*
*
*/
const _0x39ccd2=_0x248a;function _0xee5a(){const _0x21f23c=['connector','84380QKpZXj','2111160XHbXpH','21foQONA','model','Current\x20document','83032pzRkAy','editor','1251CRHfeX','TEXT','hasError','4832135NRglst','1348460FqUPlZ','current-document','actionName','args','5772438FvvfNU','html','getDocumentContext','executeCustomAction','content','sendRequest','push','replies','executeAction','126772TDNOyl','replyCreated','userMessage','version','delegate','createReply','fire'];_0xee5a=function(){return _0x21f23c;};return _0xee5a();}(function(_0x4acd85,_0x1344b1){const _0x5e77b4=_0x248a,_0x3f54bf=_0x4acd85();while(!![]){try{const _0x26338d=-parseInt(_0x5e77b4(0xd2))/0x1+parseInt(_0x5e77b4(0xba))/0x2*(parseInt(_0x5e77b4(0xbc))/0x3)+parseInt(_0x5e77b4(0xbb))/0x4+-parseInt(_0x5e77b4(0xc5))/0x5+parseInt(_0x5e77b4(0xc9))/0x6+parseInt(_0x5e77b4(0xc4))/0x7+parseInt(_0x5e77b4(0xbf))/0x8*(-parseInt(_0x5e77b4(0xc1))/0x9);if(_0x26338d===_0x1344b1)break;else _0x3f54bf['push'](_0x3f54bf['shift']());}catch(_0x2e05a5){_0x3f54bf['push'](_0x3f54bf['shift']());}}}(_0xee5a,0x9b5c1));import{AIInteraction as _0x326939,AI_MODEL_EVENT_NAMES as _0x40dc8c}from'../../aicore/model/aiinteraction.js';import{AIContextItemType as _0x4ac8df}from'../../aicore/model/aicontext.js';import{AIActionsReply as _0x5da522}from'./aiactionsreply.js';function _0x248a(_0x15618f,_0x209dab){const _0xee5aba=_0xee5a();return _0x248a=function(_0x248a29,_0x40ac6a){_0x248a29=_0x248a29-0xb7;let _0x188a43=_0xee5aba[_0x248a29];return _0x188a43;},_0x248a(_0x15618f,_0x209dab);}export class AIActionsInteraction extends _0x326939{[_0x39ccd2(0xcd)];[_0x39ccd2(0xd5)];[_0x39ccd2(0xc7)];[_0x39ccd2(0xc8)];[_0x39ccd2(0xd4)];[_0x39ccd2(0xbd)];[_0x39ccd2(0xc3)]=!0x1;constructor(_0x37e629){const _0x172043=_0x39ccd2;super(_0x37e629),this[_0x172043(0xcd)]=_0x37e629[_0x172043(0xcd)],this[_0x172043(0xd5)]=_0x37e629[_0x172043(0xd5)],this[_0x172043(0xc7)]=_0x37e629[_0x172043(0xc7)],this[_0x172043(0xc8)]=_0x37e629[_0x172043(0xc8)],this[_0x172043(0xd4)]=_0x37e629[_0x172043(0xd4)],this[_0x172043(0xbd)]=_0x37e629[_0x172043(0xbd)];}async[_0x39ccd2(0xce)](){const _0x4d4fe5=_0x39ccd2;return this[_0x4d4fe5(0xc7)]?this[_0x4d4fe5(0xb9)][_0x4d4fe5(0xd1)]({'content':this[_0x4d4fe5(0xcd)],'actionName':this[_0x4d4fe5(0xc7)],'args':this[_0x4d4fe5(0xc8)]}):this[_0x4d4fe5(0xb9)][_0x4d4fe5(0xcc)]({'content':this[_0x4d4fe5(0xcd)],'message':this[_0x4d4fe5(0xd4)],'model':this[_0x4d4fe5(0xbd)],'outputFormat':_0x4d4fe5(0xca)});}[_0x39ccd2(0xcb)](){const _0x20b789=_0x39ccd2;return{'type':_0x4ac8df[_0x20b789(0xc2)],'content':this[_0x20b789(0xcd)],'version':this[_0x20b789(0xd5)],'label':_0x20b789(0xbe),'uiId':_0x20b789(0xc6)};}[_0x39ccd2(0xb7)](_0x5c0808){const _0x2c2b23=_0x39ccd2,_0x1a0198=new _0x5da522({'editor':this[_0x2c2b23(0xc0)],'documentContextContent':this[_0x2c2b23(0xcd)],..._0x5c0808});return this[_0x2c2b23(0xd0)][_0x2c2b23(0xcf)](_0x1a0198),_0x1a0198[_0x2c2b23(0xd6)](..._0x40dc8c)['to'](this),this[_0x2c2b23(0xb8)](_0x2c2b23(0xd3),_0x1a0198),_0x1a0198;}}