@univerjs-pro/thread-comment-datasource 0.9.1-nightly.202507071607 → 0.9.1

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 _0x521b44=_0x32b1;(function(_0x4feed5,_0x494d9f){const _0x458319=_0x32b1,_0x2102d9=_0x4feed5();while(!![]){try{const _0x152a40=parseInt(_0x458319(0x1c5))/0x1*(parseInt(_0x458319(0x1ab))/0x2)+-parseInt(_0x458319(0x1a8))/0x3*(-parseInt(_0x458319(0x1e7))/0x4)+-parseInt(_0x458319(0x1dc))/0x5*(parseInt(_0x458319(0x1db))/0x6)+-parseInt(_0x458319(0x210))/0x7*(-parseInt(_0x458319(0x1fe))/0x8)+parseInt(_0x458319(0x1e5))/0x9*(parseInt(_0x458319(0x1d0))/0xa)+parseInt(_0x458319(0x207))/0xb+-parseInt(_0x458319(0x1cc))/0xc;if(_0x152a40===_0x494d9f)break;else _0x2102d9['push'](_0x2102d9['shift']());}catch(_0x54b4aa){_0x2102d9['push'](_0x2102d9['shift']());}}}(_0x7c30,0xc3493));Object[_0x521b44(0x1b8)](exports,Symbol['toStringTag'],{'value':_0x521b44(0x1f9)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),j=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require('@univerjs/network'),U=_0x521b44(0x20f);var I=(_0x9abb67=>(_0x9abb67[_0x9abb67[_0x521b44(0x1d3)]=0x0]='OpenOrReOpen',_0x9abb67[_0x9abb67['Solved']=0x1]=_0x521b44(0x1c4),_0x9abb67[_0x9abb67[_0x521b44(0x1d9)]=-0x1]=_0x521b44(0x1d9),_0x9abb67))(I||{}),v=(_0x4a33da=>(_0x4a33da[_0x4a33da[_0x521b44(0x1a6)]=0x0]=_0x521b44(0x1a6),_0x4a33da[_0x4a33da[_0x521b44(0x1c3)]=0x1]=_0x521b44(0x1c3),_0x4a33da[_0x4a33da['Reply']=0x2]=_0x521b44(0x1ed),_0x4a33da[_0x4a33da[_0x521b44(0x1b3)]=0x3]=_0x521b44(0x1b3),_0x4a33da[_0x4a33da['Delete']=0x4]=_0x521b44(0x1de),_0x4a33da[_0x4a33da[_0x521b44(0x219)]=0x5]=_0x521b44(0x219),_0x4a33da[_0x4a33da['UNRECOGNIZED']=-0x1]=_0x521b44(0x1d9),_0x4a33da))(v||{});const f=_0x688d9e=>c[_0x521b44(0x1e0)](new Date(+_0x688d9e))[_0x521b44(0x1ca)](_0x521b44(0x20c)),R=async(_0x52a0ec,_0x2b76f7)=>{const _0x195ddb=_0x521b44,_0x220359=_0x52a0ec[_0x195ddb(0x1a9)](c[_0x195ddb(0x1c7)]),_0x21640a=_0x52a0ec[_0x195ddb(0x1a9)](P[_0x195ddb(0x1e3)]);_0x2b76f7[_0x195ddb(0x1c1)](_0x19b89c=>{const _0x36fdb0=_0x195ddb;_0x220359[_0x36fdb0(0x1f4)](_0x19b89c)&&_0x2b76f7[_0x36fdb0(0x20a)](_0x19b89c);}),_0x2b76f7[_0x195ddb(0x1ef)]&&(await _0x21640a[_0x195ddb(0x1a9)](_0x195ddb(0x1bd),{'params':{'userIDs':[..._0x2b76f7]}}))[_0x195ddb(0x1e2)][_0x195ddb(0x1ee)][_0x195ddb(0x1c1)](_0x15dfef=>{const _0x271b61=_0x195ddb;_0x15dfef&&_0x220359[_0x271b61(0x1df)](_0x15dfef);});};var $=Object[_0x521b44(0x202)],E=(_0x3b3516,_0x3f2793,_0x14b025,_0x399b15)=>{const _0x22e2ea=_0x521b44;for(var _0x12ff73=_0x399b15>0x1?void 0x0:_0x399b15?$(_0x3f2793,_0x14b025):_0x3f2793,_0x2eb18d=_0x3b3516[_0x22e2ea(0x1eb)]-0x1,_0x5a1d95;_0x2eb18d>=0x0;_0x2eb18d--)(_0x5a1d95=_0x3b3516[_0x2eb18d])&&(_0x12ff73=_0x5a1d95(_0x12ff73)||_0x12ff73);return _0x12ff73;},S=(_0x5728b9,_0x32071d)=>(_0x11786d,_0x2890a3)=>_0x32071d(_0x11786d,_0x2890a3,_0x5728b9);let p=class extends c[_0x521b44(0x1ad)]{constructor(_0x10f24b,_0x17edb1,_0x2f7ebc,_0x2a023c){const _0x305176=_0x521b44;super(),this[_0x305176(0x1e6)]=_0x10f24b,this[_0x305176(0x1f6)]=_0x17edb1,this[_0x305176(0x1ba)]=_0x2f7ebc,this[_0x305176(0x1a0)]=_0x2a023c,this[_0x305176(0x1f1)](),this['_initUserSync']();}[_0x521b44(0x1b2)](){const _0x5599bb=_0x521b44;this['disposeWithMe'](this[_0x5599bb(0x1f6)][_0x5599bb(0x1c2)][_0x5599bb(0x1e1)](w[_0x5599bb(0x1a3)](0x10))['subscribe'](_0x514d9e=>{const _0x4448df=_0x5599bb,_0x41b2b1=new Set();_0x514d9e['forEach'](_0x4cdcaa=>{const _0x5603f6=_0x32b1;switch(_0x4cdcaa[_0x5603f6(0x1bb)]){case'add':{const _0x27958c=_0x4cdcaa['payload'][_0x5603f6(0x1cd)];_0x41b2b1[_0x5603f6(0x1d8)](_0x27958c);break;}}}),R(this[_0x4448df(0x1a0)],_0x41b2b1);}));}['_init'](){const _0x30e6aa=_0x521b44;this[_0x30e6aa(0x1be)](this['_commentService'][_0x30e6aa(0x1c2)][_0x30e6aa(0x1b7)](async _0x4f5807=>{const _0x1fd602=_0x30e6aa;var _0x31d39e,_0x578633,_0x4cfcc4,_0xdf1854;const _0x4002a2=(_0x31d39e=this['_threadCommentModel']['getUnit'](_0x4f5807['unitId'])[_0x1fd602(0x1c8)](_0x1bacb5=>_0x1bacb5[_0x1fd602(0x214)]===_0x4f5807[_0x1fd602(0x214)]))==null?void 0x0:_0x31d39e[_0x1fd602(0x1a7)];if(!_0x4002a2)return;const {unitId:_0x13c638,subUnitId:_0x330523}=_0x4002a2;switch(_0x4f5807[_0x1fd602(0x209)]&&this['_userService'][_0x1fd602(0x1df)](_0x4f5807[_0x1fd602(0x209)]),_0x4f5807[_0x1fd602(0x1bb)]){case v[_0x1fd602(0x1c3)]:break;case v[_0x1fd602(0x1ed)]:{this[_0x1fd602(0x1f6)][_0x1fd602(0x1b9)](_0x13c638,_0x330523,{'unitId':_0x13c638,'subUnitId':_0x330523,'ref':'','id':_0x4f5807[_0x1fd602(0x1b4)],'dT':f(+_0x4f5807[_0x1fd602(0x1e4)]),'threadId':_0x4f5807[_0x1fd602(0x214)],'personId':(_0x4cfcc4=(_0x578633=_0x4f5807['user'])==null?void 0x0:_0x578633[_0x1fd602(0x217)])!=null?_0x4cfcc4:_0x4f5807[_0x1fd602(0x200)],'text':JSON[_0x1fd602(0x1f0)](_0x4f5807[_0x1fd602(0x203)]),'parentId':_0x4002a2['id']});break;}case v[_0x1fd602(0x1de)]:{const _0x1b6516=this[_0x1fd602(0x1f6)][_0x1fd602(0x1a4)](_0x13c638,_0x330523,_0x4f5807[_0x1fd602(0x1b4)]);_0x1b6516&&_0x1b6516[_0x1fd602(0x1a2)]&&this[_0x1fd602(0x1f6)][_0x1fd602(0x1da)](_0x13c638,_0x330523,_0x4f5807[_0x1fd602(0x1b4)]);break;}case v[_0x1fd602(0x1b3)]:{this['_threadCommentModel']['updateComment'](_0x13c638,_0x330523,{'commentId':_0x4f5807['replyId'],'text':JSON[_0x1fd602(0x1f0)](_0x4f5807[_0x1fd602(0x203)])});break;}case v[_0x1fd602(0x219)]:{const _0x42ba23=(_0xdf1854=this['_threadCommentModel']['getUnit'](_0x4f5807[_0x1fd602(0x1c0)])[_0x1fd602(0x1c8)](_0x180693=>_0x180693[_0x1fd602(0x214)]===_0x4f5807[_0x1fd602(0x214)]))==null?void 0x0:_0xdf1854[_0x1fd602(0x1a7)];_0x42ba23&&this[_0x1fd602(0x1f6)][_0x1fd602(0x208)](_0x13c638,_0x330523,_0x42ba23['id'],_0x4f5807['solved']===I[_0x1fd602(0x1c4)]);break;}}}));}};p=E([S(0x0,c['Inject'](b[_0x521b44(0x1d7)])),S(0x1,c['Inject'](M[_0x521b44(0x1fd)])),S(0x2,c[_0x521b44(0x1ff)](c[_0x521b44(0x1c7)])),S(0x3,c[_0x521b44(0x1ff)](c[_0x521b44(0x1a1)]))],p);const q=_0x521b44(0x1af),D={};function _0x7c30(){const _0x46e783=['UniverInstanceType','comments','userID','/add','Solve','ref','_injector','Injector','parentId','bufferTime','getComment','map','Unknown','root','9GufAPx','get','_configService','16JcwtII','onReady','Disposable','filter','thread-comment-data-source.config','_threadCommentDataSource','code','_initUserSync','Edit','replyId','CustomRangeType','onStarting','subscribe','defineProperty','addComment','_userService','type','UniverThreadCommentDataSourcePlugin','/universer-api/user/list','disposeWithMe','rangeId','unitId','forEach','commentUpdate$','Add','Solved','195346uKFZTV','/reply','UserManagerService','find','error','format','reply','29101764hhOcpb','personId','comment','stringify','1450Xclgjp','setConfig','DependentOn','OpenOrReOpen','_sessionService','customRanges','replies','CommentService','add','UNRECOGNIZED','deleteComment','396CSrlAB','71705aZnbkz','_config','Delete','addUser','dayjs','pipe','body','HTTPService','createTimestamp','63981oACQqq','_commentService','926620pFkYww','getMemberID','Plugin','_threadCommentDataSourceService','length','IThreadCommentDataSourceService','Reply','users','size','parse','_init','IConfigService','rangeType','getUser','COMMENT','_threadCommentModel','values','/solved','Module','CollaborationSessionService','slice','_initDataSource','ThreadCommentModel','8lLndew','Inject','userId','updateComment','getOwnPropertyDescriptor','content','UniverLicensePlugin','_httpService','merge','2765499kcqwMG','resolveComment','user','delete','UniverCollaborationClientPlugin','YYYY/MM/DD\x20HH:mm','/universer-api/comment/unit/','post','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','4421179DmjAmi','/delete','resolved','requireSession','threadId'];_0x7c30=function(){return _0x46e783;};return _0x7c30();}var A=Object['getOwnPropertyDescriptor'],x=(_0x3c493e,_0x28c3e7,_0x4aad6b,_0x38f82f)=>{for(var _0x38cae6=_0x38f82f>0x1?void 0x0:_0x38f82f?A(_0x28c3e7,_0x4aad6b):_0x28c3e7,_0x202806=_0x3c493e['length']-0x1,_0x14b48c;_0x202806>=0x0;_0x202806--)(_0x14b48c=_0x3c493e[_0x202806])&&(_0x38cae6=_0x14b48c(_0x38cae6)||_0x38cae6);return _0x38cae6;},_=(_0x22dd7e,_0x2820a1)=>(_0x58599a,_0x2d9c5a)=>_0x2820a1(_0x58599a,_0x2d9c5a,_0x22dd7e);function Y(_0x9a3a09,_0x446cd1){const _0xdfff7=_0x521b44,_0x1c7941=_0x9a3a09['replies'][0x0];return{..._0x446cd1,'id':_0x1c7941[_0xdfff7(0x1b4)],'resolved':_0x9a3a09['solved']===0x1,'dT':f(_0x1c7941['createTimestamp']),'personId':_0x1c7941[_0xdfff7(0x200)],'threadId':_0x1c7941['threadId']};}function G(_0x38eaf9,_0x5a5a77,_0x185497){const _0x323258=_0x521b44;var _0x30ab19,_0x5ceda4;if(((_0x5ceda4=(_0x30ab19=_0x38eaf9==null?void 0x0:_0x38eaf9['replies'])==null?void 0x0:_0x30ab19[_0x323258(0x1eb)])!=null?_0x5ceda4:0x0)>0x0){const _0x570e3b=(_0x3c4471,_0x5722dd)=>({'id':_0x3c4471[_0x323258(0x1b4)],'threadId':_0x3c4471[_0x323258(0x214)],'dT':f(_0x3c4471[_0x323258(0x1e4)]),'personId':_0x3c4471['userId'],'resolved':_0x38eaf9['solved']===I[_0x323258(0x1c4)],'unitId':_0x5a5a77,'subUnitId':_0x185497,'text':JSON[_0x323258(0x1f0)](_0x3c4471['content']),'parentId':_0x5722dd}),_0x5d773b=_0x570e3b(_0x38eaf9[_0x323258(0x1d6)][0x0]);return{..._0x5d773b,'children':_0x38eaf9['replies'][_0x323258(0x1fb)](0x1)[_0x323258(0x1a5)](_0x5a3625=>_0x570e3b(_0x5a3625,_0x5d773b['id']))};}return null;}let g=class{constructor(_0x5f472b,_0xcd98c0,_0xd6c3f6,_0x3d905a){const _0x5f11cf=_0x521b44;this['_httpService']=_0x5f472b,this[_0x5f11cf(0x1ba)]=_0xcd98c0,this[_0x5f11cf(0x1d4)]=_0xd6c3f6,this[_0x5f11cf(0x1a0)]=_0x3d905a;}async[_0x521b44(0x1b9)](_0x1068b1){const _0x49fde9=_0x521b44;var _0x51e734,_0x2c3ae3;const {parentId:_0x92ee9d,unitId:_0x275479,text:_0x59d975,threadId:_0x5f00a5}=_0x1068b1,_0x789368=(_0x2c3ae3=(_0x51e734=_0x59d975[_0x49fde9(0x1d5)])==null?void 0x0:_0x51e734[_0x49fde9(0x1ae)](_0x1fffce=>_0x1fffce[_0x49fde9(0x1f3)]===c['CustomRangeType'][_0x49fde9(0x1f5)])[_0x49fde9(0x1a5)](_0x2d4687=>_0x2d4687['rangeId']))!=null?_0x2c3ae3:[],_0x2e70b7=JSON[_0x49fde9(0x1cf)](_0x59d975),_0x583b3a=(await this[_0x49fde9(0x1d4)]['requireSession'](_0x275479))[_0x49fde9(0x1e8)]();if(_0x92ee9d){const _0x54c3b2={'memberId':_0x583b3a,'unitId':_0x275479,'content':_0x2e70b7,'mention':_0x789368,'threadId':_0x5f00a5},_0x29330e=(await this[_0x49fde9(0x205)][_0x49fde9(0x20e)]('/universer-api/comment/unit/'+_0x275479+_0x49fde9(0x1c6),{'body':_0x54c3b2}))[_0x49fde9(0x1e2)][_0x49fde9(0x1cb)];return{..._0x1068b1,'id':_0x29330e[_0x49fde9(0x1b4)],'dT':c[_0x49fde9(0x1e0)](+_0x29330e[_0x49fde9(0x1e4)])['format'](_0x49fde9(0x20c)),'personId':_0x29330e[_0x49fde9(0x200)]};}else{const _0x2c1e1f={'memberId':_0x583b3a,'unitId':_0x275479,'content':_0x2e70b7,'mention':_0x789368},_0x1763b8=await this[_0x49fde9(0x205)][_0x49fde9(0x20e)](_0x49fde9(0x20d)+_0x275479+_0x49fde9(0x218),{'body':_0x2c1e1f});return Y(_0x1763b8[_0x49fde9(0x1e2)][_0x49fde9(0x1ce)],_0x1068b1);}}async[_0x521b44(0x201)](_0x1824a4){const _0x245bb2=_0x521b44;var _0x1d9e58,_0x2a7a27;const {text:_0x2a75de,unitId:_0x4a171a}=_0x1824a4,_0x2dcc93=(_0x2a7a27=(_0x1d9e58=_0x2a75de[_0x245bb2(0x1d5)])==null?void 0x0:_0x1d9e58[_0x245bb2(0x1ae)](_0x353059=>_0x353059['rangeType']===c[_0x245bb2(0x1b5)][_0x245bb2(0x1f5)])['map'](_0x282937=>_0x282937[_0x245bb2(0x1bf)]))!=null?_0x2a7a27:[],_0x5d8885=JSON['stringify'](_0x2a75de),_0x313ed5=_0x1824a4[_0x245bb2(0x214)],_0x1426e0=_0x1824a4['id'],_0x213729={'memberId':(await this['_sessionService'][_0x245bb2(0x213)](_0x4a171a))[_0x245bb2(0x1e8)](),'unitId':_0x4a171a,'threadId':_0x313ed5,'mention':_0x2dcc93,'content':_0x5d8885,'replyId':_0x1426e0},_0x32edae=await this[_0x245bb2(0x205)][_0x245bb2(0x20e)](_0x245bb2(0x20d)+_0x4a171a+'/edit',{'body':_0x213729});return!_0x32edae['body'][_0x245bb2(0x1c9)]||_0x32edae[_0x245bb2(0x1e2)]['error'][_0x245bb2(0x1b1)]===0x1;}async[_0x521b44(0x208)](_0x8803f6){const _0x3aa29e=_0x521b44,{unitId:_0x5418df}=_0x8803f6,_0x14f915=_0x8803f6['threadId'],_0x2509ab={'memberId':this[_0x3aa29e(0x1ba)]['getCurrentUser']()[_0x3aa29e(0x217)],'unitId':_0x5418df,'threadId':_0x14f915,'solved':_0x8803f6[_0x3aa29e(0x212)]?I[_0x3aa29e(0x1c4)]:I[_0x3aa29e(0x1d3)]},_0x17bed=await this[_0x3aa29e(0x205)]['post']('/universer-api/comment/unit/'+_0x5418df+_0x3aa29e(0x1f8),{'body':_0x2509ab});return!_0x17bed[_0x3aa29e(0x1e2)][_0x3aa29e(0x1c9)]||_0x17bed[_0x3aa29e(0x1e2)][_0x3aa29e(0x1c9)]['code']===0x1;}async[_0x521b44(0x1da)](_0x5ac3da,_0x4db8df,_0x1607aa,_0x27aa08){const _0x91e0cf=_0x521b44,_0x273f5b={'memberId':(await this['_sessionService']['requireSession'](_0x5ac3da))[_0x91e0cf(0x1e8)](),'threadId':_0x1607aa,'replyId':_0x27aa08,'unitId':_0x5ac3da},_0x3c249e=await this[_0x91e0cf(0x205)][_0x91e0cf(0x20e)](_0x91e0cf(0x20d)+_0x5ac3da+_0x91e0cf(0x211),{'body':_0x273f5b});return!_0x3c249e[_0x91e0cf(0x1e2)][_0x91e0cf(0x1c9)]||_0x3c249e[_0x91e0cf(0x1e2)][_0x91e0cf(0x1c9)][_0x91e0cf(0x1b1)]===0x1;}async['listComments'](_0x5dad61,_0x2fb792,_0xb5792){const _0x1e8d29=_0x521b44,_0x5be9c3={'unitId':_0x5dad61,'threadId':_0xb5792},_0x1e051e=await this[_0x1e8d29(0x205)]['post']('/universer-api/comment/unit/'+_0x5dad61+'/list',{'body':_0x5be9c3}),_0x19253=_0xb5792[_0x1e8d29(0x1a5)](_0x1e412c=>G(_0x1e051e[_0x1e8d29(0x1e2)][_0x1e8d29(0x216)][_0x1e412c],_0x5dad61,_0x2fb792))['filter'](Boolean);return Object[_0x1e8d29(0x1f7)](_0x1e051e[_0x1e8d29(0x1e2)][_0x1e8d29(0x1ee)])[_0x1e8d29(0x1c1)](_0x3b0e7b=>{const _0xec37b4=_0x1e8d29;this['_userService'][_0xec37b4(0x1df)](_0x3b0e7b);}),_0x19253;}['saveCommentToSnapshot'](_0x29ca1a){const _0xff4628=_0x521b44;return{'id':_0x29ca1a['id'],'threadId':_0x29ca1a[_0xff4628(0x214)],'ref':_0x29ca1a[_0xff4628(0x21a)]};}};g=x([_(0x0,c[_0x521b44(0x1ff)](P[_0x521b44(0x1e3)])),_(0x1,c[_0x521b44(0x1ff)](c[_0x521b44(0x1c7)])),_(0x2,c['Inject'](b[_0x521b44(0x1fa)])),_(0x3,c['Inject'](c['Injector']))],g);var H=Object[_0x521b44(0x202)],J=(_0xdc97df,_0x5f2ff6,_0x866a5f,_0x81d2b3)=>{const _0x482946=_0x521b44;for(var _0x1ff006=_0x81d2b3>0x1?void 0x0:_0x81d2b3?H(_0x5f2ff6,_0x866a5f):_0x5f2ff6,_0x34bc5c=_0xdc97df[_0x482946(0x1eb)]-0x1,_0x3b50a3;_0x34bc5c>=0x0;_0x34bc5c--)(_0x3b50a3=_0xdc97df[_0x34bc5c])&&(_0x1ff006=_0x3b50a3(_0x1ff006)||_0x1ff006);return _0x1ff006;},y=(_0x841878,_0x2c0210)=>(_0x105b37,_0x174076)=>_0x2c0210(_0x105b37,_0x174076,_0x841878);let C=class extends c[_0x521b44(0x1ad)]{constructor(_0xb9864c,_0x5d5503){const _0x39b962=_0x521b44;super(),this['_threadCommentDataSourceService']=_0xb9864c,this[_0x39b962(0x1b0)]=_0x5d5503,this[_0x39b962(0x1fc)]();}[_0x521b44(0x1fc)](){const _0x265206=_0x521b44;this['_threadCommentDataSourceService']['dataSource']=this[_0x265206(0x1b0)],this[_0x265206(0x1ea)]['syncUpdateMutationToColla']=!0x1;}};function _0x32b1(_0xb3d53f,_0x2447c5){const _0x7c3046=_0x7c30();return _0x32b1=function(_0x32b1e9,_0x169573){_0x32b1e9=_0x32b1e9-0x1a0;let _0x5733a3=_0x7c3046[_0x32b1e9];return _0x5733a3;},_0x32b1(_0xb3d53f,_0x2447c5);}C=J([y(0x0,M[_0x521b44(0x1ec)]),y(0x1,c['Inject'](g))],C);var F=Object[_0x521b44(0x1b8)],L=Object[_0x521b44(0x202)],Z=(_0x268edd,_0x3a6d17,_0x3c76cd)=>_0x3a6d17 in _0x268edd?F(_0x268edd,_0x3a6d17,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3c76cd}):_0x268edd[_0x3a6d17]=_0x3c76cd,W=(_0x14a44c,_0x1558f5,_0x859687,_0x485dfa)=>{const _0x5ab1eb=_0x521b44;for(var _0x19367a=_0x485dfa>0x1?void 0x0:_0x485dfa?L(_0x1558f5,_0x859687):_0x1558f5,_0x486d5e=_0x14a44c[_0x5ab1eb(0x1eb)]-0x1,_0x6f6fa1;_0x486d5e>=0x0;_0x486d5e--)(_0x6f6fa1=_0x14a44c[_0x486d5e])&&(_0x19367a=_0x6f6fa1(_0x19367a)||_0x19367a);return _0x19367a;},O=(_0x23513c,_0x27dce5)=>(_0x18b0ab,_0x183d4c)=>_0x27dce5(_0x18b0ab,_0x183d4c,_0x23513c),N=(_0x5b080f,_0x4a669c,_0x8c8ebc)=>Z(_0x5b080f,typeof _0x4a669c!='symbol'?_0x4a669c+'':_0x4a669c,_0x8c8ebc);exports[_0x521b44(0x1bc)]=class extends c[_0x521b44(0x1e9)]{constructor(_0xc9d1a=D,_0x2b5a0c,_0x17990b){const _0x9c5cbb=_0x521b44;super(),this[_0x9c5cbb(0x1dd)]=_0xc9d1a,this['_injector']=_0x2b5a0c,this['_configService']=_0x17990b;const {..._0x3990bc}=c[_0x9c5cbb(0x206)]({},D,this[_0x9c5cbb(0x1dd)]);this[_0x9c5cbb(0x1aa)][_0x9c5cbb(0x1d1)](q,_0x3990bc);}[_0x521b44(0x1b6)](){const _0x23e138=_0x521b44;[[g],[C],[p]][_0x23e138(0x1c1)](_0x4c4c13=>{const _0x2f97ca=_0x23e138;this['_injector'][_0x2f97ca(0x1d8)](_0x4c4c13);});}[_0x521b44(0x1ac)](){const _0x5b9248=_0x521b44;this[_0x5b9248(0x1a0)][_0x5b9248(0x1a9)](C),this[_0x5b9248(0x1a0)][_0x5b9248(0x1a9)](p);}},N(exports[_0x521b44(0x1bc)],'pluginName',U),N(exports[_0x521b44(0x1bc)],_0x521b44(0x1bb),c[_0x521b44(0x215)]['UNIVER_UNKNOWN']),exports[_0x521b44(0x1bc)]=W([c[_0x521b44(0x1d2)](j['UniverThreadCommentUIPlugin'],b[_0x521b44(0x20b)],T[_0x521b44(0x204)]),O(0x1,c['Inject'](c['Injector'])),O(0x2,c[_0x521b44(0x1f2)])],exports['UniverThreadCommentDataSourcePlugin']);
1
+ 'use strict';const _0x1e9314=_0x5e46;(function(_0x2f3e2e,_0x5bcc74){const _0x12000a=_0x5e46,_0x894438=_0x2f3e2e();while(!![]){try{const _0x4e5094=-parseInt(_0x12000a(0x108))/0x1+parseInt(_0x12000a(0x159))/0x2+-parseInt(_0x12000a(0x152))/0x3+parseInt(_0x12000a(0x121))/0x4+parseInt(_0x12000a(0x160))/0x5*(parseInt(_0x12000a(0x10f))/0x6)+-parseInt(_0x12000a(0x136))/0x7+parseInt(_0x12000a(0x137))/0x8*(parseInt(_0x12000a(0x10d))/0x9);if(_0x4e5094===_0x5bcc74)break;else _0x894438['push'](_0x894438['shift']());}catch(_0x1e257b){_0x894438['push'](_0x894438['shift']());}}}(_0x361b,0x6e79e));Object[_0x1e9314(0x176)](exports,Symbol[_0x1e9314(0x118)],{'value':_0x1e9314(0x163)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),j=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require('@univerjs/network'),U=_0x1e9314(0x12d);var I=(_0x152616=>(_0x152616[_0x152616['OpenOrReOpen']=0x0]=_0x1e9314(0x144),_0x152616[_0x152616[_0x1e9314(0x149)]=0x1]=_0x1e9314(0x149),_0x152616[_0x152616[_0x1e9314(0x17a)]=-0x1]=_0x1e9314(0x17a),_0x152616))(I||{}),v=(_0x59e69d=>(_0x59e69d[_0x59e69d['Unknown']=0x0]='Unknown',_0x59e69d[_0x59e69d[_0x1e9314(0x140)]=0x1]=_0x1e9314(0x140),_0x59e69d[_0x59e69d[_0x1e9314(0x12a)]=0x2]=_0x1e9314(0x12a),_0x59e69d[_0x59e69d[_0x1e9314(0x126)]=0x3]=_0x1e9314(0x126),_0x59e69d[_0x59e69d['Delete']=0x4]=_0x1e9314(0x165),_0x59e69d[_0x59e69d['Solve']=0x5]=_0x1e9314(0x148),_0x59e69d[_0x59e69d[_0x1e9314(0x17a)]=-0x1]='UNRECOGNIZED',_0x59e69d))(v||{});function _0x361b(){const _0x2b5e44=['unitId','IThreadCommentDataSourceService','_init','customRanges','defineProperty','syncUpdateMutationToColla','ref','reply','UNRECOGNIZED','YYYY/MM/DD\x20HH:mm','/add','error','ThreadCommentModel','size','resolveComment','_threadCommentDataSource','updateComment','createTimestamp','330474VGRbXF','Disposable','_config','pluginName','getUnit','54VTFVhi','UniverLicensePlugin','1486920zpOsmr','addUser','subscribe','user','forEach','type','_configService','setConfig','UserManagerService','toStringTag','_sessionService','post','delete','CustomRangeType','_userService','/delete','parse','COMMENT','615252RSTUQN','CollaborationSessionService','rangeType','UniverThreadCommentDataSourcePlugin','/reply','Edit','/universer-api/user/list','CommentService','getUser','Reply','find','replies','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','map','payload','Plugin','getOwnPropertyDescriptor','_threadCommentDataSourceService','solved','getMemberID','replyId','2469159kGeSTq','1255288gYgemx','listComments','onReady','commentUpdate$','values','resolved','merge','disposeWithMe','content','Add','Injector','getCurrentUser','dataSource','OpenOrReOpen','code','IConfigService','bufferTime','Solve','Solved','stringify','threadId','userID','/universer-api/comment/unit/','_commentService','root','/edit','getComment','2389800kZaJPf','UniverThreadCommentUIPlugin','DependentOn','_initUserSync','deleteComment','requireSession','_httpService','187164uGhpdf','filter','length','addComment','get','rangeId','_injector','15OhihrX','Inject','personId','Module','/solved','Delete','users','dayjs','comment','_threadCommentModel','userId','body','comments','format','_initDataSource','add','HTTPService','/list'];_0x361b=function(){return _0x2b5e44;};return _0x361b();}const f=_0x11c072=>c[_0x1e9314(0x167)](new Date(+_0x11c072))[_0x1e9314(0x16d)](_0x1e9314(0x17b)),R=async(_0x1a9db0,_0x49001f)=>{const _0x3fb6a3=_0x1e9314,_0x3cf243=_0x1a9db0['get'](c[_0x3fb6a3(0x117)]),_0x723248=_0x1a9db0['get'](P[_0x3fb6a3(0x170)]);_0x49001f[_0x3fb6a3(0x113)](_0x5d4083=>{const _0x6698b=_0x3fb6a3;_0x3cf243[_0x6698b(0x129)](_0x5d4083)&&_0x49001f[_0x6698b(0x11b)](_0x5d4083);}),_0x49001f[_0x3fb6a3(0x103)]&&(await _0x723248['get'](_0x3fb6a3(0x127),{'params':{'userIDs':[..._0x49001f]}}))[_0x3fb6a3(0x16b)][_0x3fb6a3(0x166)]['forEach'](_0x2d17ea=>{const _0x5ef07e=_0x3fb6a3;_0x2d17ea&&_0x3cf243[_0x5ef07e(0x110)](_0x2d17ea);});};var $=Object[_0x1e9314(0x131)],E=(_0x277d53,_0x4059f5,_0x25497e,_0x4e01ce)=>{const _0x44b582=_0x1e9314;for(var _0x309280=_0x4e01ce>0x1?void 0x0:_0x4e01ce?$(_0x4059f5,_0x25497e):_0x4059f5,_0x239c95=_0x277d53[_0x44b582(0x15b)]-0x1,_0x3dccd1;_0x239c95>=0x0;_0x239c95--)(_0x3dccd1=_0x277d53[_0x239c95])&&(_0x309280=_0x3dccd1(_0x309280)||_0x309280);return _0x309280;},S=(_0x1deb17,_0x550c41)=>(_0x5cd719,_0x52dd6b)=>_0x550c41(_0x5cd719,_0x52dd6b,_0x1deb17);let p=class extends c['Disposable']{constructor(_0x168490,_0x2eb82e,_0x5b667e,_0x56a0c6){const _0x226415=_0x1e9314;super(),this['_commentService']=_0x168490,this['_threadCommentModel']=_0x2eb82e,this['_userService']=_0x5b667e,this[_0x226415(0x15f)]=_0x56a0c6,this[_0x226415(0x174)](),this['_initUserSync']();}[_0x1e9314(0x155)](){const _0x214f82=_0x1e9314;this[_0x214f82(0x13e)](this[_0x214f82(0x169)][_0x214f82(0x13a)]['pipe'](w[_0x214f82(0x147)](0x10))[_0x214f82(0x111)](_0x79a2ac=>{const _0x346ee6=_0x214f82,_0x18cee4=new Set();_0x79a2ac[_0x346ee6(0x113)](_0x2fdf93=>{const _0x2ad8a6=_0x346ee6;switch(_0x2fdf93[_0x2ad8a6(0x114)]){case _0x2ad8a6(0x16f):{const _0x564a96=_0x2fdf93[_0x2ad8a6(0x12f)][_0x2ad8a6(0x162)];_0x18cee4[_0x2ad8a6(0x16f)](_0x564a96);break;}}}),R(this[_0x346ee6(0x15f)],_0x18cee4);}));}[_0x1e9314(0x174)](){const _0x2ad317=_0x1e9314;this[_0x2ad317(0x13e)](this[_0x2ad317(0x14e)][_0x2ad317(0x13a)]['subscribe'](async _0x313fc=>{const _0x575d42=_0x2ad317;var _0x59c769,_0x5a0af7,_0x3c7571,_0x25e750;const _0x1a6435=(_0x59c769=this[_0x575d42(0x169)]['getUnit'](_0x313fc[_0x575d42(0x172)])[_0x575d42(0x12b)](_0x41e380=>_0x41e380[_0x575d42(0x14b)]===_0x313fc['threadId']))==null?void 0x0:_0x59c769[_0x575d42(0x14f)];if(!_0x1a6435)return;const {unitId:_0x1c96c1,subUnitId:_0xd22d7a}=_0x1a6435;switch(_0x313fc[_0x575d42(0x112)]&&this[_0x575d42(0x11d)][_0x575d42(0x110)](_0x313fc[_0x575d42(0x112)]),_0x313fc[_0x575d42(0x114)]){case v[_0x575d42(0x140)]:break;case v[_0x575d42(0x12a)]:{this[_0x575d42(0x169)][_0x575d42(0x15c)](_0x1c96c1,_0xd22d7a,{'unitId':_0x1c96c1,'subUnitId':_0xd22d7a,'ref':'','id':_0x313fc[_0x575d42(0x135)],'dT':f(+_0x313fc[_0x575d42(0x107)]),'threadId':_0x313fc['threadId'],'personId':(_0x3c7571=(_0x5a0af7=_0x313fc[_0x575d42(0x112)])==null?void 0x0:_0x5a0af7['userID'])!=null?_0x3c7571:_0x313fc['userId'],'text':JSON[_0x575d42(0x11f)](_0x313fc[_0x575d42(0x13f)]),'parentId':_0x1a6435['id']});break;}case v[_0x575d42(0x165)]:{const _0x45d0af=this[_0x575d42(0x169)][_0x575d42(0x151)](_0x1c96c1,_0xd22d7a,_0x313fc[_0x575d42(0x135)]);_0x45d0af&&_0x45d0af['parentId']&&this['_threadCommentModel'][_0x575d42(0x156)](_0x1c96c1,_0xd22d7a,_0x313fc[_0x575d42(0x135)]);break;}case v[_0x575d42(0x126)]:{this['_threadCommentModel'][_0x575d42(0x106)](_0x1c96c1,_0xd22d7a,{'commentId':_0x313fc[_0x575d42(0x135)],'text':JSON[_0x575d42(0x11f)](_0x313fc[_0x575d42(0x13f)])});break;}case v[_0x575d42(0x148)]:{const _0x21484e=(_0x25e750=this[_0x575d42(0x169)][_0x575d42(0x10c)](_0x313fc['unitId'])[_0x575d42(0x12b)](_0x598ef0=>_0x598ef0[_0x575d42(0x14b)]===_0x313fc['threadId']))==null?void 0x0:_0x25e750[_0x575d42(0x14f)];_0x21484e&&this[_0x575d42(0x169)][_0x575d42(0x104)](_0x1c96c1,_0xd22d7a,_0x21484e['id'],_0x313fc['solved']===I[_0x575d42(0x149)]);break;}}}));}};p=E([S(0x0,c[_0x1e9314(0x161)](b[_0x1e9314(0x128)])),S(0x1,c[_0x1e9314(0x161)](M[_0x1e9314(0x102)])),S(0x2,c[_0x1e9314(0x161)](c[_0x1e9314(0x117)])),S(0x3,c['Inject'](c[_0x1e9314(0x141)]))],p);const q='thread-comment-data-source.config',D={};function _0x5e46(_0x703422,_0x1222bb){const _0x361b1c=_0x361b();return _0x5e46=function(_0x5e464b,_0x101627){_0x5e464b=_0x5e464b-0x101;let _0x52190c=_0x361b1c[_0x5e464b];return _0x52190c;},_0x5e46(_0x703422,_0x1222bb);}var A=Object[_0x1e9314(0x131)],x=(_0x5bb9fd,_0x182c85,_0x29efe6,_0x540375)=>{const _0x48174f=_0x1e9314;for(var _0x152e8c=_0x540375>0x1?void 0x0:_0x540375?A(_0x182c85,_0x29efe6):_0x182c85,_0x3452a3=_0x5bb9fd[_0x48174f(0x15b)]-0x1,_0x15c249;_0x3452a3>=0x0;_0x3452a3--)(_0x15c249=_0x5bb9fd[_0x3452a3])&&(_0x152e8c=_0x15c249(_0x152e8c)||_0x152e8c);return _0x152e8c;},_=(_0x451dde,_0x23c884)=>(_0x3b305e,_0x13e2a8)=>_0x23c884(_0x3b305e,_0x13e2a8,_0x451dde);function Y(_0x31fcbc,_0x325e65){const _0x2ccb0d=_0x1e9314,_0x20904a=_0x31fcbc[_0x2ccb0d(0x12c)][0x0];return{..._0x325e65,'id':_0x20904a['replyId'],'resolved':_0x31fcbc[_0x2ccb0d(0x133)]===0x1,'dT':f(_0x20904a[_0x2ccb0d(0x107)]),'personId':_0x20904a[_0x2ccb0d(0x16a)],'threadId':_0x20904a[_0x2ccb0d(0x14b)]};}function G(_0x495cb5,_0x32700c,_0x2f965f){const _0x3161ef=_0x1e9314;var _0x26a3f4,_0x3578b5;if(((_0x3578b5=(_0x26a3f4=_0x495cb5==null?void 0x0:_0x495cb5[_0x3161ef(0x12c)])==null?void 0x0:_0x26a3f4[_0x3161ef(0x15b)])!=null?_0x3578b5:0x0)>0x0){const _0x131d98=(_0x4d1d2f,_0x1c2e85)=>({'id':_0x4d1d2f['replyId'],'threadId':_0x4d1d2f[_0x3161ef(0x14b)],'dT':f(_0x4d1d2f[_0x3161ef(0x107)]),'personId':_0x4d1d2f[_0x3161ef(0x16a)],'resolved':_0x495cb5[_0x3161ef(0x133)]===I[_0x3161ef(0x149)],'unitId':_0x32700c,'subUnitId':_0x2f965f,'text':JSON['parse'](_0x4d1d2f[_0x3161ef(0x13f)]),'parentId':_0x1c2e85}),_0x50a9e8=_0x131d98(_0x495cb5[_0x3161ef(0x12c)][0x0]);return{..._0x50a9e8,'children':_0x495cb5[_0x3161ef(0x12c)]['slice'](0x1)[_0x3161ef(0x12e)](_0x1adb2c=>_0x131d98(_0x1adb2c,_0x50a9e8['id']))};}return null;}let g=class{constructor(_0x43fd45,_0x19efc9,_0x1b6283,_0x1de839){const _0x53f835=_0x1e9314;this[_0x53f835(0x158)]=_0x43fd45,this['_userService']=_0x19efc9,this['_sessionService']=_0x1b6283,this['_injector']=_0x1de839;}async[_0x1e9314(0x15c)](_0x34bfa7){const _0x5729e0=_0x1e9314;var _0x3e943a,_0x346153;const {parentId:_0x3ba379,unitId:_0x2d8a91,text:_0x2baf1a,threadId:_0xdf2e29}=_0x34bfa7,_0x5a68e4=(_0x346153=(_0x3e943a=_0x2baf1a[_0x5729e0(0x175)])==null?void 0x0:_0x3e943a[_0x5729e0(0x15a)](_0x406dd9=>_0x406dd9[_0x5729e0(0x123)]===c[_0x5729e0(0x11c)][_0x5729e0(0x120)])['map'](_0x459204=>_0x459204[_0x5729e0(0x15e)]))!=null?_0x346153:[],_0x1a009a=JSON[_0x5729e0(0x14a)](_0x2baf1a),_0x4fe5ed=(await this[_0x5729e0(0x119)][_0x5729e0(0x157)](_0x2d8a91))[_0x5729e0(0x134)]();if(_0x3ba379){const _0x4b6451={'memberId':_0x4fe5ed,'unitId':_0x2d8a91,'content':_0x1a009a,'mention':_0x5a68e4,'threadId':_0xdf2e29},_0x5f2120=(await this[_0x5729e0(0x158)][_0x5729e0(0x11a)](_0x5729e0(0x14d)+_0x2d8a91+_0x5729e0(0x125),{'body':_0x4b6451}))[_0x5729e0(0x16b)][_0x5729e0(0x179)];return{..._0x34bfa7,'id':_0x5f2120['replyId'],'dT':c[_0x5729e0(0x167)](+_0x5f2120['createTimestamp'])[_0x5729e0(0x16d)](_0x5729e0(0x17b)),'personId':_0x5f2120[_0x5729e0(0x16a)]};}else{const _0x574e4d={'memberId':_0x4fe5ed,'unitId':_0x2d8a91,'content':_0x1a009a,'mention':_0x5a68e4},_0x2def8f=await this[_0x5729e0(0x158)][_0x5729e0(0x11a)](_0x5729e0(0x14d)+_0x2d8a91+_0x5729e0(0x17c),{'body':_0x574e4d});return Y(_0x2def8f[_0x5729e0(0x16b)][_0x5729e0(0x168)],_0x34bfa7);}}async['updateComment'](_0x2c8b22){const _0x424515=_0x1e9314;var _0x476746,_0x345e05;const {text:_0xc23e54,unitId:_0x2f54fc}=_0x2c8b22,_0x19e6d3=(_0x345e05=(_0x476746=_0xc23e54['customRanges'])==null?void 0x0:_0x476746[_0x424515(0x15a)](_0x47b28f=>_0x47b28f['rangeType']===c[_0x424515(0x11c)][_0x424515(0x120)])[_0x424515(0x12e)](_0x5089f7=>_0x5089f7[_0x424515(0x15e)]))!=null?_0x345e05:[],_0x5b511d=JSON['stringify'](_0xc23e54),_0x11d3d6=_0x2c8b22['threadId'],_0x285f34=_0x2c8b22['id'],_0x3ff0a1={'memberId':(await this[_0x424515(0x119)]['requireSession'](_0x2f54fc))[_0x424515(0x134)](),'unitId':_0x2f54fc,'threadId':_0x11d3d6,'mention':_0x19e6d3,'content':_0x5b511d,'replyId':_0x285f34},_0x58b1bb=await this['_httpService'][_0x424515(0x11a)](_0x424515(0x14d)+_0x2f54fc+_0x424515(0x150),{'body':_0x3ff0a1});return!_0x58b1bb['body'][_0x424515(0x101)]||_0x58b1bb['body'][_0x424515(0x101)][_0x424515(0x145)]===0x1;}async['resolveComment'](_0x28562d){const _0x42ded9=_0x1e9314,{unitId:_0x58828a}=_0x28562d,_0x8ce24f=_0x28562d[_0x42ded9(0x14b)],_0x569ab5={'memberId':this[_0x42ded9(0x11d)][_0x42ded9(0x142)]()[_0x42ded9(0x14c)],'unitId':_0x58828a,'threadId':_0x8ce24f,'solved':_0x28562d[_0x42ded9(0x13c)]?I[_0x42ded9(0x149)]:I['OpenOrReOpen']},_0x488e42=await this[_0x42ded9(0x158)]['post']('/universer-api/comment/unit/'+_0x58828a+_0x42ded9(0x164),{'body':_0x569ab5});return!_0x488e42[_0x42ded9(0x16b)]['error']||_0x488e42[_0x42ded9(0x16b)][_0x42ded9(0x101)][_0x42ded9(0x145)]===0x1;}async[_0x1e9314(0x156)](_0x4c64f3,_0xd7e628,_0x148e08,_0x4a2007){const _0x216d06=_0x1e9314,_0xb4866c={'memberId':(await this['_sessionService']['requireSession'](_0x4c64f3))[_0x216d06(0x134)](),'threadId':_0x148e08,'replyId':_0x4a2007,'unitId':_0x4c64f3},_0x3df7e6=await this[_0x216d06(0x158)][_0x216d06(0x11a)](_0x216d06(0x14d)+_0x4c64f3+_0x216d06(0x11e),{'body':_0xb4866c});return!_0x3df7e6['body'][_0x216d06(0x101)]||_0x3df7e6[_0x216d06(0x16b)]['error']['code']===0x1;}async[_0x1e9314(0x138)](_0x44f603,_0x52d27c,_0x1bc3f5){const _0x3c214c=_0x1e9314,_0x3cea4e={'unitId':_0x44f603,'threadId':_0x1bc3f5},_0x1ca529=await this[_0x3c214c(0x158)][_0x3c214c(0x11a)](_0x3c214c(0x14d)+_0x44f603+_0x3c214c(0x171),{'body':_0x3cea4e}),_0xcf90b7=_0x1bc3f5[_0x3c214c(0x12e)](_0x2c8fbb=>G(_0x1ca529[_0x3c214c(0x16b)][_0x3c214c(0x16c)][_0x2c8fbb],_0x44f603,_0x52d27c))[_0x3c214c(0x15a)](Boolean);return Object[_0x3c214c(0x13b)](_0x1ca529['body'][_0x3c214c(0x166)])[_0x3c214c(0x113)](_0x413bb5=>{const _0x5639dc=_0x3c214c;this['_userService'][_0x5639dc(0x110)](_0x413bb5);}),_0xcf90b7;}['saveCommentToSnapshot'](_0x58fa41){const _0x35c243=_0x1e9314;return{'id':_0x58fa41['id'],'threadId':_0x58fa41[_0x35c243(0x14b)],'ref':_0x58fa41[_0x35c243(0x178)]};}};g=x([_(0x0,c['Inject'](P['HTTPService'])),_(0x1,c[_0x1e9314(0x161)](c[_0x1e9314(0x117)])),_(0x2,c[_0x1e9314(0x161)](b[_0x1e9314(0x122)])),_(0x3,c[_0x1e9314(0x161)](c[_0x1e9314(0x141)]))],g);var H=Object[_0x1e9314(0x131)],J=(_0x108360,_0x20e6ff,_0x5de8b2,_0x4612b1)=>{for(var _0x1dcb8d=_0x4612b1>0x1?void 0x0:_0x4612b1?H(_0x20e6ff,_0x5de8b2):_0x20e6ff,_0x277fc4=_0x108360['length']-0x1,_0x147591;_0x277fc4>=0x0;_0x277fc4--)(_0x147591=_0x108360[_0x277fc4])&&(_0x1dcb8d=_0x147591(_0x1dcb8d)||_0x1dcb8d);return _0x1dcb8d;},y=(_0x3b11a5,_0x40c937)=>(_0x15e444,_0x3b300)=>_0x40c937(_0x15e444,_0x3b300,_0x3b11a5);let C=class extends c[_0x1e9314(0x109)]{constructor(_0x372c23,_0xadee69){const _0x3fb0c9=_0x1e9314;super(),this[_0x3fb0c9(0x132)]=_0x372c23,this['_threadCommentDataSource']=_0xadee69,this[_0x3fb0c9(0x16e)]();}[_0x1e9314(0x16e)](){const _0x114202=_0x1e9314;this[_0x114202(0x132)][_0x114202(0x143)]=this[_0x114202(0x105)],this[_0x114202(0x132)][_0x114202(0x177)]=!0x1;}};C=J([y(0x0,M[_0x1e9314(0x173)]),y(0x1,c[_0x1e9314(0x161)](g))],C);var F=Object[_0x1e9314(0x176)],L=Object['getOwnPropertyDescriptor'],Z=(_0x5b730d,_0x3eabf9,_0x4932ba)=>_0x3eabf9 in _0x5b730d?F(_0x5b730d,_0x3eabf9,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4932ba}):_0x5b730d[_0x3eabf9]=_0x4932ba,W=(_0x5b2431,_0x112437,_0x2091a9,_0x4d53ce)=>{for(var _0x159d67=_0x4d53ce>0x1?void 0x0:_0x4d53ce?L(_0x112437,_0x2091a9):_0x112437,_0x37459a=_0x5b2431['length']-0x1,_0x3e93bf;_0x37459a>=0x0;_0x37459a--)(_0x3e93bf=_0x5b2431[_0x37459a])&&(_0x159d67=_0x3e93bf(_0x159d67)||_0x159d67);return _0x159d67;},O=(_0x52e4d2,_0x3a7278)=>(_0x55e56d,_0x1373e1)=>_0x3a7278(_0x55e56d,_0x1373e1,_0x52e4d2),N=(_0x1b026e,_0x2c1c43,_0x2188fe)=>Z(_0x1b026e,typeof _0x2c1c43!='symbol'?_0x2c1c43+'':_0x2c1c43,_0x2188fe);exports[_0x1e9314(0x124)]=class extends c[_0x1e9314(0x130)]{constructor(_0x2d1009=D,_0x32c2de,_0x463977){const _0x1096bd=_0x1e9314;super(),this[_0x1096bd(0x10a)]=_0x2d1009,this[_0x1096bd(0x15f)]=_0x32c2de,this[_0x1096bd(0x115)]=_0x463977;const {..._0x454c70}=c[_0x1096bd(0x13d)]({},D,this[_0x1096bd(0x10a)]);this[_0x1096bd(0x115)][_0x1096bd(0x116)](q,_0x454c70);}['onStarting'](){const _0x27d8a0=_0x1e9314;[[g],[C],[p]][_0x27d8a0(0x113)](_0x563cac=>{const _0x4db930=_0x27d8a0;this[_0x4db930(0x15f)][_0x4db930(0x16f)](_0x563cac);});}[_0x1e9314(0x139)](){const _0x8b67ce=_0x1e9314;this['_injector'][_0x8b67ce(0x15d)](C),this[_0x8b67ce(0x15f)]['get'](p);}},N(exports[_0x1e9314(0x124)],_0x1e9314(0x10b),U),N(exports[_0x1e9314(0x124)],'type',c['UniverInstanceType']['UNIVER_UNKNOWN']),exports[_0x1e9314(0x124)]=W([c[_0x1e9314(0x154)](j[_0x1e9314(0x153)],b['UniverCollaborationClientPlugin'],T[_0x1e9314(0x10e)]),O(0x1,c[_0x1e9314(0x161)](c['Injector'])),O(0x2,c[_0x1e9314(0x146)])],exports[_0x1e9314(0x124)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x20c3f7=_0x348c;(function(_0x2049a0,_0x5a40c5){const _0x4a0828=_0x348c,_0x54afdb=_0x2049a0();while(!![]){try{const _0xd97ac9=parseInt(_0x4a0828(0x24b))/0x1+-parseInt(_0x4a0828(0x200))/0x2+-parseInt(_0x4a0828(0x235))/0x3*(-parseInt(_0x4a0828(0x203))/0x4)+-parseInt(_0x4a0828(0x212))/0x5*(parseInt(_0x4a0828(0x1f0))/0x6)+-parseInt(_0x4a0828(0x227))/0x7+parseInt(_0x4a0828(0x244))/0x8+parseInt(_0x4a0828(0x205))/0x9*(parseInt(_0x4a0828(0x211))/0xa);if(_0xd97ac9===_0x5a40c5)break;else _0x54afdb['push'](_0x54afdb['shift']());}catch(_0x3fa38a){_0x54afdb['push'](_0x54afdb['shift']());}}}(_0x1759,0x4dad9));import{CommentService as _0x393445,CollaborationSessionService as _0x7d48d8,UniverCollaborationClientPlugin as _0x1cc7c5}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x469578}from'@univerjs-pro/license';import{dayjs as _0x5c03d1,UserManagerService as _0x283f92,Inject as _0x390cd4,Injector as _0x279b5f,Disposable as _0x4a3ac7,CustomRangeType as _0x4d3601,UniverInstanceType as _0x3f06dc,DependentOn as _0x3b7dec,IConfigService as _0xa6d69f,Plugin as _0x5d9d3b,merge as _0x1c4ddb}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x11263e}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x386f71,IThreadCommentDataSourceService as _0x59a2d9}from'@univerjs/thread-comment';import{bufferTime as _0x2facfe}from'rxjs';import{HTTPService as _0x417b86}from'@univerjs/network';function _0x1759(){const _0x11eeab=['replies','dataSource','rangeType','496413dlCWHY','_threadCommentDataSource','userId','listComments','post','Unknown','rangeId','deleteComment','add','stringify','getUser','subscribe','find','threadId','Reply','2405680LhvRUK','values','body','parse','setConfig','disposeWithMe','pipe','514443agNRPH','thread-comment-data-source.config','length','_injector','root','comment','YYYY/MM/DD\x20HH:mm','format','881832oQKkWm','type','UNRECOGNIZED','_threadCommentDataSourceService','/reply','Solved','error','user','delete','map','parentId','OpenOrReOpen','size','pluginName','resolveComment','syncUpdateMutationToColla','555786SGvEPL','users','_threadCommentModel','4wnPMWb','solved','2109879SUUfJo','/delete','comments','getMemberID','payload','COMMENT','content','Add','replyId','saveCommentToSnapshot','_httpService','userID','30YNbdZV','20zYbwHw','_init','/universer-api/comment/unit/','slice','commentUpdate$','getOwnPropertyDescriptor','requireSession','_configService','forEach','getUnit','get','createTimestamp','/edit','_userService','/list','addUser','code','filter','updateComment','Solve','unitId','3499769flzpoA','Edit','_initUserSync','_config','reply','addComment','personId','customRanges','_commentService','symbol','_sessionService'];_0x1759=function(){return _0x11eeab;};return _0x1759();}function _0x348c(_0xed6c39,_0x2d8b83){const _0x175945=_0x1759();return _0x348c=function(_0x348c47,_0x57a9d6){_0x348c47=_0x348c47-0x1ea;let _0x50be2c=_0x175945[_0x348c47];return _0x50be2c;},_0x348c(_0xed6c39,_0x2d8b83);}const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x398f42=>(_0x398f42[_0x398f42[_0x20c3f7(0x1fb)]=0x0]='OpenOrReOpen',_0x398f42[_0x398f42[_0x20c3f7(0x1f5)]=0x1]=_0x20c3f7(0x1f5),_0x398f42[_0x398f42[_0x20c3f7(0x1f2)]=-0x1]=_0x20c3f7(0x1f2),_0x398f42))(I||{}),v=(_0x1fdd40=>(_0x1fdd40[_0x1fdd40[_0x20c3f7(0x23a)]=0x0]=_0x20c3f7(0x23a),_0x1fdd40[_0x1fdd40[_0x20c3f7(0x20c)]=0x1]=_0x20c3f7(0x20c),_0x1fdd40[_0x1fdd40[_0x20c3f7(0x243)]=0x2]=_0x20c3f7(0x243),_0x1fdd40[_0x1fdd40[_0x20c3f7(0x228)]=0x3]=_0x20c3f7(0x228),_0x1fdd40[_0x1fdd40['Delete']=0x4]='Delete',_0x1fdd40[_0x1fdd40[_0x20c3f7(0x225)]=0x5]=_0x20c3f7(0x225),_0x1fdd40[_0x1fdd40[_0x20c3f7(0x1f2)]=-0x1]='UNRECOGNIZED',_0x1fdd40))(v||{});const D=_0x5d2ebb=>_0x5c03d1(new Date(+_0x5d2ebb))[_0x20c3f7(0x1ef)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x22db6f,_0x2f044e)=>{const _0x12b9dc=_0x20c3f7,_0x2c5545=_0x22db6f['get'](_0x283f92),_0x17cff5=_0x22db6f[_0x12b9dc(0x21c)](_0x417b86);_0x2f044e['forEach'](_0x1084fc=>{const _0x51f7f8=_0x12b9dc;_0x2c5545[_0x51f7f8(0x23f)](_0x1084fc)&&_0x2f044e[_0x51f7f8(0x1f8)](_0x1084fc);}),_0x2f044e[_0x12b9dc(0x1fc)]&&(await _0x17cff5[_0x12b9dc(0x21c)]('/universer-api/user/list',{'params':{'userIDs':[..._0x2f044e]}}))[_0x12b9dc(0x246)]['users']['forEach'](_0x1da854=>{const _0x1d306e=_0x12b9dc;_0x1da854&&_0x2c5545[_0x1d306e(0x221)](_0x1da854);});};var K=Object[_0x20c3f7(0x217)],V=(_0x161bd4,_0x4d581f,_0x5662c1,_0x707f8e)=>{const _0x1862bf=_0x20c3f7;for(var _0xa21cbf=_0x707f8e>0x1?void 0x0:_0x707f8e?K(_0x4d581f,_0x5662c1):_0x4d581f,_0xe94021=_0x161bd4[_0x1862bf(0x1ea)]-0x1,_0x45b1b7;_0xe94021>=0x0;_0xe94021--)(_0x45b1b7=_0x161bd4[_0xe94021])&&(_0xa21cbf=_0x45b1b7(_0xa21cbf)||_0xa21cbf);return _0xa21cbf;},p=(_0x763387,_0x12c8e1)=>(_0x859521,_0x4093e7)=>_0x12c8e1(_0x859521,_0x4093e7,_0x763387);let S=class extends _0x4a3ac7{constructor(_0x268f94,_0x304a08,_0x18edc3,_0x2b0526){const _0x48277b=_0x20c3f7;super(),this[_0x48277b(0x22f)]=_0x268f94,this['_threadCommentModel']=_0x304a08,this[_0x48277b(0x21f)]=_0x18edc3,this[_0x48277b(0x1eb)]=_0x2b0526,this[_0x48277b(0x213)](),this[_0x48277b(0x229)]();}[_0x20c3f7(0x229)](){const _0x5036e2=_0x20c3f7;this[_0x5036e2(0x249)](this[_0x5036e2(0x202)][_0x5036e2(0x216)][_0x5036e2(0x24a)](_0x2facfe(0x10))['subscribe'](_0x5ddd9d=>{const _0x161876=_0x5036e2,_0x17451f=new Set();_0x5ddd9d[_0x161876(0x21a)](_0x2e372f=>{const _0x3c59ff=_0x161876;switch(_0x2e372f[_0x3c59ff(0x1f1)]){case _0x3c59ff(0x23d):{const _0xd8551f=_0x2e372f[_0x3c59ff(0x209)][_0x3c59ff(0x22d)];_0x17451f[_0x3c59ff(0x23d)](_0xd8551f);break;}}}),B(this['_injector'],_0x17451f);}));}[_0x20c3f7(0x213)](){const _0x42080=_0x20c3f7;this['disposeWithMe'](this[_0x42080(0x22f)][_0x42080(0x216)][_0x42080(0x240)](async _0x3fc319=>{const _0x1e81f0=_0x42080;var _0x17933c,_0x29bc56,_0xd14a48,_0x3ec092;const _0x51bb7e=(_0x17933c=this[_0x1e81f0(0x202)][_0x1e81f0(0x21b)](_0x3fc319[_0x1e81f0(0x226)])[_0x1e81f0(0x241)](_0x14113a=>_0x14113a[_0x1e81f0(0x242)]===_0x3fc319[_0x1e81f0(0x242)]))==null?void 0x0:_0x17933c['root'];if(!_0x51bb7e)return;const {unitId:_0x298f94,subUnitId:_0x2591e7}=_0x51bb7e;switch(_0x3fc319[_0x1e81f0(0x1f7)]&&this[_0x1e81f0(0x21f)][_0x1e81f0(0x221)](_0x3fc319['user']),_0x3fc319[_0x1e81f0(0x1f1)]){case v[_0x1e81f0(0x20c)]:break;case v[_0x1e81f0(0x243)]:{this[_0x1e81f0(0x202)][_0x1e81f0(0x22c)](_0x298f94,_0x2591e7,{'unitId':_0x298f94,'subUnitId':_0x2591e7,'ref':'','id':_0x3fc319['replyId'],'dT':D(+_0x3fc319[_0x1e81f0(0x21d)]),'threadId':_0x3fc319['threadId'],'personId':(_0xd14a48=(_0x29bc56=_0x3fc319['user'])==null?void 0x0:_0x29bc56[_0x1e81f0(0x210)])!=null?_0xd14a48:_0x3fc319[_0x1e81f0(0x237)],'text':JSON[_0x1e81f0(0x247)](_0x3fc319[_0x1e81f0(0x20b)]),'parentId':_0x51bb7e['id']});break;}case v['Delete']:{const _0x4f7301=this[_0x1e81f0(0x202)]['getComment'](_0x298f94,_0x2591e7,_0x3fc319['replyId']);_0x4f7301&&_0x4f7301[_0x1e81f0(0x1fa)]&&this[_0x1e81f0(0x202)][_0x1e81f0(0x23c)](_0x298f94,_0x2591e7,_0x3fc319[_0x1e81f0(0x20d)]);break;}case v[_0x1e81f0(0x228)]:{this[_0x1e81f0(0x202)][_0x1e81f0(0x224)](_0x298f94,_0x2591e7,{'commentId':_0x3fc319['replyId'],'text':JSON['parse'](_0x3fc319[_0x1e81f0(0x20b)])});break;}case v[_0x1e81f0(0x225)]:{const _0x457853=(_0x3ec092=this[_0x1e81f0(0x202)][_0x1e81f0(0x21b)](_0x3fc319[_0x1e81f0(0x226)])[_0x1e81f0(0x241)](_0x4b18dc=>_0x4b18dc[_0x1e81f0(0x242)]===_0x3fc319['threadId']))==null?void 0x0:_0x3ec092[_0x1e81f0(0x1ec)];_0x457853&&this[_0x1e81f0(0x202)]['resolveComment'](_0x298f94,_0x2591e7,_0x457853['id'],_0x3fc319[_0x1e81f0(0x204)]===I[_0x1e81f0(0x1f5)]);break;}}}));}};S=V([p(0x0,_0x390cd4(_0x393445)),p(0x1,_0x390cd4(_0x386f71)),p(0x2,_0x390cd4(_0x283f92)),p(0x3,_0x390cd4(_0x279b5f))],S);const z=_0x20c3f7(0x24c),M={};var k=Object[_0x20c3f7(0x217)],Q=(_0x5ac6a4,_0x25e3e6,_0x198873,_0x4fb1dd)=>{const _0xfcc63b=_0x20c3f7;for(var _0x51af79=_0x4fb1dd>0x1?void 0x0:_0x4fb1dd?k(_0x25e3e6,_0x198873):_0x25e3e6,_0xda4edd=_0x5ac6a4[_0xfcc63b(0x1ea)]-0x1,_0xa8634e;_0xda4edd>=0x0;_0xda4edd--)(_0xa8634e=_0x5ac6a4[_0xda4edd])&&(_0x51af79=_0xa8634e(_0x51af79)||_0x51af79);return _0x51af79;},_=(_0x3a6470,_0x45d0fa)=>(_0x112011,_0x28b1e4)=>_0x45d0fa(_0x112011,_0x28b1e4,_0x3a6470);function X(_0x11808b,_0x77de00){const _0x1aa43e=_0x20c3f7,_0x2f7e6c=_0x11808b[_0x1aa43e(0x232)][0x0];return{..._0x77de00,'id':_0x2f7e6c[_0x1aa43e(0x20d)],'resolved':_0x11808b[_0x1aa43e(0x204)]===0x1,'dT':D(_0x2f7e6c[_0x1aa43e(0x21d)]),'personId':_0x2f7e6c[_0x1aa43e(0x237)],'threadId':_0x2f7e6c[_0x1aa43e(0x242)]};}function ee(_0x1acc51,_0x46f0e4,_0x679100){const _0x427b3b=_0x20c3f7;var _0x4dd982,_0x22b615;if(((_0x22b615=(_0x4dd982=_0x1acc51==null?void 0x0:_0x1acc51[_0x427b3b(0x232)])==null?void 0x0:_0x4dd982[_0x427b3b(0x1ea)])!=null?_0x22b615:0x0)>0x0){const _0x46846d=(_0x2b8871,_0x2c89bc)=>({'id':_0x2b8871[_0x427b3b(0x20d)],'threadId':_0x2b8871[_0x427b3b(0x242)],'dT':D(_0x2b8871[_0x427b3b(0x21d)]),'personId':_0x2b8871['userId'],'resolved':_0x1acc51[_0x427b3b(0x204)]===I[_0x427b3b(0x1f5)],'unitId':_0x46f0e4,'subUnitId':_0x679100,'text':JSON[_0x427b3b(0x247)](_0x2b8871[_0x427b3b(0x20b)]),'parentId':_0x2c89bc}),_0xcd4119=_0x46846d(_0x1acc51[_0x427b3b(0x232)][0x0]);return{..._0xcd4119,'children':_0x1acc51['replies'][_0x427b3b(0x215)](0x1)['map'](_0x28e41d=>_0x46846d(_0x28e41d,_0xcd4119['id']))};}return null;}let f=class{constructor(_0x40b2f2,_0x5b2288,_0x521195,_0x30b4e2){const _0x51ccdc=_0x20c3f7;this['_httpService']=_0x40b2f2,this[_0x51ccdc(0x21f)]=_0x5b2288,this[_0x51ccdc(0x231)]=_0x521195,this[_0x51ccdc(0x1eb)]=_0x30b4e2;}async[_0x20c3f7(0x22c)](_0x2340db){const _0x2b392e=_0x20c3f7;var _0x252db5,_0x3e35e1;const {parentId:_0x44bbc4,unitId:_0x292cdc,text:_0x52e0a6,threadId:_0x4575d7}=_0x2340db,_0x1c0ee5=(_0x3e35e1=(_0x252db5=_0x52e0a6['customRanges'])==null?void 0x0:_0x252db5[_0x2b392e(0x223)](_0x2d3786=>_0x2d3786[_0x2b392e(0x234)]===_0x4d3601['COMMENT'])[_0x2b392e(0x1f9)](_0x309a1e=>_0x309a1e[_0x2b392e(0x23b)]))!=null?_0x3e35e1:[],_0x2dce12=JSON['stringify'](_0x52e0a6),_0xf5198e=(await this['_sessionService']['requireSession'](_0x292cdc))['getMemberID']();if(_0x44bbc4){const _0x1fea10={'memberId':_0xf5198e,'unitId':_0x292cdc,'content':_0x2dce12,'mention':_0x1c0ee5,'threadId':_0x4575d7},_0x49e346=(await this[_0x2b392e(0x20f)][_0x2b392e(0x239)](_0x2b392e(0x214)+_0x292cdc+_0x2b392e(0x1f4),{'body':_0x1fea10}))[_0x2b392e(0x246)][_0x2b392e(0x22b)];return{..._0x2340db,'id':_0x49e346[_0x2b392e(0x20d)],'dT':_0x5c03d1(+_0x49e346['createTimestamp'])[_0x2b392e(0x1ef)](_0x2b392e(0x1ee)),'personId':_0x49e346[_0x2b392e(0x237)]};}else{const _0x346782={'memberId':_0xf5198e,'unitId':_0x292cdc,'content':_0x2dce12,'mention':_0x1c0ee5},_0x380452=await this[_0x2b392e(0x20f)][_0x2b392e(0x239)](_0x2b392e(0x214)+_0x292cdc+'/add',{'body':_0x346782});return X(_0x380452[_0x2b392e(0x246)][_0x2b392e(0x1ed)],_0x2340db);}}async['updateComment'](_0x270acc){const _0x2f1f1b=_0x20c3f7;var _0x299165,_0x25977b;const {text:_0x18bd7e,unitId:_0x112b10}=_0x270acc,_0x4e5a99=(_0x25977b=(_0x299165=_0x18bd7e[_0x2f1f1b(0x22e)])==null?void 0x0:_0x299165[_0x2f1f1b(0x223)](_0x41507a=>_0x41507a[_0x2f1f1b(0x234)]===_0x4d3601[_0x2f1f1b(0x20a)])[_0x2f1f1b(0x1f9)](_0x333709=>_0x333709[_0x2f1f1b(0x23b)]))!=null?_0x25977b:[],_0x4d04c8=JSON[_0x2f1f1b(0x23e)](_0x18bd7e),_0x21ce33=_0x270acc[_0x2f1f1b(0x242)],_0x50c99d=_0x270acc['id'],_0x1ce0eb={'memberId':(await this['_sessionService'][_0x2f1f1b(0x218)](_0x112b10))[_0x2f1f1b(0x208)](),'unitId':_0x112b10,'threadId':_0x21ce33,'mention':_0x4e5a99,'content':_0x4d04c8,'replyId':_0x50c99d},_0x387bf1=await this[_0x2f1f1b(0x20f)][_0x2f1f1b(0x239)](_0x2f1f1b(0x214)+_0x112b10+_0x2f1f1b(0x21e),{'body':_0x1ce0eb});return!_0x387bf1[_0x2f1f1b(0x246)][_0x2f1f1b(0x1f6)]||_0x387bf1[_0x2f1f1b(0x246)][_0x2f1f1b(0x1f6)][_0x2f1f1b(0x222)]===0x1;}async[_0x20c3f7(0x1fe)](_0x2d1bb3){const _0x309ed8=_0x20c3f7,{unitId:_0x5d570f}=_0x2d1bb3,_0x18f8f=_0x2d1bb3[_0x309ed8(0x242)],_0x2339b6={'memberId':this[_0x309ed8(0x21f)]['getCurrentUser']()[_0x309ed8(0x210)],'unitId':_0x5d570f,'threadId':_0x18f8f,'solved':_0x2d1bb3['resolved']?I[_0x309ed8(0x1f5)]:I[_0x309ed8(0x1fb)]},_0x3f8c8d=await this['_httpService'][_0x309ed8(0x239)]('/universer-api/comment/unit/'+_0x5d570f+'/solved',{'body':_0x2339b6});return!_0x3f8c8d[_0x309ed8(0x246)]['error']||_0x3f8c8d[_0x309ed8(0x246)]['error']['code']===0x1;}async[_0x20c3f7(0x23c)](_0x1d22f2,_0x1f743b,_0x5f57ef,_0x45540e){const _0x349599=_0x20c3f7,_0x441b65={'memberId':(await this[_0x349599(0x231)][_0x349599(0x218)](_0x1d22f2))[_0x349599(0x208)](),'threadId':_0x5f57ef,'replyId':_0x45540e,'unitId':_0x1d22f2},_0x2c28d7=await this[_0x349599(0x20f)]['post'](_0x349599(0x214)+_0x1d22f2+_0x349599(0x206),{'body':_0x441b65});return!_0x2c28d7[_0x349599(0x246)][_0x349599(0x1f6)]||_0x2c28d7[_0x349599(0x246)]['error'][_0x349599(0x222)]===0x1;}async[_0x20c3f7(0x238)](_0x277d49,_0x4cdcaf,_0x10167d){const _0x36c9cf=_0x20c3f7,_0x2cdf58={'unitId':_0x277d49,'threadId':_0x10167d},_0x51a490=await this[_0x36c9cf(0x20f)][_0x36c9cf(0x239)](_0x36c9cf(0x214)+_0x277d49+_0x36c9cf(0x220),{'body':_0x2cdf58}),_0x585dbe=_0x10167d[_0x36c9cf(0x1f9)](_0x3f6f3b=>ee(_0x51a490[_0x36c9cf(0x246)][_0x36c9cf(0x207)][_0x3f6f3b],_0x277d49,_0x4cdcaf))[_0x36c9cf(0x223)](Boolean);return Object[_0x36c9cf(0x245)](_0x51a490[_0x36c9cf(0x246)][_0x36c9cf(0x201)])['forEach'](_0x14e9db=>{const _0x4761ec=_0x36c9cf;this[_0x4761ec(0x21f)][_0x4761ec(0x221)](_0x14e9db);}),_0x585dbe;}[_0x20c3f7(0x20e)](_0x29361d){const _0x1d6e20=_0x20c3f7;return{'id':_0x29361d['id'],'threadId':_0x29361d[_0x1d6e20(0x242)],'ref':_0x29361d['ref']};}};f=Q([_(0x0,_0x390cd4(_0x417b86)),_(0x1,_0x390cd4(_0x283f92)),_(0x2,_0x390cd4(_0x7d48d8)),_(0x3,_0x390cd4(_0x279b5f))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x50f1b8,_0x275d2e,_0x4d7b10,_0x1f7b73)=>{const _0x43989d=_0x20c3f7;for(var _0x217dca=_0x1f7b73>0x1?void 0x0:_0x1f7b73?re(_0x275d2e,_0x4d7b10):_0x275d2e,_0x15c101=_0x50f1b8[_0x43989d(0x1ea)]-0x1,_0x599d2b;_0x15c101>=0x0;_0x15c101--)(_0x599d2b=_0x50f1b8[_0x15c101])&&(_0x217dca=_0x599d2b(_0x217dca)||_0x217dca);return _0x217dca;},N=(_0x3ce9ed,_0x1d5d2f)=>(_0x289dbc,_0x1957b6)=>_0x1d5d2f(_0x289dbc,_0x1957b6,_0x3ce9ed);let g=class extends _0x4a3ac7{constructor(_0x272b55,_0x10f6a8){const _0x405383=_0x20c3f7;super(),this['_threadCommentDataSourceService']=_0x272b55,this[_0x405383(0x236)]=_0x10f6a8,this['_initDataSource']();}['_initDataSource'](){const _0x15413d=_0x20c3f7;this[_0x15413d(0x1f3)][_0x15413d(0x233)]=this[_0x15413d(0x236)],this[_0x15413d(0x1f3)][_0x15413d(0x1ff)]=!0x1;}};g=te([N(0x0,_0x59a2d9),N(0x1,_0x390cd4(f))],g);var se=Object['defineProperty'],oe=Object[_0x20c3f7(0x217)],ne=(_0x25cd94,_0x185bd8,_0x32270e)=>_0x185bd8 in _0x25cd94?se(_0x25cd94,_0x185bd8,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x32270e}):_0x25cd94[_0x185bd8]=_0x32270e,ie=(_0x3110aa,_0x4aeb01,_0x42dd1f,_0xb9c540)=>{const _0x5cc3ef=_0x20c3f7;for(var _0x52bf8f=_0xb9c540>0x1?void 0x0:_0xb9c540?oe(_0x4aeb01,_0x42dd1f):_0x4aeb01,_0x18f52=_0x3110aa[_0x5cc3ef(0x1ea)]-0x1,_0x1da036;_0x18f52>=0x0;_0x18f52--)(_0x1da036=_0x3110aa[_0x18f52])&&(_0x52bf8f=_0x1da036(_0x52bf8f)||_0x52bf8f);return _0x52bf8f;},w=(_0x32123e,_0x48b2fe)=>(_0x1cb524,_0x1a77b3)=>_0x48b2fe(_0x1cb524,_0x1a77b3,_0x32123e),$=(_0x3bfa92,_0xc2b19a,_0x478f3e)=>ne(_0x3bfa92,typeof _0xc2b19a!=_0x20c3f7(0x230)?_0xc2b19a+'':_0xc2b19a,_0x478f3e);let b=class extends _0x5d9d3b{constructor(_0x39616b=M,_0xcd8679,_0x30b76a){const _0x2467e1=_0x20c3f7;super(),this[_0x2467e1(0x22a)]=_0x39616b,this['_injector']=_0xcd8679,this[_0x2467e1(0x219)]=_0x30b76a;const {..._0x486380}=_0x1c4ddb({},M,this[_0x2467e1(0x22a)]);this[_0x2467e1(0x219)][_0x2467e1(0x248)](z,_0x486380);}['onStarting'](){[[f],[g],[S]]['forEach'](_0x5bdc67=>{const _0x1327b2=_0x348c;this[_0x1327b2(0x1eb)]['add'](_0x5bdc67);});}['onReady'](){const _0x54912f=_0x20c3f7;this[_0x54912f(0x1eb)]['get'](g),this[_0x54912f(0x1eb)][_0x54912f(0x21c)](S);}};$(b,_0x20c3f7(0x1fd),W),$(b,_0x20c3f7(0x1f1),_0x3f06dc['UNIVER_UNKNOWN']),b=ie([_0x3b7dec(_0x11263e,_0x1cc7c5,_0x469578),w(0x1,_0x390cd4(_0x279b5f)),w(0x2,_0xa6d69f)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ function _0x15af(_0x1519cd,_0x2e06c6){const _0x1cb5e7=_0x1cb5();return _0x15af=function(_0x15af2c,_0x5d3c68){_0x15af2c=_0x15af2c-0x1a9;let _0x1ed7ba=_0x1cb5e7[_0x15af2c];return _0x1ed7ba;},_0x15af(_0x1519cd,_0x2e06c6);}const _0x5bf03e=_0x15af;(function(_0x345d13,_0x4eb6c8){const _0x59fd78=_0x15af,_0x2f5581=_0x345d13();while(!![]){try{const _0x55b865=-parseInt(_0x59fd78(0x1c4))/0x1*(parseInt(_0x59fd78(0x1e7))/0x2)+-parseInt(_0x59fd78(0x1f3))/0x3+-parseInt(_0x59fd78(0x1a9))/0x4+parseInt(_0x59fd78(0x201))/0x5+parseInt(_0x59fd78(0x1c5))/0x6+parseInt(_0x59fd78(0x1cb))/0x7+-parseInt(_0x59fd78(0x200))/0x8;if(_0x55b865===_0x4eb6c8)break;else _0x2f5581['push'](_0x2f5581['shift']());}catch(_0x2ee43f){_0x2f5581['push'](_0x2f5581['shift']());}}}(_0x1cb5,0xd6be2));import{CommentService as _0x210c37,CollaborationSessionService as _0x220e28,UniverCollaborationClientPlugin as _0x1095dd}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xf4a461}from'@univerjs-pro/license';function _0x1cb5(){const _0x2331af=['Delete','forEach','getUnit','/list','commentUpdate$','defineProperty','COMMENT','UNRECOGNIZED','rangeId','size','replies','replyId','length','1245212BggkpG','resolved','add','_commentService','YYYY/MM/DD\x20HH:mm','get','_threadCommentDataSource','_httpService','UNIVER_UNKNOWN','symbol','map','values','addUser','comment','onStarting','comments','type','thread-comment-data-source.config','onReady','Solve','dataSource','_threadCommentDataSourceService','OpenOrReOpen','userID','_configService','post','updateComment','527TOcWJj','8607570ErrZfg','body','threadId','ref','Edit','_userService','1768179MNmVAH','rangeType','reply','_injector','pluginName','_initUserSync','parse','user','_init','_initDataSource','unitId','/universer-api/comment/unit/','getComment','parentId','deleteComment','solved','/edit','format','root','find','users','getMemberID','syncUpdateMutationToColla','customRanges','slice','subscribe','delete','resolveComment','382nProKU','getOwnPropertyDescriptor','Solved','content','createTimestamp','filter','code','error','userId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/delete','Unknown','4299519TCVrll','getCurrentUser','requireSession','_threadCommentModel','_config','Add','/add','saveCommentToSnapshot','addComment','stringify','_sessionService','Reply','/universer-api/user/list','795960EnqPlm','5685110mJsRJb'];_0x1cb5=function(){return _0x2331af;};return _0x1cb5();}import{dayjs as _0x2bfba6,UserManagerService as _0x48dccf,Inject as _0xc780c5,Injector as _0x394220,Disposable as _0x5da964,CustomRangeType as _0x1bd652,UniverInstanceType as _0x27d52f,DependentOn as _0x5b752f,IConfigService as _0x1aa97b,Plugin as _0x4175ae,merge as _0x29f660}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x1ce1e2}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x5208a,IThreadCommentDataSourceService as _0x51bd43}from'@univerjs/thread-comment';import{bufferTime as _0x3dce6d}from'rxjs';import{HTTPService as _0x2353b4}from'@univerjs/network';const W=_0x5bf03e(0x1f0);var I=(_0x244959=>(_0x244959[_0x244959[_0x5bf03e(0x1bf)]=0x0]=_0x5bf03e(0x1bf),_0x244959[_0x244959[_0x5bf03e(0x1e9)]=0x1]=_0x5bf03e(0x1e9),_0x244959[_0x244959[_0x5bf03e(0x209)]=-0x1]=_0x5bf03e(0x209),_0x244959))(I||{}),v=(_0xb1669d=>(_0xb1669d[_0xb1669d[_0x5bf03e(0x1f2)]=0x0]=_0x5bf03e(0x1f2),_0xb1669d[_0xb1669d[_0x5bf03e(0x1f8)]=0x1]=_0x5bf03e(0x1f8),_0xb1669d[_0xb1669d[_0x5bf03e(0x1fe)]=0x2]=_0x5bf03e(0x1fe),_0xb1669d[_0xb1669d[_0x5bf03e(0x1c9)]=0x3]='Edit',_0xb1669d[_0xb1669d[_0x5bf03e(0x202)]=0x4]=_0x5bf03e(0x202),_0xb1669d[_0xb1669d['Solve']=0x5]=_0x5bf03e(0x1bc),_0xb1669d[_0xb1669d[_0x5bf03e(0x209)]=-0x1]=_0x5bf03e(0x209),_0xb1669d))(v||{});const D=_0x38cee2=>_0x2bfba6(new Date(+_0x38cee2))[_0x5bf03e(0x1dc)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x1cfc19,_0x25af0b)=>{const _0x5e5260=_0x5bf03e,_0x18d93e=_0x1cfc19['get'](_0x48dccf),_0x40ee04=_0x1cfc19[_0x5e5260(0x1ae)](_0x2353b4);_0x25af0b[_0x5e5260(0x203)](_0x36f700=>{const _0xfb8e08=_0x5e5260;_0x18d93e['getUser'](_0x36f700)&&_0x25af0b[_0xfb8e08(0x1e5)](_0x36f700);}),_0x25af0b[_0x5e5260(0x20b)]&&(await _0x40ee04[_0x5e5260(0x1ae)](_0x5e5260(0x1ff),{'params':{'userIDs':[..._0x25af0b]}}))[_0x5e5260(0x1c6)][_0x5e5260(0x1df)]['forEach'](_0x5e43f0=>{const _0x46243d=_0x5e5260;_0x5e43f0&&_0x18d93e[_0x46243d(0x1b5)](_0x5e43f0);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x20bdc8,_0x37d360,_0xde6f02,_0x1616e9)=>{const _0x108a23=_0x5bf03e;for(var _0x1c5c74=_0x1616e9>0x1?void 0x0:_0x1616e9?K(_0x37d360,_0xde6f02):_0x37d360,_0xca633a=_0x20bdc8[_0x108a23(0x20e)]-0x1,_0x25bd6d;_0xca633a>=0x0;_0xca633a--)(_0x25bd6d=_0x20bdc8[_0xca633a])&&(_0x1c5c74=_0x25bd6d(_0x1c5c74)||_0x1c5c74);return _0x1c5c74;},p=(_0x312205,_0x1ee512)=>(_0xaf8f32,_0x129af2)=>_0x1ee512(_0xaf8f32,_0x129af2,_0x312205);let S=class extends _0x5da964{constructor(_0x44a03a,_0x16edca,_0x39bc82,_0x4fa082){const _0x34bce1=_0x5bf03e;super(),this[_0x34bce1(0x1ac)]=_0x44a03a,this[_0x34bce1(0x1f6)]=_0x16edca,this['_userService']=_0x39bc82,this['_injector']=_0x4fa082,this[_0x34bce1(0x1d3)](),this[_0x34bce1(0x1d0)]();}[_0x5bf03e(0x1d0)](){const _0x341f6d=_0x5bf03e;this['disposeWithMe'](this[_0x341f6d(0x1f6)][_0x341f6d(0x206)]['pipe'](_0x3dce6d(0x10))[_0x341f6d(0x1e4)](_0x377ae3=>{const _0x5754f9=_0x341f6d,_0x20e697=new Set();_0x377ae3[_0x5754f9(0x203)](_0x5a7286=>{const _0x506def=_0x5754f9;switch(_0x5a7286['type']){case _0x506def(0x1ab):{const _0x5e3632=_0x5a7286['payload']['personId'];_0x20e697[_0x506def(0x1ab)](_0x5e3632);break;}}}),B(this[_0x5754f9(0x1ce)],_0x20e697);}));}['_init'](){const _0x5a4610=_0x5bf03e;this['disposeWithMe'](this[_0x5a4610(0x1ac)][_0x5a4610(0x206)][_0x5a4610(0x1e4)](async _0xf45214=>{const _0x33bb2e=_0x5a4610;var _0x2b852c,_0x50d7a9,_0x2a5ea1,_0x25fc25;const _0x38fe38=(_0x2b852c=this[_0x33bb2e(0x1f6)][_0x33bb2e(0x204)](_0xf45214[_0x33bb2e(0x1d5)])[_0x33bb2e(0x1de)](_0x393a87=>_0x393a87['threadId']===_0xf45214[_0x33bb2e(0x1c7)]))==null?void 0x0:_0x2b852c[_0x33bb2e(0x1dd)];if(!_0x38fe38)return;const {unitId:_0x5e09ee,subUnitId:_0x31cb78}=_0x38fe38;switch(_0xf45214[_0x33bb2e(0x1d2)]&&this['_userService'][_0x33bb2e(0x1b5)](_0xf45214[_0x33bb2e(0x1d2)]),_0xf45214[_0x33bb2e(0x1b9)]){case v['Add']:break;case v[_0x33bb2e(0x1fe)]:{this[_0x33bb2e(0x1f6)]['addComment'](_0x5e09ee,_0x31cb78,{'unitId':_0x5e09ee,'subUnitId':_0x31cb78,'ref':'','id':_0xf45214[_0x33bb2e(0x20d)],'dT':D(+_0xf45214[_0x33bb2e(0x1eb)]),'threadId':_0xf45214[_0x33bb2e(0x1c7)],'personId':(_0x2a5ea1=(_0x50d7a9=_0xf45214['user'])==null?void 0x0:_0x50d7a9[_0x33bb2e(0x1c0)])!=null?_0x2a5ea1:_0xf45214[_0x33bb2e(0x1ef)],'text':JSON[_0x33bb2e(0x1d1)](_0xf45214[_0x33bb2e(0x1ea)]),'parentId':_0x38fe38['id']});break;}case v[_0x33bb2e(0x202)]:{const _0x73e2cd=this[_0x33bb2e(0x1f6)][_0x33bb2e(0x1d7)](_0x5e09ee,_0x31cb78,_0xf45214['replyId']);_0x73e2cd&&_0x73e2cd[_0x33bb2e(0x1d8)]&&this[_0x33bb2e(0x1f6)][_0x33bb2e(0x1d9)](_0x5e09ee,_0x31cb78,_0xf45214[_0x33bb2e(0x20d)]);break;}case v[_0x33bb2e(0x1c9)]:{this['_threadCommentModel'][_0x33bb2e(0x1c3)](_0x5e09ee,_0x31cb78,{'commentId':_0xf45214[_0x33bb2e(0x20d)],'text':JSON[_0x33bb2e(0x1d1)](_0xf45214[_0x33bb2e(0x1ea)])});break;}case v['Solve']:{const _0x586f1c=(_0x25fc25=this['_threadCommentModel'][_0x33bb2e(0x204)](_0xf45214[_0x33bb2e(0x1d5)])['find'](_0x47b0ba=>_0x47b0ba[_0x33bb2e(0x1c7)]===_0xf45214[_0x33bb2e(0x1c7)]))==null?void 0x0:_0x25fc25[_0x33bb2e(0x1dd)];_0x586f1c&&this[_0x33bb2e(0x1f6)]['resolveComment'](_0x5e09ee,_0x31cb78,_0x586f1c['id'],_0xf45214[_0x33bb2e(0x1da)]===I[_0x33bb2e(0x1e9)]);break;}}}));}};S=V([p(0x0,_0xc780c5(_0x210c37)),p(0x1,_0xc780c5(_0x5208a)),p(0x2,_0xc780c5(_0x48dccf)),p(0x3,_0xc780c5(_0x394220))],S);const z=_0x5bf03e(0x1ba),M={};var k=Object[_0x5bf03e(0x1e8)],Q=(_0x327b80,_0x56553b,_0x4eda03,_0x4db94d)=>{const _0x2bef10=_0x5bf03e;for(var _0x5c7386=_0x4db94d>0x1?void 0x0:_0x4db94d?k(_0x56553b,_0x4eda03):_0x56553b,_0x1f6ea3=_0x327b80[_0x2bef10(0x20e)]-0x1,_0x4c936b;_0x1f6ea3>=0x0;_0x1f6ea3--)(_0x4c936b=_0x327b80[_0x1f6ea3])&&(_0x5c7386=_0x4c936b(_0x5c7386)||_0x5c7386);return _0x5c7386;},_=(_0x388db6,_0x22d905)=>(_0xd30b02,_0x393e89)=>_0x22d905(_0xd30b02,_0x393e89,_0x388db6);function X(_0x29e57f,_0x5ae59b){const _0xf84ef1=_0x5bf03e,_0x592c0f=_0x29e57f[_0xf84ef1(0x20c)][0x0];return{..._0x5ae59b,'id':_0x592c0f[_0xf84ef1(0x20d)],'resolved':_0x29e57f[_0xf84ef1(0x1da)]===0x1,'dT':D(_0x592c0f[_0xf84ef1(0x1eb)]),'personId':_0x592c0f[_0xf84ef1(0x1ef)],'threadId':_0x592c0f['threadId']};}function ee(_0x35f872,_0x29cbcc,_0x45bad0){const _0x353495=_0x5bf03e;var _0x555605,_0x1df5ef;if(((_0x1df5ef=(_0x555605=_0x35f872==null?void 0x0:_0x35f872[_0x353495(0x20c)])==null?void 0x0:_0x555605[_0x353495(0x20e)])!=null?_0x1df5ef:0x0)>0x0){const _0x32af3f=(_0x475295,_0x4b3bc0)=>({'id':_0x475295[_0x353495(0x20d)],'threadId':_0x475295[_0x353495(0x1c7)],'dT':D(_0x475295[_0x353495(0x1eb)]),'personId':_0x475295[_0x353495(0x1ef)],'resolved':_0x35f872[_0x353495(0x1da)]===I[_0x353495(0x1e9)],'unitId':_0x29cbcc,'subUnitId':_0x45bad0,'text':JSON[_0x353495(0x1d1)](_0x475295[_0x353495(0x1ea)]),'parentId':_0x4b3bc0}),_0x1d4391=_0x32af3f(_0x35f872[_0x353495(0x20c)][0x0]);return{..._0x1d4391,'children':_0x35f872[_0x353495(0x20c)][_0x353495(0x1e3)](0x1)['map'](_0x18a175=>_0x32af3f(_0x18a175,_0x1d4391['id']))};}return null;}let f=class{constructor(_0x53f406,_0x1d89ff,_0xeb5d11,_0x1b3914){const _0x5a8022=_0x5bf03e;this['_httpService']=_0x53f406,this[_0x5a8022(0x1ca)]=_0x1d89ff,this[_0x5a8022(0x1fd)]=_0xeb5d11,this[_0x5a8022(0x1ce)]=_0x1b3914;}async[_0x5bf03e(0x1fb)](_0x4b7126){const _0x3324f2=_0x5bf03e;var _0x2c0177,_0x2c9e64;const {parentId:_0xea5e6c,unitId:_0x1ab178,text:_0x55e48e,threadId:_0xcd0d4b}=_0x4b7126,_0x5a6654=(_0x2c9e64=(_0x2c0177=_0x55e48e[_0x3324f2(0x1e2)])==null?void 0x0:_0x2c0177[_0x3324f2(0x1ec)](_0x169a59=>_0x169a59[_0x3324f2(0x1cc)]===_0x1bd652['COMMENT'])[_0x3324f2(0x1b3)](_0x384d59=>_0x384d59[_0x3324f2(0x20a)]))!=null?_0x2c9e64:[],_0x3656ee=JSON[_0x3324f2(0x1fc)](_0x55e48e),_0x555e36=(await this['_sessionService'][_0x3324f2(0x1f5)](_0x1ab178))[_0x3324f2(0x1e0)]();if(_0xea5e6c){const _0x1c3ed8={'memberId':_0x555e36,'unitId':_0x1ab178,'content':_0x3656ee,'mention':_0x5a6654,'threadId':_0xcd0d4b},_0x57dbb7=(await this['_httpService'][_0x3324f2(0x1c2)]('/universer-api/comment/unit/'+_0x1ab178+'/reply',{'body':_0x1c3ed8}))[_0x3324f2(0x1c6)][_0x3324f2(0x1cd)];return{..._0x4b7126,'id':_0x57dbb7[_0x3324f2(0x20d)],'dT':_0x2bfba6(+_0x57dbb7[_0x3324f2(0x1eb)])[_0x3324f2(0x1dc)](_0x3324f2(0x1ad)),'personId':_0x57dbb7[_0x3324f2(0x1ef)]};}else{const _0x1f4c66={'memberId':_0x555e36,'unitId':_0x1ab178,'content':_0x3656ee,'mention':_0x5a6654},_0x51d893=await this['_httpService'][_0x3324f2(0x1c2)]('/universer-api/comment/unit/'+_0x1ab178+_0x3324f2(0x1f9),{'body':_0x1f4c66});return X(_0x51d893['body'][_0x3324f2(0x1b6)],_0x4b7126);}}async[_0x5bf03e(0x1c3)](_0xa79ba){const _0x194343=_0x5bf03e;var _0x4f9d1a,_0x2c822c;const {text:_0x30482c,unitId:_0x491b2f}=_0xa79ba,_0x41775d=(_0x2c822c=(_0x4f9d1a=_0x30482c['customRanges'])==null?void 0x0:_0x4f9d1a['filter'](_0xd7bd87=>_0xd7bd87[_0x194343(0x1cc)]===_0x1bd652[_0x194343(0x208)])[_0x194343(0x1b3)](_0x45f868=>_0x45f868[_0x194343(0x20a)]))!=null?_0x2c822c:[],_0x39bcb6=JSON[_0x194343(0x1fc)](_0x30482c),_0x107c06=_0xa79ba[_0x194343(0x1c7)],_0x48c58b=_0xa79ba['id'],_0x14bea9={'memberId':(await this[_0x194343(0x1fd)][_0x194343(0x1f5)](_0x491b2f))[_0x194343(0x1e0)](),'unitId':_0x491b2f,'threadId':_0x107c06,'mention':_0x41775d,'content':_0x39bcb6,'replyId':_0x48c58b},_0x2f1b2e=await this['_httpService'][_0x194343(0x1c2)]('/universer-api/comment/unit/'+_0x491b2f+_0x194343(0x1db),{'body':_0x14bea9});return!_0x2f1b2e['body'][_0x194343(0x1ee)]||_0x2f1b2e['body'][_0x194343(0x1ee)][_0x194343(0x1ed)]===0x1;}async[_0x5bf03e(0x1e6)](_0x19380d){const _0x4c2e14=_0x5bf03e,{unitId:_0x226eb3}=_0x19380d,_0x220999=_0x19380d[_0x4c2e14(0x1c7)],_0x869398={'memberId':this['_userService'][_0x4c2e14(0x1f4)]()[_0x4c2e14(0x1c0)],'unitId':_0x226eb3,'threadId':_0x220999,'solved':_0x19380d[_0x4c2e14(0x1aa)]?I[_0x4c2e14(0x1e9)]:I[_0x4c2e14(0x1bf)]},_0x3f3afb=await this[_0x4c2e14(0x1b0)][_0x4c2e14(0x1c2)](_0x4c2e14(0x1d6)+_0x226eb3+'/solved',{'body':_0x869398});return!_0x3f3afb[_0x4c2e14(0x1c6)][_0x4c2e14(0x1ee)]||_0x3f3afb[_0x4c2e14(0x1c6)]['error']['code']===0x1;}async['deleteComment'](_0x1d1fed,_0x5b24c0,_0x458bf2,_0x37a8d6){const _0x5e448e=_0x5bf03e,_0x4a0dd0={'memberId':(await this[_0x5e448e(0x1fd)]['requireSession'](_0x1d1fed))['getMemberID'](),'threadId':_0x458bf2,'replyId':_0x37a8d6,'unitId':_0x1d1fed},_0x48b2c7=await this[_0x5e448e(0x1b0)][_0x5e448e(0x1c2)](_0x5e448e(0x1d6)+_0x1d1fed+_0x5e448e(0x1f1),{'body':_0x4a0dd0});return!_0x48b2c7['body'][_0x5e448e(0x1ee)]||_0x48b2c7[_0x5e448e(0x1c6)]['error'][_0x5e448e(0x1ed)]===0x1;}async['listComments'](_0x283833,_0x229f4a,_0x449010){const _0x3e6ed4=_0x5bf03e,_0x469d54={'unitId':_0x283833,'threadId':_0x449010},_0x3b84a4=await this[_0x3e6ed4(0x1b0)][_0x3e6ed4(0x1c2)](_0x3e6ed4(0x1d6)+_0x283833+_0x3e6ed4(0x205),{'body':_0x469d54}),_0x4b2575=_0x449010[_0x3e6ed4(0x1b3)](_0x3b38f6=>ee(_0x3b84a4[_0x3e6ed4(0x1c6)][_0x3e6ed4(0x1b8)][_0x3b38f6],_0x283833,_0x229f4a))[_0x3e6ed4(0x1ec)](Boolean);return Object[_0x3e6ed4(0x1b4)](_0x3b84a4[_0x3e6ed4(0x1c6)][_0x3e6ed4(0x1df)])[_0x3e6ed4(0x203)](_0x4dd442=>{const _0x28239b=_0x3e6ed4;this['_userService'][_0x28239b(0x1b5)](_0x4dd442);}),_0x4b2575;}[_0x5bf03e(0x1fa)](_0x4faf28){const _0x4e2ed0=_0x5bf03e;return{'id':_0x4faf28['id'],'threadId':_0x4faf28['threadId'],'ref':_0x4faf28[_0x4e2ed0(0x1c8)]};}};f=Q([_(0x0,_0xc780c5(_0x2353b4)),_(0x1,_0xc780c5(_0x48dccf)),_(0x2,_0xc780c5(_0x220e28)),_(0x3,_0xc780c5(_0x394220))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x2fdda9,_0xfef264,_0x9014a5,_0x33ac1e)=>{const _0x35d59d=_0x5bf03e;for(var _0x78004f=_0x33ac1e>0x1?void 0x0:_0x33ac1e?re(_0xfef264,_0x9014a5):_0xfef264,_0x3ceeaf=_0x2fdda9[_0x35d59d(0x20e)]-0x1,_0x4416f8;_0x3ceeaf>=0x0;_0x3ceeaf--)(_0x4416f8=_0x2fdda9[_0x3ceeaf])&&(_0x78004f=_0x4416f8(_0x78004f)||_0x78004f);return _0x78004f;},N=(_0x26ff3f,_0x24cc19)=>(_0xbb7509,_0x34b1af)=>_0x24cc19(_0xbb7509,_0x34b1af,_0x26ff3f);let g=class extends _0x5da964{constructor(_0x2f98bf,_0x5d88e1){const _0x4520be=_0x5bf03e;super(),this[_0x4520be(0x1be)]=_0x2f98bf,this[_0x4520be(0x1af)]=_0x5d88e1,this['_initDataSource']();}[_0x5bf03e(0x1d4)](){const _0xe3c2a1=_0x5bf03e;this[_0xe3c2a1(0x1be)][_0xe3c2a1(0x1bd)]=this[_0xe3c2a1(0x1af)],this['_threadCommentDataSourceService'][_0xe3c2a1(0x1e1)]=!0x1;}};g=te([N(0x0,_0x51bd43),N(0x1,_0xc780c5(f))],g);var se=Object[_0x5bf03e(0x207)],oe=Object['getOwnPropertyDescriptor'],ne=(_0xeed73c,_0x2f4b7e,_0x577f20)=>_0x2f4b7e in _0xeed73c?se(_0xeed73c,_0x2f4b7e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x577f20}):_0xeed73c[_0x2f4b7e]=_0x577f20,ie=(_0x56191b,_0x3fcbe9,_0x212778,_0x54c9d2)=>{const _0x580589=_0x5bf03e;for(var _0x20f033=_0x54c9d2>0x1?void 0x0:_0x54c9d2?oe(_0x3fcbe9,_0x212778):_0x3fcbe9,_0x44d354=_0x56191b[_0x580589(0x20e)]-0x1,_0x1a87bd;_0x44d354>=0x0;_0x44d354--)(_0x1a87bd=_0x56191b[_0x44d354])&&(_0x20f033=_0x1a87bd(_0x20f033)||_0x20f033);return _0x20f033;},w=(_0x47190c,_0x3b3699)=>(_0x37fba2,_0x5ef8e4)=>_0x3b3699(_0x37fba2,_0x5ef8e4,_0x47190c),$=(_0x17ba0b,_0x3c483f,_0x13ed47)=>ne(_0x17ba0b,typeof _0x3c483f!=_0x5bf03e(0x1b2)?_0x3c483f+'':_0x3c483f,_0x13ed47);let b=class extends _0x4175ae{constructor(_0x13bf0e=M,_0x341dc6,_0x22d683){const _0x4a18fa=_0x5bf03e;super(),this['_config']=_0x13bf0e,this[_0x4a18fa(0x1ce)]=_0x341dc6,this[_0x4a18fa(0x1c1)]=_0x22d683;const {..._0x5516d0}=_0x29f660({},M,this[_0x4a18fa(0x1f7)]);this[_0x4a18fa(0x1c1)]['setConfig'](z,_0x5516d0);}[_0x5bf03e(0x1b7)](){const _0x35f776=_0x5bf03e;[[f],[g],[S]][_0x35f776(0x203)](_0x1b919b=>{const _0x2d9448=_0x35f776;this[_0x2d9448(0x1ce)][_0x2d9448(0x1ab)](_0x1b919b);});}[_0x5bf03e(0x1bb)](){const _0x2396ab=_0x5bf03e;this['_injector'][_0x2396ab(0x1ae)](g),this[_0x2396ab(0x1ce)][_0x2396ab(0x1ae)](S);}};$(b,_0x5bf03e(0x1cf),W),$(b,'type',_0x27d52f[_0x5bf03e(0x1b1)]),b=ie([_0x5b752f(_0x1ce1e2,_0x1095dd,_0xf4a461),w(0x1,_0xc780c5(_0x394220)),w(0x2,_0x1aa97b)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x20c3f7=_0x348c;(function(_0x2049a0,_0x5a40c5){const _0x4a0828=_0x348c,_0x54afdb=_0x2049a0();while(!![]){try{const _0xd97ac9=parseInt(_0x4a0828(0x24b))/0x1+-parseInt(_0x4a0828(0x200))/0x2+-parseInt(_0x4a0828(0x235))/0x3*(-parseInt(_0x4a0828(0x203))/0x4)+-parseInt(_0x4a0828(0x212))/0x5*(parseInt(_0x4a0828(0x1f0))/0x6)+-parseInt(_0x4a0828(0x227))/0x7+parseInt(_0x4a0828(0x244))/0x8+parseInt(_0x4a0828(0x205))/0x9*(parseInt(_0x4a0828(0x211))/0xa);if(_0xd97ac9===_0x5a40c5)break;else _0x54afdb['push'](_0x54afdb['shift']());}catch(_0x3fa38a){_0x54afdb['push'](_0x54afdb['shift']());}}}(_0x1759,0x4dad9));import{CommentService as _0x393445,CollaborationSessionService as _0x7d48d8,UniverCollaborationClientPlugin as _0x1cc7c5}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x469578}from'@univerjs-pro/license';import{dayjs as _0x5c03d1,UserManagerService as _0x283f92,Inject as _0x390cd4,Injector as _0x279b5f,Disposable as _0x4a3ac7,CustomRangeType as _0x4d3601,UniverInstanceType as _0x3f06dc,DependentOn as _0x3b7dec,IConfigService as _0xa6d69f,Plugin as _0x5d9d3b,merge as _0x1c4ddb}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x11263e}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x386f71,IThreadCommentDataSourceService as _0x59a2d9}from'@univerjs/thread-comment';import{bufferTime as _0x2facfe}from'rxjs';import{HTTPService as _0x417b86}from'@univerjs/network';function _0x1759(){const _0x11eeab=['replies','dataSource','rangeType','496413dlCWHY','_threadCommentDataSource','userId','listComments','post','Unknown','rangeId','deleteComment','add','stringify','getUser','subscribe','find','threadId','Reply','2405680LhvRUK','values','body','parse','setConfig','disposeWithMe','pipe','514443agNRPH','thread-comment-data-source.config','length','_injector','root','comment','YYYY/MM/DD\x20HH:mm','format','881832oQKkWm','type','UNRECOGNIZED','_threadCommentDataSourceService','/reply','Solved','error','user','delete','map','parentId','OpenOrReOpen','size','pluginName','resolveComment','syncUpdateMutationToColla','555786SGvEPL','users','_threadCommentModel','4wnPMWb','solved','2109879SUUfJo','/delete','comments','getMemberID','payload','COMMENT','content','Add','replyId','saveCommentToSnapshot','_httpService','userID','30YNbdZV','20zYbwHw','_init','/universer-api/comment/unit/','slice','commentUpdate$','getOwnPropertyDescriptor','requireSession','_configService','forEach','getUnit','get','createTimestamp','/edit','_userService','/list','addUser','code','filter','updateComment','Solve','unitId','3499769flzpoA','Edit','_initUserSync','_config','reply','addComment','personId','customRanges','_commentService','symbol','_sessionService'];_0x1759=function(){return _0x11eeab;};return _0x1759();}function _0x348c(_0xed6c39,_0x2d8b83){const _0x175945=_0x1759();return _0x348c=function(_0x348c47,_0x57a9d6){_0x348c47=_0x348c47-0x1ea;let _0x50be2c=_0x175945[_0x348c47];return _0x50be2c;},_0x348c(_0xed6c39,_0x2d8b83);}const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x398f42=>(_0x398f42[_0x398f42[_0x20c3f7(0x1fb)]=0x0]='OpenOrReOpen',_0x398f42[_0x398f42[_0x20c3f7(0x1f5)]=0x1]=_0x20c3f7(0x1f5),_0x398f42[_0x398f42[_0x20c3f7(0x1f2)]=-0x1]=_0x20c3f7(0x1f2),_0x398f42))(I||{}),v=(_0x1fdd40=>(_0x1fdd40[_0x1fdd40[_0x20c3f7(0x23a)]=0x0]=_0x20c3f7(0x23a),_0x1fdd40[_0x1fdd40[_0x20c3f7(0x20c)]=0x1]=_0x20c3f7(0x20c),_0x1fdd40[_0x1fdd40[_0x20c3f7(0x243)]=0x2]=_0x20c3f7(0x243),_0x1fdd40[_0x1fdd40[_0x20c3f7(0x228)]=0x3]=_0x20c3f7(0x228),_0x1fdd40[_0x1fdd40['Delete']=0x4]='Delete',_0x1fdd40[_0x1fdd40[_0x20c3f7(0x225)]=0x5]=_0x20c3f7(0x225),_0x1fdd40[_0x1fdd40[_0x20c3f7(0x1f2)]=-0x1]='UNRECOGNIZED',_0x1fdd40))(v||{});const D=_0x5d2ebb=>_0x5c03d1(new Date(+_0x5d2ebb))[_0x20c3f7(0x1ef)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x22db6f,_0x2f044e)=>{const _0x12b9dc=_0x20c3f7,_0x2c5545=_0x22db6f['get'](_0x283f92),_0x17cff5=_0x22db6f[_0x12b9dc(0x21c)](_0x417b86);_0x2f044e['forEach'](_0x1084fc=>{const _0x51f7f8=_0x12b9dc;_0x2c5545[_0x51f7f8(0x23f)](_0x1084fc)&&_0x2f044e[_0x51f7f8(0x1f8)](_0x1084fc);}),_0x2f044e[_0x12b9dc(0x1fc)]&&(await _0x17cff5[_0x12b9dc(0x21c)]('/universer-api/user/list',{'params':{'userIDs':[..._0x2f044e]}}))[_0x12b9dc(0x246)]['users']['forEach'](_0x1da854=>{const _0x1d306e=_0x12b9dc;_0x1da854&&_0x2c5545[_0x1d306e(0x221)](_0x1da854);});};var K=Object[_0x20c3f7(0x217)],V=(_0x161bd4,_0x4d581f,_0x5662c1,_0x707f8e)=>{const _0x1862bf=_0x20c3f7;for(var _0xa21cbf=_0x707f8e>0x1?void 0x0:_0x707f8e?K(_0x4d581f,_0x5662c1):_0x4d581f,_0xe94021=_0x161bd4[_0x1862bf(0x1ea)]-0x1,_0x45b1b7;_0xe94021>=0x0;_0xe94021--)(_0x45b1b7=_0x161bd4[_0xe94021])&&(_0xa21cbf=_0x45b1b7(_0xa21cbf)||_0xa21cbf);return _0xa21cbf;},p=(_0x763387,_0x12c8e1)=>(_0x859521,_0x4093e7)=>_0x12c8e1(_0x859521,_0x4093e7,_0x763387);let S=class extends _0x4a3ac7{constructor(_0x268f94,_0x304a08,_0x18edc3,_0x2b0526){const _0x48277b=_0x20c3f7;super(),this[_0x48277b(0x22f)]=_0x268f94,this['_threadCommentModel']=_0x304a08,this[_0x48277b(0x21f)]=_0x18edc3,this[_0x48277b(0x1eb)]=_0x2b0526,this[_0x48277b(0x213)](),this[_0x48277b(0x229)]();}[_0x20c3f7(0x229)](){const _0x5036e2=_0x20c3f7;this[_0x5036e2(0x249)](this[_0x5036e2(0x202)][_0x5036e2(0x216)][_0x5036e2(0x24a)](_0x2facfe(0x10))['subscribe'](_0x5ddd9d=>{const _0x161876=_0x5036e2,_0x17451f=new Set();_0x5ddd9d[_0x161876(0x21a)](_0x2e372f=>{const _0x3c59ff=_0x161876;switch(_0x2e372f[_0x3c59ff(0x1f1)]){case _0x3c59ff(0x23d):{const _0xd8551f=_0x2e372f[_0x3c59ff(0x209)][_0x3c59ff(0x22d)];_0x17451f[_0x3c59ff(0x23d)](_0xd8551f);break;}}}),B(this['_injector'],_0x17451f);}));}[_0x20c3f7(0x213)](){const _0x42080=_0x20c3f7;this['disposeWithMe'](this[_0x42080(0x22f)][_0x42080(0x216)][_0x42080(0x240)](async _0x3fc319=>{const _0x1e81f0=_0x42080;var _0x17933c,_0x29bc56,_0xd14a48,_0x3ec092;const _0x51bb7e=(_0x17933c=this[_0x1e81f0(0x202)][_0x1e81f0(0x21b)](_0x3fc319[_0x1e81f0(0x226)])[_0x1e81f0(0x241)](_0x14113a=>_0x14113a[_0x1e81f0(0x242)]===_0x3fc319[_0x1e81f0(0x242)]))==null?void 0x0:_0x17933c['root'];if(!_0x51bb7e)return;const {unitId:_0x298f94,subUnitId:_0x2591e7}=_0x51bb7e;switch(_0x3fc319[_0x1e81f0(0x1f7)]&&this[_0x1e81f0(0x21f)][_0x1e81f0(0x221)](_0x3fc319['user']),_0x3fc319[_0x1e81f0(0x1f1)]){case v[_0x1e81f0(0x20c)]:break;case v[_0x1e81f0(0x243)]:{this[_0x1e81f0(0x202)][_0x1e81f0(0x22c)](_0x298f94,_0x2591e7,{'unitId':_0x298f94,'subUnitId':_0x2591e7,'ref':'','id':_0x3fc319['replyId'],'dT':D(+_0x3fc319[_0x1e81f0(0x21d)]),'threadId':_0x3fc319['threadId'],'personId':(_0xd14a48=(_0x29bc56=_0x3fc319['user'])==null?void 0x0:_0x29bc56[_0x1e81f0(0x210)])!=null?_0xd14a48:_0x3fc319[_0x1e81f0(0x237)],'text':JSON[_0x1e81f0(0x247)](_0x3fc319[_0x1e81f0(0x20b)]),'parentId':_0x51bb7e['id']});break;}case v['Delete']:{const _0x4f7301=this[_0x1e81f0(0x202)]['getComment'](_0x298f94,_0x2591e7,_0x3fc319['replyId']);_0x4f7301&&_0x4f7301[_0x1e81f0(0x1fa)]&&this[_0x1e81f0(0x202)][_0x1e81f0(0x23c)](_0x298f94,_0x2591e7,_0x3fc319[_0x1e81f0(0x20d)]);break;}case v[_0x1e81f0(0x228)]:{this[_0x1e81f0(0x202)][_0x1e81f0(0x224)](_0x298f94,_0x2591e7,{'commentId':_0x3fc319['replyId'],'text':JSON['parse'](_0x3fc319[_0x1e81f0(0x20b)])});break;}case v[_0x1e81f0(0x225)]:{const _0x457853=(_0x3ec092=this[_0x1e81f0(0x202)][_0x1e81f0(0x21b)](_0x3fc319[_0x1e81f0(0x226)])[_0x1e81f0(0x241)](_0x4b18dc=>_0x4b18dc[_0x1e81f0(0x242)]===_0x3fc319['threadId']))==null?void 0x0:_0x3ec092[_0x1e81f0(0x1ec)];_0x457853&&this[_0x1e81f0(0x202)]['resolveComment'](_0x298f94,_0x2591e7,_0x457853['id'],_0x3fc319[_0x1e81f0(0x204)]===I[_0x1e81f0(0x1f5)]);break;}}}));}};S=V([p(0x0,_0x390cd4(_0x393445)),p(0x1,_0x390cd4(_0x386f71)),p(0x2,_0x390cd4(_0x283f92)),p(0x3,_0x390cd4(_0x279b5f))],S);const z=_0x20c3f7(0x24c),M={};var k=Object[_0x20c3f7(0x217)],Q=(_0x5ac6a4,_0x25e3e6,_0x198873,_0x4fb1dd)=>{const _0xfcc63b=_0x20c3f7;for(var _0x51af79=_0x4fb1dd>0x1?void 0x0:_0x4fb1dd?k(_0x25e3e6,_0x198873):_0x25e3e6,_0xda4edd=_0x5ac6a4[_0xfcc63b(0x1ea)]-0x1,_0xa8634e;_0xda4edd>=0x0;_0xda4edd--)(_0xa8634e=_0x5ac6a4[_0xda4edd])&&(_0x51af79=_0xa8634e(_0x51af79)||_0x51af79);return _0x51af79;},_=(_0x3a6470,_0x45d0fa)=>(_0x112011,_0x28b1e4)=>_0x45d0fa(_0x112011,_0x28b1e4,_0x3a6470);function X(_0x11808b,_0x77de00){const _0x1aa43e=_0x20c3f7,_0x2f7e6c=_0x11808b[_0x1aa43e(0x232)][0x0];return{..._0x77de00,'id':_0x2f7e6c[_0x1aa43e(0x20d)],'resolved':_0x11808b[_0x1aa43e(0x204)]===0x1,'dT':D(_0x2f7e6c[_0x1aa43e(0x21d)]),'personId':_0x2f7e6c[_0x1aa43e(0x237)],'threadId':_0x2f7e6c[_0x1aa43e(0x242)]};}function ee(_0x1acc51,_0x46f0e4,_0x679100){const _0x427b3b=_0x20c3f7;var _0x4dd982,_0x22b615;if(((_0x22b615=(_0x4dd982=_0x1acc51==null?void 0x0:_0x1acc51[_0x427b3b(0x232)])==null?void 0x0:_0x4dd982[_0x427b3b(0x1ea)])!=null?_0x22b615:0x0)>0x0){const _0x46846d=(_0x2b8871,_0x2c89bc)=>({'id':_0x2b8871[_0x427b3b(0x20d)],'threadId':_0x2b8871[_0x427b3b(0x242)],'dT':D(_0x2b8871[_0x427b3b(0x21d)]),'personId':_0x2b8871['userId'],'resolved':_0x1acc51[_0x427b3b(0x204)]===I[_0x427b3b(0x1f5)],'unitId':_0x46f0e4,'subUnitId':_0x679100,'text':JSON[_0x427b3b(0x247)](_0x2b8871[_0x427b3b(0x20b)]),'parentId':_0x2c89bc}),_0xcd4119=_0x46846d(_0x1acc51[_0x427b3b(0x232)][0x0]);return{..._0xcd4119,'children':_0x1acc51['replies'][_0x427b3b(0x215)](0x1)['map'](_0x28e41d=>_0x46846d(_0x28e41d,_0xcd4119['id']))};}return null;}let f=class{constructor(_0x40b2f2,_0x5b2288,_0x521195,_0x30b4e2){const _0x51ccdc=_0x20c3f7;this['_httpService']=_0x40b2f2,this[_0x51ccdc(0x21f)]=_0x5b2288,this[_0x51ccdc(0x231)]=_0x521195,this[_0x51ccdc(0x1eb)]=_0x30b4e2;}async[_0x20c3f7(0x22c)](_0x2340db){const _0x2b392e=_0x20c3f7;var _0x252db5,_0x3e35e1;const {parentId:_0x44bbc4,unitId:_0x292cdc,text:_0x52e0a6,threadId:_0x4575d7}=_0x2340db,_0x1c0ee5=(_0x3e35e1=(_0x252db5=_0x52e0a6['customRanges'])==null?void 0x0:_0x252db5[_0x2b392e(0x223)](_0x2d3786=>_0x2d3786[_0x2b392e(0x234)]===_0x4d3601['COMMENT'])[_0x2b392e(0x1f9)](_0x309a1e=>_0x309a1e[_0x2b392e(0x23b)]))!=null?_0x3e35e1:[],_0x2dce12=JSON['stringify'](_0x52e0a6),_0xf5198e=(await this['_sessionService']['requireSession'](_0x292cdc))['getMemberID']();if(_0x44bbc4){const _0x1fea10={'memberId':_0xf5198e,'unitId':_0x292cdc,'content':_0x2dce12,'mention':_0x1c0ee5,'threadId':_0x4575d7},_0x49e346=(await this[_0x2b392e(0x20f)][_0x2b392e(0x239)](_0x2b392e(0x214)+_0x292cdc+_0x2b392e(0x1f4),{'body':_0x1fea10}))[_0x2b392e(0x246)][_0x2b392e(0x22b)];return{..._0x2340db,'id':_0x49e346[_0x2b392e(0x20d)],'dT':_0x5c03d1(+_0x49e346['createTimestamp'])[_0x2b392e(0x1ef)](_0x2b392e(0x1ee)),'personId':_0x49e346[_0x2b392e(0x237)]};}else{const _0x346782={'memberId':_0xf5198e,'unitId':_0x292cdc,'content':_0x2dce12,'mention':_0x1c0ee5},_0x380452=await this[_0x2b392e(0x20f)][_0x2b392e(0x239)](_0x2b392e(0x214)+_0x292cdc+'/add',{'body':_0x346782});return X(_0x380452[_0x2b392e(0x246)][_0x2b392e(0x1ed)],_0x2340db);}}async['updateComment'](_0x270acc){const _0x2f1f1b=_0x20c3f7;var _0x299165,_0x25977b;const {text:_0x18bd7e,unitId:_0x112b10}=_0x270acc,_0x4e5a99=(_0x25977b=(_0x299165=_0x18bd7e[_0x2f1f1b(0x22e)])==null?void 0x0:_0x299165[_0x2f1f1b(0x223)](_0x41507a=>_0x41507a[_0x2f1f1b(0x234)]===_0x4d3601[_0x2f1f1b(0x20a)])[_0x2f1f1b(0x1f9)](_0x333709=>_0x333709[_0x2f1f1b(0x23b)]))!=null?_0x25977b:[],_0x4d04c8=JSON[_0x2f1f1b(0x23e)](_0x18bd7e),_0x21ce33=_0x270acc[_0x2f1f1b(0x242)],_0x50c99d=_0x270acc['id'],_0x1ce0eb={'memberId':(await this['_sessionService'][_0x2f1f1b(0x218)](_0x112b10))[_0x2f1f1b(0x208)](),'unitId':_0x112b10,'threadId':_0x21ce33,'mention':_0x4e5a99,'content':_0x4d04c8,'replyId':_0x50c99d},_0x387bf1=await this[_0x2f1f1b(0x20f)][_0x2f1f1b(0x239)](_0x2f1f1b(0x214)+_0x112b10+_0x2f1f1b(0x21e),{'body':_0x1ce0eb});return!_0x387bf1[_0x2f1f1b(0x246)][_0x2f1f1b(0x1f6)]||_0x387bf1[_0x2f1f1b(0x246)][_0x2f1f1b(0x1f6)][_0x2f1f1b(0x222)]===0x1;}async[_0x20c3f7(0x1fe)](_0x2d1bb3){const _0x309ed8=_0x20c3f7,{unitId:_0x5d570f}=_0x2d1bb3,_0x18f8f=_0x2d1bb3[_0x309ed8(0x242)],_0x2339b6={'memberId':this[_0x309ed8(0x21f)]['getCurrentUser']()[_0x309ed8(0x210)],'unitId':_0x5d570f,'threadId':_0x18f8f,'solved':_0x2d1bb3['resolved']?I[_0x309ed8(0x1f5)]:I[_0x309ed8(0x1fb)]},_0x3f8c8d=await this['_httpService'][_0x309ed8(0x239)]('/universer-api/comment/unit/'+_0x5d570f+'/solved',{'body':_0x2339b6});return!_0x3f8c8d[_0x309ed8(0x246)]['error']||_0x3f8c8d[_0x309ed8(0x246)]['error']['code']===0x1;}async[_0x20c3f7(0x23c)](_0x1d22f2,_0x1f743b,_0x5f57ef,_0x45540e){const _0x349599=_0x20c3f7,_0x441b65={'memberId':(await this[_0x349599(0x231)][_0x349599(0x218)](_0x1d22f2))[_0x349599(0x208)](),'threadId':_0x5f57ef,'replyId':_0x45540e,'unitId':_0x1d22f2},_0x2c28d7=await this[_0x349599(0x20f)]['post'](_0x349599(0x214)+_0x1d22f2+_0x349599(0x206),{'body':_0x441b65});return!_0x2c28d7[_0x349599(0x246)][_0x349599(0x1f6)]||_0x2c28d7[_0x349599(0x246)]['error'][_0x349599(0x222)]===0x1;}async[_0x20c3f7(0x238)](_0x277d49,_0x4cdcaf,_0x10167d){const _0x36c9cf=_0x20c3f7,_0x2cdf58={'unitId':_0x277d49,'threadId':_0x10167d},_0x51a490=await this[_0x36c9cf(0x20f)][_0x36c9cf(0x239)](_0x36c9cf(0x214)+_0x277d49+_0x36c9cf(0x220),{'body':_0x2cdf58}),_0x585dbe=_0x10167d[_0x36c9cf(0x1f9)](_0x3f6f3b=>ee(_0x51a490[_0x36c9cf(0x246)][_0x36c9cf(0x207)][_0x3f6f3b],_0x277d49,_0x4cdcaf))[_0x36c9cf(0x223)](Boolean);return Object[_0x36c9cf(0x245)](_0x51a490[_0x36c9cf(0x246)][_0x36c9cf(0x201)])['forEach'](_0x14e9db=>{const _0x4761ec=_0x36c9cf;this[_0x4761ec(0x21f)][_0x4761ec(0x221)](_0x14e9db);}),_0x585dbe;}[_0x20c3f7(0x20e)](_0x29361d){const _0x1d6e20=_0x20c3f7;return{'id':_0x29361d['id'],'threadId':_0x29361d[_0x1d6e20(0x242)],'ref':_0x29361d['ref']};}};f=Q([_(0x0,_0x390cd4(_0x417b86)),_(0x1,_0x390cd4(_0x283f92)),_(0x2,_0x390cd4(_0x7d48d8)),_(0x3,_0x390cd4(_0x279b5f))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x50f1b8,_0x275d2e,_0x4d7b10,_0x1f7b73)=>{const _0x43989d=_0x20c3f7;for(var _0x217dca=_0x1f7b73>0x1?void 0x0:_0x1f7b73?re(_0x275d2e,_0x4d7b10):_0x275d2e,_0x15c101=_0x50f1b8[_0x43989d(0x1ea)]-0x1,_0x599d2b;_0x15c101>=0x0;_0x15c101--)(_0x599d2b=_0x50f1b8[_0x15c101])&&(_0x217dca=_0x599d2b(_0x217dca)||_0x217dca);return _0x217dca;},N=(_0x3ce9ed,_0x1d5d2f)=>(_0x289dbc,_0x1957b6)=>_0x1d5d2f(_0x289dbc,_0x1957b6,_0x3ce9ed);let g=class extends _0x4a3ac7{constructor(_0x272b55,_0x10f6a8){const _0x405383=_0x20c3f7;super(),this['_threadCommentDataSourceService']=_0x272b55,this[_0x405383(0x236)]=_0x10f6a8,this['_initDataSource']();}['_initDataSource'](){const _0x15413d=_0x20c3f7;this[_0x15413d(0x1f3)][_0x15413d(0x233)]=this[_0x15413d(0x236)],this[_0x15413d(0x1f3)][_0x15413d(0x1ff)]=!0x1;}};g=te([N(0x0,_0x59a2d9),N(0x1,_0x390cd4(f))],g);var se=Object['defineProperty'],oe=Object[_0x20c3f7(0x217)],ne=(_0x25cd94,_0x185bd8,_0x32270e)=>_0x185bd8 in _0x25cd94?se(_0x25cd94,_0x185bd8,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x32270e}):_0x25cd94[_0x185bd8]=_0x32270e,ie=(_0x3110aa,_0x4aeb01,_0x42dd1f,_0xb9c540)=>{const _0x5cc3ef=_0x20c3f7;for(var _0x52bf8f=_0xb9c540>0x1?void 0x0:_0xb9c540?oe(_0x4aeb01,_0x42dd1f):_0x4aeb01,_0x18f52=_0x3110aa[_0x5cc3ef(0x1ea)]-0x1,_0x1da036;_0x18f52>=0x0;_0x18f52--)(_0x1da036=_0x3110aa[_0x18f52])&&(_0x52bf8f=_0x1da036(_0x52bf8f)||_0x52bf8f);return _0x52bf8f;},w=(_0x32123e,_0x48b2fe)=>(_0x1cb524,_0x1a77b3)=>_0x48b2fe(_0x1cb524,_0x1a77b3,_0x32123e),$=(_0x3bfa92,_0xc2b19a,_0x478f3e)=>ne(_0x3bfa92,typeof _0xc2b19a!=_0x20c3f7(0x230)?_0xc2b19a+'':_0xc2b19a,_0x478f3e);let b=class extends _0x5d9d3b{constructor(_0x39616b=M,_0xcd8679,_0x30b76a){const _0x2467e1=_0x20c3f7;super(),this[_0x2467e1(0x22a)]=_0x39616b,this['_injector']=_0xcd8679,this[_0x2467e1(0x219)]=_0x30b76a;const {..._0x486380}=_0x1c4ddb({},M,this[_0x2467e1(0x22a)]);this[_0x2467e1(0x219)][_0x2467e1(0x248)](z,_0x486380);}['onStarting'](){[[f],[g],[S]]['forEach'](_0x5bdc67=>{const _0x1327b2=_0x348c;this[_0x1327b2(0x1eb)]['add'](_0x5bdc67);});}['onReady'](){const _0x54912f=_0x20c3f7;this[_0x54912f(0x1eb)]['get'](g),this[_0x54912f(0x1eb)][_0x54912f(0x21c)](S);}};$(b,_0x20c3f7(0x1fd),W),$(b,_0x20c3f7(0x1f1),_0x3f06dc['UNIVER_UNKNOWN']),b=ie([_0x3b7dec(_0x11263e,_0x1cc7c5,_0x469578),w(0x1,_0x390cd4(_0x279b5f)),w(0x2,_0xa6d69f)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ function _0x15af(_0x1519cd,_0x2e06c6){const _0x1cb5e7=_0x1cb5();return _0x15af=function(_0x15af2c,_0x5d3c68){_0x15af2c=_0x15af2c-0x1a9;let _0x1ed7ba=_0x1cb5e7[_0x15af2c];return _0x1ed7ba;},_0x15af(_0x1519cd,_0x2e06c6);}const _0x5bf03e=_0x15af;(function(_0x345d13,_0x4eb6c8){const _0x59fd78=_0x15af,_0x2f5581=_0x345d13();while(!![]){try{const _0x55b865=-parseInt(_0x59fd78(0x1c4))/0x1*(parseInt(_0x59fd78(0x1e7))/0x2)+-parseInt(_0x59fd78(0x1f3))/0x3+-parseInt(_0x59fd78(0x1a9))/0x4+parseInt(_0x59fd78(0x201))/0x5+parseInt(_0x59fd78(0x1c5))/0x6+parseInt(_0x59fd78(0x1cb))/0x7+-parseInt(_0x59fd78(0x200))/0x8;if(_0x55b865===_0x4eb6c8)break;else _0x2f5581['push'](_0x2f5581['shift']());}catch(_0x2ee43f){_0x2f5581['push'](_0x2f5581['shift']());}}}(_0x1cb5,0xd6be2));import{CommentService as _0x210c37,CollaborationSessionService as _0x220e28,UniverCollaborationClientPlugin as _0x1095dd}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xf4a461}from'@univerjs-pro/license';function _0x1cb5(){const _0x2331af=['Delete','forEach','getUnit','/list','commentUpdate$','defineProperty','COMMENT','UNRECOGNIZED','rangeId','size','replies','replyId','length','1245212BggkpG','resolved','add','_commentService','YYYY/MM/DD\x20HH:mm','get','_threadCommentDataSource','_httpService','UNIVER_UNKNOWN','symbol','map','values','addUser','comment','onStarting','comments','type','thread-comment-data-source.config','onReady','Solve','dataSource','_threadCommentDataSourceService','OpenOrReOpen','userID','_configService','post','updateComment','527TOcWJj','8607570ErrZfg','body','threadId','ref','Edit','_userService','1768179MNmVAH','rangeType','reply','_injector','pluginName','_initUserSync','parse','user','_init','_initDataSource','unitId','/universer-api/comment/unit/','getComment','parentId','deleteComment','solved','/edit','format','root','find','users','getMemberID','syncUpdateMutationToColla','customRanges','slice','subscribe','delete','resolveComment','382nProKU','getOwnPropertyDescriptor','Solved','content','createTimestamp','filter','code','error','userId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/delete','Unknown','4299519TCVrll','getCurrentUser','requireSession','_threadCommentModel','_config','Add','/add','saveCommentToSnapshot','addComment','stringify','_sessionService','Reply','/universer-api/user/list','795960EnqPlm','5685110mJsRJb'];_0x1cb5=function(){return _0x2331af;};return _0x1cb5();}import{dayjs as _0x2bfba6,UserManagerService as _0x48dccf,Inject as _0xc780c5,Injector as _0x394220,Disposable as _0x5da964,CustomRangeType as _0x1bd652,UniverInstanceType as _0x27d52f,DependentOn as _0x5b752f,IConfigService as _0x1aa97b,Plugin as _0x4175ae,merge as _0x29f660}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x1ce1e2}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x5208a,IThreadCommentDataSourceService as _0x51bd43}from'@univerjs/thread-comment';import{bufferTime as _0x3dce6d}from'rxjs';import{HTTPService as _0x2353b4}from'@univerjs/network';const W=_0x5bf03e(0x1f0);var I=(_0x244959=>(_0x244959[_0x244959[_0x5bf03e(0x1bf)]=0x0]=_0x5bf03e(0x1bf),_0x244959[_0x244959[_0x5bf03e(0x1e9)]=0x1]=_0x5bf03e(0x1e9),_0x244959[_0x244959[_0x5bf03e(0x209)]=-0x1]=_0x5bf03e(0x209),_0x244959))(I||{}),v=(_0xb1669d=>(_0xb1669d[_0xb1669d[_0x5bf03e(0x1f2)]=0x0]=_0x5bf03e(0x1f2),_0xb1669d[_0xb1669d[_0x5bf03e(0x1f8)]=0x1]=_0x5bf03e(0x1f8),_0xb1669d[_0xb1669d[_0x5bf03e(0x1fe)]=0x2]=_0x5bf03e(0x1fe),_0xb1669d[_0xb1669d[_0x5bf03e(0x1c9)]=0x3]='Edit',_0xb1669d[_0xb1669d[_0x5bf03e(0x202)]=0x4]=_0x5bf03e(0x202),_0xb1669d[_0xb1669d['Solve']=0x5]=_0x5bf03e(0x1bc),_0xb1669d[_0xb1669d[_0x5bf03e(0x209)]=-0x1]=_0x5bf03e(0x209),_0xb1669d))(v||{});const D=_0x38cee2=>_0x2bfba6(new Date(+_0x38cee2))[_0x5bf03e(0x1dc)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x1cfc19,_0x25af0b)=>{const _0x5e5260=_0x5bf03e,_0x18d93e=_0x1cfc19['get'](_0x48dccf),_0x40ee04=_0x1cfc19[_0x5e5260(0x1ae)](_0x2353b4);_0x25af0b[_0x5e5260(0x203)](_0x36f700=>{const _0xfb8e08=_0x5e5260;_0x18d93e['getUser'](_0x36f700)&&_0x25af0b[_0xfb8e08(0x1e5)](_0x36f700);}),_0x25af0b[_0x5e5260(0x20b)]&&(await _0x40ee04[_0x5e5260(0x1ae)](_0x5e5260(0x1ff),{'params':{'userIDs':[..._0x25af0b]}}))[_0x5e5260(0x1c6)][_0x5e5260(0x1df)]['forEach'](_0x5e43f0=>{const _0x46243d=_0x5e5260;_0x5e43f0&&_0x18d93e[_0x46243d(0x1b5)](_0x5e43f0);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x20bdc8,_0x37d360,_0xde6f02,_0x1616e9)=>{const _0x108a23=_0x5bf03e;for(var _0x1c5c74=_0x1616e9>0x1?void 0x0:_0x1616e9?K(_0x37d360,_0xde6f02):_0x37d360,_0xca633a=_0x20bdc8[_0x108a23(0x20e)]-0x1,_0x25bd6d;_0xca633a>=0x0;_0xca633a--)(_0x25bd6d=_0x20bdc8[_0xca633a])&&(_0x1c5c74=_0x25bd6d(_0x1c5c74)||_0x1c5c74);return _0x1c5c74;},p=(_0x312205,_0x1ee512)=>(_0xaf8f32,_0x129af2)=>_0x1ee512(_0xaf8f32,_0x129af2,_0x312205);let S=class extends _0x5da964{constructor(_0x44a03a,_0x16edca,_0x39bc82,_0x4fa082){const _0x34bce1=_0x5bf03e;super(),this[_0x34bce1(0x1ac)]=_0x44a03a,this[_0x34bce1(0x1f6)]=_0x16edca,this['_userService']=_0x39bc82,this['_injector']=_0x4fa082,this[_0x34bce1(0x1d3)](),this[_0x34bce1(0x1d0)]();}[_0x5bf03e(0x1d0)](){const _0x341f6d=_0x5bf03e;this['disposeWithMe'](this[_0x341f6d(0x1f6)][_0x341f6d(0x206)]['pipe'](_0x3dce6d(0x10))[_0x341f6d(0x1e4)](_0x377ae3=>{const _0x5754f9=_0x341f6d,_0x20e697=new Set();_0x377ae3[_0x5754f9(0x203)](_0x5a7286=>{const _0x506def=_0x5754f9;switch(_0x5a7286['type']){case _0x506def(0x1ab):{const _0x5e3632=_0x5a7286['payload']['personId'];_0x20e697[_0x506def(0x1ab)](_0x5e3632);break;}}}),B(this[_0x5754f9(0x1ce)],_0x20e697);}));}['_init'](){const _0x5a4610=_0x5bf03e;this['disposeWithMe'](this[_0x5a4610(0x1ac)][_0x5a4610(0x206)][_0x5a4610(0x1e4)](async _0xf45214=>{const _0x33bb2e=_0x5a4610;var _0x2b852c,_0x50d7a9,_0x2a5ea1,_0x25fc25;const _0x38fe38=(_0x2b852c=this[_0x33bb2e(0x1f6)][_0x33bb2e(0x204)](_0xf45214[_0x33bb2e(0x1d5)])[_0x33bb2e(0x1de)](_0x393a87=>_0x393a87['threadId']===_0xf45214[_0x33bb2e(0x1c7)]))==null?void 0x0:_0x2b852c[_0x33bb2e(0x1dd)];if(!_0x38fe38)return;const {unitId:_0x5e09ee,subUnitId:_0x31cb78}=_0x38fe38;switch(_0xf45214[_0x33bb2e(0x1d2)]&&this['_userService'][_0x33bb2e(0x1b5)](_0xf45214[_0x33bb2e(0x1d2)]),_0xf45214[_0x33bb2e(0x1b9)]){case v['Add']:break;case v[_0x33bb2e(0x1fe)]:{this[_0x33bb2e(0x1f6)]['addComment'](_0x5e09ee,_0x31cb78,{'unitId':_0x5e09ee,'subUnitId':_0x31cb78,'ref':'','id':_0xf45214[_0x33bb2e(0x20d)],'dT':D(+_0xf45214[_0x33bb2e(0x1eb)]),'threadId':_0xf45214[_0x33bb2e(0x1c7)],'personId':(_0x2a5ea1=(_0x50d7a9=_0xf45214['user'])==null?void 0x0:_0x50d7a9[_0x33bb2e(0x1c0)])!=null?_0x2a5ea1:_0xf45214[_0x33bb2e(0x1ef)],'text':JSON[_0x33bb2e(0x1d1)](_0xf45214[_0x33bb2e(0x1ea)]),'parentId':_0x38fe38['id']});break;}case v[_0x33bb2e(0x202)]:{const _0x73e2cd=this[_0x33bb2e(0x1f6)][_0x33bb2e(0x1d7)](_0x5e09ee,_0x31cb78,_0xf45214['replyId']);_0x73e2cd&&_0x73e2cd[_0x33bb2e(0x1d8)]&&this[_0x33bb2e(0x1f6)][_0x33bb2e(0x1d9)](_0x5e09ee,_0x31cb78,_0xf45214[_0x33bb2e(0x20d)]);break;}case v[_0x33bb2e(0x1c9)]:{this['_threadCommentModel'][_0x33bb2e(0x1c3)](_0x5e09ee,_0x31cb78,{'commentId':_0xf45214[_0x33bb2e(0x20d)],'text':JSON[_0x33bb2e(0x1d1)](_0xf45214[_0x33bb2e(0x1ea)])});break;}case v['Solve']:{const _0x586f1c=(_0x25fc25=this['_threadCommentModel'][_0x33bb2e(0x204)](_0xf45214[_0x33bb2e(0x1d5)])['find'](_0x47b0ba=>_0x47b0ba[_0x33bb2e(0x1c7)]===_0xf45214[_0x33bb2e(0x1c7)]))==null?void 0x0:_0x25fc25[_0x33bb2e(0x1dd)];_0x586f1c&&this[_0x33bb2e(0x1f6)]['resolveComment'](_0x5e09ee,_0x31cb78,_0x586f1c['id'],_0xf45214[_0x33bb2e(0x1da)]===I[_0x33bb2e(0x1e9)]);break;}}}));}};S=V([p(0x0,_0xc780c5(_0x210c37)),p(0x1,_0xc780c5(_0x5208a)),p(0x2,_0xc780c5(_0x48dccf)),p(0x3,_0xc780c5(_0x394220))],S);const z=_0x5bf03e(0x1ba),M={};var k=Object[_0x5bf03e(0x1e8)],Q=(_0x327b80,_0x56553b,_0x4eda03,_0x4db94d)=>{const _0x2bef10=_0x5bf03e;for(var _0x5c7386=_0x4db94d>0x1?void 0x0:_0x4db94d?k(_0x56553b,_0x4eda03):_0x56553b,_0x1f6ea3=_0x327b80[_0x2bef10(0x20e)]-0x1,_0x4c936b;_0x1f6ea3>=0x0;_0x1f6ea3--)(_0x4c936b=_0x327b80[_0x1f6ea3])&&(_0x5c7386=_0x4c936b(_0x5c7386)||_0x5c7386);return _0x5c7386;},_=(_0x388db6,_0x22d905)=>(_0xd30b02,_0x393e89)=>_0x22d905(_0xd30b02,_0x393e89,_0x388db6);function X(_0x29e57f,_0x5ae59b){const _0xf84ef1=_0x5bf03e,_0x592c0f=_0x29e57f[_0xf84ef1(0x20c)][0x0];return{..._0x5ae59b,'id':_0x592c0f[_0xf84ef1(0x20d)],'resolved':_0x29e57f[_0xf84ef1(0x1da)]===0x1,'dT':D(_0x592c0f[_0xf84ef1(0x1eb)]),'personId':_0x592c0f[_0xf84ef1(0x1ef)],'threadId':_0x592c0f['threadId']};}function ee(_0x35f872,_0x29cbcc,_0x45bad0){const _0x353495=_0x5bf03e;var _0x555605,_0x1df5ef;if(((_0x1df5ef=(_0x555605=_0x35f872==null?void 0x0:_0x35f872[_0x353495(0x20c)])==null?void 0x0:_0x555605[_0x353495(0x20e)])!=null?_0x1df5ef:0x0)>0x0){const _0x32af3f=(_0x475295,_0x4b3bc0)=>({'id':_0x475295[_0x353495(0x20d)],'threadId':_0x475295[_0x353495(0x1c7)],'dT':D(_0x475295[_0x353495(0x1eb)]),'personId':_0x475295[_0x353495(0x1ef)],'resolved':_0x35f872[_0x353495(0x1da)]===I[_0x353495(0x1e9)],'unitId':_0x29cbcc,'subUnitId':_0x45bad0,'text':JSON[_0x353495(0x1d1)](_0x475295[_0x353495(0x1ea)]),'parentId':_0x4b3bc0}),_0x1d4391=_0x32af3f(_0x35f872[_0x353495(0x20c)][0x0]);return{..._0x1d4391,'children':_0x35f872[_0x353495(0x20c)][_0x353495(0x1e3)](0x1)['map'](_0x18a175=>_0x32af3f(_0x18a175,_0x1d4391['id']))};}return null;}let f=class{constructor(_0x53f406,_0x1d89ff,_0xeb5d11,_0x1b3914){const _0x5a8022=_0x5bf03e;this['_httpService']=_0x53f406,this[_0x5a8022(0x1ca)]=_0x1d89ff,this[_0x5a8022(0x1fd)]=_0xeb5d11,this[_0x5a8022(0x1ce)]=_0x1b3914;}async[_0x5bf03e(0x1fb)](_0x4b7126){const _0x3324f2=_0x5bf03e;var _0x2c0177,_0x2c9e64;const {parentId:_0xea5e6c,unitId:_0x1ab178,text:_0x55e48e,threadId:_0xcd0d4b}=_0x4b7126,_0x5a6654=(_0x2c9e64=(_0x2c0177=_0x55e48e[_0x3324f2(0x1e2)])==null?void 0x0:_0x2c0177[_0x3324f2(0x1ec)](_0x169a59=>_0x169a59[_0x3324f2(0x1cc)]===_0x1bd652['COMMENT'])[_0x3324f2(0x1b3)](_0x384d59=>_0x384d59[_0x3324f2(0x20a)]))!=null?_0x2c9e64:[],_0x3656ee=JSON[_0x3324f2(0x1fc)](_0x55e48e),_0x555e36=(await this['_sessionService'][_0x3324f2(0x1f5)](_0x1ab178))[_0x3324f2(0x1e0)]();if(_0xea5e6c){const _0x1c3ed8={'memberId':_0x555e36,'unitId':_0x1ab178,'content':_0x3656ee,'mention':_0x5a6654,'threadId':_0xcd0d4b},_0x57dbb7=(await this['_httpService'][_0x3324f2(0x1c2)]('/universer-api/comment/unit/'+_0x1ab178+'/reply',{'body':_0x1c3ed8}))[_0x3324f2(0x1c6)][_0x3324f2(0x1cd)];return{..._0x4b7126,'id':_0x57dbb7[_0x3324f2(0x20d)],'dT':_0x2bfba6(+_0x57dbb7[_0x3324f2(0x1eb)])[_0x3324f2(0x1dc)](_0x3324f2(0x1ad)),'personId':_0x57dbb7[_0x3324f2(0x1ef)]};}else{const _0x1f4c66={'memberId':_0x555e36,'unitId':_0x1ab178,'content':_0x3656ee,'mention':_0x5a6654},_0x51d893=await this['_httpService'][_0x3324f2(0x1c2)]('/universer-api/comment/unit/'+_0x1ab178+_0x3324f2(0x1f9),{'body':_0x1f4c66});return X(_0x51d893['body'][_0x3324f2(0x1b6)],_0x4b7126);}}async[_0x5bf03e(0x1c3)](_0xa79ba){const _0x194343=_0x5bf03e;var _0x4f9d1a,_0x2c822c;const {text:_0x30482c,unitId:_0x491b2f}=_0xa79ba,_0x41775d=(_0x2c822c=(_0x4f9d1a=_0x30482c['customRanges'])==null?void 0x0:_0x4f9d1a['filter'](_0xd7bd87=>_0xd7bd87[_0x194343(0x1cc)]===_0x1bd652[_0x194343(0x208)])[_0x194343(0x1b3)](_0x45f868=>_0x45f868[_0x194343(0x20a)]))!=null?_0x2c822c:[],_0x39bcb6=JSON[_0x194343(0x1fc)](_0x30482c),_0x107c06=_0xa79ba[_0x194343(0x1c7)],_0x48c58b=_0xa79ba['id'],_0x14bea9={'memberId':(await this[_0x194343(0x1fd)][_0x194343(0x1f5)](_0x491b2f))[_0x194343(0x1e0)](),'unitId':_0x491b2f,'threadId':_0x107c06,'mention':_0x41775d,'content':_0x39bcb6,'replyId':_0x48c58b},_0x2f1b2e=await this['_httpService'][_0x194343(0x1c2)]('/universer-api/comment/unit/'+_0x491b2f+_0x194343(0x1db),{'body':_0x14bea9});return!_0x2f1b2e['body'][_0x194343(0x1ee)]||_0x2f1b2e['body'][_0x194343(0x1ee)][_0x194343(0x1ed)]===0x1;}async[_0x5bf03e(0x1e6)](_0x19380d){const _0x4c2e14=_0x5bf03e,{unitId:_0x226eb3}=_0x19380d,_0x220999=_0x19380d[_0x4c2e14(0x1c7)],_0x869398={'memberId':this['_userService'][_0x4c2e14(0x1f4)]()[_0x4c2e14(0x1c0)],'unitId':_0x226eb3,'threadId':_0x220999,'solved':_0x19380d[_0x4c2e14(0x1aa)]?I[_0x4c2e14(0x1e9)]:I[_0x4c2e14(0x1bf)]},_0x3f3afb=await this[_0x4c2e14(0x1b0)][_0x4c2e14(0x1c2)](_0x4c2e14(0x1d6)+_0x226eb3+'/solved',{'body':_0x869398});return!_0x3f3afb[_0x4c2e14(0x1c6)][_0x4c2e14(0x1ee)]||_0x3f3afb[_0x4c2e14(0x1c6)]['error']['code']===0x1;}async['deleteComment'](_0x1d1fed,_0x5b24c0,_0x458bf2,_0x37a8d6){const _0x5e448e=_0x5bf03e,_0x4a0dd0={'memberId':(await this[_0x5e448e(0x1fd)]['requireSession'](_0x1d1fed))['getMemberID'](),'threadId':_0x458bf2,'replyId':_0x37a8d6,'unitId':_0x1d1fed},_0x48b2c7=await this[_0x5e448e(0x1b0)][_0x5e448e(0x1c2)](_0x5e448e(0x1d6)+_0x1d1fed+_0x5e448e(0x1f1),{'body':_0x4a0dd0});return!_0x48b2c7['body'][_0x5e448e(0x1ee)]||_0x48b2c7[_0x5e448e(0x1c6)]['error'][_0x5e448e(0x1ed)]===0x1;}async['listComments'](_0x283833,_0x229f4a,_0x449010){const _0x3e6ed4=_0x5bf03e,_0x469d54={'unitId':_0x283833,'threadId':_0x449010},_0x3b84a4=await this[_0x3e6ed4(0x1b0)][_0x3e6ed4(0x1c2)](_0x3e6ed4(0x1d6)+_0x283833+_0x3e6ed4(0x205),{'body':_0x469d54}),_0x4b2575=_0x449010[_0x3e6ed4(0x1b3)](_0x3b38f6=>ee(_0x3b84a4[_0x3e6ed4(0x1c6)][_0x3e6ed4(0x1b8)][_0x3b38f6],_0x283833,_0x229f4a))[_0x3e6ed4(0x1ec)](Boolean);return Object[_0x3e6ed4(0x1b4)](_0x3b84a4[_0x3e6ed4(0x1c6)][_0x3e6ed4(0x1df)])[_0x3e6ed4(0x203)](_0x4dd442=>{const _0x28239b=_0x3e6ed4;this['_userService'][_0x28239b(0x1b5)](_0x4dd442);}),_0x4b2575;}[_0x5bf03e(0x1fa)](_0x4faf28){const _0x4e2ed0=_0x5bf03e;return{'id':_0x4faf28['id'],'threadId':_0x4faf28['threadId'],'ref':_0x4faf28[_0x4e2ed0(0x1c8)]};}};f=Q([_(0x0,_0xc780c5(_0x2353b4)),_(0x1,_0xc780c5(_0x48dccf)),_(0x2,_0xc780c5(_0x220e28)),_(0x3,_0xc780c5(_0x394220))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x2fdda9,_0xfef264,_0x9014a5,_0x33ac1e)=>{const _0x35d59d=_0x5bf03e;for(var _0x78004f=_0x33ac1e>0x1?void 0x0:_0x33ac1e?re(_0xfef264,_0x9014a5):_0xfef264,_0x3ceeaf=_0x2fdda9[_0x35d59d(0x20e)]-0x1,_0x4416f8;_0x3ceeaf>=0x0;_0x3ceeaf--)(_0x4416f8=_0x2fdda9[_0x3ceeaf])&&(_0x78004f=_0x4416f8(_0x78004f)||_0x78004f);return _0x78004f;},N=(_0x26ff3f,_0x24cc19)=>(_0xbb7509,_0x34b1af)=>_0x24cc19(_0xbb7509,_0x34b1af,_0x26ff3f);let g=class extends _0x5da964{constructor(_0x2f98bf,_0x5d88e1){const _0x4520be=_0x5bf03e;super(),this[_0x4520be(0x1be)]=_0x2f98bf,this[_0x4520be(0x1af)]=_0x5d88e1,this['_initDataSource']();}[_0x5bf03e(0x1d4)](){const _0xe3c2a1=_0x5bf03e;this[_0xe3c2a1(0x1be)][_0xe3c2a1(0x1bd)]=this[_0xe3c2a1(0x1af)],this['_threadCommentDataSourceService'][_0xe3c2a1(0x1e1)]=!0x1;}};g=te([N(0x0,_0x51bd43),N(0x1,_0xc780c5(f))],g);var se=Object[_0x5bf03e(0x207)],oe=Object['getOwnPropertyDescriptor'],ne=(_0xeed73c,_0x2f4b7e,_0x577f20)=>_0x2f4b7e in _0xeed73c?se(_0xeed73c,_0x2f4b7e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x577f20}):_0xeed73c[_0x2f4b7e]=_0x577f20,ie=(_0x56191b,_0x3fcbe9,_0x212778,_0x54c9d2)=>{const _0x580589=_0x5bf03e;for(var _0x20f033=_0x54c9d2>0x1?void 0x0:_0x54c9d2?oe(_0x3fcbe9,_0x212778):_0x3fcbe9,_0x44d354=_0x56191b[_0x580589(0x20e)]-0x1,_0x1a87bd;_0x44d354>=0x0;_0x44d354--)(_0x1a87bd=_0x56191b[_0x44d354])&&(_0x20f033=_0x1a87bd(_0x20f033)||_0x20f033);return _0x20f033;},w=(_0x47190c,_0x3b3699)=>(_0x37fba2,_0x5ef8e4)=>_0x3b3699(_0x37fba2,_0x5ef8e4,_0x47190c),$=(_0x17ba0b,_0x3c483f,_0x13ed47)=>ne(_0x17ba0b,typeof _0x3c483f!=_0x5bf03e(0x1b2)?_0x3c483f+'':_0x3c483f,_0x13ed47);let b=class extends _0x4175ae{constructor(_0x13bf0e=M,_0x341dc6,_0x22d683){const _0x4a18fa=_0x5bf03e;super(),this['_config']=_0x13bf0e,this[_0x4a18fa(0x1ce)]=_0x341dc6,this[_0x4a18fa(0x1c1)]=_0x22d683;const {..._0x5516d0}=_0x29f660({},M,this[_0x4a18fa(0x1f7)]);this[_0x4a18fa(0x1c1)]['setConfig'](z,_0x5516d0);}[_0x5bf03e(0x1b7)](){const _0x35f776=_0x5bf03e;[[f],[g],[S]][_0x35f776(0x203)](_0x1b919b=>{const _0x2d9448=_0x35f776;this[_0x2d9448(0x1ce)][_0x2d9448(0x1ab)](_0x1b919b);});}[_0x5bf03e(0x1bb)](){const _0x2396ab=_0x5bf03e;this['_injector'][_0x2396ab(0x1ae)](g),this[_0x2396ab(0x1ce)][_0x2396ab(0x1ae)](S);}};$(b,_0x5bf03e(0x1cf),W),$(b,'type',_0x27d52f[_0x5bf03e(0x1b1)]),b=ie([_0x5b752f(_0x1ce1e2,_0x1095dd,_0xf4a461),w(0x1,_0xc780c5(_0x394220)),w(0x2,_0x1aa97b)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- (function(_0x19d002,_0x552841){const _0x3fa2ab=_0xffa4,_0x2bdd03=_0x19d002();while(!![]){try{const _0x3be997=parseInt(_0x3fa2ab(0x1b3))/0x1+-parseInt(_0x3fa2ab(0x1d9))/0x2*(parseInt(_0x3fa2ab(0x1a2))/0x3)+-parseInt(_0x3fa2ab(0x1e0))/0x4*(parseInt(_0x3fa2ab(0x1a7))/0x5)+-parseInt(_0x3fa2ab(0x197))/0x6+-parseInt(_0x3fa2ab(0x1c3))/0x7*(parseInt(_0x3fa2ab(0x1da))/0x8)+parseInt(_0x3fa2ab(0x1d8))/0x9+parseInt(_0x3fa2ab(0x169))/0xa*(parseInt(_0x3fa2ab(0x1a0))/0xb);if(_0x3be997===_0x552841)break;else _0x2bdd03['push'](_0x2bdd03['shift']());}catch(_0xc36fa6){_0x2bdd03['push'](_0x2bdd03['shift']());}}}(_0x800a,0xc6850),function(_0x26dfdc,_0x2e87e2){const _0x43493e=_0xffa4;typeof exports=='object'&&typeof module<'u'?_0x2e87e2(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[_0x43493e(0x165)]?define(['exports',_0x43493e(0x1b4),'@univerjs-pro/license',_0x43493e(0x195),_0x43493e(0x161),_0x43493e(0x1a8),'rxjs',_0x43493e(0x1d5)],_0x2e87e2):(_0x26dfdc=typeof globalThis<'u'?globalThis:_0x26dfdc||self,_0x2e87e2(_0x26dfdc[_0x43493e(0x1b6)]={},_0x26dfdc[_0x43493e(0x190)],_0x26dfdc[_0x43493e(0x16b)],_0x26dfdc[_0x43493e(0x1bc)],_0x26dfdc[_0x43493e(0x1c8)],_0x26dfdc[_0x43493e(0x15d)],_0x26dfdc[_0x43493e(0x19f)],_0x26dfdc[_0x43493e(0x19e)]));}(this,function(_0x234d07,_0x3328cd,_0x13cd89,_0x54b890,_0x4dc3e5,_0x12d312,_0x42a5e8,_0x548bea){'use strict';const _0x4632ab=_0xffa4;const _0x5d64bb='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x148b4a=(_0x459648=>(_0x459648[_0x459648[_0x4632ab(0x1b2)]=0x0]=_0x4632ab(0x1b2),_0x459648[_0x459648[_0x4632ab(0x159)]=0x1]=_0x4632ab(0x159),_0x459648[_0x459648['UNRECOGNIZED']=-0x1]=_0x4632ab(0x1cb),_0x459648))(_0x148b4a||{}),_0x4d83a5=(_0x4527b3=>(_0x4527b3[_0x4527b3[_0x4632ab(0x17d)]=0x0]='Unknown',_0x4527b3[_0x4527b3[_0x4632ab(0x1ca)]=0x1]=_0x4632ab(0x1ca),_0x4527b3[_0x4527b3[_0x4632ab(0x1a6)]=0x2]=_0x4632ab(0x1a6),_0x4527b3[_0x4527b3[_0x4632ab(0x194)]=0x3]=_0x4632ab(0x194),_0x4527b3[_0x4527b3[_0x4632ab(0x163)]=0x4]=_0x4632ab(0x163),_0x4527b3[_0x4527b3['Solve']=0x5]=_0x4632ab(0x18b),_0x4527b3[_0x4527b3[_0x4632ab(0x1cb)]=-0x1]=_0x4632ab(0x1cb),_0x4527b3))(_0x4d83a5||{});const _0xa0b0bf=_0x5ec99d=>_0x54b890[_0x4632ab(0x19d)](new Date(+_0x5ec99d))[_0x4632ab(0x1a4)]('YYYY/MM/DD\x20HH:mm'),_0x2ad00d=async(_0x4d8e6d,_0x32c854)=>{const _0x347924=_0x4632ab,_0x2e7309=_0x4d8e6d[_0x347924(0x16e)](_0x54b890['UserManagerService']),_0xb7ff89=_0x4d8e6d['get'](_0x548bea[_0x347924(0x15f)]);_0x32c854[_0x347924(0x1a5)](_0x3c4263=>{const _0x127db1=_0x347924;_0x2e7309[_0x127db1(0x1d1)](_0x3c4263)&&_0x32c854[_0x127db1(0x184)](_0x3c4263);}),_0x32c854[_0x347924(0x1a3)]&&(await _0xb7ff89[_0x347924(0x16e)](_0x347924(0x15b),{'params':{'userIDs':[..._0x32c854]}}))[_0x347924(0x16f)][_0x347924(0x1c7)][_0x347924(0x1a5)](_0xc877f2=>{const _0x514038=_0x347924;_0xc877f2&&_0x2e7309[_0x514038(0x15e)](_0xc877f2);});};var _0x331f38=Object['getOwnPropertyDescriptor'],_0x1caeb4=(_0x4e0cd6,_0x512c72,_0x3f4e91,_0x3bea53)=>{const _0x33e2dc=_0x4632ab;for(var _0x78d5d=_0x3bea53>0x1?void 0x0:_0x3bea53?_0x331f38(_0x512c72,_0x3f4e91):_0x512c72,_0x192f08=_0x4e0cd6[_0x33e2dc(0x1ac)]-0x1,_0xfaa109;_0x192f08>=0x0;_0x192f08--)(_0xfaa109=_0x4e0cd6[_0x192f08])&&(_0x78d5d=_0xfaa109(_0x78d5d)||_0x78d5d);return _0x78d5d;},_0x171e33=(_0x51b308,_0x256aa0)=>(_0x333acc,_0x3274a1)=>_0x256aa0(_0x333acc,_0x3274a1,_0x51b308);let _0x2d267e=class extends _0x54b890[_0x4632ab(0x186)]{constructor(_0x1d7504,_0x9271da,_0x213ba9,_0x5d3a85){const _0x43227b=_0x4632ab;super(),this[_0x43227b(0x182)]=_0x1d7504,this[_0x43227b(0x185)]=_0x9271da,this[_0x43227b(0x1b1)]=_0x213ba9,this['_injector']=_0x5d3a85,this[_0x43227b(0x1dd)](),this['_initUserSync']();}[_0x4632ab(0x180)](){const _0x545379=_0x4632ab;this[_0x545379(0x1ad)](this[_0x545379(0x185)][_0x545379(0x1d2)][_0x545379(0x1b8)](_0x42a5e8[_0x545379(0x1a9)](0x10))[_0x545379(0x189)](_0x4eac68=>{const _0x557f90=_0x545379,_0x1c4d27=new Set();_0x4eac68['forEach'](_0x57383e=>{const _0x2f385b=_0xffa4;switch(_0x57383e[_0x2f385b(0x1c2)]){case _0x2f385b(0x173):{const _0xebb964=_0x57383e[_0x2f385b(0x167)][_0x2f385b(0x191)];_0x1c4d27[_0x2f385b(0x173)](_0xebb964);break;}}}),_0x2ad00d(this[_0x557f90(0x157)],_0x1c4d27);}));}[_0x4632ab(0x1dd)](){const _0x55d3ae=_0x4632ab;this[_0x55d3ae(0x1ad)](this[_0x55d3ae(0x182)][_0x55d3ae(0x1d2)]['subscribe'](async _0x65ffc3=>{const _0x20f088=_0x55d3ae;var _0x59ee04,_0x1eb77f,_0x5d0a02,_0x341eb4;const _0x23ebc7=(_0x59ee04=this[_0x20f088(0x185)][_0x20f088(0x172)](_0x65ffc3[_0x20f088(0x1ab)])[_0x20f088(0x17a)](_0x11fde8=>_0x11fde8[_0x20f088(0x1de)]===_0x65ffc3[_0x20f088(0x1de)]))==null?void 0x0:_0x59ee04[_0x20f088(0x168)];if(!_0x23ebc7)return;const {unitId:_0x25c9be,subUnitId:_0x245b8d}=_0x23ebc7;switch(_0x65ffc3[_0x20f088(0x16a)]&&this[_0x20f088(0x1b1)][_0x20f088(0x15e)](_0x65ffc3[_0x20f088(0x16a)]),_0x65ffc3[_0x20f088(0x1c2)]){case _0x4d83a5['Add']:break;case _0x4d83a5[_0x20f088(0x1a6)]:{this[_0x20f088(0x185)]['addComment'](_0x25c9be,_0x245b8d,{'unitId':_0x25c9be,'subUnitId':_0x245b8d,'ref':'','id':_0x65ffc3[_0x20f088(0x176)],'dT':_0xa0b0bf(+_0x65ffc3[_0x20f088(0x174)]),'threadId':_0x65ffc3['threadId'],'personId':(_0x5d0a02=(_0x1eb77f=_0x65ffc3['user'])==null?void 0x0:_0x1eb77f[_0x20f088(0x1dc)])!=null?_0x5d0a02:_0x65ffc3[_0x20f088(0x18e)],'text':JSON[_0x20f088(0x18d)](_0x65ffc3[_0x20f088(0x1a1)]),'parentId':_0x23ebc7['id']});break;}case _0x4d83a5[_0x20f088(0x163)]:{const _0x23dfd4=this[_0x20f088(0x185)][_0x20f088(0x1c6)](_0x25c9be,_0x245b8d,_0x65ffc3[_0x20f088(0x176)]);_0x23dfd4&&_0x23dfd4[_0x20f088(0x171)]&&this[_0x20f088(0x185)][_0x20f088(0x17f)](_0x25c9be,_0x245b8d,_0x65ffc3[_0x20f088(0x176)]);break;}case _0x4d83a5[_0x20f088(0x194)]:{this[_0x20f088(0x185)][_0x20f088(0x1d7)](_0x25c9be,_0x245b8d,{'commentId':_0x65ffc3[_0x20f088(0x176)],'text':JSON[_0x20f088(0x18d)](_0x65ffc3[_0x20f088(0x1a1)])});break;}case _0x4d83a5[_0x20f088(0x18b)]:{const _0x1beafe=(_0x341eb4=this[_0x20f088(0x185)][_0x20f088(0x172)](_0x65ffc3[_0x20f088(0x1ab)])[_0x20f088(0x17a)](_0x4587a8=>_0x4587a8['threadId']===_0x65ffc3[_0x20f088(0x1de)]))==null?void 0x0:_0x341eb4[_0x20f088(0x168)];_0x1beafe&&this[_0x20f088(0x185)][_0x20f088(0x1c9)](_0x25c9be,_0x245b8d,_0x1beafe['id'],_0x65ffc3[_0x20f088(0x17b)]===_0x148b4a[_0x20f088(0x159)]);break;}}}));}};_0x2d267e=_0x1caeb4([_0x171e33(0x0,_0x54b890[_0x4632ab(0x158)](_0x3328cd[_0x4632ab(0x181)])),_0x171e33(0x1,_0x54b890[_0x4632ab(0x158)](_0x12d312[_0x4632ab(0x1d0)])),_0x171e33(0x2,_0x54b890[_0x4632ab(0x158)](_0x54b890[_0x4632ab(0x198)])),_0x171e33(0x3,_0x54b890[_0x4632ab(0x158)](_0x54b890[_0x4632ab(0x1be)]))],_0x2d267e);const _0x5ad00c=_0x4632ab(0x1aa),_0xd1723f={};var _0x39afa4=Object[_0x4632ab(0x19c)],_0x5dcbd7=(_0x496287,_0x381fa7,_0x12096e,_0x179eb9)=>{const _0x129253=_0x4632ab;for(var _0x298a9c=_0x179eb9>0x1?void 0x0:_0x179eb9?_0x39afa4(_0x381fa7,_0x12096e):_0x381fa7,_0x35f666=_0x496287[_0x129253(0x1ac)]-0x1,_0x5a4d9f;_0x35f666>=0x0;_0x35f666--)(_0x5a4d9f=_0x496287[_0x35f666])&&(_0x298a9c=_0x5a4d9f(_0x298a9c)||_0x298a9c);return _0x298a9c;},_0x5270f6=(_0x158b33,_0x5807ce)=>(_0x39919f,_0x59069d)=>_0x5807ce(_0x39919f,_0x59069d,_0x158b33);function _0x40beb2(_0xf6eba7,_0x4114d9){const _0x357d7f=_0x4632ab,_0x54ea23=_0xf6eba7[_0x357d7f(0x18f)][0x0];return{..._0x4114d9,'id':_0x54ea23[_0x357d7f(0x176)],'resolved':_0xf6eba7[_0x357d7f(0x17b)]===0x1,'dT':_0xa0b0bf(_0x54ea23['createTimestamp']),'personId':_0x54ea23[_0x357d7f(0x18e)],'threadId':_0x54ea23[_0x357d7f(0x1de)]};}function _0x19dca9(_0x26378c,_0x2adc02,_0xa66525){const _0x28527f=_0x4632ab;var _0x2837dd,_0x3aa33f;if(((_0x3aa33f=(_0x2837dd=_0x26378c==null?void 0x0:_0x26378c[_0x28527f(0x18f)])==null?void 0x0:_0x2837dd[_0x28527f(0x1ac)])!=null?_0x3aa33f:0x0)>0x0){const _0x23de83=(_0x21fcf3,_0x5b2234)=>({'id':_0x21fcf3[_0x28527f(0x176)],'threadId':_0x21fcf3['threadId'],'dT':_0xa0b0bf(_0x21fcf3[_0x28527f(0x174)]),'personId':_0x21fcf3[_0x28527f(0x18e)],'resolved':_0x26378c['solved']===_0x148b4a[_0x28527f(0x159)],'unitId':_0x2adc02,'subUnitId':_0xa66525,'text':JSON['parse'](_0x21fcf3[_0x28527f(0x1a1)]),'parentId':_0x5b2234}),_0x42eab2=_0x23de83(_0x26378c[_0x28527f(0x18f)][0x0]);return{..._0x42eab2,'children':_0x26378c[_0x28527f(0x18f)]['slice'](0x1)[_0x28527f(0x16d)](_0xd855ab=>_0x23de83(_0xd855ab,_0x42eab2['id']))};}return null;}let _0x1b3a48=class{constructor(_0x3ce4fc,_0x67c1ef,_0x2cdaef,_0x31a61e){const _0x146da4=_0x4632ab;this[_0x146da4(0x179)]=_0x3ce4fc,this[_0x146da4(0x1b1)]=_0x67c1ef,this[_0x146da4(0x17c)]=_0x2cdaef,this[_0x146da4(0x157)]=_0x31a61e;}async[_0x4632ab(0x188)](_0x5f4c70){const _0x229413=_0x4632ab;var _0x512059,_0x5f0941;const {parentId:_0x48bdab,unitId:_0xee1cea,text:_0x19c05a,threadId:_0xcc7b86}=_0x5f4c70,_0x568da3=(_0x5f0941=(_0x512059=_0x19c05a['customRanges'])==null?void 0x0:_0x512059['filter'](_0x51e056=>_0x51e056[_0x229413(0x1b7)]===_0x54b890['CustomRangeType'][_0x229413(0x175)])[_0x229413(0x16d)](_0x205517=>_0x205517[_0x229413(0x170)]))!=null?_0x5f0941:[],_0x2991e3=JSON[_0x229413(0x1ce)](_0x19c05a),_0x382e47=(await this['_sessionService'][_0x229413(0x1ae)](_0xee1cea))[_0x229413(0x1c1)]();if(_0x48bdab){const _0x15a4ef={'memberId':_0x382e47,'unitId':_0xee1cea,'content':_0x2991e3,'mention':_0x568da3,'threadId':_0xcc7b86},_0x3ea18a=(await this[_0x229413(0x179)][_0x229413(0x19b)]('/universer-api/comment/unit/'+_0xee1cea+_0x229413(0x1cf),{'body':_0x15a4ef}))[_0x229413(0x16f)][_0x229413(0x1db)];return{..._0x5f4c70,'id':_0x3ea18a[_0x229413(0x176)],'dT':_0x54b890[_0x229413(0x19d)](+_0x3ea18a[_0x229413(0x174)])[_0x229413(0x1a4)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x3ea18a[_0x229413(0x18e)]};}else{const _0x1c50d4={'memberId':_0x382e47,'unitId':_0xee1cea,'content':_0x2991e3,'mention':_0x568da3},_0x325021=await this[_0x229413(0x179)][_0x229413(0x19b)](_0x229413(0x1b5)+_0xee1cea+_0x229413(0x1b9),{'body':_0x1c50d4});return _0x40beb2(_0x325021[_0x229413(0x16f)][_0x229413(0x16c)],_0x5f4c70);}}async[_0x4632ab(0x1d7)](_0x23fd1a){const _0x93ef5f=_0x4632ab;var _0x50a7ff,_0x3e509d;const {text:_0x2ef6ea,unitId:_0x105929}=_0x23fd1a,_0x413ef4=(_0x3e509d=(_0x50a7ff=_0x2ef6ea['customRanges'])==null?void 0x0:_0x50a7ff[_0x93ef5f(0x15c)](_0x5b06b1=>_0x5b06b1['rangeType']===_0x54b890[_0x93ef5f(0x1cd)]['COMMENT'])[_0x93ef5f(0x16d)](_0x342e92=>_0x342e92[_0x93ef5f(0x170)]))!=null?_0x3e509d:[],_0x5ebbe2=JSON[_0x93ef5f(0x1ce)](_0x2ef6ea),_0x3563d5=_0x23fd1a['threadId'],_0x18125b=_0x23fd1a['id'],_0x36fe2a={'memberId':(await this[_0x93ef5f(0x17c)]['requireSession'](_0x105929))['getMemberID'](),'unitId':_0x105929,'threadId':_0x3563d5,'mention':_0x413ef4,'content':_0x5ebbe2,'replyId':_0x18125b},_0x16a34a=await this[_0x93ef5f(0x179)][_0x93ef5f(0x19b)]('/universer-api/comment/unit/'+_0x105929+_0x93ef5f(0x15a),{'body':_0x36fe2a});return!_0x16a34a['body']['error']||_0x16a34a[_0x93ef5f(0x16f)]['error']['code']===0x1;}async['resolveComment'](_0x581741){const _0x3d69c7=_0x4632ab,{unitId:_0x50ddf5}=_0x581741,_0x46e70c=_0x581741[_0x3d69c7(0x1de)],_0x137d63={'memberId':this[_0x3d69c7(0x1b1)]['getCurrentUser']()[_0x3d69c7(0x1dc)],'unitId':_0x50ddf5,'threadId':_0x46e70c,'solved':_0x581741[_0x3d69c7(0x187)]?_0x148b4a['Solved']:_0x148b4a[_0x3d69c7(0x1b2)]},_0x42a8ed=await this['_httpService'][_0x3d69c7(0x19b)](_0x3d69c7(0x1b5)+_0x50ddf5+_0x3d69c7(0x1ba),{'body':_0x137d63});return!_0x42a8ed[_0x3d69c7(0x16f)][_0x3d69c7(0x18c)]||_0x42a8ed[_0x3d69c7(0x16f)]['error'][_0x3d69c7(0x160)]===0x1;}async[_0x4632ab(0x17f)](_0x324a2c,_0xbe77a9,_0x4f4955,_0x241466){const _0x568465=_0x4632ab,_0x32d606={'memberId':(await this[_0x568465(0x17c)][_0x568465(0x1ae)](_0x324a2c))['getMemberID'](),'threadId':_0x4f4955,'replyId':_0x241466,'unitId':_0x324a2c},_0x3ffbf0=await this['_httpService'][_0x568465(0x19b)](_0x568465(0x1b5)+_0x324a2c+'/delete',{'body':_0x32d606});return!_0x3ffbf0[_0x568465(0x16f)]['error']||_0x3ffbf0['body'][_0x568465(0x18c)][_0x568465(0x160)]===0x1;}async['listComments'](_0x372569,_0x20318b,_0x22e3f3){const _0x1d5291=_0x4632ab,_0x33a12b={'unitId':_0x372569,'threadId':_0x22e3f3},_0x1e4b64=await this[_0x1d5291(0x179)][_0x1d5291(0x19b)]('/universer-api/comment/unit/'+_0x372569+_0x1d5291(0x183),{'body':_0x33a12b}),_0x4e5478=_0x22e3f3[_0x1d5291(0x16d)](_0xb89f13=>_0x19dca9(_0x1e4b64[_0x1d5291(0x16f)][_0x1d5291(0x177)][_0xb89f13],_0x372569,_0x20318b))[_0x1d5291(0x15c)](Boolean);return Object[_0x1d5291(0x1c0)](_0x1e4b64[_0x1d5291(0x16f)][_0x1d5291(0x1c7)])[_0x1d5291(0x1a5)](_0x5c1a79=>{const _0x1b1220=_0x1d5291;this[_0x1b1220(0x1b1)][_0x1b1220(0x15e)](_0x5c1a79);}),_0x4e5478;}[_0x4632ab(0x19a)](_0x538649){const _0x234965=_0x4632ab;return{'id':_0x538649['id'],'threadId':_0x538649['threadId'],'ref':_0x538649[_0x234965(0x1b0)]};}};_0x1b3a48=_0x5dcbd7([_0x5270f6(0x0,_0x54b890['Inject'](_0x548bea[_0x4632ab(0x15f)])),_0x5270f6(0x1,_0x54b890[_0x4632ab(0x158)](_0x54b890[_0x4632ab(0x198)])),_0x5270f6(0x2,_0x54b890[_0x4632ab(0x158)](_0x3328cd[_0x4632ab(0x1bb)])),_0x5270f6(0x3,_0x54b890[_0x4632ab(0x158)](_0x54b890['Injector']))],_0x1b3a48);var _0x1d90a2=Object[_0x4632ab(0x19c)],_0x5a69e1=(_0x3c912c,_0x41adc4,_0x1e5d6e,_0x22044e)=>{const _0x5bf16e=_0x4632ab;for(var _0x46b794=_0x22044e>0x1?void 0x0:_0x22044e?_0x1d90a2(_0x41adc4,_0x1e5d6e):_0x41adc4,_0x13fc0f=_0x3c912c[_0x5bf16e(0x1ac)]-0x1,_0x5585dd;_0x13fc0f>=0x0;_0x13fc0f--)(_0x5585dd=_0x3c912c[_0x13fc0f])&&(_0x46b794=_0x5585dd(_0x46b794)||_0x46b794);return _0x46b794;},_0x185cc3=(_0x18ddc1,_0x410b8c)=>(_0x26345f,_0xb14a7b)=>_0x410b8c(_0x26345f,_0xb14a7b,_0x18ddc1);let _0x3dac20=class extends _0x54b890[_0x4632ab(0x186)]{constructor(_0x5c24b0,_0x3cbeb1){const _0x39d1e9=_0x4632ab;super(),this[_0x39d1e9(0x192)]=_0x5c24b0,this[_0x39d1e9(0x1c5)]=_0x3cbeb1,this[_0x39d1e9(0x1c4)]();}[_0x4632ab(0x1c4)](){const _0x4743f2=_0x4632ab;this['_threadCommentDataSourceService']['dataSource']=this['_threadCommentDataSource'],this[_0x4743f2(0x192)][_0x4743f2(0x178)]=!0x1;}};_0x3dac20=_0x5a69e1([_0x185cc3(0x0,_0x12d312[_0x4632ab(0x162)]),_0x185cc3(0x1,_0x54b890[_0x4632ab(0x158)](_0x1b3a48))],_0x3dac20);var _0x332a30=Object['defineProperty'],_0x79a404=Object[_0x4632ab(0x19c)],_0x488182=(_0x29fb81,_0x54e2c3,_0x49b75a)=>_0x54e2c3 in _0x29fb81?_0x332a30(_0x29fb81,_0x54e2c3,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x49b75a}):_0x29fb81[_0x54e2c3]=_0x49b75a,_0x33fb6f=(_0x27d19d,_0x2381ac,_0x24f38f,_0x141711)=>{for(var _0x24af7d=_0x141711>0x1?void 0x0:_0x141711?_0x79a404(_0x2381ac,_0x24f38f):_0x2381ac,_0x45864b=_0x27d19d['length']-0x1,_0x40e6bd;_0x45864b>=0x0;_0x45864b--)(_0x40e6bd=_0x27d19d[_0x45864b])&&(_0x24af7d=_0x40e6bd(_0x24af7d)||_0x24af7d);return _0x24af7d;},_0x492fed=(_0x4087ae,_0x4adc96)=>(_0x4362b9,_0x1d80cd)=>_0x4adc96(_0x4362b9,_0x1d80cd,_0x4087ae),_0x5bd2eb=(_0x1d6bb7,_0x148ccf,_0x32a070)=>_0x488182(_0x1d6bb7,typeof _0x148ccf!='symbol'?_0x148ccf+'':_0x148ccf,_0x32a070);_0x234d07[_0x4632ab(0x1bf)]=class extends _0x54b890[_0x4632ab(0x1d6)]{constructor(_0x186023=_0xd1723f,_0x1e3254,_0x2f0cef){const _0x4839a5=_0x4632ab;super(),this[_0x4839a5(0x193)]=_0x186023,this[_0x4839a5(0x157)]=_0x1e3254,this[_0x4839a5(0x1cc)]=_0x2f0cef;const {..._0xb5e471}=_0x54b890[_0x4839a5(0x199)]({},_0xd1723f,this[_0x4839a5(0x193)]);this[_0x4839a5(0x1cc)][_0x4839a5(0x1df)](_0x5ad00c,_0xb5e471);}[_0x4632ab(0x1bd)](){[[_0x1b3a48],[_0x3dac20],[_0x2d267e]]['forEach'](_0x1f5464=>{const _0x298082=_0xffa4;this['_injector'][_0x298082(0x173)](_0x1f5464);});}['onReady'](){const _0x3731c0=_0x4632ab;this['_injector'][_0x3731c0(0x16e)](_0x3dac20),this[_0x3731c0(0x157)][_0x3731c0(0x16e)](_0x2d267e);}},_0x5bd2eb(_0x234d07[_0x4632ab(0x1bf)],_0x4632ab(0x196),_0x5d64bb),_0x5bd2eb(_0x234d07['UniverThreadCommentDataSourcePlugin'],'type',_0x54b890[_0x4632ab(0x1d4)][_0x4632ab(0x18a)]),_0x234d07[_0x4632ab(0x1bf)]=_0x33fb6f([_0x54b890[_0x4632ab(0x1af)](_0x4dc3e5[_0x4632ab(0x166)],_0x3328cd['UniverCollaborationClientPlugin'],_0x13cd89[_0x4632ab(0x1d3)]),_0x492fed(0x1,_0x54b890[_0x4632ab(0x158)](_0x54b890[_0x4632ab(0x1be)])),_0x492fed(0x2,_0x54b890['IConfigService'])],_0x234d07['UniverThreadCommentDataSourcePlugin']),Object[_0x4632ab(0x1e1)](_0x234d07,Symbol[_0x4632ab(0x17e)],{'value':_0x4632ab(0x164)});}));function _0xffa4(_0x465abd,_0x1c2fd4){const _0x800aa5=_0x800a();return _0xffa4=function(_0xffa47f,_0x5dc7ab){_0xffa47f=_0xffa47f-0x157;let _0x5a4517=_0x800aa5[_0xffa47f];return _0x5a4517;},_0xffa4(_0x465abd,_0x1c2fd4);}function _0x800a(){const _0x598507=['saveCommentToSnapshot','post','getOwnPropertyDescriptor','dayjs','UniverNetwork','rxjs','8090269LvDbKL','content','385023gWvEmE','size','format','forEach','Reply','837245DqDumA','@univerjs/thread-comment','bufferTime','thread-comment-data-source.config','unitId','length','disposeWithMe','requireSession','DependentOn','ref','_userService','OpenOrReOpen','384165qOVdSX','@univerjs-pro/collaboration-client','/universer-api/comment/unit/','UniverProThreadCommentDatasource','rangeType','pipe','/add','/solved','CollaborationSessionService','UniverCore','onStarting','Injector','UniverThreadCommentDataSourcePlugin','values','getMemberID','type','21DvsMoR','_initDataSource','_threadCommentDataSource','getComment','users','UniverThreadCommentUi','resolveComment','Add','UNRECOGNIZED','_configService','CustomRangeType','stringify','/reply','ThreadCommentModel','getUser','commentUpdate$','UniverLicensePlugin','UniverInstanceType','@univerjs/network','Plugin','updateComment','12987441ReXgaH','2YloTJM','1877528lThlsG','reply','userID','_init','threadId','setConfig','20xNwQDA','defineProperty','_injector','Inject','Solved','/edit','/universer-api/user/list','filter','UniverThreadComment','addUser','HTTPService','code','@univerjs/thread-comment-ui','IThreadCommentDataSourceService','Delete','Module','amd','UniverThreadCommentUIPlugin','payload','root','30bSreZo','user','UniverProLicense','comment','map','get','body','rangeId','parentId','getUnit','add','createTimestamp','COMMENT','replyId','comments','syncUpdateMutationToColla','_httpService','find','solved','_sessionService','Unknown','toStringTag','deleteComment','_initUserSync','CommentService','_commentService','/list','delete','_threadCommentModel','Disposable','resolved','addComment','subscribe','UNIVER_UNKNOWN','Solve','error','parse','userId','replies','UniverProCollaborationClient','personId','_threadCommentDataSourceService','_config','Edit','@univerjs/core','pluginName','9305136fnDHwt','UserManagerService','merge'];_0x800a=function(){return _0x598507;};return _0x800a();}
1
+ function _0x3622(_0x1e2cb5,_0x46c6a0){const _0x181acb=_0x181a();return _0x3622=function(_0x36228b,_0x3499ef){_0x36228b=_0x36228b-0x1a1;let _0x17ff40=_0x181acb[_0x36228b];return _0x17ff40;},_0x3622(_0x1e2cb5,_0x46c6a0);}(function(_0xdb2ffd,_0x484c73){const _0x550ebb=_0x3622,_0x564bf1=_0xdb2ffd();while(!![]){try{const _0x29c10f=-parseInt(_0x550ebb(0x1fb))/0x1*(-parseInt(_0x550ebb(0x1ab))/0x2)+-parseInt(_0x550ebb(0x1ae))/0x3+-parseInt(_0x550ebb(0x1eb))/0x4*(parseInt(_0x550ebb(0x211))/0x5)+parseInt(_0x550ebb(0x1a4))/0x6+-parseInt(_0x550ebb(0x1b9))/0x7+-parseInt(_0x550ebb(0x1fe))/0x8+parseInt(_0x550ebb(0x1db))/0x9;if(_0x29c10f===_0x484c73)break;else _0x564bf1['push'](_0x564bf1['shift']());}catch(_0x1f6048){_0x564bf1['push'](_0x564bf1['shift']());}}}(_0x181a,0xcf493),function(_0x40f899,_0x3fccb3){const _0x365f25=_0x3622;typeof exports=='object'&&typeof module<'u'?_0x3fccb3(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==_0x365f25(0x212)&&define[_0x365f25(0x1f8)]?define(['exports',_0x365f25(0x1b1),'@univerjs-pro/license','@univerjs/core',_0x365f25(0x1e0),_0x365f25(0x215),'rxjs','@univerjs/network'],_0x3fccb3):(_0x40f899=typeof globalThis<'u'?globalThis:_0x40f899||self,_0x3fccb3(_0x40f899[_0x365f25(0x210)]={},_0x40f899[_0x365f25(0x216)],_0x40f899[_0x365f25(0x1ec)],_0x40f899[_0x365f25(0x1cf)],_0x40f899['UniverThreadCommentUi'],_0x40f899[_0x365f25(0x1c2)],_0x40f899[_0x365f25(0x1c1)],_0x40f899[_0x365f25(0x21c)]));}(this,function(_0x42ffda,_0x1f6c36,_0x20cd49,_0x593136,_0x1d8ca7,_0x3d1e2c,_0x5d43a5,_0x31a79b){'use strict';const _0xff7c46=_0x3622;const _0x211e0a=_0xff7c46(0x1d1);var _0x2614a7=(_0x384200=>(_0x384200[_0x384200['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x384200[_0x384200[_0xff7c46(0x1a5)]=0x1]=_0xff7c46(0x1a5),_0x384200[_0x384200['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x384200))(_0x2614a7||{}),_0x3fd1be=(_0x12f6a0=>(_0x12f6a0[_0x12f6a0[_0xff7c46(0x1b4)]=0x0]=_0xff7c46(0x1b4),_0x12f6a0[_0x12f6a0[_0xff7c46(0x224)]=0x1]=_0xff7c46(0x224),_0x12f6a0[_0x12f6a0[_0xff7c46(0x1a7)]=0x2]=_0xff7c46(0x1a7),_0x12f6a0[_0x12f6a0['Edit']=0x3]=_0xff7c46(0x21d),_0x12f6a0[_0x12f6a0[_0xff7c46(0x1f4)]=0x4]=_0xff7c46(0x1f4),_0x12f6a0[_0x12f6a0['Solve']=0x5]=_0xff7c46(0x202),_0x12f6a0[_0x12f6a0['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x12f6a0))(_0x3fd1be||{});const _0x3fcb9d=_0x7fbc80=>_0x593136['dayjs'](new Date(+_0x7fbc80))[_0xff7c46(0x213)](_0xff7c46(0x214)),_0x1ce138=async(_0x8ffdcf,_0x68a2eb)=>{const _0x7eaac1=_0xff7c46,_0x3d24b8=_0x8ffdcf[_0x7eaac1(0x1bd)](_0x593136[_0x7eaac1(0x21f)]),_0x1e31ca=_0x8ffdcf['get'](_0x31a79b['HTTPService']);_0x68a2eb[_0x7eaac1(0x1a9)](_0x175a7a=>{const _0x7d4469=_0x7eaac1;_0x3d24b8[_0x7d4469(0x1ff)](_0x175a7a)&&_0x68a2eb['delete'](_0x175a7a);}),_0x68a2eb[_0x7eaac1(0x201)]&&(await _0x1e31ca[_0x7eaac1(0x1bd)](_0x7eaac1(0x1a6),{'params':{'userIDs':[..._0x68a2eb]}}))[_0x7eaac1(0x200)]['users'][_0x7eaac1(0x1a9)](_0x29770d=>{_0x29770d&&_0x3d24b8['addUser'](_0x29770d);});};var _0x31486e=Object[_0xff7c46(0x1b6)],_0x5b35e0=(_0x39c387,_0x4c0a13,_0x5e378b,_0x5a3ab4)=>{const _0x56d6fa=_0xff7c46;for(var _0x7a97c6=_0x5a3ab4>0x1?void 0x0:_0x5a3ab4?_0x31486e(_0x4c0a13,_0x5e378b):_0x4c0a13,_0x14c32d=_0x39c387[_0x56d6fa(0x1c5)]-0x1,_0x4296b4;_0x14c32d>=0x0;_0x14c32d--)(_0x4296b4=_0x39c387[_0x14c32d])&&(_0x7a97c6=_0x4296b4(_0x7a97c6)||_0x7a97c6);return _0x7a97c6;},_0x27dd48=(_0x1ca601,_0x5daa51)=>(_0x40d32e,_0x1edf39)=>_0x5daa51(_0x40d32e,_0x1edf39,_0x1ca601);let _0x13f5da=class extends _0x593136['Disposable']{constructor(_0x99fb8b,_0x1a1cff,_0x1dac8b,_0x5df93a){const _0x3ea74a=_0xff7c46;super(),this[_0x3ea74a(0x227)]=_0x99fb8b,this[_0x3ea74a(0x1fa)]=_0x1a1cff,this[_0x3ea74a(0x1d5)]=_0x1dac8b,this[_0x3ea74a(0x204)]=_0x5df93a,this[_0x3ea74a(0x1f1)](),this[_0x3ea74a(0x1ee)]();}['_initUserSync'](){const _0x50aa7c=_0xff7c46;this[_0x50aa7c(0x1f2)](this['_threadCommentModel'][_0x50aa7c(0x1e1)][_0x50aa7c(0x1e2)](_0x5d43a5['bufferTime'](0x10))[_0x50aa7c(0x223)](_0x18be80=>{const _0x33ee7d=_0x50aa7c,_0x335a8e=new Set();_0x18be80['forEach'](_0xb25225=>{const _0x309d95=_0x3622;switch(_0xb25225['type']){case _0x309d95(0x1c4):{const _0x31eb09=_0xb25225[_0x309d95(0x1a8)][_0x309d95(0x218)];_0x335a8e['add'](_0x31eb09);break;}}}),_0x1ce138(this[_0x33ee7d(0x204)],_0x335a8e);}));}[_0xff7c46(0x1f1)](){const _0x48dfd4=_0xff7c46;this[_0x48dfd4(0x1f2)](this['_commentService'][_0x48dfd4(0x1e1)][_0x48dfd4(0x223)](async _0xff9059=>{const _0x328489=_0x48dfd4;var _0x56ac70,_0x311519,_0x285a1a,_0x39ae17;const _0x89a12a=(_0x56ac70=this[_0x328489(0x1fa)][_0x328489(0x1dc)](_0xff9059[_0x328489(0x226)])[_0x328489(0x1ba)](_0x5d0ce1=>_0x5d0ce1['threadId']===_0xff9059[_0x328489(0x1d2)]))==null?void 0x0:_0x56ac70['root'];if(!_0x89a12a)return;const {unitId:_0xdb7052,subUnitId:_0xf3aea6}=_0x89a12a;switch(_0xff9059[_0x328489(0x1c6)]&&this[_0x328489(0x1d5)][_0x328489(0x1ed)](_0xff9059[_0x328489(0x1c6)]),_0xff9059[_0x328489(0x21e)]){case _0x3fd1be[_0x328489(0x224)]:break;case _0x3fd1be['Reply']:{this[_0x328489(0x1fa)][_0x328489(0x1e8)](_0xdb7052,_0xf3aea6,{'unitId':_0xdb7052,'subUnitId':_0xf3aea6,'ref':'','id':_0xff9059[_0x328489(0x1b8)],'dT':_0x3fcb9d(+_0xff9059[_0x328489(0x1d8)]),'threadId':_0xff9059[_0x328489(0x1d2)],'personId':(_0x285a1a=(_0x311519=_0xff9059['user'])==null?void 0x0:_0x311519[_0x328489(0x1ef)])!=null?_0x285a1a:_0xff9059[_0x328489(0x1c0)],'text':JSON[_0x328489(0x1d4)](_0xff9059[_0x328489(0x1d3)]),'parentId':_0x89a12a['id']});break;}case _0x3fd1be[_0x328489(0x1f4)]:{const _0x4d3fdc=this[_0x328489(0x1fa)][_0x328489(0x1c3)](_0xdb7052,_0xf3aea6,_0xff9059[_0x328489(0x1b8)]);_0x4d3fdc&&_0x4d3fdc[_0x328489(0x1f0)]&&this[_0x328489(0x1fa)][_0x328489(0x20f)](_0xdb7052,_0xf3aea6,_0xff9059[_0x328489(0x1b8)]);break;}case _0x3fd1be[_0x328489(0x21d)]:{this[_0x328489(0x1fa)][_0x328489(0x207)](_0xdb7052,_0xf3aea6,{'commentId':_0xff9059['replyId'],'text':JSON[_0x328489(0x1d4)](_0xff9059[_0x328489(0x1d3)])});break;}case _0x3fd1be[_0x328489(0x202)]:{const _0x476795=(_0x39ae17=this['_threadCommentModel']['getUnit'](_0xff9059[_0x328489(0x226)])['find'](_0x11f5b6=>_0x11f5b6['threadId']===_0xff9059[_0x328489(0x1d2)]))==null?void 0x0:_0x39ae17[_0x328489(0x1b0)];_0x476795&&this[_0x328489(0x1fa)][_0x328489(0x206)](_0xdb7052,_0xf3aea6,_0x476795['id'],_0xff9059[_0x328489(0x20d)]===_0x2614a7[_0x328489(0x1a5)]);break;}}}));}};_0x13f5da=_0x5b35e0([_0x27dd48(0x0,_0x593136[_0xff7c46(0x1ad)](_0x1f6c36[_0xff7c46(0x20a)])),_0x27dd48(0x1,_0x593136[_0xff7c46(0x1ad)](_0x3d1e2c[_0xff7c46(0x1ca)])),_0x27dd48(0x2,_0x593136[_0xff7c46(0x1ad)](_0x593136[_0xff7c46(0x21f)])),_0x27dd48(0x3,_0x593136[_0xff7c46(0x1ad)](_0x593136['Injector']))],_0x13f5da);const _0x56aa3b=_0xff7c46(0x1e5),_0x367ff1={};var _0x499845=Object[_0xff7c46(0x1b6)],_0x37003b=(_0x386b66,_0x1b14d7,_0x38acb1,_0x18b3c3)=>{for(var _0x5eb927=_0x18b3c3>0x1?void 0x0:_0x18b3c3?_0x499845(_0x1b14d7,_0x38acb1):_0x1b14d7,_0x3d8143=_0x386b66['length']-0x1,_0x297b23;_0x3d8143>=0x0;_0x3d8143--)(_0x297b23=_0x386b66[_0x3d8143])&&(_0x5eb927=_0x297b23(_0x5eb927)||_0x5eb927);return _0x5eb927;},_0x121997=(_0x19fd09,_0x1ff08c)=>(_0x52d0cc,_0xf2687f)=>_0x1ff08c(_0x52d0cc,_0xf2687f,_0x19fd09);function _0xa9e9a(_0x5e805e,_0x37cea4){const _0x35c037=_0xff7c46,_0x27fadc=_0x5e805e[_0x35c037(0x1ce)][0x0];return{..._0x37cea4,'id':_0x27fadc[_0x35c037(0x1b8)],'resolved':_0x5e805e[_0x35c037(0x20d)]===0x1,'dT':_0x3fcb9d(_0x27fadc[_0x35c037(0x1d8)]),'personId':_0x27fadc[_0x35c037(0x1c0)],'threadId':_0x27fadc[_0x35c037(0x1d2)]};}function _0x1e201c(_0x57a03d,_0x279abe,_0x1fd7b8){const _0x22ef3f=_0xff7c46;var _0x5e21ac,_0x5ac466;if(((_0x5ac466=(_0x5e21ac=_0x57a03d==null?void 0x0:_0x57a03d[_0x22ef3f(0x1ce)])==null?void 0x0:_0x5e21ac[_0x22ef3f(0x1c5)])!=null?_0x5ac466:0x0)>0x0){const _0x1a8560=(_0x51b871,_0x5cfa58)=>({'id':_0x51b871[_0x22ef3f(0x1b8)],'threadId':_0x51b871[_0x22ef3f(0x1d2)],'dT':_0x3fcb9d(_0x51b871[_0x22ef3f(0x1d8)]),'personId':_0x51b871[_0x22ef3f(0x1c0)],'resolved':_0x57a03d['solved']===_0x2614a7[_0x22ef3f(0x1a5)],'unitId':_0x279abe,'subUnitId':_0x1fd7b8,'text':JSON[_0x22ef3f(0x1d4)](_0x51b871[_0x22ef3f(0x1d3)]),'parentId':_0x5cfa58}),_0x22a2ae=_0x1a8560(_0x57a03d[_0x22ef3f(0x1ce)][0x0]);return{..._0x22a2ae,'children':_0x57a03d['replies']['slice'](0x1)[_0x22ef3f(0x1e7)](_0x290dcf=>_0x1a8560(_0x290dcf,_0x22a2ae['id']))};}return null;}let _0x33920d=class{constructor(_0x531e9a,_0x2842a5,_0x3c5c6b,_0x27d920){const _0x32687b=_0xff7c46;this[_0x32687b(0x1d0)]=_0x531e9a,this[_0x32687b(0x1d5)]=_0x2842a5,this[_0x32687b(0x1e9)]=_0x3c5c6b,this[_0x32687b(0x204)]=_0x27d920;}async[_0xff7c46(0x1e8)](_0x3c07b7){const _0x17c58f=_0xff7c46;var _0x567a27,_0x58ee70;const {parentId:_0x5021c8,unitId:_0x200d5a,text:_0x2bcf3e,threadId:_0x223cc4}=_0x3c07b7,_0xb991e6=(_0x58ee70=(_0x567a27=_0x2bcf3e[_0x17c58f(0x1cc)])==null?void 0x0:_0x567a27[_0x17c58f(0x1b7)](_0x275bdc=>_0x275bdc[_0x17c58f(0x1f6)]===_0x593136[_0x17c58f(0x20c)][_0x17c58f(0x21b)])[_0x17c58f(0x1e7)](_0x3669d6=>_0x3669d6['rangeId']))!=null?_0x58ee70:[],_0x12cd7d=JSON[_0x17c58f(0x219)](_0x2bcf3e),_0x5a3467=(await this[_0x17c58f(0x1e9)][_0x17c58f(0x1ac)](_0x200d5a))['getMemberID']();if(_0x5021c8){const _0x23a4ef={'memberId':_0x5a3467,'unitId':_0x200d5a,'content':_0x12cd7d,'mention':_0xb991e6,'threadId':_0x223cc4},_0x210201=(await this[_0x17c58f(0x1d0)][_0x17c58f(0x1c7)](_0x17c58f(0x1aa)+_0x200d5a+_0x17c58f(0x225),{'body':_0x23a4ef}))[_0x17c58f(0x200)][_0x17c58f(0x1f3)];return{..._0x3c07b7,'id':_0x210201[_0x17c58f(0x1b8)],'dT':_0x593136[_0x17c58f(0x20e)](+_0x210201[_0x17c58f(0x1d8)])[_0x17c58f(0x213)](_0x17c58f(0x214)),'personId':_0x210201[_0x17c58f(0x1c0)]};}else{const _0x1c41c8={'memberId':_0x5a3467,'unitId':_0x200d5a,'content':_0x12cd7d,'mention':_0xb991e6},_0x329da7=await this[_0x17c58f(0x1d0)][_0x17c58f(0x1c7)]('/universer-api/comment/unit/'+_0x200d5a+_0x17c58f(0x203),{'body':_0x1c41c8});return _0xa9e9a(_0x329da7[_0x17c58f(0x200)]['comment'],_0x3c07b7);}}async['updateComment'](_0x24aeec){const _0x2a7192=_0xff7c46;var _0x280d3b,_0x4bc8b0;const {text:_0x4149b8,unitId:_0x3eacb4}=_0x24aeec,_0x11cb9c=(_0x4bc8b0=(_0x280d3b=_0x4149b8[_0x2a7192(0x1cc)])==null?void 0x0:_0x280d3b[_0x2a7192(0x1b7)](_0x58b531=>_0x58b531[_0x2a7192(0x1f6)]===_0x593136[_0x2a7192(0x20c)][_0x2a7192(0x21b)])[_0x2a7192(0x1e7)](_0x3dd139=>_0x3dd139[_0x2a7192(0x1bb)]))!=null?_0x4bc8b0:[],_0x294e79=JSON[_0x2a7192(0x219)](_0x4149b8),_0x34a5c7=_0x24aeec[_0x2a7192(0x1d2)],_0x564a69=_0x24aeec['id'],_0x4800a9={'memberId':(await this[_0x2a7192(0x1e9)]['requireSession'](_0x3eacb4))[_0x2a7192(0x1a3)](),'unitId':_0x3eacb4,'threadId':_0x34a5c7,'mention':_0x11cb9c,'content':_0x294e79,'replyId':_0x564a69},_0xd4fb0f=await this[_0x2a7192(0x1d0)][_0x2a7192(0x1c7)](_0x2a7192(0x1aa)+_0x3eacb4+'/edit',{'body':_0x4800a9});return!_0xd4fb0f[_0x2a7192(0x200)][_0x2a7192(0x1e3)]||_0xd4fb0f[_0x2a7192(0x200)][_0x2a7192(0x1e3)][_0x2a7192(0x20b)]===0x1;}async[_0xff7c46(0x206)](_0x55355f){const _0x488a5b=_0xff7c46,{unitId:_0x30874e}=_0x55355f,_0x1089c4=_0x55355f[_0x488a5b(0x1d2)],_0x2d8c1f={'memberId':this['_userService'][_0x488a5b(0x1c8)]()[_0x488a5b(0x1ef)],'unitId':_0x30874e,'threadId':_0x1089c4,'solved':_0x55355f[_0x488a5b(0x1b3)]?_0x2614a7[_0x488a5b(0x1a5)]:_0x2614a7['OpenOrReOpen']},_0x410849=await this[_0x488a5b(0x1d0)][_0x488a5b(0x1c7)]('/universer-api/comment/unit/'+_0x30874e+_0x488a5b(0x1cd),{'body':_0x2d8c1f});return!_0x410849[_0x488a5b(0x200)]['error']||_0x410849[_0x488a5b(0x200)]['error'][_0x488a5b(0x20b)]===0x1;}async['deleteComment'](_0x2e848d,_0xa74a4f,_0x158a51,_0x42afad){const _0x321495=_0xff7c46,_0x19ffb4={'memberId':(await this[_0x321495(0x1e9)][_0x321495(0x1ac)](_0x2e848d))[_0x321495(0x1a3)](),'threadId':_0x158a51,'replyId':_0x42afad,'unitId':_0x2e848d},_0x4ee411=await this[_0x321495(0x1d0)][_0x321495(0x1c7)](_0x321495(0x1aa)+_0x2e848d+_0x321495(0x1df),{'body':_0x19ffb4});return!_0x4ee411[_0x321495(0x200)][_0x321495(0x1e3)]||_0x4ee411[_0x321495(0x200)][_0x321495(0x1e3)]['code']===0x1;}async[_0xff7c46(0x220)](_0x36ef29,_0x54236e,_0x2e1bcf){const _0x762d43=_0xff7c46,_0x2de55e={'unitId':_0x36ef29,'threadId':_0x2e1bcf},_0x36c7d5=await this[_0x762d43(0x1d0)][_0x762d43(0x1c7)](_0x762d43(0x1aa)+_0x36ef29+_0x762d43(0x1e6),{'body':_0x2de55e}),_0x335f97=_0x2e1bcf[_0x762d43(0x1e7)](_0xcd4e6f=>_0x1e201c(_0x36c7d5['body'][_0x762d43(0x222)][_0xcd4e6f],_0x36ef29,_0x54236e))[_0x762d43(0x1b7)](Boolean);return Object['values'](_0x36c7d5[_0x762d43(0x200)][_0x762d43(0x1f5)])['forEach'](_0x144d16=>{const _0x33eb81=_0x762d43;this[_0x33eb81(0x1d5)][_0x33eb81(0x1ed)](_0x144d16);}),_0x335f97;}[_0xff7c46(0x1c9)](_0x54028a){const _0x3ee006=_0xff7c46;return{'id':_0x54028a['id'],'threadId':_0x54028a[_0x3ee006(0x1d2)],'ref':_0x54028a['ref']};}};_0x33920d=_0x37003b([_0x121997(0x0,_0x593136[_0xff7c46(0x1ad)](_0x31a79b[_0xff7c46(0x1d6)])),_0x121997(0x1,_0x593136['Inject'](_0x593136[_0xff7c46(0x21f)])),_0x121997(0x2,_0x593136[_0xff7c46(0x1ad)](_0x1f6c36[_0xff7c46(0x1dd)])),_0x121997(0x3,_0x593136[_0xff7c46(0x1ad)](_0x593136['Injector']))],_0x33920d);var _0x3e13f1=Object[_0xff7c46(0x1b6)],_0x4ae154=(_0x4ecb74,_0x3dfef1,_0x46e467,_0x58bf01)=>{const _0x5b8239=_0xff7c46;for(var _0x449f1d=_0x58bf01>0x1?void 0x0:_0x58bf01?_0x3e13f1(_0x3dfef1,_0x46e467):_0x3dfef1,_0x5566a0=_0x4ecb74[_0x5b8239(0x1c5)]-0x1,_0x5ed04d;_0x5566a0>=0x0;_0x5566a0--)(_0x5ed04d=_0x4ecb74[_0x5566a0])&&(_0x449f1d=_0x5ed04d(_0x449f1d)||_0x449f1d);return _0x449f1d;},_0x21c94c=(_0x116d77,_0x3a8159)=>(_0x31254c,_0x459ef4)=>_0x3a8159(_0x31254c,_0x459ef4,_0x116d77);let _0x4f56af=class extends _0x593136[_0xff7c46(0x1ea)]{constructor(_0x5b7e55,_0x1005cb){const _0xc1a51e=_0xff7c46;super(),this[_0xc1a51e(0x1bc)]=_0x5b7e55,this['_threadCommentDataSource']=_0x1005cb,this[_0xc1a51e(0x217)]();}[_0xff7c46(0x217)](){const _0x1f950f=_0xff7c46;this[_0x1f950f(0x1bc)][_0x1f950f(0x1b5)]=this[_0x1f950f(0x1de)],this[_0x1f950f(0x1bc)][_0x1f950f(0x1a2)]=!0x1;}};_0x4f56af=_0x4ae154([_0x21c94c(0x0,_0x3d1e2c[_0xff7c46(0x21a)]),_0x21c94c(0x1,_0x593136[_0xff7c46(0x1ad)](_0x33920d))],_0x4f56af);var _0x18b3bb=Object[_0xff7c46(0x205)],_0x3c2ce7=Object[_0xff7c46(0x1b6)],_0x24b042=(_0x12091c,_0x3fef45,_0x208b79)=>_0x3fef45 in _0x12091c?_0x18b3bb(_0x12091c,_0x3fef45,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x208b79}):_0x12091c[_0x3fef45]=_0x208b79,_0x2f2e2c=(_0xddc872,_0x4ef00c,_0x100f7f,_0x3f92af)=>{const _0x840ddb=_0xff7c46;for(var _0x51d41e=_0x3f92af>0x1?void 0x0:_0x3f92af?_0x3c2ce7(_0x4ef00c,_0x100f7f):_0x4ef00c,_0x45a571=_0xddc872[_0x840ddb(0x1c5)]-0x1,_0x21833e;_0x45a571>=0x0;_0x45a571--)(_0x21833e=_0xddc872[_0x45a571])&&(_0x51d41e=_0x21833e(_0x51d41e)||_0x51d41e);return _0x51d41e;},_0x4a261f=(_0x6d1a06,_0x5edd60)=>(_0x129c70,_0x46a653)=>_0x5edd60(_0x129c70,_0x46a653,_0x6d1a06),_0x5078de=(_0x563df4,_0x54ff2a,_0x2b62d6)=>_0x24b042(_0x563df4,typeof _0x54ff2a!=_0xff7c46(0x1f7)?_0x54ff2a+'':_0x54ff2a,_0x2b62d6);_0x42ffda['UniverThreadCommentDataSourcePlugin']=class extends _0x593136[_0xff7c46(0x1fc)]{constructor(_0x1cf7ee=_0x367ff1,_0xc92118,_0x43a457){const _0x5edf24=_0xff7c46;super(),this[_0x5edf24(0x1d9)]=_0x1cf7ee,this[_0x5edf24(0x204)]=_0xc92118,this['_configService']=_0x43a457;const {..._0x2c12d7}=_0x593136[_0x5edf24(0x1bf)]({},_0x367ff1,this[_0x5edf24(0x1d9)]);this[_0x5edf24(0x1da)][_0x5edf24(0x1fd)](_0x56aa3b,_0x2c12d7);}[_0xff7c46(0x1cb)](){const _0x178b1a=_0xff7c46;[[_0x33920d],[_0x4f56af],[_0x13f5da]][_0x178b1a(0x1a9)](_0x3ce8c2=>{const _0x5a9dd6=_0x178b1a;this[_0x5a9dd6(0x204)][_0x5a9dd6(0x1c4)](_0x3ce8c2);});}['onReady'](){const _0x58261e=_0xff7c46;this[_0x58261e(0x204)][_0x58261e(0x1bd)](_0x4f56af),this[_0x58261e(0x204)][_0x58261e(0x1bd)](_0x13f5da);}},_0x5078de(_0x42ffda[_0xff7c46(0x1b2)],_0xff7c46(0x208),_0x211e0a),_0x5078de(_0x42ffda['UniverThreadCommentDataSourcePlugin'],_0xff7c46(0x21e),_0x593136['UniverInstanceType'][_0xff7c46(0x1af)]),_0x42ffda[_0xff7c46(0x1b2)]=_0x2f2e2c([_0x593136[_0xff7c46(0x221)](_0x1d8ca7[_0xff7c46(0x1d7)],_0x1f6c36[_0xff7c46(0x1f9)],_0x20cd49[_0xff7c46(0x209)]),_0x4a261f(0x1,_0x593136[_0xff7c46(0x1ad)](_0x593136[_0xff7c46(0x1e4)])),_0x4a261f(0x2,_0x593136['IConfigService'])],_0x42ffda[_0xff7c46(0x1b2)]),Object['defineProperty'](_0x42ffda,Symbol[_0xff7c46(0x1be)],{'value':_0xff7c46(0x1a1)});}));function _0x181a(){const _0x3c426=['UniverProLicense','addUser','_initUserSync','userID','parentId','_init','disposeWithMe','reply','Delete','users','rangeType','symbol','amd','UniverCollaborationClientPlugin','_threadCommentModel','1FkdVPm','Plugin','setConfig','12843648ruNMBx','getUser','body','size','Solve','/add','_injector','defineProperty','resolveComment','updateComment','pluginName','UniverLicensePlugin','CommentService','code','CustomRangeType','solved','dayjs','deleteComment','UniverProThreadCommentDatasource','421815sOrIsY','function','format','YYYY/MM/DD\x20HH:mm','@univerjs/thread-comment','UniverProCollaborationClient','_initDataSource','personId','stringify','IThreadCommentDataSourceService','COMMENT','UniverNetwork','Edit','type','UserManagerService','listComments','DependentOn','comments','subscribe','Add','/reply','unitId','_commentService','Module','syncUpdateMutationToColla','getMemberID','8448882qzLATW','Solved','/universer-api/user/list','Reply','payload','forEach','/universer-api/comment/unit/','2505842tPXPCL','requireSession','Inject','4352877lRwIQu','UNIVER_UNKNOWN','root','@univerjs-pro/collaboration-client','UniverThreadCommentDataSourcePlugin','resolved','Unknown','dataSource','getOwnPropertyDescriptor','filter','replyId','384657sSodAU','find','rangeId','_threadCommentDataSourceService','get','toStringTag','merge','userId','rxjs','UniverThreadComment','getComment','add','length','user','post','getCurrentUser','saveCommentToSnapshot','ThreadCommentModel','onStarting','customRanges','/solved','replies','UniverCore','_httpService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','threadId','content','parse','_userService','HTTPService','UniverThreadCommentUIPlugin','createTimestamp','_config','_configService','14731137ECENxj','getUnit','CollaborationSessionService','_threadCommentDataSource','/delete','@univerjs/thread-comment-ui','commentUpdate$','pipe','error','Injector','thread-comment-data-source.config','/list','map','addComment','_sessionService','Disposable','16TauciR'];_0x181a=function(){return _0x3c426;};return _0x181a();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.9.1-nightly.202507071607",
3
+ "version": "0.9.1",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,13 +45,13 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.9.1-nightly.202507071607",
49
- "@univerjs-pro/license": "0.9.1-nightly.202507071607",
50
- "@univerjs/core": "0.9.1-nightly.202507071607",
51
- "@univerjs/thread-comment": "0.9.1-nightly.202507071607",
52
- "@univerjs/network": "0.9.1-nightly.202507071607",
48
+ "@univerjs-pro/collaboration-client": "0.9.1",
49
+ "@univerjs-pro/license": "0.9.1",
53
50
  "@univerjs/protocol": "0.1.47-alpha.0",
54
- "@univerjs/thread-comment-ui": "0.9.1-nightly.202507071607"
51
+ "@univerjs/thread-comment": "0.9.1",
52
+ "@univerjs/thread-comment-ui": "0.9.1",
53
+ "@univerjs/core": "0.9.1",
54
+ "@univerjs/network": "0.9.1"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",