@univerjs-pro/thread-comment-datasource 0.6.10-nightly.202504281607 → 0.7.0-beta.0

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 _0x13e4c0=_0x5c8b;(function(_0x4bf158,_0x4bc613){const _0x50619b=_0x5c8b,_0x451b34=_0x4bf158();while(!![]){try{const _0x29373b=parseInt(_0x50619b(0x12f))/0x1+parseInt(_0x50619b(0xe3))/0x2+-parseInt(_0x50619b(0x123))/0x3*(parseInt(_0x50619b(0xe7))/0x4)+parseInt(_0x50619b(0xe0))/0x5+-parseInt(_0x50619b(0xca))/0x6*(parseInt(_0x50619b(0x109))/0x7)+-parseInt(_0x50619b(0xde))/0x8+parseInt(_0x50619b(0x10f))/0x9*(parseInt(_0x50619b(0x13e))/0xa);if(_0x29373b===_0x4bc613)break;else _0x451b34['push'](_0x451b34['shift']());}catch(_0x332996){_0x451b34['push'](_0x451b34['shift']());}}}(_0x116e,0x5cd40));Object[_0x13e4c0(0xe1)](exports,Symbol[_0x13e4c0(0x144)],{'value':'Module'});const b=require(_0x13e4c0(0x11e)),T=require('@univerjs-pro/license'),c=require(_0x13e4c0(0x122)),j=require(_0x13e4c0(0x11c)),M=require(_0x13e4c0(0xe4)),w=require(_0x13e4c0(0xd0)),P=require(_0x13e4c0(0xd1)),U='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x543f0c=>(_0x543f0c[_0x543f0c[_0x13e4c0(0xcf)]=0x0]='OpenOrReOpen',_0x543f0c[_0x543f0c[_0x13e4c0(0x124)]=0x1]=_0x13e4c0(0x124),_0x543f0c[_0x543f0c[_0x13e4c0(0xda)]=-0x1]=_0x13e4c0(0xda),_0x543f0c))(I||{}),v=(_0x3f0358=>(_0x3f0358[_0x3f0358['Unknown']=0x0]=_0x13e4c0(0xe2),_0x3f0358[_0x3f0358[_0x13e4c0(0x14a)]=0x1]=_0x13e4c0(0x14a),_0x3f0358[_0x3f0358[_0x13e4c0(0x13b)]=0x2]='Reply',_0x3f0358[_0x3f0358[_0x13e4c0(0x11a)]=0x3]=_0x13e4c0(0x11a),_0x3f0358[_0x3f0358['Delete']=0x4]=_0x13e4c0(0xfd),_0x3f0358[_0x3f0358[_0x13e4c0(0x10c)]=0x5]=_0x13e4c0(0x10c),_0x3f0358[_0x3f0358['UNRECOGNIZED']=-0x1]=_0x13e4c0(0xda),_0x3f0358))(v||{});const f=_0x5e5122=>c[_0x13e4c0(0xf5)](new Date(+_0x5e5122))[_0x13e4c0(0x131)](_0x13e4c0(0xcd)),R=async(_0x11ee5,_0x3d0d07)=>{const _0x94422a=_0x13e4c0,_0x55aec8=_0x11ee5[_0x94422a(0xd7)](c[_0x94422a(0xf2)]),_0x1613ee=_0x11ee5[_0x94422a(0xd7)](P['HTTPService']);_0x3d0d07[_0x94422a(0x127)](_0x49a61a=>{const _0x23f7f5=_0x94422a;_0x55aec8[_0x23f7f5(0xc8)](_0x49a61a)&&_0x3d0d07[_0x23f7f5(0xeb)](_0x49a61a);}),_0x3d0d07[_0x94422a(0x134)]&&(await _0x1613ee['get'](_0x94422a(0x136),{'params':{'userIDs':[..._0x3d0d07]}}))[_0x94422a(0x13c)][_0x94422a(0xfa)][_0x94422a(0x127)](_0x3d8e19=>{const _0x4b4c7f=_0x94422a;_0x3d8e19&&_0x55aec8[_0x4b4c7f(0x11d)](_0x3d8e19);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x6dc93e,_0x473406,_0x196a4f,_0x17f593)=>{const _0xf4ebfb=_0x13e4c0;for(var _0x562dd3=_0x17f593>0x1?void 0x0:_0x17f593?$(_0x473406,_0x196a4f):_0x473406,_0x4b4d93=_0x6dc93e[_0xf4ebfb(0x12a)]-0x1,_0x1755a1;_0x4b4d93>=0x0;_0x4b4d93--)(_0x1755a1=_0x6dc93e[_0x4b4d93])&&(_0x562dd3=_0x1755a1(_0x562dd3)||_0x562dd3);return _0x562dd3;},S=(_0x9b6136,_0x140cb2)=>(_0x16e78e,_0x5072e2)=>_0x140cb2(_0x16e78e,_0x5072e2,_0x9b6136);function _0x116e(){const _0x4d6fd6=['Add','/edit','getUser','parse','228EFEbmd','add','getCurrentUser','YYYY/MM/DD\x20HH:mm','comments','OpenOrReOpen','rxjs','@univerjs/network','customRanges','_configService','_commentService','/universer-api/comment/unit/','addComment','get','find','Injector','UNRECOGNIZED','getOwnPropertyDescriptor','map','/delete','5527120ACXKsY','slice','385870mZYdZU','defineProperty','Unknown','894030ktVMqF','@univerjs/thread-comment','replies','post','34920IcpEpN','_httpService','Plugin','root','delete','listComments','dataSource','reply','comment','content','_userService','UserManagerService','_threadCommentDataSource','setConfig','dayjs','updateComment','personId','ref','_initDataSource','users','pipe','/add','Delete','threadId','solved','/reply','Inject','commentUpdate$','UniverThreadCommentUIPlugin','unitId','disposeWithMe','rangeType','userId','requireSession','77021tCvfEv','error','createTimestamp','Solve','UNIVER_UNKNOWN','UniverLicensePlugin','205335rpbEYE','rangeId','_injector','IThreadCommentDataSourceService','onReady','UniverThreadCommentDataSourcePlugin','saveCommentToSnapshot','UniverInstanceType','Disposable','stringify','userID','Edit','code','@univerjs/thread-comment-ui','addUser','@univerjs-pro/collaboration-client','resolveComment','user','DependentOn','@univerjs/core','33xLJgNq','Solved','payload','type','forEach','values','bufferTime','length','symbol','_sessionService','subscribe','getMemberID','445064VeFpgj','getComment','format','resolved','_threadCommentDataSourceService','size','COMMENT','/universer-api/user/list','deleteComment','/list','getUnit','filter','Reply','body','_initUserSync','270aUpsxt','replyId','/solved','ThreadCommentModel','parentId','CollaborationSessionService','toStringTag','CommentService','CustomRangeType','_threadCommentModel','IConfigService','pluginName'];_0x116e=function(){return _0x4d6fd6;};return _0x116e();}let p=class extends c[_0x13e4c0(0x117)]{constructor(_0x4a60d8,_0x3b9c85,_0x28713f,_0x116796){const _0x5f415f=_0x13e4c0;super(),this[_0x5f415f(0xd4)]=_0x4a60d8,this[_0x5f415f(0x147)]=_0x3b9c85,this[_0x5f415f(0xf1)]=_0x28713f,this[_0x5f415f(0x111)]=_0x116796,this['_init'](),this[_0x5f415f(0x13d)]();}[_0x13e4c0(0x13d)](){const _0x5bcb38=_0x13e4c0;this[_0x5bcb38(0x105)](this[_0x5bcb38(0x147)]['commentUpdate$'][_0x5bcb38(0xfb)](w[_0x5bcb38(0x129)](0x10))[_0x5bcb38(0x12d)](_0x3ad83c=>{const _0x2111bb=_0x5bcb38,_0x385cc6=new Set();_0x3ad83c[_0x2111bb(0x127)](_0x4c4fae=>{const _0x167f9b=_0x2111bb;switch(_0x4c4fae['type']){case _0x167f9b(0xcb):{const _0x49fb32=_0x4c4fae[_0x167f9b(0x125)][_0x167f9b(0xf7)];_0x385cc6[_0x167f9b(0xcb)](_0x49fb32);break;}}}),R(this[_0x2111bb(0x111)],_0x385cc6);}));}['_init'](){const _0x4f46cb=_0x13e4c0;this[_0x4f46cb(0x105)](this[_0x4f46cb(0xd4)][_0x4f46cb(0x102)]['subscribe'](async _0x5aefb1=>{const _0x5dd356=_0x4f46cb;var _0x22722c,_0x4ebeb6,_0x59509c,_0x2912c3;const _0x5b4db9=(_0x22722c=this[_0x5dd356(0x147)]['getUnit'](_0x5aefb1[_0x5dd356(0x104)])[_0x5dd356(0xd8)](_0x1dc417=>_0x1dc417['threadId']===_0x5aefb1[_0x5dd356(0xfe)]))==null?void 0x0:_0x22722c['root'];if(!_0x5b4db9)return;const {unitId:_0x5bc70b,subUnitId:_0x2cc2ca}=_0x5b4db9;switch(_0x5aefb1[_0x5dd356(0x120)]&&this[_0x5dd356(0xf1)]['addUser'](_0x5aefb1[_0x5dd356(0x120)]),_0x5aefb1[_0x5dd356(0x126)]){case v[_0x5dd356(0x14a)]:break;case v[_0x5dd356(0x13b)]:{this[_0x5dd356(0x147)][_0x5dd356(0xd6)](_0x5bc70b,_0x2cc2ca,{'unitId':_0x5bc70b,'subUnitId':_0x2cc2ca,'ref':'','id':_0x5aefb1[_0x5dd356(0x13f)],'dT':f(+_0x5aefb1[_0x5dd356(0x10b)]),'threadId':_0x5aefb1[_0x5dd356(0xfe)],'personId':(_0x59509c=(_0x4ebeb6=_0x5aefb1[_0x5dd356(0x120)])==null?void 0x0:_0x4ebeb6[_0x5dd356(0x119)])!=null?_0x59509c:_0x5aefb1['userId'],'text':JSON['parse'](_0x5aefb1[_0x5dd356(0xf0)]),'parentId':_0x5b4db9['id']});break;}case v['Delete']:{const _0x4aa4eb=this[_0x5dd356(0x147)][_0x5dd356(0x130)](_0x5bc70b,_0x2cc2ca,_0x5aefb1['replyId']);_0x4aa4eb&&_0x4aa4eb[_0x5dd356(0x142)]&&this[_0x5dd356(0x147)][_0x5dd356(0x137)](_0x5bc70b,_0x2cc2ca,_0x5aefb1[_0x5dd356(0x13f)]);break;}case v['Edit']:{this['_threadCommentModel']['updateComment'](_0x5bc70b,_0x2cc2ca,{'commentId':_0x5aefb1[_0x5dd356(0x13f)],'text':JSON[_0x5dd356(0xc9)](_0x5aefb1['content'])});break;}case v[_0x5dd356(0x10c)]:{const _0x264fef=(_0x2912c3=this[_0x5dd356(0x147)][_0x5dd356(0x139)](_0x5aefb1[_0x5dd356(0x104)])['find'](_0x587091=>_0x587091[_0x5dd356(0xfe)]===_0x5aefb1[_0x5dd356(0xfe)]))==null?void 0x0:_0x2912c3[_0x5dd356(0xea)];_0x264fef&&this[_0x5dd356(0x147)][_0x5dd356(0x11f)](_0x5bc70b,_0x2cc2ca,_0x264fef['id'],_0x5aefb1['solved']===I[_0x5dd356(0x124)]);break;}}}));}};p=E([S(0x0,c[_0x13e4c0(0x101)](b[_0x13e4c0(0x145)])),S(0x1,c[_0x13e4c0(0x101)](M[_0x13e4c0(0x141)])),S(0x2,c[_0x13e4c0(0x101)](c[_0x13e4c0(0xf2)])),S(0x3,c[_0x13e4c0(0x101)](c[_0x13e4c0(0xd9)]))],p);const q='thread-comment-data-source.config',D={};var A=Object[_0x13e4c0(0xdb)],x=(_0x1205ce,_0x4fb0de,_0x170e0c,_0x5a51af)=>{const _0x24d43c=_0x13e4c0;for(var _0x8659c4=_0x5a51af>0x1?void 0x0:_0x5a51af?A(_0x4fb0de,_0x170e0c):_0x4fb0de,_0xd51712=_0x1205ce[_0x24d43c(0x12a)]-0x1,_0x34fa6d;_0xd51712>=0x0;_0xd51712--)(_0x34fa6d=_0x1205ce[_0xd51712])&&(_0x8659c4=_0x34fa6d(_0x8659c4)||_0x8659c4);return _0x8659c4;},_=(_0x27a9ce,_0x3239ed)=>(_0x134c64,_0x2f52a2)=>_0x3239ed(_0x134c64,_0x2f52a2,_0x27a9ce);function Y(_0x584777,_0xa4030b){const _0x571b4e=_0x13e4c0,_0x3fd377=_0x584777[_0x571b4e(0xe5)][0x0];return{..._0xa4030b,'id':_0x3fd377[_0x571b4e(0x13f)],'resolved':_0x584777[_0x571b4e(0xff)]===0x1,'dT':f(_0x3fd377[_0x571b4e(0x10b)]),'personId':_0x3fd377[_0x571b4e(0x107)],'threadId':_0x3fd377['threadId']};}function G(_0x141a63,_0x1b88b1,_0x50e815){const _0x556267=_0x13e4c0;var _0x2a2424,_0x249472;if(((_0x249472=(_0x2a2424=_0x141a63==null?void 0x0:_0x141a63['replies'])==null?void 0x0:_0x2a2424[_0x556267(0x12a)])!=null?_0x249472:0x0)>0x0){const _0x18d664=(_0x4484f9,_0x418e1f)=>({'id':_0x4484f9[_0x556267(0x13f)],'threadId':_0x4484f9[_0x556267(0xfe)],'dT':f(_0x4484f9[_0x556267(0x10b)]),'personId':_0x4484f9[_0x556267(0x107)],'resolved':_0x141a63[_0x556267(0xff)]===I[_0x556267(0x124)],'unitId':_0x1b88b1,'subUnitId':_0x50e815,'text':JSON[_0x556267(0xc9)](_0x4484f9[_0x556267(0xf0)]),'parentId':_0x418e1f}),_0x313f55=_0x18d664(_0x141a63[_0x556267(0xe5)][0x0]);return{..._0x313f55,'children':_0x141a63[_0x556267(0xe5)][_0x556267(0xdf)](0x1)[_0x556267(0xdc)](_0x4f7655=>_0x18d664(_0x4f7655,_0x313f55['id']))};}return null;}let g=class{constructor(_0x4142de,_0x2c7451,_0x5b8573,_0x183298){const _0xf34b3f=_0x13e4c0;this[_0xf34b3f(0xe8)]=_0x4142de,this['_userService']=_0x2c7451,this[_0xf34b3f(0x12c)]=_0x5b8573,this[_0xf34b3f(0x111)]=_0x183298;}async[_0x13e4c0(0xd6)](_0x58b2bd){const _0x186c8f=_0x13e4c0;var _0xa90636,_0x270d7c;const {parentId:_0x47e100,unitId:_0x1c2b95,text:_0x52f90e,threadId:_0x44d5b6}=_0x58b2bd,_0x4a28d6=(_0x270d7c=(_0xa90636=_0x52f90e[_0x186c8f(0xd2)])==null?void 0x0:_0xa90636[_0x186c8f(0x13a)](_0x2a9af0=>_0x2a9af0['rangeType']===c[_0x186c8f(0x146)][_0x186c8f(0x135)])[_0x186c8f(0xdc)](_0x7620b=>_0x7620b[_0x186c8f(0x110)]))!=null?_0x270d7c:[],_0x5d8134=JSON[_0x186c8f(0x118)](_0x52f90e),_0x424c5e=(await this['_sessionService'][_0x186c8f(0x108)](_0x1c2b95))[_0x186c8f(0x12e)]();if(_0x47e100){const _0x5f079d={'memberId':_0x424c5e,'unitId':_0x1c2b95,'content':_0x5d8134,'mention':_0x4a28d6,'threadId':_0x44d5b6},_0x94cf5f=(await this['_httpService'][_0x186c8f(0xe6)](_0x186c8f(0xd5)+_0x1c2b95+_0x186c8f(0x100),{'body':_0x5f079d}))[_0x186c8f(0x13c)][_0x186c8f(0xee)];return{..._0x58b2bd,'id':_0x94cf5f[_0x186c8f(0x13f)],'dT':c['dayjs'](+_0x94cf5f[_0x186c8f(0x10b)])[_0x186c8f(0x131)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x94cf5f[_0x186c8f(0x107)]};}else{const _0x42fe0a={'memberId':_0x424c5e,'unitId':_0x1c2b95,'content':_0x5d8134,'mention':_0x4a28d6},_0x5483a8=await this[_0x186c8f(0xe8)]['post'](_0x186c8f(0xd5)+_0x1c2b95+_0x186c8f(0xfc),{'body':_0x42fe0a});return Y(_0x5483a8[_0x186c8f(0x13c)][_0x186c8f(0xef)],_0x58b2bd);}}async[_0x13e4c0(0xf6)](_0x376661){const _0x8d4836=_0x13e4c0;var _0x32ad04,_0x1aae6b;const {text:_0x1d7431,unitId:_0x4e4193}=_0x376661,_0x140c9f=(_0x1aae6b=(_0x32ad04=_0x1d7431[_0x8d4836(0xd2)])==null?void 0x0:_0x32ad04[_0x8d4836(0x13a)](_0x2ad2e3=>_0x2ad2e3[_0x8d4836(0x106)]===c[_0x8d4836(0x146)]['COMMENT'])[_0x8d4836(0xdc)](_0x20c2ac=>_0x20c2ac['rangeId']))!=null?_0x1aae6b:[],_0x3f432e=JSON['stringify'](_0x1d7431),_0x2002f9=_0x376661['threadId'],_0x191df4=_0x376661['id'],_0x50f0fd={'memberId':(await this[_0x8d4836(0x12c)][_0x8d4836(0x108)](_0x4e4193))[_0x8d4836(0x12e)](),'unitId':_0x4e4193,'threadId':_0x2002f9,'mention':_0x140c9f,'content':_0x3f432e,'replyId':_0x191df4},_0x38e963=await this[_0x8d4836(0xe8)]['post'](_0x8d4836(0xd5)+_0x4e4193+_0x8d4836(0xc7),{'body':_0x50f0fd});return!_0x38e963['body']['error']||_0x38e963[_0x8d4836(0x13c)]['error'][_0x8d4836(0x11b)]===0x1;}async[_0x13e4c0(0x11f)](_0x46358a){const _0x56584f=_0x13e4c0,{unitId:_0x96801}=_0x46358a,_0x227889=_0x46358a[_0x56584f(0xfe)],_0x5997e1={'memberId':this['_userService'][_0x56584f(0xcc)]()[_0x56584f(0x119)],'unitId':_0x96801,'threadId':_0x227889,'solved':_0x46358a[_0x56584f(0x132)]?I['Solved']:I['OpenOrReOpen']},_0x652d6=await this['_httpService'][_0x56584f(0xe6)](_0x56584f(0xd5)+_0x96801+_0x56584f(0x140),{'body':_0x5997e1});return!_0x652d6[_0x56584f(0x13c)][_0x56584f(0x10a)]||_0x652d6[_0x56584f(0x13c)][_0x56584f(0x10a)][_0x56584f(0x11b)]===0x1;}async[_0x13e4c0(0x137)](_0x4a8f61,_0x4293ec,_0x20d3d5,_0x7a3a18){const _0x58b313=_0x13e4c0,_0x1a0455={'memberId':(await this[_0x58b313(0x12c)]['requireSession'](_0x4a8f61))['getMemberID'](),'threadId':_0x20d3d5,'replyId':_0x7a3a18,'unitId':_0x4a8f61},_0x389d2e=await this[_0x58b313(0xe8)][_0x58b313(0xe6)](_0x58b313(0xd5)+_0x4a8f61+_0x58b313(0xdd),{'body':_0x1a0455});return!_0x389d2e['body'][_0x58b313(0x10a)]||_0x389d2e['body'][_0x58b313(0x10a)][_0x58b313(0x11b)]===0x1;}async[_0x13e4c0(0xec)](_0x5e0892,_0xfa956e,_0x550d5c){const _0x583a9a=_0x13e4c0,_0x85421e={'unitId':_0x5e0892,'threadId':_0x550d5c},_0x9c4509=await this[_0x583a9a(0xe8)]['post'](_0x583a9a(0xd5)+_0x5e0892+_0x583a9a(0x138),{'body':_0x85421e}),_0x307d65=_0x550d5c[_0x583a9a(0xdc)](_0x576826=>G(_0x9c4509['body'][_0x583a9a(0xce)][_0x576826],_0x5e0892,_0xfa956e))['filter'](Boolean);return Object[_0x583a9a(0x128)](_0x9c4509[_0x583a9a(0x13c)][_0x583a9a(0xfa)])[_0x583a9a(0x127)](_0x44e3b3=>{const _0x2e1c65=_0x583a9a;this[_0x2e1c65(0xf1)]['addUser'](_0x44e3b3);}),_0x307d65;}[_0x13e4c0(0x115)](_0x222c5a){const _0x4a19f3=_0x13e4c0;return{'id':_0x222c5a['id'],'threadId':_0x222c5a[_0x4a19f3(0xfe)],'ref':_0x222c5a[_0x4a19f3(0xf8)]};}};function _0x5c8b(_0x36593a,_0xe14f2f){const _0x116e8a=_0x116e();return _0x5c8b=function(_0x5c8b33,_0x156b20){_0x5c8b33=_0x5c8b33-0xc7;let _0x3d480e=_0x116e8a[_0x5c8b33];return _0x3d480e;},_0x5c8b(_0x36593a,_0xe14f2f);}g=x([_(0x0,c[_0x13e4c0(0x101)](P['HTTPService'])),_(0x1,c[_0x13e4c0(0x101)](c[_0x13e4c0(0xf2)])),_(0x2,c['Inject'](b[_0x13e4c0(0x143)])),_(0x3,c[_0x13e4c0(0x101)](c[_0x13e4c0(0xd9)]))],g);var H=Object[_0x13e4c0(0xdb)],J=(_0x389e1c,_0x37ba42,_0x5ad650,_0x3f7200)=>{for(var _0x554df7=_0x3f7200>0x1?void 0x0:_0x3f7200?H(_0x37ba42,_0x5ad650):_0x37ba42,_0x462c9b=_0x389e1c['length']-0x1,_0x6c1722;_0x462c9b>=0x0;_0x462c9b--)(_0x6c1722=_0x389e1c[_0x462c9b])&&(_0x554df7=_0x6c1722(_0x554df7)||_0x554df7);return _0x554df7;},y=(_0x289a6c,_0x2a08af)=>(_0x3fa146,_0x2973a9)=>_0x2a08af(_0x3fa146,_0x2973a9,_0x289a6c);let C=class extends c['Disposable']{constructor(_0x18255a,_0x486f0a){const _0x1d5564=_0x13e4c0;super(),this[_0x1d5564(0x133)]=_0x18255a,this[_0x1d5564(0xf3)]=_0x486f0a,this[_0x1d5564(0xf9)]();}[_0x13e4c0(0xf9)](){const _0x37c2bd=_0x13e4c0;this['_threadCommentDataSourceService'][_0x37c2bd(0xed)]=this[_0x37c2bd(0xf3)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M[_0x13e4c0(0x112)]),y(0x1,c['Inject'](g))],C);var F=Object[_0x13e4c0(0xe1)],L=Object[_0x13e4c0(0xdb)],Z=(_0x3c326a,_0x3d3d19,_0x3e6a2b)=>_0x3d3d19 in _0x3c326a?F(_0x3c326a,_0x3d3d19,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3e6a2b}):_0x3c326a[_0x3d3d19]=_0x3e6a2b,W=(_0x2b842e,_0x92cd84,_0x5428a8,_0x5dbf57)=>{for(var _0x2906b0=_0x5dbf57>0x1?void 0x0:_0x5dbf57?L(_0x92cd84,_0x5428a8):_0x92cd84,_0x461445=_0x2b842e['length']-0x1,_0x50f6bb;_0x461445>=0x0;_0x461445--)(_0x50f6bb=_0x2b842e[_0x461445])&&(_0x2906b0=_0x50f6bb(_0x2906b0)||_0x2906b0);return _0x2906b0;},O=(_0x460fa9,_0xc1d7d8)=>(_0x3d0b70,_0x40f662)=>_0xc1d7d8(_0x3d0b70,_0x40f662,_0x460fa9),N=(_0x2e14e2,_0x24369e,_0x29957e)=>Z(_0x2e14e2,typeof _0x24369e!=_0x13e4c0(0x12b)?_0x24369e+'':_0x24369e,_0x29957e);exports[_0x13e4c0(0x114)]=class extends c[_0x13e4c0(0xe9)]{constructor(_0x98f0b7=D,_0x1f6981,_0x8f164e){const _0x3ba687=_0x13e4c0;super(),this['_config']=_0x98f0b7,this['_injector']=_0x1f6981,this[_0x3ba687(0xd3)]=_0x8f164e;const {..._0x3a2382}=c['merge']({},D,this['_config']);this[_0x3ba687(0xd3)][_0x3ba687(0xf4)](q,_0x3a2382);}['onStarting'](){const _0x4b2828=_0x13e4c0;[[g],[C],[p]][_0x4b2828(0x127)](_0x3129cc=>{const _0xe839dc=_0x4b2828;this[_0xe839dc(0x111)][_0xe839dc(0xcb)](_0x3129cc);});}[_0x13e4c0(0x113)](){const _0x39a968=_0x13e4c0;this[_0x39a968(0x111)][_0x39a968(0xd7)](C),this[_0x39a968(0x111)][_0x39a968(0xd7)](p);}},N(exports[_0x13e4c0(0x114)],_0x13e4c0(0x149),U),N(exports[_0x13e4c0(0x114)],_0x13e4c0(0x126),c[_0x13e4c0(0x116)][_0x13e4c0(0x10d)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x13e4c0(0x121)](j[_0x13e4c0(0x103)],b['UniverCollaborationClientPlugin'],T[_0x13e4c0(0x10e)]),O(0x1,c[_0x13e4c0(0x101)](c[_0x13e4c0(0xd9)])),O(0x2,c[_0x13e4c0(0x148)])],exports['UniverThreadCommentDataSourcePlugin']);
1
+ 'use strict';const _0x41db1f=_0x4cea;function _0x57df(){const _0x8e83fa=['_sessionService','format','@univerjs/core','unitId','OpenOrReOpen','customRanges','Inject','content','updateComment','UniverInstanceType','post','ThreadCommentModel','delete','error','_initUserSync','819oeDrhX','getOwnPropertyDescriptor','YYYY/MM/DD\x20HH:mm','UNIVER_UNKNOWN','_initDataSource','commentUpdate$','symbol','dayjs','Unknown','/add','Reply','filter','_threadCommentModel','parse','type','HTTPService','code','saveCommentToSnapshot','CollaborationSessionService','@univerjs/thread-comment','Solve','Delete','setConfig','518490hYPgSk','addComment','replyId','CustomRangeType','UniverThreadCommentDataSourcePlugin','onStarting','addUser','_userService','UniverCollaborationClientPlugin','8648ldDBAe','root','userId','thread-comment-data-source.config','requireSession','stringify','comments','rangeType','onReady','Solved','size','payload','getUnit','UserManagerService','_threadCommentDataSourceService','/universer-api/user/list','4137576jLnary','bufferTime','Add','Disposable','_injector','DependentOn','/edit','4609026sxOexh','ref','forEach','toStringTag','762772ZeIqNI','getUser','length','defineProperty','_threadCommentDataSource','map','body','_config','Injector','deleteComment','UNRECOGNIZED','rangeId','/universer-api/comment/unit/','replies','COMMENT','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_configService','_init','@univerjs-pro/license','@univerjs/network','rxjs','_commentService','threadId','createTimestamp','find','1040000YUNkZO','_httpService','subscribe','get','user','pipe','add','users','@univerjs/thread-comment-ui','165372SSbqYn','merge','personId','Module','solved','Plugin','userID','Edit','180zPGQhc','getMemberID','getCurrentUser','IConfigService','listComments','resolveComment'];_0x57df=function(){return _0x8e83fa;};return _0x57df();}(function(_0x44152f,_0x47096e){const _0x12005b=_0x4cea,_0x5abe77=_0x44152f();while(!![]){try{const _0x2be710=-parseInt(_0x12005b(0xad))/0x1+parseInt(_0x12005b(0x10e))/0x2+-parseInt(_0x12005b(0xea))/0x3+parseInt(_0x12005b(0x103))/0x4+parseInt(_0x12005b(0xbe))/0x5*(parseInt(_0x12005b(0xb6))/0x6)+-parseInt(_0x12005b(0xd3))/0x7*(parseInt(_0x12005b(0xf3))/0x8)+-parseInt(_0x12005b(0x10a))/0x9;if(_0x2be710===_0x47096e)break;else _0x5abe77['push'](_0x5abe77['shift']());}catch(_0x42e42e){_0x5abe77['push'](_0x5abe77['shift']());}}}(_0x57df,0x87e2f));Object[_0x41db1f(0x97)](exports,Symbol[_0x41db1f(0x10d)],{'value':_0x41db1f(0xb9)});const b=require('@univerjs-pro/collaboration-client'),T=require(_0x41db1f(0xa6)),c=require(_0x41db1f(0xc6)),j=require(_0x41db1f(0xb5)),M=require(_0x41db1f(0xe6)),w=require(_0x41db1f(0xa8)),P=require(_0x41db1f(0xa7)),U=_0x41db1f(0xa3);var I=(_0x47ea19=>(_0x47ea19[_0x47ea19[_0x41db1f(0xc8)]=0x0]=_0x41db1f(0xc8),_0x47ea19[_0x47ea19[_0x41db1f(0xfc)]=0x1]=_0x41db1f(0xfc),_0x47ea19[_0x47ea19[_0x41db1f(0x9e)]=-0x1]=_0x41db1f(0x9e),_0x47ea19))(I||{}),v=(_0x37989e=>(_0x37989e[_0x37989e[_0x41db1f(0xdb)]=0x0]=_0x41db1f(0xdb),_0x37989e[_0x37989e[_0x41db1f(0x105)]=0x1]=_0x41db1f(0x105),_0x37989e[_0x37989e[_0x41db1f(0xdd)]=0x2]='Reply',_0x37989e[_0x37989e['Edit']=0x3]=_0x41db1f(0xbd),_0x37989e[_0x37989e[_0x41db1f(0xe8)]=0x4]='Delete',_0x37989e[_0x37989e[_0x41db1f(0xe7)]=0x5]=_0x41db1f(0xe7),_0x37989e[_0x37989e[_0x41db1f(0x9e)]=-0x1]='UNRECOGNIZED',_0x37989e))(v||{});function _0x4cea(_0xe28412,_0x23a8a9){const _0x57df90=_0x57df();return _0x4cea=function(_0x4cea6b,_0x273331){_0x4cea6b=_0x4cea6b-0x97;let _0x2e8e30=_0x57df90[_0x4cea6b];return _0x2e8e30;},_0x4cea(_0xe28412,_0x23a8a9);}const f=_0x480da2=>c[_0x41db1f(0xda)](new Date(+_0x480da2))[_0x41db1f(0xc5)](_0x41db1f(0xd5)),R=async(_0x49cf2a,_0x29c760)=>{const _0x29c7dc=_0x41db1f,_0x1c3f0d=_0x49cf2a[_0x29c7dc(0xb0)](c[_0x29c7dc(0x100)]),_0x4e2ed1=_0x49cf2a[_0x29c7dc(0xb0)](P['HTTPService']);_0x29c760[_0x29c7dc(0x10c)](_0x54bb38=>{const _0x1ba777=_0x29c7dc;_0x1c3f0d[_0x1ba777(0x10f)](_0x54bb38)&&_0x29c760[_0x1ba777(0xd0)](_0x54bb38);}),_0x29c760[_0x29c7dc(0xfd)]&&(await _0x4e2ed1[_0x29c7dc(0xb0)](_0x29c7dc(0x102),{'params':{'userIDs':[..._0x29c760]}}))[_0x29c7dc(0x9a)][_0x29c7dc(0xb4)][_0x29c7dc(0x10c)](_0x5a7699=>{const _0xeb7433=_0x29c7dc;_0x5a7699&&_0x1c3f0d[_0xeb7433(0xf0)](_0x5a7699);});};var $=Object[_0x41db1f(0xd4)],E=(_0x35494b,_0x118fce,_0x44b33c,_0x226c64)=>{const _0x223faa=_0x41db1f;for(var _0x330f80=_0x226c64>0x1?void 0x0:_0x226c64?$(_0x118fce,_0x44b33c):_0x118fce,_0x35f43b=_0x35494b[_0x223faa(0x110)]-0x1,_0x26521f;_0x35f43b>=0x0;_0x35f43b--)(_0x26521f=_0x35494b[_0x35f43b])&&(_0x330f80=_0x26521f(_0x330f80)||_0x330f80);return _0x330f80;},S=(_0x5635f2,_0x5a704d)=>(_0x4877c5,_0x2bca34)=>_0x5a704d(_0x4877c5,_0x2bca34,_0x5635f2);let p=class extends c[_0x41db1f(0x106)]{constructor(_0x55283a,_0x27475d,_0x1940ae,_0x595849){const _0x3d0519=_0x41db1f;super(),this[_0x3d0519(0xa9)]=_0x55283a,this[_0x3d0519(0xdf)]=_0x27475d,this[_0x3d0519(0xf1)]=_0x1940ae,this[_0x3d0519(0x107)]=_0x595849,this[_0x3d0519(0xa5)](),this[_0x3d0519(0xd2)]();}['_initUserSync'](){const _0x15d9bc=_0x41db1f;this['disposeWithMe'](this[_0x15d9bc(0xdf)][_0x15d9bc(0xd8)][_0x15d9bc(0xb2)](w[_0x15d9bc(0x104)](0x10))[_0x15d9bc(0xaf)](_0x3289b6=>{const _0x43003f=_0x15d9bc,_0x508298=new Set();_0x3289b6[_0x43003f(0x10c)](_0xc44d1b=>{const _0xa70f97=_0x43003f;switch(_0xc44d1b['type']){case _0xa70f97(0xb3):{const _0x2ff598=_0xc44d1b[_0xa70f97(0xfe)][_0xa70f97(0xb8)];_0x508298[_0xa70f97(0xb3)](_0x2ff598);break;}}}),R(this[_0x43003f(0x107)],_0x508298);}));}[_0x41db1f(0xa5)](){const _0x4e5626=_0x41db1f;this['disposeWithMe'](this[_0x4e5626(0xa9)][_0x4e5626(0xd8)][_0x4e5626(0xaf)](async _0x1c5de5=>{const _0x3cd13a=_0x4e5626;var _0x5c4da3,_0x5ccea3,_0x2e3e5c,_0x589b21;const _0xdb26fd=(_0x5c4da3=this[_0x3cd13a(0xdf)][_0x3cd13a(0xff)](_0x1c5de5[_0x3cd13a(0xc7)])[_0x3cd13a(0xac)](_0x4bba39=>_0x4bba39[_0x3cd13a(0xaa)]===_0x1c5de5[_0x3cd13a(0xaa)]))==null?void 0x0:_0x5c4da3['root'];if(!_0xdb26fd)return;const {unitId:_0x3f36b0,subUnitId:_0x5dcb26}=_0xdb26fd;switch(_0x1c5de5[_0x3cd13a(0xb1)]&&this[_0x3cd13a(0xf1)][_0x3cd13a(0xf0)](_0x1c5de5[_0x3cd13a(0xb1)]),_0x1c5de5[_0x3cd13a(0xe1)]){case v[_0x3cd13a(0x105)]:break;case v['Reply']:{this[_0x3cd13a(0xdf)][_0x3cd13a(0xeb)](_0x3f36b0,_0x5dcb26,{'unitId':_0x3f36b0,'subUnitId':_0x5dcb26,'ref':'','id':_0x1c5de5['replyId'],'dT':f(+_0x1c5de5[_0x3cd13a(0xab)]),'threadId':_0x1c5de5[_0x3cd13a(0xaa)],'personId':(_0x2e3e5c=(_0x5ccea3=_0x1c5de5['user'])==null?void 0x0:_0x5ccea3[_0x3cd13a(0xbc)])!=null?_0x2e3e5c:_0x1c5de5[_0x3cd13a(0xf5)],'text':JSON[_0x3cd13a(0xe0)](_0x1c5de5['content']),'parentId':_0xdb26fd['id']});break;}case v['Delete']:{const _0x19afbb=this['_threadCommentModel']['getComment'](_0x3f36b0,_0x5dcb26,_0x1c5de5[_0x3cd13a(0xec)]);_0x19afbb&&_0x19afbb['parentId']&&this[_0x3cd13a(0xdf)][_0x3cd13a(0x9d)](_0x3f36b0,_0x5dcb26,_0x1c5de5['replyId']);break;}case v['Edit']:{this['_threadCommentModel'][_0x3cd13a(0xcc)](_0x3f36b0,_0x5dcb26,{'commentId':_0x1c5de5['replyId'],'text':JSON[_0x3cd13a(0xe0)](_0x1c5de5['content'])});break;}case v[_0x3cd13a(0xe7)]:{const _0x3e8991=(_0x589b21=this['_threadCommentModel'][_0x3cd13a(0xff)](_0x1c5de5[_0x3cd13a(0xc7)])[_0x3cd13a(0xac)](_0x43afe0=>_0x43afe0[_0x3cd13a(0xaa)]===_0x1c5de5['threadId']))==null?void 0x0:_0x589b21[_0x3cd13a(0xf4)];_0x3e8991&&this[_0x3cd13a(0xdf)][_0x3cd13a(0xc3)](_0x3f36b0,_0x5dcb26,_0x3e8991['id'],_0x1c5de5[_0x3cd13a(0xba)]===I[_0x3cd13a(0xfc)]);break;}}}));}};p=E([S(0x0,c[_0x41db1f(0xca)](b['CommentService'])),S(0x1,c['Inject'](M[_0x41db1f(0xcf)])),S(0x2,c[_0x41db1f(0xca)](c['UserManagerService'])),S(0x3,c[_0x41db1f(0xca)](c[_0x41db1f(0x9c)]))],p);const q=_0x41db1f(0xf6),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0xd4af63,_0x592955,_0x311e34,_0x322f68)=>{const _0x4fb828=_0x41db1f;for(var _0x37ee9a=_0x322f68>0x1?void 0x0:_0x322f68?A(_0x592955,_0x311e34):_0x592955,_0x595540=_0xd4af63[_0x4fb828(0x110)]-0x1,_0x202252;_0x595540>=0x0;_0x595540--)(_0x202252=_0xd4af63[_0x595540])&&(_0x37ee9a=_0x202252(_0x37ee9a)||_0x37ee9a);return _0x37ee9a;},_=(_0x390c3b,_0x19d26d)=>(_0x1d8794,_0x4484ce)=>_0x19d26d(_0x1d8794,_0x4484ce,_0x390c3b);function Y(_0x4d28e3,_0x283d73){const _0x105374=_0x41db1f,_0x428eeb=_0x4d28e3[_0x105374(0xa1)][0x0];return{..._0x283d73,'id':_0x428eeb['replyId'],'resolved':_0x4d28e3[_0x105374(0xba)]===0x1,'dT':f(_0x428eeb[_0x105374(0xab)]),'personId':_0x428eeb[_0x105374(0xf5)],'threadId':_0x428eeb[_0x105374(0xaa)]};}function G(_0x1a640a,_0x4da8aa,_0x132402){const _0x3932e3=_0x41db1f;var _0x3c0dc7,_0x16734b;if(((_0x16734b=(_0x3c0dc7=_0x1a640a==null?void 0x0:_0x1a640a[_0x3932e3(0xa1)])==null?void 0x0:_0x3c0dc7[_0x3932e3(0x110)])!=null?_0x16734b:0x0)>0x0){const _0x45cf90=(_0x58ab2d,_0x176fd0)=>({'id':_0x58ab2d[_0x3932e3(0xec)],'threadId':_0x58ab2d[_0x3932e3(0xaa)],'dT':f(_0x58ab2d['createTimestamp']),'personId':_0x58ab2d[_0x3932e3(0xf5)],'resolved':_0x1a640a[_0x3932e3(0xba)]===I['Solved'],'unitId':_0x4da8aa,'subUnitId':_0x132402,'text':JSON[_0x3932e3(0xe0)](_0x58ab2d[_0x3932e3(0xcb)]),'parentId':_0x176fd0}),_0xdaedb6=_0x45cf90(_0x1a640a[_0x3932e3(0xa1)][0x0]);return{..._0xdaedb6,'children':_0x1a640a[_0x3932e3(0xa1)]['slice'](0x1)[_0x3932e3(0x99)](_0x5b3425=>_0x45cf90(_0x5b3425,_0xdaedb6['id']))};}return null;}let g=class{constructor(_0x2478e6,_0x31db45,_0x52f017,_0x1dec99){const _0x349373=_0x41db1f;this[_0x349373(0xae)]=_0x2478e6,this[_0x349373(0xf1)]=_0x31db45,this[_0x349373(0xc4)]=_0x52f017,this['_injector']=_0x1dec99;}async[_0x41db1f(0xeb)](_0x5aa5a6){const _0x4be2cf=_0x41db1f;var _0x5ab8c5,_0x336681;const {parentId:_0x264148,unitId:_0x5259b6,text:_0xec7f03,threadId:_0x27eca2}=_0x5aa5a6,_0x294c8d=(_0x336681=(_0x5ab8c5=_0xec7f03[_0x4be2cf(0xc9)])==null?void 0x0:_0x5ab8c5[_0x4be2cf(0xde)](_0x4c7d39=>_0x4c7d39[_0x4be2cf(0xfa)]===c[_0x4be2cf(0xed)][_0x4be2cf(0xa2)])[_0x4be2cf(0x99)](_0x67aae0=>_0x67aae0['rangeId']))!=null?_0x336681:[],_0xb16f61=JSON[_0x4be2cf(0xf8)](_0xec7f03),_0x1df3e2=(await this[_0x4be2cf(0xc4)]['requireSession'](_0x5259b6))[_0x4be2cf(0xbf)]();if(_0x264148){const _0x9c23a={'memberId':_0x1df3e2,'unitId':_0x5259b6,'content':_0xb16f61,'mention':_0x294c8d,'threadId':_0x27eca2},_0x572298=(await this[_0x4be2cf(0xae)][_0x4be2cf(0xce)](_0x4be2cf(0xa0)+_0x5259b6+'/reply',{'body':_0x9c23a}))[_0x4be2cf(0x9a)]['reply'];return{..._0x5aa5a6,'id':_0x572298[_0x4be2cf(0xec)],'dT':c['dayjs'](+_0x572298[_0x4be2cf(0xab)])[_0x4be2cf(0xc5)](_0x4be2cf(0xd5)),'personId':_0x572298[_0x4be2cf(0xf5)]};}else{const _0x751e90={'memberId':_0x1df3e2,'unitId':_0x5259b6,'content':_0xb16f61,'mention':_0x294c8d},_0x4991fd=await this[_0x4be2cf(0xae)][_0x4be2cf(0xce)](_0x4be2cf(0xa0)+_0x5259b6+_0x4be2cf(0xdc),{'body':_0x751e90});return Y(_0x4991fd[_0x4be2cf(0x9a)]['comment'],_0x5aa5a6);}}async['updateComment'](_0x1558a6){const _0x561a09=_0x41db1f;var _0x2d94c5,_0x1396bb;const {text:_0x4bb600,unitId:_0xe4290c}=_0x1558a6,_0x3a8bf1=(_0x1396bb=(_0x2d94c5=_0x4bb600[_0x561a09(0xc9)])==null?void 0x0:_0x2d94c5['filter'](_0x5c2cdd=>_0x5c2cdd['rangeType']===c[_0x561a09(0xed)]['COMMENT'])['map'](_0x5817ce=>_0x5817ce[_0x561a09(0x9f)]))!=null?_0x1396bb:[],_0x317c3c=JSON[_0x561a09(0xf8)](_0x4bb600),_0x21eb94=_0x1558a6[_0x561a09(0xaa)],_0x18cd57=_0x1558a6['id'],_0x25d1b2={'memberId':(await this[_0x561a09(0xc4)][_0x561a09(0xf7)](_0xe4290c))[_0x561a09(0xbf)](),'unitId':_0xe4290c,'threadId':_0x21eb94,'mention':_0x3a8bf1,'content':_0x317c3c,'replyId':_0x18cd57},_0x142904=await this[_0x561a09(0xae)]['post'](_0x561a09(0xa0)+_0xe4290c+_0x561a09(0x109),{'body':_0x25d1b2});return!_0x142904[_0x561a09(0x9a)][_0x561a09(0xd1)]||_0x142904[_0x561a09(0x9a)][_0x561a09(0xd1)][_0x561a09(0xe3)]===0x1;}async[_0x41db1f(0xc3)](_0x348062){const _0x365e83=_0x41db1f,{unitId:_0x4ac8c5}=_0x348062,_0x334c4e=_0x348062[_0x365e83(0xaa)],_0x2c1df4={'memberId':this[_0x365e83(0xf1)][_0x365e83(0xc0)]()[_0x365e83(0xbc)],'unitId':_0x4ac8c5,'threadId':_0x334c4e,'solved':_0x348062['resolved']?I[_0x365e83(0xfc)]:I[_0x365e83(0xc8)]},_0xefb99f=await this[_0x365e83(0xae)][_0x365e83(0xce)](_0x365e83(0xa0)+_0x4ac8c5+'/solved',{'body':_0x2c1df4});return!_0xefb99f['body'][_0x365e83(0xd1)]||_0xefb99f[_0x365e83(0x9a)][_0x365e83(0xd1)]['code']===0x1;}async[_0x41db1f(0x9d)](_0x2ccae5,_0x3af31f,_0x27b458,_0x264b90){const _0x32ba34=_0x41db1f,_0x5fe687={'memberId':(await this[_0x32ba34(0xc4)]['requireSession'](_0x2ccae5))[_0x32ba34(0xbf)](),'threadId':_0x27b458,'replyId':_0x264b90,'unitId':_0x2ccae5},_0x479cba=await this[_0x32ba34(0xae)]['post'](_0x32ba34(0xa0)+_0x2ccae5+'/delete',{'body':_0x5fe687});return!_0x479cba[_0x32ba34(0x9a)][_0x32ba34(0xd1)]||_0x479cba[_0x32ba34(0x9a)]['error']['code']===0x1;}async[_0x41db1f(0xc2)](_0x21ab54,_0x2dd98a,_0x5a0b6a){const _0x44e127=_0x41db1f,_0xa8fe86={'unitId':_0x21ab54,'threadId':_0x5a0b6a},_0x365e5d=await this['_httpService'][_0x44e127(0xce)]('/universer-api/comment/unit/'+_0x21ab54+'/list',{'body':_0xa8fe86}),_0x31210c=_0x5a0b6a[_0x44e127(0x99)](_0x2b0e38=>G(_0x365e5d[_0x44e127(0x9a)][_0x44e127(0xf9)][_0x2b0e38],_0x21ab54,_0x2dd98a))[_0x44e127(0xde)](Boolean);return Object['values'](_0x365e5d[_0x44e127(0x9a)]['users'])[_0x44e127(0x10c)](_0x2a8891=>{this['_userService']['addUser'](_0x2a8891);}),_0x31210c;}[_0x41db1f(0xe4)](_0x15fd9b){const _0x15b49a=_0x41db1f;return{'id':_0x15fd9b['id'],'threadId':_0x15fd9b[_0x15b49a(0xaa)],'ref':_0x15fd9b[_0x15b49a(0x10b)]};}};g=x([_(0x0,c[_0x41db1f(0xca)](P[_0x41db1f(0xe2)])),_(0x1,c[_0x41db1f(0xca)](c[_0x41db1f(0x100)])),_(0x2,c[_0x41db1f(0xca)](b[_0x41db1f(0xe5)])),_(0x3,c[_0x41db1f(0xca)](c[_0x41db1f(0x9c)]))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x23eb32,_0xee7f,_0x43826f,_0xb9ec34)=>{const _0x3e691a=_0x41db1f;for(var _0x458b07=_0xb9ec34>0x1?void 0x0:_0xb9ec34?H(_0xee7f,_0x43826f):_0xee7f,_0x2156bc=_0x23eb32[_0x3e691a(0x110)]-0x1,_0x54df22;_0x2156bc>=0x0;_0x2156bc--)(_0x54df22=_0x23eb32[_0x2156bc])&&(_0x458b07=_0x54df22(_0x458b07)||_0x458b07);return _0x458b07;},y=(_0x17916c,_0x7d7a4b)=>(_0x34178a,_0x3dc03b)=>_0x7d7a4b(_0x34178a,_0x3dc03b,_0x17916c);let C=class extends c[_0x41db1f(0x106)]{constructor(_0x22937c,_0x4370c4){const _0x403c8d=_0x41db1f;super(),this[_0x403c8d(0x101)]=_0x22937c,this[_0x403c8d(0x98)]=_0x4370c4,this['_initDataSource']();}[_0x41db1f(0xd7)](){const _0x316d33=_0x41db1f;this['_threadCommentDataSourceService']['dataSource']=this[_0x316d33(0x98)],this[_0x316d33(0x101)]['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c['Inject'](g))],C);var F=Object[_0x41db1f(0x97)],L=Object['getOwnPropertyDescriptor'],Z=(_0x1e766f,_0x37dbec,_0x4c022f)=>_0x37dbec in _0x1e766f?F(_0x1e766f,_0x37dbec,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4c022f}):_0x1e766f[_0x37dbec]=_0x4c022f,W=(_0x4a963a,_0x2bedd7,_0x22753d,_0x28eade)=>{for(var _0x4e42c3=_0x28eade>0x1?void 0x0:_0x28eade?L(_0x2bedd7,_0x22753d):_0x2bedd7,_0x591fb3=_0x4a963a['length']-0x1,_0x192d46;_0x591fb3>=0x0;_0x591fb3--)(_0x192d46=_0x4a963a[_0x591fb3])&&(_0x4e42c3=_0x192d46(_0x4e42c3)||_0x4e42c3);return _0x4e42c3;},O=(_0x508c24,_0x2dc29d)=>(_0x8579d1,_0x3183c2)=>_0x2dc29d(_0x8579d1,_0x3183c2,_0x508c24),N=(_0x464c65,_0x53bd76,_0x2a2fcb)=>Z(_0x464c65,typeof _0x53bd76!=_0x41db1f(0xd9)?_0x53bd76+'':_0x53bd76,_0x2a2fcb);exports[_0x41db1f(0xee)]=class extends c[_0x41db1f(0xbb)]{constructor(_0x314855=D,_0x2eb1bb,_0x5ee599){const _0x14f34c=_0x41db1f;super(),this[_0x14f34c(0x9b)]=_0x314855,this[_0x14f34c(0x107)]=_0x2eb1bb,this[_0x14f34c(0xa4)]=_0x5ee599;const {..._0x5d3a77}=c[_0x14f34c(0xb7)]({},D,this[_0x14f34c(0x9b)]);this['_configService'][_0x14f34c(0xe9)](q,_0x5d3a77);}[_0x41db1f(0xef)](){[[g],[C],[p]]['forEach'](_0x3d70b1=>{const _0x2e5dff=_0x4cea;this['_injector'][_0x2e5dff(0xb3)](_0x3d70b1);});}[_0x41db1f(0xfb)](){const _0x1a46ea=_0x41db1f;this[_0x1a46ea(0x107)][_0x1a46ea(0xb0)](C),this[_0x1a46ea(0x107)][_0x1a46ea(0xb0)](p);}},N(exports[_0x41db1f(0xee)],'pluginName',U),N(exports[_0x41db1f(0xee)],_0x41db1f(0xe1),c[_0x41db1f(0xcd)][_0x41db1f(0xd6)]),exports[_0x41db1f(0xee)]=W([c[_0x41db1f(0x108)](j['UniverThreadCommentUIPlugin'],b[_0x41db1f(0xf2)],T['UniverLicensePlugin']),O(0x1,c[_0x41db1f(0xca)](c[_0x41db1f(0x9c)])),O(0x2,c[_0x41db1f(0xc1)])],exports[_0x41db1f(0xee)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x5ea299=_0x2775;(function(_0x221f88,_0x118314){const _0x45faec=_0x2775,_0x40b7d5=_0x221f88();while(!![]){try{const _0xb18404=parseInt(_0x45faec(0x13e))/0x1+parseInt(_0x45faec(0x146))/0x2+-parseInt(_0x45faec(0x112))/0x3*(-parseInt(_0x45faec(0x11b))/0x4)+parseInt(_0x45faec(0x16e))/0x5+-parseInt(_0x45faec(0x150))/0x6*(parseInt(_0x45faec(0x14e))/0x7)+-parseInt(_0x45faec(0x15c))/0x8+-parseInt(_0x45faec(0x168))/0x9*(-parseInt(_0x45faec(0x11f))/0xa);if(_0xb18404===_0x118314)break;else _0x40b7d5['push'](_0x40b7d5['shift']());}catch(_0x5363e9){_0x40b7d5['push'](_0x40b7d5['shift']());}}}(_0x3587,0x40456));import{CommentService as _0xe371d,CollaborationSessionService as _0x27a803,UniverCollaborationClientPlugin as _0x18a047}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x170b60}from'@univerjs-pro/license';import{dayjs as _0x2b85d2,UserManagerService as _0xbb1ba0,Inject as _0x3fdad7,Injector as _0x235f21,Disposable as _0x52035e,CustomRangeType as _0x49fbf1,UniverInstanceType as _0x593503,DependentOn as _0x2b24ef,IConfigService as _0x591b1e,Plugin as _0x49816f,merge as _0xa3f01a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x36a0a4}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x4b77e1,IThreadCommentDataSourceService as _0x48d157}from'@univerjs/thread-comment';import{bufferTime as _0x291499}from'rxjs';import{HTTPService as _0x428c70}from'@univerjs/network';const W=_0x5ea299(0x137);var I=(_0x3aec58=>(_0x3aec58[_0x3aec58[_0x5ea299(0x119)]=0x0]=_0x5ea299(0x119),_0x3aec58[_0x3aec58['Solved']=0x1]='Solved',_0x3aec58[_0x3aec58[_0x5ea299(0x129)]=-0x1]='UNRECOGNIZED',_0x3aec58))(I||{}),v=(_0x270e0e=>(_0x270e0e[_0x270e0e[_0x5ea299(0x164)]=0x0]=_0x5ea299(0x164),_0x270e0e[_0x270e0e[_0x5ea299(0x122)]=0x1]='Add',_0x270e0e[_0x270e0e[_0x5ea299(0x120)]=0x2]=_0x5ea299(0x120),_0x270e0e[_0x270e0e[_0x5ea299(0x16c)]=0x3]=_0x5ea299(0x16c),_0x270e0e[_0x270e0e['Delete']=0x4]='Delete',_0x270e0e[_0x270e0e[_0x5ea299(0x12a)]=0x5]=_0x5ea299(0x12a),_0x270e0e[_0x270e0e[_0x5ea299(0x129)]=-0x1]=_0x5ea299(0x129),_0x270e0e))(v||{});function _0x3587(){const _0x8dceef=['_threadCommentDataSourceService','requireSession','7TGXraV','getUnit','341862ugeQUh','subscribe','stringify','filter','error','_initUserSync','_threadCommentDataSource','getUser','thread-comment-data-source.config','size','code','content','1657240uvkcds','/solved','forEach','pluginName','/reply','_init','_userService','addUser','Unknown','saveCommentToSnapshot','delete','pipe','18AxOWTM','ref','/delete','disposeWithMe','Edit','reply','1745995DjvBJS','parse','personId','rangeType','body','find','addComment','getCurrentUser','root','userID','YYYY/MM/DD\x20HH:mm','_injector','31257HWNQXM','deleteComment','replyId','dataSource','defineProperty','createTimestamp','/add','OpenOrReOpen','type','4OLSfNo','updateComment','/universer-api/comment/unit/','userId','209470nKRnuI','Reply','listComments','Add','format','getOwnPropertyDescriptor','_config','unitId','COMMENT','get','UNRECOGNIZED','Solve','Solved','_initDataSource','solved','payload','_threadCommentModel','getMemberID','comment','add','commentUpdate$','rangeId','replies','/universer-api/user/list','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','customRanges','slice','length','getComment','/list','/edit','96401zneNMh','map','values','onStarting','resolved','_commentService','_httpService','_configService','58946ccdsGz','_sessionService','user','resolveComment','threadId','post'];_0x3587=function(){return _0x8dceef;};return _0x3587();}const D=_0x4b3481=>_0x2b85d2(new Date(+_0x4b3481))[_0x5ea299(0x123)](_0x5ea299(0x110)),B=async(_0x4d93be,_0x24d195)=>{const _0x1828ef=_0x5ea299,_0xe71a94=_0x4d93be[_0x1828ef(0x128)](_0xbb1ba0),_0x51cc08=_0x4d93be[_0x1828ef(0x128)](_0x428c70);_0x24d195[_0x1828ef(0x15e)](_0x10b60b=>{const _0x37414b=_0x1828ef;_0xe71a94[_0x37414b(0x157)](_0x10b60b)&&_0x24d195[_0x37414b(0x166)](_0x10b60b);}),_0x24d195[_0x1828ef(0x159)]&&(await _0x51cc08[_0x1828ef(0x128)](_0x1828ef(0x136),{'params':{'userIDs':[..._0x24d195]}}))['body']['users'][_0x1828ef(0x15e)](_0x5a7899=>{const _0x257fbd=_0x1828ef;_0x5a7899&&_0xe71a94[_0x257fbd(0x163)](_0x5a7899);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x36aa7e,_0x52cffa,_0x3dd4da,_0x1c23b5)=>{const _0x29fb7f=_0x5ea299;for(var _0xfdb222=_0x1c23b5>0x1?void 0x0:_0x1c23b5?K(_0x52cffa,_0x3dd4da):_0x52cffa,_0x3a13be=_0x36aa7e[_0x29fb7f(0x13a)]-0x1,_0x1080c6;_0x3a13be>=0x0;_0x3a13be--)(_0x1080c6=_0x36aa7e[_0x3a13be])&&(_0xfdb222=_0x1080c6(_0xfdb222)||_0xfdb222);return _0xfdb222;},p=(_0x3da172,_0x2c1238)=>(_0x5d464b,_0x5dc498)=>_0x2c1238(_0x5d464b,_0x5dc498,_0x3da172);let S=class extends _0x52035e{constructor(_0x49f4ff,_0x508397,_0x118cf1,_0x4fb849){const _0x1f7a1e=_0x5ea299;super(),this[_0x1f7a1e(0x143)]=_0x49f4ff,this[_0x1f7a1e(0x12f)]=_0x508397,this[_0x1f7a1e(0x162)]=_0x118cf1,this[_0x1f7a1e(0x111)]=_0x4fb849,this[_0x1f7a1e(0x161)](),this[_0x1f7a1e(0x155)]();}[_0x5ea299(0x155)](){const _0x32eefc=_0x5ea299;this[_0x32eefc(0x16b)](this[_0x32eefc(0x12f)][_0x32eefc(0x133)][_0x32eefc(0x167)](_0x291499(0x10))[_0x32eefc(0x151)](_0x7c62b9=>{const _0x55aba7=_0x32eefc,_0x17c5b7=new Set();_0x7c62b9[_0x55aba7(0x15e)](_0x2c147d=>{const _0x121be4=_0x55aba7;switch(_0x2c147d[_0x121be4(0x11a)]){case _0x121be4(0x132):{const _0x5593d1=_0x2c147d[_0x121be4(0x12e)][_0x121be4(0x170)];_0x17c5b7[_0x121be4(0x132)](_0x5593d1);break;}}}),B(this[_0x55aba7(0x111)],_0x17c5b7);}));}['_init'](){const _0x7a5cd8=_0x5ea299;this[_0x7a5cd8(0x16b)](this[_0x7a5cd8(0x143)]['commentUpdate$'][_0x7a5cd8(0x151)](async _0x25c866=>{const _0x3bc76b=_0x7a5cd8;var _0x47a79b,_0x131bb0,_0x88e959,_0x44a1b7;const _0x553b12=(_0x47a79b=this[_0x3bc76b(0x12f)][_0x3bc76b(0x14f)](_0x25c866['unitId'])['find'](_0x3a0289=>_0x3a0289[_0x3bc76b(0x14a)]===_0x25c866['threadId']))==null?void 0x0:_0x47a79b[_0x3bc76b(0x10e)];if(!_0x553b12)return;const {unitId:_0xc8fb53,subUnitId:_0x75e6c1}=_0x553b12;switch(_0x25c866[_0x3bc76b(0x148)]&&this[_0x3bc76b(0x162)][_0x3bc76b(0x163)](_0x25c866[_0x3bc76b(0x148)]),_0x25c866[_0x3bc76b(0x11a)]){case v['Add']:break;case v[_0x3bc76b(0x120)]:{this['_threadCommentModel'][_0x3bc76b(0x174)](_0xc8fb53,_0x75e6c1,{'unitId':_0xc8fb53,'subUnitId':_0x75e6c1,'ref':'','id':_0x25c866['replyId'],'dT':D(+_0x25c866['createTimestamp']),'threadId':_0x25c866[_0x3bc76b(0x14a)],'personId':(_0x88e959=(_0x131bb0=_0x25c866[_0x3bc76b(0x148)])==null?void 0x0:_0x131bb0[_0x3bc76b(0x10f)])!=null?_0x88e959:_0x25c866[_0x3bc76b(0x11e)],'text':JSON[_0x3bc76b(0x16f)](_0x25c866[_0x3bc76b(0x15b)]),'parentId':_0x553b12['id']});break;}case v['Delete']:{const _0x53081a=this['_threadCommentModel'][_0x3bc76b(0x13b)](_0xc8fb53,_0x75e6c1,_0x25c866[_0x3bc76b(0x114)]);_0x53081a&&_0x53081a['parentId']&&this['_threadCommentModel'][_0x3bc76b(0x113)](_0xc8fb53,_0x75e6c1,_0x25c866[_0x3bc76b(0x114)]);break;}case v['Edit']:{this[_0x3bc76b(0x12f)]['updateComment'](_0xc8fb53,_0x75e6c1,{'commentId':_0x25c866[_0x3bc76b(0x114)],'text':JSON[_0x3bc76b(0x16f)](_0x25c866[_0x3bc76b(0x15b)])});break;}case v[_0x3bc76b(0x12a)]:{const _0x3241d4=(_0x44a1b7=this['_threadCommentModel'][_0x3bc76b(0x14f)](_0x25c866[_0x3bc76b(0x126)])[_0x3bc76b(0x173)](_0x41d161=>_0x41d161['threadId']===_0x25c866[_0x3bc76b(0x14a)]))==null?void 0x0:_0x44a1b7['root'];_0x3241d4&&this[_0x3bc76b(0x12f)][_0x3bc76b(0x149)](_0xc8fb53,_0x75e6c1,_0x3241d4['id'],_0x25c866['solved']===I[_0x3bc76b(0x12b)]);break;}}}));}};function _0x2775(_0x2f7246,_0x2e4ae8){const _0x35877b=_0x3587();return _0x2775=function(_0x277507,_0x1a0bde){_0x277507=_0x277507-0x10e;let _0x343e4a=_0x35877b[_0x277507];return _0x343e4a;},_0x2775(_0x2f7246,_0x2e4ae8);}S=V([p(0x0,_0x3fdad7(_0xe371d)),p(0x1,_0x3fdad7(_0x4b77e1)),p(0x2,_0x3fdad7(_0xbb1ba0)),p(0x3,_0x3fdad7(_0x235f21))],S);const z=_0x5ea299(0x158),M={};var k=Object[_0x5ea299(0x124)],Q=(_0x413f57,_0x271b5b,_0xdbecf6,_0x5bc830)=>{const _0x7056cc=_0x5ea299;for(var _0x5a3881=_0x5bc830>0x1?void 0x0:_0x5bc830?k(_0x271b5b,_0xdbecf6):_0x271b5b,_0x30eb18=_0x413f57[_0x7056cc(0x13a)]-0x1,_0x4b5022;_0x30eb18>=0x0;_0x30eb18--)(_0x4b5022=_0x413f57[_0x30eb18])&&(_0x5a3881=_0x4b5022(_0x5a3881)||_0x5a3881);return _0x5a3881;},_=(_0x179929,_0x3d86fd)=>(_0x13bf3f,_0x316943)=>_0x3d86fd(_0x13bf3f,_0x316943,_0x179929);function X(_0x27a531,_0x120137){const _0x2ea8df=_0x5ea299,_0x209979=_0x27a531['replies'][0x0];return{..._0x120137,'id':_0x209979[_0x2ea8df(0x114)],'resolved':_0x27a531[_0x2ea8df(0x12d)]===0x1,'dT':D(_0x209979[_0x2ea8df(0x117)]),'personId':_0x209979[_0x2ea8df(0x11e)],'threadId':_0x209979['threadId']};}function ee(_0x31e04f,_0xbcb621,_0x302a95){const _0xab605c=_0x5ea299;var _0x41f88e,_0x193c9e;if(((_0x193c9e=(_0x41f88e=_0x31e04f==null?void 0x0:_0x31e04f[_0xab605c(0x135)])==null?void 0x0:_0x41f88e[_0xab605c(0x13a)])!=null?_0x193c9e:0x0)>0x0){const _0x8f7c49=(_0x1cc58a,_0x2f7cb5)=>({'id':_0x1cc58a['replyId'],'threadId':_0x1cc58a[_0xab605c(0x14a)],'dT':D(_0x1cc58a[_0xab605c(0x117)]),'personId':_0x1cc58a[_0xab605c(0x11e)],'resolved':_0x31e04f['solved']===I['Solved'],'unitId':_0xbcb621,'subUnitId':_0x302a95,'text':JSON['parse'](_0x1cc58a['content']),'parentId':_0x2f7cb5}),_0x2dcac0=_0x8f7c49(_0x31e04f['replies'][0x0]);return{..._0x2dcac0,'children':_0x31e04f[_0xab605c(0x135)][_0xab605c(0x139)](0x1)[_0xab605c(0x13f)](_0x42a154=>_0x8f7c49(_0x42a154,_0x2dcac0['id']))};}return null;}let f=class{constructor(_0x308bf4,_0x59b614,_0x2145b4,_0x3070fc){const _0x5e8f90=_0x5ea299;this['_httpService']=_0x308bf4,this[_0x5e8f90(0x162)]=_0x59b614,this[_0x5e8f90(0x147)]=_0x2145b4,this[_0x5e8f90(0x111)]=_0x3070fc;}async['addComment'](_0x57cb68){const _0x279382=_0x5ea299;var _0x3542be,_0x57b7a3;const {parentId:_0x3707e9,unitId:_0x1995bf,text:_0x543c0c,threadId:_0x217d0e}=_0x57cb68,_0x25c6bf=(_0x57b7a3=(_0x3542be=_0x543c0c['customRanges'])==null?void 0x0:_0x3542be[_0x279382(0x153)](_0x312df=>_0x312df[_0x279382(0x171)]===_0x49fbf1[_0x279382(0x127)])['map'](_0x255e91=>_0x255e91[_0x279382(0x134)]))!=null?_0x57b7a3:[],_0x2afdaf=JSON[_0x279382(0x152)](_0x543c0c),_0xdcc61b=(await this[_0x279382(0x147)][_0x279382(0x14d)](_0x1995bf))[_0x279382(0x130)]();if(_0x3707e9){const _0xac05be={'memberId':_0xdcc61b,'unitId':_0x1995bf,'content':_0x2afdaf,'mention':_0x25c6bf,'threadId':_0x217d0e},_0x3efd72=(await this[_0x279382(0x144)][_0x279382(0x14b)](_0x279382(0x11d)+_0x1995bf+_0x279382(0x160),{'body':_0xac05be}))[_0x279382(0x172)][_0x279382(0x16d)];return{..._0x57cb68,'id':_0x3efd72[_0x279382(0x114)],'dT':_0x2b85d2(+_0x3efd72['createTimestamp'])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x3efd72[_0x279382(0x11e)]};}else{const _0x3bb490={'memberId':_0xdcc61b,'unitId':_0x1995bf,'content':_0x2afdaf,'mention':_0x25c6bf},_0x183afb=await this[_0x279382(0x144)][_0x279382(0x14b)](_0x279382(0x11d)+_0x1995bf+_0x279382(0x118),{'body':_0x3bb490});return X(_0x183afb[_0x279382(0x172)][_0x279382(0x131)],_0x57cb68);}}async[_0x5ea299(0x11c)](_0x36f7cc){const _0x5751bf=_0x5ea299;var _0x37879e,_0x37a5e1;const {text:_0x13fe46,unitId:_0x27ea15}=_0x36f7cc,_0x32d625=(_0x37a5e1=(_0x37879e=_0x13fe46[_0x5751bf(0x138)])==null?void 0x0:_0x37879e[_0x5751bf(0x153)](_0x2796cc=>_0x2796cc[_0x5751bf(0x171)]===_0x49fbf1['COMMENT'])[_0x5751bf(0x13f)](_0x8ac410=>_0x8ac410[_0x5751bf(0x134)]))!=null?_0x37a5e1:[],_0x54e8ca=JSON[_0x5751bf(0x152)](_0x13fe46),_0x2b28bc=_0x36f7cc[_0x5751bf(0x14a)],_0x40bb3b=_0x36f7cc['id'],_0x5ea4df={'memberId':(await this[_0x5751bf(0x147)]['requireSession'](_0x27ea15))['getMemberID'](),'unitId':_0x27ea15,'threadId':_0x2b28bc,'mention':_0x32d625,'content':_0x54e8ca,'replyId':_0x40bb3b},_0x4da681=await this['_httpService'][_0x5751bf(0x14b)]('/universer-api/comment/unit/'+_0x27ea15+_0x5751bf(0x13d),{'body':_0x5ea4df});return!_0x4da681['body'][_0x5751bf(0x154)]||_0x4da681[_0x5751bf(0x172)][_0x5751bf(0x154)][_0x5751bf(0x15a)]===0x1;}async[_0x5ea299(0x149)](_0x2bc3c6){const _0xd0bd31=_0x5ea299,{unitId:_0x2e57a8}=_0x2bc3c6,_0x15232c=_0x2bc3c6[_0xd0bd31(0x14a)],_0x184d1c={'memberId':this[_0xd0bd31(0x162)][_0xd0bd31(0x175)]()[_0xd0bd31(0x10f)],'unitId':_0x2e57a8,'threadId':_0x15232c,'solved':_0x2bc3c6[_0xd0bd31(0x142)]?I[_0xd0bd31(0x12b)]:I[_0xd0bd31(0x119)]},_0x55b8c7=await this[_0xd0bd31(0x144)][_0xd0bd31(0x14b)](_0xd0bd31(0x11d)+_0x2e57a8+_0xd0bd31(0x15d),{'body':_0x184d1c});return!_0x55b8c7[_0xd0bd31(0x172)][_0xd0bd31(0x154)]||_0x55b8c7['body'][_0xd0bd31(0x154)][_0xd0bd31(0x15a)]===0x1;}async[_0x5ea299(0x113)](_0x56e62a,_0x497b54,_0x2ed065,_0x57af67){const _0x2f8242=_0x5ea299,_0x158ce3={'memberId':(await this[_0x2f8242(0x147)][_0x2f8242(0x14d)](_0x56e62a))[_0x2f8242(0x130)](),'threadId':_0x2ed065,'replyId':_0x57af67,'unitId':_0x56e62a},_0x1c4e4c=await this['_httpService']['post'](_0x2f8242(0x11d)+_0x56e62a+_0x2f8242(0x16a),{'body':_0x158ce3});return!_0x1c4e4c[_0x2f8242(0x172)]['error']||_0x1c4e4c['body']['error']['code']===0x1;}async[_0x5ea299(0x121)](_0x4ccc5f,_0x8566d8,_0x19aa9a){const _0x4aef7e=_0x5ea299,_0x20b817={'unitId':_0x4ccc5f,'threadId':_0x19aa9a},_0x5400c6=await this['_httpService'][_0x4aef7e(0x14b)]('/universer-api/comment/unit/'+_0x4ccc5f+_0x4aef7e(0x13c),{'body':_0x20b817}),_0xdd5b8d=_0x19aa9a['map'](_0x28cb32=>ee(_0x5400c6['body']['comments'][_0x28cb32],_0x4ccc5f,_0x8566d8))[_0x4aef7e(0x153)](Boolean);return Object[_0x4aef7e(0x140)](_0x5400c6['body']['users'])[_0x4aef7e(0x15e)](_0x382785=>{const _0x28d683=_0x4aef7e;this[_0x28d683(0x162)]['addUser'](_0x382785);}),_0xdd5b8d;}[_0x5ea299(0x165)](_0x4ddf4d){const _0x24abfe=_0x5ea299;return{'id':_0x4ddf4d['id'],'threadId':_0x4ddf4d['threadId'],'ref':_0x4ddf4d[_0x24abfe(0x169)]};}};f=Q([_(0x0,_0x3fdad7(_0x428c70)),_(0x1,_0x3fdad7(_0xbb1ba0)),_(0x2,_0x3fdad7(_0x27a803)),_(0x3,_0x3fdad7(_0x235f21))],f);var re=Object[_0x5ea299(0x124)],te=(_0x2d58f2,_0x47765b,_0x1529e7,_0x90c0c9)=>{const _0x4d433f=_0x5ea299;for(var _0x4f6140=_0x90c0c9>0x1?void 0x0:_0x90c0c9?re(_0x47765b,_0x1529e7):_0x47765b,_0x261b4e=_0x2d58f2[_0x4d433f(0x13a)]-0x1,_0x49c117;_0x261b4e>=0x0;_0x261b4e--)(_0x49c117=_0x2d58f2[_0x261b4e])&&(_0x4f6140=_0x49c117(_0x4f6140)||_0x4f6140);return _0x4f6140;},N=(_0xa353db,_0x513b8e)=>(_0x58f045,_0x223655)=>_0x513b8e(_0x58f045,_0x223655,_0xa353db);let g=class extends _0x52035e{constructor(_0x7c2ed,_0x48e539){const _0x3fe157=_0x5ea299;super(),this['_threadCommentDataSourceService']=_0x7c2ed,this[_0x3fe157(0x156)]=_0x48e539,this[_0x3fe157(0x12c)]();}[_0x5ea299(0x12c)](){const _0x5aa42b=_0x5ea299;this[_0x5aa42b(0x14c)][_0x5aa42b(0x115)]=this[_0x5aa42b(0x156)],this[_0x5aa42b(0x14c)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x48d157),N(0x1,_0x3fdad7(f))],g);var se=Object[_0x5ea299(0x116)],oe=Object[_0x5ea299(0x124)],ne=(_0x5a5a63,_0x2581b7,_0x37a569)=>_0x2581b7 in _0x5a5a63?se(_0x5a5a63,_0x2581b7,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x37a569}):_0x5a5a63[_0x2581b7]=_0x37a569,ie=(_0x440425,_0x258c12,_0xfca280,_0xa4019e)=>{for(var _0x2545c1=_0xa4019e>0x1?void 0x0:_0xa4019e?oe(_0x258c12,_0xfca280):_0x258c12,_0x5d147f=_0x440425['length']-0x1,_0x5753cd;_0x5d147f>=0x0;_0x5d147f--)(_0x5753cd=_0x440425[_0x5d147f])&&(_0x2545c1=_0x5753cd(_0x2545c1)||_0x2545c1);return _0x2545c1;},w=(_0x3b6533,_0x8ed453)=>(_0x4b67ec,_0x3f0ec1)=>_0x8ed453(_0x4b67ec,_0x3f0ec1,_0x3b6533),$=(_0x30636b,_0x5d5f85,_0x9e86d7)=>ne(_0x30636b,typeof _0x5d5f85!='symbol'?_0x5d5f85+'':_0x5d5f85,_0x9e86d7);let b=class extends _0x49816f{constructor(_0x2f1cb6=M,_0x245aa6,_0x36e94d){const _0x4c82bb=_0x5ea299;super(),this['_config']=_0x2f1cb6,this[_0x4c82bb(0x111)]=_0x245aa6,this[_0x4c82bb(0x145)]=_0x36e94d;const {..._0x29e1fa}=_0xa3f01a({},M,this[_0x4c82bb(0x125)]);this[_0x4c82bb(0x145)]['setConfig'](z,_0x29e1fa);}[_0x5ea299(0x141)](){const _0x83a653=_0x5ea299;[[f],[g],[S]][_0x83a653(0x15e)](_0x153a6a=>{const _0x48940d=_0x83a653;this['_injector'][_0x48940d(0x132)](_0x153a6a);});}['onReady'](){const _0x53f032=_0x5ea299;this['_injector'][_0x53f032(0x128)](g),this['_injector'][_0x53f032(0x128)](S);}};$(b,_0x5ea299(0x15f),W),$(b,_0x5ea299(0x11a),_0x593503['UNIVER_UNKNOWN']),b=ie([_0x2b24ef(_0x36a0a4,_0x18a047,_0x170b60),w(0x1,_0x3fdad7(_0x235f21)),w(0x2,_0x591b1e)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x2cc8a6=_0x1055;(function(_0x5b8c71,_0x2628e5){const _0x751248=_0x1055,_0x53f661=_0x5b8c71();while(!![]){try{const _0x38a1bf=-parseInt(_0x751248(0x1bf))/0x1+parseInt(_0x751248(0x1d6))/0x2*(-parseInt(_0x751248(0x1bb))/0x3)+parseInt(_0x751248(0x1bc))/0x4+-parseInt(_0x751248(0x1db))/0x5+parseInt(_0x751248(0x1a0))/0x6*(-parseInt(_0x751248(0x1d3))/0x7)+-parseInt(_0x751248(0x1b9))/0x8*(parseInt(_0x751248(0x1f0))/0x9)+parseInt(_0x751248(0x1b1))/0xa*(parseInt(_0x751248(0x1a1))/0xb);if(_0x38a1bf===_0x2628e5)break;else _0x53f661['push'](_0x53f661['shift']());}catch(_0x5e43ed){_0x53f661['push'](_0x53f661['shift']());}}}(_0x5b60,0x211cb));import{CommentService as _0x74c6c3,CollaborationSessionService as _0x48974a,UniverCollaborationClientPlugin as _0x5cf774}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x26eb12}from'@univerjs-pro/license';import{dayjs as _0x3e9fc4,UserManagerService as _0x196045,Inject as _0x508d76,Injector as _0x54331d,Disposable as _0x4cf6d8,CustomRangeType as _0x3f5e23,UniverInstanceType as _0x22d94a,DependentOn as _0x37d3da,IConfigService as _0x6fd7ab,Plugin as _0x173940,merge as _0x422e60}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4388c4}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x1b41e9,IThreadCommentDataSourceService as _0xa3bc21}from'@univerjs/thread-comment';import{bufferTime as _0x5a99f1}from'rxjs';import{HTTPService as _0x3d2d95}from'@univerjs/network';const W=_0x2cc8a6(0x1aa);var I=(_0x27d71c=>(_0x27d71c[_0x27d71c[_0x2cc8a6(0x1d5)]=0x0]=_0x2cc8a6(0x1d5),_0x27d71c[_0x27d71c[_0x2cc8a6(0x1eb)]=0x1]=_0x2cc8a6(0x1eb),_0x27d71c[_0x27d71c['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x27d71c))(I||{}),v=(_0x366c39=>(_0x366c39[_0x366c39[_0x2cc8a6(0x1e9)]=0x0]='Unknown',_0x366c39[_0x366c39[_0x2cc8a6(0x1c3)]=0x1]='Add',_0x366c39[_0x366c39[_0x2cc8a6(0x1ad)]=0x2]=_0x2cc8a6(0x1ad),_0x366c39[_0x366c39[_0x2cc8a6(0x1ef)]=0x3]='Edit',_0x366c39[_0x366c39['Delete']=0x4]='Delete',_0x366c39[_0x366c39[_0x2cc8a6(0x1b0)]=0x5]=_0x2cc8a6(0x1b0),_0x366c39[_0x366c39[_0x2cc8a6(0x1da)]=-0x1]='UNRECOGNIZED',_0x366c39))(v||{});const D=_0x31337d=>_0x3e9fc4(new Date(+_0x31337d))['format']('YYYY/MM/DD\x20HH:mm'),B=async(_0x4e0a83,_0x50f89f)=>{const _0xf43e6e=_0x2cc8a6,_0x133bb6=_0x4e0a83[_0xf43e6e(0x1e5)](_0x196045),_0x126725=_0x4e0a83[_0xf43e6e(0x1e5)](_0x3d2d95);_0x50f89f[_0xf43e6e(0x1e7)](_0x24483f=>{const _0x668824=_0xf43e6e;_0x133bb6[_0x668824(0x19e)](_0x24483f)&&_0x50f89f[_0x668824(0x1c1)](_0x24483f);}),_0x50f89f[_0xf43e6e(0x1ee)]&&(await _0x126725['get'](_0xf43e6e(0x1cf),{'params':{'userIDs':[..._0x50f89f]}}))[_0xf43e6e(0x1d4)]['users'][_0xf43e6e(0x1e7)](_0x5eaeb7=>{const _0x5a7dfe=_0xf43e6e;_0x5eaeb7&&_0x133bb6[_0x5a7dfe(0x1a2)](_0x5eaeb7);});};var K=Object[_0x2cc8a6(0x1fa)],V=(_0x341f89,_0x5e988f,_0x1d6e9e,_0x574205)=>{for(var _0x1ae094=_0x574205>0x1?void 0x0:_0x574205?K(_0x5e988f,_0x1d6e9e):_0x5e988f,_0x104601=_0x341f89['length']-0x1,_0x273303;_0x104601>=0x0;_0x104601--)(_0x273303=_0x341f89[_0x104601])&&(_0x1ae094=_0x273303(_0x1ae094)||_0x1ae094);return _0x1ae094;},p=(_0x31f48a,_0x167e6c)=>(_0x1f6941,_0x4caff9)=>_0x167e6c(_0x1f6941,_0x4caff9,_0x31f48a);function _0x5b60(){const _0x55a7e6=['error','threadId','/edit','/universer-api/user/list','createTimestamp','slice','users','43085BfYcxO','body','OpenOrReOpen','96166dxVwVG','deleteComment','COMMENT','find','UNRECOGNIZED','529310gCeyTH','map','_injector','/list','post','/universer-api/comment/unit/','_threadCommentDataSource','stringify','add','Delete','get','filter','forEach','/solved','Unknown','unitId','Solved','disposeWithMe','subscribe','size','Edit','783kQyDdT','getUnit','customRanges','rangeId','symbol','_initUserSync','rangeType','content','personId','comment','getOwnPropertyDescriptor','code','_sessionService','/add','listComments','_init','addComment','getUser','replies','144CWLwzP','642378JgbtwO','addUser','_httpService','userID','_config','replyId','solved','parentId','comments','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getComment','parse','Reply','_commentService','resolved','Solve','110OtIegn','type','saveCommentToSnapshot','pipe','_configService','updateComment','getMemberID','onStarting','23672BgeZbM','_threadCommentDataSourceService','3aCvdgq','777076CVlYQv','_userService','_threadCommentModel','141922aItzIx','user','delete','/delete','Add','length','_initDataSource','userId','values','root','commentUpdate$','requireSession','reply'];_0x5b60=function(){return _0x55a7e6;};return _0x5b60();}let S=class extends _0x4cf6d8{constructor(_0x91d85d,_0x59cc94,_0x322416,_0x5d7ec4){const _0x164134=_0x2cc8a6;super(),this[_0x164134(0x1ae)]=_0x91d85d,this['_threadCommentModel']=_0x59cc94,this['_userService']=_0x322416,this[_0x164134(0x1dd)]=_0x5d7ec4,this['_init'](),this[_0x164134(0x1f5)]();}[_0x2cc8a6(0x1f5)](){const _0x347c0f=_0x2cc8a6;this['disposeWithMe'](this[_0x347c0f(0x1be)][_0x347c0f(0x1c9)][_0x347c0f(0x1b4)](_0x5a99f1(0x10))['subscribe'](_0x3cf785=>{const _0x1da555=new Set();_0x3cf785['forEach'](_0xc69bb3=>{const _0x391e3d=_0x1055;switch(_0xc69bb3[_0x391e3d(0x1b2)]){case _0x391e3d(0x1e3):{const _0x5f3472=_0xc69bb3['payload'][_0x391e3d(0x1f8)];_0x1da555[_0x391e3d(0x1e3)](_0x5f3472);break;}}}),B(this['_injector'],_0x1da555);}));}[_0x2cc8a6(0x19c)](){const _0x529c7c=_0x2cc8a6;this[_0x529c7c(0x1ec)](this[_0x529c7c(0x1ae)]['commentUpdate$'][_0x529c7c(0x1ed)](async _0x1a1cc2=>{const _0x1282cb=_0x529c7c;var _0x3eb973,_0x34964c,_0x534ef4,_0x33fe5e;const _0x4eb6f1=(_0x3eb973=this[_0x1282cb(0x1be)][_0x1282cb(0x1f1)](_0x1a1cc2[_0x1282cb(0x1ea)])[_0x1282cb(0x1d9)](_0x55054f=>_0x55054f[_0x1282cb(0x1cd)]===_0x1a1cc2['threadId']))==null?void 0x0:_0x3eb973[_0x1282cb(0x1c8)];if(!_0x4eb6f1)return;const {unitId:_0x360a76,subUnitId:_0x4bded6}=_0x4eb6f1;switch(_0x1a1cc2['user']&&this[_0x1282cb(0x1bd)][_0x1282cb(0x1a2)](_0x1a1cc2[_0x1282cb(0x1c0)]),_0x1a1cc2[_0x1282cb(0x1b2)]){case v[_0x1282cb(0x1c3)]:break;case v[_0x1282cb(0x1ad)]:{this[_0x1282cb(0x1be)][_0x1282cb(0x19d)](_0x360a76,_0x4bded6,{'unitId':_0x360a76,'subUnitId':_0x4bded6,'ref':'','id':_0x1a1cc2[_0x1282cb(0x1a6)],'dT':D(+_0x1a1cc2['createTimestamp']),'threadId':_0x1a1cc2[_0x1282cb(0x1cd)],'personId':(_0x534ef4=(_0x34964c=_0x1a1cc2[_0x1282cb(0x1c0)])==null?void 0x0:_0x34964c['userID'])!=null?_0x534ef4:_0x1a1cc2[_0x1282cb(0x1c6)],'text':JSON[_0x1282cb(0x1ac)](_0x1a1cc2[_0x1282cb(0x1f7)]),'parentId':_0x4eb6f1['id']});break;}case v[_0x1282cb(0x1e4)]:{const _0x14a0a5=this[_0x1282cb(0x1be)][_0x1282cb(0x1ab)](_0x360a76,_0x4bded6,_0x1a1cc2[_0x1282cb(0x1a6)]);_0x14a0a5&&_0x14a0a5[_0x1282cb(0x1a8)]&&this[_0x1282cb(0x1be)][_0x1282cb(0x1d7)](_0x360a76,_0x4bded6,_0x1a1cc2['replyId']);break;}case v['Edit']:{this[_0x1282cb(0x1be)][_0x1282cb(0x1b6)](_0x360a76,_0x4bded6,{'commentId':_0x1a1cc2['replyId'],'text':JSON['parse'](_0x1a1cc2['content'])});break;}case v[_0x1282cb(0x1b0)]:{const _0xdb3e69=(_0x33fe5e=this['_threadCommentModel'][_0x1282cb(0x1f1)](_0x1a1cc2[_0x1282cb(0x1ea)])['find'](_0x4d00ef=>_0x4d00ef[_0x1282cb(0x1cd)]===_0x1a1cc2[_0x1282cb(0x1cd)]))==null?void 0x0:_0x33fe5e[_0x1282cb(0x1c8)];_0xdb3e69&&this[_0x1282cb(0x1be)]['resolveComment'](_0x360a76,_0x4bded6,_0xdb3e69['id'],_0x1a1cc2[_0x1282cb(0x1a7)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x508d76(_0x74c6c3)),p(0x1,_0x508d76(_0x1b41e9)),p(0x2,_0x508d76(_0x196045)),p(0x3,_0x508d76(_0x54331d))],S);const z='thread-comment-data-source.config',M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x47c3bd,_0x3693ef,_0x449b11,_0xc171e4)=>{const _0x4bf66a=_0x2cc8a6;for(var _0x2cf6bf=_0xc171e4>0x1?void 0x0:_0xc171e4?k(_0x3693ef,_0x449b11):_0x3693ef,_0x4e9866=_0x47c3bd[_0x4bf66a(0x1c4)]-0x1,_0x7833b6;_0x4e9866>=0x0;_0x4e9866--)(_0x7833b6=_0x47c3bd[_0x4e9866])&&(_0x2cf6bf=_0x7833b6(_0x2cf6bf)||_0x2cf6bf);return _0x2cf6bf;},_=(_0x381e6d,_0x1c8501)=>(_0x3520aa,_0x5b426d)=>_0x1c8501(_0x3520aa,_0x5b426d,_0x381e6d);function X(_0x40bc8c,_0xb32cf1){const _0x451a23=_0x2cc8a6,_0x487652=_0x40bc8c[_0x451a23(0x19f)][0x0];return{..._0xb32cf1,'id':_0x487652[_0x451a23(0x1a6)],'resolved':_0x40bc8c['solved']===0x1,'dT':D(_0x487652['createTimestamp']),'personId':_0x487652[_0x451a23(0x1c6)],'threadId':_0x487652[_0x451a23(0x1cd)]};}function ee(_0x2d7b2e,_0x114984,_0x4e2d25){const _0x386e95=_0x2cc8a6;var _0x48bd19,_0x2ccb25;if(((_0x2ccb25=(_0x48bd19=_0x2d7b2e==null?void 0x0:_0x2d7b2e['replies'])==null?void 0x0:_0x48bd19[_0x386e95(0x1c4)])!=null?_0x2ccb25:0x0)>0x0){const _0x4aa96f=(_0x4bba49,_0x4f7bcc)=>({'id':_0x4bba49[_0x386e95(0x1a6)],'threadId':_0x4bba49[_0x386e95(0x1cd)],'dT':D(_0x4bba49[_0x386e95(0x1d0)]),'personId':_0x4bba49[_0x386e95(0x1c6)],'resolved':_0x2d7b2e['solved']===I[_0x386e95(0x1eb)],'unitId':_0x114984,'subUnitId':_0x4e2d25,'text':JSON[_0x386e95(0x1ac)](_0x4bba49[_0x386e95(0x1f7)]),'parentId':_0x4f7bcc}),_0x3d9af9=_0x4aa96f(_0x2d7b2e['replies'][0x0]);return{..._0x3d9af9,'children':_0x2d7b2e[_0x386e95(0x19f)][_0x386e95(0x1d1)](0x1)['map'](_0x3f40c7=>_0x4aa96f(_0x3f40c7,_0x3d9af9['id']))};}return null;}let f=class{constructor(_0x3283c2,_0x2aaf8d,_0xd160ac,_0x2330c4){const _0x120c9e=_0x2cc8a6;this[_0x120c9e(0x1a3)]=_0x3283c2,this['_userService']=_0x2aaf8d,this['_sessionService']=_0xd160ac,this[_0x120c9e(0x1dd)]=_0x2330c4;}async[_0x2cc8a6(0x19d)](_0x26e7a9){const _0x5a7ea5=_0x2cc8a6;var _0x546a69,_0x15f3aa;const {parentId:_0x454460,unitId:_0x3a945d,text:_0x419298,threadId:_0x4827c1}=_0x26e7a9,_0x31158c=(_0x15f3aa=(_0x546a69=_0x419298['customRanges'])==null?void 0x0:_0x546a69['filter'](_0x3a5040=>_0x3a5040[_0x5a7ea5(0x1f6)]===_0x3f5e23[_0x5a7ea5(0x1d8)])[_0x5a7ea5(0x1dc)](_0x32c1af=>_0x32c1af[_0x5a7ea5(0x1f3)]))!=null?_0x15f3aa:[],_0x18efbc=JSON[_0x5a7ea5(0x1e2)](_0x419298),_0x33ac2b=(await this[_0x5a7ea5(0x1fc)][_0x5a7ea5(0x1ca)](_0x3a945d))[_0x5a7ea5(0x1b7)]();if(_0x454460){const _0x52f831={'memberId':_0x33ac2b,'unitId':_0x3a945d,'content':_0x18efbc,'mention':_0x31158c,'threadId':_0x4827c1},_0x559380=(await this[_0x5a7ea5(0x1a3)][_0x5a7ea5(0x1df)]('/universer-api/comment/unit/'+_0x3a945d+'/reply',{'body':_0x52f831}))[_0x5a7ea5(0x1d4)][_0x5a7ea5(0x1cb)];return{..._0x26e7a9,'id':_0x559380[_0x5a7ea5(0x1a6)],'dT':_0x3e9fc4(+_0x559380[_0x5a7ea5(0x1d0)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x559380[_0x5a7ea5(0x1c6)]};}else{const _0x34da07={'memberId':_0x33ac2b,'unitId':_0x3a945d,'content':_0x18efbc,'mention':_0x31158c},_0x35aa30=await this[_0x5a7ea5(0x1a3)][_0x5a7ea5(0x1df)]('/universer-api/comment/unit/'+_0x3a945d+_0x5a7ea5(0x1fd),{'body':_0x34da07});return X(_0x35aa30[_0x5a7ea5(0x1d4)][_0x5a7ea5(0x1f9)],_0x26e7a9);}}async['updateComment'](_0x416c67){const _0x5d810b=_0x2cc8a6;var _0x5e5eb8,_0x1202f1;const {text:_0x43bb2f,unitId:_0x4976c8}=_0x416c67,_0x5c686c=(_0x1202f1=(_0x5e5eb8=_0x43bb2f[_0x5d810b(0x1f2)])==null?void 0x0:_0x5e5eb8[_0x5d810b(0x1e6)](_0x56340f=>_0x56340f[_0x5d810b(0x1f6)]===_0x3f5e23['COMMENT'])[_0x5d810b(0x1dc)](_0x4ff117=>_0x4ff117[_0x5d810b(0x1f3)]))!=null?_0x1202f1:[],_0x634c5d=JSON[_0x5d810b(0x1e2)](_0x43bb2f),_0x3db1cb=_0x416c67['threadId'],_0x5994e1=_0x416c67['id'],_0x274f6a={'memberId':(await this[_0x5d810b(0x1fc)][_0x5d810b(0x1ca)](_0x4976c8))['getMemberID'](),'unitId':_0x4976c8,'threadId':_0x3db1cb,'mention':_0x5c686c,'content':_0x634c5d,'replyId':_0x5994e1},_0x16110a=await this[_0x5d810b(0x1a3)][_0x5d810b(0x1df)]('/universer-api/comment/unit/'+_0x4976c8+_0x5d810b(0x1ce),{'body':_0x274f6a});return!_0x16110a[_0x5d810b(0x1d4)][_0x5d810b(0x1cc)]||_0x16110a['body'][_0x5d810b(0x1cc)]['code']===0x1;}async['resolveComment'](_0x569f01){const _0x2c6c05=_0x2cc8a6,{unitId:_0x13004c}=_0x569f01,_0x2e855d=_0x569f01[_0x2c6c05(0x1cd)],_0x199af3={'memberId':this[_0x2c6c05(0x1bd)]['getCurrentUser']()[_0x2c6c05(0x1a4)],'unitId':_0x13004c,'threadId':_0x2e855d,'solved':_0x569f01[_0x2c6c05(0x1af)]?I[_0x2c6c05(0x1eb)]:I['OpenOrReOpen']},_0x27cebc=await this[_0x2c6c05(0x1a3)][_0x2c6c05(0x1df)](_0x2c6c05(0x1e0)+_0x13004c+_0x2c6c05(0x1e8),{'body':_0x199af3});return!_0x27cebc[_0x2c6c05(0x1d4)][_0x2c6c05(0x1cc)]||_0x27cebc[_0x2c6c05(0x1d4)]['error'][_0x2c6c05(0x1fb)]===0x1;}async['deleteComment'](_0x172133,_0x276567,_0x5945f5,_0x384546){const _0x271eee=_0x2cc8a6,_0x1a29f2={'memberId':(await this[_0x271eee(0x1fc)][_0x271eee(0x1ca)](_0x172133))[_0x271eee(0x1b7)](),'threadId':_0x5945f5,'replyId':_0x384546,'unitId':_0x172133},_0x4e0af9=await this[_0x271eee(0x1a3)][_0x271eee(0x1df)]('/universer-api/comment/unit/'+_0x172133+_0x271eee(0x1c2),{'body':_0x1a29f2});return!_0x4e0af9['body'][_0x271eee(0x1cc)]||_0x4e0af9[_0x271eee(0x1d4)][_0x271eee(0x1cc)][_0x271eee(0x1fb)]===0x1;}async[_0x2cc8a6(0x19b)](_0x55e253,_0x56397a,_0x5a4b68){const _0x397508=_0x2cc8a6,_0x21666f={'unitId':_0x55e253,'threadId':_0x5a4b68},_0x57ab13=await this[_0x397508(0x1a3)]['post'](_0x397508(0x1e0)+_0x55e253+_0x397508(0x1de),{'body':_0x21666f}),_0xdf5013=_0x5a4b68['map'](_0x294766=>ee(_0x57ab13[_0x397508(0x1d4)][_0x397508(0x1a9)][_0x294766],_0x55e253,_0x56397a))[_0x397508(0x1e6)](Boolean);return Object[_0x397508(0x1c7)](_0x57ab13[_0x397508(0x1d4)][_0x397508(0x1d2)])[_0x397508(0x1e7)](_0x3b3a7d=>{const _0x5ae66f=_0x397508;this[_0x5ae66f(0x1bd)][_0x5ae66f(0x1a2)](_0x3b3a7d);}),_0xdf5013;}[_0x2cc8a6(0x1b3)](_0xfc9ce7){const _0x1e0306=_0x2cc8a6;return{'id':_0xfc9ce7['id'],'threadId':_0xfc9ce7[_0x1e0306(0x1cd)],'ref':_0xfc9ce7['ref']};}};f=Q([_(0x0,_0x508d76(_0x3d2d95)),_(0x1,_0x508d76(_0x196045)),_(0x2,_0x508d76(_0x48974a)),_(0x3,_0x508d76(_0x54331d))],f);var re=Object[_0x2cc8a6(0x1fa)],te=(_0x477f8e,_0x41e07b,_0x21938f,_0x487709)=>{const _0x57feed=_0x2cc8a6;for(var _0x496bda=_0x487709>0x1?void 0x0:_0x487709?re(_0x41e07b,_0x21938f):_0x41e07b,_0x53da12=_0x477f8e[_0x57feed(0x1c4)]-0x1,_0x164b4e;_0x53da12>=0x0;_0x53da12--)(_0x164b4e=_0x477f8e[_0x53da12])&&(_0x496bda=_0x164b4e(_0x496bda)||_0x496bda);return _0x496bda;},N=(_0x2d904a,_0xcbabe2)=>(_0x3282e8,_0x46583e)=>_0xcbabe2(_0x3282e8,_0x46583e,_0x2d904a);let g=class extends _0x4cf6d8{constructor(_0x15ca97,_0x48a214){const _0x2d6572=_0x2cc8a6;super(),this['_threadCommentDataSourceService']=_0x15ca97,this[_0x2d6572(0x1e1)]=_0x48a214,this[_0x2d6572(0x1c5)]();}[_0x2cc8a6(0x1c5)](){const _0xd6efc1=_0x2cc8a6;this[_0xd6efc1(0x1ba)]['dataSource']=this['_threadCommentDataSource'],this[_0xd6efc1(0x1ba)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0xa3bc21),N(0x1,_0x508d76(f))],g);var se=Object['defineProperty'],oe=Object[_0x2cc8a6(0x1fa)],ne=(_0x56a402,_0x2e3a15,_0x4fa52d)=>_0x2e3a15 in _0x56a402?se(_0x56a402,_0x2e3a15,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4fa52d}):_0x56a402[_0x2e3a15]=_0x4fa52d,ie=(_0x212195,_0x338356,_0x23dee3,_0x38b712)=>{for(var _0x49df31=_0x38b712>0x1?void 0x0:_0x38b712?oe(_0x338356,_0x23dee3):_0x338356,_0x5a6128=_0x212195['length']-0x1,_0x3211bb;_0x5a6128>=0x0;_0x5a6128--)(_0x3211bb=_0x212195[_0x5a6128])&&(_0x49df31=_0x3211bb(_0x49df31)||_0x49df31);return _0x49df31;},w=(_0x1cf2e9,_0x7e46e3)=>(_0x205031,_0x477d12)=>_0x7e46e3(_0x205031,_0x477d12,_0x1cf2e9),$=(_0xa16efd,_0x4c7be5,_0x6d4b36)=>ne(_0xa16efd,typeof _0x4c7be5!=_0x2cc8a6(0x1f4)?_0x4c7be5+'':_0x4c7be5,_0x6d4b36);let b=class extends _0x173940{constructor(_0x311ece=M,_0xa5aef7,_0x260226){const _0x2a2c74=_0x2cc8a6;super(),this[_0x2a2c74(0x1a5)]=_0x311ece,this['_injector']=_0xa5aef7,this[_0x2a2c74(0x1b5)]=_0x260226;const {..._0x33eb49}=_0x422e60({},M,this[_0x2a2c74(0x1a5)]);this[_0x2a2c74(0x1b5)]['setConfig'](z,_0x33eb49);}[_0x2cc8a6(0x1b8)](){const _0x3d45f4=_0x2cc8a6;[[f],[g],[S]][_0x3d45f4(0x1e7)](_0x220941=>{const _0x183db6=_0x3d45f4;this[_0x183db6(0x1dd)][_0x183db6(0x1e3)](_0x220941);});}['onReady'](){const _0x47dae5=_0x2cc8a6;this[_0x47dae5(0x1dd)][_0x47dae5(0x1e5)](g),this[_0x47dae5(0x1dd)][_0x47dae5(0x1e5)](S);}};$(b,'pluginName',W),$(b,'type',_0x22d94a['UNIVER_UNKNOWN']),b=ie([_0x37d3da(_0x4388c4,_0x5cf774,_0x26eb12),w(0x1,_0x508d76(_0x54331d)),w(0x2,_0x6fd7ab)],b);function _0x1055(_0x46ac91,_0x399605){const _0x5b605e=_0x5b60();return _0x1055=function(_0x1055aa,_0x2dbf99){_0x1055aa=_0x1055aa-0x19b;let _0x3145ce=_0x5b605e[_0x1055aa];return _0x3145ce;},_0x1055(_0x46ac91,_0x399605);}export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x5ea299=_0x2775;(function(_0x221f88,_0x118314){const _0x45faec=_0x2775,_0x40b7d5=_0x221f88();while(!![]){try{const _0xb18404=parseInt(_0x45faec(0x13e))/0x1+parseInt(_0x45faec(0x146))/0x2+-parseInt(_0x45faec(0x112))/0x3*(-parseInt(_0x45faec(0x11b))/0x4)+parseInt(_0x45faec(0x16e))/0x5+-parseInt(_0x45faec(0x150))/0x6*(parseInt(_0x45faec(0x14e))/0x7)+-parseInt(_0x45faec(0x15c))/0x8+-parseInt(_0x45faec(0x168))/0x9*(-parseInt(_0x45faec(0x11f))/0xa);if(_0xb18404===_0x118314)break;else _0x40b7d5['push'](_0x40b7d5['shift']());}catch(_0x5363e9){_0x40b7d5['push'](_0x40b7d5['shift']());}}}(_0x3587,0x40456));import{CommentService as _0xe371d,CollaborationSessionService as _0x27a803,UniverCollaborationClientPlugin as _0x18a047}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x170b60}from'@univerjs-pro/license';import{dayjs as _0x2b85d2,UserManagerService as _0xbb1ba0,Inject as _0x3fdad7,Injector as _0x235f21,Disposable as _0x52035e,CustomRangeType as _0x49fbf1,UniverInstanceType as _0x593503,DependentOn as _0x2b24ef,IConfigService as _0x591b1e,Plugin as _0x49816f,merge as _0xa3f01a}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x36a0a4}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x4b77e1,IThreadCommentDataSourceService as _0x48d157}from'@univerjs/thread-comment';import{bufferTime as _0x291499}from'rxjs';import{HTTPService as _0x428c70}from'@univerjs/network';const W=_0x5ea299(0x137);var I=(_0x3aec58=>(_0x3aec58[_0x3aec58[_0x5ea299(0x119)]=0x0]=_0x5ea299(0x119),_0x3aec58[_0x3aec58['Solved']=0x1]='Solved',_0x3aec58[_0x3aec58[_0x5ea299(0x129)]=-0x1]='UNRECOGNIZED',_0x3aec58))(I||{}),v=(_0x270e0e=>(_0x270e0e[_0x270e0e[_0x5ea299(0x164)]=0x0]=_0x5ea299(0x164),_0x270e0e[_0x270e0e[_0x5ea299(0x122)]=0x1]='Add',_0x270e0e[_0x270e0e[_0x5ea299(0x120)]=0x2]=_0x5ea299(0x120),_0x270e0e[_0x270e0e[_0x5ea299(0x16c)]=0x3]=_0x5ea299(0x16c),_0x270e0e[_0x270e0e['Delete']=0x4]='Delete',_0x270e0e[_0x270e0e[_0x5ea299(0x12a)]=0x5]=_0x5ea299(0x12a),_0x270e0e[_0x270e0e[_0x5ea299(0x129)]=-0x1]=_0x5ea299(0x129),_0x270e0e))(v||{});function _0x3587(){const _0x8dceef=['_threadCommentDataSourceService','requireSession','7TGXraV','getUnit','341862ugeQUh','subscribe','stringify','filter','error','_initUserSync','_threadCommentDataSource','getUser','thread-comment-data-source.config','size','code','content','1657240uvkcds','/solved','forEach','pluginName','/reply','_init','_userService','addUser','Unknown','saveCommentToSnapshot','delete','pipe','18AxOWTM','ref','/delete','disposeWithMe','Edit','reply','1745995DjvBJS','parse','personId','rangeType','body','find','addComment','getCurrentUser','root','userID','YYYY/MM/DD\x20HH:mm','_injector','31257HWNQXM','deleteComment','replyId','dataSource','defineProperty','createTimestamp','/add','OpenOrReOpen','type','4OLSfNo','updateComment','/universer-api/comment/unit/','userId','209470nKRnuI','Reply','listComments','Add','format','getOwnPropertyDescriptor','_config','unitId','COMMENT','get','UNRECOGNIZED','Solve','Solved','_initDataSource','solved','payload','_threadCommentModel','getMemberID','comment','add','commentUpdate$','rangeId','replies','/universer-api/user/list','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','customRanges','slice','length','getComment','/list','/edit','96401zneNMh','map','values','onStarting','resolved','_commentService','_httpService','_configService','58946ccdsGz','_sessionService','user','resolveComment','threadId','post'];_0x3587=function(){return _0x8dceef;};return _0x3587();}const D=_0x4b3481=>_0x2b85d2(new Date(+_0x4b3481))[_0x5ea299(0x123)](_0x5ea299(0x110)),B=async(_0x4d93be,_0x24d195)=>{const _0x1828ef=_0x5ea299,_0xe71a94=_0x4d93be[_0x1828ef(0x128)](_0xbb1ba0),_0x51cc08=_0x4d93be[_0x1828ef(0x128)](_0x428c70);_0x24d195[_0x1828ef(0x15e)](_0x10b60b=>{const _0x37414b=_0x1828ef;_0xe71a94[_0x37414b(0x157)](_0x10b60b)&&_0x24d195[_0x37414b(0x166)](_0x10b60b);}),_0x24d195[_0x1828ef(0x159)]&&(await _0x51cc08[_0x1828ef(0x128)](_0x1828ef(0x136),{'params':{'userIDs':[..._0x24d195]}}))['body']['users'][_0x1828ef(0x15e)](_0x5a7899=>{const _0x257fbd=_0x1828ef;_0x5a7899&&_0xe71a94[_0x257fbd(0x163)](_0x5a7899);});};var K=Object['getOwnPropertyDescriptor'],V=(_0x36aa7e,_0x52cffa,_0x3dd4da,_0x1c23b5)=>{const _0x29fb7f=_0x5ea299;for(var _0xfdb222=_0x1c23b5>0x1?void 0x0:_0x1c23b5?K(_0x52cffa,_0x3dd4da):_0x52cffa,_0x3a13be=_0x36aa7e[_0x29fb7f(0x13a)]-0x1,_0x1080c6;_0x3a13be>=0x0;_0x3a13be--)(_0x1080c6=_0x36aa7e[_0x3a13be])&&(_0xfdb222=_0x1080c6(_0xfdb222)||_0xfdb222);return _0xfdb222;},p=(_0x3da172,_0x2c1238)=>(_0x5d464b,_0x5dc498)=>_0x2c1238(_0x5d464b,_0x5dc498,_0x3da172);let S=class extends _0x52035e{constructor(_0x49f4ff,_0x508397,_0x118cf1,_0x4fb849){const _0x1f7a1e=_0x5ea299;super(),this[_0x1f7a1e(0x143)]=_0x49f4ff,this[_0x1f7a1e(0x12f)]=_0x508397,this[_0x1f7a1e(0x162)]=_0x118cf1,this[_0x1f7a1e(0x111)]=_0x4fb849,this[_0x1f7a1e(0x161)](),this[_0x1f7a1e(0x155)]();}[_0x5ea299(0x155)](){const _0x32eefc=_0x5ea299;this[_0x32eefc(0x16b)](this[_0x32eefc(0x12f)][_0x32eefc(0x133)][_0x32eefc(0x167)](_0x291499(0x10))[_0x32eefc(0x151)](_0x7c62b9=>{const _0x55aba7=_0x32eefc,_0x17c5b7=new Set();_0x7c62b9[_0x55aba7(0x15e)](_0x2c147d=>{const _0x121be4=_0x55aba7;switch(_0x2c147d[_0x121be4(0x11a)]){case _0x121be4(0x132):{const _0x5593d1=_0x2c147d[_0x121be4(0x12e)][_0x121be4(0x170)];_0x17c5b7[_0x121be4(0x132)](_0x5593d1);break;}}}),B(this[_0x55aba7(0x111)],_0x17c5b7);}));}['_init'](){const _0x7a5cd8=_0x5ea299;this[_0x7a5cd8(0x16b)](this[_0x7a5cd8(0x143)]['commentUpdate$'][_0x7a5cd8(0x151)](async _0x25c866=>{const _0x3bc76b=_0x7a5cd8;var _0x47a79b,_0x131bb0,_0x88e959,_0x44a1b7;const _0x553b12=(_0x47a79b=this[_0x3bc76b(0x12f)][_0x3bc76b(0x14f)](_0x25c866['unitId'])['find'](_0x3a0289=>_0x3a0289[_0x3bc76b(0x14a)]===_0x25c866['threadId']))==null?void 0x0:_0x47a79b[_0x3bc76b(0x10e)];if(!_0x553b12)return;const {unitId:_0xc8fb53,subUnitId:_0x75e6c1}=_0x553b12;switch(_0x25c866[_0x3bc76b(0x148)]&&this[_0x3bc76b(0x162)][_0x3bc76b(0x163)](_0x25c866[_0x3bc76b(0x148)]),_0x25c866[_0x3bc76b(0x11a)]){case v['Add']:break;case v[_0x3bc76b(0x120)]:{this['_threadCommentModel'][_0x3bc76b(0x174)](_0xc8fb53,_0x75e6c1,{'unitId':_0xc8fb53,'subUnitId':_0x75e6c1,'ref':'','id':_0x25c866['replyId'],'dT':D(+_0x25c866['createTimestamp']),'threadId':_0x25c866[_0x3bc76b(0x14a)],'personId':(_0x88e959=(_0x131bb0=_0x25c866[_0x3bc76b(0x148)])==null?void 0x0:_0x131bb0[_0x3bc76b(0x10f)])!=null?_0x88e959:_0x25c866[_0x3bc76b(0x11e)],'text':JSON[_0x3bc76b(0x16f)](_0x25c866[_0x3bc76b(0x15b)]),'parentId':_0x553b12['id']});break;}case v['Delete']:{const _0x53081a=this['_threadCommentModel'][_0x3bc76b(0x13b)](_0xc8fb53,_0x75e6c1,_0x25c866[_0x3bc76b(0x114)]);_0x53081a&&_0x53081a['parentId']&&this['_threadCommentModel'][_0x3bc76b(0x113)](_0xc8fb53,_0x75e6c1,_0x25c866[_0x3bc76b(0x114)]);break;}case v['Edit']:{this[_0x3bc76b(0x12f)]['updateComment'](_0xc8fb53,_0x75e6c1,{'commentId':_0x25c866[_0x3bc76b(0x114)],'text':JSON[_0x3bc76b(0x16f)](_0x25c866[_0x3bc76b(0x15b)])});break;}case v[_0x3bc76b(0x12a)]:{const _0x3241d4=(_0x44a1b7=this['_threadCommentModel'][_0x3bc76b(0x14f)](_0x25c866[_0x3bc76b(0x126)])[_0x3bc76b(0x173)](_0x41d161=>_0x41d161['threadId']===_0x25c866[_0x3bc76b(0x14a)]))==null?void 0x0:_0x44a1b7['root'];_0x3241d4&&this[_0x3bc76b(0x12f)][_0x3bc76b(0x149)](_0xc8fb53,_0x75e6c1,_0x3241d4['id'],_0x25c866['solved']===I[_0x3bc76b(0x12b)]);break;}}}));}};function _0x2775(_0x2f7246,_0x2e4ae8){const _0x35877b=_0x3587();return _0x2775=function(_0x277507,_0x1a0bde){_0x277507=_0x277507-0x10e;let _0x343e4a=_0x35877b[_0x277507];return _0x343e4a;},_0x2775(_0x2f7246,_0x2e4ae8);}S=V([p(0x0,_0x3fdad7(_0xe371d)),p(0x1,_0x3fdad7(_0x4b77e1)),p(0x2,_0x3fdad7(_0xbb1ba0)),p(0x3,_0x3fdad7(_0x235f21))],S);const z=_0x5ea299(0x158),M={};var k=Object[_0x5ea299(0x124)],Q=(_0x413f57,_0x271b5b,_0xdbecf6,_0x5bc830)=>{const _0x7056cc=_0x5ea299;for(var _0x5a3881=_0x5bc830>0x1?void 0x0:_0x5bc830?k(_0x271b5b,_0xdbecf6):_0x271b5b,_0x30eb18=_0x413f57[_0x7056cc(0x13a)]-0x1,_0x4b5022;_0x30eb18>=0x0;_0x30eb18--)(_0x4b5022=_0x413f57[_0x30eb18])&&(_0x5a3881=_0x4b5022(_0x5a3881)||_0x5a3881);return _0x5a3881;},_=(_0x179929,_0x3d86fd)=>(_0x13bf3f,_0x316943)=>_0x3d86fd(_0x13bf3f,_0x316943,_0x179929);function X(_0x27a531,_0x120137){const _0x2ea8df=_0x5ea299,_0x209979=_0x27a531['replies'][0x0];return{..._0x120137,'id':_0x209979[_0x2ea8df(0x114)],'resolved':_0x27a531[_0x2ea8df(0x12d)]===0x1,'dT':D(_0x209979[_0x2ea8df(0x117)]),'personId':_0x209979[_0x2ea8df(0x11e)],'threadId':_0x209979['threadId']};}function ee(_0x31e04f,_0xbcb621,_0x302a95){const _0xab605c=_0x5ea299;var _0x41f88e,_0x193c9e;if(((_0x193c9e=(_0x41f88e=_0x31e04f==null?void 0x0:_0x31e04f[_0xab605c(0x135)])==null?void 0x0:_0x41f88e[_0xab605c(0x13a)])!=null?_0x193c9e:0x0)>0x0){const _0x8f7c49=(_0x1cc58a,_0x2f7cb5)=>({'id':_0x1cc58a['replyId'],'threadId':_0x1cc58a[_0xab605c(0x14a)],'dT':D(_0x1cc58a[_0xab605c(0x117)]),'personId':_0x1cc58a[_0xab605c(0x11e)],'resolved':_0x31e04f['solved']===I['Solved'],'unitId':_0xbcb621,'subUnitId':_0x302a95,'text':JSON['parse'](_0x1cc58a['content']),'parentId':_0x2f7cb5}),_0x2dcac0=_0x8f7c49(_0x31e04f['replies'][0x0]);return{..._0x2dcac0,'children':_0x31e04f[_0xab605c(0x135)][_0xab605c(0x139)](0x1)[_0xab605c(0x13f)](_0x42a154=>_0x8f7c49(_0x42a154,_0x2dcac0['id']))};}return null;}let f=class{constructor(_0x308bf4,_0x59b614,_0x2145b4,_0x3070fc){const _0x5e8f90=_0x5ea299;this['_httpService']=_0x308bf4,this[_0x5e8f90(0x162)]=_0x59b614,this[_0x5e8f90(0x147)]=_0x2145b4,this[_0x5e8f90(0x111)]=_0x3070fc;}async['addComment'](_0x57cb68){const _0x279382=_0x5ea299;var _0x3542be,_0x57b7a3;const {parentId:_0x3707e9,unitId:_0x1995bf,text:_0x543c0c,threadId:_0x217d0e}=_0x57cb68,_0x25c6bf=(_0x57b7a3=(_0x3542be=_0x543c0c['customRanges'])==null?void 0x0:_0x3542be[_0x279382(0x153)](_0x312df=>_0x312df[_0x279382(0x171)]===_0x49fbf1[_0x279382(0x127)])['map'](_0x255e91=>_0x255e91[_0x279382(0x134)]))!=null?_0x57b7a3:[],_0x2afdaf=JSON[_0x279382(0x152)](_0x543c0c),_0xdcc61b=(await this[_0x279382(0x147)][_0x279382(0x14d)](_0x1995bf))[_0x279382(0x130)]();if(_0x3707e9){const _0xac05be={'memberId':_0xdcc61b,'unitId':_0x1995bf,'content':_0x2afdaf,'mention':_0x25c6bf,'threadId':_0x217d0e},_0x3efd72=(await this[_0x279382(0x144)][_0x279382(0x14b)](_0x279382(0x11d)+_0x1995bf+_0x279382(0x160),{'body':_0xac05be}))[_0x279382(0x172)][_0x279382(0x16d)];return{..._0x57cb68,'id':_0x3efd72[_0x279382(0x114)],'dT':_0x2b85d2(+_0x3efd72['createTimestamp'])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x3efd72[_0x279382(0x11e)]};}else{const _0x3bb490={'memberId':_0xdcc61b,'unitId':_0x1995bf,'content':_0x2afdaf,'mention':_0x25c6bf},_0x183afb=await this[_0x279382(0x144)][_0x279382(0x14b)](_0x279382(0x11d)+_0x1995bf+_0x279382(0x118),{'body':_0x3bb490});return X(_0x183afb[_0x279382(0x172)][_0x279382(0x131)],_0x57cb68);}}async[_0x5ea299(0x11c)](_0x36f7cc){const _0x5751bf=_0x5ea299;var _0x37879e,_0x37a5e1;const {text:_0x13fe46,unitId:_0x27ea15}=_0x36f7cc,_0x32d625=(_0x37a5e1=(_0x37879e=_0x13fe46[_0x5751bf(0x138)])==null?void 0x0:_0x37879e[_0x5751bf(0x153)](_0x2796cc=>_0x2796cc[_0x5751bf(0x171)]===_0x49fbf1['COMMENT'])[_0x5751bf(0x13f)](_0x8ac410=>_0x8ac410[_0x5751bf(0x134)]))!=null?_0x37a5e1:[],_0x54e8ca=JSON[_0x5751bf(0x152)](_0x13fe46),_0x2b28bc=_0x36f7cc[_0x5751bf(0x14a)],_0x40bb3b=_0x36f7cc['id'],_0x5ea4df={'memberId':(await this[_0x5751bf(0x147)]['requireSession'](_0x27ea15))['getMemberID'](),'unitId':_0x27ea15,'threadId':_0x2b28bc,'mention':_0x32d625,'content':_0x54e8ca,'replyId':_0x40bb3b},_0x4da681=await this['_httpService'][_0x5751bf(0x14b)]('/universer-api/comment/unit/'+_0x27ea15+_0x5751bf(0x13d),{'body':_0x5ea4df});return!_0x4da681['body'][_0x5751bf(0x154)]||_0x4da681[_0x5751bf(0x172)][_0x5751bf(0x154)][_0x5751bf(0x15a)]===0x1;}async[_0x5ea299(0x149)](_0x2bc3c6){const _0xd0bd31=_0x5ea299,{unitId:_0x2e57a8}=_0x2bc3c6,_0x15232c=_0x2bc3c6[_0xd0bd31(0x14a)],_0x184d1c={'memberId':this[_0xd0bd31(0x162)][_0xd0bd31(0x175)]()[_0xd0bd31(0x10f)],'unitId':_0x2e57a8,'threadId':_0x15232c,'solved':_0x2bc3c6[_0xd0bd31(0x142)]?I[_0xd0bd31(0x12b)]:I[_0xd0bd31(0x119)]},_0x55b8c7=await this[_0xd0bd31(0x144)][_0xd0bd31(0x14b)](_0xd0bd31(0x11d)+_0x2e57a8+_0xd0bd31(0x15d),{'body':_0x184d1c});return!_0x55b8c7[_0xd0bd31(0x172)][_0xd0bd31(0x154)]||_0x55b8c7['body'][_0xd0bd31(0x154)][_0xd0bd31(0x15a)]===0x1;}async[_0x5ea299(0x113)](_0x56e62a,_0x497b54,_0x2ed065,_0x57af67){const _0x2f8242=_0x5ea299,_0x158ce3={'memberId':(await this[_0x2f8242(0x147)][_0x2f8242(0x14d)](_0x56e62a))[_0x2f8242(0x130)](),'threadId':_0x2ed065,'replyId':_0x57af67,'unitId':_0x56e62a},_0x1c4e4c=await this['_httpService']['post'](_0x2f8242(0x11d)+_0x56e62a+_0x2f8242(0x16a),{'body':_0x158ce3});return!_0x1c4e4c[_0x2f8242(0x172)]['error']||_0x1c4e4c['body']['error']['code']===0x1;}async[_0x5ea299(0x121)](_0x4ccc5f,_0x8566d8,_0x19aa9a){const _0x4aef7e=_0x5ea299,_0x20b817={'unitId':_0x4ccc5f,'threadId':_0x19aa9a},_0x5400c6=await this['_httpService'][_0x4aef7e(0x14b)]('/universer-api/comment/unit/'+_0x4ccc5f+_0x4aef7e(0x13c),{'body':_0x20b817}),_0xdd5b8d=_0x19aa9a['map'](_0x28cb32=>ee(_0x5400c6['body']['comments'][_0x28cb32],_0x4ccc5f,_0x8566d8))[_0x4aef7e(0x153)](Boolean);return Object[_0x4aef7e(0x140)](_0x5400c6['body']['users'])[_0x4aef7e(0x15e)](_0x382785=>{const _0x28d683=_0x4aef7e;this[_0x28d683(0x162)]['addUser'](_0x382785);}),_0xdd5b8d;}[_0x5ea299(0x165)](_0x4ddf4d){const _0x24abfe=_0x5ea299;return{'id':_0x4ddf4d['id'],'threadId':_0x4ddf4d['threadId'],'ref':_0x4ddf4d[_0x24abfe(0x169)]};}};f=Q([_(0x0,_0x3fdad7(_0x428c70)),_(0x1,_0x3fdad7(_0xbb1ba0)),_(0x2,_0x3fdad7(_0x27a803)),_(0x3,_0x3fdad7(_0x235f21))],f);var re=Object[_0x5ea299(0x124)],te=(_0x2d58f2,_0x47765b,_0x1529e7,_0x90c0c9)=>{const _0x4d433f=_0x5ea299;for(var _0x4f6140=_0x90c0c9>0x1?void 0x0:_0x90c0c9?re(_0x47765b,_0x1529e7):_0x47765b,_0x261b4e=_0x2d58f2[_0x4d433f(0x13a)]-0x1,_0x49c117;_0x261b4e>=0x0;_0x261b4e--)(_0x49c117=_0x2d58f2[_0x261b4e])&&(_0x4f6140=_0x49c117(_0x4f6140)||_0x4f6140);return _0x4f6140;},N=(_0xa353db,_0x513b8e)=>(_0x58f045,_0x223655)=>_0x513b8e(_0x58f045,_0x223655,_0xa353db);let g=class extends _0x52035e{constructor(_0x7c2ed,_0x48e539){const _0x3fe157=_0x5ea299;super(),this['_threadCommentDataSourceService']=_0x7c2ed,this[_0x3fe157(0x156)]=_0x48e539,this[_0x3fe157(0x12c)]();}[_0x5ea299(0x12c)](){const _0x5aa42b=_0x5ea299;this[_0x5aa42b(0x14c)][_0x5aa42b(0x115)]=this[_0x5aa42b(0x156)],this[_0x5aa42b(0x14c)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x48d157),N(0x1,_0x3fdad7(f))],g);var se=Object[_0x5ea299(0x116)],oe=Object[_0x5ea299(0x124)],ne=(_0x5a5a63,_0x2581b7,_0x37a569)=>_0x2581b7 in _0x5a5a63?se(_0x5a5a63,_0x2581b7,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x37a569}):_0x5a5a63[_0x2581b7]=_0x37a569,ie=(_0x440425,_0x258c12,_0xfca280,_0xa4019e)=>{for(var _0x2545c1=_0xa4019e>0x1?void 0x0:_0xa4019e?oe(_0x258c12,_0xfca280):_0x258c12,_0x5d147f=_0x440425['length']-0x1,_0x5753cd;_0x5d147f>=0x0;_0x5d147f--)(_0x5753cd=_0x440425[_0x5d147f])&&(_0x2545c1=_0x5753cd(_0x2545c1)||_0x2545c1);return _0x2545c1;},w=(_0x3b6533,_0x8ed453)=>(_0x4b67ec,_0x3f0ec1)=>_0x8ed453(_0x4b67ec,_0x3f0ec1,_0x3b6533),$=(_0x30636b,_0x5d5f85,_0x9e86d7)=>ne(_0x30636b,typeof _0x5d5f85!='symbol'?_0x5d5f85+'':_0x5d5f85,_0x9e86d7);let b=class extends _0x49816f{constructor(_0x2f1cb6=M,_0x245aa6,_0x36e94d){const _0x4c82bb=_0x5ea299;super(),this['_config']=_0x2f1cb6,this[_0x4c82bb(0x111)]=_0x245aa6,this[_0x4c82bb(0x145)]=_0x36e94d;const {..._0x29e1fa}=_0xa3f01a({},M,this[_0x4c82bb(0x125)]);this[_0x4c82bb(0x145)]['setConfig'](z,_0x29e1fa);}[_0x5ea299(0x141)](){const _0x83a653=_0x5ea299;[[f],[g],[S]][_0x83a653(0x15e)](_0x153a6a=>{const _0x48940d=_0x83a653;this['_injector'][_0x48940d(0x132)](_0x153a6a);});}['onReady'](){const _0x53f032=_0x5ea299;this['_injector'][_0x53f032(0x128)](g),this['_injector'][_0x53f032(0x128)](S);}};$(b,_0x5ea299(0x15f),W),$(b,_0x5ea299(0x11a),_0x593503['UNIVER_UNKNOWN']),b=ie([_0x2b24ef(_0x36a0a4,_0x18a047,_0x170b60),w(0x1,_0x3fdad7(_0x235f21)),w(0x2,_0x591b1e)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x2cc8a6=_0x1055;(function(_0x5b8c71,_0x2628e5){const _0x751248=_0x1055,_0x53f661=_0x5b8c71();while(!![]){try{const _0x38a1bf=-parseInt(_0x751248(0x1bf))/0x1+parseInt(_0x751248(0x1d6))/0x2*(-parseInt(_0x751248(0x1bb))/0x3)+parseInt(_0x751248(0x1bc))/0x4+-parseInt(_0x751248(0x1db))/0x5+parseInt(_0x751248(0x1a0))/0x6*(-parseInt(_0x751248(0x1d3))/0x7)+-parseInt(_0x751248(0x1b9))/0x8*(parseInt(_0x751248(0x1f0))/0x9)+parseInt(_0x751248(0x1b1))/0xa*(parseInt(_0x751248(0x1a1))/0xb);if(_0x38a1bf===_0x2628e5)break;else _0x53f661['push'](_0x53f661['shift']());}catch(_0x5e43ed){_0x53f661['push'](_0x53f661['shift']());}}}(_0x5b60,0x211cb));import{CommentService as _0x74c6c3,CollaborationSessionService as _0x48974a,UniverCollaborationClientPlugin as _0x5cf774}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x26eb12}from'@univerjs-pro/license';import{dayjs as _0x3e9fc4,UserManagerService as _0x196045,Inject as _0x508d76,Injector as _0x54331d,Disposable as _0x4cf6d8,CustomRangeType as _0x3f5e23,UniverInstanceType as _0x22d94a,DependentOn as _0x37d3da,IConfigService as _0x6fd7ab,Plugin as _0x173940,merge as _0x422e60}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x4388c4}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x1b41e9,IThreadCommentDataSourceService as _0xa3bc21}from'@univerjs/thread-comment';import{bufferTime as _0x5a99f1}from'rxjs';import{HTTPService as _0x3d2d95}from'@univerjs/network';const W=_0x2cc8a6(0x1aa);var I=(_0x27d71c=>(_0x27d71c[_0x27d71c[_0x2cc8a6(0x1d5)]=0x0]=_0x2cc8a6(0x1d5),_0x27d71c[_0x27d71c[_0x2cc8a6(0x1eb)]=0x1]=_0x2cc8a6(0x1eb),_0x27d71c[_0x27d71c['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x27d71c))(I||{}),v=(_0x366c39=>(_0x366c39[_0x366c39[_0x2cc8a6(0x1e9)]=0x0]='Unknown',_0x366c39[_0x366c39[_0x2cc8a6(0x1c3)]=0x1]='Add',_0x366c39[_0x366c39[_0x2cc8a6(0x1ad)]=0x2]=_0x2cc8a6(0x1ad),_0x366c39[_0x366c39[_0x2cc8a6(0x1ef)]=0x3]='Edit',_0x366c39[_0x366c39['Delete']=0x4]='Delete',_0x366c39[_0x366c39[_0x2cc8a6(0x1b0)]=0x5]=_0x2cc8a6(0x1b0),_0x366c39[_0x366c39[_0x2cc8a6(0x1da)]=-0x1]='UNRECOGNIZED',_0x366c39))(v||{});const D=_0x31337d=>_0x3e9fc4(new Date(+_0x31337d))['format']('YYYY/MM/DD\x20HH:mm'),B=async(_0x4e0a83,_0x50f89f)=>{const _0xf43e6e=_0x2cc8a6,_0x133bb6=_0x4e0a83[_0xf43e6e(0x1e5)](_0x196045),_0x126725=_0x4e0a83[_0xf43e6e(0x1e5)](_0x3d2d95);_0x50f89f[_0xf43e6e(0x1e7)](_0x24483f=>{const _0x668824=_0xf43e6e;_0x133bb6[_0x668824(0x19e)](_0x24483f)&&_0x50f89f[_0x668824(0x1c1)](_0x24483f);}),_0x50f89f[_0xf43e6e(0x1ee)]&&(await _0x126725['get'](_0xf43e6e(0x1cf),{'params':{'userIDs':[..._0x50f89f]}}))[_0xf43e6e(0x1d4)]['users'][_0xf43e6e(0x1e7)](_0x5eaeb7=>{const _0x5a7dfe=_0xf43e6e;_0x5eaeb7&&_0x133bb6[_0x5a7dfe(0x1a2)](_0x5eaeb7);});};var K=Object[_0x2cc8a6(0x1fa)],V=(_0x341f89,_0x5e988f,_0x1d6e9e,_0x574205)=>{for(var _0x1ae094=_0x574205>0x1?void 0x0:_0x574205?K(_0x5e988f,_0x1d6e9e):_0x5e988f,_0x104601=_0x341f89['length']-0x1,_0x273303;_0x104601>=0x0;_0x104601--)(_0x273303=_0x341f89[_0x104601])&&(_0x1ae094=_0x273303(_0x1ae094)||_0x1ae094);return _0x1ae094;},p=(_0x31f48a,_0x167e6c)=>(_0x1f6941,_0x4caff9)=>_0x167e6c(_0x1f6941,_0x4caff9,_0x31f48a);function _0x5b60(){const _0x55a7e6=['error','threadId','/edit','/universer-api/user/list','createTimestamp','slice','users','43085BfYcxO','body','OpenOrReOpen','96166dxVwVG','deleteComment','COMMENT','find','UNRECOGNIZED','529310gCeyTH','map','_injector','/list','post','/universer-api/comment/unit/','_threadCommentDataSource','stringify','add','Delete','get','filter','forEach','/solved','Unknown','unitId','Solved','disposeWithMe','subscribe','size','Edit','783kQyDdT','getUnit','customRanges','rangeId','symbol','_initUserSync','rangeType','content','personId','comment','getOwnPropertyDescriptor','code','_sessionService','/add','listComments','_init','addComment','getUser','replies','144CWLwzP','642378JgbtwO','addUser','_httpService','userID','_config','replyId','solved','parentId','comments','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getComment','parse','Reply','_commentService','resolved','Solve','110OtIegn','type','saveCommentToSnapshot','pipe','_configService','updateComment','getMemberID','onStarting','23672BgeZbM','_threadCommentDataSourceService','3aCvdgq','777076CVlYQv','_userService','_threadCommentModel','141922aItzIx','user','delete','/delete','Add','length','_initDataSource','userId','values','root','commentUpdate$','requireSession','reply'];_0x5b60=function(){return _0x55a7e6;};return _0x5b60();}let S=class extends _0x4cf6d8{constructor(_0x91d85d,_0x59cc94,_0x322416,_0x5d7ec4){const _0x164134=_0x2cc8a6;super(),this[_0x164134(0x1ae)]=_0x91d85d,this['_threadCommentModel']=_0x59cc94,this['_userService']=_0x322416,this[_0x164134(0x1dd)]=_0x5d7ec4,this['_init'](),this[_0x164134(0x1f5)]();}[_0x2cc8a6(0x1f5)](){const _0x347c0f=_0x2cc8a6;this['disposeWithMe'](this[_0x347c0f(0x1be)][_0x347c0f(0x1c9)][_0x347c0f(0x1b4)](_0x5a99f1(0x10))['subscribe'](_0x3cf785=>{const _0x1da555=new Set();_0x3cf785['forEach'](_0xc69bb3=>{const _0x391e3d=_0x1055;switch(_0xc69bb3[_0x391e3d(0x1b2)]){case _0x391e3d(0x1e3):{const _0x5f3472=_0xc69bb3['payload'][_0x391e3d(0x1f8)];_0x1da555[_0x391e3d(0x1e3)](_0x5f3472);break;}}}),B(this['_injector'],_0x1da555);}));}[_0x2cc8a6(0x19c)](){const _0x529c7c=_0x2cc8a6;this[_0x529c7c(0x1ec)](this[_0x529c7c(0x1ae)]['commentUpdate$'][_0x529c7c(0x1ed)](async _0x1a1cc2=>{const _0x1282cb=_0x529c7c;var _0x3eb973,_0x34964c,_0x534ef4,_0x33fe5e;const _0x4eb6f1=(_0x3eb973=this[_0x1282cb(0x1be)][_0x1282cb(0x1f1)](_0x1a1cc2[_0x1282cb(0x1ea)])[_0x1282cb(0x1d9)](_0x55054f=>_0x55054f[_0x1282cb(0x1cd)]===_0x1a1cc2['threadId']))==null?void 0x0:_0x3eb973[_0x1282cb(0x1c8)];if(!_0x4eb6f1)return;const {unitId:_0x360a76,subUnitId:_0x4bded6}=_0x4eb6f1;switch(_0x1a1cc2['user']&&this[_0x1282cb(0x1bd)][_0x1282cb(0x1a2)](_0x1a1cc2[_0x1282cb(0x1c0)]),_0x1a1cc2[_0x1282cb(0x1b2)]){case v[_0x1282cb(0x1c3)]:break;case v[_0x1282cb(0x1ad)]:{this[_0x1282cb(0x1be)][_0x1282cb(0x19d)](_0x360a76,_0x4bded6,{'unitId':_0x360a76,'subUnitId':_0x4bded6,'ref':'','id':_0x1a1cc2[_0x1282cb(0x1a6)],'dT':D(+_0x1a1cc2['createTimestamp']),'threadId':_0x1a1cc2[_0x1282cb(0x1cd)],'personId':(_0x534ef4=(_0x34964c=_0x1a1cc2[_0x1282cb(0x1c0)])==null?void 0x0:_0x34964c['userID'])!=null?_0x534ef4:_0x1a1cc2[_0x1282cb(0x1c6)],'text':JSON[_0x1282cb(0x1ac)](_0x1a1cc2[_0x1282cb(0x1f7)]),'parentId':_0x4eb6f1['id']});break;}case v[_0x1282cb(0x1e4)]:{const _0x14a0a5=this[_0x1282cb(0x1be)][_0x1282cb(0x1ab)](_0x360a76,_0x4bded6,_0x1a1cc2[_0x1282cb(0x1a6)]);_0x14a0a5&&_0x14a0a5[_0x1282cb(0x1a8)]&&this[_0x1282cb(0x1be)][_0x1282cb(0x1d7)](_0x360a76,_0x4bded6,_0x1a1cc2['replyId']);break;}case v['Edit']:{this[_0x1282cb(0x1be)][_0x1282cb(0x1b6)](_0x360a76,_0x4bded6,{'commentId':_0x1a1cc2['replyId'],'text':JSON['parse'](_0x1a1cc2['content'])});break;}case v[_0x1282cb(0x1b0)]:{const _0xdb3e69=(_0x33fe5e=this['_threadCommentModel'][_0x1282cb(0x1f1)](_0x1a1cc2[_0x1282cb(0x1ea)])['find'](_0x4d00ef=>_0x4d00ef[_0x1282cb(0x1cd)]===_0x1a1cc2[_0x1282cb(0x1cd)]))==null?void 0x0:_0x33fe5e[_0x1282cb(0x1c8)];_0xdb3e69&&this[_0x1282cb(0x1be)]['resolveComment'](_0x360a76,_0x4bded6,_0xdb3e69['id'],_0x1a1cc2[_0x1282cb(0x1a7)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x508d76(_0x74c6c3)),p(0x1,_0x508d76(_0x1b41e9)),p(0x2,_0x508d76(_0x196045)),p(0x3,_0x508d76(_0x54331d))],S);const z='thread-comment-data-source.config',M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x47c3bd,_0x3693ef,_0x449b11,_0xc171e4)=>{const _0x4bf66a=_0x2cc8a6;for(var _0x2cf6bf=_0xc171e4>0x1?void 0x0:_0xc171e4?k(_0x3693ef,_0x449b11):_0x3693ef,_0x4e9866=_0x47c3bd[_0x4bf66a(0x1c4)]-0x1,_0x7833b6;_0x4e9866>=0x0;_0x4e9866--)(_0x7833b6=_0x47c3bd[_0x4e9866])&&(_0x2cf6bf=_0x7833b6(_0x2cf6bf)||_0x2cf6bf);return _0x2cf6bf;},_=(_0x381e6d,_0x1c8501)=>(_0x3520aa,_0x5b426d)=>_0x1c8501(_0x3520aa,_0x5b426d,_0x381e6d);function X(_0x40bc8c,_0xb32cf1){const _0x451a23=_0x2cc8a6,_0x487652=_0x40bc8c[_0x451a23(0x19f)][0x0];return{..._0xb32cf1,'id':_0x487652[_0x451a23(0x1a6)],'resolved':_0x40bc8c['solved']===0x1,'dT':D(_0x487652['createTimestamp']),'personId':_0x487652[_0x451a23(0x1c6)],'threadId':_0x487652[_0x451a23(0x1cd)]};}function ee(_0x2d7b2e,_0x114984,_0x4e2d25){const _0x386e95=_0x2cc8a6;var _0x48bd19,_0x2ccb25;if(((_0x2ccb25=(_0x48bd19=_0x2d7b2e==null?void 0x0:_0x2d7b2e['replies'])==null?void 0x0:_0x48bd19[_0x386e95(0x1c4)])!=null?_0x2ccb25:0x0)>0x0){const _0x4aa96f=(_0x4bba49,_0x4f7bcc)=>({'id':_0x4bba49[_0x386e95(0x1a6)],'threadId':_0x4bba49[_0x386e95(0x1cd)],'dT':D(_0x4bba49[_0x386e95(0x1d0)]),'personId':_0x4bba49[_0x386e95(0x1c6)],'resolved':_0x2d7b2e['solved']===I[_0x386e95(0x1eb)],'unitId':_0x114984,'subUnitId':_0x4e2d25,'text':JSON[_0x386e95(0x1ac)](_0x4bba49[_0x386e95(0x1f7)]),'parentId':_0x4f7bcc}),_0x3d9af9=_0x4aa96f(_0x2d7b2e['replies'][0x0]);return{..._0x3d9af9,'children':_0x2d7b2e[_0x386e95(0x19f)][_0x386e95(0x1d1)](0x1)['map'](_0x3f40c7=>_0x4aa96f(_0x3f40c7,_0x3d9af9['id']))};}return null;}let f=class{constructor(_0x3283c2,_0x2aaf8d,_0xd160ac,_0x2330c4){const _0x120c9e=_0x2cc8a6;this[_0x120c9e(0x1a3)]=_0x3283c2,this['_userService']=_0x2aaf8d,this['_sessionService']=_0xd160ac,this[_0x120c9e(0x1dd)]=_0x2330c4;}async[_0x2cc8a6(0x19d)](_0x26e7a9){const _0x5a7ea5=_0x2cc8a6;var _0x546a69,_0x15f3aa;const {parentId:_0x454460,unitId:_0x3a945d,text:_0x419298,threadId:_0x4827c1}=_0x26e7a9,_0x31158c=(_0x15f3aa=(_0x546a69=_0x419298['customRanges'])==null?void 0x0:_0x546a69['filter'](_0x3a5040=>_0x3a5040[_0x5a7ea5(0x1f6)]===_0x3f5e23[_0x5a7ea5(0x1d8)])[_0x5a7ea5(0x1dc)](_0x32c1af=>_0x32c1af[_0x5a7ea5(0x1f3)]))!=null?_0x15f3aa:[],_0x18efbc=JSON[_0x5a7ea5(0x1e2)](_0x419298),_0x33ac2b=(await this[_0x5a7ea5(0x1fc)][_0x5a7ea5(0x1ca)](_0x3a945d))[_0x5a7ea5(0x1b7)]();if(_0x454460){const _0x52f831={'memberId':_0x33ac2b,'unitId':_0x3a945d,'content':_0x18efbc,'mention':_0x31158c,'threadId':_0x4827c1},_0x559380=(await this[_0x5a7ea5(0x1a3)][_0x5a7ea5(0x1df)]('/universer-api/comment/unit/'+_0x3a945d+'/reply',{'body':_0x52f831}))[_0x5a7ea5(0x1d4)][_0x5a7ea5(0x1cb)];return{..._0x26e7a9,'id':_0x559380[_0x5a7ea5(0x1a6)],'dT':_0x3e9fc4(+_0x559380[_0x5a7ea5(0x1d0)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x559380[_0x5a7ea5(0x1c6)]};}else{const _0x34da07={'memberId':_0x33ac2b,'unitId':_0x3a945d,'content':_0x18efbc,'mention':_0x31158c},_0x35aa30=await this[_0x5a7ea5(0x1a3)][_0x5a7ea5(0x1df)]('/universer-api/comment/unit/'+_0x3a945d+_0x5a7ea5(0x1fd),{'body':_0x34da07});return X(_0x35aa30[_0x5a7ea5(0x1d4)][_0x5a7ea5(0x1f9)],_0x26e7a9);}}async['updateComment'](_0x416c67){const _0x5d810b=_0x2cc8a6;var _0x5e5eb8,_0x1202f1;const {text:_0x43bb2f,unitId:_0x4976c8}=_0x416c67,_0x5c686c=(_0x1202f1=(_0x5e5eb8=_0x43bb2f[_0x5d810b(0x1f2)])==null?void 0x0:_0x5e5eb8[_0x5d810b(0x1e6)](_0x56340f=>_0x56340f[_0x5d810b(0x1f6)]===_0x3f5e23['COMMENT'])[_0x5d810b(0x1dc)](_0x4ff117=>_0x4ff117[_0x5d810b(0x1f3)]))!=null?_0x1202f1:[],_0x634c5d=JSON[_0x5d810b(0x1e2)](_0x43bb2f),_0x3db1cb=_0x416c67['threadId'],_0x5994e1=_0x416c67['id'],_0x274f6a={'memberId':(await this[_0x5d810b(0x1fc)][_0x5d810b(0x1ca)](_0x4976c8))['getMemberID'](),'unitId':_0x4976c8,'threadId':_0x3db1cb,'mention':_0x5c686c,'content':_0x634c5d,'replyId':_0x5994e1},_0x16110a=await this[_0x5d810b(0x1a3)][_0x5d810b(0x1df)]('/universer-api/comment/unit/'+_0x4976c8+_0x5d810b(0x1ce),{'body':_0x274f6a});return!_0x16110a[_0x5d810b(0x1d4)][_0x5d810b(0x1cc)]||_0x16110a['body'][_0x5d810b(0x1cc)]['code']===0x1;}async['resolveComment'](_0x569f01){const _0x2c6c05=_0x2cc8a6,{unitId:_0x13004c}=_0x569f01,_0x2e855d=_0x569f01[_0x2c6c05(0x1cd)],_0x199af3={'memberId':this[_0x2c6c05(0x1bd)]['getCurrentUser']()[_0x2c6c05(0x1a4)],'unitId':_0x13004c,'threadId':_0x2e855d,'solved':_0x569f01[_0x2c6c05(0x1af)]?I[_0x2c6c05(0x1eb)]:I['OpenOrReOpen']},_0x27cebc=await this[_0x2c6c05(0x1a3)][_0x2c6c05(0x1df)](_0x2c6c05(0x1e0)+_0x13004c+_0x2c6c05(0x1e8),{'body':_0x199af3});return!_0x27cebc[_0x2c6c05(0x1d4)][_0x2c6c05(0x1cc)]||_0x27cebc[_0x2c6c05(0x1d4)]['error'][_0x2c6c05(0x1fb)]===0x1;}async['deleteComment'](_0x172133,_0x276567,_0x5945f5,_0x384546){const _0x271eee=_0x2cc8a6,_0x1a29f2={'memberId':(await this[_0x271eee(0x1fc)][_0x271eee(0x1ca)](_0x172133))[_0x271eee(0x1b7)](),'threadId':_0x5945f5,'replyId':_0x384546,'unitId':_0x172133},_0x4e0af9=await this[_0x271eee(0x1a3)][_0x271eee(0x1df)]('/universer-api/comment/unit/'+_0x172133+_0x271eee(0x1c2),{'body':_0x1a29f2});return!_0x4e0af9['body'][_0x271eee(0x1cc)]||_0x4e0af9[_0x271eee(0x1d4)][_0x271eee(0x1cc)][_0x271eee(0x1fb)]===0x1;}async[_0x2cc8a6(0x19b)](_0x55e253,_0x56397a,_0x5a4b68){const _0x397508=_0x2cc8a6,_0x21666f={'unitId':_0x55e253,'threadId':_0x5a4b68},_0x57ab13=await this[_0x397508(0x1a3)]['post'](_0x397508(0x1e0)+_0x55e253+_0x397508(0x1de),{'body':_0x21666f}),_0xdf5013=_0x5a4b68['map'](_0x294766=>ee(_0x57ab13[_0x397508(0x1d4)][_0x397508(0x1a9)][_0x294766],_0x55e253,_0x56397a))[_0x397508(0x1e6)](Boolean);return Object[_0x397508(0x1c7)](_0x57ab13[_0x397508(0x1d4)][_0x397508(0x1d2)])[_0x397508(0x1e7)](_0x3b3a7d=>{const _0x5ae66f=_0x397508;this[_0x5ae66f(0x1bd)][_0x5ae66f(0x1a2)](_0x3b3a7d);}),_0xdf5013;}[_0x2cc8a6(0x1b3)](_0xfc9ce7){const _0x1e0306=_0x2cc8a6;return{'id':_0xfc9ce7['id'],'threadId':_0xfc9ce7[_0x1e0306(0x1cd)],'ref':_0xfc9ce7['ref']};}};f=Q([_(0x0,_0x508d76(_0x3d2d95)),_(0x1,_0x508d76(_0x196045)),_(0x2,_0x508d76(_0x48974a)),_(0x3,_0x508d76(_0x54331d))],f);var re=Object[_0x2cc8a6(0x1fa)],te=(_0x477f8e,_0x41e07b,_0x21938f,_0x487709)=>{const _0x57feed=_0x2cc8a6;for(var _0x496bda=_0x487709>0x1?void 0x0:_0x487709?re(_0x41e07b,_0x21938f):_0x41e07b,_0x53da12=_0x477f8e[_0x57feed(0x1c4)]-0x1,_0x164b4e;_0x53da12>=0x0;_0x53da12--)(_0x164b4e=_0x477f8e[_0x53da12])&&(_0x496bda=_0x164b4e(_0x496bda)||_0x496bda);return _0x496bda;},N=(_0x2d904a,_0xcbabe2)=>(_0x3282e8,_0x46583e)=>_0xcbabe2(_0x3282e8,_0x46583e,_0x2d904a);let g=class extends _0x4cf6d8{constructor(_0x15ca97,_0x48a214){const _0x2d6572=_0x2cc8a6;super(),this['_threadCommentDataSourceService']=_0x15ca97,this[_0x2d6572(0x1e1)]=_0x48a214,this[_0x2d6572(0x1c5)]();}[_0x2cc8a6(0x1c5)](){const _0xd6efc1=_0x2cc8a6;this[_0xd6efc1(0x1ba)]['dataSource']=this['_threadCommentDataSource'],this[_0xd6efc1(0x1ba)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0xa3bc21),N(0x1,_0x508d76(f))],g);var se=Object['defineProperty'],oe=Object[_0x2cc8a6(0x1fa)],ne=(_0x56a402,_0x2e3a15,_0x4fa52d)=>_0x2e3a15 in _0x56a402?se(_0x56a402,_0x2e3a15,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4fa52d}):_0x56a402[_0x2e3a15]=_0x4fa52d,ie=(_0x212195,_0x338356,_0x23dee3,_0x38b712)=>{for(var _0x49df31=_0x38b712>0x1?void 0x0:_0x38b712?oe(_0x338356,_0x23dee3):_0x338356,_0x5a6128=_0x212195['length']-0x1,_0x3211bb;_0x5a6128>=0x0;_0x5a6128--)(_0x3211bb=_0x212195[_0x5a6128])&&(_0x49df31=_0x3211bb(_0x49df31)||_0x49df31);return _0x49df31;},w=(_0x1cf2e9,_0x7e46e3)=>(_0x205031,_0x477d12)=>_0x7e46e3(_0x205031,_0x477d12,_0x1cf2e9),$=(_0xa16efd,_0x4c7be5,_0x6d4b36)=>ne(_0xa16efd,typeof _0x4c7be5!=_0x2cc8a6(0x1f4)?_0x4c7be5+'':_0x4c7be5,_0x6d4b36);let b=class extends _0x173940{constructor(_0x311ece=M,_0xa5aef7,_0x260226){const _0x2a2c74=_0x2cc8a6;super(),this[_0x2a2c74(0x1a5)]=_0x311ece,this['_injector']=_0xa5aef7,this[_0x2a2c74(0x1b5)]=_0x260226;const {..._0x33eb49}=_0x422e60({},M,this[_0x2a2c74(0x1a5)]);this[_0x2a2c74(0x1b5)]['setConfig'](z,_0x33eb49);}[_0x2cc8a6(0x1b8)](){const _0x3d45f4=_0x2cc8a6;[[f],[g],[S]][_0x3d45f4(0x1e7)](_0x220941=>{const _0x183db6=_0x3d45f4;this[_0x183db6(0x1dd)][_0x183db6(0x1e3)](_0x220941);});}['onReady'](){const _0x47dae5=_0x2cc8a6;this[_0x47dae5(0x1dd)][_0x47dae5(0x1e5)](g),this[_0x47dae5(0x1dd)][_0x47dae5(0x1e5)](S);}};$(b,'pluginName',W),$(b,'type',_0x22d94a['UNIVER_UNKNOWN']),b=ie([_0x37d3da(_0x4388c4,_0x5cf774,_0x26eb12),w(0x1,_0x508d76(_0x54331d)),w(0x2,_0x6fd7ab)],b);function _0x1055(_0x46ac91,_0x399605){const _0x5b605e=_0x5b60();return _0x1055=function(_0x1055aa,_0x2dbf99){_0x1055aa=_0x1055aa-0x19b;let _0x3145ce=_0x5b605e[_0x1055aa];return _0x3145ce;},_0x1055(_0x46ac91,_0x399605);}export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- (function(_0x374d69,_0x5d0e07){const _0x28e9c=_0x45a4,_0x274bd3=_0x374d69();while(!![]){try{const _0x12d541=-parseInt(_0x28e9c(0x232))/0x1*(-parseInt(_0x28e9c(0x1f0))/0x2)+parseInt(_0x28e9c(0x220))/0x3*(parseInt(_0x28e9c(0x218))/0x4)+parseInt(_0x28e9c(0x233))/0x5*(parseInt(_0x28e9c(0x24b))/0x6)+-parseInt(_0x28e9c(0x22e))/0x7*(parseInt(_0x28e9c(0x21a))/0x8)+-parseInt(_0x28e9c(0x1c7))/0x9+parseInt(_0x28e9c(0x1d1))/0xa*(-parseInt(_0x28e9c(0x1e2))/0xb)+parseInt(_0x28e9c(0x20c))/0xc;if(_0x12d541===_0x5d0e07)break;else _0x274bd3['push'](_0x274bd3['shift']());}catch(_0xfadb9){_0x274bd3['push'](_0x274bd3['shift']());}}}(_0x45e8,0x62b97),function(_0xc427b,_0x1fa432){const _0x42d602=_0x45a4;typeof exports==_0x42d602(0x1ed)&&typeof module<'u'?_0x1fa432(exports,require(_0x42d602(0x204)),require(_0x42d602(0x1f5)),require(_0x42d602(0x244)),require(_0x42d602(0x1e6)),require('@univerjs/thread-comment'),require(_0x42d602(0x1f7)),require(_0x42d602(0x237))):typeof define==_0x42d602(0x20b)&&define[_0x42d602(0x1d3)]?define([_0x42d602(0x23c),'@univerjs-pro/collaboration-client','@univerjs-pro/license',_0x42d602(0x244),'@univerjs/thread-comment-ui',_0x42d602(0x1ff),_0x42d602(0x1f7),_0x42d602(0x237)],_0x1fa432):(_0xc427b=typeof globalThis<'u'?globalThis:_0xc427b||self,_0x1fa432(_0xc427b[_0x42d602(0x24a)]={},_0xc427b[_0x42d602(0x1ce)],_0xc427b['UniverProLicense'],_0xc427b[_0x42d602(0x228)],_0xc427b[_0x42d602(0x21b)],_0xc427b['UniverThreadComment'],_0xc427b[_0x42d602(0x1f7)],_0xc427b[_0x42d602(0x1f1)]));}(this,function(_0x2682ef,_0x5bf447,_0x87c284,_0x3d2349,_0x2eb246,_0x163613,_0x54ad63,_0x1c96cf){'use strict';const _0x32f792=_0x45a4;const _0x6600a5=_0x32f792(0x210);var _0x55a88f=(_0x52d678=>(_0x52d678[_0x52d678[_0x32f792(0x248)]=0x0]=_0x32f792(0x248),_0x52d678[_0x52d678['Solved']=0x1]=_0x32f792(0x200),_0x52d678[_0x52d678[_0x32f792(0x1ec)]=-0x1]=_0x32f792(0x1ec),_0x52d678))(_0x55a88f||{}),_0x574f5f=(_0x5bda62=>(_0x5bda62[_0x5bda62['Unknown']=0x0]=_0x32f792(0x22b),_0x5bda62[_0x5bda62[_0x32f792(0x213)]=0x1]=_0x32f792(0x213),_0x5bda62[_0x5bda62[_0x32f792(0x1d9)]=0x2]=_0x32f792(0x1d9),_0x5bda62[_0x5bda62[_0x32f792(0x216)]=0x3]=_0x32f792(0x216),_0x5bda62[_0x5bda62[_0x32f792(0x230)]=0x4]=_0x32f792(0x230),_0x5bda62[_0x5bda62[_0x32f792(0x22f)]=0x5]=_0x32f792(0x22f),_0x5bda62[_0x5bda62['UNRECOGNIZED']=-0x1]=_0x32f792(0x1ec),_0x5bda62))(_0x574f5f||{});const _0x53d14c=_0x2d2520=>_0x3d2349[_0x32f792(0x226)](new Date(+_0x2d2520))[_0x32f792(0x243)](_0x32f792(0x23a)),_0x265863=async(_0x562fc3,_0x268906)=>{const _0x776e6c=_0x32f792,_0x515abb=_0x562fc3[_0x776e6c(0x249)](_0x3d2349['UserManagerService']),_0x35930d=_0x562fc3['get'](_0x1c96cf[_0x776e6c(0x1eb)]);_0x268906['forEach'](_0xef0e41=>{const _0x259b69=_0x776e6c;_0x515abb[_0x259b69(0x201)](_0xef0e41)&&_0x268906[_0x259b69(0x221)](_0xef0e41);}),_0x268906[_0x776e6c(0x1f2)]&&(await _0x35930d['get'](_0x776e6c(0x20f),{'params':{'userIDs':[..._0x268906]}}))[_0x776e6c(0x1cd)]['users']['forEach'](_0x51bdb2=>{const _0x371f9a=_0x776e6c;_0x51bdb2&&_0x515abb[_0x371f9a(0x1fd)](_0x51bdb2);});};var _0x54c67f=Object[_0x32f792(0x206)],_0x4521c8=(_0x4c41de,_0x9e3df4,_0x7e3850,_0x49000b)=>{const _0x1f11f8=_0x32f792;for(var _0x48e598=_0x49000b>0x1?void 0x0:_0x49000b?_0x54c67f(_0x9e3df4,_0x7e3850):_0x9e3df4,_0x310832=_0x4c41de[_0x1f11f8(0x1e8)]-0x1,_0x3f8434;_0x310832>=0x0;_0x310832--)(_0x3f8434=_0x4c41de[_0x310832])&&(_0x48e598=_0x3f8434(_0x48e598)||_0x48e598);return _0x48e598;},_0x262f31=(_0x54ceed,_0x4e9a1c)=>(_0x4c7857,_0x3b48e2)=>_0x4e9a1c(_0x4c7857,_0x3b48e2,_0x54ceed);let _0x34b785=class extends _0x3d2349['Disposable']{constructor(_0xd8b08e,_0x20a890,_0x550781,_0xf65251){const _0x32d6a0=_0x32f792;super(),this[_0x32d6a0(0x21c)]=_0xd8b08e,this[_0x32d6a0(0x22c)]=_0x20a890,this[_0x32d6a0(0x247)]=_0x550781,this[_0x32d6a0(0x1e5)]=_0xf65251,this[_0x32d6a0(0x241)](),this[_0x32d6a0(0x1f8)]();}[_0x32f792(0x1f8)](){const _0xd712d0=_0x32f792;this[_0xd712d0(0x1ea)](this[_0xd712d0(0x22c)]['commentUpdate$'][_0xd712d0(0x222)](_0x54ad63[_0xd712d0(0x212)](0x10))['subscribe'](_0x39a2b5=>{const _0x2ff023=_0xd712d0,_0x4e9547=new Set();_0x39a2b5[_0x2ff023(0x214)](_0x526686=>{const _0x988d86=_0x2ff023;switch(_0x526686[_0x988d86(0x1d4)]){case _0x988d86(0x21e):{const _0x957ef1=_0x526686[_0x988d86(0x23b)]['personId'];_0x4e9547['add'](_0x957ef1);break;}}}),_0x265863(this['_injector'],_0x4e9547);}));}[_0x32f792(0x241)](){const _0x5ef15f=_0x32f792;this[_0x5ef15f(0x1ea)](this[_0x5ef15f(0x21c)][_0x5ef15f(0x21d)][_0x5ef15f(0x1ef)](async _0x5bfa5e=>{const _0xe1b3a6=_0x5ef15f;var _0x30119e,_0x506267,_0x33b3c5,_0x34e1df;const _0x2262ae=(_0x30119e=this['_threadCommentModel'][_0xe1b3a6(0x227)](_0x5bfa5e['unitId'])[_0xe1b3a6(0x22a)](_0x531623=>_0x531623[_0xe1b3a6(0x22d)]===_0x5bfa5e['threadId']))==null?void 0x0:_0x30119e[_0xe1b3a6(0x1fa)];if(!_0x2262ae)return;const {unitId:_0x2fa52c,subUnitId:_0x26ffa7}=_0x2262ae;switch(_0x5bfa5e[_0xe1b3a6(0x1c9)]&&this[_0xe1b3a6(0x247)][_0xe1b3a6(0x1fd)](_0x5bfa5e[_0xe1b3a6(0x1c9)]),_0x5bfa5e[_0xe1b3a6(0x1d4)]){case _0x574f5f[_0xe1b3a6(0x213)]:break;case _0x574f5f[_0xe1b3a6(0x1d9)]:{this['_threadCommentModel'][_0xe1b3a6(0x205)](_0x2fa52c,_0x26ffa7,{'unitId':_0x2fa52c,'subUnitId':_0x26ffa7,'ref':'','id':_0x5bfa5e['replyId'],'dT':_0x53d14c(+_0x5bfa5e[_0xe1b3a6(0x1fb)]),'threadId':_0x5bfa5e[_0xe1b3a6(0x22d)],'personId':(_0x33b3c5=(_0x506267=_0x5bfa5e[_0xe1b3a6(0x1c9)])==null?void 0x0:_0x506267['userID'])!=null?_0x33b3c5:_0x5bfa5e[_0xe1b3a6(0x24c)],'text':JSON[_0xe1b3a6(0x242)](_0x5bfa5e[_0xe1b3a6(0x21f)]),'parentId':_0x2262ae['id']});break;}case _0x574f5f[_0xe1b3a6(0x230)]:{const _0x3065e2=this[_0xe1b3a6(0x22c)][_0xe1b3a6(0x1e4)](_0x2fa52c,_0x26ffa7,_0x5bfa5e[_0xe1b3a6(0x1ca)]);_0x3065e2&&_0x3065e2[_0xe1b3a6(0x1c8)]&&this[_0xe1b3a6(0x22c)][_0xe1b3a6(0x1c3)](_0x2fa52c,_0x26ffa7,_0x5bfa5e['replyId']);break;}case _0x574f5f[_0xe1b3a6(0x216)]:{this[_0xe1b3a6(0x22c)][_0xe1b3a6(0x1d7)](_0x2fa52c,_0x26ffa7,{'commentId':_0x5bfa5e[_0xe1b3a6(0x1ca)],'text':JSON[_0xe1b3a6(0x242)](_0x5bfa5e[_0xe1b3a6(0x21f)])});break;}case _0x574f5f[_0xe1b3a6(0x22f)]:{const _0xdc1ca9=(_0x34e1df=this[_0xe1b3a6(0x22c)][_0xe1b3a6(0x227)](_0x5bfa5e[_0xe1b3a6(0x225)])[_0xe1b3a6(0x22a)](_0x5d175a=>_0x5d175a[_0xe1b3a6(0x22d)]===_0x5bfa5e[_0xe1b3a6(0x22d)]))==null?void 0x0:_0x34e1df[_0xe1b3a6(0x1fa)];_0xdc1ca9&&this['_threadCommentModel'][_0xe1b3a6(0x23f)](_0x2fa52c,_0x26ffa7,_0xdc1ca9['id'],_0x5bfa5e[_0xe1b3a6(0x235)]===_0x55a88f[_0xe1b3a6(0x200)]);break;}}}));}};_0x34b785=_0x4521c8([_0x262f31(0x0,_0x3d2349['Inject'](_0x5bf447['CommentService'])),_0x262f31(0x1,_0x3d2349[_0x32f792(0x1cf)](_0x163613['ThreadCommentModel'])),_0x262f31(0x2,_0x3d2349[_0x32f792(0x1cf)](_0x3d2349[_0x32f792(0x1de)])),_0x262f31(0x3,_0x3d2349[_0x32f792(0x1cf)](_0x3d2349[_0x32f792(0x245)]))],_0x34b785);const _0x33ef92=_0x32f792(0x238),_0x34d92f={};var _0x24b354=Object['getOwnPropertyDescriptor'],_0x7d825d=(_0x2e9e13,_0x261d3a,_0x2db8ac,_0x5d8342)=>{const _0x597835=_0x32f792;for(var _0x2543c0=_0x5d8342>0x1?void 0x0:_0x5d8342?_0x24b354(_0x261d3a,_0x2db8ac):_0x261d3a,_0x1caf90=_0x2e9e13[_0x597835(0x1e8)]-0x1,_0x17f632;_0x1caf90>=0x0;_0x1caf90--)(_0x17f632=_0x2e9e13[_0x1caf90])&&(_0x2543c0=_0x17f632(_0x2543c0)||_0x2543c0);return _0x2543c0;},_0x2d8e28=(_0x40e734,_0x4ccf88)=>(_0x28f770,_0x59be39)=>_0x4ccf88(_0x28f770,_0x59be39,_0x40e734);function _0x3a2eb0(_0x7ae03f,_0x1f62ec){const _0x55d1b7=_0x32f792,_0x5c246c=_0x7ae03f[_0x55d1b7(0x1e0)][0x0];return{..._0x1f62ec,'id':_0x5c246c[_0x55d1b7(0x1ca)],'resolved':_0x7ae03f[_0x55d1b7(0x235)]===0x1,'dT':_0x53d14c(_0x5c246c[_0x55d1b7(0x1fb)]),'personId':_0x5c246c[_0x55d1b7(0x24c)],'threadId':_0x5c246c[_0x55d1b7(0x22d)]};}function _0x1df6e8(_0x1296d2,_0x46818c,_0x27bf66){const _0xc39ba6=_0x32f792;var _0x528169,_0x2a6790;if(((_0x2a6790=(_0x528169=_0x1296d2==null?void 0x0:_0x1296d2[_0xc39ba6(0x1e0)])==null?void 0x0:_0x528169[_0xc39ba6(0x1e8)])!=null?_0x2a6790:0x0)>0x0){const _0x2ecb00=(_0x5de774,_0x2dc63d)=>({'id':_0x5de774['replyId'],'threadId':_0x5de774['threadId'],'dT':_0x53d14c(_0x5de774[_0xc39ba6(0x1fb)]),'personId':_0x5de774[_0xc39ba6(0x24c)],'resolved':_0x1296d2[_0xc39ba6(0x235)]===_0x55a88f[_0xc39ba6(0x200)],'unitId':_0x46818c,'subUnitId':_0x27bf66,'text':JSON[_0xc39ba6(0x242)](_0x5de774['content']),'parentId':_0x2dc63d}),_0x1443af=_0x2ecb00(_0x1296d2[_0xc39ba6(0x1e0)][0x0]);return{..._0x1443af,'children':_0x1296d2[_0xc39ba6(0x1e0)][_0xc39ba6(0x229)](0x1)[_0xc39ba6(0x240)](_0x5e454f=>_0x2ecb00(_0x5e454f,_0x1443af['id']))};}return null;}let _0x59d0d9=class{constructor(_0x35bf2b,_0x2ad2e8,_0x5c3c3e,_0x3df11c){const _0x58fd7b=_0x32f792;this['_httpService']=_0x35bf2b,this[_0x58fd7b(0x247)]=_0x2ad2e8,this[_0x58fd7b(0x236)]=_0x5c3c3e,this['_injector']=_0x3df11c;}async[_0x32f792(0x205)](_0x55333d){const _0x1ed39b=_0x32f792;var _0x3f8ff1,_0x38ea10;const {parentId:_0x139cf7,unitId:_0x6d60f9,text:_0x520457,threadId:_0x5dee78}=_0x55333d,_0x43f433=(_0x38ea10=(_0x3f8ff1=_0x520457[_0x1ed39b(0x1cb)])==null?void 0x0:_0x3f8ff1[_0x1ed39b(0x1c2)](_0x2f6937=>_0x2f6937[_0x1ed39b(0x1f4)]===_0x3d2349[_0x1ed39b(0x239)]['COMMENT'])[_0x1ed39b(0x240)](_0x10013a=>_0x10013a[_0x1ed39b(0x23e)]))!=null?_0x38ea10:[],_0x3bfec3=JSON[_0x1ed39b(0x20a)](_0x520457),_0x39d34e=(await this[_0x1ed39b(0x236)][_0x1ed39b(0x1f9)](_0x6d60f9))[_0x1ed39b(0x20e)]();if(_0x139cf7){const _0x2e5d09={'memberId':_0x39d34e,'unitId':_0x6d60f9,'content':_0x3bfec3,'mention':_0x43f433,'threadId':_0x5dee78},_0xb9fdab=(await this['_httpService'][_0x1ed39b(0x219)](_0x1ed39b(0x215)+_0x6d60f9+_0x1ed39b(0x1e7),{'body':_0x2e5d09}))[_0x1ed39b(0x1cd)][_0x1ed39b(0x1e3)];return{..._0x55333d,'id':_0xb9fdab[_0x1ed39b(0x1ca)],'dT':_0x3d2349[_0x1ed39b(0x226)](+_0xb9fdab[_0x1ed39b(0x1fb)])[_0x1ed39b(0x243)](_0x1ed39b(0x23a)),'personId':_0xb9fdab[_0x1ed39b(0x24c)]};}else{const _0xd79d18={'memberId':_0x39d34e,'unitId':_0x6d60f9,'content':_0x3bfec3,'mention':_0x43f433},_0x274295=await this['_httpService']['post'](_0x1ed39b(0x215)+_0x6d60f9+_0x1ed39b(0x1ee),{'body':_0xd79d18});return _0x3a2eb0(_0x274295[_0x1ed39b(0x1cd)][_0x1ed39b(0x1f3)],_0x55333d);}}async['updateComment'](_0x2abec5){const _0x32ae58=_0x32f792;var _0x4754fa,_0x50e24d;const {text:_0x48c27d,unitId:_0x182fae}=_0x2abec5,_0x294294=(_0x50e24d=(_0x4754fa=_0x48c27d['customRanges'])==null?void 0x0:_0x4754fa[_0x32ae58(0x1c2)](_0x56d5b6=>_0x56d5b6[_0x32ae58(0x1f4)]===_0x3d2349['CustomRangeType'][_0x32ae58(0x209)])[_0x32ae58(0x240)](_0x5dac7a=>_0x5dac7a[_0x32ae58(0x23e)]))!=null?_0x50e24d:[],_0xf44d85=JSON[_0x32ae58(0x20a)](_0x48c27d),_0x20f350=_0x2abec5[_0x32ae58(0x22d)],_0x1ea3a9=_0x2abec5['id'],_0x2868d9={'memberId':(await this[_0x32ae58(0x236)]['requireSession'](_0x182fae))[_0x32ae58(0x20e)](),'unitId':_0x182fae,'threadId':_0x20f350,'mention':_0x294294,'content':_0xf44d85,'replyId':_0x1ea3a9},_0x485218=await this[_0x32ae58(0x223)][_0x32ae58(0x219)](_0x32ae58(0x215)+_0x182fae+_0x32ae58(0x203),{'body':_0x2868d9});return!_0x485218[_0x32ae58(0x1cd)]['error']||_0x485218[_0x32ae58(0x1cd)]['error'][_0x32ae58(0x20d)]===0x1;}async['resolveComment'](_0x50f231){const _0x119379=_0x32f792,{unitId:_0x26e49a}=_0x50f231,_0x23a2f0=_0x50f231[_0x119379(0x22d)],_0x2c5314={'memberId':this[_0x119379(0x247)][_0x119379(0x1dc)]()[_0x119379(0x246)],'unitId':_0x26e49a,'threadId':_0x23a2f0,'solved':_0x50f231[_0x119379(0x1da)]?_0x55a88f[_0x119379(0x200)]:_0x55a88f[_0x119379(0x248)]},_0x4b9af5=await this[_0x119379(0x223)]['post'](_0x119379(0x215)+_0x26e49a+'/solved',{'body':_0x2c5314});return!_0x4b9af5[_0x119379(0x1cd)]['error']||_0x4b9af5[_0x119379(0x1cd)][_0x119379(0x1d2)][_0x119379(0x20d)]===0x1;}async[_0x32f792(0x1c3)](_0x35a4f0,_0x9b13d1,_0x2fbe74,_0x27a1b6){const _0x3bfac1=_0x32f792,_0x430ebd={'memberId':(await this[_0x3bfac1(0x236)][_0x3bfac1(0x1f9)](_0x35a4f0))[_0x3bfac1(0x20e)](),'threadId':_0x2fbe74,'replyId':_0x27a1b6,'unitId':_0x35a4f0},_0x459ef6=await this[_0x3bfac1(0x223)][_0x3bfac1(0x219)](_0x3bfac1(0x215)+_0x35a4f0+'/delete',{'body':_0x430ebd});return!_0x459ef6[_0x3bfac1(0x1cd)][_0x3bfac1(0x1d2)]||_0x459ef6[_0x3bfac1(0x1cd)][_0x3bfac1(0x1d2)]['code']===0x1;}async['listComments'](_0x1152c3,_0x57fd5f,_0x53e996){const _0x190f7e=_0x32f792,_0x216f57={'unitId':_0x1152c3,'threadId':_0x53e996},_0x26bbb0=await this[_0x190f7e(0x223)][_0x190f7e(0x219)](_0x190f7e(0x215)+_0x1152c3+'/list',{'body':_0x216f57}),_0x3cd4fa=_0x53e996[_0x190f7e(0x240)](_0xdf9ef6=>_0x1df6e8(_0x26bbb0[_0x190f7e(0x1cd)][_0x190f7e(0x211)][_0xdf9ef6],_0x1152c3,_0x57fd5f))[_0x190f7e(0x1c2)](Boolean);return Object['values'](_0x26bbb0[_0x190f7e(0x1cd)][_0x190f7e(0x1db)])['forEach'](_0x4aa009=>{const _0x55d204=_0x190f7e;this[_0x55d204(0x247)][_0x55d204(0x1fd)](_0x4aa009);}),_0x3cd4fa;}[_0x32f792(0x1d0)](_0x11787f){const _0x20dba1=_0x32f792;return{'id':_0x11787f['id'],'threadId':_0x11787f[_0x20dba1(0x22d)],'ref':_0x11787f['ref']};}};_0x59d0d9=_0x7d825d([_0x2d8e28(0x0,_0x3d2349[_0x32f792(0x1cf)](_0x1c96cf['HTTPService'])),_0x2d8e28(0x1,_0x3d2349[_0x32f792(0x1cf)](_0x3d2349['UserManagerService'])),_0x2d8e28(0x2,_0x3d2349[_0x32f792(0x1cf)](_0x5bf447[_0x32f792(0x1df)])),_0x2d8e28(0x3,_0x3d2349[_0x32f792(0x1cf)](_0x3d2349[_0x32f792(0x245)]))],_0x59d0d9);var _0x69fd53=Object[_0x32f792(0x206)],_0x205afc=(_0x1a6058,_0x3b0a8a,_0x4d8cae,_0x276e57)=>{const _0x20fadd=_0x32f792;for(var _0x1b1672=_0x276e57>0x1?void 0x0:_0x276e57?_0x69fd53(_0x3b0a8a,_0x4d8cae):_0x3b0a8a,_0x5ef300=_0x1a6058[_0x20fadd(0x1e8)]-0x1,_0x3c56b1;_0x5ef300>=0x0;_0x5ef300--)(_0x3c56b1=_0x1a6058[_0x5ef300])&&(_0x1b1672=_0x3c56b1(_0x1b1672)||_0x1b1672);return _0x1b1672;},_0x1e0a69=(_0xd65d9,_0x2db075)=>(_0x5a683a,_0x407b61)=>_0x2db075(_0x5a683a,_0x407b61,_0xd65d9);let _0x165979=class extends _0x3d2349['Disposable']{constructor(_0x151cb6,_0x490627){const _0x203b4e=_0x32f792;super(),this[_0x203b4e(0x1e9)]=_0x151cb6,this[_0x203b4e(0x217)]=_0x490627,this['_initDataSource']();}['_initDataSource'](){const _0x91997e=_0x32f792;this[_0x91997e(0x1e9)][_0x91997e(0x1c6)]=this[_0x91997e(0x217)],this[_0x91997e(0x1e9)]['syncUpdateMutationToColla']=!0x1;}};_0x165979=_0x205afc([_0x1e0a69(0x0,_0x163613[_0x32f792(0x1fc)]),_0x1e0a69(0x1,_0x3d2349['Inject'](_0x59d0d9))],_0x165979);var _0x5db343=Object[_0x32f792(0x208)],_0x16e533=Object['getOwnPropertyDescriptor'],_0x4b1f61=(_0x2c9caa,_0x5a578c,_0x3aad28)=>_0x5a578c in _0x2c9caa?_0x5db343(_0x2c9caa,_0x5a578c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3aad28}):_0x2c9caa[_0x5a578c]=_0x3aad28,_0x5681cd=(_0x344422,_0x5f192e,_0x55b018,_0x3730ac)=>{const _0x1e63b0=_0x32f792;for(var _0x17d6b9=_0x3730ac>0x1?void 0x0:_0x3730ac?_0x16e533(_0x5f192e,_0x55b018):_0x5f192e,_0x596df8=_0x344422[_0x1e63b0(0x1e8)]-0x1,_0x53bd17;_0x596df8>=0x0;_0x596df8--)(_0x53bd17=_0x344422[_0x596df8])&&(_0x17d6b9=_0x53bd17(_0x17d6b9)||_0x17d6b9);return _0x17d6b9;},_0x13b900=(_0x1aeaf3,_0x472c49)=>(_0x3362dd,_0x2d039c)=>_0x472c49(_0x3362dd,_0x2d039c,_0x1aeaf3),_0x27c141=(_0x16a990,_0x3fda19,_0xaf7f98)=>_0x4b1f61(_0x16a990,typeof _0x3fda19!=_0x32f792(0x1d5)?_0x3fda19+'':_0x3fda19,_0xaf7f98);_0x2682ef[_0x32f792(0x224)]=class extends _0x3d2349['Plugin']{constructor(_0x20a41c=_0x34d92f,_0x2013ce,_0x44483d){const _0x3c536e=_0x32f792;super(),this[_0x3c536e(0x234)]=_0x20a41c,this['_injector']=_0x2013ce,this[_0x3c536e(0x1d8)]=_0x44483d;const {..._0x483d11}=_0x3d2349[_0x3c536e(0x1c4)]({},_0x34d92f,this['_config']);this['_configService'][_0x3c536e(0x1f6)](_0x33ef92,_0x483d11);}[_0x32f792(0x1fe)](){[[_0x59d0d9],[_0x165979],[_0x34b785]]['forEach'](_0x2222c3=>{const _0x256784=_0x45a4;this[_0x256784(0x1e5)]['add'](_0x2222c3);});}['onReady'](){const _0x1a55d8=_0x32f792;this[_0x1a55d8(0x1e5)][_0x1a55d8(0x249)](_0x165979),this[_0x1a55d8(0x1e5)]['get'](_0x34b785);}},_0x27c141(_0x2682ef['UniverThreadCommentDataSourcePlugin'],_0x32f792(0x23d),_0x6600a5),_0x27c141(_0x2682ef[_0x32f792(0x224)],_0x32f792(0x1d4),_0x3d2349[_0x32f792(0x231)][_0x32f792(0x202)]),_0x2682ef[_0x32f792(0x224)]=_0x5681cd([_0x3d2349['DependentOn'](_0x2eb246[_0x32f792(0x1e1)],_0x5bf447[_0x32f792(0x207)],_0x87c284[_0x32f792(0x1d6)]),_0x13b900(0x1,_0x3d2349[_0x32f792(0x1cf)](_0x3d2349[_0x32f792(0x245)])),_0x13b900(0x2,_0x3d2349[_0x32f792(0x1dd)])],_0x2682ef[_0x32f792(0x224)]),Object[_0x32f792(0x208)](_0x2682ef,Symbol[_0x32f792(0x1cc)],{'value':_0x32f792(0x1c5)});}));function _0x45a4(_0x4148b0,_0x15bc52){const _0x45e888=_0x45e8();return _0x45a4=function(_0x45a4ce,_0xfeb70c){_0x45a4ce=_0x45a4ce-0x1c2;let _0x4a8f6f=_0x45e888[_0x45a4ce];return _0x4a8f6f;},_0x45a4(_0x4148b0,_0x15bc52);}function _0x45e8(){const _0xbe8abd=['_config','solved','_sessionService','@univerjs/network','thread-comment-data-source.config','CustomRangeType','YYYY/MM/DD\x20HH:mm','payload','exports','pluginName','rangeId','resolveComment','map','_init','parse','format','@univerjs/core','Injector','userID','_userService','OpenOrReOpen','get','UniverProThreadCommentDatasource','78IvPnwI','userId','filter','deleteComment','merge','Module','dataSource','3598776BUWdib','parentId','user','replyId','customRanges','toStringTag','body','UniverProCollaborationClient','Inject','saveCommentToSnapshot','1694560eHCuDq','error','amd','type','symbol','UniverLicensePlugin','updateComment','_configService','Reply','resolved','users','getCurrentUser','IConfigService','UserManagerService','CollaborationSessionService','replies','UniverThreadCommentUIPlugin','33zDcTgb','reply','getComment','_injector','@univerjs/thread-comment-ui','/reply','length','_threadCommentDataSourceService','disposeWithMe','HTTPService','UNRECOGNIZED','object','/add','subscribe','6RfcBJA','UniverNetwork','size','comment','rangeType','@univerjs-pro/license','setConfig','rxjs','_initUserSync','requireSession','root','createTimestamp','IThreadCommentDataSourceService','addUser','onStarting','@univerjs/thread-comment','Solved','getUser','UNIVER_UNKNOWN','/edit','@univerjs-pro/collaboration-client','addComment','getOwnPropertyDescriptor','UniverCollaborationClientPlugin','defineProperty','COMMENT','stringify','function','6446064FaBFsB','code','getMemberID','/universer-api/user/list','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','comments','bufferTime','Add','forEach','/universer-api/comment/unit/','Edit','_threadCommentDataSource','34856hdXAqp','post','8rHbspF','UniverThreadCommentUi','_commentService','commentUpdate$','add','content','267xyeRdt','delete','pipe','_httpService','UniverThreadCommentDataSourcePlugin','unitId','dayjs','getUnit','UniverCore','slice','find','Unknown','_threadCommentModel','threadId','2924012KkRfQw','Solve','Delete','UniverInstanceType','135449AxNwbC','4330OkweGK'];_0x45e8=function(){return _0xbe8abd;};return _0x45e8();}
1
+ (function(_0x441d4c,_0x481c05){const _0x47d82f=_0x29cd,_0x91e344=_0x441d4c();while(!![]){try{const _0xbc2bce=-parseInt(_0x47d82f(0x1d1))/0x1*(-parseInt(_0x47d82f(0x1b7))/0x2)+parseInt(_0x47d82f(0x200))/0x3*(parseInt(_0x47d82f(0x1fa))/0x4)+-parseInt(_0x47d82f(0x228))/0x5+-parseInt(_0x47d82f(0x1b1))/0x6+-parseInt(_0x47d82f(0x227))/0x7+-parseInt(_0x47d82f(0x225))/0x8+parseInt(_0x47d82f(0x229))/0x9*(parseInt(_0x47d82f(0x1c7))/0xa);if(_0xbc2bce===_0x481c05)break;else _0x91e344['push'](_0x91e344['shift']());}catch(_0x4a3846){_0x91e344['push'](_0x91e344['shift']());}}}(_0x2451,0x94512),function(_0x3397ec,_0xa4b193){const _0x2213c9=_0x29cd;typeof exports==_0x2213c9(0x1fe)&&typeof module<'u'?_0xa4b193(exports,require(_0x2213c9(0x1d5)),require('@univerjs-pro/license'),require(_0x2213c9(0x1b9)),require('@univerjs/thread-comment-ui'),require(_0x2213c9(0x1fc)),require('rxjs'),require(_0x2213c9(0x1c3))):typeof define=='function'&&define[_0x2213c9(0x20d)]?define([_0x2213c9(0x1ea),_0x2213c9(0x1d5),_0x2213c9(0x206),_0x2213c9(0x1b9),_0x2213c9(0x223),_0x2213c9(0x1fc),'rxjs',_0x2213c9(0x1c3)],_0xa4b193):(_0x3397ec=typeof globalThis<'u'?globalThis:_0x3397ec||self,_0xa4b193(_0x3397ec[_0x2213c9(0x1d3)]={},_0x3397ec[_0x2213c9(0x220)],_0x3397ec[_0x2213c9(0x1db)],_0x3397ec['UniverCore'],_0x3397ec[_0x2213c9(0x205)],_0x3397ec[_0x2213c9(0x20a)],_0x3397ec[_0x2213c9(0x1f6)],_0x3397ec[_0x2213c9(0x214)]));}(this,function(_0x5708ee,_0xa6c00e,_0x3dcb7f,_0x40565c,_0x11e035,_0x2e46d8,_0x50e44c,_0x126f1a){'use strict';const _0x15bd47=_0x29cd;const _0x2ddd03=_0x15bd47(0x21a);var _0x3f0710=(_0x55a6f1=>(_0x55a6f1[_0x55a6f1[_0x15bd47(0x207)]=0x0]='OpenOrReOpen',_0x55a6f1[_0x55a6f1[_0x15bd47(0x1cd)]=0x1]=_0x15bd47(0x1cd),_0x55a6f1[_0x55a6f1[_0x15bd47(0x218)]=-0x1]=_0x15bd47(0x218),_0x55a6f1))(_0x3f0710||{}),_0x3283b7=(_0x21eb7b=>(_0x21eb7b[_0x21eb7b[_0x15bd47(0x1c9)]=0x0]=_0x15bd47(0x1c9),_0x21eb7b[_0x21eb7b['Add']=0x1]='Add',_0x21eb7b[_0x21eb7b['Reply']=0x2]=_0x15bd47(0x20e),_0x21eb7b[_0x21eb7b[_0x15bd47(0x1bb)]=0x3]=_0x15bd47(0x1bb),_0x21eb7b[_0x21eb7b[_0x15bd47(0x1b6)]=0x4]=_0x15bd47(0x1b6),_0x21eb7b[_0x21eb7b[_0x15bd47(0x1f8)]=0x5]='Solve',_0x21eb7b[_0x21eb7b[_0x15bd47(0x218)]=-0x1]='UNRECOGNIZED',_0x21eb7b))(_0x3283b7||{});const _0x3ac07d=_0x86fb95=>_0x40565c[_0x15bd47(0x1d0)](new Date(+_0x86fb95))['format']('YYYY/MM/DD\x20HH:mm'),_0x59a2e5=async(_0x49b654,_0x2a0433)=>{const _0x481e40=_0x15bd47,_0x33df57=_0x49b654[_0x481e40(0x1dc)](_0x40565c[_0x481e40(0x1cf)]),_0x1e3e65=_0x49b654[_0x481e40(0x1dc)](_0x126f1a[_0x481e40(0x1e0)]);_0x2a0433[_0x481e40(0x20f)](_0x4b790b=>{const _0x334c80=_0x481e40;_0x33df57[_0x334c80(0x213)](_0x4b790b)&&_0x2a0433[_0x334c80(0x1f4)](_0x4b790b);}),_0x2a0433['size']&&(await _0x1e3e65[_0x481e40(0x1dc)]('/universer-api/user/list',{'params':{'userIDs':[..._0x2a0433]}}))[_0x481e40(0x1ca)]['users'][_0x481e40(0x20f)](_0x5789e5=>{_0x5789e5&&_0x33df57['addUser'](_0x5789e5);});};var _0x1ffb52=Object[_0x15bd47(0x201)],_0x3eaf2e=(_0x54a7c4,_0x2aa985,_0x55f94d,_0x466127)=>{const _0x14fad1=_0x15bd47;for(var _0x33b456=_0x466127>0x1?void 0x0:_0x466127?_0x1ffb52(_0x2aa985,_0x55f94d):_0x2aa985,_0x4a8d07=_0x54a7c4[_0x14fad1(0x1ba)]-0x1,_0x194495;_0x4a8d07>=0x0;_0x4a8d07--)(_0x194495=_0x54a7c4[_0x4a8d07])&&(_0x33b456=_0x194495(_0x33b456)||_0x33b456);return _0x33b456;},_0x486313=(_0x1144ad,_0x1d030f)=>(_0x4b38da,_0x2e6cf9)=>_0x1d030f(_0x4b38da,_0x2e6cf9,_0x1144ad);let _0x208812=class extends _0x40565c[_0x15bd47(0x1f3)]{constructor(_0x4c94af,_0x47a30e,_0x29a89b,_0x2e882c){const _0x578880=_0x15bd47;super(),this['_commentService']=_0x4c94af,this[_0x578880(0x1dd)]=_0x47a30e,this[_0x578880(0x1b3)]=_0x29a89b,this[_0x578880(0x1c1)]=_0x2e882c,this[_0x578880(0x1f5)](),this[_0x578880(0x1da)]();}['_initUserSync'](){const _0x3f7db0=_0x15bd47;this['disposeWithMe'](this['_threadCommentModel'][_0x3f7db0(0x20b)]['pipe'](_0x50e44c[_0x3f7db0(0x1ad)](0x10))[_0x3f7db0(0x209)](_0x3af95f=>{const _0x4ff42b=_0x3f7db0,_0x527a2f=new Set();_0x3af95f[_0x4ff42b(0x20f)](_0x4e8b49=>{const _0x406573=_0x4ff42b;switch(_0x4e8b49['type']){case _0x406573(0x1bc):{const _0x42b6df=_0x4e8b49[_0x406573(0x1b5)]['personId'];_0x527a2f[_0x406573(0x1bc)](_0x42b6df);break;}}}),_0x59a2e5(this[_0x4ff42b(0x1c1)],_0x527a2f);}));}[_0x15bd47(0x1f5)](){const _0xf0adff=_0x15bd47;this[_0xf0adff(0x20c)](this[_0xf0adff(0x1f2)]['commentUpdate$']['subscribe'](async _0x1dee6e=>{const _0x118155=_0xf0adff;var _0x4302cc,_0x1edb28,_0x56c94b,_0x2f5776;const _0x2ee505=(_0x4302cc=this[_0x118155(0x1dd)][_0x118155(0x1eb)](_0x1dee6e[_0x118155(0x202)])['find'](_0x19e17f=>_0x19e17f[_0x118155(0x1e7)]===_0x1dee6e[_0x118155(0x1e7)]))==null?void 0x0:_0x4302cc['root'];if(!_0x2ee505)return;const {unitId:_0x3de618,subUnitId:_0x27f30a}=_0x2ee505;switch(_0x1dee6e[_0x118155(0x1c0)]&&this[_0x118155(0x1b3)][_0x118155(0x1c2)](_0x1dee6e[_0x118155(0x1c0)]),_0x1dee6e[_0x118155(0x219)]){case _0x3283b7[_0x118155(0x1aa)]:break;case _0x3283b7[_0x118155(0x20e)]:{this['_threadCommentModel'][_0x118155(0x215)](_0x3de618,_0x27f30a,{'unitId':_0x3de618,'subUnitId':_0x27f30a,'ref':'','id':_0x1dee6e[_0x118155(0x1df)],'dT':_0x3ac07d(+_0x1dee6e[_0x118155(0x1af)]),'threadId':_0x1dee6e[_0x118155(0x1e7)],'personId':(_0x56c94b=(_0x1edb28=_0x1dee6e['user'])==null?void 0x0:_0x1edb28[_0x118155(0x222)])!=null?_0x56c94b:_0x1dee6e[_0x118155(0x1b8)],'text':JSON[_0x118155(0x1fd)](_0x1dee6e[_0x118155(0x1e8)]),'parentId':_0x2ee505['id']});break;}case _0x3283b7['Delete']:{const _0x404d7c=this['_threadCommentModel'][_0x118155(0x208)](_0x3de618,_0x27f30a,_0x1dee6e[_0x118155(0x1df)]);_0x404d7c&&_0x404d7c[_0x118155(0x1cb)]&&this[_0x118155(0x1dd)]['deleteComment'](_0x3de618,_0x27f30a,_0x1dee6e[_0x118155(0x1df)]);break;}case _0x3283b7[_0x118155(0x1bb)]:{this[_0x118155(0x1dd)][_0x118155(0x1d7)](_0x3de618,_0x27f30a,{'commentId':_0x1dee6e[_0x118155(0x1df)],'text':JSON[_0x118155(0x1fd)](_0x1dee6e[_0x118155(0x1e8)])});break;}case _0x3283b7[_0x118155(0x1f8)]:{const _0x1d97b9=(_0x2f5776=this['_threadCommentModel'][_0x118155(0x1eb)](_0x1dee6e[_0x118155(0x202)])[_0x118155(0x1d6)](_0x607583=>_0x607583['threadId']===_0x1dee6e['threadId']))==null?void 0x0:_0x2f5776[_0x118155(0x212)];_0x1d97b9&&this[_0x118155(0x1dd)]['resolveComment'](_0x3de618,_0x27f30a,_0x1d97b9['id'],_0x1dee6e[_0x118155(0x22a)]===_0x3f0710[_0x118155(0x1cd)]);break;}}}));}};_0x208812=_0x3eaf2e([_0x486313(0x0,_0x40565c[_0x15bd47(0x1c6)](_0xa6c00e['CommentService'])),_0x486313(0x1,_0x40565c[_0x15bd47(0x1c6)](_0x2e46d8[_0x15bd47(0x1e1)])),_0x486313(0x2,_0x40565c['Inject'](_0x40565c[_0x15bd47(0x1cf)])),_0x486313(0x3,_0x40565c['Inject'](_0x40565c['Injector']))],_0x208812);const _0x2ef742=_0x15bd47(0x1ec),_0x5b7dbe={};var _0x16054b=Object[_0x15bd47(0x201)],_0x4e4a4a=(_0x1df027,_0x348bfe,_0x2061a1,_0x21976c)=>{const _0x5ec660=_0x15bd47;for(var _0xd7e007=_0x21976c>0x1?void 0x0:_0x21976c?_0x16054b(_0x348bfe,_0x2061a1):_0x348bfe,_0x146511=_0x1df027[_0x5ec660(0x1ba)]-0x1,_0xb67e1a;_0x146511>=0x0;_0x146511--)(_0xb67e1a=_0x1df027[_0x146511])&&(_0xd7e007=_0xb67e1a(_0xd7e007)||_0xd7e007);return _0xd7e007;},_0x18c4cc=(_0x52f0d2,_0x27fc72)=>(_0x15e24f,_0x3e49af)=>_0x27fc72(_0x15e24f,_0x3e49af,_0x52f0d2);function _0x33a584(_0x3167bd,_0x47371d){const _0x27901f=_0x15bd47,_0x24d3db=_0x3167bd[_0x27901f(0x216)][0x0];return{..._0x47371d,'id':_0x24d3db[_0x27901f(0x1df)],'resolved':_0x3167bd[_0x27901f(0x22a)]===0x1,'dT':_0x3ac07d(_0x24d3db[_0x27901f(0x1af)]),'personId':_0x24d3db[_0x27901f(0x1b8)],'threadId':_0x24d3db['threadId']};}function _0x41d4cc(_0x495836,_0x80e79f,_0x76e95b){const _0x5d18c1=_0x15bd47;var _0x16540a,_0x568556;if(((_0x568556=(_0x16540a=_0x495836==null?void 0x0:_0x495836[_0x5d18c1(0x216)])==null?void 0x0:_0x16540a[_0x5d18c1(0x1ba)])!=null?_0x568556:0x0)>0x0){const _0x4e9afb=(_0x21f9a8,_0x32bcb6)=>({'id':_0x21f9a8[_0x5d18c1(0x1df)],'threadId':_0x21f9a8[_0x5d18c1(0x1e7)],'dT':_0x3ac07d(_0x21f9a8[_0x5d18c1(0x1af)]),'personId':_0x21f9a8[_0x5d18c1(0x1b8)],'resolved':_0x495836[_0x5d18c1(0x22a)]===_0x3f0710[_0x5d18c1(0x1cd)],'unitId':_0x80e79f,'subUnitId':_0x76e95b,'text':JSON[_0x5d18c1(0x1fd)](_0x21f9a8['content']),'parentId':_0x32bcb6}),_0x3a1533=_0x4e9afb(_0x495836[_0x5d18c1(0x216)][0x0]);return{..._0x3a1533,'children':_0x495836[_0x5d18c1(0x216)][_0x5d18c1(0x21e)](0x1)[_0x5d18c1(0x21f)](_0x5f4b27=>_0x4e9afb(_0x5f4b27,_0x3a1533['id']))};}return null;}let _0x58f14a=class{constructor(_0x784b80,_0x51440d,_0x243d33,_0x5039a9){const _0x1149ec=_0x15bd47;this['_httpService']=_0x784b80,this[_0x1149ec(0x1b3)]=_0x51440d,this[_0x1149ec(0x21b)]=_0x243d33,this[_0x1149ec(0x1c1)]=_0x5039a9;}async[_0x15bd47(0x215)](_0x3c7fac){const _0x57ecdc=_0x15bd47;var _0x234f6f,_0x52eaf0;const {parentId:_0x31c52e,unitId:_0x393195,text:_0x253e3c,threadId:_0x15b91e}=_0x3c7fac,_0xe63c68=(_0x52eaf0=(_0x234f6f=_0x253e3c[_0x57ecdc(0x224)])==null?void 0x0:_0x234f6f[_0x57ecdc(0x1d2)](_0x3b3fb3=>_0x3b3fb3[_0x57ecdc(0x1ef)]===_0x40565c[_0x57ecdc(0x1ab)][_0x57ecdc(0x1f7)])[_0x57ecdc(0x21f)](_0x50dc89=>_0x50dc89['rangeId']))!=null?_0x52eaf0:[],_0x151e7a=JSON[_0x57ecdc(0x1fb)](_0x253e3c),_0x51dca9=(await this[_0x57ecdc(0x21b)][_0x57ecdc(0x1b0)](_0x393195))['getMemberID']();if(_0x31c52e){const _0x148ffc={'memberId':_0x51dca9,'unitId':_0x393195,'content':_0x151e7a,'mention':_0xe63c68,'threadId':_0x15b91e},_0x5ee446=(await this[_0x57ecdc(0x203)][_0x57ecdc(0x1e6)]('/universer-api/comment/unit/'+_0x393195+_0x57ecdc(0x1f0),{'body':_0x148ffc}))[_0x57ecdc(0x1ca)][_0x57ecdc(0x1ce)];return{..._0x3c7fac,'id':_0x5ee446[_0x57ecdc(0x1df)],'dT':_0x40565c[_0x57ecdc(0x1d0)](+_0x5ee446['createTimestamp'])[_0x57ecdc(0x211)](_0x57ecdc(0x1ff)),'personId':_0x5ee446[_0x57ecdc(0x1b8)]};}else{const _0x2c86bd={'memberId':_0x51dca9,'unitId':_0x393195,'content':_0x151e7a,'mention':_0xe63c68},_0x3fb94b=await this[_0x57ecdc(0x203)][_0x57ecdc(0x1e6)](_0x57ecdc(0x1f9)+_0x393195+'/add',{'body':_0x2c86bd});return _0x33a584(_0x3fb94b[_0x57ecdc(0x1ca)][_0x57ecdc(0x1bd)],_0x3c7fac);}}async[_0x15bd47(0x1d7)](_0x43014e){const _0xe1f46a=_0x15bd47;var _0x3e2630,_0x408025;const {text:_0x1b43ab,unitId:_0x2c2522}=_0x43014e,_0x4dd532=(_0x408025=(_0x3e2630=_0x1b43ab[_0xe1f46a(0x224)])==null?void 0x0:_0x3e2630[_0xe1f46a(0x1d2)](_0x5a3144=>_0x5a3144['rangeType']===_0x40565c[_0xe1f46a(0x1ab)][_0xe1f46a(0x1f7)])['map'](_0x4a102b=>_0x4a102b[_0xe1f46a(0x1d4)]))!=null?_0x408025:[],_0x58f1e1=JSON[_0xe1f46a(0x1fb)](_0x1b43ab),_0x217bc5=_0x43014e[_0xe1f46a(0x1e7)],_0x5687fe=_0x43014e['id'],_0x1a2530={'memberId':(await this['_sessionService'][_0xe1f46a(0x1b0)](_0x2c2522))[_0xe1f46a(0x1e5)](),'unitId':_0x2c2522,'threadId':_0x217bc5,'mention':_0x4dd532,'content':_0x58f1e1,'replyId':_0x5687fe},_0x4df379=await this[_0xe1f46a(0x203)][_0xe1f46a(0x1e6)](_0xe1f46a(0x1f9)+_0x2c2522+'/edit',{'body':_0x1a2530});return!_0x4df379[_0xe1f46a(0x1ca)][_0xe1f46a(0x1f1)]||_0x4df379[_0xe1f46a(0x1ca)][_0xe1f46a(0x1f1)][_0xe1f46a(0x1e9)]===0x1;}async[_0x15bd47(0x1d8)](_0x217ab9){const _0x2c06af=_0x15bd47,{unitId:_0x76e4b9}=_0x217ab9,_0xc3b3ab=_0x217ab9[_0x2c06af(0x1e7)],_0x185fd3={'memberId':this['_userService']['getCurrentUser']()[_0x2c06af(0x222)],'unitId':_0x76e4b9,'threadId':_0xc3b3ab,'solved':_0x217ab9[_0x2c06af(0x1e4)]?_0x3f0710[_0x2c06af(0x1cd)]:_0x3f0710['OpenOrReOpen']},_0x172a24=await this['_httpService'][_0x2c06af(0x1e6)](_0x2c06af(0x1f9)+_0x76e4b9+_0x2c06af(0x1c8),{'body':_0x185fd3});return!_0x172a24[_0x2c06af(0x1ca)]['error']||_0x172a24[_0x2c06af(0x1ca)][_0x2c06af(0x1f1)][_0x2c06af(0x1e9)]===0x1;}async['deleteComment'](_0x53d197,_0x10f5ae,_0x3d3d7a,_0xd5811){const _0x76db7f=_0x15bd47,_0x4a4931={'memberId':(await this[_0x76db7f(0x21b)][_0x76db7f(0x1b0)](_0x53d197))['getMemberID'](),'threadId':_0x3d3d7a,'replyId':_0xd5811,'unitId':_0x53d197},_0x690f07=await this[_0x76db7f(0x203)][_0x76db7f(0x1e6)](_0x76db7f(0x1f9)+_0x53d197+_0x76db7f(0x1a9),{'body':_0x4a4931});return!_0x690f07[_0x76db7f(0x1ca)]['error']||_0x690f07[_0x76db7f(0x1ca)]['error'][_0x76db7f(0x1e9)]===0x1;}async[_0x15bd47(0x1de)](_0x4bd754,_0x558d7b,_0x170c4f){const _0x96bc73=_0x15bd47,_0x19150e={'unitId':_0x4bd754,'threadId':_0x170c4f},_0x26dfef=await this[_0x96bc73(0x203)]['post'](_0x96bc73(0x1f9)+_0x4bd754+'/list',{'body':_0x19150e}),_0x4c9f08=_0x170c4f[_0x96bc73(0x21f)](_0x1e6d2f=>_0x41d4cc(_0x26dfef['body'][_0x96bc73(0x1ac)][_0x1e6d2f],_0x4bd754,_0x558d7b))[_0x96bc73(0x1d2)](Boolean);return Object['values'](_0x26dfef[_0x96bc73(0x1ca)][_0x96bc73(0x1ae)])[_0x96bc73(0x20f)](_0xc1f1bb=>{const _0x26f884=_0x96bc73;this[_0x26f884(0x1b3)]['addUser'](_0xc1f1bb);}),_0x4c9f08;}[_0x15bd47(0x221)](_0x10a60c){const _0x264c8f=_0x15bd47;return{'id':_0x10a60c['id'],'threadId':_0x10a60c[_0x264c8f(0x1e7)],'ref':_0x10a60c[_0x264c8f(0x1cc)]};}};_0x58f14a=_0x4e4a4a([_0x18c4cc(0x0,_0x40565c[_0x15bd47(0x1c6)](_0x126f1a[_0x15bd47(0x1e0)])),_0x18c4cc(0x1,_0x40565c[_0x15bd47(0x1c6)](_0x40565c['UserManagerService'])),_0x18c4cc(0x2,_0x40565c['Inject'](_0xa6c00e['CollaborationSessionService'])),_0x18c4cc(0x3,_0x40565c[_0x15bd47(0x1c6)](_0x40565c[_0x15bd47(0x210)]))],_0x58f14a);var _0x5797ff=Object[_0x15bd47(0x201)],_0x19c1ed=(_0x8e2e44,_0x3202a2,_0xaff06d,_0x356c6b)=>{const _0x18c7c3=_0x15bd47;for(var _0x2f66fd=_0x356c6b>0x1?void 0x0:_0x356c6b?_0x5797ff(_0x3202a2,_0xaff06d):_0x3202a2,_0x3d7bd5=_0x8e2e44[_0x18c7c3(0x1ba)]-0x1,_0x32b694;_0x3d7bd5>=0x0;_0x3d7bd5--)(_0x32b694=_0x8e2e44[_0x3d7bd5])&&(_0x2f66fd=_0x32b694(_0x2f66fd)||_0x2f66fd);return _0x2f66fd;},_0x493d77=(_0x44509d,_0x3c787b)=>(_0x330b95,_0xac5553)=>_0x3c787b(_0x330b95,_0xac5553,_0x44509d);let _0x1b65e3=class extends _0x40565c[_0x15bd47(0x1f3)]{constructor(_0x1c4bc0,_0x11535f){const _0x55e2f9=_0x15bd47;super(),this[_0x55e2f9(0x1d9)]=_0x1c4bc0,this['_threadCommentDataSource']=_0x11535f,this['_initDataSource']();}[_0x15bd47(0x204)](){const _0x36f88a=_0x15bd47;this[_0x36f88a(0x1d9)][_0x36f88a(0x1c4)]=this['_threadCommentDataSource'],this[_0x36f88a(0x1d9)]['syncUpdateMutationToColla']=!0x1;}};_0x1b65e3=_0x19c1ed([_0x493d77(0x0,_0x2e46d8[_0x15bd47(0x1c5)]),_0x493d77(0x1,_0x40565c['Inject'](_0x58f14a))],_0x1b65e3);var _0xd596b3=Object[_0x15bd47(0x1b2)],_0xd06090=Object[_0x15bd47(0x201)],_0x1b074e=(_0x1ea63a,_0x1ae1aa,_0x256ea2)=>_0x1ae1aa in _0x1ea63a?_0xd596b3(_0x1ea63a,_0x1ae1aa,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x256ea2}):_0x1ea63a[_0x1ae1aa]=_0x256ea2,_0x4019ea=(_0x114d4f,_0x2821dd,_0x563095,_0x10c936)=>{for(var _0x299df3=_0x10c936>0x1?void 0x0:_0x10c936?_0xd06090(_0x2821dd,_0x563095):_0x2821dd,_0x52ac87=_0x114d4f['length']-0x1,_0x2fd152;_0x52ac87>=0x0;_0x52ac87--)(_0x2fd152=_0x114d4f[_0x52ac87])&&(_0x299df3=_0x2fd152(_0x299df3)||_0x299df3);return _0x299df3;},_0xde1a5c=(_0x466446,_0x37e845)=>(_0x44840f,_0x5b2dbf)=>_0x37e845(_0x44840f,_0x5b2dbf,_0x466446),_0x108fa6=(_0x4dbb3d,_0x5e4e86,_0x30adea)=>_0x1b074e(_0x4dbb3d,typeof _0x5e4e86!='symbol'?_0x5e4e86+'':_0x5e4e86,_0x30adea);_0x5708ee[_0x15bd47(0x21c)]=class extends _0x40565c[_0x15bd47(0x1e3)]{constructor(_0x29f5f9=_0x5b7dbe,_0x529e65,_0x4a63d3){const _0x5a9006=_0x15bd47;super(),this[_0x5a9006(0x217)]=_0x29f5f9,this[_0x5a9006(0x1c1)]=_0x529e65,this['_configService']=_0x4a63d3;const {..._0x3624ca}=_0x40565c[_0x5a9006(0x1ed)]({},_0x5b7dbe,this['_config']);this[_0x5a9006(0x226)][_0x5a9006(0x21d)](_0x2ef742,_0x3624ca);}['onStarting'](){const _0x4ff97f=_0x15bd47;[[_0x58f14a],[_0x1b65e3],[_0x208812]][_0x4ff97f(0x20f)](_0x306bb4=>{const _0x16d2bd=_0x4ff97f;this['_injector'][_0x16d2bd(0x1bc)](_0x306bb4);});}['onReady'](){const _0x484708=_0x15bd47;this[_0x484708(0x1c1)][_0x484708(0x1dc)](_0x1b65e3),this[_0x484708(0x1c1)][_0x484708(0x1dc)](_0x208812);}},_0x108fa6(_0x5708ee[_0x15bd47(0x21c)],'pluginName',_0x2ddd03),_0x108fa6(_0x5708ee[_0x15bd47(0x21c)],_0x15bd47(0x219),_0x40565c['UniverInstanceType'][_0x15bd47(0x1bf)]),_0x5708ee[_0x15bd47(0x21c)]=_0x4019ea([_0x40565c[_0x15bd47(0x1be)](_0x11e035[_0x15bd47(0x1ee)],_0xa6c00e['UniverCollaborationClientPlugin'],_0x3dcb7f[_0x15bd47(0x1b4)]),_0xde1a5c(0x1,_0x40565c[_0x15bd47(0x1c6)](_0x40565c['Injector'])),_0xde1a5c(0x2,_0x40565c['IConfigService'])],_0x5708ee[_0x15bd47(0x21c)]),Object[_0x15bd47(0x1b2)](_0x5708ee,Symbol[_0x15bd47(0x1e2)],{'value':'Module'});}));function _0x29cd(_0x28562f,_0x3105d0){const _0x2451c7=_0x2451();return _0x29cd=function(_0x29cd6d,_0x1f7480){_0x29cd6d=_0x29cd6d-0x1a9;let _0x10e19f=_0x2451c7[_0x29cd6d];return _0x10e19f;},_0x29cd(_0x28562f,_0x3105d0);}function _0x2451(){const _0x100484=['thread-comment-data-source.config','merge','UniverThreadCommentUIPlugin','rangeType','/reply','error','_commentService','Disposable','delete','_init','rxjs','COMMENT','Solve','/universer-api/comment/unit/','10732DTGpGl','stringify','@univerjs/thread-comment','parse','object','YYYY/MM/DD\x20HH:mm','690HIvytn','getOwnPropertyDescriptor','unitId','_httpService','_initDataSource','UniverThreadCommentUi','@univerjs-pro/license','OpenOrReOpen','getComment','subscribe','UniverThreadComment','commentUpdate$','disposeWithMe','amd','Reply','forEach','Injector','format','root','getUser','UniverNetwork','addComment','replies','_config','UNRECOGNIZED','type','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','_sessionService','UniverThreadCommentDataSourcePlugin','setConfig','slice','map','UniverProCollaborationClient','saveCommentToSnapshot','userID','@univerjs/thread-comment-ui','customRanges','6791288bKMxLc','_configService','856051TzECeo','2177100nQSMdW','5121ygdCBN','solved','/delete','Add','CustomRangeType','comments','bufferTime','users','createTimestamp','requireSession','6545154syKtVB','defineProperty','_userService','UniverLicensePlugin','payload','Delete','16DleDzf','userId','@univerjs/core','length','Edit','add','comment','DependentOn','UNIVER_UNKNOWN','user','_injector','addUser','@univerjs/network','dataSource','IThreadCommentDataSourceService','Inject','41950uKoEXY','/solved','Unknown','body','parentId','ref','Solved','reply','UserManagerService','dayjs','12618mNUxaH','filter','UniverProThreadCommentDatasource','rangeId','@univerjs-pro/collaboration-client','find','updateComment','resolveComment','_threadCommentDataSourceService','_initUserSync','UniverProLicense','get','_threadCommentModel','listComments','replyId','HTTPService','ThreadCommentModel','toStringTag','Plugin','resolved','getMemberID','post','threadId','content','code','exports','getUnit'];_0x2451=function(){return _0x100484;};return _0x2451();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.6.10-nightly.202504281607",
3
+ "version": "0.7.0-beta.0",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,20 +45,20 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.6.10-nightly.202504281607",
49
- "@univerjs/core": "0.6.10-nightly.202504281607",
50
- "@univerjs-pro/license": "0.6.10-nightly.202504281607",
48
+ "@univerjs-pro/collaboration-client": "0.7.0-beta.0",
49
+ "@univerjs/core": "0.7.0-beta.0",
50
+ "@univerjs/network": "0.7.0-beta.0",
51
+ "@univerjs-pro/license": "0.7.0-beta.0",
51
52
  "@univerjs/protocol": "0.1.46-alpha.3",
52
- "@univerjs/thread-comment": "0.6.10-nightly.202504281607",
53
- "@univerjs/network": "0.6.10-nightly.202504281607",
54
- "@univerjs/thread-comment-ui": "0.6.10-nightly.202504281607"
53
+ "@univerjs/thread-comment": "0.7.0-beta.0",
54
+ "@univerjs/thread-comment-ui": "0.7.0-beta.0"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "^7.8.1",
58
58
  "typescript": "^5.8.3",
59
59
  "vite": "^6.3.3",
60
60
  "vitest": "^3.1.2",
61
- "@univerjs-infra/shared": "0.6.10"
61
+ "@univerjs-infra/shared": "0.7.0-beta.0"
62
62
  },
63
63
  "scripts": {
64
64
  "test": "vitest run",