@univerjs-pro/thread-comment-datasource 0.6.7-experimental.20250331-958639c → 0.6.7-experimental.20250331-fa407d3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const _0x3e99ac=_0x815b;(function(_0x346c73,_0x54d5f1){const _0x6e440b=_0x815b,_0x2e5040=_0x346c73();while(!![]){try{const _0x1e0156=parseInt(_0x6e440b(0x1df))/0x1*(-parseInt(_0x6e440b(0x206))/0x2)+parseInt(_0x6e440b(0x1d8))/0x3*(-parseInt(_0x6e440b(0x20d))/0x4)+-parseInt(_0x6e440b(0x195))/0x5*(-parseInt(_0x6e440b(0x1cf))/0x6)+-parseInt(_0x6e440b(0x1c7))/0x7+-parseInt(_0x6e440b(0x1ea))/0x8*(parseInt(_0x6e440b(0x1a3))/0x9)+-parseInt(_0x6e440b(0x1f7))/0xa+-parseInt(_0x6e440b(0x1c5))/0xb*(-parseInt(_0x6e440b(0x1c3))/0xc);if(_0x1e0156===_0x54d5f1)break;else _0x2e5040['push'](_0x2e5040['shift']());}catch(_0x19bd5c){_0x2e5040['push'](_0x2e5040['shift']());}}}(_0x3479,0x93b06));Object[_0x3e99ac(0x1ec)](exports,Symbol[_0x3e99ac(0x1a5)],{'value':_0x3e99ac(0x1dd)});function _0x3479(){const _0x400f3e=['getUnit','UniverInstanceType','addUser','IThreadCommentDataSourceService','content','delete','211941yCuguD','disposeWithMe','toStringTag','replies','getOwnPropertyDescriptor','format','_injector','map','_userService','createTimestamp','Injector','@univerjs-pro/license','resolved','rangeId','Edit','COMMENT','filter','_threadCommentModel','addComment','Disposable','_httpService','_initDataSource','_threadCommentDataSourceService','deleteComment','parse','threadId','UniverLicensePlugin','updateComment','error','UNIVER_UNKNOWN','bufferTime','UniverThreadCommentUIPlugin','54335868FtQCWe','Reply','11brWLBl','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','6957762HvhuVU','onStarting','syncUpdateMutationToColla','ref','unitId','userID','resolveComment','rangeType','6kJaFhq','/reply','_init','Solve','getUser','Solved','/universer-api/user/list','subscribe','length','87NNkaar','_commentService','UniverCollaborationClientPlugin','onReady','find','Module','/universer-api/comment/unit/','119266ipDdze','type','comments','/delete','requireSession','@univerjs/thread-comment-ui','/solved','_threadCommentDataSource','CustomRangeType','/list','getComment','400HDLnaA','pipe','defineProperty','getMemberID','slice','YYYY/MM/DD\x20HH:mm','post','UniverThreadCommentDataSourcePlugin','OpenOrReOpen','ThreadCommentModel','_config','UserManagerService','get','2663500YoKYYj','body','Inject','@univerjs/core','forEach','Add','values','replyId','@univerjs/network','stringify','setConfig','personId','/add','users','solved','14MyZQxx','DependentOn','_sessionService','saveCommentToSnapshot','payload','Plugin','IConfigService','160544mKpHeB','add','HTTPService','dayjs','root','_initUserSync','commentUpdate$','rxjs','2567585lTBYJA','@univerjs-pro/collaboration-client','userId','Delete','Unknown','user','customRanges','UNRECOGNIZED'];_0x3479=function(){return _0x400f3e;};return _0x3479();}const b=require(_0x3e99ac(0x196)),T=require(_0x3e99ac(0x1ae)),c=require(_0x3e99ac(0x1fa)),j=require(_0x3e99ac(0x1e4)),M=require('@univerjs/thread-comment'),w=require(_0x3e99ac(0x194)),P=require(_0x3e99ac(0x1ff)),U=_0x3e99ac(0x1c6);var I=(_0x7aff8b=>(_0x7aff8b[_0x7aff8b[_0x3e99ac(0x1f2)]=0x0]='OpenOrReOpen',_0x7aff8b[_0x7aff8b[_0x3e99ac(0x1d4)]=0x1]=_0x3e99ac(0x1d4),_0x7aff8b[_0x7aff8b[_0x3e99ac(0x19c)]=-0x1]=_0x3e99ac(0x19c),_0x7aff8b))(I||{}),v=(_0x5ccfdc=>(_0x5ccfdc[_0x5ccfdc[_0x3e99ac(0x199)]=0x0]=_0x3e99ac(0x199),_0x5ccfdc[_0x5ccfdc['Add']=0x1]=_0x3e99ac(0x1fc),_0x5ccfdc[_0x5ccfdc[_0x3e99ac(0x1c4)]=0x2]=_0x3e99ac(0x1c4),_0x5ccfdc[_0x5ccfdc['Edit']=0x3]=_0x3e99ac(0x1b1),_0x5ccfdc[_0x5ccfdc['Delete']=0x4]=_0x3e99ac(0x198),_0x5ccfdc[_0x5ccfdc['Solve']=0x5]=_0x3e99ac(0x1d2),_0x5ccfdc[_0x5ccfdc['UNRECOGNIZED']=-0x1]=_0x3e99ac(0x19c),_0x5ccfdc))(v||{});const f=_0x130f22=>c[_0x3e99ac(0x210)](new Date(+_0x130f22))['format'](_0x3e99ac(0x1ef)),R=async(_0x4b8041,_0x2c0e63)=>{const _0x475908=_0x3e99ac,_0x3e504d=_0x4b8041[_0x475908(0x1f6)](c['UserManagerService']),_0x4e0cdd=_0x4b8041[_0x475908(0x1f6)](P[_0x475908(0x20f)]);_0x2c0e63[_0x475908(0x1fb)](_0x4fa1f0=>{const _0x19f127=_0x475908;_0x3e504d[_0x19f127(0x1d3)](_0x4fa1f0)&&_0x2c0e63[_0x19f127(0x1a2)](_0x4fa1f0);}),_0x2c0e63['size']&&(await _0x4e0cdd['get'](_0x475908(0x1d5),{'params':{'userIDs':[..._0x2c0e63]}}))[_0x475908(0x1f8)][_0x475908(0x204)][_0x475908(0x1fb)](_0x3f6dac=>{const _0xfa75fa=_0x475908;_0x3f6dac&&_0x3e504d[_0xfa75fa(0x19f)](_0x3f6dac);});};var $=Object[_0x3e99ac(0x1a7)],E=(_0x490271,_0x3f6817,_0x2e268e,_0x2bf3a2)=>{const _0x158ceb=_0x3e99ac;for(var _0x316013=_0x2bf3a2>0x1?void 0x0:_0x2bf3a2?$(_0x3f6817,_0x2e268e):_0x3f6817,_0x2199ce=_0x490271[_0x158ceb(0x1d7)]-0x1,_0x106f5d;_0x2199ce>=0x0;_0x2199ce--)(_0x106f5d=_0x490271[_0x2199ce])&&(_0x316013=_0x106f5d(_0x316013)||_0x316013);return _0x316013;},S=(_0x2e07d4,_0x542765)=>(_0x52fbb9,_0x549d85)=>_0x542765(_0x52fbb9,_0x549d85,_0x2e07d4);let p=class extends c[_0x3e99ac(0x1b6)]{constructor(_0x2aeec6,_0x1245f7,_0x24549c,_0x1673a5){const _0x38e031=_0x3e99ac;super(),this[_0x38e031(0x1d9)]=_0x2aeec6,this[_0x38e031(0x1b4)]=_0x1245f7,this['_userService']=_0x24549c,this[_0x38e031(0x1a9)]=_0x1673a5,this[_0x38e031(0x1d1)](),this['_initUserSync']();}[_0x3e99ac(0x192)](){const _0x38ae33=_0x3e99ac;this['disposeWithMe'](this[_0x38ae33(0x1b4)][_0x38ae33(0x193)][_0x38ae33(0x1eb)](w[_0x38ae33(0x1c1)](0x10))[_0x38ae33(0x1d6)](_0x332658=>{const _0x20973a=_0x38ae33,_0x447637=new Set();_0x332658[_0x20973a(0x1fb)](_0x45754e=>{const _0x38998d=_0x20973a;switch(_0x45754e['type']){case'add':{const _0x20a548=_0x45754e[_0x38998d(0x20a)][_0x38998d(0x202)];_0x447637[_0x38998d(0x20e)](_0x20a548);break;}}}),R(this[_0x20973a(0x1a9)],_0x447637);}));}[_0x3e99ac(0x1d1)](){const _0x3ac877=_0x3e99ac;this[_0x3ac877(0x1a4)](this[_0x3ac877(0x1d9)][_0x3ac877(0x193)][_0x3ac877(0x1d6)](async _0x8a55e2=>{const _0x2ec6e8=_0x3ac877;var _0x37a153,_0x4e6c8f,_0x43db3c,_0x4323b2;const _0x4161c7=(_0x37a153=this['_threadCommentModel'][_0x2ec6e8(0x19d)](_0x8a55e2[_0x2ec6e8(0x1cb)])[_0x2ec6e8(0x1dc)](_0x1b0379=>_0x1b0379[_0x2ec6e8(0x1bc)]===_0x8a55e2[_0x2ec6e8(0x1bc)]))==null?void 0x0:_0x37a153[_0x2ec6e8(0x211)];if(!_0x4161c7)return;const {unitId:_0x41e4b8,subUnitId:_0x2680b8}=_0x4161c7;switch(_0x8a55e2[_0x2ec6e8(0x19a)]&&this['_userService'][_0x2ec6e8(0x19f)](_0x8a55e2[_0x2ec6e8(0x19a)]),_0x8a55e2['type']){case v[_0x2ec6e8(0x1fc)]:break;case v[_0x2ec6e8(0x1c4)]:{this[_0x2ec6e8(0x1b4)][_0x2ec6e8(0x1b5)](_0x41e4b8,_0x2680b8,{'unitId':_0x41e4b8,'subUnitId':_0x2680b8,'ref':'','id':_0x8a55e2['replyId'],'dT':f(+_0x8a55e2[_0x2ec6e8(0x1ac)]),'threadId':_0x8a55e2[_0x2ec6e8(0x1bc)],'personId':(_0x43db3c=(_0x4e6c8f=_0x8a55e2['user'])==null?void 0x0:_0x4e6c8f[_0x2ec6e8(0x1cc)])!=null?_0x43db3c:_0x8a55e2[_0x2ec6e8(0x197)],'text':JSON[_0x2ec6e8(0x1bb)](_0x8a55e2['content']),'parentId':_0x4161c7['id']});break;}case v[_0x2ec6e8(0x198)]:{const _0x51027b=this[_0x2ec6e8(0x1b4)][_0x2ec6e8(0x1e9)](_0x41e4b8,_0x2680b8,_0x8a55e2[_0x2ec6e8(0x1fe)]);_0x51027b&&_0x51027b['parentId']&&this['_threadCommentModel'][_0x2ec6e8(0x1ba)](_0x41e4b8,_0x2680b8,_0x8a55e2[_0x2ec6e8(0x1fe)]);break;}case v['Edit']:{this[_0x2ec6e8(0x1b4)][_0x2ec6e8(0x1be)](_0x41e4b8,_0x2680b8,{'commentId':_0x8a55e2['replyId'],'text':JSON[_0x2ec6e8(0x1bb)](_0x8a55e2[_0x2ec6e8(0x1a1)])});break;}case v[_0x2ec6e8(0x1d2)]:{const _0x58b8d2=(_0x4323b2=this[_0x2ec6e8(0x1b4)][_0x2ec6e8(0x19d)](_0x8a55e2['unitId'])[_0x2ec6e8(0x1dc)](_0x3657a1=>_0x3657a1[_0x2ec6e8(0x1bc)]===_0x8a55e2[_0x2ec6e8(0x1bc)]))==null?void 0x0:_0x4323b2[_0x2ec6e8(0x211)];_0x58b8d2&&this[_0x2ec6e8(0x1b4)]['resolveComment'](_0x41e4b8,_0x2680b8,_0x58b8d2['id'],_0x8a55e2[_0x2ec6e8(0x205)]===I[_0x2ec6e8(0x1d4)]);break;}}}));}};p=E([S(0x0,c[_0x3e99ac(0x1f9)](b['CommentService'])),S(0x1,c[_0x3e99ac(0x1f9)](M[_0x3e99ac(0x1f3)])),S(0x2,c[_0x3e99ac(0x1f9)](c[_0x3e99ac(0x1f5)])),S(0x3,c['Inject'](c[_0x3e99ac(0x1ad)]))],p);const q='thread-comment-data-source.config',D={};var A=Object[_0x3e99ac(0x1a7)],x=(_0x407bd4,_0x376c05,_0x595045,_0x154383)=>{const _0x1d5848=_0x3e99ac;for(var _0x4fb9f1=_0x154383>0x1?void 0x0:_0x154383?A(_0x376c05,_0x595045):_0x376c05,_0x2f1113=_0x407bd4[_0x1d5848(0x1d7)]-0x1,_0x115f19;_0x2f1113>=0x0;_0x2f1113--)(_0x115f19=_0x407bd4[_0x2f1113])&&(_0x4fb9f1=_0x115f19(_0x4fb9f1)||_0x4fb9f1);return _0x4fb9f1;},_=(_0x45586c,_0x549799)=>(_0x2fe0e0,_0x164d8a)=>_0x549799(_0x2fe0e0,_0x164d8a,_0x45586c);function Y(_0x47d2c7,_0x95dedb){const _0x3f2857=_0x3e99ac,_0x44885a=_0x47d2c7[_0x3f2857(0x1a6)][0x0];return{..._0x95dedb,'id':_0x44885a['replyId'],'resolved':_0x47d2c7[_0x3f2857(0x205)]===0x1,'dT':f(_0x44885a[_0x3f2857(0x1ac)]),'personId':_0x44885a[_0x3f2857(0x197)],'threadId':_0x44885a[_0x3f2857(0x1bc)]};}function G(_0x496aed,_0x49e7b8,_0x57a7a6){const _0x13bd94=_0x3e99ac;var _0x1a5c8e,_0x541037;if(((_0x541037=(_0x1a5c8e=_0x496aed==null?void 0x0:_0x496aed[_0x13bd94(0x1a6)])==null?void 0x0:_0x1a5c8e['length'])!=null?_0x541037:0x0)>0x0){const _0x4dc0ef=(_0x568da2,_0x195b07)=>({'id':_0x568da2[_0x13bd94(0x1fe)],'threadId':_0x568da2[_0x13bd94(0x1bc)],'dT':f(_0x568da2[_0x13bd94(0x1ac)]),'personId':_0x568da2[_0x13bd94(0x197)],'resolved':_0x496aed[_0x13bd94(0x205)]===I[_0x13bd94(0x1d4)],'unitId':_0x49e7b8,'subUnitId':_0x57a7a6,'text':JSON[_0x13bd94(0x1bb)](_0x568da2[_0x13bd94(0x1a1)]),'parentId':_0x195b07}),_0x4517da=_0x4dc0ef(_0x496aed[_0x13bd94(0x1a6)][0x0]);return{..._0x4517da,'children':_0x496aed[_0x13bd94(0x1a6)][_0x13bd94(0x1ee)](0x1)['map'](_0x429361=>_0x4dc0ef(_0x429361,_0x4517da['id']))};}return null;}let g=class{constructor(_0xfd5b7,_0x4485b9,_0x59f479,_0x36ce5c){const _0x5b04bd=_0x3e99ac;this[_0x5b04bd(0x1b7)]=_0xfd5b7,this[_0x5b04bd(0x1ab)]=_0x4485b9,this['_sessionService']=_0x59f479,this[_0x5b04bd(0x1a9)]=_0x36ce5c;}async[_0x3e99ac(0x1b5)](_0x46a13b){const _0x394d08=_0x3e99ac;var _0x3d2e7a,_0x49919e;const {parentId:_0x10042b,unitId:_0x55f522,text:_0x1dfad6,threadId:_0x4af542}=_0x46a13b,_0x12d5a4=(_0x49919e=(_0x3d2e7a=_0x1dfad6[_0x394d08(0x19b)])==null?void 0x0:_0x3d2e7a[_0x394d08(0x1b3)](_0x41fa2d=>_0x41fa2d[_0x394d08(0x1ce)]===c[_0x394d08(0x1e7)][_0x394d08(0x1b2)])[_0x394d08(0x1aa)](_0x39d4f8=>_0x39d4f8[_0x394d08(0x1b0)]))!=null?_0x49919e:[],_0x15d083=JSON[_0x394d08(0x200)](_0x1dfad6),_0x4cbd86=(await this[_0x394d08(0x208)]['requireSession'](_0x55f522))[_0x394d08(0x1ed)]();if(_0x10042b){const _0xaf4d3e={'memberId':_0x4cbd86,'unitId':_0x55f522,'content':_0x15d083,'mention':_0x12d5a4,'threadId':_0x4af542},_0x2ed464=(await this[_0x394d08(0x1b7)][_0x394d08(0x1f0)](_0x394d08(0x1de)+_0x55f522+_0x394d08(0x1d0),{'body':_0xaf4d3e}))['body']['reply'];return{..._0x46a13b,'id':_0x2ed464['replyId'],'dT':c[_0x394d08(0x210)](+_0x2ed464[_0x394d08(0x1ac)])[_0x394d08(0x1a8)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x2ed464['userId']};}else{const _0x2e9819={'memberId':_0x4cbd86,'unitId':_0x55f522,'content':_0x15d083,'mention':_0x12d5a4},_0x1bcb60=await this[_0x394d08(0x1b7)][_0x394d08(0x1f0)](_0x394d08(0x1de)+_0x55f522+_0x394d08(0x203),{'body':_0x2e9819});return Y(_0x1bcb60[_0x394d08(0x1f8)]['comment'],_0x46a13b);}}async[_0x3e99ac(0x1be)](_0x382533){const _0x20c615=_0x3e99ac;var _0x26d1d5,_0x3fcc45;const {text:_0x41e8c6,unitId:_0x4c2da0}=_0x382533,_0x4e43fa=(_0x3fcc45=(_0x26d1d5=_0x41e8c6[_0x20c615(0x19b)])==null?void 0x0:_0x26d1d5[_0x20c615(0x1b3)](_0x41134b=>_0x41134b[_0x20c615(0x1ce)]===c[_0x20c615(0x1e7)][_0x20c615(0x1b2)])[_0x20c615(0x1aa)](_0x25fa80=>_0x25fa80[_0x20c615(0x1b0)]))!=null?_0x3fcc45:[],_0xee8e3b=JSON[_0x20c615(0x200)](_0x41e8c6),_0x462c55=_0x382533[_0x20c615(0x1bc)],_0x25d75d=_0x382533['id'],_0x19ec82={'memberId':(await this['_sessionService'][_0x20c615(0x1e3)](_0x4c2da0))[_0x20c615(0x1ed)](),'unitId':_0x4c2da0,'threadId':_0x462c55,'mention':_0x4e43fa,'content':_0xee8e3b,'replyId':_0x25d75d},_0xcb6526=await this['_httpService'][_0x20c615(0x1f0)](_0x20c615(0x1de)+_0x4c2da0+'/edit',{'body':_0x19ec82});return!_0xcb6526[_0x20c615(0x1f8)]['error']||_0xcb6526['body']['error']['code']===0x1;}async[_0x3e99ac(0x1cd)](_0x13248a){const _0x5a8393=_0x3e99ac,{unitId:_0x4e6f48}=_0x13248a,_0x5ae5da=_0x13248a['threadId'],_0x91c80d={'memberId':this['_userService']['getCurrentUser']()['userID'],'unitId':_0x4e6f48,'threadId':_0x5ae5da,'solved':_0x13248a[_0x5a8393(0x1af)]?I[_0x5a8393(0x1d4)]:I[_0x5a8393(0x1f2)]},_0x22227e=await this['_httpService']['post'](_0x5a8393(0x1de)+_0x4e6f48+_0x5a8393(0x1e5),{'body':_0x91c80d});return!_0x22227e[_0x5a8393(0x1f8)]['error']||_0x22227e[_0x5a8393(0x1f8)][_0x5a8393(0x1bf)]['code']===0x1;}async[_0x3e99ac(0x1ba)](_0x22c8dc,_0xb4ae05,_0x19bcf3,_0x4b6055){const _0xa8ed6d=_0x3e99ac,_0x53a59e={'memberId':(await this['_sessionService'][_0xa8ed6d(0x1e3)](_0x22c8dc))[_0xa8ed6d(0x1ed)](),'threadId':_0x19bcf3,'replyId':_0x4b6055,'unitId':_0x22c8dc},_0x2412b3=await this['_httpService'][_0xa8ed6d(0x1f0)](_0xa8ed6d(0x1de)+_0x22c8dc+_0xa8ed6d(0x1e2),{'body':_0x53a59e});return!_0x2412b3[_0xa8ed6d(0x1f8)][_0xa8ed6d(0x1bf)]||_0x2412b3[_0xa8ed6d(0x1f8)][_0xa8ed6d(0x1bf)]['code']===0x1;}async['listComments'](_0x457612,_0x300d75,_0x2551ef){const _0x1629d5=_0x3e99ac,_0x4acad0={'unitId':_0x457612,'threadId':_0x2551ef},_0x1a549c=await this['_httpService'][_0x1629d5(0x1f0)](_0x1629d5(0x1de)+_0x457612+_0x1629d5(0x1e8),{'body':_0x4acad0}),_0x12273b=_0x2551ef[_0x1629d5(0x1aa)](_0x10e305=>G(_0x1a549c[_0x1629d5(0x1f8)][_0x1629d5(0x1e1)][_0x10e305],_0x457612,_0x300d75))[_0x1629d5(0x1b3)](Boolean);return Object[_0x1629d5(0x1fd)](_0x1a549c[_0x1629d5(0x1f8)][_0x1629d5(0x204)])[_0x1629d5(0x1fb)](_0x25c57d=>{const _0xfad100=_0x1629d5;this[_0xfad100(0x1ab)][_0xfad100(0x19f)](_0x25c57d);}),_0x12273b;}[_0x3e99ac(0x209)](_0x2e2300){const _0x1c8168=_0x3e99ac;return{'id':_0x2e2300['id'],'threadId':_0x2e2300['threadId'],'ref':_0x2e2300[_0x1c8168(0x1ca)]};}};g=x([_(0x0,c[_0x3e99ac(0x1f9)](P['HTTPService'])),_(0x1,c[_0x3e99ac(0x1f9)](c[_0x3e99ac(0x1f5)])),_(0x2,c['Inject'](b['CollaborationSessionService'])),_(0x3,c[_0x3e99ac(0x1f9)](c[_0x3e99ac(0x1ad)]))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0xd27d7e,_0x41e820,_0x291afc,_0x10f4c1)=>{const _0x3be7df=_0x3e99ac;for(var _0x56bc68=_0x10f4c1>0x1?void 0x0:_0x10f4c1?H(_0x41e820,_0x291afc):_0x41e820,_0xffd779=_0xd27d7e[_0x3be7df(0x1d7)]-0x1,_0x5a6d36;_0xffd779>=0x0;_0xffd779--)(_0x5a6d36=_0xd27d7e[_0xffd779])&&(_0x56bc68=_0x5a6d36(_0x56bc68)||_0x56bc68);return _0x56bc68;},y=(_0x1f6ad8,_0x151779)=>(_0x4fa0bb,_0x29803a)=>_0x151779(_0x4fa0bb,_0x29803a,_0x1f6ad8);let C=class extends c[_0x3e99ac(0x1b6)]{constructor(_0x43a5b9,_0x21d355){const _0x52d28d=_0x3e99ac;super(),this[_0x52d28d(0x1b9)]=_0x43a5b9,this[_0x52d28d(0x1e6)]=_0x21d355,this[_0x52d28d(0x1b8)]();}[_0x3e99ac(0x1b8)](){const _0x2c91bf=_0x3e99ac;this[_0x2c91bf(0x1b9)]['dataSource']=this[_0x2c91bf(0x1e6)],this[_0x2c91bf(0x1b9)][_0x2c91bf(0x1c9)]=!0x1;}};C=J([y(0x0,M[_0x3e99ac(0x1a0)]),y(0x1,c[_0x3e99ac(0x1f9)](g))],C);function _0x815b(_0xe63794,_0xec31f1){const _0x347926=_0x3479();return _0x815b=function(_0x815bb2,_0x467e2e){_0x815bb2=_0x815bb2-0x192;let _0x5a4faf=_0x347926[_0x815bb2];return _0x5a4faf;},_0x815b(_0xe63794,_0xec31f1);}var F=Object[_0x3e99ac(0x1ec)],L=Object[_0x3e99ac(0x1a7)],Z=(_0x3aa78c,_0xc5e39c,_0x3a4c41)=>_0xc5e39c in _0x3aa78c?F(_0x3aa78c,_0xc5e39c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3a4c41}):_0x3aa78c[_0xc5e39c]=_0x3a4c41,W=(_0x56bab5,_0x5790e0,_0x3f0f80,_0x39110b)=>{const _0x459678=_0x3e99ac;for(var _0x57f105=_0x39110b>0x1?void 0x0:_0x39110b?L(_0x5790e0,_0x3f0f80):_0x5790e0,_0x5e6675=_0x56bab5[_0x459678(0x1d7)]-0x1,_0x31e38b;_0x5e6675>=0x0;_0x5e6675--)(_0x31e38b=_0x56bab5[_0x5e6675])&&(_0x57f105=_0x31e38b(_0x57f105)||_0x57f105);return _0x57f105;},O=(_0x1ba298,_0x4d9931)=>(_0xe34d7,_0x24b44e)=>_0x4d9931(_0xe34d7,_0x24b44e,_0x1ba298),N=(_0x55d98e,_0x193591,_0x49b4ba)=>Z(_0x55d98e,typeof _0x193591!='symbol'?_0x193591+'':_0x193591,_0x49b4ba);exports[_0x3e99ac(0x1f1)]=class extends c[_0x3e99ac(0x20b)]{constructor(_0x351d2c=D,_0x259ca0,_0x1f5890){const _0x1b341f=_0x3e99ac;super(),this[_0x1b341f(0x1f4)]=_0x351d2c,this[_0x1b341f(0x1a9)]=_0x259ca0,this['_configService']=_0x1f5890;const {..._0x34a8af}=c['merge']({},D,this['_config']);this['_configService'][_0x1b341f(0x201)](q,_0x34a8af);}[_0x3e99ac(0x1c8)](){const _0x511451=_0x3e99ac;[[g],[C],[p]][_0x511451(0x1fb)](_0x5a8df6=>{const _0x1a3378=_0x511451;this[_0x1a3378(0x1a9)][_0x1a3378(0x20e)](_0x5a8df6);});}[_0x3e99ac(0x1db)](){const _0x2becb5=_0x3e99ac;this[_0x2becb5(0x1a9)][_0x2becb5(0x1f6)](C),this[_0x2becb5(0x1a9)]['get'](p);}},N(exports[_0x3e99ac(0x1f1)],'pluginName',U),N(exports[_0x3e99ac(0x1f1)],_0x3e99ac(0x1e0),c[_0x3e99ac(0x19e)][_0x3e99ac(0x1c0)]),exports[_0x3e99ac(0x1f1)]=W([c[_0x3e99ac(0x207)](j[_0x3e99ac(0x1c2)],b[_0x3e99ac(0x1da)],T[_0x3e99ac(0x1bd)]),O(0x1,c['Inject'](c['Injector'])),O(0x2,c[_0x3e99ac(0x20c)])],exports[_0x3e99ac(0x1f1)]);
1
+ 'use strict';const _0x595a0c=_0x161a;(function(_0x238ccc,_0x2888c0){const _0xdb17e5=_0x161a,_0x411936=_0x238ccc();while(!![]){try{const _0xfd7506=-parseInt(_0xdb17e5(0x10a))/0x1+-parseInt(_0xdb17e5(0xee))/0x2+parseInt(_0xdb17e5(0xda))/0x3+-parseInt(_0xdb17e5(0x12b))/0x4*(-parseInt(_0xdb17e5(0xfc))/0x5)+parseInt(_0xdb17e5(0x12d))/0x6*(parseInt(_0xdb17e5(0xf0))/0x7)+-parseInt(_0xdb17e5(0x126))/0x8+-parseInt(_0xdb17e5(0x11a))/0x9*(-parseInt(_0xdb17e5(0xd5))/0xa);if(_0xfd7506===_0x2888c0)break;else _0x411936['push'](_0x411936['shift']());}catch(_0x58de1f){_0x411936['push'](_0x411936['shift']());}}}(_0x3f85,0xa7ff7));Object[_0x595a0c(0x129)](exports,Symbol[_0x595a0c(0xfa)],{'value':_0x595a0c(0x133)});const b=require(_0x595a0c(0x11e)),T=require(_0x595a0c(0x104)),c=require(_0x595a0c(0xef)),j=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require(_0x595a0c(0x128)),U=_0x595a0c(0x100);var I=(_0x21bce0=>(_0x21bce0[_0x21bce0['OpenOrReOpen']=0x0]=_0x595a0c(0x139),_0x21bce0[_0x21bce0['Solved']=0x1]=_0x595a0c(0xde),_0x21bce0[_0x21bce0['UNRECOGNIZED']=-0x1]=_0x595a0c(0xd1),_0x21bce0))(I||{}),v=(_0x3e9c05=>(_0x3e9c05[_0x3e9c05[_0x595a0c(0x12a)]=0x0]=_0x595a0c(0x12a),_0x3e9c05[_0x3e9c05[_0x595a0c(0x127)]=0x1]=_0x595a0c(0x127),_0x3e9c05[_0x3e9c05[_0x595a0c(0xc4)]=0x2]=_0x595a0c(0xc4),_0x3e9c05[_0x3e9c05[_0x595a0c(0xe5)]=0x3]=_0x595a0c(0xe5),_0x3e9c05[_0x3e9c05[_0x595a0c(0x115)]=0x4]=_0x595a0c(0x115),_0x3e9c05[_0x3e9c05['Solve']=0x5]=_0x595a0c(0xfe),_0x3e9c05[_0x3e9c05['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x3e9c05))(v||{});const f=_0x40d61f=>c[_0x595a0c(0x124)](new Date(+_0x40d61f))['format']('YYYY/MM/DD\x20HH:mm'),R=async(_0x5a055a,_0x2d2025)=>{const _0x2c101a=_0x595a0c,_0x56c2d3=_0x5a055a[_0x2c101a(0xff)](c['UserManagerService']),_0x712f2c=_0x5a055a['get'](P['HTTPService']);_0x2d2025[_0x2c101a(0xcf)](_0x2331ac=>{const _0x16c30f=_0x2c101a;_0x56c2d3[_0x16c30f(0xf4)](_0x2331ac)&&_0x2d2025['delete'](_0x2331ac);}),_0x2d2025[_0x2c101a(0xdd)]&&(await _0x712f2c[_0x2c101a(0xff)]('/universer-api/user/list',{'params':{'userIDs':[..._0x2d2025]}}))['body'][_0x2c101a(0xf9)][_0x2c101a(0xcf)](_0x24cc89=>{const _0x37d737=_0x2c101a;_0x24cc89&&_0x56c2d3[_0x37d737(0xca)](_0x24cc89);});};var $=Object[_0x595a0c(0x116)],E=(_0xfc5e59,_0x1a7d0a,_0x1b7032,_0x5b3293)=>{const _0x3d44b4=_0x595a0c;for(var _0x20d214=_0x5b3293>0x1?void 0x0:_0x5b3293?$(_0x1a7d0a,_0x1b7032):_0x1a7d0a,_0x256b84=_0xfc5e59[_0x3d44b4(0x102)]-0x1,_0xac0ed4;_0x256b84>=0x0;_0x256b84--)(_0xac0ed4=_0xfc5e59[_0x256b84])&&(_0x20d214=_0xac0ed4(_0x20d214)||_0x20d214);return _0x20d214;},S=(_0x473526,_0x55ca53)=>(_0x425236,_0x5469ef)=>_0x55ca53(_0x425236,_0x5469ef,_0x473526);let p=class extends c[_0x595a0c(0xe8)]{constructor(_0x2ec0d2,_0x2f7bf1,_0x1fe6d6,_0x38d930){const _0x32b00b=_0x595a0c;super(),this['_commentService']=_0x2ec0d2,this['_threadCommentModel']=_0x2f7bf1,this[_0x32b00b(0xd8)]=_0x1fe6d6,this['_injector']=_0x38d930,this[_0x32b00b(0x106)](),this[_0x32b00b(0x140)]();}[_0x595a0c(0x140)](){const _0x504ea0=_0x595a0c;this[_0x504ea0(0xf8)](this[_0x504ea0(0x101)][_0x504ea0(0xcc)][_0x504ea0(0x123)](w[_0x504ea0(0x12f)](0x10))[_0x504ea0(0x117)](_0x233d8b=>{const _0x2f49af=_0x504ea0,_0x57305b=new Set();_0x233d8b[_0x2f49af(0xcf)](_0x30b453=>{const _0x240745=_0x2f49af;switch(_0x30b453['type']){case _0x240745(0xc7):{const _0x4bfea0=_0x30b453[_0x240745(0xe3)]['personId'];_0x57305b[_0x240745(0xc7)](_0x4bfea0);break;}}}),R(this[_0x2f49af(0x130)],_0x57305b);}));}[_0x595a0c(0x106)](){const _0x539075=_0x595a0c;this[_0x539075(0xf8)](this[_0x539075(0xed)][_0x539075(0xcc)][_0x539075(0x117)](async _0x30d945=>{const _0x529cd3=_0x539075;var _0x14439b,_0x3fd795,_0x5a19c4,_0x3746a5;const _0x4ca142=(_0x14439b=this[_0x529cd3(0x101)][_0x529cd3(0x134)](_0x30d945[_0x529cd3(0x125)])[_0x529cd3(0xd3)](_0x19ed0f=>_0x19ed0f[_0x529cd3(0xe6)]===_0x30d945['threadId']))==null?void 0x0:_0x14439b['root'];if(!_0x4ca142)return;const {unitId:_0xea1ef6,subUnitId:_0x3e266a}=_0x4ca142;switch(_0x30d945['user']&&this['_userService'][_0x529cd3(0xca)](_0x30d945[_0x529cd3(0xe7)]),_0x30d945['type']){case v[_0x529cd3(0x127)]:break;case v[_0x529cd3(0xc4)]:{this[_0x529cd3(0x101)]['addComment'](_0xea1ef6,_0x3e266a,{'unitId':_0xea1ef6,'subUnitId':_0x3e266a,'ref':'','id':_0x30d945[_0x529cd3(0xfd)],'dT':f(+_0x30d945['createTimestamp']),'threadId':_0x30d945[_0x529cd3(0xe6)],'personId':(_0x5a19c4=(_0x3fd795=_0x30d945[_0x529cd3(0xe7)])==null?void 0x0:_0x3fd795[_0x529cd3(0x136)])!=null?_0x5a19c4:_0x30d945['userId'],'text':JSON[_0x529cd3(0x135)](_0x30d945['content']),'parentId':_0x4ca142['id']});break;}case v['Delete']:{const _0x4f929b=this['_threadCommentModel'][_0x529cd3(0xce)](_0xea1ef6,_0x3e266a,_0x30d945[_0x529cd3(0xfd)]);_0x4f929b&&_0x4f929b['parentId']&&this[_0x529cd3(0x101)][_0x529cd3(0x13f)](_0xea1ef6,_0x3e266a,_0x30d945['replyId']);break;}case v[_0x529cd3(0xe5)]:{this['_threadCommentModel']['updateComment'](_0xea1ef6,_0x3e266a,{'commentId':_0x30d945[_0x529cd3(0xfd)],'text':JSON[_0x529cd3(0x135)](_0x30d945[_0x529cd3(0xf2)])});break;}case v['Solve']:{const _0x1cf8bb=(_0x3746a5=this[_0x529cd3(0x101)][_0x529cd3(0x134)](_0x30d945[_0x529cd3(0x125)])[_0x529cd3(0xd3)](_0x3c0232=>_0x3c0232[_0x529cd3(0xe6)]===_0x30d945[_0x529cd3(0xe6)]))==null?void 0x0:_0x3746a5[_0x529cd3(0xf7)];_0x1cf8bb&&this[_0x529cd3(0x101)][_0x529cd3(0xf1)](_0xea1ef6,_0x3e266a,_0x1cf8bb['id'],_0x30d945[_0x529cd3(0x10b)]===I[_0x529cd3(0xde)]);break;}}}));}};p=E([S(0x0,c['Inject'](b[_0x595a0c(0xf3)])),S(0x1,c['Inject'](M[_0x595a0c(0xec)])),S(0x2,c['Inject'](c[_0x595a0c(0x141)])),S(0x3,c['Inject'](c['Injector']))],p);const q=_0x595a0c(0xd2),D={};var A=Object[_0x595a0c(0x116)],x=(_0x1ffd83,_0x187136,_0x104856,_0x32fe96)=>{for(var _0x5c4e3f=_0x32fe96>0x1?void 0x0:_0x32fe96?A(_0x187136,_0x104856):_0x187136,_0x33e2cf=_0x1ffd83['length']-0x1,_0x381ce2;_0x33e2cf>=0x0;_0x33e2cf--)(_0x381ce2=_0x1ffd83[_0x33e2cf])&&(_0x5c4e3f=_0x381ce2(_0x5c4e3f)||_0x5c4e3f);return _0x5c4e3f;},_=(_0x5cfc9e,_0x2c5a08)=>(_0x40928a,_0x205a82)=>_0x2c5a08(_0x40928a,_0x205a82,_0x5cfc9e);function Y(_0x5098aa,_0x6cc7ad){const _0x42b187=_0x595a0c,_0x1e5576=_0x5098aa['replies'][0x0];return{..._0x6cc7ad,'id':_0x1e5576[_0x42b187(0xfd)],'resolved':_0x5098aa[_0x42b187(0x10b)]===0x1,'dT':f(_0x1e5576[_0x42b187(0xc8)]),'personId':_0x1e5576['userId'],'threadId':_0x1e5576['threadId']};}function G(_0x127280,_0x2a207d,_0x54b5dc){const _0x2d7aa0=_0x595a0c;var _0x420208,_0x30f809;if(((_0x30f809=(_0x420208=_0x127280==null?void 0x0:_0x127280[_0x2d7aa0(0x13c)])==null?void 0x0:_0x420208['length'])!=null?_0x30f809:0x0)>0x0){const _0x1131ed=(_0x3b650d,_0x168424)=>({'id':_0x3b650d[_0x2d7aa0(0xfd)],'threadId':_0x3b650d[_0x2d7aa0(0xe6)],'dT':f(_0x3b650d['createTimestamp']),'personId':_0x3b650d[_0x2d7aa0(0x132)],'resolved':_0x127280['solved']===I[_0x2d7aa0(0xde)],'unitId':_0x2a207d,'subUnitId':_0x54b5dc,'text':JSON[_0x2d7aa0(0x135)](_0x3b650d[_0x2d7aa0(0xf2)]),'parentId':_0x168424}),_0x26acf2=_0x1131ed(_0x127280[_0x2d7aa0(0x13c)][0x0]);return{..._0x26acf2,'children':_0x127280[_0x2d7aa0(0x13c)][_0x2d7aa0(0x109)](0x1)['map'](_0x106fd1=>_0x1131ed(_0x106fd1,_0x26acf2['id']))};}return null;}let g=class{constructor(_0x2ef76a,_0x23ae84,_0x1ad920,_0x258122){const _0x187032=_0x595a0c;this[_0x187032(0xc5)]=_0x2ef76a,this[_0x187032(0xd8)]=_0x23ae84,this[_0x187032(0xc9)]=_0x1ad920,this['_injector']=_0x258122;}async[_0x595a0c(0xea)](_0x3970af){const _0x520092=_0x595a0c;var _0x3fc90c,_0x650187;const {parentId:_0x113888,unitId:_0x53a5e8,text:_0x47411a,threadId:_0x5ee29e}=_0x3970af,_0x51c080=(_0x650187=(_0x3fc90c=_0x47411a[_0x520092(0x10d)])==null?void 0x0:_0x3fc90c['filter'](_0xa79f97=>_0xa79f97[_0x520092(0x113)]===c[_0x520092(0xcb)][_0x520092(0x13a)])[_0x520092(0xdc)](_0x5670a3=>_0x5670a3[_0x520092(0x10f)]))!=null?_0x650187:[],_0x2d40d3=JSON[_0x520092(0xd6)](_0x47411a),_0x523de2=(await this[_0x520092(0xc9)][_0x520092(0xe0)](_0x53a5e8))[_0x520092(0x10e)]();if(_0x113888){const _0x39580b={'memberId':_0x523de2,'unitId':_0x53a5e8,'content':_0x2d40d3,'mention':_0x51c080,'threadId':_0x5ee29e},_0x137c51=(await this[_0x520092(0xc5)][_0x520092(0x12e)](_0x520092(0xe4)+_0x53a5e8+_0x520092(0x13d),{'body':_0x39580b}))[_0x520092(0x11f)][_0x520092(0xe1)];return{..._0x3970af,'id':_0x137c51['replyId'],'dT':c[_0x520092(0x124)](+_0x137c51['createTimestamp'])[_0x520092(0x114)](_0x520092(0x138)),'personId':_0x137c51[_0x520092(0x132)]};}else{const _0x26cf0a={'memberId':_0x523de2,'unitId':_0x53a5e8,'content':_0x2d40d3,'mention':_0x51c080},_0xd2557b=await this[_0x520092(0xc5)][_0x520092(0x12e)](_0x520092(0xe4)+_0x53a5e8+_0x520092(0x12c),{'body':_0x26cf0a});return Y(_0xd2557b[_0x520092(0x11f)][_0x520092(0x108)],_0x3970af);}}async[_0x595a0c(0x110)](_0x4e7bb1){const _0x2340db=_0x595a0c;var _0x42dc1c,_0x5c6967;const {text:_0x11ba1d,unitId:_0x43f8e8}=_0x4e7bb1,_0x5b4d8f=(_0x5c6967=(_0x42dc1c=_0x11ba1d[_0x2340db(0x10d)])==null?void 0x0:_0x42dc1c[_0x2340db(0xf6)](_0x1413fe=>_0x1413fe[_0x2340db(0x113)]===c[_0x2340db(0xcb)][_0x2340db(0x13a)])[_0x2340db(0xdc)](_0x4f51fd=>_0x4f51fd[_0x2340db(0x10f)]))!=null?_0x5c6967:[],_0x3ff45b=JSON[_0x2340db(0xd6)](_0x11ba1d),_0x995034=_0x4e7bb1[_0x2340db(0xe6)],_0x338d88=_0x4e7bb1['id'],_0x284b3e={'memberId':(await this[_0x2340db(0xc9)][_0x2340db(0xe0)](_0x43f8e8))[_0x2340db(0x10e)](),'unitId':_0x43f8e8,'threadId':_0x995034,'mention':_0x5b4d8f,'content':_0x3ff45b,'replyId':_0x338d88},_0xec899f=await this['_httpService'][_0x2340db(0x12e)](_0x2340db(0xe4)+_0x43f8e8+'/edit',{'body':_0x284b3e});return!_0xec899f['body']['error']||_0xec899f[_0x2340db(0x11f)][_0x2340db(0xf5)]['code']===0x1;}async[_0x595a0c(0xf1)](_0x177b6e){const _0x15a949=_0x595a0c,{unitId:_0x23bb9e}=_0x177b6e,_0x11610e=_0x177b6e[_0x15a949(0xe6)],_0x3e3894={'memberId':this[_0x15a949(0xd8)]['getCurrentUser']()[_0x15a949(0x136)],'unitId':_0x23bb9e,'threadId':_0x11610e,'solved':_0x177b6e[_0x15a949(0xd7)]?I[_0x15a949(0xde)]:I['OpenOrReOpen']},_0x5a0af5=await this[_0x15a949(0xc5)][_0x15a949(0x12e)](_0x15a949(0xe4)+_0x23bb9e+_0x15a949(0xe2),{'body':_0x3e3894});return!_0x5a0af5[_0x15a949(0x11f)]['error']||_0x5a0af5[_0x15a949(0x11f)][_0x15a949(0xf5)][_0x15a949(0x11c)]===0x1;}async[_0x595a0c(0x13f)](_0x2cf966,_0x3b9787,_0x4ba94b,_0x59b6d3){const _0x78a53a=_0x595a0c,_0x50872b={'memberId':(await this['_sessionService'][_0x78a53a(0xe0)](_0x2cf966))[_0x78a53a(0x10e)](),'threadId':_0x4ba94b,'replyId':_0x59b6d3,'unitId':_0x2cf966},_0x428aa1=await this[_0x78a53a(0xc5)][_0x78a53a(0x12e)](_0x78a53a(0xe4)+_0x2cf966+_0x78a53a(0x111),{'body':_0x50872b});return!_0x428aa1[_0x78a53a(0x11f)][_0x78a53a(0xf5)]||_0x428aa1['body'][_0x78a53a(0xf5)][_0x78a53a(0x11c)]===0x1;}async['listComments'](_0x516880,_0x5ae597,_0x30ce48){const _0x4158e2=_0x595a0c,_0x135a68={'unitId':_0x516880,'threadId':_0x30ce48},_0x4fb56b=await this[_0x4158e2(0xc5)][_0x4158e2(0x12e)](_0x4158e2(0xe4)+_0x516880+_0x4158e2(0x112),{'body':_0x135a68}),_0x1d6813=_0x30ce48[_0x4158e2(0xdc)](_0x2daa1c=>G(_0x4fb56b[_0x4158e2(0x11f)]['comments'][_0x2daa1c],_0x516880,_0x5ae597))[_0x4158e2(0xf6)](Boolean);return Object[_0x4158e2(0x10c)](_0x4fb56b[_0x4158e2(0x11f)][_0x4158e2(0xf9)])[_0x4158e2(0xcf)](_0x58cdf6=>{const _0x1f2813=_0x4158e2;this[_0x1f2813(0xd8)]['addUser'](_0x58cdf6);}),_0x1d6813;}[_0x595a0c(0x13b)](_0x2ab3e5){const _0x55b823=_0x595a0c;return{'id':_0x2ab3e5['id'],'threadId':_0x2ab3e5[_0x55b823(0xe6)],'ref':_0x2ab3e5[_0x55b823(0x121)]};}};g=x([_(0x0,c['Inject'](P[_0x595a0c(0x122)])),_(0x1,c['Inject'](c[_0x595a0c(0x141)])),_(0x2,c[_0x595a0c(0xd4)](b[_0x595a0c(0xd9)])),_(0x3,c['Inject'](c['Injector']))],g);function _0x3f85(){const _0x5a4474=['syncUpdateMutationToColla','deleteComment','_initUserSync','UserManagerService','Reply','_httpService','_configService','add','createTimestamp','_sessionService','addUser','CustomRangeType','commentUpdate$','UNIVER_UNKNOWN','getComment','forEach','IThreadCommentDataSourceService','UNRECOGNIZED','thread-comment-data-source.config','find','Inject','10IWwoHG','stringify','resolved','_userService','CollaborationSessionService','236832nbsyBv','merge','map','size','Solved','symbol','requireSession','reply','/solved','payload','/universer-api/comment/unit/','Edit','threadId','user','Disposable','_threadCommentDataSourceService','addComment','UniverInstanceType','ThreadCommentModel','_commentService','2678408ItGEwL','@univerjs/core','1239ZwmFWr','resolveComment','content','CommentService','getUser','error','filter','root','disposeWithMe','users','toStringTag','DependentOn','1908070EITljP','replyId','Solve','get','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_threadCommentModel','length','UniverThreadCommentDataSourcePlugin','@univerjs-pro/license','UniverLicensePlugin','_init','onStarting','comment','slice','1293723CoMVhE','solved','values','customRanges','getMemberID','rangeId','updateComment','/delete','/list','rangeType','format','Delete','getOwnPropertyDescriptor','subscribe','_threadCommentDataSource','dataSource','22456863UHVUcA','onReady','code','IConfigService','@univerjs-pro/collaboration-client','body','setConfig','ref','HTTPService','pipe','dayjs','unitId','9432384OntXGT','Add','@univerjs/network','defineProperty','Unknown','12MMKvlk','/add','26478lzDjlm','post','bufferTime','_injector','type','userId','Module','getUnit','parse','userID','UniverCollaborationClientPlugin','YYYY/MM/DD\x20HH:mm','OpenOrReOpen','COMMENT','saveCommentToSnapshot','replies','/reply'];_0x3f85=function(){return _0x5a4474;};return _0x3f85();}var H=Object[_0x595a0c(0x116)],J=(_0xd3122f,_0xf06eae,_0x341764,_0x38737d)=>{for(var _0x49cd9e=_0x38737d>0x1?void 0x0:_0x38737d?H(_0xf06eae,_0x341764):_0xf06eae,_0x49825e=_0xd3122f['length']-0x1,_0x33cf08;_0x49825e>=0x0;_0x49825e--)(_0x33cf08=_0xd3122f[_0x49825e])&&(_0x49cd9e=_0x33cf08(_0x49cd9e)||_0x49cd9e);return _0x49cd9e;},y=(_0x19f321,_0x20da55)=>(_0x29f03b,_0x14e8b9)=>_0x20da55(_0x29f03b,_0x14e8b9,_0x19f321);let C=class extends c['Disposable']{constructor(_0x5ce865,_0x549da0){const _0x321708=_0x595a0c;super(),this['_threadCommentDataSourceService']=_0x5ce865,this[_0x321708(0x118)]=_0x549da0,this['_initDataSource']();}['_initDataSource'](){const _0x1211b5=_0x595a0c;this[_0x1211b5(0xe9)][_0x1211b5(0x119)]=this['_threadCommentDataSource'],this['_threadCommentDataSourceService'][_0x1211b5(0x13e)]=!0x1;}};C=J([y(0x0,M[_0x595a0c(0xd0)]),y(0x1,c['Inject'](g))],C);function _0x161a(_0x5010c7,_0x371497){const _0x3f855d=_0x3f85();return _0x161a=function(_0x161af4,_0x480b43){_0x161af4=_0x161af4-0xc4;let _0x3ecd10=_0x3f855d[_0x161af4];return _0x3ecd10;},_0x161a(_0x5010c7,_0x371497);}var F=Object['defineProperty'],L=Object[_0x595a0c(0x116)],Z=(_0x564031,_0x21320b,_0x4bbd90)=>_0x21320b in _0x564031?F(_0x564031,_0x21320b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4bbd90}):_0x564031[_0x21320b]=_0x4bbd90,W=(_0x22d43d,_0x49b5e2,_0x1f9b44,_0x3187d9)=>{for(var _0x60b34d=_0x3187d9>0x1?void 0x0:_0x3187d9?L(_0x49b5e2,_0x1f9b44):_0x49b5e2,_0x3889ad=_0x22d43d['length']-0x1,_0x20c8c0;_0x3889ad>=0x0;_0x3889ad--)(_0x20c8c0=_0x22d43d[_0x3889ad])&&(_0x60b34d=_0x20c8c0(_0x60b34d)||_0x60b34d);return _0x60b34d;},O=(_0x4ef85c,_0x164965)=>(_0x2cbb2b,_0xd37f97)=>_0x164965(_0x2cbb2b,_0xd37f97,_0x4ef85c),N=(_0xbd9a03,_0x460bd3,_0x1c9120)=>Z(_0xbd9a03,typeof _0x460bd3!=_0x595a0c(0xdf)?_0x460bd3+'':_0x460bd3,_0x1c9120);exports[_0x595a0c(0x103)]=class extends c['Plugin']{constructor(_0x511434=D,_0x4c87fb,_0x49eb47){const _0x42abf2=_0x595a0c;super(),this['_config']=_0x511434,this[_0x42abf2(0x130)]=_0x4c87fb,this[_0x42abf2(0xc6)]=_0x49eb47;const {..._0x3b2889}=c[_0x42abf2(0xdb)]({},D,this['_config']);this['_configService'][_0x42abf2(0x120)](q,_0x3b2889);}[_0x595a0c(0x107)](){const _0x2461b7=_0x595a0c;[[g],[C],[p]][_0x2461b7(0xcf)](_0x47b929=>{const _0x3966b8=_0x2461b7;this['_injector'][_0x3966b8(0xc7)](_0x47b929);});}[_0x595a0c(0x11b)](){const _0x29bccf=_0x595a0c;this[_0x29bccf(0x130)][_0x29bccf(0xff)](C),this['_injector'][_0x29bccf(0xff)](p);}},N(exports[_0x595a0c(0x103)],'pluginName',U),N(exports['UniverThreadCommentDataSourcePlugin'],_0x595a0c(0x131),c[_0x595a0c(0xeb)][_0x595a0c(0xcd)]),exports[_0x595a0c(0x103)]=W([c[_0x595a0c(0xfb)](j['UniverThreadCommentUIPlugin'],b[_0x595a0c(0x137)],T[_0x595a0c(0x105)]),O(0x1,c[_0x595a0c(0xd4)](c['Injector'])),O(0x2,c[_0x595a0c(0x11d)])],exports[_0x595a0c(0x103)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x3cac96=_0x4130;(function(_0x3338bc,_0x4e9786){const _0x45f60a=_0x4130,_0x131e88=_0x3338bc();while(!![]){try{const _0x585a85=-parseInt(_0x45f60a(0x177))/0x1*(parseInt(_0x45f60a(0x167))/0x2)+parseInt(_0x45f60a(0x199))/0x3*(-parseInt(_0x45f60a(0x16d))/0x4)+-parseInt(_0x45f60a(0x197))/0x5+parseInt(_0x45f60a(0x178))/0x6+-parseInt(_0x45f60a(0x1a6))/0x7*(parseInt(_0x45f60a(0x161))/0x8)+-parseInt(_0x45f60a(0x17c))/0x9+parseInt(_0x45f60a(0x196))/0xa;if(_0x585a85===_0x4e9786)break;else _0x131e88['push'](_0x131e88['shift']());}catch(_0x3934d4){_0x131e88['push'](_0x131e88['shift']());}}}(_0x2eb3,0xd6c5e));import{CommentService as _0x340a23,CollaborationSessionService as _0x17d1c9,UniverCollaborationClientPlugin as _0x193564}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x51f241}from'@univerjs-pro/license';function _0x2eb3(){const _0x12038d=['delete','_config','parse','37769360AgysLb','2061415xKOGJY','userId','6tfGUhQ','Solve','addUser','users','_threadCommentDataSourceService','content','updateComment','body','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getUnit','/universer-api/comment/unit/','pipe','add','7MNYCEp','code','Solved','threadId','/edit','requireSession','format','getComment','Add','_commentService','_threadCommentDataSource','commentUpdate$','_initUserSync','payload','_configService','/universer-api/user/list','getOwnPropertyDescriptor','_threadCommentModel','rangeType','post','_initDataSource','resolved','resolveComment','root','Unknown','Reply','thread-comment-data-source.config','find','_init','OpenOrReOpen','forEach','12524384wEANbe','stringify','setConfig','getMemberID','disposeWithMe','syncUpdateMutationToColla','1115858sHIfFg','addComment','user','_userService','reply','_httpService','2347196HQBgDk','filter','deleteComment','UNRECOGNIZED','/delete','size','Delete','saveCommentToSnapshot','customRanges','unitId','1vHDuwD','7569138UjdtiP','listComments','subscribe','error','4044519OlbgFf','length','ref','get','rangeId','replies','type','comment','UNIVER_UNKNOWN','replyId','onStarting','COMMENT','map','personId','_sessionService','_injector','userID','createTimestamp','solved','onReady','dataSource','getUser','parentId'];_0x2eb3=function(){return _0x12038d;};return _0x2eb3();}import{dayjs as _0x2b26c9,UserManagerService as _0x52a82c,Inject as _0x569163,Injector as _0x4ea2ae,Disposable as _0x1cd6bf,CustomRangeType as _0x4714d7,UniverInstanceType as _0xb368d6,DependentOn as _0x5a44e5,IConfigService as _0x32feb7,Plugin as _0x41b1ca,merge as _0x175110}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x29a324}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2adaec,IThreadCommentDataSourceService as _0x285f19}from'@univerjs/thread-comment';import{bufferTime as _0x23ed52}from'rxjs';import{HTTPService as _0x4348c0}from'@univerjs/network';const W=_0x3cac96(0x1a1);var I=(_0x28fa3a=>(_0x28fa3a[_0x28fa3a['OpenOrReOpen']=0x0]=_0x3cac96(0x15f),_0x28fa3a[_0x28fa3a[_0x3cac96(0x1a8)]=0x1]=_0x3cac96(0x1a8),_0x28fa3a[_0x28fa3a['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x28fa3a))(I||{}),v=(_0x46c197=>(_0x46c197[_0x46c197[_0x3cac96(0x1be)]=0x0]=_0x3cac96(0x1be),_0x46c197[_0x46c197['Add']=0x1]=_0x3cac96(0x1ae),_0x46c197[_0x46c197[_0x3cac96(0x15b)]=0x2]='Reply',_0x46c197[_0x46c197['Edit']=0x3]='Edit',_0x46c197[_0x46c197[_0x3cac96(0x173)]=0x4]=_0x3cac96(0x173),_0x46c197[_0x46c197[_0x3cac96(0x19a)]=0x5]='Solve',_0x46c197[_0x46c197[_0x3cac96(0x170)]=-0x1]=_0x3cac96(0x170),_0x46c197))(v||{});const D=_0x150173=>_0x2b26c9(new Date(+_0x150173))[_0x3cac96(0x1ac)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x2b2f9d,_0x52b104)=>{const _0x295be4=_0x3cac96,_0x1e09ed=_0x2b2f9d[_0x295be4(0x17f)](_0x52a82c),_0x38d1f4=_0x2b2f9d[_0x295be4(0x17f)](_0x4348c0);_0x52b104['forEach'](_0x2e9da6=>{const _0x50b583=_0x295be4;_0x1e09ed[_0x50b583(0x191)](_0x2e9da6)&&_0x52b104[_0x50b583(0x193)](_0x2e9da6);}),_0x52b104[_0x295be4(0x172)]&&(await _0x38d1f4[_0x295be4(0x17f)](_0x295be4(0x1b5),{'params':{'userIDs':[..._0x52b104]}}))[_0x295be4(0x1a0)][_0x295be4(0x19c)][_0x295be4(0x160)](_0x16f488=>{const _0x5480f7=_0x295be4;_0x16f488&&_0x1e09ed[_0x5480f7(0x19b)](_0x16f488);});};var K=Object[_0x3cac96(0x1b6)],V=(_0x5d155b,_0x21af45,_0x20c07f,_0x427d17)=>{const _0x12cb7c=_0x3cac96;for(var _0xa717dc=_0x427d17>0x1?void 0x0:_0x427d17?K(_0x21af45,_0x20c07f):_0x21af45,_0x38d8bf=_0x5d155b[_0x12cb7c(0x17d)]-0x1,_0x3d580a;_0x38d8bf>=0x0;_0x38d8bf--)(_0x3d580a=_0x5d155b[_0x38d8bf])&&(_0xa717dc=_0x3d580a(_0xa717dc)||_0xa717dc);return _0xa717dc;},p=(_0xb41d55,_0x1a9db6)=>(_0x23f2e0,_0x1caa0a)=>_0x1a9db6(_0x23f2e0,_0x1caa0a,_0xb41d55);let S=class extends _0x1cd6bf{constructor(_0x9ee977,_0x1d448d,_0x43985a,_0x210f1f){const _0x3e0fb8=_0x3cac96;super(),this[_0x3e0fb8(0x1af)]=_0x9ee977,this['_threadCommentModel']=_0x1d448d,this[_0x3e0fb8(0x16a)]=_0x43985a,this[_0x3e0fb8(0x18b)]=_0x210f1f,this['_init'](),this['_initUserSync']();}[_0x3cac96(0x1b2)](){const _0x3bae03=_0x3cac96;this['disposeWithMe'](this[_0x3bae03(0x1b7)][_0x3bae03(0x1b1)][_0x3bae03(0x1a4)](_0x23ed52(0x10))['subscribe'](_0x54aa1f=>{const _0x6bf67=_0x3bae03,_0x3bf1f1=new Set();_0x54aa1f[_0x6bf67(0x160)](_0x5a1bda=>{const _0x25a93a=_0x6bf67;switch(_0x5a1bda[_0x25a93a(0x182)]){case _0x25a93a(0x1a5):{const _0x1c1666=_0x5a1bda[_0x25a93a(0x1b3)][_0x25a93a(0x189)];_0x3bf1f1['add'](_0x1c1666);break;}}}),B(this['_injector'],_0x3bf1f1);}));}[_0x3cac96(0x15e)](){const _0x2a4862=_0x3cac96;this[_0x2a4862(0x165)](this[_0x2a4862(0x1af)][_0x2a4862(0x1b1)][_0x2a4862(0x17a)](async _0x25627d=>{const _0x426001=_0x2a4862;var _0x3d57e1,_0xb88938,_0x4d08d7,_0x1ce73f;const _0x3ce264=(_0x3d57e1=this[_0x426001(0x1b7)][_0x426001(0x1a2)](_0x25627d[_0x426001(0x176)])['find'](_0x4d75ef=>_0x4d75ef['threadId']===_0x25627d[_0x426001(0x1a9)]))==null?void 0x0:_0x3d57e1[_0x426001(0x1bd)];if(!_0x3ce264)return;const {unitId:_0x106381,subUnitId:_0x4c221e}=_0x3ce264;switch(_0x25627d[_0x426001(0x169)]&&this[_0x426001(0x16a)]['addUser'](_0x25627d[_0x426001(0x169)]),_0x25627d['type']){case v['Add']:break;case v['Reply']:{this[_0x426001(0x1b7)][_0x426001(0x168)](_0x106381,_0x4c221e,{'unitId':_0x106381,'subUnitId':_0x4c221e,'ref':'','id':_0x25627d['replyId'],'dT':D(+_0x25627d[_0x426001(0x18d)]),'threadId':_0x25627d['threadId'],'personId':(_0x4d08d7=(_0xb88938=_0x25627d[_0x426001(0x169)])==null?void 0x0:_0xb88938['userID'])!=null?_0x4d08d7:_0x25627d[_0x426001(0x198)],'text':JSON[_0x426001(0x195)](_0x25627d['content']),'parentId':_0x3ce264['id']});break;}case v['Delete']:{const _0x4fef38=this[_0x426001(0x1b7)][_0x426001(0x1ad)](_0x106381,_0x4c221e,_0x25627d['replyId']);_0x4fef38&&_0x4fef38[_0x426001(0x192)]&&this[_0x426001(0x1b7)][_0x426001(0x16f)](_0x106381,_0x4c221e,_0x25627d[_0x426001(0x185)]);break;}case v['Edit']:{this[_0x426001(0x1b7)][_0x426001(0x19f)](_0x106381,_0x4c221e,{'commentId':_0x25627d['replyId'],'text':JSON[_0x426001(0x195)](_0x25627d[_0x426001(0x19e)])});break;}case v[_0x426001(0x19a)]:{const _0x5094f8=(_0x1ce73f=this[_0x426001(0x1b7)]['getUnit'](_0x25627d[_0x426001(0x176)])[_0x426001(0x15d)](_0x1f2907=>_0x1f2907[_0x426001(0x1a9)]===_0x25627d[_0x426001(0x1a9)]))==null?void 0x0:_0x1ce73f[_0x426001(0x1bd)];_0x5094f8&&this['_threadCommentModel'][_0x426001(0x1bc)](_0x106381,_0x4c221e,_0x5094f8['id'],_0x25627d['solved']===I[_0x426001(0x1a8)]);break;}}}));}};S=V([p(0x0,_0x569163(_0x340a23)),p(0x1,_0x569163(_0x2adaec)),p(0x2,_0x569163(_0x52a82c)),p(0x3,_0x569163(_0x4ea2ae))],S);const z=_0x3cac96(0x15c),M={};var k=Object[_0x3cac96(0x1b6)],Q=(_0x3180ca,_0x1fac97,_0x24d25f,_0x4b96a7)=>{const _0x229d7b=_0x3cac96;for(var _0x1a05fa=_0x4b96a7>0x1?void 0x0:_0x4b96a7?k(_0x1fac97,_0x24d25f):_0x1fac97,_0x2158f8=_0x3180ca[_0x229d7b(0x17d)]-0x1,_0x5e6a04;_0x2158f8>=0x0;_0x2158f8--)(_0x5e6a04=_0x3180ca[_0x2158f8])&&(_0x1a05fa=_0x5e6a04(_0x1a05fa)||_0x1a05fa);return _0x1a05fa;},_=(_0x57a73a,_0x420933)=>(_0x307be6,_0x125d5d)=>_0x420933(_0x307be6,_0x125d5d,_0x57a73a);function X(_0x12c581,_0x3bbb96){const _0x73d444=_0x3cac96,_0x36b7f7=_0x12c581[_0x73d444(0x181)][0x0];return{..._0x3bbb96,'id':_0x36b7f7[_0x73d444(0x185)],'resolved':_0x12c581['solved']===0x1,'dT':D(_0x36b7f7[_0x73d444(0x18d)]),'personId':_0x36b7f7[_0x73d444(0x198)],'threadId':_0x36b7f7[_0x73d444(0x1a9)]};}function ee(_0x26a120,_0x50a3f2,_0x12363a){const _0x288413=_0x3cac96;var _0x519d41,_0x469531;if(((_0x469531=(_0x519d41=_0x26a120==null?void 0x0:_0x26a120['replies'])==null?void 0x0:_0x519d41['length'])!=null?_0x469531:0x0)>0x0){const _0x15c40f=(_0x1334c2,_0x37590b)=>({'id':_0x1334c2['replyId'],'threadId':_0x1334c2['threadId'],'dT':D(_0x1334c2[_0x288413(0x18d)]),'personId':_0x1334c2['userId'],'resolved':_0x26a120[_0x288413(0x18e)]===I[_0x288413(0x1a8)],'unitId':_0x50a3f2,'subUnitId':_0x12363a,'text':JSON[_0x288413(0x195)](_0x1334c2[_0x288413(0x19e)]),'parentId':_0x37590b}),_0x51f2bd=_0x15c40f(_0x26a120[_0x288413(0x181)][0x0]);return{..._0x51f2bd,'children':_0x26a120[_0x288413(0x181)]['slice'](0x1)['map'](_0x2842d0=>_0x15c40f(_0x2842d0,_0x51f2bd['id']))};}return null;}let f=class{constructor(_0x3e1689,_0xa95ba3,_0x594200,_0xdbda1d){const _0x25d419=_0x3cac96;this[_0x25d419(0x16c)]=_0x3e1689,this['_userService']=_0xa95ba3,this[_0x25d419(0x18a)]=_0x594200,this[_0x25d419(0x18b)]=_0xdbda1d;}async['addComment'](_0x547189){const _0x2dbb5a=_0x3cac96;var _0x20fd3e,_0x43f12c;const {parentId:_0x4cb3fc,unitId:_0x354212,text:_0x3c4ec8,threadId:_0x494029}=_0x547189,_0x1a0688=(_0x43f12c=(_0x20fd3e=_0x3c4ec8[_0x2dbb5a(0x175)])==null?void 0x0:_0x20fd3e[_0x2dbb5a(0x16e)](_0x347c98=>_0x347c98[_0x2dbb5a(0x1b8)]===_0x4714d7['COMMENT'])[_0x2dbb5a(0x188)](_0x322b8d=>_0x322b8d[_0x2dbb5a(0x180)]))!=null?_0x43f12c:[],_0x40a90c=JSON[_0x2dbb5a(0x162)](_0x3c4ec8),_0x2a2c10=(await this[_0x2dbb5a(0x18a)]['requireSession'](_0x354212))[_0x2dbb5a(0x164)]();if(_0x4cb3fc){const _0x12922e={'memberId':_0x2a2c10,'unitId':_0x354212,'content':_0x40a90c,'mention':_0x1a0688,'threadId':_0x494029},_0x177c5e=(await this[_0x2dbb5a(0x16c)][_0x2dbb5a(0x1b9)](_0x2dbb5a(0x1a3)+_0x354212+'/reply',{'body':_0x12922e}))[_0x2dbb5a(0x1a0)][_0x2dbb5a(0x16b)];return{..._0x547189,'id':_0x177c5e['replyId'],'dT':_0x2b26c9(+_0x177c5e[_0x2dbb5a(0x18d)])[_0x2dbb5a(0x1ac)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x177c5e['userId']};}else{const _0x1afc57={'memberId':_0x2a2c10,'unitId':_0x354212,'content':_0x40a90c,'mention':_0x1a0688},_0x41fd3a=await this[_0x2dbb5a(0x16c)][_0x2dbb5a(0x1b9)](_0x2dbb5a(0x1a3)+_0x354212+'/add',{'body':_0x1afc57});return X(_0x41fd3a[_0x2dbb5a(0x1a0)][_0x2dbb5a(0x183)],_0x547189);}}async['updateComment'](_0x184cd4){const _0x1e77ac=_0x3cac96;var _0x18fc32,_0x343e38;const {text:_0x14a536,unitId:_0x5db8b5}=_0x184cd4,_0x3f4520=(_0x343e38=(_0x18fc32=_0x14a536[_0x1e77ac(0x175)])==null?void 0x0:_0x18fc32[_0x1e77ac(0x16e)](_0x456224=>_0x456224[_0x1e77ac(0x1b8)]===_0x4714d7[_0x1e77ac(0x187)])[_0x1e77ac(0x188)](_0xdf3ec7=>_0xdf3ec7[_0x1e77ac(0x180)]))!=null?_0x343e38:[],_0x3a4c0d=JSON[_0x1e77ac(0x162)](_0x14a536),_0x1c0339=_0x184cd4[_0x1e77ac(0x1a9)],_0xf35ca=_0x184cd4['id'],_0x5a035b={'memberId':(await this[_0x1e77ac(0x18a)][_0x1e77ac(0x1ab)](_0x5db8b5))[_0x1e77ac(0x164)](),'unitId':_0x5db8b5,'threadId':_0x1c0339,'mention':_0x3f4520,'content':_0x3a4c0d,'replyId':_0xf35ca},_0x5796c6=await this['_httpService'][_0x1e77ac(0x1b9)](_0x1e77ac(0x1a3)+_0x5db8b5+_0x1e77ac(0x1aa),{'body':_0x5a035b});return!_0x5796c6[_0x1e77ac(0x1a0)]['error']||_0x5796c6['body'][_0x1e77ac(0x17b)][_0x1e77ac(0x1a7)]===0x1;}async[_0x3cac96(0x1bc)](_0x393820){const _0x708331=_0x3cac96,{unitId:_0x4bb250}=_0x393820,_0x83bee3=_0x393820['threadId'],_0x2c675d={'memberId':this[_0x708331(0x16a)]['getCurrentUser']()[_0x708331(0x18c)],'unitId':_0x4bb250,'threadId':_0x83bee3,'solved':_0x393820[_0x708331(0x1bb)]?I[_0x708331(0x1a8)]:I[_0x708331(0x15f)]},_0xe6df01=await this[_0x708331(0x16c)]['post']('/universer-api/comment/unit/'+_0x4bb250+'/solved',{'body':_0x2c675d});return!_0xe6df01[_0x708331(0x1a0)][_0x708331(0x17b)]||_0xe6df01[_0x708331(0x1a0)][_0x708331(0x17b)]['code']===0x1;}async[_0x3cac96(0x16f)](_0x214dff,_0x2de9b2,_0x313ed7,_0x228c38){const _0x59b401=_0x3cac96,_0x593e9c={'memberId':(await this[_0x59b401(0x18a)][_0x59b401(0x1ab)](_0x214dff))['getMemberID'](),'threadId':_0x313ed7,'replyId':_0x228c38,'unitId':_0x214dff},_0x1a4064=await this[_0x59b401(0x16c)][_0x59b401(0x1b9)](_0x59b401(0x1a3)+_0x214dff+_0x59b401(0x171),{'body':_0x593e9c});return!_0x1a4064['body'][_0x59b401(0x17b)]||_0x1a4064['body'][_0x59b401(0x17b)][_0x59b401(0x1a7)]===0x1;}async[_0x3cac96(0x179)](_0x203e73,_0x467baf,_0x1013d1){const _0x34fcd3=_0x3cac96,_0x5492fa={'unitId':_0x203e73,'threadId':_0x1013d1},_0x582d24=await this[_0x34fcd3(0x16c)][_0x34fcd3(0x1b9)](_0x34fcd3(0x1a3)+_0x203e73+'/list',{'body':_0x5492fa}),_0x40d8f1=_0x1013d1[_0x34fcd3(0x188)](_0x1b96f9=>ee(_0x582d24[_0x34fcd3(0x1a0)]['comments'][_0x1b96f9],_0x203e73,_0x467baf))[_0x34fcd3(0x16e)](Boolean);return Object['values'](_0x582d24[_0x34fcd3(0x1a0)][_0x34fcd3(0x19c)])[_0x34fcd3(0x160)](_0x306f0b=>{const _0x35f887=_0x34fcd3;this[_0x35f887(0x16a)][_0x35f887(0x19b)](_0x306f0b);}),_0x40d8f1;}[_0x3cac96(0x174)](_0x243160){const _0x4ab952=_0x3cac96;return{'id':_0x243160['id'],'threadId':_0x243160[_0x4ab952(0x1a9)],'ref':_0x243160[_0x4ab952(0x17e)]};}};f=Q([_(0x0,_0x569163(_0x4348c0)),_(0x1,_0x569163(_0x52a82c)),_(0x2,_0x569163(_0x17d1c9)),_(0x3,_0x569163(_0x4ea2ae))],f);var re=Object[_0x3cac96(0x1b6)],te=(_0x501340,_0x18b638,_0x52d2c5,_0x1d7b2b)=>{const _0x31b31d=_0x3cac96;for(var _0x478c69=_0x1d7b2b>0x1?void 0x0:_0x1d7b2b?re(_0x18b638,_0x52d2c5):_0x18b638,_0x322fcb=_0x501340[_0x31b31d(0x17d)]-0x1,_0x19311c;_0x322fcb>=0x0;_0x322fcb--)(_0x19311c=_0x501340[_0x322fcb])&&(_0x478c69=_0x19311c(_0x478c69)||_0x478c69);return _0x478c69;},N=(_0xff2a29,_0x49a385)=>(_0x110aa1,_0x17c8bb)=>_0x49a385(_0x110aa1,_0x17c8bb,_0xff2a29);let g=class extends _0x1cd6bf{constructor(_0x213f28,_0x4eeeab){const _0x46e38d=_0x3cac96;super(),this['_threadCommentDataSourceService']=_0x213f28,this['_threadCommentDataSource']=_0x4eeeab,this[_0x46e38d(0x1ba)]();}[_0x3cac96(0x1ba)](){const _0x3488d1=_0x3cac96;this[_0x3488d1(0x19d)][_0x3488d1(0x190)]=this[_0x3488d1(0x1b0)],this['_threadCommentDataSourceService'][_0x3488d1(0x166)]=!0x1;}};g=te([N(0x0,_0x285f19),N(0x1,_0x569163(f))],g);var se=Object['defineProperty'],oe=Object['getOwnPropertyDescriptor'],ne=(_0x3c0202,_0x547bfb,_0x2f29d2)=>_0x547bfb in _0x3c0202?se(_0x3c0202,_0x547bfb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2f29d2}):_0x3c0202[_0x547bfb]=_0x2f29d2,ie=(_0x41fb75,_0x577c91,_0xc0f51d,_0x270eef)=>{const _0x4e29bf=_0x3cac96;for(var _0x7f2b1d=_0x270eef>0x1?void 0x0:_0x270eef?oe(_0x577c91,_0xc0f51d):_0x577c91,_0x418d6d=_0x41fb75[_0x4e29bf(0x17d)]-0x1,_0x5a4d79;_0x418d6d>=0x0;_0x418d6d--)(_0x5a4d79=_0x41fb75[_0x418d6d])&&(_0x7f2b1d=_0x5a4d79(_0x7f2b1d)||_0x7f2b1d);return _0x7f2b1d;},w=(_0x27b2ff,_0x1afd28)=>(_0x285d09,_0xaeded7)=>_0x1afd28(_0x285d09,_0xaeded7,_0x27b2ff),$=(_0x2e6bf2,_0x5d59ec,_0x1c7bda)=>ne(_0x2e6bf2,typeof _0x5d59ec!='symbol'?_0x5d59ec+'':_0x5d59ec,_0x1c7bda);let b=class extends _0x41b1ca{constructor(_0x237ffc=M,_0x218b7a,_0x236c24){const _0x26d00b=_0x3cac96;super(),this['_config']=_0x237ffc,this[_0x26d00b(0x18b)]=_0x218b7a,this[_0x26d00b(0x1b4)]=_0x236c24;const {..._0x34f77f}=_0x175110({},M,this[_0x26d00b(0x194)]);this[_0x26d00b(0x1b4)][_0x26d00b(0x163)](z,_0x34f77f);}[_0x3cac96(0x186)](){const _0x2ffca4=_0x3cac96;[[f],[g],[S]][_0x2ffca4(0x160)](_0x42a0b4=>{const _0x478fb0=_0x2ffca4;this[_0x478fb0(0x18b)][_0x478fb0(0x1a5)](_0x42a0b4);});}[_0x3cac96(0x18f)](){const _0x51ec0a=_0x3cac96;this[_0x51ec0a(0x18b)][_0x51ec0a(0x17f)](g),this[_0x51ec0a(0x18b)]['get'](S);}};function _0x4130(_0x48fa7b,_0x523dff){const _0x2eb36a=_0x2eb3();return _0x4130=function(_0x413097,_0x7a7d9c){_0x413097=_0x413097-0x15b;let _0xe70bc4=_0x2eb36a[_0x413097];return _0xe70bc4;},_0x4130(_0x48fa7b,_0x523dff);}$(b,'pluginName',W),$(b,_0x3cac96(0x182),_0xb368d6[_0x3cac96(0x184)]),b=ie([_0x5a44e5(_0x29a324,_0x193564,_0x51f241),w(0x1,_0x569163(_0x4ea2ae)),w(0x2,_0x32feb7)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x46fe98=_0x4cb1;(function(_0x357f21,_0x270380){const _0x52667c=_0x4cb1,_0x322390=_0x357f21();while(!![]){try{const _0x2d52f=-parseInt(_0x52667c(0x10c))/0x1+-parseInt(_0x52667c(0xe2))/0x2*(-parseInt(_0x52667c(0xf0))/0x3)+parseInt(_0x52667c(0x13e))/0x4*(parseInt(_0x52667c(0x131))/0x5)+parseInt(_0x52667c(0x137))/0x6+parseInt(_0x52667c(0x116))/0x7+-parseInt(_0x52667c(0x110))/0x8*(-parseInt(_0x52667c(0x10e))/0x9)+-parseInt(_0x52667c(0xed))/0xa;if(_0x2d52f===_0x270380)break;else _0x322390['push'](_0x322390['shift']());}catch(_0x4b26d3){_0x322390['push'](_0x322390['shift']());}}}(_0x47c6,0x42465));import{CommentService as _0x311f50,CollaborationSessionService as _0x5d4e31,UniverCollaborationClientPlugin as _0x4bccec}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x3559a3}from'@univerjs-pro/license';import{dayjs as _0x1fdba,UserManagerService as _0xaee3d1,Inject as _0xd8e16e,Injector as _0x3aac1a,Disposable as _0x9d9fe,CustomRangeType as _0x171c7e,UniverInstanceType as _0x1b0f42,DependentOn as _0xabdba,IConfigService as _0x1ed246,Plugin as _0xc49e69,merge as _0x43fbb8}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x103552}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x3c9912,IThreadCommentDataSourceService as _0x17ba36}from'@univerjs/thread-comment';import{bufferTime as _0x2bd82e}from'rxjs';import{HTTPService as _0x4c2fd4}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x4e96f3=>(_0x4e96f3[_0x4e96f3[_0x46fe98(0x13a)]=0x0]=_0x46fe98(0x13a),_0x4e96f3[_0x4e96f3[_0x46fe98(0x11f)]=0x1]=_0x46fe98(0x11f),_0x4e96f3[_0x4e96f3[_0x46fe98(0x12a)]=-0x1]=_0x46fe98(0x12a),_0x4e96f3))(I||{}),v=(_0x583e3c=>(_0x583e3c[_0x583e3c[_0x46fe98(0x112)]=0x0]='Unknown',_0x583e3c[_0x583e3c[_0x46fe98(0x125)]=0x1]=_0x46fe98(0x125),_0x583e3c[_0x583e3c[_0x46fe98(0x143)]=0x2]=_0x46fe98(0x143),_0x583e3c[_0x583e3c[_0x46fe98(0x126)]=0x3]=_0x46fe98(0x126),_0x583e3c[_0x583e3c[_0x46fe98(0x129)]=0x4]=_0x46fe98(0x129),_0x583e3c[_0x583e3c['Solve']=0x5]=_0x46fe98(0x120),_0x583e3c[_0x583e3c[_0x46fe98(0x12a)]=-0x1]='UNRECOGNIZED',_0x583e3c))(v||{});function _0x47c6(){const _0x447cb0=['resolveComment','getUnit','disposeWithMe','dataSource','getComment','_userService','_httpService','getCurrentUser','pipe','234030RfiZYE','unitId','13653yZSMtb','/universer-api/user/list','968pIlcgg','listComments','Unknown','format','UNIVER_UNKNOWN','code','289919ojgJjk','replies','subscribe','length','slice','replyId','_commentService','body','solved','Solved','Solve','add','_injector','post','_configService','Add','Edit','stringify','/edit','Delete','UNRECOGNIZED','type','forEach','_threadCommentDataSourceService','users','rangeType','_initUserSync','35rKMaUX','customRanges','error','user','deleteComment','requireSession','218082vfAmuG','find','symbol','OpenOrReOpen','map','parse','addUser','155720wlZlrX','COMMENT','parentId','comments','payload','Reply','/list','rangeId','/add','126752juHjMU','defineProperty','createTimestamp','/universer-api/comment/unit/','pluginName','saveCommentToSnapshot','getUser','thread-comment-data-source.config','content','threadId','_threadCommentDataSource','2818440TPNBtH','getOwnPropertyDescriptor','values','12qUpRxE','addComment','_init','YYYY/MM/DD\x20HH:mm','userId','size','get','root','filter','userID','resolved','ref','getMemberID','/solved','_config','_sessionService','_threadCommentModel','_initDataSource','/delete'];_0x47c6=function(){return _0x447cb0;};return _0x47c6();}const D=_0x36e3e3=>_0x1fdba(new Date(+_0x36e3e3))[_0x46fe98(0x113)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x4ab9bb,_0x47f95c)=>{const _0x52b890=_0x46fe98,_0x49685a=_0x4ab9bb[_0x52b890(0xf6)](_0xaee3d1),_0x7f8df5=_0x4ab9bb[_0x52b890(0xf6)](_0x4c2fd4);_0x47f95c[_0x52b890(0x12c)](_0x5ce717=>{const _0x1ded7b=_0x52b890;_0x49685a[_0x1ded7b(0xe8)](_0x5ce717)&&_0x47f95c['delete'](_0x5ce717);}),_0x47f95c[_0x52b890(0xf5)]&&(await _0x7f8df5[_0x52b890(0xf6)](_0x52b890(0x10f),{'params':{'userIDs':[..._0x47f95c]}}))['body'][_0x52b890(0x12e)][_0x52b890(0x12c)](_0x5f0036=>{const _0x2b7407=_0x52b890;_0x5f0036&&_0x49685a[_0x2b7407(0x13d)](_0x5f0036);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x3c6405,_0x16eaa6,_0x54f1c2,_0x574ec6)=>{const _0x31cf76=_0x46fe98;for(var _0x3f2302=_0x574ec6>0x1?void 0x0:_0x574ec6?K(_0x16eaa6,_0x54f1c2):_0x16eaa6,_0x2e5b41=_0x3c6405[_0x31cf76(0x119)]-0x1,_0x2772b2;_0x2e5b41>=0x0;_0x2e5b41--)(_0x2772b2=_0x3c6405[_0x2e5b41])&&(_0x3f2302=_0x2772b2(_0x3f2302)||_0x3f2302);return _0x3f2302;},p=(_0x3b1918,_0x1d19d7)=>(_0x4a50ee,_0x153dca)=>_0x1d19d7(_0x4a50ee,_0x153dca,_0x3b1918);let S=class extends _0x9d9fe{constructor(_0x23aac8,_0xc128cd,_0x50e8dc,_0x7d5f92){const _0x3c201e=_0x46fe98;super(),this[_0x3c201e(0x11c)]=_0x23aac8,this[_0x3c201e(0x100)]=_0xc128cd,this[_0x3c201e(0x108)]=_0x50e8dc,this[_0x3c201e(0x122)]=_0x7d5f92,this[_0x3c201e(0xf2)](),this['_initUserSync']();}[_0x46fe98(0x130)](){const _0x444efa=_0x46fe98;this['disposeWithMe'](this[_0x444efa(0x100)]['commentUpdate$'][_0x444efa(0x10b)](_0x2bd82e(0x10))['subscribe'](_0x2647b4=>{const _0x1dba5a=_0x444efa,_0x1f35a9=new Set();_0x2647b4['forEach'](_0xecb118=>{const _0x39e4cb=_0x4cb1;switch(_0xecb118[_0x39e4cb(0x12b)]){case'add':{const _0x1a017d=_0xecb118[_0x39e4cb(0x142)]['personId'];_0x1f35a9['add'](_0x1a017d);break;}}}),B(this[_0x1dba5a(0x122)],_0x1f35a9);}));}[_0x46fe98(0xf2)](){const _0x2fb4e7=_0x46fe98;this[_0x2fb4e7(0x105)](this['_commentService']['commentUpdate$'][_0x2fb4e7(0x118)](async _0x148654=>{const _0xe8b06e=_0x2fb4e7;var _0x203a53,_0x4a6ae7,_0x5d802c,_0x18a1ca;const _0x3addc0=(_0x203a53=this[_0xe8b06e(0x100)][_0xe8b06e(0x104)](_0x148654['unitId'])[_0xe8b06e(0x138)](_0x269394=>_0x269394['threadId']===_0x148654['threadId']))==null?void 0x0:_0x203a53[_0xe8b06e(0xf7)];if(!_0x3addc0)return;const {unitId:_0x4895e8,subUnitId:_0x29a1a9}=_0x3addc0;switch(_0x148654[_0xe8b06e(0x134)]&&this[_0xe8b06e(0x108)][_0xe8b06e(0x13d)](_0x148654['user']),_0x148654['type']){case v[_0xe8b06e(0x125)]:break;case v[_0xe8b06e(0x143)]:{this[_0xe8b06e(0x100)][_0xe8b06e(0xf1)](_0x4895e8,_0x29a1a9,{'unitId':_0x4895e8,'subUnitId':_0x29a1a9,'ref':'','id':_0x148654[_0xe8b06e(0x11b)],'dT':D(+_0x148654[_0xe8b06e(0xe4)]),'threadId':_0x148654[_0xe8b06e(0xeb)],'personId':(_0x5d802c=(_0x4a6ae7=_0x148654[_0xe8b06e(0x134)])==null?void 0x0:_0x4a6ae7[_0xe8b06e(0xf9)])!=null?_0x5d802c:_0x148654['userId'],'text':JSON[_0xe8b06e(0x13c)](_0x148654['content']),'parentId':_0x3addc0['id']});break;}case v[_0xe8b06e(0x129)]:{const _0xe32ca3=this[_0xe8b06e(0x100)][_0xe8b06e(0x107)](_0x4895e8,_0x29a1a9,_0x148654[_0xe8b06e(0x11b)]);_0xe32ca3&&_0xe32ca3[_0xe8b06e(0x140)]&&this[_0xe8b06e(0x100)][_0xe8b06e(0x135)](_0x4895e8,_0x29a1a9,_0x148654['replyId']);break;}case v[_0xe8b06e(0x126)]:{this['_threadCommentModel']['updateComment'](_0x4895e8,_0x29a1a9,{'commentId':_0x148654['replyId'],'text':JSON[_0xe8b06e(0x13c)](_0x148654[_0xe8b06e(0xea)])});break;}case v[_0xe8b06e(0x120)]:{const _0x1e2ead=(_0x18a1ca=this['_threadCommentModel'][_0xe8b06e(0x104)](_0x148654[_0xe8b06e(0x10d)])[_0xe8b06e(0x138)](_0x219fd7=>_0x219fd7['threadId']===_0x148654[_0xe8b06e(0xeb)]))==null?void 0x0:_0x18a1ca[_0xe8b06e(0xf7)];_0x1e2ead&&this['_threadCommentModel'][_0xe8b06e(0x103)](_0x4895e8,_0x29a1a9,_0x1e2ead['id'],_0x148654[_0xe8b06e(0x11e)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0xd8e16e(_0x311f50)),p(0x1,_0xd8e16e(_0x3c9912)),p(0x2,_0xd8e16e(_0xaee3d1)),p(0x3,_0xd8e16e(_0x3aac1a))],S);const z=_0x46fe98(0xe9),M={};var k=Object[_0x46fe98(0xee)],Q=(_0x35c5f8,_0x3a57e9,_0x200d12,_0x2a244c)=>{const _0x13e813=_0x46fe98;for(var _0x2cd71c=_0x2a244c>0x1?void 0x0:_0x2a244c?k(_0x3a57e9,_0x200d12):_0x3a57e9,_0x91739d=_0x35c5f8[_0x13e813(0x119)]-0x1,_0x5dc5b2;_0x91739d>=0x0;_0x91739d--)(_0x5dc5b2=_0x35c5f8[_0x91739d])&&(_0x2cd71c=_0x5dc5b2(_0x2cd71c)||_0x2cd71c);return _0x2cd71c;},_=(_0x15a250,_0x364c8a)=>(_0x2b677c,_0x1853c5)=>_0x364c8a(_0x2b677c,_0x1853c5,_0x15a250);function X(_0x100bed,_0x5e7b4c){const _0x258a3a=_0x46fe98,_0x200c0d=_0x100bed[_0x258a3a(0x117)][0x0];return{..._0x5e7b4c,'id':_0x200c0d['replyId'],'resolved':_0x100bed[_0x258a3a(0x11e)]===0x1,'dT':D(_0x200c0d[_0x258a3a(0xe4)]),'personId':_0x200c0d[_0x258a3a(0xf4)],'threadId':_0x200c0d[_0x258a3a(0xeb)]};}function ee(_0x1294b8,_0x17f30d,_0x22e191){const _0x14496f=_0x46fe98;var _0x2724ff,_0x5dfaf6;if(((_0x5dfaf6=(_0x2724ff=_0x1294b8==null?void 0x0:_0x1294b8[_0x14496f(0x117)])==null?void 0x0:_0x2724ff[_0x14496f(0x119)])!=null?_0x5dfaf6:0x0)>0x0){const _0xc7b2f4=(_0x3daaf9,_0x1342fb)=>({'id':_0x3daaf9[_0x14496f(0x11b)],'threadId':_0x3daaf9['threadId'],'dT':D(_0x3daaf9[_0x14496f(0xe4)]),'personId':_0x3daaf9[_0x14496f(0xf4)],'resolved':_0x1294b8[_0x14496f(0x11e)]===I[_0x14496f(0x11f)],'unitId':_0x17f30d,'subUnitId':_0x22e191,'text':JSON[_0x14496f(0x13c)](_0x3daaf9[_0x14496f(0xea)]),'parentId':_0x1342fb}),_0x8b6588=_0xc7b2f4(_0x1294b8[_0x14496f(0x117)][0x0]);return{..._0x8b6588,'children':_0x1294b8[_0x14496f(0x117)][_0x14496f(0x11a)](0x1)[_0x14496f(0x13b)](_0x4c6fbb=>_0xc7b2f4(_0x4c6fbb,_0x8b6588['id']))};}return null;}let f=class{constructor(_0x41a115,_0x231dec,_0x822be7,_0x4a6944){const _0x374086=_0x46fe98;this[_0x374086(0x109)]=_0x41a115,this[_0x374086(0x108)]=_0x231dec,this['_sessionService']=_0x822be7,this[_0x374086(0x122)]=_0x4a6944;}async[_0x46fe98(0xf1)](_0x200f76){const _0x320134=_0x46fe98;var _0x3f6f6c,_0x53a20c;const {parentId:_0x1152dc,unitId:_0x5c977c,text:_0x19d189,threadId:_0x7f14a2}=_0x200f76,_0x4a7c12=(_0x53a20c=(_0x3f6f6c=_0x19d189[_0x320134(0x132)])==null?void 0x0:_0x3f6f6c['filter'](_0x4ca4eb=>_0x4ca4eb['rangeType']===_0x171c7e[_0x320134(0x13f)])[_0x320134(0x13b)](_0x4f72a1=>_0x4f72a1['rangeId']))!=null?_0x53a20c:[],_0x22529e=JSON[_0x320134(0x127)](_0x19d189),_0x29dedd=(await this[_0x320134(0xff)][_0x320134(0x136)](_0x5c977c))['getMemberID']();if(_0x1152dc){const _0x3da1c1={'memberId':_0x29dedd,'unitId':_0x5c977c,'content':_0x22529e,'mention':_0x4a7c12,'threadId':_0x7f14a2},_0x46a3c0=(await this[_0x320134(0x109)]['post'](_0x320134(0xe5)+_0x5c977c+'/reply',{'body':_0x3da1c1}))['body']['reply'];return{..._0x200f76,'id':_0x46a3c0['replyId'],'dT':_0x1fdba(+_0x46a3c0[_0x320134(0xe4)])[_0x320134(0x113)](_0x320134(0xf3)),'personId':_0x46a3c0[_0x320134(0xf4)]};}else{const _0xfa9222={'memberId':_0x29dedd,'unitId':_0x5c977c,'content':_0x22529e,'mention':_0x4a7c12},_0x47edc7=await this[_0x320134(0x109)]['post'](_0x320134(0xe5)+_0x5c977c+_0x320134(0xe1),{'body':_0xfa9222});return X(_0x47edc7[_0x320134(0x11d)]['comment'],_0x200f76);}}async['updateComment'](_0x3c2326){const _0x3e9407=_0x46fe98;var _0x5e47cf,_0x5d912d;const {text:_0x34c933,unitId:_0x51150b}=_0x3c2326,_0x24d314=(_0x5d912d=(_0x5e47cf=_0x34c933[_0x3e9407(0x132)])==null?void 0x0:_0x5e47cf[_0x3e9407(0xf8)](_0x399329=>_0x399329[_0x3e9407(0x12f)]===_0x171c7e['COMMENT'])['map'](_0x46297f=>_0x46297f[_0x3e9407(0xe0)]))!=null?_0x5d912d:[],_0x13bcf9=JSON[_0x3e9407(0x127)](_0x34c933),_0x3897df=_0x3c2326[_0x3e9407(0xeb)],_0x3346ad=_0x3c2326['id'],_0x2f5e51={'memberId':(await this[_0x3e9407(0xff)][_0x3e9407(0x136)](_0x51150b))[_0x3e9407(0xfc)](),'unitId':_0x51150b,'threadId':_0x3897df,'mention':_0x24d314,'content':_0x13bcf9,'replyId':_0x3346ad},_0x126655=await this[_0x3e9407(0x109)][_0x3e9407(0x123)](_0x3e9407(0xe5)+_0x51150b+_0x3e9407(0x128),{'body':_0x2f5e51});return!_0x126655[_0x3e9407(0x11d)][_0x3e9407(0x133)]||_0x126655[_0x3e9407(0x11d)]['error'][_0x3e9407(0x115)]===0x1;}async[_0x46fe98(0x103)](_0x154d22){const _0x47a74f=_0x46fe98,{unitId:_0x546e51}=_0x154d22,_0x510d2e=_0x154d22[_0x47a74f(0xeb)],_0x47e6fa={'memberId':this[_0x47a74f(0x108)][_0x47a74f(0x10a)]()['userID'],'unitId':_0x546e51,'threadId':_0x510d2e,'solved':_0x154d22[_0x47a74f(0xfa)]?I['Solved']:I[_0x47a74f(0x13a)]},_0x337b82=await this['_httpService']['post'](_0x47a74f(0xe5)+_0x546e51+_0x47a74f(0xfd),{'body':_0x47e6fa});return!_0x337b82[_0x47a74f(0x11d)][_0x47a74f(0x133)]||_0x337b82[_0x47a74f(0x11d)][_0x47a74f(0x133)][_0x47a74f(0x115)]===0x1;}async[_0x46fe98(0x135)](_0x504c5e,_0x1ee61c,_0x3a8e25,_0x17c933){const _0x23e8c7=_0x46fe98,_0x4189f6={'memberId':(await this[_0x23e8c7(0xff)]['requireSession'](_0x504c5e))[_0x23e8c7(0xfc)](),'threadId':_0x3a8e25,'replyId':_0x17c933,'unitId':_0x504c5e},_0x4e5a98=await this[_0x23e8c7(0x109)]['post'](_0x23e8c7(0xe5)+_0x504c5e+_0x23e8c7(0x102),{'body':_0x4189f6});return!_0x4e5a98[_0x23e8c7(0x11d)]['error']||_0x4e5a98[_0x23e8c7(0x11d)][_0x23e8c7(0x133)][_0x23e8c7(0x115)]===0x1;}async[_0x46fe98(0x111)](_0x1b9800,_0x466478,_0x5d6b8a){const _0x2dd30d=_0x46fe98,_0x26016f={'unitId':_0x1b9800,'threadId':_0x5d6b8a},_0x466d09=await this[_0x2dd30d(0x109)][_0x2dd30d(0x123)](_0x2dd30d(0xe5)+_0x1b9800+_0x2dd30d(0xdf),{'body':_0x26016f}),_0x134da4=_0x5d6b8a[_0x2dd30d(0x13b)](_0x4d2875=>ee(_0x466d09['body'][_0x2dd30d(0x141)][_0x4d2875],_0x1b9800,_0x466478))['filter'](Boolean);return Object[_0x2dd30d(0xef)](_0x466d09[_0x2dd30d(0x11d)][_0x2dd30d(0x12e)])[_0x2dd30d(0x12c)](_0x5b62b9=>{const _0x57050f=_0x2dd30d;this[_0x57050f(0x108)][_0x57050f(0x13d)](_0x5b62b9);}),_0x134da4;}[_0x46fe98(0xe7)](_0x3b41f5){const _0x55e0bb=_0x46fe98;return{'id':_0x3b41f5['id'],'threadId':_0x3b41f5[_0x55e0bb(0xeb)],'ref':_0x3b41f5[_0x55e0bb(0xfb)]};}};f=Q([_(0x0,_0xd8e16e(_0x4c2fd4)),_(0x1,_0xd8e16e(_0xaee3d1)),_(0x2,_0xd8e16e(_0x5d4e31)),_(0x3,_0xd8e16e(_0x3aac1a))],f);var re=Object[_0x46fe98(0xee)],te=(_0x3863f7,_0x521605,_0x1b020c,_0x2dbbe6)=>{for(var _0x120497=_0x2dbbe6>0x1?void 0x0:_0x2dbbe6?re(_0x521605,_0x1b020c):_0x521605,_0x491e0b=_0x3863f7['length']-0x1,_0x56d87e;_0x491e0b>=0x0;_0x491e0b--)(_0x56d87e=_0x3863f7[_0x491e0b])&&(_0x120497=_0x56d87e(_0x120497)||_0x120497);return _0x120497;},N=(_0x1d8111,_0x2d5fc7)=>(_0x59baea,_0x3eebce)=>_0x2d5fc7(_0x59baea,_0x3eebce,_0x1d8111);let g=class extends _0x9d9fe{constructor(_0x8443da,_0x2f77ba){const _0x5a09d8=_0x46fe98;super(),this[_0x5a09d8(0x12d)]=_0x8443da,this[_0x5a09d8(0xec)]=_0x2f77ba,this['_initDataSource']();}[_0x46fe98(0x101)](){const _0x34815b=_0x46fe98;this[_0x34815b(0x12d)][_0x34815b(0x106)]=this[_0x34815b(0xec)],this[_0x34815b(0x12d)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x17ba36),N(0x1,_0xd8e16e(f))],g);var se=Object[_0x46fe98(0xe3)],oe=Object[_0x46fe98(0xee)],ne=(_0x206055,_0x354e4f,_0x407df9)=>_0x354e4f in _0x206055?se(_0x206055,_0x354e4f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x407df9}):_0x206055[_0x354e4f]=_0x407df9,ie=(_0x11f50c,_0x27a989,_0x50c592,_0x26db1a)=>{const _0x2c3741=_0x46fe98;for(var _0x386595=_0x26db1a>0x1?void 0x0:_0x26db1a?oe(_0x27a989,_0x50c592):_0x27a989,_0x3e937b=_0x11f50c[_0x2c3741(0x119)]-0x1,_0x55d301;_0x3e937b>=0x0;_0x3e937b--)(_0x55d301=_0x11f50c[_0x3e937b])&&(_0x386595=_0x55d301(_0x386595)||_0x386595);return _0x386595;},w=(_0x2e1901,_0x28cc7a)=>(_0x3886bf,_0x366f3c)=>_0x28cc7a(_0x3886bf,_0x366f3c,_0x2e1901),$=(_0x917cf9,_0xfc6050,_0x5d0dac)=>ne(_0x917cf9,typeof _0xfc6050!=_0x46fe98(0x139)?_0xfc6050+'':_0xfc6050,_0x5d0dac);let b=class extends _0xc49e69{constructor(_0x57c025=M,_0x413220,_0x42ade3){const _0x20c96c=_0x46fe98;super(),this[_0x20c96c(0xfe)]=_0x57c025,this[_0x20c96c(0x122)]=_0x413220,this[_0x20c96c(0x124)]=_0x42ade3;const {..._0xdf3333}=_0x43fbb8({},M,this[_0x20c96c(0xfe)]);this[_0x20c96c(0x124)]['setConfig'](z,_0xdf3333);}['onStarting'](){const _0x11cbf9=_0x46fe98;[[f],[g],[S]][_0x11cbf9(0x12c)](_0x3727e7=>{const _0x2d8d87=_0x11cbf9;this[_0x2d8d87(0x122)][_0x2d8d87(0x121)](_0x3727e7);});}['onReady'](){const _0x2eb999=_0x46fe98;this['_injector']['get'](g),this[_0x2eb999(0x122)][_0x2eb999(0xf6)](S);}};function _0x4cb1(_0x2dc4f4,_0x176f4a){const _0x47c65d=_0x47c6();return _0x4cb1=function(_0x4cb114,_0x322d4a){_0x4cb114=_0x4cb114-0xdf;let _0x3d046b=_0x47c65d[_0x4cb114];return _0x3d046b;},_0x4cb1(_0x2dc4f4,_0x176f4a);}$(b,_0x46fe98(0xe6),W),$(b,_0x46fe98(0x12b),_0x1b0f42[_0x46fe98(0x114)]),b=ie([_0xabdba(_0x103552,_0x4bccec,_0x3559a3),w(0x1,_0xd8e16e(_0x3aac1a)),w(0x2,_0x1ed246)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x3cac96=_0x4130;(function(_0x3338bc,_0x4e9786){const _0x45f60a=_0x4130,_0x131e88=_0x3338bc();while(!![]){try{const _0x585a85=-parseInt(_0x45f60a(0x177))/0x1*(parseInt(_0x45f60a(0x167))/0x2)+parseInt(_0x45f60a(0x199))/0x3*(-parseInt(_0x45f60a(0x16d))/0x4)+-parseInt(_0x45f60a(0x197))/0x5+parseInt(_0x45f60a(0x178))/0x6+-parseInt(_0x45f60a(0x1a6))/0x7*(parseInt(_0x45f60a(0x161))/0x8)+-parseInt(_0x45f60a(0x17c))/0x9+parseInt(_0x45f60a(0x196))/0xa;if(_0x585a85===_0x4e9786)break;else _0x131e88['push'](_0x131e88['shift']());}catch(_0x3934d4){_0x131e88['push'](_0x131e88['shift']());}}}(_0x2eb3,0xd6c5e));import{CommentService as _0x340a23,CollaborationSessionService as _0x17d1c9,UniverCollaborationClientPlugin as _0x193564}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x51f241}from'@univerjs-pro/license';function _0x2eb3(){const _0x12038d=['delete','_config','parse','37769360AgysLb','2061415xKOGJY','userId','6tfGUhQ','Solve','addUser','users','_threadCommentDataSourceService','content','updateComment','body','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getUnit','/universer-api/comment/unit/','pipe','add','7MNYCEp','code','Solved','threadId','/edit','requireSession','format','getComment','Add','_commentService','_threadCommentDataSource','commentUpdate$','_initUserSync','payload','_configService','/universer-api/user/list','getOwnPropertyDescriptor','_threadCommentModel','rangeType','post','_initDataSource','resolved','resolveComment','root','Unknown','Reply','thread-comment-data-source.config','find','_init','OpenOrReOpen','forEach','12524384wEANbe','stringify','setConfig','getMemberID','disposeWithMe','syncUpdateMutationToColla','1115858sHIfFg','addComment','user','_userService','reply','_httpService','2347196HQBgDk','filter','deleteComment','UNRECOGNIZED','/delete','size','Delete','saveCommentToSnapshot','customRanges','unitId','1vHDuwD','7569138UjdtiP','listComments','subscribe','error','4044519OlbgFf','length','ref','get','rangeId','replies','type','comment','UNIVER_UNKNOWN','replyId','onStarting','COMMENT','map','personId','_sessionService','_injector','userID','createTimestamp','solved','onReady','dataSource','getUser','parentId'];_0x2eb3=function(){return _0x12038d;};return _0x2eb3();}import{dayjs as _0x2b26c9,UserManagerService as _0x52a82c,Inject as _0x569163,Injector as _0x4ea2ae,Disposable as _0x1cd6bf,CustomRangeType as _0x4714d7,UniverInstanceType as _0xb368d6,DependentOn as _0x5a44e5,IConfigService as _0x32feb7,Plugin as _0x41b1ca,merge as _0x175110}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x29a324}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x2adaec,IThreadCommentDataSourceService as _0x285f19}from'@univerjs/thread-comment';import{bufferTime as _0x23ed52}from'rxjs';import{HTTPService as _0x4348c0}from'@univerjs/network';const W=_0x3cac96(0x1a1);var I=(_0x28fa3a=>(_0x28fa3a[_0x28fa3a['OpenOrReOpen']=0x0]=_0x3cac96(0x15f),_0x28fa3a[_0x28fa3a[_0x3cac96(0x1a8)]=0x1]=_0x3cac96(0x1a8),_0x28fa3a[_0x28fa3a['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x28fa3a))(I||{}),v=(_0x46c197=>(_0x46c197[_0x46c197[_0x3cac96(0x1be)]=0x0]=_0x3cac96(0x1be),_0x46c197[_0x46c197['Add']=0x1]=_0x3cac96(0x1ae),_0x46c197[_0x46c197[_0x3cac96(0x15b)]=0x2]='Reply',_0x46c197[_0x46c197['Edit']=0x3]='Edit',_0x46c197[_0x46c197[_0x3cac96(0x173)]=0x4]=_0x3cac96(0x173),_0x46c197[_0x46c197[_0x3cac96(0x19a)]=0x5]='Solve',_0x46c197[_0x46c197[_0x3cac96(0x170)]=-0x1]=_0x3cac96(0x170),_0x46c197))(v||{});const D=_0x150173=>_0x2b26c9(new Date(+_0x150173))[_0x3cac96(0x1ac)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x2b2f9d,_0x52b104)=>{const _0x295be4=_0x3cac96,_0x1e09ed=_0x2b2f9d[_0x295be4(0x17f)](_0x52a82c),_0x38d1f4=_0x2b2f9d[_0x295be4(0x17f)](_0x4348c0);_0x52b104['forEach'](_0x2e9da6=>{const _0x50b583=_0x295be4;_0x1e09ed[_0x50b583(0x191)](_0x2e9da6)&&_0x52b104[_0x50b583(0x193)](_0x2e9da6);}),_0x52b104[_0x295be4(0x172)]&&(await _0x38d1f4[_0x295be4(0x17f)](_0x295be4(0x1b5),{'params':{'userIDs':[..._0x52b104]}}))[_0x295be4(0x1a0)][_0x295be4(0x19c)][_0x295be4(0x160)](_0x16f488=>{const _0x5480f7=_0x295be4;_0x16f488&&_0x1e09ed[_0x5480f7(0x19b)](_0x16f488);});};var K=Object[_0x3cac96(0x1b6)],V=(_0x5d155b,_0x21af45,_0x20c07f,_0x427d17)=>{const _0x12cb7c=_0x3cac96;for(var _0xa717dc=_0x427d17>0x1?void 0x0:_0x427d17?K(_0x21af45,_0x20c07f):_0x21af45,_0x38d8bf=_0x5d155b[_0x12cb7c(0x17d)]-0x1,_0x3d580a;_0x38d8bf>=0x0;_0x38d8bf--)(_0x3d580a=_0x5d155b[_0x38d8bf])&&(_0xa717dc=_0x3d580a(_0xa717dc)||_0xa717dc);return _0xa717dc;},p=(_0xb41d55,_0x1a9db6)=>(_0x23f2e0,_0x1caa0a)=>_0x1a9db6(_0x23f2e0,_0x1caa0a,_0xb41d55);let S=class extends _0x1cd6bf{constructor(_0x9ee977,_0x1d448d,_0x43985a,_0x210f1f){const _0x3e0fb8=_0x3cac96;super(),this[_0x3e0fb8(0x1af)]=_0x9ee977,this['_threadCommentModel']=_0x1d448d,this[_0x3e0fb8(0x16a)]=_0x43985a,this[_0x3e0fb8(0x18b)]=_0x210f1f,this['_init'](),this['_initUserSync']();}[_0x3cac96(0x1b2)](){const _0x3bae03=_0x3cac96;this['disposeWithMe'](this[_0x3bae03(0x1b7)][_0x3bae03(0x1b1)][_0x3bae03(0x1a4)](_0x23ed52(0x10))['subscribe'](_0x54aa1f=>{const _0x6bf67=_0x3bae03,_0x3bf1f1=new Set();_0x54aa1f[_0x6bf67(0x160)](_0x5a1bda=>{const _0x25a93a=_0x6bf67;switch(_0x5a1bda[_0x25a93a(0x182)]){case _0x25a93a(0x1a5):{const _0x1c1666=_0x5a1bda[_0x25a93a(0x1b3)][_0x25a93a(0x189)];_0x3bf1f1['add'](_0x1c1666);break;}}}),B(this['_injector'],_0x3bf1f1);}));}[_0x3cac96(0x15e)](){const _0x2a4862=_0x3cac96;this[_0x2a4862(0x165)](this[_0x2a4862(0x1af)][_0x2a4862(0x1b1)][_0x2a4862(0x17a)](async _0x25627d=>{const _0x426001=_0x2a4862;var _0x3d57e1,_0xb88938,_0x4d08d7,_0x1ce73f;const _0x3ce264=(_0x3d57e1=this[_0x426001(0x1b7)][_0x426001(0x1a2)](_0x25627d[_0x426001(0x176)])['find'](_0x4d75ef=>_0x4d75ef['threadId']===_0x25627d[_0x426001(0x1a9)]))==null?void 0x0:_0x3d57e1[_0x426001(0x1bd)];if(!_0x3ce264)return;const {unitId:_0x106381,subUnitId:_0x4c221e}=_0x3ce264;switch(_0x25627d[_0x426001(0x169)]&&this[_0x426001(0x16a)]['addUser'](_0x25627d[_0x426001(0x169)]),_0x25627d['type']){case v['Add']:break;case v['Reply']:{this[_0x426001(0x1b7)][_0x426001(0x168)](_0x106381,_0x4c221e,{'unitId':_0x106381,'subUnitId':_0x4c221e,'ref':'','id':_0x25627d['replyId'],'dT':D(+_0x25627d[_0x426001(0x18d)]),'threadId':_0x25627d['threadId'],'personId':(_0x4d08d7=(_0xb88938=_0x25627d[_0x426001(0x169)])==null?void 0x0:_0xb88938['userID'])!=null?_0x4d08d7:_0x25627d[_0x426001(0x198)],'text':JSON[_0x426001(0x195)](_0x25627d['content']),'parentId':_0x3ce264['id']});break;}case v['Delete']:{const _0x4fef38=this[_0x426001(0x1b7)][_0x426001(0x1ad)](_0x106381,_0x4c221e,_0x25627d['replyId']);_0x4fef38&&_0x4fef38[_0x426001(0x192)]&&this[_0x426001(0x1b7)][_0x426001(0x16f)](_0x106381,_0x4c221e,_0x25627d[_0x426001(0x185)]);break;}case v['Edit']:{this[_0x426001(0x1b7)][_0x426001(0x19f)](_0x106381,_0x4c221e,{'commentId':_0x25627d['replyId'],'text':JSON[_0x426001(0x195)](_0x25627d[_0x426001(0x19e)])});break;}case v[_0x426001(0x19a)]:{const _0x5094f8=(_0x1ce73f=this[_0x426001(0x1b7)]['getUnit'](_0x25627d[_0x426001(0x176)])[_0x426001(0x15d)](_0x1f2907=>_0x1f2907[_0x426001(0x1a9)]===_0x25627d[_0x426001(0x1a9)]))==null?void 0x0:_0x1ce73f[_0x426001(0x1bd)];_0x5094f8&&this['_threadCommentModel'][_0x426001(0x1bc)](_0x106381,_0x4c221e,_0x5094f8['id'],_0x25627d['solved']===I[_0x426001(0x1a8)]);break;}}}));}};S=V([p(0x0,_0x569163(_0x340a23)),p(0x1,_0x569163(_0x2adaec)),p(0x2,_0x569163(_0x52a82c)),p(0x3,_0x569163(_0x4ea2ae))],S);const z=_0x3cac96(0x15c),M={};var k=Object[_0x3cac96(0x1b6)],Q=(_0x3180ca,_0x1fac97,_0x24d25f,_0x4b96a7)=>{const _0x229d7b=_0x3cac96;for(var _0x1a05fa=_0x4b96a7>0x1?void 0x0:_0x4b96a7?k(_0x1fac97,_0x24d25f):_0x1fac97,_0x2158f8=_0x3180ca[_0x229d7b(0x17d)]-0x1,_0x5e6a04;_0x2158f8>=0x0;_0x2158f8--)(_0x5e6a04=_0x3180ca[_0x2158f8])&&(_0x1a05fa=_0x5e6a04(_0x1a05fa)||_0x1a05fa);return _0x1a05fa;},_=(_0x57a73a,_0x420933)=>(_0x307be6,_0x125d5d)=>_0x420933(_0x307be6,_0x125d5d,_0x57a73a);function X(_0x12c581,_0x3bbb96){const _0x73d444=_0x3cac96,_0x36b7f7=_0x12c581[_0x73d444(0x181)][0x0];return{..._0x3bbb96,'id':_0x36b7f7[_0x73d444(0x185)],'resolved':_0x12c581['solved']===0x1,'dT':D(_0x36b7f7[_0x73d444(0x18d)]),'personId':_0x36b7f7[_0x73d444(0x198)],'threadId':_0x36b7f7[_0x73d444(0x1a9)]};}function ee(_0x26a120,_0x50a3f2,_0x12363a){const _0x288413=_0x3cac96;var _0x519d41,_0x469531;if(((_0x469531=(_0x519d41=_0x26a120==null?void 0x0:_0x26a120['replies'])==null?void 0x0:_0x519d41['length'])!=null?_0x469531:0x0)>0x0){const _0x15c40f=(_0x1334c2,_0x37590b)=>({'id':_0x1334c2['replyId'],'threadId':_0x1334c2['threadId'],'dT':D(_0x1334c2[_0x288413(0x18d)]),'personId':_0x1334c2['userId'],'resolved':_0x26a120[_0x288413(0x18e)]===I[_0x288413(0x1a8)],'unitId':_0x50a3f2,'subUnitId':_0x12363a,'text':JSON[_0x288413(0x195)](_0x1334c2[_0x288413(0x19e)]),'parentId':_0x37590b}),_0x51f2bd=_0x15c40f(_0x26a120[_0x288413(0x181)][0x0]);return{..._0x51f2bd,'children':_0x26a120[_0x288413(0x181)]['slice'](0x1)['map'](_0x2842d0=>_0x15c40f(_0x2842d0,_0x51f2bd['id']))};}return null;}let f=class{constructor(_0x3e1689,_0xa95ba3,_0x594200,_0xdbda1d){const _0x25d419=_0x3cac96;this[_0x25d419(0x16c)]=_0x3e1689,this['_userService']=_0xa95ba3,this[_0x25d419(0x18a)]=_0x594200,this[_0x25d419(0x18b)]=_0xdbda1d;}async['addComment'](_0x547189){const _0x2dbb5a=_0x3cac96;var _0x20fd3e,_0x43f12c;const {parentId:_0x4cb3fc,unitId:_0x354212,text:_0x3c4ec8,threadId:_0x494029}=_0x547189,_0x1a0688=(_0x43f12c=(_0x20fd3e=_0x3c4ec8[_0x2dbb5a(0x175)])==null?void 0x0:_0x20fd3e[_0x2dbb5a(0x16e)](_0x347c98=>_0x347c98[_0x2dbb5a(0x1b8)]===_0x4714d7['COMMENT'])[_0x2dbb5a(0x188)](_0x322b8d=>_0x322b8d[_0x2dbb5a(0x180)]))!=null?_0x43f12c:[],_0x40a90c=JSON[_0x2dbb5a(0x162)](_0x3c4ec8),_0x2a2c10=(await this[_0x2dbb5a(0x18a)]['requireSession'](_0x354212))[_0x2dbb5a(0x164)]();if(_0x4cb3fc){const _0x12922e={'memberId':_0x2a2c10,'unitId':_0x354212,'content':_0x40a90c,'mention':_0x1a0688,'threadId':_0x494029},_0x177c5e=(await this[_0x2dbb5a(0x16c)][_0x2dbb5a(0x1b9)](_0x2dbb5a(0x1a3)+_0x354212+'/reply',{'body':_0x12922e}))[_0x2dbb5a(0x1a0)][_0x2dbb5a(0x16b)];return{..._0x547189,'id':_0x177c5e['replyId'],'dT':_0x2b26c9(+_0x177c5e[_0x2dbb5a(0x18d)])[_0x2dbb5a(0x1ac)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x177c5e['userId']};}else{const _0x1afc57={'memberId':_0x2a2c10,'unitId':_0x354212,'content':_0x40a90c,'mention':_0x1a0688},_0x41fd3a=await this[_0x2dbb5a(0x16c)][_0x2dbb5a(0x1b9)](_0x2dbb5a(0x1a3)+_0x354212+'/add',{'body':_0x1afc57});return X(_0x41fd3a[_0x2dbb5a(0x1a0)][_0x2dbb5a(0x183)],_0x547189);}}async['updateComment'](_0x184cd4){const _0x1e77ac=_0x3cac96;var _0x18fc32,_0x343e38;const {text:_0x14a536,unitId:_0x5db8b5}=_0x184cd4,_0x3f4520=(_0x343e38=(_0x18fc32=_0x14a536[_0x1e77ac(0x175)])==null?void 0x0:_0x18fc32[_0x1e77ac(0x16e)](_0x456224=>_0x456224[_0x1e77ac(0x1b8)]===_0x4714d7[_0x1e77ac(0x187)])[_0x1e77ac(0x188)](_0xdf3ec7=>_0xdf3ec7[_0x1e77ac(0x180)]))!=null?_0x343e38:[],_0x3a4c0d=JSON[_0x1e77ac(0x162)](_0x14a536),_0x1c0339=_0x184cd4[_0x1e77ac(0x1a9)],_0xf35ca=_0x184cd4['id'],_0x5a035b={'memberId':(await this[_0x1e77ac(0x18a)][_0x1e77ac(0x1ab)](_0x5db8b5))[_0x1e77ac(0x164)](),'unitId':_0x5db8b5,'threadId':_0x1c0339,'mention':_0x3f4520,'content':_0x3a4c0d,'replyId':_0xf35ca},_0x5796c6=await this['_httpService'][_0x1e77ac(0x1b9)](_0x1e77ac(0x1a3)+_0x5db8b5+_0x1e77ac(0x1aa),{'body':_0x5a035b});return!_0x5796c6[_0x1e77ac(0x1a0)]['error']||_0x5796c6['body'][_0x1e77ac(0x17b)][_0x1e77ac(0x1a7)]===0x1;}async[_0x3cac96(0x1bc)](_0x393820){const _0x708331=_0x3cac96,{unitId:_0x4bb250}=_0x393820,_0x83bee3=_0x393820['threadId'],_0x2c675d={'memberId':this[_0x708331(0x16a)]['getCurrentUser']()[_0x708331(0x18c)],'unitId':_0x4bb250,'threadId':_0x83bee3,'solved':_0x393820[_0x708331(0x1bb)]?I[_0x708331(0x1a8)]:I[_0x708331(0x15f)]},_0xe6df01=await this[_0x708331(0x16c)]['post']('/universer-api/comment/unit/'+_0x4bb250+'/solved',{'body':_0x2c675d});return!_0xe6df01[_0x708331(0x1a0)][_0x708331(0x17b)]||_0xe6df01[_0x708331(0x1a0)][_0x708331(0x17b)]['code']===0x1;}async[_0x3cac96(0x16f)](_0x214dff,_0x2de9b2,_0x313ed7,_0x228c38){const _0x59b401=_0x3cac96,_0x593e9c={'memberId':(await this[_0x59b401(0x18a)][_0x59b401(0x1ab)](_0x214dff))['getMemberID'](),'threadId':_0x313ed7,'replyId':_0x228c38,'unitId':_0x214dff},_0x1a4064=await this[_0x59b401(0x16c)][_0x59b401(0x1b9)](_0x59b401(0x1a3)+_0x214dff+_0x59b401(0x171),{'body':_0x593e9c});return!_0x1a4064['body'][_0x59b401(0x17b)]||_0x1a4064['body'][_0x59b401(0x17b)][_0x59b401(0x1a7)]===0x1;}async[_0x3cac96(0x179)](_0x203e73,_0x467baf,_0x1013d1){const _0x34fcd3=_0x3cac96,_0x5492fa={'unitId':_0x203e73,'threadId':_0x1013d1},_0x582d24=await this[_0x34fcd3(0x16c)][_0x34fcd3(0x1b9)](_0x34fcd3(0x1a3)+_0x203e73+'/list',{'body':_0x5492fa}),_0x40d8f1=_0x1013d1[_0x34fcd3(0x188)](_0x1b96f9=>ee(_0x582d24[_0x34fcd3(0x1a0)]['comments'][_0x1b96f9],_0x203e73,_0x467baf))[_0x34fcd3(0x16e)](Boolean);return Object['values'](_0x582d24[_0x34fcd3(0x1a0)][_0x34fcd3(0x19c)])[_0x34fcd3(0x160)](_0x306f0b=>{const _0x35f887=_0x34fcd3;this[_0x35f887(0x16a)][_0x35f887(0x19b)](_0x306f0b);}),_0x40d8f1;}[_0x3cac96(0x174)](_0x243160){const _0x4ab952=_0x3cac96;return{'id':_0x243160['id'],'threadId':_0x243160[_0x4ab952(0x1a9)],'ref':_0x243160[_0x4ab952(0x17e)]};}};f=Q([_(0x0,_0x569163(_0x4348c0)),_(0x1,_0x569163(_0x52a82c)),_(0x2,_0x569163(_0x17d1c9)),_(0x3,_0x569163(_0x4ea2ae))],f);var re=Object[_0x3cac96(0x1b6)],te=(_0x501340,_0x18b638,_0x52d2c5,_0x1d7b2b)=>{const _0x31b31d=_0x3cac96;for(var _0x478c69=_0x1d7b2b>0x1?void 0x0:_0x1d7b2b?re(_0x18b638,_0x52d2c5):_0x18b638,_0x322fcb=_0x501340[_0x31b31d(0x17d)]-0x1,_0x19311c;_0x322fcb>=0x0;_0x322fcb--)(_0x19311c=_0x501340[_0x322fcb])&&(_0x478c69=_0x19311c(_0x478c69)||_0x478c69);return _0x478c69;},N=(_0xff2a29,_0x49a385)=>(_0x110aa1,_0x17c8bb)=>_0x49a385(_0x110aa1,_0x17c8bb,_0xff2a29);let g=class extends _0x1cd6bf{constructor(_0x213f28,_0x4eeeab){const _0x46e38d=_0x3cac96;super(),this['_threadCommentDataSourceService']=_0x213f28,this['_threadCommentDataSource']=_0x4eeeab,this[_0x46e38d(0x1ba)]();}[_0x3cac96(0x1ba)](){const _0x3488d1=_0x3cac96;this[_0x3488d1(0x19d)][_0x3488d1(0x190)]=this[_0x3488d1(0x1b0)],this['_threadCommentDataSourceService'][_0x3488d1(0x166)]=!0x1;}};g=te([N(0x0,_0x285f19),N(0x1,_0x569163(f))],g);var se=Object['defineProperty'],oe=Object['getOwnPropertyDescriptor'],ne=(_0x3c0202,_0x547bfb,_0x2f29d2)=>_0x547bfb in _0x3c0202?se(_0x3c0202,_0x547bfb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2f29d2}):_0x3c0202[_0x547bfb]=_0x2f29d2,ie=(_0x41fb75,_0x577c91,_0xc0f51d,_0x270eef)=>{const _0x4e29bf=_0x3cac96;for(var _0x7f2b1d=_0x270eef>0x1?void 0x0:_0x270eef?oe(_0x577c91,_0xc0f51d):_0x577c91,_0x418d6d=_0x41fb75[_0x4e29bf(0x17d)]-0x1,_0x5a4d79;_0x418d6d>=0x0;_0x418d6d--)(_0x5a4d79=_0x41fb75[_0x418d6d])&&(_0x7f2b1d=_0x5a4d79(_0x7f2b1d)||_0x7f2b1d);return _0x7f2b1d;},w=(_0x27b2ff,_0x1afd28)=>(_0x285d09,_0xaeded7)=>_0x1afd28(_0x285d09,_0xaeded7,_0x27b2ff),$=(_0x2e6bf2,_0x5d59ec,_0x1c7bda)=>ne(_0x2e6bf2,typeof _0x5d59ec!='symbol'?_0x5d59ec+'':_0x5d59ec,_0x1c7bda);let b=class extends _0x41b1ca{constructor(_0x237ffc=M,_0x218b7a,_0x236c24){const _0x26d00b=_0x3cac96;super(),this['_config']=_0x237ffc,this[_0x26d00b(0x18b)]=_0x218b7a,this[_0x26d00b(0x1b4)]=_0x236c24;const {..._0x34f77f}=_0x175110({},M,this[_0x26d00b(0x194)]);this[_0x26d00b(0x1b4)][_0x26d00b(0x163)](z,_0x34f77f);}[_0x3cac96(0x186)](){const _0x2ffca4=_0x3cac96;[[f],[g],[S]][_0x2ffca4(0x160)](_0x42a0b4=>{const _0x478fb0=_0x2ffca4;this[_0x478fb0(0x18b)][_0x478fb0(0x1a5)](_0x42a0b4);});}[_0x3cac96(0x18f)](){const _0x51ec0a=_0x3cac96;this[_0x51ec0a(0x18b)][_0x51ec0a(0x17f)](g),this[_0x51ec0a(0x18b)]['get'](S);}};function _0x4130(_0x48fa7b,_0x523dff){const _0x2eb36a=_0x2eb3();return _0x4130=function(_0x413097,_0x7a7d9c){_0x413097=_0x413097-0x15b;let _0xe70bc4=_0x2eb36a[_0x413097];return _0xe70bc4;},_0x4130(_0x48fa7b,_0x523dff);}$(b,'pluginName',W),$(b,_0x3cac96(0x182),_0xb368d6[_0x3cac96(0x184)]),b=ie([_0x5a44e5(_0x29a324,_0x193564,_0x51f241),w(0x1,_0x569163(_0x4ea2ae)),w(0x2,_0x32feb7)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x46fe98=_0x4cb1;(function(_0x357f21,_0x270380){const _0x52667c=_0x4cb1,_0x322390=_0x357f21();while(!![]){try{const _0x2d52f=-parseInt(_0x52667c(0x10c))/0x1+-parseInt(_0x52667c(0xe2))/0x2*(-parseInt(_0x52667c(0xf0))/0x3)+parseInt(_0x52667c(0x13e))/0x4*(parseInt(_0x52667c(0x131))/0x5)+parseInt(_0x52667c(0x137))/0x6+parseInt(_0x52667c(0x116))/0x7+-parseInt(_0x52667c(0x110))/0x8*(-parseInt(_0x52667c(0x10e))/0x9)+-parseInt(_0x52667c(0xed))/0xa;if(_0x2d52f===_0x270380)break;else _0x322390['push'](_0x322390['shift']());}catch(_0x4b26d3){_0x322390['push'](_0x322390['shift']());}}}(_0x47c6,0x42465));import{CommentService as _0x311f50,CollaborationSessionService as _0x5d4e31,UniverCollaborationClientPlugin as _0x4bccec}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x3559a3}from'@univerjs-pro/license';import{dayjs as _0x1fdba,UserManagerService as _0xaee3d1,Inject as _0xd8e16e,Injector as _0x3aac1a,Disposable as _0x9d9fe,CustomRangeType as _0x171c7e,UniverInstanceType as _0x1b0f42,DependentOn as _0xabdba,IConfigService as _0x1ed246,Plugin as _0xc49e69,merge as _0x43fbb8}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x103552}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x3c9912,IThreadCommentDataSourceService as _0x17ba36}from'@univerjs/thread-comment';import{bufferTime as _0x2bd82e}from'rxjs';import{HTTPService as _0x4c2fd4}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x4e96f3=>(_0x4e96f3[_0x4e96f3[_0x46fe98(0x13a)]=0x0]=_0x46fe98(0x13a),_0x4e96f3[_0x4e96f3[_0x46fe98(0x11f)]=0x1]=_0x46fe98(0x11f),_0x4e96f3[_0x4e96f3[_0x46fe98(0x12a)]=-0x1]=_0x46fe98(0x12a),_0x4e96f3))(I||{}),v=(_0x583e3c=>(_0x583e3c[_0x583e3c[_0x46fe98(0x112)]=0x0]='Unknown',_0x583e3c[_0x583e3c[_0x46fe98(0x125)]=0x1]=_0x46fe98(0x125),_0x583e3c[_0x583e3c[_0x46fe98(0x143)]=0x2]=_0x46fe98(0x143),_0x583e3c[_0x583e3c[_0x46fe98(0x126)]=0x3]=_0x46fe98(0x126),_0x583e3c[_0x583e3c[_0x46fe98(0x129)]=0x4]=_0x46fe98(0x129),_0x583e3c[_0x583e3c['Solve']=0x5]=_0x46fe98(0x120),_0x583e3c[_0x583e3c[_0x46fe98(0x12a)]=-0x1]='UNRECOGNIZED',_0x583e3c))(v||{});function _0x47c6(){const _0x447cb0=['resolveComment','getUnit','disposeWithMe','dataSource','getComment','_userService','_httpService','getCurrentUser','pipe','234030RfiZYE','unitId','13653yZSMtb','/universer-api/user/list','968pIlcgg','listComments','Unknown','format','UNIVER_UNKNOWN','code','289919ojgJjk','replies','subscribe','length','slice','replyId','_commentService','body','solved','Solved','Solve','add','_injector','post','_configService','Add','Edit','stringify','/edit','Delete','UNRECOGNIZED','type','forEach','_threadCommentDataSourceService','users','rangeType','_initUserSync','35rKMaUX','customRanges','error','user','deleteComment','requireSession','218082vfAmuG','find','symbol','OpenOrReOpen','map','parse','addUser','155720wlZlrX','COMMENT','parentId','comments','payload','Reply','/list','rangeId','/add','126752juHjMU','defineProperty','createTimestamp','/universer-api/comment/unit/','pluginName','saveCommentToSnapshot','getUser','thread-comment-data-source.config','content','threadId','_threadCommentDataSource','2818440TPNBtH','getOwnPropertyDescriptor','values','12qUpRxE','addComment','_init','YYYY/MM/DD\x20HH:mm','userId','size','get','root','filter','userID','resolved','ref','getMemberID','/solved','_config','_sessionService','_threadCommentModel','_initDataSource','/delete'];_0x47c6=function(){return _0x447cb0;};return _0x47c6();}const D=_0x36e3e3=>_0x1fdba(new Date(+_0x36e3e3))[_0x46fe98(0x113)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x4ab9bb,_0x47f95c)=>{const _0x52b890=_0x46fe98,_0x49685a=_0x4ab9bb[_0x52b890(0xf6)](_0xaee3d1),_0x7f8df5=_0x4ab9bb[_0x52b890(0xf6)](_0x4c2fd4);_0x47f95c[_0x52b890(0x12c)](_0x5ce717=>{const _0x1ded7b=_0x52b890;_0x49685a[_0x1ded7b(0xe8)](_0x5ce717)&&_0x47f95c['delete'](_0x5ce717);}),_0x47f95c[_0x52b890(0xf5)]&&(await _0x7f8df5[_0x52b890(0xf6)](_0x52b890(0x10f),{'params':{'userIDs':[..._0x47f95c]}}))['body'][_0x52b890(0x12e)][_0x52b890(0x12c)](_0x5f0036=>{const _0x2b7407=_0x52b890;_0x5f0036&&_0x49685a[_0x2b7407(0x13d)](_0x5f0036);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x3c6405,_0x16eaa6,_0x54f1c2,_0x574ec6)=>{const _0x31cf76=_0x46fe98;for(var _0x3f2302=_0x574ec6>0x1?void 0x0:_0x574ec6?K(_0x16eaa6,_0x54f1c2):_0x16eaa6,_0x2e5b41=_0x3c6405[_0x31cf76(0x119)]-0x1,_0x2772b2;_0x2e5b41>=0x0;_0x2e5b41--)(_0x2772b2=_0x3c6405[_0x2e5b41])&&(_0x3f2302=_0x2772b2(_0x3f2302)||_0x3f2302);return _0x3f2302;},p=(_0x3b1918,_0x1d19d7)=>(_0x4a50ee,_0x153dca)=>_0x1d19d7(_0x4a50ee,_0x153dca,_0x3b1918);let S=class extends _0x9d9fe{constructor(_0x23aac8,_0xc128cd,_0x50e8dc,_0x7d5f92){const _0x3c201e=_0x46fe98;super(),this[_0x3c201e(0x11c)]=_0x23aac8,this[_0x3c201e(0x100)]=_0xc128cd,this[_0x3c201e(0x108)]=_0x50e8dc,this[_0x3c201e(0x122)]=_0x7d5f92,this[_0x3c201e(0xf2)](),this['_initUserSync']();}[_0x46fe98(0x130)](){const _0x444efa=_0x46fe98;this['disposeWithMe'](this[_0x444efa(0x100)]['commentUpdate$'][_0x444efa(0x10b)](_0x2bd82e(0x10))['subscribe'](_0x2647b4=>{const _0x1dba5a=_0x444efa,_0x1f35a9=new Set();_0x2647b4['forEach'](_0xecb118=>{const _0x39e4cb=_0x4cb1;switch(_0xecb118[_0x39e4cb(0x12b)]){case'add':{const _0x1a017d=_0xecb118[_0x39e4cb(0x142)]['personId'];_0x1f35a9['add'](_0x1a017d);break;}}}),B(this[_0x1dba5a(0x122)],_0x1f35a9);}));}[_0x46fe98(0xf2)](){const _0x2fb4e7=_0x46fe98;this[_0x2fb4e7(0x105)](this['_commentService']['commentUpdate$'][_0x2fb4e7(0x118)](async _0x148654=>{const _0xe8b06e=_0x2fb4e7;var _0x203a53,_0x4a6ae7,_0x5d802c,_0x18a1ca;const _0x3addc0=(_0x203a53=this[_0xe8b06e(0x100)][_0xe8b06e(0x104)](_0x148654['unitId'])[_0xe8b06e(0x138)](_0x269394=>_0x269394['threadId']===_0x148654['threadId']))==null?void 0x0:_0x203a53[_0xe8b06e(0xf7)];if(!_0x3addc0)return;const {unitId:_0x4895e8,subUnitId:_0x29a1a9}=_0x3addc0;switch(_0x148654[_0xe8b06e(0x134)]&&this[_0xe8b06e(0x108)][_0xe8b06e(0x13d)](_0x148654['user']),_0x148654['type']){case v[_0xe8b06e(0x125)]:break;case v[_0xe8b06e(0x143)]:{this[_0xe8b06e(0x100)][_0xe8b06e(0xf1)](_0x4895e8,_0x29a1a9,{'unitId':_0x4895e8,'subUnitId':_0x29a1a9,'ref':'','id':_0x148654[_0xe8b06e(0x11b)],'dT':D(+_0x148654[_0xe8b06e(0xe4)]),'threadId':_0x148654[_0xe8b06e(0xeb)],'personId':(_0x5d802c=(_0x4a6ae7=_0x148654[_0xe8b06e(0x134)])==null?void 0x0:_0x4a6ae7[_0xe8b06e(0xf9)])!=null?_0x5d802c:_0x148654['userId'],'text':JSON[_0xe8b06e(0x13c)](_0x148654['content']),'parentId':_0x3addc0['id']});break;}case v[_0xe8b06e(0x129)]:{const _0xe32ca3=this[_0xe8b06e(0x100)][_0xe8b06e(0x107)](_0x4895e8,_0x29a1a9,_0x148654[_0xe8b06e(0x11b)]);_0xe32ca3&&_0xe32ca3[_0xe8b06e(0x140)]&&this[_0xe8b06e(0x100)][_0xe8b06e(0x135)](_0x4895e8,_0x29a1a9,_0x148654['replyId']);break;}case v[_0xe8b06e(0x126)]:{this['_threadCommentModel']['updateComment'](_0x4895e8,_0x29a1a9,{'commentId':_0x148654['replyId'],'text':JSON[_0xe8b06e(0x13c)](_0x148654[_0xe8b06e(0xea)])});break;}case v[_0xe8b06e(0x120)]:{const _0x1e2ead=(_0x18a1ca=this['_threadCommentModel'][_0xe8b06e(0x104)](_0x148654[_0xe8b06e(0x10d)])[_0xe8b06e(0x138)](_0x219fd7=>_0x219fd7['threadId']===_0x148654[_0xe8b06e(0xeb)]))==null?void 0x0:_0x18a1ca[_0xe8b06e(0xf7)];_0x1e2ead&&this['_threadCommentModel'][_0xe8b06e(0x103)](_0x4895e8,_0x29a1a9,_0x1e2ead['id'],_0x148654[_0xe8b06e(0x11e)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0xd8e16e(_0x311f50)),p(0x1,_0xd8e16e(_0x3c9912)),p(0x2,_0xd8e16e(_0xaee3d1)),p(0x3,_0xd8e16e(_0x3aac1a))],S);const z=_0x46fe98(0xe9),M={};var k=Object[_0x46fe98(0xee)],Q=(_0x35c5f8,_0x3a57e9,_0x200d12,_0x2a244c)=>{const _0x13e813=_0x46fe98;for(var _0x2cd71c=_0x2a244c>0x1?void 0x0:_0x2a244c?k(_0x3a57e9,_0x200d12):_0x3a57e9,_0x91739d=_0x35c5f8[_0x13e813(0x119)]-0x1,_0x5dc5b2;_0x91739d>=0x0;_0x91739d--)(_0x5dc5b2=_0x35c5f8[_0x91739d])&&(_0x2cd71c=_0x5dc5b2(_0x2cd71c)||_0x2cd71c);return _0x2cd71c;},_=(_0x15a250,_0x364c8a)=>(_0x2b677c,_0x1853c5)=>_0x364c8a(_0x2b677c,_0x1853c5,_0x15a250);function X(_0x100bed,_0x5e7b4c){const _0x258a3a=_0x46fe98,_0x200c0d=_0x100bed[_0x258a3a(0x117)][0x0];return{..._0x5e7b4c,'id':_0x200c0d['replyId'],'resolved':_0x100bed[_0x258a3a(0x11e)]===0x1,'dT':D(_0x200c0d[_0x258a3a(0xe4)]),'personId':_0x200c0d[_0x258a3a(0xf4)],'threadId':_0x200c0d[_0x258a3a(0xeb)]};}function ee(_0x1294b8,_0x17f30d,_0x22e191){const _0x14496f=_0x46fe98;var _0x2724ff,_0x5dfaf6;if(((_0x5dfaf6=(_0x2724ff=_0x1294b8==null?void 0x0:_0x1294b8[_0x14496f(0x117)])==null?void 0x0:_0x2724ff[_0x14496f(0x119)])!=null?_0x5dfaf6:0x0)>0x0){const _0xc7b2f4=(_0x3daaf9,_0x1342fb)=>({'id':_0x3daaf9[_0x14496f(0x11b)],'threadId':_0x3daaf9['threadId'],'dT':D(_0x3daaf9[_0x14496f(0xe4)]),'personId':_0x3daaf9[_0x14496f(0xf4)],'resolved':_0x1294b8[_0x14496f(0x11e)]===I[_0x14496f(0x11f)],'unitId':_0x17f30d,'subUnitId':_0x22e191,'text':JSON[_0x14496f(0x13c)](_0x3daaf9[_0x14496f(0xea)]),'parentId':_0x1342fb}),_0x8b6588=_0xc7b2f4(_0x1294b8[_0x14496f(0x117)][0x0]);return{..._0x8b6588,'children':_0x1294b8[_0x14496f(0x117)][_0x14496f(0x11a)](0x1)[_0x14496f(0x13b)](_0x4c6fbb=>_0xc7b2f4(_0x4c6fbb,_0x8b6588['id']))};}return null;}let f=class{constructor(_0x41a115,_0x231dec,_0x822be7,_0x4a6944){const _0x374086=_0x46fe98;this[_0x374086(0x109)]=_0x41a115,this[_0x374086(0x108)]=_0x231dec,this['_sessionService']=_0x822be7,this[_0x374086(0x122)]=_0x4a6944;}async[_0x46fe98(0xf1)](_0x200f76){const _0x320134=_0x46fe98;var _0x3f6f6c,_0x53a20c;const {parentId:_0x1152dc,unitId:_0x5c977c,text:_0x19d189,threadId:_0x7f14a2}=_0x200f76,_0x4a7c12=(_0x53a20c=(_0x3f6f6c=_0x19d189[_0x320134(0x132)])==null?void 0x0:_0x3f6f6c['filter'](_0x4ca4eb=>_0x4ca4eb['rangeType']===_0x171c7e[_0x320134(0x13f)])[_0x320134(0x13b)](_0x4f72a1=>_0x4f72a1['rangeId']))!=null?_0x53a20c:[],_0x22529e=JSON[_0x320134(0x127)](_0x19d189),_0x29dedd=(await this[_0x320134(0xff)][_0x320134(0x136)](_0x5c977c))['getMemberID']();if(_0x1152dc){const _0x3da1c1={'memberId':_0x29dedd,'unitId':_0x5c977c,'content':_0x22529e,'mention':_0x4a7c12,'threadId':_0x7f14a2},_0x46a3c0=(await this[_0x320134(0x109)]['post'](_0x320134(0xe5)+_0x5c977c+'/reply',{'body':_0x3da1c1}))['body']['reply'];return{..._0x200f76,'id':_0x46a3c0['replyId'],'dT':_0x1fdba(+_0x46a3c0[_0x320134(0xe4)])[_0x320134(0x113)](_0x320134(0xf3)),'personId':_0x46a3c0[_0x320134(0xf4)]};}else{const _0xfa9222={'memberId':_0x29dedd,'unitId':_0x5c977c,'content':_0x22529e,'mention':_0x4a7c12},_0x47edc7=await this[_0x320134(0x109)]['post'](_0x320134(0xe5)+_0x5c977c+_0x320134(0xe1),{'body':_0xfa9222});return X(_0x47edc7[_0x320134(0x11d)]['comment'],_0x200f76);}}async['updateComment'](_0x3c2326){const _0x3e9407=_0x46fe98;var _0x5e47cf,_0x5d912d;const {text:_0x34c933,unitId:_0x51150b}=_0x3c2326,_0x24d314=(_0x5d912d=(_0x5e47cf=_0x34c933[_0x3e9407(0x132)])==null?void 0x0:_0x5e47cf[_0x3e9407(0xf8)](_0x399329=>_0x399329[_0x3e9407(0x12f)]===_0x171c7e['COMMENT'])['map'](_0x46297f=>_0x46297f[_0x3e9407(0xe0)]))!=null?_0x5d912d:[],_0x13bcf9=JSON[_0x3e9407(0x127)](_0x34c933),_0x3897df=_0x3c2326[_0x3e9407(0xeb)],_0x3346ad=_0x3c2326['id'],_0x2f5e51={'memberId':(await this[_0x3e9407(0xff)][_0x3e9407(0x136)](_0x51150b))[_0x3e9407(0xfc)](),'unitId':_0x51150b,'threadId':_0x3897df,'mention':_0x24d314,'content':_0x13bcf9,'replyId':_0x3346ad},_0x126655=await this[_0x3e9407(0x109)][_0x3e9407(0x123)](_0x3e9407(0xe5)+_0x51150b+_0x3e9407(0x128),{'body':_0x2f5e51});return!_0x126655[_0x3e9407(0x11d)][_0x3e9407(0x133)]||_0x126655[_0x3e9407(0x11d)]['error'][_0x3e9407(0x115)]===0x1;}async[_0x46fe98(0x103)](_0x154d22){const _0x47a74f=_0x46fe98,{unitId:_0x546e51}=_0x154d22,_0x510d2e=_0x154d22[_0x47a74f(0xeb)],_0x47e6fa={'memberId':this[_0x47a74f(0x108)][_0x47a74f(0x10a)]()['userID'],'unitId':_0x546e51,'threadId':_0x510d2e,'solved':_0x154d22[_0x47a74f(0xfa)]?I['Solved']:I[_0x47a74f(0x13a)]},_0x337b82=await this['_httpService']['post'](_0x47a74f(0xe5)+_0x546e51+_0x47a74f(0xfd),{'body':_0x47e6fa});return!_0x337b82[_0x47a74f(0x11d)][_0x47a74f(0x133)]||_0x337b82[_0x47a74f(0x11d)][_0x47a74f(0x133)][_0x47a74f(0x115)]===0x1;}async[_0x46fe98(0x135)](_0x504c5e,_0x1ee61c,_0x3a8e25,_0x17c933){const _0x23e8c7=_0x46fe98,_0x4189f6={'memberId':(await this[_0x23e8c7(0xff)]['requireSession'](_0x504c5e))[_0x23e8c7(0xfc)](),'threadId':_0x3a8e25,'replyId':_0x17c933,'unitId':_0x504c5e},_0x4e5a98=await this[_0x23e8c7(0x109)]['post'](_0x23e8c7(0xe5)+_0x504c5e+_0x23e8c7(0x102),{'body':_0x4189f6});return!_0x4e5a98[_0x23e8c7(0x11d)]['error']||_0x4e5a98[_0x23e8c7(0x11d)][_0x23e8c7(0x133)][_0x23e8c7(0x115)]===0x1;}async[_0x46fe98(0x111)](_0x1b9800,_0x466478,_0x5d6b8a){const _0x2dd30d=_0x46fe98,_0x26016f={'unitId':_0x1b9800,'threadId':_0x5d6b8a},_0x466d09=await this[_0x2dd30d(0x109)][_0x2dd30d(0x123)](_0x2dd30d(0xe5)+_0x1b9800+_0x2dd30d(0xdf),{'body':_0x26016f}),_0x134da4=_0x5d6b8a[_0x2dd30d(0x13b)](_0x4d2875=>ee(_0x466d09['body'][_0x2dd30d(0x141)][_0x4d2875],_0x1b9800,_0x466478))['filter'](Boolean);return Object[_0x2dd30d(0xef)](_0x466d09[_0x2dd30d(0x11d)][_0x2dd30d(0x12e)])[_0x2dd30d(0x12c)](_0x5b62b9=>{const _0x57050f=_0x2dd30d;this[_0x57050f(0x108)][_0x57050f(0x13d)](_0x5b62b9);}),_0x134da4;}[_0x46fe98(0xe7)](_0x3b41f5){const _0x55e0bb=_0x46fe98;return{'id':_0x3b41f5['id'],'threadId':_0x3b41f5[_0x55e0bb(0xeb)],'ref':_0x3b41f5[_0x55e0bb(0xfb)]};}};f=Q([_(0x0,_0xd8e16e(_0x4c2fd4)),_(0x1,_0xd8e16e(_0xaee3d1)),_(0x2,_0xd8e16e(_0x5d4e31)),_(0x3,_0xd8e16e(_0x3aac1a))],f);var re=Object[_0x46fe98(0xee)],te=(_0x3863f7,_0x521605,_0x1b020c,_0x2dbbe6)=>{for(var _0x120497=_0x2dbbe6>0x1?void 0x0:_0x2dbbe6?re(_0x521605,_0x1b020c):_0x521605,_0x491e0b=_0x3863f7['length']-0x1,_0x56d87e;_0x491e0b>=0x0;_0x491e0b--)(_0x56d87e=_0x3863f7[_0x491e0b])&&(_0x120497=_0x56d87e(_0x120497)||_0x120497);return _0x120497;},N=(_0x1d8111,_0x2d5fc7)=>(_0x59baea,_0x3eebce)=>_0x2d5fc7(_0x59baea,_0x3eebce,_0x1d8111);let g=class extends _0x9d9fe{constructor(_0x8443da,_0x2f77ba){const _0x5a09d8=_0x46fe98;super(),this[_0x5a09d8(0x12d)]=_0x8443da,this[_0x5a09d8(0xec)]=_0x2f77ba,this['_initDataSource']();}[_0x46fe98(0x101)](){const _0x34815b=_0x46fe98;this[_0x34815b(0x12d)][_0x34815b(0x106)]=this[_0x34815b(0xec)],this[_0x34815b(0x12d)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x17ba36),N(0x1,_0xd8e16e(f))],g);var se=Object[_0x46fe98(0xe3)],oe=Object[_0x46fe98(0xee)],ne=(_0x206055,_0x354e4f,_0x407df9)=>_0x354e4f in _0x206055?se(_0x206055,_0x354e4f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x407df9}):_0x206055[_0x354e4f]=_0x407df9,ie=(_0x11f50c,_0x27a989,_0x50c592,_0x26db1a)=>{const _0x2c3741=_0x46fe98;for(var _0x386595=_0x26db1a>0x1?void 0x0:_0x26db1a?oe(_0x27a989,_0x50c592):_0x27a989,_0x3e937b=_0x11f50c[_0x2c3741(0x119)]-0x1,_0x55d301;_0x3e937b>=0x0;_0x3e937b--)(_0x55d301=_0x11f50c[_0x3e937b])&&(_0x386595=_0x55d301(_0x386595)||_0x386595);return _0x386595;},w=(_0x2e1901,_0x28cc7a)=>(_0x3886bf,_0x366f3c)=>_0x28cc7a(_0x3886bf,_0x366f3c,_0x2e1901),$=(_0x917cf9,_0xfc6050,_0x5d0dac)=>ne(_0x917cf9,typeof _0xfc6050!=_0x46fe98(0x139)?_0xfc6050+'':_0xfc6050,_0x5d0dac);let b=class extends _0xc49e69{constructor(_0x57c025=M,_0x413220,_0x42ade3){const _0x20c96c=_0x46fe98;super(),this[_0x20c96c(0xfe)]=_0x57c025,this[_0x20c96c(0x122)]=_0x413220,this[_0x20c96c(0x124)]=_0x42ade3;const {..._0xdf3333}=_0x43fbb8({},M,this[_0x20c96c(0xfe)]);this[_0x20c96c(0x124)]['setConfig'](z,_0xdf3333);}['onStarting'](){const _0x11cbf9=_0x46fe98;[[f],[g],[S]][_0x11cbf9(0x12c)](_0x3727e7=>{const _0x2d8d87=_0x11cbf9;this[_0x2d8d87(0x122)][_0x2d8d87(0x121)](_0x3727e7);});}['onReady'](){const _0x2eb999=_0x46fe98;this['_injector']['get'](g),this[_0x2eb999(0x122)][_0x2eb999(0xf6)](S);}};function _0x4cb1(_0x2dc4f4,_0x176f4a){const _0x47c65d=_0x47c6();return _0x4cb1=function(_0x4cb114,_0x322d4a){_0x4cb114=_0x4cb114-0xdf;let _0x3d046b=_0x47c65d[_0x4cb114];return _0x3d046b;},_0x4cb1(_0x2dc4f4,_0x176f4a);}$(b,_0x46fe98(0xe6),W),$(b,_0x46fe98(0x12b),_0x1b0f42[_0x46fe98(0x114)]),b=ie([_0xabdba(_0x103552,_0x4bccec,_0x3559a3),w(0x1,_0xd8e16e(_0x3aac1a)),w(0x2,_0x1ed246)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x7252(){const _0x3d99f7=['toStringTag','solved','subscribe','resolved','Injector','userID','getUser','ref','COMMENT','body','threadId','_injector','Inject','error','DependentOn','replyId','addUser','Disposable','@univerjs/core','UniverThreadCommentUi','ThreadCommentModel','content','root','post','Plugin','map','@univerjs-pro/license','customRanges','replies','Solve','forEach','bufferTime','reply','getCurrentUser','exports','getMemberID','Delete','UniverProThreadCommentDatasource','parentId','onStarting','userId','commentUpdate$','UniverInstanceType','format','CustomRangeType','_httpService','defineProperty','/delete','getOwnPropertyDescriptor','IConfigService','updateComment','Unknown','getUnit','397194LcJKgI','Add','467760ydnvNj','UNRECOGNIZED','find','@univerjs-pro/collaboration-client','disposeWithMe','UniverCollaborationClientPlugin','CollaborationSessionService','unitId','UniverLicensePlugin','code','894172EAorrG','slice','object','Reply','@univerjs/thread-comment-ui','/universer-api/user/list','dataSource','2329746ZVKpMg','_threadCommentDataSourceService','_sessionService','_threadCommentDataSource','deleteComment','get','user','Solved','function','@univerjs/thread-comment','comment','_userService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','OpenOrReOpen','onReady','UniverProCollaborationClient','UserManagerService','pipe','parse','/edit','resolveComment','size','add','payload','_configService','listComments','@univerjs/network','_config','Edit','/universer-api/comment/unit/','_initDataSource','UniverThreadCommentDataSourcePlugin','171068HIYzXe','UniverNetwork','stringify','users','2639441wRssrY','getComment','addComment','_init','/add','UniverProLicense','Module','rxjs','requireSession','filter','personId','symbol','pluginName','_threadCommentModel','comments','rangeId','length','/solved','dayjs','_initUserSync','_commentService','UNIVER_UNKNOWN','4748912gOWdQN','5ElZCRJ','UniverThreadCommentUIPlugin','thread-comment-data-source.config','createTimestamp'];_0x7252=function(){return _0x3d99f7;};return _0x7252();}function _0x5b28(_0x48edd7,_0x1b7f57){const _0x72529e=_0x7252();return _0x5b28=function(_0x5b2852,_0x3e8976){_0x5b2852=_0x5b2852-0x12d;let _0x1bedf3=_0x72529e[_0x5b2852];return _0x1bedf3;},_0x5b28(_0x48edd7,_0x1b7f57);}(function(_0x16df41,_0x3e2a07){const _0x1619ff=_0x5b28,_0x493492=_0x16df41();while(!![]){try{const _0x107f87=parseInt(_0x1619ff(0x18d))/0x1+-parseInt(_0x1619ff(0x137))/0x2+-parseInt(_0x1619ff(0x19e))/0x3+parseInt(_0x1619ff(0x197))/0x4*(-parseInt(_0x1619ff(0x152))/0x5)+parseInt(_0x1619ff(0x18b))/0x6+parseInt(_0x1619ff(0x13b))/0x7+parseInt(_0x1619ff(0x151))/0x8;if(_0x107f87===_0x3e2a07)break;else _0x493492['push'](_0x493492['shift']());}catch(_0x52b4a2){_0x493492['push'](_0x493492['shift']());}}}(_0x7252,0x664a1),function(_0x2f46a0,_0x10f217){const _0x286019=_0x5b28;typeof exports==_0x286019(0x199)&&typeof module<'u'?_0x10f217(exports,require(_0x286019(0x190)),require(_0x286019(0x170)),require(_0x286019(0x168)),require(_0x286019(0x19b)),require(_0x286019(0x1a7)),require(_0x286019(0x142)),require(_0x286019(0x131))):typeof define==_0x286019(0x1a6)&&define['amd']?define([_0x286019(0x178),_0x286019(0x190),_0x286019(0x170),_0x286019(0x168),_0x286019(0x19b),_0x286019(0x1a7),'rxjs',_0x286019(0x131)],_0x10f217):(_0x2f46a0=typeof globalThis<'u'?globalThis:_0x2f46a0||self,_0x10f217(_0x2f46a0[_0x286019(0x17b)]={},_0x2f46a0[_0x286019(0x1ad)],_0x2f46a0[_0x286019(0x140)],_0x2f46a0['UniverCore'],_0x2f46a0[_0x286019(0x169)],_0x2f46a0['UniverThreadComment'],_0x2f46a0[_0x286019(0x142)],_0x2f46a0[_0x286019(0x138)]));}(this,function(_0x5d245b,_0x3fa7f6,_0x309a95,_0x35d833,_0x3e4da7,_0x2a68c7,_0x445ae9,_0xe56ba2){'use strict';const _0x3b96d7=_0x5b28;const _0x1a43bc=_0x3b96d7(0x1aa);var _0x1eeb9d=(_0x2f678a=>(_0x2f678a[_0x2f678a[_0x3b96d7(0x1ab)]=0x0]=_0x3b96d7(0x1ab),_0x2f678a[_0x2f678a[_0x3b96d7(0x1a5)]=0x1]=_0x3b96d7(0x1a5),_0x2f678a[_0x2f678a[_0x3b96d7(0x18e)]=-0x1]=_0x3b96d7(0x18e),_0x2f678a))(_0x1eeb9d||{}),_0x552ebc=(_0x3f1df9=>(_0x3f1df9[_0x3f1df9[_0x3b96d7(0x189)]=0x0]=_0x3b96d7(0x189),_0x3f1df9[_0x3f1df9[_0x3b96d7(0x18c)]=0x1]=_0x3b96d7(0x18c),_0x3f1df9[_0x3f1df9[_0x3b96d7(0x19a)]=0x2]='Reply',_0x3f1df9[_0x3f1df9[_0x3b96d7(0x133)]=0x3]='Edit',_0x3f1df9[_0x3f1df9['Delete']=0x4]=_0x3b96d7(0x17a),_0x3f1df9[_0x3f1df9[_0x3b96d7(0x173)]=0x5]=_0x3b96d7(0x173),_0x3f1df9[_0x3f1df9[_0x3b96d7(0x18e)]=-0x1]=_0x3b96d7(0x18e),_0x3f1df9))(_0x552ebc||{});const _0x3e5d09=_0x324853=>_0x35d833[_0x3b96d7(0x14d)](new Date(+_0x324853))['format']('YYYY/MM/DD\x20HH:mm'),_0x110d7e=async(_0xf7c4c5,_0x2f3da8)=>{const _0x137852=_0x3b96d7,_0x2bf475=_0xf7c4c5[_0x137852(0x1a3)](_0x35d833[_0x137852(0x1ae)]),_0x5c3c86=_0xf7c4c5[_0x137852(0x1a3)](_0xe56ba2['HTTPService']);_0x2f3da8[_0x137852(0x174)](_0x356ce9=>{const _0x1c9073=_0x137852;_0x2bf475[_0x1c9073(0x15c)](_0x356ce9)&&_0x2f3da8['delete'](_0x356ce9);}),_0x2f3da8[_0x137852(0x1b3)]&&(await _0x5c3c86['get'](_0x137852(0x19c),{'params':{'userIDs':[..._0x2f3da8]}}))[_0x137852(0x15f)]['users'][_0x137852(0x174)](_0x4f4ff4=>{const _0x529f94=_0x137852;_0x4f4ff4&&_0x2bf475[_0x529f94(0x166)](_0x4f4ff4);});};var _0x5d8e7e=Object['getOwnPropertyDescriptor'],_0x3528c8=(_0x3e9f35,_0x4719c9,_0x439aec,_0x299ee2)=>{const _0x42b174=_0x3b96d7;for(var _0x2061e7=_0x299ee2>0x1?void 0x0:_0x299ee2?_0x5d8e7e(_0x4719c9,_0x439aec):_0x4719c9,_0x54eb81=_0x3e9f35[_0x42b174(0x14b)]-0x1,_0x531e48;_0x54eb81>=0x0;_0x54eb81--)(_0x531e48=_0x3e9f35[_0x54eb81])&&(_0x2061e7=_0x531e48(_0x2061e7)||_0x2061e7);return _0x2061e7;},_0x1e1de8=(_0x4ffbb3,_0xfb3a8d)=>(_0x42fb5f,_0x17b98e)=>_0xfb3a8d(_0x42fb5f,_0x17b98e,_0x4ffbb3);let _0x35cdc0=class extends _0x35d833[_0x3b96d7(0x167)]{constructor(_0x567fea,_0x4df1e6,_0x36daf3,_0x3b6ade){const _0x57218f=_0x3b96d7;super(),this[_0x57218f(0x14f)]=_0x567fea,this[_0x57218f(0x148)]=_0x4df1e6,this[_0x57218f(0x1a9)]=_0x36daf3,this[_0x57218f(0x161)]=_0x3b6ade,this[_0x57218f(0x13e)](),this[_0x57218f(0x14e)]();}[_0x3b96d7(0x14e)](){const _0x3ca97d=_0x3b96d7;this[_0x3ca97d(0x191)](this[_0x3ca97d(0x148)][_0x3ca97d(0x17f)][_0x3ca97d(0x1af)](_0x445ae9[_0x3ca97d(0x175)](0x10))['subscribe'](_0x3a59d3=>{const _0x516e18=_0x3ca97d,_0x2667a1=new Set();_0x3a59d3['forEach'](_0x88c345=>{const _0x179176=_0x5b28;switch(_0x88c345['type']){case _0x179176(0x12d):{const _0x1dc1e6=_0x88c345[_0x179176(0x12e)][_0x179176(0x145)];_0x2667a1[_0x179176(0x12d)](_0x1dc1e6);break;}}}),_0x110d7e(this[_0x516e18(0x161)],_0x2667a1);}));}[_0x3b96d7(0x13e)](){const _0x509ca3=_0x3b96d7;this[_0x509ca3(0x191)](this[_0x509ca3(0x14f)]['commentUpdate$'][_0x509ca3(0x158)](async _0x26f56b=>{const _0x2a1c4b=_0x509ca3;var _0x1c9ca0,_0x76084b,_0x424582,_0x5c9bda;const _0x12f916=(_0x1c9ca0=this[_0x2a1c4b(0x148)][_0x2a1c4b(0x18a)](_0x26f56b[_0x2a1c4b(0x194)])[_0x2a1c4b(0x18f)](_0x29df26=>_0x29df26[_0x2a1c4b(0x160)]===_0x26f56b[_0x2a1c4b(0x160)]))==null?void 0x0:_0x1c9ca0['root'];if(!_0x12f916)return;const {unitId:_0x5a9fa1,subUnitId:_0x192ffc}=_0x12f916;switch(_0x26f56b['user']&&this['_userService'][_0x2a1c4b(0x166)](_0x26f56b['user']),_0x26f56b['type']){case _0x552ebc[_0x2a1c4b(0x18c)]:break;case _0x552ebc[_0x2a1c4b(0x19a)]:{this[_0x2a1c4b(0x148)][_0x2a1c4b(0x13d)](_0x5a9fa1,_0x192ffc,{'unitId':_0x5a9fa1,'subUnitId':_0x192ffc,'ref':'','id':_0x26f56b[_0x2a1c4b(0x165)],'dT':_0x3e5d09(+_0x26f56b[_0x2a1c4b(0x155)]),'threadId':_0x26f56b[_0x2a1c4b(0x160)],'personId':(_0x424582=(_0x76084b=_0x26f56b[_0x2a1c4b(0x1a4)])==null?void 0x0:_0x76084b['userID'])!=null?_0x424582:_0x26f56b[_0x2a1c4b(0x17e)],'text':JSON[_0x2a1c4b(0x1b0)](_0x26f56b[_0x2a1c4b(0x16b)]),'parentId':_0x12f916['id']});break;}case _0x552ebc['Delete']:{const _0x1666c2=this[_0x2a1c4b(0x148)][_0x2a1c4b(0x13c)](_0x5a9fa1,_0x192ffc,_0x26f56b[_0x2a1c4b(0x165)]);_0x1666c2&&_0x1666c2[_0x2a1c4b(0x17c)]&&this[_0x2a1c4b(0x148)]['deleteComment'](_0x5a9fa1,_0x192ffc,_0x26f56b[_0x2a1c4b(0x165)]);break;}case _0x552ebc[_0x2a1c4b(0x133)]:{this[_0x2a1c4b(0x148)][_0x2a1c4b(0x188)](_0x5a9fa1,_0x192ffc,{'commentId':_0x26f56b['replyId'],'text':JSON['parse'](_0x26f56b[_0x2a1c4b(0x16b)])});break;}case _0x552ebc['Solve']:{const _0x5a90db=(_0x5c9bda=this[_0x2a1c4b(0x148)][_0x2a1c4b(0x18a)](_0x26f56b['unitId'])[_0x2a1c4b(0x18f)](_0x1e9967=>_0x1e9967[_0x2a1c4b(0x160)]===_0x26f56b[_0x2a1c4b(0x160)]))==null?void 0x0:_0x5c9bda[_0x2a1c4b(0x16c)];_0x5a90db&&this['_threadCommentModel'][_0x2a1c4b(0x1b2)](_0x5a9fa1,_0x192ffc,_0x5a90db['id'],_0x26f56b[_0x2a1c4b(0x157)]===_0x1eeb9d['Solved']);break;}}}));}};_0x35cdc0=_0x3528c8([_0x1e1de8(0x0,_0x35d833[_0x3b96d7(0x162)](_0x3fa7f6['CommentService'])),_0x1e1de8(0x1,_0x35d833[_0x3b96d7(0x162)](_0x2a68c7[_0x3b96d7(0x16a)])),_0x1e1de8(0x2,_0x35d833[_0x3b96d7(0x162)](_0x35d833[_0x3b96d7(0x1ae)])),_0x1e1de8(0x3,_0x35d833[_0x3b96d7(0x162)](_0x35d833['Injector']))],_0x35cdc0);const _0x208c41=_0x3b96d7(0x154),_0x1c9315={};var _0x590d28=Object[_0x3b96d7(0x186)],_0x48981d=(_0x53254e,_0x2050b5,_0x5ddfc5,_0x4e6f39)=>{const _0x4e30ed=_0x3b96d7;for(var _0x4a0457=_0x4e6f39>0x1?void 0x0:_0x4e6f39?_0x590d28(_0x2050b5,_0x5ddfc5):_0x2050b5,_0x4d9484=_0x53254e[_0x4e30ed(0x14b)]-0x1,_0x2d2bbb;_0x4d9484>=0x0;_0x4d9484--)(_0x2d2bbb=_0x53254e[_0x4d9484])&&(_0x4a0457=_0x2d2bbb(_0x4a0457)||_0x4a0457);return _0x4a0457;},_0x117d22=(_0x521dd0,_0x4bb3fe)=>(_0x34e226,_0x2fe828)=>_0x4bb3fe(_0x34e226,_0x2fe828,_0x521dd0);function _0x125ba0(_0x2f7ccc,_0x10d5ee){const _0x43a4eb=_0x3b96d7,_0x350f72=_0x2f7ccc[_0x43a4eb(0x172)][0x0];return{..._0x10d5ee,'id':_0x350f72[_0x43a4eb(0x165)],'resolved':_0x2f7ccc[_0x43a4eb(0x157)]===0x1,'dT':_0x3e5d09(_0x350f72[_0x43a4eb(0x155)]),'personId':_0x350f72[_0x43a4eb(0x17e)],'threadId':_0x350f72[_0x43a4eb(0x160)]};}function _0x445731(_0x3218dd,_0x1a3ba8,_0x2086d6){const _0xf9c90c=_0x3b96d7;var _0x4492d9,_0x1bb760;if(((_0x1bb760=(_0x4492d9=_0x3218dd==null?void 0x0:_0x3218dd[_0xf9c90c(0x172)])==null?void 0x0:_0x4492d9[_0xf9c90c(0x14b)])!=null?_0x1bb760:0x0)>0x0){const _0x3430ca=(_0x30e768,_0x3b04b6)=>({'id':_0x30e768[_0xf9c90c(0x165)],'threadId':_0x30e768['threadId'],'dT':_0x3e5d09(_0x30e768['createTimestamp']),'personId':_0x30e768[_0xf9c90c(0x17e)],'resolved':_0x3218dd['solved']===_0x1eeb9d[_0xf9c90c(0x1a5)],'unitId':_0x1a3ba8,'subUnitId':_0x2086d6,'text':JSON['parse'](_0x30e768[_0xf9c90c(0x16b)]),'parentId':_0x3b04b6}),_0x4d5e7f=_0x3430ca(_0x3218dd[_0xf9c90c(0x172)][0x0]);return{..._0x4d5e7f,'children':_0x3218dd[_0xf9c90c(0x172)][_0xf9c90c(0x198)](0x1)[_0xf9c90c(0x16f)](_0x3f3055=>_0x3430ca(_0x3f3055,_0x4d5e7f['id']))};}return null;}let _0x51e779=class{constructor(_0x56fc4b,_0x31f424,_0xb51cb4,_0x127c00){const _0xc2472f=_0x3b96d7;this['_httpService']=_0x56fc4b,this[_0xc2472f(0x1a9)]=_0x31f424,this['_sessionService']=_0xb51cb4,this[_0xc2472f(0x161)]=_0x127c00;}async[_0x3b96d7(0x13d)](_0xedacf7){const _0x56e8ad=_0x3b96d7;var _0x43dd5f,_0x57093e;const {parentId:_0x3d07bd,unitId:_0x4e39a8,text:_0x1b6fab,threadId:_0x7095dc}=_0xedacf7,_0x396af7=(_0x57093e=(_0x43dd5f=_0x1b6fab['customRanges'])==null?void 0x0:_0x43dd5f[_0x56e8ad(0x144)](_0x3fcde1=>_0x3fcde1['rangeType']===_0x35d833[_0x56e8ad(0x182)][_0x56e8ad(0x15e)])[_0x56e8ad(0x16f)](_0x34fb4e=>_0x34fb4e[_0x56e8ad(0x14a)]))!=null?_0x57093e:[],_0x36a65d=JSON['stringify'](_0x1b6fab),_0x59ce9f=(await this[_0x56e8ad(0x1a0)][_0x56e8ad(0x143)](_0x4e39a8))[_0x56e8ad(0x179)]();if(_0x3d07bd){const _0x221c41={'memberId':_0x59ce9f,'unitId':_0x4e39a8,'content':_0x36a65d,'mention':_0x396af7,'threadId':_0x7095dc},_0x25786f=(await this[_0x56e8ad(0x183)][_0x56e8ad(0x16d)](_0x56e8ad(0x134)+_0x4e39a8+'/reply',{'body':_0x221c41}))['body'][_0x56e8ad(0x176)];return{..._0xedacf7,'id':_0x25786f[_0x56e8ad(0x165)],'dT':_0x35d833[_0x56e8ad(0x14d)](+_0x25786f[_0x56e8ad(0x155)])[_0x56e8ad(0x181)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x25786f['userId']};}else{const _0x6a5e76={'memberId':_0x59ce9f,'unitId':_0x4e39a8,'content':_0x36a65d,'mention':_0x396af7},_0x2a8537=await this[_0x56e8ad(0x183)][_0x56e8ad(0x16d)](_0x56e8ad(0x134)+_0x4e39a8+_0x56e8ad(0x13f),{'body':_0x6a5e76});return _0x125ba0(_0x2a8537['body'][_0x56e8ad(0x1a8)],_0xedacf7);}}async[_0x3b96d7(0x188)](_0x21ba5f){const _0x11406b=_0x3b96d7;var _0x482c01,_0x3f1787;const {text:_0x5ba6f9,unitId:_0x2e27ce}=_0x21ba5f,_0x18c929=(_0x3f1787=(_0x482c01=_0x5ba6f9[_0x11406b(0x171)])==null?void 0x0:_0x482c01[_0x11406b(0x144)](_0x3915c8=>_0x3915c8['rangeType']===_0x35d833['CustomRangeType']['COMMENT'])[_0x11406b(0x16f)](_0x2416a3=>_0x2416a3[_0x11406b(0x14a)]))!=null?_0x3f1787:[],_0x19637b=JSON[_0x11406b(0x139)](_0x5ba6f9),_0x11219a=_0x21ba5f[_0x11406b(0x160)],_0x358832=_0x21ba5f['id'],_0x2211bb={'memberId':(await this[_0x11406b(0x1a0)]['requireSession'](_0x2e27ce))[_0x11406b(0x179)](),'unitId':_0x2e27ce,'threadId':_0x11219a,'mention':_0x18c929,'content':_0x19637b,'replyId':_0x358832},_0x5a9d51=await this[_0x11406b(0x183)][_0x11406b(0x16d)](_0x11406b(0x134)+_0x2e27ce+_0x11406b(0x1b1),{'body':_0x2211bb});return!_0x5a9d51[_0x11406b(0x15f)][_0x11406b(0x163)]||_0x5a9d51[_0x11406b(0x15f)][_0x11406b(0x163)][_0x11406b(0x196)]===0x1;}async[_0x3b96d7(0x1b2)](_0x8aa3bc){const _0x72980e=_0x3b96d7,{unitId:_0x47ff2a}=_0x8aa3bc,_0x432536=_0x8aa3bc['threadId'],_0x8ed6c4={'memberId':this['_userService'][_0x72980e(0x177)]()[_0x72980e(0x15b)],'unitId':_0x47ff2a,'threadId':_0x432536,'solved':_0x8aa3bc[_0x72980e(0x159)]?_0x1eeb9d[_0x72980e(0x1a5)]:_0x1eeb9d[_0x72980e(0x1ab)]},_0x309760=await this[_0x72980e(0x183)][_0x72980e(0x16d)](_0x72980e(0x134)+_0x47ff2a+_0x72980e(0x14c),{'body':_0x8ed6c4});return!_0x309760['body'][_0x72980e(0x163)]||_0x309760[_0x72980e(0x15f)][_0x72980e(0x163)]['code']===0x1;}async[_0x3b96d7(0x1a2)](_0x394a04,_0x35ccc1,_0xfb462a,_0x322c54){const _0x2bd61a=_0x3b96d7,_0x371814={'memberId':(await this[_0x2bd61a(0x1a0)][_0x2bd61a(0x143)](_0x394a04))[_0x2bd61a(0x179)](),'threadId':_0xfb462a,'replyId':_0x322c54,'unitId':_0x394a04},_0x2197c8=await this['_httpService'][_0x2bd61a(0x16d)](_0x2bd61a(0x134)+_0x394a04+_0x2bd61a(0x185),{'body':_0x371814});return!_0x2197c8[_0x2bd61a(0x15f)][_0x2bd61a(0x163)]||_0x2197c8[_0x2bd61a(0x15f)][_0x2bd61a(0x163)]['code']===0x1;}async[_0x3b96d7(0x130)](_0x7eba94,_0x394caa,_0x15c50e){const _0x1b9d65=_0x3b96d7,_0x54e98c={'unitId':_0x7eba94,'threadId':_0x15c50e},_0x527d95=await this[_0x1b9d65(0x183)][_0x1b9d65(0x16d)](_0x1b9d65(0x134)+_0x7eba94+'/list',{'body':_0x54e98c}),_0x19eb74=_0x15c50e['map'](_0x46777e=>_0x445731(_0x527d95[_0x1b9d65(0x15f)][_0x1b9d65(0x149)][_0x46777e],_0x7eba94,_0x394caa))[_0x1b9d65(0x144)](Boolean);return Object['values'](_0x527d95[_0x1b9d65(0x15f)][_0x1b9d65(0x13a)])[_0x1b9d65(0x174)](_0x493e31=>{const _0x284352=_0x1b9d65;this[_0x284352(0x1a9)][_0x284352(0x166)](_0x493e31);}),_0x19eb74;}['saveCommentToSnapshot'](_0x8ad77b){const _0x415532=_0x3b96d7;return{'id':_0x8ad77b['id'],'threadId':_0x8ad77b[_0x415532(0x160)],'ref':_0x8ad77b[_0x415532(0x15d)]};}};_0x51e779=_0x48981d([_0x117d22(0x0,_0x35d833['Inject'](_0xe56ba2['HTTPService'])),_0x117d22(0x1,_0x35d833[_0x3b96d7(0x162)](_0x35d833['UserManagerService'])),_0x117d22(0x2,_0x35d833['Inject'](_0x3fa7f6[_0x3b96d7(0x193)])),_0x117d22(0x3,_0x35d833[_0x3b96d7(0x162)](_0x35d833[_0x3b96d7(0x15a)]))],_0x51e779);var _0x29efab=Object[_0x3b96d7(0x186)],_0x3adec7=(_0x17b043,_0x4aac53,_0x3dc711,_0x5d5297)=>{const _0x31a49d=_0x3b96d7;for(var _0x1de0d7=_0x5d5297>0x1?void 0x0:_0x5d5297?_0x29efab(_0x4aac53,_0x3dc711):_0x4aac53,_0x521759=_0x17b043[_0x31a49d(0x14b)]-0x1,_0x5d69d9;_0x521759>=0x0;_0x521759--)(_0x5d69d9=_0x17b043[_0x521759])&&(_0x1de0d7=_0x5d69d9(_0x1de0d7)||_0x1de0d7);return _0x1de0d7;},_0x419881=(_0x2bee28,_0x1fd8bb)=>(_0x2be66c,_0xc92d2b)=>_0x1fd8bb(_0x2be66c,_0xc92d2b,_0x2bee28);let _0x138247=class extends _0x35d833[_0x3b96d7(0x167)]{constructor(_0x245992,_0xff3214){const _0x4dde28=_0x3b96d7;super(),this['_threadCommentDataSourceService']=_0x245992,this[_0x4dde28(0x1a1)]=_0xff3214,this['_initDataSource']();}[_0x3b96d7(0x135)](){const _0x33ffd2=_0x3b96d7;this[_0x33ffd2(0x19f)][_0x33ffd2(0x19d)]=this[_0x33ffd2(0x1a1)],this[_0x33ffd2(0x19f)]['syncUpdateMutationToColla']=!0x1;}};_0x138247=_0x3adec7([_0x419881(0x0,_0x2a68c7['IThreadCommentDataSourceService']),_0x419881(0x1,_0x35d833[_0x3b96d7(0x162)](_0x51e779))],_0x138247);var _0x4d39af=Object[_0x3b96d7(0x184)],_0x50455b=Object[_0x3b96d7(0x186)],_0x1f9a9e=(_0x3a69a8,_0x216278,_0x3f50d4)=>_0x216278 in _0x3a69a8?_0x4d39af(_0x3a69a8,_0x216278,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3f50d4}):_0x3a69a8[_0x216278]=_0x3f50d4,_0x43f9af=(_0x3f495f,_0x1852e5,_0x314154,_0x3643f0)=>{const _0x4c5726=_0x3b96d7;for(var _0x17ffaf=_0x3643f0>0x1?void 0x0:_0x3643f0?_0x50455b(_0x1852e5,_0x314154):_0x1852e5,_0x3a32af=_0x3f495f[_0x4c5726(0x14b)]-0x1,_0x33045b;_0x3a32af>=0x0;_0x3a32af--)(_0x33045b=_0x3f495f[_0x3a32af])&&(_0x17ffaf=_0x33045b(_0x17ffaf)||_0x17ffaf);return _0x17ffaf;},_0x1375ad=(_0x2ae8ad,_0x43d52c)=>(_0x493761,_0x284106)=>_0x43d52c(_0x493761,_0x284106,_0x2ae8ad),_0xe8a4f3=(_0x4181cc,_0x21a87f,_0x18a77e)=>_0x1f9a9e(_0x4181cc,typeof _0x21a87f!=_0x3b96d7(0x146)?_0x21a87f+'':_0x21a87f,_0x18a77e);_0x5d245b[_0x3b96d7(0x136)]=class extends _0x35d833[_0x3b96d7(0x16e)]{constructor(_0xed6918=_0x1c9315,_0x119b29,_0x105875){const _0x21510a=_0x3b96d7;super(),this[_0x21510a(0x132)]=_0xed6918,this[_0x21510a(0x161)]=_0x119b29,this[_0x21510a(0x12f)]=_0x105875;const {..._0x269bb2}=_0x35d833['merge']({},_0x1c9315,this[_0x21510a(0x132)]);this['_configService']['setConfig'](_0x208c41,_0x269bb2);}[_0x3b96d7(0x17d)](){[[_0x51e779],[_0x138247],[_0x35cdc0]]['forEach'](_0x4dcf32=>{const _0x182eab=_0x5b28;this[_0x182eab(0x161)][_0x182eab(0x12d)](_0x4dcf32);});}[_0x3b96d7(0x1ac)](){const _0x11653c=_0x3b96d7;this['_injector'][_0x11653c(0x1a3)](_0x138247),this[_0x11653c(0x161)][_0x11653c(0x1a3)](_0x35cdc0);}},_0xe8a4f3(_0x5d245b[_0x3b96d7(0x136)],_0x3b96d7(0x147),_0x1a43bc),_0xe8a4f3(_0x5d245b[_0x3b96d7(0x136)],'type',_0x35d833[_0x3b96d7(0x180)][_0x3b96d7(0x150)]),_0x5d245b[_0x3b96d7(0x136)]=_0x43f9af([_0x35d833[_0x3b96d7(0x164)](_0x3e4da7[_0x3b96d7(0x153)],_0x3fa7f6[_0x3b96d7(0x192)],_0x309a95[_0x3b96d7(0x195)]),_0x1375ad(0x1,_0x35d833[_0x3b96d7(0x162)](_0x35d833[_0x3b96d7(0x15a)])),_0x1375ad(0x2,_0x35d833[_0x3b96d7(0x187)])],_0x5d245b[_0x3b96d7(0x136)]),Object[_0x3b96d7(0x184)](_0x5d245b,Symbol[_0x3b96d7(0x156)],{'value':_0x3b96d7(0x141)});}));
1
+ (function(_0x3e35af,_0x4061f9){const _0x10a6a8=_0x29a1,_0x32fa74=_0x3e35af();while(!![]){try{const _0x5b9d03=parseInt(_0x10a6a8(0xa3))/0x1*(-parseInt(_0x10a6a8(0x9c))/0x2)+parseInt(_0x10a6a8(0x83))/0x3*(parseInt(_0x10a6a8(0xa8))/0x4)+parseInt(_0x10a6a8(0x79))/0x5+parseInt(_0x10a6a8(0x8d))/0x6+parseInt(_0x10a6a8(0xa9))/0x7*(-parseInt(_0x10a6a8(0x102))/0x8)+parseInt(_0x10a6a8(0xc8))/0x9+-parseInt(_0x10a6a8(0xf5))/0xa;if(_0x5b9d03===_0x4061f9)break;else _0x32fa74['push'](_0x32fa74['shift']());}catch(_0x3320be){_0x32fa74['push'](_0x32fa74['shift']());}}}(_0x32c8,0x93a8e),function(_0x571cf1,_0x39749f){const _0x4bb187=_0x29a1;typeof exports==_0x4bb187(0xd4)&&typeof module<'u'?_0x39749f(exports,require(_0x4bb187(0xf0)),require(_0x4bb187(0xd0)),require('@univerjs/core'),require(_0x4bb187(0xfc)),require(_0x4bb187(0x96)),require(_0x4bb187(0xc4)),require(_0x4bb187(0xe2))):typeof define==_0x4bb187(0xb6)&&define['amd']?define([_0x4bb187(0xae),_0x4bb187(0xf0),'@univerjs-pro/license',_0x4bb187(0xd2),_0x4bb187(0xfc),'@univerjs/thread-comment',_0x4bb187(0xc4),'@univerjs/network'],_0x39749f):(_0x571cf1=typeof globalThis<'u'?globalThis:_0x571cf1||self,_0x39749f(_0x571cf1[_0x4bb187(0x7b)]={},_0x571cf1['UniverProCollaborationClient'],_0x571cf1['UniverProLicense'],_0x571cf1[_0x4bb187(0x84)],_0x571cf1['UniverThreadCommentUi'],_0x571cf1['UniverThreadComment'],_0x571cf1[_0x4bb187(0xc4)],_0x571cf1[_0x4bb187(0x100)]));}(this,function(_0x289463,_0x480e08,_0x19b191,_0x38b9c5,_0x2813cc,_0x4c9be2,_0x5e21de,_0x30fce7){'use strict';const _0x5115ad=_0x29a1;const _0x148033='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x194e5b=(_0x1cbdc9=>(_0x1cbdc9[_0x1cbdc9[_0x5115ad(0xcb)]=0x0]='OpenOrReOpen',_0x1cbdc9[_0x1cbdc9[_0x5115ad(0xe0)]=0x1]=_0x5115ad(0xe0),_0x1cbdc9[_0x1cbdc9['UNRECOGNIZED']=-0x1]=_0x5115ad(0xdb),_0x1cbdc9))(_0x194e5b||{}),_0x564e94=(_0xf90348=>(_0xf90348[_0xf90348[_0x5115ad(0xb7)]=0x0]=_0x5115ad(0xb7),_0xf90348[_0xf90348[_0x5115ad(0x7d)]=0x1]='Add',_0xf90348[_0xf90348[_0x5115ad(0xc5)]=0x2]=_0x5115ad(0xc5),_0xf90348[_0xf90348[_0x5115ad(0xe4)]=0x3]=_0x5115ad(0xe4),_0xf90348[_0xf90348[_0x5115ad(0xe9)]=0x4]=_0x5115ad(0xe9),_0xf90348[_0xf90348[_0x5115ad(0xca)]=0x5]=_0x5115ad(0xca),_0xf90348[_0xf90348['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0xf90348))(_0x564e94||{});const _0x4e0bc7=_0x4a0e0e=>_0x38b9c5['dayjs'](new Date(+_0x4a0e0e))[_0x5115ad(0xb1)]('YYYY/MM/DD\x20HH:mm'),_0x189ea9=async(_0x20827d,_0x31bae5)=>{const _0x3f39ea=_0x5115ad,_0x3abfd3=_0x20827d[_0x3f39ea(0x91)](_0x38b9c5[_0x3f39ea(0x8c)]),_0x494a5d=_0x20827d[_0x3f39ea(0x91)](_0x30fce7[_0x3f39ea(0x7f)]);_0x31bae5[_0x3f39ea(0x7e)](_0x2a6690=>{const _0x545c83=_0x3f39ea;_0x3abfd3[_0x545c83(0xd8)](_0x2a6690)&&_0x31bae5[_0x545c83(0x85)](_0x2a6690);}),_0x31bae5[_0x3f39ea(0x90)]&&(await _0x494a5d[_0x3f39ea(0x91)](_0x3f39ea(0xc1),{'params':{'userIDs':[..._0x31bae5]}}))['body'][_0x3f39ea(0x99)]['forEach'](_0x58a81d=>{const _0xe081a9=_0x3f39ea;_0x58a81d&&_0x3abfd3[_0xe081a9(0xe6)](_0x58a81d);});};var _0x247b26=Object[_0x5115ad(0x95)],_0x12b0de=(_0x4767f5,_0x18d27d,_0x445480,_0x35e816)=>{const _0x476b8b=_0x5115ad;for(var _0x2f669c=_0x35e816>0x1?void 0x0:_0x35e816?_0x247b26(_0x18d27d,_0x445480):_0x18d27d,_0x5b8189=_0x4767f5[_0x476b8b(0xb3)]-0x1,_0x2af04a;_0x5b8189>=0x0;_0x5b8189--)(_0x2af04a=_0x4767f5[_0x5b8189])&&(_0x2f669c=_0x2af04a(_0x2f669c)||_0x2f669c);return _0x2f669c;},_0x3507dd=(_0x545ab0,_0x1f796a)=>(_0x1c2d81,_0x65a7af)=>_0x1f796a(_0x1c2d81,_0x65a7af,_0x545ab0);let _0x16ad41=class extends _0x38b9c5['Disposable']{constructor(_0x3eb864,_0x47c194,_0x1c9567,_0x553160){const _0x55576c=_0x5115ad;super(),this[_0x55576c(0xea)]=_0x3eb864,this['_threadCommentModel']=_0x47c194,this['_userService']=_0x1c9567,this[_0x55576c(0x89)]=_0x553160,this[_0x55576c(0xf7)](),this['_initUserSync']();}[_0x5115ad(0xec)](){const _0x4325c3=_0x5115ad;this[_0x4325c3(0xf1)](this[_0x4325c3(0xf6)][_0x4325c3(0x7c)][_0x4325c3(0xa5)](_0x5e21de[_0x4325c3(0xbe)](0x10))[_0x4325c3(0xa6)](_0x3c0634=>{const _0x3dc77d=_0x4325c3,_0x2831c6=new Set();_0x3c0634[_0x3dc77d(0x7e)](_0x47c742=>{const _0x1346b5=_0x3dc77d;switch(_0x47c742[_0x1346b5(0xce)]){case _0x1346b5(0xf4):{const _0x2310c4=_0x47c742[_0x1346b5(0xfb)][_0x1346b5(0xeb)];_0x2831c6[_0x1346b5(0xf4)](_0x2310c4);break;}}}),_0x189ea9(this[_0x3dc77d(0x89)],_0x2831c6);}));}[_0x5115ad(0xf7)](){const _0x568e43=_0x5115ad;this[_0x568e43(0xf1)](this[_0x568e43(0xea)][_0x568e43(0x7c)][_0x568e43(0xa6)](async _0x22da53=>{const _0x142c76=_0x568e43;var _0x4ef583,_0xe12de2,_0x4590d0,_0x86d20c;const _0x44df97=(_0x4ef583=this[_0x142c76(0xf6)][_0x142c76(0x86)](_0x22da53[_0x142c76(0xb2)])['find'](_0x422dce=>_0x422dce[_0x142c76(0x80)]===_0x22da53[_0x142c76(0x80)]))==null?void 0x0:_0x4ef583[_0x142c76(0xa0)];if(!_0x44df97)return;const {unitId:_0x53f504,subUnitId:_0xe2963f}=_0x44df97;switch(_0x22da53[_0x142c76(0xe5)]&&this[_0x142c76(0x9f)]['addUser'](_0x22da53[_0x142c76(0xe5)]),_0x22da53['type']){case _0x564e94['Add']:break;case _0x564e94[_0x142c76(0xc5)]:{this[_0x142c76(0xf6)][_0x142c76(0xb0)](_0x53f504,_0xe2963f,{'unitId':_0x53f504,'subUnitId':_0xe2963f,'ref':'','id':_0x22da53[_0x142c76(0x82)],'dT':_0x4e0bc7(+_0x22da53[_0x142c76(0xc2)]),'threadId':_0x22da53[_0x142c76(0x80)],'personId':(_0x4590d0=(_0xe12de2=_0x22da53['user'])==null?void 0x0:_0xe12de2['userID'])!=null?_0x4590d0:_0x22da53[_0x142c76(0x8e)],'text':JSON[_0x142c76(0xfa)](_0x22da53[_0x142c76(0xba)]),'parentId':_0x44df97['id']});break;}case _0x564e94['Delete']:{const _0x42d667=this[_0x142c76(0xf6)]['getComment'](_0x53f504,_0xe2963f,_0x22da53[_0x142c76(0x82)]);_0x42d667&&_0x42d667[_0x142c76(0x78)]&&this[_0x142c76(0xf6)][_0x142c76(0xa7)](_0x53f504,_0xe2963f,_0x22da53[_0x142c76(0x82)]);break;}case _0x564e94['Edit']:{this['_threadCommentModel']['updateComment'](_0x53f504,_0xe2963f,{'commentId':_0x22da53[_0x142c76(0x82)],'text':JSON['parse'](_0x22da53[_0x142c76(0xba)])});break;}case _0x564e94[_0x142c76(0xca)]:{const _0x3567d9=(_0x86d20c=this[_0x142c76(0xf6)]['getUnit'](_0x22da53['unitId'])[_0x142c76(0xb5)](_0x491748=>_0x491748['threadId']===_0x22da53[_0x142c76(0x80)]))==null?void 0x0:_0x86d20c[_0x142c76(0xa0)];_0x3567d9&&this[_0x142c76(0xf6)][_0x142c76(0xe8)](_0x53f504,_0xe2963f,_0x3567d9['id'],_0x22da53[_0x142c76(0xfd)]===_0x194e5b[_0x142c76(0xe0)]);break;}}}));}};_0x16ad41=_0x12b0de([_0x3507dd(0x0,_0x38b9c5[_0x5115ad(0xc0)](_0x480e08[_0x5115ad(0xdf)])),_0x3507dd(0x1,_0x38b9c5[_0x5115ad(0xc0)](_0x4c9be2[_0x5115ad(0xb9)])),_0x3507dd(0x2,_0x38b9c5[_0x5115ad(0xc0)](_0x38b9c5[_0x5115ad(0x8c)])),_0x3507dd(0x3,_0x38b9c5[_0x5115ad(0xc0)](_0x38b9c5[_0x5115ad(0x98)]))],_0x16ad41);const _0x4d817a=_0x5115ad(0xff),_0x18cc61={};var _0x502638=Object['getOwnPropertyDescriptor'],_0x9346b6=(_0x5eff2b,_0x11909b,_0xde0ce4,_0x452637)=>{const _0x43ac0d=_0x5115ad;for(var _0x1bc1cf=_0x452637>0x1?void 0x0:_0x452637?_0x502638(_0x11909b,_0xde0ce4):_0x11909b,_0x514b7f=_0x5eff2b[_0x43ac0d(0xb3)]-0x1,_0x408030;_0x514b7f>=0x0;_0x514b7f--)(_0x408030=_0x5eff2b[_0x514b7f])&&(_0x1bc1cf=_0x408030(_0x1bc1cf)||_0x1bc1cf);return _0x1bc1cf;},_0x224e4f=(_0x22d7f9,_0x13cdca)=>(_0x4fdd61,_0x5ed191)=>_0x13cdca(_0x4fdd61,_0x5ed191,_0x22d7f9);function _0x1a959d(_0x26e2b5,_0x48983c){const _0x1ee7b3=_0x5115ad,_0xa6bca1=_0x26e2b5[_0x1ee7b3(0x9b)][0x0];return{..._0x48983c,'id':_0xa6bca1[_0x1ee7b3(0x82)],'resolved':_0x26e2b5[_0x1ee7b3(0xfd)]===0x1,'dT':_0x4e0bc7(_0xa6bca1['createTimestamp']),'personId':_0xa6bca1[_0x1ee7b3(0x8e)],'threadId':_0xa6bca1[_0x1ee7b3(0x80)]};}function _0xd860b7(_0xf6362c,_0x27fe30,_0x47c319){const _0x413760=_0x5115ad;var _0x33632a,_0x289b37;if(((_0x289b37=(_0x33632a=_0xf6362c==null?void 0x0:_0xf6362c[_0x413760(0x9b)])==null?void 0x0:_0x33632a['length'])!=null?_0x289b37:0x0)>0x0){const _0x2c29c6=(_0x2e2b71,_0x3146e4)=>({'id':_0x2e2b71[_0x413760(0x82)],'threadId':_0x2e2b71[_0x413760(0x80)],'dT':_0x4e0bc7(_0x2e2b71[_0x413760(0xc2)]),'personId':_0x2e2b71['userId'],'resolved':_0xf6362c[_0x413760(0xfd)]===_0x194e5b['Solved'],'unitId':_0x27fe30,'subUnitId':_0x47c319,'text':JSON['parse'](_0x2e2b71[_0x413760(0xba)]),'parentId':_0x3146e4}),_0x53d100=_0x2c29c6(_0xf6362c['replies'][0x0]);return{..._0x53d100,'children':_0xf6362c[_0x413760(0x9b)][_0x413760(0xab)](0x1)[_0x413760(0xbc)](_0x3fcaa6=>_0x2c29c6(_0x3fcaa6,_0x53d100['id']))};}return null;}let _0x4251fc=class{constructor(_0x1537c0,_0x53f1ed,_0x3e10e1,_0x33204e){const _0x2ac62f=_0x5115ad;this[_0x2ac62f(0xcf)]=_0x1537c0,this[_0x2ac62f(0x9f)]=_0x53f1ed,this[_0x2ac62f(0xe3)]=_0x3e10e1,this[_0x2ac62f(0x89)]=_0x33204e;}async[_0x5115ad(0xb0)](_0x372010){const _0x5f1691=_0x5115ad;var _0x42f3ed,_0x56269b;const {parentId:_0x4b7108,unitId:_0x1bdd54,text:_0x19a278,threadId:_0x41d163}=_0x372010,_0x3a8530=(_0x56269b=(_0x42f3ed=_0x19a278[_0x5f1691(0xfe)])==null?void 0x0:_0x42f3ed['filter'](_0x458aa7=>_0x458aa7[_0x5f1691(0xa1)]===_0x38b9c5[_0x5f1691(0x9d)]['COMMENT'])['map'](_0x2d5d39=>_0x2d5d39[_0x5f1691(0xad)]))!=null?_0x56269b:[],_0x45cbe9=JSON[_0x5f1691(0xa4)](_0x19a278),_0x3ea819=(await this[_0x5f1691(0xe3)][_0x5f1691(0xb8)](_0x1bdd54))[_0x5f1691(0x94)]();if(_0x4b7108){const _0x1a63ff={'memberId':_0x3ea819,'unitId':_0x1bdd54,'content':_0x45cbe9,'mention':_0x3a8530,'threadId':_0x41d163},_0x405bbf=(await this['_httpService'][_0x5f1691(0xf8)](_0x5f1691(0xc6)+_0x1bdd54+_0x5f1691(0xdd),{'body':_0x1a63ff}))[_0x5f1691(0xc9)][_0x5f1691(0xbf)];return{..._0x372010,'id':_0x405bbf[_0x5f1691(0x82)],'dT':_0x38b9c5['dayjs'](+_0x405bbf[_0x5f1691(0xc2)])[_0x5f1691(0xb1)](_0x5f1691(0x8b)),'personId':_0x405bbf[_0x5f1691(0x8e)]};}else{const _0x35eb19={'memberId':_0x3ea819,'unitId':_0x1bdd54,'content':_0x45cbe9,'mention':_0x3a8530},_0x76a88d=await this['_httpService'][_0x5f1691(0xf8)](_0x5f1691(0xc6)+_0x1bdd54+_0x5f1691(0x8a),{'body':_0x35eb19});return _0x1a959d(_0x76a88d['body'][_0x5f1691(0x9e)],_0x372010);}}async[_0x5115ad(0xcc)](_0x5c884e){const _0x5a763d=_0x5115ad;var _0x895496,_0x2f084b;const {text:_0x3ced22,unitId:_0x2968be}=_0x5c884e,_0x47ef16=(_0x2f084b=(_0x895496=_0x3ced22[_0x5a763d(0xfe)])==null?void 0x0:_0x895496[_0x5a763d(0x7a)](_0x15bc1d=>_0x15bc1d[_0x5a763d(0xa1)]===_0x38b9c5[_0x5a763d(0x9d)][_0x5a763d(0xf9)])[_0x5a763d(0xbc)](_0x61e378=>_0x61e378[_0x5a763d(0xad)]))!=null?_0x2f084b:[],_0x4279d6=JSON[_0x5a763d(0xa4)](_0x3ced22),_0x186cb7=_0x5c884e['threadId'],_0x22e09f=_0x5c884e['id'],_0x4561b0={'memberId':(await this[_0x5a763d(0xe3)][_0x5a763d(0xb8)](_0x2968be))[_0x5a763d(0x94)](),'unitId':_0x2968be,'threadId':_0x186cb7,'mention':_0x47ef16,'content':_0x4279d6,'replyId':_0x22e09f},_0x241880=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x2968be+_0x5a763d(0xf2),{'body':_0x4561b0});return!_0x241880[_0x5a763d(0xc9)][_0x5a763d(0xcd)]||_0x241880[_0x5a763d(0xc9)][_0x5a763d(0xcd)][_0x5a763d(0xde)]===0x1;}async[_0x5115ad(0xe8)](_0x17c2c7){const _0x55e35f=_0x5115ad,{unitId:_0x4d7054}=_0x17c2c7,_0x555a70=_0x17c2c7[_0x55e35f(0x80)],_0x38fa88={'memberId':this[_0x55e35f(0x9f)][_0x55e35f(0xd5)]()[_0x55e35f(0x81)],'unitId':_0x4d7054,'threadId':_0x555a70,'solved':_0x17c2c7[_0x55e35f(0x87)]?_0x194e5b[_0x55e35f(0xe0)]:_0x194e5b[_0x55e35f(0xcb)]},_0x2197e5=await this['_httpService'][_0x55e35f(0xf8)](_0x55e35f(0xc6)+_0x4d7054+_0x55e35f(0x93),{'body':_0x38fa88});return!_0x2197e5[_0x55e35f(0xc9)][_0x55e35f(0xcd)]||_0x2197e5['body'][_0x55e35f(0xcd)][_0x55e35f(0xde)]===0x1;}async[_0x5115ad(0xa7)](_0x2751d5,_0x150df8,_0x2d3598,_0x2f2b88){const _0x451144=_0x5115ad,_0x42dd73={'memberId':(await this[_0x451144(0xe3)]['requireSession'](_0x2751d5))[_0x451144(0x94)](),'threadId':_0x2d3598,'replyId':_0x2f2b88,'unitId':_0x2751d5},_0x365a49=await this[_0x451144(0xcf)][_0x451144(0xf8)]('/universer-api/comment/unit/'+_0x2751d5+'/delete',{'body':_0x42dd73});return!_0x365a49[_0x451144(0xc9)][_0x451144(0xcd)]||_0x365a49[_0x451144(0xc9)][_0x451144(0xcd)]['code']===0x1;}async[_0x5115ad(0x9a)](_0xaae682,_0x4b6e3a,_0x844d3b){const _0x137288=_0x5115ad,_0x4eb079={'unitId':_0xaae682,'threadId':_0x844d3b},_0x557dfa=await this['_httpService']['post'](_0x137288(0xc6)+_0xaae682+'/list',{'body':_0x4eb079}),_0x3fd88a=_0x844d3b['map'](_0x129f19=>_0xd860b7(_0x557dfa[_0x137288(0xc9)][_0x137288(0xd7)][_0x129f19],_0xaae682,_0x4b6e3a))['filter'](Boolean);return Object['values'](_0x557dfa[_0x137288(0xc9)][_0x137288(0x99)])[_0x137288(0x7e)](_0x3dec8d=>{const _0x3499a3=_0x137288;this[_0x3499a3(0x9f)]['addUser'](_0x3dec8d);}),_0x3fd88a;}[_0x5115ad(0xa2)](_0xb0999a){const _0xdd977f=_0x5115ad;return{'id':_0xb0999a['id'],'threadId':_0xb0999a['threadId'],'ref':_0xb0999a[_0xdd977f(0x88)]};}};_0x4251fc=_0x9346b6([_0x224e4f(0x0,_0x38b9c5[_0x5115ad(0xc0)](_0x30fce7[_0x5115ad(0x7f)])),_0x224e4f(0x1,_0x38b9c5['Inject'](_0x38b9c5[_0x5115ad(0x8c)])),_0x224e4f(0x2,_0x38b9c5[_0x5115ad(0xc0)](_0x480e08[_0x5115ad(0xed)])),_0x224e4f(0x3,_0x38b9c5['Inject'](_0x38b9c5['Injector']))],_0x4251fc);var _0x40a728=Object['getOwnPropertyDescriptor'],_0x26ff15=(_0x530c08,_0x224796,_0x43d815,_0xef45ae)=>{for(var _0x171810=_0xef45ae>0x1?void 0x0:_0xef45ae?_0x40a728(_0x224796,_0x43d815):_0x224796,_0x1a6c2a=_0x530c08['length']-0x1,_0x213c15;_0x1a6c2a>=0x0;_0x1a6c2a--)(_0x213c15=_0x530c08[_0x1a6c2a])&&(_0x171810=_0x213c15(_0x171810)||_0x171810);return _0x171810;},_0x37aff=(_0x36be24,_0x217f37)=>(_0x4dcec1,_0x17fff4)=>_0x217f37(_0x4dcec1,_0x17fff4,_0x36be24);let _0x315825=class extends _0x38b9c5[_0x5115ad(0xdc)]{constructor(_0x2795d4,_0x10a4c7){const _0x2ade54=_0x5115ad;super(),this[_0x2ade54(0x103)]=_0x2795d4,this[_0x2ade54(0x92)]=_0x10a4c7,this[_0x2ade54(0xaf)]();}['_initDataSource'](){const _0xcf6852=_0x5115ad;this[_0xcf6852(0x103)][_0xcf6852(0xc3)]=this['_threadCommentDataSource'],this[_0xcf6852(0x103)][_0xcf6852(0x8f)]=!0x1;}};_0x315825=_0x26ff15([_0x37aff(0x0,_0x4c9be2[_0x5115ad(0xda)]),_0x37aff(0x1,_0x38b9c5[_0x5115ad(0xc0)](_0x4251fc))],_0x315825);var _0x2d9df2=Object['defineProperty'],_0x5075ab=Object[_0x5115ad(0x95)],_0x4fcf57=(_0x4abc21,_0x59dc7d,_0x388a3a)=>_0x59dc7d in _0x4abc21?_0x2d9df2(_0x4abc21,_0x59dc7d,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x388a3a}):_0x4abc21[_0x59dc7d]=_0x388a3a,_0x50d142=(_0x1b915c,_0x353a4e,_0x212915,_0xc112d8)=>{for(var _0x56e24d=_0xc112d8>0x1?void 0x0:_0xc112d8?_0x5075ab(_0x353a4e,_0x212915):_0x353a4e,_0x1e80fd=_0x1b915c['length']-0x1,_0x43e1f1;_0x1e80fd>=0x0;_0x1e80fd--)(_0x43e1f1=_0x1b915c[_0x1e80fd])&&(_0x56e24d=_0x43e1f1(_0x56e24d)||_0x56e24d);return _0x56e24d;},_0x5d2dfa=(_0xcb6405,_0x24c56b)=>(_0x403766,_0x587072)=>_0x24c56b(_0x403766,_0x587072,_0xcb6405),_0x5c39c6=(_0x5771ce,_0x24a1f1,_0xc6175d)=>_0x4fcf57(_0x5771ce,typeof _0x24a1f1!=_0x5115ad(0xd3)?_0x24a1f1+'':_0x24a1f1,_0xc6175d);_0x289463['UniverThreadCommentDataSourcePlugin']=class extends _0x38b9c5[_0x5115ad(0xee)]{constructor(_0x4c4dec=_0x18cc61,_0x3753f9,_0x2f2ede){const _0x36cc0a=_0x5115ad;super(),this[_0x36cc0a(0xef)]=_0x4c4dec,this[_0x36cc0a(0x89)]=_0x3753f9,this['_configService']=_0x2f2ede;const {..._0x4b9daf}=_0x38b9c5['merge']({},_0x18cc61,this[_0x36cc0a(0xef)]);this[_0x36cc0a(0xd9)][_0x36cc0a(0x97)](_0x4d817a,_0x4b9daf);}[_0x5115ad(0xc7)](){const _0x182d6e=_0x5115ad;[[_0x4251fc],[_0x315825],[_0x16ad41]][_0x182d6e(0x7e)](_0x4b64b6=>{const _0x5c9739=_0x182d6e;this[_0x5c9739(0x89)][_0x5c9739(0xf4)](_0x4b64b6);});}[_0x5115ad(0xe1)](){this['_injector']['get'](_0x315825),this['_injector']['get'](_0x16ad41);}},_0x5c39c6(_0x289463['UniverThreadCommentDataSourcePlugin'],_0x5115ad(0xbb),_0x148033),_0x5c39c6(_0x289463[_0x5115ad(0xbd)],_0x5115ad(0xce),_0x38b9c5[_0x5115ad(0xac)][_0x5115ad(0xaa)]),_0x289463[_0x5115ad(0xbd)]=_0x50d142([_0x38b9c5[_0x5115ad(0xf3)](_0x2813cc[_0x5115ad(0xd1)],_0x480e08[_0x5115ad(0xe7)],_0x19b191['UniverLicensePlugin']),_0x5d2dfa(0x1,_0x38b9c5[_0x5115ad(0xc0)](_0x38b9c5[_0x5115ad(0x98)])),_0x5d2dfa(0x2,_0x38b9c5[_0x5115ad(0xb4)])],_0x289463[_0x5115ad(0xbd)]),Object[_0x5115ad(0xd6)](_0x289463,Symbol['toStringTag'],{'value':_0x5115ad(0x101)});}));function _0x29a1(_0x3f8d0b,_0x181dbb){const _0x32c8ec=_0x32c8();return _0x29a1=function(_0x29a144,_0xca0f61){_0x29a144=_0x29a144-0x78;let _0x3727b1=_0x32c8ec[_0x29a144];return _0x3727b1;},_0x29a1(_0x3f8d0b,_0x181dbb);}function _0x32c8(){const _0x3ddf78=['deleteComment','12448glHwDZ','4697qkdbqK','UNIVER_UNKNOWN','slice','UniverInstanceType','rangeId','exports','_initDataSource','addComment','format','unitId','length','IConfigService','find','function','Unknown','requireSession','ThreadCommentModel','content','pluginName','map','UniverThreadCommentDataSourcePlugin','bufferTime','reply','Inject','/universer-api/user/list','createTimestamp','dataSource','rxjs','Reply','/universer-api/comment/unit/','onStarting','6656256MeRNjl','body','Solve','OpenOrReOpen','updateComment','error','type','_httpService','@univerjs-pro/license','UniverThreadCommentUIPlugin','@univerjs/core','symbol','object','getCurrentUser','defineProperty','comments','getUser','_configService','IThreadCommentDataSourceService','UNRECOGNIZED','Disposable','/reply','code','CommentService','Solved','onReady','@univerjs/network','_sessionService','Edit','user','addUser','UniverCollaborationClientPlugin','resolveComment','Delete','_commentService','personId','_initUserSync','CollaborationSessionService','Plugin','_config','@univerjs-pro/collaboration-client','disposeWithMe','/edit','DependentOn','add','7005660XtoUjW','_threadCommentModel','_init','post','COMMENT','parse','payload','@univerjs/thread-comment-ui','solved','customRanges','thread-comment-data-source.config','UniverNetwork','Module','3424aCBDOb','_threadCommentDataSourceService','parentId','1319405EfKiHa','filter','UniverProThreadCommentDatasource','commentUpdate$','Add','forEach','HTTPService','threadId','userID','replyId','15ChErOt','UniverCore','delete','getUnit','resolved','ref','_injector','/add','YYYY/MM/DD\x20HH:mm','UserManagerService','6121488GykwFe','userId','syncUpdateMutationToColla','size','get','_threadCommentDataSource','/solved','getMemberID','getOwnPropertyDescriptor','@univerjs/thread-comment','setConfig','Injector','users','listComments','replies','893410xYQGIf','CustomRangeType','comment','_userService','root','rangeType','saveCommentToSnapshot','1hkUMgz','stringify','pipe','subscribe'];_0x32c8=function(){return _0x3ddf78;};return _0x32c8();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.6.7-experimental.20250331-958639c",
3
+ "version": "0.6.7-experimental.20250331-fa407d3",
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.6.7-experimental.20250331-958639c",
49
- "@univerjs-pro/license": "0.6.7-experimental.20250331-958639c",
50
- "@univerjs/network": "0.6.7-experimental.20250331-958639c",
48
+ "@univerjs-pro/collaboration-client": "0.6.7-experimental.20250331-fa407d3",
49
+ "@univerjs-pro/license": "0.6.7-experimental.20250331-fa407d3",
50
+ "@univerjs/core": "0.6.7-experimental.20250331-fa407d3",
51
51
  "@univerjs/protocol": "0.1.45",
52
- "@univerjs/thread-comment": "0.6.7-experimental.20250331-958639c",
53
- "@univerjs/core": "0.6.7-experimental.20250331-958639c",
54
- "@univerjs/thread-comment-ui": "0.6.7-experimental.20250331-958639c"
52
+ "@univerjs/network": "0.6.7-experimental.20250331-fa407d3",
53
+ "@univerjs/thread-comment-ui": "0.6.7-experimental.20250331-fa407d3",
54
+ "@univerjs/thread-comment": "0.6.7-experimental.20250331-fa407d3"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "^7.8.1",