@univerjs-pro/thread-comment-datasource 0.10.5 → 0.10.6-experimental.20250904-44da50e

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/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const _0x5bf54d=_0x59b2;(function(_0x16ab0f,_0x281691){const _0x28d030=_0x59b2,_0x1f91b4=_0x16ab0f();while(!![]){try{const _0x11e5da=-parseInt(_0x28d030(0xf8))/0x1+parseInt(_0x28d030(0xc6))/0x2+-parseInt(_0x28d030(0xc4))/0x3+-parseInt(_0x28d030(0xf9))/0x4+parseInt(_0x28d030(0xc0))/0x5*(-parseInt(_0x28d030(0xbe))/0x6)+-parseInt(_0x28d030(0xdb))/0x7*(parseInt(_0x28d030(0xd7))/0x8)+parseInt(_0x28d030(0xd2))/0x9*(parseInt(_0x28d030(0xd5))/0xa);if(_0x11e5da===_0x281691)break;else _0x1f91b4['push'](_0x1f91b4['shift']());}catch(_0x4fb416){_0x1f91b4['push'](_0x1f91b4['shift']());}}}(_0x59cd,0x311f2));Object[_0x5bf54d(0xea)](exports,Symbol[_0x5bf54d(0xc3)],{'value':_0x5bf54d(0xe1)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x5bf54d(0xed);var I=(_0x203a4f=>(_0x203a4f[_0x203a4f[_0x5bf54d(0x106)]=0x0]=_0x5bf54d(0x106),_0x203a4f[_0x203a4f['Solved']=0x1]=_0x5bf54d(0x110),_0x203a4f[_0x203a4f['UNRECOGNIZED']=-0x1]=_0x5bf54d(0xb9),_0x203a4f))(I||{}),v=(_0x46a195=>(_0x46a195[_0x46a195[_0x5bf54d(0xf2)]=0x0]=_0x5bf54d(0xf2),_0x46a195[_0x46a195['Add']=0x1]=_0x5bf54d(0x12e),_0x46a195[_0x46a195['Reply']=0x2]=_0x5bf54d(0x111),_0x46a195[_0x46a195[_0x5bf54d(0x121)]=0x3]=_0x5bf54d(0x121),_0x46a195[_0x46a195['Delete']=0x4]=_0x5bf54d(0xef),_0x46a195[_0x46a195['Solve']=0x5]=_0x5bf54d(0x12b),_0x46a195[_0x46a195[_0x5bf54d(0xb9)]=-0x1]=_0x5bf54d(0xb9),_0x46a195))(v||{});const f=_0x81a5dd=>c['dayjs'](new Date(+_0x81a5dd))[_0x5bf54d(0xd3)](_0x5bf54d(0xba)),R=async(_0x102eee,_0x141fa1)=>{const _0x109c46=_0x5bf54d,_0x40a430=_0x102eee[_0x109c46(0x125)](c['UserManagerService']),_0xa66843=_0x102eee[_0x109c46(0x125)](P[_0x109c46(0xff)]);_0x141fa1['forEach'](_0x364b2f=>{const _0x373572=_0x109c46;_0x40a430[_0x373572(0xdd)](_0x364b2f)&&_0x141fa1[_0x373572(0x12a)](_0x364b2f);}),_0x141fa1[_0x109c46(0xbd)]&&(await _0xa66843[_0x109c46(0x125)](_0x109c46(0x115),{'params':{'userIDs':[..._0x141fa1]}}))[_0x109c46(0xbc)][_0x109c46(0xce)]['forEach'](_0x59ba71=>{const _0x1e8fba=_0x109c46;_0x59ba71&&_0x40a430[_0x1e8fba(0xfc)](_0x59ba71);});};function _0x59b2(_0x231d39,_0x478d15){const _0x59cd80=_0x59cd();return _0x59b2=function(_0x59b257,_0x33e077){_0x59b257=_0x59b257-0xb9;let _0x3ffa1c=_0x59cd80[_0x59b257];return _0x3ffa1c;},_0x59b2(_0x231d39,_0x478d15);}var $=Object[_0x5bf54d(0xd9)],E=(_0x47db58,_0x45fc89,_0x5710eb,_0x18e7bf)=>{for(var _0x1f75af=_0x18e7bf>0x1?void 0x0:_0x18e7bf?$(_0x45fc89,_0x5710eb):_0x45fc89,_0x51538b=_0x47db58['length']-0x1,_0x56fce4;_0x51538b>=0x0;_0x51538b--)(_0x56fce4=_0x47db58[_0x51538b])&&(_0x1f75af=_0x56fce4(_0x1f75af)||_0x1f75af);return _0x1f75af;},S=(_0x489742,_0x4313e1)=>(_0x4434d9,_0x27acb6)=>_0x4313e1(_0x4434d9,_0x27acb6,_0x489742);function _0x59cd(){const _0x35701c=['_httpService','Delete','find','parse','Unknown','IConfigService','_userService','user','/delete','reply','213489AJReDZ','880336sWkLZX','Disposable','ThreadCommentModel','addUser','solved','threadId','HTTPService','/solved','_threadCommentDataSource','userId','dayjs','replyId','unitId','OpenOrReOpen','Plugin','subscribe','getComment','_injector','map','UniverLicensePlugin','userID','filter','ref','Solved','Reply','error','personId','code','/universer-api/user/list','/edit','deleteComment','values','saveCommentToSnapshot','/list','/universer-api/comment/unit/','UniverCollaborationClientPlugin','DependentOn','customRanges','UniverThreadCommentUIPlugin','Inject','Edit','_threadCommentModel','stringify','/reply','get','_sessionService','getCurrentUser','rangeType','CollaborationSessionService','delete','Solve','pluginName','parentId','Add','type','UniverThreadCommentDataSourcePlugin','replies','getUnit','UNRECOGNIZED','YYYY/MM/DD\x20HH:mm','UserManagerService','body','size','318uDTYDq','COMMENT','7565ZuQsuW','UNIVER_UNKNOWN','requireSession','toStringTag','1136115JLyHQe','disposeWithMe','86626XxUjby','createTimestamp','length','_initDataSource','add','resolveComment','slice','_config','users','content','symbol','/add','36333ZFzsXs','format','thread-comment-data-source.config','3340eTYbeZ','addComment','16EusKiu','listComments','getOwnPropertyDescriptor','commentUpdate$','1043007eKeTnq','comment','getUser','_init','CustomRangeType','_commentService','Module','rangeId','forEach','_threadCommentDataSourceService','post','updateComment','Injector','syncUpdateMutationToColla','getMemberID','defineProperty','root','_configService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN'];_0x59cd=function(){return _0x35701c;};return _0x59cd();}let _=class extends c[_0x5bf54d(0xfa)]{constructor(_0x4699d8,_0x32b01e,_0xc6dcbe,_0x22dc20){const _0xf9ca19=_0x5bf54d;super(),this[_0xf9ca19(0xe0)]=_0x4699d8,this[_0xf9ca19(0x122)]=_0x32b01e,this[_0xf9ca19(0xf4)]=_0xc6dcbe,this['_injector']=_0x22dc20,this[_0xf9ca19(0xde)](),this['_initUserSync']();}['_initUserSync'](){const _0x1f39d9=_0x5bf54d;this[_0x1f39d9(0xc5)](this[_0x1f39d9(0x122)][_0x1f39d9(0xda)]['pipe'](j['bufferTime'](0x10))[_0x1f39d9(0x108)](_0x376003=>{const _0x329f99=_0x1f39d9,_0xe5e5c3=new Set();_0x376003[_0x329f99(0xe3)](_0x746891=>{const _0x321b24=_0x329f99;switch(_0x746891[_0x321b24(0x12f)]){case'add':{const _0x4b15df=_0x746891['payload'][_0x321b24(0x113)];_0xe5e5c3[_0x321b24(0xca)](_0x4b15df);break;}}}),R(this[_0x329f99(0x10a)],_0xe5e5c3);}));}[_0x5bf54d(0xde)](){const _0x13ad38=_0x5bf54d;this['disposeWithMe'](this[_0x13ad38(0xe0)]['commentUpdate$'][_0x13ad38(0x108)](async _0x19fa40=>{const _0x1d6f38=_0x13ad38;var _0x98fc07,_0xb32506,_0x35ca34,_0x58c843;const _0x8f8b68=(_0x98fc07=this['_threadCommentModel']['getUnit'](_0x19fa40[_0x1d6f38(0x105)])[_0x1d6f38(0xf0)](_0x171883=>_0x171883[_0x1d6f38(0xfe)]===_0x19fa40[_0x1d6f38(0xfe)]))==null?void 0x0:_0x98fc07[_0x1d6f38(0xeb)];if(!_0x8f8b68)return;const {unitId:_0x400e9b,subUnitId:_0x4bc6c5}=_0x8f8b68;switch(_0x19fa40['user']&&this[_0x1d6f38(0xf4)][_0x1d6f38(0xfc)](_0x19fa40[_0x1d6f38(0xf5)]),_0x19fa40[_0x1d6f38(0x12f)]){case v[_0x1d6f38(0x12e)]:break;case v[_0x1d6f38(0x111)]:{this['_threadCommentModel'][_0x1d6f38(0xd6)](_0x400e9b,_0x4bc6c5,{'unitId':_0x400e9b,'subUnitId':_0x4bc6c5,'ref':'','id':_0x19fa40[_0x1d6f38(0x104)],'dT':f(+_0x19fa40[_0x1d6f38(0xc7)]),'threadId':_0x19fa40[_0x1d6f38(0xfe)],'personId':(_0x35ca34=(_0xb32506=_0x19fa40['user'])==null?void 0x0:_0xb32506[_0x1d6f38(0x10d)])!=null?_0x35ca34:_0x19fa40[_0x1d6f38(0x102)],'text':JSON[_0x1d6f38(0xf1)](_0x19fa40['content']),'parentId':_0x8f8b68['id']});break;}case v['Delete']:{const _0x509f97=this[_0x1d6f38(0x122)][_0x1d6f38(0x109)](_0x400e9b,_0x4bc6c5,_0x19fa40[_0x1d6f38(0x104)]);_0x509f97&&_0x509f97[_0x1d6f38(0x12d)]&&this[_0x1d6f38(0x122)][_0x1d6f38(0x117)](_0x400e9b,_0x4bc6c5,_0x19fa40[_0x1d6f38(0x104)]);break;}case v[_0x1d6f38(0x121)]:{this[_0x1d6f38(0x122)][_0x1d6f38(0xe6)](_0x400e9b,_0x4bc6c5,{'commentId':_0x19fa40[_0x1d6f38(0x104)],'text':JSON[_0x1d6f38(0xf1)](_0x19fa40[_0x1d6f38(0xcf)])});break;}case v[_0x1d6f38(0x12b)]:{const _0x3f8b76=(_0x58c843=this[_0x1d6f38(0x122)][_0x1d6f38(0x132)](_0x19fa40[_0x1d6f38(0x105)])[_0x1d6f38(0xf0)](_0x5569e2=>_0x5569e2['threadId']===_0x19fa40[_0x1d6f38(0xfe)]))==null?void 0x0:_0x58c843[_0x1d6f38(0xeb)];_0x3f8b76&&this['_threadCommentModel'][_0x1d6f38(0xcb)](_0x400e9b,_0x4bc6c5,_0x3f8b76['id'],_0x19fa40['solved']===I[_0x1d6f38(0x110)]);break;}}}));}};_=E([S(0x0,c['Inject'](b['CommentService'])),S(0x1,c['Inject'](M[_0x5bf54d(0xfb)])),S(0x2,c['Inject'](c[_0x5bf54d(0xbb)])),S(0x3,c[_0x5bf54d(0x120)](c[_0x5bf54d(0xe7)]))],_);const q=_0x5bf54d(0xd4),D={};var A=Object[_0x5bf54d(0xd9)],x=(_0x5561fb,_0x47b135,_0x4fe027,_0x80aabc)=>{const _0x4feafd=_0x5bf54d;for(var _0xe7a446=_0x80aabc>0x1?void 0x0:_0x80aabc?A(_0x47b135,_0x4fe027):_0x47b135,_0x1796ea=_0x5561fb[_0x4feafd(0xc8)]-0x1,_0x19c82d;_0x1796ea>=0x0;_0x1796ea--)(_0x19c82d=_0x5561fb[_0x1796ea])&&(_0xe7a446=_0x19c82d(_0xe7a446)||_0xe7a446);return _0xe7a446;},C=(_0x3468e9,_0x1b3438)=>(_0x21de7a,_0x3c2893)=>_0x1b3438(_0x21de7a,_0x3c2893,_0x3468e9);function Y(_0x206ec7,_0x4fc9e3){const _0x1b6a67=_0x5bf54d,_0x31c236=_0x206ec7[_0x1b6a67(0x131)][0x0];return{..._0x4fc9e3,'id':_0x31c236[_0x1b6a67(0x104)],'resolved':_0x206ec7[_0x1b6a67(0xfd)]===0x1,'dT':f(_0x31c236[_0x1b6a67(0xc7)]),'personId':_0x31c236[_0x1b6a67(0x102)],'threadId':_0x31c236[_0x1b6a67(0xfe)]};}function G(_0x27c0a0,_0x2e6c58,_0x549c9e){const _0x16fcba=_0x5bf54d;var _0x411d21,_0x2a4f5f;if(((_0x2a4f5f=(_0x411d21=_0x27c0a0==null?void 0x0:_0x27c0a0[_0x16fcba(0x131)])==null?void 0x0:_0x411d21[_0x16fcba(0xc8)])!=null?_0x2a4f5f:0x0)>0x0){const _0x340a6f=(_0xb0df88,_0x4267f2)=>({'id':_0xb0df88[_0x16fcba(0x104)],'threadId':_0xb0df88[_0x16fcba(0xfe)],'dT':f(_0xb0df88['createTimestamp']),'personId':_0xb0df88[_0x16fcba(0x102)],'resolved':_0x27c0a0[_0x16fcba(0xfd)]===I[_0x16fcba(0x110)],'unitId':_0x2e6c58,'subUnitId':_0x549c9e,'text':JSON[_0x16fcba(0xf1)](_0xb0df88['content']),'parentId':_0x4267f2}),_0x570d4f=_0x340a6f(_0x27c0a0[_0x16fcba(0x131)][0x0]);return{..._0x570d4f,'children':_0x27c0a0['replies'][_0x16fcba(0xcc)](0x1)['map'](_0x485f27=>_0x340a6f(_0x485f27,_0x570d4f['id']))};}return null;}let p=class{constructor(_0x25d174,_0x4e5c06,_0x10eebe){const _0x565cae=_0x5bf54d;this[_0x565cae(0xee)]=_0x25d174,this[_0x565cae(0xf4)]=_0x4e5c06,this[_0x565cae(0x126)]=_0x10eebe;}async['addComment'](_0x5966d6){const _0x27d55c=_0x5bf54d;var _0x45f2de,_0x492b7e;const {parentId:_0x778233,unitId:_0x41f4f1,text:_0x3912b6,threadId:_0x4e3cf0}=_0x5966d6,_0x32b591=(_0x492b7e=(_0x45f2de=_0x3912b6[_0x27d55c(0x11e)])==null?void 0x0:_0x45f2de[_0x27d55c(0x10e)](_0x1c905a=>_0x1c905a[_0x27d55c(0x128)]===c['CustomRangeType'][_0x27d55c(0xbf)])[_0x27d55c(0x10b)](_0x47b896=>_0x47b896[_0x27d55c(0xe2)]))!=null?_0x492b7e:[],_0x15cf1a=JSON[_0x27d55c(0x123)](_0x3912b6),_0x40b36a=(await this[_0x27d55c(0x126)][_0x27d55c(0xc2)](_0x41f4f1))['getMemberID']();if(_0x778233){const _0xebbd95={'memberId':_0x40b36a,'unitId':_0x41f4f1,'content':_0x15cf1a,'mention':_0x32b591,'threadId':_0x4e3cf0},_0x4d60af=(await this[_0x27d55c(0xee)][_0x27d55c(0xe5)](_0x27d55c(0x11b)+_0x41f4f1+_0x27d55c(0x124),{'body':_0xebbd95}))[_0x27d55c(0xbc)][_0x27d55c(0xf7)];return{..._0x5966d6,'id':_0x4d60af[_0x27d55c(0x104)],'dT':c[_0x27d55c(0x103)](+_0x4d60af['createTimestamp'])['format'](_0x27d55c(0xba)),'personId':_0x4d60af['userId']};}else{const _0x383c67={'memberId':_0x40b36a,'unitId':_0x41f4f1,'content':_0x15cf1a,'mention':_0x32b591},_0x1438a8=await this[_0x27d55c(0xee)][_0x27d55c(0xe5)]('/universer-api/comment/unit/'+_0x41f4f1+_0x27d55c(0xd1),{'body':_0x383c67});return Y(_0x1438a8['body'][_0x27d55c(0xdc)],_0x5966d6);}}async['updateComment'](_0x4835f0){const _0x8b3a0c=_0x5bf54d;var _0x4d9fc5,_0x3b2ec3;const {text:_0x1ad376,unitId:_0x10b331}=_0x4835f0,_0x265955=(_0x3b2ec3=(_0x4d9fc5=_0x1ad376[_0x8b3a0c(0x11e)])==null?void 0x0:_0x4d9fc5[_0x8b3a0c(0x10e)](_0x20238f=>_0x20238f[_0x8b3a0c(0x128)]===c[_0x8b3a0c(0xdf)][_0x8b3a0c(0xbf)])[_0x8b3a0c(0x10b)](_0x247c39=>_0x247c39[_0x8b3a0c(0xe2)]))!=null?_0x3b2ec3:[],_0x3f6ea4=JSON[_0x8b3a0c(0x123)](_0x1ad376),_0x20e0d1=_0x4835f0[_0x8b3a0c(0xfe)],_0x1d674d=_0x4835f0['id'],_0x4afc61={'memberId':(await this['_sessionService'][_0x8b3a0c(0xc2)](_0x10b331))[_0x8b3a0c(0xe9)](),'unitId':_0x10b331,'threadId':_0x20e0d1,'mention':_0x265955,'content':_0x3f6ea4,'replyId':_0x1d674d},_0x5788e0=await this[_0x8b3a0c(0xee)]['post'](_0x8b3a0c(0x11b)+_0x10b331+_0x8b3a0c(0x116),{'body':_0x4afc61});return!_0x5788e0[_0x8b3a0c(0xbc)][_0x8b3a0c(0x112)]||_0x5788e0['body'][_0x8b3a0c(0x112)][_0x8b3a0c(0x114)]===0x1;}async[_0x5bf54d(0xcb)](_0xcc55fe){const _0x567d80=_0x5bf54d,{unitId:_0x49aa01}=_0xcc55fe,_0x2a53ce=_0xcc55fe[_0x567d80(0xfe)],_0x34d61b={'memberId':this[_0x567d80(0xf4)][_0x567d80(0x127)]()['userID'],'unitId':_0x49aa01,'threadId':_0x2a53ce,'solved':_0xcc55fe['resolved']?I[_0x567d80(0x110)]:I[_0x567d80(0x106)]},_0x6d3239=await this[_0x567d80(0xee)][_0x567d80(0xe5)](_0x567d80(0x11b)+_0x49aa01+_0x567d80(0x100),{'body':_0x34d61b});return!_0x6d3239[_0x567d80(0xbc)]['error']||_0x6d3239[_0x567d80(0xbc)][_0x567d80(0x112)][_0x567d80(0x114)]===0x1;}async[_0x5bf54d(0x117)](_0x160e19,_0x3bc802,_0x40c0b6,_0x130c28){const _0x1b31ff=_0x5bf54d,_0x165e70={'memberId':(await this[_0x1b31ff(0x126)][_0x1b31ff(0xc2)](_0x160e19))['getMemberID'](),'threadId':_0x40c0b6,'replyId':_0x130c28,'unitId':_0x160e19},_0x51604a=await this[_0x1b31ff(0xee)][_0x1b31ff(0xe5)](_0x1b31ff(0x11b)+_0x160e19+_0x1b31ff(0xf6),{'body':_0x165e70});return!_0x51604a[_0x1b31ff(0xbc)][_0x1b31ff(0x112)]||_0x51604a[_0x1b31ff(0xbc)][_0x1b31ff(0x112)][_0x1b31ff(0x114)]===0x1;}async[_0x5bf54d(0xd8)](_0x24a7e0,_0xd4c277,_0x83ce54){const _0x3d9163=_0x5bf54d,_0x4b2e96={'unitId':_0x24a7e0,'threadId':_0x83ce54},_0x13ae4c=await this[_0x3d9163(0xee)][_0x3d9163(0xe5)](_0x3d9163(0x11b)+_0x24a7e0+_0x3d9163(0x11a),{'body':_0x4b2e96}),_0x5779c4=_0x83ce54[_0x3d9163(0x10b)](_0x4cd5cb=>G(_0x13ae4c[_0x3d9163(0xbc)]['comments'][_0x4cd5cb],_0x24a7e0,_0xd4c277))[_0x3d9163(0x10e)](Boolean);return Object[_0x3d9163(0x118)](_0x13ae4c[_0x3d9163(0xbc)][_0x3d9163(0xce)])['forEach'](_0xaa2531=>{const _0x4c9eeb=_0x3d9163;this['_userService'][_0x4c9eeb(0xfc)](_0xaa2531);}),_0x5779c4;}[_0x5bf54d(0x119)](_0x232651){const _0x1623b2=_0x5bf54d;return{'id':_0x232651['id'],'threadId':_0x232651[_0x1623b2(0xfe)],'ref':_0x232651[_0x1623b2(0x10f)]};}};p=x([C(0x0,c[_0x5bf54d(0x120)](P[_0x5bf54d(0xff)])),C(0x1,c[_0x5bf54d(0x120)](c[_0x5bf54d(0xbb)])),C(0x2,c[_0x5bf54d(0x120)](b[_0x5bf54d(0x129)]))],p);var H=Object['getOwnPropertyDescriptor'],J=(_0x2fc94f,_0x2e49c8,_0x100587,_0x848388)=>{const _0x9d5b71=_0x5bf54d;for(var _0x36a1e4=_0x848388>0x1?void 0x0:_0x848388?H(_0x2e49c8,_0x100587):_0x2e49c8,_0x2b14da=_0x2fc94f[_0x9d5b71(0xc8)]-0x1,_0x37c3fe;_0x2b14da>=0x0;_0x2b14da--)(_0x37c3fe=_0x2fc94f[_0x2b14da])&&(_0x36a1e4=_0x37c3fe(_0x36a1e4)||_0x36a1e4);return _0x36a1e4;},y=(_0xca43a9,_0x4fb7e3)=>(_0x54b248,_0x498f90)=>_0x4fb7e3(_0x54b248,_0x498f90,_0xca43a9);let g=class extends c[_0x5bf54d(0xfa)]{constructor(_0x2ebce6,_0x15ec3e){const _0x59e008=_0x5bf54d;super(),this[_0x59e008(0xe4)]=_0x2ebce6,this[_0x59e008(0x101)]=_0x15ec3e,this[_0x59e008(0xc9)]();}[_0x5bf54d(0xc9)](){const _0x2a2f7f=_0x5bf54d;this[_0x2a2f7f(0xe4)]['dataSource']=this[_0x2a2f7f(0x101)],this['_threadCommentDataSourceService'][_0x2a2f7f(0xe8)]=!0x1;}};g=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x5bf54d(0x120)](p))],g);var F=Object[_0x5bf54d(0xea)],L=Object[_0x5bf54d(0xd9)],Z=(_0x2fc9c9,_0x5e7cb3,_0x3fd35f)=>_0x5e7cb3 in _0x2fc9c9?F(_0x2fc9c9,_0x5e7cb3,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3fd35f}):_0x2fc9c9[_0x5e7cb3]=_0x3fd35f,W=(_0x5efcf6,_0x3dae20,_0x4d3b78,_0xb9bb12)=>{for(var _0x502209=_0xb9bb12>0x1?void 0x0:_0xb9bb12?L(_0x3dae20,_0x4d3b78):_0x3dae20,_0x46cd1e=_0x5efcf6['length']-0x1,_0x236a0b;_0x46cd1e>=0x0;_0x46cd1e--)(_0x236a0b=_0x5efcf6[_0x46cd1e])&&(_0x502209=_0x236a0b(_0x502209)||_0x502209);return _0x502209;},O=(_0x23df05,_0x5bf7d0)=>(_0x2e951a,_0x42ac5d)=>_0x5bf7d0(_0x2e951a,_0x42ac5d,_0x23df05),N=(_0x50211f,_0x4b087f,_0x5eb9fb)=>Z(_0x50211f,typeof _0x4b087f!=_0x5bf54d(0xd0)?_0x4b087f+'':_0x4b087f,_0x5eb9fb);exports[_0x5bf54d(0x130)]=class extends c[_0x5bf54d(0x107)]{constructor(_0x534cb6=D,_0x13f48f,_0x482c0c){const _0x2e4f3e=_0x5bf54d;super(),this[_0x2e4f3e(0xcd)]=_0x534cb6,this[_0x2e4f3e(0x10a)]=_0x13f48f,this[_0x2e4f3e(0xec)]=_0x482c0c;const {..._0x23c285}=c['merge']({},D,this[_0x2e4f3e(0xcd)]);this[_0x2e4f3e(0xec)]['setConfig'](q,_0x23c285);}['onStarting'](){const _0x2932c7=_0x5bf54d;[[p],[g],[_]][_0x2932c7(0xe3)](_0x178d9c=>{this['_injector']['add'](_0x178d9c);});}['onReady'](){const _0x3d7e3b=_0x5bf54d;this[_0x3d7e3b(0x10a)]['get'](g),this[_0x3d7e3b(0x10a)][_0x3d7e3b(0x125)](_);}},N(exports['UniverThreadCommentDataSourcePlugin'],_0x5bf54d(0x12c),U),N(exports[_0x5bf54d(0x130)],'type',c['UniverInstanceType'][_0x5bf54d(0xc1)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x5bf54d(0x11d)](w[_0x5bf54d(0x11f)],b[_0x5bf54d(0x11c)],T[_0x5bf54d(0x10c)]),O(0x1,c[_0x5bf54d(0x120)](c[_0x5bf54d(0xe7)])),O(0x2,c[_0x5bf54d(0xf3)])],exports['UniverThreadCommentDataSourcePlugin']);
1
+ 'use strict';const _0x17a923=_0x2b21;(function(_0x34adcc,_0x5c448c){const _0x4e2ba1=_0x2b21,_0x6b2c4d=_0x34adcc();while(!![]){try{const _0x55d976=parseInt(_0x4e2ba1(0x12a))/0x1+-parseInt(_0x4e2ba1(0x155))/0x2*(-parseInt(_0x4e2ba1(0x15c))/0x3)+-parseInt(_0x4e2ba1(0x115))/0x4*(-parseInt(_0x4e2ba1(0x140))/0x5)+-parseInt(_0x4e2ba1(0x13e))/0x6*(-parseInt(_0x4e2ba1(0x163))/0x7)+parseInt(_0x4e2ba1(0x11a))/0x8*(-parseInt(_0x4e2ba1(0x10c))/0x9)+-parseInt(_0x4e2ba1(0x14d))/0xa+parseInt(_0x4e2ba1(0x14c))/0xb*(parseInt(_0x4e2ba1(0x12f))/0xc);if(_0x55d976===_0x5c448c)break;else _0x6b2c4d['push'](_0x6b2c4d['shift']());}catch(_0x101255){_0x6b2c4d['push'](_0x6b2c4d['shift']());}}}(_0x3c61,0xef29c));Object[_0x17a923(0x13b)](exports,Symbol[_0x17a923(0x161)],{'value':'Module'});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x17a923(0x117);var I=(_0x18f18c=>(_0x18f18c[_0x18f18c['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x18f18c[_0x18f18c[_0x17a923(0x12d)]=0x1]=_0x17a923(0x12d),_0x18f18c[_0x18f18c[_0x17a923(0x157)]=-0x1]='UNRECOGNIZED',_0x18f18c))(I||{}),v=(_0x5359ca=>(_0x5359ca[_0x5359ca[_0x17a923(0x16d)]=0x0]=_0x17a923(0x16d),_0x5359ca[_0x5359ca['Add']=0x1]=_0x17a923(0x129),_0x5359ca[_0x5359ca[_0x17a923(0x158)]=0x2]=_0x17a923(0x158),_0x5359ca[_0x5359ca[_0x17a923(0x173)]=0x3]='Edit',_0x5359ca[_0x5359ca[_0x17a923(0x14f)]=0x4]='Delete',_0x5359ca[_0x5359ca['Solve']=0x5]='Solve',_0x5359ca[_0x5359ca['UNRECOGNIZED']=-0x1]=_0x17a923(0x157),_0x5359ca))(v||{});const f=_0x3e9827=>c['dayjs'](new Date(+_0x3e9827))['format']('YYYY/MM/DD\x20HH:mm'),R=async(_0x34bd6a,_0x10d434)=>{const _0x2f7c60=_0x17a923,_0x14be89=_0x34bd6a[_0x2f7c60(0x16b)](c[_0x2f7c60(0x141)]),_0x31c0e3=_0x34bd6a['get'](P[_0x2f7c60(0x126)]);_0x10d434[_0x2f7c60(0x14a)](_0x12da8f=>{const _0x2ca171=_0x2f7c60;_0x14be89[_0x2ca171(0x13f)](_0x12da8f)&&_0x10d434['delete'](_0x12da8f);}),_0x10d434[_0x2f7c60(0x160)]&&(await _0x31c0e3[_0x2f7c60(0x16b)]('/universer-api/user/list',{'params':{'userIDs':[..._0x10d434]}}))['body'][_0x2f7c60(0x110)][_0x2f7c60(0x14a)](_0x217bf7=>{const _0x5f39f2=_0x2f7c60;_0x217bf7&&_0x14be89[_0x5f39f2(0x162)](_0x217bf7);});};var $=Object[_0x17a923(0x120)],E=(_0xcd9ff5,_0x58b590,_0x55a2b6,_0x41cec4)=>{const _0x153d17=_0x17a923;for(var _0xad08ea=_0x41cec4>0x1?void 0x0:_0x41cec4?$(_0x58b590,_0x55a2b6):_0x58b590,_0x273a4c=_0xcd9ff5[_0x153d17(0x10b)]-0x1,_0x5010aa;_0x273a4c>=0x0;_0x273a4c--)(_0x5010aa=_0xcd9ff5[_0x273a4c])&&(_0xad08ea=_0x5010aa(_0xad08ea)||_0xad08ea);return _0xad08ea;},S=(_0x4d0986,_0x334c0f)=>(_0x37bdc2,_0x1d23ee)=>_0x334c0f(_0x37bdc2,_0x1d23ee,_0x4d0986);let _=class extends c['Disposable']{constructor(_0x4027a8,_0x5ec983,_0xf2570b,_0x35f1d8){const _0x5760b4=_0x17a923;super(),this['_commentService']=_0x4027a8,this[_0x5760b4(0x171)]=_0x5ec983,this[_0x5760b4(0x14b)]=_0xf2570b,this[_0x5760b4(0x156)]=_0x35f1d8,this['_init'](),this[_0x5760b4(0x154)]();}[_0x17a923(0x154)](){const _0x2b428c=_0x17a923;this[_0x2b428c(0x15e)](this[_0x2b428c(0x171)]['commentUpdate$']['pipe'](j[_0x2b428c(0x127)](0x10))[_0x2b428c(0x10f)](_0x16b060=>{const _0x5b6ddc=_0x2b428c,_0x4a99c6=new Set();_0x16b060[_0x5b6ddc(0x14a)](_0x2ea760=>{const _0x1dc34d=_0x5b6ddc;switch(_0x2ea760[_0x1dc34d(0x113)]){case _0x1dc34d(0x114):{const _0x1f6754=_0x2ea760['payload']['personId'];_0x4a99c6['add'](_0x1f6754);break;}}}),R(this[_0x5b6ddc(0x156)],_0x4a99c6);}));}[_0x17a923(0x106)](){const _0x4d9500=_0x17a923;this[_0x4d9500(0x15e)](this['_commentService'][_0x4d9500(0x11c)][_0x4d9500(0x10f)](async _0x53f952=>{const _0x505724=_0x4d9500;var _0x45f14a,_0x121590,_0x42e8,_0x3c2424;const _0x14e282=(_0x45f14a=this[_0x505724(0x171)][_0x505724(0x11f)](_0x53f952[_0x505724(0x111)])[_0x505724(0x13c)](_0x399f0e=>_0x399f0e[_0x505724(0x104)]===_0x53f952[_0x505724(0x104)]))==null?void 0x0:_0x45f14a[_0x505724(0x15a)];if(!_0x14e282)return;const {unitId:_0x54c24b,subUnitId:_0x564c16}=_0x14e282;switch(_0x53f952[_0x505724(0x122)]&&this[_0x505724(0x14b)][_0x505724(0x162)](_0x53f952['user']),_0x53f952['type']){case v[_0x505724(0x129)]:break;case v[_0x505724(0x158)]:{this[_0x505724(0x171)][_0x505724(0x144)](_0x54c24b,_0x564c16,{'unitId':_0x54c24b,'subUnitId':_0x564c16,'ref':'','id':_0x53f952[_0x505724(0x168)],'dT':f(+_0x53f952[_0x505724(0x12c)]),'threadId':_0x53f952[_0x505724(0x104)],'personId':(_0x42e8=(_0x121590=_0x53f952[_0x505724(0x122)])==null?void 0x0:_0x121590['userID'])!=null?_0x42e8:_0x53f952[_0x505724(0x13a)],'text':JSON[_0x505724(0x166)](_0x53f952['content']),'parentId':_0x14e282['id']});break;}case v[_0x505724(0x14f)]:{const _0x1a202d=this['_threadCommentModel'][_0x505724(0x124)](_0x54c24b,_0x564c16,_0x53f952[_0x505724(0x168)]);_0x1a202d&&_0x1a202d['parentId']&&this['_threadCommentModel'][_0x505724(0x138)](_0x54c24b,_0x564c16,_0x53f952[_0x505724(0x168)]);break;}case v['Edit']:{this[_0x505724(0x171)][_0x505724(0x152)](_0x54c24b,_0x564c16,{'commentId':_0x53f952['replyId'],'text':JSON['parse'](_0x53f952['content'])});break;}case v[_0x505724(0x118)]:{const _0x14a541=(_0x3c2424=this[_0x505724(0x171)]['getUnit'](_0x53f952[_0x505724(0x111)])[_0x505724(0x13c)](_0x216525=>_0x216525[_0x505724(0x104)]===_0x53f952[_0x505724(0x104)]))==null?void 0x0:_0x3c2424[_0x505724(0x15a)];_0x14a541&&this['_threadCommentModel'][_0x505724(0x135)](_0x54c24b,_0x564c16,_0x14a541['id'],_0x53f952['solved']===I['Solved']);break;}}}));}};function _0x2b21(_0x3e11ac,_0x55f48d){const _0x3c61fe=_0x3c61();return _0x2b21=function(_0x2b210f,_0x2223ba){_0x2b210f=_0x2b210f-0x103;let _0x4d3245=_0x3c61fe[_0x2b210f];return _0x4d3245;},_0x2b21(_0x3e11ac,_0x55f48d);}_=E([S(0x0,c[_0x17a923(0x146)](b[_0x17a923(0x131)])),S(0x1,c['Inject'](M['ThreadCommentModel'])),S(0x2,c['Inject'](c[_0x17a923(0x141)])),S(0x3,c[_0x17a923(0x146)](c[_0x17a923(0x172)]))],_);const q=_0x17a923(0x15d),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x218446,_0x47b898,_0x386e25,_0xb6c767)=>{const _0x26df0e=_0x17a923;for(var _0x38887f=_0xb6c767>0x1?void 0x0:_0xb6c767?A(_0x47b898,_0x386e25):_0x47b898,_0x3a9e8f=_0x218446[_0x26df0e(0x10b)]-0x1,_0x1538a8;_0x3a9e8f>=0x0;_0x3a9e8f--)(_0x1538a8=_0x218446[_0x3a9e8f])&&(_0x38887f=_0x1538a8(_0x38887f)||_0x38887f);return _0x38887f;},C=(_0x19ec36,_0xf14032)=>(_0x576b85,_0x4d8bd4)=>_0xf14032(_0x576b85,_0x4d8bd4,_0x19ec36);function Y(_0xa8f09b,_0x101a09){const _0xb6ee41=_0x17a923,_0x5dce35=_0xa8f09b[_0xb6ee41(0x112)][0x0];return{..._0x101a09,'id':_0x5dce35[_0xb6ee41(0x168)],'resolved':_0xa8f09b[_0xb6ee41(0x176)]===0x1,'dT':f(_0x5dce35[_0xb6ee41(0x12c)]),'personId':_0x5dce35[_0xb6ee41(0x13a)],'threadId':_0x5dce35[_0xb6ee41(0x104)]};}function _0x3c61(){const _0x4a6156=['13816hQYCum','13857900kuLGlr','stringify','Delete','/reply','UniverInstanceType','updateComment','Plugin','_initUserSync','38TDkNXz','_injector','UNRECOGNIZED','Reply','UNIVER_UNKNOWN','root','_configService','201981bkpZgw','thread-comment-data-source.config','disposeWithMe','rangeId','size','toStringTag','addUser','70cdvpiT','comments','Disposable','parse','YYYY/MM/DD\x20HH:mm','replyId','_sessionService','IThreadCommentDataSourceService','get','/list','Unknown','saveCommentToSnapshot','body','_httpService','_threadCommentModel','Injector','Edit','dataSource','_config','solved','rangeType','threadId','content','_init','merge','DependentOn','/add','_threadCommentDataSourceService','length','9JdgcLs','code','post','subscribe','users','unitId','replies','type','add','328156GFpXwN','_threadCommentDataSource','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Solve','IConfigService','8419816GfSxwA','symbol','commentUpdate$','userID','error','getUnit','getOwnPropertyDescriptor','getMemberID','user','UniverLicensePlugin','getComment','customRanges','HTTPService','bufferTime','UniverThreadCommentDataSourcePlugin','Add','352391fEcEQi','pluginName','createTimestamp','Solved','reply','24thGrKM','ref','CommentService','map','_initDataSource','UniverThreadCommentUIPlugin','resolveComment','onReady','requireSession','deleteComment','dayjs','userId','defineProperty','find','CollaborationSessionService','725694BAtvjx','getUser','35pWctbj','UserManagerService','/universer-api/comment/unit/','resolved','addComment','CustomRangeType','Inject','/edit','/delete','onStarting','forEach','_userService'];_0x3c61=function(){return _0x4a6156;};return _0x3c61();}function G(_0x441e15,_0x2dbc1e,_0x26e267){const _0x26157e=_0x17a923;var _0x147927,_0x52edcb;if(((_0x52edcb=(_0x147927=_0x441e15==null?void 0x0:_0x441e15['replies'])==null?void 0x0:_0x147927[_0x26157e(0x10b)])!=null?_0x52edcb:0x0)>0x0){const _0x52a144=(_0x49ab74,_0x1863c5)=>({'id':_0x49ab74[_0x26157e(0x168)],'threadId':_0x49ab74[_0x26157e(0x104)],'dT':f(_0x49ab74[_0x26157e(0x12c)]),'personId':_0x49ab74[_0x26157e(0x13a)],'resolved':_0x441e15['solved']===I['Solved'],'unitId':_0x2dbc1e,'subUnitId':_0x26e267,'text':JSON[_0x26157e(0x166)](_0x49ab74[_0x26157e(0x105)]),'parentId':_0x1863c5}),_0x531229=_0x52a144(_0x441e15['replies'][0x0]);return{..._0x531229,'children':_0x441e15[_0x26157e(0x112)]['slice'](0x1)[_0x26157e(0x132)](_0x47b7f8=>_0x52a144(_0x47b7f8,_0x531229['id']))};}return null;}let p=class{constructor(_0x3a6e3c,_0x3a561e,_0x7a6695){const _0x53d7b6=_0x17a923;this[_0x53d7b6(0x170)]=_0x3a6e3c,this[_0x53d7b6(0x14b)]=_0x3a561e,this[_0x53d7b6(0x169)]=_0x7a6695;}async['addComment'](_0x4f381b){const _0x4c5ddf=_0x17a923;var _0x131b95,_0x218ce0;const {parentId:_0x2e93e0,unitId:_0x23648a,text:_0x173ecb,threadId:_0x3bceb8}=_0x4f381b,_0x29193d=(_0x218ce0=(_0x131b95=_0x173ecb[_0x4c5ddf(0x125)])==null?void 0x0:_0x131b95['filter'](_0x3427dc=>_0x3427dc[_0x4c5ddf(0x103)]===c[_0x4c5ddf(0x145)]['COMMENT'])[_0x4c5ddf(0x132)](_0x12756d=>_0x12756d[_0x4c5ddf(0x15f)]))!=null?_0x218ce0:[],_0x5a9573=JSON[_0x4c5ddf(0x14e)](_0x173ecb),_0x5d0995=(await this[_0x4c5ddf(0x169)][_0x4c5ddf(0x137)](_0x23648a))[_0x4c5ddf(0x121)]();if(_0x2e93e0){const _0x5053e8={'memberId':_0x5d0995,'unitId':_0x23648a,'content':_0x5a9573,'mention':_0x29193d,'threadId':_0x3bceb8},_0x157261=(await this['_httpService']['post'](_0x4c5ddf(0x142)+_0x23648a+_0x4c5ddf(0x150),{'body':_0x5053e8}))[_0x4c5ddf(0x16f)][_0x4c5ddf(0x12e)];return{..._0x4f381b,'id':_0x157261['replyId'],'dT':c[_0x4c5ddf(0x139)](+_0x157261[_0x4c5ddf(0x12c)])['format'](_0x4c5ddf(0x167)),'personId':_0x157261[_0x4c5ddf(0x13a)]};}else{const _0x438407={'memberId':_0x5d0995,'unitId':_0x23648a,'content':_0x5a9573,'mention':_0x29193d},_0x4ff5c9=await this[_0x4c5ddf(0x170)][_0x4c5ddf(0x10e)](_0x4c5ddf(0x142)+_0x23648a+_0x4c5ddf(0x109),{'body':_0x438407});return Y(_0x4ff5c9[_0x4c5ddf(0x16f)]['comment'],_0x4f381b);}}async['updateComment'](_0x42a355){const _0x36b857=_0x17a923;var _0x1cd2ec,_0x5bc58a;const {text:_0x2e8d36,unitId:_0x5e644d}=_0x42a355,_0x3ac67e=(_0x5bc58a=(_0x1cd2ec=_0x2e8d36['customRanges'])==null?void 0x0:_0x1cd2ec['filter'](_0x30c58c=>_0x30c58c[_0x36b857(0x103)]===c[_0x36b857(0x145)]['COMMENT'])[_0x36b857(0x132)](_0x1a425b=>_0x1a425b['rangeId']))!=null?_0x5bc58a:[],_0x5270c1=JSON[_0x36b857(0x14e)](_0x2e8d36),_0x559e62=_0x42a355[_0x36b857(0x104)],_0x1ebea2=_0x42a355['id'],_0x4e8089={'memberId':(await this[_0x36b857(0x169)][_0x36b857(0x137)](_0x5e644d))[_0x36b857(0x121)](),'unitId':_0x5e644d,'threadId':_0x559e62,'mention':_0x3ac67e,'content':_0x5270c1,'replyId':_0x1ebea2},_0xe65926=await this['_httpService'][_0x36b857(0x10e)](_0x36b857(0x142)+_0x5e644d+_0x36b857(0x147),{'body':_0x4e8089});return!_0xe65926[_0x36b857(0x16f)][_0x36b857(0x11e)]||_0xe65926['body']['error'][_0x36b857(0x10d)]===0x1;}async['resolveComment'](_0x2bc4ad){const _0x120ec7=_0x17a923,{unitId:_0x520e33}=_0x2bc4ad,_0x29c7a3=_0x2bc4ad[_0x120ec7(0x104)],_0x5b4807={'memberId':this[_0x120ec7(0x14b)]['getCurrentUser']()[_0x120ec7(0x11d)],'unitId':_0x520e33,'threadId':_0x29c7a3,'solved':_0x2bc4ad[_0x120ec7(0x143)]?I['Solved']:I['OpenOrReOpen']},_0x516a9b=await this[_0x120ec7(0x170)][_0x120ec7(0x10e)](_0x120ec7(0x142)+_0x520e33+'/solved',{'body':_0x5b4807});return!_0x516a9b[_0x120ec7(0x16f)][_0x120ec7(0x11e)]||_0x516a9b[_0x120ec7(0x16f)][_0x120ec7(0x11e)][_0x120ec7(0x10d)]===0x1;}async[_0x17a923(0x138)](_0x1090a9,_0x396280,_0x412a0f,_0x1794ed){const _0x386bec=_0x17a923,_0x5be71e={'memberId':(await this[_0x386bec(0x169)][_0x386bec(0x137)](_0x1090a9))[_0x386bec(0x121)](),'threadId':_0x412a0f,'replyId':_0x1794ed,'unitId':_0x1090a9},_0x4d049e=await this['_httpService'][_0x386bec(0x10e)]('/universer-api/comment/unit/'+_0x1090a9+_0x386bec(0x148),{'body':_0x5be71e});return!_0x4d049e['body'][_0x386bec(0x11e)]||_0x4d049e[_0x386bec(0x16f)][_0x386bec(0x11e)][_0x386bec(0x10d)]===0x1;}async['listComments'](_0x36f0e9,_0x20b7b5,_0x57bccc){const _0x4efeec=_0x17a923,_0x555483={'unitId':_0x36f0e9,'threadId':_0x57bccc},_0x3ade1a=await this[_0x4efeec(0x170)][_0x4efeec(0x10e)](_0x4efeec(0x142)+_0x36f0e9+_0x4efeec(0x16c),{'body':_0x555483}),_0x1319f7=_0x57bccc[_0x4efeec(0x132)](_0x19e61b=>G(_0x3ade1a[_0x4efeec(0x16f)][_0x4efeec(0x164)][_0x19e61b],_0x36f0e9,_0x20b7b5))['filter'](Boolean);return Object['values'](_0x3ade1a[_0x4efeec(0x16f)][_0x4efeec(0x110)])[_0x4efeec(0x14a)](_0x21e268=>{const _0x6dfe0d=_0x4efeec;this[_0x6dfe0d(0x14b)][_0x6dfe0d(0x162)](_0x21e268);}),_0x1319f7;}[_0x17a923(0x16e)](_0x19a613){const _0x280c6a=_0x17a923;return{'id':_0x19a613['id'],'threadId':_0x19a613[_0x280c6a(0x104)],'ref':_0x19a613[_0x280c6a(0x130)]};}};p=x([C(0x0,c[_0x17a923(0x146)](P[_0x17a923(0x126)])),C(0x1,c['Inject'](c['UserManagerService'])),C(0x2,c[_0x17a923(0x146)](b[_0x17a923(0x13d)]))],p);var H=Object[_0x17a923(0x120)],J=(_0x441ca4,_0x48b653,_0x1ba51b,_0x311cd8)=>{const _0x74639=_0x17a923;for(var _0x4276b0=_0x311cd8>0x1?void 0x0:_0x311cd8?H(_0x48b653,_0x1ba51b):_0x48b653,_0x3a10bf=_0x441ca4[_0x74639(0x10b)]-0x1,_0x3eb6c9;_0x3a10bf>=0x0;_0x3a10bf--)(_0x3eb6c9=_0x441ca4[_0x3a10bf])&&(_0x4276b0=_0x3eb6c9(_0x4276b0)||_0x4276b0);return _0x4276b0;},y=(_0x3ccfa5,_0xe8e50a)=>(_0x568843,_0x154e41)=>_0xe8e50a(_0x568843,_0x154e41,_0x3ccfa5);let g=class extends c[_0x17a923(0x165)]{constructor(_0x454a79,_0x3e05a1){const _0x4728df=_0x17a923;super(),this[_0x4728df(0x10a)]=_0x454a79,this[_0x4728df(0x116)]=_0x3e05a1,this[_0x4728df(0x133)]();}[_0x17a923(0x133)](){const _0x272598=_0x17a923;this[_0x272598(0x10a)][_0x272598(0x174)]=this['_threadCommentDataSource'],this[_0x272598(0x10a)]['syncUpdateMutationToColla']=!0x1;}};g=J([y(0x0,M[_0x17a923(0x16a)]),y(0x1,c[_0x17a923(0x146)](p))],g);var F=Object[_0x17a923(0x13b)],L=Object[_0x17a923(0x120)],Z=(_0x4ddd5e,_0x750d1d,_0x1e2e57)=>_0x750d1d in _0x4ddd5e?F(_0x4ddd5e,_0x750d1d,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1e2e57}):_0x4ddd5e[_0x750d1d]=_0x1e2e57,W=(_0x346d76,_0xd3a366,_0x75df50,_0x5cac40)=>{const _0x125517=_0x17a923;for(var _0x4dbe9d=_0x5cac40>0x1?void 0x0:_0x5cac40?L(_0xd3a366,_0x75df50):_0xd3a366,_0x5a535c=_0x346d76[_0x125517(0x10b)]-0x1,_0xa7820f;_0x5a535c>=0x0;_0x5a535c--)(_0xa7820f=_0x346d76[_0x5a535c])&&(_0x4dbe9d=_0xa7820f(_0x4dbe9d)||_0x4dbe9d);return _0x4dbe9d;},O=(_0x252342,_0x4e3c98)=>(_0x18ed69,_0x3a873e)=>_0x4e3c98(_0x18ed69,_0x3a873e,_0x252342),N=(_0x9b5a4a,_0x55e311,_0x14d3c0)=>Z(_0x9b5a4a,typeof _0x55e311!=_0x17a923(0x11b)?_0x55e311+'':_0x55e311,_0x14d3c0);exports[_0x17a923(0x128)]=class extends c[_0x17a923(0x153)]{constructor(_0x1a2e16=D,_0x305f63,_0x15eb23){const _0x10a61c=_0x17a923;super(),this[_0x10a61c(0x175)]=_0x1a2e16,this[_0x10a61c(0x156)]=_0x305f63,this[_0x10a61c(0x15b)]=_0x15eb23;const {..._0x124255}=c[_0x10a61c(0x107)]({},D,this[_0x10a61c(0x175)]);this[_0x10a61c(0x15b)]['setConfig'](q,_0x124255);}[_0x17a923(0x149)](){const _0x989aa3=_0x17a923;[[p],[g],[_]][_0x989aa3(0x14a)](_0x4bc35a=>{this['_injector']['add'](_0x4bc35a);});}[_0x17a923(0x136)](){const _0x4265ee=_0x17a923;this['_injector'][_0x4265ee(0x16b)](g),this[_0x4265ee(0x156)][_0x4265ee(0x16b)](_);}},N(exports[_0x17a923(0x128)],_0x17a923(0x12b),U),N(exports[_0x17a923(0x128)],_0x17a923(0x113),c[_0x17a923(0x151)][_0x17a923(0x159)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x17a923(0x108)](w[_0x17a923(0x134)],b['UniverCollaborationClientPlugin'],T[_0x17a923(0x123)]),O(0x1,c[_0x17a923(0x146)](c[_0x17a923(0x172)])),O(0x2,c[_0x17a923(0x119)])],exports[_0x17a923(0x128)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x5cf493=_0x30fe;(function(_0x266077,_0x647e33){const _0x4d3d03=_0x30fe,_0x3b0d8c=_0x266077();while(!![]){try{const _0x2a8050=parseInt(_0x4d3d03(0x191))/0x1+parseInt(_0x4d3d03(0x18d))/0x2+-parseInt(_0x4d3d03(0x1aa))/0x3*(-parseInt(_0x4d3d03(0x1b5))/0x4)+parseInt(_0x4d3d03(0x185))/0x5+-parseInt(_0x4d3d03(0x19e))/0x6+-parseInt(_0x4d3d03(0x1a0))/0x7+parseInt(_0x4d3d03(0x1c3))/0x8*(-parseInt(_0x4d3d03(0x1c2))/0x9);if(_0x2a8050===_0x647e33)break;else _0x3b0d8c['push'](_0x3b0d8c['shift']());}catch(_0x3f02c6){_0x3b0d8c['push'](_0x3b0d8c['shift']());}}}(_0x44e4,0xd412c));import{CommentService as _0x11cf3a,CollaborationSessionService as _0x1dd800,UniverCollaborationClientPlugin as _0x11c3a8}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1c715f}from'@univerjs-pro/license';import{dayjs as _0x243e5e,UserManagerService as _0x38a066,Inject as _0x38eaf9,Injector as _0x441a4f,Disposable as _0x5b2137,CustomRangeType as _0x512e3e,UniverInstanceType as _0x39fe04,DependentOn as _0x45af73,IConfigService as _0x58e505,Plugin as _0x4810b6,merge as _0x190b26}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x338aee}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x49dc2a,IThreadCommentDataSourceService as _0x410ff5}from'@univerjs/thread-comment';function _0x44e4(){const _0x257666=['_sessionService','defineProperty','ref','setConfig','getUnit','getComment','disposeWithMe','onReady','find','_threadCommentDataSource','post','/reply','rangeId','add','syncUpdateMutationToColla','userId','/edit','commentUpdate$','replyId','addUser','Solved','7204960haRvJX','OpenOrReOpen','_commentService','error','user','_threadCommentDataSourceService','/list','saveCommentToSnapshot','3109774DAhlrC','unitId','getMemberID','getUser','758388Dimkqe','Unknown','map','/add','_config','stringify','values','Add','format','rangeType','_injector','createTimestamp','replies','8773524HrZBqt','userID','5630107uRtDiU','threadId','size','filter','/solved','updateComment','Solve','_init','type','body','2813721lQpCNo','forEach','get','Delete','pipe','COMMENT','resolved','UNRECOGNIZED','customRanges','UNIVER_UNKNOWN','subscribe','4QSVnOe','slice','comment','comments','parentId','addComment','users','_threadCommentModel','Edit','parse','personId','getOwnPropertyDescriptor','length','9HKqpcS','12455736jZYerc','_userService','solved','/universer-api/comment/unit/','_initDataSource','resolveComment','_httpService','requireSession','code','root','deleteComment','Reply','content','YYYY/MM/DD\x20HH:mm','/universer-api/user/list','pluginName'];_0x44e4=function(){return _0x257666;};return _0x44e4();}import{bufferTime as _0x1e0753}from'rxjs';import{HTTPService as _0x45151c}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x5dac0e=>(_0x5dac0e[_0x5dac0e[_0x5cf493(0x186)]=0x0]=_0x5cf493(0x186),_0x5dac0e[_0x5dac0e[_0x5cf493(0x184)]=0x1]='Solved',_0x5dac0e[_0x5dac0e[_0x5cf493(0x1b1)]=-0x1]='UNRECOGNIZED',_0x5dac0e))(I||{}),v=(_0x379224=>(_0x379224[_0x379224[_0x5cf493(0x192)]=0x0]='Unknown',_0x379224[_0x379224[_0x5cf493(0x198)]=0x1]=_0x5cf493(0x198),_0x379224[_0x379224[_0x5cf493(0x1ce)]=0x2]=_0x5cf493(0x1ce),_0x379224[_0x379224[_0x5cf493(0x1bd)]=0x3]='Edit',_0x379224[_0x379224[_0x5cf493(0x1ad)]=0x4]=_0x5cf493(0x1ad),_0x379224[_0x379224[_0x5cf493(0x1a6)]=0x5]=_0x5cf493(0x1a6),_0x379224[_0x379224[_0x5cf493(0x1b1)]=-0x1]='UNRECOGNIZED',_0x379224))(v||{});const y=_0xcafa98=>_0x243e5e(new Date(+_0xcafa98))['format'](_0x5cf493(0x1d0)),B=async(_0x159eeb,_0x5af047)=>{const _0x39c960=_0x5cf493,_0x5f009a=_0x159eeb[_0x39c960(0x1ac)](_0x38a066),_0x15dfee=_0x159eeb['get'](_0x45151c);_0x5af047[_0x39c960(0x1ab)](_0x2193d9=>{const _0x4b57f4=_0x39c960;_0x5f009a[_0x4b57f4(0x190)](_0x2193d9)&&_0x5af047['delete'](_0x2193d9);}),_0x5af047[_0x39c960(0x1a2)]&&(await _0x15dfee[_0x39c960(0x1ac)](_0x39c960(0x1d1),{'params':{'userIDs':[..._0x5af047]}}))[_0x39c960(0x1a9)][_0x39c960(0x1bb)]['forEach'](_0x229654=>{const _0x1a13d1=_0x39c960;_0x229654&&_0x5f009a[_0x1a13d1(0x183)](_0x229654);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x3a2940,_0xda7fd1,_0x52959d,_0x4bee49)=>{const _0x3d218f=_0x5cf493;for(var _0x347075=_0x4bee49>0x1?void 0x0:_0x4bee49?K(_0xda7fd1,_0x52959d):_0xda7fd1,_0x5d40ca=_0x3a2940[_0x3d218f(0x1c1)]-0x1,_0x49d6f0;_0x5d40ca>=0x0;_0x5d40ca--)(_0x49d6f0=_0x3a2940[_0x5d40ca])&&(_0x347075=_0x49d6f0(_0x347075)||_0x347075);return _0x347075;},p=(_0x4a4942,_0x540efb)=>(_0x4258d3,_0x3cc4e7)=>_0x540efb(_0x4258d3,_0x3cc4e7,_0x4a4942);let _=class extends _0x5b2137{constructor(_0x4b04d2,_0xd0c488,_0x277951,_0x30550d){const _0x309dcc=_0x5cf493;super(),this[_0x309dcc(0x187)]=_0x4b04d2,this[_0x309dcc(0x1bc)]=_0xd0c488,this[_0x309dcc(0x1c4)]=_0x277951,this[_0x309dcc(0x19b)]=_0x30550d,this[_0x309dcc(0x1a7)](),this['_initUserSync']();}['_initUserSync'](){const _0x3de209=_0x5cf493;this[_0x3de209(0x1d9)](this[_0x3de209(0x1bc)][_0x3de209(0x181)][_0x3de209(0x1ae)](_0x1e0753(0x10))[_0x3de209(0x1b4)](_0x54f43b=>{const _0xaf60a8=_0x3de209,_0x36babf=new Set();_0x54f43b['forEach'](_0x3c853b=>{const _0x4636cc=_0x30fe;switch(_0x3c853b['type']){case _0x4636cc(0x1e0):{const _0x5e26ee=_0x3c853b['payload'][_0x4636cc(0x1bf)];_0x36babf['add'](_0x5e26ee);break;}}}),B(this[_0xaf60a8(0x19b)],_0x36babf);}));}[_0x5cf493(0x1a7)](){const _0xe4034d=_0x5cf493;this[_0xe4034d(0x1d9)](this[_0xe4034d(0x187)][_0xe4034d(0x181)][_0xe4034d(0x1b4)](async _0x19e72a=>{const _0x40de7b=_0xe4034d;var _0x4009d6,_0x1f5826,_0x4a6f45,_0x59f6a0;const _0x188fc2=(_0x4009d6=this[_0x40de7b(0x1bc)][_0x40de7b(0x1d7)](_0x19e72a['unitId'])[_0x40de7b(0x1db)](_0x139775=>_0x139775['threadId']===_0x19e72a[_0x40de7b(0x1a1)]))==null?void 0x0:_0x4009d6[_0x40de7b(0x1cc)];if(!_0x188fc2)return;const {unitId:_0x207f87,subUnitId:_0x1d032b}=_0x188fc2;switch(_0x19e72a[_0x40de7b(0x189)]&&this[_0x40de7b(0x1c4)][_0x40de7b(0x183)](_0x19e72a['user']),_0x19e72a[_0x40de7b(0x1a8)]){case v[_0x40de7b(0x198)]:break;case v[_0x40de7b(0x1ce)]:{this['_threadCommentModel'][_0x40de7b(0x1ba)](_0x207f87,_0x1d032b,{'unitId':_0x207f87,'subUnitId':_0x1d032b,'ref':'','id':_0x19e72a[_0x40de7b(0x182)],'dT':y(+_0x19e72a[_0x40de7b(0x19c)]),'threadId':_0x19e72a[_0x40de7b(0x1a1)],'personId':(_0x4a6f45=(_0x1f5826=_0x19e72a[_0x40de7b(0x189)])==null?void 0x0:_0x1f5826[_0x40de7b(0x19f)])!=null?_0x4a6f45:_0x19e72a[_0x40de7b(0x1e2)],'text':JSON[_0x40de7b(0x1be)](_0x19e72a[_0x40de7b(0x1cf)]),'parentId':_0x188fc2['id']});break;}case v[_0x40de7b(0x1ad)]:{const _0x1f0f3a=this[_0x40de7b(0x1bc)][_0x40de7b(0x1d8)](_0x207f87,_0x1d032b,_0x19e72a[_0x40de7b(0x182)]);_0x1f0f3a&&_0x1f0f3a[_0x40de7b(0x1b9)]&&this[_0x40de7b(0x1bc)][_0x40de7b(0x1cd)](_0x207f87,_0x1d032b,_0x19e72a[_0x40de7b(0x182)]);break;}case v[_0x40de7b(0x1bd)]:{this['_threadCommentModel'][_0x40de7b(0x1a5)](_0x207f87,_0x1d032b,{'commentId':_0x19e72a[_0x40de7b(0x182)],'text':JSON['parse'](_0x19e72a[_0x40de7b(0x1cf)])});break;}case v[_0x40de7b(0x1a6)]:{const _0x279b78=(_0x59f6a0=this['_threadCommentModel'][_0x40de7b(0x1d7)](_0x19e72a[_0x40de7b(0x18e)])[_0x40de7b(0x1db)](_0x3a3750=>_0x3a3750['threadId']===_0x19e72a[_0x40de7b(0x1a1)]))==null?void 0x0:_0x59f6a0[_0x40de7b(0x1cc)];_0x279b78&&this[_0x40de7b(0x1bc)][_0x40de7b(0x1c8)](_0x207f87,_0x1d032b,_0x279b78['id'],_0x19e72a[_0x40de7b(0x1c5)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x38eaf9(_0x11cf3a)),p(0x1,_0x38eaf9(_0x49dc2a)),p(0x2,_0x38eaf9(_0x38a066)),p(0x3,_0x38eaf9(_0x441a4f))],_);const z='thread-comment-data-source.config',O={};var k=Object[_0x5cf493(0x1c0)],Q=(_0x5785b9,_0x38e50f,_0xe4a653,_0x553775)=>{const _0x3aba7d=_0x5cf493;for(var _0x15b12e=_0x553775>0x1?void 0x0:_0x553775?k(_0x38e50f,_0xe4a653):_0x38e50f,_0x5d7298=_0x5785b9[_0x3aba7d(0x1c1)]-0x1,_0x5ef502;_0x5d7298>=0x0;_0x5d7298--)(_0x5ef502=_0x5785b9[_0x5d7298])&&(_0x15b12e=_0x5ef502(_0x15b12e)||_0x15b12e);return _0x15b12e;},b=(_0x28b6cd,_0x36e2cf)=>(_0x2c6030,_0x5e1f7c)=>_0x36e2cf(_0x2c6030,_0x5e1f7c,_0x28b6cd);function _0x30fe(_0x13a02c,_0x5d4466){const _0x44e44c=_0x44e4();return _0x30fe=function(_0x30fea5,_0x15e992){_0x30fea5=_0x30fea5-0x180;let _0x56a1e8=_0x44e44c[_0x30fea5];return _0x56a1e8;},_0x30fe(_0x13a02c,_0x5d4466);}function X(_0x5b0494,_0x41587e){const _0x51d25d=_0x5cf493,_0x5df8c5=_0x5b0494[_0x51d25d(0x19d)][0x0];return{..._0x41587e,'id':_0x5df8c5[_0x51d25d(0x182)],'resolved':_0x5b0494[_0x51d25d(0x1c5)]===0x1,'dT':y(_0x5df8c5['createTimestamp']),'personId':_0x5df8c5[_0x51d25d(0x1e2)],'threadId':_0x5df8c5[_0x51d25d(0x1a1)]};}function ee(_0x4b4c9f,_0x11e9ac,_0x321768){const _0x5d75e1=_0x5cf493;var _0x14a91d,_0xc77e90;if(((_0xc77e90=(_0x14a91d=_0x4b4c9f==null?void 0x0:_0x4b4c9f[_0x5d75e1(0x19d)])==null?void 0x0:_0x14a91d[_0x5d75e1(0x1c1)])!=null?_0xc77e90:0x0)>0x0){const _0x58d1e5=(_0x2de3f9,_0x25a553)=>({'id':_0x2de3f9[_0x5d75e1(0x182)],'threadId':_0x2de3f9[_0x5d75e1(0x1a1)],'dT':y(_0x2de3f9[_0x5d75e1(0x19c)]),'personId':_0x2de3f9['userId'],'resolved':_0x4b4c9f[_0x5d75e1(0x1c5)]===I['Solved'],'unitId':_0x11e9ac,'subUnitId':_0x321768,'text':JSON[_0x5d75e1(0x1be)](_0x2de3f9[_0x5d75e1(0x1cf)]),'parentId':_0x25a553}),_0x46dcff=_0x58d1e5(_0x4b4c9f[_0x5d75e1(0x19d)][0x0]);return{..._0x46dcff,'children':_0x4b4c9f[_0x5d75e1(0x19d)][_0x5d75e1(0x1b6)](0x1)[_0x5d75e1(0x193)](_0xfbcb40=>_0x58d1e5(_0xfbcb40,_0x46dcff['id']))};}return null;}let S=class{constructor(_0x3c22a6,_0x4e4cd7,_0x2662a4){const _0x1ce1be=_0x5cf493;this[_0x1ce1be(0x1c9)]=_0x3c22a6,this['_userService']=_0x4e4cd7,this['_sessionService']=_0x2662a4;}async['addComment'](_0x28bc44){const _0x50f00c=_0x5cf493;var _0x276f49,_0x3a6e54;const {parentId:_0x1030d0,unitId:_0x2d8f23,text:_0x1141bd,threadId:_0x5b8b5c}=_0x28bc44,_0x5d0582=(_0x3a6e54=(_0x276f49=_0x1141bd['customRanges'])==null?void 0x0:_0x276f49[_0x50f00c(0x1a3)](_0x25e74f=>_0x25e74f[_0x50f00c(0x19a)]===_0x512e3e[_0x50f00c(0x1af)])[_0x50f00c(0x193)](_0x6b099d=>_0x6b099d[_0x50f00c(0x1df)]))!=null?_0x3a6e54:[],_0x252da3=JSON['stringify'](_0x1141bd),_0x2e3441=(await this[_0x50f00c(0x1d3)][_0x50f00c(0x1ca)](_0x2d8f23))[_0x50f00c(0x18f)]();if(_0x1030d0){const _0xeb8965={'memberId':_0x2e3441,'unitId':_0x2d8f23,'content':_0x252da3,'mention':_0x5d0582,'threadId':_0x5b8b5c},_0x173ef4=(await this[_0x50f00c(0x1c9)]['post'](_0x50f00c(0x1c6)+_0x2d8f23+_0x50f00c(0x1de),{'body':_0xeb8965}))[_0x50f00c(0x1a9)]['reply'];return{..._0x28bc44,'id':_0x173ef4[_0x50f00c(0x182)],'dT':_0x243e5e(+_0x173ef4[_0x50f00c(0x19c)])[_0x50f00c(0x199)](_0x50f00c(0x1d0)),'personId':_0x173ef4[_0x50f00c(0x1e2)]};}else{const _0xcc9556={'memberId':_0x2e3441,'unitId':_0x2d8f23,'content':_0x252da3,'mention':_0x5d0582},_0x2917be=await this[_0x50f00c(0x1c9)][_0x50f00c(0x1dd)](_0x50f00c(0x1c6)+_0x2d8f23+_0x50f00c(0x194),{'body':_0xcc9556});return X(_0x2917be[_0x50f00c(0x1a9)][_0x50f00c(0x1b7)],_0x28bc44);}}async[_0x5cf493(0x1a5)](_0x2329c9){const _0xbb189d=_0x5cf493;var _0x36fad4,_0xeb881b;const {text:_0xf85fc1,unitId:_0x2ad134}=_0x2329c9,_0x10397c=(_0xeb881b=(_0x36fad4=_0xf85fc1[_0xbb189d(0x1b2)])==null?void 0x0:_0x36fad4['filter'](_0x3706e5=>_0x3706e5[_0xbb189d(0x19a)]===_0x512e3e['COMMENT'])['map'](_0x15a8f0=>_0x15a8f0[_0xbb189d(0x1df)]))!=null?_0xeb881b:[],_0x3dfd5a=JSON[_0xbb189d(0x196)](_0xf85fc1),_0x59c3e4=_0x2329c9['threadId'],_0x31e033=_0x2329c9['id'],_0xc57238={'memberId':(await this[_0xbb189d(0x1d3)]['requireSession'](_0x2ad134))['getMemberID'](),'unitId':_0x2ad134,'threadId':_0x59c3e4,'mention':_0x10397c,'content':_0x3dfd5a,'replyId':_0x31e033},_0x3c8372=await this[_0xbb189d(0x1c9)][_0xbb189d(0x1dd)]('/universer-api/comment/unit/'+_0x2ad134+_0xbb189d(0x180),{'body':_0xc57238});return!_0x3c8372['body']['error']||_0x3c8372[_0xbb189d(0x1a9)][_0xbb189d(0x188)]['code']===0x1;}async[_0x5cf493(0x1c8)](_0x56cf98){const _0x558233=_0x5cf493,{unitId:_0x2fcdae}=_0x56cf98,_0x5bc2bb=_0x56cf98[_0x558233(0x1a1)],_0x6e8a89={'memberId':this[_0x558233(0x1c4)]['getCurrentUser']()[_0x558233(0x19f)],'unitId':_0x2fcdae,'threadId':_0x5bc2bb,'solved':_0x56cf98[_0x558233(0x1b0)]?I[_0x558233(0x184)]:I[_0x558233(0x186)]},_0xc0b15b=await this[_0x558233(0x1c9)][_0x558233(0x1dd)](_0x558233(0x1c6)+_0x2fcdae+_0x558233(0x1a4),{'body':_0x6e8a89});return!_0xc0b15b[_0x558233(0x1a9)]['error']||_0xc0b15b[_0x558233(0x1a9)][_0x558233(0x188)][_0x558233(0x1cb)]===0x1;}async['deleteComment'](_0x3593cf,_0x5e8d47,_0x2a0744,_0x5499a6){const _0x2eadfb=_0x5cf493,_0x4d4976={'memberId':(await this['_sessionService'][_0x2eadfb(0x1ca)](_0x3593cf))[_0x2eadfb(0x18f)](),'threadId':_0x2a0744,'replyId':_0x5499a6,'unitId':_0x3593cf},_0x2b1f24=await this[_0x2eadfb(0x1c9)][_0x2eadfb(0x1dd)](_0x2eadfb(0x1c6)+_0x3593cf+'/delete',{'body':_0x4d4976});return!_0x2b1f24[_0x2eadfb(0x1a9)][_0x2eadfb(0x188)]||_0x2b1f24['body'][_0x2eadfb(0x188)]['code']===0x1;}async['listComments'](_0x5d42b1,_0x1352ec,_0x4f0e99){const _0x195858=_0x5cf493,_0x5c002b={'unitId':_0x5d42b1,'threadId':_0x4f0e99},_0x9ab942=await this['_httpService'][_0x195858(0x1dd)](_0x195858(0x1c6)+_0x5d42b1+_0x195858(0x18b),{'body':_0x5c002b}),_0x27d9d5=_0x4f0e99['map'](_0x18910c=>ee(_0x9ab942[_0x195858(0x1a9)][_0x195858(0x1b8)][_0x18910c],_0x5d42b1,_0x1352ec))[_0x195858(0x1a3)](Boolean);return Object[_0x195858(0x197)](_0x9ab942[_0x195858(0x1a9)][_0x195858(0x1bb)])[_0x195858(0x1ab)](_0x1b2e9c=>{const _0x3e2c7a=_0x195858;this[_0x3e2c7a(0x1c4)][_0x3e2c7a(0x183)](_0x1b2e9c);}),_0x27d9d5;}[_0x5cf493(0x18c)](_0x11d155){const _0x511a74=_0x5cf493;return{'id':_0x11d155['id'],'threadId':_0x11d155['threadId'],'ref':_0x11d155[_0x511a74(0x1d5)]};}};S=Q([b(0x0,_0x38eaf9(_0x45151c)),b(0x1,_0x38eaf9(_0x38a066)),b(0x2,_0x38eaf9(_0x1dd800))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x265245,_0xeff6e2,_0x4a888c,_0x3cbdcd)=>{for(var _0x35f1d8=_0x3cbdcd>0x1?void 0x0:_0x3cbdcd?re(_0xeff6e2,_0x4a888c):_0xeff6e2,_0x76137c=_0x265245['length']-0x1,_0x277408;_0x76137c>=0x0;_0x76137c--)(_0x277408=_0x265245[_0x76137c])&&(_0x35f1d8=_0x277408(_0x35f1d8)||_0x35f1d8);return _0x35f1d8;},M=(_0x31d5db,_0x4bba8c)=>(_0x417642,_0x3e8fa6)=>_0x4bba8c(_0x417642,_0x3e8fa6,_0x31d5db);let f=class extends _0x5b2137{constructor(_0x3533dd,_0x102c02){const _0x435735=_0x5cf493;super(),this[_0x435735(0x18a)]=_0x3533dd,this['_threadCommentDataSource']=_0x102c02,this[_0x435735(0x1c7)]();}['_initDataSource'](){const _0x1dbfd6=_0x5cf493;this[_0x1dbfd6(0x18a)]['dataSource']=this[_0x1dbfd6(0x1dc)],this[_0x1dbfd6(0x18a)][_0x1dbfd6(0x1e1)]=!0x1;}};f=te([M(0x0,_0x410ff5),M(0x1,_0x38eaf9(S))],f);var se=Object[_0x5cf493(0x1d4)],oe=Object[_0x5cf493(0x1c0)],ne=(_0x5f4bfc,_0x6bdb32,_0x20bc0a)=>_0x6bdb32 in _0x5f4bfc?se(_0x5f4bfc,_0x6bdb32,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x20bc0a}):_0x5f4bfc[_0x6bdb32]=_0x20bc0a,ie=(_0x311c4f,_0xdd2b9d,_0x47fdc6,_0x1a02dd)=>{for(var _0x35739b=_0x1a02dd>0x1?void 0x0:_0x1a02dd?oe(_0xdd2b9d,_0x47fdc6):_0xdd2b9d,_0x531f39=_0x311c4f['length']-0x1,_0x117aed;_0x531f39>=0x0;_0x531f39--)(_0x117aed=_0x311c4f[_0x531f39])&&(_0x35739b=_0x117aed(_0x35739b)||_0x35739b);return _0x35739b;},N=(_0x5c21fa,_0x4c0e23)=>(_0x513e4d,_0x50cc87)=>_0x4c0e23(_0x513e4d,_0x50cc87,_0x5c21fa),$=(_0x1d2f77,_0x49c925,_0x3a3f71)=>ne(_0x1d2f77,typeof _0x49c925!='symbol'?_0x49c925+'':_0x49c925,_0x3a3f71);let g=class extends _0x4810b6{constructor(_0xec447b=O,_0x2a2daa,_0x2bf3d5){const _0x3bb493=_0x5cf493;super(),this[_0x3bb493(0x195)]=_0xec447b,this[_0x3bb493(0x19b)]=_0x2a2daa,this['_configService']=_0x2bf3d5;const {..._0x34e84d}=_0x190b26({},O,this[_0x3bb493(0x195)]);this['_configService'][_0x3bb493(0x1d6)](z,_0x34e84d);}['onStarting'](){const _0x29ff60=_0x5cf493;[[S],[f],[_]][_0x29ff60(0x1ab)](_0xb34e77=>{const _0x5962e4=_0x29ff60;this[_0x5962e4(0x19b)][_0x5962e4(0x1e0)](_0xb34e77);});}[_0x5cf493(0x1da)](){const _0x3de54b=_0x5cf493;this[_0x3de54b(0x19b)][_0x3de54b(0x1ac)](f),this[_0x3de54b(0x19b)]['get'](_);}};$(g,_0x5cf493(0x1d2),W),$(g,'type',_0x39fe04[_0x5cf493(0x1b3)]),g=ie([_0x45af73(_0x338aee,_0x11c3a8,_0x1c715f),N(0x1,_0x38eaf9(_0x441a4f)),N(0x2,_0x58e505)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x38fb1a=_0x3a21;(function(_0x2cf1df,_0x4d081f){const _0x20b1b6=_0x3a21,_0x136645=_0x2cf1df();while(!![]){try{const _0x1c00ce=-parseInt(_0x20b1b6(0x172))/0x1+-parseInt(_0x20b1b6(0x14d))/0x2*(parseInt(_0x20b1b6(0x187))/0x3)+-parseInt(_0x20b1b6(0x1a3))/0x4+parseInt(_0x20b1b6(0x177))/0x5+parseInt(_0x20b1b6(0x16d))/0x6*(-parseInt(_0x20b1b6(0x14c))/0x7)+-parseInt(_0x20b1b6(0x19c))/0x8+-parseInt(_0x20b1b6(0x193))/0x9*(-parseInt(_0x20b1b6(0x14a))/0xa);if(_0x1c00ce===_0x4d081f)break;else _0x136645['push'](_0x136645['shift']());}catch(_0x1296b3){_0x136645['push'](_0x136645['shift']());}}}(_0x1614,0x6b83d));import{CommentService as _0x13a843,CollaborationSessionService as _0x11edac,UniverCollaborationClientPlugin as _0x468216}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1a398b}from'@univerjs-pro/license';import{dayjs as _0x18dc99,UserManagerService as _0x5e1c86,Inject as _0x4db969,Injector as _0x899ce6,Disposable as _0x1b061a,CustomRangeType as _0x274ae2,UniverInstanceType as _0x1c9e82,DependentOn as _0x2b1585,IConfigService as _0x2f3a09,Plugin as _0x255d8a,merge as _0x43ff99}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x829ca7}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x1cdbd8,IThreadCommentDataSourceService as _0x26b277}from'@univerjs/thread-comment';import{bufferTime as _0x1ef2de}from'rxjs';import{HTTPService as _0x1bacc9}from'@univerjs/network';const W=_0x38fb1a(0x192);function _0x1614(){const _0x47e130=['length','ref','_threadCommentDataSource','resolveComment','format','/universer-api/comment/unit/','requireSession','personId','map','reply','388956YLyiUF','saveCommentToSnapshot','Reply','parse','userID','post','root','Add','error','_threadCommentModel','_commentService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','7425gmpgXZ','_initUserSync','size','replyId','solved','_config','get','/universer-api/user/list','addComment','4269472MHoOHI','getCurrentUser','delete','add','/list','userId','disposeWithMe','2767352iwQgum','thread-comment-data-source.config','symbol','Solved','slice','getComment','parentId','UNRECOGNIZED','_userService','subscribe','getOwnPropertyDescriptor','_initDataSource','_configService','defineProperty','addUser','29930YjcRdw','replies','37331wcPXSX','2HEmGta','comment','/add','unitId','createTimestamp','Solve','UNIVER_UNKNOWN','COMMENT','/edit','_threadCommentDataSourceService','code','user','customRanges','threadId','deleteComment','payload','getUser','resolved','getUnit','filter','YYYY/MM/DD\x20HH:mm','/delete','type','_sessionService','Edit','/solved','OpenOrReOpen','/reply','pluginName','users','rangeType','_injector','234aLZVuO','commentUpdate$','pipe','Delete','_httpService','583960ApnHTx','onReady','Unknown','onStarting','forEach','591385vLvltn','getMemberID','body','syncUpdateMutationToColla','updateComment','_init'];_0x1614=function(){return _0x47e130;};return _0x1614();}var I=(_0x552a99=>(_0x552a99[_0x552a99[_0x38fb1a(0x167)]=0x0]='OpenOrReOpen',_0x552a99[_0x552a99['Solved']=0x1]=_0x38fb1a(0x1a6),_0x552a99[_0x552a99[_0x38fb1a(0x1aa)]=-0x1]=_0x38fb1a(0x1aa),_0x552a99))(I||{}),v=(_0x1b2830=>(_0x1b2830[_0x1b2830[_0x38fb1a(0x174)]=0x0]='Unknown',_0x1b2830[_0x1b2830[_0x38fb1a(0x18e)]=0x1]=_0x38fb1a(0x18e),_0x1b2830[_0x1b2830[_0x38fb1a(0x189)]=0x2]='Reply',_0x1b2830[_0x1b2830[_0x38fb1a(0x165)]=0x3]='Edit',_0x1b2830[_0x1b2830[_0x38fb1a(0x170)]=0x4]=_0x38fb1a(0x170),_0x1b2830[_0x1b2830[_0x38fb1a(0x152)]=0x5]=_0x38fb1a(0x152),_0x1b2830[_0x1b2830['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x1b2830))(v||{});const y=_0x1908bf=>_0x18dc99(new Date(+_0x1908bf))[_0x38fb1a(0x181)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x4c9f4e,_0x11283b)=>{const _0x37f6ef=_0x38fb1a,_0x529564=_0x4c9f4e[_0x37f6ef(0x199)](_0x5e1c86),_0x4cd0e2=_0x4c9f4e[_0x37f6ef(0x199)](_0x1bacc9);_0x11283b[_0x37f6ef(0x176)](_0x374081=>{const _0x475dc2=_0x37f6ef;_0x529564[_0x475dc2(0x15d)](_0x374081)&&_0x11283b[_0x475dc2(0x19e)](_0x374081);}),_0x11283b[_0x37f6ef(0x195)]&&(await _0x4cd0e2[_0x37f6ef(0x199)](_0x37f6ef(0x19a),{'params':{'userIDs':[..._0x11283b]}}))[_0x37f6ef(0x179)][_0x37f6ef(0x16a)][_0x37f6ef(0x176)](_0x509ccb=>{const _0x39f117=_0x37f6ef;_0x509ccb&&_0x529564[_0x39f117(0x149)](_0x509ccb);});};var K=Object[_0x38fb1a(0x145)],V=(_0x32a841,_0x567eb7,_0x439e18,_0x38a6ef)=>{for(var _0x339250=_0x38a6ef>0x1?void 0x0:_0x38a6ef?K(_0x567eb7,_0x439e18):_0x567eb7,_0x31ce1d=_0x32a841['length']-0x1,_0x543b1b;_0x31ce1d>=0x0;_0x31ce1d--)(_0x543b1b=_0x32a841[_0x31ce1d])&&(_0x339250=_0x543b1b(_0x339250)||_0x339250);return _0x339250;},p=(_0x6d784e,_0x243b2b)=>(_0x16773e,_0x26f6b7)=>_0x243b2b(_0x16773e,_0x26f6b7,_0x6d784e);let _=class extends _0x1b061a{constructor(_0xf0b40b,_0x3e57b0,_0x133b99,_0x39df8e){const _0x5efebe=_0x38fb1a;super(),this[_0x5efebe(0x191)]=_0xf0b40b,this['_threadCommentModel']=_0x3e57b0,this[_0x5efebe(0x1ab)]=_0x133b99,this[_0x5efebe(0x16c)]=_0x39df8e,this[_0x5efebe(0x17c)](),this['_initUserSync']();}[_0x38fb1a(0x194)](){const _0x4ab2cd=_0x38fb1a;this[_0x4ab2cd(0x1a2)](this['_threadCommentModel'][_0x4ab2cd(0x16e)][_0x4ab2cd(0x16f)](_0x1ef2de(0x10))[_0x4ab2cd(0x1ac)](_0x8a44d3=>{const _0x2ec5a0=new Set();_0x8a44d3['forEach'](_0x445f58=>{const _0x53daa6=_0x3a21;switch(_0x445f58[_0x53daa6(0x163)]){case _0x53daa6(0x19f):{const _0x2cd792=_0x445f58[_0x53daa6(0x15c)][_0x53daa6(0x184)];_0x2ec5a0[_0x53daa6(0x19f)](_0x2cd792);break;}}}),B(this['_injector'],_0x2ec5a0);}));}[_0x38fb1a(0x17c)](){const _0x5d646c=_0x38fb1a;this['disposeWithMe'](this[_0x5d646c(0x191)]['commentUpdate$']['subscribe'](async _0x698d12=>{const _0x16aab6=_0x5d646c;var _0x456d8e,_0x418fb0,_0x45095b,_0x5c1d25;const _0x16ddf3=(_0x456d8e=this[_0x16aab6(0x190)][_0x16aab6(0x15f)](_0x698d12[_0x16aab6(0x150)])['find'](_0xb0f637=>_0xb0f637[_0x16aab6(0x15a)]===_0x698d12[_0x16aab6(0x15a)]))==null?void 0x0:_0x456d8e['root'];if(!_0x16ddf3)return;const {unitId:_0x253c4e,subUnitId:_0x23e03b}=_0x16ddf3;switch(_0x698d12[_0x16aab6(0x158)]&&this[_0x16aab6(0x1ab)][_0x16aab6(0x149)](_0x698d12['user']),_0x698d12[_0x16aab6(0x163)]){case v[_0x16aab6(0x18e)]:break;case v[_0x16aab6(0x189)]:{this[_0x16aab6(0x190)][_0x16aab6(0x19b)](_0x253c4e,_0x23e03b,{'unitId':_0x253c4e,'subUnitId':_0x23e03b,'ref':'','id':_0x698d12['replyId'],'dT':y(+_0x698d12[_0x16aab6(0x151)]),'threadId':_0x698d12[_0x16aab6(0x15a)],'personId':(_0x45095b=(_0x418fb0=_0x698d12[_0x16aab6(0x158)])==null?void 0x0:_0x418fb0[_0x16aab6(0x18b)])!=null?_0x45095b:_0x698d12[_0x16aab6(0x1a1)],'text':JSON['parse'](_0x698d12['content']),'parentId':_0x16ddf3['id']});break;}case v[_0x16aab6(0x170)]:{const _0x53721e=this[_0x16aab6(0x190)][_0x16aab6(0x1a8)](_0x253c4e,_0x23e03b,_0x698d12[_0x16aab6(0x196)]);_0x53721e&&_0x53721e[_0x16aab6(0x1a9)]&&this[_0x16aab6(0x190)][_0x16aab6(0x15b)](_0x253c4e,_0x23e03b,_0x698d12[_0x16aab6(0x196)]);break;}case v['Edit']:{this[_0x16aab6(0x190)][_0x16aab6(0x17b)](_0x253c4e,_0x23e03b,{'commentId':_0x698d12['replyId'],'text':JSON[_0x16aab6(0x18a)](_0x698d12['content'])});break;}case v[_0x16aab6(0x152)]:{const _0x6bac75=(_0x5c1d25=this['_threadCommentModel'][_0x16aab6(0x15f)](_0x698d12['unitId'])['find'](_0x333087=>_0x333087[_0x16aab6(0x15a)]===_0x698d12[_0x16aab6(0x15a)]))==null?void 0x0:_0x5c1d25[_0x16aab6(0x18d)];_0x6bac75&&this[_0x16aab6(0x190)][_0x16aab6(0x180)](_0x253c4e,_0x23e03b,_0x6bac75['id'],_0x698d12['solved']===I[_0x16aab6(0x1a6)]);break;}}}));}};_=V([p(0x0,_0x4db969(_0x13a843)),p(0x1,_0x4db969(_0x1cdbd8)),p(0x2,_0x4db969(_0x5e1c86)),p(0x3,_0x4db969(_0x899ce6))],_);const z=_0x38fb1a(0x1a4),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x1d9239,_0x53e06f,_0x3cedd4,_0x493e84)=>{for(var _0x13ab65=_0x493e84>0x1?void 0x0:_0x493e84?k(_0x53e06f,_0x3cedd4):_0x53e06f,_0x502c89=_0x1d9239['length']-0x1,_0x11f9bc;_0x502c89>=0x0;_0x502c89--)(_0x11f9bc=_0x1d9239[_0x502c89])&&(_0x13ab65=_0x11f9bc(_0x13ab65)||_0x13ab65);return _0x13ab65;},b=(_0x4ffacb,_0xa66fc1)=>(_0x4976fb,_0x39f977)=>_0xa66fc1(_0x4976fb,_0x39f977,_0x4ffacb);function X(_0x29c9c5,_0x39f4d8){const _0x55fd67=_0x38fb1a,_0x35bf36=_0x29c9c5[_0x55fd67(0x14b)][0x0];return{..._0x39f4d8,'id':_0x35bf36['replyId'],'resolved':_0x29c9c5[_0x55fd67(0x197)]===0x1,'dT':y(_0x35bf36['createTimestamp']),'personId':_0x35bf36[_0x55fd67(0x1a1)],'threadId':_0x35bf36[_0x55fd67(0x15a)]};}function ee(_0x14b2a7,_0x1b3c23,_0x565e6){const _0x39e9ac=_0x38fb1a;var _0x4eb305,_0xe22baf;if(((_0xe22baf=(_0x4eb305=_0x14b2a7==null?void 0x0:_0x14b2a7[_0x39e9ac(0x14b)])==null?void 0x0:_0x4eb305[_0x39e9ac(0x17d)])!=null?_0xe22baf:0x0)>0x0){const _0x3cbf1e=(_0x7e586f,_0x45fe3b)=>({'id':_0x7e586f[_0x39e9ac(0x196)],'threadId':_0x7e586f[_0x39e9ac(0x15a)],'dT':y(_0x7e586f[_0x39e9ac(0x151)]),'personId':_0x7e586f[_0x39e9ac(0x1a1)],'resolved':_0x14b2a7[_0x39e9ac(0x197)]===I[_0x39e9ac(0x1a6)],'unitId':_0x1b3c23,'subUnitId':_0x565e6,'text':JSON[_0x39e9ac(0x18a)](_0x7e586f['content']),'parentId':_0x45fe3b}),_0x4ba3ce=_0x3cbf1e(_0x14b2a7[_0x39e9ac(0x14b)][0x0]);return{..._0x4ba3ce,'children':_0x14b2a7[_0x39e9ac(0x14b)][_0x39e9ac(0x1a7)](0x1)[_0x39e9ac(0x185)](_0x575b10=>_0x3cbf1e(_0x575b10,_0x4ba3ce['id']))};}return null;}let S=class{constructor(_0x39bb57,_0x5e54b9,_0x431c39){const _0x2a50bb=_0x38fb1a;this['_httpService']=_0x39bb57,this[_0x2a50bb(0x1ab)]=_0x5e54b9,this[_0x2a50bb(0x164)]=_0x431c39;}async['addComment'](_0x559ef3){const _0x224580=_0x38fb1a;var _0x248c85,_0x3b89c1;const {parentId:_0x28ba24,unitId:_0x3c423c,text:_0x17199f,threadId:_0x5174ca}=_0x559ef3,_0x4b2b03=(_0x3b89c1=(_0x248c85=_0x17199f[_0x224580(0x159)])==null?void 0x0:_0x248c85[_0x224580(0x160)](_0x347df3=>_0x347df3[_0x224580(0x16b)]===_0x274ae2[_0x224580(0x154)])[_0x224580(0x185)](_0x2a0667=>_0x2a0667['rangeId']))!=null?_0x3b89c1:[],_0x54008a=JSON['stringify'](_0x17199f),_0x43aaf2=(await this['_sessionService']['requireSession'](_0x3c423c))[_0x224580(0x178)]();if(_0x28ba24){const _0x48b4bf={'memberId':_0x43aaf2,'unitId':_0x3c423c,'content':_0x54008a,'mention':_0x4b2b03,'threadId':_0x5174ca},_0x1e3877=(await this[_0x224580(0x171)][_0x224580(0x18c)](_0x224580(0x182)+_0x3c423c+_0x224580(0x168),{'body':_0x48b4bf}))[_0x224580(0x179)][_0x224580(0x186)];return{..._0x559ef3,'id':_0x1e3877['replyId'],'dT':_0x18dc99(+_0x1e3877['createTimestamp'])[_0x224580(0x181)](_0x224580(0x161)),'personId':_0x1e3877[_0x224580(0x1a1)]};}else{const _0x3650ab={'memberId':_0x43aaf2,'unitId':_0x3c423c,'content':_0x54008a,'mention':_0x4b2b03},_0x26b41b=await this[_0x224580(0x171)][_0x224580(0x18c)]('/universer-api/comment/unit/'+_0x3c423c+_0x224580(0x14f),{'body':_0x3650ab});return X(_0x26b41b['body'][_0x224580(0x14e)],_0x559ef3);}}async[_0x38fb1a(0x17b)](_0x439e8d){const _0x3946e2=_0x38fb1a;var _0x58f34e,_0x475c77;const {text:_0x20be11,unitId:_0xda99a1}=_0x439e8d,_0x4c2b5d=(_0x475c77=(_0x58f34e=_0x20be11[_0x3946e2(0x159)])==null?void 0x0:_0x58f34e['filter'](_0x1a5dff=>_0x1a5dff[_0x3946e2(0x16b)]===_0x274ae2[_0x3946e2(0x154)])[_0x3946e2(0x185)](_0x337f88=>_0x337f88['rangeId']))!=null?_0x475c77:[],_0x1b079a=JSON['stringify'](_0x20be11),_0x52626a=_0x439e8d[_0x3946e2(0x15a)],_0x53a621=_0x439e8d['id'],_0x31b228={'memberId':(await this[_0x3946e2(0x164)][_0x3946e2(0x183)](_0xda99a1))[_0x3946e2(0x178)](),'unitId':_0xda99a1,'threadId':_0x52626a,'mention':_0x4c2b5d,'content':_0x1b079a,'replyId':_0x53a621},_0x246a00=await this[_0x3946e2(0x171)][_0x3946e2(0x18c)](_0x3946e2(0x182)+_0xda99a1+_0x3946e2(0x155),{'body':_0x31b228});return!_0x246a00[_0x3946e2(0x179)]['error']||_0x246a00['body'][_0x3946e2(0x18f)][_0x3946e2(0x157)]===0x1;}async[_0x38fb1a(0x180)](_0x436090){const _0x4d56fc=_0x38fb1a,{unitId:_0x26abc7}=_0x436090,_0x5a7e44=_0x436090[_0x4d56fc(0x15a)],_0x2267bb={'memberId':this[_0x4d56fc(0x1ab)][_0x4d56fc(0x19d)]()[_0x4d56fc(0x18b)],'unitId':_0x26abc7,'threadId':_0x5a7e44,'solved':_0x436090[_0x4d56fc(0x15e)]?I[_0x4d56fc(0x1a6)]:I[_0x4d56fc(0x167)]},_0x257984=await this[_0x4d56fc(0x171)][_0x4d56fc(0x18c)](_0x4d56fc(0x182)+_0x26abc7+_0x4d56fc(0x166),{'body':_0x2267bb});return!_0x257984[_0x4d56fc(0x179)][_0x4d56fc(0x18f)]||_0x257984[_0x4d56fc(0x179)][_0x4d56fc(0x18f)][_0x4d56fc(0x157)]===0x1;}async[_0x38fb1a(0x15b)](_0x5c7992,_0x4da300,_0x36c9ff,_0x2bf270){const _0x50f4c9=_0x38fb1a,_0x4c63e6={'memberId':(await this[_0x50f4c9(0x164)]['requireSession'](_0x5c7992))['getMemberID'](),'threadId':_0x36c9ff,'replyId':_0x2bf270,'unitId':_0x5c7992},_0x595d97=await this[_0x50f4c9(0x171)]['post'](_0x50f4c9(0x182)+_0x5c7992+_0x50f4c9(0x162),{'body':_0x4c63e6});return!_0x595d97[_0x50f4c9(0x179)][_0x50f4c9(0x18f)]||_0x595d97[_0x50f4c9(0x179)][_0x50f4c9(0x18f)][_0x50f4c9(0x157)]===0x1;}async['listComments'](_0x35a972,_0x4b519a,_0x2ba610){const _0x2b6c05=_0x38fb1a,_0x2c8769={'unitId':_0x35a972,'threadId':_0x2ba610},_0x26fad6=await this[_0x2b6c05(0x171)]['post'](_0x2b6c05(0x182)+_0x35a972+_0x2b6c05(0x1a0),{'body':_0x2c8769}),_0x3fdc58=_0x2ba610[_0x2b6c05(0x185)](_0x11c814=>ee(_0x26fad6[_0x2b6c05(0x179)]['comments'][_0x11c814],_0x35a972,_0x4b519a))[_0x2b6c05(0x160)](Boolean);return Object['values'](_0x26fad6[_0x2b6c05(0x179)][_0x2b6c05(0x16a)])['forEach'](_0x59c3f4=>{const _0x49d500=_0x2b6c05;this[_0x49d500(0x1ab)][_0x49d500(0x149)](_0x59c3f4);}),_0x3fdc58;}[_0x38fb1a(0x188)](_0x46a07d){const _0x5e7bd3=_0x38fb1a;return{'id':_0x46a07d['id'],'threadId':_0x46a07d[_0x5e7bd3(0x15a)],'ref':_0x46a07d[_0x5e7bd3(0x17e)]};}};S=Q([b(0x0,_0x4db969(_0x1bacc9)),b(0x1,_0x4db969(_0x5e1c86)),b(0x2,_0x4db969(_0x11edac))],S);var re=Object[_0x38fb1a(0x145)],te=(_0x4fa28b,_0x579834,_0x11437f,_0x40e919)=>{const _0x440783=_0x38fb1a;for(var _0x4ba439=_0x40e919>0x1?void 0x0:_0x40e919?re(_0x579834,_0x11437f):_0x579834,_0x1358c5=_0x4fa28b[_0x440783(0x17d)]-0x1,_0x2141af;_0x1358c5>=0x0;_0x1358c5--)(_0x2141af=_0x4fa28b[_0x1358c5])&&(_0x4ba439=_0x2141af(_0x4ba439)||_0x4ba439);return _0x4ba439;},M=(_0x536d60,_0x24bb60)=>(_0x1cfb57,_0x592f20)=>_0x24bb60(_0x1cfb57,_0x592f20,_0x536d60);let f=class extends _0x1b061a{constructor(_0x2289ec,_0x185e4e){const _0xc25fbe=_0x38fb1a;super(),this[_0xc25fbe(0x156)]=_0x2289ec,this['_threadCommentDataSource']=_0x185e4e,this['_initDataSource']();}[_0x38fb1a(0x146)](){const _0x15b524=_0x38fb1a;this[_0x15b524(0x156)]['dataSource']=this[_0x15b524(0x17f)],this[_0x15b524(0x156)][_0x15b524(0x17a)]=!0x1;}};function _0x3a21(_0x32e8ab,_0x17c395){const _0x1614c3=_0x1614();return _0x3a21=function(_0x3a2174,_0x458669){_0x3a2174=_0x3a2174-0x145;let _0x166d32=_0x1614c3[_0x3a2174];return _0x166d32;},_0x3a21(_0x32e8ab,_0x17c395);}f=te([M(0x0,_0x26b277),M(0x1,_0x4db969(S))],f);var se=Object[_0x38fb1a(0x148)],oe=Object[_0x38fb1a(0x145)],ne=(_0xa66428,_0x40c905,_0xbf668b)=>_0x40c905 in _0xa66428?se(_0xa66428,_0x40c905,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xbf668b}):_0xa66428[_0x40c905]=_0xbf668b,ie=(_0x69f286,_0x1da40a,_0x5be4e4,_0x31cca6)=>{const _0x4988ae=_0x38fb1a;for(var _0x7c5c36=_0x31cca6>0x1?void 0x0:_0x31cca6?oe(_0x1da40a,_0x5be4e4):_0x1da40a,_0x2951f3=_0x69f286[_0x4988ae(0x17d)]-0x1,_0x3c4667;_0x2951f3>=0x0;_0x2951f3--)(_0x3c4667=_0x69f286[_0x2951f3])&&(_0x7c5c36=_0x3c4667(_0x7c5c36)||_0x7c5c36);return _0x7c5c36;},N=(_0x229923,_0xd682a)=>(_0x2e584d,_0x175e33)=>_0xd682a(_0x2e584d,_0x175e33,_0x229923),$=(_0x545f62,_0x3d8b26,_0x85a80a)=>ne(_0x545f62,typeof _0x3d8b26!=_0x38fb1a(0x1a5)?_0x3d8b26+'':_0x3d8b26,_0x85a80a);let g=class extends _0x255d8a{constructor(_0x735f4=O,_0x29601d,_0x2a3e7b){const _0x5c44f4=_0x38fb1a;super(),this['_config']=_0x735f4,this[_0x5c44f4(0x16c)]=_0x29601d,this[_0x5c44f4(0x147)]=_0x2a3e7b;const {..._0x1c2d4e}=_0x43ff99({},O,this[_0x5c44f4(0x198)]);this['_configService']['setConfig'](z,_0x1c2d4e);}[_0x38fb1a(0x175)](){[[S],[f],[_]]['forEach'](_0x32f8bf=>{const _0xbf509=_0x3a21;this[_0xbf509(0x16c)][_0xbf509(0x19f)](_0x32f8bf);});}[_0x38fb1a(0x173)](){const _0x25171b=_0x38fb1a;this[_0x25171b(0x16c)][_0x25171b(0x199)](f),this[_0x25171b(0x16c)][_0x25171b(0x199)](_);}};$(g,_0x38fb1a(0x169),W),$(g,_0x38fb1a(0x163),_0x1c9e82[_0x38fb1a(0x153)]),g=ie([_0x2b1585(_0x829ca7,_0x468216,_0x1a398b),N(0x1,_0x4db969(_0x899ce6)),N(0x2,_0x2f3a09)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x5cf493=_0x30fe;(function(_0x266077,_0x647e33){const _0x4d3d03=_0x30fe,_0x3b0d8c=_0x266077();while(!![]){try{const _0x2a8050=parseInt(_0x4d3d03(0x191))/0x1+parseInt(_0x4d3d03(0x18d))/0x2+-parseInt(_0x4d3d03(0x1aa))/0x3*(-parseInt(_0x4d3d03(0x1b5))/0x4)+parseInt(_0x4d3d03(0x185))/0x5+-parseInt(_0x4d3d03(0x19e))/0x6+-parseInt(_0x4d3d03(0x1a0))/0x7+parseInt(_0x4d3d03(0x1c3))/0x8*(-parseInt(_0x4d3d03(0x1c2))/0x9);if(_0x2a8050===_0x647e33)break;else _0x3b0d8c['push'](_0x3b0d8c['shift']());}catch(_0x3f02c6){_0x3b0d8c['push'](_0x3b0d8c['shift']());}}}(_0x44e4,0xd412c));import{CommentService as _0x11cf3a,CollaborationSessionService as _0x1dd800,UniverCollaborationClientPlugin as _0x11c3a8}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1c715f}from'@univerjs-pro/license';import{dayjs as _0x243e5e,UserManagerService as _0x38a066,Inject as _0x38eaf9,Injector as _0x441a4f,Disposable as _0x5b2137,CustomRangeType as _0x512e3e,UniverInstanceType as _0x39fe04,DependentOn as _0x45af73,IConfigService as _0x58e505,Plugin as _0x4810b6,merge as _0x190b26}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x338aee}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x49dc2a,IThreadCommentDataSourceService as _0x410ff5}from'@univerjs/thread-comment';function _0x44e4(){const _0x257666=['_sessionService','defineProperty','ref','setConfig','getUnit','getComment','disposeWithMe','onReady','find','_threadCommentDataSource','post','/reply','rangeId','add','syncUpdateMutationToColla','userId','/edit','commentUpdate$','replyId','addUser','Solved','7204960haRvJX','OpenOrReOpen','_commentService','error','user','_threadCommentDataSourceService','/list','saveCommentToSnapshot','3109774DAhlrC','unitId','getMemberID','getUser','758388Dimkqe','Unknown','map','/add','_config','stringify','values','Add','format','rangeType','_injector','createTimestamp','replies','8773524HrZBqt','userID','5630107uRtDiU','threadId','size','filter','/solved','updateComment','Solve','_init','type','body','2813721lQpCNo','forEach','get','Delete','pipe','COMMENT','resolved','UNRECOGNIZED','customRanges','UNIVER_UNKNOWN','subscribe','4QSVnOe','slice','comment','comments','parentId','addComment','users','_threadCommentModel','Edit','parse','personId','getOwnPropertyDescriptor','length','9HKqpcS','12455736jZYerc','_userService','solved','/universer-api/comment/unit/','_initDataSource','resolveComment','_httpService','requireSession','code','root','deleteComment','Reply','content','YYYY/MM/DD\x20HH:mm','/universer-api/user/list','pluginName'];_0x44e4=function(){return _0x257666;};return _0x44e4();}import{bufferTime as _0x1e0753}from'rxjs';import{HTTPService as _0x45151c}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x5dac0e=>(_0x5dac0e[_0x5dac0e[_0x5cf493(0x186)]=0x0]=_0x5cf493(0x186),_0x5dac0e[_0x5dac0e[_0x5cf493(0x184)]=0x1]='Solved',_0x5dac0e[_0x5dac0e[_0x5cf493(0x1b1)]=-0x1]='UNRECOGNIZED',_0x5dac0e))(I||{}),v=(_0x379224=>(_0x379224[_0x379224[_0x5cf493(0x192)]=0x0]='Unknown',_0x379224[_0x379224[_0x5cf493(0x198)]=0x1]=_0x5cf493(0x198),_0x379224[_0x379224[_0x5cf493(0x1ce)]=0x2]=_0x5cf493(0x1ce),_0x379224[_0x379224[_0x5cf493(0x1bd)]=0x3]='Edit',_0x379224[_0x379224[_0x5cf493(0x1ad)]=0x4]=_0x5cf493(0x1ad),_0x379224[_0x379224[_0x5cf493(0x1a6)]=0x5]=_0x5cf493(0x1a6),_0x379224[_0x379224[_0x5cf493(0x1b1)]=-0x1]='UNRECOGNIZED',_0x379224))(v||{});const y=_0xcafa98=>_0x243e5e(new Date(+_0xcafa98))['format'](_0x5cf493(0x1d0)),B=async(_0x159eeb,_0x5af047)=>{const _0x39c960=_0x5cf493,_0x5f009a=_0x159eeb[_0x39c960(0x1ac)](_0x38a066),_0x15dfee=_0x159eeb['get'](_0x45151c);_0x5af047[_0x39c960(0x1ab)](_0x2193d9=>{const _0x4b57f4=_0x39c960;_0x5f009a[_0x4b57f4(0x190)](_0x2193d9)&&_0x5af047['delete'](_0x2193d9);}),_0x5af047[_0x39c960(0x1a2)]&&(await _0x15dfee[_0x39c960(0x1ac)](_0x39c960(0x1d1),{'params':{'userIDs':[..._0x5af047]}}))[_0x39c960(0x1a9)][_0x39c960(0x1bb)]['forEach'](_0x229654=>{const _0x1a13d1=_0x39c960;_0x229654&&_0x5f009a[_0x1a13d1(0x183)](_0x229654);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x3a2940,_0xda7fd1,_0x52959d,_0x4bee49)=>{const _0x3d218f=_0x5cf493;for(var _0x347075=_0x4bee49>0x1?void 0x0:_0x4bee49?K(_0xda7fd1,_0x52959d):_0xda7fd1,_0x5d40ca=_0x3a2940[_0x3d218f(0x1c1)]-0x1,_0x49d6f0;_0x5d40ca>=0x0;_0x5d40ca--)(_0x49d6f0=_0x3a2940[_0x5d40ca])&&(_0x347075=_0x49d6f0(_0x347075)||_0x347075);return _0x347075;},p=(_0x4a4942,_0x540efb)=>(_0x4258d3,_0x3cc4e7)=>_0x540efb(_0x4258d3,_0x3cc4e7,_0x4a4942);let _=class extends _0x5b2137{constructor(_0x4b04d2,_0xd0c488,_0x277951,_0x30550d){const _0x309dcc=_0x5cf493;super(),this[_0x309dcc(0x187)]=_0x4b04d2,this[_0x309dcc(0x1bc)]=_0xd0c488,this[_0x309dcc(0x1c4)]=_0x277951,this[_0x309dcc(0x19b)]=_0x30550d,this[_0x309dcc(0x1a7)](),this['_initUserSync']();}['_initUserSync'](){const _0x3de209=_0x5cf493;this[_0x3de209(0x1d9)](this[_0x3de209(0x1bc)][_0x3de209(0x181)][_0x3de209(0x1ae)](_0x1e0753(0x10))[_0x3de209(0x1b4)](_0x54f43b=>{const _0xaf60a8=_0x3de209,_0x36babf=new Set();_0x54f43b['forEach'](_0x3c853b=>{const _0x4636cc=_0x30fe;switch(_0x3c853b['type']){case _0x4636cc(0x1e0):{const _0x5e26ee=_0x3c853b['payload'][_0x4636cc(0x1bf)];_0x36babf['add'](_0x5e26ee);break;}}}),B(this[_0xaf60a8(0x19b)],_0x36babf);}));}[_0x5cf493(0x1a7)](){const _0xe4034d=_0x5cf493;this[_0xe4034d(0x1d9)](this[_0xe4034d(0x187)][_0xe4034d(0x181)][_0xe4034d(0x1b4)](async _0x19e72a=>{const _0x40de7b=_0xe4034d;var _0x4009d6,_0x1f5826,_0x4a6f45,_0x59f6a0;const _0x188fc2=(_0x4009d6=this[_0x40de7b(0x1bc)][_0x40de7b(0x1d7)](_0x19e72a['unitId'])[_0x40de7b(0x1db)](_0x139775=>_0x139775['threadId']===_0x19e72a[_0x40de7b(0x1a1)]))==null?void 0x0:_0x4009d6[_0x40de7b(0x1cc)];if(!_0x188fc2)return;const {unitId:_0x207f87,subUnitId:_0x1d032b}=_0x188fc2;switch(_0x19e72a[_0x40de7b(0x189)]&&this[_0x40de7b(0x1c4)][_0x40de7b(0x183)](_0x19e72a['user']),_0x19e72a[_0x40de7b(0x1a8)]){case v[_0x40de7b(0x198)]:break;case v[_0x40de7b(0x1ce)]:{this['_threadCommentModel'][_0x40de7b(0x1ba)](_0x207f87,_0x1d032b,{'unitId':_0x207f87,'subUnitId':_0x1d032b,'ref':'','id':_0x19e72a[_0x40de7b(0x182)],'dT':y(+_0x19e72a[_0x40de7b(0x19c)]),'threadId':_0x19e72a[_0x40de7b(0x1a1)],'personId':(_0x4a6f45=(_0x1f5826=_0x19e72a[_0x40de7b(0x189)])==null?void 0x0:_0x1f5826[_0x40de7b(0x19f)])!=null?_0x4a6f45:_0x19e72a[_0x40de7b(0x1e2)],'text':JSON[_0x40de7b(0x1be)](_0x19e72a[_0x40de7b(0x1cf)]),'parentId':_0x188fc2['id']});break;}case v[_0x40de7b(0x1ad)]:{const _0x1f0f3a=this[_0x40de7b(0x1bc)][_0x40de7b(0x1d8)](_0x207f87,_0x1d032b,_0x19e72a[_0x40de7b(0x182)]);_0x1f0f3a&&_0x1f0f3a[_0x40de7b(0x1b9)]&&this[_0x40de7b(0x1bc)][_0x40de7b(0x1cd)](_0x207f87,_0x1d032b,_0x19e72a[_0x40de7b(0x182)]);break;}case v[_0x40de7b(0x1bd)]:{this['_threadCommentModel'][_0x40de7b(0x1a5)](_0x207f87,_0x1d032b,{'commentId':_0x19e72a[_0x40de7b(0x182)],'text':JSON['parse'](_0x19e72a[_0x40de7b(0x1cf)])});break;}case v[_0x40de7b(0x1a6)]:{const _0x279b78=(_0x59f6a0=this['_threadCommentModel'][_0x40de7b(0x1d7)](_0x19e72a[_0x40de7b(0x18e)])[_0x40de7b(0x1db)](_0x3a3750=>_0x3a3750['threadId']===_0x19e72a[_0x40de7b(0x1a1)]))==null?void 0x0:_0x59f6a0[_0x40de7b(0x1cc)];_0x279b78&&this[_0x40de7b(0x1bc)][_0x40de7b(0x1c8)](_0x207f87,_0x1d032b,_0x279b78['id'],_0x19e72a[_0x40de7b(0x1c5)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x38eaf9(_0x11cf3a)),p(0x1,_0x38eaf9(_0x49dc2a)),p(0x2,_0x38eaf9(_0x38a066)),p(0x3,_0x38eaf9(_0x441a4f))],_);const z='thread-comment-data-source.config',O={};var k=Object[_0x5cf493(0x1c0)],Q=(_0x5785b9,_0x38e50f,_0xe4a653,_0x553775)=>{const _0x3aba7d=_0x5cf493;for(var _0x15b12e=_0x553775>0x1?void 0x0:_0x553775?k(_0x38e50f,_0xe4a653):_0x38e50f,_0x5d7298=_0x5785b9[_0x3aba7d(0x1c1)]-0x1,_0x5ef502;_0x5d7298>=0x0;_0x5d7298--)(_0x5ef502=_0x5785b9[_0x5d7298])&&(_0x15b12e=_0x5ef502(_0x15b12e)||_0x15b12e);return _0x15b12e;},b=(_0x28b6cd,_0x36e2cf)=>(_0x2c6030,_0x5e1f7c)=>_0x36e2cf(_0x2c6030,_0x5e1f7c,_0x28b6cd);function _0x30fe(_0x13a02c,_0x5d4466){const _0x44e44c=_0x44e4();return _0x30fe=function(_0x30fea5,_0x15e992){_0x30fea5=_0x30fea5-0x180;let _0x56a1e8=_0x44e44c[_0x30fea5];return _0x56a1e8;},_0x30fe(_0x13a02c,_0x5d4466);}function X(_0x5b0494,_0x41587e){const _0x51d25d=_0x5cf493,_0x5df8c5=_0x5b0494[_0x51d25d(0x19d)][0x0];return{..._0x41587e,'id':_0x5df8c5[_0x51d25d(0x182)],'resolved':_0x5b0494[_0x51d25d(0x1c5)]===0x1,'dT':y(_0x5df8c5['createTimestamp']),'personId':_0x5df8c5[_0x51d25d(0x1e2)],'threadId':_0x5df8c5[_0x51d25d(0x1a1)]};}function ee(_0x4b4c9f,_0x11e9ac,_0x321768){const _0x5d75e1=_0x5cf493;var _0x14a91d,_0xc77e90;if(((_0xc77e90=(_0x14a91d=_0x4b4c9f==null?void 0x0:_0x4b4c9f[_0x5d75e1(0x19d)])==null?void 0x0:_0x14a91d[_0x5d75e1(0x1c1)])!=null?_0xc77e90:0x0)>0x0){const _0x58d1e5=(_0x2de3f9,_0x25a553)=>({'id':_0x2de3f9[_0x5d75e1(0x182)],'threadId':_0x2de3f9[_0x5d75e1(0x1a1)],'dT':y(_0x2de3f9[_0x5d75e1(0x19c)]),'personId':_0x2de3f9['userId'],'resolved':_0x4b4c9f[_0x5d75e1(0x1c5)]===I['Solved'],'unitId':_0x11e9ac,'subUnitId':_0x321768,'text':JSON[_0x5d75e1(0x1be)](_0x2de3f9[_0x5d75e1(0x1cf)]),'parentId':_0x25a553}),_0x46dcff=_0x58d1e5(_0x4b4c9f[_0x5d75e1(0x19d)][0x0]);return{..._0x46dcff,'children':_0x4b4c9f[_0x5d75e1(0x19d)][_0x5d75e1(0x1b6)](0x1)[_0x5d75e1(0x193)](_0xfbcb40=>_0x58d1e5(_0xfbcb40,_0x46dcff['id']))};}return null;}let S=class{constructor(_0x3c22a6,_0x4e4cd7,_0x2662a4){const _0x1ce1be=_0x5cf493;this[_0x1ce1be(0x1c9)]=_0x3c22a6,this['_userService']=_0x4e4cd7,this['_sessionService']=_0x2662a4;}async['addComment'](_0x28bc44){const _0x50f00c=_0x5cf493;var _0x276f49,_0x3a6e54;const {parentId:_0x1030d0,unitId:_0x2d8f23,text:_0x1141bd,threadId:_0x5b8b5c}=_0x28bc44,_0x5d0582=(_0x3a6e54=(_0x276f49=_0x1141bd['customRanges'])==null?void 0x0:_0x276f49[_0x50f00c(0x1a3)](_0x25e74f=>_0x25e74f[_0x50f00c(0x19a)]===_0x512e3e[_0x50f00c(0x1af)])[_0x50f00c(0x193)](_0x6b099d=>_0x6b099d[_0x50f00c(0x1df)]))!=null?_0x3a6e54:[],_0x252da3=JSON['stringify'](_0x1141bd),_0x2e3441=(await this[_0x50f00c(0x1d3)][_0x50f00c(0x1ca)](_0x2d8f23))[_0x50f00c(0x18f)]();if(_0x1030d0){const _0xeb8965={'memberId':_0x2e3441,'unitId':_0x2d8f23,'content':_0x252da3,'mention':_0x5d0582,'threadId':_0x5b8b5c},_0x173ef4=(await this[_0x50f00c(0x1c9)]['post'](_0x50f00c(0x1c6)+_0x2d8f23+_0x50f00c(0x1de),{'body':_0xeb8965}))[_0x50f00c(0x1a9)]['reply'];return{..._0x28bc44,'id':_0x173ef4[_0x50f00c(0x182)],'dT':_0x243e5e(+_0x173ef4[_0x50f00c(0x19c)])[_0x50f00c(0x199)](_0x50f00c(0x1d0)),'personId':_0x173ef4[_0x50f00c(0x1e2)]};}else{const _0xcc9556={'memberId':_0x2e3441,'unitId':_0x2d8f23,'content':_0x252da3,'mention':_0x5d0582},_0x2917be=await this[_0x50f00c(0x1c9)][_0x50f00c(0x1dd)](_0x50f00c(0x1c6)+_0x2d8f23+_0x50f00c(0x194),{'body':_0xcc9556});return X(_0x2917be[_0x50f00c(0x1a9)][_0x50f00c(0x1b7)],_0x28bc44);}}async[_0x5cf493(0x1a5)](_0x2329c9){const _0xbb189d=_0x5cf493;var _0x36fad4,_0xeb881b;const {text:_0xf85fc1,unitId:_0x2ad134}=_0x2329c9,_0x10397c=(_0xeb881b=(_0x36fad4=_0xf85fc1[_0xbb189d(0x1b2)])==null?void 0x0:_0x36fad4['filter'](_0x3706e5=>_0x3706e5[_0xbb189d(0x19a)]===_0x512e3e['COMMENT'])['map'](_0x15a8f0=>_0x15a8f0[_0xbb189d(0x1df)]))!=null?_0xeb881b:[],_0x3dfd5a=JSON[_0xbb189d(0x196)](_0xf85fc1),_0x59c3e4=_0x2329c9['threadId'],_0x31e033=_0x2329c9['id'],_0xc57238={'memberId':(await this[_0xbb189d(0x1d3)]['requireSession'](_0x2ad134))['getMemberID'](),'unitId':_0x2ad134,'threadId':_0x59c3e4,'mention':_0x10397c,'content':_0x3dfd5a,'replyId':_0x31e033},_0x3c8372=await this[_0xbb189d(0x1c9)][_0xbb189d(0x1dd)]('/universer-api/comment/unit/'+_0x2ad134+_0xbb189d(0x180),{'body':_0xc57238});return!_0x3c8372['body']['error']||_0x3c8372[_0xbb189d(0x1a9)][_0xbb189d(0x188)]['code']===0x1;}async[_0x5cf493(0x1c8)](_0x56cf98){const _0x558233=_0x5cf493,{unitId:_0x2fcdae}=_0x56cf98,_0x5bc2bb=_0x56cf98[_0x558233(0x1a1)],_0x6e8a89={'memberId':this[_0x558233(0x1c4)]['getCurrentUser']()[_0x558233(0x19f)],'unitId':_0x2fcdae,'threadId':_0x5bc2bb,'solved':_0x56cf98[_0x558233(0x1b0)]?I[_0x558233(0x184)]:I[_0x558233(0x186)]},_0xc0b15b=await this[_0x558233(0x1c9)][_0x558233(0x1dd)](_0x558233(0x1c6)+_0x2fcdae+_0x558233(0x1a4),{'body':_0x6e8a89});return!_0xc0b15b[_0x558233(0x1a9)]['error']||_0xc0b15b[_0x558233(0x1a9)][_0x558233(0x188)][_0x558233(0x1cb)]===0x1;}async['deleteComment'](_0x3593cf,_0x5e8d47,_0x2a0744,_0x5499a6){const _0x2eadfb=_0x5cf493,_0x4d4976={'memberId':(await this['_sessionService'][_0x2eadfb(0x1ca)](_0x3593cf))[_0x2eadfb(0x18f)](),'threadId':_0x2a0744,'replyId':_0x5499a6,'unitId':_0x3593cf},_0x2b1f24=await this[_0x2eadfb(0x1c9)][_0x2eadfb(0x1dd)](_0x2eadfb(0x1c6)+_0x3593cf+'/delete',{'body':_0x4d4976});return!_0x2b1f24[_0x2eadfb(0x1a9)][_0x2eadfb(0x188)]||_0x2b1f24['body'][_0x2eadfb(0x188)]['code']===0x1;}async['listComments'](_0x5d42b1,_0x1352ec,_0x4f0e99){const _0x195858=_0x5cf493,_0x5c002b={'unitId':_0x5d42b1,'threadId':_0x4f0e99},_0x9ab942=await this['_httpService'][_0x195858(0x1dd)](_0x195858(0x1c6)+_0x5d42b1+_0x195858(0x18b),{'body':_0x5c002b}),_0x27d9d5=_0x4f0e99['map'](_0x18910c=>ee(_0x9ab942[_0x195858(0x1a9)][_0x195858(0x1b8)][_0x18910c],_0x5d42b1,_0x1352ec))[_0x195858(0x1a3)](Boolean);return Object[_0x195858(0x197)](_0x9ab942[_0x195858(0x1a9)][_0x195858(0x1bb)])[_0x195858(0x1ab)](_0x1b2e9c=>{const _0x3e2c7a=_0x195858;this[_0x3e2c7a(0x1c4)][_0x3e2c7a(0x183)](_0x1b2e9c);}),_0x27d9d5;}[_0x5cf493(0x18c)](_0x11d155){const _0x511a74=_0x5cf493;return{'id':_0x11d155['id'],'threadId':_0x11d155['threadId'],'ref':_0x11d155[_0x511a74(0x1d5)]};}};S=Q([b(0x0,_0x38eaf9(_0x45151c)),b(0x1,_0x38eaf9(_0x38a066)),b(0x2,_0x38eaf9(_0x1dd800))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x265245,_0xeff6e2,_0x4a888c,_0x3cbdcd)=>{for(var _0x35f1d8=_0x3cbdcd>0x1?void 0x0:_0x3cbdcd?re(_0xeff6e2,_0x4a888c):_0xeff6e2,_0x76137c=_0x265245['length']-0x1,_0x277408;_0x76137c>=0x0;_0x76137c--)(_0x277408=_0x265245[_0x76137c])&&(_0x35f1d8=_0x277408(_0x35f1d8)||_0x35f1d8);return _0x35f1d8;},M=(_0x31d5db,_0x4bba8c)=>(_0x417642,_0x3e8fa6)=>_0x4bba8c(_0x417642,_0x3e8fa6,_0x31d5db);let f=class extends _0x5b2137{constructor(_0x3533dd,_0x102c02){const _0x435735=_0x5cf493;super(),this[_0x435735(0x18a)]=_0x3533dd,this['_threadCommentDataSource']=_0x102c02,this[_0x435735(0x1c7)]();}['_initDataSource'](){const _0x1dbfd6=_0x5cf493;this[_0x1dbfd6(0x18a)]['dataSource']=this[_0x1dbfd6(0x1dc)],this[_0x1dbfd6(0x18a)][_0x1dbfd6(0x1e1)]=!0x1;}};f=te([M(0x0,_0x410ff5),M(0x1,_0x38eaf9(S))],f);var se=Object[_0x5cf493(0x1d4)],oe=Object[_0x5cf493(0x1c0)],ne=(_0x5f4bfc,_0x6bdb32,_0x20bc0a)=>_0x6bdb32 in _0x5f4bfc?se(_0x5f4bfc,_0x6bdb32,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x20bc0a}):_0x5f4bfc[_0x6bdb32]=_0x20bc0a,ie=(_0x311c4f,_0xdd2b9d,_0x47fdc6,_0x1a02dd)=>{for(var _0x35739b=_0x1a02dd>0x1?void 0x0:_0x1a02dd?oe(_0xdd2b9d,_0x47fdc6):_0xdd2b9d,_0x531f39=_0x311c4f['length']-0x1,_0x117aed;_0x531f39>=0x0;_0x531f39--)(_0x117aed=_0x311c4f[_0x531f39])&&(_0x35739b=_0x117aed(_0x35739b)||_0x35739b);return _0x35739b;},N=(_0x5c21fa,_0x4c0e23)=>(_0x513e4d,_0x50cc87)=>_0x4c0e23(_0x513e4d,_0x50cc87,_0x5c21fa),$=(_0x1d2f77,_0x49c925,_0x3a3f71)=>ne(_0x1d2f77,typeof _0x49c925!='symbol'?_0x49c925+'':_0x49c925,_0x3a3f71);let g=class extends _0x4810b6{constructor(_0xec447b=O,_0x2a2daa,_0x2bf3d5){const _0x3bb493=_0x5cf493;super(),this[_0x3bb493(0x195)]=_0xec447b,this[_0x3bb493(0x19b)]=_0x2a2daa,this['_configService']=_0x2bf3d5;const {..._0x34e84d}=_0x190b26({},O,this[_0x3bb493(0x195)]);this['_configService'][_0x3bb493(0x1d6)](z,_0x34e84d);}['onStarting'](){const _0x29ff60=_0x5cf493;[[S],[f],[_]][_0x29ff60(0x1ab)](_0xb34e77=>{const _0x5962e4=_0x29ff60;this[_0x5962e4(0x19b)][_0x5962e4(0x1e0)](_0xb34e77);});}[_0x5cf493(0x1da)](){const _0x3de54b=_0x5cf493;this[_0x3de54b(0x19b)][_0x3de54b(0x1ac)](f),this[_0x3de54b(0x19b)]['get'](_);}};$(g,_0x5cf493(0x1d2),W),$(g,'type',_0x39fe04[_0x5cf493(0x1b3)]),g=ie([_0x45af73(_0x338aee,_0x11c3a8,_0x1c715f),N(0x1,_0x38eaf9(_0x441a4f)),N(0x2,_0x58e505)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x38fb1a=_0x3a21;(function(_0x2cf1df,_0x4d081f){const _0x20b1b6=_0x3a21,_0x136645=_0x2cf1df();while(!![]){try{const _0x1c00ce=-parseInt(_0x20b1b6(0x172))/0x1+-parseInt(_0x20b1b6(0x14d))/0x2*(parseInt(_0x20b1b6(0x187))/0x3)+-parseInt(_0x20b1b6(0x1a3))/0x4+parseInt(_0x20b1b6(0x177))/0x5+parseInt(_0x20b1b6(0x16d))/0x6*(-parseInt(_0x20b1b6(0x14c))/0x7)+-parseInt(_0x20b1b6(0x19c))/0x8+-parseInt(_0x20b1b6(0x193))/0x9*(-parseInt(_0x20b1b6(0x14a))/0xa);if(_0x1c00ce===_0x4d081f)break;else _0x136645['push'](_0x136645['shift']());}catch(_0x1296b3){_0x136645['push'](_0x136645['shift']());}}}(_0x1614,0x6b83d));import{CommentService as _0x13a843,CollaborationSessionService as _0x11edac,UniverCollaborationClientPlugin as _0x468216}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1a398b}from'@univerjs-pro/license';import{dayjs as _0x18dc99,UserManagerService as _0x5e1c86,Inject as _0x4db969,Injector as _0x899ce6,Disposable as _0x1b061a,CustomRangeType as _0x274ae2,UniverInstanceType as _0x1c9e82,DependentOn as _0x2b1585,IConfigService as _0x2f3a09,Plugin as _0x255d8a,merge as _0x43ff99}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x829ca7}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x1cdbd8,IThreadCommentDataSourceService as _0x26b277}from'@univerjs/thread-comment';import{bufferTime as _0x1ef2de}from'rxjs';import{HTTPService as _0x1bacc9}from'@univerjs/network';const W=_0x38fb1a(0x192);function _0x1614(){const _0x47e130=['length','ref','_threadCommentDataSource','resolveComment','format','/universer-api/comment/unit/','requireSession','personId','map','reply','388956YLyiUF','saveCommentToSnapshot','Reply','parse','userID','post','root','Add','error','_threadCommentModel','_commentService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','7425gmpgXZ','_initUserSync','size','replyId','solved','_config','get','/universer-api/user/list','addComment','4269472MHoOHI','getCurrentUser','delete','add','/list','userId','disposeWithMe','2767352iwQgum','thread-comment-data-source.config','symbol','Solved','slice','getComment','parentId','UNRECOGNIZED','_userService','subscribe','getOwnPropertyDescriptor','_initDataSource','_configService','defineProperty','addUser','29930YjcRdw','replies','37331wcPXSX','2HEmGta','comment','/add','unitId','createTimestamp','Solve','UNIVER_UNKNOWN','COMMENT','/edit','_threadCommentDataSourceService','code','user','customRanges','threadId','deleteComment','payload','getUser','resolved','getUnit','filter','YYYY/MM/DD\x20HH:mm','/delete','type','_sessionService','Edit','/solved','OpenOrReOpen','/reply','pluginName','users','rangeType','_injector','234aLZVuO','commentUpdate$','pipe','Delete','_httpService','583960ApnHTx','onReady','Unknown','onStarting','forEach','591385vLvltn','getMemberID','body','syncUpdateMutationToColla','updateComment','_init'];_0x1614=function(){return _0x47e130;};return _0x1614();}var I=(_0x552a99=>(_0x552a99[_0x552a99[_0x38fb1a(0x167)]=0x0]='OpenOrReOpen',_0x552a99[_0x552a99['Solved']=0x1]=_0x38fb1a(0x1a6),_0x552a99[_0x552a99[_0x38fb1a(0x1aa)]=-0x1]=_0x38fb1a(0x1aa),_0x552a99))(I||{}),v=(_0x1b2830=>(_0x1b2830[_0x1b2830[_0x38fb1a(0x174)]=0x0]='Unknown',_0x1b2830[_0x1b2830[_0x38fb1a(0x18e)]=0x1]=_0x38fb1a(0x18e),_0x1b2830[_0x1b2830[_0x38fb1a(0x189)]=0x2]='Reply',_0x1b2830[_0x1b2830[_0x38fb1a(0x165)]=0x3]='Edit',_0x1b2830[_0x1b2830[_0x38fb1a(0x170)]=0x4]=_0x38fb1a(0x170),_0x1b2830[_0x1b2830[_0x38fb1a(0x152)]=0x5]=_0x38fb1a(0x152),_0x1b2830[_0x1b2830['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x1b2830))(v||{});const y=_0x1908bf=>_0x18dc99(new Date(+_0x1908bf))[_0x38fb1a(0x181)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x4c9f4e,_0x11283b)=>{const _0x37f6ef=_0x38fb1a,_0x529564=_0x4c9f4e[_0x37f6ef(0x199)](_0x5e1c86),_0x4cd0e2=_0x4c9f4e[_0x37f6ef(0x199)](_0x1bacc9);_0x11283b[_0x37f6ef(0x176)](_0x374081=>{const _0x475dc2=_0x37f6ef;_0x529564[_0x475dc2(0x15d)](_0x374081)&&_0x11283b[_0x475dc2(0x19e)](_0x374081);}),_0x11283b[_0x37f6ef(0x195)]&&(await _0x4cd0e2[_0x37f6ef(0x199)](_0x37f6ef(0x19a),{'params':{'userIDs':[..._0x11283b]}}))[_0x37f6ef(0x179)][_0x37f6ef(0x16a)][_0x37f6ef(0x176)](_0x509ccb=>{const _0x39f117=_0x37f6ef;_0x509ccb&&_0x529564[_0x39f117(0x149)](_0x509ccb);});};var K=Object[_0x38fb1a(0x145)],V=(_0x32a841,_0x567eb7,_0x439e18,_0x38a6ef)=>{for(var _0x339250=_0x38a6ef>0x1?void 0x0:_0x38a6ef?K(_0x567eb7,_0x439e18):_0x567eb7,_0x31ce1d=_0x32a841['length']-0x1,_0x543b1b;_0x31ce1d>=0x0;_0x31ce1d--)(_0x543b1b=_0x32a841[_0x31ce1d])&&(_0x339250=_0x543b1b(_0x339250)||_0x339250);return _0x339250;},p=(_0x6d784e,_0x243b2b)=>(_0x16773e,_0x26f6b7)=>_0x243b2b(_0x16773e,_0x26f6b7,_0x6d784e);let _=class extends _0x1b061a{constructor(_0xf0b40b,_0x3e57b0,_0x133b99,_0x39df8e){const _0x5efebe=_0x38fb1a;super(),this[_0x5efebe(0x191)]=_0xf0b40b,this['_threadCommentModel']=_0x3e57b0,this[_0x5efebe(0x1ab)]=_0x133b99,this[_0x5efebe(0x16c)]=_0x39df8e,this[_0x5efebe(0x17c)](),this['_initUserSync']();}[_0x38fb1a(0x194)](){const _0x4ab2cd=_0x38fb1a;this[_0x4ab2cd(0x1a2)](this['_threadCommentModel'][_0x4ab2cd(0x16e)][_0x4ab2cd(0x16f)](_0x1ef2de(0x10))[_0x4ab2cd(0x1ac)](_0x8a44d3=>{const _0x2ec5a0=new Set();_0x8a44d3['forEach'](_0x445f58=>{const _0x53daa6=_0x3a21;switch(_0x445f58[_0x53daa6(0x163)]){case _0x53daa6(0x19f):{const _0x2cd792=_0x445f58[_0x53daa6(0x15c)][_0x53daa6(0x184)];_0x2ec5a0[_0x53daa6(0x19f)](_0x2cd792);break;}}}),B(this['_injector'],_0x2ec5a0);}));}[_0x38fb1a(0x17c)](){const _0x5d646c=_0x38fb1a;this['disposeWithMe'](this[_0x5d646c(0x191)]['commentUpdate$']['subscribe'](async _0x698d12=>{const _0x16aab6=_0x5d646c;var _0x456d8e,_0x418fb0,_0x45095b,_0x5c1d25;const _0x16ddf3=(_0x456d8e=this[_0x16aab6(0x190)][_0x16aab6(0x15f)](_0x698d12[_0x16aab6(0x150)])['find'](_0xb0f637=>_0xb0f637[_0x16aab6(0x15a)]===_0x698d12[_0x16aab6(0x15a)]))==null?void 0x0:_0x456d8e['root'];if(!_0x16ddf3)return;const {unitId:_0x253c4e,subUnitId:_0x23e03b}=_0x16ddf3;switch(_0x698d12[_0x16aab6(0x158)]&&this[_0x16aab6(0x1ab)][_0x16aab6(0x149)](_0x698d12['user']),_0x698d12[_0x16aab6(0x163)]){case v[_0x16aab6(0x18e)]:break;case v[_0x16aab6(0x189)]:{this[_0x16aab6(0x190)][_0x16aab6(0x19b)](_0x253c4e,_0x23e03b,{'unitId':_0x253c4e,'subUnitId':_0x23e03b,'ref':'','id':_0x698d12['replyId'],'dT':y(+_0x698d12[_0x16aab6(0x151)]),'threadId':_0x698d12[_0x16aab6(0x15a)],'personId':(_0x45095b=(_0x418fb0=_0x698d12[_0x16aab6(0x158)])==null?void 0x0:_0x418fb0[_0x16aab6(0x18b)])!=null?_0x45095b:_0x698d12[_0x16aab6(0x1a1)],'text':JSON['parse'](_0x698d12['content']),'parentId':_0x16ddf3['id']});break;}case v[_0x16aab6(0x170)]:{const _0x53721e=this[_0x16aab6(0x190)][_0x16aab6(0x1a8)](_0x253c4e,_0x23e03b,_0x698d12[_0x16aab6(0x196)]);_0x53721e&&_0x53721e[_0x16aab6(0x1a9)]&&this[_0x16aab6(0x190)][_0x16aab6(0x15b)](_0x253c4e,_0x23e03b,_0x698d12[_0x16aab6(0x196)]);break;}case v['Edit']:{this[_0x16aab6(0x190)][_0x16aab6(0x17b)](_0x253c4e,_0x23e03b,{'commentId':_0x698d12['replyId'],'text':JSON[_0x16aab6(0x18a)](_0x698d12['content'])});break;}case v[_0x16aab6(0x152)]:{const _0x6bac75=(_0x5c1d25=this['_threadCommentModel'][_0x16aab6(0x15f)](_0x698d12['unitId'])['find'](_0x333087=>_0x333087[_0x16aab6(0x15a)]===_0x698d12[_0x16aab6(0x15a)]))==null?void 0x0:_0x5c1d25[_0x16aab6(0x18d)];_0x6bac75&&this[_0x16aab6(0x190)][_0x16aab6(0x180)](_0x253c4e,_0x23e03b,_0x6bac75['id'],_0x698d12['solved']===I[_0x16aab6(0x1a6)]);break;}}}));}};_=V([p(0x0,_0x4db969(_0x13a843)),p(0x1,_0x4db969(_0x1cdbd8)),p(0x2,_0x4db969(_0x5e1c86)),p(0x3,_0x4db969(_0x899ce6))],_);const z=_0x38fb1a(0x1a4),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x1d9239,_0x53e06f,_0x3cedd4,_0x493e84)=>{for(var _0x13ab65=_0x493e84>0x1?void 0x0:_0x493e84?k(_0x53e06f,_0x3cedd4):_0x53e06f,_0x502c89=_0x1d9239['length']-0x1,_0x11f9bc;_0x502c89>=0x0;_0x502c89--)(_0x11f9bc=_0x1d9239[_0x502c89])&&(_0x13ab65=_0x11f9bc(_0x13ab65)||_0x13ab65);return _0x13ab65;},b=(_0x4ffacb,_0xa66fc1)=>(_0x4976fb,_0x39f977)=>_0xa66fc1(_0x4976fb,_0x39f977,_0x4ffacb);function X(_0x29c9c5,_0x39f4d8){const _0x55fd67=_0x38fb1a,_0x35bf36=_0x29c9c5[_0x55fd67(0x14b)][0x0];return{..._0x39f4d8,'id':_0x35bf36['replyId'],'resolved':_0x29c9c5[_0x55fd67(0x197)]===0x1,'dT':y(_0x35bf36['createTimestamp']),'personId':_0x35bf36[_0x55fd67(0x1a1)],'threadId':_0x35bf36[_0x55fd67(0x15a)]};}function ee(_0x14b2a7,_0x1b3c23,_0x565e6){const _0x39e9ac=_0x38fb1a;var _0x4eb305,_0xe22baf;if(((_0xe22baf=(_0x4eb305=_0x14b2a7==null?void 0x0:_0x14b2a7[_0x39e9ac(0x14b)])==null?void 0x0:_0x4eb305[_0x39e9ac(0x17d)])!=null?_0xe22baf:0x0)>0x0){const _0x3cbf1e=(_0x7e586f,_0x45fe3b)=>({'id':_0x7e586f[_0x39e9ac(0x196)],'threadId':_0x7e586f[_0x39e9ac(0x15a)],'dT':y(_0x7e586f[_0x39e9ac(0x151)]),'personId':_0x7e586f[_0x39e9ac(0x1a1)],'resolved':_0x14b2a7[_0x39e9ac(0x197)]===I[_0x39e9ac(0x1a6)],'unitId':_0x1b3c23,'subUnitId':_0x565e6,'text':JSON[_0x39e9ac(0x18a)](_0x7e586f['content']),'parentId':_0x45fe3b}),_0x4ba3ce=_0x3cbf1e(_0x14b2a7[_0x39e9ac(0x14b)][0x0]);return{..._0x4ba3ce,'children':_0x14b2a7[_0x39e9ac(0x14b)][_0x39e9ac(0x1a7)](0x1)[_0x39e9ac(0x185)](_0x575b10=>_0x3cbf1e(_0x575b10,_0x4ba3ce['id']))};}return null;}let S=class{constructor(_0x39bb57,_0x5e54b9,_0x431c39){const _0x2a50bb=_0x38fb1a;this['_httpService']=_0x39bb57,this[_0x2a50bb(0x1ab)]=_0x5e54b9,this[_0x2a50bb(0x164)]=_0x431c39;}async['addComment'](_0x559ef3){const _0x224580=_0x38fb1a;var _0x248c85,_0x3b89c1;const {parentId:_0x28ba24,unitId:_0x3c423c,text:_0x17199f,threadId:_0x5174ca}=_0x559ef3,_0x4b2b03=(_0x3b89c1=(_0x248c85=_0x17199f[_0x224580(0x159)])==null?void 0x0:_0x248c85[_0x224580(0x160)](_0x347df3=>_0x347df3[_0x224580(0x16b)]===_0x274ae2[_0x224580(0x154)])[_0x224580(0x185)](_0x2a0667=>_0x2a0667['rangeId']))!=null?_0x3b89c1:[],_0x54008a=JSON['stringify'](_0x17199f),_0x43aaf2=(await this['_sessionService']['requireSession'](_0x3c423c))[_0x224580(0x178)]();if(_0x28ba24){const _0x48b4bf={'memberId':_0x43aaf2,'unitId':_0x3c423c,'content':_0x54008a,'mention':_0x4b2b03,'threadId':_0x5174ca},_0x1e3877=(await this[_0x224580(0x171)][_0x224580(0x18c)](_0x224580(0x182)+_0x3c423c+_0x224580(0x168),{'body':_0x48b4bf}))[_0x224580(0x179)][_0x224580(0x186)];return{..._0x559ef3,'id':_0x1e3877['replyId'],'dT':_0x18dc99(+_0x1e3877['createTimestamp'])[_0x224580(0x181)](_0x224580(0x161)),'personId':_0x1e3877[_0x224580(0x1a1)]};}else{const _0x3650ab={'memberId':_0x43aaf2,'unitId':_0x3c423c,'content':_0x54008a,'mention':_0x4b2b03},_0x26b41b=await this[_0x224580(0x171)][_0x224580(0x18c)]('/universer-api/comment/unit/'+_0x3c423c+_0x224580(0x14f),{'body':_0x3650ab});return X(_0x26b41b['body'][_0x224580(0x14e)],_0x559ef3);}}async[_0x38fb1a(0x17b)](_0x439e8d){const _0x3946e2=_0x38fb1a;var _0x58f34e,_0x475c77;const {text:_0x20be11,unitId:_0xda99a1}=_0x439e8d,_0x4c2b5d=(_0x475c77=(_0x58f34e=_0x20be11[_0x3946e2(0x159)])==null?void 0x0:_0x58f34e['filter'](_0x1a5dff=>_0x1a5dff[_0x3946e2(0x16b)]===_0x274ae2[_0x3946e2(0x154)])[_0x3946e2(0x185)](_0x337f88=>_0x337f88['rangeId']))!=null?_0x475c77:[],_0x1b079a=JSON['stringify'](_0x20be11),_0x52626a=_0x439e8d[_0x3946e2(0x15a)],_0x53a621=_0x439e8d['id'],_0x31b228={'memberId':(await this[_0x3946e2(0x164)][_0x3946e2(0x183)](_0xda99a1))[_0x3946e2(0x178)](),'unitId':_0xda99a1,'threadId':_0x52626a,'mention':_0x4c2b5d,'content':_0x1b079a,'replyId':_0x53a621},_0x246a00=await this[_0x3946e2(0x171)][_0x3946e2(0x18c)](_0x3946e2(0x182)+_0xda99a1+_0x3946e2(0x155),{'body':_0x31b228});return!_0x246a00[_0x3946e2(0x179)]['error']||_0x246a00['body'][_0x3946e2(0x18f)][_0x3946e2(0x157)]===0x1;}async[_0x38fb1a(0x180)](_0x436090){const _0x4d56fc=_0x38fb1a,{unitId:_0x26abc7}=_0x436090,_0x5a7e44=_0x436090[_0x4d56fc(0x15a)],_0x2267bb={'memberId':this[_0x4d56fc(0x1ab)][_0x4d56fc(0x19d)]()[_0x4d56fc(0x18b)],'unitId':_0x26abc7,'threadId':_0x5a7e44,'solved':_0x436090[_0x4d56fc(0x15e)]?I[_0x4d56fc(0x1a6)]:I[_0x4d56fc(0x167)]},_0x257984=await this[_0x4d56fc(0x171)][_0x4d56fc(0x18c)](_0x4d56fc(0x182)+_0x26abc7+_0x4d56fc(0x166),{'body':_0x2267bb});return!_0x257984[_0x4d56fc(0x179)][_0x4d56fc(0x18f)]||_0x257984[_0x4d56fc(0x179)][_0x4d56fc(0x18f)][_0x4d56fc(0x157)]===0x1;}async[_0x38fb1a(0x15b)](_0x5c7992,_0x4da300,_0x36c9ff,_0x2bf270){const _0x50f4c9=_0x38fb1a,_0x4c63e6={'memberId':(await this[_0x50f4c9(0x164)]['requireSession'](_0x5c7992))['getMemberID'](),'threadId':_0x36c9ff,'replyId':_0x2bf270,'unitId':_0x5c7992},_0x595d97=await this[_0x50f4c9(0x171)]['post'](_0x50f4c9(0x182)+_0x5c7992+_0x50f4c9(0x162),{'body':_0x4c63e6});return!_0x595d97[_0x50f4c9(0x179)][_0x50f4c9(0x18f)]||_0x595d97[_0x50f4c9(0x179)][_0x50f4c9(0x18f)][_0x50f4c9(0x157)]===0x1;}async['listComments'](_0x35a972,_0x4b519a,_0x2ba610){const _0x2b6c05=_0x38fb1a,_0x2c8769={'unitId':_0x35a972,'threadId':_0x2ba610},_0x26fad6=await this[_0x2b6c05(0x171)]['post'](_0x2b6c05(0x182)+_0x35a972+_0x2b6c05(0x1a0),{'body':_0x2c8769}),_0x3fdc58=_0x2ba610[_0x2b6c05(0x185)](_0x11c814=>ee(_0x26fad6[_0x2b6c05(0x179)]['comments'][_0x11c814],_0x35a972,_0x4b519a))[_0x2b6c05(0x160)](Boolean);return Object['values'](_0x26fad6[_0x2b6c05(0x179)][_0x2b6c05(0x16a)])['forEach'](_0x59c3f4=>{const _0x49d500=_0x2b6c05;this[_0x49d500(0x1ab)][_0x49d500(0x149)](_0x59c3f4);}),_0x3fdc58;}[_0x38fb1a(0x188)](_0x46a07d){const _0x5e7bd3=_0x38fb1a;return{'id':_0x46a07d['id'],'threadId':_0x46a07d[_0x5e7bd3(0x15a)],'ref':_0x46a07d[_0x5e7bd3(0x17e)]};}};S=Q([b(0x0,_0x4db969(_0x1bacc9)),b(0x1,_0x4db969(_0x5e1c86)),b(0x2,_0x4db969(_0x11edac))],S);var re=Object[_0x38fb1a(0x145)],te=(_0x4fa28b,_0x579834,_0x11437f,_0x40e919)=>{const _0x440783=_0x38fb1a;for(var _0x4ba439=_0x40e919>0x1?void 0x0:_0x40e919?re(_0x579834,_0x11437f):_0x579834,_0x1358c5=_0x4fa28b[_0x440783(0x17d)]-0x1,_0x2141af;_0x1358c5>=0x0;_0x1358c5--)(_0x2141af=_0x4fa28b[_0x1358c5])&&(_0x4ba439=_0x2141af(_0x4ba439)||_0x4ba439);return _0x4ba439;},M=(_0x536d60,_0x24bb60)=>(_0x1cfb57,_0x592f20)=>_0x24bb60(_0x1cfb57,_0x592f20,_0x536d60);let f=class extends _0x1b061a{constructor(_0x2289ec,_0x185e4e){const _0xc25fbe=_0x38fb1a;super(),this[_0xc25fbe(0x156)]=_0x2289ec,this['_threadCommentDataSource']=_0x185e4e,this['_initDataSource']();}[_0x38fb1a(0x146)](){const _0x15b524=_0x38fb1a;this[_0x15b524(0x156)]['dataSource']=this[_0x15b524(0x17f)],this[_0x15b524(0x156)][_0x15b524(0x17a)]=!0x1;}};function _0x3a21(_0x32e8ab,_0x17c395){const _0x1614c3=_0x1614();return _0x3a21=function(_0x3a2174,_0x458669){_0x3a2174=_0x3a2174-0x145;let _0x166d32=_0x1614c3[_0x3a2174];return _0x166d32;},_0x3a21(_0x32e8ab,_0x17c395);}f=te([M(0x0,_0x26b277),M(0x1,_0x4db969(S))],f);var se=Object[_0x38fb1a(0x148)],oe=Object[_0x38fb1a(0x145)],ne=(_0xa66428,_0x40c905,_0xbf668b)=>_0x40c905 in _0xa66428?se(_0xa66428,_0x40c905,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xbf668b}):_0xa66428[_0x40c905]=_0xbf668b,ie=(_0x69f286,_0x1da40a,_0x5be4e4,_0x31cca6)=>{const _0x4988ae=_0x38fb1a;for(var _0x7c5c36=_0x31cca6>0x1?void 0x0:_0x31cca6?oe(_0x1da40a,_0x5be4e4):_0x1da40a,_0x2951f3=_0x69f286[_0x4988ae(0x17d)]-0x1,_0x3c4667;_0x2951f3>=0x0;_0x2951f3--)(_0x3c4667=_0x69f286[_0x2951f3])&&(_0x7c5c36=_0x3c4667(_0x7c5c36)||_0x7c5c36);return _0x7c5c36;},N=(_0x229923,_0xd682a)=>(_0x2e584d,_0x175e33)=>_0xd682a(_0x2e584d,_0x175e33,_0x229923),$=(_0x545f62,_0x3d8b26,_0x85a80a)=>ne(_0x545f62,typeof _0x3d8b26!=_0x38fb1a(0x1a5)?_0x3d8b26+'':_0x3d8b26,_0x85a80a);let g=class extends _0x255d8a{constructor(_0x735f4=O,_0x29601d,_0x2a3e7b){const _0x5c44f4=_0x38fb1a;super(),this['_config']=_0x735f4,this[_0x5c44f4(0x16c)]=_0x29601d,this[_0x5c44f4(0x147)]=_0x2a3e7b;const {..._0x1c2d4e}=_0x43ff99({},O,this[_0x5c44f4(0x198)]);this['_configService']['setConfig'](z,_0x1c2d4e);}[_0x38fb1a(0x175)](){[[S],[f],[_]]['forEach'](_0x32f8bf=>{const _0xbf509=_0x3a21;this[_0xbf509(0x16c)][_0xbf509(0x19f)](_0x32f8bf);});}[_0x38fb1a(0x173)](){const _0x25171b=_0x38fb1a;this[_0x25171b(0x16c)][_0x25171b(0x199)](f),this[_0x25171b(0x16c)][_0x25171b(0x199)](_);}};$(g,_0x38fb1a(0x169),W),$(g,_0x38fb1a(0x163),_0x1c9e82[_0x38fb1a(0x153)]),g=ie([_0x2b1585(_0x829ca7,_0x468216,_0x1a398b),N(0x1,_0x4db969(_0x899ce6)),N(0x2,_0x2f3a09)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x16fd(_0x167e95,_0x3bb8dc){const _0x4091e0=_0x4091();return _0x16fd=function(_0x16fd01,_0x22231e){_0x16fd01=_0x16fd01-0x1a7;let _0x24b159=_0x4091e0[_0x16fd01];return _0x24b159;},_0x16fd(_0x167e95,_0x3bb8dc);}function _0x4091(){const _0x477050=['subscribe','map','bufferTime','CommentService','updateComment','threadId','_initUserSync','Reply','getUnit','_init','CollaborationSessionService','content','91oYsmHo','pluginName','onStarting','UniverThreadCommentUi','Solved','amd','21159ZFoSOC','COMMENT','requireSession','2204213VTZXTC','code','reply','getComment','payload','body','userId','getMemberID','getCurrentUser','getOwnPropertyDescriptor','_userService','forEach','symbol','find','UNRECOGNIZED','customRanges','3084veOXms','replies','Edit','users','Unknown','57232vBYLuX','setConfig','IConfigService','dayjs','YYYY/MM/DD\x20HH:mm','1256190SENcTF','Add','_initDataSource','createTimestamp','stringify','type','parse','slice','UniverThreadComment','CustomRangeType','post','syncUpdateMutationToColla','exports','Injector','UserManagerService','3305hWdzLy','_commentService','pipe','566052pTJHkt','Solve','29926GzRBgS','resolveComment','listComments','/edit','UniverThreadCommentUIPlugin','_httpService','12vkVpvK','UniverNetwork','@univerjs/thread-comment','@univerjs-pro/collaboration-client','merge','@univerjs/network','format','HTTPService','Module','UniverProCollaborationClient','/universer-api/comment/unit/','_injector','31jGlMbi','get','_threadCommentDataSource','disposeWithMe','rxjs','addComment','deleteComment','UniverThreadCommentDataSourcePlugin','personId','user','_sessionService','error','/add','userID','resolved','ref','delete','_threadCommentModel','size','/universer-api/user/list','commentUpdate$','filter','defineProperty','2070EhRuOw','replyId','length','Inject','/solved','Delete','add','thread-comment-data-source.config','OpenOrReOpen','_threadCommentDataSourceService','_config','addUser','_configService','root','parentId','onReady','values','unitId','/list','solved','toStringTag','@univerjs/thread-comment-ui','rangeType','getUser','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN'];_0x4091=function(){return _0x477050;};return _0x4091();}(function(_0x216582,_0xec6793){const _0x6cc068=_0x16fd,_0x268ba4=_0x216582();while(!![]){try{const _0x2c91b3=parseInt(_0x6cc068(0x223))/0x1*(-parseInt(_0x6cc068(0x211))/0x2)+parseInt(_0x6cc068(0x1fd))/0x3+parseInt(_0x6cc068(0x1f3))/0x4*(-parseInt(_0x6cc068(0x20c))/0x5)+parseInt(_0x6cc068(0x20f))/0x6+-parseInt(_0x6cc068(0x1da))/0x7*(-parseInt(_0x6cc068(0x1f8))/0x8)+-parseInt(_0x6cc068(0x1e0))/0x9*(-parseInt(_0x6cc068(0x1b5))/0xa)+parseInt(_0x6cc068(0x1e3))/0xb*(parseInt(_0x6cc068(0x217))/0xc);if(_0x2c91b3===_0xec6793)break;else _0x268ba4['push'](_0x268ba4['shift']());}catch(_0x3999e5){_0x268ba4['push'](_0x268ba4['shift']());}}}(_0x4091,0x4e08e),function(_0x29f917,_0x27e7a5){const _0x18477f=_0x16fd;typeof exports=='object'&&typeof module<'u'?_0x27e7a5(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define=='function'&&define[_0x18477f(0x1df)]?define([_0x18477f(0x209),_0x18477f(0x21a),'@univerjs-pro/license','@univerjs/core',_0x18477f(0x1ca),_0x18477f(0x219),_0x18477f(0x227),_0x18477f(0x21c)],_0x27e7a5):(_0x29f917=typeof globalThis<'u'?globalThis:_0x29f917||self,_0x27e7a5(_0x29f917['UniverProThreadCommentDatasource']={},_0x29f917[_0x18477f(0x220)],_0x29f917['UniverProLicense'],_0x29f917['UniverCore'],_0x29f917[_0x18477f(0x1dd)],_0x29f917[_0x18477f(0x205)],_0x29f917[_0x18477f(0x227)],_0x29f917[_0x18477f(0x218)]));}(this,function(_0x8942d1,_0x1e3e43,_0x437980,_0x13acdc,_0x4ea396,_0x21e65e,_0x47b58d,_0x2c8ff4){'use strict';const _0x2c96ed=_0x16fd;const _0x753262=_0x2c96ed(0x1cd);var _0x56e932=(_0x243239=>(_0x243239[_0x243239[_0x2c96ed(0x1bd)]=0x0]=_0x2c96ed(0x1bd),_0x243239[_0x243239[_0x2c96ed(0x1de)]=0x1]=_0x2c96ed(0x1de),_0x243239[_0x243239['UNRECOGNIZED']=-0x1]=_0x2c96ed(0x1f1),_0x243239))(_0x56e932||{}),_0x34a4b7=(_0x1efff5=>(_0x1efff5[_0x1efff5[_0x2c96ed(0x1f7)]=0x0]='Unknown',_0x1efff5[_0x1efff5[_0x2c96ed(0x1fe)]=0x1]=_0x2c96ed(0x1fe),_0x1efff5[_0x1efff5[_0x2c96ed(0x1d5)]=0x2]=_0x2c96ed(0x1d5),_0x1efff5[_0x1efff5[_0x2c96ed(0x1f5)]=0x3]=_0x2c96ed(0x1f5),_0x1efff5[_0x1efff5[_0x2c96ed(0x1ba)]=0x4]=_0x2c96ed(0x1ba),_0x1efff5[_0x1efff5[_0x2c96ed(0x210)]=0x5]=_0x2c96ed(0x210),_0x1efff5[_0x1efff5[_0x2c96ed(0x1f1)]=-0x1]=_0x2c96ed(0x1f1),_0x1efff5))(_0x34a4b7||{});const _0x3ea739=_0x24d398=>_0x13acdc[_0x2c96ed(0x1fb)](new Date(+_0x24d398))[_0x2c96ed(0x21d)](_0x2c96ed(0x1fc)),_0x4c7e1c=async(_0x3489a6,_0x3f8a4e)=>{const _0x7965e7=_0x2c96ed,_0x12219c=_0x3489a6[_0x7965e7(0x224)](_0x13acdc[_0x7965e7(0x20b)]),_0x2523c5=_0x3489a6['get'](_0x2c8ff4[_0x7965e7(0x21e)]);_0x3f8a4e['forEach'](_0xc58724=>{const _0x25a985=_0x7965e7;_0x12219c[_0x25a985(0x1cc)](_0xc58724)&&_0x3f8a4e[_0x25a985(0x1ae)](_0xc58724);}),_0x3f8a4e[_0x7965e7(0x1b0)]&&(await _0x2523c5[_0x7965e7(0x224)](_0x7965e7(0x1b1),{'params':{'userIDs':[..._0x3f8a4e]}}))[_0x7965e7(0x1e8)]['users'][_0x7965e7(0x1ee)](_0x1f0839=>{const _0x542949=_0x7965e7;_0x1f0839&&_0x12219c[_0x542949(0x1c0)](_0x1f0839);});};var _0x132a56=Object[_0x2c96ed(0x1ec)],_0xab0d97=(_0x45ce59,_0x1ae86c,_0x3fe94d,_0x3a8e79)=>{for(var _0x36db56=_0x3a8e79>0x1?void 0x0:_0x3a8e79?_0x132a56(_0x1ae86c,_0x3fe94d):_0x1ae86c,_0x1cf691=_0x45ce59['length']-0x1,_0x30c8dd;_0x1cf691>=0x0;_0x1cf691--)(_0x30c8dd=_0x45ce59[_0x1cf691])&&(_0x36db56=_0x30c8dd(_0x36db56)||_0x36db56);return _0x36db56;},_0x17f2d1=(_0x48cb13,_0x3af144)=>(_0xbb0ea7,_0x51d705)=>_0x3af144(_0xbb0ea7,_0x51d705,_0x48cb13);let _0x4bd4db=class extends _0x13acdc['Disposable']{constructor(_0x1a159f,_0x2452d0,_0x1831a6,_0xfa0a4c){const _0x3b8f0b=_0x2c96ed;super(),this[_0x3b8f0b(0x20d)]=_0x1a159f,this[_0x3b8f0b(0x1af)]=_0x2452d0,this[_0x3b8f0b(0x1ed)]=_0x1831a6,this[_0x3b8f0b(0x222)]=_0xfa0a4c,this[_0x3b8f0b(0x1d7)](),this[_0x3b8f0b(0x1d4)]();}['_initUserSync'](){const _0x5ef521=_0x2c96ed;this[_0x5ef521(0x226)](this[_0x5ef521(0x1af)][_0x5ef521(0x1b2)][_0x5ef521(0x20e)](_0x47b58d[_0x5ef521(0x1d0)](0x10))[_0x5ef521(0x1ce)](_0x2e750a=>{const _0x414ccf=_0x5ef521,_0x38d9d3=new Set();_0x2e750a[_0x414ccf(0x1ee)](_0x1afd52=>{const _0x5cefb7=_0x414ccf;switch(_0x1afd52[_0x5cefb7(0x202)]){case _0x5cefb7(0x1bb):{const _0x2c180c=_0x1afd52[_0x5cefb7(0x1e7)][_0x5cefb7(0x22b)];_0x38d9d3['add'](_0x2c180c);break;}}}),_0x4c7e1c(this[_0x414ccf(0x222)],_0x38d9d3);}));}['_init'](){const _0x55a109=_0x2c96ed;this['disposeWithMe'](this[_0x55a109(0x20d)][_0x55a109(0x1b2)][_0x55a109(0x1ce)](async _0x5ea56d=>{const _0x512eff=_0x55a109;var _0x1b2590,_0x121b1d,_0x8495f5,_0x4d5d65;const _0x17b986=(_0x1b2590=this[_0x512eff(0x1af)][_0x512eff(0x1d6)](_0x5ea56d['unitId'])[_0x512eff(0x1f0)](_0x2e885b=>_0x2e885b[_0x512eff(0x1d3)]===_0x5ea56d[_0x512eff(0x1d3)]))==null?void 0x0:_0x1b2590[_0x512eff(0x1c2)];if(!_0x17b986)return;const {unitId:_0x2bde01,subUnitId:_0xc2b0b5}=_0x17b986;switch(_0x5ea56d[_0x512eff(0x1a7)]&&this['_userService'][_0x512eff(0x1c0)](_0x5ea56d['user']),_0x5ea56d['type']){case _0x34a4b7[_0x512eff(0x1fe)]:break;case _0x34a4b7[_0x512eff(0x1d5)]:{this[_0x512eff(0x1af)][_0x512eff(0x228)](_0x2bde01,_0xc2b0b5,{'unitId':_0x2bde01,'subUnitId':_0xc2b0b5,'ref':'','id':_0x5ea56d['replyId'],'dT':_0x3ea739(+_0x5ea56d['createTimestamp']),'threadId':_0x5ea56d['threadId'],'personId':(_0x8495f5=(_0x121b1d=_0x5ea56d['user'])==null?void 0x0:_0x121b1d[_0x512eff(0x1ab)])!=null?_0x8495f5:_0x5ea56d[_0x512eff(0x1e9)],'text':JSON[_0x512eff(0x203)](_0x5ea56d['content']),'parentId':_0x17b986['id']});break;}case _0x34a4b7['Delete']:{const _0x130862=this[_0x512eff(0x1af)][_0x512eff(0x1e6)](_0x2bde01,_0xc2b0b5,_0x5ea56d[_0x512eff(0x1b6)]);_0x130862&&_0x130862[_0x512eff(0x1c3)]&&this[_0x512eff(0x1af)][_0x512eff(0x229)](_0x2bde01,_0xc2b0b5,_0x5ea56d[_0x512eff(0x1b6)]);break;}case _0x34a4b7[_0x512eff(0x1f5)]:{this[_0x512eff(0x1af)][_0x512eff(0x1d2)](_0x2bde01,_0xc2b0b5,{'commentId':_0x5ea56d['replyId'],'text':JSON['parse'](_0x5ea56d[_0x512eff(0x1d9)])});break;}case _0x34a4b7[_0x512eff(0x210)]:{const _0x500555=(_0x4d5d65=this[_0x512eff(0x1af)][_0x512eff(0x1d6)](_0x5ea56d[_0x512eff(0x1c6)])['find'](_0x4001cb=>_0x4001cb[_0x512eff(0x1d3)]===_0x5ea56d['threadId']))==null?void 0x0:_0x4d5d65['root'];_0x500555&&this[_0x512eff(0x1af)][_0x512eff(0x212)](_0x2bde01,_0xc2b0b5,_0x500555['id'],_0x5ea56d['solved']===_0x56e932[_0x512eff(0x1de)]);break;}}}));}};_0x4bd4db=_0xab0d97([_0x17f2d1(0x0,_0x13acdc['Inject'](_0x1e3e43[_0x2c96ed(0x1d1)])),_0x17f2d1(0x1,_0x13acdc[_0x2c96ed(0x1b8)](_0x21e65e['ThreadCommentModel'])),_0x17f2d1(0x2,_0x13acdc['Inject'](_0x13acdc[_0x2c96ed(0x20b)])),_0x17f2d1(0x3,_0x13acdc[_0x2c96ed(0x1b8)](_0x13acdc['Injector']))],_0x4bd4db);const _0x2ef9ba=_0x2c96ed(0x1bc),_0x5234e2={};var _0x20b0ce=Object['getOwnPropertyDescriptor'],_0x43b44e=(_0x430436,_0x151885,_0x56ada1,_0x59a1fd)=>{const _0x30e591=_0x2c96ed;for(var _0x21b14e=_0x59a1fd>0x1?void 0x0:_0x59a1fd?_0x20b0ce(_0x151885,_0x56ada1):_0x151885,_0x41db46=_0x430436[_0x30e591(0x1b7)]-0x1,_0x4b61a7;_0x41db46>=0x0;_0x41db46--)(_0x4b61a7=_0x430436[_0x41db46])&&(_0x21b14e=_0x4b61a7(_0x21b14e)||_0x21b14e);return _0x21b14e;},_0x1865db=(_0x178f7b,_0x459176)=>(_0x2084e9,_0x58f5a2)=>_0x459176(_0x2084e9,_0x58f5a2,_0x178f7b);function _0x142ac2(_0x5f3662,_0x27d05a){const _0x5af76d=_0x2c96ed,_0x3fb48a=_0x5f3662[_0x5af76d(0x1f4)][0x0];return{..._0x27d05a,'id':_0x3fb48a['replyId'],'resolved':_0x5f3662[_0x5af76d(0x1c8)]===0x1,'dT':_0x3ea739(_0x3fb48a['createTimestamp']),'personId':_0x3fb48a[_0x5af76d(0x1e9)],'threadId':_0x3fb48a['threadId']};}function _0x5707b4(_0x180705,_0x30c3e0,_0x3cbc59){const _0x308e41=_0x2c96ed;var _0x3a684c,_0x16d78d;if(((_0x16d78d=(_0x3a684c=_0x180705==null?void 0x0:_0x180705[_0x308e41(0x1f4)])==null?void 0x0:_0x3a684c[_0x308e41(0x1b7)])!=null?_0x16d78d:0x0)>0x0){const _0x35cc75=(_0x45c132,_0x446033)=>({'id':_0x45c132[_0x308e41(0x1b6)],'threadId':_0x45c132[_0x308e41(0x1d3)],'dT':_0x3ea739(_0x45c132[_0x308e41(0x200)]),'personId':_0x45c132[_0x308e41(0x1e9)],'resolved':_0x180705[_0x308e41(0x1c8)]===_0x56e932[_0x308e41(0x1de)],'unitId':_0x30c3e0,'subUnitId':_0x3cbc59,'text':JSON[_0x308e41(0x203)](_0x45c132[_0x308e41(0x1d9)]),'parentId':_0x446033}),_0xaef4cb=_0x35cc75(_0x180705['replies'][0x0]);return{..._0xaef4cb,'children':_0x180705[_0x308e41(0x1f4)][_0x308e41(0x204)](0x1)['map'](_0x185d4e=>_0x35cc75(_0x185d4e,_0xaef4cb['id']))};}return null;}let _0xbb7deb=class{constructor(_0x39de0c,_0x1b3be0,_0x1072c0){const _0x546fc3=_0x2c96ed;this[_0x546fc3(0x216)]=_0x39de0c,this[_0x546fc3(0x1ed)]=_0x1b3be0,this[_0x546fc3(0x1a8)]=_0x1072c0;}async[_0x2c96ed(0x228)](_0x496289){const _0x192790=_0x2c96ed;var _0x24f55e,_0x4d4803;const {parentId:_0x2be98b,unitId:_0x5f8e20,text:_0x16c51f,threadId:_0x16df52}=_0x496289,_0x21f1de=(_0x4d4803=(_0x24f55e=_0x16c51f[_0x192790(0x1f2)])==null?void 0x0:_0x24f55e[_0x192790(0x1b3)](_0x33f459=>_0x33f459[_0x192790(0x1cb)]===_0x13acdc[_0x192790(0x206)][_0x192790(0x1e1)])[_0x192790(0x1cf)](_0x9b10bb=>_0x9b10bb['rangeId']))!=null?_0x4d4803:[],_0x482514=JSON[_0x192790(0x201)](_0x16c51f),_0x50ed37=(await this['_sessionService'][_0x192790(0x1e2)](_0x5f8e20))['getMemberID']();if(_0x2be98b){const _0x306260={'memberId':_0x50ed37,'unitId':_0x5f8e20,'content':_0x482514,'mention':_0x21f1de,'threadId':_0x16df52},_0x54a4fa=(await this[_0x192790(0x216)][_0x192790(0x207)](_0x192790(0x221)+_0x5f8e20+'/reply',{'body':_0x306260}))[_0x192790(0x1e8)][_0x192790(0x1e5)];return{..._0x496289,'id':_0x54a4fa[_0x192790(0x1b6)],'dT':_0x13acdc[_0x192790(0x1fb)](+_0x54a4fa[_0x192790(0x200)])[_0x192790(0x21d)](_0x192790(0x1fc)),'personId':_0x54a4fa[_0x192790(0x1e9)]};}else{const _0x33234b={'memberId':_0x50ed37,'unitId':_0x5f8e20,'content':_0x482514,'mention':_0x21f1de},_0x586981=await this[_0x192790(0x216)]['post']('/universer-api/comment/unit/'+_0x5f8e20+_0x192790(0x1aa),{'body':_0x33234b});return _0x142ac2(_0x586981[_0x192790(0x1e8)]['comment'],_0x496289);}}async[_0x2c96ed(0x1d2)](_0x5351a3){const _0x17b7cc=_0x2c96ed;var _0xcc9717,_0x320f62;const {text:_0x3de68a,unitId:_0x3e5fb9}=_0x5351a3,_0x192875=(_0x320f62=(_0xcc9717=_0x3de68a[_0x17b7cc(0x1f2)])==null?void 0x0:_0xcc9717[_0x17b7cc(0x1b3)](_0x1a6a62=>_0x1a6a62[_0x17b7cc(0x1cb)]===_0x13acdc['CustomRangeType'][_0x17b7cc(0x1e1)])[_0x17b7cc(0x1cf)](_0x264ee9=>_0x264ee9['rangeId']))!=null?_0x320f62:[],_0x29dab8=JSON['stringify'](_0x3de68a),_0xd7f6c=_0x5351a3[_0x17b7cc(0x1d3)],_0x4870ef=_0x5351a3['id'],_0x2bb0de={'memberId':(await this[_0x17b7cc(0x1a8)]['requireSession'](_0x3e5fb9))[_0x17b7cc(0x1ea)](),'unitId':_0x3e5fb9,'threadId':_0xd7f6c,'mention':_0x192875,'content':_0x29dab8,'replyId':_0x4870ef},_0x4e66de=await this[_0x17b7cc(0x216)][_0x17b7cc(0x207)](_0x17b7cc(0x221)+_0x3e5fb9+_0x17b7cc(0x214),{'body':_0x2bb0de});return!_0x4e66de[_0x17b7cc(0x1e8)][_0x17b7cc(0x1a9)]||_0x4e66de['body'][_0x17b7cc(0x1a9)][_0x17b7cc(0x1e4)]===0x1;}async['resolveComment'](_0x5c9e21){const _0x2b7dd1=_0x2c96ed,{unitId:_0x3dea26}=_0x5c9e21,_0x2477d2=_0x5c9e21[_0x2b7dd1(0x1d3)],_0x33ae85={'memberId':this[_0x2b7dd1(0x1ed)][_0x2b7dd1(0x1eb)]()[_0x2b7dd1(0x1ab)],'unitId':_0x3dea26,'threadId':_0x2477d2,'solved':_0x5c9e21[_0x2b7dd1(0x1ac)]?_0x56e932['Solved']:_0x56e932['OpenOrReOpen']},_0x2e515a=await this[_0x2b7dd1(0x216)][_0x2b7dd1(0x207)](_0x2b7dd1(0x221)+_0x3dea26+_0x2b7dd1(0x1b9),{'body':_0x33ae85});return!_0x2e515a['body'][_0x2b7dd1(0x1a9)]||_0x2e515a[_0x2b7dd1(0x1e8)][_0x2b7dd1(0x1a9)][_0x2b7dd1(0x1e4)]===0x1;}async[_0x2c96ed(0x229)](_0x92bf41,_0x18de5f,_0x47b10c,_0x280ee5){const _0x3876ec=_0x2c96ed,_0x3d3f50={'memberId':(await this[_0x3876ec(0x1a8)][_0x3876ec(0x1e2)](_0x92bf41))[_0x3876ec(0x1ea)](),'threadId':_0x47b10c,'replyId':_0x280ee5,'unitId':_0x92bf41},_0x5cf407=await this[_0x3876ec(0x216)][_0x3876ec(0x207)](_0x3876ec(0x221)+_0x92bf41+'/delete',{'body':_0x3d3f50});return!_0x5cf407['body'][_0x3876ec(0x1a9)]||_0x5cf407['body']['error']['code']===0x1;}async[_0x2c96ed(0x213)](_0x4af876,_0x24879a,_0x53d2ba){const _0x3adb63=_0x2c96ed,_0x15f957={'unitId':_0x4af876,'threadId':_0x53d2ba},_0x2bf4be=await this[_0x3adb63(0x216)][_0x3adb63(0x207)](_0x3adb63(0x221)+_0x4af876+_0x3adb63(0x1c7),{'body':_0x15f957}),_0x20267b=_0x53d2ba[_0x3adb63(0x1cf)](_0x33d0ca=>_0x5707b4(_0x2bf4be[_0x3adb63(0x1e8)]['comments'][_0x33d0ca],_0x4af876,_0x24879a))[_0x3adb63(0x1b3)](Boolean);return Object[_0x3adb63(0x1c5)](_0x2bf4be[_0x3adb63(0x1e8)][_0x3adb63(0x1f6)])[_0x3adb63(0x1ee)](_0xd8a3fc=>{const _0x47fa8c=_0x3adb63;this[_0x47fa8c(0x1ed)][_0x47fa8c(0x1c0)](_0xd8a3fc);}),_0x20267b;}['saveCommentToSnapshot'](_0x842e5b){const _0x5db1ff=_0x2c96ed;return{'id':_0x842e5b['id'],'threadId':_0x842e5b[_0x5db1ff(0x1d3)],'ref':_0x842e5b[_0x5db1ff(0x1ad)]};}};_0xbb7deb=_0x43b44e([_0x1865db(0x0,_0x13acdc['Inject'](_0x2c8ff4[_0x2c96ed(0x21e)])),_0x1865db(0x1,_0x13acdc[_0x2c96ed(0x1b8)](_0x13acdc[_0x2c96ed(0x20b)])),_0x1865db(0x2,_0x13acdc['Inject'](_0x1e3e43[_0x2c96ed(0x1d8)]))],_0xbb7deb);var _0x4ba162=Object[_0x2c96ed(0x1ec)],_0x9f187e=(_0x21ebaa,_0x496157,_0x2dd549,_0xe3100c)=>{const _0x3535f9=_0x2c96ed;for(var _0x4c790d=_0xe3100c>0x1?void 0x0:_0xe3100c?_0x4ba162(_0x496157,_0x2dd549):_0x496157,_0x24c146=_0x21ebaa[_0x3535f9(0x1b7)]-0x1,_0x4e355d;_0x24c146>=0x0;_0x24c146--)(_0x4e355d=_0x21ebaa[_0x24c146])&&(_0x4c790d=_0x4e355d(_0x4c790d)||_0x4c790d);return _0x4c790d;},_0x265dff=(_0xd2e34,_0x2f0906)=>(_0x3eed2f,_0x44b7b5)=>_0x2f0906(_0x3eed2f,_0x44b7b5,_0xd2e34);let _0x46c52c=class extends _0x13acdc['Disposable']{constructor(_0x3f49c3,_0x250472){const _0x5b8ea3=_0x2c96ed;super(),this[_0x5b8ea3(0x1be)]=_0x3f49c3,this[_0x5b8ea3(0x225)]=_0x250472,this[_0x5b8ea3(0x1ff)]();}[_0x2c96ed(0x1ff)](){const _0x22f035=_0x2c96ed;this[_0x22f035(0x1be)]['dataSource']=this[_0x22f035(0x225)],this['_threadCommentDataSourceService'][_0x22f035(0x208)]=!0x1;}};_0x46c52c=_0x9f187e([_0x265dff(0x0,_0x21e65e['IThreadCommentDataSourceService']),_0x265dff(0x1,_0x13acdc[_0x2c96ed(0x1b8)](_0xbb7deb))],_0x46c52c);var _0x338dcf=Object[_0x2c96ed(0x1b4)],_0x172ec6=Object[_0x2c96ed(0x1ec)],_0x3683d6=(_0x3f9cea,_0x5c774b,_0x4d5e86)=>_0x5c774b in _0x3f9cea?_0x338dcf(_0x3f9cea,_0x5c774b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4d5e86}):_0x3f9cea[_0x5c774b]=_0x4d5e86,_0x251416=(_0x2a5dc7,_0x51037f,_0x1f5d40,_0x688b6)=>{const _0x24c08f=_0x2c96ed;for(var _0x5280b1=_0x688b6>0x1?void 0x0:_0x688b6?_0x172ec6(_0x51037f,_0x1f5d40):_0x51037f,_0x5087f6=_0x2a5dc7[_0x24c08f(0x1b7)]-0x1,_0x5cb876;_0x5087f6>=0x0;_0x5087f6--)(_0x5cb876=_0x2a5dc7[_0x5087f6])&&(_0x5280b1=_0x5cb876(_0x5280b1)||_0x5280b1);return _0x5280b1;},_0x95863e=(_0x4ee6fb,_0x2f7f50)=>(_0x557571,_0x5e847a)=>_0x2f7f50(_0x557571,_0x5e847a,_0x4ee6fb),_0x16f189=(_0x268f9d,_0x415d76,_0x149f48)=>_0x3683d6(_0x268f9d,typeof _0x415d76!=_0x2c96ed(0x1ef)?_0x415d76+'':_0x415d76,_0x149f48);_0x8942d1[_0x2c96ed(0x22a)]=class extends _0x13acdc['Plugin']{constructor(_0x1911a7=_0x5234e2,_0x3632ea,_0x3b302f){const _0x187780=_0x2c96ed;super(),this[_0x187780(0x1bf)]=_0x1911a7,this[_0x187780(0x222)]=_0x3632ea,this[_0x187780(0x1c1)]=_0x3b302f;const {..._0x54354d}=_0x13acdc[_0x187780(0x21b)]({},_0x5234e2,this[_0x187780(0x1bf)]);this[_0x187780(0x1c1)][_0x187780(0x1f9)](_0x2ef9ba,_0x54354d);}[_0x2c96ed(0x1dc)](){const _0x519ebe=_0x2c96ed;[[_0xbb7deb],[_0x46c52c],[_0x4bd4db]][_0x519ebe(0x1ee)](_0x17e177=>{const _0x1d77ae=_0x519ebe;this[_0x1d77ae(0x222)]['add'](_0x17e177);});}[_0x2c96ed(0x1c4)](){const _0x458057=_0x2c96ed;this[_0x458057(0x222)]['get'](_0x46c52c),this[_0x458057(0x222)]['get'](_0x4bd4db);}},_0x16f189(_0x8942d1[_0x2c96ed(0x22a)],_0x2c96ed(0x1db),_0x753262),_0x16f189(_0x8942d1['UniverThreadCommentDataSourcePlugin'],_0x2c96ed(0x202),_0x13acdc['UniverInstanceType']['UNIVER_UNKNOWN']),_0x8942d1['UniverThreadCommentDataSourcePlugin']=_0x251416([_0x13acdc['DependentOn'](_0x4ea396[_0x2c96ed(0x215)],_0x1e3e43['UniverCollaborationClientPlugin'],_0x437980['UniverLicensePlugin']),_0x95863e(0x1,_0x13acdc[_0x2c96ed(0x1b8)](_0x13acdc[_0x2c96ed(0x20a)])),_0x95863e(0x2,_0x13acdc[_0x2c96ed(0x1fa)])],_0x8942d1[_0x2c96ed(0x22a)]),Object[_0x2c96ed(0x1b4)](_0x8942d1,Symbol[_0x2c96ed(0x1c9)],{'value':_0x2c96ed(0x21f)});}));
1
+ function _0x5d58(){const _0x2955ea=['resolved','map','Add','parentId','replies','payload','@univerjs/core','replyId','rangeType','/edit','object','personId','solved','subscribe','parse','filter','491452ZwJpcS','get','@univerjs-pro/collaboration-client','unitId','11030PaMNuF','YYYY/MM/DD\x20HH:mm','resolveComment','customRanges','format','/solved','IConfigService','rxjs','_initUserSync','@univerjs/network','@univerjs/thread-comment-ui','comment','pluginName','_sessionService','saveCommentToSnapshot','function','UniverThreadCommentUIPlugin','UniverThreadCommentDataSourcePlugin','/universer-api/user/list','body','toStringTag','UNRECOGNIZED','pipe','thread-comment-data-source.config','post','root','getComment','error','size','rangeId','forEach','updateComment','7gGMOFx','692760FKuIDg','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','1605384scQgnH','624966LPvONN','1736064vMLRIM','UniverProCollaborationClient','dayjs','content','/list','_userService','Module','users','_threadCommentDataSource','_threadCommentDataSourceService','COMMENT','length','UniverNetwork','onReady','_commentService','3816fwnNGA','addUser','ref','Delete','userID','CustomRangeType','Inject','Reply','userId','bufferTime','user','disposeWithMe','symbol','UserManagerService','code','_init','308DoXuQZ','_config','_httpService','commentUpdate$','UniverThreadComment','Edit','getMemberID','OpenOrReOpen','defineProperty','setConfig','add','CommentService','requireSession','getUser','5RetjeG','amd','Solved','1XXEJxe','syncUpdateMutationToColla','UniverLicensePlugin','delete','DependentOn','Injector','deleteComment','getOwnPropertyDescriptor','createTimestamp','HTTPService','_initDataSource','Disposable','UNIVER_UNKNOWN','stringify','dataSource','/reply','_configService','_threadCommentModel','/universer-api/comment/unit/','UniverInstanceType','threadId','listComments','addComment','type','Solve','_injector'];_0x5d58=function(){return _0x2955ea;};return _0x5d58();}function _0x52f4(_0x48c124,_0x558102){const _0x5d587b=_0x5d58();return _0x52f4=function(_0x52f4d2,_0x3fa61a){_0x52f4d2=_0x52f4d2-0x13e;let _0x211209=_0x5d587b[_0x52f4d2];return _0x211209;},_0x52f4(_0x48c124,_0x558102);}(function(_0x522fa0,_0x525104){const _0x3334da=_0x52f4,_0x8f0174=_0x522fa0();while(!![]){try{const _0x2d5773=parseInt(_0x3334da(0x1b2))/0x1*(parseInt(_0x3334da(0x159))/0x2)+parseInt(_0x3334da(0x17e))/0x3+parseInt(_0x3334da(0x191))/0x4*(-parseInt(_0x3334da(0x1af))/0x5)+-parseInt(_0x3334da(0x181))/0x6*(-parseInt(_0x3334da(0x17d))/0x7)+-parseInt(_0x3334da(0x180))/0x8+-parseInt(_0x3334da(0x182))/0x9+parseInt(_0x3334da(0x15d))/0xa*(-parseInt(_0x3334da(0x1a1))/0xb);if(_0x2d5773===_0x525104)break;else _0x8f0174['push'](_0x8f0174['shift']());}catch(_0x4484b2){_0x8f0174['push'](_0x8f0174['shift']());}}}(_0x5d58,0x25f08),function(_0x335b13,_0x54984a){const _0x206d40=_0x52f4;typeof exports==_0x206d40(0x153)&&typeof module<'u'?_0x54984a(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x206d40(0x16c)&&define[_0x206d40(0x1b0)]?define(['exports',_0x206d40(0x15b),'@univerjs-pro/license',_0x206d40(0x14f),_0x206d40(0x167),'@univerjs/thread-comment',_0x206d40(0x164),_0x206d40(0x166)],_0x54984a):(_0x335b13=typeof globalThis<'u'?globalThis:_0x335b13||self,_0x54984a(_0x335b13['UniverProThreadCommentDatasource']={},_0x335b13[_0x206d40(0x183)],_0x335b13['UniverProLicense'],_0x335b13['UniverCore'],_0x335b13['UniverThreadCommentUi'],_0x335b13[_0x206d40(0x1a5)],_0x335b13[_0x206d40(0x164)],_0x335b13[_0x206d40(0x18e)]));}(this,function(_0x31be16,_0x2a3f15,_0x3864a7,_0x2505c7,_0x5afae8,_0x1cc25f,_0x88232b,_0x3f9cb8){'use strict';const _0x524927=_0x52f4;const _0x116c35=_0x524927(0x17f);var _0xcba247=(_0x33be3d=>(_0x33be3d[_0x33be3d[_0x524927(0x1a8)]=0x0]=_0x524927(0x1a8),_0x33be3d[_0x33be3d['Solved']=0x1]='Solved',_0x33be3d[_0x33be3d['UNRECOGNIZED']=-0x1]=_0x524927(0x172),_0x33be3d))(_0xcba247||{}),_0x2a590b=(_0x3e4504=>(_0x3e4504[_0x3e4504['Unknown']=0x0]='Unknown',_0x3e4504[_0x3e4504[_0x524927(0x14b)]=0x1]=_0x524927(0x14b),_0x3e4504[_0x3e4504[_0x524927(0x198)]=0x2]='Reply',_0x3e4504[_0x3e4504[_0x524927(0x1a6)]=0x3]=_0x524927(0x1a6),_0x3e4504[_0x3e4504[_0x524927(0x194)]=0x4]=_0x524927(0x194),_0x3e4504[_0x3e4504[_0x524927(0x147)]=0x5]=_0x524927(0x147),_0x3e4504[_0x3e4504[_0x524927(0x172)]=-0x1]=_0x524927(0x172),_0x3e4504))(_0x2a590b||{});const _0x23b85e=_0x2271cd=>_0x2505c7[_0x524927(0x184)](new Date(+_0x2271cd))[_0x524927(0x161)](_0x524927(0x15e)),_0x1173f8=async(_0x11f3d0,_0x252298)=>{const _0x434cd0=_0x524927,_0x5f13d0=_0x11f3d0[_0x434cd0(0x15a)](_0x2505c7[_0x434cd0(0x19e)]),_0x2673b7=_0x11f3d0[_0x434cd0(0x15a)](_0x3f9cb8['HTTPService']);_0x252298['forEach'](_0x2faa44=>{const _0x4acba3=_0x434cd0;_0x5f13d0[_0x4acba3(0x1ae)](_0x2faa44)&&_0x252298[_0x4acba3(0x1b5)](_0x2faa44);}),_0x252298[_0x434cd0(0x179)]&&(await _0x2673b7[_0x434cd0(0x15a)](_0x434cd0(0x16f),{'params':{'userIDs':[..._0x252298]}}))[_0x434cd0(0x170)][_0x434cd0(0x189)]['forEach'](_0x14fc6a=>{_0x14fc6a&&_0x5f13d0['addUser'](_0x14fc6a);});};var _0x236e33=Object[_0x524927(0x1b9)],_0x57468c=(_0x10aeb7,_0x556850,_0x2443bf,_0x31f547)=>{const _0x34f3e6=_0x524927;for(var _0x32f5a6=_0x31f547>0x1?void 0x0:_0x31f547?_0x236e33(_0x556850,_0x2443bf):_0x556850,_0x51eccb=_0x10aeb7[_0x34f3e6(0x18d)]-0x1,_0x570114;_0x51eccb>=0x0;_0x51eccb--)(_0x570114=_0x10aeb7[_0x51eccb])&&(_0x32f5a6=_0x570114(_0x32f5a6)||_0x32f5a6);return _0x32f5a6;},_0x49d949=(_0x2a0ef4,_0x20926c)=>(_0x3e0c1b,_0x2f9fda)=>_0x20926c(_0x3e0c1b,_0x2f9fda,_0x2a0ef4);let _0x303171=class extends _0x2505c7[_0x524927(0x1bd)]{constructor(_0x3c1b01,_0x72dce8,_0xbafaf8,_0x43b363){const _0x3e8d7d=_0x524927;super(),this['_commentService']=_0x3c1b01,this[_0x3e8d7d(0x140)]=_0x72dce8,this['_userService']=_0xbafaf8,this[_0x3e8d7d(0x148)]=_0x43b363,this[_0x3e8d7d(0x1a0)](),this[_0x3e8d7d(0x165)]();}['_initUserSync'](){const _0x3d125c=_0x524927;this[_0x3d125c(0x19c)](this['_threadCommentModel'][_0x3d125c(0x1a4)][_0x3d125c(0x173)](_0x88232b[_0x3d125c(0x19a)](0x10))[_0x3d125c(0x156)](_0x1de809=>{const _0x3ccf1c=_0x3d125c,_0x1d8ccb=new Set();_0x1de809[_0x3ccf1c(0x17b)](_0x29d067=>{const _0x2c9e41=_0x3ccf1c;switch(_0x29d067[_0x2c9e41(0x146)]){case _0x2c9e41(0x1ab):{const _0x519436=_0x29d067[_0x2c9e41(0x14e)][_0x2c9e41(0x154)];_0x1d8ccb[_0x2c9e41(0x1ab)](_0x519436);break;}}}),_0x1173f8(this[_0x3ccf1c(0x148)],_0x1d8ccb);}));}[_0x524927(0x1a0)](){const _0x3960f7=_0x524927;this['disposeWithMe'](this[_0x3960f7(0x190)][_0x3960f7(0x1a4)][_0x3960f7(0x156)](async _0x292593=>{const _0x2c64cb=_0x3960f7;var _0x32db35,_0x232c11,_0x4695b8,_0x1448d8;const _0x18b305=(_0x32db35=this[_0x2c64cb(0x140)]['getUnit'](_0x292593[_0x2c64cb(0x15c)])['find'](_0x2c7004=>_0x2c7004[_0x2c64cb(0x143)]===_0x292593[_0x2c64cb(0x143)]))==null?void 0x0:_0x32db35[_0x2c64cb(0x176)];if(!_0x18b305)return;const {unitId:_0x44d947,subUnitId:_0x1d1a5a}=_0x18b305;switch(_0x292593[_0x2c64cb(0x19b)]&&this[_0x2c64cb(0x187)][_0x2c64cb(0x192)](_0x292593['user']),_0x292593[_0x2c64cb(0x146)]){case _0x2a590b[_0x2c64cb(0x14b)]:break;case _0x2a590b['Reply']:{this[_0x2c64cb(0x140)][_0x2c64cb(0x145)](_0x44d947,_0x1d1a5a,{'unitId':_0x44d947,'subUnitId':_0x1d1a5a,'ref':'','id':_0x292593[_0x2c64cb(0x150)],'dT':_0x23b85e(+_0x292593[_0x2c64cb(0x1ba)]),'threadId':_0x292593[_0x2c64cb(0x143)],'personId':(_0x4695b8=(_0x232c11=_0x292593[_0x2c64cb(0x19b)])==null?void 0x0:_0x232c11['userID'])!=null?_0x4695b8:_0x292593['userId'],'text':JSON[_0x2c64cb(0x157)](_0x292593['content']),'parentId':_0x18b305['id']});break;}case _0x2a590b[_0x2c64cb(0x194)]:{const _0x86de55=this['_threadCommentModel'][_0x2c64cb(0x177)](_0x44d947,_0x1d1a5a,_0x292593[_0x2c64cb(0x150)]);_0x86de55&&_0x86de55[_0x2c64cb(0x14c)]&&this[_0x2c64cb(0x140)]['deleteComment'](_0x44d947,_0x1d1a5a,_0x292593[_0x2c64cb(0x150)]);break;}case _0x2a590b[_0x2c64cb(0x1a6)]:{this[_0x2c64cb(0x140)][_0x2c64cb(0x17c)](_0x44d947,_0x1d1a5a,{'commentId':_0x292593[_0x2c64cb(0x150)],'text':JSON[_0x2c64cb(0x157)](_0x292593['content'])});break;}case _0x2a590b[_0x2c64cb(0x147)]:{const _0xef8825=(_0x1448d8=this[_0x2c64cb(0x140)]['getUnit'](_0x292593[_0x2c64cb(0x15c)])['find'](_0x11b0ee=>_0x11b0ee[_0x2c64cb(0x143)]===_0x292593[_0x2c64cb(0x143)]))==null?void 0x0:_0x1448d8[_0x2c64cb(0x176)];_0xef8825&&this['_threadCommentModel'][_0x2c64cb(0x15f)](_0x44d947,_0x1d1a5a,_0xef8825['id'],_0x292593[_0x2c64cb(0x155)]===_0xcba247[_0x2c64cb(0x1b1)]);break;}}}));}};_0x303171=_0x57468c([_0x49d949(0x0,_0x2505c7[_0x524927(0x197)](_0x2a3f15[_0x524927(0x1ac)])),_0x49d949(0x1,_0x2505c7[_0x524927(0x197)](_0x1cc25f['ThreadCommentModel'])),_0x49d949(0x2,_0x2505c7[_0x524927(0x197)](_0x2505c7[_0x524927(0x19e)])),_0x49d949(0x3,_0x2505c7[_0x524927(0x197)](_0x2505c7[_0x524927(0x1b7)]))],_0x303171);const _0x2ba8a4=_0x524927(0x174),_0x377573={};var _0x5c4d84=Object[_0x524927(0x1b9)],_0x5d8f3c=(_0x436b24,_0x321531,_0x9a23df,_0x22bff0)=>{const _0x119a45=_0x524927;for(var _0x4e54d4=_0x22bff0>0x1?void 0x0:_0x22bff0?_0x5c4d84(_0x321531,_0x9a23df):_0x321531,_0x1b3d02=_0x436b24[_0x119a45(0x18d)]-0x1,_0x42182f;_0x1b3d02>=0x0;_0x1b3d02--)(_0x42182f=_0x436b24[_0x1b3d02])&&(_0x4e54d4=_0x42182f(_0x4e54d4)||_0x4e54d4);return _0x4e54d4;},_0x341697=(_0x19c4e1,_0x32566c)=>(_0x4d0d69,_0x240287)=>_0x32566c(_0x4d0d69,_0x240287,_0x19c4e1);function _0x448893(_0x507144,_0x162841){const _0x3997a6=_0x524927,_0x167b42=_0x507144[_0x3997a6(0x14d)][0x0];return{..._0x162841,'id':_0x167b42[_0x3997a6(0x150)],'resolved':_0x507144[_0x3997a6(0x155)]===0x1,'dT':_0x23b85e(_0x167b42['createTimestamp']),'personId':_0x167b42[_0x3997a6(0x199)],'threadId':_0x167b42[_0x3997a6(0x143)]};}function _0x2e4b4c(_0x1ad78c,_0x4e8f05,_0x5f0db1){const _0x1b0749=_0x524927;var _0x45b000,_0x2a6aa3;if(((_0x2a6aa3=(_0x45b000=_0x1ad78c==null?void 0x0:_0x1ad78c[_0x1b0749(0x14d)])==null?void 0x0:_0x45b000[_0x1b0749(0x18d)])!=null?_0x2a6aa3:0x0)>0x0){const _0x2f888e=(_0x12452c,_0x87b355)=>({'id':_0x12452c[_0x1b0749(0x150)],'threadId':_0x12452c['threadId'],'dT':_0x23b85e(_0x12452c[_0x1b0749(0x1ba)]),'personId':_0x12452c[_0x1b0749(0x199)],'resolved':_0x1ad78c[_0x1b0749(0x155)]===_0xcba247[_0x1b0749(0x1b1)],'unitId':_0x4e8f05,'subUnitId':_0x5f0db1,'text':JSON['parse'](_0x12452c[_0x1b0749(0x185)]),'parentId':_0x87b355}),_0x27ff43=_0x2f888e(_0x1ad78c[_0x1b0749(0x14d)][0x0]);return{..._0x27ff43,'children':_0x1ad78c[_0x1b0749(0x14d)]['slice'](0x1)[_0x1b0749(0x14a)](_0x81b03b=>_0x2f888e(_0x81b03b,_0x27ff43['id']))};}return null;}let _0x460224=class{constructor(_0x54a6af,_0x5249d9,_0x17805e){const _0x1f34ee=_0x524927;this['_httpService']=_0x54a6af,this[_0x1f34ee(0x187)]=_0x5249d9,this[_0x1f34ee(0x16a)]=_0x17805e;}async[_0x524927(0x145)](_0x2a463a){const _0xde9a49=_0x524927;var _0x4b07e2,_0x5bf17e;const {parentId:_0x2154d4,unitId:_0x5923fe,text:_0x1cc7b7,threadId:_0x210930}=_0x2a463a,_0x4f7c30=(_0x5bf17e=(_0x4b07e2=_0x1cc7b7[_0xde9a49(0x160)])==null?void 0x0:_0x4b07e2[_0xde9a49(0x158)](_0x582e08=>_0x582e08[_0xde9a49(0x151)]===_0x2505c7[_0xde9a49(0x196)]['COMMENT'])[_0xde9a49(0x14a)](_0x3cd6c4=>_0x3cd6c4[_0xde9a49(0x17a)]))!=null?_0x5bf17e:[],_0x13887b=JSON['stringify'](_0x1cc7b7),_0x5dd00b=(await this['_sessionService'][_0xde9a49(0x1ad)](_0x5923fe))[_0xde9a49(0x1a7)]();if(_0x2154d4){const _0x23f8e9={'memberId':_0x5dd00b,'unitId':_0x5923fe,'content':_0x13887b,'mention':_0x4f7c30,'threadId':_0x210930},_0x2c0b88=(await this[_0xde9a49(0x1a3)]['post']('/universer-api/comment/unit/'+_0x5923fe+_0xde9a49(0x13e),{'body':_0x23f8e9}))[_0xde9a49(0x170)]['reply'];return{..._0x2a463a,'id':_0x2c0b88[_0xde9a49(0x150)],'dT':_0x2505c7[_0xde9a49(0x184)](+_0x2c0b88[_0xde9a49(0x1ba)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x2c0b88['userId']};}else{const _0x9e05e4={'memberId':_0x5dd00b,'unitId':_0x5923fe,'content':_0x13887b,'mention':_0x4f7c30},_0x3cbe45=await this['_httpService']['post'](_0xde9a49(0x141)+_0x5923fe+'/add',{'body':_0x9e05e4});return _0x448893(_0x3cbe45[_0xde9a49(0x170)][_0xde9a49(0x168)],_0x2a463a);}}async[_0x524927(0x17c)](_0x496cae){const _0x3d2b11=_0x524927;var _0x2900c7,_0x661325;const {text:_0x14d6d3,unitId:_0x385d22}=_0x496cae,_0x1fb72b=(_0x661325=(_0x2900c7=_0x14d6d3[_0x3d2b11(0x160)])==null?void 0x0:_0x2900c7[_0x3d2b11(0x158)](_0x5ae4d5=>_0x5ae4d5[_0x3d2b11(0x151)]===_0x2505c7[_0x3d2b11(0x196)][_0x3d2b11(0x18c)])[_0x3d2b11(0x14a)](_0x1c9ec3=>_0x1c9ec3['rangeId']))!=null?_0x661325:[],_0x2f96d9=JSON[_0x3d2b11(0x1bf)](_0x14d6d3),_0x465c26=_0x496cae[_0x3d2b11(0x143)],_0x9d7d6f=_0x496cae['id'],_0x129ad0={'memberId':(await this[_0x3d2b11(0x16a)][_0x3d2b11(0x1ad)](_0x385d22))[_0x3d2b11(0x1a7)](),'unitId':_0x385d22,'threadId':_0x465c26,'mention':_0x1fb72b,'content':_0x2f96d9,'replyId':_0x9d7d6f},_0x2c666c=await this[_0x3d2b11(0x1a3)][_0x3d2b11(0x175)]('/universer-api/comment/unit/'+_0x385d22+_0x3d2b11(0x152),{'body':_0x129ad0});return!_0x2c666c[_0x3d2b11(0x170)][_0x3d2b11(0x178)]||_0x2c666c[_0x3d2b11(0x170)][_0x3d2b11(0x178)][_0x3d2b11(0x19f)]===0x1;}async['resolveComment'](_0x40b857){const _0x407cd1=_0x524927,{unitId:_0x28f620}=_0x40b857,_0xecb2a2=_0x40b857['threadId'],_0x1878d0={'memberId':this[_0x407cd1(0x187)]['getCurrentUser']()[_0x407cd1(0x195)],'unitId':_0x28f620,'threadId':_0xecb2a2,'solved':_0x40b857[_0x407cd1(0x149)]?_0xcba247['Solved']:_0xcba247['OpenOrReOpen']},_0x5bf11b=await this[_0x407cd1(0x1a3)][_0x407cd1(0x175)](_0x407cd1(0x141)+_0x28f620+_0x407cd1(0x162),{'body':_0x1878d0});return!_0x5bf11b[_0x407cd1(0x170)]['error']||_0x5bf11b['body'][_0x407cd1(0x178)][_0x407cd1(0x19f)]===0x1;}async[_0x524927(0x1b8)](_0x261ab9,_0x32d705,_0x4212aa,_0x18e535){const _0x50bf2f=_0x524927,_0xd2a829={'memberId':(await this['_sessionService']['requireSession'](_0x261ab9))[_0x50bf2f(0x1a7)](),'threadId':_0x4212aa,'replyId':_0x18e535,'unitId':_0x261ab9},_0x13d92a=await this[_0x50bf2f(0x1a3)]['post'](_0x50bf2f(0x141)+_0x261ab9+'/delete',{'body':_0xd2a829});return!_0x13d92a[_0x50bf2f(0x170)][_0x50bf2f(0x178)]||_0x13d92a[_0x50bf2f(0x170)][_0x50bf2f(0x178)][_0x50bf2f(0x19f)]===0x1;}async[_0x524927(0x144)](_0x4ff7c0,_0xf9f5e1,_0x3a0ac0){const _0x23ce14=_0x524927,_0x587306={'unitId':_0x4ff7c0,'threadId':_0x3a0ac0},_0x4d255c=await this[_0x23ce14(0x1a3)]['post'](_0x23ce14(0x141)+_0x4ff7c0+_0x23ce14(0x186),{'body':_0x587306}),_0x84be09=_0x3a0ac0[_0x23ce14(0x14a)](_0x2a135c=>_0x2e4b4c(_0x4d255c['body']['comments'][_0x2a135c],_0x4ff7c0,_0xf9f5e1))[_0x23ce14(0x158)](Boolean);return Object['values'](_0x4d255c['body'][_0x23ce14(0x189)])[_0x23ce14(0x17b)](_0x3ca3dd=>{const _0x4dbb2c=_0x23ce14;this[_0x4dbb2c(0x187)][_0x4dbb2c(0x192)](_0x3ca3dd);}),_0x84be09;}[_0x524927(0x16b)](_0x29e776){const _0x1e0507=_0x524927;return{'id':_0x29e776['id'],'threadId':_0x29e776['threadId'],'ref':_0x29e776[_0x1e0507(0x193)]};}};_0x460224=_0x5d8f3c([_0x341697(0x0,_0x2505c7[_0x524927(0x197)](_0x3f9cb8[_0x524927(0x1bb)])),_0x341697(0x1,_0x2505c7['Inject'](_0x2505c7['UserManagerService'])),_0x341697(0x2,_0x2505c7[_0x524927(0x197)](_0x2a3f15['CollaborationSessionService']))],_0x460224);var _0x3bd491=Object[_0x524927(0x1b9)],_0x4aed2e=(_0x11825e,_0x819d48,_0x3749ea,_0xc1e8c1)=>{for(var _0x2e0e7b=_0xc1e8c1>0x1?void 0x0:_0xc1e8c1?_0x3bd491(_0x819d48,_0x3749ea):_0x819d48,_0x1ca906=_0x11825e['length']-0x1,_0x38152f;_0x1ca906>=0x0;_0x1ca906--)(_0x38152f=_0x11825e[_0x1ca906])&&(_0x2e0e7b=_0x38152f(_0x2e0e7b)||_0x2e0e7b);return _0x2e0e7b;},_0x4e685e=(_0x4d2cfb,_0x3d356e)=>(_0x2dab86,_0x363ae9)=>_0x3d356e(_0x2dab86,_0x363ae9,_0x4d2cfb);let _0x5b20bb=class extends _0x2505c7[_0x524927(0x1bd)]{constructor(_0x19345f,_0x4450b4){const _0x459490=_0x524927;super(),this[_0x459490(0x18b)]=_0x19345f,this[_0x459490(0x18a)]=_0x4450b4,this['_initDataSource']();}[_0x524927(0x1bc)](){const _0x22be38=_0x524927;this[_0x22be38(0x18b)][_0x22be38(0x1c0)]=this['_threadCommentDataSource'],this[_0x22be38(0x18b)][_0x22be38(0x1b3)]=!0x1;}};_0x5b20bb=_0x4aed2e([_0x4e685e(0x0,_0x1cc25f['IThreadCommentDataSourceService']),_0x4e685e(0x1,_0x2505c7[_0x524927(0x197)](_0x460224))],_0x5b20bb);var _0x177539=Object[_0x524927(0x1a9)],_0xe8c190=Object[_0x524927(0x1b9)],_0x49e077=(_0x27df85,_0x5761b2,_0x14edb1)=>_0x5761b2 in _0x27df85?_0x177539(_0x27df85,_0x5761b2,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x14edb1}):_0x27df85[_0x5761b2]=_0x14edb1,_0x687430=(_0x3fd4d5,_0x4afa4e,_0x5b0167,_0x21eb1c)=>{const _0xcc0f83=_0x524927;for(var _0x241c4f=_0x21eb1c>0x1?void 0x0:_0x21eb1c?_0xe8c190(_0x4afa4e,_0x5b0167):_0x4afa4e,_0x3eb83f=_0x3fd4d5[_0xcc0f83(0x18d)]-0x1,_0x464d8e;_0x3eb83f>=0x0;_0x3eb83f--)(_0x464d8e=_0x3fd4d5[_0x3eb83f])&&(_0x241c4f=_0x464d8e(_0x241c4f)||_0x241c4f);return _0x241c4f;},_0x1c5880=(_0x3e4a9d,_0xd3480b)=>(_0x38eec7,_0x4dff36)=>_0xd3480b(_0x38eec7,_0x4dff36,_0x3e4a9d),_0x2c849b=(_0x16cd7b,_0x32fe1d,_0x36ecbb)=>_0x49e077(_0x16cd7b,typeof _0x32fe1d!=_0x524927(0x19d)?_0x32fe1d+'':_0x32fe1d,_0x36ecbb);_0x31be16[_0x524927(0x16e)]=class extends _0x2505c7['Plugin']{constructor(_0x1577c5=_0x377573,_0x6ecf80,_0x3fe706){const _0x5d4049=_0x524927;super(),this['_config']=_0x1577c5,this[_0x5d4049(0x148)]=_0x6ecf80,this['_configService']=_0x3fe706;const {..._0x462762}=_0x2505c7['merge']({},_0x377573,this[_0x5d4049(0x1a2)]);this[_0x5d4049(0x13f)][_0x5d4049(0x1aa)](_0x2ba8a4,_0x462762);}['onStarting'](){const _0x566091=_0x524927;[[_0x460224],[_0x5b20bb],[_0x303171]][_0x566091(0x17b)](_0x38c080=>{this['_injector']['add'](_0x38c080);});}[_0x524927(0x18f)](){const _0x4cb360=_0x524927;this[_0x4cb360(0x148)][_0x4cb360(0x15a)](_0x5b20bb),this[_0x4cb360(0x148)][_0x4cb360(0x15a)](_0x303171);}},_0x2c849b(_0x31be16['UniverThreadCommentDataSourcePlugin'],_0x524927(0x169),_0x116c35),_0x2c849b(_0x31be16[_0x524927(0x16e)],_0x524927(0x146),_0x2505c7[_0x524927(0x142)][_0x524927(0x1be)]),_0x31be16[_0x524927(0x16e)]=_0x687430([_0x2505c7[_0x524927(0x1b6)](_0x5afae8[_0x524927(0x16d)],_0x2a3f15['UniverCollaborationClientPlugin'],_0x3864a7[_0x524927(0x1b4)]),_0x1c5880(0x1,_0x2505c7[_0x524927(0x197)](_0x2505c7[_0x524927(0x1b7)])),_0x1c5880(0x2,_0x2505c7[_0x524927(0x163)])],_0x31be16[_0x524927(0x16e)]),Object['defineProperty'](_0x31be16,Symbol[_0x524927(0x171)],{'value':_0x524927(0x188)});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.10.5",
3
+ "version": "0.10.6-experimental.20250904-44da50e",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,20 +45,20 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.10.5",
49
- "@univerjs-pro/license": "0.10.5",
50
- "@univerjs/core": "0.10.5",
51
- "@univerjs/network": "0.10.5",
48
+ "@univerjs-pro/collaboration-client": "0.10.6-experimental.20250904-44da50e",
49
+ "@univerjs-pro/license": "0.10.6-experimental.20250904-44da50e",
50
+ "@univerjs/core": "0.10.6-experimental.20250904-44da50e",
51
+ "@univerjs/network": "0.10.6-experimental.20250904-44da50e",
52
52
  "@univerjs/protocol": "0.1.47-alpha.0",
53
- "@univerjs/thread-comment": "0.10.5",
54
- "@univerjs/thread-comment-ui": "0.10.5"
53
+ "@univerjs/thread-comment-ui": "0.10.6-experimental.20250904-44da50e",
54
+ "@univerjs/thread-comment": "0.10.6-experimental.20250904-44da50e"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",
58
- "typescript": "^5.8.3",
58
+ "typescript": "^5.9.2",
59
59
  "vite": "^7.1.3",
60
60
  "vitest": "^3.2.4",
61
- "@univerjs-infra/shared": "0.10.5"
61
+ "@univerjs-infra/shared": "0.10.6"
62
62
  },
63
63
  "scripts": {
64
64
  "test": "vitest run",