@ckeditor/ckeditor5-ai 0.0.0-nightly-20240130.0 → 0.0.0-nightly-20240201.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": "0.0.0-nightly-20240130.0",
3
+ "version": "0.0.0-nightly-20240201.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": "0.0.0-nightly-20240130.0",
27
- "ckeditor5-collaboration": "0.0.0-nightly-20240130.0",
26
+ "ckeditor5": "0.0.0-nightly-20240201.0",
27
+ "ckeditor5-collaboration": "0.0.0-nightly-20240201.0",
28
28
  "@aws-sdk/client-bedrock-runtime": "3.470.0",
29
- "@ckeditor/ckeditor5-ui": "0.0.0-nightly-20240130.0",
29
+ "@ckeditor/ckeditor5-ui": "0.0.0-nightly-20240201.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 _0x6f07=['textAdapter','pluginName','AIAdapter','name'];(function(_0x5b3462,_0x6f0773){var _0x364cec=function(_0x41cb5c){while(--_0x41cb5c){_0x5b3462['push'](_0x5b3462['shift']());}};_0x364cec(++_0x6f0773);}(_0x6f07,0x1e3));var _0x364c=function(_0x5b3462,_0x6f0773){_0x5b3462=_0x5b3462-0x0;var _0x364cec=_0x6f07[_0x5b3462];return _0x364cec;};import{Plugin as _0x30866a}from'ckeditor5/src/core.js';import{CKEditorError as _0x2bf14a}from'ckeditor5/src/utils.js';export default class I extends _0x30866a{static get[_0x364c('0x2')](){return _0x364c('0x3');}['afterInit'](){if(!this[_0x364c('0x1')])throw new _0x2bf14a('aiadapter-text-adapter-not-set',null);}}export class AIRequestError extends Error{constructor(_0x169be5){super(_0x169be5),this[_0x364c('0x0')]='AIRequestError';}}
23
+ var _0x4dbd=['AIAdapter','aiadapter-text-adapter-not-set','AIRequestError','pluginName','name','textAdapter'];(function(_0x54a7fb,_0x4dbd04){var _0x30f1a2=function(_0x4c5725){while(--_0x4c5725){_0x54a7fb['push'](_0x54a7fb['shift']());}};_0x30f1a2(++_0x4dbd04);}(_0x4dbd,0x7a));var _0x30f1=function(_0x54a7fb,_0x4dbd04){_0x54a7fb=_0x54a7fb-0x0;var _0x30f1a2=_0x4dbd[_0x54a7fb];return _0x30f1a2;};import{Plugin as _0x2c68d6}from'ckeditor5/src/core.js';import{CKEditorError as _0x12ebac}from'ckeditor5/src/utils.js';export default class I extends _0x2c68d6{static get[_0x30f1('0x1')](){return _0x30f1('0x4');}['afterInit'](){if(!this[_0x30f1('0x3')])throw new _0x12ebac(_0x30f1('0x5'),null);}}export class AIRequestError extends Error{constructor(_0x3906b8){super(_0x3906b8),this[_0x30f1('0x2')]=_0x30f1('0x0');}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x179e=['abortController','sendRequest','textAdapter','application/json','name','assign','AbortError','reject','AI_ERROR_GET_HEADERS','abort','get','object','locale','_prepareRequestHeaders','aborted','resolve','error','catch','requires','editor'];(function(_0x5b149e,_0x179e5f){const _0x2b6dd3=function(_0x3a783c){while(--_0x3a783c){_0x5b149e['push'](_0x5b149e['shift']());}};_0x2b6dd3(++_0x179e5f);}(_0x179e,0x1e2));const _0x2b6d=function(_0x5b149e,_0x179e5f){_0x5b149e=_0x5b149e-0x0;let _0x2b6dd3=_0x179e[_0x5b149e];return _0x2b6dd3;};import{Plugin as _0x292bc7}from'ckeditor5/src/core.js';import{CKEditorError as _0x38a774}from'ckeditor5/src/utils.js';import{default as _0x35aba8,AIRequestError as _0x25b1e6}from'./aiadapter.js';import{getTranslation as _0x4cf58b}from'../utils/common-translations.js';export default class _ extends _0x292bc7{static get[_0x2b6d('0x10')](){return[_0x35aba8];}constructor(_0x4726b1){super(_0x4726b1),this[_0x2b6d('0x12')]=new AbortController();}['init'](){this[_0x2b6d('0x11')]['plugins'][_0x2b6d('0x8')](_0x35aba8)[_0x2b6d('0x0')]=this;}[_0x2b6d('0x7')](){this[_0x2b6d('0x12')]['signal'][_0x2b6d('0xc')]||(this['abortController']['abort'](),this[_0x2b6d('0x12')]=new AbortController());}async['makeRequest'](_0x1c36ff){return this[_0x2b6d('0x13')](_0x1c36ff)[_0x2b6d('0xf')](_0x929cb8=>{if(_0x929cb8 instanceof _0x25b1e6)return Promise[_0x2b6d('0x5')](_0x929cb8);if(_0x2b6d('0x4')==_0x929cb8[_0x2b6d('0x2')])return Promise[_0x2b6d('0xd')]();throw console[_0x2b6d('0xe')](_0x929cb8),new _0x38a774('aitextadapter-send-request-failed',null);});}async[_0x2b6d('0xb')](_0x4e332e,_0x1334fc){const _0x50c419=this[_0x2b6d('0x11')][_0x2b6d('0xa')],_0x22eec6={'Content-Type':_0x2b6d('0x1')};if(_0x2b6d('0x9')==typeof _0x4e332e)Object['assign'](_0x22eec6,_0x4e332e);else{if(_0x4e332e)try{const _0x34f0c8=await _0x4e332e(_0x1334fc);Object[_0x2b6d('0x3')](_0x22eec6,_0x34f0c8);}catch(_0x431fcc){return Promise[_0x2b6d('0x5')](new _0x25b1e6(_0x4cf58b(_0x50c419,_0x2b6d('0x6'))));}}return _0x22eec6;}async['_prepareRequestParameters'](_0x2072e8,_0x37124c){const _0x1bcbfd=this['editor'][_0x2b6d('0xa')];if(_0x2b6d('0x9')==typeof _0x2072e8)return _0x2072e8;try{return await _0x2072e8(_0x37124c);}catch(_0x46b4b5){return Promise[_0x2b6d('0x5')](new _0x25b1e6(_0x4cf58b(_0x1bcbfd,'AI_ERROR_GET_PARAMETERS')));}}}
23
+ const _0x305a=['abort','resolve','application/json','error','editor','locale','init','abortController','catch','requires','reject','AI_ERROR_GET_HEADERS','get','sendRequest','assign','_prepareRequestHeaders','_prepareRequestParameters','aborted','AbortError','makeRequest','plugins','aitextadapter-send-request-failed','textAdapter','object','AI_ERROR_GET_PARAMETERS'];(function(_0x3b9cfc,_0x305a88){const _0x3be8d1=function(_0x2868ce){while(--_0x2868ce){_0x3b9cfc['push'](_0x3b9cfc['shift']());}};_0x3be8d1(++_0x305a88);}(_0x305a,0x15e));const _0x3be8=function(_0x3b9cfc,_0x305a88){_0x3b9cfc=_0x3b9cfc-0x0;let _0x3be8d1=_0x305a[_0x3b9cfc];return _0x3be8d1;};import{Plugin as _0x48d3fb}from'ckeditor5/src/core.js';import{CKEditorError as _0x4c5c7f}from'ckeditor5/src/utils.js';import{default as _0x4109da,AIRequestError as _0x5a713e}from'./aiadapter.js';import{getTranslation as _0x2b6856}from'../utils/common-translations.js';export default class _ extends _0x48d3fb{static get[_0x3be8('0x9')](){return[_0x4109da];}constructor(_0x2f1baa){super(_0x2f1baa),this[_0x3be8('0x7')]=new AbortController();}[_0x3be8('0x6')](){this['editor'][_0x3be8('0x14')][_0x3be8('0xc')](_0x4109da)[_0x3be8('0x16')]=this;}[_0x3be8('0x0')](){this[_0x3be8('0x7')]['signal'][_0x3be8('0x11')]||(this[_0x3be8('0x7')][_0x3be8('0x0')](),this[_0x3be8('0x7')]=new AbortController());}async[_0x3be8('0x13')](_0x30aeff){return this[_0x3be8('0xd')](_0x30aeff)[_0x3be8('0x8')](_0x15b9e2=>{if(_0x15b9e2 instanceof _0x5a713e)return Promise['reject'](_0x15b9e2);if(_0x3be8('0x12')==_0x15b9e2['name'])return Promise[_0x3be8('0x1')]();throw console[_0x3be8('0x3')](_0x15b9e2),new _0x4c5c7f(_0x3be8('0x15'),null);});}async[_0x3be8('0xf')](_0x2ed65f,_0x5862a8){const _0x24effd=this[_0x3be8('0x4')][_0x3be8('0x5')],_0x2029f0={'Content-Type':_0x3be8('0x2')};if(_0x3be8('0x17')==typeof _0x2ed65f)Object[_0x3be8('0xe')](_0x2029f0,_0x2ed65f);else{if(_0x2ed65f)try{const _0x225563=await _0x2ed65f(_0x5862a8);Object[_0x3be8('0xe')](_0x2029f0,_0x225563);}catch(_0x51404a){return Promise[_0x3be8('0xa')](new _0x5a713e(_0x2b6856(_0x24effd,_0x3be8('0xb'))));}}return _0x2029f0;}async[_0x3be8('0x10')](_0x141dca,_0x57e3eb){const _0x2ea371=this[_0x3be8('0x4')]['locale'];if('object'==typeof _0x141dca)return _0x141dca;try{return await _0x141dca(_0x57e3eb);}catch(_0x4ebd6b){return Promise[_0x3be8('0xa')](new _0x5a713e(_0x2b6856(_0x2ea371,_0x3be8('0x18'))));}}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x30c6=['map','generations','_processAWSRequest','data','meta.llama','get','define','join','bytes','_bedrockClientConfig','ai.aws.requestParameters.model','ai21.j2','json','anthropic.claude-v2','_getGeneratedText','\x0a[/INST]','config','read','_requestParameters','stringify','send','sendRequest','_readAsyncIterableResponse','generation','signal','parse','application/json','_apiUrl','preparePrompt','_prepareRequestParameters','chunk','ai.aws.requestParameters.max_tokens_to_sample','test','getReader','Human:\x0a','ai.aws.requestParameters.top_p','toString','completions','</span>','utf-8','<<SYS>>\x0a','resolve','getModelFamily','_requestHeaders','_readStaticResponse','body','Instruction:\x0a','ai.aws.requestParameters.top_k','cohere.command','split','ai.aws.requestParameters','ai.aws.requestParameters.temperature','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','editor','anthropic.claude','abortController','text','\x0a\x0aAssistant:','ai.aws.requestHeaders','locale','ai.aws.requestParameters.anthropic_version','completion','AWSTextAdapter','bedrock-2023-05-31','_readStreamableResponse','ai.aws.bedrockClientConfig','decode','<span>','_prepareRequestHeaders'];(function(_0x158a6f,_0x30c6c2){const _0x4eb5ec=function(_0x2630e9){while(--_0x2630e9){_0x158a6f['push'](_0x158a6f['shift']());}};_0x4eb5ec(++_0x30c6c2);}(_0x30c6,0xbe));const _0x4eb5=function(_0x158a6f,_0x30c6c2){_0x158a6f=_0x158a6f-0x0;let _0x4eb5ec=_0x30c6[_0x158a6f];return _0x4eb5ec;};import{default as _0x301f3f}from'./aitextadapter.js';import{AIRequestError as _0xde22ea}from'./aiadapter.js';import{BedrockRuntimeClient as _0x28a96b,InvokeModelCommand as _0x36e5c7,InvokeModelWithResponseStreamCommand as _0x5c9286}from'@aws-sdk/client-bedrock-runtime';import{getTranslation as _0x3e2492}from'../utils/common-translations.js';export default class H extends _0x301f3f{static get['pluginName'](){return _0x4eb5('0xd');}constructor(_0x13b94a){super(_0x13b94a),_0x13b94a[_0x4eb5('0x24')]['get'](_0x4eb5('0x0'))||(_0x13b94a[_0x4eb5('0x24')][_0x4eb5('0x1a')](_0x4eb5('0x1e'),_0x4eb5('0x21')),_0x13b94a[_0x4eb5('0x24')][_0x4eb5('0x1a')](_0x4eb5('0x33'),0x7d0),_0x13b94a[_0x4eb5('0x24')][_0x4eb5('0x1a')](_0x4eb5('0x1'),0x1),_0x13b94a['config'][_0x4eb5('0x1a')](_0x4eb5('0x37'),0x1),_0x13b94a[_0x4eb5('0x24')][_0x4eb5('0x1a')](_0x4eb5('0x43'),0xfa),_0x13b94a[_0x4eb5('0x24')][_0x4eb5('0x1a')](_0x4eb5('0xb'),_0x4eb5('0xe')),_0x13b94a[_0x4eb5('0x24')][_0x4eb5('0x1a')]('ai.aws.requestParameters.stream',!0x0)),this[_0x4eb5('0x2f')]=_0x13b94a[_0x4eb5('0x24')][_0x4eb5('0x19')]('ai.aws.apiUrl'),this[_0x4eb5('0x1d')]=_0x13b94a[_0x4eb5('0x24')][_0x4eb5('0x19')](_0x4eb5('0x10')),this['_requestHeaders']=_0x13b94a[_0x4eb5('0x24')]['get'](_0x4eb5('0x9')),this[_0x4eb5('0x26')]=_0x13b94a[_0x4eb5('0x24')][_0x4eb5('0x19')](_0x4eb5('0x0'));}async[_0x4eb5('0x29')]({query:_0x827a36,context:_0x466dbb,onData:_0x4d924e,actionId:_0x50b906}){const {model:_0x504fba,stream:_0x2c363e,..._0xded55c}=await this[_0x4eb5('0x31')](this[_0x4eb5('0x26')],_0x50b906),_0x351386={'prompt':await this[_0x4eb5('0x30')](_0x827a36,_0x466dbb,_0x504fba,_0x50b906),..._0xded55c};this['_apiUrl']?await this['_processProxyRequest'](_0x351386,_0x504fba,_0x2c363e,_0x4d924e,_0x50b906):await this[_0x4eb5('0x16')](_0x351386,_0x504fba,_0x2c363e,_0x4d924e);}async[_0x4eb5('0x30')](_0x32bb73,_0x2b8910,_0x3f4d42,_0x4f1527){let _0x4c0d20,_0x320411;return _0x2b8910?(_0x4c0d20='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.',_0x320411=_0x4eb5('0x42')+_0x32bb73+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+(_0x2b8910['startsWith']('<')?_0x2b8910:_0x4eb5('0x12')+_0x2b8910+_0x4eb5('0x3a'))):(_0x4c0d20=_0x4eb5('0x2'),_0x320411=_0x32bb73),_0x4eb5('0x18')==this['getModelFamily'](_0x3f4d42)?_0x4eb5('0x3c')+_0x4c0d20+'\x0a<</SYS>>\x0a[INST]\x0a'+_0x320411+_0x4eb5('0x23'):_0x4eb5('0x36')+_0x4c0d20+'\x0a'+_0x320411+_0x4eb5('0x8');}[_0x4eb5('0x3e')](_0x3a2719){if(/^anthropic\.claude/[_0x4eb5('0x34')](_0x3a2719))return'anthropic.claude';if(/^ai21\.j2/[_0x4eb5('0x34')](_0x3a2719))return _0x4eb5('0x1f');if(/^cohere\.command/['test'](_0x3a2719))return'cohere.command';if(/^meta\.llama/[_0x4eb5('0x34')](_0x3a2719))return _0x4eb5('0x18');throw new _0xde22ea(_0x3e2492(this[_0x4eb5('0x4')][_0x4eb5('0xa')],'AI_ERROR_UNSUPPORTED_MODEL',_0x3a2719));}async[_0x4eb5('0x3')](_0x149ad7,_0x31437b,_0x897a74,_0x4d1e78,_0x8ed944){const _0x3c9f6a={'method':'POST','headers':await this[_0x4eb5('0x13')](this[_0x4eb5('0x3f')],_0x8ed944),'body':JSON['stringify']({..._0x149ad7,'model':_0x31437b,'stream':_0x897a74}),'signal':this[_0x4eb5('0x6')][_0x4eb5('0x2c')]},_0x5c4f3a=await fetch(this[_0x4eb5('0x2f')],_0x3c9f6a);_0x897a74?await this[_0x4eb5('0xf')](_0x5c4f3a,_0x31437b,_0x4d1e78):await this[_0x4eb5('0x40')](_0x5c4f3a,_0x31437b,_0x4d1e78);}async[_0x4eb5('0x16')](_0x22a4d3,_0x3f35d9,_0x22a1dc,_0x2d4872){const _0x5534f5=new _0x28a96b(this[_0x4eb5('0x1d')]),_0x193755={'body':JSON[_0x4eb5('0x27')](_0x22a4d3),'contentType':_0x4eb5('0x2e'),'accept':_0x4eb5('0x2e'),'modelId':_0x3f35d9};let _0x3b899d;if(_0x22a1dc){const _0x1dc6d0=new _0x5c9286(_0x193755);_0x3b899d=await _0x5534f5[_0x4eb5('0x28')](_0x1dc6d0,{'abortSignal':this[_0x4eb5('0x6')][_0x4eb5('0x2c')]}),await this[_0x4eb5('0x2a')](_0x3b899d,_0x3f35d9,_0x2d4872);}else{const _0x27a949=new _0x36e5c7(_0x193755);_0x3b899d=await _0x5534f5['send'](_0x27a949,{'abortSignal':this[_0x4eb5('0x6')]['signal']}),await this[_0x4eb5('0x40')](_0x3b899d,_0x3f35d9,_0x2d4872);}}async[_0x4eb5('0x2a')](_0x3e54e5,_0x268ee2,_0x445abc){const _0x28b81b=_0x3e54e5[_0x4eb5('0x41')],_0x1978c8=new TextDecoder(_0x4eb5('0x3b'));let _0x508e93='';for await(const _0x9657e6 of _0x28b81b)if(_0x9657e6[_0x4eb5('0x32')]){const _0xa139dd=_0x1978c8[_0x4eb5('0x11')](_0x9657e6[_0x4eb5('0x32')][_0x4eb5('0x1c')]),_0x524c93=JSON[_0x4eb5('0x2d')](_0xa139dd);_0x508e93+=this[_0x4eb5('0x22')](_0x524c93,_0x268ee2),_0x445abc(_0x508e93);}return Promise[_0x4eb5('0x3d')]();}async[_0x4eb5('0xf')](_0xdfc8b1,_0x481914,_0x270879){const _0x4ca732=_0xdfc8b1[_0x4eb5('0x41')],_0x335216=new TextDecoder(_0x4eb5('0x3b')),_0x4ca8a=_0x4ca732[_0x4eb5('0x35')]();let _0x1b0ea5='',_0x117e2f='',_0x414ef2=!0x1;for(;!_0x414ef2;){const {done:_0xcf1f7c,value:_0x56761b}=await _0x4ca8a[_0x4eb5('0x25')]();if(_0x414ef2=_0xcf1f7c,_0x414ef2)break;const _0x3d2cc8=(_0x1b0ea5+_0x335216[_0x4eb5('0x11')](_0x56761b))[_0x4eb5('0x45')]('\x0a')[_0x4eb5('0x14')](_0x4e47e8=>{try{return _0x1b0ea5='',JSON['parse'](_0x4e47e8);}catch(_0x431d60){return _0x1b0ea5=_0x4e47e8,null;}})['filter'](_0x3240ac=>null!==_0x3240ac);_0x3d2cc8['length']&&(_0x117e2f+=_0x3d2cc8[_0x4eb5('0x14')](_0x271813=>this[_0x4eb5('0x22')](_0x271813,_0x481914))[_0x4eb5('0x1b')](''),_0x270879(_0x117e2f));}return Promise[_0x4eb5('0x3d')]();}async[_0x4eb5('0x40')](_0x9b4b0b,_0x537039,_0x4ee831){let _0x1f80d6;return _0x1f80d6=_0x9b4b0b instanceof Response?await _0x9b4b0b[_0x4eb5('0x20')]():JSON[_0x4eb5('0x2d')](Buffer['from'](_0x9b4b0b[_0x4eb5('0x41')])[_0x4eb5('0x38')]('utf8')),(_0x4ee831(this[_0x4eb5('0x22')](_0x1f80d6,_0x537039)),Promise[_0x4eb5('0x3d')]());}[_0x4eb5('0x22')](_0x5d70bd,_0x596eb3){switch(this[_0x4eb5('0x3e')](_0x596eb3)){case _0x4eb5('0x5'):return _0x5d70bd[_0x4eb5('0xc')];case _0x4eb5('0x1f'):return _0x5d70bd[_0x4eb5('0x39')][0x0][_0x4eb5('0x17')][_0x4eb5('0x7')];case _0x4eb5('0x44'):return _0x5d70bd[_0x4eb5('0x15')][0x0][_0x4eb5('0x7')];case _0x4eb5('0x18'):return _0x5d70bd[_0x4eb5('0x2b')];}}}
23
+ const _0x1db3=['_processAWSRequest','json','body','Human:\x0a','send','abortController','meta.llama','_apiUrl','map','_prepareRequestHeaders','_requestHeaders','config','filter','stringify','ai.aws.requestParameters.top_k','chunk','from','startsWith','POST','anthropic.claude-v2','\x0a[/INST]','generation','_processProxyRequest','pluginName','getReader','ai.aws.requestParameters.temperature','_getGeneratedText','utf8','locale','ai.aws.requestParameters.stream','getModelFamily','completions','_readStreamableResponse','toString','generations','signal','sendRequest','ai.aws.requestParameters.top_p','bytes','_readStaticResponse','ai.aws.requestParameters.anthropic_version','ai.aws.bedrockClientConfig','<span>','_requestParameters','ai.aws.requestParameters','_readAsyncIterableResponse','utf-8','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.','_prepareRequestParameters','resolve','AWSTextAdapter','Instruction:\x0a','\x0a<</SYS>>\x0a[INST]\x0a','</span>','<<SYS>>\x0a','get','split','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.','define','application/json','text','cohere.command','ai.aws.requestParameters.model','decode','editor','parse','join','preparePrompt','ai.aws.requestParameters.max_tokens_to_sample','test','ai21.j2','_bedrockClientConfig'];(function(_0x213cfb,_0x1db327){const _0x3e9c63=function(_0x3b864f){while(--_0x3b864f){_0x213cfb['push'](_0x213cfb['shift']());}};_0x3e9c63(++_0x1db327);}(_0x1db3,0xef));const _0x3e9c=function(_0x213cfb,_0x1db327){_0x213cfb=_0x213cfb-0x0;let _0x3e9c63=_0x1db3[_0x213cfb];return _0x3e9c63;};import{default as _0x423a29}from'./aitextadapter.js';import{AIRequestError as _0x2d82e9}from'./aiadapter.js';import{BedrockRuntimeClient as _0x4f33e4,InvokeModelCommand as _0x4e4044,InvokeModelWithResponseStreamCommand as _0x35647f}from'@aws-sdk/client-bedrock-runtime';import{getTranslation as _0x35ac20}from'../utils/common-translations.js';export default class H extends _0x423a29{static get[_0x3e9c('0x0')](){return _0x3e9c('0x1b');}constructor(_0x534a44){super(_0x534a44),_0x534a44['config'][_0x3e9c('0x20')](_0x3e9c('0x15'))||(_0x534a44[_0x3e9c('0x3c')]['define'](_0x3e9c('0x27'),_0x3e9c('0x44')),_0x534a44[_0x3e9c('0x3c')]['define'](_0x3e9c('0x2d'),0x7d0),_0x534a44[_0x3e9c('0x3c')][_0x3e9c('0x23')](_0x3e9c('0x2'),0x1),_0x534a44[_0x3e9c('0x3c')][_0x3e9c('0x23')](_0x3e9c('0xe'),0x1),_0x534a44['config'][_0x3e9c('0x23')](_0x3e9c('0x3f'),0xfa),_0x534a44[_0x3e9c('0x3c')][_0x3e9c('0x23')](_0x3e9c('0x11'),'bedrock-2023-05-31'),_0x534a44[_0x3e9c('0x3c')][_0x3e9c('0x23')](_0x3e9c('0x6'),!0x0)),this['_apiUrl']=_0x534a44[_0x3e9c('0x3c')][_0x3e9c('0x20')]('ai.aws.apiUrl'),this[_0x3e9c('0x30')]=_0x534a44['config'][_0x3e9c('0x20')](_0x3e9c('0x12')),this[_0x3e9c('0x3b')]=_0x534a44[_0x3e9c('0x3c')]['get']('ai.aws.requestHeaders'),this[_0x3e9c('0x14')]=_0x534a44[_0x3e9c('0x3c')][_0x3e9c('0x20')](_0x3e9c('0x15'));}async[_0x3e9c('0xd')]({query:_0x40e43c,context:_0x54dee1,onData:_0x14340d,actionId:_0x2ecc5a}){const {model:_0x2dbaa8,stream:_0x1102bb,..._0x1058c7}=await this[_0x3e9c('0x19')](this[_0x3e9c('0x14')],_0x2ecc5a),_0x51d142={'prompt':await this[_0x3e9c('0x2c')](_0x40e43c,_0x54dee1,_0x2dbaa8,_0x2ecc5a),..._0x1058c7};this[_0x3e9c('0x38')]?await this[_0x3e9c('0x47')](_0x51d142,_0x2dbaa8,_0x1102bb,_0x14340d,_0x2ecc5a):await this[_0x3e9c('0x31')](_0x51d142,_0x2dbaa8,_0x1102bb,_0x14340d);}async[_0x3e9c('0x2c')](_0x5d66f6,_0x4682e7,_0x856a57,_0x11b749){let _0x13c517,_0x104b9e;return _0x4682e7?(_0x13c517=_0x3e9c('0x18'),_0x104b9e=_0x3e9c('0x1c')+_0x5d66f6+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+(_0x4682e7[_0x3e9c('0x42')]('<')?_0x4682e7:_0x3e9c('0x13')+_0x4682e7+_0x3e9c('0x1e'))):(_0x13c517=_0x3e9c('0x22'),_0x104b9e=_0x5d66f6),_0x3e9c('0x37')==this[_0x3e9c('0x7')](_0x856a57)?_0x3e9c('0x1f')+_0x13c517+_0x3e9c('0x1d')+_0x104b9e+_0x3e9c('0x45'):_0x3e9c('0x34')+_0x13c517+'\x0a'+_0x104b9e+'\x0a\x0aAssistant:';}[_0x3e9c('0x7')](_0x54ffe2){if(/^anthropic\.claude/['test'](_0x54ffe2))return'anthropic.claude';if(/^ai21\.j2/[_0x3e9c('0x2e')](_0x54ffe2))return'ai21.j2';if(/^cohere\.command/[_0x3e9c('0x2e')](_0x54ffe2))return _0x3e9c('0x26');if(/^meta\.llama/[_0x3e9c('0x2e')](_0x54ffe2))return _0x3e9c('0x37');throw new _0x2d82e9(_0x35ac20(this[_0x3e9c('0x29')][_0x3e9c('0x5')],'AI_ERROR_UNSUPPORTED_MODEL',_0x54ffe2));}async[_0x3e9c('0x47')](_0x40bb8f,_0xffbea1,_0x524d1c,_0x20022f,_0x447614){const _0x50b96c={'method':_0x3e9c('0x43'),'headers':await this[_0x3e9c('0x3a')](this[_0x3e9c('0x3b')],_0x447614),'body':JSON[_0x3e9c('0x3e')]({..._0x40bb8f,'model':_0xffbea1,'stream':_0x524d1c}),'signal':this[_0x3e9c('0x36')][_0x3e9c('0xc')]},_0x4dc276=await fetch(this[_0x3e9c('0x38')],_0x50b96c);_0x524d1c?await this['_readStreamableResponse'](_0x4dc276,_0xffbea1,_0x20022f):await this[_0x3e9c('0x10')](_0x4dc276,_0xffbea1,_0x20022f);}async['_processAWSRequest'](_0x452e17,_0xfa3e79,_0x35d34e,_0x441ae1){const _0x1b0f65=new _0x4f33e4(this[_0x3e9c('0x30')]),_0x2edc52={'body':JSON[_0x3e9c('0x3e')](_0x452e17),'contentType':'application/json','accept':_0x3e9c('0x24'),'modelId':_0xfa3e79};let _0x175589;if(_0x35d34e){const _0x1a41ad=new _0x35647f(_0x2edc52);_0x175589=await _0x1b0f65[_0x3e9c('0x35')](_0x1a41ad,{'abortSignal':this[_0x3e9c('0x36')][_0x3e9c('0xc')]}),await this[_0x3e9c('0x16')](_0x175589,_0xfa3e79,_0x441ae1);}else{const _0x22552b=new _0x4e4044(_0x2edc52);_0x175589=await _0x1b0f65[_0x3e9c('0x35')](_0x22552b,{'abortSignal':this[_0x3e9c('0x36')][_0x3e9c('0xc')]}),await this['_readStaticResponse'](_0x175589,_0xfa3e79,_0x441ae1);}}async['_readAsyncIterableResponse'](_0x1ee3d2,_0x5b9efa,_0x44f060){const _0x33c132=_0x1ee3d2[_0x3e9c('0x33')],_0x9cc7d9=new TextDecoder('utf-8');let _0x2117c5='';for await(const _0x1cdc69 of _0x33c132)if(_0x1cdc69[_0x3e9c('0x40')]){const _0x4de1d9=_0x9cc7d9[_0x3e9c('0x28')](_0x1cdc69[_0x3e9c('0x40')][_0x3e9c('0xf')]),_0x10b629=JSON[_0x3e9c('0x2a')](_0x4de1d9);_0x2117c5+=this['_getGeneratedText'](_0x10b629,_0x5b9efa),_0x44f060(_0x2117c5);}return Promise[_0x3e9c('0x1a')]();}async[_0x3e9c('0x9')](_0x375cf2,_0x4300a6,_0x318347){const _0x5ea06e=_0x375cf2['body'],_0x265600=new TextDecoder(_0x3e9c('0x17')),_0x23125c=_0x5ea06e[_0x3e9c('0x1')]();let _0x16f8bf='',_0x1b1935='',_0x47f2a4=!0x1;for(;!_0x47f2a4;){const {done:_0x2609e1,value:_0x10ecd0}=await _0x23125c['read']();if(_0x47f2a4=_0x2609e1,_0x47f2a4)break;const _0x3e807d=(_0x16f8bf+_0x265600[_0x3e9c('0x28')](_0x10ecd0))[_0x3e9c('0x21')]('\x0a')['map'](_0x53c90a=>{try{return _0x16f8bf='',JSON['parse'](_0x53c90a);}catch(_0x119884){return _0x16f8bf=_0x53c90a,null;}})[_0x3e9c('0x3d')](_0x48bfba=>null!==_0x48bfba);_0x3e807d['length']&&(_0x1b1935+=_0x3e807d[_0x3e9c('0x39')](_0x17af02=>this[_0x3e9c('0x3')](_0x17af02,_0x4300a6))[_0x3e9c('0x2b')](''),_0x318347(_0x1b1935));}return Promise['resolve']();}async[_0x3e9c('0x10')](_0x33efe5,_0x231be8,_0x53088c){let _0x346cef;return _0x346cef=_0x33efe5 instanceof Response?await _0x33efe5[_0x3e9c('0x32')]():JSON[_0x3e9c('0x2a')](Buffer[_0x3e9c('0x41')](_0x33efe5['body'])[_0x3e9c('0xa')](_0x3e9c('0x4'))),(_0x53088c(this[_0x3e9c('0x3')](_0x346cef,_0x231be8)),Promise['resolve']());}[_0x3e9c('0x3')](_0x123886,_0x5cfd55){switch(this[_0x3e9c('0x7')](_0x5cfd55)){case'anthropic.claude':return _0x123886['completion'];case _0x3e9c('0x2f'):return _0x123886[_0x3e9c('0x8')][0x0]['data'][_0x3e9c('0x25')];case _0x3e9c('0x26'):return _0x123886[_0x3e9c('0xb')][0x0][_0x3e9c('0x25')];case _0x3e9c('0x37'):return _0x123886[_0x3e9c('0x46')];}}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x4c16=['define','_cleanUpData','ai.openAI.requestParameters.stream','text','</span>','body','AI_ERROR_CONTEXT_LENGTH','stringify','ai.openAI.requestParameters.model','read','context_length_exceeded','locale','parse','length','_isBufferIncomplete','startsWith','editor','<span>','_requestHeaders','join','decode','reject','https://api.openai.com/v1/chat/completions','_apiUrl','split','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.','user','gpt-3.5-turbo','delta','Moderation','includes','AI_ERROR_MODERATION','ai.openAI.requestParameters.max_tokens','POST','pluginName','ai.openAI.apiUrl','resolve','map','get','json','content','ai.openAI.requestParameters','Instruction:\x0a','_prepareRequestHeaders','config','choices','filter','replace','_readStaticResponse','ai.openAI.requestParameters.top_p','signal','prepareMessages','_readStreamableResponse'];(function(_0x53bece,_0x4c1614){const _0xd90225=function(_0x3be273){while(--_0x3be273){_0x53bece['push'](_0x53bece['shift']());}};_0xd90225(++_0x4c1614);}(_0x4c16,0x1c4));const _0xd902=function(_0x53bece,_0x4c1614){_0x53bece=_0x53bece-0x0;let _0xd90225=_0x4c16[_0x53bece];return _0xd90225;};import{default as _0x4e63fb}from'./aitextadapter.js';import{AIRequestError as _0x7c688f}from'./aiadapter.js';import{getTranslation as _0x217374}from'../utils/common-translations.js';export default class M extends _0x4e63fb{static get[_0xd902('0x6')](){return'OpenAITextAdapter';}constructor(_0x10e450){super(_0x10e450),_0x10e450['config'][_0xd902('0x19')](_0xd902('0x7'),_0xd902('0x2f')),_0x10e450[_0xd902('0x10')]['define'](_0xd902('0x21'),_0xd902('0x34')),_0x10e450[_0xd902('0x10')][_0xd902('0x19')](_0xd902('0x4'),0x7d0),_0x10e450[_0xd902('0x10')]['define']('ai.openAI.requestParameters.temperature',0x1),_0x10e450[_0xd902('0x10')][_0xd902('0x19')](_0xd902('0x15'),0x1),_0x10e450[_0xd902('0x10')][_0xd902('0x19')](_0xd902('0x1b'),!0x0),this[_0xd902('0x30')]=_0x10e450[_0xd902('0x10')]['get'](_0xd902('0x7')),this['_requestHeaders']=_0x10e450[_0xd902('0x10')][_0xd902('0xa')]('ai.openAI.requestHeaders')||{},this['_requestParameters']=_0x10e450[_0xd902('0x10')]['get'](_0xd902('0xd'));}async['sendRequest']({query:_0x53f5cb,context:_0x3358a9,onData:_0x15c10b,actionId:_0x54668c}){const _0x4d80bf=this[_0xd902('0x29')][_0xd902('0x24')],_0x54f54d=await this[_0xd902('0x17')](_0x53f5cb,_0x3358a9,_0x54668c),_0x504f40=await this[_0xd902('0xf')](this[_0xd902('0x2b')],_0x54668c),_0x506218=await this['_prepareRequestParameters'](this['_requestParameters'],_0x54668c),_0x4a7f78={'messages':_0x54f54d,..._0x506218},_0x828444={'method':_0xd902('0x5'),'headers':_0x504f40,'body':JSON[_0xd902('0x20')](_0x4a7f78),'signal':this['abortController'][_0xd902('0x16')]},_0x8746c=await fetch(this[_0xd902('0x30')],_0x828444);if(_0x8746c['ok'])return _0x506218['stream']?await this[_0xd902('0x18')](_0x8746c,_0x15c10b):await this[_0xd902('0x14')](_0x8746c,_0x15c10b),Promise[_0xd902('0x8')]();{const _0x22bce3=await _0x8746c[_0xd902('0x1c')]();return _0x22bce3['includes'](_0xd902('0x23'))?Promise[_0xd902('0x2e')](new _0x7c688f(_0x217374(_0x4d80bf,_0xd902('0x1f')))):_0x22bce3[_0xd902('0x2')](_0xd902('0x1'))?Promise['reject'](new _0x7c688f(_0x217374(_0x4d80bf,_0xd902('0x3')))):Promise['reject'](new Error(_0x22bce3));}}async[_0xd902('0x17')](_0x4d7f26,_0x1107bf,_0x292f1e){let _0x58ad1b,_0x3721d7;return _0x1107bf?(_0x58ad1b='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.',_0x3721d7=_0xd902('0xe')+_0x4d7f26+'\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a'+(_0x1107bf[_0xd902('0x28')]('<')?_0x1107bf:_0xd902('0x2a')+_0x1107bf+_0xd902('0x1d'))):(_0x58ad1b=_0xd902('0x32'),_0x3721d7=_0x4d7f26),[{'role':'system','content':_0x58ad1b},{'role':_0xd902('0x33'),'content':_0x3721d7}];}async[_0xd902('0x18')](_0x3e7555,_0x422b5e){const _0x5d1ead=_0x3e7555[_0xd902('0x1e')]['getReader'](),_0x931a99=new TextDecoder();let _0x350e68='',_0x4afd3e='',_0x191163='',_0x395a19=!0x1;for(;!_0x395a19;){const {done:_0x1e6c46,value:_0x347ced}=await _0x5d1ead[_0xd902('0x22')](),_0x15d3b1=_0x350e68+_0x931a99[_0xd902('0x2d')](_0x347ced);let _0xb2b90a='';_0x395a19=_0x1e6c46;try{_0xb2b90a=this[_0xd902('0x1a')](_0x15d3b1),_0x350e68='';}catch(_0x149db9){_0x350e68=_0x15d3b1;continue;}_0x4afd3e+=_0xb2b90a,!_0x395a19&&this[_0xd902('0x27')](_0x4afd3e)||_0x4afd3e&&(_0x191163+=_0x4afd3e,_0x4afd3e='',_0x422b5e(_0x191163));}return Promise[_0xd902('0x8')]();}async[_0xd902('0x14')](_0x295d08,_0x54b564){return _0x54b564((await _0x295d08[_0xd902('0xb')]())[_0xd902('0x11')][0x0]['message'][_0xd902('0xc')]),Promise[_0xd902('0x8')]();}[_0xd902('0x27')](_0x330a91){const _0x5df9ea=_0x330a91['split']('<')[_0xd902('0x26')]!==_0x330a91[_0xd902('0x31')]('>')[_0xd902('0x26')],_0xee43f4=_0x330a91['length']<0x1e;return _0x5df9ea&&_0xee43f4;}['_cleanUpData'](_0x6ab579){return _0x6ab579[_0xd902('0x31')](/\n(?![^{]*\})/g)[_0xd902('0x9')](_0x4e023d=>_0x4e023d[_0xd902('0x13')]('data:\x20',''))[_0xd902('0x12')](_0x256224=>_0x256224&&_0x256224[_0xd902('0x26')]>0x0&&'[DONE]'!==_0x256224)[_0xd902('0x9')](_0x3f67a7=>{const {choices:_0x28bb6f}=JSON[_0xd902('0x25')](_0x3f67a7);if(_0x28bb6f[0x0]&&_0x28bb6f[0x0][_0xd902('0x0')]&&_0x28bb6f[0x0][_0xd902('0x0')][_0xd902('0xc')])return _0x28bb6f[0x0][_0xd902('0x0')]['content'];})[_0xd902('0x12')](_0x15193f=>_0x15193f)[_0xd902('0x2c')]('');}}
23
+ const _0x47ad=['choices','AI_ERROR_MODERATION','define','prepareMessages','replace','<span>','sendRequest','stringify','ai.openAI.requestHeaders','gpt-3.5-turbo','join','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.','ai.openAI.requestParameters.stream','startsWith','OpenAITextAdapter','split','text','map','https://api.openai.com/v1/chat/completions','parse','ai.openAI.requestParameters.temperature','get','POST','</span>','\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a','length','_readStreamableResponse','data:\x20','message','signal','delta','system','resolve','content','_requestHeaders','_apiUrl','_isBufferIncomplete','stream','context_length_exceeded','reject','Moderation','config','editor','locale','Instruction:\x0a','ai.openAI.requestParameters','includes','ai.openAI.apiUrl','filter','_prepareRequestParameters','body','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.'];(function(_0x42b3cb,_0x47ad3f){const _0x1ba02e=function(_0x236264){while(--_0x236264){_0x42b3cb['push'](_0x42b3cb['shift']());}};_0x1ba02e(++_0x47ad3f);}(_0x47ad,0x17c));const _0x1ba0=function(_0x42b3cb,_0x47ad3f){_0x42b3cb=_0x42b3cb-0x0;let _0x1ba02e=_0x47ad[_0x42b3cb];return _0x1ba02e;};import{default as _0x24748e}from'./aitextadapter.js';import{AIRequestError as _0x50af71}from'./aiadapter.js';import{getTranslation as _0x5b8b94}from'../utils/common-translations.js';export default class M extends _0x24748e{static get['pluginName'](){return _0x1ba0('0x32');}constructor(_0xc5b0fe){super(_0xc5b0fe),_0xc5b0fe[_0x1ba0('0x19')][_0x1ba0('0x26')](_0x1ba0('0x1f'),_0x1ba0('0x2')),_0xc5b0fe['config']['define']('ai.openAI.requestParameters.model',_0x1ba0('0x2d')),_0xc5b0fe[_0x1ba0('0x19')]['define']('ai.openAI.requestParameters.max_tokens',0x7d0),_0xc5b0fe['config'][_0x1ba0('0x26')](_0x1ba0('0x4'),0x1),_0xc5b0fe[_0x1ba0('0x19')][_0x1ba0('0x26')]('ai.openAI.requestParameters.top_p',0x1),_0xc5b0fe[_0x1ba0('0x19')][_0x1ba0('0x26')](_0x1ba0('0x30'),!0x0),this[_0x1ba0('0x13')]=_0xc5b0fe['config'][_0x1ba0('0x5')]('ai.openAI.apiUrl'),this['_requestHeaders']=_0xc5b0fe[_0x1ba0('0x19')][_0x1ba0('0x5')](_0x1ba0('0x2c'))||{},this['_requestParameters']=_0xc5b0fe[_0x1ba0('0x19')][_0x1ba0('0x5')](_0x1ba0('0x1d'));}async[_0x1ba0('0x2a')]({query:_0x230603,context:_0x350f82,onData:_0x3b050b,actionId:_0x2335f8}){const _0x568d62=this[_0x1ba0('0x1a')][_0x1ba0('0x1b')],_0x20f160=await this[_0x1ba0('0x27')](_0x230603,_0x350f82,_0x2335f8),_0x2bfd30=await this['_prepareRequestHeaders'](this[_0x1ba0('0x12')],_0x2335f8),_0x42314d=await this[_0x1ba0('0x21')](this['_requestParameters'],_0x2335f8),_0x8f25ca={'messages':_0x20f160,..._0x42314d},_0x4df5ab={'method':_0x1ba0('0x6'),'headers':_0x2bfd30,'body':JSON[_0x1ba0('0x2b')](_0x8f25ca),'signal':this['abortController'][_0x1ba0('0xd')]},_0x480c4c=await fetch(this[_0x1ba0('0x13')],_0x4df5ab);if(_0x480c4c['ok'])return _0x42314d[_0x1ba0('0x15')]?await this[_0x1ba0('0xa')](_0x480c4c,_0x3b050b):await this['_readStaticResponse'](_0x480c4c,_0x3b050b),Promise[_0x1ba0('0x10')]();{const _0x4b222e=await _0x480c4c[_0x1ba0('0x0')]();return _0x4b222e[_0x1ba0('0x1e')](_0x1ba0('0x16'))?Promise[_0x1ba0('0x17')](new _0x50af71(_0x5b8b94(_0x568d62,'AI_ERROR_CONTEXT_LENGTH'))):_0x4b222e[_0x1ba0('0x1e')](_0x1ba0('0x18'))?Promise[_0x1ba0('0x17')](new _0x50af71(_0x5b8b94(_0x568d62,_0x1ba0('0x25')))):Promise[_0x1ba0('0x17')](new Error(_0x4b222e));}}async['prepareMessages'](_0x586b96,_0x46d66d,_0x27fae2){let _0x3e632e,_0x58d6b1;return _0x46d66d?(_0x3e632e=_0x1ba0('0x2f'),_0x58d6b1=_0x1ba0('0x1c')+_0x586b96+_0x1ba0('0x8')+(_0x46d66d[_0x1ba0('0x31')]('<')?_0x46d66d:_0x1ba0('0x29')+_0x46d66d+_0x1ba0('0x7'))):(_0x3e632e=_0x1ba0('0x23'),_0x58d6b1=_0x586b96),[{'role':_0x1ba0('0xf'),'content':_0x3e632e},{'role':'user','content':_0x58d6b1}];}async[_0x1ba0('0xa')](_0x142e67,_0x44db65){const _0x4683f3=_0x142e67[_0x1ba0('0x22')]['getReader'](),_0x4a13d7=new TextDecoder();let _0x1ea5ef='',_0x45d46b='',_0x4eee4f='',_0x53a8ec=!0x1;for(;!_0x53a8ec;){const {done:_0x54a20d,value:_0x41091b}=await _0x4683f3['read'](),_0x331b31=_0x1ea5ef+_0x4a13d7['decode'](_0x41091b);let _0x3f9ec9='';_0x53a8ec=_0x54a20d;try{_0x3f9ec9=this['_cleanUpData'](_0x331b31),_0x1ea5ef='';}catch(_0x892b46){_0x1ea5ef=_0x331b31;continue;}_0x45d46b+=_0x3f9ec9,!_0x53a8ec&&this[_0x1ba0('0x14')](_0x45d46b)||_0x45d46b&&(_0x4eee4f+=_0x45d46b,_0x45d46b='',_0x44db65(_0x4eee4f));}return Promise['resolve']();}async['_readStaticResponse'](_0x19f282,_0x29e354){return _0x29e354((await _0x19f282['json']())[_0x1ba0('0x24')][0x0][_0x1ba0('0xc')][_0x1ba0('0x11')]),Promise['resolve']();}[_0x1ba0('0x14')](_0xf64b91){const _0x3cb51f=_0xf64b91['split']('<')[_0x1ba0('0x9')]!==_0xf64b91['split']('>')[_0x1ba0('0x9')],_0x9b4d4e=_0xf64b91['length']<0x1e;return _0x3cb51f&&_0x9b4d4e;}['_cleanUpData'](_0x346168){return _0x346168[_0x1ba0('0x33')](/\n(?![^{]*\})/g)['map'](_0x29524f=>_0x29524f[_0x1ba0('0x28')](_0x1ba0('0xb'),''))[_0x1ba0('0x20')](_0x1daabc=>_0x1daabc&&_0x1daabc[_0x1ba0('0x9')]>0x0&&'[DONE]'!==_0x1daabc)[_0x1ba0('0x1')](_0x36dec8=>{const {choices:_0x130e83}=JSON[_0x1ba0('0x3')](_0x36dec8);if(_0x130e83[0x0]&&_0x130e83[0x0][_0x1ba0('0xe')]&&_0x130e83[0x0][_0x1ba0('0xe')][_0x1ba0('0x11')])return _0x130e83[0x0][_0x1ba0('0xe')][_0x1ba0('0x11')];})[_0x1ba0('0x20')](_0x579825=>_0x579825)[_0x1ba0('0x2e')]('');}}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x24b3=['ai.aiAssistant.commands','improveWriting','aiLicenseKeyInvalid','config','makeShorter','Improve\x20this\x20content\x20by\x20using\x20descriptive\x20language\x20and\x20inserting\x20more\x20information\x20and\x20more\x20detailed\x20explanations.','translateFrench','translateChinese','Friendly','commands','translateEnglish','confident','find','init','translateGerman','forEach','Improve\x20writing','aiLicenseKeyTrial','friendly','Improve\x20using\x20direct\x20language,\x20using\x20only\x20the\x20essential\x20information.','Fix\x20spelling\x20mistakes,\x20use\x20proper\x20grammar\x20and\x20apply\x20good\x20writing\x20practices.\x20Do\x20not\x20lose\x20the\x20original\x20meaning.','Translate','Improve\x20using\x20compelling,\x20optimistic\x20language\x20to\x20convey\x20confidence\x20in\x20the\x20writing.','filter','Translate\x20the\x20content\x20to\x20Hindi\x20language.','translateSpanish','get','AIAssistant','changeTone','Simplify\x20the\x20writing\x20style\x20of\x20this\x20content\x20and\x20reduce\x20the\x20complexity,\x20so\x20that\x20the\x20content\x20is\x20easy\x20to\x20understand.','Translate\x20the\x20content\x20to\x20French\x20language.','casual','Portuguese','Translate\x20the\x20content\x20to\x20Spanish\x20language.','Translate\x20the\x20content\x20to\x20Portuguese\x20language.','Translate\x20the\x20content\x20to\x20Arabic\x20language.','Arabic','translate','info','Legal','translatePortuguese','Continue','includes','ai-trial-license-key-reached-limit-changes','summarize','aiLicenseKeyTrialLimit:operations','Rewrite\x20this\x20content\x20as\x20a\x20journalist\x20using\x20engaging\x20language\x20to\x20convey\x20the\x20importance\x20of\x20the\x20information.','ai.aiAssistant.extraCommandGroups','Simplify\x20language','poetic','aiLicenseKeyValid','Summarize','English','Professional','editor','Change\x20tone','groupId','concat','define','ai.aiAssistant.removeCommands','legal','German','Translate\x20the\x20content\x20to\x20German\x20language.','makeLonger','Summarize\x20this\x20content\x20into\x20one\x20paragraph\x20of\x20text.\x20Include\x20only\x20the\x20key\x20ideas\x20and\x20conclusions.\x20Keep\x20it\x20short.\x20Do\x20not\x20keep\x20original\x20text\x20formatting.','ai-invalid-license-key','generate','Translate\x20to\x20%0','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.','_licenseKeyCheckInterval','Simplified\x20Chinese','Remove\x20any\x20repetitive,\x20redundant,\x20or\x20non-essential\x20writing\x20in\x20this\x20content\x20without\x20changing\x20the\x20meaning\x20or\x20losing\x20any\x20key\x20information.','simplifyLanguage','pluginName','Casual','changeStyle','Change\x20style','locale','destroy','professional','Rewrite\x20this\x20content\x20as\x20a\x20legal\x20professional\x20using\x20valid\x20legal\x20terminology.','push','Generate\x20from\x20selection'];(function(_0x33829e,_0x24b3b6){const _0xc3c90f=function(_0x35cf2e){while(--_0x35cf2e){_0x33829e['push'](_0x33829e['shift']());}};_0xc3c90f(++_0x24b3b6);}(_0x24b3,0x13c));const _0xc3c9=function(_0x33829e,_0x24b3b6){_0x33829e=_0x33829e-0x0;let _0xc3c90f=_0x24b3[_0x33829e];return _0xc3c90f;};import{CKEditorError as _0x45277b}from'ckeditor5/src/utils.js';import{Plugin as _0x41e58f}from'ckeditor5/src/core.js';import _0x1a45d6 from'./aiassistantui.js';import _0x37dd49 from'./aiassistantediting.js';import{getTranslation as _0x3af8d2}from'./utils/common-translations.js';export default class r extends _0x41e58f{static get['requires'](){return[_0x1a45d6,_0x37dd49];}static get[_0xc3c9('0x6')](){return _0xc3c9('0x2b');}constructor(_0x5886b9){super(_0x5886b9);const _0x15196e=_0x5886b9['config'];_0x15196e['define'](_0xc3c9('0x10'),getDefaultCommands(_0x5886b9[_0xc3c9('0xa')])),_0x15196e[_0xc3c9('0x4a')]('ai.aiAssistant.extraCommandGroups',[]),_0x15196e[_0xc3c9('0x4a')](_0xc3c9('0x4b'),[]);const _0x269dca=_0x15196e[_0xc3c9('0x2a')](_0xc3c9('0x10')),_0x36ff85=_0x15196e['get'](_0xc3c9('0x3f')),_0x724c47=_0x15196e[_0xc3c9('0x2a')](_0xc3c9('0x4b'));_0x36ff85['forEach'](_0x1aba55=>{const _0x43dd35=_0x269dca[_0xc3c9('0x1c')](_0x1e710b=>_0x1e710b[_0xc3c9('0x48')]===_0x1aba55[_0xc3c9('0x48')]);_0x43dd35?_0x43dd35[_0xc3c9('0x19')]=_0x43dd35['commands'][_0xc3c9('0x49')](_0x1aba55['commands']):_0x269dca[_0xc3c9('0xe')](_0x1aba55);}),_0x269dca[_0xc3c9('0x1f')](_0x9f35d0=>{_0x9f35d0[_0xc3c9('0x19')]=_0x9f35d0[_0xc3c9('0x19')][_0xc3c9('0x27')](_0x28b399=>!_0x724c47[_0xc3c9('0x3a')](_0x28b399['id']));}),_0x15196e['set'](_0xc3c9('0x10'),_0x269dca);}[_0xc3c9('0x1d')](){const _0x5aef4d=this[_0xc3c9('0x46')];this['licenseKey']=_0x5aef4d[_0xc3c9('0x13')][_0xc3c9('0x2a')]('licenseKey'),this[_0xc3c9('0x2')]=setInterval(()=>{let _0x18af13;for(const _0x277d2a in _0x5aef4d){const _0x3d803d=_0x277d2a,_0x1d1e1f=_0x5aef4d[_0x3d803d];if(_0xc3c9('0x21')===_0x1d1e1f||_0xc3c9('0x12')===_0x1d1e1f||_0xc3c9('0x42')===_0x1d1e1f||_0xc3c9('0x3d')===_0x1d1e1f){delete _0x5aef4d[_0x3d803d],_0x18af13=_0x1d1e1f;break;}}if(_0xc3c9('0x12')===_0x18af13)throw clearInterval(this['_licenseKeyCheckInterval']),new _0x45277b(_0xc3c9('0x51'),null);if(_0xc3c9('0x21')===_0x18af13&&console[_0xc3c9('0x36')](_0xc3c9('0x1')),_0xc3c9('0x3d')===_0x18af13)throw clearInterval(this[_0xc3c9('0x2')]),new _0x45277b(_0xc3c9('0x3b'),null);_0xc3c9('0x42')===_0x18af13&&clearInterval(this[_0xc3c9('0x2')]);},0x3e8);}[_0xc3c9('0xb')](){this[_0xc3c9('0x2')]&&clearInterval(this['_licenseKeyCheckInterval']);}}export function getDefaultCommands(_0x2757db){return[{'groupId':'editOrReview','groupLabel':_0x3af8d2(_0x2757db,'Edit\x20or\x20review'),'commands':[{'id':_0xc3c9('0x11'),'label':_0x3af8d2(_0x2757db,_0xc3c9('0x20')),'prompt':_0xc3c9('0x24')},{'id':_0xc3c9('0x14'),'label':_0x3af8d2(_0x2757db,'Make\x20shorter'),'prompt':_0xc3c9('0x4')},{'id':_0xc3c9('0x4f'),'label':_0x3af8d2(_0x2757db,'Make\x20longer'),'prompt':_0xc3c9('0x15')},{'id':_0xc3c9('0x5'),'label':_0x3af8d2(_0x2757db,_0xc3c9('0x40')),'prompt':_0xc3c9('0x2d')}]},{'groupId':_0xc3c9('0x52'),'groupLabel':_0x3af8d2(_0x2757db,_0xc3c9('0xf')),'commands':[{'id':_0xc3c9('0x3c'),'label':_0x3af8d2(_0x2757db,_0xc3c9('0x43')),'prompt':_0xc3c9('0x50')},{'id':'continue','label':_0x3af8d2(_0x2757db,_0xc3c9('0x39')),'prompt':'Start\x20with\x20the\x20provided\x20content\x20and\x20write\x20at\x20the\x20end\x20of\x20it\x20continuing\x20this\x20topic.\x20Keep\x20the\x20added\x20part\x20short.'}]},{'groupId':_0xc3c9('0x2c'),'groupLabel':_0x3af8d2(_0x2757db,_0xc3c9('0x47')),'commands':[{'id':_0xc3c9('0xc'),'label':_0x3af8d2(_0x2757db,_0xc3c9('0x45')),'prompt':'Improve\x20using\x20polished,\x20formal,\x20and\x20respectful\x20language\x20to\x20convey\x20professional\x20expertise\x20and\x20competence.'},{'id':_0xc3c9('0x2f'),'label':_0x3af8d2(_0x2757db,_0xc3c9('0x7')),'prompt':'Improve\x20using\x20casual,\x20informal\x20language\x20to\x20convey\x20a\x20casual\x20conversation\x20with\x20a\x20real\x20person.'},{'id':'direct','label':_0x3af8d2(_0x2757db,'Direct'),'prompt':_0xc3c9('0x23')},{'id':_0xc3c9('0x1b'),'label':_0x3af8d2(_0x2757db,'Confident'),'prompt':_0xc3c9('0x26')},{'id':_0xc3c9('0x22'),'label':_0x3af8d2(_0x2757db,_0xc3c9('0x18')),'prompt':'Improve\x20using\x20friendly,\x20comforting\x20language,\x20to\x20convey\x20understanding\x20and\x20empathy.'}]},{'groupId':_0xc3c9('0x8'),'groupLabel':_0x3af8d2(_0x2757db,_0xc3c9('0x9')),'commands':[{'id':'business','label':_0x3af8d2(_0x2757db,'Business'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20business\x20professional\x20with\x20formal\x20language.'},{'id':_0xc3c9('0x4c'),'label':_0x3af8d2(_0x2757db,_0xc3c9('0x37')),'prompt':_0xc3c9('0xd')},{'id':'journalism','label':_0x3af8d2(_0x2757db,'Journalism'),'prompt':_0xc3c9('0x3e')},{'id':_0xc3c9('0x41'),'label':_0x3af8d2(_0x2757db,'Poetic'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20poem\x20using\x20poetic\x20techniques\x20without\x20losing\x20the\x20original\x20meaning.'}]},{'groupId':_0xc3c9('0x35'),'groupLabel':_0x3af8d2(_0x2757db,_0xc3c9('0x25')),'commands':[{'id':_0xc3c9('0x1a'),'label':_0x3af8d2(_0x2757db,_0xc3c9('0x0'),[_0x3af8d2(_0x2757db,_0xc3c9('0x44'))]),'prompt':'Translate\x20the\x20content\x20to\x20English\x20language.'},{'id':_0xc3c9('0x29'),'label':_0x3af8d2(_0x2757db,_0xc3c9('0x0'),[_0x3af8d2(_0x2757db,'Spanish')]),'prompt':_0xc3c9('0x31')},{'id':_0xc3c9('0x38'),'label':_0x3af8d2(_0x2757db,_0xc3c9('0x0'),[_0x3af8d2(_0x2757db,_0xc3c9('0x30'))]),'prompt':_0xc3c9('0x32')},{'id':_0xc3c9('0x1e'),'label':_0x3af8d2(_0x2757db,_0xc3c9('0x0'),[_0x3af8d2(_0x2757db,_0xc3c9('0x4d'))]),'prompt':_0xc3c9('0x4e')},{'id':_0xc3c9('0x16'),'label':_0x3af8d2(_0x2757db,_0xc3c9('0x0'),[_0x3af8d2(_0x2757db,'French')]),'prompt':_0xc3c9('0x2e')},{'id':_0xc3c9('0x17'),'label':_0x3af8d2(_0x2757db,_0xc3c9('0x0'),[_0x3af8d2(_0x2757db,_0xc3c9('0x3'))]),'prompt':'Translate\x20the\x20content\x20to\x20Simplified\x20Chinese\x20language.'},{'id':'translateHindi','label':_0x3af8d2(_0x2757db,_0xc3c9('0x0'),[_0x3af8d2(_0x2757db,'Hindi')]),'prompt':_0xc3c9('0x28')},{'id':'translateArabic','label':_0x3af8d2(_0x2757db,_0xc3c9('0x0'),[_0x3af8d2(_0x2757db,_0xc3c9('0x34'))]),'prompt':_0xc3c9('0x33')}]}];}
23
+ const _0x2eb4=['Improve\x20using\x20casual,\x20informal\x20language\x20to\x20convey\x20a\x20casual\x20conversation\x20with\x20a\x20real\x20person.','poetic','commands','concat','aiLicenseKeyTrialLimit:operations','Rewrite\x20this\x20content\x20as\x20a\x20poem\x20using\x20poetic\x20techniques\x20without\x20losing\x20the\x20original\x20meaning.','Start\x20with\x20the\x20provided\x20content\x20and\x20write\x20at\x20the\x20end\x20of\x20it\x20continuing\x20this\x20topic.\x20Keep\x20the\x20added\x20part\x20short.','generate','legal','French','find','Casual','Direct','Journalism','Spanish','_licenseKeyCheckInterval','Translate\x20the\x20content\x20to\x20German\x20language.','Poetic','Improve\x20using\x20compelling,\x20optimistic\x20language\x20to\x20convey\x20confidence\x20in\x20the\x20writing.','simplifyLanguage','Simplify\x20the\x20writing\x20style\x20of\x20this\x20content\x20and\x20reduce\x20the\x20complexity,\x20so\x20that\x20the\x20content\x20is\x20easy\x20to\x20understand.','Professional','Translate','casual','summarize','English','Translate\x20the\x20content\x20to\x20Simplified\x20Chinese\x20language.','Simplify\x20language','translateFrench','forEach','Change\x20tone','translate','Edit\x20or\x20review','Improve\x20using\x20friendly,\x20comforting\x20language,\x20to\x20convey\x20understanding\x20and\x20empathy.','ai-invalid-license-key','info','editor','filter','groupId','Friendly','aiLicenseKeyValid','aiLicenseKeyInvalid','set','licenseKey','Improve\x20using\x20polished,\x20formal,\x20and\x20respectful\x20language\x20to\x20convey\x20professional\x20expertise\x20and\x20competence.','ai.aiAssistant.removeCommands','Confident','Translate\x20to\x20%0','Arabic','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.','editOrReview','Translate\x20the\x20content\x20to\x20Arabic\x20language.','translatePortuguese','Rewrite\x20this\x20content\x20as\x20a\x20business\x20professional\x20with\x20formal\x20language.','Translate\x20the\x20content\x20to\x20English\x20language.','journalism','requires','changeStyle','ai.aiAssistant.commands','Hindi','AIAssistant','init','professional','ai-trial-license-key-reached-limit-changes','push','makeShorter','Simplified\x20Chinese','define','pluginName','aiLicenseKeyTrial','ai.aiAssistant.extraCommandGroups','Translate\x20the\x20content\x20to\x20Spanish\x20language.','Improve\x20using\x20direct\x20language,\x20using\x20only\x20the\x20essential\x20information.','Improve\x20this\x20content\x20by\x20using\x20descriptive\x20language\x20and\x20inserting\x20more\x20information\x20and\x20more\x20detailed\x20explanations.','Make\x20longer','Summarize','translateGerman','direct','get','Portuguese'];(function(_0x4bc897,_0x2eb445){const _0x33b738=function(_0x3933c8){while(--_0x3933c8){_0x4bc897['push'](_0x4bc897['shift']());}};_0x33b738(++_0x2eb445);}(_0x2eb4,0x1a2));const _0x33b7=function(_0x4bc897,_0x2eb445){_0x4bc897=_0x4bc897-0x0;let _0x33b738=_0x2eb4[_0x4bc897];return _0x33b738;};import{CKEditorError as _0x5835f3}from'ckeditor5/src/utils.js';import{Plugin as _0x1c75d9}from'ckeditor5/src/core.js';import _0x410b9c from'./aiassistantui.js';import _0x3c0372 from'./aiassistantediting.js';import{getTranslation as _0x11911c}from'./utils/common-translations.js';export default class r extends _0x1c75d9{static get[_0x33b7('0x26')](){return[_0x410b9c,_0x3c0372];}static get[_0x33b7('0x32')](){return _0x33b7('0x2a');}constructor(_0x1a5c20){super(_0x1a5c20);const _0x548130=_0x1a5c20['config'];_0x548130['define']('ai.aiAssistant.commands',getDefaultCommands(_0x1a5c20['locale'])),_0x548130['define'](_0x33b7('0x34'),[]),_0x548130[_0x33b7('0x31')](_0x33b7('0x1b'),[]);const _0x42df2e=_0x548130['get'](_0x33b7('0x28')),_0x4dae5b=_0x548130[_0x33b7('0x3c')](_0x33b7('0x34')),_0x81b0b0=_0x548130['get'](_0x33b7('0x1b'));_0x4dae5b[_0x33b7('0xb')](_0x4c1c12=>{const _0x367518=_0x42df2e[_0x33b7('0x48')](_0x350b8b=>_0x350b8b[_0x33b7('0x14')]===_0x4c1c12[_0x33b7('0x14')]);_0x367518?_0x367518[_0x33b7('0x40')]=_0x367518[_0x33b7('0x40')][_0x33b7('0x41')](_0x4c1c12[_0x33b7('0x40')]):_0x42df2e[_0x33b7('0x2e')](_0x4c1c12);}),_0x42df2e['forEach'](_0x4996d0=>{_0x4996d0['commands']=_0x4996d0[_0x33b7('0x40')][_0x33b7('0x13')](_0x302855=>!_0x81b0b0['includes'](_0x302855['id']));}),_0x548130[_0x33b7('0x18')](_0x33b7('0x28'),_0x42df2e);}[_0x33b7('0x2b')](){const _0x43aecf=this[_0x33b7('0x12')];this[_0x33b7('0x19')]=_0x43aecf['config'][_0x33b7('0x3c')](_0x33b7('0x19')),this[_0x33b7('0x4d')]=setInterval(()=>{let _0x2f6a9f;for(const _0x467947 in _0x43aecf){const _0x395d49=_0x467947,_0x231023=_0x43aecf[_0x395d49];if('aiLicenseKeyTrial'===_0x231023||_0x33b7('0x17')===_0x231023||_0x33b7('0x16')===_0x231023||'aiLicenseKeyTrialLimit:operations'===_0x231023){delete _0x43aecf[_0x395d49],_0x2f6a9f=_0x231023;break;}}if(_0x33b7('0x17')===_0x2f6a9f)throw clearInterval(this[_0x33b7('0x4d')]),new _0x5835f3(_0x33b7('0x10'),null);if(_0x33b7('0x33')===_0x2f6a9f&&console[_0x33b7('0x11')](_0x33b7('0x1f')),_0x33b7('0x42')===_0x2f6a9f)throw clearInterval(this[_0x33b7('0x4d')]),new _0x5835f3(_0x33b7('0x2d'),null);'aiLicenseKeyValid'===_0x2f6a9f&&clearInterval(this['_licenseKeyCheckInterval']);},0x3e8);}['destroy'](){this[_0x33b7('0x4d')]&&clearInterval(this[_0x33b7('0x4d')]);}}export function getDefaultCommands(_0x1040c3){return[{'groupId':_0x33b7('0x20'),'groupLabel':_0x11911c(_0x1040c3,_0x33b7('0xe')),'commands':[{'id':'improveWriting','label':_0x11911c(_0x1040c3,'Improve\x20writing'),'prompt':'Fix\x20spelling\x20mistakes,\x20use\x20proper\x20grammar\x20and\x20apply\x20good\x20writing\x20practices.\x20Do\x20not\x20lose\x20the\x20original\x20meaning.'},{'id':_0x33b7('0x2f'),'label':_0x11911c(_0x1040c3,'Make\x20shorter'),'prompt':'Remove\x20any\x20repetitive,\x20redundant,\x20or\x20non-essential\x20writing\x20in\x20this\x20content\x20without\x20changing\x20the\x20meaning\x20or\x20losing\x20any\x20key\x20information.'},{'id':'makeLonger','label':_0x11911c(_0x1040c3,_0x33b7('0x38')),'prompt':_0x33b7('0x37')},{'id':_0x33b7('0x1'),'label':_0x11911c(_0x1040c3,_0x33b7('0x9')),'prompt':_0x33b7('0x2')}]},{'groupId':_0x33b7('0x45'),'groupLabel':_0x11911c(_0x1040c3,'Generate\x20from\x20selection'),'commands':[{'id':_0x33b7('0x6'),'label':_0x11911c(_0x1040c3,_0x33b7('0x39')),'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':_0x11911c(_0x1040c3,'Continue'),'prompt':_0x33b7('0x44')}]},{'groupId':'changeTone','groupLabel':_0x11911c(_0x1040c3,_0x33b7('0xc')),'commands':[{'id':_0x33b7('0x2c'),'label':_0x11911c(_0x1040c3,_0x33b7('0x3')),'prompt':_0x33b7('0x1a')},{'id':_0x33b7('0x5'),'label':_0x11911c(_0x1040c3,_0x33b7('0x49')),'prompt':_0x33b7('0x3e')},{'id':_0x33b7('0x3b'),'label':_0x11911c(_0x1040c3,_0x33b7('0x4a')),'prompt':_0x33b7('0x36')},{'id':'confident','label':_0x11911c(_0x1040c3,_0x33b7('0x1c')),'prompt':_0x33b7('0x0')},{'id':'friendly','label':_0x11911c(_0x1040c3,_0x33b7('0x15')),'prompt':_0x33b7('0xf')}]},{'groupId':_0x33b7('0x27'),'groupLabel':_0x11911c(_0x1040c3,'Change\x20style'),'commands':[{'id':'business','label':_0x11911c(_0x1040c3,'Business'),'prompt':_0x33b7('0x23')},{'id':_0x33b7('0x46'),'label':_0x11911c(_0x1040c3,'Legal'),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20legal\x20professional\x20using\x20valid\x20legal\x20terminology.'},{'id':_0x33b7('0x25'),'label':_0x11911c(_0x1040c3,_0x33b7('0x4b')),'prompt':'Rewrite\x20this\x20content\x20as\x20a\x20journalist\x20using\x20engaging\x20language\x20to\x20convey\x20the\x20importance\x20of\x20the\x20information.'},{'id':_0x33b7('0x3f'),'label':_0x11911c(_0x1040c3,_0x33b7('0x4f')),'prompt':_0x33b7('0x43')}]},{'groupId':_0x33b7('0xd'),'groupLabel':_0x11911c(_0x1040c3,_0x33b7('0x4')),'commands':[{'id':'translateEnglish','label':_0x11911c(_0x1040c3,_0x33b7('0x1d'),[_0x11911c(_0x1040c3,_0x33b7('0x7'))]),'prompt':_0x33b7('0x24')},{'id':'translateSpanish','label':_0x11911c(_0x1040c3,_0x33b7('0x1d'),[_0x11911c(_0x1040c3,_0x33b7('0x4c'))]),'prompt':_0x33b7('0x35')},{'id':_0x33b7('0x22'),'label':_0x11911c(_0x1040c3,'Translate\x20to\x20%0',[_0x11911c(_0x1040c3,_0x33b7('0x3d'))]),'prompt':'Translate\x20the\x20content\x20to\x20Portuguese\x20language.'},{'id':_0x33b7('0x3a'),'label':_0x11911c(_0x1040c3,_0x33b7('0x1d'),[_0x11911c(_0x1040c3,'German')]),'prompt':_0x33b7('0x4e')},{'id':_0x33b7('0xa'),'label':_0x11911c(_0x1040c3,_0x33b7('0x1d'),[_0x11911c(_0x1040c3,_0x33b7('0x47'))]),'prompt':'Translate\x20the\x20content\x20to\x20French\x20language.'},{'id':'translateChinese','label':_0x11911c(_0x1040c3,_0x33b7('0x1d'),[_0x11911c(_0x1040c3,_0x33b7('0x30'))]),'prompt':_0x33b7('0x8')},{'id':'translateHindi','label':_0x11911c(_0x1040c3,_0x33b7('0x1d'),[_0x11911c(_0x1040c3,_0x33b7('0x29'))]),'prompt':'Translate\x20the\x20content\x20to\x20Hindi\x20language.'},{'id':'translateArabic','label':_0x11911c(_0x1040c3,_0x33b7('0x1d'),[_0x11911c(_0x1040c3,_0x33b7('0x1e'))]),'prompt':_0x33b7('0x21')}]}];}
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x3cbf=['model','editingDowncast','setSelection','conversion','isAtEnd','change','ck-fake-ai-selection_collapsed','createRange','length','push','isContent','ck-fake-ai-selection-candidate','document','canEditAt','pluginName','end','from','markers','has','insertContentBelow','ck-ai-assistant-ui_theme','selection','updateMarker','get','createSelection','hideFakeVisualSelection','editor','pop','schema','markerToElement','insertContent','span','addMarker','for','getLastMatchingPosition','markerToHighlight','createPositionAfter','start','ck-fake-ai-selection','getRange','data'];(function(_0x230c92,_0x3cbf32){const _0x16ac9d=function(_0x50d651){while(--_0x50d651){_0x230c92['push'](_0x230c92['shift']());}};_0x16ac9d(++_0x3cbf32);}(_0x3cbf,0xf7));const _0x16ac=function(_0x230c92,_0x3cbf32){_0x230c92=_0x230c92-0x0;let _0x16ac9d=_0x3cbf[_0x230c92];return _0x16ac9d;};import{Plugin as _0x3be077}from'ckeditor5/src/core.js';const s='ai-ui',c='ai-ui-candidate';export default class i extends _0x3be077{static get[_0x16ac('0xd')](){return'AIAssistantEditing';}['init'](){const {editor:_0x2c4484}=this,_0x197371=[_0x16ac('0x25')];_0x2c4484['config'][_0x16ac('0x16')]('ai.useTheme')&&_0x197371[_0x16ac('0x8')](_0x16ac('0x13')),_0x2c4484[_0x16ac('0x2')][_0x16ac('0x20')]('editingDowncast')[_0x16ac('0x22')]({'model':s,'view':{'classes':_0x197371}}),_0x2c4484[_0x16ac('0x2')][_0x16ac('0x20')](_0x16ac('0x0'))['markerToElement']({'model':s,'view':{'name':_0x16ac('0x1e'),'classes':[_0x16ac('0x25'),'ck-fake-ai-selection_collapsed']}}),_0x2c4484['conversion'][_0x16ac('0x20')](_0x16ac('0x0'))[_0x16ac('0x22')]({'model':c,'view':{'classes':[_0x16ac('0xa')]}}),_0x2c4484[_0x16ac('0x2')][_0x16ac('0x20')](_0x16ac('0x0'))[_0x16ac('0x1c')]({'model':c,'view':{'name':_0x16ac('0x1e'),'classes':[_0x16ac('0xa'),_0x16ac('0x5')]}});}['showFakeVisualSelection'](_0x32f47a){const _0x31f8ef=this[_0x16ac('0x19')][_0x16ac('0x28')],_0x189499=_0x32f47a?c:s;_0x31f8ef['change'](_0x28c27d=>{const _0x5bacce=_0x31f8ef[_0x16ac('0xb')][_0x16ac('0x14')]['getFirstRange']();if(_0x31f8ef['markers'][_0x16ac('0x11')](_0x189499))_0x28c27d[_0x16ac('0x15')](_0x189499,{'range':_0x5bacce});else{if(_0x5bacce[_0x16ac('0x24')][_0x16ac('0x3')]){const _0x582ea3=_0x5bacce['start'][_0x16ac('0x21')](({item:_0x55decc})=>!_0x31f8ef[_0x16ac('0x1b')][_0x16ac('0x9')](_0x55decc),{'boundaries':_0x5bacce});_0x28c27d[_0x16ac('0x1f')](_0x189499,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x28c27d[_0x16ac('0x6')](_0x582ea3,_0x5bacce[_0x16ac('0xe')])});}else _0x28c27d[_0x16ac('0x1f')](_0x189499,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x5bacce});}});}[_0x16ac('0x18')](_0x86e2e7){const _0x731c52=this[_0x16ac('0x19')][_0x16ac('0x28')],_0x479cb5=_0x86e2e7?c:s;_0x731c52[_0x16ac('0x10')][_0x16ac('0x11')](_0x479cb5)&&_0x731c52[_0x16ac('0x4')](_0x539dd1=>{_0x539dd1['removeMarker'](_0x479cb5);});}['insertContent'](_0x3b95e1,_0x55c941){const _0x242c88=_0x55c941||this[_0x16ac('0x19')][_0x16ac('0x28')]['markers'][_0x16ac('0x16')](s)[_0x16ac('0x26')]();if(!this[_0x16ac('0x19')][_0x16ac('0x28')][_0x16ac('0xc')](_0x242c88))return;const _0x348563=this[_0x16ac('0x19')][_0x16ac('0x27')]['processor']['toView'](_0x3b95e1),_0x28da89=this[_0x16ac('0x19')][_0x16ac('0x27')]['toModel'](_0x348563);this[_0x16ac('0x19')][_0x16ac('0x28')]['change'](_0x3ad387=>{this[_0x16ac('0x18')]();const _0x4f1b37=this[_0x16ac('0x19')][_0x16ac('0x28')][_0x16ac('0x1d')](_0x28da89,_0x242c88);_0x4f1b37&&_0x3ad387[_0x16ac('0x1')](_0x4f1b37);});}[_0x16ac('0x12')](_0x405ce0){const {model:_0x2f3a3f}=this[_0x16ac('0x19')],_0x35ea57=Array[_0x16ac('0xf')](_0x2f3a3f[_0x16ac('0x17')](this[_0x16ac('0x19')][_0x16ac('0x28')]['markers'][_0x16ac('0x16')](s)['getRange']())['getSelectedBlocks']()),_0x564812=_0x35ea57[_0x16ac('0x7')]?_0x2f3a3f[_0x16ac('0x23')](_0x35ea57[_0x16ac('0x1a')]()):_0x2f3a3f[_0x16ac('0xb')][_0x16ac('0x14')]['getLastPosition']();this[_0x16ac('0x1d')](_0x405ce0,_0x564812);}}
23
+ const _0x101d=['editor','isAtEnd','ai-ui','showFakeVisualSelection','selection','from','change','markers','schema','has','getSelectedBlocks','getRange','insertContent','markerToHighlight','insertContentBelow','toView','pop','data','updateMarker','span','addMarker','createPositionAfter','getFirstRange','hideFakeVisualSelection','model','ck-fake-ai-selection','isContent','getLastMatchingPosition','ai.useTheme','ck-fake-ai-selection-candidate','createSelection','createRange','get','for','editingDowncast','AIAssistantEditing','pluginName','ai-ui-candidate','push','markerToElement','length','processor','start','init','conversion'];(function(_0x47a853,_0x101db8){const _0x52c61d=function(_0x2ed923){while(--_0x2ed923){_0x47a853['push'](_0x47a853['shift']());}};_0x52c61d(++_0x101db8);}(_0x101d,0x76));const _0x52c6=function(_0x47a853,_0x101db8){_0x47a853=_0x47a853-0x0;let _0x52c61d=_0x101d[_0x47a853];return _0x52c61d;};import{Plugin as _0x1eb7d8}from'ckeditor5/src/core.js';const s=_0x52c6('0x13'),c=_0x52c6('0x9');export default class i extends _0x1eb7d8{static get[_0x52c6('0x8')](){return _0x52c6('0x7');}[_0x52c6('0xf')](){const {editor:_0x313e91}=this,_0x150435=[_0x52c6('0x2a')];_0x313e91['config'][_0x52c6('0x4')](_0x52c6('0x0'))&&_0x150435[_0x52c6('0xa')]('ck-ai-assistant-ui_theme'),_0x313e91[_0x52c6('0x10')][_0x52c6('0x5')](_0x52c6('0x6'))[_0x52c6('0x1e')]({'model':s,'view':{'classes':_0x150435}}),_0x313e91[_0x52c6('0x10')]['for'](_0x52c6('0x6'))[_0x52c6('0xb')]({'model':s,'view':{'name':_0x52c6('0x24'),'classes':[_0x52c6('0x2a'),'ck-fake-ai-selection_collapsed']}}),_0x313e91['conversion'][_0x52c6('0x5')](_0x52c6('0x6'))[_0x52c6('0x1e')]({'model':c,'view':{'classes':[_0x52c6('0x1')]}}),_0x313e91[_0x52c6('0x10')][_0x52c6('0x5')](_0x52c6('0x6'))['markerToElement']({'model':c,'view':{'name':_0x52c6('0x24'),'classes':[_0x52c6('0x1'),'ck-fake-ai-selection_collapsed']}});}[_0x52c6('0x14')](_0x112839){const _0x193610=this['editor']['model'],_0x8b9abf=_0x112839?c:s;_0x193610['change'](_0x10228e=>{const _0x19a897=_0x193610['document'][_0x52c6('0x15')][_0x52c6('0x27')]();if(_0x193610[_0x52c6('0x18')][_0x52c6('0x1a')](_0x8b9abf))_0x10228e[_0x52c6('0x23')](_0x8b9abf,{'range':_0x19a897});else{if(_0x19a897[_0x52c6('0xe')][_0x52c6('0x12')]){const _0x1fb7c4=_0x19a897[_0x52c6('0xe')][_0x52c6('0x2c')](({item:_0x7bf299})=>!_0x193610[_0x52c6('0x19')][_0x52c6('0x2b')](_0x7bf299),{'boundaries':_0x19a897});_0x10228e['addMarker'](_0x8b9abf,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x10228e[_0x52c6('0x3')](_0x1fb7c4,_0x19a897['end'])});}else _0x10228e[_0x52c6('0x25')](_0x8b9abf,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x19a897});}});}[_0x52c6('0x28')](_0x522c94){const _0x3d4d4c=this['editor']['model'],_0x5c30cc=_0x522c94?c:s;_0x3d4d4c[_0x52c6('0x18')][_0x52c6('0x1a')](_0x5c30cc)&&_0x3d4d4c['change'](_0x3c4333=>{_0x3c4333['removeMarker'](_0x5c30cc);});}[_0x52c6('0x1d')](_0x4f0b37,_0x189415){const _0xed9c41=_0x189415||this['editor'][_0x52c6('0x29')][_0x52c6('0x18')][_0x52c6('0x4')](s)['getRange']();if(!this['editor'][_0x52c6('0x29')]['canEditAt'](_0xed9c41))return;const _0x2f92af=this['editor'][_0x52c6('0x22')][_0x52c6('0xd')][_0x52c6('0x20')](_0x4f0b37),_0x3a7f30=this[_0x52c6('0x11')][_0x52c6('0x22')]['toModel'](_0x2f92af);this[_0x52c6('0x11')][_0x52c6('0x29')][_0x52c6('0x17')](_0x49ed6b=>{this[_0x52c6('0x28')]();const _0x47297c=this[_0x52c6('0x11')][_0x52c6('0x29')]['insertContent'](_0x3a7f30,_0xed9c41);_0x47297c&&_0x49ed6b['setSelection'](_0x47297c);});}[_0x52c6('0x1f')](_0x59f922){const {model:_0x1f8336}=this[_0x52c6('0x11')],_0x19d239=Array[_0x52c6('0x16')](_0x1f8336[_0x52c6('0x2')](this['editor'][_0x52c6('0x29')][_0x52c6('0x18')][_0x52c6('0x4')](s)[_0x52c6('0x1c')]())[_0x52c6('0x1b')]()),_0xc69376=_0x19d239[_0x52c6('0xc')]?_0x1f8336[_0x52c6('0x26')](_0x19d239[_0x52c6('0x21')]()):_0x1f8336['document'][_0x52c6('0x15')]['getLastPosition']();this[_0x52c6('0x1d')](_0x59f922,_0xc69376);}}