@univerjs-pro/thread-comment-datasource 0.6.7-experimental.20250331-25f6e0e → 0.6.7-experimental.20250331-45dde91

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 _0xf31ee5=_0x53b0;function _0x53b0(_0x1198f6,_0x110178){const _0x373e07=_0x373e();return _0x53b0=function(_0x53b00b,_0x5b81c9){_0x53b00b=_0x53b00b-0x169;let _0x4175da=_0x373e07[_0x53b00b];return _0x4175da;},_0x53b0(_0x1198f6,_0x110178);}(function(_0x3fe8bb,_0x2d68bf){const _0x3fd657=_0x53b0,_0x1a960a=_0x3fe8bb();while(!![]){try{const _0x36be69=parseInt(_0x3fd657(0x1ca))/0x1+parseInt(_0x3fd657(0x1ce))/0x2+-parseInt(_0x3fd657(0x1d4))/0x3*(-parseInt(_0x3fd657(0x192))/0x4)+-parseInt(_0x3fd657(0x189))/0x5+-parseInt(_0x3fd657(0x1c9))/0x6*(parseInt(_0x3fd657(0x1c5))/0x7)+-parseInt(_0x3fd657(0x1b4))/0x8+parseInt(_0x3fd657(0x1bf))/0x9*(-parseInt(_0x3fd657(0x173))/0xa);if(_0x36be69===_0x2d68bf)break;else _0x1a960a['push'](_0x1a960a['shift']());}catch(_0x2025f6){_0x1a960a['push'](_0x1a960a['shift']());}}}(_0x373e,0xf231d));Object['defineProperty'](exports,Symbol[_0xf31ee5(0x193)],{'value':'Module'});const b=require(_0xf31ee5(0x1cc)),T=require(_0xf31ee5(0x1db)),c=require('@univerjs/core'),j=require(_0xf31ee5(0x1bb)),M=require(_0xf31ee5(0x1ab)),w=require(_0xf31ee5(0x172)),P=require(_0xf31ee5(0x1a7)),U=_0xf31ee5(0x1c8);var I=(_0xdf70ee=>(_0xdf70ee[_0xdf70ee[_0xf31ee5(0x17c)]=0x0]=_0xf31ee5(0x17c),_0xdf70ee[_0xdf70ee['Solved']=0x1]=_0xf31ee5(0x16c),_0xdf70ee[_0xdf70ee[_0xf31ee5(0x185)]=-0x1]=_0xf31ee5(0x185),_0xdf70ee))(I||{}),v=(_0x283704=>(_0x283704[_0x283704[_0xf31ee5(0x18d)]=0x0]=_0xf31ee5(0x18d),_0x283704[_0x283704['Add']=0x1]='Add',_0x283704[_0x283704[_0xf31ee5(0x175)]=0x2]='Reply',_0x283704[_0x283704[_0xf31ee5(0x182)]=0x3]='Edit',_0x283704[_0x283704['Delete']=0x4]=_0xf31ee5(0x16e),_0x283704[_0x283704[_0xf31ee5(0x1b6)]=0x5]=_0xf31ee5(0x1b6),_0x283704[_0x283704['UNRECOGNIZED']=-0x1]=_0xf31ee5(0x185),_0x283704))(v||{});const f=_0x1700e0=>c[_0xf31ee5(0x1de)](new Date(+_0x1700e0))[_0xf31ee5(0x1dc)](_0xf31ee5(0x18b)),R=async(_0x581b56,_0x405c41)=>{const _0x404f7a=_0xf31ee5,_0x2572d1=_0x581b56[_0x404f7a(0x1b5)](c[_0x404f7a(0x1b7)]),_0x576ebc=_0x581b56[_0x404f7a(0x1b5)](P['HTTPService']);_0x405c41[_0x404f7a(0x16f)](_0x1a6894=>{const _0x5637c4=_0x404f7a;_0x2572d1[_0x5637c4(0x169)](_0x1a6894)&&_0x405c41[_0x5637c4(0x1b8)](_0x1a6894);}),_0x405c41['size']&&(await _0x576ebc[_0x404f7a(0x1b5)]('/universer-api/user/list',{'params':{'userIDs':[..._0x405c41]}}))['body'][_0x404f7a(0x1e0)]['forEach'](_0x10dba7=>{const _0x5cf7ae=_0x404f7a;_0x10dba7&&_0x2572d1[_0x5cf7ae(0x1ac)](_0x10dba7);});};var $=Object[_0xf31ee5(0x16b)],E=(_0x342931,_0x52c005,_0x3960e5,_0x2037af)=>{for(var _0x13e640=_0x2037af>0x1?void 0x0:_0x2037af?$(_0x52c005,_0x3960e5):_0x52c005,_0x3b6ade=_0x342931['length']-0x1,_0x45b722;_0x3b6ade>=0x0;_0x3b6ade--)(_0x45b722=_0x342931[_0x3b6ade])&&(_0x13e640=_0x45b722(_0x13e640)||_0x13e640);return _0x13e640;},S=(_0x586812,_0x3213d4)=>(_0x1866c5,_0x5f4498)=>_0x3213d4(_0x1866c5,_0x5f4498,_0x586812);let p=class extends c[_0xf31ee5(0x1c3)]{constructor(_0x47c8e7,_0x108490,_0x51ab20,_0x2a3184){const _0x40d026=_0xf31ee5;super(),this['_commentService']=_0x47c8e7,this[_0x40d026(0x1d6)]=_0x108490,this['_userService']=_0x51ab20,this['_injector']=_0x2a3184,this[_0x40d026(0x195)](),this['_initUserSync']();}[_0xf31ee5(0x18e)](){const _0x1fa2ce=_0xf31ee5;this['disposeWithMe'](this[_0x1fa2ce(0x1d6)][_0x1fa2ce(0x19b)][_0x1fa2ce(0x19e)](w[_0x1fa2ce(0x1b3)](0x10))[_0x1fa2ce(0x1cf)](_0x46177f=>{const _0x3f4e56=_0x1fa2ce,_0x5e7312=new Set();_0x46177f[_0x3f4e56(0x16f)](_0x25bd14=>{const _0x280c6c=_0x3f4e56;switch(_0x25bd14[_0x280c6c(0x1e1)]){case _0x280c6c(0x186):{const _0x4453a9=_0x25bd14[_0x280c6c(0x17a)][_0x280c6c(0x1d3)];_0x5e7312[_0x280c6c(0x186)](_0x4453a9);break;}}}),R(this['_injector'],_0x5e7312);}));}[_0xf31ee5(0x195)](){const _0x4e8c7d=_0xf31ee5;this['disposeWithMe'](this[_0x4e8c7d(0x1a0)][_0x4e8c7d(0x19b)]['subscribe'](async _0x3dc6b2=>{const _0x523025=_0x4e8c7d;var _0x5e77a4,_0xa61f00,_0x40ff3c,_0x4eef52;const _0x1b9810=(_0x5e77a4=this[_0x523025(0x1d6)]['getUnit'](_0x3dc6b2['unitId'])['find'](_0x17aa48=>_0x17aa48[_0x523025(0x1a6)]===_0x3dc6b2['threadId']))==null?void 0x0:_0x5e77a4[_0x523025(0x1b1)];if(!_0x1b9810)return;const {unitId:_0x5540fc,subUnitId:_0x552c77}=_0x1b9810;switch(_0x3dc6b2[_0x523025(0x18f)]&&this[_0x523025(0x19c)]['addUser'](_0x3dc6b2[_0x523025(0x18f)]),_0x3dc6b2['type']){case v[_0x523025(0x1ad)]:break;case v[_0x523025(0x175)]:{this[_0x523025(0x1d6)][_0x523025(0x1c2)](_0x5540fc,_0x552c77,{'unitId':_0x5540fc,'subUnitId':_0x552c77,'ref':'','id':_0x3dc6b2[_0x523025(0x198)],'dT':f(+_0x3dc6b2['createTimestamp']),'threadId':_0x3dc6b2[_0x523025(0x1a6)],'personId':(_0x40ff3c=(_0xa61f00=_0x3dc6b2[_0x523025(0x18f)])==null?void 0x0:_0xa61f00[_0x523025(0x17d)])!=null?_0x40ff3c:_0x3dc6b2[_0x523025(0x183)],'text':JSON[_0x523025(0x187)](_0x3dc6b2[_0x523025(0x1d2)]),'parentId':_0x1b9810['id']});break;}case v[_0x523025(0x16e)]:{const _0x5e0560=this[_0x523025(0x1d6)]['getComment'](_0x5540fc,_0x552c77,_0x3dc6b2[_0x523025(0x198)]);_0x5e0560&&_0x5e0560[_0x523025(0x1d1)]&&this['_threadCommentModel'][_0x523025(0x19a)](_0x5540fc,_0x552c77,_0x3dc6b2['replyId']);break;}case v[_0x523025(0x182)]:{this['_threadCommentModel'][_0x523025(0x17f)](_0x5540fc,_0x552c77,{'commentId':_0x3dc6b2[_0x523025(0x198)],'text':JSON[_0x523025(0x187)](_0x3dc6b2[_0x523025(0x1d2)])});break;}case v['Solve']:{const _0x3c8863=(_0x4eef52=this[_0x523025(0x1d6)][_0x523025(0x1aa)](_0x3dc6b2[_0x523025(0x1ae)])['find'](_0x34f47b=>_0x34f47b[_0x523025(0x1a6)]===_0x3dc6b2[_0x523025(0x1a6)]))==null?void 0x0:_0x4eef52[_0x523025(0x1b1)];_0x3c8863&&this['_threadCommentModel']['resolveComment'](_0x5540fc,_0x552c77,_0x3c8863['id'],_0x3dc6b2['solved']===I[_0x523025(0x16c)]);break;}}}));}};p=E([S(0x0,c[_0xf31ee5(0x19f)](b[_0xf31ee5(0x190)])),S(0x1,c[_0xf31ee5(0x19f)](M[_0xf31ee5(0x1a8)])),S(0x2,c[_0xf31ee5(0x19f)](c['UserManagerService'])),S(0x3,c['Inject'](c[_0xf31ee5(0x1cd)]))],p);const q=_0xf31ee5(0x18c),D={};var A=Object[_0xf31ee5(0x16b)],x=(_0x53d4bb,_0x163786,_0x434f5c,_0x4635fb)=>{const _0x56b2d9=_0xf31ee5;for(var _0x4b8113=_0x4635fb>0x1?void 0x0:_0x4635fb?A(_0x163786,_0x434f5c):_0x163786,_0x470464=_0x53d4bb[_0x56b2d9(0x176)]-0x1,_0x10906c;_0x470464>=0x0;_0x470464--)(_0x10906c=_0x53d4bb[_0x470464])&&(_0x4b8113=_0x10906c(_0x4b8113)||_0x4b8113);return _0x4b8113;},_=(_0x1bef15,_0x26ea18)=>(_0xb2e494,_0x1f8064)=>_0x26ea18(_0xb2e494,_0x1f8064,_0x1bef15);function Y(_0x31ec7c,_0x4df799){const _0x2f1598=_0xf31ee5,_0x1768a4=_0x31ec7c['replies'][0x0];return{..._0x4df799,'id':_0x1768a4['replyId'],'resolved':_0x31ec7c['solved']===0x1,'dT':f(_0x1768a4[_0x2f1598(0x181)]),'personId':_0x1768a4[_0x2f1598(0x183)],'threadId':_0x1768a4['threadId']};}function G(_0x4fd0e4,_0x474fc9,_0x1ee9a4){const _0x55321d=_0xf31ee5;var _0x3fcbaa,_0xa34c71;if(((_0xa34c71=(_0x3fcbaa=_0x4fd0e4==null?void 0x0:_0x4fd0e4[_0x55321d(0x196)])==null?void 0x0:_0x3fcbaa['length'])!=null?_0xa34c71:0x0)>0x0){const _0x2674c8=(_0x1ca011,_0x456091)=>({'id':_0x1ca011[_0x55321d(0x198)],'threadId':_0x1ca011['threadId'],'dT':f(_0x1ca011[_0x55321d(0x181)]),'personId':_0x1ca011[_0x55321d(0x183)],'resolved':_0x4fd0e4[_0x55321d(0x1c0)]===I['Solved'],'unitId':_0x474fc9,'subUnitId':_0x1ee9a4,'text':JSON[_0x55321d(0x187)](_0x1ca011[_0x55321d(0x1d2)]),'parentId':_0x456091}),_0x29ed6b=_0x2674c8(_0x4fd0e4[_0x55321d(0x196)][0x0]);return{..._0x29ed6b,'children':_0x4fd0e4['replies']['slice'](0x1)[_0x55321d(0x16a)](_0x3d3ab0=>_0x2674c8(_0x3d3ab0,_0x29ed6b['id']))};}return null;}let g=class{constructor(_0x3e7084,_0x2cdd8c,_0x8d99fc,_0x5c5273){const _0x10892b=_0xf31ee5;this[_0x10892b(0x1d7)]=_0x3e7084,this['_userService']=_0x2cdd8c,this['_sessionService']=_0x8d99fc,this['_injector']=_0x5c5273;}async[_0xf31ee5(0x1c2)](_0x319cc8){const _0xdc4efc=_0xf31ee5;var _0x2e960a,_0x6c3d3a;const {parentId:_0x592b4c,unitId:_0x1fc867,text:_0x272069,threadId:_0xa958a4}=_0x319cc8,_0x548bdf=(_0x6c3d3a=(_0x2e960a=_0x272069[_0xdc4efc(0x1c1)])==null?void 0x0:_0x2e960a[_0xdc4efc(0x17e)](_0x302571=>_0x302571['rangeType']===c[_0xdc4efc(0x1a3)][_0xdc4efc(0x1af)])[_0xdc4efc(0x16a)](_0x55a7da=>_0x55a7da[_0xdc4efc(0x1cb)]))!=null?_0x6c3d3a:[],_0x37453a=JSON[_0xdc4efc(0x1d9)](_0x272069),_0x3a090a=(await this[_0xdc4efc(0x1a1)]['requireSession'](_0x1fc867))[_0xdc4efc(0x1c4)]();if(_0x592b4c){const _0x252cdd={'memberId':_0x3a090a,'unitId':_0x1fc867,'content':_0x37453a,'mention':_0x548bdf,'threadId':_0xa958a4},_0x242887=(await this['_httpService'][_0xdc4efc(0x1a4)](_0xdc4efc(0x197)+_0x1fc867+_0xdc4efc(0x178),{'body':_0x252cdd}))['body'][_0xdc4efc(0x180)];return{..._0x319cc8,'id':_0x242887[_0xdc4efc(0x198)],'dT':c['dayjs'](+_0x242887[_0xdc4efc(0x181)])[_0xdc4efc(0x1dc)](_0xdc4efc(0x18b)),'personId':_0x242887[_0xdc4efc(0x183)]};}else{const _0x22de0e={'memberId':_0x3a090a,'unitId':_0x1fc867,'content':_0x37453a,'mention':_0x548bdf},_0x427a8d=await this['_httpService'][_0xdc4efc(0x1a4)](_0xdc4efc(0x197)+_0x1fc867+_0xdc4efc(0x170),{'body':_0x22de0e});return Y(_0x427a8d[_0xdc4efc(0x1a5)][_0xdc4efc(0x1a2)],_0x319cc8);}}async[_0xf31ee5(0x17f)](_0x443314){const _0x4d8d95=_0xf31ee5;var _0x5af1ce,_0x2be2e9;const {text:_0x1d3120,unitId:_0x3724bf}=_0x443314,_0x3b9494=(_0x2be2e9=(_0x5af1ce=_0x1d3120[_0x4d8d95(0x1c1)])==null?void 0x0:_0x5af1ce[_0x4d8d95(0x17e)](_0x2d7efc=>_0x2d7efc['rangeType']===c[_0x4d8d95(0x1a3)]['COMMENT'])['map'](_0xfd29e0=>_0xfd29e0['rangeId']))!=null?_0x2be2e9:[],_0xc81183=JSON['stringify'](_0x1d3120),_0x436651=_0x443314[_0x4d8d95(0x1a6)],_0x2e38d4=_0x443314['id'],_0x27eeaa={'memberId':(await this[_0x4d8d95(0x1a1)]['requireSession'](_0x3724bf))[_0x4d8d95(0x1c4)](),'unitId':_0x3724bf,'threadId':_0x436651,'mention':_0x3b9494,'content':_0xc81183,'replyId':_0x2e38d4},_0x3c6588=await this[_0x4d8d95(0x1d7)][_0x4d8d95(0x1a4)](_0x4d8d95(0x197)+_0x3724bf+_0x4d8d95(0x1dd),{'body':_0x27eeaa});return!_0x3c6588['body'][_0x4d8d95(0x1bc)]||_0x3c6588['body'][_0x4d8d95(0x1bc)]['code']===0x1;}async['resolveComment'](_0x59b1a1){const _0x249a7c=_0xf31ee5,{unitId:_0xbc365e}=_0x59b1a1,_0x505a75=_0x59b1a1[_0x249a7c(0x1a6)],_0x37e58a={'memberId':this[_0x249a7c(0x19c)]['getCurrentUser']()[_0x249a7c(0x17d)],'unitId':_0xbc365e,'threadId':_0x505a75,'solved':_0x59b1a1[_0x249a7c(0x1b9)]?I[_0x249a7c(0x16c)]:I['OpenOrReOpen']},_0x584b8c=await this['_httpService'][_0x249a7c(0x1a4)](_0x249a7c(0x197)+_0xbc365e+_0x249a7c(0x16d),{'body':_0x37e58a});return!_0x584b8c[_0x249a7c(0x1a5)][_0x249a7c(0x1bc)]||_0x584b8c[_0x249a7c(0x1a5)]['error'][_0x249a7c(0x171)]===0x1;}async[_0xf31ee5(0x19a)](_0x5cc70e,_0x4800a6,_0x3a3a78,_0x2402ae){const _0x4c8e9d=_0xf31ee5,_0x3c65e4={'memberId':(await this[_0x4c8e9d(0x1a1)]['requireSession'](_0x5cc70e))[_0x4c8e9d(0x1c4)](),'threadId':_0x3a3a78,'replyId':_0x2402ae,'unitId':_0x5cc70e},_0x2c744d=await this[_0x4c8e9d(0x1d7)]['post'](_0x4c8e9d(0x197)+_0x5cc70e+_0x4c8e9d(0x1ba),{'body':_0x3c65e4});return!_0x2c744d[_0x4c8e9d(0x1a5)][_0x4c8e9d(0x1bc)]||_0x2c744d[_0x4c8e9d(0x1a5)][_0x4c8e9d(0x1bc)]['code']===0x1;}async[_0xf31ee5(0x191)](_0xa90049,_0x3da51a,_0x2e3513){const _0x3c550a=_0xf31ee5,_0x5f4f49={'unitId':_0xa90049,'threadId':_0x2e3513},_0x4aa49e=await this[_0x3c550a(0x1d7)]['post'](_0x3c550a(0x197)+_0xa90049+_0x3c550a(0x1e2),{'body':_0x5f4f49}),_0x2da94c=_0x2e3513[_0x3c550a(0x16a)](_0x35ed7e=>G(_0x4aa49e[_0x3c550a(0x1a5)][_0x3c550a(0x177)][_0x35ed7e],_0xa90049,_0x3da51a))[_0x3c550a(0x17e)](Boolean);return Object[_0x3c550a(0x1b0)](_0x4aa49e[_0x3c550a(0x1a5)][_0x3c550a(0x1e0)])[_0x3c550a(0x16f)](_0x136f1a=>{const _0x1ef82b=_0x3c550a;this[_0x1ef82b(0x19c)][_0x1ef82b(0x1ac)](_0x136f1a);}),_0x2da94c;}['saveCommentToSnapshot'](_0x5cc34e){const _0x1b7afb=_0xf31ee5;return{'id':_0x5cc34e['id'],'threadId':_0x5cc34e[_0x1b7afb(0x1a6)],'ref':_0x5cc34e[_0x1b7afb(0x1c7)]};}};g=x([_(0x0,c[_0xf31ee5(0x19f)](P[_0xf31ee5(0x194)])),_(0x1,c[_0xf31ee5(0x19f)](c[_0xf31ee5(0x1b7)])),_(0x2,c[_0xf31ee5(0x19f)](b[_0xf31ee5(0x1d5)])),_(0x3,c[_0xf31ee5(0x19f)](c['Injector']))],g);function _0x373e(){const _0x445d9c=['UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','513654kJrOJW','1504285gRFBDU','rangeId','@univerjs-pro/collaboration-client','Injector','3432828OlICFI','subscribe','defineProperty','parentId','content','personId','3186831RazndY','CollaborationSessionService','_threadCommentModel','_httpService','_threadCommentDataSource','stringify','_configService','@univerjs-pro/license','format','/edit','dayjs','UniverThreadCommentDataSourcePlugin','users','type','/list','getUser','map','getOwnPropertyDescriptor','Solved','/solved','Delete','forEach','/add','code','rxjs','22056550asOrel','UniverInstanceType','Reply','length','comments','/reply','IThreadCommentDataSourceService','payload','DependentOn','OpenOrReOpen','userID','filter','updateComment','reply','createTimestamp','Edit','userId','_config','UNRECOGNIZED','add','parse','onReady','322330rKTFli','dataSource','YYYY/MM/DD\x20HH:mm','thread-comment-data-source.config','Unknown','_initUserSync','user','CommentService','listComments','4FkvuZK','toStringTag','HTTPService','_init','replies','/universer-api/comment/unit/','replyId','Plugin','deleteComment','commentUpdate$','_userService','_initDataSource','pipe','Inject','_commentService','_sessionService','comment','CustomRangeType','post','body','threadId','@univerjs/network','ThreadCommentModel','IConfigService','getUnit','@univerjs/thread-comment','addUser','Add','unitId','COMMENT','values','root','onStarting','bufferTime','7481736SGcVhQ','get','Solve','UserManagerService','delete','resolved','/delete','@univerjs/thread-comment-ui','error','_injector','_threadCommentDataSourceService','9ITpJIF','solved','customRanges','addComment','Disposable','getMemberID','7PEHaid','UniverCollaborationClientPlugin','ref'];_0x373e=function(){return _0x445d9c;};return _0x373e();}var H=Object[_0xf31ee5(0x16b)],J=(_0x3a761b,_0x2078f0,_0x101d6e,_0xb4bae5)=>{const _0x260ef7=_0xf31ee5;for(var _0x441fa2=_0xb4bae5>0x1?void 0x0:_0xb4bae5?H(_0x2078f0,_0x101d6e):_0x2078f0,_0x2aac80=_0x3a761b[_0x260ef7(0x176)]-0x1,_0x6acdb9;_0x2aac80>=0x0;_0x2aac80--)(_0x6acdb9=_0x3a761b[_0x2aac80])&&(_0x441fa2=_0x6acdb9(_0x441fa2)||_0x441fa2);return _0x441fa2;},y=(_0x52652f,_0x8c8504)=>(_0x5d5e1f,_0x59d044)=>_0x8c8504(_0x5d5e1f,_0x59d044,_0x52652f);let C=class extends c[_0xf31ee5(0x1c3)]{constructor(_0xb8f23,_0x232cf6){const _0x2144dc=_0xf31ee5;super(),this['_threadCommentDataSourceService']=_0xb8f23,this['_threadCommentDataSource']=_0x232cf6,this[_0x2144dc(0x19d)]();}['_initDataSource'](){const _0x302bd9=_0xf31ee5;this[_0x302bd9(0x1be)][_0x302bd9(0x18a)]=this[_0x302bd9(0x1d8)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M[_0xf31ee5(0x179)]),y(0x1,c[_0xf31ee5(0x19f)](g))],C);var F=Object[_0xf31ee5(0x1d0)],L=Object['getOwnPropertyDescriptor'],Z=(_0x40c33c,_0x5c140e,_0x47ada0)=>_0x5c140e in _0x40c33c?F(_0x40c33c,_0x5c140e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x47ada0}):_0x40c33c[_0x5c140e]=_0x47ada0,W=(_0x58787d,_0x587417,_0x1f96c4,_0xfeff5a)=>{const _0x434a5=_0xf31ee5;for(var _0x2df0e9=_0xfeff5a>0x1?void 0x0:_0xfeff5a?L(_0x587417,_0x1f96c4):_0x587417,_0x19806f=_0x58787d[_0x434a5(0x176)]-0x1,_0x15bf39;_0x19806f>=0x0;_0x19806f--)(_0x15bf39=_0x58787d[_0x19806f])&&(_0x2df0e9=_0x15bf39(_0x2df0e9)||_0x2df0e9);return _0x2df0e9;},O=(_0x1050c4,_0x10c4fe)=>(_0x559767,_0x56215a)=>_0x10c4fe(_0x559767,_0x56215a,_0x1050c4),N=(_0xed5281,_0x1a4427,_0x1d1ae5)=>Z(_0xed5281,typeof _0x1a4427!='symbol'?_0x1a4427+'':_0x1a4427,_0x1d1ae5);exports[_0xf31ee5(0x1df)]=class extends c[_0xf31ee5(0x199)]{constructor(_0x5a2a24=D,_0x415c14,_0x22b9bd){const _0x1195c6=_0xf31ee5;super(),this[_0x1195c6(0x184)]=_0x5a2a24,this[_0x1195c6(0x1bd)]=_0x415c14,this[_0x1195c6(0x1da)]=_0x22b9bd;const {..._0x441122}=c['merge']({},D,this[_0x1195c6(0x184)]);this['_configService']['setConfig'](q,_0x441122);}[_0xf31ee5(0x1b2)](){[[g],[C],[p]]['forEach'](_0x1a022c=>{const _0x227957=_0x53b0;this[_0x227957(0x1bd)][_0x227957(0x186)](_0x1a022c);});}[_0xf31ee5(0x188)](){const _0x217ea7=_0xf31ee5;this[_0x217ea7(0x1bd)][_0x217ea7(0x1b5)](C),this[_0x217ea7(0x1bd)][_0x217ea7(0x1b5)](p);}},N(exports[_0xf31ee5(0x1df)],'pluginName',U),N(exports[_0xf31ee5(0x1df)],_0xf31ee5(0x1e1),c[_0xf31ee5(0x174)]['UNIVER_UNKNOWN']),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0xf31ee5(0x17b)](j['UniverThreadCommentUIPlugin'],b[_0xf31ee5(0x1c6)],T['UniverLicensePlugin']),O(0x1,c[_0xf31ee5(0x19f)](c[_0xf31ee5(0x1cd)])),O(0x2,c[_0xf31ee5(0x1a9)])],exports[_0xf31ee5(0x1df)]);
1
+ 'use strict';const _0x128554=_0x2707;(function(_0x3c2a81,_0x2ecea3){const _0x3ee1d7=_0x2707,_0x45694e=_0x3c2a81();while(!![]){try{const _0x58e1ff=-parseInt(_0x3ee1d7(0x1b4))/0x1*(-parseInt(_0x3ee1d7(0x1e5))/0x2)+-parseInt(_0x3ee1d7(0x1fe))/0x3+-parseInt(_0x3ee1d7(0x1f8))/0x4+parseInt(_0x3ee1d7(0x1db))/0x5+parseInt(_0x3ee1d7(0x1d6))/0x6+parseInt(_0x3ee1d7(0x209))/0x7*(-parseInt(_0x3ee1d7(0x1ed))/0x8)+parseInt(_0x3ee1d7(0x1ca))/0x9;if(_0x58e1ff===_0x2ecea3)break;else _0x45694e['push'](_0x45694e['shift']());}catch(_0x49f140){_0x45694e['push'](_0x45694e['shift']());}}}(_0xc131,0xb1a44));Object[_0x128554(0x1a8)](exports,Symbol[_0x128554(0x200)],{'value':'Module'});const b=require(_0x128554(0x1ab)),T=require(_0x128554(0x216)),c=require('@univerjs/core'),j=require(_0x128554(0x1f9)),M=require(_0x128554(0x1f6)),w=require(_0x128554(0x202)),P=require('@univerjs/network'),U=_0x128554(0x1c9);var I=(_0x181417=>(_0x181417[_0x181417[_0x128554(0x1b1)]=0x0]=_0x128554(0x1b1),_0x181417[_0x181417['Solved']=0x1]=_0x128554(0x1da),_0x181417[_0x181417['UNRECOGNIZED']=-0x1]=_0x128554(0x21f),_0x181417))(I||{}),v=(_0x2ed225=>(_0x2ed225[_0x2ed225[_0x128554(0x1a0)]=0x0]=_0x128554(0x1a0),_0x2ed225[_0x2ed225[_0x128554(0x1e9)]=0x1]=_0x128554(0x1e9),_0x2ed225[_0x2ed225['Reply']=0x2]=_0x128554(0x1a6),_0x2ed225[_0x2ed225['Edit']=0x3]=_0x128554(0x1d7),_0x2ed225[_0x2ed225[_0x128554(0x1bb)]=0x4]=_0x128554(0x1bb),_0x2ed225[_0x2ed225[_0x128554(0x1dc)]=0x5]=_0x128554(0x1dc),_0x2ed225[_0x2ed225[_0x128554(0x21f)]=-0x1]='UNRECOGNIZED',_0x2ed225))(v||{});const f=_0x14f3c2=>c['dayjs'](new Date(+_0x14f3c2))['format'](_0x128554(0x218)),R=async(_0x1485db,_0x5cbf5b)=>{const _0x6635c5=_0x128554,_0x121985=_0x1485db[_0x6635c5(0x1d0)](c[_0x6635c5(0x1d8)]),_0x227a61=_0x1485db[_0x6635c5(0x1d0)](P['HTTPService']);_0x5cbf5b[_0x6635c5(0x1b2)](_0x5422d8=>{const _0x2dbccd=_0x6635c5;_0x121985[_0x2dbccd(0x21b)](_0x5422d8)&&_0x5cbf5b[_0x2dbccd(0x220)](_0x5422d8);}),_0x5cbf5b[_0x6635c5(0x1ce)]&&(await _0x227a61['get'](_0x6635c5(0x221),{'params':{'userIDs':[..._0x5cbf5b]}}))[_0x6635c5(0x213)]['users'][_0x6635c5(0x1b2)](_0x4844d6=>{const _0x57eae4=_0x6635c5;_0x4844d6&&_0x121985[_0x57eae4(0x1a5)](_0x4844d6);});};function _0x2707(_0xffa231,_0x511b52){const _0xc13191=_0xc131();return _0x2707=function(_0x270708,_0x2cfb9c){_0x270708=_0x270708-0x19e;let _0x308624=_0xc13191[_0x270708];return _0x308624;},_0x2707(_0xffa231,_0x511b52);}var $=Object[_0x128554(0x1ff)],E=(_0x4519d5,_0x2c5fe0,_0x451ab8,_0x1fd051)=>{const _0x116375=_0x128554;for(var _0x15fe54=_0x1fd051>0x1?void 0x0:_0x1fd051?$(_0x2c5fe0,_0x451ab8):_0x2c5fe0,_0x4bd9b4=_0x4519d5[_0x116375(0x1a1)]-0x1,_0x2be078;_0x4bd9b4>=0x0;_0x4bd9b4--)(_0x2be078=_0x4519d5[_0x4bd9b4])&&(_0x15fe54=_0x2be078(_0x15fe54)||_0x15fe54);return _0x15fe54;},S=(_0x348200,_0x3ff8c2)=>(_0x24c465,_0x316f15)=>_0x3ff8c2(_0x24c465,_0x316f15,_0x348200);let p=class extends c['Disposable']{constructor(_0x391efa,_0x3dde9b,_0x462281,_0x4cc674){const _0x174f58=_0x128554;super(),this[_0x174f58(0x211)]=_0x391efa,this['_threadCommentModel']=_0x3dde9b,this[_0x174f58(0x1aa)]=_0x462281,this[_0x174f58(0x201)]=_0x4cc674,this[_0x174f58(0x1af)](),this[_0x174f58(0x1cb)]();}[_0x128554(0x1cb)](){const _0x387852=_0x128554;this['disposeWithMe'](this[_0x387852(0x1f5)][_0x387852(0x20e)][_0x387852(0x1f2)](w[_0x387852(0x206)](0x10))['subscribe'](_0x3ad68d=>{const _0x3ec6a6=_0x387852,_0x1375d4=new Set();_0x3ad68d[_0x3ec6a6(0x1b2)](_0x1bc844=>{const _0x3a0617=_0x3ec6a6;switch(_0x1bc844['type']){case'add':{const _0x5f367c=_0x1bc844[_0x3a0617(0x1e0)][_0x3a0617(0x1a4)];_0x1375d4['add'](_0x5f367c);break;}}}),R(this[_0x3ec6a6(0x201)],_0x1375d4);}));}[_0x128554(0x1af)](){const _0x1d33c4=_0x128554;this[_0x1d33c4(0x1b8)](this[_0x1d33c4(0x211)][_0x1d33c4(0x20e)]['subscribe'](async _0x2c3f9a=>{const _0x2525f8=_0x1d33c4;var _0x28bd5b,_0x56f46f,_0x526f2a,_0x1d3bf7;const _0x224758=(_0x28bd5b=this[_0x2525f8(0x1f5)][_0x2525f8(0x21c)](_0x2c3f9a['unitId'])['find'](_0x25328a=>_0x25328a[_0x2525f8(0x1c2)]===_0x2c3f9a[_0x2525f8(0x1c2)]))==null?void 0x0:_0x28bd5b[_0x2525f8(0x20b)];if(!_0x224758)return;const {unitId:_0x119c1e,subUnitId:_0x1f1764}=_0x224758;switch(_0x2c3f9a[_0x2525f8(0x21d)]&&this[_0x2525f8(0x1aa)][_0x2525f8(0x1a5)](_0x2c3f9a[_0x2525f8(0x21d)]),_0x2c3f9a[_0x2525f8(0x1ad)]){case v['Add']:break;case v[_0x2525f8(0x1a6)]:{this[_0x2525f8(0x1f5)][_0x2525f8(0x1bd)](_0x119c1e,_0x1f1764,{'unitId':_0x119c1e,'subUnitId':_0x1f1764,'ref':'','id':_0x2c3f9a[_0x2525f8(0x1d1)],'dT':f(+_0x2c3f9a[_0x2525f8(0x208)]),'threadId':_0x2c3f9a[_0x2525f8(0x1c2)],'personId':(_0x526f2a=(_0x56f46f=_0x2c3f9a[_0x2525f8(0x21d)])==null?void 0x0:_0x56f46f['userID'])!=null?_0x526f2a:_0x2c3f9a[_0x2525f8(0x1ec)],'text':JSON[_0x2525f8(0x1b5)](_0x2c3f9a[_0x2525f8(0x1ae)]),'parentId':_0x224758['id']});break;}case v['Delete']:{const _0x4a08d8=this[_0x2525f8(0x1f5)][_0x2525f8(0x1b7)](_0x119c1e,_0x1f1764,_0x2c3f9a[_0x2525f8(0x1d1)]);_0x4a08d8&&_0x4a08d8[_0x2525f8(0x1b3)]&&this[_0x2525f8(0x1f5)][_0x2525f8(0x21e)](_0x119c1e,_0x1f1764,_0x2c3f9a[_0x2525f8(0x1d1)]);break;}case v['Edit']:{this[_0x2525f8(0x1f5)]['updateComment'](_0x119c1e,_0x1f1764,{'commentId':_0x2c3f9a[_0x2525f8(0x1d1)],'text':JSON[_0x2525f8(0x1b5)](_0x2c3f9a[_0x2525f8(0x1ae)])});break;}case v[_0x2525f8(0x1dc)]:{const _0xe92dbf=(_0x1d3bf7=this[_0x2525f8(0x1f5)][_0x2525f8(0x21c)](_0x2c3f9a[_0x2525f8(0x1f4)])[_0x2525f8(0x1cc)](_0x76e3af=>_0x76e3af[_0x2525f8(0x1c2)]===_0x2c3f9a['threadId']))==null?void 0x0:_0x1d3bf7[_0x2525f8(0x20b)];_0xe92dbf&&this[_0x2525f8(0x1f5)][_0x2525f8(0x1e6)](_0x119c1e,_0x1f1764,_0xe92dbf['id'],_0x2c3f9a[_0x2525f8(0x217)]===I[_0x2525f8(0x1da)]);break;}}}));}};p=E([S(0x0,c[_0x128554(0x1d3)](b[_0x128554(0x1ee)])),S(0x1,c[_0x128554(0x1d3)](M[_0x128554(0x1be)])),S(0x2,c[_0x128554(0x1d3)](c['UserManagerService'])),S(0x3,c[_0x128554(0x1d3)](c[_0x128554(0x1de)]))],p);const q=_0x128554(0x1eb),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x15d864,_0x17a1bf,_0x505ac0,_0x1dccbf)=>{const _0x240521=_0x128554;for(var _0x18d309=_0x1dccbf>0x1?void 0x0:_0x1dccbf?A(_0x17a1bf,_0x505ac0):_0x17a1bf,_0x3d1e61=_0x15d864[_0x240521(0x1a1)]-0x1,_0x24e546;_0x3d1e61>=0x0;_0x3d1e61--)(_0x24e546=_0x15d864[_0x3d1e61])&&(_0x18d309=_0x24e546(_0x18d309)||_0x18d309);return _0x18d309;},_=(_0x3b3942,_0x25bec5)=>(_0x3cc9d1,_0x548b04)=>_0x25bec5(_0x3cc9d1,_0x548b04,_0x3b3942);function Y(_0x4b5ec9,_0x14da3f){const _0x149d3e=_0x128554,_0x5b4006=_0x4b5ec9[_0x149d3e(0x1d5)][0x0];return{..._0x14da3f,'id':_0x5b4006[_0x149d3e(0x1d1)],'resolved':_0x4b5ec9[_0x149d3e(0x217)]===0x1,'dT':f(_0x5b4006[_0x149d3e(0x208)]),'personId':_0x5b4006[_0x149d3e(0x1ec)],'threadId':_0x5b4006[_0x149d3e(0x1c2)]};}function G(_0x352db8,_0x38f793,_0x454c54){const _0x5a90aa=_0x128554;var _0x6433cd,_0x5c9e99;if(((_0x5c9e99=(_0x6433cd=_0x352db8==null?void 0x0:_0x352db8[_0x5a90aa(0x1d5)])==null?void 0x0:_0x6433cd['length'])!=null?_0x5c9e99:0x0)>0x0){const _0x5e24d9=(_0x408fce,_0xebbf9b)=>({'id':_0x408fce['replyId'],'threadId':_0x408fce[_0x5a90aa(0x1c2)],'dT':f(_0x408fce[_0x5a90aa(0x208)]),'personId':_0x408fce['userId'],'resolved':_0x352db8[_0x5a90aa(0x217)]===I['Solved'],'unitId':_0x38f793,'subUnitId':_0x454c54,'text':JSON['parse'](_0x408fce[_0x5a90aa(0x1ae)]),'parentId':_0xebbf9b}),_0x1a302d=_0x5e24d9(_0x352db8['replies'][0x0]);return{..._0x1a302d,'children':_0x352db8[_0x5a90aa(0x1d5)][_0x5a90aa(0x1d9)](0x1)[_0x5a90aa(0x207)](_0x3608bf=>_0x5e24d9(_0x3608bf,_0x1a302d['id']))};}return null;}let g=class{constructor(_0x2ed677,_0x2a2941,_0x3a9163,_0x28f228){const _0x219a91=_0x128554;this[_0x219a91(0x1e2)]=_0x2ed677,this[_0x219a91(0x1aa)]=_0x2a2941,this['_sessionService']=_0x3a9163,this[_0x219a91(0x201)]=_0x28f228;}async[_0x128554(0x1bd)](_0x2036b8){const _0x4b1ded=_0x128554;var _0x3a41ef,_0x4fccbb;const {parentId:_0x4a2a31,unitId:_0x17fefa,text:_0x274c2a,threadId:_0xb617e3}=_0x2036b8,_0xafd377=(_0x4fccbb=(_0x3a41ef=_0x274c2a['customRanges'])==null?void 0x0:_0x3a41ef[_0x4b1ded(0x20c)](_0x25c1b6=>_0x25c1b6['rangeType']===c[_0x4b1ded(0x1ea)][_0x4b1ded(0x1f7)])[_0x4b1ded(0x207)](_0x4f118e=>_0x4f118e[_0x4b1ded(0x21a)]))!=null?_0x4fccbb:[],_0x1fc807=JSON[_0x4b1ded(0x20d)](_0x274c2a),_0x578d10=(await this[_0x4b1ded(0x19f)][_0x4b1ded(0x1d2)](_0x17fefa))['getMemberID']();if(_0x4a2a31){const _0x44b429={'memberId':_0x578d10,'unitId':_0x17fefa,'content':_0x1fc807,'mention':_0xafd377,'threadId':_0xb617e3},_0x19c0b9=(await this[_0x4b1ded(0x1e2)][_0x4b1ded(0x1fa)]('/universer-api/comment/unit/'+_0x17fefa+_0x4b1ded(0x1bf),{'body':_0x44b429}))[_0x4b1ded(0x213)][_0x4b1ded(0x1b0)];return{..._0x2036b8,'id':_0x19c0b9[_0x4b1ded(0x1d1)],'dT':c[_0x4b1ded(0x1ac)](+_0x19c0b9[_0x4b1ded(0x208)])['format'](_0x4b1ded(0x218)),'personId':_0x19c0b9[_0x4b1ded(0x1ec)]};}else{const _0x27d92c={'memberId':_0x578d10,'unitId':_0x17fefa,'content':_0x1fc807,'mention':_0xafd377},_0x4e6395=await this[_0x4b1ded(0x1e2)]['post'](_0x4b1ded(0x19e)+_0x17fefa+_0x4b1ded(0x1e3),{'body':_0x27d92c});return Y(_0x4e6395[_0x4b1ded(0x213)][_0x4b1ded(0x1f1)],_0x2036b8);}}async[_0x128554(0x20f)](_0x444f56){const _0x183c24=_0x128554;var _0x184e3c,_0x2457e8;const {text:_0x1f0933,unitId:_0xe39534}=_0x444f56,_0x1e162f=(_0x2457e8=(_0x184e3c=_0x1f0933[_0x183c24(0x1c0)])==null?void 0x0:_0x184e3c[_0x183c24(0x20c)](_0x26ff6e=>_0x26ff6e[_0x183c24(0x1ba)]===c[_0x183c24(0x1ea)][_0x183c24(0x1f7)])['map'](_0x3c9a3e=>_0x3c9a3e[_0x183c24(0x21a)]))!=null?_0x2457e8:[],_0x56785f=JSON[_0x183c24(0x20d)](_0x1f0933),_0x3a6e46=_0x444f56[_0x183c24(0x1c2)],_0x1118f6=_0x444f56['id'],_0x515107={'memberId':(await this[_0x183c24(0x19f)]['requireSession'](_0xe39534))['getMemberID'](),'unitId':_0xe39534,'threadId':_0x3a6e46,'mention':_0x1e162f,'content':_0x56785f,'replyId':_0x1118f6},_0x258886=await this[_0x183c24(0x1e2)][_0x183c24(0x1fa)](_0x183c24(0x19e)+_0xe39534+_0x183c24(0x1cd),{'body':_0x515107});return!_0x258886[_0x183c24(0x213)][_0x183c24(0x1b6)]||_0x258886[_0x183c24(0x213)][_0x183c24(0x1b6)][_0x183c24(0x1c4)]===0x1;}async[_0x128554(0x1e6)](_0x2a655d){const _0x450c12=_0x128554,{unitId:_0xbc2cf3}=_0x2a655d,_0x5408d9=_0x2a655d[_0x450c12(0x1c2)],_0x10d982={'memberId':this['_userService'][_0x450c12(0x205)]()[_0x450c12(0x1e1)],'unitId':_0xbc2cf3,'threadId':_0x5408d9,'solved':_0x2a655d[_0x450c12(0x1ef)]?I[_0x450c12(0x1da)]:I[_0x450c12(0x1b1)]},_0x2a82bd=await this['_httpService'][_0x450c12(0x1fa)]('/universer-api/comment/unit/'+_0xbc2cf3+'/solved',{'body':_0x10d982});return!_0x2a82bd[_0x450c12(0x213)]['error']||_0x2a82bd['body'][_0x450c12(0x1b6)][_0x450c12(0x1c4)]===0x1;}async[_0x128554(0x21e)](_0x727ee1,_0x383ee6,_0x2feb6f,_0x59bfc4){const _0x89db1=_0x128554,_0x3b66f1={'memberId':(await this['_sessionService']['requireSession'](_0x727ee1))[_0x89db1(0x203)](),'threadId':_0x2feb6f,'replyId':_0x59bfc4,'unitId':_0x727ee1},_0xbd8508=await this[_0x89db1(0x1e2)][_0x89db1(0x1fa)]('/universer-api/comment/unit/'+_0x727ee1+_0x89db1(0x1bc),{'body':_0x3b66f1});return!_0xbd8508[_0x89db1(0x213)]['error']||_0xbd8508[_0x89db1(0x213)][_0x89db1(0x1b6)][_0x89db1(0x1c4)]===0x1;}async[_0x128554(0x1d4)](_0x1b2048,_0x50010e,_0x3e29d7){const _0x2cde6f=_0x128554,_0x48de5f={'unitId':_0x1b2048,'threadId':_0x3e29d7},_0x5e890f=await this[_0x2cde6f(0x1e2)][_0x2cde6f(0x1fa)](_0x2cde6f(0x19e)+_0x1b2048+_0x2cde6f(0x1df),{'body':_0x48de5f}),_0x113b8=_0x3e29d7[_0x2cde6f(0x207)](_0x5bcb65=>G(_0x5e890f[_0x2cde6f(0x213)]['comments'][_0x5bcb65],_0x1b2048,_0x50010e))[_0x2cde6f(0x20c)](Boolean);return Object[_0x2cde6f(0x1cf)](_0x5e890f[_0x2cde6f(0x213)][_0x2cde6f(0x204)])[_0x2cde6f(0x1b2)](_0x293fee=>{const _0x359dbc=_0x2cde6f;this['_userService'][_0x359dbc(0x1a5)](_0x293fee);}),_0x113b8;}[_0x128554(0x20a)](_0xe40573){const _0x487aa6=_0x128554;return{'id':_0xe40573['id'],'threadId':_0xe40573[_0x487aa6(0x1c2)],'ref':_0xe40573[_0x487aa6(0x212)]};}};g=x([_(0x0,c[_0x128554(0x1d3)](P[_0x128554(0x1dd)])),_(0x1,c['Inject'](c[_0x128554(0x1d8)])),_(0x2,c[_0x128554(0x1d3)](b['CollaborationSessionService'])),_(0x3,c['Inject'](c[_0x128554(0x1de)]))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x20a535,_0x3fa1ac,_0x530c62,_0x386b26)=>{const _0x3b9175=_0x128554;for(var _0x28d83d=_0x386b26>0x1?void 0x0:_0x386b26?H(_0x3fa1ac,_0x530c62):_0x3fa1ac,_0x59975e=_0x20a535[_0x3b9175(0x1a1)]-0x1,_0xd10014;_0x59975e>=0x0;_0x59975e--)(_0xd10014=_0x20a535[_0x59975e])&&(_0x28d83d=_0xd10014(_0x28d83d)||_0x28d83d);return _0x28d83d;},y=(_0x3d6e1d,_0x2dec35)=>(_0x310455,_0x1ecf7f)=>_0x2dec35(_0x310455,_0x1ecf7f,_0x3d6e1d);let C=class extends c[_0x128554(0x210)]{constructor(_0x58a1ef,_0x176aaa){const _0x30f6cd=_0x128554;super(),this['_threadCommentDataSourceService']=_0x58a1ef,this[_0x30f6cd(0x1fd)]=_0x176aaa,this[_0x30f6cd(0x1a2)]();}['_initDataSource'](){const _0xf28d70=_0x128554;this['_threadCommentDataSourceService']['dataSource']=this['_threadCommentDataSource'],this[_0xf28d70(0x1b9)][_0xf28d70(0x1c7)]=!0x1;}};C=J([y(0x0,M[_0x128554(0x1c1)]),y(0x1,c['Inject'](g))],C);var F=Object[_0x128554(0x1a8)],L=Object[_0x128554(0x1ff)],Z=(_0x21afaf,_0x2baeb5,_0x5aeac5)=>_0x2baeb5 in _0x21afaf?F(_0x21afaf,_0x2baeb5,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5aeac5}):_0x21afaf[_0x2baeb5]=_0x5aeac5,W=(_0x1156bd,_0x9f7345,_0x4a05ce,_0xad9e82)=>{const _0xd9a1a3=_0x128554;for(var _0x40bf9a=_0xad9e82>0x1?void 0x0:_0xad9e82?L(_0x9f7345,_0x4a05ce):_0x9f7345,_0x57cfab=_0x1156bd[_0xd9a1a3(0x1a1)]-0x1,_0xaf1fb2;_0x57cfab>=0x0;_0x57cfab--)(_0xaf1fb2=_0x1156bd[_0x57cfab])&&(_0x40bf9a=_0xaf1fb2(_0x40bf9a)||_0x40bf9a);return _0x40bf9a;},O=(_0x202c0a,_0xb25569)=>(_0x4cfeda,_0x2407bf)=>_0xb25569(_0x4cfeda,_0x2407bf,_0x202c0a),N=(_0x2f6e2c,_0x3a7d88,_0x13a36c)=>Z(_0x2f6e2c,typeof _0x3a7d88!=_0x128554(0x219)?_0x3a7d88+'':_0x3a7d88,_0x13a36c);exports[_0x128554(0x1f3)]=class extends c[_0x128554(0x214)]{constructor(_0x19e9f1=D,_0x17618f,_0x182876){const _0x1164fb=_0x128554;super(),this[_0x1164fb(0x1a9)]=_0x19e9f1,this[_0x1164fb(0x201)]=_0x17618f,this[_0x1164fb(0x1a7)]=_0x182876;const {..._0xadeb1e}=c[_0x1164fb(0x1e8)]({},D,this[_0x1164fb(0x1a9)]);this[_0x1164fb(0x1a7)][_0x1164fb(0x1fc)](q,_0xadeb1e);}[_0x128554(0x1c5)](){const _0x46af38=_0x128554;[[g],[C],[p]][_0x46af38(0x1b2)](_0x722912=>{this['_injector']['add'](_0x722912);});}[_0x128554(0x1c6)](){const _0x473847=_0x128554;this[_0x473847(0x201)][_0x473847(0x1d0)](C),this['_injector'][_0x473847(0x1d0)](p);}},N(exports[_0x128554(0x1f3)],_0x128554(0x215),U),N(exports[_0x128554(0x1f3)],_0x128554(0x1ad),c[_0x128554(0x1c3)][_0x128554(0x1a3)]),exports[_0x128554(0x1f3)]=W([c[_0x128554(0x1f0)](j[_0x128554(0x1fb)],b[_0x128554(0x1c8)],T[_0x128554(0x1e4)]),O(0x1,c['Inject'](c[_0x128554(0x1de)])),O(0x2,c[_0x128554(0x1e7)])],exports[_0x128554(0x1f3)]);function _0xc131(){const _0x3d7308=['resolveComment','IConfigService','merge','Add','CustomRangeType','thread-comment-data-source.config','userId','96SIrbtr','CommentService','resolved','DependentOn','comment','pipe','UniverThreadCommentDataSourcePlugin','unitId','_threadCommentModel','@univerjs/thread-comment','COMMENT','4977248euPxPl','@univerjs/thread-comment-ui','post','UniverThreadCommentUIPlugin','setConfig','_threadCommentDataSource','2857365ViBYiG','getOwnPropertyDescriptor','toStringTag','_injector','rxjs','getMemberID','users','getCurrentUser','bufferTime','map','createTimestamp','34811mOllZR','saveCommentToSnapshot','root','filter','stringify','commentUpdate$','updateComment','Disposable','_commentService','ref','body','Plugin','pluginName','@univerjs-pro/license','solved','YYYY/MM/DD\x20HH:mm','symbol','rangeId','getUser','getUnit','user','deleteComment','UNRECOGNIZED','delete','/universer-api/user/list','/universer-api/comment/unit/','_sessionService','Unknown','length','_initDataSource','UNIVER_UNKNOWN','personId','addUser','Reply','_configService','defineProperty','_config','_userService','@univerjs-pro/collaboration-client','dayjs','type','content','_init','reply','OpenOrReOpen','forEach','parentId','4367uzaJaW','parse','error','getComment','disposeWithMe','_threadCommentDataSourceService','rangeType','Delete','/delete','addComment','ThreadCommentModel','/reply','customRanges','IThreadCommentDataSourceService','threadId','UniverInstanceType','code','onStarting','onReady','syncUpdateMutationToColla','UniverCollaborationClientPlugin','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','1338327eyewGe','_initUserSync','find','/edit','size','values','get','replyId','requireSession','Inject','listComments','replies','8248386TgWDjs','Edit','UserManagerService','slice','Solved','6713600mMaaCL','Solve','HTTPService','Injector','/list','payload','userID','_httpService','/add','UniverLicensePlugin','54yyulZh'];_0xc131=function(){return _0x3d7308;};return _0xc131();}
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x2b6fb4=_0x585c;function _0x585c(_0x51f73b,_0x5e16c2){const _0xe115fe=_0xe115();return _0x585c=function(_0x585c64,_0x5e3847){_0x585c64=_0x585c64-0x11a;let _0x245a0d=_0xe115fe[_0x585c64];return _0x245a0d;},_0x585c(_0x51f73b,_0x5e16c2);}(function(_0x21ecce,_0x501a47){const _0x1fd13d=_0x585c,_0x5ea129=_0x21ecce();while(!![]){try{const _0x5a4666=parseInt(_0x1fd13d(0x164))/0x1*(parseInt(_0x1fd13d(0x172))/0x2)+parseInt(_0x1fd13d(0x156))/0x3*(-parseInt(_0x1fd13d(0x17e))/0x4)+-parseInt(_0x1fd13d(0x122))/0x5*(-parseInt(_0x1fd13d(0x16b))/0x6)+-parseInt(_0x1fd13d(0x129))/0x7*(parseInt(_0x1fd13d(0x178))/0x8)+parseInt(_0x1fd13d(0x154))/0x9*(-parseInt(_0x1fd13d(0x167))/0xa)+parseInt(_0x1fd13d(0x143))/0xb*(parseInt(_0x1fd13d(0x17c))/0xc)+parseInt(_0x1fd13d(0x145))/0xd;if(_0x5a4666===_0x501a47)break;else _0x5ea129['push'](_0x5ea129['shift']());}catch(_0x4765d7){_0x5ea129['push'](_0x5ea129['shift']());}}}(_0xe115,0x721b0));import{CommentService as _0x57d1e1,CollaborationSessionService as _0x4e39a0,UniverCollaborationClientPlugin as _0x24b712}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x507f31}from'@univerjs-pro/license';import{dayjs as _0x19f256,UserManagerService as _0x45864e,Inject as _0x999591,Injector as _0x5cd924,Disposable as _0x3d69cb,CustomRangeType as _0x7f7105,UniverInstanceType as _0x96876,DependentOn as _0x4eebb,IConfigService as _0x4a0a76,Plugin as _0x8e71cc,merge as _0x95a5cc}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x128800}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x3953ab,IThreadCommentDataSourceService as _0x139f27}from'@univerjs/thread-comment';import{bufferTime as _0x14879c}from'rxjs';import{HTTPService as _0x50b333}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';function _0xe115(){const _0x47ec2a=['rangeType','map','code','delete','addUser','parse','_commentService','/list','pipe','pluginName','13PPDrLp','Edit','root','10mYLldd','content','thread-comment-data-source.config','commentUpdate$','1925274mmoQdN','replies','/delete','error','_configService','length','onReady','89394YaktVk','resolveComment','solved','slice','disposeWithMe','forEach','2781472FTcPGI','updateComment','_initDataSource','dataSource','36ggJVZX','getComment','351812DdHVSc','UNRECOGNIZED','_sessionService','Reply','subscribe','/add','setConfig','COMMENT','Unknown','saveCommentToSnapshot','add','stringify','5kWdcwH','UNIVER_UNKNOWN','userID','find','personId','_httpService','rangeId','7jHccjC','_injector','createTimestamp','deleteComment','comment','body','userId','Solved','_initUserSync','get','_threadCommentDataSource','getCurrentUser','Add','post','replyId','getUnit','OpenOrReOpen','Solve','values','defineProperty','getMemberID','symbol','unitId','getOwnPropertyDescriptor','listComments','_config','1643114GQSLjc','comments','5328362iumgjm','/universer-api/user/list','_userService','YYYY/MM/DD\x20HH:mm','_threadCommentModel','Delete','_init','/universer-api/comment/unit/','type','reply','format','_threadCommentDataSourceService','getUser','requireSession','parentId','7712307Wotpzx','user','3zIROJI','filter','threadId','size'];_0xe115=function(){return _0x47ec2a;};return _0xe115();}var I=(_0x42cc93=>(_0x42cc93[_0x42cc93[_0x2b6fb4(0x139)]=0x0]='OpenOrReOpen',_0x42cc93[_0x42cc93['Solved']=0x1]='Solved',_0x42cc93[_0x42cc93[_0x2b6fb4(0x17f)]=-0x1]=_0x2b6fb4(0x17f),_0x42cc93))(I||{}),v=(_0x3c93d5=>(_0x3c93d5[_0x3c93d5[_0x2b6fb4(0x11e)]=0x0]=_0x2b6fb4(0x11e),_0x3c93d5[_0x3c93d5[_0x2b6fb4(0x135)]=0x1]=_0x2b6fb4(0x135),_0x3c93d5[_0x3c93d5[_0x2b6fb4(0x181)]=0x2]='Reply',_0x3c93d5[_0x3c93d5[_0x2b6fb4(0x165)]=0x3]=_0x2b6fb4(0x165),_0x3c93d5[_0x3c93d5[_0x2b6fb4(0x14a)]=0x4]=_0x2b6fb4(0x14a),_0x3c93d5[_0x3c93d5['Solve']=0x5]=_0x2b6fb4(0x13a),_0x3c93d5[_0x3c93d5[_0x2b6fb4(0x17f)]=-0x1]=_0x2b6fb4(0x17f),_0x3c93d5))(v||{});const D=_0x3c1eb5=>_0x19f256(new Date(+_0x3c1eb5))[_0x2b6fb4(0x14f)](_0x2b6fb4(0x148)),B=async(_0x2b0849,_0x51263c)=>{const _0x349d58=_0x2b6fb4,_0x40162e=_0x2b0849['get'](_0x45864e),_0x1748d2=_0x2b0849['get'](_0x50b333);_0x51263c[_0x349d58(0x177)](_0x27099b=>{const _0xedfc27=_0x349d58;_0x40162e[_0xedfc27(0x151)](_0x27099b)&&_0x51263c[_0xedfc27(0x15d)](_0x27099b);}),_0x51263c[_0x349d58(0x159)]&&(await _0x1748d2['get'](_0x349d58(0x146),{'params':{'userIDs':[..._0x51263c]}}))[_0x349d58(0x12e)]['users'][_0x349d58(0x177)](_0x1eff89=>{const _0x509815=_0x349d58;_0x1eff89&&_0x40162e[_0x509815(0x15e)](_0x1eff89);});};var K=Object[_0x2b6fb4(0x140)],V=(_0x5e986c,_0x2e7615,_0x3fd8c6,_0x152cd0)=>{const _0x178878=_0x2b6fb4;for(var _0x40f319=_0x152cd0>0x1?void 0x0:_0x152cd0?K(_0x2e7615,_0x3fd8c6):_0x2e7615,_0x499678=_0x5e986c[_0x178878(0x170)]-0x1,_0x370664;_0x499678>=0x0;_0x499678--)(_0x370664=_0x5e986c[_0x499678])&&(_0x40f319=_0x370664(_0x40f319)||_0x40f319);return _0x40f319;},p=(_0x69b35f,_0x1e1023)=>(_0x2baeef,_0x34ddb1)=>_0x1e1023(_0x2baeef,_0x34ddb1,_0x69b35f);let S=class extends _0x3d69cb{constructor(_0x16a4a5,_0x54c5ee,_0x208d5c,_0x927183){const _0x4b992b=_0x2b6fb4;super(),this[_0x4b992b(0x160)]=_0x16a4a5,this[_0x4b992b(0x149)]=_0x54c5ee,this['_userService']=_0x208d5c,this[_0x4b992b(0x12a)]=_0x927183,this[_0x4b992b(0x14b)](),this[_0x4b992b(0x131)]();}['_initUserSync'](){const _0x2585b1=_0x2b6fb4;this[_0x2585b1(0x176)](this[_0x2585b1(0x149)][_0x2585b1(0x16a)][_0x2585b1(0x162)](_0x14879c(0x10))[_0x2585b1(0x11a)](_0x137c7e=>{const _0x12a871=_0x2585b1,_0x1cb452=new Set();_0x137c7e[_0x12a871(0x177)](_0x574345=>{const _0x53f1f2=_0x12a871;switch(_0x574345[_0x53f1f2(0x14d)]){case'add':{const _0x2b6156=_0x574345['payload'][_0x53f1f2(0x126)];_0x1cb452[_0x53f1f2(0x120)](_0x2b6156);break;}}}),B(this[_0x12a871(0x12a)],_0x1cb452);}));}[_0x2b6fb4(0x14b)](){const _0x24d1cd=_0x2b6fb4;this[_0x24d1cd(0x176)](this[_0x24d1cd(0x160)]['commentUpdate$'][_0x24d1cd(0x11a)](async _0x12ef50=>{const _0x51a5f2=_0x24d1cd;var _0x338ca7,_0x2b2752,_0x342b89,_0x197352;const _0x23172b=(_0x338ca7=this[_0x51a5f2(0x149)][_0x51a5f2(0x138)](_0x12ef50[_0x51a5f2(0x13f)])[_0x51a5f2(0x125)](_0x16a338=>_0x16a338[_0x51a5f2(0x158)]===_0x12ef50['threadId']))==null?void 0x0:_0x338ca7['root'];if(!_0x23172b)return;const {unitId:_0x49507f,subUnitId:_0x459b3f}=_0x23172b;switch(_0x12ef50[_0x51a5f2(0x155)]&&this[_0x51a5f2(0x147)]['addUser'](_0x12ef50[_0x51a5f2(0x155)]),_0x12ef50[_0x51a5f2(0x14d)]){case v['Add']:break;case v[_0x51a5f2(0x181)]:{this[_0x51a5f2(0x149)]['addComment'](_0x49507f,_0x459b3f,{'unitId':_0x49507f,'subUnitId':_0x459b3f,'ref':'','id':_0x12ef50[_0x51a5f2(0x137)],'dT':D(+_0x12ef50['createTimestamp']),'threadId':_0x12ef50[_0x51a5f2(0x158)],'personId':(_0x342b89=(_0x2b2752=_0x12ef50['user'])==null?void 0x0:_0x2b2752['userID'])!=null?_0x342b89:_0x12ef50[_0x51a5f2(0x12f)],'text':JSON[_0x51a5f2(0x15f)](_0x12ef50[_0x51a5f2(0x168)]),'parentId':_0x23172b['id']});break;}case v[_0x51a5f2(0x14a)]:{const _0x5b7101=this[_0x51a5f2(0x149)][_0x51a5f2(0x17d)](_0x49507f,_0x459b3f,_0x12ef50[_0x51a5f2(0x137)]);_0x5b7101&&_0x5b7101[_0x51a5f2(0x153)]&&this[_0x51a5f2(0x149)][_0x51a5f2(0x12c)](_0x49507f,_0x459b3f,_0x12ef50[_0x51a5f2(0x137)]);break;}case v['Edit']:{this[_0x51a5f2(0x149)][_0x51a5f2(0x179)](_0x49507f,_0x459b3f,{'commentId':_0x12ef50[_0x51a5f2(0x137)],'text':JSON[_0x51a5f2(0x15f)](_0x12ef50[_0x51a5f2(0x168)])});break;}case v['Solve']:{const _0x9f10f2=(_0x197352=this[_0x51a5f2(0x149)][_0x51a5f2(0x138)](_0x12ef50[_0x51a5f2(0x13f)])[_0x51a5f2(0x125)](_0x1f9b18=>_0x1f9b18[_0x51a5f2(0x158)]===_0x12ef50[_0x51a5f2(0x158)]))==null?void 0x0:_0x197352[_0x51a5f2(0x166)];_0x9f10f2&&this[_0x51a5f2(0x149)][_0x51a5f2(0x173)](_0x49507f,_0x459b3f,_0x9f10f2['id'],_0x12ef50[_0x51a5f2(0x174)]===I[_0x51a5f2(0x130)]);break;}}}));}};S=V([p(0x0,_0x999591(_0x57d1e1)),p(0x1,_0x999591(_0x3953ab)),p(0x2,_0x999591(_0x45864e)),p(0x3,_0x999591(_0x5cd924))],S);const z=_0x2b6fb4(0x169),M={};var k=Object[_0x2b6fb4(0x140)],Q=(_0x28fe6f,_0x17c03c,_0x1d3bec,_0x38d99a)=>{const _0x3b56b8=_0x2b6fb4;for(var _0x1558d8=_0x38d99a>0x1?void 0x0:_0x38d99a?k(_0x17c03c,_0x1d3bec):_0x17c03c,_0xdb83bd=_0x28fe6f[_0x3b56b8(0x170)]-0x1,_0x48601a;_0xdb83bd>=0x0;_0xdb83bd--)(_0x48601a=_0x28fe6f[_0xdb83bd])&&(_0x1558d8=_0x48601a(_0x1558d8)||_0x1558d8);return _0x1558d8;},_=(_0xafea79,_0x90ce06)=>(_0x21b2c5,_0x421ad0)=>_0x90ce06(_0x21b2c5,_0x421ad0,_0xafea79);function X(_0x3e1bb4,_0x68436){const _0x2d4a28=_0x2b6fb4,_0x25c302=_0x3e1bb4['replies'][0x0];return{..._0x68436,'id':_0x25c302[_0x2d4a28(0x137)],'resolved':_0x3e1bb4['solved']===0x1,'dT':D(_0x25c302[_0x2d4a28(0x12b)]),'personId':_0x25c302[_0x2d4a28(0x12f)],'threadId':_0x25c302[_0x2d4a28(0x158)]};}function ee(_0x6fc597,_0x239895,_0x49c8ea){const _0x229648=_0x2b6fb4;var _0x26098d,_0x1ba738;if(((_0x1ba738=(_0x26098d=_0x6fc597==null?void 0x0:_0x6fc597[_0x229648(0x16c)])==null?void 0x0:_0x26098d[_0x229648(0x170)])!=null?_0x1ba738:0x0)>0x0){const _0x1eb252=(_0x3e02e0,_0x44f40b)=>({'id':_0x3e02e0[_0x229648(0x137)],'threadId':_0x3e02e0[_0x229648(0x158)],'dT':D(_0x3e02e0[_0x229648(0x12b)]),'personId':_0x3e02e0[_0x229648(0x12f)],'resolved':_0x6fc597[_0x229648(0x174)]===I[_0x229648(0x130)],'unitId':_0x239895,'subUnitId':_0x49c8ea,'text':JSON[_0x229648(0x15f)](_0x3e02e0[_0x229648(0x168)]),'parentId':_0x44f40b}),_0x38d991=_0x1eb252(_0x6fc597[_0x229648(0x16c)][0x0]);return{..._0x38d991,'children':_0x6fc597[_0x229648(0x16c)][_0x229648(0x175)](0x1)['map'](_0x342fd8=>_0x1eb252(_0x342fd8,_0x38d991['id']))};}return null;}let f=class{constructor(_0x208448,_0x4fcf7f,_0x173f1a,_0x142a24){const _0x4bf9a3=_0x2b6fb4;this[_0x4bf9a3(0x127)]=_0x208448,this[_0x4bf9a3(0x147)]=_0x4fcf7f,this[_0x4bf9a3(0x180)]=_0x173f1a,this[_0x4bf9a3(0x12a)]=_0x142a24;}async['addComment'](_0xedcc16){const _0x4a9cc6=_0x2b6fb4;var _0x190e3d,_0x2677ba;const {parentId:_0x58949d,unitId:_0x27a1eb,text:_0x463c4a,threadId:_0x3c2638}=_0xedcc16,_0x30f199=(_0x2677ba=(_0x190e3d=_0x463c4a['customRanges'])==null?void 0x0:_0x190e3d[_0x4a9cc6(0x157)](_0x2fe3c7=>_0x2fe3c7[_0x4a9cc6(0x15a)]===_0x7f7105[_0x4a9cc6(0x11d)])[_0x4a9cc6(0x15b)](_0x42e209=>_0x42e209[_0x4a9cc6(0x128)]))!=null?_0x2677ba:[],_0x72e67=JSON[_0x4a9cc6(0x121)](_0x463c4a),_0x5a2be8=(await this['_sessionService'][_0x4a9cc6(0x152)](_0x27a1eb))[_0x4a9cc6(0x13d)]();if(_0x58949d){const _0x4d4e0d={'memberId':_0x5a2be8,'unitId':_0x27a1eb,'content':_0x72e67,'mention':_0x30f199,'threadId':_0x3c2638},_0x3c215c=(await this[_0x4a9cc6(0x127)][_0x4a9cc6(0x136)](_0x4a9cc6(0x14c)+_0x27a1eb+'/reply',{'body':_0x4d4e0d}))['body'][_0x4a9cc6(0x14e)];return{..._0xedcc16,'id':_0x3c215c[_0x4a9cc6(0x137)],'dT':_0x19f256(+_0x3c215c[_0x4a9cc6(0x12b)])[_0x4a9cc6(0x14f)](_0x4a9cc6(0x148)),'personId':_0x3c215c[_0x4a9cc6(0x12f)]};}else{const _0xeb165={'memberId':_0x5a2be8,'unitId':_0x27a1eb,'content':_0x72e67,'mention':_0x30f199},_0x4e2623=await this['_httpService'][_0x4a9cc6(0x136)](_0x4a9cc6(0x14c)+_0x27a1eb+_0x4a9cc6(0x11b),{'body':_0xeb165});return X(_0x4e2623[_0x4a9cc6(0x12e)][_0x4a9cc6(0x12d)],_0xedcc16);}}async[_0x2b6fb4(0x179)](_0x12db1d){const _0x10af38=_0x2b6fb4;var _0xe413f4,_0x5c68d4;const {text:_0x105b1d,unitId:_0x34d84d}=_0x12db1d,_0x517c01=(_0x5c68d4=(_0xe413f4=_0x105b1d['customRanges'])==null?void 0x0:_0xe413f4['filter'](_0x4f3d18=>_0x4f3d18['rangeType']===_0x7f7105[_0x10af38(0x11d)])[_0x10af38(0x15b)](_0x15cdaa=>_0x15cdaa[_0x10af38(0x128)]))!=null?_0x5c68d4:[],_0x2bee84=JSON[_0x10af38(0x121)](_0x105b1d),_0x3f03e0=_0x12db1d[_0x10af38(0x158)],_0x7de356=_0x12db1d['id'],_0x1df881={'memberId':(await this[_0x10af38(0x180)][_0x10af38(0x152)](_0x34d84d))[_0x10af38(0x13d)](),'unitId':_0x34d84d,'threadId':_0x3f03e0,'mention':_0x517c01,'content':_0x2bee84,'replyId':_0x7de356},_0x4e53a8=await this[_0x10af38(0x127)]['post'](_0x10af38(0x14c)+_0x34d84d+'/edit',{'body':_0x1df881});return!_0x4e53a8[_0x10af38(0x12e)][_0x10af38(0x16e)]||_0x4e53a8[_0x10af38(0x12e)]['error'][_0x10af38(0x15c)]===0x1;}async['resolveComment'](_0x995e69){const _0x256b11=_0x2b6fb4,{unitId:_0x331438}=_0x995e69,_0x18cd80=_0x995e69[_0x256b11(0x158)],_0x281321={'memberId':this[_0x256b11(0x147)][_0x256b11(0x134)]()[_0x256b11(0x124)],'unitId':_0x331438,'threadId':_0x18cd80,'solved':_0x995e69['resolved']?I[_0x256b11(0x130)]:I['OpenOrReOpen']},_0x5b1003=await this['_httpService'][_0x256b11(0x136)](_0x256b11(0x14c)+_0x331438+'/solved',{'body':_0x281321});return!_0x5b1003[_0x256b11(0x12e)]['error']||_0x5b1003['body'][_0x256b11(0x16e)][_0x256b11(0x15c)]===0x1;}async[_0x2b6fb4(0x12c)](_0x4c7ca3,_0x371e44,_0x40c80a,_0x359e34){const _0x1fc7c8=_0x2b6fb4,_0x1265e7={'memberId':(await this['_sessionService'][_0x1fc7c8(0x152)](_0x4c7ca3))[_0x1fc7c8(0x13d)](),'threadId':_0x40c80a,'replyId':_0x359e34,'unitId':_0x4c7ca3},_0x5404b8=await this[_0x1fc7c8(0x127)][_0x1fc7c8(0x136)](_0x1fc7c8(0x14c)+_0x4c7ca3+_0x1fc7c8(0x16d),{'body':_0x1265e7});return!_0x5404b8[_0x1fc7c8(0x12e)]['error']||_0x5404b8['body'][_0x1fc7c8(0x16e)][_0x1fc7c8(0x15c)]===0x1;}async[_0x2b6fb4(0x141)](_0x27f5bd,_0x2feb52,_0x3c8534){const _0x401929=_0x2b6fb4,_0x8ddbb7={'unitId':_0x27f5bd,'threadId':_0x3c8534},_0xe0564f=await this[_0x401929(0x127)][_0x401929(0x136)](_0x401929(0x14c)+_0x27f5bd+_0x401929(0x161),{'body':_0x8ddbb7}),_0x127391=_0x3c8534[_0x401929(0x15b)](_0x59f29e=>ee(_0xe0564f['body'][_0x401929(0x144)][_0x59f29e],_0x27f5bd,_0x2feb52))[_0x401929(0x157)](Boolean);return Object[_0x401929(0x13b)](_0xe0564f[_0x401929(0x12e)]['users'])['forEach'](_0x2a4cd0=>{this['_userService']['addUser'](_0x2a4cd0);}),_0x127391;}[_0x2b6fb4(0x11f)](_0xcb6815){return{'id':_0xcb6815['id'],'threadId':_0xcb6815['threadId'],'ref':_0xcb6815['ref']};}};f=Q([_(0x0,_0x999591(_0x50b333)),_(0x1,_0x999591(_0x45864e)),_(0x2,_0x999591(_0x4e39a0)),_(0x3,_0x999591(_0x5cd924))],f);var re=Object[_0x2b6fb4(0x140)],te=(_0x52c5be,_0x195f0d,_0x33dd49,_0x4705c1)=>{const _0x8848ae=_0x2b6fb4;for(var _0x202d6c=_0x4705c1>0x1?void 0x0:_0x4705c1?re(_0x195f0d,_0x33dd49):_0x195f0d,_0x42fc19=_0x52c5be[_0x8848ae(0x170)]-0x1,_0x3975e3;_0x42fc19>=0x0;_0x42fc19--)(_0x3975e3=_0x52c5be[_0x42fc19])&&(_0x202d6c=_0x3975e3(_0x202d6c)||_0x202d6c);return _0x202d6c;},N=(_0x195e78,_0x575e38)=>(_0x322760,_0x2e234b)=>_0x575e38(_0x322760,_0x2e234b,_0x195e78);let g=class extends _0x3d69cb{constructor(_0x3835fb,_0xa1fa6c){const _0x92d218=_0x2b6fb4;super(),this[_0x92d218(0x150)]=_0x3835fb,this[_0x92d218(0x133)]=_0xa1fa6c,this[_0x92d218(0x17a)]();}[_0x2b6fb4(0x17a)](){const _0x2b62fa=_0x2b6fb4;this[_0x2b62fa(0x150)][_0x2b62fa(0x17b)]=this[_0x2b62fa(0x133)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x139f27),N(0x1,_0x999591(f))],g);var se=Object[_0x2b6fb4(0x13c)],oe=Object[_0x2b6fb4(0x140)],ne=(_0x25a221,_0x1dc1ee,_0x3e636b)=>_0x1dc1ee in _0x25a221?se(_0x25a221,_0x1dc1ee,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3e636b}):_0x25a221[_0x1dc1ee]=_0x3e636b,ie=(_0x32ff04,_0x57a637,_0x1d3be5,_0xa8e580)=>{for(var _0x5a8626=_0xa8e580>0x1?void 0x0:_0xa8e580?oe(_0x57a637,_0x1d3be5):_0x57a637,_0x3d1268=_0x32ff04['length']-0x1,_0x32606b;_0x3d1268>=0x0;_0x3d1268--)(_0x32606b=_0x32ff04[_0x3d1268])&&(_0x5a8626=_0x32606b(_0x5a8626)||_0x5a8626);return _0x5a8626;},w=(_0x31c9cc,_0x94e05f)=>(_0x349c84,_0x3dc712)=>_0x94e05f(_0x349c84,_0x3dc712,_0x31c9cc),$=(_0x581b03,_0x390b4c,_0x116f13)=>ne(_0x581b03,typeof _0x390b4c!=_0x2b6fb4(0x13e)?_0x390b4c+'':_0x390b4c,_0x116f13);let b=class extends _0x8e71cc{constructor(_0x27f0fd=M,_0x34c54c,_0x5339a1){const _0x431779=_0x2b6fb4;super(),this[_0x431779(0x142)]=_0x27f0fd,this['_injector']=_0x34c54c,this[_0x431779(0x16f)]=_0x5339a1;const {..._0x41b26d}=_0x95a5cc({},M,this[_0x431779(0x142)]);this[_0x431779(0x16f)][_0x431779(0x11c)](z,_0x41b26d);}['onStarting'](){const _0x265766=_0x2b6fb4;[[f],[g],[S]][_0x265766(0x177)](_0x9256cb=>{const _0x184aa3=_0x265766;this[_0x184aa3(0x12a)]['add'](_0x9256cb);});}[_0x2b6fb4(0x171)](){const _0x1e510e=_0x2b6fb4;this[_0x1e510e(0x12a)][_0x1e510e(0x132)](g),this[_0x1e510e(0x12a)][_0x1e510e(0x132)](S);}};$(b,_0x2b6fb4(0x163),W),$(b,_0x2b6fb4(0x14d),_0x96876[_0x2b6fb4(0x123)]),b=ie([_0x4eebb(_0x128800,_0x24b712,_0x507f31),w(0x1,_0x999591(_0x5cd924)),w(0x2,_0x4a0a76)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0xef2ac3=_0x14bf;(function(_0x14f7d5,_0x673000){const _0x1e46e6=_0x14bf,_0x5a0836=_0x14f7d5();while(!![]){try{const _0x50a9de=parseInt(_0x1e46e6(0xf7))/0x1*(-parseInt(_0x1e46e6(0xd8))/0x2)+-parseInt(_0x1e46e6(0xa5))/0x3*(-parseInt(_0x1e46e6(0xfa))/0x4)+-parseInt(_0x1e46e6(0xff))/0x5*(-parseInt(_0x1e46e6(0xfd))/0x6)+-parseInt(_0x1e46e6(0xa6))/0x7*(parseInt(_0x1e46e6(0xdd))/0x8)+parseInt(_0x1e46e6(0x10b))/0x9*(-parseInt(_0x1e46e6(0xf4))/0xa)+-parseInt(_0x1e46e6(0xf6))/0xb*(parseInt(_0x1e46e6(0x109))/0xc)+-parseInt(_0x1e46e6(0xa9))/0xd*(-parseInt(_0x1e46e6(0xf5))/0xe);if(_0x50a9de===_0x673000)break;else _0x5a0836['push'](_0x5a0836['shift']());}catch(_0x1a17e7){_0x5a0836['push'](_0x5a0836['shift']());}}}(_0x7407,0x6a8dd));import{CommentService as _0x245f3b,CollaborationSessionService as _0x38ed50,UniverCollaborationClientPlugin as _0x35d9c6}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x157e4d}from'@univerjs-pro/license';import{dayjs as _0x5802de,UserManagerService as _0x45265e,Inject as _0xaac0e8,Injector as _0x20745a,Disposable as _0x3e49f1,CustomRangeType as _0x11800a,UniverInstanceType as _0x20fd11,DependentOn as _0xe266c6,IConfigService as _0xf1feab,Plugin as _0x2c8fc5,merge as _0x47eecf}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x33dd69}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x38c2e2,IThreadCommentDataSourceService as _0x334a2b}from'@univerjs/thread-comment';import{bufferTime as _0x279e3b}from'rxjs';import{HTTPService as _0x20b61d}from'@univerjs/network';const W=_0xef2ac3(0xcd);var I=(_0x61f09c=>(_0x61f09c[_0x61f09c[_0xef2ac3(0xaa)]=0x0]=_0xef2ac3(0xaa),_0x61f09c[_0x61f09c['Solved']=0x1]=_0xef2ac3(0xd0),_0x61f09c[_0x61f09c[_0xef2ac3(0xf8)]=-0x1]=_0xef2ac3(0xf8),_0x61f09c))(I||{}),v=(_0x489c32=>(_0x489c32[_0x489c32[_0xef2ac3(0xe5)]=0x0]=_0xef2ac3(0xe5),_0x489c32[_0x489c32[_0xef2ac3(0xfc)]=0x1]='Add',_0x489c32[_0x489c32[_0xef2ac3(0xa7)]=0x2]=_0xef2ac3(0xa7),_0x489c32[_0x489c32['Edit']=0x3]=_0xef2ac3(0xc7),_0x489c32[_0x489c32['Delete']=0x4]=_0xef2ac3(0xd2),_0x489c32[_0x489c32[_0xef2ac3(0xbf)]=0x5]='Solve',_0x489c32[_0x489c32[_0xef2ac3(0xf8)]=-0x1]='UNRECOGNIZED',_0x489c32))(v||{});function _0x14bf(_0x378c77,_0x537f7c){const _0x740784=_0x7407();return _0x14bf=function(_0x14bfd7,_0x46733d){_0x14bfd7=_0x14bfd7-0xa5;let _0x3fcb45=_0x740784[_0x14bfd7];return _0x3fcb45;},_0x14bf(_0x378c77,_0x537f7c);}const D=_0x5b3d53=>_0x5802de(new Date(+_0x5b3d53))[_0xef2ac3(0xd6)](_0xef2ac3(0xd1)),B=async(_0x2301ee,_0x4a61ea)=>{const _0x3cd868=_0xef2ac3,_0x8d7d88=_0x2301ee[_0x3cd868(0xba)](_0x45265e),_0x29cdf3=_0x2301ee[_0x3cd868(0xba)](_0x20b61d);_0x4a61ea['forEach'](_0x1f0264=>{const _0x76ab13=_0x3cd868;_0x8d7d88[_0x76ab13(0x104)](_0x1f0264)&&_0x4a61ea[_0x76ab13(0x10a)](_0x1f0264);}),_0x4a61ea[_0x3cd868(0xea)]&&(await _0x29cdf3['get'](_0x3cd868(0xbe),{'params':{'userIDs':[..._0x4a61ea]}}))[_0x3cd868(0xc3)][_0x3cd868(0xca)][_0x3cd868(0xd9)](_0x4f473b=>{const _0x466bd5=_0x3cd868;_0x4f473b&&_0x8d7d88[_0x466bd5(0xe7)](_0x4f473b);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x2d42a8,_0x46f336,_0x1b8431,_0xa367e2)=>{for(var _0x3b2c17=_0xa367e2>0x1?void 0x0:_0xa367e2?K(_0x46f336,_0x1b8431):_0x46f336,_0x194b73=_0x2d42a8['length']-0x1,_0x3bbbb5;_0x194b73>=0x0;_0x194b73--)(_0x3bbbb5=_0x2d42a8[_0x194b73])&&(_0x3b2c17=_0x3bbbb5(_0x3b2c17)||_0x3b2c17);return _0x3b2c17;},p=(_0x1cd65c,_0x232ee1)=>(_0x449967,_0x25b825)=>_0x232ee1(_0x449967,_0x25b825,_0x1cd65c);function _0x7407(){const _0x357070=['parse','userID','syncUpdateMutationToColla','getCurrentUser','getUser','replies','pluginName','_threadCommentDataSource','saveCommentToSnapshot','2348376PBGovc','delete','27kOWmQI','rangeType','getComment','/list','191946tlktrL','14uVLaeX','Reply','/universer-api/comment/unit/','15596945cNZSKq','OpenOrReOpen','_commentService','payload','_injector','createTimestamp','error','userId','_configService','personId','ref','find','addComment','/edit','customRanges','reply','resolved','get','getUnit','resolveComment','threadId','/universer-api/user/list','Solve','getMemberID','deleteComment','disposeWithMe','body','code','parentId','_initUserSync','Edit','defineProperty','unitId','users','rangeId','filter','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getOwnPropertyDescriptor','_threadCommentModel','Solved','YYYY/MM/DD\x20HH:mm','Delete','listComments','content','requireSession','format','_config','26374NqBYcr','forEach','/delete','COMMENT','length','3161792LnqBXq','_init','add','post','updateComment','/solved','user','replyId','Unknown','_userService','addUser','_threadCommentDataSourceService','subscribe','size','root','_httpService','comments','_initDataSource','/reply','map','_sessionService','thread-comment-data-source.config','/add','1925330ExTfOj','14jViaFV','33agDBHs','4raeWhP','UNRECOGNIZED','commentUpdate$','24IBJZlP','type','Add','5118pFIxRU','pipe','5045dySPzw'];_0x7407=function(){return _0x357070;};return _0x7407();}let S=class extends _0x3e49f1{constructor(_0x34681d,_0x32df14,_0x53183e,_0x175829){const _0x13ff75=_0xef2ac3;super(),this[_0x13ff75(0xab)]=_0x34681d,this['_threadCommentModel']=_0x32df14,this['_userService']=_0x53183e,this[_0x13ff75(0xad)]=_0x175829,this[_0x13ff75(0xde)](),this[_0x13ff75(0xc6)]();}[_0xef2ac3(0xc6)](){const _0x3ade16=_0xef2ac3;this[_0x3ade16(0xc2)](this[_0x3ade16(0xcf)][_0x3ade16(0xf9)][_0x3ade16(0xfe)](_0x279e3b(0x10))[_0x3ade16(0xe9)](_0x484049=>{const _0x1b7d1a=_0x3ade16,_0x35891a=new Set();_0x484049[_0x1b7d1a(0xd9)](_0xad9c2e=>{const _0x3e4e60=_0x1b7d1a;switch(_0xad9c2e[_0x3e4e60(0xfb)]){case'add':{const _0x2c424a=_0xad9c2e[_0x3e4e60(0xac)][_0x3e4e60(0xb2)];_0x35891a[_0x3e4e60(0xdf)](_0x2c424a);break;}}}),B(this['_injector'],_0x35891a);}));}['_init'](){const _0x43d943=_0xef2ac3;this[_0x43d943(0xc2)](this[_0x43d943(0xab)][_0x43d943(0xf9)][_0x43d943(0xe9)](async _0x5d4325=>{const _0x4c8f98=_0x43d943;var _0xa401a4,_0x5677e8,_0x5c250a,_0x4fe39d;const _0x1d7703=(_0xa401a4=this[_0x4c8f98(0xcf)][_0x4c8f98(0xbb)](_0x5d4325[_0x4c8f98(0xc9)])[_0x4c8f98(0xb4)](_0x3bee46=>_0x3bee46['threadId']===_0x5d4325[_0x4c8f98(0xbd)]))==null?void 0x0:_0xa401a4[_0x4c8f98(0xeb)];if(!_0x1d7703)return;const {unitId:_0x1d6b92,subUnitId:_0x297662}=_0x1d7703;switch(_0x5d4325[_0x4c8f98(0xe3)]&&this['_userService'][_0x4c8f98(0xe7)](_0x5d4325[_0x4c8f98(0xe3)]),_0x5d4325[_0x4c8f98(0xfb)]){case v['Add']:break;case v[_0x4c8f98(0xa7)]:{this['_threadCommentModel']['addComment'](_0x1d6b92,_0x297662,{'unitId':_0x1d6b92,'subUnitId':_0x297662,'ref':'','id':_0x5d4325[_0x4c8f98(0xe4)],'dT':D(+_0x5d4325[_0x4c8f98(0xae)]),'threadId':_0x5d4325[_0x4c8f98(0xbd)],'personId':(_0x5c250a=(_0x5677e8=_0x5d4325[_0x4c8f98(0xe3)])==null?void 0x0:_0x5677e8[_0x4c8f98(0x101)])!=null?_0x5c250a:_0x5d4325[_0x4c8f98(0xb0)],'text':JSON[_0x4c8f98(0x100)](_0x5d4325['content']),'parentId':_0x1d7703['id']});break;}case v['Delete']:{const _0x2c575b=this[_0x4c8f98(0xcf)][_0x4c8f98(0x10d)](_0x1d6b92,_0x297662,_0x5d4325['replyId']);_0x2c575b&&_0x2c575b[_0x4c8f98(0xc5)]&&this[_0x4c8f98(0xcf)][_0x4c8f98(0xc1)](_0x1d6b92,_0x297662,_0x5d4325[_0x4c8f98(0xe4)]);break;}case v[_0x4c8f98(0xc7)]:{this[_0x4c8f98(0xcf)][_0x4c8f98(0xe1)](_0x1d6b92,_0x297662,{'commentId':_0x5d4325[_0x4c8f98(0xe4)],'text':JSON['parse'](_0x5d4325['content'])});break;}case v[_0x4c8f98(0xbf)]:{const _0x325e6e=(_0x4fe39d=this[_0x4c8f98(0xcf)]['getUnit'](_0x5d4325[_0x4c8f98(0xc9)])['find'](_0x5e995f=>_0x5e995f['threadId']===_0x5d4325[_0x4c8f98(0xbd)]))==null?void 0x0:_0x4fe39d[_0x4c8f98(0xeb)];_0x325e6e&&this[_0x4c8f98(0xcf)][_0x4c8f98(0xbc)](_0x1d6b92,_0x297662,_0x325e6e['id'],_0x5d4325['solved']===I[_0x4c8f98(0xd0)]);break;}}}));}};S=V([p(0x0,_0xaac0e8(_0x245f3b)),p(0x1,_0xaac0e8(_0x38c2e2)),p(0x2,_0xaac0e8(_0x45265e)),p(0x3,_0xaac0e8(_0x20745a))],S);const z=_0xef2ac3(0xf2),M={};var k=Object[_0xef2ac3(0xce)],Q=(_0x4b00ca,_0x47edbb,_0x1fab8f,_0x2d8ce4)=>{for(var _0x17e4ac=_0x2d8ce4>0x1?void 0x0:_0x2d8ce4?k(_0x47edbb,_0x1fab8f):_0x47edbb,_0x4e8f41=_0x4b00ca['length']-0x1,_0x1eb821;_0x4e8f41>=0x0;_0x4e8f41--)(_0x1eb821=_0x4b00ca[_0x4e8f41])&&(_0x17e4ac=_0x1eb821(_0x17e4ac)||_0x17e4ac);return _0x17e4ac;},_=(_0x12fda2,_0x233132)=>(_0x51483e,_0x46c0c4)=>_0x233132(_0x51483e,_0x46c0c4,_0x12fda2);function X(_0x40afd3,_0xb542df){const _0x20d48f=_0xef2ac3,_0x41a08c=_0x40afd3[_0x20d48f(0x105)][0x0];return{..._0xb542df,'id':_0x41a08c[_0x20d48f(0xe4)],'resolved':_0x40afd3['solved']===0x1,'dT':D(_0x41a08c['createTimestamp']),'personId':_0x41a08c[_0x20d48f(0xb0)],'threadId':_0x41a08c['threadId']};}function ee(_0x48fc58,_0x43d309,_0x127dcd){const _0x353562=_0xef2ac3;var _0x5e396f,_0xf97301;if(((_0xf97301=(_0x5e396f=_0x48fc58==null?void 0x0:_0x48fc58['replies'])==null?void 0x0:_0x5e396f[_0x353562(0xdc)])!=null?_0xf97301:0x0)>0x0){const _0xe44c6d=(_0x3141ec,_0x4e0602)=>({'id':_0x3141ec['replyId'],'threadId':_0x3141ec[_0x353562(0xbd)],'dT':D(_0x3141ec['createTimestamp']),'personId':_0x3141ec['userId'],'resolved':_0x48fc58['solved']===I['Solved'],'unitId':_0x43d309,'subUnitId':_0x127dcd,'text':JSON[_0x353562(0x100)](_0x3141ec[_0x353562(0xd4)]),'parentId':_0x4e0602}),_0x2d895=_0xe44c6d(_0x48fc58['replies'][0x0]);return{..._0x2d895,'children':_0x48fc58['replies']['slice'](0x1)[_0x353562(0xf0)](_0x5b6cf8=>_0xe44c6d(_0x5b6cf8,_0x2d895['id']))};}return null;}let f=class{constructor(_0x5db0c5,_0x19d232,_0x10d091,_0x5423f7){const _0xb33276=_0xef2ac3;this[_0xb33276(0xec)]=_0x5db0c5,this[_0xb33276(0xe6)]=_0x19d232,this['_sessionService']=_0x10d091,this['_injector']=_0x5423f7;}async[_0xef2ac3(0xb5)](_0x442fcf){const _0x33f642=_0xef2ac3;var _0x1e1426,_0x4a9db3;const {parentId:_0x27b835,unitId:_0x5a79fb,text:_0x2bcf15,threadId:_0xdebc0d}=_0x442fcf,_0x1fbc83=(_0x4a9db3=(_0x1e1426=_0x2bcf15[_0x33f642(0xb7)])==null?void 0x0:_0x1e1426['filter'](_0x2d69cb=>_0x2d69cb[_0x33f642(0x10c)]===_0x11800a['COMMENT'])[_0x33f642(0xf0)](_0x13364a=>_0x13364a[_0x33f642(0xcb)]))!=null?_0x4a9db3:[],_0x28e7a1=JSON['stringify'](_0x2bcf15),_0x5bfb43=(await this[_0x33f642(0xf1)][_0x33f642(0xd5)](_0x5a79fb))['getMemberID']();if(_0x27b835){const _0x581b36={'memberId':_0x5bfb43,'unitId':_0x5a79fb,'content':_0x28e7a1,'mention':_0x1fbc83,'threadId':_0xdebc0d},_0x35d062=(await this[_0x33f642(0xec)][_0x33f642(0xe0)](_0x33f642(0xa8)+_0x5a79fb+_0x33f642(0xef),{'body':_0x581b36}))[_0x33f642(0xc3)][_0x33f642(0xb8)];return{..._0x442fcf,'id':_0x35d062[_0x33f642(0xe4)],'dT':_0x5802de(+_0x35d062['createTimestamp'])['format'](_0x33f642(0xd1)),'personId':_0x35d062[_0x33f642(0xb0)]};}else{const _0x3d29c0={'memberId':_0x5bfb43,'unitId':_0x5a79fb,'content':_0x28e7a1,'mention':_0x1fbc83},_0x2ad157=await this[_0x33f642(0xec)][_0x33f642(0xe0)](_0x33f642(0xa8)+_0x5a79fb+_0x33f642(0xf3),{'body':_0x3d29c0});return X(_0x2ad157[_0x33f642(0xc3)]['comment'],_0x442fcf);}}async['updateComment'](_0x3ca510){const _0x2651a3=_0xef2ac3;var _0x2ef7f7,_0x392b88;const {text:_0xb69a1c,unitId:_0x579c28}=_0x3ca510,_0x4d3b06=(_0x392b88=(_0x2ef7f7=_0xb69a1c['customRanges'])==null?void 0x0:_0x2ef7f7[_0x2651a3(0xcc)](_0x1ec50f=>_0x1ec50f[_0x2651a3(0x10c)]===_0x11800a[_0x2651a3(0xdb)])[_0x2651a3(0xf0)](_0x5e1c21=>_0x5e1c21[_0x2651a3(0xcb)]))!=null?_0x392b88:[],_0x5ede28=JSON['stringify'](_0xb69a1c),_0x3a56dd=_0x3ca510[_0x2651a3(0xbd)],_0x5d27ec=_0x3ca510['id'],_0x110ab6={'memberId':(await this[_0x2651a3(0xf1)][_0x2651a3(0xd5)](_0x579c28))[_0x2651a3(0xc0)](),'unitId':_0x579c28,'threadId':_0x3a56dd,'mention':_0x4d3b06,'content':_0x5ede28,'replyId':_0x5d27ec},_0x3817a0=await this[_0x2651a3(0xec)][_0x2651a3(0xe0)]('/universer-api/comment/unit/'+_0x579c28+_0x2651a3(0xb6),{'body':_0x110ab6});return!_0x3817a0[_0x2651a3(0xc3)]['error']||_0x3817a0[_0x2651a3(0xc3)][_0x2651a3(0xaf)][_0x2651a3(0xc4)]===0x1;}async[_0xef2ac3(0xbc)](_0x2d8be3){const _0x2bf397=_0xef2ac3,{unitId:_0xb07b31}=_0x2d8be3,_0x413f4a=_0x2d8be3[_0x2bf397(0xbd)],_0xba14bc={'memberId':this['_userService'][_0x2bf397(0x103)]()[_0x2bf397(0x101)],'unitId':_0xb07b31,'threadId':_0x413f4a,'solved':_0x2d8be3[_0x2bf397(0xb9)]?I[_0x2bf397(0xd0)]:I[_0x2bf397(0xaa)]},_0x511262=await this[_0x2bf397(0xec)][_0x2bf397(0xe0)](_0x2bf397(0xa8)+_0xb07b31+_0x2bf397(0xe2),{'body':_0xba14bc});return!_0x511262[_0x2bf397(0xc3)][_0x2bf397(0xaf)]||_0x511262[_0x2bf397(0xc3)][_0x2bf397(0xaf)][_0x2bf397(0xc4)]===0x1;}async['deleteComment'](_0x43197f,_0x381705,_0x55669a,_0x10ad64){const _0x1b7d07=_0xef2ac3,_0x2c8cd6={'memberId':(await this[_0x1b7d07(0xf1)][_0x1b7d07(0xd5)](_0x43197f))[_0x1b7d07(0xc0)](),'threadId':_0x55669a,'replyId':_0x10ad64,'unitId':_0x43197f},_0x46767d=await this[_0x1b7d07(0xec)]['post']('/universer-api/comment/unit/'+_0x43197f+_0x1b7d07(0xda),{'body':_0x2c8cd6});return!_0x46767d[_0x1b7d07(0xc3)]['error']||_0x46767d[_0x1b7d07(0xc3)][_0x1b7d07(0xaf)][_0x1b7d07(0xc4)]===0x1;}async[_0xef2ac3(0xd3)](_0x5e027e,_0x2c4d19,_0x598a33){const _0x31ec37=_0xef2ac3,_0x4a60db={'unitId':_0x5e027e,'threadId':_0x598a33},_0x5703e7=await this[_0x31ec37(0xec)][_0x31ec37(0xe0)](_0x31ec37(0xa8)+_0x5e027e+_0x31ec37(0x10e),{'body':_0x4a60db}),_0x17b0ee=_0x598a33[_0x31ec37(0xf0)](_0xa2b4e2=>ee(_0x5703e7[_0x31ec37(0xc3)][_0x31ec37(0xed)][_0xa2b4e2],_0x5e027e,_0x2c4d19))[_0x31ec37(0xcc)](Boolean);return Object['values'](_0x5703e7['body'][_0x31ec37(0xca)])[_0x31ec37(0xd9)](_0x11e39d=>{const _0x3495b4=_0x31ec37;this['_userService'][_0x3495b4(0xe7)](_0x11e39d);}),_0x17b0ee;}[_0xef2ac3(0x108)](_0x23d661){const _0x27a70d=_0xef2ac3;return{'id':_0x23d661['id'],'threadId':_0x23d661['threadId'],'ref':_0x23d661[_0x27a70d(0xb3)]};}};f=Q([_(0x0,_0xaac0e8(_0x20b61d)),_(0x1,_0xaac0e8(_0x45265e)),_(0x2,_0xaac0e8(_0x38ed50)),_(0x3,_0xaac0e8(_0x20745a))],f);var re=Object[_0xef2ac3(0xce)],te=(_0x1fa5ff,_0x310297,_0x557b8d,_0x10608e)=>{for(var _0x927c35=_0x10608e>0x1?void 0x0:_0x10608e?re(_0x310297,_0x557b8d):_0x310297,_0x28b27a=_0x1fa5ff['length']-0x1,_0x509d43;_0x28b27a>=0x0;_0x28b27a--)(_0x509d43=_0x1fa5ff[_0x28b27a])&&(_0x927c35=_0x509d43(_0x927c35)||_0x927c35);return _0x927c35;},N=(_0x2666c3,_0x5be33b)=>(_0x1150a2,_0x4d91de)=>_0x5be33b(_0x1150a2,_0x4d91de,_0x2666c3);let g=class extends _0x3e49f1{constructor(_0x4e790a,_0xbff171){const _0x4b1ced=_0xef2ac3;super(),this[_0x4b1ced(0xe8)]=_0x4e790a,this[_0x4b1ced(0x107)]=_0xbff171,this[_0x4b1ced(0xee)]();}[_0xef2ac3(0xee)](){const _0x3dc1ba=_0xef2ac3;this[_0x3dc1ba(0xe8)]['dataSource']=this[_0x3dc1ba(0x107)],this[_0x3dc1ba(0xe8)][_0x3dc1ba(0x102)]=!0x1;}};g=te([N(0x0,_0x334a2b),N(0x1,_0xaac0e8(f))],g);var se=Object[_0xef2ac3(0xc8)],oe=Object[_0xef2ac3(0xce)],ne=(_0x5487d2,_0x540370,_0x44f898)=>_0x540370 in _0x5487d2?se(_0x5487d2,_0x540370,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x44f898}):_0x5487d2[_0x540370]=_0x44f898,ie=(_0x57d0b9,_0x48c692,_0x3893d7,_0x2ceb52)=>{const _0x40c232=_0xef2ac3;for(var _0x5c3f9e=_0x2ceb52>0x1?void 0x0:_0x2ceb52?oe(_0x48c692,_0x3893d7):_0x48c692,_0x33596a=_0x57d0b9[_0x40c232(0xdc)]-0x1,_0x1e70ac;_0x33596a>=0x0;_0x33596a--)(_0x1e70ac=_0x57d0b9[_0x33596a])&&(_0x5c3f9e=_0x1e70ac(_0x5c3f9e)||_0x5c3f9e);return _0x5c3f9e;},w=(_0x48528d,_0x56d06e)=>(_0x260918,_0x2a7313)=>_0x56d06e(_0x260918,_0x2a7313,_0x48528d),$=(_0x2f1a0a,_0x305b57,_0x4fa42d)=>ne(_0x2f1a0a,typeof _0x305b57!='symbol'?_0x305b57+'':_0x305b57,_0x4fa42d);let b=class extends _0x2c8fc5{constructor(_0x5e6db6=M,_0x59f833,_0x5b921d){const _0x47fb5c=_0xef2ac3;super(),this[_0x47fb5c(0xd7)]=_0x5e6db6,this[_0x47fb5c(0xad)]=_0x59f833,this[_0x47fb5c(0xb1)]=_0x5b921d;const {..._0x3053b6}=_0x47eecf({},M,this[_0x47fb5c(0xd7)]);this[_0x47fb5c(0xb1)]['setConfig'](z,_0x3053b6);}['onStarting'](){const _0x2cbf17=_0xef2ac3;[[f],[g],[S]][_0x2cbf17(0xd9)](_0x4ee1e3=>{const _0x4eef37=_0x2cbf17;this[_0x4eef37(0xad)][_0x4eef37(0xdf)](_0x4ee1e3);});}['onReady'](){const _0x56ed42=_0xef2ac3;this[_0x56ed42(0xad)][_0x56ed42(0xba)](g),this['_injector'][_0x56ed42(0xba)](S);}};$(b,_0xef2ac3(0x106),W),$(b,_0xef2ac3(0xfb),_0x20fd11['UNIVER_UNKNOWN']),b=ie([_0xe266c6(_0x33dd69,_0x35d9c6,_0x157e4d),w(0x1,_0xaac0e8(_0x20745a)),w(0x2,_0xf1feab)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x2b6fb4=_0x585c;function _0x585c(_0x51f73b,_0x5e16c2){const _0xe115fe=_0xe115();return _0x585c=function(_0x585c64,_0x5e3847){_0x585c64=_0x585c64-0x11a;let _0x245a0d=_0xe115fe[_0x585c64];return _0x245a0d;},_0x585c(_0x51f73b,_0x5e16c2);}(function(_0x21ecce,_0x501a47){const _0x1fd13d=_0x585c,_0x5ea129=_0x21ecce();while(!![]){try{const _0x5a4666=parseInt(_0x1fd13d(0x164))/0x1*(parseInt(_0x1fd13d(0x172))/0x2)+parseInt(_0x1fd13d(0x156))/0x3*(-parseInt(_0x1fd13d(0x17e))/0x4)+-parseInt(_0x1fd13d(0x122))/0x5*(-parseInt(_0x1fd13d(0x16b))/0x6)+-parseInt(_0x1fd13d(0x129))/0x7*(parseInt(_0x1fd13d(0x178))/0x8)+parseInt(_0x1fd13d(0x154))/0x9*(-parseInt(_0x1fd13d(0x167))/0xa)+parseInt(_0x1fd13d(0x143))/0xb*(parseInt(_0x1fd13d(0x17c))/0xc)+parseInt(_0x1fd13d(0x145))/0xd;if(_0x5a4666===_0x501a47)break;else _0x5ea129['push'](_0x5ea129['shift']());}catch(_0x4765d7){_0x5ea129['push'](_0x5ea129['shift']());}}}(_0xe115,0x721b0));import{CommentService as _0x57d1e1,CollaborationSessionService as _0x4e39a0,UniverCollaborationClientPlugin as _0x24b712}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x507f31}from'@univerjs-pro/license';import{dayjs as _0x19f256,UserManagerService as _0x45864e,Inject as _0x999591,Injector as _0x5cd924,Disposable as _0x3d69cb,CustomRangeType as _0x7f7105,UniverInstanceType as _0x96876,DependentOn as _0x4eebb,IConfigService as _0x4a0a76,Plugin as _0x8e71cc,merge as _0x95a5cc}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x128800}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x3953ab,IThreadCommentDataSourceService as _0x139f27}from'@univerjs/thread-comment';import{bufferTime as _0x14879c}from'rxjs';import{HTTPService as _0x50b333}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';function _0xe115(){const _0x47ec2a=['rangeType','map','code','delete','addUser','parse','_commentService','/list','pipe','pluginName','13PPDrLp','Edit','root','10mYLldd','content','thread-comment-data-source.config','commentUpdate$','1925274mmoQdN','replies','/delete','error','_configService','length','onReady','89394YaktVk','resolveComment','solved','slice','disposeWithMe','forEach','2781472FTcPGI','updateComment','_initDataSource','dataSource','36ggJVZX','getComment','351812DdHVSc','UNRECOGNIZED','_sessionService','Reply','subscribe','/add','setConfig','COMMENT','Unknown','saveCommentToSnapshot','add','stringify','5kWdcwH','UNIVER_UNKNOWN','userID','find','personId','_httpService','rangeId','7jHccjC','_injector','createTimestamp','deleteComment','comment','body','userId','Solved','_initUserSync','get','_threadCommentDataSource','getCurrentUser','Add','post','replyId','getUnit','OpenOrReOpen','Solve','values','defineProperty','getMemberID','symbol','unitId','getOwnPropertyDescriptor','listComments','_config','1643114GQSLjc','comments','5328362iumgjm','/universer-api/user/list','_userService','YYYY/MM/DD\x20HH:mm','_threadCommentModel','Delete','_init','/universer-api/comment/unit/','type','reply','format','_threadCommentDataSourceService','getUser','requireSession','parentId','7712307Wotpzx','user','3zIROJI','filter','threadId','size'];_0xe115=function(){return _0x47ec2a;};return _0xe115();}var I=(_0x42cc93=>(_0x42cc93[_0x42cc93[_0x2b6fb4(0x139)]=0x0]='OpenOrReOpen',_0x42cc93[_0x42cc93['Solved']=0x1]='Solved',_0x42cc93[_0x42cc93[_0x2b6fb4(0x17f)]=-0x1]=_0x2b6fb4(0x17f),_0x42cc93))(I||{}),v=(_0x3c93d5=>(_0x3c93d5[_0x3c93d5[_0x2b6fb4(0x11e)]=0x0]=_0x2b6fb4(0x11e),_0x3c93d5[_0x3c93d5[_0x2b6fb4(0x135)]=0x1]=_0x2b6fb4(0x135),_0x3c93d5[_0x3c93d5[_0x2b6fb4(0x181)]=0x2]='Reply',_0x3c93d5[_0x3c93d5[_0x2b6fb4(0x165)]=0x3]=_0x2b6fb4(0x165),_0x3c93d5[_0x3c93d5[_0x2b6fb4(0x14a)]=0x4]=_0x2b6fb4(0x14a),_0x3c93d5[_0x3c93d5['Solve']=0x5]=_0x2b6fb4(0x13a),_0x3c93d5[_0x3c93d5[_0x2b6fb4(0x17f)]=-0x1]=_0x2b6fb4(0x17f),_0x3c93d5))(v||{});const D=_0x3c1eb5=>_0x19f256(new Date(+_0x3c1eb5))[_0x2b6fb4(0x14f)](_0x2b6fb4(0x148)),B=async(_0x2b0849,_0x51263c)=>{const _0x349d58=_0x2b6fb4,_0x40162e=_0x2b0849['get'](_0x45864e),_0x1748d2=_0x2b0849['get'](_0x50b333);_0x51263c[_0x349d58(0x177)](_0x27099b=>{const _0xedfc27=_0x349d58;_0x40162e[_0xedfc27(0x151)](_0x27099b)&&_0x51263c[_0xedfc27(0x15d)](_0x27099b);}),_0x51263c[_0x349d58(0x159)]&&(await _0x1748d2['get'](_0x349d58(0x146),{'params':{'userIDs':[..._0x51263c]}}))[_0x349d58(0x12e)]['users'][_0x349d58(0x177)](_0x1eff89=>{const _0x509815=_0x349d58;_0x1eff89&&_0x40162e[_0x509815(0x15e)](_0x1eff89);});};var K=Object[_0x2b6fb4(0x140)],V=(_0x5e986c,_0x2e7615,_0x3fd8c6,_0x152cd0)=>{const _0x178878=_0x2b6fb4;for(var _0x40f319=_0x152cd0>0x1?void 0x0:_0x152cd0?K(_0x2e7615,_0x3fd8c6):_0x2e7615,_0x499678=_0x5e986c[_0x178878(0x170)]-0x1,_0x370664;_0x499678>=0x0;_0x499678--)(_0x370664=_0x5e986c[_0x499678])&&(_0x40f319=_0x370664(_0x40f319)||_0x40f319);return _0x40f319;},p=(_0x69b35f,_0x1e1023)=>(_0x2baeef,_0x34ddb1)=>_0x1e1023(_0x2baeef,_0x34ddb1,_0x69b35f);let S=class extends _0x3d69cb{constructor(_0x16a4a5,_0x54c5ee,_0x208d5c,_0x927183){const _0x4b992b=_0x2b6fb4;super(),this[_0x4b992b(0x160)]=_0x16a4a5,this[_0x4b992b(0x149)]=_0x54c5ee,this['_userService']=_0x208d5c,this[_0x4b992b(0x12a)]=_0x927183,this[_0x4b992b(0x14b)](),this[_0x4b992b(0x131)]();}['_initUserSync'](){const _0x2585b1=_0x2b6fb4;this[_0x2585b1(0x176)](this[_0x2585b1(0x149)][_0x2585b1(0x16a)][_0x2585b1(0x162)](_0x14879c(0x10))[_0x2585b1(0x11a)](_0x137c7e=>{const _0x12a871=_0x2585b1,_0x1cb452=new Set();_0x137c7e[_0x12a871(0x177)](_0x574345=>{const _0x53f1f2=_0x12a871;switch(_0x574345[_0x53f1f2(0x14d)]){case'add':{const _0x2b6156=_0x574345['payload'][_0x53f1f2(0x126)];_0x1cb452[_0x53f1f2(0x120)](_0x2b6156);break;}}}),B(this[_0x12a871(0x12a)],_0x1cb452);}));}[_0x2b6fb4(0x14b)](){const _0x24d1cd=_0x2b6fb4;this[_0x24d1cd(0x176)](this[_0x24d1cd(0x160)]['commentUpdate$'][_0x24d1cd(0x11a)](async _0x12ef50=>{const _0x51a5f2=_0x24d1cd;var _0x338ca7,_0x2b2752,_0x342b89,_0x197352;const _0x23172b=(_0x338ca7=this[_0x51a5f2(0x149)][_0x51a5f2(0x138)](_0x12ef50[_0x51a5f2(0x13f)])[_0x51a5f2(0x125)](_0x16a338=>_0x16a338[_0x51a5f2(0x158)]===_0x12ef50['threadId']))==null?void 0x0:_0x338ca7['root'];if(!_0x23172b)return;const {unitId:_0x49507f,subUnitId:_0x459b3f}=_0x23172b;switch(_0x12ef50[_0x51a5f2(0x155)]&&this[_0x51a5f2(0x147)]['addUser'](_0x12ef50[_0x51a5f2(0x155)]),_0x12ef50[_0x51a5f2(0x14d)]){case v['Add']:break;case v[_0x51a5f2(0x181)]:{this[_0x51a5f2(0x149)]['addComment'](_0x49507f,_0x459b3f,{'unitId':_0x49507f,'subUnitId':_0x459b3f,'ref':'','id':_0x12ef50[_0x51a5f2(0x137)],'dT':D(+_0x12ef50['createTimestamp']),'threadId':_0x12ef50[_0x51a5f2(0x158)],'personId':(_0x342b89=(_0x2b2752=_0x12ef50['user'])==null?void 0x0:_0x2b2752['userID'])!=null?_0x342b89:_0x12ef50[_0x51a5f2(0x12f)],'text':JSON[_0x51a5f2(0x15f)](_0x12ef50[_0x51a5f2(0x168)]),'parentId':_0x23172b['id']});break;}case v[_0x51a5f2(0x14a)]:{const _0x5b7101=this[_0x51a5f2(0x149)][_0x51a5f2(0x17d)](_0x49507f,_0x459b3f,_0x12ef50[_0x51a5f2(0x137)]);_0x5b7101&&_0x5b7101[_0x51a5f2(0x153)]&&this[_0x51a5f2(0x149)][_0x51a5f2(0x12c)](_0x49507f,_0x459b3f,_0x12ef50[_0x51a5f2(0x137)]);break;}case v['Edit']:{this[_0x51a5f2(0x149)][_0x51a5f2(0x179)](_0x49507f,_0x459b3f,{'commentId':_0x12ef50[_0x51a5f2(0x137)],'text':JSON[_0x51a5f2(0x15f)](_0x12ef50[_0x51a5f2(0x168)])});break;}case v['Solve']:{const _0x9f10f2=(_0x197352=this[_0x51a5f2(0x149)][_0x51a5f2(0x138)](_0x12ef50[_0x51a5f2(0x13f)])[_0x51a5f2(0x125)](_0x1f9b18=>_0x1f9b18[_0x51a5f2(0x158)]===_0x12ef50[_0x51a5f2(0x158)]))==null?void 0x0:_0x197352[_0x51a5f2(0x166)];_0x9f10f2&&this[_0x51a5f2(0x149)][_0x51a5f2(0x173)](_0x49507f,_0x459b3f,_0x9f10f2['id'],_0x12ef50[_0x51a5f2(0x174)]===I[_0x51a5f2(0x130)]);break;}}}));}};S=V([p(0x0,_0x999591(_0x57d1e1)),p(0x1,_0x999591(_0x3953ab)),p(0x2,_0x999591(_0x45864e)),p(0x3,_0x999591(_0x5cd924))],S);const z=_0x2b6fb4(0x169),M={};var k=Object[_0x2b6fb4(0x140)],Q=(_0x28fe6f,_0x17c03c,_0x1d3bec,_0x38d99a)=>{const _0x3b56b8=_0x2b6fb4;for(var _0x1558d8=_0x38d99a>0x1?void 0x0:_0x38d99a?k(_0x17c03c,_0x1d3bec):_0x17c03c,_0xdb83bd=_0x28fe6f[_0x3b56b8(0x170)]-0x1,_0x48601a;_0xdb83bd>=0x0;_0xdb83bd--)(_0x48601a=_0x28fe6f[_0xdb83bd])&&(_0x1558d8=_0x48601a(_0x1558d8)||_0x1558d8);return _0x1558d8;},_=(_0xafea79,_0x90ce06)=>(_0x21b2c5,_0x421ad0)=>_0x90ce06(_0x21b2c5,_0x421ad0,_0xafea79);function X(_0x3e1bb4,_0x68436){const _0x2d4a28=_0x2b6fb4,_0x25c302=_0x3e1bb4['replies'][0x0];return{..._0x68436,'id':_0x25c302[_0x2d4a28(0x137)],'resolved':_0x3e1bb4['solved']===0x1,'dT':D(_0x25c302[_0x2d4a28(0x12b)]),'personId':_0x25c302[_0x2d4a28(0x12f)],'threadId':_0x25c302[_0x2d4a28(0x158)]};}function ee(_0x6fc597,_0x239895,_0x49c8ea){const _0x229648=_0x2b6fb4;var _0x26098d,_0x1ba738;if(((_0x1ba738=(_0x26098d=_0x6fc597==null?void 0x0:_0x6fc597[_0x229648(0x16c)])==null?void 0x0:_0x26098d[_0x229648(0x170)])!=null?_0x1ba738:0x0)>0x0){const _0x1eb252=(_0x3e02e0,_0x44f40b)=>({'id':_0x3e02e0[_0x229648(0x137)],'threadId':_0x3e02e0[_0x229648(0x158)],'dT':D(_0x3e02e0[_0x229648(0x12b)]),'personId':_0x3e02e0[_0x229648(0x12f)],'resolved':_0x6fc597[_0x229648(0x174)]===I[_0x229648(0x130)],'unitId':_0x239895,'subUnitId':_0x49c8ea,'text':JSON[_0x229648(0x15f)](_0x3e02e0[_0x229648(0x168)]),'parentId':_0x44f40b}),_0x38d991=_0x1eb252(_0x6fc597[_0x229648(0x16c)][0x0]);return{..._0x38d991,'children':_0x6fc597[_0x229648(0x16c)][_0x229648(0x175)](0x1)['map'](_0x342fd8=>_0x1eb252(_0x342fd8,_0x38d991['id']))};}return null;}let f=class{constructor(_0x208448,_0x4fcf7f,_0x173f1a,_0x142a24){const _0x4bf9a3=_0x2b6fb4;this[_0x4bf9a3(0x127)]=_0x208448,this[_0x4bf9a3(0x147)]=_0x4fcf7f,this[_0x4bf9a3(0x180)]=_0x173f1a,this[_0x4bf9a3(0x12a)]=_0x142a24;}async['addComment'](_0xedcc16){const _0x4a9cc6=_0x2b6fb4;var _0x190e3d,_0x2677ba;const {parentId:_0x58949d,unitId:_0x27a1eb,text:_0x463c4a,threadId:_0x3c2638}=_0xedcc16,_0x30f199=(_0x2677ba=(_0x190e3d=_0x463c4a['customRanges'])==null?void 0x0:_0x190e3d[_0x4a9cc6(0x157)](_0x2fe3c7=>_0x2fe3c7[_0x4a9cc6(0x15a)]===_0x7f7105[_0x4a9cc6(0x11d)])[_0x4a9cc6(0x15b)](_0x42e209=>_0x42e209[_0x4a9cc6(0x128)]))!=null?_0x2677ba:[],_0x72e67=JSON[_0x4a9cc6(0x121)](_0x463c4a),_0x5a2be8=(await this['_sessionService'][_0x4a9cc6(0x152)](_0x27a1eb))[_0x4a9cc6(0x13d)]();if(_0x58949d){const _0x4d4e0d={'memberId':_0x5a2be8,'unitId':_0x27a1eb,'content':_0x72e67,'mention':_0x30f199,'threadId':_0x3c2638},_0x3c215c=(await this[_0x4a9cc6(0x127)][_0x4a9cc6(0x136)](_0x4a9cc6(0x14c)+_0x27a1eb+'/reply',{'body':_0x4d4e0d}))['body'][_0x4a9cc6(0x14e)];return{..._0xedcc16,'id':_0x3c215c[_0x4a9cc6(0x137)],'dT':_0x19f256(+_0x3c215c[_0x4a9cc6(0x12b)])[_0x4a9cc6(0x14f)](_0x4a9cc6(0x148)),'personId':_0x3c215c[_0x4a9cc6(0x12f)]};}else{const _0xeb165={'memberId':_0x5a2be8,'unitId':_0x27a1eb,'content':_0x72e67,'mention':_0x30f199},_0x4e2623=await this['_httpService'][_0x4a9cc6(0x136)](_0x4a9cc6(0x14c)+_0x27a1eb+_0x4a9cc6(0x11b),{'body':_0xeb165});return X(_0x4e2623[_0x4a9cc6(0x12e)][_0x4a9cc6(0x12d)],_0xedcc16);}}async[_0x2b6fb4(0x179)](_0x12db1d){const _0x10af38=_0x2b6fb4;var _0xe413f4,_0x5c68d4;const {text:_0x105b1d,unitId:_0x34d84d}=_0x12db1d,_0x517c01=(_0x5c68d4=(_0xe413f4=_0x105b1d['customRanges'])==null?void 0x0:_0xe413f4['filter'](_0x4f3d18=>_0x4f3d18['rangeType']===_0x7f7105[_0x10af38(0x11d)])[_0x10af38(0x15b)](_0x15cdaa=>_0x15cdaa[_0x10af38(0x128)]))!=null?_0x5c68d4:[],_0x2bee84=JSON[_0x10af38(0x121)](_0x105b1d),_0x3f03e0=_0x12db1d[_0x10af38(0x158)],_0x7de356=_0x12db1d['id'],_0x1df881={'memberId':(await this[_0x10af38(0x180)][_0x10af38(0x152)](_0x34d84d))[_0x10af38(0x13d)](),'unitId':_0x34d84d,'threadId':_0x3f03e0,'mention':_0x517c01,'content':_0x2bee84,'replyId':_0x7de356},_0x4e53a8=await this[_0x10af38(0x127)]['post'](_0x10af38(0x14c)+_0x34d84d+'/edit',{'body':_0x1df881});return!_0x4e53a8[_0x10af38(0x12e)][_0x10af38(0x16e)]||_0x4e53a8[_0x10af38(0x12e)]['error'][_0x10af38(0x15c)]===0x1;}async['resolveComment'](_0x995e69){const _0x256b11=_0x2b6fb4,{unitId:_0x331438}=_0x995e69,_0x18cd80=_0x995e69[_0x256b11(0x158)],_0x281321={'memberId':this[_0x256b11(0x147)][_0x256b11(0x134)]()[_0x256b11(0x124)],'unitId':_0x331438,'threadId':_0x18cd80,'solved':_0x995e69['resolved']?I[_0x256b11(0x130)]:I['OpenOrReOpen']},_0x5b1003=await this['_httpService'][_0x256b11(0x136)](_0x256b11(0x14c)+_0x331438+'/solved',{'body':_0x281321});return!_0x5b1003[_0x256b11(0x12e)]['error']||_0x5b1003['body'][_0x256b11(0x16e)][_0x256b11(0x15c)]===0x1;}async[_0x2b6fb4(0x12c)](_0x4c7ca3,_0x371e44,_0x40c80a,_0x359e34){const _0x1fc7c8=_0x2b6fb4,_0x1265e7={'memberId':(await this['_sessionService'][_0x1fc7c8(0x152)](_0x4c7ca3))[_0x1fc7c8(0x13d)](),'threadId':_0x40c80a,'replyId':_0x359e34,'unitId':_0x4c7ca3},_0x5404b8=await this[_0x1fc7c8(0x127)][_0x1fc7c8(0x136)](_0x1fc7c8(0x14c)+_0x4c7ca3+_0x1fc7c8(0x16d),{'body':_0x1265e7});return!_0x5404b8[_0x1fc7c8(0x12e)]['error']||_0x5404b8['body'][_0x1fc7c8(0x16e)][_0x1fc7c8(0x15c)]===0x1;}async[_0x2b6fb4(0x141)](_0x27f5bd,_0x2feb52,_0x3c8534){const _0x401929=_0x2b6fb4,_0x8ddbb7={'unitId':_0x27f5bd,'threadId':_0x3c8534},_0xe0564f=await this[_0x401929(0x127)][_0x401929(0x136)](_0x401929(0x14c)+_0x27f5bd+_0x401929(0x161),{'body':_0x8ddbb7}),_0x127391=_0x3c8534[_0x401929(0x15b)](_0x59f29e=>ee(_0xe0564f['body'][_0x401929(0x144)][_0x59f29e],_0x27f5bd,_0x2feb52))[_0x401929(0x157)](Boolean);return Object[_0x401929(0x13b)](_0xe0564f[_0x401929(0x12e)]['users'])['forEach'](_0x2a4cd0=>{this['_userService']['addUser'](_0x2a4cd0);}),_0x127391;}[_0x2b6fb4(0x11f)](_0xcb6815){return{'id':_0xcb6815['id'],'threadId':_0xcb6815['threadId'],'ref':_0xcb6815['ref']};}};f=Q([_(0x0,_0x999591(_0x50b333)),_(0x1,_0x999591(_0x45864e)),_(0x2,_0x999591(_0x4e39a0)),_(0x3,_0x999591(_0x5cd924))],f);var re=Object[_0x2b6fb4(0x140)],te=(_0x52c5be,_0x195f0d,_0x33dd49,_0x4705c1)=>{const _0x8848ae=_0x2b6fb4;for(var _0x202d6c=_0x4705c1>0x1?void 0x0:_0x4705c1?re(_0x195f0d,_0x33dd49):_0x195f0d,_0x42fc19=_0x52c5be[_0x8848ae(0x170)]-0x1,_0x3975e3;_0x42fc19>=0x0;_0x42fc19--)(_0x3975e3=_0x52c5be[_0x42fc19])&&(_0x202d6c=_0x3975e3(_0x202d6c)||_0x202d6c);return _0x202d6c;},N=(_0x195e78,_0x575e38)=>(_0x322760,_0x2e234b)=>_0x575e38(_0x322760,_0x2e234b,_0x195e78);let g=class extends _0x3d69cb{constructor(_0x3835fb,_0xa1fa6c){const _0x92d218=_0x2b6fb4;super(),this[_0x92d218(0x150)]=_0x3835fb,this[_0x92d218(0x133)]=_0xa1fa6c,this[_0x92d218(0x17a)]();}[_0x2b6fb4(0x17a)](){const _0x2b62fa=_0x2b6fb4;this[_0x2b62fa(0x150)][_0x2b62fa(0x17b)]=this[_0x2b62fa(0x133)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x139f27),N(0x1,_0x999591(f))],g);var se=Object[_0x2b6fb4(0x13c)],oe=Object[_0x2b6fb4(0x140)],ne=(_0x25a221,_0x1dc1ee,_0x3e636b)=>_0x1dc1ee in _0x25a221?se(_0x25a221,_0x1dc1ee,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3e636b}):_0x25a221[_0x1dc1ee]=_0x3e636b,ie=(_0x32ff04,_0x57a637,_0x1d3be5,_0xa8e580)=>{for(var _0x5a8626=_0xa8e580>0x1?void 0x0:_0xa8e580?oe(_0x57a637,_0x1d3be5):_0x57a637,_0x3d1268=_0x32ff04['length']-0x1,_0x32606b;_0x3d1268>=0x0;_0x3d1268--)(_0x32606b=_0x32ff04[_0x3d1268])&&(_0x5a8626=_0x32606b(_0x5a8626)||_0x5a8626);return _0x5a8626;},w=(_0x31c9cc,_0x94e05f)=>(_0x349c84,_0x3dc712)=>_0x94e05f(_0x349c84,_0x3dc712,_0x31c9cc),$=(_0x581b03,_0x390b4c,_0x116f13)=>ne(_0x581b03,typeof _0x390b4c!=_0x2b6fb4(0x13e)?_0x390b4c+'':_0x390b4c,_0x116f13);let b=class extends _0x8e71cc{constructor(_0x27f0fd=M,_0x34c54c,_0x5339a1){const _0x431779=_0x2b6fb4;super(),this[_0x431779(0x142)]=_0x27f0fd,this['_injector']=_0x34c54c,this[_0x431779(0x16f)]=_0x5339a1;const {..._0x41b26d}=_0x95a5cc({},M,this[_0x431779(0x142)]);this[_0x431779(0x16f)][_0x431779(0x11c)](z,_0x41b26d);}['onStarting'](){const _0x265766=_0x2b6fb4;[[f],[g],[S]][_0x265766(0x177)](_0x9256cb=>{const _0x184aa3=_0x265766;this[_0x184aa3(0x12a)]['add'](_0x9256cb);});}[_0x2b6fb4(0x171)](){const _0x1e510e=_0x2b6fb4;this[_0x1e510e(0x12a)][_0x1e510e(0x132)](g),this[_0x1e510e(0x12a)][_0x1e510e(0x132)](S);}};$(b,_0x2b6fb4(0x163),W),$(b,_0x2b6fb4(0x14d),_0x96876[_0x2b6fb4(0x123)]),b=ie([_0x4eebb(_0x128800,_0x24b712,_0x507f31),w(0x1,_0x999591(_0x5cd924)),w(0x2,_0x4a0a76)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0xef2ac3=_0x14bf;(function(_0x14f7d5,_0x673000){const _0x1e46e6=_0x14bf,_0x5a0836=_0x14f7d5();while(!![]){try{const _0x50a9de=parseInt(_0x1e46e6(0xf7))/0x1*(-parseInt(_0x1e46e6(0xd8))/0x2)+-parseInt(_0x1e46e6(0xa5))/0x3*(-parseInt(_0x1e46e6(0xfa))/0x4)+-parseInt(_0x1e46e6(0xff))/0x5*(-parseInt(_0x1e46e6(0xfd))/0x6)+-parseInt(_0x1e46e6(0xa6))/0x7*(parseInt(_0x1e46e6(0xdd))/0x8)+parseInt(_0x1e46e6(0x10b))/0x9*(-parseInt(_0x1e46e6(0xf4))/0xa)+-parseInt(_0x1e46e6(0xf6))/0xb*(parseInt(_0x1e46e6(0x109))/0xc)+-parseInt(_0x1e46e6(0xa9))/0xd*(-parseInt(_0x1e46e6(0xf5))/0xe);if(_0x50a9de===_0x673000)break;else _0x5a0836['push'](_0x5a0836['shift']());}catch(_0x1a17e7){_0x5a0836['push'](_0x5a0836['shift']());}}}(_0x7407,0x6a8dd));import{CommentService as _0x245f3b,CollaborationSessionService as _0x38ed50,UniverCollaborationClientPlugin as _0x35d9c6}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x157e4d}from'@univerjs-pro/license';import{dayjs as _0x5802de,UserManagerService as _0x45265e,Inject as _0xaac0e8,Injector as _0x20745a,Disposable as _0x3e49f1,CustomRangeType as _0x11800a,UniverInstanceType as _0x20fd11,DependentOn as _0xe266c6,IConfigService as _0xf1feab,Plugin as _0x2c8fc5,merge as _0x47eecf}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x33dd69}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x38c2e2,IThreadCommentDataSourceService as _0x334a2b}from'@univerjs/thread-comment';import{bufferTime as _0x279e3b}from'rxjs';import{HTTPService as _0x20b61d}from'@univerjs/network';const W=_0xef2ac3(0xcd);var I=(_0x61f09c=>(_0x61f09c[_0x61f09c[_0xef2ac3(0xaa)]=0x0]=_0xef2ac3(0xaa),_0x61f09c[_0x61f09c['Solved']=0x1]=_0xef2ac3(0xd0),_0x61f09c[_0x61f09c[_0xef2ac3(0xf8)]=-0x1]=_0xef2ac3(0xf8),_0x61f09c))(I||{}),v=(_0x489c32=>(_0x489c32[_0x489c32[_0xef2ac3(0xe5)]=0x0]=_0xef2ac3(0xe5),_0x489c32[_0x489c32[_0xef2ac3(0xfc)]=0x1]='Add',_0x489c32[_0x489c32[_0xef2ac3(0xa7)]=0x2]=_0xef2ac3(0xa7),_0x489c32[_0x489c32['Edit']=0x3]=_0xef2ac3(0xc7),_0x489c32[_0x489c32['Delete']=0x4]=_0xef2ac3(0xd2),_0x489c32[_0x489c32[_0xef2ac3(0xbf)]=0x5]='Solve',_0x489c32[_0x489c32[_0xef2ac3(0xf8)]=-0x1]='UNRECOGNIZED',_0x489c32))(v||{});function _0x14bf(_0x378c77,_0x537f7c){const _0x740784=_0x7407();return _0x14bf=function(_0x14bfd7,_0x46733d){_0x14bfd7=_0x14bfd7-0xa5;let _0x3fcb45=_0x740784[_0x14bfd7];return _0x3fcb45;},_0x14bf(_0x378c77,_0x537f7c);}const D=_0x5b3d53=>_0x5802de(new Date(+_0x5b3d53))[_0xef2ac3(0xd6)](_0xef2ac3(0xd1)),B=async(_0x2301ee,_0x4a61ea)=>{const _0x3cd868=_0xef2ac3,_0x8d7d88=_0x2301ee[_0x3cd868(0xba)](_0x45265e),_0x29cdf3=_0x2301ee[_0x3cd868(0xba)](_0x20b61d);_0x4a61ea['forEach'](_0x1f0264=>{const _0x76ab13=_0x3cd868;_0x8d7d88[_0x76ab13(0x104)](_0x1f0264)&&_0x4a61ea[_0x76ab13(0x10a)](_0x1f0264);}),_0x4a61ea[_0x3cd868(0xea)]&&(await _0x29cdf3['get'](_0x3cd868(0xbe),{'params':{'userIDs':[..._0x4a61ea]}}))[_0x3cd868(0xc3)][_0x3cd868(0xca)][_0x3cd868(0xd9)](_0x4f473b=>{const _0x466bd5=_0x3cd868;_0x4f473b&&_0x8d7d88[_0x466bd5(0xe7)](_0x4f473b);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x2d42a8,_0x46f336,_0x1b8431,_0xa367e2)=>{for(var _0x3b2c17=_0xa367e2>0x1?void 0x0:_0xa367e2?K(_0x46f336,_0x1b8431):_0x46f336,_0x194b73=_0x2d42a8['length']-0x1,_0x3bbbb5;_0x194b73>=0x0;_0x194b73--)(_0x3bbbb5=_0x2d42a8[_0x194b73])&&(_0x3b2c17=_0x3bbbb5(_0x3b2c17)||_0x3b2c17);return _0x3b2c17;},p=(_0x1cd65c,_0x232ee1)=>(_0x449967,_0x25b825)=>_0x232ee1(_0x449967,_0x25b825,_0x1cd65c);function _0x7407(){const _0x357070=['parse','userID','syncUpdateMutationToColla','getCurrentUser','getUser','replies','pluginName','_threadCommentDataSource','saveCommentToSnapshot','2348376PBGovc','delete','27kOWmQI','rangeType','getComment','/list','191946tlktrL','14uVLaeX','Reply','/universer-api/comment/unit/','15596945cNZSKq','OpenOrReOpen','_commentService','payload','_injector','createTimestamp','error','userId','_configService','personId','ref','find','addComment','/edit','customRanges','reply','resolved','get','getUnit','resolveComment','threadId','/universer-api/user/list','Solve','getMemberID','deleteComment','disposeWithMe','body','code','parentId','_initUserSync','Edit','defineProperty','unitId','users','rangeId','filter','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getOwnPropertyDescriptor','_threadCommentModel','Solved','YYYY/MM/DD\x20HH:mm','Delete','listComments','content','requireSession','format','_config','26374NqBYcr','forEach','/delete','COMMENT','length','3161792LnqBXq','_init','add','post','updateComment','/solved','user','replyId','Unknown','_userService','addUser','_threadCommentDataSourceService','subscribe','size','root','_httpService','comments','_initDataSource','/reply','map','_sessionService','thread-comment-data-source.config','/add','1925330ExTfOj','14jViaFV','33agDBHs','4raeWhP','UNRECOGNIZED','commentUpdate$','24IBJZlP','type','Add','5118pFIxRU','pipe','5045dySPzw'];_0x7407=function(){return _0x357070;};return _0x7407();}let S=class extends _0x3e49f1{constructor(_0x34681d,_0x32df14,_0x53183e,_0x175829){const _0x13ff75=_0xef2ac3;super(),this[_0x13ff75(0xab)]=_0x34681d,this['_threadCommentModel']=_0x32df14,this['_userService']=_0x53183e,this[_0x13ff75(0xad)]=_0x175829,this[_0x13ff75(0xde)](),this[_0x13ff75(0xc6)]();}[_0xef2ac3(0xc6)](){const _0x3ade16=_0xef2ac3;this[_0x3ade16(0xc2)](this[_0x3ade16(0xcf)][_0x3ade16(0xf9)][_0x3ade16(0xfe)](_0x279e3b(0x10))[_0x3ade16(0xe9)](_0x484049=>{const _0x1b7d1a=_0x3ade16,_0x35891a=new Set();_0x484049[_0x1b7d1a(0xd9)](_0xad9c2e=>{const _0x3e4e60=_0x1b7d1a;switch(_0xad9c2e[_0x3e4e60(0xfb)]){case'add':{const _0x2c424a=_0xad9c2e[_0x3e4e60(0xac)][_0x3e4e60(0xb2)];_0x35891a[_0x3e4e60(0xdf)](_0x2c424a);break;}}}),B(this['_injector'],_0x35891a);}));}['_init'](){const _0x43d943=_0xef2ac3;this[_0x43d943(0xc2)](this[_0x43d943(0xab)][_0x43d943(0xf9)][_0x43d943(0xe9)](async _0x5d4325=>{const _0x4c8f98=_0x43d943;var _0xa401a4,_0x5677e8,_0x5c250a,_0x4fe39d;const _0x1d7703=(_0xa401a4=this[_0x4c8f98(0xcf)][_0x4c8f98(0xbb)](_0x5d4325[_0x4c8f98(0xc9)])[_0x4c8f98(0xb4)](_0x3bee46=>_0x3bee46['threadId']===_0x5d4325[_0x4c8f98(0xbd)]))==null?void 0x0:_0xa401a4[_0x4c8f98(0xeb)];if(!_0x1d7703)return;const {unitId:_0x1d6b92,subUnitId:_0x297662}=_0x1d7703;switch(_0x5d4325[_0x4c8f98(0xe3)]&&this['_userService'][_0x4c8f98(0xe7)](_0x5d4325[_0x4c8f98(0xe3)]),_0x5d4325[_0x4c8f98(0xfb)]){case v['Add']:break;case v[_0x4c8f98(0xa7)]:{this['_threadCommentModel']['addComment'](_0x1d6b92,_0x297662,{'unitId':_0x1d6b92,'subUnitId':_0x297662,'ref':'','id':_0x5d4325[_0x4c8f98(0xe4)],'dT':D(+_0x5d4325[_0x4c8f98(0xae)]),'threadId':_0x5d4325[_0x4c8f98(0xbd)],'personId':(_0x5c250a=(_0x5677e8=_0x5d4325[_0x4c8f98(0xe3)])==null?void 0x0:_0x5677e8[_0x4c8f98(0x101)])!=null?_0x5c250a:_0x5d4325[_0x4c8f98(0xb0)],'text':JSON[_0x4c8f98(0x100)](_0x5d4325['content']),'parentId':_0x1d7703['id']});break;}case v['Delete']:{const _0x2c575b=this[_0x4c8f98(0xcf)][_0x4c8f98(0x10d)](_0x1d6b92,_0x297662,_0x5d4325['replyId']);_0x2c575b&&_0x2c575b[_0x4c8f98(0xc5)]&&this[_0x4c8f98(0xcf)][_0x4c8f98(0xc1)](_0x1d6b92,_0x297662,_0x5d4325[_0x4c8f98(0xe4)]);break;}case v[_0x4c8f98(0xc7)]:{this[_0x4c8f98(0xcf)][_0x4c8f98(0xe1)](_0x1d6b92,_0x297662,{'commentId':_0x5d4325[_0x4c8f98(0xe4)],'text':JSON['parse'](_0x5d4325['content'])});break;}case v[_0x4c8f98(0xbf)]:{const _0x325e6e=(_0x4fe39d=this[_0x4c8f98(0xcf)]['getUnit'](_0x5d4325[_0x4c8f98(0xc9)])['find'](_0x5e995f=>_0x5e995f['threadId']===_0x5d4325[_0x4c8f98(0xbd)]))==null?void 0x0:_0x4fe39d[_0x4c8f98(0xeb)];_0x325e6e&&this[_0x4c8f98(0xcf)][_0x4c8f98(0xbc)](_0x1d6b92,_0x297662,_0x325e6e['id'],_0x5d4325['solved']===I[_0x4c8f98(0xd0)]);break;}}}));}};S=V([p(0x0,_0xaac0e8(_0x245f3b)),p(0x1,_0xaac0e8(_0x38c2e2)),p(0x2,_0xaac0e8(_0x45265e)),p(0x3,_0xaac0e8(_0x20745a))],S);const z=_0xef2ac3(0xf2),M={};var k=Object[_0xef2ac3(0xce)],Q=(_0x4b00ca,_0x47edbb,_0x1fab8f,_0x2d8ce4)=>{for(var _0x17e4ac=_0x2d8ce4>0x1?void 0x0:_0x2d8ce4?k(_0x47edbb,_0x1fab8f):_0x47edbb,_0x4e8f41=_0x4b00ca['length']-0x1,_0x1eb821;_0x4e8f41>=0x0;_0x4e8f41--)(_0x1eb821=_0x4b00ca[_0x4e8f41])&&(_0x17e4ac=_0x1eb821(_0x17e4ac)||_0x17e4ac);return _0x17e4ac;},_=(_0x12fda2,_0x233132)=>(_0x51483e,_0x46c0c4)=>_0x233132(_0x51483e,_0x46c0c4,_0x12fda2);function X(_0x40afd3,_0xb542df){const _0x20d48f=_0xef2ac3,_0x41a08c=_0x40afd3[_0x20d48f(0x105)][0x0];return{..._0xb542df,'id':_0x41a08c[_0x20d48f(0xe4)],'resolved':_0x40afd3['solved']===0x1,'dT':D(_0x41a08c['createTimestamp']),'personId':_0x41a08c[_0x20d48f(0xb0)],'threadId':_0x41a08c['threadId']};}function ee(_0x48fc58,_0x43d309,_0x127dcd){const _0x353562=_0xef2ac3;var _0x5e396f,_0xf97301;if(((_0xf97301=(_0x5e396f=_0x48fc58==null?void 0x0:_0x48fc58['replies'])==null?void 0x0:_0x5e396f[_0x353562(0xdc)])!=null?_0xf97301:0x0)>0x0){const _0xe44c6d=(_0x3141ec,_0x4e0602)=>({'id':_0x3141ec['replyId'],'threadId':_0x3141ec[_0x353562(0xbd)],'dT':D(_0x3141ec['createTimestamp']),'personId':_0x3141ec['userId'],'resolved':_0x48fc58['solved']===I['Solved'],'unitId':_0x43d309,'subUnitId':_0x127dcd,'text':JSON[_0x353562(0x100)](_0x3141ec[_0x353562(0xd4)]),'parentId':_0x4e0602}),_0x2d895=_0xe44c6d(_0x48fc58['replies'][0x0]);return{..._0x2d895,'children':_0x48fc58['replies']['slice'](0x1)[_0x353562(0xf0)](_0x5b6cf8=>_0xe44c6d(_0x5b6cf8,_0x2d895['id']))};}return null;}let f=class{constructor(_0x5db0c5,_0x19d232,_0x10d091,_0x5423f7){const _0xb33276=_0xef2ac3;this[_0xb33276(0xec)]=_0x5db0c5,this[_0xb33276(0xe6)]=_0x19d232,this['_sessionService']=_0x10d091,this['_injector']=_0x5423f7;}async[_0xef2ac3(0xb5)](_0x442fcf){const _0x33f642=_0xef2ac3;var _0x1e1426,_0x4a9db3;const {parentId:_0x27b835,unitId:_0x5a79fb,text:_0x2bcf15,threadId:_0xdebc0d}=_0x442fcf,_0x1fbc83=(_0x4a9db3=(_0x1e1426=_0x2bcf15[_0x33f642(0xb7)])==null?void 0x0:_0x1e1426['filter'](_0x2d69cb=>_0x2d69cb[_0x33f642(0x10c)]===_0x11800a['COMMENT'])[_0x33f642(0xf0)](_0x13364a=>_0x13364a[_0x33f642(0xcb)]))!=null?_0x4a9db3:[],_0x28e7a1=JSON['stringify'](_0x2bcf15),_0x5bfb43=(await this[_0x33f642(0xf1)][_0x33f642(0xd5)](_0x5a79fb))['getMemberID']();if(_0x27b835){const _0x581b36={'memberId':_0x5bfb43,'unitId':_0x5a79fb,'content':_0x28e7a1,'mention':_0x1fbc83,'threadId':_0xdebc0d},_0x35d062=(await this[_0x33f642(0xec)][_0x33f642(0xe0)](_0x33f642(0xa8)+_0x5a79fb+_0x33f642(0xef),{'body':_0x581b36}))[_0x33f642(0xc3)][_0x33f642(0xb8)];return{..._0x442fcf,'id':_0x35d062[_0x33f642(0xe4)],'dT':_0x5802de(+_0x35d062['createTimestamp'])['format'](_0x33f642(0xd1)),'personId':_0x35d062[_0x33f642(0xb0)]};}else{const _0x3d29c0={'memberId':_0x5bfb43,'unitId':_0x5a79fb,'content':_0x28e7a1,'mention':_0x1fbc83},_0x2ad157=await this[_0x33f642(0xec)][_0x33f642(0xe0)](_0x33f642(0xa8)+_0x5a79fb+_0x33f642(0xf3),{'body':_0x3d29c0});return X(_0x2ad157[_0x33f642(0xc3)]['comment'],_0x442fcf);}}async['updateComment'](_0x3ca510){const _0x2651a3=_0xef2ac3;var _0x2ef7f7,_0x392b88;const {text:_0xb69a1c,unitId:_0x579c28}=_0x3ca510,_0x4d3b06=(_0x392b88=(_0x2ef7f7=_0xb69a1c['customRanges'])==null?void 0x0:_0x2ef7f7[_0x2651a3(0xcc)](_0x1ec50f=>_0x1ec50f[_0x2651a3(0x10c)]===_0x11800a[_0x2651a3(0xdb)])[_0x2651a3(0xf0)](_0x5e1c21=>_0x5e1c21[_0x2651a3(0xcb)]))!=null?_0x392b88:[],_0x5ede28=JSON['stringify'](_0xb69a1c),_0x3a56dd=_0x3ca510[_0x2651a3(0xbd)],_0x5d27ec=_0x3ca510['id'],_0x110ab6={'memberId':(await this[_0x2651a3(0xf1)][_0x2651a3(0xd5)](_0x579c28))[_0x2651a3(0xc0)](),'unitId':_0x579c28,'threadId':_0x3a56dd,'mention':_0x4d3b06,'content':_0x5ede28,'replyId':_0x5d27ec},_0x3817a0=await this[_0x2651a3(0xec)][_0x2651a3(0xe0)]('/universer-api/comment/unit/'+_0x579c28+_0x2651a3(0xb6),{'body':_0x110ab6});return!_0x3817a0[_0x2651a3(0xc3)]['error']||_0x3817a0[_0x2651a3(0xc3)][_0x2651a3(0xaf)][_0x2651a3(0xc4)]===0x1;}async[_0xef2ac3(0xbc)](_0x2d8be3){const _0x2bf397=_0xef2ac3,{unitId:_0xb07b31}=_0x2d8be3,_0x413f4a=_0x2d8be3[_0x2bf397(0xbd)],_0xba14bc={'memberId':this['_userService'][_0x2bf397(0x103)]()[_0x2bf397(0x101)],'unitId':_0xb07b31,'threadId':_0x413f4a,'solved':_0x2d8be3[_0x2bf397(0xb9)]?I[_0x2bf397(0xd0)]:I[_0x2bf397(0xaa)]},_0x511262=await this[_0x2bf397(0xec)][_0x2bf397(0xe0)](_0x2bf397(0xa8)+_0xb07b31+_0x2bf397(0xe2),{'body':_0xba14bc});return!_0x511262[_0x2bf397(0xc3)][_0x2bf397(0xaf)]||_0x511262[_0x2bf397(0xc3)][_0x2bf397(0xaf)][_0x2bf397(0xc4)]===0x1;}async['deleteComment'](_0x43197f,_0x381705,_0x55669a,_0x10ad64){const _0x1b7d07=_0xef2ac3,_0x2c8cd6={'memberId':(await this[_0x1b7d07(0xf1)][_0x1b7d07(0xd5)](_0x43197f))[_0x1b7d07(0xc0)](),'threadId':_0x55669a,'replyId':_0x10ad64,'unitId':_0x43197f},_0x46767d=await this[_0x1b7d07(0xec)]['post']('/universer-api/comment/unit/'+_0x43197f+_0x1b7d07(0xda),{'body':_0x2c8cd6});return!_0x46767d[_0x1b7d07(0xc3)]['error']||_0x46767d[_0x1b7d07(0xc3)][_0x1b7d07(0xaf)][_0x1b7d07(0xc4)]===0x1;}async[_0xef2ac3(0xd3)](_0x5e027e,_0x2c4d19,_0x598a33){const _0x31ec37=_0xef2ac3,_0x4a60db={'unitId':_0x5e027e,'threadId':_0x598a33},_0x5703e7=await this[_0x31ec37(0xec)][_0x31ec37(0xe0)](_0x31ec37(0xa8)+_0x5e027e+_0x31ec37(0x10e),{'body':_0x4a60db}),_0x17b0ee=_0x598a33[_0x31ec37(0xf0)](_0xa2b4e2=>ee(_0x5703e7[_0x31ec37(0xc3)][_0x31ec37(0xed)][_0xa2b4e2],_0x5e027e,_0x2c4d19))[_0x31ec37(0xcc)](Boolean);return Object['values'](_0x5703e7['body'][_0x31ec37(0xca)])[_0x31ec37(0xd9)](_0x11e39d=>{const _0x3495b4=_0x31ec37;this['_userService'][_0x3495b4(0xe7)](_0x11e39d);}),_0x17b0ee;}[_0xef2ac3(0x108)](_0x23d661){const _0x27a70d=_0xef2ac3;return{'id':_0x23d661['id'],'threadId':_0x23d661['threadId'],'ref':_0x23d661[_0x27a70d(0xb3)]};}};f=Q([_(0x0,_0xaac0e8(_0x20b61d)),_(0x1,_0xaac0e8(_0x45265e)),_(0x2,_0xaac0e8(_0x38ed50)),_(0x3,_0xaac0e8(_0x20745a))],f);var re=Object[_0xef2ac3(0xce)],te=(_0x1fa5ff,_0x310297,_0x557b8d,_0x10608e)=>{for(var _0x927c35=_0x10608e>0x1?void 0x0:_0x10608e?re(_0x310297,_0x557b8d):_0x310297,_0x28b27a=_0x1fa5ff['length']-0x1,_0x509d43;_0x28b27a>=0x0;_0x28b27a--)(_0x509d43=_0x1fa5ff[_0x28b27a])&&(_0x927c35=_0x509d43(_0x927c35)||_0x927c35);return _0x927c35;},N=(_0x2666c3,_0x5be33b)=>(_0x1150a2,_0x4d91de)=>_0x5be33b(_0x1150a2,_0x4d91de,_0x2666c3);let g=class extends _0x3e49f1{constructor(_0x4e790a,_0xbff171){const _0x4b1ced=_0xef2ac3;super(),this[_0x4b1ced(0xe8)]=_0x4e790a,this[_0x4b1ced(0x107)]=_0xbff171,this[_0x4b1ced(0xee)]();}[_0xef2ac3(0xee)](){const _0x3dc1ba=_0xef2ac3;this[_0x3dc1ba(0xe8)]['dataSource']=this[_0x3dc1ba(0x107)],this[_0x3dc1ba(0xe8)][_0x3dc1ba(0x102)]=!0x1;}};g=te([N(0x0,_0x334a2b),N(0x1,_0xaac0e8(f))],g);var se=Object[_0xef2ac3(0xc8)],oe=Object[_0xef2ac3(0xce)],ne=(_0x5487d2,_0x540370,_0x44f898)=>_0x540370 in _0x5487d2?se(_0x5487d2,_0x540370,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x44f898}):_0x5487d2[_0x540370]=_0x44f898,ie=(_0x57d0b9,_0x48c692,_0x3893d7,_0x2ceb52)=>{const _0x40c232=_0xef2ac3;for(var _0x5c3f9e=_0x2ceb52>0x1?void 0x0:_0x2ceb52?oe(_0x48c692,_0x3893d7):_0x48c692,_0x33596a=_0x57d0b9[_0x40c232(0xdc)]-0x1,_0x1e70ac;_0x33596a>=0x0;_0x33596a--)(_0x1e70ac=_0x57d0b9[_0x33596a])&&(_0x5c3f9e=_0x1e70ac(_0x5c3f9e)||_0x5c3f9e);return _0x5c3f9e;},w=(_0x48528d,_0x56d06e)=>(_0x260918,_0x2a7313)=>_0x56d06e(_0x260918,_0x2a7313,_0x48528d),$=(_0x2f1a0a,_0x305b57,_0x4fa42d)=>ne(_0x2f1a0a,typeof _0x305b57!='symbol'?_0x305b57+'':_0x305b57,_0x4fa42d);let b=class extends _0x2c8fc5{constructor(_0x5e6db6=M,_0x59f833,_0x5b921d){const _0x47fb5c=_0xef2ac3;super(),this[_0x47fb5c(0xd7)]=_0x5e6db6,this[_0x47fb5c(0xad)]=_0x59f833,this[_0x47fb5c(0xb1)]=_0x5b921d;const {..._0x3053b6}=_0x47eecf({},M,this[_0x47fb5c(0xd7)]);this[_0x47fb5c(0xb1)]['setConfig'](z,_0x3053b6);}['onStarting'](){const _0x2cbf17=_0xef2ac3;[[f],[g],[S]][_0x2cbf17(0xd9)](_0x4ee1e3=>{const _0x4eef37=_0x2cbf17;this[_0x4eef37(0xad)][_0x4eef37(0xdf)](_0x4ee1e3);});}['onReady'](){const _0x56ed42=_0xef2ac3;this[_0x56ed42(0xad)][_0x56ed42(0xba)](g),this['_injector'][_0x56ed42(0xba)](S);}};$(b,_0xef2ac3(0x106),W),$(b,_0xef2ac3(0xfb),_0x20fd11['UNIVER_UNKNOWN']),b=ie([_0xe266c6(_0x33dd69,_0x35d9c6,_0x157e4d),w(0x1,_0xaac0e8(_0x20745a)),w(0x2,_0xf1feab)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- (function(_0x9ba79f,_0x1d3614){const _0x331910=_0x3188,_0x305030=_0x9ba79f();while(!![]){try{const _0x5d69ae=-parseInt(_0x331910(0x19b))/0x1+-parseInt(_0x331910(0x178))/0x2*(parseInt(_0x331910(0x172))/0x3)+parseInt(_0x331910(0x15c))/0x4+parseInt(_0x331910(0x165))/0x5+parseInt(_0x331910(0x179))/0x6*(-parseInt(_0x331910(0x16f))/0x7)+parseInt(_0x331910(0x18d))/0x8+-parseInt(_0x331910(0x144))/0x9*(-parseInt(_0x331910(0x15e))/0xa);if(_0x5d69ae===_0x1d3614)break;else _0x305030['push'](_0x305030['shift']());}catch(_0x337966){_0x305030['push'](_0x305030['shift']());}}}(_0x2a52,0xb90a9),function(_0x2f0821,_0x5dd305){const _0x35f0c0=_0x3188;typeof exports==_0x35f0c0(0x13e)&&typeof module<'u'?_0x5dd305(exports,require(_0x35f0c0(0x14c)),require(_0x35f0c0(0x16e)),require(_0x35f0c0(0x17b)),require(_0x35f0c0(0x139)),require(_0x35f0c0(0x16b)),require(_0x35f0c0(0x18b)),require(_0x35f0c0(0x138))):typeof define==_0x35f0c0(0x19e)&&define['amd']?define([_0x35f0c0(0x15b),_0x35f0c0(0x14c),'@univerjs-pro/license',_0x35f0c0(0x17b),_0x35f0c0(0x139),_0x35f0c0(0x16b),'rxjs',_0x35f0c0(0x138)],_0x5dd305):(_0x2f0821=typeof globalThis<'u'?globalThis:_0x2f0821||self,_0x5dd305(_0x2f0821[_0x35f0c0(0x161)]={},_0x2f0821['UniverProCollaborationClient'],_0x2f0821['UniverProLicense'],_0x2f0821['UniverCore'],_0x2f0821[_0x35f0c0(0x18c)],_0x2f0821['UniverThreadComment'],_0x2f0821[_0x35f0c0(0x18b)],_0x2f0821[_0x35f0c0(0x13c)]));}(this,function(_0x3df0d1,_0x3ff5c1,_0x130a71,_0xd72f64,_0x23cb8a,_0x188a0d,_0x1f55c2,_0xd33d61){'use strict';const _0x520c95=_0x3188;const _0x1df966=_0x520c95(0x1b4);var _0x3c082c=(_0x48ed70=>(_0x48ed70[_0x48ed70['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x48ed70[_0x48ed70['Solved']=0x1]=_0x520c95(0x193),_0x48ed70[_0x48ed70['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x48ed70))(_0x3c082c||{}),_0x4d56f7=(_0xd59dc1=>(_0xd59dc1[_0xd59dc1['Unknown']=0x0]='Unknown',_0xd59dc1[_0xd59dc1[_0x520c95(0x155)]=0x1]=_0x520c95(0x155),_0xd59dc1[_0xd59dc1['Reply']=0x2]=_0x520c95(0x175),_0xd59dc1[_0xd59dc1[_0x520c95(0x14b)]=0x3]=_0x520c95(0x14b),_0xd59dc1[_0xd59dc1[_0x520c95(0x1a8)]=0x4]=_0x520c95(0x1a8),_0xd59dc1[_0xd59dc1[_0x520c95(0x1a7)]=0x5]=_0x520c95(0x1a7),_0xd59dc1[_0xd59dc1[_0x520c95(0x171)]=-0x1]='UNRECOGNIZED',_0xd59dc1))(_0x4d56f7||{});const _0x1d2042=_0x587337=>_0xd72f64[_0x520c95(0x151)](new Date(+_0x587337))['format'](_0x520c95(0x14a)),_0x459e9e=async(_0x3073c0,_0x5df78e)=>{const _0x2c99e9=_0x520c95,_0x5e70a9=_0x3073c0[_0x2c99e9(0x17e)](_0xd72f64['UserManagerService']),_0x25ad2d=_0x3073c0[_0x2c99e9(0x17e)](_0xd33d61[_0x2c99e9(0x17c)]);_0x5df78e[_0x2c99e9(0x195)](_0x18d457=>{const _0x27549d=_0x2c99e9;_0x5e70a9[_0x27549d(0x19f)](_0x18d457)&&_0x5df78e[_0x27549d(0x1b0)](_0x18d457);}),_0x5df78e[_0x2c99e9(0x14e)]&&(await _0x25ad2d[_0x2c99e9(0x17e)](_0x2c99e9(0x1ad),{'params':{'userIDs':[..._0x5df78e]}}))[_0x2c99e9(0x1a9)][_0x2c99e9(0x189)][_0x2c99e9(0x195)](_0x451533=>{const _0x50cd26=_0x2c99e9;_0x451533&&_0x5e70a9[_0x50cd26(0x168)](_0x451533);});};var _0x5ba424=Object[_0x520c95(0x1b8)],_0x307d60=(_0x3e6ac2,_0x8f6ef1,_0x5472c8,_0x4fcac7)=>{const _0xeff480=_0x520c95;for(var _0x23ff46=_0x4fcac7>0x1?void 0x0:_0x4fcac7?_0x5ba424(_0x8f6ef1,_0x5472c8):_0x8f6ef1,_0x4b10e5=_0x3e6ac2[_0xeff480(0x169)]-0x1,_0x20f319;_0x4b10e5>=0x0;_0x4b10e5--)(_0x20f319=_0x3e6ac2[_0x4b10e5])&&(_0x23ff46=_0x20f319(_0x23ff46)||_0x23ff46);return _0x23ff46;},_0x3da9cc=(_0x3e6bf5,_0x4d5b21)=>(_0x5068f3,_0x10997b)=>_0x4d5b21(_0x5068f3,_0x10997b,_0x3e6bf5);let _0xbbe383=class extends _0xd72f64['Disposable']{constructor(_0x9ab0e3,_0xbce21f,_0x96d446,_0x42e993){const _0x13f369=_0x520c95;super(),this[_0x13f369(0x1b3)]=_0x9ab0e3,this[_0x13f369(0x1a5)]=_0xbce21f,this[_0x13f369(0x1a2)]=_0x96d446,this[_0x13f369(0x1af)]=_0x42e993,this[_0x13f369(0x146)](),this['_initUserSync']();}[_0x520c95(0x181)](){const _0x4e2111=_0x520c95;this['disposeWithMe'](this[_0x4e2111(0x1a5)][_0x4e2111(0x1b6)][_0x4e2111(0x170)](_0x1f55c2['bufferTime'](0x10))[_0x4e2111(0x158)](_0x4ee7f9=>{const _0x2355b4=_0x4e2111,_0x1e85cd=new Set();_0x4ee7f9[_0x2355b4(0x195)](_0x4a9df9=>{const _0x4125ac=_0x2355b4;switch(_0x4a9df9[_0x4125ac(0x14d)]){case'add':{const _0x56e846=_0x4a9df9['payload']['personId'];_0x1e85cd[_0x4125ac(0x159)](_0x56e846);break;}}}),_0x459e9e(this['_injector'],_0x1e85cd);}));}[_0x520c95(0x146)](){const _0x29c9d3=_0x520c95;this[_0x29c9d3(0x148)](this[_0x29c9d3(0x1b3)][_0x29c9d3(0x1b6)]['subscribe'](async _0x3a1901=>{const _0x2057cd=_0x29c9d3;var _0x44d3c9,_0x25c8e7,_0x476390,_0x4c434f;const _0x291c13=(_0x44d3c9=this[_0x2057cd(0x1a5)][_0x2057cd(0x142)](_0x3a1901['unitId'])[_0x2057cd(0x13a)](_0x24b4db=>_0x24b4db[_0x2057cd(0x191)]===_0x3a1901[_0x2057cd(0x191)]))==null?void 0x0:_0x44d3c9[_0x2057cd(0x196)];if(!_0x291c13)return;const {unitId:_0x385dbb,subUnitId:_0x4d175}=_0x291c13;switch(_0x3a1901[_0x2057cd(0x17a)]&&this['_userService'][_0x2057cd(0x168)](_0x3a1901['user']),_0x3a1901['type']){case _0x4d56f7[_0x2057cd(0x155)]:break;case _0x4d56f7[_0x2057cd(0x175)]:{this['_threadCommentModel'][_0x2057cd(0x13f)](_0x385dbb,_0x4d175,{'unitId':_0x385dbb,'subUnitId':_0x4d175,'ref':'','id':_0x3a1901['replyId'],'dT':_0x1d2042(+_0x3a1901[_0x2057cd(0x1a6)]),'threadId':_0x3a1901[_0x2057cd(0x191)],'personId':(_0x476390=(_0x25c8e7=_0x3a1901[_0x2057cd(0x17a)])==null?void 0x0:_0x25c8e7[_0x2057cd(0x153)])!=null?_0x476390:_0x3a1901[_0x2057cd(0x180)],'text':JSON[_0x2057cd(0x1b2)](_0x3a1901[_0x2057cd(0x16d)]),'parentId':_0x291c13['id']});break;}case _0x4d56f7['Delete']:{const _0x305ef5=this[_0x2057cd(0x1a5)][_0x2057cd(0x185)](_0x385dbb,_0x4d175,_0x3a1901['replyId']);_0x305ef5&&_0x305ef5[_0x2057cd(0x1a3)]&&this['_threadCommentModel'][_0x2057cd(0x1aa)](_0x385dbb,_0x4d175,_0x3a1901['replyId']);break;}case _0x4d56f7[_0x2057cd(0x14b)]:{this[_0x2057cd(0x1a5)][_0x2057cd(0x192)](_0x385dbb,_0x4d175,{'commentId':_0x3a1901[_0x2057cd(0x173)],'text':JSON['parse'](_0x3a1901[_0x2057cd(0x16d)])});break;}case _0x4d56f7[_0x2057cd(0x1a7)]:{const _0x3468cf=(_0x4c434f=this[_0x2057cd(0x1a5)][_0x2057cd(0x142)](_0x3a1901[_0x2057cd(0x1b9)])[_0x2057cd(0x13a)](_0x2cf07b=>_0x2cf07b['threadId']===_0x3a1901[_0x2057cd(0x191)]))==null?void 0x0:_0x4c434f[_0x2057cd(0x196)];_0x3468cf&&this[_0x2057cd(0x1a5)][_0x2057cd(0x166)](_0x385dbb,_0x4d175,_0x3468cf['id'],_0x3a1901[_0x2057cd(0x183)]===_0x3c082c[_0x2057cd(0x193)]);break;}}}));}};_0xbbe383=_0x307d60([_0x3da9cc(0x0,_0xd72f64[_0x520c95(0x19c)](_0x3ff5c1[_0x520c95(0x194)])),_0x3da9cc(0x1,_0xd72f64[_0x520c95(0x19c)](_0x188a0d['ThreadCommentModel'])),_0x3da9cc(0x2,_0xd72f64[_0x520c95(0x19c)](_0xd72f64[_0x520c95(0x1ab)])),_0x3da9cc(0x3,_0xd72f64[_0x520c95(0x19c)](_0xd72f64['Injector']))],_0xbbe383);const _0x527561=_0x520c95(0x197),_0x5fad3b={};var _0x34bec4=Object['getOwnPropertyDescriptor'],_0x459670=(_0x314466,_0x4b2c3d,_0x55b3ca,_0x5cfb0f)=>{for(var _0x4dda74=_0x5cfb0f>0x1?void 0x0:_0x5cfb0f?_0x34bec4(_0x4b2c3d,_0x55b3ca):_0x4b2c3d,_0x35647e=_0x314466['length']-0x1,_0x3eb830;_0x35647e>=0x0;_0x35647e--)(_0x3eb830=_0x314466[_0x35647e])&&(_0x4dda74=_0x3eb830(_0x4dda74)||_0x4dda74);return _0x4dda74;},_0x3f29aa=(_0x41c806,_0x29fb7e)=>(_0x22a3cc,_0x23a908)=>_0x29fb7e(_0x22a3cc,_0x23a908,_0x41c806);function _0x44dde9(_0x3bf4d4,_0x4af614){const _0x1e484b=_0x520c95,_0x16eda7=_0x3bf4d4[_0x1e484b(0x1b7)][0x0];return{..._0x4af614,'id':_0x16eda7['replyId'],'resolved':_0x3bf4d4[_0x1e484b(0x183)]===0x1,'dT':_0x1d2042(_0x16eda7[_0x1e484b(0x1a6)]),'personId':_0x16eda7[_0x1e484b(0x180)],'threadId':_0x16eda7[_0x1e484b(0x191)]};}function _0x2e7f3e(_0x5b883f,_0x2135e0,_0x5b5063){const _0x41b691=_0x520c95;var _0x47caba,_0x56259a;if(((_0x56259a=(_0x47caba=_0x5b883f==null?void 0x0:_0x5b883f[_0x41b691(0x1b7)])==null?void 0x0:_0x47caba['length'])!=null?_0x56259a:0x0)>0x0){const _0xafe045=(_0x7da05,_0xf813ab)=>({'id':_0x7da05[_0x41b691(0x173)],'threadId':_0x7da05[_0x41b691(0x191)],'dT':_0x1d2042(_0x7da05[_0x41b691(0x1a6)]),'personId':_0x7da05[_0x41b691(0x180)],'resolved':_0x5b883f[_0x41b691(0x183)]===_0x3c082c[_0x41b691(0x193)],'unitId':_0x2135e0,'subUnitId':_0x5b5063,'text':JSON[_0x41b691(0x1b2)](_0x7da05[_0x41b691(0x16d)]),'parentId':_0xf813ab}),_0xd871ab=_0xafe045(_0x5b883f[_0x41b691(0x1b7)][0x0]);return{..._0xd871ab,'children':_0x5b883f[_0x41b691(0x1b7)]['slice'](0x1)[_0x41b691(0x1b5)](_0x3ce0d0=>_0xafe045(_0x3ce0d0,_0xd871ab['id']))};}return null;}let _0x3e9012=class{constructor(_0x4fc62c,_0x120a22,_0x5abf9b,_0x5c4a41){const _0x4a7829=_0x520c95;this[_0x4a7829(0x174)]=_0x4fc62c,this[_0x4a7829(0x1a2)]=_0x120a22,this[_0x4a7829(0x1ae)]=_0x5abf9b,this['_injector']=_0x5c4a41;}async['addComment'](_0x3e8f9e){const _0x4d2af3=_0x520c95;var _0x30f1db,_0x268476;const {parentId:_0xf52e64,unitId:_0x174594,text:_0x39629a,threadId:_0x1d88a3}=_0x3e8f9e,_0x3799f4=(_0x268476=(_0x30f1db=_0x39629a['customRanges'])==null?void 0x0:_0x30f1db[_0x4d2af3(0x13d)](_0x1c84d2=>_0x1c84d2[_0x4d2af3(0x167)]===_0xd72f64[_0x4d2af3(0x199)]['COMMENT'])[_0x4d2af3(0x1b5)](_0x373330=>_0x373330[_0x4d2af3(0x150)]))!=null?_0x268476:[],_0x587057=JSON[_0x4d2af3(0x15a)](_0x39629a),_0x20df04=(await this[_0x4d2af3(0x1ae)][_0x4d2af3(0x162)](_0x174594))['getMemberID']();if(_0xf52e64){const _0x3f891d={'memberId':_0x20df04,'unitId':_0x174594,'content':_0x587057,'mention':_0x3799f4,'threadId':_0x1d88a3},_0xf44b97=(await this[_0x4d2af3(0x174)][_0x4d2af3(0x147)]('/universer-api/comment/unit/'+_0x174594+_0x4d2af3(0x145),{'body':_0x3f891d}))[_0x4d2af3(0x1a9)][_0x4d2af3(0x16c)];return{..._0x3e8f9e,'id':_0xf44b97[_0x4d2af3(0x173)],'dT':_0xd72f64[_0x4d2af3(0x151)](+_0xf44b97['createTimestamp'])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0xf44b97[_0x4d2af3(0x180)]};}else{const _0x38fedc={'memberId':_0x20df04,'unitId':_0x174594,'content':_0x587057,'mention':_0x3799f4},_0x87834a=await this[_0x4d2af3(0x174)]['post'](_0x4d2af3(0x188)+_0x174594+_0x4d2af3(0x160),{'body':_0x38fedc});return _0x44dde9(_0x87834a[_0x4d2af3(0x1a9)]['comment'],_0x3e8f9e);}}async['updateComment'](_0x2c9522){const _0x3c791a=_0x520c95;var _0x15c426,_0x11014e;const {text:_0x195678,unitId:_0x21abf9}=_0x2c9522,_0x157325=(_0x11014e=(_0x15c426=_0x195678['customRanges'])==null?void 0x0:_0x15c426[_0x3c791a(0x13d)](_0x10f9c9=>_0x10f9c9[_0x3c791a(0x167)]===_0xd72f64['CustomRangeType'][_0x3c791a(0x154)])[_0x3c791a(0x1b5)](_0x3d0f6d=>_0x3d0f6d[_0x3c791a(0x150)]))!=null?_0x11014e:[],_0x2593f9=JSON[_0x3c791a(0x15a)](_0x195678),_0x54cde6=_0x2c9522[_0x3c791a(0x191)],_0x343c1d=_0x2c9522['id'],_0x48f0d7={'memberId':(await this['_sessionService'][_0x3c791a(0x162)](_0x21abf9))[_0x3c791a(0x19d)](),'unitId':_0x21abf9,'threadId':_0x54cde6,'mention':_0x157325,'content':_0x2593f9,'replyId':_0x343c1d},_0x56407d=await this[_0x3c791a(0x174)][_0x3c791a(0x147)]('/universer-api/comment/unit/'+_0x21abf9+'/edit',{'body':_0x48f0d7});return!_0x56407d[_0x3c791a(0x1a9)]['error']||_0x56407d[_0x3c791a(0x1a9)][_0x3c791a(0x19a)]['code']===0x1;}async[_0x520c95(0x166)](_0x1deac3){const _0x22da61=_0x520c95,{unitId:_0xaf1c82}=_0x1deac3,_0x4eade5=_0x1deac3[_0x22da61(0x191)],_0x47e2fa={'memberId':this[_0x22da61(0x1a2)][_0x22da61(0x163)]()[_0x22da61(0x153)],'unitId':_0xaf1c82,'threadId':_0x4eade5,'solved':_0x1deac3['resolved']?_0x3c082c[_0x22da61(0x193)]:_0x3c082c[_0x22da61(0x1b1)]},_0x4b9082=await this[_0x22da61(0x174)]['post'](_0x22da61(0x188)+_0xaf1c82+_0x22da61(0x1ac),{'body':_0x47e2fa});return!_0x4b9082[_0x22da61(0x1a9)][_0x22da61(0x19a)]||_0x4b9082['body'][_0x22da61(0x19a)][_0x22da61(0x149)]===0x1;}async[_0x520c95(0x1aa)](_0x456baf,_0x22ed06,_0x160169,_0x1889f7){const _0x5d20ef=_0x520c95,_0x181a35={'memberId':(await this[_0x5d20ef(0x1ae)][_0x5d20ef(0x162)](_0x456baf))[_0x5d20ef(0x19d)](),'threadId':_0x160169,'replyId':_0x1889f7,'unitId':_0x456baf},_0x3c5964=await this[_0x5d20ef(0x174)][_0x5d20ef(0x147)](_0x5d20ef(0x188)+_0x456baf+_0x5d20ef(0x17f),{'body':_0x181a35});return!_0x3c5964[_0x5d20ef(0x1a9)][_0x5d20ef(0x19a)]||_0x3c5964['body'][_0x5d20ef(0x19a)]['code']===0x1;}async['listComments'](_0x207981,_0x9b1d21,_0x57a582){const _0x3186d6=_0x520c95,_0x12574f={'unitId':_0x207981,'threadId':_0x57a582},_0x5556ba=await this[_0x3186d6(0x174)][_0x3186d6(0x147)](_0x3186d6(0x188)+_0x207981+'/list',{'body':_0x12574f}),_0xedd9d9=_0x57a582[_0x3186d6(0x1b5)](_0x51c5ea=>_0x2e7f3e(_0x5556ba[_0x3186d6(0x1a9)][_0x3186d6(0x1a0)][_0x51c5ea],_0x207981,_0x9b1d21))[_0x3186d6(0x13d)](Boolean);return Object[_0x3186d6(0x143)](_0x5556ba[_0x3186d6(0x1a9)]['users'])['forEach'](_0xfb3c64=>{const _0x42d884=_0x3186d6;this[_0x42d884(0x1a2)][_0x42d884(0x168)](_0xfb3c64);}),_0xedd9d9;}[_0x520c95(0x18e)](_0x475f8c){const _0x27bdd7=_0x520c95;return{'id':_0x475f8c['id'],'threadId':_0x475f8c[_0x27bdd7(0x191)],'ref':_0x475f8c[_0x27bdd7(0x184)]};}};_0x3e9012=_0x459670([_0x3f29aa(0x0,_0xd72f64[_0x520c95(0x19c)](_0xd33d61[_0x520c95(0x17c)])),_0x3f29aa(0x1,_0xd72f64[_0x520c95(0x19c)](_0xd72f64[_0x520c95(0x1ab)])),_0x3f29aa(0x2,_0xd72f64[_0x520c95(0x19c)](_0x3ff5c1[_0x520c95(0x152)])),_0x3f29aa(0x3,_0xd72f64[_0x520c95(0x19c)](_0xd72f64[_0x520c95(0x176)]))],_0x3e9012);var _0x7d2986=Object[_0x520c95(0x1b8)],_0x2250e0=(_0x5da902,_0x2078bb,_0x30c80e,_0x1f3f55)=>{const _0x3f2890=_0x520c95;for(var _0x16f923=_0x1f3f55>0x1?void 0x0:_0x1f3f55?_0x7d2986(_0x2078bb,_0x30c80e):_0x2078bb,_0x5edf31=_0x5da902[_0x3f2890(0x169)]-0x1,_0x198ceb;_0x5edf31>=0x0;_0x5edf31--)(_0x198ceb=_0x5da902[_0x5edf31])&&(_0x16f923=_0x198ceb(_0x16f923)||_0x16f923);return _0x16f923;},_0xf70da9=(_0x4ada0a,_0xccdc4)=>(_0x44999d,_0x32803f)=>_0xccdc4(_0x44999d,_0x32803f,_0x4ada0a);let _0x6ce052=class extends _0xd72f64[_0x520c95(0x190)]{constructor(_0x58292f,_0x5a298a){const _0x384e41=_0x520c95;super(),this[_0x384e41(0x13b)]=_0x58292f,this['_threadCommentDataSource']=_0x5a298a,this[_0x384e41(0x14f)]();}[_0x520c95(0x14f)](){const _0x1914a8=_0x520c95;this[_0x1914a8(0x13b)][_0x1914a8(0x18a)]=this[_0x1914a8(0x187)],this['_threadCommentDataSourceService'][_0x1914a8(0x17d)]=!0x1;}};_0x6ce052=_0x2250e0([_0xf70da9(0x0,_0x188a0d['IThreadCommentDataSourceService']),_0xf70da9(0x1,_0xd72f64[_0x520c95(0x19c)](_0x3e9012))],_0x6ce052);var _0x5159e4=Object['defineProperty'],_0x2153fa=Object[_0x520c95(0x1b8)],_0x37752a=(_0x4c290b,_0x4d97bc,_0x39a463)=>_0x4d97bc in _0x4c290b?_0x5159e4(_0x4c290b,_0x4d97bc,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x39a463}):_0x4c290b[_0x4d97bc]=_0x39a463,_0x42de05=(_0x23125c,_0x2e02a6,_0x5e01df,_0x3ed078)=>{const _0x59267c=_0x520c95;for(var _0x2698a9=_0x3ed078>0x1?void 0x0:_0x3ed078?_0x2153fa(_0x2e02a6,_0x5e01df):_0x2e02a6,_0x29d6f2=_0x23125c[_0x59267c(0x169)]-0x1,_0x40fd2a;_0x29d6f2>=0x0;_0x29d6f2--)(_0x40fd2a=_0x23125c[_0x29d6f2])&&(_0x2698a9=_0x40fd2a(_0x2698a9)||_0x2698a9);return _0x2698a9;},_0x2ec69f=(_0x4b7307,_0x50e42f)=>(_0x54f499,_0x5e0b0d)=>_0x50e42f(_0x54f499,_0x5e0b0d,_0x4b7307),_0x240462=(_0x217a77,_0xc0b02c,_0x36742e)=>_0x37752a(_0x217a77,typeof _0xc0b02c!=_0x520c95(0x182)?_0xc0b02c+'':_0xc0b02c,_0x36742e);_0x3df0d1[_0x520c95(0x198)]=class extends _0xd72f64[_0x520c95(0x164)]{constructor(_0x40c8ff=_0x5fad3b,_0x696931,_0x5074e0){const _0x28f7c0=_0x520c95;super(),this['_config']=_0x40c8ff,this[_0x28f7c0(0x1af)]=_0x696931,this[_0x28f7c0(0x15f)]=_0x5074e0;const {..._0x4ad040}=_0xd72f64[_0x28f7c0(0x140)]({},_0x5fad3b,this[_0x28f7c0(0x16a)]);this[_0x28f7c0(0x15f)][_0x28f7c0(0x156)](_0x527561,_0x4ad040);}[_0x520c95(0x15d)](){const _0x313fba=_0x520c95;[[_0x3e9012],[_0x6ce052],[_0xbbe383]][_0x313fba(0x195)](_0x207c43=>{const _0x48c022=_0x313fba;this[_0x48c022(0x1af)][_0x48c022(0x159)](_0x207c43);});}[_0x520c95(0x177)](){const _0x1177dd=_0x520c95;this[_0x1177dd(0x1af)][_0x1177dd(0x17e)](_0x6ce052),this[_0x1177dd(0x1af)]['get'](_0xbbe383);}},_0x240462(_0x3df0d1[_0x520c95(0x198)],_0x520c95(0x186),_0x1df966),_0x240462(_0x3df0d1[_0x520c95(0x198)],_0x520c95(0x14d),_0xd72f64[_0x520c95(0x141)][_0x520c95(0x1a4)]),_0x3df0d1['UniverThreadCommentDataSourcePlugin']=_0x42de05([_0xd72f64[_0x520c95(0x18f)](_0x23cb8a['UniverThreadCommentUIPlugin'],_0x3ff5c1['UniverCollaborationClientPlugin'],_0x130a71['UniverLicensePlugin']),_0x2ec69f(0x1,_0xd72f64[_0x520c95(0x19c)](_0xd72f64['Injector'])),_0x2ec69f(0x2,_0xd72f64[_0x520c95(0x157)])],_0x3df0d1[_0x520c95(0x198)]),Object[_0x520c95(0x1a1)](_0x3df0d1,Symbol['toStringTag'],{'value':'Module'});}));function _0x3188(_0xfcdee3,_0x2b560e){const _0x2a52f1=_0x2a52();return _0x3188=function(_0x3188c5,_0x1d8e24){_0x3188c5=_0x3188c5-0x138;let _0x443ee4=_0x2a52f1[_0x3188c5];return _0x443ee4;},_0x3188(_0xfcdee3,_0x2b560e);}function _0x2a52(){const _0x16399c=['exports','613444wzUhAn','onStarting','20390torded','_configService','/add','UniverProThreadCommentDatasource','requireSession','getCurrentUser','Plugin','4455665CvAYEE','resolveComment','rangeType','addUser','length','_config','@univerjs/thread-comment','reply','content','@univerjs-pro/license','165207BzLFXY','pipe','UNRECOGNIZED','33bjenlf','replyId','_httpService','Reply','Injector','onReady','59118TJcCEf','126vBikii','user','@univerjs/core','HTTPService','syncUpdateMutationToColla','get','/delete','userId','_initUserSync','symbol','solved','ref','getComment','pluginName','_threadCommentDataSource','/universer-api/comment/unit/','users','dataSource','rxjs','UniverThreadCommentUi','11198288wQRUxZ','saveCommentToSnapshot','DependentOn','Disposable','threadId','updateComment','Solved','CommentService','forEach','root','thread-comment-data-source.config','UniverThreadCommentDataSourcePlugin','CustomRangeType','error','1322317OgWvQJ','Inject','getMemberID','function','getUser','comments','defineProperty','_userService','parentId','UNIVER_UNKNOWN','_threadCommentModel','createTimestamp','Solve','Delete','body','deleteComment','UserManagerService','/solved','/universer-api/user/list','_sessionService','_injector','delete','OpenOrReOpen','parse','_commentService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','map','commentUpdate$','replies','getOwnPropertyDescriptor','unitId','@univerjs/network','@univerjs/thread-comment-ui','find','_threadCommentDataSourceService','UniverNetwork','filter','object','addComment','merge','UniverInstanceType','getUnit','values','2016nXvkEW','/reply','_init','post','disposeWithMe','code','YYYY/MM/DD\x20HH:mm','Edit','@univerjs-pro/collaboration-client','type','size','_initDataSource','rangeId','dayjs','CollaborationSessionService','userID','COMMENT','Add','setConfig','IConfigService','subscribe','add','stringify'];_0x2a52=function(){return _0x16399c;};return _0x2a52();}
1
+ function _0x45b4(_0x42545b,_0x3caf63){const _0x4db7b5=_0x4db7();return _0x45b4=function(_0x45b4ac,_0x157b84){_0x45b4ac=_0x45b4ac-0x1e5;let _0x2ecf37=_0x4db7b5[_0x45b4ac];return _0x2ecf37;},_0x45b4(_0x42545b,_0x3caf63);}function _0x4db7(){const _0x4616b7=['Solved','297nloNRj','DependentOn','getUser','unitId','addUser','UNIVER_UNKNOWN','solved','COMMENT','747984yTrbAB','OpenOrReOpen','customRanges','exports','Plugin','setConfig','UniverCollaborationClientPlugin','/delete','updateComment','UniverProThreadCommentDatasource','YYYY/MM/DD\x20HH:mm','UNRECOGNIZED','rangeType','parse','@univerjs-pro/license','_threadCommentModel','threadId','pipe','body','replies','Edit','_threadCommentDataSourceService','commentUpdate$','saveCommentToSnapshot','/add','userID','resolveComment','addComment','error','/universer-api/user/list','/solved','_userService','comment','Unknown','code','forEach','rxjs','UniverThreadCommentUi','personId','UniverNetwork','find','HTTPService','dataSource','5lXjUVX','get','_sessionService','Add','subscribe','getCurrentUser','getComment','size','type','thread-comment-data-source.config','deleteComment','_injector','1291903urByfM','Module','onStarting','defineProperty','users','stringify','_threadCommentDataSource','_initUserSync','UniverProLicense','@univerjs/thread-comment-ui','_commentService','filter','getOwnPropertyDescriptor','object','UniverThreadCommentDataSourcePlugin','UniverInstanceType','11349180wapMYv','replyId','@univerjs-pro/collaboration-client','Disposable','_config','ref','resolved','Inject','pluginName','disposeWithMe','CommentService','Solve','payload','108600GgKImb','function','Reply','userId','requireSession','UniverProCollaborationClient','map','delete','891hrLLWR','_configService','format','ThreadCommentModel','6092442AokcGD','_initDataSource','reply','_httpService','onReady','UniverCore','/universer-api/comment/unit/','Delete','user','getUnit','parentId','createTimestamp','_init','post','@univerjs/network','1392774JSSsYI','length','2EHvcqB','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','toStringTag','add','amd','7nHgjsU','getMemberID','UserManagerService','root','IThreadCommentDataSourceService','content','comments','25644EyATSz','listComments','@univerjs/core','merge','dayjs','Injector'];_0x4db7=function(){return _0x4616b7;};return _0x4db7();}(function(_0x40a60d,_0x384517){const _0x30c3f6=_0x45b4,_0x3dac12=_0x40a60d();while(!![]){try{const _0x52a5ff=-parseInt(_0x30c3f6(0x1ee))/0x1*(parseInt(_0x30c3f6(0x228))/0x2)+parseInt(_0x30c3f6(0x23b))/0x3*(parseInt(_0x30c3f6(0x234))/0x4)+-parseInt(_0x30c3f6(0x26e))/0x5*(-parseInt(_0x30c3f6(0x226))/0x6)+-parseInt(_0x30c3f6(0x22d))/0x7*(-parseInt(_0x30c3f6(0x243))/0x8)+parseInt(_0x30c3f6(0x217))/0x9+parseInt(_0x30c3f6(0x1fe))/0xa+parseInt(_0x30c3f6(0x213))/0xb*(-parseInt(_0x30c3f6(0x20b))/0xc);if(_0x52a5ff===_0x384517)break;else _0x3dac12['push'](_0x3dac12['shift']());}catch(_0x2371f0){_0x3dac12['push'](_0x3dac12['shift']());}}}(_0x4db7,0xb66d3),function(_0x2e37e0,_0x124c20){const _0x41ea3b=_0x45b4;typeof exports==_0x41ea3b(0x1fb)&&typeof module<'u'?_0x124c20(exports,require('@univerjs-pro/collaboration-client'),require(_0x41ea3b(0x251)),require(_0x41ea3b(0x236)),require(_0x41ea3b(0x1f7)),require('@univerjs/thread-comment'),require(_0x41ea3b(0x267)),require(_0x41ea3b(0x225))):typeof define==_0x41ea3b(0x20c)&&define[_0x41ea3b(0x22c)]?define([_0x41ea3b(0x246),_0x41ea3b(0x200),_0x41ea3b(0x251),_0x41ea3b(0x236),_0x41ea3b(0x1f7),'@univerjs/thread-comment',_0x41ea3b(0x267),_0x41ea3b(0x225)],_0x124c20):(_0x2e37e0=typeof globalThis<'u'?globalThis:_0x2e37e0||self,_0x124c20(_0x2e37e0[_0x41ea3b(0x24c)]={},_0x2e37e0[_0x41ea3b(0x210)],_0x2e37e0[_0x41ea3b(0x1f6)],_0x2e37e0[_0x41ea3b(0x21c)],_0x2e37e0[_0x41ea3b(0x268)],_0x2e37e0['UniverThreadComment'],_0x2e37e0['rxjs'],_0x2e37e0[_0x41ea3b(0x26a)]));}(this,function(_0x483f35,_0x22f43d,_0x22ad29,_0x30e2b8,_0x1c69cc,_0x30c642,_0x5bf552,_0x546ee6){'use strict';const _0x11225e=_0x45b4;const _0x9c1ce5=_0x11225e(0x229);var _0x319730=(_0xb67e98=>(_0xb67e98[_0xb67e98[_0x11225e(0x244)]=0x0]=_0x11225e(0x244),_0xb67e98[_0xb67e98[_0x11225e(0x23a)]=0x1]=_0x11225e(0x23a),_0xb67e98[_0xb67e98[_0x11225e(0x24e)]=-0x1]='UNRECOGNIZED',_0xb67e98))(_0x319730||{}),_0x55acbe=(_0x3334ca=>(_0x3334ca[_0x3334ca['Unknown']=0x0]=_0x11225e(0x264),_0x3334ca[_0x3334ca[_0x11225e(0x1e5)]=0x1]=_0x11225e(0x1e5),_0x3334ca[_0x3334ca[_0x11225e(0x20d)]=0x2]='Reply',_0x3334ca[_0x3334ca[_0x11225e(0x257)]=0x3]=_0x11225e(0x257),_0x3334ca[_0x3334ca[_0x11225e(0x21e)]=0x4]=_0x11225e(0x21e),_0x3334ca[_0x3334ca[_0x11225e(0x209)]=0x5]=_0x11225e(0x209),_0x3334ca[_0x3334ca[_0x11225e(0x24e)]=-0x1]=_0x11225e(0x24e),_0x3334ca))(_0x55acbe||{});const _0x3e49d9=_0x3b77e7=>_0x30e2b8['dayjs'](new Date(+_0x3b77e7))['format']('YYYY/MM/DD\x20HH:mm'),_0x3132c4=async(_0x32a2d1,_0x5bbb1f)=>{const _0x5bfe73=_0x11225e,_0x5d7817=_0x32a2d1[_0x5bfe73(0x26f)](_0x30e2b8[_0x5bfe73(0x22f)]),_0x9c8a0b=_0x32a2d1['get'](_0x546ee6[_0x5bfe73(0x26c)]);_0x5bbb1f[_0x5bfe73(0x266)](_0x658e08=>{const _0x131060=_0x5bfe73;_0x5d7817[_0x131060(0x23d)](_0x658e08)&&_0x5bbb1f[_0x131060(0x212)](_0x658e08);}),_0x5bbb1f[_0x5bfe73(0x1e9)]&&(await _0x9c8a0b['get'](_0x5bfe73(0x260),{'params':{'userIDs':[..._0x5bbb1f]}}))['body'][_0x5bfe73(0x1f2)][_0x5bfe73(0x266)](_0x41f336=>{const _0xd3866d=_0x5bfe73;_0x41f336&&_0x5d7817[_0xd3866d(0x23f)](_0x41f336);});};var _0x58bcd3=Object[_0x11225e(0x1fa)],_0x3e5c80=(_0x4f2c4d,_0x2cae86,_0x16856c,_0x47e4cc)=>{for(var _0x30ada8=_0x47e4cc>0x1?void 0x0:_0x47e4cc?_0x58bcd3(_0x2cae86,_0x16856c):_0x2cae86,_0x15ba25=_0x4f2c4d['length']-0x1,_0x2bd494;_0x15ba25>=0x0;_0x15ba25--)(_0x2bd494=_0x4f2c4d[_0x15ba25])&&(_0x30ada8=_0x2bd494(_0x30ada8)||_0x30ada8);return _0x30ada8;},_0x54c65b=(_0x2db8f8,_0x48aee3)=>(_0x113a8a,_0x12085e)=>_0x48aee3(_0x113a8a,_0x12085e,_0x2db8f8);let _0x544f61=class extends _0x30e2b8[_0x11225e(0x201)]{constructor(_0x2175d4,_0x1cdf75,_0x283a22,_0x3bb43b){const _0x14ccc3=_0x11225e;super(),this[_0x14ccc3(0x1f8)]=_0x2175d4,this[_0x14ccc3(0x252)]=_0x1cdf75,this[_0x14ccc3(0x262)]=_0x283a22,this['_injector']=_0x3bb43b,this[_0x14ccc3(0x223)](),this[_0x14ccc3(0x1f5)]();}['_initUserSync'](){const _0x5ea876=_0x11225e;this[_0x5ea876(0x207)](this[_0x5ea876(0x252)][_0x5ea876(0x259)][_0x5ea876(0x254)](_0x5bf552['bufferTime'](0x10))[_0x5ea876(0x1e6)](_0x15a60e=>{const _0x4af589=_0x5ea876,_0x5cae82=new Set();_0x15a60e['forEach'](_0x4fa0b3=>{const _0x2e4bf3=_0x45b4;switch(_0x4fa0b3[_0x2e4bf3(0x1ea)]){case'add':{const _0x193d2e=_0x4fa0b3[_0x2e4bf3(0x20a)][_0x2e4bf3(0x269)];_0x5cae82[_0x2e4bf3(0x22b)](_0x193d2e);break;}}}),_0x3132c4(this[_0x4af589(0x1ed)],_0x5cae82);}));}[_0x11225e(0x223)](){const _0x110566=_0x11225e;this[_0x110566(0x207)](this['_commentService'][_0x110566(0x259)]['subscribe'](async _0xf6214a=>{const _0x345125=_0x110566;var _0x116078,_0x5bb71b,_0x477019,_0x5c9d2a;const _0x248bfe=(_0x116078=this[_0x345125(0x252)][_0x345125(0x220)](_0xf6214a[_0x345125(0x23e)])[_0x345125(0x26b)](_0x3fc115=>_0x3fc115[_0x345125(0x253)]===_0xf6214a[_0x345125(0x253)]))==null?void 0x0:_0x116078[_0x345125(0x230)];if(!_0x248bfe)return;const {unitId:_0x32d68e,subUnitId:_0x477391}=_0x248bfe;switch(_0xf6214a[_0x345125(0x21f)]&&this[_0x345125(0x262)][_0x345125(0x23f)](_0xf6214a[_0x345125(0x21f)]),_0xf6214a[_0x345125(0x1ea)]){case _0x55acbe[_0x345125(0x1e5)]:break;case _0x55acbe['Reply']:{this[_0x345125(0x252)][_0x345125(0x25e)](_0x32d68e,_0x477391,{'unitId':_0x32d68e,'subUnitId':_0x477391,'ref':'','id':_0xf6214a['replyId'],'dT':_0x3e49d9(+_0xf6214a['createTimestamp']),'threadId':_0xf6214a[_0x345125(0x253)],'personId':(_0x477019=(_0x5bb71b=_0xf6214a['user'])==null?void 0x0:_0x5bb71b[_0x345125(0x25c)])!=null?_0x477019:_0xf6214a['userId'],'text':JSON[_0x345125(0x250)](_0xf6214a[_0x345125(0x232)]),'parentId':_0x248bfe['id']});break;}case _0x55acbe[_0x345125(0x21e)]:{const _0x2a1ee1=this['_threadCommentModel'][_0x345125(0x1e8)](_0x32d68e,_0x477391,_0xf6214a['replyId']);_0x2a1ee1&&_0x2a1ee1[_0x345125(0x221)]&&this[_0x345125(0x252)][_0x345125(0x1ec)](_0x32d68e,_0x477391,_0xf6214a[_0x345125(0x1ff)]);break;}case _0x55acbe['Edit']:{this['_threadCommentModel'][_0x345125(0x24b)](_0x32d68e,_0x477391,{'commentId':_0xf6214a[_0x345125(0x1ff)],'text':JSON[_0x345125(0x250)](_0xf6214a[_0x345125(0x232)])});break;}case _0x55acbe[_0x345125(0x209)]:{const _0x11904f=(_0x5c9d2a=this[_0x345125(0x252)]['getUnit'](_0xf6214a[_0x345125(0x23e)])['find'](_0x2b445d=>_0x2b445d[_0x345125(0x253)]===_0xf6214a[_0x345125(0x253)]))==null?void 0x0:_0x5c9d2a['root'];_0x11904f&&this[_0x345125(0x252)]['resolveComment'](_0x32d68e,_0x477391,_0x11904f['id'],_0xf6214a[_0x345125(0x241)]===_0x319730['Solved']);break;}}}));}};_0x544f61=_0x3e5c80([_0x54c65b(0x0,_0x30e2b8[_0x11225e(0x205)](_0x22f43d[_0x11225e(0x208)])),_0x54c65b(0x1,_0x30e2b8['Inject'](_0x30c642[_0x11225e(0x216)])),_0x54c65b(0x2,_0x30e2b8[_0x11225e(0x205)](_0x30e2b8['UserManagerService'])),_0x54c65b(0x3,_0x30e2b8['Inject'](_0x30e2b8[_0x11225e(0x239)]))],_0x544f61);const _0x2c06d0=_0x11225e(0x1eb),_0x1d737d={};var _0x1da95f=Object[_0x11225e(0x1fa)],_0x2c9cf2=(_0x5052b6,_0x5a6507,_0x4bfd49,_0x29f4f6)=>{const _0x1f49b3=_0x11225e;for(var _0x468eee=_0x29f4f6>0x1?void 0x0:_0x29f4f6?_0x1da95f(_0x5a6507,_0x4bfd49):_0x5a6507,_0x5c30fb=_0x5052b6[_0x1f49b3(0x227)]-0x1,_0x3d94c0;_0x5c30fb>=0x0;_0x5c30fb--)(_0x3d94c0=_0x5052b6[_0x5c30fb])&&(_0x468eee=_0x3d94c0(_0x468eee)||_0x468eee);return _0x468eee;},_0x15696e=(_0x5566b9,_0x2a0a42)=>(_0x48429d,_0x5c74ca)=>_0x2a0a42(_0x48429d,_0x5c74ca,_0x5566b9);function _0x114edd(_0x2e5a69,_0x2558c7){const _0x1e2dd7=_0x11225e,_0x1a6cd9=_0x2e5a69[_0x1e2dd7(0x256)][0x0];return{..._0x2558c7,'id':_0x1a6cd9[_0x1e2dd7(0x1ff)],'resolved':_0x2e5a69['solved']===0x1,'dT':_0x3e49d9(_0x1a6cd9[_0x1e2dd7(0x222)]),'personId':_0x1a6cd9['userId'],'threadId':_0x1a6cd9['threadId']};}function _0x4c7dbd(_0x178bce,_0x8926ee,_0x5022d9){const _0x1d3e53=_0x11225e;var _0x382ea4,_0x52fc30;if(((_0x52fc30=(_0x382ea4=_0x178bce==null?void 0x0:_0x178bce['replies'])==null?void 0x0:_0x382ea4[_0x1d3e53(0x227)])!=null?_0x52fc30:0x0)>0x0){const _0x2bb322=(_0x5d268b,_0x199d38)=>({'id':_0x5d268b[_0x1d3e53(0x1ff)],'threadId':_0x5d268b[_0x1d3e53(0x253)],'dT':_0x3e49d9(_0x5d268b[_0x1d3e53(0x222)]),'personId':_0x5d268b[_0x1d3e53(0x20e)],'resolved':_0x178bce[_0x1d3e53(0x241)]===_0x319730[_0x1d3e53(0x23a)],'unitId':_0x8926ee,'subUnitId':_0x5022d9,'text':JSON['parse'](_0x5d268b[_0x1d3e53(0x232)]),'parentId':_0x199d38}),_0x13cc7b=_0x2bb322(_0x178bce[_0x1d3e53(0x256)][0x0]);return{..._0x13cc7b,'children':_0x178bce[_0x1d3e53(0x256)]['slice'](0x1)[_0x1d3e53(0x211)](_0x46eec4=>_0x2bb322(_0x46eec4,_0x13cc7b['id']))};}return null;}let _0x9076c7=class{constructor(_0x7dd25,_0x1c6a38,_0x5354a4,_0x18cf1f){const _0x1d61e1=_0x11225e;this['_httpService']=_0x7dd25,this[_0x1d61e1(0x262)]=_0x1c6a38,this[_0x1d61e1(0x270)]=_0x5354a4,this['_injector']=_0x18cf1f;}async[_0x11225e(0x25e)](_0xaf8821){const _0x3e9e66=_0x11225e;var _0x1fe8b9,_0x3ad7d3;const {parentId:_0x1f55d0,unitId:_0x3e5f97,text:_0x5d9a82,threadId:_0x3b6130}=_0xaf8821,_0x2eb0e2=(_0x3ad7d3=(_0x1fe8b9=_0x5d9a82['customRanges'])==null?void 0x0:_0x1fe8b9[_0x3e9e66(0x1f9)](_0x2f0a35=>_0x2f0a35[_0x3e9e66(0x24f)]===_0x30e2b8['CustomRangeType'][_0x3e9e66(0x242)])[_0x3e9e66(0x211)](_0x5afa3b=>_0x5afa3b['rangeId']))!=null?_0x3ad7d3:[],_0x2bac07=JSON[_0x3e9e66(0x1f3)](_0x5d9a82),_0x10435b=(await this[_0x3e9e66(0x270)]['requireSession'](_0x3e5f97))['getMemberID']();if(_0x1f55d0){const _0x43607f={'memberId':_0x10435b,'unitId':_0x3e5f97,'content':_0x2bac07,'mention':_0x2eb0e2,'threadId':_0x3b6130},_0x56d6d1=(await this[_0x3e9e66(0x21a)][_0x3e9e66(0x224)]('/universer-api/comment/unit/'+_0x3e5f97+'/reply',{'body':_0x43607f}))[_0x3e9e66(0x255)][_0x3e9e66(0x219)];return{..._0xaf8821,'id':_0x56d6d1[_0x3e9e66(0x1ff)],'dT':_0x30e2b8[_0x3e9e66(0x238)](+_0x56d6d1['createTimestamp'])[_0x3e9e66(0x215)](_0x3e9e66(0x24d)),'personId':_0x56d6d1['userId']};}else{const _0x291d6e={'memberId':_0x10435b,'unitId':_0x3e5f97,'content':_0x2bac07,'mention':_0x2eb0e2},_0x3459b5=await this[_0x3e9e66(0x21a)][_0x3e9e66(0x224)](_0x3e9e66(0x21d)+_0x3e5f97+_0x3e9e66(0x25b),{'body':_0x291d6e});return _0x114edd(_0x3459b5[_0x3e9e66(0x255)][_0x3e9e66(0x263)],_0xaf8821);}}async[_0x11225e(0x24b)](_0x53895e){const _0x590738=_0x11225e;var _0x38bcb6,_0x4d45e0;const {text:_0x20f72d,unitId:_0x2f5f4b}=_0x53895e,_0x21756b=(_0x4d45e0=(_0x38bcb6=_0x20f72d[_0x590738(0x245)])==null?void 0x0:_0x38bcb6[_0x590738(0x1f9)](_0x322001=>_0x322001[_0x590738(0x24f)]===_0x30e2b8['CustomRangeType']['COMMENT'])[_0x590738(0x211)](_0x42d785=>_0x42d785['rangeId']))!=null?_0x4d45e0:[],_0x502828=JSON[_0x590738(0x1f3)](_0x20f72d),_0x3ef73c=_0x53895e[_0x590738(0x253)],_0xaa6ef5=_0x53895e['id'],_0x41cb0f={'memberId':(await this['_sessionService'][_0x590738(0x20f)](_0x2f5f4b))[_0x590738(0x22e)](),'unitId':_0x2f5f4b,'threadId':_0x3ef73c,'mention':_0x21756b,'content':_0x502828,'replyId':_0xaa6ef5},_0x5ba3b4=await this[_0x590738(0x21a)][_0x590738(0x224)]('/universer-api/comment/unit/'+_0x2f5f4b+'/edit',{'body':_0x41cb0f});return!_0x5ba3b4[_0x590738(0x255)][_0x590738(0x25f)]||_0x5ba3b4[_0x590738(0x255)][_0x590738(0x25f)]['code']===0x1;}async[_0x11225e(0x25d)](_0x56d111){const _0x293bce=_0x11225e,{unitId:_0x2deda3}=_0x56d111,_0x43aed6=_0x56d111[_0x293bce(0x253)],_0x20ea68={'memberId':this['_userService'][_0x293bce(0x1e7)]()[_0x293bce(0x25c)],'unitId':_0x2deda3,'threadId':_0x43aed6,'solved':_0x56d111[_0x293bce(0x204)]?_0x319730[_0x293bce(0x23a)]:_0x319730[_0x293bce(0x244)]},_0x59f41b=await this[_0x293bce(0x21a)]['post'](_0x293bce(0x21d)+_0x2deda3+_0x293bce(0x261),{'body':_0x20ea68});return!_0x59f41b[_0x293bce(0x255)]['error']||_0x59f41b[_0x293bce(0x255)][_0x293bce(0x25f)][_0x293bce(0x265)]===0x1;}async[_0x11225e(0x1ec)](_0x599604,_0x5be484,_0x59ae35,_0x23b497){const _0x5b8fbc=_0x11225e,_0x313dc5={'memberId':(await this['_sessionService'][_0x5b8fbc(0x20f)](_0x599604))['getMemberID'](),'threadId':_0x59ae35,'replyId':_0x23b497,'unitId':_0x599604},_0x43da39=await this[_0x5b8fbc(0x21a)][_0x5b8fbc(0x224)]('/universer-api/comment/unit/'+_0x599604+_0x5b8fbc(0x24a),{'body':_0x313dc5});return!_0x43da39['body'][_0x5b8fbc(0x25f)]||_0x43da39['body'][_0x5b8fbc(0x25f)][_0x5b8fbc(0x265)]===0x1;}async[_0x11225e(0x235)](_0x13622d,_0x30e828,_0x342b46){const _0x546412=_0x11225e,_0x1858f6={'unitId':_0x13622d,'threadId':_0x342b46},_0x56f3bf=await this[_0x546412(0x21a)][_0x546412(0x224)](_0x546412(0x21d)+_0x13622d+'/list',{'body':_0x1858f6}),_0x25e5a6=_0x342b46['map'](_0x4c64d2=>_0x4c7dbd(_0x56f3bf[_0x546412(0x255)][_0x546412(0x233)][_0x4c64d2],_0x13622d,_0x30e828))[_0x546412(0x1f9)](Boolean);return Object['values'](_0x56f3bf['body'][_0x546412(0x1f2)])[_0x546412(0x266)](_0x55b350=>{const _0x575679=_0x546412;this[_0x575679(0x262)]['addUser'](_0x55b350);}),_0x25e5a6;}[_0x11225e(0x25a)](_0x19d062){const _0x40e519=_0x11225e;return{'id':_0x19d062['id'],'threadId':_0x19d062[_0x40e519(0x253)],'ref':_0x19d062[_0x40e519(0x203)]};}};_0x9076c7=_0x2c9cf2([_0x15696e(0x0,_0x30e2b8['Inject'](_0x546ee6[_0x11225e(0x26c)])),_0x15696e(0x1,_0x30e2b8[_0x11225e(0x205)](_0x30e2b8[_0x11225e(0x22f)])),_0x15696e(0x2,_0x30e2b8[_0x11225e(0x205)](_0x22f43d['CollaborationSessionService'])),_0x15696e(0x3,_0x30e2b8['Inject'](_0x30e2b8[_0x11225e(0x239)]))],_0x9076c7);var _0xbd072a=Object[_0x11225e(0x1fa)],_0x3e25bd=(_0x50a3e6,_0x138030,_0x134e2b,_0x5d5632)=>{const _0x3c99a0=_0x11225e;for(var _0x2dc333=_0x5d5632>0x1?void 0x0:_0x5d5632?_0xbd072a(_0x138030,_0x134e2b):_0x138030,_0x10f56b=_0x50a3e6[_0x3c99a0(0x227)]-0x1,_0x949e40;_0x10f56b>=0x0;_0x10f56b--)(_0x949e40=_0x50a3e6[_0x10f56b])&&(_0x2dc333=_0x949e40(_0x2dc333)||_0x2dc333);return _0x2dc333;},_0x32e70f=(_0x198417,_0x3e658d)=>(_0x282ee0,_0x254c4c)=>_0x3e658d(_0x282ee0,_0x254c4c,_0x198417);let _0x51c9e0=class extends _0x30e2b8[_0x11225e(0x201)]{constructor(_0x5c00e5,_0x44eb3f){const _0x370422=_0x11225e;super(),this[_0x370422(0x258)]=_0x5c00e5,this['_threadCommentDataSource']=_0x44eb3f,this[_0x370422(0x218)]();}[_0x11225e(0x218)](){const _0x37ece0=_0x11225e;this['_threadCommentDataSourceService'][_0x37ece0(0x26d)]=this[_0x37ece0(0x1f4)],this[_0x37ece0(0x258)]['syncUpdateMutationToColla']=!0x1;}};_0x51c9e0=_0x3e25bd([_0x32e70f(0x0,_0x30c642[_0x11225e(0x231)]),_0x32e70f(0x1,_0x30e2b8['Inject'](_0x9076c7))],_0x51c9e0);var _0x2df534=Object['defineProperty'],_0x3b6a19=Object['getOwnPropertyDescriptor'],_0x5f0105=(_0xde0c6f,_0x29e53a,_0x18c17e)=>_0x29e53a in _0xde0c6f?_0x2df534(_0xde0c6f,_0x29e53a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x18c17e}):_0xde0c6f[_0x29e53a]=_0x18c17e,_0x2b0d4c=(_0x81d220,_0x27bcb2,_0x5b1b45,_0x53c2b7)=>{const _0x206f72=_0x11225e;for(var _0x301e8e=_0x53c2b7>0x1?void 0x0:_0x53c2b7?_0x3b6a19(_0x27bcb2,_0x5b1b45):_0x27bcb2,_0x51e433=_0x81d220[_0x206f72(0x227)]-0x1,_0x3bd8f7;_0x51e433>=0x0;_0x51e433--)(_0x3bd8f7=_0x81d220[_0x51e433])&&(_0x301e8e=_0x3bd8f7(_0x301e8e)||_0x301e8e);return _0x301e8e;},_0x22c4d3=(_0x57d44b,_0x3cf0d7)=>(_0x13beb0,_0x26e700)=>_0x3cf0d7(_0x13beb0,_0x26e700,_0x57d44b),_0x231aab=(_0x26645a,_0x3bbe3f,_0x377f9d)=>_0x5f0105(_0x26645a,typeof _0x3bbe3f!='symbol'?_0x3bbe3f+'':_0x3bbe3f,_0x377f9d);_0x483f35[_0x11225e(0x1fc)]=class extends _0x30e2b8[_0x11225e(0x247)]{constructor(_0x5dfdf0=_0x1d737d,_0x4ccf6f,_0x51c525){const _0x257fe2=_0x11225e;super(),this['_config']=_0x5dfdf0,this[_0x257fe2(0x1ed)]=_0x4ccf6f,this[_0x257fe2(0x214)]=_0x51c525;const {..._0x1093a3}=_0x30e2b8[_0x257fe2(0x237)]({},_0x1d737d,this[_0x257fe2(0x202)]);this[_0x257fe2(0x214)][_0x257fe2(0x248)](_0x2c06d0,_0x1093a3);}[_0x11225e(0x1f0)](){const _0x59faf1=_0x11225e;[[_0x9076c7],[_0x51c9e0],[_0x544f61]][_0x59faf1(0x266)](_0x40d33b=>{const _0x4be4ed=_0x59faf1;this[_0x4be4ed(0x1ed)]['add'](_0x40d33b);});}[_0x11225e(0x21b)](){const _0xf0b341=_0x11225e;this[_0xf0b341(0x1ed)]['get'](_0x51c9e0),this[_0xf0b341(0x1ed)][_0xf0b341(0x26f)](_0x544f61);}},_0x231aab(_0x483f35['UniverThreadCommentDataSourcePlugin'],_0x11225e(0x206),_0x9c1ce5),_0x231aab(_0x483f35[_0x11225e(0x1fc)],_0x11225e(0x1ea),_0x30e2b8[_0x11225e(0x1fd)][_0x11225e(0x240)]),_0x483f35['UniverThreadCommentDataSourcePlugin']=_0x2b0d4c([_0x30e2b8[_0x11225e(0x23c)](_0x1c69cc['UniverThreadCommentUIPlugin'],_0x22f43d[_0x11225e(0x249)],_0x22ad29['UniverLicensePlugin']),_0x22c4d3(0x1,_0x30e2b8[_0x11225e(0x205)](_0x30e2b8[_0x11225e(0x239)])),_0x22c4d3(0x2,_0x30e2b8['IConfigService'])],_0x483f35[_0x11225e(0x1fc)]),Object[_0x11225e(0x1f1)](_0x483f35,Symbol[_0x11225e(0x22a)],{'value':_0x11225e(0x1ef)});}));
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-25f6e0e",
3
+ "version": "0.6.7-experimental.20250331-45dde91",
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-25f6e0e",
49
- "@univerjs-pro/license": "0.6.7-experimental.20250331-25f6e0e",
50
- "@univerjs/core": "0.6.7-experimental.20250331-25f6e0e",
51
- "@univerjs/network": "0.6.7-experimental.20250331-25f6e0e",
48
+ "@univerjs-pro/collaboration-client": "0.6.7-experimental.20250331-45dde91",
49
+ "@univerjs-pro/license": "0.6.7-experimental.20250331-45dde91",
50
+ "@univerjs/core": "0.6.7-experimental.20250331-45dde91",
51
+ "@univerjs/network": "0.6.7-experimental.20250331-45dde91",
52
52
  "@univerjs/protocol": "0.1.45",
53
- "@univerjs/thread-comment": "0.6.7-experimental.20250331-25f6e0e",
54
- "@univerjs/thread-comment-ui": "0.6.7-experimental.20250331-25f6e0e"
53
+ "@univerjs/thread-comment": "0.6.7-experimental.20250331-45dde91",
54
+ "@univerjs/thread-comment-ui": "0.6.7-experimental.20250331-45dde91"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "^7.8.1",