@univerjs-pro/thread-comment-datasource 0.9.1-nightly.202507071607 → 0.9.1-nightly.202507081607
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 +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +7 -7
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 _0x2a77bb=_0x5c4e;(function(_0x3abd5a,_0x57add2){const _0x5e0cbe=_0x5c4e,_0x453fec=_0x3abd5a();while(!![]){try{const _0xfff239=parseInt(_0x5e0cbe(0x137))/0x1+parseInt(_0x5e0cbe(0x176))/0x2*(parseInt(_0x5e0cbe(0x135))/0x3)+parseInt(_0x5e0cbe(0x175))/0x4+-parseInt(_0x5e0cbe(0x198))/0x5*(parseInt(_0x5e0cbe(0x15c))/0x6)+parseInt(_0x5e0cbe(0x152))/0x7+-parseInt(_0x5e0cbe(0x155))/0x8+parseInt(_0x5e0cbe(0x13b))/0x9;if(_0xfff239===_0x57add2)break;else _0x453fec['push'](_0x453fec['shift']());}catch(_0x6439c1){_0x453fec['push'](_0x453fec['shift']());}}}(_0x38b2,0x78a71));function _0x5c4e(_0x1758a2,_0x33e103){const _0x38b217=_0x38b2();return _0x5c4e=function(_0x5c4ebc,_0x3ee2d5){_0x5c4ebc=_0x5c4ebc-0x126;let _0x49a869=_0x38b217[_0x5c4ebc];return _0x49a869;},_0x5c4e(_0x1758a2,_0x33e103);}Object[_0x2a77bb(0x16d)](exports,Symbol[_0x2a77bb(0x12a)],{'value':'Module'});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=_0x2a77bb(0x179);var I=(_0x343e5b=>(_0x343e5b[_0x343e5b['OpenOrReOpen']=0x0]=_0x2a77bb(0x17d),_0x343e5b[_0x343e5b[_0x2a77bb(0x12e)]=0x1]=_0x2a77bb(0x12e),_0x343e5b[_0x343e5b[_0x2a77bb(0x193)]=-0x1]=_0x2a77bb(0x193),_0x343e5b))(I||{}),v=(_0x49740d=>(_0x49740d[_0x49740d[_0x2a77bb(0x14e)]=0x0]=_0x2a77bb(0x14e),_0x49740d[_0x49740d[_0x2a77bb(0x148)]=0x1]=_0x2a77bb(0x148),_0x49740d[_0x49740d['Reply']=0x2]=_0x2a77bb(0x13f),_0x49740d[_0x49740d[_0x2a77bb(0x192)]=0x3]='Edit',_0x49740d[_0x49740d[_0x2a77bb(0x162)]=0x4]=_0x2a77bb(0x162),_0x49740d[_0x49740d[_0x2a77bb(0x138)]=0x5]=_0x2a77bb(0x138),_0x49740d[_0x49740d[_0x2a77bb(0x193)]=-0x1]='UNRECOGNIZED',_0x49740d))(v||{});const f=_0x4d7cb1=>c[_0x2a77bb(0x149)](new Date(+_0x4d7cb1))[_0x2a77bb(0x169)](_0x2a77bb(0x145)),R=async(_0x58c7de,_0x177058)=>{const _0x8a7c7=_0x2a77bb,_0x20ee01=_0x58c7de[_0x8a7c7(0x15f)](c['UserManagerService']),_0x5e6703=_0x58c7de['get'](P[_0x8a7c7(0x17b)]);_0x177058[_0x8a7c7(0x15a)](_0x34940a=>{const _0x47b016=_0x8a7c7;_0x20ee01[_0x47b016(0x12d)](_0x34940a)&&_0x177058[_0x47b016(0x180)](_0x34940a);}),_0x177058[_0x8a7c7(0x196)]&&(await _0x5e6703[_0x8a7c7(0x15f)]('/universer-api/user/list',{'params':{'userIDs':[..._0x177058]}}))[_0x8a7c7(0x15b)]['users']['forEach'](_0x5b8870=>{_0x5b8870&&_0x20ee01['addUser'](_0x5b8870);});};var $=Object[_0x2a77bb(0x139)],E=(_0x3388da,_0x7fbebf,_0x5d40db,_0x3fa9ef)=>{for(var _0x17a4a4=_0x3fa9ef>0x1?void 0x0:_0x3fa9ef?$(_0x7fbebf,_0x5d40db):_0x7fbebf,_0x34d908=_0x3388da['length']-0x1,_0xf46f14;_0x34d908>=0x0;_0x34d908--)(_0xf46f14=_0x3388da[_0x34d908])&&(_0x17a4a4=_0xf46f14(_0x17a4a4)||_0x17a4a4);return _0x17a4a4;},S=(_0x4e691d,_0x19dd04)=>(_0x17fc73,_0x4122a0)=>_0x19dd04(_0x17fc73,_0x4122a0,_0x4e691d);let p=class extends c[_0x2a77bb(0x185)]{constructor(_0x1b8010,_0x1c7eaf,_0x4f8e3b,_0x29205c){const _0x2767c9=_0x2a77bb;super(),this[_0x2767c9(0x12f)]=_0x1b8010,this[_0x2767c9(0x150)]=_0x1c7eaf,this[_0x2767c9(0x18d)]=_0x4f8e3b,this[_0x2767c9(0x136)]=_0x29205c,this['_init'](),this[_0x2767c9(0x161)]();}[_0x2a77bb(0x161)](){const _0x1bef63=_0x2a77bb;this[_0x1bef63(0x17a)](this['_threadCommentModel'][_0x1bef63(0x157)][_0x1bef63(0x130)](w[_0x1bef63(0x151)](0x10))[_0x1bef63(0x186)](_0x3cf95d=>{const _0x46dd8b=_0x1bef63,_0x2e943d=new Set();_0x3cf95d[_0x46dd8b(0x15a)](_0x2c8347=>{const _0x80363a=_0x46dd8b;switch(_0x2c8347[_0x80363a(0x132)]){case _0x80363a(0x14c):{const _0x2a78b3=_0x2c8347['payload']['personId'];_0x2e943d[_0x80363a(0x14c)](_0x2a78b3);break;}}}),R(this[_0x46dd8b(0x136)],_0x2e943d);}));}[_0x2a77bb(0x167)](){const _0x128b02=_0x2a77bb;this['disposeWithMe'](this[_0x128b02(0x12f)][_0x128b02(0x157)][_0x128b02(0x186)](async _0x285f84=>{const _0x1eb6a5=_0x128b02;var _0x362d6b,_0x2210b2,_0x2b40b6,_0x405fd1;const _0x4c7303=(_0x362d6b=this[_0x1eb6a5(0x150)][_0x1eb6a5(0x184)](_0x285f84['unitId'])['find'](_0xc7d598=>_0xc7d598[_0x1eb6a5(0x156)]===_0x285f84[_0x1eb6a5(0x156)]))==null?void 0x0:_0x362d6b[_0x1eb6a5(0x183)];if(!_0x4c7303)return;const {unitId:_0x550dd3,subUnitId:_0x53659a}=_0x4c7303;switch(_0x285f84[_0x1eb6a5(0x18e)]&&this[_0x1eb6a5(0x18d)]['addUser'](_0x285f84[_0x1eb6a5(0x18e)]),_0x285f84[_0x1eb6a5(0x132)]){case v[_0x1eb6a5(0x148)]:break;case v['Reply']:{this['_threadCommentModel'][_0x1eb6a5(0x174)](_0x550dd3,_0x53659a,{'unitId':_0x550dd3,'subUnitId':_0x53659a,'ref':'','id':_0x285f84[_0x1eb6a5(0x158)],'dT':f(+_0x285f84[_0x1eb6a5(0x13d)]),'threadId':_0x285f84[_0x1eb6a5(0x156)],'personId':(_0x2b40b6=(_0x2210b2=_0x285f84['user'])==null?void 0x0:_0x2210b2['userID'])!=null?_0x2b40b6:_0x285f84[_0x1eb6a5(0x188)],'text':JSON['parse'](_0x285f84[_0x1eb6a5(0x16f)]),'parentId':_0x4c7303['id']});break;}case v[_0x1eb6a5(0x162)]:{const _0x19e423=this[_0x1eb6a5(0x150)]['getComment'](_0x550dd3,_0x53659a,_0x285f84[_0x1eb6a5(0x158)]);_0x19e423&&_0x19e423['parentId']&&this[_0x1eb6a5(0x150)][_0x1eb6a5(0x160)](_0x550dd3,_0x53659a,_0x285f84['replyId']);break;}case v[_0x1eb6a5(0x192)]:{this[_0x1eb6a5(0x150)][_0x1eb6a5(0x144)](_0x550dd3,_0x53659a,{'commentId':_0x285f84[_0x1eb6a5(0x158)],'text':JSON[_0x1eb6a5(0x191)](_0x285f84[_0x1eb6a5(0x16f)])});break;}case v[_0x1eb6a5(0x138)]:{const _0x8991f0=(_0x405fd1=this['_threadCommentModel']['getUnit'](_0x285f84['unitId'])[_0x1eb6a5(0x173)](_0x55a37b=>_0x55a37b[_0x1eb6a5(0x156)]===_0x285f84['threadId']))==null?void 0x0:_0x405fd1['root'];_0x8991f0&&this[_0x1eb6a5(0x150)][_0x1eb6a5(0x190)](_0x550dd3,_0x53659a,_0x8991f0['id'],_0x285f84[_0x1eb6a5(0x128)]===I[_0x1eb6a5(0x12e)]);break;}}}));}};p=E([S(0x0,c[_0x2a77bb(0x171)](b['CommentService'])),S(0x1,c[_0x2a77bb(0x171)](M['ThreadCommentModel'])),S(0x2,c['Inject'](c[_0x2a77bb(0x159)])),S(0x3,c[_0x2a77bb(0x171)](c[_0x2a77bb(0x13a)]))],p);const q=_0x2a77bb(0x131),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x17d02a,_0x4bfbc8,_0x326024,_0x56d0ac)=>{const _0x51eb1d=_0x2a77bb;for(var _0x549d64=_0x56d0ac>0x1?void 0x0:_0x56d0ac?A(_0x4bfbc8,_0x326024):_0x4bfbc8,_0x42f3cf=_0x17d02a[_0x51eb1d(0x165)]-0x1,_0x42ff5b;_0x42f3cf>=0x0;_0x42f3cf--)(_0x42ff5b=_0x17d02a[_0x42f3cf])&&(_0x549d64=_0x42ff5b(_0x549d64)||_0x549d64);return _0x549d64;},_=(_0x58b11c,_0xee4746)=>(_0x455f40,_0x1eacf4)=>_0xee4746(_0x455f40,_0x1eacf4,_0x58b11c);function Y(_0x504577,_0x4659b1){const _0x58867d=_0x2a77bb,_0x216169=_0x504577['replies'][0x0];return{..._0x4659b1,'id':_0x216169['replyId'],'resolved':_0x504577[_0x58867d(0x128)]===0x1,'dT':f(_0x216169[_0x58867d(0x13d)]),'personId':_0x216169[_0x58867d(0x188)],'threadId':_0x216169['threadId']};}function G(_0x240a1a,_0x1a5b93,_0x433010){const _0xea12c2=_0x2a77bb;var _0x186bcb,_0x1dec4e;if(((_0x1dec4e=(_0x186bcb=_0x240a1a==null?void 0x0:_0x240a1a[_0xea12c2(0x14f)])==null?void 0x0:_0x186bcb['length'])!=null?_0x1dec4e:0x0)>0x0){const _0x2e1877=(_0x290821,_0xce7be3)=>({'id':_0x290821[_0xea12c2(0x158)],'threadId':_0x290821[_0xea12c2(0x156)],'dT':f(_0x290821[_0xea12c2(0x13d)]),'personId':_0x290821[_0xea12c2(0x188)],'resolved':_0x240a1a[_0xea12c2(0x128)]===I[_0xea12c2(0x12e)],'unitId':_0x1a5b93,'subUnitId':_0x433010,'text':JSON['parse'](_0x290821[_0xea12c2(0x16f)]),'parentId':_0xce7be3}),_0x43e347=_0x2e1877(_0x240a1a['replies'][0x0]);return{..._0x43e347,'children':_0x240a1a['replies'][_0xea12c2(0x164)](0x1)['map'](_0x1a35ee=>_0x2e1877(_0x1a35ee,_0x43e347['id']))};}return null;}let g=class{constructor(_0x2f49cb,_0xacf922,_0x41f658,_0x3d967a){const _0x5c51c8=_0x2a77bb;this['_httpService']=_0x2f49cb,this[_0x5c51c8(0x18d)]=_0xacf922,this[_0x5c51c8(0x182)]=_0x41f658,this[_0x5c51c8(0x136)]=_0x3d967a;}async[_0x2a77bb(0x174)](_0x1b955e){const _0x224934=_0x2a77bb;var _0x5929be,_0x224a81;const {parentId:_0xbe48ec,unitId:_0x4fd90c,text:_0x4a0d83,threadId:_0x16999d}=_0x1b955e,_0x3f09fd=(_0x224a81=(_0x5929be=_0x4a0d83[_0x224934(0x18c)])==null?void 0x0:_0x5929be[_0x224934(0x16a)](_0x5e89c1=>_0x5e89c1['rangeType']===c[_0x224934(0x16e)][_0x224934(0x18b)])[_0x224934(0x18a)](_0x56f536=>_0x56f536[_0x224934(0x133)]))!=null?_0x224a81:[],_0x384b6c=JSON[_0x224934(0x168)](_0x4a0d83),_0x17741e=(await this[_0x224934(0x182)][_0x224934(0x195)](_0x4fd90c))[_0x224934(0x142)]();if(_0xbe48ec){const _0x5976ed={'memberId':_0x17741e,'unitId':_0x4fd90c,'content':_0x384b6c,'mention':_0x3f09fd,'threadId':_0x16999d},_0x139b57=(await this[_0x224934(0x178)][_0x224934(0x194)](_0x224934(0x154)+_0x4fd90c+_0x224934(0x14d),{'body':_0x5976ed}))[_0x224934(0x15b)][_0x224934(0x18f)];return{..._0x1b955e,'id':_0x139b57[_0x224934(0x158)],'dT':c[_0x224934(0x149)](+_0x139b57[_0x224934(0x13d)])['format'](_0x224934(0x145)),'personId':_0x139b57[_0x224934(0x188)]};}else{const _0x483192={'memberId':_0x17741e,'unitId':_0x4fd90c,'content':_0x384b6c,'mention':_0x3f09fd},_0x1f3c3d=await this[_0x224934(0x178)][_0x224934(0x194)]('/universer-api/comment/unit/'+_0x4fd90c+'/add',{'body':_0x483192});return Y(_0x1f3c3d['body'][_0x224934(0x15e)],_0x1b955e);}}async[_0x2a77bb(0x144)](_0x3f41ae){const _0x35f311=_0x2a77bb;var _0x2330a6,_0x42c74d;const {text:_0x51bf49,unitId:_0x58a509}=_0x3f41ae,_0x1534ac=(_0x42c74d=(_0x2330a6=_0x51bf49['customRanges'])==null?void 0x0:_0x2330a6[_0x35f311(0x16a)](_0x3bfc5b=>_0x3bfc5b[_0x35f311(0x17e)]===c[_0x35f311(0x16e)][_0x35f311(0x18b)])[_0x35f311(0x18a)](_0x57558d=>_0x57558d['rangeId']))!=null?_0x42c74d:[],_0x2bbe0c=JSON['stringify'](_0x51bf49),_0x4b33ec=_0x3f41ae[_0x35f311(0x156)],_0x2a5f23=_0x3f41ae['id'],_0x51a6e1={'memberId':(await this['_sessionService'][_0x35f311(0x195)](_0x58a509))[_0x35f311(0x142)](),'unitId':_0x58a509,'threadId':_0x4b33ec,'mention':_0x1534ac,'content':_0x2bbe0c,'replyId':_0x2a5f23},_0x2d087f=await this['_httpService']['post'](_0x35f311(0x154)+_0x58a509+_0x35f311(0x163),{'body':_0x51a6e1});return!_0x2d087f[_0x35f311(0x15b)][_0x35f311(0x14b)]||_0x2d087f[_0x35f311(0x15b)][_0x35f311(0x14b)][_0x35f311(0x146)]===0x1;}async[_0x2a77bb(0x190)](_0x41fa4f){const _0x5f0c13=_0x2a77bb,{unitId:_0x5f4df3}=_0x41fa4f,_0x32b662=_0x41fa4f[_0x5f0c13(0x156)],_0xdb7848={'memberId':this[_0x5f0c13(0x18d)][_0x5f0c13(0x127)]()[_0x5f0c13(0x134)],'unitId':_0x5f4df3,'threadId':_0x32b662,'solved':_0x41fa4f[_0x5f0c13(0x16b)]?I[_0x5f0c13(0x12e)]:I['OpenOrReOpen']},_0x30de6e=await this[_0x5f0c13(0x178)][_0x5f0c13(0x194)](_0x5f0c13(0x154)+_0x5f4df3+_0x5f0c13(0x143),{'body':_0xdb7848});return!_0x30de6e[_0x5f0c13(0x15b)][_0x5f0c13(0x14b)]||_0x30de6e['body'][_0x5f0c13(0x14b)][_0x5f0c13(0x146)]===0x1;}async[_0x2a77bb(0x160)](_0x4ef91e,_0x2d5a21,_0x4faa4a,_0x274a75){const _0x34d361=_0x2a77bb,_0x3f4310={'memberId':(await this[_0x34d361(0x182)]['requireSession'](_0x4ef91e))[_0x34d361(0x142)](),'threadId':_0x4faa4a,'replyId':_0x274a75,'unitId':_0x4ef91e},_0x32ce91=await this['_httpService']['post'](_0x34d361(0x154)+_0x4ef91e+_0x34d361(0x197),{'body':_0x3f4310});return!_0x32ce91[_0x34d361(0x15b)]['error']||_0x32ce91[_0x34d361(0x15b)]['error']['code']===0x1;}async[_0x2a77bb(0x189)](_0x38d430,_0x46b484,_0x5a4927){const _0x34c878=_0x2a77bb,_0x106d4f={'unitId':_0x38d430,'threadId':_0x5a4927},_0x170061=await this[_0x34c878(0x178)][_0x34c878(0x194)]('/universer-api/comment/unit/'+_0x38d430+_0x34c878(0x12b),{'body':_0x106d4f}),_0x4389ee=_0x5a4927[_0x34c878(0x18a)](_0x84d348=>G(_0x170061[_0x34c878(0x15b)][_0x34c878(0x140)][_0x84d348],_0x38d430,_0x46b484))[_0x34c878(0x16a)](Boolean);return Object[_0x34c878(0x181)](_0x170061['body']['users'])[_0x34c878(0x15a)](_0x5f3469=>{const _0x14d44c=_0x34c878;this[_0x14d44c(0x18d)][_0x14d44c(0x13e)](_0x5f3469);}),_0x4389ee;}[_0x2a77bb(0x14a)](_0x4d63e7){const _0x77ef2=_0x2a77bb;return{'id':_0x4d63e7['id'],'threadId':_0x4d63e7['threadId'],'ref':_0x4d63e7[_0x77ef2(0x15d)]};}};g=x([_(0x0,c[_0x2a77bb(0x171)](P[_0x2a77bb(0x17b)])),_(0x1,c[_0x2a77bb(0x171)](c[_0x2a77bb(0x159)])),_(0x2,c[_0x2a77bb(0x171)](b[_0x2a77bb(0x153)])),_(0x3,c[_0x2a77bb(0x171)](c[_0x2a77bb(0x13a)]))],g);var H=Object[_0x2a77bb(0x139)],J=(_0x4177ee,_0x4247be,_0x5b3993,_0x51d784)=>{const _0x419cd9=_0x2a77bb;for(var _0x43b43c=_0x51d784>0x1?void 0x0:_0x51d784?H(_0x4247be,_0x5b3993):_0x4247be,_0x3590c4=_0x4177ee[_0x419cd9(0x165)]-0x1,_0x1bbe9d;_0x3590c4>=0x0;_0x3590c4--)(_0x1bbe9d=_0x4177ee[_0x3590c4])&&(_0x43b43c=_0x1bbe9d(_0x43b43c)||_0x43b43c);return _0x43b43c;},y=(_0x34f6f3,_0x3b3600)=>(_0x33f73a,_0x35e480)=>_0x3b3600(_0x33f73a,_0x35e480,_0x34f6f3);function _0x38b2(){const _0x486d49=['add','/reply','Unknown','replies','_threadCommentModel','bufferTime','347907dLPcVx','CollaborationSessionService','/universer-api/comment/unit/','4398256iebtWU','threadId','commentUpdate$','replyId','UserManagerService','forEach','body','22746VKSAxq','ref','comment','get','deleteComment','_initUserSync','Delete','/edit','slice','length','_config','_init','stringify','format','filter','resolved','UniverCollaborationClientPlugin','defineProperty','CustomRangeType','content','symbol','Inject','_initDataSource','find','addComment','3283712eLjbev','296206uierJc','_configService','_httpService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','disposeWithMe','HTTPService','_threadCommentDataSource','OpenOrReOpen','rangeType','syncUpdateMutationToColla','delete','values','_sessionService','root','getUnit','Disposable','subscribe','setConfig','userId','listComments','map','COMMENT','customRanges','_userService','user','reply','resolveComment','parse','Edit','UNRECOGNIZED','post','requireSession','size','/delete','815cURpFM','UNIVER_UNKNOWN','getCurrentUser','solved','IConfigService','toStringTag','/list','dataSource','getUser','Solved','_commentService','pipe','thread-comment-data-source.config','type','rangeId','userID','9OSkQFo','_injector','103963ebxvso','Solve','getOwnPropertyDescriptor','Injector','2187063ppFTGg','UniverThreadCommentDataSourcePlugin','createTimestamp','addUser','Reply','comments','pluginName','getMemberID','/solved','updateComment','YYYY/MM/DD\x20HH:mm','code','UniverThreadCommentUIPlugin','Add','dayjs','saveCommentToSnapshot','error'];_0x38b2=function(){return _0x486d49;};return _0x38b2();}let C=class extends c[_0x2a77bb(0x185)]{constructor(_0xc46163,_0xf27941){const _0x3401b6=_0x2a77bb;super(),this['_threadCommentDataSourceService']=_0xc46163,this[_0x3401b6(0x17c)]=_0xf27941,this[_0x3401b6(0x172)]();}[_0x2a77bb(0x172)](){const _0x16c5cf=_0x2a77bb;this['_threadCommentDataSourceService'][_0x16c5cf(0x12c)]=this[_0x16c5cf(0x17c)],this['_threadCommentDataSourceService'][_0x16c5cf(0x17f)]=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c['Inject'](g))],C);var F=Object[_0x2a77bb(0x16d)],L=Object[_0x2a77bb(0x139)],Z=(_0xb921a4,_0x189203,_0x55c66d)=>_0x189203 in _0xb921a4?F(_0xb921a4,_0x189203,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x55c66d}):_0xb921a4[_0x189203]=_0x55c66d,W=(_0x2be208,_0x3db1e2,_0x520f4e,_0x1b9d56)=>{const _0x490b89=_0x2a77bb;for(var _0x8c3cc=_0x1b9d56>0x1?void 0x0:_0x1b9d56?L(_0x3db1e2,_0x520f4e):_0x3db1e2,_0x57e60c=_0x2be208[_0x490b89(0x165)]-0x1,_0x163d3e;_0x57e60c>=0x0;_0x57e60c--)(_0x163d3e=_0x2be208[_0x57e60c])&&(_0x8c3cc=_0x163d3e(_0x8c3cc)||_0x8c3cc);return _0x8c3cc;},O=(_0x5b94a7,_0x3530e2)=>(_0x3598d9,_0x3550b7)=>_0x3530e2(_0x3598d9,_0x3550b7,_0x5b94a7),N=(_0x176dee,_0x5653b2,_0x2c5d74)=>Z(_0x176dee,typeof _0x5653b2!=_0x2a77bb(0x170)?_0x5653b2+'':_0x5653b2,_0x2c5d74);exports['UniverThreadCommentDataSourcePlugin']=class extends c['Plugin']{constructor(_0x4adfb8=D,_0x11f0ac,_0x54e396){const _0x1eeca8=_0x2a77bb;super(),this['_config']=_0x4adfb8,this[_0x1eeca8(0x136)]=_0x11f0ac,this[_0x1eeca8(0x177)]=_0x54e396;const {..._0x2d1e05}=c['merge']({},D,this[_0x1eeca8(0x166)]);this['_configService'][_0x1eeca8(0x187)](q,_0x2d1e05);}['onStarting'](){const _0x59b32e=_0x2a77bb;[[g],[C],[p]][_0x59b32e(0x15a)](_0x26f876=>{const _0x2609c6=_0x59b32e;this[_0x2609c6(0x136)][_0x2609c6(0x14c)](_0x26f876);});}['onReady'](){const _0x52a84f=_0x2a77bb;this['_injector'][_0x52a84f(0x15f)](C),this[_0x52a84f(0x136)]['get'](p);}},N(exports[_0x2a77bb(0x13c)],_0x2a77bb(0x141),U),N(exports[_0x2a77bb(0x13c)],_0x2a77bb(0x132),c['UniverInstanceType'][_0x2a77bb(0x126)]),exports['UniverThreadCommentDataSourcePlugin']=W([c['DependentOn'](j[_0x2a77bb(0x147)],b[_0x2a77bb(0x16c)],T['UniverLicensePlugin']),O(0x1,c[_0x2a77bb(0x171)](c[_0x2a77bb(0x13a)])),O(0x2,c[_0x2a77bb(0x129)])],exports[_0x2a77bb(0x13c)]);
|
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
|
+
const _0x1ed600=_0x3490;(function(_0x12b8f5,_0x4b1007){const _0x383f1f=_0x3490,_0x395414=_0x12b8f5();while(!![]){try{const _0x4b5141=parseInt(_0x383f1f(0x131))/0x1+parseInt(_0x383f1f(0x186))/0x2+parseInt(_0x383f1f(0x183))/0x3+-parseInt(_0x383f1f(0x15d))/0x4*(parseInt(_0x383f1f(0x18e))/0x5)+parseInt(_0x383f1f(0x18f))/0x6*(parseInt(_0x383f1f(0x173))/0x7)+-parseInt(_0x383f1f(0x15f))/0x8+parseInt(_0x383f1f(0x149))/0x9;if(_0x4b5141===_0x4b1007)break;else _0x395414['push'](_0x395414['shift']());}catch(_0x4ea9fd){_0x395414['push'](_0x395414['shift']());}}}(_0x49c6,0xda12d));import{CommentService as _0x5b774a,CollaborationSessionService as _0x57b786,UniverCollaborationClientPlugin as _0x5eccf1}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x453405}from'@univerjs-pro/license';import{dayjs as _0x2a6e6e,UserManagerService as _0x2f6d8e,Inject as _0x2a9343,Injector as _0x3d4cc6,Disposable as _0xdbb1b8,CustomRangeType as _0x482cff,UniverInstanceType as _0x59e337,DependentOn as _0x97169e,IConfigService as _0x596e4c,Plugin as _0x199264,merge as _0x36a755}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5e203f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x337b2d,IThreadCommentDataSourceService as _0x18421a}from'@univerjs/thread-comment';import{bufferTime as _0x7138be}from'rxjs';import{HTTPService as _0x1ba376}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x27b2f0=>(_0x27b2f0[_0x27b2f0[_0x1ed600(0x175)]=0x0]=_0x1ed600(0x175),_0x27b2f0[_0x27b2f0['Solved']=0x1]='Solved',_0x27b2f0[_0x27b2f0[_0x1ed600(0x138)]=-0x1]=_0x1ed600(0x138),_0x27b2f0))(I||{}),v=(_0x5c0868=>(_0x5c0868[_0x5c0868[_0x1ed600(0x158)]=0x0]=_0x1ed600(0x158),_0x5c0868[_0x5c0868['Add']=0x1]=_0x1ed600(0x160),_0x5c0868[_0x5c0868[_0x1ed600(0x14f)]=0x2]=_0x1ed600(0x14f),_0x5c0868[_0x5c0868[_0x1ed600(0x161)]=0x3]=_0x1ed600(0x161),_0x5c0868[_0x5c0868[_0x1ed600(0x15e)]=0x4]='Delete',_0x5c0868[_0x5c0868[_0x1ed600(0x18a)]=0x5]=_0x1ed600(0x18a),_0x5c0868[_0x5c0868[_0x1ed600(0x138)]=-0x1]='UNRECOGNIZED',_0x5c0868))(v||{});const D=_0x34dbc0=>_0x2a6e6e(new Date(+_0x34dbc0))[_0x1ed600(0x143)](_0x1ed600(0x147)),B=async(_0x425e26,_0x558d61)=>{const _0x16b7ab=_0x1ed600,_0x513ebd=_0x425e26[_0x16b7ab(0x16e)](_0x2f6d8e),_0x5de6d9=_0x425e26['get'](_0x1ba376);_0x558d61['forEach'](_0x260823=>{const _0x483426=_0x16b7ab;_0x513ebd['getUser'](_0x260823)&&_0x558d61[_0x483426(0x179)](_0x260823);}),_0x558d61[_0x16b7ab(0x135)]&&(await _0x5de6d9[_0x16b7ab(0x16e)](_0x16b7ab(0x159),{'params':{'userIDs':[..._0x558d61]}}))[_0x16b7ab(0x13f)][_0x16b7ab(0x16d)][_0x16b7ab(0x150)](_0x423dba=>{const _0x36d783=_0x16b7ab;_0x423dba&&_0x513ebd[_0x36d783(0x17a)](_0x423dba);});};var K=Object[_0x1ed600(0x15b)],V=(_0x1824f8,_0x1b1472,_0x44487e,_0x39ac28)=>{const _0x3a07db=_0x1ed600;for(var _0x203d88=_0x39ac28>0x1?void 0x0:_0x39ac28?K(_0x1b1472,_0x44487e):_0x1b1472,_0x1193f2=_0x1824f8[_0x3a07db(0x174)]-0x1,_0x4b3abb;_0x1193f2>=0x0;_0x1193f2--)(_0x4b3abb=_0x1824f8[_0x1193f2])&&(_0x203d88=_0x4b3abb(_0x203d88)||_0x203d88);return _0x203d88;},p=(_0x11fb9f,_0x1cf7ac)=>(_0x2aa3b8,_0x21e9c9)=>_0x1cf7ac(_0x2aa3b8,_0x21e9c9,_0x11fb9f);let S=class extends _0xdbb1b8{constructor(_0x23be5c,_0x1bae32,_0x45fe33,_0x39f60f){const _0x4d3b3a=_0x1ed600;super(),this['_commentService']=_0x23be5c,this[_0x4d3b3a(0x165)]=_0x1bae32,this['_userService']=_0x45fe33,this[_0x4d3b3a(0x17c)]=_0x39f60f,this[_0x4d3b3a(0x153)](),this[_0x4d3b3a(0x18c)]();}['_initUserSync'](){const _0x34d650=_0x1ed600;this[_0x34d650(0x171)](this['_threadCommentModel'][_0x34d650(0x15c)][_0x34d650(0x142)](_0x7138be(0x10))[_0x34d650(0x12f)](_0x5daca6=>{const _0xd062d2=_0x34d650,_0x10efe1=new Set();_0x5daca6['forEach'](_0x31094c=>{const _0x24ec77=_0x3490;switch(_0x31094c['type']){case _0x24ec77(0x13e):{const _0x4f26aa=_0x31094c['payload'][_0x24ec77(0x176)];_0x10efe1[_0x24ec77(0x13e)](_0x4f26aa);break;}}}),B(this[_0xd062d2(0x17c)],_0x10efe1);}));}[_0x1ed600(0x153)](){const _0x22eae8=_0x1ed600;this[_0x22eae8(0x171)](this[_0x22eae8(0x16a)][_0x22eae8(0x15c)][_0x22eae8(0x12f)](async _0x2f820a=>{const _0xc689f3=_0x22eae8;var _0x39a21a,_0x4a4828,_0xbba37d,_0x59e0e5;const _0x5e2de8=(_0x39a21a=this[_0xc689f3(0x165)][_0xc689f3(0x164)](_0x2f820a[_0xc689f3(0x12d)])[_0xc689f3(0x181)](_0x1c3695=>_0x1c3695[_0xc689f3(0x132)]===_0x2f820a[_0xc689f3(0x132)]))==null?void 0x0:_0x39a21a[_0xc689f3(0x18b)];if(!_0x5e2de8)return;const {unitId:_0x2b8338,subUnitId:_0x4965e7}=_0x5e2de8;switch(_0x2f820a['user']&&this[_0xc689f3(0x146)]['addUser'](_0x2f820a[_0xc689f3(0x16c)]),_0x2f820a[_0xc689f3(0x178)]){case v[_0xc689f3(0x160)]:break;case v[_0xc689f3(0x14f)]:{this['_threadCommentModel']['addComment'](_0x2b8338,_0x4965e7,{'unitId':_0x2b8338,'subUnitId':_0x4965e7,'ref':'','id':_0x2f820a[_0xc689f3(0x167)],'dT':D(+_0x2f820a[_0xc689f3(0x148)]),'threadId':_0x2f820a['threadId'],'personId':(_0xbba37d=(_0x4a4828=_0x2f820a[_0xc689f3(0x16c)])==null?void 0x0:_0x4a4828[_0xc689f3(0x156)])!=null?_0xbba37d:_0x2f820a[_0xc689f3(0x17e)],'text':JSON['parse'](_0x2f820a[_0xc689f3(0x18d)]),'parentId':_0x5e2de8['id']});break;}case v['Delete']:{const _0x6d39e0=this[_0xc689f3(0x165)][_0xc689f3(0x154)](_0x2b8338,_0x4965e7,_0x2f820a['replyId']);_0x6d39e0&&_0x6d39e0['parentId']&&this[_0xc689f3(0x165)][_0xc689f3(0x14c)](_0x2b8338,_0x4965e7,_0x2f820a[_0xc689f3(0x167)]);break;}case v[_0xc689f3(0x161)]:{this[_0xc689f3(0x165)][_0xc689f3(0x16b)](_0x2b8338,_0x4965e7,{'commentId':_0x2f820a[_0xc689f3(0x167)],'text':JSON[_0xc689f3(0x133)](_0x2f820a[_0xc689f3(0x18d)])});break;}case v[_0xc689f3(0x18a)]:{const _0x592a40=(_0x59e0e5=this['_threadCommentModel']['getUnit'](_0x2f820a['unitId'])[_0xc689f3(0x181)](_0x1fc849=>_0x1fc849['threadId']===_0x2f820a[_0xc689f3(0x132)]))==null?void 0x0:_0x59e0e5[_0xc689f3(0x18b)];_0x592a40&&this[_0xc689f3(0x165)]['resolveComment'](_0x2b8338,_0x4965e7,_0x592a40['id'],_0x2f820a[_0xc689f3(0x13c)]===I[_0xc689f3(0x140)]);break;}}}));}};S=V([p(0x0,_0x2a9343(_0x5b774a)),p(0x1,_0x2a9343(_0x337b2d)),p(0x2,_0x2a9343(_0x2f6d8e)),p(0x3,_0x2a9343(_0x3d4cc6))],S);const z=_0x1ed600(0x189),M={};var k=Object[_0x1ed600(0x15b)],Q=(_0x9281a3,_0x30c0ef,_0x28579a,_0x46e18d)=>{const _0x77b759=_0x1ed600;for(var _0x364382=_0x46e18d>0x1?void 0x0:_0x46e18d?k(_0x30c0ef,_0x28579a):_0x30c0ef,_0x2a19e7=_0x9281a3[_0x77b759(0x174)]-0x1,_0x3c4a08;_0x2a19e7>=0x0;_0x2a19e7--)(_0x3c4a08=_0x9281a3[_0x2a19e7])&&(_0x364382=_0x3c4a08(_0x364382)||_0x364382);return _0x364382;},_=(_0xa89a8a,_0x92d4ed)=>(_0x560a47,_0x1d9102)=>_0x92d4ed(_0x560a47,_0x1d9102,_0xa89a8a);function X(_0x1112a4,_0x1c0fee){const _0x38d044=_0x1ed600,_0x212046=_0x1112a4[_0x38d044(0x166)][0x0];return{..._0x1c0fee,'id':_0x212046['replyId'],'resolved':_0x1112a4[_0x38d044(0x13c)]===0x1,'dT':D(_0x212046['createTimestamp']),'personId':_0x212046[_0x38d044(0x17e)],'threadId':_0x212046[_0x38d044(0x132)]};}function ee(_0x387b07,_0x4daa99,_0x2fb9bb){const _0x8f9a37=_0x1ed600;var _0x324dd8,_0x4be283;if(((_0x4be283=(_0x324dd8=_0x387b07==null?void 0x0:_0x387b07[_0x8f9a37(0x166)])==null?void 0x0:_0x324dd8['length'])!=null?_0x4be283:0x0)>0x0){const _0x1616bd=(_0x6242df,_0x201f75)=>({'id':_0x6242df[_0x8f9a37(0x167)],'threadId':_0x6242df[_0x8f9a37(0x132)],'dT':D(_0x6242df['createTimestamp']),'personId':_0x6242df['userId'],'resolved':_0x387b07[_0x8f9a37(0x13c)]===I['Solved'],'unitId':_0x4daa99,'subUnitId':_0x2fb9bb,'text':JSON[_0x8f9a37(0x133)](_0x6242df[_0x8f9a37(0x18d)]),'parentId':_0x201f75}),_0x30704b=_0x1616bd(_0x387b07[_0x8f9a37(0x166)][0x0]);return{..._0x30704b,'children':_0x387b07[_0x8f9a37(0x166)][_0x8f9a37(0x141)](0x1)[_0x8f9a37(0x17f)](_0x55940f=>_0x1616bd(_0x55940f,_0x30704b['id']))};}return null;}let f=class{constructor(_0x2fc876,_0x1bba5a,_0x183766,_0x14801d){const _0x4070f2=_0x1ed600;this[_0x4070f2(0x17d)]=_0x2fc876,this[_0x4070f2(0x146)]=_0x1bba5a,this['_sessionService']=_0x183766,this[_0x4070f2(0x17c)]=_0x14801d;}async[_0x1ed600(0x13a)](_0x166bde){const _0x2041db=_0x1ed600;var _0x5c1515,_0xbd4d96;const {parentId:_0x3af102,unitId:_0x467252,text:_0x12559d,threadId:_0x20d3e0}=_0x166bde,_0x43cab8=(_0xbd4d96=(_0x5c1515=_0x12559d[_0x2041db(0x137)])==null?void 0x0:_0x5c1515[_0x2041db(0x14b)](_0x36f6fc=>_0x36f6fc[_0x2041db(0x185)]===_0x482cff[_0x2041db(0x134)])[_0x2041db(0x17f)](_0x545215=>_0x545215['rangeId']))!=null?_0xbd4d96:[],_0x19566a=JSON[_0x2041db(0x170)](_0x12559d),_0x3384e7=(await this[_0x2041db(0x145)][_0x2041db(0x130)](_0x467252))[_0x2041db(0x14e)]();if(_0x3af102){const _0x1ed23e={'memberId':_0x3384e7,'unitId':_0x467252,'content':_0x19566a,'mention':_0x43cab8,'threadId':_0x20d3e0},_0x33ac57=(await this[_0x2041db(0x17d)][_0x2041db(0x139)]('/universer-api/comment/unit/'+_0x467252+_0x2041db(0x144),{'body':_0x1ed23e}))[_0x2041db(0x13f)][_0x2041db(0x190)];return{..._0x166bde,'id':_0x33ac57[_0x2041db(0x167)],'dT':_0x2a6e6e(+_0x33ac57[_0x2041db(0x148)])[_0x2041db(0x143)](_0x2041db(0x147)),'personId':_0x33ac57[_0x2041db(0x17e)]};}else{const _0x1e19f7={'memberId':_0x3384e7,'unitId':_0x467252,'content':_0x19566a,'mention':_0x43cab8},_0x5ebb8a=await this[_0x2041db(0x17d)][_0x2041db(0x139)]('/universer-api/comment/unit/'+_0x467252+_0x2041db(0x15a),{'body':_0x1e19f7});return X(_0x5ebb8a[_0x2041db(0x13f)][_0x2041db(0x17b)],_0x166bde);}}async[_0x1ed600(0x16b)](_0x3711f3){const _0xf7b8c=_0x1ed600;var _0x403f4d,_0x9d2039;const {text:_0x5b43a3,unitId:_0x1aafd9}=_0x3711f3,_0x571a94=(_0x9d2039=(_0x403f4d=_0x5b43a3['customRanges'])==null?void 0x0:_0x403f4d['filter'](_0x3df4da=>_0x3df4da['rangeType']===_0x482cff[_0xf7b8c(0x134)])[_0xf7b8c(0x17f)](_0x5a7b79=>_0x5a7b79[_0xf7b8c(0x162)]))!=null?_0x9d2039:[],_0x38544f=JSON[_0xf7b8c(0x170)](_0x5b43a3),_0x2f56fd=_0x3711f3[_0xf7b8c(0x132)],_0x135189=_0x3711f3['id'],_0x10b6f9={'memberId':(await this[_0xf7b8c(0x145)][_0xf7b8c(0x130)](_0x1aafd9))['getMemberID'](),'unitId':_0x1aafd9,'threadId':_0x2f56fd,'mention':_0x571a94,'content':_0x38544f,'replyId':_0x135189},_0x1be9a8=await this[_0xf7b8c(0x17d)][_0xf7b8c(0x139)](_0xf7b8c(0x168)+_0x1aafd9+_0xf7b8c(0x14a),{'body':_0x10b6f9});return!_0x1be9a8['body'][_0xf7b8c(0x12e)]||_0x1be9a8['body'][_0xf7b8c(0x12e)]['code']===0x1;}async['resolveComment'](_0xdfe9c5){const _0x463072=_0x1ed600,{unitId:_0x1c7316}=_0xdfe9c5,_0x56781c=_0xdfe9c5[_0x463072(0x132)],_0x333d11={'memberId':this[_0x463072(0x146)][_0x463072(0x13b)]()[_0x463072(0x156)],'unitId':_0x1c7316,'threadId':_0x56781c,'solved':_0xdfe9c5[_0x463072(0x188)]?I[_0x463072(0x140)]:I[_0x463072(0x175)]},_0x4543ff=await this['_httpService']['post'](_0x463072(0x168)+_0x1c7316+_0x463072(0x184),{'body':_0x333d11});return!_0x4543ff[_0x463072(0x13f)][_0x463072(0x12e)]||_0x4543ff[_0x463072(0x13f)][_0x463072(0x12e)]['code']===0x1;}async[_0x1ed600(0x14c)](_0x483430,_0x29690e,_0x3266d4,_0x4b1388){const _0x4f0448=_0x1ed600,_0x321720={'memberId':(await this[_0x4f0448(0x145)][_0x4f0448(0x130)](_0x483430))[_0x4f0448(0x14e)](),'threadId':_0x3266d4,'replyId':_0x4b1388,'unitId':_0x483430},_0x431519=await this[_0x4f0448(0x17d)]['post'](_0x4f0448(0x168)+_0x483430+_0x4f0448(0x155),{'body':_0x321720});return!_0x431519[_0x4f0448(0x13f)][_0x4f0448(0x12e)]||_0x431519['body'][_0x4f0448(0x12e)]['code']===0x1;}async['listComments'](_0x2b7d31,_0x18e59b,_0xcdaaaf){const _0x356b10=_0x1ed600,_0x3114cc={'unitId':_0x2b7d31,'threadId':_0xcdaaaf},_0x470fcf=await this[_0x356b10(0x17d)]['post'](_0x356b10(0x168)+_0x2b7d31+_0x356b10(0x14d),{'body':_0x3114cc}),_0x34bbd2=_0xcdaaaf[_0x356b10(0x17f)](_0x518a74=>ee(_0x470fcf[_0x356b10(0x13f)][_0x356b10(0x157)][_0x518a74],_0x2b7d31,_0x18e59b))[_0x356b10(0x14b)](Boolean);return Object[_0x356b10(0x182)](_0x470fcf[_0x356b10(0x13f)][_0x356b10(0x16d)])[_0x356b10(0x150)](_0x8f8e46=>{const _0x556fc4=_0x356b10;this[_0x556fc4(0x146)]['addUser'](_0x8f8e46);}),_0x34bbd2;}['saveCommentToSnapshot'](_0x92e8bc){const _0x2efc7c=_0x1ed600;return{'id':_0x92e8bc['id'],'threadId':_0x92e8bc['threadId'],'ref':_0x92e8bc[_0x2efc7c(0x187)]};}};f=Q([_(0x0,_0x2a9343(_0x1ba376)),_(0x1,_0x2a9343(_0x2f6d8e)),_(0x2,_0x2a9343(_0x57b786)),_(0x3,_0x2a9343(_0x3d4cc6))],f);function _0x3490(_0x5c9541,_0x1f613f){const _0x49c67a=_0x49c6();return _0x3490=function(_0x3490ae,_0x15fb01){_0x3490ae=_0x3490ae-0x12d;let _0x588f54=_0x49c67a[_0x3490ae];return _0x588f54;},_0x3490(_0x5c9541,_0x1f613f);}var re=Object[_0x1ed600(0x15b)],te=(_0x5fe07d,_0x4b4fb0,_0x33f062,_0x284796)=>{for(var _0x4da168=_0x284796>0x1?void 0x0:_0x284796?re(_0x4b4fb0,_0x33f062):_0x4b4fb0,_0x272b28=_0x5fe07d['length']-0x1,_0x5415d5;_0x272b28>=0x0;_0x272b28--)(_0x5415d5=_0x5fe07d[_0x272b28])&&(_0x4da168=_0x5415d5(_0x4da168)||_0x4da168);return _0x4da168;},N=(_0x28b7e4,_0x1e53c1)=>(_0x26a9cf,_0x57b27f)=>_0x1e53c1(_0x26a9cf,_0x57b27f,_0x28b7e4);function _0x49c6(){const _0x240421=['pipe','format','/reply','_sessionService','_userService','YYYY/MM/DD\x20HH:mm','createTimestamp','3155400AZsktE','/edit','filter','deleteComment','/list','getMemberID','Reply','forEach','onStarting','pluginName','_init','getComment','/delete','userID','comments','Unknown','/universer-api/user/list','/add','getOwnPropertyDescriptor','commentUpdate$','2542796UJwTdK','Delete','14275320uucMez','Add','Edit','rangeId','_initDataSource','getUnit','_threadCommentModel','replies','replyId','/universer-api/comment/unit/','dataSource','_commentService','updateComment','user','users','get','_threadCommentDataSourceService','stringify','disposeWithMe','setConfig','7VBgKFz','length','OpenOrReOpen','personId','_configService','type','delete','addUser','comment','_injector','_httpService','userId','map','syncUpdateMutationToColla','find','values','4044471gSiUVA','/solved','rangeType','917202rtjbey','ref','resolved','thread-comment-data-source.config','Solve','root','_initUserSync','content','10qEpwPg','2880330mDPZPB','reply','unitId','error','subscribe','requireSession','1311629PFAvTM','threadId','parse','COMMENT','size','defineProperty','customRanges','UNRECOGNIZED','post','addComment','getCurrentUser','solved','_threadCommentDataSource','add','body','Solved','slice'];_0x49c6=function(){return _0x240421;};return _0x49c6();}let g=class extends _0xdbb1b8{constructor(_0x256151,_0xff7432){const _0x24a9ea=_0x1ed600;super(),this[_0x24a9ea(0x16f)]=_0x256151,this[_0x24a9ea(0x13d)]=_0xff7432,this[_0x24a9ea(0x163)]();}[_0x1ed600(0x163)](){const _0x2797a2=_0x1ed600;this[_0x2797a2(0x16f)][_0x2797a2(0x169)]=this[_0x2797a2(0x13d)],this[_0x2797a2(0x16f)][_0x2797a2(0x180)]=!0x1;}};g=te([N(0x0,_0x18421a),N(0x1,_0x2a9343(f))],g);var se=Object[_0x1ed600(0x136)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x55fb26,_0x46013c,_0x3522e2)=>_0x46013c in _0x55fb26?se(_0x55fb26,_0x46013c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3522e2}):_0x55fb26[_0x46013c]=_0x3522e2,ie=(_0x32891a,_0x1316e6,_0x2c0cc3,_0x22736b)=>{const _0x40664d=_0x1ed600;for(var _0x4e5973=_0x22736b>0x1?void 0x0:_0x22736b?oe(_0x1316e6,_0x2c0cc3):_0x1316e6,_0x232ffd=_0x32891a[_0x40664d(0x174)]-0x1,_0x111ef2;_0x232ffd>=0x0;_0x232ffd--)(_0x111ef2=_0x32891a[_0x232ffd])&&(_0x4e5973=_0x111ef2(_0x4e5973)||_0x4e5973);return _0x4e5973;},w=(_0xa4abe8,_0x44cccb)=>(_0x411bb5,_0x166067)=>_0x44cccb(_0x411bb5,_0x166067,_0xa4abe8),$=(_0x54000e,_0x412f11,_0x2421a9)=>ne(_0x54000e,typeof _0x412f11!='symbol'?_0x412f11+'':_0x412f11,_0x2421a9);let b=class extends _0x199264{constructor(_0x4877fe=M,_0x28972e,_0x2cf9aa){const _0x1d3ceb=_0x1ed600;super(),this['_config']=_0x4877fe,this['_injector']=_0x28972e,this[_0x1d3ceb(0x177)]=_0x2cf9aa;const {..._0x1dcb03}=_0x36a755({},M,this['_config']);this[_0x1d3ceb(0x177)][_0x1d3ceb(0x172)](z,_0x1dcb03);}[_0x1ed600(0x151)](){const _0x5d50f0=_0x1ed600;[[f],[g],[S]][_0x5d50f0(0x150)](_0x103467=>{const _0x3447d5=_0x5d50f0;this['_injector'][_0x3447d5(0x13e)](_0x103467);});}['onReady'](){const _0x21a4a4=_0x1ed600;this[_0x21a4a4(0x17c)][_0x21a4a4(0x16e)](g),this[_0x21a4a4(0x17c)]['get'](S);}};$(b,_0x1ed600(0x152),W),$(b,_0x1ed600(0x178),_0x59e337['UNIVER_UNKNOWN']),b=ie([_0x97169e(_0x5e203f,_0x5eccf1,_0x453405),w(0x1,_0x2a9343(_0x3d4cc6)),w(0x2,_0x596e4c)],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
|
+
const _0x1ed600=_0x3490;(function(_0x12b8f5,_0x4b1007){const _0x383f1f=_0x3490,_0x395414=_0x12b8f5();while(!![]){try{const _0x4b5141=parseInt(_0x383f1f(0x131))/0x1+parseInt(_0x383f1f(0x186))/0x2+parseInt(_0x383f1f(0x183))/0x3+-parseInt(_0x383f1f(0x15d))/0x4*(parseInt(_0x383f1f(0x18e))/0x5)+parseInt(_0x383f1f(0x18f))/0x6*(parseInt(_0x383f1f(0x173))/0x7)+-parseInt(_0x383f1f(0x15f))/0x8+parseInt(_0x383f1f(0x149))/0x9;if(_0x4b5141===_0x4b1007)break;else _0x395414['push'](_0x395414['shift']());}catch(_0x4ea9fd){_0x395414['push'](_0x395414['shift']());}}}(_0x49c6,0xda12d));import{CommentService as _0x5b774a,CollaborationSessionService as _0x57b786,UniverCollaborationClientPlugin as _0x5eccf1}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x453405}from'@univerjs-pro/license';import{dayjs as _0x2a6e6e,UserManagerService as _0x2f6d8e,Inject as _0x2a9343,Injector as _0x3d4cc6,Disposable as _0xdbb1b8,CustomRangeType as _0x482cff,UniverInstanceType as _0x59e337,DependentOn as _0x97169e,IConfigService as _0x596e4c,Plugin as _0x199264,merge as _0x36a755}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x5e203f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x337b2d,IThreadCommentDataSourceService as _0x18421a}from'@univerjs/thread-comment';import{bufferTime as _0x7138be}from'rxjs';import{HTTPService as _0x1ba376}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x27b2f0=>(_0x27b2f0[_0x27b2f0[_0x1ed600(0x175)]=0x0]=_0x1ed600(0x175),_0x27b2f0[_0x27b2f0['Solved']=0x1]='Solved',_0x27b2f0[_0x27b2f0[_0x1ed600(0x138)]=-0x1]=_0x1ed600(0x138),_0x27b2f0))(I||{}),v=(_0x5c0868=>(_0x5c0868[_0x5c0868[_0x1ed600(0x158)]=0x0]=_0x1ed600(0x158),_0x5c0868[_0x5c0868['Add']=0x1]=_0x1ed600(0x160),_0x5c0868[_0x5c0868[_0x1ed600(0x14f)]=0x2]=_0x1ed600(0x14f),_0x5c0868[_0x5c0868[_0x1ed600(0x161)]=0x3]=_0x1ed600(0x161),_0x5c0868[_0x5c0868[_0x1ed600(0x15e)]=0x4]='Delete',_0x5c0868[_0x5c0868[_0x1ed600(0x18a)]=0x5]=_0x1ed600(0x18a),_0x5c0868[_0x5c0868[_0x1ed600(0x138)]=-0x1]='UNRECOGNIZED',_0x5c0868))(v||{});const D=_0x34dbc0=>_0x2a6e6e(new Date(+_0x34dbc0))[_0x1ed600(0x143)](_0x1ed600(0x147)),B=async(_0x425e26,_0x558d61)=>{const _0x16b7ab=_0x1ed600,_0x513ebd=_0x425e26[_0x16b7ab(0x16e)](_0x2f6d8e),_0x5de6d9=_0x425e26['get'](_0x1ba376);_0x558d61['forEach'](_0x260823=>{const _0x483426=_0x16b7ab;_0x513ebd['getUser'](_0x260823)&&_0x558d61[_0x483426(0x179)](_0x260823);}),_0x558d61[_0x16b7ab(0x135)]&&(await _0x5de6d9[_0x16b7ab(0x16e)](_0x16b7ab(0x159),{'params':{'userIDs':[..._0x558d61]}}))[_0x16b7ab(0x13f)][_0x16b7ab(0x16d)][_0x16b7ab(0x150)](_0x423dba=>{const _0x36d783=_0x16b7ab;_0x423dba&&_0x513ebd[_0x36d783(0x17a)](_0x423dba);});};var K=Object[_0x1ed600(0x15b)],V=(_0x1824f8,_0x1b1472,_0x44487e,_0x39ac28)=>{const _0x3a07db=_0x1ed600;for(var _0x203d88=_0x39ac28>0x1?void 0x0:_0x39ac28?K(_0x1b1472,_0x44487e):_0x1b1472,_0x1193f2=_0x1824f8[_0x3a07db(0x174)]-0x1,_0x4b3abb;_0x1193f2>=0x0;_0x1193f2--)(_0x4b3abb=_0x1824f8[_0x1193f2])&&(_0x203d88=_0x4b3abb(_0x203d88)||_0x203d88);return _0x203d88;},p=(_0x11fb9f,_0x1cf7ac)=>(_0x2aa3b8,_0x21e9c9)=>_0x1cf7ac(_0x2aa3b8,_0x21e9c9,_0x11fb9f);let S=class extends _0xdbb1b8{constructor(_0x23be5c,_0x1bae32,_0x45fe33,_0x39f60f){const _0x4d3b3a=_0x1ed600;super(),this['_commentService']=_0x23be5c,this[_0x4d3b3a(0x165)]=_0x1bae32,this['_userService']=_0x45fe33,this[_0x4d3b3a(0x17c)]=_0x39f60f,this[_0x4d3b3a(0x153)](),this[_0x4d3b3a(0x18c)]();}['_initUserSync'](){const _0x34d650=_0x1ed600;this[_0x34d650(0x171)](this['_threadCommentModel'][_0x34d650(0x15c)][_0x34d650(0x142)](_0x7138be(0x10))[_0x34d650(0x12f)](_0x5daca6=>{const _0xd062d2=_0x34d650,_0x10efe1=new Set();_0x5daca6['forEach'](_0x31094c=>{const _0x24ec77=_0x3490;switch(_0x31094c['type']){case _0x24ec77(0x13e):{const _0x4f26aa=_0x31094c['payload'][_0x24ec77(0x176)];_0x10efe1[_0x24ec77(0x13e)](_0x4f26aa);break;}}}),B(this[_0xd062d2(0x17c)],_0x10efe1);}));}[_0x1ed600(0x153)](){const _0x22eae8=_0x1ed600;this[_0x22eae8(0x171)](this[_0x22eae8(0x16a)][_0x22eae8(0x15c)][_0x22eae8(0x12f)](async _0x2f820a=>{const _0xc689f3=_0x22eae8;var _0x39a21a,_0x4a4828,_0xbba37d,_0x59e0e5;const _0x5e2de8=(_0x39a21a=this[_0xc689f3(0x165)][_0xc689f3(0x164)](_0x2f820a[_0xc689f3(0x12d)])[_0xc689f3(0x181)](_0x1c3695=>_0x1c3695[_0xc689f3(0x132)]===_0x2f820a[_0xc689f3(0x132)]))==null?void 0x0:_0x39a21a[_0xc689f3(0x18b)];if(!_0x5e2de8)return;const {unitId:_0x2b8338,subUnitId:_0x4965e7}=_0x5e2de8;switch(_0x2f820a['user']&&this[_0xc689f3(0x146)]['addUser'](_0x2f820a[_0xc689f3(0x16c)]),_0x2f820a[_0xc689f3(0x178)]){case v[_0xc689f3(0x160)]:break;case v[_0xc689f3(0x14f)]:{this['_threadCommentModel']['addComment'](_0x2b8338,_0x4965e7,{'unitId':_0x2b8338,'subUnitId':_0x4965e7,'ref':'','id':_0x2f820a[_0xc689f3(0x167)],'dT':D(+_0x2f820a[_0xc689f3(0x148)]),'threadId':_0x2f820a['threadId'],'personId':(_0xbba37d=(_0x4a4828=_0x2f820a[_0xc689f3(0x16c)])==null?void 0x0:_0x4a4828[_0xc689f3(0x156)])!=null?_0xbba37d:_0x2f820a[_0xc689f3(0x17e)],'text':JSON['parse'](_0x2f820a[_0xc689f3(0x18d)]),'parentId':_0x5e2de8['id']});break;}case v['Delete']:{const _0x6d39e0=this[_0xc689f3(0x165)][_0xc689f3(0x154)](_0x2b8338,_0x4965e7,_0x2f820a['replyId']);_0x6d39e0&&_0x6d39e0['parentId']&&this[_0xc689f3(0x165)][_0xc689f3(0x14c)](_0x2b8338,_0x4965e7,_0x2f820a[_0xc689f3(0x167)]);break;}case v[_0xc689f3(0x161)]:{this[_0xc689f3(0x165)][_0xc689f3(0x16b)](_0x2b8338,_0x4965e7,{'commentId':_0x2f820a[_0xc689f3(0x167)],'text':JSON[_0xc689f3(0x133)](_0x2f820a[_0xc689f3(0x18d)])});break;}case v[_0xc689f3(0x18a)]:{const _0x592a40=(_0x59e0e5=this['_threadCommentModel']['getUnit'](_0x2f820a['unitId'])[_0xc689f3(0x181)](_0x1fc849=>_0x1fc849['threadId']===_0x2f820a[_0xc689f3(0x132)]))==null?void 0x0:_0x59e0e5[_0xc689f3(0x18b)];_0x592a40&&this[_0xc689f3(0x165)]['resolveComment'](_0x2b8338,_0x4965e7,_0x592a40['id'],_0x2f820a[_0xc689f3(0x13c)]===I[_0xc689f3(0x140)]);break;}}}));}};S=V([p(0x0,_0x2a9343(_0x5b774a)),p(0x1,_0x2a9343(_0x337b2d)),p(0x2,_0x2a9343(_0x2f6d8e)),p(0x3,_0x2a9343(_0x3d4cc6))],S);const z=_0x1ed600(0x189),M={};var k=Object[_0x1ed600(0x15b)],Q=(_0x9281a3,_0x30c0ef,_0x28579a,_0x46e18d)=>{const _0x77b759=_0x1ed600;for(var _0x364382=_0x46e18d>0x1?void 0x0:_0x46e18d?k(_0x30c0ef,_0x28579a):_0x30c0ef,_0x2a19e7=_0x9281a3[_0x77b759(0x174)]-0x1,_0x3c4a08;_0x2a19e7>=0x0;_0x2a19e7--)(_0x3c4a08=_0x9281a3[_0x2a19e7])&&(_0x364382=_0x3c4a08(_0x364382)||_0x364382);return _0x364382;},_=(_0xa89a8a,_0x92d4ed)=>(_0x560a47,_0x1d9102)=>_0x92d4ed(_0x560a47,_0x1d9102,_0xa89a8a);function X(_0x1112a4,_0x1c0fee){const _0x38d044=_0x1ed600,_0x212046=_0x1112a4[_0x38d044(0x166)][0x0];return{..._0x1c0fee,'id':_0x212046['replyId'],'resolved':_0x1112a4[_0x38d044(0x13c)]===0x1,'dT':D(_0x212046['createTimestamp']),'personId':_0x212046[_0x38d044(0x17e)],'threadId':_0x212046[_0x38d044(0x132)]};}function ee(_0x387b07,_0x4daa99,_0x2fb9bb){const _0x8f9a37=_0x1ed600;var _0x324dd8,_0x4be283;if(((_0x4be283=(_0x324dd8=_0x387b07==null?void 0x0:_0x387b07[_0x8f9a37(0x166)])==null?void 0x0:_0x324dd8['length'])!=null?_0x4be283:0x0)>0x0){const _0x1616bd=(_0x6242df,_0x201f75)=>({'id':_0x6242df[_0x8f9a37(0x167)],'threadId':_0x6242df[_0x8f9a37(0x132)],'dT':D(_0x6242df['createTimestamp']),'personId':_0x6242df['userId'],'resolved':_0x387b07[_0x8f9a37(0x13c)]===I['Solved'],'unitId':_0x4daa99,'subUnitId':_0x2fb9bb,'text':JSON[_0x8f9a37(0x133)](_0x6242df[_0x8f9a37(0x18d)]),'parentId':_0x201f75}),_0x30704b=_0x1616bd(_0x387b07[_0x8f9a37(0x166)][0x0]);return{..._0x30704b,'children':_0x387b07[_0x8f9a37(0x166)][_0x8f9a37(0x141)](0x1)[_0x8f9a37(0x17f)](_0x55940f=>_0x1616bd(_0x55940f,_0x30704b['id']))};}return null;}let f=class{constructor(_0x2fc876,_0x1bba5a,_0x183766,_0x14801d){const _0x4070f2=_0x1ed600;this[_0x4070f2(0x17d)]=_0x2fc876,this[_0x4070f2(0x146)]=_0x1bba5a,this['_sessionService']=_0x183766,this[_0x4070f2(0x17c)]=_0x14801d;}async[_0x1ed600(0x13a)](_0x166bde){const _0x2041db=_0x1ed600;var _0x5c1515,_0xbd4d96;const {parentId:_0x3af102,unitId:_0x467252,text:_0x12559d,threadId:_0x20d3e0}=_0x166bde,_0x43cab8=(_0xbd4d96=(_0x5c1515=_0x12559d[_0x2041db(0x137)])==null?void 0x0:_0x5c1515[_0x2041db(0x14b)](_0x36f6fc=>_0x36f6fc[_0x2041db(0x185)]===_0x482cff[_0x2041db(0x134)])[_0x2041db(0x17f)](_0x545215=>_0x545215['rangeId']))!=null?_0xbd4d96:[],_0x19566a=JSON[_0x2041db(0x170)](_0x12559d),_0x3384e7=(await this[_0x2041db(0x145)][_0x2041db(0x130)](_0x467252))[_0x2041db(0x14e)]();if(_0x3af102){const _0x1ed23e={'memberId':_0x3384e7,'unitId':_0x467252,'content':_0x19566a,'mention':_0x43cab8,'threadId':_0x20d3e0},_0x33ac57=(await this[_0x2041db(0x17d)][_0x2041db(0x139)]('/universer-api/comment/unit/'+_0x467252+_0x2041db(0x144),{'body':_0x1ed23e}))[_0x2041db(0x13f)][_0x2041db(0x190)];return{..._0x166bde,'id':_0x33ac57[_0x2041db(0x167)],'dT':_0x2a6e6e(+_0x33ac57[_0x2041db(0x148)])[_0x2041db(0x143)](_0x2041db(0x147)),'personId':_0x33ac57[_0x2041db(0x17e)]};}else{const _0x1e19f7={'memberId':_0x3384e7,'unitId':_0x467252,'content':_0x19566a,'mention':_0x43cab8},_0x5ebb8a=await this[_0x2041db(0x17d)][_0x2041db(0x139)]('/universer-api/comment/unit/'+_0x467252+_0x2041db(0x15a),{'body':_0x1e19f7});return X(_0x5ebb8a[_0x2041db(0x13f)][_0x2041db(0x17b)],_0x166bde);}}async[_0x1ed600(0x16b)](_0x3711f3){const _0xf7b8c=_0x1ed600;var _0x403f4d,_0x9d2039;const {text:_0x5b43a3,unitId:_0x1aafd9}=_0x3711f3,_0x571a94=(_0x9d2039=(_0x403f4d=_0x5b43a3['customRanges'])==null?void 0x0:_0x403f4d['filter'](_0x3df4da=>_0x3df4da['rangeType']===_0x482cff[_0xf7b8c(0x134)])[_0xf7b8c(0x17f)](_0x5a7b79=>_0x5a7b79[_0xf7b8c(0x162)]))!=null?_0x9d2039:[],_0x38544f=JSON[_0xf7b8c(0x170)](_0x5b43a3),_0x2f56fd=_0x3711f3[_0xf7b8c(0x132)],_0x135189=_0x3711f3['id'],_0x10b6f9={'memberId':(await this[_0xf7b8c(0x145)][_0xf7b8c(0x130)](_0x1aafd9))['getMemberID'](),'unitId':_0x1aafd9,'threadId':_0x2f56fd,'mention':_0x571a94,'content':_0x38544f,'replyId':_0x135189},_0x1be9a8=await this[_0xf7b8c(0x17d)][_0xf7b8c(0x139)](_0xf7b8c(0x168)+_0x1aafd9+_0xf7b8c(0x14a),{'body':_0x10b6f9});return!_0x1be9a8['body'][_0xf7b8c(0x12e)]||_0x1be9a8['body'][_0xf7b8c(0x12e)]['code']===0x1;}async['resolveComment'](_0xdfe9c5){const _0x463072=_0x1ed600,{unitId:_0x1c7316}=_0xdfe9c5,_0x56781c=_0xdfe9c5[_0x463072(0x132)],_0x333d11={'memberId':this[_0x463072(0x146)][_0x463072(0x13b)]()[_0x463072(0x156)],'unitId':_0x1c7316,'threadId':_0x56781c,'solved':_0xdfe9c5[_0x463072(0x188)]?I[_0x463072(0x140)]:I[_0x463072(0x175)]},_0x4543ff=await this['_httpService']['post'](_0x463072(0x168)+_0x1c7316+_0x463072(0x184),{'body':_0x333d11});return!_0x4543ff[_0x463072(0x13f)][_0x463072(0x12e)]||_0x4543ff[_0x463072(0x13f)][_0x463072(0x12e)]['code']===0x1;}async[_0x1ed600(0x14c)](_0x483430,_0x29690e,_0x3266d4,_0x4b1388){const _0x4f0448=_0x1ed600,_0x321720={'memberId':(await this[_0x4f0448(0x145)][_0x4f0448(0x130)](_0x483430))[_0x4f0448(0x14e)](),'threadId':_0x3266d4,'replyId':_0x4b1388,'unitId':_0x483430},_0x431519=await this[_0x4f0448(0x17d)]['post'](_0x4f0448(0x168)+_0x483430+_0x4f0448(0x155),{'body':_0x321720});return!_0x431519[_0x4f0448(0x13f)][_0x4f0448(0x12e)]||_0x431519['body'][_0x4f0448(0x12e)]['code']===0x1;}async['listComments'](_0x2b7d31,_0x18e59b,_0xcdaaaf){const _0x356b10=_0x1ed600,_0x3114cc={'unitId':_0x2b7d31,'threadId':_0xcdaaaf},_0x470fcf=await this[_0x356b10(0x17d)]['post'](_0x356b10(0x168)+_0x2b7d31+_0x356b10(0x14d),{'body':_0x3114cc}),_0x34bbd2=_0xcdaaaf[_0x356b10(0x17f)](_0x518a74=>ee(_0x470fcf[_0x356b10(0x13f)][_0x356b10(0x157)][_0x518a74],_0x2b7d31,_0x18e59b))[_0x356b10(0x14b)](Boolean);return Object[_0x356b10(0x182)](_0x470fcf[_0x356b10(0x13f)][_0x356b10(0x16d)])[_0x356b10(0x150)](_0x8f8e46=>{const _0x556fc4=_0x356b10;this[_0x556fc4(0x146)]['addUser'](_0x8f8e46);}),_0x34bbd2;}['saveCommentToSnapshot'](_0x92e8bc){const _0x2efc7c=_0x1ed600;return{'id':_0x92e8bc['id'],'threadId':_0x92e8bc['threadId'],'ref':_0x92e8bc[_0x2efc7c(0x187)]};}};f=Q([_(0x0,_0x2a9343(_0x1ba376)),_(0x1,_0x2a9343(_0x2f6d8e)),_(0x2,_0x2a9343(_0x57b786)),_(0x3,_0x2a9343(_0x3d4cc6))],f);function _0x3490(_0x5c9541,_0x1f613f){const _0x49c67a=_0x49c6();return _0x3490=function(_0x3490ae,_0x15fb01){_0x3490ae=_0x3490ae-0x12d;let _0x588f54=_0x49c67a[_0x3490ae];return _0x588f54;},_0x3490(_0x5c9541,_0x1f613f);}var re=Object[_0x1ed600(0x15b)],te=(_0x5fe07d,_0x4b4fb0,_0x33f062,_0x284796)=>{for(var _0x4da168=_0x284796>0x1?void 0x0:_0x284796?re(_0x4b4fb0,_0x33f062):_0x4b4fb0,_0x272b28=_0x5fe07d['length']-0x1,_0x5415d5;_0x272b28>=0x0;_0x272b28--)(_0x5415d5=_0x5fe07d[_0x272b28])&&(_0x4da168=_0x5415d5(_0x4da168)||_0x4da168);return _0x4da168;},N=(_0x28b7e4,_0x1e53c1)=>(_0x26a9cf,_0x57b27f)=>_0x1e53c1(_0x26a9cf,_0x57b27f,_0x28b7e4);function _0x49c6(){const _0x240421=['pipe','format','/reply','_sessionService','_userService','YYYY/MM/DD\x20HH:mm','createTimestamp','3155400AZsktE','/edit','filter','deleteComment','/list','getMemberID','Reply','forEach','onStarting','pluginName','_init','getComment','/delete','userID','comments','Unknown','/universer-api/user/list','/add','getOwnPropertyDescriptor','commentUpdate$','2542796UJwTdK','Delete','14275320uucMez','Add','Edit','rangeId','_initDataSource','getUnit','_threadCommentModel','replies','replyId','/universer-api/comment/unit/','dataSource','_commentService','updateComment','user','users','get','_threadCommentDataSourceService','stringify','disposeWithMe','setConfig','7VBgKFz','length','OpenOrReOpen','personId','_configService','type','delete','addUser','comment','_injector','_httpService','userId','map','syncUpdateMutationToColla','find','values','4044471gSiUVA','/solved','rangeType','917202rtjbey','ref','resolved','thread-comment-data-source.config','Solve','root','_initUserSync','content','10qEpwPg','2880330mDPZPB','reply','unitId','error','subscribe','requireSession','1311629PFAvTM','threadId','parse','COMMENT','size','defineProperty','customRanges','UNRECOGNIZED','post','addComment','getCurrentUser','solved','_threadCommentDataSource','add','body','Solved','slice'];_0x49c6=function(){return _0x240421;};return _0x49c6();}let g=class extends _0xdbb1b8{constructor(_0x256151,_0xff7432){const _0x24a9ea=_0x1ed600;super(),this[_0x24a9ea(0x16f)]=_0x256151,this[_0x24a9ea(0x13d)]=_0xff7432,this[_0x24a9ea(0x163)]();}[_0x1ed600(0x163)](){const _0x2797a2=_0x1ed600;this[_0x2797a2(0x16f)][_0x2797a2(0x169)]=this[_0x2797a2(0x13d)],this[_0x2797a2(0x16f)][_0x2797a2(0x180)]=!0x1;}};g=te([N(0x0,_0x18421a),N(0x1,_0x2a9343(f))],g);var se=Object[_0x1ed600(0x136)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x55fb26,_0x46013c,_0x3522e2)=>_0x46013c in _0x55fb26?se(_0x55fb26,_0x46013c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3522e2}):_0x55fb26[_0x46013c]=_0x3522e2,ie=(_0x32891a,_0x1316e6,_0x2c0cc3,_0x22736b)=>{const _0x40664d=_0x1ed600;for(var _0x4e5973=_0x22736b>0x1?void 0x0:_0x22736b?oe(_0x1316e6,_0x2c0cc3):_0x1316e6,_0x232ffd=_0x32891a[_0x40664d(0x174)]-0x1,_0x111ef2;_0x232ffd>=0x0;_0x232ffd--)(_0x111ef2=_0x32891a[_0x232ffd])&&(_0x4e5973=_0x111ef2(_0x4e5973)||_0x4e5973);return _0x4e5973;},w=(_0xa4abe8,_0x44cccb)=>(_0x411bb5,_0x166067)=>_0x44cccb(_0x411bb5,_0x166067,_0xa4abe8),$=(_0x54000e,_0x412f11,_0x2421a9)=>ne(_0x54000e,typeof _0x412f11!='symbol'?_0x412f11+'':_0x412f11,_0x2421a9);let b=class extends _0x199264{constructor(_0x4877fe=M,_0x28972e,_0x2cf9aa){const _0x1d3ceb=_0x1ed600;super(),this['_config']=_0x4877fe,this['_injector']=_0x28972e,this[_0x1d3ceb(0x177)]=_0x2cf9aa;const {..._0x1dcb03}=_0x36a755({},M,this['_config']);this[_0x1d3ceb(0x177)][_0x1d3ceb(0x172)](z,_0x1dcb03);}[_0x1ed600(0x151)](){const _0x5d50f0=_0x1ed600;[[f],[g],[S]][_0x5d50f0(0x150)](_0x103467=>{const _0x3447d5=_0x5d50f0;this['_injector'][_0x3447d5(0x13e)](_0x103467);});}['onReady'](){const _0x21a4a4=_0x1ed600;this[_0x21a4a4(0x17c)][_0x21a4a4(0x16e)](g),this[_0x21a4a4(0x17c)]['get'](S);}};$(b,_0x1ed600(0x152),W),$(b,_0x1ed600(0x178),_0x59e337['UNIVER_UNKNOWN']),b=ie([_0x97169e(_0x5e203f,_0x5eccf1,_0x453405),w(0x1,_0x2a9343(_0x3d4cc6)),w(0x2,_0x596e4c)],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(_0x2729b4,_0x201f7b){const _0x3dbf76=_0xf5d2,_0x432190=_0x2729b4();while(!![]){try{const _0x1d396e=parseInt(_0x3dbf76(0x20a))/0x1+-parseInt(_0x3dbf76(0x258))/0x2*(parseInt(_0x3dbf76(0x25d))/0x3)+-parseInt(_0x3dbf76(0x24a))/0x4+parseInt(_0x3dbf76(0x254))/0x5+parseInt(_0x3dbf76(0x242))/0x6+parseInt(_0x3dbf76(0x1de))/0x7+-parseInt(_0x3dbf76(0x244))/0x8;if(_0x1d396e===_0x201f7b)break;else _0x432190['push'](_0x432190['shift']());}catch(_0x54cbff){_0x432190['push'](_0x432190['shift']());}}}(_0x3d2e,0x9d711),function(_0x4bcffb,_0x760eec){const _0x1708f6=_0xf5d2;typeof exports=='object'&&typeof module<'u'?_0x760eec(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==_0x1708f6(0x237)&&define[_0x1708f6(0x1f4)]?define([_0x1708f6(0x259),'@univerjs-pro/collaboration-client','@univerjs-pro/license',_0x1708f6(0x22a),_0x1708f6(0x239),_0x1708f6(0x1f3),_0x1708f6(0x255),_0x1708f6(0x1e3)],_0x760eec):(_0x4bcffb=typeof globalThis<'u'?globalThis:_0x4bcffb||self,_0x760eec(_0x4bcffb['UniverProThreadCommentDatasource']={},_0x4bcffb[_0x1708f6(0x245)],_0x4bcffb[_0x1708f6(0x1dc)],_0x4bcffb[_0x1708f6(0x1e8)],_0x4bcffb[_0x1708f6(0x1e5)],_0x4bcffb[_0x1708f6(0x24b)],_0x4bcffb[_0x1708f6(0x255)],_0x4bcffb[_0x1708f6(0x25a)]));}(this,function(_0x326b84,_0x13c7fc,_0xc9f437,_0x2b7b26,_0x49389b,_0x581cc2,_0x4926bf,_0x17bd88){'use strict';const _0x1fa8bf=_0xf5d2;const _0x4f78f8=_0x1fa8bf(0x25b);var _0x11b727=(_0x4b345b=>(_0x4b345b[_0x4b345b['OpenOrReOpen']=0x0]=_0x1fa8bf(0x248),_0x4b345b[_0x4b345b[_0x1fa8bf(0x224)]=0x1]=_0x1fa8bf(0x224),_0x4b345b[_0x4b345b[_0x1fa8bf(0x246)]=-0x1]=_0x1fa8bf(0x246),_0x4b345b))(_0x11b727||{}),_0x2d2ad4=(_0x18da0d=>(_0x18da0d[_0x18da0d['Unknown']=0x0]=_0x1fa8bf(0x23b),_0x18da0d[_0x18da0d[_0x1fa8bf(0x24c)]=0x1]=_0x1fa8bf(0x24c),_0x18da0d[_0x18da0d[_0x1fa8bf(0x1f9)]=0x2]=_0x1fa8bf(0x1f9),_0x18da0d[_0x18da0d[_0x1fa8bf(0x221)]=0x3]=_0x1fa8bf(0x221),_0x18da0d[_0x18da0d[_0x1fa8bf(0x1f0)]=0x4]=_0x1fa8bf(0x1f0),_0x18da0d[_0x18da0d['Solve']=0x5]=_0x1fa8bf(0x21e),_0x18da0d[_0x18da0d[_0x1fa8bf(0x246)]=-0x1]='UNRECOGNIZED',_0x18da0d))(_0x2d2ad4||{});const _0x1a9150=_0x67bfc5=>_0x2b7b26['dayjs'](new Date(+_0x67bfc5))[_0x1fa8bf(0x226)]('YYYY/MM/DD\x20HH:mm'),_0x55a38f=async(_0x24a7d2,_0x1d9161)=>{const _0x553bb1=_0x1fa8bf,_0x16412c=_0x24a7d2[_0x553bb1(0x20e)](_0x2b7b26['UserManagerService']),_0x2ba8e9=_0x24a7d2['get'](_0x17bd88[_0x553bb1(0x23a)]);_0x1d9161['forEach'](_0x3f7334=>{const _0xd41889=_0x553bb1;_0x16412c[_0xd41889(0x230)](_0x3f7334)&&_0x1d9161[_0xd41889(0x24d)](_0x3f7334);}),_0x1d9161[_0x553bb1(0x1fc)]&&(await _0x2ba8e9[_0x553bb1(0x20e)](_0x553bb1(0x208),{'params':{'userIDs':[..._0x1d9161]}}))[_0x553bb1(0x243)][_0x553bb1(0x210)][_0x553bb1(0x1ff)](_0x234818=>{const _0x23d590=_0x553bb1;_0x234818&&_0x16412c[_0x23d590(0x1e1)](_0x234818);});};var _0xd1e5df=Object[_0x1fa8bf(0x1ea)],_0x499480=(_0x5b76af,_0x3b7004,_0x24afb4,_0x322418)=>{for(var _0x212e06=_0x322418>0x1?void 0x0:_0x322418?_0xd1e5df(_0x3b7004,_0x24afb4):_0x3b7004,_0x2b3f27=_0x5b76af['length']-0x1,_0x5ae62d;_0x2b3f27>=0x0;_0x2b3f27--)(_0x5ae62d=_0x5b76af[_0x2b3f27])&&(_0x212e06=_0x5ae62d(_0x212e06)||_0x212e06);return _0x212e06;},_0x53d8e8=(_0x1c772e,_0x103248)=>(_0x52e093,_0x3f9101)=>_0x103248(_0x52e093,_0x3f9101,_0x1c772e);let _0x41b846=class extends _0x2b7b26[_0x1fa8bf(0x214)]{constructor(_0x25075f,_0x3e78a6,_0x497f13,_0x4a97eb){const _0x3338c1=_0x1fa8bf;super(),this[_0x3338c1(0x251)]=_0x25075f,this[_0x3338c1(0x22e)]=_0x3e78a6,this[_0x3338c1(0x1f1)]=_0x497f13,this[_0x3338c1(0x249)]=_0x4a97eb,this[_0x3338c1(0x1f8)](),this[_0x3338c1(0x1e9)]();}[_0x1fa8bf(0x1e9)](){const _0x500775=_0x1fa8bf;this[_0x500775(0x20c)](this[_0x500775(0x22e)][_0x500775(0x203)][_0x500775(0x24f)](_0x4926bf[_0x500775(0x256)](0x10))[_0x500775(0x23e)](_0x2aa8a6=>{const _0x29df71=new Set();_0x2aa8a6['forEach'](_0xdb4d7b=>{const _0x56887d=_0xf5d2;switch(_0xdb4d7b[_0x56887d(0x236)]){case'add':{const _0x976016=_0xdb4d7b[_0x56887d(0x22b)][_0x56887d(0x1ec)];_0x29df71[_0x56887d(0x235)](_0x976016);break;}}}),_0x55a38f(this['_injector'],_0x29df71);}));}[_0x1fa8bf(0x1f8)](){const _0x50712f=_0x1fa8bf;this[_0x50712f(0x20c)](this[_0x50712f(0x251)][_0x50712f(0x203)]['subscribe'](async _0x2d8452=>{const _0x4344ce=_0x50712f;var _0x6a502,_0x5eade0,_0x1c286f,_0x545575;const _0x18ea10=(_0x6a502=this['_threadCommentModel'][_0x4344ce(0x1e0)](_0x2d8452['unitId'])[_0x4344ce(0x1f5)](_0x275227=>_0x275227['threadId']===_0x2d8452[_0x4344ce(0x1eb)]))==null?void 0x0:_0x6a502[_0x4344ce(0x219)];if(!_0x18ea10)return;const {unitId:_0x22ce29,subUnitId:_0x5de082}=_0x18ea10;switch(_0x2d8452['user']&&this[_0x4344ce(0x1f1)][_0x4344ce(0x1e1)](_0x2d8452[_0x4344ce(0x22d)]),_0x2d8452[_0x4344ce(0x236)]){case _0x2d2ad4[_0x4344ce(0x24c)]:break;case _0x2d2ad4[_0x4344ce(0x1f9)]:{this[_0x4344ce(0x22e)]['addComment'](_0x22ce29,_0x5de082,{'unitId':_0x22ce29,'subUnitId':_0x5de082,'ref':'','id':_0x2d8452[_0x4344ce(0x1f6)],'dT':_0x1a9150(+_0x2d8452[_0x4344ce(0x247)]),'threadId':_0x2d8452['threadId'],'personId':(_0x1c286f=(_0x5eade0=_0x2d8452[_0x4344ce(0x22d)])==null?void 0x0:_0x5eade0[_0x4344ce(0x20b)])!=null?_0x1c286f:_0x2d8452[_0x4344ce(0x209)],'text':JSON['parse'](_0x2d8452['content']),'parentId':_0x18ea10['id']});break;}case _0x2d2ad4['Delete']:{const _0x5cdacf=this[_0x4344ce(0x22e)][_0x4344ce(0x238)](_0x22ce29,_0x5de082,_0x2d8452[_0x4344ce(0x1f6)]);_0x5cdacf&&_0x5cdacf[_0x4344ce(0x240)]&&this['_threadCommentModel'][_0x4344ce(0x202)](_0x22ce29,_0x5de082,_0x2d8452[_0x4344ce(0x1f6)]);break;}case _0x2d2ad4[_0x4344ce(0x221)]:{this[_0x4344ce(0x22e)][_0x4344ce(0x232)](_0x22ce29,_0x5de082,{'commentId':_0x2d8452[_0x4344ce(0x1f6)],'text':JSON['parse'](_0x2d8452[_0x4344ce(0x204)])});break;}case _0x2d2ad4[_0x4344ce(0x21e)]:{const _0x1577a5=(_0x545575=this[_0x4344ce(0x22e)][_0x4344ce(0x1e0)](_0x2d8452['unitId'])[_0x4344ce(0x1f5)](_0x598ef6=>_0x598ef6[_0x4344ce(0x1eb)]===_0x2d8452['threadId']))==null?void 0x0:_0x545575[_0x4344ce(0x219)];_0x1577a5&&this[_0x4344ce(0x22e)]['resolveComment'](_0x22ce29,_0x5de082,_0x1577a5['id'],_0x2d8452['solved']===_0x11b727[_0x4344ce(0x224)]);break;}}}));}};_0x41b846=_0x499480([_0x53d8e8(0x0,_0x2b7b26[_0x1fa8bf(0x21b)](_0x13c7fc[_0x1fa8bf(0x215)])),_0x53d8e8(0x1,_0x2b7b26[_0x1fa8bf(0x21b)](_0x581cc2[_0x1fa8bf(0x205)])),_0x53d8e8(0x2,_0x2b7b26[_0x1fa8bf(0x21b)](_0x2b7b26['UserManagerService'])),_0x53d8e8(0x3,_0x2b7b26[_0x1fa8bf(0x21b)](_0x2b7b26[_0x1fa8bf(0x1da)]))],_0x41b846);const _0x523f96=_0x1fa8bf(0x253),_0x4926f3={};var _0xfcc148=Object[_0x1fa8bf(0x1ea)],_0x18d461=(_0x4aef11,_0x436eec,_0x5d560a,_0x13ad5e)=>{const _0x25d71d=_0x1fa8bf;for(var _0x528f96=_0x13ad5e>0x1?void 0x0:_0x13ad5e?_0xfcc148(_0x436eec,_0x5d560a):_0x436eec,_0x16f624=_0x4aef11[_0x25d71d(0x21d)]-0x1,_0xf35302;_0x16f624>=0x0;_0x16f624--)(_0xf35302=_0x4aef11[_0x16f624])&&(_0x528f96=_0xf35302(_0x528f96)||_0x528f96);return _0x528f96;},_0x5453f0=(_0x18b657,_0x3922b2)=>(_0x54044f,_0x206e4e)=>_0x3922b2(_0x54044f,_0x206e4e,_0x18b657);function _0x21d1e1(_0x3ce8fb,_0x230efd){const _0x2c609f=_0x1fa8bf,_0x12c3ce=_0x3ce8fb[_0x2c609f(0x1fd)][0x0];return{..._0x230efd,'id':_0x12c3ce['replyId'],'resolved':_0x3ce8fb[_0x2c609f(0x22f)]===0x1,'dT':_0x1a9150(_0x12c3ce['createTimestamp']),'personId':_0x12c3ce['userId'],'threadId':_0x12c3ce[_0x2c609f(0x1eb)]};}function _0x277774(_0x3c0166,_0x2df6fe,_0x43c052){const _0x5d0691=_0x1fa8bf;var _0xc8db16,_0x4f0497;if(((_0x4f0497=(_0xc8db16=_0x3c0166==null?void 0x0:_0x3c0166[_0x5d0691(0x1fd)])==null?void 0x0:_0xc8db16['length'])!=null?_0x4f0497:0x0)>0x0){const _0xa88eca=(_0x57da30,_0x152f2a)=>({'id':_0x57da30['replyId'],'threadId':_0x57da30['threadId'],'dT':_0x1a9150(_0x57da30['createTimestamp']),'personId':_0x57da30[_0x5d0691(0x209)],'resolved':_0x3c0166[_0x5d0691(0x22f)]===_0x11b727['Solved'],'unitId':_0x2df6fe,'subUnitId':_0x43c052,'text':JSON[_0x5d0691(0x1ee)](_0x57da30[_0x5d0691(0x204)]),'parentId':_0x152f2a}),_0x29698d=_0xa88eca(_0x3c0166['replies'][0x0]);return{..._0x29698d,'children':_0x3c0166[_0x5d0691(0x1fd)]['slice'](0x1)[_0x5d0691(0x212)](_0x20b36c=>_0xa88eca(_0x20b36c,_0x29698d['id']))};}return null;}let _0x4e6ec2=class{constructor(_0x3cf3d0,_0x3ccb0e,_0x27cc87,_0x564e2d){const _0x174df2=_0x1fa8bf;this[_0x174df2(0x223)]=_0x3cf3d0,this['_userService']=_0x3ccb0e,this[_0x174df2(0x228)]=_0x27cc87,this[_0x174df2(0x249)]=_0x564e2d;}async[_0x1fa8bf(0x21a)](_0x191ff1){const _0x3696f8=_0x1fa8bf;var _0x186113,_0x16593d;const {parentId:_0x303e53,unitId:_0x437b1c,text:_0x4192cc,threadId:_0x51f30c}=_0x191ff1,_0x11d646=(_0x16593d=(_0x186113=_0x4192cc[_0x3696f8(0x257)])==null?void 0x0:_0x186113[_0x3696f8(0x207)](_0x582fb0=>_0x582fb0[_0x3696f8(0x220)]===_0x2b7b26['CustomRangeType'][_0x3696f8(0x216)])[_0x3696f8(0x212)](_0x5ead75=>_0x5ead75[_0x3696f8(0x252)]))!=null?_0x16593d:[],_0x4f88e3=JSON[_0x3696f8(0x20f)](_0x4192cc),_0x3d82b3=(await this['_sessionService'][_0x3696f8(0x23c)](_0x437b1c))[_0x3696f8(0x24e)]();if(_0x303e53){const _0x110f07={'memberId':_0x3d82b3,'unitId':_0x437b1c,'content':_0x4f88e3,'mention':_0x11d646,'threadId':_0x51f30c},_0x9c6600=(await this[_0x3696f8(0x223)]['post'](_0x3696f8(0x21f)+_0x437b1c+'/reply',{'body':_0x110f07}))[_0x3696f8(0x243)][_0x3696f8(0x1dd)];return{..._0x191ff1,'id':_0x9c6600['replyId'],'dT':_0x2b7b26[_0x3696f8(0x233)](+_0x9c6600['createTimestamp'])['format'](_0x3696f8(0x225)),'personId':_0x9c6600[_0x3696f8(0x209)]};}else{const _0x25ae66={'memberId':_0x3d82b3,'unitId':_0x437b1c,'content':_0x4f88e3,'mention':_0x11d646},_0x11c76e=await this[_0x3696f8(0x223)][_0x3696f8(0x1e4)](_0x3696f8(0x21f)+_0x437b1c+_0x3696f8(0x218),{'body':_0x25ae66});return _0x21d1e1(_0x11c76e[_0x3696f8(0x243)][_0x3696f8(0x222)],_0x191ff1);}}async[_0x1fa8bf(0x232)](_0x54b5ad){const _0x252980=_0x1fa8bf;var _0x2fb337,_0x3e88b4;const {text:_0x308ead,unitId:_0x40f86c}=_0x54b5ad,_0x403f4a=(_0x3e88b4=(_0x2fb337=_0x308ead[_0x252980(0x257)])==null?void 0x0:_0x2fb337[_0x252980(0x207)](_0x19cc95=>_0x19cc95[_0x252980(0x220)]===_0x2b7b26['CustomRangeType'][_0x252980(0x216)])[_0x252980(0x212)](_0x5b5bad=>_0x5b5bad['rangeId']))!=null?_0x3e88b4:[],_0x394df9=JSON[_0x252980(0x20f)](_0x308ead),_0x1d460c=_0x54b5ad[_0x252980(0x1eb)],_0x22b598=_0x54b5ad['id'],_0x4f8e9f={'memberId':(await this[_0x252980(0x228)]['requireSession'](_0x40f86c))['getMemberID'](),'unitId':_0x40f86c,'threadId':_0x1d460c,'mention':_0x403f4a,'content':_0x394df9,'replyId':_0x22b598},_0x36318d=await this[_0x252980(0x223)][_0x252980(0x1e4)]('/universer-api/comment/unit/'+_0x40f86c+'/edit',{'body':_0x4f8e9f});return!_0x36318d[_0x252980(0x243)][_0x252980(0x231)]||_0x36318d[_0x252980(0x243)][_0x252980(0x231)]['code']===0x1;}async['resolveComment'](_0xd5606b){const _0x447602=_0x1fa8bf,{unitId:_0x5b906e}=_0xd5606b,_0x284bfc=_0xd5606b['threadId'],_0x93c1d5={'memberId':this[_0x447602(0x1f1)][_0x447602(0x22c)]()[_0x447602(0x20b)],'unitId':_0x5b906e,'threadId':_0x284bfc,'solved':_0xd5606b['resolved']?_0x11b727[_0x447602(0x224)]:_0x11b727['OpenOrReOpen']},_0x4c031e=await this[_0x447602(0x223)][_0x447602(0x1e4)](_0x447602(0x21f)+_0x5b906e+_0x447602(0x21c),{'body':_0x93c1d5});return!_0x4c031e[_0x447602(0x243)]['error']||_0x4c031e[_0x447602(0x243)][_0x447602(0x231)][_0x447602(0x200)]===0x1;}async[_0x1fa8bf(0x202)](_0x43130f,_0x54ae11,_0x13edfa,_0x1e99a3){const _0x3d9c4c=_0x1fa8bf,_0x287229={'memberId':(await this[_0x3d9c4c(0x228)][_0x3d9c4c(0x23c)](_0x43130f))[_0x3d9c4c(0x24e)](),'threadId':_0x13edfa,'replyId':_0x1e99a3,'unitId':_0x43130f},_0xeb46f3=await this[_0x3d9c4c(0x223)][_0x3d9c4c(0x1e4)](_0x3d9c4c(0x21f)+_0x43130f+_0x3d9c4c(0x1ef),{'body':_0x287229});return!_0xeb46f3[_0x3d9c4c(0x243)][_0x3d9c4c(0x231)]||_0xeb46f3['body'][_0x3d9c4c(0x231)][_0x3d9c4c(0x200)]===0x1;}async['listComments'](_0x432cf1,_0x58e646,_0x447f7c){const _0x55cc34=_0x1fa8bf,_0x58ce35={'unitId':_0x432cf1,'threadId':_0x447f7c},_0x4a7547=await this[_0x55cc34(0x223)]['post'](_0x55cc34(0x21f)+_0x432cf1+_0x55cc34(0x229),{'body':_0x58ce35}),_0x1a6b12=_0x447f7c[_0x55cc34(0x212)](_0x285d11=>_0x277774(_0x4a7547[_0x55cc34(0x243)][_0x55cc34(0x1f2)][_0x285d11],_0x432cf1,_0x58e646))[_0x55cc34(0x207)](Boolean);return Object[_0x55cc34(0x1ed)](_0x4a7547[_0x55cc34(0x243)][_0x55cc34(0x210)])[_0x55cc34(0x1ff)](_0x419d15=>{const _0x461dfa=_0x55cc34;this['_userService'][_0x461dfa(0x1e1)](_0x419d15);}),_0x1a6b12;}['saveCommentToSnapshot'](_0x34eb2a){const _0x3e8c1e=_0x1fa8bf;return{'id':_0x34eb2a['id'],'threadId':_0x34eb2a['threadId'],'ref':_0x34eb2a[_0x3e8c1e(0x206)]};}};_0x4e6ec2=_0x18d461([_0x5453f0(0x0,_0x2b7b26[_0x1fa8bf(0x21b)](_0x17bd88[_0x1fa8bf(0x23a)])),_0x5453f0(0x1,_0x2b7b26['Inject'](_0x2b7b26['UserManagerService'])),_0x5453f0(0x2,_0x2b7b26[_0x1fa8bf(0x21b)](_0x13c7fc[_0x1fa8bf(0x1fa)])),_0x5453f0(0x3,_0x2b7b26[_0x1fa8bf(0x21b)](_0x2b7b26[_0x1fa8bf(0x1da)]))],_0x4e6ec2);var _0x2604bc=Object['getOwnPropertyDescriptor'],_0x4c2ad8=(_0x3d8694,_0x56d3f1,_0x304277,_0x1fdefb)=>{const _0x2e8d4c=_0x1fa8bf;for(var _0x2bde80=_0x1fdefb>0x1?void 0x0:_0x1fdefb?_0x2604bc(_0x56d3f1,_0x304277):_0x56d3f1,_0x3d1618=_0x3d8694[_0x2e8d4c(0x21d)]-0x1,_0x43f1a7;_0x3d1618>=0x0;_0x3d1618--)(_0x43f1a7=_0x3d8694[_0x3d1618])&&(_0x2bde80=_0x43f1a7(_0x2bde80)||_0x2bde80);return _0x2bde80;},_0x2783fa=(_0x12d78c,_0x25f955)=>(_0x2b31f3,_0x194e7b)=>_0x25f955(_0x2b31f3,_0x194e7b,_0x12d78c);let _0x7f1a3c=class extends _0x2b7b26['Disposable']{constructor(_0x3e513c,_0x13e02){const _0x65f25e=_0x1fa8bf;super(),this['_threadCommentDataSourceService']=_0x3e513c,this[_0x65f25e(0x1e6)]=_0x13e02,this[_0x65f25e(0x1e2)]();}[_0x1fa8bf(0x1e2)](){const _0x1aae67=_0x1fa8bf;this[_0x1aae67(0x217)][_0x1aae67(0x1fe)]=this['_threadCommentDataSource'],this[_0x1aae67(0x217)][_0x1aae67(0x211)]=!0x1;}};_0x7f1a3c=_0x4c2ad8([_0x2783fa(0x0,_0x581cc2[_0x1fa8bf(0x234)]),_0x2783fa(0x1,_0x2b7b26['Inject'](_0x4e6ec2))],_0x7f1a3c);var _0x4fa740=Object[_0x1fa8bf(0x20d)],_0x3f20ba=Object[_0x1fa8bf(0x1ea)],_0x5b9bb1=(_0x4d52fe,_0x23ed6f,_0x56ce40)=>_0x23ed6f in _0x4d52fe?_0x4fa740(_0x4d52fe,_0x23ed6f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x56ce40}):_0x4d52fe[_0x23ed6f]=_0x56ce40,_0x5a150c=(_0x5362e2,_0xb3f031,_0x4b3843,_0xc6acb5)=>{const _0x178a90=_0x1fa8bf;for(var _0x4f2200=_0xc6acb5>0x1?void 0x0:_0xc6acb5?_0x3f20ba(_0xb3f031,_0x4b3843):_0xb3f031,_0x2a7849=_0x5362e2[_0x178a90(0x21d)]-0x1,_0x39135f;_0x2a7849>=0x0;_0x2a7849--)(_0x39135f=_0x5362e2[_0x2a7849])&&(_0x4f2200=_0x39135f(_0x4f2200)||_0x4f2200);return _0x4f2200;},_0x30ad2f=(_0x5ca67b,_0x199c12)=>(_0x258afa,_0x16ad3f)=>_0x199c12(_0x258afa,_0x16ad3f,_0x5ca67b),_0x14d77c=(_0x20034a,_0x3ced7e,_0x23edf6)=>_0x5b9bb1(_0x20034a,typeof _0x3ced7e!='symbol'?_0x3ced7e+'':_0x3ced7e,_0x23edf6);_0x326b84[_0x1fa8bf(0x1e7)]=class extends _0x2b7b26['Plugin']{constructor(_0x10723d=_0x4926f3,_0x5e5404,_0xdf4f73){const _0x30297e=_0x1fa8bf;super(),this[_0x30297e(0x227)]=_0x10723d,this[_0x30297e(0x249)]=_0x5e5404,this['_configService']=_0xdf4f73;const {..._0x16aac5}=_0x2b7b26[_0x30297e(0x213)]({},_0x4926f3,this['_config']);this[_0x30297e(0x23d)]['setConfig'](_0x523f96,_0x16aac5);}[_0x1fa8bf(0x23f)](){[[_0x4e6ec2],[_0x7f1a3c],[_0x41b846]]['forEach'](_0x40b976=>{const _0xdbddb3=_0xf5d2;this[_0xdbddb3(0x249)]['add'](_0x40b976);});}[_0x1fa8bf(0x241)](){const _0x11ea7a=_0x1fa8bf;this['_injector'][_0x11ea7a(0x20e)](_0x7f1a3c),this[_0x11ea7a(0x249)][_0x11ea7a(0x20e)](_0x41b846);}},_0x14d77c(_0x326b84['UniverThreadCommentDataSourcePlugin'],_0x1fa8bf(0x1df),_0x4f78f8),_0x14d77c(_0x326b84[_0x1fa8bf(0x1e7)],_0x1fa8bf(0x236),_0x2b7b26['UniverInstanceType'][_0x1fa8bf(0x1fb)]),_0x326b84[_0x1fa8bf(0x1e7)]=_0x5a150c([_0x2b7b26[_0x1fa8bf(0x25c)](_0x49389b['UniverThreadCommentUIPlugin'],_0x13c7fc[_0x1fa8bf(0x1f7)],_0xc9f437['UniverLicensePlugin']),_0x30ad2f(0x1,_0x2b7b26['Inject'](_0x2b7b26['Injector'])),_0x30ad2f(0x2,_0x2b7b26[_0x1fa8bf(0x250)])],_0x326b84[_0x1fa8bf(0x1e7)]),Object[_0x1fa8bf(0x20d)](_0x326b84,Symbol[_0x1fa8bf(0x201)],{'value':_0x1fa8bf(0x1db)});}));function _0xf5d2(_0x528d24,_0x242d73){const _0x3d2ee0=_0x3d2e();return _0xf5d2=function(_0xf5d2cc,_0x4bd414){_0xf5d2cc=_0xf5d2cc-0x1da;let _0x11ecfa=_0x3d2ee0[_0xf5d2cc];return _0x11ecfa;},_0xf5d2(_0x528d24,_0x242d73);}function _0x3d2e(){const _0x76e7b5=['body','5798336DKweax','UniverProCollaborationClient','UNRECOGNIZED','createTimestamp','OpenOrReOpen','_injector','1673052izwGPf','UniverThreadComment','Add','delete','getMemberID','pipe','IConfigService','_commentService','rangeId','thread-comment-data-source.config','3473975nprMhA','rxjs','bufferTime','customRanges','674lLmHdT','exports','UniverNetwork','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','DependentOn','10407xfesoy','Injector','Module','UniverProLicense','reply','5237253PoGCkO','pluginName','getUnit','addUser','_initDataSource','@univerjs/network','post','UniverThreadCommentUi','_threadCommentDataSource','UniverThreadCommentDataSourcePlugin','UniverCore','_initUserSync','getOwnPropertyDescriptor','threadId','personId','values','parse','/delete','Delete','_userService','comments','@univerjs/thread-comment','amd','find','replyId','UniverCollaborationClientPlugin','_init','Reply','CollaborationSessionService','UNIVER_UNKNOWN','size','replies','dataSource','forEach','code','toStringTag','deleteComment','commentUpdate$','content','ThreadCommentModel','ref','filter','/universer-api/user/list','userId','1105948uiERxh','userID','disposeWithMe','defineProperty','get','stringify','users','syncUpdateMutationToColla','map','merge','Disposable','CommentService','COMMENT','_threadCommentDataSourceService','/add','root','addComment','Inject','/solved','length','Solve','/universer-api/comment/unit/','rangeType','Edit','comment','_httpService','Solved','YYYY/MM/DD\x20HH:mm','format','_config','_sessionService','/list','@univerjs/core','payload','getCurrentUser','user','_threadCommentModel','solved','getUser','error','updateComment','dayjs','IThreadCommentDataSourceService','add','type','function','getComment','@univerjs/thread-comment-ui','HTTPService','Unknown','requireSession','_configService','subscribe','onStarting','parentId','onReady','2448402KDRxyZ'];_0x3d2e=function(){return _0x76e7b5;};return _0x3d2e();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/thread-comment-datasource",
|
|
3
|
-
"version": "0.9.1-nightly.
|
|
3
|
+
"version": "0.9.1-nightly.202507081607",
|
|
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.
|
|
49
|
-
"@univerjs-pro/license": "0.9.1-nightly.
|
|
50
|
-
"@univerjs/core": "0.9.1-nightly.
|
|
51
|
-
"@univerjs/thread-comment": "0.9.1-nightly.
|
|
52
|
-
"@univerjs/network": "0.9.1-nightly.
|
|
48
|
+
"@univerjs-pro/collaboration-client": "0.9.1-nightly.202507081607",
|
|
49
|
+
"@univerjs-pro/license": "0.9.1-nightly.202507081607",
|
|
50
|
+
"@univerjs/core": "0.9.1-nightly.202507081607",
|
|
51
|
+
"@univerjs/thread-comment": "0.9.1-nightly.202507081607",
|
|
52
|
+
"@univerjs/network": "0.9.1-nightly.202507081607",
|
|
53
53
|
"@univerjs/protocol": "0.1.47-alpha.0",
|
|
54
|
-
"@univerjs/thread-comment-ui": "0.9.1-nightly.
|
|
54
|
+
"@univerjs/thread-comment-ui": "0.9.1-nightly.202507081607"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"rxjs": "7.8.2",
|