@ckeditor/ckeditor5-ai 0.0.0-nightly-20231011.0 → 0.0.0-nightly-20231013.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 _0xca40=['abort','value','previousContext','finishProcessing','initialContext','_handlePrompt','startProcessing','view','stopProcessing','stopListening','prompt','processPrompt','destroy','bind','updateView','connector','previousPrompt','isRendered','listenTo','isProcessing','reset','currentContext','submitPrompt','handleError','_updateValue','set','once'];(function(_0x2573d4,_0xca4048){const _0xca7d89=function(_0x228621){while(--_0x228621){_0x2573d4['push'](_0x2573d4['shift']());}};_0xca7d89(++_0xca4048);}(_0xca40,0x101));const _0xca7d=function(_0x2573d4,_0xca4048){_0x2573d4=_0x2573d4-0x0;let _0xca7d89=_0xca40[_0x2573d4];return _0xca7d89;};import{ObservableMixin as _0x2694d8}from'ckeditor5/src/utils';import{AIRequestError as _0x563e8a}from'../aiconnector';export default class I extends _0x2694d8(){constructor(_0x52a32a,_0x30dd63){super(),this[_0xca7d('0x1')]=_0x52a32a,this['view']=_0x30dd63,this[_0xca7d('0xb')]({'initialContext':'','currentContext':'','previousContext':void 0x0,'previousPrompt':void 0x0,'isProcessing':!0x1}),this[_0xca7d('0x14')][_0xca7d('0x1a')](_0xca7d('0xe'))['to'](this,_0xca7d('0x7')),this[_0xca7d('0x4')](this[_0xca7d('0x14')],_0xca7d('0x8'),(_0x5d8a5a,_0x893031)=>{const _0x4d0d57=this['currentContext']||this[_0xca7d('0x11')];this[_0xca7d('0x12')](_0x893031,_0x4d0d57);}),this[_0xca7d('0x4')](this['view'],'tryAgainEvent',()=>{this['_handlePrompt'](this[_0xca7d('0x2')],this[_0xca7d('0xf')]);}),this[_0xca7d('0x4')](this[_0xca7d('0x14')],_0xca7d('0x15'),()=>{this[_0xca7d('0x15')]();});}[_0xca7d('0x19')](){this[_0xca7d('0x16')]();}async[_0xca7d('0x0')](_0xe19bf7,_0x2cbb28,_0xde9020){this[_0xca7d('0x14')][_0xca7d('0x17')]=_0xde9020,this[_0xca7d('0x11')]=_0x2cbb28,_0xe19bf7&&(this[_0xca7d('0x14')][_0xca7d('0x3')]?this[_0xca7d('0x12')](_0xe19bf7,_0x2cbb28):this['view'][_0xca7d('0xc')]('render',()=>{this['_handlePrompt'](_0xe19bf7,_0x2cbb28);}));}[_0xca7d('0x15')](){this[_0xca7d('0x5')]&&(this[_0xca7d('0x5')]=!0x1,this['view'][_0xca7d('0x10')](),this[_0xca7d('0x1')][_0xca7d('0xd')]());}[_0xca7d('0x6')](){this[_0xca7d('0x11')]='',this[_0xca7d('0x7')]='',this[_0xca7d('0xf')]='',this[_0xca7d('0x2')]='',this[_0xca7d('0x14')]['reset'](),this[_0xca7d('0x15')]();}async[_0xca7d('0x12')](_0x1c7d6a,_0x334c4b){return this[_0xca7d('0x5')]=!0x0,this[_0xca7d('0x14')][_0xca7d('0x13')](),this['previousPrompt']=_0x1c7d6a,this['previousContext']=_0x334c4b,new Promise(_0x9df909=>{this[_0xca7d('0x1')][_0xca7d('0x18')](_0x1c7d6a,_0x334c4b,_0x562571=>this[_0xca7d('0xa')](_0x562571))['catch'](_0x130b8d=>{_0x130b8d instanceof _0x563e8a?this['view'][_0xca7d('0x9')](_0x130b8d['message']):this[_0xca7d('0x14')]['handleError'](),_0x9df909();})['finally'](()=>{this['stopProcessing'](),_0x9df909();});});}[_0xca7d('0xa')](_0x722569){this[_0xca7d('0x7')]=''+_0x722569;}}
23
+ const _0x2478=['currentContext','once','stopProcessing','previousContext','previousPrompt','value','reset','initialContext','tryAgainEvent','render','_handlePrompt','updateView','prompt','set','processPrompt','stopListening','previousLabel','view','bind','isProcessing','listenTo','finally','catch','abort','connector'];(function(_0x1b975a,_0x2478e7){const _0x16de34=function(_0x29b04d){while(--_0x29b04d){_0x1b975a['push'](_0x1b975a['shift']());}};_0x16de34(++_0x2478e7);}(_0x2478,0xd7));const _0x16de=function(_0x1b975a,_0x2478e7){_0x1b975a=_0x1b975a-0x0;let _0x16de34=_0x2478[_0x1b975a];return _0x16de34;};import{ObservableMixin as _0x52ec58}from'ckeditor5/src/utils';import{AIRequestError as _0x3eeb28}from'../aiconnector';export default class I extends _0x52ec58(){constructor(_0x23ad03,_0x41b829){super(),this[_0x16de('0x9')]=_0x23ad03,this[_0x16de('0x2')]=_0x41b829,this[_0x16de('0x17')]({'initialContext':'','currentContext':'','previousContext':void 0x0,'previousPrompt':void 0x0,'previousLabel':void 0x0,'isProcessing':!0x1}),this[_0x16de('0x2')][_0x16de('0x3')](_0x16de('0xf'))['to'](this,'currentContext'),this[_0x16de('0x5')](this[_0x16de('0x2')],'submitPrompt',(_0x25bd56,_0x488160)=>{const _0x577b62=this[_0x16de('0xa')]||this['initialContext'];this[_0x16de('0x14')](_0x488160,_0x577b62);}),this[_0x16de('0x5')](this[_0x16de('0x2')],_0x16de('0x12'),()=>{this[_0x16de('0x2')][_0x16de('0x16')]=this['previousLabel'],this['_handlePrompt'](this[_0x16de('0xe')],this[_0x16de('0xd')],this[_0x16de('0x1')]);}),this[_0x16de('0x5')](this['view'],'stopProcessing',()=>{this[_0x16de('0xc')]();});}['destroy'](){this[_0x16de('0x0')]();}async[_0x16de('0x15')](_0x5253ab,_0x49a27d,_0x17cff1){this[_0x16de('0x2')][_0x16de('0x16')]=_0x17cff1,this[_0x16de('0x11')]=_0x49a27d,_0x5253ab&&(this[_0x16de('0x2')]['isRendered']?this[_0x16de('0x14')](_0x5253ab,_0x49a27d,_0x17cff1):this['view'][_0x16de('0xb')](_0x16de('0x13'),()=>{this[_0x16de('0x14')](_0x5253ab,_0x49a27d,_0x17cff1);}));}[_0x16de('0xc')](){this[_0x16de('0x4')]&&(this[_0x16de('0x4')]=!0x1,this[_0x16de('0x2')]['finishProcessing'](),this[_0x16de('0x9')][_0x16de('0x8')]());}['reset'](){this['initialContext']='',this[_0x16de('0xa')]='',this[_0x16de('0xd')]='',this['previousPrompt']='',this[_0x16de('0x1')]='',this['view'][_0x16de('0x10')](),this[_0x16de('0xc')]();}async['_handlePrompt'](_0x2c89f6,_0x7d846f,_0x544913){return this[_0x16de('0x4')]=!0x0,this['view']['startProcessing'](),this[_0x16de('0xd')]=_0x7d846f,this[_0x16de('0xe')]=_0x2c89f6,this[_0x16de('0x1')]=_0x544913||_0x2c89f6,new Promise(_0x28fdd2=>{this[_0x16de('0x9')][_0x16de('0x18')](_0x2c89f6,_0x7d846f,_0x4f74e4=>this['_updateValue'](_0x4f74e4))[_0x16de('0x7')](_0x2d7914=>{_0x2d7914 instanceof _0x3eeb28?this[_0x16de('0x2')]['handleError'](_0x2d7914['message']):this[_0x16de('0x2')]['handleError'](),_0x28fdd2();})[_0x16de('0x6')](()=>{this['stopProcessing'](),_0x28fdd2();});});}['_updateValue'](_0x7f8c21){this[_0x16de('0xa')]=''+_0x7f8c21;}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x2b5e=['highlightText','isVisible','items','label','labelView','first','filter','length'];(function(_0x149033,_0x2b5ef5){const _0x3b94b6=function(_0x494b2e){while(--_0x494b2e){_0x149033['push'](_0x149033['shift']());}};_0x3b94b6(++_0x2b5ef5);}(_0x2b5e,0xba));const _0x3b94=function(_0x149033,_0x2b5ef5){_0x149033=_0x149033-0x0;let _0x3b94b6=_0x2b5e[_0x149033];return _0x3b94b6;};import{ListView as _0x5c8bc4}from'ckeditor5/src/ui';export default class y extends _0x5c8bc4{[_0x3b94('0x4')](_0x357b9a){let _0xc8bc88=0x0,_0x1b678c=0x0;for(const _0x2b2569 of this['items']){const _0xd4a8df=_0x2b2569;for(const _0xc5b86 of _0xd4a8df[_0x3b94('0x0')]){const _0x47d162=_0xc5b86['children'][_0x3b94('0x3')],_0x426847=_0x47d162[_0x3b94('0x2')];_0x357b9a?(_0xc5b86[_0x3b94('0x7')]=!!_0x47d162[_0x3b94('0x1')]['match'](_0x357b9a),_0xc5b86[_0x3b94('0x7')]&&(_0x426847[_0x3b94('0x6')](_0x357b9a),_0x1b678c++)):(_0xc5b86[_0x3b94('0x7')]=!0x0,_0x426847['highlightText'](null),_0x1b678c++),_0xc8bc88++;}_0xd4a8df[_0x3b94('0x7')]=!!_0xd4a8df[_0x3b94('0x0')]['filter'](_0x4a06f8=>_0x4a06f8['isVisible'])[_0x3b94('0x5')];}return{'resultsCount':_0x1b678c,'totalItemsCount':_0xc8bc88};}}
23
+ const _0x4b07=['highlightText','match','items','length','label','first','filter','isVisible'];(function(_0x27c649,_0x4b07c8){const _0x34288d=function(_0x42f8d9){while(--_0x42f8d9){_0x27c649['push'](_0x27c649['shift']());}};_0x34288d(++_0x4b07c8);}(_0x4b07,0x10b));const _0x3428=function(_0x27c649,_0x4b07c8){_0x27c649=_0x27c649-0x0;let _0x34288d=_0x4b07[_0x27c649];return _0x34288d;};import{ListView as _0x10e556}from'ckeditor5/src/ui';export default class y extends _0x10e556{['filter'](_0x49850c){let _0xf19ef7=0x0,_0x381089=0x0;for(const _0x36359d of this['items']){const _0x533df8=_0x36359d;for(const _0x1d05ff of _0x533df8[_0x3428('0x7')]){const _0x24952a=_0x1d05ff['children'][_0x3428('0x2')],_0x5e7847=_0x24952a['labelView'];_0x49850c?(_0x1d05ff[_0x3428('0x4')]=!!_0x24952a[_0x3428('0x1')][_0x3428('0x6')](_0x49850c),_0x1d05ff[_0x3428('0x4')]&&(_0x5e7847['highlightText'](_0x49850c),_0x381089++)):(_0x1d05ff[_0x3428('0x4')]=!0x0,_0x5e7847[_0x3428('0x5')](null),_0x381089++),_0xf19ef7++;}_0x533df8[_0x3428('0x4')]=!!_0x533df8[_0x3428('0x7')][_0x3428('0x3')](_0x47f2a6=>_0x47f2a6[_0x3428('0x4')])[_0x3428('0x0')];}return{'resultsCount':_0x381089,'totalItemsCount':_0xf19ef7};}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x2085=['style','extendTemplate','ck-button__label'];(function(_0x401cbf,_0x208553){const _0xc1276d=function(_0x1f0a69){while(--_0x1f0a69){_0x401cbf['push'](_0x401cbf['shift']());}};_0xc1276d(++_0x208553);}(_0x2085,0x171));const _0xc127=function(_0x401cbf,_0x208553){_0x401cbf=_0x401cbf-0x0;let _0xc1276d=_0x2085[_0x401cbf];return _0xc1276d;};import{HighlightedTextView as _0x17f3dc}from'ckeditor5/src/ui';export default class C extends _0x17f3dc{constructor(){super(),this['set']({'style':void 0x0,'text':void 0x0,'id':void 0x0});const _0x1a04c8=this['bindTemplate'];this[_0xc127('0x1')]({'attributes':{'class':[_0xc127('0x2')],'style':_0x1a04c8['to'](_0xc127('0x0')),'id':_0x1a04c8['to']('id')}});}}
23
+ const _0x162b=['ck-button__label','style','set','extendTemplate'];(function(_0xc5f224,_0x162bff){const _0x477cc1=function(_0x2cd903){while(--_0x2cd903){_0xc5f224['push'](_0xc5f224['shift']());}};_0x477cc1(++_0x162bff);}(_0x162b,0x97));const _0x477c=function(_0xc5f224,_0x162bff){_0xc5f224=_0xc5f224-0x0;let _0x477cc1=_0x162b[_0xc5f224];return _0x477cc1;};import{HighlightedTextView as _0x39b223}from'ckeditor5/src/ui';export default class C extends _0x39b223{constructor(){super(),this[_0x477c('0x3')]({'style':void 0x0,'text':void 0x0,'id':void 0x0});const _0x222572=this['bindTemplate'];this[_0x477c('0x0')]({'attributes':{'class':[_0x477c('0x1')],'style':_0x222572['to'](_0x477c('0x2')),'id':_0x222572['to']('id')}});}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0xd4bb=['loaderView','div','Copy','write','innerHTML','value','check','focus','ck-ai-form__content-area-wrapper','scrollTo','AI\x20is\x20writing...','selectNodeContents','body','ck-content','ck-ai-form__copy-button','isEnabled','class','\x20ck-ai-form__copy-button--copied','copyButtonView','ck-reset_all-excluded','querySelector','icon','ck-ai-form__copy-button-wrapper','render','addRange','textContent','copy','isVisible','scrollHeight','createRange','listenTo','setTemplate','isProcessing','wheel','ck-hidden','_createLoader','appendChild','absolute','remove','-9999px','locale','getSelection','style','_createCopyButton','element','execCommand','change:value','appendLoader','contentFieldView','bind','execute','removeAllRanges','mousedown','bindTemplate','set','setContent'];(function(_0x49d8fb,_0xd4bbf5){const _0x25fb41=function(_0x2279a8){while(--_0x2279a8){_0x49d8fb['push'](_0x49d8fb['shift']());}};_0x25fb41(++_0xd4bbf5);}(_0xd4bb,0x19a));const _0x25fb=function(_0x49d8fb,_0xd4bbf5){_0x49d8fb=_0x49d8fb-0x0;let _0x25fb41=_0xd4bb[_0x49d8fb];return _0x25fb41;};import{global as _0x4dafe4}from'ckeditor5/src/utils';import{View as _0x31f517,ButtonView as _0x298746,SpinnerView as _0x364a36}from'ckeditor5/src/ui';import _0x275ebb from'../../../theme/icons/copy.svg';import{getTranslation as _0x5e2e8b}from'../../utils/common-translations';import{icons as _0x6fe83c}from'ckeditor5/src/core';export default class M extends _0x31f517{constructor(_0x433ecb,_0x3f0599=''){super(_0x433ecb),this['set']({'value':null,'isVisible':!0x1,'isProcessing':!0x1});const _0x41808c=this[_0x25fb('0x23')];this[_0x25fb('0x1e')]=new ContentFieldView(_0x433ecb,_0x3f0599),this[_0x25fb('0x0')]=this[_0x25fb('0x19')](),this['setTemplate']({'tag':'div','attributes':{'class':['ck',_0x25fb('0x2e'),_0x41808c['if'](_0x25fb('0x9'),_0x25fb('0x10'),_0x34cba7=>!_0x34cba7)],'tabindex':'-1'},'children':[{'tag':_0x25fb('0x27'),'attributes':{'class':['ck','ck-ai-form__content-area',_0x41808c['if'](_0x25fb('0xe'),'ck-ai-form__content-area--processing')]},'children':[this[_0x25fb('0x1e')],{'tag':_0x25fb('0x27'),'attributes':{'class':['ck',_0x25fb('0x4')]},'children':[this[_0x25fb('0x0')]]}]}]});}[_0x25fb('0x5')](){super[_0x25fb('0x5')](),this['value']&&this[_0x25fb('0x1e')][_0x25fb('0x25')](this['value']);let _0x39a6e1=!0x1;this['on'](_0x25fb('0x1c'),(_0x452de9,_0x4b874f,_0x68a186)=>{const _0x2e04c1=!this[_0x25fb('0x1e')][_0x25fb('0x1a')][_0x25fb('0x2')]('.ck-ai-form__loader');this[_0x25fb('0x1e')][_0x25fb('0x25')](_0x68a186),this[_0x25fb('0xe')]&&_0x2e04c1&&!_0x39a6e1&&this['element'][_0x25fb('0x2f')]({'top':this[_0x25fb('0x1a')][_0x25fb('0xa')],'behavior':'smooth'});}),this['on']('change:isProcessing',(_0x1a09ff,_0x5d1198,_0x3d342a)=>{_0x39a6e1=!0x1,_0x3d342a?(this[_0x25fb('0x2b')]=null,this[_0x25fb('0x1e')]['appendLoader']()):this[_0x25fb('0x2b')]||this[_0x25fb('0x1e')][_0x25fb('0x25')]('');}),this['listenTo'](this[_0x25fb('0x1a')],_0x25fb('0xf'),()=>{_0x39a6e1=!0x0;}),this[_0x25fb('0xc')](this[_0x25fb('0x1a')],_0x25fb('0x22'),()=>{_0x39a6e1=!0x0;});}[_0x25fb('0x2d')](){this[_0x25fb('0x1a')][_0x25fb('0x2d')]();}[_0x25fb('0x19')](){const _0x1090f1=this['locale'],_0x1f46d3=new _0x298746(this[_0x25fb('0x16')]),_0x226bb4=_0x25fb('0x34');return _0x1f46d3[_0x25fb('0x24')]({'label':_0x5e2e8b(_0x1090f1,_0x25fb('0x28')),'icon':_0x275ebb,'class':_0x226bb4,'tooltip':!0x0}),_0x1f46d3[_0x25fb('0x1f')](_0x25fb('0x9'))['to'](this,_0x25fb('0x2b'),_0x126bf2=>!!_0x126bf2),_0x1f46d3[_0x25fb('0x1f')](_0x25fb('0x35'))['to'](this,_0x25fb('0xe'),_0x236f51=>!_0x236f51),_0x1f46d3['on'](_0x25fb('0x20'),()=>{this['_copyHTMLToClipboard'](this[_0x25fb('0x1e')][_0x25fb('0x1a')]),_0x1f46d3[_0x25fb('0x3')]=_0x6fe83c[_0x25fb('0x2c')],_0x1f46d3[_0x25fb('0x36')]=_0x226bb4+_0x25fb('0x37'),this[_0x25fb('0x2d')](),setTimeout(()=>{_0x1f46d3[_0x25fb('0x3')]=_0x275ebb,_0x1f46d3[_0x25fb('0x36')]=_0x226bb4;},0x3e8);}),_0x1f46d3;}['_copyHTMLToClipboard'](_0x54dfac){const {window:_0x1c847a,document:_0x4ef81e}=_0x4dafe4;if(_0x1c847a['ClipboardItem']){const {Blob:_0x2a591c,ClipboardItem:_0x3f2fa6}=_0x1c847a,_0x35ef7c=[new _0x3f2fa6({'text/html':new _0x2a591c([_0x54dfac[_0x25fb('0x2a')]],{'type':'text/html'}),'text/plain':new _0x2a591c([_0x54dfac[_0x25fb('0x7')]||''],{'type':'text/plain'})})];navigator['clipboard'][_0x25fb('0x29')](_0x35ef7c);}else{const _0x4b18f4=_0x4ef81e['createElement']('div');_0x4b18f4[_0x25fb('0x18')]['position']=_0x25fb('0x13'),_0x4b18f4[_0x25fb('0x18')]['left']=_0x25fb('0x15'),_0x4b18f4[_0x25fb('0x2a')]=_0x54dfac['innerHTML'],_0x4ef81e[_0x25fb('0x32')][_0x25fb('0x12')](_0x4b18f4);const _0x191e31=_0x4ef81e[_0x25fb('0xb')]();_0x191e31[_0x25fb('0x31')](_0x4b18f4);const _0xfa064a=_0x1c847a[_0x25fb('0x17')]();_0xfa064a[_0x25fb('0x21')](),_0xfa064a[_0x25fb('0x6')](_0x191e31),_0x4ef81e[_0x25fb('0x1b')](_0x25fb('0x8')),_0x4b18f4[_0x25fb('0x14')]();}}}export class ContentFieldView extends _0x31f517{constructor(_0x2f0f05,_0x19af92=''){super(_0x2f0f05),this[_0x25fb('0x26')]=this[_0x25fb('0x11')](),this['setTemplate']({'tag':_0x25fb('0x27'),'attributes':{'class':['ck',_0x25fb('0x33'),_0x19af92,_0x25fb('0x1'),'ck-ai-form__content-field']}});}[_0x25fb('0x25')](_0x5bfd61){this[_0x25fb('0x1a')]['innerHTML']=_0x5bfd61;}[_0x25fb('0x1d')](){this[_0x25fb('0x1a')][_0x25fb('0x12')](this[_0x25fb('0x26')][_0x25fb('0x1a')]);}[_0x25fb('0x11')](){const _0x4ac867=new _0x31f517(),_0x3d7e4f=this[_0x25fb('0x16')],_0x4e186b=new _0x364a36();return _0x4e186b[_0x25fb('0x9')]=!0x0,_0x4ac867[_0x25fb('0xd')]({'tag':_0x25fb('0x27'),'attributes':{'class':['ck','ck-ai-form__loader']},'children':[_0x4e186b,{'text':_0x5e2e8b(_0x3d7e4f,_0x25fb('0x30'))}]}),_0x4ac867[_0x25fb('0x5')](),_0x4ac867;}}
23
+ const _0x26ec=['querySelector','scrollHeight','\x20ck-ai-form__copy-button--copied','_copyHTMLToClipboard','isVisible','icon','setTemplate','execCommand','scrollTo','value','left','change:isProcessing','div','clipboard','addRange','isProcessing','ck-ai-form__content-area-wrapper','style','locale','copy','ClipboardItem','Copy','render','-9999px','change:value','appendChild','textContent','text/html','contentFieldView','write','execute','createRange','mousedown','set','bind','listenTo','position','isEnabled','ck-reset_all-excluded','_createLoader','createElement','ck-content','class','.ck-ai-form__loader','innerHTML','copyButtonView','bindTemplate','appendLoader','loaderView','removeAllRanges','ck-ai-form__content-field','AI\x20is\x20writing...','ck-ai-form__content-area--processing','setContent','element'];(function(_0x3da459,_0x26ecef){const _0x2b7460=function(_0xffc583){while(--_0xffc583){_0x3da459['push'](_0x3da459['shift']());}};_0x2b7460(++_0x26ecef);}(_0x26ec,0x167));const _0x2b74=function(_0x3da459,_0x26ecef){_0x3da459=_0x3da459-0x0;let _0x2b7460=_0x26ec[_0x3da459];return _0x2b7460;};import{global as _0x440d40}from'ckeditor5/src/utils';import{View as _0x85b69f,ButtonView as _0x4c5f04,SpinnerView as _0x185e46}from'ckeditor5/src/ui';import _0x414a2c from'../../../theme/icons/copy.svg';import{getTranslation as _0x24b74f}from'../../utils/common-translations';import{icons as _0x14950d}from'ckeditor5/src/core';export default class M extends _0x85b69f{constructor(_0x4152cd,_0x37f71b=''){super(_0x4152cd),this['set']({'value':null,'isVisible':!0x1,'isProcessing':!0x1});const _0x52c279=this[_0x2b74('0x11')];this['contentFieldView']=new ContentFieldView(_0x4152cd,_0x37f71b),this[_0x2b74('0x10')]=this['_createCopyButton'](),this[_0x2b74('0x20')]({'tag':_0x2b74('0x26'),'attributes':{'class':['ck',_0x2b74('0x2a'),_0x52c279['if']('isVisible','ck-hidden',_0x3ce8af=>!_0x3ce8af)],'tabindex':'-1'},'children':[{'tag':_0x2b74('0x26'),'attributes':{'class':['ck','ck-ai-form__content-area',_0x52c279['if'](_0x2b74('0x29'),_0x2b74('0x17'))]},'children':[this[_0x2b74('0x36')],{'tag':'div','attributes':{'class':['ck','ck-ai-form__copy-button-wrapper']},'children':[this[_0x2b74('0x10')]]}]}]});}['render'](){super[_0x2b74('0x30')](),this[_0x2b74('0x23')]&&this[_0x2b74('0x36')]['setContent'](this[_0x2b74('0x23')]);let _0x32e235=!0x1;this['on'](_0x2b74('0x32'),(_0xde3828,_0x66b6d7,_0x16a8b6)=>{const _0x5d53c9=!this[_0x2b74('0x36')]['element'][_0x2b74('0x1a')](_0x2b74('0xe'));this['contentFieldView'][_0x2b74('0x18')](_0x16a8b6),this[_0x2b74('0x29')]&&_0x5d53c9&&!_0x32e235&&this['element'][_0x2b74('0x22')]({'top':this[_0x2b74('0x19')][_0x2b74('0x1b')],'behavior':'smooth'});}),this['on'](_0x2b74('0x25'),(_0x557a19,_0x405a72,_0x1ca258)=>{_0x32e235=!0x1,_0x1ca258?(this[_0x2b74('0x23')]=null,this[_0x2b74('0x36')][_0x2b74('0x12')]()):this[_0x2b74('0x23')]||this[_0x2b74('0x36')][_0x2b74('0x18')]('');}),this[_0x2b74('0x6')](this[_0x2b74('0x19')],'wheel',()=>{_0x32e235=!0x0;}),this[_0x2b74('0x6')](this[_0x2b74('0x19')],_0x2b74('0x3'),()=>{_0x32e235=!0x0;});}['focus'](){this[_0x2b74('0x19')]['focus']();}['_createCopyButton'](){const _0x421a29=this[_0x2b74('0x2c')],_0x2669a6=new _0x4c5f04(this[_0x2b74('0x2c')]),_0x251aac='ck-ai-form__copy-button';return _0x2669a6[_0x2b74('0x4')]({'label':_0x24b74f(_0x421a29,_0x2b74('0x2f')),'icon':_0x414a2c,'class':_0x251aac,'tooltip':!0x0}),_0x2669a6[_0x2b74('0x5')]('isVisible')['to'](this,_0x2b74('0x23'),_0x25fbe1=>!!_0x25fbe1),_0x2669a6[_0x2b74('0x5')](_0x2b74('0x8'))['to'](this,'isProcessing',_0x824319=>!_0x824319),_0x2669a6['on'](_0x2b74('0x1'),()=>{this[_0x2b74('0x1d')](this[_0x2b74('0x36')][_0x2b74('0x19')]),_0x2669a6[_0x2b74('0x1f')]=_0x14950d['check'],_0x2669a6['class']=_0x251aac+_0x2b74('0x1c'),this['focus'](),setTimeout(()=>{_0x2669a6[_0x2b74('0x1f')]=_0x414a2c,_0x2669a6[_0x2b74('0xd')]=_0x251aac;},0x3e8);}),_0x2669a6;}[_0x2b74('0x1d')](_0x2c2192){const {window:_0x2fe022,document:_0x28c5a7}=_0x440d40;if(_0x2fe022[_0x2b74('0x2e')]){const {Blob:_0x1f2096,ClipboardItem:_0x227094}=_0x2fe022,_0x3a0c3d=[new _0x227094({'text/html':new _0x1f2096([_0x2c2192[_0x2b74('0xf')]],{'type':_0x2b74('0x35')}),'text/plain':new _0x1f2096([_0x2c2192[_0x2b74('0x34')]||''],{'type':'text/plain'})})];navigator[_0x2b74('0x27')][_0x2b74('0x0')](_0x3a0c3d);}else{const _0x1d0a76=_0x28c5a7[_0x2b74('0xb')]('div');_0x1d0a76[_0x2b74('0x2b')][_0x2b74('0x7')]='absolute',_0x1d0a76[_0x2b74('0x2b')][_0x2b74('0x24')]=_0x2b74('0x31'),_0x1d0a76[_0x2b74('0xf')]=_0x2c2192[_0x2b74('0xf')],_0x28c5a7['body'][_0x2b74('0x33')](_0x1d0a76);const _0x5ec54c=_0x28c5a7[_0x2b74('0x2')]();_0x5ec54c['selectNodeContents'](_0x1d0a76);const _0x4beab3=_0x2fe022['getSelection']();_0x4beab3[_0x2b74('0x14')](),_0x4beab3[_0x2b74('0x28')](_0x5ec54c),_0x28c5a7[_0x2b74('0x21')](_0x2b74('0x2d')),_0x1d0a76['remove']();}}}export class ContentFieldView extends _0x85b69f{constructor(_0x11c514,_0x5042a8=''){super(_0x11c514),this[_0x2b74('0x13')]=this[_0x2b74('0xa')](),this[_0x2b74('0x20')]({'tag':'div','attributes':{'class':['ck',_0x2b74('0xc'),_0x5042a8,_0x2b74('0x9'),_0x2b74('0x15')]}});}[_0x2b74('0x18')](_0x2d0db8){this[_0x2b74('0x19')][_0x2b74('0xf')]=_0x2d0db8;}[_0x2b74('0x12')](){this['element'][_0x2b74('0x33')](this['loaderView']['element']);}[_0x2b74('0xa')](){const _0x38651d=new _0x85b69f(),_0x5e62a3=this['locale'],_0x483950=new _0x185e46();return _0x483950[_0x2b74('0x1e')]=!0x0,_0x38651d[_0x2b74('0x20')]({'tag':_0x2b74('0x26'),'attributes':{'class':['ck','ck-ai-form__loader']},'children':[_0x483950,{'text':_0x24b74f(_0x5e62a3,_0x2b74('0x16'))}]}),_0x38651d['render'](),_0x38651d;}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x5e89=['setTemplate','div','set','text','content','bindTemplate'];(function(_0x2383c2,_0x5e8912){const _0x4b023b=function(_0x514968){while(--_0x514968){_0x2383c2['push'](_0x2383c2['shift']());}};_0x4b023b(++_0x5e8912);}(_0x5e89,0xf9));const _0x4b02=function(_0x2383c2,_0x5e8912){_0x2383c2=_0x2383c2-0x0;let _0x4b023b=_0x5e89[_0x2383c2];return _0x4b023b;};import{View as _0x1708a2,IconView as _0x1a3d06}from'ckeditor5/src/ui';import _0x1eeadd from'../../../theme/icons/error.svg';export default class J extends _0x1708a2{constructor(_0x357c0e,_0x3b0299=''){super(_0x357c0e);const _0x593c87=new _0x1a3d06(),_0xd9d7e0=this[_0x4b02('0x2')];this[_0x4b02('0x5')](_0x4b02('0x0'),_0x3b0299),_0x593c87[_0x4b02('0x1')]=_0x1eeadd,this[_0x4b02('0x3')]({'tag':_0x4b02('0x4'),'attributes':{'class':['ck','ck-ai-form__error']},'children':[_0x593c87,{'text':_0xd9d7e0['to']('text')}]});}}
23
+ const _0x299f=['set','content','ck-ai-form__error','text','setTemplate','div'];(function(_0x245268,_0x299fd8){const _0x36abac=function(_0x50b8e9){while(--_0x50b8e9){_0x245268['push'](_0x245268['shift']());}};_0x36abac(++_0x299fd8);}(_0x299f,0xfc));const _0x36ab=function(_0x245268,_0x299fd8){_0x245268=_0x245268-0x0;let _0x36abac=_0x299f[_0x245268];return _0x36abac;};import{View as _0x2b83b4,IconView as _0x39dcca}from'ckeditor5/src/ui';import _0x42abba from'../../../theme/icons/error.svg';export default class J extends _0x2b83b4{constructor(_0x28c253,_0x28aa5d=''){super(_0x28c253);const _0x2942f1=new _0x39dcca(),_0x7fd8c5=this['bindTemplate'];this[_0x36ab('0x0')](_0x36ab('0x3'),_0x28aa5d),_0x2942f1[_0x36ab('0x1')]=_0x42abba,this[_0x36ab('0x4')]({'tag':_0x36ab('0x5'),'attributes':{'class':['ck',_0x36ab('0x2')]},'children':[_0x2942f1,{'text':_0x7fd8c5['to'](_0x36ab('0x3'))}]});}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x5e86=['showHistoryButtonView','fire','focusCycler','maxRows','history','left','focusableChildren','enter','uiLanguageDirection','style','isEmpty','filteredView','children','isOn','submitButtonView','submit','focus','keystrokes','rtl','resultsView','queryView','isEnabled','_createShowHistoryButton','width','render','bind','isVisible','add','History','Submit','element','target','_createSubmitButton','locale','fieldView','focusLast','set','value'];(function(_0x3772e7,_0x5e867e){const _0x53c9fc=function(_0x322f0e){while(--_0x322f0e){_0x3772e7['push'](_0x3772e7['shift']());}};_0x53c9fc(++_0x5e867e);}(_0x5e86,0x14d));const _0x53c9=function(_0x3772e7,_0x5e867e){_0x3772e7=_0x3772e7-0x0;let _0x53c9fc=_0x5e86[_0x3772e7];return _0x53c9fc;};import{Rect as _0x4a43e8,global as _0x277807,isVisible as _0x7f9cca}from'ckeditor5/src/utils';import{AutocompleteView as _0x41640c,ButtonView as _0x2012af}from'ckeditor5/src/ui';import{icons as _0x5f10f9}from'ckeditor5/src/core';import{escape as _0x36dc75}from'lodash-es';import{getTranslation as _0xec8bec}from'../../utils/common-translations';import _0x1438b2 from'../../../theme/icons/submit.svg';export default class R extends _0x41640c{constructor(_0x20c192,_0x5a2ec5){super(_0x20c192,_0x5a2ec5),this[_0x53c9('0x1d')][_0x53c9('0x5')]['minRows']=0x1,this[_0x53c9('0x1d')]['fieldView'][_0x53c9('0xc')]=0x3,this[_0x53c9('0x17')]=this['_createSubmitButton'](),this[_0x53c9('0x9')]=this[_0x53c9('0x1f')](),this[_0x53c9('0xf')]['add'](this[_0x53c9('0x9')],0x1),this[_0x53c9('0xf')][_0x53c9('0x24')](this[_0x53c9('0x17')]);}[_0x53c9('0x21')](){super['render'](),this['queryView']['fieldWrapperChildren']['add'](this['showHistoryButtonView']),this[_0x53c9('0x15')][_0x53c9('0x24')](this[_0x53c9('0x17')]),this[_0x53c9('0x1a')][_0x53c9('0x7')](_0x53c9('0x10'),(_0xb8381b,_0x2cba98)=>{_0xb8381b[_0x53c9('0x2')]==this[_0x53c9('0x1d')][_0x53c9('0x5')][_0x53c9('0x1')]&&(this[_0x53c9('0x18')](),_0x2cba98());});}[_0x53c9('0x3')](){const _0x5e5aed=new _0x2012af(this[_0x53c9('0x4')]),_0x30a553=this[_0x53c9('0x4')];return _0x5e5aed[_0x53c9('0x7')]({'icon':_0x1438b2,'label':_0xec8bec(_0x30a553,_0x53c9('0x0')),'isVisible':!0x0,'tooltip':!0x0,'class':'ck-ai-form__submit'}),_0x5e5aed['on']('execute',()=>{this['submit']();}),_0x5e5aed[_0x53c9('0x22')](_0x53c9('0x1e'))['to'](this[_0x53c9('0x1d')]['fieldView'],_0x53c9('0x13'),this,_0x53c9('0x1e'),(_0x4ce110,_0x47d853)=>!_0x4ce110&&_0x47d853),_0x5e5aed;}[_0x53c9('0x1f')](){const _0x1d99d8=new _0x2012af(this['locale']),_0x119d32=this[_0x53c9('0x1c')],_0x9bba2f=this[_0x53c9('0x4')];_0x1d99d8[_0x53c9('0x7')]({'label':_0xec8bec(_0x9bba2f,_0x53c9('0x25')),'withText':!0x1,'icon':_0x5f10f9[_0x53c9('0xd')],'tooltip':!0x0,'tooltipPosition':'sw','class':'ck-ai-form__toggle-history'}),_0x1d99d8['bind'](_0x53c9('0x16'))['to'](_0x119d32,_0x53c9('0x23')),_0x1d99d8[_0x53c9('0x22')](_0x53c9('0x1e'))['to'](this,'isEnabled'),_0x1d99d8['on']('execute',()=>{_0x119d32[_0x53c9('0x23')]=!_0x119d32[_0x53c9('0x23')],_0x119d32['isVisible']?this[_0x53c9('0x14')]['focus']():this[_0x53c9('0x19')]();});const _0x43986f=()=>{_0x277807['window']['requestAnimationFrame'](()=>{if(_0x7f9cca(this[_0x53c9('0x1')])){const _0x573ad1=new _0x4a43e8(this[_0x53c9('0x1d')]['fieldView'][_0x53c9('0x1')]),_0x2a3040=_0x573ad1[_0x53c9('0x20')],_0x245d5a=_0x53c9('0x1b')===_0x9bba2f[_0x53c9('0x11')]?_0x53c9('0xe'):'right';_0x573ad1['excludeScrollbarsAndBorders'](),_0x1d99d8[_0x53c9('0x1')][_0x53c9('0x12')][_0x245d5a]=_0x2a3040-_0x573ad1[_0x53c9('0x20')]+0x1+'px';}});};return this['queryView'][_0x53c9('0x5')]['on']('update',_0x43986f),this['on'](_0x53c9('0x21'),_0x43986f),_0x1d99d8;}[_0x53c9('0x18')](){const _0xb17ba3=this[_0x53c9('0x1d')]['fieldView']['element'][_0x53c9('0x8')];this[_0x53c9('0xa')](_0x53c9('0x18'),_0x36dc75(_0xb17ba3));}['focus'](_0x39f780){-0x1===_0x39f780?this[_0x53c9('0xb')][_0x53c9('0x6')]():this[_0x53c9('0xb')]['focusFirst']();}}
23
+ const _0x4e37=['focusableChildren','isEnabled','window','fire','Submit','isEmpty','right','focusLast','render','locale','focusFirst','set','update','showHistoryButtonView','focus','enter','uiLanguageDirection','filteredView','keystrokes','minRows','isVisible','value','_createSubmitButton','children','ck-ai-form__submit','resultsView','_createShowHistoryButton','rtl','ck-ai-form__toggle-history','fieldWrapperChildren','submit','submitButtonView','maxRows','execute','width','bind','fieldView','focusCycler','queryView','element','requestAnimationFrame','add'];(function(_0x10a19c,_0x4e37dd){const _0x2c62d0=function(_0x273a12){while(--_0x273a12){_0x10a19c['push'](_0x10a19c['shift']());}};_0x2c62d0(++_0x4e37dd);}(_0x4e37,0xa9));const _0x2c62=function(_0x10a19c,_0x4e37dd){_0x10a19c=_0x10a19c-0x0;let _0x2c62d0=_0x4e37[_0x10a19c];return _0x2c62d0;};import{Rect as _0x268ddf,global as _0x2a7491,isVisible as _0x240752}from'ckeditor5/src/utils';import{AutocompleteView as _0x47f79b,ButtonView as _0x420cde}from'ckeditor5/src/ui';import{icons as _0x2ae000}from'ckeditor5/src/core';import{escape as _0x554e91}from'lodash-es';import{getTranslation as _0x1b15f4}from'../../utils/common-translations';import _0x25393e from'../../../theme/icons/submit.svg';export default class R extends _0x47f79b{constructor(_0x4795a1,_0xa3e9df){super(_0x4795a1,_0xa3e9df),this[_0x2c62('0x25')][_0x2c62('0x23')][_0x2c62('0x12')]=0x1,this['queryView'][_0x2c62('0x23')][_0x2c62('0x1f')]=0x3,this[_0x2c62('0x1e')]=this[_0x2c62('0x15')](),this[_0x2c62('0xc')]=this[_0x2c62('0x19')](),this['focusableChildren'][_0x2c62('0x28')](this[_0x2c62('0xc')],0x1),this[_0x2c62('0x29')][_0x2c62('0x28')](this[_0x2c62('0x1e')]);}[_0x2c62('0x7')](){super[_0x2c62('0x7')](),this[_0x2c62('0x25')][_0x2c62('0x1c')][_0x2c62('0x28')](this[_0x2c62('0xc')]),this[_0x2c62('0x16')][_0x2c62('0x28')](this[_0x2c62('0x1e')]),this[_0x2c62('0x11')]['set'](_0x2c62('0xe'),(_0x1006fa,_0x1f4da6)=>{_0x1006fa['target']==this[_0x2c62('0x25')][_0x2c62('0x23')][_0x2c62('0x26')]&&(this[_0x2c62('0x1d')](),_0x1f4da6());});}[_0x2c62('0x15')](){const _0x9f3381=new _0x420cde(this[_0x2c62('0x8')]),_0x109ae6=this[_0x2c62('0x8')];return _0x9f3381[_0x2c62('0xa')]({'icon':_0x25393e,'label':_0x1b15f4(_0x109ae6,_0x2c62('0x3')),'isVisible':!0x0,'tooltip':!0x0,'class':_0x2c62('0x17')}),_0x9f3381['on'](_0x2c62('0x20'),()=>{this[_0x2c62('0x1d')]();}),_0x9f3381[_0x2c62('0x22')](_0x2c62('0x0'))['to'](this['queryView']['fieldView'],_0x2c62('0x4'),this,_0x2c62('0x0'),(_0x3d3cf9,_0x12dd17)=>!_0x3d3cf9&&_0x12dd17),_0x9f3381;}[_0x2c62('0x19')](){const _0x45e4d1=new _0x420cde(this['locale']),_0x129546=this[_0x2c62('0x18')],_0x40a003=this[_0x2c62('0x8')];_0x45e4d1[_0x2c62('0xa')]({'label':_0x1b15f4(_0x40a003,'History'),'withText':!0x1,'icon':_0x2ae000['history'],'tooltip':!0x0,'tooltipPosition':'sw','class':_0x2c62('0x1b')}),_0x45e4d1['bind']('isOn')['to'](_0x129546,'isVisible'),_0x45e4d1[_0x2c62('0x22')](_0x2c62('0x0'))['to'](this,_0x2c62('0x0')),_0x45e4d1['on'](_0x2c62('0x20'),()=>{_0x129546[_0x2c62('0x13')]=!_0x129546['isVisible'],_0x129546[_0x2c62('0x13')]?this[_0x2c62('0x10')][_0x2c62('0xd')]():this['focus']();});const _0x57bb15=()=>{_0x2a7491[_0x2c62('0x1')][_0x2c62('0x27')](()=>{if(_0x240752(this['element'])){const _0x26c577=new _0x268ddf(this['queryView'][_0x2c62('0x23')][_0x2c62('0x26')]),_0x3dbaca=_0x26c577['width'],_0x2e31da=_0x2c62('0x1a')===_0x40a003[_0x2c62('0xf')]?'left':_0x2c62('0x5');_0x26c577['excludeScrollbarsAndBorders'](),_0x45e4d1[_0x2c62('0x26')]['style'][_0x2e31da]=_0x3dbaca-_0x26c577[_0x2c62('0x21')]+0x1+'px';}});};return this[_0x2c62('0x25')][_0x2c62('0x23')]['on'](_0x2c62('0xb'),_0x57bb15),this['on']('render',_0x57bb15),_0x45e4d1;}[_0x2c62('0x1d')](){const _0x3fc937=this['queryView']['fieldView'][_0x2c62('0x26')][_0x2c62('0x14')];this[_0x2c62('0x2')](_0x2c62('0x1d'),_0x554e91(_0x3fc937));}[_0x2c62('0xd')](_0x3f977e){-0x1===_0x3f977e?this[_0x2c62('0x24')][_0x2c62('0x6')]():this[_0x2c62('0x24')][_0x2c62('0x9')]();}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x37ec=['replaceButton','_createButton','ck-button-action','insertButton','items','set','isVisible','tryAgainButton','Stop','Try\x20again','ck-ai-form__toolbar','addMany','AI_REPLACE_CONTENT','ck-hidden','extendTemplate','locale'];(function(_0x7b2aa6,_0x37ec66){const _0x4448ec=function(_0x45c797){while(--_0x45c797){_0x7b2aa6['push'](_0x7b2aa6['shift']());}};_0x4448ec(++_0x37ec66);}(_0x37ec,0x84));const _0x4448=function(_0x7b2aa6,_0x37ec66){_0x7b2aa6=_0x7b2aa6-0x0;let _0x4448ec=_0x37ec[_0x7b2aa6];return _0x4448ec;};import{ToolbarView as _0x570149,ButtonView as _0x304951}from'ckeditor5/src/ui';import{getTranslation as _0x5daef2}from'../../utils/common-translations';export default class X extends _0x570149{constructor(_0xc52cb7){super(_0xc52cb7),this[_0x4448('0x1')](_0x4448('0x2'),!0x1),this[_0x4448('0xc')]=this['_createButton'](_0x5daef2(_0xc52cb7,_0x4448('0x8')),_0x4448('0xe')),this[_0x4448('0xf')]=this['_createButton'](_0x5daef2(_0xc52cb7,'Insert\x20below')),this[_0x4448('0x3')]=this[_0x4448('0xd')](_0x5daef2(_0xc52cb7,_0x4448('0x5'))),this['stopButton']=this[_0x4448('0xd')](_0x5daef2(_0xc52cb7,_0x4448('0x4')));const _0x2fd977=this['bindTemplate'];this[_0x4448('0xa')]({'attributes':{'class':[_0x4448('0x6'),_0x2fd977['if'](_0x4448('0x2'),_0x4448('0x9'),_0x222a2d=>!_0x222a2d)]}}),this[_0x4448('0x0')][_0x4448('0x7')]([this[_0x4448('0xc')],this[_0x4448('0xf')],this[_0x4448('0x3')],this['stopButton']]);}[_0x4448('0xd')](_0x5679dc,_0x277524){const _0x398e05=new _0x304951(this[_0x4448('0xb')]);return _0x398e05[_0x4448('0x1')]({'label':_0x5679dc,'class':_0x277524||'','isVisible':!0x0,'withText':!0x0}),_0x398e05;}}
23
+ const _0x9038=['isVisible','bindTemplate','addMany','ck-hidden','Insert\x20below','items','locale','ck-button-action','tryAgainButton','AI_REPLACE_CONTENT','replaceButton','insertButton','Stop','stopButton','_createButton','set'];(function(_0x1e6169,_0x9038f3){const _0x56bef3=function(_0x4698b6){while(--_0x4698b6){_0x1e6169['push'](_0x1e6169['shift']());}};_0x56bef3(++_0x9038f3);}(_0x9038,0xe3));const _0x56be=function(_0x1e6169,_0x9038f3){_0x1e6169=_0x1e6169-0x0;let _0x56bef3=_0x9038[_0x1e6169];return _0x56bef3;};import{ToolbarView as _0x3add33,ButtonView as _0x3555b6}from'ckeditor5/src/ui';import{getTranslation as _0x799c94}from'../../utils/common-translations';export default class X extends _0x3add33{constructor(_0x1260fd){super(_0x1260fd),this[_0x56be('0xc')]('isVisible',!0x1),this[_0x56be('0x7')]=this[_0x56be('0xb')](_0x799c94(_0x1260fd,_0x56be('0x6')),_0x56be('0x4')),this[_0x56be('0x8')]=this[_0x56be('0xb')](_0x799c94(_0x1260fd,_0x56be('0x1'))),this[_0x56be('0x5')]=this['_createButton'](_0x799c94(_0x1260fd,'Try\x20again')),this[_0x56be('0xa')]=this['_createButton'](_0x799c94(_0x1260fd,_0x56be('0x9')));const _0x10b095=this[_0x56be('0xe')];this['extendTemplate']({'attributes':{'class':['ck-ai-form__toolbar',_0x10b095['if'](_0x56be('0xd'),_0x56be('0x0'),_0x5d5590=>!_0x5d5590)]}}),this[_0x56be('0x2')][_0x56be('0xf')]([this['replaceButton'],this['insertButton'],this[_0x56be('0x5')],this[_0x56be('0xa')]]);}[_0x56be('0xb')](_0x368ab1,_0x25c317){const _0x48c406=new _0x3555b6(this[_0x56be('0x3')]);return _0x48c406[_0x56be('0xc')]({'label':_0x368ab1,'class':_0x25c317||'','isVisible':!0x0,'withText':!0x0}),_0x48c406;}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x4f3f=['add','isProcessing','tab','render','ck-ai-form-content','focusCycler','trim','_createToolbar','_createHistoryView','element','fieldView','clearHistory','text','bindTo','createCollection','ck-ai-form','fire','insertContentBelow','isVisible','AI\x20Assistant','handleError','replaceButton','locale','label','stop','replaceContent','copyButtonView','focusNext','shift\x20+\x20tab','tryAgainButton','submit','backwardCycle','Ask\x20AI\x20to\x20improve\x20generated\x20text','execute','contentArea','listenTo','prompt','items','stopButton','header','setTemplate','_promptHistory','Ask\x20AI\x20to\x20edit\x20or\x20generate','search','_focusCycler','keystrokes','bind','isEnabled','toolbar','finishProcessing','_focusables','queryView','focusTracker','reset','_createPromptView','forwardCycle','promptView','value','errorView','div','focus','set','isError','clear'];(function(_0x48357e,_0x4f3f67){const _0x437f32=function(_0x1bb5c0){while(--_0x1bb5c0){_0x48357e['push'](_0x48357e['shift']());}};_0x437f32(++_0x4f3f67);}(_0x4f3f,0x76));const _0x437f=function(_0x48357e,_0x4f3f67){_0x48357e=_0x48357e-0x0;let _0x437f32=_0x4f3f[_0x48357e];return _0x437f32;};import{FocusTracker as _0x25cec2,KeystrokeHandler as _0xd6e742}from'ckeditor5/src/utils';import{View as _0x5e7613,FocusCycler as _0xa3d6cd,createLabeledTextarea as _0x1dccba,FormHeaderView as _0x1a70b6}from'ckeditor5/src/ui';import _0x1dcdb2 from'./aiformtoolbarview';import _0x144162 from'./aiformcontentarea';import _0x2bc5e8 from'./aiformerrorview';import _0x805f26 from'./aiformpromptview';import _0x3340bf from'./aihistorylistview';import _0x7179c0 from'./aihistorylistitemview';import _0x57df97 from'./prompthistory';import{getTranslation as _0x5f3902}from'../../utils/common-translations';import _0x3e9e74 from'../../../theme/icons/robot-pencil.svg';export default class g extends _0x5e7613{constructor(_0x2919a3,_0x3b30e3,_0x2d8e67=''){super(_0x2919a3),this['set']('isEnabled',!0x0),this[_0x437f('0x7')](_0x437f('0xb'),!0x1),this['set'](_0x437f('0x2e'),''),this['set']('value',''),this[_0x437f('0x7')](_0x437f('0x8'),!0x1),this[_0x437f('0x33')]=new _0x57df97(),this['errorView']=new _0x2bc5e8(_0x2919a3),this[_0x437f('0x31')]=new _0x1a70b6(_0x2919a3,{'label':_0x5f3902(_0x2919a3,_0x437f('0x1d')),'icon':_0x3e9e74}),this[_0x437f('0x2c')]=new _0x144162(_0x2919a3,_0x2d8e67),this[_0x437f('0x2c')][_0x437f('0x38')](_0x437f('0xb'))['to'](this),this[_0x437f('0x2c')][_0x437f('0x38')](_0x437f('0x3'))['to'](this),this['toolbar']=this[_0x437f('0x11')](),this[_0x437f('0x2')]=this[_0x437f('0x0')](),this[_0x437f('0x3e')]=new _0x25cec2(),this[_0x437f('0x37')]=new _0xd6e742(),this[_0x437f('0x3c')]=this[_0x437f('0x18')]([this[_0x437f('0x2c')],this['contentArea']['copyButtonView'],this['toolbar'],this[_0x437f('0x2')]]),this['_focusCycler']=new _0xa3d6cd({'focusables':this['_focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this[_0x437f('0x37')],'actions':{'focusPrevious':_0x437f('0x26'),'focusNext':_0x437f('0xc')}}),this['promptView'][_0x437f('0xf')]['on'](_0x437f('0x1'),_0x5e2523=>{this[_0x437f('0x36')][_0x437f('0x25')](),_0x5e2523[_0x437f('0x22')]();}),this[_0x437f('0x2')][_0x437f('0xf')]['on'](_0x437f('0x29'),_0x54291a=>{this[_0x437f('0x36')]['focusPrevious'](),_0x54291a['stop']();});const _0x2cdad6=this['bindTemplate'];this[_0x437f('0x32')]({'tag':_0x437f('0x5'),'attributes':{'class':['ck',_0x437f('0x19'),_0x3b30e3],'tabindex':'-1'},'children':[this[_0x437f('0x31')],{'tag':_0x437f('0x5'),'attributes':{'class':['ck',_0x437f('0xe')]},'children':[{'tag':_0x437f('0x5'),'attributes':{'class':[_0x2cdad6['if'](_0x437f('0x8'),'ck-hidden',_0x4bfdc8=>!_0x4bfdc8)]},'children':[this[_0x437f('0x4')]]},this[_0x437f('0x2c')],this[_0x437f('0x3a')],this[_0x437f('0x2')]]}]});}[_0x437f('0xd')](){super[_0x437f('0xd')](),this[_0x437f('0x3e')]['add'](this[_0x437f('0x2c')][_0x437f('0x13')]),this[_0x437f('0x3e')]['add'](this[_0x437f('0x2c')][_0x437f('0x24')]['element']),this[_0x437f('0x3e')]['add'](this[_0x437f('0x3a')][_0x437f('0x13')]),this[_0x437f('0x3e')][_0x437f('0xa')](this[_0x437f('0x2')][_0x437f('0x13')]),this[_0x437f('0x37')][_0x437f('0x2d')](this[_0x437f('0x13')]);}['focus'](){this[_0x437f('0x36')]['focusFirst']();}[_0x437f('0x3f')](){this[_0x437f('0x2e')]='',this[_0x437f('0x3')]='',this['promptView'][_0x437f('0x3d')][_0x437f('0x14')][_0x437f('0x3')]='',this[_0x437f('0x2c')][_0x437f('0x1c')]=!0x1,this[_0x437f('0x3a')][_0x437f('0x1c')]=!0x1;}['_createPromptView'](){const _0x12a8d5=this['locale'],_0x5e3db8=new _0x805f26(_0x12a8d5,{'queryView':{'label':_0x5f3902(_0x12a8d5,_0x437f('0x34')),'creator':_0x1dccba,'showIcon':!0x1,'showResetButton':!0x1},'infoView':{'text':{'noSearchableItems':{'primary':_0x5f3902(_0x12a8d5,'Empty\x20history'),'secondary':_0x5f3902(_0x12a8d5,'Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.')}}},'filteredView':this[_0x437f('0x12')](),'queryMinChars':0x1/0x0,'resetOnBlur':!0x1});return _0x5e3db8[_0x437f('0x38')](_0x437f('0x39'))['to'](this,_0x437f('0x39'),this,_0x437f('0xb'),(_0x68cb8d,_0x4e2fc5)=>_0x68cb8d&&!_0x4e2fc5),this[_0x437f('0x2d')](_0x5e3db8,_0x437f('0x28'),(_0x2b40bb,_0x2be58e)=>{this['prompt']=_0x2be58e,this[_0x437f('0x1a')]('submitPrompt',this['prompt']),_0x2be58e['trim']()&&this['_promptHistory'][_0x437f('0xa')]({'prompt':_0x2be58e[_0x437f('0x10')]()},0x0);},{'priority':'high'}),_0x5e3db8;}[_0x437f('0x12')](){const _0x5f564a=new _0x3340bf(this['locale']);return _0x5f564a['historyGroupView'][_0x437f('0x2f')][_0x437f('0x17')](this[_0x437f('0x33')])['as'](_0x7179c0),_0x5f564a['on'](_0x437f('0x15'),()=>{this[_0x437f('0x33')][_0x437f('0x9')](),this['promptView'][_0x437f('0x35')](''),this['promptView']['focus']();}),_0x5f564a;}[_0x437f('0x11')](){const _0x190a85=new _0x1dcdb2(this['locale']);return _0x190a85[_0x437f('0x1f')][_0x437f('0x38')](_0x437f('0x39'))['to'](this,_0x437f('0x39'),this,'isProcessing',this,'value',(_0x37a8f6,_0xb1d952,_0x5c7eb6)=>_0x37a8f6&&!_0xb1d952&&!!_0x5c7eb6),_0x190a85['replaceButton']['on'](_0x437f('0x2b'),()=>{this['fire'](_0x437f('0x23'),this[_0x437f('0x3')]);}),_0x190a85['insertButton'][_0x437f('0x38')](_0x437f('0x39'))['to'](this,_0x437f('0x39'),this,_0x437f('0xb'),this,_0x437f('0x3'),(_0xd44449,_0x5bc5f2,_0x2345f3)=>_0xd44449&&!_0x5bc5f2&&!!_0x2345f3),_0x190a85['insertButton']['on'](_0x437f('0x2b'),()=>{this[_0x437f('0x1a')](_0x437f('0x1b'),this[_0x437f('0x3')]);}),_0x190a85[_0x437f('0x27')]['bind'](_0x437f('0x39'))['to'](this,_0x437f('0x39'),this,'isProcessing',(_0x3da8b4,_0x384636)=>_0x3da8b4&&!_0x384636),_0x190a85['tryAgainButton']['on'](_0x437f('0x2b'),()=>{this[_0x437f('0x1a')]('tryAgainEvent');}),_0x190a85['stopButton'][_0x437f('0x38')](_0x437f('0x39'))['to'](this,_0x437f('0xb')),_0x190a85[_0x437f('0x30')]['on'](_0x437f('0x2b'),()=>{this[_0x437f('0x1a')]('stopProcessing');}),_0x190a85;}['startProcessing'](){this[_0x437f('0x3')]='',this[_0x437f('0x8')]=!0x1,this[_0x437f('0xb')]=!0x0,this[_0x437f('0x2c')][_0x437f('0x1c')]=!0x0,this[_0x437f('0x3a')]['isVisible']=!0x0,this[_0x437f('0x2c')][_0x437f('0x6')]();}['finishProcessing'](){const _0x590cf9=this[_0x437f('0x20')];this['isProcessing']=!0x1,this[_0x437f('0x2e')]='',this[_0x437f('0x2')][_0x437f('0x3f')](),this[_0x437f('0x3')]&&(this[_0x437f('0x2')]['queryView'][_0x437f('0x21')]=_0x5f3902(_0x590cf9,_0x437f('0x2a')));}[_0x437f('0x1e')](_0x1e2f0a){const _0x51f3a3=this[_0x437f('0x20')];this[_0x437f('0x3b')](),this[_0x437f('0x8')]=!0x0,this[_0x437f('0x4')][_0x437f('0x16')]=_0x1e2f0a||_0x5f3902(_0x51f3a3,'AI_ERROR_FAILED'),this[_0x437f('0x3')]||(this[_0x437f('0x2c')]['isVisible']=!0x1);}}
23
+ const _0x22b4=['copyButtonView','focusFirst','isProcessing','text','shift\x20+\x20tab','ck-ai-form','forwardCycle','_promptHistory','replaceContent','render','isError','finishProcessing','stopButton','submit','clearHistory','insertButton','search','locale','AI\x20Assistant','AI_ERROR_FAILED','isEnabled','_focusCycler','stop','_focusables','div','listenTo','bindTemplate','bindTo','Empty\x20history','element','fieldView','ck-ai-form-content','set','setTemplate','replaceButton','backwardCycle','insertContentBelow','_createHistoryView','focusNext','add','items','bind','focus','_createPromptView','startProcessing','promptView','tab','contentArea','ck-hidden','_createToolbar','value','focusTracker','focusCycler','fire','isVisible','execute','tryAgainButton','header','queryView','errorView','keystrokes','prompt','trim','historyGroupView','reset','Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.','clear','toolbar'];(function(_0x8759da,_0x22b47b){const _0x40d825=function(_0x2742d7){while(--_0x2742d7){_0x8759da['push'](_0x8759da['shift']());}};_0x40d825(++_0x22b47b);}(_0x22b4,0x87));const _0x40d8=function(_0x8759da,_0x22b47b){_0x8759da=_0x8759da-0x0;let _0x40d825=_0x22b4[_0x8759da];return _0x40d825;};import{FocusTracker as _0x3d7a0f,KeystrokeHandler as _0x1251d2}from'ckeditor5/src/utils';import{View as _0x382b1e,FocusCycler as _0x58bcff,createLabeledTextarea as _0x36343e,FormHeaderView as _0x447c8f}from'ckeditor5/src/ui';import _0x4b864b from'./aiformtoolbarview';import _0x15a64d from'./aiformcontentarea';import _0x1119a4 from'./aiformerrorview';import _0xcbed79 from'./aiformpromptview';import _0x3baa3f from'./aihistorylistview';import _0x3c3157 from'./aihistorylistitemview';import _0xe0b6f2 from'./prompthistory';import{getTranslation as _0x2e47fd}from'../../utils/common-translations';import _0x296850 from'../../../theme/icons/robot-pencil.svg';export default class g extends _0x382b1e{constructor(_0x9d900f,_0x3ce465,_0x46275e=''){super(_0x9d900f),this['set']('isEnabled',!0x0),this[_0x40d8('0x21')](_0x40d8('0x3'),!0x1),this[_0x40d8('0x21')]('prompt',''),this[_0x40d8('0x21')](_0x40d8('0x33'),''),this[_0x40d8('0x21')]('isError',!0x1),this[_0x40d8('0x8')]=new _0xe0b6f2(),this[_0x40d8('0x3c')]=new _0x1119a4(_0x9d900f),this[_0x40d8('0x3a')]=new _0x447c8f(_0x9d900f,{'label':_0x2e47fd(_0x9d900f,_0x40d8('0x13')),'icon':_0x296850}),this[_0x40d8('0x30')]=new _0x15a64d(_0x9d900f,_0x46275e),this['contentArea'][_0x40d8('0x2a')]('isProcessing')['to'](this),this[_0x40d8('0x30')][_0x40d8('0x2a')](_0x40d8('0x33'))['to'](this),this[_0x40d8('0x0')]=this['_createToolbar'](),this[_0x40d8('0x2e')]=this[_0x40d8('0x2c')](),this[_0x40d8('0x34')]=new _0x3d7a0f(),this[_0x40d8('0x3d')]=new _0x1251d2(),this[_0x40d8('0x18')]=this['createCollection']([this[_0x40d8('0x30')],this[_0x40d8('0x30')][_0x40d8('0x1')],this[_0x40d8('0x0')],this['promptView']]),this[_0x40d8('0x16')]=new _0x58bcff({'focusables':this[_0x40d8('0x18')],'focusTracker':this['focusTracker'],'keystrokeHandler':this[_0x40d8('0x3d')],'actions':{'focusPrevious':_0x40d8('0x5'),'focusNext':_0x40d8('0x2f')}}),this[_0x40d8('0x2e')][_0x40d8('0x35')]['on'](_0x40d8('0x7'),_0x1341c6=>{this[_0x40d8('0x16')][_0x40d8('0x27')](),_0x1341c6[_0x40d8('0x17')]();}),this['promptView'][_0x40d8('0x35')]['on'](_0x40d8('0x24'),_0x4296c0=>{this[_0x40d8('0x16')]['focusPrevious'](),_0x4296c0[_0x40d8('0x17')]();}),this[_0x40d8('0x2e')]['queryView'][_0x40d8('0x1f')]['bind']('value')['to'](this,'prompt');const _0x1a0810=this[_0x40d8('0x1b')];this[_0x40d8('0x22')]({'tag':_0x40d8('0x19'),'attributes':{'class':['ck',_0x40d8('0x6'),_0x3ce465],'tabindex':'-1'},'children':[this[_0x40d8('0x3a')],{'tag':_0x40d8('0x19'),'attributes':{'class':['ck',_0x40d8('0x20')]},'children':[{'tag':_0x40d8('0x19'),'attributes':{'class':[_0x1a0810['if'](_0x40d8('0xb'),_0x40d8('0x31'),_0x428af2=>!_0x428af2)]},'children':[this[_0x40d8('0x3c')]]},this[_0x40d8('0x30')],this[_0x40d8('0x0')],this['promptView']]}]});}['render'](){super[_0x40d8('0xa')](),this[_0x40d8('0x34')][_0x40d8('0x28')](this['contentArea']['element']),this[_0x40d8('0x34')][_0x40d8('0x28')](this[_0x40d8('0x30')][_0x40d8('0x1')]['element']),this[_0x40d8('0x34')]['add'](this[_0x40d8('0x0')]['element']),this['focusTracker']['add'](this[_0x40d8('0x2e')][_0x40d8('0x1e')]),this[_0x40d8('0x3d')]['listenTo'](this[_0x40d8('0x1e')]);}[_0x40d8('0x2b')](){this[_0x40d8('0x16')][_0x40d8('0x2')]();}[_0x40d8('0x41')](){this[_0x40d8('0x3e')]='',this[_0x40d8('0x33')]='',this[_0x40d8('0x2e')][_0x40d8('0x41')](),this[_0x40d8('0x30')][_0x40d8('0x37')]=!0x1,this[_0x40d8('0x0')][_0x40d8('0x37')]=!0x1;}[_0x40d8('0x2c')](){const _0x3bd2a1=this[_0x40d8('0x12')],_0x1fe1c8=new _0xcbed79(_0x3bd2a1,{'queryView':{'label':_0x2e47fd(_0x3bd2a1,'Ask\x20AI\x20to\x20edit\x20or\x20generate'),'creator':_0x36343e,'showIcon':!0x1,'showResetButton':!0x1},'infoView':{'text':{'noSearchableItems':{'primary':_0x2e47fd(_0x3bd2a1,_0x40d8('0x1d')),'secondary':_0x2e47fd(_0x3bd2a1,_0x40d8('0x42'))}}},'filteredView':this[_0x40d8('0x26')](),'queryMinChars':0x1/0x0,'resetOnBlur':!0x1});return _0x1fe1c8['bind'](_0x40d8('0x15'))['to'](this,_0x40d8('0x15'),this,_0x40d8('0x3'),(_0x5f0685,_0x54638d)=>_0x5f0685&&!_0x54638d),this[_0x40d8('0x1a')](_0x1fe1c8,_0x40d8('0xe'),(_0x36fdef,_0x4620e8)=>{this[_0x40d8('0x3e')]=_0x4620e8,this[_0x40d8('0x36')]('submitPrompt',this[_0x40d8('0x3e')]),_0x4620e8[_0x40d8('0x3f')]()&&this[_0x40d8('0x8')][_0x40d8('0x28')]({'prompt':_0x4620e8[_0x40d8('0x3f')]()},0x0);},{'priority':'high'}),_0x1fe1c8;}[_0x40d8('0x26')](){const _0x5ec92f=new _0x3baa3f(this['locale']);return _0x5ec92f[_0x40d8('0x40')][_0x40d8('0x29')][_0x40d8('0x1c')](this['_promptHistory'])['as'](_0x3c3157),_0x5ec92f['on'](_0x40d8('0xf'),()=>{this[_0x40d8('0x8')][_0x40d8('0x43')](),this[_0x40d8('0x2e')][_0x40d8('0x11')](''),this[_0x40d8('0x2e')]['focus']();}),_0x5ec92f;}[_0x40d8('0x32')](){const _0x98a80d=new _0x4b864b(this['locale']);return _0x98a80d['replaceButton'][_0x40d8('0x2a')](_0x40d8('0x15'))['to'](this,'isEnabled',this,_0x40d8('0x3'),this,_0x40d8('0x33'),(_0x32b7ed,_0xa43471,_0x4180ec)=>_0x32b7ed&&!_0xa43471&&!!_0x4180ec),_0x98a80d[_0x40d8('0x23')]['on'](_0x40d8('0x38'),()=>{this[_0x40d8('0x36')](_0x40d8('0x9'),this[_0x40d8('0x33')]);}),_0x98a80d[_0x40d8('0x10')][_0x40d8('0x2a')](_0x40d8('0x15'))['to'](this,_0x40d8('0x15'),this,_0x40d8('0x3'),this,_0x40d8('0x33'),(_0xce93c0,_0x409742,_0x2b8523)=>_0xce93c0&&!_0x409742&&!!_0x2b8523),_0x98a80d[_0x40d8('0x10')]['on'](_0x40d8('0x38'),()=>{this[_0x40d8('0x36')](_0x40d8('0x25'),this['value']);}),_0x98a80d[_0x40d8('0x39')][_0x40d8('0x2a')](_0x40d8('0x15'))['to'](this,'isEnabled',this,_0x40d8('0x3'),(_0x9d7c5c,_0x5e4173)=>_0x9d7c5c&&!_0x5e4173),_0x98a80d['tryAgainButton']['on'](_0x40d8('0x38'),()=>{this[_0x40d8('0x36')]('tryAgainEvent');}),_0x98a80d[_0x40d8('0xd')][_0x40d8('0x2a')](_0x40d8('0x15'))['to'](this,'isProcessing'),_0x98a80d['stopButton']['on'](_0x40d8('0x38'),()=>{this['fire']('stopProcessing');}),_0x98a80d;}[_0x40d8('0x2d')](){this['value']='',this[_0x40d8('0xb')]=!0x1,this[_0x40d8('0x3')]=!0x0,this[_0x40d8('0x30')][_0x40d8('0x37')]=!0x0,this[_0x40d8('0x0')][_0x40d8('0x37')]=!0x0,this[_0x40d8('0x30')][_0x40d8('0x2b')]();}[_0x40d8('0xc')](){const _0x4f8e3f=this[_0x40d8('0x12')];this[_0x40d8('0x3')]=!0x1,this['prompt']='',this[_0x40d8('0x2e')][_0x40d8('0x41')](),this[_0x40d8('0x33')]&&(this['promptView'][_0x40d8('0x3b')]['label']=_0x2e47fd(_0x4f8e3f,'Ask\x20AI\x20to\x20improve\x20generated\x20text'));}['handleError'](_0x3a0877){const _0xc60d1=this[_0x40d8('0x12')];this[_0x40d8('0xc')](),this[_0x40d8('0xb')]=!0x0,this[_0x40d8('0x3c')][_0x40d8('0x4')]=_0x3a0877||_0x2e47fd(_0xc60d1,_0x40d8('0x14')),this[_0x40d8('0x33')]||(this[_0x40d8('0x30')]['isVisible']=!0x1);}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x2479=['fire','execute','prompt','set'];(function(_0x407b7b,_0x24799e){const _0x43282b=function(_0x1fe560){while(--_0x1fe560){_0x407b7b['push'](_0x407b7b['shift']());}};_0x43282b(++_0x24799e);}(_0x2479,0x173));const _0x4328=function(_0x407b7b,_0x24799e){_0x407b7b=_0x407b7b-0x0;let _0x43282b=_0x2479[_0x407b7b];return _0x43282b;};import{ListItemView as _0x2a23b9,ButtonView as _0x166d16}from'ckeditor5/src/ui';import _0x489374 from'../dropdown/buttonlabelwithhighlightview';import{unescape as _0x8fe10c}from'lodash-es';export default class et extends _0x2a23b9{constructor(_0x4bd8ba){super();const _0xf33f43=new _0x489374(),_0x5981e2=new _0x166d16(this['locale'],_0xf33f43);this['children']['add'](_0x5981e2),_0x5981e2[_0x4328('0x0')]({'label':_0x4bd8ba[_0x4328('0x3')],'withText':!0x0}),_0x5981e2['on'](_0x4328('0x2'),()=>{this[_0x4328('0x1')]('execute',{'value':_0x8fe10c(_0x4bd8ba['prompt'])});});}}
23
+ const _0x4930=['prompt','children','fire','locale','set','add','execute'];(function(_0x51d14b,_0x4930a4){const _0x3f4b73=function(_0x18814e){while(--_0x18814e){_0x51d14b['push'](_0x51d14b['shift']());}};_0x3f4b73(++_0x4930a4);}(_0x4930,0x1bc));const _0x3f4b=function(_0x51d14b,_0x4930a4){_0x51d14b=_0x51d14b-0x0;let _0x3f4b73=_0x4930[_0x51d14b];return _0x3f4b73;};import{ListItemView as _0x1be082,ButtonView as _0x118762}from'ckeditor5/src/ui';import _0x7360c from'../dropdown/buttonlabelwithhighlightview';import{unescape as _0x1f6fa3}from'lodash-es';export default class et extends _0x1be082{constructor(_0x4e9001){super();const _0x305c36=new _0x7360c(),_0x163b44=new _0x118762(this[_0x3f4b('0x0')],_0x305c36);this[_0x3f4b('0x5')][_0x3f4b('0x2')](_0x163b44),_0x163b44[_0x3f4b('0x1')]({'label':_0x4e9001[_0x3f4b('0x4')],'withText':!0x0}),_0x163b44['on']('execute',()=>{this[_0x3f4b('0x6')](_0x3f4b('0x3'),{'value':_0x1f6fa3(_0x4e9001[_0x3f4b('0x4')])});});}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x455c=['Prompt\x20history','set','locale','execute','length','items','_createClearHistoryButton','historyGroupView','clearHistoryButton','add','Clear','delegate','label','filter','children','fire'];(function(_0x50ccf1,_0x455c33){const _0x325516=function(_0xc835f4){while(--_0xc835f4){_0x50ccf1['push'](_0x50ccf1['shift']());}};_0x325516(++_0x455c33);}(_0x455c,0x1b7));const _0x3255=function(_0x50ccf1,_0x455c33){_0x50ccf1=_0x50ccf1-0x0;let _0x325516=_0x455c[_0x50ccf1];return _0x325516;};import{ListView as _0x409e56,ListItemGroupView as _0x494c90,ButtonView as _0x3fd911}from'ckeditor5/src/ui';import{getTranslation as _0x5a14ec}from'../../utils/common-translations';export default class it extends _0x409e56{constructor(_0x214f45){super(_0x214f45),this[_0x3255('0x1')]=this[_0x3255('0xf')](),this['historyGroupView']=new _0x494c90(),this[_0x3255('0x0')][_0x3255('0x7')]['add'](this['clearHistoryButton'],0x1),this[_0x3255('0x0')][_0x3255('0x5')]=_0x5a14ec(_0x214f45,_0x3255('0x9')),this[_0x3255('0x0')]['items'][_0x3255('0x4')](_0x3255('0xc'))['to'](this),this['items'][_0x3255('0x2')](this['historyGroupView']);}[_0x3255('0x6')](){let _0x5366e6=0x0;for(const _0x5eed81 of this['items'])_0x5366e6+=_0x5eed81[_0x3255('0xe')][_0x3255('0xd')];return{'resultsCount':_0x5366e6,'totalItemsCount':_0x5366e6};}['_createClearHistoryButton'](){const _0x4d1702=this[_0x3255('0xb')],_0x28fdf4=new _0x3fd911(this['locale']);return _0x28fdf4[_0x3255('0xa')]({'label':'('+_0x5a14ec(_0x4d1702,_0x3255('0x3'))+')','withText':!0x0}),_0x28fdf4['on'](_0x3255('0xc'),()=>this[_0x3255('0x8')]('clearHistory')),_0x28fdf4;}}
23
+ const _0x1d15=['historyGroupView','delegate','add','children','filter','locale','Prompt\x20history','Clear','clearHistoryButton','execute','set','fire','_createClearHistoryButton','length','items'];(function(_0x505cbe,_0x1d155d){const _0x5a1ca6=function(_0xee3a78){while(--_0xee3a78){_0x505cbe['push'](_0x505cbe['shift']());}};_0x5a1ca6(++_0x1d155d);}(_0x1d15,0x1b5));const _0x5a1c=function(_0x505cbe,_0x1d155d){_0x505cbe=_0x505cbe-0x0;let _0x5a1ca6=_0x1d15[_0x505cbe];return _0x5a1ca6;};import{ListView as _0x3a7922,ListItemGroupView as _0x2ff9f8,ButtonView as _0x4fe283}from'ckeditor5/src/ui';import{getTranslation as _0x51973b}from'../../utils/common-translations';export default class it extends _0x3a7922{constructor(_0x45e7be){super(_0x45e7be),this[_0x5a1c('0x6')]=this['_createClearHistoryButton'](),this[_0x5a1c('0xd')]=new _0x2ff9f8(),this[_0x5a1c('0xd')][_0x5a1c('0x1')][_0x5a1c('0x0')](this[_0x5a1c('0x6')],0x1),this[_0x5a1c('0xd')]['label']=_0x51973b(_0x45e7be,_0x5a1c('0x4')),this[_0x5a1c('0xd')][_0x5a1c('0xc')][_0x5a1c('0xe')]('execute')['to'](this),this[_0x5a1c('0xc')][_0x5a1c('0x0')](this[_0x5a1c('0xd')]);}[_0x5a1c('0x2')](){let _0x53cf2f=0x0;for(const _0x392f29 of this['items'])_0x53cf2f+=_0x392f29[_0x5a1c('0xc')][_0x5a1c('0xb')];return{'resultsCount':_0x53cf2f,'totalItemsCount':_0x53cf2f};}[_0x5a1c('0xa')](){const _0x256258=this[_0x5a1c('0x3')],_0xc79692=new _0x4fe283(this[_0x5a1c('0x3')]);return _0xc79692[_0x5a1c('0x8')]({'label':'('+_0x51973b(_0x256258,_0x5a1c('0x5'))+')','withText':!0x0}),_0xc79692['on'](_0x5a1c('0x7'),()=>this[_0x5a1c('0x9')]('clearHistory')),_0xc79692;}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x258f=['getItem','remove','_loadFromSessionStorage','addMany','_saveToSessionStorage','setItem','toLowerCase','add','map','trim','stringify','length','prompt'];(function(_0x4cd560,_0x258f4a){const _0x38efe2=function(_0x9fb40a){while(--_0x9fb40a){_0x4cd560['push'](_0x4cd560['shift']());}};_0x38efe2(++_0x258f4a);}(_0x258f,0x1a7));const _0x38ef=function(_0x4cd560,_0x258f4a){_0x4cd560=_0x4cd560-0x0;let _0x38efe2=_0x258f[_0x4cd560];return _0x38efe2;};import{Collection as _0x7b8a0c}from'ckeditor5/src/utils';const ts='CKEditor/AIFormView/PromptHistory';export default class rt extends _0x7b8a0c{constructor(){super(),this[_0x38ef('0x8')](),this['on'](_0x38ef('0x0'),(_0x3daf5f,_0x3a87e2)=>{const _0x3ceb97=os(_0x3a87e2[_0x38ef('0x5')]);for(const _0x5f59a8 of this)if(_0x5f59a8!=_0x3a87e2&&os(_0x5f59a8[_0x38ef('0x5')])===_0x3ceb97){this[_0x38ef('0x7')](_0x5f59a8);break;}this[_0x38ef('0x4')]>0x14&&this[_0x38ef('0x7')](this['last']),this[_0x38ef('0xa')]();}),this['on'](_0x38ef('0x7'),()=>{this[_0x38ef('0xa')]();});}[_0x38ef('0x8')](){const _0x33bc99=sessionStorage[_0x38ef('0x6')](ts)||'[]';this[_0x38ef('0x9')](JSON['parse'](_0x33bc99));}[_0x38ef('0xa')](){sessionStorage[_0x38ef('0xb')](ts,JSON[_0x38ef('0x3')](this[_0x38ef('0x1')](_0x55a820=>_0x55a820)));}}function os(_0x162805){return _0x162805[_0x38ef('0xc')]()[_0x38ef('0x2')]();}
23
+ const _0x13c8=['stringify','toLowerCase','map','getItem','add','remove','setItem','_saveToSessionStorage','last','_loadFromSessionStorage','CKEditor/AIFormView/PromptHistory','prompt'];(function(_0x3bb4ae,_0x13c8a7){const _0x492ac5=function(_0x346db3){while(--_0x346db3){_0x3bb4ae['push'](_0x3bb4ae['shift']());}};_0x492ac5(++_0x13c8a7);}(_0x13c8,0x15f));const _0x492a=function(_0x3bb4ae,_0x13c8a7){_0x3bb4ae=_0x3bb4ae-0x0;let _0x492ac5=_0x13c8[_0x3bb4ae];return _0x492ac5;};import{Collection as _0x1dae16}from'ckeditor5/src/utils';const ts=_0x492a('0x7');export default class rt extends _0x1dae16{constructor(){super(),this[_0x492a('0x6')](),this['on'](_0x492a('0x1'),(_0x163915,_0x3cd8c5)=>{const _0x518b59=os(_0x3cd8c5[_0x492a('0x8')]);for(const _0x59ad43 of this)if(_0x59ad43!=_0x3cd8c5&&os(_0x59ad43['prompt'])===_0x518b59){this['remove'](_0x59ad43);break;}this['length']>0x14&&this[_0x492a('0x2')](this[_0x492a('0x5')]),this[_0x492a('0x4')]();}),this['on'](_0x492a('0x2'),()=>{this['_saveToSessionStorage']();});}[_0x492a('0x6')](){const _0x3ae387=sessionStorage[_0x492a('0x0')](ts)||'[]';this['addMany'](JSON['parse'](_0x3ae387));}[_0x492a('0x4')](){sessionStorage[_0x492a('0x3')](ts,JSON[_0x492a('0x9')](this[_0x492a('0xb')](_0x5ca23f=>_0x5ca23f)));}}function os(_0x2069bd){return _0x2069bd[_0x492a('0xa')]()['trim']();}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x2a9e=['name','includes','isEnabled','getItems','config','editor','get','execute','model','aiAssistant.disabledElements','refresh'];(function(_0x5b1d67,_0x2a9e26){const _0x3ae469=function(_0x5d2248){while(--_0x5d2248){_0x5b1d67['push'](_0x5b1d67['shift']());}};_0x3ae469(++_0x2a9e26);}(_0x2a9e,0x1e3));const _0x3ae4=function(_0x5b1d67,_0x2a9e26){_0x5b1d67=_0x5b1d67-0x0;let _0x3ae469=_0x2a9e[_0x5b1d67];return _0x3ae469;};import{Command as _0x1ab295}from'ckeditor5/src/core';import _0x1568ac from'../aiassistantui';export default class A extends _0x1ab295{[_0x3ae4('0x0')](){const _0x1e3f0c=this[_0x3ae4('0x6')][_0x3ae4('0x9')]['document']['selection'],_0x1c13f1=this[_0x3ae4('0x6')][_0x3ae4('0x5')]['get'](_0x3ae4('0xa'));for(const _0x1e4a64 of _0x1e3f0c['getRanges']())for(const _0x2cc25b of _0x1e4a64[_0x3ae4('0x4')]())if(_0x2cc25b['is']('element')&&_0x1c13f1[_0x3ae4('0x2')](_0x2cc25b[_0x3ae4('0x1')]))return void(this[_0x3ae4('0x3')]=!0x1);this[_0x3ae4('0x3')]=!0x0;}[_0x3ae4('0x8')](_0x59f48b='',_0x2a00a4=''){this[_0x3ae4('0x6')]['plugins'][_0x3ae4('0x7')](_0x1568ac)['showUI'](_0x59f48b,_0x2a00a4);}}
23
+ const _0x3705=['includes','model','isEnabled','execute','aiAssistant.disabledElements','name','selection','plugins','getItems','editor','showUI','getRanges','get','config'];(function(_0x395956,_0x370565){const _0x1b4a9a=function(_0x167aea){while(--_0x167aea){_0x395956['push'](_0x395956['shift']());}};_0x1b4a9a(++_0x370565);}(_0x3705,0x155));const _0x1b4a=function(_0x395956,_0x370565){_0x395956=_0x395956-0x0;let _0x1b4a9a=_0x3705[_0x395956];return _0x1b4a9a;};import{Command as _0x48351f}from'ckeditor5/src/core';import _0x44541b from'../aiassistantui';export default class A extends _0x48351f{['refresh'](){const _0x17e216=this[_0x1b4a('0x4')][_0x1b4a('0xa')]['document'][_0x1b4a('0x1')],_0x411451=this[_0x1b4a('0x4')][_0x1b4a('0x8')][_0x1b4a('0x7')](_0x1b4a('0xd'));for(const _0x25f6f9 of _0x17e216[_0x1b4a('0x6')]())for(const _0xa1941f of _0x25f6f9[_0x1b4a('0x3')]())if(_0xa1941f['is']('element')&&_0x411451[_0x1b4a('0x9')](_0xa1941f[_0x1b4a('0x0')]))return void(this[_0x1b4a('0xb')]=!0x1);this[_0x1b4a('0xb')]=!0x0;}[_0x1b4a('0xc')](_0x2ce767='',_0x115db2=''){this[_0x1b4a('0x4')][_0x1b4a('0x2')][_0x1b4a('0x7')](_0x44541b)[_0x1b4a('0x5')](_0x2ce767,_0x115db2);}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- export function getTranslation(_0xa44d70,_0xdefb25,_0x59825e){const t=_0xa44d70['t'];switch(_0xdefb25){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',_0x59825e);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 _0xdefb25;}}
23
+ export function getTranslation(_0x1eedc0,_0x44212e,_0x2abe62){const t=_0x1eedc0['t'];switch(_0x44212e){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',_0x2abe62);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 _0x44212e;}}