@univerjs-pro/thread-comment-datasource 0.15.0-insiders.20260107-3441c7a → 0.15.0-insiders.20260108-47c73e3

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';function _0x3d53(){const _0x5aea27=['resolved','rangeType','type','_commentService','values','/universer-api/comment/unit/','Delete','format','_configService','subscribe','defineProperty','stringify','_threadCommentDataSource','Injector','onStarting','Disposable','UNRECOGNIZED','get','Module','/universer-api/user/list','createTimestamp','35916YrQSlg','Solve','listComments','getCurrentUser','/solved','add','_initUserSync','deleteComment','Solved','forEach','Add','dayjs','body','toStringTag','/edit','post','_init','parse','CustomRangeType','135084qmDzsd','replies','ThreadCommentModel','162Kckdvg','error','filter','personId','UserManagerService','UniverThreadCommentDataSourcePlugin','_config','Reply','disposeWithMe','Plugin','saveCommentToSnapshot','customRanges','Unknown','unitId','1iAZnQT','updateComment','_sessionService','userID','thread-comment-data-source.config','ref','resolveComment','UniverInstanceType','_initDataSource','symbol','DependentOn','replyId','423930qFYlBG','_threadCommentDataSourceService','user','3040366vEwWdD','requireSession','COMMENT','UNIVER_UNKNOWN','Inject','180efnObD','bufferTime','_threadCommentModel','threadId','content','84914eiFWDX','getMemberID','OpenOrReOpen','_injector','addUser','addComment','771650XUMmRS','pluginName','pipe','Edit','UniverLicensePlugin','setConfig','_httpService','root','getUnit','parentId','payload','userId','CollaborationSessionService','getOwnPropertyDescriptor','length','/delete','rangeId','_userService','find','commentUpdate$','YYYY/MM/DD\x20HH:mm','/add','map','solved','70120rpRTui'];_0x3d53=function(){return _0x5aea27;};return _0x3d53();}const _0x130f3d=_0x44ca;(function(_0x82a7e0,_0xa92ffe){const _0x1f3bf2=_0x44ca,_0x277588=_0x82a7e0();while(!![]){try{const _0x22a130=parseInt(_0x1f3bf2(0xf0))/0x1*(parseInt(_0x1f3bf2(0x98))/0x2)+-parseInt(_0x1f3bf2(0x8b))/0x3+-parseInt(_0x1f3bf2(0xcc))/0x4*(parseInt(_0x1f3bf2(0x93))/0x5)+-parseInt(_0x1f3bf2(0xdf))/0x6+parseInt(_0x1f3bf2(0x8e))/0x7+parseInt(_0x1f3bf2(0xb6))/0x8*(parseInt(_0x1f3bf2(0xe2))/0x9)+parseInt(_0x1f3bf2(0x9e))/0xa;if(_0x22a130===_0xa92ffe)break;else _0x277588['push'](_0x277588['shift']());}catch(_0x21ea19){_0x277588['push'](_0x277588['shift']());}}}(_0x3d53,0x36d96));Object[_0x130f3d(0xc1)](exports,Symbol[_0x130f3d(0xd9)],{'value':_0x130f3d(0xc9)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x53d79a=>(_0x53d79a[_0x53d79a[_0x130f3d(0x9a)]=0x0]=_0x130f3d(0x9a),_0x53d79a[_0x53d79a['Solved']=0x1]='Solved',_0x53d79a[_0x53d79a[_0x130f3d(0xc7)]=-0x1]=_0x130f3d(0xc7),_0x53d79a))(I||{}),v=(_0x12c017=>(_0x12c017[_0x12c017[_0x130f3d(0xee)]=0x0]='Unknown',_0x12c017[_0x12c017[_0x130f3d(0xd6)]=0x1]=_0x130f3d(0xd6),_0x12c017[_0x12c017[_0x130f3d(0xe9)]=0x2]=_0x130f3d(0xe9),_0x12c017[_0x12c017[_0x130f3d(0xa1)]=0x3]='Edit',_0x12c017[_0x12c017[_0x130f3d(0xbd)]=0x4]=_0x130f3d(0xbd),_0x12c017[_0x12c017[_0x130f3d(0xcd)]=0x5]=_0x130f3d(0xcd),_0x12c017[_0x12c017['UNRECOGNIZED']=-0x1]=_0x130f3d(0xc7),_0x12c017))(v||{});const f=_0xcb6650=>c[_0x130f3d(0xd7)](new Date(+_0xcb6650))[_0x130f3d(0xbe)](_0x130f3d(0xb2)),R=async(_0x225802,_0xcddfe3)=>{const _0x310583=_0x130f3d,_0x32318c=_0x225802['get'](c[_0x310583(0xe6)]),_0x909559=_0x225802[_0x310583(0xc8)](P['HTTPService']);_0xcddfe3[_0x310583(0xd5)](_0x52a842=>{_0x32318c['getUser'](_0x52a842)&&_0xcddfe3['delete'](_0x52a842);}),_0xcddfe3['size']&&(await _0x909559['get'](_0x310583(0xca),{'params':{'userIDs':[..._0xcddfe3]}}))['body']['users']['forEach'](_0x33358e=>{const _0x5bc904=_0x310583;_0x33358e&&_0x32318c[_0x5bc904(0x9c)](_0x33358e);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x4129f0,_0x3cfd4c,_0x58528d,_0x143ae1)=>{const _0x93241a=_0x130f3d;for(var _0x378f74=_0x143ae1>0x1?void 0x0:_0x143ae1?$(_0x3cfd4c,_0x58528d):_0x3cfd4c,_0x3bdd05=_0x4129f0[_0x93241a(0xac)]-0x1,_0x3b4965;_0x3bdd05>=0x0;_0x3bdd05--)(_0x3b4965=_0x4129f0[_0x3bdd05])&&(_0x378f74=_0x3b4965(_0x378f74)||_0x378f74);return _0x378f74;},S=(_0x19c960,_0xdfe99a)=>(_0x6c79d7,_0x5c1e30)=>_0xdfe99a(_0x6c79d7,_0x5c1e30,_0x19c960);let _=class extends c[_0x130f3d(0xc6)]{constructor(_0x4dc1cf,_0x42116d,_0x1ab2db,_0x5b8e69){const _0xc3428e=_0x130f3d;super(),this[_0xc3428e(0xba)]=_0x4dc1cf,this[_0xc3428e(0x95)]=_0x42116d,this['_userService']=_0x1ab2db,this[_0xc3428e(0x9b)]=_0x5b8e69,this[_0xc3428e(0xdc)](),this[_0xc3428e(0xd2)]();}[_0x130f3d(0xd2)](){const _0x1a384a=_0x130f3d;this[_0x1a384a(0xea)](this[_0x1a384a(0x95)][_0x1a384a(0xb1)][_0x1a384a(0xa0)](j[_0x1a384a(0x94)](0x10))[_0x1a384a(0xc0)](_0x59ab84=>{const _0x2041ee=_0x1a384a,_0x2a94ff=new Set();_0x59ab84[_0x2041ee(0xd5)](_0x2259ad=>{const _0x2b7ff0=_0x2041ee;if(_0x2259ad[_0x2b7ff0(0xb9)]===_0x2b7ff0(0xd1)){const _0x196942=_0x2259ad[_0x2b7ff0(0xa8)][_0x2b7ff0(0xe5)];_0x2a94ff[_0x2b7ff0(0xd1)](_0x196942);}}),R(this[_0x2041ee(0x9b)],_0x2a94ff);}));}[_0x130f3d(0xdc)](){const _0x252178=_0x130f3d;this['disposeWithMe'](this[_0x252178(0xba)][_0x252178(0xb1)][_0x252178(0xc0)](async _0x1640f2=>{const _0x28e9ef=_0x252178;var _0x4a4399,_0x4bd22f,_0x462043,_0x216369;const _0x88828=(_0x4a4399=this[_0x28e9ef(0x95)][_0x28e9ef(0xa6)](_0x1640f2['unitId'])[_0x28e9ef(0xb0)](_0x5cdc21=>_0x5cdc21[_0x28e9ef(0x96)]===_0x1640f2['threadId']))==null?void 0x0:_0x4a4399[_0x28e9ef(0xa5)];if(!_0x88828)return;const {unitId:_0x5dfc42,subUnitId:_0x53b980}=_0x88828;switch(_0x1640f2[_0x28e9ef(0x8d)]&&this[_0x28e9ef(0xaf)][_0x28e9ef(0x9c)](_0x1640f2[_0x28e9ef(0x8d)]),_0x1640f2[_0x28e9ef(0xb9)]){case v[_0x28e9ef(0xd6)]:break;case v[_0x28e9ef(0xe9)]:{this[_0x28e9ef(0x95)][_0x28e9ef(0x9d)](_0x5dfc42,_0x53b980,{'unitId':_0x5dfc42,'subUnitId':_0x53b980,'ref':'','id':_0x1640f2[_0x28e9ef(0x8a)],'dT':f(+_0x1640f2['createTimestamp']),'threadId':_0x1640f2['threadId'],'personId':(_0x462043=(_0x4bd22f=_0x1640f2['user'])==null?void 0x0:_0x4bd22f[_0x28e9ef(0xf3)])!=null?_0x462043:_0x1640f2['userId'],'text':JSON[_0x28e9ef(0xdd)](_0x1640f2[_0x28e9ef(0x97)]),'parentId':_0x88828['id']});break;}case v['Delete']:{const _0x574d6f=this[_0x28e9ef(0x95)]['getComment'](_0x5dfc42,_0x53b980,_0x1640f2[_0x28e9ef(0x8a)]);_0x574d6f&&_0x574d6f[_0x28e9ef(0xa7)]&&this[_0x28e9ef(0x95)][_0x28e9ef(0xd3)](_0x5dfc42,_0x53b980,_0x1640f2[_0x28e9ef(0x8a)]);break;}case v[_0x28e9ef(0xa1)]:{this[_0x28e9ef(0x95)][_0x28e9ef(0xf1)](_0x5dfc42,_0x53b980,{'commentId':_0x1640f2[_0x28e9ef(0x8a)],'text':JSON[_0x28e9ef(0xdd)](_0x1640f2['content'])});break;}case v[_0x28e9ef(0xcd)]:{const _0x2829e6=(_0x216369=this[_0x28e9ef(0x95)][_0x28e9ef(0xa6)](_0x1640f2[_0x28e9ef(0xef)])[_0x28e9ef(0xb0)](_0x4baf0d=>_0x4baf0d[_0x28e9ef(0x96)]===_0x1640f2[_0x28e9ef(0x96)]))==null?void 0x0:_0x216369['root'];_0x2829e6&&this[_0x28e9ef(0x95)][_0x28e9ef(0x85)](_0x5dfc42,_0x53b980,_0x2829e6['id'],_0x1640f2[_0x28e9ef(0xb5)]===I[_0x28e9ef(0xd4)]);break;}}}));}};_=E([S(0x0,c[_0x130f3d(0x92)](b['CommentService'])),S(0x1,c[_0x130f3d(0x92)](M[_0x130f3d(0xe1)])),S(0x2,c[_0x130f3d(0x92)](c['UserManagerService'])),S(0x3,c[_0x130f3d(0x92)](c['Injector']))],_);function _0x44ca(_0x495dbc,_0x27f845){_0x495dbc=_0x495dbc-0x84;const _0x3d531f=_0x3d53();let _0x44cabe=_0x3d531f[_0x495dbc];return _0x44cabe;}const q=_0x130f3d(0xf4),D={};var A=Object[_0x130f3d(0xab)],x=(_0x362ce1,_0xa46904,_0x5bfe71,_0x6833b6)=>{const _0x8b3e52=_0x130f3d;for(var _0x20e6e7=_0x6833b6>0x1?void 0x0:_0x6833b6?A(_0xa46904,_0x5bfe71):_0xa46904,_0x60c8b8=_0x362ce1[_0x8b3e52(0xac)]-0x1,_0x170cb5;_0x60c8b8>=0x0;_0x60c8b8--)(_0x170cb5=_0x362ce1[_0x60c8b8])&&(_0x20e6e7=_0x170cb5(_0x20e6e7)||_0x20e6e7);return _0x20e6e7;},C=(_0x40207e,_0x1032bb)=>(_0x12501e,_0x2af5d9)=>_0x1032bb(_0x12501e,_0x2af5d9,_0x40207e);function Y(_0x129b9a,_0x46ea75){const _0x3b43bc=_0x130f3d,_0x3265cc=_0x129b9a[_0x3b43bc(0xe0)][0x0];return{..._0x46ea75,'id':_0x3265cc[_0x3b43bc(0x8a)],'resolved':_0x129b9a[_0x3b43bc(0xb5)]===0x1,'dT':f(_0x3265cc['createTimestamp']),'personId':_0x3265cc[_0x3b43bc(0xa9)],'threadId':_0x3265cc[_0x3b43bc(0x96)]};}function G(_0x38fa14,_0x121658,_0x4236cd){const _0x3c0dd8=_0x130f3d;var _0x5be02a,_0x271eae;if(((_0x271eae=(_0x5be02a=_0x38fa14==null?void 0x0:_0x38fa14[_0x3c0dd8(0xe0)])==null?void 0x0:_0x5be02a[_0x3c0dd8(0xac)])!=null?_0x271eae:0x0)>0x0){const _0x1558e9=(_0x12fca9,_0x49cb93)=>({'id':_0x12fca9[_0x3c0dd8(0x8a)],'threadId':_0x12fca9['threadId'],'dT':f(_0x12fca9[_0x3c0dd8(0xcb)]),'personId':_0x12fca9[_0x3c0dd8(0xa9)],'resolved':_0x38fa14[_0x3c0dd8(0xb5)]===I['Solved'],'unitId':_0x121658,'subUnitId':_0x4236cd,'text':JSON['parse'](_0x12fca9[_0x3c0dd8(0x97)]),'parentId':_0x49cb93}),_0x427ccf=_0x1558e9(_0x38fa14[_0x3c0dd8(0xe0)][0x0]);return{..._0x427ccf,'children':_0x38fa14['replies']['slice'](0x1)[_0x3c0dd8(0xb4)](_0x5439b2=>_0x1558e9(_0x5439b2,_0x427ccf['id']))};}return null;}let p=class{constructor(_0x682874,_0x4547ec,_0x29d65b){const _0x2c1e37=_0x130f3d;this[_0x2c1e37(0xa4)]=_0x682874,this[_0x2c1e37(0xaf)]=_0x4547ec,this[_0x2c1e37(0xf2)]=_0x29d65b;}async[_0x130f3d(0x9d)](_0x12be05){const _0xc6533c=_0x130f3d;var _0x339dc3,_0x413b7a;const {parentId:_0x15a471,unitId:_0x24897e,text:_0x3e70b4,threadId:_0x5184fc}=_0x12be05,_0x4eee95=(_0x413b7a=(_0x339dc3=_0x3e70b4[_0xc6533c(0xed)])==null?void 0x0:_0x339dc3[_0xc6533c(0xe4)](_0x347f3d=>_0x347f3d[_0xc6533c(0xb8)]===c[_0xc6533c(0xde)][_0xc6533c(0x90)])[_0xc6533c(0xb4)](_0x4ff636=>_0x4ff636[_0xc6533c(0xae)]))!=null?_0x413b7a:[],_0x5edf7f=JSON[_0xc6533c(0xc2)](_0x3e70b4),_0x552ed5=(await this[_0xc6533c(0xf2)][_0xc6533c(0x8f)](_0x24897e))[_0xc6533c(0x99)]();if(_0x15a471){const _0x23c4c5={'memberId':_0x552ed5,'unitId':_0x24897e,'content':_0x5edf7f,'mention':_0x4eee95,'threadId':_0x5184fc},_0x534d24=(await this[_0xc6533c(0xa4)][_0xc6533c(0xdb)](_0xc6533c(0xbc)+_0x24897e+'/reply',{'body':_0x23c4c5}))['body']['reply'];return{..._0x12be05,'id':_0x534d24[_0xc6533c(0x8a)],'dT':c[_0xc6533c(0xd7)](+_0x534d24[_0xc6533c(0xcb)])[_0xc6533c(0xbe)](_0xc6533c(0xb2)),'personId':_0x534d24[_0xc6533c(0xa9)]};}else{const _0x39307f={'memberId':_0x552ed5,'unitId':_0x24897e,'content':_0x5edf7f,'mention':_0x4eee95},_0x3ab7da=await this[_0xc6533c(0xa4)]['post']('/universer-api/comment/unit/'+_0x24897e+_0xc6533c(0xb3),{'body':_0x39307f});return Y(_0x3ab7da['body']['comment'],_0x12be05);}}async[_0x130f3d(0xf1)](_0x56a694){const _0x18ca72=_0x130f3d;var _0x309d21,_0x43fa2c;const {text:_0x443688,unitId:_0x3aa3ab}=_0x56a694,_0x163a13=(_0x43fa2c=(_0x309d21=_0x443688[_0x18ca72(0xed)])==null?void 0x0:_0x309d21[_0x18ca72(0xe4)](_0xad30ec=>_0xad30ec[_0x18ca72(0xb8)]===c[_0x18ca72(0xde)][_0x18ca72(0x90)])[_0x18ca72(0xb4)](_0x5cb169=>_0x5cb169['rangeId']))!=null?_0x43fa2c:[],_0x3f25b3=JSON[_0x18ca72(0xc2)](_0x443688),_0x23b4b2=_0x56a694[_0x18ca72(0x96)],_0x382896=_0x56a694['id'],_0x411835={'memberId':(await this[_0x18ca72(0xf2)][_0x18ca72(0x8f)](_0x3aa3ab))['getMemberID'](),'unitId':_0x3aa3ab,'threadId':_0x23b4b2,'mention':_0x163a13,'content':_0x3f25b3,'replyId':_0x382896},_0x3d705f=await this[_0x18ca72(0xa4)][_0x18ca72(0xdb)]('/universer-api/comment/unit/'+_0x3aa3ab+_0x18ca72(0xda),{'body':_0x411835});return!_0x3d705f[_0x18ca72(0xd8)][_0x18ca72(0xe3)]||_0x3d705f[_0x18ca72(0xd8)][_0x18ca72(0xe3)]['code']===0x1;}async['resolveComment'](_0x19210e){const _0x46f77e=_0x130f3d,{unitId:_0x94e1a9}=_0x19210e,_0x2787c3=_0x19210e['threadId'],_0xc86817={'memberId':this['_userService'][_0x46f77e(0xcf)]()['userID'],'unitId':_0x94e1a9,'threadId':_0x2787c3,'solved':_0x19210e[_0x46f77e(0xb7)]?I['Solved']:I[_0x46f77e(0x9a)]},_0x44dead=await this[_0x46f77e(0xa4)][_0x46f77e(0xdb)](_0x46f77e(0xbc)+_0x94e1a9+_0x46f77e(0xd0),{'body':_0xc86817});return!_0x44dead['body']['error']||_0x44dead[_0x46f77e(0xd8)][_0x46f77e(0xe3)]['code']===0x1;}async[_0x130f3d(0xd3)](_0x2c31e1,_0x15e2e4,_0x1e2da1,_0x1dc24c){const _0x507b70=_0x130f3d,_0x1153e8={'memberId':(await this[_0x507b70(0xf2)][_0x507b70(0x8f)](_0x2c31e1))['getMemberID'](),'threadId':_0x1e2da1,'replyId':_0x1dc24c,'unitId':_0x2c31e1},_0xf53f80=await this[_0x507b70(0xa4)][_0x507b70(0xdb)](_0x507b70(0xbc)+_0x2c31e1+_0x507b70(0xad),{'body':_0x1153e8});return!_0xf53f80['body'][_0x507b70(0xe3)]||_0xf53f80['body'][_0x507b70(0xe3)]['code']===0x1;}async[_0x130f3d(0xce)](_0x106ea6,_0x5d5732,_0x5e0809){const _0x1a8842=_0x130f3d,_0xde3d7={'unitId':_0x106ea6,'threadId':_0x5e0809},_0x43ff6f=await this[_0x1a8842(0xa4)]['post']('/universer-api/comment/unit/'+_0x106ea6+'/list',{'body':_0xde3d7}),_0x261c6d=_0x5e0809['map'](_0x5d258e=>G(_0x43ff6f[_0x1a8842(0xd8)]['comments'][_0x5d258e],_0x106ea6,_0x5d5732))[_0x1a8842(0xe4)](Boolean);return Object[_0x1a8842(0xbb)](_0x43ff6f[_0x1a8842(0xd8)]['users'])[_0x1a8842(0xd5)](_0x4bac30=>{const _0x52d80f=_0x1a8842;this['_userService'][_0x52d80f(0x9c)](_0x4bac30);}),_0x261c6d;}[_0x130f3d(0xec)](_0x14152a){const _0x2363b2=_0x130f3d;return{'id':_0x14152a['id'],'threadId':_0x14152a[_0x2363b2(0x96)],'ref':_0x14152a[_0x2363b2(0x84)]};}};p=x([C(0x0,c['Inject'](P['HTTPService'])),C(0x1,c[_0x130f3d(0x92)](c['UserManagerService'])),C(0x2,c[_0x130f3d(0x92)](b[_0x130f3d(0xaa)]))],p);var H=Object[_0x130f3d(0xab)],J=(_0x47cb3c,_0xa47be9,_0x3b11fe,_0x388ab8)=>{for(var _0x54e563=_0x388ab8>0x1?void 0x0:_0x388ab8?H(_0xa47be9,_0x3b11fe):_0xa47be9,_0x30c339=_0x47cb3c['length']-0x1,_0x5d86c1;_0x30c339>=0x0;_0x30c339--)(_0x5d86c1=_0x47cb3c[_0x30c339])&&(_0x54e563=_0x5d86c1(_0x54e563)||_0x54e563);return _0x54e563;},y=(_0x5a24e7,_0x2591da)=>(_0x45239f,_0x3576ec)=>_0x2591da(_0x45239f,_0x3576ec,_0x5a24e7);let g=class extends c[_0x130f3d(0xc6)]{constructor(_0x1eddd7,_0xb664d5){const _0xbead58=_0x130f3d;super(),this['_threadCommentDataSourceService']=_0x1eddd7,this[_0xbead58(0xc3)]=_0xb664d5,this[_0xbead58(0x87)]();}[_0x130f3d(0x87)](){const _0x4db67f=_0x130f3d;this[_0x4db67f(0x8c)]['dataSource']=this[_0x4db67f(0xc3)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};g=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x130f3d(0x92)](p))],g);var F=Object[_0x130f3d(0xc1)],L=Object[_0x130f3d(0xab)],Z=(_0x3d7987,_0x1bee36,_0x4b6614)=>_0x1bee36 in _0x3d7987?F(_0x3d7987,_0x1bee36,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4b6614}):_0x3d7987[_0x1bee36]=_0x4b6614,W=(_0x4d2bf0,_0x4a3b8b,_0x54c867,_0x8808f6)=>{for(var _0x61da75=_0x8808f6>0x1?void 0x0:_0x8808f6?L(_0x4a3b8b,_0x54c867):_0x4a3b8b,_0x2df76d=_0x4d2bf0['length']-0x1,_0x189803;_0x2df76d>=0x0;_0x2df76d--)(_0x189803=_0x4d2bf0[_0x2df76d])&&(_0x61da75=_0x189803(_0x61da75)||_0x61da75);return _0x61da75;},O=(_0x8eac6,_0x8217e1)=>(_0x5e9983,_0x3ba774)=>_0x8217e1(_0x5e9983,_0x3ba774,_0x8eac6),N=(_0x1364d3,_0x3d5a53,_0x1898a7)=>Z(_0x1364d3,typeof _0x3d5a53!=_0x130f3d(0x88)?_0x3d5a53+'':_0x3d5a53,_0x1898a7);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x130f3d(0xeb)]{constructor(_0x1ffe61=D,_0xa2d47b,_0x3faa0c){const _0x52c83b=_0x130f3d;super(),this['_config']=_0x1ffe61,this[_0x52c83b(0x9b)]=_0xa2d47b,this['_configService']=_0x3faa0c;const {..._0x4d7db4}=c['merge']({},D,this[_0x52c83b(0xe8)]);this[_0x52c83b(0xbf)][_0x52c83b(0xa3)](q,_0x4d7db4);}[_0x130f3d(0xc5)](){const _0x18d547=_0x130f3d;[[p],[g],[_]][_0x18d547(0xd5)](_0x370e1f=>{const _0x7c127a=_0x18d547;this[_0x7c127a(0x9b)]['add'](_0x370e1f);});}['onReady'](){const _0x25628d=_0x130f3d;this['_injector'][_0x25628d(0xc8)](g),this[_0x25628d(0x9b)][_0x25628d(0xc8)](_);}},N(exports[_0x130f3d(0xe7)],_0x130f3d(0x9f),U),N(exports[_0x130f3d(0xe7)],'type',c[_0x130f3d(0x86)][_0x130f3d(0x91)]),exports[_0x130f3d(0xe7)]=W([c[_0x130f3d(0x89)](w['UniverThreadCommentUIPlugin'],b['UniverCollaborationClientPlugin'],T[_0x130f3d(0xa2)]),O(0x1,c[_0x130f3d(0x92)](c[_0x130f3d(0xc4)])),O(0x2,c['IConfigService'])],exports[_0x130f3d(0xe7)]);
1
+ 'use strict';const _0x312a7d=_0x35da;function _0x35da(_0x4874e9,_0x61138f){_0x4874e9=_0x4874e9-0x17d;const _0x446c33=_0x446c();let _0x35dafc=_0x446c33[_0x4874e9];return _0x35dafc;}(function(_0x536a05,_0x2ea5b6){const _0x16ac23=_0x35da,_0x3f9a69=_0x536a05();while(!![]){try{const _0x52b06b=-parseInt(_0x16ac23(0x17e))/0x1+-parseInt(_0x16ac23(0x1f1))/0x2*(-parseInt(_0x16ac23(0x1d0))/0x3)+parseInt(_0x16ac23(0x1a7))/0x4+-parseInt(_0x16ac23(0x1ee))/0x5+-parseInt(_0x16ac23(0x181))/0x6*(parseInt(_0x16ac23(0x18f))/0x7)+-parseInt(_0x16ac23(0x18a))/0x8+parseInt(_0x16ac23(0x1bc))/0x9;if(_0x52b06b===_0x2ea5b6)break;else _0x3f9a69['push'](_0x3f9a69['shift']());}catch(_0x268693){_0x3f9a69['push'](_0x3f9a69['shift']());}}}(_0x446c,0x2d0ff));Object[_0x312a7d(0x1e3)](exports,Symbol[_0x312a7d(0x1c7)],{'value':_0x312a7d(0x190)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x312a7d(0x1b3);var I=(_0x16f94d=>(_0x16f94d[_0x16f94d[_0x312a7d(0x1d1)]=0x0]=_0x312a7d(0x1d1),_0x16f94d[_0x16f94d['Solved']=0x1]=_0x312a7d(0x1a2),_0x16f94d[_0x16f94d[_0x312a7d(0x1dc)]=-0x1]=_0x312a7d(0x1dc),_0x16f94d))(I||{}),v=(_0x56a688=>(_0x56a688[_0x56a688[_0x312a7d(0x187)]=0x0]='Unknown',_0x56a688[_0x56a688[_0x312a7d(0x1ec)]=0x1]=_0x312a7d(0x1ec),_0x56a688[_0x56a688[_0x312a7d(0x1c3)]=0x2]='Reply',_0x56a688[_0x56a688[_0x312a7d(0x193)]=0x3]=_0x312a7d(0x193),_0x56a688[_0x56a688[_0x312a7d(0x188)]=0x4]=_0x312a7d(0x188),_0x56a688[_0x56a688[_0x312a7d(0x1c8)]=0x5]=_0x312a7d(0x1c8),_0x56a688[_0x56a688[_0x312a7d(0x1dc)]=-0x1]='UNRECOGNIZED',_0x56a688))(v||{});const f=_0x36b702=>c['dayjs'](new Date(+_0x36b702))[_0x312a7d(0x1ae)](_0x312a7d(0x19c)),R=async(_0x12bd34,_0x48c5e3)=>{const _0x133b84=_0x312a7d,_0x1f47d2=_0x12bd34['get'](c[_0x133b84(0x1a4)]),_0x3a31b5=_0x12bd34[_0x133b84(0x1f4)](P[_0x133b84(0x1de)]);_0x48c5e3[_0x133b84(0x1ef)](_0x17d063=>{const _0x370ff3=_0x133b84;_0x1f47d2['getUser'](_0x17d063)&&_0x48c5e3[_0x370ff3(0x1cf)](_0x17d063);}),_0x48c5e3['size']&&(await _0x3a31b5[_0x133b84(0x1f4)]('/universer-api/user/list',{'params':{'userIDs':[..._0x48c5e3]}}))[_0x133b84(0x1f2)][_0x133b84(0x1c1)][_0x133b84(0x1ef)](_0x54c650=>{const _0x3608a1=_0x133b84;_0x54c650&&_0x1f47d2[_0x3608a1(0x18e)](_0x54c650);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x5d3f95,_0x3669bb,_0x3aa592,_0x405786)=>{const _0x5f1ad0=_0x312a7d;for(var _0x34674d=_0x405786>0x1?void 0x0:_0x405786?$(_0x3669bb,_0x3aa592):_0x3669bb,_0x4a5d88=_0x5d3f95[_0x5f1ad0(0x1e0)]-0x1,_0x5597eb;_0x4a5d88>=0x0;_0x4a5d88--)(_0x5597eb=_0x5d3f95[_0x4a5d88])&&(_0x34674d=_0x5597eb(_0x34674d)||_0x34674d);return _0x34674d;},S=(_0x3ff4d6,_0x57f580)=>(_0x9f36bf,_0x103e77)=>_0x57f580(_0x9f36bf,_0x103e77,_0x3ff4d6);let _=class extends c['Disposable']{constructor(_0x87ad02,_0x5e4271,_0x2835fc,_0x17793f){const _0x1b87ef=_0x312a7d;super(),this['_commentService']=_0x87ad02,this[_0x1b87ef(0x1b0)]=_0x5e4271,this['_userService']=_0x2835fc,this[_0x1b87ef(0x1c5)]=_0x17793f,this[_0x1b87ef(0x185)](),this['_initUserSync']();}[_0x312a7d(0x199)](){const _0x36eec5=_0x312a7d;this[_0x36eec5(0x1e1)](this['_threadCommentModel'][_0x36eec5(0x1b2)][_0x36eec5(0x1b7)](j[_0x36eec5(0x191)](0x10))['subscribe'](_0x11eb9b=>{const _0x328872=_0x36eec5,_0x4cef1e=new Set();_0x11eb9b[_0x328872(0x1ef)](_0x11ba41=>{const _0xacd924=_0x328872;if(_0x11ba41[_0xacd924(0x1e4)]===_0xacd924(0x1da)){const _0x2f0490=_0x11ba41[_0xacd924(0x189)][_0xacd924(0x19f)];_0x4cef1e[_0xacd924(0x1da)](_0x2f0490);}}),R(this[_0x328872(0x1c5)],_0x4cef1e);}));}['_init'](){const _0x54ea06=_0x312a7d;this[_0x54ea06(0x1e1)](this[_0x54ea06(0x1ba)][_0x54ea06(0x1b2)][_0x54ea06(0x1b8)](async _0x4b0d8c=>{const _0x13d2f2=_0x54ea06;var _0x34e16b,_0xc038d6,_0x52c7ff,_0xa85705;const _0x308572=(_0x34e16b=this[_0x13d2f2(0x1b0)][_0x13d2f2(0x182)](_0x4b0d8c[_0x13d2f2(0x1ab)])[_0x13d2f2(0x18d)](_0xeac1e2=>_0xeac1e2['threadId']===_0x4b0d8c['threadId']))==null?void 0x0:_0x34e16b[_0x13d2f2(0x1ac)];if(!_0x308572)return;const {unitId:_0x3cff36,subUnitId:_0x566c27}=_0x308572;switch(_0x4b0d8c[_0x13d2f2(0x1e5)]&&this[_0x13d2f2(0x1ce)][_0x13d2f2(0x18e)](_0x4b0d8c[_0x13d2f2(0x1e5)]),_0x4b0d8c[_0x13d2f2(0x1e4)]){case v[_0x13d2f2(0x1ec)]:break;case v[_0x13d2f2(0x1c3)]:{this[_0x13d2f2(0x1b0)][_0x13d2f2(0x1e2)](_0x3cff36,_0x566c27,{'unitId':_0x3cff36,'subUnitId':_0x566c27,'ref':'','id':_0x4b0d8c[_0x13d2f2(0x1a5)],'dT':f(+_0x4b0d8c[_0x13d2f2(0x1f5)]),'threadId':_0x4b0d8c[_0x13d2f2(0x1d9)],'personId':(_0x52c7ff=(_0xc038d6=_0x4b0d8c[_0x13d2f2(0x1e5)])==null?void 0x0:_0xc038d6[_0x13d2f2(0x1a1)])!=null?_0x52c7ff:_0x4b0d8c[_0x13d2f2(0x1b9)],'text':JSON['parse'](_0x4b0d8c['content']),'parentId':_0x308572['id']});break;}case v['Delete']:{const _0x50e35e=this[_0x13d2f2(0x1b0)][_0x13d2f2(0x1bf)](_0x3cff36,_0x566c27,_0x4b0d8c['replyId']);_0x50e35e&&_0x50e35e[_0x13d2f2(0x1c9)]&&this[_0x13d2f2(0x1b0)][_0x13d2f2(0x1e9)](_0x3cff36,_0x566c27,_0x4b0d8c['replyId']);break;}case v[_0x13d2f2(0x193)]:{this['_threadCommentModel'][_0x13d2f2(0x1dd)](_0x3cff36,_0x566c27,{'commentId':_0x4b0d8c[_0x13d2f2(0x1a5)],'text':JSON[_0x13d2f2(0x1bd)](_0x4b0d8c[_0x13d2f2(0x1c4)])});break;}case v[_0x13d2f2(0x1c8)]:{const _0x528223=(_0xa85705=this[_0x13d2f2(0x1b0)][_0x13d2f2(0x182)](_0x4b0d8c[_0x13d2f2(0x1ab)])[_0x13d2f2(0x18d)](_0x1cee00=>_0x1cee00[_0x13d2f2(0x1d9)]===_0x4b0d8c[_0x13d2f2(0x1d9)]))==null?void 0x0:_0xa85705[_0x13d2f2(0x1ac)];_0x528223&&this['_threadCommentModel']['resolveComment'](_0x3cff36,_0x566c27,_0x528223['id'],_0x4b0d8c[_0x13d2f2(0x19e)]===I['Solved']);break;}}}));}};function _0x446c(){const _0x33b490=['UserManagerService','replyId','Disposable','1433564ignqQs','UniverInstanceType','CommentService','Inject','unitId','root','stringify','format','CollaborationSessionService','_threadCommentModel','pluginName','commentUpdate$','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getMemberID','error','IThreadCommentDataSourceService','pipe','subscribe','userId','_commentService','listComments','3221784TEJnSc','parse','map','getComment','_sessionService','users','_config','Reply','content','_injector','values','toStringTag','Solve','parentId','CustomRangeType','onReady','/list','_httpService','_userService','delete','3miBsUj','OpenOrReOpen','slice','requireSession','/edit','post','COMMENT','ref','getOwnPropertyDescriptor','threadId','add','resolveComment','UNRECOGNIZED','updateComment','HTTPService','filter','length','disposeWithMe','addComment','defineProperty','type','user','getCurrentUser','customRanges','UniverThreadCommentDataSourcePlugin','deleteComment','/universer-api/comment/unit/','/add','Add','rangeId','779780bNDuST','forEach','_initDataSource','178318jhfFsP','body','onStarting','get','createTimestamp','ThreadCommentModel','216879esOKPz','comment','Plugin','402978bBSugb','getUnit','UniverCollaborationClientPlugin','replies','_init','UNIVER_UNKNOWN','Unknown','Delete','payload','1447624UEfCzB','_configService','UniverLicensePlugin','find','addUser','7UxIxUs','Module','bufferTime','_threadCommentDataSourceService','Edit','_threadCommentDataSource','code','/reply','DependentOn','comments','_initUserSync','setConfig','Injector','YYYY/MM/DD\x20HH:mm','/delete','solved','personId','rangeType','userID','Solved','saveCommentToSnapshot'];_0x446c=function(){return _0x33b490;};return _0x446c();}_=E([S(0x0,c['Inject'](b[_0x312a7d(0x1a9)])),S(0x1,c[_0x312a7d(0x1aa)](M[_0x312a7d(0x17d)])),S(0x2,c[_0x312a7d(0x1aa)](c[_0x312a7d(0x1a4)])),S(0x3,c[_0x312a7d(0x1aa)](c[_0x312a7d(0x19b)]))],_);const q='thread-comment-data-source.config',D={};var A=Object['getOwnPropertyDescriptor'],x=(_0xc457f6,_0x26f483,_0x508b25,_0xc4a330)=>{const _0x3a6033=_0x312a7d;for(var _0x2ab26c=_0xc4a330>0x1?void 0x0:_0xc4a330?A(_0x26f483,_0x508b25):_0x26f483,_0x3181b6=_0xc457f6[_0x3a6033(0x1e0)]-0x1,_0x8b619a;_0x3181b6>=0x0;_0x3181b6--)(_0x8b619a=_0xc457f6[_0x3181b6])&&(_0x2ab26c=_0x8b619a(_0x2ab26c)||_0x2ab26c);return _0x2ab26c;},C=(_0x1661c8,_0x3d5e35)=>(_0x26d45d,_0x590765)=>_0x3d5e35(_0x26d45d,_0x590765,_0x1661c8);function Y(_0x225266,_0x5a12db){const _0x42c309=_0x312a7d,_0x35d71b=_0x225266['replies'][0x0];return{..._0x5a12db,'id':_0x35d71b[_0x42c309(0x1a5)],'resolved':_0x225266[_0x42c309(0x19e)]===0x1,'dT':f(_0x35d71b['createTimestamp']),'personId':_0x35d71b[_0x42c309(0x1b9)],'threadId':_0x35d71b[_0x42c309(0x1d9)]};}function G(_0x3678f3,_0x204116,_0x106b59){const _0x2219da=_0x312a7d;var _0x184cdf,_0x2a8649;if(((_0x2a8649=(_0x184cdf=_0x3678f3==null?void 0x0:_0x3678f3[_0x2219da(0x184)])==null?void 0x0:_0x184cdf['length'])!=null?_0x2a8649:0x0)>0x0){const _0x258901=(_0x28e83e,_0x2fa0e3)=>({'id':_0x28e83e[_0x2219da(0x1a5)],'threadId':_0x28e83e['threadId'],'dT':f(_0x28e83e[_0x2219da(0x1f5)]),'personId':_0x28e83e[_0x2219da(0x1b9)],'resolved':_0x3678f3['solved']===I['Solved'],'unitId':_0x204116,'subUnitId':_0x106b59,'text':JSON['parse'](_0x28e83e[_0x2219da(0x1c4)]),'parentId':_0x2fa0e3}),_0x2f4065=_0x258901(_0x3678f3[_0x2219da(0x184)][0x0]);return{..._0x2f4065,'children':_0x3678f3[_0x2219da(0x184)][_0x2219da(0x1d2)](0x1)[_0x2219da(0x1be)](_0x4961fb=>_0x258901(_0x4961fb,_0x2f4065['id']))};}return null;}let p=class{constructor(_0x41c45b,_0x574cbb,_0x4fa163){const _0x37c9f2=_0x312a7d;this[_0x37c9f2(0x1cd)]=_0x41c45b,this[_0x37c9f2(0x1ce)]=_0x574cbb,this[_0x37c9f2(0x1c0)]=_0x4fa163;}async[_0x312a7d(0x1e2)](_0x33332d){const _0x5a7a0b=_0x312a7d;var _0x545a42,_0x4afc3c;const {parentId:_0x57fb70,unitId:_0x45cec5,text:_0x10fdfe,threadId:_0x4920b2}=_0x33332d,_0xd2f7ed=(_0x4afc3c=(_0x545a42=_0x10fdfe[_0x5a7a0b(0x1e7)])==null?void 0x0:_0x545a42[_0x5a7a0b(0x1df)](_0x34faf6=>_0x34faf6[_0x5a7a0b(0x1a0)]===c[_0x5a7a0b(0x1ca)][_0x5a7a0b(0x1d6)])[_0x5a7a0b(0x1be)](_0x297b5d=>_0x297b5d[_0x5a7a0b(0x1ed)]))!=null?_0x4afc3c:[],_0xa87a4a=JSON[_0x5a7a0b(0x1ad)](_0x10fdfe),_0x3e2602=(await this[_0x5a7a0b(0x1c0)][_0x5a7a0b(0x1d3)](_0x45cec5))[_0x5a7a0b(0x1b4)]();if(_0x57fb70){const _0x5f5236={'memberId':_0x3e2602,'unitId':_0x45cec5,'content':_0xa87a4a,'mention':_0xd2f7ed,'threadId':_0x4920b2},_0x5114e5=(await this[_0x5a7a0b(0x1cd)]['post'](_0x5a7a0b(0x1ea)+_0x45cec5+_0x5a7a0b(0x196),{'body':_0x5f5236}))[_0x5a7a0b(0x1f2)]['reply'];return{..._0x33332d,'id':_0x5114e5['replyId'],'dT':c['dayjs'](+_0x5114e5[_0x5a7a0b(0x1f5)])[_0x5a7a0b(0x1ae)](_0x5a7a0b(0x19c)),'personId':_0x5114e5[_0x5a7a0b(0x1b9)]};}else{const _0x16d311={'memberId':_0x3e2602,'unitId':_0x45cec5,'content':_0xa87a4a,'mention':_0xd2f7ed},_0x23abf0=await this[_0x5a7a0b(0x1cd)][_0x5a7a0b(0x1d5)]('/universer-api/comment/unit/'+_0x45cec5+_0x5a7a0b(0x1eb),{'body':_0x16d311});return Y(_0x23abf0[_0x5a7a0b(0x1f2)][_0x5a7a0b(0x17f)],_0x33332d);}}async[_0x312a7d(0x1dd)](_0x1982f0){const _0x44dbca=_0x312a7d;var _0x586e07,_0x90c0af;const {text:_0x138951,unitId:_0x5ddc58}=_0x1982f0,_0x541b75=(_0x90c0af=(_0x586e07=_0x138951[_0x44dbca(0x1e7)])==null?void 0x0:_0x586e07[_0x44dbca(0x1df)](_0x39f706=>_0x39f706[_0x44dbca(0x1a0)]===c['CustomRangeType']['COMMENT'])[_0x44dbca(0x1be)](_0x1b0a41=>_0x1b0a41[_0x44dbca(0x1ed)]))!=null?_0x90c0af:[],_0x1a1b35=JSON[_0x44dbca(0x1ad)](_0x138951),_0x1360d9=_0x1982f0['threadId'],_0x39d310=_0x1982f0['id'],_0xd17656={'memberId':(await this['_sessionService'][_0x44dbca(0x1d3)](_0x5ddc58))[_0x44dbca(0x1b4)](),'unitId':_0x5ddc58,'threadId':_0x1360d9,'mention':_0x541b75,'content':_0x1a1b35,'replyId':_0x39d310},_0x2cb8ab=await this['_httpService']['post'](_0x44dbca(0x1ea)+_0x5ddc58+_0x44dbca(0x1d4),{'body':_0xd17656});return!_0x2cb8ab['body'][_0x44dbca(0x1b5)]||_0x2cb8ab['body'][_0x44dbca(0x1b5)][_0x44dbca(0x195)]===0x1;}async[_0x312a7d(0x1db)](_0x3365fe){const _0x3829cc=_0x312a7d,{unitId:_0x4dcf10}=_0x3365fe,_0x56a492=_0x3365fe[_0x3829cc(0x1d9)],_0x19edd0={'memberId':this[_0x3829cc(0x1ce)][_0x3829cc(0x1e6)]()[_0x3829cc(0x1a1)],'unitId':_0x4dcf10,'threadId':_0x56a492,'solved':_0x3365fe['resolved']?I[_0x3829cc(0x1a2)]:I[_0x3829cc(0x1d1)]},_0x520b78=await this['_httpService'][_0x3829cc(0x1d5)](_0x3829cc(0x1ea)+_0x4dcf10+'/solved',{'body':_0x19edd0});return!_0x520b78[_0x3829cc(0x1f2)]['error']||_0x520b78[_0x3829cc(0x1f2)][_0x3829cc(0x1b5)][_0x3829cc(0x195)]===0x1;}async['deleteComment'](_0x899d9d,_0x528dce,_0x3e7883,_0x4f61e5){const _0x20e3a3=_0x312a7d,_0x374047={'memberId':(await this['_sessionService'][_0x20e3a3(0x1d3)](_0x899d9d))[_0x20e3a3(0x1b4)](),'threadId':_0x3e7883,'replyId':_0x4f61e5,'unitId':_0x899d9d},_0x47b925=await this[_0x20e3a3(0x1cd)][_0x20e3a3(0x1d5)](_0x20e3a3(0x1ea)+_0x899d9d+_0x20e3a3(0x19d),{'body':_0x374047});return!_0x47b925[_0x20e3a3(0x1f2)][_0x20e3a3(0x1b5)]||_0x47b925[_0x20e3a3(0x1f2)]['error'][_0x20e3a3(0x195)]===0x1;}async[_0x312a7d(0x1bb)](_0x14f98e,_0x401aff,_0x153806){const _0x47c80c=_0x312a7d,_0x4ffab7={'unitId':_0x14f98e,'threadId':_0x153806},_0xfa44e5=await this[_0x47c80c(0x1cd)][_0x47c80c(0x1d5)](_0x47c80c(0x1ea)+_0x14f98e+_0x47c80c(0x1cc),{'body':_0x4ffab7}),_0x1f83aa=_0x153806[_0x47c80c(0x1be)](_0x3639b0=>G(_0xfa44e5['body'][_0x47c80c(0x198)][_0x3639b0],_0x14f98e,_0x401aff))['filter'](Boolean);return Object[_0x47c80c(0x1c6)](_0xfa44e5[_0x47c80c(0x1f2)][_0x47c80c(0x1c1)])[_0x47c80c(0x1ef)](_0x2e2a5b=>{this['_userService']['addUser'](_0x2e2a5b);}),_0x1f83aa;}[_0x312a7d(0x1a3)](_0x5f07f6){const _0x4108e=_0x312a7d;return{'id':_0x5f07f6['id'],'threadId':_0x5f07f6[_0x4108e(0x1d9)],'ref':_0x5f07f6[_0x4108e(0x1d7)]};}};p=x([C(0x0,c[_0x312a7d(0x1aa)](P['HTTPService'])),C(0x1,c[_0x312a7d(0x1aa)](c[_0x312a7d(0x1a4)])),C(0x2,c[_0x312a7d(0x1aa)](b[_0x312a7d(0x1af)]))],p);var H=Object['getOwnPropertyDescriptor'],J=(_0xe0d7dd,_0x3c38f7,_0x1110c1,_0x57f315)=>{const _0x58d039=_0x312a7d;for(var _0x5210cd=_0x57f315>0x1?void 0x0:_0x57f315?H(_0x3c38f7,_0x1110c1):_0x3c38f7,_0x362af1=_0xe0d7dd[_0x58d039(0x1e0)]-0x1,_0x204c19;_0x362af1>=0x0;_0x362af1--)(_0x204c19=_0xe0d7dd[_0x362af1])&&(_0x5210cd=_0x204c19(_0x5210cd)||_0x5210cd);return _0x5210cd;},y=(_0x4068a1,_0x3a20e1)=>(_0x255e1a,_0x2b51f9)=>_0x3a20e1(_0x255e1a,_0x2b51f9,_0x4068a1);let g=class extends c[_0x312a7d(0x1a6)]{constructor(_0x563be5,_0x1f03ab){super(),this['_threadCommentDataSourceService']=_0x563be5,this['_threadCommentDataSource']=_0x1f03ab,this['_initDataSource']();}[_0x312a7d(0x1f0)](){const _0xe32eb4=_0x312a7d;this[_0xe32eb4(0x192)]['dataSource']=this[_0xe32eb4(0x194)],this[_0xe32eb4(0x192)]['syncUpdateMutationToColla']=!0x1;}};g=J([y(0x0,M[_0x312a7d(0x1b6)]),y(0x1,c[_0x312a7d(0x1aa)](p))],g);var F=Object[_0x312a7d(0x1e3)],L=Object[_0x312a7d(0x1d8)],Z=(_0x3dc2d6,_0x68216c,_0x1cea65)=>_0x68216c in _0x3dc2d6?F(_0x3dc2d6,_0x68216c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1cea65}):_0x3dc2d6[_0x68216c]=_0x1cea65,W=(_0x97637d,_0x1fe9f1,_0x289f6c,_0x4279e9)=>{const _0x47fe67=_0x312a7d;for(var _0x5db1b4=_0x4279e9>0x1?void 0x0:_0x4279e9?L(_0x1fe9f1,_0x289f6c):_0x1fe9f1,_0x4feb43=_0x97637d[_0x47fe67(0x1e0)]-0x1,_0xa2371c;_0x4feb43>=0x0;_0x4feb43--)(_0xa2371c=_0x97637d[_0x4feb43])&&(_0x5db1b4=_0xa2371c(_0x5db1b4)||_0x5db1b4);return _0x5db1b4;},O=(_0x339c32,_0x4c702a)=>(_0x55ef38,_0x1dd6d3)=>_0x4c702a(_0x55ef38,_0x1dd6d3,_0x339c32),N=(_0x97dd1a,_0x20e301,_0x344b67)=>Z(_0x97dd1a,typeof _0x20e301!='symbol'?_0x20e301+'':_0x20e301,_0x344b67);exports[_0x312a7d(0x1e8)]=class extends c[_0x312a7d(0x180)]{constructor(_0x527c82=D,_0x1dc148,_0x4d8b41){const _0x373d8f=_0x312a7d;super(),this[_0x373d8f(0x1c2)]=_0x527c82,this[_0x373d8f(0x1c5)]=_0x1dc148,this[_0x373d8f(0x18b)]=_0x4d8b41;const {..._0x385558}=c['merge']({},D,this[_0x373d8f(0x1c2)]);this[_0x373d8f(0x18b)][_0x373d8f(0x19a)](q,_0x385558);}[_0x312a7d(0x1f3)](){const _0xbfacaa=_0x312a7d;[[p],[g],[_]][_0xbfacaa(0x1ef)](_0x467209=>{const _0x2a44b7=_0xbfacaa;this[_0x2a44b7(0x1c5)][_0x2a44b7(0x1da)](_0x467209);});}[_0x312a7d(0x1cb)](){const _0x370668=_0x312a7d;this[_0x370668(0x1c5)][_0x370668(0x1f4)](g),this[_0x370668(0x1c5)][_0x370668(0x1f4)](_);}},N(exports[_0x312a7d(0x1e8)],_0x312a7d(0x1b1),U),N(exports[_0x312a7d(0x1e8)],_0x312a7d(0x1e4),c[_0x312a7d(0x1a8)][_0x312a7d(0x186)]),exports[_0x312a7d(0x1e8)]=W([c[_0x312a7d(0x197)](w['UniverThreadCommentUIPlugin'],b[_0x312a7d(0x183)],T[_0x312a7d(0x18c)]),O(0x1,c[_0x312a7d(0x1aa)](c['Injector'])),O(0x2,c['IConfigService'])],exports[_0x312a7d(0x1e8)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x4e6633=_0x5f0e;function _0x238f(){const _0x3248d2=['1327404bPHrJY','dataSource','reply','add','saveCommentToSnapshot','1133530jOLYBC','getOwnPropertyDescriptor','_commentService','YYYY/MM/DD\x20HH:mm','Solve','user','_configService','pluginName','type','/reply','find','parentId','comment','body','onStarting','users','Add','solved','replies','_init','_sessionService','_initDataSource','slice','addComment','syncUpdateMutationToColla','threadId','defineProperty','5688179OEGoRC','requireSession','20zJuRBB','23MkBQQs','forEach','length','getMemberID','addUser','getUnit','_initUserSync','error','Delete','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','post','/solved','COMMENT','_userService','Reply','customRanges','rangeType','/add','_threadCommentDataSource','parse','get','5729874WSqVhZ','OpenOrReOpen','ref','root','_httpService','updateComment','/universer-api/comment/unit/','_config','filter','/list','deleteComment','rangeId','userID','commentUpdate$','pipe','code','/universer-api/user/list','_threadCommentDataSourceService','_threadCommentModel','UNRECOGNIZED','subscribe','Edit','resolveComment','createTimestamp','6171520BKqFDy','onReady','unitId','map','personId','122586bVjpeH','comments','resolved','disposeWithMe','size','format','listComments','replyId','thread-comment-data-source.config','content','_injector','14848371jYQZJy','/edit','Unknown','payload','Solved','getCurrentUser','setConfig','userId'];_0x238f=function(){return _0x3248d2;};return _0x238f();}(function(_0x88fc0d,_0x2cb5ee){const _0x4ca88f=_0x5f0e,_0xfc3d08=_0x88fc0d();while(!![]){try{const _0x37d617=parseInt(_0x4ca88f(0x100))/0x1*(parseInt(_0x4ca88f(0x132))/0x2)+-parseInt(_0x4ca88f(0xdd))/0x3+parseInt(_0x4ca88f(0xff))/0x4*(-parseInt(_0x4ca88f(0xe2))/0x5)+parseInt(_0x4ca88f(0x115))/0x6+-parseInt(_0x4ca88f(0xfd))/0x7+-parseInt(_0x4ca88f(0x12d))/0x8+parseInt(_0x4ca88f(0x13d))/0x9;if(_0x37d617===_0x2cb5ee)break;else _0xfc3d08['push'](_0xfc3d08['shift']());}catch(_0x3ec3f2){_0xfc3d08['push'](_0xfc3d08['shift']());}}}(_0x238f,0xd09e6));import{CommentService as _0x51f550,CollaborationSessionService as _0xa66c1b,UniverCollaborationClientPlugin as _0x4407ef}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x211b08}from'@univerjs-pro/license';import{dayjs as _0x5a368a,UserManagerService as _0x14c9e0,Inject as _0x59c243,Injector as _0xeb12e8,Disposable as _0x31c99b,CustomRangeType as _0x507b57,UniverInstanceType as _0x6e2e34,DependentOn as _0x356271,IConfigService as _0x40e862,Plugin as _0x3c3863,merge as _0x1f9a22}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x1aeb4f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x5a5cbf,IThreadCommentDataSourceService as _0x4c2523}from'@univerjs/thread-comment';import{bufferTime as _0x1340dd}from'rxjs';import{HTTPService as _0x168213}from'@univerjs/network';const W=_0x4e6633(0x109);var I=(_0x26ccf4=>(_0x26ccf4[_0x26ccf4[_0x4e6633(0x116)]=0x0]=_0x4e6633(0x116),_0x26ccf4[_0x26ccf4[_0x4e6633(0x141)]=0x1]='Solved',_0x26ccf4[_0x26ccf4[_0x4e6633(0x128)]=-0x1]=_0x4e6633(0x128),_0x26ccf4))(I||{}),v=(_0x208890=>(_0x208890[_0x208890[_0x4e6633(0x13f)]=0x0]=_0x4e6633(0x13f),_0x208890[_0x208890[_0x4e6633(0xf2)]=0x1]=_0x4e6633(0xf2),_0x208890[_0x208890[_0x4e6633(0x10e)]=0x2]=_0x4e6633(0x10e),_0x208890[_0x208890[_0x4e6633(0x12a)]=0x3]=_0x4e6633(0x12a),_0x208890[_0x208890[_0x4e6633(0x108)]=0x4]=_0x4e6633(0x108),_0x208890[_0x208890[_0x4e6633(0xe6)]=0x5]=_0x4e6633(0xe6),_0x208890[_0x208890[_0x4e6633(0x128)]=-0x1]=_0x4e6633(0x128),_0x208890))(v||{});const y=_0x25a459=>_0x5a368a(new Date(+_0x25a459))['format'](_0x4e6633(0xe5)),B=async(_0x431041,_0x25de81)=>{const _0x32550e=_0x4e6633,_0x277cb3=_0x431041[_0x32550e(0x114)](_0x14c9e0),_0x465395=_0x431041[_0x32550e(0x114)](_0x168213);_0x25de81[_0x32550e(0x101)](_0x178848=>{_0x277cb3['getUser'](_0x178848)&&_0x25de81['delete'](_0x178848);}),_0x25de81[_0x32550e(0x136)]&&(await _0x465395['get'](_0x32550e(0x125),{'params':{'userIDs':[..._0x25de81]}}))[_0x32550e(0xef)][_0x32550e(0xf1)]['forEach'](_0x3afec7=>{const _0x1b7025=_0x32550e;_0x3afec7&&_0x277cb3[_0x1b7025(0x104)](_0x3afec7);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x2b4356,_0x2109cb,_0x48a9db,_0x2f45e5)=>{const _0x40ad24=_0x4e6633;for(var _0x45b082=_0x2f45e5>0x1?void 0x0:_0x2f45e5?K(_0x2109cb,_0x48a9db):_0x2109cb,_0x598075=_0x2b4356[_0x40ad24(0x102)]-0x1,_0x31d7a8;_0x598075>=0x0;_0x598075--)(_0x31d7a8=_0x2b4356[_0x598075])&&(_0x45b082=_0x31d7a8(_0x45b082)||_0x45b082);return _0x45b082;},p=(_0x3dbfa5,_0x4d7856)=>(_0x18c9f1,_0x2990b0)=>_0x4d7856(_0x18c9f1,_0x2990b0,_0x3dbfa5);let _=class extends _0x31c99b{constructor(_0x18b7f0,_0xe886ac,_0x518a17,_0x37259a){const _0x559942=_0x4e6633;super(),this[_0x559942(0xe4)]=_0x18b7f0,this[_0x559942(0x127)]=_0xe886ac,this['_userService']=_0x518a17,this[_0x559942(0x13c)]=_0x37259a,this['_init'](),this[_0x559942(0x106)]();}['_initUserSync'](){const _0x15d712=_0x4e6633;this[_0x15d712(0x135)](this['_threadCommentModel'][_0x15d712(0x122)][_0x15d712(0x123)](_0x1340dd(0x10))[_0x15d712(0x129)](_0x3e4ad0=>{const _0x1af7c8=_0x15d712,_0x4317f7=new Set();_0x3e4ad0[_0x1af7c8(0x101)](_0x1c5a17=>{const _0x43c63e=_0x1af7c8;if(_0x1c5a17['type']===_0x43c63e(0xe0)){const _0x29e438=_0x1c5a17[_0x43c63e(0x140)][_0x43c63e(0x131)];_0x4317f7['add'](_0x29e438);}}),B(this[_0x1af7c8(0x13c)],_0x4317f7);}));}[_0x4e6633(0xf5)](){const _0x3194c5=_0x4e6633;this['disposeWithMe'](this[_0x3194c5(0xe4)][_0x3194c5(0x122)][_0x3194c5(0x129)](async _0x5069f6=>{const _0x3836f6=_0x3194c5;var _0x421829,_0x2bcc3d,_0xfaada0,_0x104ed9;const _0x27ec06=(_0x421829=this['_threadCommentModel'][_0x3836f6(0x105)](_0x5069f6[_0x3836f6(0x12f)])[_0x3836f6(0xec)](_0x2484b1=>_0x2484b1[_0x3836f6(0xfb)]===_0x5069f6[_0x3836f6(0xfb)]))==null?void 0x0:_0x421829['root'];if(!_0x27ec06)return;const {unitId:_0x59a87e,subUnitId:_0x1dade0}=_0x27ec06;switch(_0x5069f6[_0x3836f6(0xe7)]&&this[_0x3836f6(0x10d)][_0x3836f6(0x104)](_0x5069f6[_0x3836f6(0xe7)]),_0x5069f6[_0x3836f6(0xea)]){case v['Add']:break;case v[_0x3836f6(0x10e)]:{this[_0x3836f6(0x127)][_0x3836f6(0xf9)](_0x59a87e,_0x1dade0,{'unitId':_0x59a87e,'subUnitId':_0x1dade0,'ref':'','id':_0x5069f6['replyId'],'dT':y(+_0x5069f6[_0x3836f6(0x12c)]),'threadId':_0x5069f6['threadId'],'personId':(_0xfaada0=(_0x2bcc3d=_0x5069f6[_0x3836f6(0xe7)])==null?void 0x0:_0x2bcc3d['userID'])!=null?_0xfaada0:_0x5069f6[_0x3836f6(0xdc)],'text':JSON[_0x3836f6(0x113)](_0x5069f6[_0x3836f6(0x13b)]),'parentId':_0x27ec06['id']});break;}case v[_0x3836f6(0x108)]:{const _0xd124b=this[_0x3836f6(0x127)]['getComment'](_0x59a87e,_0x1dade0,_0x5069f6[_0x3836f6(0x139)]);_0xd124b&&_0xd124b[_0x3836f6(0xed)]&&this[_0x3836f6(0x127)][_0x3836f6(0x11f)](_0x59a87e,_0x1dade0,_0x5069f6['replyId']);break;}case v[_0x3836f6(0x12a)]:{this[_0x3836f6(0x127)][_0x3836f6(0x11a)](_0x59a87e,_0x1dade0,{'commentId':_0x5069f6[_0x3836f6(0x139)],'text':JSON[_0x3836f6(0x113)](_0x5069f6[_0x3836f6(0x13b)])});break;}case v[_0x3836f6(0xe6)]:{const _0x145c08=(_0x104ed9=this[_0x3836f6(0x127)][_0x3836f6(0x105)](_0x5069f6[_0x3836f6(0x12f)])[_0x3836f6(0xec)](_0x2c30a0=>_0x2c30a0['threadId']===_0x5069f6[_0x3836f6(0xfb)]))==null?void 0x0:_0x104ed9[_0x3836f6(0x118)];_0x145c08&&this[_0x3836f6(0x127)][_0x3836f6(0x12b)](_0x59a87e,_0x1dade0,_0x145c08['id'],_0x5069f6['solved']===I[_0x3836f6(0x141)]);break;}}}));}};_=V([p(0x0,_0x59c243(_0x51f550)),p(0x1,_0x59c243(_0x5a5cbf)),p(0x2,_0x59c243(_0x14c9e0)),p(0x3,_0x59c243(_0xeb12e8))],_);const z=_0x4e6633(0x13a),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x17a9c7,_0x5a5276,_0x555dce,_0x1a3123)=>{const _0xf93cb9=_0x4e6633;for(var _0x3a512f=_0x1a3123>0x1?void 0x0:_0x1a3123?k(_0x5a5276,_0x555dce):_0x5a5276,_0xf825ae=_0x17a9c7[_0xf93cb9(0x102)]-0x1,_0x789ec1;_0xf825ae>=0x0;_0xf825ae--)(_0x789ec1=_0x17a9c7[_0xf825ae])&&(_0x3a512f=_0x789ec1(_0x3a512f)||_0x3a512f);return _0x3a512f;},b=(_0x5ee1c6,_0x424906)=>(_0x5b85c2,_0x2bc98e)=>_0x424906(_0x5b85c2,_0x2bc98e,_0x5ee1c6);function X(_0x5e99cb,_0x50b5d1){const _0x53ec89=_0x4e6633,_0x46df1d=_0x5e99cb['replies'][0x0];return{..._0x50b5d1,'id':_0x46df1d['replyId'],'resolved':_0x5e99cb['solved']===0x1,'dT':y(_0x46df1d[_0x53ec89(0x12c)]),'personId':_0x46df1d[_0x53ec89(0xdc)],'threadId':_0x46df1d['threadId']};}function ee(_0xea4671,_0x12c5dc,_0x39dafd){const _0x7065e2=_0x4e6633;var _0x5b1eb4,_0x4b953f;if(((_0x4b953f=(_0x5b1eb4=_0xea4671==null?void 0x0:_0xea4671[_0x7065e2(0xf4)])==null?void 0x0:_0x5b1eb4['length'])!=null?_0x4b953f:0x0)>0x0){const _0x139d94=(_0x2922d0,_0x5db686)=>({'id':_0x2922d0[_0x7065e2(0x139)],'threadId':_0x2922d0[_0x7065e2(0xfb)],'dT':y(_0x2922d0['createTimestamp']),'personId':_0x2922d0[_0x7065e2(0xdc)],'resolved':_0xea4671[_0x7065e2(0xf3)]===I[_0x7065e2(0x141)],'unitId':_0x12c5dc,'subUnitId':_0x39dafd,'text':JSON[_0x7065e2(0x113)](_0x2922d0['content']),'parentId':_0x5db686}),_0x146cc3=_0x139d94(_0xea4671['replies'][0x0]);return{..._0x146cc3,'children':_0xea4671[_0x7065e2(0xf4)][_0x7065e2(0xf8)](0x1)[_0x7065e2(0x130)](_0x4fbbaf=>_0x139d94(_0x4fbbaf,_0x146cc3['id']))};}return null;}let S=class{constructor(_0x3252fb,_0x45f3f6,_0xc9c70){const _0x471900=_0x4e6633;this[_0x471900(0x119)]=_0x3252fb,this['_userService']=_0x45f3f6,this[_0x471900(0xf6)]=_0xc9c70;}async[_0x4e6633(0xf9)](_0xb56829){const _0x47a5ee=_0x4e6633;var _0x813225,_0x1f7312;const {parentId:_0x100853,unitId:_0x573b9d,text:_0x435aaa,threadId:_0x252015}=_0xb56829,_0x13e0ff=(_0x1f7312=(_0x813225=_0x435aaa[_0x47a5ee(0x10f)])==null?void 0x0:_0x813225[_0x47a5ee(0x11d)](_0xc78e3=>_0xc78e3[_0x47a5ee(0x110)]===_0x507b57[_0x47a5ee(0x10c)])[_0x47a5ee(0x130)](_0x4e4773=>_0x4e4773[_0x47a5ee(0x120)]))!=null?_0x1f7312:[],_0xe10e94=JSON['stringify'](_0x435aaa),_0x5bc071=(await this[_0x47a5ee(0xf6)][_0x47a5ee(0xfe)](_0x573b9d))['getMemberID']();if(_0x100853){const _0x3ea10c={'memberId':_0x5bc071,'unitId':_0x573b9d,'content':_0xe10e94,'mention':_0x13e0ff,'threadId':_0x252015},_0x2b6183=(await this[_0x47a5ee(0x119)][_0x47a5ee(0x10a)]('/universer-api/comment/unit/'+_0x573b9d+_0x47a5ee(0xeb),{'body':_0x3ea10c}))[_0x47a5ee(0xef)][_0x47a5ee(0xdf)];return{..._0xb56829,'id':_0x2b6183['replyId'],'dT':_0x5a368a(+_0x2b6183[_0x47a5ee(0x12c)])[_0x47a5ee(0x137)](_0x47a5ee(0xe5)),'personId':_0x2b6183[_0x47a5ee(0xdc)]};}else{const _0x3bf463={'memberId':_0x5bc071,'unitId':_0x573b9d,'content':_0xe10e94,'mention':_0x13e0ff},_0x19eb77=await this[_0x47a5ee(0x119)][_0x47a5ee(0x10a)](_0x47a5ee(0x11b)+_0x573b9d+_0x47a5ee(0x111),{'body':_0x3bf463});return X(_0x19eb77[_0x47a5ee(0xef)][_0x47a5ee(0xee)],_0xb56829);}}async[_0x4e6633(0x11a)](_0x18b8de){const _0x1ed4a9=_0x4e6633;var _0x1294d1,_0x3a6392;const {text:_0x56a80b,unitId:_0x530052}=_0x18b8de,_0x32b931=(_0x3a6392=(_0x1294d1=_0x56a80b[_0x1ed4a9(0x10f)])==null?void 0x0:_0x1294d1[_0x1ed4a9(0x11d)](_0x5e4052=>_0x5e4052['rangeType']===_0x507b57[_0x1ed4a9(0x10c)])['map'](_0x58aef8=>_0x58aef8[_0x1ed4a9(0x120)]))!=null?_0x3a6392:[],_0x4459ff=JSON['stringify'](_0x56a80b),_0x56aeb3=_0x18b8de[_0x1ed4a9(0xfb)],_0x230239=_0x18b8de['id'],_0x5f2b30={'memberId':(await this[_0x1ed4a9(0xf6)][_0x1ed4a9(0xfe)](_0x530052))[_0x1ed4a9(0x103)](),'unitId':_0x530052,'threadId':_0x56aeb3,'mention':_0x32b931,'content':_0x4459ff,'replyId':_0x230239},_0x566307=await this[_0x1ed4a9(0x119)][_0x1ed4a9(0x10a)]('/universer-api/comment/unit/'+_0x530052+_0x1ed4a9(0x13e),{'body':_0x5f2b30});return!_0x566307['body'][_0x1ed4a9(0x107)]||_0x566307[_0x1ed4a9(0xef)][_0x1ed4a9(0x107)][_0x1ed4a9(0x124)]===0x1;}async[_0x4e6633(0x12b)](_0x118a61){const _0x4555dc=_0x4e6633,{unitId:_0x5939e5}=_0x118a61,_0x268203=_0x118a61[_0x4555dc(0xfb)],_0x432e79={'memberId':this[_0x4555dc(0x10d)][_0x4555dc(0x142)]()[_0x4555dc(0x121)],'unitId':_0x5939e5,'threadId':_0x268203,'solved':_0x118a61[_0x4555dc(0x134)]?I['Solved']:I[_0x4555dc(0x116)]},_0x2b7ced=await this[_0x4555dc(0x119)][_0x4555dc(0x10a)](_0x4555dc(0x11b)+_0x5939e5+_0x4555dc(0x10b),{'body':_0x432e79});return!_0x2b7ced['body']['error']||_0x2b7ced[_0x4555dc(0xef)][_0x4555dc(0x107)][_0x4555dc(0x124)]===0x1;}async[_0x4e6633(0x11f)](_0x1a03c6,_0x507932,_0xf3ecfc,_0x438c97){const _0x47b3c4=_0x4e6633,_0x1caae2={'memberId':(await this[_0x47b3c4(0xf6)][_0x47b3c4(0xfe)](_0x1a03c6))[_0x47b3c4(0x103)](),'threadId':_0xf3ecfc,'replyId':_0x438c97,'unitId':_0x1a03c6},_0x24eb38=await this[_0x47b3c4(0x119)][_0x47b3c4(0x10a)](_0x47b3c4(0x11b)+_0x1a03c6+'/delete',{'body':_0x1caae2});return!_0x24eb38[_0x47b3c4(0xef)][_0x47b3c4(0x107)]||_0x24eb38[_0x47b3c4(0xef)]['error'][_0x47b3c4(0x124)]===0x1;}async[_0x4e6633(0x138)](_0x324fcc,_0xa7fde8,_0x15a6ef){const _0x49f7e6=_0x4e6633,_0x1b87d4={'unitId':_0x324fcc,'threadId':_0x15a6ef},_0x15a7dc=await this[_0x49f7e6(0x119)][_0x49f7e6(0x10a)](_0x49f7e6(0x11b)+_0x324fcc+_0x49f7e6(0x11e),{'body':_0x1b87d4}),_0x37a446=_0x15a6ef[_0x49f7e6(0x130)](_0x26e25c=>ee(_0x15a7dc['body'][_0x49f7e6(0x133)][_0x26e25c],_0x324fcc,_0xa7fde8))[_0x49f7e6(0x11d)](Boolean);return Object['values'](_0x15a7dc[_0x49f7e6(0xef)][_0x49f7e6(0xf1)])['forEach'](_0x56c66b=>{const _0x508dd6=_0x49f7e6;this[_0x508dd6(0x10d)][_0x508dd6(0x104)](_0x56c66b);}),_0x37a446;}[_0x4e6633(0xe1)](_0x2fdd62){const _0x26f10f=_0x4e6633;return{'id':_0x2fdd62['id'],'threadId':_0x2fdd62[_0x26f10f(0xfb)],'ref':_0x2fdd62[_0x26f10f(0x117)]};}};S=Q([b(0x0,_0x59c243(_0x168213)),b(0x1,_0x59c243(_0x14c9e0)),b(0x2,_0x59c243(_0xa66c1b))],S);var re=Object[_0x4e6633(0xe3)],te=(_0x40c8f6,_0x823409,_0x4b5d99,_0x1d41dc)=>{for(var _0xd10a8=_0x1d41dc>0x1?void 0x0:_0x1d41dc?re(_0x823409,_0x4b5d99):_0x823409,_0x419cd9=_0x40c8f6['length']-0x1,_0x55be1c;_0x419cd9>=0x0;_0x419cd9--)(_0x55be1c=_0x40c8f6[_0x419cd9])&&(_0xd10a8=_0x55be1c(_0xd10a8)||_0xd10a8);return _0xd10a8;},M=(_0x1c7f58,_0x19937b)=>(_0x3292a0,_0x2fe54b)=>_0x19937b(_0x3292a0,_0x2fe54b,_0x1c7f58);let f=class extends _0x31c99b{constructor(_0x27dd17,_0x1aaa59){const _0x50c989=_0x4e6633;super(),this[_0x50c989(0x126)]=_0x27dd17,this[_0x50c989(0x112)]=_0x1aaa59,this[_0x50c989(0xf7)]();}[_0x4e6633(0xf7)](){const _0x35b4cd=_0x4e6633;this[_0x35b4cd(0x126)][_0x35b4cd(0xde)]=this[_0x35b4cd(0x112)],this[_0x35b4cd(0x126)][_0x35b4cd(0xfa)]=!0x1;}};f=te([M(0x0,_0x4c2523),M(0x1,_0x59c243(S))],f);var se=Object[_0x4e6633(0xfc)],oe=Object[_0x4e6633(0xe3)],ne=(_0x4c5daf,_0x380fa3,_0x4b9ee7)=>_0x380fa3 in _0x4c5daf?se(_0x4c5daf,_0x380fa3,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4b9ee7}):_0x4c5daf[_0x380fa3]=_0x4b9ee7,ie=(_0x2d3d4f,_0x55daa3,_0x211fba,_0x5e3b55)=>{const _0xb4cca4=_0x4e6633;for(var _0x193e4a=_0x5e3b55>0x1?void 0x0:_0x5e3b55?oe(_0x55daa3,_0x211fba):_0x55daa3,_0x3b55d1=_0x2d3d4f[_0xb4cca4(0x102)]-0x1,_0x589348;_0x3b55d1>=0x0;_0x3b55d1--)(_0x589348=_0x2d3d4f[_0x3b55d1])&&(_0x193e4a=_0x589348(_0x193e4a)||_0x193e4a);return _0x193e4a;},N=(_0x240564,_0x4dc48b)=>(_0x2b9c66,_0x3181d9)=>_0x4dc48b(_0x2b9c66,_0x3181d9,_0x240564),$=(_0x2d1798,_0x4a9f2f,_0x328cc4)=>ne(_0x2d1798,typeof _0x4a9f2f!='symbol'?_0x4a9f2f+'':_0x4a9f2f,_0x328cc4);let g=class extends _0x3c3863{constructor(_0x4ef847=O,_0x270a18,_0x24cb99){const _0x5b9b7f=_0x4e6633;super(),this[_0x5b9b7f(0x11c)]=_0x4ef847,this[_0x5b9b7f(0x13c)]=_0x270a18,this[_0x5b9b7f(0xe8)]=_0x24cb99;const {..._0x369556}=_0x1f9a22({},O,this[_0x5b9b7f(0x11c)]);this[_0x5b9b7f(0xe8)][_0x5b9b7f(0x143)](z,_0x369556);}[_0x4e6633(0xf0)](){const _0x49a3b8=_0x4e6633;[[S],[f],[_]][_0x49a3b8(0x101)](_0x4ae5c3=>{const _0x222584=_0x49a3b8;this[_0x222584(0x13c)][_0x222584(0xe0)](_0x4ae5c3);});}[_0x4e6633(0x12e)](){const _0x18a20c=_0x4e6633;this[_0x18a20c(0x13c)][_0x18a20c(0x114)](f),this[_0x18a20c(0x13c)]['get'](_);}};function _0x5f0e(_0x4ba7b8,_0x48f542){_0x4ba7b8=_0x4ba7b8-0xdc;const _0x238f7d=_0x238f();let _0x5f0e4f=_0x238f7d[_0x4ba7b8];return _0x5f0e4f;}$(g,_0x4e6633(0xe9),W),$(g,_0x4e6633(0xea),_0x6e2e34['UNIVER_UNKNOWN']),g=ie([_0x356271(_0x1aeb4f,_0x4407ef,_0x211b08),N(0x1,_0x59c243(_0xeb12e8)),N(0x2,_0x40e862)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x433b96=_0x2d2d;(function(_0x50bea8,_0xbb9379){const _0x47d297=_0x2d2d,_0x42fc46=_0x50bea8();while(!![]){try{const _0x4726c5=parseInt(_0x47d297(0x152))/0x1*(parseInt(_0x47d297(0x10b))/0x2)+parseInt(_0x47d297(0x11e))/0x3+parseInt(_0x47d297(0x147))/0x4*(parseInt(_0x47d297(0x117))/0x5)+parseInt(_0x47d297(0x162))/0x6*(-parseInt(_0x47d297(0x122))/0x7)+-parseInt(_0x47d297(0x153))/0x8+parseInt(_0x47d297(0x111))/0x9*(parseInt(_0x47d297(0x13f))/0xa)+parseInt(_0x47d297(0x12c))/0xb*(-parseInt(_0x47d297(0x15d))/0xc);if(_0x4726c5===_0xbb9379)break;else _0x42fc46['push'](_0x42fc46['shift']());}catch(_0x31e359){_0x42fc46['push'](_0x42fc46['shift']());}}}(_0x3c1b,0x48652));import{CommentService as _0x27be94,CollaborationSessionService as _0x23c102,UniverCollaborationClientPlugin as _0x47447c}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x51e432}from'@univerjs-pro/license';import{dayjs as _0x502aa8,UserManagerService as _0x3e832f,Inject as _0x19a2f3,Injector as _0x1c9719,Disposable as _0x35f606,CustomRangeType as _0x2671e9,UniverInstanceType as _0x1a8c17,DependentOn as _0x5d048e,IConfigService as _0x3e7a47,Plugin as _0x5ee83e,merge as _0x1eba46}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x48228f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x541f7f,IThreadCommentDataSourceService as _0x22dd5c}from'@univerjs/thread-comment';import{bufferTime as _0x5655f9}from'rxjs';import{HTTPService as _0x588861}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x40dae8=>(_0x40dae8[_0x40dae8[_0x433b96(0x169)]=0x0]=_0x433b96(0x169),_0x40dae8[_0x40dae8[_0x433b96(0x142)]=0x1]=_0x433b96(0x142),_0x40dae8[_0x40dae8['UNRECOGNIZED']=-0x1]=_0x433b96(0x11d),_0x40dae8))(I||{}),v=(_0x273244=>(_0x273244[_0x273244[_0x433b96(0x114)]=0x0]=_0x433b96(0x114),_0x273244[_0x273244[_0x433b96(0x104)]=0x1]=_0x433b96(0x104),_0x273244[_0x273244[_0x433b96(0x131)]=0x2]=_0x433b96(0x131),_0x273244[_0x273244[_0x433b96(0x115)]=0x3]='Edit',_0x273244[_0x273244[_0x433b96(0x103)]=0x4]=_0x433b96(0x103),_0x273244[_0x273244[_0x433b96(0x140)]=0x5]=_0x433b96(0x140),_0x273244[_0x273244['UNRECOGNIZED']=-0x1]=_0x433b96(0x11d),_0x273244))(v||{});const y=_0x51a32e=>_0x502aa8(new Date(+_0x51a32e))['format'](_0x433b96(0x10f)),B=async(_0x14d92c,_0x49c8e0)=>{const _0x4dd617=_0x433b96,_0x9fe6e8=_0x14d92c[_0x4dd617(0x138)](_0x3e832f),_0x44f06c=_0x14d92c[_0x4dd617(0x138)](_0x588861);_0x49c8e0[_0x4dd617(0x15e)](_0x4f8176=>{const _0x369fa5=_0x4dd617;_0x9fe6e8[_0x369fa5(0x13b)](_0x4f8176)&&_0x49c8e0[_0x369fa5(0x11b)](_0x4f8176);}),_0x49c8e0[_0x4dd617(0x156)]&&(await _0x44f06c['get'](_0x4dd617(0x123),{'params':{'userIDs':[..._0x49c8e0]}}))[_0x4dd617(0x161)][_0x4dd617(0x157)]['forEach'](_0x16cc0b=>{_0x16cc0b&&_0x9fe6e8['addUser'](_0x16cc0b);});};var K=Object[_0x433b96(0x14c)],V=(_0x10f3ee,_0x2e2253,_0x59214d,_0x2b6314)=>{for(var _0x57118e=_0x2b6314>0x1?void 0x0:_0x2b6314?K(_0x2e2253,_0x59214d):_0x2e2253,_0x55461d=_0x10f3ee['length']-0x1,_0x1b5262;_0x55461d>=0x0;_0x55461d--)(_0x1b5262=_0x10f3ee[_0x55461d])&&(_0x57118e=_0x1b5262(_0x57118e)||_0x57118e);return _0x57118e;},p=(_0x5cf432,_0x5a478f)=>(_0x3e1be0,_0x4cf1b0)=>_0x5a478f(_0x3e1be0,_0x4cf1b0,_0x5cf432);let _=class extends _0x35f606{constructor(_0x25c1f3,_0x266fc4,_0x441f07,_0x4e875f){const _0x773ae4=_0x433b96;super(),this[_0x773ae4(0x108)]=_0x25c1f3,this[_0x773ae4(0x143)]=_0x266fc4,this[_0x773ae4(0x145)]=_0x441f07,this[_0x773ae4(0x13c)]=_0x4e875f,this[_0x773ae4(0x12f)](),this[_0x773ae4(0x135)]();}[_0x433b96(0x135)](){const _0x47686c=_0x433b96;this['disposeWithMe'](this[_0x47686c(0x143)][_0x47686c(0x163)]['pipe'](_0x5655f9(0x10))[_0x47686c(0x144)](_0x23662b=>{const _0x4f1827=_0x47686c,_0x879589=new Set();_0x23662b[_0x4f1827(0x15e)](_0x44ec6b=>{const _0x3b3520=_0x4f1827;if(_0x44ec6b[_0x3b3520(0x130)]===_0x3b3520(0x116)){const _0x527aea=_0x44ec6b[_0x3b3520(0x166)]['personId'];_0x879589[_0x3b3520(0x116)](_0x527aea);}}),B(this[_0x4f1827(0x13c)],_0x879589);}));}[_0x433b96(0x12f)](){const _0x489d87=_0x433b96;this['disposeWithMe'](this['_commentService'][_0x489d87(0x163)][_0x489d87(0x144)](async _0x13ba43=>{const _0x40975b=_0x489d87;var _0x36b484,_0x1c9635,_0x26b4c2,_0x1267b7;const _0x56dc6d=(_0x36b484=this[_0x40975b(0x143)][_0x40975b(0x11f)](_0x13ba43['unitId'])[_0x40975b(0x150)](_0x52439b=>_0x52439b[_0x40975b(0x12e)]===_0x13ba43[_0x40975b(0x12e)]))==null?void 0x0:_0x36b484[_0x40975b(0x110)];if(!_0x56dc6d)return;const {unitId:_0xbddecb,subUnitId:_0x581a2a}=_0x56dc6d;switch(_0x13ba43['user']&&this['_userService'][_0x40975b(0x139)](_0x13ba43[_0x40975b(0x11c)]),_0x13ba43[_0x40975b(0x130)]){case v['Add']:break;case v['Reply']:{this[_0x40975b(0x143)][_0x40975b(0x12b)](_0xbddecb,_0x581a2a,{'unitId':_0xbddecb,'subUnitId':_0x581a2a,'ref':'','id':_0x13ba43[_0x40975b(0x165)],'dT':y(+_0x13ba43[_0x40975b(0x155)]),'threadId':_0x13ba43[_0x40975b(0x12e)],'personId':(_0x26b4c2=(_0x1c9635=_0x13ba43[_0x40975b(0x11c)])==null?void 0x0:_0x1c9635['userID'])!=null?_0x26b4c2:_0x13ba43[_0x40975b(0x149)],'text':JSON[_0x40975b(0x14e)](_0x13ba43[_0x40975b(0x10c)]),'parentId':_0x56dc6d['id']});break;}case v[_0x40975b(0x103)]:{const _0x2eb9c1=this[_0x40975b(0x143)][_0x40975b(0x121)](_0xbddecb,_0x581a2a,_0x13ba43[_0x40975b(0x165)]);_0x2eb9c1&&_0x2eb9c1[_0x40975b(0x167)]&&this[_0x40975b(0x143)][_0x40975b(0x146)](_0xbddecb,_0x581a2a,_0x13ba43['replyId']);break;}case v[_0x40975b(0x115)]:{this['_threadCommentModel']['updateComment'](_0xbddecb,_0x581a2a,{'commentId':_0x13ba43[_0x40975b(0x165)],'text':JSON[_0x40975b(0x14e)](_0x13ba43['content'])});break;}case v[_0x40975b(0x140)]:{const _0x56638a=(_0x1267b7=this[_0x40975b(0x143)][_0x40975b(0x11f)](_0x13ba43[_0x40975b(0x10d)])[_0x40975b(0x150)](_0x116310=>_0x116310[_0x40975b(0x12e)]===_0x13ba43[_0x40975b(0x12e)]))==null?void 0x0:_0x1267b7[_0x40975b(0x110)];_0x56638a&&this[_0x40975b(0x143)][_0x40975b(0x136)](_0xbddecb,_0x581a2a,_0x56638a['id'],_0x13ba43[_0x40975b(0x15b)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x19a2f3(_0x27be94)),p(0x1,_0x19a2f3(_0x541f7f)),p(0x2,_0x19a2f3(_0x3e832f)),p(0x3,_0x19a2f3(_0x1c9719))],_);const z=_0x433b96(0x133),O={};var k=Object[_0x433b96(0x14c)],Q=(_0x3f5b43,_0x1d6a02,_0x4fe5fb,_0x3de444)=>{const _0x39f9c5=_0x433b96;for(var _0x348d3e=_0x3de444>0x1?void 0x0:_0x3de444?k(_0x1d6a02,_0x4fe5fb):_0x1d6a02,_0x2ba7c8=_0x3f5b43[_0x39f9c5(0x105)]-0x1,_0x5b29ec;_0x2ba7c8>=0x0;_0x2ba7c8--)(_0x5b29ec=_0x3f5b43[_0x2ba7c8])&&(_0x348d3e=_0x5b29ec(_0x348d3e)||_0x348d3e);return _0x348d3e;},b=(_0x2b7581,_0x346c15)=>(_0x2926e0,_0x11b43a)=>_0x346c15(_0x2926e0,_0x11b43a,_0x2b7581);function X(_0x1a6340,_0xaf4e7){const _0x3d962d=_0x433b96,_0x10e3a4=_0x1a6340[_0x3d962d(0x137)][0x0];return{..._0xaf4e7,'id':_0x10e3a4[_0x3d962d(0x165)],'resolved':_0x1a6340['solved']===0x1,'dT':y(_0x10e3a4['createTimestamp']),'personId':_0x10e3a4[_0x3d962d(0x149)],'threadId':_0x10e3a4[_0x3d962d(0x12e)]};}function ee(_0x16cba8,_0x193cb6,_0x58d4e7){const _0x37937c=_0x433b96;var _0x24ea70,_0x5b362c;if(((_0x5b362c=(_0x24ea70=_0x16cba8==null?void 0x0:_0x16cba8[_0x37937c(0x137)])==null?void 0x0:_0x24ea70[_0x37937c(0x105)])!=null?_0x5b362c:0x0)>0x0){const _0x27a919=(_0x488fc2,_0x7e0f8d)=>({'id':_0x488fc2['replyId'],'threadId':_0x488fc2[_0x37937c(0x12e)],'dT':y(_0x488fc2[_0x37937c(0x155)]),'personId':_0x488fc2['userId'],'resolved':_0x16cba8[_0x37937c(0x15b)]===I['Solved'],'unitId':_0x193cb6,'subUnitId':_0x58d4e7,'text':JSON[_0x37937c(0x14e)](_0x488fc2[_0x37937c(0x10c)]),'parentId':_0x7e0f8d}),_0x107c7d=_0x27a919(_0x16cba8[_0x37937c(0x137)][0x0]);return{..._0x107c7d,'children':_0x16cba8[_0x37937c(0x137)][_0x37937c(0x168)](0x1)['map'](_0x1e08bc=>_0x27a919(_0x1e08bc,_0x107c7d['id']))};}return null;}function _0x3c1b(){const _0x2e1a90=['Delete','Add','length','_config','filter','_commentService','format','rangeType','18VgaRom','content','unitId','values','YYYY/MM/DD\x20HH:mm','root','9SVmUEB','saveCommentToSnapshot','code','Unknown','Edit','add','5RNgFst','map','comments','getCurrentUser','delete','user','UNRECOGNIZED','1129521mAfFll','getUnit','reply','getComment','525yoKHhZ','/universer-api/user/list','COMMENT','listComments','stringify','ref','_initDataSource','pluginName','resolved','addComment','67749NFxljc','_configService','threadId','_init','type','Reply','/delete','thread-comment-data-source.config','/add','_initUserSync','resolveComment','replies','get','addUser','userID','getUser','_injector','setConfig','UNIVER_UNKNOWN','3002530ZXmUzJ','Solve','rangeId','Solved','_threadCommentModel','subscribe','_userService','deleteComment','531064ZYWPlg','/reply','userId','_httpService','getMemberID','getOwnPropertyDescriptor','post','parse','customRanges','find','/edit','31227gXTnXh','4117336iRvNMz','_threadCommentDataSourceService','createTimestamp','size','users','syncUpdateMutationToColla','_sessionService','error','solved','/universer-api/comment/unit/','396mNynyT','forEach','_threadCommentDataSource','/list','body','6090LoMMXa','commentUpdate$','requireSession','replyId','payload','parentId','slice','OpenOrReOpen'];_0x3c1b=function(){return _0x2e1a90;};return _0x3c1b();}let S=class{constructor(_0x56ebf8,_0x1f435e,_0x34fb4f){const _0x713bf=_0x433b96;this[_0x713bf(0x14a)]=_0x56ebf8,this[_0x713bf(0x145)]=_0x1f435e,this[_0x713bf(0x159)]=_0x34fb4f;}async[_0x433b96(0x12b)](_0x1e0166){const _0x33e0e9=_0x433b96;var _0x218879,_0x1a5ad3;const {parentId:_0x3e0de8,unitId:_0x5354e5,text:_0x547d21,threadId:_0x4eb96d}=_0x1e0166,_0x210e39=(_0x1a5ad3=(_0x218879=_0x547d21[_0x33e0e9(0x14f)])==null?void 0x0:_0x218879[_0x33e0e9(0x107)](_0x5ac22e=>_0x5ac22e[_0x33e0e9(0x10a)]===_0x2671e9[_0x33e0e9(0x124)])[_0x33e0e9(0x118)](_0x4a523b=>_0x4a523b['rangeId']))!=null?_0x1a5ad3:[],_0x3ba879=JSON['stringify'](_0x547d21),_0xda0c44=(await this[_0x33e0e9(0x159)][_0x33e0e9(0x164)](_0x5354e5))[_0x33e0e9(0x14b)]();if(_0x3e0de8){const _0x1e7e36={'memberId':_0xda0c44,'unitId':_0x5354e5,'content':_0x3ba879,'mention':_0x210e39,'threadId':_0x4eb96d},_0x45eb26=(await this[_0x33e0e9(0x14a)]['post'](_0x33e0e9(0x15c)+_0x5354e5+_0x33e0e9(0x148),{'body':_0x1e7e36}))[_0x33e0e9(0x161)][_0x33e0e9(0x120)];return{..._0x1e0166,'id':_0x45eb26[_0x33e0e9(0x165)],'dT':_0x502aa8(+_0x45eb26[_0x33e0e9(0x155)])[_0x33e0e9(0x109)](_0x33e0e9(0x10f)),'personId':_0x45eb26['userId']};}else{const _0x2b6205={'memberId':_0xda0c44,'unitId':_0x5354e5,'content':_0x3ba879,'mention':_0x210e39},_0x496b40=await this[_0x33e0e9(0x14a)]['post'](_0x33e0e9(0x15c)+_0x5354e5+_0x33e0e9(0x134),{'body':_0x2b6205});return X(_0x496b40[_0x33e0e9(0x161)]['comment'],_0x1e0166);}}async['updateComment'](_0x1349ba){const _0x383eaf=_0x433b96;var _0x552fab,_0x529c60;const {text:_0x293243,unitId:_0x38ea43}=_0x1349ba,_0x20e1dc=(_0x529c60=(_0x552fab=_0x293243[_0x383eaf(0x14f)])==null?void 0x0:_0x552fab['filter'](_0x12a5cc=>_0x12a5cc[_0x383eaf(0x10a)]===_0x2671e9[_0x383eaf(0x124)])[_0x383eaf(0x118)](_0x531ac0=>_0x531ac0[_0x383eaf(0x141)]))!=null?_0x529c60:[],_0x307461=JSON[_0x383eaf(0x126)](_0x293243),_0x24494d=_0x1349ba['threadId'],_0x44d4b3=_0x1349ba['id'],_0x241784={'memberId':(await this[_0x383eaf(0x159)]['requireSession'](_0x38ea43))['getMemberID'](),'unitId':_0x38ea43,'threadId':_0x24494d,'mention':_0x20e1dc,'content':_0x307461,'replyId':_0x44d4b3},_0x4999e7=await this[_0x383eaf(0x14a)][_0x383eaf(0x14d)](_0x383eaf(0x15c)+_0x38ea43+_0x383eaf(0x151),{'body':_0x241784});return!_0x4999e7[_0x383eaf(0x161)][_0x383eaf(0x15a)]||_0x4999e7[_0x383eaf(0x161)][_0x383eaf(0x15a)][_0x383eaf(0x113)]===0x1;}async['resolveComment'](_0x1ac0c1){const _0x2dc82c=_0x433b96,{unitId:_0x1d17ed}=_0x1ac0c1,_0xc49917=_0x1ac0c1[_0x2dc82c(0x12e)],_0x41b141={'memberId':this[_0x2dc82c(0x145)][_0x2dc82c(0x11a)]()[_0x2dc82c(0x13a)],'unitId':_0x1d17ed,'threadId':_0xc49917,'solved':_0x1ac0c1[_0x2dc82c(0x12a)]?I['Solved']:I[_0x2dc82c(0x169)]},_0x58df3f=await this[_0x2dc82c(0x14a)]['post'](_0x2dc82c(0x15c)+_0x1d17ed+'/solved',{'body':_0x41b141});return!_0x58df3f[_0x2dc82c(0x161)][_0x2dc82c(0x15a)]||_0x58df3f[_0x2dc82c(0x161)]['error'][_0x2dc82c(0x113)]===0x1;}async[_0x433b96(0x146)](_0x228c3d,_0xbb5bb9,_0x5343dc,_0x5b9a01){const _0xc5baf3=_0x433b96,_0x520b22={'memberId':(await this[_0xc5baf3(0x159)][_0xc5baf3(0x164)](_0x228c3d))['getMemberID'](),'threadId':_0x5343dc,'replyId':_0x5b9a01,'unitId':_0x228c3d},_0x53ca17=await this[_0xc5baf3(0x14a)][_0xc5baf3(0x14d)](_0xc5baf3(0x15c)+_0x228c3d+_0xc5baf3(0x132),{'body':_0x520b22});return!_0x53ca17['body']['error']||_0x53ca17['body'][_0xc5baf3(0x15a)][_0xc5baf3(0x113)]===0x1;}async[_0x433b96(0x125)](_0x11f100,_0x390026,_0x25f4a4){const _0x2d1cde=_0x433b96,_0x5a04f1={'unitId':_0x11f100,'threadId':_0x25f4a4},_0x5d105d=await this['_httpService'][_0x2d1cde(0x14d)](_0x2d1cde(0x15c)+_0x11f100+_0x2d1cde(0x160),{'body':_0x5a04f1}),_0x3f0bba=_0x25f4a4[_0x2d1cde(0x118)](_0x133227=>ee(_0x5d105d[_0x2d1cde(0x161)][_0x2d1cde(0x119)][_0x133227],_0x11f100,_0x390026))[_0x2d1cde(0x107)](Boolean);return Object[_0x2d1cde(0x10e)](_0x5d105d[_0x2d1cde(0x161)][_0x2d1cde(0x157)])['forEach'](_0x1c123b=>{const _0x434c66=_0x2d1cde;this['_userService'][_0x434c66(0x139)](_0x1c123b);}),_0x3f0bba;}[_0x433b96(0x112)](_0x226f37){const _0x4711dd=_0x433b96;return{'id':_0x226f37['id'],'threadId':_0x226f37[_0x4711dd(0x12e)],'ref':_0x226f37[_0x4711dd(0x127)]};}};S=Q([b(0x0,_0x19a2f3(_0x588861)),b(0x1,_0x19a2f3(_0x3e832f)),b(0x2,_0x19a2f3(_0x23c102))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x25486c,_0x2b1918,_0xe538fb,_0x460f47)=>{const _0x1e7bc4=_0x433b96;for(var _0x28ce06=_0x460f47>0x1?void 0x0:_0x460f47?re(_0x2b1918,_0xe538fb):_0x2b1918,_0x12bd81=_0x25486c[_0x1e7bc4(0x105)]-0x1,_0x837542;_0x12bd81>=0x0;_0x12bd81--)(_0x837542=_0x25486c[_0x12bd81])&&(_0x28ce06=_0x837542(_0x28ce06)||_0x28ce06);return _0x28ce06;},M=(_0x51aa06,_0x3ec4df)=>(_0x2f426d,_0x2b5afd)=>_0x3ec4df(_0x2f426d,_0x2b5afd,_0x51aa06);let f=class extends _0x35f606{constructor(_0x3d6206,_0xe8f24e){const _0x87d9b=_0x433b96;super(),this[_0x87d9b(0x154)]=_0x3d6206,this['_threadCommentDataSource']=_0xe8f24e,this['_initDataSource']();}[_0x433b96(0x128)](){const _0x4759ad=_0x433b96;this[_0x4759ad(0x154)]['dataSource']=this[_0x4759ad(0x15f)],this['_threadCommentDataSourceService'][_0x4759ad(0x158)]=!0x1;}};f=te([M(0x0,_0x22dd5c),M(0x1,_0x19a2f3(S))],f);function _0x2d2d(_0x2a3eac,_0x2cd947){_0x2a3eac=_0x2a3eac-0x103;const _0x3c1b51=_0x3c1b();let _0x2d2d46=_0x3c1b51[_0x2a3eac];return _0x2d2d46;}var se=Object['defineProperty'],oe=Object['getOwnPropertyDescriptor'],ne=(_0x3dc511,_0x16befb,_0x2177aa)=>_0x16befb in _0x3dc511?se(_0x3dc511,_0x16befb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2177aa}):_0x3dc511[_0x16befb]=_0x2177aa,ie=(_0x378558,_0x40153c,_0x2e7d75,_0x1cf7df)=>{const _0x4f9018=_0x433b96;for(var _0x3962bf=_0x1cf7df>0x1?void 0x0:_0x1cf7df?oe(_0x40153c,_0x2e7d75):_0x40153c,_0x391e69=_0x378558[_0x4f9018(0x105)]-0x1,_0x4a6900;_0x391e69>=0x0;_0x391e69--)(_0x4a6900=_0x378558[_0x391e69])&&(_0x3962bf=_0x4a6900(_0x3962bf)||_0x3962bf);return _0x3962bf;},N=(_0x46a19f,_0x429be6)=>(_0x4ed3d9,_0x3891c9)=>_0x429be6(_0x4ed3d9,_0x3891c9,_0x46a19f),$=(_0x200737,_0x18b45a,_0xd171c6)=>ne(_0x200737,typeof _0x18b45a!='symbol'?_0x18b45a+'':_0x18b45a,_0xd171c6);let g=class extends _0x5ee83e{constructor(_0x546da7=O,_0x10b821,_0x6bb5ba){const _0x55bfec=_0x433b96;super(),this[_0x55bfec(0x106)]=_0x546da7,this[_0x55bfec(0x13c)]=_0x10b821,this[_0x55bfec(0x12d)]=_0x6bb5ba;const {..._0x5ef9c9}=_0x1eba46({},O,this[_0x55bfec(0x106)]);this[_0x55bfec(0x12d)][_0x55bfec(0x13d)](z,_0x5ef9c9);}['onStarting'](){const _0x204933=_0x433b96;[[S],[f],[_]][_0x204933(0x15e)](_0x174d8e=>{const _0x353bc6=_0x204933;this[_0x353bc6(0x13c)][_0x353bc6(0x116)](_0x174d8e);});}['onReady'](){const _0x247d36=_0x433b96;this[_0x247d36(0x13c)][_0x247d36(0x138)](f),this[_0x247d36(0x13c)][_0x247d36(0x138)](_);}};$(g,_0x433b96(0x129),W),$(g,_0x433b96(0x130),_0x1a8c17[_0x433b96(0x13e)]),g=ie([_0x5d048e(_0x48228f,_0x47447c,_0x51e432),N(0x1,_0x19a2f3(_0x1c9719)),N(0x2,_0x3e7a47)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x4e6633=_0x5f0e;function _0x238f(){const _0x3248d2=['1327404bPHrJY','dataSource','reply','add','saveCommentToSnapshot','1133530jOLYBC','getOwnPropertyDescriptor','_commentService','YYYY/MM/DD\x20HH:mm','Solve','user','_configService','pluginName','type','/reply','find','parentId','comment','body','onStarting','users','Add','solved','replies','_init','_sessionService','_initDataSource','slice','addComment','syncUpdateMutationToColla','threadId','defineProperty','5688179OEGoRC','requireSession','20zJuRBB','23MkBQQs','forEach','length','getMemberID','addUser','getUnit','_initUserSync','error','Delete','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','post','/solved','COMMENT','_userService','Reply','customRanges','rangeType','/add','_threadCommentDataSource','parse','get','5729874WSqVhZ','OpenOrReOpen','ref','root','_httpService','updateComment','/universer-api/comment/unit/','_config','filter','/list','deleteComment','rangeId','userID','commentUpdate$','pipe','code','/universer-api/user/list','_threadCommentDataSourceService','_threadCommentModel','UNRECOGNIZED','subscribe','Edit','resolveComment','createTimestamp','6171520BKqFDy','onReady','unitId','map','personId','122586bVjpeH','comments','resolved','disposeWithMe','size','format','listComments','replyId','thread-comment-data-source.config','content','_injector','14848371jYQZJy','/edit','Unknown','payload','Solved','getCurrentUser','setConfig','userId'];_0x238f=function(){return _0x3248d2;};return _0x238f();}(function(_0x88fc0d,_0x2cb5ee){const _0x4ca88f=_0x5f0e,_0xfc3d08=_0x88fc0d();while(!![]){try{const _0x37d617=parseInt(_0x4ca88f(0x100))/0x1*(parseInt(_0x4ca88f(0x132))/0x2)+-parseInt(_0x4ca88f(0xdd))/0x3+parseInt(_0x4ca88f(0xff))/0x4*(-parseInt(_0x4ca88f(0xe2))/0x5)+parseInt(_0x4ca88f(0x115))/0x6+-parseInt(_0x4ca88f(0xfd))/0x7+-parseInt(_0x4ca88f(0x12d))/0x8+parseInt(_0x4ca88f(0x13d))/0x9;if(_0x37d617===_0x2cb5ee)break;else _0xfc3d08['push'](_0xfc3d08['shift']());}catch(_0x3ec3f2){_0xfc3d08['push'](_0xfc3d08['shift']());}}}(_0x238f,0xd09e6));import{CommentService as _0x51f550,CollaborationSessionService as _0xa66c1b,UniverCollaborationClientPlugin as _0x4407ef}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x211b08}from'@univerjs-pro/license';import{dayjs as _0x5a368a,UserManagerService as _0x14c9e0,Inject as _0x59c243,Injector as _0xeb12e8,Disposable as _0x31c99b,CustomRangeType as _0x507b57,UniverInstanceType as _0x6e2e34,DependentOn as _0x356271,IConfigService as _0x40e862,Plugin as _0x3c3863,merge as _0x1f9a22}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x1aeb4f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x5a5cbf,IThreadCommentDataSourceService as _0x4c2523}from'@univerjs/thread-comment';import{bufferTime as _0x1340dd}from'rxjs';import{HTTPService as _0x168213}from'@univerjs/network';const W=_0x4e6633(0x109);var I=(_0x26ccf4=>(_0x26ccf4[_0x26ccf4[_0x4e6633(0x116)]=0x0]=_0x4e6633(0x116),_0x26ccf4[_0x26ccf4[_0x4e6633(0x141)]=0x1]='Solved',_0x26ccf4[_0x26ccf4[_0x4e6633(0x128)]=-0x1]=_0x4e6633(0x128),_0x26ccf4))(I||{}),v=(_0x208890=>(_0x208890[_0x208890[_0x4e6633(0x13f)]=0x0]=_0x4e6633(0x13f),_0x208890[_0x208890[_0x4e6633(0xf2)]=0x1]=_0x4e6633(0xf2),_0x208890[_0x208890[_0x4e6633(0x10e)]=0x2]=_0x4e6633(0x10e),_0x208890[_0x208890[_0x4e6633(0x12a)]=0x3]=_0x4e6633(0x12a),_0x208890[_0x208890[_0x4e6633(0x108)]=0x4]=_0x4e6633(0x108),_0x208890[_0x208890[_0x4e6633(0xe6)]=0x5]=_0x4e6633(0xe6),_0x208890[_0x208890[_0x4e6633(0x128)]=-0x1]=_0x4e6633(0x128),_0x208890))(v||{});const y=_0x25a459=>_0x5a368a(new Date(+_0x25a459))['format'](_0x4e6633(0xe5)),B=async(_0x431041,_0x25de81)=>{const _0x32550e=_0x4e6633,_0x277cb3=_0x431041[_0x32550e(0x114)](_0x14c9e0),_0x465395=_0x431041[_0x32550e(0x114)](_0x168213);_0x25de81[_0x32550e(0x101)](_0x178848=>{_0x277cb3['getUser'](_0x178848)&&_0x25de81['delete'](_0x178848);}),_0x25de81[_0x32550e(0x136)]&&(await _0x465395['get'](_0x32550e(0x125),{'params':{'userIDs':[..._0x25de81]}}))[_0x32550e(0xef)][_0x32550e(0xf1)]['forEach'](_0x3afec7=>{const _0x1b7025=_0x32550e;_0x3afec7&&_0x277cb3[_0x1b7025(0x104)](_0x3afec7);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x2b4356,_0x2109cb,_0x48a9db,_0x2f45e5)=>{const _0x40ad24=_0x4e6633;for(var _0x45b082=_0x2f45e5>0x1?void 0x0:_0x2f45e5?K(_0x2109cb,_0x48a9db):_0x2109cb,_0x598075=_0x2b4356[_0x40ad24(0x102)]-0x1,_0x31d7a8;_0x598075>=0x0;_0x598075--)(_0x31d7a8=_0x2b4356[_0x598075])&&(_0x45b082=_0x31d7a8(_0x45b082)||_0x45b082);return _0x45b082;},p=(_0x3dbfa5,_0x4d7856)=>(_0x18c9f1,_0x2990b0)=>_0x4d7856(_0x18c9f1,_0x2990b0,_0x3dbfa5);let _=class extends _0x31c99b{constructor(_0x18b7f0,_0xe886ac,_0x518a17,_0x37259a){const _0x559942=_0x4e6633;super(),this[_0x559942(0xe4)]=_0x18b7f0,this[_0x559942(0x127)]=_0xe886ac,this['_userService']=_0x518a17,this[_0x559942(0x13c)]=_0x37259a,this['_init'](),this[_0x559942(0x106)]();}['_initUserSync'](){const _0x15d712=_0x4e6633;this[_0x15d712(0x135)](this['_threadCommentModel'][_0x15d712(0x122)][_0x15d712(0x123)](_0x1340dd(0x10))[_0x15d712(0x129)](_0x3e4ad0=>{const _0x1af7c8=_0x15d712,_0x4317f7=new Set();_0x3e4ad0[_0x1af7c8(0x101)](_0x1c5a17=>{const _0x43c63e=_0x1af7c8;if(_0x1c5a17['type']===_0x43c63e(0xe0)){const _0x29e438=_0x1c5a17[_0x43c63e(0x140)][_0x43c63e(0x131)];_0x4317f7['add'](_0x29e438);}}),B(this[_0x1af7c8(0x13c)],_0x4317f7);}));}[_0x4e6633(0xf5)](){const _0x3194c5=_0x4e6633;this['disposeWithMe'](this[_0x3194c5(0xe4)][_0x3194c5(0x122)][_0x3194c5(0x129)](async _0x5069f6=>{const _0x3836f6=_0x3194c5;var _0x421829,_0x2bcc3d,_0xfaada0,_0x104ed9;const _0x27ec06=(_0x421829=this['_threadCommentModel'][_0x3836f6(0x105)](_0x5069f6[_0x3836f6(0x12f)])[_0x3836f6(0xec)](_0x2484b1=>_0x2484b1[_0x3836f6(0xfb)]===_0x5069f6[_0x3836f6(0xfb)]))==null?void 0x0:_0x421829['root'];if(!_0x27ec06)return;const {unitId:_0x59a87e,subUnitId:_0x1dade0}=_0x27ec06;switch(_0x5069f6[_0x3836f6(0xe7)]&&this[_0x3836f6(0x10d)][_0x3836f6(0x104)](_0x5069f6[_0x3836f6(0xe7)]),_0x5069f6[_0x3836f6(0xea)]){case v['Add']:break;case v[_0x3836f6(0x10e)]:{this[_0x3836f6(0x127)][_0x3836f6(0xf9)](_0x59a87e,_0x1dade0,{'unitId':_0x59a87e,'subUnitId':_0x1dade0,'ref':'','id':_0x5069f6['replyId'],'dT':y(+_0x5069f6[_0x3836f6(0x12c)]),'threadId':_0x5069f6['threadId'],'personId':(_0xfaada0=(_0x2bcc3d=_0x5069f6[_0x3836f6(0xe7)])==null?void 0x0:_0x2bcc3d['userID'])!=null?_0xfaada0:_0x5069f6[_0x3836f6(0xdc)],'text':JSON[_0x3836f6(0x113)](_0x5069f6[_0x3836f6(0x13b)]),'parentId':_0x27ec06['id']});break;}case v[_0x3836f6(0x108)]:{const _0xd124b=this[_0x3836f6(0x127)]['getComment'](_0x59a87e,_0x1dade0,_0x5069f6[_0x3836f6(0x139)]);_0xd124b&&_0xd124b[_0x3836f6(0xed)]&&this[_0x3836f6(0x127)][_0x3836f6(0x11f)](_0x59a87e,_0x1dade0,_0x5069f6['replyId']);break;}case v[_0x3836f6(0x12a)]:{this[_0x3836f6(0x127)][_0x3836f6(0x11a)](_0x59a87e,_0x1dade0,{'commentId':_0x5069f6[_0x3836f6(0x139)],'text':JSON[_0x3836f6(0x113)](_0x5069f6[_0x3836f6(0x13b)])});break;}case v[_0x3836f6(0xe6)]:{const _0x145c08=(_0x104ed9=this[_0x3836f6(0x127)][_0x3836f6(0x105)](_0x5069f6[_0x3836f6(0x12f)])[_0x3836f6(0xec)](_0x2c30a0=>_0x2c30a0['threadId']===_0x5069f6[_0x3836f6(0xfb)]))==null?void 0x0:_0x104ed9[_0x3836f6(0x118)];_0x145c08&&this[_0x3836f6(0x127)][_0x3836f6(0x12b)](_0x59a87e,_0x1dade0,_0x145c08['id'],_0x5069f6['solved']===I[_0x3836f6(0x141)]);break;}}}));}};_=V([p(0x0,_0x59c243(_0x51f550)),p(0x1,_0x59c243(_0x5a5cbf)),p(0x2,_0x59c243(_0x14c9e0)),p(0x3,_0x59c243(_0xeb12e8))],_);const z=_0x4e6633(0x13a),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x17a9c7,_0x5a5276,_0x555dce,_0x1a3123)=>{const _0xf93cb9=_0x4e6633;for(var _0x3a512f=_0x1a3123>0x1?void 0x0:_0x1a3123?k(_0x5a5276,_0x555dce):_0x5a5276,_0xf825ae=_0x17a9c7[_0xf93cb9(0x102)]-0x1,_0x789ec1;_0xf825ae>=0x0;_0xf825ae--)(_0x789ec1=_0x17a9c7[_0xf825ae])&&(_0x3a512f=_0x789ec1(_0x3a512f)||_0x3a512f);return _0x3a512f;},b=(_0x5ee1c6,_0x424906)=>(_0x5b85c2,_0x2bc98e)=>_0x424906(_0x5b85c2,_0x2bc98e,_0x5ee1c6);function X(_0x5e99cb,_0x50b5d1){const _0x53ec89=_0x4e6633,_0x46df1d=_0x5e99cb['replies'][0x0];return{..._0x50b5d1,'id':_0x46df1d['replyId'],'resolved':_0x5e99cb['solved']===0x1,'dT':y(_0x46df1d[_0x53ec89(0x12c)]),'personId':_0x46df1d[_0x53ec89(0xdc)],'threadId':_0x46df1d['threadId']};}function ee(_0xea4671,_0x12c5dc,_0x39dafd){const _0x7065e2=_0x4e6633;var _0x5b1eb4,_0x4b953f;if(((_0x4b953f=(_0x5b1eb4=_0xea4671==null?void 0x0:_0xea4671[_0x7065e2(0xf4)])==null?void 0x0:_0x5b1eb4['length'])!=null?_0x4b953f:0x0)>0x0){const _0x139d94=(_0x2922d0,_0x5db686)=>({'id':_0x2922d0[_0x7065e2(0x139)],'threadId':_0x2922d0[_0x7065e2(0xfb)],'dT':y(_0x2922d0['createTimestamp']),'personId':_0x2922d0[_0x7065e2(0xdc)],'resolved':_0xea4671[_0x7065e2(0xf3)]===I[_0x7065e2(0x141)],'unitId':_0x12c5dc,'subUnitId':_0x39dafd,'text':JSON[_0x7065e2(0x113)](_0x2922d0['content']),'parentId':_0x5db686}),_0x146cc3=_0x139d94(_0xea4671['replies'][0x0]);return{..._0x146cc3,'children':_0xea4671[_0x7065e2(0xf4)][_0x7065e2(0xf8)](0x1)[_0x7065e2(0x130)](_0x4fbbaf=>_0x139d94(_0x4fbbaf,_0x146cc3['id']))};}return null;}let S=class{constructor(_0x3252fb,_0x45f3f6,_0xc9c70){const _0x471900=_0x4e6633;this[_0x471900(0x119)]=_0x3252fb,this['_userService']=_0x45f3f6,this[_0x471900(0xf6)]=_0xc9c70;}async[_0x4e6633(0xf9)](_0xb56829){const _0x47a5ee=_0x4e6633;var _0x813225,_0x1f7312;const {parentId:_0x100853,unitId:_0x573b9d,text:_0x435aaa,threadId:_0x252015}=_0xb56829,_0x13e0ff=(_0x1f7312=(_0x813225=_0x435aaa[_0x47a5ee(0x10f)])==null?void 0x0:_0x813225[_0x47a5ee(0x11d)](_0xc78e3=>_0xc78e3[_0x47a5ee(0x110)]===_0x507b57[_0x47a5ee(0x10c)])[_0x47a5ee(0x130)](_0x4e4773=>_0x4e4773[_0x47a5ee(0x120)]))!=null?_0x1f7312:[],_0xe10e94=JSON['stringify'](_0x435aaa),_0x5bc071=(await this[_0x47a5ee(0xf6)][_0x47a5ee(0xfe)](_0x573b9d))['getMemberID']();if(_0x100853){const _0x3ea10c={'memberId':_0x5bc071,'unitId':_0x573b9d,'content':_0xe10e94,'mention':_0x13e0ff,'threadId':_0x252015},_0x2b6183=(await this[_0x47a5ee(0x119)][_0x47a5ee(0x10a)]('/universer-api/comment/unit/'+_0x573b9d+_0x47a5ee(0xeb),{'body':_0x3ea10c}))[_0x47a5ee(0xef)][_0x47a5ee(0xdf)];return{..._0xb56829,'id':_0x2b6183['replyId'],'dT':_0x5a368a(+_0x2b6183[_0x47a5ee(0x12c)])[_0x47a5ee(0x137)](_0x47a5ee(0xe5)),'personId':_0x2b6183[_0x47a5ee(0xdc)]};}else{const _0x3bf463={'memberId':_0x5bc071,'unitId':_0x573b9d,'content':_0xe10e94,'mention':_0x13e0ff},_0x19eb77=await this[_0x47a5ee(0x119)][_0x47a5ee(0x10a)](_0x47a5ee(0x11b)+_0x573b9d+_0x47a5ee(0x111),{'body':_0x3bf463});return X(_0x19eb77[_0x47a5ee(0xef)][_0x47a5ee(0xee)],_0xb56829);}}async[_0x4e6633(0x11a)](_0x18b8de){const _0x1ed4a9=_0x4e6633;var _0x1294d1,_0x3a6392;const {text:_0x56a80b,unitId:_0x530052}=_0x18b8de,_0x32b931=(_0x3a6392=(_0x1294d1=_0x56a80b[_0x1ed4a9(0x10f)])==null?void 0x0:_0x1294d1[_0x1ed4a9(0x11d)](_0x5e4052=>_0x5e4052['rangeType']===_0x507b57[_0x1ed4a9(0x10c)])['map'](_0x58aef8=>_0x58aef8[_0x1ed4a9(0x120)]))!=null?_0x3a6392:[],_0x4459ff=JSON['stringify'](_0x56a80b),_0x56aeb3=_0x18b8de[_0x1ed4a9(0xfb)],_0x230239=_0x18b8de['id'],_0x5f2b30={'memberId':(await this[_0x1ed4a9(0xf6)][_0x1ed4a9(0xfe)](_0x530052))[_0x1ed4a9(0x103)](),'unitId':_0x530052,'threadId':_0x56aeb3,'mention':_0x32b931,'content':_0x4459ff,'replyId':_0x230239},_0x566307=await this[_0x1ed4a9(0x119)][_0x1ed4a9(0x10a)]('/universer-api/comment/unit/'+_0x530052+_0x1ed4a9(0x13e),{'body':_0x5f2b30});return!_0x566307['body'][_0x1ed4a9(0x107)]||_0x566307[_0x1ed4a9(0xef)][_0x1ed4a9(0x107)][_0x1ed4a9(0x124)]===0x1;}async[_0x4e6633(0x12b)](_0x118a61){const _0x4555dc=_0x4e6633,{unitId:_0x5939e5}=_0x118a61,_0x268203=_0x118a61[_0x4555dc(0xfb)],_0x432e79={'memberId':this[_0x4555dc(0x10d)][_0x4555dc(0x142)]()[_0x4555dc(0x121)],'unitId':_0x5939e5,'threadId':_0x268203,'solved':_0x118a61[_0x4555dc(0x134)]?I['Solved']:I[_0x4555dc(0x116)]},_0x2b7ced=await this[_0x4555dc(0x119)][_0x4555dc(0x10a)](_0x4555dc(0x11b)+_0x5939e5+_0x4555dc(0x10b),{'body':_0x432e79});return!_0x2b7ced['body']['error']||_0x2b7ced[_0x4555dc(0xef)][_0x4555dc(0x107)][_0x4555dc(0x124)]===0x1;}async[_0x4e6633(0x11f)](_0x1a03c6,_0x507932,_0xf3ecfc,_0x438c97){const _0x47b3c4=_0x4e6633,_0x1caae2={'memberId':(await this[_0x47b3c4(0xf6)][_0x47b3c4(0xfe)](_0x1a03c6))[_0x47b3c4(0x103)](),'threadId':_0xf3ecfc,'replyId':_0x438c97,'unitId':_0x1a03c6},_0x24eb38=await this[_0x47b3c4(0x119)][_0x47b3c4(0x10a)](_0x47b3c4(0x11b)+_0x1a03c6+'/delete',{'body':_0x1caae2});return!_0x24eb38[_0x47b3c4(0xef)][_0x47b3c4(0x107)]||_0x24eb38[_0x47b3c4(0xef)]['error'][_0x47b3c4(0x124)]===0x1;}async[_0x4e6633(0x138)](_0x324fcc,_0xa7fde8,_0x15a6ef){const _0x49f7e6=_0x4e6633,_0x1b87d4={'unitId':_0x324fcc,'threadId':_0x15a6ef},_0x15a7dc=await this[_0x49f7e6(0x119)][_0x49f7e6(0x10a)](_0x49f7e6(0x11b)+_0x324fcc+_0x49f7e6(0x11e),{'body':_0x1b87d4}),_0x37a446=_0x15a6ef[_0x49f7e6(0x130)](_0x26e25c=>ee(_0x15a7dc['body'][_0x49f7e6(0x133)][_0x26e25c],_0x324fcc,_0xa7fde8))[_0x49f7e6(0x11d)](Boolean);return Object['values'](_0x15a7dc[_0x49f7e6(0xef)][_0x49f7e6(0xf1)])['forEach'](_0x56c66b=>{const _0x508dd6=_0x49f7e6;this[_0x508dd6(0x10d)][_0x508dd6(0x104)](_0x56c66b);}),_0x37a446;}[_0x4e6633(0xe1)](_0x2fdd62){const _0x26f10f=_0x4e6633;return{'id':_0x2fdd62['id'],'threadId':_0x2fdd62[_0x26f10f(0xfb)],'ref':_0x2fdd62[_0x26f10f(0x117)]};}};S=Q([b(0x0,_0x59c243(_0x168213)),b(0x1,_0x59c243(_0x14c9e0)),b(0x2,_0x59c243(_0xa66c1b))],S);var re=Object[_0x4e6633(0xe3)],te=(_0x40c8f6,_0x823409,_0x4b5d99,_0x1d41dc)=>{for(var _0xd10a8=_0x1d41dc>0x1?void 0x0:_0x1d41dc?re(_0x823409,_0x4b5d99):_0x823409,_0x419cd9=_0x40c8f6['length']-0x1,_0x55be1c;_0x419cd9>=0x0;_0x419cd9--)(_0x55be1c=_0x40c8f6[_0x419cd9])&&(_0xd10a8=_0x55be1c(_0xd10a8)||_0xd10a8);return _0xd10a8;},M=(_0x1c7f58,_0x19937b)=>(_0x3292a0,_0x2fe54b)=>_0x19937b(_0x3292a0,_0x2fe54b,_0x1c7f58);let f=class extends _0x31c99b{constructor(_0x27dd17,_0x1aaa59){const _0x50c989=_0x4e6633;super(),this[_0x50c989(0x126)]=_0x27dd17,this[_0x50c989(0x112)]=_0x1aaa59,this[_0x50c989(0xf7)]();}[_0x4e6633(0xf7)](){const _0x35b4cd=_0x4e6633;this[_0x35b4cd(0x126)][_0x35b4cd(0xde)]=this[_0x35b4cd(0x112)],this[_0x35b4cd(0x126)][_0x35b4cd(0xfa)]=!0x1;}};f=te([M(0x0,_0x4c2523),M(0x1,_0x59c243(S))],f);var se=Object[_0x4e6633(0xfc)],oe=Object[_0x4e6633(0xe3)],ne=(_0x4c5daf,_0x380fa3,_0x4b9ee7)=>_0x380fa3 in _0x4c5daf?se(_0x4c5daf,_0x380fa3,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4b9ee7}):_0x4c5daf[_0x380fa3]=_0x4b9ee7,ie=(_0x2d3d4f,_0x55daa3,_0x211fba,_0x5e3b55)=>{const _0xb4cca4=_0x4e6633;for(var _0x193e4a=_0x5e3b55>0x1?void 0x0:_0x5e3b55?oe(_0x55daa3,_0x211fba):_0x55daa3,_0x3b55d1=_0x2d3d4f[_0xb4cca4(0x102)]-0x1,_0x589348;_0x3b55d1>=0x0;_0x3b55d1--)(_0x589348=_0x2d3d4f[_0x3b55d1])&&(_0x193e4a=_0x589348(_0x193e4a)||_0x193e4a);return _0x193e4a;},N=(_0x240564,_0x4dc48b)=>(_0x2b9c66,_0x3181d9)=>_0x4dc48b(_0x2b9c66,_0x3181d9,_0x240564),$=(_0x2d1798,_0x4a9f2f,_0x328cc4)=>ne(_0x2d1798,typeof _0x4a9f2f!='symbol'?_0x4a9f2f+'':_0x4a9f2f,_0x328cc4);let g=class extends _0x3c3863{constructor(_0x4ef847=O,_0x270a18,_0x24cb99){const _0x5b9b7f=_0x4e6633;super(),this[_0x5b9b7f(0x11c)]=_0x4ef847,this[_0x5b9b7f(0x13c)]=_0x270a18,this[_0x5b9b7f(0xe8)]=_0x24cb99;const {..._0x369556}=_0x1f9a22({},O,this[_0x5b9b7f(0x11c)]);this[_0x5b9b7f(0xe8)][_0x5b9b7f(0x143)](z,_0x369556);}[_0x4e6633(0xf0)](){const _0x49a3b8=_0x4e6633;[[S],[f],[_]][_0x49a3b8(0x101)](_0x4ae5c3=>{const _0x222584=_0x49a3b8;this[_0x222584(0x13c)][_0x222584(0xe0)](_0x4ae5c3);});}[_0x4e6633(0x12e)](){const _0x18a20c=_0x4e6633;this[_0x18a20c(0x13c)][_0x18a20c(0x114)](f),this[_0x18a20c(0x13c)]['get'](_);}};function _0x5f0e(_0x4ba7b8,_0x48f542){_0x4ba7b8=_0x4ba7b8-0xdc;const _0x238f7d=_0x238f();let _0x5f0e4f=_0x238f7d[_0x4ba7b8];return _0x5f0e4f;}$(g,_0x4e6633(0xe9),W),$(g,_0x4e6633(0xea),_0x6e2e34['UNIVER_UNKNOWN']),g=ie([_0x356271(_0x1aeb4f,_0x4407ef,_0x211b08),N(0x1,_0x59c243(_0xeb12e8)),N(0x2,_0x40e862)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x433b96=_0x2d2d;(function(_0x50bea8,_0xbb9379){const _0x47d297=_0x2d2d,_0x42fc46=_0x50bea8();while(!![]){try{const _0x4726c5=parseInt(_0x47d297(0x152))/0x1*(parseInt(_0x47d297(0x10b))/0x2)+parseInt(_0x47d297(0x11e))/0x3+parseInt(_0x47d297(0x147))/0x4*(parseInt(_0x47d297(0x117))/0x5)+parseInt(_0x47d297(0x162))/0x6*(-parseInt(_0x47d297(0x122))/0x7)+-parseInt(_0x47d297(0x153))/0x8+parseInt(_0x47d297(0x111))/0x9*(parseInt(_0x47d297(0x13f))/0xa)+parseInt(_0x47d297(0x12c))/0xb*(-parseInt(_0x47d297(0x15d))/0xc);if(_0x4726c5===_0xbb9379)break;else _0x42fc46['push'](_0x42fc46['shift']());}catch(_0x31e359){_0x42fc46['push'](_0x42fc46['shift']());}}}(_0x3c1b,0x48652));import{CommentService as _0x27be94,CollaborationSessionService as _0x23c102,UniverCollaborationClientPlugin as _0x47447c}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x51e432}from'@univerjs-pro/license';import{dayjs as _0x502aa8,UserManagerService as _0x3e832f,Inject as _0x19a2f3,Injector as _0x1c9719,Disposable as _0x35f606,CustomRangeType as _0x2671e9,UniverInstanceType as _0x1a8c17,DependentOn as _0x5d048e,IConfigService as _0x3e7a47,Plugin as _0x5ee83e,merge as _0x1eba46}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x48228f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x541f7f,IThreadCommentDataSourceService as _0x22dd5c}from'@univerjs/thread-comment';import{bufferTime as _0x5655f9}from'rxjs';import{HTTPService as _0x588861}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x40dae8=>(_0x40dae8[_0x40dae8[_0x433b96(0x169)]=0x0]=_0x433b96(0x169),_0x40dae8[_0x40dae8[_0x433b96(0x142)]=0x1]=_0x433b96(0x142),_0x40dae8[_0x40dae8['UNRECOGNIZED']=-0x1]=_0x433b96(0x11d),_0x40dae8))(I||{}),v=(_0x273244=>(_0x273244[_0x273244[_0x433b96(0x114)]=0x0]=_0x433b96(0x114),_0x273244[_0x273244[_0x433b96(0x104)]=0x1]=_0x433b96(0x104),_0x273244[_0x273244[_0x433b96(0x131)]=0x2]=_0x433b96(0x131),_0x273244[_0x273244[_0x433b96(0x115)]=0x3]='Edit',_0x273244[_0x273244[_0x433b96(0x103)]=0x4]=_0x433b96(0x103),_0x273244[_0x273244[_0x433b96(0x140)]=0x5]=_0x433b96(0x140),_0x273244[_0x273244['UNRECOGNIZED']=-0x1]=_0x433b96(0x11d),_0x273244))(v||{});const y=_0x51a32e=>_0x502aa8(new Date(+_0x51a32e))['format'](_0x433b96(0x10f)),B=async(_0x14d92c,_0x49c8e0)=>{const _0x4dd617=_0x433b96,_0x9fe6e8=_0x14d92c[_0x4dd617(0x138)](_0x3e832f),_0x44f06c=_0x14d92c[_0x4dd617(0x138)](_0x588861);_0x49c8e0[_0x4dd617(0x15e)](_0x4f8176=>{const _0x369fa5=_0x4dd617;_0x9fe6e8[_0x369fa5(0x13b)](_0x4f8176)&&_0x49c8e0[_0x369fa5(0x11b)](_0x4f8176);}),_0x49c8e0[_0x4dd617(0x156)]&&(await _0x44f06c['get'](_0x4dd617(0x123),{'params':{'userIDs':[..._0x49c8e0]}}))[_0x4dd617(0x161)][_0x4dd617(0x157)]['forEach'](_0x16cc0b=>{_0x16cc0b&&_0x9fe6e8['addUser'](_0x16cc0b);});};var K=Object[_0x433b96(0x14c)],V=(_0x10f3ee,_0x2e2253,_0x59214d,_0x2b6314)=>{for(var _0x57118e=_0x2b6314>0x1?void 0x0:_0x2b6314?K(_0x2e2253,_0x59214d):_0x2e2253,_0x55461d=_0x10f3ee['length']-0x1,_0x1b5262;_0x55461d>=0x0;_0x55461d--)(_0x1b5262=_0x10f3ee[_0x55461d])&&(_0x57118e=_0x1b5262(_0x57118e)||_0x57118e);return _0x57118e;},p=(_0x5cf432,_0x5a478f)=>(_0x3e1be0,_0x4cf1b0)=>_0x5a478f(_0x3e1be0,_0x4cf1b0,_0x5cf432);let _=class extends _0x35f606{constructor(_0x25c1f3,_0x266fc4,_0x441f07,_0x4e875f){const _0x773ae4=_0x433b96;super(),this[_0x773ae4(0x108)]=_0x25c1f3,this[_0x773ae4(0x143)]=_0x266fc4,this[_0x773ae4(0x145)]=_0x441f07,this[_0x773ae4(0x13c)]=_0x4e875f,this[_0x773ae4(0x12f)](),this[_0x773ae4(0x135)]();}[_0x433b96(0x135)](){const _0x47686c=_0x433b96;this['disposeWithMe'](this[_0x47686c(0x143)][_0x47686c(0x163)]['pipe'](_0x5655f9(0x10))[_0x47686c(0x144)](_0x23662b=>{const _0x4f1827=_0x47686c,_0x879589=new Set();_0x23662b[_0x4f1827(0x15e)](_0x44ec6b=>{const _0x3b3520=_0x4f1827;if(_0x44ec6b[_0x3b3520(0x130)]===_0x3b3520(0x116)){const _0x527aea=_0x44ec6b[_0x3b3520(0x166)]['personId'];_0x879589[_0x3b3520(0x116)](_0x527aea);}}),B(this[_0x4f1827(0x13c)],_0x879589);}));}[_0x433b96(0x12f)](){const _0x489d87=_0x433b96;this['disposeWithMe'](this['_commentService'][_0x489d87(0x163)][_0x489d87(0x144)](async _0x13ba43=>{const _0x40975b=_0x489d87;var _0x36b484,_0x1c9635,_0x26b4c2,_0x1267b7;const _0x56dc6d=(_0x36b484=this[_0x40975b(0x143)][_0x40975b(0x11f)](_0x13ba43['unitId'])[_0x40975b(0x150)](_0x52439b=>_0x52439b[_0x40975b(0x12e)]===_0x13ba43[_0x40975b(0x12e)]))==null?void 0x0:_0x36b484[_0x40975b(0x110)];if(!_0x56dc6d)return;const {unitId:_0xbddecb,subUnitId:_0x581a2a}=_0x56dc6d;switch(_0x13ba43['user']&&this['_userService'][_0x40975b(0x139)](_0x13ba43[_0x40975b(0x11c)]),_0x13ba43[_0x40975b(0x130)]){case v['Add']:break;case v['Reply']:{this[_0x40975b(0x143)][_0x40975b(0x12b)](_0xbddecb,_0x581a2a,{'unitId':_0xbddecb,'subUnitId':_0x581a2a,'ref':'','id':_0x13ba43[_0x40975b(0x165)],'dT':y(+_0x13ba43[_0x40975b(0x155)]),'threadId':_0x13ba43[_0x40975b(0x12e)],'personId':(_0x26b4c2=(_0x1c9635=_0x13ba43[_0x40975b(0x11c)])==null?void 0x0:_0x1c9635['userID'])!=null?_0x26b4c2:_0x13ba43[_0x40975b(0x149)],'text':JSON[_0x40975b(0x14e)](_0x13ba43[_0x40975b(0x10c)]),'parentId':_0x56dc6d['id']});break;}case v[_0x40975b(0x103)]:{const _0x2eb9c1=this[_0x40975b(0x143)][_0x40975b(0x121)](_0xbddecb,_0x581a2a,_0x13ba43[_0x40975b(0x165)]);_0x2eb9c1&&_0x2eb9c1[_0x40975b(0x167)]&&this[_0x40975b(0x143)][_0x40975b(0x146)](_0xbddecb,_0x581a2a,_0x13ba43['replyId']);break;}case v[_0x40975b(0x115)]:{this['_threadCommentModel']['updateComment'](_0xbddecb,_0x581a2a,{'commentId':_0x13ba43[_0x40975b(0x165)],'text':JSON[_0x40975b(0x14e)](_0x13ba43['content'])});break;}case v[_0x40975b(0x140)]:{const _0x56638a=(_0x1267b7=this[_0x40975b(0x143)][_0x40975b(0x11f)](_0x13ba43[_0x40975b(0x10d)])[_0x40975b(0x150)](_0x116310=>_0x116310[_0x40975b(0x12e)]===_0x13ba43[_0x40975b(0x12e)]))==null?void 0x0:_0x1267b7[_0x40975b(0x110)];_0x56638a&&this[_0x40975b(0x143)][_0x40975b(0x136)](_0xbddecb,_0x581a2a,_0x56638a['id'],_0x13ba43[_0x40975b(0x15b)]===I['Solved']);break;}}}));}};_=V([p(0x0,_0x19a2f3(_0x27be94)),p(0x1,_0x19a2f3(_0x541f7f)),p(0x2,_0x19a2f3(_0x3e832f)),p(0x3,_0x19a2f3(_0x1c9719))],_);const z=_0x433b96(0x133),O={};var k=Object[_0x433b96(0x14c)],Q=(_0x3f5b43,_0x1d6a02,_0x4fe5fb,_0x3de444)=>{const _0x39f9c5=_0x433b96;for(var _0x348d3e=_0x3de444>0x1?void 0x0:_0x3de444?k(_0x1d6a02,_0x4fe5fb):_0x1d6a02,_0x2ba7c8=_0x3f5b43[_0x39f9c5(0x105)]-0x1,_0x5b29ec;_0x2ba7c8>=0x0;_0x2ba7c8--)(_0x5b29ec=_0x3f5b43[_0x2ba7c8])&&(_0x348d3e=_0x5b29ec(_0x348d3e)||_0x348d3e);return _0x348d3e;},b=(_0x2b7581,_0x346c15)=>(_0x2926e0,_0x11b43a)=>_0x346c15(_0x2926e0,_0x11b43a,_0x2b7581);function X(_0x1a6340,_0xaf4e7){const _0x3d962d=_0x433b96,_0x10e3a4=_0x1a6340[_0x3d962d(0x137)][0x0];return{..._0xaf4e7,'id':_0x10e3a4[_0x3d962d(0x165)],'resolved':_0x1a6340['solved']===0x1,'dT':y(_0x10e3a4['createTimestamp']),'personId':_0x10e3a4[_0x3d962d(0x149)],'threadId':_0x10e3a4[_0x3d962d(0x12e)]};}function ee(_0x16cba8,_0x193cb6,_0x58d4e7){const _0x37937c=_0x433b96;var _0x24ea70,_0x5b362c;if(((_0x5b362c=(_0x24ea70=_0x16cba8==null?void 0x0:_0x16cba8[_0x37937c(0x137)])==null?void 0x0:_0x24ea70[_0x37937c(0x105)])!=null?_0x5b362c:0x0)>0x0){const _0x27a919=(_0x488fc2,_0x7e0f8d)=>({'id':_0x488fc2['replyId'],'threadId':_0x488fc2[_0x37937c(0x12e)],'dT':y(_0x488fc2[_0x37937c(0x155)]),'personId':_0x488fc2['userId'],'resolved':_0x16cba8[_0x37937c(0x15b)]===I['Solved'],'unitId':_0x193cb6,'subUnitId':_0x58d4e7,'text':JSON[_0x37937c(0x14e)](_0x488fc2[_0x37937c(0x10c)]),'parentId':_0x7e0f8d}),_0x107c7d=_0x27a919(_0x16cba8[_0x37937c(0x137)][0x0]);return{..._0x107c7d,'children':_0x16cba8[_0x37937c(0x137)][_0x37937c(0x168)](0x1)['map'](_0x1e08bc=>_0x27a919(_0x1e08bc,_0x107c7d['id']))};}return null;}function _0x3c1b(){const _0x2e1a90=['Delete','Add','length','_config','filter','_commentService','format','rangeType','18VgaRom','content','unitId','values','YYYY/MM/DD\x20HH:mm','root','9SVmUEB','saveCommentToSnapshot','code','Unknown','Edit','add','5RNgFst','map','comments','getCurrentUser','delete','user','UNRECOGNIZED','1129521mAfFll','getUnit','reply','getComment','525yoKHhZ','/universer-api/user/list','COMMENT','listComments','stringify','ref','_initDataSource','pluginName','resolved','addComment','67749NFxljc','_configService','threadId','_init','type','Reply','/delete','thread-comment-data-source.config','/add','_initUserSync','resolveComment','replies','get','addUser','userID','getUser','_injector','setConfig','UNIVER_UNKNOWN','3002530ZXmUzJ','Solve','rangeId','Solved','_threadCommentModel','subscribe','_userService','deleteComment','531064ZYWPlg','/reply','userId','_httpService','getMemberID','getOwnPropertyDescriptor','post','parse','customRanges','find','/edit','31227gXTnXh','4117336iRvNMz','_threadCommentDataSourceService','createTimestamp','size','users','syncUpdateMutationToColla','_sessionService','error','solved','/universer-api/comment/unit/','396mNynyT','forEach','_threadCommentDataSource','/list','body','6090LoMMXa','commentUpdate$','requireSession','replyId','payload','parentId','slice','OpenOrReOpen'];_0x3c1b=function(){return _0x2e1a90;};return _0x3c1b();}let S=class{constructor(_0x56ebf8,_0x1f435e,_0x34fb4f){const _0x713bf=_0x433b96;this[_0x713bf(0x14a)]=_0x56ebf8,this[_0x713bf(0x145)]=_0x1f435e,this[_0x713bf(0x159)]=_0x34fb4f;}async[_0x433b96(0x12b)](_0x1e0166){const _0x33e0e9=_0x433b96;var _0x218879,_0x1a5ad3;const {parentId:_0x3e0de8,unitId:_0x5354e5,text:_0x547d21,threadId:_0x4eb96d}=_0x1e0166,_0x210e39=(_0x1a5ad3=(_0x218879=_0x547d21[_0x33e0e9(0x14f)])==null?void 0x0:_0x218879[_0x33e0e9(0x107)](_0x5ac22e=>_0x5ac22e[_0x33e0e9(0x10a)]===_0x2671e9[_0x33e0e9(0x124)])[_0x33e0e9(0x118)](_0x4a523b=>_0x4a523b['rangeId']))!=null?_0x1a5ad3:[],_0x3ba879=JSON['stringify'](_0x547d21),_0xda0c44=(await this[_0x33e0e9(0x159)][_0x33e0e9(0x164)](_0x5354e5))[_0x33e0e9(0x14b)]();if(_0x3e0de8){const _0x1e7e36={'memberId':_0xda0c44,'unitId':_0x5354e5,'content':_0x3ba879,'mention':_0x210e39,'threadId':_0x4eb96d},_0x45eb26=(await this[_0x33e0e9(0x14a)]['post'](_0x33e0e9(0x15c)+_0x5354e5+_0x33e0e9(0x148),{'body':_0x1e7e36}))[_0x33e0e9(0x161)][_0x33e0e9(0x120)];return{..._0x1e0166,'id':_0x45eb26[_0x33e0e9(0x165)],'dT':_0x502aa8(+_0x45eb26[_0x33e0e9(0x155)])[_0x33e0e9(0x109)](_0x33e0e9(0x10f)),'personId':_0x45eb26['userId']};}else{const _0x2b6205={'memberId':_0xda0c44,'unitId':_0x5354e5,'content':_0x3ba879,'mention':_0x210e39},_0x496b40=await this[_0x33e0e9(0x14a)]['post'](_0x33e0e9(0x15c)+_0x5354e5+_0x33e0e9(0x134),{'body':_0x2b6205});return X(_0x496b40[_0x33e0e9(0x161)]['comment'],_0x1e0166);}}async['updateComment'](_0x1349ba){const _0x383eaf=_0x433b96;var _0x552fab,_0x529c60;const {text:_0x293243,unitId:_0x38ea43}=_0x1349ba,_0x20e1dc=(_0x529c60=(_0x552fab=_0x293243[_0x383eaf(0x14f)])==null?void 0x0:_0x552fab['filter'](_0x12a5cc=>_0x12a5cc[_0x383eaf(0x10a)]===_0x2671e9[_0x383eaf(0x124)])[_0x383eaf(0x118)](_0x531ac0=>_0x531ac0[_0x383eaf(0x141)]))!=null?_0x529c60:[],_0x307461=JSON[_0x383eaf(0x126)](_0x293243),_0x24494d=_0x1349ba['threadId'],_0x44d4b3=_0x1349ba['id'],_0x241784={'memberId':(await this[_0x383eaf(0x159)]['requireSession'](_0x38ea43))['getMemberID'](),'unitId':_0x38ea43,'threadId':_0x24494d,'mention':_0x20e1dc,'content':_0x307461,'replyId':_0x44d4b3},_0x4999e7=await this[_0x383eaf(0x14a)][_0x383eaf(0x14d)](_0x383eaf(0x15c)+_0x38ea43+_0x383eaf(0x151),{'body':_0x241784});return!_0x4999e7[_0x383eaf(0x161)][_0x383eaf(0x15a)]||_0x4999e7[_0x383eaf(0x161)][_0x383eaf(0x15a)][_0x383eaf(0x113)]===0x1;}async['resolveComment'](_0x1ac0c1){const _0x2dc82c=_0x433b96,{unitId:_0x1d17ed}=_0x1ac0c1,_0xc49917=_0x1ac0c1[_0x2dc82c(0x12e)],_0x41b141={'memberId':this[_0x2dc82c(0x145)][_0x2dc82c(0x11a)]()[_0x2dc82c(0x13a)],'unitId':_0x1d17ed,'threadId':_0xc49917,'solved':_0x1ac0c1[_0x2dc82c(0x12a)]?I['Solved']:I[_0x2dc82c(0x169)]},_0x58df3f=await this[_0x2dc82c(0x14a)]['post'](_0x2dc82c(0x15c)+_0x1d17ed+'/solved',{'body':_0x41b141});return!_0x58df3f[_0x2dc82c(0x161)][_0x2dc82c(0x15a)]||_0x58df3f[_0x2dc82c(0x161)]['error'][_0x2dc82c(0x113)]===0x1;}async[_0x433b96(0x146)](_0x228c3d,_0xbb5bb9,_0x5343dc,_0x5b9a01){const _0xc5baf3=_0x433b96,_0x520b22={'memberId':(await this[_0xc5baf3(0x159)][_0xc5baf3(0x164)](_0x228c3d))['getMemberID'](),'threadId':_0x5343dc,'replyId':_0x5b9a01,'unitId':_0x228c3d},_0x53ca17=await this[_0xc5baf3(0x14a)][_0xc5baf3(0x14d)](_0xc5baf3(0x15c)+_0x228c3d+_0xc5baf3(0x132),{'body':_0x520b22});return!_0x53ca17['body']['error']||_0x53ca17['body'][_0xc5baf3(0x15a)][_0xc5baf3(0x113)]===0x1;}async[_0x433b96(0x125)](_0x11f100,_0x390026,_0x25f4a4){const _0x2d1cde=_0x433b96,_0x5a04f1={'unitId':_0x11f100,'threadId':_0x25f4a4},_0x5d105d=await this['_httpService'][_0x2d1cde(0x14d)](_0x2d1cde(0x15c)+_0x11f100+_0x2d1cde(0x160),{'body':_0x5a04f1}),_0x3f0bba=_0x25f4a4[_0x2d1cde(0x118)](_0x133227=>ee(_0x5d105d[_0x2d1cde(0x161)][_0x2d1cde(0x119)][_0x133227],_0x11f100,_0x390026))[_0x2d1cde(0x107)](Boolean);return Object[_0x2d1cde(0x10e)](_0x5d105d[_0x2d1cde(0x161)][_0x2d1cde(0x157)])['forEach'](_0x1c123b=>{const _0x434c66=_0x2d1cde;this['_userService'][_0x434c66(0x139)](_0x1c123b);}),_0x3f0bba;}[_0x433b96(0x112)](_0x226f37){const _0x4711dd=_0x433b96;return{'id':_0x226f37['id'],'threadId':_0x226f37[_0x4711dd(0x12e)],'ref':_0x226f37[_0x4711dd(0x127)]};}};S=Q([b(0x0,_0x19a2f3(_0x588861)),b(0x1,_0x19a2f3(_0x3e832f)),b(0x2,_0x19a2f3(_0x23c102))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x25486c,_0x2b1918,_0xe538fb,_0x460f47)=>{const _0x1e7bc4=_0x433b96;for(var _0x28ce06=_0x460f47>0x1?void 0x0:_0x460f47?re(_0x2b1918,_0xe538fb):_0x2b1918,_0x12bd81=_0x25486c[_0x1e7bc4(0x105)]-0x1,_0x837542;_0x12bd81>=0x0;_0x12bd81--)(_0x837542=_0x25486c[_0x12bd81])&&(_0x28ce06=_0x837542(_0x28ce06)||_0x28ce06);return _0x28ce06;},M=(_0x51aa06,_0x3ec4df)=>(_0x2f426d,_0x2b5afd)=>_0x3ec4df(_0x2f426d,_0x2b5afd,_0x51aa06);let f=class extends _0x35f606{constructor(_0x3d6206,_0xe8f24e){const _0x87d9b=_0x433b96;super(),this[_0x87d9b(0x154)]=_0x3d6206,this['_threadCommentDataSource']=_0xe8f24e,this['_initDataSource']();}[_0x433b96(0x128)](){const _0x4759ad=_0x433b96;this[_0x4759ad(0x154)]['dataSource']=this[_0x4759ad(0x15f)],this['_threadCommentDataSourceService'][_0x4759ad(0x158)]=!0x1;}};f=te([M(0x0,_0x22dd5c),M(0x1,_0x19a2f3(S))],f);function _0x2d2d(_0x2a3eac,_0x2cd947){_0x2a3eac=_0x2a3eac-0x103;const _0x3c1b51=_0x3c1b();let _0x2d2d46=_0x3c1b51[_0x2a3eac];return _0x2d2d46;}var se=Object['defineProperty'],oe=Object['getOwnPropertyDescriptor'],ne=(_0x3dc511,_0x16befb,_0x2177aa)=>_0x16befb in _0x3dc511?se(_0x3dc511,_0x16befb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x2177aa}):_0x3dc511[_0x16befb]=_0x2177aa,ie=(_0x378558,_0x40153c,_0x2e7d75,_0x1cf7df)=>{const _0x4f9018=_0x433b96;for(var _0x3962bf=_0x1cf7df>0x1?void 0x0:_0x1cf7df?oe(_0x40153c,_0x2e7d75):_0x40153c,_0x391e69=_0x378558[_0x4f9018(0x105)]-0x1,_0x4a6900;_0x391e69>=0x0;_0x391e69--)(_0x4a6900=_0x378558[_0x391e69])&&(_0x3962bf=_0x4a6900(_0x3962bf)||_0x3962bf);return _0x3962bf;},N=(_0x46a19f,_0x429be6)=>(_0x4ed3d9,_0x3891c9)=>_0x429be6(_0x4ed3d9,_0x3891c9,_0x46a19f),$=(_0x200737,_0x18b45a,_0xd171c6)=>ne(_0x200737,typeof _0x18b45a!='symbol'?_0x18b45a+'':_0x18b45a,_0xd171c6);let g=class extends _0x5ee83e{constructor(_0x546da7=O,_0x10b821,_0x6bb5ba){const _0x55bfec=_0x433b96;super(),this[_0x55bfec(0x106)]=_0x546da7,this[_0x55bfec(0x13c)]=_0x10b821,this[_0x55bfec(0x12d)]=_0x6bb5ba;const {..._0x5ef9c9}=_0x1eba46({},O,this[_0x55bfec(0x106)]);this[_0x55bfec(0x12d)][_0x55bfec(0x13d)](z,_0x5ef9c9);}['onStarting'](){const _0x204933=_0x433b96;[[S],[f],[_]][_0x204933(0x15e)](_0x174d8e=>{const _0x353bc6=_0x204933;this[_0x353bc6(0x13c)][_0x353bc6(0x116)](_0x174d8e);});}['onReady'](){const _0x247d36=_0x433b96;this[_0x247d36(0x13c)][_0x247d36(0x138)](f),this[_0x247d36(0x13c)][_0x247d36(0x138)](_);}};$(g,_0x433b96(0x129),W),$(g,_0x433b96(0x130),_0x1a8c17[_0x433b96(0x13e)]),g=ie([_0x5d048e(_0x48228f,_0x47447c,_0x51e432),N(0x1,_0x19a2f3(_0x1c9719)),N(0x2,_0x3e7a47)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- (function(_0x179b88,_0x57c26e){const _0x1c2191=_0x1a3d,_0x4dd0e6=_0x179b88();while(!![]){try{const _0x4d1e42=parseInt(_0x1c2191(0x17a))/0x1+-parseInt(_0x1c2191(0x102))/0x2*(-parseInt(_0x1c2191(0x122))/0x3)+parseInt(_0x1c2191(0x150))/0x4*(parseInt(_0x1c2191(0x110))/0x5)+parseInt(_0x1c2191(0xf8))/0x6+parseInt(_0x1c2191(0x13b))/0x7+-parseInt(_0x1c2191(0x131))/0x8*(parseInt(_0x1c2191(0x137))/0x9)+-parseInt(_0x1c2191(0xfe))/0xa;if(_0x4d1e42===_0x57c26e)break;else _0x4dd0e6['push'](_0x4dd0e6['shift']());}catch(_0x441432){_0x4dd0e6['push'](_0x4dd0e6['shift']());}}}(_0x4504,0xc458d),function(_0x490213,_0x567dcc){const _0x53f9ff=_0x1a3d;typeof exports==_0x53f9ff(0x132)&&typeof module<'u'?_0x567dcc(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define=='function'&&define[_0x53f9ff(0x162)]?define(['exports',_0x53f9ff(0x141),_0x53f9ff(0xfa),'@univerjs/core','@univerjs/thread-comment-ui',_0x53f9ff(0x11a),_0x53f9ff(0x157),_0x53f9ff(0x108)],_0x567dcc):(_0x490213=typeof globalThis<'u'?globalThis:_0x490213||self,_0x567dcc(_0x490213[_0x53f9ff(0x12f)]={},_0x490213[_0x53f9ff(0x11b)],_0x490213['UniverProLicense'],_0x490213[_0x53f9ff(0x14b)],_0x490213[_0x53f9ff(0x156)],_0x490213['UniverThreadComment'],_0x490213[_0x53f9ff(0x157)],_0x490213[_0x53f9ff(0x166)]));}(this,function(_0xe88295,_0x2d76f5,_0x2ad5ed,_0x280873,_0x3e5f69,_0x5c61de,_0x257451,_0x2574b8){'use strict';const _0x5f4109=_0x1a3d;const _0x5f522e=_0x5f4109(0x101);var _0x54239f=(_0x52e6a6=>(_0x52e6a6[_0x52e6a6['OpenOrReOpen']=0x0]=_0x5f4109(0x11e),_0x52e6a6[_0x52e6a6['Solved']=0x1]=_0x5f4109(0x160),_0x52e6a6[_0x52e6a6[_0x5f4109(0x155)]=-0x1]=_0x5f4109(0x155),_0x52e6a6))(_0x54239f||{}),_0x345605=(_0x21a68f=>(_0x21a68f[_0x21a68f[_0x5f4109(0x15b)]=0x0]=_0x5f4109(0x15b),_0x21a68f[_0x21a68f[_0x5f4109(0x165)]=0x1]=_0x5f4109(0x165),_0x21a68f[_0x21a68f[_0x5f4109(0x103)]=0x2]=_0x5f4109(0x103),_0x21a68f[_0x21a68f[_0x5f4109(0x100)]=0x3]='Edit',_0x21a68f[_0x21a68f[_0x5f4109(0x12d)]=0x4]='Delete',_0x21a68f[_0x21a68f['Solve']=0x5]=_0x5f4109(0x16b),_0x21a68f[_0x21a68f[_0x5f4109(0x155)]=-0x1]=_0x5f4109(0x155),_0x21a68f))(_0x345605||{});const _0x32b9d2=_0x3253e9=>_0x280873[_0x5f4109(0xff)](new Date(+_0x3253e9))[_0x5f4109(0x126)](_0x5f4109(0x169)),_0x2e444d=async(_0x5c0021,_0x62dbaa)=>{const _0x40b962=_0x5f4109,_0x16863b=_0x5c0021['get'](_0x280873[_0x40b962(0x14e)]),_0xed33c=_0x5c0021['get'](_0x2574b8['HTTPService']);_0x62dbaa[_0x40b962(0xf9)](_0x34a4be=>{const _0xa5afbd=_0x40b962;_0x16863b[_0xa5afbd(0x17c)](_0x34a4be)&&_0x62dbaa[_0xa5afbd(0x10b)](_0x34a4be);}),_0x62dbaa[_0x40b962(0x135)]&&(await _0xed33c[_0x40b962(0x114)](_0x40b962(0x136),{'params':{'userIDs':[..._0x62dbaa]}}))[_0x40b962(0x168)][_0x40b962(0x14c)][_0x40b962(0xf9)](_0x28899d=>{const _0x2d6415=_0x40b962;_0x28899d&&_0x16863b[_0x2d6415(0x170)](_0x28899d);});};var _0x4753be=Object[_0x5f4109(0x119)],_0x5dc35d=(_0x85bc05,_0x36bc87,_0x25869d,_0x5500e5)=>{const _0x330c64=_0x5f4109;for(var _0x52919d=_0x5500e5>0x1?void 0x0:_0x5500e5?_0x4753be(_0x36bc87,_0x25869d):_0x36bc87,_0x403957=_0x85bc05[_0x330c64(0x178)]-0x1,_0x475b64;_0x403957>=0x0;_0x403957--)(_0x475b64=_0x85bc05[_0x403957])&&(_0x52919d=_0x475b64(_0x52919d)||_0x52919d);return _0x52919d;},_0x115363=(_0x492f11,_0x346ed9)=>(_0x296e21,_0x2905b3)=>_0x346ed9(_0x296e21,_0x2905b3,_0x492f11);let _0x3c7110=class extends _0x280873['Disposable']{constructor(_0x4e98a6,_0x2eb17c,_0x1773ff,_0x49051d){const _0x1f2cbe=_0x5f4109;super(),this[_0x1f2cbe(0x11c)]=_0x4e98a6,this[_0x1f2cbe(0x175)]=_0x2eb17c,this['_userService']=_0x1773ff,this[_0x1f2cbe(0x147)]=_0x49051d,this[_0x1f2cbe(0x179)](),this[_0x1f2cbe(0x144)]();}[_0x5f4109(0x144)](){const _0x2bc7bf=_0x5f4109;this['disposeWithMe'](this[_0x2bc7bf(0x175)][_0x2bc7bf(0xfd)][_0x2bc7bf(0x128)](_0x257451['bufferTime'](0x10))[_0x2bc7bf(0x14f)](_0x69fce7=>{const _0x373d4c=_0x2bc7bf,_0x43fa46=new Set();_0x69fce7[_0x373d4c(0xf9)](_0x4440c5=>{const _0x31991d=_0x373d4c;if(_0x4440c5['type']==='add'){const _0x5f0c6e=_0x4440c5['payload'][_0x31991d(0x10c)];_0x43fa46['add'](_0x5f0c6e);}}),_0x2e444d(this[_0x373d4c(0x147)],_0x43fa46);}));}[_0x5f4109(0x179)](){const _0x521a37=_0x5f4109;this['disposeWithMe'](this['_commentService'][_0x521a37(0xfd)][_0x521a37(0x14f)](async _0x272f2e=>{const _0x1db5aa=_0x521a37;var _0x4f01f2,_0x3596be,_0x56d097,_0xf10f7a;const _0x217bc6=(_0x4f01f2=this[_0x1db5aa(0x175)][_0x1db5aa(0x173)](_0x272f2e[_0x1db5aa(0x138)])[_0x1db5aa(0x174)](_0x2006c5=>_0x2006c5[_0x1db5aa(0x164)]===_0x272f2e[_0x1db5aa(0x164)]))==null?void 0x0:_0x4f01f2[_0x1db5aa(0x152)];if(!_0x217bc6)return;const {unitId:_0xc78800,subUnitId:_0x226233}=_0x217bc6;switch(_0x272f2e[_0x1db5aa(0x153)]&&this['_userService'][_0x1db5aa(0x170)](_0x272f2e[_0x1db5aa(0x153)]),_0x272f2e[_0x1db5aa(0x12a)]){case _0x345605[_0x1db5aa(0x165)]:break;case _0x345605[_0x1db5aa(0x103)]:{this['_threadCommentModel'][_0x1db5aa(0x118)](_0xc78800,_0x226233,{'unitId':_0xc78800,'subUnitId':_0x226233,'ref':'','id':_0x272f2e[_0x1db5aa(0x12c)],'dT':_0x32b9d2(+_0x272f2e[_0x1db5aa(0x15d)]),'threadId':_0x272f2e['threadId'],'personId':(_0x56d097=(_0x3596be=_0x272f2e[_0x1db5aa(0x153)])==null?void 0x0:_0x3596be[_0x1db5aa(0x163)])!=null?_0x56d097:_0x272f2e['userId'],'text':JSON[_0x1db5aa(0x161)](_0x272f2e[_0x1db5aa(0x111)]),'parentId':_0x217bc6['id']});break;}case _0x345605['Delete']:{const _0x5f04fb=this[_0x1db5aa(0x175)][_0x1db5aa(0x145)](_0xc78800,_0x226233,_0x272f2e['replyId']);_0x5f04fb&&_0x5f04fb[_0x1db5aa(0x11f)]&&this[_0x1db5aa(0x175)]['deleteComment'](_0xc78800,_0x226233,_0x272f2e['replyId']);break;}case _0x345605[_0x1db5aa(0x100)]:{this[_0x1db5aa(0x175)][_0x1db5aa(0x16a)](_0xc78800,_0x226233,{'commentId':_0x272f2e[_0x1db5aa(0x12c)],'text':JSON[_0x1db5aa(0x161)](_0x272f2e[_0x1db5aa(0x111)])});break;}case _0x345605[_0x1db5aa(0x16b)]:{const _0x203962=(_0xf10f7a=this['_threadCommentModel']['getUnit'](_0x272f2e[_0x1db5aa(0x138)])[_0x1db5aa(0x174)](_0x8bbfc3=>_0x8bbfc3[_0x1db5aa(0x164)]===_0x272f2e[_0x1db5aa(0x164)]))==null?void 0x0:_0xf10f7a[_0x1db5aa(0x152)];_0x203962&&this[_0x1db5aa(0x175)][_0x1db5aa(0x140)](_0xc78800,_0x226233,_0x203962['id'],_0x272f2e[_0x1db5aa(0x14a)]===_0x54239f[_0x1db5aa(0x160)]);break;}}}));}};_0x3c7110=_0x5dc35d([_0x115363(0x0,_0x280873[_0x5f4109(0x17b)](_0x2d76f5[_0x5f4109(0x133)])),_0x115363(0x1,_0x280873['Inject'](_0x5c61de['ThreadCommentModel'])),_0x115363(0x2,_0x280873[_0x5f4109(0x17b)](_0x280873[_0x5f4109(0x14e)])),_0x115363(0x3,_0x280873[_0x5f4109(0x17b)](_0x280873['Injector']))],_0x3c7110);const _0x29658a=_0x5f4109(0x149),_0x3184c6={};var _0xfd088=Object[_0x5f4109(0x119)],_0x1602d3=(_0x294bed,_0x446b11,_0x3ce91d,_0x2fc2f5)=>{const _0x35c307=_0x5f4109;for(var _0x12b8e5=_0x2fc2f5>0x1?void 0x0:_0x2fc2f5?_0xfd088(_0x446b11,_0x3ce91d):_0x446b11,_0x23d6e1=_0x294bed[_0x35c307(0x178)]-0x1,_0x38cb82;_0x23d6e1>=0x0;_0x23d6e1--)(_0x38cb82=_0x294bed[_0x23d6e1])&&(_0x12b8e5=_0x38cb82(_0x12b8e5)||_0x12b8e5);return _0x12b8e5;},_0x1b1871=(_0x18dd7b,_0x1fd214)=>(_0x28ac19,_0x2c6406)=>_0x1fd214(_0x28ac19,_0x2c6406,_0x18dd7b);function _0x1a4cc2(_0x5a1ccc,_0x310768){const _0x678748=_0x5f4109,_0x3f9ac3=_0x5a1ccc[_0x678748(0x12e)][0x0];return{..._0x310768,'id':_0x3f9ac3[_0x678748(0x12c)],'resolved':_0x5a1ccc[_0x678748(0x14a)]===0x1,'dT':_0x32b9d2(_0x3f9ac3[_0x678748(0x15d)]),'personId':_0x3f9ac3[_0x678748(0x10e)],'threadId':_0x3f9ac3[_0x678748(0x164)]};}function _0x1908dc(_0x4b8626,_0x314f96,_0x453c67){const _0x155cf1=_0x5f4109;var _0x1fb9b4,_0x517ea0;if(((_0x517ea0=(_0x1fb9b4=_0x4b8626==null?void 0x0:_0x4b8626[_0x155cf1(0x12e)])==null?void 0x0:_0x1fb9b4[_0x155cf1(0x178)])!=null?_0x517ea0:0x0)>0x0){const _0x5ccc7c=(_0x187928,_0x1f25b8)=>({'id':_0x187928[_0x155cf1(0x12c)],'threadId':_0x187928['threadId'],'dT':_0x32b9d2(_0x187928[_0x155cf1(0x15d)]),'personId':_0x187928[_0x155cf1(0x10e)],'resolved':_0x4b8626['solved']===_0x54239f[_0x155cf1(0x160)],'unitId':_0x314f96,'subUnitId':_0x453c67,'text':JSON[_0x155cf1(0x161)](_0x187928[_0x155cf1(0x111)]),'parentId':_0x1f25b8}),_0x1d31a7=_0x5ccc7c(_0x4b8626['replies'][0x0]);return{..._0x1d31a7,'children':_0x4b8626['replies'][_0x155cf1(0xfc)](0x1)[_0x155cf1(0x13c)](_0x51ee7e=>_0x5ccc7c(_0x51ee7e,_0x1d31a7['id']))};}return null;}let _0x149527=class{constructor(_0x2cb7b5,_0x3e16a4,_0x69d262){const _0x34c722=_0x5f4109;this['_httpService']=_0x2cb7b5,this[_0x34c722(0x113)]=_0x3e16a4,this[_0x34c722(0xfb)]=_0x69d262;}async[_0x5f4109(0x118)](_0x1e6663){const _0x114eb8=_0x5f4109;var _0x5d7706,_0x2651af;const {parentId:_0x12f013,unitId:_0x511d2f,text:_0xfb7c2,threadId:_0x35b44c}=_0x1e6663,_0x4212b2=(_0x2651af=(_0x5d7706=_0xfb7c2[_0x114eb8(0x127)])==null?void 0x0:_0x5d7706[_0x114eb8(0x159)](_0x478c39=>_0x478c39[_0x114eb8(0x123)]===_0x280873[_0x114eb8(0x139)][_0x114eb8(0x124)])[_0x114eb8(0x13c)](_0x38c869=>_0x38c869[_0x114eb8(0x16c)]))!=null?_0x2651af:[],_0x5b5116=JSON[_0x114eb8(0x121)](_0xfb7c2),_0x5b9868=(await this[_0x114eb8(0xfb)]['requireSession'](_0x511d2f))['getMemberID']();if(_0x12f013){const _0x2a7776={'memberId':_0x5b9868,'unitId':_0x511d2f,'content':_0x5b5116,'mention':_0x4212b2,'threadId':_0x35b44c},_0x19dd5a=(await this[_0x114eb8(0x172)][_0x114eb8(0x125)](_0x114eb8(0x171)+_0x511d2f+_0x114eb8(0x158),{'body':_0x2a7776}))[_0x114eb8(0x168)]['reply'];return{..._0x1e6663,'id':_0x19dd5a[_0x114eb8(0x12c)],'dT':_0x280873[_0x114eb8(0xff)](+_0x19dd5a['createTimestamp'])[_0x114eb8(0x126)](_0x114eb8(0x169)),'personId':_0x19dd5a[_0x114eb8(0x10e)]};}else{const _0x4f4b98={'memberId':_0x5b9868,'unitId':_0x511d2f,'content':_0x5b5116,'mention':_0x4212b2},_0x7c8c1=await this[_0x114eb8(0x172)]['post'](_0x114eb8(0x171)+_0x511d2f+_0x114eb8(0x143),{'body':_0x4f4b98});return _0x1a4cc2(_0x7c8c1['body'][_0x114eb8(0x16f)],_0x1e6663);}}async['updateComment'](_0x289822){const _0x1d8f7e=_0x5f4109;var _0x3dd845,_0x301967;const {text:_0x1fa52e,unitId:_0x2cf95d}=_0x289822,_0x428331=(_0x301967=(_0x3dd845=_0x1fa52e['customRanges'])==null?void 0x0:_0x3dd845[_0x1d8f7e(0x159)](_0x13bbfd=>_0x13bbfd['rangeType']===_0x280873[_0x1d8f7e(0x139)][_0x1d8f7e(0x124)])['map'](_0x2994b3=>_0x2994b3[_0x1d8f7e(0x16c)]))!=null?_0x301967:[],_0x3b26d0=JSON[_0x1d8f7e(0x121)](_0x1fa52e),_0x4cb62f=_0x289822[_0x1d8f7e(0x164)],_0x2c3423=_0x289822['id'],_0x5e76c1={'memberId':(await this[_0x1d8f7e(0xfb)][_0x1d8f7e(0x151)](_0x2cf95d))[_0x1d8f7e(0x167)](),'unitId':_0x2cf95d,'threadId':_0x4cb62f,'mention':_0x428331,'content':_0x3b26d0,'replyId':_0x2c3423},_0x1ae2ca=await this[_0x1d8f7e(0x172)][_0x1d8f7e(0x125)](_0x1d8f7e(0x171)+_0x2cf95d+_0x1d8f7e(0x10a),{'body':_0x5e76c1});return!_0x1ae2ca['body']['error']||_0x1ae2ca[_0x1d8f7e(0x168)][_0x1d8f7e(0x176)][_0x1d8f7e(0x16d)]===0x1;}async[_0x5f4109(0x140)](_0x3c110d){const _0x46e2dc=_0x5f4109,{unitId:_0x169628}=_0x3c110d,_0x1b65c5=_0x3c110d['threadId'],_0x4682f4={'memberId':this[_0x46e2dc(0x113)][_0x46e2dc(0x13e)]()['userID'],'unitId':_0x169628,'threadId':_0x1b65c5,'solved':_0x3c110d[_0x46e2dc(0x11d)]?_0x54239f[_0x46e2dc(0x160)]:_0x54239f[_0x46e2dc(0x11e)]},_0x27c4c1=await this['_httpService'][_0x46e2dc(0x125)](_0x46e2dc(0x171)+_0x169628+_0x46e2dc(0x142),{'body':_0x4682f4});return!_0x27c4c1[_0x46e2dc(0x168)]['error']||_0x27c4c1[_0x46e2dc(0x168)]['error']['code']===0x1;}async['deleteComment'](_0x12bcc4,_0x402b3e,_0x293f1b,_0x3524a9){const _0x219490=_0x5f4109,_0x27e3db={'memberId':(await this['_sessionService'][_0x219490(0x151)](_0x12bcc4))[_0x219490(0x167)](),'threadId':_0x293f1b,'replyId':_0x3524a9,'unitId':_0x12bcc4},_0x4536e5=await this[_0x219490(0x172)][_0x219490(0x125)]('/universer-api/comment/unit/'+_0x12bcc4+_0x219490(0x106),{'body':_0x27e3db});return!_0x4536e5[_0x219490(0x168)][_0x219490(0x176)]||_0x4536e5['body']['error'][_0x219490(0x16d)]===0x1;}async[_0x5f4109(0x146)](_0x5e3e93,_0x2f0b36,_0x29d55f){const _0x105afa=_0x5f4109,_0x528e4a={'unitId':_0x5e3e93,'threadId':_0x29d55f},_0x26fecf=await this[_0x105afa(0x172)][_0x105afa(0x125)](_0x105afa(0x171)+_0x5e3e93+_0x105afa(0x120),{'body':_0x528e4a}),_0x47b9a6=_0x29d55f[_0x105afa(0x13c)](_0x5a2d20=>_0x1908dc(_0x26fecf[_0x105afa(0x168)][_0x105afa(0x177)][_0x5a2d20],_0x5e3e93,_0x2f0b36))[_0x105afa(0x159)](Boolean);return Object[_0x105afa(0x116)](_0x26fecf[_0x105afa(0x168)]['users'])[_0x105afa(0xf9)](_0x3ebb22=>{const _0x591d0b=_0x105afa;this['_userService'][_0x591d0b(0x170)](_0x3ebb22);}),_0x47b9a6;}[_0x5f4109(0x16e)](_0x118eaf){const _0x20097d=_0x5f4109;return{'id':_0x118eaf['id'],'threadId':_0x118eaf[_0x20097d(0x164)],'ref':_0x118eaf[_0x20097d(0x15a)]};}};_0x149527=_0x1602d3([_0x1b1871(0x0,_0x280873[_0x5f4109(0x17b)](_0x2574b8[_0x5f4109(0x104)])),_0x1b1871(0x1,_0x280873[_0x5f4109(0x17b)](_0x280873[_0x5f4109(0x14e)])),_0x1b1871(0x2,_0x280873[_0x5f4109(0x17b)](_0x2d76f5[_0x5f4109(0x117)]))],_0x149527);var _0x2c8db5=Object[_0x5f4109(0x119)],_0x3db69b=(_0x3f6df7,_0xed6e2b,_0x59219a,_0x1b6b45)=>{const _0x2c9e65=_0x5f4109;for(var _0x1a562e=_0x1b6b45>0x1?void 0x0:_0x1b6b45?_0x2c8db5(_0xed6e2b,_0x59219a):_0xed6e2b,_0xec1add=_0x3f6df7[_0x2c9e65(0x178)]-0x1,_0x2a08f1;_0xec1add>=0x0;_0xec1add--)(_0x2a08f1=_0x3f6df7[_0xec1add])&&(_0x1a562e=_0x2a08f1(_0x1a562e)||_0x1a562e);return _0x1a562e;},_0x381911=(_0x409c92,_0xe4d8c)=>(_0x4dd532,_0x38d4a0)=>_0xe4d8c(_0x4dd532,_0x38d4a0,_0x409c92);let _0x154b2a=class extends _0x280873[_0x5f4109(0x13d)]{constructor(_0x1975dd,_0x352822){const _0x45ddab=_0x5f4109;super(),this[_0x45ddab(0x105)]=_0x1975dd,this[_0x45ddab(0x15e)]=_0x352822,this[_0x45ddab(0x154)]();}[_0x5f4109(0x154)](){const _0x57ae3d=_0x5f4109;this['_threadCommentDataSourceService'][_0x57ae3d(0x129)]=this[_0x57ae3d(0x15e)],this[_0x57ae3d(0x105)][_0x57ae3d(0x115)]=!0x1;}};_0x154b2a=_0x3db69b([_0x381911(0x0,_0x5c61de[_0x5f4109(0xf7)]),_0x381911(0x1,_0x280873[_0x5f4109(0x17b)](_0x149527))],_0x154b2a);var _0x27a350=Object[_0x5f4109(0x148)],_0x1f90f7=Object['getOwnPropertyDescriptor'],_0x302d20=(_0x581dcf,_0xa3f833,_0x3161a0)=>_0xa3f833 in _0x581dcf?_0x27a350(_0x581dcf,_0xa3f833,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3161a0}):_0x581dcf[_0xa3f833]=_0x3161a0,_0x475134=(_0x92b75a,_0x1dac9d,_0x267ba2,_0x452b09)=>{const _0x5dff20=_0x5f4109;for(var _0x620595=_0x452b09>0x1?void 0x0:_0x452b09?_0x1f90f7(_0x1dac9d,_0x267ba2):_0x1dac9d,_0x3b2277=_0x92b75a[_0x5dff20(0x178)]-0x1,_0x339e92;_0x3b2277>=0x0;_0x3b2277--)(_0x339e92=_0x92b75a[_0x3b2277])&&(_0x620595=_0x339e92(_0x620595)||_0x620595);return _0x620595;},_0x557e5d=(_0x4fc85f,_0x34b564)=>(_0x3c4791,_0x39452f)=>_0x34b564(_0x3c4791,_0x39452f,_0x4fc85f),_0x1b28e5=(_0x49fa16,_0x32d083,_0x46fbd5)=>_0x302d20(_0x49fa16,typeof _0x32d083!='symbol'?_0x32d083+'':_0x32d083,_0x46fbd5);_0xe88295[_0x5f4109(0x112)]=class extends _0x280873['Plugin']{constructor(_0x466093=_0x3184c6,_0xf2c4e,_0x492a44){const _0x41adf6=_0x5f4109;super(),this[_0x41adf6(0x15c)]=_0x466093,this[_0x41adf6(0x147)]=_0xf2c4e,this[_0x41adf6(0x13f)]=_0x492a44;const {..._0x6c2889}=_0x280873[_0x41adf6(0x13a)]({},_0x3184c6,this['_config']);this[_0x41adf6(0x13f)][_0x41adf6(0x15f)](_0x29658a,_0x6c2889);}[_0x5f4109(0x134)](){[[_0x149527],[_0x154b2a],[_0x3c7110]]['forEach'](_0x4302d7=>{const _0x3f6499=_0x1a3d;this[_0x3f6499(0x147)][_0x3f6499(0x130)](_0x4302d7);});}[_0x5f4109(0x12b)](){const _0x9756d2=_0x5f4109;this[_0x9756d2(0x147)][_0x9756d2(0x114)](_0x154b2a),this['_injector']['get'](_0x3c7110);}},_0x1b28e5(_0xe88295['UniverThreadCommentDataSourcePlugin'],'pluginName',_0x5f522e),_0x1b28e5(_0xe88295[_0x5f4109(0x112)],_0x5f4109(0x12a),_0x280873[_0x5f4109(0x10d)][_0x5f4109(0x107)]),_0xe88295[_0x5f4109(0x112)]=_0x475134([_0x280873['DependentOn'](_0x3e5f69['UniverThreadCommentUIPlugin'],_0x2d76f5[_0x5f4109(0x10f)],_0x2ad5ed[_0x5f4109(0x14d)]),_0x557e5d(0x1,_0x280873[_0x5f4109(0x17b)](_0x280873['Injector'])),_0x557e5d(0x2,_0x280873[_0x5f4109(0x109)])],_0xe88295[_0x5f4109(0x112)]),Object['defineProperty'](_0xe88295,Symbol['toStringTag'],{'value':'Module'});}));function _0x1a3d(_0x124fcb,_0x504843){_0x124fcb=_0x124fcb-0xf7;const _0x450494=_0x4504();let _0x1a3dbf=_0x450494[_0x124fcb];return _0x1a3dbf;}function _0x4504(){const _0x426ab0=['IThreadCommentDataSourceService','5138160ShGnmL','forEach','@univerjs-pro/license','_sessionService','slice','commentUpdate$','13740450ICjAWp','dayjs','Edit','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','4GZKnQj','Reply','HTTPService','_threadCommentDataSourceService','/delete','UNIVER_UNKNOWN','@univerjs/network','IConfigService','/edit','delete','personId','UniverInstanceType','userId','UniverCollaborationClientPlugin','5BqigKI','content','UniverThreadCommentDataSourcePlugin','_userService','get','syncUpdateMutationToColla','values','CollaborationSessionService','addComment','getOwnPropertyDescriptor','@univerjs/thread-comment','UniverProCollaborationClient','_commentService','resolved','OpenOrReOpen','parentId','/list','stringify','50349zWfENm','rangeType','COMMENT','post','format','customRanges','pipe','dataSource','type','onReady','replyId','Delete','replies','UniverProThreadCommentDatasource','add','12844088SkVaSn','object','CommentService','onStarting','size','/universer-api/user/list','9FzGKmc','unitId','CustomRangeType','merge','9037896ieKxSc','map','Disposable','getCurrentUser','_configService','resolveComment','@univerjs-pro/collaboration-client','/solved','/add','_initUserSync','getComment','listComments','_injector','defineProperty','thread-comment-data-source.config','solved','UniverCore','users','UniverLicensePlugin','UserManagerService','subscribe','5643028RuHGOx','requireSession','root','user','_initDataSource','UNRECOGNIZED','UniverThreadCommentUi','rxjs','/reply','filter','ref','Unknown','_config','createTimestamp','_threadCommentDataSource','setConfig','Solved','parse','amd','userID','threadId','Add','UniverNetwork','getMemberID','body','YYYY/MM/DD\x20HH:mm','updateComment','Solve','rangeId','code','saveCommentToSnapshot','comment','addUser','/universer-api/comment/unit/','_httpService','getUnit','find','_threadCommentModel','error','comments','length','_init','191982kTPpEd','Inject','getUser'];_0x4504=function(){return _0x426ab0;};return _0x4504();}
1
+ function _0x1f33(){const _0x107e8b=['length','UniverNetwork','slice','_sessionService','@univerjs/network','Solved','@univerjs/core','4640140KpGVvO','userID','IThreadCommentDataSourceService','UniverThreadComment','Plugin','exports','Reply','requireSession','createTimestamp','map','userId','thread-comment-data-source.config','user','690VUbmuM','Injector','rangeType','addComment','Add','Delete','updateComment','addUser','getMemberID','format','find','rangeId','Unknown','reply','@univerjs-pro/collaboration-client','getCurrentUser','UniverThreadCommentUIPlugin','disposeWithMe','replies','listComments','@univerjs/thread-comment-ui','UniverInstanceType','post','onStarting','customRanges','IConfigService','UNRECOGNIZED','_threadCommentModel','_threadCommentDataSourceService','merge','Inject','function','_initDataSource','_init','symbol','Disposable','getOwnPropertyDescriptor','UniverLicensePlugin','_initUserSync','threadId','7mHleSS','YYYY/MM/DD\x20HH:mm','UniverThreadCommentDataSourcePlugin','UNIVER_UNKNOWN','Edit','_userService','deleteComment','UniverProThreadCommentDatasource','parentId','4469220AjGuiB','commentUpdate$','getComment','_configService','type','setConfig','_injector','comment','unitId','stringify','resolved','6YEceSN','defineProperty','/universer-api/comment/unit/','pipe','Module','_commentService','getUnit','root','saveCommentToSnapshot','_httpService','replyId','users','pluginName','Solve','parse','7088319ABYSxM','1154076eFjGXH','UserManagerService','@univerjs-pro/license','content','66770psolFu','UniverThreadCommentUi','payload','bufferTime','UniverCollaborationClientPlugin','_threadCommentDataSource','delete','1212633IUONVw','amd','12273312wjSbsf','/list','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_config','dayjs','CollaborationSessionService','syncUpdateMutationToColla','/solved','COMMENT','getUser','CustomRangeType','resolveComment','error','get','/delete','UniverProCollaborationClient','solved','/add','OpenOrReOpen','code','body','filter','HTTPService','size','values','/universer-api/user/list','rxjs','subscribe','add','forEach'];_0x1f33=function(){return _0x107e8b;};return _0x1f33();}function _0x582e(_0x3753b7,_0x57123b){_0x3753b7=_0x3753b7-0x78;const _0x1f33e0=_0x1f33();let _0x582ee8=_0x1f33e0[_0x3753b7];return _0x582ee8;}(function(_0x579a82,_0x324de7){const _0x151030=_0x582e,_0x3aa813=_0x579a82();while(!![]){try{const _0x4243f3=-parseInt(_0x151030(0xff))/0x1+parseInt(_0x151030(0xef))/0x2*(parseInt(_0x151030(0x7f))/0x3)+parseInt(_0x151030(0xe4))/0x4+parseInt(_0x151030(0x78))/0x5*(parseInt(_0x151030(0xb3))/0x6)+parseInt(_0x151030(0xdb))/0x7*(-parseInt(_0x151030(0x81))/0x8)+-parseInt(_0x151030(0xfe))/0x9+parseInt(_0x151030(0xa6))/0xa;if(_0x4243f3===_0x324de7)break;else _0x3aa813['push'](_0x3aa813['shift']());}catch(_0xbe3822){_0x3aa813['push'](_0x3aa813['shift']());}}}(_0x1f33,0xd0747),function(_0x32a14e,_0x4dcfb2){const _0x2cdec8=_0x582e;typeof exports=='object'&&typeof module<'u'?_0x4dcfb2(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x2cdec8(0xd2)&&define[_0x2cdec8(0x80)]?define([_0x2cdec8(0xab),_0x2cdec8(0xc1),_0x2cdec8(0x101),_0x2cdec8(0xa5),_0x2cdec8(0xc7),'@univerjs/thread-comment',_0x2cdec8(0x9b),_0x2cdec8(0xa3)],_0x4dcfb2):(_0x32a14e=typeof globalThis<'u'?globalThis:_0x32a14e||self,_0x4dcfb2(_0x32a14e[_0x2cdec8(0xe2)]={},_0x32a14e[_0x2cdec8(0x90)],_0x32a14e['UniverProLicense'],_0x32a14e['UniverCore'],_0x32a14e[_0x2cdec8(0x79)],_0x32a14e[_0x2cdec8(0xa9)],_0x32a14e[_0x2cdec8(0x9b)],_0x32a14e[_0x2cdec8(0xa0)]));}(this,function(_0x4a4542,_0x501f4a,_0x584cca,_0x53986e,_0x4f5fb3,_0x1a4962,_0x3d414f,_0x48fb19){'use strict';const _0x199a38=_0x582e;const _0x441cd2=_0x199a38(0x83);var _0x20079d=(_0x95e3a3=>(_0x95e3a3[_0x95e3a3['OpenOrReOpen']=0x0]=_0x199a38(0x93),_0x95e3a3[_0x95e3a3['Solved']=0x1]=_0x199a38(0xa4),_0x95e3a3[_0x95e3a3['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x95e3a3))(_0x20079d||{}),_0x3f92a6=(_0x16fed5=>(_0x16fed5[_0x16fed5[_0x199a38(0xbf)]=0x0]='Unknown',_0x16fed5[_0x16fed5[_0x199a38(0xb7)]=0x1]=_0x199a38(0xb7),_0x16fed5[_0x16fed5[_0x199a38(0xac)]=0x2]='Reply',_0x16fed5[_0x16fed5['Edit']=0x3]=_0x199a38(0xdf),_0x16fed5[_0x16fed5[_0x199a38(0xb8)]=0x4]=_0x199a38(0xb8),_0x16fed5[_0x16fed5[_0x199a38(0xfc)]=0x5]=_0x199a38(0xfc),_0x16fed5[_0x16fed5[_0x199a38(0xcd)]=-0x1]=_0x199a38(0xcd),_0x16fed5))(_0x3f92a6||{});const _0x562824=_0x2753aa=>_0x53986e[_0x199a38(0x85)](new Date(+_0x2753aa))[_0x199a38(0xbc)]('YYYY/MM/DD\x20HH:mm'),_0x59941d=async(_0x228d71,_0x71ed38)=>{const _0x22733a=_0x199a38,_0x18d562=_0x228d71['get'](_0x53986e[_0x22733a(0x100)]),_0x3a94e7=_0x228d71[_0x22733a(0x8e)](_0x48fb19[_0x22733a(0x97)]);_0x71ed38[_0x22733a(0x9e)](_0x1bfe7a=>{const _0x4864a9=_0x22733a;_0x18d562[_0x4864a9(0x8a)](_0x1bfe7a)&&_0x71ed38[_0x4864a9(0x7e)](_0x1bfe7a);}),_0x71ed38[_0x22733a(0x98)]&&(await _0x3a94e7[_0x22733a(0x8e)](_0x22733a(0x9a),{'params':{'userIDs':[..._0x71ed38]}}))[_0x22733a(0x95)][_0x22733a(0xfa)][_0x22733a(0x9e)](_0x2335b5=>{_0x2335b5&&_0x18d562['addUser'](_0x2335b5);});};var _0x3cd064=Object['getOwnPropertyDescriptor'],_0x30e1ac=(_0x386fbb,_0x472e44,_0x1272bd,_0x2f3d40)=>{const _0x234e03=_0x199a38;for(var _0x3cf980=_0x2f3d40>0x1?void 0x0:_0x2f3d40?_0x3cd064(_0x472e44,_0x1272bd):_0x472e44,_0x29e929=_0x386fbb[_0x234e03(0x9f)]-0x1,_0x447d5d;_0x29e929>=0x0;_0x29e929--)(_0x447d5d=_0x386fbb[_0x29e929])&&(_0x3cf980=_0x447d5d(_0x3cf980)||_0x3cf980);return _0x3cf980;},_0x5e6e71=(_0x5ec0e5,_0x13b158)=>(_0x531336,_0x3b4fc2)=>_0x13b158(_0x531336,_0x3b4fc2,_0x5ec0e5);let _0x246c49=class extends _0x53986e[_0x199a38(0xd6)]{constructor(_0x3dfd3d,_0x57b6ff,_0x404660,_0x57aac6){const _0x144b80=_0x199a38;super(),this[_0x144b80(0xf4)]=_0x3dfd3d,this[_0x144b80(0xce)]=_0x57b6ff,this[_0x144b80(0xe0)]=_0x404660,this[_0x144b80(0xea)]=_0x57aac6,this[_0x144b80(0xd4)](),this[_0x144b80(0xd9)]();}['_initUserSync'](){const _0x2369c0=_0x199a38;this[_0x2369c0(0xc4)](this[_0x2369c0(0xce)]['commentUpdate$'][_0x2369c0(0xf2)](_0x3d414f[_0x2369c0(0x7b)](0x10))['subscribe'](_0x90874a=>{const _0x16f46f=_0x2369c0,_0x50677d=new Set();_0x90874a['forEach'](_0x1e3dd8=>{const _0x1a0a0c=_0x582e;if(_0x1e3dd8[_0x1a0a0c(0xe8)]===_0x1a0a0c(0x9d)){const _0x38ec4c=_0x1e3dd8[_0x1a0a0c(0x7a)]['personId'];_0x50677d['add'](_0x38ec4c);}}),_0x59941d(this[_0x16f46f(0xea)],_0x50677d);}));}[_0x199a38(0xd4)](){const _0x162355=_0x199a38;this[_0x162355(0xc4)](this['_commentService'][_0x162355(0xe5)][_0x162355(0x9c)](async _0x4fe4f9=>{const _0x49ca5d=_0x162355;var _0x54e34a,_0x172506,_0x32bd75,_0x3e172d;const _0x4daa16=(_0x54e34a=this[_0x49ca5d(0xce)][_0x49ca5d(0xf5)](_0x4fe4f9[_0x49ca5d(0xec)])[_0x49ca5d(0xbd)](_0xdd264c=>_0xdd264c['threadId']===_0x4fe4f9[_0x49ca5d(0xda)]))==null?void 0x0:_0x54e34a[_0x49ca5d(0xf6)];if(!_0x4daa16)return;const {unitId:_0x36df04,subUnitId:_0x191161}=_0x4daa16;switch(_0x4fe4f9[_0x49ca5d(0xb2)]&&this[_0x49ca5d(0xe0)]['addUser'](_0x4fe4f9[_0x49ca5d(0xb2)]),_0x4fe4f9[_0x49ca5d(0xe8)]){case _0x3f92a6['Add']:break;case _0x3f92a6[_0x49ca5d(0xac)]:{this[_0x49ca5d(0xce)]['addComment'](_0x36df04,_0x191161,{'unitId':_0x36df04,'subUnitId':_0x191161,'ref':'','id':_0x4fe4f9[_0x49ca5d(0xf9)],'dT':_0x562824(+_0x4fe4f9['createTimestamp']),'threadId':_0x4fe4f9[_0x49ca5d(0xda)],'personId':(_0x32bd75=(_0x172506=_0x4fe4f9['user'])==null?void 0x0:_0x172506[_0x49ca5d(0xa7)])!=null?_0x32bd75:_0x4fe4f9['userId'],'text':JSON[_0x49ca5d(0xfd)](_0x4fe4f9[_0x49ca5d(0x102)]),'parentId':_0x4daa16['id']});break;}case _0x3f92a6['Delete']:{const _0x6f349f=this[_0x49ca5d(0xce)][_0x49ca5d(0xe6)](_0x36df04,_0x191161,_0x4fe4f9[_0x49ca5d(0xf9)]);_0x6f349f&&_0x6f349f[_0x49ca5d(0xe3)]&&this['_threadCommentModel']['deleteComment'](_0x36df04,_0x191161,_0x4fe4f9[_0x49ca5d(0xf9)]);break;}case _0x3f92a6[_0x49ca5d(0xdf)]:{this[_0x49ca5d(0xce)][_0x49ca5d(0xb9)](_0x36df04,_0x191161,{'commentId':_0x4fe4f9[_0x49ca5d(0xf9)],'text':JSON[_0x49ca5d(0xfd)](_0x4fe4f9[_0x49ca5d(0x102)])});break;}case _0x3f92a6[_0x49ca5d(0xfc)]:{const _0x533d26=(_0x3e172d=this[_0x49ca5d(0xce)][_0x49ca5d(0xf5)](_0x4fe4f9[_0x49ca5d(0xec)])[_0x49ca5d(0xbd)](_0x5aae4a=>_0x5aae4a[_0x49ca5d(0xda)]===_0x4fe4f9[_0x49ca5d(0xda)]))==null?void 0x0:_0x3e172d['root'];_0x533d26&&this['_threadCommentModel'][_0x49ca5d(0x8c)](_0x36df04,_0x191161,_0x533d26['id'],_0x4fe4f9[_0x49ca5d(0x91)]===_0x20079d[_0x49ca5d(0xa4)]);break;}}}));}};_0x246c49=_0x30e1ac([_0x5e6e71(0x0,_0x53986e[_0x199a38(0xd1)](_0x501f4a['CommentService'])),_0x5e6e71(0x1,_0x53986e[_0x199a38(0xd1)](_0x1a4962['ThreadCommentModel'])),_0x5e6e71(0x2,_0x53986e['Inject'](_0x53986e['UserManagerService'])),_0x5e6e71(0x3,_0x53986e[_0x199a38(0xd1)](_0x53986e[_0x199a38(0xb4)]))],_0x246c49);const _0x589732=_0x199a38(0xb1),_0x31c2b6={};var _0x2ffc2d=Object[_0x199a38(0xd7)],_0x1f7dc1=(_0x1f0d35,_0x3fbf7f,_0x35abbd,_0x1aefcf)=>{const _0x32f169=_0x199a38;for(var _0x20c7ef=_0x1aefcf>0x1?void 0x0:_0x1aefcf?_0x2ffc2d(_0x3fbf7f,_0x35abbd):_0x3fbf7f,_0x225cbe=_0x1f0d35[_0x32f169(0x9f)]-0x1,_0x4082a9;_0x225cbe>=0x0;_0x225cbe--)(_0x4082a9=_0x1f0d35[_0x225cbe])&&(_0x20c7ef=_0x4082a9(_0x20c7ef)||_0x20c7ef);return _0x20c7ef;},_0x10de0c=(_0x31d8b1,_0x490da4)=>(_0x4b95f1,_0x3bbe5d)=>_0x490da4(_0x4b95f1,_0x3bbe5d,_0x31d8b1);function _0x5ab333(_0x1e3f7a,_0x26da89){const _0x4b460c=_0x199a38,_0x48fa98=_0x1e3f7a['replies'][0x0];return{..._0x26da89,'id':_0x48fa98[_0x4b460c(0xf9)],'resolved':_0x1e3f7a[_0x4b460c(0x91)]===0x1,'dT':_0x562824(_0x48fa98['createTimestamp']),'personId':_0x48fa98[_0x4b460c(0xb0)],'threadId':_0x48fa98[_0x4b460c(0xda)]};}function _0xc5c0fb(_0x523585,_0x17bf95,_0x12046c){const _0x27a5e9=_0x199a38;var _0x2d009e,_0x5d1e51;if(((_0x5d1e51=(_0x2d009e=_0x523585==null?void 0x0:_0x523585[_0x27a5e9(0xc5)])==null?void 0x0:_0x2d009e['length'])!=null?_0x5d1e51:0x0)>0x0){const _0x3ea207=(_0x5c8c71,_0xfe9a97)=>({'id':_0x5c8c71[_0x27a5e9(0xf9)],'threadId':_0x5c8c71[_0x27a5e9(0xda)],'dT':_0x562824(_0x5c8c71[_0x27a5e9(0xae)]),'personId':_0x5c8c71['userId'],'resolved':_0x523585['solved']===_0x20079d[_0x27a5e9(0xa4)],'unitId':_0x17bf95,'subUnitId':_0x12046c,'text':JSON[_0x27a5e9(0xfd)](_0x5c8c71[_0x27a5e9(0x102)]),'parentId':_0xfe9a97}),_0x18ea42=_0x3ea207(_0x523585[_0x27a5e9(0xc5)][0x0]);return{..._0x18ea42,'children':_0x523585[_0x27a5e9(0xc5)][_0x27a5e9(0xa1)](0x1)[_0x27a5e9(0xaf)](_0x31af71=>_0x3ea207(_0x31af71,_0x18ea42['id']))};}return null;}let _0xbcb1ca=class{constructor(_0x1d200e,_0x2974d3,_0x5da352){const _0x4ffd02=_0x199a38;this[_0x4ffd02(0xf8)]=_0x1d200e,this['_userService']=_0x2974d3,this['_sessionService']=_0x5da352;}async[_0x199a38(0xb6)](_0x26580b){const _0x9c01b6=_0x199a38;var _0x3cc582,_0x6d9d53;const {parentId:_0x16724a,unitId:_0x577a9e,text:_0x1290f8,threadId:_0x1e4fc7}=_0x26580b,_0x586c87=(_0x6d9d53=(_0x3cc582=_0x1290f8[_0x9c01b6(0xcb)])==null?void 0x0:_0x3cc582[_0x9c01b6(0x96)](_0x50f98f=>_0x50f98f['rangeType']===_0x53986e[_0x9c01b6(0x8b)]['COMMENT'])[_0x9c01b6(0xaf)](_0x1d4d26=>_0x1d4d26[_0x9c01b6(0xbe)]))!=null?_0x6d9d53:[],_0x4f2073=JSON[_0x9c01b6(0xed)](_0x1290f8),_0x59214e=(await this['_sessionService']['requireSession'](_0x577a9e))[_0x9c01b6(0xbb)]();if(_0x16724a){const _0x2cc79a={'memberId':_0x59214e,'unitId':_0x577a9e,'content':_0x4f2073,'mention':_0x586c87,'threadId':_0x1e4fc7},_0x14e025=(await this[_0x9c01b6(0xf8)][_0x9c01b6(0xc9)](_0x9c01b6(0xf1)+_0x577a9e+'/reply',{'body':_0x2cc79a}))[_0x9c01b6(0x95)][_0x9c01b6(0xc0)];return{..._0x26580b,'id':_0x14e025[_0x9c01b6(0xf9)],'dT':_0x53986e[_0x9c01b6(0x85)](+_0x14e025['createTimestamp'])[_0x9c01b6(0xbc)](_0x9c01b6(0xdc)),'personId':_0x14e025[_0x9c01b6(0xb0)]};}else{const _0x3420f6={'memberId':_0x59214e,'unitId':_0x577a9e,'content':_0x4f2073,'mention':_0x586c87},_0x620387=await this[_0x9c01b6(0xf8)]['post']('/universer-api/comment/unit/'+_0x577a9e+_0x9c01b6(0x92),{'body':_0x3420f6});return _0x5ab333(_0x620387[_0x9c01b6(0x95)][_0x9c01b6(0xeb)],_0x26580b);}}async['updateComment'](_0xea97f3){const _0x43560e=_0x199a38;var _0x5eadf5,_0x57f3d3;const {text:_0x181c3e,unitId:_0x2e2b9c}=_0xea97f3,_0x297f34=(_0x57f3d3=(_0x5eadf5=_0x181c3e[_0x43560e(0xcb)])==null?void 0x0:_0x5eadf5[_0x43560e(0x96)](_0x4de9df=>_0x4de9df[_0x43560e(0xb5)]===_0x53986e[_0x43560e(0x8b)][_0x43560e(0x89)])['map'](_0x1fb03e=>_0x1fb03e[_0x43560e(0xbe)]))!=null?_0x57f3d3:[],_0x1b1ee3=JSON[_0x43560e(0xed)](_0x181c3e),_0x1a7c3b=_0xea97f3[_0x43560e(0xda)],_0x4ae534=_0xea97f3['id'],_0x3dbcb5={'memberId':(await this[_0x43560e(0xa2)][_0x43560e(0xad)](_0x2e2b9c))['getMemberID'](),'unitId':_0x2e2b9c,'threadId':_0x1a7c3b,'mention':_0x297f34,'content':_0x1b1ee3,'replyId':_0x4ae534},_0x1aee11=await this['_httpService'][_0x43560e(0xc9)]('/universer-api/comment/unit/'+_0x2e2b9c+'/edit',{'body':_0x3dbcb5});return!_0x1aee11[_0x43560e(0x95)][_0x43560e(0x8d)]||_0x1aee11['body'][_0x43560e(0x8d)]['code']===0x1;}async[_0x199a38(0x8c)](_0x1c5429){const _0x2256f6=_0x199a38,{unitId:_0x52f904}=_0x1c5429,_0x44b4b4=_0x1c5429[_0x2256f6(0xda)],_0x3573a5={'memberId':this[_0x2256f6(0xe0)][_0x2256f6(0xc2)]()[_0x2256f6(0xa7)],'unitId':_0x52f904,'threadId':_0x44b4b4,'solved':_0x1c5429[_0x2256f6(0xee)]?_0x20079d[_0x2256f6(0xa4)]:_0x20079d[_0x2256f6(0x93)]},_0x44b53f=await this['_httpService']['post'](_0x2256f6(0xf1)+_0x52f904+_0x2256f6(0x88),{'body':_0x3573a5});return!_0x44b53f['body'][_0x2256f6(0x8d)]||_0x44b53f[_0x2256f6(0x95)][_0x2256f6(0x8d)][_0x2256f6(0x94)]===0x1;}async[_0x199a38(0xe1)](_0x3f960f,_0x414229,_0x3b454d,_0x3b8877){const _0x1bb46a=_0x199a38,_0x10ae95={'memberId':(await this[_0x1bb46a(0xa2)][_0x1bb46a(0xad)](_0x3f960f))[_0x1bb46a(0xbb)](),'threadId':_0x3b454d,'replyId':_0x3b8877,'unitId':_0x3f960f},_0x5d2854=await this[_0x1bb46a(0xf8)][_0x1bb46a(0xc9)](_0x1bb46a(0xf1)+_0x3f960f+_0x1bb46a(0x8f),{'body':_0x10ae95});return!_0x5d2854['body'][_0x1bb46a(0x8d)]||_0x5d2854[_0x1bb46a(0x95)][_0x1bb46a(0x8d)][_0x1bb46a(0x94)]===0x1;}async[_0x199a38(0xc6)](_0x501390,_0x268888,_0x38cab3){const _0x5a7685=_0x199a38,_0x1f28cd={'unitId':_0x501390,'threadId':_0x38cab3},_0xc05d10=await this['_httpService'][_0x5a7685(0xc9)]('/universer-api/comment/unit/'+_0x501390+_0x5a7685(0x82),{'body':_0x1f28cd}),_0x5658fa=_0x38cab3[_0x5a7685(0xaf)](_0x341cec=>_0xc5c0fb(_0xc05d10[_0x5a7685(0x95)]['comments'][_0x341cec],_0x501390,_0x268888))[_0x5a7685(0x96)](Boolean);return Object[_0x5a7685(0x99)](_0xc05d10['body'][_0x5a7685(0xfa)])[_0x5a7685(0x9e)](_0x334fd7=>{const _0x49f1b3=_0x5a7685;this[_0x49f1b3(0xe0)][_0x49f1b3(0xba)](_0x334fd7);}),_0x5658fa;}[_0x199a38(0xf7)](_0x48cbde){return{'id':_0x48cbde['id'],'threadId':_0x48cbde['threadId'],'ref':_0x48cbde['ref']};}};_0xbcb1ca=_0x1f7dc1([_0x10de0c(0x0,_0x53986e[_0x199a38(0xd1)](_0x48fb19[_0x199a38(0x97)])),_0x10de0c(0x1,_0x53986e[_0x199a38(0xd1)](_0x53986e[_0x199a38(0x100)])),_0x10de0c(0x2,_0x53986e['Inject'](_0x501f4a[_0x199a38(0x86)]))],_0xbcb1ca);var _0x3414c2=Object[_0x199a38(0xd7)],_0x2a2eaa=(_0x5844b4,_0x4333bf,_0x58fd22,_0x5875e4)=>{const _0x561cea=_0x199a38;for(var _0x4a4cbf=_0x5875e4>0x1?void 0x0:_0x5875e4?_0x3414c2(_0x4333bf,_0x58fd22):_0x4333bf,_0x1ba85b=_0x5844b4[_0x561cea(0x9f)]-0x1,_0x4973bd;_0x1ba85b>=0x0;_0x1ba85b--)(_0x4973bd=_0x5844b4[_0x1ba85b])&&(_0x4a4cbf=_0x4973bd(_0x4a4cbf)||_0x4a4cbf);return _0x4a4cbf;},_0x5e848e=(_0x1bc583,_0x174fd5)=>(_0x49f65c,_0x358bd4)=>_0x174fd5(_0x49f65c,_0x358bd4,_0x1bc583);let _0x20e4fb=class extends _0x53986e['Disposable']{constructor(_0xa289c8,_0x5e704c){const _0x4c19f1=_0x199a38;super(),this['_threadCommentDataSourceService']=_0xa289c8,this[_0x4c19f1(0x7d)]=_0x5e704c,this[_0x4c19f1(0xd3)]();}[_0x199a38(0xd3)](){const _0x2c6f14=_0x199a38;this[_0x2c6f14(0xcf)]['dataSource']=this[_0x2c6f14(0x7d)],this[_0x2c6f14(0xcf)][_0x2c6f14(0x87)]=!0x1;}};_0x20e4fb=_0x2a2eaa([_0x5e848e(0x0,_0x1a4962[_0x199a38(0xa8)]),_0x5e848e(0x1,_0x53986e[_0x199a38(0xd1)](_0xbcb1ca))],_0x20e4fb);var _0x488a60=Object[_0x199a38(0xf0)],_0x2eaa5b=Object[_0x199a38(0xd7)],_0xfc78ae=(_0x18aae8,_0x38e869,_0x154aaa)=>_0x38e869 in _0x18aae8?_0x488a60(_0x18aae8,_0x38e869,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x154aaa}):_0x18aae8[_0x38e869]=_0x154aaa,_0x27ad72=(_0x4189b0,_0x2b6c9b,_0x2f98f0,_0xedac97)=>{const _0x448617=_0x199a38;for(var _0xf21309=_0xedac97>0x1?void 0x0:_0xedac97?_0x2eaa5b(_0x2b6c9b,_0x2f98f0):_0x2b6c9b,_0x541a06=_0x4189b0[_0x448617(0x9f)]-0x1,_0x1bc148;_0x541a06>=0x0;_0x541a06--)(_0x1bc148=_0x4189b0[_0x541a06])&&(_0xf21309=_0x1bc148(_0xf21309)||_0xf21309);return _0xf21309;},_0xa2fd97=(_0x285850,_0x3261a2)=>(_0x3f439d,_0x28e9db)=>_0x3261a2(_0x3f439d,_0x28e9db,_0x285850),_0x10c982=(_0xf21544,_0x3f3185,_0x574279)=>_0xfc78ae(_0xf21544,typeof _0x3f3185!=_0x199a38(0xd5)?_0x3f3185+'':_0x3f3185,_0x574279);_0x4a4542[_0x199a38(0xdd)]=class extends _0x53986e[_0x199a38(0xaa)]{constructor(_0x22d9e4=_0x31c2b6,_0x5ca4d7,_0x4703ee){const _0x43377d=_0x199a38;super(),this['_config']=_0x22d9e4,this[_0x43377d(0xea)]=_0x5ca4d7,this['_configService']=_0x4703ee;const {..._0xd04789}=_0x53986e[_0x43377d(0xd0)]({},_0x31c2b6,this[_0x43377d(0x84)]);this[_0x43377d(0xe7)][_0x43377d(0xe9)](_0x589732,_0xd04789);}[_0x199a38(0xca)](){[[_0xbcb1ca],[_0x20e4fb],[_0x246c49]]['forEach'](_0x5e152e=>{const _0x594ae2=_0x582e;this[_0x594ae2(0xea)][_0x594ae2(0x9d)](_0x5e152e);});}['onReady'](){const _0x49f46f=_0x199a38;this[_0x49f46f(0xea)][_0x49f46f(0x8e)](_0x20e4fb),this[_0x49f46f(0xea)]['get'](_0x246c49);}},_0x10c982(_0x4a4542[_0x199a38(0xdd)],_0x199a38(0xfb),_0x441cd2),_0x10c982(_0x4a4542[_0x199a38(0xdd)],_0x199a38(0xe8),_0x53986e[_0x199a38(0xc8)][_0x199a38(0xde)]),_0x4a4542['UniverThreadCommentDataSourcePlugin']=_0x27ad72([_0x53986e['DependentOn'](_0x4f5fb3[_0x199a38(0xc3)],_0x501f4a[_0x199a38(0x7c)],_0x584cca[_0x199a38(0xd8)]),_0xa2fd97(0x1,_0x53986e[_0x199a38(0xd1)](_0x53986e[_0x199a38(0xb4)])),_0xa2fd97(0x2,_0x53986e[_0x199a38(0xcc)])],_0x4a4542[_0x199a38(0xdd)]),Object[_0x199a38(0xf0)](_0x4a4542,Symbol['toStringTag'],{'value':_0x199a38(0xf3)});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.15.0-insiders.20260107-3441c7a",
3
+ "version": "0.15.0-insiders.20260108-47c73e3",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,18 +45,18 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.15.0-insiders.20260107-3441c7a",
49
- "@univerjs-pro/license": "0.15.0-insiders.20260107-3441c7a",
50
- "@univerjs/network": "0.15.0-insiders.20260107-3441c7a",
51
- "@univerjs/thread-comment": "0.15.0-insiders.20260107-3441c7a",
48
+ "@univerjs-pro/collaboration-client": "0.15.0-insiders.20260108-47c73e3",
52
49
  "@univerjs/protocol": "0.1.48",
53
- "@univerjs/core": "0.15.0-insiders.20260107-3441c7a",
54
- "@univerjs/thread-comment-ui": "0.15.0-insiders.20260107-3441c7a"
50
+ "@univerjs/network": "0.15.0-insiders.20260108-47c73e3",
51
+ "@univerjs/thread-comment": "0.15.0-insiders.20260108-47c73e3",
52
+ "@univerjs/core": "0.15.0-insiders.20260108-47c73e3",
53
+ "@univerjs-pro/license": "0.15.0-insiders.20260108-47c73e3",
54
+ "@univerjs/thread-comment-ui": "0.15.0-insiders.20260108-47c73e3"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",
58
58
  "typescript": "^5.9.3",
59
- "vite": "^7.3.0",
59
+ "vite": "^7.3.1",
60
60
  "vitest": "^4.0.16",
61
61
  "@univerjs-infra/shared": "0.15.0"
62
62
  },