@ckeditor/ckeditor5-ai 41.0.0 → 41.1.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.
@@ -1 +1 @@
1
- !function(e){const i=e.it=e.it||{};i.dictionary=Object.assign(i.dictionary||{},{"AI Assistant":"Assistente AI","AI Commands":"Comandi AI","AI is writing...":"L'AI sta scrivendo...",AI_ERROR_CONTEXT_LENGTH:"Il contenuto selezionato è troppo lungo",AI_ERROR_FAILED:"Impossibile comunicare con il servizio AI",AI_ERROR_GET_HEADERS:"Impossibile preparare gli header della richiesta",AI_ERROR_GET_PARAMETERS:"La preparazione dei parametri della richiesta non è riuscita",AI_ERROR_MODERATION:"La query richiesta non supera le regole di moderazione",AI_ERROR_UNSUPPORTED_MODEL:'Il modello IA richiesto (" %0 ") non è supportato',AI_INSERT_CONTENT:"Inserisci",AI_REPLACE_CONTENT:"Sostituisci",Arabic:"Arabo","Ask AI and your prompts will be listed here for you to use later.":"Chiedi all'AI e le tue richieste saranno elencate qui per poterle utilizzare in seguito.","Ask AI to edit or generate":"Chiedi all'AI di modificare o generare","Ask AI to improve generated text":"Chiedi all'AI di migliorare il testo generato",Business:"Commerciale",Casual:"Informale","Change style":"Cambia lo stile","Change tone":"Cambia il tono",Confident:"Sicuro",Continue:"Continua",Copy:"Copia",Direct:"Diretto","Edit or review":"Modifica o controlla","Empty history":"Cronologia vuota",English:"Inglese",French:"francese",Friendly:"Amichevole","Generate from selection":"Genera dalla selezione",German:"Tedesco",Hindi:"hindi",History:"Cronologia","Improve writing":"Migliora la scrittura","Insert below":"Inserisci qui sotto",Journalism:"Giornalismo",Legal:"Legale","Make longer":"Estendi","Make shorter":"Abbrevia","No commands available":"Nessun comando disponibile","No commands found":"Nessun comando trovato",Poetic:"Poetico",Portuguese:"portoghese",Professional:"Professionale","Prompt history":"Cronologia richieste","Search AI command":"Cerca il comando AI","Simplified Chinese":"Cinese semplificato","Simplify language":"Semplifica il linguaggio",Spanish:"spagnolo",Stop:"Ferma",Submit:"Invia",Summarize:"Riassumi",Translate:"Tradurre","Translate to %0":"Traduci in %0","Try again":"Riprova"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
1
+ !function(i){const e=i.it=i.it||{};e.dictionary=Object.assign(e.dictionary||{},{"AI Assistant":"Assistente IA","AI Commands":"Comandi IA","AI is writing...":"L'IA sta scrivendo...",AI_ERROR_CONTEXT_LENGTH:"Il contenuto selezionato è troppo lungo",AI_ERROR_FAILED:"Impossibile comunicare con il servizio dell'IA",AI_ERROR_GET_HEADERS:"La preparazione delle intestazioni della richiesta è fallita",AI_ERROR_GET_PARAMETERS:"La preparazione dei parametri della richiesta è fallita",AI_ERROR_MODERATION:"La query richiesta non supera le regole di moderazione",AI_ERROR_UNSUPPORTED_MODEL:'Il modello di IA richiesto (" %0 ") non è supportato',AI_INSERT_CONTENT:"Inserisci",AI_REPLACE_CONTENT:"Sostituisci",Arabic:"arabo","Ask AI and your prompts will be listed here for you to use later.":"Chiedi all'IA e le tue richieste saranno elencate qui per poterle utilizzare in seguito.","Ask AI to edit or generate":"Chiedi all'IA di modificare o generare","Ask AI to improve generated text":"Chiedi all'IA di migliorare il testo generato",Business:"Commerciale",Casual:"Informale","Change style":"Cambia lo stile","Change tone":"Cambia il tono",Confident:"Sicuro",Continue:"Continua",Copy:"Copia",Direct:"Diretto","Edit or review":"Modifica o controlla","Empty history":"Cronologia vuota",English:"inglese",French:"francese",Friendly:"Amichevole","Generate from selection":"Genera dalla selezione",German:"tedesco",Hindi:"hindi",History:"Cronologia","Improve writing":"Migliora la scrittura","Insert below":"Inserisci qui sotto",Journalism:"Giornalismo",Legal:"Legale","Make longer":"Estendi","Make shorter":"Abbrevia","No commands available":"Nessun comando disponibile","No commands found":"Nessun comando trovato",Poetic:"Poetico",Portuguese:"portoghese",Professional:"Professionale","Prompt history":"Cronologia richieste","Search AI command":"Cerca comando IA","Simplified Chinese":"cinese semplificato","Simplify language":"Semplifica il linguaggio",Spanish:"spagnolo",Stop:"Ferma",Submit:"Invia",Summarize:"Riassumi",Translate:"Traduci","Translate to %0":"Traduci in %0","Try again":"Riprova"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
@@ -95,7 +95,7 @@ msgstr "Poetico"
95
95
 
96
96
  msgctxt "AI command group label for translating the content."
97
97
  msgid "Translate"
98
- msgstr "Tradurre"
98
+ msgstr "Traduci"
99
99
 
100
100
  msgctxt "Label for the AI command. Example: (Translate to) English"
101
101
  msgid "Translate to %0"
@@ -103,7 +103,7 @@ msgstr "Traduci in %0"
103
103
 
104
104
  msgctxt "Translate to (English)"
105
105
  msgid "English"
106
- msgstr "Inglese"
106
+ msgstr "inglese"
107
107
 
108
108
  msgctxt "Translate to (Spanish)"
109
109
  msgid "Spanish"
@@ -111,7 +111,7 @@ msgstr "spagnolo"
111
111
 
112
112
  msgctxt "Translate to (German)"
113
113
  msgid "German"
114
- msgstr "Tedesco"
114
+ msgstr "tedesco"
115
115
 
116
116
  msgctxt "Translate to (Portuguese)"
117
117
  msgid "Portuguese"
@@ -123,7 +123,7 @@ msgstr "francese"
123
123
 
124
124
  msgctxt "Translate to (Simplified Chinese)"
125
125
  msgid "Simplified Chinese"
126
- msgstr "Cinese semplificato"
126
+ msgstr "cinese semplificato"
127
127
 
128
128
  msgctxt "Translate to (Hindi)"
129
129
  msgid "Hindi"
@@ -131,23 +131,23 @@ msgstr "hindi"
131
131
 
132
132
  msgctxt "Translate to (Arabic)"
133
133
  msgid "Arabic"
134
- msgstr "Arabo"
134
+ msgstr "arabo"
135
135
 
136
136
  msgctxt "The heading element name displayed in the AI dialog and the button tooltip that opens the dialog."
137
137
  msgid "AI Assistant"
138
- msgstr "Assistente AI"
138
+ msgstr "Assistente IA"
139
139
 
140
140
  msgctxt "The toolbar button tooltip for the dropdown with predefined AI commands."
141
141
  msgid "AI Commands"
142
- msgstr "Comandi AI"
142
+ msgstr "Comandi IA"
143
143
 
144
144
  msgctxt "The placeholder for the prompt input to obtain new content."
145
145
  msgid "Ask AI to edit or generate"
146
- msgstr "Chiedi all'AI di modificare o generare"
146
+ msgstr "Chiedi all'IA di modificare o generare"
147
147
 
148
148
  msgctxt "The placeholder for the prompt input to improve the generated content."
149
149
  msgid "Ask AI to improve generated text"
150
- msgstr "Chiedi all'AI di migliorare il testo generato"
150
+ msgstr "Chiedi all'IA di migliorare il testo generato"
151
151
 
152
152
  msgctxt "The label for the button that copies the text from the textarea."
153
153
  msgid "Copy"
@@ -171,7 +171,7 @@ msgstr "Ferma"
171
171
 
172
172
  msgctxt "The label that indicates the AI is generating content."
173
173
  msgid "AI is writing..."
174
- msgstr "L'AI sta scrivendo..."
174
+ msgstr "L'IA sta scrivendo..."
175
175
 
176
176
  msgctxt "The label of the button that toggles the prompt history pane in the AI dialog."
177
177
  msgid "History"
@@ -183,7 +183,7 @@ msgstr "Cronologia vuota"
183
183
 
184
184
  msgctxt "The secondary information text displayed when the prompt history is empty."
185
185
  msgid "Ask AI and your prompts will be listed here for you to use later."
186
- msgstr "Chiedi all'AI e le tue richieste saranno elencate qui per poterle utilizzare in seguito."
186
+ msgstr "Chiedi all'IA e le tue richieste saranno elencate qui per poterle utilizzare in seguito."
187
187
 
188
188
  msgctxt "The label of the list group that hosts historical user prompts in the AI dialog."
189
189
  msgid "Prompt history"
@@ -191,7 +191,7 @@ msgstr "Cronologia richieste"
191
191
 
192
192
  msgctxt "The placeholder for the search input to filter the AI commands."
193
193
  msgid "Search AI command"
194
- msgstr "Cerca il comando AI"
194
+ msgstr "Cerca comando IA"
195
195
 
196
196
  msgctxt "The message displayed when the commands search input does not match any AI commands."
197
197
  msgid "No commands found"
@@ -211,15 +211,15 @@ msgstr "Inserisci"
211
211
 
212
212
  msgctxt "Error message displayed when preparing request headers fails."
213
213
  msgid "AI_ERROR_GET_HEADERS"
214
- msgstr "Impossibile preparare gli header della richiesta"
214
+ msgstr "La preparazione delle intestazioni della richiesta è fallita"
215
215
 
216
216
  msgctxt "Error message displayed when preparing request parameters fails."
217
217
  msgid "AI_ERROR_GET_PARAMETERS"
218
- msgstr "La preparazione dei parametri della richiesta non è riuscita"
218
+ msgstr "La preparazione dei parametri della richiesta è fallita"
219
219
 
220
220
  msgctxt "Error message displayed when the requested AI model is not supported."
221
221
  msgid "AI_ERROR_UNSUPPORTED_MODEL"
222
- msgstr "Il modello IA richiesto (\" %0 \") non è supportato"
222
+ msgstr "Il modello di IA richiesto (\" %0 \") non è supportato"
223
223
 
224
224
  msgctxt "Error message displayed when the content selected for AI processing is too long"
225
225
  msgid "AI_ERROR_CONTEXT_LENGTH"
@@ -231,4 +231,4 @@ msgstr "La query richiesta non supera le regole di moderazione"
231
231
 
232
232
  msgctxt "Generic error message displayed when the request failed for unspecified reason."
233
233
  msgid "AI_ERROR_FAILED"
234
- msgstr "Impossibile comunicare con il servizio AI"
234
+ msgstr "Impossibile comunicare con il servizio dell'IA"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-ai",
3
- "version": "41.0.0",
3
+ "version": "41.1.0",
4
4
  "description": "AI Assistant feature for CKEditor 5.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "CKSource (http://cksource.com/)",
@@ -23,10 +23,10 @@
23
23
  "framework"
24
24
  ],
25
25
  "dependencies": {
26
- "ckeditor5": "41.0.0",
27
- "ckeditor5-collaboration": "41.0.0",
26
+ "ckeditor5": "41.1.0",
27
+ "ckeditor5-collaboration": "41.1.0",
28
28
  "@aws-sdk/client-bedrock-runtime": "3.470.0",
29
- "@ckeditor/ckeditor5-ui": "41.0.0",
29
+ "@ckeditor/ckeditor5-ui": "41.1.0",
30
30
  "lodash-es": "4.17.21"
31
31
  },
32
32
  "type": "module",
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- var _0x3a78=['AIRequestError','name','AIAdapter','pluginName','aiadapter-text-adapter-not-set'];(function(_0x382be6,_0x3a7886){var _0x3bbc89=function(_0x8064f4){while(--_0x8064f4){_0x382be6['push'](_0x382be6['shift']());}};_0x3bbc89(++_0x3a7886);}(_0x3a78,0x150));var _0x3bbc=function(_0x382be6,_0x3a7886){_0x382be6=_0x382be6-0x0;var _0x3bbc89=_0x3a78[_0x382be6];return _0x3bbc89;};import{Plugin as _0x23cd4a}from'ckeditor5/src/core.js';import{CKEditorError as _0x1bb56a}from'ckeditor5/src/utils.js';export default class I extends _0x23cd4a{static get[_0x3bbc('0x2')](){return _0x3bbc('0x1');}['afterInit'](){if(!this['textAdapter'])throw new _0x1bb56a(_0x3bbc('0x3'),null);}}export class AIRequestError extends Error{constructor(_0x5199d8){super(_0x5199d8),this[_0x3bbc('0x0')]=_0x3bbc('0x4');}}
23
+ var _0x3e1a=['afterInit','textAdapter','aiadapter-text-adapter-not-set','AIAdapter'];(function(_0x2858ee,_0x3e1a7e){var _0x358868=function(_0x5e2924){while(--_0x5e2924){_0x2858ee['push'](_0x2858ee['shift']());}};_0x358868(++_0x3e1a7e);}(_0x3e1a,0x10d));var _0x3588=function(_0x2858ee,_0x3e1a7e){_0x2858ee=_0x2858ee-0x0;var _0x358868=_0x3e1a[_0x2858ee];return _0x358868;};import{Plugin as _0x2936d1}from'ckeditor5/src/core.js';import{CKEditorError as _0xa67f6d}from'ckeditor5/src/utils.js';export default class I extends _0x2936d1{static get['pluginName'](){return _0x3588('0x2');}[_0x3588('0x3')](){if(!this[_0x3588('0x0')])throw new _0xa67f6d(_0x3588('0x1'),null);}}export class AIRequestError extends Error{constructor(_0x18183f){super(_0x18183f),this['name']='AIRequestError';}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x1ba8=['makeRequest','_prepareRequestParameters','init','aitextadapter-send-request-failed','sendRequest','locale','resolve','_prepareRequestHeaders','abortController','catch','object','application/json','reject','name','error','assign','plugins','signal','editor','aborted','get','AI_ERROR_GET_PARAMETERS','abort'];(function(_0x2e5222,_0x1ba8a1){const _0x5a7f64=function(_0x5b77dd){while(--_0x5b77dd){_0x2e5222['push'](_0x2e5222['shift']());}};_0x5a7f64(++_0x1ba8a1);}(_0x1ba8,0x126));const _0x5a7f=function(_0x2e5222,_0x1ba8a1){_0x2e5222=_0x2e5222-0x0;let _0x5a7f64=_0x1ba8[_0x2e5222];return _0x5a7f64;};import{Plugin as _0x35e9db}from'ckeditor5/src/core.js';import{CKEditorError as _0x8d0012}from'ckeditor5/src/utils.js';import{default as _0x5f2cc2,AIRequestError as _0x2f8655}from'./aiadapter.js';import{getTranslation as _0xea8bf0}from'../utils/common-translations.js';export default class _ extends _0x35e9db{static get['requires'](){return[_0x5f2cc2];}constructor(_0x4de12b){super(_0x4de12b),this[_0x5a7f('0xd')]=new AbortController();}[_0x5a7f('0x7')](){this[_0x5a7f('0x0')][_0x5a7f('0x15')][_0x5a7f('0x2')](_0x5f2cc2)['textAdapter']=this;}[_0x5a7f('0x4')](){this[_0x5a7f('0xd')][_0x5a7f('0x16')][_0x5a7f('0x1')]||(this[_0x5a7f('0xd')][_0x5a7f('0x4')](),this[_0x5a7f('0xd')]=new AbortController());}async[_0x5a7f('0x5')](_0x43eddd){return this[_0x5a7f('0x9')](_0x43eddd)[_0x5a7f('0xe')](_0x1cdf7a=>{if(_0x1cdf7a instanceof _0x2f8655)return Promise['reject'](_0x1cdf7a);if('AbortError'==_0x1cdf7a[_0x5a7f('0x12')])return Promise[_0x5a7f('0xb')]();throw console[_0x5a7f('0x13')](_0x1cdf7a),new _0x8d0012(_0x5a7f('0x8'),null);});}async[_0x5a7f('0xc')](_0x46ba52,_0x43d4cc){const _0x62c49a=this[_0x5a7f('0x0')][_0x5a7f('0xa')],_0x3b60d2={'Content-Type':_0x5a7f('0x10')};if(_0x5a7f('0xf')==typeof _0x46ba52)Object[_0x5a7f('0x14')](_0x3b60d2,_0x46ba52);else{if(_0x46ba52)try{const _0x398bda=await _0x46ba52(_0x43d4cc);Object[_0x5a7f('0x14')](_0x3b60d2,_0x398bda);}catch(_0x375d30){return Promise['reject'](new _0x2f8655(_0xea8bf0(_0x62c49a,'AI_ERROR_GET_HEADERS')));}}return _0x3b60d2;}async[_0x5a7f('0x6')](_0x164509,_0x409b60){const _0x205343=this[_0x5a7f('0x0')][_0x5a7f('0xa')];if(_0x5a7f('0xf')==typeof _0x164509)return _0x164509;try{return await _0x164509(_0x409b60);}catch(_0x3ba33c){return Promise[_0x5a7f('0x11')](new _0x2f8655(_0xea8bf0(_0x205343,_0x5a7f('0x3'))));}}}
23
+ const _0x4cc4=['_prepareRequestHeaders','object','textAdapter','AI_ERROR_GET_HEADERS','assign','get','editor','abortController','name','locale','AI_ERROR_GET_PARAMETERS','aitextadapter-send-request-failed','requires','catch','_prepareRequestParameters','reject','aborted','sendRequest','error'];(function(_0x5ce10e,_0x4cc4a5){const _0x4c57af=function(_0x442832){while(--_0x442832){_0x5ce10e['push'](_0x5ce10e['shift']());}};_0x4c57af(++_0x4cc4a5);}(_0x4cc4,0x1ea));const _0x4c57=function(_0x5ce10e,_0x4cc4a5){_0x5ce10e=_0x5ce10e-0x0;let _0x4c57af=_0x4cc4[_0x5ce10e];return _0x4c57af;};import{Plugin as _0x309e29}from'ckeditor5/src/core.js';import{CKEditorError as _0x15d04f}from'ckeditor5/src/utils.js';import{default as _0x54ce66,AIRequestError as _0x202888}from'./aiadapter.js';import{getTranslation as _0x4d3a16}from'../utils/common-translations.js';export default class _ extends _0x309e29{static get[_0x4c57('0x10')](){return[_0x54ce66];}constructor(_0x715b2c){super(_0x715b2c),this[_0x4c57('0xb')]=new AbortController();}['init'](){this[_0x4c57('0xa')]['plugins'][_0x4c57('0x9')](_0x54ce66)[_0x4c57('0x6')]=this;}['abort'](){this[_0x4c57('0xb')]['signal'][_0x4c57('0x1')]||(this[_0x4c57('0xb')]['abort'](),this[_0x4c57('0xb')]=new AbortController());}async['makeRequest'](_0x4759db){return this[_0x4c57('0x2')](_0x4759db)[_0x4c57('0x11')](_0x43f1c9=>{if(_0x43f1c9 instanceof _0x202888)return Promise['reject'](_0x43f1c9);if('AbortError'==_0x43f1c9[_0x4c57('0xc')])return Promise['resolve']();throw console[_0x4c57('0x3')](_0x43f1c9),new _0x15d04f(_0x4c57('0xf'),null);});}async[_0x4c57('0x4')](_0x2dcc84,_0x46e1ff){const _0x5bb98f=this['editor'][_0x4c57('0xd')],_0x55e616={'Content-Type':'application/json'};if(_0x4c57('0x5')==typeof _0x2dcc84)Object[_0x4c57('0x8')](_0x55e616,_0x2dcc84);else{if(_0x2dcc84)try{const _0x1ff915=await _0x2dcc84(_0x46e1ff);Object[_0x4c57('0x8')](_0x55e616,_0x1ff915);}catch(_0x58be44){return Promise['reject'](new _0x202888(_0x4d3a16(_0x5bb98f,_0x4c57('0x7'))));}}return _0x55e616;}async[_0x4c57('0x12')](_0x36792c,_0x120151){const _0x42efb7=this[_0x4c57('0xa')][_0x4c57('0xd')];if(_0x4c57('0x5')==typeof _0x36792c)return _0x36792c;try{return await _0x36792c(_0x120151);}catch(_0x45fd88){return Promise[_0x4c57('0x0')](new _0x202888(_0x4d3a16(_0x42efb7,_0x4c57('0xe'))));}}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x49e3=['cohere.command','_apiUrl','split','ai.aws.requestParameters.anthropic_version','parse','preparePrompt','completions','read','json','meta.llama','_prepareRequestParameters','body','decode','join','pluginName','\x0a\x0aAssistant:','map','bytes','application/json','from','<<SYS>>\x0a','ai.aws.requestParameters.max_tokens_to_sample','chunk','bedrock-2023-05-31','editor','resolve','Instruction:\x0a','AWSTextAdapter','_processAWSRequest','data','startsWith','stringify','_readStreamableResponse','get','\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a','ai.aws.requestParameters.top_p','utf-8','_requestHeaders','_readStaticResponse','completion','_readAsyncIterableResponse','signal','utf8','text','_getGeneratedText','filter','getReader','\x0a<</SYS>>\x0a[INST]\x0a','test','getModelFamily','sendRequest','generations','_bedrockClientConfig','Human:\x0a','define','ai.aws.requestParameters.stream','config','POST','_requestParameters','anthropic.claude-v2','ai.aws.requestParameters.model','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.','_processProxyRequest','ai.aws.requestParameters.temperature','length','ai21.j2','locale','ai.aws.bedrockClientConfig','\x0a[/INST]','_prepareRequestHeaders','ai.aws.requestParameters','abortController','ai.aws.apiUrl'];(function(_0x829635,_0x49e348){const _0x12e164=function(_0x3af88b){while(--_0x3af88b){_0x829635['push'](_0x829635['shift']());}};_0x12e164(++_0x49e348);}(_0x49e3,0x86));const _0x12e1=function(_0x829635,_0x49e348){_0x829635=_0x829635-0x0;let _0x12e164=_0x49e3[_0x829635];return _0x12e164;};import{default as _0x4059f9}from'./aitextadapter.js';import{AIRequestError as _0x5dc193}from'./aiadapter.js';import{BedrockRuntimeClient as _0x359174,InvokeModelCommand as _0x32f221,InvokeModelWithResponseStreamCommand as _0x354837}from'@aws-sdk/client-bedrock-runtime';import{getTranslation as _0x4eaf34}from'../utils/common-translations.js';export default class H extends _0x4059f9{static get[_0x12e1('0x1a')](){return _0x12e1('0x27');}constructor(_0x14a070){super(_0x14a070),_0x14a070[_0x12e1('0x44')]['get'](_0x12e1('0x9'))||(_0x14a070[_0x12e1('0x44')][_0x12e1('0x42')](_0x12e1('0x48'),_0x12e1('0x47')),_0x14a070[_0x12e1('0x44')]['define'](_0x12e1('0x21'),0x7d0),_0x14a070[_0x12e1('0x44')]['define'](_0x12e1('0x2'),0x1),_0x14a070['config'][_0x12e1('0x42')](_0x12e1('0x2f'),0x1),_0x14a070[_0x12e1('0x44')][_0x12e1('0x42')]('ai.aws.requestParameters.top_k',0xfa),_0x14a070['config'][_0x12e1('0x42')](_0x12e1('0xf'),_0x12e1('0x23')),_0x14a070[_0x12e1('0x44')][_0x12e1('0x42')](_0x12e1('0x43'),!0x0)),this[_0x12e1('0xd')]=_0x14a070[_0x12e1('0x44')][_0x12e1('0x2d')](_0x12e1('0xb')),this['_bedrockClientConfig']=_0x14a070[_0x12e1('0x44')]['get'](_0x12e1('0x6')),this[_0x12e1('0x31')]=_0x14a070[_0x12e1('0x44')][_0x12e1('0x2d')]('ai.aws.requestHeaders'),this[_0x12e1('0x46')]=_0x14a070[_0x12e1('0x44')]['get']('ai.aws.requestParameters');}async[_0x12e1('0x3e')]({query:_0x59c7b6,context:_0x4d2be0,onData:_0xf86a97,actionId:_0x32a69d}){const {model:_0x2de079,stream:_0x17641d,..._0x4fd126}=await this[_0x12e1('0x16')](this[_0x12e1('0x46')],_0x32a69d),_0x5a6709={'prompt':await this[_0x12e1('0x11')](_0x59c7b6,_0x4d2be0,_0x2de079,_0x32a69d),..._0x4fd126};this[_0x12e1('0xd')]?await this[_0x12e1('0x1')](_0x5a6709,_0x2de079,_0x17641d,_0xf86a97,_0x32a69d):await this['_processAWSRequest'](_0x5a6709,_0x2de079,_0x17641d,_0xf86a97);}async[_0x12e1('0x11')](_0x4d6bc5,_0x3a5dfe,_0x1c5f5e,_0x5b8fb3){let _0x1e2579,_0x2bb547;return _0x3a5dfe?(_0x1e2579='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.',_0x2bb547=_0x12e1('0x26')+_0x4d6bc5+_0x12e1('0x2e')+(_0x3a5dfe[_0x12e1('0x2a')]('<')?_0x3a5dfe:'<span>'+_0x3a5dfe+'</span>')):(_0x1e2579=_0x12e1('0x0'),_0x2bb547=_0x4d6bc5),'meta.llama'==this[_0x12e1('0x3d')](_0x1c5f5e)?_0x12e1('0x20')+_0x1e2579+_0x12e1('0x3b')+_0x2bb547+_0x12e1('0x7'):_0x12e1('0x41')+_0x1e2579+'\x0a'+_0x2bb547+_0x12e1('0x1b');}[_0x12e1('0x3d')](_0x566303){if(/^anthropic\.claude/[_0x12e1('0x3c')](_0x566303))return'anthropic.claude';if(/^ai21\.j2/[_0x12e1('0x3c')](_0x566303))return'ai21.j2';if(/^cohere\.command/[_0x12e1('0x3c')](_0x566303))return _0x12e1('0xc');if(/^meta\.llama/['test'](_0x566303))return _0x12e1('0x15');throw new _0x5dc193(_0x4eaf34(this[_0x12e1('0x24')][_0x12e1('0x5')],'AI_ERROR_UNSUPPORTED_MODEL',_0x566303));}async[_0x12e1('0x1')](_0x4c8dd5,_0x3b2d1b,_0xa5ec4a,_0x4b1161,_0xafca01){const _0x59a577={'method':_0x12e1('0x45'),'headers':await this[_0x12e1('0x8')](this[_0x12e1('0x31')],_0xafca01),'body':JSON[_0x12e1('0x2b')]({..._0x4c8dd5,'model':_0x3b2d1b,'stream':_0xa5ec4a}),'signal':this['abortController'][_0x12e1('0x35')]},_0x4f466b=await fetch(this['_apiUrl'],_0x59a577);_0xa5ec4a?await this[_0x12e1('0x2c')](_0x4f466b,_0x3b2d1b,_0x4b1161):await this[_0x12e1('0x32')](_0x4f466b,_0x3b2d1b,_0x4b1161);}async[_0x12e1('0x28')](_0x177038,_0x425a5e,_0x4ee445,_0x46ae24){const _0x51ab2a=new _0x359174(this[_0x12e1('0x40')]),_0x7ab5d={'body':JSON['stringify'](_0x177038),'contentType':_0x12e1('0x1e'),'accept':'application/json','modelId':_0x425a5e};let _0x3fbf4c;if(_0x4ee445){const _0x298afe=new _0x354837(_0x7ab5d);_0x3fbf4c=await _0x51ab2a['send'](_0x298afe,{'abortSignal':this['abortController']['signal']}),await this[_0x12e1('0x34')](_0x3fbf4c,_0x425a5e,_0x46ae24);}else{const _0x17a166=new _0x32f221(_0x7ab5d);_0x3fbf4c=await _0x51ab2a['send'](_0x17a166,{'abortSignal':this[_0x12e1('0xa')][_0x12e1('0x35')]}),await this[_0x12e1('0x32')](_0x3fbf4c,_0x425a5e,_0x46ae24);}}async[_0x12e1('0x34')](_0x3752ed,_0x489084,_0x35eadd){const _0x18a614=_0x3752ed[_0x12e1('0x17')],_0x565f39=new TextDecoder('utf-8');let _0x3cd51b='';for await(const _0x5cbff5 of _0x18a614)if(_0x5cbff5[_0x12e1('0x22')]){const _0x2b7f70=_0x565f39[_0x12e1('0x18')](_0x5cbff5[_0x12e1('0x22')][_0x12e1('0x1d')]),_0xbd7b90=JSON[_0x12e1('0x10')](_0x2b7f70);_0x3cd51b+=this[_0x12e1('0x38')](_0xbd7b90,_0x489084),_0x35eadd(_0x3cd51b);}return Promise[_0x12e1('0x25')]();}async[_0x12e1('0x2c')](_0x2fd4e9,_0x59a888,_0x2c92a8){const _0x4af78c=_0x2fd4e9[_0x12e1('0x17')],_0x87be23=new TextDecoder(_0x12e1('0x30')),_0x5e6abb=_0x4af78c[_0x12e1('0x3a')]();let _0x134601='',_0xa07a='',_0x229092=!0x1;for(;!_0x229092;){const {done:_0x2e04c2,value:_0x555071}=await _0x5e6abb[_0x12e1('0x13')]();if(_0x229092=_0x2e04c2,_0x229092)break;const _0x2dd88e=(_0x134601+_0x87be23[_0x12e1('0x18')](_0x555071))[_0x12e1('0xe')]('\x0a')[_0x12e1('0x1c')](_0x93d769=>{try{return _0x134601='',JSON[_0x12e1('0x10')](_0x93d769);}catch(_0x5d8926){return _0x134601=_0x93d769,null;}})[_0x12e1('0x39')](_0x2895ba=>null!==_0x2895ba);_0x2dd88e[_0x12e1('0x3')]&&(_0xa07a+=_0x2dd88e['map'](_0x577b1b=>this[_0x12e1('0x38')](_0x577b1b,_0x59a888))[_0x12e1('0x19')](''),_0x2c92a8(_0xa07a));}return Promise['resolve']();}async[_0x12e1('0x32')](_0x569107,_0x268273,_0x4dbd20){let _0x52b6ef;return _0x52b6ef=_0x569107 instanceof Response?await _0x569107[_0x12e1('0x14')]():JSON['parse'](Buffer[_0x12e1('0x1f')](_0x569107[_0x12e1('0x17')])['toString'](_0x12e1('0x36'))),(_0x4dbd20(this['_getGeneratedText'](_0x52b6ef,_0x268273)),Promise[_0x12e1('0x25')]());}[_0x12e1('0x38')](_0x3f63c6,_0x58e20b){switch(this[_0x12e1('0x3d')](_0x58e20b)){case'anthropic.claude':return _0x3f63c6[_0x12e1('0x33')];case _0x12e1('0x4'):return _0x3f63c6[_0x12e1('0x12')][0x0][_0x12e1('0x29')][_0x12e1('0x37')];case _0x12e1('0xc'):return _0x3f63c6[_0x12e1('0x3f')][0x0][_0x12e1('0x37')];case _0x12e1('0x15'):return _0x3f63c6['generation'];}}}
23
+ const _0x5de3=['generations','parse','join','define','length','split','_getGeneratedText','meta.llama','_readStaticResponse','map','chunk','startsWith','editor','_apiUrl','bytes','pluginName','_prepareRequestParameters','decode','preparePrompt','utf8','\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a','_prepareRequestHeaders','cohere.command','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.','anthropic.claude-v2','text','AI_ERROR_UNSUPPORTED_MODEL','config','POST','ai.aws.requestParameters','data','ai.aws.requestParameters.model','utf-8','read','sendRequest','locale','send','_requestParameters','_processProxyRequest','<<SYS>>\x0a','ai.aws.requestParameters.temperature','_requestHeaders','ai.aws.requestParameters.top_p','anthropic.claude','json','ai.aws.requestParameters.anthropic_version','\x0a[/INST]','resolve','generation','signal','Human:\x0a','_processAWSRequest','application/json','<span>','_readAsyncIterableResponse','_bedrockClientConfig','ai.aws.requestParameters.max_tokens_to_sample','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.','get','\x0a\x0aAssistant:','getModelFamily','from','abortController','AWSTextAdapter','ai.aws.apiUrl','ai21.j2','_readStreamableResponse','test','\x0a<</SYS>>\x0a[INST]\x0a','body','bedrock-2023-05-31','ai.aws.requestParameters.stream','toString'];(function(_0x32001c,_0x5de3e2){const _0x18bdbb=function(_0x3fa6e2){while(--_0x3fa6e2){_0x32001c['push'](_0x32001c['shift']());}};_0x18bdbb(++_0x5de3e2);}(_0x5de3,0x136));const _0x18bd=function(_0x32001c,_0x5de3e2){_0x32001c=_0x32001c-0x0;let _0x18bdbb=_0x5de3[_0x32001c];return _0x18bdbb;};import{default as _0x13f561}from'./aitextadapter.js';import{AIRequestError as _0x1d4e40}from'./aiadapter.js';import{BedrockRuntimeClient as _0x2ae28e,InvokeModelCommand as _0x553b5e,InvokeModelWithResponseStreamCommand as _0xe6f000}from'@aws-sdk/client-bedrock-runtime';import{getTranslation as _0x345e6f}from'../utils/common-translations.js';export default class H extends _0x13f561{static get[_0x18bd('0x46')](){return _0x18bd('0x2d');}constructor(_0x5c09a4){super(_0x5c09a4),_0x5c09a4[_0x18bd('0x9')][_0x18bd('0x28')](_0x18bd('0xb'))||(_0x5c09a4[_0x18bd('0x9')][_0x18bd('0x3a')](_0x18bd('0xd'),_0x18bd('0x6')),_0x5c09a4[_0x18bd('0x9')][_0x18bd('0x3a')](_0x18bd('0x26'),0x7d0),_0x5c09a4['config'][_0x18bd('0x3a')](_0x18bd('0x16'),0x1),_0x5c09a4['config']['define'](_0x18bd('0x18'),0x1),_0x5c09a4[_0x18bd('0x9')]['define']('ai.aws.requestParameters.top_k',0xfa),_0x5c09a4[_0x18bd('0x9')][_0x18bd('0x3a')](_0x18bd('0x1b'),_0x18bd('0x34')),_0x5c09a4[_0x18bd('0x9')][_0x18bd('0x3a')](_0x18bd('0x35'),!0x0)),this[_0x18bd('0x44')]=_0x5c09a4[_0x18bd('0x9')][_0x18bd('0x28')](_0x18bd('0x2e')),this[_0x18bd('0x25')]=_0x5c09a4[_0x18bd('0x9')]['get']('ai.aws.bedrockClientConfig'),this['_requestHeaders']=_0x5c09a4[_0x18bd('0x9')][_0x18bd('0x28')]('ai.aws.requestHeaders'),this[_0x18bd('0x13')]=_0x5c09a4[_0x18bd('0x9')][_0x18bd('0x28')](_0x18bd('0xb'));}async[_0x18bd('0x10')]({query:_0x28f2ba,context:_0x477c7a,onData:_0x32819f,actionId:_0x36ce98}){const {model:_0x2d9519,stream:_0x351950,..._0x5cc5a7}=await this[_0x18bd('0x47')](this[_0x18bd('0x13')],_0x36ce98),_0x30dfd2={'prompt':await this[_0x18bd('0x0')](_0x28f2ba,_0x477c7a,_0x2d9519,_0x36ce98),..._0x5cc5a7};this[_0x18bd('0x44')]?await this[_0x18bd('0x14')](_0x30dfd2,_0x2d9519,_0x351950,_0x32819f,_0x36ce98):await this[_0x18bd('0x21')](_0x30dfd2,_0x2d9519,_0x351950,_0x32819f);}async['preparePrompt'](_0x3c9fdf,_0x2bb000,_0x2c71c5,_0x22df88){let _0x4f040c,_0x5b4662;return _0x2bb000?(_0x4f040c=_0x18bd('0x5'),_0x5b4662='Instruction:\x0a'+_0x3c9fdf+_0x18bd('0x2')+(_0x2bb000[_0x18bd('0x42')]('<')?_0x2bb000:_0x18bd('0x23')+_0x2bb000+'</span>')):(_0x4f040c=_0x18bd('0x27'),_0x5b4662=_0x3c9fdf),_0x18bd('0x3e')==this[_0x18bd('0x2a')](_0x2c71c5)?_0x18bd('0x15')+_0x4f040c+_0x18bd('0x32')+_0x5b4662+_0x18bd('0x1c'):_0x18bd('0x20')+_0x4f040c+'\x0a'+_0x5b4662+_0x18bd('0x29');}['getModelFamily'](_0xf34857){if(/^anthropic\.claude/['test'](_0xf34857))return _0x18bd('0x19');if(/^ai21\.j2/['test'](_0xf34857))return _0x18bd('0x2f');if(/^cohere\.command/[_0x18bd('0x31')](_0xf34857))return _0x18bd('0x4');if(/^meta\.llama/[_0x18bd('0x31')](_0xf34857))return _0x18bd('0x3e');throw new _0x1d4e40(_0x345e6f(this[_0x18bd('0x43')][_0x18bd('0x11')],_0x18bd('0x8'),_0xf34857));}async[_0x18bd('0x14')](_0x51dcff,_0x40d99e,_0x3eab8a,_0xe11e73,_0x9b79a){const _0x55f2cb={'method':_0x18bd('0xa'),'headers':await this[_0x18bd('0x3')](this[_0x18bd('0x17')],_0x9b79a),'body':JSON['stringify']({..._0x51dcff,'model':_0x40d99e,'stream':_0x3eab8a}),'signal':this[_0x18bd('0x2c')][_0x18bd('0x1f')]},_0x586dbe=await fetch(this[_0x18bd('0x44')],_0x55f2cb);_0x3eab8a?await this[_0x18bd('0x30')](_0x586dbe,_0x40d99e,_0xe11e73):await this[_0x18bd('0x3f')](_0x586dbe,_0x40d99e,_0xe11e73);}async[_0x18bd('0x21')](_0x1fb200,_0x46b3d8,_0x388b5b,_0x36695d){const _0x112a63=new _0x2ae28e(this['_bedrockClientConfig']),_0x11b4d0={'body':JSON['stringify'](_0x1fb200),'contentType':_0x18bd('0x22'),'accept':_0x18bd('0x22'),'modelId':_0x46b3d8};let _0x45bd74;if(_0x388b5b){const _0x36c55f=new _0xe6f000(_0x11b4d0);_0x45bd74=await _0x112a63[_0x18bd('0x12')](_0x36c55f,{'abortSignal':this[_0x18bd('0x2c')]['signal']}),await this[_0x18bd('0x24')](_0x45bd74,_0x46b3d8,_0x36695d);}else{const _0x51fcbc=new _0x553b5e(_0x11b4d0);_0x45bd74=await _0x112a63[_0x18bd('0x12')](_0x51fcbc,{'abortSignal':this[_0x18bd('0x2c')][_0x18bd('0x1f')]}),await this[_0x18bd('0x3f')](_0x45bd74,_0x46b3d8,_0x36695d);}}async['_readAsyncIterableResponse'](_0x354bce,_0x5af67d,_0x2bef6b){const _0x7653c9=_0x354bce['body'],_0x14e6cd=new TextDecoder(_0x18bd('0xe'));let _0x219d2c='';for await(const _0x4e67d5 of _0x7653c9)if(_0x4e67d5[_0x18bd('0x41')]){const _0x865ffc=_0x14e6cd[_0x18bd('0x48')](_0x4e67d5[_0x18bd('0x41')][_0x18bd('0x45')]),_0x2f4295=JSON[_0x18bd('0x38')](_0x865ffc);_0x219d2c+=this['_getGeneratedText'](_0x2f4295,_0x5af67d),_0x2bef6b(_0x219d2c);}return Promise[_0x18bd('0x1d')]();}async[_0x18bd('0x30')](_0x119c9f,_0xc5eeae,_0x2af72e){const _0x177d38=_0x119c9f[_0x18bd('0x33')],_0x3df6c8=new TextDecoder(_0x18bd('0xe')),_0x31b2cf=_0x177d38['getReader']();let _0x49446d='',_0x21a66e='',_0xfb0c20=!0x1;for(;!_0xfb0c20;){const {done:_0x215369,value:_0x24e6ea}=await _0x31b2cf[_0x18bd('0xf')]();if(_0xfb0c20=_0x215369,_0xfb0c20)break;const _0xea4002=(_0x49446d+_0x3df6c8[_0x18bd('0x48')](_0x24e6ea))[_0x18bd('0x3c')]('\x0a')[_0x18bd('0x40')](_0x37cbe6=>{try{return _0x49446d='',JSON[_0x18bd('0x38')](_0x37cbe6);}catch(_0x1e64b8){return _0x49446d=_0x37cbe6,null;}})['filter'](_0x2d56b1=>null!==_0x2d56b1);_0xea4002[_0x18bd('0x3b')]&&(_0x21a66e+=_0xea4002[_0x18bd('0x40')](_0x4acd94=>this[_0x18bd('0x3d')](_0x4acd94,_0xc5eeae))[_0x18bd('0x39')](''),_0x2af72e(_0x21a66e));}return Promise['resolve']();}async[_0x18bd('0x3f')](_0x129914,_0x503985,_0x422db2){let _0x113856;return _0x113856=_0x129914 instanceof Response?await _0x129914[_0x18bd('0x1a')]():JSON[_0x18bd('0x38')](Buffer[_0x18bd('0x2b')](_0x129914[_0x18bd('0x33')])[_0x18bd('0x36')](_0x18bd('0x1'))),(_0x422db2(this[_0x18bd('0x3d')](_0x113856,_0x503985)),Promise[_0x18bd('0x1d')]());}[_0x18bd('0x3d')](_0x43c510,_0x4ecbcf){switch(this['getModelFamily'](_0x4ecbcf)){case _0x18bd('0x19'):return _0x43c510['completion'];case _0x18bd('0x2f'):return _0x43c510['completions'][0x0][_0x18bd('0xc')][_0x18bd('0x7')];case _0x18bd('0x4'):return _0x43c510[_0x18bd('0x37')][0x0]['text'];case _0x18bd('0x3e'):return _0x43c510[_0x18bd('0x1e')];}}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x5718=['ai.openAI.apiUrl','context_length_exceeded','define','parse','replace','Instruction:\x0a','json','ai.openAI.requestParameters.top_p','Moderation','_apiUrl','[DONE]','_readStreamableResponse','text','_requestParameters','editor','ai.openAI.requestHeaders','_isBufferIncomplete','prepareMessages','split','ai.openAI.requestParameters.max_tokens','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.','</span>','ai.openAI.requestParameters.temperature','config','includes','length','delta','_requestHeaders','locale','gpt-3.5-turbo','filter','decode','join','map','AI_ERROR_MODERATION','OpenAITextAdapter','pluginName','stream','content','resolve','ai.openAI.requestParameters.stream','body','AI_ERROR_CONTEXT_LENGTH','\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a','stringify','choices','<span>','get','ai.openAI.requestParameters.model','_cleanUpData','POST','system','reject','user','sendRequest','read','data:\x20','_prepareRequestHeaders'];(function(_0x18e373,_0x571871){const _0x30e599=function(_0x3bb0db){while(--_0x3bb0db){_0x18e373['push'](_0x18e373['shift']());}};_0x30e599(++_0x571871);}(_0x5718,0xcc));const _0x30e5=function(_0x18e373,_0x571871){_0x18e373=_0x18e373-0x0;let _0x30e599=_0x5718[_0x18e373];return _0x30e599;};import{default as _0x1d87fc}from'./aitextadapter.js';import{AIRequestError as _0x38f10d}from'./aiadapter.js';import{getTranslation as _0x2c3f16}from'../utils/common-translations.js';export default class M extends _0x1d87fc{static get[_0x30e5('0x6')](){return _0x30e5('0x5');}constructor(_0x3a2ed2){super(_0x3a2ed2),_0x3a2ed2['config'][_0x30e5('0x1e')](_0x30e5('0x1c'),'https://api.openai.com/v1/chat/completions'),_0x3a2ed2[_0x30e5('0x33')]['define'](_0x30e5('0x12'),_0x30e5('0x39')),_0x3a2ed2['config'][_0x30e5('0x1e')](_0x30e5('0x2f'),0x7d0),_0x3a2ed2[_0x30e5('0x33')]['define'](_0x30e5('0x32'),0x1),_0x3a2ed2[_0x30e5('0x33')]['define'](_0x30e5('0x23'),0x1),_0x3a2ed2[_0x30e5('0x33')][_0x30e5('0x1e')](_0x30e5('0xa'),!0x0),this[_0x30e5('0x25')]=_0x3a2ed2[_0x30e5('0x33')][_0x30e5('0x11')](_0x30e5('0x1c')),this[_0x30e5('0x37')]=_0x3a2ed2[_0x30e5('0x33')][_0x30e5('0x11')](_0x30e5('0x2b'))||{},this[_0x30e5('0x29')]=_0x3a2ed2[_0x30e5('0x33')][_0x30e5('0x11')]('ai.openAI.requestParameters');}async[_0x30e5('0x18')]({query:_0x73ba9d,context:_0x391999,onData:_0x346e8c,actionId:_0x2ef330}){const _0x4bfc8e=this[_0x30e5('0x2a')][_0x30e5('0x38')],_0x22376d=await this[_0x30e5('0x2d')](_0x73ba9d,_0x391999,_0x2ef330),_0x3c3d5e=await this[_0x30e5('0x1b')](this[_0x30e5('0x37')],_0x2ef330),_0x223608=await this['_prepareRequestParameters'](this[_0x30e5('0x29')],_0x2ef330),_0x53ae95={'messages':_0x22376d,..._0x223608},_0x2fcebf={'method':_0x30e5('0x14'),'headers':_0x3c3d5e,'body':JSON[_0x30e5('0xe')](_0x53ae95),'signal':this['abortController']['signal']},_0x1bf028=await fetch(this[_0x30e5('0x25')],_0x2fcebf);if(_0x1bf028['ok'])return _0x223608[_0x30e5('0x7')]?await this[_0x30e5('0x27')](_0x1bf028,_0x346e8c):await this['_readStaticResponse'](_0x1bf028,_0x346e8c),Promise[_0x30e5('0x9')]();{const _0x276108=await _0x1bf028[_0x30e5('0x28')]();return _0x276108[_0x30e5('0x34')](_0x30e5('0x1d'))?Promise['reject'](new _0x38f10d(_0x2c3f16(_0x4bfc8e,_0x30e5('0xc')))):_0x276108['includes'](_0x30e5('0x24'))?Promise[_0x30e5('0x16')](new _0x38f10d(_0x2c3f16(_0x4bfc8e,_0x30e5('0x4')))):Promise[_0x30e5('0x16')](new Error(_0x276108));}}async[_0x30e5('0x2d')](_0x19b7c3,_0x20d7bd,_0x418ed9){let _0x37d4f3,_0x18f4bb;return _0x20d7bd?(_0x37d4f3=_0x30e5('0x30'),_0x18f4bb=_0x30e5('0x21')+_0x19b7c3+_0x30e5('0xd')+(_0x20d7bd['startsWith']('<')?_0x20d7bd:_0x30e5('0x10')+_0x20d7bd+_0x30e5('0x31'))):(_0x37d4f3='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.',_0x18f4bb=_0x19b7c3),[{'role':_0x30e5('0x15'),'content':_0x37d4f3},{'role':_0x30e5('0x17'),'content':_0x18f4bb}];}async[_0x30e5('0x27')](_0x551182,_0x1c0f16){const _0x1b2390=_0x551182[_0x30e5('0xb')]['getReader'](),_0x1121ae=new TextDecoder();let _0x3e4941='',_0x412a19='',_0x2a3af7='',_0x147bec=!0x1;for(;!_0x147bec;){const {done:_0x1ebafd,value:_0x59dcf7}=await _0x1b2390[_0x30e5('0x19')](),_0x1ffea7=_0x3e4941+_0x1121ae[_0x30e5('0x1')](_0x59dcf7);let _0x3d5a23='';_0x147bec=_0x1ebafd;try{_0x3d5a23=this['_cleanUpData'](_0x1ffea7),_0x3e4941='';}catch(_0x1c6949){_0x3e4941=_0x1ffea7;continue;}_0x412a19+=_0x3d5a23,!_0x147bec&&this['_isBufferIncomplete'](_0x412a19)||_0x412a19&&(_0x2a3af7+=_0x412a19,_0x412a19='',_0x1c0f16(_0x2a3af7));}return Promise[_0x30e5('0x9')]();}async['_readStaticResponse'](_0x3049e8,_0xbd6705){return _0xbd6705((await _0x3049e8[_0x30e5('0x22')]())[_0x30e5('0xf')][0x0]['message'][_0x30e5('0x8')]),Promise['resolve']();}[_0x30e5('0x2c')](_0x2a993e){const _0x13f403=_0x2a993e['split']('<')[_0x30e5('0x35')]!==_0x2a993e[_0x30e5('0x2e')]('>')[_0x30e5('0x35')],_0x3f2678=_0x2a993e[_0x30e5('0x35')]<0x1e;return _0x13f403&&_0x3f2678;}[_0x30e5('0x13')](_0x2f9436){return _0x2f9436[_0x30e5('0x2e')](/\n(?![^{]*\})/g)[_0x30e5('0x3')](_0x3cad8b=>_0x3cad8b[_0x30e5('0x20')](_0x30e5('0x1a'),''))[_0x30e5('0x0')](_0x4a862e=>_0x4a862e&&_0x4a862e['length']>0x0&&_0x30e5('0x26')!==_0x4a862e)['map'](_0xf39593=>{const {choices:_0x4b6b68}=JSON[_0x30e5('0x1f')](_0xf39593);if(_0x4b6b68[0x0]&&_0x4b6b68[0x0][_0x30e5('0x36')]&&_0x4b6b68[0x0][_0x30e5('0x36')]['content'])return _0x4b6b68[0x0]['delta']['content'];})[_0x30e5('0x0')](_0x655317=>_0x655317)[_0x30e5('0x2')]('');}}
23
+ const _0x13a4=['_readStaticResponse','ai.openAI.requestHeaders','system','decode','ai.openAI.requestParameters.stream','ai.openAI.requestParameters.temperature','AI_ERROR_CONTEXT_LENGTH','pluginName','get','startsWith','gpt-3.5-turbo','text','sendRequest','_cleanUpData','user','_isBufferIncomplete','ai.openAI.requestParameters.max_tokens','stringify','https://api.openai.com/v1/chat/completions','filter','json','message','_requestParameters','config','signal','ai.openAI.requestParameters.top_p','_apiUrl','_prepareRequestParameters','includes','locale','body','resolve','length','context_length_exceeded','join','split','replace','AI_ERROR_MODERATION','\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a','ai.openAI.requestParameters','define','reject','getReader','</span>','content','abortController','_prepareRequestHeaders','map','read','parse','editor','_readStreamableResponse','delta','_requestHeaders','ai.openAI.apiUrl','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.'];(function(_0x1d5d48,_0x13a402){const _0x48e6e9=function(_0x43a03f){while(--_0x43a03f){_0x1d5d48['push'](_0x1d5d48['shift']());}};_0x48e6e9(++_0x13a402);}(_0x13a4,0xdf));const _0x48e6=function(_0x1d5d48,_0x13a402){_0x1d5d48=_0x1d5d48-0x0;let _0x48e6e9=_0x13a4[_0x1d5d48];return _0x48e6e9;};import{default as _0x300c5b}from'./aitextadapter.js';import{AIRequestError as _0x166f65}from'./aiadapter.js';import{getTranslation as _0x24a014}from'../utils/common-translations.js';export default class M extends _0x300c5b{static get[_0x48e6('0x8')](){return'OpenAITextAdapter';}constructor(_0x26a33a){super(_0x26a33a),_0x26a33a[_0x48e6('0x18')][_0x48e6('0x29')](_0x48e6('0x37'),_0x48e6('0x13')),_0x26a33a[_0x48e6('0x18')][_0x48e6('0x29')]('ai.openAI.requestParameters.model',_0x48e6('0xb')),_0x26a33a['config'][_0x48e6('0x29')](_0x48e6('0x11'),0x7d0),_0x26a33a[_0x48e6('0x18')]['define'](_0x48e6('0x6'),0x1),_0x26a33a['config'][_0x48e6('0x29')](_0x48e6('0x1a'),0x1),_0x26a33a[_0x48e6('0x18')][_0x48e6('0x29')](_0x48e6('0x5'),!0x0),this[_0x48e6('0x1b')]=_0x26a33a['config'][_0x48e6('0x9')]('ai.openAI.apiUrl'),this[_0x48e6('0x36')]=_0x26a33a[_0x48e6('0x18')]['get'](_0x48e6('0x2'))||{},this[_0x48e6('0x17')]=_0x26a33a[_0x48e6('0x18')][_0x48e6('0x9')](_0x48e6('0x28'));}async[_0x48e6('0xd')]({query:_0x49853b,context:_0x7c03d3,onData:_0x309e72,actionId:_0x208c9d}){const _0x37b476=this[_0x48e6('0x33')][_0x48e6('0x1e')],_0x57f78e=await this['prepareMessages'](_0x49853b,_0x7c03d3,_0x208c9d),_0x38413f=await this[_0x48e6('0x2f')](this[_0x48e6('0x36')],_0x208c9d),_0x128b9c=await this[_0x48e6('0x1c')](this['_requestParameters'],_0x208c9d),_0x45c089={'messages':_0x57f78e,..._0x128b9c},_0x22a242={'method':'POST','headers':_0x38413f,'body':JSON[_0x48e6('0x12')](_0x45c089),'signal':this[_0x48e6('0x2e')][_0x48e6('0x19')]},_0x4a1ba3=await fetch(this[_0x48e6('0x1b')],_0x22a242);if(_0x4a1ba3['ok'])return _0x128b9c['stream']?await this[_0x48e6('0x34')](_0x4a1ba3,_0x309e72):await this[_0x48e6('0x1')](_0x4a1ba3,_0x309e72),Promise[_0x48e6('0x20')]();{const _0x13e3c0=await _0x4a1ba3[_0x48e6('0xc')]();return _0x13e3c0['includes'](_0x48e6('0x22'))?Promise[_0x48e6('0x2a')](new _0x166f65(_0x24a014(_0x37b476,_0x48e6('0x7')))):_0x13e3c0[_0x48e6('0x1d')]('Moderation')?Promise['reject'](new _0x166f65(_0x24a014(_0x37b476,_0x48e6('0x26')))):Promise[_0x48e6('0x2a')](new Error(_0x13e3c0));}}async['prepareMessages'](_0x588b4f,_0x523609,_0x5b8ab6){let _0x51d716,_0x4c40d8;return _0x523609?(_0x51d716=_0x48e6('0x0'),_0x4c40d8='Instruction:\x0a'+_0x588b4f+_0x48e6('0x27')+(_0x523609[_0x48e6('0xa')]('<')?_0x523609:'<span>'+_0x523609+_0x48e6('0x2c'))):(_0x51d716='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.',_0x4c40d8=_0x588b4f),[{'role':_0x48e6('0x3'),'content':_0x51d716},{'role':_0x48e6('0xf'),'content':_0x4c40d8}];}async[_0x48e6('0x34')](_0x313dd8,_0x1912f0){const _0xc7fd1c=_0x313dd8[_0x48e6('0x1f')][_0x48e6('0x2b')](),_0x233351=new TextDecoder();let _0x4d94fe='',_0x460bf4='',_0x3d4d6f='',_0x75efc7=!0x1;for(;!_0x75efc7;){const {done:_0x7ead19,value:_0x2d90ab}=await _0xc7fd1c[_0x48e6('0x31')](),_0x394a6e=_0x4d94fe+_0x233351[_0x48e6('0x4')](_0x2d90ab);let _0x25c5f4='';_0x75efc7=_0x7ead19;try{_0x25c5f4=this[_0x48e6('0xe')](_0x394a6e),_0x4d94fe='';}catch(_0x165c95){_0x4d94fe=_0x394a6e;continue;}_0x460bf4+=_0x25c5f4,!_0x75efc7&&this[_0x48e6('0x10')](_0x460bf4)||_0x460bf4&&(_0x3d4d6f+=_0x460bf4,_0x460bf4='',_0x1912f0(_0x3d4d6f));}return Promise[_0x48e6('0x20')]();}async[_0x48e6('0x1')](_0x339ce9,_0x54073e){return _0x54073e((await _0x339ce9[_0x48e6('0x15')]())['choices'][0x0][_0x48e6('0x16')]['content']),Promise['resolve']();}['_isBufferIncomplete'](_0x45025a){const _0x3801be=_0x45025a[_0x48e6('0x24')]('<')[_0x48e6('0x21')]!==_0x45025a[_0x48e6('0x24')]('>')['length'],_0x49edab=_0x45025a[_0x48e6('0x21')]<0x1e;return _0x3801be&&_0x49edab;}[_0x48e6('0xe')](_0x29782c){return _0x29782c[_0x48e6('0x24')](/\n(?![^{]*\})/g)['map'](_0x5ef4f5=>_0x5ef4f5[_0x48e6('0x25')]('data:\x20',''))[_0x48e6('0x14')](_0x4ceb34=>_0x4ceb34&&_0x4ceb34[_0x48e6('0x21')]>0x0&&'[DONE]'!==_0x4ceb34)[_0x48e6('0x30')](_0x1b5470=>{const {choices:_0x4b9e06}=JSON[_0x48e6('0x32')](_0x1b5470);if(_0x4b9e06[0x0]&&_0x4b9e06[0x0][_0x48e6('0x35')]&&_0x4b9e06[0x0][_0x48e6('0x35')]['content'])return _0x4b9e06[0x0][_0x48e6('0x35')][_0x48e6('0x2d')];})[_0x48e6('0x14')](_0x2047c3=>_0x2047c3)[_0x48e6('0x23')]('');}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x18e6=['legal','aiLicenseKeyInvalid','concat','Portuguese','Professional','friendly','English','Translate\x20the\x20content\x20to\x20Arabic\x20language.','groupId','licenseKey','ai.aiAssistant.commands','Friendly','aiLicenseKeyTrial','makeLonger','set','Business','Translate\x20to\x20%0','translateHindi','ai-invalid-license-key','editOrReview','init','Improve\x20writing','poetic','Arabic','Remove\x20any\x20repetitive,\x20redundant,\x20or\x20non-essential\x20writing\x20in\x20this\x20content\x20without\x20changing\x20the\x20meaning\x20or\x20losing\x20any\x20key\x20information.','ai.aiAssistant.removeCommands','filter','Make\x20longer','direct','Improve\x20this\x20content\x20by\x20using\x20descriptive\x20language\x20and\x20inserting\x20more\x20information\x20and\x20more\x20detailed\x20explanations.','_licenseKeyCheckInterval','improveWriting','define','Simplified\x20Chinese','Translate\x20the\x20content\x20to\x20Hindi\x20language.','Make\x20shorter','confident','French','Improve\x20using\x20friendly,\x20comforting\x20language,\x20to\x20convey\x20understanding\x20and\x20empathy.','Improve\x20using\x20casual,\x20informal\x20language\x20to\x20convey\x20a\x20casual\x20conversation\x20with\x20a\x20real\x20person.','ai.aiAssistant.extraCommandGroups','continue','casual','translateGerman','Improve\x20using\x20compelling,\x20optimistic\x20language\x20to\x20convey\x20confidence\x20in\x20the\x20writing.','get','Improve\x20using\x20direct\x20language,\x20using\x20only\x20the\x20essential\x20information.','Translate\x20the\x20content\x20to\x20German\x20language.','Rewrite\x20this\x20content\x20as\x20a\x20poem\x20using\x20poetic\x20techniques\x20without\x20losing\x20the\x20original\x20meaning.','generate','requires','Translate\x20the\x20content\x20to\x20English\x20language.','includes','Summarize','editor','translateSpanish','aiLicenseKeyTrialLimit:operations','translateEnglish','Change\x20style','ai-trial-license-key-reached-limit-changes','Fix\x20spelling\x20mistakes,\x20use\x20proper\x20grammar\x20and\x20apply\x20good\x20writing\x20practices.\x20Do\x20not\x20lose\x20the\x20original\x20meaning.','simplifyLanguage','push','commands','config','changeTone','translate','Journalism','German','Direct','Hindi','summarize','Confident','Translate\x20the\x20content\x20to\x20Portuguese\x20language.','Rewrite\x20this\x20content\x20as\x20a\x20legal\x20professional\x20using\x20valid\x20legal\x20terminology.','translateChinese','translateFrench','Translate\x20the\x20content\x20to\x20Spanish\x20language.','aiLicenseKeyValid','makeShorter','Simplify\x20language','Translate','Translate\x20the\x20content\x20to\x20French\x20language.','destroy','AIAssistant','You\x20are\x20using\x20the\x20trial\x20version\x20of\x20CKEditor\x205\x20ai\x20plugin\x20with\x20limited\x20usage.\x20Make\x20sure\x20you\x20will\x20not\x20use\x20it\x20in\x20the\x20production\x20environment.','Start\x20with\x20the\x20provided\x20content\x20and\x20write\x20at\x20the\x20end\x20of\x20it\x20continuing\x20this\x20topic.\x20Keep\x20the\x20added\x20part\x20short.','forEach','Improve\x20using\x20polished,\x20formal,\x20and\x20respectful\x20language\x20to\x20convey\x20professional\x20expertise\x20and\x20competence.','Poetic','info'];(function(_0x13ea68,_0x18e6b7){const _0x4dc72d=function(_0x580391){while(--_0x580391){_0x13ea68['push'](_0x13ea68['shift']());}};_0x4dc72d(++_0x18e6b7);}(_0x18e6,0xb7));const _0x4dc7=function(_0x13ea68,_0x18e6b7){_0x13ea68=_0x13ea68-0x0;let _0x4dc72d=_0x18e6[_0x13ea68];return _0x4dc72d;};import{CKEditorError as _0x23b3f4}from'ckeditor5/src/utils.js';import{Plugin as _0x5829c2}from'ckeditor5/src/core.js';import _0x157fa1 from'./aiassistantui.js';import _0x4743f6 from'./aiassistantediting.js';import{getTranslation as _0x20eb35}from'./utils/common-translations.js';export default class r extends _0x5829c2{static get[_0x4dc7('0x31')](){return[_0x157fa1,_0x4743f6];}static get['pluginName'](){return _0x4dc7('0x53');}constructor(_0x10508f){super(_0x10508f);const _0x59ca3b=_0x10508f[_0x4dc7('0x3f')];_0x59ca3b['define'](_0x4dc7('0x9'),getDefaultCommands(_0x10508f['locale'])),_0x59ca3b['define'](_0x4dc7('0x27'),[]),_0x59ca3b[_0x4dc7('0x1f')](_0x4dc7('0x18'),[]);const _0x1d01f7=_0x59ca3b[_0x4dc7('0x2c')](_0x4dc7('0x9')),_0x4dc7d0=_0x59ca3b[_0x4dc7('0x2c')](_0x4dc7('0x27')),_0xe17525=_0x59ca3b[_0x4dc7('0x2c')]('ai.aiAssistant.removeCommands');_0x4dc7d0['forEach'](_0x2f321b=>{const _0xdb69ef=_0x1d01f7['find'](_0xf35ddf=>_0xf35ddf['groupId']===_0x2f321b[_0x4dc7('0x7')]);_0xdb69ef?_0xdb69ef[_0x4dc7('0x3e')]=_0xdb69ef['commands'][_0x4dc7('0x1')](_0x2f321b['commands']):_0x1d01f7[_0x4dc7('0x3d')](_0x2f321b);}),_0x1d01f7[_0x4dc7('0x56')](_0x3137af=>{_0x3137af[_0x4dc7('0x3e')]=_0x3137af[_0x4dc7('0x3e')][_0x4dc7('0x19')](_0x1179a7=>!_0xe17525[_0x4dc7('0x33')](_0x1179a7['id']));}),_0x59ca3b[_0x4dc7('0xd')](_0x4dc7('0x9'),_0x1d01f7);}[_0x4dc7('0x13')](){const _0xf317c1=this[_0x4dc7('0x35')];this[_0x4dc7('0x8')]=_0xf317c1[_0x4dc7('0x3f')][_0x4dc7('0x2c')](_0x4dc7('0x8')),this[_0x4dc7('0x1d')]=setInterval(()=>{let _0x5af30a;for(const _0x38c2d1 in _0xf317c1){const _0x8c4a09=_0x38c2d1,_0x4a6d16=_0xf317c1[_0x8c4a09];if(_0x4dc7('0xb')===_0x4a6d16||_0x4dc7('0x0')===_0x4a6d16||_0x4dc7('0x4d')===_0x4a6d16||'aiLicenseKeyTrialLimit:operations'===_0x4a6d16){delete _0xf317c1[_0x8c4a09],_0x5af30a=_0x4a6d16;break;}}if('aiLicenseKeyInvalid'===_0x5af30a)throw clearInterval(this[_0x4dc7('0x1d')]),new _0x23b3f4(_0x4dc7('0x11'),null);if(_0x4dc7('0xb')===_0x5af30a&&console[_0x4dc7('0x59')](_0x4dc7('0x54')),_0x4dc7('0x37')===_0x5af30a)throw clearInterval(this[_0x4dc7('0x1d')]),new _0x23b3f4(_0x4dc7('0x3a'),null);_0x4dc7('0x4d')===_0x5af30a&&clearInterval(this['_licenseKeyCheckInterval']);},0x3e8);}[_0x4dc7('0x52')](){this[_0x4dc7('0x1d')]&&clearInterval(this[_0x4dc7('0x1d')]);}}export function getDefaultCommands(_0x364cf4){return[{'groupId':_0x4dc7('0x12'),'groupLabel':_0x20eb35(_0x364cf4,'Edit\x20or\x20review'),'commands':[{'id':_0x4dc7('0x1e'),'label':_0x20eb35(_0x364cf4,_0x4dc7('0x14')),'prompt':_0x4dc7('0x3b')},{'id':_0x4dc7('0x4e'),'label':_0x20eb35(_0x364cf4,_0x4dc7('0x22')),'prompt':_0x4dc7('0x17')},{'id':_0x4dc7('0xc'),'label':_0x20eb35(_0x364cf4,_0x4dc7('0x1a')),'prompt':_0x4dc7('0x1c')},{'id':_0x4dc7('0x3c'),'label':_0x20eb35(_0x364cf4,_0x4dc7('0x4f')),'prompt':'Simplify\x20the\x20writing\x20style\x20of\x20this\x20content\x20and\x20reduce\x20the\x20complexity,\x20so\x20that\x20the\x20content\x20is\x20easy\x20to\x20understand.'}]},{'groupId':_0x4dc7('0x30'),'groupLabel':_0x20eb35(_0x364cf4,'Generate\x20from\x20selection'),'commands':[{'id':_0x4dc7('0x46'),'label':_0x20eb35(_0x364cf4,_0x4dc7('0x34')),'prompt':'Summarize\x20this\x20content\x20into\x20one\x20paragraph\x20of\x20text.\x20Include\x20only\x20the\x20key\x20ideas\x20and\x20conclusions.\x20Keep\x20it\x20short.\x20Do\x20not\x20keep\x20original\x20text\x20formatting.'},{'id':_0x4dc7('0x28'),'label':_0x20eb35(_0x364cf4,'Continue'),'prompt':_0x4dc7('0x55')}]},{'groupId':_0x4dc7('0x40'),'groupLabel':_0x20eb35(_0x364cf4,'Change\x20tone'),'commands':[{'id':'professional','label':_0x20eb35(_0x364cf4,_0x4dc7('0x3')),'prompt':_0x4dc7('0x57')},{'id':_0x4dc7('0x29'),'label':_0x20eb35(_0x364cf4,'Casual'),'prompt':_0x4dc7('0x26')},{'id':_0x4dc7('0x1b'),'label':_0x20eb35(_0x364cf4,_0x4dc7('0x44')),'prompt':_0x4dc7('0x2d')},{'id':_0x4dc7('0x23'),'label':_0x20eb35(_0x364cf4,_0x4dc7('0x47')),'prompt':_0x4dc7('0x2b')},{'id':_0x4dc7('0x4'),'label':_0x20eb35(_0x364cf4,_0x4dc7('0xa')),'prompt':_0x4dc7('0x25')}]},{'groupId':'changeStyle','groupLabel':_0x20eb35(_0x364cf4,_0x4dc7('0x39')),'commands':[{'id':'business','label':_0x20eb35(_0x364cf4,_0x4dc7('0xe')),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20business\x20professional\x20with\x20formal\x20language.'},{'id':_0x4dc7('0x5a'),'label':_0x20eb35(_0x364cf4,'Legal'),'prompt':_0x4dc7('0x49')},{'id':'journalism','label':_0x20eb35(_0x364cf4,_0x4dc7('0x42')),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20journalist\x20using\x20engaging\x20language\x20to\x20convey\x20the\x20importance\x20of\x20the\x20information.'},{'id':_0x4dc7('0x15'),'label':_0x20eb35(_0x364cf4,_0x4dc7('0x58')),'prompt':_0x4dc7('0x2f')}]},{'groupId':_0x4dc7('0x41'),'groupLabel':_0x20eb35(_0x364cf4,_0x4dc7('0x50')),'commands':[{'id':_0x4dc7('0x38'),'label':_0x20eb35(_0x364cf4,'Translate\x20to\x20%0',[_0x20eb35(_0x364cf4,_0x4dc7('0x5'))]),'prompt':_0x4dc7('0x32')},{'id':_0x4dc7('0x36'),'label':_0x20eb35(_0x364cf4,'Translate\x20to\x20%0',[_0x20eb35(_0x364cf4,'Spanish')]),'prompt':_0x4dc7('0x4c')},{'id':'translatePortuguese','label':_0x20eb35(_0x364cf4,_0x4dc7('0xf'),[_0x20eb35(_0x364cf4,_0x4dc7('0x2'))]),'prompt':_0x4dc7('0x48')},{'id':_0x4dc7('0x2a'),'label':_0x20eb35(_0x364cf4,_0x4dc7('0xf'),[_0x20eb35(_0x364cf4,_0x4dc7('0x43'))]),'prompt':_0x4dc7('0x2e')},{'id':_0x4dc7('0x4b'),'label':_0x20eb35(_0x364cf4,_0x4dc7('0xf'),[_0x20eb35(_0x364cf4,_0x4dc7('0x24'))]),'prompt':_0x4dc7('0x51')},{'id':_0x4dc7('0x4a'),'label':_0x20eb35(_0x364cf4,_0x4dc7('0xf'),[_0x20eb35(_0x364cf4,_0x4dc7('0x20'))]),'prompt':'Translate\x20the\x20content\x20to\x20Simplified\x20Chinese\x20language.'},{'id':_0x4dc7('0x10'),'label':_0x20eb35(_0x364cf4,_0x4dc7('0xf'),[_0x20eb35(_0x364cf4,_0x4dc7('0x45'))]),'prompt':_0x4dc7('0x21')},{'id':'translateArabic','label':_0x20eb35(_0x364cf4,_0x4dc7('0xf'),[_0x20eb35(_0x364cf4,_0x4dc7('0x16'))]),'prompt':_0x4dc7('0x6')}]}];}
23
+ const _0x453f=['translatePortuguese','Translate\x20to\x20%0','Casual','makeLonger','define','AIAssistant','German','locale','friendly','Improve\x20this\x20content\x20by\x20using\x20descriptive\x20language\x20and\x20inserting\x20more\x20information\x20and\x20more\x20detailed\x20explanations.','generate','Spanish','Start\x20with\x20the\x20provided\x20content\x20and\x20write\x20at\x20the\x20end\x20of\x20it\x20continuing\x20this\x20topic.\x20Keep\x20the\x20added\x20part\x20short.','push','Remove\x20any\x20repetitive,\x20redundant,\x20or\x20non-essential\x20writing\x20in\x20this\x20content\x20without\x20changing\x20the\x20meaning\x20or\x20losing\x20any\x20key\x20information.','Simplify\x20the\x20writing\x20style\x20of\x20this\x20content\x20and\x20reduce\x20the\x20complexity,\x20so\x20that\x20the\x20content\x20is\x20easy\x20to\x20understand.','Fix\x20spelling\x20mistakes,\x20use\x20proper\x20grammar\x20and\x20apply\x20good\x20writing\x20practices.\x20Do\x20not\x20lose\x20the\x20original\x20meaning.','editor','init','legal','_licenseKeyCheckInterval','Direct','Generate\x20from\x20selection','translateArabic','translateGerman','Translate\x20the\x20content\x20to\x20French\x20language.','destroy','groupId','ai-invalid-license-key','Improve\x20using\x20polished,\x20formal,\x20and\x20respectful\x20language\x20to\x20convey\x20professional\x20expertise\x20and\x20competence.','French','Translate\x20the\x20content\x20to\x20Simplified\x20Chinese\x20language.','Translate\x20the\x20content\x20to\x20Arabic\x20language.','pluginName','Arabic','Change\x20tone','Rewrite\x20this\x20content\x20as\x20a\x20business\x20professional\x20with\x20formal\x20language.','Improve\x20using\x20friendly,\x20comforting\x20language,\x20to\x20convey\x20understanding\x20and\x20empathy.','ai.aiAssistant.removeCommands','casual','Poetic','makeShorter','translateChinese','changeTone','aiLicenseKeyTrial','simplifyLanguage','includes','Portuguese','editOrReview','ai.aiAssistant.commands','poetic','get','licenseKey','forEach','journalism','professional','Hindi','aiLicenseKeyInvalid','Improve\x20writing','Friendly','Business','Rewrite\x20this\x20content\x20as\x20a\x20poem\x20using\x20poetic\x20techniques\x20without\x20losing\x20the\x20original\x20meaning.','Change\x20style','Legal','translateSpanish','Professional','ai-trial-license-key-reached-limit-changes','commands','Translate\x20the\x20content\x20to\x20German\x20language.','Translate\x20the\x20content\x20to\x20Hindi\x20language.','find','changeStyle','Make\x20shorter','Journalism','config','English','concat','translateFrench','Translate\x20the\x20content\x20to\x20English\x20language.','ai.aiAssistant.extraCommandGroups','info','set','Improve\x20using\x20direct\x20language,\x20using\x20only\x20the\x20essential\x20information.','Improve\x20using\x20compelling,\x20optimistic\x20language\x20to\x20convey\x20confidence\x20in\x20the\x20writing.'];(function(_0x3d06f4,_0x453f57){const _0x7c465c=function(_0x2b06ed){while(--_0x2b06ed){_0x3d06f4['push'](_0x3d06f4['shift']());}};_0x7c465c(++_0x453f57);}(_0x453f,0x164));const _0x7c46=function(_0x3d06f4,_0x453f57){_0x3d06f4=_0x3d06f4-0x0;let _0x7c465c=_0x453f[_0x3d06f4];return _0x7c465c;};import{CKEditorError as _0x3f8275}from'ckeditor5/src/utils.js';import{Plugin as _0x27f973}from'ckeditor5/src/core.js';import _0x857330 from'./aiassistantui.js';import _0x5f228e from'./aiassistantediting.js';import{getTranslation as _0x2087c7}from'./utils/common-translations.js';export default class r extends _0x27f973{static get['requires'](){return[_0x857330,_0x5f228e];}static get[_0x7c46('0xd')](){return _0x7c46('0x45');}constructor(_0x4d4583){super(_0x4d4583);const _0x37e020=_0x4d4583[_0x7c46('0x36')];_0x37e020['define'](_0x7c46('0x1d'),getDefaultCommands(_0x4d4583[_0x7c46('0x47')])),_0x37e020[_0x7c46('0x44')](_0x7c46('0x3b'),[]),_0x37e020['define'](_0x7c46('0x12'),[]);const _0x1c57f1=_0x37e020['get'](_0x7c46('0x1d')),_0x4b5221=_0x37e020[_0x7c46('0x1f')](_0x7c46('0x3b')),_0x395d67=_0x37e020[_0x7c46('0x1f')](_0x7c46('0x12'));_0x4b5221[_0x7c46('0x21')](_0x45db38=>{const _0x1ea416=_0x1c57f1[_0x7c46('0x32')](_0xb295bc=>_0xb295bc[_0x7c46('0x7')]===_0x45db38['groupId']);_0x1ea416?_0x1ea416[_0x7c46('0x2f')]=_0x1ea416['commands'][_0x7c46('0x38')](_0x45db38['commands']):_0x1c57f1[_0x7c46('0x4d')](_0x45db38);}),_0x1c57f1[_0x7c46('0x21')](_0x1cd7e0=>{_0x1cd7e0[_0x7c46('0x2f')]=_0x1cd7e0[_0x7c46('0x2f')]['filter'](_0x5d52b4=>!_0x395d67[_0x7c46('0x1a')](_0x5d52b4['id']));}),_0x37e020[_0x7c46('0x3d')]('ai.aiAssistant.commands',_0x1c57f1);}[_0x7c46('0x52')](){const _0x194094=this[_0x7c46('0x51')];this[_0x7c46('0x20')]=_0x194094['config'][_0x7c46('0x1f')]('licenseKey'),this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x60b37f;for(const _0xacb410 in _0x194094){const _0x29935b=_0xacb410,_0x250b06=_0x194094[_0x29935b];if(_0x7c46('0x18')===_0x250b06||_0x7c46('0x25')===_0x250b06||'aiLicenseKeyValid'===_0x250b06||'aiLicenseKeyTrialLimit:operations'===_0x250b06){delete _0x194094[_0x29935b],_0x60b37f=_0x250b06;break;}}if(_0x7c46('0x25')===_0x60b37f)throw clearInterval(this[_0x7c46('0x0')]),new _0x3f8275(_0x7c46('0x8'),null);if('aiLicenseKeyTrial'===_0x60b37f&&console[_0x7c46('0x3c')]('You\x20are\x20using\x20the\x20trial\x20version\x20of\x20CKEditor\x205\x20ai\x20plugin\x20with\x20limited\x20usage.\x20Make\x20sure\x20you\x20will\x20not\x20use\x20it\x20in\x20the\x20production\x20environment.'),'aiLicenseKeyTrialLimit:operations'===_0x60b37f)throw clearInterval(this['_licenseKeyCheckInterval']),new _0x3f8275(_0x7c46('0x2e'),null);'aiLicenseKeyValid'===_0x60b37f&&clearInterval(this[_0x7c46('0x0')]);},0x3e8);}[_0x7c46('0x6')](){this[_0x7c46('0x0')]&&clearInterval(this[_0x7c46('0x0')]);}}export function getDefaultCommands(_0x4cf557){return[{'groupId':_0x7c46('0x1c'),'groupLabel':_0x2087c7(_0x4cf557,'Edit\x20or\x20review'),'commands':[{'id':'improveWriting','label':_0x2087c7(_0x4cf557,_0x7c46('0x26')),'prompt':_0x7c46('0x50')},{'id':_0x7c46('0x15'),'label':_0x2087c7(_0x4cf557,_0x7c46('0x34')),'prompt':_0x7c46('0x4e')},{'id':_0x7c46('0x43'),'label':_0x2087c7(_0x4cf557,'Make\x20longer'),'prompt':_0x7c46('0x49')},{'id':_0x7c46('0x19'),'label':_0x2087c7(_0x4cf557,'Simplify\x20language'),'prompt':_0x7c46('0x4f')}]},{'groupId':_0x7c46('0x4a'),'groupLabel':_0x2087c7(_0x4cf557,_0x7c46('0x2')),'commands':[{'id':'summarize','label':_0x2087c7(_0x4cf557,'Summarize'),'prompt':'Summarize\x20this\x20content\x20into\x20one\x20paragraph\x20of\x20text.\x20Include\x20only\x20the\x20key\x20ideas\x20and\x20conclusions.\x20Keep\x20it\x20short.\x20Do\x20not\x20keep\x20original\x20text\x20formatting.'},{'id':'continue','label':_0x2087c7(_0x4cf557,'Continue'),'prompt':_0x7c46('0x4c')}]},{'groupId':_0x7c46('0x17'),'groupLabel':_0x2087c7(_0x4cf557,_0x7c46('0xf')),'commands':[{'id':_0x7c46('0x23'),'label':_0x2087c7(_0x4cf557,_0x7c46('0x2d')),'prompt':_0x7c46('0x9')},{'id':_0x7c46('0x13'),'label':_0x2087c7(_0x4cf557,_0x7c46('0x42')),'prompt':'Improve\x20using\x20casual,\x20informal\x20language\x20to\x20convey\x20a\x20casual\x20conversation\x20with\x20a\x20real\x20person.'},{'id':'direct','label':_0x2087c7(_0x4cf557,_0x7c46('0x1')),'prompt':_0x7c46('0x3e')},{'id':'confident','label':_0x2087c7(_0x4cf557,'Confident'),'prompt':_0x7c46('0x3f')},{'id':_0x7c46('0x48'),'label':_0x2087c7(_0x4cf557,_0x7c46('0x27')),'prompt':_0x7c46('0x11')}]},{'groupId':_0x7c46('0x33'),'groupLabel':_0x2087c7(_0x4cf557,_0x7c46('0x2a')),'commands':[{'id':'business','label':_0x2087c7(_0x4cf557,_0x7c46('0x28')),'prompt':_0x7c46('0x10')},{'id':_0x7c46('0x53'),'label':_0x2087c7(_0x4cf557,_0x7c46('0x2b')),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20legal\x20professional\x20using\x20valid\x20legal\x20terminology.'},{'id':_0x7c46('0x22'),'label':_0x2087c7(_0x4cf557,_0x7c46('0x35')),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20journalist\x20using\x20engaging\x20language\x20to\x20convey\x20the\x20importance\x20of\x20the\x20information.'},{'id':_0x7c46('0x1e'),'label':_0x2087c7(_0x4cf557,_0x7c46('0x14')),'prompt':_0x7c46('0x29')}]},{'groupId':'translate','groupLabel':_0x2087c7(_0x4cf557,'Translate'),'commands':[{'id':'translateEnglish','label':_0x2087c7(_0x4cf557,_0x7c46('0x41'),[_0x2087c7(_0x4cf557,_0x7c46('0x37'))]),'prompt':_0x7c46('0x3a')},{'id':_0x7c46('0x2c'),'label':_0x2087c7(_0x4cf557,_0x7c46('0x41'),[_0x2087c7(_0x4cf557,_0x7c46('0x4b'))]),'prompt':'Translate\x20the\x20content\x20to\x20Spanish\x20language.'},{'id':_0x7c46('0x40'),'label':_0x2087c7(_0x4cf557,'Translate\x20to\x20%0',[_0x2087c7(_0x4cf557,_0x7c46('0x1b'))]),'prompt':'Translate\x20the\x20content\x20to\x20Portuguese\x20language.'},{'id':_0x7c46('0x4'),'label':_0x2087c7(_0x4cf557,_0x7c46('0x41'),[_0x2087c7(_0x4cf557,_0x7c46('0x46'))]),'prompt':_0x7c46('0x30')},{'id':_0x7c46('0x39'),'label':_0x2087c7(_0x4cf557,_0x7c46('0x41'),[_0x2087c7(_0x4cf557,_0x7c46('0xa'))]),'prompt':_0x7c46('0x5')},{'id':_0x7c46('0x16'),'label':_0x2087c7(_0x4cf557,_0x7c46('0x41'),[_0x2087c7(_0x4cf557,'Simplified\x20Chinese')]),'prompt':_0x7c46('0xb')},{'id':'translateHindi','label':_0x2087c7(_0x4cf557,_0x7c46('0x41'),[_0x2087c7(_0x4cf557,_0x7c46('0x24'))]),'prompt':_0x7c46('0x31')},{'id':_0x7c46('0x3'),'label':_0x2087c7(_0x4cf557,_0x7c46('0x41'),[_0x2087c7(_0x4cf557,_0x7c46('0xe'))]),'prompt':_0x7c46('0xc')}]}];}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x5e56=['change','addMarker','createRange','ck-ai-assistant-ui_theme','length','span','document','editor','insertContent','start','from','insertContentBelow','removeMarker','push','getRange','model','isContent','markers','has','createPositionAfter','ck-fake-ai-selection_collapsed','get','setSelection','ck-fake-ai-selection-candidate','pop','data','updateMarker','hideFakeVisualSelection','editingDowncast','ai-ui','canEditAt','markerToHighlight','getSelectedBlocks','ai.useTheme','toView','ck-fake-ai-selection','for','selection','toModel','conversion','createSelection','config','markerToElement'];(function(_0xdaaee9,_0x5e561c){const _0x11a00e=function(_0x391b0a){while(--_0x391b0a){_0xdaaee9['push'](_0xdaaee9['shift']());}};_0x11a00e(++_0x5e561c);}(_0x5e56,0x9d));const _0x11a0=function(_0xdaaee9,_0x5e561c){_0xdaaee9=_0xdaaee9-0x0;let _0x11a00e=_0x5e56[_0xdaaee9];return _0x11a00e;};import{Plugin as _0x46a5a3}from'ckeditor5/src/core.js';const s=_0x11a0('0x1'),c='ai-ui-candidate';export default class i extends _0x46a5a3{static get['pluginName'](){return'AIAssistantEditing';}['init'](){const {editor:_0x295906}=this,_0x2cc52e=['ck-fake-ai-selection'];_0x295906[_0x11a0('0xd')]['get'](_0x11a0('0x5'))&&_0x2cc52e[_0x11a0('0x1c')](_0x11a0('0x12')),_0x295906[_0x11a0('0xb')][_0x11a0('0x8')]('editingDowncast')[_0x11a0('0x3')]({'model':s,'view':{'classes':_0x2cc52e}}),_0x295906['conversion'][_0x11a0('0x8')](_0x11a0('0x0'))[_0x11a0('0xe')]({'model':s,'view':{'name':_0x11a0('0x14'),'classes':[_0x11a0('0x7'),_0x11a0('0x23')]}}),_0x295906[_0x11a0('0xb')][_0x11a0('0x8')]('editingDowncast')['markerToHighlight']({'model':c,'view':{'classes':[_0x11a0('0x26')]}}),_0x295906[_0x11a0('0xb')][_0x11a0('0x8')](_0x11a0('0x0'))[_0x11a0('0xe')]({'model':c,'view':{'name':'span','classes':['ck-fake-ai-selection-candidate',_0x11a0('0x23')]}});}['showFakeVisualSelection'](_0xacb97f){const _0x4b2a20=this['editor'][_0x11a0('0x1e')],_0xfb22fc=_0xacb97f?c:s;_0x4b2a20[_0x11a0('0xf')](_0x3b55fa=>{const _0x5ae606=_0x4b2a20[_0x11a0('0x15')][_0x11a0('0x9')]['getFirstRange']();if(_0x4b2a20[_0x11a0('0x20')][_0x11a0('0x21')](_0xfb22fc))_0x3b55fa[_0x11a0('0x29')](_0xfb22fc,{'range':_0x5ae606});else{if(_0x5ae606[_0x11a0('0x18')]['isAtEnd']){const _0x259cb4=_0x5ae606['start']['getLastMatchingPosition'](({item:_0x51bd87})=>!_0x4b2a20['schema'][_0x11a0('0x1f')](_0x51bd87),{'boundaries':_0x5ae606});_0x3b55fa[_0x11a0('0x10')](_0xfb22fc,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x3b55fa[_0x11a0('0x11')](_0x259cb4,_0x5ae606['end'])});}else _0x3b55fa['addMarker'](_0xfb22fc,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x5ae606});}});}[_0x11a0('0x2a')](_0x1e907b){const _0x32a1e5=this[_0x11a0('0x16')][_0x11a0('0x1e')],_0x1da1a5=_0x1e907b?c:s;_0x32a1e5['markers'][_0x11a0('0x21')](_0x1da1a5)&&_0x32a1e5[_0x11a0('0xf')](_0x50b4e2=>{_0x50b4e2[_0x11a0('0x1b')](_0x1da1a5);});}[_0x11a0('0x17')](_0x56e6cb,_0x1be2fd){const _0x5772a2=_0x1be2fd||this[_0x11a0('0x16')][_0x11a0('0x1e')][_0x11a0('0x20')][_0x11a0('0x24')](s)['getRange']();if(!this[_0x11a0('0x16')]['model'][_0x11a0('0x2')](_0x5772a2))return;const _0x42923b=this[_0x11a0('0x16')][_0x11a0('0x28')]['processor'][_0x11a0('0x6')](_0x56e6cb),_0x415520=this[_0x11a0('0x16')]['data'][_0x11a0('0xa')](_0x42923b);this[_0x11a0('0x16')]['model']['change'](_0x47deb1=>{this[_0x11a0('0x2a')]();const _0x3173cc=this[_0x11a0('0x16')][_0x11a0('0x1e')]['insertContent'](_0x415520,_0x5772a2);_0x3173cc&&_0x47deb1[_0x11a0('0x25')](_0x3173cc);});}[_0x11a0('0x1a')](_0x1577e4){const {model:_0x2ddfa0}=this['editor'],_0x32e744=Array[_0x11a0('0x19')](_0x2ddfa0[_0x11a0('0xc')](this['editor'][_0x11a0('0x1e')]['markers']['get'](s)[_0x11a0('0x1d')]())[_0x11a0('0x4')]()),_0x108d46=_0x32e744[_0x11a0('0x13')]?_0x2ddfa0[_0x11a0('0x22')](_0x32e744[_0x11a0('0x27')]()):_0x2ddfa0[_0x11a0('0x15')][_0x11a0('0x9')]['getLastPosition']();this[_0x11a0('0x17')](_0x1577e4,_0x108d46);}}
23
+ const _0x252f=['ai-ui','showFakeVisualSelection','addMarker','createSelection','markers','get','isContent','markerToHighlight','end','for','document','ai.useTheme','selection','getSelectedBlocks','model','ck-ai-assistant-ui_theme','getFirstRange','createPositionAfter','init','data','removeMarker','processor','length','canEditAt','editingDowncast','markerToElement','has','getLastMatchingPosition','span','conversion','push','toView','pluginName','ck-fake-ai-selection','ck-fake-ai-selection_collapsed','start','getLastPosition','insertContentBelow','pop','setSelection','from','schema','config','editor','hideFakeVisualSelection','createRange','AIAssistantEditing','updateMarker','toModel','getRange'];(function(_0x5dd45e,_0x252f87){const _0x497cf6=function(_0x11f12d){while(--_0x11f12d){_0x5dd45e['push'](_0x5dd45e['shift']());}};_0x497cf6(++_0x252f87);}(_0x252f,0x1ee));const _0x497c=function(_0x5dd45e,_0x252f87){_0x5dd45e=_0x5dd45e-0x0;let _0x497cf6=_0x252f[_0x5dd45e];return _0x497cf6;};import{Plugin as _0x414465}from'ckeditor5/src/core.js';const s=_0x497c('0x6'),c='ai-ui-candidate';export default class i extends _0x414465{static get[_0x497c('0x26')](){return _0x497c('0x2');}[_0x497c('0x18')](){const {editor:_0x20e91a}=this,_0x426a30=[_0x497c('0x27')];_0x20e91a[_0x497c('0x30')]['get'](_0x497c('0x11'))&&_0x426a30[_0x497c('0x24')](_0x497c('0x15')),_0x20e91a[_0x497c('0x23')]['for']('editingDowncast')['markerToHighlight']({'model':s,'view':{'classes':_0x426a30}}),_0x20e91a[_0x497c('0x23')][_0x497c('0xf')]('editingDowncast')[_0x497c('0x1f')]({'model':s,'view':{'name':_0x497c('0x22'),'classes':[_0x497c('0x27'),_0x497c('0x28')]}}),_0x20e91a[_0x497c('0x23')]['for'](_0x497c('0x1e'))[_0x497c('0xd')]({'model':c,'view':{'classes':['ck-fake-ai-selection-candidate']}}),_0x20e91a[_0x497c('0x23')]['for'](_0x497c('0x1e'))[_0x497c('0x1f')]({'model':c,'view':{'name':_0x497c('0x22'),'classes':['ck-fake-ai-selection-candidate',_0x497c('0x28')]}});}[_0x497c('0x7')](_0x414000){const _0x354071=this['editor'][_0x497c('0x14')],_0x394bf=_0x414000?c:s;_0x354071['change'](_0x1f68b1=>{const _0x2b3526=_0x354071[_0x497c('0x10')][_0x497c('0x12')][_0x497c('0x16')]();if(_0x354071[_0x497c('0xa')][_0x497c('0x20')](_0x394bf))_0x1f68b1[_0x497c('0x3')](_0x394bf,{'range':_0x2b3526});else{if(_0x2b3526[_0x497c('0x29')]['isAtEnd']){const _0xd00e3d=_0x2b3526[_0x497c('0x29')][_0x497c('0x21')](({item:_0x3db0d7})=>!_0x354071[_0x497c('0x2f')][_0x497c('0xc')](_0x3db0d7),{'boundaries':_0x2b3526});_0x1f68b1[_0x497c('0x8')](_0x394bf,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x1f68b1[_0x497c('0x1')](_0xd00e3d,_0x2b3526[_0x497c('0xe')])});}else _0x1f68b1[_0x497c('0x8')](_0x394bf,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x2b3526});}});}['hideFakeVisualSelection'](_0xb4a7c5){const _0x2b6a36=this[_0x497c('0x31')]['model'],_0x11e16b=_0xb4a7c5?c:s;_0x2b6a36[_0x497c('0xa')][_0x497c('0x20')](_0x11e16b)&&_0x2b6a36['change'](_0x27d6d0=>{_0x27d6d0[_0x497c('0x1a')](_0x11e16b);});}['insertContent'](_0x39f97d,_0x473a82){const _0x50fe23=_0x473a82||this[_0x497c('0x31')][_0x497c('0x14')]['markers']['get'](s)[_0x497c('0x5')]();if(!this[_0x497c('0x31')][_0x497c('0x14')][_0x497c('0x1d')](_0x50fe23))return;const _0x5ece95=this[_0x497c('0x31')][_0x497c('0x19')][_0x497c('0x1b')][_0x497c('0x25')](_0x39f97d),_0x2c7369=this[_0x497c('0x31')][_0x497c('0x19')][_0x497c('0x4')](_0x5ece95);this[_0x497c('0x31')]['model']['change'](_0x45c51d=>{this[_0x497c('0x0')]();const _0x1d6778=this['editor'][_0x497c('0x14')]['insertContent'](_0x2c7369,_0x50fe23);_0x1d6778&&_0x45c51d[_0x497c('0x2d')](_0x1d6778);});}[_0x497c('0x2b')](_0x3b0666){const {model:_0x23d66d}=this[_0x497c('0x31')],_0x143902=Array[_0x497c('0x2e')](_0x23d66d[_0x497c('0x9')](this[_0x497c('0x31')]['model'][_0x497c('0xa')][_0x497c('0xb')](s)[_0x497c('0x5')]())[_0x497c('0x13')]()),_0x5c278f=_0x143902[_0x497c('0x1c')]?_0x23d66d[_0x497c('0x17')](_0x143902[_0x497c('0x2c')]()):_0x23d66d[_0x497c('0x10')]['selection'][_0x497c('0x2a')]();this['insertContent'](_0x3b0666,_0x5c278f);}}