UNPKG

@ckeditor/ckeditor5-ai

Version:

AI features for CKEditor 5.

23 lines 6.5 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. | * | | * | | * +---------------------------------------------------------------------------------+ * * * * */ const _0x5a43d7=_0x4db0;(function(_0x569ba9,_0x1aed3e){const _0x4bf173=_0x4db0,_0x47ccfd=_0x569ba9();while(!![]){try{const _0x532721=parseInt(_0x4bf173(0x10d))/0x1+-parseInt(_0x4bf173(0xe8))/0x2*(-parseInt(_0x4bf173(0x10a))/0x3)+parseInt(_0x4bf173(0xf1))/0x4*(parseInt(_0x4bf173(0x104))/0x5)+parseInt(_0x4bf173(0xe2))/0x6+parseInt(_0x4bf173(0xef))/0x7*(parseInt(_0x4bf173(0x10e))/0x8)+-parseInt(_0x4bf173(0xe9))/0x9*(-parseInt(_0x4bf173(0xe5))/0xa)+parseInt(_0x4bf173(0x117))/0xb*(-parseInt(_0x4bf173(0x10c))/0xc);if(_0x532721===_0x1aed3e)break;else _0x47ccfd['push'](_0x47ccfd['shift']());}catch(_0x40c4d8){_0x47ccfd['push'](_0x47ccfd['shift']());}}}(_0xdc51,0x485c2));import{Rect as _0xe4652d,global as _0xf8e012,isVisible as _0x51a20b}from'ckeditor5/src/utils.js';function _0x4db0(_0x54797b,_0x310481){const _0xdc518f=_0xdc51();return _0x4db0=function(_0x4db003,_0x296748){_0x4db003=_0x4db003-0xe1;let _0x809a1b=_0xdc518f[_0x4db003];return _0x809a1b;},_0x4db0(_0x54797b,_0x310481);}import{IconAIHistory as _0x114a94,IconSubmit as _0xe5a61a}from'ckeditor5/src/icons.js';import{AutocompleteView as _0x4bce1d,ButtonView as _0x58f74a}from'ckeditor5/src/ui.js';import{getTranslation as _0x521b21}from'../../utils/common-translations.js';function _0xdc51(){const _0x5f1812=['submit','_createSubmitButton','width','focusFirst','update','locale','fieldWrapperChildren','11RfdfXB','filteredView','window','value','style','submitButtonView','ck-ai-form__toggle-history','1473600dVtUgn','focus','render','1910ENCLXl','focusableChildren','enter','64182orDqIU','7911zuELuM','isEnabled','keystrokes','maxRows','requestAnimationFrame','element','7loEfoQ','minRows','1238104BPrPFP','History','fieldView','isOn','Submit','_createShowHistoryButton','excludeScrollbarsAndBorders','focusCycler','isEmpty','target','fire','ck-ai-form__submit','focusLast','bind','children','rtl','set','add','isVisible','5ICTqYx','uiLanguageDirection','showHistoryButtonView','execute','left','right','12rteQLC','resultsView','12056676pmJpYi','184600MZnmlH','2121040xwHXUt','queryView'];_0xdc51=function(){return _0x5f1812;};return _0xdc51();}export class AIFormPromptView extends _0x4bce1d{[_0x5a43d7(0x11c)];[_0x5a43d7(0x106)];constructor(_0x2760e9,_0x47d661){const _0x8b82f7=_0x5a43d7;super(_0x2760e9,_0x47d661),this[_0x8b82f7(0x10f)][_0x8b82f7(0xf3)][_0x8b82f7(0xf0)]=0x1,this[_0x8b82f7(0x10f)][_0x8b82f7(0xf3)][_0x8b82f7(0xec)]=0x3,this[_0x8b82f7(0x11c)]=this[_0x8b82f7(0x111)](),this[_0x8b82f7(0x106)]=this[_0x8b82f7(0xf6)](),this[_0x8b82f7(0xe6)][_0x8b82f7(0x102)](this[_0x8b82f7(0x106)],0x1),this[_0x8b82f7(0xe6)][_0x8b82f7(0x102)](this[_0x8b82f7(0x11c)]);}[_0x5a43d7(0xe4)](){const _0x342f0e=_0x5a43d7;super[_0x342f0e(0xe4)](),this[_0x342f0e(0x10f)][_0x342f0e(0x116)][_0x342f0e(0x102)](this[_0x342f0e(0x106)]),this[_0x342f0e(0xff)][_0x342f0e(0x102)](this[_0x342f0e(0x11c)]),this[_0x342f0e(0xeb)][_0x342f0e(0x101)](_0x342f0e(0xe7),(_0x325c34,_0x23fb31)=>{const _0x3a1cd8=_0x342f0e;_0x325c34[_0x3a1cd8(0xfa)]==this[_0x3a1cd8(0x10f)][_0x3a1cd8(0xf3)][_0x3a1cd8(0xee)]&&(this[_0x3a1cd8(0x110)](),_0x23fb31());});}[_0x5a43d7(0x111)](){const _0x51ac70=_0x5a43d7,_0x2b98c6=new _0x58f74a(this[_0x51ac70(0x115)]),_0x6ca8a6=this[_0x51ac70(0x115)];return _0x2b98c6[_0x51ac70(0x101)]({'icon':_0xe5a61a,'label':_0x521b21(_0x6ca8a6,_0x51ac70(0xf5)),'isVisible':!0x0,'tooltip':!0x0,'class':_0x51ac70(0xfc)}),_0x2b98c6['on'](_0x51ac70(0x107),()=>{const _0x1a21a7=_0x51ac70;this[_0x1a21a7(0x110)]();}),_0x2b98c6[_0x51ac70(0xfe)](_0x51ac70(0xea))['to'](this[_0x51ac70(0x10f)][_0x51ac70(0xf3)],_0x51ac70(0xf9),this,_0x51ac70(0xea),(_0x5f4f2b,_0xdfba16)=>!_0x5f4f2b&&_0xdfba16),_0x2b98c6;}[_0x5a43d7(0xf6)](){const _0x373a13=_0x5a43d7,_0x52a6bb=new _0x58f74a(this[_0x373a13(0x115)]),_0x2d1d8c=this[_0x373a13(0x10b)],_0x3c378f=this[_0x373a13(0x115)];_0x52a6bb[_0x373a13(0x101)]({'label':_0x521b21(_0x3c378f,_0x373a13(0xf2)),'withText':!0x1,'icon':_0x114a94,'tooltip':!0x0,'tooltipPosition':'sw','class':_0x373a13(0xe1)}),_0x52a6bb[_0x373a13(0xfe)](_0x373a13(0xf4))['to'](_0x2d1d8c,_0x373a13(0x103)),_0x52a6bb[_0x373a13(0xfe)](_0x373a13(0xea))['to'](this,_0x373a13(0xea)),_0x52a6bb['on'](_0x373a13(0x107),()=>{const _0x494db5=_0x373a13;_0x2d1d8c[_0x494db5(0x103)]=!_0x2d1d8c[_0x494db5(0x103)],_0x2d1d8c[_0x494db5(0x103)]?this[_0x494db5(0x118)][_0x494db5(0xe3)]():this[_0x494db5(0xe3)]();});const _0x29025b=()=>{const _0x3c8aa1=_0x373a13;_0xf8e012[_0x3c8aa1(0x119)][_0x3c8aa1(0xed)](()=>{const _0x187074=_0x3c8aa1;if(_0x51a20b(this[_0x187074(0xee)])){const _0x5a537b=new _0xe4652d(this[_0x187074(0x10f)][_0x187074(0xf3)][_0x187074(0xee)]),_0x2464d7=_0x5a537b[_0x187074(0x112)],_0x106342=_0x187074(0x100)===_0x3c378f[_0x187074(0x105)]?_0x187074(0x108):_0x187074(0x109);_0x5a537b[_0x187074(0xf7)](),_0x52a6bb[_0x187074(0xee)][_0x187074(0x11b)][_0x106342]=_0x2464d7-_0x5a537b[_0x187074(0x112)]+0x1+'px';}});};return this[_0x373a13(0x10f)][_0x373a13(0xf3)]['on'](_0x373a13(0x114),_0x29025b),this['on'](_0x373a13(0xe4),_0x29025b),_0x52a6bb;}[_0x5a43d7(0x110)](){const _0x1846a1=_0x5a43d7,_0x241bdf=this[_0x1846a1(0x10f)][_0x1846a1(0xf3)][_0x1846a1(0xee)][_0x1846a1(0x11a)];this[_0x1846a1(0xfb)](_0x1846a1(0x110),_0x241bdf);}[_0x5a43d7(0xe3)](_0x22e6c2){const _0x142644=_0x5a43d7;-0x1===_0x22e6c2?this[_0x142644(0xf8)][_0x142644(0xfd)]():this[_0x142644(0xf8)][_0x142644(0x113)]();}}