@univerjs-pro/thread-comment-datasource 0.12.2-nightly.202511241159 → 0.12.2-nightly.202511290732

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const _0x1cb44c=_0x58d6;(function(_0x402f3f,_0x5313a5){const _0x569683=_0x58d6,_0x49039a=_0x402f3f();while(!![]){try{const _0x16e7dd=-parseInt(_0x569683(0xed))/0x1+-parseInt(_0x569683(0x120))/0x2*(parseInt(_0x569683(0x12d))/0x3)+-parseInt(_0x569683(0x116))/0x4+-parseInt(_0x569683(0x10b))/0x5+-parseInt(_0x569683(0x10d))/0x6+parseInt(_0x569683(0x101))/0x7+parseInt(_0x569683(0x12e))/0x8*(parseInt(_0x569683(0xd8))/0x9);if(_0x16e7dd===_0x5313a5)break;else _0x49039a['push'](_0x49039a['shift']());}catch(_0x5236cf){_0x49039a['push'](_0x49039a['shift']());}}}(_0x5bb5,0xc0907));Object['defineProperty'](exports,Symbol['toStringTag'],{'value':_0x1cb44c(0xc8)});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=_0x1cb44c(0x121);var I=(_0x20e0b0=>(_0x20e0b0[_0x20e0b0[_0x1cb44c(0xf6)]=0x0]='OpenOrReOpen',_0x20e0b0[_0x20e0b0[_0x1cb44c(0xf3)]=0x1]=_0x1cb44c(0xf3),_0x20e0b0[_0x20e0b0[_0x1cb44c(0x123)]=-0x1]=_0x1cb44c(0x123),_0x20e0b0))(I||{}),v=(_0x52a1b0=>(_0x52a1b0[_0x52a1b0[_0x1cb44c(0xdb)]=0x0]=_0x1cb44c(0xdb),_0x52a1b0[_0x52a1b0[_0x1cb44c(0xd0)]=0x1]=_0x1cb44c(0xd0),_0x52a1b0[_0x52a1b0[_0x1cb44c(0xf4)]=0x2]=_0x1cb44c(0xf4),_0x52a1b0[_0x52a1b0[_0x1cb44c(0xce)]=0x3]=_0x1cb44c(0xce),_0x52a1b0[_0x52a1b0[_0x1cb44c(0x10f)]=0x4]=_0x1cb44c(0x10f),_0x52a1b0[_0x52a1b0[_0x1cb44c(0xe6)]=0x5]=_0x1cb44c(0xe6),_0x52a1b0[_0x52a1b0[_0x1cb44c(0x123)]=-0x1]=_0x1cb44c(0x123),_0x52a1b0))(v||{});const f=_0x3c0816=>c['dayjs'](new Date(+_0x3c0816))[_0x1cb44c(0x118)](_0x1cb44c(0x11d)),R=async(_0x18f13e,_0xb26104)=>{const _0x3c4f45=_0x1cb44c,_0x5373e0=_0x18f13e['get'](c[_0x3c4f45(0xca)]),_0x58ed8b=_0x18f13e[_0x3c4f45(0x12b)](P[_0x3c4f45(0xf2)]);_0xb26104[_0x3c4f45(0xd7)](_0x52b3c0=>{const _0x51ab4e=_0x3c4f45;_0x5373e0[_0x51ab4e(0xe1)](_0x52b3c0)&&_0xb26104['delete'](_0x52b3c0);}),_0xb26104['size']&&(await _0x58ed8b[_0x3c4f45(0x12b)](_0x3c4f45(0x132),{'params':{'userIDs':[..._0xb26104]}}))[_0x3c4f45(0xc7)][_0x3c4f45(0xeb)][_0x3c4f45(0xd7)](_0x5c44f2=>{const _0x2f3e2d=_0x3c4f45;_0x5c44f2&&_0x5373e0[_0x2f3e2d(0xc1)](_0x5c44f2);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x5eb364,_0x4787c3,_0x811047,_0x23cabb)=>{for(var _0x5d871a=_0x23cabb>0x1?void 0x0:_0x23cabb?$(_0x4787c3,_0x811047):_0x4787c3,_0x361600=_0x5eb364['length']-0x1,_0x43428b;_0x361600>=0x0;_0x361600--)(_0x43428b=_0x5eb364[_0x361600])&&(_0x5d871a=_0x43428b(_0x5d871a)||_0x5d871a);return _0x5d871a;},S=(_0x34c7df,_0x214539)=>(_0x2a0416,_0x44177f)=>_0x214539(_0x2a0416,_0x44177f,_0x34c7df);let _=class extends c[_0x1cb44c(0xcf)]{constructor(_0x3480c0,_0x1202d5,_0x85e36b,_0x330135){const _0x5ca5e7=_0x1cb44c;super(),this[_0x5ca5e7(0x106)]=_0x3480c0,this[_0x5ca5e7(0xdd)]=_0x1202d5,this[_0x5ca5e7(0x131)]=_0x85e36b,this['_injector']=_0x330135,this[_0x5ca5e7(0xcd)](),this[_0x5ca5e7(0xc5)]();}[_0x1cb44c(0xc5)](){const _0x54d2a5=_0x1cb44c;this['disposeWithMe'](this[_0x54d2a5(0xdd)][_0x54d2a5(0xe0)][_0x54d2a5(0xd9)](j['bufferTime'](0x10))[_0x54d2a5(0xfa)](_0x143bf1=>{const _0x4d73fe=_0x54d2a5,_0x54b9ac=new Set();_0x143bf1[_0x4d73fe(0xd7)](_0x26a32c=>{const _0x4383a8=_0x4d73fe;switch(_0x26a32c[_0x4383a8(0xc3)]){case _0x4383a8(0x11e):{const _0x3b83d5=_0x26a32c[_0x4383a8(0xe5)][_0x4383a8(0x107)];_0x54b9ac[_0x4383a8(0x11e)](_0x3b83d5);break;}}}),R(this['_injector'],_0x54b9ac);}));}['_init'](){const _0x52c4cf=_0x1cb44c;this[_0x52c4cf(0x129)](this[_0x52c4cf(0x106)][_0x52c4cf(0xe0)][_0x52c4cf(0xfa)](async _0x5d62c0=>{const _0xcdaed6=_0x52c4cf;var _0x5d94fc,_0x32eb4b,_0x1daa38,_0x1d362a;const _0x619448=(_0x5d94fc=this[_0xcdaed6(0xdd)][_0xcdaed6(0x10c)](_0x5d62c0[_0xcdaed6(0xf9)])[_0xcdaed6(0xda)](_0x5b752f=>_0x5b752f[_0xcdaed6(0x111)]===_0x5d62c0[_0xcdaed6(0x111)]))==null?void 0x0:_0x5d94fc['root'];if(!_0x619448)return;const {unitId:_0x4f7a66,subUnitId:_0x550266}=_0x619448;switch(_0x5d62c0['user']&&this[_0xcdaed6(0x131)][_0xcdaed6(0xc1)](_0x5d62c0[_0xcdaed6(0xef)]),_0x5d62c0['type']){case v[_0xcdaed6(0xd0)]:break;case v['Reply']:{this[_0xcdaed6(0xdd)][_0xcdaed6(0x10e)](_0x4f7a66,_0x550266,{'unitId':_0x4f7a66,'subUnitId':_0x550266,'ref':'','id':_0x5d62c0[_0xcdaed6(0x109)],'dT':f(+_0x5d62c0['createTimestamp']),'threadId':_0x5d62c0[_0xcdaed6(0x111)],'personId':(_0x1daa38=(_0x32eb4b=_0x5d62c0[_0xcdaed6(0xef)])==null?void 0x0:_0x32eb4b['userID'])!=null?_0x1daa38:_0x5d62c0[_0xcdaed6(0xfe)],'text':JSON['parse'](_0x5d62c0[_0xcdaed6(0x136)]),'parentId':_0x619448['id']});break;}case v[_0xcdaed6(0x10f)]:{const _0x296e49=this[_0xcdaed6(0xdd)][_0xcdaed6(0xe4)](_0x4f7a66,_0x550266,_0x5d62c0[_0xcdaed6(0x109)]);_0x296e49&&_0x296e49[_0xcdaed6(0xe2)]&&this[_0xcdaed6(0xdd)][_0xcdaed6(0x102)](_0x4f7a66,_0x550266,_0x5d62c0[_0xcdaed6(0x109)]);break;}case v[_0xcdaed6(0xce)]:{this[_0xcdaed6(0xdd)][_0xcdaed6(0x137)](_0x4f7a66,_0x550266,{'commentId':_0x5d62c0[_0xcdaed6(0x109)],'text':JSON[_0xcdaed6(0xd1)](_0x5d62c0[_0xcdaed6(0x136)])});break;}case v[_0xcdaed6(0xe6)]:{const _0x3116d6=(_0x1d362a=this[_0xcdaed6(0xdd)][_0xcdaed6(0x10c)](_0x5d62c0[_0xcdaed6(0xf9)])[_0xcdaed6(0xda)](_0x23bc7a=>_0x23bc7a['threadId']===_0x5d62c0['threadId']))==null?void 0x0:_0x1d362a[_0xcdaed6(0x11f)];_0x3116d6&&this['_threadCommentModel'][_0xcdaed6(0x113)](_0x4f7a66,_0x550266,_0x3116d6['id'],_0x5d62c0['solved']===I['Solved']);break;}}}));}};_=E([S(0x0,c['Inject'](b[_0x1cb44c(0xea)])),S(0x1,c[_0x1cb44c(0xf1)](M[_0x1cb44c(0x122)])),S(0x2,c['Inject'](c[_0x1cb44c(0xca)])),S(0x3,c[_0x1cb44c(0xf1)](c[_0x1cb44c(0x12f)]))],_);const q='thread-comment-data-source.config',D={};var A=Object[_0x1cb44c(0x128)],x=(_0x28ce6c,_0x5722c1,_0xf1c1d7,_0x2cb414)=>{const _0x45631c=_0x1cb44c;for(var _0x608820=_0x2cb414>0x1?void 0x0:_0x2cb414?A(_0x5722c1,_0xf1c1d7):_0x5722c1,_0x44e5a3=_0x28ce6c[_0x45631c(0xc0)]-0x1,_0x19441d;_0x44e5a3>=0x0;_0x44e5a3--)(_0x19441d=_0x28ce6c[_0x44e5a3])&&(_0x608820=_0x19441d(_0x608820)||_0x608820);return _0x608820;},C=(_0x5efd03,_0x9aa0b3)=>(_0xa5aa0d,_0x31579f)=>_0x9aa0b3(_0xa5aa0d,_0x31579f,_0x5efd03);function Y(_0xbfd879,_0x2cf7fa){const _0x359c2c=_0x1cb44c,_0x1e3dac=_0xbfd879[_0x359c2c(0xc4)][0x0];return{..._0x2cf7fa,'id':_0x1e3dac[_0x359c2c(0x109)],'resolved':_0xbfd879[_0x359c2c(0xec)]===0x1,'dT':f(_0x1e3dac['createTimestamp']),'personId':_0x1e3dac[_0x359c2c(0xfe)],'threadId':_0x1e3dac['threadId']};}function G(_0x10a7ec,_0x2e5996,_0x31c01a){const _0xf62b88=_0x1cb44c;var _0x1875ab,_0x5cc0da;if(((_0x5cc0da=(_0x1875ab=_0x10a7ec==null?void 0x0:_0x10a7ec['replies'])==null?void 0x0:_0x1875ab[_0xf62b88(0xc0)])!=null?_0x5cc0da:0x0)>0x0){const _0x56d5ae=(_0x52fb40,_0x36f556)=>({'id':_0x52fb40[_0xf62b88(0x109)],'threadId':_0x52fb40[_0xf62b88(0x111)],'dT':f(_0x52fb40[_0xf62b88(0xf0)]),'personId':_0x52fb40[_0xf62b88(0xfe)],'resolved':_0x10a7ec[_0xf62b88(0xec)]===I['Solved'],'unitId':_0x2e5996,'subUnitId':_0x31c01a,'text':JSON['parse'](_0x52fb40[_0xf62b88(0x136)]),'parentId':_0x36f556}),_0x3deaf5=_0x56d5ae(_0x10a7ec[_0xf62b88(0xc4)][0x0]);return{..._0x3deaf5,'children':_0x10a7ec['replies'][_0xf62b88(0xd6)](0x1)[_0xf62b88(0x115)](_0x2da7cf=>_0x56d5ae(_0x2da7cf,_0x3deaf5['id']))};}return null;}function _0x5bb5(){const _0x51cc0=['_httpService','UniverInstanceType','_sessionService','dayjs','getOwnPropertyDescriptor','disposeWithMe','/edit','get','CustomRangeType','23811IUkJJV','584zXmqCe','Injector','rangeType','_userService','/universer-api/user/list','IThreadCommentDataSourceService','_initDataSource','UNIVER_UNKNOWN','content','updateComment','length','addUser','/delete','type','replies','_initUserSync','userID','body','Module','UniverCollaborationClientPlugin','UserManagerService','customRanges','Plugin','_init','Edit','Disposable','Add','parse','getCurrentUser','rangeId','CollaborationSessionService','_threadCommentDataSourceService','slice','forEach','601596noXCec','pipe','find','Unknown','ref','_threadCommentModel','stringify','code','commentUpdate$','getUser','parentId','defineProperty','getComment','payload','Solve','/add','UniverLicensePlugin','/universer-api/comment/unit/','CommentService','users','solved','1161430nrmMsd','getMemberID','user','createTimestamp','Inject','HTTPService','Solved','Reply','error','OpenOrReOpen','_configService','_threadCommentDataSource','unitId','subscribe','setConfig','_config','syncUpdateMutationToColla','userId','_injector','reply','10055164UEZHHW','deleteComment','/solved','values','resolved','_commentService','personId','COMMENT','replyId','/reply','4916755swwJyN','getUnit','6803616PHrNmZ','addComment','Delete','saveCommentToSnapshot','threadId','post','resolveComment','/list','map','5406892sDeESD','UniverThreadCommentDataSourcePlugin','format','requireSession','dataSource','pluginName','filter','YYYY/MM/DD\x20HH:mm','add','root','226nwwsvr','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','ThreadCommentModel','UNRECOGNIZED'];_0x5bb5=function(){return _0x51cc0;};return _0x5bb5();}let p=class{constructor(_0x34be74,_0x305b72,_0x284057){const _0x2410d2=_0x1cb44c;this[_0x2410d2(0x124)]=_0x34be74,this[_0x2410d2(0x131)]=_0x305b72,this[_0x2410d2(0x126)]=_0x284057;}async[_0x1cb44c(0x10e)](_0x3ac81c){const _0x117a45=_0x1cb44c;var _0x533407,_0x385ec5;const {parentId:_0x495e12,unitId:_0x35236d,text:_0x2df7e4,threadId:_0x169edc}=_0x3ac81c,_0x337e7c=(_0x385ec5=(_0x533407=_0x2df7e4['customRanges'])==null?void 0x0:_0x533407['filter'](_0x4a2175=>_0x4a2175[_0x117a45(0x130)]===c[_0x117a45(0x12c)]['COMMENT'])[_0x117a45(0x115)](_0x557978=>_0x557978[_0x117a45(0xd3)]))!=null?_0x385ec5:[],_0x5775f3=JSON[_0x117a45(0xde)](_0x2df7e4),_0x326f62=(await this['_sessionService'][_0x117a45(0x119)](_0x35236d))[_0x117a45(0xee)]();if(_0x495e12){const _0x2eeeeb={'memberId':_0x326f62,'unitId':_0x35236d,'content':_0x5775f3,'mention':_0x337e7c,'threadId':_0x169edc},_0x3fc08c=(await this[_0x117a45(0x124)][_0x117a45(0x112)](_0x117a45(0xe9)+_0x35236d+_0x117a45(0x10a),{'body':_0x2eeeeb}))[_0x117a45(0xc7)][_0x117a45(0x100)];return{..._0x3ac81c,'id':_0x3fc08c[_0x117a45(0x109)],'dT':c[_0x117a45(0x127)](+_0x3fc08c['createTimestamp'])[_0x117a45(0x118)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x3fc08c[_0x117a45(0xfe)]};}else{const _0x11c466={'memberId':_0x326f62,'unitId':_0x35236d,'content':_0x5775f3,'mention':_0x337e7c},_0x36f7bd=await this['_httpService'][_0x117a45(0x112)](_0x117a45(0xe9)+_0x35236d+_0x117a45(0xe7),{'body':_0x11c466});return Y(_0x36f7bd['body']['comment'],_0x3ac81c);}}async[_0x1cb44c(0x137)](_0x4b8f34){const _0x4ab6f8=_0x1cb44c;var _0x451364,_0x454bfc;const {text:_0x4765de,unitId:_0x333f94}=_0x4b8f34,_0x22f801=(_0x454bfc=(_0x451364=_0x4765de[_0x4ab6f8(0xcb)])==null?void 0x0:_0x451364[_0x4ab6f8(0x11c)](_0x41b7c4=>_0x41b7c4['rangeType']===c[_0x4ab6f8(0x12c)][_0x4ab6f8(0x108)])[_0x4ab6f8(0x115)](_0x20e246=>_0x20e246['rangeId']))!=null?_0x454bfc:[],_0x3f499b=JSON[_0x4ab6f8(0xde)](_0x4765de),_0x2d516f=_0x4b8f34[_0x4ab6f8(0x111)],_0x44abcf=_0x4b8f34['id'],_0x5ad1ab={'memberId':(await this[_0x4ab6f8(0x126)][_0x4ab6f8(0x119)](_0x333f94))[_0x4ab6f8(0xee)](),'unitId':_0x333f94,'threadId':_0x2d516f,'mention':_0x22f801,'content':_0x3f499b,'replyId':_0x44abcf},_0x17aff8=await this[_0x4ab6f8(0x124)][_0x4ab6f8(0x112)](_0x4ab6f8(0xe9)+_0x333f94+_0x4ab6f8(0x12a),{'body':_0x5ad1ab});return!_0x17aff8[_0x4ab6f8(0xc7)][_0x4ab6f8(0xf5)]||_0x17aff8[_0x4ab6f8(0xc7)][_0x4ab6f8(0xf5)][_0x4ab6f8(0xdf)]===0x1;}async[_0x1cb44c(0x113)](_0x42e0fc){const _0x4f5056=_0x1cb44c,{unitId:_0x2b713a}=_0x42e0fc,_0x1fc789=_0x42e0fc['threadId'],_0x496fbf={'memberId':this[_0x4f5056(0x131)][_0x4f5056(0xd2)]()[_0x4f5056(0xc6)],'unitId':_0x2b713a,'threadId':_0x1fc789,'solved':_0x42e0fc[_0x4f5056(0x105)]?I['Solved']:I[_0x4f5056(0xf6)]},_0x56f15d=await this[_0x4f5056(0x124)][_0x4f5056(0x112)]('/universer-api/comment/unit/'+_0x2b713a+_0x4f5056(0x103),{'body':_0x496fbf});return!_0x56f15d[_0x4f5056(0xc7)][_0x4f5056(0xf5)]||_0x56f15d[_0x4f5056(0xc7)]['error']['code']===0x1;}async[_0x1cb44c(0x102)](_0x5e2826,_0x4a027c,_0x5df162,_0x30f17){const _0x5ad3a6=_0x1cb44c,_0x3c3983={'memberId':(await this['_sessionService'][_0x5ad3a6(0x119)](_0x5e2826))['getMemberID'](),'threadId':_0x5df162,'replyId':_0x30f17,'unitId':_0x5e2826},_0x1e0d2c=await this['_httpService'][_0x5ad3a6(0x112)](_0x5ad3a6(0xe9)+_0x5e2826+_0x5ad3a6(0xc2),{'body':_0x3c3983});return!_0x1e0d2c[_0x5ad3a6(0xc7)]['error']||_0x1e0d2c[_0x5ad3a6(0xc7)][_0x5ad3a6(0xf5)][_0x5ad3a6(0xdf)]===0x1;}async['listComments'](_0x89f62a,_0x997a7b,_0x5d43dc){const _0x38e6ec=_0x1cb44c,_0x149e2a={'unitId':_0x89f62a,'threadId':_0x5d43dc},_0x569a38=await this[_0x38e6ec(0x124)][_0x38e6ec(0x112)](_0x38e6ec(0xe9)+_0x89f62a+_0x38e6ec(0x114),{'body':_0x149e2a}),_0x4c93d8=_0x5d43dc[_0x38e6ec(0x115)](_0x57bb30=>G(_0x569a38[_0x38e6ec(0xc7)]['comments'][_0x57bb30],_0x89f62a,_0x997a7b))[_0x38e6ec(0x11c)](Boolean);return Object[_0x38e6ec(0x104)](_0x569a38[_0x38e6ec(0xc7)]['users'])[_0x38e6ec(0xd7)](_0x5680cb=>{const _0x541ec4=_0x38e6ec;this['_userService'][_0x541ec4(0xc1)](_0x5680cb);}),_0x4c93d8;}[_0x1cb44c(0x110)](_0xbd2236){const _0x50fa4e=_0x1cb44c;return{'id':_0xbd2236['id'],'threadId':_0xbd2236[_0x50fa4e(0x111)],'ref':_0xbd2236[_0x50fa4e(0xdc)]};}};function _0x58d6(_0x573576,_0x218992){const _0x5bb5de=_0x5bb5();return _0x58d6=function(_0x58d63f,_0x1e3583){_0x58d63f=_0x58d63f-0xc0;let _0x2245da=_0x5bb5de[_0x58d63f];return _0x2245da;},_0x58d6(_0x573576,_0x218992);}p=x([C(0x0,c['Inject'](P[_0x1cb44c(0xf2)])),C(0x1,c[_0x1cb44c(0xf1)](c[_0x1cb44c(0xca)])),C(0x2,c[_0x1cb44c(0xf1)](b[_0x1cb44c(0xd4)]))],p);var H=Object[_0x1cb44c(0x128)],J=(_0x2e37cf,_0x33a2e6,_0x1120e9,_0x470a29)=>{const _0x2c030a=_0x1cb44c;for(var _0x56195f=_0x470a29>0x1?void 0x0:_0x470a29?H(_0x33a2e6,_0x1120e9):_0x33a2e6,_0x3e8811=_0x2e37cf[_0x2c030a(0xc0)]-0x1,_0x5e4177;_0x3e8811>=0x0;_0x3e8811--)(_0x5e4177=_0x2e37cf[_0x3e8811])&&(_0x56195f=_0x5e4177(_0x56195f)||_0x56195f);return _0x56195f;},y=(_0x49bec7,_0x493660)=>(_0xaef9cb,_0x5cb804)=>_0x493660(_0xaef9cb,_0x5cb804,_0x49bec7);let g=class extends c['Disposable']{constructor(_0x5d646d,_0x1f87a1){const _0x3762b9=_0x1cb44c;super(),this[_0x3762b9(0xd5)]=_0x5d646d,this['_threadCommentDataSource']=_0x1f87a1,this[_0x3762b9(0x134)]();}[_0x1cb44c(0x134)](){const _0x474e88=_0x1cb44c;this[_0x474e88(0xd5)][_0x474e88(0x11a)]=this[_0x474e88(0xf8)],this[_0x474e88(0xd5)][_0x474e88(0xfd)]=!0x1;}};g=J([y(0x0,M[_0x1cb44c(0x133)]),y(0x1,c[_0x1cb44c(0xf1)](p))],g);var F=Object[_0x1cb44c(0xe3)],L=Object[_0x1cb44c(0x128)],Z=(_0x5d5a93,_0x255613,_0x95ec8c)=>_0x255613 in _0x5d5a93?F(_0x5d5a93,_0x255613,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x95ec8c}):_0x5d5a93[_0x255613]=_0x95ec8c,W=(_0x46be72,_0x430fb5,_0x131397,_0x428d27)=>{const _0x1417d3=_0x1cb44c;for(var _0x5d036a=_0x428d27>0x1?void 0x0:_0x428d27?L(_0x430fb5,_0x131397):_0x430fb5,_0x330ba5=_0x46be72[_0x1417d3(0xc0)]-0x1,_0x2a5075;_0x330ba5>=0x0;_0x330ba5--)(_0x2a5075=_0x46be72[_0x330ba5])&&(_0x5d036a=_0x2a5075(_0x5d036a)||_0x5d036a);return _0x5d036a;},O=(_0x337c3f,_0xe137ab)=>(_0x21c497,_0x51c9b6)=>_0xe137ab(_0x21c497,_0x51c9b6,_0x337c3f),N=(_0x574a28,_0x10c28b,_0x544c83)=>Z(_0x574a28,typeof _0x10c28b!='symbol'?_0x10c28b+'':_0x10c28b,_0x544c83);exports[_0x1cb44c(0x117)]=class extends c[_0x1cb44c(0xcc)]{constructor(_0xbe528e=D,_0x4123be,_0x2528ef){const _0x3f53b0=_0x1cb44c;super(),this[_0x3f53b0(0xfc)]=_0xbe528e,this['_injector']=_0x4123be,this[_0x3f53b0(0xf7)]=_0x2528ef;const {..._0x4b7850}=c['merge']({},D,this[_0x3f53b0(0xfc)]);this['_configService'][_0x3f53b0(0xfb)](q,_0x4b7850);}['onStarting'](){[[p],[g],[_]]['forEach'](_0x13a11f=>{const _0x49b20d=_0x58d6;this[_0x49b20d(0xff)][_0x49b20d(0x11e)](_0x13a11f);});}['onReady'](){const _0x205f71=_0x1cb44c;this[_0x205f71(0xff)]['get'](g),this[_0x205f71(0xff)]['get'](_);}},N(exports[_0x1cb44c(0x117)],_0x1cb44c(0x11b),U),N(exports[_0x1cb44c(0x117)],_0x1cb44c(0xc3),c[_0x1cb44c(0x125)][_0x1cb44c(0x135)]),exports['UniverThreadCommentDataSourcePlugin']=W([c['DependentOn'](w['UniverThreadCommentUIPlugin'],b[_0x1cb44c(0xc9)],T[_0x1cb44c(0xe8)]),O(0x1,c[_0x1cb44c(0xf1)](c[_0x1cb44c(0x12f)])),O(0x2,c['IConfigService'])],exports[_0x1cb44c(0x117)]);
1
+ 'use strict';const _0x5e36c2=_0x3d7d;(function(_0x3ef869,_0xa6fc9e){const _0x2f84f4=_0x3d7d,_0x3822e1=_0x3ef869();while(!![]){try{const _0x444e90=-parseInt(_0x2f84f4(0x14c))/0x1*(-parseInt(_0x2f84f4(0x148))/0x2)+parseInt(_0x2f84f4(0x154))/0x3*(-parseInt(_0x2f84f4(0x19c))/0x4)+parseInt(_0x2f84f4(0x19b))/0x5+-parseInt(_0x2f84f4(0x198))/0x6+-parseInt(_0x2f84f4(0x13c))/0x7*(parseInt(_0x2f84f4(0x17f))/0x8)+parseInt(_0x2f84f4(0x1a9))/0x9+-parseInt(_0x2f84f4(0x142))/0xa*(-parseInt(_0x2f84f4(0x199))/0xb);if(_0x444e90===_0xa6fc9e)break;else _0x3822e1['push'](_0x3822e1['shift']());}catch(_0x5add35){_0x3822e1['push'](_0x3822e1['shift']());}}}(_0x4c3c,0xc0717));Object[_0x5e36c2(0x15a)](exports,Symbol[_0x5e36c2(0x15f)],{'value':_0x5e36c2(0x143)});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=_0x5e36c2(0x157);var I=(_0x8a4f48=>(_0x8a4f48[_0x8a4f48[_0x5e36c2(0x176)]=0x0]=_0x5e36c2(0x176),_0x8a4f48[_0x8a4f48[_0x5e36c2(0x193)]=0x1]=_0x5e36c2(0x193),_0x8a4f48[_0x8a4f48[_0x5e36c2(0x162)]=-0x1]=_0x5e36c2(0x162),_0x8a4f48))(I||{}),v=(_0x5b12af=>(_0x5b12af[_0x5b12af[_0x5e36c2(0x1ab)]=0x0]=_0x5e36c2(0x1ab),_0x5b12af[_0x5b12af['Add']=0x1]='Add',_0x5b12af[_0x5b12af[_0x5e36c2(0x1a6)]=0x2]=_0x5e36c2(0x1a6),_0x5b12af[_0x5b12af[_0x5e36c2(0x136)]=0x3]=_0x5e36c2(0x136),_0x5b12af[_0x5b12af[_0x5e36c2(0x179)]=0x4]=_0x5e36c2(0x179),_0x5b12af[_0x5b12af[_0x5e36c2(0x16c)]=0x5]=_0x5e36c2(0x16c),_0x5b12af[_0x5b12af[_0x5e36c2(0x162)]=-0x1]='UNRECOGNIZED',_0x5b12af))(v||{});const f=_0x2f5e8e=>c[_0x5e36c2(0x167)](new Date(+_0x2f5e8e))['format'](_0x5e36c2(0x14d)),R=async(_0x4783c7,_0x4dcbae)=>{const _0x1b500c=_0x5e36c2,_0x13a68b=_0x4783c7[_0x1b500c(0x190)](c['UserManagerService']),_0x4327da=_0x4783c7[_0x1b500c(0x190)](P[_0x1b500c(0x195)]);_0x4dcbae[_0x1b500c(0x163)](_0xfbb20=>{const _0x55fe2c=_0x1b500c;_0x13a68b[_0x55fe2c(0x1a7)](_0xfbb20)&&_0x4dcbae[_0x55fe2c(0x185)](_0xfbb20);}),_0x4dcbae[_0x1b500c(0x180)]&&(await _0x4327da['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x4dcbae]}}))['body'][_0x1b500c(0x18c)][_0x1b500c(0x163)](_0x30114a=>{const _0x9cbd3d=_0x1b500c;_0x30114a&&_0x13a68b[_0x9cbd3d(0x172)](_0x30114a);});};var $=Object[_0x5e36c2(0x155)],E=(_0x5c803d,_0xb34460,_0x1eb76f,_0x3c59de)=>{const _0x482e2b=_0x5e36c2;for(var _0x4d41d8=_0x3c59de>0x1?void 0x0:_0x3c59de?$(_0xb34460,_0x1eb76f):_0xb34460,_0x22abcd=_0x5c803d[_0x482e2b(0x14a)]-0x1,_0x1ff063;_0x22abcd>=0x0;_0x22abcd--)(_0x1ff063=_0x5c803d[_0x22abcd])&&(_0x4d41d8=_0x1ff063(_0x4d41d8)||_0x4d41d8);return _0x4d41d8;},S=(_0x1614e2,_0x467985)=>(_0x5bac98,_0x66ded6)=>_0x467985(_0x5bac98,_0x66ded6,_0x1614e2);let _=class extends c[_0x5e36c2(0x166)]{constructor(_0x2d246e,_0x22f36a,_0x347b37,_0x51cdd5){const _0x1ce51e=_0x5e36c2;super(),this['_commentService']=_0x2d246e,this['_threadCommentModel']=_0x22f36a,this[_0x1ce51e(0x145)]=_0x347b37,this[_0x1ce51e(0x147)]=_0x51cdd5,this['_init'](),this[_0x1ce51e(0x184)]();}['_initUserSync'](){const _0x1d5842=_0x5e36c2;this[_0x1d5842(0x160)](this[_0x1d5842(0x1aa)]['commentUpdate$'][_0x1d5842(0x159)](j[_0x1d5842(0x13e)](0x10))['subscribe'](_0x882f9e=>{const _0x1d13c0=_0x1d5842,_0x2a9233=new Set();_0x882f9e[_0x1d13c0(0x163)](_0x3685a9=>{const _0xe83d67=_0x1d13c0;switch(_0x3685a9['type']){case _0xe83d67(0x188):{const _0x482e18=_0x3685a9[_0xe83d67(0x1a4)][_0xe83d67(0x1a0)];_0x2a9233[_0xe83d67(0x188)](_0x482e18);break;}}}),R(this['_injector'],_0x2a9233);}));}['_init'](){const _0x4ee6ef=_0x5e36c2;this[_0x4ee6ef(0x160)](this[_0x4ee6ef(0x19f)]['commentUpdate$'][_0x4ee6ef(0x17c)](async _0x337eda=>{const _0x165214=_0x4ee6ef;var _0x433bb7,_0xa8bfa5,_0x2c9533,_0x5ee004;const _0x50de09=(_0x433bb7=this[_0x165214(0x1aa)][_0x165214(0x181)](_0x337eda['unitId'])[_0x165214(0x177)](_0x31932b=>_0x31932b['threadId']===_0x337eda[_0x165214(0x141)]))==null?void 0x0:_0x433bb7[_0x165214(0x165)];if(!_0x50de09)return;const {unitId:_0x1651a9,subUnitId:_0x3654eb}=_0x50de09;switch(_0x337eda[_0x165214(0x140)]&&this[_0x165214(0x145)][_0x165214(0x172)](_0x337eda[_0x165214(0x140)]),_0x337eda[_0x165214(0x16e)]){case v[_0x165214(0x189)]:break;case v[_0x165214(0x1a6)]:{this[_0x165214(0x1aa)]['addComment'](_0x1651a9,_0x3654eb,{'unitId':_0x1651a9,'subUnitId':_0x3654eb,'ref':'','id':_0x337eda['replyId'],'dT':f(+_0x337eda[_0x165214(0x1af)]),'threadId':_0x337eda[_0x165214(0x141)],'personId':(_0x2c9533=(_0xa8bfa5=_0x337eda[_0x165214(0x140)])==null?void 0x0:_0xa8bfa5[_0x165214(0x153)])!=null?_0x2c9533:_0x337eda[_0x165214(0x1a1)],'text':JSON[_0x165214(0x1ac)](_0x337eda[_0x165214(0x19e)]),'parentId':_0x50de09['id']});break;}case v[_0x165214(0x179)]:{const _0x25dd5d=this[_0x165214(0x1aa)]['getComment'](_0x1651a9,_0x3654eb,_0x337eda['replyId']);_0x25dd5d&&_0x25dd5d[_0x165214(0x156)]&&this[_0x165214(0x1aa)][_0x165214(0x196)](_0x1651a9,_0x3654eb,_0x337eda[_0x165214(0x187)]);break;}case v['Edit']:{this[_0x165214(0x1aa)]['updateComment'](_0x1651a9,_0x3654eb,{'commentId':_0x337eda[_0x165214(0x187)],'text':JSON[_0x165214(0x1ac)](_0x337eda[_0x165214(0x19e)])});break;}case v[_0x165214(0x16c)]:{const _0x1c8b07=(_0x5ee004=this[_0x165214(0x1aa)]['getUnit'](_0x337eda[_0x165214(0x17a)])[_0x165214(0x177)](_0x7ab352=>_0x7ab352[_0x165214(0x141)]===_0x337eda['threadId']))==null?void 0x0:_0x5ee004[_0x165214(0x165)];_0x1c8b07&&this['_threadCommentModel'][_0x165214(0x182)](_0x1651a9,_0x3654eb,_0x1c8b07['id'],_0x337eda[_0x165214(0x178)]===I[_0x165214(0x193)]);break;}}}));}};function _0x4c3c(){const _0x223fe3=['pluginName','26272cnikgl','size','getUnit','resolveComment','UniverLicensePlugin','_initUserSync','delete','setConfig','replyId','add','Add','listComments','requireSession','users','_configService','UniverThreadCommentDataSourcePlugin','stringify','get','CollaborationSessionService','rangeType','Solved','code','HTTPService','deleteComment','resolved','9404964aLNIYa','16027913jVDBlf','_threadCommentDataSource','2321765wjDkkr','4AZrtSy','updateComment','content','_commentService','personId','userId','post','CommentService','payload','format','Reply','getUser','_initDataSource','9770346iZBvKJ','_threadCommentModel','Unknown','parse','addComment','error','createTimestamp','Edit','onStarting','onReady','getMemberID','symbol','Inject','1722ZxUczF','ref','bufferTime','UniverInstanceType','user','threadId','10NjqaVV','Module','filter','_userService','Plugin','_injector','6NPqlhE','/list','length','body','329542DVaGcy','YYYY/MM/DD\x20HH:mm','comment','/universer-api/comment/unit/','rangeId','merge','UserManagerService','userID','2496153iWStTF','getOwnPropertyDescriptor','parentId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','map','pipe','defineProperty','UniverCollaborationClientPlugin','comments','Injector','/solved','toStringTag','disposeWithMe','COMMENT','UNRECOGNIZED','forEach','replies','root','Disposable','dayjs','_config','IThreadCommentDataSourceService','dataSource','slice','Solve','/reply','type','CustomRangeType','thread-comment-data-source.config','_sessionService','addUser','DependentOn','_httpService','_threadCommentDataSourceService','OpenOrReOpen','find','solved','Delete','unitId','syncUpdateMutationToColla','subscribe','reply'];_0x4c3c=function(){return _0x223fe3;};return _0x4c3c();}_=E([S(0x0,c[_0x5e36c2(0x13b)](b[_0x5e36c2(0x1a3)])),S(0x1,c[_0x5e36c2(0x13b)](M['ThreadCommentModel'])),S(0x2,c['Inject'](c[_0x5e36c2(0x152)])),S(0x3,c[_0x5e36c2(0x13b)](c[_0x5e36c2(0x15d)]))],_);const q=_0x5e36c2(0x170),D={};var A=Object[_0x5e36c2(0x155)],x=(_0x349f9f,_0x15402d,_0x574a9b,_0x45c323)=>{const _0x1ed8a0=_0x5e36c2;for(var _0x2fd61c=_0x45c323>0x1?void 0x0:_0x45c323?A(_0x15402d,_0x574a9b):_0x15402d,_0x403ce4=_0x349f9f[_0x1ed8a0(0x14a)]-0x1,_0x337bfc;_0x403ce4>=0x0;_0x403ce4--)(_0x337bfc=_0x349f9f[_0x403ce4])&&(_0x2fd61c=_0x337bfc(_0x2fd61c)||_0x2fd61c);return _0x2fd61c;},C=(_0x5dcd64,_0x3680a5)=>(_0xb5b9f6,_0x1254fe)=>_0x3680a5(_0xb5b9f6,_0x1254fe,_0x5dcd64);function Y(_0x19422a,_0x12c3c9){const _0x4cf86e=_0x5e36c2,_0x26080a=_0x19422a[_0x4cf86e(0x164)][0x0];return{..._0x12c3c9,'id':_0x26080a[_0x4cf86e(0x187)],'resolved':_0x19422a['solved']===0x1,'dT':f(_0x26080a[_0x4cf86e(0x1af)]),'personId':_0x26080a['userId'],'threadId':_0x26080a[_0x4cf86e(0x141)]};}function G(_0xc0a4,_0x490916,_0x1462ac){const _0x3b3d71=_0x5e36c2;var _0x3b0ddd,_0x556a13;if(((_0x556a13=(_0x3b0ddd=_0xc0a4==null?void 0x0:_0xc0a4[_0x3b3d71(0x164)])==null?void 0x0:_0x3b0ddd['length'])!=null?_0x556a13:0x0)>0x0){const _0x2537b0=(_0x368388,_0x1064da)=>({'id':_0x368388[_0x3b3d71(0x187)],'threadId':_0x368388[_0x3b3d71(0x141)],'dT':f(_0x368388[_0x3b3d71(0x1af)]),'personId':_0x368388['userId'],'resolved':_0xc0a4[_0x3b3d71(0x178)]===I[_0x3b3d71(0x193)],'unitId':_0x490916,'subUnitId':_0x1462ac,'text':JSON[_0x3b3d71(0x1ac)](_0x368388['content']),'parentId':_0x1064da}),_0x200d95=_0x2537b0(_0xc0a4[_0x3b3d71(0x164)][0x0]);return{..._0x200d95,'children':_0xc0a4[_0x3b3d71(0x164)][_0x3b3d71(0x16b)](0x1)[_0x3b3d71(0x158)](_0x334c8e=>_0x2537b0(_0x334c8e,_0x200d95['id']))};}return null;}let p=class{constructor(_0x5e7dba,_0x4c3471,_0x590ffb){const _0x320ee3=_0x5e36c2;this[_0x320ee3(0x174)]=_0x5e7dba,this[_0x320ee3(0x145)]=_0x4c3471,this['_sessionService']=_0x590ffb;}async[_0x5e36c2(0x1ad)](_0x58bc6d){const _0x3d0ba0=_0x5e36c2;var _0x3291e6,_0x273b6d;const {parentId:_0x40d935,unitId:_0x3fd172,text:_0x38625c,threadId:_0x2feeb1}=_0x58bc6d,_0x19dcd4=(_0x273b6d=(_0x3291e6=_0x38625c['customRanges'])==null?void 0x0:_0x3291e6[_0x3d0ba0(0x144)](_0x3db06c=>_0x3db06c['rangeType']===c[_0x3d0ba0(0x16f)][_0x3d0ba0(0x161)])[_0x3d0ba0(0x158)](_0x808bfb=>_0x808bfb[_0x3d0ba0(0x150)]))!=null?_0x273b6d:[],_0x83d8b4=JSON[_0x3d0ba0(0x18f)](_0x38625c),_0x3d724f=(await this[_0x3d0ba0(0x171)][_0x3d0ba0(0x18b)](_0x3fd172))[_0x3d0ba0(0x139)]();if(_0x40d935){const _0x52deb0={'memberId':_0x3d724f,'unitId':_0x3fd172,'content':_0x83d8b4,'mention':_0x19dcd4,'threadId':_0x2feeb1},_0x2ffdda=(await this[_0x3d0ba0(0x174)][_0x3d0ba0(0x1a2)](_0x3d0ba0(0x14f)+_0x3fd172+_0x3d0ba0(0x16d),{'body':_0x52deb0}))[_0x3d0ba0(0x14b)][_0x3d0ba0(0x17d)];return{..._0x58bc6d,'id':_0x2ffdda['replyId'],'dT':c[_0x3d0ba0(0x167)](+_0x2ffdda['createTimestamp'])[_0x3d0ba0(0x1a5)](_0x3d0ba0(0x14d)),'personId':_0x2ffdda[_0x3d0ba0(0x1a1)]};}else{const _0xf08d96={'memberId':_0x3d724f,'unitId':_0x3fd172,'content':_0x83d8b4,'mention':_0x19dcd4},_0x6b2bef=await this[_0x3d0ba0(0x174)]['post'](_0x3d0ba0(0x14f)+_0x3fd172+'/add',{'body':_0xf08d96});return Y(_0x6b2bef['body'][_0x3d0ba0(0x14e)],_0x58bc6d);}}async[_0x5e36c2(0x19d)](_0xd6d4ba){const _0x15c040=_0x5e36c2;var _0x20da07,_0x262a4b;const {text:_0x2f7820,unitId:_0x3571e7}=_0xd6d4ba,_0x5ce69a=(_0x262a4b=(_0x20da07=_0x2f7820['customRanges'])==null?void 0x0:_0x20da07['filter'](_0x2f88ec=>_0x2f88ec[_0x15c040(0x192)]===c[_0x15c040(0x16f)][_0x15c040(0x161)])[_0x15c040(0x158)](_0x224875=>_0x224875[_0x15c040(0x150)]))!=null?_0x262a4b:[],_0x1d8dbf=JSON['stringify'](_0x2f7820),_0x54b883=_0xd6d4ba['threadId'],_0x48ef62=_0xd6d4ba['id'],_0x53b2a1={'memberId':(await this[_0x15c040(0x171)][_0x15c040(0x18b)](_0x3571e7))[_0x15c040(0x139)](),'unitId':_0x3571e7,'threadId':_0x54b883,'mention':_0x5ce69a,'content':_0x1d8dbf,'replyId':_0x48ef62},_0x25fd97=await this[_0x15c040(0x174)][_0x15c040(0x1a2)]('/universer-api/comment/unit/'+_0x3571e7+'/edit',{'body':_0x53b2a1});return!_0x25fd97[_0x15c040(0x14b)][_0x15c040(0x1ae)]||_0x25fd97[_0x15c040(0x14b)][_0x15c040(0x1ae)]['code']===0x1;}async[_0x5e36c2(0x182)](_0x560a27){const _0x5612ca=_0x5e36c2,{unitId:_0x2fe0a0}=_0x560a27,_0x8c13a5=_0x560a27[_0x5612ca(0x141)],_0x2e274d={'memberId':this[_0x5612ca(0x145)]['getCurrentUser']()[_0x5612ca(0x153)],'unitId':_0x2fe0a0,'threadId':_0x8c13a5,'solved':_0x560a27[_0x5612ca(0x197)]?I[_0x5612ca(0x193)]:I[_0x5612ca(0x176)]},_0x588f8f=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x2fe0a0+_0x5612ca(0x15e),{'body':_0x2e274d});return!_0x588f8f[_0x5612ca(0x14b)]['error']||_0x588f8f['body']['error'][_0x5612ca(0x194)]===0x1;}async[_0x5e36c2(0x196)](_0x20ebd0,_0x99eb1b,_0x33492b,_0x158c47){const _0xc720eb=_0x5e36c2,_0x19eac4={'memberId':(await this[_0xc720eb(0x171)][_0xc720eb(0x18b)](_0x20ebd0))[_0xc720eb(0x139)](),'threadId':_0x33492b,'replyId':_0x158c47,'unitId':_0x20ebd0},_0x192e0f=await this[_0xc720eb(0x174)][_0xc720eb(0x1a2)](_0xc720eb(0x14f)+_0x20ebd0+'/delete',{'body':_0x19eac4});return!_0x192e0f['body']['error']||_0x192e0f[_0xc720eb(0x14b)]['error']['code']===0x1;}async[_0x5e36c2(0x18a)](_0xeb0ae4,_0x3258ee,_0x5c25f7){const _0x230533=_0x5e36c2,_0x5992c4={'unitId':_0xeb0ae4,'threadId':_0x5c25f7},_0x2137d1=await this[_0x230533(0x174)][_0x230533(0x1a2)]('/universer-api/comment/unit/'+_0xeb0ae4+_0x230533(0x149),{'body':_0x5992c4}),_0x121230=_0x5c25f7['map'](_0x4b5248=>G(_0x2137d1[_0x230533(0x14b)][_0x230533(0x15c)][_0x4b5248],_0xeb0ae4,_0x3258ee))[_0x230533(0x144)](Boolean);return Object['values'](_0x2137d1[_0x230533(0x14b)][_0x230533(0x18c)])['forEach'](_0x7ec268=>{const _0x3871be=_0x230533;this[_0x3871be(0x145)]['addUser'](_0x7ec268);}),_0x121230;}['saveCommentToSnapshot'](_0x5794f0){const _0xe0009=_0x5e36c2;return{'id':_0x5794f0['id'],'threadId':_0x5794f0[_0xe0009(0x141)],'ref':_0x5794f0[_0xe0009(0x13d)]};}};p=x([C(0x0,c[_0x5e36c2(0x13b)](P['HTTPService'])),C(0x1,c[_0x5e36c2(0x13b)](c[_0x5e36c2(0x152)])),C(0x2,c['Inject'](b[_0x5e36c2(0x191)]))],p);function _0x3d7d(_0x591760,_0x32c773){const _0x4c3c53=_0x4c3c();return _0x3d7d=function(_0x3d7d3f,_0x3eebe8){_0x3d7d3f=_0x3d7d3f-0x136;let _0x2a4a77=_0x4c3c53[_0x3d7d3f];return _0x2a4a77;},_0x3d7d(_0x591760,_0x32c773);}var H=Object['getOwnPropertyDescriptor'],J=(_0x183f16,_0x5a935f,_0x2b0980,_0x4c26a5)=>{const _0x3cc356=_0x5e36c2;for(var _0x293cbb=_0x4c26a5>0x1?void 0x0:_0x4c26a5?H(_0x5a935f,_0x2b0980):_0x5a935f,_0x7dcb42=_0x183f16[_0x3cc356(0x14a)]-0x1,_0x2f2157;_0x7dcb42>=0x0;_0x7dcb42--)(_0x2f2157=_0x183f16[_0x7dcb42])&&(_0x293cbb=_0x2f2157(_0x293cbb)||_0x293cbb);return _0x293cbb;},y=(_0x58fcc9,_0x28448c)=>(_0x31ceac,_0x492638)=>_0x28448c(_0x31ceac,_0x492638,_0x58fcc9);let g=class extends c[_0x5e36c2(0x166)]{constructor(_0x3a35e4,_0x333771){const _0x369c75=_0x5e36c2;super(),this['_threadCommentDataSourceService']=_0x3a35e4,this[_0x369c75(0x19a)]=_0x333771,this[_0x369c75(0x1a8)]();}['_initDataSource'](){const _0x56a675=_0x5e36c2;this[_0x56a675(0x175)][_0x56a675(0x16a)]=this[_0x56a675(0x19a)],this['_threadCommentDataSourceService'][_0x56a675(0x17b)]=!0x1;}};g=J([y(0x0,M[_0x5e36c2(0x169)]),y(0x1,c[_0x5e36c2(0x13b)](p))],g);var F=Object['defineProperty'],L=Object[_0x5e36c2(0x155)],Z=(_0x19a1df,_0x349e8c,_0x1ed548)=>_0x349e8c in _0x19a1df?F(_0x19a1df,_0x349e8c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1ed548}):_0x19a1df[_0x349e8c]=_0x1ed548,W=(_0x2e30eb,_0xce6373,_0x1ffd1e,_0x5fd304)=>{const _0x4345d3=_0x5e36c2;for(var _0x4758a7=_0x5fd304>0x1?void 0x0:_0x5fd304?L(_0xce6373,_0x1ffd1e):_0xce6373,_0xff6eb0=_0x2e30eb[_0x4345d3(0x14a)]-0x1,_0x703532;_0xff6eb0>=0x0;_0xff6eb0--)(_0x703532=_0x2e30eb[_0xff6eb0])&&(_0x4758a7=_0x703532(_0x4758a7)||_0x4758a7);return _0x4758a7;},O=(_0x125e79,_0xc60943)=>(_0xdb842d,_0x1b8956)=>_0xc60943(_0xdb842d,_0x1b8956,_0x125e79),N=(_0x15d2cc,_0x188c5b,_0xe5143b)=>Z(_0x15d2cc,typeof _0x188c5b!=_0x5e36c2(0x13a)?_0x188c5b+'':_0x188c5b,_0xe5143b);exports[_0x5e36c2(0x18e)]=class extends c[_0x5e36c2(0x146)]{constructor(_0x1ad0d6=D,_0x27862b,_0x3eb821){const _0x5abdbc=_0x5e36c2;super(),this[_0x5abdbc(0x168)]=_0x1ad0d6,this[_0x5abdbc(0x147)]=_0x27862b,this[_0x5abdbc(0x18d)]=_0x3eb821;const {..._0x5084fe}=c[_0x5abdbc(0x151)]({},D,this[_0x5abdbc(0x168)]);this[_0x5abdbc(0x18d)][_0x5abdbc(0x186)](q,_0x5084fe);}[_0x5e36c2(0x137)](){[[p],[g],[_]]['forEach'](_0x463771=>{const _0xbd3ac3=_0x3d7d;this[_0xbd3ac3(0x147)][_0xbd3ac3(0x188)](_0x463771);});}[_0x5e36c2(0x138)](){const _0x1efe39=_0x5e36c2;this[_0x1efe39(0x147)][_0x1efe39(0x190)](g),this[_0x1efe39(0x147)][_0x1efe39(0x190)](_);}},N(exports[_0x5e36c2(0x18e)],_0x5e36c2(0x17e),U),N(exports[_0x5e36c2(0x18e)],'type',c[_0x5e36c2(0x13f)]['UNIVER_UNKNOWN']),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x5e36c2(0x173)](w['UniverThreadCommentUIPlugin'],b[_0x5e36c2(0x15b)],T[_0x5e36c2(0x183)]),O(0x1,c['Inject'](c[_0x5e36c2(0x15d)])),O(0x2,c['IConfigService'])],exports['UniverThreadCommentDataSourcePlugin']);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x57e23e=_0x3678;(function(_0x1ec912,_0x1eef7d){const _0x221c1e=_0x3678,_0x416433=_0x1ec912();while(!![]){try{const _0x2dc5c2=parseInt(_0x221c1e(0x21d))/0x1+-parseInt(_0x221c1e(0x1f0))/0x2*(-parseInt(_0x221c1e(0x1e7))/0x3)+parseInt(_0x221c1e(0x227))/0x4*(parseInt(_0x221c1e(0x203))/0x5)+parseInt(_0x221c1e(0x1e5))/0x6+parseInt(_0x221c1e(0x1e9))/0x7*(-parseInt(_0x221c1e(0x1d9))/0x8)+parseInt(_0x221c1e(0x215))/0x9+-parseInt(_0x221c1e(0x224))/0xa;if(_0x2dc5c2===_0x1eef7d)break;else _0x416433['push'](_0x416433['shift']());}catch(_0x25fb4a){_0x416433['push'](_0x416433['shift']());}}}(_0x1dc8,0x33927));import{CommentService as _0x32f612,CollaborationSessionService as _0x4def68,UniverCollaborationClientPlugin as _0x438e91}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x22a789}from'@univerjs-pro/license';import{dayjs as _0xfce7b2,UserManagerService as _0x5637fb,Inject as _0x265658,Injector as _0x3ee306,Disposable as _0x4c0b42,CustomRangeType as _0x8c3a5d,UniverInstanceType as _0x4f9a51,DependentOn as _0x56c811,IConfigService as _0x1b4eab,Plugin as _0x5ee073,merge as _0x365039}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3ffb4f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x53f94a,IThreadCommentDataSourceService as _0x32ea08}from'@univerjs/thread-comment';import{bufferTime as _0x3f8f26}from'rxjs';function _0x1dc8(){const _0x21b726=['/add','updateComment','body','personId','format','comment','size','Delete','Reply','_httpService','rangeId','get','213993BzaldV','parse','_commentService','onStarting','onReady','content','replies','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','227390KcMXkU','getUser','solved','addUser','code','pipe','resolveComment','3762460YGNaKR','unitId','deleteComment','2944adbrgH','parentId','_threadCommentModel','_initUserSync','commentUpdate$','stringify','/delete','add','forEach','find','replyId','filter','post','length','_init','addComment','getComment','OpenOrReOpen','/universer-api/user/list','payload','slice','subscribe','/universer-api/comment/unit/','UNIVER_UNKNOWN','getMemberID','40WqcaaA','_sessionService','_initDataSource','defineProperty','pluginName','_threadCommentDataSourceService','listComments','_config','symbol','ref','map','Solve','1760490WBkmLy','createTimestamp','3MGCKkg','userID','325437wodbIJ','userId','_userService','threadId','getUnit','Add','dataSource','496252PcvCuP','UNRECOGNIZED','Unknown','getCurrentUser','rangeType','error','Edit','comments','type','/reply','resolved','saveCommentToSnapshot','requireSession','_threadCommentDataSource','disposeWithMe','COMMENT','YYYY/MM/DD\x20HH:mm','/solved','root','185WGcMUO','_configService','users','Solved','_injector','getOwnPropertyDescriptor'];_0x1dc8=function(){return _0x21b726;};return _0x1dc8();}import{HTTPService as _0x1d21bd}from'@univerjs/network';const W=_0x57e23e(0x21c);var I=(_0x34a31d=>(_0x34a31d[_0x34a31d[_0x57e23e(0x1d1)]=0x0]='OpenOrReOpen',_0x34a31d[_0x34a31d[_0x57e23e(0x206)]=0x1]='Solved',_0x34a31d[_0x34a31d['UNRECOGNIZED']=-0x1]=_0x57e23e(0x1f1),_0x34a31d))(I||{}),v=(_0x260baf=>(_0x260baf[_0x260baf[_0x57e23e(0x1f2)]=0x0]=_0x57e23e(0x1f2),_0x260baf[_0x260baf[_0x57e23e(0x1ee)]=0x1]=_0x57e23e(0x1ee),_0x260baf[_0x260baf[_0x57e23e(0x211)]=0x2]=_0x57e23e(0x211),_0x260baf[_0x260baf[_0x57e23e(0x1f6)]=0x3]=_0x57e23e(0x1f6),_0x260baf[_0x260baf[_0x57e23e(0x210)]=0x4]=_0x57e23e(0x210),_0x260baf[_0x260baf[_0x57e23e(0x1e4)]=0x5]=_0x57e23e(0x1e4),_0x260baf[_0x260baf[_0x57e23e(0x1f1)]=-0x1]=_0x57e23e(0x1f1),_0x260baf))(v||{});const y=_0x532766=>_0xfce7b2(new Date(+_0x532766))[_0x57e23e(0x20d)](_0x57e23e(0x200)),B=async(_0x396b85,_0x24b321)=>{const _0x1f2635=_0x57e23e,_0x5ee47f=_0x396b85[_0x1f2635(0x214)](_0x5637fb),_0xdd1934=_0x396b85[_0x1f2635(0x214)](_0x1d21bd);_0x24b321[_0x1f2635(0x1c8)](_0x389d81=>{const _0x58ef20=_0x1f2635;_0x5ee47f[_0x58ef20(0x21e)](_0x389d81)&&_0x24b321['delete'](_0x389d81);}),_0x24b321[_0x1f2635(0x20f)]&&(await _0xdd1934[_0x1f2635(0x214)](_0x1f2635(0x1d2),{'params':{'userIDs':[..._0x24b321]}}))[_0x1f2635(0x20b)]['users']['forEach'](_0x10b288=>{_0x10b288&&_0x5ee47f['addUser'](_0x10b288);});};var K=Object[_0x57e23e(0x208)],V=(_0x544171,_0x1015bd,_0x34fd47,_0x13f101)=>{const _0x40d473=_0x57e23e;for(var _0x5e508e=_0x13f101>0x1?void 0x0:_0x13f101?K(_0x1015bd,_0x34fd47):_0x1015bd,_0x4b8b7c=_0x544171[_0x40d473(0x1cd)]-0x1,_0x29db4a;_0x4b8b7c>=0x0;_0x4b8b7c--)(_0x29db4a=_0x544171[_0x4b8b7c])&&(_0x5e508e=_0x29db4a(_0x5e508e)||_0x5e508e);return _0x5e508e;},p=(_0x2d7ae0,_0x43efec)=>(_0x1dcc10,_0x634fb2)=>_0x43efec(_0x1dcc10,_0x634fb2,_0x2d7ae0);let _=class extends _0x4c0b42{constructor(_0xa00ebb,_0xe74d47,_0x552af3,_0x5b79df){const _0x4265db=_0x57e23e;super(),this[_0x4265db(0x217)]=_0xa00ebb,this[_0x4265db(0x229)]=_0xe74d47,this[_0x4265db(0x1eb)]=_0x552af3,this['_injector']=_0x5b79df,this['_init'](),this[_0x4265db(0x22a)]();}[_0x57e23e(0x22a)](){const _0x11c28c=_0x57e23e;this[_0x11c28c(0x1fe)](this['_threadCommentModel'][_0x11c28c(0x22b)][_0x11c28c(0x222)](_0x3f8f26(0x10))[_0x11c28c(0x1d5)](_0x3fe4c7=>{const _0xc1ca08=_0x11c28c,_0x42bd83=new Set();_0x3fe4c7[_0xc1ca08(0x1c8)](_0x4abca8=>{const _0x150fa1=_0xc1ca08;switch(_0x4abca8[_0x150fa1(0x1f8)]){case _0x150fa1(0x1c7):{const _0x3b2e4e=_0x4abca8[_0x150fa1(0x1d3)][_0x150fa1(0x20c)];_0x42bd83[_0x150fa1(0x1c7)](_0x3b2e4e);break;}}}),B(this['_injector'],_0x42bd83);}));}[_0x57e23e(0x1ce)](){const _0x261ccb=_0x57e23e;this['disposeWithMe'](this['_commentService'][_0x261ccb(0x22b)]['subscribe'](async _0x6c7af3=>{const _0xa1745b=_0x261ccb;var _0x466cf3,_0x1684c8,_0x4162d2,_0x2612c0;const _0x10b2d6=(_0x466cf3=this['_threadCommentModel'][_0xa1745b(0x1ed)](_0x6c7af3[_0xa1745b(0x225)])['find'](_0x2f2fa8=>_0x2f2fa8[_0xa1745b(0x1ec)]===_0x6c7af3[_0xa1745b(0x1ec)]))==null?void 0x0:_0x466cf3['root'];if(!_0x10b2d6)return;const {unitId:_0x391d2c,subUnitId:_0x4ee5a0}=_0x10b2d6;switch(_0x6c7af3['user']&&this[_0xa1745b(0x1eb)][_0xa1745b(0x220)](_0x6c7af3['user']),_0x6c7af3[_0xa1745b(0x1f8)]){case v['Add']:break;case v[_0xa1745b(0x211)]:{this[_0xa1745b(0x229)][_0xa1745b(0x1cf)](_0x391d2c,_0x4ee5a0,{'unitId':_0x391d2c,'subUnitId':_0x4ee5a0,'ref':'','id':_0x6c7af3[_0xa1745b(0x1ca)],'dT':y(+_0x6c7af3[_0xa1745b(0x1e6)]),'threadId':_0x6c7af3['threadId'],'personId':(_0x4162d2=(_0x1684c8=_0x6c7af3['user'])==null?void 0x0:_0x1684c8[_0xa1745b(0x1e8)])!=null?_0x4162d2:_0x6c7af3['userId'],'text':JSON[_0xa1745b(0x216)](_0x6c7af3[_0xa1745b(0x21a)]),'parentId':_0x10b2d6['id']});break;}case v['Delete']:{const _0xaf470a=this[_0xa1745b(0x229)][_0xa1745b(0x1d0)](_0x391d2c,_0x4ee5a0,_0x6c7af3['replyId']);_0xaf470a&&_0xaf470a[_0xa1745b(0x228)]&&this[_0xa1745b(0x229)][_0xa1745b(0x226)](_0x391d2c,_0x4ee5a0,_0x6c7af3[_0xa1745b(0x1ca)]);break;}case v[_0xa1745b(0x1f6)]:{this[_0xa1745b(0x229)][_0xa1745b(0x20a)](_0x391d2c,_0x4ee5a0,{'commentId':_0x6c7af3[_0xa1745b(0x1ca)],'text':JSON[_0xa1745b(0x216)](_0x6c7af3[_0xa1745b(0x21a)])});break;}case v[_0xa1745b(0x1e4)]:{const _0x3e2475=(_0x2612c0=this[_0xa1745b(0x229)][_0xa1745b(0x1ed)](_0x6c7af3[_0xa1745b(0x225)])[_0xa1745b(0x1c9)](_0x2dfe89=>_0x2dfe89[_0xa1745b(0x1ec)]===_0x6c7af3[_0xa1745b(0x1ec)]))==null?void 0x0:_0x2612c0[_0xa1745b(0x202)];_0x3e2475&&this[_0xa1745b(0x229)][_0xa1745b(0x223)](_0x391d2c,_0x4ee5a0,_0x3e2475['id'],_0x6c7af3[_0xa1745b(0x21f)]===I[_0xa1745b(0x206)]);break;}}}));}};function _0x3678(_0x1f58aa,_0x1b381d){const _0x1dc80c=_0x1dc8();return _0x3678=function(_0x367859,_0x22aa4e){_0x367859=_0x367859-0x1c7;let _0x523437=_0x1dc80c[_0x367859];return _0x523437;},_0x3678(_0x1f58aa,_0x1b381d);}_=V([p(0x0,_0x265658(_0x32f612)),p(0x1,_0x265658(_0x53f94a)),p(0x2,_0x265658(_0x5637fb)),p(0x3,_0x265658(_0x3ee306))],_);const z='thread-comment-data-source.config',O={};var k=Object[_0x57e23e(0x208)],Q=(_0x2e3b0a,_0x399c67,_0x3eb316,_0x1d4db8)=>{const _0x5649e8=_0x57e23e;for(var _0x2bc40d=_0x1d4db8>0x1?void 0x0:_0x1d4db8?k(_0x399c67,_0x3eb316):_0x399c67,_0x1d1f86=_0x2e3b0a[_0x5649e8(0x1cd)]-0x1,_0x1132ba;_0x1d1f86>=0x0;_0x1d1f86--)(_0x1132ba=_0x2e3b0a[_0x1d1f86])&&(_0x2bc40d=_0x1132ba(_0x2bc40d)||_0x2bc40d);return _0x2bc40d;},b=(_0xda184d,_0x362c72)=>(_0x455153,_0x221a44)=>_0x362c72(_0x455153,_0x221a44,_0xda184d);function X(_0x44d569,_0x401784){const _0x1bc266=_0x57e23e,_0x2eb7c4=_0x44d569[_0x1bc266(0x21b)][0x0];return{..._0x401784,'id':_0x2eb7c4['replyId'],'resolved':_0x44d569[_0x1bc266(0x21f)]===0x1,'dT':y(_0x2eb7c4[_0x1bc266(0x1e6)]),'personId':_0x2eb7c4[_0x1bc266(0x1ea)],'threadId':_0x2eb7c4[_0x1bc266(0x1ec)]};}function ee(_0x338e21,_0x3dd6fd,_0x218231){const _0x3792e3=_0x57e23e;var _0x12216d,_0x199ac0;if(((_0x199ac0=(_0x12216d=_0x338e21==null?void 0x0:_0x338e21[_0x3792e3(0x21b)])==null?void 0x0:_0x12216d['length'])!=null?_0x199ac0:0x0)>0x0){const _0xe356d4=(_0x5c0cff,_0x49c005)=>({'id':_0x5c0cff[_0x3792e3(0x1ca)],'threadId':_0x5c0cff[_0x3792e3(0x1ec)],'dT':y(_0x5c0cff[_0x3792e3(0x1e6)]),'personId':_0x5c0cff[_0x3792e3(0x1ea)],'resolved':_0x338e21[_0x3792e3(0x21f)]===I[_0x3792e3(0x206)],'unitId':_0x3dd6fd,'subUnitId':_0x218231,'text':JSON['parse'](_0x5c0cff['content']),'parentId':_0x49c005}),_0xd34982=_0xe356d4(_0x338e21['replies'][0x0]);return{..._0xd34982,'children':_0x338e21['replies'][_0x3792e3(0x1d4)](0x1)[_0x3792e3(0x1e3)](_0x58fc5e=>_0xe356d4(_0x58fc5e,_0xd34982['id']))};}return null;}let S=class{constructor(_0x29ea13,_0x17f317,_0x2df05f){const _0x3d14d9=_0x57e23e;this['_httpService']=_0x29ea13,this['_userService']=_0x17f317,this[_0x3d14d9(0x1da)]=_0x2df05f;}async['addComment'](_0x18e69b){const _0x18b8cb=_0x57e23e;var _0x3c8b9b,_0x495ad2;const {parentId:_0x39090f,unitId:_0x5131af,text:_0x293d18,threadId:_0x1f1f88}=_0x18e69b,_0x57f735=(_0x495ad2=(_0x3c8b9b=_0x293d18['customRanges'])==null?void 0x0:_0x3c8b9b['filter'](_0x9d1ec0=>_0x9d1ec0[_0x18b8cb(0x1f4)]===_0x8c3a5d[_0x18b8cb(0x1ff)])['map'](_0x42af26=>_0x42af26[_0x18b8cb(0x213)]))!=null?_0x495ad2:[],_0x4cce8c=JSON[_0x18b8cb(0x22c)](_0x293d18),_0x3c4058=(await this['_sessionService'][_0x18b8cb(0x1fc)](_0x5131af))[_0x18b8cb(0x1d8)]();if(_0x39090f){const _0x428f50={'memberId':_0x3c4058,'unitId':_0x5131af,'content':_0x4cce8c,'mention':_0x57f735,'threadId':_0x1f1f88},_0x4526c8=(await this[_0x18b8cb(0x212)]['post'](_0x18b8cb(0x1d6)+_0x5131af+_0x18b8cb(0x1f9),{'body':_0x428f50}))[_0x18b8cb(0x20b)]['reply'];return{..._0x18e69b,'id':_0x4526c8[_0x18b8cb(0x1ca)],'dT':_0xfce7b2(+_0x4526c8['createTimestamp'])[_0x18b8cb(0x20d)](_0x18b8cb(0x200)),'personId':_0x4526c8[_0x18b8cb(0x1ea)]};}else{const _0x4e4a73={'memberId':_0x3c4058,'unitId':_0x5131af,'content':_0x4cce8c,'mention':_0x57f735},_0x1c16ff=await this['_httpService'][_0x18b8cb(0x1cc)](_0x18b8cb(0x1d6)+_0x5131af+_0x18b8cb(0x209),{'body':_0x4e4a73});return X(_0x1c16ff[_0x18b8cb(0x20b)][_0x18b8cb(0x20e)],_0x18e69b);}}async[_0x57e23e(0x20a)](_0xda7b53){const _0x3e004c=_0x57e23e;var _0x38963c,_0x429417;const {text:_0x35b3b2,unitId:_0x17cae5}=_0xda7b53,_0x58baeb=(_0x429417=(_0x38963c=_0x35b3b2['customRanges'])==null?void 0x0:_0x38963c[_0x3e004c(0x1cb)](_0x17e191=>_0x17e191['rangeType']===_0x8c3a5d[_0x3e004c(0x1ff)])[_0x3e004c(0x1e3)](_0x4b2858=>_0x4b2858['rangeId']))!=null?_0x429417:[],_0x2abef5=JSON[_0x3e004c(0x22c)](_0x35b3b2),_0x2fb0a3=_0xda7b53[_0x3e004c(0x1ec)],_0x2d7bd6=_0xda7b53['id'],_0xddbcb7={'memberId':(await this[_0x3e004c(0x1da)]['requireSession'](_0x17cae5))[_0x3e004c(0x1d8)](),'unitId':_0x17cae5,'threadId':_0x2fb0a3,'mention':_0x58baeb,'content':_0x2abef5,'replyId':_0x2d7bd6},_0x137067=await this[_0x3e004c(0x212)][_0x3e004c(0x1cc)](_0x3e004c(0x1d6)+_0x17cae5+'/edit',{'body':_0xddbcb7});return!_0x137067['body'][_0x3e004c(0x1f5)]||_0x137067[_0x3e004c(0x20b)][_0x3e004c(0x1f5)][_0x3e004c(0x221)]===0x1;}async[_0x57e23e(0x223)](_0x529daf){const _0x3189ea=_0x57e23e,{unitId:_0x2bb7cf}=_0x529daf,_0x3cff6a=_0x529daf[_0x3189ea(0x1ec)],_0x1a8a3c={'memberId':this[_0x3189ea(0x1eb)][_0x3189ea(0x1f3)]()[_0x3189ea(0x1e8)],'unitId':_0x2bb7cf,'threadId':_0x3cff6a,'solved':_0x529daf[_0x3189ea(0x1fa)]?I[_0x3189ea(0x206)]:I[_0x3189ea(0x1d1)]},_0x42ba7d=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x2bb7cf+_0x3189ea(0x201),{'body':_0x1a8a3c});return!_0x42ba7d[_0x3189ea(0x20b)]['error']||_0x42ba7d['body'][_0x3189ea(0x1f5)][_0x3189ea(0x221)]===0x1;}async['deleteComment'](_0x38a6d9,_0x381814,_0x60e4c7,_0x5031d2){const _0x29654d=_0x57e23e,_0x4b2946={'memberId':(await this[_0x29654d(0x1da)]['requireSession'](_0x38a6d9))[_0x29654d(0x1d8)](),'threadId':_0x60e4c7,'replyId':_0x5031d2,'unitId':_0x38a6d9},_0x30ae34=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x38a6d9+_0x29654d(0x22d),{'body':_0x4b2946});return!_0x30ae34[_0x29654d(0x20b)][_0x29654d(0x1f5)]||_0x30ae34[_0x29654d(0x20b)][_0x29654d(0x1f5)]['code']===0x1;}async[_0x57e23e(0x1df)](_0x10fc39,_0x1973f0,_0x3cac56){const _0x167144=_0x57e23e,_0x1bc65f={'unitId':_0x10fc39,'threadId':_0x3cac56},_0x5d85fc=await this[_0x167144(0x212)][_0x167144(0x1cc)]('/universer-api/comment/unit/'+_0x10fc39+'/list',{'body':_0x1bc65f}),_0x541de7=_0x3cac56[_0x167144(0x1e3)](_0x18d853=>ee(_0x5d85fc[_0x167144(0x20b)][_0x167144(0x1f7)][_0x18d853],_0x10fc39,_0x1973f0))[_0x167144(0x1cb)](Boolean);return Object['values'](_0x5d85fc[_0x167144(0x20b)][_0x167144(0x205)])[_0x167144(0x1c8)](_0x87e959=>{const _0x477df6=_0x167144;this[_0x477df6(0x1eb)][_0x477df6(0x220)](_0x87e959);}),_0x541de7;}[_0x57e23e(0x1fb)](_0x4356b5){const _0x2eb497=_0x57e23e;return{'id':_0x4356b5['id'],'threadId':_0x4356b5[_0x2eb497(0x1ec)],'ref':_0x4356b5[_0x2eb497(0x1e2)]};}};S=Q([b(0x0,_0x265658(_0x1d21bd)),b(0x1,_0x265658(_0x5637fb)),b(0x2,_0x265658(_0x4def68))],S);var re=Object[_0x57e23e(0x208)],te=(_0x4c3cf2,_0x4616b4,_0x1779e0,_0x460075)=>{const _0x1958c8=_0x57e23e;for(var _0x1a8ddc=_0x460075>0x1?void 0x0:_0x460075?re(_0x4616b4,_0x1779e0):_0x4616b4,_0x447ce9=_0x4c3cf2[_0x1958c8(0x1cd)]-0x1,_0x90aed5;_0x447ce9>=0x0;_0x447ce9--)(_0x90aed5=_0x4c3cf2[_0x447ce9])&&(_0x1a8ddc=_0x90aed5(_0x1a8ddc)||_0x1a8ddc);return _0x1a8ddc;},M=(_0x332ea2,_0x375c38)=>(_0x5e1e0e,_0x592bd1)=>_0x375c38(_0x5e1e0e,_0x592bd1,_0x332ea2);let f=class extends _0x4c0b42{constructor(_0x5dd9a7,_0x2e6fd8){super(),this['_threadCommentDataSourceService']=_0x5dd9a7,this['_threadCommentDataSource']=_0x2e6fd8,this['_initDataSource']();}[_0x57e23e(0x1db)](){const _0x129f4b=_0x57e23e;this[_0x129f4b(0x1de)][_0x129f4b(0x1ef)]=this[_0x129f4b(0x1fd)],this[_0x129f4b(0x1de)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x32ea08),M(0x1,_0x265658(S))],f);var se=Object[_0x57e23e(0x1dc)],oe=Object[_0x57e23e(0x208)],ne=(_0x2ff49d,_0x9b60d0,_0x17b82b)=>_0x9b60d0 in _0x2ff49d?se(_0x2ff49d,_0x9b60d0,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x17b82b}):_0x2ff49d[_0x9b60d0]=_0x17b82b,ie=(_0x301ba2,_0x3d5a0c,_0xf5a0b8,_0x1c7cc8)=>{const _0x2bb504=_0x57e23e;for(var _0x3b8399=_0x1c7cc8>0x1?void 0x0:_0x1c7cc8?oe(_0x3d5a0c,_0xf5a0b8):_0x3d5a0c,_0x36a23d=_0x301ba2[_0x2bb504(0x1cd)]-0x1,_0x183c3d;_0x36a23d>=0x0;_0x36a23d--)(_0x183c3d=_0x301ba2[_0x36a23d])&&(_0x3b8399=_0x183c3d(_0x3b8399)||_0x3b8399);return _0x3b8399;},N=(_0x1b3904,_0x297911)=>(_0x17f7f6,_0x11ccd9)=>_0x297911(_0x17f7f6,_0x11ccd9,_0x1b3904),$=(_0x1bc202,_0x43b90e,_0x85be7d)=>ne(_0x1bc202,typeof _0x43b90e!=_0x57e23e(0x1e1)?_0x43b90e+'':_0x43b90e,_0x85be7d);let g=class extends _0x5ee073{constructor(_0x1ef92c=O,_0x5571ac,_0x51c46d){const _0x33502=_0x57e23e;super(),this[_0x33502(0x1e0)]=_0x1ef92c,this[_0x33502(0x207)]=_0x5571ac,this['_configService']=_0x51c46d;const {..._0xe74cee}=_0x365039({},O,this[_0x33502(0x1e0)]);this[_0x33502(0x204)]['setConfig'](z,_0xe74cee);}[_0x57e23e(0x218)](){const _0x332f40=_0x57e23e;[[S],[f],[_]][_0x332f40(0x1c8)](_0x473c86=>{const _0x53075e=_0x332f40;this[_0x53075e(0x207)][_0x53075e(0x1c7)](_0x473c86);});}[_0x57e23e(0x219)](){const _0x36730e=_0x57e23e;this[_0x36730e(0x207)]['get'](f),this[_0x36730e(0x207)][_0x36730e(0x214)](_);}};$(g,_0x57e23e(0x1dd),W),$(g,_0x57e23e(0x1f8),_0x4f9a51[_0x57e23e(0x1d7)]),g=ie([_0x56c811(_0x3ffb4f,_0x438e91,_0x22a789),N(0x1,_0x265658(_0x3ee306)),N(0x2,_0x1b4eab)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ function _0x4b19(){const _0x5931d0=['_commentService','map','Solve','Solved','ref','error','pipe','type','getComment','Unknown','getCurrentUser','thread-comment-data-source.config','YYYY/MM/DD\x20HH:mm','length','1982272fJtFNI','_injector','Reply','replyId','getOwnPropertyDescriptor','delete','addUser','users','solved','4668248TefsXS','OpenOrReOpen','/delete','4939446YddyLV','resolved','format','stringify','slice','_initUserSync','1110366umpKha','7dMwilo','14674104VITWXC','175430nMxnIB','rangeType','getMemberID','post','syncUpdateMutationToColla','dataSource','comments','add','reply','content','_configService','/universer-api/comment/unit/','comment','user','/edit','2078340zWCoQN','values','root','_init','rangeId','COMMENT','body','_userService','saveCommentToSnapshot','userID','_config','getUnit','parse','resolveComment','filter','subscribe','threadId','updateComment','listComments','replies','disposeWithMe','commentUpdate$','/solved','setConfig','defineProperty','requireSession','_sessionService','customRanges','createTimestamp','_httpService','unitId','personId','6ShsaHY','getUser','Delete','/reply','userId','_threadCommentModel','Edit','code','/universer-api/user/list','_threadCommentDataSourceService','find','addComment','_initDataSource','onReady','deleteComment','Add','_threadCommentDataSource','forEach','UNRECOGNIZED','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','get'];_0x4b19=function(){return _0x5931d0;};return _0x4b19();}const _0x508aae=_0x2893;(function(_0x2afc5d,_0x128712){const _0x57876c=_0x2893,_0x22f4cb=_0x2afc5d();while(!![]){try{const _0x3a6dfb=-parseInt(_0x57876c(0x1f6))/0x1*(-parseInt(_0x57876c(0x1be))/0x2)+-parseInt(_0x57876c(0x1f3))/0x3+parseInt(_0x57876c(0x1ea))/0x4+parseInt(_0x57876c(0x19e))/0x5+-parseInt(_0x57876c(0x1ed))/0x6*(-parseInt(_0x57876c(0x1f4))/0x7)+-parseInt(_0x57876c(0x1e1))/0x8+-parseInt(_0x57876c(0x1f5))/0x9;if(_0x3a6dfb===_0x128712)break;else _0x22f4cb['push'](_0x22f4cb['shift']());}catch(_0x456131){_0x22f4cb['push'](_0x22f4cb['shift']());}}}(_0x4b19,0xa6f7b));import{CommentService as _0xeab878,CollaborationSessionService as _0x2c9dad,UniverCollaborationClientPlugin as _0x214c30}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1dfa68}from'@univerjs-pro/license';import{dayjs as _0xd8a88a,UserManagerService as _0x119c71,Inject as _0x2d47f8,Injector as _0x1c26b5,Disposable as _0x5be0c8,CustomRangeType as _0x32d36d,UniverInstanceType as _0x5c1d9b,DependentOn as _0x562a8a,IConfigService as _0x385a7d,Plugin as _0x1beb87,merge as _0x5ac491}from'@univerjs/core';function _0x2893(_0x59814a,_0x1b51d1){const _0x4b19bd=_0x4b19();return _0x2893=function(_0x289352,_0x2fa73c){_0x289352=_0x289352-0x19a;let _0x480643=_0x4b19bd[_0x289352];return _0x480643;},_0x2893(_0x59814a,_0x1b51d1);}import{UniverThreadCommentUIPlugin as _0x38a385}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x10684c,IThreadCommentDataSourceService as _0x4e8f25}from'@univerjs/thread-comment';import{bufferTime as _0x31ea8f}from'rxjs';import{HTTPService as _0x2f6168}from'@univerjs/network';const W=_0x508aae(0x1d1);var I=(_0x33da7e=>(_0x33da7e[_0x33da7e[_0x508aae(0x1eb)]=0x0]=_0x508aae(0x1eb),_0x33da7e[_0x33da7e[_0x508aae(0x1d6)]=0x1]=_0x508aae(0x1d6),_0x33da7e[_0x33da7e['UNRECOGNIZED']=-0x1]=_0x508aae(0x1d0),_0x33da7e))(I||{}),v=(_0x5a04b5=>(_0x5a04b5[_0x5a04b5[_0x508aae(0x1dc)]=0x0]='Unknown',_0x5a04b5[_0x5a04b5[_0x508aae(0x1cd)]=0x1]=_0x508aae(0x1cd),_0x5a04b5[_0x5a04b5[_0x508aae(0x1e3)]=0x2]='Reply',_0x5a04b5[_0x5a04b5[_0x508aae(0x1c4)]=0x3]=_0x508aae(0x1c4),_0x5a04b5[_0x5a04b5[_0x508aae(0x1c0)]=0x4]=_0x508aae(0x1c0),_0x5a04b5[_0x5a04b5[_0x508aae(0x1d5)]=0x5]=_0x508aae(0x1d5),_0x5a04b5[_0x5a04b5['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x5a04b5))(v||{});const y=_0x128419=>_0xd8a88a(new Date(+_0x128419))[_0x508aae(0x1ef)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x343707,_0x5f4c09)=>{const _0x6f6a6b=_0x508aae,_0xd9dc4f=_0x343707[_0x6f6a6b(0x1d2)](_0x119c71),_0x260b5d=_0x343707[_0x6f6a6b(0x1d2)](_0x2f6168);_0x5f4c09['forEach'](_0x26ffc1=>{const _0x376fa7=_0x6f6a6b;_0xd9dc4f[_0x376fa7(0x1bf)](_0x26ffc1)&&_0x5f4c09[_0x376fa7(0x1e6)](_0x26ffc1);}),_0x5f4c09['size']&&(await _0x260b5d['get'](_0x6f6a6b(0x1c6),{'params':{'userIDs':[..._0x5f4c09]}}))[_0x6f6a6b(0x1a4)][_0x6f6a6b(0x1e8)][_0x6f6a6b(0x1cf)](_0x499f95=>{const _0x44d1ce=_0x6f6a6b;_0x499f95&&_0xd9dc4f[_0x44d1ce(0x1e7)](_0x499f95);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x445184,_0x1d1a2e,_0x3b889b,_0x4b5ef7)=>{const _0x39cb67=_0x508aae;for(var _0x57830d=_0x4b5ef7>0x1?void 0x0:_0x4b5ef7?K(_0x1d1a2e,_0x3b889b):_0x1d1a2e,_0x2dc935=_0x445184[_0x39cb67(0x1e0)]-0x1,_0x45f323;_0x2dc935>=0x0;_0x2dc935--)(_0x45f323=_0x445184[_0x2dc935])&&(_0x57830d=_0x45f323(_0x57830d)||_0x57830d);return _0x57830d;},p=(_0x120310,_0x1c7d42)=>(_0x842d39,_0x9bc089)=>_0x1c7d42(_0x842d39,_0x9bc089,_0x120310);let _=class extends _0x5be0c8{constructor(_0x53c56b,_0xdf6c05,_0x2bbc99,_0x3ef601){const _0xc88234=_0x508aae;super(),this[_0xc88234(0x1d3)]=_0x53c56b,this['_threadCommentModel']=_0xdf6c05,this[_0xc88234(0x1a5)]=_0x2bbc99,this[_0xc88234(0x1e2)]=_0x3ef601,this[_0xc88234(0x1a1)](),this[_0xc88234(0x1f2)]();}[_0x508aae(0x1f2)](){const _0x5ecd6a=_0x508aae;this[_0x5ecd6a(0x1b2)](this['_threadCommentModel']['commentUpdate$'][_0x5ecd6a(0x1d9)](_0x31ea8f(0x10))[_0x5ecd6a(0x1ad)](_0x273a9f=>{const _0x342ac6=_0x5ecd6a,_0x5d7d04=new Set();_0x273a9f[_0x342ac6(0x1cf)](_0x17f9cb=>{const _0x2f895f=_0x342ac6;switch(_0x17f9cb[_0x2f895f(0x1da)]){case _0x2f895f(0x1fd):{const _0xcb7f32=_0x17f9cb['payload'][_0x2f895f(0x1bd)];_0x5d7d04[_0x2f895f(0x1fd)](_0xcb7f32);break;}}}),B(this[_0x342ac6(0x1e2)],_0x5d7d04);}));}['_init'](){const _0x434195=_0x508aae;this[_0x434195(0x1b2)](this['_commentService'][_0x434195(0x1b3)][_0x434195(0x1ad)](async _0x13f74c=>{const _0x265b8f=_0x434195;var _0x14925d,_0x48778e,_0x33cefa,_0x5167f2;const _0x278794=(_0x14925d=this[_0x265b8f(0x1c3)]['getUnit'](_0x13f74c[_0x265b8f(0x1bc)])['find'](_0x166225=>_0x166225[_0x265b8f(0x1ae)]===_0x13f74c['threadId']))==null?void 0x0:_0x14925d[_0x265b8f(0x1a0)];if(!_0x278794)return;const {unitId:_0x2faac4,subUnitId:_0x3aac6f}=_0x278794;switch(_0x13f74c[_0x265b8f(0x19c)]&&this['_userService'][_0x265b8f(0x1e7)](_0x13f74c[_0x265b8f(0x19c)]),_0x13f74c[_0x265b8f(0x1da)]){case v[_0x265b8f(0x1cd)]:break;case v[_0x265b8f(0x1e3)]:{this[_0x265b8f(0x1c3)]['addComment'](_0x2faac4,_0x3aac6f,{'unitId':_0x2faac4,'subUnitId':_0x3aac6f,'ref':'','id':_0x13f74c[_0x265b8f(0x1e4)],'dT':y(+_0x13f74c[_0x265b8f(0x1ba)]),'threadId':_0x13f74c[_0x265b8f(0x1ae)],'personId':(_0x33cefa=(_0x48778e=_0x13f74c[_0x265b8f(0x19c)])==null?void 0x0:_0x48778e[_0x265b8f(0x1a7)])!=null?_0x33cefa:_0x13f74c[_0x265b8f(0x1c2)],'text':JSON[_0x265b8f(0x1aa)](_0x13f74c[_0x265b8f(0x1ff)]),'parentId':_0x278794['id']});break;}case v[_0x265b8f(0x1c0)]:{const _0x4df48e=this['_threadCommentModel'][_0x265b8f(0x1db)](_0x2faac4,_0x3aac6f,_0x13f74c[_0x265b8f(0x1e4)]);_0x4df48e&&_0x4df48e['parentId']&&this[_0x265b8f(0x1c3)][_0x265b8f(0x1cc)](_0x2faac4,_0x3aac6f,_0x13f74c[_0x265b8f(0x1e4)]);break;}case v['Edit']:{this['_threadCommentModel']['updateComment'](_0x2faac4,_0x3aac6f,{'commentId':_0x13f74c[_0x265b8f(0x1e4)],'text':JSON['parse'](_0x13f74c[_0x265b8f(0x1ff)])});break;}case v[_0x265b8f(0x1d5)]:{const _0x534cf4=(_0x5167f2=this['_threadCommentModel'][_0x265b8f(0x1a9)](_0x13f74c[_0x265b8f(0x1bc)])[_0x265b8f(0x1c8)](_0x449f44=>_0x449f44[_0x265b8f(0x1ae)]===_0x13f74c[_0x265b8f(0x1ae)]))==null?void 0x0:_0x5167f2['root'];_0x534cf4&&this['_threadCommentModel'][_0x265b8f(0x1ab)](_0x2faac4,_0x3aac6f,_0x534cf4['id'],_0x13f74c[_0x265b8f(0x1e9)]===I[_0x265b8f(0x1d6)]);break;}}}));}};_=V([p(0x0,_0x2d47f8(_0xeab878)),p(0x1,_0x2d47f8(_0x10684c)),p(0x2,_0x2d47f8(_0x119c71)),p(0x3,_0x2d47f8(_0x1c26b5))],_);const z=_0x508aae(0x1de),O={};var k=Object[_0x508aae(0x1e5)],Q=(_0x262daa,_0x4ccfd9,_0x49b84a,_0x1b91be)=>{const _0x3720a2=_0x508aae;for(var _0x385990=_0x1b91be>0x1?void 0x0:_0x1b91be?k(_0x4ccfd9,_0x49b84a):_0x4ccfd9,_0x18cc7a=_0x262daa[_0x3720a2(0x1e0)]-0x1,_0x2c6a56;_0x18cc7a>=0x0;_0x18cc7a--)(_0x2c6a56=_0x262daa[_0x18cc7a])&&(_0x385990=_0x2c6a56(_0x385990)||_0x385990);return _0x385990;},b=(_0x28c0ab,_0x1d8df3)=>(_0x4c813f,_0x1591cc)=>_0x1d8df3(_0x4c813f,_0x1591cc,_0x28c0ab);function X(_0x320956,_0x1cb8b6){const _0x5ebc58=_0x508aae,_0x521ba8=_0x320956[_0x5ebc58(0x1b1)][0x0];return{..._0x1cb8b6,'id':_0x521ba8[_0x5ebc58(0x1e4)],'resolved':_0x320956[_0x5ebc58(0x1e9)]===0x1,'dT':y(_0x521ba8[_0x5ebc58(0x1ba)]),'personId':_0x521ba8[_0x5ebc58(0x1c2)],'threadId':_0x521ba8[_0x5ebc58(0x1ae)]};}function ee(_0x22c516,_0x1004b8,_0x13bf78){const _0x467f3d=_0x508aae;var _0x5eeeac,_0x1b127c;if(((_0x1b127c=(_0x5eeeac=_0x22c516==null?void 0x0:_0x22c516[_0x467f3d(0x1b1)])==null?void 0x0:_0x5eeeac[_0x467f3d(0x1e0)])!=null?_0x1b127c:0x0)>0x0){const _0x3f4d9c=(_0x59af77,_0x17ab0c)=>({'id':_0x59af77[_0x467f3d(0x1e4)],'threadId':_0x59af77[_0x467f3d(0x1ae)],'dT':y(_0x59af77[_0x467f3d(0x1ba)]),'personId':_0x59af77['userId'],'resolved':_0x22c516[_0x467f3d(0x1e9)]===I[_0x467f3d(0x1d6)],'unitId':_0x1004b8,'subUnitId':_0x13bf78,'text':JSON[_0x467f3d(0x1aa)](_0x59af77['content']),'parentId':_0x17ab0c}),_0x514e33=_0x3f4d9c(_0x22c516[_0x467f3d(0x1b1)][0x0]);return{..._0x514e33,'children':_0x22c516[_0x467f3d(0x1b1)][_0x467f3d(0x1f1)](0x1)['map'](_0x5b8212=>_0x3f4d9c(_0x5b8212,_0x514e33['id']))};}return null;}let S=class{constructor(_0x167b26,_0x489152,_0x4bc89f){const _0x131ab4=_0x508aae;this['_httpService']=_0x167b26,this['_userService']=_0x489152,this[_0x131ab4(0x1b8)]=_0x4bc89f;}async[_0x508aae(0x1c9)](_0x2c0f8b){const _0x520774=_0x508aae;var _0x237f6c,_0x3441f3;const {parentId:_0x25dd13,unitId:_0x275fc9,text:_0x2ab6f6,threadId:_0x581f53}=_0x2c0f8b,_0x458414=(_0x3441f3=(_0x237f6c=_0x2ab6f6[_0x520774(0x1b9)])==null?void 0x0:_0x237f6c[_0x520774(0x1ac)](_0x351cd5=>_0x351cd5[_0x520774(0x1f7)]===_0x32d36d[_0x520774(0x1a3)])[_0x520774(0x1d4)](_0x559687=>_0x559687[_0x520774(0x1a2)]))!=null?_0x3441f3:[],_0x6aa74=JSON[_0x520774(0x1f0)](_0x2ab6f6),_0x444226=(await this[_0x520774(0x1b8)][_0x520774(0x1b7)](_0x275fc9))['getMemberID']();if(_0x25dd13){const _0x187012={'memberId':_0x444226,'unitId':_0x275fc9,'content':_0x6aa74,'mention':_0x458414,'threadId':_0x581f53},_0x1049f5=(await this[_0x520774(0x1bb)]['post'](_0x520774(0x19a)+_0x275fc9+_0x520774(0x1c1),{'body':_0x187012}))[_0x520774(0x1a4)][_0x520774(0x1fe)];return{..._0x2c0f8b,'id':_0x1049f5[_0x520774(0x1e4)],'dT':_0xd8a88a(+_0x1049f5[_0x520774(0x1ba)])['format'](_0x520774(0x1df)),'personId':_0x1049f5[_0x520774(0x1c2)]};}else{const _0x6d3c2b={'memberId':_0x444226,'unitId':_0x275fc9,'content':_0x6aa74,'mention':_0x458414},_0x5d4b05=await this[_0x520774(0x1bb)][_0x520774(0x1f9)](_0x520774(0x19a)+_0x275fc9+'/add',{'body':_0x6d3c2b});return X(_0x5d4b05[_0x520774(0x1a4)][_0x520774(0x19b)],_0x2c0f8b);}}async[_0x508aae(0x1af)](_0x30447c){const _0x248109=_0x508aae;var _0x4b7c38,_0x213bc0;const {text:_0x3a98dd,unitId:_0x3db28f}=_0x30447c,_0x29139e=(_0x213bc0=(_0x4b7c38=_0x3a98dd[_0x248109(0x1b9)])==null?void 0x0:_0x4b7c38[_0x248109(0x1ac)](_0x51c157=>_0x51c157['rangeType']===_0x32d36d[_0x248109(0x1a3)])['map'](_0xc952b7=>_0xc952b7[_0x248109(0x1a2)]))!=null?_0x213bc0:[],_0x689371=JSON[_0x248109(0x1f0)](_0x3a98dd),_0x7279b=_0x30447c['threadId'],_0x48b622=_0x30447c['id'],_0x4efb5c={'memberId':(await this[_0x248109(0x1b8)]['requireSession'](_0x3db28f))[_0x248109(0x1f8)](),'unitId':_0x3db28f,'threadId':_0x7279b,'mention':_0x29139e,'content':_0x689371,'replyId':_0x48b622},_0x388cce=await this[_0x248109(0x1bb)]['post'](_0x248109(0x19a)+_0x3db28f+_0x248109(0x19d),{'body':_0x4efb5c});return!_0x388cce[_0x248109(0x1a4)]['error']||_0x388cce[_0x248109(0x1a4)][_0x248109(0x1d8)][_0x248109(0x1c5)]===0x1;}async['resolveComment'](_0x4631a6){const _0x747b4=_0x508aae,{unitId:_0x1e311c}=_0x4631a6,_0x268394=_0x4631a6[_0x747b4(0x1ae)],_0x5c015d={'memberId':this[_0x747b4(0x1a5)][_0x747b4(0x1dd)]()[_0x747b4(0x1a7)],'unitId':_0x1e311c,'threadId':_0x268394,'solved':_0x4631a6[_0x747b4(0x1ee)]?I[_0x747b4(0x1d6)]:I[_0x747b4(0x1eb)]},_0x11e06e=await this[_0x747b4(0x1bb)][_0x747b4(0x1f9)]('/universer-api/comment/unit/'+_0x1e311c+_0x747b4(0x1b4),{'body':_0x5c015d});return!_0x11e06e['body'][_0x747b4(0x1d8)]||_0x11e06e[_0x747b4(0x1a4)][_0x747b4(0x1d8)]['code']===0x1;}async['deleteComment'](_0x42999f,_0x3b61bb,_0x202a1c,_0x5694d8){const _0x448b1f=_0x508aae,_0x7ee3d={'memberId':(await this['_sessionService'][_0x448b1f(0x1b7)](_0x42999f))[_0x448b1f(0x1f8)](),'threadId':_0x202a1c,'replyId':_0x5694d8,'unitId':_0x42999f},_0x577a18=await this[_0x448b1f(0x1bb)][_0x448b1f(0x1f9)](_0x448b1f(0x19a)+_0x42999f+_0x448b1f(0x1ec),{'body':_0x7ee3d});return!_0x577a18['body'][_0x448b1f(0x1d8)]||_0x577a18[_0x448b1f(0x1a4)][_0x448b1f(0x1d8)][_0x448b1f(0x1c5)]===0x1;}async[_0x508aae(0x1b0)](_0x219944,_0x1afa20,_0x58b5d3){const _0x2b20c4=_0x508aae,_0x28d977={'unitId':_0x219944,'threadId':_0x58b5d3},_0x5e4299=await this[_0x2b20c4(0x1bb)][_0x2b20c4(0x1f9)]('/universer-api/comment/unit/'+_0x219944+'/list',{'body':_0x28d977}),_0x1ba0c8=_0x58b5d3[_0x2b20c4(0x1d4)](_0x212dce=>ee(_0x5e4299[_0x2b20c4(0x1a4)][_0x2b20c4(0x1fc)][_0x212dce],_0x219944,_0x1afa20))[_0x2b20c4(0x1ac)](Boolean);return Object[_0x2b20c4(0x19f)](_0x5e4299[_0x2b20c4(0x1a4)][_0x2b20c4(0x1e8)])['forEach'](_0x450707=>{this['_userService']['addUser'](_0x450707);}),_0x1ba0c8;}[_0x508aae(0x1a6)](_0x4cf104){const _0x35ebd5=_0x508aae;return{'id':_0x4cf104['id'],'threadId':_0x4cf104['threadId'],'ref':_0x4cf104[_0x35ebd5(0x1d7)]};}};S=Q([b(0x0,_0x2d47f8(_0x2f6168)),b(0x1,_0x2d47f8(_0x119c71)),b(0x2,_0x2d47f8(_0x2c9dad))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x227392,_0x39e32c,_0x3f82b0,_0x47faff)=>{for(var _0xf21c84=_0x47faff>0x1?void 0x0:_0x47faff?re(_0x39e32c,_0x3f82b0):_0x39e32c,_0x21fcf4=_0x227392['length']-0x1,_0x571f80;_0x21fcf4>=0x0;_0x21fcf4--)(_0x571f80=_0x227392[_0x21fcf4])&&(_0xf21c84=_0x571f80(_0xf21c84)||_0xf21c84);return _0xf21c84;},M=(_0x43aabe,_0x516a2d)=>(_0x490fea,_0x5ec390)=>_0x516a2d(_0x490fea,_0x5ec390,_0x43aabe);let f=class extends _0x5be0c8{constructor(_0x297072,_0x133254){const _0x2667ea=_0x508aae;super(),this['_threadCommentDataSourceService']=_0x297072,this[_0x2667ea(0x1ce)]=_0x133254,this[_0x2667ea(0x1ca)]();}[_0x508aae(0x1ca)](){const _0x5582d0=_0x508aae;this['_threadCommentDataSourceService'][_0x5582d0(0x1fb)]=this['_threadCommentDataSource'],this[_0x5582d0(0x1c7)][_0x5582d0(0x1fa)]=!0x1;}};f=te([M(0x0,_0x4e8f25),M(0x1,_0x2d47f8(S))],f);var se=Object[_0x508aae(0x1b6)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x23d1ab,_0x31b67d,_0xd25b78)=>_0x31b67d in _0x23d1ab?se(_0x23d1ab,_0x31b67d,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xd25b78}):_0x23d1ab[_0x31b67d]=_0xd25b78,ie=(_0x16c325,_0x10aa17,_0x2c3385,_0x2eef3e)=>{const _0x1debec=_0x508aae;for(var _0x109e9b=_0x2eef3e>0x1?void 0x0:_0x2eef3e?oe(_0x10aa17,_0x2c3385):_0x10aa17,_0x3f1df5=_0x16c325[_0x1debec(0x1e0)]-0x1,_0x361cf8;_0x3f1df5>=0x0;_0x3f1df5--)(_0x361cf8=_0x16c325[_0x3f1df5])&&(_0x109e9b=_0x361cf8(_0x109e9b)||_0x109e9b);return _0x109e9b;},N=(_0x4ed43c,_0x58f985)=>(_0x3e0db6,_0x474a95)=>_0x58f985(_0x3e0db6,_0x474a95,_0x4ed43c),$=(_0x4558bc,_0x4eda8d,_0x2810db)=>ne(_0x4558bc,typeof _0x4eda8d!='symbol'?_0x4eda8d+'':_0x4eda8d,_0x2810db);let g=class extends _0x1beb87{constructor(_0x3814ac=O,_0x554fd1,_0x52331e){const _0x29b9a4=_0x508aae;super(),this[_0x29b9a4(0x1a8)]=_0x3814ac,this[_0x29b9a4(0x1e2)]=_0x554fd1,this[_0x29b9a4(0x200)]=_0x52331e;const {..._0x413c91}=_0x5ac491({},O,this[_0x29b9a4(0x1a8)]);this[_0x29b9a4(0x200)][_0x29b9a4(0x1b5)](z,_0x413c91);}['onStarting'](){const _0x2539d0=_0x508aae;[[S],[f],[_]][_0x2539d0(0x1cf)](_0x5b9e1f=>{const _0x77e87d=_0x2539d0;this[_0x77e87d(0x1e2)][_0x77e87d(0x1fd)](_0x5b9e1f);});}[_0x508aae(0x1cb)](){const _0x26803a=_0x508aae;this[_0x26803a(0x1e2)][_0x26803a(0x1d2)](f),this[_0x26803a(0x1e2)][_0x26803a(0x1d2)](_);}};$(g,'pluginName',W),$(g,'type',_0x5c1d9b['UNIVER_UNKNOWN']),g=ie([_0x562a8a(_0x38a385,_0x214c30,_0x1dfa68),N(0x1,_0x2d47f8(_0x1c26b5)),N(0x2,_0x385a7d)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x57e23e=_0x3678;(function(_0x1ec912,_0x1eef7d){const _0x221c1e=_0x3678,_0x416433=_0x1ec912();while(!![]){try{const _0x2dc5c2=parseInt(_0x221c1e(0x21d))/0x1+-parseInt(_0x221c1e(0x1f0))/0x2*(-parseInt(_0x221c1e(0x1e7))/0x3)+parseInt(_0x221c1e(0x227))/0x4*(parseInt(_0x221c1e(0x203))/0x5)+parseInt(_0x221c1e(0x1e5))/0x6+parseInt(_0x221c1e(0x1e9))/0x7*(-parseInt(_0x221c1e(0x1d9))/0x8)+parseInt(_0x221c1e(0x215))/0x9+-parseInt(_0x221c1e(0x224))/0xa;if(_0x2dc5c2===_0x1eef7d)break;else _0x416433['push'](_0x416433['shift']());}catch(_0x25fb4a){_0x416433['push'](_0x416433['shift']());}}}(_0x1dc8,0x33927));import{CommentService as _0x32f612,CollaborationSessionService as _0x4def68,UniverCollaborationClientPlugin as _0x438e91}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x22a789}from'@univerjs-pro/license';import{dayjs as _0xfce7b2,UserManagerService as _0x5637fb,Inject as _0x265658,Injector as _0x3ee306,Disposable as _0x4c0b42,CustomRangeType as _0x8c3a5d,UniverInstanceType as _0x4f9a51,DependentOn as _0x56c811,IConfigService as _0x1b4eab,Plugin as _0x5ee073,merge as _0x365039}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x3ffb4f}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x53f94a,IThreadCommentDataSourceService as _0x32ea08}from'@univerjs/thread-comment';import{bufferTime as _0x3f8f26}from'rxjs';function _0x1dc8(){const _0x21b726=['/add','updateComment','body','personId','format','comment','size','Delete','Reply','_httpService','rangeId','get','213993BzaldV','parse','_commentService','onStarting','onReady','content','replies','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','227390KcMXkU','getUser','solved','addUser','code','pipe','resolveComment','3762460YGNaKR','unitId','deleteComment','2944adbrgH','parentId','_threadCommentModel','_initUserSync','commentUpdate$','stringify','/delete','add','forEach','find','replyId','filter','post','length','_init','addComment','getComment','OpenOrReOpen','/universer-api/user/list','payload','slice','subscribe','/universer-api/comment/unit/','UNIVER_UNKNOWN','getMemberID','40WqcaaA','_sessionService','_initDataSource','defineProperty','pluginName','_threadCommentDataSourceService','listComments','_config','symbol','ref','map','Solve','1760490WBkmLy','createTimestamp','3MGCKkg','userID','325437wodbIJ','userId','_userService','threadId','getUnit','Add','dataSource','496252PcvCuP','UNRECOGNIZED','Unknown','getCurrentUser','rangeType','error','Edit','comments','type','/reply','resolved','saveCommentToSnapshot','requireSession','_threadCommentDataSource','disposeWithMe','COMMENT','YYYY/MM/DD\x20HH:mm','/solved','root','185WGcMUO','_configService','users','Solved','_injector','getOwnPropertyDescriptor'];_0x1dc8=function(){return _0x21b726;};return _0x1dc8();}import{HTTPService as _0x1d21bd}from'@univerjs/network';const W=_0x57e23e(0x21c);var I=(_0x34a31d=>(_0x34a31d[_0x34a31d[_0x57e23e(0x1d1)]=0x0]='OpenOrReOpen',_0x34a31d[_0x34a31d[_0x57e23e(0x206)]=0x1]='Solved',_0x34a31d[_0x34a31d['UNRECOGNIZED']=-0x1]=_0x57e23e(0x1f1),_0x34a31d))(I||{}),v=(_0x260baf=>(_0x260baf[_0x260baf[_0x57e23e(0x1f2)]=0x0]=_0x57e23e(0x1f2),_0x260baf[_0x260baf[_0x57e23e(0x1ee)]=0x1]=_0x57e23e(0x1ee),_0x260baf[_0x260baf[_0x57e23e(0x211)]=0x2]=_0x57e23e(0x211),_0x260baf[_0x260baf[_0x57e23e(0x1f6)]=0x3]=_0x57e23e(0x1f6),_0x260baf[_0x260baf[_0x57e23e(0x210)]=0x4]=_0x57e23e(0x210),_0x260baf[_0x260baf[_0x57e23e(0x1e4)]=0x5]=_0x57e23e(0x1e4),_0x260baf[_0x260baf[_0x57e23e(0x1f1)]=-0x1]=_0x57e23e(0x1f1),_0x260baf))(v||{});const y=_0x532766=>_0xfce7b2(new Date(+_0x532766))[_0x57e23e(0x20d)](_0x57e23e(0x200)),B=async(_0x396b85,_0x24b321)=>{const _0x1f2635=_0x57e23e,_0x5ee47f=_0x396b85[_0x1f2635(0x214)](_0x5637fb),_0xdd1934=_0x396b85[_0x1f2635(0x214)](_0x1d21bd);_0x24b321[_0x1f2635(0x1c8)](_0x389d81=>{const _0x58ef20=_0x1f2635;_0x5ee47f[_0x58ef20(0x21e)](_0x389d81)&&_0x24b321['delete'](_0x389d81);}),_0x24b321[_0x1f2635(0x20f)]&&(await _0xdd1934[_0x1f2635(0x214)](_0x1f2635(0x1d2),{'params':{'userIDs':[..._0x24b321]}}))[_0x1f2635(0x20b)]['users']['forEach'](_0x10b288=>{_0x10b288&&_0x5ee47f['addUser'](_0x10b288);});};var K=Object[_0x57e23e(0x208)],V=(_0x544171,_0x1015bd,_0x34fd47,_0x13f101)=>{const _0x40d473=_0x57e23e;for(var _0x5e508e=_0x13f101>0x1?void 0x0:_0x13f101?K(_0x1015bd,_0x34fd47):_0x1015bd,_0x4b8b7c=_0x544171[_0x40d473(0x1cd)]-0x1,_0x29db4a;_0x4b8b7c>=0x0;_0x4b8b7c--)(_0x29db4a=_0x544171[_0x4b8b7c])&&(_0x5e508e=_0x29db4a(_0x5e508e)||_0x5e508e);return _0x5e508e;},p=(_0x2d7ae0,_0x43efec)=>(_0x1dcc10,_0x634fb2)=>_0x43efec(_0x1dcc10,_0x634fb2,_0x2d7ae0);let _=class extends _0x4c0b42{constructor(_0xa00ebb,_0xe74d47,_0x552af3,_0x5b79df){const _0x4265db=_0x57e23e;super(),this[_0x4265db(0x217)]=_0xa00ebb,this[_0x4265db(0x229)]=_0xe74d47,this[_0x4265db(0x1eb)]=_0x552af3,this['_injector']=_0x5b79df,this['_init'](),this[_0x4265db(0x22a)]();}[_0x57e23e(0x22a)](){const _0x11c28c=_0x57e23e;this[_0x11c28c(0x1fe)](this['_threadCommentModel'][_0x11c28c(0x22b)][_0x11c28c(0x222)](_0x3f8f26(0x10))[_0x11c28c(0x1d5)](_0x3fe4c7=>{const _0xc1ca08=_0x11c28c,_0x42bd83=new Set();_0x3fe4c7[_0xc1ca08(0x1c8)](_0x4abca8=>{const _0x150fa1=_0xc1ca08;switch(_0x4abca8[_0x150fa1(0x1f8)]){case _0x150fa1(0x1c7):{const _0x3b2e4e=_0x4abca8[_0x150fa1(0x1d3)][_0x150fa1(0x20c)];_0x42bd83[_0x150fa1(0x1c7)](_0x3b2e4e);break;}}}),B(this['_injector'],_0x42bd83);}));}[_0x57e23e(0x1ce)](){const _0x261ccb=_0x57e23e;this['disposeWithMe'](this['_commentService'][_0x261ccb(0x22b)]['subscribe'](async _0x6c7af3=>{const _0xa1745b=_0x261ccb;var _0x466cf3,_0x1684c8,_0x4162d2,_0x2612c0;const _0x10b2d6=(_0x466cf3=this['_threadCommentModel'][_0xa1745b(0x1ed)](_0x6c7af3[_0xa1745b(0x225)])['find'](_0x2f2fa8=>_0x2f2fa8[_0xa1745b(0x1ec)]===_0x6c7af3[_0xa1745b(0x1ec)]))==null?void 0x0:_0x466cf3['root'];if(!_0x10b2d6)return;const {unitId:_0x391d2c,subUnitId:_0x4ee5a0}=_0x10b2d6;switch(_0x6c7af3['user']&&this[_0xa1745b(0x1eb)][_0xa1745b(0x220)](_0x6c7af3['user']),_0x6c7af3[_0xa1745b(0x1f8)]){case v['Add']:break;case v[_0xa1745b(0x211)]:{this[_0xa1745b(0x229)][_0xa1745b(0x1cf)](_0x391d2c,_0x4ee5a0,{'unitId':_0x391d2c,'subUnitId':_0x4ee5a0,'ref':'','id':_0x6c7af3[_0xa1745b(0x1ca)],'dT':y(+_0x6c7af3[_0xa1745b(0x1e6)]),'threadId':_0x6c7af3['threadId'],'personId':(_0x4162d2=(_0x1684c8=_0x6c7af3['user'])==null?void 0x0:_0x1684c8[_0xa1745b(0x1e8)])!=null?_0x4162d2:_0x6c7af3['userId'],'text':JSON[_0xa1745b(0x216)](_0x6c7af3[_0xa1745b(0x21a)]),'parentId':_0x10b2d6['id']});break;}case v['Delete']:{const _0xaf470a=this[_0xa1745b(0x229)][_0xa1745b(0x1d0)](_0x391d2c,_0x4ee5a0,_0x6c7af3['replyId']);_0xaf470a&&_0xaf470a[_0xa1745b(0x228)]&&this[_0xa1745b(0x229)][_0xa1745b(0x226)](_0x391d2c,_0x4ee5a0,_0x6c7af3[_0xa1745b(0x1ca)]);break;}case v[_0xa1745b(0x1f6)]:{this[_0xa1745b(0x229)][_0xa1745b(0x20a)](_0x391d2c,_0x4ee5a0,{'commentId':_0x6c7af3[_0xa1745b(0x1ca)],'text':JSON[_0xa1745b(0x216)](_0x6c7af3[_0xa1745b(0x21a)])});break;}case v[_0xa1745b(0x1e4)]:{const _0x3e2475=(_0x2612c0=this[_0xa1745b(0x229)][_0xa1745b(0x1ed)](_0x6c7af3[_0xa1745b(0x225)])[_0xa1745b(0x1c9)](_0x2dfe89=>_0x2dfe89[_0xa1745b(0x1ec)]===_0x6c7af3[_0xa1745b(0x1ec)]))==null?void 0x0:_0x2612c0[_0xa1745b(0x202)];_0x3e2475&&this[_0xa1745b(0x229)][_0xa1745b(0x223)](_0x391d2c,_0x4ee5a0,_0x3e2475['id'],_0x6c7af3[_0xa1745b(0x21f)]===I[_0xa1745b(0x206)]);break;}}}));}};function _0x3678(_0x1f58aa,_0x1b381d){const _0x1dc80c=_0x1dc8();return _0x3678=function(_0x367859,_0x22aa4e){_0x367859=_0x367859-0x1c7;let _0x523437=_0x1dc80c[_0x367859];return _0x523437;},_0x3678(_0x1f58aa,_0x1b381d);}_=V([p(0x0,_0x265658(_0x32f612)),p(0x1,_0x265658(_0x53f94a)),p(0x2,_0x265658(_0x5637fb)),p(0x3,_0x265658(_0x3ee306))],_);const z='thread-comment-data-source.config',O={};var k=Object[_0x57e23e(0x208)],Q=(_0x2e3b0a,_0x399c67,_0x3eb316,_0x1d4db8)=>{const _0x5649e8=_0x57e23e;for(var _0x2bc40d=_0x1d4db8>0x1?void 0x0:_0x1d4db8?k(_0x399c67,_0x3eb316):_0x399c67,_0x1d1f86=_0x2e3b0a[_0x5649e8(0x1cd)]-0x1,_0x1132ba;_0x1d1f86>=0x0;_0x1d1f86--)(_0x1132ba=_0x2e3b0a[_0x1d1f86])&&(_0x2bc40d=_0x1132ba(_0x2bc40d)||_0x2bc40d);return _0x2bc40d;},b=(_0xda184d,_0x362c72)=>(_0x455153,_0x221a44)=>_0x362c72(_0x455153,_0x221a44,_0xda184d);function X(_0x44d569,_0x401784){const _0x1bc266=_0x57e23e,_0x2eb7c4=_0x44d569[_0x1bc266(0x21b)][0x0];return{..._0x401784,'id':_0x2eb7c4['replyId'],'resolved':_0x44d569[_0x1bc266(0x21f)]===0x1,'dT':y(_0x2eb7c4[_0x1bc266(0x1e6)]),'personId':_0x2eb7c4[_0x1bc266(0x1ea)],'threadId':_0x2eb7c4[_0x1bc266(0x1ec)]};}function ee(_0x338e21,_0x3dd6fd,_0x218231){const _0x3792e3=_0x57e23e;var _0x12216d,_0x199ac0;if(((_0x199ac0=(_0x12216d=_0x338e21==null?void 0x0:_0x338e21[_0x3792e3(0x21b)])==null?void 0x0:_0x12216d['length'])!=null?_0x199ac0:0x0)>0x0){const _0xe356d4=(_0x5c0cff,_0x49c005)=>({'id':_0x5c0cff[_0x3792e3(0x1ca)],'threadId':_0x5c0cff[_0x3792e3(0x1ec)],'dT':y(_0x5c0cff[_0x3792e3(0x1e6)]),'personId':_0x5c0cff[_0x3792e3(0x1ea)],'resolved':_0x338e21[_0x3792e3(0x21f)]===I[_0x3792e3(0x206)],'unitId':_0x3dd6fd,'subUnitId':_0x218231,'text':JSON['parse'](_0x5c0cff['content']),'parentId':_0x49c005}),_0xd34982=_0xe356d4(_0x338e21['replies'][0x0]);return{..._0xd34982,'children':_0x338e21['replies'][_0x3792e3(0x1d4)](0x1)[_0x3792e3(0x1e3)](_0x58fc5e=>_0xe356d4(_0x58fc5e,_0xd34982['id']))};}return null;}let S=class{constructor(_0x29ea13,_0x17f317,_0x2df05f){const _0x3d14d9=_0x57e23e;this['_httpService']=_0x29ea13,this['_userService']=_0x17f317,this[_0x3d14d9(0x1da)]=_0x2df05f;}async['addComment'](_0x18e69b){const _0x18b8cb=_0x57e23e;var _0x3c8b9b,_0x495ad2;const {parentId:_0x39090f,unitId:_0x5131af,text:_0x293d18,threadId:_0x1f1f88}=_0x18e69b,_0x57f735=(_0x495ad2=(_0x3c8b9b=_0x293d18['customRanges'])==null?void 0x0:_0x3c8b9b['filter'](_0x9d1ec0=>_0x9d1ec0[_0x18b8cb(0x1f4)]===_0x8c3a5d[_0x18b8cb(0x1ff)])['map'](_0x42af26=>_0x42af26[_0x18b8cb(0x213)]))!=null?_0x495ad2:[],_0x4cce8c=JSON[_0x18b8cb(0x22c)](_0x293d18),_0x3c4058=(await this['_sessionService'][_0x18b8cb(0x1fc)](_0x5131af))[_0x18b8cb(0x1d8)]();if(_0x39090f){const _0x428f50={'memberId':_0x3c4058,'unitId':_0x5131af,'content':_0x4cce8c,'mention':_0x57f735,'threadId':_0x1f1f88},_0x4526c8=(await this[_0x18b8cb(0x212)]['post'](_0x18b8cb(0x1d6)+_0x5131af+_0x18b8cb(0x1f9),{'body':_0x428f50}))[_0x18b8cb(0x20b)]['reply'];return{..._0x18e69b,'id':_0x4526c8[_0x18b8cb(0x1ca)],'dT':_0xfce7b2(+_0x4526c8['createTimestamp'])[_0x18b8cb(0x20d)](_0x18b8cb(0x200)),'personId':_0x4526c8[_0x18b8cb(0x1ea)]};}else{const _0x4e4a73={'memberId':_0x3c4058,'unitId':_0x5131af,'content':_0x4cce8c,'mention':_0x57f735},_0x1c16ff=await this['_httpService'][_0x18b8cb(0x1cc)](_0x18b8cb(0x1d6)+_0x5131af+_0x18b8cb(0x209),{'body':_0x4e4a73});return X(_0x1c16ff[_0x18b8cb(0x20b)][_0x18b8cb(0x20e)],_0x18e69b);}}async[_0x57e23e(0x20a)](_0xda7b53){const _0x3e004c=_0x57e23e;var _0x38963c,_0x429417;const {text:_0x35b3b2,unitId:_0x17cae5}=_0xda7b53,_0x58baeb=(_0x429417=(_0x38963c=_0x35b3b2['customRanges'])==null?void 0x0:_0x38963c[_0x3e004c(0x1cb)](_0x17e191=>_0x17e191['rangeType']===_0x8c3a5d[_0x3e004c(0x1ff)])[_0x3e004c(0x1e3)](_0x4b2858=>_0x4b2858['rangeId']))!=null?_0x429417:[],_0x2abef5=JSON[_0x3e004c(0x22c)](_0x35b3b2),_0x2fb0a3=_0xda7b53[_0x3e004c(0x1ec)],_0x2d7bd6=_0xda7b53['id'],_0xddbcb7={'memberId':(await this[_0x3e004c(0x1da)]['requireSession'](_0x17cae5))[_0x3e004c(0x1d8)](),'unitId':_0x17cae5,'threadId':_0x2fb0a3,'mention':_0x58baeb,'content':_0x2abef5,'replyId':_0x2d7bd6},_0x137067=await this[_0x3e004c(0x212)][_0x3e004c(0x1cc)](_0x3e004c(0x1d6)+_0x17cae5+'/edit',{'body':_0xddbcb7});return!_0x137067['body'][_0x3e004c(0x1f5)]||_0x137067[_0x3e004c(0x20b)][_0x3e004c(0x1f5)][_0x3e004c(0x221)]===0x1;}async[_0x57e23e(0x223)](_0x529daf){const _0x3189ea=_0x57e23e,{unitId:_0x2bb7cf}=_0x529daf,_0x3cff6a=_0x529daf[_0x3189ea(0x1ec)],_0x1a8a3c={'memberId':this[_0x3189ea(0x1eb)][_0x3189ea(0x1f3)]()[_0x3189ea(0x1e8)],'unitId':_0x2bb7cf,'threadId':_0x3cff6a,'solved':_0x529daf[_0x3189ea(0x1fa)]?I[_0x3189ea(0x206)]:I[_0x3189ea(0x1d1)]},_0x42ba7d=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x2bb7cf+_0x3189ea(0x201),{'body':_0x1a8a3c});return!_0x42ba7d[_0x3189ea(0x20b)]['error']||_0x42ba7d['body'][_0x3189ea(0x1f5)][_0x3189ea(0x221)]===0x1;}async['deleteComment'](_0x38a6d9,_0x381814,_0x60e4c7,_0x5031d2){const _0x29654d=_0x57e23e,_0x4b2946={'memberId':(await this[_0x29654d(0x1da)]['requireSession'](_0x38a6d9))[_0x29654d(0x1d8)](),'threadId':_0x60e4c7,'replyId':_0x5031d2,'unitId':_0x38a6d9},_0x30ae34=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x38a6d9+_0x29654d(0x22d),{'body':_0x4b2946});return!_0x30ae34[_0x29654d(0x20b)][_0x29654d(0x1f5)]||_0x30ae34[_0x29654d(0x20b)][_0x29654d(0x1f5)]['code']===0x1;}async[_0x57e23e(0x1df)](_0x10fc39,_0x1973f0,_0x3cac56){const _0x167144=_0x57e23e,_0x1bc65f={'unitId':_0x10fc39,'threadId':_0x3cac56},_0x5d85fc=await this[_0x167144(0x212)][_0x167144(0x1cc)]('/universer-api/comment/unit/'+_0x10fc39+'/list',{'body':_0x1bc65f}),_0x541de7=_0x3cac56[_0x167144(0x1e3)](_0x18d853=>ee(_0x5d85fc[_0x167144(0x20b)][_0x167144(0x1f7)][_0x18d853],_0x10fc39,_0x1973f0))[_0x167144(0x1cb)](Boolean);return Object['values'](_0x5d85fc[_0x167144(0x20b)][_0x167144(0x205)])[_0x167144(0x1c8)](_0x87e959=>{const _0x477df6=_0x167144;this[_0x477df6(0x1eb)][_0x477df6(0x220)](_0x87e959);}),_0x541de7;}[_0x57e23e(0x1fb)](_0x4356b5){const _0x2eb497=_0x57e23e;return{'id':_0x4356b5['id'],'threadId':_0x4356b5[_0x2eb497(0x1ec)],'ref':_0x4356b5[_0x2eb497(0x1e2)]};}};S=Q([b(0x0,_0x265658(_0x1d21bd)),b(0x1,_0x265658(_0x5637fb)),b(0x2,_0x265658(_0x4def68))],S);var re=Object[_0x57e23e(0x208)],te=(_0x4c3cf2,_0x4616b4,_0x1779e0,_0x460075)=>{const _0x1958c8=_0x57e23e;for(var _0x1a8ddc=_0x460075>0x1?void 0x0:_0x460075?re(_0x4616b4,_0x1779e0):_0x4616b4,_0x447ce9=_0x4c3cf2[_0x1958c8(0x1cd)]-0x1,_0x90aed5;_0x447ce9>=0x0;_0x447ce9--)(_0x90aed5=_0x4c3cf2[_0x447ce9])&&(_0x1a8ddc=_0x90aed5(_0x1a8ddc)||_0x1a8ddc);return _0x1a8ddc;},M=(_0x332ea2,_0x375c38)=>(_0x5e1e0e,_0x592bd1)=>_0x375c38(_0x5e1e0e,_0x592bd1,_0x332ea2);let f=class extends _0x4c0b42{constructor(_0x5dd9a7,_0x2e6fd8){super(),this['_threadCommentDataSourceService']=_0x5dd9a7,this['_threadCommentDataSource']=_0x2e6fd8,this['_initDataSource']();}[_0x57e23e(0x1db)](){const _0x129f4b=_0x57e23e;this[_0x129f4b(0x1de)][_0x129f4b(0x1ef)]=this[_0x129f4b(0x1fd)],this[_0x129f4b(0x1de)]['syncUpdateMutationToColla']=!0x1;}};f=te([M(0x0,_0x32ea08),M(0x1,_0x265658(S))],f);var se=Object[_0x57e23e(0x1dc)],oe=Object[_0x57e23e(0x208)],ne=(_0x2ff49d,_0x9b60d0,_0x17b82b)=>_0x9b60d0 in _0x2ff49d?se(_0x2ff49d,_0x9b60d0,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x17b82b}):_0x2ff49d[_0x9b60d0]=_0x17b82b,ie=(_0x301ba2,_0x3d5a0c,_0xf5a0b8,_0x1c7cc8)=>{const _0x2bb504=_0x57e23e;for(var _0x3b8399=_0x1c7cc8>0x1?void 0x0:_0x1c7cc8?oe(_0x3d5a0c,_0xf5a0b8):_0x3d5a0c,_0x36a23d=_0x301ba2[_0x2bb504(0x1cd)]-0x1,_0x183c3d;_0x36a23d>=0x0;_0x36a23d--)(_0x183c3d=_0x301ba2[_0x36a23d])&&(_0x3b8399=_0x183c3d(_0x3b8399)||_0x3b8399);return _0x3b8399;},N=(_0x1b3904,_0x297911)=>(_0x17f7f6,_0x11ccd9)=>_0x297911(_0x17f7f6,_0x11ccd9,_0x1b3904),$=(_0x1bc202,_0x43b90e,_0x85be7d)=>ne(_0x1bc202,typeof _0x43b90e!=_0x57e23e(0x1e1)?_0x43b90e+'':_0x43b90e,_0x85be7d);let g=class extends _0x5ee073{constructor(_0x1ef92c=O,_0x5571ac,_0x51c46d){const _0x33502=_0x57e23e;super(),this[_0x33502(0x1e0)]=_0x1ef92c,this[_0x33502(0x207)]=_0x5571ac,this['_configService']=_0x51c46d;const {..._0xe74cee}=_0x365039({},O,this[_0x33502(0x1e0)]);this[_0x33502(0x204)]['setConfig'](z,_0xe74cee);}[_0x57e23e(0x218)](){const _0x332f40=_0x57e23e;[[S],[f],[_]][_0x332f40(0x1c8)](_0x473c86=>{const _0x53075e=_0x332f40;this[_0x53075e(0x207)][_0x53075e(0x1c7)](_0x473c86);});}[_0x57e23e(0x219)](){const _0x36730e=_0x57e23e;this[_0x36730e(0x207)]['get'](f),this[_0x36730e(0x207)][_0x36730e(0x214)](_);}};$(g,_0x57e23e(0x1dd),W),$(g,_0x57e23e(0x1f8),_0x4f9a51[_0x57e23e(0x1d7)]),g=ie([_0x56c811(_0x3ffb4f,_0x438e91,_0x22a789),N(0x1,_0x265658(_0x3ee306)),N(0x2,_0x1b4eab)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ function _0x4b19(){const _0x5931d0=['_commentService','map','Solve','Solved','ref','error','pipe','type','getComment','Unknown','getCurrentUser','thread-comment-data-source.config','YYYY/MM/DD\x20HH:mm','length','1982272fJtFNI','_injector','Reply','replyId','getOwnPropertyDescriptor','delete','addUser','users','solved','4668248TefsXS','OpenOrReOpen','/delete','4939446YddyLV','resolved','format','stringify','slice','_initUserSync','1110366umpKha','7dMwilo','14674104VITWXC','175430nMxnIB','rangeType','getMemberID','post','syncUpdateMutationToColla','dataSource','comments','add','reply','content','_configService','/universer-api/comment/unit/','comment','user','/edit','2078340zWCoQN','values','root','_init','rangeId','COMMENT','body','_userService','saveCommentToSnapshot','userID','_config','getUnit','parse','resolveComment','filter','subscribe','threadId','updateComment','listComments','replies','disposeWithMe','commentUpdate$','/solved','setConfig','defineProperty','requireSession','_sessionService','customRanges','createTimestamp','_httpService','unitId','personId','6ShsaHY','getUser','Delete','/reply','userId','_threadCommentModel','Edit','code','/universer-api/user/list','_threadCommentDataSourceService','find','addComment','_initDataSource','onReady','deleteComment','Add','_threadCommentDataSource','forEach','UNRECOGNIZED','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','get'];_0x4b19=function(){return _0x5931d0;};return _0x4b19();}const _0x508aae=_0x2893;(function(_0x2afc5d,_0x128712){const _0x57876c=_0x2893,_0x22f4cb=_0x2afc5d();while(!![]){try{const _0x3a6dfb=-parseInt(_0x57876c(0x1f6))/0x1*(-parseInt(_0x57876c(0x1be))/0x2)+-parseInt(_0x57876c(0x1f3))/0x3+parseInt(_0x57876c(0x1ea))/0x4+parseInt(_0x57876c(0x19e))/0x5+-parseInt(_0x57876c(0x1ed))/0x6*(-parseInt(_0x57876c(0x1f4))/0x7)+-parseInt(_0x57876c(0x1e1))/0x8+-parseInt(_0x57876c(0x1f5))/0x9;if(_0x3a6dfb===_0x128712)break;else _0x22f4cb['push'](_0x22f4cb['shift']());}catch(_0x456131){_0x22f4cb['push'](_0x22f4cb['shift']());}}}(_0x4b19,0xa6f7b));import{CommentService as _0xeab878,CollaborationSessionService as _0x2c9dad,UniverCollaborationClientPlugin as _0x214c30}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1dfa68}from'@univerjs-pro/license';import{dayjs as _0xd8a88a,UserManagerService as _0x119c71,Inject as _0x2d47f8,Injector as _0x1c26b5,Disposable as _0x5be0c8,CustomRangeType as _0x32d36d,UniverInstanceType as _0x5c1d9b,DependentOn as _0x562a8a,IConfigService as _0x385a7d,Plugin as _0x1beb87,merge as _0x5ac491}from'@univerjs/core';function _0x2893(_0x59814a,_0x1b51d1){const _0x4b19bd=_0x4b19();return _0x2893=function(_0x289352,_0x2fa73c){_0x289352=_0x289352-0x19a;let _0x480643=_0x4b19bd[_0x289352];return _0x480643;},_0x2893(_0x59814a,_0x1b51d1);}import{UniverThreadCommentUIPlugin as _0x38a385}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x10684c,IThreadCommentDataSourceService as _0x4e8f25}from'@univerjs/thread-comment';import{bufferTime as _0x31ea8f}from'rxjs';import{HTTPService as _0x2f6168}from'@univerjs/network';const W=_0x508aae(0x1d1);var I=(_0x33da7e=>(_0x33da7e[_0x33da7e[_0x508aae(0x1eb)]=0x0]=_0x508aae(0x1eb),_0x33da7e[_0x33da7e[_0x508aae(0x1d6)]=0x1]=_0x508aae(0x1d6),_0x33da7e[_0x33da7e['UNRECOGNIZED']=-0x1]=_0x508aae(0x1d0),_0x33da7e))(I||{}),v=(_0x5a04b5=>(_0x5a04b5[_0x5a04b5[_0x508aae(0x1dc)]=0x0]='Unknown',_0x5a04b5[_0x5a04b5[_0x508aae(0x1cd)]=0x1]=_0x508aae(0x1cd),_0x5a04b5[_0x5a04b5[_0x508aae(0x1e3)]=0x2]='Reply',_0x5a04b5[_0x5a04b5[_0x508aae(0x1c4)]=0x3]=_0x508aae(0x1c4),_0x5a04b5[_0x5a04b5[_0x508aae(0x1c0)]=0x4]=_0x508aae(0x1c0),_0x5a04b5[_0x5a04b5[_0x508aae(0x1d5)]=0x5]=_0x508aae(0x1d5),_0x5a04b5[_0x5a04b5['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x5a04b5))(v||{});const y=_0x128419=>_0xd8a88a(new Date(+_0x128419))[_0x508aae(0x1ef)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x343707,_0x5f4c09)=>{const _0x6f6a6b=_0x508aae,_0xd9dc4f=_0x343707[_0x6f6a6b(0x1d2)](_0x119c71),_0x260b5d=_0x343707[_0x6f6a6b(0x1d2)](_0x2f6168);_0x5f4c09['forEach'](_0x26ffc1=>{const _0x376fa7=_0x6f6a6b;_0xd9dc4f[_0x376fa7(0x1bf)](_0x26ffc1)&&_0x5f4c09[_0x376fa7(0x1e6)](_0x26ffc1);}),_0x5f4c09['size']&&(await _0x260b5d['get'](_0x6f6a6b(0x1c6),{'params':{'userIDs':[..._0x5f4c09]}}))[_0x6f6a6b(0x1a4)][_0x6f6a6b(0x1e8)][_0x6f6a6b(0x1cf)](_0x499f95=>{const _0x44d1ce=_0x6f6a6b;_0x499f95&&_0xd9dc4f[_0x44d1ce(0x1e7)](_0x499f95);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x445184,_0x1d1a2e,_0x3b889b,_0x4b5ef7)=>{const _0x39cb67=_0x508aae;for(var _0x57830d=_0x4b5ef7>0x1?void 0x0:_0x4b5ef7?K(_0x1d1a2e,_0x3b889b):_0x1d1a2e,_0x2dc935=_0x445184[_0x39cb67(0x1e0)]-0x1,_0x45f323;_0x2dc935>=0x0;_0x2dc935--)(_0x45f323=_0x445184[_0x2dc935])&&(_0x57830d=_0x45f323(_0x57830d)||_0x57830d);return _0x57830d;},p=(_0x120310,_0x1c7d42)=>(_0x842d39,_0x9bc089)=>_0x1c7d42(_0x842d39,_0x9bc089,_0x120310);let _=class extends _0x5be0c8{constructor(_0x53c56b,_0xdf6c05,_0x2bbc99,_0x3ef601){const _0xc88234=_0x508aae;super(),this[_0xc88234(0x1d3)]=_0x53c56b,this['_threadCommentModel']=_0xdf6c05,this[_0xc88234(0x1a5)]=_0x2bbc99,this[_0xc88234(0x1e2)]=_0x3ef601,this[_0xc88234(0x1a1)](),this[_0xc88234(0x1f2)]();}[_0x508aae(0x1f2)](){const _0x5ecd6a=_0x508aae;this[_0x5ecd6a(0x1b2)](this['_threadCommentModel']['commentUpdate$'][_0x5ecd6a(0x1d9)](_0x31ea8f(0x10))[_0x5ecd6a(0x1ad)](_0x273a9f=>{const _0x342ac6=_0x5ecd6a,_0x5d7d04=new Set();_0x273a9f[_0x342ac6(0x1cf)](_0x17f9cb=>{const _0x2f895f=_0x342ac6;switch(_0x17f9cb[_0x2f895f(0x1da)]){case _0x2f895f(0x1fd):{const _0xcb7f32=_0x17f9cb['payload'][_0x2f895f(0x1bd)];_0x5d7d04[_0x2f895f(0x1fd)](_0xcb7f32);break;}}}),B(this[_0x342ac6(0x1e2)],_0x5d7d04);}));}['_init'](){const _0x434195=_0x508aae;this[_0x434195(0x1b2)](this['_commentService'][_0x434195(0x1b3)][_0x434195(0x1ad)](async _0x13f74c=>{const _0x265b8f=_0x434195;var _0x14925d,_0x48778e,_0x33cefa,_0x5167f2;const _0x278794=(_0x14925d=this[_0x265b8f(0x1c3)]['getUnit'](_0x13f74c[_0x265b8f(0x1bc)])['find'](_0x166225=>_0x166225[_0x265b8f(0x1ae)]===_0x13f74c['threadId']))==null?void 0x0:_0x14925d[_0x265b8f(0x1a0)];if(!_0x278794)return;const {unitId:_0x2faac4,subUnitId:_0x3aac6f}=_0x278794;switch(_0x13f74c[_0x265b8f(0x19c)]&&this['_userService'][_0x265b8f(0x1e7)](_0x13f74c[_0x265b8f(0x19c)]),_0x13f74c[_0x265b8f(0x1da)]){case v[_0x265b8f(0x1cd)]:break;case v[_0x265b8f(0x1e3)]:{this[_0x265b8f(0x1c3)]['addComment'](_0x2faac4,_0x3aac6f,{'unitId':_0x2faac4,'subUnitId':_0x3aac6f,'ref':'','id':_0x13f74c[_0x265b8f(0x1e4)],'dT':y(+_0x13f74c[_0x265b8f(0x1ba)]),'threadId':_0x13f74c[_0x265b8f(0x1ae)],'personId':(_0x33cefa=(_0x48778e=_0x13f74c[_0x265b8f(0x19c)])==null?void 0x0:_0x48778e[_0x265b8f(0x1a7)])!=null?_0x33cefa:_0x13f74c[_0x265b8f(0x1c2)],'text':JSON[_0x265b8f(0x1aa)](_0x13f74c[_0x265b8f(0x1ff)]),'parentId':_0x278794['id']});break;}case v[_0x265b8f(0x1c0)]:{const _0x4df48e=this['_threadCommentModel'][_0x265b8f(0x1db)](_0x2faac4,_0x3aac6f,_0x13f74c[_0x265b8f(0x1e4)]);_0x4df48e&&_0x4df48e['parentId']&&this[_0x265b8f(0x1c3)][_0x265b8f(0x1cc)](_0x2faac4,_0x3aac6f,_0x13f74c[_0x265b8f(0x1e4)]);break;}case v['Edit']:{this['_threadCommentModel']['updateComment'](_0x2faac4,_0x3aac6f,{'commentId':_0x13f74c[_0x265b8f(0x1e4)],'text':JSON['parse'](_0x13f74c[_0x265b8f(0x1ff)])});break;}case v[_0x265b8f(0x1d5)]:{const _0x534cf4=(_0x5167f2=this['_threadCommentModel'][_0x265b8f(0x1a9)](_0x13f74c[_0x265b8f(0x1bc)])[_0x265b8f(0x1c8)](_0x449f44=>_0x449f44[_0x265b8f(0x1ae)]===_0x13f74c[_0x265b8f(0x1ae)]))==null?void 0x0:_0x5167f2['root'];_0x534cf4&&this['_threadCommentModel'][_0x265b8f(0x1ab)](_0x2faac4,_0x3aac6f,_0x534cf4['id'],_0x13f74c[_0x265b8f(0x1e9)]===I[_0x265b8f(0x1d6)]);break;}}}));}};_=V([p(0x0,_0x2d47f8(_0xeab878)),p(0x1,_0x2d47f8(_0x10684c)),p(0x2,_0x2d47f8(_0x119c71)),p(0x3,_0x2d47f8(_0x1c26b5))],_);const z=_0x508aae(0x1de),O={};var k=Object[_0x508aae(0x1e5)],Q=(_0x262daa,_0x4ccfd9,_0x49b84a,_0x1b91be)=>{const _0x3720a2=_0x508aae;for(var _0x385990=_0x1b91be>0x1?void 0x0:_0x1b91be?k(_0x4ccfd9,_0x49b84a):_0x4ccfd9,_0x18cc7a=_0x262daa[_0x3720a2(0x1e0)]-0x1,_0x2c6a56;_0x18cc7a>=0x0;_0x18cc7a--)(_0x2c6a56=_0x262daa[_0x18cc7a])&&(_0x385990=_0x2c6a56(_0x385990)||_0x385990);return _0x385990;},b=(_0x28c0ab,_0x1d8df3)=>(_0x4c813f,_0x1591cc)=>_0x1d8df3(_0x4c813f,_0x1591cc,_0x28c0ab);function X(_0x320956,_0x1cb8b6){const _0x5ebc58=_0x508aae,_0x521ba8=_0x320956[_0x5ebc58(0x1b1)][0x0];return{..._0x1cb8b6,'id':_0x521ba8[_0x5ebc58(0x1e4)],'resolved':_0x320956[_0x5ebc58(0x1e9)]===0x1,'dT':y(_0x521ba8[_0x5ebc58(0x1ba)]),'personId':_0x521ba8[_0x5ebc58(0x1c2)],'threadId':_0x521ba8[_0x5ebc58(0x1ae)]};}function ee(_0x22c516,_0x1004b8,_0x13bf78){const _0x467f3d=_0x508aae;var _0x5eeeac,_0x1b127c;if(((_0x1b127c=(_0x5eeeac=_0x22c516==null?void 0x0:_0x22c516[_0x467f3d(0x1b1)])==null?void 0x0:_0x5eeeac[_0x467f3d(0x1e0)])!=null?_0x1b127c:0x0)>0x0){const _0x3f4d9c=(_0x59af77,_0x17ab0c)=>({'id':_0x59af77[_0x467f3d(0x1e4)],'threadId':_0x59af77[_0x467f3d(0x1ae)],'dT':y(_0x59af77[_0x467f3d(0x1ba)]),'personId':_0x59af77['userId'],'resolved':_0x22c516[_0x467f3d(0x1e9)]===I[_0x467f3d(0x1d6)],'unitId':_0x1004b8,'subUnitId':_0x13bf78,'text':JSON[_0x467f3d(0x1aa)](_0x59af77['content']),'parentId':_0x17ab0c}),_0x514e33=_0x3f4d9c(_0x22c516[_0x467f3d(0x1b1)][0x0]);return{..._0x514e33,'children':_0x22c516[_0x467f3d(0x1b1)][_0x467f3d(0x1f1)](0x1)['map'](_0x5b8212=>_0x3f4d9c(_0x5b8212,_0x514e33['id']))};}return null;}let S=class{constructor(_0x167b26,_0x489152,_0x4bc89f){const _0x131ab4=_0x508aae;this['_httpService']=_0x167b26,this['_userService']=_0x489152,this[_0x131ab4(0x1b8)]=_0x4bc89f;}async[_0x508aae(0x1c9)](_0x2c0f8b){const _0x520774=_0x508aae;var _0x237f6c,_0x3441f3;const {parentId:_0x25dd13,unitId:_0x275fc9,text:_0x2ab6f6,threadId:_0x581f53}=_0x2c0f8b,_0x458414=(_0x3441f3=(_0x237f6c=_0x2ab6f6[_0x520774(0x1b9)])==null?void 0x0:_0x237f6c[_0x520774(0x1ac)](_0x351cd5=>_0x351cd5[_0x520774(0x1f7)]===_0x32d36d[_0x520774(0x1a3)])[_0x520774(0x1d4)](_0x559687=>_0x559687[_0x520774(0x1a2)]))!=null?_0x3441f3:[],_0x6aa74=JSON[_0x520774(0x1f0)](_0x2ab6f6),_0x444226=(await this[_0x520774(0x1b8)][_0x520774(0x1b7)](_0x275fc9))['getMemberID']();if(_0x25dd13){const _0x187012={'memberId':_0x444226,'unitId':_0x275fc9,'content':_0x6aa74,'mention':_0x458414,'threadId':_0x581f53},_0x1049f5=(await this[_0x520774(0x1bb)]['post'](_0x520774(0x19a)+_0x275fc9+_0x520774(0x1c1),{'body':_0x187012}))[_0x520774(0x1a4)][_0x520774(0x1fe)];return{..._0x2c0f8b,'id':_0x1049f5[_0x520774(0x1e4)],'dT':_0xd8a88a(+_0x1049f5[_0x520774(0x1ba)])['format'](_0x520774(0x1df)),'personId':_0x1049f5[_0x520774(0x1c2)]};}else{const _0x6d3c2b={'memberId':_0x444226,'unitId':_0x275fc9,'content':_0x6aa74,'mention':_0x458414},_0x5d4b05=await this[_0x520774(0x1bb)][_0x520774(0x1f9)](_0x520774(0x19a)+_0x275fc9+'/add',{'body':_0x6d3c2b});return X(_0x5d4b05[_0x520774(0x1a4)][_0x520774(0x19b)],_0x2c0f8b);}}async[_0x508aae(0x1af)](_0x30447c){const _0x248109=_0x508aae;var _0x4b7c38,_0x213bc0;const {text:_0x3a98dd,unitId:_0x3db28f}=_0x30447c,_0x29139e=(_0x213bc0=(_0x4b7c38=_0x3a98dd[_0x248109(0x1b9)])==null?void 0x0:_0x4b7c38[_0x248109(0x1ac)](_0x51c157=>_0x51c157['rangeType']===_0x32d36d[_0x248109(0x1a3)])['map'](_0xc952b7=>_0xc952b7[_0x248109(0x1a2)]))!=null?_0x213bc0:[],_0x689371=JSON[_0x248109(0x1f0)](_0x3a98dd),_0x7279b=_0x30447c['threadId'],_0x48b622=_0x30447c['id'],_0x4efb5c={'memberId':(await this[_0x248109(0x1b8)]['requireSession'](_0x3db28f))[_0x248109(0x1f8)](),'unitId':_0x3db28f,'threadId':_0x7279b,'mention':_0x29139e,'content':_0x689371,'replyId':_0x48b622},_0x388cce=await this[_0x248109(0x1bb)]['post'](_0x248109(0x19a)+_0x3db28f+_0x248109(0x19d),{'body':_0x4efb5c});return!_0x388cce[_0x248109(0x1a4)]['error']||_0x388cce[_0x248109(0x1a4)][_0x248109(0x1d8)][_0x248109(0x1c5)]===0x1;}async['resolveComment'](_0x4631a6){const _0x747b4=_0x508aae,{unitId:_0x1e311c}=_0x4631a6,_0x268394=_0x4631a6[_0x747b4(0x1ae)],_0x5c015d={'memberId':this[_0x747b4(0x1a5)][_0x747b4(0x1dd)]()[_0x747b4(0x1a7)],'unitId':_0x1e311c,'threadId':_0x268394,'solved':_0x4631a6[_0x747b4(0x1ee)]?I[_0x747b4(0x1d6)]:I[_0x747b4(0x1eb)]},_0x11e06e=await this[_0x747b4(0x1bb)][_0x747b4(0x1f9)]('/universer-api/comment/unit/'+_0x1e311c+_0x747b4(0x1b4),{'body':_0x5c015d});return!_0x11e06e['body'][_0x747b4(0x1d8)]||_0x11e06e[_0x747b4(0x1a4)][_0x747b4(0x1d8)]['code']===0x1;}async['deleteComment'](_0x42999f,_0x3b61bb,_0x202a1c,_0x5694d8){const _0x448b1f=_0x508aae,_0x7ee3d={'memberId':(await this['_sessionService'][_0x448b1f(0x1b7)](_0x42999f))[_0x448b1f(0x1f8)](),'threadId':_0x202a1c,'replyId':_0x5694d8,'unitId':_0x42999f},_0x577a18=await this[_0x448b1f(0x1bb)][_0x448b1f(0x1f9)](_0x448b1f(0x19a)+_0x42999f+_0x448b1f(0x1ec),{'body':_0x7ee3d});return!_0x577a18['body'][_0x448b1f(0x1d8)]||_0x577a18[_0x448b1f(0x1a4)][_0x448b1f(0x1d8)][_0x448b1f(0x1c5)]===0x1;}async[_0x508aae(0x1b0)](_0x219944,_0x1afa20,_0x58b5d3){const _0x2b20c4=_0x508aae,_0x28d977={'unitId':_0x219944,'threadId':_0x58b5d3},_0x5e4299=await this[_0x2b20c4(0x1bb)][_0x2b20c4(0x1f9)]('/universer-api/comment/unit/'+_0x219944+'/list',{'body':_0x28d977}),_0x1ba0c8=_0x58b5d3[_0x2b20c4(0x1d4)](_0x212dce=>ee(_0x5e4299[_0x2b20c4(0x1a4)][_0x2b20c4(0x1fc)][_0x212dce],_0x219944,_0x1afa20))[_0x2b20c4(0x1ac)](Boolean);return Object[_0x2b20c4(0x19f)](_0x5e4299[_0x2b20c4(0x1a4)][_0x2b20c4(0x1e8)])['forEach'](_0x450707=>{this['_userService']['addUser'](_0x450707);}),_0x1ba0c8;}[_0x508aae(0x1a6)](_0x4cf104){const _0x35ebd5=_0x508aae;return{'id':_0x4cf104['id'],'threadId':_0x4cf104['threadId'],'ref':_0x4cf104[_0x35ebd5(0x1d7)]};}};S=Q([b(0x0,_0x2d47f8(_0x2f6168)),b(0x1,_0x2d47f8(_0x119c71)),b(0x2,_0x2d47f8(_0x2c9dad))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x227392,_0x39e32c,_0x3f82b0,_0x47faff)=>{for(var _0xf21c84=_0x47faff>0x1?void 0x0:_0x47faff?re(_0x39e32c,_0x3f82b0):_0x39e32c,_0x21fcf4=_0x227392['length']-0x1,_0x571f80;_0x21fcf4>=0x0;_0x21fcf4--)(_0x571f80=_0x227392[_0x21fcf4])&&(_0xf21c84=_0x571f80(_0xf21c84)||_0xf21c84);return _0xf21c84;},M=(_0x43aabe,_0x516a2d)=>(_0x490fea,_0x5ec390)=>_0x516a2d(_0x490fea,_0x5ec390,_0x43aabe);let f=class extends _0x5be0c8{constructor(_0x297072,_0x133254){const _0x2667ea=_0x508aae;super(),this['_threadCommentDataSourceService']=_0x297072,this[_0x2667ea(0x1ce)]=_0x133254,this[_0x2667ea(0x1ca)]();}[_0x508aae(0x1ca)](){const _0x5582d0=_0x508aae;this['_threadCommentDataSourceService'][_0x5582d0(0x1fb)]=this['_threadCommentDataSource'],this[_0x5582d0(0x1c7)][_0x5582d0(0x1fa)]=!0x1;}};f=te([M(0x0,_0x4e8f25),M(0x1,_0x2d47f8(S))],f);var se=Object[_0x508aae(0x1b6)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x23d1ab,_0x31b67d,_0xd25b78)=>_0x31b67d in _0x23d1ab?se(_0x23d1ab,_0x31b67d,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xd25b78}):_0x23d1ab[_0x31b67d]=_0xd25b78,ie=(_0x16c325,_0x10aa17,_0x2c3385,_0x2eef3e)=>{const _0x1debec=_0x508aae;for(var _0x109e9b=_0x2eef3e>0x1?void 0x0:_0x2eef3e?oe(_0x10aa17,_0x2c3385):_0x10aa17,_0x3f1df5=_0x16c325[_0x1debec(0x1e0)]-0x1,_0x361cf8;_0x3f1df5>=0x0;_0x3f1df5--)(_0x361cf8=_0x16c325[_0x3f1df5])&&(_0x109e9b=_0x361cf8(_0x109e9b)||_0x109e9b);return _0x109e9b;},N=(_0x4ed43c,_0x58f985)=>(_0x3e0db6,_0x474a95)=>_0x58f985(_0x3e0db6,_0x474a95,_0x4ed43c),$=(_0x4558bc,_0x4eda8d,_0x2810db)=>ne(_0x4558bc,typeof _0x4eda8d!='symbol'?_0x4eda8d+'':_0x4eda8d,_0x2810db);let g=class extends _0x1beb87{constructor(_0x3814ac=O,_0x554fd1,_0x52331e){const _0x29b9a4=_0x508aae;super(),this[_0x29b9a4(0x1a8)]=_0x3814ac,this[_0x29b9a4(0x1e2)]=_0x554fd1,this[_0x29b9a4(0x200)]=_0x52331e;const {..._0x413c91}=_0x5ac491({},O,this[_0x29b9a4(0x1a8)]);this[_0x29b9a4(0x200)][_0x29b9a4(0x1b5)](z,_0x413c91);}['onStarting'](){const _0x2539d0=_0x508aae;[[S],[f],[_]][_0x2539d0(0x1cf)](_0x5b9e1f=>{const _0x77e87d=_0x2539d0;this[_0x77e87d(0x1e2)][_0x77e87d(0x1fd)](_0x5b9e1f);});}[_0x508aae(0x1cb)](){const _0x26803a=_0x508aae;this[_0x26803a(0x1e2)][_0x26803a(0x1d2)](f),this[_0x26803a(0x1e2)][_0x26803a(0x1d2)](_);}};$(g,'pluginName',W),$(g,'type',_0x5c1d9b['UNIVER_UNKNOWN']),g=ie([_0x562a8a(_0x38a385,_0x214c30,_0x1dfa68),N(0x1,_0x2d47f8(_0x1c26b5)),N(0x2,_0x385a7d)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x29f5(_0x37bf23,_0x256629){const _0x3c794d=_0x3c79();return _0x29f5=function(_0x29f569,_0xf4b8f0){_0x29f569=_0x29f569-0x189;let _0x537deb=_0x3c794d[_0x29f569];return _0x537deb;},_0x29f5(_0x37bf23,_0x256629);}function _0x3c79(){const _0x368943=['Reply','defineProperty','post','CustomRangeType','unitId','size','body','getUnit','user','setConfig','content','syncUpdateMutationToColla','COMMENT','addComment','amd','ThreadCommentModel','replies','UniverNetwork','requireSession','_threadCommentModel','subscribe','5754990OwEeUO','Disposable','@univerjs-pro/collaboration-client','threadId','@univerjs/thread-comment-ui','_config','DependentOn','/edit','disposeWithMe','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','get','Inject','_threadCommentDataSource','add','rangeType','replyId','CommentService','stringify','solved','@univerjs-pro/license','IConfigService','8rMMJon','filter','code','object','userId','_injector','/list','userID','parse','dayjs','OpenOrReOpen','Edit','getOwnPropertyDescriptor','exports','3822190ajqoSb','_userService','/delete','Injector','comments','1193243MPiibb','personId','onReady','UNRECOGNIZED','deleteComment','Module','pluginName','CollaborationSessionService','/universer-api/comment/unit/','resolveComment','Solved','HTTPService','getComment','resolved','slice','ref','map','_init','30XZnJbN','Add','toStringTag','rxjs','UserManagerService','12Xhgknt','_configService','values','7dDGlkw','rangeId','getMemberID','find','payload','function','57674375vKfSpu','thread-comment-data-source.config','124210eLoHCn','IThreadCommentDataSourceService','getUser','10665752iSzdhy','length','root','comment','/add','3220578YiCKmZ','type','forEach','updateComment','customRanges','/solved','Solve','_httpService','format','@univerjs/thread-comment','_commentService','UniverThreadCommentDataSourcePlugin','@univerjs/core','YYYY/MM/DD\x20HH:mm','merge','parentId','reply','listComments','UniverCore','pipe','Unknown','addUser','UniverProCollaborationClient','commentUpdate$','_threadCommentDataSourceService','Delete','error','onStarting','users','@univerjs/network','_initDataSource','_initUserSync','_sessionService','createTimestamp','UniverLicensePlugin','UniverThreadCommentUi','UniverProThreadCommentDatasource','dataSource'];_0x3c79=function(){return _0x368943;};return _0x3c79();}(function(_0xc2975a,_0xc22009){const _0x1e20f6=_0x29f5,_0x3d5a9e=_0xc2975a();while(!![]){try{const _0x36a442=-parseInt(_0x1e20f6(0x1fe))/0x1+parseInt(_0x1e20f6(0x193))/0x2*(-parseInt(_0x1e20f6(0x215))/0x3)+parseInt(_0x1e20f6(0x1eb))/0x4*(-parseInt(_0x1e20f6(0x1f9))/0x5)+parseInt(_0x1e20f6(0x1d6))/0x6+-parseInt(_0x1e20f6(0x18b))/0x7*(parseInt(_0x1e20f6(0x196))/0x8)+-parseInt(_0x1e20f6(0x19b))/0x9*(parseInt(_0x1e20f6(0x210))/0xa)+parseInt(_0x1e20f6(0x191))/0xb;if(_0x36a442===_0xc22009)break;else _0x3d5a9e['push'](_0x3d5a9e['shift']());}catch(_0x6269b5){_0x3d5a9e['push'](_0x3d5a9e['shift']());}}}(_0x3c79,0xc96ae),function(_0x437cb4,_0x4424f6){const _0x2a1438=_0x29f5;typeof exports==_0x2a1438(0x1ee)&&typeof module<'u'?_0x4424f6(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==_0x2a1438(0x190)&&define[_0x2a1438(0x1cf)]?define([_0x2a1438(0x1f8),_0x2a1438(0x1d8),_0x2a1438(0x1e9),_0x2a1438(0x1a7),_0x2a1438(0x1da),_0x2a1438(0x1a4),'rxjs',_0x2a1438(0x1b8)],_0x4424f6):(_0x437cb4=typeof globalThis<'u'?globalThis:_0x437cb4||self,_0x4424f6(_0x437cb4[_0x2a1438(0x1bf)]={},_0x437cb4[_0x2a1438(0x1b1)],_0x437cb4['UniverProLicense'],_0x437cb4[_0x2a1438(0x1ad)],_0x437cb4[_0x2a1438(0x1be)],_0x437cb4['UniverThreadComment'],_0x437cb4[_0x2a1438(0x213)],_0x437cb4[_0x2a1438(0x1d2)]));}(this,function(_0x1a1c8c,_0x5602ae,_0x4246fc,_0x2eb933,_0x40b6a0,_0x5b5bc6,_0x59eb45,_0x1a4eec){'use strict';const _0xb45f06=_0x29f5;const _0x6ce19b=_0xb45f06(0x1df);var _0xb69b17=(_0x1a6b17=>(_0x1a6b17[_0x1a6b17[_0xb45f06(0x1f5)]=0x0]=_0xb45f06(0x1f5),_0x1a6b17[_0x1a6b17[_0xb45f06(0x208)]=0x1]=_0xb45f06(0x208),_0x1a6b17[_0x1a6b17[_0xb45f06(0x201)]=-0x1]=_0xb45f06(0x201),_0x1a6b17))(_0xb69b17||{}),_0x50ed70=(_0x3310e2=>(_0x3310e2[_0x3310e2[_0xb45f06(0x1af)]=0x0]=_0xb45f06(0x1af),_0x3310e2[_0x3310e2[_0xb45f06(0x211)]=0x1]=_0xb45f06(0x211),_0x3310e2[_0x3310e2[_0xb45f06(0x1c1)]=0x2]=_0xb45f06(0x1c1),_0x3310e2[_0x3310e2[_0xb45f06(0x1f6)]=0x3]=_0xb45f06(0x1f6),_0x3310e2[_0x3310e2['Delete']=0x4]=_0xb45f06(0x1b4),_0x3310e2[_0x3310e2[_0xb45f06(0x1a1)]=0x5]='Solve',_0x3310e2[_0x3310e2[_0xb45f06(0x201)]=-0x1]='UNRECOGNIZED',_0x3310e2))(_0x50ed70||{});const _0x1e3e15=_0x132384=>_0x2eb933['dayjs'](new Date(+_0x132384))[_0xb45f06(0x1a3)](_0xb45f06(0x1a8)),_0x3e9c53=async(_0x42581e,_0x39bc02)=>{const _0x10b296=_0xb45f06,_0x1b2cd7=_0x42581e['get'](_0x2eb933[_0x10b296(0x214)]),_0x3e2f1d=_0x42581e[_0x10b296(0x1e0)](_0x1a4eec['HTTPService']);_0x39bc02[_0x10b296(0x19d)](_0x25380b=>{const _0x5b0636=_0x10b296;_0x1b2cd7[_0x5b0636(0x195)](_0x25380b)&&_0x39bc02['delete'](_0x25380b);}),_0x39bc02[_0x10b296(0x1c6)]&&(await _0x3e2f1d[_0x10b296(0x1e0)]('/universer-api/user/list',{'params':{'userIDs':[..._0x39bc02]}}))[_0x10b296(0x1c7)][_0x10b296(0x1b7)]['forEach'](_0x43a112=>{const _0x364c7b=_0x10b296;_0x43a112&&_0x1b2cd7[_0x364c7b(0x1b0)](_0x43a112);});};var _0x4e18cf=Object[_0xb45f06(0x1f7)],_0x1567af=(_0x35a69c,_0x5ae0b3,_0x39fc14,_0x47cbf4)=>{const _0xba0d59=_0xb45f06;for(var _0x40823d=_0x47cbf4>0x1?void 0x0:_0x47cbf4?_0x4e18cf(_0x5ae0b3,_0x39fc14):_0x5ae0b3,_0x367980=_0x35a69c[_0xba0d59(0x197)]-0x1,_0x2092d9;_0x367980>=0x0;_0x367980--)(_0x2092d9=_0x35a69c[_0x367980])&&(_0x40823d=_0x2092d9(_0x40823d)||_0x40823d);return _0x40823d;},_0x1eafc6=(_0x23039c,_0x376b63)=>(_0xfe55c1,_0xf3ea35)=>_0x376b63(_0xfe55c1,_0xf3ea35,_0x23039c);let _0x2fe605=class extends _0x2eb933[_0xb45f06(0x1d7)]{constructor(_0x300d3e,_0x48c419,_0x5c3369,_0x444ed2){const _0x429e9b=_0xb45f06;super(),this[_0x429e9b(0x1a5)]=_0x300d3e,this[_0x429e9b(0x1d4)]=_0x48c419,this[_0x429e9b(0x1fa)]=_0x5c3369,this['_injector']=_0x444ed2,this['_init'](),this['_initUserSync']();}[_0xb45f06(0x1ba)](){const _0x1e8680=_0xb45f06;this[_0x1e8680(0x1de)](this['_threadCommentModel'][_0x1e8680(0x1b2)][_0x1e8680(0x1ae)](_0x59eb45['bufferTime'](0x10))[_0x1e8680(0x1d5)](_0x5accb8=>{const _0x1aba6d=_0x1e8680,_0x493029=new Set();_0x5accb8[_0x1aba6d(0x19d)](_0x81effd=>{const _0x38f5f8=_0x1aba6d;switch(_0x81effd[_0x38f5f8(0x19c)]){case _0x38f5f8(0x1e3):{const _0x3fb0ec=_0x81effd[_0x38f5f8(0x18f)][_0x38f5f8(0x1ff)];_0x493029[_0x38f5f8(0x1e3)](_0x3fb0ec);break;}}}),_0x3e9c53(this[_0x1aba6d(0x1f0)],_0x493029);}));}[_0xb45f06(0x20f)](){const _0x1b7fe1=_0xb45f06;this[_0x1b7fe1(0x1de)](this['_commentService']['commentUpdate$'][_0x1b7fe1(0x1d5)](async _0x5ed792=>{const _0x450d38=_0x1b7fe1;var _0x5cb840,_0x1cc7ad,_0xa8d33e,_0xbbb933;const _0x3592b8=(_0x5cb840=this[_0x450d38(0x1d4)][_0x450d38(0x1c8)](_0x5ed792['unitId'])[_0x450d38(0x18e)](_0x2b5040=>_0x2b5040[_0x450d38(0x1d9)]===_0x5ed792['threadId']))==null?void 0x0:_0x5cb840[_0x450d38(0x198)];if(!_0x3592b8)return;const {unitId:_0x4c1b17,subUnitId:_0x2c04de}=_0x3592b8;switch(_0x5ed792['user']&&this[_0x450d38(0x1fa)]['addUser'](_0x5ed792[_0x450d38(0x1c9)]),_0x5ed792['type']){case _0x50ed70[_0x450d38(0x211)]:break;case _0x50ed70['Reply']:{this[_0x450d38(0x1d4)][_0x450d38(0x1ce)](_0x4c1b17,_0x2c04de,{'unitId':_0x4c1b17,'subUnitId':_0x2c04de,'ref':'','id':_0x5ed792[_0x450d38(0x1e5)],'dT':_0x1e3e15(+_0x5ed792['createTimestamp']),'threadId':_0x5ed792[_0x450d38(0x1d9)],'personId':(_0xa8d33e=(_0x1cc7ad=_0x5ed792[_0x450d38(0x1c9)])==null?void 0x0:_0x1cc7ad[_0x450d38(0x1f2)])!=null?_0xa8d33e:_0x5ed792['userId'],'text':JSON[_0x450d38(0x1f3)](_0x5ed792[_0x450d38(0x1cb)]),'parentId':_0x3592b8['id']});break;}case _0x50ed70[_0x450d38(0x1b4)]:{const _0x270359=this['_threadCommentModel'][_0x450d38(0x20a)](_0x4c1b17,_0x2c04de,_0x5ed792[_0x450d38(0x1e5)]);_0x270359&&_0x270359[_0x450d38(0x1aa)]&&this['_threadCommentModel'][_0x450d38(0x202)](_0x4c1b17,_0x2c04de,_0x5ed792[_0x450d38(0x1e5)]);break;}case _0x50ed70[_0x450d38(0x1f6)]:{this[_0x450d38(0x1d4)][_0x450d38(0x19e)](_0x4c1b17,_0x2c04de,{'commentId':_0x5ed792[_0x450d38(0x1e5)],'text':JSON['parse'](_0x5ed792['content'])});break;}case _0x50ed70['Solve']:{const _0x4c921c=(_0xbbb933=this['_threadCommentModel'][_0x450d38(0x1c8)](_0x5ed792[_0x450d38(0x1c5)])[_0x450d38(0x18e)](_0x51822d=>_0x51822d[_0x450d38(0x1d9)]===_0x5ed792['threadId']))==null?void 0x0:_0xbbb933[_0x450d38(0x198)];_0x4c921c&&this[_0x450d38(0x1d4)]['resolveComment'](_0x4c1b17,_0x2c04de,_0x4c921c['id'],_0x5ed792[_0x450d38(0x1e8)]===_0xb69b17[_0x450d38(0x208)]);break;}}}));}};_0x2fe605=_0x1567af([_0x1eafc6(0x0,_0x2eb933[_0xb45f06(0x1e1)](_0x5602ae[_0xb45f06(0x1e6)])),_0x1eafc6(0x1,_0x2eb933[_0xb45f06(0x1e1)](_0x5b5bc6[_0xb45f06(0x1d0)])),_0x1eafc6(0x2,_0x2eb933[_0xb45f06(0x1e1)](_0x2eb933[_0xb45f06(0x214)])),_0x1eafc6(0x3,_0x2eb933['Inject'](_0x2eb933[_0xb45f06(0x1fc)]))],_0x2fe605);const _0x2da554=_0xb45f06(0x192),_0x5504b5={};var _0x227df0=Object['getOwnPropertyDescriptor'],_0x537993=(_0x5f0d82,_0x1df529,_0x548d97,_0x5ca4e1)=>{const _0x5c022e=_0xb45f06;for(var _0x326f0b=_0x5ca4e1>0x1?void 0x0:_0x5ca4e1?_0x227df0(_0x1df529,_0x548d97):_0x1df529,_0x12b39f=_0x5f0d82[_0x5c022e(0x197)]-0x1,_0xb3a559;_0x12b39f>=0x0;_0x12b39f--)(_0xb3a559=_0x5f0d82[_0x12b39f])&&(_0x326f0b=_0xb3a559(_0x326f0b)||_0x326f0b);return _0x326f0b;},_0x2f9284=(_0x5c5745,_0x5993e1)=>(_0x37d23a,_0x1fdb71)=>_0x5993e1(_0x37d23a,_0x1fdb71,_0x5c5745);function _0x437f85(_0x5e1bcc,_0x2c5412){const _0x67b50b=_0xb45f06,_0x3358b5=_0x5e1bcc['replies'][0x0];return{..._0x2c5412,'id':_0x3358b5[_0x67b50b(0x1e5)],'resolved':_0x5e1bcc[_0x67b50b(0x1e8)]===0x1,'dT':_0x1e3e15(_0x3358b5['createTimestamp']),'personId':_0x3358b5[_0x67b50b(0x1ef)],'threadId':_0x3358b5['threadId']};}function _0x38538b(_0x933bbd,_0x60d914,_0x4af714){const _0x1649b8=_0xb45f06;var _0x55e196,_0x2e00ef;if(((_0x2e00ef=(_0x55e196=_0x933bbd==null?void 0x0:_0x933bbd[_0x1649b8(0x1d1)])==null?void 0x0:_0x55e196['length'])!=null?_0x2e00ef:0x0)>0x0){const _0x2f8c05=(_0x1bb1a3,_0x4d43d0)=>({'id':_0x1bb1a3[_0x1649b8(0x1e5)],'threadId':_0x1bb1a3['threadId'],'dT':_0x1e3e15(_0x1bb1a3['createTimestamp']),'personId':_0x1bb1a3[_0x1649b8(0x1ef)],'resolved':_0x933bbd[_0x1649b8(0x1e8)]===_0xb69b17[_0x1649b8(0x208)],'unitId':_0x60d914,'subUnitId':_0x4af714,'text':JSON[_0x1649b8(0x1f3)](_0x1bb1a3['content']),'parentId':_0x4d43d0}),_0x3f10a8=_0x2f8c05(_0x933bbd['replies'][0x0]);return{..._0x3f10a8,'children':_0x933bbd[_0x1649b8(0x1d1)][_0x1649b8(0x20c)](0x1)[_0x1649b8(0x20e)](_0x10739f=>_0x2f8c05(_0x10739f,_0x3f10a8['id']))};}return null;}let _0xad718=class{constructor(_0x209f31,_0x44e1c6,_0x31cf27){const _0x533192=_0xb45f06;this[_0x533192(0x1a2)]=_0x209f31,this[_0x533192(0x1fa)]=_0x44e1c6,this[_0x533192(0x1bb)]=_0x31cf27;}async['addComment'](_0xd78f95){const _0x3c44e3=_0xb45f06;var _0x582b0f,_0x11447f;const {parentId:_0x48656b,unitId:_0x2490c9,text:_0x53d41f,threadId:_0x113e85}=_0xd78f95,_0x4b490d=(_0x11447f=(_0x582b0f=_0x53d41f['customRanges'])==null?void 0x0:_0x582b0f[_0x3c44e3(0x1ec)](_0x2e9d00=>_0x2e9d00[_0x3c44e3(0x1e4)]===_0x2eb933['CustomRangeType'][_0x3c44e3(0x1cd)])[_0x3c44e3(0x20e)](_0x34c3d7=>_0x34c3d7[_0x3c44e3(0x18c)]))!=null?_0x11447f:[],_0x2da33a=JSON[_0x3c44e3(0x1e7)](_0x53d41f),_0x3f409e=(await this[_0x3c44e3(0x1bb)][_0x3c44e3(0x1d3)](_0x2490c9))[_0x3c44e3(0x18d)]();if(_0x48656b){const _0x872572={'memberId':_0x3f409e,'unitId':_0x2490c9,'content':_0x2da33a,'mention':_0x4b490d,'threadId':_0x113e85},_0x5d24e0=(await this[_0x3c44e3(0x1a2)][_0x3c44e3(0x1c3)](_0x3c44e3(0x206)+_0x2490c9+'/reply',{'body':_0x872572}))[_0x3c44e3(0x1c7)][_0x3c44e3(0x1ab)];return{..._0xd78f95,'id':_0x5d24e0[_0x3c44e3(0x1e5)],'dT':_0x2eb933[_0x3c44e3(0x1f4)](+_0x5d24e0[_0x3c44e3(0x1bc)])[_0x3c44e3(0x1a3)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x5d24e0['userId']};}else{const _0xa74b23={'memberId':_0x3f409e,'unitId':_0x2490c9,'content':_0x2da33a,'mention':_0x4b490d},_0x5223eb=await this[_0x3c44e3(0x1a2)][_0x3c44e3(0x1c3)]('/universer-api/comment/unit/'+_0x2490c9+_0x3c44e3(0x19a),{'body':_0xa74b23});return _0x437f85(_0x5223eb['body'][_0x3c44e3(0x199)],_0xd78f95);}}async[_0xb45f06(0x19e)](_0x38eb44){const _0x430cfa=_0xb45f06;var _0xf50d9c,_0x5adda9;const {text:_0x5a10cd,unitId:_0x4b690a}=_0x38eb44,_0x50fcc6=(_0x5adda9=(_0xf50d9c=_0x5a10cd[_0x430cfa(0x19f)])==null?void 0x0:_0xf50d9c['filter'](_0x2679cc=>_0x2679cc[_0x430cfa(0x1e4)]===_0x2eb933[_0x430cfa(0x1c4)]['COMMENT'])[_0x430cfa(0x20e)](_0x751774=>_0x751774[_0x430cfa(0x18c)]))!=null?_0x5adda9:[],_0x15efc0=JSON[_0x430cfa(0x1e7)](_0x5a10cd),_0x39f31c=_0x38eb44[_0x430cfa(0x1d9)],_0x4d6075=_0x38eb44['id'],_0x311110={'memberId':(await this['_sessionService']['requireSession'](_0x4b690a))[_0x430cfa(0x18d)](),'unitId':_0x4b690a,'threadId':_0x39f31c,'mention':_0x50fcc6,'content':_0x15efc0,'replyId':_0x4d6075},_0x1ba6ad=await this['_httpService'][_0x430cfa(0x1c3)]('/universer-api/comment/unit/'+_0x4b690a+_0x430cfa(0x1dd),{'body':_0x311110});return!_0x1ba6ad[_0x430cfa(0x1c7)][_0x430cfa(0x1b5)]||_0x1ba6ad[_0x430cfa(0x1c7)]['error']['code']===0x1;}async[_0xb45f06(0x207)](_0x4204c6){const _0x1db34a=_0xb45f06,{unitId:_0x469f26}=_0x4204c6,_0x5ac3b2=_0x4204c6[_0x1db34a(0x1d9)],_0x524e11={'memberId':this[_0x1db34a(0x1fa)]['getCurrentUser']()['userID'],'unitId':_0x469f26,'threadId':_0x5ac3b2,'solved':_0x4204c6[_0x1db34a(0x20b)]?_0xb69b17['Solved']:_0xb69b17['OpenOrReOpen']},_0xee5358=await this[_0x1db34a(0x1a2)][_0x1db34a(0x1c3)](_0x1db34a(0x206)+_0x469f26+_0x1db34a(0x1a0),{'body':_0x524e11});return!_0xee5358[_0x1db34a(0x1c7)][_0x1db34a(0x1b5)]||_0xee5358[_0x1db34a(0x1c7)]['error'][_0x1db34a(0x1ed)]===0x1;}async[_0xb45f06(0x202)](_0x1edb16,_0x13b49e,_0x371e6f,_0x53b5b2){const _0x2b2ed3=_0xb45f06,_0x544b43={'memberId':(await this[_0x2b2ed3(0x1bb)][_0x2b2ed3(0x1d3)](_0x1edb16))[_0x2b2ed3(0x18d)](),'threadId':_0x371e6f,'replyId':_0x53b5b2,'unitId':_0x1edb16},_0x26223b=await this[_0x2b2ed3(0x1a2)][_0x2b2ed3(0x1c3)](_0x2b2ed3(0x206)+_0x1edb16+_0x2b2ed3(0x1fb),{'body':_0x544b43});return!_0x26223b[_0x2b2ed3(0x1c7)][_0x2b2ed3(0x1b5)]||_0x26223b['body'][_0x2b2ed3(0x1b5)][_0x2b2ed3(0x1ed)]===0x1;}async[_0xb45f06(0x1ac)](_0x583adf,_0x4b67d9,_0x5382f2){const _0x42e2c1=_0xb45f06,_0x1abdea={'unitId':_0x583adf,'threadId':_0x5382f2},_0x12a18c=await this[_0x42e2c1(0x1a2)][_0x42e2c1(0x1c3)](_0x42e2c1(0x206)+_0x583adf+_0x42e2c1(0x1f1),{'body':_0x1abdea}),_0x1710cb=_0x5382f2[_0x42e2c1(0x20e)](_0x1e5730=>_0x38538b(_0x12a18c[_0x42e2c1(0x1c7)][_0x42e2c1(0x1fd)][_0x1e5730],_0x583adf,_0x4b67d9))[_0x42e2c1(0x1ec)](Boolean);return Object[_0x42e2c1(0x18a)](_0x12a18c[_0x42e2c1(0x1c7)][_0x42e2c1(0x1b7)])['forEach'](_0x5e4528=>{const _0x2462bd=_0x42e2c1;this[_0x2462bd(0x1fa)]['addUser'](_0x5e4528);}),_0x1710cb;}['saveCommentToSnapshot'](_0x27380a){const _0x426991=_0xb45f06;return{'id':_0x27380a['id'],'threadId':_0x27380a[_0x426991(0x1d9)],'ref':_0x27380a[_0x426991(0x20d)]};}};_0xad718=_0x537993([_0x2f9284(0x0,_0x2eb933[_0xb45f06(0x1e1)](_0x1a4eec[_0xb45f06(0x209)])),_0x2f9284(0x1,_0x2eb933[_0xb45f06(0x1e1)](_0x2eb933['UserManagerService'])),_0x2f9284(0x2,_0x2eb933[_0xb45f06(0x1e1)](_0x5602ae[_0xb45f06(0x205)]))],_0xad718);var _0x385b96=Object[_0xb45f06(0x1f7)],_0x15b610=(_0x5c615e,_0x1b85f4,_0x1dc0c8,_0x51862a)=>{const _0x4472e1=_0xb45f06;for(var _0x53180d=_0x51862a>0x1?void 0x0:_0x51862a?_0x385b96(_0x1b85f4,_0x1dc0c8):_0x1b85f4,_0xf9dc2c=_0x5c615e[_0x4472e1(0x197)]-0x1,_0x31c24b;_0xf9dc2c>=0x0;_0xf9dc2c--)(_0x31c24b=_0x5c615e[_0xf9dc2c])&&(_0x53180d=_0x31c24b(_0x53180d)||_0x53180d);return _0x53180d;},_0x25e918=(_0x446ba8,_0x296dcc)=>(_0x444858,_0x35a341)=>_0x296dcc(_0x444858,_0x35a341,_0x446ba8);let _0x1771fe=class extends _0x2eb933[_0xb45f06(0x1d7)]{constructor(_0x23939d,_0x18e561){const _0x2688e2=_0xb45f06;super(),this[_0x2688e2(0x1b3)]=_0x23939d,this[_0x2688e2(0x1e2)]=_0x18e561,this[_0x2688e2(0x1b9)]();}[_0xb45f06(0x1b9)](){const _0x5692ad=_0xb45f06;this[_0x5692ad(0x1b3)][_0x5692ad(0x1c0)]=this[_0x5692ad(0x1e2)],this['_threadCommentDataSourceService'][_0x5692ad(0x1cc)]=!0x1;}};_0x1771fe=_0x15b610([_0x25e918(0x0,_0x5b5bc6[_0xb45f06(0x194)]),_0x25e918(0x1,_0x2eb933['Inject'](_0xad718))],_0x1771fe);var _0xfc8436=Object[_0xb45f06(0x1c2)],_0x224ee9=Object[_0xb45f06(0x1f7)],_0x515636=(_0x436a8f,_0x1c6d80,_0xd69bba)=>_0x1c6d80 in _0x436a8f?_0xfc8436(_0x436a8f,_0x1c6d80,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xd69bba}):_0x436a8f[_0x1c6d80]=_0xd69bba,_0x5d5904=(_0x579bbd,_0x2e159c,_0x25df79,_0x2e8924)=>{const _0x43de23=_0xb45f06;for(var _0x740dd2=_0x2e8924>0x1?void 0x0:_0x2e8924?_0x224ee9(_0x2e159c,_0x25df79):_0x2e159c,_0x1884c9=_0x579bbd[_0x43de23(0x197)]-0x1,_0xff3c2c;_0x1884c9>=0x0;_0x1884c9--)(_0xff3c2c=_0x579bbd[_0x1884c9])&&(_0x740dd2=_0xff3c2c(_0x740dd2)||_0x740dd2);return _0x740dd2;},_0x3f4f8d=(_0x2cc641,_0x46e99d)=>(_0x29ef5c,_0x458033)=>_0x46e99d(_0x29ef5c,_0x458033,_0x2cc641),_0x1cac8a=(_0x2bf440,_0xffbae4,_0x4ead5f)=>_0x515636(_0x2bf440,typeof _0xffbae4!='symbol'?_0xffbae4+'':_0xffbae4,_0x4ead5f);_0x1a1c8c[_0xb45f06(0x1a6)]=class extends _0x2eb933['Plugin']{constructor(_0x5d9176=_0x5504b5,_0x2f022d,_0x260ccc){const _0x23d19a=_0xb45f06;super(),this[_0x23d19a(0x1db)]=_0x5d9176,this[_0x23d19a(0x1f0)]=_0x2f022d,this[_0x23d19a(0x189)]=_0x260ccc;const {..._0x10c194}=_0x2eb933[_0x23d19a(0x1a9)]({},_0x5504b5,this['_config']);this[_0x23d19a(0x189)][_0x23d19a(0x1ca)](_0x2da554,_0x10c194);}[_0xb45f06(0x1b6)](){const _0x4b10e2=_0xb45f06;[[_0xad718],[_0x1771fe],[_0x2fe605]][_0x4b10e2(0x19d)](_0x26a209=>{this['_injector']['add'](_0x26a209);});}[_0xb45f06(0x200)](){const _0x2be99c=_0xb45f06;this[_0x2be99c(0x1f0)][_0x2be99c(0x1e0)](_0x1771fe),this[_0x2be99c(0x1f0)][_0x2be99c(0x1e0)](_0x2fe605);}},_0x1cac8a(_0x1a1c8c[_0xb45f06(0x1a6)],_0xb45f06(0x204),_0x6ce19b),_0x1cac8a(_0x1a1c8c['UniverThreadCommentDataSourcePlugin'],_0xb45f06(0x19c),_0x2eb933['UniverInstanceType']['UNIVER_UNKNOWN']),_0x1a1c8c[_0xb45f06(0x1a6)]=_0x5d5904([_0x2eb933[_0xb45f06(0x1dc)](_0x40b6a0['UniverThreadCommentUIPlugin'],_0x5602ae['UniverCollaborationClientPlugin'],_0x4246fc[_0xb45f06(0x1bd)]),_0x3f4f8d(0x1,_0x2eb933['Inject'](_0x2eb933[_0xb45f06(0x1fc)])),_0x3f4f8d(0x2,_0x2eb933[_0xb45f06(0x1ea)])],_0x1a1c8c[_0xb45f06(0x1a6)]),Object[_0xb45f06(0x1c2)](_0x1a1c8c,Symbol[_0xb45f06(0x212)],{'value':_0xb45f06(0x203)});}));
1
+ function _0x6377(_0x55f279,_0x369ad8){const _0x5e751b=_0x5e75();return _0x6377=function(_0x6377f4,_0x2f72a1){_0x6377f4=_0x6377f4-0x12e;let _0x279d0b=_0x5e751b[_0x6377f4];return _0x279d0b;},_0x6377(_0x55f279,_0x369ad8);}(function(_0x321f7e,_0x1b9bc3){const _0x5232ca=_0x6377,_0x35ef49=_0x321f7e();while(!![]){try{const _0xfe445f=-parseInt(_0x5232ca(0x1b2))/0x1+parseInt(_0x5232ca(0x13f))/0x2+-parseInt(_0x5232ca(0x14d))/0x3*(parseInt(_0x5232ca(0x181))/0x4)+-parseInt(_0x5232ca(0x1af))/0x5*(parseInt(_0x5232ca(0x139))/0x6)+parseInt(_0x5232ca(0x1b0))/0x7*(-parseInt(_0x5232ca(0x19d))/0x8)+-parseInt(_0x5232ca(0x197))/0x9+-parseInt(_0x5232ca(0x17f))/0xa*(-parseInt(_0x5232ca(0x17b))/0xb);if(_0xfe445f===_0x1b9bc3)break;else _0x35ef49['push'](_0x35ef49['shift']());}catch(_0xbade7e){_0x35ef49['push'](_0x35ef49['shift']());}}}(_0x5e75,0x32ddb),function(_0x5b53a4,_0x5798be){const _0x29ef60=_0x6377;typeof exports==_0x29ef60(0x14b)&&typeof module<'u'?_0x5798be(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==_0x29ef60(0x180)&&define[_0x29ef60(0x184)]?define([_0x29ef60(0x18f),_0x29ef60(0x185),'@univerjs-pro/license','@univerjs/core',_0x29ef60(0x137),_0x29ef60(0x145),'rxjs',_0x29ef60(0x1b1)],_0x5798be):(_0x5b53a4=typeof globalThis<'u'?globalThis:_0x5b53a4||self,_0x5798be(_0x5b53a4[_0x29ef60(0x179)]={},_0x5b53a4[_0x29ef60(0x199)],_0x5b53a4[_0x29ef60(0x147)],_0x5b53a4[_0x29ef60(0x191)],_0x5b53a4['UniverThreadCommentUi'],_0x5b53a4[_0x29ef60(0x187)],_0x5b53a4['rxjs'],_0x5b53a4[_0x29ef60(0x1ab)]));}(this,function(_0x2501e2,_0x48fe52,_0xc7431b,_0x3024df,_0x51d56a,_0x11ef9d,_0xec189,_0x763b7b){'use strict';const _0x12bf66=_0x6377;const _0xe8f509=_0x12bf66(0x15e);var _0x19f665=(_0x1a0b83=>(_0x1a0b83[_0x1a0b83[_0x12bf66(0x148)]=0x0]=_0x12bf66(0x148),_0x1a0b83[_0x1a0b83['Solved']=0x1]='Solved',_0x1a0b83[_0x1a0b83[_0x12bf66(0x15b)]=-0x1]=_0x12bf66(0x15b),_0x1a0b83))(_0x19f665||{}),_0x41bc0c=(_0x35b520=>(_0x35b520[_0x35b520[_0x12bf66(0x1ac)]=0x0]=_0x12bf66(0x1ac),_0x35b520[_0x35b520[_0x12bf66(0x17c)]=0x1]=_0x12bf66(0x17c),_0x35b520[_0x35b520[_0x12bf66(0x149)]=0x2]='Reply',_0x35b520[_0x35b520[_0x12bf66(0x140)]=0x3]='Edit',_0x35b520[_0x35b520['Delete']=0x4]=_0x12bf66(0x16a),_0x35b520[_0x35b520[_0x12bf66(0x150)]=0x5]=_0x12bf66(0x150),_0x35b520[_0x35b520[_0x12bf66(0x15b)]=-0x1]='UNRECOGNIZED',_0x35b520))(_0x41bc0c||{});const _0x118c4e=_0xa77ab4=>_0x3024df[_0x12bf66(0x167)](new Date(+_0xa77ab4))[_0x12bf66(0x1a3)]('YYYY/MM/DD\x20HH:mm'),_0x172c13=async(_0x1a30e3,_0x37e772)=>{const _0x3a49df=_0x12bf66,_0x1f0824=_0x1a30e3['get'](_0x3024df['UserManagerService']),_0x70c3e2=_0x1a30e3[_0x3a49df(0x183)](_0x763b7b[_0x3a49df(0x163)]);_0x37e772[_0x3a49df(0x18a)](_0x30ef89=>{const _0x53b624=_0x3a49df;_0x1f0824[_0x53b624(0x1a8)](_0x30ef89)&&_0x37e772[_0x53b624(0x17e)](_0x30ef89);}),_0x37e772['size']&&(await _0x70c3e2[_0x3a49df(0x183)](_0x3a49df(0x16d),{'params':{'userIDs':[..._0x37e772]}}))[_0x3a49df(0x19f)]['users'][_0x3a49df(0x18a)](_0x599aae=>{_0x599aae&&_0x1f0824['addUser'](_0x599aae);});};var _0x47d8c1=Object['getOwnPropertyDescriptor'],_0x2de80c=(_0x169f9b,_0x1359ff,_0x331399,_0x2958ac)=>{const _0xed1057=_0x12bf66;for(var _0x1b41bc=_0x2958ac>0x1?void 0x0:_0x2958ac?_0x47d8c1(_0x1359ff,_0x331399):_0x1359ff,_0x4a121a=_0x169f9b[_0xed1057(0x198)]-0x1,_0x461ba5;_0x4a121a>=0x0;_0x4a121a--)(_0x461ba5=_0x169f9b[_0x4a121a])&&(_0x1b41bc=_0x461ba5(_0x1b41bc)||_0x1b41bc);return _0x1b41bc;},_0x529c8a=(_0x1de0fb,_0x544c1f)=>(_0x6032f7,_0x490876)=>_0x544c1f(_0x6032f7,_0x490876,_0x1de0fb);let _0x50e535=class extends _0x3024df[_0x12bf66(0x162)]{constructor(_0x3d9483,_0x219d19,_0x73ca6,_0x27b94e){const _0x73c5f=_0x12bf66;super(),this[_0x73c5f(0x165)]=_0x3d9483,this[_0x73c5f(0x14a)]=_0x219d19,this[_0x73c5f(0x14c)]=_0x73ca6,this[_0x73c5f(0x1b8)]=_0x27b94e,this[_0x73c5f(0x192)](),this[_0x73c5f(0x136)]();}[_0x12bf66(0x136)](){const _0x19be3c=_0x12bf66;this[_0x19be3c(0x15f)](this[_0x19be3c(0x14a)][_0x19be3c(0x152)][_0x19be3c(0x1b6)](_0xec189[_0x19be3c(0x133)](0x10))['subscribe'](_0x3cbb8c=>{const _0x3b5e6c=_0x19be3c,_0x1ab5c4=new Set();_0x3cbb8c[_0x3b5e6c(0x18a)](_0x5413ec=>{const _0x4b07b6=_0x3b5e6c;switch(_0x5413ec['type']){case _0x4b07b6(0x151):{const _0x1629f7=_0x5413ec[_0x4b07b6(0x189)][_0x4b07b6(0x138)];_0x1ab5c4[_0x4b07b6(0x151)](_0x1629f7);break;}}}),_0x172c13(this[_0x3b5e6c(0x1b8)],_0x1ab5c4);}));}['_init'](){const _0x428989=_0x12bf66;this[_0x428989(0x15f)](this[_0x428989(0x165)]['commentUpdate$'][_0x428989(0x12f)](async _0xd19f56=>{const _0x28ff68=_0x428989;var _0x53d198,_0x1fd23b,_0x152a38,_0x21b790;const _0x20120a=(_0x53d198=this[_0x28ff68(0x14a)][_0x28ff68(0x18c)](_0xd19f56[_0x28ff68(0x153)])[_0x28ff68(0x12e)](_0x3d8623=>_0x3d8623[_0x28ff68(0x14e)]===_0xd19f56[_0x28ff68(0x14e)]))==null?void 0x0:_0x53d198[_0x28ff68(0x154)];if(!_0x20120a)return;const {unitId:_0x59ae0d,subUnitId:_0x2afe6a}=_0x20120a;switch(_0xd19f56[_0x28ff68(0x15a)]&&this[_0x28ff68(0x14c)][_0x28ff68(0x19a)](_0xd19f56['user']),_0xd19f56['type']){case _0x41bc0c[_0x28ff68(0x17c)]:break;case _0x41bc0c[_0x28ff68(0x149)]:{this[_0x28ff68(0x14a)][_0x28ff68(0x130)](_0x59ae0d,_0x2afe6a,{'unitId':_0x59ae0d,'subUnitId':_0x2afe6a,'ref':'','id':_0xd19f56[_0x28ff68(0x190)],'dT':_0x118c4e(+_0xd19f56['createTimestamp']),'threadId':_0xd19f56['threadId'],'personId':(_0x152a38=(_0x1fd23b=_0xd19f56[_0x28ff68(0x15a)])==null?void 0x0:_0x1fd23b[_0x28ff68(0x196)])!=null?_0x152a38:_0xd19f56[_0x28ff68(0x13b)],'text':JSON['parse'](_0xd19f56['content']),'parentId':_0x20120a['id']});break;}case _0x41bc0c[_0x28ff68(0x16a)]:{const _0xc5dc97=this[_0x28ff68(0x14a)][_0x28ff68(0x14f)](_0x59ae0d,_0x2afe6a,_0xd19f56[_0x28ff68(0x190)]);_0xc5dc97&&_0xc5dc97[_0x28ff68(0x19c)]&&this['_threadCommentModel'][_0x28ff68(0x160)](_0x59ae0d,_0x2afe6a,_0xd19f56[_0x28ff68(0x190)]);break;}case _0x41bc0c[_0x28ff68(0x140)]:{this[_0x28ff68(0x14a)][_0x28ff68(0x141)](_0x59ae0d,_0x2afe6a,{'commentId':_0xd19f56[_0x28ff68(0x190)],'text':JSON['parse'](_0xd19f56['content'])});break;}case _0x41bc0c[_0x28ff68(0x150)]:{const _0x2d30c4=(_0x21b790=this[_0x28ff68(0x14a)][_0x28ff68(0x18c)](_0xd19f56[_0x28ff68(0x153)])[_0x28ff68(0x12e)](_0x561136=>_0x561136['threadId']===_0xd19f56[_0x28ff68(0x14e)]))==null?void 0x0:_0x21b790[_0x28ff68(0x154)];_0x2d30c4&&this['_threadCommentModel']['resolveComment'](_0x59ae0d,_0x2afe6a,_0x2d30c4['id'],_0xd19f56[_0x28ff68(0x195)]===_0x19f665[_0x28ff68(0x18b)]);break;}}}));}};_0x50e535=_0x2de80c([_0x529c8a(0x0,_0x3024df['Inject'](_0x48fe52[_0x12bf66(0x1ad)])),_0x529c8a(0x1,_0x3024df[_0x12bf66(0x194)](_0x11ef9d[_0x12bf66(0x17a)])),_0x529c8a(0x2,_0x3024df[_0x12bf66(0x194)](_0x3024df[_0x12bf66(0x1a5)])),_0x529c8a(0x3,_0x3024df[_0x12bf66(0x194)](_0x3024df[_0x12bf66(0x134)]))],_0x50e535);const _0x3abbb1=_0x12bf66(0x1a1),_0x8c09de={};var _0x2ae2cf=Object['getOwnPropertyDescriptor'],_0x22b60b=(_0x5a2722,_0x31faae,_0x1deb1f,_0x4c5b53)=>{for(var _0x3f0b06=_0x4c5b53>0x1?void 0x0:_0x4c5b53?_0x2ae2cf(_0x31faae,_0x1deb1f):_0x31faae,_0x4df712=_0x5a2722['length']-0x1,_0x1c8830;_0x4df712>=0x0;_0x4df712--)(_0x1c8830=_0x5a2722[_0x4df712])&&(_0x3f0b06=_0x1c8830(_0x3f0b06)||_0x3f0b06);return _0x3f0b06;},_0x52af3b=(_0x15f83b,_0x548339)=>(_0x54f8b6,_0x1b382f)=>_0x548339(_0x54f8b6,_0x1b382f,_0x15f83b);function _0x514ca3(_0x287522,_0x1d812){const _0x4f6000=_0x12bf66,_0x3be826=_0x287522[_0x4f6000(0x193)][0x0];return{..._0x1d812,'id':_0x3be826[_0x4f6000(0x190)],'resolved':_0x287522['solved']===0x1,'dT':_0x118c4e(_0x3be826[_0x4f6000(0x159)]),'personId':_0x3be826['userId'],'threadId':_0x3be826['threadId']};}function _0x402477(_0x1af81b,_0x17250d,_0x12b919){const _0x4d5156=_0x12bf66;var _0x11fead,_0xf2a096;if(((_0xf2a096=(_0x11fead=_0x1af81b==null?void 0x0:_0x1af81b[_0x4d5156(0x193)])==null?void 0x0:_0x11fead[_0x4d5156(0x198)])!=null?_0xf2a096:0x0)>0x0){const _0x412b78=(_0x182021,_0x16676b)=>({'id':_0x182021[_0x4d5156(0x190)],'threadId':_0x182021[_0x4d5156(0x14e)],'dT':_0x118c4e(_0x182021[_0x4d5156(0x159)]),'personId':_0x182021[_0x4d5156(0x13b)],'resolved':_0x1af81b[_0x4d5156(0x195)]===_0x19f665['Solved'],'unitId':_0x17250d,'subUnitId':_0x12b919,'text':JSON[_0x4d5156(0x177)](_0x182021['content']),'parentId':_0x16676b}),_0x396f67=_0x412b78(_0x1af81b[_0x4d5156(0x193)][0x0]);return{..._0x396f67,'children':_0x1af81b[_0x4d5156(0x193)]['slice'](0x1)[_0x4d5156(0x1b5)](_0x4a5c39=>_0x412b78(_0x4a5c39,_0x396f67['id']))};}return null;}let _0x348eb6=class{constructor(_0x5cfb7e,_0x10606b,_0x3aff20){const _0xa2644b=_0x12bf66;this[_0xa2644b(0x1b7)]=_0x5cfb7e,this[_0xa2644b(0x14c)]=_0x10606b,this[_0xa2644b(0x13e)]=_0x3aff20;}async[_0x12bf66(0x130)](_0x465fbd){const _0x5034f6=_0x12bf66;var _0x22456a,_0x46d8f1;const {parentId:_0x29429a,unitId:_0x3e980e,text:_0x454945,threadId:_0x67a809}=_0x465fbd,_0x17daf7=(_0x46d8f1=(_0x22456a=_0x454945[_0x5034f6(0x1b3)])==null?void 0x0:_0x22456a[_0x5034f6(0x182)](_0x897fa7=>_0x897fa7['rangeType']===_0x3024df[_0x5034f6(0x158)][_0x5034f6(0x171)])[_0x5034f6(0x1b5)](_0x392cfe=>_0x392cfe[_0x5034f6(0x172)]))!=null?_0x46d8f1:[],_0x263b54=JSON[_0x5034f6(0x178)](_0x454945),_0x4ba15d=(await this['_sessionService'][_0x5034f6(0x1a9)](_0x3e980e))[_0x5034f6(0x157)]();if(_0x29429a){const _0x20a655={'memberId':_0x4ba15d,'unitId':_0x3e980e,'content':_0x263b54,'mention':_0x17daf7,'threadId':_0x67a809},_0x639e9c=(await this[_0x5034f6(0x1b7)]['post'](_0x5034f6(0x16f)+_0x3e980e+'/reply',{'body':_0x20a655}))['body'][_0x5034f6(0x144)];return{..._0x465fbd,'id':_0x639e9c[_0x5034f6(0x190)],'dT':_0x3024df['dayjs'](+_0x639e9c['createTimestamp'])[_0x5034f6(0x1a3)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x639e9c['userId']};}else{const _0x14d9a1={'memberId':_0x4ba15d,'unitId':_0x3e980e,'content':_0x263b54,'mention':_0x17daf7},_0x941460=await this[_0x5034f6(0x1b7)]['post']('/universer-api/comment/unit/'+_0x3e980e+_0x5034f6(0x166),{'body':_0x14d9a1});return _0x514ca3(_0x941460[_0x5034f6(0x19f)][_0x5034f6(0x156)],_0x465fbd);}}async[_0x12bf66(0x141)](_0x5e8864){const _0x25b0da=_0x12bf66;var _0x2fd8e4,_0x5c2e75;const {text:_0x4211d3,unitId:_0xbf9347}=_0x5e8864,_0x3850f9=(_0x5c2e75=(_0x2fd8e4=_0x4211d3[_0x25b0da(0x1b3)])==null?void 0x0:_0x2fd8e4[_0x25b0da(0x182)](_0x4640b8=>_0x4640b8[_0x25b0da(0x132)]===_0x3024df[_0x25b0da(0x158)][_0x25b0da(0x171)])[_0x25b0da(0x1b5)](_0x5bf953=>_0x5bf953['rangeId']))!=null?_0x5c2e75:[],_0x1129ee=JSON['stringify'](_0x4211d3),_0x7f7804=_0x5e8864[_0x25b0da(0x14e)],_0xc46f3d=_0x5e8864['id'],_0x1c0907={'memberId':(await this[_0x25b0da(0x13e)][_0x25b0da(0x1a9)](_0xbf9347))['getMemberID'](),'unitId':_0xbf9347,'threadId':_0x7f7804,'mention':_0x3850f9,'content':_0x1129ee,'replyId':_0xc46f3d},_0x143fa0=await this[_0x25b0da(0x1b7)][_0x25b0da(0x135)](_0x25b0da(0x16f)+_0xbf9347+_0x25b0da(0x161),{'body':_0x1c0907});return!_0x143fa0[_0x25b0da(0x19f)][_0x25b0da(0x16e)]||_0x143fa0[_0x25b0da(0x19f)][_0x25b0da(0x16e)][_0x25b0da(0x1a4)]===0x1;}async[_0x12bf66(0x15d)](_0x5d0752){const _0x58dbba=_0x12bf66,{unitId:_0x29c611}=_0x5d0752,_0x44e2a9=_0x5d0752['threadId'],_0x51155b={'memberId':this[_0x58dbba(0x14c)][_0x58dbba(0x186)]()[_0x58dbba(0x196)],'unitId':_0x29c611,'threadId':_0x44e2a9,'solved':_0x5d0752[_0x58dbba(0x18e)]?_0x19f665[_0x58dbba(0x18b)]:_0x19f665[_0x58dbba(0x148)]},_0x2d7154=await this['_httpService'][_0x58dbba(0x135)]('/universer-api/comment/unit/'+_0x29c611+'/solved',{'body':_0x51155b});return!_0x2d7154['body'][_0x58dbba(0x16e)]||_0x2d7154['body'][_0x58dbba(0x16e)][_0x58dbba(0x1a4)]===0x1;}async[_0x12bf66(0x160)](_0x366e00,_0x534df9,_0x4f989f,_0x82dc8b){const _0x235212=_0x12bf66,_0x11eee7={'memberId':(await this['_sessionService'][_0x235212(0x1a9)](_0x366e00))[_0x235212(0x157)](),'threadId':_0x4f989f,'replyId':_0x82dc8b,'unitId':_0x366e00},_0x5a4336=await this['_httpService'][_0x235212(0x135)](_0x235212(0x16f)+_0x366e00+_0x235212(0x19e),{'body':_0x11eee7});return!_0x5a4336[_0x235212(0x19f)][_0x235212(0x16e)]||_0x5a4336['body'][_0x235212(0x16e)]['code']===0x1;}async[_0x12bf66(0x1b4)](_0x57f157,_0x4ebcf6,_0x29c1a5){const _0x32fa50=_0x12bf66,_0x547516={'unitId':_0x57f157,'threadId':_0x29c1a5},_0x3ba732=await this['_httpService']['post'](_0x32fa50(0x16f)+_0x57f157+_0x32fa50(0x1ae),{'body':_0x547516}),_0x24fdbf=_0x29c1a5[_0x32fa50(0x1b5)](_0x443a72=>_0x402477(_0x3ba732[_0x32fa50(0x19f)][_0x32fa50(0x13d)][_0x443a72],_0x57f157,_0x4ebcf6))[_0x32fa50(0x182)](Boolean);return Object['values'](_0x3ba732[_0x32fa50(0x19f)][_0x32fa50(0x1a2)])[_0x32fa50(0x18a)](_0x3c00f2=>{const _0xaa62ba=_0x32fa50;this[_0xaa62ba(0x14c)][_0xaa62ba(0x19a)](_0x3c00f2);}),_0x24fdbf;}['saveCommentToSnapshot'](_0x3638a5){const _0x359352=_0x12bf66;return{'id':_0x3638a5['id'],'threadId':_0x3638a5[_0x359352(0x14e)],'ref':_0x3638a5[_0x359352(0x131)]};}};_0x348eb6=_0x22b60b([_0x52af3b(0x0,_0x3024df[_0x12bf66(0x194)](_0x763b7b[_0x12bf66(0x163)])),_0x52af3b(0x1,_0x3024df['Inject'](_0x3024df[_0x12bf66(0x1a5)])),_0x52af3b(0x2,_0x3024df[_0x12bf66(0x194)](_0x48fe52[_0x12bf66(0x18d)]))],_0x348eb6);var _0x1645ed=Object[_0x12bf66(0x168)],_0x1033e9=(_0x2fcf66,_0x55d415,_0x33a88f,_0x6ff5ac)=>{const _0x953a77=_0x12bf66;for(var _0x24febc=_0x6ff5ac>0x1?void 0x0:_0x6ff5ac?_0x1645ed(_0x55d415,_0x33a88f):_0x55d415,_0x1a5c0c=_0x2fcf66[_0x953a77(0x198)]-0x1,_0x36f3d1;_0x1a5c0c>=0x0;_0x1a5c0c--)(_0x36f3d1=_0x2fcf66[_0x1a5c0c])&&(_0x24febc=_0x36f3d1(_0x24febc)||_0x24febc);return _0x24febc;},_0x1a8f21=(_0x110021,_0x169e01)=>(_0x2581c4,_0x52ee93)=>_0x169e01(_0x2581c4,_0x52ee93,_0x110021);let _0x11419e=class extends _0x3024df[_0x12bf66(0x162)]{constructor(_0x460ba1,_0x37882b){const _0x333ef3=_0x12bf66;super(),this[_0x333ef3(0x175)]=_0x460ba1,this[_0x333ef3(0x16c)]=_0x37882b,this[_0x333ef3(0x19b)]();}['_initDataSource'](){const _0x147a71=_0x12bf66;this['_threadCommentDataSourceService']['dataSource']=this[_0x147a71(0x16c)],this[_0x147a71(0x175)][_0x147a71(0x174)]=!0x1;}};_0x11419e=_0x1033e9([_0x1a8f21(0x0,_0x11ef9d[_0x12bf66(0x13c)]),_0x1a8f21(0x1,_0x3024df[_0x12bf66(0x194)](_0x348eb6))],_0x11419e);var _0x4d7d74=Object[_0x12bf66(0x16b)],_0x12ba43=Object[_0x12bf66(0x168)],_0x599236=(_0x490713,_0x42da5e,_0x14fb01)=>_0x42da5e in _0x490713?_0x4d7d74(_0x490713,_0x42da5e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x14fb01}):_0x490713[_0x42da5e]=_0x14fb01,_0xc8363b=(_0x5cf7b5,_0x3256c4,_0x342aa5,_0xf15eb2)=>{const _0x10f521=_0x12bf66;for(var _0x227175=_0xf15eb2>0x1?void 0x0:_0xf15eb2?_0x12ba43(_0x3256c4,_0x342aa5):_0x3256c4,_0x35eb59=_0x5cf7b5[_0x10f521(0x198)]-0x1,_0x21ddc1;_0x35eb59>=0x0;_0x35eb59--)(_0x21ddc1=_0x5cf7b5[_0x35eb59])&&(_0x227175=_0x21ddc1(_0x227175)||_0x227175);return _0x227175;},_0x551762=(_0x5665d8,_0xa1c277)=>(_0x38b806,_0x3c0a3f)=>_0xa1c277(_0x38b806,_0x3c0a3f,_0x5665d8),_0x341a07=(_0x1fe193,_0x26dfb3,_0xc77204)=>_0x599236(_0x1fe193,typeof _0x26dfb3!=_0x12bf66(0x146)?_0x26dfb3+'':_0x26dfb3,_0xc77204);_0x2501e2['UniverThreadCommentDataSourcePlugin']=class extends _0x3024df[_0x12bf66(0x1a7)]{constructor(_0x73eb19=_0x8c09de,_0x940a7,_0x508c80){const _0x5a6e1c=_0x12bf66;super(),this[_0x5a6e1c(0x15c)]=_0x73eb19,this['_injector']=_0x940a7,this[_0x5a6e1c(0x17d)]=_0x508c80;const {..._0x2c0397}=_0x3024df[_0x5a6e1c(0x143)]({},_0x8c09de,this[_0x5a6e1c(0x15c)]);this['_configService'][_0x5a6e1c(0x164)](_0x3abbb1,_0x2c0397);}[_0x12bf66(0x1aa)](){const _0xda12ba=_0x12bf66;[[_0x348eb6],[_0x11419e],[_0x50e535]][_0xda12ba(0x18a)](_0x2e354e=>{const _0x99a5de=_0xda12ba;this[_0x99a5de(0x1b8)][_0x99a5de(0x151)](_0x2e354e);});}[_0x12bf66(0x155)](){this['_injector']['get'](_0x11419e),this['_injector']['get'](_0x50e535);}},_0x341a07(_0x2501e2[_0x12bf66(0x1a6)],'pluginName',_0xe8f509),_0x341a07(_0x2501e2[_0x12bf66(0x1a6)],_0x12bf66(0x13a),_0x3024df[_0x12bf66(0x173)]['UNIVER_UNKNOWN']),_0x2501e2[_0x12bf66(0x1a6)]=_0xc8363b([_0x3024df[_0x12bf66(0x1a0)](_0x51d56a[_0x12bf66(0x142)],_0x48fe52[_0x12bf66(0x170)],_0xc7431b[_0x12bf66(0x169)]),_0x551762(0x1,_0x3024df[_0x12bf66(0x194)](_0x3024df['Injector'])),_0x551762(0x2,_0x3024df['IConfigService'])],_0x2501e2['UniverThreadCommentDataSourcePlugin']),Object['defineProperty'](_0x2501e2,Symbol[_0x12bf66(0x176)],{'value':_0x12bf66(0x188)});}));function _0x5e75(){const _0x258c37=['error','/universer-api/comment/unit/','UniverCollaborationClientPlugin','COMMENT','rangeId','UniverInstanceType','syncUpdateMutationToColla','_threadCommentDataSourceService','toStringTag','parse','stringify','UniverProThreadCommentDatasource','ThreadCommentModel','3553hXvQgT','Add','_configService','delete','25390iRaBHZ','function','64JjdpHr','filter','get','amd','@univerjs-pro/collaboration-client','getCurrentUser','UniverThreadComment','Module','payload','forEach','Solved','getUnit','CollaborationSessionService','resolved','exports','replyId','UniverCore','_init','replies','Inject','solved','userID','41553cKDHcY','length','UniverProCollaborationClient','addUser','_initDataSource','parentId','8WHKFer','/delete','body','DependentOn','thread-comment-data-source.config','users','format','code','UserManagerService','UniverThreadCommentDataSourcePlugin','Plugin','getUser','requireSession','onStarting','UniverNetwork','Unknown','CommentService','/list','515chMWKm','887635DOTWWk','@univerjs/network','360797ohzPyS','customRanges','listComments','map','pipe','_httpService','_injector','find','subscribe','addComment','ref','rangeType','bufferTime','Injector','post','_initUserSync','@univerjs/thread-comment-ui','personId','7482PhXANn','type','userId','IThreadCommentDataSourceService','comments','_sessionService','342556dPzmbd','Edit','updateComment','UniverThreadCommentUIPlugin','merge','reply','@univerjs/thread-comment','symbol','UniverProLicense','OpenOrReOpen','Reply','_threadCommentModel','object','_userService','30444CCrtOf','threadId','getComment','Solve','add','commentUpdate$','unitId','root','onReady','comment','getMemberID','CustomRangeType','createTimestamp','user','UNRECOGNIZED','_config','resolveComment','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','disposeWithMe','deleteComment','/edit','Disposable','HTTPService','setConfig','_commentService','/add','dayjs','getOwnPropertyDescriptor','UniverLicensePlugin','Delete','defineProperty','_threadCommentDataSource','/universer-api/user/list'];_0x5e75=function(){return _0x258c37;};return _0x5e75();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.12.2-nightly.202511241159",
3
+ "version": "0.12.2-nightly.202511290732",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,19 +45,19 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.12.2-nightly.202511241159",
49
- "@univerjs/network": "0.12.2-nightly.202511241159",
50
- "@univerjs-pro/license": "0.12.2-nightly.202511241159",
48
+ "@univerjs-pro/collaboration-client": "0.12.2-nightly.202511290732",
49
+ "@univerjs-pro/license": "0.12.2-nightly.202511290732",
50
+ "@univerjs/core": "0.12.2-nightly.202511290732",
51
+ "@univerjs/network": "0.12.2-nightly.202511290732",
51
52
  "@univerjs/protocol": "0.1.47",
52
- "@univerjs/thread-comment": "0.12.2-nightly.202511241159",
53
- "@univerjs/core": "0.12.2-nightly.202511241159",
54
- "@univerjs/thread-comment-ui": "0.12.2-nightly.202511241159"
53
+ "@univerjs/thread-comment-ui": "0.12.2-nightly.202511290732",
54
+ "@univerjs/thread-comment": "0.12.2-nightly.202511290732"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",
58
58
  "typescript": "^5.9.3",
59
- "vite": "^7.2.2",
60
- "vitest": "^3.2.4",
59
+ "vite": "^7.2.4",
60
+ "vitest": "^4.0.14",
61
61
  "@univerjs-infra/shared": "0.12.2"
62
62
  },
63
63
  "scripts": {