@ckeditor/ckeditor5-ai
Version:
AI features for CKEditor 5.
23 lines • 6.71 kB
JavaScript
/*
* Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
*
*
*
*
* +---------------------------------------------------------------------------------+
* | |
* | Hello stranger! |
* | |
* | |
* | What you're currently looking at is the source code of a legally protected, |
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
* | are forbidden and will result in legal consequences. |
* | |
* | |
* +---------------------------------------------------------------------------------+
*
*
*
*
*/
const _0x1223cd=_0x1117;(function(_0x1b6a72,_0x2f6c5d){const _0x56409f=_0x1117,_0x2566ba=_0x1b6a72();while(!![]){try{const _0x57faf3=-parseInt(_0x56409f(0x142))/0x1+parseInt(_0x56409f(0x153))/0x2*(parseInt(_0x56409f(0x145))/0x3)+parseInt(_0x56409f(0x141))/0x4+-parseInt(_0x56409f(0x155))/0x5*(parseInt(_0x56409f(0x148))/0x6)+-parseInt(_0x56409f(0x144))/0x7*(parseInt(_0x56409f(0x14b))/0x8)+-parseInt(_0x56409f(0x133))/0x9*(parseInt(_0x56409f(0x158))/0xa)+parseInt(_0x56409f(0x156))/0xb;if(_0x57faf3===_0x2f6c5d)break;else _0x2566ba['push'](_0x2566ba['shift']());}catch(_0x297d0d){_0x2566ba['push'](_0x2566ba['shift']());}}}(_0x4ed1,0x7a993));import{EmitterMixin as _0x48d703}from'ckeditor5/src/utils.js';import{AIChatHistoryItem as _0x33338f}from'./aichathistoryitem.js';export class AIChatHistoryConversations extends _0x48d703(){[_0x1223cd(0x14a)]=[];[_0x1223cd(0x13d)];[_0x1223cd(0x13e)];constructor({connector:_0x5bb163,group:_0x2610df}){const _0x12d3f6=_0x1223cd;super(),this[_0x12d3f6(0x13d)]=_0x5bb163,this[_0x12d3f6(0x13e)]=_0x2610df;}async[_0x1223cd(0x131)](){const _0x2459c3=_0x1223cd;try{const _0x5c8d90=this[_0x2459c3(0x13d)][_0x2459c3(0x15c)](this[_0x2459c3(0x13e)]),_0x3400bd=await _0x5c8d90[_0x2459c3(0x150)]();this[_0x2459c3(0x159)](_0x3400bd);}catch(_0xbff5b2){this[_0x2459c3(0x140)](_0x2459c3(0x138),{'error':_0xbff5b2,'operation':_0x2459c3(0x131)});}}[_0x1223cd(0x15d)](_0x3804a2){const _0x5b04d6=_0x1223cd;this[_0x5b04d6(0x14a)][_0x5b04d6(0x147)](_0x3804a2);}async[_0x1223cd(0x139)](_0x47e87f){const _0x459bfa=_0x1223cd,_0x32d751=this[_0x459bfa(0x14a)][_0x459bfa(0x152)](_0x2a6efe=>_0x2a6efe['id']===_0x47e87f);if(-0x1===_0x32d751)return!0x1;try{return await this[_0x459bfa(0x13d)][_0x459bfa(0x15a)](_0x47e87f)[_0x459bfa(0x13a)](),this[_0x459bfa(0x14a)][_0x459bfa(0x149)](_0x32d751,0x1),this[_0x459bfa(0x140)](_0x459bfa(0x13f),{'itemId':_0x47e87f}),!0x0;}catch(_0x228031){return this[_0x459bfa(0x140)](_0x459bfa(0x138),{'error':_0x228031,'operation':_0x459bfa(0x139),'itemId':_0x47e87f}),!0x1;}}[_0x1223cd(0x134)](_0x181972){const _0x2e5c14=_0x1223cd;return this[_0x2e5c14(0x14a)][_0x2e5c14(0x12f)](_0x105ff4=>_0x105ff4['id']===_0x181972);}async[_0x1223cd(0x137)](_0xaf6812,_0x14cf2a){const _0x436f13=_0x1223cd,_0x40e8eb=this[_0x436f13(0x134)](_0xaf6812);if(!_0x40e8eb)return!0x1;try{return await this[_0x436f13(0x13d)][_0x436f13(0x13c)](_0xaf6812,{'title':_0x14cf2a})[_0x436f13(0x15b)](),_0x40e8eb[_0x436f13(0x135)](_0x14cf2a),this[_0x436f13(0x140)](_0x436f13(0x136),{'itemId':_0xaf6812,'updates':{'title':_0x14cf2a}}),!0x0;}catch(_0x534add){return this[_0x436f13(0x140)](_0x436f13(0x138),{'error':_0x534add,'operation':_0x436f13(0x137),'itemId':_0xaf6812}),!0x1;}}async[_0x1223cd(0x130)](_0x55ee65,_0x4674fc){const _0x4608f0=_0x1223cd,_0xae1d23=this[_0x4608f0(0x134)](_0x55ee65);if(!_0xae1d23)return!0x1;try{return await this[_0x4608f0(0x13d)][_0x4608f0(0x13c)](_0x55ee65,{'pinned':_0x4674fc})[_0x4608f0(0x15b)](),_0xae1d23[_0x4608f0(0x157)](_0x4674fc),this[_0x4608f0(0x140)](_0x4608f0(0x136),{'itemId':_0x55ee65,'updates':{'pinned':_0x4674fc}}),!0x0;}catch(_0x3821c8){return this[_0x4608f0(0x140)](_0x4608f0(0x138),{'error':_0x3821c8,'operation':_0x4608f0(0x130),'itemId':_0x55ee65}),!0x1;}}[_0x1223cd(0x159)](_0x295b4f){const _0x131f3f=_0x1223cd;try{this[_0x131f3f(0x14a)]=[],_0x295b4f[_0x131f3f(0x146)](_0x22effc=>{const _0x226597=_0x131f3f;this[_0x226597(0x15d)](new _0x33338f(_0x22effc));}),this[_0x131f3f(0x140)](_0x131f3f(0x132),{'items':[...this[_0x131f3f(0x14a)]]});}catch(_0x2b7da7){this[_0x131f3f(0x140)](_0x131f3f(0x138),{'error':_0x2b7da7,'operation':_0x131f3f(0x159)});}}[_0x1223cd(0x154)](_0x3ea7b8={}){const _0x223236=_0x1223cd,_0x1e2f51=void 0x0!==_0x3ea7b8[_0x223236(0x14e)]&&_0x3ea7b8[_0x223236(0x14e)],_0x3a09ec=_0x3ea7b8[_0x223236(0x151)]?new Date(_0x3ea7b8[_0x223236(0x151)][_0x223236(0x14f)](),_0x3ea7b8[_0x223236(0x151)][_0x223236(0x14d)](),_0x3ea7b8[_0x223236(0x151)][_0x223236(0x14c)]()):null,_0x1d07a3=_0x3ea7b8['to']?new Date(_0x3ea7b8['to'][_0x223236(0x14f)](),_0x3ea7b8['to'][_0x223236(0x14d)](),_0x3ea7b8['to'][_0x223236(0x14c)]()):null;return this[_0x223236(0x14a)][_0x223236(0x12e)](_0x4b1e9c=>{const _0x1e7ec5=_0x223236;if(_0x4b1e9c[_0x1e7ec5(0x14e)]!==_0x1e2f51)return!0x1;if(_0x1d07a3){const _0x5f3bbf=new Date(_0x4b1e9c[_0x1e7ec5(0x13b)][_0x1e7ec5(0x14f)](),_0x4b1e9c[_0x1e7ec5(0x13b)][_0x1e7ec5(0x14d)](),_0x4b1e9c[_0x1e7ec5(0x13b)][_0x1e7ec5(0x14c)]());return _0x3a09ec?_0x3a09ec[_0x1e7ec5(0x143)]()===_0x1d07a3[_0x1e7ec5(0x143)]()?_0x5f3bbf[_0x1e7ec5(0x143)]()===_0x3a09ec[_0x1e7ec5(0x143)]():_0x5f3bbf<_0x1d07a3&&_0x5f3bbf>=_0x3a09ec:_0x5f3bbf<_0x1d07a3;}return!0x0;});}}function _0x1117(_0x60a63c,_0x4032ce){const _0x4ed1a4=_0x4ed1();return _0x1117=function(_0x111796,_0x2f7d10){_0x111796=_0x111796-0x12e;let _0x405b51=_0x4ed1a4[_0x111796];return _0x405b51;},_0x1117(_0x60a63c,_0x4032ce);}function _0x4ed1(){const _0x3b78ea=['1098mIcnPB','splice','items','16jiZqOr','getDate','getMonth','pinned','getFullYear','getConversations','from','findIndex','10qPzGkz','getItems','9190cfdxun','23233441GLovxa','updatePinned','3898390SBpOQn','loadItems','deleteConversation','getResult','fetchConversations','addItem','filter','find','updateItemPinned','init','itemsLoaded','9btrfyQ','getItem','updateTitle','itemUpdated','updateItemTitle','error','removeItem','execute','createdAt','updateConversation','connector','group','itemRemoved','fire','173556aYmmaZ','984701gfFLhT','getTime','2769683mQhIMV','509325eYIjJI','map','push'];_0x4ed1=function(){return _0x3b78ea;};return _0x4ed1();}