@univerjs-pro/thread-comment-datasource 0.8.1-nightly.202506191607 → 0.8.2-nightly.202506201607

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 _0x15e887=_0x1164;(function(_0xc94286,_0xc09eb4){const _0x1dd8a4=_0x1164,_0x201b32=_0xc94286();while(!![]){try{const _0x227a56=-parseInt(_0x1dd8a4(0x90))/0x1+parseInt(_0x1dd8a4(0xbb))/0x2*(-parseInt(_0x1dd8a4(0xaf))/0x3)+parseInt(_0x1dd8a4(0xd1))/0x4*(parseInt(_0x1dd8a4(0xcd))/0x5)+parseInt(_0x1dd8a4(0x9f))/0x6+parseInt(_0x1dd8a4(0xad))/0x7+parseInt(_0x1dd8a4(0xd3))/0x8+-parseInt(_0x1dd8a4(0x76))/0x9;if(_0x227a56===_0xc09eb4)break;else _0x201b32['push'](_0x201b32['shift']());}catch(_0x34bb93){_0x201b32['push'](_0x201b32['shift']());}}}(_0x2408,0x9b654));Object[_0x15e887(0xa9)](exports,Symbol[_0x15e887(0x86)],{'value':_0x15e887(0x84)});const b=require(_0x15e887(0xb4)),T=require(_0x15e887(0xb9)),c=require(_0x15e887(0xd2)),j=require('@univerjs/thread-comment-ui'),M=require(_0x15e887(0x72)),w=require(_0x15e887(0x9a)),P=require(_0x15e887(0xdd)),U=_0x15e887(0x83);var I=(_0x409075=>(_0x409075[_0x409075[_0x15e887(0xcf)]=0x0]='OpenOrReOpen',_0x409075[_0x409075[_0x15e887(0xdc)]=0x1]='Solved',_0x409075[_0x409075[_0x15e887(0xbf)]=-0x1]=_0x15e887(0xbf),_0x409075))(I||{}),v=(_0x64cc74=>(_0x64cc74[_0x64cc74[_0x15e887(0x7c)]=0x0]=_0x15e887(0x7c),_0x64cc74[_0x64cc74[_0x15e887(0x98)]=0x1]=_0x15e887(0x98),_0x64cc74[_0x64cc74[_0x15e887(0xb2)]=0x2]=_0x15e887(0xb2),_0x64cc74[_0x64cc74[_0x15e887(0xb7)]=0x3]=_0x15e887(0xb7),_0x64cc74[_0x64cc74['Delete']=0x4]=_0x15e887(0xc1),_0x64cc74[_0x64cc74[_0x15e887(0x89)]=0x5]=_0x15e887(0x89),_0x64cc74[_0x64cc74[_0x15e887(0xbf)]=-0x1]=_0x15e887(0xbf),_0x64cc74))(v||{});const f=_0x174958=>c[_0x15e887(0x74)](new Date(+_0x174958))[_0x15e887(0x9b)](_0x15e887(0x88)),R=async(_0x3a6f29,_0x5b4863)=>{const _0x2a2c54=_0x15e887,_0xd62069=_0x3a6f29[_0x2a2c54(0x81)](c[_0x2a2c54(0xa6)]),_0x2263c0=_0x3a6f29[_0x2a2c54(0x81)](P[_0x2a2c54(0x8d)]);_0x5b4863[_0x2a2c54(0xc7)](_0x26ed8a=>{const _0x2fe49b=_0x2a2c54;_0xd62069[_0x2fe49b(0x71)](_0x26ed8a)&&_0x5b4863[_0x2fe49b(0xb3)](_0x26ed8a);}),_0x5b4863['size']&&(await _0x2263c0['get'](_0x2a2c54(0x7b),{'params':{'userIDs':[..._0x5b4863]}}))[_0x2a2c54(0x80)][_0x2a2c54(0x6b)]['forEach'](_0x55a796=>{const _0x55bd0f=_0x2a2c54;_0x55a796&&_0xd62069[_0x55bd0f(0x95)](_0x55a796);});};var $=Object['getOwnPropertyDescriptor'],E=(_0x2d0e97,_0x245ede,_0x9f5764,_0x3cfac5)=>{const _0x280ca9=_0x15e887;for(var _0x26c222=_0x3cfac5>0x1?void 0x0:_0x3cfac5?$(_0x245ede,_0x9f5764):_0x245ede,_0x2a5c91=_0x2d0e97[_0x280ca9(0xc8)]-0x1,_0x1a8ab2;_0x2a5c91>=0x0;_0x2a5c91--)(_0x1a8ab2=_0x2d0e97[_0x2a5c91])&&(_0x26c222=_0x1a8ab2(_0x26c222)||_0x26c222);return _0x26c222;},S=(_0x40fbbf,_0x1454db)=>(_0x17e701,_0x12ffdc)=>_0x1454db(_0x17e701,_0x12ffdc,_0x40fbbf);let p=class extends c['Disposable']{constructor(_0x4b50c3,_0x5b0f26,_0x52850a,_0x567249){const _0x4e11f0=_0x15e887;super(),this[_0x4e11f0(0xb1)]=_0x4b50c3,this[_0x4e11f0(0x6d)]=_0x5b0f26,this[_0x4e11f0(0x68)]=_0x52850a,this[_0x4e11f0(0xd7)]=_0x567249,this[_0x4e11f0(0x8a)](),this[_0x4e11f0(0x96)]();}[_0x15e887(0x96)](){const _0x392376=_0x15e887;this[_0x392376(0xe0)](this[_0x392376(0x6d)][_0x392376(0x66)]['pipe'](w['bufferTime'](0x10))[_0x392376(0xc3)](_0x50b004=>{const _0x3c17f4=_0x392376,_0x6c13d4=new Set();_0x50b004[_0x3c17f4(0xc7)](_0x5cfe0f=>{const _0x21fcd8=_0x3c17f4;switch(_0x5cfe0f[_0x21fcd8(0xc5)]){case _0x21fcd8(0xa3):{const _0x176da1=_0x5cfe0f[_0x21fcd8(0xa4)][_0x21fcd8(0x75)];_0x6c13d4[_0x21fcd8(0xa3)](_0x176da1);break;}}}),R(this[_0x3c17f4(0xd7)],_0x6c13d4);}));}[_0x15e887(0x8a)](){const _0x5d4cff=_0x15e887;this[_0x5d4cff(0xe0)](this['_commentService']['commentUpdate$'][_0x5d4cff(0xc3)](async _0x59fd1d=>{const _0x1b875d=_0x5d4cff;var _0x2d838c,_0x56c1fb,_0x13a400,_0x10106f;const _0x571d25=(_0x2d838c=this[_0x1b875d(0x6d)][_0x1b875d(0xe3)](_0x59fd1d[_0x1b875d(0x97)])[_0x1b875d(0x78)](_0x47470e=>_0x47470e['threadId']===_0x59fd1d[_0x1b875d(0x7f)]))==null?void 0x0:_0x2d838c[_0x1b875d(0xbc)];if(!_0x571d25)return;const {unitId:_0x338f2e,subUnitId:_0x5e4b20}=_0x571d25;switch(_0x59fd1d[_0x1b875d(0xcc)]&&this['_userService']['addUser'](_0x59fd1d[_0x1b875d(0xcc)]),_0x59fd1d['type']){case v[_0x1b875d(0x98)]:break;case v[_0x1b875d(0xb2)]:{this[_0x1b875d(0x6d)][_0x1b875d(0xc6)](_0x338f2e,_0x5e4b20,{'unitId':_0x338f2e,'subUnitId':_0x5e4b20,'ref':'','id':_0x59fd1d[_0x1b875d(0xe2)],'dT':f(+_0x59fd1d[_0x1b875d(0xa7)]),'threadId':_0x59fd1d[_0x1b875d(0x7f)],'personId':(_0x13a400=(_0x56c1fb=_0x59fd1d[_0x1b875d(0xcc)])==null?void 0x0:_0x56c1fb[_0x1b875d(0xdf)])!=null?_0x13a400:_0x59fd1d[_0x1b875d(0x69)],'text':JSON[_0x1b875d(0xa5)](_0x59fd1d['content']),'parentId':_0x571d25['id']});break;}case v['Delete']:{const _0x3cd296=this[_0x1b875d(0x6d)][_0x1b875d(0x8c)](_0x338f2e,_0x5e4b20,_0x59fd1d[_0x1b875d(0xe2)]);_0x3cd296&&_0x3cd296[_0x1b875d(0xd4)]&&this[_0x1b875d(0x6d)][_0x1b875d(0xb0)](_0x338f2e,_0x5e4b20,_0x59fd1d[_0x1b875d(0xe2)]);break;}case v[_0x1b875d(0xb7)]:{this[_0x1b875d(0x6d)][_0x1b875d(0x79)](_0x338f2e,_0x5e4b20,{'commentId':_0x59fd1d[_0x1b875d(0xe2)],'text':JSON[_0x1b875d(0xa5)](_0x59fd1d[_0x1b875d(0xac)])});break;}case v[_0x1b875d(0x89)]:{const _0x5459a5=(_0x10106f=this[_0x1b875d(0x6d)][_0x1b875d(0xe3)](_0x59fd1d['unitId'])['find'](_0x186c6d=>_0x186c6d[_0x1b875d(0x7f)]===_0x59fd1d[_0x1b875d(0x7f)]))==null?void 0x0:_0x10106f[_0x1b875d(0xbc)];_0x5459a5&&this[_0x1b875d(0x6d)][_0x1b875d(0xc9)](_0x338f2e,_0x5e4b20,_0x5459a5['id'],_0x59fd1d[_0x1b875d(0x6c)]===I[_0x1b875d(0xdc)]);break;}}}));}};p=E([S(0x0,c[_0x15e887(0x67)](b[_0x15e887(0x70)])),S(0x1,c[_0x15e887(0x67)](M[_0x15e887(0xcb)])),S(0x2,c[_0x15e887(0x67)](c[_0x15e887(0xa6)])),S(0x3,c['Inject'](c['Injector']))],p);const q='thread-comment-data-source.config',D={};function _0x1164(_0x3df065,_0x1140e2){const _0x2408f7=_0x2408();return _0x1164=function(_0x116407,_0x228804){_0x116407=_0x116407-0x66;let _0x45596c=_0x2408f7[_0x116407];return _0x45596c;},_0x1164(_0x3df065,_0x1140e2);}function _0x2408(){const _0xaa8da1=['_commentService','Reply','delete','@univerjs-pro/collaboration-client','_configService','getCurrentUser','Edit','/edit','@univerjs-pro/license','UniverLicensePlugin','829742SnuhdU','root','onStarting','CustomRangeType','UNRECOGNIZED','/add','Delete','/universer-api/comment/unit/','subscribe','getMemberID','type','addComment','forEach','length','resolveComment','pluginName','ThreadCommentModel','user','96655cuweEf','UniverThreadCommentUIPlugin','OpenOrReOpen','error','16iNCLWT','@univerjs/core','9850200NCdclm','parentId','_config','code','_injector','requireSession','Injector','getOwnPropertyDescriptor','UniverInstanceType','Solved','@univerjs/network','ref','userID','disposeWithMe','IConfigService','replyId','getUnit','commentUpdate$','Inject','_userService','userId','setConfig','users','solved','_threadCommentModel','merge','customRanges','CommentService','getUser','@univerjs/thread-comment','UniverThreadCommentDataSourcePlugin','dayjs','personId','2585286jEAlWL','IThreadCommentDataSourceService','find','updateComment','listComments','/universer-api/user/list','Unknown','resolved','UniverCollaborationClientPlugin','threadId','body','get','CollaborationSessionService','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Module','_sessionService','toStringTag','stringify','YYYY/MM/DD\x20HH:mm','Solve','_init','map','getComment','HTTPService','_initDataSource','syncUpdateMutationToColla','933907suLqSX','slice','replies','Disposable','Plugin','addUser','_initUserSync','unitId','Add','rangeType','rxjs','format','_threadCommentDataSourceService','comments','rangeId','1487022waSPhb','filter','/solved','saveCommentToSnapshot','add','payload','parse','UserManagerService','createTimestamp','post','defineProperty','_threadCommentDataSource','_httpService','content','5012672DPTOJx','reply','3OSfQFW','deleteComment'];_0x2408=function(){return _0xaa8da1;};return _0x2408();}var A=Object['getOwnPropertyDescriptor'],x=(_0x3def90,_0x2012e6,_0x497258,_0x431d10)=>{for(var _0x1ab9b1=_0x431d10>0x1?void 0x0:_0x431d10?A(_0x2012e6,_0x497258):_0x2012e6,_0xba4e9b=_0x3def90['length']-0x1,_0x1f5dcf;_0xba4e9b>=0x0;_0xba4e9b--)(_0x1f5dcf=_0x3def90[_0xba4e9b])&&(_0x1ab9b1=_0x1f5dcf(_0x1ab9b1)||_0x1ab9b1);return _0x1ab9b1;},_=(_0xe08f35,_0x59cd6c)=>(_0x240bfe,_0x2b2ea8)=>_0x59cd6c(_0x240bfe,_0x2b2ea8,_0xe08f35);function Y(_0x34c048,_0x2b119a){const _0x55f906=_0x15e887,_0x188f36=_0x34c048[_0x55f906(0x92)][0x0];return{..._0x2b119a,'id':_0x188f36[_0x55f906(0xe2)],'resolved':_0x34c048[_0x55f906(0x6c)]===0x1,'dT':f(_0x188f36[_0x55f906(0xa7)]),'personId':_0x188f36[_0x55f906(0x69)],'threadId':_0x188f36[_0x55f906(0x7f)]};}function G(_0x22a855,_0x439e76,_0x1d424f){const _0x1a2b06=_0x15e887;var _0x191195,_0x1b7c58;if(((_0x1b7c58=(_0x191195=_0x22a855==null?void 0x0:_0x22a855[_0x1a2b06(0x92)])==null?void 0x0:_0x191195['length'])!=null?_0x1b7c58:0x0)>0x0){const _0xae7a65=(_0xb6ed3e,_0x212744)=>({'id':_0xb6ed3e[_0x1a2b06(0xe2)],'threadId':_0xb6ed3e[_0x1a2b06(0x7f)],'dT':f(_0xb6ed3e['createTimestamp']),'personId':_0xb6ed3e[_0x1a2b06(0x69)],'resolved':_0x22a855[_0x1a2b06(0x6c)]===I['Solved'],'unitId':_0x439e76,'subUnitId':_0x1d424f,'text':JSON[_0x1a2b06(0xa5)](_0xb6ed3e[_0x1a2b06(0xac)]),'parentId':_0x212744}),_0x48a65f=_0xae7a65(_0x22a855[_0x1a2b06(0x92)][0x0]);return{..._0x48a65f,'children':_0x22a855[_0x1a2b06(0x92)][_0x1a2b06(0x91)](0x1)['map'](_0x2be706=>_0xae7a65(_0x2be706,_0x48a65f['id']))};}return null;}let g=class{constructor(_0x2cb202,_0x2dfdc3,_0x1aed90,_0x4f839){const _0x34f97a=_0x15e887;this[_0x34f97a(0xab)]=_0x2cb202,this[_0x34f97a(0x68)]=_0x2dfdc3,this['_sessionService']=_0x1aed90,this[_0x34f97a(0xd7)]=_0x4f839;}async[_0x15e887(0xc6)](_0x2fa197){const _0x1b6738=_0x15e887;var _0xd2f01a,_0x38bcd8;const {parentId:_0x2d71d2,unitId:_0x45acb1,text:_0xda47d0,threadId:_0x8d5d9e}=_0x2fa197,_0x424ecf=(_0x38bcd8=(_0xd2f01a=_0xda47d0[_0x1b6738(0x6f)])==null?void 0x0:_0xd2f01a[_0x1b6738(0xa0)](_0x1ac7c2=>_0x1ac7c2[_0x1b6738(0x99)]===c[_0x1b6738(0xbe)]['COMMENT'])[_0x1b6738(0x8b)](_0x34d31f=>_0x34d31f['rangeId']))!=null?_0x38bcd8:[],_0x11b823=JSON[_0x1b6738(0x87)](_0xda47d0),_0x3627e3=(await this['_sessionService']['requireSession'](_0x45acb1))['getMemberID']();if(_0x2d71d2){const _0x3646e9={'memberId':_0x3627e3,'unitId':_0x45acb1,'content':_0x11b823,'mention':_0x424ecf,'threadId':_0x8d5d9e},_0x580b9d=(await this[_0x1b6738(0xab)][_0x1b6738(0xa8)](_0x1b6738(0xc2)+_0x45acb1+'/reply',{'body':_0x3646e9}))[_0x1b6738(0x80)][_0x1b6738(0xae)];return{..._0x2fa197,'id':_0x580b9d[_0x1b6738(0xe2)],'dT':c[_0x1b6738(0x74)](+_0x580b9d[_0x1b6738(0xa7)])[_0x1b6738(0x9b)](_0x1b6738(0x88)),'personId':_0x580b9d['userId']};}else{const _0x43fa16={'memberId':_0x3627e3,'unitId':_0x45acb1,'content':_0x11b823,'mention':_0x424ecf},_0x561831=await this[_0x1b6738(0xab)][_0x1b6738(0xa8)](_0x1b6738(0xc2)+_0x45acb1+_0x1b6738(0xc0),{'body':_0x43fa16});return Y(_0x561831[_0x1b6738(0x80)]['comment'],_0x2fa197);}}async[_0x15e887(0x79)](_0x2db338){const _0x521cf5=_0x15e887;var _0x3fdc22,_0x194952;const {text:_0x5efe67,unitId:_0x2776ee}=_0x2db338,_0x363687=(_0x194952=(_0x3fdc22=_0x5efe67['customRanges'])==null?void 0x0:_0x3fdc22[_0x521cf5(0xa0)](_0x10e1af=>_0x10e1af[_0x521cf5(0x99)]===c[_0x521cf5(0xbe)]['COMMENT'])[_0x521cf5(0x8b)](_0x1e9c36=>_0x1e9c36[_0x521cf5(0x9e)]))!=null?_0x194952:[],_0x57b892=JSON['stringify'](_0x5efe67),_0x578bc6=_0x2db338[_0x521cf5(0x7f)],_0x2443fe=_0x2db338['id'],_0x5e7f2c={'memberId':(await this[_0x521cf5(0x85)][_0x521cf5(0xd8)](_0x2776ee))[_0x521cf5(0xc4)](),'unitId':_0x2776ee,'threadId':_0x578bc6,'mention':_0x363687,'content':_0x57b892,'replyId':_0x2443fe},_0x263c99=await this['_httpService'][_0x521cf5(0xa8)](_0x521cf5(0xc2)+_0x2776ee+_0x521cf5(0xb8),{'body':_0x5e7f2c});return!_0x263c99[_0x521cf5(0x80)][_0x521cf5(0xd0)]||_0x263c99['body'][_0x521cf5(0xd0)]['code']===0x1;}async[_0x15e887(0xc9)](_0x3299a9){const _0x5d9501=_0x15e887,{unitId:_0x3ce6a3}=_0x3299a9,_0x5edac0=_0x3299a9[_0x5d9501(0x7f)],_0x10f76b={'memberId':this[_0x5d9501(0x68)][_0x5d9501(0xb6)]()['userID'],'unitId':_0x3ce6a3,'threadId':_0x5edac0,'solved':_0x3299a9[_0x5d9501(0x7d)]?I['Solved']:I[_0x5d9501(0xcf)]},_0x26f14f=await this[_0x5d9501(0xab)][_0x5d9501(0xa8)](_0x5d9501(0xc2)+_0x3ce6a3+_0x5d9501(0xa1),{'body':_0x10f76b});return!_0x26f14f[_0x5d9501(0x80)][_0x5d9501(0xd0)]||_0x26f14f[_0x5d9501(0x80)][_0x5d9501(0xd0)][_0x5d9501(0xd6)]===0x1;}async['deleteComment'](_0x2b3263,_0x3cc3bd,_0x2c43e0,_0x1bad7f){const _0x516c3a=_0x15e887,_0x4dfe32={'memberId':(await this['_sessionService'][_0x516c3a(0xd8)](_0x2b3263))[_0x516c3a(0xc4)](),'threadId':_0x2c43e0,'replyId':_0x1bad7f,'unitId':_0x2b3263},_0x56852b=await this[_0x516c3a(0xab)][_0x516c3a(0xa8)](_0x516c3a(0xc2)+_0x2b3263+'/delete',{'body':_0x4dfe32});return!_0x56852b[_0x516c3a(0x80)]['error']||_0x56852b[_0x516c3a(0x80)][_0x516c3a(0xd0)]['code']===0x1;}async[_0x15e887(0x7a)](_0x3c3a4a,_0x3cface,_0x4dae9a){const _0x4d8de4=_0x15e887,_0x575243={'unitId':_0x3c3a4a,'threadId':_0x4dae9a},_0x5741ab=await this['_httpService'][_0x4d8de4(0xa8)]('/universer-api/comment/unit/'+_0x3c3a4a+'/list',{'body':_0x575243}),_0x3328cc=_0x4dae9a[_0x4d8de4(0x8b)](_0x1c8af8=>G(_0x5741ab[_0x4d8de4(0x80)][_0x4d8de4(0x9d)][_0x1c8af8],_0x3c3a4a,_0x3cface))[_0x4d8de4(0xa0)](Boolean);return Object['values'](_0x5741ab[_0x4d8de4(0x80)]['users'])[_0x4d8de4(0xc7)](_0x431778=>{const _0x3660c5=_0x4d8de4;this[_0x3660c5(0x68)][_0x3660c5(0x95)](_0x431778);}),_0x3328cc;}[_0x15e887(0xa2)](_0x4140b0){const _0x15992d=_0x15e887;return{'id':_0x4140b0['id'],'threadId':_0x4140b0[_0x15992d(0x7f)],'ref':_0x4140b0[_0x15992d(0xde)]};}};g=x([_(0x0,c['Inject'](P[_0x15e887(0x8d)])),_(0x1,c['Inject'](c[_0x15e887(0xa6)])),_(0x2,c['Inject'](b[_0x15e887(0x82)])),_(0x3,c[_0x15e887(0x67)](c[_0x15e887(0xd9)]))],g);var H=Object[_0x15e887(0xda)],J=(_0x271a28,_0x22f282,_0x4a4408,_0x5f3a3f)=>{for(var _0x1ef7ec=_0x5f3a3f>0x1?void 0x0:_0x5f3a3f?H(_0x22f282,_0x4a4408):_0x22f282,_0x296589=_0x271a28['length']-0x1,_0xd84bab;_0x296589>=0x0;_0x296589--)(_0xd84bab=_0x271a28[_0x296589])&&(_0x1ef7ec=_0xd84bab(_0x1ef7ec)||_0x1ef7ec);return _0x1ef7ec;},y=(_0x3959bc,_0x4f89fe)=>(_0x157237,_0x44122f)=>_0x4f89fe(_0x157237,_0x44122f,_0x3959bc);let C=class extends c[_0x15e887(0x93)]{constructor(_0x59ecb5,_0x48d5a7){const _0x2c585d=_0x15e887;super(),this[_0x2c585d(0x9c)]=_0x59ecb5,this[_0x2c585d(0xaa)]=_0x48d5a7,this['_initDataSource']();}[_0x15e887(0x8e)](){const _0x258fb0=_0x15e887;this['_threadCommentDataSourceService']['dataSource']=this[_0x258fb0(0xaa)],this['_threadCommentDataSourceService'][_0x258fb0(0x8f)]=!0x1;}};C=J([y(0x0,M[_0x15e887(0x77)]),y(0x1,c[_0x15e887(0x67)](g))],C);var F=Object['defineProperty'],L=Object['getOwnPropertyDescriptor'],Z=(_0x43de76,_0x1e10d9,_0xaf3246)=>_0x1e10d9 in _0x43de76?F(_0x43de76,_0x1e10d9,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0xaf3246}):_0x43de76[_0x1e10d9]=_0xaf3246,W=(_0x9f9e4a,_0x5a309e,_0x4b2ee9,_0x3d2a97)=>{for(var _0x18042e=_0x3d2a97>0x1?void 0x0:_0x3d2a97?L(_0x5a309e,_0x4b2ee9):_0x5a309e,_0x53c0ca=_0x9f9e4a['length']-0x1,_0x1f2d1a;_0x53c0ca>=0x0;_0x53c0ca--)(_0x1f2d1a=_0x9f9e4a[_0x53c0ca])&&(_0x18042e=_0x1f2d1a(_0x18042e)||_0x18042e);return _0x18042e;},O=(_0x2a5ada,_0x3ee425)=>(_0xc26b77,_0x52bc35)=>_0x3ee425(_0xc26b77,_0x52bc35,_0x2a5ada),N=(_0x151059,_0x3f8807,_0x5dc914)=>Z(_0x151059,typeof _0x3f8807!='symbol'?_0x3f8807+'':_0x3f8807,_0x5dc914);exports[_0x15e887(0x73)]=class extends c[_0x15e887(0x94)]{constructor(_0x347475=D,_0xf483b1,_0x4d5b33){const _0x47b5ee=_0x15e887;super(),this[_0x47b5ee(0xd5)]=_0x347475,this[_0x47b5ee(0xd7)]=_0xf483b1,this[_0x47b5ee(0xb5)]=_0x4d5b33;const {..._0x52da4f}=c[_0x47b5ee(0x6e)]({},D,this[_0x47b5ee(0xd5)]);this[_0x47b5ee(0xb5)][_0x47b5ee(0x6a)](q,_0x52da4f);}[_0x15e887(0xbd)](){const _0x25088d=_0x15e887;[[g],[C],[p]][_0x25088d(0xc7)](_0x176f9b=>{const _0x16fe64=_0x25088d;this[_0x16fe64(0xd7)][_0x16fe64(0xa3)](_0x176f9b);});}['onReady'](){const _0x21eda9=_0x15e887;this[_0x21eda9(0xd7)]['get'](C),this[_0x21eda9(0xd7)][_0x21eda9(0x81)](p);}},N(exports[_0x15e887(0x73)],_0x15e887(0xca),U),N(exports[_0x15e887(0x73)],_0x15e887(0xc5),c[_0x15e887(0xdb)]['UNIVER_UNKNOWN']),exports[_0x15e887(0x73)]=W([c['DependentOn'](j[_0x15e887(0xce)],b[_0x15e887(0x7e)],T[_0x15e887(0xba)]),O(0x1,c['Inject'](c[_0x15e887(0xd9)])),O(0x2,c[_0x15e887(0xe1)])],exports[_0x15e887(0x73)]);
1
+ 'use strict';function _0x27de(_0x387bc4,_0x5a3eb0){const _0x40f8d8=_0x40f8();return _0x27de=function(_0x27de9d,_0x21e159){_0x27de9d=_0x27de9d-0x143;let _0xf51dfd=_0x40f8d8[_0x27de9d];return _0xf51dfd;},_0x27de(_0x387bc4,_0x5a3eb0);}const _0x1b4b61=_0x27de;(function(_0x499c6e,_0x4af015){const _0x46228a=_0x27de,_0x171acb=_0x499c6e();while(!![]){try{const _0x253831=parseInt(_0x46228a(0x1a6))/0x1+parseInt(_0x46228a(0x176))/0x2*(parseInt(_0x46228a(0x1bf))/0x3)+parseInt(_0x46228a(0x19f))/0x4+-parseInt(_0x46228a(0x162))/0x5*(-parseInt(_0x46228a(0x1a7))/0x6)+parseInt(_0x46228a(0x18b))/0x7+parseInt(_0x46228a(0x15c))/0x8+parseInt(_0x46228a(0x1b3))/0x9*(-parseInt(_0x46228a(0x181))/0xa);if(_0x253831===_0x4af015)break;else _0x171acb['push'](_0x171acb['shift']());}catch(_0x29d9d9){_0x171acb['push'](_0x171acb['shift']());}}}(_0x40f8,0xdf765));Object[_0x1b4b61(0x1ad)](exports,Symbol['toStringTag'],{'value':_0x1b4b61(0x1af)});function _0x40f8(){const _0x57e0a5=['userId','11170894psJpaC','rangeId','requireSession','_commentService','/universer-api/comment/unit/','UniverCollaborationClientPlugin','rangeType','HTTPService','saveCommentToSnapshot','replies','@univerjs/thread-comment','OpenOrReOpen','UniverInstanceType','Delete','onStarting','code','customRanges','content','error','_threadCommentModel','3925264Gfrcpz','@univerjs/core','map','stringify','IConfigService','solved','/reply','594568oJpMdl','6HPPJZh','_initUserSync','CollaborationSessionService','parentId','/edit','get','defineProperty','dataSource','Module','UniverThreadCommentDataSourcePlugin','userID','format','171LVZOjO','post','delete','Disposable','payload','Solved','Unknown','IThreadCommentDataSourceService','listComments','threadId','personId','symbol','39qzjPCq','COMMENT','CustomRangeType','comment','subscribe','@univerjs-pro/license','Edit','add','onReady','/add','resolveComment','_userService','_init','merge','_httpService','Add','Injector','setConfig','addUser','forEach','dayjs','commentUpdate$','length','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','getMemberID','disposeWithMe','createTimestamp','getOwnPropertyDescriptor','3889400FAgiZb','/solved','addComment','values','users','thread-comment-data-source.config','6697520VtRKjS','updateComment','type','getUser','_config','deleteComment','Inject','UNRECOGNIZED','@univerjs-pro/collaboration-client','find','pipe','/list','rxjs','pluginName','ref','getUnit','replyId','Plugin','Reply','UniverLicensePlugin','123054NTWtui','Solve','_threadCommentDataSource','bufferTime','size','_initDataSource','parse','_sessionService','YYYY/MM/DD\x20HH:mm','_configService','root','2569450ADBQHk','body','unitId','UserManagerService','_injector','filter','/universer-api/user/list','@univerjs/thread-comment-ui','_threadCommentDataSourceService'];_0x40f8=function(){return _0x57e0a5;};return _0x40f8();}const b=require(_0x1b4b61(0x16a)),T=require(_0x1b4b61(0x145)),c=require(_0x1b4b61(0x1a0)),j=require(_0x1b4b61(0x188)),M=require(_0x1b4b61(0x195)),w=require(_0x1b4b61(0x16e)),P=require('@univerjs/network'),U=_0x1b4b61(0x157);var I=(_0x458cb8=>(_0x458cb8[_0x458cb8[_0x1b4b61(0x196)]=0x0]=_0x1b4b61(0x196),_0x458cb8[_0x458cb8[_0x1b4b61(0x1b8)]=0x1]=_0x1b4b61(0x1b8),_0x458cb8[_0x458cb8[_0x1b4b61(0x169)]=-0x1]=_0x1b4b61(0x169),_0x458cb8))(I||{}),v=(_0x1785ef=>(_0x1785ef[_0x1785ef['Unknown']=0x0]=_0x1b4b61(0x1b9),_0x1785ef[_0x1785ef[_0x1b4b61(0x14f)]=0x1]=_0x1b4b61(0x14f),_0x1785ef[_0x1785ef[_0x1b4b61(0x174)]=0x2]=_0x1b4b61(0x174),_0x1785ef[_0x1785ef[_0x1b4b61(0x146)]=0x3]=_0x1b4b61(0x146),_0x1785ef[_0x1785ef[_0x1b4b61(0x198)]=0x4]='Delete',_0x1785ef[_0x1785ef[_0x1b4b61(0x177)]=0x5]=_0x1b4b61(0x177),_0x1785ef[_0x1785ef['UNRECOGNIZED']=-0x1]=_0x1b4b61(0x169),_0x1785ef))(v||{});const f=_0x5752d8=>c['dayjs'](new Date(+_0x5752d8))[_0x1b4b61(0x1b2)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x441061,_0x34f3d3)=>{const _0x4faa67=_0x1b4b61,_0x52364e=_0x441061[_0x4faa67(0x1ac)](c[_0x4faa67(0x184)]),_0x3d6da3=_0x441061['get'](P[_0x4faa67(0x192)]);_0x34f3d3[_0x4faa67(0x153)](_0x4b08d3=>{const _0x67b265=_0x4faa67;_0x52364e[_0x67b265(0x165)](_0x4b08d3)&&_0x34f3d3[_0x67b265(0x1b5)](_0x4b08d3);}),_0x34f3d3[_0x4faa67(0x17a)]&&(await _0x3d6da3[_0x4faa67(0x1ac)](_0x4faa67(0x187),{'params':{'userIDs':[..._0x34f3d3]}}))[_0x4faa67(0x182)][_0x4faa67(0x160)][_0x4faa67(0x153)](_0x2d5cb4=>{_0x2d5cb4&&_0x52364e['addUser'](_0x2d5cb4);});};var $=Object[_0x1b4b61(0x15b)],E=(_0xb29d45,_0x2dabd9,_0x5c6c85,_0x1c0d68)=>{const _0x2d5380=_0x1b4b61;for(var _0x312a15=_0x1c0d68>0x1?void 0x0:_0x1c0d68?$(_0x2dabd9,_0x5c6c85):_0x2dabd9,_0x1959c3=_0xb29d45[_0x2d5380(0x156)]-0x1,_0x496eda;_0x1959c3>=0x0;_0x1959c3--)(_0x496eda=_0xb29d45[_0x1959c3])&&(_0x312a15=_0x496eda(_0x312a15)||_0x312a15);return _0x312a15;},S=(_0x514184,_0x39055b)=>(_0x1b93c0,_0x5a9a4c)=>_0x39055b(_0x1b93c0,_0x5a9a4c,_0x514184);let p=class extends c['Disposable']{constructor(_0x38effb,_0x2f5df9,_0x14b704,_0xaf8d97){const _0x24bc85=_0x1b4b61;super(),this[_0x24bc85(0x18e)]=_0x38effb,this[_0x24bc85(0x19e)]=_0x2f5df9,this[_0x24bc85(0x14b)]=_0x14b704,this[_0x24bc85(0x185)]=_0xaf8d97,this[_0x24bc85(0x14c)](),this['_initUserSync']();}[_0x1b4b61(0x1a8)](){const _0x44afa1=_0x1b4b61;this[_0x44afa1(0x159)](this[_0x44afa1(0x19e)][_0x44afa1(0x155)][_0x44afa1(0x16c)](w[_0x44afa1(0x179)](0x10))[_0x44afa1(0x144)](_0x38da00=>{const _0x24375c=_0x44afa1,_0x41c6e7=new Set();_0x38da00['forEach'](_0x3c1879=>{const _0x42c407=_0x27de;switch(_0x3c1879[_0x42c407(0x164)]){case _0x42c407(0x147):{const _0x1b870a=_0x3c1879[_0x42c407(0x1b7)][_0x42c407(0x1bd)];_0x41c6e7[_0x42c407(0x147)](_0x1b870a);break;}}}),R(this[_0x24375c(0x185)],_0x41c6e7);}));}[_0x1b4b61(0x14c)](){const _0x4bc14a=_0x1b4b61;this[_0x4bc14a(0x159)](this[_0x4bc14a(0x18e)]['commentUpdate$'][_0x4bc14a(0x144)](async _0x275347=>{const _0x52be6b=_0x4bc14a;var _0x26d993,_0x1fef7a,_0x397c11,_0x29c3ea;const _0x3af957=(_0x26d993=this[_0x52be6b(0x19e)]['getUnit'](_0x275347[_0x52be6b(0x183)])['find'](_0xf6ae7=>_0xf6ae7[_0x52be6b(0x1bc)]===_0x275347[_0x52be6b(0x1bc)]))==null?void 0x0:_0x26d993[_0x52be6b(0x180)];if(!_0x3af957)return;const {unitId:_0x3e6e5f,subUnitId:_0x51bbf0}=_0x3af957;switch(_0x275347['user']&&this[_0x52be6b(0x14b)]['addUser'](_0x275347['user']),_0x275347[_0x52be6b(0x164)]){case v[_0x52be6b(0x14f)]:break;case v[_0x52be6b(0x174)]:{this[_0x52be6b(0x19e)][_0x52be6b(0x15e)](_0x3e6e5f,_0x51bbf0,{'unitId':_0x3e6e5f,'subUnitId':_0x51bbf0,'ref':'','id':_0x275347[_0x52be6b(0x172)],'dT':f(+_0x275347[_0x52be6b(0x15a)]),'threadId':_0x275347[_0x52be6b(0x1bc)],'personId':(_0x397c11=(_0x1fef7a=_0x275347['user'])==null?void 0x0:_0x1fef7a[_0x52be6b(0x1b1)])!=null?_0x397c11:_0x275347[_0x52be6b(0x18a)],'text':JSON['parse'](_0x275347[_0x52be6b(0x19c)]),'parentId':_0x3af957['id']});break;}case v[_0x52be6b(0x198)]:{const _0x2412e4=this['_threadCommentModel']['getComment'](_0x3e6e5f,_0x51bbf0,_0x275347[_0x52be6b(0x172)]);_0x2412e4&&_0x2412e4[_0x52be6b(0x1aa)]&&this[_0x52be6b(0x19e)][_0x52be6b(0x167)](_0x3e6e5f,_0x51bbf0,_0x275347[_0x52be6b(0x172)]);break;}case v[_0x52be6b(0x146)]:{this[_0x52be6b(0x19e)][_0x52be6b(0x163)](_0x3e6e5f,_0x51bbf0,{'commentId':_0x275347[_0x52be6b(0x172)],'text':JSON[_0x52be6b(0x17c)](_0x275347[_0x52be6b(0x19c)])});break;}case v[_0x52be6b(0x177)]:{const _0x47d7a3=(_0x29c3ea=this['_threadCommentModel'][_0x52be6b(0x171)](_0x275347[_0x52be6b(0x183)])[_0x52be6b(0x16b)](_0x451e50=>_0x451e50[_0x52be6b(0x1bc)]===_0x275347[_0x52be6b(0x1bc)]))==null?void 0x0:_0x29c3ea[_0x52be6b(0x180)];_0x47d7a3&&this[_0x52be6b(0x19e)][_0x52be6b(0x14a)](_0x3e6e5f,_0x51bbf0,_0x47d7a3['id'],_0x275347['solved']===I[_0x52be6b(0x1b8)]);break;}}}));}};p=E([S(0x0,c[_0x1b4b61(0x168)](b['CommentService'])),S(0x1,c['Inject'](M['ThreadCommentModel'])),S(0x2,c[_0x1b4b61(0x168)](c[_0x1b4b61(0x184)])),S(0x3,c[_0x1b4b61(0x168)](c[_0x1b4b61(0x150)]))],p);const q=_0x1b4b61(0x161),D={};var A=Object[_0x1b4b61(0x15b)],x=(_0x133c62,_0xa2518,_0x2025a8,_0x59856c)=>{const _0x37dc16=_0x1b4b61;for(var _0x45ac18=_0x59856c>0x1?void 0x0:_0x59856c?A(_0xa2518,_0x2025a8):_0xa2518,_0x194acc=_0x133c62[_0x37dc16(0x156)]-0x1,_0x1fe6e9;_0x194acc>=0x0;_0x194acc--)(_0x1fe6e9=_0x133c62[_0x194acc])&&(_0x45ac18=_0x1fe6e9(_0x45ac18)||_0x45ac18);return _0x45ac18;},_=(_0x4ee4dd,_0x2b8623)=>(_0xf0d127,_0x4c4dfa)=>_0x2b8623(_0xf0d127,_0x4c4dfa,_0x4ee4dd);function Y(_0x47ebb5,_0x235aa1){const _0x4546ed=_0x1b4b61,_0x24545d=_0x47ebb5[_0x4546ed(0x194)][0x0];return{..._0x235aa1,'id':_0x24545d[_0x4546ed(0x172)],'resolved':_0x47ebb5[_0x4546ed(0x1a4)]===0x1,'dT':f(_0x24545d[_0x4546ed(0x15a)]),'personId':_0x24545d['userId'],'threadId':_0x24545d['threadId']};}function G(_0x1a9efb,_0x522dfe,_0x320cf9){const _0x2d8832=_0x1b4b61;var _0x136ada,_0x2e0315;if(((_0x2e0315=(_0x136ada=_0x1a9efb==null?void 0x0:_0x1a9efb['replies'])==null?void 0x0:_0x136ada[_0x2d8832(0x156)])!=null?_0x2e0315:0x0)>0x0){const _0x266c72=(_0x31a474,_0x2b4ea8)=>({'id':_0x31a474[_0x2d8832(0x172)],'threadId':_0x31a474[_0x2d8832(0x1bc)],'dT':f(_0x31a474[_0x2d8832(0x15a)]),'personId':_0x31a474['userId'],'resolved':_0x1a9efb[_0x2d8832(0x1a4)]===I['Solved'],'unitId':_0x522dfe,'subUnitId':_0x320cf9,'text':JSON[_0x2d8832(0x17c)](_0x31a474['content']),'parentId':_0x2b4ea8}),_0x14106a=_0x266c72(_0x1a9efb[_0x2d8832(0x194)][0x0]);return{..._0x14106a,'children':_0x1a9efb['replies']['slice'](0x1)['map'](_0x48446d=>_0x266c72(_0x48446d,_0x14106a['id']))};}return null;}let g=class{constructor(_0x30b84d,_0x20c70a,_0x546152,_0x506ed7){const _0x5e332b=_0x1b4b61;this[_0x5e332b(0x14e)]=_0x30b84d,this[_0x5e332b(0x14b)]=_0x20c70a,this[_0x5e332b(0x17d)]=_0x546152,this['_injector']=_0x506ed7;}async[_0x1b4b61(0x15e)](_0x5d7f8b){const _0xf71ed3=_0x1b4b61;var _0x29b713,_0xe1a9f4;const {parentId:_0x55d6ec,unitId:_0x13c9d7,text:_0xf2df6b,threadId:_0x44bce5}=_0x5d7f8b,_0x3a2ddc=(_0xe1a9f4=(_0x29b713=_0xf2df6b[_0xf71ed3(0x19b)])==null?void 0x0:_0x29b713[_0xf71ed3(0x186)](_0x5d4765=>_0x5d4765[_0xf71ed3(0x191)]===c[_0xf71ed3(0x1c1)]['COMMENT'])[_0xf71ed3(0x1a1)](_0x580b0a=>_0x580b0a[_0xf71ed3(0x18c)]))!=null?_0xe1a9f4:[],_0x4bd632=JSON[_0xf71ed3(0x1a2)](_0xf2df6b),_0x87c668=(await this['_sessionService'][_0xf71ed3(0x18d)](_0x13c9d7))[_0xf71ed3(0x158)]();if(_0x55d6ec){const _0x11fd08={'memberId':_0x87c668,'unitId':_0x13c9d7,'content':_0x4bd632,'mention':_0x3a2ddc,'threadId':_0x44bce5},_0x36433c=(await this[_0xf71ed3(0x14e)][_0xf71ed3(0x1b4)](_0xf71ed3(0x18f)+_0x13c9d7+_0xf71ed3(0x1a5),{'body':_0x11fd08}))[_0xf71ed3(0x182)]['reply'];return{..._0x5d7f8b,'id':_0x36433c[_0xf71ed3(0x172)],'dT':c[_0xf71ed3(0x154)](+_0x36433c[_0xf71ed3(0x15a)])[_0xf71ed3(0x1b2)](_0xf71ed3(0x17e)),'personId':_0x36433c[_0xf71ed3(0x18a)]};}else{const _0x322ea0={'memberId':_0x87c668,'unitId':_0x13c9d7,'content':_0x4bd632,'mention':_0x3a2ddc},_0x3fac99=await this[_0xf71ed3(0x14e)][_0xf71ed3(0x1b4)](_0xf71ed3(0x18f)+_0x13c9d7+_0xf71ed3(0x149),{'body':_0x322ea0});return Y(_0x3fac99[_0xf71ed3(0x182)][_0xf71ed3(0x143)],_0x5d7f8b);}}async['updateComment'](_0x2d5b95){const _0x4655a9=_0x1b4b61;var _0x45e723,_0x36753b;const {text:_0x1643f3,unitId:_0x1d8edc}=_0x2d5b95,_0x189989=(_0x36753b=(_0x45e723=_0x1643f3[_0x4655a9(0x19b)])==null?void 0x0:_0x45e723[_0x4655a9(0x186)](_0x48f372=>_0x48f372['rangeType']===c['CustomRangeType'][_0x4655a9(0x1c0)])[_0x4655a9(0x1a1)](_0x4e1caa=>_0x4e1caa['rangeId']))!=null?_0x36753b:[],_0x474d2c=JSON['stringify'](_0x1643f3),_0x115af5=_0x2d5b95['threadId'],_0x34c2c7=_0x2d5b95['id'],_0x397804={'memberId':(await this['_sessionService'][_0x4655a9(0x18d)](_0x1d8edc))['getMemberID'](),'unitId':_0x1d8edc,'threadId':_0x115af5,'mention':_0x189989,'content':_0x474d2c,'replyId':_0x34c2c7},_0x280d1f=await this[_0x4655a9(0x14e)][_0x4655a9(0x1b4)](_0x4655a9(0x18f)+_0x1d8edc+_0x4655a9(0x1ab),{'body':_0x397804});return!_0x280d1f['body'][_0x4655a9(0x19d)]||_0x280d1f[_0x4655a9(0x182)]['error']['code']===0x1;}async[_0x1b4b61(0x14a)](_0x4e6770){const _0x248a56=_0x1b4b61,{unitId:_0x4a375e}=_0x4e6770,_0x343f2d=_0x4e6770[_0x248a56(0x1bc)],_0x59d5ed={'memberId':this['_userService']['getCurrentUser']()['userID'],'unitId':_0x4a375e,'threadId':_0x343f2d,'solved':_0x4e6770['resolved']?I[_0x248a56(0x1b8)]:I['OpenOrReOpen']},_0x4d3e7e=await this[_0x248a56(0x14e)]['post']('/universer-api/comment/unit/'+_0x4a375e+_0x248a56(0x15d),{'body':_0x59d5ed});return!_0x4d3e7e['body'][_0x248a56(0x19d)]||_0x4d3e7e['body'][_0x248a56(0x19d)][_0x248a56(0x19a)]===0x1;}async[_0x1b4b61(0x167)](_0x4986b1,_0x4e1ae6,_0x1ea2a0,_0x57f488){const _0x359b7f=_0x1b4b61,_0x9c4233={'memberId':(await this['_sessionService'][_0x359b7f(0x18d)](_0x4986b1))['getMemberID'](),'threadId':_0x1ea2a0,'replyId':_0x57f488,'unitId':_0x4986b1},_0x550e6a=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x4986b1+'/delete',{'body':_0x9c4233});return!_0x550e6a['body'][_0x359b7f(0x19d)]||_0x550e6a[_0x359b7f(0x182)][_0x359b7f(0x19d)]['code']===0x1;}async[_0x1b4b61(0x1bb)](_0x15e484,_0x31cbc9,_0x1629e5){const _0x12265d=_0x1b4b61,_0x4e70f4={'unitId':_0x15e484,'threadId':_0x1629e5},_0x441a36=await this['_httpService'][_0x12265d(0x1b4)](_0x12265d(0x18f)+_0x15e484+_0x12265d(0x16d),{'body':_0x4e70f4}),_0xbd2a1a=_0x1629e5[_0x12265d(0x1a1)](_0x2a718b=>G(_0x441a36[_0x12265d(0x182)]['comments'][_0x2a718b],_0x15e484,_0x31cbc9))[_0x12265d(0x186)](Boolean);return Object[_0x12265d(0x15f)](_0x441a36[_0x12265d(0x182)][_0x12265d(0x160)])['forEach'](_0x4204e3=>{const _0x379a65=_0x12265d;this[_0x379a65(0x14b)][_0x379a65(0x152)](_0x4204e3);}),_0xbd2a1a;}[_0x1b4b61(0x193)](_0x27479e){const _0x29b175=_0x1b4b61;return{'id':_0x27479e['id'],'threadId':_0x27479e['threadId'],'ref':_0x27479e[_0x29b175(0x170)]};}};g=x([_(0x0,c[_0x1b4b61(0x168)](P[_0x1b4b61(0x192)])),_(0x1,c[_0x1b4b61(0x168)](c[_0x1b4b61(0x184)])),_(0x2,c[_0x1b4b61(0x168)](b[_0x1b4b61(0x1a9)])),_(0x3,c['Inject'](c[_0x1b4b61(0x150)]))],g);var H=Object['getOwnPropertyDescriptor'],J=(_0x52d11e,_0xa4c084,_0x159dc3,_0x4d4021)=>{const _0x3ddef1=_0x1b4b61;for(var _0x5647f2=_0x4d4021>0x1?void 0x0:_0x4d4021?H(_0xa4c084,_0x159dc3):_0xa4c084,_0x4b7ecd=_0x52d11e[_0x3ddef1(0x156)]-0x1,_0x3eb419;_0x4b7ecd>=0x0;_0x4b7ecd--)(_0x3eb419=_0x52d11e[_0x4b7ecd])&&(_0x5647f2=_0x3eb419(_0x5647f2)||_0x5647f2);return _0x5647f2;},y=(_0x2b7625,_0x476dae)=>(_0x2b5f30,_0x381471)=>_0x476dae(_0x2b5f30,_0x381471,_0x2b7625);let C=class extends c[_0x1b4b61(0x1b6)]{constructor(_0x377c10,_0x9abc16){const _0x5d330a=_0x1b4b61;super(),this[_0x5d330a(0x189)]=_0x377c10,this[_0x5d330a(0x178)]=_0x9abc16,this[_0x5d330a(0x17b)]();}['_initDataSource'](){const _0x579a20=_0x1b4b61;this[_0x579a20(0x189)][_0x579a20(0x1ae)]=this[_0x579a20(0x178)],this[_0x579a20(0x189)]['syncUpdateMutationToColla']=!0x1;}};C=J([y(0x0,M[_0x1b4b61(0x1ba)]),y(0x1,c[_0x1b4b61(0x168)](g))],C);var F=Object[_0x1b4b61(0x1ad)],L=Object['getOwnPropertyDescriptor'],Z=(_0x315c5a,_0x8d3ade,_0x12317b)=>_0x8d3ade in _0x315c5a?F(_0x315c5a,_0x8d3ade,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x12317b}):_0x315c5a[_0x8d3ade]=_0x12317b,W=(_0x5d4918,_0x4740d8,_0x39a109,_0x565af9)=>{for(var _0xb5e686=_0x565af9>0x1?void 0x0:_0x565af9?L(_0x4740d8,_0x39a109):_0x4740d8,_0x5cb2a2=_0x5d4918['length']-0x1,_0x379f96;_0x5cb2a2>=0x0;_0x5cb2a2--)(_0x379f96=_0x5d4918[_0x5cb2a2])&&(_0xb5e686=_0x379f96(_0xb5e686)||_0xb5e686);return _0xb5e686;},O=(_0x177e40,_0x28374c)=>(_0x163f2d,_0x1c9a5e)=>_0x28374c(_0x163f2d,_0x1c9a5e,_0x177e40),N=(_0x255e8f,_0xbea266,_0xc44299)=>Z(_0x255e8f,typeof _0xbea266!=_0x1b4b61(0x1be)?_0xbea266+'':_0xbea266,_0xc44299);exports[_0x1b4b61(0x1b0)]=class extends c[_0x1b4b61(0x173)]{constructor(_0x31a2ab=D,_0x400372,_0x511ae2){const _0x2654bc=_0x1b4b61;super(),this[_0x2654bc(0x166)]=_0x31a2ab,this[_0x2654bc(0x185)]=_0x400372,this[_0x2654bc(0x17f)]=_0x511ae2;const {..._0x2eacbd}=c[_0x2654bc(0x14d)]({},D,this[_0x2654bc(0x166)]);this['_configService'][_0x2654bc(0x151)](q,_0x2eacbd);}[_0x1b4b61(0x199)](){const _0x1e190c=_0x1b4b61;[[g],[C],[p]][_0x1e190c(0x153)](_0x60cdeb=>{const _0x26ce6d=_0x1e190c;this[_0x26ce6d(0x185)][_0x26ce6d(0x147)](_0x60cdeb);});}[_0x1b4b61(0x148)](){const _0x49ab95=_0x1b4b61;this[_0x49ab95(0x185)][_0x49ab95(0x1ac)](C),this['_injector'][_0x49ab95(0x1ac)](p);}},N(exports[_0x1b4b61(0x1b0)],_0x1b4b61(0x16f),U),N(exports[_0x1b4b61(0x1b0)],_0x1b4b61(0x164),c[_0x1b4b61(0x197)]['UNIVER_UNKNOWN']),exports[_0x1b4b61(0x1b0)]=W([c['DependentOn'](j['UniverThreadCommentUIPlugin'],b[_0x1b4b61(0x190)],T[_0x1b4b61(0x175)]),O(0x1,c[_0x1b4b61(0x168)](c['Injector'])),O(0x2,c[_0x1b4b61(0x1a3)])],exports[_0x1b4b61(0x1b0)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x12d45a=_0x3a84;(function(_0x36be8c,_0x2f4422){const _0xd59e30=_0x3a84,_0x40fac9=_0x36be8c();while(!![]){try{const _0x488205=-parseInt(_0xd59e30(0x1f3))/0x1+parseInt(_0xd59e30(0x1fa))/0x2+-parseInt(_0xd59e30(0x1c3))/0x3*(parseInt(_0xd59e30(0x1fe))/0x4)+-parseInt(_0xd59e30(0x210))/0x5*(-parseInt(_0xd59e30(0x201))/0x6)+parseInt(_0xd59e30(0x1f4))/0x7+parseInt(_0xd59e30(0x1e9))/0x8*(-parseInt(_0xd59e30(0x1c7))/0x9)+parseInt(_0xd59e30(0x205))/0xa;if(_0x488205===_0x2f4422)break;else _0x40fac9['push'](_0x40fac9['shift']());}catch(_0x8db9f0){_0x40fac9['push'](_0x40fac9['shift']());}}}(_0x11bf,0xef841));function _0x11bf(){const _0x59048e=['3829308VUgbIW','getUnit','disposeWithMe','4281864fIDPtZ','solved','comment','resolved','23753620oaHQvY','/universer-api/comment/unit/','reply','parse','_httpService','type','onReady','_userService','_threadCommentDataSource','users','add','5MHPmPg','find','_threadCommentDataSourceService','code','format','UNRECOGNIZED','map','requireSession','filter','YYYY/MM/DD\x20HH:mm','get','createTimestamp','rangeType','pipe','payload','3BmPnjs','getOwnPropertyDescriptor','/solved','dataSource','4730382nsvRCm','_initUserSync','OpenOrReOpen','deleteComment','/universer-api/user/list','resolveComment','customRanges','_sessionService','values','updateComment','commentUpdate$','Reply','ref','/delete','comments','error','body','Unknown','user','addUser','replyId','slice','_configService','Solved','/add','userId','stringify','root','forEach','Edit','userID','_init','Delete','length','8LFZrNt','size','unitId','symbol','getMemberID','Add','defineProperty','/reply','post','replies','1367467elFEQK','1493828FXuGCl','rangeId','_config','COMMENT','_commentService','_threadCommentModel','1058078ECvPSq','Solve','_injector','threadId'];_0x11bf=function(){return _0x59048e;};return _0x11bf();}import{CommentService as _0x22e3e6,CollaborationSessionService as _0x381696,UniverCollaborationClientPlugin as _0x2b1311}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xd2c18d}from'@univerjs-pro/license';import{dayjs as _0x565b79,UserManagerService as _0x9c2e12,Inject as _0x19cdec,Injector as _0x52d667,Disposable as _0xb6e203,CustomRangeType as _0x5043a7,UniverInstanceType as _0x23918e,DependentOn as _0xe2719d,IConfigService as _0x4d08cf,Plugin as _0x149da9,merge as _0x109bcd}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0xf7150a}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x34633a,IThreadCommentDataSourceService as _0x53561c}from'@univerjs/thread-comment';import{bufferTime as _0x577fa8}from'rxjs';import{HTTPService as _0x4fe4d0}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x3ad1b1=>(_0x3ad1b1[_0x3ad1b1[_0x12d45a(0x1c9)]=0x0]=_0x12d45a(0x1c9),_0x3ad1b1[_0x3ad1b1[_0x12d45a(0x1de)]=0x1]=_0x12d45a(0x1de),_0x3ad1b1[_0x3ad1b1[_0x12d45a(0x215)]=-0x1]=_0x12d45a(0x215),_0x3ad1b1))(I||{}),v=(_0xff201f=>(_0xff201f[_0xff201f['Unknown']=0x0]=_0x12d45a(0x1d8),_0xff201f[_0xff201f[_0x12d45a(0x1ee)]=0x1]=_0x12d45a(0x1ee),_0xff201f[_0xff201f['Reply']=0x2]=_0x12d45a(0x1d2),_0xff201f[_0xff201f['Edit']=0x3]=_0x12d45a(0x1e4),_0xff201f[_0xff201f[_0x12d45a(0x1e7)]=0x4]=_0x12d45a(0x1e7),_0xff201f[_0xff201f[_0x12d45a(0x1fb)]=0x5]='Solve',_0xff201f[_0xff201f['UNRECOGNIZED']=-0x1]=_0x12d45a(0x215),_0xff201f))(v||{});const D=_0x571835=>_0x565b79(new Date(+_0x571835))[_0x12d45a(0x214)](_0x12d45a(0x1bd)),B=async(_0x493aa9,_0x25db7e)=>{const _0x4d5679=_0x12d45a,_0x56883b=_0x493aa9['get'](_0x9c2e12),_0x422f1c=_0x493aa9[_0x4d5679(0x1be)](_0x4fe4d0);_0x25db7e[_0x4d5679(0x1e3)](_0x11523e=>{_0x56883b['getUser'](_0x11523e)&&_0x25db7e['delete'](_0x11523e);}),_0x25db7e[_0x4d5679(0x1ea)]&&(await _0x422f1c[_0x4d5679(0x1be)](_0x4d5679(0x1cb),{'params':{'userIDs':[..._0x25db7e]}}))[_0x4d5679(0x1d7)][_0x4d5679(0x20e)][_0x4d5679(0x1e3)](_0x36f6f5=>{const _0x45aefb=_0x4d5679;_0x36f6f5&&_0x56883b[_0x45aefb(0x1da)](_0x36f6f5);});};var K=Object[_0x12d45a(0x1c4)],V=(_0x20304a,_0x4160e5,_0x3702fb,_0x3cb104)=>{const _0xd1544d=_0x12d45a;for(var _0x3cd3f2=_0x3cb104>0x1?void 0x0:_0x3cb104?K(_0x4160e5,_0x3702fb):_0x4160e5,_0x2c35dc=_0x20304a[_0xd1544d(0x1e8)]-0x1,_0x455fad;_0x2c35dc>=0x0;_0x2c35dc--)(_0x455fad=_0x20304a[_0x2c35dc])&&(_0x3cd3f2=_0x455fad(_0x3cd3f2)||_0x3cd3f2);return _0x3cd3f2;},p=(_0x406d9c,_0x2175b0)=>(_0x217648,_0x43989c)=>_0x2175b0(_0x217648,_0x43989c,_0x406d9c);let S=class extends _0xb6e203{constructor(_0x4cb218,_0x15ae2d,_0x102d16,_0x5cc4da){const _0x304b49=_0x12d45a;super(),this[_0x304b49(0x1f8)]=_0x4cb218,this['_threadCommentModel']=_0x15ae2d,this[_0x304b49(0x20c)]=_0x102d16,this[_0x304b49(0x1fc)]=_0x5cc4da,this[_0x304b49(0x1e6)](),this[_0x304b49(0x1c8)]();}[_0x12d45a(0x1c8)](){const _0x238ae9=_0x12d45a;this[_0x238ae9(0x200)](this[_0x238ae9(0x1f9)][_0x238ae9(0x1d1)][_0x238ae9(0x1c1)](_0x577fa8(0x10))['subscribe'](_0x529784=>{const _0xaab34=_0x238ae9,_0x2e3700=new Set();_0x529784['forEach'](_0x1e77bd=>{const _0x6b2d23=_0x3a84;switch(_0x1e77bd[_0x6b2d23(0x20a)]){case _0x6b2d23(0x20f):{const _0x52f205=_0x1e77bd[_0x6b2d23(0x1c2)]['personId'];_0x2e3700[_0x6b2d23(0x20f)](_0x52f205);break;}}}),B(this[_0xaab34(0x1fc)],_0x2e3700);}));}['_init'](){const _0x49fdb4=_0x12d45a;this[_0x49fdb4(0x200)](this[_0x49fdb4(0x1f8)]['commentUpdate$']['subscribe'](async _0x16311d=>{const _0x422a99=_0x49fdb4;var _0x242109,_0x321693,_0x1ff50e,_0x1e1385;const _0x47f6d5=(_0x242109=this[_0x422a99(0x1f9)][_0x422a99(0x1ff)](_0x16311d[_0x422a99(0x1eb)])[_0x422a99(0x211)](_0x370219=>_0x370219[_0x422a99(0x1fd)]===_0x16311d[_0x422a99(0x1fd)]))==null?void 0x0:_0x242109[_0x422a99(0x1e2)];if(!_0x47f6d5)return;const {unitId:_0x373bf8,subUnitId:_0x5a6a08}=_0x47f6d5;switch(_0x16311d[_0x422a99(0x1d9)]&&this[_0x422a99(0x20c)]['addUser'](_0x16311d['user']),_0x16311d[_0x422a99(0x20a)]){case v[_0x422a99(0x1ee)]:break;case v[_0x422a99(0x1d2)]:{this[_0x422a99(0x1f9)]['addComment'](_0x373bf8,_0x5a6a08,{'unitId':_0x373bf8,'subUnitId':_0x5a6a08,'ref':'','id':_0x16311d[_0x422a99(0x1db)],'dT':D(+_0x16311d[_0x422a99(0x1bf)]),'threadId':_0x16311d[_0x422a99(0x1fd)],'personId':(_0x1ff50e=(_0x321693=_0x16311d[_0x422a99(0x1d9)])==null?void 0x0:_0x321693[_0x422a99(0x1e5)])!=null?_0x1ff50e:_0x16311d[_0x422a99(0x1e0)],'text':JSON[_0x422a99(0x208)](_0x16311d['content']),'parentId':_0x47f6d5['id']});break;}case v[_0x422a99(0x1e7)]:{const _0x1a810c=this['_threadCommentModel']['getComment'](_0x373bf8,_0x5a6a08,_0x16311d[_0x422a99(0x1db)]);_0x1a810c&&_0x1a810c['parentId']&&this[_0x422a99(0x1f9)][_0x422a99(0x1ca)](_0x373bf8,_0x5a6a08,_0x16311d[_0x422a99(0x1db)]);break;}case v[_0x422a99(0x1e4)]:{this[_0x422a99(0x1f9)]['updateComment'](_0x373bf8,_0x5a6a08,{'commentId':_0x16311d[_0x422a99(0x1db)],'text':JSON[_0x422a99(0x208)](_0x16311d['content'])});break;}case v[_0x422a99(0x1fb)]:{const _0x5eec2b=(_0x1e1385=this[_0x422a99(0x1f9)]['getUnit'](_0x16311d[_0x422a99(0x1eb)])[_0x422a99(0x211)](_0x347ed0=>_0x347ed0['threadId']===_0x16311d[_0x422a99(0x1fd)]))==null?void 0x0:_0x1e1385[_0x422a99(0x1e2)];_0x5eec2b&&this[_0x422a99(0x1f9)]['resolveComment'](_0x373bf8,_0x5a6a08,_0x5eec2b['id'],_0x16311d['solved']===I[_0x422a99(0x1de)]);break;}}}));}};S=V([p(0x0,_0x19cdec(_0x22e3e6)),p(0x1,_0x19cdec(_0x34633a)),p(0x2,_0x19cdec(_0x9c2e12)),p(0x3,_0x19cdec(_0x52d667))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x12d45a(0x1c4)],Q=(_0x2085b7,_0x51e25f,_0x2a5e56,_0x3a5e32)=>{for(var _0x11a874=_0x3a5e32>0x1?void 0x0:_0x3a5e32?k(_0x51e25f,_0x2a5e56):_0x51e25f,_0x1c4bb2=_0x2085b7['length']-0x1,_0x51ef98;_0x1c4bb2>=0x0;_0x1c4bb2--)(_0x51ef98=_0x2085b7[_0x1c4bb2])&&(_0x11a874=_0x51ef98(_0x11a874)||_0x11a874);return _0x11a874;},_=(_0x41b686,_0xcc772e)=>(_0x25d56b,_0x386ba5)=>_0xcc772e(_0x25d56b,_0x386ba5,_0x41b686);function X(_0x5dea90,_0x431833){const _0x5a6ed6=_0x12d45a,_0x20e83c=_0x5dea90['replies'][0x0];return{..._0x431833,'id':_0x20e83c['replyId'],'resolved':_0x5dea90['solved']===0x1,'dT':D(_0x20e83c[_0x5a6ed6(0x1bf)]),'personId':_0x20e83c[_0x5a6ed6(0x1e0)],'threadId':_0x20e83c[_0x5a6ed6(0x1fd)]};}function ee(_0x1699bb,_0x323e94,_0x37a7e5){const _0x2ec942=_0x12d45a;var _0x8f3ccd,_0x5d738a;if(((_0x5d738a=(_0x8f3ccd=_0x1699bb==null?void 0x0:_0x1699bb['replies'])==null?void 0x0:_0x8f3ccd['length'])!=null?_0x5d738a:0x0)>0x0){const _0xf015a3=(_0x2f2070,_0x50ff5f)=>({'id':_0x2f2070['replyId'],'threadId':_0x2f2070[_0x2ec942(0x1fd)],'dT':D(_0x2f2070[_0x2ec942(0x1bf)]),'personId':_0x2f2070[_0x2ec942(0x1e0)],'resolved':_0x1699bb[_0x2ec942(0x202)]===I[_0x2ec942(0x1de)],'unitId':_0x323e94,'subUnitId':_0x37a7e5,'text':JSON[_0x2ec942(0x208)](_0x2f2070['content']),'parentId':_0x50ff5f}),_0x389574=_0xf015a3(_0x1699bb[_0x2ec942(0x1f2)][0x0]);return{..._0x389574,'children':_0x1699bb['replies'][_0x2ec942(0x1dc)](0x1)[_0x2ec942(0x216)](_0x2e350b=>_0xf015a3(_0x2e350b,_0x389574['id']))};}return null;}let f=class{constructor(_0x5d7364,_0x353030,_0x239382,_0x170074){const _0xaa1d95=_0x12d45a;this[_0xaa1d95(0x209)]=_0x5d7364,this[_0xaa1d95(0x20c)]=_0x353030,this['_sessionService']=_0x239382,this[_0xaa1d95(0x1fc)]=_0x170074;}async['addComment'](_0x1fdea6){const _0x5ed334=_0x12d45a;var _0x44d5f3,_0x4c87c8;const {parentId:_0x33dac4,unitId:_0x4c1b31,text:_0x2cc5dc,threadId:_0x475679}=_0x1fdea6,_0x54587a=(_0x4c87c8=(_0x44d5f3=_0x2cc5dc[_0x5ed334(0x1cd)])==null?void 0x0:_0x44d5f3[_0x5ed334(0x1bc)](_0x4fb7f1=>_0x4fb7f1[_0x5ed334(0x1c0)]===_0x5043a7[_0x5ed334(0x1f7)])[_0x5ed334(0x216)](_0x4e8eb9=>_0x4e8eb9[_0x5ed334(0x1f5)]))!=null?_0x4c87c8:[],_0x11f288=JSON[_0x5ed334(0x1e1)](_0x2cc5dc),_0x2c8276=(await this[_0x5ed334(0x1ce)][_0x5ed334(0x217)](_0x4c1b31))[_0x5ed334(0x1ed)]();if(_0x33dac4){const _0x2614c2={'memberId':_0x2c8276,'unitId':_0x4c1b31,'content':_0x11f288,'mention':_0x54587a,'threadId':_0x475679},_0x1c1bca=(await this[_0x5ed334(0x209)]['post'](_0x5ed334(0x206)+_0x4c1b31+_0x5ed334(0x1f0),{'body':_0x2614c2}))['body'][_0x5ed334(0x207)];return{..._0x1fdea6,'id':_0x1c1bca[_0x5ed334(0x1db)],'dT':_0x565b79(+_0x1c1bca['createTimestamp'])[_0x5ed334(0x214)](_0x5ed334(0x1bd)),'personId':_0x1c1bca[_0x5ed334(0x1e0)]};}else{const _0x35916a={'memberId':_0x2c8276,'unitId':_0x4c1b31,'content':_0x11f288,'mention':_0x54587a},_0x361f68=await this[_0x5ed334(0x209)][_0x5ed334(0x1f1)](_0x5ed334(0x206)+_0x4c1b31+_0x5ed334(0x1df),{'body':_0x35916a});return X(_0x361f68[_0x5ed334(0x1d7)][_0x5ed334(0x203)],_0x1fdea6);}}async[_0x12d45a(0x1d0)](_0x5b63c1){const _0x16df6d=_0x12d45a;var _0x1d0d9b,_0x22e362;const {text:_0x309cf8,unitId:_0x1c2e80}=_0x5b63c1,_0x3d5b92=(_0x22e362=(_0x1d0d9b=_0x309cf8[_0x16df6d(0x1cd)])==null?void 0x0:_0x1d0d9b[_0x16df6d(0x1bc)](_0x902d5c=>_0x902d5c[_0x16df6d(0x1c0)]===_0x5043a7[_0x16df6d(0x1f7)])[_0x16df6d(0x216)](_0x246f4f=>_0x246f4f['rangeId']))!=null?_0x22e362:[],_0x4f5f52=JSON[_0x16df6d(0x1e1)](_0x309cf8),_0x9664e3=_0x5b63c1[_0x16df6d(0x1fd)],_0x41cee3=_0x5b63c1['id'],_0x2e61aa={'memberId':(await this['_sessionService'][_0x16df6d(0x217)](_0x1c2e80))[_0x16df6d(0x1ed)](),'unitId':_0x1c2e80,'threadId':_0x9664e3,'mention':_0x3d5b92,'content':_0x4f5f52,'replyId':_0x41cee3},_0x26038e=await this['_httpService'][_0x16df6d(0x1f1)](_0x16df6d(0x206)+_0x1c2e80+'/edit',{'body':_0x2e61aa});return!_0x26038e[_0x16df6d(0x1d7)]['error']||_0x26038e[_0x16df6d(0x1d7)]['error'][_0x16df6d(0x213)]===0x1;}async[_0x12d45a(0x1cc)](_0x2e99c6){const _0x7fe36c=_0x12d45a,{unitId:_0x31b4a6}=_0x2e99c6,_0x1a81b2=_0x2e99c6['threadId'],_0x22f31d={'memberId':this[_0x7fe36c(0x20c)]['getCurrentUser']()[_0x7fe36c(0x1e5)],'unitId':_0x31b4a6,'threadId':_0x1a81b2,'solved':_0x2e99c6[_0x7fe36c(0x204)]?I[_0x7fe36c(0x1de)]:I['OpenOrReOpen']},_0x5aef47=await this[_0x7fe36c(0x209)][_0x7fe36c(0x1f1)](_0x7fe36c(0x206)+_0x31b4a6+_0x7fe36c(0x1c5),{'body':_0x22f31d});return!_0x5aef47[_0x7fe36c(0x1d7)][_0x7fe36c(0x1d6)]||_0x5aef47[_0x7fe36c(0x1d7)][_0x7fe36c(0x1d6)][_0x7fe36c(0x213)]===0x1;}async[_0x12d45a(0x1ca)](_0x51aaa5,_0x187064,_0x22ae41,_0x1ffd43){const _0x38c4ad=_0x12d45a,_0x50400c={'memberId':(await this[_0x38c4ad(0x1ce)]['requireSession'](_0x51aaa5))[_0x38c4ad(0x1ed)](),'threadId':_0x22ae41,'replyId':_0x1ffd43,'unitId':_0x51aaa5},_0x2163a6=await this[_0x38c4ad(0x209)][_0x38c4ad(0x1f1)](_0x38c4ad(0x206)+_0x51aaa5+_0x38c4ad(0x1d4),{'body':_0x50400c});return!_0x2163a6['body'][_0x38c4ad(0x1d6)]||_0x2163a6[_0x38c4ad(0x1d7)]['error'][_0x38c4ad(0x213)]===0x1;}async['listComments'](_0x3a4e52,_0x3b418d,_0x51faf0){const _0x30010a=_0x12d45a,_0x44afcd={'unitId':_0x3a4e52,'threadId':_0x51faf0},_0x55dfe6=await this[_0x30010a(0x209)]['post'](_0x30010a(0x206)+_0x3a4e52+'/list',{'body':_0x44afcd}),_0x2d7b2a=_0x51faf0[_0x30010a(0x216)](_0x1ec3f9=>ee(_0x55dfe6[_0x30010a(0x1d7)][_0x30010a(0x1d5)][_0x1ec3f9],_0x3a4e52,_0x3b418d))[_0x30010a(0x1bc)](Boolean);return Object[_0x30010a(0x1cf)](_0x55dfe6['body'][_0x30010a(0x20e)])['forEach'](_0x203c22=>{const _0x40f698=_0x30010a;this[_0x40f698(0x20c)][_0x40f698(0x1da)](_0x203c22);}),_0x2d7b2a;}['saveCommentToSnapshot'](_0x2f6f97){const _0x5943f1=_0x12d45a;return{'id':_0x2f6f97['id'],'threadId':_0x2f6f97[_0x5943f1(0x1fd)],'ref':_0x2f6f97[_0x5943f1(0x1d3)]};}};f=Q([_(0x0,_0x19cdec(_0x4fe4d0)),_(0x1,_0x19cdec(_0x9c2e12)),_(0x2,_0x19cdec(_0x381696)),_(0x3,_0x19cdec(_0x52d667))],f);var re=Object[_0x12d45a(0x1c4)],te=(_0x21cce6,_0x21512d,_0x3146d3,_0x45275b)=>{for(var _0x176fdb=_0x45275b>0x1?void 0x0:_0x45275b?re(_0x21512d,_0x3146d3):_0x21512d,_0xab7ac7=_0x21cce6['length']-0x1,_0x488043;_0xab7ac7>=0x0;_0xab7ac7--)(_0x488043=_0x21cce6[_0xab7ac7])&&(_0x176fdb=_0x488043(_0x176fdb)||_0x176fdb);return _0x176fdb;},N=(_0x27b258,_0x3e9a43)=>(_0x47a59a,_0x3f7e54)=>_0x3e9a43(_0x47a59a,_0x3f7e54,_0x27b258);let g=class extends _0xb6e203{constructor(_0x5afa7b,_0x2f6088){const _0x28826c=_0x12d45a;super(),this[_0x28826c(0x212)]=_0x5afa7b,this['_threadCommentDataSource']=_0x2f6088,this['_initDataSource']();}['_initDataSource'](){const _0x123425=_0x12d45a;this[_0x123425(0x212)][_0x123425(0x1c6)]=this[_0x123425(0x20d)],this[_0x123425(0x212)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x53561c),N(0x1,_0x19cdec(f))],g);var se=Object[_0x12d45a(0x1ef)],oe=Object[_0x12d45a(0x1c4)],ne=(_0x57ee37,_0x23e766,_0x1cd8a2)=>_0x23e766 in _0x57ee37?se(_0x57ee37,_0x23e766,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1cd8a2}):_0x57ee37[_0x23e766]=_0x1cd8a2,ie=(_0xeca41b,_0x229020,_0x3ec319,_0x393822)=>{const _0x478b07=_0x12d45a;for(var _0x5f0601=_0x393822>0x1?void 0x0:_0x393822?oe(_0x229020,_0x3ec319):_0x229020,_0x2a81c7=_0xeca41b[_0x478b07(0x1e8)]-0x1,_0x1c3c5e;_0x2a81c7>=0x0;_0x2a81c7--)(_0x1c3c5e=_0xeca41b[_0x2a81c7])&&(_0x5f0601=_0x1c3c5e(_0x5f0601)||_0x5f0601);return _0x5f0601;},w=(_0x2653ba,_0x4fd4b3)=>(_0x5d26d7,_0x123938)=>_0x4fd4b3(_0x5d26d7,_0x123938,_0x2653ba),$=(_0x2b6688,_0x4642ca,_0x41e4d3)=>ne(_0x2b6688,typeof _0x4642ca!=_0x12d45a(0x1ec)?_0x4642ca+'':_0x4642ca,_0x41e4d3);function _0x3a84(_0x1ec578,_0x1877e5){const _0x11bf58=_0x11bf();return _0x3a84=function(_0x3a8429,_0x1837a4){_0x3a8429=_0x3a8429-0x1bc;let _0x190cf9=_0x11bf58[_0x3a8429];return _0x190cf9;},_0x3a84(_0x1ec578,_0x1877e5);}let b=class extends _0x149da9{constructor(_0x8c16ca=M,_0x14995d,_0x1bb6a7){const _0x9e6d35=_0x12d45a;super(),this[_0x9e6d35(0x1f6)]=_0x8c16ca,this[_0x9e6d35(0x1fc)]=_0x14995d,this[_0x9e6d35(0x1dd)]=_0x1bb6a7;const {..._0x56bec3}=_0x109bcd({},M,this[_0x9e6d35(0x1f6)]);this[_0x9e6d35(0x1dd)]['setConfig'](z,_0x56bec3);}['onStarting'](){const _0x134cec=_0x12d45a;[[f],[g],[S]][_0x134cec(0x1e3)](_0x2cec94=>{const _0x43ba92=_0x134cec;this[_0x43ba92(0x1fc)][_0x43ba92(0x20f)](_0x2cec94);});}[_0x12d45a(0x20b)](){const _0x3b2ea9=_0x12d45a;this['_injector'][_0x3b2ea9(0x1be)](g),this[_0x3b2ea9(0x1fc)][_0x3b2ea9(0x1be)](S);}};$(b,'pluginName',W),$(b,_0x12d45a(0x20a),_0x23918e['UNIVER_UNKNOWN']),b=ie([_0xe2719d(_0xf7150a,_0x2b1311,_0xd2c18d),w(0x1,_0x19cdec(_0x52d667)),w(0x2,_0x4d08cf)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x9f0ffa=_0x53f0;(function(_0x2f64ed,_0x1f092b){const _0x27f668=_0x53f0,_0x1a966f=_0x2f64ed();while(!![]){try{const _0x2fce99=parseInt(_0x27f668(0xd9))/0x1+parseInt(_0x27f668(0xd6))/0x2+-parseInt(_0x27f668(0xc4))/0x3*(parseInt(_0x27f668(0xaa))/0x4)+parseInt(_0x27f668(0xd7))/0x5+parseInt(_0x27f668(0xa0))/0x6+parseInt(_0x27f668(0xae))/0x7*(parseInt(_0x27f668(0xda))/0x8)+-parseInt(_0x27f668(0x7b))/0x9;if(_0x2fce99===_0x1f092b)break;else _0x1a966f['push'](_0x1a966f['shift']());}catch(_0x965280){_0x1a966f['push'](_0x1a966f['shift']());}}}(_0x5af4,0xe2a9d));import{CommentService as _0xf6d61,CollaborationSessionService as _0xa5da5c,UniverCollaborationClientPlugin as _0x2c98c7}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2aa935}from'@univerjs-pro/license';import{dayjs as _0x97228c,UserManagerService as _0x3fd1fe,Inject as _0x2fc4da,Injector as _0x2dd6bd,Disposable as _0x4379a5,CustomRangeType as _0x1bd051,UniverInstanceType as _0x25b4bb,DependentOn as _0xe0925a,IConfigService as _0x34e795,Plugin as _0x33e3f5,merge as _0x4c41e6}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x2d2845}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x4c90ae,IThreadCommentDataSourceService as _0x18ed90}from'@univerjs/thread-comment';import{bufferTime as _0x4ba19b}from'rxjs';import{HTTPService as _0x1a2b24}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x35974c=>(_0x35974c[_0x35974c[_0x9f0ffa(0xbb)]=0x0]=_0x9f0ffa(0xbb),_0x35974c[_0x35974c[_0x9f0ffa(0x92)]=0x1]=_0x9f0ffa(0x92),_0x35974c[_0x35974c[_0x9f0ffa(0x80)]=-0x1]=_0x9f0ffa(0x80),_0x35974c))(I||{}),v=(_0x3cd5f2=>(_0x3cd5f2[_0x3cd5f2[_0x9f0ffa(0xa5)]=0x0]=_0x9f0ffa(0xa5),_0x3cd5f2[_0x3cd5f2[_0x9f0ffa(0x91)]=0x1]=_0x9f0ffa(0x91),_0x3cd5f2[_0x3cd5f2[_0x9f0ffa(0x94)]=0x2]='Reply',_0x3cd5f2[_0x3cd5f2[_0x9f0ffa(0xac)]=0x3]='Edit',_0x3cd5f2[_0x3cd5f2[_0x9f0ffa(0xdf)]=0x4]='Delete',_0x3cd5f2[_0x3cd5f2[_0x9f0ffa(0xa8)]=0x5]=_0x9f0ffa(0xa8),_0x3cd5f2[_0x3cd5f2[_0x9f0ffa(0x80)]=-0x1]='UNRECOGNIZED',_0x3cd5f2))(v||{});const D=_0x9437c1=>_0x97228c(new Date(+_0x9437c1))[_0x9f0ffa(0xb8)](_0x9f0ffa(0x7c)),B=async(_0x36d27d,_0x3ced1d)=>{const _0x23e6e6=_0x9f0ffa,_0x3ce302=_0x36d27d[_0x23e6e6(0x96)](_0x3fd1fe),_0x293c51=_0x36d27d[_0x23e6e6(0x96)](_0x1a2b24);_0x3ced1d[_0x23e6e6(0x84)](_0xe9be9f=>{const _0x26c569=_0x23e6e6;_0x3ce302[_0x26c569(0x9e)](_0xe9be9f)&&_0x3ced1d[_0x26c569(0x87)](_0xe9be9f);}),_0x3ced1d[_0x23e6e6(0x79)]&&(await _0x293c51[_0x23e6e6(0x96)](_0x23e6e6(0x85),{'params':{'userIDs':[..._0x3ced1d]}}))[_0x23e6e6(0x9f)]['users'][_0x23e6e6(0x84)](_0x5bfb33=>{_0x5bfb33&&_0x3ce302['addUser'](_0x5bfb33);});};var K=Object[_0x9f0ffa(0x89)],V=(_0x5dce83,_0x49b23e,_0x12f65e,_0x10b282)=>{const _0x3a0c3b=_0x9f0ffa;for(var _0x48781e=_0x10b282>0x1?void 0x0:_0x10b282?K(_0x49b23e,_0x12f65e):_0x49b23e,_0x157efc=_0x5dce83[_0x3a0c3b(0xa9)]-0x1,_0x195c07;_0x157efc>=0x0;_0x157efc--)(_0x195c07=_0x5dce83[_0x157efc])&&(_0x48781e=_0x195c07(_0x48781e)||_0x48781e);return _0x48781e;},p=(_0x47c4b7,_0x375494)=>(_0x59393f,_0x28291f)=>_0x375494(_0x59393f,_0x28291f,_0x47c4b7);function _0x5af4(){const _0x238ccc=['138oWNiVK','subscribe','/solved','rangeType','filter','_commentService','map','/add','pluginName','add','post','error','setConfig','commentUpdate$','users','_config','_configService','root','859948HKiFAM','4741200owyGLa','_initUserSync','774722LUibAy','8Snivjw','_threadCommentModel','listComments','getMemberID','addUser','Delete','size','updateComment','16921413vNsnHt','YYYY/MM/DD\x20HH:mm','replies','defineProperty','thread-comment-data-source.config','UNRECOGNIZED','parse','_injector','parentId','forEach','/universer-api/user/list','saveCommentToSnapshot','delete','rangeId','getOwnPropertyDescriptor','_httpService','resolveComment','getUnit','COMMENT','deleteComment','_userService','stringify','Add','Solved','threadId','Reply','unitId','get','content','comment','user','ref','/universer-api/comment/unit/','disposeWithMe','_initDataSource','getUser','body','10682154ZdfKcv','onReady','pipe','_sessionService','reply','Unknown','/list','find','Solve','length','98760PRIuAN','values','Edit','/reply','77105gRfsOj','UNIVER_UNKNOWN','customRanges','_threadCommentDataSourceService','replyId','solved','getCurrentUser','_init','userId','dataSource','format','_threadCommentDataSource','requireSession','OpenOrReOpen','createTimestamp','symbol','addComment','onStarting','code','type','userID','/edit'];_0x5af4=function(){return _0x238ccc;};return _0x5af4();}let S=class extends _0x4379a5{constructor(_0x396074,_0x3de31d,_0xd6124,_0x53e6d3){const _0x590c24=_0x9f0ffa;super(),this[_0x590c24(0xc9)]=_0x396074,this[_0x590c24(0xdb)]=_0x3de31d,this[_0x590c24(0x8f)]=_0xd6124,this['_injector']=_0x53e6d3,this[_0x590c24(0xb5)](),this['_initUserSync']();}[_0x9f0ffa(0xd8)](){const _0x2746b8=_0x9f0ffa;this[_0x2746b8(0x9c)](this[_0x2746b8(0xdb)][_0x2746b8(0xd1)][_0x2746b8(0xa2)](_0x4ba19b(0x10))[_0x2746b8(0xc5)](_0x180adf=>{const _0x27cc10=_0x2746b8,_0x5a8fd3=new Set();_0x180adf[_0x27cc10(0x84)](_0x40f900=>{const _0x2ea1f3=_0x27cc10;switch(_0x40f900[_0x2ea1f3(0xc1)]){case'add':{const _0x397edd=_0x40f900['payload']['personId'];_0x5a8fd3[_0x2ea1f3(0xcd)](_0x397edd);break;}}}),B(this[_0x27cc10(0x82)],_0x5a8fd3);}));}['_init'](){const _0x5e295f=_0x9f0ffa;this[_0x5e295f(0x9c)](this['_commentService'][_0x5e295f(0xd1)]['subscribe'](async _0x57d4c7=>{const _0x292ae6=_0x5e295f;var _0x5efb9c,_0x2d1b1d,_0x27e56b,_0x2be60d;const _0x1e0bab=(_0x5efb9c=this[_0x292ae6(0xdb)][_0x292ae6(0x8c)](_0x57d4c7['unitId'])[_0x292ae6(0xa7)](_0x3c2278=>_0x3c2278[_0x292ae6(0x93)]===_0x57d4c7[_0x292ae6(0x93)]))==null?void 0x0:_0x5efb9c[_0x292ae6(0xd5)];if(!_0x1e0bab)return;const {unitId:_0xcb55a4,subUnitId:_0x1a0a78}=_0x1e0bab;switch(_0x57d4c7[_0x292ae6(0x99)]&&this[_0x292ae6(0x8f)][_0x292ae6(0xde)](_0x57d4c7[_0x292ae6(0x99)]),_0x57d4c7['type']){case v['Add']:break;case v[_0x292ae6(0x94)]:{this[_0x292ae6(0xdb)][_0x292ae6(0xbe)](_0xcb55a4,_0x1a0a78,{'unitId':_0xcb55a4,'subUnitId':_0x1a0a78,'ref':'','id':_0x57d4c7[_0x292ae6(0xb2)],'dT':D(+_0x57d4c7[_0x292ae6(0xbc)]),'threadId':_0x57d4c7[_0x292ae6(0x93)],'personId':(_0x27e56b=(_0x2d1b1d=_0x57d4c7['user'])==null?void 0x0:_0x2d1b1d[_0x292ae6(0xc2)])!=null?_0x27e56b:_0x57d4c7[_0x292ae6(0xb6)],'text':JSON[_0x292ae6(0x81)](_0x57d4c7['content']),'parentId':_0x1e0bab['id']});break;}case v[_0x292ae6(0xdf)]:{const _0xca4b92=this['_threadCommentModel']['getComment'](_0xcb55a4,_0x1a0a78,_0x57d4c7['replyId']);_0xca4b92&&_0xca4b92[_0x292ae6(0x83)]&&this[_0x292ae6(0xdb)][_0x292ae6(0x8e)](_0xcb55a4,_0x1a0a78,_0x57d4c7['replyId']);break;}case v[_0x292ae6(0xac)]:{this[_0x292ae6(0xdb)][_0x292ae6(0x7a)](_0xcb55a4,_0x1a0a78,{'commentId':_0x57d4c7['replyId'],'text':JSON[_0x292ae6(0x81)](_0x57d4c7[_0x292ae6(0x97)])});break;}case v[_0x292ae6(0xa8)]:{const _0x37de32=(_0x2be60d=this['_threadCommentModel']['getUnit'](_0x57d4c7[_0x292ae6(0x95)])[_0x292ae6(0xa7)](_0x6f61ed=>_0x6f61ed[_0x292ae6(0x93)]===_0x57d4c7[_0x292ae6(0x93)]))==null?void 0x0:_0x2be60d[_0x292ae6(0xd5)];_0x37de32&&this[_0x292ae6(0xdb)][_0x292ae6(0x8b)](_0xcb55a4,_0x1a0a78,_0x37de32['id'],_0x57d4c7[_0x292ae6(0xb3)]===I[_0x292ae6(0x92)]);break;}}}));}};S=V([p(0x0,_0x2fc4da(_0xf6d61)),p(0x1,_0x2fc4da(_0x4c90ae)),p(0x2,_0x2fc4da(_0x3fd1fe)),p(0x3,_0x2fc4da(_0x2dd6bd))],S);function _0x53f0(_0x32d2e9,_0x5ce561){const _0x5af486=_0x5af4();return _0x53f0=function(_0x53f086,_0x5e550){_0x53f086=_0x53f086-0x79;let _0x1c12b9=_0x5af486[_0x53f086];return _0x1c12b9;},_0x53f0(_0x32d2e9,_0x5ce561);}const z=_0x9f0ffa(0x7f),M={};var k=Object[_0x9f0ffa(0x89)],Q=(_0x1bc5da,_0x545eb9,_0x5cd082,_0x55096f)=>{const _0x136629=_0x9f0ffa;for(var _0x2e3888=_0x55096f>0x1?void 0x0:_0x55096f?k(_0x545eb9,_0x5cd082):_0x545eb9,_0x6c6208=_0x1bc5da[_0x136629(0xa9)]-0x1,_0x20f316;_0x6c6208>=0x0;_0x6c6208--)(_0x20f316=_0x1bc5da[_0x6c6208])&&(_0x2e3888=_0x20f316(_0x2e3888)||_0x2e3888);return _0x2e3888;},_=(_0x58b9dd,_0x4a7301)=>(_0x5637fe,_0x2e8c53)=>_0x4a7301(_0x5637fe,_0x2e8c53,_0x58b9dd);function X(_0x17492c,_0x3fffad){const _0x2aec5f=_0x9f0ffa,_0x4260a9=_0x17492c['replies'][0x0];return{..._0x3fffad,'id':_0x4260a9[_0x2aec5f(0xb2)],'resolved':_0x17492c[_0x2aec5f(0xb3)]===0x1,'dT':D(_0x4260a9[_0x2aec5f(0xbc)]),'personId':_0x4260a9['userId'],'threadId':_0x4260a9[_0x2aec5f(0x93)]};}function ee(_0x58ea2b,_0x141ebf,_0x42750f){const _0x25e2ef=_0x9f0ffa;var _0x53fdd6,_0x5bcace;if(((_0x5bcace=(_0x53fdd6=_0x58ea2b==null?void 0x0:_0x58ea2b[_0x25e2ef(0x7d)])==null?void 0x0:_0x53fdd6[_0x25e2ef(0xa9)])!=null?_0x5bcace:0x0)>0x0){const _0x166a1a=(_0x110534,_0x110545)=>({'id':_0x110534['replyId'],'threadId':_0x110534[_0x25e2ef(0x93)],'dT':D(_0x110534[_0x25e2ef(0xbc)]),'personId':_0x110534[_0x25e2ef(0xb6)],'resolved':_0x58ea2b[_0x25e2ef(0xb3)]===I[_0x25e2ef(0x92)],'unitId':_0x141ebf,'subUnitId':_0x42750f,'text':JSON[_0x25e2ef(0x81)](_0x110534[_0x25e2ef(0x97)]),'parentId':_0x110545}),_0x1d0f79=_0x166a1a(_0x58ea2b[_0x25e2ef(0x7d)][0x0]);return{..._0x1d0f79,'children':_0x58ea2b[_0x25e2ef(0x7d)]['slice'](0x1)[_0x25e2ef(0xca)](_0x277eef=>_0x166a1a(_0x277eef,_0x1d0f79['id']))};}return null;}let f=class{constructor(_0x4fc434,_0x91fa96,_0x2f91c1,_0x559e54){const _0x565a45=_0x9f0ffa;this['_httpService']=_0x4fc434,this[_0x565a45(0x8f)]=_0x91fa96,this[_0x565a45(0xa3)]=_0x2f91c1,this[_0x565a45(0x82)]=_0x559e54;}async[_0x9f0ffa(0xbe)](_0x502d3b){const _0x8a3a63=_0x9f0ffa;var _0x227030,_0x391472;const {parentId:_0x48a3be,unitId:_0x18a010,text:_0x3402e8,threadId:_0x5417e0}=_0x502d3b,_0xcb0fce=(_0x391472=(_0x227030=_0x3402e8[_0x8a3a63(0xb0)])==null?void 0x0:_0x227030[_0x8a3a63(0xc8)](_0x31c17f=>_0x31c17f[_0x8a3a63(0xc7)]===_0x1bd051[_0x8a3a63(0x8d)])[_0x8a3a63(0xca)](_0x1bd292=>_0x1bd292[_0x8a3a63(0x88)]))!=null?_0x391472:[],_0x495823=JSON[_0x8a3a63(0x90)](_0x3402e8),_0x78d66b=(await this[_0x8a3a63(0xa3)][_0x8a3a63(0xba)](_0x18a010))['getMemberID']();if(_0x48a3be){const _0x598253={'memberId':_0x78d66b,'unitId':_0x18a010,'content':_0x495823,'mention':_0xcb0fce,'threadId':_0x5417e0},_0x8e6257=(await this[_0x8a3a63(0x8a)][_0x8a3a63(0xce)](_0x8a3a63(0x9b)+_0x18a010+_0x8a3a63(0xad),{'body':_0x598253}))[_0x8a3a63(0x9f)][_0x8a3a63(0xa4)];return{..._0x502d3b,'id':_0x8e6257[_0x8a3a63(0xb2)],'dT':_0x97228c(+_0x8e6257[_0x8a3a63(0xbc)])[_0x8a3a63(0xb8)](_0x8a3a63(0x7c)),'personId':_0x8e6257[_0x8a3a63(0xb6)]};}else{const _0x479cad={'memberId':_0x78d66b,'unitId':_0x18a010,'content':_0x495823,'mention':_0xcb0fce},_0x2247e7=await this[_0x8a3a63(0x8a)][_0x8a3a63(0xce)]('/universer-api/comment/unit/'+_0x18a010+_0x8a3a63(0xcb),{'body':_0x479cad});return X(_0x2247e7[_0x8a3a63(0x9f)][_0x8a3a63(0x98)],_0x502d3b);}}async['updateComment'](_0x4c06ee){const _0x30e48a=_0x9f0ffa;var _0x1c2d5d,_0x42c579;const {text:_0x380202,unitId:_0x5aa8af}=_0x4c06ee,_0x47110f=(_0x42c579=(_0x1c2d5d=_0x380202[_0x30e48a(0xb0)])==null?void 0x0:_0x1c2d5d['filter'](_0x2b5bb8=>_0x2b5bb8[_0x30e48a(0xc7)]===_0x1bd051[_0x30e48a(0x8d)])[_0x30e48a(0xca)](_0x25d5a8=>_0x25d5a8['rangeId']))!=null?_0x42c579:[],_0x8c14f8=JSON['stringify'](_0x380202),_0x589bae=_0x4c06ee['threadId'],_0x3038fc=_0x4c06ee['id'],_0x4059bc={'memberId':(await this[_0x30e48a(0xa3)]['requireSession'](_0x5aa8af))[_0x30e48a(0xdd)](),'unitId':_0x5aa8af,'threadId':_0x589bae,'mention':_0x47110f,'content':_0x8c14f8,'replyId':_0x3038fc},_0x41214a=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x5aa8af+_0x30e48a(0xc3),{'body':_0x4059bc});return!_0x41214a[_0x30e48a(0x9f)][_0x30e48a(0xcf)]||_0x41214a[_0x30e48a(0x9f)][_0x30e48a(0xcf)][_0x30e48a(0xc0)]===0x1;}async['resolveComment'](_0x553e9f){const _0x3e713c=_0x9f0ffa,{unitId:_0xa531f1}=_0x553e9f,_0x32afcb=_0x553e9f[_0x3e713c(0x93)],_0x113f42={'memberId':this[_0x3e713c(0x8f)][_0x3e713c(0xb4)]()[_0x3e713c(0xc2)],'unitId':_0xa531f1,'threadId':_0x32afcb,'solved':_0x553e9f['resolved']?I['Solved']:I[_0x3e713c(0xbb)]},_0x341b5b=await this[_0x3e713c(0x8a)][_0x3e713c(0xce)](_0x3e713c(0x9b)+_0xa531f1+_0x3e713c(0xc6),{'body':_0x113f42});return!_0x341b5b[_0x3e713c(0x9f)][_0x3e713c(0xcf)]||_0x341b5b[_0x3e713c(0x9f)]['error'][_0x3e713c(0xc0)]===0x1;}async[_0x9f0ffa(0x8e)](_0x40f57e,_0x2fe850,_0x3b5b97,_0x399929){const _0x4ebc3e=_0x9f0ffa,_0x3d5c8b={'memberId':(await this[_0x4ebc3e(0xa3)][_0x4ebc3e(0xba)](_0x40f57e))[_0x4ebc3e(0xdd)](),'threadId':_0x3b5b97,'replyId':_0x399929,'unitId':_0x40f57e},_0x2a8845=await this[_0x4ebc3e(0x8a)][_0x4ebc3e(0xce)](_0x4ebc3e(0x9b)+_0x40f57e+'/delete',{'body':_0x3d5c8b});return!_0x2a8845[_0x4ebc3e(0x9f)][_0x4ebc3e(0xcf)]||_0x2a8845['body'][_0x4ebc3e(0xcf)]['code']===0x1;}async[_0x9f0ffa(0xdc)](_0x4821a0,_0x206bce,_0x2f2b96){const _0x5e0e89=_0x9f0ffa,_0x29af53={'unitId':_0x4821a0,'threadId':_0x2f2b96},_0x3f789b=await this[_0x5e0e89(0x8a)][_0x5e0e89(0xce)](_0x5e0e89(0x9b)+_0x4821a0+_0x5e0e89(0xa6),{'body':_0x29af53}),_0x103513=_0x2f2b96[_0x5e0e89(0xca)](_0x437dc3=>ee(_0x3f789b[_0x5e0e89(0x9f)]['comments'][_0x437dc3],_0x4821a0,_0x206bce))[_0x5e0e89(0xc8)](Boolean);return Object[_0x5e0e89(0xab)](_0x3f789b[_0x5e0e89(0x9f)][_0x5e0e89(0xd2)])['forEach'](_0x41af1b=>{const _0x4a50ea=_0x5e0e89;this[_0x4a50ea(0x8f)][_0x4a50ea(0xde)](_0x41af1b);}),_0x103513;}[_0x9f0ffa(0x86)](_0x2638f6){const _0x3ee450=_0x9f0ffa;return{'id':_0x2638f6['id'],'threadId':_0x2638f6[_0x3ee450(0x93)],'ref':_0x2638f6[_0x3ee450(0x9a)]};}};f=Q([_(0x0,_0x2fc4da(_0x1a2b24)),_(0x1,_0x2fc4da(_0x3fd1fe)),_(0x2,_0x2fc4da(_0xa5da5c)),_(0x3,_0x2fc4da(_0x2dd6bd))],f);var re=Object[_0x9f0ffa(0x89)],te=(_0x54d174,_0x18b792,_0x52387f,_0x220b0f)=>{const _0x37dfa8=_0x9f0ffa;for(var _0x25dc3d=_0x220b0f>0x1?void 0x0:_0x220b0f?re(_0x18b792,_0x52387f):_0x18b792,_0x43763e=_0x54d174[_0x37dfa8(0xa9)]-0x1,_0x4158a8;_0x43763e>=0x0;_0x43763e--)(_0x4158a8=_0x54d174[_0x43763e])&&(_0x25dc3d=_0x4158a8(_0x25dc3d)||_0x25dc3d);return _0x25dc3d;},N=(_0x3d426d,_0x4e517e)=>(_0x4c83fc,_0x2d75ad)=>_0x4e517e(_0x4c83fc,_0x2d75ad,_0x3d426d);let g=class extends _0x4379a5{constructor(_0x26d8e6,_0x449e74){const _0x37c07e=_0x9f0ffa;super(),this[_0x37c07e(0xb1)]=_0x26d8e6,this['_threadCommentDataSource']=_0x449e74,this[_0x37c07e(0x9d)]();}[_0x9f0ffa(0x9d)](){const _0x22ec97=_0x9f0ffa;this[_0x22ec97(0xb1)][_0x22ec97(0xb7)]=this[_0x22ec97(0xb9)],this[_0x22ec97(0xb1)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x18ed90),N(0x1,_0x2fc4da(f))],g);var se=Object[_0x9f0ffa(0x7e)],oe=Object[_0x9f0ffa(0x89)],ne=(_0x4c020f,_0x200d18,_0x363532)=>_0x200d18 in _0x4c020f?se(_0x4c020f,_0x200d18,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x363532}):_0x4c020f[_0x200d18]=_0x363532,ie=(_0x375f67,_0xf42b4a,_0x3ca3e9,_0xad60ce)=>{for(var _0x38cd32=_0xad60ce>0x1?void 0x0:_0xad60ce?oe(_0xf42b4a,_0x3ca3e9):_0xf42b4a,_0x14b1ca=_0x375f67['length']-0x1,_0x57f1ad;_0x14b1ca>=0x0;_0x14b1ca--)(_0x57f1ad=_0x375f67[_0x14b1ca])&&(_0x38cd32=_0x57f1ad(_0x38cd32)||_0x38cd32);return _0x38cd32;},w=(_0x103dda,_0x456e9b)=>(_0x572c85,_0xff6d20)=>_0x456e9b(_0x572c85,_0xff6d20,_0x103dda),$=(_0x359d5e,_0x1ccc39,_0x485718)=>ne(_0x359d5e,typeof _0x1ccc39!=_0x9f0ffa(0xbd)?_0x1ccc39+'':_0x1ccc39,_0x485718);let b=class extends _0x33e3f5{constructor(_0x5e868a=M,_0x3452d5,_0x426ded){const _0xbba8d3=_0x9f0ffa;super(),this[_0xbba8d3(0xd3)]=_0x5e868a,this[_0xbba8d3(0x82)]=_0x3452d5,this['_configService']=_0x426ded;const {..._0x469cae}=_0x4c41e6({},M,this[_0xbba8d3(0xd3)]);this[_0xbba8d3(0xd4)][_0xbba8d3(0xd0)](z,_0x469cae);}[_0x9f0ffa(0xbf)](){const _0x582da8=_0x9f0ffa;[[f],[g],[S]][_0x582da8(0x84)](_0x1c6fdc=>{const _0x209759=_0x582da8;this[_0x209759(0x82)][_0x209759(0xcd)](_0x1c6fdc);});}[_0x9f0ffa(0xa1)](){const _0x58dbb9=_0x9f0ffa;this[_0x58dbb9(0x82)][_0x58dbb9(0x96)](g),this[_0x58dbb9(0x82)][_0x58dbb9(0x96)](S);}};$(b,_0x9f0ffa(0xcc),W),$(b,_0x9f0ffa(0xc1),_0x25b4bb[_0x9f0ffa(0xaf)]),b=ie([_0xe0925a(_0x2d2845,_0x2c98c7,_0x2aa935),w(0x1,_0x2fc4da(_0x2dd6bd)),w(0x2,_0x34e795)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x12d45a=_0x3a84;(function(_0x36be8c,_0x2f4422){const _0xd59e30=_0x3a84,_0x40fac9=_0x36be8c();while(!![]){try{const _0x488205=-parseInt(_0xd59e30(0x1f3))/0x1+parseInt(_0xd59e30(0x1fa))/0x2+-parseInt(_0xd59e30(0x1c3))/0x3*(parseInt(_0xd59e30(0x1fe))/0x4)+-parseInt(_0xd59e30(0x210))/0x5*(-parseInt(_0xd59e30(0x201))/0x6)+parseInt(_0xd59e30(0x1f4))/0x7+parseInt(_0xd59e30(0x1e9))/0x8*(-parseInt(_0xd59e30(0x1c7))/0x9)+parseInt(_0xd59e30(0x205))/0xa;if(_0x488205===_0x2f4422)break;else _0x40fac9['push'](_0x40fac9['shift']());}catch(_0x8db9f0){_0x40fac9['push'](_0x40fac9['shift']());}}}(_0x11bf,0xef841));function _0x11bf(){const _0x59048e=['3829308VUgbIW','getUnit','disposeWithMe','4281864fIDPtZ','solved','comment','resolved','23753620oaHQvY','/universer-api/comment/unit/','reply','parse','_httpService','type','onReady','_userService','_threadCommentDataSource','users','add','5MHPmPg','find','_threadCommentDataSourceService','code','format','UNRECOGNIZED','map','requireSession','filter','YYYY/MM/DD\x20HH:mm','get','createTimestamp','rangeType','pipe','payload','3BmPnjs','getOwnPropertyDescriptor','/solved','dataSource','4730382nsvRCm','_initUserSync','OpenOrReOpen','deleteComment','/universer-api/user/list','resolveComment','customRanges','_sessionService','values','updateComment','commentUpdate$','Reply','ref','/delete','comments','error','body','Unknown','user','addUser','replyId','slice','_configService','Solved','/add','userId','stringify','root','forEach','Edit','userID','_init','Delete','length','8LFZrNt','size','unitId','symbol','getMemberID','Add','defineProperty','/reply','post','replies','1367467elFEQK','1493828FXuGCl','rangeId','_config','COMMENT','_commentService','_threadCommentModel','1058078ECvPSq','Solve','_injector','threadId'];_0x11bf=function(){return _0x59048e;};return _0x11bf();}import{CommentService as _0x22e3e6,CollaborationSessionService as _0x381696,UniverCollaborationClientPlugin as _0x2b1311}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0xd2c18d}from'@univerjs-pro/license';import{dayjs as _0x565b79,UserManagerService as _0x9c2e12,Inject as _0x19cdec,Injector as _0x52d667,Disposable as _0xb6e203,CustomRangeType as _0x5043a7,UniverInstanceType as _0x23918e,DependentOn as _0xe2719d,IConfigService as _0x4d08cf,Plugin as _0x149da9,merge as _0x109bcd}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0xf7150a}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x34633a,IThreadCommentDataSourceService as _0x53561c}from'@univerjs/thread-comment';import{bufferTime as _0x577fa8}from'rxjs';import{HTTPService as _0x4fe4d0}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x3ad1b1=>(_0x3ad1b1[_0x3ad1b1[_0x12d45a(0x1c9)]=0x0]=_0x12d45a(0x1c9),_0x3ad1b1[_0x3ad1b1[_0x12d45a(0x1de)]=0x1]=_0x12d45a(0x1de),_0x3ad1b1[_0x3ad1b1[_0x12d45a(0x215)]=-0x1]=_0x12d45a(0x215),_0x3ad1b1))(I||{}),v=(_0xff201f=>(_0xff201f[_0xff201f['Unknown']=0x0]=_0x12d45a(0x1d8),_0xff201f[_0xff201f[_0x12d45a(0x1ee)]=0x1]=_0x12d45a(0x1ee),_0xff201f[_0xff201f['Reply']=0x2]=_0x12d45a(0x1d2),_0xff201f[_0xff201f['Edit']=0x3]=_0x12d45a(0x1e4),_0xff201f[_0xff201f[_0x12d45a(0x1e7)]=0x4]=_0x12d45a(0x1e7),_0xff201f[_0xff201f[_0x12d45a(0x1fb)]=0x5]='Solve',_0xff201f[_0xff201f['UNRECOGNIZED']=-0x1]=_0x12d45a(0x215),_0xff201f))(v||{});const D=_0x571835=>_0x565b79(new Date(+_0x571835))[_0x12d45a(0x214)](_0x12d45a(0x1bd)),B=async(_0x493aa9,_0x25db7e)=>{const _0x4d5679=_0x12d45a,_0x56883b=_0x493aa9['get'](_0x9c2e12),_0x422f1c=_0x493aa9[_0x4d5679(0x1be)](_0x4fe4d0);_0x25db7e[_0x4d5679(0x1e3)](_0x11523e=>{_0x56883b['getUser'](_0x11523e)&&_0x25db7e['delete'](_0x11523e);}),_0x25db7e[_0x4d5679(0x1ea)]&&(await _0x422f1c[_0x4d5679(0x1be)](_0x4d5679(0x1cb),{'params':{'userIDs':[..._0x25db7e]}}))[_0x4d5679(0x1d7)][_0x4d5679(0x20e)][_0x4d5679(0x1e3)](_0x36f6f5=>{const _0x45aefb=_0x4d5679;_0x36f6f5&&_0x56883b[_0x45aefb(0x1da)](_0x36f6f5);});};var K=Object[_0x12d45a(0x1c4)],V=(_0x20304a,_0x4160e5,_0x3702fb,_0x3cb104)=>{const _0xd1544d=_0x12d45a;for(var _0x3cd3f2=_0x3cb104>0x1?void 0x0:_0x3cb104?K(_0x4160e5,_0x3702fb):_0x4160e5,_0x2c35dc=_0x20304a[_0xd1544d(0x1e8)]-0x1,_0x455fad;_0x2c35dc>=0x0;_0x2c35dc--)(_0x455fad=_0x20304a[_0x2c35dc])&&(_0x3cd3f2=_0x455fad(_0x3cd3f2)||_0x3cd3f2);return _0x3cd3f2;},p=(_0x406d9c,_0x2175b0)=>(_0x217648,_0x43989c)=>_0x2175b0(_0x217648,_0x43989c,_0x406d9c);let S=class extends _0xb6e203{constructor(_0x4cb218,_0x15ae2d,_0x102d16,_0x5cc4da){const _0x304b49=_0x12d45a;super(),this[_0x304b49(0x1f8)]=_0x4cb218,this['_threadCommentModel']=_0x15ae2d,this[_0x304b49(0x20c)]=_0x102d16,this[_0x304b49(0x1fc)]=_0x5cc4da,this[_0x304b49(0x1e6)](),this[_0x304b49(0x1c8)]();}[_0x12d45a(0x1c8)](){const _0x238ae9=_0x12d45a;this[_0x238ae9(0x200)](this[_0x238ae9(0x1f9)][_0x238ae9(0x1d1)][_0x238ae9(0x1c1)](_0x577fa8(0x10))['subscribe'](_0x529784=>{const _0xaab34=_0x238ae9,_0x2e3700=new Set();_0x529784['forEach'](_0x1e77bd=>{const _0x6b2d23=_0x3a84;switch(_0x1e77bd[_0x6b2d23(0x20a)]){case _0x6b2d23(0x20f):{const _0x52f205=_0x1e77bd[_0x6b2d23(0x1c2)]['personId'];_0x2e3700[_0x6b2d23(0x20f)](_0x52f205);break;}}}),B(this[_0xaab34(0x1fc)],_0x2e3700);}));}['_init'](){const _0x49fdb4=_0x12d45a;this[_0x49fdb4(0x200)](this[_0x49fdb4(0x1f8)]['commentUpdate$']['subscribe'](async _0x16311d=>{const _0x422a99=_0x49fdb4;var _0x242109,_0x321693,_0x1ff50e,_0x1e1385;const _0x47f6d5=(_0x242109=this[_0x422a99(0x1f9)][_0x422a99(0x1ff)](_0x16311d[_0x422a99(0x1eb)])[_0x422a99(0x211)](_0x370219=>_0x370219[_0x422a99(0x1fd)]===_0x16311d[_0x422a99(0x1fd)]))==null?void 0x0:_0x242109[_0x422a99(0x1e2)];if(!_0x47f6d5)return;const {unitId:_0x373bf8,subUnitId:_0x5a6a08}=_0x47f6d5;switch(_0x16311d[_0x422a99(0x1d9)]&&this[_0x422a99(0x20c)]['addUser'](_0x16311d['user']),_0x16311d[_0x422a99(0x20a)]){case v[_0x422a99(0x1ee)]:break;case v[_0x422a99(0x1d2)]:{this[_0x422a99(0x1f9)]['addComment'](_0x373bf8,_0x5a6a08,{'unitId':_0x373bf8,'subUnitId':_0x5a6a08,'ref':'','id':_0x16311d[_0x422a99(0x1db)],'dT':D(+_0x16311d[_0x422a99(0x1bf)]),'threadId':_0x16311d[_0x422a99(0x1fd)],'personId':(_0x1ff50e=(_0x321693=_0x16311d[_0x422a99(0x1d9)])==null?void 0x0:_0x321693[_0x422a99(0x1e5)])!=null?_0x1ff50e:_0x16311d[_0x422a99(0x1e0)],'text':JSON[_0x422a99(0x208)](_0x16311d['content']),'parentId':_0x47f6d5['id']});break;}case v[_0x422a99(0x1e7)]:{const _0x1a810c=this['_threadCommentModel']['getComment'](_0x373bf8,_0x5a6a08,_0x16311d[_0x422a99(0x1db)]);_0x1a810c&&_0x1a810c['parentId']&&this[_0x422a99(0x1f9)][_0x422a99(0x1ca)](_0x373bf8,_0x5a6a08,_0x16311d[_0x422a99(0x1db)]);break;}case v[_0x422a99(0x1e4)]:{this[_0x422a99(0x1f9)]['updateComment'](_0x373bf8,_0x5a6a08,{'commentId':_0x16311d[_0x422a99(0x1db)],'text':JSON[_0x422a99(0x208)](_0x16311d['content'])});break;}case v[_0x422a99(0x1fb)]:{const _0x5eec2b=(_0x1e1385=this[_0x422a99(0x1f9)]['getUnit'](_0x16311d[_0x422a99(0x1eb)])[_0x422a99(0x211)](_0x347ed0=>_0x347ed0['threadId']===_0x16311d[_0x422a99(0x1fd)]))==null?void 0x0:_0x1e1385[_0x422a99(0x1e2)];_0x5eec2b&&this[_0x422a99(0x1f9)]['resolveComment'](_0x373bf8,_0x5a6a08,_0x5eec2b['id'],_0x16311d['solved']===I[_0x422a99(0x1de)]);break;}}}));}};S=V([p(0x0,_0x19cdec(_0x22e3e6)),p(0x1,_0x19cdec(_0x34633a)),p(0x2,_0x19cdec(_0x9c2e12)),p(0x3,_0x19cdec(_0x52d667))],S);const z='thread-comment-data-source.config',M={};var k=Object[_0x12d45a(0x1c4)],Q=(_0x2085b7,_0x51e25f,_0x2a5e56,_0x3a5e32)=>{for(var _0x11a874=_0x3a5e32>0x1?void 0x0:_0x3a5e32?k(_0x51e25f,_0x2a5e56):_0x51e25f,_0x1c4bb2=_0x2085b7['length']-0x1,_0x51ef98;_0x1c4bb2>=0x0;_0x1c4bb2--)(_0x51ef98=_0x2085b7[_0x1c4bb2])&&(_0x11a874=_0x51ef98(_0x11a874)||_0x11a874);return _0x11a874;},_=(_0x41b686,_0xcc772e)=>(_0x25d56b,_0x386ba5)=>_0xcc772e(_0x25d56b,_0x386ba5,_0x41b686);function X(_0x5dea90,_0x431833){const _0x5a6ed6=_0x12d45a,_0x20e83c=_0x5dea90['replies'][0x0];return{..._0x431833,'id':_0x20e83c['replyId'],'resolved':_0x5dea90['solved']===0x1,'dT':D(_0x20e83c[_0x5a6ed6(0x1bf)]),'personId':_0x20e83c[_0x5a6ed6(0x1e0)],'threadId':_0x20e83c[_0x5a6ed6(0x1fd)]};}function ee(_0x1699bb,_0x323e94,_0x37a7e5){const _0x2ec942=_0x12d45a;var _0x8f3ccd,_0x5d738a;if(((_0x5d738a=(_0x8f3ccd=_0x1699bb==null?void 0x0:_0x1699bb['replies'])==null?void 0x0:_0x8f3ccd['length'])!=null?_0x5d738a:0x0)>0x0){const _0xf015a3=(_0x2f2070,_0x50ff5f)=>({'id':_0x2f2070['replyId'],'threadId':_0x2f2070[_0x2ec942(0x1fd)],'dT':D(_0x2f2070[_0x2ec942(0x1bf)]),'personId':_0x2f2070[_0x2ec942(0x1e0)],'resolved':_0x1699bb[_0x2ec942(0x202)]===I[_0x2ec942(0x1de)],'unitId':_0x323e94,'subUnitId':_0x37a7e5,'text':JSON[_0x2ec942(0x208)](_0x2f2070['content']),'parentId':_0x50ff5f}),_0x389574=_0xf015a3(_0x1699bb[_0x2ec942(0x1f2)][0x0]);return{..._0x389574,'children':_0x1699bb['replies'][_0x2ec942(0x1dc)](0x1)[_0x2ec942(0x216)](_0x2e350b=>_0xf015a3(_0x2e350b,_0x389574['id']))};}return null;}let f=class{constructor(_0x5d7364,_0x353030,_0x239382,_0x170074){const _0xaa1d95=_0x12d45a;this[_0xaa1d95(0x209)]=_0x5d7364,this[_0xaa1d95(0x20c)]=_0x353030,this['_sessionService']=_0x239382,this[_0xaa1d95(0x1fc)]=_0x170074;}async['addComment'](_0x1fdea6){const _0x5ed334=_0x12d45a;var _0x44d5f3,_0x4c87c8;const {parentId:_0x33dac4,unitId:_0x4c1b31,text:_0x2cc5dc,threadId:_0x475679}=_0x1fdea6,_0x54587a=(_0x4c87c8=(_0x44d5f3=_0x2cc5dc[_0x5ed334(0x1cd)])==null?void 0x0:_0x44d5f3[_0x5ed334(0x1bc)](_0x4fb7f1=>_0x4fb7f1[_0x5ed334(0x1c0)]===_0x5043a7[_0x5ed334(0x1f7)])[_0x5ed334(0x216)](_0x4e8eb9=>_0x4e8eb9[_0x5ed334(0x1f5)]))!=null?_0x4c87c8:[],_0x11f288=JSON[_0x5ed334(0x1e1)](_0x2cc5dc),_0x2c8276=(await this[_0x5ed334(0x1ce)][_0x5ed334(0x217)](_0x4c1b31))[_0x5ed334(0x1ed)]();if(_0x33dac4){const _0x2614c2={'memberId':_0x2c8276,'unitId':_0x4c1b31,'content':_0x11f288,'mention':_0x54587a,'threadId':_0x475679},_0x1c1bca=(await this[_0x5ed334(0x209)]['post'](_0x5ed334(0x206)+_0x4c1b31+_0x5ed334(0x1f0),{'body':_0x2614c2}))['body'][_0x5ed334(0x207)];return{..._0x1fdea6,'id':_0x1c1bca[_0x5ed334(0x1db)],'dT':_0x565b79(+_0x1c1bca['createTimestamp'])[_0x5ed334(0x214)](_0x5ed334(0x1bd)),'personId':_0x1c1bca[_0x5ed334(0x1e0)]};}else{const _0x35916a={'memberId':_0x2c8276,'unitId':_0x4c1b31,'content':_0x11f288,'mention':_0x54587a},_0x361f68=await this[_0x5ed334(0x209)][_0x5ed334(0x1f1)](_0x5ed334(0x206)+_0x4c1b31+_0x5ed334(0x1df),{'body':_0x35916a});return X(_0x361f68[_0x5ed334(0x1d7)][_0x5ed334(0x203)],_0x1fdea6);}}async[_0x12d45a(0x1d0)](_0x5b63c1){const _0x16df6d=_0x12d45a;var _0x1d0d9b,_0x22e362;const {text:_0x309cf8,unitId:_0x1c2e80}=_0x5b63c1,_0x3d5b92=(_0x22e362=(_0x1d0d9b=_0x309cf8[_0x16df6d(0x1cd)])==null?void 0x0:_0x1d0d9b[_0x16df6d(0x1bc)](_0x902d5c=>_0x902d5c[_0x16df6d(0x1c0)]===_0x5043a7[_0x16df6d(0x1f7)])[_0x16df6d(0x216)](_0x246f4f=>_0x246f4f['rangeId']))!=null?_0x22e362:[],_0x4f5f52=JSON[_0x16df6d(0x1e1)](_0x309cf8),_0x9664e3=_0x5b63c1[_0x16df6d(0x1fd)],_0x41cee3=_0x5b63c1['id'],_0x2e61aa={'memberId':(await this['_sessionService'][_0x16df6d(0x217)](_0x1c2e80))[_0x16df6d(0x1ed)](),'unitId':_0x1c2e80,'threadId':_0x9664e3,'mention':_0x3d5b92,'content':_0x4f5f52,'replyId':_0x41cee3},_0x26038e=await this['_httpService'][_0x16df6d(0x1f1)](_0x16df6d(0x206)+_0x1c2e80+'/edit',{'body':_0x2e61aa});return!_0x26038e[_0x16df6d(0x1d7)]['error']||_0x26038e[_0x16df6d(0x1d7)]['error'][_0x16df6d(0x213)]===0x1;}async[_0x12d45a(0x1cc)](_0x2e99c6){const _0x7fe36c=_0x12d45a,{unitId:_0x31b4a6}=_0x2e99c6,_0x1a81b2=_0x2e99c6['threadId'],_0x22f31d={'memberId':this[_0x7fe36c(0x20c)]['getCurrentUser']()[_0x7fe36c(0x1e5)],'unitId':_0x31b4a6,'threadId':_0x1a81b2,'solved':_0x2e99c6[_0x7fe36c(0x204)]?I[_0x7fe36c(0x1de)]:I['OpenOrReOpen']},_0x5aef47=await this[_0x7fe36c(0x209)][_0x7fe36c(0x1f1)](_0x7fe36c(0x206)+_0x31b4a6+_0x7fe36c(0x1c5),{'body':_0x22f31d});return!_0x5aef47[_0x7fe36c(0x1d7)][_0x7fe36c(0x1d6)]||_0x5aef47[_0x7fe36c(0x1d7)][_0x7fe36c(0x1d6)][_0x7fe36c(0x213)]===0x1;}async[_0x12d45a(0x1ca)](_0x51aaa5,_0x187064,_0x22ae41,_0x1ffd43){const _0x38c4ad=_0x12d45a,_0x50400c={'memberId':(await this[_0x38c4ad(0x1ce)]['requireSession'](_0x51aaa5))[_0x38c4ad(0x1ed)](),'threadId':_0x22ae41,'replyId':_0x1ffd43,'unitId':_0x51aaa5},_0x2163a6=await this[_0x38c4ad(0x209)][_0x38c4ad(0x1f1)](_0x38c4ad(0x206)+_0x51aaa5+_0x38c4ad(0x1d4),{'body':_0x50400c});return!_0x2163a6['body'][_0x38c4ad(0x1d6)]||_0x2163a6[_0x38c4ad(0x1d7)]['error'][_0x38c4ad(0x213)]===0x1;}async['listComments'](_0x3a4e52,_0x3b418d,_0x51faf0){const _0x30010a=_0x12d45a,_0x44afcd={'unitId':_0x3a4e52,'threadId':_0x51faf0},_0x55dfe6=await this[_0x30010a(0x209)]['post'](_0x30010a(0x206)+_0x3a4e52+'/list',{'body':_0x44afcd}),_0x2d7b2a=_0x51faf0[_0x30010a(0x216)](_0x1ec3f9=>ee(_0x55dfe6[_0x30010a(0x1d7)][_0x30010a(0x1d5)][_0x1ec3f9],_0x3a4e52,_0x3b418d))[_0x30010a(0x1bc)](Boolean);return Object[_0x30010a(0x1cf)](_0x55dfe6['body'][_0x30010a(0x20e)])['forEach'](_0x203c22=>{const _0x40f698=_0x30010a;this[_0x40f698(0x20c)][_0x40f698(0x1da)](_0x203c22);}),_0x2d7b2a;}['saveCommentToSnapshot'](_0x2f6f97){const _0x5943f1=_0x12d45a;return{'id':_0x2f6f97['id'],'threadId':_0x2f6f97[_0x5943f1(0x1fd)],'ref':_0x2f6f97[_0x5943f1(0x1d3)]};}};f=Q([_(0x0,_0x19cdec(_0x4fe4d0)),_(0x1,_0x19cdec(_0x9c2e12)),_(0x2,_0x19cdec(_0x381696)),_(0x3,_0x19cdec(_0x52d667))],f);var re=Object[_0x12d45a(0x1c4)],te=(_0x21cce6,_0x21512d,_0x3146d3,_0x45275b)=>{for(var _0x176fdb=_0x45275b>0x1?void 0x0:_0x45275b?re(_0x21512d,_0x3146d3):_0x21512d,_0xab7ac7=_0x21cce6['length']-0x1,_0x488043;_0xab7ac7>=0x0;_0xab7ac7--)(_0x488043=_0x21cce6[_0xab7ac7])&&(_0x176fdb=_0x488043(_0x176fdb)||_0x176fdb);return _0x176fdb;},N=(_0x27b258,_0x3e9a43)=>(_0x47a59a,_0x3f7e54)=>_0x3e9a43(_0x47a59a,_0x3f7e54,_0x27b258);let g=class extends _0xb6e203{constructor(_0x5afa7b,_0x2f6088){const _0x28826c=_0x12d45a;super(),this[_0x28826c(0x212)]=_0x5afa7b,this['_threadCommentDataSource']=_0x2f6088,this['_initDataSource']();}['_initDataSource'](){const _0x123425=_0x12d45a;this[_0x123425(0x212)][_0x123425(0x1c6)]=this[_0x123425(0x20d)],this[_0x123425(0x212)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x53561c),N(0x1,_0x19cdec(f))],g);var se=Object[_0x12d45a(0x1ef)],oe=Object[_0x12d45a(0x1c4)],ne=(_0x57ee37,_0x23e766,_0x1cd8a2)=>_0x23e766 in _0x57ee37?se(_0x57ee37,_0x23e766,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x1cd8a2}):_0x57ee37[_0x23e766]=_0x1cd8a2,ie=(_0xeca41b,_0x229020,_0x3ec319,_0x393822)=>{const _0x478b07=_0x12d45a;for(var _0x5f0601=_0x393822>0x1?void 0x0:_0x393822?oe(_0x229020,_0x3ec319):_0x229020,_0x2a81c7=_0xeca41b[_0x478b07(0x1e8)]-0x1,_0x1c3c5e;_0x2a81c7>=0x0;_0x2a81c7--)(_0x1c3c5e=_0xeca41b[_0x2a81c7])&&(_0x5f0601=_0x1c3c5e(_0x5f0601)||_0x5f0601);return _0x5f0601;},w=(_0x2653ba,_0x4fd4b3)=>(_0x5d26d7,_0x123938)=>_0x4fd4b3(_0x5d26d7,_0x123938,_0x2653ba),$=(_0x2b6688,_0x4642ca,_0x41e4d3)=>ne(_0x2b6688,typeof _0x4642ca!=_0x12d45a(0x1ec)?_0x4642ca+'':_0x4642ca,_0x41e4d3);function _0x3a84(_0x1ec578,_0x1877e5){const _0x11bf58=_0x11bf();return _0x3a84=function(_0x3a8429,_0x1837a4){_0x3a8429=_0x3a8429-0x1bc;let _0x190cf9=_0x11bf58[_0x3a8429];return _0x190cf9;},_0x3a84(_0x1ec578,_0x1877e5);}let b=class extends _0x149da9{constructor(_0x8c16ca=M,_0x14995d,_0x1bb6a7){const _0x9e6d35=_0x12d45a;super(),this[_0x9e6d35(0x1f6)]=_0x8c16ca,this[_0x9e6d35(0x1fc)]=_0x14995d,this[_0x9e6d35(0x1dd)]=_0x1bb6a7;const {..._0x56bec3}=_0x109bcd({},M,this[_0x9e6d35(0x1f6)]);this[_0x9e6d35(0x1dd)]['setConfig'](z,_0x56bec3);}['onStarting'](){const _0x134cec=_0x12d45a;[[f],[g],[S]][_0x134cec(0x1e3)](_0x2cec94=>{const _0x43ba92=_0x134cec;this[_0x43ba92(0x1fc)][_0x43ba92(0x20f)](_0x2cec94);});}[_0x12d45a(0x20b)](){const _0x3b2ea9=_0x12d45a;this['_injector'][_0x3b2ea9(0x1be)](g),this[_0x3b2ea9(0x1fc)][_0x3b2ea9(0x1be)](S);}};$(b,'pluginName',W),$(b,_0x12d45a(0x20a),_0x23918e['UNIVER_UNKNOWN']),b=ie([_0xe2719d(_0xf7150a,_0x2b1311,_0xd2c18d),w(0x1,_0x19cdec(_0x52d667)),w(0x2,_0x4d08cf)],b);export{b as UniverThreadCommentDataSourcePlugin};
1
+ const _0x9f0ffa=_0x53f0;(function(_0x2f64ed,_0x1f092b){const _0x27f668=_0x53f0,_0x1a966f=_0x2f64ed();while(!![]){try{const _0x2fce99=parseInt(_0x27f668(0xd9))/0x1+parseInt(_0x27f668(0xd6))/0x2+-parseInt(_0x27f668(0xc4))/0x3*(parseInt(_0x27f668(0xaa))/0x4)+parseInt(_0x27f668(0xd7))/0x5+parseInt(_0x27f668(0xa0))/0x6+parseInt(_0x27f668(0xae))/0x7*(parseInt(_0x27f668(0xda))/0x8)+-parseInt(_0x27f668(0x7b))/0x9;if(_0x2fce99===_0x1f092b)break;else _0x1a966f['push'](_0x1a966f['shift']());}catch(_0x965280){_0x1a966f['push'](_0x1a966f['shift']());}}}(_0x5af4,0xe2a9d));import{CommentService as _0xf6d61,CollaborationSessionService as _0xa5da5c,UniverCollaborationClientPlugin as _0x2c98c7}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2aa935}from'@univerjs-pro/license';import{dayjs as _0x97228c,UserManagerService as _0x3fd1fe,Inject as _0x2fc4da,Injector as _0x2dd6bd,Disposable as _0x4379a5,CustomRangeType as _0x1bd051,UniverInstanceType as _0x25b4bb,DependentOn as _0xe0925a,IConfigService as _0x34e795,Plugin as _0x33e3f5,merge as _0x4c41e6}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x2d2845}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x4c90ae,IThreadCommentDataSourceService as _0x18ed90}from'@univerjs/thread-comment';import{bufferTime as _0x4ba19b}from'rxjs';import{HTTPService as _0x1a2b24}from'@univerjs/network';const W='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var I=(_0x35974c=>(_0x35974c[_0x35974c[_0x9f0ffa(0xbb)]=0x0]=_0x9f0ffa(0xbb),_0x35974c[_0x35974c[_0x9f0ffa(0x92)]=0x1]=_0x9f0ffa(0x92),_0x35974c[_0x35974c[_0x9f0ffa(0x80)]=-0x1]=_0x9f0ffa(0x80),_0x35974c))(I||{}),v=(_0x3cd5f2=>(_0x3cd5f2[_0x3cd5f2[_0x9f0ffa(0xa5)]=0x0]=_0x9f0ffa(0xa5),_0x3cd5f2[_0x3cd5f2[_0x9f0ffa(0x91)]=0x1]=_0x9f0ffa(0x91),_0x3cd5f2[_0x3cd5f2[_0x9f0ffa(0x94)]=0x2]='Reply',_0x3cd5f2[_0x3cd5f2[_0x9f0ffa(0xac)]=0x3]='Edit',_0x3cd5f2[_0x3cd5f2[_0x9f0ffa(0xdf)]=0x4]='Delete',_0x3cd5f2[_0x3cd5f2[_0x9f0ffa(0xa8)]=0x5]=_0x9f0ffa(0xa8),_0x3cd5f2[_0x3cd5f2[_0x9f0ffa(0x80)]=-0x1]='UNRECOGNIZED',_0x3cd5f2))(v||{});const D=_0x9437c1=>_0x97228c(new Date(+_0x9437c1))[_0x9f0ffa(0xb8)](_0x9f0ffa(0x7c)),B=async(_0x36d27d,_0x3ced1d)=>{const _0x23e6e6=_0x9f0ffa,_0x3ce302=_0x36d27d[_0x23e6e6(0x96)](_0x3fd1fe),_0x293c51=_0x36d27d[_0x23e6e6(0x96)](_0x1a2b24);_0x3ced1d[_0x23e6e6(0x84)](_0xe9be9f=>{const _0x26c569=_0x23e6e6;_0x3ce302[_0x26c569(0x9e)](_0xe9be9f)&&_0x3ced1d[_0x26c569(0x87)](_0xe9be9f);}),_0x3ced1d[_0x23e6e6(0x79)]&&(await _0x293c51[_0x23e6e6(0x96)](_0x23e6e6(0x85),{'params':{'userIDs':[..._0x3ced1d]}}))[_0x23e6e6(0x9f)]['users'][_0x23e6e6(0x84)](_0x5bfb33=>{_0x5bfb33&&_0x3ce302['addUser'](_0x5bfb33);});};var K=Object[_0x9f0ffa(0x89)],V=(_0x5dce83,_0x49b23e,_0x12f65e,_0x10b282)=>{const _0x3a0c3b=_0x9f0ffa;for(var _0x48781e=_0x10b282>0x1?void 0x0:_0x10b282?K(_0x49b23e,_0x12f65e):_0x49b23e,_0x157efc=_0x5dce83[_0x3a0c3b(0xa9)]-0x1,_0x195c07;_0x157efc>=0x0;_0x157efc--)(_0x195c07=_0x5dce83[_0x157efc])&&(_0x48781e=_0x195c07(_0x48781e)||_0x48781e);return _0x48781e;},p=(_0x47c4b7,_0x375494)=>(_0x59393f,_0x28291f)=>_0x375494(_0x59393f,_0x28291f,_0x47c4b7);function _0x5af4(){const _0x238ccc=['138oWNiVK','subscribe','/solved','rangeType','filter','_commentService','map','/add','pluginName','add','post','error','setConfig','commentUpdate$','users','_config','_configService','root','859948HKiFAM','4741200owyGLa','_initUserSync','774722LUibAy','8Snivjw','_threadCommentModel','listComments','getMemberID','addUser','Delete','size','updateComment','16921413vNsnHt','YYYY/MM/DD\x20HH:mm','replies','defineProperty','thread-comment-data-source.config','UNRECOGNIZED','parse','_injector','parentId','forEach','/universer-api/user/list','saveCommentToSnapshot','delete','rangeId','getOwnPropertyDescriptor','_httpService','resolveComment','getUnit','COMMENT','deleteComment','_userService','stringify','Add','Solved','threadId','Reply','unitId','get','content','comment','user','ref','/universer-api/comment/unit/','disposeWithMe','_initDataSource','getUser','body','10682154ZdfKcv','onReady','pipe','_sessionService','reply','Unknown','/list','find','Solve','length','98760PRIuAN','values','Edit','/reply','77105gRfsOj','UNIVER_UNKNOWN','customRanges','_threadCommentDataSourceService','replyId','solved','getCurrentUser','_init','userId','dataSource','format','_threadCommentDataSource','requireSession','OpenOrReOpen','createTimestamp','symbol','addComment','onStarting','code','type','userID','/edit'];_0x5af4=function(){return _0x238ccc;};return _0x5af4();}let S=class extends _0x4379a5{constructor(_0x396074,_0x3de31d,_0xd6124,_0x53e6d3){const _0x590c24=_0x9f0ffa;super(),this[_0x590c24(0xc9)]=_0x396074,this[_0x590c24(0xdb)]=_0x3de31d,this[_0x590c24(0x8f)]=_0xd6124,this['_injector']=_0x53e6d3,this[_0x590c24(0xb5)](),this['_initUserSync']();}[_0x9f0ffa(0xd8)](){const _0x2746b8=_0x9f0ffa;this[_0x2746b8(0x9c)](this[_0x2746b8(0xdb)][_0x2746b8(0xd1)][_0x2746b8(0xa2)](_0x4ba19b(0x10))[_0x2746b8(0xc5)](_0x180adf=>{const _0x27cc10=_0x2746b8,_0x5a8fd3=new Set();_0x180adf[_0x27cc10(0x84)](_0x40f900=>{const _0x2ea1f3=_0x27cc10;switch(_0x40f900[_0x2ea1f3(0xc1)]){case'add':{const _0x397edd=_0x40f900['payload']['personId'];_0x5a8fd3[_0x2ea1f3(0xcd)](_0x397edd);break;}}}),B(this[_0x27cc10(0x82)],_0x5a8fd3);}));}['_init'](){const _0x5e295f=_0x9f0ffa;this[_0x5e295f(0x9c)](this['_commentService'][_0x5e295f(0xd1)]['subscribe'](async _0x57d4c7=>{const _0x292ae6=_0x5e295f;var _0x5efb9c,_0x2d1b1d,_0x27e56b,_0x2be60d;const _0x1e0bab=(_0x5efb9c=this[_0x292ae6(0xdb)][_0x292ae6(0x8c)](_0x57d4c7['unitId'])[_0x292ae6(0xa7)](_0x3c2278=>_0x3c2278[_0x292ae6(0x93)]===_0x57d4c7[_0x292ae6(0x93)]))==null?void 0x0:_0x5efb9c[_0x292ae6(0xd5)];if(!_0x1e0bab)return;const {unitId:_0xcb55a4,subUnitId:_0x1a0a78}=_0x1e0bab;switch(_0x57d4c7[_0x292ae6(0x99)]&&this[_0x292ae6(0x8f)][_0x292ae6(0xde)](_0x57d4c7[_0x292ae6(0x99)]),_0x57d4c7['type']){case v['Add']:break;case v[_0x292ae6(0x94)]:{this[_0x292ae6(0xdb)][_0x292ae6(0xbe)](_0xcb55a4,_0x1a0a78,{'unitId':_0xcb55a4,'subUnitId':_0x1a0a78,'ref':'','id':_0x57d4c7[_0x292ae6(0xb2)],'dT':D(+_0x57d4c7[_0x292ae6(0xbc)]),'threadId':_0x57d4c7[_0x292ae6(0x93)],'personId':(_0x27e56b=(_0x2d1b1d=_0x57d4c7['user'])==null?void 0x0:_0x2d1b1d[_0x292ae6(0xc2)])!=null?_0x27e56b:_0x57d4c7[_0x292ae6(0xb6)],'text':JSON[_0x292ae6(0x81)](_0x57d4c7['content']),'parentId':_0x1e0bab['id']});break;}case v[_0x292ae6(0xdf)]:{const _0xca4b92=this['_threadCommentModel']['getComment'](_0xcb55a4,_0x1a0a78,_0x57d4c7['replyId']);_0xca4b92&&_0xca4b92[_0x292ae6(0x83)]&&this[_0x292ae6(0xdb)][_0x292ae6(0x8e)](_0xcb55a4,_0x1a0a78,_0x57d4c7['replyId']);break;}case v[_0x292ae6(0xac)]:{this[_0x292ae6(0xdb)][_0x292ae6(0x7a)](_0xcb55a4,_0x1a0a78,{'commentId':_0x57d4c7['replyId'],'text':JSON[_0x292ae6(0x81)](_0x57d4c7[_0x292ae6(0x97)])});break;}case v[_0x292ae6(0xa8)]:{const _0x37de32=(_0x2be60d=this['_threadCommentModel']['getUnit'](_0x57d4c7[_0x292ae6(0x95)])[_0x292ae6(0xa7)](_0x6f61ed=>_0x6f61ed[_0x292ae6(0x93)]===_0x57d4c7[_0x292ae6(0x93)]))==null?void 0x0:_0x2be60d[_0x292ae6(0xd5)];_0x37de32&&this[_0x292ae6(0xdb)][_0x292ae6(0x8b)](_0xcb55a4,_0x1a0a78,_0x37de32['id'],_0x57d4c7[_0x292ae6(0xb3)]===I[_0x292ae6(0x92)]);break;}}}));}};S=V([p(0x0,_0x2fc4da(_0xf6d61)),p(0x1,_0x2fc4da(_0x4c90ae)),p(0x2,_0x2fc4da(_0x3fd1fe)),p(0x3,_0x2fc4da(_0x2dd6bd))],S);function _0x53f0(_0x32d2e9,_0x5ce561){const _0x5af486=_0x5af4();return _0x53f0=function(_0x53f086,_0x5e550){_0x53f086=_0x53f086-0x79;let _0x1c12b9=_0x5af486[_0x53f086];return _0x1c12b9;},_0x53f0(_0x32d2e9,_0x5ce561);}const z=_0x9f0ffa(0x7f),M={};var k=Object[_0x9f0ffa(0x89)],Q=(_0x1bc5da,_0x545eb9,_0x5cd082,_0x55096f)=>{const _0x136629=_0x9f0ffa;for(var _0x2e3888=_0x55096f>0x1?void 0x0:_0x55096f?k(_0x545eb9,_0x5cd082):_0x545eb9,_0x6c6208=_0x1bc5da[_0x136629(0xa9)]-0x1,_0x20f316;_0x6c6208>=0x0;_0x6c6208--)(_0x20f316=_0x1bc5da[_0x6c6208])&&(_0x2e3888=_0x20f316(_0x2e3888)||_0x2e3888);return _0x2e3888;},_=(_0x58b9dd,_0x4a7301)=>(_0x5637fe,_0x2e8c53)=>_0x4a7301(_0x5637fe,_0x2e8c53,_0x58b9dd);function X(_0x17492c,_0x3fffad){const _0x2aec5f=_0x9f0ffa,_0x4260a9=_0x17492c['replies'][0x0];return{..._0x3fffad,'id':_0x4260a9[_0x2aec5f(0xb2)],'resolved':_0x17492c[_0x2aec5f(0xb3)]===0x1,'dT':D(_0x4260a9[_0x2aec5f(0xbc)]),'personId':_0x4260a9['userId'],'threadId':_0x4260a9[_0x2aec5f(0x93)]};}function ee(_0x58ea2b,_0x141ebf,_0x42750f){const _0x25e2ef=_0x9f0ffa;var _0x53fdd6,_0x5bcace;if(((_0x5bcace=(_0x53fdd6=_0x58ea2b==null?void 0x0:_0x58ea2b[_0x25e2ef(0x7d)])==null?void 0x0:_0x53fdd6[_0x25e2ef(0xa9)])!=null?_0x5bcace:0x0)>0x0){const _0x166a1a=(_0x110534,_0x110545)=>({'id':_0x110534['replyId'],'threadId':_0x110534[_0x25e2ef(0x93)],'dT':D(_0x110534[_0x25e2ef(0xbc)]),'personId':_0x110534[_0x25e2ef(0xb6)],'resolved':_0x58ea2b[_0x25e2ef(0xb3)]===I[_0x25e2ef(0x92)],'unitId':_0x141ebf,'subUnitId':_0x42750f,'text':JSON[_0x25e2ef(0x81)](_0x110534[_0x25e2ef(0x97)]),'parentId':_0x110545}),_0x1d0f79=_0x166a1a(_0x58ea2b[_0x25e2ef(0x7d)][0x0]);return{..._0x1d0f79,'children':_0x58ea2b[_0x25e2ef(0x7d)]['slice'](0x1)[_0x25e2ef(0xca)](_0x277eef=>_0x166a1a(_0x277eef,_0x1d0f79['id']))};}return null;}let f=class{constructor(_0x4fc434,_0x91fa96,_0x2f91c1,_0x559e54){const _0x565a45=_0x9f0ffa;this['_httpService']=_0x4fc434,this[_0x565a45(0x8f)]=_0x91fa96,this[_0x565a45(0xa3)]=_0x2f91c1,this[_0x565a45(0x82)]=_0x559e54;}async[_0x9f0ffa(0xbe)](_0x502d3b){const _0x8a3a63=_0x9f0ffa;var _0x227030,_0x391472;const {parentId:_0x48a3be,unitId:_0x18a010,text:_0x3402e8,threadId:_0x5417e0}=_0x502d3b,_0xcb0fce=(_0x391472=(_0x227030=_0x3402e8[_0x8a3a63(0xb0)])==null?void 0x0:_0x227030[_0x8a3a63(0xc8)](_0x31c17f=>_0x31c17f[_0x8a3a63(0xc7)]===_0x1bd051[_0x8a3a63(0x8d)])[_0x8a3a63(0xca)](_0x1bd292=>_0x1bd292[_0x8a3a63(0x88)]))!=null?_0x391472:[],_0x495823=JSON[_0x8a3a63(0x90)](_0x3402e8),_0x78d66b=(await this[_0x8a3a63(0xa3)][_0x8a3a63(0xba)](_0x18a010))['getMemberID']();if(_0x48a3be){const _0x598253={'memberId':_0x78d66b,'unitId':_0x18a010,'content':_0x495823,'mention':_0xcb0fce,'threadId':_0x5417e0},_0x8e6257=(await this[_0x8a3a63(0x8a)][_0x8a3a63(0xce)](_0x8a3a63(0x9b)+_0x18a010+_0x8a3a63(0xad),{'body':_0x598253}))[_0x8a3a63(0x9f)][_0x8a3a63(0xa4)];return{..._0x502d3b,'id':_0x8e6257[_0x8a3a63(0xb2)],'dT':_0x97228c(+_0x8e6257[_0x8a3a63(0xbc)])[_0x8a3a63(0xb8)](_0x8a3a63(0x7c)),'personId':_0x8e6257[_0x8a3a63(0xb6)]};}else{const _0x479cad={'memberId':_0x78d66b,'unitId':_0x18a010,'content':_0x495823,'mention':_0xcb0fce},_0x2247e7=await this[_0x8a3a63(0x8a)][_0x8a3a63(0xce)]('/universer-api/comment/unit/'+_0x18a010+_0x8a3a63(0xcb),{'body':_0x479cad});return X(_0x2247e7[_0x8a3a63(0x9f)][_0x8a3a63(0x98)],_0x502d3b);}}async['updateComment'](_0x4c06ee){const _0x30e48a=_0x9f0ffa;var _0x1c2d5d,_0x42c579;const {text:_0x380202,unitId:_0x5aa8af}=_0x4c06ee,_0x47110f=(_0x42c579=(_0x1c2d5d=_0x380202[_0x30e48a(0xb0)])==null?void 0x0:_0x1c2d5d['filter'](_0x2b5bb8=>_0x2b5bb8[_0x30e48a(0xc7)]===_0x1bd051[_0x30e48a(0x8d)])[_0x30e48a(0xca)](_0x25d5a8=>_0x25d5a8['rangeId']))!=null?_0x42c579:[],_0x8c14f8=JSON['stringify'](_0x380202),_0x589bae=_0x4c06ee['threadId'],_0x3038fc=_0x4c06ee['id'],_0x4059bc={'memberId':(await this[_0x30e48a(0xa3)]['requireSession'](_0x5aa8af))[_0x30e48a(0xdd)](),'unitId':_0x5aa8af,'threadId':_0x589bae,'mention':_0x47110f,'content':_0x8c14f8,'replyId':_0x3038fc},_0x41214a=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x5aa8af+_0x30e48a(0xc3),{'body':_0x4059bc});return!_0x41214a[_0x30e48a(0x9f)][_0x30e48a(0xcf)]||_0x41214a[_0x30e48a(0x9f)][_0x30e48a(0xcf)][_0x30e48a(0xc0)]===0x1;}async['resolveComment'](_0x553e9f){const _0x3e713c=_0x9f0ffa,{unitId:_0xa531f1}=_0x553e9f,_0x32afcb=_0x553e9f[_0x3e713c(0x93)],_0x113f42={'memberId':this[_0x3e713c(0x8f)][_0x3e713c(0xb4)]()[_0x3e713c(0xc2)],'unitId':_0xa531f1,'threadId':_0x32afcb,'solved':_0x553e9f['resolved']?I['Solved']:I[_0x3e713c(0xbb)]},_0x341b5b=await this[_0x3e713c(0x8a)][_0x3e713c(0xce)](_0x3e713c(0x9b)+_0xa531f1+_0x3e713c(0xc6),{'body':_0x113f42});return!_0x341b5b[_0x3e713c(0x9f)][_0x3e713c(0xcf)]||_0x341b5b[_0x3e713c(0x9f)]['error'][_0x3e713c(0xc0)]===0x1;}async[_0x9f0ffa(0x8e)](_0x40f57e,_0x2fe850,_0x3b5b97,_0x399929){const _0x4ebc3e=_0x9f0ffa,_0x3d5c8b={'memberId':(await this[_0x4ebc3e(0xa3)][_0x4ebc3e(0xba)](_0x40f57e))[_0x4ebc3e(0xdd)](),'threadId':_0x3b5b97,'replyId':_0x399929,'unitId':_0x40f57e},_0x2a8845=await this[_0x4ebc3e(0x8a)][_0x4ebc3e(0xce)](_0x4ebc3e(0x9b)+_0x40f57e+'/delete',{'body':_0x3d5c8b});return!_0x2a8845[_0x4ebc3e(0x9f)][_0x4ebc3e(0xcf)]||_0x2a8845['body'][_0x4ebc3e(0xcf)]['code']===0x1;}async[_0x9f0ffa(0xdc)](_0x4821a0,_0x206bce,_0x2f2b96){const _0x5e0e89=_0x9f0ffa,_0x29af53={'unitId':_0x4821a0,'threadId':_0x2f2b96},_0x3f789b=await this[_0x5e0e89(0x8a)][_0x5e0e89(0xce)](_0x5e0e89(0x9b)+_0x4821a0+_0x5e0e89(0xa6),{'body':_0x29af53}),_0x103513=_0x2f2b96[_0x5e0e89(0xca)](_0x437dc3=>ee(_0x3f789b[_0x5e0e89(0x9f)]['comments'][_0x437dc3],_0x4821a0,_0x206bce))[_0x5e0e89(0xc8)](Boolean);return Object[_0x5e0e89(0xab)](_0x3f789b[_0x5e0e89(0x9f)][_0x5e0e89(0xd2)])['forEach'](_0x41af1b=>{const _0x4a50ea=_0x5e0e89;this[_0x4a50ea(0x8f)][_0x4a50ea(0xde)](_0x41af1b);}),_0x103513;}[_0x9f0ffa(0x86)](_0x2638f6){const _0x3ee450=_0x9f0ffa;return{'id':_0x2638f6['id'],'threadId':_0x2638f6[_0x3ee450(0x93)],'ref':_0x2638f6[_0x3ee450(0x9a)]};}};f=Q([_(0x0,_0x2fc4da(_0x1a2b24)),_(0x1,_0x2fc4da(_0x3fd1fe)),_(0x2,_0x2fc4da(_0xa5da5c)),_(0x3,_0x2fc4da(_0x2dd6bd))],f);var re=Object[_0x9f0ffa(0x89)],te=(_0x54d174,_0x18b792,_0x52387f,_0x220b0f)=>{const _0x37dfa8=_0x9f0ffa;for(var _0x25dc3d=_0x220b0f>0x1?void 0x0:_0x220b0f?re(_0x18b792,_0x52387f):_0x18b792,_0x43763e=_0x54d174[_0x37dfa8(0xa9)]-0x1,_0x4158a8;_0x43763e>=0x0;_0x43763e--)(_0x4158a8=_0x54d174[_0x43763e])&&(_0x25dc3d=_0x4158a8(_0x25dc3d)||_0x25dc3d);return _0x25dc3d;},N=(_0x3d426d,_0x4e517e)=>(_0x4c83fc,_0x2d75ad)=>_0x4e517e(_0x4c83fc,_0x2d75ad,_0x3d426d);let g=class extends _0x4379a5{constructor(_0x26d8e6,_0x449e74){const _0x37c07e=_0x9f0ffa;super(),this[_0x37c07e(0xb1)]=_0x26d8e6,this['_threadCommentDataSource']=_0x449e74,this[_0x37c07e(0x9d)]();}[_0x9f0ffa(0x9d)](){const _0x22ec97=_0x9f0ffa;this[_0x22ec97(0xb1)][_0x22ec97(0xb7)]=this[_0x22ec97(0xb9)],this[_0x22ec97(0xb1)]['syncUpdateMutationToColla']=!0x1;}};g=te([N(0x0,_0x18ed90),N(0x1,_0x2fc4da(f))],g);var se=Object[_0x9f0ffa(0x7e)],oe=Object[_0x9f0ffa(0x89)],ne=(_0x4c020f,_0x200d18,_0x363532)=>_0x200d18 in _0x4c020f?se(_0x4c020f,_0x200d18,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x363532}):_0x4c020f[_0x200d18]=_0x363532,ie=(_0x375f67,_0xf42b4a,_0x3ca3e9,_0xad60ce)=>{for(var _0x38cd32=_0xad60ce>0x1?void 0x0:_0xad60ce?oe(_0xf42b4a,_0x3ca3e9):_0xf42b4a,_0x14b1ca=_0x375f67['length']-0x1,_0x57f1ad;_0x14b1ca>=0x0;_0x14b1ca--)(_0x57f1ad=_0x375f67[_0x14b1ca])&&(_0x38cd32=_0x57f1ad(_0x38cd32)||_0x38cd32);return _0x38cd32;},w=(_0x103dda,_0x456e9b)=>(_0x572c85,_0xff6d20)=>_0x456e9b(_0x572c85,_0xff6d20,_0x103dda),$=(_0x359d5e,_0x1ccc39,_0x485718)=>ne(_0x359d5e,typeof _0x1ccc39!=_0x9f0ffa(0xbd)?_0x1ccc39+'':_0x1ccc39,_0x485718);let b=class extends _0x33e3f5{constructor(_0x5e868a=M,_0x3452d5,_0x426ded){const _0xbba8d3=_0x9f0ffa;super(),this[_0xbba8d3(0xd3)]=_0x5e868a,this[_0xbba8d3(0x82)]=_0x3452d5,this['_configService']=_0x426ded;const {..._0x469cae}=_0x4c41e6({},M,this[_0xbba8d3(0xd3)]);this[_0xbba8d3(0xd4)][_0xbba8d3(0xd0)](z,_0x469cae);}[_0x9f0ffa(0xbf)](){const _0x582da8=_0x9f0ffa;[[f],[g],[S]][_0x582da8(0x84)](_0x1c6fdc=>{const _0x209759=_0x582da8;this[_0x209759(0x82)][_0x209759(0xcd)](_0x1c6fdc);});}[_0x9f0ffa(0xa1)](){const _0x58dbb9=_0x9f0ffa;this[_0x58dbb9(0x82)][_0x58dbb9(0x96)](g),this[_0x58dbb9(0x82)][_0x58dbb9(0x96)](S);}};$(b,_0x9f0ffa(0xcc),W),$(b,_0x9f0ffa(0xc1),_0x25b4bb[_0x9f0ffa(0xaf)]),b=ie([_0xe0925a(_0x2d2845,_0x2c98c7,_0x2aa935),w(0x1,_0x2fc4da(_0x2dd6bd)),w(0x2,_0x34e795)],b);export{b as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- function _0x504f(_0x3d3783,_0x4b086d){const _0x2beb64=_0x2beb();return _0x504f=function(_0x504fb3,_0x36ca12){_0x504fb3=_0x504fb3-0x104;let _0x1544a3=_0x2beb64[_0x504fb3];return _0x1544a3;},_0x504f(_0x3d3783,_0x4b086d);}(function(_0xef9201,_0x5c47d2){const _0x1b7051=_0x504f,_0xc2d545=_0xef9201();while(!![]){try{const _0x47dd81=-parseInt(_0x1b7051(0x137))/0x1*(-parseInt(_0x1b7051(0x11d))/0x2)+parseInt(_0x1b7051(0x123))/0x3+-parseInt(_0x1b7051(0x138))/0x4*(-parseInt(_0x1b7051(0x133))/0x5)+-parseInt(_0x1b7051(0x169))/0x6*(parseInt(_0x1b7051(0x153))/0x7)+-parseInt(_0x1b7051(0x126))/0x8*(parseInt(_0x1b7051(0x131))/0x9)+-parseInt(_0x1b7051(0x12b))/0xa*(-parseInt(_0x1b7051(0x10e))/0xb)+-parseInt(_0x1b7051(0x175))/0xc;if(_0x47dd81===_0x5c47d2)break;else _0xc2d545['push'](_0xc2d545['shift']());}catch(_0x1e0c14){_0xc2d545['push'](_0xc2d545['shift']());}}}(_0x2beb,0xec58c),function(_0x586042,_0x3b71f0){const _0x44fbea=_0x504f;typeof exports==_0x44fbea(0x14f)&&typeof module<'u'?_0x3b71f0(exports,require(_0x44fbea(0x14b)),require(_0x44fbea(0x130)),require('@univerjs/core'),require(_0x44fbea(0x14d)),require(_0x44fbea(0x10a)),require('rxjs'),require(_0x44fbea(0x156))):typeof define==_0x44fbea(0x139)&&define[_0x44fbea(0x148)]?define([_0x44fbea(0x152),_0x44fbea(0x14b),'@univerjs-pro/license',_0x44fbea(0x12e),_0x44fbea(0x14d),_0x44fbea(0x10a),_0x44fbea(0x142),_0x44fbea(0x156)],_0x3b71f0):(_0x586042=typeof globalThis<'u'?globalThis:_0x586042||self,_0x3b71f0(_0x586042[_0x44fbea(0x155)]={},_0x586042[_0x44fbea(0x140)],_0x586042[_0x44fbea(0x171)],_0x586042[_0x44fbea(0x16d)],_0x586042[_0x44fbea(0x12a)],_0x586042['UniverThreadComment'],_0x586042['rxjs'],_0x586042['UniverNetwork']));}(this,function(_0x1c2b26,_0x366672,_0x41f68d,_0x113df9,_0x3347a0,_0x5b6592,_0x4026f3,_0xb342fe){'use strict';const _0xb6be16=_0x504f;const _0x415b1a=_0xb6be16(0x15e);var _0x328b1c=(_0x354ec5=>(_0x354ec5[_0x354ec5['OpenOrReOpen']=0x0]=_0xb6be16(0x109),_0x354ec5[_0x354ec5['Solved']=0x1]='Solved',_0x354ec5[_0x354ec5['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x354ec5))(_0x328b1c||{}),_0x11c8cb=(_0x365df6=>(_0x365df6[_0x365df6[_0xb6be16(0x16f)]=0x0]=_0xb6be16(0x16f),_0x365df6[_0x365df6[_0xb6be16(0x14e)]=0x1]=_0xb6be16(0x14e),_0x365df6[_0x365df6[_0xb6be16(0x165)]=0x2]='Reply',_0x365df6[_0x365df6['Edit']=0x3]='Edit',_0x365df6[_0x365df6[_0xb6be16(0x167)]=0x4]=_0xb6be16(0x167),_0x365df6[_0x365df6[_0xb6be16(0x164)]=0x5]='Solve',_0x365df6[_0x365df6[_0xb6be16(0x11e)]=-0x1]=_0xb6be16(0x11e),_0x365df6))(_0x11c8cb||{});const _0x563f5d=_0x1443d9=>_0x113df9[_0xb6be16(0x105)](new Date(+_0x1443d9))[_0xb6be16(0x15f)](_0xb6be16(0x180)),_0x3b7dc3=async(_0x474375,_0x55f3ac)=>{const _0x4f5241=_0xb6be16,_0xb1b5a6=_0x474375[_0x4f5241(0x111)](_0x113df9[_0x4f5241(0x135)]),_0x53c9f0=_0x474375[_0x4f5241(0x111)](_0xb342fe[_0x4f5241(0x104)]);_0x55f3ac[_0x4f5241(0x12f)](_0x1e574e=>{const _0x1bd656=_0x4f5241;_0xb1b5a6[_0x1bd656(0x12c)](_0x1e574e)&&_0x55f3ac[_0x1bd656(0x17b)](_0x1e574e);}),_0x55f3ac[_0x4f5241(0x154)]&&(await _0x53c9f0[_0x4f5241(0x111)](_0x4f5241(0x15b),{'params':{'userIDs':[..._0x55f3ac]}}))['body'][_0x4f5241(0x129)]['forEach'](_0x4af82a=>{const _0x384425=_0x4f5241;_0x4af82a&&_0xb1b5a6[_0x384425(0x11a)](_0x4af82a);});};var _0x54817f=Object[_0xb6be16(0x184)],_0x39469e=(_0x29ea55,_0x57d0d4,_0x24a411,_0x2387cf)=>{const _0x285ba0=_0xb6be16;for(var _0x4583fa=_0x2387cf>0x1?void 0x0:_0x2387cf?_0x54817f(_0x57d0d4,_0x24a411):_0x57d0d4,_0x2637d3=_0x29ea55[_0x285ba0(0x125)]-0x1,_0x43d805;_0x2637d3>=0x0;_0x2637d3--)(_0x43d805=_0x29ea55[_0x2637d3])&&(_0x4583fa=_0x43d805(_0x4583fa)||_0x4583fa);return _0x4583fa;},_0x225588=(_0xcdb4d3,_0x5b74de)=>(_0x306496,_0x7595be)=>_0x5b74de(_0x306496,_0x7595be,_0xcdb4d3);let _0x46e779=class extends _0x113df9[_0xb6be16(0x17c)]{constructor(_0x35ed91,_0x5d2c50,_0x25b1e3,_0x829a22){const _0x36da21=_0xb6be16;super(),this[_0x36da21(0x182)]=_0x35ed91,this[_0x36da21(0x151)]=_0x5d2c50,this[_0x36da21(0x10c)]=_0x25b1e3,this['_injector']=_0x829a22,this[_0x36da21(0x145)](),this['_initUserSync']();}[_0xb6be16(0x189)](){const _0x36170e=_0xb6be16;this[_0x36170e(0x121)](this[_0x36170e(0x151)]['commentUpdate$'][_0x36170e(0x186)](_0x4026f3[_0x36170e(0x16a)](0x10))[_0x36170e(0x11b)](_0x51443b=>{const _0x1b641f=_0x36170e,_0x13942d=new Set();_0x51443b[_0x1b641f(0x12f)](_0x4a0fe9=>{const _0x48cc5c=_0x1b641f;switch(_0x4a0fe9[_0x48cc5c(0x14c)]){case'add':{const _0x412b22=_0x4a0fe9[_0x48cc5c(0x18b)][_0x48cc5c(0x15d)];_0x13942d['add'](_0x412b22);break;}}}),_0x3b7dc3(this[_0x1b641f(0x176)],_0x13942d);}));}[_0xb6be16(0x145)](){const _0x3628bc=_0xb6be16;this[_0x3628bc(0x121)](this['_commentService'][_0x3628bc(0x168)][_0x3628bc(0x11b)](async _0x46526e=>{const _0x1abd79=_0x3628bc;var _0x7e36bb,_0x533be2,_0x1cadd3,_0x32040f;const _0x18827c=(_0x7e36bb=this[_0x1abd79(0x151)][_0x1abd79(0x18a)](_0x46526e['unitId'])['find'](_0xeacffe=>_0xeacffe['threadId']===_0x46526e[_0x1abd79(0x124)]))==null?void 0x0:_0x7e36bb['root'];if(!_0x18827c)return;const {unitId:_0x599e58,subUnitId:_0x4e7217}=_0x18827c;switch(_0x46526e['user']&&this['_userService'][_0x1abd79(0x11a)](_0x46526e['user']),_0x46526e['type']){case _0x11c8cb['Add']:break;case _0x11c8cb[_0x1abd79(0x165)]:{this['_threadCommentModel'][_0x1abd79(0x10b)](_0x599e58,_0x4e7217,{'unitId':_0x599e58,'subUnitId':_0x4e7217,'ref':'','id':_0x46526e['replyId'],'dT':_0x563f5d(+_0x46526e['createTimestamp']),'threadId':_0x46526e[_0x1abd79(0x124)],'personId':(_0x1cadd3=(_0x533be2=_0x46526e[_0x1abd79(0x173)])==null?void 0x0:_0x533be2[_0x1abd79(0x108)])!=null?_0x1cadd3:_0x46526e[_0x1abd79(0x18e)],'text':JSON[_0x1abd79(0x13b)](_0x46526e[_0x1abd79(0x166)]),'parentId':_0x18827c['id']});break;}case _0x11c8cb['Delete']:{const _0x5cab2a=this[_0x1abd79(0x151)][_0x1abd79(0x144)](_0x599e58,_0x4e7217,_0x46526e[_0x1abd79(0x107)]);_0x5cab2a&&_0x5cab2a['parentId']&&this[_0x1abd79(0x151)]['deleteComment'](_0x599e58,_0x4e7217,_0x46526e['replyId']);break;}case _0x11c8cb[_0x1abd79(0x10d)]:{this[_0x1abd79(0x151)]['updateComment'](_0x599e58,_0x4e7217,{'commentId':_0x46526e[_0x1abd79(0x107)],'text':JSON[_0x1abd79(0x13b)](_0x46526e['content'])});break;}case _0x11c8cb[_0x1abd79(0x164)]:{const _0x368cf4=(_0x32040f=this['_threadCommentModel']['getUnit'](_0x46526e['unitId'])['find'](_0x437502=>_0x437502[_0x1abd79(0x124)]===_0x46526e[_0x1abd79(0x124)]))==null?void 0x0:_0x32040f[_0x1abd79(0x114)];_0x368cf4&&this[_0x1abd79(0x151)][_0x1abd79(0x141)](_0x599e58,_0x4e7217,_0x368cf4['id'],_0x46526e[_0x1abd79(0x11c)]===_0x328b1c[_0x1abd79(0x18c)]);break;}}}));}};_0x46e779=_0x39469e([_0x225588(0x0,_0x113df9[_0xb6be16(0x149)](_0x366672[_0xb6be16(0x18f)])),_0x225588(0x1,_0x113df9['Inject'](_0x5b6592[_0xb6be16(0x17d)])),_0x225588(0x2,_0x113df9[_0xb6be16(0x149)](_0x113df9[_0xb6be16(0x135)])),_0x225588(0x3,_0x113df9[_0xb6be16(0x149)](_0x113df9[_0xb6be16(0x17e)]))],_0x46e779);const _0x9c9214='thread-comment-data-source.config',_0x62060f={};var _0x8843a9=Object[_0xb6be16(0x184)],_0x3f3564=(_0x44bb5e,_0x1f9c63,_0xf6150f,_0x5f4756)=>{const _0x56defb=_0xb6be16;for(var _0x5c4c8c=_0x5f4756>0x1?void 0x0:_0x5f4756?_0x8843a9(_0x1f9c63,_0xf6150f):_0x1f9c63,_0x53c839=_0x44bb5e[_0x56defb(0x125)]-0x1,_0x3b4930;_0x53c839>=0x0;_0x53c839--)(_0x3b4930=_0x44bb5e[_0x53c839])&&(_0x5c4c8c=_0x3b4930(_0x5c4c8c)||_0x5c4c8c);return _0x5c4c8c;},_0x34e4ff=(_0x4f2c81,_0x58109b)=>(_0x33e18c,_0x5dba84)=>_0x58109b(_0x33e18c,_0x5dba84,_0x4f2c81);function _0x2b0333(_0x16f9b0,_0x1c98c1){const _0x55bf88=_0xb6be16,_0x306818=_0x16f9b0[_0x55bf88(0x174)][0x0];return{..._0x1c98c1,'id':_0x306818[_0x55bf88(0x107)],'resolved':_0x16f9b0['solved']===0x1,'dT':_0x563f5d(_0x306818[_0x55bf88(0x161)]),'personId':_0x306818[_0x55bf88(0x18e)],'threadId':_0x306818['threadId']};}function _0x1e6ba0(_0x798771,_0x17c28b,_0x46f6be){const _0x2f704c=_0xb6be16;var _0x43cb91,_0x16792d;if(((_0x16792d=(_0x43cb91=_0x798771==null?void 0x0:_0x798771['replies'])==null?void 0x0:_0x43cb91[_0x2f704c(0x125)])!=null?_0x16792d:0x0)>0x0){const _0x4d83a6=(_0x29b373,_0x1d0aae)=>({'id':_0x29b373[_0x2f704c(0x107)],'threadId':_0x29b373[_0x2f704c(0x124)],'dT':_0x563f5d(_0x29b373['createTimestamp']),'personId':_0x29b373[_0x2f704c(0x18e)],'resolved':_0x798771[_0x2f704c(0x11c)]===_0x328b1c[_0x2f704c(0x18c)],'unitId':_0x17c28b,'subUnitId':_0x46f6be,'text':JSON[_0x2f704c(0x13b)](_0x29b373[_0x2f704c(0x166)]),'parentId':_0x1d0aae}),_0x53af7d=_0x4d83a6(_0x798771[_0x2f704c(0x174)][0x0]);return{..._0x53af7d,'children':_0x798771['replies'][_0x2f704c(0x179)](0x1)[_0x2f704c(0x120)](_0x5e59d1=>_0x4d83a6(_0x5e59d1,_0x53af7d['id']))};}return null;}let _0xbd95cf=class{constructor(_0x1d0889,_0x387913,_0xd4530d,_0x1ded9b){const _0x46b1fd=_0xb6be16;this[_0x46b1fd(0x17a)]=_0x1d0889,this[_0x46b1fd(0x10c)]=_0x387913,this[_0x46b1fd(0x13f)]=_0xd4530d,this[_0x46b1fd(0x176)]=_0x1ded9b;}async['addComment'](_0x5820c2){const _0x2f01e9=_0xb6be16;var _0x255a19,_0x467f23;const {parentId:_0x5f10d3,unitId:_0x42d3ba,text:_0x4f0da7,threadId:_0x351005}=_0x5820c2,_0x37749b=(_0x467f23=(_0x255a19=_0x4f0da7['customRanges'])==null?void 0x0:_0x255a19[_0x2f01e9(0x170)](_0x434ac8=>_0x434ac8[_0x2f01e9(0x187)]===_0x113df9['CustomRangeType'][_0x2f01e9(0x147)])['map'](_0x576bee=>_0x576bee['rangeId']))!=null?_0x467f23:[],_0x586ce1=JSON[_0x2f01e9(0x116)](_0x4f0da7),_0x4adfbb=(await this[_0x2f01e9(0x13f)][_0x2f01e9(0x115)](_0x42d3ba))[_0x2f01e9(0x128)]();if(_0x5f10d3){const _0x2a44f9={'memberId':_0x4adfbb,'unitId':_0x42d3ba,'content':_0x586ce1,'mention':_0x37749b,'threadId':_0x351005},_0x5d5686=(await this[_0x2f01e9(0x17a)][_0x2f01e9(0x16b)]('/universer-api/comment/unit/'+_0x42d3ba+_0x2f01e9(0x13e),{'body':_0x2a44f9}))[_0x2f01e9(0x172)]['reply'];return{..._0x5820c2,'id':_0x5d5686[_0x2f01e9(0x107)],'dT':_0x113df9['dayjs'](+_0x5d5686['createTimestamp'])[_0x2f01e9(0x15f)](_0x2f01e9(0x180)),'personId':_0x5d5686[_0x2f01e9(0x18e)]};}else{const _0x2354af={'memberId':_0x4adfbb,'unitId':_0x42d3ba,'content':_0x586ce1,'mention':_0x37749b},_0x34087c=await this[_0x2f01e9(0x17a)]['post'](_0x2f01e9(0x160)+_0x42d3ba+_0x2f01e9(0x163),{'body':_0x2354af});return _0x2b0333(_0x34087c[_0x2f01e9(0x172)][_0x2f01e9(0x119)],_0x5820c2);}}async['updateComment'](_0xaa7abb){const _0x5f4767=_0xb6be16;var _0x4923c3,_0x410330;const {text:_0xa52ee9,unitId:_0x114951}=_0xaa7abb,_0x34355d=(_0x410330=(_0x4923c3=_0xa52ee9[_0x5f4767(0x181)])==null?void 0x0:_0x4923c3[_0x5f4767(0x170)](_0xe0383=>_0xe0383['rangeType']===_0x113df9[_0x5f4767(0x143)]['COMMENT'])[_0x5f4767(0x120)](_0x48b512=>_0x48b512[_0x5f4767(0x112)]))!=null?_0x410330:[],_0x24d784=JSON[_0x5f4767(0x116)](_0xa52ee9),_0x2537a0=_0xaa7abb[_0x5f4767(0x124)],_0xa76066=_0xaa7abb['id'],_0x571488={'memberId':(await this[_0x5f4767(0x13f)]['requireSession'](_0x114951))[_0x5f4767(0x128)](),'unitId':_0x114951,'threadId':_0x2537a0,'mention':_0x34355d,'content':_0x24d784,'replyId':_0xa76066},_0x5b3d8e=await this[_0x5f4767(0x17a)][_0x5f4767(0x16b)](_0x5f4767(0x160)+_0x114951+'/edit',{'body':_0x571488});return!_0x5b3d8e[_0x5f4767(0x172)][_0x5f4767(0x188)]||_0x5b3d8e[_0x5f4767(0x172)][_0x5f4767(0x188)][_0x5f4767(0x113)]===0x1;}async[_0xb6be16(0x141)](_0x583c32){const _0x26e6ae=_0xb6be16,{unitId:_0x18b7c3}=_0x583c32,_0x1e8abe=_0x583c32[_0x26e6ae(0x124)],_0x4664d3={'memberId':this[_0x26e6ae(0x10c)][_0x26e6ae(0x10f)]()['userID'],'unitId':_0x18b7c3,'threadId':_0x1e8abe,'solved':_0x583c32[_0x26e6ae(0x18d)]?_0x328b1c[_0x26e6ae(0x18c)]:_0x328b1c[_0x26e6ae(0x109)]},_0x3f92cf=await this[_0x26e6ae(0x17a)][_0x26e6ae(0x16b)](_0x26e6ae(0x160)+_0x18b7c3+_0x26e6ae(0x106),{'body':_0x4664d3});return!_0x3f92cf['body'][_0x26e6ae(0x188)]||_0x3f92cf[_0x26e6ae(0x172)][_0x26e6ae(0x188)][_0x26e6ae(0x113)]===0x1;}async[_0xb6be16(0x117)](_0x260b00,_0x32168b,_0x195463,_0xcf7f4d){const _0x767e69=_0xb6be16,_0xf64240={'memberId':(await this['_sessionService']['requireSession'](_0x260b00))[_0x767e69(0x128)](),'threadId':_0x195463,'replyId':_0xcf7f4d,'unitId':_0x260b00},_0x589163=await this['_httpService']['post'](_0x767e69(0x160)+_0x260b00+_0x767e69(0x159),{'body':_0xf64240});return!_0x589163[_0x767e69(0x172)][_0x767e69(0x188)]||_0x589163[_0x767e69(0x172)]['error'][_0x767e69(0x113)]===0x1;}async[_0xb6be16(0x134)](_0x303a69,_0xde8ecf,_0x3985f8){const _0x2d9253=_0xb6be16,_0x6f6d90={'unitId':_0x303a69,'threadId':_0x3985f8},_0x62bf38=await this['_httpService']['post']('/universer-api/comment/unit/'+_0x303a69+'/list',{'body':_0x6f6d90}),_0x391737=_0x3985f8[_0x2d9253(0x120)](_0x29743f=>_0x1e6ba0(_0x62bf38[_0x2d9253(0x172)][_0x2d9253(0x12d)][_0x29743f],_0x303a69,_0xde8ecf))[_0x2d9253(0x170)](Boolean);return Object['values'](_0x62bf38[_0x2d9253(0x172)][_0x2d9253(0x129)])[_0x2d9253(0x12f)](_0x2e67e7=>{const _0x2ee731=_0x2d9253;this[_0x2ee731(0x10c)][_0x2ee731(0x11a)](_0x2e67e7);}),_0x391737;}[_0xb6be16(0x150)](_0x4af784){const _0xfff871=_0xb6be16;return{'id':_0x4af784['id'],'threadId':_0x4af784[_0xfff871(0x124)],'ref':_0x4af784['ref']};}};_0xbd95cf=_0x3f3564([_0x34e4ff(0x0,_0x113df9[_0xb6be16(0x149)](_0xb342fe[_0xb6be16(0x104)])),_0x34e4ff(0x1,_0x113df9[_0xb6be16(0x149)](_0x113df9[_0xb6be16(0x135)])),_0x34e4ff(0x2,_0x113df9[_0xb6be16(0x149)](_0x366672['CollaborationSessionService'])),_0x34e4ff(0x3,_0x113df9[_0xb6be16(0x149)](_0x113df9['Injector']))],_0xbd95cf);var _0x1d7c3a=Object[_0xb6be16(0x184)],_0x5e9d60=(_0x5048d3,_0xb19029,_0x33e48f,_0xb2dbd4)=>{const _0x94a060=_0xb6be16;for(var _0x37f290=_0xb2dbd4>0x1?void 0x0:_0xb2dbd4?_0x1d7c3a(_0xb19029,_0x33e48f):_0xb19029,_0x4eebf5=_0x5048d3[_0x94a060(0x125)]-0x1,_0x388699;_0x4eebf5>=0x0;_0x4eebf5--)(_0x388699=_0x5048d3[_0x4eebf5])&&(_0x37f290=_0x388699(_0x37f290)||_0x37f290);return _0x37f290;},_0xb492ee=(_0x5a865e,_0x39be70)=>(_0xeac5a9,_0x85be30)=>_0x39be70(_0xeac5a9,_0x85be30,_0x5a865e);let _0x5ecc8d=class extends _0x113df9['Disposable']{constructor(_0x20cb7c,_0x29cade){const _0x2e729f=_0xb6be16;super(),this[_0x2e729f(0x177)]=_0x20cb7c,this[_0x2e729f(0x13c)]=_0x29cade,this[_0x2e729f(0x118)]();}[_0xb6be16(0x118)](){const _0x120f6b=_0xb6be16;this['_threadCommentDataSourceService']['dataSource']=this['_threadCommentDataSource'],this[_0x120f6b(0x177)][_0x120f6b(0x158)]=!0x1;}};_0x5ecc8d=_0x5e9d60([_0xb492ee(0x0,_0x5b6592[_0xb6be16(0x122)]),_0xb492ee(0x1,_0x113df9[_0xb6be16(0x149)](_0xbd95cf))],_0x5ecc8d);var _0x4a0d02=Object['defineProperty'],_0x5de1ab=Object[_0xb6be16(0x184)],_0x4a7c37=(_0x4771d4,_0x5301d3,_0x19c5ce)=>_0x5301d3 in _0x4771d4?_0x4a0d02(_0x4771d4,_0x5301d3,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x19c5ce}):_0x4771d4[_0x5301d3]=_0x19c5ce,_0x3ee5aa=(_0x1ba157,_0x24d71b,_0x4ed905,_0x253fd3)=>{const _0x56f65d=_0xb6be16;for(var _0x85ca9a=_0x253fd3>0x1?void 0x0:_0x253fd3?_0x5de1ab(_0x24d71b,_0x4ed905):_0x24d71b,_0x5e2ecd=_0x1ba157[_0x56f65d(0x125)]-0x1,_0x3c2d48;_0x5e2ecd>=0x0;_0x5e2ecd--)(_0x3c2d48=_0x1ba157[_0x5e2ecd])&&(_0x85ca9a=_0x3c2d48(_0x85ca9a)||_0x85ca9a);return _0x85ca9a;},_0x4f9421=(_0x4c61cf,_0x2b2e7e)=>(_0x5e3159,_0x3902ea)=>_0x2b2e7e(_0x5e3159,_0x3902ea,_0x4c61cf),_0x99d5fe=(_0x3d3f80,_0x1065bb,_0x30c497)=>_0x4a7c37(_0x3d3f80,typeof _0x1065bb!='symbol'?_0x1065bb+'':_0x1065bb,_0x30c497);_0x1c2b26[_0xb6be16(0x127)]=class extends _0x113df9[_0xb6be16(0x17f)]{constructor(_0xdb803c=_0x62060f,_0x499f03,_0x386faf){const _0x1f91a2=_0xb6be16;super(),this[_0x1f91a2(0x178)]=_0xdb803c,this[_0x1f91a2(0x176)]=_0x499f03,this['_configService']=_0x386faf;const {..._0x3f56f9}=_0x113df9[_0x1f91a2(0x15c)]({},_0x62060f,this[_0x1f91a2(0x178)]);this[_0x1f91a2(0x132)][_0x1f91a2(0x16e)](_0x9c9214,_0x3f56f9);}[_0xb6be16(0x146)](){const _0x5eaabd=_0xb6be16;[[_0xbd95cf],[_0x5ecc8d],[_0x46e779]][_0x5eaabd(0x12f)](_0x4eb8bf=>{const _0x1a566a=_0x5eaabd;this[_0x1a566a(0x176)][_0x1a566a(0x11f)](_0x4eb8bf);});}[_0xb6be16(0x14a)](){const _0x388eb0=_0xb6be16;this['_injector'][_0x388eb0(0x111)](_0x5ecc8d),this[_0x388eb0(0x176)]['get'](_0x46e779);}},_0x99d5fe(_0x1c2b26[_0xb6be16(0x127)],_0xb6be16(0x183),_0x415b1a),_0x99d5fe(_0x1c2b26[_0xb6be16(0x127)],_0xb6be16(0x14c),_0x113df9[_0xb6be16(0x185)][_0xb6be16(0x15a)]),_0x1c2b26[_0xb6be16(0x127)]=_0x3ee5aa([_0x113df9[_0xb6be16(0x16c)](_0x3347a0[_0xb6be16(0x190)],_0x366672[_0xb6be16(0x110)],_0x41f68d[_0xb6be16(0x157)]),_0x4f9421(0x1,_0x113df9[_0xb6be16(0x149)](_0x113df9[_0xb6be16(0x17e)])),_0x4f9421(0x2,_0x113df9[_0xb6be16(0x162)])],_0x1c2b26[_0xb6be16(0x127)]),Object[_0xb6be16(0x136)](_0x1c2b26,Symbol[_0xb6be16(0x13a)],{'value':_0xb6be16(0x13d)});}));function _0x2beb(){const _0x1c69cd=['getUser','comments','@univerjs/core','forEach','@univerjs-pro/license','2451564kjqFar','_configService','2765HNAPvY','listComments','UserManagerService','defineProperty','1lbOUuY','13572UxMOvr','function','toStringTag','parse','_threadCommentDataSource','Module','/reply','_sessionService','UniverProCollaborationClient','resolveComment','rxjs','CustomRangeType','getComment','_init','onStarting','COMMENT','amd','Inject','onReady','@univerjs-pro/collaboration-client','type','@univerjs/thread-comment-ui','Add','object','saveCommentToSnapshot','_threadCommentModel','exports','2303GZnkBm','size','UniverProThreadCommentDatasource','@univerjs/network','UniverLicensePlugin','syncUpdateMutationToColla','/delete','UNIVER_UNKNOWN','/universer-api/user/list','merge','personId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','format','/universer-api/comment/unit/','createTimestamp','IConfigService','/add','Solve','Reply','content','Delete','commentUpdate$','15144wpsgfU','bufferTime','post','DependentOn','UniverCore','setConfig','Unknown','filter','UniverProLicense','body','user','replies','13070472VgtZCo','_injector','_threadCommentDataSourceService','_config','slice','_httpService','delete','Disposable','ThreadCommentModel','Injector','Plugin','YYYY/MM/DD\x20HH:mm','customRanges','_commentService','pluginName','getOwnPropertyDescriptor','UniverInstanceType','pipe','rangeType','error','_initUserSync','getUnit','payload','Solved','resolved','userId','CommentService','UniverThreadCommentUIPlugin','HTTPService','dayjs','/solved','replyId','userID','OpenOrReOpen','@univerjs/thread-comment','addComment','_userService','Edit','11qHeTaA','getCurrentUser','UniverCollaborationClientPlugin','get','rangeId','code','root','requireSession','stringify','deleteComment','_initDataSource','comment','addUser','subscribe','solved','2456752jMPYEI','UNRECOGNIZED','add','map','disposeWithMe','IThreadCommentDataSourceService','2378874IZOJIm','threadId','length','56LgRmvO','UniverThreadCommentDataSourcePlugin','getMemberID','users','UniverThreadCommentUi','8967870JGzyfk'];_0x2beb=function(){return _0x1c69cd;};return _0x2beb();}
1
+ function _0x284e(_0x1cac2e,_0x48eddc){const _0x535da4=_0x535d();return _0x284e=function(_0x284efb,_0x45be74){_0x284efb=_0x284efb-0xbc;let _0x2ff121=_0x535da4[_0x284efb];return _0x2ff121;},_0x284e(_0x1cac2e,_0x48eddc);}function _0x535d(){const _0x51a167=['2756116eoBSLH','263848HoOvkY','_commentService','Reply','resolveComment','_initUserSync','reply','CollaborationSessionService','UniverNetwork','customRanges','CustomRangeType','Injector','Delete','HTTPService','rangeId','setConfig','addUser','filter','thread-comment-data-source.config','pluginName','119836uWboyO','ref','function','/edit','userID','/list','getComment','UniverProThreadCommentDatasource','dayjs','UniverThreadCommentUi','/reply','user','object','listComments','@univerjs/thread-comment','Unknown','IConfigService','UniverCollaborationClientPlugin','rxjs','toStringTag','getMemberID','UniverThreadComment','/universer-api/comment/unit/','bufferTime','10cnEIND','1833136kDqBOX','Solved','userId','Plugin','disposeWithMe','Edit','forEach','syncUpdateMutationToColla','_httpService','UniverThreadCommentDataSourcePlugin','UNRECOGNIZED','UniverLicensePlugin','size','Solve','root','length','threadId','parse','UNIVER_UNKNOWN','4168690ZbKRGF','getCurrentUser','IThreadCommentDataSourceService','type','/solved','amd','_sessionService','DependentOn','add','rangeType','Inject','UniverProCollaborationClient','pipe','addComment','personId','requireSession','24zRelEz','dataSource','_initDataSource','format','@univerjs-pro/license','OpenOrReOpen','body','subscribe','replies','_userService','map','exports','updateComment','content','get','solved','code','Disposable','583245WmdsBu','/universer-api/user/list','@univerjs-pro/collaboration-client','createTimestamp','unitId','Module','_threadCommentModel','getUnit','post','415646rCvtGM','@univerjs/network','Add','_threadCommentDataSource','27EvyLAK','UserManagerService','users','72QDopKN','saveCommentToSnapshot','error','resolved','defineProperty','_injector','@univerjs/thread-comment-ui','YYYY/MM/DD\x20HH:mm','_threadCommentDataSourceService','stringify','replyId','values','_config','find','payload','commentUpdate$','/add','getOwnPropertyDescriptor','symbol','COMMENT','parentId','comment','onReady','_configService','@univerjs/core'];_0x535d=function(){return _0x51a167;};return _0x535d();}(function(_0x40f895,_0x27d0fa){const _0x266292=_0x284e,_0x3bf07d=_0x40f895();while(!![]){try{const _0x2f4293=-parseInt(_0x266292(0xed))/0x1+parseInt(_0x266292(0x143))/0x2+parseInt(_0x266292(0xfa))/0x3*(parseInt(_0x266292(0x12a))/0x4)+-parseInt(_0x266292(0xcb))/0x5+parseInt(_0x266292(0xdb))/0x6*(parseInt(_0x266292(0xf6))/0x7)+-parseInt(_0x266292(0x117))/0x8*(-parseInt(_0x266292(0xfd))/0x9)+parseInt(_0x266292(0x142))/0xa*(parseInt(_0x266292(0x116))/0xb);if(_0x2f4293===_0x27d0fa)break;else _0x3bf07d['push'](_0x3bf07d['shift']());}catch(_0x5e5697){_0x3bf07d['push'](_0x3bf07d['shift']());}}}(_0x535d,0x7f3ac),function(_0x55c4c2,_0x5ac01b){const _0x389ada=_0x284e;typeof exports==_0x389ada(0x136)&&typeof module<'u'?_0x5ac01b(exports,require(_0x389ada(0xef)),require(_0x389ada(0xdf)),require(_0x389ada(0x115)),require('@univerjs/thread-comment-ui'),require(_0x389ada(0x138)),require('rxjs'),require(_0x389ada(0xf7))):typeof define==_0x389ada(0x12c)&&define[_0x389ada(0xd0)]?define([_0x389ada(0xe6),_0x389ada(0xef),_0x389ada(0xdf),_0x389ada(0x115),_0x389ada(0x103),_0x389ada(0x138),'rxjs',_0x389ada(0xf7)],_0x5ac01b):(_0x55c4c2=typeof globalThis<'u'?globalThis:_0x55c4c2||self,_0x5ac01b(_0x55c4c2[_0x389ada(0x131)]={},_0x55c4c2[_0x389ada(0xd6)],_0x55c4c2['UniverProLicense'],_0x55c4c2['UniverCore'],_0x55c4c2[_0x389ada(0x133)],_0x55c4c2[_0x389ada(0x13f)],_0x55c4c2[_0x389ada(0x13c)],_0x55c4c2[_0x389ada(0x11e)]));}(this,function(_0x188fd4,_0x5e935c,_0x366498,_0x3ffc9c,_0x26f6d9,_0x23253d,_0x4a5044,_0x4272d0){'use strict';const _0x4694ed=_0x284e;const _0x49b807='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x14f77b=(_0x3562da=>(_0x3562da[_0x3562da[_0x4694ed(0xe0)]=0x0]='OpenOrReOpen',_0x3562da[_0x3562da['Solved']=0x1]=_0x4694ed(0x144),_0x3562da[_0x3562da[_0x4694ed(0xc2)]=-0x1]=_0x4694ed(0xc2),_0x3562da))(_0x14f77b||{}),_0x3a3799=(_0x481278=>(_0x481278[_0x481278[_0x4694ed(0x139)]=0x0]=_0x4694ed(0x139),_0x481278[_0x481278[_0x4694ed(0xf8)]=0x1]=_0x4694ed(0xf8),_0x481278[_0x481278[_0x4694ed(0x119)]=0x2]=_0x4694ed(0x119),_0x481278[_0x481278[_0x4694ed(0xbd)]=0x3]=_0x4694ed(0xbd),_0x481278[_0x481278[_0x4694ed(0x122)]=0x4]=_0x4694ed(0x122),_0x481278[_0x481278[_0x4694ed(0xc5)]=0x5]=_0x4694ed(0xc5),_0x481278[_0x481278[_0x4694ed(0xc2)]=-0x1]=_0x4694ed(0xc2),_0x481278))(_0x3a3799||{});const _0x59d5a6=_0x4bda0d=>_0x3ffc9c['dayjs'](new Date(+_0x4bda0d))[_0x4694ed(0xde)](_0x4694ed(0x104)),_0x3ad9e7=async(_0x79408d,_0x254043)=>{const _0x4d3adf=_0x4694ed,_0x9ffb23=_0x79408d[_0x4d3adf(0xe9)](_0x3ffc9c['UserManagerService']),_0x26f4dc=_0x79408d[_0x4d3adf(0xe9)](_0x4272d0[_0x4d3adf(0x123)]);_0x254043['forEach'](_0x4d9e22=>{_0x9ffb23['getUser'](_0x4d9e22)&&_0x254043['delete'](_0x4d9e22);}),_0x254043[_0x4d3adf(0xc4)]&&(await _0x26f4dc['get'](_0x4d3adf(0xee),{'params':{'userIDs':[..._0x254043]}}))['body'][_0x4d3adf(0xfc)][_0x4d3adf(0xbe)](_0x5f0cfc=>{_0x5f0cfc&&_0x9ffb23['addUser'](_0x5f0cfc);});};var _0xfa609a=Object[_0x4694ed(0x10e)],_0x30c4c9=(_0x123bcb,_0x526fe9,_0x4d133c,_0x17d875)=>{const _0x4bad80=_0x4694ed;for(var _0xad9eef=_0x17d875>0x1?void 0x0:_0x17d875?_0xfa609a(_0x526fe9,_0x4d133c):_0x526fe9,_0x423c5b=_0x123bcb[_0x4bad80(0xc7)]-0x1,_0x453bbd;_0x423c5b>=0x0;_0x423c5b--)(_0x453bbd=_0x123bcb[_0x423c5b])&&(_0xad9eef=_0x453bbd(_0xad9eef)||_0xad9eef);return _0xad9eef;},_0x563037=(_0x2bd3c7,_0x2024cc)=>(_0x25bf54,_0x42a3f)=>_0x2024cc(_0x25bf54,_0x42a3f,_0x2bd3c7);let _0x3da451=class extends _0x3ffc9c[_0x4694ed(0xec)]{constructor(_0x2ae874,_0x30a5a0,_0x39a871,_0x2451ef){const _0x30b512=_0x4694ed;super(),this[_0x30b512(0x118)]=_0x2ae874,this[_0x30b512(0xf3)]=_0x30a5a0,this[_0x30b512(0xe4)]=_0x39a871,this['_injector']=_0x2451ef,this['_init'](),this['_initUserSync']();}[_0x4694ed(0x11b)](){const _0x5c01bf=_0x4694ed;this[_0x5c01bf(0xbc)](this['_threadCommentModel'][_0x5c01bf(0x10c)][_0x5c01bf(0xd7)](_0x4a5044[_0x5c01bf(0x141)](0x10))[_0x5c01bf(0xe2)](_0x2cc25f=>{const _0xed50b5=_0x5c01bf,_0xcee99a=new Set();_0x2cc25f[_0xed50b5(0xbe)](_0x54b53a=>{const _0x80ea3c=_0xed50b5;switch(_0x54b53a[_0x80ea3c(0xce)]){case _0x80ea3c(0xd3):{const _0x2d2a6e=_0x54b53a[_0x80ea3c(0x10b)][_0x80ea3c(0xd9)];_0xcee99a[_0x80ea3c(0xd3)](_0x2d2a6e);break;}}}),_0x3ad9e7(this[_0xed50b5(0x102)],_0xcee99a);}));}['_init'](){this['disposeWithMe'](this['_commentService']['commentUpdate$']['subscribe'](async _0x488791=>{const _0x19955b=_0x284e;var _0x550313,_0x37a037,_0x3c105d,_0x4cf37a;const _0x241f51=(_0x550313=this[_0x19955b(0xf3)][_0x19955b(0xf4)](_0x488791['unitId'])[_0x19955b(0x10a)](_0x8362c=>_0x8362c[_0x19955b(0xc8)]===_0x488791[_0x19955b(0xc8)]))==null?void 0x0:_0x550313['root'];if(!_0x241f51)return;const {unitId:_0x1d3f0f,subUnitId:_0x158cf2}=_0x241f51;switch(_0x488791[_0x19955b(0x135)]&&this['_userService']['addUser'](_0x488791['user']),_0x488791[_0x19955b(0xce)]){case _0x3a3799['Add']:break;case _0x3a3799['Reply']:{this['_threadCommentModel'][_0x19955b(0xd8)](_0x1d3f0f,_0x158cf2,{'unitId':_0x1d3f0f,'subUnitId':_0x158cf2,'ref':'','id':_0x488791[_0x19955b(0x107)],'dT':_0x59d5a6(+_0x488791[_0x19955b(0xf0)]),'threadId':_0x488791[_0x19955b(0xc8)],'personId':(_0x3c105d=(_0x37a037=_0x488791[_0x19955b(0x135)])==null?void 0x0:_0x37a037[_0x19955b(0x12e)])!=null?_0x3c105d:_0x488791[_0x19955b(0x145)],'text':JSON['parse'](_0x488791[_0x19955b(0xe8)]),'parentId':_0x241f51['id']});break;}case _0x3a3799['Delete']:{const _0x209c92=this[_0x19955b(0xf3)][_0x19955b(0x130)](_0x1d3f0f,_0x158cf2,_0x488791['replyId']);_0x209c92&&_0x209c92[_0x19955b(0x111)]&&this[_0x19955b(0xf3)]['deleteComment'](_0x1d3f0f,_0x158cf2,_0x488791[_0x19955b(0x107)]);break;}case _0x3a3799[_0x19955b(0xbd)]:{this[_0x19955b(0xf3)][_0x19955b(0xe7)](_0x1d3f0f,_0x158cf2,{'commentId':_0x488791[_0x19955b(0x107)],'text':JSON['parse'](_0x488791[_0x19955b(0xe8)])});break;}case _0x3a3799[_0x19955b(0xc5)]:{const _0x4f8e92=(_0x4cf37a=this[_0x19955b(0xf3)]['getUnit'](_0x488791[_0x19955b(0xf1)])[_0x19955b(0x10a)](_0x240290=>_0x240290[_0x19955b(0xc8)]===_0x488791[_0x19955b(0xc8)]))==null?void 0x0:_0x4cf37a[_0x19955b(0xc6)];_0x4f8e92&&this['_threadCommentModel'][_0x19955b(0x11a)](_0x1d3f0f,_0x158cf2,_0x4f8e92['id'],_0x488791[_0x19955b(0xea)]===_0x14f77b[_0x19955b(0x144)]);break;}}}));}};_0x3da451=_0x30c4c9([_0x563037(0x0,_0x3ffc9c[_0x4694ed(0xd5)](_0x5e935c['CommentService'])),_0x563037(0x1,_0x3ffc9c[_0x4694ed(0xd5)](_0x23253d['ThreadCommentModel'])),_0x563037(0x2,_0x3ffc9c['Inject'](_0x3ffc9c[_0x4694ed(0xfb)])),_0x563037(0x3,_0x3ffc9c['Inject'](_0x3ffc9c[_0x4694ed(0x121)]))],_0x3da451);const _0x3eb4b1=_0x4694ed(0x128),_0x52dfa2={};var _0x9954cb=Object[_0x4694ed(0x10e)],_0x94a84f=(_0x2fc69e,_0x1c30d0,_0x5dabc4,_0x4ac858)=>{const _0x4f5f7e=_0x4694ed;for(var _0x277d20=_0x4ac858>0x1?void 0x0:_0x4ac858?_0x9954cb(_0x1c30d0,_0x5dabc4):_0x1c30d0,_0x11c424=_0x2fc69e[_0x4f5f7e(0xc7)]-0x1,_0x15c203;_0x11c424>=0x0;_0x11c424--)(_0x15c203=_0x2fc69e[_0x11c424])&&(_0x277d20=_0x15c203(_0x277d20)||_0x277d20);return _0x277d20;},_0x410799=(_0x31e92b,_0x2a2c02)=>(_0x373b28,_0x4f0391)=>_0x2a2c02(_0x373b28,_0x4f0391,_0x31e92b);function _0x3bdc07(_0x223d6e,_0x45b2f5){const _0x33c9f6=_0x4694ed,_0x5e854d=_0x223d6e[_0x33c9f6(0xe3)][0x0];return{..._0x45b2f5,'id':_0x5e854d[_0x33c9f6(0x107)],'resolved':_0x223d6e[_0x33c9f6(0xea)]===0x1,'dT':_0x59d5a6(_0x5e854d['createTimestamp']),'personId':_0x5e854d[_0x33c9f6(0x145)],'threadId':_0x5e854d['threadId']};}function _0x3f9eb2(_0x15a5ee,_0x8dca43,_0x2240db){const _0x2e3c41=_0x4694ed;var _0xea3489,_0x59f1c3;if(((_0x59f1c3=(_0xea3489=_0x15a5ee==null?void 0x0:_0x15a5ee['replies'])==null?void 0x0:_0xea3489[_0x2e3c41(0xc7)])!=null?_0x59f1c3:0x0)>0x0){const _0x44f46e=(_0x5873e9,_0x13d992)=>({'id':_0x5873e9[_0x2e3c41(0x107)],'threadId':_0x5873e9['threadId'],'dT':_0x59d5a6(_0x5873e9['createTimestamp']),'personId':_0x5873e9[_0x2e3c41(0x145)],'resolved':_0x15a5ee[_0x2e3c41(0xea)]===_0x14f77b[_0x2e3c41(0x144)],'unitId':_0x8dca43,'subUnitId':_0x2240db,'text':JSON[_0x2e3c41(0xc9)](_0x5873e9['content']),'parentId':_0x13d992}),_0x5ab3c0=_0x44f46e(_0x15a5ee[_0x2e3c41(0xe3)][0x0]);return{..._0x5ab3c0,'children':_0x15a5ee[_0x2e3c41(0xe3)]['slice'](0x1)[_0x2e3c41(0xe5)](_0x252c9e=>_0x44f46e(_0x252c9e,_0x5ab3c0['id']))};}return null;}let _0x3c29ea=class{constructor(_0x3ad056,_0x2cbfbf,_0x453bfb,_0x24038c){const _0x191843=_0x4694ed;this[_0x191843(0xc0)]=_0x3ad056,this[_0x191843(0xe4)]=_0x2cbfbf,this[_0x191843(0xd1)]=_0x453bfb,this[_0x191843(0x102)]=_0x24038c;}async[_0x4694ed(0xd8)](_0x279ad2){const _0xdce4a1=_0x4694ed;var _0x38a1b1,_0x89b9c7;const {parentId:_0x2dc03b,unitId:_0x1103df,text:_0x31d950,threadId:_0x23b221}=_0x279ad2,_0x15030e=(_0x89b9c7=(_0x38a1b1=_0x31d950['customRanges'])==null?void 0x0:_0x38a1b1[_0xdce4a1(0x127)](_0xedcb84=>_0xedcb84['rangeType']===_0x3ffc9c['CustomRangeType'][_0xdce4a1(0x110)])[_0xdce4a1(0xe5)](_0x32d4b5=>_0x32d4b5[_0xdce4a1(0x124)]))!=null?_0x89b9c7:[],_0x1e0fb7=JSON[_0xdce4a1(0x106)](_0x31d950),_0x2aa3ed=(await this[_0xdce4a1(0xd1)][_0xdce4a1(0xda)](_0x1103df))[_0xdce4a1(0x13e)]();if(_0x2dc03b){const _0x3fe4fb={'memberId':_0x2aa3ed,'unitId':_0x1103df,'content':_0x1e0fb7,'mention':_0x15030e,'threadId':_0x23b221},_0x185b38=(await this[_0xdce4a1(0xc0)]['post'](_0xdce4a1(0x140)+_0x1103df+_0xdce4a1(0x134),{'body':_0x3fe4fb}))['body'][_0xdce4a1(0x11c)];return{..._0x279ad2,'id':_0x185b38[_0xdce4a1(0x107)],'dT':_0x3ffc9c[_0xdce4a1(0x132)](+_0x185b38['createTimestamp'])[_0xdce4a1(0xde)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x185b38['userId']};}else{const _0x247846={'memberId':_0x2aa3ed,'unitId':_0x1103df,'content':_0x1e0fb7,'mention':_0x15030e},_0x1f2e4e=await this[_0xdce4a1(0xc0)][_0xdce4a1(0xf5)](_0xdce4a1(0x140)+_0x1103df+_0xdce4a1(0x10d),{'body':_0x247846});return _0x3bdc07(_0x1f2e4e[_0xdce4a1(0xe1)][_0xdce4a1(0x112)],_0x279ad2);}}async[_0x4694ed(0xe7)](_0x96a91){const _0x22c5d2=_0x4694ed;var _0x369e9b,_0x182cb7;const {text:_0x30e488,unitId:_0x3ba39c}=_0x96a91,_0x3e7032=(_0x182cb7=(_0x369e9b=_0x30e488[_0x22c5d2(0x11f)])==null?void 0x0:_0x369e9b[_0x22c5d2(0x127)](_0x355fd7=>_0x355fd7[_0x22c5d2(0xd4)]===_0x3ffc9c[_0x22c5d2(0x120)]['COMMENT'])[_0x22c5d2(0xe5)](_0x1bfa1b=>_0x1bfa1b[_0x22c5d2(0x124)]))!=null?_0x182cb7:[],_0x31845b=JSON['stringify'](_0x30e488),_0x17e2e4=_0x96a91[_0x22c5d2(0xc8)],_0x38d827=_0x96a91['id'],_0x34faa5={'memberId':(await this[_0x22c5d2(0xd1)][_0x22c5d2(0xda)](_0x3ba39c))['getMemberID'](),'unitId':_0x3ba39c,'threadId':_0x17e2e4,'mention':_0x3e7032,'content':_0x31845b,'replyId':_0x38d827},_0x56dbd4=await this[_0x22c5d2(0xc0)][_0x22c5d2(0xf5)](_0x22c5d2(0x140)+_0x3ba39c+_0x22c5d2(0x12d),{'body':_0x34faa5});return!_0x56dbd4[_0x22c5d2(0xe1)][_0x22c5d2(0xff)]||_0x56dbd4['body'][_0x22c5d2(0xff)][_0x22c5d2(0xeb)]===0x1;}async['resolveComment'](_0x37d4ee){const _0x5c675=_0x4694ed,{unitId:_0x3659ec}=_0x37d4ee,_0x19bd89=_0x37d4ee['threadId'],_0x788be3={'memberId':this['_userService'][_0x5c675(0xcc)]()['userID'],'unitId':_0x3659ec,'threadId':_0x19bd89,'solved':_0x37d4ee[_0x5c675(0x100)]?_0x14f77b[_0x5c675(0x144)]:_0x14f77b['OpenOrReOpen']},_0x113f5d=await this[_0x5c675(0xc0)][_0x5c675(0xf5)](_0x5c675(0x140)+_0x3659ec+_0x5c675(0xcf),{'body':_0x788be3});return!_0x113f5d[_0x5c675(0xe1)]['error']||_0x113f5d[_0x5c675(0xe1)][_0x5c675(0xff)][_0x5c675(0xeb)]===0x1;}async['deleteComment'](_0x25f72f,_0x4b9f75,_0x4cf028,_0x1a6a66){const _0x27c956=_0x4694ed,_0x5eb9e3={'memberId':(await this['_sessionService'][_0x27c956(0xda)](_0x25f72f))[_0x27c956(0x13e)](),'threadId':_0x4cf028,'replyId':_0x1a6a66,'unitId':_0x25f72f},_0x125081=await this[_0x27c956(0xc0)]['post'](_0x27c956(0x140)+_0x25f72f+'/delete',{'body':_0x5eb9e3});return!_0x125081[_0x27c956(0xe1)][_0x27c956(0xff)]||_0x125081['body'][_0x27c956(0xff)][_0x27c956(0xeb)]===0x1;}async[_0x4694ed(0x137)](_0x4d4ae6,_0x3d9c3f,_0x102072){const _0xd62e9d=_0x4694ed,_0x3e817b={'unitId':_0x4d4ae6,'threadId':_0x102072},_0x3d2d07=await this[_0xd62e9d(0xc0)][_0xd62e9d(0xf5)](_0xd62e9d(0x140)+_0x4d4ae6+_0xd62e9d(0x12f),{'body':_0x3e817b}),_0x24d065=_0x102072['map'](_0x371d97=>_0x3f9eb2(_0x3d2d07[_0xd62e9d(0xe1)]['comments'][_0x371d97],_0x4d4ae6,_0x3d9c3f))['filter'](Boolean);return Object[_0xd62e9d(0x108)](_0x3d2d07[_0xd62e9d(0xe1)][_0xd62e9d(0xfc)])[_0xd62e9d(0xbe)](_0x5de20a=>{const _0x3ae8a8=_0xd62e9d;this[_0x3ae8a8(0xe4)][_0x3ae8a8(0x126)](_0x5de20a);}),_0x24d065;}[_0x4694ed(0xfe)](_0x592e91){const _0x443f22=_0x4694ed;return{'id':_0x592e91['id'],'threadId':_0x592e91[_0x443f22(0xc8)],'ref':_0x592e91[_0x443f22(0x12b)]};}};_0x3c29ea=_0x94a84f([_0x410799(0x0,_0x3ffc9c[_0x4694ed(0xd5)](_0x4272d0['HTTPService'])),_0x410799(0x1,_0x3ffc9c[_0x4694ed(0xd5)](_0x3ffc9c[_0x4694ed(0xfb)])),_0x410799(0x2,_0x3ffc9c[_0x4694ed(0xd5)](_0x5e935c[_0x4694ed(0x11d)])),_0x410799(0x3,_0x3ffc9c[_0x4694ed(0xd5)](_0x3ffc9c[_0x4694ed(0x121)]))],_0x3c29ea);var _0x396e32=Object[_0x4694ed(0x10e)],_0x50ea09=(_0x3d5e5c,_0x244cdc,_0x549ab4,_0x57f071)=>{for(var _0x52099d=_0x57f071>0x1?void 0x0:_0x57f071?_0x396e32(_0x244cdc,_0x549ab4):_0x244cdc,_0x230789=_0x3d5e5c['length']-0x1,_0x243f5;_0x230789>=0x0;_0x230789--)(_0x243f5=_0x3d5e5c[_0x230789])&&(_0x52099d=_0x243f5(_0x52099d)||_0x52099d);return _0x52099d;},_0x2929c9=(_0x29cf3d,_0x4a610b)=>(_0x4730,_0x1b60a4)=>_0x4a610b(_0x4730,_0x1b60a4,_0x29cf3d);let _0x10caa1=class extends _0x3ffc9c[_0x4694ed(0xec)]{constructor(_0x4f609e,_0x1dd523){const _0x3dc633=_0x4694ed;super(),this[_0x3dc633(0x105)]=_0x4f609e,this[_0x3dc633(0xf9)]=_0x1dd523,this[_0x3dc633(0xdd)]();}[_0x4694ed(0xdd)](){const _0x453573=_0x4694ed;this[_0x453573(0x105)][_0x453573(0xdc)]=this[_0x453573(0xf9)],this['_threadCommentDataSourceService'][_0x453573(0xbf)]=!0x1;}};_0x10caa1=_0x50ea09([_0x2929c9(0x0,_0x23253d[_0x4694ed(0xcd)]),_0x2929c9(0x1,_0x3ffc9c['Inject'](_0x3c29ea))],_0x10caa1);var _0x393b46=Object[_0x4694ed(0x101)],_0x3cfcca=Object[_0x4694ed(0x10e)],_0x3a7841=(_0x4e85b1,_0x1f6d7c,_0x656a0c)=>_0x1f6d7c in _0x4e85b1?_0x393b46(_0x4e85b1,_0x1f6d7c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x656a0c}):_0x4e85b1[_0x1f6d7c]=_0x656a0c,_0x39cd74=(_0x5ca86b,_0xf37cfb,_0x546d30,_0x2d7981)=>{const _0x27208c=_0x4694ed;for(var _0x5268f4=_0x2d7981>0x1?void 0x0:_0x2d7981?_0x3cfcca(_0xf37cfb,_0x546d30):_0xf37cfb,_0x5d95b0=_0x5ca86b[_0x27208c(0xc7)]-0x1,_0x3ba1c6;_0x5d95b0>=0x0;_0x5d95b0--)(_0x3ba1c6=_0x5ca86b[_0x5d95b0])&&(_0x5268f4=_0x3ba1c6(_0x5268f4)||_0x5268f4);return _0x5268f4;},_0x3eeb2f=(_0x38aa30,_0x2b55ee)=>(_0x1fe075,_0x577ba5)=>_0x2b55ee(_0x1fe075,_0x577ba5,_0x38aa30),_0xdecf1b=(_0x448be7,_0x554175,_0x2db193)=>_0x3a7841(_0x448be7,typeof _0x554175!=_0x4694ed(0x10f)?_0x554175+'':_0x554175,_0x2db193);_0x188fd4[_0x4694ed(0xc1)]=class extends _0x3ffc9c[_0x4694ed(0x146)]{constructor(_0x2d19b3=_0x52dfa2,_0x2b747f,_0x534af8){const _0x52e29a=_0x4694ed;super(),this[_0x52e29a(0x109)]=_0x2d19b3,this[_0x52e29a(0x102)]=_0x2b747f,this[_0x52e29a(0x114)]=_0x534af8;const {..._0x284ff8}=_0x3ffc9c['merge']({},_0x52dfa2,this[_0x52e29a(0x109)]);this[_0x52e29a(0x114)][_0x52e29a(0x125)](_0x3eb4b1,_0x284ff8);}['onStarting'](){const _0x38558d=_0x4694ed;[[_0x3c29ea],[_0x10caa1],[_0x3da451]][_0x38558d(0xbe)](_0x34e802=>{const _0x314c57=_0x38558d;this[_0x314c57(0x102)][_0x314c57(0xd3)](_0x34e802);});}[_0x4694ed(0x113)](){const _0x3de1c9=_0x4694ed;this[_0x3de1c9(0x102)][_0x3de1c9(0xe9)](_0x10caa1),this[_0x3de1c9(0x102)][_0x3de1c9(0xe9)](_0x3da451);}},_0xdecf1b(_0x188fd4[_0x4694ed(0xc1)],_0x4694ed(0x129),_0x49b807),_0xdecf1b(_0x188fd4[_0x4694ed(0xc1)],_0x4694ed(0xce),_0x3ffc9c['UniverInstanceType'][_0x4694ed(0xca)]),_0x188fd4[_0x4694ed(0xc1)]=_0x39cd74([_0x3ffc9c[_0x4694ed(0xd2)](_0x26f6d9['UniverThreadCommentUIPlugin'],_0x5e935c[_0x4694ed(0x13b)],_0x366498[_0x4694ed(0xc3)]),_0x3eeb2f(0x1,_0x3ffc9c[_0x4694ed(0xd5)](_0x3ffc9c[_0x4694ed(0x121)])),_0x3eeb2f(0x2,_0x3ffc9c[_0x4694ed(0x13a)])],_0x188fd4[_0x4694ed(0xc1)]),Object[_0x4694ed(0x101)](_0x188fd4,Symbol[_0x4694ed(0x13d)],{'value':_0x4694ed(0xf2)});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.8.1-nightly.202506191607",
3
+ "version": "0.8.2-nightly.202506201607",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,20 +45,20 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.8.1-nightly.202506191607",
49
- "@univerjs-pro/license": "0.8.1-nightly.202506191607",
50
- "@univerjs/core": "0.8.1-nightly.202506191607",
51
- "@univerjs/network": "0.8.1-nightly.202506191607",
52
- "@univerjs/thread-comment": "0.8.1-nightly.202506191607",
53
- "@univerjs/thread-comment-ui": "0.8.1-nightly.202506191607",
54
- "@univerjs/protocol": "0.1.47-alpha.0"
48
+ "@univerjs-pro/collaboration-client": "0.8.2-nightly.202506201607",
49
+ "@univerjs/core": "0.8.2-nightly.202506201607",
50
+ "@univerjs-pro/license": "0.8.2-nightly.202506201607",
51
+ "@univerjs/network": "0.8.2-nightly.202506201607",
52
+ "@univerjs/thread-comment": "0.8.2-nightly.202506201607",
53
+ "@univerjs/protocol": "0.1.47-alpha.0",
54
+ "@univerjs/thread-comment-ui": "0.8.2-nightly.202506201607"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",
58
58
  "typescript": "^5.8.3",
59
59
  "vite": "^6.3.5",
60
60
  "vitest": "^3.2.3",
61
- "@univerjs-infra/shared": "0.8.1"
61
+ "@univerjs-infra/shared": "0.8.2"
62
62
  },
63
63
  "scripts": {
64
64
  "test": "vitest run",