@ckeditor/ckeditor5-ai 0.0.0-nightly-20240423.0 → 0.0.0-nightly-20240424.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.
- package/build/ai.js +1 -1
- package/dist/index-content.css +4 -0
- package/dist/index-editor.css +267 -0
- package/dist/index.css +396 -0
- package/dist/index.js +23 -0
- package/dist/translations/af.d.ts +8 -0
- package/dist/translations/af.js +23 -0
- package/dist/translations/ar.d.ts +8 -0
- package/dist/translations/ar.js +23 -0
- package/dist/translations/bg.d.ts +8 -0
- package/dist/translations/bg.js +23 -0
- package/dist/translations/bn.d.ts +8 -0
- package/dist/translations/bn.js +23 -0
- package/dist/translations/bs.d.ts +8 -0
- package/dist/translations/bs.js +23 -0
- package/dist/translations/ca.d.ts +8 -0
- package/dist/translations/ca.js +23 -0
- package/dist/translations/cs.d.ts +8 -0
- package/dist/translations/cs.js +23 -0
- package/dist/translations/da.d.ts +8 -0
- package/dist/translations/da.js +23 -0
- package/dist/translations/de-ch.d.ts +8 -0
- package/dist/translations/de-ch.js +23 -0
- package/dist/translations/de.d.ts +8 -0
- package/dist/translations/de.js +23 -0
- package/dist/translations/el.d.ts +8 -0
- package/dist/translations/el.js +23 -0
- package/dist/translations/en-au.d.ts +8 -0
- package/dist/translations/en-au.js +23 -0
- package/dist/translations/en.d.ts +8 -0
- package/dist/translations/en.js +23 -0
- package/dist/translations/es-co.d.ts +8 -0
- package/dist/translations/es-co.js +23 -0
- package/dist/translations/es.d.ts +8 -0
- package/dist/translations/es.js +23 -0
- package/dist/translations/et.d.ts +8 -0
- package/dist/translations/et.js +23 -0
- package/dist/translations/fa.d.ts +8 -0
- package/dist/translations/fa.js +23 -0
- package/dist/translations/fi.d.ts +8 -0
- package/dist/translations/fi.js +23 -0
- package/dist/translations/fr.d.ts +8 -0
- package/dist/translations/fr.js +23 -0
- package/dist/translations/gl.d.ts +8 -0
- package/dist/translations/gl.js +23 -0
- package/dist/translations/he.d.ts +8 -0
- package/dist/translations/he.js +23 -0
- package/dist/translations/hi.d.ts +8 -0
- package/dist/translations/hi.js +23 -0
- package/dist/translations/hr.d.ts +8 -0
- package/dist/translations/hr.js +23 -0
- package/dist/translations/hu.d.ts +8 -0
- package/dist/translations/hu.js +23 -0
- package/dist/translations/id.d.ts +8 -0
- package/dist/translations/id.js +23 -0
- package/dist/translations/it.d.ts +8 -0
- package/dist/translations/it.js +23 -0
- package/dist/translations/ja.d.ts +8 -0
- package/dist/translations/ja.js +23 -0
- package/dist/translations/jv.d.ts +8 -0
- package/dist/translations/jv.js +23 -0
- package/dist/translations/ko.d.ts +8 -0
- package/dist/translations/ko.js +23 -0
- package/dist/translations/lt.d.ts +8 -0
- package/dist/translations/lt.js +23 -0
- package/dist/translations/lv.d.ts +8 -0
- package/dist/translations/lv.js +23 -0
- package/dist/translations/ms.d.ts +8 -0
- package/dist/translations/ms.js +23 -0
- package/dist/translations/nl.d.ts +8 -0
- package/dist/translations/nl.js +23 -0
- package/dist/translations/no.d.ts +8 -0
- package/dist/translations/no.js +23 -0
- package/dist/translations/pl.d.ts +8 -0
- package/dist/translations/pl.js +23 -0
- package/dist/translations/pt-br.d.ts +8 -0
- package/dist/translations/pt-br.js +23 -0
- package/dist/translations/pt.d.ts +8 -0
- package/dist/translations/pt.js +23 -0
- package/dist/translations/ro.d.ts +8 -0
- package/dist/translations/ro.js +23 -0
- package/dist/translations/ru.d.ts +8 -0
- package/dist/translations/ru.js +23 -0
- package/dist/translations/sk.d.ts +8 -0
- package/dist/translations/sk.js +23 -0
- package/dist/translations/sr-latn.d.ts +8 -0
- package/dist/translations/sr-latn.js +23 -0
- package/dist/translations/sr.d.ts +8 -0
- package/dist/translations/sr.js +23 -0
- package/dist/translations/sv.d.ts +8 -0
- package/dist/translations/sv.js +23 -0
- package/dist/translations/th.d.ts +8 -0
- package/dist/translations/th.js +23 -0
- package/dist/translations/tk.d.ts +8 -0
- package/dist/translations/tk.js +23 -0
- package/dist/translations/tr.d.ts +8 -0
- package/dist/translations/tr.js +23 -0
- package/dist/translations/ug.d.ts +8 -0
- package/dist/translations/ug.js +23 -0
- package/dist/translations/uk.d.ts +8 -0
- package/dist/translations/uk.js +23 -0
- package/dist/translations/ur.d.ts +8 -0
- package/dist/translations/ur.js +23 -0
- package/dist/translations/uz.d.ts +8 -0
- package/dist/translations/uz.js +23 -0
- package/dist/translations/vi.d.ts +8 -0
- package/dist/translations/vi.js +23 -0
- package/dist/translations/zh-cn.d.ts +8 -0
- package/dist/translations/zh-cn.js +23 -0
- package/dist/translations/zh.d.ts +8 -0
- package/dist/translations/zh.js +23 -0
- package/dist/types/adapters/aiadapter.d.ts +52 -0
- package/dist/types/adapters/aitextadapter.d.ts +150 -0
- package/dist/types/adapters/awstextadapter.d.ts +183 -0
- package/dist/types/adapters/openaitextadapter.d.ts +187 -0
- package/dist/types/aiassistant.d.ts +390 -0
- package/dist/types/aiassistantediting.d.ts +50 -0
- package/dist/types/aiassistantui.d.ts +57 -0
- package/dist/types/aiconfig.d.ts +73 -0
- package/dist/types/augmentation.d.ts +31 -0
- package/dist/types/index.d.ts +17 -0
- package/dist/types/ui/aiassistantcontroller.d.ts +113 -0
- package/dist/types/ui/dropdown/aicommandslistview.d.ts +37 -0
- package/dist/types/ui/dropdown/buttonlabelwithhighlightview.d.ts +33 -0
- package/dist/types/ui/dropdown/labelwithhighlightview.d.ts +29 -0
- package/dist/types/ui/form/aiformcontentarea.d.ts +52 -0
- package/dist/types/ui/form/aiformerrorview.d.ts +30 -0
- package/dist/types/ui/form/aiformpromptview.d.ts +50 -0
- package/dist/types/ui/form/aiformtoolbarview.d.ts +62 -0
- package/dist/types/ui/form/aiformview.d.ts +145 -0
- package/dist/types/ui/form/aihistorylistitemview.d.ts +22 -0
- package/dist/types/ui/form/aihistorylistview.d.ts +39 -0
- package/dist/types/ui/form/prompthistory.d.ts +24 -0
- package/dist/types/ui/showaiassistantcommand.d.ts +44 -0
- package/dist/types/utils/common-translations.d.ts +13 -0
- package/package.json +5 -4
- package/src/adapters/aiadapter.js +1 -1
- package/src/adapters/aitextadapter.js +1 -1
- package/src/adapters/awstextadapter.js +1 -1
- package/src/adapters/openaitextadapter.js +1 -1
- package/src/aiassistant.js +1 -1
- package/src/aiassistantediting.js +1 -1
- package/src/aiassistantui.js +1 -1
- package/src/index.js +1 -1
- package/src/ui/aiassistantcontroller.js +1 -1
- package/src/ui/dropdown/aicommandslistview.js +1 -1
- package/src/ui/dropdown/buttonlabelwithhighlightview.js +1 -1
- package/src/ui/dropdown/labelwithhighlightview.js +1 -1
- package/src/ui/form/aiformcontentarea.js +1 -1
- package/src/ui/form/aiformerrorview.js +1 -1
- package/src/ui/form/aiformpromptview.js +1 -1
- package/src/ui/form/aiformtoolbarview.js +1 -1
- package/src/ui/form/aiformview.js +1 -1
- package/src/ui/form/aihistorylistitemview.js +1 -1
- package/src/ui/form/aihistorylistview.js +1 -1
- package/src/ui/form/prompthistory.js +1 -1
- package/src/ui/showaiassistantcommand.js +1 -1
- package/src/utils/common-translations.js +1 -1
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module ai/ui/aihistorylistitemview
|
|
11
|
+
*/
|
|
12
|
+
import { ListItemView } from 'ckeditor5/src/ui.js';
|
|
13
|
+
import type { PromptHistoryEntry } from './prompthistory.js';
|
|
14
|
+
/**
|
|
15
|
+
* A list item view that displays a historical prompt
|
|
16
|
+
*/
|
|
17
|
+
export default class AIHistoryListItemView extends ListItemView {
|
|
18
|
+
/**
|
|
19
|
+
* @inheritDoc
|
|
20
|
+
*/
|
|
21
|
+
constructor(promptHistoryEntry: PromptHistoryEntry);
|
|
22
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module ai/ui/aihistorylistview
|
|
11
|
+
*/
|
|
12
|
+
import { ListView, ListItemGroupView, ButtonView, type FilteredView } from 'ckeditor5/src/ui.js';
|
|
13
|
+
import type { Locale } from 'ckeditor5/src/utils.js';
|
|
14
|
+
/**
|
|
15
|
+
* A list view that displays a list of AI prompts with filter pass-through.
|
|
16
|
+
*
|
|
17
|
+
* @private
|
|
18
|
+
*/
|
|
19
|
+
export default class AIHistoryListView extends ListView implements FilteredView {
|
|
20
|
+
historyGroupView: ListItemGroupView;
|
|
21
|
+
clearHistoryButton: ButtonView;
|
|
22
|
+
constructor(locale: Locale);
|
|
23
|
+
/**
|
|
24
|
+
* @inheritDoc
|
|
25
|
+
*/
|
|
26
|
+
filter(): {
|
|
27
|
+
resultsCount: number;
|
|
28
|
+
totalItemsCount: number;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Fired when the clear history button was executed by the user.
|
|
33
|
+
*
|
|
34
|
+
* @eventName ~AIHistoryListView#clearHistory
|
|
35
|
+
*/
|
|
36
|
+
export type AIHistoryListViewClearHistoryEvent = {
|
|
37
|
+
name: 'clearHistory';
|
|
38
|
+
args: [];
|
|
39
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
import { Collection } from 'ckeditor5/src/utils.js';
|
|
10
|
+
/**
|
|
11
|
+
* A collection that stores the prompt history in the session storage as a side effect.
|
|
12
|
+
*/
|
|
13
|
+
export default class PromptHistory extends Collection<PromptHistoryEntry> {
|
|
14
|
+
/**
|
|
15
|
+
* @inheritDoc
|
|
16
|
+
*/
|
|
17
|
+
constructor();
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* An object that represents a historical prompt.
|
|
21
|
+
*/
|
|
22
|
+
export type PromptHistoryEntry = {
|
|
23
|
+
prompt: string;
|
|
24
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module ai/ui/showaiassistantcommand
|
|
11
|
+
* @publicApi
|
|
12
|
+
*/
|
|
13
|
+
import { Command, type Editor } from 'ckeditor5/src/core.js';
|
|
14
|
+
import type { GroupDefinition } from '../aiassistant.js';
|
|
15
|
+
/**
|
|
16
|
+
* Command that shows the AI Assistant user interface.
|
|
17
|
+
*/
|
|
18
|
+
export default class ShowAIAssistantCommand extends Command {
|
|
19
|
+
/**
|
|
20
|
+
* An array with ids of the AI commands enabled for the current selection.
|
|
21
|
+
*
|
|
22
|
+
* @observable
|
|
23
|
+
*/
|
|
24
|
+
enabledCommandsIds: Array<string>;
|
|
25
|
+
/**
|
|
26
|
+
* Creates an instance of the command.
|
|
27
|
+
*/
|
|
28
|
+
constructor(editor: Editor, definitions?: Array<GroupDefinition>);
|
|
29
|
+
/**
|
|
30
|
+
* @inheritDoc
|
|
31
|
+
*/
|
|
32
|
+
refresh(): void;
|
|
33
|
+
/**
|
|
34
|
+
* Opens AI Assistant user interface for the current document selection.
|
|
35
|
+
*
|
|
36
|
+
* @param query The initial query. If set, the AI assistant will automatically submit given query to the AI service.
|
|
37
|
+
* @param label Label to be displayed in the AI assistant query input field while the AI assistant processes the initial query.
|
|
38
|
+
* @param actionId The id of the executed action. It can be used in extended and custom adapters to customize the request. It
|
|
39
|
+
* will be prefixed with `aiAssistant:`. See also
|
|
40
|
+
* {@link module:ai/adapters/aitextadapter~AITextAdapterRequestData#actionId `AITextAdapterRequestData#actionId`}.
|
|
41
|
+
* @fires execute
|
|
42
|
+
*/
|
|
43
|
+
execute(query?: string, label?: string, actionId?: string): void;
|
|
44
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* @module ai/utils/common-translations
|
|
11
|
+
*/
|
|
12
|
+
import type { Locale } from 'ckeditor5/src/utils.js';
|
|
13
|
+
export declare function getTranslation(locale: Locale, id: string, values?: string | Array<string> | number): string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-ai",
|
|
3
|
-
"version": "0.0.0-nightly-
|
|
3
|
+
"version": "0.0.0-nightly-20240424.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,15 +23,16 @@
|
|
|
23
23
|
"framework"
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"ckeditor5": "0.0.0-nightly-
|
|
27
|
-
"ckeditor5-collaboration": "0.0.0-nightly-
|
|
26
|
+
"ckeditor5": "0.0.0-nightly-20240424.0",
|
|
27
|
+
"ckeditor5-collaboration": "0.0.0-nightly-20240424.0",
|
|
28
28
|
"@aws-sdk/client-bedrock-runtime": "3.470.0",
|
|
29
|
-
"@ckeditor/ckeditor5-ui": "0.0.0-nightly-
|
|
29
|
+
"@ckeditor/ckeditor5-ui": "0.0.0-nightly-20240424.0",
|
|
30
30
|
"lodash-es": "4.17.21"
|
|
31
31
|
},
|
|
32
32
|
"type": "module",
|
|
33
33
|
"main": "src/index.js",
|
|
34
34
|
"files": [
|
|
35
|
+
"dist",
|
|
35
36
|
"lang",
|
|
36
37
|
"src/**/*.js",
|
|
37
38
|
"src/**/*.d.ts",
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
function _0x11e8(){var _0x20f65d=['afterInit','2613537eHuqvp','4511065QimfhP','1079463HgqEEu','48zSNPhT','name','pluginName','36LnbdSX','4nVSbPk','textAdapter','AIAdapter','2802ioGnvV','3850100NmTuRy','40209156hvbjQA','7124zhXdzh','248709yARlgl','aiadapter-text-adapter-not-set','AIRequestError','11sCxVco'];_0x11e8=function(){return _0x20f65d;};return _0x11e8();}var _0x140a45=_0x5de9;function _0x5de9(_0x25bbcb,_0x2ccf31){var _0x11e8f5=_0x11e8();return _0x5de9=function(_0x5de9c4,_0x5db7b6){_0x5de9c4=_0x5de9c4-0x169;var _0x4d8b7a=_0x11e8f5[_0x5de9c4];return _0x4d8b7a;},_0x5de9(_0x25bbcb,_0x2ccf31);}(function(_0x11ab41,_0x445ed5){var _0x2face6=_0x5de9,_0x4bb99b=_0x11ab41();while(!![]){try{var _0x1cef60=parseInt(_0x2face6(0x16f))/0x1*(parseInt(_0x2face6(0x17b))/0x2)+-parseInt(_0x2face6(0x16b))/0x3*(-parseInt(_0x2face6(0x16e))/0x4)+parseInt(_0x2face6(0x175))/0x5+-parseInt(_0x2face6(0x17a))/0x6*(parseInt(_0x2face6(0x176))/0x7)+parseInt(_0x2face6(0x177))/0x8*(parseInt(_0x2face6(0x174))/0x9)+parseInt(_0x2face6(0x16c))/0xa+-parseInt(_0x2face6(0x172))/0xb*(parseInt(_0x2face6(0x16d))/0xc);if(_0x1cef60===_0x445ed5)break;else _0x4bb99b['push'](_0x4bb99b['shift']());}catch(_0x55056d){_0x4bb99b['push'](_0x4bb99b['shift']());}}}(_0x11e8,0xdf404));import{Plugin as _0x2d5194}from'ckeditor5/src/core.js';import{CKEditorError as _0x472b5d}from'ckeditor5/src/utils.js';export default class y extends _0x2d5194{static get[_0x140a45(0x179)](){var _0x1c10ad=_0x140a45;return _0x1c10ad(0x16a);}[_0x140a45(0x173)](){var _0x52cafc=_0x140a45;if(!this[_0x52cafc(0x169)])throw new _0x472b5d(_0x52cafc(0x170),null);}}export class AIRequestError extends Error{constructor(_0x16257e){var _0x1c2afa=_0x140a45;super(_0x16257e),this[_0x1c2afa(0x178)]=_0x1c2afa(0x171);}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x40bc45=_0x3837;(function(_0x45e84e,_0x2087ca){const _0x284a7c=_0x3837,_0x4b43bb=_0x45e84e();while(!![]){try{const _0x1c3e44=-parseInt(_0x284a7c(0x1b4))/0x1+-parseInt(_0x284a7c(0x1a8))/0x2+parseInt(_0x284a7c(0x1b9))/0x3*(parseInt(_0x284a7c(0x1a3))/0x4)+parseInt(_0x284a7c(0x1a1))/0x5+parseInt(_0x284a7c(0x1ba))/0x6+-parseInt(_0x284a7c(0x1c2))/0x7+-parseInt(_0x284a7c(0x1a7))/0x8*(parseInt(_0x284a7c(0x1ae))/0x9);if(_0x1c3e44===_0x2087ca)break;else _0x4b43bb['push'](_0x4b43bb['shift']());}catch(_0x53198a){_0x4b43bb['push'](_0x4b43bb['shift']());}}}(_0x2078,0xd557a));import{Plugin as _0x1b00e1}from'ckeditor5/src/core.js';import{CKEditorError as _0x328f84}from'ckeditor5/src/utils.js';import{default as _0x1ce432,AIRequestError as _0x4ecfa5}from'./aiadapter.js';function _0x3837(_0x1ad94b,_0xb7a066){const _0x207849=_0x2078();return _0x3837=function(_0x3837e6,_0x2650cb){_0x3837e6=_0x3837e6-0x1a1;let _0x166af6=_0x207849[_0x3837e6];return _0x166af6;},_0x3837(_0x1ad94b,_0xb7a066);}function _0x2078(){const _0x293316=['get','plugins','editor','sendRequest','error','_prepareRequestHeaders','5004258EdWpkj','name','reject','4639905EZRsXQ','AI_ERROR_GET_PARAMETERS','746972PlpuQP','AbortError','init','aborted','11432LNvaXl','2876494DCpADS','catch','object','AI_ERROR_GET_HEADERS','resolve','locale','243YUHmpV','assign','abortController','textAdapter','application/json','aitextadapter-send-request-failed','320850WeTHGE','requires','abort','_prepareRequestParameters','makeRequest','15hmuMOL','9148368rxJygY','signal'];_0x2078=function(){return _0x293316;};return _0x2078();}import{getTranslation as _0x5abf65}from'../utils/common-translations.js';export default class P extends _0x1b00e1{static get[_0x40bc45(0x1b5)](){return[_0x1ce432];}constructor(_0x1cbb07){const _0x54f582=_0x40bc45;super(_0x1cbb07),this[_0x54f582(0x1b0)]=new AbortController();}[_0x40bc45(0x1a5)](){const _0x569cc5=_0x40bc45;this[_0x569cc5(0x1be)][_0x569cc5(0x1bd)][_0x569cc5(0x1bc)](_0x1ce432)[_0x569cc5(0x1b1)]=this;}[_0x40bc45(0x1b6)](){const _0x15f148=_0x40bc45;this[_0x15f148(0x1b0)][_0x15f148(0x1bb)][_0x15f148(0x1a6)]||(this[_0x15f148(0x1b0)][_0x15f148(0x1b6)](),this[_0x15f148(0x1b0)]=new AbortController());}async[_0x40bc45(0x1b8)](_0x3564d7){const _0x1c6615=_0x40bc45;return this[_0x1c6615(0x1bf)](_0x3564d7)[_0x1c6615(0x1a9)](_0x5ce228=>{const _0x45db29=_0x1c6615;if(_0x5ce228 instanceof _0x4ecfa5)return Promise[_0x45db29(0x1c4)](_0x5ce228);if(_0x45db29(0x1a4)==_0x5ce228[_0x45db29(0x1c3)])return Promise[_0x45db29(0x1ac)]();throw console[_0x45db29(0x1c0)](_0x5ce228),new _0x328f84(_0x45db29(0x1b3),null);});}async[_0x40bc45(0x1c1)](_0x340ebe,_0x230944){const _0x35ef31=_0x40bc45,_0x44379e=this[_0x35ef31(0x1be)][_0x35ef31(0x1ad)],_0x4fb9c5={'Content-Type':_0x35ef31(0x1b2)};if(_0x35ef31(0x1aa)==typeof _0x340ebe)Object[_0x35ef31(0x1af)](_0x4fb9c5,_0x340ebe);else{if(_0x340ebe)try{const _0x5d7a9f=await _0x340ebe(_0x230944);Object[_0x35ef31(0x1af)](_0x4fb9c5,_0x5d7a9f);}catch(_0x275b05){return Promise[_0x35ef31(0x1c4)](new _0x4ecfa5(_0x5abf65(_0x44379e,_0x35ef31(0x1ab))));}}return _0x4fb9c5;}async[_0x40bc45(0x1b7)](_0x44f74d,_0x48509c){const _0x1e2dda=_0x40bc45,_0x129e8b=this[_0x1e2dda(0x1be)][_0x1e2dda(0x1ad)];if(_0x1e2dda(0x1aa)==typeof _0x44f74d)return _0x44f74d;try{return await _0x44f74d(_0x48509c);}catch(_0x38bd7a){return Promise[_0x1e2dda(0x1c4)](new _0x4ecfa5(_0x5abf65(_0x129e8b,_0x1e2dda(0x1a2))));}}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x16eb5c=_0x123e;(function(_0x87ee84,_0x317fb3){const _0x164565=_0x123e,_0x5c7cd5=_0x87ee84();while(!![]){try{const _0x50d131=parseInt(_0x164565(0xe2))/0x1*(-parseInt(_0x164565(0x10b))/0x2)+-parseInt(_0x164565(0x10d))/0x3+-parseInt(_0x164565(0xff))/0x4*(parseInt(_0x164565(0xda))/0x5)+parseInt(_0x164565(0x106))/0x6+-parseInt(_0x164565(0xd3))/0x7*(-parseInt(_0x164565(0xfd))/0x8)+parseInt(_0x164565(0xd0))/0x9*(parseInt(_0x164565(0xf5))/0xa)+parseInt(_0x164565(0xf6))/0xb*(parseInt(_0x164565(0xdb))/0xc);if(_0x50d131===_0x317fb3)break;else _0x5c7cd5['push'](_0x5c7cd5['shift']());}catch(_0x201f0d){_0x5c7cd5['push'](_0x5c7cd5['shift']());}}}(_0x353b,0x93df5));function _0x123e(_0x126f20,_0x530eb1){const _0x353b9e=_0x353b();return _0x123e=function(_0x123ec0,_0x10b64f){_0x123ec0=_0x123ec0-0xcf;let _0x3cc640=_0x353b9e[_0x123ec0];return _0x3cc640;},_0x123e(_0x126f20,_0x530eb1);}function _0x353b(){const _0xed09c8=['chunk','_getGeneratedText','18gJQiPD','resolve','generation','235109tUUpbn','toString','\x0a[/INST]','_processProxyRequest','test','Human:\x0a','anthropic.claude-v2','10ldcmAG','12757536sebqKD','meta.llama','\x0a<</SYS>>\x0a[INST]\x0a','POST','get','ai.aws.requestHeaders','_bedrockClientConfig','29566wburEA','generations','anthropic.claude','_prepareRequestHeaders','json','decode','bytes','_requestHeaders','<<SYS>>\x0a','ai.aws.apiUrl','sendRequest','data','Instruction:\x0a','filter','length','editor','ai.aws.requestParameters','signal','_readAsyncIterableResponse','5312350DIlVUU','11VLeqmS','_processAWSRequest','getReader','completion','locale','parse','\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a','24Yxmvit','config','1823132IdRQxb','split','AWSTextAdapter','\x0a\x0aAssistant:','from','utf-8','body','1211490YrWIXC','AI_ERROR_UNSUPPORTED_MODEL','text','application/json','completions','56WSGLVy','_readStreamableResponse','249525dQGADz','_readStaticResponse','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.','_requestParameters','ai21.j2','ai.aws.bedrockClientConfig','_apiUrl','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.','bedrock-2023-05-31','getModelFamily','pluginName','join','preparePrompt','send','cohere.command','utf8','map','read','_prepareRequestParameters','stringify','abortController','define'];_0x353b=function(){return _0xed09c8;};return _0x353b();}import{default as _0x4d2cd3}from'./aitextadapter.js';import{AIRequestError as _0x1abdcc}from'./aiadapter.js';import{BedrockRuntimeClient as _0xbfbc80,InvokeModelCommand as _0x270884,InvokeModelWithResponseStreamCommand as _0xa71971}from'@aws-sdk/client-bedrock-runtime';import{getTranslation as _0x388cfe}from'../utils/common-translations.js';export default class J extends _0x4d2cd3{static get[_0x16eb5c(0x117)](){const _0x558199=_0x16eb5c;return _0x558199(0x101);}constructor(_0x14e8a9){const _0x44ad7e=_0x16eb5c;super(_0x14e8a9),_0x14e8a9[_0x44ad7e(0xfe)][_0x44ad7e(0xdf)](_0x44ad7e(0xf2))||_0x14e8a9[_0x44ad7e(0xfe)][_0x44ad7e(0x122)](_0x44ad7e(0xf2),{'model':_0x44ad7e(0xd9),'max_tokens_to_sample':0x7d0,'temperature':0x1,'top_p':0x1,'top_k':0xfa,'anthropic_version':_0x44ad7e(0x115),'stream':!0x0}),this[_0x44ad7e(0x113)]=_0x14e8a9[_0x44ad7e(0xfe)][_0x44ad7e(0xdf)](_0x44ad7e(0xeb)),this[_0x44ad7e(0xe1)]=_0x14e8a9[_0x44ad7e(0xfe)][_0x44ad7e(0xdf)](_0x44ad7e(0x112)),this[_0x44ad7e(0xe9)]=_0x14e8a9[_0x44ad7e(0xfe)][_0x44ad7e(0xdf)](_0x44ad7e(0xe0)),this[_0x44ad7e(0x110)]=_0x14e8a9[_0x44ad7e(0xfe)][_0x44ad7e(0xdf)](_0x44ad7e(0xf2));}async[_0x16eb5c(0xec)]({query:_0x49513f,context:_0x263616,onData:_0x4ba5f1,actionId:_0x1cef4a}){const _0x5011f1=_0x16eb5c,{model:_0x103687,stream:_0x39d2f2,..._0x3d77ae}=await this[_0x5011f1(0x11f)](this[_0x5011f1(0x110)],_0x1cef4a),_0x3bcaf8={'prompt':await this[_0x5011f1(0x119)](_0x49513f,_0x263616,_0x103687,_0x1cef4a),..._0x3d77ae};this[_0x5011f1(0x113)]?await this[_0x5011f1(0xd6)](_0x3bcaf8,_0x103687,_0x39d2f2,_0x4ba5f1,_0x1cef4a):await this[_0x5011f1(0xf7)](_0x3bcaf8,_0x103687,_0x39d2f2,_0x4ba5f1);}async[_0x16eb5c(0x119)](_0x2d139d,_0x424c5d,_0x3df18b,_0x14ac95){const _0x553bf3=_0x16eb5c;let _0x7c3756,_0xe9066d;return _0x424c5d?(_0x7c3756=_0x553bf3(0x10f),_0xe9066d=_0x553bf3(0xee)+_0x2d139d+_0x553bf3(0xfc)+_0x424c5d):(_0x7c3756=_0x553bf3(0x114),_0xe9066d=_0x2d139d),_0x553bf3(0xdc)==this[_0x553bf3(0x116)](_0x3df18b)?_0x553bf3(0xea)+_0x7c3756+_0x553bf3(0xdd)+_0xe9066d+_0x553bf3(0xd5):_0x553bf3(0xd8)+_0x7c3756+'\x0a'+_0xe9066d+_0x553bf3(0x102);}[_0x16eb5c(0x116)](_0x147192){const _0xa4771e=_0x16eb5c;if(/^anthropic\.claude/[_0xa4771e(0xd7)](_0x147192))return _0xa4771e(0xe4);if(/^ai21\.j2/[_0xa4771e(0xd7)](_0x147192))return _0xa4771e(0x111);if(/^cohere\.command/[_0xa4771e(0xd7)](_0x147192))return _0xa4771e(0x11b);if(/^meta\.llama/[_0xa4771e(0xd7)](_0x147192))return _0xa4771e(0xdc);throw new _0x1abdcc(_0x388cfe(this[_0xa4771e(0xf1)][_0xa4771e(0xfa)],_0xa4771e(0x107),_0x147192));}async[_0x16eb5c(0xd6)](_0x2d452d,_0x23fc6c,_0x29cfb4,_0x544e48,_0x179d4a){const _0x4db9a7=_0x16eb5c,_0x3ea71b={'method':_0x4db9a7(0xde),'headers':await this[_0x4db9a7(0xe5)](this[_0x4db9a7(0xe9)],_0x179d4a),'body':JSON[_0x4db9a7(0x120)]({..._0x2d452d,'model':_0x23fc6c,'stream':_0x29cfb4}),'signal':this[_0x4db9a7(0x121)][_0x4db9a7(0xf3)]},_0x10dbf1=await fetch(this[_0x4db9a7(0x113)],_0x3ea71b);_0x29cfb4?await this[_0x4db9a7(0x10c)](_0x10dbf1,_0x23fc6c,_0x544e48):await this[_0x4db9a7(0x10e)](_0x10dbf1,_0x23fc6c,_0x544e48);}async[_0x16eb5c(0xf7)](_0x4f56e1,_0x13c950,_0x376636,_0x2bce40){const _0x2a233d=_0x16eb5c,_0x5ee99d=new _0xbfbc80(this[_0x2a233d(0xe1)]),_0x397702={'body':JSON[_0x2a233d(0x120)](_0x4f56e1),'contentType':_0x2a233d(0x109),'accept':_0x2a233d(0x109),'modelId':_0x13c950};let _0x7298da;if(_0x376636){const _0x30f00b=new _0xa71971(_0x397702);_0x7298da=await _0x5ee99d[_0x2a233d(0x11a)](_0x30f00b,{'abortSignal':this[_0x2a233d(0x121)][_0x2a233d(0xf3)]}),await this[_0x2a233d(0xf4)](_0x7298da,_0x13c950,_0x2bce40);}else{const _0x58296d=new _0x270884(_0x397702);_0x7298da=await _0x5ee99d[_0x2a233d(0x11a)](_0x58296d,{'abortSignal':this[_0x2a233d(0x121)][_0x2a233d(0xf3)]}),await this[_0x2a233d(0x10e)](_0x7298da,_0x13c950,_0x2bce40);}}async[_0x16eb5c(0xf4)](_0x50236a,_0xc6ab38,_0x2abaf2){const _0x4f26df=_0x16eb5c,_0xcdbd6a=_0x50236a[_0x4f26df(0x105)],_0x30c140=new TextDecoder(_0x4f26df(0x104));let _0x2581cb='';for await(const _0x3326ea of _0xcdbd6a)if(_0x3326ea[_0x4f26df(0x123)]){const _0x126820=_0x30c140[_0x4f26df(0xe7)](_0x3326ea[_0x4f26df(0x123)][_0x4f26df(0xe8)]),_0x51bd72=JSON[_0x4f26df(0xfb)](_0x126820);_0x2581cb+=this[_0x4f26df(0xcf)](_0x51bd72,_0xc6ab38),_0x2abaf2(_0x2581cb);}return Promise[_0x4f26df(0xd1)]();}async[_0x16eb5c(0x10c)](_0x2c1cc1,_0x524285,_0x17ba43){const _0x2980f0=_0x16eb5c,_0x17f86b=_0x2c1cc1[_0x2980f0(0x105)],_0xccb825=new TextDecoder(_0x2980f0(0x104)),_0x1846ce=_0x17f86b[_0x2980f0(0xf8)]();let _0x316d8a='',_0x30cefa='',_0x52e634=!0x1;for(;!_0x52e634;){const {done:_0x440004,value:_0x40d6f5}=await _0x1846ce[_0x2980f0(0x11e)]();if(_0x52e634=_0x440004,_0x52e634)break;const _0x32887e=(_0x316d8a+_0xccb825[_0x2980f0(0xe7)](_0x40d6f5))[_0x2980f0(0x100)]('\x0a')[_0x2980f0(0x11d)](_0x4305b9=>{const _0x1683e0=_0x2980f0;try{return _0x316d8a='',JSON[_0x1683e0(0xfb)](_0x4305b9);}catch(_0x20ec7f){return _0x316d8a=_0x4305b9,null;}})[_0x2980f0(0xef)](_0x14338c=>null!==_0x14338c);_0x32887e[_0x2980f0(0xf0)]&&(_0x30cefa+=_0x32887e[_0x2980f0(0x11d)](_0x4f20d8=>this[_0x2980f0(0xcf)](_0x4f20d8,_0x524285))[_0x2980f0(0x118)](''),_0x17ba43(_0x30cefa));}return Promise[_0x2980f0(0xd1)]();}async[_0x16eb5c(0x10e)](_0x2ef731,_0x1e7e39,_0x29a56d){const _0x3c04d5=_0x16eb5c;let _0x81ae78;return _0x81ae78=_0x2ef731 instanceof Response?await _0x2ef731[_0x3c04d5(0xe6)]():JSON[_0x3c04d5(0xfb)](Buffer[_0x3c04d5(0x103)](_0x2ef731[_0x3c04d5(0x105)])[_0x3c04d5(0xd4)](_0x3c04d5(0x11c))),(_0x29a56d(this[_0x3c04d5(0xcf)](_0x81ae78,_0x1e7e39)),Promise[_0x3c04d5(0xd1)]());}[_0x16eb5c(0xcf)](_0x26b5fe,_0x5217cf){const _0x563173=_0x16eb5c;switch(this[_0x563173(0x116)](_0x5217cf)){case _0x563173(0xe4):return _0x26b5fe[_0x563173(0xf9)];case _0x563173(0x111):return _0x26b5fe[_0x563173(0x10a)][0x0][_0x563173(0xed)][_0x563173(0x108)];case _0x563173(0x11b):return _0x26b5fe[_0x563173(0xe3)][0x0][_0x563173(0x108)];case _0x563173(0xdc):return _0x26b5fe[_0x563173(0xd2)];}}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
function
|
|
23
|
+
const _0x38fca9=_0xb984;function _0xb984(_0x1749f3,_0x592c4b){const _0xf56ade=_0xf56a();return _0xb984=function(_0xb984af,_0x33975e){_0xb984af=_0xb984af-0x1c1;let _0x6e000c=_0xf56ade[_0xb984af];return _0x6e000c;},_0xb984(_0x1749f3,_0x592c4b);}(function(_0x26f3a5,_0x2fd49e){const _0x143c7b=_0xb984,_0x5e51bf=_0x26f3a5();while(!![]){try{const _0x27b9d8=-parseInt(_0x143c7b(0x1fe))/0x1*(-parseInt(_0x143c7b(0x1c6))/0x2)+parseInt(_0x143c7b(0x1c3))/0x3*(parseInt(_0x143c7b(0x1fc))/0x4)+parseInt(_0x143c7b(0x1f5))/0x5+-parseInt(_0x143c7b(0x1e4))/0x6*(parseInt(_0x143c7b(0x1d6))/0x7)+-parseInt(_0x143c7b(0x1d2))/0x8+-parseInt(_0x143c7b(0x1c8))/0x9*(parseInt(_0x143c7b(0x204))/0xa)+parseInt(_0x143c7b(0x1e5))/0xb*(parseInt(_0x143c7b(0x1d0))/0xc);if(_0x27b9d8===_0x2fd49e)break;else _0x5e51bf['push'](_0x5e51bf['shift']());}catch(_0x3d90f6){_0x5e51bf['push'](_0x5e51bf['shift']());}}}(_0xf56a,0xa56c4));import{default as _0x369aab}from'./aitextadapter.js';import{AIRequestError as _0x4367a1}from'./aiadapter.js';function _0xf56a(){const _0x593bc8=['body','system','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.','editor','\x0aYou\x20must\x20keep\x20the\x20text\x20formatting.\x0a\x0aContent:\x0a','POST','2396732bkYSZh','sendRequest','131639XzjmMt','ai.openAI.apiUrl','stream','read','locale','ai.openAI.requestParameters','20DoBYix','config','includes','gpt-3.5-turbo','OpenAITextAdapter','context_length_exceeded','json','6LDgtvd','abortController','_prepareRequestParameters','18ybQlpe','getReader','5397291jBOGXi','text','parse','decode','resolve','_readStreamableResponse','get','_apiUrl','24YbuAoM','_prepareRequestHeaders','5546584OifOWa','_readStaticResponse','stringify','message','3665347pmssQY','filter','map','reject','_cleanUpData','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.','data:\x20','_isBufferIncomplete','Instruction:\x0a','delta','content','replace','split','_requestHeaders','12ZobUdE','6203582BhMhHf','user','pluginName','join','define','signal','_requestParameters','choices','Moderation','[DONE]','length','AI_ERROR_MODERATION','https://api.openai.com/v1/chat/completions','ai.openAI.requestHeaders','AI_ERROR_CONTEXT_LENGTH','prepareMessages','532470VTkBrg'];_0xf56a=function(){return _0x593bc8;};return _0xf56a();}import{getTranslation as _0x1edb08}from'../utils/common-translations.js';export default class F extends _0x369aab{static get[_0x38fca9(0x1e7)](){const _0x2bba4b=_0x38fca9;return _0x2bba4b(0x208);}constructor(_0x108d0){const _0x2d1380=_0x38fca9;super(_0x108d0),_0x108d0[_0x2d1380(0x205)][_0x2d1380(0x1e9)](_0x2d1380(0x1ff),_0x2d1380(0x1f1)),_0x108d0[_0x2d1380(0x205)][_0x2d1380(0x1ce)](_0x2d1380(0x203))||_0x108d0[_0x2d1380(0x205)][_0x2d1380(0x1e9)](_0x2d1380(0x203),{'model':_0x2d1380(0x207),'max_tokens':0x7d0,'temperature':0x1,'top_p':0x1,'stream':!0x0}),this[_0x2d1380(0x1cf)]=_0x108d0[_0x2d1380(0x205)][_0x2d1380(0x1ce)](_0x2d1380(0x1ff)),this[_0x2d1380(0x1e3)]=_0x108d0[_0x2d1380(0x205)][_0x2d1380(0x1ce)](_0x2d1380(0x1f2))||{},this[_0x2d1380(0x1eb)]=_0x108d0[_0x2d1380(0x205)][_0x2d1380(0x1ce)](_0x2d1380(0x203));}async[_0x38fca9(0x1fd)]({query:_0xdfe630,context:_0x3086f9,onData:_0x4cf272,actionId:_0x11c59f}){const _0x306a30=_0x38fca9,_0x8b1dcb=this[_0x306a30(0x1f9)][_0x306a30(0x202)],_0x39eaf4=await this[_0x306a30(0x1f4)](_0xdfe630,_0x3086f9,_0x11c59f),_0x21dff9=await this[_0x306a30(0x1d1)](this[_0x306a30(0x1e3)],_0x11c59f),_0x2f63d4=await this[_0x306a30(0x1c5)](this[_0x306a30(0x1eb)],_0x11c59f),_0x1219a0={'messages':_0x39eaf4,..._0x2f63d4},_0x4ee125={'method':_0x306a30(0x1fb),'headers':_0x21dff9,'body':JSON[_0x306a30(0x1d4)](_0x1219a0),'signal':this[_0x306a30(0x1c4)][_0x306a30(0x1ea)]},_0x4951d5=await fetch(this[_0x306a30(0x1cf)],_0x4ee125);if(_0x4951d5['ok'])return _0x2f63d4[_0x306a30(0x200)]?await this[_0x306a30(0x1cd)](_0x4951d5,_0x4cf272):await this[_0x306a30(0x1d3)](_0x4951d5,_0x4cf272),Promise[_0x306a30(0x1cc)]();{const _0x336ce2=await _0x4951d5[_0x306a30(0x1c9)]();return _0x336ce2[_0x306a30(0x206)](_0x306a30(0x1c1))?Promise[_0x306a30(0x1d9)](new _0x4367a1(_0x1edb08(_0x8b1dcb,_0x306a30(0x1f3)))):_0x336ce2[_0x306a30(0x206)](_0x306a30(0x1ed))?Promise[_0x306a30(0x1d9)](new _0x4367a1(_0x1edb08(_0x8b1dcb,_0x306a30(0x1f0)))):Promise[_0x306a30(0x1d9)](new Error(_0x336ce2));}}async[_0x38fca9(0x1f4)](_0x4f4a5c,_0x17f782,_0x1f56ce){const _0x292f2c=_0x38fca9;let _0x547af0,_0x617de4;return _0x17f782?(_0x547af0=_0x292f2c(0x1f8),_0x617de4=_0x292f2c(0x1de)+_0x4f4a5c+_0x292f2c(0x1fa)+_0x17f782):(_0x547af0=_0x292f2c(0x1db),_0x617de4=_0x4f4a5c),[{'role':_0x292f2c(0x1f7),'content':_0x547af0},{'role':_0x292f2c(0x1e6),'content':_0x617de4}];}async[_0x38fca9(0x1cd)](_0xc0ae92,_0x460163){const _0x417cea=_0x38fca9,_0x1d1caf=_0xc0ae92[_0x417cea(0x1f6)][_0x417cea(0x1c7)](),_0x321a08=new TextDecoder();let _0x502028='',_0xb9a1='',_0x516b6e='',_0x20b192=!0x1;for(;!_0x20b192;){const {done:_0x7ffa1f,value:_0x541440}=await _0x1d1caf[_0x417cea(0x201)](),_0x577582=_0x502028+_0x321a08[_0x417cea(0x1cb)](_0x541440);let _0x5d5462='';_0x20b192=_0x7ffa1f;try{_0x5d5462=this[_0x417cea(0x1da)](_0x577582),_0x502028='';}catch(_0x142e58){_0x502028=_0x577582;continue;}_0xb9a1+=_0x5d5462,!_0x20b192&&this[_0x417cea(0x1dd)](_0xb9a1)||_0xb9a1&&(_0x516b6e+=_0xb9a1,_0xb9a1='',_0x460163(_0x516b6e));}return Promise[_0x417cea(0x1cc)]();}async[_0x38fca9(0x1d3)](_0x56b86d,_0x3e71a9){const _0x4d60cd=_0x38fca9;return _0x3e71a9((await _0x56b86d[_0x4d60cd(0x1c2)]())[_0x4d60cd(0x1ec)][0x0][_0x4d60cd(0x1d5)][_0x4d60cd(0x1e0)]),Promise[_0x4d60cd(0x1cc)]();}[_0x38fca9(0x1dd)](_0x1c510d){const _0x1bd5f1=_0x38fca9,_0x36cd93=_0x1c510d[_0x1bd5f1(0x1e2)]('<')[_0x1bd5f1(0x1ef)]!==_0x1c510d[_0x1bd5f1(0x1e2)]('>')[_0x1bd5f1(0x1ef)],_0x2128c0=_0x1c510d[_0x1bd5f1(0x1ef)]<0x1e;return _0x36cd93&&_0x2128c0;}[_0x38fca9(0x1da)](_0x524399){const _0x5612a0=_0x38fca9;return _0x524399[_0x5612a0(0x1e2)](/\n(?![^{]*\})/g)[_0x5612a0(0x1d8)](_0xeb6d73=>_0xeb6d73[_0x5612a0(0x1e1)](_0x5612a0(0x1dc),''))[_0x5612a0(0x1d7)](_0x52c76b=>_0x52c76b&&_0x52c76b[_0x5612a0(0x1ef)]>0x0&&_0x5612a0(0x1ee)!==_0x52c76b)[_0x5612a0(0x1d8)](_0x23ee59=>{const _0x6858a1=_0x5612a0,{choices:_0x2c31a3}=JSON[_0x6858a1(0x1ca)](_0x23ee59);if(_0x2c31a3[0x0]&&_0x2c31a3[0x0][_0x6858a1(0x1df)]&&_0x2c31a3[0x0][_0x6858a1(0x1df)][_0x6858a1(0x1e0)])return _0x2c31a3[0x0][_0x6858a1(0x1df)][_0x6858a1(0x1e0)];})[_0x5612a0(0x1d7)](_0x127e8d=>_0x127e8d)[_0x5612a0(0x1e8)]('');}}
|
package/src/aiassistant.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const _0x439aeb=_0x1de9;(function(_0x107cc6,_0x544296){const _0x1d043c=_0x1de9,_0x57975f=_0x107cc6();while(!![]){try{const _0x275de3=-parseInt(_0x1d043c(0x120))/0x1+-parseInt(_0x1d043c(0x15f))/0x2*(-parseInt(_0x1d043c(0x18e))/0x3)+-parseInt(_0x1d043c(0x171))/0x4*(parseInt(_0x1d043c(0x16b))/0x5)+-parseInt(_0x1d043c(0x128))/0x6+parseInt(_0x1d043c(0x169))/0x7*(parseInt(_0x1d043c(0x15e))/0x8)+-parseInt(_0x1d043c(0x11e))/0x9+-parseInt(_0x1d043c(0x11c))/0xa*(-parseInt(_0x1d043c(0x13c))/0xb);if(_0x275de3===_0x544296)break;else _0x57975f['push'](_0x57975f['shift']());}catch(_0x3aec7a){_0x57975f['push'](_0x57975f['shift']());}}}(_0x1b72,0x96009));import{CKEditorError as _0x171bba}from'ckeditor5/src/utils.js';import{Plugin as _0x15d239}from'ckeditor5/src/core.js';import _0x4223ca from'./aiassistantui.js';import _0x36aafc from'./aiassistantediting.js';import{getTranslation as _0x1d41fd}from'./utils/common-translations.js';function _0x1b72(){const _0x34a4d4=['1204jcEHUi','Remove\x20any\x20repetitive,\x20redundant,\x20or\x20non-essential\x20writing\x20in\x20this\x20content\x20without\x20changing\x20the\x20meaning\x20or\x20losing\x20any\x20key\x20information.','Translate\x20the\x20content\x20to\x20Hindi\x20language.','Professional','translatePortuguese','English','changeStyle','Translate\x20the\x20content\x20to\x20Simplified\x20Chinese\x20language.','journalism','Translate','Improve\x20using\x20polished,\x20formal,\x20and\x20respectful\x20language\x20to\x20convey\x20professional\x20expertise\x20and\x20competence.','generate','get','_licenseKeyCheckInterval','continue','Arabic','Rewrite\x20this\x20content\x20as\x20a\x20business\x20professional\x20with\x20formal\x20language.','casual','translateSpanish','Direct','Edit\x20or\x20review','licenseKey','Poetic','Translate\x20the\x20content\x20to\x20English\x20language.','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.','French','Legal','summarize','translateHindi','78xSorsX','Translate\x20the\x20content\x20to\x20Portuguese\x20language.','improveWriting','Improve\x20using\x20compelling,\x20optimistic\x20language\x20to\x20convey\x20confidence\x20in\x20the\x20writing.','find','Simplify\x20the\x20writing\x20style\x20of\x20this\x20content\x20and\x20reduce\x20the\x20complexity,\x20so\x20that\x20the\x20content\x20is\x20easy\x20to\x20understand.','aiLicenseKeyValid','Translate\x20the\x20content\x20to\x20Spanish\x20language.','Improve\x20using\x20casual,\x20informal\x20language\x20to\x20convey\x20a\x20casual\x20conversation\x20with\x20a\x20real\x20person.','4353990RHNqJd','German','9511110OQPmlR','Translate\x20the\x20content\x20to\x20French\x20language.','829103uYKWNk','pluginName','Simplified\x20Chinese','ai.aiAssistant.extraCommandGroups','locale','Start\x20with\x20the\x20provided\x20content\x20and\x20write\x20at\x20the\x20end\x20of\x20it\x20continuing\x20this\x20topic.\x20Keep\x20the\x20added\x20part\x20short.','poetic','Improve\x20using\x20friendly,\x20comforting\x20language,\x20to\x20convey\x20understanding\x20and\x20empathy.','4257846VGlMad','translateEnglish','Make\x20shorter','aiLicenseKeyTrialLimit:operations','Change\x20style','define','makeShorter','Translate\x20to\x20%0','changeTone','editOrReview','ai.aiAssistant.commands','Fix\x20spelling\x20mistakes,\x20use\x20proper\x20grammar\x20and\x20apply\x20good\x20writing\x20practices.\x20Do\x20not\x20lose\x20the\x20original\x20meaning.','commands','ai-invalid-license-key','professional','direct','Friendly','business','Summarize','translateArabic','55hxtEtr','init','Rewrite\x20this\x20content\x20as\x20a\x20poem\x20using\x20poetic\x20techniques\x20without\x20losing\x20the\x20original\x20meaning.','simplifyLanguage','groupId','concat','translateChinese','info','includes','Rewrite\x20this\x20content\x20as\x20a\x20legal\x20professional\x20using\x20valid\x20legal\x20terminology.','ai.aiAssistant.removeCommands','translate','legal','Spanish','destroy','Generate\x20from\x20selection','Business','translateFrench','AIAssistant','Make\x20longer','Confident','Rewrite\x20this\x20content\x20as\x20a\x20journalist\x20using\x20engaging\x20language\x20to\x20convey\x20the\x20importance\x20of\x20the\x20information.','editor','Casual','Improve\x20using\x20direct\x20language,\x20using\x20only\x20the\x20essential\x20information.','Journalism','translateGerman','requires','Improve\x20writing','ai-trial-license-key-reached-limit-changes','Translate\x20the\x20content\x20to\x20Arabic\x20language.','config','push','forEach','4847488tphmvL','39722dlpIWH','set','friendly','Continue','Portuguese','confident','Translate\x20the\x20content\x20to\x20German\x20language.','aiLicenseKeyInvalid','Hindi','Improve\x20this\x20content\x20by\x20using\x20descriptive\x20language\x20and\x20inserting\x20more\x20information\x20and\x20more\x20detailed\x20explanations.','14DUmuDP','Simplify\x20language','11550mBhyOs','filter','makeLonger','Change\x20tone','Summarize\x20this\x20content\x20into\x20one\x20paragraph\x20of\x20text.\x20Include\x20only\x20the\x20key\x20ideas\x20and\x20conclusions.\x20Keep\x20it\x20short.\x20Do\x20not\x20keep\x20original\x20text\x20formatting.','aiLicenseKeyTrial'];_0x1b72=function(){return _0x34a4d4;};return _0x1b72();}export default class r extends _0x15d239{static get[_0x439aeb(0x157)](){return[_0x4223ca,_0x36aafc];}static get[_0x439aeb(0x121)](){const _0x2d4e41=_0x439aeb;return _0x2d4e41(0x14e);}constructor(_0x35b938){const _0x7dd0e5=_0x439aeb;super(_0x35b938);const _0x55cc97=_0x35b938[_0x7dd0e5(0x15b)];_0x55cc97[_0x7dd0e5(0x12d)](_0x7dd0e5(0x132),getDefaultCommands(_0x35b938[_0x7dd0e5(0x124)])),_0x55cc97[_0x7dd0e5(0x12d)](_0x7dd0e5(0x123),[]),_0x55cc97[_0x7dd0e5(0x12d)](_0x7dd0e5(0x146),[]);const _0x593e09=_0x55cc97[_0x7dd0e5(0x17d)](_0x7dd0e5(0x132)),_0x1361ef=_0x55cc97[_0x7dd0e5(0x17d)](_0x7dd0e5(0x123)),_0x28360d=_0x55cc97[_0x7dd0e5(0x17d)](_0x7dd0e5(0x146));_0x1361ef[_0x7dd0e5(0x15d)](_0x562874=>{const _0xa82c90=_0x7dd0e5,_0x77240f=_0x593e09[_0xa82c90(0x117)](_0x8a699c=>_0x8a699c[_0xa82c90(0x140)]===_0x562874[_0xa82c90(0x140)]);_0x77240f?_0x77240f[_0xa82c90(0x134)]=_0x77240f[_0xa82c90(0x134)][_0xa82c90(0x141)](_0x562874[_0xa82c90(0x134)]):_0x593e09[_0xa82c90(0x15c)](_0x562874);}),_0x593e09[_0x7dd0e5(0x15d)](_0x4ecfd6=>{const _0x37c55c=_0x7dd0e5;_0x4ecfd6[_0x37c55c(0x134)]=_0x4ecfd6[_0x37c55c(0x134)][_0x37c55c(0x16c)](_0x9fb6b5=>!_0x28360d[_0x37c55c(0x144)](_0x9fb6b5['id']));}),_0x55cc97[_0x7dd0e5(0x160)](_0x7dd0e5(0x132),_0x593e09);}[_0x439aeb(0x13d)](){const _0x3856cd=_0x439aeb,_0x6a7829=this[_0x3856cd(0x152)];this[_0x3856cd(0x186)]=_0x6a7829[_0x3856cd(0x15b)][_0x3856cd(0x17d)](_0x3856cd(0x186)),this[_0x3856cd(0x17e)]=setInterval(()=>{const _0xb25dac=_0x3856cd;let _0x49eac0;for(const _0x29910b in _0x6a7829){const _0x2127e8=_0x29910b,_0x1f088c=_0x6a7829[_0x2127e8];if(_0xb25dac(0x170)===_0x1f088c||_0xb25dac(0x166)===_0x1f088c||_0xb25dac(0x119)===_0x1f088c||_0xb25dac(0x12b)===_0x1f088c){delete _0x6a7829[_0x2127e8],_0x49eac0=_0x1f088c;break;}}if(_0xb25dac(0x166)===_0x49eac0)throw clearInterval(this[_0xb25dac(0x17e)]),new _0x171bba(_0xb25dac(0x135),null);if(_0xb25dac(0x170)===_0x49eac0&&console[_0xb25dac(0x143)](_0xb25dac(0x189)),_0xb25dac(0x12b)===_0x49eac0)throw clearInterval(this[_0xb25dac(0x17e)]),new _0x171bba(_0xb25dac(0x159),null);_0xb25dac(0x119)===_0x49eac0&&clearInterval(this[_0xb25dac(0x17e)]);},0x3e8);}[_0x439aeb(0x14a)](){const _0x67946=_0x439aeb;this[_0x67946(0x17e)]&&clearInterval(this[_0x67946(0x17e)]);}}function _0x1de9(_0x414673,_0x5795eb){const _0x1b7213=_0x1b72();return _0x1de9=function(_0x1de9e7,_0x4f79f9){_0x1de9e7=_0x1de9e7-0x115;let _0x24c9fe=_0x1b7213[_0x1de9e7];return _0x24c9fe;},_0x1de9(_0x414673,_0x5795eb);}export function getDefaultCommands(_0x4b66dd){const _0xd1765f=_0x439aeb;return[{'groupId':_0xd1765f(0x131),'groupLabel':_0x1d41fd(_0x4b66dd,_0xd1765f(0x185)),'commands':[{'id':_0xd1765f(0x115),'label':_0x1d41fd(_0x4b66dd,_0xd1765f(0x158)),'prompt':_0xd1765f(0x133)},{'id':_0xd1765f(0x12e),'label':_0x1d41fd(_0x4b66dd,_0xd1765f(0x12a)),'prompt':_0xd1765f(0x172)},{'id':_0xd1765f(0x16d),'label':_0x1d41fd(_0x4b66dd,_0xd1765f(0x14f)),'prompt':_0xd1765f(0x168)},{'id':_0xd1765f(0x13f),'label':_0x1d41fd(_0x4b66dd,_0xd1765f(0x16a)),'prompt':_0xd1765f(0x118)}]},{'groupId':_0xd1765f(0x17c),'groupLabel':_0x1d41fd(_0x4b66dd,_0xd1765f(0x14b)),'commands':[{'id':_0xd1765f(0x18c),'label':_0x1d41fd(_0x4b66dd,_0xd1765f(0x13a)),'prompt':_0xd1765f(0x16f)},{'id':_0xd1765f(0x17f),'label':_0x1d41fd(_0x4b66dd,_0xd1765f(0x162)),'prompt':_0xd1765f(0x125)}]},{'groupId':_0xd1765f(0x130),'groupLabel':_0x1d41fd(_0x4b66dd,_0xd1765f(0x16e)),'commands':[{'id':_0xd1765f(0x136),'label':_0x1d41fd(_0x4b66dd,_0xd1765f(0x174)),'prompt':_0xd1765f(0x17b)},{'id':_0xd1765f(0x182),'label':_0x1d41fd(_0x4b66dd,_0xd1765f(0x153)),'prompt':_0xd1765f(0x11b)},{'id':_0xd1765f(0x137),'label':_0x1d41fd(_0x4b66dd,_0xd1765f(0x184)),'prompt':_0xd1765f(0x154)},{'id':_0xd1765f(0x164),'label':_0x1d41fd(_0x4b66dd,_0xd1765f(0x150)),'prompt':_0xd1765f(0x116)},{'id':_0xd1765f(0x161),'label':_0x1d41fd(_0x4b66dd,_0xd1765f(0x138)),'prompt':_0xd1765f(0x127)}]},{'groupId':_0xd1765f(0x177),'groupLabel':_0x1d41fd(_0x4b66dd,_0xd1765f(0x12c)),'commands':[{'id':_0xd1765f(0x139),'label':_0x1d41fd(_0x4b66dd,_0xd1765f(0x14c)),'prompt':_0xd1765f(0x181)},{'id':_0xd1765f(0x148),'label':_0x1d41fd(_0x4b66dd,_0xd1765f(0x18b)),'prompt':_0xd1765f(0x145)},{'id':_0xd1765f(0x179),'label':_0x1d41fd(_0x4b66dd,_0xd1765f(0x155)),'prompt':_0xd1765f(0x151)},{'id':_0xd1765f(0x126),'label':_0x1d41fd(_0x4b66dd,_0xd1765f(0x187)),'prompt':_0xd1765f(0x13e)}]},{'groupId':_0xd1765f(0x147),'groupLabel':_0x1d41fd(_0x4b66dd,_0xd1765f(0x17a)),'commands':[{'id':_0xd1765f(0x129),'label':_0x1d41fd(_0x4b66dd,_0xd1765f(0x12f),[_0x1d41fd(_0x4b66dd,_0xd1765f(0x176))]),'prompt':_0xd1765f(0x188)},{'id':_0xd1765f(0x183),'label':_0x1d41fd(_0x4b66dd,_0xd1765f(0x12f),[_0x1d41fd(_0x4b66dd,_0xd1765f(0x149))]),'prompt':_0xd1765f(0x11a)},{'id':_0xd1765f(0x175),'label':_0x1d41fd(_0x4b66dd,_0xd1765f(0x12f),[_0x1d41fd(_0x4b66dd,_0xd1765f(0x163))]),'prompt':_0xd1765f(0x18f)},{'id':_0xd1765f(0x156),'label':_0x1d41fd(_0x4b66dd,_0xd1765f(0x12f),[_0x1d41fd(_0x4b66dd,_0xd1765f(0x11d))]),'prompt':_0xd1765f(0x165)},{'id':_0xd1765f(0x14d),'label':_0x1d41fd(_0x4b66dd,_0xd1765f(0x12f),[_0x1d41fd(_0x4b66dd,_0xd1765f(0x18a))]),'prompt':_0xd1765f(0x11f)},{'id':_0xd1765f(0x142),'label':_0x1d41fd(_0x4b66dd,_0xd1765f(0x12f),[_0x1d41fd(_0x4b66dd,_0xd1765f(0x122))]),'prompt':_0xd1765f(0x178)},{'id':_0xd1765f(0x18d),'label':_0x1d41fd(_0x4b66dd,_0xd1765f(0x12f),[_0x1d41fd(_0x4b66dd,_0xd1765f(0x167))]),'prompt':_0xd1765f(0x173)},{'id':_0xd1765f(0x13b),'label':_0x1d41fd(_0x4b66dd,_0xd1765f(0x12f),[_0x1d41fd(_0x4b66dd,_0xd1765f(0x180))]),'prompt':_0xd1765f(0x15a)}]}];}
|
|
23
|
+
const _0xca2462=_0x1bba;(function(_0x2ad05d,_0x4fc36f){const _0x4e4685=_0x1bba,_0x53b32f=_0x2ad05d();while(!![]){try{const _0x5f4d44=-parseInt(_0x4e4685(0x24c))/0x1+parseInt(_0x4e4685(0x255))/0x2*(-parseInt(_0x4e4685(0x1fa))/0x3)+parseInt(_0x4e4685(0x25b))/0x4+parseInt(_0x4e4685(0x260))/0x5+-parseInt(_0x4e4685(0x1ec))/0x6+parseInt(_0x4e4685(0x1f1))/0x7+-parseInt(_0x4e4685(0x258))/0x8*(-parseInt(_0x4e4685(0x232))/0x9);if(_0x5f4d44===_0x4fc36f)break;else _0x53b32f['push'](_0x53b32f['shift']());}catch(_0xba1609){_0x53b32f['push'](_0x53b32f['shift']());}}}(_0x20d8,0xd5fdd));import{CKEditorError as _0x3c74ac}from'ckeditor5/src/utils.js';function _0x1bba(_0x5344bc,_0x2792a5){const _0x20d888=_0x20d8();return _0x1bba=function(_0x1bba68,_0xa1a29e){_0x1bba68=_0x1bba68-0x1ea;let _0x1d2364=_0x20d888[_0x1bba68];return _0x1d2364;},_0x1bba(_0x5344bc,_0x2792a5);}import{Plugin as _0x440c69}from'ckeditor5/src/core.js';import _0x10590a from'./aiassistantui.js';import _0x2ab392 from'./aiassistantediting.js';function _0x20d8(){const _0x4e78e1=['pluginName','Translate\x20the\x20content\x20to\x20Portuguese\x20language.','define','AIAssistant','licenseKey','6YSBwnZ','simplifyLanguage','Translate\x20the\x20content\x20to\x20Simplified\x20Chinese\x20language.','editor','aiLicenseKeyInvalid','translateFrench','German','push','legal','confident','translateChinese','translateGerman','groupId','Make\x20longer','concat','summarize','Arabic','ai-trial-license-key-reached-limit-changes','Improve\x20using\x20compelling,\x20optimistic\x20language\x20to\x20convey\x20confidence\x20in\x20the\x20writing.','ai.aiAssistant.commands','Rewrite\x20this\x20content\x20as\x20a\x20poem\x20using\x20poetic\x20techniques\x20without\x20losing\x20the\x20original\x20meaning.','translatePortuguese','makeShorter','Spanish','translate','Simplified\x20Chinese','Simplify\x20language','Edit\x20or\x20review','locale','aiLicenseKeyValid','set','Legal','Rewrite\x20this\x20content\x20as\x20a\x20legal\x20professional\x20using\x20valid\x20legal\x20terminology.','get','changeStyle','professional','Portuguese','Direct','Confident','Translate\x20the\x20content\x20to\x20German\x20language.','Rewrite\x20this\x20content\x20as\x20a\x20journalist\x20using\x20engaging\x20language\x20to\x20convey\x20the\x20importance\x20of\x20the\x20information.','Generate\x20from\x20selection','aiLicenseKeyTrialLimit:operations','info','Translate\x20the\x20content\x20to\x20Arabic\x20language.','Continue','Start\x20with\x20the\x20provided\x20content\x20and\x20write\x20at\x20the\x20end\x20of\x20it\x20continuing\x20this\x20topic.\x20Keep\x20the\x20added\x20part\x20short.','Translate\x20the\x20content\x20to\x20Spanish\x20language.','forEach','filter','ai-invalid-license-key','Summarize','Poetic','requires','Translate\x20the\x20content\x20to\x20French\x20language.','Translate\x20the\x20content\x20to\x20English\x20language.','9pFkknL','generate','makeLonger','Rewrite\x20this\x20content\x20as\x20a\x20business\x20professional\x20with\x20formal\x20language.','translateEnglish','aiLicenseKeyTrial','Make\x20shorter','improveWriting','French','editOrReview','Improve\x20using\x20direct\x20language,\x20using\x20only\x20the\x20essential\x20information.','Summarize\x20this\x20content\x20into\x20one\x20paragraph\x20of\x20text.\x20Include\x20only\x20the\x20key\x20ideas\x20and\x20conclusions.\x20Keep\x20it\x20short.\x20Do\x20not\x20keep\x20original\x20text\x20formatting.','_licenseKeyCheckInterval','continue','Business','casual','Improve\x20using\x20casual,\x20informal\x20language\x20to\x20convey\x20a\x20casual\x20conversation\x20with\x20a\x20real\x20person.','Translate\x20to\x20%0','Change\x20style','direct','ai.aiAssistant.extraCommandGroups','translateSpanish','Simplify\x20the\x20writing\x20style\x20of\x20this\x20content\x20and\x20reduce\x20the\x20complexity,\x20so\x20that\x20the\x20content\x20is\x20easy\x20to\x20understand.','English','journalism','Casual','942367wtowPu','Hindi','Improve\x20this\x20content\x20by\x20using\x20descriptive\x20language\x20and\x20inserting\x20more\x20information\x20and\x20more\x20detailed\x20explanations.','Improve\x20using\x20friendly,\x20comforting\x20language,\x20to\x20convey\x20understanding\x20and\x20empathy.','Professional','translateArabic','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.','translateHindi','Improve\x20writing','152048YGLyyd','friendly','ai.aiAssistant.removeCommands','18151976djviZS','business','config','537044kLlNMB','init','Change\x20tone','poetic','changeTone','1369720BVijYR','commands','Fix\x20spelling\x20mistakes,\x20use\x20proper\x20grammar\x20and\x20apply\x20good\x20writing\x20practices.\x20Do\x20not\x20lose\x20the\x20original\x20meaning.','Improve\x20using\x20polished,\x20formal,\x20and\x20respectful\x20language\x20to\x20convey\x20professional\x20expertise\x20and\x20competence.','Translate','8122002cwPJJc','destroy','Friendly','Journalism','includes','4531723yuObaP','Translate\x20the\x20content\x20to\x20Hindi\x20language.','find','Remove\x20any\x20repetitive,\x20redundant,\x20or\x20non-essential\x20writing\x20in\x20this\x20content\x20without\x20changing\x20the\x20meaning\x20or\x20losing\x20any\x20key\x20information.'];_0x20d8=function(){return _0x4e78e1;};return _0x20d8();}import{getTranslation as _0x38e69b}from'./utils/common-translations.js';export default class r extends _0x440c69{static get[_0xca2462(0x22f)](){return[_0x10590a,_0x2ab392];}static get[_0xca2462(0x1f5)](){const _0x3442c4=_0xca2462;return _0x3442c4(0x1f8);}constructor(_0x3c5eb8){const _0x2f5d83=_0xca2462;super(_0x3c5eb8);const _0x44e7a5=_0x3c5eb8[_0x2f5d83(0x25a)];_0x44e7a5[_0x2f5d83(0x1f7)](_0x2f5d83(0x20d),getDefaultCommands(_0x3c5eb8[_0x2f5d83(0x216)])),_0x44e7a5[_0x2f5d83(0x1f7)](_0x2f5d83(0x246),[]),_0x44e7a5[_0x2f5d83(0x1f7)](_0x2f5d83(0x257),[]);const _0x23ef25=_0x44e7a5[_0x2f5d83(0x21b)](_0x2f5d83(0x20d)),_0x34be14=_0x44e7a5[_0x2f5d83(0x21b)](_0x2f5d83(0x246)),_0x1d2bf8=_0x44e7a5[_0x2f5d83(0x21b)](_0x2f5d83(0x257));_0x34be14[_0x2f5d83(0x22a)](_0x5dcd0c=>{const _0x2a00d9=_0x2f5d83,_0x141b3b=_0x23ef25[_0x2a00d9(0x1f3)](_0x3347f1=>_0x3347f1[_0x2a00d9(0x206)]===_0x5dcd0c[_0x2a00d9(0x206)]);_0x141b3b?_0x141b3b[_0x2a00d9(0x261)]=_0x141b3b[_0x2a00d9(0x261)][_0x2a00d9(0x208)](_0x5dcd0c[_0x2a00d9(0x261)]):_0x23ef25[_0x2a00d9(0x201)](_0x5dcd0c);}),_0x23ef25[_0x2f5d83(0x22a)](_0x2d689a=>{const _0x346d50=_0x2f5d83;_0x2d689a[_0x346d50(0x261)]=_0x2d689a[_0x346d50(0x261)][_0x346d50(0x22b)](_0x338935=>!_0x1d2bf8[_0x346d50(0x1f0)](_0x338935['id']));}),_0x44e7a5[_0x2f5d83(0x218)](_0x2f5d83(0x20d),_0x23ef25);}[_0xca2462(0x25c)](){const _0xd8f59c=_0xca2462,_0x3eddbe=this[_0xd8f59c(0x1fd)];this[_0xd8f59c(0x1f9)]=_0x3eddbe[_0xd8f59c(0x25a)][_0xd8f59c(0x21b)](_0xd8f59c(0x1f9)),this[_0xd8f59c(0x23e)]=setInterval(()=>{const _0x5b1bc2=_0xd8f59c;let _0x1fd008;for(const _0x3a0da5 in _0x3eddbe){const _0x22a933=_0x3a0da5,_0x1eaf15=_0x3eddbe[_0x22a933];if(_0x5b1bc2(0x237)===_0x1eaf15||_0x5b1bc2(0x1fe)===_0x1eaf15||_0x5b1bc2(0x217)===_0x1eaf15||_0x5b1bc2(0x224)===_0x1eaf15){delete _0x3eddbe[_0x22a933],_0x1fd008=_0x1eaf15;break;}}if(_0x5b1bc2(0x1fe)===_0x1fd008)throw clearInterval(this[_0x5b1bc2(0x23e)]),new _0x3c74ac(_0x5b1bc2(0x22c),null);if(_0x5b1bc2(0x237)===_0x1fd008&&console[_0x5b1bc2(0x225)](_0x5b1bc2(0x252)),_0x5b1bc2(0x224)===_0x1fd008)throw clearInterval(this[_0x5b1bc2(0x23e)]),new _0x3c74ac(_0x5b1bc2(0x20b),null);_0x5b1bc2(0x217)===_0x1fd008&&clearInterval(this[_0x5b1bc2(0x23e)]);},0x3e8);}[_0xca2462(0x1ed)](){const _0x58c903=_0xca2462;this[_0x58c903(0x23e)]&&clearInterval(this[_0x58c903(0x23e)]);}}export function getDefaultCommands(_0x90e07b){const _0x5f0574=_0xca2462;return[{'groupId':_0x5f0574(0x23b),'groupLabel':_0x38e69b(_0x90e07b,_0x5f0574(0x215)),'commands':[{'id':_0x5f0574(0x239),'label':_0x38e69b(_0x90e07b,_0x5f0574(0x254)),'prompt':_0x5f0574(0x262)},{'id':_0x5f0574(0x210),'label':_0x38e69b(_0x90e07b,_0x5f0574(0x238)),'prompt':_0x5f0574(0x1f4)},{'id':_0x5f0574(0x234),'label':_0x38e69b(_0x90e07b,_0x5f0574(0x207)),'prompt':_0x5f0574(0x24e)},{'id':_0x5f0574(0x1fb),'label':_0x38e69b(_0x90e07b,_0x5f0574(0x214)),'prompt':_0x5f0574(0x248)}]},{'groupId':_0x5f0574(0x233),'groupLabel':_0x38e69b(_0x90e07b,_0x5f0574(0x223)),'commands':[{'id':_0x5f0574(0x209),'label':_0x38e69b(_0x90e07b,_0x5f0574(0x22d)),'prompt':_0x5f0574(0x23d)},{'id':_0x5f0574(0x23f),'label':_0x38e69b(_0x90e07b,_0x5f0574(0x227)),'prompt':_0x5f0574(0x228)}]},{'groupId':_0x5f0574(0x25f),'groupLabel':_0x38e69b(_0x90e07b,_0x5f0574(0x25d)),'commands':[{'id':_0x5f0574(0x21d),'label':_0x38e69b(_0x90e07b,_0x5f0574(0x250)),'prompt':_0x5f0574(0x1ea)},{'id':_0x5f0574(0x241),'label':_0x38e69b(_0x90e07b,_0x5f0574(0x24b)),'prompt':_0x5f0574(0x242)},{'id':_0x5f0574(0x245),'label':_0x38e69b(_0x90e07b,_0x5f0574(0x21f)),'prompt':_0x5f0574(0x23c)},{'id':_0x5f0574(0x203),'label':_0x38e69b(_0x90e07b,_0x5f0574(0x220)),'prompt':_0x5f0574(0x20c)},{'id':_0x5f0574(0x256),'label':_0x38e69b(_0x90e07b,_0x5f0574(0x1ee)),'prompt':_0x5f0574(0x24f)}]},{'groupId':_0x5f0574(0x21c),'groupLabel':_0x38e69b(_0x90e07b,_0x5f0574(0x244)),'commands':[{'id':_0x5f0574(0x259),'label':_0x38e69b(_0x90e07b,_0x5f0574(0x240)),'prompt':_0x5f0574(0x235)},{'id':_0x5f0574(0x202),'label':_0x38e69b(_0x90e07b,_0x5f0574(0x219)),'prompt':_0x5f0574(0x21a)},{'id':_0x5f0574(0x24a),'label':_0x38e69b(_0x90e07b,_0x5f0574(0x1ef)),'prompt':_0x5f0574(0x222)},{'id':_0x5f0574(0x25e),'label':_0x38e69b(_0x90e07b,_0x5f0574(0x22e)),'prompt':_0x5f0574(0x20e)}]},{'groupId':_0x5f0574(0x212),'groupLabel':_0x38e69b(_0x90e07b,_0x5f0574(0x1eb)),'commands':[{'id':_0x5f0574(0x236),'label':_0x38e69b(_0x90e07b,_0x5f0574(0x243),[_0x38e69b(_0x90e07b,_0x5f0574(0x249))]),'prompt':_0x5f0574(0x231)},{'id':_0x5f0574(0x247),'label':_0x38e69b(_0x90e07b,_0x5f0574(0x243),[_0x38e69b(_0x90e07b,_0x5f0574(0x211))]),'prompt':_0x5f0574(0x229)},{'id':_0x5f0574(0x20f),'label':_0x38e69b(_0x90e07b,_0x5f0574(0x243),[_0x38e69b(_0x90e07b,_0x5f0574(0x21e))]),'prompt':_0x5f0574(0x1f6)},{'id':_0x5f0574(0x205),'label':_0x38e69b(_0x90e07b,_0x5f0574(0x243),[_0x38e69b(_0x90e07b,_0x5f0574(0x200))]),'prompt':_0x5f0574(0x221)},{'id':_0x5f0574(0x1ff),'label':_0x38e69b(_0x90e07b,_0x5f0574(0x243),[_0x38e69b(_0x90e07b,_0x5f0574(0x23a))]),'prompt':_0x5f0574(0x230)},{'id':_0x5f0574(0x204),'label':_0x38e69b(_0x90e07b,_0x5f0574(0x243),[_0x38e69b(_0x90e07b,_0x5f0574(0x213))]),'prompt':_0x5f0574(0x1fc)},{'id':_0x5f0574(0x253),'label':_0x38e69b(_0x90e07b,_0x5f0574(0x243),[_0x38e69b(_0x90e07b,_0x5f0574(0x24d))]),'prompt':_0x5f0574(0x1f2)},{'id':_0x5f0574(0x251),'label':_0x38e69b(_0x90e07b,_0x5f0574(0x243),[_0x38e69b(_0x90e07b,_0x5f0574(0x20a))]),'prompt':_0x5f0574(0x226)}]}];}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
function _0x1f33(){const _0x388c2a=['9sFqiXk','3442824jxDZOo','6175544RUhdSA','markers','pop','config','data','getLastMatchingPosition','insertContent','document','4294510enJtEi','hideFakeVisualSelection','setSelection','getLastPosition','push','1121774HJchmt','span','showFakeVisualSelection','pluginName','getRange','isAtEnd','getFirstRange','conversion','toModel','ck-ai-assistant-ui_theme','model','change','insertContentBelow','editingDowncast','2201484bchbtq','1TFwMev','selection','createPositionAfter','from','markerToHighlight','get','for','createRange','getSelectedBlocks','length','AIAssistantEditing','markerToElement','canEditAt','ai.useTheme','ai-ui','isContent','ck-fake-ai-selection_collapsed','ck-fake-ai-selection','3193980aktJOn','createSelection','end','829152wNsBXf','start','ck-fake-ai-selection-candidate','addMarker','editor','schema','ai-ui-candidate','init','processor','has','toView','updateMarker','5YfnSYk','removeMarker'];_0x1f33=function(){return _0x388c2a;};return _0x1f33();}const _0x126c47=_0x175e;function _0x175e(_0x42c120,_0x42a9cb){const _0x1f33ca=_0x1f33();return _0x175e=function(_0x175eeb,_0xcce0b){_0x175eeb=_0x175eeb-0x11c;let _0x2facac=_0x1f33ca[_0x175eeb];return _0x2facac;},_0x175e(_0x42c120,_0x42a9cb);}(function(_0x1083e8,_0x1712ae){const _0x455a73=_0x175e,_0x1d1bbf=_0x1083e8();while(!![]){try{const _0x360c0f=-parseInt(_0x455a73(0x153))/0x1*(-parseInt(_0x455a73(0x144))/0x2)+-parseInt(_0x455a73(0x152))/0x3+parseInt(_0x455a73(0x124))/0x4*(-parseInt(_0x455a73(0x133))/0x5)+-parseInt(_0x455a73(0x127))/0x6+parseInt(_0x455a73(0x136))/0x7+parseInt(_0x455a73(0x137))/0x8+parseInt(_0x455a73(0x135))/0x9*(parseInt(_0x455a73(0x13f))/0xa);if(_0x360c0f===_0x1712ae)break;else _0x1d1bbf['push'](_0x1d1bbf['shift']());}catch(_0xf97202){_0x1d1bbf['push'](_0x1d1bbf['shift']());}}}(_0x1f33,0x8e7ae));import{Plugin as _0x4fb1d1}from'ckeditor5/src/core.js';const s=_0x126c47(0x120),c=_0x126c47(0x12d);export default class i extends _0x4fb1d1{static get[_0x126c47(0x147)](){const _0x110af3=_0x126c47;return _0x110af3(0x11c);}[_0x126c47(0x12e)](){const _0xa91170=_0x126c47,{editor:_0xdb43e0}=this,_0x53c679=[_0xa91170(0x123)];_0xdb43e0[_0xa91170(0x13a)][_0xa91170(0x158)](_0xa91170(0x11f))&&_0x53c679[_0xa91170(0x143)](_0xa91170(0x14d)),_0xdb43e0[_0xa91170(0x14b)][_0xa91170(0x159)](_0xa91170(0x151))[_0xa91170(0x157)]({'model':s,'view':{'classes':_0x53c679,'priority':0xc}}),_0xdb43e0[_0xa91170(0x14b)][_0xa91170(0x159)](_0xa91170(0x151))[_0xa91170(0x11d)]({'model':s,'view':{'name':_0xa91170(0x145),'classes':[_0xa91170(0x123),_0xa91170(0x122)],'priority':0xc}}),_0xdb43e0[_0xa91170(0x14b)][_0xa91170(0x159)](_0xa91170(0x151))[_0xa91170(0x157)]({'model':c,'view':{'classes':[_0xa91170(0x129)],'priority':0x19}}),_0xdb43e0[_0xa91170(0x14b)][_0xa91170(0x159)](_0xa91170(0x151))[_0xa91170(0x11d)]({'model':c,'view':{'name':_0xa91170(0x145),'classes':[_0xa91170(0x129),_0xa91170(0x122)],'priority':0x19}});}[_0x126c47(0x146)](_0x408359){const _0x1a5ad3=_0x126c47,_0x58c519=this[_0x1a5ad3(0x12b)][_0x1a5ad3(0x14e)],_0x18514f=_0x408359?c:s;_0x58c519[_0x1a5ad3(0x14f)](_0xa44806=>{const _0x329d3a=_0x1a5ad3,_0x90e889=_0x58c519[_0x329d3a(0x13e)][_0x329d3a(0x154)][_0x329d3a(0x14a)]();if(_0x58c519[_0x329d3a(0x138)][_0x329d3a(0x130)](_0x18514f))_0xa44806[_0x329d3a(0x132)](_0x18514f,{'range':_0x90e889});else{if(_0x90e889[_0x329d3a(0x128)][_0x329d3a(0x149)]){const _0x5e88f1=_0x90e889[_0x329d3a(0x128)][_0x329d3a(0x13c)](({item:_0x4a68ec})=>!_0x58c519[_0x329d3a(0x12c)][_0x329d3a(0x121)](_0x4a68ec),{'boundaries':_0x90e889});_0xa44806[_0x329d3a(0x12a)](_0x18514f,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0xa44806[_0x329d3a(0x15a)](_0x5e88f1,_0x90e889[_0x329d3a(0x126)])});}else _0xa44806[_0x329d3a(0x12a)](_0x18514f,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x90e889});}});}[_0x126c47(0x140)](_0x42ffc9){const _0x2f7e0f=_0x126c47,_0xb14385=this[_0x2f7e0f(0x12b)][_0x2f7e0f(0x14e)],_0x1c4682=_0x42ffc9?c:s;_0xb14385[_0x2f7e0f(0x138)][_0x2f7e0f(0x130)](_0x1c4682)&&_0xb14385[_0x2f7e0f(0x14f)](_0x1672cc=>{const _0x428911=_0x2f7e0f;_0x1672cc[_0x428911(0x134)](_0x1c4682);});}[_0x126c47(0x13d)](_0xe3e71c,_0x3dcd1c){const _0x11c6ac=_0x126c47,_0x176a5a=_0x3dcd1c||this[_0x11c6ac(0x12b)][_0x11c6ac(0x14e)][_0x11c6ac(0x138)][_0x11c6ac(0x158)](s)[_0x11c6ac(0x148)]();if(!this[_0x11c6ac(0x12b)][_0x11c6ac(0x14e)][_0x11c6ac(0x11e)](_0x176a5a))return;const _0x4f4d1a=this[_0x11c6ac(0x12b)][_0x11c6ac(0x13b)][_0x11c6ac(0x12f)][_0x11c6ac(0x131)](_0xe3e71c),_0xb5ac6=this[_0x11c6ac(0x12b)][_0x11c6ac(0x13b)][_0x11c6ac(0x14c)](_0x4f4d1a);this[_0x11c6ac(0x12b)][_0x11c6ac(0x14e)][_0x11c6ac(0x14f)](_0x309dca=>{const _0x27b181=_0x11c6ac;this[_0x27b181(0x140)]();const _0x451247=this[_0x27b181(0x12b)][_0x27b181(0x14e)][_0x27b181(0x13d)](_0xb5ac6,_0x176a5a);_0x451247&&_0x309dca[_0x27b181(0x141)](_0x451247);});}[_0x126c47(0x150)](_0x2ce39a){const _0x38740c=_0x126c47,{model:_0x1083a9}=this[_0x38740c(0x12b)],_0x560f5c=Array[_0x38740c(0x156)](_0x1083a9[_0x38740c(0x125)](this[_0x38740c(0x12b)][_0x38740c(0x14e)][_0x38740c(0x138)][_0x38740c(0x158)](s)[_0x38740c(0x148)]())[_0x38740c(0x15b)]()),_0x110bf8=_0x560f5c[_0x38740c(0x15c)]?_0x1083a9[_0x38740c(0x155)](_0x560f5c[_0x38740c(0x139)]()):_0x1083a9[_0x38740c(0x13e)][_0x38740c(0x154)][_0x38740c(0x142)]();this[_0x38740c(0x13d)](_0x2ce39a,_0x110bf8);}}
|