@ckeditor/ckeditor5-ai 0.0.0-nightly-20231123.0 → 0.0.0-nightly-20231124.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 _0x5654=['parseFromString','_normalizeResponseHeadings','config','aiAssistant','authKey','</span>','user','Authorization','name','content','processor','match','get','reject','signal','text/html','max_tokens','body','rename','application/json','locale','[DONE]','gpt-3.5-turbo','_isBufferIncomplete','<span>','choices','message','aborted','startsWith','AIConnector','push','stringify','editor','stream','_abortController','editing','replace','Instruction:\x0a','system','aiAssistant.requestParameters.temperature','delta','_apiUrl','split','resolve','_prepareMessages','top_p','length','_requestParameters','Bearer\x20','\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a','sendPrompt','includes','catch','abort','aiconnector-send-prompt-failed','temperature','AbortError','view','map','element','join','define','POST','context_length_exceeded','text','read','https://api.openai.com/v1/chat/completions','parse','Your\x20task\x20is\x20to\x20generate\x20HTML\x20content\x20accordingly\x20to\x20the\x20given\x20instruction.\x20Never\x20include\x20<img>\x20tag\x20in\x20your\x20response\x20even\x20if\x20asked\x20for.\x20Your\x20answer\x20must\x20be\x20a\x20well-structured\x20and\x20properly\x20formatted\x20HTML\x20code.\x20Answer\x20only\x20with\x20the\x20generated\x20HTML\x20content.\x20Do\x20not\x20add\x20any\x20additional\x20remarks\x20or\x20notes.\x20Do\x20not\x20act\x20like\x20a\x20chatbot\x20or\x20a\x20real\x20person.','toModel','aiAssistant.requestParameters.model','string','aiAssistant.requestParameters.stream','_cleanUpData','data:\x20','_authKey','_domParser','AI_ERROR_AUTH_REQUEST','document','aiAssistant.apiUrl','_readStaticResponse','serializeToString','_readStreamableResponse','getReader','Your\x20task\x20is\x20to\x20execute\x20the\x20instruction\x20using\x20the\x20provided\x20HTML\x20content.\x20Follow\x20the\x20instruction\x20closely.\x20Your\x20answer\x20must\x20be\x20a\x20properly\x20formatted\x20HTML\x20code.\x20Do\x20not\x20add\x20any\x20additional\x20remarks\x20or\x20notes.\x20Do\x20not\x20act\x20like\x20a\x20chatbot\x20or\x20a\x20real\x20person.','_parseAndNormalizeContent','aiAssistant.requestParameters.top_p','AI_ERROR_MODERATION','error','adapter','decode','_xmlSerializer'];(function(_0x280d26,_0x565484){const _0x2b4274=function(_0x6bb579){while(--_0x6bb579){_0x280d26['push'](_0x280d26['shift']());}};_0x2b4274(++_0x565484);}(_0x5654,0x10c));const _0x2b42=function(_0x280d26,_0x565484){_0x280d26=_0x280d26-0x0;let _0x2b4274=_0x5654[_0x280d26];return _0x2b4274;};import{Matcher as _0x5e265b,UpcastWriter as _0xbda6ff}from'ckeditor5/src/engine';import{Plugin as _0x1b5985}from'ckeditor5/src/core';import{CKEditorError as _0x4ed66a}from'ckeditor5/src/utils';import{getTranslation as _0xd0c8c4}from'./utils/common-translations';export default class o extends _0x1b5985{static get['pluginName'](){return _0x2b42('0x25');}constructor(_0x18e93b){super(_0x18e93b),_0x18e93b[_0x2b42('0xa')][_0x2b42('0x45')](_0x2b42('0x57'),_0x2b42('0x4a')),_0x18e93b['config'][_0x2b42('0x45')](_0x2b42('0x4e'),_0x2b42('0x1e')),_0x18e93b[_0x2b42('0xa')][_0x2b42('0x45')]('aiAssistant.requestParameters.max_tokens',0x7d0),_0x18e93b[_0x2b42('0xa')]['define'](_0x2b42('0x2f'),0x1),_0x18e93b['config'][_0x2b42('0x45')](_0x2b42('0x2'),0x1),_0x18e93b['config'][_0x2b42('0x45')](_0x2b42('0x50'),!0x0);const _0x2e9f66=_0x18e93b['config'][_0x2b42('0x14')](_0x2b42('0x57')),_0x3cc29a=_0x18e93b[_0x2b42('0xa')]['get'](_0x2b42('0xb'))[_0x2b42('0xc')],_0x3bb076=_0x18e93b[_0x2b42('0xa')]['get']('aiAssistant.requestParameters');this[_0x2b42('0x2a')]=new AbortController(),this[_0x2b42('0x5')]=new OpenAIAdapter(_0x18e93b,_0x2e9f66,_0x3bb076,_0x3cc29a);}async['processPrompt'](_0x2736dc,_0x3c16c6,_0x26cdb2){const {systemMessage:_0x3cac37,userMessage:_0x2ccf4a}=this['_prepareMessages'](_0x2736dc,_0x3c16c6);return this[_0x2b42('0x5')][_0x2b42('0x3a')](_0x3cac37,_0x2ccf4a,this[_0x2b42('0x2a')][_0x2b42('0x16')],_0x26cdb2)[_0x2b42('0x3c')](_0x20def8=>{if(_0x20def8 instanceof AIRequestError)return Promise[_0x2b42('0x15')](_0x20def8);if(_0x2b42('0x40')==_0x20def8[_0x2b42('0x10')])return Promise[_0x2b42('0x33')]();throw console[_0x2b42('0x4')](_0x20def8),new _0x4ed66a(_0x2b42('0x3e'),null);});}['abort'](){this[_0x2b42('0x2a')][_0x2b42('0x16')][_0x2b42('0x23')]||(this[_0x2b42('0x2a')][_0x2b42('0x3d')](),this[_0x2b42('0x2a')]=new AbortController());}[_0x2b42('0x34')](_0x4136f5,_0x296d45){let _0x54103f,_0x2cac36;return _0x296d45?(_0x54103f=_0x2b42('0x0'),_0x2cac36=_0x2b42('0x2d')+_0x4136f5+_0x2b42('0x39')+(_0x296d45[_0x2b42('0x24')]('<')?_0x296d45:_0x2b42('0x20')+_0x296d45+_0x2b42('0xd'))):(_0x54103f=_0x2b42('0x4c'),_0x2cac36=_0x4136f5),{'systemMessage':_0x54103f,'userMessage':_0x2cac36};}}export class OpenAIAdapter{constructor(_0x5722d6,_0x52da5e,_0x587214,_0x2acacf){this['editor']=_0x5722d6,this['_apiUrl']=_0x52da5e,this[_0x2b42('0x53')]=_0x2acacf,this[_0x2b42('0x37')]=_0x587214,this['_domParser']=new DOMParser(),this['_xmlSerializer']=new XMLSerializer();}async['sendPrompt'](_0x393f52,_0x441944,_0x597042,_0x5289e3){const _0x4eab01=this[_0x2b42('0x28')][_0x2b42('0x1c')],_0x2a8826={'Content-Type':_0x2b42('0x1b')};if(_0x2b42('0x4f')==typeof this[_0x2b42('0x53')])_0x2a8826[_0x2b42('0xf')]=_0x2b42('0x38')+this[_0x2b42('0x53')];else{if(this[_0x2b42('0x53')])try{const _0x51ec3e=await this['_authKey']();_0x2a8826['Authorization']=_0x2b42('0x38')+_0x51ec3e;}catch(_0x4b074b){return Promise['reject'](new AIRequestError(_0xd0c8c4(_0x4eab01,_0x2b42('0x55'))));}}const _0x5f476a={'model':this['_requestParameters']['model'],'messages':[{'role':_0x2b42('0x2e'),'content':_0x393f52},{'role':_0x2b42('0xe'),'content':_0x441944}],'stream':this[_0x2b42('0x37')][_0x2b42('0x29')],'max_tokens':this[_0x2b42('0x37')][_0x2b42('0x18')],'temperature':this[_0x2b42('0x37')][_0x2b42('0x3f')],'top_p':this[_0x2b42('0x37')][_0x2b42('0x35')]};this['_requestParameters'][_0x2b42('0xe')]&&(_0x5f476a['user']=this[_0x2b42('0x37')][_0x2b42('0xe')]);const _0x4ce5cd={'method':_0x2b42('0x46'),'headers':_0x2a8826,'body':JSON[_0x2b42('0x27')](_0x5f476a),'signal':_0x597042},_0x325a58=await fetch(this[_0x2b42('0x31')],_0x4ce5cd);if(_0x325a58['ok'])return this['_requestParameters'][_0x2b42('0x29')]?await this[_0x2b42('0x5a')](_0x325a58,_0x5289e3):await this['_readStaticResponse'](_0x325a58,_0x5289e3),Promise[_0x2b42('0x33')]();{const _0x143db2=await _0x325a58[_0x2b42('0x48')]();return _0x143db2[_0x2b42('0x3b')](_0x2b42('0x47'))?Promise['reject'](new AIRequestError(_0xd0c8c4(_0x4eab01,'AI_ERROR_CONTEXT_LENGTH'))):_0x143db2[_0x2b42('0x3b')]('Moderation')?Promise[_0x2b42('0x15')](new AIRequestError(_0xd0c8c4(_0x4eab01,_0x2b42('0x3')))):Promise[_0x2b42('0x15')](new Error(_0x143db2));}}async['_readStreamableResponse'](_0xd55347,_0xd6540a){const _0x1200bb=_0xd55347[_0x2b42('0x19')][_0x2b42('0x5b')](),_0x37477a=new TextDecoder();let _0x4afcbc='',_0x947833='',_0x5dc674='',_0x26c30c=!0x1;for(;!_0x26c30c;){const {done:_0x4075d1,value:_0xe71c5f}=await _0x1200bb[_0x2b42('0x49')](),_0x314fd2=_0x4afcbc+_0x37477a[_0x2b42('0x6')](_0xe71c5f);let _0x5767fd='';_0x26c30c=_0x4075d1;try{_0x5767fd=this[_0x2b42('0x51')](_0x314fd2),_0x4afcbc='';}catch(_0xf45909){_0x4afcbc=_0x314fd2;continue;}_0x947833+=_0x5767fd,!_0x4075d1&&this[_0x2b42('0x1f')](_0x947833)||_0x947833&&(_0x5dc674+=_0x947833,_0xd6540a(this[_0x2b42('0x1')](_0x5dc674)),_0x947833='');}return Promise[_0x2b42('0x33')]();}async[_0x2b42('0x58')](_0x444896,_0x2d09ff){const _0x174ce3=(await _0x444896['json']())[_0x2b42('0x21')][0x0][_0x2b42('0x22')][_0x2b42('0x11')];return _0x2d09ff(this['_parseAndNormalizeContent'](_0x174ce3)),Promise['resolve']();}[_0x2b42('0x1f')](_0x4b91b3){const _0x26c0c8=_0x4b91b3[_0x2b42('0x32')]('<')[_0x2b42('0x36')]!==_0x4b91b3[_0x2b42('0x32')]('>')[_0x2b42('0x36')],_0x3de53e=_0x4b91b3[_0x2b42('0x36')]<0x1e;return _0x26c0c8&&_0x3de53e;}[_0x2b42('0x1')](_0x56bfbb){const _0x50ecef=this[_0x2b42('0x54')][_0x2b42('0x8')](_0x56bfbb,_0x2b42('0x17')),_0x3dd424=this['editor']['data'][_0x2b42('0x12')]['toView'](this[_0x2b42('0x7')][_0x2b42('0x59')](_0x50ecef[_0x2b42('0x19')]));return this[_0x2b42('0x9')](_0x3dd424),this['editor']['data'][_0x2b42('0x27')](this[_0x2b42('0x28')]['data'][_0x2b42('0x4d')](_0x3dd424));}[_0x2b42('0x9')](_0x531a46){const _0x4da3ef=new _0xbda6ff(this[_0x2b42('0x28')][_0x2b42('0x2b')][_0x2b42('0x41')][_0x2b42('0x56')]),_0x5261e5=new _0x5e265b({'name':/^h[1-5]$/}),_0x54fd60=[];let _0x1dbd5c=!0x1;for(const _0x4d9eb0 of _0x531a46)_0x4d9eb0['is'](_0x2b42('0x43'))&&_0x5261e5[_0x2b42('0x13')](_0x4d9eb0)&&(_0x54fd60[_0x2b42('0x26')](_0x4d9eb0),'h1'==_0x4d9eb0[_0x2b42('0x10')]&&(_0x1dbd5c=!0x0));if(_0x1dbd5c)for(const _0x2dd892 of _0x54fd60)_0x4da3ef[_0x2b42('0x1a')]('h'+(parseInt(_0x2dd892['name'][0x1])+0x1),_0x2dd892);}[_0x2b42('0x51')](_0x16cacd){return _0x16cacd[_0x2b42('0x32')](/\n(?![^{]*\})/g)[_0x2b42('0x42')](_0x5962a0=>_0x5962a0[_0x2b42('0x2c')](_0x2b42('0x52'),''))['filter'](_0x183350=>_0x183350&&_0x183350[_0x2b42('0x36')]>0x0&&_0x2b42('0x1d')!==_0x183350)['map'](_0x187026=>{const {choices:_0x5dddf6}=JSON[_0x2b42('0x4b')](_0x187026);if(_0x5dddf6[0x0]&&_0x5dddf6[0x0][_0x2b42('0x30')]&&_0x5dddf6[0x0][_0x2b42('0x30')][_0x2b42('0x11')])return _0x5dddf6[0x0][_0x2b42('0x30')][_0x2b42('0x11')];})['filter'](_0x5456c2=>_0x5456c2)[_0x2b42('0x44')]('');}}export class AIRequestError extends Error{constructor(_0x4699a3){super(_0x4699a3),this[_0x2b42('0x10')]='AIRequestError';}}
23
+ const _0x5357=['rename','Authorization','AI_ERROR_AUTH_REQUEST','max_tokens','join','Instruction:\x0a','choices','json','POST','AIConnector','https://api.openai.com/v1/chat/completions','_parseAndNormalizeContent','Moderation','temperature','_apiUrl','error','processPrompt','serializeToString','AI_ERROR_CONTEXT_LENGTH','name','_normalizeResponseHeadings','Your\x20task\x20is\x20to\x20generate\x20HTML\x20content\x20accordingly\x20to\x20the\x20given\x20instruction.\x20Never\x20include\x20<img>\x20tag\x20in\x20your\x20response\x20even\x20if\x20asked\x20for.\x20Your\x20answer\x20must\x20be\x20a\x20well-structured\x20and\x20properly\x20formatted\x20HTML\x20code.\x20Answer\x20only\x20with\x20the\x20generated\x20HTML\x20content.\x20Do\x20not\x20add\x20any\x20additional\x20remarks\x20or\x20notes.\x20Do\x20not\x20act\x20like\x20a\x20chatbot\x20or\x20a\x20real\x20person.','delta','adapter','abort','decode','define','Your\x20task\x20is\x20to\x20execute\x20the\x20instruction\x20using\x20the\x20provided\x20HTML\x20content.\x20Follow\x20the\x20instruction\x20closely.\x20Your\x20answer\x20must\x20be\x20a\x20properly\x20formatted\x20HTML\x20code.\x20Do\x20not\x20add\x20any\x20additional\x20remarks\x20or\x20notes.\x20Do\x20not\x20act\x20like\x20a\x20chatbot\x20or\x20a\x20real\x20person.','resolve','editor','filter','aiAssistant.requestParameters.stream','document','string','push','locale','top_p','stream','read','user','split','text/html','stringify','message','_cleanUpData','length','[DONE]','element','_prepareMessages','aiAssistant.requestParameters.top_p','includes','AIRequestError','replace','aiAssistant','_requestParameters','data:\x20','data','content','system','gpt-3.5-turbo','aborted','Bearer\x20','aiconnector-send-prompt-failed','processor','authKey','model','_readStaticResponse','pluginName','editing','toModel','aiAssistant.requestParameters.temperature','_abortController','\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a','_domParser','signal','startsWith','get','body','parse','AI_ERROR_MODERATION','_readStreamableResponse','sendPrompt','_authKey','_isBufferIncomplete','config','aiAssistant.apiUrl','reject'];(function(_0x20b061,_0x535770){const _0x3073fe=function(_0x139457){while(--_0x139457){_0x20b061['push'](_0x20b061['shift']());}};_0x3073fe(++_0x535770);}(_0x5357,0xed));const _0x3073=function(_0x20b061,_0x535770){_0x20b061=_0x20b061-0x0;let _0x3073fe=_0x5357[_0x20b061];return _0x3073fe;};import{Matcher as _0x58a4e2,UpcastWriter as _0x3c2952}from'ckeditor5/src/engine';import{Plugin as _0x2453ff}from'ckeditor5/src/core';import{CKEditorError as _0x1041d2}from'ckeditor5/src/utils';import{getTranslation as _0x5c3586}from'./utils/common-translations';export default class o extends _0x2453ff{static get[_0x3073('0x4')](){return _0x3073('0x21');}constructor(_0x2bf5ed){super(_0x2bf5ed),_0x2bf5ed[_0x3073('0x15')][_0x3073('0x32')](_0x3073('0x16'),_0x3073('0x22')),_0x2bf5ed['config'][_0x3073('0x32')]('aiAssistant.requestParameters.model',_0x3073('0x53')),_0x2bf5ed['config'][_0x3073('0x32')]('aiAssistant.requestParameters.max_tokens',0x7d0),_0x2bf5ed['config'][_0x3073('0x32')](_0x3073('0x7'),0x1),_0x2bf5ed[_0x3073('0x15')][_0x3073('0x32')](_0x3073('0x49'),0x1),_0x2bf5ed['config'][_0x3073('0x32')](_0x3073('0x37'),!0x0);const _0x457faf=_0x2bf5ed[_0x3073('0x15')]['get'](_0x3073('0x16')),_0x18d6f3=_0x2bf5ed[_0x3073('0x15')]['get'](_0x3073('0x4d'))[_0x3073('0x1')],_0x33d5bf=_0x2bf5ed[_0x3073('0x15')][_0x3073('0xd')]('aiAssistant.requestParameters');this[_0x3073('0x8')]=new AbortController(),this[_0x3073('0x2f')]=new OpenAIAdapter(_0x2bf5ed,_0x457faf,_0x33d5bf,_0x18d6f3);}async[_0x3073('0x28')](_0x18a37d,_0x2a0853,_0x507ef9){const {systemMessage:_0x5e6a5c,userMessage:_0x11d248}=this[_0x3073('0x48')](_0x18a37d,_0x2a0853);return this[_0x3073('0x2f')]['sendPrompt'](_0x5e6a5c,_0x11d248,this['_abortController'][_0x3073('0xb')],_0x507ef9)['catch'](_0x2e52b9=>{if(_0x2e52b9 instanceof AIRequestError)return Promise[_0x3073('0x17')](_0x2e52b9);if('AbortError'==_0x2e52b9['name'])return Promise[_0x3073('0x34')]();throw console[_0x3073('0x27')](_0x2e52b9),new _0x1041d2(_0x3073('0x56'),null);});}[_0x3073('0x30')](){this['_abortController'][_0x3073('0xb')][_0x3073('0x54')]||(this['_abortController'][_0x3073('0x30')](),this[_0x3073('0x8')]=new AbortController());}[_0x3073('0x48')](_0x51a036,_0x1f8fa6){let _0x237fbf,_0x585d62;return _0x1f8fa6?(_0x237fbf=_0x3073('0x33'),_0x585d62=_0x3073('0x1d')+_0x51a036+_0x3073('0x9')+(_0x1f8fa6[_0x3073('0xc')]('<')?_0x1f8fa6:'<span>'+_0x1f8fa6+'</span>')):(_0x237fbf=_0x3073('0x2d'),_0x585d62=_0x51a036),{'systemMessage':_0x237fbf,'userMessage':_0x585d62};}}export class OpenAIAdapter{constructor(_0x178ffa,_0x2980ed,_0x1134d6,_0x3f22e2){this[_0x3073('0x35')]=_0x178ffa,this[_0x3073('0x26')]=_0x2980ed,this['_authKey']=_0x3f22e2,this['_requestParameters']=_0x1134d6,this[_0x3073('0xa')]=new DOMParser(),this['_xmlSerializer']=new XMLSerializer();}async[_0x3073('0x12')](_0x153a02,_0x4d8058,_0x2e917f,_0x53e0ea){const _0x490919=this['editor'][_0x3073('0x3b')],_0x5d1336={'Content-Type':'application/json'};if(_0x3073('0x39')==typeof this[_0x3073('0x13')])_0x5d1336[_0x3073('0x19')]=_0x3073('0x55')+this[_0x3073('0x13')];else{if(this[_0x3073('0x13')])try{const _0x1d3aa8=await this[_0x3073('0x13')]();_0x5d1336[_0x3073('0x19')]=_0x3073('0x55')+_0x1d3aa8;}catch(_0x48148b){return Promise[_0x3073('0x17')](new AIRequestError(_0x5c3586(_0x490919,_0x3073('0x1a'))));}}const _0xb5225e={'model':this['_requestParameters'][_0x3073('0x2')],'messages':[{'role':_0x3073('0x52'),'content':_0x153a02},{'role':_0x3073('0x3f'),'content':_0x4d8058}],'stream':this[_0x3073('0x4e')][_0x3073('0x3d')],'max_tokens':this[_0x3073('0x4e')][_0x3073('0x1b')],'temperature':this[_0x3073('0x4e')][_0x3073('0x25')],'top_p':this['_requestParameters'][_0x3073('0x3c')]};this[_0x3073('0x4e')][_0x3073('0x3f')]&&(_0xb5225e[_0x3073('0x3f')]=this[_0x3073('0x4e')]['user']);const _0x9ee9cf={'method':_0x3073('0x20'),'headers':_0x5d1336,'body':JSON[_0x3073('0x42')](_0xb5225e),'signal':_0x2e917f},_0x15a3bd=await fetch(this['_apiUrl'],_0x9ee9cf);if(_0x15a3bd['ok'])return this[_0x3073('0x4e')]['stream']?await this[_0x3073('0x11')](_0x15a3bd,_0x53e0ea):await this[_0x3073('0x3')](_0x15a3bd,_0x53e0ea),Promise['resolve']();{const _0x1f6886=await _0x15a3bd['text']();return _0x1f6886[_0x3073('0x4a')]('context_length_exceeded')?Promise[_0x3073('0x17')](new AIRequestError(_0x5c3586(_0x490919,_0x3073('0x2a')))):_0x1f6886['includes'](_0x3073('0x24'))?Promise[_0x3073('0x17')](new AIRequestError(_0x5c3586(_0x490919,_0x3073('0x10')))):Promise[_0x3073('0x17')](new Error(_0x1f6886));}}async[_0x3073('0x11')](_0x28a0df,_0x1b3578){const _0x197289=_0x28a0df[_0x3073('0xe')]['getReader'](),_0x1e9ebd=new TextDecoder();let _0x30b635='',_0x55e165='',_0x4ade8b='',_0x484fab=!0x1;for(;!_0x484fab;){const {done:_0x4807e3,value:_0x5e0350}=await _0x197289[_0x3073('0x3e')](),_0x16e508=_0x30b635+_0x1e9ebd[_0x3073('0x31')](_0x5e0350);let _0x302ebb='';_0x484fab=_0x4807e3;try{_0x302ebb=this[_0x3073('0x44')](_0x16e508),_0x30b635='';}catch(_0x3f0478){_0x30b635=_0x16e508;continue;}_0x55e165+=_0x302ebb,!_0x4807e3&&this[_0x3073('0x14')](_0x55e165)||_0x55e165&&(_0x4ade8b+=_0x55e165,_0x1b3578(this['_parseAndNormalizeContent'](_0x4ade8b)),_0x55e165='');}return Promise[_0x3073('0x34')]();}async[_0x3073('0x3')](_0x57f59b,_0x23627b){const _0x18d5e9=(await _0x57f59b[_0x3073('0x1f')]())[_0x3073('0x1e')][0x0][_0x3073('0x43')][_0x3073('0x51')];return _0x23627b(this[_0x3073('0x23')](_0x18d5e9)),Promise[_0x3073('0x34')]();}[_0x3073('0x14')](_0x583dbe){const _0x476c1a=_0x583dbe[_0x3073('0x40')]('<')[_0x3073('0x45')]!==_0x583dbe[_0x3073('0x40')]('>')[_0x3073('0x45')],_0x121474=_0x583dbe[_0x3073('0x45')]<0x1e;return _0x476c1a&&_0x121474;}[_0x3073('0x23')](_0x17dbdf){const _0x1abdab=this['_domParser']['parseFromString'](_0x17dbdf,_0x3073('0x41')),_0x4553fa=this[_0x3073('0x35')]['data'][_0x3073('0x0')]['toView'](this['_xmlSerializer'][_0x3073('0x29')](_0x1abdab['body']));return this[_0x3073('0x2c')](_0x4553fa),this[_0x3073('0x35')][_0x3073('0x50')]['stringify'](this['editor'][_0x3073('0x50')][_0x3073('0x6')](_0x4553fa));}[_0x3073('0x2c')](_0x39f11e){const _0x5efe76=new _0x3c2952(this[_0x3073('0x35')][_0x3073('0x5')]['view'][_0x3073('0x38')]),_0x47437c=new _0x58a4e2({'name':/^h[1-5]$/}),_0x48808f=[];let _0x30c5e4=!0x1;for(const _0x36df4e of _0x39f11e)_0x36df4e['is'](_0x3073('0x47'))&&_0x47437c['match'](_0x36df4e)&&(_0x48808f[_0x3073('0x3a')](_0x36df4e),'h1'==_0x36df4e[_0x3073('0x2b')]&&(_0x30c5e4=!0x0));if(_0x30c5e4)for(const _0x132f41 of _0x48808f)_0x5efe76[_0x3073('0x18')]('h'+(parseInt(_0x132f41[_0x3073('0x2b')][0x1])+0x1),_0x132f41);}[_0x3073('0x44')](_0x344ee6){return _0x344ee6[_0x3073('0x40')](/\n(?![^{]*\})/g)['map'](_0x58a5ee=>_0x58a5ee[_0x3073('0x4c')](_0x3073('0x4f'),''))[_0x3073('0x36')](_0xe6ac1e=>_0xe6ac1e&&_0xe6ac1e[_0x3073('0x45')]>0x0&&_0x3073('0x46')!==_0xe6ac1e)['map'](_0x5b4acb=>{const {choices:_0x2200d3}=JSON[_0x3073('0xf')](_0x5b4acb);if(_0x2200d3[0x0]&&_0x2200d3[0x0][_0x3073('0x2e')]&&_0x2200d3[0x0]['delta'][_0x3073('0x51')])return _0x2200d3[0x0][_0x3073('0x2e')][_0x3073('0x51')];})[_0x3073('0x36')](_0x1a85bb=>_0x1a85bb)[_0x3073('0x1c')]('');}}export class AIRequestError extends Error{constructor(_0x1152aa){super(_0x1152aa),this[_0x3073('0x2b')]=_0x3073('0x4b');}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x3a57=['view','currentContext','render','set','previousPrompt','prompt','updateView','startProcessing','finishProcessing','listenTo','abort','bind','once','_handlePrompt','submitPrompt','stopListening','editing','processPrompt','domConverter','_sanitizeHTML','previousContext','destroy','innerHTML','_sanitizationContainer','isProcessing','previousLabel','finally','tryAgainEvent','connector','initialContext','editor','mainAction','handleError','createElement','stopProcessing','reset','div','_updateValue','isRendered'];(function(_0x253fa6,_0x3a578f){const _0x144131=function(_0x4bc9ac){while(--_0x4bc9ac){_0x253fa6['push'](_0x253fa6['shift']());}};_0x144131(++_0x3a578f);}(_0x3a57,0x100));const _0x1441=function(_0x253fa6,_0x3a578f){_0x253fa6=_0x253fa6-0x0;let _0x144131=_0x3a57[_0x253fa6];return _0x144131;};import{ObservableMixin as _0x29d71e}from'ckeditor5/src/utils';import{AIRequestError as _0x59307b}from'../aiconnector';export default class g extends _0x29d71e(){constructor(_0x5fc5e5,_0xa7479f,_0x1a8fab){super(),this['editor']=_0x5fc5e5,this[_0x1441('0x6')]=_0xa7479f,this['_sanitizationContainer']=document[_0x1441('0xb')](_0x1441('0xe')),this['view']=_0x1a8fab,this[_0x1441('0x14')]({'initialContext':'','currentContext':'','previousContext':void 0x0,'previousPrompt':void 0x0,'previousLabel':void 0x0,'isProcessing':!0x1}),this[_0x1441('0x11')][_0x1441('0x1c')]('value')['to'](this,'currentContext',this['_sanitizeHTML'][_0x1441('0x1c')](this)),this[_0x1441('0x1a')](this['view'],_0x1441('0x1f'),(_0xfd13f6,_0xeb874d)=>{const _0x42af66=this[_0x1441('0x12')]||this['initialContext'];this[_0x1441('0x1e')](_0xeb874d,_0x42af66);}),this['listenTo'](this[_0x1441('0x11')],_0x1441('0x5'),()=>{this[_0x1441('0x11')][_0x1441('0x16')]=this[_0x1441('0x3')],this[_0x1441('0x1e')](this[_0x1441('0x15')],this[_0x1441('0x25')],this['previousLabel']);}),this[_0x1441('0x1a')](this[_0x1441('0x11')],'stopProcessing',()=>{this['stopProcessing']();});}[_0x1441('0x26')](){this[_0x1441('0x20')]();}async[_0x1441('0x17')]({prompt:_0x15c9a4,htmlContent:_0x176ba7,label:_0x1f6722,mainAction:_0x4c6be3}){this['view']['prompt']=_0x1f6722,this[_0x1441('0x11')][_0x1441('0x9')]=_0x4c6be3,this[_0x1441('0x7')]=_0x176ba7,_0x15c9a4&&(this[_0x1441('0x11')][_0x1441('0x10')]?this[_0x1441('0x1e')](_0x15c9a4,_0x176ba7,_0x1f6722):this[_0x1441('0x11')][_0x1441('0x1d')](_0x1441('0x13'),()=>{this[_0x1441('0x1e')](_0x15c9a4,_0x176ba7,_0x1f6722);}));}[_0x1441('0xc')](){this['isProcessing']&&(this[_0x1441('0x2')]=!0x1,this[_0x1441('0x11')][_0x1441('0x19')](),this[_0x1441('0x6')][_0x1441('0x1b')]());}[_0x1441('0xd')](){this[_0x1441('0x7')]='',this['currentContext']='',this[_0x1441('0x25')]='',this[_0x1441('0x15')]='',this[_0x1441('0x3')]='',this['view'][_0x1441('0xd')](),this[_0x1441('0xc')]();}async[_0x1441('0x1e')](_0x4ea4de,_0x1b71db,_0x51db6d){return this[_0x1441('0x2')]=!0x0,this['view'][_0x1441('0x18')](),this[_0x1441('0x25')]=_0x1b71db,this[_0x1441('0x15')]=_0x4ea4de,this[_0x1441('0x3')]=_0x51db6d||_0x4ea4de,new Promise(_0x365b6b=>{this[_0x1441('0x6')][_0x1441('0x22')](_0x4ea4de,_0x1b71db,_0x25b289=>this['_updateValue'](_0x25b289))['catch'](_0x5014ab=>{_0x5014ab instanceof _0x59307b?this[_0x1441('0x11')][_0x1441('0xa')](_0x5014ab['message']):this['view'][_0x1441('0xa')](),_0x365b6b();})[_0x1441('0x4')](()=>{this[_0x1441('0xc')](),_0x365b6b();});});}[_0x1441('0xf')](_0x5bb28e){this[_0x1441('0x12')]=''+_0x5bb28e;}[_0x1441('0x24')](_0x3d5c90){return this[_0x1441('0x8')][_0x1441('0x21')]['view'][_0x1441('0x23')]['setContentOf'](this[_0x1441('0x1')],_0x3d5c90),this[_0x1441('0x1')][_0x1441('0x0')];}}
23
+ const _0x5071=['div','processPrompt','isRendered','createElement','abort','editing','editor','bind','previousPrompt','once','finishProcessing','_sanitizeHTML','listenTo','stopProcessing','destroy','mainAction','initialContext','_updateValue','reset','set','prompt','domConverter','_sanitizationContainer','currentContext','message','_handlePrompt','updateView','isProcessing','view','handleError','submitPrompt','connector','value','render','previousContext','previousLabel'];(function(_0x99c626,_0x507115){const _0x438598=function(_0x55986b){while(--_0x55986b){_0x99c626['push'](_0x99c626['shift']());}};_0x438598(++_0x507115);}(_0x5071,0x8c));const _0x4385=function(_0x99c626,_0x507115){_0x99c626=_0x99c626-0x0;let _0x438598=_0x5071[_0x99c626];return _0x438598;};import{ObservableMixin as _0x47af75}from'ckeditor5/src/utils';import{AIRequestError as _0x1af2e4}from'../aiconnector';export default class g extends _0x47af75(){constructor(_0x4ff858,_0x14e47f,_0x27597c){super(),this[_0x4385('0xa')]=_0x4ff858,this['connector']=_0x14e47f,this[_0x4385('0x1a')]=document[_0x4385('0x7')](_0x4385('0x4')),this['view']=_0x27597c,this[_0x4385('0x17')]({'initialContext':'','currentContext':'','previousContext':void 0x0,'previousPrompt':void 0x0,'previousLabel':void 0x0,'isProcessing':!0x1}),this['view'][_0x4385('0xb')](_0x4385('0x0'))['to'](this,'currentContext',this['_sanitizeHTML'][_0x4385('0xb')](this)),this['listenTo'](this['view'],_0x4385('0x22'),(_0x28a722,_0x3ba38c)=>{const _0x240c07=this[_0x4385('0x1b')]||this[_0x4385('0x14')];this[_0x4385('0x1d')](_0x3ba38c,_0x240c07);}),this[_0x4385('0x10')](this[_0x4385('0x20')],'tryAgainEvent',()=>{this[_0x4385('0x20')][_0x4385('0x18')]=this[_0x4385('0x3')],this[_0x4385('0x1d')](this[_0x4385('0xc')],this[_0x4385('0x2')],this[_0x4385('0x3')]);}),this['listenTo'](this[_0x4385('0x20')],_0x4385('0x11'),()=>{this[_0x4385('0x11')]();});}[_0x4385('0x12')](){this['stopListening']();}async[_0x4385('0x1e')]({prompt:_0x1daaff,htmlContent:_0x4d01d6,label:_0x341e75,mainAction:_0x9c4632}){this[_0x4385('0x20')]['prompt']=_0x341e75,this[_0x4385('0x20')][_0x4385('0x13')]=_0x9c4632,this['initialContext']=_0x4d01d6,_0x1daaff&&(this[_0x4385('0x20')][_0x4385('0x6')]?this[_0x4385('0x1d')](_0x1daaff,_0x4d01d6,_0x341e75):this['view'][_0x4385('0xd')](_0x4385('0x1'),()=>{this[_0x4385('0x1d')](_0x1daaff,_0x4d01d6,_0x341e75);}));}[_0x4385('0x11')](){this[_0x4385('0x1f')]&&(this[_0x4385('0x1f')]=!0x1,this[_0x4385('0x20')][_0x4385('0xe')](),this[_0x4385('0x23')][_0x4385('0x8')]());}['reset'](){this[_0x4385('0x14')]='',this[_0x4385('0x1b')]='',this[_0x4385('0x2')]='',this[_0x4385('0xc')]='',this['previousLabel']='',this[_0x4385('0x20')][_0x4385('0x16')](),this[_0x4385('0x11')]();}async[_0x4385('0x1d')](_0x503cdd,_0x42925e,_0x4f2117){return this[_0x4385('0x1f')]=!0x0,this[_0x4385('0x20')]['startProcessing'](),this[_0x4385('0x2')]=_0x42925e,this['previousPrompt']=_0x503cdd,this['previousLabel']=_0x4f2117||_0x503cdd,new Promise(_0x6ddf54=>{this[_0x4385('0x23')][_0x4385('0x5')](_0x503cdd,_0x42925e,_0x1cdea1=>this[_0x4385('0x15')](_0x1cdea1))['catch'](_0x5123fb=>{_0x5123fb instanceof _0x1af2e4?this[_0x4385('0x20')][_0x4385('0x21')](_0x5123fb[_0x4385('0x1c')]):this[_0x4385('0x20')][_0x4385('0x21')](),_0x6ddf54();})['finally'](()=>{this[_0x4385('0x11')](),_0x6ddf54();});});}[_0x4385('0x15')](_0x3ca18d){this[_0x4385('0x1b')]=''+_0x3ca18d;}[_0x4385('0xf')](_0x41d308){return this[_0x4385('0xa')][_0x4385('0x9')][_0x4385('0x20')][_0x4385('0x19')]['setContentOf'](this['_sanitizationContainer'],_0x41d308),this[_0x4385('0x1a')]['innerHTML'];}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x5de7=['length','labelView','filter','match','highlightText','isVisible','label','items','first'];(function(_0x26377f,_0x5de737){const _0x5c1ecb=function(_0x68d040){while(--_0x68d040){_0x26377f['push'](_0x26377f['shift']());}};_0x5c1ecb(++_0x5de737);}(_0x5de7,0x104));const _0x5c1e=function(_0x26377f,_0x5de737){_0x26377f=_0x26377f-0x0;let _0x5c1ecb=_0x5de7[_0x26377f];return _0x5c1ecb;};import{ListView as _0x1a3e42}from'ckeditor5/src/ui';export default class y extends _0x1a3e42{[_0x5c1e('0x3')](_0x891db9){let _0x184317=0x0,_0x20fbd6=0x0;for(const _0x2a1169 of this[_0x5c1e('0x8')]){const _0x5172a2=_0x2a1169,_0x35b7e4=_0x891db9&&!!_0x5172a2[_0x5c1e('0x7')][_0x5c1e('0x4')](_0x891db9);_0x5172a2[_0x5c1e('0x2')][_0x5c1e('0x5')](_0x35b7e4?_0x891db9:null);for(const _0x32554b of _0x5172a2[_0x5c1e('0x8')]){const _0x55c212=_0x32554b['children'][_0x5c1e('0x0')],_0x42f67f=_0x55c212[_0x5c1e('0x2')];if(_0x891db9){const _0x1e1a5f=!!_0x55c212[_0x5c1e('0x7')][_0x5c1e('0x4')](_0x891db9);_0x42f67f[_0x5c1e('0x5')](_0x1e1a5f?_0x891db9:null),_0x32554b[_0x5c1e('0x6')]=_0x35b7e4||_0x1e1a5f;}else _0x32554b[_0x5c1e('0x6')]=!0x0,_0x42f67f[_0x5c1e('0x5')](null);}const _0x5a2e01=_0x5172a2[_0x5c1e('0x8')][_0x5c1e('0x3')](_0x4f3f1a=>_0x4f3f1a['isVisible'])[_0x5c1e('0x1')];_0x184317+=_0x5172a2['items'][_0x5c1e('0x1')],_0x20fbd6+=_0x35b7e4?_0x5172a2[_0x5c1e('0x8')]['length']:_0x5a2e01,_0x5172a2['isVisible']=_0x35b7e4||!!_0x5a2e01;}return{'resultsCount':_0x20fbd6,'totalItemsCount':_0x184317};}}
23
+ const _0x58ff=['children','first','match','isVisible','filter','label','highlightText','labelView','length','items'];(function(_0x3489d1,_0x58ff09){const _0x521ee0=function(_0x3f2fe2){while(--_0x3f2fe2){_0x3489d1['push'](_0x3489d1['shift']());}};_0x521ee0(++_0x58ff09);}(_0x58ff,0x140));const _0x521e=function(_0x3489d1,_0x58ff09){_0x3489d1=_0x3489d1-0x0;let _0x521ee0=_0x58ff[_0x3489d1];return _0x521ee0;};import{ListView as _0x1f7cb6}from'ckeditor5/src/ui';export default class y extends _0x1f7cb6{[_0x521e('0x4')](_0x489b4f){let _0x1a670b=0x0,_0x6f6d84=0x0;for(const _0x2c0a46 of this[_0x521e('0x9')]){const _0x429f72=_0x2c0a46,_0x164fa7=_0x489b4f&&!!_0x429f72[_0x521e('0x5')][_0x521e('0x2')](_0x489b4f);_0x429f72[_0x521e('0x7')]['highlightText'](_0x164fa7?_0x489b4f:null);for(const _0x2919c2 of _0x429f72[_0x521e('0x9')]){const _0x53d332=_0x2919c2[_0x521e('0x0')][_0x521e('0x1')],_0x1aeef7=_0x53d332[_0x521e('0x7')];if(_0x489b4f){const _0x417cb0=!!_0x53d332[_0x521e('0x5')]['match'](_0x489b4f);_0x1aeef7['highlightText'](_0x417cb0?_0x489b4f:null),_0x2919c2['isVisible']=_0x164fa7||_0x417cb0;}else _0x2919c2[_0x521e('0x3')]=!0x0,_0x1aeef7[_0x521e('0x6')](null);}const _0x1730b5=_0x429f72[_0x521e('0x9')][_0x521e('0x4')](_0x3596f2=>_0x3596f2['isVisible'])[_0x521e('0x8')];_0x1a670b+=_0x429f72[_0x521e('0x9')][_0x521e('0x8')],_0x6f6d84+=_0x164fa7?_0x429f72[_0x521e('0x9')]['length']:_0x1730b5,_0x429f72[_0x521e('0x3')]=_0x164fa7||!!_0x1730b5;}return{'resultsCount':_0x6f6d84,'totalItemsCount':_0x1a670b};}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x4936=['style','ck-button__label','set'];(function(_0x67997a,_0x49367b){const _0x2c063a=function(_0xa32341){while(--_0xa32341){_0x67997a['push'](_0x67997a['shift']());}};_0x2c063a(++_0x49367b);}(_0x4936,0x7f));const _0x2c06=function(_0x67997a,_0x49367b){_0x67997a=_0x67997a-0x0;let _0x2c063a=_0x4936[_0x67997a];return _0x2c063a;};import{HighlightedTextView as _0x1a7a37}from'ckeditor5/src/ui';export default class C extends _0x1a7a37{constructor(){super(),this[_0x2c06('0x1')]({'style':void 0x0,'text':void 0x0,'id':void 0x0});const _0x2267c4=this['bindTemplate'];this['extendTemplate']({'attributes':{'class':[_0x2c06('0x0')],'style':_0x2267c4['to'](_0x2c06('0x2')),'id':_0x2267c4['to']('id')}});}}
23
+ const _0x106b=['extendTemplate','style','set'];(function(_0x261993,_0x106b45){const _0x30856d=function(_0x15f2c4){while(--_0x15f2c4){_0x261993['push'](_0x261993['shift']());}};_0x30856d(++_0x106b45);}(_0x106b,0x104));const _0x3085=function(_0x261993,_0x106b45){_0x261993=_0x261993-0x0;let _0x30856d=_0x106b[_0x261993];return _0x30856d;};import{HighlightedTextView as _0x58594d}from'ckeditor5/src/ui';export default class C extends _0x58594d{constructor(){super(),this[_0x3085('0x0')]({'style':void 0x0,'text':void 0x0,'id':void 0x0});const _0x4ddbb9=this['bindTemplate'];this[_0x3085('0x1')]({'attributes':{'class':['ck-button__label'],'style':_0x4ddbb9['to'](_0x3085('0x2')),'id':_0x4ddbb9['to']('id')}});}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x51f2=['bindTemplate','extendTemplate','set'];(function(_0x3e5839,_0x51f24f){const _0x169dca=function(_0x56d5ef){while(--_0x56d5ef){_0x3e5839['push'](_0x3e5839['shift']());}};_0x169dca(++_0x51f24f);}(_0x51f2,0x16a));const _0x169d=function(_0x3e5839,_0x51f24f){_0x3e5839=_0x3e5839-0x0;let _0x169dca=_0x51f2[_0x3e5839];return _0x169dca;};import{HighlightedTextView as _0x4b4012}from'ckeditor5/src/ui';import{uid as _0x1398fb}from'ckeditor5/src/utils';export default class k extends _0x4b4012{constructor(){super(),this[_0x169d('0x0')]('for',void 0x0);const _0x4fc26e=this[_0x169d('0x1')];this['id']='ck-editor__label_'+_0x1398fb(),this[_0x169d('0x2')]({'attributes':{'class':['ck','ck-label'],'id':this['id'],'for':_0x4fc26e['to']('for')}});}}
23
+ const _0x589b=['bindTemplate','extendTemplate','ck-label','for'];(function(_0x45b1a6,_0x589b8e){const _0x8a851e=function(_0xd57259){while(--_0xd57259){_0x45b1a6['push'](_0x45b1a6['shift']());}};_0x8a851e(++_0x589b8e);}(_0x589b,0x189));const _0x8a85=function(_0x45b1a6,_0x589b8e){_0x45b1a6=_0x45b1a6-0x0;let _0x8a851e=_0x589b[_0x45b1a6];return _0x8a851e;};import{HighlightedTextView as _0x22b7c8}from'ckeditor5/src/ui';import{uid as _0x540385}from'ckeditor5/src/utils';export default class k extends _0x22b7c8{constructor(){super(),this['set'](_0x8a85('0x2'),void 0x0);const _0x5e4608=this[_0x8a85('0x3')];this['id']='ck-editor__label_'+_0x540385(),this[_0x8a85('0x0')]({'attributes':{'class':['ck',_0x8a85('0x1')],'id':this['id'],'for':_0x5e4608['to'](_0x8a85('0x2'))}});}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x3082=['ck-ai-form__loader','bind','write','mousedown','class','copy','smooth','ClipboardItem','\x20ck-ai-form__copy-button--copied','addRange','check','setTemplate','ck-ai-form__content-area','appendLoader','_createCopyButton','value','lastElementChild','copyButtonView','firstElementChild','ck-ai-form__content-area-wrapper','div','wheel','focus','isEnabled','createElement','appendChild','ck-ai-form__content-area--processing','<span>]</span>','innerHTML','element','ck-ai-form__copy-button-wrapper','scrollTo','absolute','-9999px','change:isProcessing','remove','AI\x20is\x20writing...','isVisible','ck-ai-form__content-field','setStartAfter','locale','loaderView','querySelector','render','setContent','Copy','set','execCommand','contentFieldView','left','isProcessing','removeAllRanges','_copyHTMLToClipboard','ck-reset_all-excluded','text/html','text/plain','bindTemplate','body','ck-hidden','ck-content','createRange','textContent','ck-ai-form__copy-button','style','getSelection'];(function(_0x5c2416,_0x308207){const _0xacf7d4=function(_0x568886){while(--_0x568886){_0x5c2416['push'](_0x5c2416['shift']());}};_0xacf7d4(++_0x308207);}(_0x3082,0x1e7));const _0xacf7=function(_0x5c2416,_0x308207){_0x5c2416=_0x5c2416-0x0;let _0xacf7d4=_0x3082[_0x5c2416];return _0xacf7d4;};import{global as _0x513fc9}from'ckeditor5/src/utils';import{View as _0x2a5375,ButtonView as _0x390b3e,SpinnerView as _0x5f2f90}from'ckeditor5/src/ui';import _0x277fe9 from'../../../theme/icons/copy.svg';import{getTranslation as _0x5be49c}from'../../utils/common-translations';import{icons as _0x5eeb35}from'ckeditor5/src/core';export default class J extends _0x2a5375{constructor(_0x214afc,_0x514d70=''){super(_0x214afc),this[_0xacf7('0xe')]({'value':null,'isVisible':!0x1,'isProcessing':!0x1});const _0x1d5764=this[_0xacf7('0x18')];this[_0xacf7('0x10')]=new ContentFieldView(_0x214afc,_0x514d70),this['copyButtonView']=this[_0xacf7('0x2f')](),this[_0xacf7('0x2c')]({'tag':'div','attributes':{'class':['ck',_0xacf7('0x34'),_0x1d5764['if'](_0xacf7('0x5'),_0xacf7('0x1a'),_0x5068e9=>!_0x5068e9)],'tabindex':'-1'},'children':[{'tag':'div','attributes':{'class':['ck',_0xacf7('0x2d'),_0x1d5764['if'](_0xacf7('0x12'),_0xacf7('0x3b'))]},'children':[this[_0xacf7('0x10')],{'tag':'div','attributes':{'class':['ck',_0xacf7('0x3f')]},'children':[this[_0xacf7('0x32')]]}]}]});}[_0xacf7('0xb')](){super[_0xacf7('0xb')](),this['value']&&this[_0xacf7('0x10')][_0xacf7('0xc')](this[_0xacf7('0x30')]);let _0x1e1754=!0x1;this['on']('change:value',(_0x45ffae,_0x58731b,_0x38c904)=>{const _0x5c9261=!this[_0xacf7('0x10')][_0xacf7('0x3e')][_0xacf7('0xa')]('.ck-ai-form__loader');this[_0xacf7('0x10')][_0xacf7('0xc')](_0x38c904),this[_0xacf7('0x12')]&&_0x5c9261&&!_0x1e1754&&this[_0xacf7('0x3e')][_0xacf7('0x40')]({'top':this['element']['scrollHeight'],'behavior':_0xacf7('0x27')});}),this['on'](_0xacf7('0x2'),(_0x3f2ab5,_0x2b9d60,_0xe00490)=>{_0x1e1754=!0x1,_0xe00490?(this[_0xacf7('0x30')]=null,this[_0xacf7('0x10')][_0xacf7('0x2e')]()):this[_0xacf7('0x30')]||this[_0xacf7('0x10')]['setContent']('');}),this['listenTo'](this[_0xacf7('0x3e')],_0xacf7('0x36'),()=>{_0x1e1754=!0x0;}),this['listenTo'](this[_0xacf7('0x3e')],_0xacf7('0x24'),()=>{_0x1e1754=!0x0;});}[_0xacf7('0x37')](){this[_0xacf7('0x3e')][_0xacf7('0x37')]();}[_0xacf7('0x2f')](){const _0x82b359=this[_0xacf7('0x8')],_0x514c18=new _0x390b3e(this[_0xacf7('0x8')]),_0x53a46f=_0xacf7('0x1e');return _0x514c18[_0xacf7('0xe')]({'label':_0x5be49c(_0x82b359,_0xacf7('0xd')),'icon':_0x277fe9,'class':_0x53a46f,'tooltip':!0x0}),_0x514c18[_0xacf7('0x22')]('isVisible')['to'](this,_0xacf7('0x30'),_0x430ad2=>!!_0x430ad2),_0x514c18[_0xacf7('0x22')](_0xacf7('0x38'))['to'](this,'isProcessing',_0x39455e=>!_0x39455e),_0x514c18['on']('execute',()=>{this[_0xacf7('0x14')](this['contentFieldView'][_0xacf7('0x3e')]),_0x514c18['icon']=_0x5eeb35[_0xacf7('0x2b')],_0x514c18[_0xacf7('0x25')]=_0x53a46f+_0xacf7('0x29'),this[_0xacf7('0x37')](),setTimeout(()=>{_0x514c18['icon']=_0x277fe9,_0x514c18[_0xacf7('0x25')]=_0x53a46f;},0x3e8);}),_0x514c18;}[_0xacf7('0x14')](_0x426dfb){const {window:_0xebfb52,document:_0x31411b}=_0x513fc9;if(_0xebfb52[_0xacf7('0x28')]){const {Blob:_0x29d05e,ClipboardItem:_0xef6434}=_0xebfb52,_0x4b33b0=[new _0xef6434({'text/html':new _0x29d05e([_0x426dfb['innerHTML']],{'type':_0xacf7('0x16')}),'text/plain':new _0x29d05e([_0x426dfb[_0xacf7('0x1d')]||''],{'type':_0xacf7('0x17')})})];navigator['clipboard'][_0xacf7('0x23')](_0x4b33b0);}else{const _0x26fb2a=_0x31411b[_0xacf7('0x39')](_0xacf7('0x35'));_0x26fb2a[_0xacf7('0x1f')]['position']=_0xacf7('0x0'),_0x26fb2a['style'][_0xacf7('0x11')]=_0xacf7('0x1'),_0x26fb2a[_0xacf7('0x3d')]='<span>[</span>'+_0x426dfb[_0xacf7('0x3d')]+_0xacf7('0x3c'),_0x31411b[_0xacf7('0x19')][_0xacf7('0x3a')](_0x26fb2a);const _0xa528fe=_0x31411b[_0xacf7('0x1c')]();_0xa528fe[_0xacf7('0x7')](_0x26fb2a[_0xacf7('0x33')]),_0xa528fe['setEndBefore'](_0x26fb2a[_0xacf7('0x31')]);const _0xbe0844=_0xebfb52[_0xacf7('0x20')]();_0xbe0844[_0xacf7('0x13')](),_0xbe0844[_0xacf7('0x2a')](_0xa528fe),_0x31411b[_0xacf7('0xf')](_0xacf7('0x26')),_0x26fb2a[_0xacf7('0x3')]();}}}export class ContentFieldView extends _0x2a5375{constructor(_0x393423,_0x3f27d4=''){super(_0x393423),this[_0xacf7('0x9')]=this['_createLoader'](),this[_0xacf7('0x2c')]({'tag':_0xacf7('0x35'),'attributes':{'class':['ck',_0xacf7('0x1b'),_0x3f27d4,_0xacf7('0x15'),_0xacf7('0x6')]}});}['setContent'](_0x1f1fcc){this[_0xacf7('0x3e')][_0xacf7('0x3d')]=_0x1f1fcc;}[_0xacf7('0x2e')](){this[_0xacf7('0x3e')][_0xacf7('0x3a')](this['loaderView']['element']);}['_createLoader'](){const _0x58771f=new _0x2a5375(),_0x21c142=this[_0xacf7('0x8')],_0x364d66=new _0x5f2f90();return _0x364d66[_0xacf7('0x5')]=!0x0,_0x58771f[_0xacf7('0x2c')]({'tag':_0xacf7('0x35'),'attributes':{'class':['ck',_0xacf7('0x21')]},'children':[_0x364d66,{'text':_0x5be49c(_0x21c142,_0xacf7('0x4'))}]}),_0x58771f[_0xacf7('0xb')](),_0x58771f;}}
23
+ const _0x48af=['focus','locale','textContent','AI\x20is\x20writing...','appendChild','absolute','createElement','loaderView','isVisible','text/plain','div','bind','ck-content','getSelection','copyButtonView','_copyHTMLToClipboard','class','body','position','element','mousedown','icon','isProcessing','ck-hidden','style','ck-ai-form__copy-button-wrapper','remove','innerHTML','left','setContent','setStartAfter','ck-ai-form__content-area--processing','ck-ai-form__loader','isEnabled','render','check','<span>[</span>','\x20ck-ai-form__copy-button--copied','ck-ai-form__copy-button','ck-ai-form__content-area','contentFieldView','value','set','setTemplate','copy','clipboard','_createLoader','lastElementChild','appendLoader','addRange','_createCopyButton','ck-ai-form__content-area-wrapper','smooth','Copy','execute','<span>]</span>','text/html','-9999px'];(function(_0x4d12ba,_0x48af29){const _0x560089=function(_0x1a61f4){while(--_0x1a61f4){_0x4d12ba['push'](_0x4d12ba['shift']());}};_0x560089(++_0x48af29);}(_0x48af,0x1a8));const _0x5600=function(_0x4d12ba,_0x48af29){_0x4d12ba=_0x4d12ba-0x0;let _0x560089=_0x48af[_0x4d12ba];return _0x560089;};import{global as _0x58d22e}from'ckeditor5/src/utils';import{View as _0x85ecf5,ButtonView as _0x324b98,SpinnerView as _0x533b4c}from'ckeditor5/src/ui';import _0x54346d from'../../../theme/icons/copy.svg';import{getTranslation as _0x4b9808}from'../../utils/common-translations';import{icons as _0x50a7f3}from'ckeditor5/src/core';export default class J extends _0x85ecf5{constructor(_0xf4f1ac,_0x39a1c7=''){super(_0xf4f1ac),this[_0x5600('0x18')]({'value':null,'isVisible':!0x1,'isProcessing':!0x1});const _0x5f3bd5=this['bindTemplate'];this['contentFieldView']=new ContentFieldView(_0xf4f1ac,_0x39a1c7),this[_0x5600('0x36')]=this[_0x5600('0x20')](),this[_0x5600('0x19')]({'tag':_0x5600('0x32'),'attributes':{'class':['ck',_0x5600('0x21'),_0x5f3bd5['if']('isVisible',_0x5600('0x5'),_0x1e9754=>!_0x1e9754)],'tabindex':'-1'},'children':[{'tag':_0x5600('0x32'),'attributes':{'class':['ck',_0x5600('0x15'),_0x5f3bd5['if']('isProcessing',_0x5600('0xd'))]},'children':[this[_0x5600('0x16')],{'tag':_0x5600('0x32'),'attributes':{'class':['ck',_0x5600('0x7')]},'children':[this['copyButtonView']]}]}]});}[_0x5600('0x10')](){super['render'](),this[_0x5600('0x17')]&&this[_0x5600('0x16')][_0x5600('0xb')](this[_0x5600('0x17')]);let _0x1be7eb=!0x1;this['on']('change:value',(_0x13604e,_0x1df4bd,_0xd5f521)=>{const _0x40dd39=!this['contentFieldView'][_0x5600('0x1')]['querySelector']('.ck-ai-form__loader');this[_0x5600('0x16')][_0x5600('0xb')](_0xd5f521),this[_0x5600('0x4')]&&_0x40dd39&&!_0x1be7eb&&this['element']['scrollTo']({'top':this[_0x5600('0x1')]['scrollHeight'],'behavior':_0x5600('0x22')});}),this['on']('change:isProcessing',(_0x30107a,_0x373ff6,_0x81cbc5)=>{_0x1be7eb=!0x1,_0x81cbc5?(this[_0x5600('0x17')]=null,this[_0x5600('0x16')][_0x5600('0x1e')]()):this[_0x5600('0x17')]||this['contentFieldView'][_0x5600('0xb')]('');}),this['listenTo'](this[_0x5600('0x1')],'wheel',()=>{_0x1be7eb=!0x0;}),this['listenTo'](this['element'],_0x5600('0x2'),()=>{_0x1be7eb=!0x0;});}[_0x5600('0x28')](){this[_0x5600('0x1')]['focus']();}[_0x5600('0x20')](){const _0x90ed4d=this[_0x5600('0x29')],_0x28680f=new _0x324b98(this['locale']),_0x51101c=_0x5600('0x14');return _0x28680f[_0x5600('0x18')]({'label':_0x4b9808(_0x90ed4d,_0x5600('0x23')),'icon':_0x54346d,'class':_0x51101c,'tooltip':!0x0}),_0x28680f[_0x5600('0x33')](_0x5600('0x30'))['to'](this,_0x5600('0x17'),_0x39f8e6=>!!_0x39f8e6),_0x28680f[_0x5600('0x33')](_0x5600('0xf'))['to'](this,_0x5600('0x4'),_0x4c789e=>!_0x4c789e),_0x28680f['on'](_0x5600('0x24'),()=>{this[_0x5600('0x37')](this[_0x5600('0x16')][_0x5600('0x1')]),_0x28680f[_0x5600('0x3')]=_0x50a7f3[_0x5600('0x11')],_0x28680f[_0x5600('0x38')]=_0x51101c+_0x5600('0x13'),this[_0x5600('0x28')](),setTimeout(()=>{_0x28680f[_0x5600('0x3')]=_0x54346d,_0x28680f[_0x5600('0x38')]=_0x51101c;},0x3e8);}),_0x28680f;}[_0x5600('0x37')](_0x3e7af5){const {window:_0xe6d407,document:_0x5e9f2d}=_0x58d22e;if(_0xe6d407['ClipboardItem']){const {Blob:_0x215028,ClipboardItem:_0x390c54}=_0xe6d407,_0x5b4b9b=[new _0x390c54({'text/html':new _0x215028([_0x3e7af5[_0x5600('0x9')]],{'type':_0x5600('0x26')}),'text/plain':new _0x215028([_0x3e7af5[_0x5600('0x2a')]||''],{'type':_0x5600('0x31')})})];navigator[_0x5600('0x1b')]['write'](_0x5b4b9b);}else{const _0x34750b=_0x5e9f2d[_0x5600('0x2e')]('div');_0x34750b[_0x5600('0x6')][_0x5600('0x0')]=_0x5600('0x2d'),_0x34750b[_0x5600('0x6')][_0x5600('0xa')]=_0x5600('0x27'),_0x34750b[_0x5600('0x9')]=_0x5600('0x12')+_0x3e7af5[_0x5600('0x9')]+_0x5600('0x25'),_0x5e9f2d[_0x5600('0x39')][_0x5600('0x2c')](_0x34750b);const _0x4a370b=_0x5e9f2d['createRange']();_0x4a370b[_0x5600('0xc')](_0x34750b['firstElementChild']),_0x4a370b['setEndBefore'](_0x34750b[_0x5600('0x1d')]);const _0x44054a=_0xe6d407[_0x5600('0x35')]();_0x44054a['removeAllRanges'](),_0x44054a[_0x5600('0x1f')](_0x4a370b),_0x5e9f2d['execCommand'](_0x5600('0x1a')),_0x34750b[_0x5600('0x8')]();}}}export class ContentFieldView extends _0x85ecf5{constructor(_0x1670ec,_0x33d465=''){super(_0x1670ec),this['loaderView']=this[_0x5600('0x1c')](),this[_0x5600('0x19')]({'tag':_0x5600('0x32'),'attributes':{'class':['ck',_0x5600('0x34'),_0x33d465,'ck-reset_all-excluded','ck-ai-form__content-field']}});}['setContent'](_0x2169ff){this[_0x5600('0x1')]['innerHTML']=_0x2169ff;}[_0x5600('0x1e')](){this[_0x5600('0x1')]['appendChild'](this[_0x5600('0x2f')][_0x5600('0x1')]);}['_createLoader'](){const _0x349526=new _0x85ecf5(),_0x10b213=this[_0x5600('0x29')],_0x1d1c9b=new _0x533b4c();return _0x1d1c9b[_0x5600('0x30')]=!0x0,_0x349526['setTemplate']({'tag':_0x5600('0x32'),'attributes':{'class':['ck',_0x5600('0xe')]},'children':[_0x1d1c9b,{'text':_0x4b9808(_0x10b213,_0x5600('0x2b'))}]}),_0x349526['render'](),_0x349526;}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x5739=['bindTemplate','ck-ai-form__error','content','div','text','setTemplate'];(function(_0x1dc38c,_0x5739f8){const _0x206654=function(_0x29ce1f){while(--_0x29ce1f){_0x1dc38c['push'](_0x1dc38c['shift']());}};_0x206654(++_0x5739f8);}(_0x5739,0xe1));const _0x2066=function(_0x1dc38c,_0x5739f8){_0x1dc38c=_0x1dc38c-0x0;let _0x206654=_0x5739[_0x1dc38c];return _0x206654;};import{View as _0x5cf982,IconView as _0x46f8be}from'ckeditor5/src/ui';import _0x24c100 from'../../../theme/icons/error.svg';export default class Q extends _0x5cf982{constructor(_0xd38ca1,_0xadd1b4=''){super(_0xd38ca1);const _0x51bc23=new _0x46f8be(),_0x1cb33a=this[_0x2066('0x3')];this['set'](_0x2066('0x1'),_0xadd1b4),_0x51bc23[_0x2066('0x5')]=_0x24c100,this[_0x2066('0x2')]({'tag':_0x2066('0x0'),'attributes':{'class':['ck',_0x2066('0x4')]},'children':[_0x51bc23,{'text':_0x1cb33a['to']('text')}]});}}
23
+ const _0x3c06=['ck-ai-form__error','text','content','setTemplate','div','set'];(function(_0x2e21c7,_0x3c06b2){const _0x458e59=function(_0x52cf51){while(--_0x52cf51){_0x2e21c7['push'](_0x2e21c7['shift']());}};_0x458e59(++_0x3c06b2);}(_0x3c06,0x125));const _0x458e=function(_0x2e21c7,_0x3c06b2){_0x2e21c7=_0x2e21c7-0x0;let _0x458e59=_0x3c06[_0x2e21c7];return _0x458e59;};import{View as _0x390bb0,IconView as _0x59d79c}from'ckeditor5/src/ui';import _0x49421d from'../../../theme/icons/error.svg';export default class Q extends _0x390bb0{constructor(_0x4aa2b8,_0x463d2c=''){super(_0x4aa2b8);const _0x24153c=new _0x59d79c(),_0x449d77=this['bindTemplate'];this[_0x458e('0x0')]('text',_0x463d2c),_0x24153c[_0x458e('0x3')]=_0x49421d,this[_0x458e('0x4')]({'tag':_0x458e('0x5'),'attributes':{'class':['ck',_0x458e('0x1')]},'children':[_0x24153c,{'text':_0x449d77['to'](_0x458e('0x2'))}]});}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x5bad=['fieldView','bind','render','element','children','Submit','_createShowHistoryButton','submitButtonView','ck-ai-form__toggle-history','left','locale','window','queryView','execute','add','excludeScrollbarsAndBorders','set','_createSubmitButton','focusFirst','target','isEmpty','focusCycler','showHistoryButtonView','isVisible','value','requestAnimationFrame','focus','isOn','submit','history','filteredView','History','focusableChildren','keystrokes','maxRows','resultsView','width','ck-ai-form__submit','style','fieldWrapperChildren','uiLanguageDirection','enter','isEnabled'];(function(_0x546309,_0x5bad3d){const _0xa9a27d=function(_0x970a8a){while(--_0x970a8a){_0x546309['push'](_0x546309['shift']());}};_0xa9a27d(++_0x5bad3d);}(_0x5bad,0x1c6));const _0xa9a2=function(_0x546309,_0x5bad3d){_0x546309=_0x546309-0x0;let _0xa9a27d=_0x5bad[_0x546309];return _0xa9a27d;};import{Rect as _0x4f578f,global as _0x279d1f,isVisible as _0x109cfa}from'ckeditor5/src/utils';import{AutocompleteView as _0x36f26a,ButtonView as _0x423c46}from'ckeditor5/src/ui';import{icons as _0x2f8e96}from'ckeditor5/src/core';import{escape as _0x229ab9}from'lodash-es';import{getTranslation as _0x3668cf}from'../../utils/common-translations';import _0x508db4 from'../../../theme/icons/submit.svg';export default class tt extends _0x36f26a{constructor(_0xc27896,_0x135380){super(_0xc27896,_0x135380),this[_0xa9a2('0x1f')]['fieldView']['minRows']=0x1,this['queryView'][_0xa9a2('0x13')][_0xa9a2('0xa')]=0x3,this[_0xa9a2('0x1a')]=this[_0xa9a2('0x24')](),this[_0xa9a2('0x29')]=this[_0xa9a2('0x19')](),this[_0xa9a2('0x8')][_0xa9a2('0x21')](this[_0xa9a2('0x29')],0x1),this[_0xa9a2('0x8')][_0xa9a2('0x21')](this['submitButtonView']);}[_0xa9a2('0x15')](){super[_0xa9a2('0x15')](),this['queryView'][_0xa9a2('0xf')][_0xa9a2('0x21')](this[_0xa9a2('0x29')]),this[_0xa9a2('0x17')][_0xa9a2('0x21')](this['submitButtonView']),this[_0xa9a2('0x9')][_0xa9a2('0x23')](_0xa9a2('0x11'),(_0xaca649,_0x3e57bc)=>{_0xaca649[_0xa9a2('0x26')]==this['queryView'][_0xa9a2('0x13')][_0xa9a2('0x16')]&&(this[_0xa9a2('0x4')](),_0x3e57bc());});}[_0xa9a2('0x24')](){const _0x217a4b=new _0x423c46(this['locale']),_0x59048f=this['locale'];return _0x217a4b[_0xa9a2('0x23')]({'icon':_0x508db4,'label':_0x3668cf(_0x59048f,_0xa9a2('0x18')),'isVisible':!0x0,'tooltip':!0x0,'class':_0xa9a2('0xd')}),_0x217a4b['on'](_0xa9a2('0x20'),()=>{this[_0xa9a2('0x4')]();}),_0x217a4b[_0xa9a2('0x14')](_0xa9a2('0x12'))['to'](this['queryView']['fieldView'],_0xa9a2('0x27'),this,_0xa9a2('0x12'),(_0x5abd58,_0x125440)=>!_0x5abd58&&_0x125440),_0x217a4b;}['_createShowHistoryButton'](){const _0x3835f2=new _0x423c46(this[_0xa9a2('0x1d')]),_0x2712c4=this[_0xa9a2('0xb')],_0x372e3e=this[_0xa9a2('0x1d')];_0x3835f2[_0xa9a2('0x23')]({'label':_0x3668cf(_0x372e3e,_0xa9a2('0x7')),'withText':!0x1,'icon':_0x2f8e96[_0xa9a2('0x5')],'tooltip':!0x0,'tooltipPosition':'sw','class':_0xa9a2('0x1b')}),_0x3835f2[_0xa9a2('0x14')](_0xa9a2('0x3'))['to'](_0x2712c4,_0xa9a2('0x2a')),_0x3835f2[_0xa9a2('0x14')](_0xa9a2('0x12'))['to'](this,_0xa9a2('0x12')),_0x3835f2['on'](_0xa9a2('0x20'),()=>{_0x2712c4[_0xa9a2('0x2a')]=!_0x2712c4[_0xa9a2('0x2a')],_0x2712c4[_0xa9a2('0x2a')]?this[_0xa9a2('0x6')][_0xa9a2('0x2')]():this[_0xa9a2('0x2')]();});const _0x29d5c2=()=>{_0x279d1f[_0xa9a2('0x1e')][_0xa9a2('0x1')](()=>{if(_0x109cfa(this[_0xa9a2('0x16')])){const _0x1f0c2e=new _0x4f578f(this['queryView'][_0xa9a2('0x13')]['element']),_0x24fabd=_0x1f0c2e['width'],_0x5b4d44='rtl'===_0x372e3e[_0xa9a2('0x10')]?_0xa9a2('0x1c'):'right';_0x1f0c2e[_0xa9a2('0x22')](),_0x3835f2[_0xa9a2('0x16')][_0xa9a2('0xe')][_0x5b4d44]=_0x24fabd-_0x1f0c2e[_0xa9a2('0xc')]+0x1+'px';}});};return this[_0xa9a2('0x1f')][_0xa9a2('0x13')]['on']('update',_0x29d5c2),this['on'](_0xa9a2('0x15'),_0x29d5c2),_0x3835f2;}[_0xa9a2('0x4')](){const _0x7f8138=this[_0xa9a2('0x1f')][_0xa9a2('0x13')]['element'][_0xa9a2('0x0')];this['fire'](_0xa9a2('0x4'),_0x229ab9(_0x7f8138));}['focus'](_0xcc5248){-0x1===_0xcc5248?this['focusCycler']['focusLast']():this[_0xa9a2('0x28')][_0xa9a2('0x25')]();}}
23
+ const _0x2a63=['fire','execute','Submit','isEnabled','submit','isOn','bind','isVisible','_createSubmitButton','minRows','update','element','filteredView','resultsView','maxRows','enter','ck-ai-form__submit','width','style','focusableChildren','History','queryView','uiLanguageDirection','window','focus','showHistoryButtonView','fieldView','children','focusCycler','add','focusFirst','render','submitButtonView','excludeScrollbarsAndBorders','_createShowHistoryButton','history','locale','set','right'];(function(_0x2985b9,_0x2a6378){const _0x4a52bf=function(_0x120dfc){while(--_0x120dfc){_0x2985b9['push'](_0x2985b9['shift']());}};_0x4a52bf(++_0x2a6378);}(_0x2a63,0x112));const _0x4a52=function(_0x2985b9,_0x2a6378){_0x2985b9=_0x2985b9-0x0;let _0x4a52bf=_0x2a63[_0x2985b9];return _0x4a52bf;};import{Rect as _0x4260e5,global as _0x360c93,isVisible as _0x5dd3a1}from'ckeditor5/src/utils';import{AutocompleteView as _0x293f22,ButtonView as _0x32e6cc}from'ckeditor5/src/ui';import{icons as _0x27b4a6}from'ckeditor5/src/core';import{escape as _0x1ab461}from'lodash-es';import{getTranslation as _0x53b34b}from'../../utils/common-translations';import _0xc8943 from'../../../theme/icons/submit.svg';export default class tt extends _0x293f22{constructor(_0x56e939,_0x23ac24){super(_0x56e939,_0x23ac24),this[_0x4a52('0x14')][_0x4a52('0x19')][_0x4a52('0x8')]=0x1,this[_0x4a52('0x14')][_0x4a52('0x19')][_0x4a52('0xd')]=0x3,this[_0x4a52('0x1f')]=this[_0x4a52('0x7')](),this[_0x4a52('0x18')]=this[_0x4a52('0x21')](),this[_0x4a52('0x12')][_0x4a52('0x1c')](this[_0x4a52('0x18')],0x1),this[_0x4a52('0x12')][_0x4a52('0x1c')](this[_0x4a52('0x1f')]);}['render'](){super[_0x4a52('0x1e')](),this[_0x4a52('0x14')]['fieldWrapperChildren'][_0x4a52('0x1c')](this[_0x4a52('0x18')]),this[_0x4a52('0x1a')][_0x4a52('0x1c')](this['submitButtonView']),this['keystrokes'][_0x4a52('0x24')](_0x4a52('0xe'),(_0x1efab2,_0x2cff1b)=>{_0x1efab2['target']==this[_0x4a52('0x14')][_0x4a52('0x19')][_0x4a52('0xa')]&&(this['submit'](),_0x2cff1b());});}[_0x4a52('0x7')](){const _0xae229=new _0x32e6cc(this[_0x4a52('0x23')]),_0x129bad=this[_0x4a52('0x23')];return _0xae229[_0x4a52('0x24')]({'icon':_0xc8943,'label':_0x53b34b(_0x129bad,_0x4a52('0x1')),'isVisible':!0x0,'tooltip':!0x0,'class':_0x4a52('0xf')}),_0xae229['on'](_0x4a52('0x0'),()=>{this[_0x4a52('0x3')]();}),_0xae229[_0x4a52('0x5')](_0x4a52('0x2'))['to'](this[_0x4a52('0x14')][_0x4a52('0x19')],'isEmpty',this,_0x4a52('0x2'),(_0x46cbca,_0x2316c7)=>!_0x46cbca&&_0x2316c7),_0xae229;}[_0x4a52('0x21')](){const _0x5e97be=new _0x32e6cc(this[_0x4a52('0x23')]),_0x23007a=this[_0x4a52('0xc')],_0x12c2fe=this[_0x4a52('0x23')];_0x5e97be[_0x4a52('0x24')]({'label':_0x53b34b(_0x12c2fe,_0x4a52('0x13')),'withText':!0x1,'icon':_0x27b4a6[_0x4a52('0x22')],'tooltip':!0x0,'tooltipPosition':'sw','class':'ck-ai-form__toggle-history'}),_0x5e97be[_0x4a52('0x5')](_0x4a52('0x4'))['to'](_0x23007a,'isVisible'),_0x5e97be[_0x4a52('0x5')](_0x4a52('0x2'))['to'](this,'isEnabled'),_0x5e97be['on'](_0x4a52('0x0'),()=>{_0x23007a[_0x4a52('0x6')]=!_0x23007a['isVisible'],_0x23007a[_0x4a52('0x6')]?this[_0x4a52('0xb')][_0x4a52('0x17')]():this[_0x4a52('0x17')]();});const _0x3f8d35=()=>{_0x360c93[_0x4a52('0x16')]['requestAnimationFrame'](()=>{if(_0x5dd3a1(this[_0x4a52('0xa')])){const _0x37b798=new _0x4260e5(this[_0x4a52('0x14')][_0x4a52('0x19')]['element']),_0x10de73=_0x37b798[_0x4a52('0x10')],_0x2b47d1='rtl'===_0x12c2fe[_0x4a52('0x15')]?'left':_0x4a52('0x25');_0x37b798[_0x4a52('0x20')](),_0x5e97be[_0x4a52('0xa')][_0x4a52('0x11')][_0x2b47d1]=_0x10de73-_0x37b798[_0x4a52('0x10')]+0x1+'px';}});};return this['queryView'][_0x4a52('0x19')]['on'](_0x4a52('0x9'),_0x3f8d35),this['on'](_0x4a52('0x1e'),_0x3f8d35),_0x5e97be;}['submit'](){const _0xe284e2=this[_0x4a52('0x14')][_0x4a52('0x19')][_0x4a52('0xa')]['value'];this[_0x4a52('0x26')](_0x4a52('0x3'),_0x1ab461(_0xe284e2));}[_0x4a52('0x17')](_0xa18ac4){-0x1===_0xa18ac4?this[_0x4a52('0x1b')]['focusLast']():this['focusCycler'][_0x4a52('0x1d')]();}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x1db1=['label','bindTemplate','replace','bind','INSERT','Stop','REPLACE','addMany','insertButton','items','extendTemplate','mainAction','ck-button-action','_createButton','AI_','stopButton','isVisible','insert','ck-hidden','toUpperCase','_CONTENT','set','Insert\x20below','ck-ai-form__toolbar','tryAgainButton','replaceButton','Try\x20again'];(function(_0x26736b,_0x1db163){const _0x30f29b=function(_0x4e4684){while(--_0x4e4684){_0x26736b['push'](_0x26736b['shift']());}};_0x30f29b(++_0x1db163);}(_0x1db1,0x105));const _0x30f2=function(_0x26736b,_0x1db163){_0x26736b=_0x26736b-0x0;let _0x30f29b=_0x1db1[_0x26736b];return _0x30f29b;};import{ToolbarView as _0x3881ac,ButtonView as _0x13bdc9}from'ckeditor5/src/ui';import{getTranslation as _0x2c6000}from'../../utils/common-translations';export var AIFormToolbarViewMainAction;!function(_0x50ac6e){_0x50ac6e[_0x30f2('0xf')]=_0x30f2('0xb'),_0x50ac6e[_0x30f2('0xd')]=_0x30f2('0x1a');}(AIFormToolbarViewMainAction||(AIFormToolbarViewMainAction={}));export default class ti extends _0x3881ac{constructor(_0x24c695){super(_0x24c695),this[_0x30f2('0x3')](_0x30f2('0x19'),!0x1),this[_0x30f2('0x3')](_0x30f2('0x14'),AIFormToolbarViewMainAction[_0x30f2('0xf')]),this[_0x30f2('0x7')]=this[_0x30f2('0x16')]('',_0x30f2('0x15')),this[_0x30f2('0x7')][_0x30f2('0xc')](_0x30f2('0x9'))['to'](this,_0x30f2('0x14'),_0x586422=>_0x2c6000(_0x24c695,_0x30f2('0x17')+_0x586422[_0x30f2('0x1')]()+_0x30f2('0x2'))),this[_0x30f2('0x11')]=this[_0x30f2('0x16')](_0x2c6000(_0x24c695,_0x30f2('0x4'))),this[_0x30f2('0x6')]=this[_0x30f2('0x16')](_0x2c6000(_0x24c695,_0x30f2('0x8'))),this[_0x30f2('0x18')]=this['_createButton'](_0x2c6000(_0x24c695,_0x30f2('0xe')));const _0xbaaa13=this[_0x30f2('0xa')];this[_0x30f2('0x13')]({'attributes':{'class':[_0x30f2('0x5'),_0xbaaa13['if'](_0x30f2('0x19'),_0x30f2('0x0'),_0x204583=>!_0x204583)]}}),this[_0x30f2('0x12')][_0x30f2('0x10')]([this[_0x30f2('0x7')],this[_0x30f2('0x11')],this[_0x30f2('0x6')],this[_0x30f2('0x18')]]);}[_0x30f2('0x16')](_0x5f12c8,_0x3e9c63){const _0x3a46bb=new _0x13bdc9(this['locale']);return _0x3a46bb['set']({'label':_0x5f12c8,'class':_0x3e9c63||'','isVisible':!0x0,'withText':!0x0}),_0x3a46bb;}}
23
+ const _0x1aa5=['ck-button-action','isVisible','ck-ai-form__toolbar','_CONTENT','insert','replaceButton','items','addMany','Stop','bind','set','tryAgainButton','REPLACE','mainAction','insertButton','_createButton','extendTemplate','ck-hidden','Insert\x20below','INSERT','Try\x20again','bindTemplate','label'];(function(_0x43c1f0,_0x1aa59b){const _0x38e489=function(_0x1378aa){while(--_0x1378aa){_0x43c1f0['push'](_0x43c1f0['shift']());}};_0x38e489(++_0x1aa59b);}(_0x1aa5,0x180));const _0x38e4=function(_0x43c1f0,_0x1aa59b){_0x43c1f0=_0x43c1f0-0x0;let _0x38e489=_0x1aa5[_0x43c1f0];return _0x38e489;};import{ToolbarView as _0x32a90b,ButtonView as _0x3caba0}from'ckeditor5/src/ui';import{getTranslation as _0x26e7ac}from'../../utils/common-translations';export var AIFormToolbarViewMainAction;!function(_0xb39dea){_0xb39dea['REPLACE']='replace',_0xb39dea[_0x38e4('0x3')]=_0x38e4('0xb');}(AIFormToolbarViewMainAction||(AIFormToolbarViewMainAction={}));export default class ti extends _0x32a90b{constructor(_0x47ed92){super(_0x47ed92),this['set'](_0x38e4('0x8'),!0x1),this[_0x38e4('0x11')]('mainAction',AIFormToolbarViewMainAction[_0x38e4('0x13')]),this[_0x38e4('0xc')]=this['_createButton']('',_0x38e4('0x7')),this['replaceButton'][_0x38e4('0x10')](_0x38e4('0x6'))['to'](this,_0x38e4('0x14'),_0x525450=>_0x26e7ac(_0x47ed92,'AI_'+_0x525450['toUpperCase']()+_0x38e4('0xa'))),this[_0x38e4('0x15')]=this[_0x38e4('0x16')](_0x26e7ac(_0x47ed92,_0x38e4('0x2'))),this[_0x38e4('0x12')]=this[_0x38e4('0x16')](_0x26e7ac(_0x47ed92,_0x38e4('0x4'))),this['stopButton']=this['_createButton'](_0x26e7ac(_0x47ed92,_0x38e4('0xf')));const _0x5f12a6=this[_0x38e4('0x5')];this[_0x38e4('0x0')]({'attributes':{'class':[_0x38e4('0x9'),_0x5f12a6['if'](_0x38e4('0x8'),_0x38e4('0x1'),_0x5d8e56=>!_0x5d8e56)]}}),this[_0x38e4('0xd')][_0x38e4('0xe')]([this['replaceButton'],this['insertButton'],this[_0x38e4('0x12')],this['stopButton']]);}[_0x38e4('0x16')](_0x4e5992,_0x553f0c){const _0x4c8bfc=new _0x3caba0(this['locale']);return _0x4c8bfc['set']({'label':_0x4e5992,'class':_0x553f0c||'','isVisible':!0x0,'withText':!0x0}),_0x4c8bfc;}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x3474=['stopButton','stop','isEnabled','Ask\x20AI\x20to\x20improve\x20generated\x20text','div','contentArea','toolbar','replaceButton','focusTracker','backwardCycle','isVisible','Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.','errorView','focusCycler','ck-ai-form','reset','header','Empty\x20history','render','promptView','bind','_focusables','text','element','insertButton','_createToolbar','insertContentBelow','fieldView','tryAgainButton','submit','Ask\x20AI\x20to\x20edit\x20or\x20generate','high','replaceContent','submitPrompt','execute','finishProcessing','shift\x20+\x20tab','REPLACE','queryView','startProcessing','keystrokes','focus','clearHistory','fire','isError','focusFirst','items','set','handleError','label','trim','_focusCycler','mainAction','_promptHistory','locale','_createHistoryView','isProcessing','forwardCycle','value','prompt','delegate','copyButtonView','AI\x20Assistant','add','createCollection','setTemplate','AI_ERROR_FAILED'];(function(_0x29bdcd,_0x347417){const _0x4108b4=function(_0x1bf919){while(--_0x1bf919){_0x29bdcd['push'](_0x29bdcd['shift']());}};_0x4108b4(++_0x347417);}(_0x3474,0x113));const _0x4108=function(_0x29bdcd,_0x347417){_0x29bdcd=_0x29bdcd-0x0;let _0x4108b4=_0x3474[_0x29bdcd];return _0x4108b4;};import{FocusTracker as _0x1e6ed9,KeystrokeHandler as _0x598e5a}from'ckeditor5/src/utils';import{View as _0x32492a,FocusCycler as _0x4c54f9,createLabeledTextarea as _0x43aa88,FormHeaderView as _0x585a85}from'ckeditor5/src/ui';import _0x4acc4b,{AIFormToolbarViewMainAction as _0x273553}from'./aiformtoolbarview';import _0x3a201f from'./aiformcontentarea';import _0x3c7bb9 from'./aiformerrorview';import _0x44085d from'./aiformpromptview';import _0xc2741c from'./aihistorylistview';import _0x58871f from'./aihistorylistitemview';import _0x365860 from'./prompthistory';import{getTranslation as _0x1cefe6}from'../../utils/common-translations';import _0x53d492 from'../../../theme/icons/robot-pencil.svg';export default class v extends _0x32492a{constructor(_0x439f15,_0x4c3399,_0x14e365=''){super(_0x439f15),this[_0x4108('0x28')](_0x4108('0x3e'),!0x0),this['set'](_0x4108('0x31'),!0x1),this[_0x4108('0x28')]('prompt',''),this[_0x4108('0x28')](_0x4108('0x33'),''),this[_0x4108('0x28')](_0x4108('0x25'),!0x1),this[_0x4108('0x28')](_0x4108('0x2d'),_0x273553[_0x4108('0x1e')]),this[_0x4108('0x2e')]=new _0x365860(),this[_0x4108('0x5')]=new _0x3c7bb9(_0x439f15),this[_0x4108('0x9')]=new _0x585a85(_0x439f15,{'label':_0x1cefe6(_0x439f15,_0x4108('0x37')),'icon':_0x53d492}),this[_0x4108('0x41')]=new _0x3a201f(_0x439f15,_0x14e365),this[_0x4108('0x41')][_0x4108('0xd')](_0x4108('0x31'))['to'](this),this[_0x4108('0x41')][_0x4108('0xd')](_0x4108('0x33'))['to'](this),this['toolbar']=this[_0x4108('0x12')](),this[_0x4108('0x42')]['bind'](_0x4108('0x2d'))['to'](this),this['promptView']=this['_createPromptView'](),this['focusTracker']=new _0x1e6ed9(),this[_0x4108('0x21')]=new _0x598e5a(),this[_0x4108('0xe')]=this[_0x4108('0x39')]([this[_0x4108('0x41')],this[_0x4108('0x41')]['copyButtonView'],this['toolbar'],this[_0x4108('0xc')]]),this['_focusCycler']=new _0x4c54f9({'focusables':this[_0x4108('0xe')],'focusTracker':this[_0x4108('0x1')],'keystrokeHandler':this[_0x4108('0x21')],'actions':{'focusPrevious':_0x4108('0x1d'),'focusNext':'tab'}}),this[_0x4108('0xc')][_0x4108('0x6')]['on'](_0x4108('0x32'),_0x50b7a9=>{this['_focusCycler']['focusNext'](),_0x50b7a9['stop']();}),this[_0x4108('0xc')]['focusCycler']['on'](_0x4108('0x2'),_0x4a616d=>{this['_focusCycler']['focusPrevious'](),_0x4a616d[_0x4108('0x3d')]();}),this['promptView']['queryView'][_0x4108('0x14')][_0x4108('0xd')](_0x4108('0x33'))['to'](this,_0x4108('0x34'));const _0x5d0b88=this['bindTemplate'];this[_0x4108('0x3a')]({'tag':_0x4108('0x40'),'attributes':{'class':['ck',_0x4108('0x7'),_0x4c3399],'tabindex':'-1'},'children':[this['header'],{'tag':_0x4108('0x40'),'attributes':{'class':['ck','ck-ai-form-content']},'children':[{'tag':_0x4108('0x40'),'attributes':{'class':[_0x5d0b88['if'](_0x4108('0x25'),'ck-hidden',_0x5bac66=>!_0x5bac66)]},'children':[this['errorView']]},this[_0x4108('0x41')],this[_0x4108('0x42')],this[_0x4108('0xc')]]}]});}[_0x4108('0xb')](){super['render'](),this[_0x4108('0x1')][_0x4108('0x38')](this[_0x4108('0x41')][_0x4108('0x10')]),this['focusTracker'][_0x4108('0x38')](this[_0x4108('0x41')][_0x4108('0x36')]['element']),this[_0x4108('0x1')][_0x4108('0x38')](this['toolbar'][_0x4108('0x10')]),this['focusTracker'][_0x4108('0x38')](this['promptView'][_0x4108('0x10')]),this[_0x4108('0x21')]['listenTo'](this[_0x4108('0x10')]);}['focus'](){this[_0x4108('0x2c')][_0x4108('0x26')]();}['reset'](){this[_0x4108('0x34')]='',this['value']='',this['promptView']['reset'](),this[_0x4108('0x41')][_0x4108('0x3')]=!0x1,this[_0x4108('0x42')][_0x4108('0x3')]=!0x1;}['_createPromptView'](){const _0xc780e6=this[_0x4108('0x2f')],_0x406093=new _0x44085d(_0xc780e6,{'queryView':{'label':_0x1cefe6(_0xc780e6,_0x4108('0x17')),'creator':_0x43aa88,'showIcon':!0x1,'showResetButton':!0x1},'infoView':{'text':{'noSearchableItems':{'primary':_0x1cefe6(_0xc780e6,_0x4108('0xa')),'secondary':_0x1cefe6(_0xc780e6,_0x4108('0x4'))}}},'filteredView':this[_0x4108('0x30')](),'queryMinChars':0x1/0x0,'resetOnBlur':!0x1});return _0x406093[_0x4108('0xd')](_0x4108('0x3e'))['to'](this,_0x4108('0x3e'),this,'isProcessing',(_0x1d7eee,_0x357702)=>_0x1d7eee&&!_0x357702),this['listenTo'](_0x406093,_0x4108('0x16'),(_0x4300ab,_0x3a157c)=>{this['prompt']=_0x3a157c,this[_0x4108('0x24')](_0x4108('0x1a'),this[_0x4108('0x34')]),_0x3a157c['trim']()&&this[_0x4108('0x2e')]['add']({'prompt':_0x3a157c[_0x4108('0x2b')]()},0x0);},{'priority':_0x4108('0x18')}),_0x406093;}[_0x4108('0x30')](){const _0x26184d=new _0xc2741c(this['locale']);return _0x26184d['historyGroupView'][_0x4108('0x27')]['bindTo'](this[_0x4108('0x2e')])['as'](_0x58871f),_0x26184d['on'](_0x4108('0x23'),()=>{this['_promptHistory']['clear'](),this[_0x4108('0xc')]['search'](''),this['promptView'][_0x4108('0x22')]();}),_0x26184d;}[_0x4108('0x12')](){const _0x31164e=new _0x4acc4b(this[_0x4108('0x2f')]);return _0x31164e['replaceButton']['bind'](_0x4108('0x3e'))['to'](this,'isEnabled',this,_0x4108('0x31'),this,_0x4108('0x33'),(_0x470756,_0x2f0e51,_0x1de239)=>_0x470756&&!_0x2f0e51&&!!_0x1de239),_0x31164e[_0x4108('0x0')]['delegate'](_0x4108('0x1b'))['to'](this,_0x4108('0x19')),_0x31164e[_0x4108('0x11')][_0x4108('0xd')](_0x4108('0x3e'))['to'](this,_0x4108('0x3e'),this,_0x4108('0x31'),this,_0x4108('0x33'),(_0x13bea3,_0x36fb4a,_0x27f7b5)=>_0x13bea3&&!_0x36fb4a&&!!_0x27f7b5),_0x31164e[_0x4108('0x11')][_0x4108('0x35')](_0x4108('0x1b'))['to'](this,_0x4108('0x13')),_0x31164e[_0x4108('0x15')][_0x4108('0xd')]('isEnabled')['to'](this,'isEnabled',this,_0x4108('0x31'),(_0x219d88,_0x2706fd)=>_0x219d88&&!_0x2706fd),_0x31164e[_0x4108('0x15')][_0x4108('0x35')]('execute')['to'](this,'tryAgainEvent'),_0x31164e['stopButton'][_0x4108('0xd')](_0x4108('0x3e'))['to'](this,_0x4108('0x31')),_0x31164e[_0x4108('0x3c')][_0x4108('0x35')](_0x4108('0x1b'))['to'](this,'stopProcessing'),_0x31164e;}[_0x4108('0x20')](){this['value']='',this[_0x4108('0x25')]=!0x1,this[_0x4108('0x31')]=!0x0,this[_0x4108('0x41')]['isVisible']=!0x0,this[_0x4108('0x42')][_0x4108('0x3')]=!0x0,this[_0x4108('0x41')][_0x4108('0x22')]();}[_0x4108('0x1c')](){const _0x420701=this[_0x4108('0x2f')];this[_0x4108('0x31')]=!0x1,this[_0x4108('0x34')]='',this[_0x4108('0xc')][_0x4108('0x8')](),this['value']&&(this[_0x4108('0xc')][_0x4108('0x1f')][_0x4108('0x2a')]=_0x1cefe6(_0x420701,_0x4108('0x3f')));}[_0x4108('0x29')](_0x4ce8fa){const _0x440a28=this['locale'];this[_0x4108('0x1c')](),this['isError']=!0x0,this[_0x4108('0x5')][_0x4108('0xf')]=_0x4ce8fa||_0x1cefe6(_0x440a28,_0x4108('0x3b')),this[_0x4108('0x33')]||(this['contentArea']['isVisible']=!0x1);}}
23
+ const _0x4c5a=['mainAction','search','stopButton','isError','_createHistoryView','submit','tryAgainEvent','listenTo','focus','setTemplate','header','isVisible','handleError','replaceContent','keystrokes','backwardCycle','_promptHistory','forwardCycle','bind','contentArea','historyGroupView','ck-hidden','_focusCycler','focusCycler','queryView','promptView','_createToolbar','locale','render','replaceButton','clearHistory','tryAgainButton','isEnabled','_createPromptView','insertContentBelow','fire','focusPrevious','set','insertButton','Ask\x20AI\x20to\x20improve\x20generated\x20text','stop','copyButtonView','focusFirst','AI_ERROR_FAILED','div','errorView','execute','focusTracker','finishProcessing','focusNext','trim','prompt','submitPrompt','delegate','shift\x20+\x20tab','ck-ai-form-content','createCollection','REPLACE','isProcessing','bindTemplate','add','bindTo','reset','toolbar','clear','stopProcessing','element','ck-ai-form','Ask\x20AI\x20and\x20your\x20prompts\x20will\x20be\x20listed\x20here\x20for\x20you\x20to\x20use\x20later.','tab','value'];(function(_0x274964,_0x4c5a62){const _0x13a584=function(_0x1c22f1){while(--_0x1c22f1){_0x274964['push'](_0x274964['shift']());}};_0x13a584(++_0x4c5a62);}(_0x4c5a,0x109));const _0x13a5=function(_0x274964,_0x4c5a62){_0x274964=_0x274964-0x0;let _0x13a584=_0x4c5a[_0x274964];return _0x13a584;};import{FocusTracker as _0x464bd0,KeystrokeHandler as _0x37d17c}from'ckeditor5/src/utils';import{View as _0x370055,FocusCycler as _0x31da5a,createLabeledTextarea as _0x2fda5d,FormHeaderView as _0x26efff}from'ckeditor5/src/ui';import _0x22b5ba,{AIFormToolbarViewMainAction as _0x5cbd95}from'./aiformtoolbarview';import _0x364710 from'./aiformcontentarea';import _0x16431e from'./aiformerrorview';import _0x5b0174 from'./aiformpromptview';import _0x16fc3b from'./aihistorylistview';import _0x381f16 from'./aihistorylistitemview';import _0x3eef5d from'./prompthistory';import{getTranslation as _0x118f43}from'../../utils/common-translations';import _0x32f037 from'../../../theme/icons/robot-pencil.svg';export default class v extends _0x370055{constructor(_0x547dbb,_0x1ad8a7,_0x5e0074=''){super(_0x547dbb),this['set'](_0x13a5('0x33'),!0x0),this[_0x13a5('0x38')](_0x13a5('0x6'),!0x1),this[_0x13a5('0x38')]('prompt',''),this[_0x13a5('0x38')]('value',''),this[_0x13a5('0x38')](_0x13a5('0x16'),!0x1),this[_0x13a5('0x38')](_0x13a5('0x13'),_0x5cbd95[_0x13a5('0x5')]),this[_0x13a5('0x23')]=new _0x3eef5d(),this[_0x13a5('0x40')]=new _0x16431e(_0x547dbb),this[_0x13a5('0x1d')]=new _0x26efff(_0x547dbb,{'label':_0x118f43(_0x547dbb,'AI\x20Assistant'),'icon':_0x32f037}),this['contentArea']=new _0x364710(_0x547dbb,_0x5e0074),this[_0x13a5('0x26')][_0x13a5('0x25')](_0x13a5('0x6'))['to'](this),this[_0x13a5('0x26')][_0x13a5('0x25')](_0x13a5('0x12'))['to'](this),this[_0x13a5('0xb')]=this['_createToolbar'](),this[_0x13a5('0xb')][_0x13a5('0x25')]('mainAction')['to'](this),this[_0x13a5('0x2c')]=this[_0x13a5('0x34')](),this[_0x13a5('0x42')]=new _0x464bd0(),this[_0x13a5('0x21')]=new _0x37d17c(),this['_focusables']=this[_0x13a5('0x4')]([this[_0x13a5('0x26')],this[_0x13a5('0x26')][_0x13a5('0x3c')],this[_0x13a5('0xb')],this[_0x13a5('0x2c')]]),this[_0x13a5('0x29')]=new _0x31da5a({'focusables':this['_focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':_0x13a5('0x2'),'focusNext':_0x13a5('0x11')}}),this['promptView'][_0x13a5('0x2a')]['on'](_0x13a5('0x24'),_0x386b03=>{this[_0x13a5('0x29')][_0x13a5('0x44')](),_0x386b03[_0x13a5('0x3b')]();}),this[_0x13a5('0x2c')][_0x13a5('0x2a')]['on'](_0x13a5('0x22'),_0x3b8c3f=>{this[_0x13a5('0x29')][_0x13a5('0x37')](),_0x3b8c3f[_0x13a5('0x3b')]();}),this[_0x13a5('0x2c')][_0x13a5('0x2b')]['fieldView'][_0x13a5('0x25')]('value')['to'](this,_0x13a5('0x46'));const _0x218de1=this[_0x13a5('0x7')];this[_0x13a5('0x1c')]({'tag':_0x13a5('0x3f'),'attributes':{'class':['ck',_0x13a5('0xf'),_0x1ad8a7],'tabindex':'-1'},'children':[this['header'],{'tag':'div','attributes':{'class':['ck',_0x13a5('0x3')]},'children':[{'tag':_0x13a5('0x3f'),'attributes':{'class':[_0x218de1['if'](_0x13a5('0x16'),_0x13a5('0x28'),_0xc5826b=>!_0xc5826b)]},'children':[this['errorView']]},this[_0x13a5('0x26')],this[_0x13a5('0xb')],this[_0x13a5('0x2c')]]}]});}[_0x13a5('0x2f')](){super[_0x13a5('0x2f')](),this[_0x13a5('0x42')][_0x13a5('0x8')](this[_0x13a5('0x26')][_0x13a5('0xe')]),this[_0x13a5('0x42')][_0x13a5('0x8')](this[_0x13a5('0x26')][_0x13a5('0x3c')][_0x13a5('0xe')]),this['focusTracker'][_0x13a5('0x8')](this['toolbar'][_0x13a5('0xe')]),this[_0x13a5('0x42')][_0x13a5('0x8')](this[_0x13a5('0x2c')][_0x13a5('0xe')]),this[_0x13a5('0x21')][_0x13a5('0x1a')](this['element']);}[_0x13a5('0x1b')](){this[_0x13a5('0x29')][_0x13a5('0x3d')]();}[_0x13a5('0xa')](){this[_0x13a5('0x46')]='',this[_0x13a5('0x12')]='',this[_0x13a5('0x2c')][_0x13a5('0xa')](),this['contentArea'][_0x13a5('0x1e')]=!0x1,this[_0x13a5('0xb')][_0x13a5('0x1e')]=!0x1;}[_0x13a5('0x34')](){const _0x4d4d31=this[_0x13a5('0x2e')],_0x4e35e5=new _0x5b0174(_0x4d4d31,{'queryView':{'label':_0x118f43(_0x4d4d31,'Ask\x20AI\x20to\x20edit\x20or\x20generate'),'creator':_0x2fda5d,'showIcon':!0x1,'showResetButton':!0x1},'infoView':{'text':{'noSearchableItems':{'primary':_0x118f43(_0x4d4d31,'Empty\x20history'),'secondary':_0x118f43(_0x4d4d31,_0x13a5('0x10'))}}},'filteredView':this[_0x13a5('0x17')](),'queryMinChars':0x1/0x0,'resetOnBlur':!0x1});return _0x4e35e5[_0x13a5('0x25')]('isEnabled')['to'](this,_0x13a5('0x33'),this,_0x13a5('0x6'),(_0x52a1e3,_0x591d03)=>_0x52a1e3&&!_0x591d03),this['listenTo'](_0x4e35e5,_0x13a5('0x18'),(_0x30ee1d,_0x593e32)=>{this[_0x13a5('0x46')]=_0x593e32,this[_0x13a5('0x36')](_0x13a5('0x0'),this[_0x13a5('0x46')]),_0x593e32[_0x13a5('0x45')]()&&this[_0x13a5('0x23')][_0x13a5('0x8')]({'prompt':_0x593e32[_0x13a5('0x45')]()},0x0);},{'priority':'high'}),_0x4e35e5;}['_createHistoryView'](){const _0x428ef5=new _0x16fc3b(this['locale']);return _0x428ef5[_0x13a5('0x27')]['items'][_0x13a5('0x9')](this[_0x13a5('0x23')])['as'](_0x381f16),_0x428ef5['on'](_0x13a5('0x31'),()=>{this[_0x13a5('0x23')][_0x13a5('0xc')](),this[_0x13a5('0x2c')][_0x13a5('0x14')](''),this[_0x13a5('0x2c')]['focus']();}),_0x428ef5;}[_0x13a5('0x2d')](){const _0x10836c=new _0x22b5ba(this[_0x13a5('0x2e')]);return _0x10836c[_0x13a5('0x30')][_0x13a5('0x25')](_0x13a5('0x33'))['to'](this,_0x13a5('0x33'),this,_0x13a5('0x6'),this,_0x13a5('0x12'),(_0x49cb77,_0x59e1a4,_0x35db21)=>_0x49cb77&&!_0x59e1a4&&!!_0x35db21),_0x10836c[_0x13a5('0x30')][_0x13a5('0x1')](_0x13a5('0x41'))['to'](this,_0x13a5('0x20')),_0x10836c[_0x13a5('0x39')][_0x13a5('0x25')]('isEnabled')['to'](this,_0x13a5('0x33'),this,_0x13a5('0x6'),this,_0x13a5('0x12'),(_0x345944,_0x21390e,_0x371f2e)=>_0x345944&&!_0x21390e&&!!_0x371f2e),_0x10836c[_0x13a5('0x39')]['delegate'](_0x13a5('0x41'))['to'](this,_0x13a5('0x35')),_0x10836c['tryAgainButton'][_0x13a5('0x25')](_0x13a5('0x33'))['to'](this,'isEnabled',this,_0x13a5('0x6'),(_0x48c0c8,_0x3f6a4e)=>_0x48c0c8&&!_0x3f6a4e),_0x10836c[_0x13a5('0x32')]['delegate'](_0x13a5('0x41'))['to'](this,_0x13a5('0x19')),_0x10836c[_0x13a5('0x15')][_0x13a5('0x25')](_0x13a5('0x33'))['to'](this,'isProcessing'),_0x10836c[_0x13a5('0x15')][_0x13a5('0x1')]('execute')['to'](this,_0x13a5('0xd')),_0x10836c;}['startProcessing'](){this[_0x13a5('0x12')]='',this[_0x13a5('0x16')]=!0x1,this[_0x13a5('0x6')]=!0x0,this['contentArea'][_0x13a5('0x1e')]=!0x0,this[_0x13a5('0xb')][_0x13a5('0x1e')]=!0x0,this[_0x13a5('0x26')]['focus']();}[_0x13a5('0x43')](){const _0x4e0255=this[_0x13a5('0x2e')];this[_0x13a5('0x6')]=!0x1,this['prompt']='',this[_0x13a5('0x2c')][_0x13a5('0xa')](),this[_0x13a5('0x12')]&&(this[_0x13a5('0x2c')][_0x13a5('0x2b')]['label']=_0x118f43(_0x4e0255,_0x13a5('0x3a')));}[_0x13a5('0x1f')](_0x48997d){const _0x416518=this['locale'];this[_0x13a5('0x43')](),this[_0x13a5('0x16')]=!0x0,this['errorView']['text']=_0x48997d||_0x118f43(_0x416518,_0x13a5('0x3e')),this[_0x13a5('0x12')]||(this[_0x13a5('0x26')][_0x13a5('0x1e')]=!0x1);}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x4d11=['set','fire','execute','prompt','locale','children'];(function(_0x5cdfb5,_0x4d1157){const _0x560345=function(_0x2b6007){while(--_0x2b6007){_0x5cdfb5['push'](_0x5cdfb5['shift']());}};_0x560345(++_0x4d1157);}(_0x4d11,0x1ea));const _0x5603=function(_0x5cdfb5,_0x4d1157){_0x5cdfb5=_0x5cdfb5-0x0;let _0x560345=_0x4d11[_0x5cdfb5];return _0x560345;};import{ListItemView as _0x6811c2,ButtonView as _0x4c70be}from'ckeditor5/src/ui';import _0xf9f02c from'../dropdown/buttonlabelwithhighlightview';import{unescape as _0x199bbd}from'lodash-es';export default class nt extends _0x6811c2{constructor(_0x396a2a){super();const _0x42ab80=new _0xf9f02c(),_0x6b3054=new _0x4c70be(this[_0x5603('0x0')],_0x42ab80);this[_0x5603('0x1')]['add'](_0x6b3054),_0x6b3054[_0x5603('0x2')]({'label':_0x396a2a[_0x5603('0x5')],'withText':!0x0}),_0x6b3054['on'](_0x5603('0x4'),()=>{this[_0x5603('0x3')](_0x5603('0x4'),{'value':_0x199bbd(_0x396a2a[_0x5603('0x5')])});});}}
23
+ const _0x2f99=['locale','prompt','fire','execute','children','add'];(function(_0x19dea0,_0x2f99e2){const _0xffa860=function(_0x1881e7){while(--_0x1881e7){_0x19dea0['push'](_0x19dea0['shift']());}};_0xffa860(++_0x2f99e2);}(_0x2f99,0x6a));const _0xffa8=function(_0x19dea0,_0x2f99e2){_0x19dea0=_0x19dea0-0x0;let _0xffa860=_0x2f99[_0x19dea0];return _0xffa860;};import{ListItemView as _0x45402a,ButtonView as _0x271287}from'ckeditor5/src/ui';import _0xde7ba6 from'../dropdown/buttonlabelwithhighlightview';import{unescape as _0x58b2a0}from'lodash-es';export default class nt extends _0x45402a{constructor(_0xac05a2){super();const _0x2163e8=new _0xde7ba6(),_0x318309=new _0x271287(this[_0xffa8('0x2')],_0x2163e8);this[_0xffa8('0x0')][_0xffa8('0x1')](_0x318309),_0x318309['set']({'label':_0xac05a2[_0xffa8('0x3')],'withText':!0x0}),_0x318309['on'](_0xffa8('0x5'),()=>{this[_0xffa8('0x4')](_0xffa8('0x5'),{'value':_0x58b2a0(_0xac05a2[_0xffa8('0x3')])});});}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x51a5=['execute','fire','items','set','clearHistory','Clear','add','delegate','historyGroupView','Prompt\x20history','label','children','filter','locale','length'];(function(_0x3e1195,_0x51a565){const _0x39ff3a=function(_0x1b2947){while(--_0x1b2947){_0x3e1195['push'](_0x3e1195['shift']());}};_0x39ff3a(++_0x51a565);}(_0x51a5,0x168));const _0x39ff=function(_0x3e1195,_0x51a565){_0x3e1195=_0x3e1195-0x0;let _0x39ff3a=_0x51a5[_0x3e1195];return _0x39ff3a;};import{ListView as _0xede10e,ListItemGroupView as _0x38c6ce,ButtonView as _0x3d0577}from'ckeditor5/src/ui';import{getTranslation as _0x380b11}from'../../utils/common-translations';export default class ot extends _0xede10e{constructor(_0x2b390e){super(_0x2b390e),this['clearHistoryButton']=this['_createClearHistoryButton'](),this[_0x39ff('0x8')]=new _0x38c6ce(),this[_0x39ff('0x8')][_0x39ff('0xb')]['add'](this['clearHistoryButton'],0x1),this[_0x39ff('0x8')][_0x39ff('0xa')]=_0x380b11(_0x2b390e,_0x39ff('0x9')),this[_0x39ff('0x8')][_0x39ff('0x2')][_0x39ff('0x7')](_0x39ff('0x0'))['to'](this),this[_0x39ff('0x2')][_0x39ff('0x6')](this[_0x39ff('0x8')]);}[_0x39ff('0xc')](){let _0x7e1934=0x0;for(const _0x58d5a9 of this[_0x39ff('0x2')])_0x7e1934+=_0x58d5a9[_0x39ff('0x2')][_0x39ff('0xe')];return{'resultsCount':_0x7e1934,'totalItemsCount':_0x7e1934};}['_createClearHistoryButton'](){const _0x5e550e=this[_0x39ff('0xd')],_0x6a91a6=new _0x3d0577(this[_0x39ff('0xd')]);return _0x6a91a6[_0x39ff('0x3')]({'label':'('+_0x380b11(_0x5e550e,_0x39ff('0x5'))+')','withText':!0x0}),_0x6a91a6['on'](_0x39ff('0x0'),()=>this[_0x39ff('0x1')](_0x39ff('0x4'))),_0x6a91a6;}}
23
+ const _0xdbae=['_createClearHistoryButton','Prompt\x20history','length','label','add','locale','filter','clearHistoryButton','execute','historyGroupView','fire','Clear','items','delegate'];(function(_0x426b60,_0xdbaead){const _0x541586=function(_0xc17a0a){while(--_0xc17a0a){_0x426b60['push'](_0x426b60['shift']());}};_0x541586(++_0xdbaead);}(_0xdbae,0x17b));const _0x5415=function(_0x426b60,_0xdbaead){_0x426b60=_0x426b60-0x0;let _0x541586=_0xdbae[_0x426b60];return _0x541586;};import{ListView as _0x2d34c5,ListItemGroupView as _0x3d9336,ButtonView as _0x5c5e90}from'ckeditor5/src/ui';import{getTranslation as _0xb69122}from'../../utils/common-translations';export default class ot extends _0x2d34c5{constructor(_0x26ce3f){super(_0x26ce3f),this[_0x5415('0x6')]=this[_0x5415('0xd')](),this[_0x5415('0x8')]=new _0x3d9336(),this[_0x5415('0x8')]['children']['add'](this[_0x5415('0x6')],0x1),this[_0x5415('0x8')][_0x5415('0x2')]=_0xb69122(_0x26ce3f,_0x5415('0x0')),this['historyGroupView'][_0x5415('0xb')][_0x5415('0xc')](_0x5415('0x7'))['to'](this),this[_0x5415('0xb')][_0x5415('0x3')](this[_0x5415('0x8')]);}[_0x5415('0x5')](){let _0x41014b=0x0;for(const _0x45c632 of this['items'])_0x41014b+=_0x45c632[_0x5415('0xb')][_0x5415('0x1')];return{'resultsCount':_0x41014b,'totalItemsCount':_0x41014b};}[_0x5415('0xd')](){const _0x3d15f9=this[_0x5415('0x4')],_0x4a7dac=new _0x5c5e90(this['locale']);return _0x4a7dac['set']({'label':'('+_0xb69122(_0x3d15f9,_0x5415('0xa'))+')','withText':!0x0}),_0x4a7dac['on'](_0x5415('0x7'),()=>this[_0x5415('0x9')]('clearHistory')),_0x4a7dac;}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x1a4f=['trim','_saveToSessionStorage','add','remove','length','prompt','_loadFromSessionStorage','setItem','map','stringify','getItem','addMany','toLowerCase','parse','last'];(function(_0x17a5ac,_0x1a4ffc){const _0x4d6cd9=function(_0x41066b){while(--_0x41066b){_0x17a5ac['push'](_0x17a5ac['shift']());}};_0x4d6cd9(++_0x1a4ffc);}(_0x1a4f,0xc7));const _0x4d6c=function(_0x17a5ac,_0x1a4ffc){_0x17a5ac=_0x17a5ac-0x0;let _0x4d6cd9=_0x1a4f[_0x17a5ac];return _0x4d6cd9;};import{Collection as _0x8592a0}from'ckeditor5/src/utils';const ts='CKEditor/AIFormView/PromptHistory';export default class at extends _0x8592a0{constructor(){super(),this[_0x4d6c('0x2')](),this['on'](_0x4d6c('0xd'),(_0x52c5e3,_0x3193f3)=>{const _0x457162=os(_0x3193f3[_0x4d6c('0x1')]);for(const _0x2fcc29 of this)if(_0x2fcc29!=_0x3193f3&&os(_0x2fcc29[_0x4d6c('0x1')])===_0x457162){this[_0x4d6c('0xe')](_0x2fcc29);break;}this[_0x4d6c('0x0')]>0x14&&this[_0x4d6c('0xe')](this[_0x4d6c('0xa')]),this[_0x4d6c('0xc')]();}),this['on'](_0x4d6c('0xe'),()=>{this[_0x4d6c('0xc')]();});}['_loadFromSessionStorage'](){const _0x38d37e=sessionStorage[_0x4d6c('0x6')](ts)||'[]';this[_0x4d6c('0x7')](JSON[_0x4d6c('0x9')](_0x38d37e));}[_0x4d6c('0xc')](){sessionStorage[_0x4d6c('0x3')](ts,JSON[_0x4d6c('0x5')](this[_0x4d6c('0x4')](_0x19c3d6=>_0x19c3d6)));}}function os(_0xac3ea7){return _0xac3ea7[_0x4d6c('0x8')]()[_0x4d6c('0xb')]();}
23
+ const _0x43c2=['add','parse','trim','_loadFromSessionStorage','length','map','toLowerCase','remove','getItem','setItem','CKEditor/AIFormView/PromptHistory','_saveToSessionStorage'];(function(_0x32f160,_0x43c200){const _0x3482fb=function(_0x182976){while(--_0x182976){_0x32f160['push'](_0x32f160['shift']());}};_0x3482fb(++_0x43c200);}(_0x43c2,0x13a));const _0x3482=function(_0x32f160,_0x43c200){_0x32f160=_0x32f160-0x0;let _0x3482fb=_0x43c2[_0x32f160];return _0x3482fb;};import{Collection as _0xa9cae6}from'ckeditor5/src/utils';const ts=_0x3482('0x8');export default class at extends _0xa9cae6{constructor(){super(),this[_0x3482('0x1')](),this['on'](_0x3482('0xa'),(_0x44e0e0,_0x56027a)=>{const _0x56f936=os(_0x56027a['prompt']);for(const _0x9e2d2c of this)if(_0x9e2d2c!=_0x56027a&&os(_0x9e2d2c['prompt'])===_0x56f936){this[_0x3482('0x5')](_0x9e2d2c);break;}this[_0x3482('0x2')]>0x14&&this['remove'](this['last']),this[_0x3482('0x9')]();}),this['on'](_0x3482('0x5'),()=>{this[_0x3482('0x9')]();});}[_0x3482('0x1')](){const _0x38f539=sessionStorage[_0x3482('0x6')](ts)||'[]';this['addMany'](JSON[_0x3482('0xb')](_0x38f539));}[_0x3482('0x9')](){sessionStorage[_0x3482('0x7')](ts,JSON['stringify'](this[_0x3482('0x3')](_0x22ee76=>_0x22ee76)));}}function os(_0x3c2d0d){return _0x3c2d0d[_0x3482('0x4')]()[_0x3482('0x0')]();}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x4241=['selection','getItems','config','showUI','refresh','editor','aiAssistant.disabledElements','getRanges','model','execute','isEnabled','name','plugins','document','get','includes'];(function(_0x2fc978,_0x424196){const _0x2595e4=function(_0x1a150e){while(--_0x1a150e){_0x2fc978['push'](_0x2fc978['shift']());}};_0x2595e4(++_0x424196);}(_0x4241,0x12c));const _0x2595=function(_0x2fc978,_0x424196){_0x2fc978=_0x2fc978-0x0;let _0x2595e4=_0x4241[_0x2fc978];return _0x2595e4;};import{Command as _0x27c0c1}from'ckeditor5/src/core';import _0x1e6a85 from'../aiassistantui';export default class I extends _0x27c0c1{[_0x2595('0x8')](){const _0x44bc9a=this['editor'][_0x2595('0xc')][_0x2595('0x1')][_0x2595('0x4')],_0x1d078f=this[_0x2595('0x9')][_0x2595('0x6')][_0x2595('0x2')](_0x2595('0xa'));for(const _0x1b1423 of _0x44bc9a[_0x2595('0xb')]())for(const _0xf3fb65 of _0x1b1423[_0x2595('0x5')]())if(_0xf3fb65['is']('element')&&_0x1d078f[_0x2595('0x3')](_0xf3fb65[_0x2595('0xf')]))return void(this[_0x2595('0xe')]=!0x1);this['isEnabled']=!0x0;}[_0x2595('0xd')](_0x3950e4='',_0x40763a=''){this[_0x2595('0x9')][_0x2595('0x0')][_0x2595('0x2')](_0x1e6a85)[_0x2595('0x7')](_0x3950e4,_0x40763a);}}
23
+ const _0x2d25=['editor','model','refresh','execute','getRanges','includes','isEnabled','get','config','aiAssistant.disabledElements','showUI','selection','document','getItems','element'];(function(_0x1d5e69,_0x2d25f8){const _0x3fdffb=function(_0x21984c){while(--_0x21984c){_0x1d5e69['push'](_0x1d5e69['shift']());}};_0x3fdffb(++_0x2d25f8);}(_0x2d25,0xdf));const _0x3fdf=function(_0x1d5e69,_0x2d25f8){_0x1d5e69=_0x1d5e69-0x0;let _0x3fdffb=_0x2d25[_0x1d5e69];return _0x3fdffb;};import{Command as _0x5cd704}from'ckeditor5/src/core';import _0x7bd4f from'../aiassistantui';export default class I extends _0x5cd704{[_0x3fdf('0x4')](){const _0x13632a=this[_0x3fdf('0x2')][_0x3fdf('0x3')][_0x3fdf('0xe')][_0x3fdf('0xd')],_0x543193=this[_0x3fdf('0x2')][_0x3fdf('0xa')][_0x3fdf('0x9')](_0x3fdf('0xb'));for(const _0x163a3f of _0x13632a[_0x3fdf('0x6')]())for(const _0x2ceb86 of _0x163a3f[_0x3fdf('0x0')]())if(_0x2ceb86['is'](_0x3fdf('0x1'))&&_0x543193[_0x3fdf('0x7')](_0x2ceb86['name']))return void(this[_0x3fdf('0x8')]=!0x1);this[_0x3fdf('0x8')]=!0x0;}[_0x3fdf('0x5')](_0xa1253d='',_0x1ac167=''){this['editor']['plugins'][_0x3fdf('0x9')](_0x7bd4f)[_0x3fdf('0xc')](_0xa1253d,_0x1ac167);}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- export function getTranslation(_0x45544f,_0xb8a644,_0x337ac9){const t=_0x45544f['t'];switch(_0xb8a644){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',_0x337ac9);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_INSERT_CONTENT':return t({'id':'AI_INSERT_CONTENT','string':'Insert'});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 _0xb8a644;}}
23
+ export function getTranslation(_0x472a84,_0x23dec0,_0x34537a){const t=_0x472a84['t'];switch(_0x23dec0){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',_0x34537a);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_INSERT_CONTENT':return t({'id':'AI_INSERT_CONTENT','string':'Insert'});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 _0x23dec0;}}