@ckeditor/ckeditor5-ai
Version:
AI features for CKEditor 5.
23 lines • 30.2 kB
JavaScript
/*
* Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
*
*
*
*
* +---------------------------------------------------------------------------------+
* | |
* | Hello stranger! |
* | |
* | |
* | What you're currently looking at is the source code of a legally protected, |
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
* | are forbidden and will result in legal consequences. |
* | |
* | |
* +---------------------------------------------------------------------------------+
*
*
*
*
*/
function _0x9f90(){const _0x106f5c=['first','execute','position','getLimitElement','TrackChangesEditing','setErrorState','replies','TableSelection','focus','bind','batch','message','version','_clone','mainView','45WjKwCA','AIConnector','getAncestors','end','_createInteraction','$graveyard','showLoader','slice','isDocumentOperation','_displayInteractionAtIndex','history','_interactionParams','_balloonShowDiff','getOperations','areChangesVisible','isEnabled','735942QijEDw','isBusy','push','applySuggestion','editor','ck-ai-interaction-counter','createRange','_clearSuggestionContent','852490Emgnse','getRoot','createPositionAfter','data','actionName','processor','howMany','isLoading','miniToolbarView','remove','sourcePosition','rejected','state','42583892vDCLNJ','replyCreated','showError','8gzNWwJ','_isNavigationNextButtonInView','_navigationPreviousButton','_stopInteraction','addNavigationItem','listenTo','_getExecuteDataInTable','_anchorOperation','_isNavigationPreviousButtonInView','stickiness','_executeAction','includes','_updateNavigationUI','getSelectedBlocks','clearErrorState','_interaction','queueEmptyPromise','indexOf','_execute','catch','527628mFdmzB','type','194531PcDblj','ck-ai-navigation-button\x20ck-ai-next-button','rename','_clearErrorState','forEach','ck-ai-custom-action-button','reinsert','startAutoScroll','insertSuggestion','ck-ai-navigation-button\x20ck-ai-previous-button','AI_ACTIONS_PREVIOUS_INTERACTION','add','_applyChanges','Error\x20refreshing\x20interaction:','isOfficialPlugin','Error\x20updating\x20content\x20during\x20navigation:','6gPMAJU','isPremiumPlugin','root','model','_clearInteractionHistory','rootName','getChild','_isAbortError','merge','interactionFinished','locale','map','_setupCustomViews','Attribute','get','baseVersion','hideError','84472rOSDMO','textContent','close','hasError','executeAction','Error\x20updating\x20content\x20in\x20replyContentUpdated:','icon','_aiConnector','469gpQcTC','change','toolbar','modelToViewWithIds','setChangeGroupState','getFirstRange','AIBalloon','pending','_navigationNextButton','clone','aiBalloon','getRanges','hideLoader','element','clearLoading','enqueue','_interactions','nodeAfter','createPositionAt','length','addOperation','upsertAIActionRating','replyContentUpdated','path','documentFragment','_customViews','config','split','AI_ACTIONS_GENERIC_ERROR','_navigationCounter','actionCallId','_refreshInteraction','startsWith','requires','_setErrorState','range','getSelectionAsFragment','ai.availableReplyActions','parent','documentContextContent','TrackChanges','insert','accepted','nextSibling','selectionRemoved','AI_ACTIONS_TRY_AGAIN','start','document','random','_promiseQueue','Error\x20clearing\x20loading\x20state\x20in\x20interactionFinished:','applyOperation','schema','_currentInteractionIndex','723264DfHIeS','getChildAtOffset','_disableCustomViews','changeGroups','stopInteraction','toggleSuggestionDisplayMode','getDocumentContext','streaming','_filterOperationsOutsideRange','signal','open','110Tjfnar','getSelectedContent','createPositionBefore','_clearLoadingState','set','Error\x20updating\x20content\x20in\x20replyCreated:','_navigateToNext','_applyOperationsAsSuggestions','AIActions','getSelectedTableCells','static','balloonView','move','replyChangeGroupStateUpdated','_wrapWithCommonAncestors','35vlUDPo','dialogClosed','bodyView','pluginName','ai-request-aborted','error','_children','upsertCustomAIActionRating','abort','getCommonAncestor','_setLoadingState','updateContent','toData','stopAutoScroll','filter','AI_ACTIONS_NEXT_INTERACTION','isCollapsed','removeNavigationItem','selection','_getExecuteDataRegular','showChangesButton','hasPendingParts','span','_isNavigationCounterInView','_navigateToPrevious','ai-no-track-changes','setLoading','setSelection','1/1','stop','_appendChild','stopListening','Error\x20updating\x20content\x20in\x20toggleSuggestionDisplayMode:','setTemplate','plugins','operationsA','has'];_0x9f90=function(){return _0x106f5c;};return _0x9f90();}const _0x560db3=_0x1176;(function(_0x2d4673,_0x558328){const _0x40160c=_0x1176,_0x36fb28=_0x2d4673();while(!![]){try{const _0x46944a=-parseInt(_0x40160c(0x1b1))/0x1*(parseInt(_0x40160c(0x1c1))/0x2)+-parseInt(_0x40160c(0x1af))/0x3*(-parseInt(_0x40160c(0x19b))/0x4)+-parseInt(_0x40160c(0x13f))/0x5*(parseInt(_0x40160c(0x183))/0x6)+parseInt(_0x40160c(0xef))/0x7*(-parseInt(_0x40160c(0xe7))/0x8)+-parseInt(_0x40160c(0x173))/0x9*(parseInt(_0x40160c(0x18b))/0xa)+parseInt(_0x40160c(0x130))/0xb*(-parseInt(_0x40160c(0x125))/0xc)+parseInt(_0x40160c(0x198))/0xd;if(_0x46944a===_0x558328)break;else _0x36fb28['push'](_0x36fb28['shift']());}catch(_0x6d09c){_0x36fb28['push'](_0x36fb28['shift']());}}}(_0x9f90,0x6d93a));import{Plugin as _0x155a29}from'ckeditor5/src/core.js';import{AIConnector as _0x22fa35}from'../aicore/aiconnector.js';import{AISuggestionContainerView as _0x1cc655}from'../aicore/ui/suggestioncontainer/aisuggestioncontainerview.js';import{Dialog as _0x3ccbb4,ButtonView as _0x45fc67,ViewCollection as _0x4d9151,View as _0x2a0efa}from'ckeditor5/src/ui.js';import{AIEditing as _0x4fd8af}from'../aicore/aiediting.js';import{AIActionsInteraction as _0x4e902f}from'./model/aiactionsinteraction.js';import{CKEditorError as _0x159e3f,first as _0xf706e5}from'ckeditor5/src/utils.js';import{IconAIQuickActions as _0x512262,IconRefresh as _0x4b2471,IconNextArrow as _0x49f0b5,IconPreviousArrow as _0x561973,IconShowChangesOff as _0x1fa255}from'@ckeditor/ckeditor5-icons';import{AIBalloon as _0x1b1b23}from'../aiballoon/aiballoon.js';import{PromiseQueue as _0x21a9e1}from'../aichat/utils/promisequeue.js';import{getTranslation as _0x45d4d1}from'../aicore/utils/common-translations.js';import{getSuggestionPartsFromReply as _0x44374e}from'../aicore/utils/getsuggestionpartsfromreply.js';import{DocumentCompare as _0x523407}from'ckeditor5-collaboration/src/collaboration-core.js';import{fixMarkerOperationOldRange as _0x342f4b,getOperationsFromReply as _0x24bfd0}from'../aicore/utils/getoperationsfromreply.js';import{ModelDocumentFragment as _0x5c421e,ModelRange as _0x1fbe8e,ModelPosition as _0x5ef448,_DetachOperation as _0x2f80fb,transformOperationSets as _0x249a0d}from'ckeditor5/src/engine.js';function _0x1176(_0x495fbd,_0x15731d){const _0x9f904e=_0x9f90();return _0x1176=function(_0x117628,_0x26db90){_0x117628=_0x117628-0xe6;let _0x1cf67c=_0x9f904e[_0x117628];return _0x1cf67c;},_0x1176(_0x495fbd,_0x15731d);}import{AI_REPLY_ACTIONS as _0x140a47}from'../aichat/ui/feed/aichatfeedsuggestionitemactionsview.js';export class AIActions extends _0x155a29{static get[_0x560db3(0x110)](){return[_0x22fa35,_0x3ccbb4,_0x4fd8af,_0x1b1b23,_0x523407];}static get[_0x560db3(0x142)](){const _0x1271fa=_0x560db3;return _0x1271fa(0x138);}static get[_0x560db3(0x1bf)](){return!0x0;}static get[_0x560db3(0x1c2)](){return!0x0;}[_0x560db3(0xee)];[_0x560db3(0xff)]=[];[_0x560db3(0x124)]=0x0;[_0x560db3(0x17e)];[_0x560db3(0x17f)]=!0x1;[_0x560db3(0x108)]=new _0x4d9151();[_0x560db3(0x19d)];[_0x560db3(0x10c)];[_0x560db3(0x156)]=!0x1;[_0x560db3(0xf7)];[_0x560db3(0x1a3)]=!0x1;[_0x560db3(0x19c)]=!0x1;[_0x560db3(0x120)];get[_0x560db3(0x1aa)](){const _0x1749f2=_0x560db3;return this[_0x1749f2(0xff)][this[_0x1749f2(0xff)][_0x1749f2(0x102)]-0x1];}constructor(_0x2f4d68){const _0x4c880c=_0x560db3;super(_0x2f4d68),this[_0x4c880c(0xee)]=this[_0x4c880c(0x187)][_0x4c880c(0x161)][_0x4c880c(0x1cf)](_0x4c880c(0x174)),this[_0x4c880c(0x134)](_0x4c880c(0x184),!0x1),this[_0x4c880c(0x120)]=new _0x21a9e1(),this[_0x4c880c(0x1cd)]();}[_0x560db3(0x129)](){const _0x2ecba8=_0x560db3;this[_0x2ecba8(0x19e)]();}async[_0x560db3(0xeb)](_0x33607d,_0x569ece,_0x105b74){const _0xf76808=_0x560db3;if(this[_0xf76808(0x187)][_0xf76808(0x161)][_0xf76808(0x163)](_0xf76808(0x16b))){if(this[_0xf76808(0x187)][_0xf76808(0x161)][_0xf76808(0x1cf)](_0xf76808(0x16b))[_0xf76808(0x139)]()){const {modelFragment:_0x379380,anchorData:_0x5a9924}=this[_0xf76808(0x1a1)]();return this[_0xf76808(0x1a5)](_0x33607d,_0x379380,_0x5a9924,_0x569ece,_0x105b74);}}const {modelFragment:_0x1de179,anchorData:_0x2f0b08}=this[_0xf76808(0x152)]();return this[_0xf76808(0x1a5)](_0x33607d,_0x1de179,_0x2f0b08,_0x569ece,_0x105b74);}[_0x560db3(0x152)](){const _0x219931=_0x560db3,_0x4fb3d2=this[_0x219931(0x187)][_0x219931(0x1c4)][_0x219931(0x11e)][_0x219931(0x151)];if(_0x4fb3d2[_0x219931(0x14f)]){const _0x511adb=_0xf706e5(_0x4fb3d2[_0x219931(0x1a8)]())||this[_0x219931(0x187)][_0x219931(0x1c4)][_0x219931(0x123)][_0x219931(0x167)](_0x4fb3d2);this[_0x219931(0x187)][_0x219931(0x1c4)][_0x219931(0xf0)](_0x27ffb9=>{const _0x20c759=_0x219931;_0x27ffb9[_0x20c759(0x15a)](_0x511adb,'in');});}const _0x1037ad=_0x4fb3d2[_0x219931(0xf4)](),_0x11b693=this[_0x219931(0x13e)](this[_0x219931(0x187)][_0x219931(0x1c4)][_0x219931(0x131)](_0x4fb3d2),_0x1037ad[_0x219931(0x11d)],_0x1037ad[_0x219931(0x176)]),_0x370994=_0x4fb3d2[_0x219931(0xf4)]()[_0x219931(0x11d)],_0x329695=new Map();let _0x5df5bb=_0x11b693;for(let _0x3f0ff4=0x0;_0x3f0ff4<_0x370994[_0x219931(0x106)][_0x219931(0x102)];_0x3f0ff4++)_0x329695[_0x219931(0x134)](_0x5df5bb,_0x370994[_0x219931(0x106)][_0x3f0ff4]),_0x5df5bb=_0x5df5bb[_0x219931(0x1c7)](0x0);return{'modelFragment':_0x11b693,'anchorData':_0x329695};}[_0x560db3(0x1a1)](){const _0x16fc1c=_0x560db3,_0x230e8e=this[_0x16fc1c(0x187)][_0x16fc1c(0x1c4)][_0x16fc1c(0x11e)][_0x16fc1c(0x151)],_0x7c4b67=this[_0x16fc1c(0x187)][_0x16fc1c(0x161)][_0x16fc1c(0x1cf)](_0x16fc1c(0x16b))[_0x16fc1c(0x113)](),_0x2b6c96=_0x230e8e[_0x16fc1c(0xf4)]()[_0x16fc1c(0x11d)][_0x16fc1c(0x115)][_0x16fc1c(0x115)],_0x3f8361=this[_0x16fc1c(0x13e)](_0x7c4b67,this[_0x16fc1c(0x187)][_0x16fc1c(0x1c4)][_0x16fc1c(0x132)](_0x2b6c96),this[_0x16fc1c(0x187)][_0x16fc1c(0x1c4)][_0x16fc1c(0x18d)](_0x2b6c96)),_0x3f7832=_0x230e8e[_0x16fc1c(0xf4)]()[_0x16fc1c(0x11d)],_0x248d16=new Map();let _0x2b8add=_0x3f8361;for(let _0x574005=0x0;_0x574005<_0x3f7832[_0x16fc1c(0x106)][_0x16fc1c(0x102)];_0x574005++)if(_0x248d16[_0x16fc1c(0x134)](_0x2b8add,_0x3f7832[_0x16fc1c(0x106)][_0x574005]),_0x574005<_0x3f7832[_0x16fc1c(0x106)][_0x16fc1c(0x102)]-0x1)_0x2b8add=_0x2b8add[_0x16fc1c(0x1c7)](0x0);else{let _0x1a477f=_0x2b8add[_0x16fc1c(0x11a)];for(;_0x1a477f;)_0x248d16[_0x16fc1c(0x134)](_0x1a477f,_0x3f7832[_0x16fc1c(0x106)][_0x574005]),_0x1a477f=_0x1a477f[_0x16fc1c(0x11a)];}return{'modelFragment':_0x3f8361,'anchorData':_0x248d16};}[_0x560db3(0x1a5)](_0x5c896b,_0x5939b6,_0x5b64ed,_0x5e1bc5,_0xa0cce6){const _0x378b75=_0x560db3,_0x4bf18e=this[_0x378b75(0x187)][_0x378b75(0x161)][_0x378b75(0x1cf)](_0x4fd8af),_0x43e898=this[_0x378b75(0x187)][_0x378b75(0x161)][_0x378b75(0x1cf)](_0x1b1b23),_0x21d787=this[_0x378b75(0x187)][_0x378b75(0x1c4)][_0x378b75(0x11e)][_0x378b75(0x151)],_0x4e4e27=_0x4bf18e[_0x378b75(0xf2)](_0x5939b6),_0xa82277=this[_0x378b75(0x187)][_0x378b75(0x18e)][_0x378b75(0x190)][_0x378b75(0x14b)](_0x4e4e27),_0x13de40=this[_0x378b75(0x187)][_0x378b75(0x1c4)][_0x378b75(0x11e)][_0x378b75(0x170)],_0x5b8090=[..._0x21d787[_0x378b75(0xfa)]()];let _0x58abb7=this[_0x378b75(0x187)][_0x378b75(0x109)][_0x378b75(0x1cf)](_0x378b75(0x114))||[..._0x140a47];this[_0x378b75(0x187)][_0x378b75(0x161)][_0x378b75(0x163)](_0x378b75(0x117))||(_0x58abb7=_0x58abb7[_0x378b75(0x14d)](_0x22ca8c=>_0x378b75(0x1b9)!=_0x22ca8c));const _0x20d6a5=new _0x1cc655(this[_0x378b75(0x187)][_0x378b75(0x1cb)],{'showDiff':!0x1,'areActionsDisabled':!0x1,'hideHeader':!0x0,'showLoader':!0x0,'miniToolbarConfig':{'showChanges':_0x378b75(0xed),'customView':this[_0x378b75(0x108)]},'showUnchangedParts':!0x0,'availableActions':_0x58abb7});return _0x43e898[_0x378b75(0x12f)]({'index':0x3e8*Math[_0x378b75(0x11f)]()%0x3e8,'title':_0x5e1bc5,'icon':_0xa0cce6||_0x512262,'mainView':_0x20d6a5,'showRotator':!0x1,'showApplyButton':!0x0,'showSuggestButton':this[_0x378b75(0x187)][_0x378b75(0x161)][_0x378b75(0x163)](_0x378b75(0x117)),'ranges':_0x5b8090}),this[_0x378b75(0x149)](_0x20d6a5,_0x43e898),this[_0x378b75(0x1a0)](_0x43e898,_0x378b75(0x186),()=>{const _0x10c755=_0x378b75;this[_0x10c755(0x1bd)](_0x5939b6,_0x5b64ed,!0x1);}),this[_0x378b75(0x1a0)](_0x43e898,_0x378b75(0x1b9),()=>{const _0x353030=_0x378b75;this[_0x353030(0x1bd)](_0x5939b6,_0x5b64ed,!0x0);}),this[_0x378b75(0x1a0)](_0x43e898,_0x378b75(0x11b),()=>{const _0x17363c=_0x378b75;this[_0x17363c(0x19e)](),this[_0x17363c(0x127)]();}),this[_0x378b75(0x1a0)](_0x43e898,_0x378b75(0x140),()=>{const _0x48f798=_0x378b75;if(this[_0x48f798(0x1aa)]&&this[_0x48f798(0x1aa)][_0x48f798(0x16a)][_0x48f798(0x102)]>0x0){const _0xd54cc0=this[_0x48f798(0x1aa)][_0x48f798(0x16a)][this[_0x48f798(0x1aa)][_0x48f798(0x16a)][_0x48f798(0x102)]-0x1],_0x1426a0=_0xd54cc0[_0x48f798(0x128)][0x0];_0x1426a0&&_0x48f798(0xf6)===_0x1426a0[_0x48f798(0x197)]&&_0xd54cc0[_0x48f798(0xf3)](0x0,_0x48f798(0x196));}this[_0x48f798(0x19e)](),this[_0x48f798(0x1c5)](),this[_0x48f798(0x15e)](_0x43e898);}),this[_0x378b75(0x177)](_0xa82277,_0x13de40,_0x20d6a5,_0x43e898,_0x5c896b);}[_0x560db3(0x13e)](_0x57b985,_0x30e578,_0x3c197f){const _0x1d7b5c=_0x560db3,_0xb7b8f4=this[_0x1d7b5c(0x187)][_0x1d7b5c(0x1c4)][_0x1d7b5c(0x189)](_0x30e578,_0x3c197f)[_0x1d7b5c(0x148)](),_0x4de996=_0xb7b8f4['is'](_0x1d7b5c(0x107))?[]:_0xb7b8f4[_0x1d7b5c(0x175)]({'includeSelf':!0x0})[_0x1d7b5c(0x17a)](0x1);if(_0x4de996[_0x1d7b5c(0x102)]){const _0x556756=_0x4de996[_0x1d7b5c(0x1cc)](_0x3f506b=>_0x3f506b[_0x1d7b5c(0x171)](!0x1));for(let _0x242336=0x1;_0x242336<_0x556756[_0x1d7b5c(0x102)];_0x242336++)_0x556756[_0x242336-0x1][_0x1d7b5c(0x15d)](_0x556756[_0x242336]);return _0x556756[_0x556756[_0x1d7b5c(0x102)]-0x1][_0x1d7b5c(0x15d)](_0x57b985),new _0x5c421e(_0x556756[0x0]);}return _0x57b985;}async[_0x560db3(0x177)](_0x253094,_0x46795a,_0x57cca5,_0x154fa6,_0x551eb4){const _0x30886d=_0x560db3,_0x347581=this[_0x30886d(0x187)];this[_0x30886d(0x17e)]={'action':_0x551eb4,'content':_0x253094,'version':_0x46795a,'mainView':_0x57cca5,'aiBalloon':_0x154fa6};const _0x2654bf=new _0x4e902f({'connector':this[_0x30886d(0xee)],'editor':_0x347581,'content':_0x253094,'version':_0x46795a,..._0x551eb4});this[_0x30886d(0xff)][_0x30886d(0x185)](_0x2654bf),_0x57cca5[_0x30886d(0xe6)]();const _0x1a2bc8=(_0x1e32e3,_0xcb3d1f,_0x18b2fd=!0x1,_0x479518=_0x30886d(0x12c))=>this[_0x30886d(0x120)][_0x30886d(0xfe)](async _0x4200b3=>{const _0x542ef8=_0x30886d;try{const _0x3ec8c5=_0x44374e({'editor':_0x347581,'changeGroups':_0x1e32e3[_0x542ef8(0x128)],'documentContextContent':_0x1e32e3[_0x542ef8(0x116)],'showDiff':_0x18b2fd,'trimUnchanged':!0x1});await _0xcb3d1f[_0x542ef8(0x14a)]({'parts':_0x3ec8c5,'renderingStrategy':_0x479518,'abortSignal':_0x4200b3});}catch(_0x282b30){if(this[_0x542ef8(0x1c8)](_0x282b30))return;throw _0x282b30;}});this[_0x30886d(0x1aa)]['on'](_0x30886d(0x199),(_0x4c8dd8,_0x1780dc)=>{const _0x5f3b1a=_0x30886d;_0x57cca5[_0x5f3b1a(0xfb)](),_0x154fa6[_0x5f3b1a(0x1b8)](),_0x1a2bc8(_0x1780dc,_0x57cca5)[_0x5f3b1a(0x1ae)](_0x108716=>{const _0x6235ce=_0x5f3b1a;this[_0x6235ce(0x1c8)](_0x108716)||(console[_0x6235ce(0x144)](_0x6235ce(0x135),_0x108716),this[_0x6235ce(0x111)](_0x2654bf,_0x57cca5));});}),this[_0x30886d(0x1aa)]['on'](_0x30886d(0x105),(_0x29926b,_0x232aaf)=>{const _0x1252cf=_0x30886d;_0x1a2bc8(_0x232aaf,_0x57cca5)[_0x1252cf(0x1ae)](_0x257f19=>{const _0x2d85b1=_0x1252cf;this[_0x2d85b1(0x1c8)](_0x257f19)||(console[_0x2d85b1(0x144)](_0x2d85b1(0xec),_0x257f19),this[_0x2d85b1(0x111)](_0x2654bf,_0x57cca5));});}),this[_0x30886d(0x1aa)]['on'](_0x30886d(0x1ca),async()=>{const _0x4e7352=_0x30886d;try{await this[_0x4e7352(0x133)](_0x57cca5,_0x154fa6),this[_0x4e7352(0x1a7)](),await this[_0x4e7352(0x120)][_0x4e7352(0x1ab)];}catch(_0x3ad823){this[_0x4e7352(0x1c8)](_0x3ad823)||(console[_0x4e7352(0x144)](_0x4e7352(0x121),_0x3ad823),this[_0x4e7352(0x111)](_0x2654bf,_0x57cca5));}finally{_0x154fa6[_0x4e7352(0x14c)]();}}),this[_0x30886d(0x1a0)](_0x57cca5,_0x30886d(0x12a),async(_0x17e1c8,{showDiff:_0x2f33c6})=>{const _0x5b73ac=_0x30886d;try{this[_0x5b73ac(0x17f)]=_0x2f33c6;const _0x90c3ec=this[_0x5b73ac(0x1aa)][_0x5b73ac(0x16a)][this[_0x5b73ac(0x1aa)][_0x5b73ac(0x16a)][_0x5b73ac(0x102)]-0x1];_0x90c3ec&&await _0x1a2bc8(_0x90c3ec,_0x57cca5,_0x2f33c6,_0x5b73ac(0x13a));}catch(_0x15df0a){this[_0x5b73ac(0x1c8)](_0x15df0a)||(console[_0x5b73ac(0x144)](_0x5b73ac(0x15f),_0x15df0a),this[_0x5b73ac(0x111)](_0x2654bf,_0x57cca5));}}),this[_0x30886d(0x1aa)]['on'](_0x30886d(0x13d),(_0x3362d7,{reply:_0x2aadbb})=>{const _0x5c85c8=_0x30886d,_0x5e3425={'positiveCount':_0x2aadbb[_0x5c85c8(0x128)][_0x5c85c8(0x14d)](_0xda5c54=>_0x5c85c8(0x119)===_0xda5c54[_0x5c85c8(0x197)])[_0x5c85c8(0x102)],'totalCount':_0x2aadbb[_0x5c85c8(0x128)][_0x5c85c8(0x102)]},_0x38e225=this[_0x5c85c8(0x1aa)][_0x5c85c8(0x10d)],_0x386f9c=this[_0x5c85c8(0x1aa)][_0x5c85c8(0x18f)];_0x386f9c?this[_0x5c85c8(0xee)][_0x5c85c8(0x104)](_0x386f9c,_0x38e225,_0x5e3425):this[_0x5c85c8(0xee)][_0x5c85c8(0x146)](_0x38e225,_0x5e3425);}),this[_0x30886d(0x149)](_0x57cca5,_0x154fa6);try{const _0x14e663=await this[_0x30886d(0x1aa)][_0x30886d(0x11d)]();return this[_0x30886d(0x1a7)](),_0x14e663;}catch(_0x4d1804){if(this[_0x30886d(0x1c8)](_0x4d1804))return;_0x57cca5[_0x30886d(0xfb)](),this[_0x30886d(0x111)](_0x2654bf,_0x57cca5);}}[_0x560db3(0x1bd)](_0x522d91,_0x38ff84,_0x56dc48){const _0x4f8f6a=_0x560db3,_0x3de26f=this[_0x4f8f6a(0x187)];if(_0x56dc48&&!_0x3de26f[_0x4f8f6a(0x161)][_0x4f8f6a(0x163)](_0x4f8f6a(0x117)))throw new _0x159e3f(_0x4f8f6a(0x158),null);const _0x1a5f70=this[_0x4f8f6a(0x187)][_0x4f8f6a(0x161)][_0x4f8f6a(0x1cf)](_0x523407),_0x3b6730=this[_0x4f8f6a(0x1aa)],_0x44fb69=this[_0x4f8f6a(0x1aa)][_0x4f8f6a(0x16a)][this[_0x4f8f6a(0x1aa)][_0x4f8f6a(0x16a)][_0x4f8f6a(0x102)]-0x1],_0x3d9599=_0x44fb69[_0x4f8f6a(0x128)];_0x44fb69[_0x4f8f6a(0xf3)](0x0,_0x4f8f6a(0x119));let _0x7050f9=_0x24bfd0({'editor':_0x3de26f,'reply':_0x44fb69,'interaction':_0x3b6730,'groups':_0x3d9599,'transform':!0x1,'documentCompare':_0x1a5f70,'documentCompareOptions':{'anchor':_0x3de26f[_0x4f8f6a(0x1c4)][_0x4f8f6a(0x101)](_0x522d91,0x0),'markDeletions':_0x56dc48}});_0x7050f9=this[_0x4f8f6a(0x12d)](_0x7050f9,_0x38ff84);for(const _0x543e37 of _0x7050f9)this[_0x4f8f6a(0x1a2)](_0x38ff84,_0x543e37,_0x3de26f[_0x4f8f6a(0x1c4)][_0x4f8f6a(0x11e)][_0x4f8f6a(0x18c)]());const _0xe5316d=_0x3b6730[_0x4f8f6a(0x12b)]()[_0x4f8f6a(0x170)],_0x10cd69=_0x3de26f[_0x4f8f6a(0x1c4)][_0x4f8f6a(0x11e)][_0x4f8f6a(0x17d)][_0x4f8f6a(0x180)](_0xe5316d),_0x5332d1={'document':_0x3de26f[_0x4f8f6a(0x1c4)][_0x4f8f6a(0x11e)],'useRelations':!0x1,'padWithNoOps':!0x1},_0x970c01=_0x249a0d(_0x7050f9,_0x10cd69,_0x5332d1)[_0x4f8f6a(0x162)];_0x3de26f[_0x4f8f6a(0x1c4)][_0x4f8f6a(0xf0)](_0x5a8797=>{const _0x110fee=_0x4f8f6a;if(_0x5a8797[_0x110fee(0x15a)](_0x3de26f[_0x110fee(0x1c4)][_0x110fee(0x11e)][_0x110fee(0x151)][_0x110fee(0x16c)]),_0x56dc48)_0x3de26f[_0x110fee(0x161)][_0x110fee(0x1cf)](_0x110fee(0x168))[_0x110fee(0x137)](_0x970c01);else{for(const _0x4bef40 of _0x970c01)_0x4bef40[_0x110fee(0x1d0)]=_0x3de26f[_0x110fee(0x1c4)][_0x110fee(0x11e)][_0x110fee(0x170)],_0x342f4b(_0x3de26f,_0x4bef40),_0x5a8797[_0x110fee(0x16e)][_0x110fee(0x103)](_0x4bef40),_0x3de26f[_0x110fee(0x1c4)][_0x110fee(0x122)](_0x4bef40);}}),this[_0x4f8f6a(0x187)][_0x4f8f6a(0x161)][_0x4f8f6a(0x1cf)](_0x4f8f6a(0xf5))[_0x4f8f6a(0xe9)]();}[_0x560db3(0x12d)](_0x364130,_0x5a76fe){const _0x376620=_0x560db3;return _0x364130[_0x376620(0x14d)](_0x4be65e=>{const _0x20fc58=_0x376620;if(_0x20fc58(0x1b3)==_0x4be65e[_0x20fc58(0x1b0)]){const _0x102f0f=_0x4be65e[_0x20fc58(0x166)][_0x20fc58(0x100)];return!_0x5a76fe[_0x20fc58(0x163)](_0x102f0f);}if(_0x4be65e[_0x20fc58(0x1b0)][_0x20fc58(0x1ac)](_0x20fc58(0x1ce))>-0x1){const _0x3cc92d=_0x4be65e[_0x20fc58(0x112)][_0x20fc58(0x11d)][_0x20fc58(0x100)];return!_0x5a76fe[_0x20fc58(0x163)](_0x3cc92d);}return!0x0;});}[_0x560db3(0x1a2)](_0x424aab,_0x7935f4,_0x51938f){const _0x433aec=_0x560db3,_0x24d00d=_0x7935f4[_0x433aec(0xf8)]();for(const _0x1aa9a3 in _0x7935f4){const _0x16c272=_0x7935f4[_0x1aa9a3];_0x16c272 instanceof _0x1fbe8e?_0x7935f4[_0x1aa9a3]=new _0x1fbe8e(_0x5c9d59(_0x16c272[_0x433aec(0x11d)]),_0x5c9d59(_0x16c272[_0x433aec(0x176)])):_0x16c272 instanceof _0x5ef448&&(_0x7935f4[_0x1aa9a3]=_0x5c9d59(_0x16c272));}if([_0x433aec(0x118),_0x433aec(0x13c),_0x433aec(0x194),_0x433aec(0x1b7),_0x433aec(0x10a),_0x433aec(0x1c9)][_0x433aec(0x1a6)](_0x24d00d[_0x433aec(0x1b0)])){if(_0x24d00d[_0x433aec(0x17b)]=!0x1,_0x24d00d[_0x433aec(0x1d0)]=null,_0x433aec(0x194)==_0x24d00d[_0x433aec(0x1b0)]){const _0x2e347d=_0x24d00d[_0x433aec(0x195)],_0x28a016=_0x24d00d[_0x433aec(0x191)];new _0x2f80fb(_0x2e347d,_0x28a016)[_0x433aec(0x1ad)]();}else _0x24d00d[_0x433aec(0x1ad)]();}function _0x5c9d59(_0x26a6db){const _0x490a1e=_0x433aec;if(_0x490a1e(0x178)==_0x26a6db[_0x490a1e(0x1c3)][_0x490a1e(0x1c6)])return _0x26a6db;const _0x42292e=[];let _0x268c17=_0x26a6db[_0x490a1e(0x1c3)];for(let _0x35c874=0x0;_0x35c874<_0x26a6db[_0x490a1e(0x106)][_0x490a1e(0x102)];_0x35c874++){const _0x39bdc2=_0x424aab[_0x490a1e(0x1cf)](_0x268c17)||0x0;_0x42292e[_0x35c874]=_0x26a6db[_0x490a1e(0x106)][_0x35c874]+_0x39bdc2,_0x268c17=_0x268c17[_0x490a1e(0x126)](_0x26a6db[_0x490a1e(0x106)][_0x35c874]);}return new _0x5ef448(_0x51938f,_0x42292e,_0x26a6db[_0x490a1e(0x1a4)]);}}[_0x560db3(0x10e)](){const _0xf740e3=_0x560db3;if(!this[_0xf740e3(0x17e)])return;this[_0xf740e3(0xff)][_0xf740e3(0x102)]>0x0&&this[_0xf740e3(0x19e)](),this[_0xf740e3(0x124)]=0x0,this[_0xf740e3(0x17f)]=!0x1;const {action:_0x505b2c,content:_0x4f02fc,version:_0xf6c7d9,mainView:_0x2cab65,aiBalloon:_0x1d3369}=this[_0xf740e3(0x17e)];_0x2cab65[_0xf740e3(0x181)]=!0x1,_0x2cab65[_0xf740e3(0xe6)](),this[_0xf740e3(0x1b4)](_0x2cab65,_0x1d3369);const _0x63f64a=_0x2cab65;_0x63f64a[_0xf740e3(0x193)]&&_0x63f64a[_0xf740e3(0x193)][_0xf740e3(0x153)]&&_0x63f64a[_0xf740e3(0x193)][_0xf740e3(0x153)][_0xf740e3(0x134)]({'isOn':!0x1,'icon':_0x1fa255}),this[_0xf740e3(0x18a)](_0x2cab65),_0x2cab65[_0xf740e3(0x179)](),this[_0xf740e3(0x1a7)](),this[_0xf740e3(0x15e)](_0x2cab65),this[_0xf740e3(0x177)](_0x4f02fc,_0xf6c7d9,_0x2cab65,_0x1d3369,_0x505b2c)[_0xf740e3(0x1ae)](_0x20c73f=>{const _0x105e05=_0xf740e3;this[_0x105e05(0x1c8)](_0x20c73f)||console[_0x105e05(0x144)](_0x105e05(0x1be),_0x20c73f);});}[_0x560db3(0x18a)](_0x52a897){const _0x4f3d25=_0x560db3,_0x4a8e31=_0x52a897[_0x4f3d25(0x141)][_0x4f3d25(0x145)];for(;_0x4a8e31[_0x4f3d25(0x102)]>0x0;)_0x4a8e31[_0x4f3d25(0x194)](_0x4a8e31[_0x4f3d25(0x164)]);_0x52a897[_0x4f3d25(0x141)][_0x4f3d25(0x154)]=!0x1;}[_0x560db3(0x1c8)](_0x354c91){const _0x4611af=_0x560db3;return!!_0x354c91[_0x4611af(0x16f)]&&_0x354c91[_0x4611af(0x16f)][_0x4611af(0x10f)](_0x4611af(0x143));}[_0x560db3(0x1c5)](){const _0x38951c=_0x560db3;this[_0x38951c(0xff)]=[],this[_0x38951c(0x17e)]=void 0x0,this[_0x38951c(0x124)]=0x0,this[_0x38951c(0x1a7)]();}[_0x560db3(0x19e)](){const _0x2b3495=_0x560db3;this[_0x2b3495(0x1aa)]&&this[_0x2b3495(0x1aa)][_0x2b3495(0x15c)](),this[_0x2b3495(0x120)][_0x2b3495(0x147)](),this[_0x2b3495(0x184)]=!0x1,this[_0x2b3495(0x17e)]&&this[_0x2b3495(0x17e)][_0x2b3495(0xf9)][_0x2b3495(0x14c)]();}[_0x560db3(0x1cd)](){const _0x17b757=_0x560db3,_0x37e370=new _0x45fc67(this[_0x17b757(0x187)][_0x17b757(0x1cb)]),_0xd735f5=new _0x45fc67(this[_0x17b757(0x187)][_0x17b757(0x1cb)]),_0x22d912=new _0x2a0efa(this[_0x17b757(0x187)][_0x17b757(0x1cb)]),_0x5189ed=new _0x45fc67(this[_0x17b757(0x187)][_0x17b757(0x1cb)]);_0x37e370[_0x17b757(0x134)]({'icon':_0x4b2471,'label':_0x45d4d1(this[_0x17b757(0x187)][_0x17b757(0x1cb)],_0x17b757(0x11c)),'tooltip':!0x0,'class':_0x17b757(0x1b6)}),_0xd735f5[_0x17b757(0x134)]({'icon':_0x561973,'tooltip':_0x45d4d1(this[_0x17b757(0x187)][_0x17b757(0x1cb)],_0x17b757(0x1bb)),'class':_0x17b757(0x1ba)}),_0x22d912[_0x17b757(0x160)]({'tag':_0x17b757(0x155),'attributes':{'class':[_0x17b757(0x188)]},'children':[_0x17b757(0x15b)]}),_0x5189ed[_0x17b757(0x134)]({'icon':_0x49f0b5,'tooltip':_0x45d4d1(this[_0x17b757(0x187)][_0x17b757(0x1cb)],_0x17b757(0x14e)),'class':_0x17b757(0x1b2)}),_0x37e370[_0x17b757(0x16d)](_0x17b757(0x182))['to'](this,_0x17b757(0x184),_0x1feae3=>!_0x1feae3),_0x37e370['on'](_0x17b757(0x165),()=>{const _0x3f860c=_0x17b757;this[_0x3f860c(0x10e)]();}),_0xd735f5[_0x17b757(0x16d)](_0x17b757(0x182))['to'](this,_0x17b757(0x184),_0x4a8efd=>!_0x4a8efd),_0xd735f5['on'](_0x17b757(0x165),()=>{const _0x11a201=_0x17b757;this[_0x11a201(0x157)]();}),_0x5189ed[_0x17b757(0x16d)](_0x17b757(0x182))['to'](this,_0x17b757(0x184),_0x5f1b93=>!_0x5f1b93),_0x5189ed['on'](_0x17b757(0x165),()=>{const _0x176872=_0x17b757;this[_0x176872(0x136)]();}),this[_0x17b757(0x19d)]=_0xd735f5,this[_0x17b757(0x10c)]=_0x22d912,this[_0x17b757(0xf7)]=_0x5189ed,this[_0x17b757(0x108)][_0x17b757(0x1bc)](_0x37e370);}[_0x560db3(0x157)](){const _0x3aaacf=_0x560db3,_0x2d3182=this[_0x3aaacf(0xff)][_0x3aaacf(0x102)];this[_0x3aaacf(0x124)]<_0x2d3182-0x1&&this[_0x3aaacf(0x17c)](this[_0x3aaacf(0x124)]+0x1);}[_0x560db3(0x136)](){const _0x407e26=_0x560db3;this[_0x407e26(0x124)]>0x0&&this[_0x407e26(0x17c)](this[_0x407e26(0x124)]-0x1);}async[_0x560db3(0x17c)](_0x2248ae){const _0x430b8c=_0x560db3;if(!this[_0x430b8c(0x17e)])return;this[_0x430b8c(0x124)]=_0x2248ae;const {mainView:_0x1bc0d8}=this[_0x430b8c(0x17e)],_0x235c89=this[_0x430b8c(0xff)][this[_0x430b8c(0xff)][_0x430b8c(0x102)]-0x1-this[_0x430b8c(0x124)]];if(!_0x235c89)return;if(_0x235c89[_0x430b8c(0xea)])return this[_0x430b8c(0x111)](_0x235c89,_0x1bc0d8),void this[_0x430b8c(0x1a7)]();if(!_0x235c89[_0x430b8c(0x16a)][_0x430b8c(0x102)])return;_0x1bc0d8[_0x430b8c(0xe6)](),this[_0x430b8c(0x17e)]&&this[_0x430b8c(0x1b4)](_0x1bc0d8,this[_0x430b8c(0x17e)][_0x430b8c(0xf9)]);const _0x3a415a=_0x235c89[_0x430b8c(0x16a)][_0x235c89[_0x430b8c(0x16a)][_0x430b8c(0x102)]-0x1];if(_0x3a415a){const _0x30da4a=this[_0x430b8c(0x187)];this[_0x430b8c(0x18a)](_0x1bc0d8);try{const _0x6a392a=_0x44374e({'editor':_0x30da4a,'changeGroups':_0x3a415a[_0x430b8c(0x128)],'documentContextContent':_0x3a415a[_0x430b8c(0x116)],'showDiff':this[_0x430b8c(0x17f)],'trimUnchanged':!0x1});this[_0x430b8c(0x18a)](_0x1bc0d8),await new Promise(_0x204129=>setTimeout(_0x204129,0x32)),await _0x1bc0d8[_0x430b8c(0x14a)]({'parts':_0x6a392a,'renderingStrategy':_0x430b8c(0x13a),'abortSignal':new AbortController()[_0x430b8c(0x12e)]});}catch(_0x5b69ad){this[_0x430b8c(0x1c8)](_0x5b69ad)||console[_0x430b8c(0x144)](_0x430b8c(0x1c0),_0x5b69ad);}}this[_0x430b8c(0x1a7)]();}[_0x560db3(0x1a7)](){const _0x4201f3=_0x560db3;if(!this[_0x4201f3(0x19d)]||!this[_0x4201f3(0x10c)]||!this[_0x4201f3(0xf7)])return;const _0x417048=this[_0x4201f3(0xff)][_0x4201f3(0x102)],_0x45685d=_0x417048>0x1,_0x5ed0f2=this[_0x4201f3(0x17e)]?.[_0x4201f3(0x172)];if(_0x45685d){this[_0x4201f3(0x1a3)]||this[_0x4201f3(0x156)]||this[_0x4201f3(0x19c)]||(this[_0x4201f3(0x108)][_0x4201f3(0x1bc)](this[_0x4201f3(0x19d)]),_0x5ed0f2?.[_0x4201f3(0x19f)](this[_0x4201f3(0x19d)]),this[_0x4201f3(0x1a3)]=!0x0,this[_0x4201f3(0x108)][_0x4201f3(0x1bc)](this[_0x4201f3(0x10c)]),_0x5ed0f2?.[_0x4201f3(0x19f)](this[_0x4201f3(0x10c)]),this[_0x4201f3(0x156)]=!0x0,this[_0x4201f3(0x108)][_0x4201f3(0x1bc)](this[_0x4201f3(0xf7)]),_0x5ed0f2?.[_0x4201f3(0x19f)](this[_0x4201f3(0xf7)]),this[_0x4201f3(0x19c)]=!0x0);const _0x5c1370=_0x417048-this[_0x4201f3(0x124)];this[_0x4201f3(0x10c)][_0x4201f3(0xfc)]&&(this[_0x4201f3(0x10c)][_0x4201f3(0xfc)][_0x4201f3(0xe8)]=_0x5c1370+'/'+_0x417048),this[_0x4201f3(0x19d)][_0x4201f3(0x182)]=this[_0x4201f3(0x124)]<_0x417048-0x1,this[_0x4201f3(0xf7)][_0x4201f3(0x182)]=this[_0x4201f3(0x124)]>0x0;}else(this[_0x4201f3(0x1a3)]||this[_0x4201f3(0x156)]||this[_0x4201f3(0x19c)])&&(this[_0x4201f3(0x108)][_0x4201f3(0x194)](this[_0x4201f3(0x19d)]),_0x5ed0f2?.[_0x4201f3(0x150)](this[_0x4201f3(0x19d)]),this[_0x4201f3(0x1a3)]=!0x1,this[_0x4201f3(0x108)][_0x4201f3(0x194)](this[_0x4201f3(0x10c)]),_0x5ed0f2?.[_0x4201f3(0x150)](this[_0x4201f3(0x10c)]),this[_0x4201f3(0x156)]=!0x1,this[_0x4201f3(0x108)][_0x4201f3(0x194)](this[_0x4201f3(0xf7)]),_0x5ed0f2?.[_0x4201f3(0x150)](this[_0x4201f3(0xf7)]),this[_0x4201f3(0x19c)]=!0x1);}[_0x560db3(0x149)](_0x22ffd3,_0x2f3460){const _0x543293=_0x560db3;_0x22ffd3[_0x543293(0x159)](),_0x2f3460[_0x543293(0x13b)][_0x543293(0x159)](),this[_0x543293(0x184)]=!0x0;}async[_0x560db3(0x111)](_0x4d120d,_0x52e830){const _0x3f0ee8=_0x560db3,_0x1dae51=_0x45d4d1(this[_0x3f0ee8(0x187)][_0x3f0ee8(0x1cb)],_0x3f0ee8(0x10b));_0x52e830[_0x3f0ee8(0x19a)](_0x1dae51),_0x4d120d[_0x3f0ee8(0xea)]=!0x0,await this[_0x3f0ee8(0x120)][_0x3f0ee8(0x1ab)],_0x52e830[_0x3f0ee8(0x169)](),this[_0x3f0ee8(0x17e)]?.[_0x3f0ee8(0xf9)][_0x3f0ee8(0x13b)][_0x3f0ee8(0xf1)]&&(this[_0x3f0ee8(0x17e)][_0x3f0ee8(0xf9)][_0x3f0ee8(0x13b)][_0x3f0ee8(0xf1)][_0x3f0ee8(0x192)]=!0x0);}[_0x560db3(0x1b4)](_0x457fcb,_0x392fee){const _0x358620=_0x560db3;_0x457fcb[_0x358620(0x1a9)](),_0x392fee[_0x358620(0x13b)][_0x358620(0xf1)]&&(_0x392fee[_0x358620(0x13b)][_0x358620(0xf1)][_0x358620(0x192)]=!0x1);}async[_0x560db3(0x133)](_0x27828a,_0x6213c2){const _0x12c804=_0x560db3;await this[_0x12c804(0x120)][_0x12c804(0x1ab)],this[_0x12c804(0x184)]=!0x1,_0x27828a[_0x12c804(0xfd)](),_0x6213c2[_0x12c804(0x13b)][_0x12c804(0xfd)]();}[_0x560db3(0x127)](){const _0x569595=_0x560db3;this[_0x569595(0x108)][_0x569595(0x1b5)](_0x59014b=>{const _0x1216c7=_0x569595;_0x1216c7(0x182)in _0x59014b&&(_0x59014b[_0x1216c7(0x182)]=!0x1);});}}