@univerjs-pro/thread-comment-datasource 0.10.10-nightly.202510170942 → 0.10.10-nightly.202510180256

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 _0x530ce1=_0x45ed;(function(_0x272742,_0x81af4e){const _0x3b03b4=_0x45ed,_0x372c40=_0x272742();while(!![]){try{const _0x2ec5d3=-parseInt(_0x3b03b4(0xbb))/0x1*(parseInt(_0x3b03b4(0xca))/0x2)+parseInt(_0x3b03b4(0xc7))/0x3+parseInt(_0x3b03b4(0x10b))/0x4+parseInt(_0x3b03b4(0xa2))/0x5+parseInt(_0x3b03b4(0xaa))/0x6+-parseInt(_0x3b03b4(0x106))/0x7*(-parseInt(_0x3b03b4(0xb5))/0x8)+-parseInt(_0x3b03b4(0x105))/0x9*(parseInt(_0x3b03b4(0xe1))/0xa);if(_0x2ec5d3===_0x81af4e)break;else _0x372c40['push'](_0x372c40['shift']());}catch(_0x1dab5a){_0x372c40['push'](_0x372c40['shift']());}}}(_0x4522,0x90d55));Object['defineProperty'](exports,Symbol[_0x530ce1(0xcb)],{'value':_0x530ce1(0xff)});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x530ce1(0xa1);var I=(_0x6f206e=>(_0x6f206e[_0x6f206e[_0x530ce1(0xfc)]=0x0]=_0x530ce1(0xfc),_0x6f206e[_0x6f206e[_0x530ce1(0xa9)]=0x1]=_0x530ce1(0xa9),_0x6f206e[_0x6f206e[_0x530ce1(0xfa)]=-0x1]=_0x530ce1(0xfa),_0x6f206e))(I||{}),v=(_0x37b619=>(_0x37b619[_0x37b619['Unknown']=0x0]=_0x530ce1(0xe3),_0x37b619[_0x37b619[_0x530ce1(0xfb)]=0x1]='Add',_0x37b619[_0x37b619['Reply']=0x2]='Reply',_0x37b619[_0x37b619[_0x530ce1(0xf2)]=0x3]=_0x530ce1(0xf2),_0x37b619[_0x37b619[_0x530ce1(0xb1)]=0x4]=_0x530ce1(0xb1),_0x37b619[_0x37b619['Solve']=0x5]=_0x530ce1(0xc5),_0x37b619[_0x37b619[_0x530ce1(0xfa)]=-0x1]=_0x530ce1(0xfa),_0x37b619))(v||{});const f=_0x545393=>c['dayjs'](new Date(+_0x545393))[_0x530ce1(0x8f)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x5b664f,_0x18004d)=>{const _0x3b2c2f=_0x530ce1,_0x3742f2=_0x5b664f[_0x3b2c2f(0x100)](c[_0x3b2c2f(0xbf)]),_0x2629db=_0x5b664f['get'](P[_0x3b2c2f(0xf6)]);_0x18004d[_0x3b2c2f(0xae)](_0x57d610=>{const _0x5b7dbb=_0x3b2c2f;_0x3742f2[_0x5b7dbb(0xfe)](_0x57d610)&&_0x18004d[_0x5b7dbb(0xec)](_0x57d610);}),_0x18004d['size']&&(await _0x2629db['get']('/universer-api/user/list',{'params':{'userIDs':[..._0x18004d]}}))['body'][_0x3b2c2f(0x98)]['forEach'](_0x57d839=>{_0x57d839&&_0x3742f2['addUser'](_0x57d839);});};var $=Object[_0x530ce1(0xf0)],E=(_0x2c4c40,_0x55a9ae,_0x320810,_0x27cf92)=>{for(var _0x34b939=_0x27cf92>0x1?void 0x0:_0x27cf92?$(_0x55a9ae,_0x320810):_0x55a9ae,_0x3c1fd5=_0x2c4c40['length']-0x1,_0x2c12a1;_0x3c1fd5>=0x0;_0x3c1fd5--)(_0x2c12a1=_0x2c4c40[_0x3c1fd5])&&(_0x34b939=_0x2c12a1(_0x34b939)||_0x34b939);return _0x34b939;},S=(_0x28041b,_0x4b5212)=>(_0x387503,_0x567088)=>_0x4b5212(_0x387503,_0x567088,_0x28041b);function _0x45ed(_0x49d172,_0x22f7c7){const _0x452220=_0x4522();return _0x45ed=function(_0x45ed1b,_0x2385c6){_0x45ed1b=_0x45ed1b-0x8f;let _0x210bdd=_0x452220[_0x45ed1b];return _0x210bdd;},_0x45ed(_0x49d172,_0x22f7c7);}let _=class extends c[_0x530ce1(0x9f)]{constructor(_0xdfd30f,_0x3f9df6,_0x3ea3fa,_0xcd6c6e){const _0x3088e4=_0x530ce1;super(),this[_0x3088e4(0x102)]=_0xdfd30f,this['_threadCommentModel']=_0x3f9df6,this[_0x3088e4(0xda)]=_0x3ea3fa,this[_0x3088e4(0xb6)]=_0xcd6c6e,this[_0x3088e4(0xaf)](),this[_0x3088e4(0xb0)]();}[_0x530ce1(0xb0)](){const _0x342782=_0x530ce1;this[_0x342782(0xf7)](this[_0x342782(0xdd)][_0x342782(0xe7)][_0x342782(0x10c)](j['bufferTime'](0x10))[_0x342782(0x9c)](_0x3ed176=>{const _0x52d7d6=_0x342782,_0x20c474=new Set();_0x3ed176[_0x52d7d6(0xae)](_0x55110b=>{const _0x2bf5e7=_0x52d7d6;switch(_0x55110b[_0x2bf5e7(0xc9)]){case _0x2bf5e7(0xb3):{const _0x378157=_0x55110b['payload'][_0x2bf5e7(0xbe)];_0x20c474[_0x2bf5e7(0xb3)](_0x378157);break;}}}),R(this[_0x52d7d6(0xb6)],_0x20c474);}));}[_0x530ce1(0xaf)](){const _0x490ddb=_0x530ce1;this[_0x490ddb(0xf7)](this[_0x490ddb(0x102)][_0x490ddb(0xe7)][_0x490ddb(0x9c)](async _0x2d8a45=>{const _0x10b6f6=_0x490ddb;var _0x55de05,_0x152fa1,_0x327f0c,_0x5054b1;const _0xf3f434=(_0x55de05=this['_threadCommentModel'][_0x10b6f6(0x101)](_0x2d8a45['unitId'])[_0x10b6f6(0x10d)](_0x1d382d=>_0x1d382d[_0x10b6f6(0x9d)]===_0x2d8a45['threadId']))==null?void 0x0:_0x55de05[_0x10b6f6(0xdc)];if(!_0xf3f434)return;const {unitId:_0x2f59a3,subUnitId:_0x4b8131}=_0xf3f434;switch(_0x2d8a45[_0x10b6f6(0x93)]&&this['_userService'][_0x10b6f6(0x9a)](_0x2d8a45[_0x10b6f6(0x93)]),_0x2d8a45[_0x10b6f6(0xc9)]){case v[_0x10b6f6(0xfb)]:break;case v[_0x10b6f6(0x109)]:{this[_0x10b6f6(0xdd)][_0x10b6f6(0xf3)](_0x2f59a3,_0x4b8131,{'unitId':_0x2f59a3,'subUnitId':_0x4b8131,'ref':'','id':_0x2d8a45[_0x10b6f6(0x97)],'dT':f(+_0x2d8a45[_0x10b6f6(0x92)]),'threadId':_0x2d8a45[_0x10b6f6(0x9d)],'personId':(_0x327f0c=(_0x152fa1=_0x2d8a45[_0x10b6f6(0x93)])==null?void 0x0:_0x152fa1[_0x10b6f6(0x94)])!=null?_0x327f0c:_0x2d8a45[_0x10b6f6(0x9e)],'text':JSON['parse'](_0x2d8a45[_0x10b6f6(0xb8)]),'parentId':_0xf3f434['id']});break;}case v[_0x10b6f6(0xb1)]:{const _0x3ae63a=this[_0x10b6f6(0xdd)][_0x10b6f6(0x90)](_0x2f59a3,_0x4b8131,_0x2d8a45[_0x10b6f6(0x97)]);_0x3ae63a&&_0x3ae63a[_0x10b6f6(0xba)]&&this[_0x10b6f6(0xdd)][_0x10b6f6(0xac)](_0x2f59a3,_0x4b8131,_0x2d8a45[_0x10b6f6(0x97)]);break;}case v[_0x10b6f6(0xf2)]:{this['_threadCommentModel'][_0x10b6f6(0xfd)](_0x2f59a3,_0x4b8131,{'commentId':_0x2d8a45[_0x10b6f6(0x97)],'text':JSON[_0x10b6f6(0x96)](_0x2d8a45[_0x10b6f6(0xb8)])});break;}case v[_0x10b6f6(0xc5)]:{const _0x3f4810=(_0x5054b1=this[_0x10b6f6(0xdd)]['getUnit'](_0x2d8a45[_0x10b6f6(0xc1)])['find'](_0x24620a=>_0x24620a[_0x10b6f6(0x9d)]===_0x2d8a45[_0x10b6f6(0x9d)]))==null?void 0x0:_0x5054b1[_0x10b6f6(0xdc)];_0x3f4810&&this[_0x10b6f6(0xdd)]['resolveComment'](_0x2f59a3,_0x4b8131,_0x3f4810['id'],_0x2d8a45['solved']===I[_0x10b6f6(0xa9)]);break;}}}));}};_=E([S(0x0,c[_0x530ce1(0xab)](b[_0x530ce1(0x108)])),S(0x1,c['Inject'](M[_0x530ce1(0xc8)])),S(0x2,c[_0x530ce1(0xab)](c[_0x530ce1(0xbf)])),S(0x3,c[_0x530ce1(0xab)](c['Injector']))],_);function _0x4522(){const _0x134f7f=['CustomRangeType','reply','values','symbol','delete','replies','CollaborationSessionService','_configService','getOwnPropertyDescriptor','dayjs','Edit','addComment','body','/solved','HTTPService','disposeWithMe','Injector','UNIVER_UNKNOWN','UNRECOGNIZED','Add','OpenOrReOpen','updateComment','getUser','Module','get','getUnit','_commentService','getCurrentUser','resolved','19264788jHxJfq','299670fUWNPd','pluginName','CommentService','Reply','onStarting','3816700PHrxLt','pipe','find','format','getComment','YYYY/MM/DD\x20HH:mm','createTimestamp','user','userID','/universer-api/comment/unit/','parse','replyId','users','map','addUser','UniverThreadCommentUIPlugin','subscribe','threadId','userId','Disposable','listComments','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','5784915iyMyzN','merge','requireSession','rangeId','resolveComment','onReady','filter','Solved','3571962PRDfcN','Inject','deleteComment','getMemberID','forEach','_init','_initUserSync','Delete','UniverCollaborationClientPlugin','add','Plugin','104vYtipR','_injector','comments','content','slice','parentId','4fjFxio','stringify','DependentOn','personId','UserManagerService','/delete','unitId','post','error','code','Solve','UniverThreadCommentDataSourcePlugin','474486YRMhFq','ThreadCommentModel','type','343704UEUIYo','toStringTag','_threadCommentDataSourceService','comment','_threadCommentDataSource','customRanges','_httpService','UniverLicensePlugin','length','/add','IConfigService','syncUpdateMutationToColla','_config','saveCommentToSnapshot','/edit','thread-comment-data-source.config','_userService','_initDataSource','root','_threadCommentModel','solved','_sessionService','UniverInstanceType','10UwcIWr','IThreadCommentDataSourceService','Unknown','COMMENT','/reply','defineProperty','commentUpdate$'];_0x4522=function(){return _0x134f7f;};return _0x4522();}const q=_0x530ce1(0xd9),D={};var A=Object[_0x530ce1(0xf0)],x=(_0x55fd29,_0x529cd4,_0x2c3fcd,_0x537ee3)=>{for(var _0x3a5e55=_0x537ee3>0x1?void 0x0:_0x537ee3?A(_0x529cd4,_0x2c3fcd):_0x529cd4,_0xb812cd=_0x55fd29['length']-0x1,_0x561b99;_0xb812cd>=0x0;_0xb812cd--)(_0x561b99=_0x55fd29[_0xb812cd])&&(_0x3a5e55=_0x561b99(_0x3a5e55)||_0x3a5e55);return _0x3a5e55;},C=(_0x2af737,_0x3f77b3)=>(_0x2d09e7,_0x46b74c)=>_0x3f77b3(_0x2d09e7,_0x46b74c,_0x2af737);function Y(_0x477a33,_0x5889bf){const _0x5221b5=_0x530ce1,_0x3ea1c7=_0x477a33[_0x5221b5(0xed)][0x0];return{..._0x5889bf,'id':_0x3ea1c7[_0x5221b5(0x97)],'resolved':_0x477a33[_0x5221b5(0xde)]===0x1,'dT':f(_0x3ea1c7[_0x5221b5(0x92)]),'personId':_0x3ea1c7[_0x5221b5(0x9e)],'threadId':_0x3ea1c7[_0x5221b5(0x9d)]};}function G(_0x170dff,_0x31bfd9,_0x38ace8){const _0x1c6bdf=_0x530ce1;var _0x19dba3,_0x4debe3;if(((_0x4debe3=(_0x19dba3=_0x170dff==null?void 0x0:_0x170dff[_0x1c6bdf(0xed)])==null?void 0x0:_0x19dba3[_0x1c6bdf(0xd2)])!=null?_0x4debe3:0x0)>0x0){const _0x4c62bb=(_0x13a50e,_0x9cba1d)=>({'id':_0x13a50e['replyId'],'threadId':_0x13a50e['threadId'],'dT':f(_0x13a50e[_0x1c6bdf(0x92)]),'personId':_0x13a50e[_0x1c6bdf(0x9e)],'resolved':_0x170dff[_0x1c6bdf(0xde)]===I['Solved'],'unitId':_0x31bfd9,'subUnitId':_0x38ace8,'text':JSON[_0x1c6bdf(0x96)](_0x13a50e[_0x1c6bdf(0xb8)]),'parentId':_0x9cba1d}),_0x44f6bc=_0x4c62bb(_0x170dff[_0x1c6bdf(0xed)][0x0]);return{..._0x44f6bc,'children':_0x170dff[_0x1c6bdf(0xed)][_0x1c6bdf(0xb9)](0x1)[_0x1c6bdf(0x99)](_0xa7b1ce=>_0x4c62bb(_0xa7b1ce,_0x44f6bc['id']))};}return null;}let p=class{constructor(_0xde0092,_0x212163,_0x484c99){const _0x4926b2=_0x530ce1;this[_0x4926b2(0xd0)]=_0xde0092,this[_0x4926b2(0xda)]=_0x212163,this[_0x4926b2(0xdf)]=_0x484c99;}async[_0x530ce1(0xf3)](_0x3e3f96){const _0x2f55ab=_0x530ce1;var _0x2e497e,_0x5108c8;const {parentId:_0x352144,unitId:_0x297fcf,text:_0x13c3fa,threadId:_0x457410}=_0x3e3f96,_0x156507=(_0x5108c8=(_0x2e497e=_0x13c3fa[_0x2f55ab(0xcf)])==null?void 0x0:_0x2e497e['filter'](_0xc219b3=>_0xc219b3['rangeType']===c['CustomRangeType'][_0x2f55ab(0xe4)])['map'](_0x482ddc=>_0x482ddc[_0x2f55ab(0xa5)]))!=null?_0x5108c8:[],_0x530594=JSON[_0x2f55ab(0xbc)](_0x13c3fa),_0x3a59e7=(await this[_0x2f55ab(0xdf)][_0x2f55ab(0xa4)](_0x297fcf))['getMemberID']();if(_0x352144){const _0x39b2fd={'memberId':_0x3a59e7,'unitId':_0x297fcf,'content':_0x530594,'mention':_0x156507,'threadId':_0x457410},_0x350a1a=(await this['_httpService'][_0x2f55ab(0xc2)](_0x2f55ab(0x95)+_0x297fcf+_0x2f55ab(0xe5),{'body':_0x39b2fd}))[_0x2f55ab(0xf4)][_0x2f55ab(0xe9)];return{..._0x3e3f96,'id':_0x350a1a[_0x2f55ab(0x97)],'dT':c[_0x2f55ab(0xf1)](+_0x350a1a[_0x2f55ab(0x92)])['format'](_0x2f55ab(0x91)),'personId':_0x350a1a[_0x2f55ab(0x9e)]};}else{const _0x5dc7f9={'memberId':_0x3a59e7,'unitId':_0x297fcf,'content':_0x530594,'mention':_0x156507},_0x4b7eac=await this['_httpService']['post'](_0x2f55ab(0x95)+_0x297fcf+_0x2f55ab(0xd3),{'body':_0x5dc7f9});return Y(_0x4b7eac['body'][_0x2f55ab(0xcd)],_0x3e3f96);}}async['updateComment'](_0x126bc1){const _0x4977b5=_0x530ce1;var _0x14c113,_0xbc6808;const {text:_0x7d7a00,unitId:_0x57c378}=_0x126bc1,_0x38dd2e=(_0xbc6808=(_0x14c113=_0x7d7a00[_0x4977b5(0xcf)])==null?void 0x0:_0x14c113[_0x4977b5(0xa8)](_0x1553b2=>_0x1553b2['rangeType']===c[_0x4977b5(0xe8)]['COMMENT'])[_0x4977b5(0x99)](_0x40856c=>_0x40856c[_0x4977b5(0xa5)]))!=null?_0xbc6808:[],_0x42ed61=JSON['stringify'](_0x7d7a00),_0x63203c=_0x126bc1['threadId'],_0x3dbb47=_0x126bc1['id'],_0x2ea675={'memberId':(await this['_sessionService'][_0x4977b5(0xa4)](_0x57c378))['getMemberID'](),'unitId':_0x57c378,'threadId':_0x63203c,'mention':_0x38dd2e,'content':_0x42ed61,'replyId':_0x3dbb47},_0x302f1d=await this[_0x4977b5(0xd0)]['post'](_0x4977b5(0x95)+_0x57c378+_0x4977b5(0xd8),{'body':_0x2ea675});return!_0x302f1d[_0x4977b5(0xf4)][_0x4977b5(0xc3)]||_0x302f1d['body'][_0x4977b5(0xc3)]['code']===0x1;}async[_0x530ce1(0xa6)](_0x87477f){const _0x351f5b=_0x530ce1,{unitId:_0x472206}=_0x87477f,_0xe9436f=_0x87477f[_0x351f5b(0x9d)],_0x280af5={'memberId':this[_0x351f5b(0xda)][_0x351f5b(0x103)]()[_0x351f5b(0x94)],'unitId':_0x472206,'threadId':_0xe9436f,'solved':_0x87477f[_0x351f5b(0x104)]?I[_0x351f5b(0xa9)]:I[_0x351f5b(0xfc)]},_0x32eee3=await this[_0x351f5b(0xd0)][_0x351f5b(0xc2)](_0x351f5b(0x95)+_0x472206+_0x351f5b(0xf5),{'body':_0x280af5});return!_0x32eee3[_0x351f5b(0xf4)][_0x351f5b(0xc3)]||_0x32eee3['body']['error'][_0x351f5b(0xc4)]===0x1;}async[_0x530ce1(0xac)](_0x25003f,_0x26d490,_0xec2053,_0x130938){const _0xc2c00a=_0x530ce1,_0x450eda={'memberId':(await this[_0xc2c00a(0xdf)]['requireSession'](_0x25003f))[_0xc2c00a(0xad)](),'threadId':_0xec2053,'replyId':_0x130938,'unitId':_0x25003f},_0x2bc135=await this['_httpService'][_0xc2c00a(0xc2)](_0xc2c00a(0x95)+_0x25003f+_0xc2c00a(0xc0),{'body':_0x450eda});return!_0x2bc135[_0xc2c00a(0xf4)][_0xc2c00a(0xc3)]||_0x2bc135[_0xc2c00a(0xf4)][_0xc2c00a(0xc3)][_0xc2c00a(0xc4)]===0x1;}async[_0x530ce1(0xa0)](_0xc5935c,_0x1dce97,_0x22a089){const _0x4f93e5=_0x530ce1,_0x284747={'unitId':_0xc5935c,'threadId':_0x22a089},_0x3f0b2f=await this[_0x4f93e5(0xd0)][_0x4f93e5(0xc2)](_0x4f93e5(0x95)+_0xc5935c+'/list',{'body':_0x284747}),_0x396844=_0x22a089['map'](_0x2d8cea=>G(_0x3f0b2f[_0x4f93e5(0xf4)][_0x4f93e5(0xb7)][_0x2d8cea],_0xc5935c,_0x1dce97))['filter'](Boolean);return Object[_0x4f93e5(0xea)](_0x3f0b2f[_0x4f93e5(0xf4)]['users'])[_0x4f93e5(0xae)](_0x376937=>{const _0x201907=_0x4f93e5;this[_0x201907(0xda)][_0x201907(0x9a)](_0x376937);}),_0x396844;}[_0x530ce1(0xd7)](_0x15737e){const _0x285661=_0x530ce1;return{'id':_0x15737e['id'],'threadId':_0x15737e[_0x285661(0x9d)],'ref':_0x15737e['ref']};}};p=x([C(0x0,c[_0x530ce1(0xab)](P[_0x530ce1(0xf6)])),C(0x1,c[_0x530ce1(0xab)](c[_0x530ce1(0xbf)])),C(0x2,c['Inject'](b[_0x530ce1(0xee)]))],p);var H=Object[_0x530ce1(0xf0)],J=(_0x17682b,_0x51ad21,_0xdb20d1,_0x2c1412)=>{const _0x57244a=_0x530ce1;for(var _0x5cda3b=_0x2c1412>0x1?void 0x0:_0x2c1412?H(_0x51ad21,_0xdb20d1):_0x51ad21,_0x3047ef=_0x17682b[_0x57244a(0xd2)]-0x1,_0x2c27db;_0x3047ef>=0x0;_0x3047ef--)(_0x2c27db=_0x17682b[_0x3047ef])&&(_0x5cda3b=_0x2c27db(_0x5cda3b)||_0x5cda3b);return _0x5cda3b;},y=(_0x2f706a,_0x4fbb13)=>(_0x4a130d,_0x280e87)=>_0x4fbb13(_0x4a130d,_0x280e87,_0x2f706a);let g=class extends c[_0x530ce1(0x9f)]{constructor(_0x525480,_0x16e06c){const _0x526224=_0x530ce1;super(),this[_0x526224(0xcc)]=_0x525480,this[_0x526224(0xce)]=_0x16e06c,this[_0x526224(0xdb)]();}[_0x530ce1(0xdb)](){const _0x435da3=_0x530ce1;this['_threadCommentDataSourceService']['dataSource']=this[_0x435da3(0xce)],this['_threadCommentDataSourceService'][_0x435da3(0xd5)]=!0x1;}};g=J([y(0x0,M[_0x530ce1(0xe2)]),y(0x1,c[_0x530ce1(0xab)](p))],g);var F=Object[_0x530ce1(0xe6)],L=Object[_0x530ce1(0xf0)],Z=(_0x4bb772,_0x75293a,_0x19141c)=>_0x75293a in _0x4bb772?F(_0x4bb772,_0x75293a,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x19141c}):_0x4bb772[_0x75293a]=_0x19141c,W=(_0x263f55,_0x151354,_0x528e52,_0xe8e93c)=>{for(var _0x4dec99=_0xe8e93c>0x1?void 0x0:_0xe8e93c?L(_0x151354,_0x528e52):_0x151354,_0x3f0955=_0x263f55['length']-0x1,_0x576274;_0x3f0955>=0x0;_0x3f0955--)(_0x576274=_0x263f55[_0x3f0955])&&(_0x4dec99=_0x576274(_0x4dec99)||_0x4dec99);return _0x4dec99;},O=(_0x19880c,_0x15ec9e)=>(_0x2f75ef,_0x35fa03)=>_0x15ec9e(_0x2f75ef,_0x35fa03,_0x19880c),N=(_0x270e0a,_0x2f8d74,_0x134609)=>Z(_0x270e0a,typeof _0x2f8d74!=_0x530ce1(0xeb)?_0x2f8d74+'':_0x2f8d74,_0x134609);exports[_0x530ce1(0xc6)]=class extends c[_0x530ce1(0xb4)]{constructor(_0x562051=D,_0x44459e,_0x33c061){const _0x30e0a7=_0x530ce1;super(),this['_config']=_0x562051,this[_0x30e0a7(0xb6)]=_0x44459e,this[_0x30e0a7(0xef)]=_0x33c061;const {..._0x22dfe8}=c[_0x30e0a7(0xa3)]({},D,this[_0x30e0a7(0xd6)]);this[_0x30e0a7(0xef)]['setConfig'](q,_0x22dfe8);}[_0x530ce1(0x10a)](){const _0x1ef951=_0x530ce1;[[p],[g],[_]][_0x1ef951(0xae)](_0x5ccf41=>{const _0x5c9bc4=_0x1ef951;this[_0x5c9bc4(0xb6)]['add'](_0x5ccf41);});}[_0x530ce1(0xa7)](){const _0x1f67f9=_0x530ce1;this[_0x1f67f9(0xb6)][_0x1f67f9(0x100)](g),this['_injector'][_0x1f67f9(0x100)](_);}},N(exports[_0x530ce1(0xc6)],_0x530ce1(0x107),U),N(exports[_0x530ce1(0xc6)],_0x530ce1(0xc9),c[_0x530ce1(0xe0)][_0x530ce1(0xf9)]),exports[_0x530ce1(0xc6)]=W([c[_0x530ce1(0xbd)](w[_0x530ce1(0x9b)],b[_0x530ce1(0xb2)],T[_0x530ce1(0xd1)]),O(0x1,c[_0x530ce1(0xab)](c[_0x530ce1(0xf8)])),O(0x2,c[_0x530ce1(0xd4)])],exports['UniverThreadCommentDataSourcePlugin']);
1
+ 'use strict';const _0x67d5ee=_0x2692;(function(_0x379b73,_0x2e280d){const _0x42e1a5=_0x2692,_0x45e343=_0x379b73();while(!![]){try{const _0x27ee92=-parseInt(_0x42e1a5(0xb9))/0x1*(-parseInt(_0x42e1a5(0xd5))/0x2)+-parseInt(_0x42e1a5(0xb5))/0x3+parseInt(_0x42e1a5(0xfb))/0x4*(parseInt(_0x42e1a5(0xf4))/0x5)+parseInt(_0x42e1a5(0x9e))/0x6*(parseInt(_0x42e1a5(0xca))/0x7)+parseInt(_0x42e1a5(0x108))/0x8*(-parseInt(_0x42e1a5(0xc6))/0x9)+-parseInt(_0x42e1a5(0x10f))/0xa+parseInt(_0x42e1a5(0xd4))/0xb;if(_0x27ee92===_0x2e280d)break;else _0x45e343['push'](_0x45e343['shift']());}catch(_0x2545c9){_0x45e343['push'](_0x45e343['shift']());}}}(_0x3d59,0xafa57));Object[_0x67d5ee(0xe0)](exports,Symbol[_0x67d5ee(0x10b)],{'value':'Module'});const b=require('@univerjs-pro/collaboration-client'),T=require('@univerjs-pro/license'),c=require('@univerjs/core'),w=require('@univerjs/thread-comment-ui'),M=require('@univerjs/thread-comment'),j=require('rxjs'),P=require('@univerjs/network'),U=_0x67d5ee(0xb3);var I=(_0x2afc7d=>(_0x2afc7d[_0x2afc7d[_0x67d5ee(0xf5)]=0x0]='OpenOrReOpen',_0x2afc7d[_0x2afc7d[_0x67d5ee(0xea)]=0x1]=_0x67d5ee(0xea),_0x2afc7d[_0x2afc7d['UNRECOGNIZED']=-0x1]='UNRECOGNIZED',_0x2afc7d))(I||{}),v=(_0x3a0619=>(_0x3a0619[_0x3a0619[_0x67d5ee(0xb4)]=0x0]='Unknown',_0x3a0619[_0x3a0619[_0x67d5ee(0x10a)]=0x1]=_0x67d5ee(0x10a),_0x3a0619[_0x3a0619[_0x67d5ee(0xf9)]=0x2]=_0x67d5ee(0xf9),_0x3a0619[_0x3a0619[_0x67d5ee(0xe4)]=0x3]=_0x67d5ee(0xe4),_0x3a0619[_0x3a0619[_0x67d5ee(0xa7)]=0x4]='Delete',_0x3a0619[_0x3a0619[_0x67d5ee(0xd8)]=0x5]=_0x67d5ee(0xd8),_0x3a0619[_0x3a0619[_0x67d5ee(0xb7)]=-0x1]=_0x67d5ee(0xb7),_0x3a0619))(v||{});const f=_0x43e65f=>c[_0x67d5ee(0xec)](new Date(+_0x43e65f))[_0x67d5ee(0xe8)]('YYYY/MM/DD\x20HH:mm'),R=async(_0x2d83ad,_0x437cee)=>{const _0x4f420f=_0x67d5ee,_0x5a5205=_0x2d83ad[_0x4f420f(0xba)](c[_0x4f420f(0xe2)]),_0x20063b=_0x2d83ad[_0x4f420f(0xba)](P[_0x4f420f(0xd3)]);_0x437cee[_0x4f420f(0xfd)](_0x52697f=>{const _0x3406d5=_0x4f420f;_0x5a5205[_0x3406d5(0x113)](_0x52697f)&&_0x437cee[_0x3406d5(0xad)](_0x52697f);}),_0x437cee[_0x4f420f(0xfa)]&&(await _0x20063b[_0x4f420f(0xba)]('/universer-api/user/list',{'params':{'userIDs':[..._0x437cee]}}))[_0x4f420f(0xfe)]['users']['forEach'](_0x3f6d82=>{const _0x329a46=_0x4f420f;_0x3f6d82&&_0x5a5205[_0x329a46(0xdf)](_0x3f6d82);});};var $=Object[_0x67d5ee(0xa8)],E=(_0x4d6ec1,_0x288d87,_0x47c724,_0xdd5d58)=>{const _0x4b54fa=_0x67d5ee;for(var _0x204d84=_0xdd5d58>0x1?void 0x0:_0xdd5d58?$(_0x288d87,_0x47c724):_0x288d87,_0x23e61c=_0x4d6ec1[_0x4b54fa(0xc4)]-0x1,_0x4d6776;_0x23e61c>=0x0;_0x23e61c--)(_0x4d6776=_0x4d6ec1[_0x23e61c])&&(_0x204d84=_0x4d6776(_0x204d84)||_0x204d84);return _0x204d84;},S=(_0x174b70,_0x164ff6)=>(_0x3601d7,_0x47b02b)=>_0x164ff6(_0x3601d7,_0x47b02b,_0x174b70);let _=class extends c['Disposable']{constructor(_0x49602a,_0x30cdf5,_0xbcf53e,_0x48f4b0){const _0x20d93c=_0x67d5ee;super(),this[_0x20d93c(0xb6)]=_0x49602a,this[_0x20d93c(0xf6)]=_0x30cdf5,this[_0x20d93c(0x101)]=_0xbcf53e,this[_0x20d93c(0xcb)]=_0x48f4b0,this[_0x20d93c(0xb1)](),this[_0x20d93c(0x107)]();}['_initUserSync'](){const _0x442c25=_0x67d5ee;this[_0x442c25(0x9f)](this[_0x442c25(0xf6)][_0x442c25(0xee)][_0x442c25(0xb8)](j[_0x442c25(0xe9)](0x10))['subscribe'](_0x153b4a=>{const _0x3c1d2e=_0x442c25,_0x415eee=new Set();_0x153b4a[_0x3c1d2e(0xfd)](_0x7870af=>{const _0x3908ec=_0x3c1d2e;switch(_0x7870af[_0x3908ec(0xaf)]){case _0x3908ec(0x106):{const _0x69b4d2=_0x7870af[_0x3908ec(0xeb)][_0x3908ec(0xdc)];_0x415eee[_0x3908ec(0x106)](_0x69b4d2);break;}}}),R(this['_injector'],_0x415eee);}));}[_0x67d5ee(0xb1)](){const _0x11fce1=_0x67d5ee;this[_0x11fce1(0x9f)](this[_0x11fce1(0xb6)][_0x11fce1(0xee)][_0x11fce1(0xce)](async _0x4c894f=>{const _0x44b1cb=_0x11fce1;var _0x4faf7d,_0x2063ee,_0x39fb4a,_0x1c0282;const _0x16e01e=(_0x4faf7d=this[_0x44b1cb(0xf6)]['getUnit'](_0x4c894f[_0x44b1cb(0xc8)])[_0x44b1cb(0xa9)](_0x49da18=>_0x49da18[_0x44b1cb(0xf1)]===_0x4c894f[_0x44b1cb(0xf1)]))==null?void 0x0:_0x4faf7d[_0x44b1cb(0xcc)];if(!_0x16e01e)return;const {unitId:_0x9a1bed,subUnitId:_0x13e547}=_0x16e01e;switch(_0x4c894f['user']&&this[_0x44b1cb(0x101)]['addUser'](_0x4c894f['user']),_0x4c894f[_0x44b1cb(0xaf)]){case v[_0x44b1cb(0x10a)]:break;case v['Reply']:{this[_0x44b1cb(0xf6)][_0x44b1cb(0xd2)](_0x9a1bed,_0x13e547,{'unitId':_0x9a1bed,'subUnitId':_0x13e547,'ref':'','id':_0x4c894f[_0x44b1cb(0xf0)],'dT':f(+_0x4c894f['createTimestamp']),'threadId':_0x4c894f[_0x44b1cb(0xf1)],'personId':(_0x39fb4a=(_0x2063ee=_0x4c894f[_0x44b1cb(0xbf)])==null?void 0x0:_0x2063ee[_0x44b1cb(0xdd)])!=null?_0x39fb4a:_0x4c894f[_0x44b1cb(0x110)],'text':JSON['parse'](_0x4c894f[_0x44b1cb(0x111)]),'parentId':_0x16e01e['id']});break;}case v['Delete']:{const _0x4e216b=this[_0x44b1cb(0xf6)][_0x44b1cb(0xd1)](_0x9a1bed,_0x13e547,_0x4c894f[_0x44b1cb(0xf0)]);_0x4e216b&&_0x4e216b[_0x44b1cb(0xe5)]&&this['_threadCommentModel'][_0x44b1cb(0x10e)](_0x9a1bed,_0x13e547,_0x4c894f['replyId']);break;}case v[_0x44b1cb(0xe4)]:{this['_threadCommentModel'][_0x44b1cb(0xbd)](_0x9a1bed,_0x13e547,{'commentId':_0x4c894f[_0x44b1cb(0xf0)],'text':JSON[_0x44b1cb(0xc7)](_0x4c894f[_0x44b1cb(0x111)])});break;}case v['Solve']:{const _0x119491=(_0x1c0282=this['_threadCommentModel']['getUnit'](_0x4c894f['unitId'])[_0x44b1cb(0xa9)](_0x3e285e=>_0x3e285e[_0x44b1cb(0xf1)]===_0x4c894f[_0x44b1cb(0xf1)]))==null?void 0x0:_0x1c0282[_0x44b1cb(0xcc)];_0x119491&&this['_threadCommentModel']['resolveComment'](_0x9a1bed,_0x13e547,_0x119491['id'],_0x4c894f[_0x44b1cb(0x103)]===I[_0x44b1cb(0xea)]);break;}}}));}};_=E([S(0x0,c[_0x67d5ee(0x115)](b[_0x67d5ee(0xda)])),S(0x1,c[_0x67d5ee(0x115)](M[_0x67d5ee(0x9d)])),S(0x2,c[_0x67d5ee(0x115)](c[_0x67d5ee(0xe2)])),S(0x3,c[_0x67d5ee(0x115)](c[_0x67d5ee(0xff)]))],_);const q=_0x67d5ee(0xb2),D={};var A=Object[_0x67d5ee(0xa8)],x=(_0x2dca4d,_0x4c4710,_0x3192a6,_0x312bc5)=>{const _0x57d847=_0x67d5ee;for(var _0xa38993=_0x312bc5>0x1?void 0x0:_0x312bc5?A(_0x4c4710,_0x3192a6):_0x4c4710,_0x23ea50=_0x2dca4d[_0x57d847(0xc4)]-0x1,_0x395cf2;_0x23ea50>=0x0;_0x23ea50--)(_0x395cf2=_0x2dca4d[_0x23ea50])&&(_0xa38993=_0x395cf2(_0xa38993)||_0xa38993);return _0xa38993;},C=(_0x3416b0,_0x25f8e3)=>(_0x39f206,_0x17a2aa)=>_0x25f8e3(_0x39f206,_0x17a2aa,_0x3416b0);function _0x3d59(){const _0x1a502c=['bufferTime','Solved','payload','dayjs','_configService','commentUpdate$','ref','replyId','threadId','values','createTimestamp','155tMieHp','OpenOrReOpen','_threadCommentModel','users','comments','Reply','size','86148UveMbC','_config','forEach','body','Injector','slice','_userService','rangeId','solved','onStarting','replies','add','_initUserSync','8qxZUkf','_httpService','Add','toStringTag','/list','UniverCollaborationClientPlugin','deleteComment','11042930iajkOL','userId','content','_sessionService','getUser','listComments','Inject','CustomRangeType','map','DependentOn','syncUpdateMutationToColla','onReady','UniverThreadCommentUIPlugin','ThreadCommentModel','6GekNXu','disposeWithMe','_threadCommentDataSourceService','UniverInstanceType','saveCommentToSnapshot','resolved','comment','getCurrentUser','symbol','Delete','getOwnPropertyDescriptor','find','/universer-api/comment/unit/','Disposable','COMMENT','delete','post','type','/delete','_init','thread-comment-data-source.config','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Unknown','154248VCyEgr','_commentService','UNRECOGNIZED','pipe','2771RQWlcd','get','UniverThreadCommentDataSourcePlugin','/add','updateComment','CollaborationSessionService','user','Plugin','getMemberID','filter','/edit','length','stringify','10685151hBGKhu','parse','unitId','error','168847FNUKFg','_injector','root','UNIVER_UNKNOWN','subscribe','UniverLicensePlugin','dataSource','getComment','addComment','HTTPService','19584444UoOxIy','426fIDnFC','rangeType','/solved','Solve','merge','CommentService','requireSession','personId','userID','resolveComment','addUser','defineProperty','reply','UserManagerService','_initDataSource','Edit','parentId','YYYY/MM/DD\x20HH:mm','code','format'];_0x3d59=function(){return _0x1a502c;};return _0x3d59();}function Y(_0x5252c3,_0x10b2e0){const _0x1b0613=_0x67d5ee,_0x2640a8=_0x5252c3[_0x1b0613(0x105)][0x0];return{..._0x10b2e0,'id':_0x2640a8[_0x1b0613(0xf0)],'resolved':_0x5252c3[_0x1b0613(0x103)]===0x1,'dT':f(_0x2640a8[_0x1b0613(0xf3)]),'personId':_0x2640a8[_0x1b0613(0x110)],'threadId':_0x2640a8[_0x1b0613(0xf1)]};}function G(_0x2f7f13,_0x40c088,_0x20cce1){const _0x32fb94=_0x67d5ee;var _0x2e7901,_0x348caa;if(((_0x348caa=(_0x2e7901=_0x2f7f13==null?void 0x0:_0x2f7f13['replies'])==null?void 0x0:_0x2e7901[_0x32fb94(0xc4)])!=null?_0x348caa:0x0)>0x0){const _0x43c053=(_0x17f728,_0x137b3c)=>({'id':_0x17f728[_0x32fb94(0xf0)],'threadId':_0x17f728['threadId'],'dT':f(_0x17f728[_0x32fb94(0xf3)]),'personId':_0x17f728[_0x32fb94(0x110)],'resolved':_0x2f7f13[_0x32fb94(0x103)]===I['Solved'],'unitId':_0x40c088,'subUnitId':_0x20cce1,'text':JSON[_0x32fb94(0xc7)](_0x17f728['content']),'parentId':_0x137b3c}),_0x4fd597=_0x43c053(_0x2f7f13[_0x32fb94(0x105)][0x0]);return{..._0x4fd597,'children':_0x2f7f13[_0x32fb94(0x105)][_0x32fb94(0x100)](0x1)[_0x32fb94(0x117)](_0x53a85d=>_0x43c053(_0x53a85d,_0x4fd597['id']))};}return null;}let p=class{constructor(_0xd2ab45,_0x1861dc,_0x372bed){const _0x34532f=_0x67d5ee;this[_0x34532f(0x109)]=_0xd2ab45,this[_0x34532f(0x101)]=_0x1861dc,this[_0x34532f(0x112)]=_0x372bed;}async[_0x67d5ee(0xd2)](_0x3e3112){const _0x35bcfb=_0x67d5ee;var _0x421f86,_0xdac25b;const {parentId:_0x4e8d81,unitId:_0x2b3547,text:_0x51e487,threadId:_0x18c4b7}=_0x3e3112,_0x27758c=(_0xdac25b=(_0x421f86=_0x51e487['customRanges'])==null?void 0x0:_0x421f86[_0x35bcfb(0xc2)](_0x27975d=>_0x27975d[_0x35bcfb(0xd6)]===c[_0x35bcfb(0x116)][_0x35bcfb(0xac)])['map'](_0x5e6734=>_0x5e6734['rangeId']))!=null?_0xdac25b:[],_0x1ac15d=JSON[_0x35bcfb(0xc5)](_0x51e487),_0xf2e60=(await this['_sessionService']['requireSession'](_0x2b3547))[_0x35bcfb(0xc1)]();if(_0x4e8d81){const _0x2c84dd={'memberId':_0xf2e60,'unitId':_0x2b3547,'content':_0x1ac15d,'mention':_0x27758c,'threadId':_0x18c4b7},_0x4fb6b0=(await this[_0x35bcfb(0x109)]['post'](_0x35bcfb(0xaa)+_0x2b3547+'/reply',{'body':_0x2c84dd}))[_0x35bcfb(0xfe)][_0x35bcfb(0xe1)];return{..._0x3e3112,'id':_0x4fb6b0[_0x35bcfb(0xf0)],'dT':c['dayjs'](+_0x4fb6b0[_0x35bcfb(0xf3)])[_0x35bcfb(0xe8)](_0x35bcfb(0xe6)),'personId':_0x4fb6b0['userId']};}else{const _0x3a581f={'memberId':_0xf2e60,'unitId':_0x2b3547,'content':_0x1ac15d,'mention':_0x27758c},_0x2e137f=await this[_0x35bcfb(0x109)][_0x35bcfb(0xae)](_0x35bcfb(0xaa)+_0x2b3547+_0x35bcfb(0xbc),{'body':_0x3a581f});return Y(_0x2e137f['body'][_0x35bcfb(0xa4)],_0x3e3112);}}async[_0x67d5ee(0xbd)](_0x50d51d){const _0x2777d8=_0x67d5ee;var _0x4e5ddc,_0x13c24b;const {text:_0x4961c0,unitId:_0x2a0560}=_0x50d51d,_0x1a144f=(_0x13c24b=(_0x4e5ddc=_0x4961c0['customRanges'])==null?void 0x0:_0x4e5ddc['filter'](_0x254f57=>_0x254f57[_0x2777d8(0xd6)]===c['CustomRangeType'][_0x2777d8(0xac)])[_0x2777d8(0x117)](_0x400f0b=>_0x400f0b[_0x2777d8(0x102)]))!=null?_0x13c24b:[],_0x524d1d=JSON[_0x2777d8(0xc5)](_0x4961c0),_0x1002a4=_0x50d51d['threadId'],_0x1d864d=_0x50d51d['id'],_0x5e77d9={'memberId':(await this[_0x2777d8(0x112)][_0x2777d8(0xdb)](_0x2a0560))[_0x2777d8(0xc1)](),'unitId':_0x2a0560,'threadId':_0x1002a4,'mention':_0x1a144f,'content':_0x524d1d,'replyId':_0x1d864d},_0x29f33e=await this[_0x2777d8(0x109)][_0x2777d8(0xae)]('/universer-api/comment/unit/'+_0x2a0560+_0x2777d8(0xc3),{'body':_0x5e77d9});return!_0x29f33e[_0x2777d8(0xfe)][_0x2777d8(0xc9)]||_0x29f33e['body'][_0x2777d8(0xc9)]['code']===0x1;}async[_0x67d5ee(0xde)](_0x25f685){const _0x237bcb=_0x67d5ee,{unitId:_0x57f844}=_0x25f685,_0x427907=_0x25f685[_0x237bcb(0xf1)],_0x22a38b={'memberId':this['_userService'][_0x237bcb(0xa5)]()['userID'],'unitId':_0x57f844,'threadId':_0x427907,'solved':_0x25f685[_0x237bcb(0xa3)]?I[_0x237bcb(0xea)]:I['OpenOrReOpen']},_0x24be4a=await this[_0x237bcb(0x109)]['post']('/universer-api/comment/unit/'+_0x57f844+_0x237bcb(0xd7),{'body':_0x22a38b});return!_0x24be4a[_0x237bcb(0xfe)][_0x237bcb(0xc9)]||_0x24be4a[_0x237bcb(0xfe)][_0x237bcb(0xc9)]['code']===0x1;}async[_0x67d5ee(0x10e)](_0x5969d8,_0xb1a532,_0x64d818,_0x5821be){const _0x320875=_0x67d5ee,_0x5cf730={'memberId':(await this['_sessionService']['requireSession'](_0x5969d8))[_0x320875(0xc1)](),'threadId':_0x64d818,'replyId':_0x5821be,'unitId':_0x5969d8},_0x458b0d=await this['_httpService']['post'](_0x320875(0xaa)+_0x5969d8+_0x320875(0xb0),{'body':_0x5cf730});return!_0x458b0d[_0x320875(0xfe)][_0x320875(0xc9)]||_0x458b0d[_0x320875(0xfe)][_0x320875(0xc9)][_0x320875(0xe7)]===0x1;}async[_0x67d5ee(0x114)](_0xebb2d0,_0x290284,_0x160f08){const _0x4c85c4=_0x67d5ee,_0x8109bc={'unitId':_0xebb2d0,'threadId':_0x160f08},_0x45c4c0=await this['_httpService'][_0x4c85c4(0xae)](_0x4c85c4(0xaa)+_0xebb2d0+_0x4c85c4(0x10c),{'body':_0x8109bc}),_0xa07dd=_0x160f08[_0x4c85c4(0x117)](_0x7962d0=>G(_0x45c4c0[_0x4c85c4(0xfe)][_0x4c85c4(0xf8)][_0x7962d0],_0xebb2d0,_0x290284))[_0x4c85c4(0xc2)](Boolean);return Object[_0x4c85c4(0xf2)](_0x45c4c0[_0x4c85c4(0xfe)][_0x4c85c4(0xf7)])[_0x4c85c4(0xfd)](_0x2f2b0b=>{const _0xe71385=_0x4c85c4;this['_userService'][_0xe71385(0xdf)](_0x2f2b0b);}),_0xa07dd;}[_0x67d5ee(0xa2)](_0x276e63){const _0x2e96de=_0x67d5ee;return{'id':_0x276e63['id'],'threadId':_0x276e63[_0x2e96de(0xf1)],'ref':_0x276e63[_0x2e96de(0xef)]};}};p=x([C(0x0,c[_0x67d5ee(0x115)](P[_0x67d5ee(0xd3)])),C(0x1,c[_0x67d5ee(0x115)](c[_0x67d5ee(0xe2)])),C(0x2,c[_0x67d5ee(0x115)](b[_0x67d5ee(0xbe)]))],p);var H=Object['getOwnPropertyDescriptor'],J=(_0x54ce87,_0x382cf8,_0x28c3f0,_0x2cfead)=>{const _0xc28456=_0x67d5ee;for(var _0x1a3e87=_0x2cfead>0x1?void 0x0:_0x2cfead?H(_0x382cf8,_0x28c3f0):_0x382cf8,_0x47fa59=_0x54ce87[_0xc28456(0xc4)]-0x1,_0x4b72c0;_0x47fa59>=0x0;_0x47fa59--)(_0x4b72c0=_0x54ce87[_0x47fa59])&&(_0x1a3e87=_0x4b72c0(_0x1a3e87)||_0x1a3e87);return _0x1a3e87;},y=(_0x2b6e4a,_0x520541)=>(_0x12f051,_0x546946)=>_0x520541(_0x12f051,_0x546946,_0x2b6e4a);let g=class extends c[_0x67d5ee(0xab)]{constructor(_0x22f7af,_0x1ec00a){const _0x358507=_0x67d5ee;super(),this[_0x358507(0xa0)]=_0x22f7af,this['_threadCommentDataSource']=_0x1ec00a,this['_initDataSource']();}[_0x67d5ee(0xe3)](){const _0x167a31=_0x67d5ee;this[_0x167a31(0xa0)][_0x167a31(0xd0)]=this['_threadCommentDataSource'],this[_0x167a31(0xa0)][_0x167a31(0x9a)]=!0x1;}};function _0x2692(_0x643431,_0x5a7de4){const _0x3d5983=_0x3d59();return _0x2692=function(_0x269250,_0x1483db){_0x269250=_0x269250-0x9a;let _0x434d99=_0x3d5983[_0x269250];return _0x434d99;},_0x2692(_0x643431,_0x5a7de4);}g=J([y(0x0,M['IThreadCommentDataSourceService']),y(0x1,c['Inject'](p))],g);var F=Object[_0x67d5ee(0xe0)],L=Object[_0x67d5ee(0xa8)],Z=(_0x5920bb,_0x4fcef1,_0x56d4a9)=>_0x4fcef1 in _0x5920bb?F(_0x5920bb,_0x4fcef1,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x56d4a9}):_0x5920bb[_0x4fcef1]=_0x56d4a9,W=(_0x4e3d36,_0x3081b4,_0x58bfe6,_0x4e954c)=>{const _0x212d28=_0x67d5ee;for(var _0x503eef=_0x4e954c>0x1?void 0x0:_0x4e954c?L(_0x3081b4,_0x58bfe6):_0x3081b4,_0x1d5ba3=_0x4e3d36[_0x212d28(0xc4)]-0x1,_0x2035a6;_0x1d5ba3>=0x0;_0x1d5ba3--)(_0x2035a6=_0x4e3d36[_0x1d5ba3])&&(_0x503eef=_0x2035a6(_0x503eef)||_0x503eef);return _0x503eef;},O=(_0x42cb09,_0x5ad511)=>(_0x549c10,_0x4e7ce0)=>_0x5ad511(_0x549c10,_0x4e7ce0,_0x42cb09),N=(_0x23194d,_0x40ff32,_0x2f97a3)=>Z(_0x23194d,typeof _0x40ff32!=_0x67d5ee(0xa6)?_0x40ff32+'':_0x40ff32,_0x2f97a3);exports[_0x67d5ee(0xbb)]=class extends c[_0x67d5ee(0xc0)]{constructor(_0x2d16d0=D,_0x59b3a8,_0xf567ee){const _0x2d6c7f=_0x67d5ee;super(),this[_0x2d6c7f(0xfc)]=_0x2d16d0,this['_injector']=_0x59b3a8,this['_configService']=_0xf567ee;const {..._0x2d3ef4}=c[_0x2d6c7f(0xd9)]({},D,this[_0x2d6c7f(0xfc)]);this[_0x2d6c7f(0xed)]['setConfig'](q,_0x2d3ef4);}[_0x67d5ee(0x104)](){[[p],[g],[_]]['forEach'](_0x4236f4=>{const _0x213d95=_0x2692;this['_injector'][_0x213d95(0x106)](_0x4236f4);});}[_0x67d5ee(0x9b)](){const _0x5c8aba=_0x67d5ee;this[_0x5c8aba(0xcb)][_0x5c8aba(0xba)](g),this['_injector'][_0x5c8aba(0xba)](_);}},N(exports[_0x67d5ee(0xbb)],'pluginName',U),N(exports[_0x67d5ee(0xbb)],_0x67d5ee(0xaf),c[_0x67d5ee(0xa1)][_0x67d5ee(0xcd)]),exports['UniverThreadCommentDataSourcePlugin']=W([c[_0x67d5ee(0x118)](w[_0x67d5ee(0x9c)],b[_0x67d5ee(0x10d)],T[_0x67d5ee(0xcf)]),O(0x1,c['Inject'](c[_0x67d5ee(0xff)])),O(0x2,c['IConfigService'])],exports[_0x67d5ee(0xbb)]);
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- const _0x486ffb=_0x2815;(function(_0x4563c7,_0x1cca7b){const _0x31ac7c=_0x2815,_0x5c6bb5=_0x4563c7();while(!![]){try{const _0x10b8f5=parseInt(_0x31ac7c(0x18f))/0x1*(-parseInt(_0x31ac7c(0x19b))/0x2)+parseInt(_0x31ac7c(0x1b8))/0x3*(parseInt(_0x31ac7c(0x1bf))/0x4)+-parseInt(_0x31ac7c(0x1a8))/0x5*(-parseInt(_0x31ac7c(0x1b7))/0x6)+parseInt(_0x31ac7c(0x180))/0x7*(parseInt(_0x31ac7c(0x1aa))/0x8)+parseInt(_0x31ac7c(0x1b2))/0x9*(parseInt(_0x31ac7c(0x19f))/0xa)+-parseInt(_0x31ac7c(0x18d))/0xb*(parseInt(_0x31ac7c(0x1d1))/0xc)+parseInt(_0x31ac7c(0x1cb))/0xd*(parseInt(_0x31ac7c(0x1ac))/0xe);if(_0x10b8f5===_0x1cca7b)break;else _0x5c6bb5['push'](_0x5c6bb5['shift']());}catch(_0x5ad90f){_0x5c6bb5['push'](_0x5c6bb5['shift']());}}}(_0x3e06,0x3932c));import{CommentService as _0x1e5874,CollaborationSessionService as _0xd17a1d,UniverCollaborationClientPlugin as _0x1998af}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2b2035}from'@univerjs-pro/license';import{dayjs as _0x15742b,UserManagerService as _0x3aacc4,Inject as _0x482f93,Injector as _0x4b0e42,Disposable as _0x2ad136,CustomRangeType as _0x3c700b,UniverInstanceType as _0x36f100,DependentOn as _0x2af10a,IConfigService as _0x4e5e6a,Plugin as _0x848ee9,merge as _0x558285}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x53556b}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x18fd51,IThreadCommentDataSourceService as _0x24134a}from'@univerjs/thread-comment';import{bufferTime as _0x1355f9}from'rxjs';import{HTTPService as _0x3392dc}from'@univerjs/network';const W=_0x486ffb(0x1c7);function _0x2815(_0x51144a,_0x54781d){const _0x3e0637=_0x3e06();return _0x2815=function(_0x281582,_0x472afc){_0x281582=_0x281582-0x16f;let _0x2eeab9=_0x3e0637[_0x281582];return _0x2eeab9;},_0x2815(_0x51144a,_0x54781d);}var I=(_0x397f43=>(_0x397f43[_0x397f43[_0x486ffb(0x194)]=0x0]=_0x486ffb(0x194),_0x397f43[_0x397f43[_0x486ffb(0x178)]=0x1]=_0x486ffb(0x178),_0x397f43[_0x397f43[_0x486ffb(0x1c3)]=-0x1]='UNRECOGNIZED',_0x397f43))(I||{}),v=(_0x503d37=>(_0x503d37[_0x503d37[_0x486ffb(0x1ba)]=0x0]=_0x486ffb(0x1ba),_0x503d37[_0x503d37[_0x486ffb(0x17e)]=0x1]=_0x486ffb(0x17e),_0x503d37[_0x503d37[_0x486ffb(0x1ca)]=0x2]=_0x486ffb(0x1ca),_0x503d37[_0x503d37[_0x486ffb(0x196)]=0x3]='Edit',_0x503d37[_0x503d37[_0x486ffb(0x1bc)]=0x4]=_0x486ffb(0x1bc),_0x503d37[_0x503d37[_0x486ffb(0x175)]=0x5]=_0x486ffb(0x175),_0x503d37[_0x503d37['UNRECOGNIZED']=-0x1]=_0x486ffb(0x1c3),_0x503d37))(v||{});function _0x3e06(){const _0x2053ff=['_threadCommentDataSource','body','_initUserSync','parse','onStarting','solved','getOwnPropertyDescriptor','Solve','resolveComment','/list','Solved','ref','getUser','deleteComment','UNIVER_UNKNOWN','/universer-api/user/list','Add','/reply','833wUQXPZ','length','replies','defineProperty','symbol','getMemberID','/universer-api/comment/unit/','COMMENT','user','userID','comments','map','syncUpdateMutationToColla','11HcNZED','get','107DZOKlO','format','_threadCommentDataSourceService','updateComment','threadId','OpenOrReOpen','root','Edit','resolved','type','replyId','subscribe','5030rHHLeU','comment','setConfig','/solved','10kjZAIz','rangeId','YYYY/MM/DD\x20HH:mm','userId','getUnit','_httpService','saveCommentToSnapshot','requireSession','_userService','45ANntfT','add','9784FgpnPM','stringify','1619492mkSpxR','disposeWithMe','customRanges','getCurrentUser','users','values','2010465ZnHsLK','code','/edit','pipe','unitId','70410gQaezg','1047BkDoVc','_injector','Unknown','createTimestamp','Delete','_threadCommentModel','personId','172YNmQjd','filter','_initDataSource','content','UNRECOGNIZED','rangeType','onReady','addUser','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','post','_configService','Reply','13AIYDeC','size','addComment','parentId','error','find','1221996AzIKef','forEach','getComment','pluginName','_commentService','_sessionService'];_0x3e06=function(){return _0x2053ff;};return _0x3e06();}const y=_0x5ced77=>_0x15742b(new Date(+_0x5ced77))[_0x486ffb(0x190)](_0x486ffb(0x1a1)),B=async(_0x1a700b,_0x450d82)=>{const _0x37aab1=_0x486ffb,_0xb6fcd4=_0x1a700b[_0x37aab1(0x18e)](_0x3aacc4),_0x4eaebd=_0x1a700b[_0x37aab1(0x18e)](_0x3392dc);_0x450d82['forEach'](_0x24dbac=>{const _0x3ef48e=_0x37aab1;_0xb6fcd4[_0x3ef48e(0x17a)](_0x24dbac)&&_0x450d82['delete'](_0x24dbac);}),_0x450d82[_0x37aab1(0x1cc)]&&(await _0x4eaebd['get'](_0x37aab1(0x17d),{'params':{'userIDs':[..._0x450d82]}}))['body'][_0x37aab1(0x1b0)]['forEach'](_0x9ec2eb=>{const _0x51ba2b=_0x37aab1;_0x9ec2eb&&_0xb6fcd4[_0x51ba2b(0x1c6)](_0x9ec2eb);});};var K=Object[_0x486ffb(0x174)],V=(_0x132b1f,_0x15bb25,_0x4aa2f2,_0x15912b)=>{const _0x2fd9a2=_0x486ffb;for(var _0x879095=_0x15912b>0x1?void 0x0:_0x15912b?K(_0x15bb25,_0x4aa2f2):_0x15bb25,_0x75028e=_0x132b1f[_0x2fd9a2(0x181)]-0x1,_0x1c227f;_0x75028e>=0x0;_0x75028e--)(_0x1c227f=_0x132b1f[_0x75028e])&&(_0x879095=_0x1c227f(_0x879095)||_0x879095);return _0x879095;},p=(_0x549ebb,_0x3cd74e)=>(_0x419c0f,_0x469dd6)=>_0x3cd74e(_0x419c0f,_0x469dd6,_0x549ebb);let _=class extends _0x2ad136{constructor(_0x305e2b,_0x2792ef,_0x3a0d6d,_0x55ffb2){const _0x2c0895=_0x486ffb;super(),this[_0x2c0895(0x1d5)]=_0x305e2b,this['_threadCommentModel']=_0x2792ef,this[_0x2c0895(0x1a7)]=_0x3a0d6d,this[_0x2c0895(0x1b9)]=_0x55ffb2,this['_init'](),this[_0x2c0895(0x170)]();}[_0x486ffb(0x170)](){const _0x1077ca=_0x486ffb;this[_0x1077ca(0x1ad)](this[_0x1077ca(0x1bd)]['commentUpdate$'][_0x1077ca(0x1b5)](_0x1355f9(0x10))['subscribe'](_0x2151ff=>{const _0x458774=_0x1077ca,_0x4389d8=new Set();_0x2151ff[_0x458774(0x1d2)](_0x44f906=>{const _0x12e811=_0x458774;switch(_0x44f906[_0x12e811(0x198)]){case _0x12e811(0x1a9):{const _0x38e751=_0x44f906['payload'][_0x12e811(0x1be)];_0x4389d8[_0x12e811(0x1a9)](_0x38e751);break;}}}),B(this[_0x458774(0x1b9)],_0x4389d8);}));}['_init'](){const _0x1bdf27=_0x486ffb;this[_0x1bdf27(0x1ad)](this[_0x1bdf27(0x1d5)]['commentUpdate$'][_0x1bdf27(0x19a)](async _0x823661=>{const _0x2c50e3=_0x1bdf27;var _0x4ff4ee,_0x2a8c4c,_0x50823e,_0x58b5ed;const _0x2c74b6=(_0x4ff4ee=this['_threadCommentModel'][_0x2c50e3(0x1a3)](_0x823661[_0x2c50e3(0x1b6)])[_0x2c50e3(0x1d0)](_0x94ff37=>_0x94ff37['threadId']===_0x823661[_0x2c50e3(0x193)]))==null?void 0x0:_0x4ff4ee[_0x2c50e3(0x195)];if(!_0x2c74b6)return;const {unitId:_0x1f1c30,subUnitId:_0xa77f18}=_0x2c74b6;switch(_0x823661['user']&&this[_0x2c50e3(0x1a7)][_0x2c50e3(0x1c6)](_0x823661[_0x2c50e3(0x188)]),_0x823661[_0x2c50e3(0x198)]){case v['Add']:break;case v['Reply']:{this[_0x2c50e3(0x1bd)]['addComment'](_0x1f1c30,_0xa77f18,{'unitId':_0x1f1c30,'subUnitId':_0xa77f18,'ref':'','id':_0x823661[_0x2c50e3(0x199)],'dT':y(+_0x823661[_0x2c50e3(0x1bb)]),'threadId':_0x823661['threadId'],'personId':(_0x50823e=(_0x2a8c4c=_0x823661[_0x2c50e3(0x188)])==null?void 0x0:_0x2a8c4c[_0x2c50e3(0x189)])!=null?_0x50823e:_0x823661[_0x2c50e3(0x1a2)],'text':JSON[_0x2c50e3(0x171)](_0x823661['content']),'parentId':_0x2c74b6['id']});break;}case v[_0x2c50e3(0x1bc)]:{const _0x4dc3c5=this['_threadCommentModel'][_0x2c50e3(0x1d3)](_0x1f1c30,_0xa77f18,_0x823661[_0x2c50e3(0x199)]);_0x4dc3c5&&_0x4dc3c5[_0x2c50e3(0x1ce)]&&this[_0x2c50e3(0x1bd)][_0x2c50e3(0x17b)](_0x1f1c30,_0xa77f18,_0x823661[_0x2c50e3(0x199)]);break;}case v[_0x2c50e3(0x196)]:{this[_0x2c50e3(0x1bd)][_0x2c50e3(0x192)](_0x1f1c30,_0xa77f18,{'commentId':_0x823661[_0x2c50e3(0x199)],'text':JSON[_0x2c50e3(0x171)](_0x823661[_0x2c50e3(0x1c2)])});break;}case v[_0x2c50e3(0x175)]:{const _0xf3abac=(_0x58b5ed=this[_0x2c50e3(0x1bd)]['getUnit'](_0x823661['unitId'])['find'](_0x4daa19=>_0x4daa19['threadId']===_0x823661[_0x2c50e3(0x193)]))==null?void 0x0:_0x58b5ed[_0x2c50e3(0x195)];_0xf3abac&&this[_0x2c50e3(0x1bd)][_0x2c50e3(0x176)](_0x1f1c30,_0xa77f18,_0xf3abac['id'],_0x823661[_0x2c50e3(0x173)]===I[_0x2c50e3(0x178)]);break;}}}));}};_=V([p(0x0,_0x482f93(_0x1e5874)),p(0x1,_0x482f93(_0x18fd51)),p(0x2,_0x482f93(_0x3aacc4)),p(0x3,_0x482f93(_0x4b0e42))],_);const z='thread-comment-data-source.config',O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x18cbb2,_0x8d0e85,_0xf9a8bb,_0x2e4fb0)=>{const _0x4f4034=_0x486ffb;for(var _0x193e65=_0x2e4fb0>0x1?void 0x0:_0x2e4fb0?k(_0x8d0e85,_0xf9a8bb):_0x8d0e85,_0x54696e=_0x18cbb2[_0x4f4034(0x181)]-0x1,_0x272866;_0x54696e>=0x0;_0x54696e--)(_0x272866=_0x18cbb2[_0x54696e])&&(_0x193e65=_0x272866(_0x193e65)||_0x193e65);return _0x193e65;},b=(_0x5b9a61,_0xcefecf)=>(_0x5a70f0,_0x48e822)=>_0xcefecf(_0x5a70f0,_0x48e822,_0x5b9a61);function X(_0xddea89,_0x206ec3){const _0x159940=_0x486ffb,_0x56efac=_0xddea89['replies'][0x0];return{..._0x206ec3,'id':_0x56efac[_0x159940(0x199)],'resolved':_0xddea89['solved']===0x1,'dT':y(_0x56efac[_0x159940(0x1bb)]),'personId':_0x56efac[_0x159940(0x1a2)],'threadId':_0x56efac['threadId']};}function ee(_0x33e2fd,_0x383d2e,_0x325be7){const _0x16e2c1=_0x486ffb;var _0xeca0ce,_0x39ad5a;if(((_0x39ad5a=(_0xeca0ce=_0x33e2fd==null?void 0x0:_0x33e2fd[_0x16e2c1(0x182)])==null?void 0x0:_0xeca0ce[_0x16e2c1(0x181)])!=null?_0x39ad5a:0x0)>0x0){const _0x4ea8c2=(_0x2f725a,_0x31b7e6)=>({'id':_0x2f725a[_0x16e2c1(0x199)],'threadId':_0x2f725a[_0x16e2c1(0x193)],'dT':y(_0x2f725a[_0x16e2c1(0x1bb)]),'personId':_0x2f725a[_0x16e2c1(0x1a2)],'resolved':_0x33e2fd[_0x16e2c1(0x173)]===I[_0x16e2c1(0x178)],'unitId':_0x383d2e,'subUnitId':_0x325be7,'text':JSON['parse'](_0x2f725a[_0x16e2c1(0x1c2)]),'parentId':_0x31b7e6}),_0x345988=_0x4ea8c2(_0x33e2fd[_0x16e2c1(0x182)][0x0]);return{..._0x345988,'children':_0x33e2fd[_0x16e2c1(0x182)]['slice'](0x1)[_0x16e2c1(0x18b)](_0x3b9ef7=>_0x4ea8c2(_0x3b9ef7,_0x345988['id']))};}return null;}let S=class{constructor(_0x366091,_0x2a5b7d,_0x12d3c1){const _0x10655c=_0x486ffb;this[_0x10655c(0x1a4)]=_0x366091,this[_0x10655c(0x1a7)]=_0x2a5b7d,this[_0x10655c(0x1d6)]=_0x12d3c1;}async[_0x486ffb(0x1cd)](_0x249887){const _0x215b63=_0x486ffb;var _0x10abd7,_0xbdb248;const {parentId:_0x32f1c1,unitId:_0x54fbc0,text:_0x1e7943,threadId:_0x4f481f}=_0x249887,_0x244263=(_0xbdb248=(_0x10abd7=_0x1e7943[_0x215b63(0x1ae)])==null?void 0x0:_0x10abd7[_0x215b63(0x1c0)](_0x3c44ff=>_0x3c44ff[_0x215b63(0x1c4)]===_0x3c700b[_0x215b63(0x187)])[_0x215b63(0x18b)](_0x53cf83=>_0x53cf83[_0x215b63(0x1a0)]))!=null?_0xbdb248:[],_0x2a0d22=JSON['stringify'](_0x1e7943),_0x4715d4=(await this[_0x215b63(0x1d6)][_0x215b63(0x1a6)](_0x54fbc0))['getMemberID']();if(_0x32f1c1){const _0x1c44f7={'memberId':_0x4715d4,'unitId':_0x54fbc0,'content':_0x2a0d22,'mention':_0x244263,'threadId':_0x4f481f},_0x1f939b=(await this[_0x215b63(0x1a4)]['post']('/universer-api/comment/unit/'+_0x54fbc0+_0x215b63(0x17f),{'body':_0x1c44f7}))[_0x215b63(0x16f)]['reply'];return{..._0x249887,'id':_0x1f939b['replyId'],'dT':_0x15742b(+_0x1f939b[_0x215b63(0x1bb)])[_0x215b63(0x190)](_0x215b63(0x1a1)),'personId':_0x1f939b[_0x215b63(0x1a2)]};}else{const _0x1d41f9={'memberId':_0x4715d4,'unitId':_0x54fbc0,'content':_0x2a0d22,'mention':_0x244263},_0x1ca483=await this['_httpService']['post'](_0x215b63(0x186)+_0x54fbc0+'/add',{'body':_0x1d41f9});return X(_0x1ca483[_0x215b63(0x16f)][_0x215b63(0x19c)],_0x249887);}}async[_0x486ffb(0x192)](_0x4be5db){const _0x5962f4=_0x486ffb;var _0x4a962b,_0x29e334;const {text:_0x149d9f,unitId:_0x3ec656}=_0x4be5db,_0x505b2d=(_0x29e334=(_0x4a962b=_0x149d9f[_0x5962f4(0x1ae)])==null?void 0x0:_0x4a962b[_0x5962f4(0x1c0)](_0x509995=>_0x509995[_0x5962f4(0x1c4)]===_0x3c700b[_0x5962f4(0x187)])[_0x5962f4(0x18b)](_0x5f43ce=>_0x5f43ce['rangeId']))!=null?_0x29e334:[],_0x148662=JSON[_0x5962f4(0x1ab)](_0x149d9f),_0x24fade=_0x4be5db[_0x5962f4(0x193)],_0x4d9bec=_0x4be5db['id'],_0x53d037={'memberId':(await this[_0x5962f4(0x1d6)][_0x5962f4(0x1a6)](_0x3ec656))[_0x5962f4(0x185)](),'unitId':_0x3ec656,'threadId':_0x24fade,'mention':_0x505b2d,'content':_0x148662,'replyId':_0x4d9bec},_0x5087f6=await this[_0x5962f4(0x1a4)][_0x5962f4(0x1c8)](_0x5962f4(0x186)+_0x3ec656+_0x5962f4(0x1b4),{'body':_0x53d037});return!_0x5087f6['body'][_0x5962f4(0x1cf)]||_0x5087f6[_0x5962f4(0x16f)]['error'][_0x5962f4(0x1b3)]===0x1;}async[_0x486ffb(0x176)](_0x4deb3c){const _0x1f5bf5=_0x486ffb,{unitId:_0x34b529}=_0x4deb3c,_0x5519a3=_0x4deb3c[_0x1f5bf5(0x193)],_0x56b828={'memberId':this[_0x1f5bf5(0x1a7)][_0x1f5bf5(0x1af)]()['userID'],'unitId':_0x34b529,'threadId':_0x5519a3,'solved':_0x4deb3c[_0x1f5bf5(0x197)]?I[_0x1f5bf5(0x178)]:I['OpenOrReOpen']},_0x2a3abf=await this[_0x1f5bf5(0x1a4)][_0x1f5bf5(0x1c8)](_0x1f5bf5(0x186)+_0x34b529+_0x1f5bf5(0x19e),{'body':_0x56b828});return!_0x2a3abf[_0x1f5bf5(0x16f)][_0x1f5bf5(0x1cf)]||_0x2a3abf[_0x1f5bf5(0x16f)][_0x1f5bf5(0x1cf)][_0x1f5bf5(0x1b3)]===0x1;}async[_0x486ffb(0x17b)](_0x33b385,_0x2d4477,_0x5277dd,_0x496503){const _0x5d6144=_0x486ffb,_0x36eda9={'memberId':(await this[_0x5d6144(0x1d6)]['requireSession'](_0x33b385))['getMemberID'](),'threadId':_0x5277dd,'replyId':_0x496503,'unitId':_0x33b385},_0x5a2d44=await this[_0x5d6144(0x1a4)]['post'](_0x5d6144(0x186)+_0x33b385+'/delete',{'body':_0x36eda9});return!_0x5a2d44[_0x5d6144(0x16f)]['error']||_0x5a2d44[_0x5d6144(0x16f)][_0x5d6144(0x1cf)][_0x5d6144(0x1b3)]===0x1;}async['listComments'](_0x3aa5dc,_0x2ebc15,_0x321d00){const _0x30bae3=_0x486ffb,_0x210336={'unitId':_0x3aa5dc,'threadId':_0x321d00},_0x4f598f=await this[_0x30bae3(0x1a4)][_0x30bae3(0x1c8)](_0x30bae3(0x186)+_0x3aa5dc+_0x30bae3(0x177),{'body':_0x210336}),_0x45be17=_0x321d00[_0x30bae3(0x18b)](_0x5cd6ff=>ee(_0x4f598f[_0x30bae3(0x16f)][_0x30bae3(0x18a)][_0x5cd6ff],_0x3aa5dc,_0x2ebc15))['filter'](Boolean);return Object[_0x30bae3(0x1b1)](_0x4f598f['body'][_0x30bae3(0x1b0)])[_0x30bae3(0x1d2)](_0x464403=>{const _0x18c33f=_0x30bae3;this['_userService'][_0x18c33f(0x1c6)](_0x464403);}),_0x45be17;}[_0x486ffb(0x1a5)](_0x382e76){const _0x11c7a4=_0x486ffb;return{'id':_0x382e76['id'],'threadId':_0x382e76[_0x11c7a4(0x193)],'ref':_0x382e76[_0x11c7a4(0x179)]};}};S=Q([b(0x0,_0x482f93(_0x3392dc)),b(0x1,_0x482f93(_0x3aacc4)),b(0x2,_0x482f93(_0xd17a1d))],S);var re=Object[_0x486ffb(0x174)],te=(_0x55ccb9,_0x566512,_0x2d7d11,_0x504518)=>{const _0x1356e8=_0x486ffb;for(var _0x5e3734=_0x504518>0x1?void 0x0:_0x504518?re(_0x566512,_0x2d7d11):_0x566512,_0xad20fd=_0x55ccb9[_0x1356e8(0x181)]-0x1,_0x5e7b4e;_0xad20fd>=0x0;_0xad20fd--)(_0x5e7b4e=_0x55ccb9[_0xad20fd])&&(_0x5e3734=_0x5e7b4e(_0x5e3734)||_0x5e3734);return _0x5e3734;},M=(_0x593d09,_0x92e988)=>(_0x34f8b6,_0x34bef8)=>_0x92e988(_0x34f8b6,_0x34bef8,_0x593d09);let f=class extends _0x2ad136{constructor(_0x36325c,_0x499851){const _0x85d66f=_0x486ffb;super(),this[_0x85d66f(0x191)]=_0x36325c,this[_0x85d66f(0x1d7)]=_0x499851,this['_initDataSource']();}[_0x486ffb(0x1c1)](){const _0x4a78ca=_0x486ffb;this[_0x4a78ca(0x191)]['dataSource']=this[_0x4a78ca(0x1d7)],this[_0x4a78ca(0x191)][_0x4a78ca(0x18c)]=!0x1;}};f=te([M(0x0,_0x24134a),M(0x1,_0x482f93(S))],f);var se=Object[_0x486ffb(0x183)],oe=Object[_0x486ffb(0x174)],ne=(_0x43e484,_0x554af3,_0x4da8d5)=>_0x554af3 in _0x43e484?se(_0x43e484,_0x554af3,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4da8d5}):_0x43e484[_0x554af3]=_0x4da8d5,ie=(_0x29004e,_0x459384,_0x2d8c3b,_0x1450dd)=>{const _0x55379c=_0x486ffb;for(var _0x42a8d9=_0x1450dd>0x1?void 0x0:_0x1450dd?oe(_0x459384,_0x2d8c3b):_0x459384,_0x1226c3=_0x29004e[_0x55379c(0x181)]-0x1,_0x46e74d;_0x1226c3>=0x0;_0x1226c3--)(_0x46e74d=_0x29004e[_0x1226c3])&&(_0x42a8d9=_0x46e74d(_0x42a8d9)||_0x42a8d9);return _0x42a8d9;},N=(_0x587b0f,_0x491874)=>(_0x14a516,_0x46f24b)=>_0x491874(_0x14a516,_0x46f24b,_0x587b0f),$=(_0x2d702b,_0xa1fd09,_0x476d54)=>ne(_0x2d702b,typeof _0xa1fd09!=_0x486ffb(0x184)?_0xa1fd09+'':_0xa1fd09,_0x476d54);let g=class extends _0x848ee9{constructor(_0xfebba2=O,_0x154565,_0x879283){const _0x35d77e=_0x486ffb;super(),this['_config']=_0xfebba2,this[_0x35d77e(0x1b9)]=_0x154565,this[_0x35d77e(0x1c9)]=_0x879283;const {..._0x3c20be}=_0x558285({},O,this['_config']);this[_0x35d77e(0x1c9)][_0x35d77e(0x19d)](z,_0x3c20be);}[_0x486ffb(0x172)](){const _0x1b6491=_0x486ffb;[[S],[f],[_]][_0x1b6491(0x1d2)](_0x598de5=>{const _0x2b010f=_0x1b6491;this[_0x2b010f(0x1b9)][_0x2b010f(0x1a9)](_0x598de5);});}[_0x486ffb(0x1c5)](){const _0x497ff2=_0x486ffb;this[_0x497ff2(0x1b9)][_0x497ff2(0x18e)](f),this[_0x497ff2(0x1b9)][_0x497ff2(0x18e)](_);}};$(g,_0x486ffb(0x1d4),W),$(g,'type',_0x36f100[_0x486ffb(0x17c)]),g=ie([_0x2af10a(_0x53556b,_0x1998af,_0x2b2035),N(0x1,_0x482f93(_0x4b0e42)),N(0x2,_0x4e5e6a)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x1c34b4=_0x5043;(function(_0x1720da,_0x364ed1){const _0x4f9116=_0x5043,_0x411c7b=_0x1720da();while(!![]){try{const _0x508edb=parseInt(_0x4f9116(0xcc))/0x1*(-parseInt(_0x4f9116(0xc6))/0x2)+-parseInt(_0x4f9116(0xda))/0x3*(parseInt(_0x4f9116(0xcb))/0x4)+-parseInt(_0x4f9116(0x95))/0x5*(parseInt(_0x4f9116(0xf1))/0x6)+parseInt(_0x4f9116(0xbe))/0x7*(-parseInt(_0x4f9116(0xa8))/0x8)+parseInt(_0x4f9116(0xbd))/0x9+-parseInt(_0x4f9116(0xc9))/0xa+parseInt(_0x4f9116(0xa6))/0xb;if(_0x508edb===_0x364ed1)break;else _0x411c7b['push'](_0x411c7b['shift']());}catch(_0x7f4ab){_0x411c7b['push'](_0x411c7b['shift']());}}}(_0x5286,0xbe5f0));import{CommentService as _0x3e37de,CollaborationSessionService as _0x23974e,UniverCollaborationClientPlugin as _0x1d3f0e}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x208ff5}from'@univerjs-pro/license';import{dayjs as _0x19f761,UserManagerService as _0x2f71ad,Inject as _0x41fa4c,Injector as _0x1b186a,Disposable as _0x2e40cc,CustomRangeType as _0x5731a5,UniverInstanceType as _0x131887,DependentOn as _0x59b602,IConfigService as _0x5d8e83,Plugin as _0xc50fea,merge as _0x1d31f1}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x42d33a}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x23170b,IThreadCommentDataSourceService as _0x203f67}from'@univerjs/thread-comment';import{bufferTime as _0x5da853}from'rxjs';import{HTTPService as _0x10b3b5}from'@univerjs/network';const W=_0x1c34b4(0xf9);var I=(_0x53d659=>(_0x53d659[_0x53d659[_0x1c34b4(0xa7)]=0x0]='OpenOrReOpen',_0x53d659[_0x53d659[_0x1c34b4(0xd8)]=0x1]='Solved',_0x53d659[_0x53d659[_0x1c34b4(0xca)]=-0x1]=_0x1c34b4(0xca),_0x53d659))(I||{}),v=(_0x6802d9=>(_0x6802d9[_0x6802d9[_0x1c34b4(0xe7)]=0x0]='Unknown',_0x6802d9[_0x6802d9[_0x1c34b4(0xc7)]=0x1]=_0x1c34b4(0xc7),_0x6802d9[_0x6802d9[_0x1c34b4(0xf6)]=0x2]=_0x1c34b4(0xf6),_0x6802d9[_0x6802d9[_0x1c34b4(0xc3)]=0x3]='Edit',_0x6802d9[_0x6802d9[_0x1c34b4(0xd2)]=0x4]=_0x1c34b4(0xd2),_0x6802d9[_0x6802d9[_0x1c34b4(0xe4)]=0x5]=_0x1c34b4(0xe4),_0x6802d9[_0x6802d9[_0x1c34b4(0xca)]=-0x1]=_0x1c34b4(0xca),_0x6802d9))(v||{});const y=_0x3af722=>_0x19f761(new Date(+_0x3af722))[_0x1c34b4(0xa3)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x4604d1,_0x13318e)=>{const _0x3a7b94=_0x1c34b4,_0x275772=_0x4604d1[_0x3a7b94(0x93)](_0x2f71ad),_0x309e8a=_0x4604d1[_0x3a7b94(0x93)](_0x10b3b5);_0x13318e[_0x3a7b94(0xb1)](_0x2efe10=>{const _0x1dea5c=_0x3a7b94;_0x275772[_0x1dea5c(0x94)](_0x2efe10)&&_0x13318e['delete'](_0x2efe10);}),_0x13318e[_0x3a7b94(0xd0)]&&(await _0x309e8a[_0x3a7b94(0x93)](_0x3a7b94(0xa2),{'params':{'userIDs':[..._0x13318e]}}))[_0x3a7b94(0xb6)][_0x3a7b94(0xce)][_0x3a7b94(0xb1)](_0x831b47=>{_0x831b47&&_0x275772['addUser'](_0x831b47);});};var K=Object[_0x1c34b4(0xd3)],V=(_0x533458,_0x3f6bc6,_0x406ce9,_0x540d5f)=>{const _0x585639=_0x1c34b4;for(var _0x44f0ee=_0x540d5f>0x1?void 0x0:_0x540d5f?K(_0x3f6bc6,_0x406ce9):_0x3f6bc6,_0x17f85d=_0x533458[_0x585639(0xa0)]-0x1,_0x36775d;_0x17f85d>=0x0;_0x17f85d--)(_0x36775d=_0x533458[_0x17f85d])&&(_0x44f0ee=_0x36775d(_0x44f0ee)||_0x44f0ee);return _0x44f0ee;},p=(_0x47b9e1,_0x234bdb)=>(_0x27f3d0,_0x2358d4)=>_0x234bdb(_0x27f3d0,_0x2358d4,_0x47b9e1);let _=class extends _0x2e40cc{constructor(_0x380194,_0x4dd087,_0x4dca2e,_0x46d2f8){const _0x23b4a2=_0x1c34b4;super(),this[_0x23b4a2(0xa5)]=_0x380194,this[_0x23b4a2(0xf7)]=_0x4dd087,this[_0x23b4a2(0x9f)]=_0x4dca2e,this[_0x23b4a2(0x98)]=_0x46d2f8,this[_0x23b4a2(0xd5)](),this['_initUserSync']();}[_0x1c34b4(0xdc)](){const _0x3bbb8c=_0x1c34b4;this[_0x3bbb8c(0xe0)](this[_0x3bbb8c(0xf7)][_0x3bbb8c(0xea)][_0x3bbb8c(0xec)](_0x5da853(0x10))['subscribe'](_0x53fa51=>{const _0x417304=_0x3bbb8c,_0x1da8da=new Set();_0x53fa51[_0x417304(0xb1)](_0x180ed0=>{const _0x22e38c=_0x417304;switch(_0x180ed0[_0x22e38c(0xee)]){case'add':{const _0x44e050=_0x180ed0[_0x22e38c(0xd7)]['personId'];_0x1da8da[_0x22e38c(0xe9)](_0x44e050);break;}}}),B(this['_injector'],_0x1da8da);}));}['_init'](){const _0x1c0794=_0x1c34b4;this[_0x1c0794(0xe0)](this['_commentService'][_0x1c0794(0xea)][_0x1c0794(0xc1)](async _0x1d6575=>{const _0x28c1d8=_0x1c0794;var _0x21c83a,_0x5a7a0e,_0x27c8bd,_0x231e68;const _0xbcaf36=(_0x21c83a=this['_threadCommentModel'][_0x28c1d8(0xdb)](_0x1d6575[_0x28c1d8(0xe6)])['find'](_0x30c597=>_0x30c597[_0x28c1d8(0xac)]===_0x1d6575['threadId']))==null?void 0x0:_0x21c83a[_0x28c1d8(0xa9)];if(!_0xbcaf36)return;const {unitId:_0x433173,subUnitId:_0x14d544}=_0xbcaf36;switch(_0x1d6575[_0x28c1d8(0xd9)]&&this[_0x28c1d8(0x9f)][_0x28c1d8(0xb8)](_0x1d6575['user']),_0x1d6575[_0x28c1d8(0xee)]){case v[_0x28c1d8(0xc7)]:break;case v[_0x28c1d8(0xf6)]:{this[_0x28c1d8(0xf7)][_0x28c1d8(0x9c)](_0x433173,_0x14d544,{'unitId':_0x433173,'subUnitId':_0x14d544,'ref':'','id':_0x1d6575['replyId'],'dT':y(+_0x1d6575[_0x28c1d8(0xb5)]),'threadId':_0x1d6575[_0x28c1d8(0xac)],'personId':(_0x27c8bd=(_0x5a7a0e=_0x1d6575[_0x28c1d8(0xd9)])==null?void 0x0:_0x5a7a0e[_0x28c1d8(0xaa)])!=null?_0x27c8bd:_0x1d6575[_0x28c1d8(0xdf)],'text':JSON[_0x28c1d8(0xbb)](_0x1d6575[_0x28c1d8(0xbc)]),'parentId':_0xbcaf36['id']});break;}case v[_0x28c1d8(0xd2)]:{const _0x57f950=this[_0x28c1d8(0xf7)][_0x28c1d8(0x99)](_0x433173,_0x14d544,_0x1d6575[_0x28c1d8(0xb3)]);_0x57f950&&_0x57f950[_0x28c1d8(0xf8)]&&this[_0x28c1d8(0xf7)]['deleteComment'](_0x433173,_0x14d544,_0x1d6575['replyId']);break;}case v[_0x28c1d8(0xc3)]:{this[_0x28c1d8(0xf7)]['updateComment'](_0x433173,_0x14d544,{'commentId':_0x1d6575[_0x28c1d8(0xb3)],'text':JSON[_0x28c1d8(0xbb)](_0x1d6575[_0x28c1d8(0xbc)])});break;}case v[_0x28c1d8(0xe4)]:{const _0x23e093=(_0x231e68=this[_0x28c1d8(0xf7)][_0x28c1d8(0xdb)](_0x1d6575[_0x28c1d8(0xe6)])['find'](_0x538698=>_0x538698[_0x28c1d8(0xac)]===_0x1d6575[_0x28c1d8(0xac)]))==null?void 0x0:_0x231e68['root'];_0x23e093&&this[_0x28c1d8(0xf7)][_0x28c1d8(0x9a)](_0x433173,_0x14d544,_0x23e093['id'],_0x1d6575['solved']===I[_0x28c1d8(0xd8)]);break;}}}));}};_=V([p(0x0,_0x41fa4c(_0x3e37de)),p(0x1,_0x41fa4c(_0x23170b)),p(0x2,_0x41fa4c(_0x2f71ad)),p(0x3,_0x41fa4c(_0x1b186a))],_);const z=_0x1c34b4(0xed),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x2e5830,_0x4da8f5,_0x4ca80a,_0xf7b790)=>{for(var _0x38fdbf=_0xf7b790>0x1?void 0x0:_0xf7b790?k(_0x4da8f5,_0x4ca80a):_0x4da8f5,_0x522fc5=_0x2e5830['length']-0x1,_0x4e686c;_0x522fc5>=0x0;_0x522fc5--)(_0x4e686c=_0x2e5830[_0x522fc5])&&(_0x38fdbf=_0x4e686c(_0x38fdbf)||_0x38fdbf);return _0x38fdbf;},b=(_0x2f5ff3,_0x813901)=>(_0x5a02ce,_0x28b3a1)=>_0x813901(_0x5a02ce,_0x28b3a1,_0x2f5ff3);function X(_0x3af0cb,_0x5946c0){const _0x31e527=_0x1c34b4,_0x5e8627=_0x3af0cb[_0x31e527(0xae)][0x0];return{..._0x5946c0,'id':_0x5e8627[_0x31e527(0xb3)],'resolved':_0x3af0cb[_0x31e527(0xa1)]===0x1,'dT':y(_0x5e8627[_0x31e527(0xb5)]),'personId':_0x5e8627['userId'],'threadId':_0x5e8627[_0x31e527(0xac)]};}function ee(_0x15b0be,_0x36b37b,_0x3bfa19){const _0xbe4942=_0x1c34b4;var _0x26f0a8,_0x3ed5e6;if(((_0x3ed5e6=(_0x26f0a8=_0x15b0be==null?void 0x0:_0x15b0be['replies'])==null?void 0x0:_0x26f0a8[_0xbe4942(0xa0)])!=null?_0x3ed5e6:0x0)>0x0){const _0x14c779=(_0x431a86,_0x51abc1)=>({'id':_0x431a86['replyId'],'threadId':_0x431a86[_0xbe4942(0xac)],'dT':y(_0x431a86[_0xbe4942(0xb5)]),'personId':_0x431a86['userId'],'resolved':_0x15b0be['solved']===I[_0xbe4942(0xd8)],'unitId':_0x36b37b,'subUnitId':_0x3bfa19,'text':JSON[_0xbe4942(0xbb)](_0x431a86[_0xbe4942(0xbc)]),'parentId':_0x51abc1}),_0x535dca=_0x14c779(_0x15b0be[_0xbe4942(0xae)][0x0]);return{..._0x535dca,'children':_0x15b0be['replies'][_0xbe4942(0xbf)](0x1)[_0xbe4942(0xf5)](_0x4490f3=>_0x14c779(_0x4490f3,_0x535dca['id']))};}return null;}let S=class{constructor(_0x356253,_0xc56a8a,_0xddd135){const _0x43f46d=_0x1c34b4;this[_0x43f46d(0xeb)]=_0x356253,this['_userService']=_0xc56a8a,this['_sessionService']=_0xddd135;}async[_0x1c34b4(0x9c)](_0xc25d40){const _0x1a1f33=_0x1c34b4;var _0x390c42,_0x116bdb;const {parentId:_0x321390,unitId:_0xfe3c0a,text:_0x5d7522,threadId:_0x3252a3}=_0xc25d40,_0x3039a5=(_0x116bdb=(_0x390c42=_0x5d7522[_0x1a1f33(0xb2)])==null?void 0x0:_0x390c42[_0x1a1f33(0x9b)](_0x299390=>_0x299390[_0x1a1f33(0xc0)]===_0x5731a5[_0x1a1f33(0xf2)])['map'](_0x2095eb=>_0x2095eb['rangeId']))!=null?_0x116bdb:[],_0x1a736d=JSON['stringify'](_0x5d7522),_0x3cdbbe=(await this[_0x1a1f33(0xf3)]['requireSession'](_0xfe3c0a))['getMemberID']();if(_0x321390){const _0x2e5a5e={'memberId':_0x3cdbbe,'unitId':_0xfe3c0a,'content':_0x1a736d,'mention':_0x3039a5,'threadId':_0x3252a3},_0x461d64=(await this[_0x1a1f33(0xeb)][_0x1a1f33(0xde)](_0x1a1f33(0xd1)+_0xfe3c0a+_0x1a1f33(0xe5),{'body':_0x2e5a5e}))[_0x1a1f33(0xb6)][_0x1a1f33(0xf4)];return{..._0xc25d40,'id':_0x461d64[_0x1a1f33(0xb3)],'dT':_0x19f761(+_0x461d64[_0x1a1f33(0xb5)])[_0x1a1f33(0xa3)](_0x1a1f33(0xb9)),'personId':_0x461d64[_0x1a1f33(0xdf)]};}else{const _0x3d27b2={'memberId':_0x3cdbbe,'unitId':_0xfe3c0a,'content':_0x1a736d,'mention':_0x3039a5},_0x59e74b=await this[_0x1a1f33(0xeb)][_0x1a1f33(0xde)](_0x1a1f33(0xd1)+_0xfe3c0a+'/add',{'body':_0x3d27b2});return X(_0x59e74b['body'][_0x1a1f33(0xe2)],_0xc25d40);}}async[_0x1c34b4(0xb4)](_0x2960b7){const _0x5c12a3=_0x1c34b4;var _0x3331b6,_0x5dfb69;const {text:_0x27e55f,unitId:_0x357de7}=_0x2960b7,_0x3ffd44=(_0x5dfb69=(_0x3331b6=_0x27e55f[_0x5c12a3(0xb2)])==null?void 0x0:_0x3331b6[_0x5c12a3(0x9b)](_0x4d77f1=>_0x4d77f1[_0x5c12a3(0xc0)]===_0x5731a5[_0x5c12a3(0xf2)])[_0x5c12a3(0xf5)](_0xb46bd1=>_0xb46bd1[_0x5c12a3(0x96)]))!=null?_0x5dfb69:[],_0x152999=JSON['stringify'](_0x27e55f),_0x56c7ee=_0x2960b7['threadId'],_0xe7aa12=_0x2960b7['id'],_0x524864={'memberId':(await this[_0x5c12a3(0xf3)]['requireSession'](_0x357de7))[_0x5c12a3(0xc2)](),'unitId':_0x357de7,'threadId':_0x56c7ee,'mention':_0x3ffd44,'content':_0x152999,'replyId':_0xe7aa12},_0x41144a=await this['_httpService']['post'](_0x5c12a3(0xd1)+_0x357de7+_0x5c12a3(0xd4),{'body':_0x524864});return!_0x41144a['body'][_0x5c12a3(0xd6)]||_0x41144a[_0x5c12a3(0xb6)]['error'][_0x5c12a3(0xe1)]===0x1;}async[_0x1c34b4(0x9a)](_0x1c8544){const _0x2018f2=_0x1c34b4,{unitId:_0x5b3bf1}=_0x1c8544,_0x448e18=_0x1c8544['threadId'],_0x5cbb2f={'memberId':this[_0x2018f2(0x9f)][_0x2018f2(0xba)]()[_0x2018f2(0xaa)],'unitId':_0x5b3bf1,'threadId':_0x448e18,'solved':_0x1c8544[_0x2018f2(0xcd)]?I[_0x2018f2(0xd8)]:I[_0x2018f2(0xa7)]},_0x579f09=await this[_0x2018f2(0xeb)][_0x2018f2(0xde)]('/universer-api/comment/unit/'+_0x5b3bf1+_0x2018f2(0xcf),{'body':_0x5cbb2f});return!_0x579f09[_0x2018f2(0xb6)][_0x2018f2(0xd6)]||_0x579f09['body'][_0x2018f2(0xd6)][_0x2018f2(0xe1)]===0x1;}async[_0x1c34b4(0xab)](_0x2af697,_0x2b163d,_0x347d83,_0x2a9759){const _0x5aefe3=_0x1c34b4,_0x1ec473={'memberId':(await this[_0x5aefe3(0xf3)][_0x5aefe3(0xc4)](_0x2af697))[_0x5aefe3(0xc2)](),'threadId':_0x347d83,'replyId':_0x2a9759,'unitId':_0x2af697},_0x480aaa=await this['_httpService'][_0x5aefe3(0xde)](_0x5aefe3(0xd1)+_0x2af697+_0x5aefe3(0xc5),{'body':_0x1ec473});return!_0x480aaa['body'][_0x5aefe3(0xd6)]||_0x480aaa[_0x5aefe3(0xb6)][_0x5aefe3(0xd6)][_0x5aefe3(0xe1)]===0x1;}async['listComments'](_0x21cb64,_0x7ce303,_0x434d81){const _0x46cac3=_0x1c34b4,_0x55af5e={'unitId':_0x21cb64,'threadId':_0x434d81},_0x3caa94=await this[_0x46cac3(0xeb)]['post']('/universer-api/comment/unit/'+_0x21cb64+_0x46cac3(0xfa),{'body':_0x55af5e}),_0x239096=_0x434d81['map'](_0x49eda8=>ee(_0x3caa94[_0x46cac3(0xb6)][_0x46cac3(0xad)][_0x49eda8],_0x21cb64,_0x7ce303))['filter'](Boolean);return Object['values'](_0x3caa94[_0x46cac3(0xb6)][_0x46cac3(0xce)])[_0x46cac3(0xb1)](_0x1e05e9=>{this['_userService']['addUser'](_0x1e05e9);}),_0x239096;}['saveCommentToSnapshot'](_0x3d5735){const _0x1ce58d=_0x1c34b4;return{'id':_0x3d5735['id'],'threadId':_0x3d5735[_0x1ce58d(0xac)],'ref':_0x3d5735[_0x1ce58d(0xaf)]};}};S=Q([b(0x0,_0x41fa4c(_0x10b3b5)),b(0x1,_0x41fa4c(_0x2f71ad)),b(0x2,_0x41fa4c(_0x23974e))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x3d8cc0,_0x33cf03,_0x5b208b,_0x5a1883)=>{const _0x436261=_0x1c34b4;for(var _0x55fc1e=_0x5a1883>0x1?void 0x0:_0x5a1883?re(_0x33cf03,_0x5b208b):_0x33cf03,_0x326b12=_0x3d8cc0[_0x436261(0xa0)]-0x1,_0x1dbdcf;_0x326b12>=0x0;_0x326b12--)(_0x1dbdcf=_0x3d8cc0[_0x326b12])&&(_0x55fc1e=_0x1dbdcf(_0x55fc1e)||_0x55fc1e);return _0x55fc1e;},M=(_0x35c161,_0x236e9a)=>(_0x135710,_0x360bba)=>_0x236e9a(_0x135710,_0x360bba,_0x35c161);let f=class extends _0x2e40cc{constructor(_0x2316f9,_0x432f2a){const _0x47e5d9=_0x1c34b4;super(),this[_0x47e5d9(0xef)]=_0x2316f9,this[_0x47e5d9(0xdd)]=_0x432f2a,this[_0x47e5d9(0x9e)]();}[_0x1c34b4(0x9e)](){const _0x39faf9=_0x1c34b4;this[_0x39faf9(0xef)][_0x39faf9(0xb7)]=this['_threadCommentDataSource'],this[_0x39faf9(0xef)][_0x39faf9(0x92)]=!0x1;}};function _0x5286(){const _0x535aea=['post','userId','disposeWithMe','code','comment','_configService','Solve','/reply','unitId','Unknown','defineProperty','add','commentUpdate$','_httpService','pipe','thread-comment-data-source.config','type','_threadCommentDataSourceService','onReady','14586KvdBKw','COMMENT','_sessionService','reply','map','Reply','_threadCommentModel','parentId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/list','syncUpdateMutationToColla','get','getUser','460zCXktb','rangeId','setConfig','_injector','getComment','resolveComment','filter','addComment','pluginName','_initDataSource','_userService','length','solved','/universer-api/user/list','format','onStarting','_commentService','31578426MaeSAH','OpenOrReOpen','8ptTual','root','userID','deleteComment','threadId','comments','replies','ref','_config','forEach','customRanges','replyId','updateComment','createTimestamp','body','dataSource','addUser','YYYY/MM/DD\x20HH:mm','getCurrentUser','parse','content','10025919OATpsI','2698059PleEVN','slice','rangeType','subscribe','getMemberID','Edit','requireSession','/delete','555178skjzRC','Add','UNIVER_UNKNOWN','10429570UizaNz','UNRECOGNIZED','1330364FSrNti','2SOLKqS','resolved','users','/solved','size','/universer-api/comment/unit/','Delete','getOwnPropertyDescriptor','/edit','_init','error','payload','Solved','user','9bRfzNA','getUnit','_initUserSync','_threadCommentDataSource'];_0x5286=function(){return _0x535aea;};return _0x5286();}f=te([M(0x0,_0x203f67),M(0x1,_0x41fa4c(S))],f);var se=Object[_0x1c34b4(0xe8)],oe=Object[_0x1c34b4(0xd3)],ne=(_0x479148,_0x205923,_0x5af1dc)=>_0x205923 in _0x479148?se(_0x479148,_0x205923,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5af1dc}):_0x479148[_0x205923]=_0x5af1dc,ie=(_0x5158f5,_0x8a7e57,_0xbf91e,_0x5d5283)=>{const _0x47a700=_0x1c34b4;for(var _0xdb5509=_0x5d5283>0x1?void 0x0:_0x5d5283?oe(_0x8a7e57,_0xbf91e):_0x8a7e57,_0x167591=_0x5158f5[_0x47a700(0xa0)]-0x1,_0xb58f10;_0x167591>=0x0;_0x167591--)(_0xb58f10=_0x5158f5[_0x167591])&&(_0xdb5509=_0xb58f10(_0xdb5509)||_0xdb5509);return _0xdb5509;},N=(_0x14d628,_0xdefea0)=>(_0x595296,_0x4a73e)=>_0xdefea0(_0x595296,_0x4a73e,_0x14d628),$=(_0x49c8a5,_0x59f453,_0x4ec82f)=>ne(_0x49c8a5,typeof _0x59f453!='symbol'?_0x59f453+'':_0x59f453,_0x4ec82f);let g=class extends _0xc50fea{constructor(_0x381075=O,_0x4a9a5f,_0xaa3c9d){const _0x16d9ad=_0x1c34b4;super(),this[_0x16d9ad(0xb0)]=_0x381075,this[_0x16d9ad(0x98)]=_0x4a9a5f,this[_0x16d9ad(0xe3)]=_0xaa3c9d;const {..._0xad2158}=_0x1d31f1({},O,this[_0x16d9ad(0xb0)]);this[_0x16d9ad(0xe3)][_0x16d9ad(0x97)](z,_0xad2158);}[_0x1c34b4(0xa4)](){const _0x598c3c=_0x1c34b4;[[S],[f],[_]][_0x598c3c(0xb1)](_0x14a8e6=>{const _0x49720e=_0x598c3c;this['_injector'][_0x49720e(0xe9)](_0x14a8e6);});}[_0x1c34b4(0xf0)](){const _0x4ccb00=_0x1c34b4;this['_injector'][_0x4ccb00(0x93)](f),this[_0x4ccb00(0x98)]['get'](_);}};function _0x5043(_0x2bcb00,_0x1020d6){const _0x52869b=_0x5286();return _0x5043=function(_0x5043ac,_0x588f5b){_0x5043ac=_0x5043ac-0x92;let _0x1137eb=_0x52869b[_0x5043ac];return _0x1137eb;},_0x5043(_0x2bcb00,_0x1020d6);}$(g,_0x1c34b4(0x9d),W),$(g,_0x1c34b4(0xee),_0x131887[_0x1c34b4(0xc8)]),g=ie([_0x59b602(_0x42d33a,_0x1d3f0e,_0x208ff5),N(0x1,_0x41fa4c(_0x1b186a)),N(0x2,_0x5d8e83)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x486ffb=_0x2815;(function(_0x4563c7,_0x1cca7b){const _0x31ac7c=_0x2815,_0x5c6bb5=_0x4563c7();while(!![]){try{const _0x10b8f5=parseInt(_0x31ac7c(0x18f))/0x1*(-parseInt(_0x31ac7c(0x19b))/0x2)+parseInt(_0x31ac7c(0x1b8))/0x3*(parseInt(_0x31ac7c(0x1bf))/0x4)+-parseInt(_0x31ac7c(0x1a8))/0x5*(-parseInt(_0x31ac7c(0x1b7))/0x6)+parseInt(_0x31ac7c(0x180))/0x7*(parseInt(_0x31ac7c(0x1aa))/0x8)+parseInt(_0x31ac7c(0x1b2))/0x9*(parseInt(_0x31ac7c(0x19f))/0xa)+-parseInt(_0x31ac7c(0x18d))/0xb*(parseInt(_0x31ac7c(0x1d1))/0xc)+parseInt(_0x31ac7c(0x1cb))/0xd*(parseInt(_0x31ac7c(0x1ac))/0xe);if(_0x10b8f5===_0x1cca7b)break;else _0x5c6bb5['push'](_0x5c6bb5['shift']());}catch(_0x5ad90f){_0x5c6bb5['push'](_0x5c6bb5['shift']());}}}(_0x3e06,0x3932c));import{CommentService as _0x1e5874,CollaborationSessionService as _0xd17a1d,UniverCollaborationClientPlugin as _0x1998af}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x2b2035}from'@univerjs-pro/license';import{dayjs as _0x15742b,UserManagerService as _0x3aacc4,Inject as _0x482f93,Injector as _0x4b0e42,Disposable as _0x2ad136,CustomRangeType as _0x3c700b,UniverInstanceType as _0x36f100,DependentOn as _0x2af10a,IConfigService as _0x4e5e6a,Plugin as _0x848ee9,merge as _0x558285}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x53556b}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x18fd51,IThreadCommentDataSourceService as _0x24134a}from'@univerjs/thread-comment';import{bufferTime as _0x1355f9}from'rxjs';import{HTTPService as _0x3392dc}from'@univerjs/network';const W=_0x486ffb(0x1c7);function _0x2815(_0x51144a,_0x54781d){const _0x3e0637=_0x3e06();return _0x2815=function(_0x281582,_0x472afc){_0x281582=_0x281582-0x16f;let _0x2eeab9=_0x3e0637[_0x281582];return _0x2eeab9;},_0x2815(_0x51144a,_0x54781d);}var I=(_0x397f43=>(_0x397f43[_0x397f43[_0x486ffb(0x194)]=0x0]=_0x486ffb(0x194),_0x397f43[_0x397f43[_0x486ffb(0x178)]=0x1]=_0x486ffb(0x178),_0x397f43[_0x397f43[_0x486ffb(0x1c3)]=-0x1]='UNRECOGNIZED',_0x397f43))(I||{}),v=(_0x503d37=>(_0x503d37[_0x503d37[_0x486ffb(0x1ba)]=0x0]=_0x486ffb(0x1ba),_0x503d37[_0x503d37[_0x486ffb(0x17e)]=0x1]=_0x486ffb(0x17e),_0x503d37[_0x503d37[_0x486ffb(0x1ca)]=0x2]=_0x486ffb(0x1ca),_0x503d37[_0x503d37[_0x486ffb(0x196)]=0x3]='Edit',_0x503d37[_0x503d37[_0x486ffb(0x1bc)]=0x4]=_0x486ffb(0x1bc),_0x503d37[_0x503d37[_0x486ffb(0x175)]=0x5]=_0x486ffb(0x175),_0x503d37[_0x503d37['UNRECOGNIZED']=-0x1]=_0x486ffb(0x1c3),_0x503d37))(v||{});function _0x3e06(){const _0x2053ff=['_threadCommentDataSource','body','_initUserSync','parse','onStarting','solved','getOwnPropertyDescriptor','Solve','resolveComment','/list','Solved','ref','getUser','deleteComment','UNIVER_UNKNOWN','/universer-api/user/list','Add','/reply','833wUQXPZ','length','replies','defineProperty','symbol','getMemberID','/universer-api/comment/unit/','COMMENT','user','userID','comments','map','syncUpdateMutationToColla','11HcNZED','get','107DZOKlO','format','_threadCommentDataSourceService','updateComment','threadId','OpenOrReOpen','root','Edit','resolved','type','replyId','subscribe','5030rHHLeU','comment','setConfig','/solved','10kjZAIz','rangeId','YYYY/MM/DD\x20HH:mm','userId','getUnit','_httpService','saveCommentToSnapshot','requireSession','_userService','45ANntfT','add','9784FgpnPM','stringify','1619492mkSpxR','disposeWithMe','customRanges','getCurrentUser','users','values','2010465ZnHsLK','code','/edit','pipe','unitId','70410gQaezg','1047BkDoVc','_injector','Unknown','createTimestamp','Delete','_threadCommentModel','personId','172YNmQjd','filter','_initDataSource','content','UNRECOGNIZED','rangeType','onReady','addUser','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','post','_configService','Reply','13AIYDeC','size','addComment','parentId','error','find','1221996AzIKef','forEach','getComment','pluginName','_commentService','_sessionService'];_0x3e06=function(){return _0x2053ff;};return _0x3e06();}const y=_0x5ced77=>_0x15742b(new Date(+_0x5ced77))[_0x486ffb(0x190)](_0x486ffb(0x1a1)),B=async(_0x1a700b,_0x450d82)=>{const _0x37aab1=_0x486ffb,_0xb6fcd4=_0x1a700b[_0x37aab1(0x18e)](_0x3aacc4),_0x4eaebd=_0x1a700b[_0x37aab1(0x18e)](_0x3392dc);_0x450d82['forEach'](_0x24dbac=>{const _0x3ef48e=_0x37aab1;_0xb6fcd4[_0x3ef48e(0x17a)](_0x24dbac)&&_0x450d82['delete'](_0x24dbac);}),_0x450d82[_0x37aab1(0x1cc)]&&(await _0x4eaebd['get'](_0x37aab1(0x17d),{'params':{'userIDs':[..._0x450d82]}}))['body'][_0x37aab1(0x1b0)]['forEach'](_0x9ec2eb=>{const _0x51ba2b=_0x37aab1;_0x9ec2eb&&_0xb6fcd4[_0x51ba2b(0x1c6)](_0x9ec2eb);});};var K=Object[_0x486ffb(0x174)],V=(_0x132b1f,_0x15bb25,_0x4aa2f2,_0x15912b)=>{const _0x2fd9a2=_0x486ffb;for(var _0x879095=_0x15912b>0x1?void 0x0:_0x15912b?K(_0x15bb25,_0x4aa2f2):_0x15bb25,_0x75028e=_0x132b1f[_0x2fd9a2(0x181)]-0x1,_0x1c227f;_0x75028e>=0x0;_0x75028e--)(_0x1c227f=_0x132b1f[_0x75028e])&&(_0x879095=_0x1c227f(_0x879095)||_0x879095);return _0x879095;},p=(_0x549ebb,_0x3cd74e)=>(_0x419c0f,_0x469dd6)=>_0x3cd74e(_0x419c0f,_0x469dd6,_0x549ebb);let _=class extends _0x2ad136{constructor(_0x305e2b,_0x2792ef,_0x3a0d6d,_0x55ffb2){const _0x2c0895=_0x486ffb;super(),this[_0x2c0895(0x1d5)]=_0x305e2b,this['_threadCommentModel']=_0x2792ef,this[_0x2c0895(0x1a7)]=_0x3a0d6d,this[_0x2c0895(0x1b9)]=_0x55ffb2,this['_init'](),this[_0x2c0895(0x170)]();}[_0x486ffb(0x170)](){const _0x1077ca=_0x486ffb;this[_0x1077ca(0x1ad)](this[_0x1077ca(0x1bd)]['commentUpdate$'][_0x1077ca(0x1b5)](_0x1355f9(0x10))['subscribe'](_0x2151ff=>{const _0x458774=_0x1077ca,_0x4389d8=new Set();_0x2151ff[_0x458774(0x1d2)](_0x44f906=>{const _0x12e811=_0x458774;switch(_0x44f906[_0x12e811(0x198)]){case _0x12e811(0x1a9):{const _0x38e751=_0x44f906['payload'][_0x12e811(0x1be)];_0x4389d8[_0x12e811(0x1a9)](_0x38e751);break;}}}),B(this[_0x458774(0x1b9)],_0x4389d8);}));}['_init'](){const _0x1bdf27=_0x486ffb;this[_0x1bdf27(0x1ad)](this[_0x1bdf27(0x1d5)]['commentUpdate$'][_0x1bdf27(0x19a)](async _0x823661=>{const _0x2c50e3=_0x1bdf27;var _0x4ff4ee,_0x2a8c4c,_0x50823e,_0x58b5ed;const _0x2c74b6=(_0x4ff4ee=this['_threadCommentModel'][_0x2c50e3(0x1a3)](_0x823661[_0x2c50e3(0x1b6)])[_0x2c50e3(0x1d0)](_0x94ff37=>_0x94ff37['threadId']===_0x823661[_0x2c50e3(0x193)]))==null?void 0x0:_0x4ff4ee[_0x2c50e3(0x195)];if(!_0x2c74b6)return;const {unitId:_0x1f1c30,subUnitId:_0xa77f18}=_0x2c74b6;switch(_0x823661['user']&&this[_0x2c50e3(0x1a7)][_0x2c50e3(0x1c6)](_0x823661[_0x2c50e3(0x188)]),_0x823661[_0x2c50e3(0x198)]){case v['Add']:break;case v['Reply']:{this[_0x2c50e3(0x1bd)]['addComment'](_0x1f1c30,_0xa77f18,{'unitId':_0x1f1c30,'subUnitId':_0xa77f18,'ref':'','id':_0x823661[_0x2c50e3(0x199)],'dT':y(+_0x823661[_0x2c50e3(0x1bb)]),'threadId':_0x823661['threadId'],'personId':(_0x50823e=(_0x2a8c4c=_0x823661[_0x2c50e3(0x188)])==null?void 0x0:_0x2a8c4c[_0x2c50e3(0x189)])!=null?_0x50823e:_0x823661[_0x2c50e3(0x1a2)],'text':JSON[_0x2c50e3(0x171)](_0x823661['content']),'parentId':_0x2c74b6['id']});break;}case v[_0x2c50e3(0x1bc)]:{const _0x4dc3c5=this['_threadCommentModel'][_0x2c50e3(0x1d3)](_0x1f1c30,_0xa77f18,_0x823661[_0x2c50e3(0x199)]);_0x4dc3c5&&_0x4dc3c5[_0x2c50e3(0x1ce)]&&this[_0x2c50e3(0x1bd)][_0x2c50e3(0x17b)](_0x1f1c30,_0xa77f18,_0x823661[_0x2c50e3(0x199)]);break;}case v[_0x2c50e3(0x196)]:{this[_0x2c50e3(0x1bd)][_0x2c50e3(0x192)](_0x1f1c30,_0xa77f18,{'commentId':_0x823661[_0x2c50e3(0x199)],'text':JSON[_0x2c50e3(0x171)](_0x823661[_0x2c50e3(0x1c2)])});break;}case v[_0x2c50e3(0x175)]:{const _0xf3abac=(_0x58b5ed=this[_0x2c50e3(0x1bd)]['getUnit'](_0x823661['unitId'])['find'](_0x4daa19=>_0x4daa19['threadId']===_0x823661[_0x2c50e3(0x193)]))==null?void 0x0:_0x58b5ed[_0x2c50e3(0x195)];_0xf3abac&&this[_0x2c50e3(0x1bd)][_0x2c50e3(0x176)](_0x1f1c30,_0xa77f18,_0xf3abac['id'],_0x823661[_0x2c50e3(0x173)]===I[_0x2c50e3(0x178)]);break;}}}));}};_=V([p(0x0,_0x482f93(_0x1e5874)),p(0x1,_0x482f93(_0x18fd51)),p(0x2,_0x482f93(_0x3aacc4)),p(0x3,_0x482f93(_0x4b0e42))],_);const z='thread-comment-data-source.config',O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x18cbb2,_0x8d0e85,_0xf9a8bb,_0x2e4fb0)=>{const _0x4f4034=_0x486ffb;for(var _0x193e65=_0x2e4fb0>0x1?void 0x0:_0x2e4fb0?k(_0x8d0e85,_0xf9a8bb):_0x8d0e85,_0x54696e=_0x18cbb2[_0x4f4034(0x181)]-0x1,_0x272866;_0x54696e>=0x0;_0x54696e--)(_0x272866=_0x18cbb2[_0x54696e])&&(_0x193e65=_0x272866(_0x193e65)||_0x193e65);return _0x193e65;},b=(_0x5b9a61,_0xcefecf)=>(_0x5a70f0,_0x48e822)=>_0xcefecf(_0x5a70f0,_0x48e822,_0x5b9a61);function X(_0xddea89,_0x206ec3){const _0x159940=_0x486ffb,_0x56efac=_0xddea89['replies'][0x0];return{..._0x206ec3,'id':_0x56efac[_0x159940(0x199)],'resolved':_0xddea89['solved']===0x1,'dT':y(_0x56efac[_0x159940(0x1bb)]),'personId':_0x56efac[_0x159940(0x1a2)],'threadId':_0x56efac['threadId']};}function ee(_0x33e2fd,_0x383d2e,_0x325be7){const _0x16e2c1=_0x486ffb;var _0xeca0ce,_0x39ad5a;if(((_0x39ad5a=(_0xeca0ce=_0x33e2fd==null?void 0x0:_0x33e2fd[_0x16e2c1(0x182)])==null?void 0x0:_0xeca0ce[_0x16e2c1(0x181)])!=null?_0x39ad5a:0x0)>0x0){const _0x4ea8c2=(_0x2f725a,_0x31b7e6)=>({'id':_0x2f725a[_0x16e2c1(0x199)],'threadId':_0x2f725a[_0x16e2c1(0x193)],'dT':y(_0x2f725a[_0x16e2c1(0x1bb)]),'personId':_0x2f725a[_0x16e2c1(0x1a2)],'resolved':_0x33e2fd[_0x16e2c1(0x173)]===I[_0x16e2c1(0x178)],'unitId':_0x383d2e,'subUnitId':_0x325be7,'text':JSON['parse'](_0x2f725a[_0x16e2c1(0x1c2)]),'parentId':_0x31b7e6}),_0x345988=_0x4ea8c2(_0x33e2fd[_0x16e2c1(0x182)][0x0]);return{..._0x345988,'children':_0x33e2fd[_0x16e2c1(0x182)]['slice'](0x1)[_0x16e2c1(0x18b)](_0x3b9ef7=>_0x4ea8c2(_0x3b9ef7,_0x345988['id']))};}return null;}let S=class{constructor(_0x366091,_0x2a5b7d,_0x12d3c1){const _0x10655c=_0x486ffb;this[_0x10655c(0x1a4)]=_0x366091,this[_0x10655c(0x1a7)]=_0x2a5b7d,this[_0x10655c(0x1d6)]=_0x12d3c1;}async[_0x486ffb(0x1cd)](_0x249887){const _0x215b63=_0x486ffb;var _0x10abd7,_0xbdb248;const {parentId:_0x32f1c1,unitId:_0x54fbc0,text:_0x1e7943,threadId:_0x4f481f}=_0x249887,_0x244263=(_0xbdb248=(_0x10abd7=_0x1e7943[_0x215b63(0x1ae)])==null?void 0x0:_0x10abd7[_0x215b63(0x1c0)](_0x3c44ff=>_0x3c44ff[_0x215b63(0x1c4)]===_0x3c700b[_0x215b63(0x187)])[_0x215b63(0x18b)](_0x53cf83=>_0x53cf83[_0x215b63(0x1a0)]))!=null?_0xbdb248:[],_0x2a0d22=JSON['stringify'](_0x1e7943),_0x4715d4=(await this[_0x215b63(0x1d6)][_0x215b63(0x1a6)](_0x54fbc0))['getMemberID']();if(_0x32f1c1){const _0x1c44f7={'memberId':_0x4715d4,'unitId':_0x54fbc0,'content':_0x2a0d22,'mention':_0x244263,'threadId':_0x4f481f},_0x1f939b=(await this[_0x215b63(0x1a4)]['post']('/universer-api/comment/unit/'+_0x54fbc0+_0x215b63(0x17f),{'body':_0x1c44f7}))[_0x215b63(0x16f)]['reply'];return{..._0x249887,'id':_0x1f939b['replyId'],'dT':_0x15742b(+_0x1f939b[_0x215b63(0x1bb)])[_0x215b63(0x190)](_0x215b63(0x1a1)),'personId':_0x1f939b[_0x215b63(0x1a2)]};}else{const _0x1d41f9={'memberId':_0x4715d4,'unitId':_0x54fbc0,'content':_0x2a0d22,'mention':_0x244263},_0x1ca483=await this['_httpService']['post'](_0x215b63(0x186)+_0x54fbc0+'/add',{'body':_0x1d41f9});return X(_0x1ca483[_0x215b63(0x16f)][_0x215b63(0x19c)],_0x249887);}}async[_0x486ffb(0x192)](_0x4be5db){const _0x5962f4=_0x486ffb;var _0x4a962b,_0x29e334;const {text:_0x149d9f,unitId:_0x3ec656}=_0x4be5db,_0x505b2d=(_0x29e334=(_0x4a962b=_0x149d9f[_0x5962f4(0x1ae)])==null?void 0x0:_0x4a962b[_0x5962f4(0x1c0)](_0x509995=>_0x509995[_0x5962f4(0x1c4)]===_0x3c700b[_0x5962f4(0x187)])[_0x5962f4(0x18b)](_0x5f43ce=>_0x5f43ce['rangeId']))!=null?_0x29e334:[],_0x148662=JSON[_0x5962f4(0x1ab)](_0x149d9f),_0x24fade=_0x4be5db[_0x5962f4(0x193)],_0x4d9bec=_0x4be5db['id'],_0x53d037={'memberId':(await this[_0x5962f4(0x1d6)][_0x5962f4(0x1a6)](_0x3ec656))[_0x5962f4(0x185)](),'unitId':_0x3ec656,'threadId':_0x24fade,'mention':_0x505b2d,'content':_0x148662,'replyId':_0x4d9bec},_0x5087f6=await this[_0x5962f4(0x1a4)][_0x5962f4(0x1c8)](_0x5962f4(0x186)+_0x3ec656+_0x5962f4(0x1b4),{'body':_0x53d037});return!_0x5087f6['body'][_0x5962f4(0x1cf)]||_0x5087f6[_0x5962f4(0x16f)]['error'][_0x5962f4(0x1b3)]===0x1;}async[_0x486ffb(0x176)](_0x4deb3c){const _0x1f5bf5=_0x486ffb,{unitId:_0x34b529}=_0x4deb3c,_0x5519a3=_0x4deb3c[_0x1f5bf5(0x193)],_0x56b828={'memberId':this[_0x1f5bf5(0x1a7)][_0x1f5bf5(0x1af)]()['userID'],'unitId':_0x34b529,'threadId':_0x5519a3,'solved':_0x4deb3c[_0x1f5bf5(0x197)]?I[_0x1f5bf5(0x178)]:I['OpenOrReOpen']},_0x2a3abf=await this[_0x1f5bf5(0x1a4)][_0x1f5bf5(0x1c8)](_0x1f5bf5(0x186)+_0x34b529+_0x1f5bf5(0x19e),{'body':_0x56b828});return!_0x2a3abf[_0x1f5bf5(0x16f)][_0x1f5bf5(0x1cf)]||_0x2a3abf[_0x1f5bf5(0x16f)][_0x1f5bf5(0x1cf)][_0x1f5bf5(0x1b3)]===0x1;}async[_0x486ffb(0x17b)](_0x33b385,_0x2d4477,_0x5277dd,_0x496503){const _0x5d6144=_0x486ffb,_0x36eda9={'memberId':(await this[_0x5d6144(0x1d6)]['requireSession'](_0x33b385))['getMemberID'](),'threadId':_0x5277dd,'replyId':_0x496503,'unitId':_0x33b385},_0x5a2d44=await this[_0x5d6144(0x1a4)]['post'](_0x5d6144(0x186)+_0x33b385+'/delete',{'body':_0x36eda9});return!_0x5a2d44[_0x5d6144(0x16f)]['error']||_0x5a2d44[_0x5d6144(0x16f)][_0x5d6144(0x1cf)][_0x5d6144(0x1b3)]===0x1;}async['listComments'](_0x3aa5dc,_0x2ebc15,_0x321d00){const _0x30bae3=_0x486ffb,_0x210336={'unitId':_0x3aa5dc,'threadId':_0x321d00},_0x4f598f=await this[_0x30bae3(0x1a4)][_0x30bae3(0x1c8)](_0x30bae3(0x186)+_0x3aa5dc+_0x30bae3(0x177),{'body':_0x210336}),_0x45be17=_0x321d00[_0x30bae3(0x18b)](_0x5cd6ff=>ee(_0x4f598f[_0x30bae3(0x16f)][_0x30bae3(0x18a)][_0x5cd6ff],_0x3aa5dc,_0x2ebc15))['filter'](Boolean);return Object[_0x30bae3(0x1b1)](_0x4f598f['body'][_0x30bae3(0x1b0)])[_0x30bae3(0x1d2)](_0x464403=>{const _0x18c33f=_0x30bae3;this['_userService'][_0x18c33f(0x1c6)](_0x464403);}),_0x45be17;}[_0x486ffb(0x1a5)](_0x382e76){const _0x11c7a4=_0x486ffb;return{'id':_0x382e76['id'],'threadId':_0x382e76[_0x11c7a4(0x193)],'ref':_0x382e76[_0x11c7a4(0x179)]};}};S=Q([b(0x0,_0x482f93(_0x3392dc)),b(0x1,_0x482f93(_0x3aacc4)),b(0x2,_0x482f93(_0xd17a1d))],S);var re=Object[_0x486ffb(0x174)],te=(_0x55ccb9,_0x566512,_0x2d7d11,_0x504518)=>{const _0x1356e8=_0x486ffb;for(var _0x5e3734=_0x504518>0x1?void 0x0:_0x504518?re(_0x566512,_0x2d7d11):_0x566512,_0xad20fd=_0x55ccb9[_0x1356e8(0x181)]-0x1,_0x5e7b4e;_0xad20fd>=0x0;_0xad20fd--)(_0x5e7b4e=_0x55ccb9[_0xad20fd])&&(_0x5e3734=_0x5e7b4e(_0x5e3734)||_0x5e3734);return _0x5e3734;},M=(_0x593d09,_0x92e988)=>(_0x34f8b6,_0x34bef8)=>_0x92e988(_0x34f8b6,_0x34bef8,_0x593d09);let f=class extends _0x2ad136{constructor(_0x36325c,_0x499851){const _0x85d66f=_0x486ffb;super(),this[_0x85d66f(0x191)]=_0x36325c,this[_0x85d66f(0x1d7)]=_0x499851,this['_initDataSource']();}[_0x486ffb(0x1c1)](){const _0x4a78ca=_0x486ffb;this[_0x4a78ca(0x191)]['dataSource']=this[_0x4a78ca(0x1d7)],this[_0x4a78ca(0x191)][_0x4a78ca(0x18c)]=!0x1;}};f=te([M(0x0,_0x24134a),M(0x1,_0x482f93(S))],f);var se=Object[_0x486ffb(0x183)],oe=Object[_0x486ffb(0x174)],ne=(_0x43e484,_0x554af3,_0x4da8d5)=>_0x554af3 in _0x43e484?se(_0x43e484,_0x554af3,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4da8d5}):_0x43e484[_0x554af3]=_0x4da8d5,ie=(_0x29004e,_0x459384,_0x2d8c3b,_0x1450dd)=>{const _0x55379c=_0x486ffb;for(var _0x42a8d9=_0x1450dd>0x1?void 0x0:_0x1450dd?oe(_0x459384,_0x2d8c3b):_0x459384,_0x1226c3=_0x29004e[_0x55379c(0x181)]-0x1,_0x46e74d;_0x1226c3>=0x0;_0x1226c3--)(_0x46e74d=_0x29004e[_0x1226c3])&&(_0x42a8d9=_0x46e74d(_0x42a8d9)||_0x42a8d9);return _0x42a8d9;},N=(_0x587b0f,_0x491874)=>(_0x14a516,_0x46f24b)=>_0x491874(_0x14a516,_0x46f24b,_0x587b0f),$=(_0x2d702b,_0xa1fd09,_0x476d54)=>ne(_0x2d702b,typeof _0xa1fd09!=_0x486ffb(0x184)?_0xa1fd09+'':_0xa1fd09,_0x476d54);let g=class extends _0x848ee9{constructor(_0xfebba2=O,_0x154565,_0x879283){const _0x35d77e=_0x486ffb;super(),this['_config']=_0xfebba2,this[_0x35d77e(0x1b9)]=_0x154565,this[_0x35d77e(0x1c9)]=_0x879283;const {..._0x3c20be}=_0x558285({},O,this['_config']);this[_0x35d77e(0x1c9)][_0x35d77e(0x19d)](z,_0x3c20be);}[_0x486ffb(0x172)](){const _0x1b6491=_0x486ffb;[[S],[f],[_]][_0x1b6491(0x1d2)](_0x598de5=>{const _0x2b010f=_0x1b6491;this[_0x2b010f(0x1b9)][_0x2b010f(0x1a9)](_0x598de5);});}[_0x486ffb(0x1c5)](){const _0x497ff2=_0x486ffb;this[_0x497ff2(0x1b9)][_0x497ff2(0x18e)](f),this[_0x497ff2(0x1b9)][_0x497ff2(0x18e)](_);}};$(g,_0x486ffb(0x1d4),W),$(g,'type',_0x36f100[_0x486ffb(0x17c)]),g=ie([_0x2af10a(_0x53556b,_0x1998af,_0x2b2035),N(0x1,_0x482f93(_0x4b0e42)),N(0x2,_0x4e5e6a)],g);export{g as UniverThreadCommentDataSourcePlugin};
1
+ const _0x1c34b4=_0x5043;(function(_0x1720da,_0x364ed1){const _0x4f9116=_0x5043,_0x411c7b=_0x1720da();while(!![]){try{const _0x508edb=parseInt(_0x4f9116(0xcc))/0x1*(-parseInt(_0x4f9116(0xc6))/0x2)+-parseInt(_0x4f9116(0xda))/0x3*(parseInt(_0x4f9116(0xcb))/0x4)+-parseInt(_0x4f9116(0x95))/0x5*(parseInt(_0x4f9116(0xf1))/0x6)+parseInt(_0x4f9116(0xbe))/0x7*(-parseInt(_0x4f9116(0xa8))/0x8)+parseInt(_0x4f9116(0xbd))/0x9+-parseInt(_0x4f9116(0xc9))/0xa+parseInt(_0x4f9116(0xa6))/0xb;if(_0x508edb===_0x364ed1)break;else _0x411c7b['push'](_0x411c7b['shift']());}catch(_0x7f4ab){_0x411c7b['push'](_0x411c7b['shift']());}}}(_0x5286,0xbe5f0));import{CommentService as _0x3e37de,CollaborationSessionService as _0x23974e,UniverCollaborationClientPlugin as _0x1d3f0e}from'@univerjs-pro/collaboration-client';import{UniverLicensePlugin as _0x208ff5}from'@univerjs-pro/license';import{dayjs as _0x19f761,UserManagerService as _0x2f71ad,Inject as _0x41fa4c,Injector as _0x1b186a,Disposable as _0x2e40cc,CustomRangeType as _0x5731a5,UniverInstanceType as _0x131887,DependentOn as _0x59b602,IConfigService as _0x5d8e83,Plugin as _0xc50fea,merge as _0x1d31f1}from'@univerjs/core';import{UniverThreadCommentUIPlugin as _0x42d33a}from'@univerjs/thread-comment-ui';import{ThreadCommentModel as _0x23170b,IThreadCommentDataSourceService as _0x203f67}from'@univerjs/thread-comment';import{bufferTime as _0x5da853}from'rxjs';import{HTTPService as _0x10b3b5}from'@univerjs/network';const W=_0x1c34b4(0xf9);var I=(_0x53d659=>(_0x53d659[_0x53d659[_0x1c34b4(0xa7)]=0x0]='OpenOrReOpen',_0x53d659[_0x53d659[_0x1c34b4(0xd8)]=0x1]='Solved',_0x53d659[_0x53d659[_0x1c34b4(0xca)]=-0x1]=_0x1c34b4(0xca),_0x53d659))(I||{}),v=(_0x6802d9=>(_0x6802d9[_0x6802d9[_0x1c34b4(0xe7)]=0x0]='Unknown',_0x6802d9[_0x6802d9[_0x1c34b4(0xc7)]=0x1]=_0x1c34b4(0xc7),_0x6802d9[_0x6802d9[_0x1c34b4(0xf6)]=0x2]=_0x1c34b4(0xf6),_0x6802d9[_0x6802d9[_0x1c34b4(0xc3)]=0x3]='Edit',_0x6802d9[_0x6802d9[_0x1c34b4(0xd2)]=0x4]=_0x1c34b4(0xd2),_0x6802d9[_0x6802d9[_0x1c34b4(0xe4)]=0x5]=_0x1c34b4(0xe4),_0x6802d9[_0x6802d9[_0x1c34b4(0xca)]=-0x1]=_0x1c34b4(0xca),_0x6802d9))(v||{});const y=_0x3af722=>_0x19f761(new Date(+_0x3af722))[_0x1c34b4(0xa3)]('YYYY/MM/DD\x20HH:mm'),B=async(_0x4604d1,_0x13318e)=>{const _0x3a7b94=_0x1c34b4,_0x275772=_0x4604d1[_0x3a7b94(0x93)](_0x2f71ad),_0x309e8a=_0x4604d1[_0x3a7b94(0x93)](_0x10b3b5);_0x13318e[_0x3a7b94(0xb1)](_0x2efe10=>{const _0x1dea5c=_0x3a7b94;_0x275772[_0x1dea5c(0x94)](_0x2efe10)&&_0x13318e['delete'](_0x2efe10);}),_0x13318e[_0x3a7b94(0xd0)]&&(await _0x309e8a[_0x3a7b94(0x93)](_0x3a7b94(0xa2),{'params':{'userIDs':[..._0x13318e]}}))[_0x3a7b94(0xb6)][_0x3a7b94(0xce)][_0x3a7b94(0xb1)](_0x831b47=>{_0x831b47&&_0x275772['addUser'](_0x831b47);});};var K=Object[_0x1c34b4(0xd3)],V=(_0x533458,_0x3f6bc6,_0x406ce9,_0x540d5f)=>{const _0x585639=_0x1c34b4;for(var _0x44f0ee=_0x540d5f>0x1?void 0x0:_0x540d5f?K(_0x3f6bc6,_0x406ce9):_0x3f6bc6,_0x17f85d=_0x533458[_0x585639(0xa0)]-0x1,_0x36775d;_0x17f85d>=0x0;_0x17f85d--)(_0x36775d=_0x533458[_0x17f85d])&&(_0x44f0ee=_0x36775d(_0x44f0ee)||_0x44f0ee);return _0x44f0ee;},p=(_0x47b9e1,_0x234bdb)=>(_0x27f3d0,_0x2358d4)=>_0x234bdb(_0x27f3d0,_0x2358d4,_0x47b9e1);let _=class extends _0x2e40cc{constructor(_0x380194,_0x4dd087,_0x4dca2e,_0x46d2f8){const _0x23b4a2=_0x1c34b4;super(),this[_0x23b4a2(0xa5)]=_0x380194,this[_0x23b4a2(0xf7)]=_0x4dd087,this[_0x23b4a2(0x9f)]=_0x4dca2e,this[_0x23b4a2(0x98)]=_0x46d2f8,this[_0x23b4a2(0xd5)](),this['_initUserSync']();}[_0x1c34b4(0xdc)](){const _0x3bbb8c=_0x1c34b4;this[_0x3bbb8c(0xe0)](this[_0x3bbb8c(0xf7)][_0x3bbb8c(0xea)][_0x3bbb8c(0xec)](_0x5da853(0x10))['subscribe'](_0x53fa51=>{const _0x417304=_0x3bbb8c,_0x1da8da=new Set();_0x53fa51[_0x417304(0xb1)](_0x180ed0=>{const _0x22e38c=_0x417304;switch(_0x180ed0[_0x22e38c(0xee)]){case'add':{const _0x44e050=_0x180ed0[_0x22e38c(0xd7)]['personId'];_0x1da8da[_0x22e38c(0xe9)](_0x44e050);break;}}}),B(this['_injector'],_0x1da8da);}));}['_init'](){const _0x1c0794=_0x1c34b4;this[_0x1c0794(0xe0)](this['_commentService'][_0x1c0794(0xea)][_0x1c0794(0xc1)](async _0x1d6575=>{const _0x28c1d8=_0x1c0794;var _0x21c83a,_0x5a7a0e,_0x27c8bd,_0x231e68;const _0xbcaf36=(_0x21c83a=this['_threadCommentModel'][_0x28c1d8(0xdb)](_0x1d6575[_0x28c1d8(0xe6)])['find'](_0x30c597=>_0x30c597[_0x28c1d8(0xac)]===_0x1d6575['threadId']))==null?void 0x0:_0x21c83a[_0x28c1d8(0xa9)];if(!_0xbcaf36)return;const {unitId:_0x433173,subUnitId:_0x14d544}=_0xbcaf36;switch(_0x1d6575[_0x28c1d8(0xd9)]&&this[_0x28c1d8(0x9f)][_0x28c1d8(0xb8)](_0x1d6575['user']),_0x1d6575[_0x28c1d8(0xee)]){case v[_0x28c1d8(0xc7)]:break;case v[_0x28c1d8(0xf6)]:{this[_0x28c1d8(0xf7)][_0x28c1d8(0x9c)](_0x433173,_0x14d544,{'unitId':_0x433173,'subUnitId':_0x14d544,'ref':'','id':_0x1d6575['replyId'],'dT':y(+_0x1d6575[_0x28c1d8(0xb5)]),'threadId':_0x1d6575[_0x28c1d8(0xac)],'personId':(_0x27c8bd=(_0x5a7a0e=_0x1d6575[_0x28c1d8(0xd9)])==null?void 0x0:_0x5a7a0e[_0x28c1d8(0xaa)])!=null?_0x27c8bd:_0x1d6575[_0x28c1d8(0xdf)],'text':JSON[_0x28c1d8(0xbb)](_0x1d6575[_0x28c1d8(0xbc)]),'parentId':_0xbcaf36['id']});break;}case v[_0x28c1d8(0xd2)]:{const _0x57f950=this[_0x28c1d8(0xf7)][_0x28c1d8(0x99)](_0x433173,_0x14d544,_0x1d6575[_0x28c1d8(0xb3)]);_0x57f950&&_0x57f950[_0x28c1d8(0xf8)]&&this[_0x28c1d8(0xf7)]['deleteComment'](_0x433173,_0x14d544,_0x1d6575['replyId']);break;}case v[_0x28c1d8(0xc3)]:{this[_0x28c1d8(0xf7)]['updateComment'](_0x433173,_0x14d544,{'commentId':_0x1d6575[_0x28c1d8(0xb3)],'text':JSON[_0x28c1d8(0xbb)](_0x1d6575[_0x28c1d8(0xbc)])});break;}case v[_0x28c1d8(0xe4)]:{const _0x23e093=(_0x231e68=this[_0x28c1d8(0xf7)][_0x28c1d8(0xdb)](_0x1d6575[_0x28c1d8(0xe6)])['find'](_0x538698=>_0x538698[_0x28c1d8(0xac)]===_0x1d6575[_0x28c1d8(0xac)]))==null?void 0x0:_0x231e68['root'];_0x23e093&&this[_0x28c1d8(0xf7)][_0x28c1d8(0x9a)](_0x433173,_0x14d544,_0x23e093['id'],_0x1d6575['solved']===I[_0x28c1d8(0xd8)]);break;}}}));}};_=V([p(0x0,_0x41fa4c(_0x3e37de)),p(0x1,_0x41fa4c(_0x23170b)),p(0x2,_0x41fa4c(_0x2f71ad)),p(0x3,_0x41fa4c(_0x1b186a))],_);const z=_0x1c34b4(0xed),O={};var k=Object['getOwnPropertyDescriptor'],Q=(_0x2e5830,_0x4da8f5,_0x4ca80a,_0xf7b790)=>{for(var _0x38fdbf=_0xf7b790>0x1?void 0x0:_0xf7b790?k(_0x4da8f5,_0x4ca80a):_0x4da8f5,_0x522fc5=_0x2e5830['length']-0x1,_0x4e686c;_0x522fc5>=0x0;_0x522fc5--)(_0x4e686c=_0x2e5830[_0x522fc5])&&(_0x38fdbf=_0x4e686c(_0x38fdbf)||_0x38fdbf);return _0x38fdbf;},b=(_0x2f5ff3,_0x813901)=>(_0x5a02ce,_0x28b3a1)=>_0x813901(_0x5a02ce,_0x28b3a1,_0x2f5ff3);function X(_0x3af0cb,_0x5946c0){const _0x31e527=_0x1c34b4,_0x5e8627=_0x3af0cb[_0x31e527(0xae)][0x0];return{..._0x5946c0,'id':_0x5e8627[_0x31e527(0xb3)],'resolved':_0x3af0cb[_0x31e527(0xa1)]===0x1,'dT':y(_0x5e8627[_0x31e527(0xb5)]),'personId':_0x5e8627['userId'],'threadId':_0x5e8627[_0x31e527(0xac)]};}function ee(_0x15b0be,_0x36b37b,_0x3bfa19){const _0xbe4942=_0x1c34b4;var _0x26f0a8,_0x3ed5e6;if(((_0x3ed5e6=(_0x26f0a8=_0x15b0be==null?void 0x0:_0x15b0be['replies'])==null?void 0x0:_0x26f0a8[_0xbe4942(0xa0)])!=null?_0x3ed5e6:0x0)>0x0){const _0x14c779=(_0x431a86,_0x51abc1)=>({'id':_0x431a86['replyId'],'threadId':_0x431a86[_0xbe4942(0xac)],'dT':y(_0x431a86[_0xbe4942(0xb5)]),'personId':_0x431a86['userId'],'resolved':_0x15b0be['solved']===I[_0xbe4942(0xd8)],'unitId':_0x36b37b,'subUnitId':_0x3bfa19,'text':JSON[_0xbe4942(0xbb)](_0x431a86[_0xbe4942(0xbc)]),'parentId':_0x51abc1}),_0x535dca=_0x14c779(_0x15b0be[_0xbe4942(0xae)][0x0]);return{..._0x535dca,'children':_0x15b0be['replies'][_0xbe4942(0xbf)](0x1)[_0xbe4942(0xf5)](_0x4490f3=>_0x14c779(_0x4490f3,_0x535dca['id']))};}return null;}let S=class{constructor(_0x356253,_0xc56a8a,_0xddd135){const _0x43f46d=_0x1c34b4;this[_0x43f46d(0xeb)]=_0x356253,this['_userService']=_0xc56a8a,this['_sessionService']=_0xddd135;}async[_0x1c34b4(0x9c)](_0xc25d40){const _0x1a1f33=_0x1c34b4;var _0x390c42,_0x116bdb;const {parentId:_0x321390,unitId:_0xfe3c0a,text:_0x5d7522,threadId:_0x3252a3}=_0xc25d40,_0x3039a5=(_0x116bdb=(_0x390c42=_0x5d7522[_0x1a1f33(0xb2)])==null?void 0x0:_0x390c42[_0x1a1f33(0x9b)](_0x299390=>_0x299390[_0x1a1f33(0xc0)]===_0x5731a5[_0x1a1f33(0xf2)])['map'](_0x2095eb=>_0x2095eb['rangeId']))!=null?_0x116bdb:[],_0x1a736d=JSON['stringify'](_0x5d7522),_0x3cdbbe=(await this[_0x1a1f33(0xf3)]['requireSession'](_0xfe3c0a))['getMemberID']();if(_0x321390){const _0x2e5a5e={'memberId':_0x3cdbbe,'unitId':_0xfe3c0a,'content':_0x1a736d,'mention':_0x3039a5,'threadId':_0x3252a3},_0x461d64=(await this[_0x1a1f33(0xeb)][_0x1a1f33(0xde)](_0x1a1f33(0xd1)+_0xfe3c0a+_0x1a1f33(0xe5),{'body':_0x2e5a5e}))[_0x1a1f33(0xb6)][_0x1a1f33(0xf4)];return{..._0xc25d40,'id':_0x461d64[_0x1a1f33(0xb3)],'dT':_0x19f761(+_0x461d64[_0x1a1f33(0xb5)])[_0x1a1f33(0xa3)](_0x1a1f33(0xb9)),'personId':_0x461d64[_0x1a1f33(0xdf)]};}else{const _0x3d27b2={'memberId':_0x3cdbbe,'unitId':_0xfe3c0a,'content':_0x1a736d,'mention':_0x3039a5},_0x59e74b=await this[_0x1a1f33(0xeb)][_0x1a1f33(0xde)](_0x1a1f33(0xd1)+_0xfe3c0a+'/add',{'body':_0x3d27b2});return X(_0x59e74b['body'][_0x1a1f33(0xe2)],_0xc25d40);}}async[_0x1c34b4(0xb4)](_0x2960b7){const _0x5c12a3=_0x1c34b4;var _0x3331b6,_0x5dfb69;const {text:_0x27e55f,unitId:_0x357de7}=_0x2960b7,_0x3ffd44=(_0x5dfb69=(_0x3331b6=_0x27e55f[_0x5c12a3(0xb2)])==null?void 0x0:_0x3331b6[_0x5c12a3(0x9b)](_0x4d77f1=>_0x4d77f1[_0x5c12a3(0xc0)]===_0x5731a5[_0x5c12a3(0xf2)])[_0x5c12a3(0xf5)](_0xb46bd1=>_0xb46bd1[_0x5c12a3(0x96)]))!=null?_0x5dfb69:[],_0x152999=JSON['stringify'](_0x27e55f),_0x56c7ee=_0x2960b7['threadId'],_0xe7aa12=_0x2960b7['id'],_0x524864={'memberId':(await this[_0x5c12a3(0xf3)]['requireSession'](_0x357de7))[_0x5c12a3(0xc2)](),'unitId':_0x357de7,'threadId':_0x56c7ee,'mention':_0x3ffd44,'content':_0x152999,'replyId':_0xe7aa12},_0x41144a=await this['_httpService']['post'](_0x5c12a3(0xd1)+_0x357de7+_0x5c12a3(0xd4),{'body':_0x524864});return!_0x41144a['body'][_0x5c12a3(0xd6)]||_0x41144a[_0x5c12a3(0xb6)]['error'][_0x5c12a3(0xe1)]===0x1;}async[_0x1c34b4(0x9a)](_0x1c8544){const _0x2018f2=_0x1c34b4,{unitId:_0x5b3bf1}=_0x1c8544,_0x448e18=_0x1c8544['threadId'],_0x5cbb2f={'memberId':this[_0x2018f2(0x9f)][_0x2018f2(0xba)]()[_0x2018f2(0xaa)],'unitId':_0x5b3bf1,'threadId':_0x448e18,'solved':_0x1c8544[_0x2018f2(0xcd)]?I[_0x2018f2(0xd8)]:I[_0x2018f2(0xa7)]},_0x579f09=await this[_0x2018f2(0xeb)][_0x2018f2(0xde)]('/universer-api/comment/unit/'+_0x5b3bf1+_0x2018f2(0xcf),{'body':_0x5cbb2f});return!_0x579f09[_0x2018f2(0xb6)][_0x2018f2(0xd6)]||_0x579f09['body'][_0x2018f2(0xd6)][_0x2018f2(0xe1)]===0x1;}async[_0x1c34b4(0xab)](_0x2af697,_0x2b163d,_0x347d83,_0x2a9759){const _0x5aefe3=_0x1c34b4,_0x1ec473={'memberId':(await this[_0x5aefe3(0xf3)][_0x5aefe3(0xc4)](_0x2af697))[_0x5aefe3(0xc2)](),'threadId':_0x347d83,'replyId':_0x2a9759,'unitId':_0x2af697},_0x480aaa=await this['_httpService'][_0x5aefe3(0xde)](_0x5aefe3(0xd1)+_0x2af697+_0x5aefe3(0xc5),{'body':_0x1ec473});return!_0x480aaa['body'][_0x5aefe3(0xd6)]||_0x480aaa[_0x5aefe3(0xb6)][_0x5aefe3(0xd6)][_0x5aefe3(0xe1)]===0x1;}async['listComments'](_0x21cb64,_0x7ce303,_0x434d81){const _0x46cac3=_0x1c34b4,_0x55af5e={'unitId':_0x21cb64,'threadId':_0x434d81},_0x3caa94=await this[_0x46cac3(0xeb)]['post']('/universer-api/comment/unit/'+_0x21cb64+_0x46cac3(0xfa),{'body':_0x55af5e}),_0x239096=_0x434d81['map'](_0x49eda8=>ee(_0x3caa94[_0x46cac3(0xb6)][_0x46cac3(0xad)][_0x49eda8],_0x21cb64,_0x7ce303))['filter'](Boolean);return Object['values'](_0x3caa94[_0x46cac3(0xb6)][_0x46cac3(0xce)])[_0x46cac3(0xb1)](_0x1e05e9=>{this['_userService']['addUser'](_0x1e05e9);}),_0x239096;}['saveCommentToSnapshot'](_0x3d5735){const _0x1ce58d=_0x1c34b4;return{'id':_0x3d5735['id'],'threadId':_0x3d5735[_0x1ce58d(0xac)],'ref':_0x3d5735[_0x1ce58d(0xaf)]};}};S=Q([b(0x0,_0x41fa4c(_0x10b3b5)),b(0x1,_0x41fa4c(_0x2f71ad)),b(0x2,_0x41fa4c(_0x23974e))],S);var re=Object['getOwnPropertyDescriptor'],te=(_0x3d8cc0,_0x33cf03,_0x5b208b,_0x5a1883)=>{const _0x436261=_0x1c34b4;for(var _0x55fc1e=_0x5a1883>0x1?void 0x0:_0x5a1883?re(_0x33cf03,_0x5b208b):_0x33cf03,_0x326b12=_0x3d8cc0[_0x436261(0xa0)]-0x1,_0x1dbdcf;_0x326b12>=0x0;_0x326b12--)(_0x1dbdcf=_0x3d8cc0[_0x326b12])&&(_0x55fc1e=_0x1dbdcf(_0x55fc1e)||_0x55fc1e);return _0x55fc1e;},M=(_0x35c161,_0x236e9a)=>(_0x135710,_0x360bba)=>_0x236e9a(_0x135710,_0x360bba,_0x35c161);let f=class extends _0x2e40cc{constructor(_0x2316f9,_0x432f2a){const _0x47e5d9=_0x1c34b4;super(),this[_0x47e5d9(0xef)]=_0x2316f9,this[_0x47e5d9(0xdd)]=_0x432f2a,this[_0x47e5d9(0x9e)]();}[_0x1c34b4(0x9e)](){const _0x39faf9=_0x1c34b4;this[_0x39faf9(0xef)][_0x39faf9(0xb7)]=this['_threadCommentDataSource'],this[_0x39faf9(0xef)][_0x39faf9(0x92)]=!0x1;}};function _0x5286(){const _0x535aea=['post','userId','disposeWithMe','code','comment','_configService','Solve','/reply','unitId','Unknown','defineProperty','add','commentUpdate$','_httpService','pipe','thread-comment-data-source.config','type','_threadCommentDataSourceService','onReady','14586KvdBKw','COMMENT','_sessionService','reply','map','Reply','_threadCommentModel','parentId','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','/list','syncUpdateMutationToColla','get','getUser','460zCXktb','rangeId','setConfig','_injector','getComment','resolveComment','filter','addComment','pluginName','_initDataSource','_userService','length','solved','/universer-api/user/list','format','onStarting','_commentService','31578426MaeSAH','OpenOrReOpen','8ptTual','root','userID','deleteComment','threadId','comments','replies','ref','_config','forEach','customRanges','replyId','updateComment','createTimestamp','body','dataSource','addUser','YYYY/MM/DD\x20HH:mm','getCurrentUser','parse','content','10025919OATpsI','2698059PleEVN','slice','rangeType','subscribe','getMemberID','Edit','requireSession','/delete','555178skjzRC','Add','UNIVER_UNKNOWN','10429570UizaNz','UNRECOGNIZED','1330364FSrNti','2SOLKqS','resolved','users','/solved','size','/universer-api/comment/unit/','Delete','getOwnPropertyDescriptor','/edit','_init','error','payload','Solved','user','9bRfzNA','getUnit','_initUserSync','_threadCommentDataSource'];_0x5286=function(){return _0x535aea;};return _0x5286();}f=te([M(0x0,_0x203f67),M(0x1,_0x41fa4c(S))],f);var se=Object[_0x1c34b4(0xe8)],oe=Object[_0x1c34b4(0xd3)],ne=(_0x479148,_0x205923,_0x5af1dc)=>_0x205923 in _0x479148?se(_0x479148,_0x205923,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5af1dc}):_0x479148[_0x205923]=_0x5af1dc,ie=(_0x5158f5,_0x8a7e57,_0xbf91e,_0x5d5283)=>{const _0x47a700=_0x1c34b4;for(var _0xdb5509=_0x5d5283>0x1?void 0x0:_0x5d5283?oe(_0x8a7e57,_0xbf91e):_0x8a7e57,_0x167591=_0x5158f5[_0x47a700(0xa0)]-0x1,_0xb58f10;_0x167591>=0x0;_0x167591--)(_0xb58f10=_0x5158f5[_0x167591])&&(_0xdb5509=_0xb58f10(_0xdb5509)||_0xdb5509);return _0xdb5509;},N=(_0x14d628,_0xdefea0)=>(_0x595296,_0x4a73e)=>_0xdefea0(_0x595296,_0x4a73e,_0x14d628),$=(_0x49c8a5,_0x59f453,_0x4ec82f)=>ne(_0x49c8a5,typeof _0x59f453!='symbol'?_0x59f453+'':_0x59f453,_0x4ec82f);let g=class extends _0xc50fea{constructor(_0x381075=O,_0x4a9a5f,_0xaa3c9d){const _0x16d9ad=_0x1c34b4;super(),this[_0x16d9ad(0xb0)]=_0x381075,this[_0x16d9ad(0x98)]=_0x4a9a5f,this[_0x16d9ad(0xe3)]=_0xaa3c9d;const {..._0xad2158}=_0x1d31f1({},O,this[_0x16d9ad(0xb0)]);this[_0x16d9ad(0xe3)][_0x16d9ad(0x97)](z,_0xad2158);}[_0x1c34b4(0xa4)](){const _0x598c3c=_0x1c34b4;[[S],[f],[_]][_0x598c3c(0xb1)](_0x14a8e6=>{const _0x49720e=_0x598c3c;this['_injector'][_0x49720e(0xe9)](_0x14a8e6);});}[_0x1c34b4(0xf0)](){const _0x4ccb00=_0x1c34b4;this['_injector'][_0x4ccb00(0x93)](f),this[_0x4ccb00(0x98)]['get'](_);}};function _0x5043(_0x2bcb00,_0x1020d6){const _0x52869b=_0x5286();return _0x5043=function(_0x5043ac,_0x588f5b){_0x5043ac=_0x5043ac-0x92;let _0x1137eb=_0x52869b[_0x5043ac];return _0x1137eb;},_0x5043(_0x2bcb00,_0x1020d6);}$(g,_0x1c34b4(0x9d),W),$(g,_0x1c34b4(0xee),_0x131887[_0x1c34b4(0xc8)]),g=ie([_0x59b602(_0x42d33a,_0x1d3f0e,_0x208ff5),N(0x1,_0x41fa4c(_0x1b186a)),N(0x2,_0x5d8e83)],g);export{g as UniverThreadCommentDataSourcePlugin};
package/lib/umd/index.js CHANGED
@@ -1 +1 @@
1
- (function(_0x2c1892,_0x2eea3b){const _0x24b824=_0x2801,_0x166dc0=_0x2c1892();while(!![]){try{const _0x1534ff=parseInt(_0x24b824(0x189))/0x1*(parseInt(_0x24b824(0x1a4))/0x2)+-parseInt(_0x24b824(0x1cf))/0x3+-parseInt(_0x24b824(0x16c))/0x4+parseInt(_0x24b824(0x182))/0x5*(parseInt(_0x24b824(0x1e8))/0x6)+parseInt(_0x24b824(0x1cb))/0x7*(-parseInt(_0x24b824(0x1da))/0x8)+-parseInt(_0x24b824(0x1d4))/0x9+parseInt(_0x24b824(0x1b4))/0xa;if(_0x1534ff===_0x2eea3b)break;else _0x166dc0['push'](_0x166dc0['shift']());}catch(_0x215d3c){_0x166dc0['push'](_0x166dc0['shift']());}}}(_0x1f75,0x651b1),function(_0x4b1bf1,_0x1a1e83){const _0x243567=_0x2801;typeof exports==_0x243567(0x1e2)&&typeof module<'u'?_0x1a1e83(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define==_0x243567(0x171)&&define[_0x243567(0x1c9)]?define([_0x243567(0x184),'@univerjs-pro/collaboration-client',_0x243567(0x19f),_0x243567(0x178),_0x243567(0x1bd),_0x243567(0x1ba),_0x243567(0x192),_0x243567(0x18a)],_0x1a1e83):(_0x4b1bf1=typeof globalThis<'u'?globalThis:_0x4b1bf1||self,_0x1a1e83(_0x4b1bf1['UniverProThreadCommentDatasource']={},_0x4b1bf1[_0x243567(0x1c3)],_0x4b1bf1['UniverProLicense'],_0x4b1bf1[_0x243567(0x1d1)],_0x4b1bf1[_0x243567(0x1bb)],_0x4b1bf1[_0x243567(0x1b2)],_0x4b1bf1[_0x243567(0x192)],_0x4b1bf1[_0x243567(0x1a1)]));}(this,function(_0x2051bf,_0x108668,_0xf9f6b,_0x414d42,_0x48e9ff,_0x53b9c4,_0x3d0ab0,_0x3eca16){'use strict';const _0x1fa543=_0x2801;const _0x2f798e=_0x1fa543(0x1a5);var _0x422942=(_0x55dc4f=>(_0x55dc4f[_0x55dc4f[_0x1fa543(0x1d9)]=0x0]=_0x1fa543(0x1d9),_0x55dc4f[_0x55dc4f[_0x1fa543(0x164)]=0x1]='Solved',_0x55dc4f[_0x55dc4f['UNRECOGNIZED']=-0x1]=_0x1fa543(0x1cc),_0x55dc4f))(_0x422942||{}),_0x4deea9=(_0x31badd=>(_0x31badd[_0x31badd[_0x1fa543(0x163)]=0x0]=_0x1fa543(0x163),_0x31badd[_0x31badd[_0x1fa543(0x16f)]=0x1]='Add',_0x31badd[_0x31badd[_0x1fa543(0x1e4)]=0x2]=_0x1fa543(0x1e4),_0x31badd[_0x31badd[_0x1fa543(0x187)]=0x3]=_0x1fa543(0x187),_0x31badd[_0x31badd['Delete']=0x4]=_0x1fa543(0x199),_0x31badd[_0x31badd[_0x1fa543(0x1af)]=0x5]=_0x1fa543(0x1af),_0x31badd[_0x31badd[_0x1fa543(0x1cc)]=-0x1]='UNRECOGNIZED',_0x31badd))(_0x4deea9||{});const _0x496893=_0x4ecbb4=>_0x414d42['dayjs'](new Date(+_0x4ecbb4))[_0x1fa543(0x1bf)](_0x1fa543(0x160)),_0x322198=async(_0x43cb7a,_0x3af98f)=>{const _0x48717b=_0x1fa543,_0x52029e=_0x43cb7a[_0x48717b(0x17d)](_0x414d42[_0x48717b(0x170)]),_0x2919da=_0x43cb7a['get'](_0x3eca16[_0x48717b(0x191)]);_0x3af98f[_0x48717b(0x18f)](_0x4b1efb=>{const _0xa0976e=_0x48717b;_0x52029e['getUser'](_0x4b1efb)&&_0x3af98f[_0xa0976e(0x174)](_0x4b1efb);}),_0x3af98f[_0x48717b(0x1c0)]&&(await _0x2919da[_0x48717b(0x17d)](_0x48717b(0x1a3),{'params':{'userIDs':[..._0x3af98f]}}))[_0x48717b(0x1d7)][_0x48717b(0x15f)][_0x48717b(0x18f)](_0x220a3b=>{const _0x55789=_0x48717b;_0x220a3b&&_0x52029e[_0x55789(0x1e7)](_0x220a3b);});};var _0x287cde=Object['getOwnPropertyDescriptor'],_0x55bb93=(_0x18f8a3,_0x40843b,_0x1bd488,_0x4a0c64)=>{const _0x4fcd15=_0x1fa543;for(var _0x375f80=_0x4a0c64>0x1?void 0x0:_0x4a0c64?_0x287cde(_0x40843b,_0x1bd488):_0x40843b,_0x54e1f2=_0x18f8a3[_0x4fcd15(0x1c7)]-0x1,_0x3fc2e8;_0x54e1f2>=0x0;_0x54e1f2--)(_0x3fc2e8=_0x18f8a3[_0x54e1f2])&&(_0x375f80=_0x3fc2e8(_0x375f80)||_0x375f80);return _0x375f80;},_0x36571e=(_0x2948a9,_0x2628f0)=>(_0x1f2591,_0x4205ea)=>_0x2628f0(_0x1f2591,_0x4205ea,_0x2948a9);let _0x189ed9=class extends _0x414d42[_0x1fa543(0x1a6)]{constructor(_0x2e3ee5,_0x12ee06,_0x2aa830,_0x490c3e){const _0x55b657=_0x1fa543;super(),this[_0x55b657(0x193)]=_0x2e3ee5,this['_threadCommentModel']=_0x12ee06,this['_userService']=_0x2aa830,this[_0x55b657(0x1df)]=_0x490c3e,this[_0x55b657(0x176)](),this[_0x55b657(0x1a0)]();}['_initUserSync'](){const _0x5699af=_0x1fa543;this['disposeWithMe'](this[_0x5699af(0x15d)][_0x5699af(0x173)][_0x5699af(0x1be)](_0x3d0ab0[_0x5699af(0x188)](0x10))[_0x5699af(0x175)](_0x691312=>{const _0x18d077=_0x5699af,_0x525224=new Set();_0x691312[_0x18d077(0x18f)](_0x5a373a=>{const _0x51af2e=_0x18d077;switch(_0x5a373a['type']){case _0x51af2e(0x1d3):{const _0x3cc469=_0x5a373a[_0x51af2e(0x1c8)]['personId'];_0x525224[_0x51af2e(0x1d3)](_0x3cc469);break;}}}),_0x322198(this[_0x18d077(0x1df)],_0x525224);}));}[_0x1fa543(0x176)](){const _0x14bde1=_0x1fa543;this[_0x14bde1(0x1b8)](this['_commentService'][_0x14bde1(0x173)][_0x14bde1(0x175)](async _0x7456c2=>{const _0x12b181=_0x14bde1;var _0x518af6,_0x2bf550,_0x53d0d8,_0x4c9e09;const _0xca13e7=(_0x518af6=this[_0x12b181(0x15d)]['getUnit'](_0x7456c2[_0x12b181(0x168)])[_0x12b181(0x1b1)](_0x499e67=>_0x499e67[_0x12b181(0x196)]===_0x7456c2[_0x12b181(0x196)]))==null?void 0x0:_0x518af6['root'];if(!_0xca13e7)return;const {unitId:_0x47b7d4,subUnitId:_0x108c36}=_0xca13e7;switch(_0x7456c2[_0x12b181(0x17a)]&&this[_0x12b181(0x185)][_0x12b181(0x1e7)](_0x7456c2[_0x12b181(0x17a)]),_0x7456c2['type']){case _0x4deea9[_0x12b181(0x16f)]:break;case _0x4deea9[_0x12b181(0x1e4)]:{this[_0x12b181(0x15d)][_0x12b181(0x1d8)](_0x47b7d4,_0x108c36,{'unitId':_0x47b7d4,'subUnitId':_0x108c36,'ref':'','id':_0x7456c2[_0x12b181(0x1cd)],'dT':_0x496893(+_0x7456c2[_0x12b181(0x190)]),'threadId':_0x7456c2[_0x12b181(0x196)],'personId':(_0x53d0d8=(_0x2bf550=_0x7456c2[_0x12b181(0x17a)])==null?void 0x0:_0x2bf550[_0x12b181(0x18b)])!=null?_0x53d0d8:_0x7456c2[_0x12b181(0x1e1)],'text':JSON[_0x12b181(0x198)](_0x7456c2[_0x12b181(0x17c)]),'parentId':_0xca13e7['id']});break;}case _0x4deea9['Delete']:{const _0x3d7727=this[_0x12b181(0x15d)][_0x12b181(0x161)](_0x47b7d4,_0x108c36,_0x7456c2['replyId']);_0x3d7727&&_0x3d7727[_0x12b181(0x181)]&&this[_0x12b181(0x15d)][_0x12b181(0x166)](_0x47b7d4,_0x108c36,_0x7456c2[_0x12b181(0x1cd)]);break;}case _0x4deea9[_0x12b181(0x187)]:{this['_threadCommentModel'][_0x12b181(0x19b)](_0x47b7d4,_0x108c36,{'commentId':_0x7456c2[_0x12b181(0x1cd)],'text':JSON[_0x12b181(0x198)](_0x7456c2[_0x12b181(0x17c)])});break;}case _0x4deea9[_0x12b181(0x1af)]:{const _0x4d35fe=(_0x4c9e09=this[_0x12b181(0x15d)][_0x12b181(0x1b7)](_0x7456c2[_0x12b181(0x168)])['find'](_0x4fe79a=>_0x4fe79a[_0x12b181(0x196)]===_0x7456c2[_0x12b181(0x196)]))==null?void 0x0:_0x4c9e09[_0x12b181(0x1d5)];_0x4d35fe&&this[_0x12b181(0x15d)][_0x12b181(0x1bc)](_0x47b7d4,_0x108c36,_0x4d35fe['id'],_0x7456c2[_0x12b181(0x1c5)]===_0x422942['Solved']);break;}}}));}};_0x189ed9=_0x55bb93([_0x36571e(0x0,_0x414d42[_0x1fa543(0x1ac)](_0x108668[_0x1fa543(0x19c)])),_0x36571e(0x1,_0x414d42[_0x1fa543(0x1ac)](_0x53b9c4[_0x1fa543(0x1a2)])),_0x36571e(0x2,_0x414d42[_0x1fa543(0x1ac)](_0x414d42[_0x1fa543(0x170)])),_0x36571e(0x3,_0x414d42[_0x1fa543(0x1ac)](_0x414d42['Injector']))],_0x189ed9);const _0x320495=_0x1fa543(0x1b5),_0x497619={};var _0x479837=Object[_0x1fa543(0x19e)],_0xd5e5e9=(_0x5b02b7,_0x25982b,_0x15227f,_0x2241ee)=>{const _0x447854=_0x1fa543;for(var _0x11c5a3=_0x2241ee>0x1?void 0x0:_0x2241ee?_0x479837(_0x25982b,_0x15227f):_0x25982b,_0x314332=_0x5b02b7[_0x447854(0x1c7)]-0x1,_0x178426;_0x314332>=0x0;_0x314332--)(_0x178426=_0x5b02b7[_0x314332])&&(_0x11c5a3=_0x178426(_0x11c5a3)||_0x11c5a3);return _0x11c5a3;},_0xc5380=(_0x2e1a80,_0x55514e)=>(_0x26e634,_0x4ab9b0)=>_0x55514e(_0x26e634,_0x4ab9b0,_0x2e1a80);function _0x4a9715(_0x579b7a,_0x2d2f81){const _0x1d1546=_0x1fa543,_0xdbbc1c=_0x579b7a['replies'][0x0];return{..._0x2d2f81,'id':_0xdbbc1c[_0x1d1546(0x1cd)],'resolved':_0x579b7a[_0x1d1546(0x1c5)]===0x1,'dT':_0x496893(_0xdbbc1c['createTimestamp']),'personId':_0xdbbc1c[_0x1d1546(0x1e1)],'threadId':_0xdbbc1c[_0x1d1546(0x196)]};}function _0x991e71(_0x659ef6,_0x5a3ef4,_0x404c25){const _0x107d7e=_0x1fa543;var _0x5ef934,_0x139510;if(((_0x139510=(_0x5ef934=_0x659ef6==null?void 0x0:_0x659ef6[_0x107d7e(0x16a)])==null?void 0x0:_0x5ef934[_0x107d7e(0x1c7)])!=null?_0x139510:0x0)>0x0){const _0x421c92=(_0x15d5b4,_0x2ebb85)=>({'id':_0x15d5b4[_0x107d7e(0x1cd)],'threadId':_0x15d5b4[_0x107d7e(0x196)],'dT':_0x496893(_0x15d5b4[_0x107d7e(0x190)]),'personId':_0x15d5b4[_0x107d7e(0x1e1)],'resolved':_0x659ef6[_0x107d7e(0x1c5)]===_0x422942['Solved'],'unitId':_0x5a3ef4,'subUnitId':_0x404c25,'text':JSON[_0x107d7e(0x198)](_0x15d5b4[_0x107d7e(0x17c)]),'parentId':_0x2ebb85}),_0x1e5c74=_0x421c92(_0x659ef6[_0x107d7e(0x16a)][0x0]);return{..._0x1e5c74,'children':_0x659ef6['replies']['slice'](0x1)['map'](_0x1caaaa=>_0x421c92(_0x1caaaa,_0x1e5c74['id']))};}return null;}let _0x476c4c=class{constructor(_0x1b1685,_0x67af8b,_0x226c7c){const _0x19b859=_0x1fa543;this[_0x19b859(0x17b)]=_0x1b1685,this[_0x19b859(0x185)]=_0x67af8b,this[_0x19b859(0x18c)]=_0x226c7c;}async[_0x1fa543(0x1d8)](_0x21615b){const _0x4522fa=_0x1fa543;var _0x4e0b73,_0x5ac60d;const {parentId:_0x4658ca,unitId:_0x15abe8,text:_0x372d1c,threadId:_0x48fcda}=_0x21615b,_0x2df3bd=(_0x5ac60d=(_0x4e0b73=_0x372d1c[_0x4522fa(0x1c4)])==null?void 0x0:_0x4e0b73[_0x4522fa(0x177)](_0x2f4295=>_0x2f4295['rangeType']===_0x414d42[_0x4522fa(0x1e5)][_0x4522fa(0x19d)])['map'](_0x2f5fe6=>_0x2f5fe6[_0x4522fa(0x1b9)]))!=null?_0x5ac60d:[],_0x3dce8e=JSON[_0x4522fa(0x186)](_0x372d1c),_0x405a5b=(await this[_0x4522fa(0x18c)][_0x4522fa(0x195)](_0x15abe8))[_0x4522fa(0x19a)]();if(_0x4658ca){const _0x31c9bb={'memberId':_0x405a5b,'unitId':_0x15abe8,'content':_0x3dce8e,'mention':_0x2df3bd,'threadId':_0x48fcda},_0x5a5688=(await this['_httpService'][_0x4522fa(0x1aa)]('/universer-api/comment/unit/'+_0x15abe8+_0x4522fa(0x1b0),{'body':_0x31c9bb}))[_0x4522fa(0x1d7)][_0x4522fa(0x197)];return{..._0x21615b,'id':_0x5a5688[_0x4522fa(0x1cd)],'dT':_0x414d42['dayjs'](+_0x5a5688[_0x4522fa(0x190)])['format']('YYYY/MM/DD\x20HH:mm'),'personId':_0x5a5688[_0x4522fa(0x1e1)]};}else{const _0x466279={'memberId':_0x405a5b,'unitId':_0x15abe8,'content':_0x3dce8e,'mention':_0x2df3bd},_0x3bb0db=await this[_0x4522fa(0x17b)]['post'](_0x4522fa(0x1d6)+_0x15abe8+_0x4522fa(0x18d),{'body':_0x466279});return _0x4a9715(_0x3bb0db['body'][_0x4522fa(0x1d0)],_0x21615b);}}async[_0x1fa543(0x19b)](_0x37e596){const _0x1e93bc=_0x1fa543;var _0x3ea1e0,_0x1849f0;const {text:_0x3a7d3b,unitId:_0x25bb58}=_0x37e596,_0x576eef=(_0x1849f0=(_0x3ea1e0=_0x3a7d3b[_0x1e93bc(0x1c4)])==null?void 0x0:_0x3ea1e0[_0x1e93bc(0x177)](_0x37200c=>_0x37200c[_0x1e93bc(0x18e)]===_0x414d42[_0x1e93bc(0x1e5)][_0x1e93bc(0x19d)])[_0x1e93bc(0x167)](_0x4a3124=>_0x4a3124[_0x1e93bc(0x1b9)]))!=null?_0x1849f0:[],_0x357917=JSON['stringify'](_0x3a7d3b),_0x15d079=_0x37e596[_0x1e93bc(0x196)],_0x473922=_0x37e596['id'],_0x35991c={'memberId':(await this[_0x1e93bc(0x18c)]['requireSession'](_0x25bb58))[_0x1e93bc(0x19a)](),'unitId':_0x25bb58,'threadId':_0x15d079,'mention':_0x576eef,'content':_0x357917,'replyId':_0x473922},_0x517ec3=await this[_0x1e93bc(0x17b)]['post'](_0x1e93bc(0x1d6)+_0x25bb58+_0x1e93bc(0x1c1),{'body':_0x35991c});return!_0x517ec3[_0x1e93bc(0x1d7)][_0x1e93bc(0x1e0)]||_0x517ec3['body'][_0x1e93bc(0x1e0)][_0x1e93bc(0x1b3)]===0x1;}async[_0x1fa543(0x1bc)](_0x1c87f0){const _0x421d52=_0x1fa543,{unitId:_0x36b5bc}=_0x1c87f0,_0x216d01=_0x1c87f0[_0x421d52(0x196)],_0x4ab52={'memberId':this[_0x421d52(0x185)][_0x421d52(0x165)]()[_0x421d52(0x18b)],'unitId':_0x36b5bc,'threadId':_0x216d01,'solved':_0x1c87f0[_0x421d52(0x1de)]?_0x422942[_0x421d52(0x164)]:_0x422942[_0x421d52(0x1d9)]},_0x43233e=await this[_0x421d52(0x17b)][_0x421d52(0x1aa)](_0x421d52(0x1d6)+_0x36b5bc+_0x421d52(0x1d2),{'body':_0x4ab52});return!_0x43233e[_0x421d52(0x1d7)][_0x421d52(0x1e0)]||_0x43233e[_0x421d52(0x1d7)][_0x421d52(0x1e0)][_0x421d52(0x1b3)]===0x1;}async[_0x1fa543(0x166)](_0x381faa,_0x3788e6,_0x3247cb,_0x2664e7){const _0x4690bf=_0x1fa543,_0x276967={'memberId':(await this[_0x4690bf(0x18c)][_0x4690bf(0x195)](_0x381faa))['getMemberID'](),'threadId':_0x3247cb,'replyId':_0x2664e7,'unitId':_0x381faa},_0x7d6559=await this['_httpService']['post'](_0x4690bf(0x1d6)+_0x381faa+_0x4690bf(0x16b),{'body':_0x276967});return!_0x7d6559[_0x4690bf(0x1d7)]['error']||_0x7d6559[_0x4690bf(0x1d7)]['error'][_0x4690bf(0x1b3)]===0x1;}async[_0x1fa543(0x15e)](_0x5c26eb,_0xa3175,_0x24bac6){const _0x4573ae=_0x1fa543,_0x82e0f8={'unitId':_0x5c26eb,'threadId':_0x24bac6},_0x27607b=await this[_0x4573ae(0x17b)]['post'](_0x4573ae(0x1d6)+_0x5c26eb+'/list',{'body':_0x82e0f8}),_0x24eae9=_0x24bac6[_0x4573ae(0x167)](_0x35fae9=>_0x991e71(_0x27607b[_0x4573ae(0x1d7)][_0x4573ae(0x17e)][_0x35fae9],_0x5c26eb,_0xa3175))['filter'](Boolean);return Object[_0x4573ae(0x1a7)](_0x27607b[_0x4573ae(0x1d7)][_0x4573ae(0x15f)])[_0x4573ae(0x18f)](_0x39eab5=>{const _0x143d2d=_0x4573ae;this[_0x143d2d(0x185)][_0x143d2d(0x1e7)](_0x39eab5);}),_0x24eae9;}[_0x1fa543(0x1ae)](_0x861e11){const _0x17606b=_0x1fa543;return{'id':_0x861e11['id'],'threadId':_0x861e11['threadId'],'ref':_0x861e11[_0x17606b(0x1b6)]};}};_0x476c4c=_0xd5e5e9([_0xc5380(0x0,_0x414d42['Inject'](_0x3eca16[_0x1fa543(0x191)])),_0xc5380(0x1,_0x414d42[_0x1fa543(0x1ac)](_0x414d42[_0x1fa543(0x170)])),_0xc5380(0x2,_0x414d42[_0x1fa543(0x1ac)](_0x108668['CollaborationSessionService']))],_0x476c4c);var _0x1b8f27=Object[_0x1fa543(0x19e)],_0x4b9609=(_0x1113fd,_0x3bcca7,_0x8597b1,_0x2a5785)=>{const _0x59193e=_0x1fa543;for(var _0x2586eb=_0x2a5785>0x1?void 0x0:_0x2a5785?_0x1b8f27(_0x3bcca7,_0x8597b1):_0x3bcca7,_0x7f59aa=_0x1113fd[_0x59193e(0x1c7)]-0x1,_0x123a8f;_0x7f59aa>=0x0;_0x7f59aa--)(_0x123a8f=_0x1113fd[_0x7f59aa])&&(_0x2586eb=_0x123a8f(_0x2586eb)||_0x2586eb);return _0x2586eb;},_0x32eeef=(_0x1a9279,_0x4a032c)=>(_0x2843dc,_0x36500d)=>_0x4a032c(_0x2843dc,_0x36500d,_0x1a9279);let _0x17905e=class extends _0x414d42[_0x1fa543(0x1a6)]{constructor(_0x2c40bd,_0x2c5483){const _0x1ce2d8=_0x1fa543;super(),this[_0x1ce2d8(0x1db)]=_0x2c40bd,this[_0x1ce2d8(0x1e3)]=_0x2c5483,this[_0x1ce2d8(0x162)]();}[_0x1fa543(0x162)](){const _0x12c485=_0x1fa543;this['_threadCommentDataSourceService'][_0x12c485(0x1ca)]=this[_0x12c485(0x1e3)],this[_0x12c485(0x1db)][_0x12c485(0x1e6)]=!0x1;}};_0x17905e=_0x4b9609([_0x32eeef(0x0,_0x53b9c4[_0x1fa543(0x1ad)]),_0x32eeef(0x1,_0x414d42[_0x1fa543(0x1ac)](_0x476c4c))],_0x17905e);var _0x4f432f=Object['defineProperty'],_0x193544=Object['getOwnPropertyDescriptor'],_0xd123a1=(_0x691701,_0x1b7ba8,_0x4b980c)=>_0x1b7ba8 in _0x691701?_0x4f432f(_0x691701,_0x1b7ba8,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x4b980c}):_0x691701[_0x1b7ba8]=_0x4b980c,_0x29b98f=(_0x53a786,_0x313615,_0x3314c5,_0x52ca2f)=>{const _0xc78dab=_0x1fa543;for(var _0x52e895=_0x52ca2f>0x1?void 0x0:_0x52ca2f?_0x193544(_0x313615,_0x3314c5):_0x313615,_0x27cb98=_0x53a786[_0xc78dab(0x1c7)]-0x1,_0x355716;_0x27cb98>=0x0;_0x27cb98--)(_0x355716=_0x53a786[_0x27cb98])&&(_0x52e895=_0x355716(_0x52e895)||_0x52e895);return _0x52e895;},_0x5a7533=(_0x448f63,_0x247442)=>(_0x107b03,_0x5eb264)=>_0x247442(_0x107b03,_0x5eb264,_0x448f63),_0x1c6f25=(_0x2258fa,_0x392b0c,_0x59fc70)=>_0xd123a1(_0x2258fa,typeof _0x392b0c!=_0x1fa543(0x16d)?_0x392b0c+'':_0x392b0c,_0x59fc70);_0x2051bf[_0x1fa543(0x1ab)]=class extends _0x414d42[_0x1fa543(0x1ce)]{constructor(_0x4ef504=_0x497619,_0x47a8c2,_0x216dd7){const _0x1912e5=_0x1fa543;super(),this[_0x1912e5(0x17f)]=_0x4ef504,this[_0x1912e5(0x1df)]=_0x47a8c2,this['_configService']=_0x216dd7;const {..._0x9fd53}=_0x414d42[_0x1912e5(0x194)]({},_0x497619,this[_0x1912e5(0x17f)]);this['_configService'][_0x1912e5(0x172)](_0x320495,_0x9fd53);}[_0x1fa543(0x1dc)](){const _0x3c36b7=_0x1fa543;[[_0x476c4c],[_0x17905e],[_0x189ed9]][_0x3c36b7(0x18f)](_0x4af8a6=>{const _0xe36790=_0x3c36b7;this[_0xe36790(0x1df)]['add'](_0x4af8a6);});}[_0x1fa543(0x1c2)](){const _0x30c709=_0x1fa543;this[_0x30c709(0x1df)][_0x30c709(0x17d)](_0x17905e),this[_0x30c709(0x1df)][_0x30c709(0x17d)](_0x189ed9);}},_0x1c6f25(_0x2051bf[_0x1fa543(0x1ab)],_0x1fa543(0x16e),_0x2f798e),_0x1c6f25(_0x2051bf['UniverThreadCommentDataSourcePlugin'],_0x1fa543(0x1a9),_0x414d42['UniverInstanceType']['UNIVER_UNKNOWN']),_0x2051bf[_0x1fa543(0x1ab)]=_0x29b98f([_0x414d42[_0x1fa543(0x169)](_0x48e9ff['UniverThreadCommentUIPlugin'],_0x108668[_0x1fa543(0x1c6)],_0xf9f6b[_0x1fa543(0x1dd)]),_0x5a7533(0x1,_0x414d42[_0x1fa543(0x1ac)](_0x414d42['Injector'])),_0x5a7533(0x2,_0x414d42[_0x1fa543(0x179)])],_0x2051bf[_0x1fa543(0x1ab)]),Object[_0x1fa543(0x180)](_0x2051bf,Symbol[_0x1fa543(0x183)],{'value':_0x1fa543(0x1a8)});}));function _0x2801(_0x5a8238,_0x334e51){const _0x1f75f5=_0x1f75();return _0x2801=function(_0x2801aa,_0x2c94c9){_0x2801aa=_0x2801aa-0x15d;let _0x14924a=_0x1f75f5[_0x2801aa];return _0x14924a;},_0x2801(_0x5a8238,_0x334e51);}function _0x1f75(){const _0x503fd0=['IConfigService','user','_httpService','content','get','comments','_config','defineProperty','parentId','24995ImmicQ','toStringTag','exports','_userService','stringify','Edit','bufferTime','243994nJocLm','@univerjs/network','userID','_sessionService','/add','rangeType','forEach','createTimestamp','HTTPService','rxjs','_commentService','merge','requireSession','threadId','reply','parse','Delete','getMemberID','updateComment','CommentService','COMMENT','getOwnPropertyDescriptor','@univerjs-pro/license','_initUserSync','UniverNetwork','ThreadCommentModel','/universer-api/user/list','4HHcqoA','UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN','Disposable','values','Module','type','post','UniverThreadCommentDataSourcePlugin','Inject','IThreadCommentDataSourceService','saveCommentToSnapshot','Solve','/reply','find','UniverThreadComment','code','11124160qPGlye','thread-comment-data-source.config','ref','getUnit','disposeWithMe','rangeId','@univerjs/thread-comment','UniverThreadCommentUi','resolveComment','@univerjs/thread-comment-ui','pipe','format','size','/edit','onReady','UniverProCollaborationClient','customRanges','solved','UniverCollaborationClientPlugin','length','payload','amd','dataSource','7bkExrW','UNRECOGNIZED','replyId','Plugin','549801YaGvKg','comment','UniverCore','/solved','add','2059533DslXKv','root','/universer-api/comment/unit/','body','addComment','OpenOrReOpen','6536560wmPnQl','_threadCommentDataSourceService','onStarting','UniverLicensePlugin','resolved','_injector','error','userId','object','_threadCommentDataSource','Reply','CustomRangeType','syncUpdateMutationToColla','addUser','894tSTEjO','_threadCommentModel','listComments','users','YYYY/MM/DD\x20HH:mm','getComment','_initDataSource','Unknown','Solved','getCurrentUser','deleteComment','map','unitId','DependentOn','replies','/delete','2807808xvbZYu','symbol','pluginName','Add','UserManagerService','function','setConfig','commentUpdate$','delete','subscribe','_init','filter','@univerjs/core'];_0x1f75=function(){return _0x503fd0;};return _0x1f75();}
1
+ function _0x1365(_0xbe0131,_0x12e6db){const _0x5d44c4=_0x5d44();return _0x1365=function(_0x1365de,_0x3d6e4f){_0x1365de=_0x1365de-0x13f;let _0x34da09=_0x5d44c4[_0x1365de];return _0x34da09;},_0x1365(_0xbe0131,_0x12e6db);}function _0x5d44(){const _0x2db2c7=['Delete','customRanges','_httpService','_init','subscribe','rangeId','UniverThreadComment','UNRECOGNIZED','commentUpdate$','syncUpdateMutationToColla','Solved','UserManagerService','@univerjs/thread-comment','_initUserSync','Unknown','amd','Solve','1367212MaowhV','content','threadId','forEach','code','/reply','Disposable','_config','resolved','format','10iIUCGf','slice','IThreadCommentDataSourceService','3022560NupmMH','requireSession','merge','parentId','map','getOwnPropertyDescriptor','delete','get','1501430wWJvNw','replyId','length','addComment','ThreadCommentModel','body','283395OWvZMW','type','userId','filter','/universer-api/user/list','userID','reply','_injector','values','@univerjs-pro/license','payload','CustomRangeType','UniverThreadCommentDataSourcePlugin','personId','setConfig','Edit','COMMENT','Module','add','saveCommentToSnapshot','listComments','comments','toStringTag','resolveComment','disposeWithMe','onStarting','3071754pbbAGc','stringify','dayjs','CollaborationSessionService','bufferTime','find','unitId','UNIVER_UNKNOWN','pipe','addUser','_commentService','789125cCaLRu','/edit','pluginName','rangeType','getUnit','_userService','Reply','DependentOn','UniverInstanceType','root','UniverProLicense','_sessionService','/universer-api/comment/unit/','_threadCommentModel','getComment','getMemberID','_initDataSource','110686jyujdw','HTTPService','@univerjs/core','createTimestamp','users','replies','updateComment','YYYY/MM/DD\x20HH:mm','dataSource','parse','error','Inject','Injector','_threadCommentDataSource','8roDbRW','solved','_threadCommentDataSourceService','rxjs','post','onReady','/add','CommentService','/solved','getCurrentUser','@univerjs/thread-comment-ui','user','OpenOrReOpen','UniverProCollaborationClient','defineProperty','UniverCore','40QwPPXu','UniverNetwork','IConfigService','/list','deleteComment','Add','size'];_0x5d44=function(){return _0x2db2c7;};return _0x5d44();}(function(_0x4479a9,_0x522e5a){const _0x441762=_0x1365,_0x5e02a2=_0x4479a9();while(!![]){try{const _0x1cf69c=-parseInt(_0x441762(0x182))/0x1*(-parseInt(_0x441762(0x1c2))/0x2)+-parseInt(_0x441762(0x14c))/0x3+parseInt(_0x441762(0x1b8))/0x4+parseInt(_0x441762(0x171))/0x5+parseInt(_0x441762(0x1c5))/0x6+-parseInt(_0x441762(0x146))/0x7*(-parseInt(_0x441762(0x190))/0x8)+-parseInt(_0x441762(0x166))/0x9*(parseInt(_0x441762(0x1a0))/0xa);if(_0x1cf69c===_0x522e5a)break;else _0x5e02a2['push'](_0x5e02a2['shift']());}catch(_0xc8d7b2){_0x5e02a2['push'](_0x5e02a2['shift']());}}}(_0x5d44,0x4c143),function(_0x3dabf0,_0x44b577){const _0x3cf31b=_0x1365;typeof exports=='object'&&typeof module<'u'?_0x44b577(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs-pro/license'),require('@univerjs/core'),require('@univerjs/thread-comment-ui'),require('@univerjs/thread-comment'),require('rxjs'),require('@univerjs/network')):typeof define=='function'&&define[_0x3cf31b(0x1b6)]?define(['exports','@univerjs-pro/collaboration-client',_0x3cf31b(0x155),_0x3cf31b(0x184),_0x3cf31b(0x19a),_0x3cf31b(0x1b3),_0x3cf31b(0x193),'@univerjs/network'],_0x44b577):(_0x3dabf0=typeof globalThis<'u'?globalThis:_0x3dabf0||self,_0x44b577(_0x3dabf0['UniverProThreadCommentDatasource']={},_0x3dabf0[_0x3cf31b(0x19d)],_0x3dabf0[_0x3cf31b(0x17b)],_0x3dabf0[_0x3cf31b(0x19f)],_0x3dabf0['UniverThreadCommentUi'],_0x3dabf0[_0x3cf31b(0x1ad)],_0x3dabf0[_0x3cf31b(0x193)],_0x3dabf0[_0x3cf31b(0x1a1)]));}(this,function(_0x17373e,_0x20afce,_0x21586a,_0x5d20e7,_0x3acfe9,_0x3452d3,_0x3f79e2,_0x58b394){'use strict';const _0x1a8e9e=_0x1365;const _0x32f76b='UNIVER_THREAD_COMMENT_DATA_SOURCE_PLUGIN';var _0x17464c=(_0x2719ff=>(_0x2719ff[_0x2719ff['OpenOrReOpen']=0x0]=_0x1a8e9e(0x19c),_0x2719ff[_0x2719ff['Solved']=0x1]=_0x1a8e9e(0x1b1),_0x2719ff[_0x2719ff['UNRECOGNIZED']=-0x1]=_0x1a8e9e(0x1ae),_0x2719ff))(_0x17464c||{}),_0x57a607=(_0x4fa43a=>(_0x4fa43a[_0x4fa43a[_0x1a8e9e(0x1b5)]=0x0]=_0x1a8e9e(0x1b5),_0x4fa43a[_0x4fa43a[_0x1a8e9e(0x1a5)]=0x1]=_0x1a8e9e(0x1a5),_0x4fa43a[_0x4fa43a['Reply']=0x2]=_0x1a8e9e(0x177),_0x4fa43a[_0x4fa43a[_0x1a8e9e(0x15b)]=0x3]=_0x1a8e9e(0x15b),_0x4fa43a[_0x4fa43a[_0x1a8e9e(0x1a7)]=0x4]='Delete',_0x4fa43a[_0x4fa43a['Solve']=0x5]='Solve',_0x4fa43a[_0x4fa43a[_0x1a8e9e(0x1ae)]=-0x1]=_0x1a8e9e(0x1ae),_0x4fa43a))(_0x57a607||{});const _0x24b1ea=_0x4cb68a=>_0x5d20e7[_0x1a8e9e(0x168)](new Date(+_0x4cb68a))[_0x1a8e9e(0x1c1)](_0x1a8e9e(0x189)),_0x1ab552=async(_0x31786d,_0x3e730c)=>{const _0x31a09e=_0x1a8e9e,_0x480f4d=_0x31786d[_0x31a09e(0x145)](_0x5d20e7[_0x31a09e(0x1b2)]),_0x4864f6=_0x31786d[_0x31a09e(0x145)](_0x58b394[_0x31a09e(0x183)]);_0x3e730c['forEach'](_0x32998b=>{const _0x1abee1=_0x31a09e;_0x480f4d['getUser'](_0x32998b)&&_0x3e730c[_0x1abee1(0x144)](_0x32998b);}),_0x3e730c[_0x31a09e(0x1a6)]&&(await _0x4864f6[_0x31a09e(0x145)](_0x31a09e(0x150),{'params':{'userIDs':[..._0x3e730c]}}))[_0x31a09e(0x14b)][_0x31a09e(0x186)]['forEach'](_0x43909e=>{const _0x5ba21f=_0x31a09e;_0x43909e&&_0x480f4d[_0x5ba21f(0x16f)](_0x43909e);});};var _0x1186e8=Object[_0x1a8e9e(0x143)],_0x4cf14d=(_0x581032,_0x1f924b,_0x1c86c3,_0x4c8706)=>{for(var _0x51f820=_0x4c8706>0x1?void 0x0:_0x4c8706?_0x1186e8(_0x1f924b,_0x1c86c3):_0x1f924b,_0x50b1f6=_0x581032['length']-0x1,_0x364fd2;_0x50b1f6>=0x0;_0x50b1f6--)(_0x364fd2=_0x581032[_0x50b1f6])&&(_0x51f820=_0x364fd2(_0x51f820)||_0x51f820);return _0x51f820;},_0x5bf47b=(_0x1e8122,_0x42a3ad)=>(_0x1a9d42,_0x37a2e6)=>_0x42a3ad(_0x1a9d42,_0x37a2e6,_0x1e8122);let _0x1fc069=class extends _0x5d20e7[_0x1a8e9e(0x1be)]{constructor(_0x4caa1c,_0x4ea198,_0xa55d3b,_0x589c4f){const _0x4625a8=_0x1a8e9e;super(),this[_0x4625a8(0x170)]=_0x4caa1c,this[_0x4625a8(0x17e)]=_0x4ea198,this[_0x4625a8(0x176)]=_0xa55d3b,this['_injector']=_0x589c4f,this[_0x4625a8(0x1aa)](),this[_0x4625a8(0x1b4)]();}['_initUserSync'](){const _0x2c3753=_0x1a8e9e;this['disposeWithMe'](this['_threadCommentModel'][_0x2c3753(0x1af)][_0x2c3753(0x16e)](_0x3f79e2[_0x2c3753(0x16a)](0x10))[_0x2c3753(0x1ab)](_0x165495=>{const _0x7ad32b=_0x2c3753,_0x1de55e=new Set();_0x165495[_0x7ad32b(0x1bb)](_0x2e1a69=>{const _0x5d6b1a=_0x7ad32b;switch(_0x2e1a69[_0x5d6b1a(0x14d)]){case _0x5d6b1a(0x15e):{const _0x518baf=_0x2e1a69[_0x5d6b1a(0x156)][_0x5d6b1a(0x159)];_0x1de55e[_0x5d6b1a(0x15e)](_0x518baf);break;}}}),_0x1ab552(this[_0x7ad32b(0x153)],_0x1de55e);}));}[_0x1a8e9e(0x1aa)](){const _0x17b1d6=_0x1a8e9e;this[_0x17b1d6(0x164)](this['_commentService'][_0x17b1d6(0x1af)]['subscribe'](async _0x388789=>{const _0x58dbaf=_0x17b1d6;var _0x1a9f0a,_0x24159d,_0x369b38,_0x5c2b1c;const _0x324454=(_0x1a9f0a=this[_0x58dbaf(0x17e)][_0x58dbaf(0x175)](_0x388789[_0x58dbaf(0x16c)])[_0x58dbaf(0x16b)](_0x338059=>_0x338059[_0x58dbaf(0x1ba)]===_0x388789[_0x58dbaf(0x1ba)]))==null?void 0x0:_0x1a9f0a[_0x58dbaf(0x17a)];if(!_0x324454)return;const {unitId:_0x3e3556,subUnitId:_0x446d20}=_0x324454;switch(_0x388789[_0x58dbaf(0x19b)]&&this[_0x58dbaf(0x176)]['addUser'](_0x388789['user']),_0x388789[_0x58dbaf(0x14d)]){case _0x57a607[_0x58dbaf(0x1a5)]:break;case _0x57a607[_0x58dbaf(0x177)]:{this[_0x58dbaf(0x17e)][_0x58dbaf(0x149)](_0x3e3556,_0x446d20,{'unitId':_0x3e3556,'subUnitId':_0x446d20,'ref':'','id':_0x388789['replyId'],'dT':_0x24b1ea(+_0x388789[_0x58dbaf(0x185)]),'threadId':_0x388789[_0x58dbaf(0x1ba)],'personId':(_0x369b38=(_0x24159d=_0x388789['user'])==null?void 0x0:_0x24159d[_0x58dbaf(0x151)])!=null?_0x369b38:_0x388789[_0x58dbaf(0x14e)],'text':JSON[_0x58dbaf(0x18b)](_0x388789[_0x58dbaf(0x1b9)]),'parentId':_0x324454['id']});break;}case _0x57a607['Delete']:{const _0x3d30d3=this[_0x58dbaf(0x17e)][_0x58dbaf(0x17f)](_0x3e3556,_0x446d20,_0x388789['replyId']);_0x3d30d3&&_0x3d30d3[_0x58dbaf(0x141)]&&this[_0x58dbaf(0x17e)][_0x58dbaf(0x1a4)](_0x3e3556,_0x446d20,_0x388789[_0x58dbaf(0x147)]);break;}case _0x57a607[_0x58dbaf(0x15b)]:{this[_0x58dbaf(0x17e)][_0x58dbaf(0x188)](_0x3e3556,_0x446d20,{'commentId':_0x388789[_0x58dbaf(0x147)],'text':JSON[_0x58dbaf(0x18b)](_0x388789[_0x58dbaf(0x1b9)])});break;}case _0x57a607[_0x58dbaf(0x1b7)]:{const _0x1af7a8=(_0x5c2b1c=this['_threadCommentModel']['getUnit'](_0x388789[_0x58dbaf(0x16c)])[_0x58dbaf(0x16b)](_0xd141d9=>_0xd141d9['threadId']===_0x388789[_0x58dbaf(0x1ba)]))==null?void 0x0:_0x5c2b1c[_0x58dbaf(0x17a)];_0x1af7a8&&this[_0x58dbaf(0x17e)]['resolveComment'](_0x3e3556,_0x446d20,_0x1af7a8['id'],_0x388789['solved']===_0x17464c[_0x58dbaf(0x1b1)]);break;}}}));}};_0x1fc069=_0x4cf14d([_0x5bf47b(0x0,_0x5d20e7['Inject'](_0x20afce[_0x1a8e9e(0x197)])),_0x5bf47b(0x1,_0x5d20e7[_0x1a8e9e(0x18d)](_0x3452d3[_0x1a8e9e(0x14a)])),_0x5bf47b(0x2,_0x5d20e7[_0x1a8e9e(0x18d)](_0x5d20e7[_0x1a8e9e(0x1b2)])),_0x5bf47b(0x3,_0x5d20e7[_0x1a8e9e(0x18d)](_0x5d20e7[_0x1a8e9e(0x18e)]))],_0x1fc069);const _0xb64890='thread-comment-data-source.config',_0x12f25f={};var _0x5a9e2f=Object['getOwnPropertyDescriptor'],_0x33de3c=(_0x4da3f5,_0x1fbe1b,_0x3d5e7e,_0xc657d3)=>{const _0x5721c4=_0x1a8e9e;for(var _0x7b0af2=_0xc657d3>0x1?void 0x0:_0xc657d3?_0x5a9e2f(_0x1fbe1b,_0x3d5e7e):_0x1fbe1b,_0x49cbd6=_0x4da3f5[_0x5721c4(0x148)]-0x1,_0x50e11f;_0x49cbd6>=0x0;_0x49cbd6--)(_0x50e11f=_0x4da3f5[_0x49cbd6])&&(_0x7b0af2=_0x50e11f(_0x7b0af2)||_0x7b0af2);return _0x7b0af2;},_0x4b5d64=(_0x59a85b,_0x419e36)=>(_0xa77f65,_0x216638)=>_0x419e36(_0xa77f65,_0x216638,_0x59a85b);function _0x3ac618(_0x4edf92,_0x2deeee){const _0x42f16d=_0x1a8e9e,_0x56784b=_0x4edf92[_0x42f16d(0x187)][0x0];return{..._0x2deeee,'id':_0x56784b[_0x42f16d(0x147)],'resolved':_0x4edf92[_0x42f16d(0x191)]===0x1,'dT':_0x24b1ea(_0x56784b[_0x42f16d(0x185)]),'personId':_0x56784b['userId'],'threadId':_0x56784b[_0x42f16d(0x1ba)]};}function _0x39ccdf(_0x34e8c0,_0x187c77,_0x3340da){const _0x21ae9f=_0x1a8e9e;var _0x562e56,_0x1b69f2;if(((_0x1b69f2=(_0x562e56=_0x34e8c0==null?void 0x0:_0x34e8c0['replies'])==null?void 0x0:_0x562e56[_0x21ae9f(0x148)])!=null?_0x1b69f2:0x0)>0x0){const _0x20a201=(_0x3be9bf,_0x420237)=>({'id':_0x3be9bf['replyId'],'threadId':_0x3be9bf[_0x21ae9f(0x1ba)],'dT':_0x24b1ea(_0x3be9bf[_0x21ae9f(0x185)]),'personId':_0x3be9bf['userId'],'resolved':_0x34e8c0[_0x21ae9f(0x191)]===_0x17464c[_0x21ae9f(0x1b1)],'unitId':_0x187c77,'subUnitId':_0x3340da,'text':JSON[_0x21ae9f(0x18b)](_0x3be9bf[_0x21ae9f(0x1b9)]),'parentId':_0x420237}),_0x513f03=_0x20a201(_0x34e8c0[_0x21ae9f(0x187)][0x0]);return{..._0x513f03,'children':_0x34e8c0[_0x21ae9f(0x187)][_0x21ae9f(0x1c3)](0x1)[_0x21ae9f(0x142)](_0xf855ba=>_0x20a201(_0xf855ba,_0x513f03['id']))};}return null;}let _0x2ab56e=class{constructor(_0x149f36,_0x29a57f,_0x30838c){const _0x262a42=_0x1a8e9e;this[_0x262a42(0x1a9)]=_0x149f36,this[_0x262a42(0x176)]=_0x29a57f,this[_0x262a42(0x17c)]=_0x30838c;}async[_0x1a8e9e(0x149)](_0x54adf0){const _0x3d747f=_0x1a8e9e;var _0x56ac88,_0x28e6d3;const {parentId:_0x2186b1,unitId:_0x3dc1ea,text:_0x3654c9,threadId:_0x14dae8}=_0x54adf0,_0x22c0ae=(_0x28e6d3=(_0x56ac88=_0x3654c9[_0x3d747f(0x1a8)])==null?void 0x0:_0x56ac88[_0x3d747f(0x14f)](_0x281b68=>_0x281b68[_0x3d747f(0x174)]===_0x5d20e7[_0x3d747f(0x157)]['COMMENT'])[_0x3d747f(0x142)](_0x259bac=>_0x259bac[_0x3d747f(0x1ac)]))!=null?_0x28e6d3:[],_0x1d1494=JSON[_0x3d747f(0x167)](_0x3654c9),_0x32e16e=(await this[_0x3d747f(0x17c)][_0x3d747f(0x13f)](_0x3dc1ea))[_0x3d747f(0x180)]();if(_0x2186b1){const _0x26d0f9={'memberId':_0x32e16e,'unitId':_0x3dc1ea,'content':_0x1d1494,'mention':_0x22c0ae,'threadId':_0x14dae8},_0x3a1c81=(await this[_0x3d747f(0x1a9)][_0x3d747f(0x194)](_0x3d747f(0x17d)+_0x3dc1ea+_0x3d747f(0x1bd),{'body':_0x26d0f9}))[_0x3d747f(0x14b)][_0x3d747f(0x152)];return{..._0x54adf0,'id':_0x3a1c81[_0x3d747f(0x147)],'dT':_0x5d20e7[_0x3d747f(0x168)](+_0x3a1c81[_0x3d747f(0x185)])[_0x3d747f(0x1c1)]('YYYY/MM/DD\x20HH:mm'),'personId':_0x3a1c81['userId']};}else{const _0x16ab1a={'memberId':_0x32e16e,'unitId':_0x3dc1ea,'content':_0x1d1494,'mention':_0x22c0ae},_0x28d48d=await this[_0x3d747f(0x1a9)][_0x3d747f(0x194)](_0x3d747f(0x17d)+_0x3dc1ea+_0x3d747f(0x196),{'body':_0x16ab1a});return _0x3ac618(_0x28d48d[_0x3d747f(0x14b)]['comment'],_0x54adf0);}}async[_0x1a8e9e(0x188)](_0x1c5565){const _0x423d55=_0x1a8e9e;var _0x30053a,_0x1f9c0b;const {text:_0xabd1eb,unitId:_0x1fb718}=_0x1c5565,_0x2c7e58=(_0x1f9c0b=(_0x30053a=_0xabd1eb[_0x423d55(0x1a8)])==null?void 0x0:_0x30053a['filter'](_0x391fbd=>_0x391fbd['rangeType']===_0x5d20e7[_0x423d55(0x157)][_0x423d55(0x15c)])[_0x423d55(0x142)](_0x3ad214=>_0x3ad214[_0x423d55(0x1ac)]))!=null?_0x1f9c0b:[],_0x2276ea=JSON[_0x423d55(0x167)](_0xabd1eb),_0x267105=_0x1c5565[_0x423d55(0x1ba)],_0xb7c9af=_0x1c5565['id'],_0x502ce5={'memberId':(await this[_0x423d55(0x17c)][_0x423d55(0x13f)](_0x1fb718))[_0x423d55(0x180)](),'unitId':_0x1fb718,'threadId':_0x267105,'mention':_0x2c7e58,'content':_0x2276ea,'replyId':_0xb7c9af},_0x313004=await this[_0x423d55(0x1a9)]['post'](_0x423d55(0x17d)+_0x1fb718+_0x423d55(0x172),{'body':_0x502ce5});return!_0x313004['body'][_0x423d55(0x18c)]||_0x313004['body'][_0x423d55(0x18c)][_0x423d55(0x1bc)]===0x1;}async[_0x1a8e9e(0x163)](_0x4affb3){const _0x152f31=_0x1a8e9e,{unitId:_0x28f4b5}=_0x4affb3,_0x36c451=_0x4affb3[_0x152f31(0x1ba)],_0x38e162={'memberId':this[_0x152f31(0x176)][_0x152f31(0x199)]()['userID'],'unitId':_0x28f4b5,'threadId':_0x36c451,'solved':_0x4affb3[_0x152f31(0x1c0)]?_0x17464c[_0x152f31(0x1b1)]:_0x17464c[_0x152f31(0x19c)]},_0x49d6c1=await this[_0x152f31(0x1a9)]['post'](_0x152f31(0x17d)+_0x28f4b5+_0x152f31(0x198),{'body':_0x38e162});return!_0x49d6c1[_0x152f31(0x14b)][_0x152f31(0x18c)]||_0x49d6c1[_0x152f31(0x14b)][_0x152f31(0x18c)][_0x152f31(0x1bc)]===0x1;}async['deleteComment'](_0x2ce394,_0x3aafcd,_0x571b97,_0x50d102){const _0x3f9e87=_0x1a8e9e,_0x12a887={'memberId':(await this[_0x3f9e87(0x17c)][_0x3f9e87(0x13f)](_0x2ce394))[_0x3f9e87(0x180)](),'threadId':_0x571b97,'replyId':_0x50d102,'unitId':_0x2ce394},_0x38773a=await this[_0x3f9e87(0x1a9)]['post'](_0x3f9e87(0x17d)+_0x2ce394+'/delete',{'body':_0x12a887});return!_0x38773a[_0x3f9e87(0x14b)][_0x3f9e87(0x18c)]||_0x38773a[_0x3f9e87(0x14b)][_0x3f9e87(0x18c)][_0x3f9e87(0x1bc)]===0x1;}async[_0x1a8e9e(0x160)](_0x41a089,_0x2fb475,_0x5d3526){const _0x1c0a08=_0x1a8e9e,_0x5d5286={'unitId':_0x41a089,'threadId':_0x5d3526},_0x7a6e00=await this[_0x1c0a08(0x1a9)][_0x1c0a08(0x194)](_0x1c0a08(0x17d)+_0x41a089+_0x1c0a08(0x1a3),{'body':_0x5d5286}),_0x282e8b=_0x5d3526[_0x1c0a08(0x142)](_0x4d8e8b=>_0x39ccdf(_0x7a6e00[_0x1c0a08(0x14b)][_0x1c0a08(0x161)][_0x4d8e8b],_0x41a089,_0x2fb475))[_0x1c0a08(0x14f)](Boolean);return Object[_0x1c0a08(0x154)](_0x7a6e00['body']['users'])[_0x1c0a08(0x1bb)](_0x476028=>{const _0x8e7975=_0x1c0a08;this[_0x8e7975(0x176)]['addUser'](_0x476028);}),_0x282e8b;}[_0x1a8e9e(0x15f)](_0x3fe80c){const _0x2a36dc=_0x1a8e9e;return{'id':_0x3fe80c['id'],'threadId':_0x3fe80c[_0x2a36dc(0x1ba)],'ref':_0x3fe80c['ref']};}};_0x2ab56e=_0x33de3c([_0x4b5d64(0x0,_0x5d20e7['Inject'](_0x58b394[_0x1a8e9e(0x183)])),_0x4b5d64(0x1,_0x5d20e7['Inject'](_0x5d20e7['UserManagerService'])),_0x4b5d64(0x2,_0x5d20e7[_0x1a8e9e(0x18d)](_0x20afce[_0x1a8e9e(0x169)]))],_0x2ab56e);var _0x287621=Object['getOwnPropertyDescriptor'],_0x2a39d4=(_0x144103,_0x212883,_0x422f6f,_0x20319c)=>{for(var _0xfa038e=_0x20319c>0x1?void 0x0:_0x20319c?_0x287621(_0x212883,_0x422f6f):_0x212883,_0x159eaf=_0x144103['length']-0x1,_0x52fbd0;_0x159eaf>=0x0;_0x159eaf--)(_0x52fbd0=_0x144103[_0x159eaf])&&(_0xfa038e=_0x52fbd0(_0xfa038e)||_0xfa038e);return _0xfa038e;},_0x3da616=(_0x56791a,_0xa820b5)=>(_0x1f79fe,_0xd2355d)=>_0xa820b5(_0x1f79fe,_0xd2355d,_0x56791a);let _0x1267d5=class extends _0x5d20e7['Disposable']{constructor(_0x255e7e,_0x2a36d3){const _0xe172c8=_0x1a8e9e;super(),this[_0xe172c8(0x192)]=_0x255e7e,this[_0xe172c8(0x18f)]=_0x2a36d3,this[_0xe172c8(0x181)]();}[_0x1a8e9e(0x181)](){const _0x950854=_0x1a8e9e;this[_0x950854(0x192)][_0x950854(0x18a)]=this[_0x950854(0x18f)],this[_0x950854(0x192)][_0x950854(0x1b0)]=!0x1;}};_0x1267d5=_0x2a39d4([_0x3da616(0x0,_0x3452d3[_0x1a8e9e(0x1c4)]),_0x3da616(0x1,_0x5d20e7['Inject'](_0x2ab56e))],_0x1267d5);var _0x2d645f=Object[_0x1a8e9e(0x19e)],_0x547839=Object['getOwnPropertyDescriptor'],_0x3da2ee=(_0x4d98a7,_0x33898c,_0x38c66a)=>_0x33898c in _0x4d98a7?_0x2d645f(_0x4d98a7,_0x33898c,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x38c66a}):_0x4d98a7[_0x33898c]=_0x38c66a,_0x1e75e8=(_0x2dbda4,_0x191970,_0x339e7b,_0x1c81ad)=>{const _0x5d9df3=_0x1a8e9e;for(var _0xa7a8e5=_0x1c81ad>0x1?void 0x0:_0x1c81ad?_0x547839(_0x191970,_0x339e7b):_0x191970,_0x12a638=_0x2dbda4[_0x5d9df3(0x148)]-0x1,_0x625433;_0x12a638>=0x0;_0x12a638--)(_0x625433=_0x2dbda4[_0x12a638])&&(_0xa7a8e5=_0x625433(_0xa7a8e5)||_0xa7a8e5);return _0xa7a8e5;},_0x5fe994=(_0x31255a,_0x5215e2)=>(_0x3c5f13,_0x21f501)=>_0x5215e2(_0x3c5f13,_0x21f501,_0x31255a),_0x1ca5d2=(_0x57ec55,_0x3e32e0,_0x537692)=>_0x3da2ee(_0x57ec55,typeof _0x3e32e0!='symbol'?_0x3e32e0+'':_0x3e32e0,_0x537692);_0x17373e[_0x1a8e9e(0x158)]=class extends _0x5d20e7['Plugin']{constructor(_0xc79a80=_0x12f25f,_0x14a5fa,_0x3f1cb2){const _0x5cbd5=_0x1a8e9e;super(),this[_0x5cbd5(0x1bf)]=_0xc79a80,this[_0x5cbd5(0x153)]=_0x14a5fa,this['_configService']=_0x3f1cb2;const {..._0x49058b}=_0x5d20e7[_0x5cbd5(0x140)]({},_0x12f25f,this[_0x5cbd5(0x1bf)]);this['_configService'][_0x5cbd5(0x15a)](_0xb64890,_0x49058b);}[_0x1a8e9e(0x165)](){const _0x8e1a2d=_0x1a8e9e;[[_0x2ab56e],[_0x1267d5],[_0x1fc069]][_0x8e1a2d(0x1bb)](_0x287a5e=>{const _0x119c25=_0x8e1a2d;this[_0x119c25(0x153)][_0x119c25(0x15e)](_0x287a5e);});}[_0x1a8e9e(0x195)](){const _0x37641d=_0x1a8e9e;this[_0x37641d(0x153)][_0x37641d(0x145)](_0x1267d5),this[_0x37641d(0x153)][_0x37641d(0x145)](_0x1fc069);}},_0x1ca5d2(_0x17373e['UniverThreadCommentDataSourcePlugin'],_0x1a8e9e(0x173),_0x32f76b),_0x1ca5d2(_0x17373e['UniverThreadCommentDataSourcePlugin'],_0x1a8e9e(0x14d),_0x5d20e7[_0x1a8e9e(0x179)][_0x1a8e9e(0x16d)]),_0x17373e[_0x1a8e9e(0x158)]=_0x1e75e8([_0x5d20e7[_0x1a8e9e(0x178)](_0x3acfe9['UniverThreadCommentUIPlugin'],_0x20afce['UniverCollaborationClientPlugin'],_0x21586a['UniverLicensePlugin']),_0x5fe994(0x1,_0x5d20e7['Inject'](_0x5d20e7['Injector'])),_0x5fe994(0x2,_0x5d20e7[_0x1a8e9e(0x1a2)])],_0x17373e[_0x1a8e9e(0x158)]),Object[_0x1a8e9e(0x19e)](_0x17373e,Symbol[_0x1a8e9e(0x162)],{'value':_0x1a8e9e(0x15d)});}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@univerjs-pro/thread-comment-datasource",
3
- "version": "0.10.10-nightly.202510170942",
3
+ "version": "0.10.10-nightly.202510180256",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "author": "DreamNum <developer@univer.ai>",
@@ -45,13 +45,13 @@
45
45
  "rxjs": ">=7.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@univerjs-pro/collaboration-client": "0.10.10-nightly.202510170942",
49
- "@univerjs-pro/license": "0.10.10-nightly.202510170942",
50
- "@univerjs/network": "0.10.10-nightly.202510170942",
48
+ "@univerjs-pro/collaboration-client": "0.10.10-nightly.202510180256",
49
+ "@univerjs-pro/license": "0.10.10-nightly.202510180256",
50
+ "@univerjs/network": "0.10.10-nightly.202510180256",
51
51
  "@univerjs/protocol": "0.1.47-alpha.0",
52
- "@univerjs/thread-comment": "0.10.10-nightly.202510170942",
53
- "@univerjs/core": "0.10.10-nightly.202510170942",
54
- "@univerjs/thread-comment-ui": "0.10.10-nightly.202510170942"
52
+ "@univerjs/core": "0.10.10-nightly.202510180256",
53
+ "@univerjs/thread-comment": "0.10.10-nightly.202510180256",
54
+ "@univerjs/thread-comment-ui": "0.10.10-nightly.202510180256"
55
55
  },
56
56
  "devDependencies": {
57
57
  "rxjs": "7.8.2",