@ckeditor/ckeditor5-ai
Version:
AI Assistant feature for CKEditor 5.
23 lines • 6.5 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 _0x4c589c=_0x2d7c;(function(_0x64974,_0x419cd9){const _0x599d2f=_0x2d7c,_0xe4a9d8=_0x64974();while(!![]){try{const _0x2379b4=parseInt(_0x599d2f(0x16d))/0x1+parseInt(_0x599d2f(0x14d))/0x2+-parseInt(_0x599d2f(0x157))/0x3*(parseInt(_0x599d2f(0x177))/0x4)+-parseInt(_0x599d2f(0x144))/0x5+parseInt(_0x599d2f(0x15b))/0x6*(-parseInt(_0x599d2f(0x149))/0x7)+parseInt(_0x599d2f(0x14b))/0x8*(parseInt(_0x599d2f(0x153))/0x9)+parseInt(_0x599d2f(0x154))/0xa*(-parseInt(_0x599d2f(0x15d))/0xb);if(_0x2379b4===_0x419cd9)break;else _0xe4a9d8['push'](_0xe4a9d8['shift']());}catch(_0x2feb62){_0xe4a9d8['push'](_0xe4a9d8['shift']());}}}(_0x184e,0xbc226));import{Rect as _0x5b9ed2,global as _0x2c6ca6,isVisible as _0x8a69da}from'ckeditor5/src/utils.js';function _0x2d7c(_0x1ea46a,_0x2f6e2c){const _0x184ea7=_0x184e();return _0x2d7c=function(_0x2d7cae,_0x12c4b9){_0x2d7cae=_0x2d7cae-0x13f;let _0x19a804=_0x184ea7[_0x2d7cae];return _0x19a804;},_0x2d7c(_0x1ea46a,_0x2f6e2c);}import{IconHistory as _0x43741a,IconSubmit as _0x5a1bd2}from'ckeditor5/src/icons.js';import{AutocompleteView as _0x4d5618,ButtonView as _0x49c9a3}from'ckeditor5/src/ui.js';function _0x184e(){const _0x5956d0=['submitButtonView','2495025vmpVZf','minRows','queryView','submit','isEnabled','815773TSPcFf','resultsView','11028736TjiZxg','render','520752UwybPP','set','bind','ck-ai-form__submit','uiLanguageDirection','update','9uzKPzP','3542050uhYnIS','enter','_createShowHistoryButton','2523yqcQil','value','fieldWrapperChildren','_createSubmitButton','18HzGtiC','isEmpty','22EezZMt','width','filteredView','ck-ai-form__toggle-history','focusLast','focus','fire','left','excludeScrollbarsAndBorders','isOn','focusableChildren','locale','fieldView','showHistoryButtonView','add','target','1297546LgrlvT','keystrokes','children','isVisible','execute','style','window','History','focusCycler','element','2896GuDKqE','requestAnimationFrame','right','rtl','Submit','focusFirst','maxRows'];_0x184e=function(){return _0x5956d0;};return _0x184e();}import{getTranslation as _0x295413}from'../../utils/common-translations.js';export default class ct extends _0x4d5618{[_0x4c589c(0x143)];[_0x4c589c(0x16a)];constructor(_0x184c6d,_0x480ab3){const _0xb494e2=_0x4c589c;super(_0x184c6d,_0x480ab3),this[_0xb494e2(0x146)][_0xb494e2(0x169)][_0xb494e2(0x145)]=0x1,this[_0xb494e2(0x146)][_0xb494e2(0x169)][_0xb494e2(0x142)]=0x3,this[_0xb494e2(0x143)]=this[_0xb494e2(0x15a)](),this[_0xb494e2(0x16a)]=this[_0xb494e2(0x156)](),this[_0xb494e2(0x167)][_0xb494e2(0x16b)](this[_0xb494e2(0x16a)],0x1),this[_0xb494e2(0x167)][_0xb494e2(0x16b)](this[_0xb494e2(0x143)]);}[_0x4c589c(0x14c)](){const _0x39953c=_0x4c589c;super[_0x39953c(0x14c)](),this[_0x39953c(0x146)][_0x39953c(0x159)][_0x39953c(0x16b)](this[_0x39953c(0x16a)]),this[_0x39953c(0x16f)][_0x39953c(0x16b)](this[_0x39953c(0x143)]),this[_0x39953c(0x16e)][_0x39953c(0x14e)](_0x39953c(0x155),(_0x34bfb6,_0x19d775)=>{const _0x39f573=_0x39953c;_0x34bfb6[_0x39f573(0x16c)]==this[_0x39f573(0x146)][_0x39f573(0x169)][_0x39f573(0x176)]&&(this[_0x39f573(0x147)](),_0x19d775());});}[_0x4c589c(0x15a)](){const _0x417696=_0x4c589c,_0x4c3f72=new _0x49c9a3(this[_0x417696(0x168)]),_0x28fa35=this[_0x417696(0x168)];return _0x4c3f72[_0x417696(0x14e)]({'icon':_0x5a1bd2,'label':_0x295413(_0x28fa35,_0x417696(0x140)),'isVisible':!0x0,'tooltip':!0x0,'class':_0x417696(0x150)}),_0x4c3f72['on'](_0x417696(0x171),()=>{const _0x1f4b97=_0x417696;this[_0x1f4b97(0x147)]();}),_0x4c3f72[_0x417696(0x14f)](_0x417696(0x148))['to'](this[_0x417696(0x146)][_0x417696(0x169)],_0x417696(0x15c),this,_0x417696(0x148),(_0x7a2d2d,_0x5e74b5)=>!_0x7a2d2d&&_0x5e74b5),_0x4c3f72;}[_0x4c589c(0x156)](){const _0xc3779f=_0x4c589c,_0x2730f7=new _0x49c9a3(this[_0xc3779f(0x168)]),_0x1a337a=this[_0xc3779f(0x14a)],_0x19df53=this[_0xc3779f(0x168)];_0x2730f7[_0xc3779f(0x14e)]({'label':_0x295413(_0x19df53,_0xc3779f(0x174)),'withText':!0x1,'icon':_0x43741a,'tooltip':!0x0,'tooltipPosition':'sw','class':_0xc3779f(0x160)}),_0x2730f7[_0xc3779f(0x14f)](_0xc3779f(0x166))['to'](_0x1a337a,_0xc3779f(0x170)),_0x2730f7[_0xc3779f(0x14f)](_0xc3779f(0x148))['to'](this,_0xc3779f(0x148)),_0x2730f7['on'](_0xc3779f(0x171),()=>{const _0x452049=_0xc3779f;_0x1a337a[_0x452049(0x170)]=!_0x1a337a[_0x452049(0x170)],_0x1a337a[_0x452049(0x170)]?this[_0x452049(0x15f)][_0x452049(0x162)]():this[_0x452049(0x162)]();});const _0x1f6a9e=()=>{const _0x2f425c=_0xc3779f;_0x2c6ca6[_0x2f425c(0x173)][_0x2f425c(0x178)](()=>{const _0x23779d=_0x2f425c;if(_0x8a69da(this[_0x23779d(0x176)])){const _0x37a536=new _0x5b9ed2(this[_0x23779d(0x146)][_0x23779d(0x169)][_0x23779d(0x176)]),_0x1909c2=_0x37a536[_0x23779d(0x15e)],_0x427cd8=_0x23779d(0x13f)===_0x19df53[_0x23779d(0x151)]?_0x23779d(0x164):_0x23779d(0x179);_0x37a536[_0x23779d(0x165)](),_0x2730f7[_0x23779d(0x176)][_0x23779d(0x172)][_0x427cd8]=_0x1909c2-_0x37a536[_0x23779d(0x15e)]+0x1+'px';}});};return this[_0xc3779f(0x146)][_0xc3779f(0x169)]['on'](_0xc3779f(0x152),_0x1f6a9e),this['on'](_0xc3779f(0x14c),_0x1f6a9e),_0x2730f7;}[_0x4c589c(0x147)](){const _0x226c04=_0x4c589c,_0x3393db=this[_0x226c04(0x146)][_0x226c04(0x169)][_0x226c04(0x176)][_0x226c04(0x158)];this[_0x226c04(0x163)](_0x226c04(0x147),_0x3393db);}[_0x4c589c(0x162)](_0x5bf24f){const _0x3378fc=_0x4c589c;-0x1===_0x5bf24f?this[_0x3378fc(0x175)][_0x3378fc(0x161)]():this[_0x3378fc(0x175)][_0x3378fc(0x141)]();}}