@univerjs-pro/thread-comment-datasource 0.8.2-nightly.202506211606 → 0.8.2-nightly.202506221606

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 _0x3bf25e=_0x5c67;(function(_0x267152,_0xf4208b){const _0x4466d6=_0x5c67,_0x250c7e=_0x267152();while(!![]){try{const _0x4487e3=-parseInt(_0x4466d6(0x153))/0x1*(-parseInt(_0x4466d6(0x138))/0x2)+-parseInt(_0x4466d6(0x18d))/0x3*(parseInt(_0x4466d6(0x167))/0x4)+parseInt(_0x4466d6(0x174))/0x5*(-parseInt(_0x4466d6(0x131))/0x6)+parseInt(_0x4466d6(0x19a))/0x7*(parseInt(_0x4466d6(0x145))/0x8)+-parseInt(_0x4466d6(0x19f))/0x9*(parseInt(_0x4466d6(0x192))/0xa)+-parseInt(_0x4466d6(0x1a9))/0xb+parseInt(_0x4466d6(0x1a0))/0xc;if(_0x4487e3===_0xf4208b)break;else _0x250c7e['push'](_0x250c7e['shift']());}catch(_0x2770fa){_0x250c7e['push'](_0x250c7e['shift']());}}}(_0x24fb,0x28319));Object['defineProperty'](exports,Symbol[_0x3bf25e(0x14a)],{'value':'Module'});const b=require(_0x3bf25e(0x184)),T=require(_0x3bf25e(0x132)),c=require(_0x3bf25e(0x135)),j=require(_0x3bf25e(0x178)),M=require(_0x3bf25e(0x16d)),w=require('rxjs'),P=require(_0x3bf25e(0x1a1)),U=_0x3bf25e(0x18e);var I=(_0x280307=>(_0x280307[_0x280307['OpenOrReOpen']=0x0]='OpenOrReOpen',_0x280307[_0x280307[_0x3bf25e(0x191)]=0x1]=_0x3bf25e(0x191),_0x280307[_0x280307[_0x3bf25e(0x168)]=-0x1]='UNRECOGNIZED',_0x280307))(I||{}),v=(_0x338102=>(_0x338102[_0x338102['Unknown']=0x0]=_0x3bf25e(0x17d),_0x338102[_0x338102[_0x3bf25e(0x13a)]=0x1]=_0x3bf25e(0x13a),_0x338102[_0x338102[_0x3bf25e(0x1a5)]=0x2]=_0x3bf25e(0x1a5),_0x338102[_0x338102[_0x3bf25e(0x17a)]=0x3]=_0x3bf25e(0x17a),_0x338102[_0x338102['Delete']=0x4]=_0x3bf25e(0x176),_0x338102[_0x338102[_0x3bf25e(0x186)]=0x5]=_0x3bf25e(0x186),_0x338102[_0x338102[_0x3bf25e(0x168)]=-0x1]=_0x3bf25e(0x168),_0x338102))(v||{});const f=_0x48d326=>c[_0x3bf25e(0x172)](new Date(+_0x48d326))[_0x3bf25e(0x162)](_0x3bf25e(0x18b)),R=async(_0x47744c,_0x12f0f3)=>{const _0x5c6289=_0x3bf25e,_0x2cc22e=_0x47744c[_0x5c6289(0x180)](c[_0x5c6289(0x19b)]),_0x51ee80=_0x47744c[_0x5c6289(0x180)](P[_0x5c6289(0x161)]);_0x12f0f3[_0x5c6289(0x163)](_0x5caaba=>{const _0x163d05=_0x5c6289;_0x2cc22e['getUser'](_0x5caaba)&&_0x12f0f3[_0x163d05(0x144)](_0x5caaba);}),_0x12f0f3['size']&&(await _0x51ee80[_0x5c6289(0x180)](_0x5c6289(0x166),{'params':{'userIDs':[..._0x12f0f3]}}))[_0x5c6289(0x15a)][_0x5c6289(0x1a2)][_0x5c6289(0x163)](_0x32c2c1=>{_0x32c2c1&&_0x2cc22e['addUser'](_0x32c2c1);});};var $=Object[_0x3bf25e(0x15e)],E=(_0x5e67a9,_0x5320a7,_0x5c9eea,_0x2545e6)=>{const _0x468a41=_0x3bf25e;for(var _0x54108b=_0x2545e6>0x1?void 0x0:_0x2545e6?$(_0x5320a7,_0x5c9eea):_0x5320a7,_0x49c819=_0x5e67a9[_0x468a41(0x142)]-0x1,_0x23c5a6;_0x49c819>=0x0;_0x49c819--)(_0x23c5a6=_0x5e67a9[_0x49c819])&&(_0x54108b=_0x23c5a6(_0x54108b)||_0x54108b);return _0x54108b;},S=(_0x4e6d31,_0x5a3730)=>(_0x25aca1,_0x58fa95)=>_0x5a3730(_0x25aca1,_0x58fa95,_0x4e6d31);function _0x5c67(_0xd11aa8,_0x400055){const _0x24fb39=_0x24fb();return _0x5c67=function(_0x5c67b9,_0x264110){_0x5c67b9=_0x5c67b9-0x12e;let _0x2373f9=_0x24fb39[_0x5c67b9];return _0x2373f9;},_0x5c67(_0xd11aa8,_0x400055);}let p=class extends c['Disposable']{constructor(_0x30f0e2,_0x3652c4,_0x25e8fe,_0x1b20e3){const _0x49869c=_0x3bf25e;super(),this[_0x49869c(0x151)]=_0x30f0e2,this[_0x49869c(0x140)]=_0x3652c4,this[_0x49869c(0x17f)]=_0x25e8fe,this[_0x49869c(0x170)]=_0x1b20e3,this[_0x49869c(0x164)](),this[_0x49869c(0x157)]();}[_0x3bf25e(0x157)](){const _0x3573c5=_0x3bf25e;this[_0x3573c5(0x160)](this['_threadCommentModel'][_0x3573c5(0x171)][_0x3573c5(0x18f)](w['bufferTime'](0x10))[_0x3573c5(0x199)](_0x546150=>{const _0x3e630c=_0x3573c5,_0x4c23fe=new Set();_0x546150['forEach'](_0x2de20f=>{const _0x52cc4e=_0x5c67;switch(_0x2de20f['type']){case'add':{const _0xe42792=_0x2de20f['payload'][_0x52cc4e(0x152)];_0x4c23fe[_0x52cc4e(0x19d)](_0xe42792);break;}}}),R(this[_0x3e630c(0x170)],_0x4c23fe);}));}[_0x3bf25e(0x164)](){const _0x1a5013=_0x3bf25e;this[_0x1a5013(0x160)](this['_commentService'][_0x1a5013(0x171)][_0x1a5013(0x199)](async _0x5ec113=>{const _0xcfa657=_0x1a5013;var _0x16ae34,_0x58571e,_0x2ebe2b,_0x153051;const _0x269cda=(_0x16ae34=this[_0xcfa657(0x140)][_0xcfa657(0x14b)](_0x5ec113[_0xcfa657(0x13c)])[_0xcfa657(0x190)](_0x3a27ba=>_0x3a27ba['threadId']===_0x5ec113[_0xcfa657(0x158)]))==null?void 0x0:_0x16ae34['root'];if(!_0x269cda)return;const {unitId:_0x3f1429,subUnitId:_0x41246a}=_0x269cda;switch(_0x5ec113[_0xcfa657(0x182)]&&this[_0xcfa657(0x17f)]['addUser'](_0x5ec113['user']),_0x5ec113['type']){case v['Add']:break;case v[_0xcfa657(0x1a5)]:{this[_0xcfa657(0x140)][_0xcfa657(0x16b)](_0x3f1429,_0x41246a,{'unitId':_0x3f1429,'subUnitId':_0x41246a,'ref':'','id':_0x5ec113[_0xcfa657(0x1a7)],'dT':f(+_0x5ec113[_0xcfa657(0x136)]),'threadId':_0x5ec113[_0xcfa657(0x158)],'personId':(_0x2ebe2b=(_0x58571e=_0x5ec113[_0xcfa657(0x182)])==null?void 0x0:_0x58571e[_0xcfa657(0x169)])!=null?_0x2ebe2b:_0x5ec113[_0xcfa657(0x1a6)],'text':JSON[_0xcfa657(0x130)](_0x5ec113[_0xcfa657(0x16a)]),'parentId':_0x269cda['id']});break;}case v[_0xcfa657(0x176)]:{const _0x3fda88=this['_threadCommentModel'][_0xcfa657(0x179)](_0x3f1429,_0x41246a,_0x5ec113[_0xcfa657(0x1a7)]);_0x3fda88&&_0x3fda88[_0xcfa657(0x165)]&&this[_0xcfa657(0x140)][_0xcfa657(0x137)](_0x3f1429,_0x41246a,_0x5ec113[_0xcfa657(0x1a7)]);break;}case v['Edit']:{this[_0xcfa657(0x140)][_0xcfa657(0x147)](_0x3f1429,_0x41246a,{'commentId':_0x5ec113[_0xcfa657(0x1a7)],'text':JSON[_0xcfa657(0x130)](_0x5ec113[_0xcfa657(0x16a)])});break;}case v[_0xcfa657(0x186)]:{const _0x46dbb6=(_0x153051=this['_threadCommentModel'][_0xcfa657(0x14b)](_0x5ec113[_0xcfa657(0x13c)])[_0xcfa657(0x190)](_0x98fe46=>_0x98fe46[_0xcfa657(0x158)]===_0x5ec113['threadId']))==null?void 0x0:_0x153051['root'];_0x46dbb6&&this[_0xcfa657(0x140)][_0xcfa657(0x198)](_0x3f1429,_0x41246a,_0x46dbb6['id'],_0x5ec113[_0xcfa657(0x14f)]===I['Solved']);break;}}}));}};p=E([S(0x0,c['Inject'](b[_0x3bf25e(0x175)])),S(0x1,c['Inject'](M[_0x3bf25e(0x187)])),S(0x2,c[_0x3bf25e(0x19c)](c['UserManagerService'])),S(0x3,c[_0x3bf25e(0x19c)](c['Injector']))],p);const q='thread-comment-data-source.config',D={};var A=Object[_0x3bf25e(0x15e)],x=(_0x5bca26,_0xb182bf,_0x3f4a19,_0x54a86d)=>{for(var _0x1a5001=_0x54a86d>0x1?void 0x0:_0x54a86d?A(_0xb182bf,_0x3f4a19):_0xb182bf,_0x1785ff=_0x5bca26['length']-0x1,_0x56025a;_0x1785ff>=0x0;_0x1785ff--)(_0x56025a=_0x5bca26[_0x1785ff])&&(_0x1a5001=_0x56025a(_0x1a5001)||_0x1a5001);return _0x1a5001;},_=(_0x173627,_0x141e58)=>(_0x61ccab,_0x10cc2e)=>_0x141e58(_0x61ccab,_0x10cc2e,_0x173627);function Y(_0x411883,_0x11f724){const _0x3e6aeb=_0x3bf25e,_0x314851=_0x411883[_0x3e6aeb(0x12e)][0x0];return{..._0x11f724,'id':_0x314851[_0x3e6aeb(0x1a7)],'resolved':_0x411883['solved']===0x1,'dT':f(_0x314851[_0x3e6aeb(0x136)]),'personId':_0x314851['userId'],'threadId':_0x314851[_0x3e6aeb(0x158)]};}function _0x24fb(){const _0x509f5e=['rangeType','map','stringify','getOwnPropertyDescriptor','error','disposeWithMe','HTTPService','format','forEach','_init','parentId','/universer-api/user/list','1148QKlelV','UNRECOGNIZED','userID','content','addComment','Injector','@univerjs/thread-comment','addUser','Plugin','_injector','commentUpdate$','dayjs','syncUpdateMutationToColla','115FxKzsc','CommentService','Delete','merge','@univerjs/thread-comment-ui','getComment','Edit','_config','Disposable','Unknown','listComments','_userService','get','defineProperty','user','filter','@univerjs-pro/collaboration-client','onStarting','Solve','ThreadCommentModel','customRanges','type','rangeId','YYYY/MM/DD\x20HH:mm','/list','2517mHVGTK','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','pipe','find','Solved','25460WhWCKi','_initDataSource','setConfig','UniverLicensePlugin','comment','/edit','resolveComment','subscribe','7paBQUN','UserManagerService','Inject','add','getCurrentUser','747BoIPPZ','9666948qrzIQB','@univerjs/network','users','saveCommentToSnapshot','post','Reply','userId','replyId','COMMENT','1553915tqlthu','replies','resolved','parse','64704PMGJTU','@univerjs-pro/license','UniverThreadCommentDataSourcePlugin','/reply','@univerjs/core','createTimestamp','deleteComment','74nMQhnw','UniverCollaborationClientPlugin','Add','_sessionService','unitId','symbol','getMemberID','_threadCommentDataSourceService','_threadCommentModel','/delete','length','reply','delete','312248CoaBLz','CustomRangeType','updateComment','OpenOrReOpen','_httpService','toStringTag','getUnit','requireSession','IThreadCommentDataSourceService','UniverThreadCommentUIPlugin','solved','code','_commentService','personId','4363sKbshC','/universer-api/comment/unit/','_configService','_threadCommentDataSource','_initUserSync','threadId','onReady','body'];_0x24fb=function(){return _0x509f5e;};return _0x24fb();}function G(_0x436b7c,_0x268801,_0x1e43bd){const _0x2ddf23=_0x3bf25e;var _0x121f46,_0x49a39d;if(((_0x49a39d=(_0x121f46=_0x436b7c==null?void 0x0:_0x436b7c[_0x2ddf23(0x12e)])==null?void 0x0:_0x121f46['length'])!=null?_0x49a39d:0x0)>0x0){const _0x3daf82=(_0x28b67d,_0x4d820b)=>({'id':_0x28b67d[_0x2ddf23(0x1a7)],'threadId':_0x28b67d[_0x2ddf23(0x158)],'dT':f(_0x28b67d[_0x2ddf23(0x136)]),'personId':_0x28b67d['userId'],'resolved':_0x436b7c[_0x2ddf23(0x14f)]===I[_0x2ddf23(0x191)],'unitId':_0x268801,'subUnitId':_0x1e43bd,'text':JSON[_0x2ddf23(0x130)](_0x28b67d['content']),'parentId':_0x4d820b}),_0x25e087=_0x3daf82(_0x436b7c[_0x2ddf23(0x12e)][0x0]);return{..._0x25e087,'children':_0x436b7c[_0x2ddf23(0x12e)]['slice'](0x1)['map'](_0x46e213=>_0x3daf82(_0x46e213,_0x25e087['id']))};}return null;}let g=class{constructor(_0x276355,_0x25d78b,_0x2ad046,_0x5846ae){const _0x4bc268=_0x3bf25e;this[_0x4bc268(0x149)]=_0x276355,this[_0x4bc268(0x17f)]=_0x25d78b,this[_0x4bc268(0x13b)]=_0x2ad046,this[_0x4bc268(0x170)]=_0x5846ae;}async[_0x3bf25e(0x16b)](_0x382331){const _0x46aa9c=_0x3bf25e;var _0x415bf0,_0x2005f7;const {parentId:_0x1f401d,unitId:_0x27db01,text:_0x55b9b0,threadId:_0x1f0d8}=_0x382331,_0x907831=(_0x2005f7=(_0x415bf0=_0x55b9b0[_0x46aa9c(0x188)])==null?void 0x0:_0x415bf0[_0x46aa9c(0x183)](_0x29303e=>_0x29303e[_0x46aa9c(0x15b)]===c[_0x46aa9c(0x146)][_0x46aa9c(0x1a8)])[_0x46aa9c(0x15c)](_0x2dff65=>_0x2dff65['rangeId']))!=null?_0x2005f7:[],_0x3f32bd=JSON['stringify'](_0x55b9b0),_0x3fa0e5=(await this[_0x46aa9c(0x13b)][_0x46aa9c(0x14c)](_0x27db01))[_0x46aa9c(0x13e)]();if(_0x1f401d){const _0x9be5b3={'memberId':_0x3fa0e5,'unitId':_0x27db01,'content':_0x3f32bd,'mention':_0x907831,'threadId':_0x1f0d8},_0x5f00af=(await this['_httpService'][_0x46aa9c(0x1a4)]('/universer-api/comment/unit/'+_0x27db01+_0x46aa9c(0x134),{'body':_0x9be5b3}))['body'][_0x46aa9c(0x143)];return{..._0x382331,'id':_0x5f00af[_0x46aa9c(0x1a7)],'dT':c[_0x46aa9c(0x172)](+_0x5f00af[_0x46aa9c(0x136)])['format'](_0x46aa9c(0x18b)),'personId':_0x5f00af[_0x46aa9c(0x1a6)]};}else{const _0x11c9d0={'memberId':_0x3fa0e5,'unitId':_0x27db01,'content':_0x3f32bd,'mention':_0x907831},_0xa7287a=await this[_0x46aa9c(0x149)][_0x46aa9c(0x1a4)](_0x46aa9c(0x154)+_0x27db01+'/add',{'body':_0x11c9d0});return Y(_0xa7287a['body'][_0x46aa9c(0x196)],_0x382331);}}async[_0x3bf25e(0x147)](_0x1aa673){const _0x113e8c=_0x3bf25e;var _0x1dfe8e,_0x2b236f;const {text:_0x2381ad,unitId:_0xd15359}=_0x1aa673,_0x34223c=(_0x2b236f=(_0x1dfe8e=_0x2381ad[_0x113e8c(0x188)])==null?void 0x0:_0x1dfe8e[_0x113e8c(0x183)](_0x4e99ca=>_0x4e99ca[_0x113e8c(0x15b)]===c['CustomRangeType'][_0x113e8c(0x1a8)])[_0x113e8c(0x15c)](_0x49963e=>_0x49963e[_0x113e8c(0x18a)]))!=null?_0x2b236f:[],_0x48ccd6=JSON[_0x113e8c(0x15d)](_0x2381ad),_0x2291d3=_0x1aa673[_0x113e8c(0x158)],_0x525a8f=_0x1aa673['id'],_0x288095={'memberId':(await this['_sessionService'][_0x113e8c(0x14c)](_0xd15359))[_0x113e8c(0x13e)](),'unitId':_0xd15359,'threadId':_0x2291d3,'mention':_0x34223c,'content':_0x48ccd6,'replyId':_0x525a8f},_0x3fab98=await this[_0x113e8c(0x149)][_0x113e8c(0x1a4)](_0x113e8c(0x154)+_0xd15359+_0x113e8c(0x197),{'body':_0x288095});return!_0x3fab98[_0x113e8c(0x15a)][_0x113e8c(0x15f)]||_0x3fab98[_0x113e8c(0x15a)][_0x113e8c(0x15f)][_0x113e8c(0x150)]===0x1;}async['resolveComment'](_0x263d00){const _0x36c82f=_0x3bf25e,{unitId:_0x28e0d1}=_0x263d00,_0x28dbe4=_0x263d00[_0x36c82f(0x158)],_0x123929={'memberId':this['_userService'][_0x36c82f(0x19e)]()[_0x36c82f(0x169)],'unitId':_0x28e0d1,'threadId':_0x28dbe4,'solved':_0x263d00[_0x36c82f(0x12f)]?I[_0x36c82f(0x191)]:I[_0x36c82f(0x148)]},_0x52c08c=await this[_0x36c82f(0x149)][_0x36c82f(0x1a4)](_0x36c82f(0x154)+_0x28e0d1+'/solved',{'body':_0x123929});return!_0x52c08c[_0x36c82f(0x15a)][_0x36c82f(0x15f)]||_0x52c08c[_0x36c82f(0x15a)][_0x36c82f(0x15f)]['code']===0x1;}async[_0x3bf25e(0x137)](_0x7895c8,_0xe8769e,_0x1bd0ad,_0x9fd722){const _0x2a344d=_0x3bf25e,_0x5a369c={'memberId':(await this[_0x2a344d(0x13b)][_0x2a344d(0x14c)](_0x7895c8))[_0x2a344d(0x13e)](),'threadId':_0x1bd0ad,'replyId':_0x9fd722,'unitId':_0x7895c8},_0x31bf25=await this[_0x2a344d(0x149)][_0x2a344d(0x1a4)](_0x2a344d(0x154)+_0x7895c8+_0x2a344d(0x141),{'body':_0x5a369c});return!_0x31bf25[_0x2a344d(0x15a)]['error']||_0x31bf25[_0x2a344d(0x15a)][_0x2a344d(0x15f)][_0x2a344d(0x150)]===0x1;}async[_0x3bf25e(0x17e)](_0x375f38,_0x3b32b0,_0x538461){const _0x5824fb=_0x3bf25e,_0x17e838={'unitId':_0x375f38,'threadId':_0x538461},_0x51400a=await this[_0x5824fb(0x149)]['post'](_0x5824fb(0x154)+_0x375f38+_0x5824fb(0x18c),{'body':_0x17e838}),_0x41adaa=_0x538461[_0x5824fb(0x15c)](_0x1117d9=>G(_0x51400a[_0x5824fb(0x15a)]['comments'][_0x1117d9],_0x375f38,_0x3b32b0))[_0x5824fb(0x183)](Boolean);return Object['values'](_0x51400a[_0x5824fb(0x15a)][_0x5824fb(0x1a2)])[_0x5824fb(0x163)](_0x2a57f5=>{const _0x5369bd=_0x5824fb;this[_0x5369bd(0x17f)][_0x5369bd(0x16e)](_0x2a57f5);}),_0x41adaa;}[_0x3bf25e(0x1a3)](_0x40bf1f){const _0x13b6a1=_0x3bf25e;return{'id':_0x40bf1f['id'],'threadId':_0x40bf1f[_0x13b6a1(0x158)],'ref':_0x40bf1f['ref']};}};g=x([_(0x0,c[_0x3bf25e(0x19c)](P[_0x3bf25e(0x161)])),_(0x1,c[_0x3bf25e(0x19c)](c[_0x3bf25e(0x19b)])),_(0x2,c[_0x3bf25e(0x19c)](b['CollaborationSessionService'])),_(0x3,c[_0x3bf25e(0x19c)](c[_0x3bf25e(0x16c)]))],g);var H=Object[_0x3bf25e(0x15e)],J=(_0x4d42d0,_0x4eb81e,_0x290d3d,_0x5ac192)=>{for(var _0x468788=_0x5ac192>0x1?void 0x0:_0x5ac192?H(_0x4eb81e,_0x290d3d):_0x4eb81e,_0x9aa0f7=_0x4d42d0['length']-0x1,_0x352bd7;_0x9aa0f7>=0x0;_0x9aa0f7--)(_0x352bd7=_0x4d42d0[_0x9aa0f7])&&(_0x468788=_0x352bd7(_0x468788)||_0x468788);return _0x468788;},y=(_0x165c82,_0x356189)=>(_0x51e67a,_0x1cbf87)=>_0x356189(_0x51e67a,_0x1cbf87,_0x165c82);let C=class extends c[_0x3bf25e(0x17c)]{constructor(_0x3183c3,_0x3bb750){const _0x4f5fb6=_0x3bf25e;super(),this[_0x4f5fb6(0x13f)]=_0x3183c3,this[_0x4f5fb6(0x156)]=_0x3bb750,this[_0x4f5fb6(0x193)]();}[_0x3bf25e(0x193)](){const _0x57f5c5=_0x3bf25e;this[_0x57f5c5(0x13f)]['dataSource']=this[_0x57f5c5(0x156)],this[_0x57f5c5(0x13f)][_0x57f5c5(0x173)]=!0x1;}};C=J([y(0x0,M[_0x3bf25e(0x14d)]),y(0x1,c[_0x3bf25e(0x19c)](g))],C);var F=Object[_0x3bf25e(0x181)],L=Object[_0x3bf25e(0x15e)],Z=(_0x30260e,_0x1b49cc,_0x326d35)=>_0x1b49cc in _0x30260e?F(_0x30260e,_0x1b49cc,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x326d35}):_0x30260e[_0x1b49cc]=_0x326d35,W=(_0xd250a4,_0x7e8726,_0x21da90,_0x587d7f)=>{const _0xa18c99=_0x3bf25e;for(var _0x599a5a=_0x587d7f>0x1?void 0x0:_0x587d7f?L(_0x7e8726,_0x21da90):_0x7e8726,_0x379ec5=_0xd250a4[_0xa18c99(0x142)]-0x1,_0x17dc30;_0x379ec5>=0x0;_0x379ec5--)(_0x17dc30=_0xd250a4[_0x379ec5])&&(_0x599a5a=_0x17dc30(_0x599a5a)||_0x599a5a);return _0x599a5a;},O=(_0x21b0c2,_0x3deebe)=>(_0x39f10f,_0xa3d1f9)=>_0x3deebe(_0x39f10f,_0xa3d1f9,_0x21b0c2),N=(_0x586f3b,_0x142c1d,_0x8d5f8a)=>Z(_0x586f3b,typeof _0x142c1d!=_0x3bf25e(0x13d)?_0x142c1d+'':_0x142c1d,_0x8d5f8a);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x3bf25e(0x16f)]{constructor(_0x3cfdb7=D,_0x52d8c7,_0x48ca37){const _0x56e599=_0x3bf25e;super(),this[_0x56e599(0x17b)]=_0x3cfdb7,this[_0x56e599(0x170)]=_0x52d8c7,this[_0x56e599(0x155)]=_0x48ca37;const {..._0x41c364}=c[_0x56e599(0x177)]({},D,this[_0x56e599(0x17b)]);this[_0x56e599(0x155)][_0x56e599(0x194)](q,_0x41c364);}[_0x3bf25e(0x185)](){const _0x45ad5e=_0x3bf25e;[[g],[C],[p]][_0x45ad5e(0x163)](_0x3989e6=>{const _0x3fa83c=_0x45ad5e;this[_0x3fa83c(0x170)]['add'](_0x3989e6);});}[_0x3bf25e(0x159)](){const _0x2f915d=_0x3bf25e;this[_0x2f915d(0x170)]['get'](C),this[_0x2f915d(0x170)]['get'](p);}},N(exports[_0x3bf25e(0x133)],'pluginName',U),N(exports[_0x3bf25e(0x133)],_0x3bf25e(0x189),c['UniverInstanceType']['UNIVER_UNKNOWN']),exports[_0x3bf25e(0x133)]=W([c['DependentOn'](j[_0x3bf25e(0x14e)],b[_0x3bf25e(0x139)],T[_0x3bf25e(0x195)]),O(0x1,c[_0x3bf25e(0x19c)](c[_0x3bf25e(0x16c)])),O(0x2,c['IConfigService'])],exports[_0x3bf25e(0x133)]);
1
+ 'use strict';const _0x162eb9=_0xb27c;(function(_0x3f9a5b,_0x57a80b){const _0x48b26=_0xb27c,_0x2fe473=_0x3f9a5b();while(!![]){try{const _0x45617e=parseInt(_0x48b26(0x1f0))/0x1+parseInt(_0x48b26(0x218))/0x2*(parseInt(_0x48b26(0x1d9))/0x3)+parseInt(_0x48b26(0x1c4))/0x4+-parseInt(_0x48b26(0x1b5))/0x5+-parseInt(_0x48b26(0x1e1))/0x6*(parseInt(_0x48b26(0x1c1))/0x7)+parseInt(_0x48b26(0x216))/0x8*(-parseInt(_0x48b26(0x1ea))/0x9)+-parseInt(_0x48b26(0x1fe))/0xa*(-parseInt(_0x48b26(0x208))/0xb);if(_0x45617e===_0x57a80b)break;else _0x2fe473['push'](_0x2fe473['shift']());}catch(_0x51e56e){_0x2fe473['push'](_0x2fe473['shift']());}}}(_0x2dc9,0xb12db));Object[_0x162eb9(0x1d8)](exports,Symbol[_0x162eb9(0x1e0)],{'value':'Module'});const b=require(_0x162eb9(0x1c0)),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),j=require(_0x162eb9(0x1dd)),M=require(_0x162eb9(0x1d6)),w=require(_0x162eb9(0x219)),P=require(_0x162eb9(0x213)),U=_0x162eb9(0x21e);var I=(_0x1cada9=>(_0x1cada9[_0x1cada9['OpenOrReOpen']=0x0]=_0x162eb9(0x1af),_0x1cada9[_0x1cada9[_0x162eb9(0x1ff)]=0x1]='Solved',_0x1cada9[_0x1cada9[_0x162eb9(0x227)]=-0x1]=_0x162eb9(0x227),_0x1cada9))(I||{}),v=(_0x3899b4=>(_0x3899b4[_0x3899b4['Unknown']=0x0]='Unknown',_0x3899b4[_0x3899b4[_0x162eb9(0x203)]=0x1]=_0x162eb9(0x203),_0x3899b4[_0x3899b4[_0x162eb9(0x1e3)]=0x2]=_0x162eb9(0x1e3),_0x3899b4[_0x3899b4[_0x162eb9(0x201)]=0x3]=_0x162eb9(0x201),_0x3899b4[_0x3899b4[_0x162eb9(0x1f5)]=0x4]=_0x162eb9(0x1f5),_0x3899b4[_0x3899b4[_0x162eb9(0x214)]=0x5]=_0x162eb9(0x214),_0x3899b4[_0x3899b4[_0x162eb9(0x227)]=-0x1]='UNRECOGNIZED',_0x3899b4))(v||{});const f=_0x3f21e3=>c[_0x162eb9(0x202)](new Date(+_0x3f21e3))[_0x162eb9(0x207)](_0x162eb9(0x1f4)),R=async(_0x4bad21,_0x4ea714)=>{const _0x21d627=_0x162eb9,_0x596e92=_0x4bad21[_0x21d627(0x1e5)](c['UserManagerService']),_0x3532f5=_0x4bad21[_0x21d627(0x1e5)](P[_0x21d627(0x22a)]);_0x4ea714[_0x21d627(0x1cf)](_0x4cf608=>{const _0x4c253c=_0x21d627;_0x596e92[_0x4c253c(0x1c2)](_0x4cf608)&&_0x4ea714[_0x4c253c(0x1f7)](_0x4cf608);}),_0x4ea714[_0x21d627(0x1d3)]&&(await _0x3532f5[_0x21d627(0x1e5)](_0x21d627(0x1dc),{'params':{'userIDs':[..._0x4ea714]}}))[_0x21d627(0x1e7)]['users'][_0x21d627(0x1cf)](_0x38ea50=>{const _0x527a50=_0x21d627;_0x38ea50&&_0x596e92[_0x527a50(0x212)](_0x38ea50);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x54b2a0,_0x19e131,_0x204ede,_0x276cb7)=>{const _0x134c14=_0x162eb9;for(var _0x593fae=_0x276cb7>0x1?void 0x0:_0x276cb7?$(_0x19e131,_0x204ede):_0x19e131,_0x51006c=_0x54b2a0[_0x134c14(0x1e6)]-0x1,_0x15f027;_0x51006c>=0x0;_0x51006c--)(_0x15f027=_0x54b2a0[_0x51006c])&&(_0x593fae=_0x15f027(_0x593fae)||_0x593fae);return _0x593fae;},S=(_0x3b2e5f,_0x5a36e8)=>(_0x2b8b43,_0x1f5fba)=>_0x5a36e8(_0x2b8b43,_0x1f5fba,_0x3b2e5f);let p=class extends c['Disposable']{constructor(_0x376913,_0x3a892c,_0x48dd25,_0x60bc67){const _0x55f9d1=_0x162eb9;super(),this[_0x55f9d1(0x1ca)]=_0x376913,this[_0x55f9d1(0x221)]=_0x3a892c,this[_0x55f9d1(0x20e)]=_0x48dd25,this['_injector']=_0x60bc67,this[_0x55f9d1(0x1c9)](),this['_initUserSync']();}[_0x162eb9(0x22d)](){const _0x36cd4f=_0x162eb9;this[_0x36cd4f(0x230)](this['_threadCommentModel'][_0x36cd4f(0x1d7)][_0x36cd4f(0x209)](w[_0x36cd4f(0x1ee)](0x10))[_0x36cd4f(0x1d0)](_0x3ba284=>{const _0x3d9adf=_0x36cd4f,_0x354a19=new Set();_0x3ba284[_0x3d9adf(0x1cf)](_0x265283=>{const _0x3a0ef8=_0x3d9adf;switch(_0x265283[_0x3a0ef8(0x1d4)]){case'add':{const _0x3a327e=_0x265283[_0x3a0ef8(0x21a)][_0x3a0ef8(0x1bb)];_0x354a19[_0x3a0ef8(0x1d5)](_0x3a327e);break;}}}),R(this[_0x3d9adf(0x1f3)],_0x354a19);}));}['_init'](){const _0x11e803=_0x162eb9;this['disposeWithMe'](this[_0x11e803(0x1ca)][_0x11e803(0x1d7)][_0x11e803(0x1d0)](async _0x5e1817=>{const _0x38e911=_0x11e803;var _0x254a6f,_0x21d02c,_0x58134c,_0x9e09b2;const _0x3dc013=(_0x254a6f=this[_0x38e911(0x221)][_0x38e911(0x205)](_0x5e1817[_0x38e911(0x1cb)])[_0x38e911(0x1b3)](_0x225638=>_0x225638[_0x38e911(0x1c5)]===_0x5e1817['threadId']))==null?void 0x0:_0x254a6f[_0x38e911(0x20b)];if(!_0x3dc013)return;const {unitId:_0x656dc2,subUnitId:_0x422dc0}=_0x3dc013;switch(_0x5e1817[_0x38e911(0x226)]&&this['_userService'][_0x38e911(0x212)](_0x5e1817[_0x38e911(0x226)]),_0x5e1817[_0x38e911(0x1d4)]){case v[_0x38e911(0x203)]:break;case v[_0x38e911(0x1e3)]:{this[_0x38e911(0x221)][_0x38e911(0x217)](_0x656dc2,_0x422dc0,{'unitId':_0x656dc2,'subUnitId':_0x422dc0,'ref':'','id':_0x5e1817['replyId'],'dT':f(+_0x5e1817[_0x38e911(0x21f)]),'threadId':_0x5e1817[_0x38e911(0x1c5)],'personId':(_0x58134c=(_0x21d02c=_0x5e1817['user'])==null?void 0x0:_0x21d02c[_0x38e911(0x1e9)])!=null?_0x58134c:_0x5e1817[_0x38e911(0x1ba)],'text':JSON[_0x38e911(0x21c)](_0x5e1817['content']),'parentId':_0x3dc013['id']});break;}case v[_0x38e911(0x1f5)]:{const _0x45e99d=this['_threadCommentModel'][_0x38e911(0x21b)](_0x656dc2,_0x422dc0,_0x5e1817[_0x38e911(0x1bf)]);_0x45e99d&&_0x45e99d[_0x38e911(0x229)]&&this[_0x38e911(0x221)][_0x38e911(0x1cd)](_0x656dc2,_0x422dc0,_0x5e1817[_0x38e911(0x1bf)]);break;}case v[_0x38e911(0x201)]:{this[_0x38e911(0x221)][_0x38e911(0x1ec)](_0x656dc2,_0x422dc0,{'commentId':_0x5e1817[_0x38e911(0x1bf)],'text':JSON[_0x38e911(0x21c)](_0x5e1817[_0x38e911(0x1f2)])});break;}case v[_0x38e911(0x214)]:{const _0x3b6665=(_0x9e09b2=this[_0x38e911(0x221)][_0x38e911(0x205)](_0x5e1817[_0x38e911(0x1cb)])[_0x38e911(0x1b3)](_0x3ffa62=>_0x3ffa62['threadId']===_0x5e1817[_0x38e911(0x1c5)]))==null?void 0x0:_0x9e09b2['root'];_0x3b6665&&this['_threadCommentModel'][_0x38e911(0x1ce)](_0x656dc2,_0x422dc0,_0x3b6665['id'],_0x5e1817['solved']===I[_0x38e911(0x1ff)]);break;}}}));}};p=E([S(0x0,c[_0x162eb9(0x233)](b[_0x162eb9(0x22b)])),S(0x1,c[_0x162eb9(0x233)](M[_0x162eb9(0x1e4)])),S(0x2,c[_0x162eb9(0x233)](c[_0x162eb9(0x1b7)])),S(0x3,c[_0x162eb9(0x233)](c[_0x162eb9(0x1bd)]))],p);const q=_0x162eb9(0x220),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x4421dd,_0x1c3c0e,_0x982fb2,_0x18c793)=>{for(var _0x4700da=_0x18c793>0x1?void 0x0:_0x18c793?A(_0x1c3c0e,_0x982fb2):_0x1c3c0e,_0x5eb10d=_0x4421dd['length']-0x1,_0x5ee110;_0x5eb10d>=0x0;_0x5eb10d--)(_0x5ee110=_0x4421dd[_0x5eb10d])&&(_0x4700da=_0x5ee110(_0x4700da)||_0x4700da);return _0x4700da;},_=(_0x4e4e40,_0x109778)=>(_0x13f806,_0x38267a)=>_0x109778(_0x13f806,_0x38267a,_0x4e4e40);function _0xb27c(_0x582743,_0x396fb9){const _0x2dc94b=_0x2dc9();return _0xb27c=function(_0xb27c8f,_0x30c95c){_0xb27c8f=_0xb27c8f-0x1af;let _0x5a8e5e=_0x2dc94b[_0xb27c8f];return _0x5a8e5e;},_0xb27c(_0x582743,_0x396fb9);}function Y(_0x470ebb,_0x13ced4){const _0x487bf8=_0x162eb9,_0x1ea5be=_0x470ebb[_0x487bf8(0x210)][0x0];return{..._0x13ced4,'id':_0x1ea5be[_0x487bf8(0x1bf)],'resolved':_0x470ebb[_0x487bf8(0x1cc)]===0x1,'dT':f(_0x1ea5be[_0x487bf8(0x21f)]),'personId':_0x1ea5be[_0x487bf8(0x1ba)],'threadId':_0x1ea5be['threadId']};}function G(_0x1690f5,_0x52e939,_0xc5f749){const _0x5c6b13=_0x162eb9;var _0x40c72f,_0xa1803f;if(((_0xa1803f=(_0x40c72f=_0x1690f5==null?void 0x0:_0x1690f5['replies'])==null?void 0x0:_0x40c72f['length'])!=null?_0xa1803f:0x0)>0x0){const _0x5487d1=(_0x4c53f4,_0x4db017)=>({'id':_0x4c53f4[_0x5c6b13(0x1bf)],'threadId':_0x4c53f4[_0x5c6b13(0x1c5)],'dT':f(_0x4c53f4[_0x5c6b13(0x21f)]),'personId':_0x4c53f4['userId'],'resolved':_0x1690f5[_0x5c6b13(0x1cc)]===I['Solved'],'unitId':_0x52e939,'subUnitId':_0xc5f749,'text':JSON[_0x5c6b13(0x21c)](_0x4c53f4[_0x5c6b13(0x1f2)]),'parentId':_0x4db017}),_0x1aca97=_0x5487d1(_0x1690f5[_0x5c6b13(0x210)][0x0]);return{..._0x1aca97,'children':_0x1690f5['replies'][_0x5c6b13(0x22c)](0x1)[_0x5c6b13(0x1b1)](_0x3bd74e=>_0x5487d1(_0x3bd74e,_0x1aca97['id']))};}return null;}let g=class{constructor(_0x15bc07,_0x56822d,_0x31e58e,_0x24e46d){const _0x4e7a80=_0x162eb9;this[_0x4e7a80(0x21d)]=_0x15bc07,this[_0x4e7a80(0x20e)]=_0x56822d,this[_0x4e7a80(0x1db)]=_0x31e58e,this[_0x4e7a80(0x1f3)]=_0x24e46d;}async[_0x162eb9(0x217)](_0x454a99){const _0xa48ba=_0x162eb9;var _0x584685,_0x21cdaf;const {parentId:_0x2fa19c,unitId:_0x308a01,text:_0x46591,threadId:_0x330325}=_0x454a99,_0x47d9f3=(_0x21cdaf=(_0x584685=_0x46591[_0xa48ba(0x1e8)])==null?void 0x0:_0x584685[_0xa48ba(0x206)](_0x375992=>_0x375992['rangeType']===c['CustomRangeType'][_0xa48ba(0x1ed)])[_0xa48ba(0x1b1)](_0x379e8d=>_0x379e8d[_0xa48ba(0x1b9)]))!=null?_0x21cdaf:[],_0x5b97fb=JSON[_0xa48ba(0x1fc)](_0x46591),_0x31d3df=(await this[_0xa48ba(0x1db)]['requireSession'](_0x308a01))['getMemberID']();if(_0x2fa19c){const _0x1ad7bd={'memberId':_0x31d3df,'unitId':_0x308a01,'content':_0x5b97fb,'mention':_0x47d9f3,'threadId':_0x330325},_0x5933bd=(await this[_0xa48ba(0x21d)]['post'](_0xa48ba(0x1f8)+_0x308a01+_0xa48ba(0x1c7),{'body':_0x1ad7bd}))['body'][_0xa48ba(0x222)];return{..._0x454a99,'id':_0x5933bd[_0xa48ba(0x1bf)],'dT':c[_0xa48ba(0x202)](+_0x5933bd[_0xa48ba(0x21f)])[_0xa48ba(0x207)](_0xa48ba(0x1f4)),'personId':_0x5933bd[_0xa48ba(0x1ba)]};}else{const _0x4b5e98={'memberId':_0x31d3df,'unitId':_0x308a01,'content':_0x5b97fb,'mention':_0x47d9f3},_0x117384=await this[_0xa48ba(0x21d)]['post'](_0xa48ba(0x1f8)+_0x308a01+_0xa48ba(0x1c3),{'body':_0x4b5e98});return Y(_0x117384[_0xa48ba(0x1e7)][_0xa48ba(0x1f6)],_0x454a99);}}async[_0x162eb9(0x1ec)](_0x521bfb){const _0x326652=_0x162eb9;var _0x5e90e7,_0x533bef;const {text:_0x5a7e4e,unitId:_0x385db7}=_0x521bfb,_0x46361c=(_0x533bef=(_0x5e90e7=_0x5a7e4e[_0x326652(0x1e8)])==null?void 0x0:_0x5e90e7[_0x326652(0x206)](_0x527d0e=>_0x527d0e[_0x326652(0x20f)]===c[_0x326652(0x22e)][_0x326652(0x1ed)])[_0x326652(0x1b1)](_0x438e3e=>_0x438e3e[_0x326652(0x1b9)]))!=null?_0x533bef:[],_0x3d7161=JSON['stringify'](_0x5a7e4e),_0x53ef3a=_0x521bfb[_0x326652(0x1c5)],_0x3518cc=_0x521bfb['id'],_0x267a5a={'memberId':(await this['_sessionService']['requireSession'](_0x385db7))[_0x326652(0x1b6)](),'unitId':_0x385db7,'threadId':_0x53ef3a,'mention':_0x46361c,'content':_0x3d7161,'replyId':_0x3518cc},_0x57cf15=await this[_0x326652(0x21d)][_0x326652(0x228)](_0x326652(0x1f8)+_0x385db7+_0x326652(0x223),{'body':_0x267a5a});return!_0x57cf15[_0x326652(0x1e7)][_0x326652(0x1f9)]||_0x57cf15[_0x326652(0x1e7)][_0x326652(0x1f9)][_0x326652(0x204)]===0x1;}async[_0x162eb9(0x1ce)](_0x2afab9){const _0x58bf08=_0x162eb9,{unitId:_0x18d7c4}=_0x2afab9,_0x4f605e=_0x2afab9[_0x58bf08(0x1c5)],_0x2d7e28={'memberId':this[_0x58bf08(0x20e)][_0x58bf08(0x1e2)]()[_0x58bf08(0x1e9)],'unitId':_0x18d7c4,'threadId':_0x4f605e,'solved':_0x2afab9['resolved']?I[_0x58bf08(0x1ff)]:I[_0x58bf08(0x1af)]},_0x151c01=await this[_0x58bf08(0x21d)]['post']('/universer-api/comment/unit/'+_0x18d7c4+_0x58bf08(0x231),{'body':_0x2d7e28});return!_0x151c01[_0x58bf08(0x1e7)][_0x58bf08(0x1f9)]||_0x151c01[_0x58bf08(0x1e7)]['error'][_0x58bf08(0x204)]===0x1;}async[_0x162eb9(0x1cd)](_0x4dc1e7,_0x302e03,_0x5c1cdc,_0xbe29c9){const _0x30dfc9=_0x162eb9,_0xcca846={'memberId':(await this[_0x30dfc9(0x1db)]['requireSession'](_0x4dc1e7))[_0x30dfc9(0x1b6)](),'threadId':_0x5c1cdc,'replyId':_0xbe29c9,'unitId':_0x4dc1e7},_0x55789b=await this['_httpService'][_0x30dfc9(0x228)](_0x30dfc9(0x1f8)+_0x4dc1e7+'/delete',{'body':_0xcca846});return!_0x55789b[_0x30dfc9(0x1e7)]['error']||_0x55789b['body']['error']['code']===0x1;}async['listComments'](_0x4991a2,_0x4a148e,_0x134b93){const _0x572acd=_0x162eb9,_0x22034d={'unitId':_0x4991a2,'threadId':_0x134b93},_0x8433e9=await this[_0x572acd(0x21d)][_0x572acd(0x228)](_0x572acd(0x1f8)+_0x4991a2+_0x572acd(0x211),{'body':_0x22034d}),_0x40f7c6=_0x134b93['map'](_0x2ab6c3=>G(_0x8433e9[_0x572acd(0x1e7)][_0x572acd(0x22f)][_0x2ab6c3],_0x4991a2,_0x4a148e))[_0x572acd(0x206)](Boolean);return Object[_0x572acd(0x1b8)](_0x8433e9['body'][_0x572acd(0x1fb)])['forEach'](_0x26c6dd=>{const _0x25bec8=_0x572acd;this['_userService'][_0x25bec8(0x212)](_0x26c6dd);}),_0x40f7c6;}[_0x162eb9(0x200)](_0x4aeac1){const _0x1b1ddb=_0x162eb9;return{'id':_0x4aeac1['id'],'threadId':_0x4aeac1[_0x1b1ddb(0x1c5)],'ref':_0x4aeac1[_0x1b1ddb(0x225)]};}};g=x([_(0x0,c[_0x162eb9(0x233)](P[_0x162eb9(0x22a)])),_(0x1,c[_0x162eb9(0x233)](c[_0x162eb9(0x1b7)])),_(0x2,c[_0x162eb9(0x233)](b[_0x162eb9(0x1eb)])),_(0x3,c[_0x162eb9(0x233)](c[_0x162eb9(0x1bd)]))],g);function _0x2dc9(){const _0x353280=['threadId','_configService','/reply','UNIVER_UNKNOWN','_init','_commentService','unitId','solved','deleteComment','resolveComment','forEach','subscribe','_threadCommentDataSource','_initDataSource','size','type','add','@univerjs/thread-comment','commentUpdate$','defineProperty','3Qltqsr','getOwnPropertyDescriptor','_sessionService','/universer-api/user/list','@univerjs/thread-comment-ui','UniverLicensePlugin','UniverInstanceType','toStringTag','4017582ohmAEr','getCurrentUser','Reply','ThreadCommentModel','get','length','body','customRanges','userID','9kwAwas','CollaborationSessionService','updateComment','COMMENT','bufferTime','_threadCommentDataSourceService','1298597LeNlWl','onReady','content','_injector','YYYY/MM/DD\x20HH:mm','Delete','comment','delete','/universer-api/comment/unit/','error','syncUpdateMutationToColla','users','stringify','pluginName','4740dAyHfS','Solved','saveCommentToSnapshot','Edit','dayjs','Add','code','getUnit','filter','format','1364rUeqSj','pipe','DependentOn','root','Plugin','_config','_userService','rangeType','replies','/list','addUser','@univerjs/network','Solve','setConfig','2352104lIRyAr','addComment','1346446FPPmMR','rxjs','payload','getComment','parse','_httpService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','createTimestamp','thread-comment-data-source.config','_threadCommentModel','reply','/edit','IThreadCommentDataSourceService','ref','user','UNRECOGNIZED','post','parentId','HTTPService','CommentService','slice','_initUserSync','CustomRangeType','comments','disposeWithMe','/solved','UniverCollaborationClientPlugin','Inject','UniverThreadCommentUIPlugin','OpenOrReOpen','dataSource','map','UniverThreadCommentDataSourcePlugin','find','Disposable','4969915SzypyT','getMemberID','UserManagerService','values','rangeId','userId','personId','symbol','Injector','onStarting','replyId','@univerjs-pro/collaboration-client','7EWwMQA','getUser','/add','2610880TxoaiX'];_0x2dc9=function(){return _0x353280;};return _0x2dc9();}var H=Object['getOwnPropertyDescriptor'],J=(_0x20fba2,_0xc3d4c,_0x405692,_0x5acaa0)=>{const _0xe36891=_0x162eb9;for(var _0x147230=_0x5acaa0>0x1?void 0x0:_0x5acaa0?H(_0xc3d4c,_0x405692):_0xc3d4c,_0x56b7ef=_0x20fba2[_0xe36891(0x1e6)]-0x1,_0x27c6ed;_0x56b7ef>=0x0;_0x56b7ef--)(_0x27c6ed=_0x20fba2[_0x56b7ef])&&(_0x147230=_0x27c6ed(_0x147230)||_0x147230);return _0x147230;},y=(_0xd9524b,_0x17cf99)=>(_0x587833,_0x393ae5)=>_0x17cf99(_0x587833,_0x393ae5,_0xd9524b);let C=class extends c[_0x162eb9(0x1b4)]{constructor(_0x3f8059,_0x1c18fa){const _0xaf0c3=_0x162eb9;super(),this[_0xaf0c3(0x1ef)]=_0x3f8059,this['_threadCommentDataSource']=_0x1c18fa,this['_initDataSource']();}[_0x162eb9(0x1d2)](){const _0x2a8dc5=_0x162eb9;this[_0x2a8dc5(0x1ef)][_0x2a8dc5(0x1b0)]=this[_0x2a8dc5(0x1d1)],this[_0x2a8dc5(0x1ef)][_0x2a8dc5(0x1fa)]=!0x1;}};C=J([y(0x0,M[_0x162eb9(0x224)]),y(0x1,c[_0x162eb9(0x233)](g))],C);var F=Object[_0x162eb9(0x1d8)],L=Object[_0x162eb9(0x1da)],Z=(_0x4eccb1,_0x1e37b9,_0x298ff6)=>_0x1e37b9 in _0x4eccb1?F(_0x4eccb1,_0x1e37b9,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x298ff6}):_0x4eccb1[_0x1e37b9]=_0x298ff6,W=(_0xad4cb5,_0x3ba935,_0x104593,_0x1c9483)=>{const _0x580835=_0x162eb9;for(var _0xdf6d04=_0x1c9483>0x1?void 0x0:_0x1c9483?L(_0x3ba935,_0x104593):_0x3ba935,_0x49d9a1=_0xad4cb5[_0x580835(0x1e6)]-0x1,_0x528a63;_0x49d9a1>=0x0;_0x49d9a1--)(_0x528a63=_0xad4cb5[_0x49d9a1])&&(_0xdf6d04=_0x528a63(_0xdf6d04)||_0xdf6d04);return _0xdf6d04;},O=(_0x5666e8,_0x54adb8)=>(_0x8f02fd,_0x35484c)=>_0x54adb8(_0x8f02fd,_0x35484c,_0x5666e8),N=(_0x425c28,_0xdd8c0f,_0x31b822)=>Z(_0x425c28,typeof _0xdd8c0f!=_0x162eb9(0x1bc)?_0xdd8c0f+'':_0xdd8c0f,_0x31b822);exports['UniverThreadCommentDataSourcePlugin']=class extends c[_0x162eb9(0x20c)]{constructor(_0x104931=D,_0x409666,_0x14ac91){const _0x2c6d84=_0x162eb9;super(),this['_config']=_0x104931,this[_0x2c6d84(0x1f3)]=_0x409666,this[_0x2c6d84(0x1c6)]=_0x14ac91;const {..._0xabc247}=c['merge']({},D,this[_0x2c6d84(0x20d)]);this[_0x2c6d84(0x1c6)][_0x2c6d84(0x215)](q,_0xabc247);}[_0x162eb9(0x1be)](){const _0x5a15a3=_0x162eb9;[[g],[C],[p]][_0x5a15a3(0x1cf)](_0x364282=>{const _0x4da37b=_0x5a15a3;this[_0x4da37b(0x1f3)][_0x4da37b(0x1d5)](_0x364282);});}[_0x162eb9(0x1f1)](){const _0x4bdb01=_0x162eb9;this['_injector'][_0x4bdb01(0x1e5)](C),this[_0x4bdb01(0x1f3)][_0x4bdb01(0x1e5)](p);}},N(exports[_0x162eb9(0x1b2)],_0x162eb9(0x1fd),U),N(exports[_0x162eb9(0x1b2)],_0x162eb9(0x1d4),c[_0x162eb9(0x1df)][_0x162eb9(0x1c8)]),exports[_0x162eb9(0x1b2)]=W([c[_0x162eb9(0x20a)](j[_0x162eb9(0x234)],b[_0x162eb9(0x232)],T[_0x162eb9(0x1de)]),O(0x1,c[_0x162eb9(0x233)](c[_0x162eb9(0x1bd)])),O(0x2,c['IConfigService'])],exports['UniverThreadCommentDataSourcePlugin']);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x14833a=_0x4a63;(function(_0x20a77a,_0x546aa8){const _0x124c09=_0x4a63,_0x5eacba=_0x20a77a();while(!![]){try{const _0x4af4a8=-parseInt(_0x124c09(0x147))/0x1+-parseInt(_0x124c09(0x167))/0x2+parseInt(_0x124c09(0x183))/0x3+-parseInt(_0x124c09(0x18d))/0x4*(parseInt(_0x124c09(0x146))/0x5)+-parseInt(_0x124c09(0x168))/0x6+parseInt(_0x124c09(0x166))/0x7*(parseInt(_0x124c09(0x134))/0x8)+-parseInt(_0x124c09(0x182))/0x9*(-parseInt(_0x124c09(0x187))/0xa);if(_0x4af4a8===_0x546aa8)break;else _0x5eacba['push'](_0x5eacba['shift']());}catch(_0x22323f){_0x5eacba['push'](_0x5eacba['shift']());}}}(_0x5f52,0x2f70b));function _0x4a63(_0x31aa46,_0x3700d3){const _0x5f525a=_0x5f52();return _0x4a63=function(_0x4a63fa,_0x11bc5a){_0x4a63fa=_0x4a63fa-0x132;let _0x24fa90=_0x5f525a[_0x4a63fa];return _0x24fa90;},_0x4a63(_0x31aa46,_0x3700d3);}import{CommentService as _0x20b762,CollaborationSessionService as _0x393cb4,UniverCollaborationClientPlugin as _0x47e2ea}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x59e853}from'@univerjs-pro/license';import{dayjs as _0x13edec,UserManagerService as _0x5ac7c4,Inject as _0x213461,Injector as _0x546a36,Disposable as _0x5a8a80,CustomRangeType as _0x5e4eb4,UniverInstanceType as _0x53894a,DependentOn as _0xdc95db,IConfigService as _0x36f31f,Plugin as _0x1920b9,merge as _0x5e0245}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x842d8a}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x42e129,IThreadCommentDataSourceService as _0x2e1ad0}from'@univerjs/thread-comment';import{bufferTime as _0x2a3247}from'rxjs';import{HTTPService as _0x51a028}from'@univerjs/network';const W=_0x14833a(0x176);var I=(_0x40567c=>(_0x40567c[_0x40567c[_0x14833a(0x17a)]=0x0]=_0x14833a(0x17a),_0x40567c[_0x40567c[_0x14833a(0x17d)]=0x1]='Solved',_0x40567c[_0x40567c[_0x14833a(0x139)]=-0x1]=_0x14833a(0x139),_0x40567c))(I||{}),v=(_0x235091=>(_0x235091[_0x235091['Unknown']=0x0]='Unknown',_0x235091[_0x235091[_0x14833a(0x15b)]=0x1]=_0x14833a(0x15b),_0x235091[_0x235091[_0x14833a(0x14b)]=0x2]='Reply',_0x235091[_0x235091[_0x14833a(0x170)]=0x3]=_0x14833a(0x170),_0x235091[_0x235091[_0x14833a(0x188)]=0x4]=_0x14833a(0x188),_0x235091[_0x235091[_0x14833a(0x15a)]=0x5]=_0x14833a(0x15a),_0x235091[_0x235091[_0x14833a(0x139)]=-0x1]=_0x14833a(0x139),_0x235091))(v||{});const D=_0x1b35f8=>_0x13edec(new Date(+_0x1b35f8))['format'](_0x14833a(0x138)),B=async(_0x440578,_0x3c9c8e)=>{const _0xfac7cd=_0x14833a,_0x451680=_0x440578[_0xfac7cd(0x18f)](_0x5ac7c4),_0xcbec61=_0x440578[_0xfac7cd(0x18f)](_0x51a028);_0x3c9c8e[_0xfac7cd(0x164)](_0x1751cb=>{const _0x2e6ffb=_0xfac7cd;_0x451680[_0x2e6ffb(0x192)](_0x1751cb)&&_0x3c9c8e[_0x2e6ffb(0x184)](_0x1751cb);}),_0x3c9c8e[_0xfac7cd(0x186)]&&(await _0xcbec61['get'](_0xfac7cd(0x18a),{'params':{'userIDs':[..._0x3c9c8e]}}))[_0xfac7cd(0x172)][_0xfac7cd(0x143)]['forEach'](_0x3c54c4=>{const _0x255910=_0xfac7cd;_0x3c54c4&&_0x451680[_0x255910(0x16a)](_0x3c54c4);});};var K=Object[_0x14833a(0x185)],V=(_0x1767c2,_0x65c2d5,_0x439730,_0x575bb8)=>{for(var _0x1dba44=_0x575bb8>0x1?void 0x0:_0x575bb8?K(_0x65c2d5,_0x439730):_0x65c2d5,_0x316d67=_0x1767c2['length']-0x1,_0x1d85f4;_0x316d67>=0x0;_0x316d67--)(_0x1d85f4=_0x1767c2[_0x316d67])&&(_0x1dba44=_0x1d85f4(_0x1dba44)||_0x1dba44);return _0x1dba44;},p=(_0x42c1a0,_0x401ba)=>(_0x434179,_0x157519)=>_0x401ba(_0x434179,_0x157519,_0x42c1a0);let S=class extends _0x5a8a80{constructor(_0x13ccdd,_0x3c517e,_0x3fc544,_0x4b59e0){const _0x8ff93=_0x14833a;super(),this[_0x8ff93(0x155)]=_0x13ccdd,this[_0x8ff93(0x189)]=_0x3c517e,this[_0x8ff93(0x160)]=_0x3fc544,this[_0x8ff93(0x140)]=_0x4b59e0,this['_init'](),this[_0x8ff93(0x15c)]();}[_0x14833a(0x15c)](){const _0x56c678=_0x14833a;this['disposeWithMe'](this[_0x56c678(0x189)][_0x56c678(0x162)][_0x56c678(0x16c)](_0x2a3247(0x10))[_0x56c678(0x181)](_0x467d4a=>{const _0x252e74=_0x56c678,_0x2e8602=new Set();_0x467d4a[_0x252e74(0x164)](_0x539172=>{const _0x4f4926=_0x252e74;switch(_0x539172[_0x4f4926(0x190)]){case _0x4f4926(0x13d):{const _0x537593=_0x539172[_0x4f4926(0x175)][_0x4f4926(0x15d)];_0x2e8602['add'](_0x537593);break;}}}),B(this[_0x252e74(0x140)],_0x2e8602);}));}[_0x14833a(0x13f)](){const _0x2d224c=_0x14833a;this[_0x2d224c(0x13a)](this[_0x2d224c(0x155)][_0x2d224c(0x162)][_0x2d224c(0x181)](async _0x45c66f=>{const _0x518e40=_0x2d224c;var _0x1d4eb5,_0x240d9a,_0x394bd0,_0x4db90a;const _0x2d22ef=(_0x1d4eb5=this[_0x518e40(0x189)]['getUnit'](_0x45c66f[_0x518e40(0x17b)])[_0x518e40(0x152)](_0xdc5a37=>_0xdc5a37['threadId']===_0x45c66f[_0x518e40(0x14d)]))==null?void 0x0:_0x1d4eb5[_0x518e40(0x163)];if(!_0x2d22ef)return;const {unitId:_0x5557ff,subUnitId:_0x4f19ea}=_0x2d22ef;switch(_0x45c66f[_0x518e40(0x18c)]&&this[_0x518e40(0x160)]['addUser'](_0x45c66f[_0x518e40(0x18c)]),_0x45c66f[_0x518e40(0x190)]){case v[_0x518e40(0x15b)]:break;case v[_0x518e40(0x14b)]:{this[_0x518e40(0x189)][_0x518e40(0x159)](_0x5557ff,_0x4f19ea,{'unitId':_0x5557ff,'subUnitId':_0x4f19ea,'ref':'','id':_0x45c66f[_0x518e40(0x158)],'dT':D(+_0x45c66f[_0x518e40(0x17f)]),'threadId':_0x45c66f[_0x518e40(0x14d)],'personId':(_0x394bd0=(_0x240d9a=_0x45c66f[_0x518e40(0x18c)])==null?void 0x0:_0x240d9a['userID'])!=null?_0x394bd0:_0x45c66f['userId'],'text':JSON['parse'](_0x45c66f['content']),'parentId':_0x2d22ef['id']});break;}case v[_0x518e40(0x188)]:{const _0x3acb34=this[_0x518e40(0x189)][_0x518e40(0x151)](_0x5557ff,_0x4f19ea,_0x45c66f[_0x518e40(0x158)]);_0x3acb34&&_0x3acb34[_0x518e40(0x142)]&&this[_0x518e40(0x189)][_0x518e40(0x157)](_0x5557ff,_0x4f19ea,_0x45c66f[_0x518e40(0x158)]);break;}case v[_0x518e40(0x170)]:{this[_0x518e40(0x189)]['updateComment'](_0x5557ff,_0x4f19ea,{'commentId':_0x45c66f[_0x518e40(0x158)],'text':JSON[_0x518e40(0x144)](_0x45c66f[_0x518e40(0x191)])});break;}case v[_0x518e40(0x15a)]:{const _0x5caa73=(_0x4db90a=this[_0x518e40(0x189)]['getUnit'](_0x45c66f['unitId'])[_0x518e40(0x152)](_0x475461=>_0x475461['threadId']===_0x45c66f[_0x518e40(0x14d)]))==null?void 0x0:_0x4db90a['root'];_0x5caa73&&this['_threadCommentModel'][_0x518e40(0x16f)](_0x5557ff,_0x4f19ea,_0x5caa73['id'],_0x45c66f[_0x518e40(0x177)]===I['Solved']);break;}}}));}};function _0x5f52(){const _0x544929=['OpenOrReOpen','unitId','COMMENT','Solved','onStarting','createTimestamp','setConfig','subscribe','18vBZUYd','921015bFwpYM','delete','getOwnPropertyDescriptor','size','3188270mJFGRG','Delete','_threadCommentModel','/universer-api/user/list','userId','user','33588kicxbE','rangeType','get','type','content','getUser','symbol','code','440NqHmHM','_sessionService','/reply','saveCommentToSnapshot','YYYY/MM/DD\x20HH:mm','UNRECOGNIZED','disposeWithMe','customRanges','listComments','add','_threadCommentDataSourceService','_init','_injector','replies','parentId','users','parse','getMemberID','185wcPeoQ','382997nAuXSn','comment','dataSource','slice','Reply','/add','threadId','map','_initDataSource','syncUpdateMutationToColla','getComment','find','onReady','defineProperty','_commentService','stringify','deleteComment','replyId','addComment','Solve','Add','_initUserSync','personId','error','getCurrentUser','_userService','rangeId','commentUpdate$','root','forEach','/edit','9947aVZRCb','130122PLItPu','418512fZGCUg','/universer-api/comment/unit/','addUser','reply','pipe','length','filter','resolveComment','Edit','thread-comment-data-source.config','body','post','requireSession','payload','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','solved','_httpService','_config'];_0x5f52=function(){return _0x544929;};return _0x5f52();}S=V([p(0x0,_0x213461(_0x20b762)),p(0x1,_0x213461(_0x42e129)),p(0x2,_0x213461(_0x5ac7c4)),p(0x3,_0x213461(_0x546a36))],S);const z=_0x14833a(0x171),M={};var k=Object[_0x14833a(0x185)],Q=(_0x2b70a2,_0x446fd2,_0x2019ae,_0x2ac8f5)=>{for(var _0x33258d=_0x2ac8f5>0x1?void 0x0:_0x2ac8f5?k(_0x446fd2,_0x2019ae):_0x446fd2,_0x502014=_0x2b70a2['length']-0x1,_0x558e42;_0x502014>=0x0;_0x502014--)(_0x558e42=_0x2b70a2[_0x502014])&&(_0x33258d=_0x558e42(_0x33258d)||_0x33258d);return _0x33258d;},_=(_0x16931c,_0x557808)=>(_0x1b24a8,_0x5a4d3f)=>_0x557808(_0x1b24a8,_0x5a4d3f,_0x16931c);function X(_0x2afc59,_0x574a6c){const _0x3c8ec1=_0x14833a,_0x1940c4=_0x2afc59[_0x3c8ec1(0x141)][0x0];return{..._0x574a6c,'id':_0x1940c4['replyId'],'resolved':_0x2afc59[_0x3c8ec1(0x177)]===0x1,'dT':D(_0x1940c4[_0x3c8ec1(0x17f)]),'personId':_0x1940c4[_0x3c8ec1(0x18b)],'threadId':_0x1940c4[_0x3c8ec1(0x14d)]};}function ee(_0x1b5e60,_0x2b3403,_0x86cecb){const _0x14ccc0=_0x14833a;var _0x21130f,_0x42fd16;if(((_0x42fd16=(_0x21130f=_0x1b5e60==null?void 0x0:_0x1b5e60[_0x14ccc0(0x141)])==null?void 0x0:_0x21130f[_0x14ccc0(0x16d)])!=null?_0x42fd16:0x0)>0x0){const _0x302ccc=(_0x146b9d,_0x2e49f0)=>({'id':_0x146b9d[_0x14ccc0(0x158)],'threadId':_0x146b9d[_0x14ccc0(0x14d)],'dT':D(_0x146b9d['createTimestamp']),'personId':_0x146b9d[_0x14ccc0(0x18b)],'resolved':_0x1b5e60[_0x14ccc0(0x177)]===I['Solved'],'unitId':_0x2b3403,'subUnitId':_0x86cecb,'text':JSON[_0x14ccc0(0x144)](_0x146b9d[_0x14ccc0(0x191)]),'parentId':_0x2e49f0}),_0x5d2172=_0x302ccc(_0x1b5e60[_0x14ccc0(0x141)][0x0]);return{..._0x5d2172,'children':_0x1b5e60[_0x14ccc0(0x141)][_0x14ccc0(0x14a)](0x1)[_0x14ccc0(0x14e)](_0x3d8fdc=>_0x302ccc(_0x3d8fdc,_0x5d2172['id']))};}return null;}let f=class{constructor(_0xb1722,_0x16126b,_0x48a3c6,_0x482b2a){const _0x5df556=_0x14833a;this[_0x5df556(0x178)]=_0xb1722,this[_0x5df556(0x160)]=_0x16126b,this['_sessionService']=_0x48a3c6,this['_injector']=_0x482b2a;}async['addComment'](_0x57d711){const _0x1edfba=_0x14833a;var _0x25ee01,_0x5a9f77;const {parentId:_0x2b8c7e,unitId:_0x1bc8a6,text:_0x33ef6d,threadId:_0x44acaa}=_0x57d711,_0x323dde=(_0x5a9f77=(_0x25ee01=_0x33ef6d['customRanges'])==null?void 0x0:_0x25ee01[_0x1edfba(0x16e)](_0x1b2582=>_0x1b2582[_0x1edfba(0x18e)]===_0x5e4eb4[_0x1edfba(0x17c)])[_0x1edfba(0x14e)](_0x11ef51=>_0x11ef51[_0x1edfba(0x161)]))!=null?_0x5a9f77:[],_0x167f97=JSON[_0x1edfba(0x156)](_0x33ef6d),_0x1611cf=(await this[_0x1edfba(0x135)]['requireSession'](_0x1bc8a6))[_0x1edfba(0x145)]();if(_0x2b8c7e){const _0x3ba3af={'memberId':_0x1611cf,'unitId':_0x1bc8a6,'content':_0x167f97,'mention':_0x323dde,'threadId':_0x44acaa},_0x49be2e=(await this[_0x1edfba(0x178)]['post']('/universer-api/comment/unit/'+_0x1bc8a6+_0x1edfba(0x136),{'body':_0x3ba3af}))['body'][_0x1edfba(0x16b)];return{..._0x57d711,'id':_0x49be2e['replyId'],'dT':_0x13edec(+_0x49be2e[_0x1edfba(0x17f)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x49be2e[_0x1edfba(0x18b)]};}else{const _0x3a0aec={'memberId':_0x1611cf,'unitId':_0x1bc8a6,'content':_0x167f97,'mention':_0x323dde},_0x58022c=await this[_0x1edfba(0x178)][_0x1edfba(0x173)](_0x1edfba(0x169)+_0x1bc8a6+_0x1edfba(0x14c),{'body':_0x3a0aec});return X(_0x58022c[_0x1edfba(0x172)][_0x1edfba(0x148)],_0x57d711);}}async['updateComment'](_0x136461){const _0x3a6ff2=_0x14833a;var _0x5519ae,_0x54a7c7;const {text:_0x4369b9,unitId:_0x19fa84}=_0x136461,_0x586b36=(_0x54a7c7=(_0x5519ae=_0x4369b9[_0x3a6ff2(0x13b)])==null?void 0x0:_0x5519ae[_0x3a6ff2(0x16e)](_0x53fd6a=>_0x53fd6a[_0x3a6ff2(0x18e)]===_0x5e4eb4[_0x3a6ff2(0x17c)])['map'](_0x37eed5=>_0x37eed5['rangeId']))!=null?_0x54a7c7:[],_0xa25844=JSON[_0x3a6ff2(0x156)](_0x4369b9),_0x35f8c7=_0x136461[_0x3a6ff2(0x14d)],_0x350486=_0x136461['id'],_0x4b41b0={'memberId':(await this[_0x3a6ff2(0x135)][_0x3a6ff2(0x174)](_0x19fa84))[_0x3a6ff2(0x145)](),'unitId':_0x19fa84,'threadId':_0x35f8c7,'mention':_0x586b36,'content':_0xa25844,'replyId':_0x350486},_0x18a2e5=await this['_httpService'][_0x3a6ff2(0x173)](_0x3a6ff2(0x169)+_0x19fa84+_0x3a6ff2(0x165),{'body':_0x4b41b0});return!_0x18a2e5[_0x3a6ff2(0x172)][_0x3a6ff2(0x15e)]||_0x18a2e5[_0x3a6ff2(0x172)][_0x3a6ff2(0x15e)]['code']===0x1;}async['resolveComment'](_0x492c93){const _0x4f5186=_0x14833a,{unitId:_0x933624}=_0x492c93,_0x28b1c1=_0x492c93[_0x4f5186(0x14d)],_0x52222a={'memberId':this['_userService'][_0x4f5186(0x15f)]()['userID'],'unitId':_0x933624,'threadId':_0x28b1c1,'solved':_0x492c93['resolved']?I[_0x4f5186(0x17d)]:I[_0x4f5186(0x17a)]},_0x1c333a=await this[_0x4f5186(0x178)][_0x4f5186(0x173)](_0x4f5186(0x169)+_0x933624+'/solved',{'body':_0x52222a});return!_0x1c333a[_0x4f5186(0x172)][_0x4f5186(0x15e)]||_0x1c333a['body']['error']['code']===0x1;}async[_0x14833a(0x157)](_0x2d5c38,_0x546761,_0x50e554,_0x3dcb0d){const _0x4104a3=_0x14833a,_0x56e9ba={'memberId':(await this['_sessionService'][_0x4104a3(0x174)](_0x2d5c38))[_0x4104a3(0x145)](),'threadId':_0x50e554,'replyId':_0x3dcb0d,'unitId':_0x2d5c38},_0x3c549e=await this[_0x4104a3(0x178)][_0x4104a3(0x173)](_0x4104a3(0x169)+_0x2d5c38+'/delete',{'body':_0x56e9ba});return!_0x3c549e['body']['error']||_0x3c549e[_0x4104a3(0x172)]['error'][_0x4104a3(0x133)]===0x1;}async[_0x14833a(0x13c)](_0x5fcd3c,_0x8144a7,_0x796f76){const _0x541b21=_0x14833a,_0x28e21e={'unitId':_0x5fcd3c,'threadId':_0x796f76},_0xae2a5e=await this[_0x541b21(0x178)][_0x541b21(0x173)](_0x541b21(0x169)+_0x5fcd3c+'/list',{'body':_0x28e21e}),_0x9f747b=_0x796f76[_0x541b21(0x14e)](_0x30f02a=>ee(_0xae2a5e[_0x541b21(0x172)]['comments'][_0x30f02a],_0x5fcd3c,_0x8144a7))[_0x541b21(0x16e)](Boolean);return Object['values'](_0xae2a5e[_0x541b21(0x172)][_0x541b21(0x143)])[_0x541b21(0x164)](_0x3edc7a=>{const _0x1333fc=_0x541b21;this[_0x1333fc(0x160)][_0x1333fc(0x16a)](_0x3edc7a);}),_0x9f747b;}[_0x14833a(0x137)](_0x35d9ba){return{'id':_0x35d9ba['id'],'threadId':_0x35d9ba['threadId'],'ref':_0x35d9ba['ref']};}};f=Q([_(0x0,_0x213461(_0x51a028)),_(0x1,_0x213461(_0x5ac7c4)),_(0x2,_0x213461(_0x393cb4)),_(0x3,_0x213461(_0x546a36))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x36fe1b,_0xa1fb39,_0x2b52fa,_0x3e6429)=>{const _0x2864cc=_0x14833a;for(var _0x241c6e=_0x3e6429>0x1?void 0x0:_0x3e6429?re(_0xa1fb39,_0x2b52fa):_0xa1fb39,_0x5122fc=_0x36fe1b[_0x2864cc(0x16d)]-0x1,_0x5b7c65;_0x5122fc>=0x0;_0x5122fc--)(_0x5b7c65=_0x36fe1b[_0x5122fc])&&(_0x241c6e=_0x5b7c65(_0x241c6e)||_0x241c6e);return _0x241c6e;},N=(_0x184d04,_0xa557b1)=>(_0x478acb,_0x222af2)=>_0xa557b1(_0x478acb,_0x222af2,_0x184d04);let g=class extends _0x5a8a80{constructor(_0x5401f4,_0x490cf6){const _0x28079d=_0x14833a;super(),this[_0x28079d(0x13e)]=_0x5401f4,this['_threadCommentDataSource']=_0x490cf6,this[_0x28079d(0x14f)]();}['_initDataSource'](){const _0x27f3ba=_0x14833a;this['_threadCommentDataSourceService'][_0x27f3ba(0x149)]=this['_threadCommentDataSource'],this[_0x27f3ba(0x13e)][_0x27f3ba(0x150)]=!0x1;}};g=te([N(0x0,_0x2e1ad0),N(0x1,_0x213461(f))],g);var se=Object[_0x14833a(0x154)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x136488,_0x513d52,_0xaefdb)=>_0x513d52 in _0x136488?se(_0x136488,_0x513d52,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xaefdb}):_0x136488[_0x513d52]=_0xaefdb,ie=(_0x3a2777,_0x254b3f,_0x4eb568,_0x9d4562)=>{const _0x142479=_0x14833a;for(var _0x16dbab=_0x9d4562>0x1?void 0x0:_0x9d4562?oe(_0x254b3f,_0x4eb568):_0x254b3f,_0x2f6fcf=_0x3a2777[_0x142479(0x16d)]-0x1,_0x179a2e;_0x2f6fcf>=0x0;_0x2f6fcf--)(_0x179a2e=_0x3a2777[_0x2f6fcf])&&(_0x16dbab=_0x179a2e(_0x16dbab)||_0x16dbab);return _0x16dbab;},w=(_0x4e18dc,_0x15bf6a)=>(_0x1d600a,_0x112797)=>_0x15bf6a(_0x1d600a,_0x112797,_0x4e18dc),$=(_0x2b4eed,_0x669232,_0x3e5a80)=>ne(_0x2b4eed,typeof _0x669232!=_0x14833a(0x132)?_0x669232+'':_0x669232,_0x3e5a80);let b=class extends _0x1920b9{constructor(_0x5aa5bf=M,_0xa4d11c,_0x4b335f){const _0x39425d=_0x14833a;super(),this[_0x39425d(0x179)]=_0x5aa5bf,this['_injector']=_0xa4d11c,this['_configService']=_0x4b335f;const {..._0x45fcc1}=_0x5e0245({},M,this['_config']);this['_configService'][_0x39425d(0x180)](z,_0x45fcc1);}[_0x14833a(0x17e)](){const _0x2f6936=_0x14833a;[[f],[g],[S]][_0x2f6936(0x164)](_0x5722e0=>{const _0x3a40a1=_0x2f6936;this[_0x3a40a1(0x140)][_0x3a40a1(0x13d)](_0x5722e0);});}[_0x14833a(0x153)](){const _0x32c449=_0x14833a;this[_0x32c449(0x140)][_0x32c449(0x18f)](g),this[_0x32c449(0x140)][_0x32c449(0x18f)](S);}};$(b,'pluginName',W),$(b,_0x14833a(0x190),_0x53894a['UNIVER_UNKNOWN']),b=ie([_0xdc95db(_0x842d8a,_0x47e2ea,_0x59e853),w(0x1,_0x213461(_0x546a36)),w(0x2,_0x36f31f)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x32a7ff=_0x3945;(function(_0x366aa5,_0x5b653b){const _0x77e27f=_0x3945,_0x420f8a=_0x366aa5();while(!![]){try{const _0x261c63=-parseInt(_0x77e27f(0x210))/0x1+-parseInt(_0x77e27f(0x1eb))/0x2*(-parseInt(_0x77e27f(0x1dc))/0x3)+parseInt(_0x77e27f(0x1fa))/0x4+parseInt(_0x77e27f(0x1d9))/0x5+parseInt(_0x77e27f(0x207))/0x6*(-parseInt(_0x77e27f(0x1e4))/0x7)+parseInt(_0x77e27f(0x226))/0x8*(parseInt(_0x77e27f(0x227))/0x9)+-parseInt(_0x77e27f(0x1f8))/0xa;if(_0x261c63===_0x5b653b)break;else _0x420f8a['push'](_0x420f8a['shift']());}catch(_0x2f90b2){_0x420f8a['push'](_0x420f8a['shift']());}}}(_0x30ac,0x2b232));import{CommentService as _0x519eb2,CollaborationSessionService as _0x151b72,UniverCollaborationClientPlugin as _0x338581}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x15b30d}from'@univerjs-pro/license';import{dayjs as _0xa0be3d,UserManagerService as _0x1e4b01,Inject as _0x2475b2,Injector as _0x47d10f,Disposable as _0xeb494b,CustomRangeType as _0x56c0d1,UniverInstanceType as _0x4064ee,DependentOn as _0x4a0c6a,IConfigService as _0x437ed1,Plugin as _0x2a6c02,merge as _0x422436}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x2a7d88}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xbdbc24,IThreadCommentDataSourceService as _0xc0fe7}from'@univerjs/thread-comment';function _0x3945(_0x3aca3e,_0x17cb39){const _0x30ac00=_0x30ac();return _0x3945=function(_0x39450e,_0x33771b){_0x39450e=_0x39450e-0x1c9;let _0x5b5ba1=_0x30ac00[_0x39450e];return _0x5b5ba1;},_0x3945(_0x3aca3e,_0x17cb39);}import{bufferTime as _0x197a16}from'rxjs';import{HTTPService as _0x3424be}from'@univerjs/network';const W=_0x32a7ff(0x20a);var I=(_0x3bdf77=>(_0x3bdf77[_0x3bdf77[_0x32a7ff(0x1cc)]=0x0]=_0x32a7ff(0x1cc),_0x3bdf77[_0x3bdf77['Solved']=0x1]=_0x32a7ff(0x228),_0x3bdf77[_0x3bdf77[_0x32a7ff(0x1f3)]=-0x1]='UNRECOGNIZED',_0x3bdf77))(I||{}),v=(_0x1216cf=>(_0x1216cf[_0x1216cf['Unknown']=0x0]=_0x32a7ff(0x1d7),_0x1216cf[_0x1216cf['Add']=0x1]='Add',_0x1216cf[_0x1216cf['Reply']=0x2]=_0x32a7ff(0x20e),_0x1216cf[_0x1216cf[_0x32a7ff(0x1cf)]=0x3]=_0x32a7ff(0x1cf),_0x1216cf[_0x1216cf['Delete']=0x4]=_0x32a7ff(0x220),_0x1216cf[_0x1216cf[_0x32a7ff(0x1cb)]=0x5]='Solve',_0x1216cf[_0x1216cf[_0x32a7ff(0x1f3)]=-0x1]=_0x32a7ff(0x1f3),_0x1216cf))(v||{});const D=_0x22fb64=>_0xa0be3d(new Date(+_0x22fb64))[_0x32a7ff(0x1ee)](_0x32a7ff(0x229)),B=async(_0x19c3be,_0x1c7b54)=>{const _0x5a23c4=_0x32a7ff,_0x4c37e1=_0x19c3be['get'](_0x1e4b01),_0x304e80=_0x19c3be['get'](_0x3424be);_0x1c7b54[_0x5a23c4(0x209)](_0x55d247=>{const _0x41aa12=_0x5a23c4;_0x4c37e1[_0x41aa12(0x1d2)](_0x55d247)&&_0x1c7b54[_0x41aa12(0x1e2)](_0x55d247);}),_0x1c7b54['size']&&(await _0x304e80[_0x5a23c4(0x1db)](_0x5a23c4(0x21e),{'params':{'userIDs':[..._0x1c7b54]}}))[_0x5a23c4(0x1ea)][_0x5a23c4(0x21b)][_0x5a23c4(0x209)](_0x58ae8f=>{_0x58ae8f&&_0x4c37e1['addUser'](_0x58ae8f);});};var K=Object[_0x32a7ff(0x215)],V=(_0x216bfa,_0x2036b1,_0x37f67c,_0x525c68)=>{const _0x4ff8de=_0x32a7ff;for(var _0x492980=_0x525c68>0x1?void 0x0:_0x525c68?K(_0x2036b1,_0x37f67c):_0x2036b1,_0x19b794=_0x216bfa[_0x4ff8de(0x20c)]-0x1,_0x17bdec;_0x19b794>=0x0;_0x19b794--)(_0x17bdec=_0x216bfa[_0x19b794])&&(_0x492980=_0x17bdec(_0x492980)||_0x492980);return _0x492980;},p=(_0x42a395,_0x5a9773)=>(_0x3627a0,_0x41a55f)=>_0x5a9773(_0x3627a0,_0x41a55f,_0x42a395);let S=class extends _0xeb494b{constructor(_0x19dad7,_0x37e7c2,_0x441d7c,_0x91f2ed){const _0x51da24=_0x32a7ff;super(),this['_commentService']=_0x19dad7,this[_0x51da24(0x1e9)]=_0x37e7c2,this['_userService']=_0x441d7c,this[_0x51da24(0x224)]=_0x91f2ed,this[_0x51da24(0x1de)](),this[_0x51da24(0x1e3)]();}['_initUserSync'](){const _0x3e80e7=_0x32a7ff;this[_0x3e80e7(0x203)](this['_threadCommentModel']['commentUpdate$'][_0x3e80e7(0x1df)](_0x197a16(0x10))[_0x3e80e7(0x200)](_0x44701b=>{const _0xb36498=_0x3e80e7,_0x276818=new Set();_0x44701b[_0xb36498(0x209)](_0x389e82=>{const _0xb84afc=_0xb36498;switch(_0x389e82[_0xb84afc(0x21d)]){case _0xb84afc(0x1d8):{const _0x5b605f=_0x389e82['payload'][_0xb84afc(0x1fb)];_0x276818[_0xb84afc(0x1d8)](_0x5b605f);break;}}}),B(this[_0xb36498(0x224)],_0x276818);}));}[_0x32a7ff(0x1de)](){const _0x36a362=_0x32a7ff;this[_0x36a362(0x203)](this[_0x36a362(0x223)][_0x36a362(0x204)][_0x36a362(0x200)](async _0x163c9b=>{const _0x2f7b6d=_0x36a362;var _0x422ea4,_0x2138b4,_0x6eee83,_0x339e0a;const _0x3b4994=(_0x422ea4=this[_0x2f7b6d(0x1e9)]['getUnit'](_0x163c9b[_0x2f7b6d(0x1f6)])[_0x2f7b6d(0x1e8)](_0x116fd4=>_0x116fd4[_0x2f7b6d(0x1f1)]===_0x163c9b[_0x2f7b6d(0x1f1)]))==null?void 0x0:_0x422ea4[_0x2f7b6d(0x20b)];if(!_0x3b4994)return;const {unitId:_0x537a7f,subUnitId:_0x26b6cb}=_0x3b4994;switch(_0x163c9b[_0x2f7b6d(0x1c9)]&&this['_userService'][_0x2f7b6d(0x1fe)](_0x163c9b[_0x2f7b6d(0x1c9)]),_0x163c9b['type']){case v[_0x2f7b6d(0x1f9)]:break;case v['Reply']:{this[_0x2f7b6d(0x1e9)][_0x2f7b6d(0x216)](_0x537a7f,_0x26b6cb,{'unitId':_0x537a7f,'subUnitId':_0x26b6cb,'ref':'','id':_0x163c9b[_0x2f7b6d(0x1d3)],'dT':D(+_0x163c9b[_0x2f7b6d(0x208)]),'threadId':_0x163c9b[_0x2f7b6d(0x1f1)],'personId':(_0x6eee83=(_0x2138b4=_0x163c9b[_0x2f7b6d(0x1c9)])==null?void 0x0:_0x2138b4[_0x2f7b6d(0x219)])!=null?_0x6eee83:_0x163c9b[_0x2f7b6d(0x1d1)],'text':JSON[_0x2f7b6d(0x21c)](_0x163c9b[_0x2f7b6d(0x1d6)]),'parentId':_0x3b4994['id']});break;}case v[_0x2f7b6d(0x220)]:{const _0x1c4589=this[_0x2f7b6d(0x1e9)][_0x2f7b6d(0x212)](_0x537a7f,_0x26b6cb,_0x163c9b[_0x2f7b6d(0x1d3)]);_0x1c4589&&_0x1c4589['parentId']&&this['_threadCommentModel'][_0x2f7b6d(0x221)](_0x537a7f,_0x26b6cb,_0x163c9b[_0x2f7b6d(0x1d3)]);break;}case v[_0x2f7b6d(0x1cf)]:{this[_0x2f7b6d(0x1e9)]['updateComment'](_0x537a7f,_0x26b6cb,{'commentId':_0x163c9b[_0x2f7b6d(0x1d3)],'text':JSON[_0x2f7b6d(0x21c)](_0x163c9b[_0x2f7b6d(0x1d6)])});break;}case v[_0x2f7b6d(0x1cb)]:{const _0x5007e8=(_0x339e0a=this[_0x2f7b6d(0x1e9)][_0x2f7b6d(0x1e7)](_0x163c9b['unitId'])[_0x2f7b6d(0x1e8)](_0x1e5e77=>_0x1e5e77[_0x2f7b6d(0x1f1)]===_0x163c9b[_0x2f7b6d(0x1f1)]))==null?void 0x0:_0x339e0a[_0x2f7b6d(0x20b)];_0x5007e8&&this[_0x2f7b6d(0x1e9)][_0x2f7b6d(0x22a)](_0x537a7f,_0x26b6cb,_0x5007e8['id'],_0x163c9b['solved']===I['Solved']);break;}}}));}};S=V([p(0x0,_0x2475b2(_0x519eb2)),p(0x1,_0x2475b2(_0xbdbc24)),p(0x2,_0x2475b2(_0x1e4b01)),p(0x3,_0x2475b2(_0x47d10f))],S);const z=_0x32a7ff(0x22c),M={};var k=Object[_0x32a7ff(0x215)],Q=(_0x47df19,_0x124d11,_0x371c58,_0x3a63e8)=>{for(var _0x10fd1f=_0x3a63e8>0x1?void 0x0:_0x3a63e8?k(_0x124d11,_0x371c58):_0x124d11,_0x4a5d93=_0x47df19['length']-0x1,_0x1608b7;_0x4a5d93>=0x0;_0x4a5d93--)(_0x1608b7=_0x47df19[_0x4a5d93])&&(_0x10fd1f=_0x1608b7(_0x10fd1f)||_0x10fd1f);return _0x10fd1f;},_=(_0x2287df,_0x133aa9)=>(_0x121d7c,_0x2edc8b)=>_0x133aa9(_0x121d7c,_0x2edc8b,_0x2287df);function X(_0x101fd1,_0x23dc50){const _0x546693=_0x32a7ff,_0x3312d7=_0x101fd1[_0x546693(0x1d4)][0x0];return{..._0x23dc50,'id':_0x3312d7[_0x546693(0x1d3)],'resolved':_0x101fd1[_0x546693(0x1f4)]===0x1,'dT':D(_0x3312d7['createTimestamp']),'personId':_0x3312d7[_0x546693(0x1d1)],'threadId':_0x3312d7['threadId']};}function ee(_0x68e04e,_0x14cd4c,_0x4ec284){const _0x2904ac=_0x32a7ff;var _0x459c9c,_0x5366a6;if(((_0x5366a6=(_0x459c9c=_0x68e04e==null?void 0x0:_0x68e04e[_0x2904ac(0x1d4)])==null?void 0x0:_0x459c9c[_0x2904ac(0x20c)])!=null?_0x5366a6:0x0)>0x0){const _0x32741a=(_0x5cdca8,_0x35b7d1)=>({'id':_0x5cdca8[_0x2904ac(0x1d3)],'threadId':_0x5cdca8[_0x2904ac(0x1f1)],'dT':D(_0x5cdca8[_0x2904ac(0x208)]),'personId':_0x5cdca8['userId'],'resolved':_0x68e04e[_0x2904ac(0x1f4)]===I['Solved'],'unitId':_0x14cd4c,'subUnitId':_0x4ec284,'text':JSON[_0x2904ac(0x21c)](_0x5cdca8[_0x2904ac(0x1d6)]),'parentId':_0x35b7d1}),_0x5b43a1=_0x32741a(_0x68e04e[_0x2904ac(0x1d4)][0x0]);return{..._0x5b43a1,'children':_0x68e04e[_0x2904ac(0x1d4)][_0x2904ac(0x202)](0x1)[_0x2904ac(0x1e5)](_0x12d514=>_0x32741a(_0x12d514,_0x5b43a1['id']))};}return null;}let f=class{constructor(_0x2c9fcb,_0x5508d7,_0x1f1de4,_0x22e695){const _0x3333=_0x32a7ff;this[_0x3333(0x225)]=_0x2c9fcb,this['_userService']=_0x5508d7,this['_sessionService']=_0x1f1de4,this[_0x3333(0x224)]=_0x22e695;}async[_0x32a7ff(0x216)](_0x519a00){const _0x1f0fbc=_0x32a7ff;var _0x40fd2a,_0x4b80bd;const {parentId:_0x2c2049,unitId:_0x22be40,text:_0x1a0d47,threadId:_0x468a4f}=_0x519a00,_0x229d9f=(_0x4b80bd=(_0x40fd2a=_0x1a0d47[_0x1f0fbc(0x1d0)])==null?void 0x0:_0x40fd2a[_0x1f0fbc(0x217)](_0x3245d9=>_0x3245d9[_0x1f0fbc(0x1e1)]===_0x56c0d1[_0x1f0fbc(0x1f2)])[_0x1f0fbc(0x1e5)](_0x488c00=>_0x488c00[_0x1f0fbc(0x1d5)]))!=null?_0x4b80bd:[],_0x4aa98f=JSON['stringify'](_0x1a0d47),_0x39e85d=(await this[_0x1f0fbc(0x1fc)][_0x1f0fbc(0x1dd)](_0x22be40))[_0x1f0fbc(0x21a)]();if(_0x2c2049){const _0x48eb78={'memberId':_0x39e85d,'unitId':_0x22be40,'content':_0x4aa98f,'mention':_0x229d9f,'threadId':_0x468a4f},_0x250faa=(await this['_httpService'][_0x1f0fbc(0x1e6)](_0x1f0fbc(0x213)+_0x22be40+_0x1f0fbc(0x205),{'body':_0x48eb78}))[_0x1f0fbc(0x1ea)]['reply'];return{..._0x519a00,'id':_0x250faa['replyId'],'dT':_0xa0be3d(+_0x250faa[_0x1f0fbc(0x208)])['format'](_0x1f0fbc(0x229)),'personId':_0x250faa['userId']};}else{const _0x3e2cda={'memberId':_0x39e85d,'unitId':_0x22be40,'content':_0x4aa98f,'mention':_0x229d9f},_0x17a043=await this[_0x1f0fbc(0x225)]['post'](_0x1f0fbc(0x213)+_0x22be40+_0x1f0fbc(0x1f7),{'body':_0x3e2cda});return X(_0x17a043[_0x1f0fbc(0x1ea)]['comment'],_0x519a00);}}async['updateComment'](_0x289826){const _0x3fd22a=_0x32a7ff;var _0x50ca53,_0x1d87e3;const {text:_0x126eed,unitId:_0x4889aa}=_0x289826,_0x538ee1=(_0x1d87e3=(_0x50ca53=_0x126eed[_0x3fd22a(0x1d0)])==null?void 0x0:_0x50ca53[_0x3fd22a(0x217)](_0x15097a=>_0x15097a[_0x3fd22a(0x1e1)]===_0x56c0d1[_0x3fd22a(0x1f2)])[_0x3fd22a(0x1e5)](_0x59ab04=>_0x59ab04['rangeId']))!=null?_0x1d87e3:[],_0xc10af=JSON['stringify'](_0x126eed),_0x475abe=_0x289826[_0x3fd22a(0x1f1)],_0x161ca5=_0x289826['id'],_0x202b92={'memberId':(await this[_0x3fd22a(0x1fc)][_0x3fd22a(0x1dd)](_0x4889aa))[_0x3fd22a(0x21a)](),'unitId':_0x4889aa,'threadId':_0x475abe,'mention':_0x538ee1,'content':_0xc10af,'replyId':_0x161ca5},_0x4aa5c3=await this[_0x3fd22a(0x225)][_0x3fd22a(0x1e6)](_0x3fd22a(0x213)+_0x4889aa+_0x3fd22a(0x1da),{'body':_0x202b92});return!_0x4aa5c3[_0x3fd22a(0x1ea)][_0x3fd22a(0x211)]||_0x4aa5c3[_0x3fd22a(0x1ea)][_0x3fd22a(0x211)][_0x3fd22a(0x21f)]===0x1;}async[_0x32a7ff(0x22a)](_0x1b92b1){const _0x4582f6=_0x32a7ff,{unitId:_0x17f432}=_0x1b92b1,_0x4c6cfb=_0x1b92b1[_0x4582f6(0x1f1)],_0x206e0b={'memberId':this[_0x4582f6(0x20f)][_0x4582f6(0x1f5)]()[_0x4582f6(0x219)],'unitId':_0x17f432,'threadId':_0x4c6cfb,'solved':_0x1b92b1[_0x4582f6(0x1fd)]?I[_0x4582f6(0x228)]:I[_0x4582f6(0x1cc)]},_0x45d3e0=await this[_0x4582f6(0x225)][_0x4582f6(0x1e6)](_0x4582f6(0x213)+_0x17f432+'/solved',{'body':_0x206e0b});return!_0x45d3e0[_0x4582f6(0x1ea)][_0x4582f6(0x211)]||_0x45d3e0['body']['error']['code']===0x1;}async['deleteComment'](_0x3839e6,_0x385451,_0x4be3f9,_0x4f57ac){const _0x4c02ab=_0x32a7ff,_0x18573f={'memberId':(await this[_0x4c02ab(0x1fc)][_0x4c02ab(0x1dd)](_0x3839e6))['getMemberID'](),'threadId':_0x4be3f9,'replyId':_0x4f57ac,'unitId':_0x3839e6},_0x3b1a80=await this[_0x4c02ab(0x225)][_0x4c02ab(0x1e6)](_0x4c02ab(0x213)+_0x3839e6+_0x4c02ab(0x206),{'body':_0x18573f});return!_0x3b1a80[_0x4c02ab(0x1ea)][_0x4c02ab(0x211)]||_0x3b1a80[_0x4c02ab(0x1ea)][_0x4c02ab(0x211)][_0x4c02ab(0x21f)]===0x1;}async[_0x32a7ff(0x1ed)](_0x3a8e6a,_0x586a87,_0x432098){const _0x346abf=_0x32a7ff,_0x22dbee={'unitId':_0x3a8e6a,'threadId':_0x432098},_0x4e8632=await this[_0x346abf(0x225)]['post'](_0x346abf(0x213)+_0x3a8e6a+_0x346abf(0x214),{'body':_0x22dbee}),_0x3f6423=_0x432098['map'](_0xe4970c=>ee(_0x4e8632[_0x346abf(0x1ea)]['comments'][_0xe4970c],_0x3a8e6a,_0x586a87))[_0x346abf(0x217)](Boolean);return Object['values'](_0x4e8632['body']['users'])['forEach'](_0x5b30e2=>{const _0x53fb03=_0x346abf;this[_0x53fb03(0x20f)][_0x53fb03(0x1fe)](_0x5b30e2);}),_0x3f6423;}[_0x32a7ff(0x1ca)](_0x301ddf){const _0x27e651=_0x32a7ff;return{'id':_0x301ddf['id'],'threadId':_0x301ddf[_0x27e651(0x1f1)],'ref':_0x301ddf[_0x27e651(0x218)]};}};f=Q([_(0x0,_0x2475b2(_0x3424be)),_(0x1,_0x2475b2(_0x1e4b01)),_(0x2,_0x2475b2(_0x151b72)),_(0x3,_0x2475b2(_0x47d10f))],f);var re=Object[_0x32a7ff(0x215)],te=(_0x5a276d,_0x29e49f,_0x1449c1,_0x211a35)=>{const _0x5803b0=_0x32a7ff;for(var _0xfd379c=_0x211a35>0x1?void 0x0:_0x211a35?re(_0x29e49f,_0x1449c1):_0x29e49f,_0x3d39d8=_0x5a276d[_0x5803b0(0x20c)]-0x1,_0x5afa4e;_0x3d39d8>=0x0;_0x3d39d8--)(_0x5afa4e=_0x5a276d[_0x3d39d8])&&(_0xfd379c=_0x5afa4e(_0xfd379c)||_0xfd379c);return _0xfd379c;},N=(_0xadb0c6,_0x47139d)=>(_0x228f95,_0x280a73)=>_0x47139d(_0x228f95,_0x280a73,_0xadb0c6);let g=class extends _0xeb494b{constructor(_0x23d48a,_0x371245){const _0x1b66c7=_0x32a7ff;super(),this[_0x1b66c7(0x222)]=_0x23d48a,this[_0x1b66c7(0x1ef)]=_0x371245,this[_0x1b66c7(0x22b)]();}['_initDataSource'](){const _0x371b9c=_0x32a7ff;this[_0x371b9c(0x222)]['dataSource']=this[_0x371b9c(0x1ef)],this[_0x371b9c(0x222)][_0x371b9c(0x1cd)]=!0x1;}};g=te([N(0x0,_0xc0fe7),N(0x1,_0x2475b2(f))],g);var se=Object[_0x32a7ff(0x1f0)],oe=Object[_0x32a7ff(0x215)],ne=(_0x51c830,_0x1d62e2,_0x51c58b)=>_0x1d62e2 in _0x51c830?se(_0x51c830,_0x1d62e2,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x51c58b}):_0x51c830[_0x1d62e2]=_0x51c58b,ie=(_0x510be2,_0x32899b,_0x5c980f,_0x1ac656)=>{const _0x4b706a=_0x32a7ff;for(var _0x11550d=_0x1ac656>0x1?void 0x0:_0x1ac656?oe(_0x32899b,_0x5c980f):_0x32899b,_0xa4cba9=_0x510be2[_0x4b706a(0x20c)]-0x1,_0x52ef55;_0xa4cba9>=0x0;_0xa4cba9--)(_0x52ef55=_0x510be2[_0xa4cba9])&&(_0x11550d=_0x52ef55(_0x11550d)||_0x11550d);return _0x11550d;},w=(_0xf37478,_0x2176b)=>(_0x5b9b7e,_0x35a574)=>_0x2176b(_0x5b9b7e,_0x35a574,_0xf37478),$=(_0x46ecff,_0x4cfcb9,_0x133b53)=>ne(_0x46ecff,typeof _0x4cfcb9!=_0x32a7ff(0x1ff)?_0x4cfcb9+'':_0x4cfcb9,_0x133b53);let b=class extends _0x2a6c02{constructor(_0x1cdcd0=M,_0x3a9398,_0xb11557){const _0x2b6d41=_0x32a7ff;super(),this[_0x2b6d41(0x20d)]=_0x1cdcd0,this['_injector']=_0x3a9398,this[_0x2b6d41(0x1ce)]=_0xb11557;const {..._0x331ad3}=_0x422436({},M,this[_0x2b6d41(0x20d)]);this[_0x2b6d41(0x1ce)][_0x2b6d41(0x1e0)](z,_0x331ad3);}[_0x32a7ff(0x1ec)](){const _0xe69aef=_0x32a7ff;[[f],[g],[S]][_0xe69aef(0x209)](_0x4a279a=>{const _0x3bb59d=_0xe69aef;this['_injector'][_0x3bb59d(0x1d8)](_0x4a279a);});}[_0x32a7ff(0x201)](){const _0x56ad63=_0x32a7ff;this[_0x56ad63(0x224)]['get'](g),this[_0x56ad63(0x224)][_0x56ad63(0x1db)](S);}};$(b,'pluginName',W),$(b,_0x32a7ff(0x21d),_0x4064ee['UNIVER_UNKNOWN']),b=ie([_0x4a0c6a(_0x2a7d88,_0x338581,_0x15b30d),w(0x1,_0x2475b2(_0x47d10f)),w(0x2,_0x437ed1)],b);export{b as UniverThreadCommentDataSourcePlugin};function _0x30ac(){const _0x71516a=['Delete','deleteComment','_threadCommentDataSourceService','_commentService','_injector','_httpService','544BDgiNF','33732yyjZtZ','Solved','YYYY/MM/DD\x20HH:mm','resolveComment','_initDataSource','thread-comment-data-source.config','user','saveCommentToSnapshot','Solve','OpenOrReOpen','syncUpdateMutationToColla','_configService','Edit','customRanges','userId','getUser','replyId','replies','rangeId','content','Unknown','add','1193270GnIngF','/edit','get','38742LyifIV','requireSession','_init','pipe','setConfig','rangeType','delete','_initUserSync','8792OVfBBx','map','post','getUnit','find','_threadCommentModel','body','42dTtMmG','onStarting','listComments','format','_threadCommentDataSource','defineProperty','threadId','COMMENT','UNRECOGNIZED','solved','getCurrentUser','unitId','/add','2164170jvyxCC','Add','760116TsTOeF','personId','_sessionService','resolved','addUser','symbol','subscribe','onReady','slice','disposeWithMe','commentUpdate$','/reply','/delete','1428cPcHei','createTimestamp','forEach','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','root','length','_config','Reply','_userService','262706BeyBem','error','getComment','/universer-api/comment/unit/','/list','getOwnPropertyDescriptor','addComment','filter','ref','userID','getMemberID','users','parse','type','/universer-api/user/list','code'];_0x30ac=function(){return _0x71516a;};return _0x30ac();}
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x14833a=_0x4a63;(function(_0x20a77a,_0x546aa8){const _0x124c09=_0x4a63,_0x5eacba=_0x20a77a();while(!![]){try{const _0x4af4a8=-parseInt(_0x124c09(0x147))/0x1+-parseInt(_0x124c09(0x167))/0x2+parseInt(_0x124c09(0x183))/0x3+-parseInt(_0x124c09(0x18d))/0x4*(parseInt(_0x124c09(0x146))/0x5)+-parseInt(_0x124c09(0x168))/0x6+parseInt(_0x124c09(0x166))/0x7*(parseInt(_0x124c09(0x134))/0x8)+-parseInt(_0x124c09(0x182))/0x9*(-parseInt(_0x124c09(0x187))/0xa);if(_0x4af4a8===_0x546aa8)break;else _0x5eacba['push'](_0x5eacba['shift']());}catch(_0x22323f){_0x5eacba['push'](_0x5eacba['shift']());}}}(_0x5f52,0x2f70b));function _0x4a63(_0x31aa46,_0x3700d3){const _0x5f525a=_0x5f52();return _0x4a63=function(_0x4a63fa,_0x11bc5a){_0x4a63fa=_0x4a63fa-0x132;let _0x24fa90=_0x5f525a[_0x4a63fa];return _0x24fa90;},_0x4a63(_0x31aa46,_0x3700d3);}import{CommentService as _0x20b762,CollaborationSessionService as _0x393cb4,UniverCollaborationClientPlugin as _0x47e2ea}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x59e853}from'@univerjs-pro/license';import{dayjs as _0x13edec,UserManagerService as _0x5ac7c4,Inject as _0x213461,Injector as _0x546a36,Disposable as _0x5a8a80,CustomRangeType as _0x5e4eb4,UniverInstanceType as _0x53894a,DependentOn as _0xdc95db,IConfigService as _0x36f31f,Plugin as _0x1920b9,merge as _0x5e0245}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x842d8a}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x42e129,IThreadCommentDataSourceService as _0x2e1ad0}from'@univerjs/thread-comment';import{bufferTime as _0x2a3247}from'rxjs';import{HTTPService as _0x51a028}from'@univerjs/network';const W=_0x14833a(0x176);var I=(_0x40567c=>(_0x40567c[_0x40567c[_0x14833a(0x17a)]=0x0]=_0x14833a(0x17a),_0x40567c[_0x40567c[_0x14833a(0x17d)]=0x1]='Solved',_0x40567c[_0x40567c[_0x14833a(0x139)]=-0x1]=_0x14833a(0x139),_0x40567c))(I||{}),v=(_0x235091=>(_0x235091[_0x235091['Unknown']=0x0]='Unknown',_0x235091[_0x235091[_0x14833a(0x15b)]=0x1]=_0x14833a(0x15b),_0x235091[_0x235091[_0x14833a(0x14b)]=0x2]='Reply',_0x235091[_0x235091[_0x14833a(0x170)]=0x3]=_0x14833a(0x170),_0x235091[_0x235091[_0x14833a(0x188)]=0x4]=_0x14833a(0x188),_0x235091[_0x235091[_0x14833a(0x15a)]=0x5]=_0x14833a(0x15a),_0x235091[_0x235091[_0x14833a(0x139)]=-0x1]=_0x14833a(0x139),_0x235091))(v||{});const D=_0x1b35f8=>_0x13edec(new Date(+_0x1b35f8))['format'](_0x14833a(0x138)),B=async(_0x440578,_0x3c9c8e)=>{const _0xfac7cd=_0x14833a,_0x451680=_0x440578[_0xfac7cd(0x18f)](_0x5ac7c4),_0xcbec61=_0x440578[_0xfac7cd(0x18f)](_0x51a028);_0x3c9c8e[_0xfac7cd(0x164)](_0x1751cb=>{const _0x2e6ffb=_0xfac7cd;_0x451680[_0x2e6ffb(0x192)](_0x1751cb)&&_0x3c9c8e[_0x2e6ffb(0x184)](_0x1751cb);}),_0x3c9c8e[_0xfac7cd(0x186)]&&(await _0xcbec61['get'](_0xfac7cd(0x18a),{'params':{'userIDs':[..._0x3c9c8e]}}))[_0xfac7cd(0x172)][_0xfac7cd(0x143)]['forEach'](_0x3c54c4=>{const _0x255910=_0xfac7cd;_0x3c54c4&&_0x451680[_0x255910(0x16a)](_0x3c54c4);});};var K=Object[_0x14833a(0x185)],V=(_0x1767c2,_0x65c2d5,_0x439730,_0x575bb8)=>{for(var _0x1dba44=_0x575bb8>0x1?void 0x0:_0x575bb8?K(_0x65c2d5,_0x439730):_0x65c2d5,_0x316d67=_0x1767c2['length']-0x1,_0x1d85f4;_0x316d67>=0x0;_0x316d67--)(_0x1d85f4=_0x1767c2[_0x316d67])&&(_0x1dba44=_0x1d85f4(_0x1dba44)||_0x1dba44);return _0x1dba44;},p=(_0x42c1a0,_0x401ba)=>(_0x434179,_0x157519)=>_0x401ba(_0x434179,_0x157519,_0x42c1a0);let S=class extends _0x5a8a80{constructor(_0x13ccdd,_0x3c517e,_0x3fc544,_0x4b59e0){const _0x8ff93=_0x14833a;super(),this[_0x8ff93(0x155)]=_0x13ccdd,this[_0x8ff93(0x189)]=_0x3c517e,this[_0x8ff93(0x160)]=_0x3fc544,this[_0x8ff93(0x140)]=_0x4b59e0,this['_init'](),this[_0x8ff93(0x15c)]();}[_0x14833a(0x15c)](){const _0x56c678=_0x14833a;this['disposeWithMe'](this[_0x56c678(0x189)][_0x56c678(0x162)][_0x56c678(0x16c)](_0x2a3247(0x10))[_0x56c678(0x181)](_0x467d4a=>{const _0x252e74=_0x56c678,_0x2e8602=new Set();_0x467d4a[_0x252e74(0x164)](_0x539172=>{const _0x4f4926=_0x252e74;switch(_0x539172[_0x4f4926(0x190)]){case _0x4f4926(0x13d):{const _0x537593=_0x539172[_0x4f4926(0x175)][_0x4f4926(0x15d)];_0x2e8602['add'](_0x537593);break;}}}),B(this[_0x252e74(0x140)],_0x2e8602);}));}[_0x14833a(0x13f)](){const _0x2d224c=_0x14833a;this[_0x2d224c(0x13a)](this[_0x2d224c(0x155)][_0x2d224c(0x162)][_0x2d224c(0x181)](async _0x45c66f=>{const _0x518e40=_0x2d224c;var _0x1d4eb5,_0x240d9a,_0x394bd0,_0x4db90a;const _0x2d22ef=(_0x1d4eb5=this[_0x518e40(0x189)]['getUnit'](_0x45c66f[_0x518e40(0x17b)])[_0x518e40(0x152)](_0xdc5a37=>_0xdc5a37['threadId']===_0x45c66f[_0x518e40(0x14d)]))==null?void 0x0:_0x1d4eb5[_0x518e40(0x163)];if(!_0x2d22ef)return;const {unitId:_0x5557ff,subUnitId:_0x4f19ea}=_0x2d22ef;switch(_0x45c66f[_0x518e40(0x18c)]&&this[_0x518e40(0x160)]['addUser'](_0x45c66f[_0x518e40(0x18c)]),_0x45c66f[_0x518e40(0x190)]){case v[_0x518e40(0x15b)]:break;case v[_0x518e40(0x14b)]:{this[_0x518e40(0x189)][_0x518e40(0x159)](_0x5557ff,_0x4f19ea,{'unitId':_0x5557ff,'subUnitId':_0x4f19ea,'ref':'','id':_0x45c66f[_0x518e40(0x158)],'dT':D(+_0x45c66f[_0x518e40(0x17f)]),'threadId':_0x45c66f[_0x518e40(0x14d)],'personId':(_0x394bd0=(_0x240d9a=_0x45c66f[_0x518e40(0x18c)])==null?void 0x0:_0x240d9a['userID'])!=null?_0x394bd0:_0x45c66f['userId'],'text':JSON['parse'](_0x45c66f['content']),'parentId':_0x2d22ef['id']});break;}case v[_0x518e40(0x188)]:{const _0x3acb34=this[_0x518e40(0x189)][_0x518e40(0x151)](_0x5557ff,_0x4f19ea,_0x45c66f[_0x518e40(0x158)]);_0x3acb34&&_0x3acb34[_0x518e40(0x142)]&&this[_0x518e40(0x189)][_0x518e40(0x157)](_0x5557ff,_0x4f19ea,_0x45c66f[_0x518e40(0x158)]);break;}case v[_0x518e40(0x170)]:{this[_0x518e40(0x189)]['updateComment'](_0x5557ff,_0x4f19ea,{'commentId':_0x45c66f[_0x518e40(0x158)],'text':JSON[_0x518e40(0x144)](_0x45c66f[_0x518e40(0x191)])});break;}case v[_0x518e40(0x15a)]:{const _0x5caa73=(_0x4db90a=this[_0x518e40(0x189)]['getUnit'](_0x45c66f['unitId'])[_0x518e40(0x152)](_0x475461=>_0x475461['threadId']===_0x45c66f[_0x518e40(0x14d)]))==null?void 0x0:_0x4db90a['root'];_0x5caa73&&this['_threadCommentModel'][_0x518e40(0x16f)](_0x5557ff,_0x4f19ea,_0x5caa73['id'],_0x45c66f[_0x518e40(0x177)]===I['Solved']);break;}}}));}};function _0x5f52(){const _0x544929=['OpenOrReOpen','unitId','COMMENT','Solved','onStarting','createTimestamp','setConfig','subscribe','18vBZUYd','921015bFwpYM','delete','getOwnPropertyDescriptor','size','3188270mJFGRG','Delete','_threadCommentModel','/universer-api/user/list','userId','user','33588kicxbE','rangeType','get','type','content','getUser','symbol','code','440NqHmHM','_sessionService','/reply','saveCommentToSnapshot','YYYY/MM/DD\x20HH:mm','UNRECOGNIZED','disposeWithMe','customRanges','listComments','add','_threadCommentDataSourceService','_init','_injector','replies','parentId','users','parse','getMemberID','185wcPeoQ','382997nAuXSn','comment','dataSource','slice','Reply','/add','threadId','map','_initDataSource','syncUpdateMutationToColla','getComment','find','onReady','defineProperty','_commentService','stringify','deleteComment','replyId','addComment','Solve','Add','_initUserSync','personId','error','getCurrentUser','_userService','rangeId','commentUpdate$','root','forEach','/edit','9947aVZRCb','130122PLItPu','418512fZGCUg','/universer-api/comment/unit/','addUser','reply','pipe','length','filter','resolveComment','Edit','thread-comment-data-source.config','body','post','requireSession','payload','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','solved','_httpService','_config'];_0x5f52=function(){return _0x544929;};return _0x5f52();}S=V([p(0x0,_0x213461(_0x20b762)),p(0x1,_0x213461(_0x42e129)),p(0x2,_0x213461(_0x5ac7c4)),p(0x3,_0x213461(_0x546a36))],S);const z=_0x14833a(0x171),M={};var k=Object[_0x14833a(0x185)],Q=(_0x2b70a2,_0x446fd2,_0x2019ae,_0x2ac8f5)=>{for(var _0x33258d=_0x2ac8f5>0x1?void 0x0:_0x2ac8f5?k(_0x446fd2,_0x2019ae):_0x446fd2,_0x502014=_0x2b70a2['length']-0x1,_0x558e42;_0x502014>=0x0;_0x502014--)(_0x558e42=_0x2b70a2[_0x502014])&&(_0x33258d=_0x558e42(_0x33258d)||_0x33258d);return _0x33258d;},_=(_0x16931c,_0x557808)=>(_0x1b24a8,_0x5a4d3f)=>_0x557808(_0x1b24a8,_0x5a4d3f,_0x16931c);function X(_0x2afc59,_0x574a6c){const _0x3c8ec1=_0x14833a,_0x1940c4=_0x2afc59[_0x3c8ec1(0x141)][0x0];return{..._0x574a6c,'id':_0x1940c4['replyId'],'resolved':_0x2afc59[_0x3c8ec1(0x177)]===0x1,'dT':D(_0x1940c4[_0x3c8ec1(0x17f)]),'personId':_0x1940c4[_0x3c8ec1(0x18b)],'threadId':_0x1940c4[_0x3c8ec1(0x14d)]};}function ee(_0x1b5e60,_0x2b3403,_0x86cecb){const _0x14ccc0=_0x14833a;var _0x21130f,_0x42fd16;if(((_0x42fd16=(_0x21130f=_0x1b5e60==null?void 0x0:_0x1b5e60[_0x14ccc0(0x141)])==null?void 0x0:_0x21130f[_0x14ccc0(0x16d)])!=null?_0x42fd16:0x0)>0x0){const _0x302ccc=(_0x146b9d,_0x2e49f0)=>({'id':_0x146b9d[_0x14ccc0(0x158)],'threadId':_0x146b9d[_0x14ccc0(0x14d)],'dT':D(_0x146b9d['createTimestamp']),'personId':_0x146b9d[_0x14ccc0(0x18b)],'resolved':_0x1b5e60[_0x14ccc0(0x177)]===I['Solved'],'unitId':_0x2b3403,'subUnitId':_0x86cecb,'text':JSON[_0x14ccc0(0x144)](_0x146b9d[_0x14ccc0(0x191)]),'parentId':_0x2e49f0}),_0x5d2172=_0x302ccc(_0x1b5e60[_0x14ccc0(0x141)][0x0]);return{..._0x5d2172,'children':_0x1b5e60[_0x14ccc0(0x141)][_0x14ccc0(0x14a)](0x1)[_0x14ccc0(0x14e)](_0x3d8fdc=>_0x302ccc(_0x3d8fdc,_0x5d2172['id']))};}return null;}let f=class{constructor(_0xb1722,_0x16126b,_0x48a3c6,_0x482b2a){const _0x5df556=_0x14833a;this[_0x5df556(0x178)]=_0xb1722,this[_0x5df556(0x160)]=_0x16126b,this['_sessionService']=_0x48a3c6,this['_injector']=_0x482b2a;}async['addComment'](_0x57d711){const _0x1edfba=_0x14833a;var _0x25ee01,_0x5a9f77;const {parentId:_0x2b8c7e,unitId:_0x1bc8a6,text:_0x33ef6d,threadId:_0x44acaa}=_0x57d711,_0x323dde=(_0x5a9f77=(_0x25ee01=_0x33ef6d['customRanges'])==null?void 0x0:_0x25ee01[_0x1edfba(0x16e)](_0x1b2582=>_0x1b2582[_0x1edfba(0x18e)]===_0x5e4eb4[_0x1edfba(0x17c)])[_0x1edfba(0x14e)](_0x11ef51=>_0x11ef51[_0x1edfba(0x161)]))!=null?_0x5a9f77:[],_0x167f97=JSON[_0x1edfba(0x156)](_0x33ef6d),_0x1611cf=(await this[_0x1edfba(0x135)]['requireSession'](_0x1bc8a6))[_0x1edfba(0x145)]();if(_0x2b8c7e){const _0x3ba3af={'memberId':_0x1611cf,'unitId':_0x1bc8a6,'content':_0x167f97,'mention':_0x323dde,'threadId':_0x44acaa},_0x49be2e=(await this[_0x1edfba(0x178)]['post']('/universer-api/comment/unit/'+_0x1bc8a6+_0x1edfba(0x136),{'body':_0x3ba3af}))['body'][_0x1edfba(0x16b)];return{..._0x57d711,'id':_0x49be2e['replyId'],'dT':_0x13edec(+_0x49be2e[_0x1edfba(0x17f)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x49be2e[_0x1edfba(0x18b)]};}else{const _0x3a0aec={'memberId':_0x1611cf,'unitId':_0x1bc8a6,'content':_0x167f97,'mention':_0x323dde},_0x58022c=await this[_0x1edfba(0x178)][_0x1edfba(0x173)](_0x1edfba(0x169)+_0x1bc8a6+_0x1edfba(0x14c),{'body':_0x3a0aec});return X(_0x58022c[_0x1edfba(0x172)][_0x1edfba(0x148)],_0x57d711);}}async['updateComment'](_0x136461){const _0x3a6ff2=_0x14833a;var _0x5519ae,_0x54a7c7;const {text:_0x4369b9,unitId:_0x19fa84}=_0x136461,_0x586b36=(_0x54a7c7=(_0x5519ae=_0x4369b9[_0x3a6ff2(0x13b)])==null?void 0x0:_0x5519ae[_0x3a6ff2(0x16e)](_0x53fd6a=>_0x53fd6a[_0x3a6ff2(0x18e)]===_0x5e4eb4[_0x3a6ff2(0x17c)])['map'](_0x37eed5=>_0x37eed5['rangeId']))!=null?_0x54a7c7:[],_0xa25844=JSON[_0x3a6ff2(0x156)](_0x4369b9),_0x35f8c7=_0x136461[_0x3a6ff2(0x14d)],_0x350486=_0x136461['id'],_0x4b41b0={'memberId':(await this[_0x3a6ff2(0x135)][_0x3a6ff2(0x174)](_0x19fa84))[_0x3a6ff2(0x145)](),'unitId':_0x19fa84,'threadId':_0x35f8c7,'mention':_0x586b36,'content':_0xa25844,'replyId':_0x350486},_0x18a2e5=await this['_httpService'][_0x3a6ff2(0x173)](_0x3a6ff2(0x169)+_0x19fa84+_0x3a6ff2(0x165),{'body':_0x4b41b0});return!_0x18a2e5[_0x3a6ff2(0x172)][_0x3a6ff2(0x15e)]||_0x18a2e5[_0x3a6ff2(0x172)][_0x3a6ff2(0x15e)]['code']===0x1;}async['resolveComment'](_0x492c93){const _0x4f5186=_0x14833a,{unitId:_0x933624}=_0x492c93,_0x28b1c1=_0x492c93[_0x4f5186(0x14d)],_0x52222a={'memberId':this['_userService'][_0x4f5186(0x15f)]()['userID'],'unitId':_0x933624,'threadId':_0x28b1c1,'solved':_0x492c93['resolved']?I[_0x4f5186(0x17d)]:I[_0x4f5186(0x17a)]},_0x1c333a=await this[_0x4f5186(0x178)][_0x4f5186(0x173)](_0x4f5186(0x169)+_0x933624+'/solved',{'body':_0x52222a});return!_0x1c333a[_0x4f5186(0x172)][_0x4f5186(0x15e)]||_0x1c333a['body']['error']['code']===0x1;}async[_0x14833a(0x157)](_0x2d5c38,_0x546761,_0x50e554,_0x3dcb0d){const _0x4104a3=_0x14833a,_0x56e9ba={'memberId':(await this['_sessionService'][_0x4104a3(0x174)](_0x2d5c38))[_0x4104a3(0x145)](),'threadId':_0x50e554,'replyId':_0x3dcb0d,'unitId':_0x2d5c38},_0x3c549e=await this[_0x4104a3(0x178)][_0x4104a3(0x173)](_0x4104a3(0x169)+_0x2d5c38+'/delete',{'body':_0x56e9ba});return!_0x3c549e['body']['error']||_0x3c549e[_0x4104a3(0x172)]['error'][_0x4104a3(0x133)]===0x1;}async[_0x14833a(0x13c)](_0x5fcd3c,_0x8144a7,_0x796f76){const _0x541b21=_0x14833a,_0x28e21e={'unitId':_0x5fcd3c,'threadId':_0x796f76},_0xae2a5e=await this[_0x541b21(0x178)][_0x541b21(0x173)](_0x541b21(0x169)+_0x5fcd3c+'/list',{'body':_0x28e21e}),_0x9f747b=_0x796f76[_0x541b21(0x14e)](_0x30f02a=>ee(_0xae2a5e[_0x541b21(0x172)]['comments'][_0x30f02a],_0x5fcd3c,_0x8144a7))[_0x541b21(0x16e)](Boolean);return Object['values'](_0xae2a5e[_0x541b21(0x172)][_0x541b21(0x143)])[_0x541b21(0x164)](_0x3edc7a=>{const _0x1333fc=_0x541b21;this[_0x1333fc(0x160)][_0x1333fc(0x16a)](_0x3edc7a);}),_0x9f747b;}[_0x14833a(0x137)](_0x35d9ba){return{'id':_0x35d9ba['id'],'threadId':_0x35d9ba['threadId'],'ref':_0x35d9ba['ref']};}};f=Q([_(0x0,_0x213461(_0x51a028)),_(0x1,_0x213461(_0x5ac7c4)),_(0x2,_0x213461(_0x393cb4)),_(0x3,_0x213461(_0x546a36))],f);var re=Object['getOwnPropertyDescriptor'],te=(_0x36fe1b,_0xa1fb39,_0x2b52fa,_0x3e6429)=>{const _0x2864cc=_0x14833a;for(var _0x241c6e=_0x3e6429>0x1?void 0x0:_0x3e6429?re(_0xa1fb39,_0x2b52fa):_0xa1fb39,_0x5122fc=_0x36fe1b[_0x2864cc(0x16d)]-0x1,_0x5b7c65;_0x5122fc>=0x0;_0x5122fc--)(_0x5b7c65=_0x36fe1b[_0x5122fc])&&(_0x241c6e=_0x5b7c65(_0x241c6e)||_0x241c6e);return _0x241c6e;},N=(_0x184d04,_0xa557b1)=>(_0x478acb,_0x222af2)=>_0xa557b1(_0x478acb,_0x222af2,_0x184d04);let g=class extends _0x5a8a80{constructor(_0x5401f4,_0x490cf6){const _0x28079d=_0x14833a;super(),this[_0x28079d(0x13e)]=_0x5401f4,this['_threadCommentDataSource']=_0x490cf6,this[_0x28079d(0x14f)]();}['_initDataSource'](){const _0x27f3ba=_0x14833a;this['_threadCommentDataSourceService'][_0x27f3ba(0x149)]=this['_threadCommentDataSource'],this[_0x27f3ba(0x13e)][_0x27f3ba(0x150)]=!0x1;}};g=te([N(0x0,_0x2e1ad0),N(0x1,_0x213461(f))],g);var se=Object[_0x14833a(0x154)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x136488,_0x513d52,_0xaefdb)=>_0x513d52 in _0x136488?se(_0x136488,_0x513d52,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xaefdb}):_0x136488[_0x513d52]=_0xaefdb,ie=(_0x3a2777,_0x254b3f,_0x4eb568,_0x9d4562)=>{const _0x142479=_0x14833a;for(var _0x16dbab=_0x9d4562>0x1?void 0x0:_0x9d4562?oe(_0x254b3f,_0x4eb568):_0x254b3f,_0x2f6fcf=_0x3a2777[_0x142479(0x16d)]-0x1,_0x179a2e;_0x2f6fcf>=0x0;_0x2f6fcf--)(_0x179a2e=_0x3a2777[_0x2f6fcf])&&(_0x16dbab=_0x179a2e(_0x16dbab)||_0x16dbab);return _0x16dbab;},w=(_0x4e18dc,_0x15bf6a)=>(_0x1d600a,_0x112797)=>_0x15bf6a(_0x1d600a,_0x112797,_0x4e18dc),$=(_0x2b4eed,_0x669232,_0x3e5a80)=>ne(_0x2b4eed,typeof _0x669232!=_0x14833a(0x132)?_0x669232+'':_0x669232,_0x3e5a80);let b=class extends _0x1920b9{constructor(_0x5aa5bf=M,_0xa4d11c,_0x4b335f){const _0x39425d=_0x14833a;super(),this[_0x39425d(0x179)]=_0x5aa5bf,this['_injector']=_0xa4d11c,this['_configService']=_0x4b335f;const {..._0x45fcc1}=_0x5e0245({},M,this['_config']);this['_configService'][_0x39425d(0x180)](z,_0x45fcc1);}[_0x14833a(0x17e)](){const _0x2f6936=_0x14833a;[[f],[g],[S]][_0x2f6936(0x164)](_0x5722e0=>{const _0x3a40a1=_0x2f6936;this[_0x3a40a1(0x140)][_0x3a40a1(0x13d)](_0x5722e0);});}[_0x14833a(0x153)](){const _0x32c449=_0x14833a;this[_0x32c449(0x140)][_0x32c449(0x18f)](g),this[_0x32c449(0x140)][_0x32c449(0x18f)](S);}};$(b,'pluginName',W),$(b,_0x14833a(0x190),_0x53894a['UNIVER_UNKNOWN']),b=ie([_0xdc95db(_0x842d8a,_0x47e2ea,_0x59e853),w(0x1,_0x213461(_0x546a36)),w(0x2,_0x36f31f)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x32a7ff=_0x3945;(function(_0x366aa5,_0x5b653b){const _0x77e27f=_0x3945,_0x420f8a=_0x366aa5();while(!![]){try{const _0x261c63=-parseInt(_0x77e27f(0x210))/0x1+-parseInt(_0x77e27f(0x1eb))/0x2*(-parseInt(_0x77e27f(0x1dc))/0x3)+parseInt(_0x77e27f(0x1fa))/0x4+parseInt(_0x77e27f(0x1d9))/0x5+parseInt(_0x77e27f(0x207))/0x6*(-parseInt(_0x77e27f(0x1e4))/0x7)+parseInt(_0x77e27f(0x226))/0x8*(parseInt(_0x77e27f(0x227))/0x9)+-parseInt(_0x77e27f(0x1f8))/0xa;if(_0x261c63===_0x5b653b)break;else _0x420f8a['push'](_0x420f8a['shift']());}catch(_0x2f90b2){_0x420f8a['push'](_0x420f8a['shift']());}}}(_0x30ac,0x2b232));import{CommentService as _0x519eb2,CollaborationSessionService as _0x151b72,UniverCollaborationClientPlugin as _0x338581}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x15b30d}from'@univerjs-pro/license';import{dayjs as _0xa0be3d,UserManagerService as _0x1e4b01,Inject as _0x2475b2,Injector as _0x47d10f,Disposable as _0xeb494b,CustomRangeType as _0x56c0d1,UniverInstanceType as _0x4064ee,DependentOn as _0x4a0c6a,IConfigService as _0x437ed1,Plugin as _0x2a6c02,merge as _0x422436}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x2a7d88}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0xbdbc24,IThreadCommentDataSourceService as _0xc0fe7}from'@univerjs/thread-comment';function _0x3945(_0x3aca3e,_0x17cb39){const _0x30ac00=_0x30ac();return _0x3945=function(_0x39450e,_0x33771b){_0x39450e=_0x39450e-0x1c9;let _0x5b5ba1=_0x30ac00[_0x39450e];return _0x5b5ba1;},_0x3945(_0x3aca3e,_0x17cb39);}import{bufferTime as _0x197a16}from'rxjs';import{HTTPService as _0x3424be}from'@univerjs/network';const W=_0x32a7ff(0x20a);var I=(_0x3bdf77=>(_0x3bdf77[_0x3bdf77[_0x32a7ff(0x1cc)]=0x0]=_0x32a7ff(0x1cc),_0x3bdf77[_0x3bdf77['Solved']=0x1]=_0x32a7ff(0x228),_0x3bdf77[_0x3bdf77[_0x32a7ff(0x1f3)]=-0x1]='UNRECOGNIZED',_0x3bdf77))(I||{}),v=(_0x1216cf=>(_0x1216cf[_0x1216cf['Unknown']=0x0]=_0x32a7ff(0x1d7),_0x1216cf[_0x1216cf['Add']=0x1]='Add',_0x1216cf[_0x1216cf['Reply']=0x2]=_0x32a7ff(0x20e),_0x1216cf[_0x1216cf[_0x32a7ff(0x1cf)]=0x3]=_0x32a7ff(0x1cf),_0x1216cf[_0x1216cf['Delete']=0x4]=_0x32a7ff(0x220),_0x1216cf[_0x1216cf[_0x32a7ff(0x1cb)]=0x5]='Solve',_0x1216cf[_0x1216cf[_0x32a7ff(0x1f3)]=-0x1]=_0x32a7ff(0x1f3),_0x1216cf))(v||{});const D=_0x22fb64=>_0xa0be3d(new Date(+_0x22fb64))[_0x32a7ff(0x1ee)](_0x32a7ff(0x229)),B=async(_0x19c3be,_0x1c7b54)=>{const _0x5a23c4=_0x32a7ff,_0x4c37e1=_0x19c3be['get'](_0x1e4b01),_0x304e80=_0x19c3be['get'](_0x3424be);_0x1c7b54[_0x5a23c4(0x209)](_0x55d247=>{const _0x41aa12=_0x5a23c4;_0x4c37e1[_0x41aa12(0x1d2)](_0x55d247)&&_0x1c7b54[_0x41aa12(0x1e2)](_0x55d247);}),_0x1c7b54['size']&&(await _0x304e80[_0x5a23c4(0x1db)](_0x5a23c4(0x21e),{'params':{'userIDs':[..._0x1c7b54]}}))[_0x5a23c4(0x1ea)][_0x5a23c4(0x21b)][_0x5a23c4(0x209)](_0x58ae8f=>{_0x58ae8f&&_0x4c37e1['addUser'](_0x58ae8f);});};var K=Object[_0x32a7ff(0x215)],V=(_0x216bfa,_0x2036b1,_0x37f67c,_0x525c68)=>{const _0x4ff8de=_0x32a7ff;for(var _0x492980=_0x525c68>0x1?void 0x0:_0x525c68?K(_0x2036b1,_0x37f67c):_0x2036b1,_0x19b794=_0x216bfa[_0x4ff8de(0x20c)]-0x1,_0x17bdec;_0x19b794>=0x0;_0x19b794--)(_0x17bdec=_0x216bfa[_0x19b794])&&(_0x492980=_0x17bdec(_0x492980)||_0x492980);return _0x492980;},p=(_0x42a395,_0x5a9773)=>(_0x3627a0,_0x41a55f)=>_0x5a9773(_0x3627a0,_0x41a55f,_0x42a395);let S=class extends _0xeb494b{constructor(_0x19dad7,_0x37e7c2,_0x441d7c,_0x91f2ed){const _0x51da24=_0x32a7ff;super(),this['_commentService']=_0x19dad7,this[_0x51da24(0x1e9)]=_0x37e7c2,this['_userService']=_0x441d7c,this[_0x51da24(0x224)]=_0x91f2ed,this[_0x51da24(0x1de)](),this[_0x51da24(0x1e3)]();}['_initUserSync'](){const _0x3e80e7=_0x32a7ff;this[_0x3e80e7(0x203)](this['_threadCommentModel']['commentUpdate$'][_0x3e80e7(0x1df)](_0x197a16(0x10))[_0x3e80e7(0x200)](_0x44701b=>{const _0xb36498=_0x3e80e7,_0x276818=new Set();_0x44701b[_0xb36498(0x209)](_0x389e82=>{const _0xb84afc=_0xb36498;switch(_0x389e82[_0xb84afc(0x21d)]){case _0xb84afc(0x1d8):{const _0x5b605f=_0x389e82['payload'][_0xb84afc(0x1fb)];_0x276818[_0xb84afc(0x1d8)](_0x5b605f);break;}}}),B(this[_0xb36498(0x224)],_0x276818);}));}[_0x32a7ff(0x1de)](){const _0x36a362=_0x32a7ff;this[_0x36a362(0x203)](this[_0x36a362(0x223)][_0x36a362(0x204)][_0x36a362(0x200)](async _0x163c9b=>{const _0x2f7b6d=_0x36a362;var _0x422ea4,_0x2138b4,_0x6eee83,_0x339e0a;const _0x3b4994=(_0x422ea4=this[_0x2f7b6d(0x1e9)]['getUnit'](_0x163c9b[_0x2f7b6d(0x1f6)])[_0x2f7b6d(0x1e8)](_0x116fd4=>_0x116fd4[_0x2f7b6d(0x1f1)]===_0x163c9b[_0x2f7b6d(0x1f1)]))==null?void 0x0:_0x422ea4[_0x2f7b6d(0x20b)];if(!_0x3b4994)return;const {unitId:_0x537a7f,subUnitId:_0x26b6cb}=_0x3b4994;switch(_0x163c9b[_0x2f7b6d(0x1c9)]&&this['_userService'][_0x2f7b6d(0x1fe)](_0x163c9b[_0x2f7b6d(0x1c9)]),_0x163c9b['type']){case v[_0x2f7b6d(0x1f9)]:break;case v['Reply']:{this[_0x2f7b6d(0x1e9)][_0x2f7b6d(0x216)](_0x537a7f,_0x26b6cb,{'unitId':_0x537a7f,'subUnitId':_0x26b6cb,'ref':'','id':_0x163c9b[_0x2f7b6d(0x1d3)],'dT':D(+_0x163c9b[_0x2f7b6d(0x208)]),'threadId':_0x163c9b[_0x2f7b6d(0x1f1)],'personId':(_0x6eee83=(_0x2138b4=_0x163c9b[_0x2f7b6d(0x1c9)])==null?void 0x0:_0x2138b4[_0x2f7b6d(0x219)])!=null?_0x6eee83:_0x163c9b[_0x2f7b6d(0x1d1)],'text':JSON[_0x2f7b6d(0x21c)](_0x163c9b[_0x2f7b6d(0x1d6)]),'parentId':_0x3b4994['id']});break;}case v[_0x2f7b6d(0x220)]:{const _0x1c4589=this[_0x2f7b6d(0x1e9)][_0x2f7b6d(0x212)](_0x537a7f,_0x26b6cb,_0x163c9b[_0x2f7b6d(0x1d3)]);_0x1c4589&&_0x1c4589['parentId']&&this['_threadCommentModel'][_0x2f7b6d(0x221)](_0x537a7f,_0x26b6cb,_0x163c9b[_0x2f7b6d(0x1d3)]);break;}case v[_0x2f7b6d(0x1cf)]:{this[_0x2f7b6d(0x1e9)]['updateComment'](_0x537a7f,_0x26b6cb,{'commentId':_0x163c9b[_0x2f7b6d(0x1d3)],'text':JSON[_0x2f7b6d(0x21c)](_0x163c9b[_0x2f7b6d(0x1d6)])});break;}case v[_0x2f7b6d(0x1cb)]:{const _0x5007e8=(_0x339e0a=this[_0x2f7b6d(0x1e9)][_0x2f7b6d(0x1e7)](_0x163c9b['unitId'])[_0x2f7b6d(0x1e8)](_0x1e5e77=>_0x1e5e77[_0x2f7b6d(0x1f1)]===_0x163c9b[_0x2f7b6d(0x1f1)]))==null?void 0x0:_0x339e0a[_0x2f7b6d(0x20b)];_0x5007e8&&this[_0x2f7b6d(0x1e9)][_0x2f7b6d(0x22a)](_0x537a7f,_0x26b6cb,_0x5007e8['id'],_0x163c9b['solved']===I['Solved']);break;}}}));}};S=V([p(0x0,_0x2475b2(_0x519eb2)),p(0x1,_0x2475b2(_0xbdbc24)),p(0x2,_0x2475b2(_0x1e4b01)),p(0x3,_0x2475b2(_0x47d10f))],S);const z=_0x32a7ff(0x22c),M={};var k=Object[_0x32a7ff(0x215)],Q=(_0x47df19,_0x124d11,_0x371c58,_0x3a63e8)=>{for(var _0x10fd1f=_0x3a63e8>0x1?void 0x0:_0x3a63e8?k(_0x124d11,_0x371c58):_0x124d11,_0x4a5d93=_0x47df19['length']-0x1,_0x1608b7;_0x4a5d93>=0x0;_0x4a5d93--)(_0x1608b7=_0x47df19[_0x4a5d93])&&(_0x10fd1f=_0x1608b7(_0x10fd1f)||_0x10fd1f);return _0x10fd1f;},_=(_0x2287df,_0x133aa9)=>(_0x121d7c,_0x2edc8b)=>_0x133aa9(_0x121d7c,_0x2edc8b,_0x2287df);function X(_0x101fd1,_0x23dc50){const _0x546693=_0x32a7ff,_0x3312d7=_0x101fd1[_0x546693(0x1d4)][0x0];return{..._0x23dc50,'id':_0x3312d7[_0x546693(0x1d3)],'resolved':_0x101fd1[_0x546693(0x1f4)]===0x1,'dT':D(_0x3312d7['createTimestamp']),'personId':_0x3312d7[_0x546693(0x1d1)],'threadId':_0x3312d7['threadId']};}function ee(_0x68e04e,_0x14cd4c,_0x4ec284){const _0x2904ac=_0x32a7ff;var _0x459c9c,_0x5366a6;if(((_0x5366a6=(_0x459c9c=_0x68e04e==null?void 0x0:_0x68e04e[_0x2904ac(0x1d4)])==null?void 0x0:_0x459c9c[_0x2904ac(0x20c)])!=null?_0x5366a6:0x0)>0x0){const _0x32741a=(_0x5cdca8,_0x35b7d1)=>({'id':_0x5cdca8[_0x2904ac(0x1d3)],'threadId':_0x5cdca8[_0x2904ac(0x1f1)],'dT':D(_0x5cdca8[_0x2904ac(0x208)]),'personId':_0x5cdca8['userId'],'resolved':_0x68e04e[_0x2904ac(0x1f4)]===I['Solved'],'unitId':_0x14cd4c,'subUnitId':_0x4ec284,'text':JSON[_0x2904ac(0x21c)](_0x5cdca8[_0x2904ac(0x1d6)]),'parentId':_0x35b7d1}),_0x5b43a1=_0x32741a(_0x68e04e[_0x2904ac(0x1d4)][0x0]);return{..._0x5b43a1,'children':_0x68e04e[_0x2904ac(0x1d4)][_0x2904ac(0x202)](0x1)[_0x2904ac(0x1e5)](_0x12d514=>_0x32741a(_0x12d514,_0x5b43a1['id']))};}return null;}let f=class{constructor(_0x2c9fcb,_0x5508d7,_0x1f1de4,_0x22e695){const _0x3333=_0x32a7ff;this[_0x3333(0x225)]=_0x2c9fcb,this['_userService']=_0x5508d7,this['_sessionService']=_0x1f1de4,this[_0x3333(0x224)]=_0x22e695;}async[_0x32a7ff(0x216)](_0x519a00){const _0x1f0fbc=_0x32a7ff;var _0x40fd2a,_0x4b80bd;const {parentId:_0x2c2049,unitId:_0x22be40,text:_0x1a0d47,threadId:_0x468a4f}=_0x519a00,_0x229d9f=(_0x4b80bd=(_0x40fd2a=_0x1a0d47[_0x1f0fbc(0x1d0)])==null?void 0x0:_0x40fd2a[_0x1f0fbc(0x217)](_0x3245d9=>_0x3245d9[_0x1f0fbc(0x1e1)]===_0x56c0d1[_0x1f0fbc(0x1f2)])[_0x1f0fbc(0x1e5)](_0x488c00=>_0x488c00[_0x1f0fbc(0x1d5)]))!=null?_0x4b80bd:[],_0x4aa98f=JSON['stringify'](_0x1a0d47),_0x39e85d=(await this[_0x1f0fbc(0x1fc)][_0x1f0fbc(0x1dd)](_0x22be40))[_0x1f0fbc(0x21a)]();if(_0x2c2049){const _0x48eb78={'memberId':_0x39e85d,'unitId':_0x22be40,'content':_0x4aa98f,'mention':_0x229d9f,'threadId':_0x468a4f},_0x250faa=(await this['_httpService'][_0x1f0fbc(0x1e6)](_0x1f0fbc(0x213)+_0x22be40+_0x1f0fbc(0x205),{'body':_0x48eb78}))[_0x1f0fbc(0x1ea)]['reply'];return{..._0x519a00,'id':_0x250faa['replyId'],'dT':_0xa0be3d(+_0x250faa[_0x1f0fbc(0x208)])['format'](_0x1f0fbc(0x229)),'personId':_0x250faa['userId']};}else{const _0x3e2cda={'memberId':_0x39e85d,'unitId':_0x22be40,'content':_0x4aa98f,'mention':_0x229d9f},_0x17a043=await this[_0x1f0fbc(0x225)]['post'](_0x1f0fbc(0x213)+_0x22be40+_0x1f0fbc(0x1f7),{'body':_0x3e2cda});return X(_0x17a043[_0x1f0fbc(0x1ea)]['comment'],_0x519a00);}}async['updateComment'](_0x289826){const _0x3fd22a=_0x32a7ff;var _0x50ca53,_0x1d87e3;const {text:_0x126eed,unitId:_0x4889aa}=_0x289826,_0x538ee1=(_0x1d87e3=(_0x50ca53=_0x126eed[_0x3fd22a(0x1d0)])==null?void 0x0:_0x50ca53[_0x3fd22a(0x217)](_0x15097a=>_0x15097a[_0x3fd22a(0x1e1)]===_0x56c0d1[_0x3fd22a(0x1f2)])[_0x3fd22a(0x1e5)](_0x59ab04=>_0x59ab04['rangeId']))!=null?_0x1d87e3:[],_0xc10af=JSON['stringify'](_0x126eed),_0x475abe=_0x289826[_0x3fd22a(0x1f1)],_0x161ca5=_0x289826['id'],_0x202b92={'memberId':(await this[_0x3fd22a(0x1fc)][_0x3fd22a(0x1dd)](_0x4889aa))[_0x3fd22a(0x21a)](),'unitId':_0x4889aa,'threadId':_0x475abe,'mention':_0x538ee1,'content':_0xc10af,'replyId':_0x161ca5},_0x4aa5c3=await this[_0x3fd22a(0x225)][_0x3fd22a(0x1e6)](_0x3fd22a(0x213)+_0x4889aa+_0x3fd22a(0x1da),{'body':_0x202b92});return!_0x4aa5c3[_0x3fd22a(0x1ea)][_0x3fd22a(0x211)]||_0x4aa5c3[_0x3fd22a(0x1ea)][_0x3fd22a(0x211)][_0x3fd22a(0x21f)]===0x1;}async[_0x32a7ff(0x22a)](_0x1b92b1){const _0x4582f6=_0x32a7ff,{unitId:_0x17f432}=_0x1b92b1,_0x4c6cfb=_0x1b92b1[_0x4582f6(0x1f1)],_0x206e0b={'memberId':this[_0x4582f6(0x20f)][_0x4582f6(0x1f5)]()[_0x4582f6(0x219)],'unitId':_0x17f432,'threadId':_0x4c6cfb,'solved':_0x1b92b1[_0x4582f6(0x1fd)]?I[_0x4582f6(0x228)]:I[_0x4582f6(0x1cc)]},_0x45d3e0=await this[_0x4582f6(0x225)][_0x4582f6(0x1e6)](_0x4582f6(0x213)+_0x17f432+'/solved',{'body':_0x206e0b});return!_0x45d3e0[_0x4582f6(0x1ea)][_0x4582f6(0x211)]||_0x45d3e0['body']['error']['code']===0x1;}async['deleteComment'](_0x3839e6,_0x385451,_0x4be3f9,_0x4f57ac){const _0x4c02ab=_0x32a7ff,_0x18573f={'memberId':(await this[_0x4c02ab(0x1fc)][_0x4c02ab(0x1dd)](_0x3839e6))['getMemberID'](),'threadId':_0x4be3f9,'replyId':_0x4f57ac,'unitId':_0x3839e6},_0x3b1a80=await this[_0x4c02ab(0x225)][_0x4c02ab(0x1e6)](_0x4c02ab(0x213)+_0x3839e6+_0x4c02ab(0x206),{'body':_0x18573f});return!_0x3b1a80[_0x4c02ab(0x1ea)][_0x4c02ab(0x211)]||_0x3b1a80[_0x4c02ab(0x1ea)][_0x4c02ab(0x211)][_0x4c02ab(0x21f)]===0x1;}async[_0x32a7ff(0x1ed)](_0x3a8e6a,_0x586a87,_0x432098){const _0x346abf=_0x32a7ff,_0x22dbee={'unitId':_0x3a8e6a,'threadId':_0x432098},_0x4e8632=await this[_0x346abf(0x225)]['post'](_0x346abf(0x213)+_0x3a8e6a+_0x346abf(0x214),{'body':_0x22dbee}),_0x3f6423=_0x432098['map'](_0xe4970c=>ee(_0x4e8632[_0x346abf(0x1ea)]['comments'][_0xe4970c],_0x3a8e6a,_0x586a87))[_0x346abf(0x217)](Boolean);return Object['values'](_0x4e8632['body']['users'])['forEach'](_0x5b30e2=>{const _0x53fb03=_0x346abf;this[_0x53fb03(0x20f)][_0x53fb03(0x1fe)](_0x5b30e2);}),_0x3f6423;}[_0x32a7ff(0x1ca)](_0x301ddf){const _0x27e651=_0x32a7ff;return{'id':_0x301ddf['id'],'threadId':_0x301ddf[_0x27e651(0x1f1)],'ref':_0x301ddf[_0x27e651(0x218)]};}};f=Q([_(0x0,_0x2475b2(_0x3424be)),_(0x1,_0x2475b2(_0x1e4b01)),_(0x2,_0x2475b2(_0x151b72)),_(0x3,_0x2475b2(_0x47d10f))],f);var re=Object[_0x32a7ff(0x215)],te=(_0x5a276d,_0x29e49f,_0x1449c1,_0x211a35)=>{const _0x5803b0=_0x32a7ff;for(var _0xfd379c=_0x211a35>0x1?void 0x0:_0x211a35?re(_0x29e49f,_0x1449c1):_0x29e49f,_0x3d39d8=_0x5a276d[_0x5803b0(0x20c)]-0x1,_0x5afa4e;_0x3d39d8>=0x0;_0x3d39d8--)(_0x5afa4e=_0x5a276d[_0x3d39d8])&&(_0xfd379c=_0x5afa4e(_0xfd379c)||_0xfd379c);return _0xfd379c;},N=(_0xadb0c6,_0x47139d)=>(_0x228f95,_0x280a73)=>_0x47139d(_0x228f95,_0x280a73,_0xadb0c6);let g=class extends _0xeb494b{constructor(_0x23d48a,_0x371245){const _0x1b66c7=_0x32a7ff;super(),this[_0x1b66c7(0x222)]=_0x23d48a,this[_0x1b66c7(0x1ef)]=_0x371245,this[_0x1b66c7(0x22b)]();}['_initDataSource'](){const _0x371b9c=_0x32a7ff;this[_0x371b9c(0x222)]['dataSource']=this[_0x371b9c(0x1ef)],this[_0x371b9c(0x222)][_0x371b9c(0x1cd)]=!0x1;}};g=te([N(0x0,_0xc0fe7),N(0x1,_0x2475b2(f))],g);var se=Object[_0x32a7ff(0x1f0)],oe=Object[_0x32a7ff(0x215)],ne=(_0x51c830,_0x1d62e2,_0x51c58b)=>_0x1d62e2 in _0x51c830?se(_0x51c830,_0x1d62e2,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x51c58b}):_0x51c830[_0x1d62e2]=_0x51c58b,ie=(_0x510be2,_0x32899b,_0x5c980f,_0x1ac656)=>{const _0x4b706a=_0x32a7ff;for(var _0x11550d=_0x1ac656>0x1?void 0x0:_0x1ac656?oe(_0x32899b,_0x5c980f):_0x32899b,_0xa4cba9=_0x510be2[_0x4b706a(0x20c)]-0x1,_0x52ef55;_0xa4cba9>=0x0;_0xa4cba9--)(_0x52ef55=_0x510be2[_0xa4cba9])&&(_0x11550d=_0x52ef55(_0x11550d)||_0x11550d);return _0x11550d;},w=(_0xf37478,_0x2176b)=>(_0x5b9b7e,_0x35a574)=>_0x2176b(_0x5b9b7e,_0x35a574,_0xf37478),$=(_0x46ecff,_0x4cfcb9,_0x133b53)=>ne(_0x46ecff,typeof _0x4cfcb9!=_0x32a7ff(0x1ff)?_0x4cfcb9+'':_0x4cfcb9,_0x133b53);let b=class extends _0x2a6c02{constructor(_0x1cdcd0=M,_0x3a9398,_0xb11557){const _0x2b6d41=_0x32a7ff;super(),this[_0x2b6d41(0x20d)]=_0x1cdcd0,this['_injector']=_0x3a9398,this[_0x2b6d41(0x1ce)]=_0xb11557;const {..._0x331ad3}=_0x422436({},M,this[_0x2b6d41(0x20d)]);this[_0x2b6d41(0x1ce)][_0x2b6d41(0x1e0)](z,_0x331ad3);}[_0x32a7ff(0x1ec)](){const _0xe69aef=_0x32a7ff;[[f],[g],[S]][_0xe69aef(0x209)](_0x4a279a=>{const _0x3bb59d=_0xe69aef;this['_injector'][_0x3bb59d(0x1d8)](_0x4a279a);});}[_0x32a7ff(0x201)](){const _0x56ad63=_0x32a7ff;this[_0x56ad63(0x224)]['get'](g),this[_0x56ad63(0x224)][_0x56ad63(0x1db)](S);}};$(b,'pluginName',W),$(b,_0x32a7ff(0x21d),_0x4064ee['UNIVER_UNKNOWN']),b=ie([_0x4a0c6a(_0x2a7d88,_0x338581,_0x15b30d),w(0x1,_0x2475b2(_0x47d10f)),w(0x2,_0x437ed1)],b);export{b as UniverThreadCommentDataSourcePlugin};function _0x30ac(){const _0x71516a=['Delete','deleteComment','_threadCommentDataSourceService','_commentService','_injector','_httpService','544BDgiNF','33732yyjZtZ','Solved','YYYY/MM/DD\x20HH:mm','resolveComment','_initDataSource','thread-comment-data-source.config','user','saveCommentToSnapshot','Solve','OpenOrReOpen','syncUpdateMutationToColla','_configService','Edit','customRanges','userId','getUser','replyId','replies','rangeId','content','Unknown','add','1193270GnIngF','/edit','get','38742LyifIV','requireSession','_init','pipe','setConfig','rangeType','delete','_initUserSync','8792OVfBBx','map','post','getUnit','find','_threadCommentModel','body','42dTtMmG','onStarting','listComments','format','_threadCommentDataSource','defineProperty','threadId','COMMENT','UNRECOGNIZED','solved','getCurrentUser','unitId','/add','2164170jvyxCC','Add','760116TsTOeF','personId','_sessionService','resolved','addUser','symbol','subscribe','onReady','slice','disposeWithMe','commentUpdate$','/reply','/delete','1428cPcHei','createTimestamp','forEach','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','root','length','_config','Reply','_userService','262706BeyBem','error','getComment','/universer-api/comment/unit/','/list','getOwnPropertyDescriptor','addComment','filter','ref','userID','getMemberID','users','parse','type','/universer-api/user/list','code'];_0x30ac=function(){return _0x71516a;};return _0x30ac();}
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x3e1e(_0x581025,_0x5805e9){const _0x2ce575=_0x2ce5();return _0x3e1e=function(_0x3e1e68,_0x509cea){_0x3e1e68=_0x3e1e68-0x195;let _0x5555f7=_0x2ce575[_0x3e1e68];return _0x5555f7;},_0x3e1e(_0x581025,_0x5805e9);}(function(_0x8899da,_0x260057){const _0x3c2aac=_0x3e1e,_0x36275f=_0x8899da();while(!![]){try{const _0x1c8144=-parseInt(_0x3c2aac(0x1a5))/0x1*(parseInt(_0x3c2aac(0x1bb))/0x2)+-parseInt(_0x3c2aac(0x1ec))/0x3+parseInt(_0x3c2aac(0x206))/0x4*(-parseInt(_0x3c2aac(0x1e1))/0x5)+parseInt(_0x3c2aac(0x1a6))/0x6*(-parseInt(_0x3c2aac(0x19b))/0x7)+parseInt(_0x3c2aac(0x200))/0x8+parseInt(_0x3c2aac(0x1d6))/0x9*(-parseInt(_0x3c2aac(0x1e2))/0xa)+parseInt(_0x3c2aac(0x1cc))/0xb*(parseInt(_0x3c2aac(0x1f6))/0xc);if(_0x1c8144===_0x260057)break;else _0x36275f['push'](_0x36275f['shift']());}catch(_0x122821){_0x36275f['push'](_0x36275f['shift']());}}}(_0x2ce5,0xdc89c),function(_0x413307,_0x1de535){const _0x58e6be=_0x3e1e;typeof exports==_0x58e6be(0x1bc)&&typeof module<'u'?_0x1de535(exports,require(_0x58e6be(0x19e)),require(_0x58e6be(0x1c4)),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require(_0x58e6be(0x1a4)),require(_0x58e6be(0x1cb))):typeof define=='function'&&define[_0x58e6be(0x1fb)]?define([_0x58e6be(0x1b5),'@univerjs-pro/collaboration-client',_0x58e6be(0x1c4),'@univerjs/core','@univerjs/thread-comment-ui',_0x58e6be(0x1b6),_0x58e6be(0x1a4),_0x58e6be(0x1cb)],_0x1de535):(_0x413307=typeof globalThis<'u'?globalThis:_0x413307||self,_0x1de535(_0x413307['UniverProThreadCommentDatasource']={},_0x413307[_0x58e6be(0x1e7)],_0x413307['UniverProLicense'],_0x413307[_0x58e6be(0x1e4)],_0x413307['UniverThreadCommentUi'],_0x413307[_0x58e6be(0x1f1)],_0x413307[_0x58e6be(0x1a4)],_0x413307['UniverNetwork']));}(this,function(_0x43405b,_0x13f17a,_0x3ef5b2,_0x491146,_0x40333d,_0x39494e,_0x5121d6,_0xe9ff28){'use strict';const _0x95542=_0x3e1e;const _0x428165=_0x95542(0x1ad);var _0x2c0708=(_0x5dd925=>(_0x5dd925[_0x5dd925[_0x95542(0x1a9)]=0x0]=_0x95542(0x1a9),_0x5dd925[_0x5dd925['Solved']=0x1]='Solved',_0x5dd925[_0x5dd925[_0x95542(0x1d9)]=-0x1]=_0x95542(0x1d9),_0x5dd925))(_0x2c0708||{}),_0x435d55=(_0x4872a6=>(_0x4872a6[_0x4872a6['Unknown']=0x0]=_0x95542(0x1ef),_0x4872a6[_0x4872a6[_0x95542(0x212)]=0x1]='Add',_0x4872a6[_0x4872a6[_0x95542(0x20b)]=0x2]=_0x95542(0x20b),_0x4872a6[_0x4872a6[_0x95542(0x215)]=0x3]=_0x95542(0x215),_0x4872a6[_0x4872a6[_0x95542(0x1c5)]=0x4]=_0x95542(0x1c5),_0x4872a6[_0x4872a6[_0x95542(0x1da)]=0x5]=_0x95542(0x1da),_0x4872a6[_0x4872a6[_0x95542(0x1d9)]=-0x1]=_0x95542(0x1d9),_0x4872a6))(_0x435d55||{});const _0x25d3e1=_0x53cd2a=>_0x491146[_0x95542(0x1c7)](new Date(+_0x53cd2a))[_0x95542(0x210)](_0x95542(0x1f7)),_0x25d485=async(_0x28a6f4,_0x585c92)=>{const _0x3b63be=_0x95542,_0xa9e8b0=_0x28a6f4['get'](_0x491146['UserManagerService']),_0x5a0521=_0x28a6f4['get'](_0xe9ff28[_0x3b63be(0x195)]);_0x585c92[_0x3b63be(0x1b8)](_0xd661d=>{const _0x440a10=_0x3b63be;_0xa9e8b0['getUser'](_0xd661d)&&_0x585c92[_0x440a10(0x1d4)](_0xd661d);}),_0x585c92[_0x3b63be(0x1ab)]&&(await _0x5a0521[_0x3b63be(0x1c6)](_0x3b63be(0x20d),{'params':{'userIDs':[..._0x585c92]}}))[_0x3b63be(0x1fa)][_0x3b63be(0x1b3)]['forEach'](_0x4b5305=>{const _0x479161=_0x3b63be;_0x4b5305&&_0xa9e8b0[_0x479161(0x197)](_0x4b5305);});};var _0x37c9cc=Object[_0x95542(0x201)],_0x10d4e9=(_0x1f25fc,_0x2a7c9e,_0x1555a6,_0x341264)=>{const _0x3fb79f=_0x95542;for(var _0x1d0437=_0x341264>0x1?void 0x0:_0x341264?_0x37c9cc(_0x2a7c9e,_0x1555a6):_0x2a7c9e,_0x5a48d8=_0x1f25fc[_0x3fb79f(0x1d7)]-0x1,_0x9694cb;_0x5a48d8>=0x0;_0x5a48d8--)(_0x9694cb=_0x1f25fc[_0x5a48d8])&&(_0x1d0437=_0x9694cb(_0x1d0437)||_0x1d0437);return _0x1d0437;},_0x4c12d9=(_0x3addf2,_0x516409)=>(_0x138983,_0x168168)=>_0x516409(_0x138983,_0x168168,_0x3addf2);let _0x3bdc61=class extends _0x491146['Disposable']{constructor(_0x3b0b0c,_0x5b7dbc,_0x18a239,_0x1862ea){const _0xe721a1=_0x95542;super(),this[_0xe721a1(0x209)]=_0x3b0b0c,this[_0xe721a1(0x213)]=_0x5b7dbc,this[_0xe721a1(0x1f8)]=_0x18a239,this[_0xe721a1(0x19f)]=_0x1862ea,this['_init'](),this['_initUserSync']();}[_0x95542(0x1bf)](){const _0x504e08=_0x95542;this[_0x504e08(0x1df)](this[_0x504e08(0x213)][_0x504e08(0x1aa)][_0x504e08(0x1af)](_0x5121d6['bufferTime'](0x10))['subscribe'](_0x599efa=>{const _0x58b36f=_0x504e08,_0x17e939=new Set();_0x599efa[_0x58b36f(0x1b8)](_0x4f4103=>{const _0x555654=_0x58b36f;switch(_0x4f4103[_0x555654(0x1ed)]){case _0x555654(0x1a2):{const _0x11dd87=_0x4f4103['payload'][_0x555654(0x1d8)];_0x17e939[_0x555654(0x1a2)](_0x11dd87);break;}}}),_0x25d485(this['_injector'],_0x17e939);}));}['_init'](){const _0x562955=_0x95542;this[_0x562955(0x1df)](this['_commentService'][_0x562955(0x1aa)][_0x562955(0x1dc)](async _0x17875c=>{const _0x4f256b=_0x562955;var _0x3ac3a8,_0x2502f2,_0xb36cc2,_0x43d4f6;const _0x5e9ebd=(_0x3ac3a8=this['_threadCommentModel'][_0x4f256b(0x1f4)](_0x17875c[_0x4f256b(0x1e9)])[_0x4f256b(0x1de)](_0x3f84e8=>_0x3f84e8[_0x4f256b(0x1a0)]===_0x17875c[_0x4f256b(0x1a0)]))==null?void 0x0:_0x3ac3a8[_0x4f256b(0x1cd)];if(!_0x5e9ebd)return;const {unitId:_0x21e205,subUnitId:_0xe2778c}=_0x5e9ebd;switch(_0x17875c[_0x4f256b(0x1b2)]&&this[_0x4f256b(0x1f8)][_0x4f256b(0x197)](_0x17875c[_0x4f256b(0x1b2)]),_0x17875c['type']){case _0x435d55[_0x4f256b(0x212)]:break;case _0x435d55[_0x4f256b(0x20b)]:{this[_0x4f256b(0x213)][_0x4f256b(0x1ac)](_0x21e205,_0xe2778c,{'unitId':_0x21e205,'subUnitId':_0xe2778c,'ref':'','id':_0x17875c[_0x4f256b(0x1a8)],'dT':_0x25d3e1(+_0x17875c['createTimestamp']),'threadId':_0x17875c[_0x4f256b(0x1a0)],'personId':(_0xb36cc2=(_0x2502f2=_0x17875c[_0x4f256b(0x1b2)])==null?void 0x0:_0x2502f2['userID'])!=null?_0xb36cc2:_0x17875c[_0x4f256b(0x1e8)],'text':JSON[_0x4f256b(0x1eb)](_0x17875c[_0x4f256b(0x1f3)]),'parentId':_0x5e9ebd['id']});break;}case _0x435d55['Delete']:{const _0x5d503a=this[_0x4f256b(0x213)][_0x4f256b(0x1d0)](_0x21e205,_0xe2778c,_0x17875c[_0x4f256b(0x1a8)]);_0x5d503a&&_0x5d503a[_0x4f256b(0x1fe)]&&this[_0x4f256b(0x213)][_0x4f256b(0x202)](_0x21e205,_0xe2778c,_0x17875c[_0x4f256b(0x1a8)]);break;}case _0x435d55['Edit']:{this[_0x4f256b(0x213)][_0x4f256b(0x205)](_0x21e205,_0xe2778c,{'commentId':_0x17875c['replyId'],'text':JSON[_0x4f256b(0x1eb)](_0x17875c['content'])});break;}case _0x435d55['Solve']:{const _0x17e170=(_0x43d4f6=this[_0x4f256b(0x213)][_0x4f256b(0x1f4)](_0x17875c[_0x4f256b(0x1e9)])['find'](_0x3e06e0=>_0x3e06e0[_0x4f256b(0x1a0)]===_0x17875c[_0x4f256b(0x1a0)]))==null?void 0x0:_0x43d4f6[_0x4f256b(0x1cd)];_0x17e170&&this[_0x4f256b(0x213)][_0x4f256b(0x1c0)](_0x21e205,_0xe2778c,_0x17e170['id'],_0x17875c['solved']===_0x2c0708['Solved']);break;}}}));}};_0x3bdc61=_0x10d4e9([_0x4c12d9(0x0,_0x491146[_0x95542(0x1c1)](_0x13f17a[_0x95542(0x216)])),_0x4c12d9(0x1,_0x491146['Inject'](_0x39494e[_0x95542(0x1b1)])),_0x4c12d9(0x2,_0x491146[_0x95542(0x1c1)](_0x491146[_0x95542(0x19a)])),_0x4c12d9(0x3,_0x491146['Inject'](_0x491146[_0x95542(0x20e)]))],_0x3bdc61);const _0x245511=_0x95542(0x1be),_0x5d53fb={};var _0x2ddf82=Object[_0x95542(0x201)],_0xccc64a=(_0x3da481,_0x210975,_0xca261f,_0x387697)=>{for(var _0x4b8741=_0x387697>0x1?void 0x0:_0x387697?_0x2ddf82(_0x210975,_0xca261f):_0x210975,_0x41d86b=_0x3da481['length']-0x1,_0x26be2a;_0x41d86b>=0x0;_0x41d86b--)(_0x26be2a=_0x3da481[_0x41d86b])&&(_0x4b8741=_0x26be2a(_0x4b8741)||_0x4b8741);return _0x4b8741;},_0x5f0f9d=(_0x540419,_0x2e2a05)=>(_0x58d553,_0x75d94)=>_0x2e2a05(_0x58d553,_0x75d94,_0x540419);function _0x2031e5(_0x149851,_0x2b8f16){const _0x4a26ab=_0x95542,_0x28b7df=_0x149851[_0x4a26ab(0x1d3)][0x0];return{..._0x2b8f16,'id':_0x28b7df[_0x4a26ab(0x1a8)],'resolved':_0x149851[_0x4a26ab(0x1f2)]===0x1,'dT':_0x25d3e1(_0x28b7df['createTimestamp']),'personId':_0x28b7df[_0x4a26ab(0x1e8)],'threadId':_0x28b7df['threadId']};}function _0x1151c9(_0x26f4d5,_0x451c15,_0x23cc43){const _0x45f0a8=_0x95542;var _0x259028,_0x5ea834;if(((_0x5ea834=(_0x259028=_0x26f4d5==null?void 0x0:_0x26f4d5[_0x45f0a8(0x1d3)])==null?void 0x0:_0x259028['length'])!=null?_0x5ea834:0x0)>0x0){const _0x34f34f=(_0x49bc67,_0x28a3a7)=>({'id':_0x49bc67['replyId'],'threadId':_0x49bc67[_0x45f0a8(0x1a0)],'dT':_0x25d3e1(_0x49bc67[_0x45f0a8(0x1d5)]),'personId':_0x49bc67[_0x45f0a8(0x1e8)],'resolved':_0x26f4d5[_0x45f0a8(0x1f2)]===_0x2c0708[_0x45f0a8(0x211)],'unitId':_0x451c15,'subUnitId':_0x23cc43,'text':JSON['parse'](_0x49bc67[_0x45f0a8(0x1f3)]),'parentId':_0x28a3a7}),_0x486150=_0x34f34f(_0x26f4d5[_0x45f0a8(0x1d3)][0x0]);return{..._0x486150,'children':_0x26f4d5['replies'][_0x45f0a8(0x204)](0x1)[_0x45f0a8(0x1e3)](_0x575123=>_0x34f34f(_0x575123,_0x486150['id']))};}return null;}let _0x51cc9b=class{constructor(_0x549ec4,_0x51dced,_0xe21295,_0x49072e){const _0x195a57=_0x95542;this[_0x195a57(0x20a)]=_0x549ec4,this['_userService']=_0x51dced,this[_0x195a57(0x1b0)]=_0xe21295,this[_0x195a57(0x19f)]=_0x49072e;}async[_0x95542(0x1ac)](_0x46c5d1){const _0x50ffb7=_0x95542;var _0x47fe8f,_0x26ebde;const {parentId:_0x1e03bd,unitId:_0x4d048c,text:_0x23a310,threadId:_0x546e6e}=_0x46c5d1,_0x988dc0=(_0x26ebde=(_0x47fe8f=_0x23a310[_0x50ffb7(0x1f0)])==null?void 0x0:_0x47fe8f[_0x50ffb7(0x208)](_0x4baba6=>_0x4baba6[_0x50ffb7(0x1c2)]===_0x491146[_0x50ffb7(0x1ae)][_0x50ffb7(0x1fc)])[_0x50ffb7(0x1e3)](_0x522141=>_0x522141['rangeId']))!=null?_0x26ebde:[],_0x77b773=JSON[_0x50ffb7(0x19d)](_0x23a310),_0x59b46c=(await this[_0x50ffb7(0x1b0)][_0x50ffb7(0x1bd)](_0x4d048c))[_0x50ffb7(0x1d1)]();if(_0x1e03bd){const _0x45e92f={'memberId':_0x59b46c,'unitId':_0x4d048c,'content':_0x77b773,'mention':_0x988dc0,'threadId':_0x546e6e},_0x2630c6=(await this['_httpService']['post'](_0x50ffb7(0x19c)+_0x4d048c+'/reply',{'body':_0x45e92f}))[_0x50ffb7(0x1fa)][_0x50ffb7(0x1a1)];return{..._0x46c5d1,'id':_0x2630c6[_0x50ffb7(0x1a8)],'dT':_0x491146[_0x50ffb7(0x1c7)](+_0x2630c6[_0x50ffb7(0x1d5)])[_0x50ffb7(0x210)](_0x50ffb7(0x1f7)),'personId':_0x2630c6[_0x50ffb7(0x1e8)]};}else{const _0x183c3e={'memberId':_0x59b46c,'unitId':_0x4d048c,'content':_0x77b773,'mention':_0x988dc0},_0x2c89a0=await this[_0x50ffb7(0x20a)][_0x50ffb7(0x1c9)](_0x50ffb7(0x19c)+_0x4d048c+_0x50ffb7(0x1b7),{'body':_0x183c3e});return _0x2031e5(_0x2c89a0[_0x50ffb7(0x1fa)]['comment'],_0x46c5d1);}}async['updateComment'](_0x5dd4d3){const _0x363ecf=_0x95542;var _0x10336a,_0x40da0c;const {text:_0x4e44f6,unitId:_0x302009}=_0x5dd4d3,_0xc7501=(_0x40da0c=(_0x10336a=_0x4e44f6[_0x363ecf(0x1f0)])==null?void 0x0:_0x10336a[_0x363ecf(0x208)](_0x2b1efc=>_0x2b1efc[_0x363ecf(0x1c2)]===_0x491146['CustomRangeType'][_0x363ecf(0x1fc)])[_0x363ecf(0x1e3)](_0x7a102a=>_0x7a102a[_0x363ecf(0x1ba)]))!=null?_0x40da0c:[],_0x5bbcf6=JSON[_0x363ecf(0x19d)](_0x4e44f6),_0x3d4b9c=_0x5dd4d3['threadId'],_0x1b6974=_0x5dd4d3['id'],_0x1702fe={'memberId':(await this['_sessionService']['requireSession'](_0x302009))[_0x363ecf(0x1d1)](),'unitId':_0x302009,'threadId':_0x3d4b9c,'mention':_0xc7501,'content':_0x5bbcf6,'replyId':_0x1b6974},_0x2b010e=await this[_0x363ecf(0x20a)][_0x363ecf(0x1c9)]('/universer-api/comment/unit/'+_0x302009+_0x363ecf(0x1c8),{'body':_0x1702fe});return!_0x2b010e[_0x363ecf(0x1fa)][_0x363ecf(0x1f5)]||_0x2b010e['body'][_0x363ecf(0x1f5)]['code']===0x1;}async[_0x95542(0x1c0)](_0x5ba480){const _0x5de494=_0x95542,{unitId:_0xd32b67}=_0x5ba480,_0x5e63e4=_0x5ba480[_0x5de494(0x1a0)],_0xd80419={'memberId':this[_0x5de494(0x1f8)]['getCurrentUser']()['userID'],'unitId':_0xd32b67,'threadId':_0x5e63e4,'solved':_0x5ba480[_0x5de494(0x199)]?_0x2c0708[_0x5de494(0x211)]:_0x2c0708[_0x5de494(0x1a9)]},_0x4cbcc7=await this[_0x5de494(0x20a)][_0x5de494(0x1c9)](_0x5de494(0x19c)+_0xd32b67+_0x5de494(0x214),{'body':_0xd80419});return!_0x4cbcc7[_0x5de494(0x1fa)][_0x5de494(0x1f5)]||_0x4cbcc7[_0x5de494(0x1fa)][_0x5de494(0x1f5)][_0x5de494(0x1cf)]===0x1;}async[_0x95542(0x202)](_0x1e4a7c,_0x259341,_0x548537,_0x7898da){const _0x2aff4e=_0x95542,_0x176e93={'memberId':(await this[_0x2aff4e(0x1b0)][_0x2aff4e(0x1bd)](_0x1e4a7c))[_0x2aff4e(0x1d1)](),'threadId':_0x548537,'replyId':_0x7898da,'unitId':_0x1e4a7c},_0x514f75=await this[_0x2aff4e(0x20a)][_0x2aff4e(0x1c9)](_0x2aff4e(0x19c)+_0x1e4a7c+'/delete',{'body':_0x176e93});return!_0x514f75[_0x2aff4e(0x1fa)]['error']||_0x514f75[_0x2aff4e(0x1fa)]['error'][_0x2aff4e(0x1cf)]===0x1;}async[_0x95542(0x196)](_0x283e7e,_0x553ba8,_0xc4531d){const _0x19d292=_0x95542,_0xfb3466={'unitId':_0x283e7e,'threadId':_0xc4531d},_0x53d3cd=await this[_0x19d292(0x20a)][_0x19d292(0x1c9)](_0x19d292(0x19c)+_0x283e7e+_0x19d292(0x1c3),{'body':_0xfb3466}),_0x28b174=_0xc4531d[_0x19d292(0x1e3)](_0x3ba2f7=>_0x1151c9(_0x53d3cd[_0x19d292(0x1fa)][_0x19d292(0x1ca)][_0x3ba2f7],_0x283e7e,_0x553ba8))[_0x19d292(0x208)](Boolean);return Object[_0x19d292(0x207)](_0x53d3cd['body']['users'])[_0x19d292(0x1b8)](_0x4f6869=>{const _0x406b16=_0x19d292;this[_0x406b16(0x1f8)][_0x406b16(0x197)](_0x4f6869);}),_0x28b174;}[_0x95542(0x20f)](_0x34bf0c){const _0x38afe0=_0x95542;return{'id':_0x34bf0c['id'],'threadId':_0x34bf0c[_0x38afe0(0x1a0)],'ref':_0x34bf0c['ref']};}};_0x51cc9b=_0xccc64a([_0x5f0f9d(0x0,_0x491146[_0x95542(0x1c1)](_0xe9ff28['HTTPService'])),_0x5f0f9d(0x1,_0x491146[_0x95542(0x1c1)](_0x491146[_0x95542(0x19a)])),_0x5f0f9d(0x2,_0x491146[_0x95542(0x1c1)](_0x13f17a['CollaborationSessionService'])),_0x5f0f9d(0x3,_0x491146[_0x95542(0x1c1)](_0x491146[_0x95542(0x20e)]))],_0x51cc9b);var _0x4ddd0b=Object['getOwnPropertyDescriptor'],_0x15909d=(_0x456d45,_0x2edbdf,_0x3d6a06,_0x5ac0ad)=>{const _0x31ddc9=_0x95542;for(var _0x3b9a86=_0x5ac0ad>0x1?void 0x0:_0x5ac0ad?_0x4ddd0b(_0x2edbdf,_0x3d6a06):_0x2edbdf,_0x51c3e0=_0x456d45[_0x31ddc9(0x1d7)]-0x1,_0x25e197;_0x51c3e0>=0x0;_0x51c3e0--)(_0x25e197=_0x456d45[_0x51c3e0])&&(_0x3b9a86=_0x25e197(_0x3b9a86)||_0x3b9a86);return _0x3b9a86;},_0x51f525=(_0x1580f3,_0x1951d3)=>(_0x388e92,_0x490d35)=>_0x1951d3(_0x388e92,_0x490d35,_0x1580f3);let _0x1c93ae=class extends _0x491146['Disposable']{constructor(_0x5c3d08,_0x2e4f61){const _0x3b384d=_0x95542;super(),this[_0x3b384d(0x1ea)]=_0x5c3d08,this[_0x3b384d(0x1b4)]=_0x2e4f61,this[_0x3b384d(0x1ff)]();}['_initDataSource'](){const _0x5f15e2=_0x95542;this[_0x5f15e2(0x1ea)]['dataSource']=this[_0x5f15e2(0x1b4)],this[_0x5f15e2(0x1ea)][_0x5f15e2(0x1db)]=!0x1;}};_0x1c93ae=_0x15909d([_0x51f525(0x0,_0x39494e[_0x95542(0x1d2)]),_0x51f525(0x1,_0x491146[_0x95542(0x1c1)](_0x51cc9b))],_0x1c93ae);var _0x134991=Object[_0x95542(0x1dd)],_0x146262=Object['getOwnPropertyDescriptor'],_0x173e64=(_0x545f3a,_0x5638a6,_0x5b9228)=>_0x5638a6 in _0x545f3a?_0x134991(_0x545f3a,_0x5638a6,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5b9228}):_0x545f3a[_0x5638a6]=_0x5b9228,_0x3890aa=(_0x338b59,_0x4f9601,_0x1237c4,_0x3e2ed7)=>{const _0x1cfc58=_0x95542;for(var _0x1abe16=_0x3e2ed7>0x1?void 0x0:_0x3e2ed7?_0x146262(_0x4f9601,_0x1237c4):_0x4f9601,_0x1737e9=_0x338b59[_0x1cfc58(0x1d7)]-0x1,_0x596d1b;_0x1737e9>=0x0;_0x1737e9--)(_0x596d1b=_0x338b59[_0x1737e9])&&(_0x1abe16=_0x596d1b(_0x1abe16)||_0x1abe16);return _0x1abe16;},_0x3e3854=(_0x100b66,_0x1fc846)=>(_0x4d0635,_0x4c68df)=>_0x1fc846(_0x4d0635,_0x4c68df,_0x100b66),_0x242d9a=(_0x3731fe,_0x4d8294,_0x22d1c8)=>_0x173e64(_0x3731fe,typeof _0x4d8294!='symbol'?_0x4d8294+'':_0x4d8294,_0x22d1c8);_0x43405b[_0x95542(0x1ce)]=class extends _0x491146[_0x95542(0x198)]{constructor(_0x812a71=_0x5d53fb,_0x1cf1b3,_0x56eb2b){const _0xc8207e=_0x95542;super(),this[_0xc8207e(0x1a7)]=_0x812a71,this[_0xc8207e(0x19f)]=_0x1cf1b3,this[_0xc8207e(0x1ee)]=_0x56eb2b;const {..._0x1d823b}=_0x491146[_0xc8207e(0x1fd)]({},_0x5d53fb,this[_0xc8207e(0x1a7)]);this[_0xc8207e(0x1ee)][_0xc8207e(0x1b9)](_0x245511,_0x1d823b);}['onStarting'](){const _0x34b197=_0x95542;[[_0x51cc9b],[_0x1c93ae],[_0x3bdc61]][_0x34b197(0x1b8)](_0x5d06e8=>{const _0x4f53fe=_0x34b197;this[_0x4f53fe(0x19f)][_0x4f53fe(0x1a2)](_0x5d06e8);});}[_0x95542(0x1e6)](){const _0x46bee9=_0x95542;this[_0x46bee9(0x19f)][_0x46bee9(0x1c6)](_0x1c93ae),this[_0x46bee9(0x19f)][_0x46bee9(0x1c6)](_0x3bdc61);}},_0x242d9a(_0x43405b['UniverThreadCommentDataSourcePlugin'],'pluginName',_0x428165),_0x242d9a(_0x43405b[_0x95542(0x1ce)],_0x95542(0x1ed),_0x491146['UniverInstanceType']['UNIVER_UNKNOWN']),_0x43405b['UniverThreadCommentDataSourcePlugin']=_0x3890aa([_0x491146[_0x95542(0x1a3)](_0x40333d[_0x95542(0x1e5)],_0x13f17a[_0x95542(0x1e0)],_0x3ef5b2['UniverLicensePlugin']),_0x3e3854(0x1,_0x491146[_0x95542(0x1c1)](_0x491146[_0x95542(0x20e)])),_0x3e3854(0x2,_0x491146[_0x95542(0x20c)])],_0x43405b[_0x95542(0x1ce)]),Object[_0x95542(0x1dd)](_0x43405b,Symbol[_0x95542(0x1f9)],{'value':_0x95542(0x203)});}));function _0x2ce5(){const _0x1b41bd=['parse','3702399fKXTxX','type','_configService','Unknown','customRanges','UniverThreadComment','solved','content','getUnit','error','12haqkUe','YYYY/MM/DD\x20HH:mm','_userService','toStringTag','body','amd','COMMENT','merge','parentId','_initDataSource','9080600iHAveW','getOwnPropertyDescriptor','deleteComment','Module','slice','updateComment','1541648NaHPWv','values','filter','_commentService','_httpService','Reply','IConfigService','/universer-api/user/list','Injector','saveCommentToSnapshot','format','Solved','Add','_threadCommentModel','/solved','Edit','CommentService','HTTPService','listComments','addUser','Plugin','resolved','UserManagerService','5530QlyaOX','/universer-api/comment/unit/','stringify','@univerjs-pro/collaboration-client','_injector','threadId','reply','add','DependentOn','rxjs','4JKddZn','10452szzqqm','_config','replyId','OpenOrReOpen','commentUpdate$','size','addComment','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','CustomRangeType','pipe','_sessionService','ThreadCommentModel','user','users','_threadCommentDataSource','exports','@univerjs/thread-comment','/add','forEach','setConfig','rangeId','65414wrGQib','object','requireSession','thread-comment-data-source.config','_initUserSync','resolveComment','Inject','rangeType','/list','@univerjs-pro/license','Delete','get','dayjs','/edit','post','comments','@univerjs/network','56865138ZMPjdp','root','UniverThreadCommentDataSourcePlugin','code','getComment','getMemberID','IThreadCommentDataSourceService','replies','delete','createTimestamp','135osoftI','length','personId','UNRECOGNIZED','Solve','syncUpdateMutationToColla','subscribe','defineProperty','find','disposeWithMe','UniverCollaborationClientPlugin','20rFgrms','745680CJvYBW','map','UniverCore','UniverThreadCommentUIPlugin','onReady','UniverProCollaborationClient','userId','unitId','_threadCommentDataSourceService'];_0x2ce5=function(){return _0x1b41bd;};return _0x2ce5();}
1
+ (function(_0x41517c,_0x196522){const _0x3a34df=_0x3f37,_0x5debd0=_0x41517c();while(!![]){try{const _0x13854b=parseInt(_0x3a34df(0x98))/0x1*(parseInt(_0x3a34df(0x7e))/0x2)+-parseInt(_0x3a34df(0x87))/0x3*(parseInt(_0x3a34df(0xf9))/0x4)+-parseInt(_0x3a34df(0xfc))/0x5+-parseInt(_0x3a34df(0xbb))/0x6*(-parseInt(_0x3a34df(0x9f))/0x7)+parseInt(_0x3a34df(0xde))/0x8*(-parseInt(_0x3a34df(0x97))/0x9)+-parseInt(_0x3a34df(0xc2))/0xa*(-parseInt(_0x3a34df(0xf6))/0xb)+parseInt(_0x3a34df(0x102))/0xc;if(_0x13854b===_0x196522)break;else _0x5debd0['push'](_0x5debd0['shift']());}catch(_0x1c5c52){_0x5debd0['push'](_0x5debd0['shift']());}}}(_0x19d5,0x3c512),function(_0x48f05a,_0x502e4c){const _0x39ff49=_0x3f37;typeof exports==_0x39ff49(0xe3)&&typeof module<'u'?_0x502e4c(exports,require(_0x39ff49(0x89)),require('@univerjs-pro/license'),require(_0x39ff49(0xdb)),require(_0x39ff49(0xb6)),require(_0x39ff49(0xe8)),require(_0x39ff49(0x86)),require(_0x39ff49(0xc6))):typeof define=='function'&&define[_0x39ff49(0xf4)]?define([_0x39ff49(0xc7),'@univerjs-pro/collaboration-client',_0x39ff49(0xb5),'@univerjs/core','@univerjs/thread-comment-ui',_0x39ff49(0xe8),'rxjs',_0x39ff49(0xc6)],_0x502e4c):(_0x48f05a=typeof globalThis<'u'?globalThis:_0x48f05a||self,_0x502e4c(_0x48f05a['UniverProThreadCommentDatasource']={},_0x48f05a[_0x39ff49(0xef)],_0x48f05a[_0x39ff49(0xa8)],_0x48f05a[_0x39ff49(0xa3)],_0x48f05a[_0x39ff49(0x8a)],_0x48f05a['UniverThreadComment'],_0x48f05a[_0x39ff49(0x86)],_0x48f05a[_0x39ff49(0xa2)]));}(this,function(_0x2cded1,_0x332af1,_0x130de1,_0x17c109,_0x276ee0,_0x5b8b48,_0x5782ef,_0x929c5b){'use strict';const _0x105812=_0x3f37;const _0x5227e4=_0x105812(0xb9);var _0x1461cd=(_0x77d81d=>(_0x77d81d[_0x77d81d[_0x105812(0xc8)]=0x0]='OpenOrReOpen',_0x77d81d[_0x77d81d['Solved']=0x1]=_0x105812(0x77),_0x77d81d[_0x77d81d['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x77d81d))(_0x1461cd||{}),_0x5befa8=(_0x146356=>(_0x146356[_0x146356[_0x105812(0x80)]=0x0]=_0x105812(0x80),_0x146356[_0x146356[_0x105812(0xcc)]=0x1]=_0x105812(0xcc),_0x146356[_0x146356['Reply']=0x2]=_0x105812(0x8f),_0x146356[_0x146356[_0x105812(0xe6)]=0x3]='Edit',_0x146356[_0x146356[_0x105812(0xe2)]=0x4]='Delete',_0x146356[_0x146356[_0x105812(0x78)]=0x5]='Solve',_0x146356[_0x146356['UNRECOGNIZED']=-0x1]=_0x105812(0x79),_0x146356))(_0x5befa8||{});const _0x1cf840=_0xe918f1=>_0x17c109[_0x105812(0x100)](new Date(+_0xe918f1))[_0x105812(0x7d)](_0x105812(0xa6)),_0x491b26=async(_0x4d3e45,_0x3d940a)=>{const _0x40c97d=_0x105812,_0x999e97=_0x4d3e45[_0x40c97d(0x94)](_0x17c109[_0x40c97d(0xa4)]),_0x2c39bf=_0x4d3e45[_0x40c97d(0x94)](_0x929c5b[_0x40c97d(0x84)]);_0x3d940a[_0x40c97d(0xe4)](_0x1016b8=>{const _0x29098b=_0x40c97d;_0x999e97[_0x29098b(0xfa)](_0x1016b8)&&_0x3d940a[_0x29098b(0xb4)](_0x1016b8);}),_0x3d940a[_0x40c97d(0xa7)]&&(await _0x2c39bf[_0x40c97d(0x94)](_0x40c97d(0xd0),{'params':{'userIDs':[..._0x3d940a]}}))[_0x40c97d(0xce)][_0x40c97d(0xeb)]['forEach'](_0x54b348=>{_0x54b348&&_0x999e97['addUser'](_0x54b348);});};var _0xbeb810=Object[_0x105812(0xfe)],_0x76a068=(_0x4ce2b9,_0x3028f2,_0x6e2587,_0x59b2fc)=>{const _0x5df8ba=_0x105812;for(var _0x21392d=_0x59b2fc>0x1?void 0x0:_0x59b2fc?_0xbeb810(_0x3028f2,_0x6e2587):_0x3028f2,_0x3798c8=_0x4ce2b9[_0x5df8ba(0xe1)]-0x1,_0x414611;_0x3798c8>=0x0;_0x3798c8--)(_0x414611=_0x4ce2b9[_0x3798c8])&&(_0x21392d=_0x414611(_0x21392d)||_0x21392d);return _0x21392d;},_0x2bf0b6=(_0x3b6448,_0x232e33)=>(_0x2f030a,_0x255011)=>_0x232e33(_0x2f030a,_0x255011,_0x3b6448);let _0x5040b3=class extends _0x17c109['Disposable']{constructor(_0x305f02,_0x14ce1a,_0x1d82e2,_0x327cb3){const _0x39e2c8=_0x105812;super(),this['_commentService']=_0x305f02,this[_0x39e2c8(0xe9)]=_0x14ce1a,this[_0x39e2c8(0x7c)]=_0x1d82e2,this['_injector']=_0x327cb3,this[_0x39e2c8(0xd9)](),this[_0x39e2c8(0xc4)]();}[_0x105812(0xc4)](){const _0x40ffaf=_0x105812;this['disposeWithMe'](this['_threadCommentModel'][_0x40ffaf(0xe5)][_0x40ffaf(0x8d)](_0x5782ef[_0x40ffaf(0xf7)](0x10))['subscribe'](_0x218484=>{const _0x819357=_0x40ffaf,_0x2b463f=new Set();_0x218484[_0x819357(0xe4)](_0x2dc485=>{const _0x422599=_0x819357;switch(_0x2dc485[_0x422599(0x95)]){case'add':{const _0x2dcfb5=_0x2dc485[_0x422599(0x9c)][_0x422599(0xdf)];_0x2b463f[_0x422599(0x7f)](_0x2dcfb5);break;}}}),_0x491b26(this[_0x819357(0xbe)],_0x2b463f);}));}[_0x105812(0xd9)](){const _0x56ae41=_0x105812;this['disposeWithMe'](this[_0x56ae41(0x81)]['commentUpdate$'][_0x56ae41(0xf3)](async _0x4f05e8=>{const _0x57d0d3=_0x56ae41;var _0x1e560c,_0x4ad74a,_0x3d9d76,_0x14fdd4;const _0x11e9dc=(_0x1e560c=this[_0x57d0d3(0xe9)]['getUnit'](_0x4f05e8[_0x57d0d3(0xc3)])[_0x57d0d3(0x9a)](_0xddce1a=>_0xddce1a['threadId']===_0x4f05e8[_0x57d0d3(0xca)]))==null?void 0x0:_0x1e560c[_0x57d0d3(0xa1)];if(!_0x11e9dc)return;const {unitId:_0x2f97d9,subUnitId:_0x813b33}=_0x11e9dc;switch(_0x4f05e8[_0x57d0d3(0xfd)]&&this['_userService'][_0x57d0d3(0xcd)](_0x4f05e8[_0x57d0d3(0xfd)]),_0x4f05e8[_0x57d0d3(0x95)]){case _0x5befa8[_0x57d0d3(0xcc)]:break;case _0x5befa8['Reply']:{this[_0x57d0d3(0xe9)]['addComment'](_0x2f97d9,_0x813b33,{'unitId':_0x2f97d9,'subUnitId':_0x813b33,'ref':'','id':_0x4f05e8[_0x57d0d3(0xad)],'dT':_0x1cf840(+_0x4f05e8[_0x57d0d3(0xc1)]),'threadId':_0x4f05e8[_0x57d0d3(0xca)],'personId':(_0x3d9d76=(_0x4ad74a=_0x4f05e8['user'])==null?void 0x0:_0x4ad74a['userID'])!=null?_0x3d9d76:_0x4f05e8[_0x57d0d3(0xdd)],'text':JSON[_0x57d0d3(0xbf)](_0x4f05e8[_0x57d0d3(0xec)]),'parentId':_0x11e9dc['id']});break;}case _0x5befa8['Delete']:{const _0x3ba2e=this['_threadCommentModel'][_0x57d0d3(0x76)](_0x2f97d9,_0x813b33,_0x4f05e8['replyId']);_0x3ba2e&&_0x3ba2e[_0x57d0d3(0x91)]&&this['_threadCommentModel']['deleteComment'](_0x2f97d9,_0x813b33,_0x4f05e8[_0x57d0d3(0xad)]);break;}case _0x5befa8['Edit']:{this[_0x57d0d3(0xe9)][_0x57d0d3(0x82)](_0x2f97d9,_0x813b33,{'commentId':_0x4f05e8['replyId'],'text':JSON[_0x57d0d3(0xbf)](_0x4f05e8['content'])});break;}case _0x5befa8[_0x57d0d3(0x78)]:{const _0x1b38a5=(_0x14fdd4=this[_0x57d0d3(0xe9)]['getUnit'](_0x4f05e8[_0x57d0d3(0xc3)])[_0x57d0d3(0x9a)](_0x451cb8=>_0x451cb8[_0x57d0d3(0xca)]===_0x4f05e8[_0x57d0d3(0xca)]))==null?void 0x0:_0x14fdd4['root'];_0x1b38a5&&this[_0x57d0d3(0xe9)][_0x57d0d3(0x75)](_0x2f97d9,_0x813b33,_0x1b38a5['id'],_0x4f05e8['solved']===_0x1461cd[_0x57d0d3(0x77)]);break;}}}));}};_0x5040b3=_0x76a068([_0x2bf0b6(0x0,_0x17c109[_0x105812(0xd6)](_0x332af1[_0x105812(0xe0)])),_0x2bf0b6(0x1,_0x17c109[_0x105812(0xd6)](_0x5b8b48[_0x105812(0xf8)])),_0x2bf0b6(0x2,_0x17c109['Inject'](_0x17c109[_0x105812(0xa4)])),_0x2bf0b6(0x3,_0x17c109[_0x105812(0xd6)](_0x17c109[_0x105812(0xf0)]))],_0x5040b3);const _0x114729=_0x105812(0x8e),_0x6f6d95={};var _0x17e5be=Object[_0x105812(0xfe)],_0x46d14c=(_0x25806e,_0x19931b,_0xa27881,_0x1b5f1b)=>{for(var _0x53745e=_0x1b5f1b>0x1?void 0x0:_0x1b5f1b?_0x17e5be(_0x19931b,_0xa27881):_0x19931b,_0x10982f=_0x25806e['length']-0x1,_0x4dcba4;_0x10982f>=0x0;_0x10982f--)(_0x4dcba4=_0x25806e[_0x10982f])&&(_0x53745e=_0x4dcba4(_0x53745e)||_0x53745e);return _0x53745e;},_0x313080=(_0x335079,_0x4f41d3)=>(_0x38e0e1,_0x87a8bc)=>_0x4f41d3(_0x38e0e1,_0x87a8bc,_0x335079);function _0x246fa6(_0x42d414,_0x4a19cb){const _0x240fc9=_0x105812,_0x3aed42=_0x42d414[_0x240fc9(0x9b)][0x0];return{..._0x4a19cb,'id':_0x3aed42[_0x240fc9(0xad)],'resolved':_0x42d414['solved']===0x1,'dT':_0x1cf840(_0x3aed42[_0x240fc9(0xc1)]),'personId':_0x3aed42['userId'],'threadId':_0x3aed42[_0x240fc9(0xca)]};}function _0x5cacff(_0x247bd1,_0x10f67c,_0x4f08bf){const _0x3542b0=_0x105812;var _0x10a311,_0x4e2318;if(((_0x4e2318=(_0x10a311=_0x247bd1==null?void 0x0:_0x247bd1[_0x3542b0(0x9b)])==null?void 0x0:_0x10a311[_0x3542b0(0xe1)])!=null?_0x4e2318:0x0)>0x0){const _0x394889=(_0x260c2e,_0xb27a81)=>({'id':_0x260c2e[_0x3542b0(0xad)],'threadId':_0x260c2e[_0x3542b0(0xca)],'dT':_0x1cf840(_0x260c2e[_0x3542b0(0xc1)]),'personId':_0x260c2e[_0x3542b0(0xdd)],'resolved':_0x247bd1['solved']===_0x1461cd[_0x3542b0(0x77)],'unitId':_0x10f67c,'subUnitId':_0x4f08bf,'text':JSON[_0x3542b0(0xbf)](_0x260c2e[_0x3542b0(0xec)]),'parentId':_0xb27a81}),_0x1db3d0=_0x394889(_0x247bd1['replies'][0x0]);return{..._0x1db3d0,'children':_0x247bd1[_0x3542b0(0x9b)][_0x3542b0(0x9d)](0x1)[_0x3542b0(0xd3)](_0x49fd61=>_0x394889(_0x49fd61,_0x1db3d0['id']))};}return null;}let _0x424be8=class{constructor(_0x143633,_0x505759,_0x22fc82,_0x5140b1){const _0x726a12=_0x105812;this['_httpService']=_0x143633,this[_0x726a12(0x7c)]=_0x505759,this[_0x726a12(0x83)]=_0x22fc82,this[_0x726a12(0xbe)]=_0x5140b1;}async[_0x105812(0xe7)](_0x35f3d8){const _0x35ae91=_0x105812;var _0x534092,_0x5e97b6;const {parentId:_0x3ad70e,unitId:_0x314589,text:_0x44f41c,threadId:_0x46c78d}=_0x35f3d8,_0x223fff=(_0x5e97b6=(_0x534092=_0x44f41c[_0x35ae91(0xf5)])==null?void 0x0:_0x534092[_0x35ae91(0xee)](_0x13744d=>_0x13744d[_0x35ae91(0xba)]===_0x17c109['CustomRangeType'][_0x35ae91(0x7a)])[_0x35ae91(0xd3)](_0xb4e1c9=>_0xb4e1c9[_0x35ae91(0xc5)]))!=null?_0x5e97b6:[],_0x448aa0=JSON[_0x35ae91(0xb1)](_0x44f41c),_0x1579e2=(await this[_0x35ae91(0x83)][_0x35ae91(0xaf)](_0x314589))['getMemberID']();if(_0x3ad70e){const _0x6fda3a={'memberId':_0x1579e2,'unitId':_0x314589,'content':_0x448aa0,'mention':_0x223fff,'threadId':_0x46c78d},_0xe87408=(await this[_0x35ae91(0xd8)]['post'](_0x35ae91(0x101)+_0x314589+_0x35ae91(0xf1),{'body':_0x6fda3a}))[_0x35ae91(0xce)][_0x35ae91(0xbc)];return{..._0x35f3d8,'id':_0xe87408[_0x35ae91(0xad)],'dT':_0x17c109[_0x35ae91(0x100)](+_0xe87408[_0x35ae91(0xc1)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0xe87408[_0x35ae91(0xdd)]};}else{const _0x3d2f67={'memberId':_0x1579e2,'unitId':_0x314589,'content':_0x448aa0,'mention':_0x223fff},_0x27820c=await this[_0x35ae91(0xd8)]['post']('/universer-api/comment/unit/'+_0x314589+_0x35ae91(0xb8),{'body':_0x3d2f67});return _0x246fa6(_0x27820c['body'][_0x35ae91(0x96)],_0x35f3d8);}}async[_0x105812(0x82)](_0x524a5e){const _0x2cb4b6=_0x105812;var _0xaad811,_0x4ec232;const {text:_0x772bc9,unitId:_0x5c27ab}=_0x524a5e,_0x41dc60=(_0x4ec232=(_0xaad811=_0x772bc9[_0x2cb4b6(0xf5)])==null?void 0x0:_0xaad811['filter'](_0x3de796=>_0x3de796[_0x2cb4b6(0xba)]===_0x17c109[_0x2cb4b6(0xda)]['COMMENT'])[_0x2cb4b6(0xd3)](_0x49c410=>_0x49c410[_0x2cb4b6(0xc5)]))!=null?_0x4ec232:[],_0x46a7dd=JSON['stringify'](_0x772bc9),_0x500257=_0x524a5e['threadId'],_0x4e5617=_0x524a5e['id'],_0x22f917={'memberId':(await this['_sessionService'][_0x2cb4b6(0xaf)](_0x5c27ab))[_0x2cb4b6(0xb3)](),'unitId':_0x5c27ab,'threadId':_0x500257,'mention':_0x41dc60,'content':_0x46a7dd,'replyId':_0x4e5617},_0xe20d22=await this[_0x2cb4b6(0xd8)][_0x2cb4b6(0xbd)]('/universer-api/comment/unit/'+_0x5c27ab+_0x2cb4b6(0xb2),{'body':_0x22f917});return!_0xe20d22[_0x2cb4b6(0xce)][_0x2cb4b6(0x7b)]||_0xe20d22[_0x2cb4b6(0xce)][_0x2cb4b6(0x7b)][_0x2cb4b6(0x93)]===0x1;}async[_0x105812(0x75)](_0x2da147){const _0x2fe3e6=_0x105812,{unitId:_0x67320e}=_0x2da147,_0x556b30=_0x2da147[_0x2fe3e6(0xca)],_0x526b36={'memberId':this['_userService']['getCurrentUser']()[_0x2fe3e6(0xc9)],'unitId':_0x67320e,'threadId':_0x556b30,'solved':_0x2da147[_0x2fe3e6(0x8c)]?_0x1461cd['Solved']:_0x1461cd[_0x2fe3e6(0xc8)]},_0x31f9b0=await this[_0x2fe3e6(0xd8)]['post'](_0x2fe3e6(0x101)+_0x67320e+_0x2fe3e6(0xdc),{'body':_0x526b36});return!_0x31f9b0[_0x2fe3e6(0xce)][_0x2fe3e6(0x7b)]||_0x31f9b0[_0x2fe3e6(0xce)]['error'][_0x2fe3e6(0x93)]===0x1;}async['deleteComment'](_0x328f08,_0x52e474,_0x86bbae,_0x357fc4){const _0x9d301e=_0x105812,_0x20e8f8={'memberId':(await this[_0x9d301e(0x83)][_0x9d301e(0xaf)](_0x328f08))[_0x9d301e(0xb3)](),'threadId':_0x86bbae,'replyId':_0x357fc4,'unitId':_0x328f08},_0xcf34f2=await this[_0x9d301e(0xd8)]['post'](_0x9d301e(0x101)+_0x328f08+_0x9d301e(0xff),{'body':_0x20e8f8});return!_0xcf34f2[_0x9d301e(0xce)]['error']||_0xcf34f2[_0x9d301e(0xce)][_0x9d301e(0x7b)]['code']===0x1;}async[_0x105812(0xa9)](_0x118cca,_0x4841e2,_0x88c3ee){const _0x2350f0=_0x105812,_0x2fb0fb={'unitId':_0x118cca,'threadId':_0x88c3ee},_0x35d705=await this[_0x2350f0(0xd8)][_0x2350f0(0xbd)](_0x2350f0(0x101)+_0x118cca+_0x2350f0(0x88),{'body':_0x2fb0fb}),_0x2d0398=_0x88c3ee[_0x2350f0(0xd3)](_0x45529b=>_0x5cacff(_0x35d705[_0x2350f0(0xce)][_0x2350f0(0x90)][_0x45529b],_0x118cca,_0x4841e2))[_0x2350f0(0xee)](Boolean);return Object[_0x2350f0(0xed)](_0x35d705['body'][_0x2350f0(0xeb)])['forEach'](_0x1c33ba=>{this['_userService']['addUser'](_0x1c33ba);}),_0x2d0398;}[_0x105812(0xa5)](_0x4bb70e){const _0x1c6a4b=_0x105812;return{'id':_0x4bb70e['id'],'threadId':_0x4bb70e[_0x1c6a4b(0xca)],'ref':_0x4bb70e['ref']};}};_0x424be8=_0x46d14c([_0x313080(0x0,_0x17c109[_0x105812(0xd6)](_0x929c5b['HTTPService'])),_0x313080(0x1,_0x17c109[_0x105812(0xd6)](_0x17c109[_0x105812(0xa4)])),_0x313080(0x2,_0x17c109[_0x105812(0xd6)](_0x332af1[_0x105812(0xc0)])),_0x313080(0x3,_0x17c109[_0x105812(0xd6)](_0x17c109[_0x105812(0xf0)]))],_0x424be8);var _0x5b0445=Object[_0x105812(0xfe)],_0x1ad7a8=(_0x58f5a7,_0x474910,_0x3223b2,_0x34b5e3)=>{const _0x2fb328=_0x105812;for(var _0x1d2bfb=_0x34b5e3>0x1?void 0x0:_0x34b5e3?_0x5b0445(_0x474910,_0x3223b2):_0x474910,_0x28937e=_0x58f5a7[_0x2fb328(0xe1)]-0x1,_0x28eb7c;_0x28937e>=0x0;_0x28937e--)(_0x28eb7c=_0x58f5a7[_0x28937e])&&(_0x1d2bfb=_0x28eb7c(_0x1d2bfb)||_0x1d2bfb);return _0x1d2bfb;},_0x8dcfd0=(_0x40e93c,_0x4273d9)=>(_0x4afe35,_0x31c3fa)=>_0x4273d9(_0x4afe35,_0x31c3fa,_0x40e93c);let _0x8b48f9=class extends _0x17c109[_0x105812(0x85)]{constructor(_0x3bcbcf,_0x44ab89){const _0x7ee691=_0x105812;super(),this[_0x7ee691(0xb0)]=_0x3bcbcf,this[_0x7ee691(0xd2)]=_0x44ab89,this[_0x7ee691(0xea)]();}['_initDataSource'](){const _0x8531c6=_0x105812;this[_0x8531c6(0xb0)][_0x8531c6(0xcf)]=this[_0x8531c6(0xd2)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};_0x8b48f9=_0x1ad7a8([_0x8dcfd0(0x0,_0x5b8b48['IThreadCommentDataSourceService']),_0x8dcfd0(0x1,_0x17c109[_0x105812(0xd6)](_0x424be8))],_0x8b48f9);var _0x45f946=Object[_0x105812(0x9e)],_0x482d23=Object[_0x105812(0xfe)],_0x2549ac=(_0x458b33,_0x87c153,_0x32fcf1)=>_0x87c153 in _0x458b33?_0x45f946(_0x458b33,_0x87c153,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x32fcf1}):_0x458b33[_0x87c153]=_0x32fcf1,_0x1b1aaa=(_0xc6242a,_0x13627,_0x142e82,_0x293a7d)=>{const _0x2e9677=_0x105812;for(var _0x360ab4=_0x293a7d>0x1?void 0x0:_0x293a7d?_0x482d23(_0x13627,_0x142e82):_0x13627,_0x3715a6=_0xc6242a[_0x2e9677(0xe1)]-0x1,_0x265421;_0x3715a6>=0x0;_0x3715a6--)(_0x265421=_0xc6242a[_0x3715a6])&&(_0x360ab4=_0x265421(_0x360ab4)||_0x360ab4);return _0x360ab4;},_0x5a6487=(_0x5a3c31,_0x3fd300)=>(_0x476388,_0xcd0ee5)=>_0x3fd300(_0x476388,_0xcd0ee5,_0x5a3c31),_0x395555=(_0x45488e,_0x588ec9,_0x5ecea7)=>_0x2549ac(_0x45488e,typeof _0x588ec9!='symbol'?_0x588ec9+'':_0x588ec9,_0x5ecea7);_0x2cded1[_0x105812(0xd4)]=class extends _0x17c109[_0x105812(0xf2)]{constructor(_0x1a042e=_0x6f6d95,_0x201cbc,_0x35bd17){const _0x39439a=_0x105812;super(),this[_0x39439a(0xd7)]=_0x1a042e,this[_0x39439a(0xbe)]=_0x201cbc,this['_configService']=_0x35bd17;const {..._0x4da7cb}=_0x17c109[_0x39439a(0xae)]({},_0x6f6d95,this['_config']);this[_0x39439a(0xa0)][_0x39439a(0xab)](_0x114729,_0x4da7cb);}['onStarting'](){const _0x5db61d=_0x105812;[[_0x424be8],[_0x8b48f9],[_0x5040b3]][_0x5db61d(0xe4)](_0x587594=>{const _0x1483ab=_0x5db61d;this[_0x1483ab(0xbe)][_0x1483ab(0x7f)](_0x587594);});}[_0x105812(0x92)](){const _0x45f5be=_0x105812;this[_0x45f5be(0xbe)]['get'](_0x8b48f9),this[_0x45f5be(0xbe)]['get'](_0x5040b3);}},_0x395555(_0x2cded1[_0x105812(0xd4)],_0x105812(0xb7),_0x5227e4),_0x395555(_0x2cded1['UniverThreadCommentDataSourcePlugin'],_0x105812(0x95),_0x17c109[_0x105812(0xfb)][_0x105812(0xaa)]),_0x2cded1['UniverThreadCommentDataSourcePlugin']=_0x1b1aaa([_0x17c109[_0x105812(0x8b)](_0x276ee0[_0x105812(0xac)],_0x332af1['UniverCollaborationClientPlugin'],_0x130de1[_0x105812(0xd1)]),_0x5a6487(0x1,_0x17c109[_0x105812(0xd6)](_0x17c109[_0x105812(0xf0)])),_0x5a6487(0x2,_0x17c109[_0x105812(0x99)])],_0x2cded1['UniverThreadCommentDataSourcePlugin']),Object[_0x105812(0x9e)](_0x2cded1,Symbol[_0x105812(0xcb)],{'value':_0x105812(0xd5)});}));function _0x3f37(_0x3444c5,_0x59f4f0){const _0x19d551=_0x19d5();return _0x3f37=function(_0x3f37bc,_0x19fe86){_0x3f37bc=_0x3f37bc-0x75;let _0x2c92d3=_0x19d551[_0x3f37bc];return _0x2c92d3;},_0x3f37(_0x3444c5,_0x59f4f0);}function _0x19d5(){const _0x228021=['_threadCommentModel','_initDataSource','users','content','values','filter','UniverProCollaborationClient','Injector','/reply','Plugin','subscribe','amd','customRanges','11GDmBye','bufferTime','ThreadCommentModel','524WIdDkI','getUser','UniverInstanceType','1666740NfIKAP','user','getOwnPropertyDescriptor','/delete','dayjs','/universer-api/comment/unit/','9503064ZtoWSJ','resolveComment','getComment','Solved','Solve','UNRECOGNIZED','COMMENT','error','_userService','format','10864XzDWiW','add','Unknown','_commentService','updateComment','_sessionService','HTTPService','Disposable','rxjs','10305SxBpeY','/list','@univerjs-pro/collaboration-client','UniverThreadCommentUi','DependentOn','resolved','pipe','thread-comment-data-source.config','Reply','comments','parentId','onReady','code','get','type','comment','639nSDsVo','60aWPoCl','IConfigService','find','replies','payload','slice','defineProperty','77Nsgizj','_configService','root','UniverNetwork','UniverCore','UserManagerService','saveCommentToSnapshot','YYYY/MM/DD\x20HH:mm','size','UniverProLicense','listComments','UNIVER_UNKNOWN','setConfig','UniverThreadCommentUIPlugin','replyId','merge','requireSession','_threadCommentDataSourceService','stringify','/edit','getMemberID','delete','@univerjs-pro/license','@univerjs/thread-comment-ui','pluginName','/add','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','rangeType','31026LfrYNB','reply','post','_injector','parse','CollaborationSessionService','createTimestamp','426110fvFcGu','unitId','_initUserSync','rangeId','@univerjs/network','exports','OpenOrReOpen','userID','threadId','toStringTag','Add','addUser','body','dataSource','/universer-api/user/list','UniverLicensePlugin','_threadCommentDataSource','map','UniverThreadCommentDataSourcePlugin','Module','Inject','_config','_httpService','_init','CustomRangeType','@univerjs/core','/solved','userId','21064cCUtSy','personId','CommentService','length','Delete','object','forEach','commentUpdate$','Edit','addComment','@univerjs/thread-comment'];_0x19d5=function(){return _0x228021;};return _0x19d5();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.8.2-nightly.202506211606",
3
+ "version": "0.8.2-nightly.202506221606",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,13 +45,13 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.8.2-nightly.202506211606",
49
- "@univerjs/core": "0.8.2-nightly.202506211606",
50
- "@univerjs/network": "0.8.2-nightly.202506211606",
51
- "@univerjs-pro/license": "0.8.2-nightly.202506211606",
52
- "@univerjs/thread-comment": "0.8.2-nightly.202506211606",
48
+ "@univerjs-pro/license": "0.8.2-nightly.202506221606",
49
+ "@univerjs-pro/collaboration-client": "0.8.2-nightly.202506221606",
50
+ "@univerjs/core": "0.8.2-nightly.202506221606",
51
+ "@univerjs/network": "0.8.2-nightly.202506221606",
53
52
  "@univerjs/protocol": "0.1.47-alpha.0",
54
- "@univerjs/thread-comment-ui": "0.8.2-nightly.202506211606"
53
+ "@univerjs/thread-comment": "0.8.2-nightly.202506221606",
54
+ "@univerjs/thread-comment-ui": "0.8.2-nightly.202506221606"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",