@ckeditor/ckeditor5-ai
Version:
AI features for CKEditor 5.
23 lines • 9.09 kB
JavaScript
/*
* Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
*
*
*
*
* +---------------------------------------------------------------------------------+
* | |
* | Hello stranger! |
* | |
* | |
* | What you're currently looking at is the source code of a legally protected, |
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
* | are forbidden and will result in legal consequences. |
* | |
* | |
* +---------------------------------------------------------------------------------+
*
*
*
*
*/
const _0x1c967c=_0x308c;(function(_0x28eef0,_0x3eb640){const _0x30d0ea=_0x308c,_0x6de555=_0x28eef0();while(!![]){try{const _0x4a3865=-parseInt(_0x30d0ea(0x1ed))/0x1+parseInt(_0x30d0ea(0x1c8))/0x2+-parseInt(_0x30d0ea(0x221))/0x3*(-parseInt(_0x30d0ea(0x1d1))/0x4)+-parseInt(_0x30d0ea(0x1fc))/0x5*(parseInt(_0x30d0ea(0x1e5))/0x6)+parseInt(_0x30d0ea(0x1fe))/0x7+parseInt(_0x30d0ea(0x1f1))/0x8+-parseInt(_0x30d0ea(0x1c9))/0x9;if(_0x4a3865===_0x3eb640)break;else _0x6de555['push'](_0x6de555['shift']());}catch(_0x5c7296){_0x6de555['push'](_0x6de555['shift']());}}}(_0x20ac,0xcd07b));import{ContextPlugin as _0x1f759c}from'ckeditor5/src/core.js';import{IconAIReview as _0x1886db}from'ckeditor5/src/icons.js';import{BodyCollection as _0x5cc209}from'ckeditor5/src/ui.js';import{AITabs as _0x280fe3}from'../aitabs/aitabs.js';import{AIReviewModeView as _0x58de69}from'./ui/aireviewmodeview.js';function _0x308c(_0x1bdd6f,_0x32eda5){const _0x20ac7c=_0x20ac();return _0x308c=function(_0x308c58,_0xcb1297){_0x308c58=_0x308c58-0x1c7;let _0x10dda6=_0x20ac7c[_0x308c58];return _0x10dda6;},_0x308c(_0x1bdd6f,_0x32eda5);}import{getTranslation as _0x4321bb}from'../aicore/utils/common-translations.js';import{AIReviewModeBalloonSuggestionItemView as _0x4b383b}from'./ui/aireviewmodeballoonsuggestionview.js';import'../../theme/aireviewmode/aireviewmode.css';export const AI_REVIEW_MODE_UI_EVENT_NAMES=[_0x1c967c(0x20e),_0x1c967c(0x216),_0x1c967c(0x1f8),_0x1c967c(0x1cf),_0x1c967c(0x1db),_0x1c967c(0x1cb),_0x1c967c(0x211),_0x1c967c(0x21c),_0x1c967c(0x1f5),_0x1c967c(0x1df),_0x1c967c(0x1f7),_0x1c967c(0x201)];function _0x20ac(){const _0x396458=['reviewCheckListView','_reviewModeView','init','showResult','setItemAsActive','reviewCheckResultsView','deactivateChange','getReviewCheckList','setActiveStateInResults','hasChecks','activateChange','delegate','setCheckResultTitle','setItemAsInactive','leaveReviewMode','runReviewCheck','setChecks','AI_REVIEW_MODE','destroy','get','accepted','acceptChange','view','showGeneralReviewModeErrorView','resetActiveStateInResults','updateChangeState','6114atxdNn','requires','isOfficialPlugin','2601128UwaRLu','9461286OoDQcz','getResults','leaveReviewModeResultList','showReviewCheckListView','showBalloon','showReviewCheckList','toggleDiff','showCheckRunResults','2624HoudZr','hideActionsWhenResultIsReady','showChunkErrorView','AITabs','hideBalloon','AI_REVIEW_INITIALIZATION_ERROR_MESSAGE','find','hideResult','addTab','activateTab','acceptAllChanges','setTitle','plugins','forEach','learnMore','hideChangeBalloon','_reviewModeBalloonSuggestionItemView','showGeneralResultsErrorView','isPremiumPlugin','showNoChangesView','382344AeHZnC','attachToDom','getChangeElement','element','hideDiffInBalloon','fire','outdated','showReviewCompletedView','1243001MpQiLD','_bodyCollection','showReviewCheckResultsView','showCheckRunResult','10741128kzoGmW','showChangeBalloon','rejected','locale','dismissChange','error-chunk','finishReview','abortReviewStream','AIReviewModeUI','detachFromDom','error-general','95LRVYdI','showActionsWhenResultIsReady','2552767jCsaYv','setAvailableChecks','showDiffInBalloon','retryReview','addCheckRunResult','context','pluginName','reviewMode','status'];_0x20ac=function(){return _0x396458;};return _0x20ac();}export class AIReviewModeUI extends _0x1f759c{[_0x1c967c(0x208)];[_0x1c967c(0x1e1)];[_0x1c967c(0x1ee)];static get[_0x1c967c(0x222)](){return[_0x280fe3];}static get[_0x1c967c(0x204)](){const _0x4f6f9f=_0x1c967c;return _0x4f6f9f(0x1f9);}static get[_0x1c967c(0x1c7)](){return!0x0;}static get[_0x1c967c(0x1e3)](){return!0x0;}constructor(_0x1cc48f){const _0x778af8=_0x1c967c;super(_0x1cc48f),this[_0x778af8(0x1ee)]=new _0x5cc209(this[_0x778af8(0x203)][_0x778af8(0x1f4)]),this[_0x778af8(0x1ee)][_0x778af8(0x1e6)](),this[_0x778af8(0x208)]=new _0x58de69(this[_0x778af8(0x203)][_0x778af8(0x1f4)]),this[_0x778af8(0x208)][_0x778af8(0x212)](...AI_REVIEW_MODE_UI_EVENT_NAMES)['to'](this),this[_0x778af8(0x1e1)]=new _0x4b383b(this[_0x778af8(0x203)][_0x778af8(0x1f4)],this[_0x778af8(0x1ee)]),this[_0x778af8(0x1e1)][_0x778af8(0x212)](_0x778af8(0x21c),_0x778af8(0x1f5),_0x778af8(0x20d))['to'](this);}[_0x1c967c(0x209)](){const _0x49acee=_0x1c967c,_0x3b7d6=this[_0x49acee(0x203)][_0x49acee(0x1dd)][_0x49acee(0x21a)](_0x49acee(0x1d4));_0x3b7d6[_0x49acee(0x21d)]['on'](_0x49acee(0x1da),(_0x25aee8,_0x5cb979)=>{const _0x4c3ffb=_0x49acee;_0x4c3ffb(0x205)===_0x5cb979?this[_0x4c3ffb(0x1ea)](_0x4c3ffb(0x20e)):this[_0x4c3ffb(0x1ea)](_0x4c3ffb(0x215));}),_0x3b7d6[_0x49acee(0x21d)][_0x49acee(0x1d9)]({'id':_0x49acee(0x205),'buttonLabel':_0x4321bb(this[_0x49acee(0x203)][_0x49acee(0x1f4)],_0x49acee(0x218)),'buttonIcon':_0x1886db,'order':0x0,'content':this[_0x49acee(0x208)]});}[_0x1c967c(0x219)](){const _0x20f123=_0x1c967c;this[_0x20f123(0x1ee)][_0x20f123(0x1fa)](),super[_0x20f123(0x219)]();}[_0x1c967c(0x1ff)](_0x12c961){const _0x42afdb=_0x1c967c;this[_0x42afdb(0x208)][_0x42afdb(0x207)][_0x42afdb(0x210)]()||this[_0x42afdb(0x208)][_0x42afdb(0x207)][_0x42afdb(0x217)](_0x12c961),this[_0x42afdb(0x208)][_0x42afdb(0x1cc)]();}[_0x1c967c(0x1ce)](){const _0x20f6fd=_0x1c967c;this[_0x20f6fd(0x1ea)](_0x20f6fd(0x20e));}[_0x1c967c(0x1d0)](_0x309088){const _0x5d3f05=_0x1c967c;_0x309088&&(_0x5d3f05(0x1fb)!==_0x309088[_0x5d3f05(0x206)]?_0x5d3f05(0x1f6)!==_0x309088[_0x5d3f05(0x206)]?this[_0x5d3f05(0x208)][_0x5d3f05(0x1ef)]():this[_0x5d3f05(0x1d3)]():this[_0x5d3f05(0x1e2)]());}[_0x1c967c(0x1f0)](_0x2c42ca){const _0x388b44=_0x1c967c;this[_0x388b44(0x208)][_0x388b44(0x202)](_0x2c42ca);}[_0x1c967c(0x1e2)](){const _0x4ed51e=_0x1c967c;this[_0x4ed51e(0x208)][_0x4ed51e(0x1e2)]();}[_0x1c967c(0x21e)](_0x336950){const _0x32eac7=_0x1c967c;this[_0x32eac7(0x208)][_0x32eac7(0x21e)](_0x336950??_0x4321bb(this[_0x32eac7(0x203)][_0x32eac7(0x1f4)],_0x32eac7(0x1d6)));}[_0x1c967c(0x1d3)](){const _0x5d01f7=_0x1c967c;this[_0x5d01f7(0x208)][_0x5d01f7(0x1d3)]();}[_0x1c967c(0x213)](_0x1115b9,_0x1a43a4){const _0x1d3d2d=_0x1c967c;this[_0x1d3d2d(0x208)][_0x1d3d2d(0x20c)][_0x1d3d2d(0x1dc)](_0x1115b9,_0x1a43a4);}[_0x1c967c(0x20f)](_0x4a9273){const _0x3afa8f=_0x1c967c;this[_0x3afa8f(0x208)][_0x3afa8f(0x20c)][_0x3afa8f(0x1ca)]()[_0x3afa8f(0x1de)](_0x2b84b0=>{const _0x521c27=_0x3afa8f;_0x2b84b0['id']===_0x4a9273&&_0x2b84b0[_0x521c27(0x20b)]();});}[_0x1c967c(0x21f)](){const _0x2ef0af=_0x1c967c;this[_0x2ef0af(0x208)][_0x2ef0af(0x20c)][_0x2ef0af(0x1ca)]()[_0x2ef0af(0x1de)](_0xd530b7=>_0xd530b7[_0x2ef0af(0x214)]());}[_0x1c967c(0x220)](_0x2aac14,_0x30aedd){const _0x4214ea=_0x1c967c;_0x4214ea(0x21b)===_0x30aedd||_0x4214ea(0x1f3)===_0x30aedd||_0x4214ea(0x1eb)===_0x30aedd?this[_0x4214ea(0x208)][_0x4214ea(0x20c)][_0x4214ea(0x1d8)](_0x2aac14,_0x30aedd):this[_0x4214ea(0x208)][_0x4214ea(0x20c)][_0x4214ea(0x20a)](_0x2aac14,_0x30aedd);}[_0x1c967c(0x1ec)](){const _0x5ad555=_0x1c967c;this[_0x5ad555(0x208)][_0x5ad555(0x1ec)]();}[_0x1c967c(0x1fd)](){const _0x167990=_0x1c967c;this[_0x167990(0x208)][_0x167990(0x1fd)]();}[_0x1c967c(0x1e4)](){const _0xb56f4c=_0x1c967c;this[_0xb56f4c(0x208)][_0xb56f4c(0x1e4)]();}[_0x1c967c(0x1d2)](){const _0x378623=_0x1c967c;this[_0x378623(0x208)][_0x378623(0x1d2)]();}[_0x1c967c(0x1f2)](_0x107937,_0x308f46,_0xe23577,_0x441a36,_0x437b70,_0x1aa48c){const _0x5d6368=_0x1c967c;this[_0x5d6368(0x1e1)][_0x5d6368(0x1cd)](_0x107937,_0x308f46,_0xe23577,_0x441a36,_0x437b70,_0x1aa48c);}[_0x1c967c(0x1e0)](){const _0x5dfbce=_0x1c967c;this[_0x5dfbce(0x1e1)][_0x5dfbce(0x1d5)]();}[_0x1c967c(0x1e9)](){const _0x2602e3=_0x1c967c;this[_0x2602e3(0x1e1)][_0x2602e3(0x1e9)]();}[_0x1c967c(0x200)](){const _0x193273=_0x1c967c;this[_0x193273(0x1e1)][_0x193273(0x200)]();}[_0x1c967c(0x1e7)](_0x9c032c){const _0x5d1977=_0x1c967c,_0x4204bb=this[_0x5d1977(0x208)][_0x5d1977(0x20c)][_0x5d1977(0x1ca)]()[_0x5d1977(0x1d7)](_0x13d5a6=>_0x13d5a6['id']===_0x9c032c);return _0x4204bb?_0x4204bb[_0x5d1977(0x1e8)]:null;}[_0x1c967c(0x20d)](){const _0x1d0f1a=_0x1c967c;this[_0x1d0f1a(0x1e1)][_0x1d0f1a(0x20d)]();}}