UNPKG

@ckeditor/ckeditor5-ai

Version:

AI features for CKEditor 5.

23 lines 4.34 kB
/* * 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. | * | | * | | * +---------------------------------------------------------------------------------+ * * * * */ function _0x2796(){const _0x5ae199=['62996lGYRCa','buttonView','AIEditing','207PZuQdI','document','model','showFakeVisualSelection','ck-ai-quick-actions-dropdown','locale','ai-quick-actions-dropdown-selection','selection','get','getRanges','2702100AHOqDw','length','11ZgIBBf','15574DYpmfz','children','change:isOpen','resetSearch','label','24KXvZMd','103624chhPzH','5ziAcYT','has','icon','from','panelView','24frbSys','819sAhtZr','hideFakeVisualSelection','plugins','set','7825494VbPklT','3660678QRGrwD','add','15209974HAXWpS'];_0x2796=function(){return _0x5ae199;};return _0x2796();}function _0x2335(_0x3262dc,_0x1a3efd){const _0x2796c6=_0x2796();return _0x2335=function(_0x233511,_0x39779){_0x233511=_0x233511-0x185;let _0x5af889=_0x2796c6[_0x233511];return _0x5af889;},_0x2335(_0x3262dc,_0x1a3efd);}(function(_0x3ed522,_0x34ddaf){const _0x59ad1e=_0x2335,_0x35048e=_0x3ed522();while(!![]){try{const _0x31306b=parseInt(_0x59ad1e(0x1a8))/0x1*(-parseInt(_0x59ad1e(0x18f))/0x2)+parseInt(_0x59ad1e(0x19b))/0x3*(parseInt(_0x59ad1e(0x198))/0x4)+parseInt(_0x59ad1e(0x18a))/0x5*(parseInt(_0x59ad1e(0x194))/0x6)+-parseInt(_0x59ad1e(0x195))/0x7+-parseInt(_0x59ad1e(0x189))/0x8*(-parseInt(_0x59ad1e(0x190))/0x9)+-parseInt(_0x59ad1e(0x1a5))/0xa*(-parseInt(_0x59ad1e(0x1a7))/0xb)+parseInt(_0x59ad1e(0x188))/0xc*(-parseInt(_0x59ad1e(0x197))/0xd);if(_0x31306b===_0x34ddaf)break;else _0x35048e['push'](_0x35048e['shift']());}catch(_0x3e6ef8){_0x35048e['push'](_0x35048e['shift']());}}}(_0x2796,0xc0e09));import{createDropdown as _0x5c36b0}from'ckeditor5/src/ui.js';import{IconAIQuickActions as _0x1af779}from'@ckeditor/ckeditor5-icons';import{AIQuickActionsDropdownContentView as _0x220f19}from'./aiquickactionsdropdowncontentview.js';import{AIEditing as _0x1a0bd2}from'../../aicore/aiediting.js';export function aiQuickActionsDropdownCreator(_0x2e4d99){const {editor:_0x38d88f,content:_0x530aaa,buttonDefinition:_0xc43490,bodyCollection:_0x18e3ae,hasSearch:_0x364a47=!0x1}=_0x2e4d99;return()=>{const _0x4e63ce=_0x2335,_0x3ab768=_0x38d88f[_0x4e63ce(0x1a0)],_0x58c64a=_0x5c36b0(_0x3ab768);_0x58c64a[_0x4e63ce(0x199)][_0x4e63ce(0x193)]({'icon':_0xc43490[_0x4e63ce(0x18c)]??_0x1af779,'label':_0xc43490[_0x4e63ce(0x187)],'tooltip':!0x0}),_0x58c64a[_0x4e63ce(0x193)]({'class':_0x4e63ce(0x19f)});const _0x58a647=new _0x220f19(_0x38d88f,_0x530aaa,_0x58c64a,_0x18e3ae,_0x364a47);if(_0x58c64a[_0x4e63ce(0x18e)][_0x4e63ce(0x1a9)][_0x4e63ce(0x196)](_0x58a647),_0x364a47){const _0x141586=_0x4e63ce(0x1a1);_0x58c64a['on'](_0x4e63ce(0x185),(_0x4575a3,_0xec635a,_0x183ba0)=>{const _0x1af1e0=_0x4e63ce;if(_0x183ba0){if(_0x38d88f[_0x1af1e0(0x192)][_0x1af1e0(0x18b)](_0x1af1e0(0x19a))){const _0x32b9c7=_0x38d88f[_0x1af1e0(0x192)][_0x1af1e0(0x1a3)](_0x1a0bd2),_0x2ffcbf=_0x38d88f[_0x1af1e0(0x19d)][_0x1af1e0(0x19c)][_0x1af1e0(0x1a2)],_0xdc27db=Array[_0x1af1e0(0x18d)](_0x2ffcbf[_0x1af1e0(0x1a4)]());_0xdc27db[_0x1af1e0(0x1a6)]>0x0&&_0x32b9c7[_0x1af1e0(0x19e)](_0xdc27db,_0x141586,!0x1,!0x0);}}else _0x38d88f[_0x1af1e0(0x192)][_0x1af1e0(0x18b)](_0x1af1e0(0x19a))&&_0x38d88f[_0x1af1e0(0x192)][_0x1af1e0(0x1a3)](_0x1a0bd2)[_0x1af1e0(0x191)](_0x141586),_0x58a647[_0x1af1e0(0x186)]();});}return _0x58c64a;};}