@univerjs-pro/thread-comment-datasource 0.9.2-nightly.202507141607 → 0.9.2-nightly.202507151607

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 _0x578bb1=_0x13f0;(function(_0x1d48e8,_0x2dae30){const _0x731f58=_0x13f0,_0x2a9654=_0x1d48e8();while(!![]){try{const _0x1ac6a8=parseInt(_0x731f58(0xe0))/0x1*(-parseInt(_0x731f58(0x13b))/0x2)+parseInt(_0x731f58(0xd7))/0x3+-parseInt(_0x731f58(0xe2))/0x4*(parseInt(_0x731f58(0xdb))/0x5)+parseInt(_0x731f58(0xd8))/0x6+-parseInt(_0x731f58(0xeb))/0x7+-parseInt(_0x731f58(0x139))/0x8+parseInt(_0x731f58(0xfe))/0x9;if(_0x1ac6a8===_0x2dae30)break;else _0x2a9654['push'](_0x2a9654['shift']());}catch(_0x613c90){_0x2a9654['push'](_0x2a9654['shift']());}}}(_0x3947,0x595f7));Object[_0x578bb1(0xd0)](exports,Symbol[_0x578bb1(0x101)],{'value':_0x578bb1(0xe4)});function _0x13f0(_0x5ee185,_0x2c0106){const _0x394744=_0x3947();return _0x13f0=function(_0x13f020,_0x1b6e18){_0x13f020=_0x13f020-0xce;let _0x23b677=_0x394744[_0x13f020];return _0x23b677;},_0x13f0(_0x5ee185,_0x2c0106);}const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),j=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require('@univerjs/network'),U=_0x578bb1(0x12e);var I=(_0x2fb288=>(_0x2fb288[_0x2fb288[_0x578bb1(0x13c)]=0x0]=_0x578bb1(0x13c),_0x2fb288[_0x2fb288[_0x578bb1(0xe7)]=0x1]='Solved',_0x2fb288[_0x2fb288['UNRECOGNIZED']=-0x1]=_0x578bb1(0x114),_0x2fb288))(I||{}),v=(_0x6e848d=>(_0x6e848d[_0x6e848d['Unknown']=0x0]=_0x578bb1(0x12c),_0x6e848d[_0x6e848d[_0x578bb1(0x11e)]=0x1]=_0x578bb1(0x11e),_0x6e848d[_0x6e848d[_0x578bb1(0xf4)]=0x2]=_0x578bb1(0xf4),_0x6e848d[_0x6e848d[_0x578bb1(0x12a)]=0x3]=_0x578bb1(0x12a),_0x6e848d[_0x6e848d[_0x578bb1(0xf6)]=0x4]='Delete',_0x6e848d[_0x6e848d[_0x578bb1(0xf8)]=0x5]='Solve',_0x6e848d[_0x6e848d[_0x578bb1(0x114)]=-0x1]=_0x578bb1(0x114),_0x6e848d))(v||{});const f=_0x498c96=>c[_0x578bb1(0x109)](new Date(+_0x498c96))[_0x578bb1(0xd5)](_0x578bb1(0x134)),R=async(_0x48b27e,_0x5a3a14)=>{const _0x688d23=_0x578bb1,_0x1cc799=_0x48b27e['get'](c['UserManagerService']),_0x8ba1ef=_0x48b27e[_0x688d23(0x104)](P[_0x688d23(0xd3)]);_0x5a3a14[_0x688d23(0x100)](_0x15b444=>{const _0x263354=_0x688d23;_0x1cc799[_0x263354(0x128)](_0x15b444)&&_0x5a3a14[_0x263354(0x11b)](_0x15b444);}),_0x5a3a14[_0x688d23(0xce)]&&(await _0x8ba1ef['get'](_0x688d23(0x132),{'params':{'userIDs':[..._0x5a3a14]}}))[_0x688d23(0x10b)][_0x688d23(0xf2)]['forEach'](_0x57c62a=>{_0x57c62a&&_0x1cc799['addUser'](_0x57c62a);});};var $=Object[_0x578bb1(0x123)],E=(_0x155166,_0x327ce3,_0x18f854,_0x462f5c)=>{for(var _0x17a43c=_0x462f5c>0x1?void 0x0:_0x462f5c?$(_0x327ce3,_0x18f854):_0x327ce3,_0x123289=_0x155166['length']-0x1,_0xdcec2c;_0x123289>=0x0;_0x123289--)(_0xdcec2c=_0x155166[_0x123289])&&(_0x17a43c=_0xdcec2c(_0x17a43c)||_0x17a43c);return _0x17a43c;},S=(_0x21b453,_0x56444c)=>(_0xb3a6f5,_0x363f77)=>_0x56444c(_0xb3a6f5,_0x363f77,_0x21b453);let p=class extends c[_0x578bb1(0xf9)]{constructor(_0x2b062a,_0x4e0a92,_0x4c4713,_0x5269f3){const _0x194adf=_0x578bb1;super(),this['_commentService']=_0x2b062a,this['_threadCommentModel']=_0x4e0a92,this[_0x194adf(0x110)]=_0x4c4713,this[_0x194adf(0x118)]=_0x5269f3,this[_0x194adf(0x137)](),this[_0x194adf(0xef)]();}[_0x578bb1(0xef)](){const _0x5b1e53=_0x578bb1;this['disposeWithMe'](this[_0x5b1e53(0xd6)][_0x5b1e53(0x140)][_0x5b1e53(0xfb)](w[_0x5b1e53(0x13d)](0x10))[_0x5b1e53(0xe1)](_0x384010=>{const _0x5060a0=_0x5b1e53,_0x2c5b57=new Set();_0x384010[_0x5060a0(0x100)](_0x93656f=>{const _0x4baa90=_0x5060a0;switch(_0x93656f['type']){case _0x4baa90(0xec):{const _0x406024=_0x93656f[_0x4baa90(0x102)][_0x4baa90(0xf7)];_0x2c5b57[_0x4baa90(0xec)](_0x406024);break;}}}),R(this[_0x5060a0(0x118)],_0x2c5b57);}));}['_init'](){const _0x169d35=_0x578bb1;this['disposeWithMe'](this[_0x169d35(0x111)][_0x169d35(0x140)][_0x169d35(0xe1)](async _0x3abc01=>{const _0x109d08=_0x169d35;var _0x55ad40,_0x17c590,_0x3a1704,_0x5eacdb;const _0x3fee23=(_0x55ad40=this[_0x109d08(0xd6)]['getUnit'](_0x3abc01[_0x109d08(0x124)])[_0x109d08(0xfc)](_0x3c70c3=>_0x3c70c3[_0x109d08(0x12b)]===_0x3abc01[_0x109d08(0x12b)]))==null?void 0x0:_0x55ad40[_0x109d08(0x142)];if(!_0x3fee23)return;const {unitId:_0x30edd3,subUnitId:_0x86d9b5}=_0x3fee23;switch(_0x3abc01[_0x109d08(0xd9)]&&this[_0x109d08(0x110)][_0x109d08(0xd4)](_0x3abc01[_0x109d08(0xd9)]),_0x3abc01[_0x109d08(0xf0)]){case v[_0x109d08(0x11e)]:break;case v[_0x109d08(0xf4)]:{this['_threadCommentModel'][_0x109d08(0x143)](_0x30edd3,_0x86d9b5,{'unitId':_0x30edd3,'subUnitId':_0x86d9b5,'ref':'','id':_0x3abc01[_0x109d08(0x107)],'dT':f(+_0x3abc01[_0x109d08(0xde)]),'threadId':_0x3abc01[_0x109d08(0x12b)],'personId':(_0x3a1704=(_0x17c590=_0x3abc01[_0x109d08(0xd9)])==null?void 0x0:_0x17c590[_0x109d08(0x127)])!=null?_0x3a1704:_0x3abc01[_0x109d08(0x105)],'text':JSON['parse'](_0x3abc01['content']),'parentId':_0x3fee23['id']});break;}case v['Delete']:{const _0xbab24b=this[_0x109d08(0xd6)][_0x109d08(0x112)](_0x30edd3,_0x86d9b5,_0x3abc01[_0x109d08(0x107)]);_0xbab24b&&_0xbab24b[_0x109d08(0x133)]&&this['_threadCommentModel']['deleteComment'](_0x30edd3,_0x86d9b5,_0x3abc01['replyId']);break;}case v[_0x109d08(0x12a)]:{this[_0x109d08(0xd6)]['updateComment'](_0x30edd3,_0x86d9b5,{'commentId':_0x3abc01['replyId'],'text':JSON['parse'](_0x3abc01[_0x109d08(0xea)])});break;}case v[_0x109d08(0xf8)]:{const _0x47962a=(_0x5eacdb=this[_0x109d08(0xd6)][_0x109d08(0x141)](_0x3abc01[_0x109d08(0x124)])['find'](_0x5dc24c=>_0x5dc24c[_0x109d08(0x12b)]===_0x3abc01[_0x109d08(0x12b)]))==null?void 0x0:_0x5eacdb[_0x109d08(0x142)];_0x47962a&&this[_0x109d08(0xd6)][_0x109d08(0x113)](_0x30edd3,_0x86d9b5,_0x47962a['id'],_0x3abc01[_0x109d08(0xed)]===I[_0x109d08(0xe7)]);break;}}}));}};p=E([S(0x0,c[_0x578bb1(0xff)](b['CommentService'])),S(0x1,c['Inject'](M[_0x578bb1(0x116)])),S(0x2,c[_0x578bb1(0xff)](c[_0x578bb1(0x10f)])),S(0x3,c['Inject'](c[_0x578bb1(0x13a)]))],p);const q='thread-comment-data-source.config',D={};var A=Object[_0x578bb1(0x123)],x=(_0x200c96,_0x281b29,_0x4442c7,_0x16e902)=>{const _0x3174cf=_0x578bb1;for(var _0x1d6ffd=_0x16e902>0x1?void 0x0:_0x16e902?A(_0x281b29,_0x4442c7):_0x281b29,_0x2af8b1=_0x200c96[_0x3174cf(0x119)]-0x1,_0x28cb2a;_0x2af8b1>=0x0;_0x2af8b1--)(_0x28cb2a=_0x200c96[_0x2af8b1])&&(_0x1d6ffd=_0x28cb2a(_0x1d6ffd)||_0x1d6ffd);return _0x1d6ffd;},_=(_0x52ff97,_0x2fb406)=>(_0x7f799a,_0x24220b)=>_0x2fb406(_0x7f799a,_0x24220b,_0x52ff97);function Y(_0x378310,_0x5b7ec1){const _0x3c0c3a=_0x578bb1,_0x545460=_0x378310['replies'][0x0];return{..._0x5b7ec1,'id':_0x545460[_0x3c0c3a(0x107)],'resolved':_0x378310['solved']===0x1,'dT':f(_0x545460[_0x3c0c3a(0xde)]),'personId':_0x545460[_0x3c0c3a(0x105)],'threadId':_0x545460['threadId']};}function G(_0x38f0e3,_0x90da3e,_0x355cb7){const _0x5ebfb3=_0x578bb1;var _0x4605fe,_0x1e2281;if(((_0x1e2281=(_0x4605fe=_0x38f0e3==null?void 0x0:_0x38f0e3[_0x5ebfb3(0x13e)])==null?void 0x0:_0x4605fe[_0x5ebfb3(0x119)])!=null?_0x1e2281:0x0)>0x0){const _0x1b6e4e=(_0x2d9b00,_0x32f732)=>({'id':_0x2d9b00[_0x5ebfb3(0x107)],'threadId':_0x2d9b00[_0x5ebfb3(0x12b)],'dT':f(_0x2d9b00[_0x5ebfb3(0xde)]),'personId':_0x2d9b00[_0x5ebfb3(0x105)],'resolved':_0x38f0e3['solved']===I[_0x5ebfb3(0xe7)],'unitId':_0x90da3e,'subUnitId':_0x355cb7,'text':JSON[_0x5ebfb3(0xfd)](_0x2d9b00[_0x5ebfb3(0xea)]),'parentId':_0x32f732}),_0x4133a2=_0x1b6e4e(_0x38f0e3[_0x5ebfb3(0x13e)][0x0]);return{..._0x4133a2,'children':_0x38f0e3['replies']['slice'](0x1)['map'](_0x208851=>_0x1b6e4e(_0x208851,_0x4133a2['id']))};}return null;}let g=class{constructor(_0xeeff8e,_0x5598a8,_0x57e966,_0x5c127c){const _0x1f38c0=_0x578bb1;this[_0x1f38c0(0xf3)]=_0xeeff8e,this[_0x1f38c0(0x110)]=_0x5598a8,this[_0x1f38c0(0x121)]=_0x57e966,this[_0x1f38c0(0x118)]=_0x5c127c;}async[_0x578bb1(0x143)](_0x5b65bf){const _0x42cad5=_0x578bb1;var _0x53cbdb,_0x4d8ff4;const {parentId:_0x17eda5,unitId:_0x2757d4,text:_0x5ecd4b,threadId:_0x1355d8}=_0x5b65bf,_0x2cfb2f=(_0x4d8ff4=(_0x53cbdb=_0x5ecd4b[_0x42cad5(0x10e)])==null?void 0x0:_0x53cbdb[_0x42cad5(0xe5)](_0x1052e9=>_0x1052e9[_0x42cad5(0x125)]===c['CustomRangeType'][_0x42cad5(0x126)])[_0x42cad5(0xdc)](_0x59a2c3=>_0x59a2c3[_0x42cad5(0xf5)]))!=null?_0x4d8ff4:[],_0x4825ac=JSON[_0x42cad5(0xe3)](_0x5ecd4b),_0x52c221=(await this['_sessionService']['requireSession'](_0x2757d4))[_0x42cad5(0xe8)]();if(_0x17eda5){const _0x31695a={'memberId':_0x52c221,'unitId':_0x2757d4,'content':_0x4825ac,'mention':_0x2cfb2f,'threadId':_0x1355d8},_0x18477c=(await this['_httpService'][_0x42cad5(0x11a)](_0x42cad5(0x129)+_0x2757d4+'/reply',{'body':_0x31695a}))[_0x42cad5(0x10b)][_0x42cad5(0x117)];return{..._0x5b65bf,'id':_0x18477c[_0x42cad5(0x107)],'dT':c['dayjs'](+_0x18477c[_0x42cad5(0xde)])['format'](_0x42cad5(0x134)),'personId':_0x18477c[_0x42cad5(0x105)]};}else{const _0x5ee5f2={'memberId':_0x52c221,'unitId':_0x2757d4,'content':_0x4825ac,'mention':_0x2cfb2f},_0x5297aa=await this['_httpService'][_0x42cad5(0x11a)](_0x42cad5(0x129)+_0x2757d4+'/add',{'body':_0x5ee5f2});return Y(_0x5297aa[_0x42cad5(0x10b)][_0x42cad5(0x12f)],_0x5b65bf);}}async[_0x578bb1(0x10a)](_0xf6cff9){const _0x1e9adb=_0x578bb1;var _0x753768,_0x19d626;const {text:_0x416e63,unitId:_0x180038}=_0xf6cff9,_0xf861ed=(_0x19d626=(_0x753768=_0x416e63['customRanges'])==null?void 0x0:_0x753768[_0x1e9adb(0xe5)](_0x2f816e=>_0x2f816e[_0x1e9adb(0x125)]===c['CustomRangeType'][_0x1e9adb(0x126)])[_0x1e9adb(0xdc)](_0x222dd5=>_0x222dd5[_0x1e9adb(0xf5)]))!=null?_0x19d626:[],_0x532efe=JSON[_0x1e9adb(0xe3)](_0x416e63),_0x313599=_0xf6cff9[_0x1e9adb(0x12b)],_0x22864e=_0xf6cff9['id'],_0x417632={'memberId':(await this['_sessionService']['requireSession'](_0x180038))['getMemberID'](),'unitId':_0x180038,'threadId':_0x313599,'mention':_0xf861ed,'content':_0x532efe,'replyId':_0x22864e},_0x256b42=await this[_0x1e9adb(0xf3)][_0x1e9adb(0x11a)]('/universer-api/comment/unit/'+_0x180038+_0x1e9adb(0x13f),{'body':_0x417632});return!_0x256b42[_0x1e9adb(0x10b)]['error']||_0x256b42[_0x1e9adb(0x10b)][_0x1e9adb(0xe6)][_0x1e9adb(0x103)]===0x1;}async[_0x578bb1(0x113)](_0x49d46c){const _0xed9479=_0x578bb1,{unitId:_0x55ce49}=_0x49d46c,_0xb03a99=_0x49d46c[_0xed9479(0x12b)],_0x31d4e0={'memberId':this[_0xed9479(0x110)]['getCurrentUser']()[_0xed9479(0x127)],'unitId':_0x55ce49,'threadId':_0xb03a99,'solved':_0x49d46c['resolved']?I[_0xed9479(0xe7)]:I[_0xed9479(0x13c)]},_0x40dde7=await this[_0xed9479(0xf3)]['post']('/universer-api/comment/unit/'+_0x55ce49+_0xed9479(0x131),{'body':_0x31d4e0});return!_0x40dde7[_0xed9479(0x10b)][_0xed9479(0xe6)]||_0x40dde7[_0xed9479(0x10b)]['error'][_0xed9479(0x103)]===0x1;}async[_0x578bb1(0xda)](_0x24acab,_0x2088a5,_0x4203d3,_0x549aee){const _0x5cb092=_0x578bb1,_0x718237={'memberId':(await this['_sessionService']['requireSession'](_0x24acab))[_0x5cb092(0xe8)](),'threadId':_0x4203d3,'replyId':_0x549aee,'unitId':_0x24acab},_0x55efb6=await this[_0x5cb092(0xf3)][_0x5cb092(0x11a)](_0x5cb092(0x129)+_0x24acab+_0x5cb092(0x10d),{'body':_0x718237});return!_0x55efb6[_0x5cb092(0x10b)][_0x5cb092(0xe6)]||_0x55efb6['body'][_0x5cb092(0xe6)][_0x5cb092(0x103)]===0x1;}async[_0x578bb1(0xe9)](_0x251e2c,_0x54a471,_0x482978){const _0x4bf591=_0x578bb1,_0x27f48c={'unitId':_0x251e2c,'threadId':_0x482978},_0x25dad7=await this[_0x4bf591(0xf3)][_0x4bf591(0x11a)](_0x4bf591(0x129)+_0x251e2c+_0x4bf591(0xd1),{'body':_0x27f48c}),_0x4cfe3c=_0x482978['map'](_0x4df21a=>G(_0x25dad7[_0x4bf591(0x10b)]['comments'][_0x4df21a],_0x251e2c,_0x54a471))['filter'](Boolean);return Object[_0x4bf591(0x12d)](_0x25dad7[_0x4bf591(0x10b)]['users'])[_0x4bf591(0x100)](_0x2ee4d7=>{const _0x46970f=_0x4bf591;this[_0x46970f(0x110)][_0x46970f(0xd4)](_0x2ee4d7);}),_0x4cfe3c;}[_0x578bb1(0x144)](_0x521b94){const _0x2fba6a=_0x578bb1;return{'id':_0x521b94['id'],'threadId':_0x521b94[_0x2fba6a(0x12b)],'ref':_0x521b94['ref']};}};g=x([_(0x0,c[_0x578bb1(0xff)](P[_0x578bb1(0xd3)])),_(0x1,c[_0x578bb1(0xff)](c[_0x578bb1(0x10f)])),_(0x2,c[_0x578bb1(0xff)](b[_0x578bb1(0x11d)])),_(0x3,c[_0x578bb1(0xff)](c[_0x578bb1(0x13a)]))],g);var H=Object[_0x578bb1(0x123)],J=(_0x3796a5,_0x204eee,_0x21d947,_0x4652ce)=>{const _0x1e17da=_0x578bb1;for(var _0x2bbe68=_0x4652ce>0x1?void 0x0:_0x4652ce?H(_0x204eee,_0x21d947):_0x204eee,_0x26d0ed=_0x3796a5[_0x1e17da(0x119)]-0x1,_0x192866;_0x26d0ed>=0x0;_0x26d0ed--)(_0x192866=_0x3796a5[_0x26d0ed])&&(_0x2bbe68=_0x192866(_0x2bbe68)||_0x2bbe68);return _0x2bbe68;},y=(_0x4acc96,_0x5329c2)=>(_0x285eaa,_0x9e56e3)=>_0x5329c2(_0x285eaa,_0x9e56e3,_0x4acc96);let C=class extends c[_0x578bb1(0xf9)]{constructor(_0x5462fe,_0x535a4b){const _0x409c79=_0x578bb1;super(),this['_threadCommentDataSourceService']=_0x5462fe,this[_0x409c79(0x10c)]=_0x535a4b,this[_0x409c79(0xf1)]();}[_0x578bb1(0xf1)](){const _0x4720a0=_0x578bb1;this[_0x4720a0(0xfa)][_0x4720a0(0x145)]=this[_0x4720a0(0x10c)],this[_0x4720a0(0xfa)][_0x4720a0(0x108)]=!0x1;}};C=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c[_0x578bb1(0xff)](g))],C);function _0x3947(){const _0x136394=['delete','UniverCollaborationClientPlugin','CollaborationSessionService','Add','UniverInstanceType','UniverThreadCommentDataSourcePlugin','_sessionService','symbol','getOwnPropertyDescriptor','unitId','rangeType','COMMENT','userID','getUser','/universer-api/comment/unit/','Edit','threadId','Unknown','values','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','comment','_configService','/solved','/universer-api/user/list','parentId','YYYY/MM/DD\x20HH:mm','pluginName','_config','_init','onStarting','4382336lDrHTF','Injector','286aPJqJZ','OpenOrReOpen','bufferTime','replies','/edit','commentUpdate$','getUnit','root','addComment','saveCommentToSnapshot','dataSource','size','DependentOn','defineProperty','/list','IConfigService','HTTPService','addUser','format','_threadCommentModel','1121769AuvVnG','397884FCjpzT','user','deleteComment','230145zaWqxN','map','setConfig','createTimestamp','Plugin','1267ZIKCGi','subscribe','44JgwQtH','stringify','Module','filter','error','Solved','getMemberID','listComments','content','2454767vRUbZJ','add','solved','merge','_initUserSync','type','_initDataSource','users','_httpService','Reply','rangeId','Delete','personId','Solve','Disposable','_threadCommentDataSourceService','pipe','find','parse','13606263mjAiFC','Inject','forEach','toStringTag','payload','code','get','userId','onReady','replyId','syncUpdateMutationToColla','dayjs','updateComment','body','_threadCommentDataSource','/delete','customRanges','UserManagerService','_userService','_commentService','getComment','resolveComment','UNRECOGNIZED','UNIVER_UNKNOWN','ThreadCommentModel','reply','_injector','length','post'];_0x3947=function(){return _0x136394;};return _0x3947();}var F=Object[_0x578bb1(0xd0)],L=Object['getOwnPropertyDescriptor'],Z=(_0x5added,_0x54995d,_0xbb03ae)=>_0x54995d in _0x5added?F(_0x5added,_0x54995d,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xbb03ae}):_0x5added[_0x54995d]=_0xbb03ae,W=(_0xe1d2fd,_0x2da2c2,_0x2bf0bd,_0x4e350b)=>{const _0x3e6a80=_0x578bb1;for(var _0x4312fd=_0x4e350b>0x1?void 0x0:_0x4e350b?L(_0x2da2c2,_0x2bf0bd):_0x2da2c2,_0x28a55b=_0xe1d2fd[_0x3e6a80(0x119)]-0x1,_0x58a034;_0x28a55b>=0x0;_0x28a55b--)(_0x58a034=_0xe1d2fd[_0x28a55b])&&(_0x4312fd=_0x58a034(_0x4312fd)||_0x4312fd);return _0x4312fd;},O=(_0x4fb63e,_0x418e42)=>(_0x4b9e25,_0xb1755d)=>_0x418e42(_0x4b9e25,_0xb1755d,_0x4fb63e),N=(_0xd39a58,_0xac40aa,_0x341336)=>Z(_0xd39a58,typeof _0xac40aa!=_0x578bb1(0x122)?_0xac40aa+'':_0xac40aa,_0x341336);exports[_0x578bb1(0x120)]=class extends c[_0x578bb1(0xdf)]{constructor(_0x2ae5aa=D,_0x292a8d,_0x4bcde5){const _0x2cf7da=_0x578bb1;super(),this[_0x2cf7da(0x136)]=_0x2ae5aa,this[_0x2cf7da(0x118)]=_0x292a8d,this[_0x2cf7da(0x130)]=_0x4bcde5;const {..._0x2e9243}=c[_0x2cf7da(0xee)]({},D,this[_0x2cf7da(0x136)]);this[_0x2cf7da(0x130)][_0x2cf7da(0xdd)](q,_0x2e9243);}[_0x578bb1(0x138)](){const _0x4c15cd=_0x578bb1;[[g],[C],[p]][_0x4c15cd(0x100)](_0x40b0c3=>{const _0x351788=_0x4c15cd;this[_0x351788(0x118)][_0x351788(0xec)](_0x40b0c3);});}[_0x578bb1(0x106)](){const _0x2481b2=_0x578bb1;this[_0x2481b2(0x118)][_0x2481b2(0x104)](C),this[_0x2481b2(0x118)][_0x2481b2(0x104)](p);}},N(exports[_0x578bb1(0x120)],_0x578bb1(0x135),U),N(exports[_0x578bb1(0x120)],_0x578bb1(0xf0),c[_0x578bb1(0x11f)][_0x578bb1(0x115)]),exports[_0x578bb1(0x120)]=W([c[_0x578bb1(0xcf)](j['UniverThreadCommentUIPlugin'],b[_0x578bb1(0x11c)],T['UniverLicensePlugin']),O(0x1,c[_0x578bb1(0xff)](c['Injector'])),O(0x2,c[_0x578bb1(0xd2)])],exports[_0x578bb1(0x120)]);
1
+ 'use strict';const _0x38cf71=_0xbe46;(function(_0x2ccc20,_0x11d3fd){const _0x1dc531=_0xbe46,_0x3b29af=_0x2ccc20();while(!![]){try{const _0x3ceb30=-parseInt(_0x1dc531(0x22d))/0x1+parseInt(_0x1dc531(0x239))/0x2+parseInt(_0x1dc531(0x23b))/0x3*(parseInt(_0x1dc531(0x20b))/0x4)+-parseInt(_0x1dc531(0x249))/0x5+parseInt(_0x1dc531(0x215))/0x6*(-parseInt(_0x1dc531(0x251))/0x7)+parseInt(_0x1dc531(0x242))/0x8*(parseInt(_0x1dc531(0x22a))/0x9)+parseInt(_0x1dc531(0x201))/0xa;if(_0x3ceb30===_0x11d3fd)break;else _0x3b29af['push'](_0x3b29af['shift']());}catch(_0xdd7cc1){_0x3b29af['push'](_0x3b29af['shift']());}}}(_0x471a,0x6f91f));Object['defineProperty'](exports,Symbol[_0x38cf71(0x255)],{'value':_0x38cf71(0x260)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),j=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),w=require('rxjs'),P=require('@univerjs/network'),U=_0x38cf71(0x268);var I=(_0x533055=>(_0x533055[_0x533055['OpenOrReOpen']=0x0]=_0x38cf71(0x227),_0x533055[_0x533055['Solved']=0x1]=_0x38cf71(0x212),_0x533055[_0x533055[_0x38cf71(0x1f3)]=-0x1]=_0x38cf71(0x1f3),_0x533055))(I||{}),v=(_0x5937ec=>(_0x5937ec[_0x5937ec[_0x38cf71(0x23a)]=0x0]=_0x38cf71(0x23a),_0x5937ec[_0x5937ec['Add']=0x1]=_0x38cf71(0x200),_0x5937ec[_0x5937ec[_0x38cf71(0x20f)]=0x2]=_0x38cf71(0x20f),_0x5937ec[_0x5937ec[_0x38cf71(0x258)]=0x3]=_0x38cf71(0x258),_0x5937ec[_0x5937ec[_0x38cf71(0x23e)]=0x4]=_0x38cf71(0x23e),_0x5937ec[_0x5937ec[_0x38cf71(0x23d)]=0x5]=_0x38cf71(0x23d),_0x5937ec[_0x5937ec[_0x38cf71(0x1f3)]=-0x1]=_0x38cf71(0x1f3),_0x5937ec))(v||{});const f=_0x34fbe9=>c[_0x38cf71(0x1f8)](new Date(+_0x34fbe9))['format'](_0x38cf71(0x25e)),R=async(_0xc02434,_0x26283f)=>{const _0x1382bc=_0x38cf71,_0x320f1a=_0xc02434[_0x1382bc(0x247)](c['UserManagerService']),_0x2392b8=_0xc02434[_0x1382bc(0x247)](P[_0x1382bc(0x1f5)]);_0x26283f[_0x1382bc(0x24f)](_0x682db8=>{const _0x32545e=_0x1382bc;_0x320f1a[_0x32545e(0x233)](_0x682db8)&&_0x26283f['delete'](_0x682db8);}),_0x26283f[_0x1382bc(0x1f4)]&&(await _0x2392b8['get'](_0x1382bc(0x21a),{'params':{'userIDs':[..._0x26283f]}}))['body'][_0x1382bc(0x211)][_0x1382bc(0x24f)](_0x945d38=>{const _0xbe284c=_0x1382bc;_0x945d38&&_0x320f1a[_0xbe284c(0x22c)](_0x945d38);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x1b4ee5,_0x12116d,_0x5a6854,_0x364e19)=>{for(var _0xe4a10c=_0x364e19>0x1?void 0x0:_0x364e19?$(_0x12116d,_0x5a6854):_0x12116d,_0x206f8=_0x1b4ee5['length']-0x1,_0x16a6bc;_0x206f8>=0x0;_0x206f8--)(_0x16a6bc=_0x1b4ee5[_0x206f8])&&(_0xe4a10c=_0x16a6bc(_0xe4a10c)||_0xe4a10c);return _0xe4a10c;},S=(_0x5f3911,_0x5a0ce6)=>(_0x2ea251,_0x28c609)=>_0x5a0ce6(_0x2ea251,_0x28c609,_0x5f3911);let p=class extends c[_0x38cf71(0x207)]{constructor(_0x320e1f,_0x23d909,_0x34844c,_0x1c84a1){const _0x377399=_0x38cf71;super(),this[_0x377399(0x24c)]=_0x320e1f,this[_0x377399(0x219)]=_0x23d909,this[_0x377399(0x263)]=_0x34844c,this[_0x377399(0x224)]=_0x1c84a1,this[_0x377399(0x20a)](),this[_0x377399(0x22f)]();}[_0x38cf71(0x22f)](){const _0x276017=_0x38cf71;this['disposeWithMe'](this[_0x276017(0x219)][_0x276017(0x248)][_0x276017(0x234)](w['bufferTime'](0x10))[_0x276017(0x216)](_0x3ea89b=>{const _0x51e929=_0x276017,_0xe52298=new Set();_0x3ea89b[_0x51e929(0x24f)](_0x70fd5d=>{const _0x3532e0=_0x51e929;switch(_0x70fd5d['type']){case _0x3532e0(0x267):{const _0x67c44b=_0x70fd5d[_0x3532e0(0x226)][_0x3532e0(0x202)];_0xe52298[_0x3532e0(0x267)](_0x67c44b);break;}}}),R(this[_0x51e929(0x224)],_0xe52298);}));}['_init'](){const _0x41d8f0=_0x38cf71;this[_0x41d8f0(0x243)](this[_0x41d8f0(0x24c)][_0x41d8f0(0x248)][_0x41d8f0(0x216)](async _0x59d78d=>{const _0x112de2=_0x41d8f0;var _0x32fc9e,_0x263229,_0x52cb7f,_0x39280a;const _0x2015d9=(_0x32fc9e=this[_0x112de2(0x219)][_0x112de2(0x225)](_0x59d78d['unitId'])[_0x112de2(0x232)](_0x2d0325=>_0x2d0325[_0x112de2(0x25b)]===_0x59d78d[_0x112de2(0x25b)]))==null?void 0x0:_0x32fc9e['root'];if(!_0x2015d9)return;const {unitId:_0x3ffbea,subUnitId:_0x38f303}=_0x2015d9;switch(_0x59d78d[_0x112de2(0x252)]&&this[_0x112de2(0x263)][_0x112de2(0x22c)](_0x59d78d[_0x112de2(0x252)]),_0x59d78d[_0x112de2(0x264)]){case v['Add']:break;case v['Reply']:{this[_0x112de2(0x219)][_0x112de2(0x230)](_0x3ffbea,_0x38f303,{'unitId':_0x3ffbea,'subUnitId':_0x38f303,'ref':'','id':_0x59d78d['replyId'],'dT':f(+_0x59d78d[_0x112de2(0x24b)]),'threadId':_0x59d78d[_0x112de2(0x25b)],'personId':(_0x52cb7f=(_0x263229=_0x59d78d['user'])==null?void 0x0:_0x263229[_0x112de2(0x21c)])!=null?_0x52cb7f:_0x59d78d[_0x112de2(0x1fd)],'text':JSON[_0x112de2(0x22b)](_0x59d78d['content']),'parentId':_0x2015d9['id']});break;}case v[_0x112de2(0x23e)]:{const _0x20702a=this[_0x112de2(0x219)]['getComment'](_0x3ffbea,_0x38f303,_0x59d78d['replyId']);_0x20702a&&_0x20702a[_0x112de2(0x253)]&&this[_0x112de2(0x219)][_0x112de2(0x23f)](_0x3ffbea,_0x38f303,_0x59d78d[_0x112de2(0x1fe)]);break;}case v[_0x112de2(0x258)]:{this[_0x112de2(0x219)][_0x112de2(0x24a)](_0x3ffbea,_0x38f303,{'commentId':_0x59d78d[_0x112de2(0x1fe)],'text':JSON[_0x112de2(0x22b)](_0x59d78d['content'])});break;}case v['Solve']:{const _0x1cca83=(_0x39280a=this[_0x112de2(0x219)][_0x112de2(0x225)](_0x59d78d[_0x112de2(0x266)])['find'](_0x52f581=>_0x52f581['threadId']===_0x59d78d[_0x112de2(0x25b)]))==null?void 0x0:_0x39280a['root'];_0x1cca83&&this[_0x112de2(0x219)][_0x112de2(0x250)](_0x3ffbea,_0x38f303,_0x1cca83['id'],_0x59d78d['solved']===I['Solved']);break;}}}));}};p=E([S(0x0,c[_0x38cf71(0x24d)](b[_0x38cf71(0x1fc)])),S(0x1,c[_0x38cf71(0x24d)](M['ThreadCommentModel'])),S(0x2,c[_0x38cf71(0x24d)](c[_0x38cf71(0x231)])),S(0x3,c[_0x38cf71(0x24d)](c['Injector']))],p);const q=_0x38cf71(0x25c),D={};var A=Object['getOwnPropertyDescriptor'],x=(_0x2a3409,_0x58297a,_0x50bfbb,_0x145843)=>{for(var _0xff3638=_0x145843>0x1?void 0x0:_0x145843?A(_0x58297a,_0x50bfbb):_0x58297a,_0x2a5843=_0x2a3409['length']-0x1,_0xf1f2bc;_0x2a5843>=0x0;_0x2a5843--)(_0xf1f2bc=_0x2a3409[_0x2a5843])&&(_0xff3638=_0xf1f2bc(_0xff3638)||_0xff3638);return _0xff3638;},_=(_0x5e2289,_0x8461a)=>(_0x27ccbc,_0x348fd8)=>_0x8461a(_0x27ccbc,_0x348fd8,_0x5e2289);function Y(_0x445b5e,_0x1e642a){const _0x186209=_0x38cf71,_0x31af47=_0x445b5e['replies'][0x0];return{..._0x1e642a,'id':_0x31af47['replyId'],'resolved':_0x445b5e[_0x186209(0x262)]===0x1,'dT':f(_0x31af47['createTimestamp']),'personId':_0x31af47[_0x186209(0x1fd)],'threadId':_0x31af47['threadId']};}function G(_0xefe291,_0x3839e1,_0x7de2c0){const _0x1b03f5=_0x38cf71;var _0x462264,_0x27b2b5;if(((_0x27b2b5=(_0x462264=_0xefe291==null?void 0x0:_0xefe291['replies'])==null?void 0x0:_0x462264[_0x1b03f5(0x235)])!=null?_0x27b2b5:0x0)>0x0){const _0x33f4d3=(_0x247c51,_0x5e8cb1)=>({'id':_0x247c51[_0x1b03f5(0x1fe)],'threadId':_0x247c51[_0x1b03f5(0x25b)],'dT':f(_0x247c51[_0x1b03f5(0x24b)]),'personId':_0x247c51[_0x1b03f5(0x1fd)],'resolved':_0xefe291[_0x1b03f5(0x262)]===I['Solved'],'unitId':_0x3839e1,'subUnitId':_0x7de2c0,'text':JSON['parse'](_0x247c51[_0x1b03f5(0x20d)]),'parentId':_0x5e8cb1}),_0x397c24=_0x33f4d3(_0xefe291[_0x1b03f5(0x21e)][0x0]);return{..._0x397c24,'children':_0xefe291[_0x1b03f5(0x21e)]['slice'](0x1)['map'](_0x327059=>_0x33f4d3(_0x327059,_0x397c24['id']))};}return null;}function _0xbe46(_0x5e0777,_0x1ada5f){const _0x471a55=_0x471a();return _0xbe46=function(_0xbe46d1,_0x1ae117){_0xbe46d1=_0xbe46d1-0x1f1;let _0x1017da=_0x471a55[_0xbe46d1];return _0x1017da;},_0xbe46(_0x5e0777,_0x1ada5f);}let g=class{constructor(_0x4e29f3,_0x3c9cfa,_0x27e758,_0x32473d){const _0x411ba8=_0x38cf71;this[_0x411ba8(0x1ff)]=_0x4e29f3,this[_0x411ba8(0x263)]=_0x3c9cfa,this['_sessionService']=_0x27e758,this[_0x411ba8(0x224)]=_0x32473d;}async[_0x38cf71(0x230)](_0x369935){const _0x42b082=_0x38cf71;var _0x1350b9,_0xfc5582;const {parentId:_0x2167e0,unitId:_0x35516c,text:_0x3310e8,threadId:_0x1690c9}=_0x369935,_0x1728d5=(_0xfc5582=(_0x1350b9=_0x3310e8[_0x42b082(0x209)])==null?void 0x0:_0x1350b9[_0x42b082(0x245)](_0x278812=>_0x278812[_0x42b082(0x214)]===c[_0x42b082(0x1f6)][_0x42b082(0x1f7)])[_0x42b082(0x1f2)](_0x14f23b=>_0x14f23b[_0x42b082(0x213)]))!=null?_0xfc5582:[],_0x498da9=JSON['stringify'](_0x3310e8),_0x3d3ded=(await this[_0x42b082(0x23c)][_0x42b082(0x20c)](_0x35516c))['getMemberID']();if(_0x2167e0){const _0x235681={'memberId':_0x3d3ded,'unitId':_0x35516c,'content':_0x498da9,'mention':_0x1728d5,'threadId':_0x1690c9},_0x4120a5=(await this[_0x42b082(0x1ff)][_0x42b082(0x256)](_0x42b082(0x21f)+_0x35516c+_0x42b082(0x244),{'body':_0x235681}))[_0x42b082(0x21d)][_0x42b082(0x21b)];return{..._0x369935,'id':_0x4120a5[_0x42b082(0x1fe)],'dT':c[_0x42b082(0x1f8)](+_0x4120a5[_0x42b082(0x24b)])['format'](_0x42b082(0x25e)),'personId':_0x4120a5[_0x42b082(0x1fd)]};}else{const _0x3dcee3={'memberId':_0x3d3ded,'unitId':_0x35516c,'content':_0x498da9,'mention':_0x1728d5},_0x2c01a5=await this['_httpService'][_0x42b082(0x256)](_0x42b082(0x21f)+_0x35516c+_0x42b082(0x257),{'body':_0x3dcee3});return Y(_0x2c01a5[_0x42b082(0x21d)][_0x42b082(0x246)],_0x369935);}}async[_0x38cf71(0x24a)](_0x58bf31){const _0x319bb3=_0x38cf71;var _0x3cf514,_0xd0fd93;const {text:_0x599fc5,unitId:_0x505184}=_0x58bf31,_0xe42af2=(_0xd0fd93=(_0x3cf514=_0x599fc5[_0x319bb3(0x209)])==null?void 0x0:_0x3cf514[_0x319bb3(0x245)](_0x36d598=>_0x36d598['rangeType']===c[_0x319bb3(0x1f6)][_0x319bb3(0x1f7)])[_0x319bb3(0x1f2)](_0x198f34=>_0x198f34[_0x319bb3(0x213)]))!=null?_0xd0fd93:[],_0xd92408=JSON[_0x319bb3(0x228)](_0x599fc5),_0x238c31=_0x58bf31[_0x319bb3(0x25b)],_0x354715=_0x58bf31['id'],_0x281b07={'memberId':(await this['_sessionService'][_0x319bb3(0x20c)](_0x505184))['getMemberID'](),'unitId':_0x505184,'threadId':_0x238c31,'mention':_0xe42af2,'content':_0xd92408,'replyId':_0x354715},_0x14f732=await this['_httpService'][_0x319bb3(0x256)]('/universer-api/comment/unit/'+_0x505184+'/edit',{'body':_0x281b07});return!_0x14f732[_0x319bb3(0x21d)][_0x319bb3(0x240)]||_0x14f732[_0x319bb3(0x21d)]['error']['code']===0x1;}async[_0x38cf71(0x250)](_0x13577c){const _0x535a5f=_0x38cf71,{unitId:_0x590850}=_0x13577c,_0xa9c6c2=_0x13577c[_0x535a5f(0x25b)],_0x11c5d6={'memberId':this[_0x535a5f(0x263)][_0x535a5f(0x222)]()[_0x535a5f(0x21c)],'unitId':_0x590850,'threadId':_0xa9c6c2,'solved':_0x13577c[_0x535a5f(0x261)]?I[_0x535a5f(0x212)]:I['OpenOrReOpen']},_0xb127f5=await this[_0x535a5f(0x1ff)][_0x535a5f(0x256)](_0x535a5f(0x21f)+_0x590850+_0x535a5f(0x22e),{'body':_0x11c5d6});return!_0xb127f5[_0x535a5f(0x21d)][_0x535a5f(0x240)]||_0xb127f5[_0x535a5f(0x21d)]['error'][_0x535a5f(0x238)]===0x1;}async[_0x38cf71(0x23f)](_0xd391bf,_0x50f7e2,_0x1733a3,_0x4171b7){const _0x483921=_0x38cf71,_0x21dd59={'memberId':(await this[_0x483921(0x23c)][_0x483921(0x20c)](_0xd391bf))['getMemberID'](),'threadId':_0x1733a3,'replyId':_0x4171b7,'unitId':_0xd391bf},_0x15d71a=await this['_httpService'][_0x483921(0x256)](_0x483921(0x21f)+_0xd391bf+_0x483921(0x236),{'body':_0x21dd59});return!_0x15d71a['body'][_0x483921(0x240)]||_0x15d71a[_0x483921(0x21d)][_0x483921(0x240)][_0x483921(0x238)]===0x1;}async[_0x38cf71(0x24e)](_0x12e28b,_0x2d9809,_0x2f7f3b){const _0x46dd27=_0x38cf71,_0x704b2b={'unitId':_0x12e28b,'threadId':_0x2f7f3b},_0x9b1c45=await this[_0x46dd27(0x1ff)]['post']('/universer-api/comment/unit/'+_0x12e28b+_0x46dd27(0x204),{'body':_0x704b2b}),_0x3e9029=_0x2f7f3b[_0x46dd27(0x1f2)](_0x508846=>G(_0x9b1c45[_0x46dd27(0x21d)]['comments'][_0x508846],_0x12e28b,_0x2d9809))[_0x46dd27(0x245)](Boolean);return Object[_0x46dd27(0x259)](_0x9b1c45[_0x46dd27(0x21d)][_0x46dd27(0x211)])['forEach'](_0xab8496=>{const _0x50ef25=_0x46dd27;this[_0x50ef25(0x263)][_0x50ef25(0x22c)](_0xab8496);}),_0x3e9029;}['saveCommentToSnapshot'](_0x1ec8b5){const _0x2eadf8=_0x38cf71;return{'id':_0x1ec8b5['id'],'threadId':_0x1ec8b5[_0x2eadf8(0x25b)],'ref':_0x1ec8b5[_0x2eadf8(0x1f1)]};}};g=x([_(0x0,c[_0x38cf71(0x24d)](P[_0x38cf71(0x1f5)])),_(0x1,c[_0x38cf71(0x24d)](c[_0x38cf71(0x231)])),_(0x2,c['Inject'](b[_0x38cf71(0x221)])),_(0x3,c[_0x38cf71(0x24d)](c[_0x38cf71(0x1fb)]))],g);var H=Object[_0x38cf71(0x25d)],J=(_0x37e67e,_0x25d995,_0x43ae40,_0x1eb05e)=>{const _0x26cb6b=_0x38cf71;for(var _0x50fffc=_0x1eb05e>0x1?void 0x0:_0x1eb05e?H(_0x25d995,_0x43ae40):_0x25d995,_0x211658=_0x37e67e[_0x26cb6b(0x235)]-0x1,_0x2e751c;_0x211658>=0x0;_0x211658--)(_0x2e751c=_0x37e67e[_0x211658])&&(_0x50fffc=_0x2e751c(_0x50fffc)||_0x50fffc);return _0x50fffc;},y=(_0x4c2564,_0x5f1d23)=>(_0x3f9419,_0x1fd8b2)=>_0x5f1d23(_0x3f9419,_0x1fd8b2,_0x4c2564);let C=class extends c[_0x38cf71(0x207)]{constructor(_0x38cbdc,_0x182e9c){const _0x1dbdbe=_0x38cf71;super(),this['_threadCommentDataSourceService']=_0x38cbdc,this[_0x1dbdbe(0x229)]=_0x182e9c,this[_0x1dbdbe(0x241)]();}[_0x38cf71(0x241)](){const _0x87c0c0=_0x38cf71;this[_0x87c0c0(0x223)][_0x87c0c0(0x220)]=this[_0x87c0c0(0x229)],this[_0x87c0c0(0x223)][_0x87c0c0(0x25f)]=!0x1;}};C=J([y(0x0,M[_0x38cf71(0x1f9)]),y(0x1,c['Inject'](g))],C);var F=Object[_0x38cf71(0x254)],L=Object[_0x38cf71(0x25d)],Z=(_0x4ecabd,_0x527837,_0x5a8e8c)=>_0x527837 in _0x4ecabd?F(_0x4ecabd,_0x527837,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5a8e8c}):_0x4ecabd[_0x527837]=_0x5a8e8c,W=(_0x131d6a,_0x30782f,_0x56155b,_0x2562e4)=>{for(var _0x19fd61=_0x2562e4>0x1?void 0x0:_0x2562e4?L(_0x30782f,_0x56155b):_0x30782f,_0x2c66ec=_0x131d6a['length']-0x1,_0x45be89;_0x2c66ec>=0x0;_0x2c66ec--)(_0x45be89=_0x131d6a[_0x2c66ec])&&(_0x19fd61=_0x45be89(_0x19fd61)||_0x19fd61);return _0x19fd61;},O=(_0x3757d8,_0x50a102)=>(_0xdc49e6,_0x2440d7)=>_0x50a102(_0xdc49e6,_0x2440d7,_0x3757d8),N=(_0x5499f3,_0x111cae,_0x4b78ba)=>Z(_0x5499f3,typeof _0x111cae!='symbol'?_0x111cae+'':_0x111cae,_0x4b78ba);exports[_0x38cf71(0x25a)]=class extends c[_0x38cf71(0x205)]{constructor(_0xbd1d88=D,_0x34efee,_0x545385){const _0x59505d=_0x38cf71;super(),this[_0x59505d(0x210)]=_0xbd1d88,this['_injector']=_0x34efee,this[_0x59505d(0x203)]=_0x545385;const {..._0x3c1e95}=c['merge']({},D,this[_0x59505d(0x210)]);this['_configService'][_0x59505d(0x265)](q,_0x3c1e95);}[_0x38cf71(0x208)](){const _0x2af158=_0x38cf71;[[g],[C],[p]][_0x2af158(0x24f)](_0x3b235a=>{const _0x3f9823=_0x2af158;this[_0x3f9823(0x224)][_0x3f9823(0x267)](_0x3b235a);});}[_0x38cf71(0x206)](){const _0x3b1f48=_0x38cf71;this[_0x3b1f48(0x224)][_0x3b1f48(0x247)](C),this[_0x3b1f48(0x224)][_0x3b1f48(0x247)](p);}},N(exports[_0x38cf71(0x25a)],_0x38cf71(0x217),U),N(exports[_0x38cf71(0x25a)],'type',c['UniverInstanceType'][_0x38cf71(0x20e)]),exports[_0x38cf71(0x25a)]=W([c['DependentOn'](j[_0x38cf71(0x218)],b[_0x38cf71(0x269)],T[_0x38cf71(0x237)]),O(0x1,c['Inject'](c['Injector'])),O(0x2,c[_0x38cf71(0x1fa)])],exports[_0x38cf71(0x25a)]);function _0x471a(){const _0x462e62=['_configService','/list','Plugin','onReady','Disposable','onStarting','customRanges','_init','368bUvyZW','requireSession','content','UNIVER_UNKNOWN','Reply','_config','users','Solved','rangeId','rangeType','1098zwZRyG','subscribe','pluginName','UniverThreadCommentUIPlugin','_threadCommentModel','/universer-api/user/list','reply','userID','body','replies','/universer-api/comment/unit/','dataSource','CollaborationSessionService','getCurrentUser','_threadCommentDataSourceService','_injector','getUnit','payload','OpenOrReOpen','stringify','_threadCommentDataSource','12240eujxuZ','parse','addUser','422005GcUGrP','/solved','_initUserSync','addComment','UserManagerService','find','getUser','pipe','length','/delete','UniverLicensePlugin','code','1790988anasjg','Unknown','13023gApdRJ','_sessionService','Solve','Delete','deleteComment','error','_initDataSource','1048hbaQoR','disposeWithMe','/reply','filter','comment','get','commentUpdate$','2822175GHbELb','updateComment','createTimestamp','_commentService','Inject','listComments','forEach','resolveComment','27867nyspuN','user','parentId','defineProperty','toStringTag','post','/add','Edit','values','UniverThreadCommentDataSourcePlugin','threadId','thread-comment-data-source.config','getOwnPropertyDescriptor','YYYY/MM/DD\x20HH:mm','syncUpdateMutationToColla','Module','resolved','solved','_userService','type','setConfig','unitId','add','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','UniverCollaborationClientPlugin','ref','map','UNRECOGNIZED','size','HTTPService','CustomRangeType','COMMENT','dayjs','IThreadCommentDataSourceService','IConfigService','Injector','CommentService','userId','replyId','_httpService','Add','6989280DJOiWP','personId'];_0x471a=function(){return _0x462e62;};return _0x471a();}
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x293706=_0x3c54;(function(_0x58e3e8,_0x200c12){const _0x338b0a=_0x3c54,_0x529f35=_0x58e3e8();while(!![]){try{const _0x4f0194=-parseInt(_0x338b0a(0xf5))/0x1*(parseInt(_0x338b0a(0x11d))/0x2)+-parseInt(_0x338b0a(0xc3))/0x3+-parseInt(_0x338b0a(0xe3))/0x4+parseInt(_0x338b0a(0x120))/0x5+parseInt(_0x338b0a(0xda))/0x6*(-parseInt(_0x338b0a(0x117))/0x7)+parseInt(_0x338b0a(0x101))/0x8+-parseInt(_0x338b0a(0xc9))/0x9*(-parseInt(_0x338b0a(0xea))/0xa);if(_0x4f0194===_0x200c12)break;else _0x529f35['push'](_0x529f35['shift']());}catch(_0xdb568a){_0x529f35['push'](_0x529f35['shift']());}}}(_0x2dbc,0xa2a09));import{CommentService as _0x4dcb6c,CollaborationSessionService as _0x40f849,UniverCollaborationClientPlugin as _0x320f56}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4b9823}from'@univerjs-pro/license';import{dayjs as _0x30b957,UserManagerService as _0x3196d5,Inject as _0x3bd5d5,Injector as _0x2dd791,Disposable as _0x3a5f25,CustomRangeType as _0x854669,UniverInstanceType as _0x58268d,DependentOn as _0x3479fe,IConfigService as _0x5d4364,Plugin as _0x287d2d,merge as _0x1aaaac}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x516425}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x48ead0,IThreadCommentDataSourceService as _0x2416c3}from'@univerjs/thread-comment';import{bufferTime as _0x2f2c97}from'rxjs';function _0x2dbc(){const _0x5ef8ce=['getUser','_injector','COMMENT','symbol','userID','2166764YwLVRy','Solve','getComment','_configService','_init','_initUserSync','pipe','510KyjSna','parse','thread-comment-data-source.config','_threadCommentModel','post','forEach','/reply','requireSession','defineProperty','getUnit','/solved','138231BwZRfT','resolved','rangeId','find','users','_initDataSource','/universer-api/comment/unit/','get','map','Unknown','subscribe','personId','5160968LzzNtC','/add','stringify','addComment','disposeWithMe','YYYY/MM/DD\x20HH:mm','OpenOrReOpen','_threadCommentDataSourceService','/universer-api/user/list','Solved','_config','createTimestamp','filter','payload','resolveComment','_sessionService','replies','length','user','/list','size','_userService','791287xrLqTp','body','replyId','_threadCommentDataSource','solved','delete','18NJHVyY','_httpService','error','6366260NvOmeL','deleteComment','code','Reply','threadId','customRanges','addUser','getCurrentUser','rangeType','1229106YULOFb','userId','ref','unitId','onStarting','listComments','186399RQDqKh','dataSource','slice','commentUpdate$','root','UNIVER_UNKNOWN','getMemberID','parentId','UNRECOGNIZED','_commentService','Edit','add','content','type','format','setConfig','Delete','6UVTtnX','updateComment','Add','getOwnPropertyDescriptor'];_0x2dbc=function(){return _0x5ef8ce;};return _0x2dbc();}import{HTTPService as _0x191dc9}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x5226b2=>(_0x5226b2[_0x5226b2[_0x293706(0x107)]=0x0]='OpenOrReOpen',_0x5226b2[_0x5226b2[_0x293706(0x10a)]=0x1]=_0x293706(0x10a),_0x5226b2[_0x5226b2[_0x293706(0xd1)]=-0x1]=_0x293706(0xd1),_0x5226b2))(I||{}),v=(_0x4dcd9d=>(_0x4dcd9d[_0x4dcd9d['Unknown']=0x0]=_0x293706(0xfe),_0x4dcd9d[_0x4dcd9d[_0x293706(0xdc)]=0x1]='Add',_0x4dcd9d[_0x4dcd9d['Reply']=0x2]=_0x293706(0x123),_0x4dcd9d[_0x4dcd9d['Edit']=0x3]='Edit',_0x4dcd9d[_0x4dcd9d[_0x293706(0xd9)]=0x4]=_0x293706(0xd9),_0x4dcd9d[_0x4dcd9d[_0x293706(0xe4)]=0x5]=_0x293706(0xe4),_0x4dcd9d[_0x4dcd9d[_0x293706(0xd1)]=-0x1]='UNRECOGNIZED',_0x4dcd9d))(v||{});const D=_0x4b7d74=>_0x30b957(new Date(+_0x4b7d74))[_0x293706(0xd7)](_0x293706(0x106)),B=async(_0x5a4b02,_0x1b7f1c)=>{const _0x72a905=_0x293706,_0x49ab71=_0x5a4b02[_0x72a905(0xfc)](_0x3196d5),_0x53d4b6=_0x5a4b02[_0x72a905(0xfc)](_0x191dc9);_0x1b7f1c[_0x72a905(0xef)](_0x51fa7=>{const _0x50a859=_0x72a905;_0x49ab71[_0x50a859(0xde)](_0x51fa7)&&_0x1b7f1c[_0x50a859(0x11c)](_0x51fa7);}),_0x1b7f1c[_0x72a905(0x115)]&&(await _0x53d4b6[_0x72a905(0xfc)](_0x72a905(0x109),{'params':{'userIDs':[..._0x1b7f1c]}}))[_0x72a905(0x118)][_0x72a905(0xf9)]['forEach'](_0x28d0e1=>{const _0x1821c5=_0x72a905;_0x28d0e1&&_0x49ab71[_0x1821c5(0xc0)](_0x28d0e1);});};var K=Object[_0x293706(0xdd)],V=(_0x30beea,_0x52fe5f,_0x5f5311,_0x5562ab)=>{for(var _0x381bab=_0x5562ab>0x1?void 0x0:_0x5562ab?K(_0x52fe5f,_0x5f5311):_0x52fe5f,_0x2e08b8=_0x30beea['length']-0x1,_0x933162;_0x2e08b8>=0x0;_0x2e08b8--)(_0x933162=_0x30beea[_0x2e08b8])&&(_0x381bab=_0x933162(_0x381bab)||_0x381bab);return _0x381bab;},p=(_0xa2a71a,_0x26af67)=>(_0x449bae,_0x32e695)=>_0x26af67(_0x449bae,_0x32e695,_0xa2a71a);let S=class extends _0x3a5f25{constructor(_0x453871,_0x928fe0,_0x51a3b6,_0x4f2b76){const _0x54d1d2=_0x293706;super(),this[_0x54d1d2(0xd2)]=_0x453871,this[_0x54d1d2(0xed)]=_0x928fe0,this['_userService']=_0x51a3b6,this[_0x54d1d2(0xdf)]=_0x4f2b76,this[_0x54d1d2(0xe7)](),this[_0x54d1d2(0xe8)]();}[_0x293706(0xe8)](){const _0x3abfd6=_0x293706;this['disposeWithMe'](this[_0x3abfd6(0xed)][_0x3abfd6(0xcc)][_0x3abfd6(0xe9)](_0x2f2c97(0x10))[_0x3abfd6(0xff)](_0x20520d=>{const _0x2057a1=_0x3abfd6,_0x119b7a=new Set();_0x20520d[_0x2057a1(0xef)](_0x1829b5=>{const _0x15ebe2=_0x2057a1;switch(_0x1829b5[_0x15ebe2(0xd6)]){case _0x15ebe2(0xd4):{const _0x4a0e07=_0x1829b5[_0x15ebe2(0x10e)][_0x15ebe2(0x100)];_0x119b7a[_0x15ebe2(0xd4)](_0x4a0e07);break;}}}),B(this[_0x2057a1(0xdf)],_0x119b7a);}));}[_0x293706(0xe7)](){const _0x2435b6=_0x293706;this[_0x2435b6(0x105)](this['_commentService'][_0x2435b6(0xcc)]['subscribe'](async _0x3c857f=>{const _0x37388a=_0x2435b6;var _0x3d71b4,_0x2252d6,_0x53c898,_0x192981;const _0x68ba12=(_0x3d71b4=this[_0x37388a(0xed)][_0x37388a(0xf3)](_0x3c857f[_0x37388a(0xc6)])[_0x37388a(0xf8)](_0xd54b6b=>_0xd54b6b['threadId']===_0x3c857f[_0x37388a(0xbe)]))==null?void 0x0:_0x3d71b4[_0x37388a(0xcd)];if(!_0x68ba12)return;const {unitId:_0x4f6342,subUnitId:_0x366811}=_0x68ba12;switch(_0x3c857f[_0x37388a(0x113)]&&this[_0x37388a(0x116)][_0x37388a(0xc0)](_0x3c857f[_0x37388a(0x113)]),_0x3c857f['type']){case v[_0x37388a(0xdc)]:break;case v[_0x37388a(0x123)]:{this[_0x37388a(0xed)][_0x37388a(0x104)](_0x4f6342,_0x366811,{'unitId':_0x4f6342,'subUnitId':_0x366811,'ref':'','id':_0x3c857f['replyId'],'dT':D(+_0x3c857f[_0x37388a(0x10c)]),'threadId':_0x3c857f[_0x37388a(0xbe)],'personId':(_0x53c898=(_0x2252d6=_0x3c857f['user'])==null?void 0x0:_0x2252d6[_0x37388a(0xe2)])!=null?_0x53c898:_0x3c857f[_0x37388a(0xc4)],'text':JSON[_0x37388a(0xeb)](_0x3c857f[_0x37388a(0xd5)]),'parentId':_0x68ba12['id']});break;}case v[_0x37388a(0xd9)]:{const _0x429ed6=this['_threadCommentModel'][_0x37388a(0xe5)](_0x4f6342,_0x366811,_0x3c857f[_0x37388a(0x119)]);_0x429ed6&&_0x429ed6[_0x37388a(0xd0)]&&this[_0x37388a(0xed)][_0x37388a(0x121)](_0x4f6342,_0x366811,_0x3c857f[_0x37388a(0x119)]);break;}case v[_0x37388a(0xd3)]:{this[_0x37388a(0xed)][_0x37388a(0xdb)](_0x4f6342,_0x366811,{'commentId':_0x3c857f['replyId'],'text':JSON['parse'](_0x3c857f['content'])});break;}case v[_0x37388a(0xe4)]:{const _0x17b09c=(_0x192981=this[_0x37388a(0xed)][_0x37388a(0xf3)](_0x3c857f['unitId'])['find'](_0x519117=>_0x519117['threadId']===_0x3c857f[_0x37388a(0xbe)]))==null?void 0x0:_0x192981['root'];_0x17b09c&&this[_0x37388a(0xed)][_0x37388a(0x10f)](_0x4f6342,_0x366811,_0x17b09c['id'],_0x3c857f['solved']===I[_0x37388a(0x10a)]);break;}}}));}};S=V([p(0x0,_0x3bd5d5(_0x4dcb6c)),p(0x1,_0x3bd5d5(_0x48ead0)),p(0x2,_0x3bd5d5(_0x3196d5)),p(0x3,_0x3bd5d5(_0x2dd791))],S);function _0x3c54(_0x57a76a,_0x1b7982){const _0x2dbc8d=_0x2dbc();return _0x3c54=function(_0x3c540a,_0xe454a5){_0x3c540a=_0x3c540a-0xbe;let _0x7feb65=_0x2dbc8d[_0x3c540a];return _0x7feb65;},_0x3c54(_0x57a76a,_0x1b7982);}const z=_0x293706(0xec),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x1632d7,_0x1e7ee6,_0x4a221e,_0xcf572b)=>{const _0x59e9ee=_0x293706;for(var _0x4f0bfe=_0xcf572b>0x1?void 0x0:_0xcf572b?k(_0x1e7ee6,_0x4a221e):_0x1e7ee6,_0x5ec4a4=_0x1632d7[_0x59e9ee(0x112)]-0x1,_0x552ed2;_0x5ec4a4>=0x0;_0x5ec4a4--)(_0x552ed2=_0x1632d7[_0x5ec4a4])&&(_0x4f0bfe=_0x552ed2(_0x4f0bfe)||_0x4f0bfe);return _0x4f0bfe;},_=(_0x1f6295,_0x4f1bf4)=>(_0x276c1d,_0x5662a0)=>_0x4f1bf4(_0x276c1d,_0x5662a0,_0x1f6295);function X(_0x44fe48,_0x49ae41){const _0x5979a5=_0x293706,_0x5b6387=_0x44fe48[_0x5979a5(0x111)][0x0];return{..._0x49ae41,'id':_0x5b6387[_0x5979a5(0x119)],'resolved':_0x44fe48[_0x5979a5(0x11b)]===0x1,'dT':D(_0x5b6387[_0x5979a5(0x10c)]),'personId':_0x5b6387[_0x5979a5(0xc4)],'threadId':_0x5b6387[_0x5979a5(0xbe)]};}function ee(_0x36997a,_0x4abe74,_0x10af6d){const _0x1fc04e=_0x293706;var _0x5b6ad5,_0x995892;if(((_0x995892=(_0x5b6ad5=_0x36997a==null?void 0x0:_0x36997a[_0x1fc04e(0x111)])==null?void 0x0:_0x5b6ad5[_0x1fc04e(0x112)])!=null?_0x995892:0x0)>0x0){const _0x1bc15d=(_0x5a1587,_0x3bbc06)=>({'id':_0x5a1587[_0x1fc04e(0x119)],'threadId':_0x5a1587[_0x1fc04e(0xbe)],'dT':D(_0x5a1587[_0x1fc04e(0x10c)]),'personId':_0x5a1587[_0x1fc04e(0xc4)],'resolved':_0x36997a[_0x1fc04e(0x11b)]===I[_0x1fc04e(0x10a)],'unitId':_0x4abe74,'subUnitId':_0x10af6d,'text':JSON[_0x1fc04e(0xeb)](_0x5a1587[_0x1fc04e(0xd5)]),'parentId':_0x3bbc06}),_0x518af1=_0x1bc15d(_0x36997a['replies'][0x0]);return{..._0x518af1,'children':_0x36997a[_0x1fc04e(0x111)][_0x1fc04e(0xcb)](0x1)[_0x1fc04e(0xfd)](_0x54dcf2=>_0x1bc15d(_0x54dcf2,_0x518af1['id']))};}return null;}let f=class{constructor(_0x7e778e,_0x1a4119,_0x3f6cd9,_0x4bc76d){const _0x3ec7f2=_0x293706;this[_0x3ec7f2(0x11e)]=_0x7e778e,this['_userService']=_0x1a4119,this[_0x3ec7f2(0x110)]=_0x3f6cd9,this[_0x3ec7f2(0xdf)]=_0x4bc76d;}async['addComment'](_0x2fd081){const _0x66793c=_0x293706;var _0x2deb51,_0x15d31f;const {parentId:_0x5c2f3e,unitId:_0x459a92,text:_0x465f02,threadId:_0x483851}=_0x2fd081,_0xc2ff04=(_0x15d31f=(_0x2deb51=_0x465f02[_0x66793c(0xbf)])==null?void 0x0:_0x2deb51[_0x66793c(0x10d)](_0x4349f0=>_0x4349f0[_0x66793c(0xc2)]===_0x854669[_0x66793c(0xe0)])['map'](_0xef9756=>_0xef9756[_0x66793c(0xf7)]))!=null?_0x15d31f:[],_0x4307da=JSON[_0x66793c(0x103)](_0x465f02),_0x3446c0=(await this['_sessionService']['requireSession'](_0x459a92))[_0x66793c(0xcf)]();if(_0x5c2f3e){const _0x5041b3={'memberId':_0x3446c0,'unitId':_0x459a92,'content':_0x4307da,'mention':_0xc2ff04,'threadId':_0x483851},_0x191a54=(await this['_httpService'][_0x66793c(0xee)](_0x66793c(0xfb)+_0x459a92+_0x66793c(0xf0),{'body':_0x5041b3}))[_0x66793c(0x118)]['reply'];return{..._0x2fd081,'id':_0x191a54[_0x66793c(0x119)],'dT':_0x30b957(+_0x191a54[_0x66793c(0x10c)])['format'](_0x66793c(0x106)),'personId':_0x191a54[_0x66793c(0xc4)]};}else{const _0x469b8c={'memberId':_0x3446c0,'unitId':_0x459a92,'content':_0x4307da,'mention':_0xc2ff04},_0x3b8a05=await this[_0x66793c(0x11e)][_0x66793c(0xee)](_0x66793c(0xfb)+_0x459a92+_0x66793c(0x102),{'body':_0x469b8c});return X(_0x3b8a05[_0x66793c(0x118)]['comment'],_0x2fd081);}}async[_0x293706(0xdb)](_0x4a15d9){const _0x32f301=_0x293706;var _0x115165,_0x5df503;const {text:_0x472bd7,unitId:_0x2d9b9a}=_0x4a15d9,_0x540cbd=(_0x5df503=(_0x115165=_0x472bd7[_0x32f301(0xbf)])==null?void 0x0:_0x115165[_0x32f301(0x10d)](_0x5ced11=>_0x5ced11[_0x32f301(0xc2)]===_0x854669['COMMENT'])[_0x32f301(0xfd)](_0x46d31c=>_0x46d31c[_0x32f301(0xf7)]))!=null?_0x5df503:[],_0x4311a2=JSON[_0x32f301(0x103)](_0x472bd7),_0x4ed214=_0x4a15d9[_0x32f301(0xbe)],_0x213e9d=_0x4a15d9['id'],_0x23982a={'memberId':(await this['_sessionService'][_0x32f301(0xf1)](_0x2d9b9a))[_0x32f301(0xcf)](),'unitId':_0x2d9b9a,'threadId':_0x4ed214,'mention':_0x540cbd,'content':_0x4311a2,'replyId':_0x213e9d},_0x553af4=await this[_0x32f301(0x11e)][_0x32f301(0xee)](_0x32f301(0xfb)+_0x2d9b9a+'/edit',{'body':_0x23982a});return!_0x553af4[_0x32f301(0x118)][_0x32f301(0x11f)]||_0x553af4[_0x32f301(0x118)][_0x32f301(0x11f)][_0x32f301(0x122)]===0x1;}async['resolveComment'](_0x79e56b){const _0x48961e=_0x293706,{unitId:_0x1cc0df}=_0x79e56b,_0x38c259=_0x79e56b[_0x48961e(0xbe)],_0x2f7f56={'memberId':this['_userService'][_0x48961e(0xc1)]()[_0x48961e(0xe2)],'unitId':_0x1cc0df,'threadId':_0x38c259,'solved':_0x79e56b[_0x48961e(0xf6)]?I[_0x48961e(0x10a)]:I[_0x48961e(0x107)]},_0x5733c4=await this[_0x48961e(0x11e)][_0x48961e(0xee)](_0x48961e(0xfb)+_0x1cc0df+_0x48961e(0xf4),{'body':_0x2f7f56});return!_0x5733c4[_0x48961e(0x118)][_0x48961e(0x11f)]||_0x5733c4[_0x48961e(0x118)]['error'][_0x48961e(0x122)]===0x1;}async[_0x293706(0x121)](_0x5d3ddc,_0x1b793d,_0x7149e8,_0x3014dc){const _0x3539ff=_0x293706,_0x1df114={'memberId':(await this[_0x3539ff(0x110)][_0x3539ff(0xf1)](_0x5d3ddc))[_0x3539ff(0xcf)](),'threadId':_0x7149e8,'replyId':_0x3014dc,'unitId':_0x5d3ddc},_0x17131b=await this[_0x3539ff(0x11e)]['post'](_0x3539ff(0xfb)+_0x5d3ddc+'/delete',{'body':_0x1df114});return!_0x17131b[_0x3539ff(0x118)][_0x3539ff(0x11f)]||_0x17131b[_0x3539ff(0x118)][_0x3539ff(0x11f)][_0x3539ff(0x122)]===0x1;}async[_0x293706(0xc8)](_0x57cc2c,_0x232977,_0x51e319){const _0x4de966=_0x293706,_0x43cfcb={'unitId':_0x57cc2c,'threadId':_0x51e319},_0x5b56db=await this[_0x4de966(0x11e)][_0x4de966(0xee)](_0x4de966(0xfb)+_0x57cc2c+_0x4de966(0x114),{'body':_0x43cfcb}),_0x2f5970=_0x51e319[_0x4de966(0xfd)](_0x26046a=>ee(_0x5b56db[_0x4de966(0x118)]['comments'][_0x26046a],_0x57cc2c,_0x232977))[_0x4de966(0x10d)](Boolean);return Object['values'](_0x5b56db['body'][_0x4de966(0xf9)])[_0x4de966(0xef)](_0x398273=>{const _0x1a32a8=_0x4de966;this['_userService'][_0x1a32a8(0xc0)](_0x398273);}),_0x2f5970;}['saveCommentToSnapshot'](_0x13ce20){const _0x2d335d=_0x293706;return{'id':_0x13ce20['id'],'threadId':_0x13ce20['threadId'],'ref':_0x13ce20[_0x2d335d(0xc5)]};}};f=Q([_(0x0,_0x3bd5d5(_0x191dc9)),_(0x1,_0x3bd5d5(_0x3196d5)),_(0x2,_0x3bd5d5(_0x40f849)),_(0x3,_0x3bd5d5(_0x2dd791))],f);var re=Object[_0x293706(0xdd)],te=(_0x1d4d36,_0x458372,_0x127bcc,_0x215438)=>{for(var _0x3e43a4=_0x215438>0x1?void 0x0:_0x215438?re(_0x458372,_0x127bcc):_0x458372,_0x5024d1=_0x1d4d36['length']-0x1,_0x331327;_0x5024d1>=0x0;_0x5024d1--)(_0x331327=_0x1d4d36[_0x5024d1])&&(_0x3e43a4=_0x331327(_0x3e43a4)||_0x3e43a4);return _0x3e43a4;},N=(_0x5af987,_0x2995d8)=>(_0x2ab013,_0x35438e)=>_0x2995d8(_0x2ab013,_0x35438e,_0x5af987);let g=class extends _0x3a5f25{constructor(_0x389787,_0x4a422f){const _0x3abbf6=_0x293706;super(),this[_0x3abbf6(0x108)]=_0x389787,this[_0x3abbf6(0x11a)]=_0x4a422f,this[_0x3abbf6(0xfa)]();}[_0x293706(0xfa)](){const _0x21025c=_0x293706;this[_0x21025c(0x108)][_0x21025c(0xca)]=this[_0x21025c(0x11a)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x2416c3),N(0x1,_0x3bd5d5(f))],g);var se=Object[_0x293706(0xf2)],oe=Object[_0x293706(0xdd)],ne=(_0x2ec168,_0x23c57f,_0x42682f)=>_0x23c57f in _0x2ec168?se(_0x2ec168,_0x23c57f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x42682f}):_0x2ec168[_0x23c57f]=_0x42682f,ie=(_0x4cf028,_0x2753b1,_0x3d6d11,_0x19366b)=>{const _0x406116=_0x293706;for(var _0x25c8ea=_0x19366b>0x1?void 0x0:_0x19366b?oe(_0x2753b1,_0x3d6d11):_0x2753b1,_0x4bcd37=_0x4cf028[_0x406116(0x112)]-0x1,_0x55881d;_0x4bcd37>=0x0;_0x4bcd37--)(_0x55881d=_0x4cf028[_0x4bcd37])&&(_0x25c8ea=_0x55881d(_0x25c8ea)||_0x25c8ea);return _0x25c8ea;},w=(_0x3d2689,_0x475db5)=>(_0x41e608,_0x1a0034)=>_0x475db5(_0x41e608,_0x1a0034,_0x3d2689),$=(_0x54a4df,_0x2291fc,_0x4f7cf8)=>ne(_0x54a4df,typeof _0x2291fc!=_0x293706(0xe1)?_0x2291fc+'':_0x2291fc,_0x4f7cf8);let b=class extends _0x287d2d{constructor(_0x318192=M,_0x711135,_0x51b8c5){const _0x1e7db9=_0x293706;super(),this[_0x1e7db9(0x10b)]=_0x318192,this[_0x1e7db9(0xdf)]=_0x711135,this[_0x1e7db9(0xe6)]=_0x51b8c5;const {..._0x137174}=_0x1aaaac({},M,this[_0x1e7db9(0x10b)]);this[_0x1e7db9(0xe6)][_0x1e7db9(0xd8)](z,_0x137174);}[_0x293706(0xc7)](){const _0x49c07d=_0x293706;[[f],[g],[S]][_0x49c07d(0xef)](_0x2dffec=>{const _0x1a4b13=_0x49c07d;this[_0x1a4b13(0xdf)][_0x1a4b13(0xd4)](_0x2dffec);});}['onReady'](){const _0x46faf1=_0x293706;this[_0x46faf1(0xdf)][_0x46faf1(0xfc)](g),this[_0x46faf1(0xdf)][_0x46faf1(0xfc)](S);}};$(b,'pluginName',W),$(b,_0x293706(0xd6),_0x58268d[_0x293706(0xce)]),b=ie([_0x3479fe(_0x516425,_0x320f56,_0x4b9823),w(0x1,_0x3bd5d5(_0x2dd791)),w(0x2,_0x5d4364)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ function _0x2b67(_0x2aefbe,_0x588d6f){const _0x559265=_0x5592();return _0x2b67=function(_0x2b67e1,_0xae60de){_0x2b67e1=_0x2b67e1-0x1d4;let _0x579e86=_0x559265[_0x2b67e1];return _0x579e86;},_0x2b67(_0x2aefbe,_0x588d6f);}const _0x275b95=_0x2b67;(function(_0x9479bb,_0x500c32){const _0x185372=_0x2b67,_0xd16a45=_0x9479bb();while(!![]){try{const _0x4d6f60=-parseInt(_0x185372(0x211))/0x1*(parseInt(_0x185372(0x1ea))/0x2)+-parseInt(_0x185372(0x224))/0x3+-parseInt(_0x185372(0x1dd))/0x4*(parseInt(_0x185372(0x227))/0x5)+parseInt(_0x185372(0x200))/0x6+parseInt(_0x185372(0x1fe))/0x7*(-parseInt(_0x185372(0x22e))/0x8)+-parseInt(_0x185372(0x1e3))/0x9+-parseInt(_0x185372(0x1ff))/0xa*(-parseInt(_0x185372(0x1d9))/0xb);if(_0x4d6f60===_0x500c32)break;else _0xd16a45['push'](_0xd16a45['shift']());}catch(_0x48112f){_0xd16a45['push'](_0xd16a45['shift']());}}}(_0x5592,0x5045d));import{CommentService as _0x4c6d8e,CollaborationSessionService as _0x528287,UniverCollaborationClientPlugin as _0x1b7631}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1b92c7}from'@univerjs-pro/license';import{dayjs as _0x9eacb9,UserManagerService as _0x3c6fd5,Inject as _0x33b5e2,Injector as _0x1950b2,Disposable as _0x2f3545,CustomRangeType as _0xacb558,UniverInstanceType as _0x4a5fef,DependentOn as _0x4301fe,IConfigService as _0x4ef3a8,Plugin as _0x5bf589,merge as _0x35101e}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x998630}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x1fa1fb,IThreadCommentDataSourceService as _0x1c0daa}from'@univerjs/thread-comment';import{bufferTime as _0x49b8b8}from'rxjs';import{HTTPService as _0x770764}from'@univerjs/network';const W=_0x275b95(0x225);var I=(_0x1d8b21=>(_0x1d8b21[_0x1d8b21[_0x275b95(0x226)]=0x0]=_0x275b95(0x226),_0x1d8b21[_0x1d8b21[_0x275b95(0x214)]=0x1]=_0x275b95(0x214),_0x1d8b21[_0x1d8b21[_0x275b95(0x1d4)]=-0x1]=_0x275b95(0x1d4),_0x1d8b21))(I||{}),v=(_0x2d17aa=>(_0x2d17aa[_0x2d17aa[_0x275b95(0x20f)]=0x0]='Unknown',_0x2d17aa[_0x2d17aa[_0x275b95(0x232)]=0x1]=_0x275b95(0x232),_0x2d17aa[_0x2d17aa[_0x275b95(0x1d8)]=0x2]=_0x275b95(0x1d8),_0x2d17aa[_0x2d17aa[_0x275b95(0x223)]=0x3]=_0x275b95(0x223),_0x2d17aa[_0x2d17aa[_0x275b95(0x1e4)]=0x4]=_0x275b95(0x1e4),_0x2d17aa[_0x2d17aa[_0x275b95(0x209)]=0x5]='Solve',_0x2d17aa[_0x2d17aa['UNRECOGNIZED']=-0x1]=_0x275b95(0x1d4),_0x2d17aa))(v||{});const D=_0x4f4d96=>_0x9eacb9(new Date(+_0x4f4d96))[_0x275b95(0x217)](_0x275b95(0x1f9)),B=async(_0x201528,_0x90313a)=>{const _0x398b34=_0x275b95,_0x26f22a=_0x201528[_0x398b34(0x212)](_0x3c6fd5),_0x2e69ad=_0x201528['get'](_0x770764);_0x90313a[_0x398b34(0x1e5)](_0xcffbd=>{const _0x236b65=_0x398b34;_0x26f22a[_0x236b65(0x20e)](_0xcffbd)&&_0x90313a[_0x236b65(0x20d)](_0xcffbd);}),_0x90313a[_0x398b34(0x1e0)]&&(await _0x2e69ad['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x90313a]}}))[_0x398b34(0x1f1)][_0x398b34(0x1ed)][_0x398b34(0x1e5)](_0x4fafcc=>{const _0x48b44d=_0x398b34;_0x4fafcc&&_0x26f22a[_0x48b44d(0x1df)](_0x4fafcc);});};var K=Object[_0x275b95(0x228)],V=(_0xf5cc96,_0x210b97,_0xa2e178,_0x5922da)=>{for(var _0x28489c=_0x5922da>0x1?void 0x0:_0x5922da?K(_0x210b97,_0xa2e178):_0x210b97,_0x221bad=_0xf5cc96['length']-0x1,_0x5ab146;_0x221bad>=0x0;_0x221bad--)(_0x5ab146=_0xf5cc96[_0x221bad])&&(_0x28489c=_0x5ab146(_0x28489c)||_0x28489c);return _0x28489c;},p=(_0x3ea34f,_0x13d03c)=>(_0x54ddf2,_0x82609f)=>_0x13d03c(_0x54ddf2,_0x82609f,_0x3ea34f);let S=class extends _0x2f3545{constructor(_0x289017,_0xeb0336,_0x22280e,_0x298870){const _0x17b64d=_0x275b95;super(),this[_0x17b64d(0x203)]=_0x289017,this[_0x17b64d(0x205)]=_0xeb0336,this['_userService']=_0x22280e,this[_0x17b64d(0x229)]=_0x298870,this[_0x17b64d(0x20b)](),this['_initUserSync']();}[_0x275b95(0x237)](){const _0x8820c=_0x275b95;this[_0x8820c(0x207)](this['_threadCommentModel']['commentUpdate$'][_0x8820c(0x1ee)](_0x49b8b8(0x10))[_0x8820c(0x218)](_0x20e8ce=>{const _0x560ed5=_0x8820c,_0xccb9c5=new Set();_0x20e8ce['forEach'](_0x2ecd40=>{const _0x343aeb=_0x2b67;switch(_0x2ecd40['type']){case'add':{const _0x503129=_0x2ecd40[_0x343aeb(0x219)][_0x343aeb(0x23a)];_0xccb9c5[_0x343aeb(0x1f4)](_0x503129);break;}}}),B(this[_0x560ed5(0x229)],_0xccb9c5);}));}[_0x275b95(0x20b)](){const _0x4d6d2f=_0x275b95;this[_0x4d6d2f(0x207)](this[_0x4d6d2f(0x203)][_0x4d6d2f(0x1dc)][_0x4d6d2f(0x218)](async _0x29a217=>{const _0x271beb=_0x4d6d2f;var _0x490851,_0x4614bd,_0x1d0cd2,_0x33999b;const _0x234be6=(_0x490851=this[_0x271beb(0x205)]['getUnit'](_0x29a217[_0x271beb(0x235)])['find'](_0x28b820=>_0x28b820[_0x271beb(0x21b)]===_0x29a217[_0x271beb(0x21b)]))==null?void 0x0:_0x490851[_0x271beb(0x234)];if(!_0x234be6)return;const {unitId:_0x4cf2ce,subUnitId:_0x49add2}=_0x234be6;switch(_0x29a217[_0x271beb(0x1f0)]&&this['_userService'][_0x271beb(0x1df)](_0x29a217[_0x271beb(0x1f0)]),_0x29a217[_0x271beb(0x1e7)]){case v['Add']:break;case v[_0x271beb(0x1d8)]:{this[_0x271beb(0x205)][_0x271beb(0x216)](_0x4cf2ce,_0x49add2,{'unitId':_0x4cf2ce,'subUnitId':_0x49add2,'ref':'','id':_0x29a217[_0x271beb(0x1f7)],'dT':D(+_0x29a217['createTimestamp']),'threadId':_0x29a217[_0x271beb(0x21b)],'personId':(_0x1d0cd2=(_0x4614bd=_0x29a217[_0x271beb(0x1f0)])==null?void 0x0:_0x4614bd['userID'])!=null?_0x1d0cd2:_0x29a217['userId'],'text':JSON['parse'](_0x29a217[_0x271beb(0x230)]),'parentId':_0x234be6['id']});break;}case v['Delete']:{const _0x2e1cc0=this[_0x271beb(0x205)][_0x271beb(0x21e)](_0x4cf2ce,_0x49add2,_0x29a217[_0x271beb(0x1f7)]);_0x2e1cc0&&_0x2e1cc0[_0x271beb(0x236)]&&this[_0x271beb(0x205)][_0x271beb(0x1de)](_0x4cf2ce,_0x49add2,_0x29a217[_0x271beb(0x1f7)]);break;}case v[_0x271beb(0x223)]:{this[_0x271beb(0x205)][_0x271beb(0x1ef)](_0x4cf2ce,_0x49add2,{'commentId':_0x29a217['replyId'],'text':JSON[_0x271beb(0x202)](_0x29a217[_0x271beb(0x230)])});break;}case v['Solve']:{const _0x450c1b=(_0x33999b=this[_0x271beb(0x205)]['getUnit'](_0x29a217[_0x271beb(0x235)])[_0x271beb(0x1d5)](_0x5bd099=>_0x5bd099['threadId']===_0x29a217[_0x271beb(0x21b)]))==null?void 0x0:_0x33999b['root'];_0x450c1b&&this[_0x271beb(0x205)][_0x271beb(0x1d7)](_0x4cf2ce,_0x49add2,_0x450c1b['id'],_0x29a217[_0x271beb(0x1f6)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x33b5e2(_0x4c6d8e)),p(0x1,_0x33b5e2(_0x1fa1fb)),p(0x2,_0x33b5e2(_0x3c6fd5)),p(0x3,_0x33b5e2(_0x1950b2))],S);const z=_0x275b95(0x1e6),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0xd51ebb,_0x3db3a6,_0x28b687,_0x363ae2)=>{for(var _0x25042b=_0x363ae2>0x1?void 0x0:_0x363ae2?k(_0x3db3a6,_0x28b687):_0x3db3a6,_0x4f98ef=_0xd51ebb['length']-0x1,_0x53c0ea;_0x4f98ef>=0x0;_0x4f98ef--)(_0x53c0ea=_0xd51ebb[_0x4f98ef])&&(_0x25042b=_0x53c0ea(_0x25042b)||_0x25042b);return _0x25042b;},_=(_0x1a449d,_0x264f35)=>(_0x2c4109,_0x5c5958)=>_0x264f35(_0x2c4109,_0x5c5958,_0x1a449d);function X(_0x5ea3ac,_0x40c56a){const _0x5df8b2=_0x275b95,_0x3a945a=_0x5ea3ac[_0x5df8b2(0x1d6)][0x0];return{..._0x40c56a,'id':_0x3a945a['replyId'],'resolved':_0x5ea3ac['solved']===0x1,'dT':D(_0x3a945a[_0x5df8b2(0x1f8)]),'personId':_0x3a945a[_0x5df8b2(0x1fb)],'threadId':_0x3a945a[_0x5df8b2(0x21b)]};}function ee(_0x530031,_0x497de7,_0x1753f2){const _0x23b595=_0x275b95;var _0x1088d5,_0x318004;if(((_0x318004=(_0x1088d5=_0x530031==null?void 0x0:_0x530031['replies'])==null?void 0x0:_0x1088d5[_0x23b595(0x206)])!=null?_0x318004:0x0)>0x0){const _0x5b3359=(_0x20e18d,_0x51c9bb)=>({'id':_0x20e18d[_0x23b595(0x1f7)],'threadId':_0x20e18d[_0x23b595(0x21b)],'dT':D(_0x20e18d[_0x23b595(0x1f8)]),'personId':_0x20e18d['userId'],'resolved':_0x530031['solved']===I[_0x23b595(0x214)],'unitId':_0x497de7,'subUnitId':_0x1753f2,'text':JSON[_0x23b595(0x202)](_0x20e18d['content']),'parentId':_0x51c9bb}),_0x124239=_0x5b3359(_0x530031['replies'][0x0]);return{..._0x124239,'children':_0x530031[_0x23b595(0x1d6)]['slice'](0x1)[_0x23b595(0x22d)](_0x5dd067=>_0x5b3359(_0x5dd067,_0x124239['id']))};}return null;}let f=class{constructor(_0x341b34,_0x30c65b,_0x2ce72b,_0x435bef){const _0x3ff33c=_0x275b95;this[_0x3ff33c(0x233)]=_0x341b34,this['_userService']=_0x30c65b,this[_0x3ff33c(0x1fa)]=_0x2ce72b,this['_injector']=_0x435bef;}async[_0x275b95(0x216)](_0x41cf8c){const _0x263cdb=_0x275b95;var _0xe47435,_0x2f602c;const {parentId:_0x32bcbe,unitId:_0x42eb6e,text:_0x2f933c,threadId:_0x2caf26}=_0x41cf8c,_0x2df969=(_0x2f602c=(_0xe47435=_0x2f933c[_0x263cdb(0x204)])==null?void 0x0:_0xe47435[_0x263cdb(0x1fc)](_0x46c108=>_0x46c108[_0x263cdb(0x1ec)]===_0xacb558['COMMENT'])['map'](_0x43dc2d=>_0x43dc2d[_0x263cdb(0x21d)]))!=null?_0x2f602c:[],_0x4b2aab=JSON[_0x263cdb(0x1e1)](_0x2f933c),_0x2cb6d7=(await this[_0x263cdb(0x1fa)]['requireSession'](_0x42eb6e))[_0x263cdb(0x21a)]();if(_0x32bcbe){const _0x4e2921={'memberId':_0x2cb6d7,'unitId':_0x42eb6e,'content':_0x4b2aab,'mention':_0x2df969,'threadId':_0x2caf26},_0x4a2386=(await this[_0x263cdb(0x233)][_0x263cdb(0x222)](_0x263cdb(0x221)+_0x42eb6e+_0x263cdb(0x208),{'body':_0x4e2921}))[_0x263cdb(0x1f1)]['reply'];return{..._0x41cf8c,'id':_0x4a2386[_0x263cdb(0x1f7)],'dT':_0x9eacb9(+_0x4a2386[_0x263cdb(0x1f8)])[_0x263cdb(0x217)](_0x263cdb(0x1f9)),'personId':_0x4a2386[_0x263cdb(0x1fb)]};}else{const _0x4d4ad1={'memberId':_0x2cb6d7,'unitId':_0x42eb6e,'content':_0x4b2aab,'mention':_0x2df969},_0x5ba3a2=await this['_httpService']['post'](_0x263cdb(0x221)+_0x42eb6e+_0x263cdb(0x1f5),{'body':_0x4d4ad1});return X(_0x5ba3a2[_0x263cdb(0x1f1)][_0x263cdb(0x1e8)],_0x41cf8c);}}async[_0x275b95(0x1ef)](_0x7b7443){const _0xd1570b=_0x275b95;var _0x5d2cef,_0x40b0e3;const {text:_0x195957,unitId:_0x38a52e}=_0x7b7443,_0x455058=(_0x40b0e3=(_0x5d2cef=_0x195957['customRanges'])==null?void 0x0:_0x5d2cef[_0xd1570b(0x1fc)](_0x515a60=>_0x515a60[_0xd1570b(0x1ec)]===_0xacb558[_0xd1570b(0x1e9)])['map'](_0x5d8306=>_0x5d8306[_0xd1570b(0x21d)]))!=null?_0x40b0e3:[],_0x5cbea7=JSON[_0xd1570b(0x1e1)](_0x195957),_0x2ae763=_0x7b7443[_0xd1570b(0x21b)],_0x46478c=_0x7b7443['id'],_0x43ae0c={'memberId':(await this[_0xd1570b(0x1fa)][_0xd1570b(0x215)](_0x38a52e))['getMemberID'](),'unitId':_0x38a52e,'threadId':_0x2ae763,'mention':_0x455058,'content':_0x5cbea7,'replyId':_0x46478c},_0x585552=await this[_0xd1570b(0x233)][_0xd1570b(0x222)](_0xd1570b(0x221)+_0x38a52e+'/edit',{'body':_0x43ae0c});return!_0x585552[_0xd1570b(0x1f1)][_0xd1570b(0x1e2)]||_0x585552['body']['error'][_0xd1570b(0x1f3)]===0x1;}async['resolveComment'](_0xca686b){const _0x8c06e=_0x275b95,{unitId:_0x29ad12}=_0xca686b,_0x2a9f27=_0xca686b[_0x8c06e(0x21b)],_0x48051b={'memberId':this[_0x8c06e(0x21f)][_0x8c06e(0x1fd)]()[_0x8c06e(0x21c)],'unitId':_0x29ad12,'threadId':_0x2a9f27,'solved':_0xca686b[_0x8c06e(0x201)]?I[_0x8c06e(0x214)]:I[_0x8c06e(0x226)]},_0x239d28=await this[_0x8c06e(0x233)]['post']('/universer-api/comment/unit/'+_0x29ad12+_0x8c06e(0x20a),{'body':_0x48051b});return!_0x239d28[_0x8c06e(0x1f1)]['error']||_0x239d28[_0x8c06e(0x1f1)][_0x8c06e(0x1e2)][_0x8c06e(0x1f3)]===0x1;}async['deleteComment'](_0x3747da,_0x442aa0,_0x2f66d6,_0x3303fb){const _0x1387c5=_0x275b95,_0x5c615f={'memberId':(await this[_0x1387c5(0x1fa)][_0x1387c5(0x215)](_0x3747da))[_0x1387c5(0x21a)](),'threadId':_0x2f66d6,'replyId':_0x3303fb,'unitId':_0x3747da},_0x5c8d51=await this['_httpService'][_0x1387c5(0x222)](_0x1387c5(0x221)+_0x3747da+_0x1387c5(0x210),{'body':_0x5c615f});return!_0x5c8d51[_0x1387c5(0x1f1)][_0x1387c5(0x1e2)]||_0x5c8d51[_0x1387c5(0x1f1)][_0x1387c5(0x1e2)][_0x1387c5(0x1f3)]===0x1;}async['listComments'](_0x446e61,_0x116b2d,_0x462806){const _0x58807d=_0x275b95,_0x1cf671={'unitId':_0x446e61,'threadId':_0x462806},_0x274d35=await this[_0x58807d(0x233)]['post'](_0x58807d(0x221)+_0x446e61+_0x58807d(0x22c),{'body':_0x1cf671}),_0xa4f917=_0x462806[_0x58807d(0x22d)](_0x2f33e1=>ee(_0x274d35['body']['comments'][_0x2f33e1],_0x446e61,_0x116b2d))[_0x58807d(0x1fc)](Boolean);return Object['values'](_0x274d35[_0x58807d(0x1f1)]['users'])[_0x58807d(0x1e5)](_0x77cf57=>{const _0x311d9b=_0x58807d;this[_0x311d9b(0x21f)][_0x311d9b(0x1df)](_0x77cf57);}),_0xa4f917;}[_0x275b95(0x22a)](_0x4b033c){const _0x3a75bb=_0x275b95;return{'id':_0x4b033c['id'],'threadId':_0x4b033c[_0x3a75bb(0x21b)],'ref':_0x4b033c[_0x3a75bb(0x239)]};}};f=Q([_(0x0,_0x33b5e2(_0x770764)),_(0x1,_0x33b5e2(_0x3c6fd5)),_(0x2,_0x33b5e2(_0x528287)),_(0x3,_0x33b5e2(_0x1950b2))],f);var re=Object[_0x275b95(0x228)],te=(_0x5e5a51,_0x4bbdc1,_0x33c179,_0x2c46f2)=>{const _0x2bcefd=_0x275b95;for(var _0x1ae56e=_0x2c46f2>0x1?void 0x0:_0x2c46f2?re(_0x4bbdc1,_0x33c179):_0x4bbdc1,_0xf39c6c=_0x5e5a51[_0x2bcefd(0x206)]-0x1,_0x1fe845;_0xf39c6c>=0x0;_0xf39c6c--)(_0x1fe845=_0x5e5a51[_0xf39c6c])&&(_0x1ae56e=_0x1fe845(_0x1ae56e)||_0x1ae56e);return _0x1ae56e;},N=(_0x5eed83,_0x515f56)=>(_0x58d733,_0xc73ad9)=>_0x515f56(_0x58d733,_0xc73ad9,_0x5eed83);let g=class extends _0x2f3545{constructor(_0x253d15,_0x1d1423){const _0x21ac39=_0x275b95;super(),this[_0x21ac39(0x238)]=_0x253d15,this[_0x21ac39(0x213)]=_0x1d1423,this[_0x21ac39(0x231)]();}[_0x275b95(0x231)](){const _0xaa7db5=_0x275b95;this[_0xaa7db5(0x238)][_0xaa7db5(0x20c)]=this[_0xaa7db5(0x213)],this['_threadCommentDataSourceService'][_0xaa7db5(0x1f2)]=!0x1;}};g=te([N(0x0,_0x1c0daa),N(0x1,_0x33b5e2(f))],g);var se=Object[_0x275b95(0x22f)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x206c38,_0x5308f5,_0x371d05)=>_0x5308f5 in _0x206c38?se(_0x206c38,_0x5308f5,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x371d05}):_0x206c38[_0x5308f5]=_0x371d05,ie=(_0x43c10e,_0x17befc,_0x315e66,_0x2848d6)=>{const _0xad8bee=_0x275b95;for(var _0xe16107=_0x2848d6>0x1?void 0x0:_0x2848d6?oe(_0x17befc,_0x315e66):_0x17befc,_0x72d651=_0x43c10e[_0xad8bee(0x206)]-0x1,_0x189f1b;_0x72d651>=0x0;_0x72d651--)(_0x189f1b=_0x43c10e[_0x72d651])&&(_0xe16107=_0x189f1b(_0xe16107)||_0xe16107);return _0xe16107;},w=(_0x41e185,_0x1bde63)=>(_0x361297,_0x42d316)=>_0x1bde63(_0x361297,_0x42d316,_0x41e185),$=(_0x3dc3de,_0x236c2c,_0x5d4fd9)=>ne(_0x3dc3de,typeof _0x236c2c!='symbol'?_0x236c2c+'':_0x236c2c,_0x5d4fd9);let b=class extends _0x5bf589{constructor(_0x4d21b4=M,_0x33d063,_0xf58dcf){const _0x46bdf9=_0x275b95;super(),this[_0x46bdf9(0x1eb)]=_0x4d21b4,this['_injector']=_0x33d063,this[_0x46bdf9(0x1da)]=_0xf58dcf;const {..._0x5f437c}=_0x35101e({},M,this[_0x46bdf9(0x1eb)]);this[_0x46bdf9(0x1da)][_0x46bdf9(0x22b)](z,_0x5f437c);}[_0x275b95(0x220)](){const _0x46be27=_0x275b95;[[f],[g],[S]][_0x46be27(0x1e5)](_0x38bdb1=>{const _0x1fe3ce=_0x46be27;this[_0x1fe3ce(0x229)]['add'](_0x38bdb1);});}['onReady'](){const _0x3d9e22=_0x275b95;this[_0x3d9e22(0x229)][_0x3d9e22(0x212)](g),this['_injector'][_0x3d9e22(0x212)](S);}};function _0x5592(){const _0x243c69=['1659432wxyFNC','deleteComment','addUser','size','stringify','error','5808294EHAHvs','Delete','forEach','thread-comment-data-source.config','type','comment','COMMENT','144gwSvjH','_config','rangeType','users','pipe','updateComment','user','body','syncUpdateMutationToColla','code','add','/add','solved','replyId','createTimestamp','YYYY/MM/DD\x20HH:mm','_sessionService','userId','filter','getCurrentUser','3002629TxjzXv','10sDQvxa','1356690AhvgXl','resolved','parse','_commentService','customRanges','_threadCommentModel','length','disposeWithMe','/reply','Solve','/solved','_init','dataSource','delete','getUser','Unknown','/delete','7151KRtGYh','get','_threadCommentDataSource','Solved','requireSession','addComment','format','subscribe','payload','getMemberID','threadId','userID','rangeId','getComment','_userService','onStarting','/universer-api/comment/unit/','post','Edit','1408572QrQPrA','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','OpenOrReOpen','5ruQtSL','getOwnPropertyDescriptor','_injector','saveCommentToSnapshot','setConfig','/list','map','8NNBjvL','defineProperty','content','_initDataSource','Add','_httpService','root','unitId','parentId','_initUserSync','_threadCommentDataSourceService','ref','personId','UNRECOGNIZED','find','replies','resolveComment','Reply','28338739QkpKDS','_configService','pluginName','commentUpdate$'];_0x5592=function(){return _0x243c69;};return _0x5592();}$(b,_0x275b95(0x1db),W),$(b,_0x275b95(0x1e7),_0x4a5fef['UNIVER_UNKNOWN']),b=ie([_0x4301fe(_0x998630,_0x1b7631,_0x1b92c7),w(0x1,_0x33b5e2(_0x1950b2)),w(0x2,_0x4ef3a8)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x293706=_0x3c54;(function(_0x58e3e8,_0x200c12){const _0x338b0a=_0x3c54,_0x529f35=_0x58e3e8();while(!![]){try{const _0x4f0194=-parseInt(_0x338b0a(0xf5))/0x1*(parseInt(_0x338b0a(0x11d))/0x2)+-parseInt(_0x338b0a(0xc3))/0x3+-parseInt(_0x338b0a(0xe3))/0x4+parseInt(_0x338b0a(0x120))/0x5+parseInt(_0x338b0a(0xda))/0x6*(-parseInt(_0x338b0a(0x117))/0x7)+parseInt(_0x338b0a(0x101))/0x8+-parseInt(_0x338b0a(0xc9))/0x9*(-parseInt(_0x338b0a(0xea))/0xa);if(_0x4f0194===_0x200c12)break;else _0x529f35['push'](_0x529f35['shift']());}catch(_0xdb568a){_0x529f35['push'](_0x529f35['shift']());}}}(_0x2dbc,0xa2a09));import{CommentService as _0x4dcb6c,CollaborationSessionService as _0x40f849,UniverCollaborationClientPlugin as _0x320f56}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x4b9823}from'@univerjs-pro/license';import{dayjs as _0x30b957,UserManagerService as _0x3196d5,Inject as _0x3bd5d5,Injector as _0x2dd791,Disposable as _0x3a5f25,CustomRangeType as _0x854669,UniverInstanceType as _0x58268d,DependentOn as _0x3479fe,IConfigService as _0x5d4364,Plugin as _0x287d2d,merge as _0x1aaaac}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x516425}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x48ead0,IThreadCommentDataSourceService as _0x2416c3}from'@univerjs/thread-comment';import{bufferTime as _0x2f2c97}from'rxjs';function _0x2dbc(){const _0x5ef8ce=['getUser','_injector','COMMENT','symbol','userID','2166764YwLVRy','Solve','getComment','_configService','_init','_initUserSync','pipe','510KyjSna','parse','thread-comment-data-source.config','_threadCommentModel','post','forEach','/reply','requireSession','defineProperty','getUnit','/solved','138231BwZRfT','resolved','rangeId','find','users','_initDataSource','/universer-api/comment/unit/','get','map','Unknown','subscribe','personId','5160968LzzNtC','/add','stringify','addComment','disposeWithMe','YYYY/MM/DD\x20HH:mm','OpenOrReOpen','_threadCommentDataSourceService','/universer-api/user/list','Solved','_config','createTimestamp','filter','payload','resolveComment','_sessionService','replies','length','user','/list','size','_userService','791287xrLqTp','body','replyId','_threadCommentDataSource','solved','delete','18NJHVyY','_httpService','error','6366260NvOmeL','deleteComment','code','Reply','threadId','customRanges','addUser','getCurrentUser','rangeType','1229106YULOFb','userId','ref','unitId','onStarting','listComments','186399RQDqKh','dataSource','slice','commentUpdate$','root','UNIVER_UNKNOWN','getMemberID','parentId','UNRECOGNIZED','_commentService','Edit','add','content','type','format','setConfig','Delete','6UVTtnX','updateComment','Add','getOwnPropertyDescriptor'];_0x2dbc=function(){return _0x5ef8ce;};return _0x2dbc();}import{HTTPService as _0x191dc9}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x5226b2=>(_0x5226b2[_0x5226b2[_0x293706(0x107)]=0x0]='OpenOrReOpen',_0x5226b2[_0x5226b2[_0x293706(0x10a)]=0x1]=_0x293706(0x10a),_0x5226b2[_0x5226b2[_0x293706(0xd1)]=-0x1]=_0x293706(0xd1),_0x5226b2))(I||{}),v=(_0x4dcd9d=>(_0x4dcd9d[_0x4dcd9d['Unknown']=0x0]=_0x293706(0xfe),_0x4dcd9d[_0x4dcd9d[_0x293706(0xdc)]=0x1]='Add',_0x4dcd9d[_0x4dcd9d['Reply']=0x2]=_0x293706(0x123),_0x4dcd9d[_0x4dcd9d['Edit']=0x3]='Edit',_0x4dcd9d[_0x4dcd9d[_0x293706(0xd9)]=0x4]=_0x293706(0xd9),_0x4dcd9d[_0x4dcd9d[_0x293706(0xe4)]=0x5]=_0x293706(0xe4),_0x4dcd9d[_0x4dcd9d[_0x293706(0xd1)]=-0x1]='UNRECOGNIZED',_0x4dcd9d))(v||{});const D=_0x4b7d74=>_0x30b957(new Date(+_0x4b7d74))[_0x293706(0xd7)](_0x293706(0x106)),B=async(_0x5a4b02,_0x1b7f1c)=>{const _0x72a905=_0x293706,_0x49ab71=_0x5a4b02[_0x72a905(0xfc)](_0x3196d5),_0x53d4b6=_0x5a4b02[_0x72a905(0xfc)](_0x191dc9);_0x1b7f1c[_0x72a905(0xef)](_0x51fa7=>{const _0x50a859=_0x72a905;_0x49ab71[_0x50a859(0xde)](_0x51fa7)&&_0x1b7f1c[_0x50a859(0x11c)](_0x51fa7);}),_0x1b7f1c[_0x72a905(0x115)]&&(await _0x53d4b6[_0x72a905(0xfc)](_0x72a905(0x109),{'params':{'userIDs':[..._0x1b7f1c]}}))[_0x72a905(0x118)][_0x72a905(0xf9)]['forEach'](_0x28d0e1=>{const _0x1821c5=_0x72a905;_0x28d0e1&&_0x49ab71[_0x1821c5(0xc0)](_0x28d0e1);});};var K=Object[_0x293706(0xdd)],V=(_0x30beea,_0x52fe5f,_0x5f5311,_0x5562ab)=>{for(var _0x381bab=_0x5562ab>0x1?void 0x0:_0x5562ab?K(_0x52fe5f,_0x5f5311):_0x52fe5f,_0x2e08b8=_0x30beea['length']-0x1,_0x933162;_0x2e08b8>=0x0;_0x2e08b8--)(_0x933162=_0x30beea[_0x2e08b8])&&(_0x381bab=_0x933162(_0x381bab)||_0x381bab);return _0x381bab;},p=(_0xa2a71a,_0x26af67)=>(_0x449bae,_0x32e695)=>_0x26af67(_0x449bae,_0x32e695,_0xa2a71a);let S=class extends _0x3a5f25{constructor(_0x453871,_0x928fe0,_0x51a3b6,_0x4f2b76){const _0x54d1d2=_0x293706;super(),this[_0x54d1d2(0xd2)]=_0x453871,this[_0x54d1d2(0xed)]=_0x928fe0,this['_userService']=_0x51a3b6,this[_0x54d1d2(0xdf)]=_0x4f2b76,this[_0x54d1d2(0xe7)](),this[_0x54d1d2(0xe8)]();}[_0x293706(0xe8)](){const _0x3abfd6=_0x293706;this['disposeWithMe'](this[_0x3abfd6(0xed)][_0x3abfd6(0xcc)][_0x3abfd6(0xe9)](_0x2f2c97(0x10))[_0x3abfd6(0xff)](_0x20520d=>{const _0x2057a1=_0x3abfd6,_0x119b7a=new Set();_0x20520d[_0x2057a1(0xef)](_0x1829b5=>{const _0x15ebe2=_0x2057a1;switch(_0x1829b5[_0x15ebe2(0xd6)]){case _0x15ebe2(0xd4):{const _0x4a0e07=_0x1829b5[_0x15ebe2(0x10e)][_0x15ebe2(0x100)];_0x119b7a[_0x15ebe2(0xd4)](_0x4a0e07);break;}}}),B(this[_0x2057a1(0xdf)],_0x119b7a);}));}[_0x293706(0xe7)](){const _0x2435b6=_0x293706;this[_0x2435b6(0x105)](this['_commentService'][_0x2435b6(0xcc)]['subscribe'](async _0x3c857f=>{const _0x37388a=_0x2435b6;var _0x3d71b4,_0x2252d6,_0x53c898,_0x192981;const _0x68ba12=(_0x3d71b4=this[_0x37388a(0xed)][_0x37388a(0xf3)](_0x3c857f[_0x37388a(0xc6)])[_0x37388a(0xf8)](_0xd54b6b=>_0xd54b6b['threadId']===_0x3c857f[_0x37388a(0xbe)]))==null?void 0x0:_0x3d71b4[_0x37388a(0xcd)];if(!_0x68ba12)return;const {unitId:_0x4f6342,subUnitId:_0x366811}=_0x68ba12;switch(_0x3c857f[_0x37388a(0x113)]&&this[_0x37388a(0x116)][_0x37388a(0xc0)](_0x3c857f[_0x37388a(0x113)]),_0x3c857f['type']){case v[_0x37388a(0xdc)]:break;case v[_0x37388a(0x123)]:{this[_0x37388a(0xed)][_0x37388a(0x104)](_0x4f6342,_0x366811,{'unitId':_0x4f6342,'subUnitId':_0x366811,'ref':'','id':_0x3c857f['replyId'],'dT':D(+_0x3c857f[_0x37388a(0x10c)]),'threadId':_0x3c857f[_0x37388a(0xbe)],'personId':(_0x53c898=(_0x2252d6=_0x3c857f['user'])==null?void 0x0:_0x2252d6[_0x37388a(0xe2)])!=null?_0x53c898:_0x3c857f[_0x37388a(0xc4)],'text':JSON[_0x37388a(0xeb)](_0x3c857f[_0x37388a(0xd5)]),'parentId':_0x68ba12['id']});break;}case v[_0x37388a(0xd9)]:{const _0x429ed6=this['_threadCommentModel'][_0x37388a(0xe5)](_0x4f6342,_0x366811,_0x3c857f[_0x37388a(0x119)]);_0x429ed6&&_0x429ed6[_0x37388a(0xd0)]&&this[_0x37388a(0xed)][_0x37388a(0x121)](_0x4f6342,_0x366811,_0x3c857f[_0x37388a(0x119)]);break;}case v[_0x37388a(0xd3)]:{this[_0x37388a(0xed)][_0x37388a(0xdb)](_0x4f6342,_0x366811,{'commentId':_0x3c857f['replyId'],'text':JSON['parse'](_0x3c857f['content'])});break;}case v[_0x37388a(0xe4)]:{const _0x17b09c=(_0x192981=this[_0x37388a(0xed)][_0x37388a(0xf3)](_0x3c857f['unitId'])['find'](_0x519117=>_0x519117['threadId']===_0x3c857f[_0x37388a(0xbe)]))==null?void 0x0:_0x192981['root'];_0x17b09c&&this[_0x37388a(0xed)][_0x37388a(0x10f)](_0x4f6342,_0x366811,_0x17b09c['id'],_0x3c857f['solved']===I[_0x37388a(0x10a)]);break;}}}));}};S=V([p(0x0,_0x3bd5d5(_0x4dcb6c)),p(0x1,_0x3bd5d5(_0x48ead0)),p(0x2,_0x3bd5d5(_0x3196d5)),p(0x3,_0x3bd5d5(_0x2dd791))],S);function _0x3c54(_0x57a76a,_0x1b7982){const _0x2dbc8d=_0x2dbc();return _0x3c54=function(_0x3c540a,_0xe454a5){_0x3c540a=_0x3c540a-0xbe;let _0x7feb65=_0x2dbc8d[_0x3c540a];return _0x7feb65;},_0x3c54(_0x57a76a,_0x1b7982);}const z=_0x293706(0xec),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x1632d7,_0x1e7ee6,_0x4a221e,_0xcf572b)=>{const _0x59e9ee=_0x293706;for(var _0x4f0bfe=_0xcf572b>0x1?void 0x0:_0xcf572b?k(_0x1e7ee6,_0x4a221e):_0x1e7ee6,_0x5ec4a4=_0x1632d7[_0x59e9ee(0x112)]-0x1,_0x552ed2;_0x5ec4a4>=0x0;_0x5ec4a4--)(_0x552ed2=_0x1632d7[_0x5ec4a4])&&(_0x4f0bfe=_0x552ed2(_0x4f0bfe)||_0x4f0bfe);return _0x4f0bfe;},_=(_0x1f6295,_0x4f1bf4)=>(_0x276c1d,_0x5662a0)=>_0x4f1bf4(_0x276c1d,_0x5662a0,_0x1f6295);function X(_0x44fe48,_0x49ae41){const _0x5979a5=_0x293706,_0x5b6387=_0x44fe48[_0x5979a5(0x111)][0x0];return{..._0x49ae41,'id':_0x5b6387[_0x5979a5(0x119)],'resolved':_0x44fe48[_0x5979a5(0x11b)]===0x1,'dT':D(_0x5b6387[_0x5979a5(0x10c)]),'personId':_0x5b6387[_0x5979a5(0xc4)],'threadId':_0x5b6387[_0x5979a5(0xbe)]};}function ee(_0x36997a,_0x4abe74,_0x10af6d){const _0x1fc04e=_0x293706;var _0x5b6ad5,_0x995892;if(((_0x995892=(_0x5b6ad5=_0x36997a==null?void 0x0:_0x36997a[_0x1fc04e(0x111)])==null?void 0x0:_0x5b6ad5[_0x1fc04e(0x112)])!=null?_0x995892:0x0)>0x0){const _0x1bc15d=(_0x5a1587,_0x3bbc06)=>({'id':_0x5a1587[_0x1fc04e(0x119)],'threadId':_0x5a1587[_0x1fc04e(0xbe)],'dT':D(_0x5a1587[_0x1fc04e(0x10c)]),'personId':_0x5a1587[_0x1fc04e(0xc4)],'resolved':_0x36997a[_0x1fc04e(0x11b)]===I[_0x1fc04e(0x10a)],'unitId':_0x4abe74,'subUnitId':_0x10af6d,'text':JSON[_0x1fc04e(0xeb)](_0x5a1587[_0x1fc04e(0xd5)]),'parentId':_0x3bbc06}),_0x518af1=_0x1bc15d(_0x36997a['replies'][0x0]);return{..._0x518af1,'children':_0x36997a[_0x1fc04e(0x111)][_0x1fc04e(0xcb)](0x1)[_0x1fc04e(0xfd)](_0x54dcf2=>_0x1bc15d(_0x54dcf2,_0x518af1['id']))};}return null;}let f=class{constructor(_0x7e778e,_0x1a4119,_0x3f6cd9,_0x4bc76d){const _0x3ec7f2=_0x293706;this[_0x3ec7f2(0x11e)]=_0x7e778e,this['_userService']=_0x1a4119,this[_0x3ec7f2(0x110)]=_0x3f6cd9,this[_0x3ec7f2(0xdf)]=_0x4bc76d;}async['addComment'](_0x2fd081){const _0x66793c=_0x293706;var _0x2deb51,_0x15d31f;const {parentId:_0x5c2f3e,unitId:_0x459a92,text:_0x465f02,threadId:_0x483851}=_0x2fd081,_0xc2ff04=(_0x15d31f=(_0x2deb51=_0x465f02[_0x66793c(0xbf)])==null?void 0x0:_0x2deb51[_0x66793c(0x10d)](_0x4349f0=>_0x4349f0[_0x66793c(0xc2)]===_0x854669[_0x66793c(0xe0)])['map'](_0xef9756=>_0xef9756[_0x66793c(0xf7)]))!=null?_0x15d31f:[],_0x4307da=JSON[_0x66793c(0x103)](_0x465f02),_0x3446c0=(await this['_sessionService']['requireSession'](_0x459a92))[_0x66793c(0xcf)]();if(_0x5c2f3e){const _0x5041b3={'memberId':_0x3446c0,'unitId':_0x459a92,'content':_0x4307da,'mention':_0xc2ff04,'threadId':_0x483851},_0x191a54=(await this['_httpService'][_0x66793c(0xee)](_0x66793c(0xfb)+_0x459a92+_0x66793c(0xf0),{'body':_0x5041b3}))[_0x66793c(0x118)]['reply'];return{..._0x2fd081,'id':_0x191a54[_0x66793c(0x119)],'dT':_0x30b957(+_0x191a54[_0x66793c(0x10c)])['format'](_0x66793c(0x106)),'personId':_0x191a54[_0x66793c(0xc4)]};}else{const _0x469b8c={'memberId':_0x3446c0,'unitId':_0x459a92,'content':_0x4307da,'mention':_0xc2ff04},_0x3b8a05=await this[_0x66793c(0x11e)][_0x66793c(0xee)](_0x66793c(0xfb)+_0x459a92+_0x66793c(0x102),{'body':_0x469b8c});return X(_0x3b8a05[_0x66793c(0x118)]['comment'],_0x2fd081);}}async[_0x293706(0xdb)](_0x4a15d9){const _0x32f301=_0x293706;var _0x115165,_0x5df503;const {text:_0x472bd7,unitId:_0x2d9b9a}=_0x4a15d9,_0x540cbd=(_0x5df503=(_0x115165=_0x472bd7[_0x32f301(0xbf)])==null?void 0x0:_0x115165[_0x32f301(0x10d)](_0x5ced11=>_0x5ced11[_0x32f301(0xc2)]===_0x854669['COMMENT'])[_0x32f301(0xfd)](_0x46d31c=>_0x46d31c[_0x32f301(0xf7)]))!=null?_0x5df503:[],_0x4311a2=JSON[_0x32f301(0x103)](_0x472bd7),_0x4ed214=_0x4a15d9[_0x32f301(0xbe)],_0x213e9d=_0x4a15d9['id'],_0x23982a={'memberId':(await this['_sessionService'][_0x32f301(0xf1)](_0x2d9b9a))[_0x32f301(0xcf)](),'unitId':_0x2d9b9a,'threadId':_0x4ed214,'mention':_0x540cbd,'content':_0x4311a2,'replyId':_0x213e9d},_0x553af4=await this[_0x32f301(0x11e)][_0x32f301(0xee)](_0x32f301(0xfb)+_0x2d9b9a+'/edit',{'body':_0x23982a});return!_0x553af4[_0x32f301(0x118)][_0x32f301(0x11f)]||_0x553af4[_0x32f301(0x118)][_0x32f301(0x11f)][_0x32f301(0x122)]===0x1;}async['resolveComment'](_0x79e56b){const _0x48961e=_0x293706,{unitId:_0x1cc0df}=_0x79e56b,_0x38c259=_0x79e56b[_0x48961e(0xbe)],_0x2f7f56={'memberId':this['_userService'][_0x48961e(0xc1)]()[_0x48961e(0xe2)],'unitId':_0x1cc0df,'threadId':_0x38c259,'solved':_0x79e56b[_0x48961e(0xf6)]?I[_0x48961e(0x10a)]:I[_0x48961e(0x107)]},_0x5733c4=await this[_0x48961e(0x11e)][_0x48961e(0xee)](_0x48961e(0xfb)+_0x1cc0df+_0x48961e(0xf4),{'body':_0x2f7f56});return!_0x5733c4[_0x48961e(0x118)][_0x48961e(0x11f)]||_0x5733c4[_0x48961e(0x118)]['error'][_0x48961e(0x122)]===0x1;}async[_0x293706(0x121)](_0x5d3ddc,_0x1b793d,_0x7149e8,_0x3014dc){const _0x3539ff=_0x293706,_0x1df114={'memberId':(await this[_0x3539ff(0x110)][_0x3539ff(0xf1)](_0x5d3ddc))[_0x3539ff(0xcf)](),'threadId':_0x7149e8,'replyId':_0x3014dc,'unitId':_0x5d3ddc},_0x17131b=await this[_0x3539ff(0x11e)]['post'](_0x3539ff(0xfb)+_0x5d3ddc+'/delete',{'body':_0x1df114});return!_0x17131b[_0x3539ff(0x118)][_0x3539ff(0x11f)]||_0x17131b[_0x3539ff(0x118)][_0x3539ff(0x11f)][_0x3539ff(0x122)]===0x1;}async[_0x293706(0xc8)](_0x57cc2c,_0x232977,_0x51e319){const _0x4de966=_0x293706,_0x43cfcb={'unitId':_0x57cc2c,'threadId':_0x51e319},_0x5b56db=await this[_0x4de966(0x11e)][_0x4de966(0xee)](_0x4de966(0xfb)+_0x57cc2c+_0x4de966(0x114),{'body':_0x43cfcb}),_0x2f5970=_0x51e319[_0x4de966(0xfd)](_0x26046a=>ee(_0x5b56db[_0x4de966(0x118)]['comments'][_0x26046a],_0x57cc2c,_0x232977))[_0x4de966(0x10d)](Boolean);return Object['values'](_0x5b56db['body'][_0x4de966(0xf9)])[_0x4de966(0xef)](_0x398273=>{const _0x1a32a8=_0x4de966;this['_userService'][_0x1a32a8(0xc0)](_0x398273);}),_0x2f5970;}['saveCommentToSnapshot'](_0x13ce20){const _0x2d335d=_0x293706;return{'id':_0x13ce20['id'],'threadId':_0x13ce20['threadId'],'ref':_0x13ce20[_0x2d335d(0xc5)]};}};f=Q([_(0x0,_0x3bd5d5(_0x191dc9)),_(0x1,_0x3bd5d5(_0x3196d5)),_(0x2,_0x3bd5d5(_0x40f849)),_(0x3,_0x3bd5d5(_0x2dd791))],f);var re=Object[_0x293706(0xdd)],te=(_0x1d4d36,_0x458372,_0x127bcc,_0x215438)=>{for(var _0x3e43a4=_0x215438>0x1?void 0x0:_0x215438?re(_0x458372,_0x127bcc):_0x458372,_0x5024d1=_0x1d4d36['length']-0x1,_0x331327;_0x5024d1>=0x0;_0x5024d1--)(_0x331327=_0x1d4d36[_0x5024d1])&&(_0x3e43a4=_0x331327(_0x3e43a4)||_0x3e43a4);return _0x3e43a4;},N=(_0x5af987,_0x2995d8)=>(_0x2ab013,_0x35438e)=>_0x2995d8(_0x2ab013,_0x35438e,_0x5af987);let g=class extends _0x3a5f25{constructor(_0x389787,_0x4a422f){const _0x3abbf6=_0x293706;super(),this[_0x3abbf6(0x108)]=_0x389787,this[_0x3abbf6(0x11a)]=_0x4a422f,this[_0x3abbf6(0xfa)]();}[_0x293706(0xfa)](){const _0x21025c=_0x293706;this[_0x21025c(0x108)][_0x21025c(0xca)]=this[_0x21025c(0x11a)],this['_threadCommentDataSourceService']['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x2416c3),N(0x1,_0x3bd5d5(f))],g);var se=Object[_0x293706(0xf2)],oe=Object[_0x293706(0xdd)],ne=(_0x2ec168,_0x23c57f,_0x42682f)=>_0x23c57f in _0x2ec168?se(_0x2ec168,_0x23c57f,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x42682f}):_0x2ec168[_0x23c57f]=_0x42682f,ie=(_0x4cf028,_0x2753b1,_0x3d6d11,_0x19366b)=>{const _0x406116=_0x293706;for(var _0x25c8ea=_0x19366b>0x1?void 0x0:_0x19366b?oe(_0x2753b1,_0x3d6d11):_0x2753b1,_0x4bcd37=_0x4cf028[_0x406116(0x112)]-0x1,_0x55881d;_0x4bcd37>=0x0;_0x4bcd37--)(_0x55881d=_0x4cf028[_0x4bcd37])&&(_0x25c8ea=_0x55881d(_0x25c8ea)||_0x25c8ea);return _0x25c8ea;},w=(_0x3d2689,_0x475db5)=>(_0x41e608,_0x1a0034)=>_0x475db5(_0x41e608,_0x1a0034,_0x3d2689),$=(_0x54a4df,_0x2291fc,_0x4f7cf8)=>ne(_0x54a4df,typeof _0x2291fc!=_0x293706(0xe1)?_0x2291fc+'':_0x2291fc,_0x4f7cf8);let b=class extends _0x287d2d{constructor(_0x318192=M,_0x711135,_0x51b8c5){const _0x1e7db9=_0x293706;super(),this[_0x1e7db9(0x10b)]=_0x318192,this[_0x1e7db9(0xdf)]=_0x711135,this[_0x1e7db9(0xe6)]=_0x51b8c5;const {..._0x137174}=_0x1aaaac({},M,this[_0x1e7db9(0x10b)]);this[_0x1e7db9(0xe6)][_0x1e7db9(0xd8)](z,_0x137174);}[_0x293706(0xc7)](){const _0x49c07d=_0x293706;[[f],[g],[S]][_0x49c07d(0xef)](_0x2dffec=>{const _0x1a4b13=_0x49c07d;this[_0x1a4b13(0xdf)][_0x1a4b13(0xd4)](_0x2dffec);});}['onReady'](){const _0x46faf1=_0x293706;this[_0x46faf1(0xdf)][_0x46faf1(0xfc)](g),this[_0x46faf1(0xdf)][_0x46faf1(0xfc)](S);}};$(b,'pluginName',W),$(b,_0x293706(0xd6),_0x58268d[_0x293706(0xce)]),b=ie([_0x3479fe(_0x516425,_0x320f56,_0x4b9823),w(0x1,_0x3bd5d5(_0x2dd791)),w(0x2,_0x5d4364)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ function _0x2b67(_0x2aefbe,_0x588d6f){const _0x559265=_0x5592();return _0x2b67=function(_0x2b67e1,_0xae60de){_0x2b67e1=_0x2b67e1-0x1d4;let _0x579e86=_0x559265[_0x2b67e1];return _0x579e86;},_0x2b67(_0x2aefbe,_0x588d6f);}const _0x275b95=_0x2b67;(function(_0x9479bb,_0x500c32){const _0x185372=_0x2b67,_0xd16a45=_0x9479bb();while(!![]){try{const _0x4d6f60=-parseInt(_0x185372(0x211))/0x1*(parseInt(_0x185372(0x1ea))/0x2)+-parseInt(_0x185372(0x224))/0x3+-parseInt(_0x185372(0x1dd))/0x4*(parseInt(_0x185372(0x227))/0x5)+parseInt(_0x185372(0x200))/0x6+parseInt(_0x185372(0x1fe))/0x7*(-parseInt(_0x185372(0x22e))/0x8)+-parseInt(_0x185372(0x1e3))/0x9+-parseInt(_0x185372(0x1ff))/0xa*(-parseInt(_0x185372(0x1d9))/0xb);if(_0x4d6f60===_0x500c32)break;else _0xd16a45['push'](_0xd16a45['shift']());}catch(_0x48112f){_0xd16a45['push'](_0xd16a45['shift']());}}}(_0x5592,0x5045d));import{CommentService as _0x4c6d8e,CollaborationSessionService as _0x528287,UniverCollaborationClientPlugin as _0x1b7631}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x1b92c7}from'@univerjs-pro/license';import{dayjs as _0x9eacb9,UserManagerService as _0x3c6fd5,Inject as _0x33b5e2,Injector as _0x1950b2,Disposable as _0x2f3545,CustomRangeType as _0xacb558,UniverInstanceType as _0x4a5fef,DependentOn as _0x4301fe,IConfigService as _0x4ef3a8,Plugin as _0x5bf589,merge as _0x35101e}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x998630}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x1fa1fb,IThreadCommentDataSourceService as _0x1c0daa}from'@univerjs/thread-comment';import{bufferTime as _0x49b8b8}from'rxjs';import{HTTPService as _0x770764}from'@univerjs/network';const W=_0x275b95(0x225);var I=(_0x1d8b21=>(_0x1d8b21[_0x1d8b21[_0x275b95(0x226)]=0x0]=_0x275b95(0x226),_0x1d8b21[_0x1d8b21[_0x275b95(0x214)]=0x1]=_0x275b95(0x214),_0x1d8b21[_0x1d8b21[_0x275b95(0x1d4)]=-0x1]=_0x275b95(0x1d4),_0x1d8b21))(I||{}),v=(_0x2d17aa=>(_0x2d17aa[_0x2d17aa[_0x275b95(0x20f)]=0x0]='Unknown',_0x2d17aa[_0x2d17aa[_0x275b95(0x232)]=0x1]=_0x275b95(0x232),_0x2d17aa[_0x2d17aa[_0x275b95(0x1d8)]=0x2]=_0x275b95(0x1d8),_0x2d17aa[_0x2d17aa[_0x275b95(0x223)]=0x3]=_0x275b95(0x223),_0x2d17aa[_0x2d17aa[_0x275b95(0x1e4)]=0x4]=_0x275b95(0x1e4),_0x2d17aa[_0x2d17aa[_0x275b95(0x209)]=0x5]='Solve',_0x2d17aa[_0x2d17aa['UNRECOGNIZED']=-0x1]=_0x275b95(0x1d4),_0x2d17aa))(v||{});const D=_0x4f4d96=>_0x9eacb9(new Date(+_0x4f4d96))[_0x275b95(0x217)](_0x275b95(0x1f9)),B=async(_0x201528,_0x90313a)=>{const _0x398b34=_0x275b95,_0x26f22a=_0x201528[_0x398b34(0x212)](_0x3c6fd5),_0x2e69ad=_0x201528['get'](_0x770764);_0x90313a[_0x398b34(0x1e5)](_0xcffbd=>{const _0x236b65=_0x398b34;_0x26f22a[_0x236b65(0x20e)](_0xcffbd)&&_0x90313a[_0x236b65(0x20d)](_0xcffbd);}),_0x90313a[_0x398b34(0x1e0)]&&(await _0x2e69ad['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x90313a]}}))[_0x398b34(0x1f1)][_0x398b34(0x1ed)][_0x398b34(0x1e5)](_0x4fafcc=>{const _0x48b44d=_0x398b34;_0x4fafcc&&_0x26f22a[_0x48b44d(0x1df)](_0x4fafcc);});};var K=Object[_0x275b95(0x228)],V=(_0xf5cc96,_0x210b97,_0xa2e178,_0x5922da)=>{for(var _0x28489c=_0x5922da>0x1?void 0x0:_0x5922da?K(_0x210b97,_0xa2e178):_0x210b97,_0x221bad=_0xf5cc96['length']-0x1,_0x5ab146;_0x221bad>=0x0;_0x221bad--)(_0x5ab146=_0xf5cc96[_0x221bad])&&(_0x28489c=_0x5ab146(_0x28489c)||_0x28489c);return _0x28489c;},p=(_0x3ea34f,_0x13d03c)=>(_0x54ddf2,_0x82609f)=>_0x13d03c(_0x54ddf2,_0x82609f,_0x3ea34f);let S=class extends _0x2f3545{constructor(_0x289017,_0xeb0336,_0x22280e,_0x298870){const _0x17b64d=_0x275b95;super(),this[_0x17b64d(0x203)]=_0x289017,this[_0x17b64d(0x205)]=_0xeb0336,this['_userService']=_0x22280e,this[_0x17b64d(0x229)]=_0x298870,this[_0x17b64d(0x20b)](),this['_initUserSync']();}[_0x275b95(0x237)](){const _0x8820c=_0x275b95;this[_0x8820c(0x207)](this['_threadCommentModel']['commentUpdate$'][_0x8820c(0x1ee)](_0x49b8b8(0x10))[_0x8820c(0x218)](_0x20e8ce=>{const _0x560ed5=_0x8820c,_0xccb9c5=new Set();_0x20e8ce['forEach'](_0x2ecd40=>{const _0x343aeb=_0x2b67;switch(_0x2ecd40['type']){case'add':{const _0x503129=_0x2ecd40[_0x343aeb(0x219)][_0x343aeb(0x23a)];_0xccb9c5[_0x343aeb(0x1f4)](_0x503129);break;}}}),B(this[_0x560ed5(0x229)],_0xccb9c5);}));}[_0x275b95(0x20b)](){const _0x4d6d2f=_0x275b95;this[_0x4d6d2f(0x207)](this[_0x4d6d2f(0x203)][_0x4d6d2f(0x1dc)][_0x4d6d2f(0x218)](async _0x29a217=>{const _0x271beb=_0x4d6d2f;var _0x490851,_0x4614bd,_0x1d0cd2,_0x33999b;const _0x234be6=(_0x490851=this[_0x271beb(0x205)]['getUnit'](_0x29a217[_0x271beb(0x235)])['find'](_0x28b820=>_0x28b820[_0x271beb(0x21b)]===_0x29a217[_0x271beb(0x21b)]))==null?void 0x0:_0x490851[_0x271beb(0x234)];if(!_0x234be6)return;const {unitId:_0x4cf2ce,subUnitId:_0x49add2}=_0x234be6;switch(_0x29a217[_0x271beb(0x1f0)]&&this['_userService'][_0x271beb(0x1df)](_0x29a217[_0x271beb(0x1f0)]),_0x29a217[_0x271beb(0x1e7)]){case v['Add']:break;case v[_0x271beb(0x1d8)]:{this[_0x271beb(0x205)][_0x271beb(0x216)](_0x4cf2ce,_0x49add2,{'unitId':_0x4cf2ce,'subUnitId':_0x49add2,'ref':'','id':_0x29a217[_0x271beb(0x1f7)],'dT':D(+_0x29a217['createTimestamp']),'threadId':_0x29a217[_0x271beb(0x21b)],'personId':(_0x1d0cd2=(_0x4614bd=_0x29a217[_0x271beb(0x1f0)])==null?void 0x0:_0x4614bd['userID'])!=null?_0x1d0cd2:_0x29a217['userId'],'text':JSON['parse'](_0x29a217[_0x271beb(0x230)]),'parentId':_0x234be6['id']});break;}case v['Delete']:{const _0x2e1cc0=this[_0x271beb(0x205)][_0x271beb(0x21e)](_0x4cf2ce,_0x49add2,_0x29a217[_0x271beb(0x1f7)]);_0x2e1cc0&&_0x2e1cc0[_0x271beb(0x236)]&&this[_0x271beb(0x205)][_0x271beb(0x1de)](_0x4cf2ce,_0x49add2,_0x29a217[_0x271beb(0x1f7)]);break;}case v[_0x271beb(0x223)]:{this[_0x271beb(0x205)][_0x271beb(0x1ef)](_0x4cf2ce,_0x49add2,{'commentId':_0x29a217['replyId'],'text':JSON[_0x271beb(0x202)](_0x29a217[_0x271beb(0x230)])});break;}case v['Solve']:{const _0x450c1b=(_0x33999b=this[_0x271beb(0x205)]['getUnit'](_0x29a217[_0x271beb(0x235)])[_0x271beb(0x1d5)](_0x5bd099=>_0x5bd099['threadId']===_0x29a217[_0x271beb(0x21b)]))==null?void 0x0:_0x33999b['root'];_0x450c1b&&this[_0x271beb(0x205)][_0x271beb(0x1d7)](_0x4cf2ce,_0x49add2,_0x450c1b['id'],_0x29a217[_0x271beb(0x1f6)]===I['Solved']);break;}}}));}};S=V([p(0x0,_0x33b5e2(_0x4c6d8e)),p(0x1,_0x33b5e2(_0x1fa1fb)),p(0x2,_0x33b5e2(_0x3c6fd5)),p(0x3,_0x33b5e2(_0x1950b2))],S);const z=_0x275b95(0x1e6),M={};var k=Object['getOwnPropertyDescriptor'],Q=(_0xd51ebb,_0x3db3a6,_0x28b687,_0x363ae2)=>{for(var _0x25042b=_0x363ae2>0x1?void 0x0:_0x363ae2?k(_0x3db3a6,_0x28b687):_0x3db3a6,_0x4f98ef=_0xd51ebb['length']-0x1,_0x53c0ea;_0x4f98ef>=0x0;_0x4f98ef--)(_0x53c0ea=_0xd51ebb[_0x4f98ef])&&(_0x25042b=_0x53c0ea(_0x25042b)||_0x25042b);return _0x25042b;},_=(_0x1a449d,_0x264f35)=>(_0x2c4109,_0x5c5958)=>_0x264f35(_0x2c4109,_0x5c5958,_0x1a449d);function X(_0x5ea3ac,_0x40c56a){const _0x5df8b2=_0x275b95,_0x3a945a=_0x5ea3ac[_0x5df8b2(0x1d6)][0x0];return{..._0x40c56a,'id':_0x3a945a['replyId'],'resolved':_0x5ea3ac['solved']===0x1,'dT':D(_0x3a945a[_0x5df8b2(0x1f8)]),'personId':_0x3a945a[_0x5df8b2(0x1fb)],'threadId':_0x3a945a[_0x5df8b2(0x21b)]};}function ee(_0x530031,_0x497de7,_0x1753f2){const _0x23b595=_0x275b95;var _0x1088d5,_0x318004;if(((_0x318004=(_0x1088d5=_0x530031==null?void 0x0:_0x530031['replies'])==null?void 0x0:_0x1088d5[_0x23b595(0x206)])!=null?_0x318004:0x0)>0x0){const _0x5b3359=(_0x20e18d,_0x51c9bb)=>({'id':_0x20e18d[_0x23b595(0x1f7)],'threadId':_0x20e18d[_0x23b595(0x21b)],'dT':D(_0x20e18d[_0x23b595(0x1f8)]),'personId':_0x20e18d['userId'],'resolved':_0x530031['solved']===I[_0x23b595(0x214)],'unitId':_0x497de7,'subUnitId':_0x1753f2,'text':JSON[_0x23b595(0x202)](_0x20e18d['content']),'parentId':_0x51c9bb}),_0x124239=_0x5b3359(_0x530031['replies'][0x0]);return{..._0x124239,'children':_0x530031[_0x23b595(0x1d6)]['slice'](0x1)[_0x23b595(0x22d)](_0x5dd067=>_0x5b3359(_0x5dd067,_0x124239['id']))};}return null;}let f=class{constructor(_0x341b34,_0x30c65b,_0x2ce72b,_0x435bef){const _0x3ff33c=_0x275b95;this[_0x3ff33c(0x233)]=_0x341b34,this['_userService']=_0x30c65b,this[_0x3ff33c(0x1fa)]=_0x2ce72b,this['_injector']=_0x435bef;}async[_0x275b95(0x216)](_0x41cf8c){const _0x263cdb=_0x275b95;var _0xe47435,_0x2f602c;const {parentId:_0x32bcbe,unitId:_0x42eb6e,text:_0x2f933c,threadId:_0x2caf26}=_0x41cf8c,_0x2df969=(_0x2f602c=(_0xe47435=_0x2f933c[_0x263cdb(0x204)])==null?void 0x0:_0xe47435[_0x263cdb(0x1fc)](_0x46c108=>_0x46c108[_0x263cdb(0x1ec)]===_0xacb558['COMMENT'])['map'](_0x43dc2d=>_0x43dc2d[_0x263cdb(0x21d)]))!=null?_0x2f602c:[],_0x4b2aab=JSON[_0x263cdb(0x1e1)](_0x2f933c),_0x2cb6d7=(await this[_0x263cdb(0x1fa)]['requireSession'](_0x42eb6e))[_0x263cdb(0x21a)]();if(_0x32bcbe){const _0x4e2921={'memberId':_0x2cb6d7,'unitId':_0x42eb6e,'content':_0x4b2aab,'mention':_0x2df969,'threadId':_0x2caf26},_0x4a2386=(await this[_0x263cdb(0x233)][_0x263cdb(0x222)](_0x263cdb(0x221)+_0x42eb6e+_0x263cdb(0x208),{'body':_0x4e2921}))[_0x263cdb(0x1f1)]['reply'];return{..._0x41cf8c,'id':_0x4a2386[_0x263cdb(0x1f7)],'dT':_0x9eacb9(+_0x4a2386[_0x263cdb(0x1f8)])[_0x263cdb(0x217)](_0x263cdb(0x1f9)),'personId':_0x4a2386[_0x263cdb(0x1fb)]};}else{const _0x4d4ad1={'memberId':_0x2cb6d7,'unitId':_0x42eb6e,'content':_0x4b2aab,'mention':_0x2df969},_0x5ba3a2=await this['_httpService']['post'](_0x263cdb(0x221)+_0x42eb6e+_0x263cdb(0x1f5),{'body':_0x4d4ad1});return X(_0x5ba3a2[_0x263cdb(0x1f1)][_0x263cdb(0x1e8)],_0x41cf8c);}}async[_0x275b95(0x1ef)](_0x7b7443){const _0xd1570b=_0x275b95;var _0x5d2cef,_0x40b0e3;const {text:_0x195957,unitId:_0x38a52e}=_0x7b7443,_0x455058=(_0x40b0e3=(_0x5d2cef=_0x195957['customRanges'])==null?void 0x0:_0x5d2cef[_0xd1570b(0x1fc)](_0x515a60=>_0x515a60[_0xd1570b(0x1ec)]===_0xacb558[_0xd1570b(0x1e9)])['map'](_0x5d8306=>_0x5d8306[_0xd1570b(0x21d)]))!=null?_0x40b0e3:[],_0x5cbea7=JSON[_0xd1570b(0x1e1)](_0x195957),_0x2ae763=_0x7b7443[_0xd1570b(0x21b)],_0x46478c=_0x7b7443['id'],_0x43ae0c={'memberId':(await this[_0xd1570b(0x1fa)][_0xd1570b(0x215)](_0x38a52e))['getMemberID'](),'unitId':_0x38a52e,'threadId':_0x2ae763,'mention':_0x455058,'content':_0x5cbea7,'replyId':_0x46478c},_0x585552=await this[_0xd1570b(0x233)][_0xd1570b(0x222)](_0xd1570b(0x221)+_0x38a52e+'/edit',{'body':_0x43ae0c});return!_0x585552[_0xd1570b(0x1f1)][_0xd1570b(0x1e2)]||_0x585552['body']['error'][_0xd1570b(0x1f3)]===0x1;}async['resolveComment'](_0xca686b){const _0x8c06e=_0x275b95,{unitId:_0x29ad12}=_0xca686b,_0x2a9f27=_0xca686b[_0x8c06e(0x21b)],_0x48051b={'memberId':this[_0x8c06e(0x21f)][_0x8c06e(0x1fd)]()[_0x8c06e(0x21c)],'unitId':_0x29ad12,'threadId':_0x2a9f27,'solved':_0xca686b[_0x8c06e(0x201)]?I[_0x8c06e(0x214)]:I[_0x8c06e(0x226)]},_0x239d28=await this[_0x8c06e(0x233)]['post']('/universer-api/comment/unit/'+_0x29ad12+_0x8c06e(0x20a),{'body':_0x48051b});return!_0x239d28[_0x8c06e(0x1f1)]['error']||_0x239d28[_0x8c06e(0x1f1)][_0x8c06e(0x1e2)][_0x8c06e(0x1f3)]===0x1;}async['deleteComment'](_0x3747da,_0x442aa0,_0x2f66d6,_0x3303fb){const _0x1387c5=_0x275b95,_0x5c615f={'memberId':(await this[_0x1387c5(0x1fa)][_0x1387c5(0x215)](_0x3747da))[_0x1387c5(0x21a)](),'threadId':_0x2f66d6,'replyId':_0x3303fb,'unitId':_0x3747da},_0x5c8d51=await this['_httpService'][_0x1387c5(0x222)](_0x1387c5(0x221)+_0x3747da+_0x1387c5(0x210),{'body':_0x5c615f});return!_0x5c8d51[_0x1387c5(0x1f1)][_0x1387c5(0x1e2)]||_0x5c8d51[_0x1387c5(0x1f1)][_0x1387c5(0x1e2)][_0x1387c5(0x1f3)]===0x1;}async['listComments'](_0x446e61,_0x116b2d,_0x462806){const _0x58807d=_0x275b95,_0x1cf671={'unitId':_0x446e61,'threadId':_0x462806},_0x274d35=await this[_0x58807d(0x233)]['post'](_0x58807d(0x221)+_0x446e61+_0x58807d(0x22c),{'body':_0x1cf671}),_0xa4f917=_0x462806[_0x58807d(0x22d)](_0x2f33e1=>ee(_0x274d35['body']['comments'][_0x2f33e1],_0x446e61,_0x116b2d))[_0x58807d(0x1fc)](Boolean);return Object['values'](_0x274d35[_0x58807d(0x1f1)]['users'])[_0x58807d(0x1e5)](_0x77cf57=>{const _0x311d9b=_0x58807d;this[_0x311d9b(0x21f)][_0x311d9b(0x1df)](_0x77cf57);}),_0xa4f917;}[_0x275b95(0x22a)](_0x4b033c){const _0x3a75bb=_0x275b95;return{'id':_0x4b033c['id'],'threadId':_0x4b033c[_0x3a75bb(0x21b)],'ref':_0x4b033c[_0x3a75bb(0x239)]};}};f=Q([_(0x0,_0x33b5e2(_0x770764)),_(0x1,_0x33b5e2(_0x3c6fd5)),_(0x2,_0x33b5e2(_0x528287)),_(0x3,_0x33b5e2(_0x1950b2))],f);var re=Object[_0x275b95(0x228)],te=(_0x5e5a51,_0x4bbdc1,_0x33c179,_0x2c46f2)=>{const _0x2bcefd=_0x275b95;for(var _0x1ae56e=_0x2c46f2>0x1?void 0x0:_0x2c46f2?re(_0x4bbdc1,_0x33c179):_0x4bbdc1,_0xf39c6c=_0x5e5a51[_0x2bcefd(0x206)]-0x1,_0x1fe845;_0xf39c6c>=0x0;_0xf39c6c--)(_0x1fe845=_0x5e5a51[_0xf39c6c])&&(_0x1ae56e=_0x1fe845(_0x1ae56e)||_0x1ae56e);return _0x1ae56e;},N=(_0x5eed83,_0x515f56)=>(_0x58d733,_0xc73ad9)=>_0x515f56(_0x58d733,_0xc73ad9,_0x5eed83);let g=class extends _0x2f3545{constructor(_0x253d15,_0x1d1423){const _0x21ac39=_0x275b95;super(),this[_0x21ac39(0x238)]=_0x253d15,this[_0x21ac39(0x213)]=_0x1d1423,this[_0x21ac39(0x231)]();}[_0x275b95(0x231)](){const _0xaa7db5=_0x275b95;this[_0xaa7db5(0x238)][_0xaa7db5(0x20c)]=this[_0xaa7db5(0x213)],this['_threadCommentDataSourceService'][_0xaa7db5(0x1f2)]=!0x1;}};g=te([N(0x0,_0x1c0daa),N(0x1,_0x33b5e2(f))],g);var se=Object[_0x275b95(0x22f)],oe=Object['getOwnPropertyDescriptor'],ne=(_0x206c38,_0x5308f5,_0x371d05)=>_0x5308f5 in _0x206c38?se(_0x206c38,_0x5308f5,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x371d05}):_0x206c38[_0x5308f5]=_0x371d05,ie=(_0x43c10e,_0x17befc,_0x315e66,_0x2848d6)=>{const _0xad8bee=_0x275b95;for(var _0xe16107=_0x2848d6>0x1?void 0x0:_0x2848d6?oe(_0x17befc,_0x315e66):_0x17befc,_0x72d651=_0x43c10e[_0xad8bee(0x206)]-0x1,_0x189f1b;_0x72d651>=0x0;_0x72d651--)(_0x189f1b=_0x43c10e[_0x72d651])&&(_0xe16107=_0x189f1b(_0xe16107)||_0xe16107);return _0xe16107;},w=(_0x41e185,_0x1bde63)=>(_0x361297,_0x42d316)=>_0x1bde63(_0x361297,_0x42d316,_0x41e185),$=(_0x3dc3de,_0x236c2c,_0x5d4fd9)=>ne(_0x3dc3de,typeof _0x236c2c!='symbol'?_0x236c2c+'':_0x236c2c,_0x5d4fd9);let b=class extends _0x5bf589{constructor(_0x4d21b4=M,_0x33d063,_0xf58dcf){const _0x46bdf9=_0x275b95;super(),this[_0x46bdf9(0x1eb)]=_0x4d21b4,this['_injector']=_0x33d063,this[_0x46bdf9(0x1da)]=_0xf58dcf;const {..._0x5f437c}=_0x35101e({},M,this[_0x46bdf9(0x1eb)]);this[_0x46bdf9(0x1da)][_0x46bdf9(0x22b)](z,_0x5f437c);}[_0x275b95(0x220)](){const _0x46be27=_0x275b95;[[f],[g],[S]][_0x46be27(0x1e5)](_0x38bdb1=>{const _0x1fe3ce=_0x46be27;this[_0x1fe3ce(0x229)]['add'](_0x38bdb1);});}['onReady'](){const _0x3d9e22=_0x275b95;this[_0x3d9e22(0x229)][_0x3d9e22(0x212)](g),this['_injector'][_0x3d9e22(0x212)](S);}};function _0x5592(){const _0x243c69=['1659432wxyFNC','deleteComment','addUser','size','stringify','error','5808294EHAHvs','Delete','forEach','thread-comment-data-source.config','type','comment','COMMENT','144gwSvjH','_config','rangeType','users','pipe','updateComment','user','body','syncUpdateMutationToColla','code','add','/add','solved','replyId','createTimestamp','YYYY/MM/DD\x20HH:mm','_sessionService','userId','filter','getCurrentUser','3002629TxjzXv','10sDQvxa','1356690AhvgXl','resolved','parse','_commentService','customRanges','_threadCommentModel','length','disposeWithMe','/reply','Solve','/solved','_init','dataSource','delete','getUser','Unknown','/delete','7151KRtGYh','get','_threadCommentDataSource','Solved','requireSession','addComment','format','subscribe','payload','getMemberID','threadId','userID','rangeId','getComment','_userService','onStarting','/universer-api/comment/unit/','post','Edit','1408572QrQPrA','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','OpenOrReOpen','5ruQtSL','getOwnPropertyDescriptor','_injector','saveCommentToSnapshot','setConfig','/list','map','8NNBjvL','defineProperty','content','_initDataSource','Add','_httpService','root','unitId','parentId','_initUserSync','_threadCommentDataSourceService','ref','personId','UNRECOGNIZED','find','replies','resolveComment','Reply','28338739QkpKDS','_configService','pluginName','commentUpdate$'];_0x5592=function(){return _0x243c69;};return _0x5592();}$(b,_0x275b95(0x1db),W),$(b,_0x275b95(0x1e7),_0x4a5fef['UNIVER_UNKNOWN']),b=ie([_0x4301fe(_0x998630,_0x1b7631,_0x1b92c7),w(0x1,_0x33b5e2(_0x1950b2)),w(0x2,_0x4ef3a8)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x46f4(){const _0xd9fa78=['getOwnPropertyDescriptor','userID','add','listComments','delete','type','filter','161934bQIkLa','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','format','get','_initDataSource','_httpService','thread-comment-data-source.config','Unknown','find','Solve','rangeId','Disposable','Solved','IConfigService','onReady','1671834lngxYD','_threadCommentModel','resolved','CollaborationSessionService','_init','ThreadCommentModel','IThreadCommentDataSourceService','HTTPService','getUser','/universer-api/user/list','/edit','amd','UniverCore','UNIVER_UNKNOWN','root','dayjs','commentUpdate$','UniverCollaborationClientPlugin','_userService','requireSession','_config','3426595pknpmz','OpenOrReOpen','Add','content','toStringTag','defineProperty','user','exports','addUser','values','CommentService','length','rangeType','parse','UniverThreadCommentUIPlugin','onStarting','18ydIHGr','UniverNetwork','subscribe','merge','1404dWcqXo','userId','payload','/delete','632674eyEvNM','addComment','Injector','body','YYYY/MM/DD\x20HH:mm','CustomRangeType','symbol','290xsmrZi','UserManagerService','getComment','Inject','COMMENT','22891Dtehcf','comments','@univerjs/thread-comment','createTimestamp','345217KkzcQR','code','@univerjs/thread-comment-ui','pluginName','_commentService','disposeWithMe','/universer-api/comment/unit/','replies','getCurrentUser','Delete','getUnit','customRanges','setConfig','Module','_threadCommentDataSourceService','UniverInstanceType','Reply','UniverLicensePlugin','error','slice','_configService','UNRECOGNIZED','function','_initUserSync','_sessionService','rxjs','_threadCommentDataSource','getMemberID','4kuyRGH','updateComment','solved','syncUpdateMutationToColla','parentId','/solved','reply','UniverProThreadCommentDatasource','stringify','dataSource','forEach','resolveComment','threadId','pipe','users','Edit','/reply','Plugin','post','67923OGWTJX','map','UniverThreadCommentDataSourcePlugin','_injector','deleteComment','unitId','UniverProCollaborationClient','replyId','16fqNYja'];_0x46f4=function(){return _0xd9fa78;};return _0x46f4();}function _0x3417(_0x42f3b8,_0x8f3e97){const _0x46f49a=_0x46f4();return _0x3417=function(_0x341731,_0x55260f){_0x341731=_0x341731-0x80;let _0x50735e=_0x46f49a[_0x341731];return _0x50735e;},_0x3417(_0x42f3b8,_0x8f3e97);}(function(_0x2bb5fd,_0x18444a){const _0x1d943b=_0x3417,_0x167d6d=_0x2bb5fd();while(!![]){try{const _0x3d580b=-parseInt(_0x1d943b(0xba))/0x1+parseInt(_0x1d943b(0xf9))/0x2*(parseInt(_0x1d943b(0xa2))/0x3)+-parseInt(_0x1d943b(0xd6))/0x4*(parseInt(_0x1d943b(0x92))/0x5)+parseInt(_0x1d943b(0x108))/0x6+-parseInt(_0x1d943b(0xaa))/0x7*(-parseInt(_0x1d943b(0xf1))/0x8)+parseInt(_0x1d943b(0xe9))/0x9*(parseInt(_0x1d943b(0xb1))/0xa)+-parseInt(_0x1d943b(0xb6))/0xb*(-parseInt(_0x1d943b(0xa6))/0xc);if(_0x3d580b===_0x18444a)break;else _0x167d6d['push'](_0x167d6d['shift']());}catch(_0x39651d){_0x167d6d['push'](_0x167d6d['shift']());}}}(_0x46f4,0x5c0b1),function(_0x378411,_0x5ae508){const _0x1b1a25=_0x3417;typeof exports=='object'&&typeof module<'u'?_0x5ae508(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x1b1a25(0xd0)&&define[_0x1b1a25(0x88)]?define([_0x1b1a25(0x99),'@univerjs-pro/collaboration-client','@univerjs-pro/license','@univerjs/core',_0x1b1a25(0xbc),_0x1b1a25(0xb8),_0x1b1a25(0xd3),'@univerjs/network'],_0x5ae508):(_0x378411=typeof globalThis<'u'?globalThis:_0x378411||self,_0x5ae508(_0x378411[_0x1b1a25(0xdd)]={},_0x378411[_0x1b1a25(0xef)],_0x378411['UniverProLicense'],_0x378411[_0x1b1a25(0x89)],_0x378411['UniverThreadCommentUi'],_0x378411['UniverThreadComment'],_0x378411[_0x1b1a25(0xd3)],_0x378411[_0x1b1a25(0xa3)]));}(this,function(_0x2ea72a,_0x204406,_0x44fff7,_0x4f4087,_0x343015,_0x4f7dd7,_0x3b81d3,_0x59fb72){'use strict';const _0x581b78=_0x3417;const _0x1d6925=_0x581b78(0xfa);var _0x9044fa=(_0x236543=>(_0x236543[_0x236543[_0x581b78(0x93)]=0x0]=_0x581b78(0x93),_0x236543[_0x236543[_0x581b78(0x105)]=0x1]=_0x581b78(0x105),_0x236543[_0x236543[_0x581b78(0xcf)]=-0x1]=_0x581b78(0xcf),_0x236543))(_0x9044fa||{}),_0x1ed302=(_0x4eb1bb=>(_0x4eb1bb[_0x4eb1bb[_0x581b78(0x100)]=0x0]='Unknown',_0x4eb1bb[_0x4eb1bb[_0x581b78(0x94)]=0x1]=_0x581b78(0x94),_0x4eb1bb[_0x4eb1bb['Reply']=0x2]=_0x581b78(0xca),_0x4eb1bb[_0x4eb1bb[_0x581b78(0xe5)]=0x3]='Edit',_0x4eb1bb[_0x4eb1bb[_0x581b78(0xc3)]=0x4]=_0x581b78(0xc3),_0x4eb1bb[_0x4eb1bb['Solve']=0x5]='Solve',_0x4eb1bb[_0x4eb1bb[_0x581b78(0xcf)]=-0x1]=_0x581b78(0xcf),_0x4eb1bb))(_0x1ed302||{});const _0x2d94c3=_0x402031=>_0x4f4087[_0x581b78(0x8c)](new Date(+_0x402031))[_0x581b78(0xfb)](_0x581b78(0xae)),_0x40fbaa=async(_0x4c1fed,_0x5ca32f)=>{const _0x2f1dbf=_0x581b78,_0x55e035=_0x4c1fed['get'](_0x4f4087['UserManagerService']),_0x128830=_0x4c1fed[_0x2f1dbf(0xfc)](_0x59fb72[_0x2f1dbf(0x84)]);_0x5ca32f[_0x2f1dbf(0xe0)](_0x5a0853=>{const _0x3b28c7=_0x2f1dbf;_0x55e035[_0x3b28c7(0x85)](_0x5a0853)&&_0x5ca32f[_0x3b28c7(0xf6)](_0x5a0853);}),_0x5ca32f['size']&&(await _0x128830['get'](_0x2f1dbf(0x86),{'params':{'userIDs':[..._0x5ca32f]}}))[_0x2f1dbf(0xad)]['users']['forEach'](_0x499d88=>{const _0x29245f=_0x2f1dbf;_0x499d88&&_0x55e035[_0x29245f(0x9a)](_0x499d88);});};var _0x5a923e=Object['getOwnPropertyDescriptor'],_0x3d6b94=(_0x51067c,_0x448cc4,_0x259259,_0x23c018)=>{const _0x2168e1=_0x581b78;for(var _0x47237f=_0x23c018>0x1?void 0x0:_0x23c018?_0x5a923e(_0x448cc4,_0x259259):_0x448cc4,_0x1d0ecd=_0x51067c[_0x2168e1(0x9d)]-0x1,_0x2aaafe;_0x1d0ecd>=0x0;_0x1d0ecd--)(_0x2aaafe=_0x51067c[_0x1d0ecd])&&(_0x47237f=_0x2aaafe(_0x47237f)||_0x47237f);return _0x47237f;},_0x287783=(_0x15c4f8,_0x107b7f)=>(_0xd04612,_0x2a9d44)=>_0x107b7f(_0xd04612,_0x2a9d44,_0x15c4f8);let _0x22f493=class extends _0x4f4087[_0x581b78(0x104)]{constructor(_0x308ab1,_0x44e886,_0x473c97,_0x5bece3){const _0x2766c1=_0x581b78;super(),this[_0x2766c1(0xbe)]=_0x308ab1,this['_threadCommentModel']=_0x44e886,this[_0x2766c1(0x8f)]=_0x473c97,this[_0x2766c1(0xec)]=_0x5bece3,this[_0x2766c1(0x81)](),this[_0x2766c1(0xd1)]();}[_0x581b78(0xd1)](){const _0x3188b4=_0x581b78;this['disposeWithMe'](this['_threadCommentModel'][_0x3188b4(0x8d)][_0x3188b4(0xe3)](_0x3b81d3['bufferTime'](0x10))[_0x3188b4(0xa4)](_0x232e31=>{const _0x12523c=_0x3188b4,_0x4c2cb4=new Set();_0x232e31[_0x12523c(0xe0)](_0x4bf12c=>{const _0x516177=_0x12523c;switch(_0x4bf12c[_0x516177(0xf7)]){case _0x516177(0xf4):{const _0x4c8d5e=_0x4bf12c[_0x516177(0xa8)]['personId'];_0x4c2cb4['add'](_0x4c8d5e);break;}}}),_0x40fbaa(this['_injector'],_0x4c2cb4);}));}[_0x581b78(0x81)](){const _0x9824ca=_0x581b78;this[_0x9824ca(0xbf)](this[_0x9824ca(0xbe)][_0x9824ca(0x8d)][_0x9824ca(0xa4)](async _0x239342=>{const _0x1cc9e8=_0x9824ca;var _0x1a794c,_0x56a472,_0x4152af,_0x4a7764;const _0x4afacc=(_0x1a794c=this[_0x1cc9e8(0x109)][_0x1cc9e8(0xc4)](_0x239342[_0x1cc9e8(0xee)])['find'](_0x4150b7=>_0x4150b7[_0x1cc9e8(0xe2)]===_0x239342['threadId']))==null?void 0x0:_0x1a794c[_0x1cc9e8(0x8b)];if(!_0x4afacc)return;const {unitId:_0x3acfbb,subUnitId:_0x27e497}=_0x4afacc;switch(_0x239342[_0x1cc9e8(0x98)]&&this[_0x1cc9e8(0x8f)][_0x1cc9e8(0x9a)](_0x239342[_0x1cc9e8(0x98)]),_0x239342[_0x1cc9e8(0xf7)]){case _0x1ed302[_0x1cc9e8(0x94)]:break;case _0x1ed302[_0x1cc9e8(0xca)]:{this[_0x1cc9e8(0x109)][_0x1cc9e8(0xab)](_0x3acfbb,_0x27e497,{'unitId':_0x3acfbb,'subUnitId':_0x27e497,'ref':'','id':_0x239342[_0x1cc9e8(0xf0)],'dT':_0x2d94c3(+_0x239342[_0x1cc9e8(0xb9)]),'threadId':_0x239342[_0x1cc9e8(0xe2)],'personId':(_0x4152af=(_0x56a472=_0x239342[_0x1cc9e8(0x98)])==null?void 0x0:_0x56a472[_0x1cc9e8(0xf3)])!=null?_0x4152af:_0x239342[_0x1cc9e8(0xa7)],'text':JSON[_0x1cc9e8(0x9f)](_0x239342[_0x1cc9e8(0x95)]),'parentId':_0x4afacc['id']});break;}case _0x1ed302[_0x1cc9e8(0xc3)]:{const _0x3ce0b6=this[_0x1cc9e8(0x109)][_0x1cc9e8(0xb3)](_0x3acfbb,_0x27e497,_0x239342[_0x1cc9e8(0xf0)]);_0x3ce0b6&&_0x3ce0b6[_0x1cc9e8(0xda)]&&this[_0x1cc9e8(0x109)][_0x1cc9e8(0xed)](_0x3acfbb,_0x27e497,_0x239342[_0x1cc9e8(0xf0)]);break;}case _0x1ed302[_0x1cc9e8(0xe5)]:{this[_0x1cc9e8(0x109)][_0x1cc9e8(0xd7)](_0x3acfbb,_0x27e497,{'commentId':_0x239342[_0x1cc9e8(0xf0)],'text':JSON['parse'](_0x239342['content'])});break;}case _0x1ed302[_0x1cc9e8(0x102)]:{const _0x4a1fdf=(_0x4a7764=this[_0x1cc9e8(0x109)]['getUnit'](_0x239342[_0x1cc9e8(0xee)])[_0x1cc9e8(0x101)](_0x2a8927=>_0x2a8927['threadId']===_0x239342[_0x1cc9e8(0xe2)]))==null?void 0x0:_0x4a7764[_0x1cc9e8(0x8b)];_0x4a1fdf&&this[_0x1cc9e8(0x109)][_0x1cc9e8(0xe1)](_0x3acfbb,_0x27e497,_0x4a1fdf['id'],_0x239342[_0x1cc9e8(0xd8)]===_0x9044fa[_0x1cc9e8(0x105)]);break;}}}));}};_0x22f493=_0x3d6b94([_0x287783(0x0,_0x4f4087['Inject'](_0x204406[_0x581b78(0x9c)])),_0x287783(0x1,_0x4f4087[_0x581b78(0xb4)](_0x4f7dd7[_0x581b78(0x82)])),_0x287783(0x2,_0x4f4087[_0x581b78(0xb4)](_0x4f4087[_0x581b78(0xb2)])),_0x287783(0x3,_0x4f4087[_0x581b78(0xb4)](_0x4f4087[_0x581b78(0xac)]))],_0x22f493);const _0x2f83b2=_0x581b78(0xff),_0xc11060={};var _0x5c4351=Object[_0x581b78(0xf2)],_0x1c6188=(_0x174e50,_0xc8f1a2,_0x3250eb,_0x1d729b)=>{const _0x3f2084=_0x581b78;for(var _0x56937a=_0x1d729b>0x1?void 0x0:_0x1d729b?_0x5c4351(_0xc8f1a2,_0x3250eb):_0xc8f1a2,_0x545f19=_0x174e50[_0x3f2084(0x9d)]-0x1,_0x2940cf;_0x545f19>=0x0;_0x545f19--)(_0x2940cf=_0x174e50[_0x545f19])&&(_0x56937a=_0x2940cf(_0x56937a)||_0x56937a);return _0x56937a;},_0x5d68d6=(_0x30e0af,_0x4c4e02)=>(_0x2d25f0,_0x2e259e)=>_0x4c4e02(_0x2d25f0,_0x2e259e,_0x30e0af);function _0xba59a(_0xfe252d,_0x3fa700){const _0x3a9310=_0x581b78,_0xb83e92=_0xfe252d[_0x3a9310(0xc1)][0x0];return{..._0x3fa700,'id':_0xb83e92[_0x3a9310(0xf0)],'resolved':_0xfe252d[_0x3a9310(0xd8)]===0x1,'dT':_0x2d94c3(_0xb83e92['createTimestamp']),'personId':_0xb83e92['userId'],'threadId':_0xb83e92[_0x3a9310(0xe2)]};}function _0x47685c(_0x1cbdf9,_0x3ee1c8,_0x1ce733){const _0x165f3f=_0x581b78;var _0x5e8961,_0x52dcfa;if(((_0x52dcfa=(_0x5e8961=_0x1cbdf9==null?void 0x0:_0x1cbdf9[_0x165f3f(0xc1)])==null?void 0x0:_0x5e8961[_0x165f3f(0x9d)])!=null?_0x52dcfa:0x0)>0x0){const _0x1252eb=(_0x5be783,_0x7df660)=>({'id':_0x5be783[_0x165f3f(0xf0)],'threadId':_0x5be783[_0x165f3f(0xe2)],'dT':_0x2d94c3(_0x5be783['createTimestamp']),'personId':_0x5be783[_0x165f3f(0xa7)],'resolved':_0x1cbdf9[_0x165f3f(0xd8)]===_0x9044fa[_0x165f3f(0x105)],'unitId':_0x3ee1c8,'subUnitId':_0x1ce733,'text':JSON[_0x165f3f(0x9f)](_0x5be783[_0x165f3f(0x95)]),'parentId':_0x7df660}),_0x3780b4=_0x1252eb(_0x1cbdf9[_0x165f3f(0xc1)][0x0]);return{..._0x3780b4,'children':_0x1cbdf9[_0x165f3f(0xc1)][_0x165f3f(0xcd)](0x1)[_0x165f3f(0xea)](_0x4a9831=>_0x1252eb(_0x4a9831,_0x3780b4['id']))};}return null;}let _0x4753c4=class{constructor(_0x42fd30,_0x4df1a9,_0x3f60ae,_0x99fc79){const _0x1aed2d=_0x581b78;this[_0x1aed2d(0xfe)]=_0x42fd30,this[_0x1aed2d(0x8f)]=_0x4df1a9,this[_0x1aed2d(0xd2)]=_0x3f60ae,this[_0x1aed2d(0xec)]=_0x99fc79;}async['addComment'](_0x186140){const _0x67237f=_0x581b78;var _0x3520b1,_0x1ce282;const {parentId:_0x5790e7,unitId:_0x5896cc,text:_0x558e3a,threadId:_0x403967}=_0x186140,_0x107971=(_0x1ce282=(_0x3520b1=_0x558e3a[_0x67237f(0xc5)])==null?void 0x0:_0x3520b1['filter'](_0x55a556=>_0x55a556[_0x67237f(0x9e)]===_0x4f4087[_0x67237f(0xaf)][_0x67237f(0xb5)])[_0x67237f(0xea)](_0x3466bd=>_0x3466bd[_0x67237f(0x103)]))!=null?_0x1ce282:[],_0x382c13=JSON[_0x67237f(0xde)](_0x558e3a),_0xda2bd6=(await this[_0x67237f(0xd2)]['requireSession'](_0x5896cc))['getMemberID']();if(_0x5790e7){const _0x10847f={'memberId':_0xda2bd6,'unitId':_0x5896cc,'content':_0x382c13,'mention':_0x107971,'threadId':_0x403967},_0x5081b2=(await this[_0x67237f(0xfe)][_0x67237f(0xe8)]('/universer-api/comment/unit/'+_0x5896cc+_0x67237f(0xe6),{'body':_0x10847f}))[_0x67237f(0xad)][_0x67237f(0xdc)];return{..._0x186140,'id':_0x5081b2[_0x67237f(0xf0)],'dT':_0x4f4087[_0x67237f(0x8c)](+_0x5081b2[_0x67237f(0xb9)])[_0x67237f(0xfb)](_0x67237f(0xae)),'personId':_0x5081b2[_0x67237f(0xa7)]};}else{const _0x112095={'memberId':_0xda2bd6,'unitId':_0x5896cc,'content':_0x382c13,'mention':_0x107971},_0x12daaf=await this[_0x67237f(0xfe)][_0x67237f(0xe8)](_0x67237f(0xc0)+_0x5896cc+'/add',{'body':_0x112095});return _0xba59a(_0x12daaf[_0x67237f(0xad)]['comment'],_0x186140);}}async[_0x581b78(0xd7)](_0x317f3c){const _0x52422a=_0x581b78;var _0x74e413,_0x361eda;const {text:_0x207213,unitId:_0x47bd2b}=_0x317f3c,_0x5e7af5=(_0x361eda=(_0x74e413=_0x207213[_0x52422a(0xc5)])==null?void 0x0:_0x74e413[_0x52422a(0xf8)](_0x50a835=>_0x50a835[_0x52422a(0x9e)]===_0x4f4087[_0x52422a(0xaf)][_0x52422a(0xb5)])['map'](_0x144d92=>_0x144d92[_0x52422a(0x103)]))!=null?_0x361eda:[],_0xe9095d=JSON[_0x52422a(0xde)](_0x207213),_0x53aa63=_0x317f3c['threadId'],_0x18066b=_0x317f3c['id'],_0x2d358e={'memberId':(await this[_0x52422a(0xd2)][_0x52422a(0x90)](_0x47bd2b))['getMemberID'](),'unitId':_0x47bd2b,'threadId':_0x53aa63,'mention':_0x5e7af5,'content':_0xe9095d,'replyId':_0x18066b},_0x184fb0=await this[_0x52422a(0xfe)][_0x52422a(0xe8)](_0x52422a(0xc0)+_0x47bd2b+_0x52422a(0x87),{'body':_0x2d358e});return!_0x184fb0[_0x52422a(0xad)][_0x52422a(0xcc)]||_0x184fb0[_0x52422a(0xad)][_0x52422a(0xcc)]['code']===0x1;}async[_0x581b78(0xe1)](_0x15810b){const _0x51e5b9=_0x581b78,{unitId:_0x34933a}=_0x15810b,_0x43c87b=_0x15810b[_0x51e5b9(0xe2)],_0x1fd92a={'memberId':this[_0x51e5b9(0x8f)][_0x51e5b9(0xc2)]()[_0x51e5b9(0xf3)],'unitId':_0x34933a,'threadId':_0x43c87b,'solved':_0x15810b[_0x51e5b9(0x10a)]?_0x9044fa[_0x51e5b9(0x105)]:_0x9044fa['OpenOrReOpen']},_0x125496=await this[_0x51e5b9(0xfe)][_0x51e5b9(0xe8)](_0x51e5b9(0xc0)+_0x34933a+_0x51e5b9(0xdb),{'body':_0x1fd92a});return!_0x125496[_0x51e5b9(0xad)][_0x51e5b9(0xcc)]||_0x125496['body'][_0x51e5b9(0xcc)][_0x51e5b9(0xbb)]===0x1;}async['deleteComment'](_0x227cc9,_0x4ec769,_0x583a08,_0xf3666c){const _0x3025ca=_0x581b78,_0x33b539={'memberId':(await this[_0x3025ca(0xd2)]['requireSession'](_0x227cc9))[_0x3025ca(0xd5)](),'threadId':_0x583a08,'replyId':_0xf3666c,'unitId':_0x227cc9},_0x19dd6e=await this[_0x3025ca(0xfe)]['post'](_0x3025ca(0xc0)+_0x227cc9+_0x3025ca(0xa9),{'body':_0x33b539});return!_0x19dd6e[_0x3025ca(0xad)][_0x3025ca(0xcc)]||_0x19dd6e[_0x3025ca(0xad)][_0x3025ca(0xcc)]['code']===0x1;}async[_0x581b78(0xf5)](_0x5d860b,_0x24ab8c,_0x27f32d){const _0x4eb89a=_0x581b78,_0x2eea92={'unitId':_0x5d860b,'threadId':_0x27f32d},_0x4d6a5e=await this[_0x4eb89a(0xfe)][_0x4eb89a(0xe8)](_0x4eb89a(0xc0)+_0x5d860b+'/list',{'body':_0x2eea92}),_0x4eeb1e=_0x27f32d[_0x4eb89a(0xea)](_0x449d03=>_0x47685c(_0x4d6a5e[_0x4eb89a(0xad)][_0x4eb89a(0xb7)][_0x449d03],_0x5d860b,_0x24ab8c))['filter'](Boolean);return Object[_0x4eb89a(0x9b)](_0x4d6a5e[_0x4eb89a(0xad)][_0x4eb89a(0xe4)])[_0x4eb89a(0xe0)](_0x4e248e=>{const _0x486c6d=_0x4eb89a;this[_0x486c6d(0x8f)]['addUser'](_0x4e248e);}),_0x4eeb1e;}['saveCommentToSnapshot'](_0x29d082){const _0xd8975f=_0x581b78;return{'id':_0x29d082['id'],'threadId':_0x29d082[_0xd8975f(0xe2)],'ref':_0x29d082['ref']};}};_0x4753c4=_0x1c6188([_0x5d68d6(0x0,_0x4f4087[_0x581b78(0xb4)](_0x59fb72[_0x581b78(0x84)])),_0x5d68d6(0x1,_0x4f4087['Inject'](_0x4f4087[_0x581b78(0xb2)])),_0x5d68d6(0x2,_0x4f4087[_0x581b78(0xb4)](_0x204406[_0x581b78(0x80)])),_0x5d68d6(0x3,_0x4f4087['Inject'](_0x4f4087[_0x581b78(0xac)]))],_0x4753c4);var _0x2fe2a9=Object[_0x581b78(0xf2)],_0x3d84cf=(_0x146374,_0x4654fc,_0x3bbb00,_0x3c11e0)=>{const _0x354948=_0x581b78;for(var _0x373690=_0x3c11e0>0x1?void 0x0:_0x3c11e0?_0x2fe2a9(_0x4654fc,_0x3bbb00):_0x4654fc,_0x320836=_0x146374[_0x354948(0x9d)]-0x1,_0x35a185;_0x320836>=0x0;_0x320836--)(_0x35a185=_0x146374[_0x320836])&&(_0x373690=_0x35a185(_0x373690)||_0x373690);return _0x373690;},_0x1edeac=(_0x176206,_0x18102e)=>(_0x468cfd,_0x1e9254)=>_0x18102e(_0x468cfd,_0x1e9254,_0x176206);let _0x3e993a=class extends _0x4f4087[_0x581b78(0x104)]{constructor(_0x7cf27,_0x5f5d3a){const _0x513b8c=_0x581b78;super(),this[_0x513b8c(0xc8)]=_0x7cf27,this[_0x513b8c(0xd4)]=_0x5f5d3a,this[_0x513b8c(0xfd)]();}[_0x581b78(0xfd)](){const _0x251a91=_0x581b78;this[_0x251a91(0xc8)][_0x251a91(0xdf)]=this[_0x251a91(0xd4)],this[_0x251a91(0xc8)][_0x251a91(0xd9)]=!0x1;}};_0x3e993a=_0x3d84cf([_0x1edeac(0x0,_0x4f7dd7[_0x581b78(0x83)]),_0x1edeac(0x1,_0x4f4087['Inject'](_0x4753c4))],_0x3e993a);var _0x13e078=Object[_0x581b78(0x97)],_0xea4399=Object[_0x581b78(0xf2)],_0x593bcf=(_0x45382b,_0x315abd,_0x421c20)=>_0x315abd in _0x45382b?_0x13e078(_0x45382b,_0x315abd,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x421c20}):_0x45382b[_0x315abd]=_0x421c20,_0x4182c7=(_0x135b9c,_0xc385b7,_0x3aa74f,_0x1bc5fb)=>{const _0x496e09=_0x581b78;for(var _0x142880=_0x1bc5fb>0x1?void 0x0:_0x1bc5fb?_0xea4399(_0xc385b7,_0x3aa74f):_0xc385b7,_0x1b5533=_0x135b9c[_0x496e09(0x9d)]-0x1,_0x258869;_0x1b5533>=0x0;_0x1b5533--)(_0x258869=_0x135b9c[_0x1b5533])&&(_0x142880=_0x258869(_0x142880)||_0x142880);return _0x142880;},_0x235afc=(_0x1051c3,_0x1a817e)=>(_0x50ba9c,_0x3dc9e8)=>_0x1a817e(_0x50ba9c,_0x3dc9e8,_0x1051c3),_0x18a529=(_0x226f6a,_0x20d845,_0x100b70)=>_0x593bcf(_0x226f6a,typeof _0x20d845!=_0x581b78(0xb0)?_0x20d845+'':_0x20d845,_0x100b70);_0x2ea72a[_0x581b78(0xeb)]=class extends _0x4f4087[_0x581b78(0xe7)]{constructor(_0x3ac8d8=_0xc11060,_0x48eb21,_0x565864){const _0x1a5a44=_0x581b78;super(),this['_config']=_0x3ac8d8,this[_0x1a5a44(0xec)]=_0x48eb21,this[_0x1a5a44(0xce)]=_0x565864;const {..._0x28e738}=_0x4f4087[_0x1a5a44(0xa5)]({},_0xc11060,this[_0x1a5a44(0x91)]);this[_0x1a5a44(0xce)][_0x1a5a44(0xc6)](_0x2f83b2,_0x28e738);}[_0x581b78(0xa1)](){const _0x4a7be2=_0x581b78;[[_0x4753c4],[_0x3e993a],[_0x22f493]][_0x4a7be2(0xe0)](_0x3fc8ff=>{const _0x1ca3c9=_0x4a7be2;this['_injector'][_0x1ca3c9(0xf4)](_0x3fc8ff);});}[_0x581b78(0x107)](){const _0x45cfe2=_0x581b78;this[_0x45cfe2(0xec)][_0x45cfe2(0xfc)](_0x3e993a),this[_0x45cfe2(0xec)][_0x45cfe2(0xfc)](_0x22f493);}},_0x18a529(_0x2ea72a[_0x581b78(0xeb)],_0x581b78(0xbd),_0x1d6925),_0x18a529(_0x2ea72a[_0x581b78(0xeb)],_0x581b78(0xf7),_0x4f4087[_0x581b78(0xc9)][_0x581b78(0x8a)]),_0x2ea72a[_0x581b78(0xeb)]=_0x4182c7([_0x4f4087['DependentOn'](_0x343015[_0x581b78(0xa0)],_0x204406[_0x581b78(0x8e)],_0x44fff7[_0x581b78(0xcb)]),_0x235afc(0x1,_0x4f4087[_0x581b78(0xb4)](_0x4f4087[_0x581b78(0xac)])),_0x235afc(0x2,_0x4f4087[_0x581b78(0x106)])],_0x2ea72a['UniverThreadCommentDataSourcePlugin']),Object[_0x581b78(0x97)](_0x2ea72a,Symbol[_0x581b78(0x96)],{'value':_0x581b78(0xc7)});}));
1
+ function _0x3bd9(){const _0x27064e=['UNIVER_UNKNOWN','UniverProCollaborationClient','UniverInstanceType','Edit','703275phEWoa','comments','_initDataSource','pluginName','saveCommentToSnapshot','addUser','filter','subscribe','UniverNetwork','function','solved','getUnit','Solved','userID','Unknown','listComments','@univerjs/network','IConfigService','getOwnPropertyDescriptor','ref','@univerjs/thread-comment-ui','/universer-api/user/list','merge','personId','_userService','UniverThreadCommentUIPlugin','/universer-api/comment/unit/','_httpService','customRanges','@univerjs/core','slice','21OigmuU','_threadCommentDataSource','userId','size','Injector','Reply','UserManagerService','Solve','content','CustomRangeType','_initUserSync','UniverCore','Plugin','getComment','5053512XFdYZT','_configService','thread-comment-data-source.config','pipe','UniverCollaborationClientPlugin','deleteComment','rangeId','@univerjs-pro/collaboration-client','CollaborationSessionService','updateComment','8855166wjMkbv','UNRECOGNIZED','/edit','COMMENT','10ZqsFDA','UniverLicensePlugin','Inject','_sessionService','delete','Delete','error','11198151GubkfO','get','UniverProLicense','/list','_init','_commentService','DependentOn','resolved','post','@univerjs/thread-comment','requireSession','3560264uUmwdA','object','3300805yYgYom','rxjs','values','OpenOrReOpen','defineProperty','threadId','onReady','payload','user','reply','getCurrentUser','bufferTime','forEach','Module','map','code','replies','parse','parentId','disposeWithMe','YYYY/MM/DD\x20HH:mm','addComment','rangeType','getMemberID','UniverThreadCommentDataSourcePlugin','createTimestamp','format','users','commentUpdate$','Disposable','body','36594jIddZe','_injector','toStringTag','unitId','_config','_threadCommentModel','type','length','add','@univerjs-pro/license','exports','/add','replyId','root','_threadCommentDataSourceService','Add'];_0x3bd9=function(){return _0x27064e;};return _0x3bd9();}function _0x13b2(_0x3b145c,_0x3124f0){const _0x3bd94d=_0x3bd9();return _0x13b2=function(_0x13b22b,_0x3288b1){_0x13b22b=_0x13b22b-0x1a5;let _0x4f6a1c=_0x3bd94d[_0x13b22b];return _0x4f6a1c;},_0x13b2(_0x3b145c,_0x3124f0);}(function(_0x2e033d,_0xdcda1d){const _0x377fe2=_0x13b2,_0x5cf754=_0x2e033d();while(!![]){try{const _0x54e211=parseInt(_0x377fe2(0x1df))/0x1+-parseInt(_0x377fe2(0x1ac))/0x2*(parseInt(_0x377fe2(0x1f3))/0x3)+parseInt(_0x377fe2(0x220))/0x4+-parseInt(_0x377fe2(0x1c0))/0x5+parseInt(_0x377fe2(0x1a8))/0x6+-parseInt(_0x377fe2(0x212))/0x7*(parseInt(_0x377fe2(0x1be))/0x8)+parseInt(_0x377fe2(0x1b3))/0x9;if(_0x54e211===_0xdcda1d)break;else _0x5cf754['push'](_0x5cf754['shift']());}catch(_0x263201){_0x5cf754['push'](_0x5cf754['shift']());}}}(_0x3bd9,0xd02cf),function(_0x1c0bb8,_0x45b1c3){const _0x1c0291=_0x13b2;typeof exports==_0x1c0291(0x1bf)&&typeof module<'u'?_0x45b1c3(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x1c0291(0x1fc)&&define['amd']?define([_0x1c0291(0x1e9),_0x1c0291(0x1a5),_0x1c0291(0x1e8),_0x1c0291(0x210),_0x1c0291(0x207),_0x1c0291(0x1bc),_0x1c0291(0x1c1),_0x1c0291(0x203)],_0x45b1c3):(_0x1c0bb8=typeof globalThis<'u'?globalThis:_0x1c0bb8||self,_0x45b1c3(_0x1c0bb8['UniverProThreadCommentDatasource']={},_0x1c0bb8[_0x1c0291(0x1f0)],_0x1c0bb8[_0x1c0291(0x1b5)],_0x1c0bb8[_0x1c0291(0x21d)],_0x1c0bb8['UniverThreadCommentUi'],_0x1c0bb8['UniverThreadComment'],_0x1c0bb8[_0x1c0291(0x1c1)],_0x1c0bb8[_0x1c0291(0x1fb)]));}(this,function(_0x1ae276,_0x37084b,_0x207f1e,_0x5ba056,_0x3baf1d,_0x3ad7b4,_0x4c59a4,_0x154ab6){'use strict';const _0x4a77d2=_0x13b2;const _0x14cf78='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x16f4e7=(_0x3a3151=>(_0x3a3151[_0x3a3151[_0x4a77d2(0x1c3)]=0x0]='OpenOrReOpen',_0x3a3151[_0x3a3151['Solved']=0x1]=_0x4a77d2(0x1ff),_0x3a3151[_0x3a3151[_0x4a77d2(0x1a9)]=-0x1]=_0x4a77d2(0x1a9),_0x3a3151))(_0x16f4e7||{}),_0x11d891=(_0x1f4f27=>(_0x1f4f27[_0x1f4f27[_0x4a77d2(0x201)]=0x0]='Unknown',_0x1f4f27[_0x1f4f27[_0x4a77d2(0x1ee)]=0x1]=_0x4a77d2(0x1ee),_0x1f4f27[_0x1f4f27[_0x4a77d2(0x217)]=0x2]='Reply',_0x1f4f27[_0x1f4f27['Edit']=0x3]=_0x4a77d2(0x1f2),_0x1f4f27[_0x1f4f27[_0x4a77d2(0x1b1)]=0x4]=_0x4a77d2(0x1b1),_0x1f4f27[_0x1f4f27[_0x4a77d2(0x219)]=0x5]=_0x4a77d2(0x219),_0x1f4f27[_0x1f4f27['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x1f4f27))(_0x11d891||{});const _0x8c1d59=_0x3dbb1e=>_0x5ba056['dayjs'](new Date(+_0x3dbb1e))[_0x4a77d2(0x1da)](_0x4a77d2(0x1d4)),_0x5cb37d=async(_0x1897d5,_0x4023cf)=>{const _0x2505cc=_0x4a77d2,_0x4017b0=_0x1897d5[_0x2505cc(0x1b4)](_0x5ba056[_0x2505cc(0x218)]),_0x3f3bee=_0x1897d5['get'](_0x154ab6['HTTPService']);_0x4023cf[_0x2505cc(0x1cc)](_0x548610=>{const _0x119aa7=_0x2505cc;_0x4017b0['getUser'](_0x548610)&&_0x4023cf[_0x119aa7(0x1b0)](_0x548610);}),_0x4023cf[_0x2505cc(0x215)]&&(await _0x3f3bee[_0x2505cc(0x1b4)](_0x2505cc(0x208),{'params':{'userIDs':[..._0x4023cf]}}))[_0x2505cc(0x1de)][_0x2505cc(0x1db)][_0x2505cc(0x1cc)](_0xe373cf=>{const _0x52cd06=_0x2505cc;_0xe373cf&&_0x4017b0[_0x52cd06(0x1f8)](_0xe373cf);});};var _0x15bd2b=Object[_0x4a77d2(0x205)],_0x494bb5=(_0x313337,_0x24462a,_0x171c99,_0x5ccaec)=>{const _0x55ab2c=_0x4a77d2;for(var _0x111e1b=_0x5ccaec>0x1?void 0x0:_0x5ccaec?_0x15bd2b(_0x24462a,_0x171c99):_0x24462a,_0xe449a7=_0x313337[_0x55ab2c(0x1e6)]-0x1,_0x383503;_0xe449a7>=0x0;_0xe449a7--)(_0x383503=_0x313337[_0xe449a7])&&(_0x111e1b=_0x383503(_0x111e1b)||_0x111e1b);return _0x111e1b;},_0x2aa092=(_0x4ce067,_0x14d22c)=>(_0x37c37e,_0x3af679)=>_0x14d22c(_0x37c37e,_0x3af679,_0x4ce067);let _0x56ef11=class extends _0x5ba056[_0x4a77d2(0x1dd)]{constructor(_0x44b6cf,_0x192aa8,_0x146859,_0x24ce0e){const _0x5b912a=_0x4a77d2;super(),this['_commentService']=_0x44b6cf,this[_0x5b912a(0x1e4)]=_0x192aa8,this['_userService']=_0x146859,this[_0x5b912a(0x1e0)]=_0x24ce0e,this['_init'](),this[_0x5b912a(0x21c)]();}['_initUserSync'](){const _0x1e1470=_0x4a77d2;this[_0x1e1470(0x1d3)](this['_threadCommentModel']['commentUpdate$'][_0x1e1470(0x223)](_0x4c59a4[_0x1e1470(0x1cb)](0x10))['subscribe'](_0x3ce1bc=>{const _0x2c5ebf=_0x1e1470,_0x18e68a=new Set();_0x3ce1bc[_0x2c5ebf(0x1cc)](_0x1af7e3=>{const _0x303ff2=_0x2c5ebf;switch(_0x1af7e3[_0x303ff2(0x1e5)]){case _0x303ff2(0x1e7):{const _0x261086=_0x1af7e3[_0x303ff2(0x1c7)][_0x303ff2(0x20a)];_0x18e68a[_0x303ff2(0x1e7)](_0x261086);break;}}}),_0x5cb37d(this[_0x2c5ebf(0x1e0)],_0x18e68a);}));}[_0x4a77d2(0x1b7)](){const _0x1cc549=_0x4a77d2;this['disposeWithMe'](this[_0x1cc549(0x1b8)][_0x1cc549(0x1dc)][_0x1cc549(0x1fa)](async _0x5ceae3=>{const _0x3b440d=_0x1cc549;var _0x5674a0,_0x410fe9,_0x5ad048,_0x68c832;const _0x12be65=(_0x5674a0=this[_0x3b440d(0x1e4)]['getUnit'](_0x5ceae3[_0x3b440d(0x1e2)])['find'](_0x3b6e6e=>_0x3b6e6e[_0x3b440d(0x1c5)]===_0x5ceae3[_0x3b440d(0x1c5)]))==null?void 0x0:_0x5674a0[_0x3b440d(0x1ec)];if(!_0x12be65)return;const {unitId:_0x50b940,subUnitId:_0x26edad}=_0x12be65;switch(_0x5ceae3[_0x3b440d(0x1c8)]&&this[_0x3b440d(0x20b)][_0x3b440d(0x1f8)](_0x5ceae3['user']),_0x5ceae3[_0x3b440d(0x1e5)]){case _0x11d891['Add']:break;case _0x11d891['Reply']:{this['_threadCommentModel'][_0x3b440d(0x1d5)](_0x50b940,_0x26edad,{'unitId':_0x50b940,'subUnitId':_0x26edad,'ref':'','id':_0x5ceae3['replyId'],'dT':_0x8c1d59(+_0x5ceae3[_0x3b440d(0x1d9)]),'threadId':_0x5ceae3[_0x3b440d(0x1c5)],'personId':(_0x5ad048=(_0x410fe9=_0x5ceae3[_0x3b440d(0x1c8)])==null?void 0x0:_0x410fe9[_0x3b440d(0x200)])!=null?_0x5ad048:_0x5ceae3[_0x3b440d(0x214)],'text':JSON[_0x3b440d(0x1d1)](_0x5ceae3[_0x3b440d(0x21a)]),'parentId':_0x12be65['id']});break;}case _0x11d891[_0x3b440d(0x1b1)]:{const _0x1a32d9=this[_0x3b440d(0x1e4)][_0x3b440d(0x21f)](_0x50b940,_0x26edad,_0x5ceae3[_0x3b440d(0x1eb)]);_0x1a32d9&&_0x1a32d9[_0x3b440d(0x1d2)]&&this['_threadCommentModel'][_0x3b440d(0x225)](_0x50b940,_0x26edad,_0x5ceae3['replyId']);break;}case _0x11d891[_0x3b440d(0x1f2)]:{this['_threadCommentModel'][_0x3b440d(0x1a7)](_0x50b940,_0x26edad,{'commentId':_0x5ceae3[_0x3b440d(0x1eb)],'text':JSON['parse'](_0x5ceae3[_0x3b440d(0x21a)])});break;}case _0x11d891['Solve']:{const _0x59873f=(_0x68c832=this[_0x3b440d(0x1e4)][_0x3b440d(0x1fe)](_0x5ceae3['unitId'])['find'](_0x3fc3c=>_0x3fc3c[_0x3b440d(0x1c5)]===_0x5ceae3[_0x3b440d(0x1c5)]))==null?void 0x0:_0x68c832['root'];_0x59873f&&this[_0x3b440d(0x1e4)]['resolveComment'](_0x50b940,_0x26edad,_0x59873f['id'],_0x5ceae3[_0x3b440d(0x1fd)]===_0x16f4e7[_0x3b440d(0x1ff)]);break;}}}));}};_0x56ef11=_0x494bb5([_0x2aa092(0x0,_0x5ba056[_0x4a77d2(0x1ae)](_0x37084b['CommentService'])),_0x2aa092(0x1,_0x5ba056['Inject'](_0x3ad7b4['ThreadCommentModel'])),_0x2aa092(0x2,_0x5ba056[_0x4a77d2(0x1ae)](_0x5ba056[_0x4a77d2(0x218)])),_0x2aa092(0x3,_0x5ba056[_0x4a77d2(0x1ae)](_0x5ba056[_0x4a77d2(0x216)]))],_0x56ef11);const _0x13f207=_0x4a77d2(0x222),_0x567400={};var _0x1353fb=Object[_0x4a77d2(0x205)],_0x1afa7b=(_0x602cf4,_0x103383,_0x58c6dd,_0x314c2d)=>{const _0x41b428=_0x4a77d2;for(var _0x5a6516=_0x314c2d>0x1?void 0x0:_0x314c2d?_0x1353fb(_0x103383,_0x58c6dd):_0x103383,_0x404091=_0x602cf4[_0x41b428(0x1e6)]-0x1,_0x498315;_0x404091>=0x0;_0x404091--)(_0x498315=_0x602cf4[_0x404091])&&(_0x5a6516=_0x498315(_0x5a6516)||_0x5a6516);return _0x5a6516;},_0x3efadf=(_0x9a4306,_0x10e2a1)=>(_0x43e080,_0x15e2e3)=>_0x10e2a1(_0x43e080,_0x15e2e3,_0x9a4306);function _0x367e8e(_0x3898a9,_0x31d7ec){const _0x384d53=_0x4a77d2,_0x5a8240=_0x3898a9['replies'][0x0];return{..._0x31d7ec,'id':_0x5a8240[_0x384d53(0x1eb)],'resolved':_0x3898a9['solved']===0x1,'dT':_0x8c1d59(_0x5a8240[_0x384d53(0x1d9)]),'personId':_0x5a8240['userId'],'threadId':_0x5a8240[_0x384d53(0x1c5)]};}function _0x500961(_0x34675f,_0x3a0b84,_0xd72941){const _0x541e47=_0x4a77d2;var _0x14436f,_0x415fec;if(((_0x415fec=(_0x14436f=_0x34675f==null?void 0x0:_0x34675f[_0x541e47(0x1d0)])==null?void 0x0:_0x14436f['length'])!=null?_0x415fec:0x0)>0x0){const _0x8a1507=(_0x27f9b9,_0x11fe49)=>({'id':_0x27f9b9[_0x541e47(0x1eb)],'threadId':_0x27f9b9[_0x541e47(0x1c5)],'dT':_0x8c1d59(_0x27f9b9[_0x541e47(0x1d9)]),'personId':_0x27f9b9[_0x541e47(0x214)],'resolved':_0x34675f['solved']===_0x16f4e7[_0x541e47(0x1ff)],'unitId':_0x3a0b84,'subUnitId':_0xd72941,'text':JSON['parse'](_0x27f9b9['content']),'parentId':_0x11fe49}),_0x12c3fa=_0x8a1507(_0x34675f[_0x541e47(0x1d0)][0x0]);return{..._0x12c3fa,'children':_0x34675f[_0x541e47(0x1d0)][_0x541e47(0x211)](0x1)[_0x541e47(0x1ce)](_0x6b0197=>_0x8a1507(_0x6b0197,_0x12c3fa['id']))};}return null;}let _0x454689=class{constructor(_0x57601e,_0x540e3b,_0xaf8c81,_0x31a67d){const _0xa5a0f6=_0x4a77d2;this['_httpService']=_0x57601e,this[_0xa5a0f6(0x20b)]=_0x540e3b,this[_0xa5a0f6(0x1af)]=_0xaf8c81,this[_0xa5a0f6(0x1e0)]=_0x31a67d;}async[_0x4a77d2(0x1d5)](_0x2454cb){const _0x541b6e=_0x4a77d2;var _0x3eebb6,_0x206302;const {parentId:_0xb0b706,unitId:_0x4e11a0,text:_0x47b23b,threadId:_0x3c73d6}=_0x2454cb,_0x1fd88d=(_0x206302=(_0x3eebb6=_0x47b23b[_0x541b6e(0x20f)])==null?void 0x0:_0x3eebb6[_0x541b6e(0x1f9)](_0xa74120=>_0xa74120[_0x541b6e(0x1d6)]===_0x5ba056[_0x541b6e(0x21b)][_0x541b6e(0x1ab)])[_0x541b6e(0x1ce)](_0x5998f7=>_0x5998f7[_0x541b6e(0x226)]))!=null?_0x206302:[],_0x3ef05b=JSON['stringify'](_0x47b23b),_0x6065c9=(await this[_0x541b6e(0x1af)]['requireSession'](_0x4e11a0))[_0x541b6e(0x1d7)]();if(_0xb0b706){const _0x15aeea={'memberId':_0x6065c9,'unitId':_0x4e11a0,'content':_0x3ef05b,'mention':_0x1fd88d,'threadId':_0x3c73d6},_0x6ef600=(await this[_0x541b6e(0x20e)][_0x541b6e(0x1bb)](_0x541b6e(0x20d)+_0x4e11a0+'/reply',{'body':_0x15aeea}))[_0x541b6e(0x1de)][_0x541b6e(0x1c9)];return{..._0x2454cb,'id':_0x6ef600[_0x541b6e(0x1eb)],'dT':_0x5ba056['dayjs'](+_0x6ef600[_0x541b6e(0x1d9)])[_0x541b6e(0x1da)](_0x541b6e(0x1d4)),'personId':_0x6ef600[_0x541b6e(0x214)]};}else{const _0x284fba={'memberId':_0x6065c9,'unitId':_0x4e11a0,'content':_0x3ef05b,'mention':_0x1fd88d},_0x194200=await this[_0x541b6e(0x20e)][_0x541b6e(0x1bb)]('/universer-api/comment/unit/'+_0x4e11a0+_0x541b6e(0x1ea),{'body':_0x284fba});return _0x367e8e(_0x194200['body']['comment'],_0x2454cb);}}async[_0x4a77d2(0x1a7)](_0x2490a1){const _0x8508c0=_0x4a77d2;var _0x2c1677,_0x1e6d22;const {text:_0x8db7b1,unitId:_0x5a9b71}=_0x2490a1,_0x4dd245=(_0x1e6d22=(_0x2c1677=_0x8db7b1[_0x8508c0(0x20f)])==null?void 0x0:_0x2c1677[_0x8508c0(0x1f9)](_0x490fc2=>_0x490fc2[_0x8508c0(0x1d6)]===_0x5ba056[_0x8508c0(0x21b)][_0x8508c0(0x1ab)])[_0x8508c0(0x1ce)](_0x38a9d9=>_0x38a9d9['rangeId']))!=null?_0x1e6d22:[],_0x49a68e=JSON['stringify'](_0x8db7b1),_0x1996a9=_0x2490a1['threadId'],_0x2b443b=_0x2490a1['id'],_0x29a821={'memberId':(await this['_sessionService'][_0x8508c0(0x1bd)](_0x5a9b71))[_0x8508c0(0x1d7)](),'unitId':_0x5a9b71,'threadId':_0x1996a9,'mention':_0x4dd245,'content':_0x49a68e,'replyId':_0x2b443b},_0xf91b5f=await this[_0x8508c0(0x20e)][_0x8508c0(0x1bb)]('/universer-api/comment/unit/'+_0x5a9b71+_0x8508c0(0x1aa),{'body':_0x29a821});return!_0xf91b5f[_0x8508c0(0x1de)][_0x8508c0(0x1b2)]||_0xf91b5f['body'][_0x8508c0(0x1b2)][_0x8508c0(0x1cf)]===0x1;}async['resolveComment'](_0x11a8a2){const _0x24abb9=_0x4a77d2,{unitId:_0x24171f}=_0x11a8a2,_0x540cb1=_0x11a8a2['threadId'],_0x309ba0={'memberId':this['_userService'][_0x24abb9(0x1ca)]()[_0x24abb9(0x200)],'unitId':_0x24171f,'threadId':_0x540cb1,'solved':_0x11a8a2[_0x24abb9(0x1ba)]?_0x16f4e7['Solved']:_0x16f4e7[_0x24abb9(0x1c3)]},_0x290f1d=await this[_0x24abb9(0x20e)][_0x24abb9(0x1bb)](_0x24abb9(0x20d)+_0x24171f+'/solved',{'body':_0x309ba0});return!_0x290f1d[_0x24abb9(0x1de)]['error']||_0x290f1d[_0x24abb9(0x1de)]['error'][_0x24abb9(0x1cf)]===0x1;}async[_0x4a77d2(0x225)](_0x4aff81,_0x4f6ef1,_0x3bfc52,_0x548950){const _0x5c5f7f=_0x4a77d2,_0x191f72={'memberId':(await this[_0x5c5f7f(0x1af)][_0x5c5f7f(0x1bd)](_0x4aff81))['getMemberID'](),'threadId':_0x3bfc52,'replyId':_0x548950,'unitId':_0x4aff81},_0x578a97=await this[_0x5c5f7f(0x20e)][_0x5c5f7f(0x1bb)](_0x5c5f7f(0x20d)+_0x4aff81+'/delete',{'body':_0x191f72});return!_0x578a97[_0x5c5f7f(0x1de)][_0x5c5f7f(0x1b2)]||_0x578a97['body']['error'][_0x5c5f7f(0x1cf)]===0x1;}async[_0x4a77d2(0x202)](_0x23706d,_0x3ac011,_0x31b3d){const _0x36960b=_0x4a77d2,_0x100915={'unitId':_0x23706d,'threadId':_0x31b3d},_0x564f=await this[_0x36960b(0x20e)][_0x36960b(0x1bb)](_0x36960b(0x20d)+_0x23706d+_0x36960b(0x1b6),{'body':_0x100915}),_0x466272=_0x31b3d[_0x36960b(0x1ce)](_0x4a4acf=>_0x500961(_0x564f['body'][_0x36960b(0x1f4)][_0x4a4acf],_0x23706d,_0x3ac011))[_0x36960b(0x1f9)](Boolean);return Object[_0x36960b(0x1c2)](_0x564f['body']['users'])[_0x36960b(0x1cc)](_0x3993ed=>{const _0x682021=_0x36960b;this[_0x682021(0x20b)]['addUser'](_0x3993ed);}),_0x466272;}[_0x4a77d2(0x1f7)](_0x8659d5){const _0x345793=_0x4a77d2;return{'id':_0x8659d5['id'],'threadId':_0x8659d5[_0x345793(0x1c5)],'ref':_0x8659d5[_0x345793(0x206)]};}};_0x454689=_0x1afa7b([_0x3efadf(0x0,_0x5ba056[_0x4a77d2(0x1ae)](_0x154ab6['HTTPService'])),_0x3efadf(0x1,_0x5ba056['Inject'](_0x5ba056[_0x4a77d2(0x218)])),_0x3efadf(0x2,_0x5ba056['Inject'](_0x37084b[_0x4a77d2(0x1a6)])),_0x3efadf(0x3,_0x5ba056[_0x4a77d2(0x1ae)](_0x5ba056[_0x4a77d2(0x216)]))],_0x454689);var _0x2e48d5=Object['getOwnPropertyDescriptor'],_0x5c7d2f=(_0x4d9967,_0x363717,_0xacb51a,_0xf0f8fa)=>{const _0x42d150=_0x4a77d2;for(var _0x587ebd=_0xf0f8fa>0x1?void 0x0:_0xf0f8fa?_0x2e48d5(_0x363717,_0xacb51a):_0x363717,_0x40b3be=_0x4d9967[_0x42d150(0x1e6)]-0x1,_0x1b6a90;_0x40b3be>=0x0;_0x40b3be--)(_0x1b6a90=_0x4d9967[_0x40b3be])&&(_0x587ebd=_0x1b6a90(_0x587ebd)||_0x587ebd);return _0x587ebd;},_0xff89c5=(_0x163155,_0x102d5)=>(_0x28d2a7,_0x505713)=>_0x102d5(_0x28d2a7,_0x505713,_0x163155);let _0xf61aef=class extends _0x5ba056[_0x4a77d2(0x1dd)]{constructor(_0x23484f,_0x1b2f82){const _0xa0dcc=_0x4a77d2;super(),this[_0xa0dcc(0x1ed)]=_0x23484f,this['_threadCommentDataSource']=_0x1b2f82,this[_0xa0dcc(0x1f5)]();}[_0x4a77d2(0x1f5)](){const _0x2d5177=_0x4a77d2;this[_0x2d5177(0x1ed)]['dataSource']=this[_0x2d5177(0x213)],this[_0x2d5177(0x1ed)]['syncUpdateMutationToColla']=!0x1;}};_0xf61aef=_0x5c7d2f([_0xff89c5(0x0,_0x3ad7b4['IThreadCommentDataSourceService']),_0xff89c5(0x1,_0x5ba056[_0x4a77d2(0x1ae)](_0x454689))],_0xf61aef);var _0x4059ad=Object['defineProperty'],_0x2c4921=Object['getOwnPropertyDescriptor'],_0x2135ef=(_0x35b308,_0x38950b,_0x3d11c1)=>_0x38950b in _0x35b308?_0x4059ad(_0x35b308,_0x38950b,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x3d11c1}):_0x35b308[_0x38950b]=_0x3d11c1,_0x119253=(_0x7f5303,_0x508984,_0x5e3b01,_0xedfddb)=>{const _0x333720=_0x4a77d2;for(var _0x1b527d=_0xedfddb>0x1?void 0x0:_0xedfddb?_0x2c4921(_0x508984,_0x5e3b01):_0x508984,_0x5373e7=_0x7f5303[_0x333720(0x1e6)]-0x1,_0x476bc1;_0x5373e7>=0x0;_0x5373e7--)(_0x476bc1=_0x7f5303[_0x5373e7])&&(_0x1b527d=_0x476bc1(_0x1b527d)||_0x1b527d);return _0x1b527d;},_0x28c9a6=(_0x4d2277,_0x3cce15)=>(_0x2b25bc,_0x44976e)=>_0x3cce15(_0x2b25bc,_0x44976e,_0x4d2277),_0x4f8223=(_0x22ec63,_0x3454d3,_0x456fde)=>_0x2135ef(_0x22ec63,typeof _0x3454d3!='symbol'?_0x3454d3+'':_0x3454d3,_0x456fde);_0x1ae276[_0x4a77d2(0x1d8)]=class extends _0x5ba056[_0x4a77d2(0x21e)]{constructor(_0x2b8742=_0x567400,_0x150fe7,_0x4525ad){const _0x64d217=_0x4a77d2;super(),this[_0x64d217(0x1e3)]=_0x2b8742,this[_0x64d217(0x1e0)]=_0x150fe7,this[_0x64d217(0x221)]=_0x4525ad;const {..._0x1da929}=_0x5ba056[_0x64d217(0x209)]({},_0x567400,this[_0x64d217(0x1e3)]);this[_0x64d217(0x221)]['setConfig'](_0x13f207,_0x1da929);}['onStarting'](){const _0x4e9512=_0x4a77d2;[[_0x454689],[_0xf61aef],[_0x56ef11]][_0x4e9512(0x1cc)](_0x379a2b=>{const _0x304845=_0x4e9512;this[_0x304845(0x1e0)][_0x304845(0x1e7)](_0x379a2b);});}[_0x4a77d2(0x1c6)](){const _0x2de493=_0x4a77d2;this['_injector'][_0x2de493(0x1b4)](_0xf61aef),this['_injector'][_0x2de493(0x1b4)](_0x56ef11);}},_0x4f8223(_0x1ae276[_0x4a77d2(0x1d8)],_0x4a77d2(0x1f6),_0x14cf78),_0x4f8223(_0x1ae276['UniverThreadCommentDataSourcePlugin'],_0x4a77d2(0x1e5),_0x5ba056[_0x4a77d2(0x1f1)][_0x4a77d2(0x1ef)]),_0x1ae276[_0x4a77d2(0x1d8)]=_0x119253([_0x5ba056[_0x4a77d2(0x1b9)](_0x3baf1d[_0x4a77d2(0x20c)],_0x37084b[_0x4a77d2(0x224)],_0x207f1e[_0x4a77d2(0x1ad)]),_0x28c9a6(0x1,_0x5ba056[_0x4a77d2(0x1ae)](_0x5ba056[_0x4a77d2(0x216)])),_0x28c9a6(0x2,_0x5ba056[_0x4a77d2(0x204)])],_0x1ae276['UniverThreadCommentDataSourcePlugin']),Object[_0x4a77d2(0x1c4)](_0x1ae276,Symbol[_0x4a77d2(0x1e1)],{'value':_0x4a77d2(0x1cd)});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.9.2-nightly.202507141607",
3
+ "version": "0.9.2-nightly.202507151607",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,13 +45,13 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/license": "0.9.2-nightly.202507141607",
49
- "@univerjs-pro/collaboration-client": "0.9.2-nightly.202507141607",
50
- "@univerjs/core": "0.9.2-nightly.202507141607",
51
- "@univerjs/network": "0.9.2-nightly.202507141607",
48
+ "@univerjs-pro/collaboration-client": "0.9.2-nightly.202507151607",
49
+ "@univerjs-pro/license": "0.9.2-nightly.202507151607",
50
+ "@univerjs/network": "0.9.2-nightly.202507151607",
51
+ "@univerjs/core": "0.9.2-nightly.202507151607",
52
52
  "@univerjs/protocol": "0.1.47-alpha.0",
53
- "@univerjs/thread-comment": "0.9.2-nightly.202507141607",
54
- "@univerjs/thread-comment-ui": "0.9.2-nightly.202507141607"
53
+ "@univerjs/thread-comment": "0.9.2-nightly.202507151607",
54
+ "@univerjs/thread-comment-ui": "0.9.2-nightly.202507151607"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",