@ckeditor/ckeditor5-ai 0.0.0-nightly-20231012.0 → 0.0.0-nightly-20231014.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x1ff3=['_handlePrompt','isProcessing','destroy','bind','message','view','previousContext','reset','listenTo','currentContext','catch','updateView','initialContext','stopListening','set','previousLabel','stopProcessing','finishProcessing','render','tryAgainEvent','prompt','connector','submitPrompt','_updateValue','previousPrompt','value'];(function(_0xb36641,_0x1ff3a4){const _0x34ff0b=function(_0x14423b){while(--_0x14423b){_0xb36641['push'](_0xb36641['shift']());}};_0x34ff0b(++_0x1ff3a4);}(_0x1ff3,0x93));const _0x34ff=function(_0xb36641,_0x1ff3a4){_0xb36641=_0xb36641-0x0;let _0x34ff0b=_0x1ff3[_0xb36641];return _0x34ff0b;};import{ObservableMixin as _0x24a4f5}from'ckeditor5/src/utils';import{AIRequestError as _0xc35291}from'../aiconnector';export default class I extends _0x24a4f5(){constructor(_0x5d8dc4,_0x58e9fc){super(),this[_0x34ff('0x4')]=_0x5d8dc4,this['view']=_0x58e9fc,this[_0x34ff('0x17')]({'initialContext':'','currentContext':'','previousContext':void 0x0,'previousPrompt':void 0x0,'previousLabel':void 0x0,'isProcessing':!0x1}),this[_0x34ff('0xe')][_0x34ff('0xc')](_0x34ff('0x8'))['to'](this,_0x34ff('0x12')),this[_0x34ff('0x11')](this[_0x34ff('0xe')],_0x34ff('0x5'),(_0x169424,_0x407c08)=>{const _0x23dc20=this[_0x34ff('0x12')]||this[_0x34ff('0x15')];this[_0x34ff('0x9')](_0x407c08,_0x23dc20);}),this['listenTo'](this[_0x34ff('0xe')],_0x34ff('0x2'),()=>{this[_0x34ff('0xe')][_0x34ff('0x3')]=this[_0x34ff('0x18')],this['_handlePrompt'](this['previousPrompt'],this[_0x34ff('0xf')],this['previousLabel']);}),this[_0x34ff('0x11')](this[_0x34ff('0xe')],_0x34ff('0x19'),()=>{this[_0x34ff('0x19')]();});}[_0x34ff('0xb')](){this[_0x34ff('0x16')]();}async[_0x34ff('0x14')](_0x1e9e00,_0x1afb5f,_0x36298a){this[_0x34ff('0xe')]['prompt']=_0x36298a,this[_0x34ff('0x15')]=_0x1afb5f,_0x1e9e00&&(this[_0x34ff('0xe')]['isRendered']?this['_handlePrompt'](_0x1e9e00,_0x1afb5f,_0x36298a):this[_0x34ff('0xe')]['once'](_0x34ff('0x1'),()=>{this[_0x34ff('0x9')](_0x1e9e00,_0x1afb5f,_0x36298a);}));}[_0x34ff('0x19')](){this[_0x34ff('0xa')]&&(this[_0x34ff('0xa')]=!0x1,this[_0x34ff('0xe')][_0x34ff('0x0')](),this[_0x34ff('0x4')]['abort']());}[_0x34ff('0x10')](){this['initialContext']='',this[_0x34ff('0x12')]='',this['previousContext']='',this[_0x34ff('0x7')]='',this['previousLabel']='',this['view'][_0x34ff('0x10')](),this[_0x34ff('0x19')]();}async[_0x34ff('0x9')](_0x35f048,_0x1400ca,_0x28136e){return this[_0x34ff('0xa')]=!0x0,this[_0x34ff('0xe')]['startProcessing'](),this[_0x34ff('0xf')]=_0x1400ca,this[_0x34ff('0x7')]=_0x35f048,this[_0x34ff('0x18')]=_0x28136e||_0x35f048,new Promise(_0x4e4d3e=>{this[_0x34ff('0x4')]['processPrompt'](_0x35f048,_0x1400ca,_0x27fe0d=>this['_updateValue'](_0x27fe0d))[_0x34ff('0x13')](_0x2280e5=>{_0x2280e5 instanceof _0xc35291?this[_0x34ff('0xe')]['handleError'](_0x2280e5[_0x34ff('0xd')]):this[_0x34ff('0xe')]['handleError'](),_0x4e4d3e();})['finally'](()=>{this[_0x34ff('0x19')](),_0x4e4d3e();});});}[_0x34ff('0x6')](_0x1ee029){this[_0x34ff('0x12')]=''+_0x1ee029;}}
23
+ const _0x9414=['startProcessing','isRendered','set','catch','currentContext','once','_handlePrompt','view','reset','render','connector','destroy','stopListening','listenTo','previousLabel','finishProcessing','message','previousPrompt','updateView','isProcessing','tryAgainEvent','finally','initialContext','prompt','previousContext','stopProcessing','_updateValue','processPrompt','value','abort','handleError'];(function(_0x416f0e,_0x9414ef){const _0x178df6=function(_0x35645c){while(--_0x35645c){_0x416f0e['push'](_0x416f0e['shift']());}};_0x178df6(++_0x9414ef);}(_0x9414,0x75));const _0x178d=function(_0x416f0e,_0x9414ef){_0x416f0e=_0x416f0e-0x0;let _0x178df6=_0x9414[_0x416f0e];return _0x178df6;};import{ObservableMixin as _0x5870fe}from'ckeditor5/src/utils';import{AIRequestError as _0x28086b}from'../aiconnector';export default class I extends _0x5870fe(){constructor(_0x2f4f2b,_0x440d36){super(),this[_0x178d('0x11')]=_0x2f4f2b,this[_0x178d('0xe')]=_0x440d36,this[_0x178d('0x9')]({'initialContext':'','currentContext':'','previousContext':void 0x0,'previousPrompt':void 0x0,'previousLabel':void 0x0,'isProcessing':!0x1}),this['view']['bind'](_0x178d('0x4'))['to'](this,'currentContext'),this[_0x178d('0x14')](this['view'],'submitPrompt',(_0x2bb49a,_0x3a5106)=>{const _0x55d6a1=this[_0x178d('0xb')]||this['initialContext'];this[_0x178d('0xd')](_0x3a5106,_0x55d6a1);}),this[_0x178d('0x14')](this[_0x178d('0xe')],_0x178d('0x1b'),()=>{this['view'][_0x178d('0x1e')]=this[_0x178d('0x15')],this[_0x178d('0xd')](this[_0x178d('0x18')],this[_0x178d('0x0')],this[_0x178d('0x15')]);}),this['listenTo'](this['view'],_0x178d('0x1'),()=>{this['stopProcessing']();});}[_0x178d('0x12')](){this[_0x178d('0x13')]();}async[_0x178d('0x19')](_0x4b9bbc,_0xd9e508,_0x3ef69f){this[_0x178d('0xe')]['prompt']=_0x3ef69f,this[_0x178d('0x1d')]=_0xd9e508,_0x4b9bbc&&(this[_0x178d('0xe')][_0x178d('0x8')]?this[_0x178d('0xd')](_0x4b9bbc,_0xd9e508,_0x3ef69f):this[_0x178d('0xe')][_0x178d('0xc')](_0x178d('0x10'),()=>{this['_handlePrompt'](_0x4b9bbc,_0xd9e508,_0x3ef69f);}));}['stopProcessing'](){this['isProcessing']&&(this[_0x178d('0x1a')]=!0x1,this[_0x178d('0xe')][_0x178d('0x16')](),this[_0x178d('0x11')][_0x178d('0x5')]());}[_0x178d('0xf')](){this[_0x178d('0x1d')]='',this[_0x178d('0xb')]='',this[_0x178d('0x0')]='',this['previousPrompt']='',this['previousLabel']='',this[_0x178d('0xe')][_0x178d('0xf')](),this['stopProcessing']();}async[_0x178d('0xd')](_0x2d2812,_0x1788e3,_0x3208d2){return this['isProcessing']=!0x0,this[_0x178d('0xe')][_0x178d('0x7')](),this[_0x178d('0x0')]=_0x1788e3,this[_0x178d('0x18')]=_0x2d2812,this[_0x178d('0x15')]=_0x3208d2||_0x2d2812,new Promise(_0x35874f=>{this[_0x178d('0x11')][_0x178d('0x3')](_0x2d2812,_0x1788e3,_0x45a35f=>this[_0x178d('0x2')](_0x45a35f))[_0x178d('0xa')](_0x2c6cbe=>{_0x2c6cbe instanceof _0x28086b?this[_0x178d('0xe')]['handleError'](_0x2c6cbe[_0x178d('0x17')]):this[_0x178d('0xe')][_0x178d('0x6')](),_0x35874f();})[_0x178d('0x1c')](()=>{this[_0x178d('0x1')](),_0x35874f();});});}[_0x178d('0x2')](_0x23e014){this[_0x178d('0xb')]=''+_0x23e014;}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x8252=['highlightText','isVisible','items','match','labelView','filter','first','length','children','label'];(function(_0x4f64db,_0x8252bd){const _0x3ce969=function(_0x3bb207){while(--_0x3bb207){_0x4f64db['push'](_0x4f64db['shift']());}};_0x3ce969(++_0x8252bd);}(_0x8252,0x1b1));const _0x3ce9=function(_0x4f64db,_0x8252bd){_0x4f64db=_0x4f64db-0x0;let _0x3ce969=_0x8252[_0x4f64db];return _0x3ce969;};import{ListView as _0x5d7035}from'ckeditor5/src/ui';export default class y extends _0x5d7035{['filter'](_0x2d5404){let _0x145749=0x0,_0x297af5=0x0;for(const _0x37555d of this[_0x3ce9('0x9')]){const _0x479b51=_0x37555d;for(const _0x58dcdd of _0x479b51[_0x3ce9('0x9')]){const _0x28d06e=_0x58dcdd[_0x3ce9('0x5')][_0x3ce9('0x3')],_0x1dd291=_0x28d06e[_0x3ce9('0x1')];_0x2d5404?(_0x58dcdd[_0x3ce9('0x8')]=!!_0x28d06e[_0x3ce9('0x6')][_0x3ce9('0x0')](_0x2d5404),_0x58dcdd[_0x3ce9('0x8')]&&(_0x1dd291[_0x3ce9('0x7')](_0x2d5404),_0x297af5++)):(_0x58dcdd[_0x3ce9('0x8')]=!0x0,_0x1dd291[_0x3ce9('0x7')](null),_0x297af5++),_0x145749++;}_0x479b51[_0x3ce9('0x8')]=!!_0x479b51[_0x3ce9('0x9')][_0x3ce9('0x2')](_0x785c7f=>_0x785c7f['isVisible'])[_0x3ce9('0x4')];}return{'resultsCount':_0x297af5,'totalItemsCount':_0x145749};}}
23
+ const _0x550d=['length','match','items','highlightText','filter','isVisible','children','label'];(function(_0x16e9eb,_0x550d00){const _0x27efc4=function(_0x5cb04b){while(--_0x5cb04b){_0x16e9eb['push'](_0x16e9eb['shift']());}};_0x27efc4(++_0x550d00);}(_0x550d,0xc4));const _0x27ef=function(_0x16e9eb,_0x550d00){_0x16e9eb=_0x16e9eb-0x0;let _0x27efc4=_0x550d[_0x16e9eb];return _0x27efc4;};import{ListView as _0x2c312c}from'ckeditor5/src/ui';export default class y extends _0x2c312c{[_0x27ef('0x0')](_0x17e3c8){let _0x74044c=0x0,_0x186e70=0x0;for(const _0x297f7c of this[_0x27ef('0x6')]){const _0x26a83b=_0x297f7c;for(const _0x33f961 of _0x26a83b[_0x27ef('0x6')]){const _0xcda9c=_0x33f961[_0x27ef('0x2')]['first'],_0x37ad5c=_0xcda9c['labelView'];_0x17e3c8?(_0x33f961[_0x27ef('0x1')]=!!_0xcda9c[_0x27ef('0x3')][_0x27ef('0x5')](_0x17e3c8),_0x33f961[_0x27ef('0x1')]&&(_0x37ad5c[_0x27ef('0x7')](_0x17e3c8),_0x186e70++)):(_0x33f961[_0x27ef('0x1')]=!0x0,_0x37ad5c[_0x27ef('0x7')](null),_0x186e70++),_0x74044c++;}_0x26a83b[_0x27ef('0x1')]=!!_0x26a83b[_0x27ef('0x6')][_0x27ef('0x0')](_0x1bf4fc=>_0x1bf4fc['isVisible'])[_0x27ef('0x4')];}return{'resultsCount':_0x186e70,'totalItemsCount':_0x74044c};}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x153c=['style','bindTemplate','ck-button__label','extendTemplate','set'];(function(_0x372923,_0x153c4b){const _0x1bb877=function(_0x38dc02){while(--_0x38dc02){_0x372923['push'](_0x372923['shift']());}};_0x1bb877(++_0x153c4b);}(_0x153c,0x14b));const _0x1bb8=function(_0x372923,_0x153c4b){_0x372923=_0x372923-0x0;let _0x1bb877=_0x153c[_0x372923];return _0x1bb877;};import{HighlightedTextView as _0x4ad18e}from'ckeditor5/src/ui';export default class C extends _0x4ad18e{constructor(){super(),this[_0x1bb8('0x3')]({'style':void 0x0,'text':void 0x0,'id':void 0x0});const _0x26a984=this[_0x1bb8('0x0')];this[_0x1bb8('0x2')]({'attributes':{'class':[_0x1bb8('0x1')],'style':_0x26a984['to'](_0x1bb8('0x4')),'id':_0x26a984['to']('id')}});}}
23
+ const _0x2dcf=['bindTemplate','style','set','ck-button__label'];(function(_0xe28941,_0x2dcf26){const _0x34b0ca=function(_0x5999ed){while(--_0x5999ed){_0xe28941['push'](_0xe28941['shift']());}};_0x34b0ca(++_0x2dcf26);}(_0x2dcf,0x9f));const _0x34b0=function(_0xe28941,_0x2dcf26){_0xe28941=_0xe28941-0x0;let _0x34b0ca=_0x2dcf[_0xe28941];return _0x34b0ca;};import{HighlightedTextView as _0x3416b5}from'ckeditor5/src/ui';export default class C extends _0x3416b5{constructor(){super(),this[_0x34b0('0x3')]({'style':void 0x0,'text':void 0x0,'id':void 0x0});const _0x1b4291=this[_0x34b0('0x1')];this['extendTemplate']({'attributes':{'class':[_0x34b0('0x0')],'style':_0x1b4291['to'](_0x34b0('0x2')),'id':_0x1b4291['to']('id')}});}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x1961=['querySelector','icon','div','change:isProcessing','value','_copyHTMLToClipboard','bindTemplate','focus','setContent','scrollHeight','text/plain','scrollTo','change:value','absolute','.ck-ai-form__loader','body','copyButtonView','locale','Copy','smooth','ck-ai-form__copy-button','textContent','execute','class','set','appendChild','clipboard','appendLoader','setTemplate','ck-content','position','_createCopyButton','render','-9999px','AI\x20is\x20writing...','left','isProcessing','element','_createLoader','write','ck-ai-form__content-area','\x20ck-ai-form__copy-button--copied','wheel','getSelection','listenTo','ck-reset_all-excluded','innerHTML','isEnabled','addRange','style','ck-hidden','execCommand','isVisible','removeAllRanges','ck-ai-form__content-field','loaderView','contentFieldView'];(function(_0x303c7e,_0x196176){const _0x4640d5=function(_0x21b5bd){while(--_0x21b5bd){_0x303c7e['push'](_0x303c7e['shift']());}};_0x4640d5(++_0x196176);}(_0x1961,0x12e));const _0x4640=function(_0x303c7e,_0x196176){_0x303c7e=_0x303c7e-0x0;let _0x4640d5=_0x1961[_0x303c7e];return _0x4640d5;};import{global as _0x319731}from'ckeditor5/src/utils';import{View as _0x430405,ButtonView as _0x327f46,SpinnerView as _0x4b09f5}from'ckeditor5/src/ui';import _0x13b1ab from'../../../theme/icons/copy.svg';import{getTranslation as _0xae50f2}from'../../utils/common-translations';import{icons as _0x566f98}from'ckeditor5/src/core';export default class M extends _0x430405{constructor(_0x25c861,_0x3c0a6b=''){super(_0x25c861),this[_0x4640('0x7')]({'value':null,'isVisible':!0x1,'isProcessing':!0x1});const _0xc8d03f=this[_0x4640('0x2e')];this['contentFieldView']=new ContentFieldView(_0x25c861,_0x3c0a6b),this[_0x4640('0x38')]=this[_0x4640('0xe')](),this[_0x4640('0xb')]({'tag':_0x4640('0x2a'),'attributes':{'class':['ck','ck-ai-form__content-area-wrapper',_0xc8d03f['if']('isVisible',_0x4640('0x21'),_0x495ce7=>!_0x495ce7)],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck',_0x4640('0x17'),_0xc8d03f['if'](_0x4640('0x13'),'ck-ai-form__content-area--processing')]},'children':[this['contentFieldView'],{'tag':_0x4640('0x2a'),'attributes':{'class':['ck','ck-ai-form__copy-button-wrapper']},'children':[this[_0x4640('0x38')]]}]}]});}[_0x4640('0xf')](){super[_0x4640('0xf')](),this[_0x4640('0x2c')]&&this[_0x4640('0x27')][_0x4640('0x30')](this[_0x4640('0x2c')]);let _0x2a1654=!0x1;this['on'](_0x4640('0x34'),(_0x2b4372,_0x48e496,_0x1a87be)=>{const _0x1be69b=!this[_0x4640('0x27')]['element'][_0x4640('0x28')](_0x4640('0x36'));this[_0x4640('0x27')][_0x4640('0x30')](_0x1a87be),this['isProcessing']&&_0x1be69b&&!_0x2a1654&&this[_0x4640('0x14')][_0x4640('0x33')]({'top':this[_0x4640('0x14')][_0x4640('0x31')],'behavior':_0x4640('0x2')});}),this['on'](_0x4640('0x2b'),(_0x54c64a,_0x17b92f,_0x267764)=>{_0x2a1654=!0x1,_0x267764?(this[_0x4640('0x2c')]=null,this[_0x4640('0x27')][_0x4640('0xa')]()):this[_0x4640('0x2c')]||this[_0x4640('0x27')][_0x4640('0x30')]('');}),this[_0x4640('0x1b')](this['element'],_0x4640('0x19'),()=>{_0x2a1654=!0x0;}),this[_0x4640('0x1b')](this[_0x4640('0x14')],'mousedown',()=>{_0x2a1654=!0x0;});}['focus'](){this['element'][_0x4640('0x2f')]();}[_0x4640('0xe')](){const _0x441cdb=this[_0x4640('0x0')],_0x797665=new _0x327f46(this[_0x4640('0x0')]),_0x3b2d2e=_0x4640('0x3');return _0x797665[_0x4640('0x7')]({'label':_0xae50f2(_0x441cdb,_0x4640('0x1')),'icon':_0x13b1ab,'class':_0x3b2d2e,'tooltip':!0x0}),_0x797665['bind'](_0x4640('0x23'))['to'](this,_0x4640('0x2c'),_0x13d18d=>!!_0x13d18d),_0x797665['bind'](_0x4640('0x1e'))['to'](this,_0x4640('0x13'),_0x3b31a9=>!_0x3b31a9),_0x797665['on'](_0x4640('0x5'),()=>{this['_copyHTMLToClipboard'](this[_0x4640('0x27')][_0x4640('0x14')]),_0x797665[_0x4640('0x29')]=_0x566f98['check'],_0x797665[_0x4640('0x6')]=_0x3b2d2e+_0x4640('0x18'),this[_0x4640('0x2f')](),setTimeout(()=>{_0x797665[_0x4640('0x29')]=_0x13b1ab,_0x797665[_0x4640('0x6')]=_0x3b2d2e;},0x3e8);}),_0x797665;}[_0x4640('0x2d')](_0x48d341){const {window:_0x58123f,document:_0x3586f1}=_0x319731;if(_0x58123f['ClipboardItem']){const {Blob:_0x59341d,ClipboardItem:_0xf6f724}=_0x58123f,_0x2586a8=[new _0xf6f724({'text/html':new _0x59341d([_0x48d341[_0x4640('0x1d')]],{'type':'text/html'}),'text/plain':new _0x59341d([_0x48d341[_0x4640('0x4')]||''],{'type':_0x4640('0x32')})})];navigator[_0x4640('0x9')][_0x4640('0x16')](_0x2586a8);}else{const _0x329b6b=_0x3586f1['createElement'](_0x4640('0x2a'));_0x329b6b[_0x4640('0x20')][_0x4640('0xd')]=_0x4640('0x35'),_0x329b6b[_0x4640('0x20')][_0x4640('0x12')]=_0x4640('0x10'),_0x329b6b[_0x4640('0x1d')]=_0x48d341[_0x4640('0x1d')],_0x3586f1[_0x4640('0x37')][_0x4640('0x8')](_0x329b6b);const _0x8dc76e=_0x3586f1['createRange']();_0x8dc76e['selectNodeContents'](_0x329b6b);const _0x11227b=_0x58123f[_0x4640('0x1a')]();_0x11227b[_0x4640('0x24')](),_0x11227b[_0x4640('0x1f')](_0x8dc76e),_0x3586f1[_0x4640('0x22')]('copy'),_0x329b6b['remove']();}}}export class ContentFieldView extends _0x430405{constructor(_0x4ff26d,_0x21a0d2=''){super(_0x4ff26d),this[_0x4640('0x26')]=this['_createLoader'](),this['setTemplate']({'tag':_0x4640('0x2a'),'attributes':{'class':['ck',_0x4640('0xc'),_0x21a0d2,_0x4640('0x1c'),_0x4640('0x25')]}});}[_0x4640('0x30')](_0x47ecb4){this[_0x4640('0x14')][_0x4640('0x1d')]=_0x47ecb4;}['appendLoader'](){this['element'][_0x4640('0x8')](this[_0x4640('0x26')][_0x4640('0x14')]);}[_0x4640('0x15')](){const _0xc3f8ad=new _0x430405(),_0x38f129=this['locale'],_0x43cc24=new _0x4b09f5();return _0x43cc24[_0x4640('0x23')]=!0x0,_0xc3f8ad['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-ai-form__loader']},'children':[_0x43cc24,{'text':_0xae50f2(_0x38f129,_0x4640('0x11'))}]}),_0xc3f8ad[_0x4640('0xf')](),_0xc3f8ad;}}
23
+ const _0x5917=['icon','class','-9999px','_copyHTMLToClipboard','isEnabled','removeAllRanges','bindTemplate','appendLoader','text/html','_createCopyButton','render','execute','getSelection','check','querySelector','absolute','ck-ai-form__copy-button-wrapper','scrollHeight','createElement','innerHTML','body','bind','\x20ck-ai-form__copy-button--copied','ck-ai-form__copy-button','write','position','smooth','isProcessing','div','locale','wheel','appendChild','ck-ai-form__content-area-wrapper','ClipboardItem','listenTo','mousedown','ck-hidden','remove','setContent','change:value','ck-ai-form__loader','contentFieldView','isVisible','scrollTo','change:isProcessing','textContent','element','.ck-ai-form__loader','ck-reset_all-excluded','setTemplate','selectNodeContents','Copy','ck-ai-form__content-area--processing','set','text/plain','style','ck-content','_createLoader','loaderView','value','copyButtonView','ck-ai-form__content-area','focus','execCommand','clipboard'];(function(_0x18d5da,_0x5917b9){const _0x447e7f=function(_0x5c636){while(--_0x5c636){_0x18d5da['push'](_0x18d5da['shift']());}};_0x447e7f(++_0x5917b9);}(_0x5917,0xcc));const _0x447e=function(_0x18d5da,_0x5917b9){_0x18d5da=_0x18d5da-0x0;let _0x447e7f=_0x5917[_0x18d5da];return _0x447e7f;};import{global as _0x268868}from'ckeditor5/src/utils';import{View as _0x24e068,ButtonView as _0x12cc5e,SpinnerView as _0x300ddb}from'ckeditor5/src/ui';import _0x47c4e7 from'../../../theme/icons/copy.svg';import{getTranslation as _0x39506b}from'../../utils/common-translations';import{icons as _0x12abd4}from'ckeditor5/src/core';export default class M extends _0x24e068{constructor(_0x564212,_0x411d15=''){super(_0x564212),this[_0x447e('0x2c')]({'value':null,'isVisible':!0x1,'isProcessing':!0x1});const _0x2404c2=this[_0x447e('0x3e')];this[_0x447e('0x20')]=new ContentFieldView(_0x564212,_0x411d15),this[_0x447e('0x33')]=this['_createCopyButton'](),this[_0x447e('0x28')]({'tag':_0x447e('0x13'),'attributes':{'class':['ck',_0x447e('0x17'),_0x2404c2['if'](_0x447e('0x21'),_0x447e('0x1b'),_0xf83168=>!_0xf83168)],'tabindex':'-1'},'children':[{'tag':_0x447e('0x13'),'attributes':{'class':['ck',_0x447e('0x34'),_0x2404c2['if']('isProcessing',_0x447e('0x2b'))]},'children':[this[_0x447e('0x20')],{'tag':_0x447e('0x13'),'attributes':{'class':['ck',_0x447e('0x7')]},'children':[this[_0x447e('0x33')]]}]}]});}[_0x447e('0x1')](){super['render'](),this[_0x447e('0x32')]&&this['contentFieldView'][_0x447e('0x1d')](this[_0x447e('0x32')]);let _0x1e32de=!0x1;this['on'](_0x447e('0x1e'),(_0x15f96e,_0x1ed0de,_0x1eb3a9)=>{const _0x544275=!this[_0x447e('0x20')][_0x447e('0x25')][_0x447e('0x5')](_0x447e('0x26'));this[_0x447e('0x20')][_0x447e('0x1d')](_0x1eb3a9),this[_0x447e('0x12')]&&_0x544275&&!_0x1e32de&&this[_0x447e('0x25')][_0x447e('0x22')]({'top':this[_0x447e('0x25')][_0x447e('0x8')],'behavior':_0x447e('0x11')});}),this['on'](_0x447e('0x23'),(_0x2a68fb,_0x577eb5,_0x34c8cd)=>{_0x1e32de=!0x1,_0x34c8cd?(this[_0x447e('0x32')]=null,this['contentFieldView'][_0x447e('0x3f')]()):this[_0x447e('0x32')]||this[_0x447e('0x20')][_0x447e('0x1d')]('');}),this[_0x447e('0x19')](this[_0x447e('0x25')],_0x447e('0x15'),()=>{_0x1e32de=!0x0;}),this[_0x447e('0x19')](this['element'],_0x447e('0x1a'),()=>{_0x1e32de=!0x0;});}[_0x447e('0x35')](){this[_0x447e('0x25')][_0x447e('0x35')]();}[_0x447e('0x0')](){const _0x24b0df=this['locale'],_0x4d1514=new _0x12cc5e(this['locale']),_0x5f2128=_0x447e('0xe');return _0x4d1514[_0x447e('0x2c')]({'label':_0x39506b(_0x24b0df,_0x447e('0x2a')),'icon':_0x47c4e7,'class':_0x5f2128,'tooltip':!0x0}),_0x4d1514[_0x447e('0xc')](_0x447e('0x21'))['to'](this,_0x447e('0x32'),_0x5065a3=>!!_0x5065a3),_0x4d1514[_0x447e('0xc')](_0x447e('0x3c'))['to'](this,_0x447e('0x12'),_0xb359bd=>!_0xb359bd),_0x4d1514['on'](_0x447e('0x2'),()=>{this['_copyHTMLToClipboard'](this['contentFieldView']['element']),_0x4d1514[_0x447e('0x38')]=_0x12abd4[_0x447e('0x4')],_0x4d1514[_0x447e('0x39')]=_0x5f2128+_0x447e('0xd'),this[_0x447e('0x35')](),setTimeout(()=>{_0x4d1514[_0x447e('0x38')]=_0x47c4e7,_0x4d1514['class']=_0x5f2128;},0x3e8);}),_0x4d1514;}[_0x447e('0x3b')](_0x446207){const {window:_0x49ce24,document:_0x5b755c}=_0x268868;if(_0x49ce24[_0x447e('0x18')]){const {Blob:_0x524c2c,ClipboardItem:_0x56e12d}=_0x49ce24,_0x45d62a=[new _0x56e12d({'text/html':new _0x524c2c([_0x446207[_0x447e('0xa')]],{'type':_0x447e('0x40')}),'text/plain':new _0x524c2c([_0x446207[_0x447e('0x24')]||''],{'type':_0x447e('0x2d')})})];navigator[_0x447e('0x37')][_0x447e('0xf')](_0x45d62a);}else{const _0x382df2=_0x5b755c[_0x447e('0x9')](_0x447e('0x13'));_0x382df2['style'][_0x447e('0x10')]=_0x447e('0x6'),_0x382df2[_0x447e('0x2e')]['left']=_0x447e('0x3a'),_0x382df2['innerHTML']=_0x446207['innerHTML'],_0x5b755c[_0x447e('0xb')][_0x447e('0x16')](_0x382df2);const _0x2a3252=_0x5b755c['createRange']();_0x2a3252[_0x447e('0x29')](_0x382df2);const _0xfc63d7=_0x49ce24[_0x447e('0x3')]();_0xfc63d7[_0x447e('0x3d')](),_0xfc63d7['addRange'](_0x2a3252),_0x5b755c[_0x447e('0x36')]('copy'),_0x382df2[_0x447e('0x1c')]();}}}export class ContentFieldView extends _0x24e068{constructor(_0x9927b4,_0x5dedde=''){super(_0x9927b4),this[_0x447e('0x31')]=this['_createLoader'](),this['setTemplate']({'tag':_0x447e('0x13'),'attributes':{'class':['ck',_0x447e('0x2f'),_0x5dedde,_0x447e('0x27'),'ck-ai-form__content-field']}});}[_0x447e('0x1d')](_0xc3092){this[_0x447e('0x25')][_0x447e('0xa')]=_0xc3092;}[_0x447e('0x3f')](){this[_0x447e('0x25')][_0x447e('0x16')](this[_0x447e('0x31')][_0x447e('0x25')]);}[_0x447e('0x30')](){const _0x8160c=new _0x24e068(),_0x2e397c=this[_0x447e('0x14')],_0x29ff27=new _0x300ddb();return _0x29ff27[_0x447e('0x21')]=!0x0,_0x8160c[_0x447e('0x28')]({'tag':_0x447e('0x13'),'attributes':{'class':['ck',_0x447e('0x1f')]},'children':[_0x29ff27,{'text':_0x39506b(_0x2e397c,'AI\x20is\x20writing...')}]}),_0x8160c[_0x447e('0x1')](),_0x8160c;}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x1db7=['bindTemplate','div','content','ck-ai-form__error','setTemplate'];(function(_0xcd5e2d,_0x1db7d0){const _0x3c29b3=function(_0x284690){while(--_0x284690){_0xcd5e2d['push'](_0xcd5e2d['shift']());}};_0x3c29b3(++_0x1db7d0);}(_0x1db7,0x99));const _0x3c29=function(_0xcd5e2d,_0x1db7d0){_0xcd5e2d=_0xcd5e2d-0x0;let _0x3c29b3=_0x1db7[_0xcd5e2d];return _0x3c29b3;};import{View as _0x2b951e,IconView as _0x9de9c8}from'ckeditor5/src/ui';import _0x3a0625 from'../../../theme/icons/error.svg';export default class J extends _0x2b951e{constructor(_0xeca465,_0x13539f=''){super(_0xeca465);const _0x315886=new _0x9de9c8(),_0x5ba963=this[_0x3c29('0x2')];this['set']('text',_0x13539f),_0x315886[_0x3c29('0x4')]=_0x3a0625,this[_0x3c29('0x1')]({'tag':_0x3c29('0x3'),'attributes':{'class':['ck',_0x3c29('0x0')]},'children':[_0x315886,{'text':_0x5ba963['to']('text')}]});}}
23
+ const _0x45c8=['ck-ai-form__error','content','div','bindTemplate','set','text','setTemplate'];(function(_0x5466d8,_0x45c89c){const _0x2161cb=function(_0xc6c07c){while(--_0xc6c07c){_0x5466d8['push'](_0x5466d8['shift']());}};_0x2161cb(++_0x45c89c);}(_0x45c8,0x1c6));const _0x2161=function(_0x5466d8,_0x45c89c){_0x5466d8=_0x5466d8-0x0;let _0x2161cb=_0x45c8[_0x5466d8];return _0x2161cb;};import{View as _0x1f332d,IconView as _0x27ffa9}from'ckeditor5/src/ui';import _0x48edad from'../../../theme/icons/error.svg';export default class J extends _0x1f332d{constructor(_0xaa0423,_0x20c471=''){super(_0xaa0423);const _0xc0eac0=new _0x27ffa9(),_0x5cb27d=this[_0x2161('0x4')];this[_0x2161('0x5')](_0x2161('0x6'),_0x20c471),_0xc0eac0[_0x2161('0x2')]=_0x48edad,this[_0x2161('0x0')]({'tag':_0x2161('0x3'),'attributes':{'class':['ck',_0x2161('0x1')]},'children':[_0xc0eac0,{'text':_0x5cb27d['to'](_0x2161('0x6'))}]});}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x1ac3=['focus','add','isVisible','enter','focusCycler','submitButtonView','fieldWrapperChildren','bind','queryView','window','fieldView','isEnabled','focusFirst','target','showHistoryButtonView','filteredView','ck-ai-form__submit','Submit','uiLanguageDirection','set','style','update','isEmpty','_createShowHistoryButton','left','maxRows','width','excludeScrollbarsAndBorders','render','isOn','locale','keystrokes','History','_createSubmitButton','element','submit'];(function(_0x3d6964,_0x1ac379){const _0x3d1f7d=function(_0x28a283){while(--_0x28a283){_0x3d6964['push'](_0x3d6964['shift']());}};_0x3d1f7d(++_0x1ac379);}(_0x1ac3,0x166));const _0x3d1f=function(_0x3d6964,_0x1ac379){_0x3d6964=_0x3d6964-0x0;let _0x3d1f7d=_0x1ac3[_0x3d6964];return _0x3d1f7d;};import{Rect as _0x115c8b,global as _0x28ed24,isVisible as _0x49fb66}from'ckeditor5/src/utils';import{AutocompleteView as _0x45c3a9,ButtonView as _0x1e28af}from'ckeditor5/src/ui';import{icons as _0x2f8806}from'ckeditor5/src/core';import{escape as _0x1be119}from'lodash-es';import{getTranslation as _0x193d86}from'../../utils/common-translations';import _0x121c1e from'../../../theme/icons/submit.svg';export default class R extends _0x45c3a9{constructor(_0x4bc486,_0x5d07ee){super(_0x4bc486,_0x5d07ee),this[_0x3d1f('0xa')][_0x3d1f('0xc')]['minRows']=0x1,this[_0x3d1f('0xa')][_0x3d1f('0xc')][_0x3d1f('0x1b')]=0x3,this[_0x3d1f('0x7')]=this[_0x3d1f('0x23')](),this[_0x3d1f('0x10')]=this[_0x3d1f('0x19')](),this['focusableChildren']['add'](this['showHistoryButtonView'],0x1),this['focusableChildren'][_0x3d1f('0x3')](this[_0x3d1f('0x7')]);}[_0x3d1f('0x1e')](){super['render'](),this[_0x3d1f('0xa')][_0x3d1f('0x8')][_0x3d1f('0x3')](this[_0x3d1f('0x10')]),this['children'][_0x3d1f('0x3')](this[_0x3d1f('0x7')]),this[_0x3d1f('0x21')][_0x3d1f('0x15')](_0x3d1f('0x5'),(_0x54edd9,_0x3efb74)=>{_0x54edd9[_0x3d1f('0xf')]==this[_0x3d1f('0xa')]['fieldView'][_0x3d1f('0x0')]&&(this['submit'](),_0x3efb74());});}['_createSubmitButton'](){const _0x571a73=new _0x1e28af(this[_0x3d1f('0x20')]),_0x32ae87=this[_0x3d1f('0x20')];return _0x571a73['set']({'icon':_0x121c1e,'label':_0x193d86(_0x32ae87,_0x3d1f('0x13')),'isVisible':!0x0,'tooltip':!0x0,'class':_0x3d1f('0x12')}),_0x571a73['on']('execute',()=>{this['submit']();}),_0x571a73[_0x3d1f('0x9')]('isEnabled')['to'](this[_0x3d1f('0xa')]['fieldView'],_0x3d1f('0x18'),this,_0x3d1f('0xd'),(_0x17a0e1,_0x2a8cad)=>!_0x17a0e1&&_0x2a8cad),_0x571a73;}[_0x3d1f('0x19')](){const _0x10b338=new _0x1e28af(this[_0x3d1f('0x20')]),_0x51ea99=this['resultsView'],_0xe6f02e=this[_0x3d1f('0x20')];_0x10b338['set']({'label':_0x193d86(_0xe6f02e,_0x3d1f('0x22')),'withText':!0x1,'icon':_0x2f8806['history'],'tooltip':!0x0,'tooltipPosition':'sw','class':'ck-ai-form__toggle-history'}),_0x10b338[_0x3d1f('0x9')](_0x3d1f('0x1f'))['to'](_0x51ea99,_0x3d1f('0x4')),_0x10b338[_0x3d1f('0x9')](_0x3d1f('0xd'))['to'](this,_0x3d1f('0xd')),_0x10b338['on']('execute',()=>{_0x51ea99['isVisible']=!_0x51ea99[_0x3d1f('0x4')],_0x51ea99[_0x3d1f('0x4')]?this[_0x3d1f('0x11')][_0x3d1f('0x2')]():this['focus']();});const _0x5b4cac=()=>{_0x28ed24[_0x3d1f('0xb')]['requestAnimationFrame'](()=>{if(_0x49fb66(this['element'])){const _0x517cdc=new _0x115c8b(this[_0x3d1f('0xa')][_0x3d1f('0xc')][_0x3d1f('0x0')]),_0x259f7e=_0x517cdc[_0x3d1f('0x1c')],_0x28e06d='rtl'===_0xe6f02e[_0x3d1f('0x14')]?_0x3d1f('0x1a'):'right';_0x517cdc[_0x3d1f('0x1d')](),_0x10b338['element'][_0x3d1f('0x16')][_0x28e06d]=_0x259f7e-_0x517cdc['width']+0x1+'px';}});};return this[_0x3d1f('0xa')]['fieldView']['on'](_0x3d1f('0x17'),_0x5b4cac),this['on'](_0x3d1f('0x1e'),_0x5b4cac),_0x10b338;}[_0x3d1f('0x1')](){const _0x5a71ca=this['queryView'][_0x3d1f('0xc')]['element']['value'];this['fire']('submit',_0x1be119(_0x5a71ca));}[_0x3d1f('0x2')](_0x56b2fd){-0x1===_0x56b2fd?this[_0x3d1f('0x6')]['focusLast']():this[_0x3d1f('0x6')][_0x3d1f('0xe')]();}}
23
+ const _0x2ca4=['isEnabled','bind','update','_createShowHistoryButton','focus','style','ck-ai-form__toggle-history','queryView','add','rtl','excludeScrollbarsAndBorders','isEmpty','keystrokes','set','target','element','showHistoryButtonView','Submit','width','focusFirst','isVisible','submit','left','focusableChildren','render','value','focusCycler','_createSubmitButton','minRows','execute','submitButtonView','requestAnimationFrame','fieldWrapperChildren','isOn','maxRows','enter','fieldView','ck-ai-form__submit','history','children','right','uiLanguageDirection'];(function(_0x7acc54,_0x2ca43b){const _0x352c2c=function(_0x562131){while(--_0x562131){_0x7acc54['push'](_0x7acc54['shift']());}};_0x352c2c(++_0x2ca43b);}(_0x2ca4,0x84));const _0x352c=function(_0x7acc54,_0x2ca43b){_0x7acc54=_0x7acc54-0x0;let _0x352c2c=_0x2ca4[_0x7acc54];return _0x352c2c;};import{Rect as _0x3845ae,global as _0x318e46,isVisible as _0xda6a1a}from'ckeditor5/src/utils';import{AutocompleteView as _0x100816,ButtonView as _0x524850}from'ckeditor5/src/ui';import{icons as _0x300169}from'ckeditor5/src/core';import{escape as _0x57a26e}from'lodash-es';import{getTranslation as _0x4fb59b}from'../../utils/common-translations';import _0x18d643 from'../../../theme/icons/submit.svg';export default class R extends _0x100816{constructor(_0x186163,_0x481bf3){super(_0x186163,_0x481bf3),this['queryView']['fieldView'][_0x352c('0x16')]=0x1,this[_0x352c('0x1')]['fieldView'][_0x352c('0x1c')]=0x3,this[_0x352c('0x18')]=this[_0x352c('0x15')](),this['showHistoryButtonView']=this[_0x352c('0x27')](),this[_0x352c('0x11')][_0x352c('0x2')](this[_0x352c('0xa')],0x1),this['focusableChildren'][_0x352c('0x2')](this[_0x352c('0x18')]);}[_0x352c('0x12')](){super[_0x352c('0x12')](),this[_0x352c('0x1')][_0x352c('0x1a')]['add'](this[_0x352c('0xa')]),this[_0x352c('0x21')]['add'](this[_0x352c('0x18')]),this[_0x352c('0x6')][_0x352c('0x7')](_0x352c('0x1d'),(_0x3498bf,_0x507446)=>{_0x3498bf[_0x352c('0x8')]==this['queryView'][_0x352c('0x1e')][_0x352c('0x9')]&&(this[_0x352c('0xf')](),_0x507446());});}[_0x352c('0x15')](){const _0x210ec0=new _0x524850(this['locale']),_0x206eab=this['locale'];return _0x210ec0[_0x352c('0x7')]({'icon':_0x18d643,'label':_0x4fb59b(_0x206eab,_0x352c('0xb')),'isVisible':!0x0,'tooltip':!0x0,'class':_0x352c('0x1f')}),_0x210ec0['on']('execute',()=>{this['submit']();}),_0x210ec0[_0x352c('0x25')](_0x352c('0x24'))['to'](this[_0x352c('0x1')][_0x352c('0x1e')],_0x352c('0x5'),this,_0x352c('0x24'),(_0x4af029,_0x17c2ec)=>!_0x4af029&&_0x17c2ec),_0x210ec0;}['_createShowHistoryButton'](){const _0x37a6e0=new _0x524850(this['locale']),_0x4488a8=this['resultsView'],_0x368817=this['locale'];_0x37a6e0[_0x352c('0x7')]({'label':_0x4fb59b(_0x368817,'History'),'withText':!0x1,'icon':_0x300169[_0x352c('0x20')],'tooltip':!0x0,'tooltipPosition':'sw','class':_0x352c('0x0')}),_0x37a6e0[_0x352c('0x25')](_0x352c('0x1b'))['to'](_0x4488a8,'isVisible'),_0x37a6e0['bind'](_0x352c('0x24'))['to'](this,_0x352c('0x24')),_0x37a6e0['on'](_0x352c('0x17'),()=>{_0x4488a8['isVisible']=!_0x4488a8[_0x352c('0xe')],_0x4488a8[_0x352c('0xe')]?this['filteredView'][_0x352c('0x28')]():this[_0x352c('0x28')]();});const _0x29300e=()=>{_0x318e46['window'][_0x352c('0x19')](()=>{if(_0xda6a1a(this[_0x352c('0x9')])){const _0x1f9bc2=new _0x3845ae(this[_0x352c('0x1')]['fieldView'][_0x352c('0x9')]),_0xf52676=_0x1f9bc2[_0x352c('0xc')],_0x5e349c=_0x352c('0x3')===_0x368817[_0x352c('0x23')]?_0x352c('0x10'):_0x352c('0x22');_0x1f9bc2[_0x352c('0x4')](),_0x37a6e0[_0x352c('0x9')][_0x352c('0x29')][_0x5e349c]=_0xf52676-_0x1f9bc2['width']+0x1+'px';}});};return this[_0x352c('0x1')][_0x352c('0x1e')]['on'](_0x352c('0x26'),_0x29300e),this['on'](_0x352c('0x12'),_0x29300e),_0x37a6e0;}[_0x352c('0xf')](){const _0x489374=this['queryView'][_0x352c('0x1e')][_0x352c('0x9')][_0x352c('0x13')];this['fire'](_0x352c('0xf'),_0x57a26e(_0x489374));}['focus'](_0x2fe230){-0x1===_0x2fe230?this['focusCycler']['focusLast']():this[_0x352c('0x14')][_0x352c('0xd')]();}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x3e4b=['ck-ai-form__toolbar','Stop','insertButton','_createButton','isVisible','Try\x20again','tryAgainButton','AI_REPLACE_CONTENT','set','stopButton','replaceButton','ck-hidden','bindTemplate'];(function(_0x36e21c,_0x3e4b15){const _0x105c0e=function(_0xc56a50){while(--_0xc56a50){_0x36e21c['push'](_0x36e21c['shift']());}};_0x105c0e(++_0x3e4b15);}(_0x3e4b,0x14a));const _0x105c=function(_0x36e21c,_0x3e4b15){_0x36e21c=_0x36e21c-0x0;let _0x105c0e=_0x3e4b[_0x36e21c];return _0x105c0e;};import{ToolbarView as _0x48c163,ButtonView as _0x4c2bed}from'ckeditor5/src/ui';import{getTranslation as _0x238e2b}from'../../utils/common-translations';export default class X extends _0x48c163{constructor(_0x3a55a9){super(_0x3a55a9),this[_0x105c('0x3')](_0x105c('0xc'),!0x1),this[_0x105c('0x5')]=this[_0x105c('0xb')](_0x238e2b(_0x3a55a9,_0x105c('0x2')),'ck-button-action'),this[_0x105c('0xa')]=this['_createButton'](_0x238e2b(_0x3a55a9,'Insert\x20below')),this[_0x105c('0x1')]=this[_0x105c('0xb')](_0x238e2b(_0x3a55a9,_0x105c('0x0'))),this[_0x105c('0x4')]=this['_createButton'](_0x238e2b(_0x3a55a9,_0x105c('0x9')));const _0xbe5579=this[_0x105c('0x7')];this['extendTemplate']({'attributes':{'class':[_0x105c('0x8'),_0xbe5579['if']('isVisible',_0x105c('0x6'),_0x2f1ff5=>!_0x2f1ff5)]}}),this['items']['addMany']([this['replaceButton'],this[_0x105c('0xa')],this[_0x105c('0x1')],this[_0x105c('0x4')]]);}[_0x105c('0xb')](_0x363d82,_0x367b22){const _0x79d2af=new _0x4c2bed(this['locale']);return _0x79d2af[_0x105c('0x3')]({'label':_0x363d82,'class':_0x367b22||'','isVisible':!0x0,'withText':!0x0}),_0x79d2af;}}
23
+ const _0xbd42=['items','set','ck-button-action','insertButton','ck-hidden','locale','replaceButton','Stop','stopButton','Try\x20again','addMany','bindTemplate','isVisible','tryAgainButton','_createButton','AI_REPLACE_CONTENT'];(function(_0x3782d9,_0xbd424a){const _0x35232a=function(_0x14871a){while(--_0x14871a){_0x3782d9['push'](_0x3782d9['shift']());}};_0x35232a(++_0xbd424a);}(_0xbd42,0x14d));const _0x3523=function(_0x3782d9,_0xbd424a){_0x3782d9=_0x3782d9-0x0;let _0x35232a=_0xbd42[_0x3782d9];return _0x35232a;};import{ToolbarView as _0x331991,ButtonView as _0x194542}from'ckeditor5/src/ui';import{getTranslation as _0x41ea1d}from'../../utils/common-translations';export default class X extends _0x331991{constructor(_0x38c932){super(_0x38c932),this[_0x3523('0x4')]('isVisible',!0x1),this['replaceButton']=this['_createButton'](_0x41ea1d(_0x38c932,_0x3523('0x2')),_0x3523('0x5')),this[_0x3523('0x6')]=this['_createButton'](_0x41ea1d(_0x38c932,'Insert\x20below')),this[_0x3523('0x0')]=this[_0x3523('0x1')](_0x41ea1d(_0x38c932,_0x3523('0xc'))),this[_0x3523('0xb')]=this[_0x3523('0x1')](_0x41ea1d(_0x38c932,_0x3523('0xa')));const _0x5c536c=this[_0x3523('0xe')];this['extendTemplate']({'attributes':{'class':['ck-ai-form__toolbar',_0x5c536c['if'](_0x3523('0xf'),_0x3523('0x7'),_0x4eb93b=>!_0x4eb93b)]}}),this[_0x3523('0x3')][_0x3523('0xd')]([this[_0x3523('0x9')],this[_0x3523('0x6')],this['tryAgainButton'],this['stopButton']]);}['_createButton'](_0x2974b5,_0x4ca3e7){const _0x4bd559=new _0x194542(this[_0x3523('0x8')]);return _0x4bd559['set']({'label':_0x2974b5,'class':_0x4ca3e7||'','isVisible':!0x0,'withText':!0x0}),_0x4bd559;}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x5e21=['reset','_focusables','historyGroupView','_focusCycler','stopButton','stopProcessing','startProcessing','Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.','locale','contentArea','trim','focusNext','isVisible','focusCycler','focusTracker','focusPrevious','queryView','_createPromptView','errorView','_promptHistory','isError','setTemplate','shift\x20+\x20tab','createCollection','bind','copyButtonView','finishProcessing','stop','fieldView','bindTemplate','focusFirst','ck-hidden','listenTo','forwardCycle','value','_createHistoryView','label','submitPrompt','promptView','text','Empty\x20history','focus','header','element','_createToolbar','isEnabled','Ask\x20AI\x20to\x20improve\x20generated\x20text','toolbar','fire','prompt','tab','div','execute','tryAgainEvent','set','isProcessing','render','keystrokes','insertContentBelow','add','ck-ai-form','bindTo','Ask\x20AI\x20to\x20edit\x20or\x20generate','tryAgainButton','replaceButton','clearHistory','high','insertButton','AI\x20Assistant','search','submit'];(function(_0x5ab071,_0x5e21f4){const _0x34958d=function(_0x1deb8a){while(--_0x1deb8a){_0x5ab071['push'](_0x5ab071['shift']());}};_0x34958d(++_0x5e21f4);}(_0x5e21,0x1e1));const _0x3495=function(_0x5ab071,_0x5e21f4){_0x5ab071=_0x5ab071-0x0;let _0x34958d=_0x5e21[_0x5ab071];return _0x34958d;};import{FocusTracker as _0x3ab92f,KeystrokeHandler as _0x150c75}from'ckeditor5/src/utils';import{View as _0x50059d,FocusCycler as _0x5523e5,createLabeledTextarea as _0x254b39,FormHeaderView as _0x1d707a}from'ckeditor5/src/ui';import _0x19565f from'./aiformtoolbarview';import _0xb14196 from'./aiformcontentarea';import _0x4653f1 from'./aiformerrorview';import _0x5a7991 from'./aiformpromptview';import _0x36f679 from'./aihistorylistview';import _0x20c0d3 from'./aihistorylistitemview';import _0x25c24d from'./prompthistory';import{getTranslation as _0x28898e}from'../../utils/common-translations';import _0x58a44f from'../../../theme/icons/robot-pencil.svg';export default class g extends _0x50059d{constructor(_0x5b3152,_0x3e3a7e,_0x2d1745=''){super(_0x5b3152),this[_0x3495('0x46')](_0x3495('0x3d'),!0x0),this['set'](_0x3495('0x0'),!0x1),this[_0x3495('0x46')]('prompt',''),this[_0x3495('0x46')](_0x3495('0x32'),''),this[_0x3495('0x46')](_0x3495('0x24'),!0x1),this[_0x3495('0x23')]=new _0x25c24d(),this[_0x3495('0x22')]=new _0x4653f1(_0x5b3152),this['header']=new _0x1d707a(_0x5b3152,{'label':_0x28898e(_0x5b3152,_0x3495('0xd')),'icon':_0x58a44f}),this['contentArea']=new _0xb14196(_0x5b3152,_0x2d1745),this['contentArea'][_0x3495('0x28')](_0x3495('0x0'))['to'](this),this[_0x3495('0x19')][_0x3495('0x28')](_0x3495('0x32'))['to'](this),this['toolbar']=this[_0x3495('0x3c')](),this[_0x3495('0x36')]=this[_0x3495('0x21')](),this[_0x3495('0x1e')]=new _0x3ab92f(),this['keystrokes']=new _0x150c75(),this['_focusables']=this[_0x3495('0x27')]([this['contentArea'],this[_0x3495('0x19')]['copyButtonView'],this['toolbar'],this['promptView']]),this[_0x3495('0x13')]=new _0x5523e5({'focusables':this[_0x3495('0x11')],'focusTracker':this[_0x3495('0x1e')],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':_0x3495('0x26'),'focusNext':_0x3495('0x42')}}),this[_0x3495('0x36')]['focusCycler']['on'](_0x3495('0x31'),_0x1bf45c=>{this[_0x3495('0x13')][_0x3495('0x1b')](),_0x1bf45c['stop']();}),this[_0x3495('0x36')][_0x3495('0x1d')]['on']('backwardCycle',_0x24307d=>{this['_focusCycler'][_0x3495('0x1f')](),_0x24307d[_0x3495('0x2b')]();}),this[_0x3495('0x36')][_0x3495('0x20')][_0x3495('0x2c')]['bind'](_0x3495('0x32'))['to'](this,_0x3495('0x41'));const _0x586297=this[_0x3495('0x2d')];this[_0x3495('0x25')]({'tag':'div','attributes':{'class':['ck',_0x3495('0x5'),_0x3e3a7e],'tabindex':'-1'},'children':[this[_0x3495('0x3a')],{'tag':_0x3495('0x43'),'attributes':{'class':['ck','ck-ai-form-content']},'children':[{'tag':'div','attributes':{'class':[_0x586297['if'](_0x3495('0x24'),_0x3495('0x2f'),_0x5f1c18=>!_0x5f1c18)]},'children':[this[_0x3495('0x22')]]},this[_0x3495('0x19')],this[_0x3495('0x3f')],this['promptView']]}]});}[_0x3495('0x1')](){super[_0x3495('0x1')](),this[_0x3495('0x1e')][_0x3495('0x4')](this[_0x3495('0x19')]['element']),this[_0x3495('0x1e')][_0x3495('0x4')](this[_0x3495('0x19')][_0x3495('0x29')][_0x3495('0x3b')]),this['focusTracker']['add'](this[_0x3495('0x3f')][_0x3495('0x3b')]),this[_0x3495('0x1e')][_0x3495('0x4')](this[_0x3495('0x36')][_0x3495('0x3b')]),this[_0x3495('0x2')][_0x3495('0x30')](this[_0x3495('0x3b')]);}[_0x3495('0x39')](){this[_0x3495('0x13')][_0x3495('0x2e')]();}['reset'](){this['prompt']='',this[_0x3495('0x32')]='',this[_0x3495('0x36')][_0x3495('0x10')](),this[_0x3495('0x19')]['isVisible']=!0x1,this['toolbar'][_0x3495('0x1c')]=!0x1;}[_0x3495('0x21')](){const _0x5e2a29=this['locale'],_0x2f2ff2=new _0x5a7991(_0x5e2a29,{'queryView':{'label':_0x28898e(_0x5e2a29,_0x3495('0x7')),'creator':_0x254b39,'showIcon':!0x1,'showResetButton':!0x1},'infoView':{'text':{'noSearchableItems':{'primary':_0x28898e(_0x5e2a29,_0x3495('0x38')),'secondary':_0x28898e(_0x5e2a29,_0x3495('0x17'))}}},'filteredView':this[_0x3495('0x33')](),'queryMinChars':0x1/0x0,'resetOnBlur':!0x1});return _0x2f2ff2[_0x3495('0x28')](_0x3495('0x3d'))['to'](this,_0x3495('0x3d'),this,_0x3495('0x0'),(_0x2a9360,_0x2a1b10)=>_0x2a9360&&!_0x2a1b10),this[_0x3495('0x30')](_0x2f2ff2,_0x3495('0xf'),(_0x3b66f9,_0x57643e)=>{this[_0x3495('0x41')]=_0x57643e,this[_0x3495('0x40')](_0x3495('0x35'),this[_0x3495('0x41')]),_0x57643e['trim']()&&this[_0x3495('0x23')][_0x3495('0x4')]({'prompt':_0x57643e[_0x3495('0x1a')]()},0x0);},{'priority':_0x3495('0xb')}),_0x2f2ff2;}[_0x3495('0x33')](){const _0x291782=new _0x36f679(this[_0x3495('0x18')]);return _0x291782[_0x3495('0x12')]['items'][_0x3495('0x6')](this[_0x3495('0x23')])['as'](_0x20c0d3),_0x291782['on'](_0x3495('0xa'),()=>{this[_0x3495('0x23')]['clear'](),this['promptView'][_0x3495('0xe')](''),this[_0x3495('0x36')][_0x3495('0x39')]();}),_0x291782;}['_createToolbar'](){const _0x1cbc64=new _0x19565f(this[_0x3495('0x18')]);return _0x1cbc64[_0x3495('0x9')][_0x3495('0x28')]('isEnabled')['to'](this,'isEnabled',this,_0x3495('0x0'),this,_0x3495('0x32'),(_0x331aec,_0x38859a,_0x18f874)=>_0x331aec&&!_0x38859a&&!!_0x18f874),_0x1cbc64[_0x3495('0x9')]['on'](_0x3495('0x44'),()=>{this['fire']('replaceContent',this[_0x3495('0x32')]);}),_0x1cbc64[_0x3495('0xc')][_0x3495('0x28')](_0x3495('0x3d'))['to'](this,_0x3495('0x3d'),this,_0x3495('0x0'),this,_0x3495('0x32'),(_0x2b0e8d,_0x3c6411,_0x22cec2)=>_0x2b0e8d&&!_0x3c6411&&!!_0x22cec2),_0x1cbc64[_0x3495('0xc')]['on']('execute',()=>{this['fire'](_0x3495('0x3'),this[_0x3495('0x32')]);}),_0x1cbc64[_0x3495('0x8')][_0x3495('0x28')](_0x3495('0x3d'))['to'](this,_0x3495('0x3d'),this,'isProcessing',(_0x27ef54,_0x56b40f)=>_0x27ef54&&!_0x56b40f),_0x1cbc64['tryAgainButton']['on'](_0x3495('0x44'),()=>{this[_0x3495('0x40')](_0x3495('0x45'));}),_0x1cbc64[_0x3495('0x14')][_0x3495('0x28')]('isEnabled')['to'](this,'isProcessing'),_0x1cbc64[_0x3495('0x14')]['on'](_0x3495('0x44'),()=>{this['fire'](_0x3495('0x15'));}),_0x1cbc64;}[_0x3495('0x16')](){this[_0x3495('0x32')]='',this[_0x3495('0x24')]=!0x1,this['isProcessing']=!0x0,this[_0x3495('0x19')][_0x3495('0x1c')]=!0x0,this['toolbar'][_0x3495('0x1c')]=!0x0,this[_0x3495('0x19')][_0x3495('0x39')]();}[_0x3495('0x2a')](){const _0x3a2365=this[_0x3495('0x18')];this[_0x3495('0x0')]=!0x1,this['prompt']='',this[_0x3495('0x36')][_0x3495('0x10')](),this[_0x3495('0x32')]&&(this['promptView'][_0x3495('0x20')][_0x3495('0x34')]=_0x28898e(_0x3a2365,_0x3495('0x3e')));}['handleError'](_0x2a1cef){const _0x51d546=this['locale'];this[_0x3495('0x2a')](),this[_0x3495('0x24')]=!0x0,this[_0x3495('0x22')][_0x3495('0x37')]=_0x2a1cef||_0x28898e(_0x51d546,'AI_ERROR_FAILED'),this[_0x3495('0x32')]||(this[_0x3495('0x19')]['isVisible']=!0x1);}}
23
+ const _0x88d0=['forwardCycle','submitPrompt','contentArea','AI\x20Assistant','tryAgainButton','tryAgainEvent','stopProcessing','errorView','high','label','focus','text','isVisible','toolbar','historyGroupView','set','shift\x20+\x20tab','Ask\x20AI\x20to\x20edit\x20or\x20generate','_createToolbar','prompt','add','execute','copyButtonView','_focusables','focusCycler','locale','setTemplate','_createHistoryView','trim','tab','_promptHistory','isError','stopButton','value','_createPromptView','reset','fieldView','header','promptView','items','focusTracker','backwardCycle','ck-ai-form','div','Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.','handleError','focusPrevious','replaceContent','queryView','_focusCycler','bind','finishProcessing','render','fire','element','listenTo','stop','createCollection','isEnabled','keystrokes','focusNext','bindTemplate','AI_ERROR_FAILED','isProcessing','search','replaceButton'];(function(_0x171bfc,_0x88d059){const _0x3f0274=function(_0x4bb913){while(--_0x4bb913){_0x171bfc['push'](_0x171bfc['shift']());}};_0x3f0274(++_0x88d059);}(_0x88d0,0xc5));const _0x3f02=function(_0x171bfc,_0x88d059){_0x171bfc=_0x171bfc-0x0;let _0x3f0274=_0x88d0[_0x171bfc];return _0x3f0274;};import{FocusTracker as _0x2d47ab,KeystrokeHandler as _0x336ab3}from'ckeditor5/src/utils';import{View as _0x2e2f1a,FocusCycler as _0x470f3f,createLabeledTextarea as _0x1fc42d,FormHeaderView as _0x20630e}from'ckeditor5/src/ui';import _0x143a97 from'./aiformtoolbarview';import _0x3aef2c from'./aiformcontentarea';import _0x257411 from'./aiformerrorview';import _0x43b06e from'./aiformpromptview';import _0x2bfe01 from'./aihistorylistview';import _0x5d07f5 from'./aihistorylistitemview';import _0x3e196b from'./prompthistory';import{getTranslation as _0x2df8d5}from'../../utils/common-translations';import _0x4f3f10 from'../../../theme/icons/robot-pencil.svg';export default class g extends _0x2e2f1a{constructor(_0x409b08,_0x4301d5,_0x1f972c=''){super(_0x409b08),this[_0x3f02('0x10')]('isEnabled',!0x0),this[_0x3f02('0x10')](_0x3f02('0x40'),!0x1),this[_0x3f02('0x10')](_0x3f02('0x14'),''),this['set'](_0x3f02('0x22'),''),this[_0x3f02('0x10')](_0x3f02('0x20'),!0x1),this[_0x3f02('0x1f')]=new _0x3e196b(),this[_0x3f02('0x8')]=new _0x257411(_0x409b08),this['header']=new _0x20630e(_0x409b08,{'label':_0x2df8d5(_0x409b08,_0x3f02('0x4')),'icon':_0x4f3f10}),this['contentArea']=new _0x3aef2c(_0x409b08,_0x1f972c),this[_0x3f02('0x3')]['bind'](_0x3f02('0x40'))['to'](this),this['contentArea'][_0x3f02('0x33')]('value')['to'](this),this['toolbar']=this[_0x3f02('0x13')](),this[_0x3f02('0x27')]=this[_0x3f02('0x23')](),this[_0x3f02('0x29')]=new _0x2d47ab(),this['keystrokes']=new _0x336ab3(),this[_0x3f02('0x18')]=this[_0x3f02('0x3a')]([this[_0x3f02('0x3')],this[_0x3f02('0x3')]['copyButtonView'],this[_0x3f02('0xe')],this[_0x3f02('0x27')]]),this['_focusCycler']=new _0x470f3f({'focusables':this[_0x3f02('0x18')],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':_0x3f02('0x11'),'focusNext':_0x3f02('0x1e')}}),this[_0x3f02('0x27')]['focusCycler']['on'](_0x3f02('0x1'),_0x2ec354=>{this[_0x3f02('0x32')][_0x3f02('0x3d')](),_0x2ec354[_0x3f02('0x39')]();}),this['promptView'][_0x3f02('0x19')]['on'](_0x3f02('0x2a'),_0x1e3867=>{this[_0x3f02('0x32')][_0x3f02('0x2f')](),_0x1e3867[_0x3f02('0x39')]();}),this['promptView'][_0x3f02('0x31')][_0x3f02('0x25')]['bind'](_0x3f02('0x22'))['to'](this,_0x3f02('0x14'));const _0xe601de=this[_0x3f02('0x3e')];this[_0x3f02('0x1b')]({'tag':_0x3f02('0x2c'),'attributes':{'class':['ck',_0x3f02('0x2b'),_0x4301d5],'tabindex':'-1'},'children':[this[_0x3f02('0x26')],{'tag':_0x3f02('0x2c'),'attributes':{'class':['ck','ck-ai-form-content']},'children':[{'tag':'div','attributes':{'class':[_0xe601de['if'](_0x3f02('0x20'),'ck-hidden',_0x1dedb9=>!_0x1dedb9)]},'children':[this[_0x3f02('0x8')]]},this[_0x3f02('0x3')],this[_0x3f02('0xe')],this['promptView']]}]});}[_0x3f02('0x35')](){super[_0x3f02('0x35')](),this[_0x3f02('0x29')]['add'](this['contentArea'][_0x3f02('0x37')]),this[_0x3f02('0x29')][_0x3f02('0x15')](this[_0x3f02('0x3')][_0x3f02('0x17')]['element']),this['focusTracker'][_0x3f02('0x15')](this[_0x3f02('0xe')]['element']),this[_0x3f02('0x29')][_0x3f02('0x15')](this['promptView'][_0x3f02('0x37')]),this[_0x3f02('0x3c')][_0x3f02('0x38')](this[_0x3f02('0x37')]);}[_0x3f02('0xb')](){this[_0x3f02('0x32')]['focusFirst']();}[_0x3f02('0x24')](){this[_0x3f02('0x14')]='',this[_0x3f02('0x22')]='',this[_0x3f02('0x27')][_0x3f02('0x24')](),this[_0x3f02('0x3')][_0x3f02('0xd')]=!0x1,this[_0x3f02('0xe')][_0x3f02('0xd')]=!0x1;}['_createPromptView'](){const _0x5944ec=this[_0x3f02('0x1a')],_0x995574=new _0x43b06e(_0x5944ec,{'queryView':{'label':_0x2df8d5(_0x5944ec,_0x3f02('0x12')),'creator':_0x1fc42d,'showIcon':!0x1,'showResetButton':!0x1},'infoView':{'text':{'noSearchableItems':{'primary':_0x2df8d5(_0x5944ec,'Empty\x20history'),'secondary':_0x2df8d5(_0x5944ec,_0x3f02('0x2d'))}}},'filteredView':this[_0x3f02('0x1c')](),'queryMinChars':0x1/0x0,'resetOnBlur':!0x1});return _0x995574[_0x3f02('0x33')](_0x3f02('0x3b'))['to'](this,_0x3f02('0x3b'),this,_0x3f02('0x40'),(_0x39e033,_0x10c441)=>_0x39e033&&!_0x10c441),this[_0x3f02('0x38')](_0x995574,'submit',(_0x9e86be,_0x29bd20)=>{this['prompt']=_0x29bd20,this[_0x3f02('0x36')](_0x3f02('0x2'),this[_0x3f02('0x14')]),_0x29bd20[_0x3f02('0x1d')]()&&this[_0x3f02('0x1f')][_0x3f02('0x15')]({'prompt':_0x29bd20[_0x3f02('0x1d')]()},0x0);},{'priority':_0x3f02('0x9')}),_0x995574;}['_createHistoryView'](){const _0x6f2342=new _0x2bfe01(this['locale']);return _0x6f2342[_0x3f02('0xf')][_0x3f02('0x28')]['bindTo'](this['_promptHistory'])['as'](_0x5d07f5),_0x6f2342['on']('clearHistory',()=>{this[_0x3f02('0x1f')]['clear'](),this[_0x3f02('0x27')][_0x3f02('0x41')](''),this[_0x3f02('0x27')][_0x3f02('0xb')]();}),_0x6f2342;}[_0x3f02('0x13')](){const _0xcd7705=new _0x143a97(this[_0x3f02('0x1a')]);return _0xcd7705[_0x3f02('0x0')][_0x3f02('0x33')](_0x3f02('0x3b'))['to'](this,_0x3f02('0x3b'),this,_0x3f02('0x40'),this,'value',(_0x1260d7,_0x3d251e,_0x532b7a)=>_0x1260d7&&!_0x3d251e&&!!_0x532b7a),_0xcd7705[_0x3f02('0x0')]['on'](_0x3f02('0x16'),()=>{this[_0x3f02('0x36')](_0x3f02('0x30'),this[_0x3f02('0x22')]);}),_0xcd7705['insertButton'][_0x3f02('0x33')](_0x3f02('0x3b'))['to'](this,_0x3f02('0x3b'),this,_0x3f02('0x40'),this,'value',(_0x57e0d2,_0xcb45bc,_0x2ca85e)=>_0x57e0d2&&!_0xcb45bc&&!!_0x2ca85e),_0xcd7705['insertButton']['on']('execute',()=>{this[_0x3f02('0x36')]('insertContentBelow',this[_0x3f02('0x22')]);}),_0xcd7705[_0x3f02('0x5')][_0x3f02('0x33')]('isEnabled')['to'](this,'isEnabled',this,_0x3f02('0x40'),(_0x177f73,_0x266063)=>_0x177f73&&!_0x266063),_0xcd7705[_0x3f02('0x5')]['on'](_0x3f02('0x16'),()=>{this[_0x3f02('0x36')](_0x3f02('0x6'));}),_0xcd7705[_0x3f02('0x21')][_0x3f02('0x33')](_0x3f02('0x3b'))['to'](this,_0x3f02('0x40')),_0xcd7705[_0x3f02('0x21')]['on']('execute',()=>{this[_0x3f02('0x36')](_0x3f02('0x7'));}),_0xcd7705;}['startProcessing'](){this[_0x3f02('0x22')]='',this['isError']=!0x1,this[_0x3f02('0x40')]=!0x0,this['contentArea'][_0x3f02('0xd')]=!0x0,this[_0x3f02('0xe')][_0x3f02('0xd')]=!0x0,this[_0x3f02('0x3')][_0x3f02('0xb')]();}[_0x3f02('0x34')](){const _0x322136=this[_0x3f02('0x1a')];this[_0x3f02('0x40')]=!0x1,this[_0x3f02('0x14')]='',this[_0x3f02('0x27')]['reset'](),this['value']&&(this[_0x3f02('0x27')][_0x3f02('0x31')][_0x3f02('0xa')]=_0x2df8d5(_0x322136,'Ask\x20AI\x20to\x20improve\x20generated\x20text'));}[_0x3f02('0x2e')](_0x305213){const _0x2c57b3=this['locale'];this['finishProcessing'](),this[_0x3f02('0x20')]=!0x0,this[_0x3f02('0x8')][_0x3f02('0xc')]=_0x305213||_0x2df8d5(_0x2c57b3,_0x3f02('0x3f')),this[_0x3f02('0x22')]||(this[_0x3f02('0x3')][_0x3f02('0xd')]=!0x1);}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x5c23=['fire','children','locale'];(function(_0x223042,_0x5c2300){const _0x5ef34e=function(_0xd0eb4d){while(--_0xd0eb4d){_0x223042['push'](_0x223042['shift']());}};_0x5ef34e(++_0x5c2300);}(_0x5c23,0xf3));const _0x5ef3=function(_0x223042,_0x5c2300){_0x223042=_0x223042-0x0;let _0x5ef34e=_0x5c23[_0x223042];return _0x5ef34e;};import{ListItemView as _0x4fd784,ButtonView as _0x16c350}from'ckeditor5/src/ui';import _0x1c547e from'../dropdown/buttonlabelwithhighlightview';import{unescape as _0x587866}from'lodash-es';export default class et extends _0x4fd784{constructor(_0x24e054){super();const _0x11730b=new _0x1c547e(),_0x1b1a4d=new _0x16c350(this[_0x5ef3('0x2')],_0x11730b);this[_0x5ef3('0x1')]['add'](_0x1b1a4d),_0x1b1a4d['set']({'label':_0x24e054['prompt'],'withText':!0x0}),_0x1b1a4d['on']('execute',()=>{this[_0x5ef3('0x0')]('execute',{'value':_0x587866(_0x24e054['prompt'])});});}}
23
+ const _0x5701=['set','fire','locale','execute','prompt','add','children'];(function(_0x305311,_0x570140){const _0x44f801=function(_0x23a2f1){while(--_0x23a2f1){_0x305311['push'](_0x305311['shift']());}};_0x44f801(++_0x570140);}(_0x5701,0x70));const _0x44f8=function(_0x305311,_0x570140){_0x305311=_0x305311-0x0;let _0x44f801=_0x5701[_0x305311];return _0x44f801;};import{ListItemView as _0x48278e,ButtonView as _0x22dbbc}from'ckeditor5/src/ui';import _0x5cd01e from'../dropdown/buttonlabelwithhighlightview';import{unescape as _0x40adb0}from'lodash-es';export default class et extends _0x48278e{constructor(_0x287ce5){super();const _0xdb8b51=new _0x5cd01e(),_0x176d96=new _0x22dbbc(this[_0x44f8('0x2')],_0xdb8b51);this[_0x44f8('0x6')][_0x44f8('0x5')](_0x176d96),_0x176d96[_0x44f8('0x0')]({'label':_0x287ce5['prompt'],'withText':!0x0}),_0x176d96['on'](_0x44f8('0x3'),()=>{this[_0x44f8('0x1')](_0x44f8('0x3'),{'value':_0x40adb0(_0x287ce5[_0x44f8('0x4')])});});}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x1b4b=['filter','locale','children','clearHistoryButton','delegate','set','fire','label','historyGroupView','execute','clearHistory','_createClearHistoryButton','length','add'];(function(_0x39c0a0,_0x1b4b80){const _0x5333d1=function(_0x334194){while(--_0x334194){_0x39c0a0['push'](_0x39c0a0['shift']());}};_0x5333d1(++_0x1b4b80);}(_0x1b4b,0x156));const _0x5333=function(_0x39c0a0,_0x1b4b80){_0x39c0a0=_0x39c0a0-0x0;let _0x5333d1=_0x1b4b[_0x39c0a0];return _0x5333d1;};import{ListView as _0x4dbe5b,ListItemGroupView as _0x1b087b,ButtonView as _0x3779cf}from'ckeditor5/src/ui';import{getTranslation as _0x226aa4}from'../../utils/common-translations';export default class it extends _0x4dbe5b{constructor(_0x2ae534){super(_0x2ae534),this[_0x5333('0xb')]=this['_createClearHistoryButton'](),this[_0x5333('0x2')]=new _0x1b087b(),this['historyGroupView'][_0x5333('0xa')][_0x5333('0x7')](this['clearHistoryButton'],0x1),this['historyGroupView'][_0x5333('0x1')]=_0x226aa4(_0x2ae534,'Prompt\x20history'),this['historyGroupView']['items'][_0x5333('0xc')](_0x5333('0x3'))['to'](this),this['items'][_0x5333('0x7')](this[_0x5333('0x2')]);}[_0x5333('0x8')](){let _0x332516=0x0;for(const _0x40f27e of this['items'])_0x332516+=_0x40f27e['items'][_0x5333('0x6')];return{'resultsCount':_0x332516,'totalItemsCount':_0x332516};}[_0x5333('0x5')](){const _0x4c9d56=this[_0x5333('0x9')],_0x93c445=new _0x3779cf(this['locale']);return _0x93c445[_0x5333('0xd')]({'label':'('+_0x226aa4(_0x4c9d56,'Clear')+')','withText':!0x0}),_0x93c445['on'](_0x5333('0x3'),()=>this[_0x5333('0x0')](_0x5333('0x4'))),_0x93c445;}}
23
+ const _0x4d8d=['clearHistoryButton','_createClearHistoryButton','Prompt\x20history','items','label','delegate','add','historyGroupView','set','locale','fire','length','Clear','children','execute','clearHistory'];(function(_0x4c1aa9,_0x4d8d7b){const _0x39dfb=function(_0xbabbf9){while(--_0xbabbf9){_0x4c1aa9['push'](_0x4c1aa9['shift']());}};_0x39dfb(++_0x4d8d7b);}(_0x4d8d,0x77));const _0x39df=function(_0x4c1aa9,_0x4d8d7b){_0x4c1aa9=_0x4c1aa9-0x0;let _0x39dfb=_0x4d8d[_0x4c1aa9];return _0x39dfb;};import{ListView as _0xb90ba3,ListItemGroupView as _0x27f5d9,ButtonView as _0x2ac1e0}from'ckeditor5/src/ui';import{getTranslation as _0x4177db}from'../../utils/common-translations';export default class it extends _0xb90ba3{constructor(_0x84f2f0){super(_0x84f2f0),this[_0x39df('0x9')]=this[_0x39df('0xa')](),this[_0x39df('0x0')]=new _0x27f5d9(),this[_0x39df('0x0')][_0x39df('0x6')][_0x39df('0xf')](this[_0x39df('0x9')],0x1),this[_0x39df('0x0')][_0x39df('0xd')]=_0x4177db(_0x84f2f0,_0x39df('0xb')),this[_0x39df('0x0')][_0x39df('0xc')][_0x39df('0xe')](_0x39df('0x7'))['to'](this),this[_0x39df('0xc')][_0x39df('0xf')](this[_0x39df('0x0')]);}['filter'](){let _0x75c126=0x0;for(const _0xc51aa7 of this['items'])_0x75c126+=_0xc51aa7[_0x39df('0xc')][_0x39df('0x4')];return{'resultsCount':_0x75c126,'totalItemsCount':_0x75c126};}[_0x39df('0xa')](){const _0x51c235=this[_0x39df('0x2')],_0x26dae7=new _0x2ac1e0(this[_0x39df('0x2')]);return _0x26dae7[_0x39df('0x1')]({'label':'('+_0x4177db(_0x51c235,_0x39df('0x5'))+')','withText':!0x0}),_0x26dae7['on'](_0x39df('0x7'),()=>this[_0x39df('0x3')](_0x39df('0x8'))),_0x26dae7;}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x25bf=['_loadFromSessionStorage','remove','toLowerCase','map','prompt','CKEditor/AIFormView/PromptHistory','add','last','length','addMany','_saveToSessionStorage'];(function(_0x14e1c8,_0x25bfb4){const _0x1dd349=function(_0x37481c){while(--_0x37481c){_0x14e1c8['push'](_0x14e1c8['shift']());}};_0x1dd349(++_0x25bfb4);}(_0x25bf,0xbb));const _0x1dd3=function(_0x14e1c8,_0x25bfb4){_0x14e1c8=_0x14e1c8-0x0;let _0x1dd349=_0x25bf[_0x14e1c8];return _0x1dd349;};import{Collection as _0x570834}from'ckeditor5/src/utils';const ts=_0x1dd3('0x5');export default class rt extends _0x570834{constructor(){super(),this[_0x1dd3('0x0')](),this['on'](_0x1dd3('0x6'),(_0x22caa8,_0x36984d)=>{const _0x1be21b=os(_0x36984d[_0x1dd3('0x4')]);for(const _0x935f74 of this)if(_0x935f74!=_0x36984d&&os(_0x935f74['prompt'])===_0x1be21b){this['remove'](_0x935f74);break;}this[_0x1dd3('0x8')]>0x14&&this[_0x1dd3('0x1')](this[_0x1dd3('0x7')]),this[_0x1dd3('0xa')]();}),this['on'](_0x1dd3('0x1'),()=>{this[_0x1dd3('0xa')]();});}['_loadFromSessionStorage'](){const _0x18247e=sessionStorage['getItem'](ts)||'[]';this[_0x1dd3('0x9')](JSON['parse'](_0x18247e));}['_saveToSessionStorage'](){sessionStorage['setItem'](ts,JSON['stringify'](this[_0x1dd3('0x3')](_0x2df091=>_0x2df091)));}}function os(_0xc2a4dc){return _0xc2a4dc[_0x1dd3('0x2')]()['trim']();}
23
+ const _0x242a=['getItem','CKEditor/AIFormView/PromptHistory','setItem','stringify','map','parse','length','toLowerCase','last','remove','add','prompt','_loadFromSessionStorage','trim','_saveToSessionStorage'];(function(_0x4a29b1,_0x242ad5){const _0x50e878=function(_0x3bfe1b){while(--_0x3bfe1b){_0x4a29b1['push'](_0x4a29b1['shift']());}};_0x50e878(++_0x242ad5);}(_0x242a,0x19b));const _0x50e8=function(_0x4a29b1,_0x242ad5){_0x4a29b1=_0x4a29b1-0x0;let _0x50e878=_0x242a[_0x4a29b1];return _0x50e878;};import{Collection as _0x2479a6}from'ckeditor5/src/utils';const ts=_0x50e8('0xa');export default class rt extends _0x2479a6{constructor(){super(),this[_0x50e8('0x6')](),this['on'](_0x50e8('0x4'),(_0x15e7fd,_0xaa078)=>{const _0x36da25=os(_0xaa078[_0x50e8('0x5')]);for(const _0x951389 of this)if(_0x951389!=_0xaa078&&os(_0x951389[_0x50e8('0x5')])===_0x36da25){this[_0x50e8('0x3')](_0x951389);break;}this[_0x50e8('0x0')]>0x14&&this[_0x50e8('0x3')](this[_0x50e8('0x2')]),this[_0x50e8('0x8')]();}),this['on'](_0x50e8('0x3'),()=>{this[_0x50e8('0x8')]();});}[_0x50e8('0x6')](){const _0x5d6630=sessionStorage[_0x50e8('0x9')](ts)||'[]';this['addMany'](JSON[_0x50e8('0xe')](_0x5d6630));}[_0x50e8('0x8')](){sessionStorage[_0x50e8('0xb')](ts,JSON[_0x50e8('0xc')](this[_0x50e8('0xd')](_0x440cf8=>_0x440cf8)));}}function os(_0x246266){return _0x246266[_0x50e8('0x1')]()[_0x50e8('0x7')]();}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x447b=['document','showUI','model','getItems','aiAssistant.disabledElements','execute','includes','refresh','config','name','selection','get','editor'];(function(_0x18f798,_0x447b41){const _0x23864d=function(_0x151e16){while(--_0x151e16){_0x18f798['push'](_0x18f798['shift']());}};_0x23864d(++_0x447b41);}(_0x447b,0xcc));const _0x2386=function(_0x18f798,_0x447b41){_0x18f798=_0x18f798-0x0;let _0x23864d=_0x447b[_0x18f798];return _0x23864d;};import{Command as _0x2fe45b}from'ckeditor5/src/core';import _0xfe729f from'../aiassistantui';export default class A extends _0x2fe45b{[_0x2386('0xb')](){const _0x1e307f=this['editor'][_0x2386('0x6')][_0x2386('0x4')][_0x2386('0x1')],_0x1ee83c=this['editor'][_0x2386('0xc')]['get'](_0x2386('0x8'));for(const _0x2ad495 of _0x1e307f['getRanges']())for(const _0x34bc56 of _0x2ad495[_0x2386('0x7')]())if(_0x34bc56['is']('element')&&_0x1ee83c[_0x2386('0xa')](_0x34bc56[_0x2386('0x0')]))return void(this['isEnabled']=!0x1);this['isEnabled']=!0x0;}[_0x2386('0x9')](_0x501671='',_0x1ba1be=''){this[_0x2386('0x3')]['plugins'][_0x2386('0x2')](_0xfe729f)[_0x2386('0x5')](_0x501671,_0x1ba1be);}}
23
+ const _0x45a7=['refresh','selection','getRanges','document','isEnabled','get','includes','name','editor','getItems','element','execute'];(function(_0x1c73dd,_0x45a719){const _0x56871=function(_0x4c8318){while(--_0x4c8318){_0x1c73dd['push'](_0x1c73dd['shift']());}};_0x56871(++_0x45a719);}(_0x45a7,0xdb));const _0x5687=function(_0x1c73dd,_0x45a719){_0x1c73dd=_0x1c73dd-0x0;let _0x56871=_0x45a7[_0x1c73dd];return _0x56871;};import{Command as _0x5cb8e1}from'ckeditor5/src/core';import _0x31f8c7 from'../aiassistantui';export default class A extends _0x5cb8e1{[_0x5687('0x9')](){const _0x2f7c92=this['editor']['model'][_0x5687('0x0')][_0x5687('0xa')],_0x3264c4=this[_0x5687('0x5')]['config'][_0x5687('0x2')]('aiAssistant.disabledElements');for(const _0x59ab8a of _0x2f7c92[_0x5687('0xb')]())for(const _0x141cd9 of _0x59ab8a[_0x5687('0x6')]())if(_0x141cd9['is'](_0x5687('0x7'))&&_0x3264c4[_0x5687('0x3')](_0x141cd9[_0x5687('0x4')]))return void(this[_0x5687('0x1')]=!0x1);this[_0x5687('0x1')]=!0x0;}[_0x5687('0x8')](_0x5c549b='',_0x41ef6b=''){this[_0x5687('0x5')]['plugins'][_0x5687('0x2')](_0x31f8c7)['showUI'](_0x5c549b,_0x41ef6b);}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- export function getTranslation(_0x32d646,_0x38aed3,_0x3dd74a){const t=_0x32d646['t'];switch(_0x38aed3){case'Edit\x20or\x20review':return t('Edit\x20or\x20review');case'Improve\x20writing':return t('Improve\x20writing');case'Make\x20shorter':return t('Make\x20shorter');case'Make\x20longer':return t('Make\x20longer');case'Simplify\x20language':return t('Simplify\x20language');case'Generate\x20from\x20selection':return t('Generate\x20from\x20selection');case'Summarize':return t('Summarize');case'Continue':return t('Continue');case'Change\x20tone':return t('Change\x20tone');case'Professional':return t('Professional');case'Casual':return t('Casual');case'Direct':return t('Direct');case'Confident':return t('Confident');case'Friendly':return t('Friendly');case'Change\x20style':return t('Change\x20style');case'Business':return t('Business');case'Legal':return t('Legal');case'Journalism':return t('Journalism');case'Poetic':return t('Poetic');case'Translate':return t('Translate');case'Translate\x20to\x20%0':return t('Translate\x20to\x20%0',_0x3dd74a);case'English':return t('English');case'Spanish':return t('Spanish');case'German':return t('German');case'Portuguese':return t('Portuguese');case'French':return t('French');case'Simplified\x20Chinese':return t('Simplified\x20Chinese');case'Hindi':return t('Hindi');case'Arabic':return t('Arabic');case'AI\x20Assistant':return t('AI\x20Assistant');case'AI\x20Commands':return t('AI\x20Commands');case'Ask\x20AI\x20to\x20edit\x20or\x20generate':return t('Ask\x20AI\x20to\x20edit\x20or\x20generate');case'Ask\x20AI\x20to\x20improve\x20generated\x20text':return t('Ask\x20AI\x20to\x20improve\x20generated\x20text');case'Copy':return t('Copy');case'Submit':return t('Submit');case'Insert\x20below':return t('Insert\x20below');case'Try\x20again':return t('Try\x20again');case'Stop':return t('Stop');case'AI\x20is\x20writing...':return t('AI\x20is\x20writing...');case'History':return t('History');case'Empty\x20history':return t('Empty\x20history');case'Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.':return t('Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.');case'Prompt\x20history':return t('Prompt\x20history');case'Search\x20AI\x20command':return t('Search\x20AI\x20command');case'No\x20commands\x20found':return t('No\x20commands\x20found');case'No\x20commands\x20available':return t('No\x20commands\x20available');case'Clear':return t('Clear');case'AI_REPLACE_CONTENT':return t({'id':'AI_REPLACE_CONTENT','string':'Replace'});case'AI_ERROR_AUTH_REQUEST':return t({'id':'AI_ERROR_AUTH_REQUEST','string':'Authorization\x20request\x20failed'});case'AI_ERROR_CONTEXT_LENGTH':return t({'id':'AI_ERROR_CONTEXT_LENGTH','string':'Selected\x20content\x20is\x20too\x20long'});case'AI_ERROR_MODERATION':return t({'id':'AI_ERROR_MODERATION','string':'Requested\x20query\x20does\x20not\x20pass\x20moderation\x20rules'});case'AI_ERROR_FAILED':return t({'id':'AI_ERROR_FAILED','string':'Failed\x20to\x20communicate\x20with\x20the\x20AI\x20service'});default:return _0x38aed3;}}
23
+ export function getTranslation(_0x5d76ab,_0xbfabf1,_0x11e408){const t=_0x5d76ab['t'];switch(_0xbfabf1){case'Edit\x20or\x20review':return t('Edit\x20or\x20review');case'Improve\x20writing':return t('Improve\x20writing');case'Make\x20shorter':return t('Make\x20shorter');case'Make\x20longer':return t('Make\x20longer');case'Simplify\x20language':return t('Simplify\x20language');case'Generate\x20from\x20selection':return t('Generate\x20from\x20selection');case'Summarize':return t('Summarize');case'Continue':return t('Continue');case'Change\x20tone':return t('Change\x20tone');case'Professional':return t('Professional');case'Casual':return t('Casual');case'Direct':return t('Direct');case'Confident':return t('Confident');case'Friendly':return t('Friendly');case'Change\x20style':return t('Change\x20style');case'Business':return t('Business');case'Legal':return t('Legal');case'Journalism':return t('Journalism');case'Poetic':return t('Poetic');case'Translate':return t('Translate');case'Translate\x20to\x20%0':return t('Translate\x20to\x20%0',_0x11e408);case'English':return t('English');case'Spanish':return t('Spanish');case'German':return t('German');case'Portuguese':return t('Portuguese');case'French':return t('French');case'Simplified\x20Chinese':return t('Simplified\x20Chinese');case'Hindi':return t('Hindi');case'Arabic':return t('Arabic');case'AI\x20Assistant':return t('AI\x20Assistant');case'AI\x20Commands':return t('AI\x20Commands');case'Ask\x20AI\x20to\x20edit\x20or\x20generate':return t('Ask\x20AI\x20to\x20edit\x20or\x20generate');case'Ask\x20AI\x20to\x20improve\x20generated\x20text':return t('Ask\x20AI\x20to\x20improve\x20generated\x20text');case'Copy':return t('Copy');case'Submit':return t('Submit');case'Insert\x20below':return t('Insert\x20below');case'Try\x20again':return t('Try\x20again');case'Stop':return t('Stop');case'AI\x20is\x20writing...':return t('AI\x20is\x20writing...');case'History':return t('History');case'Empty\x20history':return t('Empty\x20history');case'Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.':return t('Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.');case'Prompt\x20history':return t('Prompt\x20history');case'Search\x20AI\x20command':return t('Search\x20AI\x20command');case'No\x20commands\x20found':return t('No\x20commands\x20found');case'No\x20commands\x20available':return t('No\x20commands\x20available');case'Clear':return t('Clear');case'AI_REPLACE_CONTENT':return t({'id':'AI_REPLACE_CONTENT','string':'Replace'});case'AI_ERROR_AUTH_REQUEST':return t({'id':'AI_ERROR_AUTH_REQUEST','string':'Authorization\x20request\x20failed'});case'AI_ERROR_CONTEXT_LENGTH':return t({'id':'AI_ERROR_CONTEXT_LENGTH','string':'Selected\x20content\x20is\x20too\x20long'});case'AI_ERROR_MODERATION':return t({'id':'AI_ERROR_MODERATION','string':'Requested\x20query\x20does\x20not\x20pass\x20moderation\x20rules'});case'AI_ERROR_FAILED':return t({'id':'AI_ERROR_FAILED','string':'Failed\x20to\x20communicate\x20with\x20the\x20AI\x20service'});default:return _0xbfabf1;}}