@ckeditor/ckeditor5-ai 47.7.0-alpha.4 → 47.7.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.js +5 -5
- package/package.json +15 -15
- package/src/aiactions/aiactions.js +1 -1
- package/src/aiactions/model/aiactionsreply.js +1 -1
- package/src/aiassistant/adapters/aiadapter.js +1 -1
- package/src/aiassistant/adapters/aitextadapter.js +1 -1
- package/src/aiassistant/adapters/awstextadapter.js +1 -1
- package/src/aiassistant/adapters/openaitextadapter.js +1 -1
- package/src/aiassistant/aiassistant.js +1 -1
- package/src/aiassistant/aiassistantediting.js +1 -1
- package/src/aiassistant/aiassistantui.js +1 -1
- package/src/aiassistant/ui/form/aiformcontentarea.js +1 -1
- package/src/aiassistant/ui/form/aiformerrorview.js +1 -1
- package/src/aiassistant/ui/form/aiformpromptview.js +1 -1
- package/src/aiassistant/ui/form/aiformtoolbarview.js +1 -1
- package/src/aiassistant/ui/form/aiformview.js +1 -1
- package/src/aiassistant/ui/form/aihistorylistitemview.js +1 -1
- package/src/aiassistant/ui/form/aihistorylistview.js +1 -1
- package/src/aiassistant/ui/showaiassistantcommand.js +1 -1
- package/src/aiballoon/aiballoon.js +1 -1
- package/src/aichat/aichat.js +1 -1
- package/src/aichat/aichatballoon.js +1 -1
- package/src/aichat/aichatcontroller.js +1 -1
- package/src/aichat/aichatui.js +1 -1
- package/src/aichat/model/aichatcontext.js +1 -1
- package/src/aichat/ui/aichatballoonview.js +1 -1
- package/src/aichat/ui/aichatcontrolsview.js +1 -1
- package/src/aichat/ui/aichatheaderview.js +1 -1
- package/src/aichat/ui/aichatview.js +1 -1
- package/src/aichat/ui/controls/aichatchipsoverflowmanager.js +1 -1
- package/src/aichat/ui/controls/aichatcontextitembuttonview.js +1 -1
- package/src/aichat/ui/controls/aichatcontextpanelurlinputview.js +1 -1
- package/src/aichat/ui/controls/aichatcontextpanelview.js +1 -1
- package/src/aichat/ui/controls/aichatcontrolsloaderview.js +1 -1
- package/src/aichat/ui/controls/aichatpromptcapabilitiesview.js +1 -1
- package/src/aichat/ui/controls/aichatpromptinputview.js +1 -1
- package/src/aichat/ui/controls/resources/aichatcontextresourcesview.js +1 -1
- package/src/aichat/ui/controls/resources/aichatresourcesballoonview.js +1 -1
- package/src/aichat/ui/controls/resources/aichatresourcessearchinputview.js +1 -1
- package/src/aichat/ui/feed/aichatfeedcontextchipsview.js +1 -1
- package/src/aichat/ui/feed/aichatfeedinteractionheaderview.js +1 -1
- package/src/aichat/ui/feed/aichatfeedreplyitemview.js +1 -1
- package/src/aichat/ui/feed/aichatfeedsuggestionitemactionsview.js +1 -1
- package/src/aichathistory/aichathistory.js +1 -1
- package/src/aichathistory/aichathistorycontroller.js +1 -1
- package/src/aichathistory/aichathistoryui.js +1 -1
- package/src/aichathistory/ui/aichathistorylistitemview.js +2 -2
- package/src/aichathistory/ui/aichathistoryview.js +1 -1
- package/src/aichatshortcuts/aichatshortcuts.js +1 -1
- package/src/aichatshortcuts/ui/aichatshortcutview.js +1 -1
- package/src/aicore/aiconnector.js +1 -1
- package/src/aicore/aiediting.js +1 -1
- package/src/aicore/model/aiinteraction.js +1 -1
- package/src/aicore/model/aimodels.js +1 -1
- package/src/aicore/model/aireply.js +1 -1
- package/src/aicore/pipeline/airesponseapplier.js +2 -2
- package/src/aicore/pipeline/airesponseparser.js +2 -2
- package/src/aicore/ui/aidisclaimerview.js +1 -1
- package/src/aicore/ui/suggestioncontainer/aiminitoolbarview.js +1 -1
- package/src/aicore/ui/suggestioncontainer/aisuggestionbodyview.js +1 -1
- package/src/aicore/ui/suggestioncontainer/aisuggestioncontentpartheaderview.js +1 -1
- package/src/aicore/ui/suggestioncontainer/aisuggestioncontentpartstateview.js +1 -1
- package/src/aicore/ui/suggestioncontainer/aisuggestioncontentparttoolbarview.js +1 -1
- package/src/aicore/ui/suggestioncontainer/aisuggestionheaderview.js +1 -1
- package/src/aicore/ui/suggestioncontainer/aisuggestionloaderview.js +1 -1
- package/src/aicore/ui/suggestioncontainer/aiwebsourcesview.js +1 -1
- package/src/aicore/utils/createresizebutton.js +1 -1
- package/src/aicore/utils/documentrange.js +1 -1
- package/src/aicore/utils/getoperationsfromreply.js +1 -1
- package/src/aicore/utils/getsuggestionpartsfromreply.js +1 -1
- package/src/aicore/utils/htmlparser.js +1 -1
- package/src/aicore/utils/htmlstreamer.js +1 -1
- package/src/aieditorintegration/aieditorintegration.js +1 -1
- package/src/aieditorintegration/aitogglebutton/aitogglebuttonui.js +1 -1
- package/src/aiquickactions/aiquickactions.js +1 -1
- package/src/aiquickactions/aiquickactionscommand.js +1 -1
- package/src/aiquickactions/aiquickactionsediting.js +1 -1
- package/src/aiquickactions/aiquickactionsui.js +1 -1
- package/src/aiquickactions/ui/aiquickactionsbuttoncreator.js +1 -1
- package/src/aiquickactions/ui/aiquickactionsdropdowncontentview.js +1 -1
- package/src/aiquickactions/ui/aiquickactionsdropdowncreator.js +1 -1
- package/src/aiquickactions/ui/balloon/aiactionsballoondisclaimerview.js +1 -1
- package/src/aiquickactions/ui/balloon/aiactionsballoontoolbarview.js +1 -1
- package/src/aiquickactions/ui/balloon/aiactionsballoonview.js +1 -1
- package/src/aireviewcore/aireviewcorecontroller.js +1 -1
- package/src/aireviewcore/aireviewcoreediting.js +1 -1
- package/src/aireviewcore/aireviewcoreui.js +1 -1
- package/src/aireviewcore/model/aireviewchecklist.js +1 -1
- package/src/aireviewcore/model/aireviewcheckrun.js +1 -1
- package/src/aireviewcore/model/aireviewsystemcheckrun.js +1 -1
- package/src/aireviewcore/ui/aireviewcoreballoonsuggestionview.js +1 -1
- package/src/aireviewcore/ui/aireviewcorechecklistitemresultview.js +1 -1
- package/src/aireviewcore/ui/aireviewcorecustomcheckview.js +1 -1
- package/src/aireviewcore/ui/aireviewcorefinishreviewbuttonview.js +1 -1
- package/src/aireviewcore/ui/aireviewcorereviewcommandlistitemview.js +1 -1
- package/src/aireviewcore/ui/aireviewcoreuicheckresultsview.js +1 -1
- package/src/aireviewcore/ui/form/aireviewcoreformdropdown.js +1 -1
- package/src/aireviewmode/aireviewmode.js +1 -1
- package/src/aireviewmode/aireviewmodeui.js +1 -1
- package/src/aireviewmode/model/aireviewcheckcustom.js +1 -1
- package/src/aireviewmode/model/aireviewcheckextra.js +1 -1
- package/src/aireviewmode/model/aireviewcustomcheckrun.js +1 -1
- package/src/aireviewmode/model/aireviewmodechecklist.js +1 -1
- package/src/aitabs/aitabs.js +1 -1
- package/src/aitabs/tabs/tabbuttonview.js +1 -1
- package/src/aitranslate/aitranslate.js +1 -1
- package/src/aitranslate/aitranslatecontroller.js +1 -1
- package/src/aitranslate/aitranslateui.js +1 -1
- package/src/aitranslate/model/aitranslatecheck.js +1 -1
- package/src/aitranslate/ui/aitranslatechecklistview.js +1 -1
- package/src/aitranslate/ui/aitranslatecheckresultsview.js +1 -1
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const _0x4a057b=_0x2ba5;(function(_0x2a4be2,_0x38d465){const _0x1502b3=_0x2ba5,_0x8108fd=_0x2a4be2();while(!![]){try{const _0x14ad3f=parseInt(_0x1502b3(0x17c))/0x1*(-parseInt(_0x1502b3(0x1c2))/0x2)+-parseInt(_0x1502b3(0x169))/0x3*(-parseInt(_0x1502b3(0x1bc))/0x4)+-parseInt(_0x1502b3(0x15a))/0x5+parseInt(_0x1502b3(0x1b3))/0x6+parseInt(_0x1502b3(0x170))/0x7*(parseInt(_0x1502b3(0x155))/0x8)+parseInt(_0x1502b3(0x1d0))/0x9*(-parseInt(_0x1502b3(0x1ae))/0xa)+-parseInt(_0x1502b3(0x187))/0xb*(-parseInt(_0x1502b3(0x199))/0xc);if(_0x14ad3f===_0x38d465)break;else _0x8108fd['push'](_0x8108fd['shift']());}catch(_0x37416c){_0x8108fd['push'](_0x8108fd['shift']());}}}(_0x3cdb,0xc2d80));import{createParser as _0x58a608}from'eventsource-parser';import{ContextPlugin as _0x42708a}from'ckeditor5/src/core.js';function _0x3cdb(){const _0x19ba50=['signal','continue','feed','/conversations/','FIX_GRAMMAR','/documents/','fetchDocument','/reviews/custom/calls/','make-longer','Bearer\x20','ai-missing-token','code','getModels','/reviews/system/','CONTINUE','queryAssistant','/models/1?','data','deleteConversation','value','Content-Type','upsertCustomAIReviewRating','TRANSLATE','upsertAIReviewRating','callCustomReview','updateConversation','language','4116840IcivEr','/web-resources','fetchConversationMessages','IMPROVE_WRITING','/files/','2284555XYungC','/actions/system/','json','deleteWebResource','PUT','callSystemReview','uploadFile','application/json','message','/messages/','getReader','plugins','status','POST','group','24414mABkvj','_sendApiRequest','createdAt','token','AIConnector','false','/conversations','7EsmWYw','_handleError','requires','releaseLock','improve-writing','true','push','/conversations?','fix-grammar','deleteDocument','/actions/custom/calls','totalCount','252725daGZmF','MAKE_TONE_CASUAL','_getStreamReader','parse','ai.serviceUrl','MAKE_SHORTER','positiveCount','config','sortBy','traceId','uploadDocument','1716077ZWvjep','read','executeAction','/actions/custom/calls/','stringify','then','file','/calls/','uploadUrl','limit','GET','abortController','excludeEmpty','attributes','pluginName','request','AbortError','body','108YRgzKm','isOfficialPlugin','PATCH','/files','upsertCustomAIActionRating','startConversation','ai-request-failed','reset','/reviews/custom/calls','upsertAIActionRating','init','ai-request-aborted','desc','CloudServices','text','executeCustomAction','/messages','MAKE_LONGER','length','MAKE_TONE_FORMAL','/calls','1920VTsGBK','items','/web-resources/','DELETE','upsertAIChatRating','1644348cyfsTv','/ratings','100','fetchConversations','get','modificationId','order','fetchConversation','deleteFile','44gSqCSi','define','translate','isPremiumPlugin','context','catch','2DCthUv','make-tone-casual','statusText','decode','https://ai.cke-cs.com/v1','append','_decoder','make-shorter','_apiUrl','name','_token','toString','make-tone-formal','/documents','36306dSdEjm'];_0x3cdb=function(){return _0x19ba50;};return _0x3cdb();}import{CKEditorError as _0x1470c8}from'ckeditor5/src/utils.js';function _0x2ba5(_0x199f65,_0x51f2df){const _0x3cdb75=_0x3cdb();return _0x2ba5=function(_0x2ba5ca,_0x16eee5){_0x2ba5ca=_0x2ba5ca-0x14f;let _0x33fc56=_0x3cdb75[_0x2ba5ca];return _0x33fc56;},_0x2ba5(_0x199f65,_0x51f2df);}export var AIActionsNames;!function(_0x4039eb){const _0x1b15dc=_0x2ba5;_0x4039eb[_0x1b15dc(0x1df)]=_0x1b15dc(0x1d2),_0x4039eb[_0x1b15dc(0x1d5)]=_0x1b15dc(0x178),_0x4039eb[_0x1b15dc(0x158)]=_0x1b15dc(0x174),_0x4039eb[_0x1b15dc(0x1aa)]=_0x1b15dc(0x1d9),_0x4039eb[_0x1b15dc(0x181)]=_0x1b15dc(0x1c9),_0x4039eb[_0x1b15dc(0x17d)]=_0x1b15dc(0x1c3),_0x4039eb[_0x1b15dc(0x1ac)]=_0x1b15dc(0x1ce),_0x4039eb[_0x1b15dc(0x150)]=_0x1b15dc(0x1be);}(AIActionsNames||(AIActionsNames={}));export class AIConnector extends _0x42708a{[_0x4a057b(0x1ca)];[_0x4a057b(0x1cc)];[_0x4a057b(0x1c8)];static get[_0x4a057b(0x172)](){const _0x5de00c=_0x4a057b;return[_0x5de00c(0x1a6)];}static get[_0x4a057b(0x195)](){const _0xc3f878=_0x4a057b;return _0xc3f878(0x16d);}static get[_0x4a057b(0x19a)](){return!0x0;}static get[_0x4a057b(0x1bf)](){return!0x0;}constructor(_0x10587b){const _0x47cc2d=_0x4a057b;super(_0x10587b),this[_0x47cc2d(0x1c0)][_0x47cc2d(0x183)][_0x47cc2d(0x1bd)](_0x47cc2d(0x180),_0x47cc2d(0x1c6)),this[_0x47cc2d(0x1ca)]=this[_0x47cc2d(0x1c0)][_0x47cc2d(0x183)][_0x47cc2d(0x1b7)](_0x47cc2d(0x180)),this[_0x47cc2d(0x1cc)]=null,this[_0x47cc2d(0x1c8)]=new TextDecoder();}[_0x4a057b(0x1a3)](){const _0x261eb3=_0x4a057b,_0x4ea8c6=this[_0x261eb3(0x1c0)][_0x261eb3(0x165)][_0x261eb3(0x1b7)](_0x261eb3(0x1a6));if(!_0x4ea8c6[_0x261eb3(0x16c)])throw new _0x1470c8(_0x261eb3(0x1db),this);this[_0x261eb3(0x1cc)]=_0x4ea8c6[_0x261eb3(0x16c)];}[_0x4a057b(0x19e)](_0x2627c1,_0x33baa6){const _0xd568e=_0x4a057b,_0x3455e8=this[_0xd568e(0x16a)](_0xd568e(0x16f),_0xd568e(0x167),{'id':_0x2627c1,'group':_0x33baa6});return{'getConversation':async()=>(await _0x3455e8[_0xd568e(0x196)])[_0xd568e(0x15c)](),'abortController':_0x3455e8[_0xd568e(0x192)]};}[_0x4a057b(0x1e0)]({message:_0x35b356,conversationId:_0x597883,parts:_0x2ae9a6,capabilities:_0x5288dd,model:_0x4decb9,attributes:_0x1eb237}){const _0x5b5e16=_0x4a057b,_0x1e2378={'prompt':_0x35b356,'content':_0x2ae9a6,'model':_0x4decb9,..._0x5288dd&&{'capabilities':_0x5288dd},..._0x1eb237&&{'attributes':_0x1eb237}},_0x104b3b=this[_0x5b5e16(0x16a)](_0x5b5e16(0x1d4)+_0x597883+_0x5b5e16(0x1a9),_0x5b5e16(0x167),_0x1e2378);return{'getStream':async()=>{const _0x7db5fa=_0x5b5e16,_0x3b28ab=(await _0x104b3b[_0x7db5fa(0x196)])[_0x7db5fa(0x198)];return this[_0x7db5fa(0x17e)](_0x3b28ab);},'abortController':_0x104b3b[_0x5b5e16(0x192)]};}[_0x4a057b(0x1a8)]({content:_0x3f877e,message:_0x1a6d46,model:_0x161ea5,outputFormat:_0x2550ac}){const _0x48436e=_0x4a057b,_0x1dd8d2={'content':[{'type':_0x48436e(0x1a7),'content':_0x3f877e}],'prompt':_0x1a6d46,'model':_0x161ea5,'outputFormat':_0x2550ac},_0x3e4bd9=this[_0x48436e(0x16a)](_0x48436e(0x17a),_0x48436e(0x167),_0x1dd8d2);return{'getStream':async()=>{const _0x5ba150=_0x48436e,_0x21cee4=(await _0x3e4bd9[_0x5ba150(0x196)])[_0x5ba150(0x198)];return this[_0x5ba150(0x17e)](_0x21cee4);},'abortController':_0x3e4bd9[_0x48436e(0x192)]};}[_0x4a057b(0x189)]({actionName:_0x42b2d7,content:_0x475a35,args:_0x5168c7}){const _0xd089d0=_0x4a057b,_0x56b8a2={'content':[{'type':_0xd089d0(0x1a7),'content':_0x475a35}],'args':_0x5168c7},_0x13088a=this[_0xd089d0(0x16a)](_0xd089d0(0x15b)+_0x42b2d7+_0xd089d0(0x1ad),_0xd089d0(0x167),_0x56b8a2);return{'getStream':async()=>{const _0x47d495=_0xd089d0,_0x2e7219=(await _0x13088a[_0x47d495(0x196)])[_0x47d495(0x198)];return this[_0x47d495(0x17e)](_0x2e7219);},'abortController':_0x13088a[_0xd089d0(0x192)]};}[_0x4a057b(0x160)](_0x2a3dea,_0x118994,_0x681857){const _0x4225e5=_0x4a057b,_0x1c9247=new FormData();_0x1c9247[_0x4225e5(0x1c7)](_0x4225e5(0x18d),_0x118994,_0x118994[_0x4225e5(0x1cb)]),_0x681857&&_0x1c9247[_0x4225e5(0x1c7)](_0x4225e5(0x194),JSON[_0x4225e5(0x18b)](_0x681857));const _0x8dde8=this[_0x4225e5(0x16a)](_0x4225e5(0x1d4)+_0x2a3dea+_0x4225e5(0x19c),_0x4225e5(0x167),_0x1c9247);return{'getId':async()=>(await _0x8dde8[_0x4225e5(0x196)])[_0x4225e5(0x15c)](),'abortController':_0x8dde8[_0x4225e5(0x192)]};}[_0x4a057b(0x1d7)](_0x49626a,_0x58913d){const _0x3bdf9f=_0x4a057b,_0x479c85=this[_0x3bdf9f(0x16a)](_0x3bdf9f(0x1d4)+_0x49626a+_0x3bdf9f(0x1d6)+_0x58913d,_0x3bdf9f(0x191));return{'getDocument':async()=>(await _0x479c85[_0x3bdf9f(0x196)])[_0x3bdf9f(0x15c)](),'abortController':_0x479c85[_0x3bdf9f(0x192)]};}[_0x4a057b(0x186)](_0x4290d4,_0x1a13b1,_0x5137b6){const _0x120ff8=_0x4a057b,_0x2d302a={'content':_0x1a13b1};_0x5137b6&&(_0x2d302a[_0x120ff8(0x194)]=_0x5137b6);const _0x6997d3=this[_0x120ff8(0x16a)](_0x120ff8(0x1d4)+_0x4290d4+_0x120ff8(0x1cf),_0x120ff8(0x167),_0x2d302a);return{'getId':async()=>(await _0x6997d3[_0x120ff8(0x196)])[_0x120ff8(0x15c)](),'abortController':_0x6997d3[_0x120ff8(0x192)]};}[_0x4a057b(0x1b6)](_0x41a8dc,_0x98c226={}){const _0xa6cf=_0x4a057b,_0xe5bbef=new URLSearchParams();_0xe5bbef[_0xa6cf(0x1c7)](_0xa6cf(0x168),_0x41a8dc),_0xe5bbef[_0xa6cf(0x1c7)](_0xa6cf(0x193),!0x1!==_0x98c226[_0xa6cf(0x193)]?_0xa6cf(0x175):_0xa6cf(0x16e)),_0xe5bbef[_0xa6cf(0x1c7)](_0xa6cf(0x190),_0x98c226[_0xa6cf(0x190)]?_0x98c226[_0xa6cf(0x190)][_0xa6cf(0x1cd)]():_0xa6cf(0x1b5)),_0xe5bbef[_0xa6cf(0x1c7)](_0xa6cf(0x184),_0x98c226[_0xa6cf(0x184)]?_0x98c226[_0xa6cf(0x184)]:_0xa6cf(0x16b)),_0xe5bbef[_0xa6cf(0x1c7)](_0xa6cf(0x1b9),_0x98c226[_0xa6cf(0x1b9)]?_0x98c226[_0xa6cf(0x1b9)]:_0xa6cf(0x1a5));const _0xc5db49=this[_0xa6cf(0x16a)](_0xa6cf(0x177)+_0xe5bbef[_0xa6cf(0x1cd)](),_0xa6cf(0x191));return{'getConversations':async()=>{const _0x4ce37e=_0xa6cf,_0x5a15ea=await _0xc5db49[_0x4ce37e(0x196)];return(await _0x5a15ea[_0x4ce37e(0x15c)]())[_0x4ce37e(0x1af)];},'abortController':_0xc5db49[_0xa6cf(0x192)]};}[_0x4a057b(0x1e3)](_0x1114c2){const _0x542b24=_0x4a057b,_0x8a8a91=this[_0x542b24(0x16a)](_0x542b24(0x1d4)+_0x1114c2,_0x542b24(0x1b1));return{'execute':async()=>{const _0x556061=_0x542b24;await _0x8a8a91[_0x556061(0x196)];},'abortController':_0x8a8a91[_0x542b24(0x192)]};}[_0x4a057b(0x153)](_0xc8f8d7,_0xcb5468){const _0x4e73ae=_0x4a057b,_0x41cd89=this[_0x4e73ae(0x16a)](_0x4e73ae(0x1d4)+_0xc8f8d7,_0x4e73ae(0x19b),_0xcb5468);return{'getResult':async()=>(await _0x41cd89[_0x4e73ae(0x196)],_0xcb5468),'abortController':_0x41cd89[_0x4e73ae(0x192)]};}[_0x4a057b(0x1ba)](_0x1f57cf){const _0x7fc495=_0x4a057b,_0x423ca5=this[_0x7fc495(0x16a)](_0x7fc495(0x1d4)+_0x1f57cf,_0x7fc495(0x191));return{'getConversation':async()=>(await _0x423ca5[_0x7fc495(0x196)])[_0x7fc495(0x15c)](),'abortController':_0x423ca5[_0x7fc495(0x192)]};}[_0x4a057b(0x157)](_0x3e914e){const _0x17aac8=_0x4a057b,_0x48b346=this[_0x17aac8(0x16a)](_0x17aac8(0x1d4)+_0x3e914e+_0x17aac8(0x1a9),_0x17aac8(0x191));return{'getMessages':async()=>{const _0x266b83=_0x17aac8,_0x2e58ab=await _0x48b346[_0x266b83(0x196)];return(await _0x2e58ab[_0x266b83(0x15c)]())[_0x266b83(0x1af)];},'abortController':_0x48b346[_0x17aac8(0x192)]};}[_0x4a057b(0x18f)](_0x2bd4f6,_0x4f7a5e,_0x2179b8){const _0x5747e5=_0x4a057b,_0x8914cd=this[_0x5747e5(0x16a)](_0x5747e5(0x1d4)+_0x2bd4f6+_0x5747e5(0x156),_0x5747e5(0x167),{'url':_0x4f7a5e,'attributes':_0x2179b8});return{'getId':async()=>(await _0x8914cd[_0x5747e5(0x196)])[_0x5747e5(0x15c)](),'abortController':_0x8914cd[_0x5747e5(0x192)]};}[_0x4a057b(0x1dd)](_0x44c53f='en'){const _0x4527c0=_0x4a057b,_0x5dd3fe=new URLSearchParams();_0x5dd3fe[_0x4527c0(0x1c7)](_0x4527c0(0x154),_0x44c53f);const _0x42ba16=_0x4527c0(0x1e1)+_0x5dd3fe[_0x4527c0(0x1cd)](),_0x4294ec=this[_0x4527c0(0x16a)](_0x42ba16,_0x4527c0(0x191));return{'list':async()=>await(await _0x4294ec[_0x4527c0(0x196)])[_0x4527c0(0x15c)](),'abortController':_0x4294ec[_0x4527c0(0x192)]};}[_0x4a057b(0x1bb)](_0x2c1c4f,_0x30d380){const _0x18b80f=_0x4a057b,_0x26a6b1=this[_0x18b80f(0x16a)](_0x18b80f(0x1d4)+_0x2c1c4f+_0x18b80f(0x159)+_0x30d380,_0x18b80f(0x1b1));return{'execute':async()=>{const _0x24c05f=_0x18b80f;await _0x26a6b1[_0x24c05f(0x196)];},'abortController':_0x26a6b1[_0x18b80f(0x192)]};}[_0x4a057b(0x179)](_0x26e246,_0x382903){const _0x5bd6fa=_0x4a057b,_0x5e3ebe=this[_0x5bd6fa(0x16a)](_0x5bd6fa(0x1d4)+_0x26e246+_0x5bd6fa(0x1d6)+_0x382903,_0x5bd6fa(0x1b1));return{'execute':async()=>{const _0x50a0be=_0x5bd6fa;await _0x5e3ebe[_0x50a0be(0x196)];},'abortController':_0x5e3ebe[_0x5bd6fa(0x192)]};}[_0x4a057b(0x15d)](_0x54f295,_0x3ea0f0){const _0x4a8815=_0x4a057b,_0x235e75=this[_0x4a8815(0x16a)](_0x4a8815(0x1d4)+_0x54f295+_0x4a8815(0x1b0)+_0x3ea0f0,_0x4a8815(0x1b1));return{'execute':async()=>{const _0x34f1cc=_0x4a8815;await _0x235e75[_0x34f1cc(0x196)];},'abortController':_0x235e75[_0x4a8815(0x192)]};}[_0x4a057b(0x15f)]({reviewName:_0x3805a6,content:_0x347e98,args:_0x5a38e6}){const _0x8b1b8a=_0x4a057b,_0x1d137b=this[_0x8b1b8a(0x16a)](_0x8b1b8a(0x1de)+_0x3805a6+_0x8b1b8a(0x1ad),_0x8b1b8a(0x167),{'content':[{'type':_0x8b1b8a(0x1a7),'content':_0x347e98}],'args':_0x5a38e6});return{'getStream':async()=>{const _0x252825=_0x8b1b8a,_0x403a7e=(await _0x1d137b[_0x252825(0x196)])[_0x252825(0x198)];return this[_0x252825(0x17e)](_0x403a7e);},'abortController':_0x1d137b[_0x8b1b8a(0x192)]};}[_0x4a057b(0x152)]({content:_0x31461a,prompt:_0x944aae,model:_0x37a1b7}){const _0x281c5e=_0x4a057b,_0x20f122=this[_0x281c5e(0x16a)](_0x281c5e(0x1a1),_0x281c5e(0x167),{'content':[{'type':_0x281c5e(0x1a7),'content':_0x31461a}],'prompt':_0x944aae,'model':_0x37a1b7});return{'getStream':async()=>{const _0x15aeb9=_0x281c5e,_0x374c39=(await _0x20f122[_0x15aeb9(0x196)])[_0x15aeb9(0x198)];return this[_0x15aeb9(0x17e)](_0x374c39);},'abortController':_0x20f122[_0x281c5e(0x192)]};}[_0x4a057b(0x1b2)](_0x4ab5c4,_0xe3f7a6,_0x4de61d){const _0x348614=_0x4a057b,_0x29595b=this[_0x348614(0x16a)](_0x348614(0x1d4)+_0x4ab5c4+_0x348614(0x163)+_0xe3f7a6+_0x348614(0x1b4),_0x348614(0x15e),{'positiveCount':_0x4de61d[_0x348614(0x182)],'totalCount':_0x4de61d[_0x348614(0x17b)],'modificationId':_0x4de61d[_0x348614(0x1b8)]});return{'execute':async()=>{const _0x36a01f=_0x348614;await _0x29595b[_0x36a01f(0x196)];},'abortController':_0x29595b[_0x348614(0x192)]};}[_0x4a057b(0x1a2)](_0x4f1ef8,_0x54cd14,_0x51897d){const _0x30dba8=_0x4a057b,_0x36827a=this[_0x30dba8(0x16a)](_0x30dba8(0x15b)+_0x4f1ef8+_0x30dba8(0x18e)+_0x54cd14+_0x30dba8(0x1b4),_0x30dba8(0x15e),{'positiveCount':_0x51897d[_0x30dba8(0x182)],'totalCount':_0x51897d[_0x30dba8(0x17b)]});return{'execute':async()=>{const _0x3435b2=_0x30dba8;await _0x36827a[_0x3435b2(0x196)];},'abortController':_0x36827a[_0x30dba8(0x192)]};}[_0x4a057b(0x19d)](_0x1561db,_0x58c77b){const _0xecc41f=_0x4a057b,_0x2d2da4=this[_0xecc41f(0x16a)](_0xecc41f(0x18a)+_0x1561db+_0xecc41f(0x1b4),_0xecc41f(0x15e),{'positiveCount':_0x58c77b[_0xecc41f(0x182)],'totalCount':_0x58c77b[_0xecc41f(0x17b)]});return{'execute':async()=>{const _0x26f108=_0xecc41f;await _0x2d2da4[_0x26f108(0x196)];},'abortController':_0x2d2da4[_0xecc41f(0x192)]};}[_0x4a057b(0x151)](_0x642b98,_0x27648a,_0x135bea,_0x4404e4){const _0x264803=_0x4a057b,_0x4e369c=this[_0x264803(0x16a)](_0x264803(0x1de)+_0x642b98+_0x264803(0x18e)+_0x27648a+_0x264803(0x1b4),_0x264803(0x15e),{'positiveCount':_0x135bea[_0x264803(0x182)],'totalCount':_0x135bea[_0x264803(0x17b)],'dataId':_0x4404e4});return{'execute':async()=>{const _0x3651c9=_0x264803;await _0x4e369c[_0x3651c9(0x196)];},'abortController':_0x4e369c[_0x264803(0x192)]};}[_0x4a057b(0x14f)](_0x310679,_0x40fbfa,_0x5b7216){const _0x5e77af=_0x4a057b,_0x3ec784=this[_0x5e77af(0x16a)](_0x5e77af(0x1d8)+_0x310679+_0x5e77af(0x1b4),_0x5e77af(0x15e),{'positiveCount':_0x40fbfa[_0x5e77af(0x182)],'totalCount':_0x40fbfa[_0x5e77af(0x17b)],'dataId':_0x5b7216});return{'execute':async()=>{const _0x26395e=_0x5e77af;await _0x3ec784[_0x26395e(0x196)];},'abortController':_0x3ec784[_0x5e77af(0x192)]};}[_0x4a057b(0x16a)](_0x1fe907,_0x3de365,_0x2c4529){const _0x3483bf=_0x4a057b,_0x5d268d=new AbortController(),_0xa8990b=_0x2c4529 instanceof FormData,_0xcdec46={'Authorization':_0x3483bf(0x1da)+this[_0x3483bf(0x1cc)]?.[_0x3483bf(0x1e4)]};_0x2c4529&&!_0xa8990b&&(_0xcdec46[_0x3483bf(0x1e5)]=_0x3483bf(0x161));const _0x18f385={'method':_0x3de365,'headers':_0xcdec46,'signal':_0x5d268d[_0x3483bf(0x1d1)]};return _0x2c4529&&(_0x18f385[_0x3483bf(0x198)]=_0xa8990b?_0x2c4529:JSON[_0x3483bf(0x18b)](_0x2c4529)),{'request':fetch(''+this[_0x3483bf(0x1ca)]+_0x1fe907,_0x18f385)[_0x3483bf(0x1c1)](_0x549bc3=>{const _0x3ba5c5=_0x3483bf;this[_0x3ba5c5(0x171)](_0x549bc3);})[_0x3483bf(0x18c)](_0x401ef6=>_0x401ef6['ok']?_0x401ef6:_0x401ef6[_0x3483bf(0x15c)]()[_0x3483bf(0x18c)](_0x325d9c=>{const _0x16853b=_0x3483bf;throw{'url':this[_0x16853b(0x1ca)],'path':_0x1fe907,'method':_0x3de365,'body':_0x2c4529,'status':(_0x401ef6||{})[_0x16853b(0x166)],'statusText':(_0x401ef6||{})[_0x16853b(0x1c4)],'code':_0x325d9c[_0x16853b(0x1dc)],'message':_0x325d9c[_0x16853b(0x162)],'traceId':_0x325d9c[_0x16853b(0x185)]};})),'abortController':_0x5d268d};}async*[_0x4a057b(0x17e)](_0x54dcb1){const _0x180551=_0x4a057b,_0x5c3caf=[],_0x2a31be=_0x54dcb1[_0x180551(0x164)](),_0x44336d=_0x58a608({'onError':_0x3e6ba1=>{const _0x41d694=_0x180551;this[_0x41d694(0x171)](_0x3e6ba1);},'onEvent':_0x34e281=>{const _0x5940f5=_0x180551;_0x34e281[_0x5940f5(0x1e2)]=JSON[_0x5940f5(0x17f)](_0x34e281[_0x5940f5(0x1e2)]),_0x5c3caf[_0x5940f5(0x176)](_0x34e281);}});try{let _0x4d54df=!0x1;for(;!_0x4d54df;){const {done:_0x27b648,value:_0x4496d4}=await _0x2a31be[_0x180551(0x188)]();_0x27b648&&(_0x4d54df=!0x0),_0x44336d[_0x180551(0x1d3)](this[_0x180551(0x1c8)][_0x180551(0x1c5)](_0x4496d4,{'stream':!0x0})),yield*_0x5c3caf,_0x5c3caf[_0x180551(0x1ab)]=0x0;}}catch(_0x195048){this[_0x180551(0x171)](_0x195048);}finally{_0x2a31be[_0x180551(0x173)](),_0x44336d[_0x180551(0x1a0)]();}}[_0x4a057b(0x171)](_0x28671f){const _0x524231=_0x4a057b;if(_0x28671f instanceof _0x1470c8)throw _0x28671f;if(_0x28671f instanceof Error&&_0x524231(0x197)===_0x28671f[_0x524231(0x1cb)])throw new _0x1470c8(_0x524231(0x1a4),this,{'originalError':_0x28671f});throw new _0x1470c8(_0x524231(0x19f),this,{'originalError':_0x28671f});}}
|
|
23
|
+
function _0xd0c1(_0x2baa74,_0x5bb9b3){const _0x1ea3fc=_0x1ea3();return _0xd0c1=function(_0xd0c10,_0x402376){_0xd0c10=_0xd0c10-0x16d;let _0x422638=_0x1ea3fc[_0xd0c10];return _0x422638;},_0xd0c1(_0x2baa74,_0x5bb9b3);}const _0x5ba333=_0xd0c1;(function(_0x5d1233,_0x182055){const _0x1c30c1=_0xd0c1,_0x4a8b56=_0x5d1233();while(!![]){try{const _0x19a1a3=-parseInt(_0x1c30c1(0x1b4))/0x1+parseInt(_0x1c30c1(0x187))/0x2+-parseInt(_0x1c30c1(0x1c3))/0x3+-parseInt(_0x1c30c1(0x198))/0x4+parseInt(_0x1c30c1(0x189))/0x5+parseInt(_0x1c30c1(0x1cb))/0x6*(-parseInt(_0x1c30c1(0x1cd))/0x7)+-parseInt(_0x1c30c1(0x1cf))/0x8*(-parseInt(_0x1c30c1(0x1b5))/0x9);if(_0x19a1a3===_0x182055)break;else _0x4a8b56['push'](_0x4a8b56['shift']());}catch(_0x1d31af){_0x4a8b56['push'](_0x4a8b56['shift']());}}}(_0x1ea3,0xa5558));import{createParser as _0x5ef35d}from'eventsource-parser';import{ContextPlugin as _0x4739de}from'ckeditor5/src/core.js';import{CKEditorError as _0x5de1d3}from'ckeditor5/src/utils.js';export var AIActionsNames;!function(_0x201e9f){const _0x3bbfbc=_0xd0c1;_0x201e9f[_0x3bbfbc(0x177)]=_0x3bbfbc(0x1e0),_0x201e9f[_0x3bbfbc(0x1b0)]=_0x3bbfbc(0x1fa),_0x201e9f[_0x3bbfbc(0x1a1)]=_0x3bbfbc(0x1f6),_0x201e9f[_0x3bbfbc(0x200)]=_0x3bbfbc(0x1a6),_0x201e9f[_0x3bbfbc(0x1c8)]=_0x3bbfbc(0x1bd),_0x201e9f[_0x3bbfbc(0x1e6)]=_0x3bbfbc(0x17c),_0x201e9f[_0x3bbfbc(0x1f0)]=_0x3bbfbc(0x1e9),_0x201e9f[_0x3bbfbc(0x195)]=_0x3bbfbc(0x1fb);}(AIActionsNames||(AIActionsNames={}));export class AIConnector extends _0x4739de{[_0x5ba333(0x1d0)];[_0x5ba333(0x1d6)];[_0x5ba333(0x196)];static get[_0x5ba333(0x1b1)](){const _0x114d60=_0x5ba333;return[_0x114d60(0x1dd)];}static get[_0x5ba333(0x1a3)](){const _0x2b91f6=_0x5ba333;return _0x2b91f6(0x1ed);}static get[_0x5ba333(0x1eb)](){return!0x0;}static get[_0x5ba333(0x199)](){return!0x0;}constructor(_0x1349ca){const _0x8892da=_0x5ba333;super(_0x1349ca),this[_0x8892da(0x1c6)][_0x8892da(0x1be)][_0x8892da(0x1b2)](_0x8892da(0x1b3),_0x8892da(0x1f5)),this[_0x8892da(0x1d0)]=this[_0x8892da(0x1c6)][_0x8892da(0x1be)][_0x8892da(0x1e3)](_0x8892da(0x1b3)),this[_0x8892da(0x1d6)]=null,this[_0x8892da(0x196)]=new TextDecoder();}[_0x5ba333(0x191)](){const _0xd074d0=_0x5ba333,_0x4545a4=this[_0xd074d0(0x1c6)][_0xd074d0(0x1ef)][_0xd074d0(0x1e3)](_0xd074d0(0x1dd));if(!_0x4545a4[_0xd074d0(0x16f)])throw new _0x5de1d3(_0xd074d0(0x1ac),this);this[_0xd074d0(0x1d6)]=_0x4545a4[_0xd074d0(0x16f)];}[_0x5ba333(0x1a8)](_0xe6cb9a,_0x16c21c){const _0x28fcb3=_0x5ba333,_0x7a2704=this[_0x28fcb3(0x1fc)](_0x28fcb3(0x181),_0x28fcb3(0x1c5),{'id':_0xe6cb9a,'group':_0x16c21c});return{'getConversation':async()=>(await _0x7a2704[_0x28fcb3(0x1a7)])[_0x28fcb3(0x1de)](),'abortController':_0x7a2704[_0x28fcb3(0x1f1)]};}[_0x5ba333(0x1d2)]({message:_0x2853e6,conversationId:_0x46aea6,parts:_0x1fb681,capabilities:_0x2e9abc,model:_0x5bbec7,attributes:_0x1cc3ec}){const _0xfb26ab=_0x5ba333,_0x17dcfc={'prompt':_0x2853e6,'content':_0x1fb681,'model':_0x5bbec7,..._0x2e9abc&&{'capabilities':_0x2e9abc},..._0x1cc3ec&&{'attributes':_0x1cc3ec}},_0xa9b40e=this[_0xfb26ab(0x1fc)](_0xfb26ab(0x1ab)+_0x46aea6+_0xfb26ab(0x1ce),_0xfb26ab(0x1c5),_0x17dcfc);return{'getStream':async()=>{const _0x444c38=_0xfb26ab,_0x169800=(await _0xa9b40e[_0x444c38(0x1a7)])[_0x444c38(0x1c4)];return this[_0x444c38(0x1ec)](_0x169800);},'abortController':_0xa9b40e[_0xfb26ab(0x1f1)]};}[_0x5ba333(0x1df)]({content:_0x3a4edd,message:_0x37c4a5,model:_0x2bea3d,outputFormat:_0xcc66a0}){const _0x4e94b9=_0x5ba333,_0x2f0bae={'content':[{'type':_0x4e94b9(0x18b),'content':_0x3a4edd}],'prompt':_0x37c4a5,'model':_0x2bea3d,'outputFormat':_0xcc66a0},_0x1c7301=this[_0x4e94b9(0x1fc)](_0x4e94b9(0x1db),_0x4e94b9(0x1c5),_0x2f0bae);return{'getStream':async()=>{const _0x2f41b1=_0x4e94b9,_0x51a758=(await _0x1c7301[_0x2f41b1(0x1a7)])[_0x2f41b1(0x1c4)];return this[_0x2f41b1(0x1ec)](_0x51a758);},'abortController':_0x1c7301[_0x4e94b9(0x1f1)]};}[_0x5ba333(0x19c)]({actionName:_0x2fcca1,content:_0x400531,args:_0x33b2dd}){const _0x413dbb=_0x5ba333,_0x1ccb29={'content':[{'type':_0x413dbb(0x18b),'content':_0x400531}],'args':_0x33b2dd},_0x25b75b=this[_0x413dbb(0x1fc)](_0x413dbb(0x1f4)+_0x2fcca1+_0x413dbb(0x18c),_0x413dbb(0x1c5),_0x1ccb29);return{'getStream':async()=>{const _0xd1e876=_0x413dbb,_0x4ac598=(await _0x25b75b[_0xd1e876(0x1a7)])[_0xd1e876(0x1c4)];return this[_0xd1e876(0x1ec)](_0x4ac598);},'abortController':_0x25b75b[_0x413dbb(0x1f1)]};}[_0x5ba333(0x1e4)](_0x133bba,_0xfad75d,_0xde0df2){const _0x207278=_0x5ba333,_0x8640bf=new FormData();_0x8640bf[_0x207278(0x19d)](_0x207278(0x1f7),_0xfad75d,_0xfad75d[_0x207278(0x1c9)]),_0xde0df2&&_0x8640bf[_0x207278(0x19d)](_0x207278(0x17f),JSON[_0x207278(0x1ba)](_0xde0df2));const _0x1aaa64=this[_0x207278(0x1fc)](_0x207278(0x1ab)+_0x133bba+_0x207278(0x18d),_0x207278(0x1c5),_0x8640bf);return{'getId':async()=>(await _0x1aaa64[_0x207278(0x1a7)])[_0x207278(0x1de)](),'abortController':_0x1aaa64[_0x207278(0x1f1)]};}[_0x5ba333(0x1d4)](_0x4faaeb,_0x4c4fcc){const _0x55e333=_0x5ba333,_0x3dc65f=this[_0x55e333(0x1fc)](_0x55e333(0x1ab)+_0x4faaeb+_0x55e333(0x1aa)+_0x4c4fcc,_0x55e333(0x1a5));return{'getDocument':async()=>(await _0x3dc65f[_0x55e333(0x1a7)])[_0x55e333(0x1de)](),'abortController':_0x3dc65f[_0x55e333(0x1f1)]};}[_0x5ba333(0x1b7)](_0x1118c2,_0x47beaa,_0x431dd7){const _0x397c4e=_0x5ba333,_0x4043d6={'content':_0x47beaa};_0x431dd7&&(_0x4043d6[_0x397c4e(0x17f)]=_0x431dd7);const _0x4d3506=this[_0x397c4e(0x1fc)](_0x397c4e(0x1ab)+_0x1118c2+_0x397c4e(0x1e2),_0x397c4e(0x1c5),_0x4043d6);return{'getId':async()=>(await _0x4d3506[_0x397c4e(0x1a7)])[_0x397c4e(0x1de)](),'abortController':_0x4d3506[_0x397c4e(0x1f1)]};}[_0x5ba333(0x172)](_0x354586,_0x5dd331={}){const _0x47096e=_0x5ba333,_0x1eced6=new URLSearchParams();_0x1eced6[_0x47096e(0x19d)](_0x47096e(0x17e),_0x354586),_0x1eced6[_0x47096e(0x19d)](_0x47096e(0x1f3),!0x1!==_0x5dd331[_0x47096e(0x1f3)]?_0x47096e(0x19f):_0x47096e(0x173)),_0x1eced6[_0x47096e(0x19d)](_0x47096e(0x1b6),_0x5dd331[_0x47096e(0x1b6)]?_0x5dd331[_0x47096e(0x1b6)][_0x47096e(0x1bb)]():_0x47096e(0x19e)),_0x1eced6[_0x47096e(0x19d)](_0x47096e(0x1a0),_0x5dd331[_0x47096e(0x1a0)]?_0x5dd331[_0x47096e(0x1a0)]:_0x47096e(0x174)),_0x1eced6[_0x47096e(0x19d)](_0x47096e(0x1af),_0x5dd331[_0x47096e(0x1af)]?_0x5dd331[_0x47096e(0x1af)]:_0x47096e(0x1e7));const _0x468da2=this[_0x47096e(0x1fc)](_0x47096e(0x190)+_0x1eced6[_0x47096e(0x1bb)](),_0x47096e(0x1a5));return{'getConversations':async()=>{const _0x21e3ad=_0x47096e,_0x207cf5=await _0x468da2[_0x21e3ad(0x1a7)];return(await _0x207cf5[_0x21e3ad(0x1de)]())[_0x21e3ad(0x1d5)];},'abortController':_0x468da2[_0x47096e(0x1f1)]};}[_0x5ba333(0x19b)](_0x5b1f1f){const _0x3c12af=_0x5ba333,_0x4e11ba=this[_0x3c12af(0x1fc)](_0x3c12af(0x1ab)+_0x5b1f1f,_0x3c12af(0x16d));return{'execute':async()=>{const _0x5cd8cb=_0x3c12af;await _0x4e11ba[_0x5cd8cb(0x1a7)];},'abortController':_0x4e11ba[_0x3c12af(0x1f1)]};}[_0x5ba333(0x18f)](_0x377789,_0x3dad09){const _0x78cbf6=_0x5ba333,_0x3f59ea=this[_0x78cbf6(0x1fc)](_0x78cbf6(0x1ab)+_0x377789,_0x78cbf6(0x1da),_0x3dad09);return{'getResult':async()=>(await _0x3f59ea[_0x78cbf6(0x1a7)],_0x3dad09),'abortController':_0x3f59ea[_0x78cbf6(0x1f1)]};}[_0x5ba333(0x1fd)](_0x630976){const _0x37e8dd=_0x5ba333,_0x2b5f49=this[_0x37e8dd(0x1fc)](_0x37e8dd(0x1ab)+_0x630976,_0x37e8dd(0x1a5));return{'getConversation':async()=>(await _0x2b5f49[_0x37e8dd(0x1a7)])[_0x37e8dd(0x1de)](),'abortController':_0x2b5f49[_0x37e8dd(0x1f1)]};}[_0x5ba333(0x1e5)](_0x82b0da){const _0x57422d=_0x5ba333,_0x5254df=this[_0x57422d(0x1fc)](_0x57422d(0x1ab)+_0x82b0da+_0x57422d(0x1ce),_0x57422d(0x1a5));return{'getMessages':async()=>{const _0x397c02=_0x57422d,_0x1c5503=await _0x5254df[_0x397c02(0x1a7)];return(await _0x1c5503[_0x397c02(0x1de)]())[_0x397c02(0x1d5)];},'abortController':_0x5254df[_0x57422d(0x1f1)]};}[_0x5ba333(0x1a4)](_0x4ebf4c,_0x3b1225,_0x3c349f){const _0x4046f8=_0x5ba333,_0x514ca2=this[_0x4046f8(0x1fc)](_0x4046f8(0x1ab)+_0x4ebf4c+_0x4046f8(0x1d9),_0x4046f8(0x1c5),{'url':_0x3b1225,'attributes':_0x3c349f});return{'getId':async()=>(await _0x514ca2[_0x4046f8(0x1a7)])[_0x4046f8(0x1de)](),'abortController':_0x514ca2[_0x4046f8(0x1f1)]};}[_0x5ba333(0x1f8)](_0x712bc9='en'){const _0xcec88c=_0x5ba333,_0x36895a=new URLSearchParams();_0x36895a[_0xcec88c(0x19d)](_0xcec88c(0x188),_0x712bc9);const _0x55a463=_0xcec88c(0x186)+_0x36895a[_0xcec88c(0x1bb)](),_0x20faae=this[_0xcec88c(0x1fc)](_0x55a463,_0xcec88c(0x1a5));return{'list':async()=>await(await _0x20faae[_0xcec88c(0x1a7)])[_0xcec88c(0x1de)](),'abortController':_0x20faae[_0xcec88c(0x1f1)]};}[_0x5ba333(0x1ad)](_0x2acac1,_0x485b28){const _0x131148=_0x5ba333,_0x24ca97=this[_0x131148(0x1fc)](_0x131148(0x1ab)+_0x2acac1+_0x131148(0x185)+_0x485b28,_0x131148(0x16d));return{'execute':async()=>{const _0x130cab=_0x131148;await _0x24ca97[_0x130cab(0x1a7)];},'abortController':_0x24ca97[_0x131148(0x1f1)]};}[_0x5ba333(0x17b)](_0x102f3e,_0x5bdf96){const _0x290054=_0x5ba333,_0x1b0b4a=this[_0x290054(0x1fc)](_0x290054(0x1ab)+_0x102f3e+_0x290054(0x1aa)+_0x5bdf96,_0x290054(0x16d));return{'execute':async()=>{const _0x34e77d=_0x290054;await _0x1b0b4a[_0x34e77d(0x1a7)];},'abortController':_0x1b0b4a[_0x290054(0x1f1)]};}[_0x5ba333(0x1c0)](_0x2ef9c6,_0x2c4df9){const _0x2c3de2=_0x5ba333,_0xa70308=this[_0x2c3de2(0x1fc)](_0x2c3de2(0x1ab)+_0x2ef9c6+_0x2c3de2(0x1dc)+_0x2c4df9,_0x2c3de2(0x16d));return{'execute':async()=>{const _0x2596f8=_0x2c3de2;await _0xa70308[_0x2596f8(0x1a7)];},'abortController':_0xa70308[_0x2c3de2(0x1f1)]};}[_0x5ba333(0x18e)]({reviewName:_0x23a786,content:_0x192d08,args:_0x3afb7f}){const _0x25e943=_0x5ba333,_0x106d24=this[_0x25e943(0x1fc)](_0x25e943(0x176)+_0x23a786+_0x25e943(0x18c),_0x25e943(0x1c5),{'content':[{'type':_0x25e943(0x18b),'content':_0x192d08}],'args':_0x3afb7f});return{'getStream':async()=>{const _0x24964e=_0x25e943,_0x93e060=(await _0x106d24[_0x24964e(0x1a7)])[_0x24964e(0x1c4)];return this[_0x24964e(0x1ec)](_0x93e060);},'abortController':_0x106d24[_0x25e943(0x1f1)]};}[_0x5ba333(0x171)]({content:_0xdb8bb6,prompt:_0x3050ed,model:_0x4acc93}){const _0x3c441e=_0x5ba333,_0x2100cd=this[_0x3c441e(0x1fc)](_0x3c441e(0x1d3),_0x3c441e(0x1c5),{'content':[{'type':_0x3c441e(0x18b),'content':_0xdb8bb6}],'prompt':_0x3050ed,'model':_0x4acc93});return{'getStream':async()=>{const _0x364035=_0x3c441e,_0x2de5cd=(await _0x2100cd[_0x364035(0x1a7)])[_0x364035(0x1c4)];return this[_0x364035(0x1ec)](_0x2de5cd);},'abortController':_0x2100cd[_0x3c441e(0x1f1)]};}[_0x5ba333(0x18a)](_0x130942,_0x30c673,_0x42ec42){const _0x55e0ba=_0x5ba333,_0x4ccff3=this[_0x55e0ba(0x1fc)](_0x55e0ba(0x1ab)+_0x130942+_0x55e0ba(0x197)+_0x30c673+_0x55e0ba(0x1e8),_0x55e0ba(0x179),{'positiveCount':_0x42ec42[_0x55e0ba(0x1fe)],'totalCount':_0x42ec42[_0x55e0ba(0x182)],'modificationId':_0x42ec42[_0x55e0ba(0x1c2)]});return{'execute':async()=>{const _0x1e7b0c=_0x55e0ba;await _0x4ccff3[_0x1e7b0c(0x1a7)];},'abortController':_0x4ccff3[_0x55e0ba(0x1f1)]};}[_0x5ba333(0x1cc)](_0x1832cb,_0x46e1c1,_0x148879){const _0x3a4520=_0x5ba333,_0x5df1ec=this[_0x3a4520(0x1fc)](_0x3a4520(0x1f4)+_0x1832cb+_0x3a4520(0x1d7)+_0x46e1c1+_0x3a4520(0x1e8),_0x3a4520(0x179),{'positiveCount':_0x148879[_0x3a4520(0x1fe)],'totalCount':_0x148879[_0x3a4520(0x182)]});return{'execute':async()=>{const _0x30ce79=_0x3a4520;await _0x5df1ec[_0x30ce79(0x1a7)];},'abortController':_0x5df1ec[_0x3a4520(0x1f1)]};}[_0x5ba333(0x178)](_0x3fab73,_0x38fa3a){const _0x321ab7=_0x5ba333,_0x329d1f=this[_0x321ab7(0x1fc)](_0x321ab7(0x1c7)+_0x3fab73+_0x321ab7(0x1e8),_0x321ab7(0x179),{'positiveCount':_0x38fa3a[_0x321ab7(0x1fe)],'totalCount':_0x38fa3a[_0x321ab7(0x182)]});return{'execute':async()=>{const _0x338997=_0x321ab7;await _0x329d1f[_0x338997(0x1a7)];},'abortController':_0x329d1f[_0x321ab7(0x1f1)]};}[_0x5ba333(0x1b9)](_0x2f7b92,_0x3aa1db,_0x62f63d,_0xd3c55d){const _0x57762b=_0x5ba333,_0x1d4121=this[_0x57762b(0x1fc)](_0x57762b(0x176)+_0x2f7b92+_0x57762b(0x1d7)+_0x3aa1db+_0x57762b(0x1e8),_0x57762b(0x179),{'positiveCount':_0x62f63d[_0x57762b(0x1fe)],'totalCount':_0x62f63d[_0x57762b(0x182)],'dataId':_0xd3c55d});return{'execute':async()=>{const _0x3a5414=_0x57762b;await _0x1d4121[_0x3a5414(0x1a7)];},'abortController':_0x1d4121[_0x57762b(0x1f1)]};}[_0x5ba333(0x1ae)](_0x5dca16,_0x10e8b5,_0x188be3){const _0x484b52=_0x5ba333,_0x5bcfa0=this[_0x484b52(0x1fc)](_0x484b52(0x1ea)+_0x5dca16+_0x484b52(0x1e8),_0x484b52(0x179),{'positiveCount':_0x10e8b5[_0x484b52(0x1fe)],'totalCount':_0x10e8b5[_0x484b52(0x182)],'dataId':_0x188be3});return{'execute':async()=>{const _0x51cad1=_0x484b52;await _0x5bcfa0[_0x51cad1(0x1a7)];},'abortController':_0x5bcfa0[_0x484b52(0x1f1)]};}[_0x5ba333(0x1fc)](_0x297ac7,_0x28fc5c,_0x4519fd){const _0x500c11=_0x5ba333,_0x25caa2=new AbortController(),_0x253cb8=_0x4519fd instanceof FormData,_0x1221b2={'Authorization':_0x500c11(0x1a2)+this[_0x500c11(0x1d6)]?.[_0x500c11(0x184)]};_0x4519fd&&!_0x253cb8&&(_0x1221b2[_0x500c11(0x16e)]=_0x500c11(0x1bf));const _0x27b59b={'method':_0x28fc5c,'headers':_0x1221b2,'signal':_0x25caa2[_0x500c11(0x180)]};return _0x4519fd&&(_0x27b59b[_0x500c11(0x1c4)]=_0x253cb8?_0x4519fd:JSON[_0x500c11(0x1ba)](_0x4519fd)),{'request':fetch(''+this[_0x500c11(0x1d0)]+_0x297ac7,_0x27b59b)[_0x500c11(0x1f2)](_0x213a0f=>{const _0x3e3610=_0x500c11;this[_0x3e3610(0x170)](_0x213a0f);})[_0x500c11(0x1c1)](_0x3998cc=>_0x3998cc['ok']?_0x3998cc:_0x3998cc[_0x500c11(0x1de)]()[_0x500c11(0x1c1)](_0x22211d=>{const _0x15f824=_0x500c11;throw{'url':this[_0x15f824(0x1d0)],'path':_0x297ac7,'method':_0x28fc5c,'body':_0x4519fd,'status':(_0x3998cc||{})[_0x15f824(0x1a9)],'statusText':(_0x3998cc||{})[_0x15f824(0x183)],'code':_0x22211d[_0x15f824(0x175)],'message':_0x22211d[_0x15f824(0x17a)],'traceId':_0x22211d[_0x15f824(0x1f9)]};})),'abortController':_0x25caa2};}async*[_0x5ba333(0x1ec)](_0x3eddf3){const _0x5b8e1e=_0x5ba333,_0x41925e=[],_0xc46ac6=_0x3eddf3[_0x5b8e1e(0x1bc)](),_0x3352e9=_0x5ef35d({'onError':_0x406b4c=>{const _0x5c6241=_0x5b8e1e;this[_0x5c6241(0x170)](_0x406b4c);},'onEvent':_0x1dd1da=>{const _0x501b18=_0x5b8e1e;_0x1dd1da[_0x501b18(0x1b8)]=JSON[_0x501b18(0x1ca)](_0x1dd1da[_0x501b18(0x1b8)]),_0x41925e[_0x501b18(0x17d)](_0x1dd1da);}});try{let _0x3425f9=!0x1;for(;!_0x3425f9;){const {done:_0xcee263,value:_0x598d83}=await _0xc46ac6[_0x5b8e1e(0x1ff)]();_0xcee263&&(_0x3425f9=!0x0),_0x3352e9[_0x5b8e1e(0x1e1)](this[_0x5b8e1e(0x196)][_0x5b8e1e(0x1d8)](_0x598d83,{'stream':!0x0})),yield*_0x41925e,_0x41925e[_0x5b8e1e(0x1ee)]=0x0;}}catch(_0x584492){this[_0x5b8e1e(0x170)](_0x584492);}finally{_0xc46ac6[_0x5b8e1e(0x192)](),_0x3352e9[_0x5b8e1e(0x193)]();}}[_0x5ba333(0x170)](_0x5ce2a7){const _0x39ba2c=_0x5ba333;if(_0x5ce2a7 instanceof _0x5de1d3)throw _0x5ce2a7;if(_0x5ce2a7 instanceof Error&&_0x39ba2c(0x19a)===_0x5ce2a7[_0x39ba2c(0x1c9)])throw new _0x5de1d3(_0x39ba2c(0x194),this,{'originalError':_0x5ce2a7});throw new _0x5de1d3(_0x39ba2c(0x1d1),this,{'originalError':_0x5ce2a7});}}function _0x1ea3(){const _0xffb5fc=['uploadUrl','GET','make-longer','request','startConversation','status','/documents/','/conversations/','ai-missing-token','deleteFile','upsertCustomAIReviewRating','order','FIX_GRAMMAR','requires','define','ai.serviceUrl','104913eAeSnR','18qKiGwf','limit','uploadDocument','data','upsertAIReviewRating','stringify','toString','getReader','make-shorter','config','application/json','deleteWebResource','then','modificationId','2334228OHmIfL','body','POST','context','/actions/custom/calls/','MAKE_SHORTER','name','parse','3484038NSMXdA','upsertAIActionRating','7fgVvZh','/messages','5444552fgToXB','_apiUrl','ai-request-failed','queryAssistant','/reviews/custom/calls','fetchDocument','items','_token','/calls/','decode','/web-resources','PATCH','/actions/custom/calls','/web-resources/','CloudServices','json','executeCustomAction','continue','feed','/documents','get','uploadFile','fetchConversationMessages','MAKE_TONE_CASUAL','desc','/ratings','make-tone-formal','/reviews/custom/calls/','isOfficialPlugin','_getStreamReader','AIConnector','length','plugins','MAKE_TONE_FORMAL','abortController','catch','excludeEmpty','/actions/system/','https://ai.cke-cs.com/v1','improve-writing','file','getModels','traceId','fix-grammar','translate','_sendApiRequest','fetchConversation','positiveCount','read','MAKE_LONGER','DELETE','Content-Type','token','_handleError','callCustomReview','fetchConversations','false','createdAt','code','/reviews/system/','CONTINUE','upsertCustomAIActionRating','PUT','message','deleteDocument','make-tone-casual','push','group','attributes','signal','/conversations','totalCount','statusText','value','/files/','/models/1?','1601198axwmCB','language','4646625RRaGyB','upsertAIChatRating','text','/calls','/files','callSystemReview','updateConversation','/conversations?','init','releaseLock','reset','ai-request-aborted','TRANSLATE','_decoder','/messages/','3800768KyMATa','isPremiumPlugin','AbortError','deleteConversation','executeAction','append','100','true','sortBy','IMPROVE_WRITING','Bearer\x20','pluginName'];_0x1ea3=function(){return _0xffb5fc;};return _0x1ea3();}
|
package/src/aicore/aiediting.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const _0x4cc378=_0x2dc4;(function(_0x44d06f,_0x1840a2){const _0x2e807f=_0x2dc4,_0x5e31a2=_0x44d06f();while(!![]){try{const _0x14e983=parseInt(_0x2e807f(0x1e2))/0x1*(-parseInt(_0x2e807f(0x1fc))/0x2)+-parseInt(_0x2e807f(0x1bb))/0x3*(parseInt(_0x2e807f(0x1fa))/0x4)+parseInt(_0x2e807f(0x1bd))/0x5*(-parseInt(_0x2e807f(0x1a4))/0x6)+-parseInt(_0x2e807f(0x1e0))/0x7+-parseInt(_0x2e807f(0x1dd))/0x8+parseInt(_0x2e807f(0x202))/0x9+-parseInt(_0x2e807f(0x1a6))/0xa*(-parseInt(_0x2e807f(0x1d7))/0xb);if(_0x14e983===_0x1840a2)break;else _0x5e31a2['push'](_0x5e31a2['shift']());}catch(_0xdb066b){_0x5e31a2['push'](_0x5e31a2['shift']());}}}(_0x332f,0xce3e1));import{ViewDowncastWriter as _0x460d12}from'ckeditor5/src/engine.js';function _0x2dc4(_0x241c04,_0x31c31a){const _0x332fd5=_0x332f();return _0x2dc4=function(_0x2dc4ff,_0x41c4a7){_0x2dc4ff=_0x2dc4ff-0x19d;let _0x1092c3=_0x332fd5[_0x2dc4ff];return _0x1092c3;},_0x2dc4(_0x241c04,_0x31c31a);}import{ContextPlugin as _0xc1df86,Editor as _0x50291b}from'ckeditor5/src/core.js';import{uid as _0x4a12ea}from'ckeditor5/src/utils.js';function _0x332f(){const _0x198a98=['editing','23506417LJLzFx','setAttribute','ai-selection','fromCharCode',':end></','addMarker','1440928BgGJbx','toView','_getMarkersInDocumentOrder','3202703TMJehO',':start></','3260YAglWn','getStart','push','afterInit','sort','_setOutputDataProcessor','model','ai-selection:','editors','RealTimeCollaborationClient','_sessionId','listenTo','getLastMatchingPosition','get','isOfficialPlugin','AI_CHAT_CONTEXT_DOCUMENT_SELECTION_LABEL','domConverter','random','define','conversion','from','view','markerToElement','createRange','110872ESdXHl','locale','394yCwmEH','_nextDataId','ck-ai-assistant-ui_theme','length','removeAllRanges','htmlWriter','14786514KlwMZP','change','pluginName','markerName','editingDowncast','hideFakeVisualSelection','isPremiumPlugin','isAtEnd','substring','getRoot','showFakeVisualSelection','plugins','getDocumentData','convertAiChatSelectionMarker','ai.models.showModelSelector','isBefore','selection','ck-fake-ai-selection','emptyElement','containerElement','ready','getChildren','viewToDom','6TmcfOq','modelToDataWithIds','10BDpsoQ','getSelection','config','_integrateEditor','getHtml','end','_displayedFakeSelectionId',':start>','isAfter','dataDowncast','name','_outputDataProcessor','add','_setDataIdsOnChildren','getRanges','processor','isOpening','toData','createUIElement','getItems','version','6HQNVRR','markers','7999115QYqEGC','start','sessionId','AIEditing','context','schema','getSelectionText','$textProxy','data-id','element','removeMarker','join','trim','isContent','_displayedFakeSelectionLocked','floor','has','_getDocumentDataStringFromView','data','getMarkersGroup','indexOf','for','document',':end>','markerToHighlight'];_0x332f=function(){return _0x198a98;};return _0x332f();}import{getTranslation as _0x15eed4}from'./utils/common-translations.js';import{getEditorFromContext as _0x440a2f}from'./utils/geteditorfromcontext.js';export const AI_VISUAL_SELECTION_MARKER_NAME=_0x4cc378(0x1d9);export class AIEditing extends _0xc1df86{constructor(_0x4cef88){const _0x43b760=_0x4cc378;super(_0x4cef88),this[_0x43b760(0x1c1)][_0x43b760(0x1a8)][_0x43b760(0x1f4)](_0x43b760(0x210),!0x0);}[_0x4cc378(0x1b1)];[_0x4cc378(0x1ac)]=null;[_0x4cc378(0x1cb)]=!0x1;[_0x4cc378(0x1ec)];static get[_0x4cc378(0x204)](){const _0x20d01a=_0x4cc378;return _0x20d01a(0x1c0);}static get[_0x4cc378(0x1f0)](){return!0x0;}static get[_0x4cc378(0x208)](){return!0x0;}get[_0x4cc378(0x1bf)](){const _0x16b65f=_0x4cc378;if(!this[_0x16b65f(0x1ec)]){const _0x527114=_0x440a2f(this[_0x16b65f(0x1c1)]),_0x4c2cba=_0x527114[_0x16b65f(0x20d)][_0x16b65f(0x1cd)](_0x16b65f(0x1eb))&&_0x527114[_0x16b65f(0x20d)][_0x16b65f(0x1ef)](_0x16b65f(0x1eb))[_0x16b65f(0x1bf)];this[_0x16b65f(0x1ec)]=_0x4c2cba||_0x4a12ea();}return this[_0x16b65f(0x1ec)];}async[_0x4cc378(0x20e)](){const _0x403375=_0x4cc378,_0x589538=_0x440a2f(this[_0x403375(0x1c1)]),_0x5b7731=_0x589538[_0x403375(0x1e8)],_0x579339=_0x589538[_0x403375(0x1cf)][_0x403375(0x1de)](_0x5b7731[_0x403375(0x1d3)][_0x403375(0x20b)](),{'convertAiChatSelectionMarker':!0x0}),_0x4df517=new _0x460d12(_0x589538[_0x403375(0x1d6)][_0x403375(0x1f7)][_0x403375(0x1d3)]);this[_0x403375(0x1b3)](_0x579339,_0x4df517);let _0x14114c=await this[_0x403375(0x1ce)](_0x579339);const _0xf71176=this[_0x403375(0x1df)](),_0x535381=[];for(const _0x4377c9 of _0xf71176){const _0x2eeb33='<'+_0x4377c9[_0x403375(0x1b0)]+_0x403375(0x1e1)+_0x4377c9[_0x403375(0x1b0)]+_0x403375(0x1ad),_0x1d5f68=_0x14114c[_0x403375(0x1d1)](_0x2eeb33);_0x14114c=_0x14114c[_0x403375(0x20a)](0x0,_0x1d5f68)+_0x14114c[_0x403375(0x20a)](_0x1d5f68+_0x2eeb33[_0x403375(0x1ff)]);const _0xb7bc16='<'+_0x4377c9[_0x403375(0x1b0)]+_0x403375(0x1db)+_0x4377c9[_0x403375(0x1b0)]+_0x403375(0x1d4),_0x4c0ca1=_0x14114c[_0x403375(0x1d1)](_0xb7bc16);_0x14114c=_0x14114c[_0x403375(0x20a)](0x0,_0x4c0ca1)+_0x14114c[_0x403375(0x20a)](_0x4c0ca1+_0xb7bc16[_0x403375(0x1ff)]),_0x535381[_0x403375(0x1e4)]({'markerName':_0x4377c9[_0x403375(0x1b0)],'start':_0x1d5f68,'end':_0x4c0ca1,'htmlFragment':_0x14114c[_0x403375(0x20a)](_0x1d5f68,_0x4c0ca1)});}return{'content':_0x14114c,'version':_0x589538[_0x403375(0x1e8)][_0x403375(0x1d3)][_0x403375(0x1ba)],'sessionId':this[_0x403375(0x1bf)],'selections':_0x535381};}async[_0x4cc378(0x1e5)](){const _0x57033e=_0x4cc378;this[_0x57033e(0x1c1)]instanceof _0x50291b?this[_0x57033e(0x1a9)](this[_0x57033e(0x1c1)]):this[_0x57033e(0x1ed)](this[_0x57033e(0x1c1)][_0x57033e(0x1ea)],_0x57033e(0x1b2),(_0x3fe2f5,_0x198f11)=>{const _0x28d85d=_0x57033e;_0x198f11['on'](_0x28d85d(0x1a1),()=>{const _0x56a6ba=_0x28d85d;this[_0x56a6ba(0x1a9)](_0x198f11);});});}[_0x4cc378(0x1e7)](_0x41d6d6){const _0x5f07db=_0x4cc378;this[_0x5f07db(0x1b1)]=_0x41d6d6;}async[_0x4cc378(0x1ce)](_0x1361dc){const _0x502953=_0x4cc378;let _0x4e594f;const _0x1a8ec5=_0x440a2f(this[_0x502953(0x1c1)]);if(this[_0x502953(0x1b1)]){const _0x3e0730=_0x1a8ec5[_0x502953(0x1cf)][_0x502953(0x1b5)][_0x502953(0x1f2)][_0x502953(0x1a3)](_0x1361dc),_0x3f55d1=await this[_0x502953(0x1b1)](_0x3e0730);_0x4e594f=_0x1a8ec5[_0x502953(0x1cf)][_0x502953(0x1b5)][_0x502953(0x201)][_0x502953(0x1aa)](_0x3f55d1);}else _0x4e594f=_0x1a8ec5[_0x502953(0x1cf)][_0x502953(0x1b5)][_0x502953(0x1b7)](_0x1361dc);return _0x4e594f;}[_0x4cc378(0x1a9)](_0x19561e){const _0xf9f798=_0x4cc378;_0x19561e[_0xf9f798(0x1f5)][_0xf9f798(0x1d2)](_0xf9f798(0x206))[_0xf9f798(0x1d5)]({'model':_0xf9f798(0x1d9),'view':{'classes':[_0xf9f798(0x19e),_0xf9f798(0x1fe)],'priority':0xc}}),_0x19561e[_0xf9f798(0x1f5)][_0xf9f798(0x1d2)](_0xf9f798(0x1af))[_0xf9f798(0x1f8)]({'model':_0xf9f798(0x1d9),'view':(_0x199d77,{writer:_0x248a5f,options:_0x25b88d})=>_0x25b88d[_0xf9f798(0x20f)]?_0x248a5f[_0xf9f798(0x1b8)](_0x199d77[_0xf9f798(0x205)]+':'+(_0x199d77[_0xf9f798(0x1b6)]?_0xf9f798(0x1be):_0xf9f798(0x1ab))):null});}[_0x4cc378(0x20c)](_0x3411e7,_0x6c12d3,_0x239e63=!0x1,_0x57ea2d=!0x1){const _0x295dc3=_0x4cc378;if(this[_0x295dc3(0x1cb)]&&!_0x57ea2d)return!0x1;const _0x45ea10=_0x440a2f(this[_0x295dc3(0x1c1)])[_0x295dc3(0x1e8)];return _0x45ea10[_0x295dc3(0x203)](_0x3c9263=>{const _0x50f53f=_0x295dc3;this[_0x50f53f(0x1ac)]&&this[_0x50f53f(0x207)](this[_0x50f53f(0x1ac)]),this[_0x50f53f(0x1ac)]=_0x6c12d3,this[_0x50f53f(0x1cb)]=_0x239e63;let _0x352458=0x0;for(let _0x3e028c of _0x3411e7){const _0x1d4f88=_0x50f53f(0x1e9)+_0x352458;if(_0x3e028c[_0x50f53f(0x1be)][_0x50f53f(0x209)]){const _0x514cd6=_0x3e028c[_0x50f53f(0x1be)][_0x50f53f(0x1ee)](({item:_0x585b38})=>!_0x45ea10[_0x50f53f(0x1c2)][_0x50f53f(0x1ca)](_0x585b38),{'boundaries':_0x3e028c});_0x3e028c=_0x3c9263[_0x50f53f(0x1f9)](_0x514cd6,_0x3e028c[_0x50f53f(0x1ab)]);}_0x3c9263[_0x50f53f(0x1dc)](_0x1d4f88,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x3e028c}),_0x352458++;}}),window[_0x295dc3(0x1a7)]()?.[_0x295dc3(0x200)](),!0x0;}[_0x4cc378(0x207)](_0x116c69){const _0x22cb5c=_0x4cc378;if(this[_0x22cb5c(0x1ac)]!=_0x116c69)return!0x1;this[_0x22cb5c(0x1ac)]=null,this[_0x22cb5c(0x1cb)]=!0x1;const _0x2940ca=_0x440a2f(this[_0x22cb5c(0x1c1)]),_0x25d678=_0x2940ca[_0x22cb5c(0x1e8)][_0x22cb5c(0x1bc)][_0x22cb5c(0x1d0)](_0x22cb5c(0x1d9));return _0x2940ca[_0x22cb5c(0x1e8)][_0x22cb5c(0x203)](_0x2ad938=>{const _0x43e4aa=_0x22cb5c;for(const _0x276130 of _0x25d678)_0x2ad938[_0x43e4aa(0x1c7)](_0x276130);}),!0x0;}async[_0x4cc378(0x1a5)](_0x4ac520){const _0x4a7d6f=_0x4cc378,_0x242824=_0x440a2f(this[_0x4a7d6f(0x1c1)]),_0x3a054c=_0x242824[_0x4a7d6f(0x1cf)][_0x4a7d6f(0x1de)](_0x4ac520),_0x2802d2=new _0x460d12(_0x242824[_0x4a7d6f(0x1d6)][_0x4a7d6f(0x1f7)][_0x4a7d6f(0x1d3)]);return this[_0x4a7d6f(0x1b3)](_0x3a054c,_0x2802d2),this[_0x4a7d6f(0x1ce)](_0x3a054c);}[_0x4cc378(0x1b3)](_0x53bf3b,_0x42daaf){const _0x58c181=_0x4cc378;let _0x5afe41=!0x1;const _0x4cc2ea=new Set();for(const _0x2f08b7 of _0x53bf3b[_0x58c181(0x1a2)]()){const _0x17daed=_0x2f08b7['is'](_0x58c181(0x19f))||_0x2f08b7['is'](_0x58c181(0x1a0));if(!_0x2f08b7['is'](_0x58c181(0x1c6)))continue;(this[_0x58c181(0x1b3)](_0x2f08b7,_0x42daaf)||_0x17daed)&&(_0x42daaf[_0x58c181(0x1d8)](_0x58c181(0x1c5),this[_0x58c181(0x1fd)](_0x4cc2ea),_0x2f08b7),_0x5afe41=!0x0);}return _0x5afe41;}[_0x4cc378(0x1fd)](_0x156071){const _0x3355e6=_0x4cc378;let _0x22ce0f;do{_0x22ce0f='';for(let _0x5232fb=0x0;_0x5232fb<0x4;_0x5232fb++)_0x22ce0f+=String[_0x3355e6(0x1da)](0x61+Math[_0x3355e6(0x1cc)](0x1a*Math[_0x3355e6(0x1f3)]()));}while(_0x156071[_0x3355e6(0x1cd)](_0x22ce0f));return _0x156071[_0x3355e6(0x1b2)](_0x22ce0f),_0x22ce0f;}[_0x4cc378(0x1c3)](){const _0xa51274=_0x4cc378,{model:_0x520112}=_0x440a2f(this[_0xa51274(0x1c1)]),_0x903819=_0x520112[_0xa51274(0x1d3)][_0xa51274(0x19d)],_0x21d912=[];for(const _0x37feb3 of _0x903819[_0xa51274(0x1b4)]())for(const _0x18801a of _0x37feb3[_0xa51274(0x1b9)]())_0x18801a['is'](_0xa51274(0x1c4))?_0x21d912[_0xa51274(0x1e4)](_0x18801a[_0xa51274(0x1cf)]):_0x18801a['is'](_0xa51274(0x1c6))&&_0x21d912[_0xa51274(0x1ff)]>0x0&&'\x20'!==_0x21d912[_0x21d912[_0xa51274(0x1ff)]-0x1]&&_0x21d912[_0xa51274(0x1e4)]('\x20');return _0x21d912[_0xa51274(0x1ff)]?'\x22'+_0x21d912[_0xa51274(0x1c8)]('')[_0xa51274(0x1c9)]()+'\x22':_0x15eed4(this[_0xa51274(0x1c1)][_0xa51274(0x1fb)],_0xa51274(0x1f1));}[_0x4cc378(0x1df)](){const _0x47625d=_0x4cc378,_0x18ee6e=_0x440a2f(this[_0x47625d(0x1c1)])[_0x47625d(0x1e8)];return Array[_0x47625d(0x1f6)](_0x18ee6e[_0x47625d(0x1bc)][_0x47625d(0x1d0)](_0x47625d(0x1d9)))[_0x47625d(0x1e6)]((_0x5a34a8,_0x132b3f)=>_0x5a34a8[_0x47625d(0x1e3)]()[_0x47625d(0x211)](_0x132b3f[_0x47625d(0x1e3)]())?-0x1:_0x5a34a8[_0x47625d(0x1e3)]()[_0x47625d(0x1ae)](_0x132b3f[_0x47625d(0x1e3)]())?0x1:0x0);}}
|
|
23
|
+
function _0x2b7b(_0x1ed86e,_0x37c9ae){const _0x4f86b8=_0x4f86();return _0x2b7b=function(_0x2b7b3c,_0x3c7daf){_0x2b7b3c=_0x2b7b3c-0xe4;let _0x20410e=_0x4f86b8[_0x2b7b3c];return _0x20410e;},_0x2b7b(_0x1ed86e,_0x37c9ae);}const _0x351ecd=_0x2b7b;(function(_0x10520,_0x5bbe24){const _0xab489d=_0x2b7b,_0x3b699a=_0x10520();while(!![]){try{const _0xf71ed6=parseInt(_0xab489d(0x12b))/0x1*(parseInt(_0xab489d(0x103))/0x2)+parseInt(_0xab489d(0x12a))/0x3+parseInt(_0xab489d(0x11e))/0x4*(-parseInt(_0xab489d(0x157))/0x5)+-parseInt(_0xab489d(0x143))/0x6*(parseInt(_0xab489d(0x148))/0x7)+parseInt(_0xab489d(0x154))/0x8+-parseInt(_0xab489d(0x123))/0x9+-parseInt(_0xab489d(0x118))/0xa*(-parseInt(_0xab489d(0x104))/0xb);if(_0xf71ed6===_0x5bbe24)break;else _0x3b699a['push'](_0x3b699a['shift']());}catch(_0x413734){_0x3b699a['push'](_0x3b699a['shift']());}}}(_0x4f86,0xe2e9e));import{ViewDowncastWriter as _0x1d590f}from'ckeditor5/src/engine.js';import{ContextPlugin as _0x1708d4,Editor as _0x4293fb}from'ckeditor5/src/core.js';import{uid as _0x2eb658}from'ckeditor5/src/utils.js';import{getTranslation as _0x1807f7}from'./utils/common-translations.js';import{getEditorFromContext as _0x1b1412}from'./utils/geteditorfromcontext.js';export const AI_VISUAL_SELECTION_MARKER_NAME=_0x351ecd(0x117);export class AIEditing extends _0x1708d4{constructor(_0x4a63bf){const _0x5bc799=_0x351ecd;super(_0x4a63bf),this[_0x5bc799(0x122)][_0x5bc799(0x139)][_0x5bc799(0x101)](_0x5bc799(0x14e),!0x0);}[_0x351ecd(0x152)];[_0x351ecd(0xf9)]=null;[_0x351ecd(0x125)]=!0x1;[_0x351ecd(0x13b)];static get[_0x351ecd(0x114)](){const _0x26bece=_0x351ecd;return _0x26bece(0x12f);}static get[_0x351ecd(0xee)](){return!0x0;}static get[_0x351ecd(0x150)](){return!0x0;}get[_0x351ecd(0x135)](){const _0x254b1d=_0x351ecd;if(!this[_0x254b1d(0x13b)]){const _0x9698e6=_0x1b1412(this[_0x254b1d(0x122)]),_0x1fcd16=_0x9698e6[_0x254b1d(0x11b)][_0x254b1d(0x13c)](_0x254b1d(0xe9))&&_0x9698e6[_0x254b1d(0x11b)][_0x254b1d(0xf8)](_0x254b1d(0xe9))[_0x254b1d(0x135)];this[_0x254b1d(0x13b)]=_0x1fcd16||_0x2eb658();}return this[_0x254b1d(0x13b)];}async[_0x351ecd(0x136)](){const _0xd88b9d=_0x351ecd,_0x2adafe=_0x1b1412(this[_0xd88b9d(0x122)]),_0x47a13c=_0x2adafe[_0xd88b9d(0x141)],_0x4a626c=_0x2adafe[_0xd88b9d(0x13d)][_0xd88b9d(0x149)](_0x47a13c[_0xd88b9d(0x137)][_0xd88b9d(0xe7)](),{'convertAiChatSelectionMarker':!0x0}),_0x4f469c=new _0x1d590f(_0x2adafe[_0xd88b9d(0x14f)][_0xd88b9d(0x11c)][_0xd88b9d(0x137)]);this[_0xd88b9d(0xe4)](_0x4a626c,_0x4f469c);let _0x14dbf1=await this[_0xd88b9d(0x158)](_0x4a626c);const _0x4aedcf=this[_0xd88b9d(0x110)](),_0x57460f=[];for(const _0x2d7e53 of _0x4aedcf){const _0x51a818='<'+_0x2d7e53[_0xd88b9d(0xed)]+_0xd88b9d(0x13e)+_0x2d7e53[_0xd88b9d(0xed)]+_0xd88b9d(0x102),_0x1013bd=_0x14dbf1[_0xd88b9d(0xf4)](_0x51a818);_0x14dbf1=_0x14dbf1[_0xd88b9d(0x138)](0x0,_0x1013bd)+_0x14dbf1[_0xd88b9d(0x138)](_0x1013bd+_0x51a818[_0xd88b9d(0xf2)]);const _0x5a8c5b='<'+_0x2d7e53[_0xd88b9d(0xed)]+_0xd88b9d(0x10a)+_0x2d7e53[_0xd88b9d(0xed)]+_0xd88b9d(0x119),_0x68885d=_0x14dbf1[_0xd88b9d(0xf4)](_0x5a8c5b);_0x14dbf1=_0x14dbf1[_0xd88b9d(0x138)](0x0,_0x68885d)+_0x14dbf1[_0xd88b9d(0x138)](_0x68885d+_0x5a8c5b[_0xd88b9d(0xf2)]),_0x57460f[_0xd88b9d(0xfa)]({'markerName':_0x2d7e53[_0xd88b9d(0xed)],'start':_0x1013bd,'end':_0x68885d,'htmlFragment':_0x14dbf1[_0xd88b9d(0x138)](_0x1013bd,_0x68885d)});}return{'content':_0x14dbf1,'version':_0x2adafe[_0xd88b9d(0x141)][_0xd88b9d(0x137)][_0xd88b9d(0x146)],'sessionId':this[_0xd88b9d(0x135)],'selections':_0x57460f};}async[_0x351ecd(0x105)](){const _0xb26bde=_0x351ecd;this[_0xb26bde(0x122)]instanceof _0x4293fb?this[_0xb26bde(0xe6)](this[_0xb26bde(0x122)]):this[_0xb26bde(0x155)](this[_0xb26bde(0x122)][_0xb26bde(0x12d)],_0xb26bde(0x126),(_0x28f544,_0x116ef9)=>{const _0x4f7425=_0xb26bde;_0x116ef9['on'](_0x4f7425(0x11f),()=>{const _0x22746f=_0x4f7425;this[_0x22746f(0xe6)](_0x116ef9);});});}[_0x351ecd(0xfc)](_0x2b9334){const _0x801430=_0x351ecd;this[_0x801430(0x152)]=_0x2b9334;}async[_0x351ecd(0x158)](_0xfc9c7){const _0x2d1d4b=_0x351ecd;let _0x364eaf;const _0x5089b9=_0x1b1412(this[_0x2d1d4b(0x122)]);if(this[_0x2d1d4b(0x152)]){const _0x47330f=_0x5089b9[_0x2d1d4b(0x13d)][_0x2d1d4b(0x100)][_0x2d1d4b(0xef)][_0x2d1d4b(0x109)](_0xfc9c7),_0x53d957=await this[_0x2d1d4b(0x152)](_0x47330f);_0x364eaf=_0x5089b9[_0x2d1d4b(0x13d)][_0x2d1d4b(0x100)][_0x2d1d4b(0xf1)][_0x2d1d4b(0x10b)](_0x53d957);}else _0x364eaf=_0x5089b9[_0x2d1d4b(0x13d)][_0x2d1d4b(0x100)][_0x2d1d4b(0xea)](_0xfc9c7);return _0x364eaf;}[_0x351ecd(0xe6)](_0x55a878){const _0x2511bf=_0x351ecd;_0x55a878[_0x2511bf(0x14c)][_0x2511bf(0xfd)](_0x2511bf(0x13f))[_0x2511bf(0x130)]({'model':_0x2511bf(0x117),'view':{'classes':[_0x2511bf(0x151),_0x2511bf(0x120)],'priority':0xc}}),_0x55a878[_0x2511bf(0x14c)][_0x2511bf(0xfd)](_0x2511bf(0xe8))[_0x2511bf(0x128)]({'model':_0x2511bf(0x117),'view':(_0x13c0fd,{writer:_0x2d3dcc,options:_0x177aa6})=>_0x177aa6[_0x2511bf(0xe5)]?_0x2d3dcc[_0x2511bf(0x108)](_0x13c0fd[_0x2511bf(0x147)]+':'+(_0x13c0fd[_0x2511bf(0xfb)]?_0x2511bf(0x10f):_0x2511bf(0x13a))):null});}[_0x351ecd(0x131)](_0x179ec3,_0x2846e1,_0x3b3ba0=!0x1,_0xa295eb=!0x1){const _0x34a84d=_0x351ecd;if(this[_0x34a84d(0x125)]&&!_0xa295eb)return!0x1;const _0x824735=_0x1b1412(this[_0x34a84d(0x122)])[_0x34a84d(0x141)];return _0x824735[_0x34a84d(0xf3)](_0x44bdbd=>{const _0x19c25d=_0x34a84d;this[_0x19c25d(0xf9)]&&this[_0x19c25d(0xeb)](this[_0x19c25d(0xf9)]),this[_0x19c25d(0xf9)]=_0x2846e1,this[_0x19c25d(0x125)]=_0x3b3ba0;let _0x58f90e=0x0;for(let _0x241269 of _0x179ec3){const _0xec63d2=_0x19c25d(0x115)+_0x58f90e;if(_0x241269[_0x19c25d(0x10f)][_0x19c25d(0x121)]){const _0x4f4ac2=_0x241269[_0x19c25d(0x10f)][_0x19c25d(0xff)](({item:_0x50d2ba})=>!_0x824735[_0x19c25d(0x133)][_0x19c25d(0x116)](_0x50d2ba),{'boundaries':_0x241269});_0x241269=_0x44bdbd[_0x19c25d(0xfe)](_0x4f4ac2,_0x241269[_0x19c25d(0x13a)]);}_0x44bdbd[_0x19c25d(0xf7)](_0xec63d2,{'usingOperation':!0x1,'affectsData':!0x1,'range':_0x241269}),_0x58f90e++;}}),window[_0x34a84d(0x153)]()?.[_0x34a84d(0x144)](),!0x0;}[_0x351ecd(0xeb)](_0x3259c2){const _0x2c7002=_0x351ecd;if(this[_0x2c7002(0xf9)]!=_0x3259c2)return!0x1;this[_0x2c7002(0xf9)]=null,this[_0x2c7002(0x125)]=!0x1;const _0x2404a6=_0x1b1412(this[_0x2c7002(0x122)]),_0x396211=_0x2404a6[_0x2c7002(0x141)][_0x2c7002(0x124)][_0x2c7002(0x14b)](_0x2c7002(0x117));return _0x2404a6[_0x2c7002(0x141)][_0x2c7002(0xf3)](_0x17713c=>{const _0x520c92=_0x2c7002;for(const _0x25c788 of _0x396211)_0x17713c[_0x520c92(0xf0)](_0x25c788);}),!0x0;}async[_0x351ecd(0x11a)](_0x50350c){const _0x1a474b=_0x351ecd,_0x3a6815=_0x1b1412(this[_0x1a474b(0x122)]),_0x2e162f=_0x3a6815[_0x1a474b(0x13d)][_0x1a474b(0x149)](_0x50350c),_0x2a1e23=new _0x1d590f(_0x3a6815[_0x1a474b(0x14f)][_0x1a474b(0x11c)][_0x1a474b(0x137)]);return this[_0x1a474b(0xe4)](_0x2e162f,_0x2a1e23),this[_0x1a474b(0x158)](_0x2e162f);}[_0x351ecd(0xe4)](_0x15f142,_0x27242f){const _0x22c109=_0x351ecd;let _0x29fe0a=!0x1;const _0x2c8a0b=new Set();for(const _0x2f9a75 of _0x15f142[_0x22c109(0x10e)]()){const _0x74878f=_0x2f9a75['is'](_0x22c109(0x129))||_0x2f9a75['is'](_0x22c109(0x106));if(!_0x2f9a75['is'](_0x22c109(0x11d)))continue;(this[_0x22c109(0xe4)](_0x2f9a75,_0x27242f)||_0x74878f)&&(_0x27242f[_0x22c109(0x140)](_0x22c109(0x134),this[_0x22c109(0xf5)](_0x2c8a0b),_0x2f9a75),_0x29fe0a=!0x0);}return _0x29fe0a;}[_0x351ecd(0xf5)](_0x4e2db2){const _0x517326=_0x351ecd;let _0x2d5c89;do{_0x2d5c89='';for(let _0x14abdb=0x0;_0x14abdb<0x4;_0x14abdb++)_0x2d5c89+=String[_0x517326(0x127)](0x61+Math[_0x517326(0x156)](0x1a*Math[_0x517326(0x142)]()));}while(_0x4e2db2[_0x517326(0x13c)](_0x2d5c89));return _0x4e2db2[_0x517326(0x126)](_0x2d5c89),_0x2d5c89;}[_0x351ecd(0xf6)](){const _0x295c8a=_0x351ecd,{model:_0x5d1ff1}=_0x1b1412(this[_0x295c8a(0x122)]),_0x58aa68=_0x5d1ff1[_0x295c8a(0x137)][_0x295c8a(0x113)],_0x38b4c6=[];for(const _0xacf561 of _0x58aa68[_0x295c8a(0x10c)]())for(const _0x268eea of _0xacf561[_0x295c8a(0x14a)]())_0x268eea['is'](_0x295c8a(0x145))?_0x38b4c6[_0x295c8a(0xfa)](_0x268eea[_0x295c8a(0x13d)]):_0x268eea['is'](_0x295c8a(0x11d))&&_0x38b4c6[_0x295c8a(0xf2)]>0x0&&'\x20'!==_0x38b4c6[_0x38b4c6[_0x295c8a(0xf2)]-0x1]&&_0x38b4c6[_0x295c8a(0xfa)]('\x20');return _0x38b4c6[_0x295c8a(0xf2)]?'\x22'+_0x38b4c6[_0x295c8a(0xec)]('')[_0x295c8a(0x112)]()+'\x22':_0x1807f7(this[_0x295c8a(0x122)][_0x295c8a(0x12c)],_0x295c8a(0x10d));}[_0x351ecd(0x110)](){const _0x357394=_0x351ecd,_0x835576=_0x1b1412(this[_0x357394(0x122)])[_0x357394(0x141)];return Array[_0x357394(0x132)](_0x835576[_0x357394(0x124)][_0x357394(0x14b)](_0x357394(0x117)))[_0x357394(0x107)]((_0x3a500c,_0xfe8af)=>_0x3a500c[_0x357394(0x12e)]()[_0x357394(0x111)](_0xfe8af[_0x357394(0x12e)]())?-0x1:_0x3a500c[_0x357394(0x12e)]()[_0x357394(0x14d)](_0xfe8af[_0x357394(0x12e)]())?0x1:0x0);}}function _0x4f86(){const _0x1250ae=['436884UZXRqV','1arpXVI','locale','editors','getStart','AIEditing','markerToHighlight','showFakeVisualSelection','from','schema','data-id','sessionId','getDocumentData','document','substring','config','end','_sessionId','has','data',':start></','editingDowncast','setAttribute','model','random','22794KhYZrA','removeAllRanges','$textProxy','version','markerName','2009OVUNgV','toView','getItems','getMarkersGroup','conversion','isAfter','ai.models.showModelSelector','editing','isPremiumPlugin','ck-fake-ai-selection','_outputDataProcessor','getSelection','12574952apousg','listenTo','floor','15QXapfW','_getDocumentDataStringFromView','_setDataIdsOnChildren','convertAiChatSelectionMarker','_integrateEditor','getRoot','dataDowncast','RealTimeCollaborationClient','toData','hideFakeVisualSelection','join','name','isOfficialPlugin','domConverter','removeMarker','htmlWriter','length','change','indexOf','_nextDataId','getSelectionText','addMarker','get','_displayedFakeSelectionId','push','isOpening','_setOutputDataProcessor','for','createRange','getLastMatchingPosition','processor','define',':start>','968134mLaptD','11thgTuK','afterInit','containerElement','sort','createUIElement','viewToDom',':end></','getHtml','getRanges','AI_CHAT_CONTEXT_DOCUMENT_SELECTION_LABEL','getChildren','start','_getMarkersInDocumentOrder','isBefore','trim','selection','pluginName','ai-selection:','isContent','ai-selection','18877960ZIdFUT',':end>','modelToDataWithIds','plugins','view','element','1810756wuDFXf','ready','ck-ai-assistant-ui_theme','isAtEnd','context','6403878LPshaA','markers','_displayedFakeSelectionLocked','add','fromCharCode','markerToElement','emptyElement'];_0x4f86=function(){return _0x1250ae;};return _0x4f86();}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
const _0x51dfbd=_0x183d;(function(_0x372456,_0x14517c){const _0x1124d7=_0x183d,_0x5ecb00=_0x372456();while(!![]){try{const _0x231dde=parseInt(_0x1124d7(0xd3))/0x1*(parseInt(_0x1124d7(0xc8))/0x2)+-parseInt(_0x1124d7(0xd0))/0x3*(parseInt(_0x1124d7(0x103))/0x4)+parseInt(_0x1124d7(0xfd))/0x5+parseInt(_0x1124d7(0xb5))/0x6*(parseInt(_0x1124d7(0xd6))/0x7)+-parseInt(_0x1124d7(0xc5))/0x8+-parseInt(_0x1124d7(0xd8))/0x9+parseInt(_0x1124d7(0xe5))/0xa;if(_0x231dde===_0x14517c)break;else _0x5ecb00['push'](_0x5ecb00['shift']());}catch(_0x238461){_0x5ecb00['push'](_0x5ecb00['shift']());}}}(_0x1dce,0x45abd));import{CKEditorError as _0x230067,EmitterMixin as _0x224e2b,uid as _0xb08eaa}from'ckeditor5/src/utils.js';import{AIReply as _0x58e0fe}from'./aireply.js';function _0x1dce(){const _0x266143=['content','destroy','replyContentUpdated','_isReasoning','createReply','replies','message-metadata','2059600WRPqVu','result','modification-delta','2adNVKA','push','delegate','currentRequest','text','getDocumentContext','action-metadata','web-search','3lagUsT','text-delta','webSearchFinished','299877FqdjHO','interactionCreated','error','1579571taffiU','getReply','3900663rMLpEu','sendRequest','abortController','webSearchStarted','source','_handleToolNotificationData','toolDataReceived','sources','currentReply','connector','event','setConversationTitle','mcp-tool-result','6046370HfnMSd','reasoning','ai-chat-interaction-error','editor','done','isDestroyed','interactionFinished','find','abort','mcp-tool-notification','appendContent','_isWebSearching','splice','messageId','stop','forEach','replyChangeGroupStateUpdated','actionCallId','start','interactionStopped','reasoningStarted','conversation-title','interactionStarted','resetReasoningState','1004020GyyUdZ','modification','notification','fire','conversationTitle','resetWebSearchState','1418964xNQxZb','getStream','attributes','callId','parse','reasoningFinished','_finalizeInteraction','interactionDestroyed','type','6jedUlO','toolName','stopListening','data','replyCreated','isStopped','_handleToolResultData','length','textDelta'];_0x1dce=function(){return _0x266143;};return _0x1dce();}export const AI_MODEL_EVENT_NAMES=[_0x51dfbd(0xd4),_0x51dfbd(0xfb),_0x51dfbd(0xf8),_0x51dfbd(0xeb),_0x51dfbd(0x10a),_0x51dfbd(0xb9),_0x51dfbd(0xc0),_0x51dfbd(0xf5),_0x51dfbd(0xe3),_0x51dfbd(0xdb),_0x51dfbd(0xd2),_0x51dfbd(0xf9),_0x51dfbd(0x108),_0x51dfbd(0xde),_0x51dfbd(0xd5)];function _0x183d(_0x2e2d38,_0x5b1a08){const _0x1dceb6=_0x1dce();return _0x183d=function(_0x183de3,_0x2d83fb){_0x183de3=_0x183de3-0xb4;let _0x1691fd=_0x1dceb6[_0x183de3];return _0x1691fd;},_0x183d(_0x2e2d38,_0x5b1a08);}export class AIInteraction extends _0x224e2b(){['id'];[_0x51dfbd(0xc3)]=[];[_0x51dfbd(0xe0)];[_0x51dfbd(0xf2)];[_0x51dfbd(0xf6)];[_0x51dfbd(0xcb)];[_0x51dfbd(0xe1)];[_0x51dfbd(0xba)]=!0x1;[_0x51dfbd(0xea)]=!0x1;[_0x51dfbd(0xe8)];[_0x51dfbd(0xc1)]=!0x1;[_0x51dfbd(0xf0)]=!0x1;constructor({connector:_0x5a8e25,editor:_0xc17e37}){const _0x4d992a=_0x51dfbd;super(),this['id']=_0xb08eaa(),this[_0x4d992a(0xe1)]=_0x5a8e25,this[_0x4d992a(0xba)]=!0x0,this[_0x4d992a(0xe8)]=_0xc17e37;}async[_0x51dfbd(0xf7)](){const _0x53bced=_0x51dfbd,_0x4b4f99=[];let _0x257cc8,_0xfed0ec,_0x2cd02d;this[_0x53bced(0xba)]=!0x1;try{this[_0x53bced(0xcb)]=await this[_0x53bced(0xd9)](),this[_0x53bced(0x100)](_0x53bced(0xfb),this);const _0x1fde7c=await this[_0x53bced(0xcb)][_0x53bced(0x104)]();for await(const _0x35b4e5 of _0x1fde7c){if(this[_0x53bced(0xba)])return;if(_0x53bced(0xd5)==_0x35b4e5[_0x53bced(0xe2)])return void this[_0x53bced(0x100)](_0x53bced(0xd5),{'error':new _0x230067(_0x53bced(0xe7),this)});switch(_0x35b4e5[_0x53bced(0xe2)]){case _0x53bced(0xc4):this[_0x53bced(0xf2)]=_0x35b4e5[_0x53bced(0xb8)][_0x53bced(0xf2)];break;case _0x53bced(0xce):this[_0x53bced(0xf6)]=_0x35b4e5[_0x53bced(0xb8)][_0x53bced(0x106)];break;case _0x53bced(0xfa):this[_0x53bced(0xe3)](_0x35b4e5[_0x53bced(0xb8)][_0x53bced(0x101)],!0x0);break;case _0x53bced(0xdc):_0x4b4f99[_0x53bced(0xc9)](_0x35b4e5[_0x53bced(0xb8)][_0x53bced(0xdc)]);break;case _0x53bced(0xcf):this[_0x53bced(0xf0)]||(this[_0x53bced(0xf0)]=!0x0,this[_0x53bced(0x100)](_0x53bced(0xdb),this));break;case _0x53bced(0xe6):this[_0x53bced(0xc1)]||(this[_0x53bced(0xc1)]=!0x0,this[_0x53bced(0x100)](_0x53bced(0xf9),this));break;case _0x53bced(0xc7):case _0x53bced(0xd1):this[_0x53bced(0xfc)](),this[_0x53bced(0x102)](),_0x257cc8=_0x53bced(0xc7)==_0x35b4e5[_0x53bced(0xe2)]?_0x53bced(0xfe):_0x53bced(0xcc),_0xfed0ec=_0x53bced(0xc7)==_0x35b4e5[_0x53bced(0xe2)]?_0x35b4e5[_0x53bced(0xb8)]['id']:void 0x0,this[_0x53bced(0xe0)]&&this[_0x53bced(0xe0)][_0x53bced(0xb4)]!=_0x257cc8&&(this[_0x53bced(0xe0)][_0x53bced(0xe9)](),this[_0x53bced(0xe0)]=void 0x0),this[_0x53bced(0xe0)]||(this[_0x53bced(0xe0)]=this[_0x53bced(0xc2)]({'type':_0x257cc8,'interactionId':this['id'],'id':_0xfed0ec}),_0x53bced(0xfe)==_0x257cc8&&(this[_0x53bced(0xe0)][_0x53bced(0xdf)]=_0x4b4f99[_0x53bced(0xf1)](0x0))),this[_0x53bced(0xe0)][_0x53bced(0xef)](_0x35b4e5[_0x53bced(0xb8)][_0x53bced(0xbd)]);break;case _0x53bced(0xe4):_0x2cd02d=JSON[_0x53bced(0x107)](_0x35b4e5[_0x53bced(0xb8)][_0x53bced(0xc6)]),this[_0x53bced(0xbb)]({'toolName':_0x35b4e5[_0x53bced(0xb8)][_0x53bced(0xb6)],'data':_0x2cd02d[_0x53bced(0xb8)],'attributes':_0x2cd02d[_0x53bced(0x105)]});break;case _0x53bced(0xee):this[_0x53bced(0xdd)]({'toolName':_0x35b4e5[_0x53bced(0xb8)][_0x53bced(0xb6)],'data':_0x35b4e5[_0x53bced(0xb8)][_0x53bced(0xb8)]});}}}finally{this[_0x53bced(0xba)]||(this[_0x53bced(0xe0)]&&_0x4b4f99[_0x53bced(0xbc)]>0x0&&(this[_0x53bced(0xe0)][_0x53bced(0xdf)]=_0x4b4f99[_0x53bced(0xf1)](0x0)),this[_0x53bced(0x109)](),this[_0x53bced(0x100)](_0x53bced(0xeb),this));}}[_0x51dfbd(0xf3)](){const _0x1978a3=_0x51dfbd;this[_0x1978a3(0xba)]||(this[_0x1978a3(0x109)](),this[_0x1978a3(0x100)](_0x1978a3(0xf8),this));}[_0x51dfbd(0xd7)](_0xa3446a){const _0x4af7e5=_0x51dfbd;return this[_0x4af7e5(0xc3)][_0x4af7e5(0xec)](_0x1f2e99=>_0x1f2e99['id']===_0xa3446a);}[_0x51dfbd(0xbf)](){const _0x18cf78=_0x51dfbd;this[_0x18cf78(0xea)]||(this[_0x18cf78(0xf3)](),this[_0x18cf78(0xc3)][_0x18cf78(0xf4)](_0x2bad7c=>_0x2bad7c[_0x18cf78(0xbf)]()),this[_0x18cf78(0xc3)]=[],this[_0x18cf78(0xea)]=!0x0,this[_0x18cf78(0x100)](_0x18cf78(0x10a),this),this[_0x18cf78(0xb7)]());}[_0x51dfbd(0xc2)](_0x4c7175){const _0x290bd2=_0x51dfbd,_0x53581e=new _0x58e0fe({'editor':this[_0x290bd2(0xe8)],'documentContextContent':this[_0x290bd2(0xcd)]()?.[_0x290bd2(0xbe)],..._0x4c7175});return this[_0x290bd2(0xc3)][_0x290bd2(0xc9)](_0x53581e),_0x53581e[_0x290bd2(0xca)](...AI_MODEL_EVENT_NAMES)['to'](this),this[_0x290bd2(0x100)](_0x290bd2(0xb9),_0x53581e),_0x53581e;}[_0x51dfbd(0xe3)](_0x5ef8b3,_0x50cdda=!0x1){const _0x140a66=_0x51dfbd;this[_0x140a66(0x100)](_0x140a66(0xe3),_0x5ef8b3,_0x50cdda);}[_0x51dfbd(0x102)](){const _0xc26a4=_0x51dfbd;this[_0xc26a4(0xf0)]&&(this[_0xc26a4(0xf0)]=!0x1,this[_0xc26a4(0x100)](_0xc26a4(0xd2),this));}[_0x51dfbd(0xfc)](){const _0x1b47c2=_0x51dfbd;this[_0x1b47c2(0xc1)]&&(this[_0x1b47c2(0xc1)]=!0x1,this[_0x1b47c2(0x100)](_0x1b47c2(0x108),this));}[_0x51dfbd(0xbb)](_0x2408cc){const _0x3e2805=_0x51dfbd;this[_0x3e2805(0x100)](_0x3e2805(0xde),{'type':_0x3e2805(0xc6),'toolName':_0x2408cc[_0x3e2805(0xb6)],'data':structuredClone(_0x2408cc[_0x3e2805(0xb8)]||{}),'attributes':structuredClone(_0x2408cc[_0x3e2805(0x105)]||{})},this);}[_0x51dfbd(0xdd)](_0x8d69cd){const _0x3b9ea5=_0x51dfbd;this[_0x3b9ea5(0x100)](_0x3b9ea5(0xde),{'type':_0x3b9ea5(0xff),'toolName':_0x8d69cd[_0x3b9ea5(0xb6)],'data':structuredClone(_0x8d69cd[_0x3b9ea5(0xb8)])},this);}[_0x51dfbd(0x109)](){const _0x67b00d=_0x51dfbd;this[_0x67b00d(0xba)]=!0x0,this[_0x67b00d(0xcb)]&&this[_0x67b00d(0xcb)][_0x67b00d(0xda)][_0x67b00d(0xed)](),this[_0x67b00d(0xe0)]&&this[_0x67b00d(0xe0)][_0x67b00d(0xe9)](),this[_0x67b00d(0xcb)]=this[_0x67b00d(0xe0)]=void 0x0;}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x1a0a47=_0x3f1f;(function(_0x25fcff,_0x26ce7e){const _0x166917=_0x3f1f,_0x3adc0f=_0x25fcff();while(!![]){try{const _0x3ff4a1=parseInt(_0x166917(0x202))/0x1+-parseInt(_0x166917(0x1eb))/0x2*(parseInt(_0x166917(0x1e6))/0x3)+parseInt(_0x166917(0x1ed))/0x4+-parseInt(_0x166917(0x20a))/0x5*(-parseInt(_0x166917(0x214))/0x6)+-parseInt(_0x166917(0x1f1))/0x7+parseInt(_0x166917(0x1f8))/0x8+-parseInt(_0x166917(0x1e9))/0x9;if(_0x3ff4a1===_0x26ce7e)break;else _0x3adc0f['push'](_0x3adc0f['shift']());}catch(_0x437f3f){_0x3adc0f['push'](_0x3adc0f['shift']());}}}(_0x4022,0x4efd9));import{EmitterMixin as _0x3d3186,logWarning as _0x253ac9,logError as _0x512271}from'ckeditor5/src/utils.js';function _0x3f1f(_0x41c439,_0x22c514){const _0x402274=_0x4022();return _0x3f1f=function(_0x3f1fb1,_0x3f19ec){_0x3f1fb1=_0x3f1fb1-0x1e5;let _0x2be7e3=_0x402274[_0x3f1fb1];return _0x2be7e3;},_0x3f1f(_0x41c439,_0x22c514);}import{getTranslation as _0x3e8618}from'../utils/common-translations.js';export class AIModels extends _0x3d3186(){[_0x1a0a47(0x207)];[_0x1a0a47(0x1ea)];[_0x1a0a47(0x217)];[_0x1a0a47(0x20b)]=[];[_0x1a0a47(0x20d)]=null;constructor({connector:_0x3400ce,config:_0x394dd1,locale:_0x157210}){const _0x133172=_0x1a0a47;super(),this[_0x133172(0x207)]=_0x3400ce,this[_0x133172(0x1ea)]=_0x394dd1,this[_0x133172(0x217)]=_0x157210;}get[_0x1a0a47(0x215)](){const _0x3ed8e2=_0x1a0a47;return this[_0x3ed8e2(0x1ea)]?.[_0x3ed8e2(0x1ff)];}get[_0x1a0a47(0x1f9)](){const _0x3fe0a7=_0x1a0a47;return this[_0x3fe0a7(0x1ea)]?.[_0x3fe0a7(0x1fe)];}async[_0x1a0a47(0x201)](){const _0x27d9eb=_0x1a0a47;return this[_0x27d9eb(0x20d)]||(this[_0x27d9eb(0x20d)]=this[_0x27d9eb(0x204)]()),this[_0x27d9eb(0x20d)];}async[_0x1a0a47(0x1e5)](){const _0x2e41e3=_0x1a0a47,_0x529c98=await this[_0x2e41e3(0x201)]();let _0x5430f2;return _0x5430f2=this[_0x2e41e3(0x215)]?this[_0x2e41e3(0x213)](_0x529c98,this[_0x2e41e3(0x215)]):_0x529c98[_0x2e41e3(0x1ec)](_0x553576=>_0x553576[_0x2e41e3(0x216)]),_0x5430f2;}async[_0x1a0a47(0x1f4)](_0x513bae){const _0x3923a5=_0x1a0a47,_0x3cd0ac=await this[_0x3923a5(0x201)]();if(!_0x3cd0ac[_0x3923a5(0x20e)])return null;if(_0x513bae){const _0x3dee8f=this[_0x3923a5(0x212)](_0x3cd0ac,_0x513bae);if(_0x3dee8f)return _0x3dee8f;_0x253ac9(_0x3923a5(0x1fa),{'modelId':_0x513bae,'fallBackModelId':this[_0x3923a5(0x1f9)]});}return this[_0x3923a5(0x1ee)]();}async[_0x1a0a47(0x1ee)](){const _0x56235b=_0x1a0a47,_0x42ad27=await this[_0x56235b(0x1e5)]();if(!_0x42ad27[_0x56235b(0x20e)])return null;if(this[_0x56235b(0x1f9)]){const _0x4a9c1f=this[_0x56235b(0x212)](_0x42ad27,this[_0x56235b(0x1f9)]);if(_0x4a9c1f)return _0x4a9c1f;_0x253ac9(_0x56235b(0x1f7),{'defaultModelId':this[_0x56235b(0x1f9)],'fallBackModelId':_0x42ad27[0x0]['id']});}return _0x42ad27[0x0];}async[_0x1a0a47(0x206)](_0x4d1d95){const _0x516121=_0x1a0a47;return(await this[_0x516121(0x1e5)]())[_0x516121(0x1f6)](_0x22fc11=>_0x22fc11[_0x516121(0x1f3)]===_0x4d1d95[_0x516121(0x1f3)]&&_0x22fc11[_0x516121(0x1f0)]===_0x4d1d95[_0x516121(0x1f0)]);}async[_0x1a0a47(0x204)](){const _0x556246=_0x1a0a47;if(!this[_0x556246(0x20b)][_0x556246(0x20e)])try{const _0x25b54f=this[_0x556246(0x217)][_0x556246(0x1f5)]||'en',_0xe5d965=this[_0x556246(0x207)][_0x556246(0x1e8)](_0x25b54f),_0x14dfda=await _0xe5d965[_0x556246(0x1e7)]();this[_0x556246(0x20b)]=_0x14dfda[_0x556246(0x208)][_0x556246(0x200)](_0x2499c2=>Ji(_0x2499c2)?{..._0x2499c2,'name':_0x3e8618(this[_0x556246(0x217)],_0x556246(0x1fc))}:_0x2499c2);}catch(_0x248698){throw _0x512271(_0x556246(0x1f2),{'error':_0x248698}),_0x248698;}return[...this[_0x556246(0x20b)]];}[_0x1a0a47(0x213)](_0x5f350c,_0x1514d6){const _0x15c1fc=_0x1a0a47;let _0x1c3ce9;if(_0x1514d6){_0x1c3ce9=[];const _0x3966a1=new Set(),_0x5bc5f0=_0x15c1fc(0x1fd)==typeof _0x1514d6?[_0x1514d6[_0x15c1fc(0x211)]()]:_0x1514d6[_0x15c1fc(0x200)](_0x3569fd=>_0x3569fd[_0x15c1fc(0x211)]());for(const _0xc9d628 of _0x5bc5f0)for(const _0x1597aa of _0x5f350c)!_0x3966a1[_0x15c1fc(0x20c)](_0x1597aa['id'])&&this[_0x15c1fc(0x1fb)](_0x1597aa,_0xc9d628)&&(_0x1c3ce9[_0x15c1fc(0x1ef)](_0x1597aa),_0x3966a1[_0x15c1fc(0x203)](_0x1597aa['id']));}else _0x1c3ce9=_0x5f350c;return _0x1c3ce9;}[_0x1a0a47(0x1fb)](_0xdd8f8c,_0x33e734){const _0x410783=_0x1a0a47,_0x5075f8=_0xdd8f8c['id'][_0x410783(0x211)](),_0x27b89d=_0xdd8f8c[_0x410783(0x1f3)][_0x410783(0x211)](),_0x222dee=_0xdd8f8c[_0x410783(0x1f0)][_0x410783(0x211)]();return _0x5075f8===_0x33e734||_0x27b89d===_0x33e734||Ji(_0xdd8f8c)&&_0x410783(0x210)===_0x33e734||_0x222dee===_0x33e734||_0x5075f8[_0x410783(0x209)](_0x33e734);}[_0x1a0a47(0x212)](_0xbe69d0,_0x4479cb){const _0x2d1a11=_0x1a0a47;return _0xbe69d0[_0x2d1a11(0x205)](_0xd1c819=>Ji(_0xd1c819)&&_0x2d1a11(0x210)===_0x4479cb?_0xd1c819:_0xd1c819['id']===_0x4479cb)||null;}}function _0x4022(){const _0x23c502=['84xMFcoX','_availableModels','recommended','_locale','getAvailableModels','3GQDLGW','list','getModels','4774743SETHlD','_config','898108QGkShf','filter','2128204Wodlez','getDefault','push','provider','1967084QVIvaK','ai-models-unable-to-retrieve','name','getModel','uiLanguage','some','ai-chat-default-model-id-unrecognized','804920yDySAk','_defaultModelId','ai-chat-model-id-unrecognized','_isMatchingFilter','AI_MODEL_NAME_AUTO','string','defaultModelId','displayedModels','map','getAll','575628nzXcPh','add','_retrieveModels','find','isAvailable','_connector','items','startsWith','134230uAPJnT','_modelList','has','_modelsRequest','length','agent','auto','toLocaleLowerCase','_getModelById','_filterModels'];_0x4022=function(){return _0x23c502;};return _0x4022();}function Ji(_0x20427d){const _0x3846a1=_0x1a0a47;return _0x20427d['id'][_0x3846a1(0x209)](_0x3846a1(0x20f));}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
function _0x57ef(_0x4e2ef6,_0x3cf411){const _0x2bf781=_0x2bf7();return _0x57ef=function(_0x57ef04,_0x37500f){_0x57ef04=_0x57ef04-0xde;let _0x120ef7=_0x2bf781[_0x57ef04];return _0x120ef7;},_0x57ef(_0x4e2ef6,_0x3cf411);}const _0x18aca2=_0x57ef;(function(_0x227c95,_0x52c2d3){const _0x3ed596=_0x57ef,_0x5aa91f=_0x227c95();while(!![]){try{const _0x54faac=parseInt(_0x3ed596(0x125))/0x1+parseInt(_0x3ed596(0x117))/0x2+-parseInt(_0x3ed596(0xfa))/0x3+-parseInt(_0x3ed596(0x118))/0x4*(-parseInt(_0x3ed596(0xef))/0x5)+-parseInt(_0x3ed596(0x113))/0x6+-parseInt(_0x3ed596(0x11a))/0x7+-parseInt(_0x3ed596(0x101))/0x8*(parseInt(_0x3ed596(0x124))/0x9);if(_0x54faac===_0x52c2d3)break;else _0x5aa91f['push'](_0x5aa91f['shift']());}catch(_0x5c1479){_0x5aa91f['push'](_0x5aa91f['shift']());}}}(_0x2bf7,0x9917d));import{CKEditorError as _0x27af3a,ObservableMixin as _0x52611c,uid as _0x244a74}from'ckeditor5/src/utils.js';import{Element as _0x324360,findAll as _0x52ee30,getAttribute as _0x32e987,getParents as _0x5d29be,Document as _0x57ba46,parse as _0x405e72,Text as _0x310a83}from'../utils/htmlparser.js';function _0x2bf7(){const _0x377c31=['parsedMergedContent','indexOf','includes','isDone','ai-reply-get-content-parts-group-not-found','map','locale','_getDifferentChangeGroups','content','ai-get-editor-from-context-no-editor','parsedContent','new','getContentParts','merge','aiResponseParser','245zyBHxW','removed','sources','areActionsDisabled','data-id','aiResponseApplier','destroy','state','replyChangeGroupStateUpdated','_getCachedContentParts','documentContextContent','390555tBICpn','context','unshift','replyContentUpdated','data-unstable','color:\x20#808080;\x20font-style:\x20italic','change:content','474544etDSeI','filter','every','withDiff','type','updateChangeGroups','AI_SUGGESTION_CONTENT_PART_REMOVED','modified','pending','interactionId','newNodeIds','splice','find','parseAndNormalizeHTML','push','span','node','cloneNode','2075592yGKEMj','editor','removedNodeIds','modifiedNodeIds','1743114YesDbf','40908vijCnD','cachedSuggestionContentParts','2431653YrRnir','_setCachedContentParts','stopListening','modification','fire','done','forEach','nextSibling','length','previousSibling','18gzcyxA','196521hFZyNK','appendContent','onContentChange','set','withoutDiff','changes','changeGroups','setChangeGroupState','index','convertMarkdownToHTML'];_0x2bf7=function(){return _0x377c31;};return _0x2bf7();}import{AIResponseParser as _0x32448d}from'../pipeline/airesponseparser.js';import{AIResponseApplier as _0x5d30a3}from'../pipeline/airesponseapplier.js';import{getSuggestionPartsFromReply as _0x58faf6}from'../utils/getsuggestionpartsfromreply.js';import{getTranslation as _0x458cf8}from'../utils/common-translations.js';import{cloneDeep as _0x424256}from'es-toolkit';export class AIReply extends _0x52611c(){['id'];[_0x18aca2(0x10a)];[_0x18aca2(0x105)];[_0x18aca2(0xf1)]=[];[_0x18aca2(0xea)]=new _0x57ba46([]);[_0x18aca2(0xe0)]=new _0x57ba46([]);[_0x18aca2(0x12b)]=[];[_0x18aca2(0xf2)]=!0x1;[_0x18aca2(0xf9)];[_0x18aca2(0xee)];[_0x18aca2(0xf4)];[_0x18aca2(0x114)];[_0x18aca2(0x119)]={'withDiff':[],'withoutDiff':[]};constructor({type:_0x7b3936,content:_0x1d0e0d='',isDone:_0x5fc6d1=!0x1,interactionId:_0x26154f,areActionsDisabled:_0x614fb9,documentContextContent:_0x294b1f,editor:_0x11f98d,id:_0x59bafc}){const _0x365a2e=_0x18aca2;super(),this['id']=_0x59bafc||_0x244a74(),this[_0x365a2e(0x10a)]=_0x26154f,this[_0x365a2e(0x105)]=_0x7b3936,this[_0x365a2e(0xf2)]=!!_0x614fb9,this[_0x365a2e(0x114)]=_0x11f98d,this[_0x365a2e(0xee)]=new _0x32448d(),this[_0x365a2e(0xf4)]=new _0x5d30a3(),this[_0x365a2e(0xf9)]=_0x405e72(_0x294b1f||''),this[_0x365a2e(0x128)](_0x365a2e(0xe3),_0x5fc6d1),this['on'](_0x365a2e(0x100),()=>{const _0x1574ca=_0x365a2e;this[_0x1574ca(0x127)]();}),this[_0x365a2e(0x128)](_0x365a2e(0xe8),_0x1d0e0d);}[_0x18aca2(0x126)](_0x1b9348){const _0x11a7fc=_0x18aca2;this[_0x11a7fc(0x128)](_0x11a7fc(0xe8),this[_0x11a7fc(0xe8)]+_0x1b9348);}[_0x18aca2(0x11f)](){const _0x2aa802=_0x18aca2;this[_0x2aa802(0xe3)]||(this[_0x2aa802(0x128)](_0x2aa802(0xe3),!0x0),this[_0x2aa802(0x127)]());}[_0x18aca2(0xf5)](){const _0x417993=_0x18aca2;this[_0x417993(0x11c)]();}[_0x18aca2(0x12c)](_0x46505b,_0x2f2dd8){const _0x4b08a8=_0x18aca2;this[_0x4b08a8(0x12b)][_0x46505b][_0x4b08a8(0xf6)]=_0x2f2dd8,this[_0x4b08a8(0x11e)](_0x4b08a8(0xf7),{'reply':this,'index':_0x46505b,'state':_0x2f2dd8});}[_0x18aca2(0xec)]({showDiff:_0x48bb49,groupIndex:_0x122c9f}){const _0x40656e=_0x18aca2;if(!this[_0x40656e(0x114)])throw new _0x27af3a(_0x40656e(0xe9),null,{'aiReply':this});const _0x31e239=this[_0x40656e(0xf8)](_0x48bb49,_0x122c9f);if(_0x31e239)return _0x31e239;let _0x2a0467=[];if(void 0x0===_0x122c9f)_0x2a0467=this[_0x40656e(0x12b)];else{const _0x51bd3a=this[_0x40656e(0x12b)][_0x40656e(0x10d)](({index:_0x617d23})=>_0x617d23===_0x122c9f);if(!_0x51bd3a)throw new _0x27af3a(_0x40656e(0xe4),null,{'aiReply':this,'groupIndex':_0x122c9f});_0x2a0467=[_0x51bd3a];}const _0x49cb6b=_0x58faf6({'editor':this[_0x40656e(0x114)],'showDiff':_0x48bb49,'changeGroups':_0x2a0467,'documentContextContent':this[_0x40656e(0xf9)]});return this[_0x40656e(0x11b)](_0x48bb49,_0x49cb6b),_0x49cb6b;}[_0x18aca2(0xf8)](_0x51b27b,_0x50bcb1){const _0x2b8505=_0x18aca2,_0x190c02=_0x51b27b?_0x2b8505(0x104):_0x2b8505(0x129);if(!this[_0x2b8505(0x119)][_0x190c02][_0x2b8505(0x122)])return null;const _0x2907f5=this[_0x2b8505(0x119)][_0x190c02];if(void 0x0===_0x50bcb1)return _0x2907f5[_0x2b8505(0x122)]>0x0&&_0x2907f5[_0x2b8505(0x122)]!==this[_0x2b8505(0x12b)][_0x2b8505(0x122)]?(this[_0x2b8505(0x11b)](_0x51b27b,null),null):_0x424256(_0x2907f5);{const _0x449655=_0x2907f5[_0x2b8505(0x10d)](({index:_0x8e409c})=>_0x8e409c===_0x50bcb1);if(_0x449655)return[_0x424256(_0x449655)];}return null;}[_0x18aca2(0x11b)](_0x4eed04,_0x1c227b){const _0xc9c72a=_0x18aca2,_0x478d69=_0x4eed04?_0xc9c72a(0x104):_0xc9c72a(0x129);_0x1c227b?_0x1c227b[_0xc9c72a(0x120)](_0x2c5a4e=>{const _0x4384e3=_0xc9c72a,_0x148700=this[_0x4384e3(0x119)][_0x478d69],_0x3fb5bd=_0x148700[_0x4384e3(0x10d)](({index:_0x272cbb})=>_0x272cbb===_0x2c5a4e[_0x4384e3(0xde)]);if(_0x3fb5bd){const _0x292ac2=_0x148700[_0x4384e3(0xe1)](_0x3fb5bd);_0x148700[_0x4384e3(0x10c)](_0x292ac2,0x1,_0x2c5a4e);}else _0x148700[_0x4384e3(0x10f)](_0x2c5a4e);}):this[_0xc9c72a(0x119)][_0x478d69][_0xc9c72a(0x122)]=0x0;}[_0x18aca2(0x127)](){const _0x5c56fe=_0x18aca2;if(_0x5c56fe(0x11d)===this[_0x5c56fe(0x105)]){this[_0x5c56fe(0xea)]=this[_0x5c56fe(0xee)][_0x5c56fe(0x10e)](this[_0x5c56fe(0xe8)]);const _0xee99c4=this[_0x5c56fe(0x12b)];this[_0x5c56fe(0x106)]();const _0x17b382=this[_0x5c56fe(0xe7)](_0xee99c4,this[_0x5c56fe(0x12b)]);(_0x17b382[_0x5c56fe(0x122)]||this[_0x5c56fe(0xe3)])&&(this[_0x5c56fe(0x11e)](_0x5c56fe(0xfd),this,_0x17b382),this[_0x5c56fe(0x119)][_0x5c56fe(0x104)][_0x5c56fe(0x122)]=this[_0x5c56fe(0x119)][_0x5c56fe(0x129)][_0x5c56fe(0x122)]=0x0);}else this[_0x5c56fe(0xea)]=this[_0x5c56fe(0xee)][_0x5c56fe(0xdf)](this[_0x5c56fe(0xe8)]),this[_0x5c56fe(0x11e)](_0x5c56fe(0xfd),this);}[_0x18aca2(0xe7)](_0x89aef9,_0x3a9697){const _0x231f46=_0x18aca2,_0x3d2099=[];for(const _0x7af9f5 of _0x3a9697){const _0x346668=_0x89aef9[_0x7af9f5[_0x231f46(0xde)]];_0x346668?_0x346668[_0x231f46(0x12a)][_0x231f46(0x122)]!==_0x7af9f5[_0x231f46(0x12a)][_0x231f46(0x122)]?_0x3d2099[_0x231f46(0x10f)](_0x7af9f5):_0x346668[_0x231f46(0x12a)][_0x231f46(0x120)]((_0x37a559,_0x24fdf7)=>{const _0x388554=_0x231f46,_0x3843eb=_0x7af9f5[_0x388554(0x12a)][_0x24fdf7];_0x37a559['id']!==_0x3843eb['id']&&_0x3d2099[_0x388554(0x10f)](_0x7af9f5);}):_0x3d2099[_0x231f46(0x10f)](_0x7af9f5);}return _0x3d2099;}[_0x18aca2(0x106)](){const _0x23d318=_0x18aca2,_0x853d4f=new _0x324360('p',{},[new _0x324360(_0x23d318(0x110),{'style':_0x23d318(0xff)},[new _0x310a83(_0x458cf8(this[_0x23d318(0x114)][_0x23d318(0xe6)],_0x23d318(0x107)))])]),_0x4fd196=this[_0x23d318(0xf4)][_0x23d318(0xed)](this[_0x23d318(0xea)],this[_0x23d318(0xf9)][_0x23d318(0x112)](!0x0),{'markUnstableElements':!this[_0x23d318(0xe3)],'replaceRemovedWith':_0x853d4f,'cutAfterLastChange':!this[_0x23d318(0xe3)]});if(!_0x4fd196[_0x23d318(0x116)][_0x23d318(0x122)]&&!this[_0x23d318(0xe3)])return;this[_0x23d318(0xe0)]=_0x4fd196[_0x23d318(0xea)];let _0x2b4cb2=[];if(_0x52ee30(_0xf1a7d2=>{const _0x2a122b=_0x23d318,_0x9e7d8=_0x32e987(_0xf1a7d2,_0x2a122b(0xf3));if(!_0x9e7d8||!_0x2a0fe3(_0x9e7d8))return!0x1;const _0x28afe0=[_0xf1a7d2,..._0x5d29be(_0xf1a7d2)]['at'](-0x2);if(_0xf1a7d2!=_0x28afe0){const _0x5465ed=_0x32e987(_0x28afe0,_0x2a122b(0xf3));_0x2a0fe3(_0x5465ed)||(_0x2b4cb2[_0x2a122b(0x10f)]({'node':_0x28afe0,'id':_0x5465ed,'type':_0x2a122b(0x108)}),_0x4fd196[_0x2a122b(0x116)][_0x2a122b(0x10f)](_0x5465ed));}else _0x4fd196[_0x2a122b(0x116)][_0x2a122b(0xe2)](_0x9e7d8)?_0x2b4cb2[_0x2a122b(0x10f)]({'node':_0xf1a7d2,'type':_0x2a122b(0x108),'id':_0x9e7d8}):_0x4fd196[_0x2a122b(0x10b)][_0x2a122b(0xe2)](_0x9e7d8)?_0x2b4cb2[_0x2a122b(0x10f)]({'node':_0xf1a7d2,'type':_0x2a122b(0xeb),'id':_0x9e7d8,'anchorId':_0x32e987(_0xf1a7d2[_0x2a122b(0x123)],_0x2a122b(0xf3))}):_0x2b4cb2[_0x2a122b(0x10f)]({'node':_0xf1a7d2,'type':_0x2a122b(0xf0),'id':_0x9e7d8});return!0x0;},this[_0x23d318(0xe0)]),_0x2b4cb2=_0x2b4cb2[_0x23d318(0x102)](({node:_0x2980d9})=>[..._0x5d29be(_0x2980d9),_0x2980d9][_0x23d318(0x103)](_0x181be6=>!_0x32e987(_0x181be6,_0x23d318(0xfe)))),0x0==_0x2b4cb2[_0x23d318(0x122)])return;const _0x112a4a=[[_0x2b4cb2[0x0]]];for(let _0x26a580=0x1;_0x26a580<_0x2b4cb2[_0x23d318(0x122)];_0x26a580++){const _0x34017f=_0x112a4a[_0x112a4a[_0x23d318(0x122)]-0x1],_0x1d3e87=_0x34017f[_0x34017f[_0x23d318(0x122)]-0x1];_0x2b4cb2[_0x26a580][_0x23d318(0x111)][_0x23d318(0x123)]==_0x1d3e87[_0x23d318(0x111)]&&_0x23d318(0x108)!=_0x2b4cb2[_0x26a580][_0x23d318(0x105)]&&_0x23d318(0x108)!=_0x1d3e87[_0x23d318(0x105)]?_0x34017f[_0x23d318(0x10f)](_0x2b4cb2[_0x26a580]):_0x112a4a[_0x23d318(0x10f)]([_0x2b4cb2[_0x26a580]]);}for(const _0x1331f7 of _0x112a4a){const _0x26d0ec=_0x1331f7[0x0],_0x514770=_0x1331f7[_0x1331f7[_0x23d318(0x122)]-0x1],_0x507996=_0x2a5c06(_0x26d0ec[_0x23d318(0x111)][_0x23d318(0x123)]);_0x507996&&_0x1331f7[_0x23d318(0xfc)](_0x507996);const _0x332946=_0x2a5c06(_0x514770[_0x23d318(0x111)][_0x23d318(0x121)]);_0x332946&&_0x1331f7[_0x23d318(0x10f)](_0x332946);}function _0x2a0fe3(_0x52a441){const _0xb575ed=_0x23d318;return _0x4fd196[_0xb575ed(0x116)][_0xb575ed(0xe2)](_0x52a441)||_0x4fd196[_0xb575ed(0x10b)][_0xb575ed(0xe2)](_0x52a441)||_0x4fd196[_0xb575ed(0x115)][_0xb575ed(0xe2)](_0x52a441);}function _0x2a5c06(_0x3c3177){const _0x209a94=_0x23d318;if(_0x3c3177&&_0x32e987(_0x3c3177,_0x209a94(0xf3))&&!_0x32e987(_0x3c3177,_0x209a94(0xfe))){const _0x3b931e=_0x32e987(_0x3c3177,_0x209a94(0xf3));if(!_0x2a0fe3(_0x3b931e))return{'node':_0x3c3177,'type':_0x209a94(0xfb),'id':_0x3b931e};}return null;}this[_0x23d318(0x12b)]=_0x112a4a[_0x23d318(0xe5)]((_0x57efe9,_0x5ed629)=>({'changes':_0x57efe9,'state':_0x23d318(0x109),'index':_0x5ed629}));}}
|
|
23
|
+
const _0x98a7d4=_0x2cb8;(function(_0x5567e7,_0x2a504e){const _0x7ff649=_0x2cb8,_0x47de50=_0x5567e7();while(!![]){try{const _0x198971=parseInt(_0x7ff649(0x18f))/0x1*(parseInt(_0x7ff649(0x18c))/0x2)+-parseInt(_0x7ff649(0x188))/0x3+-parseInt(_0x7ff649(0x1c3))/0x4+parseInt(_0x7ff649(0x1b6))/0x5*(parseInt(_0x7ff649(0x195))/0x6)+-parseInt(_0x7ff649(0x1bb))/0x7+parseInt(_0x7ff649(0x19b))/0x8+parseInt(_0x7ff649(0x189))/0x9*(parseInt(_0x7ff649(0x183))/0xa);if(_0x198971===_0x2a504e)break;else _0x47de50['push'](_0x47de50['shift']());}catch(_0x38b5ca){_0x47de50['push'](_0x47de50['shift']());}}}(_0x2dfc,0xe9290));import{CKEditorError as _0x4f73e3,ObservableMixin as _0x21ce37,uid as _0x3f1202}from'ckeditor5/src/utils.js';import{Element as _0xc4ca4d,findAll as _0x3b7524,getAttribute as _0x557fb1,getParents as _0x57c1c2,Document as _0x569f7f,parse as _0x39900c,Text as _0x8afc4b}from'../utils/htmlparser.js';function _0x2cb8(_0x289dd2,_0x492702){const _0x2dfc3d=_0x2dfc();return _0x2cb8=function(_0x2cb80c,_0x1395b6){_0x2cb80c=_0x2cb80c-0x182;let _0x530648=_0x2dfc3d[_0x2cb80c];return _0x530648;},_0x2cb8(_0x289dd2,_0x492702);}import{AIResponseParser as _0x688cbf}from'../pipeline/airesponseparser.js';import{AIResponseApplier as _0xe2b1a4}from'../pipeline/airesponseapplier.js';import{getSuggestionPartsFromReply as _0x567f52}from'../utils/getsuggestionpartsfromreply.js';import{getTranslation as _0x34eeac}from'../utils/common-translations.js';function _0x2dfc(){const _0x4f7032=['content','withDiff','5MVAYEF','aiResponseApplier','cloneNode','new','getContentParts','7113127qwLPpw','AI_SUGGESTION_CONTENT_PART_REMOVED','includes','_getDifferentChangeGroups','newNodeIds','indexOf','index','modification','2984516tgxkCY','editor','data-id','interactionId','ai-reply-get-content-parts-group-not-found','destroy','length','modifiedNodeIds','cachedSuggestionContentParts','find','areActionsDisabled','stopListening','_setCachedContentParts','node','convertMarkdownToHTML','context','11990zWZxPG','fire','unshift','modified','aiResponseParser','916920Ozwhkb','5877kVDRHm','done','changes','121942ZpxWEr','replyContentUpdated','setChangeGroupState','10yJljSF','changeGroups','every','parsedContent','merge','locale','4750776XtqkUr','_getCachedContentParts','type','color:\x20#808080;\x20font-style:\x20italic','splice','withoutDiff','6708008tOivMK','state','replyChangeGroupStateUpdated','appendContent','parseAndNormalizeHTML','ai-get-editor-from-context-no-editor','sources','nextSibling','removedNodeIds','updateChangeGroups','previousSibling','forEach','map','isDone','filter','set','removed','documentContextContent','change:content','parsedMergedContent','push','pending','data-unstable','span','onContentChange'];_0x2dfc=function(){return _0x4f7032;};return _0x2dfc();}import{cloneDeep as _0x453908}from'es-toolkit';export class AIReply extends _0x21ce37(){['id'];[_0x98a7d4(0x1c6)];[_0x98a7d4(0x197)];[_0x98a7d4(0x1a1)]=[];[_0x98a7d4(0x192)]=new _0x569f7f([]);[_0x98a7d4(0x1ae)]=new _0x569f7f([]);[_0x98a7d4(0x190)]=[];[_0x98a7d4(0x1cd)]=!0x1;[_0x98a7d4(0x1ac)];[_0x98a7d4(0x187)];[_0x98a7d4(0x1b7)];[_0x98a7d4(0x1c4)];[_0x98a7d4(0x1cb)]={'withDiff':[],'withoutDiff':[]};constructor({type:_0x160f51,content:_0x337513='',isDone:_0x5399ba=!0x1,interactionId:_0x289d5c,areActionsDisabled:_0x576edc,documentContextContent:_0xf9ca2d,editor:_0x5b8411,id:_0x392a85}){const _0x1adaa4=_0x98a7d4;super(),this['id']=_0x392a85||_0x3f1202(),this[_0x1adaa4(0x1c6)]=_0x289d5c,this[_0x1adaa4(0x197)]=_0x160f51,this[_0x1adaa4(0x1cd)]=!!_0x576edc,this[_0x1adaa4(0x1c4)]=_0x5b8411,this[_0x1adaa4(0x187)]=new _0x688cbf(),this[_0x1adaa4(0x1b7)]=new _0xe2b1a4(),this[_0x1adaa4(0x1ac)]=_0x39900c(_0xf9ca2d||''),this[_0x1adaa4(0x1aa)](_0x1adaa4(0x1a8),_0x5399ba),this['on'](_0x1adaa4(0x1ad),()=>{const _0x3f5870=_0x1adaa4;this[_0x3f5870(0x1b3)]();}),this[_0x1adaa4(0x1aa)](_0x1adaa4(0x1b4),_0x337513);}[_0x98a7d4(0x19e)](_0x462d27){const _0x284c90=_0x98a7d4;this[_0x284c90(0x1aa)](_0x284c90(0x1b4),this[_0x284c90(0x1b4)]+_0x462d27);}[_0x98a7d4(0x18a)](){const _0x431043=_0x98a7d4;this[_0x431043(0x1a8)]||(this[_0x431043(0x1aa)](_0x431043(0x1a8),!0x0),this[_0x431043(0x1b3)]());}[_0x98a7d4(0x1c8)](){const _0x537edf=_0x98a7d4;this[_0x537edf(0x1ce)]();}[_0x98a7d4(0x18e)](_0x2d920a,_0x185340){const _0x5338b5=_0x98a7d4;this[_0x5338b5(0x190)][_0x2d920a][_0x5338b5(0x19c)]=_0x185340,this[_0x5338b5(0x184)](_0x5338b5(0x19d),{'reply':this,'index':_0x2d920a,'state':_0x185340});}[_0x98a7d4(0x1ba)]({showDiff:_0x527370,groupIndex:_0x1d7286}){const _0x3c5327=_0x98a7d4;if(!this[_0x3c5327(0x1c4)])throw new _0x4f73e3(_0x3c5327(0x1a0),null,{'aiReply':this});const _0x26e771=this[_0x3c5327(0x196)](_0x527370,_0x1d7286);if(_0x26e771)return _0x26e771;let _0x548a22=[];if(void 0x0===_0x1d7286)_0x548a22=this[_0x3c5327(0x190)];else{const _0x45cf60=this[_0x3c5327(0x190)][_0x3c5327(0x1cc)](({index:_0x52b40d})=>_0x52b40d===_0x1d7286);if(!_0x45cf60)throw new _0x4f73e3(_0x3c5327(0x1c7),null,{'aiReply':this,'groupIndex':_0x1d7286});_0x548a22=[_0x45cf60];}const _0x18afb6=_0x567f52({'editor':this[_0x3c5327(0x1c4)],'showDiff':_0x527370,'changeGroups':_0x548a22,'documentContextContent':this[_0x3c5327(0x1ac)]});return this[_0x3c5327(0x1cf)](_0x527370,_0x18afb6),_0x18afb6;}[_0x98a7d4(0x196)](_0x1e6a68,_0x416c18){const _0x1e95e6=_0x98a7d4,_0x30a5c4=_0x1e6a68?_0x1e95e6(0x1b5):_0x1e95e6(0x19a);if(!this[_0x1e95e6(0x1cb)][_0x30a5c4][_0x1e95e6(0x1c9)])return null;const _0x532f39=this[_0x1e95e6(0x1cb)][_0x30a5c4];if(void 0x0===_0x416c18)return _0x532f39[_0x1e95e6(0x1c9)]>0x0&&_0x532f39[_0x1e95e6(0x1c9)]!==this[_0x1e95e6(0x190)][_0x1e95e6(0x1c9)]?(this[_0x1e95e6(0x1cf)](_0x1e6a68,null),null):_0x453908(_0x532f39);{const _0x368efc=_0x532f39[_0x1e95e6(0x1cc)](({index:_0x1112ea})=>_0x1112ea===_0x416c18);if(_0x368efc)return[_0x453908(_0x368efc)];}return null;}[_0x98a7d4(0x1cf)](_0x3f1a71,_0x1d18ea){const _0x175e0d=_0x98a7d4,_0x149d3a=_0x3f1a71?_0x175e0d(0x1b5):_0x175e0d(0x19a);_0x1d18ea?_0x1d18ea[_0x175e0d(0x1a6)](_0xaf53c8=>{const _0x254116=_0x175e0d,_0x963c52=this[_0x254116(0x1cb)][_0x149d3a],_0x2a6bb3=_0x963c52[_0x254116(0x1cc)](({index:_0x4c1ef7})=>_0x4c1ef7===_0xaf53c8[_0x254116(0x1c1)]);if(_0x2a6bb3){const _0x38b12b=_0x963c52[_0x254116(0x1c0)](_0x2a6bb3);_0x963c52[_0x254116(0x199)](_0x38b12b,0x1,_0xaf53c8);}else _0x963c52[_0x254116(0x1af)](_0xaf53c8);}):this[_0x175e0d(0x1cb)][_0x149d3a][_0x175e0d(0x1c9)]=0x0;}[_0x98a7d4(0x1b3)](){const _0x2ee3af=_0x98a7d4;if(_0x2ee3af(0x1c2)===this[_0x2ee3af(0x197)]){this[_0x2ee3af(0x192)]=this[_0x2ee3af(0x187)][_0x2ee3af(0x19f)](this[_0x2ee3af(0x1b4)]);const _0x6e5afc=this[_0x2ee3af(0x190)];this[_0x2ee3af(0x1a4)]();const _0x3cd658=this[_0x2ee3af(0x1be)](_0x6e5afc,this[_0x2ee3af(0x190)]);(_0x3cd658[_0x2ee3af(0x1c9)]||this[_0x2ee3af(0x1a8)])&&(this[_0x2ee3af(0x184)](_0x2ee3af(0x18d),this,_0x3cd658),this[_0x2ee3af(0x1cb)][_0x2ee3af(0x1b5)][_0x2ee3af(0x1c9)]=this[_0x2ee3af(0x1cb)][_0x2ee3af(0x19a)][_0x2ee3af(0x1c9)]=0x0);}else this[_0x2ee3af(0x192)]=this[_0x2ee3af(0x187)][_0x2ee3af(0x1d1)](this[_0x2ee3af(0x1b4)]),this[_0x2ee3af(0x184)](_0x2ee3af(0x18d),this);}[_0x98a7d4(0x1be)](_0x46c341,_0x3a0e2e){const _0x1d4320=_0x98a7d4,_0x5dc30d=[];for(const _0x55d2a3 of _0x3a0e2e){const _0x50be5f=_0x46c341[_0x55d2a3[_0x1d4320(0x1c1)]];_0x50be5f?_0x50be5f[_0x1d4320(0x18b)][_0x1d4320(0x1c9)]!==_0x55d2a3[_0x1d4320(0x18b)][_0x1d4320(0x1c9)]?_0x5dc30d[_0x1d4320(0x1af)](_0x55d2a3):_0x50be5f[_0x1d4320(0x18b)][_0x1d4320(0x1a6)]((_0x1b1245,_0xd72e99)=>{const _0x34b4a4=_0x1d4320,_0x23e9ce=_0x55d2a3[_0x34b4a4(0x18b)][_0xd72e99];_0x1b1245['id']!==_0x23e9ce['id']&&_0x5dc30d[_0x34b4a4(0x1af)](_0x55d2a3);}):_0x5dc30d[_0x1d4320(0x1af)](_0x55d2a3);}return _0x5dc30d;}[_0x98a7d4(0x1a4)](){const _0x4e2e47=_0x98a7d4,_0x306f6b=new _0xc4ca4d('p',{},[new _0xc4ca4d(_0x4e2e47(0x1b2),{'style':_0x4e2e47(0x198)},[new _0x8afc4b(_0x34eeac(this[_0x4e2e47(0x1c4)][_0x4e2e47(0x194)],_0x4e2e47(0x1bc)))])]),_0x5e306d=this[_0x4e2e47(0x1b7)][_0x4e2e47(0x193)](this[_0x4e2e47(0x192)],this[_0x4e2e47(0x1ac)][_0x4e2e47(0x1b8)](!0x0),{'markUnstableElements':!this[_0x4e2e47(0x1a8)],'replaceRemovedWith':_0x306f6b,'cutAfterLastChange':!this[_0x4e2e47(0x1a8)]});if(!_0x5e306d[_0x4e2e47(0x1ca)][_0x4e2e47(0x1c9)]&&!this[_0x4e2e47(0x1a8)])return;this[_0x4e2e47(0x1ae)]=_0x5e306d[_0x4e2e47(0x192)];let _0x3492fb=[];if(_0x3b7524(_0x315dae=>{const _0x4b91f8=_0x4e2e47,_0xdacb72=_0x557fb1(_0x315dae,_0x4b91f8(0x1c5));if(!_0xdacb72||!_0x39d3ff(_0xdacb72))return!0x1;const _0x119c66=[_0x315dae,..._0x57c1c2(_0x315dae)]['at'](-0x2);if(_0x315dae!=_0x119c66){const _0x444bf4=_0x557fb1(_0x119c66,_0x4b91f8(0x1c5));_0x39d3ff(_0x444bf4)||(_0x3492fb[_0x4b91f8(0x1af)]({'node':_0x119c66,'id':_0x444bf4,'type':_0x4b91f8(0x186)}),_0x5e306d[_0x4b91f8(0x1ca)][_0x4b91f8(0x1af)](_0x444bf4));}else _0x5e306d[_0x4b91f8(0x1ca)][_0x4b91f8(0x1bd)](_0xdacb72)?_0x3492fb[_0x4b91f8(0x1af)]({'node':_0x315dae,'type':_0x4b91f8(0x186),'id':_0xdacb72}):_0x5e306d[_0x4b91f8(0x1bf)][_0x4b91f8(0x1bd)](_0xdacb72)?_0x3492fb[_0x4b91f8(0x1af)]({'node':_0x315dae,'type':_0x4b91f8(0x1b9),'id':_0xdacb72,'anchorId':_0x557fb1(_0x315dae[_0x4b91f8(0x1a5)],_0x4b91f8(0x1c5))}):_0x3492fb[_0x4b91f8(0x1af)]({'node':_0x315dae,'type':_0x4b91f8(0x1ab),'id':_0xdacb72});return!0x0;},this[_0x4e2e47(0x1ae)]),_0x3492fb=_0x3492fb[_0x4e2e47(0x1a9)](({node:_0x9b1d5f})=>[..._0x57c1c2(_0x9b1d5f),_0x9b1d5f][_0x4e2e47(0x191)](_0x1e49d3=>!_0x557fb1(_0x1e49d3,_0x4e2e47(0x1b1)))),0x0==_0x3492fb[_0x4e2e47(0x1c9)])return;const _0x16966f=[[_0x3492fb[0x0]]];for(let _0x5e9a94=0x1;_0x5e9a94<_0x3492fb[_0x4e2e47(0x1c9)];_0x5e9a94++){const _0x423ba8=_0x16966f[_0x16966f[_0x4e2e47(0x1c9)]-0x1],_0x336e3b=_0x423ba8[_0x423ba8[_0x4e2e47(0x1c9)]-0x1];_0x3492fb[_0x5e9a94][_0x4e2e47(0x1d0)][_0x4e2e47(0x1a5)]==_0x336e3b[_0x4e2e47(0x1d0)]&&_0x4e2e47(0x186)!=_0x3492fb[_0x5e9a94][_0x4e2e47(0x197)]&&_0x4e2e47(0x186)!=_0x336e3b[_0x4e2e47(0x197)]?_0x423ba8[_0x4e2e47(0x1af)](_0x3492fb[_0x5e9a94]):_0x16966f[_0x4e2e47(0x1af)]([_0x3492fb[_0x5e9a94]]);}for(const _0x202146 of _0x16966f){const _0x431176=_0x202146[0x0],_0x5a57c9=_0x202146[_0x202146[_0x4e2e47(0x1c9)]-0x1],_0x391186=_0x4e0a96(_0x431176[_0x4e2e47(0x1d0)][_0x4e2e47(0x1a5)]);_0x391186&&_0x202146[_0x4e2e47(0x185)](_0x391186);const _0x4ef788=_0x4e0a96(_0x5a57c9[_0x4e2e47(0x1d0)][_0x4e2e47(0x1a2)]);_0x4ef788&&_0x202146[_0x4e2e47(0x1af)](_0x4ef788);}function _0x39d3ff(_0x27497f){const _0x227283=_0x4e2e47;return _0x5e306d[_0x227283(0x1ca)][_0x227283(0x1bd)](_0x27497f)||_0x5e306d[_0x227283(0x1bf)][_0x227283(0x1bd)](_0x27497f)||_0x5e306d[_0x227283(0x1a3)][_0x227283(0x1bd)](_0x27497f);}function _0x4e0a96(_0x2d91f7){const _0x1a332a=_0x4e2e47;if(_0x2d91f7&&_0x557fb1(_0x2d91f7,_0x1a332a(0x1c5))&&!_0x557fb1(_0x2d91f7,_0x1a332a(0x1b1))){const _0x2952fa=_0x557fb1(_0x2d91f7,_0x1a332a(0x1c5));if(!_0x39d3ff(_0x2952fa))return{'node':_0x2d91f7,'type':_0x1a332a(0x182),'id':_0x2952fa};}return null;}this[_0x4e2e47(0x190)]=_0x16966f[_0x4e2e47(0x1a7)]((_0x48ddfc,_0x3eeee1)=>({'changes':_0x48ddfc,'state':_0x4e2e47(0x1b0),'index':_0x3eeee1}));}}
|
|
@@ -20,5 +20,5 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
|
|
24
|
-
_0x3addd6(){[_0x30912c(0x17b)];[_0x30912c(0x155)]={'newIds':[],'modifiedIds':[],'removedIds':[],'invalidIds':[],'lastTouchedId':null};[_0x30912c(0x16b)]=new Set();constructor(_0x32f5ec){const _0x1e107c=_0x30912c;super(),this[_0x1e107c(0x17b)]=_0x32f5ec||_0x259ba5;}[_0x30912c(0x149)](_0x2abbdd,_0x504f88,_0x1d5abf){const _0x1d593a=_0x30912c,_0x14b6aa=_0x57dfba(_0x2abbdd);if(0x0===_0x504f88[_0x1d593a(0x144)][_0x1d593a(0x16f)]){const _0x1194ba=[];return _0x1abbea(_0x1d593a(0x16d),_0x1d593a(0x178),_0x14b6aa)[_0x1d593a(0x16a)](_0x1bd8c1=>{const _0x367622=_0x1d593a,_0x3476e4=this[_0x367622(0x17b)]();_0x472831(_0x1bd8c1,_0x367622(0x16d),_0x3476e4),_0x1194ba[_0x367622(0x183)](_0x3476e4);}),this[_0x1d593a(0x179)](_0x14b6aa),{'parsedContent':_0x14b6aa,'newNodeIds':_0x1194ba,'modifiedNodeIds':[],'removedNodeIds':[]};}_0x1d5abf&&_0x1d5abf[_0x1d593a(0x170)]&&this[_0x1d593a(0x15c)](_0x14b6aa),this[_0x1d593a(0x155)][_0x1d593a(0x14a)]=[],this[_0x1d593a(0x155)][_0x1d593a(0x175)]=[],this[_0x1d593a(0x155)][_0x1d593a(0x169)]=[],this[_0x1d593a(0x155)][_0x1d593a(0x152)]=[],this[_0x1d593a(0x155)][_0x1d593a(0x162)]=null,this[_0x1d593a(0x16b)]=new Set(_0x1abbea(_0x1d593a(0x16d),null,_0x504f88)[_0x1d593a(0x177)](_0x82670a=>_0x1ed839(_0x82670a,_0x1d593a(0x16d)))[_0x1d593a(0x17d)](_0x504258=>!!_0x504258));let _0x107d81=-0x1,_0xabf75a=!0x1;const _0x2705c0=_0x14b6aa[_0x1d593a(0x144)],_0x3e0423=Array[_0x1d593a(0x13f)](_0x2705c0)[_0x1d593a(0x17d)](_0x1388c8=>!(0x3===_0x1388c8[_0x1d593a(0x17a)]&&''===_0x1c1e86(_0x1388c8)[_0x1d593a(0x14d)]())),_0x411687=_0x3e0423[_0x1d593a(0x16f)];for(let _0x52c5d6=0x0;_0x52c5d6<_0x411687;_0x52c5d6++){const _0x3b0368=_0x3e0423[_0x52c5d6],_0x57b9bb=_0x3e0423[_0x52c5d6+0x1];if(this[_0x1d593a(0x154)](_0x3b0368)){if(-0x1===_0x107d81&&(_0x107d81=_0x52c5d6),this[_0x1d593a(0x180)](_0x3b0368),!this[_0x1d593a(0x154)](_0x57b9bb)){const [_0x5d4855,_0x3e10c6]=this[_0x1d593a(0x17f)](_0x3b0368,_0xabf75a,_0x504f88);if(_0x5d4855){const _0x21a5f3=Array[_0x1d593a(0x13f)](_0x3e0423)[_0x1d593a(0x15f)](_0x107d81,_0x52c5d6+0x1);this[_0x1d593a(0x165)](_0x5d4855,_0x21a5f3,_0x3e10c6),_0x107d81=-0x1;}}}else{if(this[_0x1d593a(0x167)](_0x3b0368))_0xabf75a=!0x0;else{if(this[_0x1d593a(0x176)](_0x3b0368)){const _0x4ed825=_0x1ed839(_0x3b0368,_0x1d593a(0x16d));if(_0x4ed825&&this[_0x1d593a(0x16b)][_0x1d593a(0x172)](_0x4ed825)){const _0x3e2868=_0x40c561(_0x1d593a(0x16d),_0x4ed825,_0x504f88);this[_0x1d593a(0x147)](_0x3e2868,_0x3b0368);}if(this[_0x1d593a(0x155)][_0x1d593a(0x169)][_0x1d593a(0x166)](_0x4ed825)){const _0x260df7=this[_0x1d593a(0x155)][_0x1d593a(0x169)][_0x1d593a(0x156)](_0x4ed825);this[_0x1d593a(0x155)][_0x1d593a(0x169)][_0x1d593a(0x146)](_0x260df7,0x1);}}else{if(this[_0x1d593a(0x153)](_0x3b0368)){const _0x4685d6=_0x1ed839(_0x3b0368,_0x1d593a(0x16d));this[_0x1d593a(0x155)][_0x1d593a(0x175)][_0x1d593a(0x166)](_0x4685d6)||this[_0x1d593a(0x13e)](_0x3b0368);}}}}}for(const _0x2313ac of this[_0x1d593a(0x155)][_0x1d593a(0x169)]){const _0xa52c9b=_0x40c561(_0x1d593a(0x16d),_0x2313ac,_0x504f88);if(_0xa52c9b){if(_0x1d5abf&&_0x1d5abf[_0x1d593a(0x16c)]){this[_0x1d593a(0x155)][_0x1d593a(0x162)]=_0x2313ac;const _0x287077=_0x1d5abf[_0x1d593a(0x16c)][_0x1d593a(0x14e)](!0x0);_0x472831(_0x287077,_0x1d593a(0x16d),_0x2313ac),_0x472831(_0x287077,_0x1d593a(0x173),_0x1d593a(0x164)),_0x10cae1(_0xa52c9b,_0x287077);}else _0x13efba(_0xa52c9b);}}if(_0x1abbea(_0x1d593a(0x158),null,_0x504f88)[_0x1d593a(0x16a)](_0x59e683=>{const _0x492614=_0x1d593a,_0x14689e=_0x1ed839(_0x59e683,_0x492614(0x158)),_0x58701c=_0x40c561(_0x492614(0x16d),_0x14689e,_0x504f88);_0x58701c&&_0x362a72(_0x58701c,_0x59e683);}),_0x1abbea(_0x1d593a(0x16d),_0x1d593a(0x178),_0x504f88)[_0x1d593a(0x16a)](_0x3d8bc9=>{const _0x8029cf=_0x1d593a,_0x20891c=this[_0x8029cf(0x148)](_0x3d8bc9);_0x472831(_0x3d8bc9,_0x8029cf(0x16d),_0x20891c),this[_0x8029cf(0x155)][_0x8029cf(0x14a)][_0x8029cf(0x183)](_0x20891c);}),this[_0x1d593a(0x179)](_0x504f88),_0x1d5abf&&_0x1d5abf[_0x1d593a(0x170)]&&this[_0x1d593a(0x143)](_0x504f88,_0x1d5abf[_0x1d593a(0x151)]||0x0),_0x1d5abf&&_0x1d5abf[_0x1d593a(0x14c)]&&this[_0x1d593a(0x155)][_0x1d593a(0x162)]){let _0x2cdbe8=_0x40c561(_0x1d593a(0x16d),this[_0x1d593a(0x155)][_0x1d593a(0x162)],_0x504f88);for(;_0x2cdbe8;)_0x5f181a(_0x2cdbe8),_0x2cdbe8=_0x2cdbe8[_0x1d593a(0x17c)];}return{'parsedContent':_0x504f88,'newNodeIds':this[_0x1d593a(0x155)][_0x1d593a(0x14a)],'modifiedNodeIds':this[_0x1d593a(0x155)][_0x1d593a(0x175)],'removedNodeIds':this[_0x1d593a(0x155)][_0x1d593a(0x169)]};}[_0x30912c(0x165)](_0x254551,_0x524028,_0x33c9e5){const _0x2a0391=_0x30912c;for(const _0x3323d4 of _0x524028){const _0x2350d8=this[_0x2a0391(0x148)](_0x3323d4);_0x472831(_0x3323d4,_0x2a0391(0x16d),_0x2350d8),this[_0x2a0391(0x155)][_0x2a0391(0x14a)][_0x2a0391(0x183)](_0x2350d8),this[_0x2a0391(0x155)][_0x2a0391(0x162)]=_0x2350d8;}const _0x36dc27=_0x2a0391(0x14b)===_0x33c9e5||_0x2a0391(0x171)===_0x33c9e5?_0x524028[_0x2a0391(0x17e)]():_0x524028;for(const _0x27804a of _0x36dc27)_0x2092c5(_0x254551,_0x27804a,_0x33c9e5);}[_0x30912c(0x147)](_0x260515,_0xaf42b4){const _0x124d5b=_0x30912c;if(!_0x260515)return;if(_0x43e7aa(_0x260515,_0xaf42b4))return;const _0x31c895=this[_0x124d5b(0x148)](_0x260515);_0x472831(_0xaf42b4,_0x124d5b(0x16d),_0x31c895),this[_0x124d5b(0x155)][_0x124d5b(0x175)][_0x124d5b(0x183)](_0x31c895),this[_0x124d5b(0x155)][_0x124d5b(0x162)]=_0x31c895,_0x10cae1(_0x260515,_0xaf42b4[_0x124d5b(0x14e)](!0x0));}[_0x30912c(0x17f)](_0x5edf09,_0x425445,_0x48dd61){const _0x588af9=_0x30912c,_0xed6cb3=this[_0x588af9(0x13d)](_0x5edf09,!0x1);if(_0xed6cb3){const _0x459198=this[_0x588af9(0x142)](_0xed6cb3),_0x2afba0=_0x40c561(_0x588af9(0x16d),_0x459198,_0x48dd61);if(_0x2afba0)return[_0x2afba0,_0x588af9(0x171)];this[_0x588af9(0x155)][_0x588af9(0x152)][_0x588af9(0x183)](_0x459198);}const _0x352e02=this[_0x588af9(0x159)](_0x5edf09,!0x1);if(_0x352e02){const _0x11a2df=this[_0x588af9(0x142)](_0x352e02),_0x5f56d0=_0x40c561(_0x588af9(0x16d),_0x11a2df,_0x48dd61);if(_0x5f56d0)return[_0x5f56d0,_0x588af9(0x145)];this[_0x588af9(0x155)][_0x588af9(0x152)][_0x588af9(0x183)](_0x11a2df);}return _0x425445?_0x5edf09[_0x588af9(0x141)]?this[_0x588af9(0x184)](_0x5edf09,_0x48dd61):[_0x48dd61[_0x588af9(0x144)][_0x48dd61[_0x588af9(0x144)][_0x588af9(0x16f)]-0x1],_0x588af9(0x171)]:[_0x48dd61[_0x588af9(0x144)][0x0],_0x588af9(0x145)];}[_0x30912c(0x184)](_0x4b5faf,_0x71a92){const _0xd58f6d=_0x30912c,_0x492526=[],_0x5467e5=this[_0xd58f6d(0x13d)](_0x4b5faf,!0x0);if(_0x5467e5){const _0xedb943=this[_0xd58f6d(0x142)](_0x5467e5),_0x371b35=_0x40c561(_0xd58f6d(0x16d),_0xedb943,_0x71a92);_0x371b35&&_0x492526[_0xd58f6d(0x183)]([_0x371b35,_0xd58f6d(0x171)]);}const _0x4ae4dd=this[_0xd58f6d(0x159)](_0x4b5faf,!0x0);if(_0x4ae4dd){const _0x3d7cc7=this[_0xd58f6d(0x142)](_0x4ae4dd),_0x3a0e5f=_0x40c561(_0xd58f6d(0x16d),_0x3d7cc7,_0x71a92);_0x3a0e5f&&_0x492526[_0xd58f6d(0x183)]([_0x3a0e5f,_0xd58f6d(0x145)]);}if(_0x492526[_0xd58f6d(0x16f)]>0x1)return _0x25a067(_0x492526[0x0][0x0])<=_0x25a067(_0x492526[0x1][0x0])?_0x492526[0x0]:_0x492526[0x1];return 0x1===_0x492526[_0xd58f6d(0x16f)]?_0x492526[0x0]:[_0x71a92[_0xd58f6d(0x16e)],_0xd58f6d(0x171)];}[_0x30912c(0x159)](_0x2aaeec,_0x521c96){const _0x4841db=_0x30912c;let _0x137457=_0x2aaeec[_0x4841db(0x141)],_0x4ee8c1=null,_0x5d77d6=!0x1;for(;_0x137457;){if(_0x4cf7db(_0x137457)){if(this[_0x4841db(0x153)](_0x137457)&&(_0x4ee8c1=_0x137457),this[_0x4841db(0x167)](_0x137457)&&_0x521c96&&!_0x5d77d6){_0x5d77d6=!0x0,_0x137457=_0x137457[_0x4841db(0x141)];continue;}break;}const _0x59bca9=_0x1ed839(_0x137457,_0x4841db(0x16d));if(_0x59bca9&&_0x4841db(0x178)!==_0x59bca9&&this[_0x4841db(0x16b)][_0x4841db(0x172)](_0x59bca9)){_0x4ee8c1=_0x137457;break;}_0x137457=_0x137457[_0x4841db(0x141)];}return _0x4ee8c1;}[_0x30912c(0x13d)](_0x5c8649,_0x2f70da){const _0x4aa887=_0x30912c;let _0xf1d6a9=_0x5c8649[_0x4aa887(0x15a)],_0x81530d=null,_0x1111ae=!0x1;for(;_0xf1d6a9;){if(_0x4cf7db(_0xf1d6a9)){if(this[_0x4aa887(0x153)](_0xf1d6a9)&&(_0x81530d=_0xf1d6a9),this[_0x4aa887(0x167)](_0xf1d6a9)&&_0x2f70da&&!_0x1111ae){_0x1111ae=!0x0,_0xf1d6a9=_0xf1d6a9[_0x4aa887(0x15a)];continue;}break;}const _0x3cab27=_0x1ed839(_0xf1d6a9,_0x4aa887(0x16d));if(_0x3cab27&&_0x4aa887(0x178)!==_0x3cab27&&this[_0x4aa887(0x16b)][_0x4aa887(0x172)](_0x3cab27)){_0x81530d=_0xf1d6a9;break;}_0xf1d6a9=_0xf1d6a9[_0x4aa887(0x15a)];}return _0x81530d;}[_0x30912c(0x180)](_0x2b0cc2){const _0x4c7465=_0x30912c;_0x2b4c3e(_0x2b0cc2)&&_0x1abbea(_0x4c7465(0x16d),null,_0x2b0cc2)[_0x4c7465(0x16a)](_0x169cd9=>{const _0xd4d45a=_0x4c7465;if(this[_0xd4d45a(0x176)](_0x169cd9)&&!this[_0xd4d45a(0x163)](_0x169cd9)){const _0x326501=_0x1ed839(_0x169cd9,_0xd4d45a(0x16d));_0x472831(_0x169cd9,_0xd4d45a(0x158),_0x326501),_0x472831(_0x169cd9,_0xd4d45a(0x16d),null);}});}[_0x30912c(0x142)](_0x440653){const _0x1f21c6=_0x30912c;if(!_0x440653)return null;if(_0x2b4c3e(_0x440653))return _0x1ed839(_0x440653,_0x1f21c6(0x16d));if(_0x4cf7db(_0x440653)){const _0x3ce40e=_0x1c1e86(_0x440653)[_0x1f21c6(0x174)](/removed[\s*-]data-id="([^"]+)"/);if(_0x3ce40e&&_0x3ce40e[0x1])return _0x3ce40e[0x1];}return null;}[_0x30912c(0x13e)](_0x37b302){const _0x10cae6=_0x30912c;if(_0x4cf7db(_0x37b302)){const _0x42ca4=_0x1c1e86(_0x37b302)[_0x10cae6(0x174)](/removed[\s*-]data-id="([^"]+)"/);_0x42ca4&&_0x42ca4[0x1]&&this[_0x10cae6(0x155)][_0x10cae6(0x169)][_0x10cae6(0x183)](_0x42ca4[0x1]);}}[_0x30912c(0x148)](_0x5cb146){const _0x34f7b2=_0x30912c;return this[_0x34f7b2(0x176)](_0x5cb146)?_0x1ed839(_0x5cb146,_0x34f7b2(0x16d)):this[_0x34f7b2(0x17b)]();}[_0x30912c(0x179)](_0xd3dab1){const _0x35c7d7=_0x30912c;_0x1b1c66(_0xd3dab1)[_0x35c7d7(0x17d)](_0xa503ec=>this[_0x35c7d7(0x153)](_0xa503ec)||this[_0x35c7d7(0x167)](_0xa503ec))[_0x35c7d7(0x16a)](_0x2604ea=>{_0x13efba(_0x2604ea);});}[_0x30912c(0x15c)](_0x3ca4fb){const _0x19aaae=_0x30912c,_0x5ba146=_0x3ca4fb[_0x19aaae(0x144)],_0x1c1f7f=_0x5ba146[_0x5ba146[_0x19aaae(0x16f)]-0x1];_0x1c1f7f&&_0x2b4c3e(_0x1c1f7f)&&_0x472831(_0x1c1f7f,_0x19aaae(0x160),_0x19aaae(0x164));}[_0x30912c(0x143)](_0x5136e0,_0x18265c){const _0x3c4c90=_0x30912c,_0x3005a2=_0x40c561(_0x3c4c90(0x160),_0x3c4c90(0x164),_0x5136e0);if(!_0x3005a2)return;const _0x2a2cc0=_0x203b30(_0x3005a2)[_0x3c4c90(0x15f)](0x0,-0x1),_0x2728da=_0x2a2cc0[_0x3c4c90(0x16f)];let _0x49f193=_0x3005a2;if(_0x2728da>_0x18265c){let _0x3153fe=_0x2728da,_0x19d371=null;for(;_0x3153fe>_0x18265c&&_0x3153fe>=0x0;)_0x3153fe--,_0x19d371=_0x2a2cc0[_0x3153fe];_0x19d371&&(_0x49f193=_0x19d371,_0x472831(_0x3005a2,_0x3c4c90(0x160),null),_0x472831(_0x19d371,_0x3c4c90(0x160),_0x3c4c90(0x164)));}else{if(_0x2728da<_0x18265c){let _0x3a5e74=_0x2728da,_0x21ac5=_0x3005a2;for(;_0x3a5e74<_0x18265c;){const _0x20d7a4=_0x21ac5[_0x3c4c90(0x144)][_0x3c4c90(0x17d)](_0x5bd8f5=>_0x2b4c3e(_0x5bd8f5));if(0x0===_0x20d7a4[_0x3c4c90(0x16f)])break;_0x3a5e74++,_0x21ac5=_0x20d7a4[_0x20d7a4[_0x3c4c90(0x16f)]-0x1];}_0x21ac5&&(_0x49f193=_0x21ac5,_0x472831(_0x3005a2,_0x3c4c90(0x160),null),_0x472831(_0x21ac5,_0x3c4c90(0x160),_0x3c4c90(0x164)));}}let _0x362c22=_0x49f193;for(;_0x362c22;){for(;_0x362c22[_0x3c4c90(0x141)];)_0x362c22=_0x362c22[_0x3c4c90(0x141)],_0x2b4c3e(_0x362c22)&&_0x472831(_0x362c22,_0x3c4c90(0x160),_0x3c4c90(0x164));_0x362c22=_0x362c22[_0x3c4c90(0x17c)];}}[_0x30912c(0x154)](_0x177120){const _0x29aebb=_0x30912c;return Boolean(_0x29aebb(0x178)===_0x1ed839(_0x177120,_0x29aebb(0x16d)));}[_0x30912c(0x176)](_0x49bb01){const _0x35280b=_0x30912c;return Boolean((_0x1ed839(_0x49bb01,_0x35280b(0x16d))||'')[_0x35280b(0x16f)]>0x0&&_0x35280b(0x178)!==_0x1ed839(_0x49bb01,_0x35280b(0x16d)));}[_0x30912c(0x153)](_0x11b06b){const _0x585d98=_0x30912c;return!!_0x11b06b&&Boolean(_0x4cf7db(_0x11b06b)&&_0x1c1e86(_0x11b06b)[_0x585d98(0x174)](/removed[\s*-]data-id="[^"]+"/));}[_0x30912c(0x163)](_0x2d4230){const _0xcfa55a=_0x30912c;let _0x1d1187=_0x2d4230[_0xcfa55a(0x17c)];for(;_0x1d1187;){if(_0x1ed839(_0x1d1187,_0xcfa55a(0x158)))return!0x0;_0x1d1187=_0x1d1187[_0xcfa55a(0x17c)];}return!0x1;}[_0x30912c(0x167)](_0x48336d){const _0x5af44b=_0x30912c;return Boolean(_0x4cf7db(_0x48336d)&&_0x1c1e86(_0x48336d)[_0x5af44b(0x174)](/\s*existing[\s*-](content|document)\s*/g));}}
|
|
23
|
+
function _0x1305(){const _0x5a4c25=['cutAfterLastChange','data-wrapped-id','_isExistingContentComment','length','afterbegin','beforebegin','childNodes','removedIds','true','includes','_insertNodes','indexOf','465147KeexhA','afterend','reverse','data-removed','_findReferenceNode','_findPrevElementWithDataId','parentNode','1615231WVqHxd','from','_markUnstableElements','_getNodeDataId','newIds','match','replaceRemovedWith','modifiedIds','_isDelNode','nodeType','_markWrappedElements','_hasWrappedParent','13575DRiBYs','merge','10vrawRA','markUnstableElements','_isExistingNode','_storeDeletedElementIds','_findNextElementWithDataId','new-element','_existingDataIds','cloneNode','lastChild','51318RSzFYk','818090kyqmcJ','_getUid','invalidIds','forEach','data-id','markUnstableElementsDepth','670JdKcWj','51957477DBXVCQ','_removeSpecialComments','_isNewNode','_generateUid','3396256mZzPUP','previousSibling','push','has','nextSibling','slice','splice','trim','_findFallbackReferenceNode','data-unstable','_replaceNode','133OelkHS','filter','map','232ellizF','lastTouchedId','_touchedNodesState','_markLastTagElementUnstable'];_0x1305=function(){return _0x5a4c25;};return _0x1305();}function _0x22d2(_0x362640,_0x29ff06){const _0x1305d7=_0x1305();return _0x22d2=function(_0x22d289,_0x5822df){_0x22d289=_0x22d289-0xd9;let _0x426a25=_0x1305d7[_0x22d289];return _0x426a25;},_0x22d2(_0x362640,_0x29ff06);}const _0x2cd79d=_0x22d2;(function(_0x5c65cd,_0xbab362){const _0x48bbbf=_0x22d2,_0x3ffc2a=_0x5c65cd();while(!![]){try{const _0x1a1f71=-parseInt(_0x48bbbf(0xdc))/0x1+-parseInt(_0x48bbbf(0xfa))/0x2*(parseInt(_0x48bbbf(0xe8))/0x3)+parseInt(_0x48bbbf(0xff))/0x4+-parseInt(_0x48bbbf(0xf4))/0x5+-parseInt(_0x48bbbf(0xf3))/0x6*(-parseInt(_0x48bbbf(0x10a))/0x7)+-parseInt(_0x48bbbf(0x10d))/0x8*(parseInt(_0x48bbbf(0x11d))/0x9)+parseInt(_0x48bbbf(0xea))/0xa*(parseInt(_0x48bbbf(0xfb))/0xb);if(_0x1a1f71===_0xbab362)break;else _0x3ffc2a['push'](_0x3ffc2a['shift']());}catch(_0x2fc613){_0x3ffc2a['push'](_0x3ffc2a['shift']());}}}(_0x1305,0xe5d87));import{ObservableMixin as _0x4134ed,uid as _0x393d5b}from'ckeditor5/src/utils.js';import{findAllByAttribute as _0x3e8e80,findByAttribute as _0x37d6af,getAttribute as _0x3a322e,isComment as _0x14d468,isTag as _0x1b8a05,insertElement as _0x4ee6a2,moveElement as _0x3d4200,removeElement as _0x59786a,replaceElement as _0x1122de,serialize as _0x40eb07,setAttribute as _0x4bce9b,clone as _0x43e495,findAllComments as _0x2c09d0,getParents as _0x263565,getNodeNestingLevel as _0x5546a3,areNodesSame as _0x404f37,removeElementsAfter as _0x18a5dd}from'../utils/htmlparser.js';export class AIResponseApplier extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x4134ed(){[_0x2cd79d(0xfe)];[_0x2cd79d(0x10f)]={'newIds':[],'modifiedIds':[],'removedIds':[],'invalidIds':[],'lastTouchedId':null};[_0x2cd79d(0xf0)]=new Set();constructor(_0x3ee483){const _0xbcd9e9=_0x2cd79d;super(),this[_0xbcd9e9(0xfe)]=_0x3ee483||_0x393d5b;}[_0x2cd79d(0xe9)](_0x1efb4e,_0x3c0741,_0x3faf57){const _0x7c060c=_0x2cd79d,_0x46af8e=_0x43e495(_0x1efb4e);if(0x0===_0x3c0741[_0x7c060c(0x117)][_0x7c060c(0x114)]){const _0x44cf02=[];return _0x3e8e80(_0x7c060c(0xf8),_0x7c060c(0xef),_0x46af8e)[_0x7c060c(0xf7)](_0x3bce19=>{const _0xd3b0c4=_0x7c060c,_0x1caaf4=this[_0xd3b0c4(0xfe)]();_0x4bce9b(_0x3bce19,_0xd3b0c4(0xf8),_0x1caaf4),_0x44cf02[_0xd3b0c4(0x101)](_0x1caaf4);}),this[_0x7c060c(0xfc)](_0x46af8e),{'parsedContent':_0x46af8e,'newNodeIds':_0x44cf02,'modifiedNodeIds':[],'removedNodeIds':[]};}_0x3faf57&&_0x3faf57[_0x7c060c(0xeb)]&&this[_0x7c060c(0x110)](_0x46af8e),this[_0x7c060c(0x10f)][_0x7c060c(0xe0)]=[],this[_0x7c060c(0x10f)][_0x7c060c(0xe3)]=[],this[_0x7c060c(0x10f)][_0x7c060c(0x118)]=[],this[_0x7c060c(0x10f)][_0x7c060c(0xf6)]=[],this[_0x7c060c(0x10f)][_0x7c060c(0x10e)]=null,this[_0x7c060c(0xf0)]=new Set(_0x3e8e80(_0x7c060c(0xf8),null,_0x3c0741)[_0x7c060c(0x10c)](_0x18ed8a=>_0x3a322e(_0x18ed8a,_0x7c060c(0xf8)))[_0x7c060c(0x10b)](_0x1552e2=>!!_0x1552e2));let _0x5e12b=-0x1,_0x3eb34a=!0x1;const _0x24f84c=_0x46af8e[_0x7c060c(0x117)],_0x50f34b=Array[_0x7c060c(0xdd)](_0x24f84c)[_0x7c060c(0x10b)](_0x5bf04a=>!(0x3===_0x5bf04a[_0x7c060c(0xe5)]&&''===_0x40eb07(_0x5bf04a)[_0x7c060c(0x106)]())),_0x52c3e3=_0x50f34b[_0x7c060c(0x114)];for(let _0x2e18cb=0x0;_0x2e18cb<_0x52c3e3;_0x2e18cb++){const _0x438e49=_0x50f34b[_0x2e18cb],_0x37dc40=_0x50f34b[_0x2e18cb+0x1];if(this[_0x7c060c(0xfd)](_0x438e49)){if(-0x1===_0x5e12b&&(_0x5e12b=_0x2e18cb),this[_0x7c060c(0xe6)](_0x438e49),!this[_0x7c060c(0xfd)](_0x37dc40)){const [_0x40b01e,_0x53f330]=this[_0x7c060c(0xd9)](_0x438e49,_0x3eb34a,_0x3c0741);if(_0x40b01e){const _0x80e68c=Array[_0x7c060c(0xdd)](_0x50f34b)[_0x7c060c(0x104)](_0x5e12b,_0x2e18cb+0x1);this[_0x7c060c(0x11b)](_0x40b01e,_0x80e68c,_0x53f330),_0x5e12b=-0x1;}}}else{if(this[_0x7c060c(0x113)](_0x438e49))_0x3eb34a=!0x0;else{if(this[_0x7c060c(0xec)](_0x438e49)){const _0x1a7ba6=_0x3a322e(_0x438e49,_0x7c060c(0xf8));if(_0x1a7ba6&&this[_0x7c060c(0xf0)][_0x7c060c(0x102)](_0x1a7ba6)){const _0x18ec3d=_0x37d6af(_0x7c060c(0xf8),_0x1a7ba6,_0x3c0741);this[_0x7c060c(0x109)](_0x18ec3d,_0x438e49);}if(this[_0x7c060c(0x10f)][_0x7c060c(0x118)][_0x7c060c(0x11a)](_0x1a7ba6)){const _0x3e9352=this[_0x7c060c(0x10f)][_0x7c060c(0x118)][_0x7c060c(0x11c)](_0x1a7ba6);this[_0x7c060c(0x10f)][_0x7c060c(0x118)][_0x7c060c(0x105)](_0x3e9352,0x1);}}else{if(this[_0x7c060c(0xe4)](_0x438e49)){const _0x553670=_0x3a322e(_0x438e49,_0x7c060c(0xf8));this[_0x7c060c(0x10f)][_0x7c060c(0xe3)][_0x7c060c(0x11a)](_0x553670)||this[_0x7c060c(0xed)](_0x438e49);}}}}}for(const _0x49e71c of this[_0x7c060c(0x10f)][_0x7c060c(0x118)]){const _0x2bb218=_0x37d6af(_0x7c060c(0xf8),_0x49e71c,_0x3c0741);if(_0x2bb218){if(_0x3faf57&&_0x3faf57[_0x7c060c(0xe2)]){this[_0x7c060c(0x10f)][_0x7c060c(0x10e)]=_0x49e71c;const _0x26fc62=_0x3faf57[_0x7c060c(0xe2)][_0x7c060c(0xf1)](!0x0);_0x4bce9b(_0x26fc62,_0x7c060c(0xf8),_0x49e71c),_0x4bce9b(_0x26fc62,_0x7c060c(0x120),_0x7c060c(0x119)),_0x1122de(_0x2bb218,_0x26fc62);}else _0x59786a(_0x2bb218);}}if(_0x3e8e80(_0x7c060c(0x112),null,_0x3c0741)[_0x7c060c(0xf7)](_0x54a439=>{const _0x9626e7=_0x7c060c,_0x39b380=_0x3a322e(_0x54a439,_0x9626e7(0x112)),_0x10ceba=_0x37d6af(_0x9626e7(0xf8),_0x39b380,_0x3c0741);_0x10ceba&&_0x3d4200(_0x10ceba,_0x54a439);}),_0x3e8e80(_0x7c060c(0xf8),_0x7c060c(0xef),_0x3c0741)[_0x7c060c(0xf7)](_0x2895f5=>{const _0xc6444d=_0x7c060c,_0x4f0cd3=this[_0xc6444d(0xf5)](_0x2895f5);_0x4bce9b(_0x2895f5,_0xc6444d(0xf8),_0x4f0cd3),this[_0xc6444d(0x10f)][_0xc6444d(0xe0)][_0xc6444d(0x101)](_0x4f0cd3);}),this[_0x7c060c(0xfc)](_0x3c0741),_0x3faf57&&_0x3faf57[_0x7c060c(0xeb)]&&this[_0x7c060c(0xde)](_0x3c0741,_0x3faf57[_0x7c060c(0xf9)]||0x0),_0x3faf57&&_0x3faf57[_0x7c060c(0x111)]&&this[_0x7c060c(0x10f)][_0x7c060c(0x10e)]){let _0x655e77=_0x37d6af(_0x7c060c(0xf8),this[_0x7c060c(0x10f)][_0x7c060c(0x10e)],_0x3c0741);for(;_0x655e77;)_0x18a5dd(_0x655e77),_0x655e77=_0x655e77[_0x7c060c(0xdb)];}return{'parsedContent':_0x3c0741,'newNodeIds':this[_0x7c060c(0x10f)][_0x7c060c(0xe0)],'modifiedNodeIds':this[_0x7c060c(0x10f)][_0x7c060c(0xe3)],'removedNodeIds':this[_0x7c060c(0x10f)][_0x7c060c(0x118)]};}[_0x2cd79d(0x11b)](_0x345d26,_0x2232b0,_0x1b3c43){const _0x4250d1=_0x2cd79d;for(const _0xc17e8c of _0x2232b0){const _0x14f2ad=this[_0x4250d1(0xf5)](_0xc17e8c);_0x4bce9b(_0xc17e8c,_0x4250d1(0xf8),_0x14f2ad),this[_0x4250d1(0x10f)][_0x4250d1(0xe0)][_0x4250d1(0x101)](_0x14f2ad),this[_0x4250d1(0x10f)][_0x4250d1(0x10e)]=_0x14f2ad;}const _0xb90da7=_0x4250d1(0x115)===_0x1b3c43||_0x4250d1(0x11e)===_0x1b3c43?_0x2232b0[_0x4250d1(0x11f)]():_0x2232b0;for(const _0x7ccfc2 of _0xb90da7)_0x4ee6a2(_0x345d26,_0x7ccfc2,_0x1b3c43);}[_0x2cd79d(0x109)](_0x290b48,_0x5b0f93){const _0x3870c4=_0x2cd79d;if(!_0x290b48)return;if(_0x404f37(_0x290b48,_0x5b0f93))return;const _0x30702e=this[_0x3870c4(0xf5)](_0x290b48);_0x4bce9b(_0x5b0f93,_0x3870c4(0xf8),_0x30702e),this[_0x3870c4(0x10f)][_0x3870c4(0xe3)][_0x3870c4(0x101)](_0x30702e),this[_0x3870c4(0x10f)][_0x3870c4(0x10e)]=_0x30702e,_0x1122de(_0x290b48,_0x5b0f93[_0x3870c4(0xf1)](!0x0));}[_0x2cd79d(0xd9)](_0x1475c7,_0x4d5d83,_0x168573){const _0x217fa6=_0x2cd79d,_0x11d50d=this[_0x217fa6(0xda)](_0x1475c7,!0x1);if(_0x11d50d){const _0x14d871=this[_0x217fa6(0xdf)](_0x11d50d),_0x577332=_0x37d6af(_0x217fa6(0xf8),_0x14d871,_0x168573);if(_0x577332)return[_0x577332,_0x217fa6(0x11e)];this[_0x217fa6(0x10f)][_0x217fa6(0xf6)][_0x217fa6(0x101)](_0x14d871);}const _0x57638c=this[_0x217fa6(0xee)](_0x1475c7,!0x1);if(_0x57638c){const _0x283270=this[_0x217fa6(0xdf)](_0x57638c),_0x10acf8=_0x37d6af(_0x217fa6(0xf8),_0x283270,_0x168573);if(_0x10acf8)return[_0x10acf8,_0x217fa6(0x116)];this[_0x217fa6(0x10f)][_0x217fa6(0xf6)][_0x217fa6(0x101)](_0x283270);}return _0x4d5d83?_0x1475c7[_0x217fa6(0x103)]?this[_0x217fa6(0x107)](_0x1475c7,_0x168573):[_0x168573[_0x217fa6(0x117)][_0x168573[_0x217fa6(0x117)][_0x217fa6(0x114)]-0x1],_0x217fa6(0x11e)]:[_0x168573[_0x217fa6(0x117)][0x0],_0x217fa6(0x116)];}[_0x2cd79d(0x107)](_0xb2f8d5,_0x374233){const _0x2cc91c=_0x2cd79d,_0x2b3943=[],_0x3c01bd=this[_0x2cc91c(0xda)](_0xb2f8d5,!0x0);if(_0x3c01bd){const _0x5934c7=this[_0x2cc91c(0xdf)](_0x3c01bd),_0x43f434=_0x37d6af(_0x2cc91c(0xf8),_0x5934c7,_0x374233);_0x43f434&&_0x2b3943[_0x2cc91c(0x101)]([_0x43f434,_0x2cc91c(0x11e)]);}const _0x2da2b2=this[_0x2cc91c(0xee)](_0xb2f8d5,!0x0);if(_0x2da2b2){const _0x5ae065=this[_0x2cc91c(0xdf)](_0x2da2b2),_0x1df23c=_0x37d6af(_0x2cc91c(0xf8),_0x5ae065,_0x374233);_0x1df23c&&_0x2b3943[_0x2cc91c(0x101)]([_0x1df23c,_0x2cc91c(0x116)]);}if(_0x2b3943[_0x2cc91c(0x114)]>0x1)return _0x5546a3(_0x2b3943[0x0][0x0])<=_0x5546a3(_0x2b3943[0x1][0x0])?_0x2b3943[0x0]:_0x2b3943[0x1];return 0x1===_0x2b3943[_0x2cc91c(0x114)]?_0x2b3943[0x0]:[_0x374233[_0x2cc91c(0xf2)],_0x2cc91c(0x11e)];}[_0x2cd79d(0xee)](_0x56ef4a,_0x3b6233){const _0x164a0f=_0x2cd79d;let _0x19a039=_0x56ef4a[_0x164a0f(0x103)],_0x547ed3=null,_0x4f5bb8=!0x1;for(;_0x19a039;){if(_0x14d468(_0x19a039)){if(this[_0x164a0f(0xe4)](_0x19a039)&&(_0x547ed3=_0x19a039),this[_0x164a0f(0x113)](_0x19a039)&&_0x3b6233&&!_0x4f5bb8){_0x4f5bb8=!0x0,_0x19a039=_0x19a039[_0x164a0f(0x103)];continue;}break;}const _0x23e0a9=_0x3a322e(_0x19a039,_0x164a0f(0xf8));if(_0x23e0a9&&_0x164a0f(0xef)!==_0x23e0a9&&this[_0x164a0f(0xf0)][_0x164a0f(0x102)](_0x23e0a9)){_0x547ed3=_0x19a039;break;}_0x19a039=_0x19a039[_0x164a0f(0x103)];}return _0x547ed3;}[_0x2cd79d(0xda)](_0x196a83,_0x4d24ac){const _0x109111=_0x2cd79d;let _0x622d75=_0x196a83[_0x109111(0x100)],_0x3f1f15=null,_0x3bd115=!0x1;for(;_0x622d75;){if(_0x14d468(_0x622d75)){if(this[_0x109111(0xe4)](_0x622d75)&&(_0x3f1f15=_0x622d75),this[_0x109111(0x113)](_0x622d75)&&_0x4d24ac&&!_0x3bd115){_0x3bd115=!0x0,_0x622d75=_0x622d75[_0x109111(0x100)];continue;}break;}const _0x38d21b=_0x3a322e(_0x622d75,_0x109111(0xf8));if(_0x38d21b&&_0x109111(0xef)!==_0x38d21b&&this[_0x109111(0xf0)][_0x109111(0x102)](_0x38d21b)){_0x3f1f15=_0x622d75;break;}_0x622d75=_0x622d75[_0x109111(0x100)];}return _0x3f1f15;}[_0x2cd79d(0xe6)](_0x1ae3eb){const _0x9c3f37=_0x2cd79d;_0x1b8a05(_0x1ae3eb)&&_0x3e8e80(_0x9c3f37(0xf8),null,_0x1ae3eb)[_0x9c3f37(0xf7)](_0xf5487b=>{const _0x24d8e6=_0x9c3f37;if(this[_0x24d8e6(0xec)](_0xf5487b)&&!this[_0x24d8e6(0xe7)](_0xf5487b)){const _0x17c0ba=_0x3a322e(_0xf5487b,_0x24d8e6(0xf8));_0x4bce9b(_0xf5487b,_0x24d8e6(0x112),_0x17c0ba),_0x4bce9b(_0xf5487b,_0x24d8e6(0xf8),null);}});}[_0x2cd79d(0xdf)](_0x459592){const _0x349444=_0x2cd79d;if(!_0x459592)return null;if(_0x1b8a05(_0x459592))return _0x3a322e(_0x459592,_0x349444(0xf8));if(_0x14d468(_0x459592)){const _0xc914c7=_0x40eb07(_0x459592)[_0x349444(0xe1)](/removed[\s*-]data-id="([^"]+)"/);if(_0xc914c7&&_0xc914c7[0x1])return _0xc914c7[0x1];}return null;}[_0x2cd79d(0xed)](_0x3fb61a){const _0x58a5d7=_0x2cd79d;if(_0x14d468(_0x3fb61a)){const _0x2b238b=_0x40eb07(_0x3fb61a)[_0x58a5d7(0xe1)](/removed[\s*-]data-id="([^"]+)"/);_0x2b238b&&_0x2b238b[0x1]&&this[_0x58a5d7(0x10f)][_0x58a5d7(0x118)][_0x58a5d7(0x101)](_0x2b238b[0x1]);}}[_0x2cd79d(0xf5)](_0x43ac64){const _0x3a3782=_0x2cd79d;return this[_0x3a3782(0xec)](_0x43ac64)?_0x3a322e(_0x43ac64,_0x3a3782(0xf8)):this[_0x3a3782(0xfe)]();}[_0x2cd79d(0xfc)](_0x1eb367){const _0x21853c=_0x2cd79d;_0x2c09d0(_0x1eb367)[_0x21853c(0x10b)](_0x5de079=>this[_0x21853c(0xe4)](_0x5de079)||this[_0x21853c(0x113)](_0x5de079))[_0x21853c(0xf7)](_0x5f4000=>{_0x59786a(_0x5f4000);});}[_0x2cd79d(0x110)](_0x51c38b){const _0x391bf8=_0x2cd79d,_0x576229=_0x51c38b[_0x391bf8(0x117)],_0x2da2b9=_0x576229[_0x576229[_0x391bf8(0x114)]-0x1];_0x2da2b9&&_0x1b8a05(_0x2da2b9)&&_0x4bce9b(_0x2da2b9,_0x391bf8(0x108),_0x391bf8(0x119));}[_0x2cd79d(0xde)](_0x2b8d23,_0x2c6882){const _0x161b0b=_0x2cd79d,_0x4d6d3a=_0x37d6af(_0x161b0b(0x108),_0x161b0b(0x119),_0x2b8d23);if(!_0x4d6d3a)return;const _0x5d996f=_0x263565(_0x4d6d3a)[_0x161b0b(0x104)](0x0,-0x1),_0x17a138=_0x5d996f[_0x161b0b(0x114)];let _0x532522=_0x4d6d3a;if(_0x17a138>_0x2c6882){let _0x3fc356=_0x17a138,_0x1b7d0c=null;for(;_0x3fc356>_0x2c6882&&_0x3fc356>=0x0;)_0x3fc356--,_0x1b7d0c=_0x5d996f[_0x3fc356];_0x1b7d0c&&(_0x532522=_0x1b7d0c,_0x4bce9b(_0x4d6d3a,_0x161b0b(0x108),null),_0x4bce9b(_0x1b7d0c,_0x161b0b(0x108),_0x161b0b(0x119)));}else{if(_0x17a138<_0x2c6882){let _0x1b6600=_0x17a138,_0x5a587f=_0x4d6d3a;for(;_0x1b6600<_0x2c6882;){const _0x21308a=_0x5a587f[_0x161b0b(0x117)][_0x161b0b(0x10b)](_0x3931a4=>_0x1b8a05(_0x3931a4));if(0x0===_0x21308a[_0x161b0b(0x114)])break;_0x1b6600++,_0x5a587f=_0x21308a[_0x21308a[_0x161b0b(0x114)]-0x1];}_0x5a587f&&(_0x532522=_0x5a587f,_0x4bce9b(_0x4d6d3a,_0x161b0b(0x108),null),_0x4bce9b(_0x5a587f,_0x161b0b(0x108),_0x161b0b(0x119)));}}let _0xbe69b5=_0x532522;for(;_0xbe69b5;){for(;_0xbe69b5[_0x161b0b(0x103)];)_0xbe69b5=_0xbe69b5[_0x161b0b(0x103)],_0x1b8a05(_0xbe69b5)&&_0x4bce9b(_0xbe69b5,_0x161b0b(0x108),_0x161b0b(0x119));_0xbe69b5=_0xbe69b5[_0x161b0b(0xdb)];}}[_0x2cd79d(0xfd)](_0x3cc4b8){const _0x80d90e=_0x2cd79d;return Boolean(_0x80d90e(0xef)===_0x3a322e(_0x3cc4b8,_0x80d90e(0xf8)));}[_0x2cd79d(0xec)](_0xecfd4e){const _0x10c61c=_0x2cd79d;return Boolean((_0x3a322e(_0xecfd4e,_0x10c61c(0xf8))||'')[_0x10c61c(0x114)]>0x0&&_0x10c61c(0xef)!==_0x3a322e(_0xecfd4e,_0x10c61c(0xf8)));}[_0x2cd79d(0xe4)](_0x2866a1){const _0x4d4d0d=_0x2cd79d;return!!_0x2866a1&&Boolean(_0x14d468(_0x2866a1)&&_0x40eb07(_0x2866a1)[_0x4d4d0d(0xe1)](/removed[\s*-]data-id="[^"]+"/));}[_0x2cd79d(0xe7)](_0x352302){const _0x54b730=_0x2cd79d;let _0x5cc604=_0x352302[_0x54b730(0xdb)];for(;_0x5cc604;){if(_0x3a322e(_0x5cc604,_0x54b730(0x112)))return!0x0;_0x5cc604=_0x5cc604[_0x54b730(0xdb)];}return!0x1;}[_0x2cd79d(0x113)](_0x4941e8){const _0xd28efd=_0x2cd79d;return Boolean(_0x14d468(_0x4941e8)&&_0x40eb07(_0x4941e8)[_0xd28efd(0xe1)](/\s*existing[\s*-](content|document)\s*/g));}}
|
|
@@ -20,5 +20,5 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
24
|
-
|
|
23
|
+
const _0x5f3bb3=_0x3e46;(function(_0x249dfa,_0xf2cf0e){const _0x2ecfcb=_0x3e46,_0x2178e2=_0x249dfa();while(!![]){try{const _0x4bb51f=parseInt(_0x2ecfcb(0x137))/0x1+-parseInt(_0x2ecfcb(0x145))/0x2*(-parseInt(_0x2ecfcb(0x13c))/0x3)+-parseInt(_0x2ecfcb(0x138))/0x4+-parseInt(_0x2ecfcb(0x141))/0x5+parseInt(_0x2ecfcb(0x13f))/0x6*(parseInt(_0x2ecfcb(0x133))/0x7)+parseInt(_0x2ecfcb(0x13a))/0x8+parseInt(_0x2ecfcb(0x144))/0x9*(-parseInt(_0x2ecfcb(0x135))/0xa);if(_0x4bb51f===_0xf2cf0e)break;else _0x2178e2['push'](_0x2178e2['shift']());}catch(_0x241c19){_0x2178e2['push'](_0x2178e2['shift']());}}}(_0x5993,0xbcabd));import{ObservableMixin as _0x370464}from'ckeditor5/src/utils.js';import{MarkdownGfmMdToHtml as _0x15a467}from'@ckeditor/ckeditor5-markdown-gfm';import{parse as _0x517d62}from'../utils/htmlparser.js';function _0x3e46(_0x46f8f1,_0x26ed87){const _0x599344=_0x5993();return _0x3e46=function(_0x3e46c4,_0x2b0fdb){_0x3e46c4=_0x3e46c4-0x133;let _0x352355=_0x599344[_0x3e46c4];return _0x352355;},_0x3e46(_0x46f8f1,_0x26ed87);}export class AIResponseParser extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x370464(){[_0x5f3bb3(0x13b)];constructor(){const _0x2c4019=_0x5f3bb3;super(),this[_0x2c4019(0x13b)]=new _0x15a467();}[_0x5f3bb3(0x143)](_0x5c1bfc){const _0x1d8130=_0x5f3bb3,_0x213b9f=this[_0x1d8130(0x13b)][_0x1d8130(0x139)](_0x5c1bfc);return this[_0x1d8130(0x136)](_0x213b9f);}[_0x5f3bb3(0x136)](_0x50cf8d){const _0x334bad=_0x5f3bb3;return this[_0x334bad(0x142)](_0x50cf8d);}[_0x5f3bb3(0x142)](_0x10cad1){const _0x3c922b=_0x5f3bb3,_0x2bc778=_0x10cad1[_0x3c922b(0x13d)](/^\t+/gm,'\x20')[_0x3c922b(0x13d)](/\n*/g,'')[_0x3c922b(0x13d)](/\s+/g,'\x20')[_0x3c922b(0x13d)](/<[^>]*?$/g,''),_0x1c9d4c=_0x517d62(_0x3c922b(0x13e)+_0x2bc778+_0x3c922b(0x134));return _0x1c9d4c[_0x3c922b(0x140)]=_0x1c9d4c[_0x3c922b(0x140)][0x0][_0x3c922b(0x140)],_0x1c9d4c;}}function _0x5993(){const _0x1b393e=['30BRQiBU','parseAndNormalizeHTML','922228FRXEZn','4096196oToBxY','parse','12314360fTRSjs','_m2html','57MRuPJh','replace','<dummy>','42XNbsTi','children','3958400lltOIS','_parseHTML','convertMarkdownToHTML','8102583aRKehK','146814CcVGcR','1433131mXQXef','</dummy>'];_0x5993=function(){return _0x1b393e;};return _0x5993();}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
(function(
|
|
23
|
+
(function(_0x2a9c12,_0xa5dc86){var _0x5eb070=_0x5732,_0xb2066c=_0x2a9c12();while(!![]){try{var _0xa3999d=parseInt(_0x5eb070(0x1e6))/0x1+parseInt(_0x5eb070(0x1ee))/0x2*(parseInt(_0x5eb070(0x1e5))/0x3)+parseInt(_0x5eb070(0x1f3))/0x4+parseInt(_0x5eb070(0x1ea))/0x5*(parseInt(_0x5eb070(0x1f0))/0x6)+-parseInt(_0x5eb070(0x1eb))/0x7*(-parseInt(_0x5eb070(0x1ed))/0x8)+parseInt(_0x5eb070(0x1f4))/0x9*(-parseInt(_0x5eb070(0x1f2))/0xa)+parseInt(_0x5eb070(0x1ec))/0xb*(-parseInt(_0x5eb070(0x1ef))/0xc);if(_0xa3999d===_0xa5dc86)break;else _0xb2066c['push'](_0xb2066c['shift']());}catch(_0x41f6e6){_0xb2066c['push'](_0xb2066c['shift']());}}}(_0x31d4,0x1994f));function _0x31d4(){var _0x3247a0=['setTemplate','3NAmkxP','30541BusfFP','AI_DISCLAIMER_TEXT','ck-ai-disclaimer__content','div','55aodaxd','37702cotzfx','11vLWRBu','128CYGOZN','284080hjoJEH','1515300eBoQOa','26322LPIqxz','ck-ai-disclaimer','6810ComvPI','322696DYGbgA','2070DkpUjD'];_0x31d4=function(){return _0x3247a0;};return _0x31d4();}function _0x5732(_0x14a193,_0x21a274){var _0x31d43=_0x31d4();return _0x5732=function(_0x57323c,_0x3dece2){_0x57323c=_0x57323c-0x1e5;var _0x40d936=_0x31d43[_0x57323c];return _0x40d936;},_0x5732(_0x14a193,_0x21a274);}import{View as _0x390244}from'ckeditor5/src/ui.js';import{getTranslation as _0x2741c4}from'../../aicore/utils/common-translations.js';import'../../../theme/common/aidisclaimer.css';export class AIDisclaimerView extends _0x390244{constructor(_0x261701){var _0x1197bd=_0x5732;super(_0x261701),this[_0x1197bd(0x1f5)]({'tag':_0x1197bd(0x1e9),'attributes':{'class':['ck',_0x1197bd(0x1f1)]},'children':[{'tag':'p','attributes':{'class':['ck',_0x1197bd(0x1e8)]},'children':[{'text':_0x2741c4(_0x261701,_0x1197bd(0x1e7))}]}]});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x4e114e=_0x4599;(function(_0x1de52b,_0x2574a2){const _0x115f33=_0x4599,_0x1b7e00=_0x1de52b();while(!![]){try{const _0xc18396=-parseInt(_0x115f33(0xb2))/0x1+parseInt(_0x115f33(0xac))/0x2*(parseInt(_0x115f33(0xa8))/0x3)+-parseInt(_0x115f33(0xa7))/0x4+parseInt(_0x115f33(0xcb))/0x5*(parseInt(_0x115f33(0xb0))/0x6)+parseInt(_0x115f33(0xb9))/0x7*(-parseInt(_0x115f33(0xae))/0x8)+-parseInt(_0x115f33(0xa9))/0x9*(-parseInt(_0x115f33(0xaf))/0xa)+parseInt(_0x115f33(0xc6))/0xb*(parseInt(_0x115f33(0xbb))/0xc);if(_0xc18396===_0x2574a2)break;else _0x1b7e00['push'](_0x1b7e00['shift']());}catch(_0x2e2c91){_0x1b7e00['push'](_0x1b7e00['shift']());}}}(_0x1e79,0x1d1f4));function _0x4599(_0x10e844,_0x28a32b){const _0x1e79f2=_0x1e79();return _0x4599=function(_0x45997c,_0x409ee8){_0x45997c=_0x45997c-0xa3;let _0x3f9f2f=_0x1e79f2[_0x45997c];return _0x3f9f2f;},_0x4599(_0x10e844,_0x28a32b);}import{ButtonView as _0x1a5399,IconView as _0x1b2a1c,ToolbarView as _0x5720ab}from'ckeditor5/src/ui.js';import{IconCheck as _0x5bffcc,IconCopy as _0x439da3,IconShowChangesOff as _0x5df1de,IconShowChangesOn as _0x546e22,IconThumbDown as _0x128453,IconThumbUp as _0x3c7bdf}from'@ckeditor/ckeditor5-icons';import{getTranslation as _0x30c811}from'../../utils/common-translations.js';import'../../../../theme/aichat/aiminitoolbar.css';export class AIMiniToolbarView extends _0x5720ab{[_0x4e114e(0xc1)];[_0x4e114e(0xbe)];[_0x4e114e(0xcf)];[_0x4e114e(0xc5)];[_0x4e114e(0xab)];constructor(_0x5cff6d,_0x337e49={}){const _0x50a769=_0x4e114e;super(_0x5cff6d),this[_0x50a769(0xa6)](_0x50a769(0xd5),!0x0),this[_0x50a769(0xa6)](_0x50a769(0xd4),!0x1),this[_0x50a769(0xab)]={'showCopy':!0x1,'showLike':!0x1,'showDislike':!0x1,..._0x337e49};const _0x413cd4=!(this[_0x50a769(0xab)][_0x50a769(0xbc)]||this[_0x50a769(0xab)][_0x50a769(0xb1)]||this[_0x50a769(0xab)][_0x50a769(0xba)]||this[_0x50a769(0xab)][_0x50a769(0xd8)]||this[_0x50a769(0xab)][_0x50a769(0xda)]?.[_0x50a769(0xd1)]);this[_0x50a769(0xca)]=_0x413cd4?_0x50a769(0xd3):_0x50a769(0xb8),this[_0x50a769(0xab)][_0x50a769(0xbc)]&&(this[_0x50a769(0xd9)](),this[_0x50a769(0xcd)][_0x50a769(0xc3)](this[_0x50a769(0xc1)])),this[_0x50a769(0xab)][_0x50a769(0xb1)]&&(this[_0x50a769(0xb7)](),this[_0x50a769(0xcd)][_0x50a769(0xc3)](this[_0x50a769(0xc5)])),this[_0x50a769(0xcc)](),this[_0x50a769(0xab)][_0x50a769(0xba)]&&this[_0x50a769(0xcd)][_0x50a769(0xc3)](this[_0x50a769(0xbe)]),this[_0x50a769(0xab)][_0x50a769(0xd8)]&&this[_0x50a769(0xcd)][_0x50a769(0xc3)](this[_0x50a769(0xcf)]),this[_0x50a769(0xab)][_0x50a769(0xda)]&&this[_0x50a769(0xcd)][_0x50a769(0xbd)](this[_0x50a769(0xab)][_0x50a769(0xda)]);}[_0x4e114e(0xc4)](_0x4b452d){const _0x4e2dcd=_0x4e114e;this[_0x4e2dcd(0xc5)][_0x4e2dcd(0xd5)]=_0x4b452d;}[_0x4e114e(0xcc)](){const _0x1ec0de=_0x4e114e;this[_0x1ec0de(0xbe)]=new _0x1a5399(this[_0x1ec0de(0xc7)]),this[_0x1ec0de(0xbe)][_0x1ec0de(0xa6)]({'icon':_0x3c7bdf,'label':_0x30c811(this[_0x1ec0de(0xc7)],_0x1ec0de(0xa5)),'tooltip':!0x0}),this[_0x1ec0de(0xbe)][_0x1ec0de(0xd6)](_0x1ec0de(0xd5))['to'](this),this[_0x1ec0de(0xbe)]['on'](_0x1ec0de(0xa4),()=>{const _0x20b085=_0x1ec0de;this[_0x20b085(0xd2)](_0x20b085(0xbf));}),this[_0x1ec0de(0xcf)]=new _0x1a5399(this[_0x1ec0de(0xc7)]),this[_0x1ec0de(0xcf)][_0x1ec0de(0xa6)]({'icon':_0x128453,'label':_0x30c811(this[_0x1ec0de(0xc7)],_0x1ec0de(0xb3)),'tooltip':!0x0}),this[_0x1ec0de(0xcf)][_0x1ec0de(0xd6)](_0x1ec0de(0xd5))['to'](this),this[_0x1ec0de(0xcf)]['on'](_0x1ec0de(0xa4),()=>{const _0x3cf5f3=_0x1ec0de;this[_0x3cf5f3(0xd2)](_0x3cf5f3(0xd7));});}[_0x4e114e(0xd9)](){const _0x89fa1d=_0x4e114e;this[_0x89fa1d(0xc1)]=new _0x1a5399(this[_0x89fa1d(0xc7)]),this[_0x89fa1d(0xc1)][_0x89fa1d(0xa6)]({'icon':_0x439da3,'label':_0x30c811(this[_0x89fa1d(0xc7)],_0x89fa1d(0xce)),'class':_0x89fa1d(0xb6),'tooltip':!0x0}),this[_0x89fa1d(0xc1)][_0x89fa1d(0xd6)](_0x89fa1d(0xd5))['to'](this);const _0x15fdf2=new _0x1b2a1c();_0x15fdf2[_0x89fa1d(0xa6)]({'content':_0x5bffcc}),_0x15fdf2[_0x89fa1d(0xd0)]({'attributes':{'class':[_0x89fa1d(0xc8)]}}),this[_0x89fa1d(0xc1)]['on'](_0x89fa1d(0xa4),()=>{const _0x223334=_0x89fa1d;this[_0x223334(0xc1)][_0x223334(0xca)]=_0x223334(0xaa),setTimeout(()=>{const _0x307b61=_0x223334;this[_0x307b61(0xc1)][_0x307b61(0xca)]=_0x307b61(0xb6);},0x7d0);}),this[_0x89fa1d(0xc1)][_0x89fa1d(0xc0)][_0x89fa1d(0xc3)](_0x15fdf2);}[_0x4e114e(0xb7)](){const _0x152266=_0x4e114e;this[_0x152266(0xc5)]=new _0x1a5399(this[_0x152266(0xc7)]),this[_0x152266(0xc5)][_0x152266(0xa6)]({'icon':_0x5df1de,'label':_0x30c811(this[_0x152266(0xc7)],_0x152266(0xad)),'withText':_0x152266(0xc2)==this[_0x152266(0xab)][_0x152266(0xb1)],'tooltip':_0x152266(0xc2)!=this[_0x152266(0xab)][_0x152266(0xb1)],'class':_0x152266(0xa3)}),this[_0x152266(0xc5)][_0x152266(0xd6)](_0x152266(0xb4))['to'](this,_0x152266(0xd4)),this[_0x152266(0xc5)][_0x152266(0xd6)](_0x152266(0xd5))['to'](this),this[_0x152266(0xc5)][_0x152266(0xd6)](_0x152266(0xb5))['to'](this,_0x152266(0xd4),_0x1f2626=>_0x1f2626?_0x546e22:_0x5df1de),this[_0x152266(0xc5)]['on'](_0x152266(0xa4),()=>{const _0x33f90b=_0x152266;this[_0x33f90b(0xd2)](_0x33f90b(0xc9));});}}function _0x1e79(){const _0x2fe8fb=['5rASGZl','_setupRatingButtons','items','AI_MINI_TOOLBAR_COPY','dislikeButton','extendTemplate','length','fire','ck-ai-mini-toolbar\x20ck-hidden','isShowChangesOn','isEnabled','bind','dislike','showDislike','_setupCopyButton','customView','ck-ai-button-tertiary','execute','AI_MINI_TOOLBAR_LIKE','set','650608VBRImc','72825LOEesS','153sirGrG','ck-ai-mini-toolbar-copy-button\x20ck-ai-mini-toolbar-copy-button_copied','_config','10hTGTGO','AI_SUGGESTION_BUTTON_SHOW_CHANGES','1061384ZFfFAU','121490dqDrlA','76326LlYozD','showChanges','12176IZvoDl','AI_MINI_TOOLBAR_DISLIKE','isOn','icon','ck-ai-mini-toolbar-copy-button','_setupShowChangesButton','ck-ai-mini-toolbar','7AWsXqT','showLike','168veYOrl','showCopy','addMany','likeButton','like','children','copyButton','full','add','toggleShowChangesEnabled','showChangesButton','67694tWYJCY','locale','ck-ai-mini-toolbar-copy-button__check-mark','toggleShowChanges','class'];_0x1e79=function(){return _0x2fe8fb;};return _0x1e79();}
|