UNPKG

@ckeditor/ckeditor5-ai

Version:

AI Assistant feature for CKEditor 5.

23 lines 6.47 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 _0x2e2e(){const _0x50e257=['History','excludeScrollbarsAndBorders','14keUOvn','set','filteredView','focus','width','fire','element','requestAnimationFrame','queryView','focusableChildren','isOn','isEmpty','bind','target','showHistoryButtonView','3480ZupnUR','_createSubmitButton','748964irudss','value','_createShowHistoryButton','2683974hYZVSB','isVisible','1838837dGcPPE','right','history','submitButtonView','focusFirst','update','uiLanguageDirection','focusLast','fieldWrapperChildren','2587935MynLha','minRows','5503370UyVVvG','Submit','ck-ai-form__submit','isEnabled','children','window','3UyXRtn','add','81561ikHksm','enter','rtl','keystrokes','ck-ai-form__toggle-history','6570tkkWnn','fieldView','maxRows','execute','locale','focusCycler','resultsView','submit','render','left','style'];_0x2e2e=function(){return _0x50e257;};return _0x2e2e();}const _0x48d4ab=_0x38bf;(function(_0x8827ae,_0x34876b){const _0x5a6f0d=_0x38bf,_0x1d78a4=_0x8827ae();while(!![]){try{const _0xf6906c=parseInt(_0x5a6f0d(0x1ab))/0x1*(-parseInt(_0x5a6f0d(0x1bd))/0x2)+parseInt(_0x5a6f0d(0x1a9))/0x3*(parseInt(_0x5a6f0d(0x193))/0x4)+parseInt(_0x5a6f0d(0x1a1))/0x5+-parseInt(_0x5a6f0d(0x196))/0x6+-parseInt(_0x5a6f0d(0x198))/0x7+-parseInt(_0x5a6f0d(0x191))/0x8*(-parseInt(_0x5a6f0d(0x1b0))/0x9)+parseInt(_0x5a6f0d(0x1a3))/0xa;if(_0xf6906c===_0x34876b)break;else _0x1d78a4['push'](_0x1d78a4['shift']());}catch(_0x54669d){_0x1d78a4['push'](_0x1d78a4['shift']());}}}(_0x2e2e,0x473b8));import{Rect as _0x3806cc,global as _0xc31d1,isVisible as _0x23d235}from'ckeditor5/src/utils.js';import{AutocompleteView as _0x3de568,ButtonView as _0x678995}from'ckeditor5/src/ui.js';import{icons as _0x375eb7}from'ckeditor5/src/core.js';import{getTranslation as _0x599e88}from'../../utils/common-translations.js';import _0x441825 from'../../../theme/icons/submit.svg';function _0x38bf(_0x3ea44a,_0x2f42e4){const _0x2e2e61=_0x2e2e();return _0x38bf=function(_0x38bfbb,_0x583878){_0x38bfbb=_0x38bfbb-0x186;let _0x290a93=_0x2e2e61[_0x38bfbb];return _0x290a93;},_0x38bf(_0x3ea44a,_0x2f42e4);}export default class ht extends _0x3de568{constructor(_0x2e75d2,_0xcb044b){const _0x1c3e34=_0x38bf;super(_0x2e75d2,_0xcb044b),this[_0x1c3e34(0x18a)][_0x1c3e34(0x1b1)][_0x1c3e34(0x1a2)]=0x1,this[_0x1c3e34(0x18a)][_0x1c3e34(0x1b1)][_0x1c3e34(0x1b2)]=0x3,this[_0x1c3e34(0x19b)]=this[_0x1c3e34(0x192)](),this[_0x1c3e34(0x190)]=this[_0x1c3e34(0x195)](),this[_0x1c3e34(0x18b)][_0x1c3e34(0x1aa)](this[_0x1c3e34(0x190)],0x1),this[_0x1c3e34(0x18b)][_0x1c3e34(0x1aa)](this[_0x1c3e34(0x19b)]);}[_0x48d4ab(0x1b8)](){const _0x1d4ecc=_0x48d4ab;super[_0x1d4ecc(0x1b8)](),this[_0x1d4ecc(0x18a)][_0x1d4ecc(0x1a0)][_0x1d4ecc(0x1aa)](this[_0x1d4ecc(0x190)]),this[_0x1d4ecc(0x1a7)][_0x1d4ecc(0x1aa)](this[_0x1d4ecc(0x19b)]),this[_0x1d4ecc(0x1ae)][_0x1d4ecc(0x1be)](_0x1d4ecc(0x1ac),(_0x27e4e6,_0x2ee4a3)=>{const _0x5235af=_0x1d4ecc;_0x27e4e6[_0x5235af(0x18f)]==this[_0x5235af(0x18a)][_0x5235af(0x1b1)][_0x5235af(0x188)]&&(this[_0x5235af(0x1b7)](),_0x2ee4a3());});}[_0x48d4ab(0x192)](){const _0x482908=_0x48d4ab,_0x2096f5=new _0x678995(this[_0x482908(0x1b4)]),_0x24e3cb=this[_0x482908(0x1b4)];return _0x2096f5[_0x482908(0x1be)]({'icon':_0x441825,'label':_0x599e88(_0x24e3cb,_0x482908(0x1a4)),'isVisible':!0x0,'tooltip':!0x0,'class':_0x482908(0x1a5)}),_0x2096f5['on'](_0x482908(0x1b3),()=>{const _0x5f9696=_0x482908;this[_0x5f9696(0x1b7)]();}),_0x2096f5[_0x482908(0x18e)](_0x482908(0x1a6))['to'](this[_0x482908(0x18a)][_0x482908(0x1b1)],_0x482908(0x18d),this,_0x482908(0x1a6),(_0x11bb21,_0x12ff1a)=>!_0x11bb21&&_0x12ff1a),_0x2096f5;}[_0x48d4ab(0x195)](){const _0x482915=_0x48d4ab,_0x340d18=new _0x678995(this[_0x482915(0x1b4)]),_0x23481d=this[_0x482915(0x1b6)],_0x220fca=this[_0x482915(0x1b4)];_0x340d18[_0x482915(0x1be)]({'label':_0x599e88(_0x220fca,_0x482915(0x1bb)),'withText':!0x1,'icon':_0x375eb7[_0x482915(0x19a)],'tooltip':!0x0,'tooltipPosition':'sw','class':_0x482915(0x1af)}),_0x340d18[_0x482915(0x18e)](_0x482915(0x18c))['to'](_0x23481d,_0x482915(0x197)),_0x340d18[_0x482915(0x18e)](_0x482915(0x1a6))['to'](this,_0x482915(0x1a6)),_0x340d18['on'](_0x482915(0x1b3),()=>{const _0x326cd3=_0x482915;_0x23481d[_0x326cd3(0x197)]=!_0x23481d[_0x326cd3(0x197)],_0x23481d[_0x326cd3(0x197)]?this[_0x326cd3(0x1bf)][_0x326cd3(0x1c0)]():this[_0x326cd3(0x1c0)]();});const _0x186445=()=>{const _0x4f246c=_0x482915;_0xc31d1[_0x4f246c(0x1a8)][_0x4f246c(0x189)](()=>{const _0x143640=_0x4f246c;if(_0x23d235(this[_0x143640(0x188)])){const _0x249187=new _0x3806cc(this[_0x143640(0x18a)][_0x143640(0x1b1)][_0x143640(0x188)]),_0x3e43cd=_0x249187[_0x143640(0x186)],_0x1a80d8=_0x143640(0x1ad)===_0x220fca[_0x143640(0x19e)]?_0x143640(0x1b9):_0x143640(0x199);_0x249187[_0x143640(0x1bc)](),_0x340d18[_0x143640(0x188)][_0x143640(0x1ba)][_0x1a80d8]=_0x3e43cd-_0x249187[_0x143640(0x186)]+0x1+'px';}});};return this[_0x482915(0x18a)][_0x482915(0x1b1)]['on'](_0x482915(0x19d),_0x186445),this['on'](_0x482915(0x1b8),_0x186445),_0x340d18;}[_0x48d4ab(0x1b7)](){const _0x5e4b20=_0x48d4ab,_0x8d9178=this[_0x5e4b20(0x18a)][_0x5e4b20(0x1b1)][_0x5e4b20(0x188)][_0x5e4b20(0x194)];this[_0x5e4b20(0x187)](_0x5e4b20(0x1b7),_0x8d9178);}[_0x48d4ab(0x1c0)](_0x2a1bcf){const _0x34ec87=_0x48d4ab;-0x1===_0x2a1bcf?this[_0x34ec87(0x1b5)][_0x34ec87(0x19f)]():this[_0x34ec87(0x1b5)][_0x34ec87(0x19c)]();}}