@ckeditor/ckeditor5-ai
Version:
AI Assistant feature for CKEditor 5.
23 lines • 4.74 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 _0x23a766=_0x1020;function _0x1020(_0x22cf58,_0x4485c8){const _0x4703e5=_0x4703();return _0x1020=function(_0x102086,_0x29df04){_0x102086=_0x102086-0x9b;let _0x55b11e=_0x4703e5[_0x102086];return _0x55b11e;},_0x1020(_0x22cf58,_0x4485c8);}(function(_0x2315d4,_0x1be7c5){const _0x344378=_0x1020,_0x56c173=_0x2315d4();while(!![]){try{const _0x2e2b11=parseInt(_0x344378(0xb5))/0x1*(-parseInt(_0x344378(0xac))/0x2)+-parseInt(_0x344378(0xa8))/0x3*(-parseInt(_0x344378(0xbb))/0x4)+parseInt(_0x344378(0xc4))/0x5+parseInt(_0x344378(0xab))/0x6+parseInt(_0x344378(0xb6))/0x7*(-parseInt(_0x344378(0xbc))/0x8)+parseInt(_0x344378(0xa9))/0x9+-parseInt(_0x344378(0xbd))/0xa*(-parseInt(_0x344378(0xa6))/0xb);if(_0x2e2b11===_0x1be7c5)break;else _0x56c173['push'](_0x56c173['shift']());}catch(_0x1569af){_0x56c173['push'](_0x56c173['shift']());}}}(_0x4703,0x424e6));import{Command as _0x2a17de}from'ckeditor5/src/core.js';import{AIAssistantUI as _0x46e3f7}from'../aiassistantui.js';export class ShowAIAssistantCommand extends _0x2a17de{[_0x23a766(0xb4)];constructor(_0x27ec92,_0x124517){const _0x1d3847=_0x23a766;super(_0x27ec92),this[_0x1d3847(0xb4)]=_0x124517,this[_0x1d3847(0xb7)](_0x1d3847(0xc7),[]),this['on'](_0x1d3847(0xba),(_0x2145c4,_0x4f2b78,_0x856b9d)=>{const _0xbc617f=_0x1d3847;this[_0xbc617f(0xc1)]&&(this[_0xbc617f(0xc7)]=F(this[_0xbc617f(0xb4)],_0x856b9d));}),this[_0x1d3847(0xb7)](_0x1d3847(0x9e),!0x1),this['on'](_0x1d3847(0xc2),(_0x2642f4,_0x2351fc,_0x230a4b)=>{const _0x4d63c9=_0x1d3847;this[_0x4d63c9(0xc7)]=_0x230a4b?F(this[_0x4d63c9(0xb4)],this[_0x4d63c9(0x9e)]):[];});}[_0x23a766(0xa4)](){const _0x5cc6c1=_0x23a766,_0x597a65=this[_0x5cc6c1(0xa5)][_0x5cc6c1(0xa2)];this[_0x5cc6c1(0x9e)]=function(_0x383f2b){const _0x47822f=_0x5cc6c1,_0x43bfe=_0x383f2b[_0x47822f(0xc3)][_0x47822f(0xc6)];return _0x43bfe[_0x47822f(0x9b)]?0x0!==[..._0x43bfe[_0x47822f(0xb3)]()][_0x47822f(0xa0)]&&![..._0x43bfe[_0x47822f(0xb3)]()][0x0][_0x47822f(0xb2)]:!!_0x383f2b[_0x47822f(0xaa)](_0x43bfe[_0x47822f(0xc0)]());}(_0x597a65);const _0x4e475d=_0x597a65[_0x5cc6c1(0xc3)][_0x5cc6c1(0xc6)],_0x40292e=this[_0x5cc6c1(0xa5)][_0x5cc6c1(0x9f)][_0x5cc6c1(0xb0)](_0x5cc6c1(0xa1));for(const _0x1346fd of _0x4e475d[_0x5cc6c1(0xa7)]())for(const _0x5cc1de of _0x1346fd[_0x5cc6c1(0xa3)]())if(_0x5cc1de['is'](_0x5cc6c1(0xbf))&&_0x40292e[_0x5cc6c1(0xae)](_0x5cc1de[_0x5cc6c1(0xaf)]))return void(this[_0x5cc6c1(0xc1)]=!0x1);this[_0x5cc6c1(0xc1)]=!0x0;}[_0x23a766(0xbe)](_0x20a8ca='',_0x2edd7c='',_0x56f542=_0x23a766(0x9c)){const _0x3de6b8=_0x23a766;this[_0x3de6b8(0xa5)][_0x3de6b8(0xad)][_0x3de6b8(0xb0)](_0x46e3f7)[_0x3de6b8(0x9d)](_0x20a8ca,_0x2edd7c,_0x56f542);}}function F(_0x50c20d,_0x2e0610){const _0x555797=_0x23a766,_0x386946=new Set();for(const _0x19835f of _0x50c20d[_0x555797(0xc5)]())(_0x2e0610||!0x1===_0x19835f[_0x555797(0xb1)])&&_0x386946[_0x555797(0xb9)](_0x19835f['id']);return Array[_0x555797(0xb8)](_0x386946);}function _0x4703(){const _0x2b27a9=['isEnabled','change:isEnabled','document','732470NyTSbj','values','selection','enabledCommandsIds','isCollapsed','custom','showUI','_hasContext','config','length','ai.aiAssistant.disabledElements','model','getItems','refresh','editor','22qZCaDA','getRanges','722595XhcxOp','2183211MSSPBG','hasContent','2246514DIWdrW','5774WXxzVi','plugins','includes','name','get','requiresContent','isEmpty','getSelectedBlocks','_commandDefinitions','163AGQBXX','14umMkPZ','set','from','add','change:_hasContext','4ANfMcg','1226672jYbbMp','222410cuBVpY','execute','element','getFirstRange'];_0x4703=function(){return _0x2b27a9;};return _0x4703();}